payload 1.12.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/admin/components/elements/ArrayAction/index.js +1 -1
  2. package/dist/admin/components/elements/ArrayAction/index.js.map +1 -1
  3. package/dist/admin/components/elements/ThumbnailCard/index.js +2 -2
  4. package/dist/admin/components/elements/ThumbnailCard/index.js.map +1 -1
  5. package/dist/admin/components/elements/ThumbnailCard/index.scss +2 -0
  6. package/dist/admin/components/elements/WhereBuilder/Condition/Select/index.d.ts +3 -0
  7. package/dist/admin/components/elements/WhereBuilder/Condition/Select/index.js +75 -0
  8. package/dist/admin/components/elements/WhereBuilder/Condition/Select/index.js.map +1 -0
  9. package/dist/admin/components/elements/WhereBuilder/Condition/Select/types.d.ts +8 -0
  10. package/dist/admin/components/elements/WhereBuilder/Condition/Select/types.js +3 -0
  11. package/dist/admin/components/elements/WhereBuilder/Condition/Select/types.js.map +1 -0
  12. package/dist/admin/components/elements/WhereBuilder/Condition/index.js +12 -1
  13. package/dist/admin/components/elements/WhereBuilder/Condition/index.js.map +1 -1
  14. package/dist/admin/components/elements/WhereBuilder/field-types.d.ts +7 -0
  15. package/dist/admin/components/elements/WhereBuilder/field-types.js +5 -1
  16. package/dist/admin/components/elements/WhereBuilder/field-types.js.map +1 -1
  17. package/dist/admin/components/forms/Form/fieldReducer.js +6 -8
  18. package/dist/admin/components/forms/Form/fieldReducer.js.map +1 -1
  19. package/dist/admin/components/forms/Form/index.js +58 -22
  20. package/dist/admin/components/forms/Form/index.js.map +1 -1
  21. package/dist/admin/components/forms/Form/types.d.ts +1 -1
  22. package/dist/admin/components/forms/field-types/Blocks/BlocksDrawer/index.js.map +1 -1
  23. package/dist/admin/components/forms/field-types/Blocks/BlocksDrawer/index.scss +12 -23
  24. package/dist/admin/components/forms/field-types/Blocks/RowActions.js +6 -4
  25. package/dist/admin/components/forms/field-types/Blocks/RowActions.js.map +1 -1
  26. package/dist/admin/components/utilities/Preferences/index.d.ts +1 -1
  27. package/dist/admin/hooks/useThumbnail.js +7 -3
  28. package/dist/admin/hooks/useThumbnail.js.map +1 -1
  29. package/dist/admin/scss/app.scss +4 -0
  30. package/dist/admin/scss/colors.scss +4 -0
  31. package/dist/admin/scss/resets.scss +9 -0
  32. package/dist/auth/operations/getFieldsToSign.js +95 -17
  33. package/dist/auth/operations/getFieldsToSign.js.map +1 -1
  34. package/dist/fields/config/sanitize.js +3 -0
  35. package/dist/fields/config/sanitize.js.map +1 -1
  36. package/dist/fields/config/schema.js +4 -2
  37. package/dist/fields/config/schema.js.map +1 -1
  38. package/dist/fields/config/types.d.ts +2 -1
  39. package/dist/fields/config/types.js.map +1 -1
  40. package/dist/utilities/buildFieldSchemaMap.js +6 -1
  41. package/dist/utilities/buildFieldSchemaMap.js.map +1 -1
  42. package/docs/authentication/overview.mdx +1 -1
  43. package/docs/fields/array.mdx +7 -3
  44. package/docs/fields/blocks.mdx +7 -3
  45. package/docs/fields/checkbox.mdx +7 -0
  46. package/docs/fields/code.mdx +7 -0
  47. package/docs/fields/collapsible.mdx +7 -0
  48. package/docs/fields/date.mdx +7 -0
  49. package/docs/fields/email.mdx +8 -1
  50. package/docs/fields/group.mdx +7 -0
  51. package/docs/fields/json.mdx +7 -0
  52. package/docs/fields/number.mdx +7 -0
  53. package/docs/fields/point.mdx +7 -0
  54. package/docs/fields/radio.mdx +7 -0
  55. package/docs/fields/relationship.mdx +7 -0
  56. package/docs/fields/rich-text.mdx +7 -0
  57. package/docs/fields/row.mdx +7 -0
  58. package/docs/fields/select.mdx +7 -0
  59. package/docs/fields/tabs.mdx +14 -9
  60. package/docs/fields/text.mdx +7 -0
  61. package/docs/fields/textarea.mdx +7 -0
  62. package/docs/fields/upload.mdx +7 -0
  63. package/package.json +1 -1
@@ -11,6 +11,13 @@ keywords: code, fields, config, configuration, documentation, Content Management
11
11
  The Code field type saves a string in the database, but provides the Admin panel with a code editor styled interface.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/code.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/code-dark.png'
17
+ alt='Shows a Code field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a Code field'
19
+ />
20
+
14
21
  This field uses the `monaco-react` editor syntax highlighting.
15
22
 
16
23
  ### Config
@@ -10,6 +10,13 @@ keywords: row, fields, config, configuration, documentation, Content Management
10
10
  The Collapsible field is presentational-only and only affects the Admin panel. By using it, you can place fields within a nice layout component that can be collapsed / expanded.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/collapsible.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/collapsible-dark.png'
16
+ alt='Shows a Collapsible field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Collapsible field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -11,6 +11,13 @@ keywords: date, fields, config, configuration, documentation, Content Management
11
11
  with a customizable time picker interface.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/date.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/date-dark.png'
17
+ alt='Shows a Date field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a Date field'
19
+ />
20
+
14
21
  This field uses [`react-datepicker`](https://www.npmjs.com/package/react-datepicker) for the Admin panel component.
15
22
 
16
23
  ### Config
@@ -6,10 +6,17 @@ desc: The Email field enforces that the value provided is a valid email address.
6
6
  keywords: email, fields, config, configuration, documentation, Content Management System, cms, headless, javascript, node, react, express
7
7
  ---
8
8
 
9
- <Banner >
9
+ <Banner>
10
10
  The Email field enforces that the value provided is a valid email address.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/email.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/email-dark.png'
16
+ alt='Shows an Email field in the Payload admin panel'
17
+ caption='Admin panel screenshot of an Email field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -11,6 +11,13 @@ keywords: group, fields, config, configuration, documentation, Content Managemen
11
11
  also groups fields together visually in the Admin panel.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/group.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/group-dark.png'
17
+ alt='Shows a Group field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a Group field'
19
+ />
20
+
14
21
  ### Config
15
22
 
16
23
  | Option | Description |
@@ -11,6 +11,13 @@ keywords: json, fields, config, configuration, documentation, Content Management
11
11
  The JSON field type saves actual JSON in the database, which differs from the Code field that saves the value as a string in the database.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/json.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/json-dark.png'
17
+ alt='Shows a JSON field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a JSON field'
19
+ />
20
+
14
21
  This field uses the `monaco-react` editor syntax highlighting.
15
22
 
16
23
  ### Config
@@ -10,6 +10,13 @@ keywords: number, fields, config, configuration, documentation, Content Manageme
10
10
  The Number field stores and validates numeric entry and supports additional numerical validation and formatting features.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/number.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/number-dark.png'
16
+ alt='Shows a Number field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Number field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -11,6 +11,13 @@ keywords: point, geolocation, geospatial, geojson, 2dsphere, config, configurati
11
11
  The Point field type saves a pair of coordinates in the database and assigns an index for location related queries.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/point.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/point-dark.png'
17
+ alt='Shows a Point field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a Point field'
19
+ />
20
+
14
21
  The data structure in the database matches the GeoJSON structure to represent point. The Payload APIs simplifies the object data to only the [longitude, latitude] location.
15
22
 
16
23
  ### Config
@@ -10,6 +10,13 @@ keywords: radio, fields, config, configuration, documentation, Content Managemen
10
10
  The Radio Group field type allows for the selection of one value from a predefined set of possible values and presents a radio group-style set of inputs to the Admin panel.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/radio.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/radio-dark.png'
16
+ alt='Shows a Radio field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Radio field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -11,6 +11,13 @@ keywords: relationship, fields, config, configuration, documentation, Content Ma
11
11
  provides for the ability to easily relate documents together.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/relationship.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/relationship-dark.png'
17
+ alt='Shows a relationship field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a Relationship field'
19
+ />
20
+
14
21
  **Example uses:**
15
22
 
16
23
  - To add `Product` documents to an `Order` document
@@ -10,6 +10,13 @@ keywords: rich text, fields, config, configuration, documentation, Content Manag
10
10
  The Rich Text field is a powerful way to allow editors to write dynamic content. The content is saved as JSON in the database and can be converted into any format, including HTML, that you need.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/richtext.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/richtext-dark.png'
16
+ alt='Shows a Rich Text field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Rich Text field'
18
+ />
19
+
13
20
  The Admin component is built on the powerful [`slatejs`](https://docs.slatejs.org/) editor and is meant to be as extensible and customizable as possible.
14
21
 
15
22
  <Banner type="success">
@@ -10,6 +10,13 @@ keywords: row, fields, config, configuration, documentation, Content Management
10
10
  The Row field is presentational-only and only affects the Admin panel. By using it, you can arrange fields next to each other horizontally.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/row.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/row-dark.png'
16
+ alt='Shows a row field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Row field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -11,6 +11,13 @@ keywords: select, multi-select, fields, config, configuration, documentation, Co
11
11
  a predefined list as an enumeration.
12
12
  </Banner>
13
13
 
14
+ <LightDarkImage
15
+ srcLight='https://payloadcms.com/images/docs/fields/select.png'
16
+ srcDark='https://payloadcms.com/images/docs/fields/select-dark.png'
17
+ alt='Shows a Select field in the Payload admin panel'
18
+ caption='Admin panel screenshot of a Select field'
19
+ />
20
+
14
21
  ### Config
15
22
 
16
23
  | Option | Description |
@@ -12,8 +12,13 @@ keywords: tabs, fields, config, configuration, documentation, Content Management
12
12
  component that separates certain sub-fields by a tabbed interface.
13
13
  </Banner>
14
14
 
15
- ![Tabs field type used to separate Hero fields from Page Layout](https://payloadcms.com/images/docs/fields/tabs/tabs.jpg)
16
- _Tabs field type used to separate Hero fields from Page Layout_
15
+ <LightDarkImage
16
+ srcLight='https://payloadcms.com/images/docs/fields/tabs.png'
17
+ srcDark='https://payloadcms.com/images/docs/fields/tabs-dark.png'
18
+ alt='Shows a tabs field used to separate Hero and Page layout in the Payload admin panel'
19
+ caption='Tabs field type used to separate Hero fields from Page Layout'
20
+ />
21
+
17
22
 
18
23
  ### Config
19
24
 
@@ -25,14 +30,14 @@ _Tabs field type used to separate Hero fields from Page Layout_
25
30
 
26
31
  #### Tab-specific Config
27
32
 
28
- Each tab has its own required `label` and `fields` array. You can also optionally pass a `description` to render within each individual tab.
33
+ Each tab must have either a `name` or `label` and the required `fields` array. You can also optionally pass a `description` to render within each individual tab.
29
34
 
30
- | Option | Description |
31
- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
32
- | **`name`** | An optional property name to be used when stored and retrieved from the database. [More](/docs/fields/overview#field-names) |
33
- | **`label`** \* | The label to render on the tab itself. |
34
- | **`fields`** \* | The fields to render within this tab. |
35
- | **`description`** | Optionally render a description within this tab to describe the contents of the tab itself. |
35
+ | Option | Description |
36
+ | ---------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
37
+ | **`name`** | Groups field data into an object when stored and retrieved from the database. [More](/docs/fields/overview#field-names) |
38
+ | **`label`** | The label to render on the tab itself. Required when name is undefined, defaults to name converted to words. |
39
+ | **`fields`** \* | The fields to render within this tab. |
40
+ | **`description`** | Optionally render a description within this tab to describe the contents of the tab itself. |
36
41
  | **`interfaceName`** | Create a top level, reusable [Typescript interface](/docs/typescript/generating-types#custom-field-interfaces) & [GraphQL type](/docs/graphql/graphql-schema#custom-field-schemas). (`name` must be present) |
37
42
 
38
43
  _\* An asterisk denotes that a property is required._
@@ -10,6 +10,13 @@ keywords: text, fields, config, configuration, documentation, Content Management
10
10
  The Text field type is one of the most commonly used fields. It saves a string to the database and provides the Admin panel with a simple text input.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/text.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/text-dark.png'
16
+ alt='Shows a text field and read-only text field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Text field and read-only Text field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -10,6 +10,13 @@ keywords: textarea, fields, config, configuration, documentation, Content Manage
10
10
  The Textarea field is almost identical to the Text field but it features a slightly larger input that is better suited to edit longer text.
11
11
  </Banner>
12
12
 
13
+ <LightDarkImage
14
+ srcLight='https://payloadcms.com/images/docs/fields/textarea.png'
15
+ srcDark='https://payloadcms.com/images/docs/fields/textarea-dark.png'
16
+ alt='Shows a textarea field and read-only textarea field in the Payload admin panel'
17
+ caption='Admin panel screenshot of a Textarea field and read-only Textarea field'
18
+ />
19
+
13
20
  ### Config
14
21
 
15
22
  | Option | Description |
@@ -15,6 +15,13 @@ keywords: upload, images media, fields, config, configuration, documentation, Co
15
15
  To use this field, you need to have a Collection configured to allow Uploads. For more information, [click here](/docs/upload/overview) to read about how to enable Uploads on a collection by collection basis.
16
16
  </Banner>
17
17
 
18
+ <LightDarkImage
19
+ srcLight='https://payloadcms.com/images/docs/fields/upload.png'
20
+ srcDark='https://payloadcms.com/images/docs/fields/upload-dark.png'
21
+ alt='Shows an upload field in the Payload admin panel'
22
+ caption='Admin panel screenshot of an Upload field'
23
+ />
24
+
18
25
  **Example uses:**
19
26
 
20
27
  - To provide a `Page` with a featured image
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "description": "Node, React and MongoDB Headless CMS and Application Framework",
5
5
  "license": "MIT",
6
6
  "engines": {