diff --git a/.changeset/clever-cows-invite.md b/.changeset/clever-cows-invite.md new file mode 100644 index 00000000000..cef4afe25e0 --- /dev/null +++ b/.changeset/clever-cows-invite.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/fields-document': patch +--- + +Fixed `fields.select` not passing options to the select diff --git a/.changeset/cyan-carrots-protect.md b/.changeset/cyan-carrots-protect.md new file mode 100644 index 00000000000..701f4a6e95f --- /dev/null +++ b/.changeset/cyan-carrots-protect.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/fields-document': major +--- + +Changed `NotEditable` component from rendering a div to a span so it can be used for inline elements diff --git a/.changeset/gorgeous-pugs-occur.md b/.changeset/gorgeous-pugs-occur.md new file mode 100644 index 00000000000..db6437cec50 --- /dev/null +++ b/.changeset/gorgeous-pugs-occur.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/fields-document': minor +--- + +Added `fields.multiselect` prop field diff --git a/.changeset/grumpy-paws-call.md b/.changeset/grumpy-paws-call.md new file mode 100644 index 00000000000..bb8be71339d --- /dev/null +++ b/.changeset/grumpy-paws-call.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/keystone': patch +--- + +Updated `withItemData` to still return the rest of the `session` object if no item was found. diff --git a/.changeset/little-cobras-repair.md b/.changeset/little-cobras-repair.md new file mode 100644 index 00000000000..37af8a6b7de --- /dev/null +++ b/.changeset/little-cobras-repair.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/fields-document': patch +--- + +Fixed documentation in JSDocs for component blocks API diff --git a/.changeset/unlucky-dragons-judge.md b/.changeset/unlucky-dragons-judge.md new file mode 100644 index 00000000000..0a8d05bfe4a --- /dev/null +++ b/.changeset/unlucky-dragons-judge.md @@ -0,0 +1,6 @@ +--- +'@keystone-next/keystone': major +'@keystone-next/types': major +--- + +Removed `context.graphql.createContext` from `KeystoneContext`. diff --git a/packages-next/fields-document/src/DocumentEditor/component-blocks/api.tsx b/packages-next/fields-document/src/DocumentEditor/component-blocks/api.tsx index a47258d48f4..7827fddca43 100644 --- a/packages-next/fields-document/src/DocumentEditor/component-blocks/api.tsx +++ b/packages-next/fields-document/src/DocumentEditor/component-blocks/api.tsx @@ -1,6 +1,13 @@ /** @jsx jsx */ import { jsx } from '@keystone-ui/core'; -import { FieldContainer, FieldLabel, Select, TextInput, Checkbox } from '@keystone-ui/fields'; +import { + FieldContainer, + FieldLabel, + Select, + TextInput, + Checkbox, + MultiSelect, +} from '@keystone-ui/fields'; import { HTMLAttributes, ReactElement, ReactNode, useState } from 'react'; import { isValidURL } from '../isValidURL'; @@ -16,6 +23,10 @@ export type FormField = { */ forceValidation: boolean; }): ReactElement | null; + /** + * The options are config about the field that are available on the + * preview props when rendering the toolbar and preview component + */ options: Options; defaultValue: Value; /** @@ -204,6 +215,7 @@ export const fields = { onChange(option.value); } }} + options={options} /> ); @@ -215,6 +227,43 @@ export const fields = { }, }; }, + multiselect