diff --git a/CHANGELOG.md b/CHANGELOG.md index c3f67e271..ef889f6d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [UNRELEASED] +## [0.9.4] ### Added - Added costs for configurable string feature options in `manifold-plan-selector`. +- Added `read-only` attribute to `manifold-plan-details` to optionally disable inputs for configurable features. +- Added the ability to create and resize plans with configurable features. ## [0.9.3] - 2019-01-13 diff --git a/docs/docs/data/manifold-data-provision-button.md b/docs/docs/data/manifold-data-provision-button.md index f3d368342..e167ac279 100644 --- a/docs/docs/data/manifold-data-provision-button.md +++ b/docs/docs/data/manifold-data-provision-button.md @@ -24,13 +24,13 @@ An unstyled button for creating resources. 🔒 Requires [authentication][auth]. ``` -| Attribute | Required? | Description | -| :--------------- | :-------: | :------------------------------------------------------------------------------------------------------------- | -| `product-label` | ✅ | Which product this is for, identified by its unique slug (e.g. `mailgun`) | -| `plan-id` | ✅ | Which plan a user has selected | -| `region-id` | ✅ | Required only if this is a plan where the user must select a region (most plans do not have this) | -| `resource-label` | | What the user has named this resource (we’ll generate a random name if this is blank) | -| `features` | | Required only if this is a configurable plan that requires a user’s inputs (e.g. JawsDB MySQL **Custom** plan) | +| Attribute | Required? | Description | +| :------------------- | :-------: | :------------------------------------------------------------------------------------------------------------- | +| `product-label` | ✅ | Which product this is for, identified by its unique slug (e.g. `mailgun`) | +| `plan-id` | ✅ | Which plan a user has selected | +| `region-id` | ✅ | Required only if this is a plan where the user must select a region (most plans do not have this) | +| `resource-label` | | What the user has named this resource (we’ll generate a random name if this is blank) | +| `configuredFeatures` | | Required only if this is a configurable plan that requires a user’s inputs (e.g. JawsDB MySQL **Custom** plan) | For a list of these values like `product-label` and `plan-id`, refer to our GraphQL API: @@ -45,12 +45,12 @@ everything in manually. You could do that like so: ```js const resourceLabel = ''; // Can be obtained from your own input -function updateButton({ detail: { features, planId, productLabel, regionId } }) { +function updateButton({ detail: { configuredFeatures, planId, productLabel, regionId } }) { const provisionButton = document.querySelector('manifold-data-provision-button'); provisionButton.productLabel = productLabel; provisionButton.resourceLabel = resourceLabel; provisionButton.planId = planId; - provisionButton.features = features; // only needed for configurable products such as JawsDB custom + provisionButton.configuredFeatures = configuredFeatures; // only needed for configurable products such as JawsDB custom provisionButton.regionId = regionId; // only needed for products that allow users to choose a region } @@ -101,12 +101,12 @@ document.addEventListener('manifold-provisionButton-invalid', ({ detail }) => co // } ``` -| Name | Returns | Description | -| ---------------------------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | -| `manifold-provisionButton-click` | `resourceLabel`, `productLabel`, `planId` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. | -| `manifold-provisionButton-success` | `message`, `resourceLabel`, `resourceId`, `productLabel`, `planId` | Successful provision. Returns name, along with a resource ID | -| `manifold-provisionButton-error` | `message`, `resourceLabel`, `productLabel`, `planId` | Erred provision, along with information on what went wrong. | -| `manifold-provisionButton-invalid` | `message`, `resourceLabel`, `productLabel`, `planId` | Fires if the resource name isn’t named properly. | +| Name | Returns | Description | +| ---------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `manifold-provisionButton-click` | `resourceLabel`, `productLabel`, `planId`, `configuredFeatures` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. | +| `manifold-provisionButton-success` | `message`, `resourceLabel`, `resourceId`, `productLabel`, `planId` | Successful provision. Returns name, along with a resource ID | +| `manifold-provisionButton-error` | `message`, `resourceLabel`, `productLabel`, `planId`, `configuredFeatures` | Erred provision, along with information on what went wrong. | +| `manifold-provisionButton-invalid` | `message`, `resourceLabel`, `productLabel`, `planId` | Fires if the resource name isn’t named properly. | ## Styling diff --git a/docs/docs/data/manifold-data-resize-button.md b/docs/docs/data/manifold-data-resize-button.md index 482f79335..7dd80e967 100644 --- a/docs/docs/data/manifold-data-resize-button.md +++ b/docs/docs/data/manifold-data-resize-button.md @@ -39,8 +39,8 @@ document.addEventListener('manifold-resizeButton-error', ({ detail }) => console // } ``` -| Name | Returns | Description | -| :------------------------------ | :------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------- | -| `manifold-resizeButton-click` | `planId`, `resourceId`, `resourceLabel` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. | -| `manifold-resizeButton-success` | `message`, `planId`, `resourceId`, `resourceLabel` | Successful resize with confirmation on values returned from our backend. | -| `manifold-resizeButton-error` | `message`, `planId`, `resourceId`, `resourceLabel` | Erred resize, along with information on what went wrong. | +| Name | Returns | Description | +| :------------------------------ | :----------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------- | +| `manifold-resizeButton-click` | `planId`, `resourceId`, `resourceLabel`, `configuredFeatures` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. | +| `manifold-resizeButton-success` | `message`, `planId`, `resourceId`, `resourceLabel` | Successful resize with confirmation on values returned from our backend. | +| `manifold-resizeButton-error` | `message`, `planId`, `resourceId`, `resourceLabel`, `configuredFeatures` | Erred resize, along with information on what went wrong. |