Skip to content

Commit 57e9527

Browse files
emmatowndcousens
andauthored
Add new Structure field type (#7936)
Co-authored-by: Daniel Cousens <[email protected]> Co-authored-by: Daniel Cousens <[email protected]>
1 parent f22bbc7 commit 57e9527

File tree

20 files changed

+1596
-95
lines changed

20 files changed

+1596
-95
lines changed

.changeset/late-ties-multiply.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@keystone-6/fields-document": minor
3+
---
4+
5+
Adds a new `integer` component field type

.changeset/late-ties-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@keystone-6/fields-document": minor
3+
---
4+
5+
Adds a new `structure` field type, a composable JSON data structure with a powerful GraphQL API

docs/pages/docs/guides/document-fields.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ component({
687687
`@keystone-6/core/component-blocks` ships with a set of form fields for common purposes:
688688

689689
- `fields.text({ label: '...', defaultValue: '...' })`
690+
{% if $nextRelease %}
691+
- `fields.integer({ label: '...', defaultValue: '...' })`
692+
{% /if %}
690693
- `fields.url({ label: '...', defaultValue: '...' })`
691694
- `fields.select({ label: '...', options: [{ label:'A', value:'a' }, { label:'B', value:'b' }] defaultValue: 'a' })`
692695
- `fields.checkbox({ label: '...', defaultValue: false })`
@@ -869,4 +872,4 @@ heading="Document Field Demo"
869872
href="/docs/guides/document-field-demo" %}
870873
Test drive the many features of Keystone’s Document field on this website.
871874
{% /well %}
872-
{% /related-content %}
875+
{% /related-content %}

packages/fields-document/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
"module": "./primitives/dist/keystone-6-fields-document-primitives.esm.js",
1919
"default": "./primitives/dist/keystone-6-fields-document-primitives.cjs.js"
2020
},
21+
"./structure-views": {
22+
"module": "./structure-views/dist/keystone-6-fields-document-structure-views.esm.js",
23+
"default": "./structure-views/dist/keystone-6-fields-document-structure-views.cjs.js"
24+
},
2125
"./component-blocks": {
2226
"module": "./component-blocks/dist/keystone-6-fields-document-component-blocks.esm.js",
2327
"default": "./component-blocks/dist/keystone-6-fields-document-component-blocks.cjs.js"
@@ -28,14 +32,16 @@
2832
"dist",
2933
"component-blocks",
3034
"primitives",
31-
"views"
35+
"views",
36+
"structure-views"
3237
],
3338
"preconstruct": {
3439
"entrypoints": [
3540
"component-blocks.tsx",
3641
"index.ts",
3742
"primitives.ts",
38-
"views.tsx"
43+
"views.tsx",
44+
"structure-views.tsx"
3945
]
4046
},
4147
"peerDependencies": {
@@ -53,6 +59,7 @@
5359
"@keystone-ui/core": "^5.0.2",
5460
"@keystone-ui/fields": "^7.1.2",
5561
"@keystone-ui/icons": "^6.0.2",
62+
"@keystone-ui/modals": "^6.0.2",
5663
"@keystone-ui/popover": "^6.0.2",
5764
"@keystone-ui/tooltip": "^6.0.2",
5865
"@types/react": "^18.0.9",

0 commit comments

Comments
 (0)