docs: update docs for 3.2 release

This commit is contained in:
Daniel Lautzenheiser 2023-09-06 17:15:49 -04:00
parent f37952a84a
commit b9a7b731e1
5 changed files with 68 additions and 19 deletions

View File

@ -56,6 +56,7 @@ The react component that renders the control. It receives the following props:
| disabled | boolean | Specifies if the widget control should be disabled |
| submitted | boolean | Specifies if a save attempt has been made in the editor session |
| forList | boolean | Specifies if the widget is within a `list` widget |
| listItemPath | string<br />\| undefined | `.` separated string donating the path to the closet parent list item within the entry |
| forSingleList | boolean | Specifies if the widget is within a singleton `list` widget (string array, number array, etc) |
| duplicate | function | Specifies if that field is an i18n duplicate |
| hidden | function | Specifies if that field should be hidden |

View File

@ -0,0 +1,40 @@
---
group: Widgets
title: Key Value
weight: 16
---
- **Name:** `keyvalue`
- **UI:** Pairs of text inputs
- **Data type:** `object of key/value pairs`
The key value widget allows editors to enter an arbitrary number of key/value pairs.
## Widget Options
For common options, see [Common widget options](/docs/widgets#common-widget-options).
| Name | Type | Default | Description |
| ----------- | ------ | ------------ | --------------------------------------------------------------------------------- |
| default | string | `{ '': '' }` | _Optional_. The default value for the field. Accepts an object of key/value pairs |
| key_label | string | `'Key'` | _Optional_. The label for the `Key` column of inputs |
| value_label | string | `'Value'` | _Optional_. The label for the `Value` column of inputs |
| min | number | | _Optional_. Minimum number of key/value pairs |
| max | number | | _Optional_. Maximum number of key/value pairs |
## Example
<CodeTabs>
```yaml
name: environment_variables
label: Environment Variables
widget: keyvalue
```
```js
name: 'environment_variables',
label: 'Environment Variables',
widget: 'keyvalue',
```
</CodeTabs>

View File

@ -24,6 +24,7 @@ For common options, see [Common widget options](/docs/widgets#common-widget-opti
| media_library | Media Library Options | `{}` | _Optional_. Media library settings to apply when the media library is opened by the current widget. See [Media Library](/docs/configuration-options#media-library) |
| choose_url | boolean | `true` | _Optional_. When set to `false`, the "Insert from URL" button will be hidden |
| toolbar_buttons | object | [] | _Optional_. Specifies which toolbar items to show for the markdown widget. See [Toolbar Customization](#toolbar-customization) |
| show_raw | boolean | `false` | _Optional_. Specifies if the raw markdown editor should be shown |
## Example

View File

@ -12,25 +12,26 @@ To see working examples of all of the built-in widgets, try making a 'Kitchen Si
## Available Widgets
| Name | Description |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [Boolean](/docs/widget-boolean) | The boolean widget translates a toggle switch input to a true or false value |
| [Code](/docs/widget-code) | The code widget provides a code editor (powered by Codemirror) with optional syntax awareness |
| [Color](/docs/widget-color) | The color widget translates a color picker to a color string |
| [Datetime](/docs/widget-datetime) | The datetime widget translates a datetime picker to a datetime string |
| [File](/docs/widget-file) | The file widget allows editors to upload a file or select an existing one from the media library |
| [Hidden](/docs/widget-hidden) | Hidden widgets do not display in the UI |
| [Image](/docs/widget-image) | The file widget allows editors to upload a file or select an existing one from the media library |
| [List](/docs/widget-list) | The list widget allows you to create a repeatable item in the UI which saves as a list of widget values |
| [Map](/docs/widget-map) | The map widget allows you to edit spatial data using an interactive map |
| [Markdown](/docs/widget-markdown) | The markdown widget provides a full fledged text editor allowing users to format text with features such as headings and blockquotes |
| [Number](/docs/widget-number) | The number widget uses an HTML number input |
| [Object](/docs/widget-object) | The object widget allows you to group multiple widgets together, nested under a single field |
| [Relation](/docs/widget-relation) | The relation widget allows you to reference items from another collection |
| [Select](/docs/widget-select) | The select widget allows you to pick a string value from a dropdown menu |
| [String](/docs/widget-string) | The string widget translates a basic text input to a string value |
| [Text](/docs/widget-text) | The text widget takes a multiline text field and saves it as a string |
| [UUID](/docs/widget-uuid) | The uuid widget generates a unique id (uuid) and saves it as a string |
| Name | Description |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [Boolean](/docs/widget-boolean) | The boolean widget translates a toggle switch input to a true or false value |
| [Code](/docs/widget-code) | The code widget provides a code editor (powered by Codemirror) with optional syntax awareness |
| [Color](/docs/widget-color) | The color widget translates a color picker to a color string |
| [Datetime](/docs/widget-datetime) | The datetime widget translates a datetime picker to a datetime string |
| [File](/docs/widget-file) | The file widget allows editors to upload a file or select an existing one from the media library |
| [Hidden](/docs/widget-hidden) | Hidden widgets do not display in the UI |
| [Image](/docs/widget-image) | The file widget allows editors to upload a file or select an existing one from the media library |
| [Key Value](/docs/widget-keyvalue) | The key value widget allows editors to enter an arbitrary number of key/value pairs. |
| [List](/docs/widget-list) | The list widget allows you to create a repeatable item in the UI which saves as a list of widget values |
| [Map](/docs/widget-map) | The map widget allows you to edit spatial data using an interactive map |
| [Markdown](/docs/widget-markdown) | The markdown widget provides a full fledged text editor allowing users to format text with features such as headings and blockquotes |
| [Number](/docs/widget-number) | The number widget uses an HTML number input |
| [Object](/docs/widget-object) | The object widget allows you to group multiple widgets together, nested under a single field |
| [Relation](/docs/widget-relation) | The relation widget allows you to reference items from another collection |
| [Select](/docs/widget-select) | The select widget allows you to pick a string value from a dropdown menu |
| [String](/docs/widget-string) | The string widget translates a basic text input to a string value |
| [Text](/docs/widget-text) | The text widget takes a multiline text field and saves it as a string |
| [UUID](/docs/widget-uuid) | The uuid widget generates a unique id (uuid) and saves it as a string |
## Common widget options

View File

@ -1,5 +1,11 @@
{
"releases": [
{
"date": "2023-09-07T10:00:00.000Z",
"version": "v3.2.0",
"type": "minor",
"description": "Add key/value widget and raw markdown editor mode"
},
{
"date": "2023-09-01T10:00:00.000Z",
"version": "v3.1.2",