@webiny/app-headless-cms 0.0.0-mt-2 → 0.0.0-unstable.13771d80a8
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.
- package/HeadlessCMS.d.ts +13 -0
- package/HeadlessCMS.js +53 -0
- package/HeadlessCMS.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryForm.js +129 -48
- package/admin/components/ContentEntryForm/ContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +42 -19
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js.map +1 -0
- package/admin/components/ContentEntryForm/Fields.d.ts +5 -6
- package/admin/components/ContentEntryForm/Fields.js +21 -15
- package/admin/components/ContentEntryForm/Fields.js.map +1 -0
- package/admin/components/ContentEntryForm/Label.d.ts +2 -4
- package/admin/components/ContentEntryForm/Label.js +18 -12
- package/admin/components/ContentEntryForm/Label.js.map +1 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +6 -5
- package/admin/components/ContentEntryForm/RenderFieldElement.js +29 -24
- package/admin/components/ContentEntryForm/RenderFieldElement.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/getValue.d.ts +9 -5
- package/admin/components/ContentEntryForm/functions/getValue.js +12 -9
- package/admin/components/ContentEntryForm/functions/getValue.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/setValue.d.ts +10 -6
- package/admin/components/ContentEntryForm/functions/setValue.js +15 -9
- package/admin/components/ContentEntryForm/functions/setValue.js.map +1 -0
- package/admin/components/ContentEntryForm/useBind.d.ts +7 -7
- package/admin/components/ContentEntryForm/useBind.js +61 -39
- package/admin/components/ContentEntryForm/useBind.js.map +1 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.d.ts +4 -6
- package/admin/components/ContentEntryForm/useContentEntryForm.js +396 -294
- package/admin/components/ContentEntryForm/useContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.js +11 -5
- package/admin/components/ContentEntryForm/useRenderPlugins.js.map +1 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.d.ts +40 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js +260 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js.map +1 -0
- package/admin/components/ContentModelEditor/Editor.d.ts +6 -2
- package/admin/components/ContentModelEditor/Editor.js +69 -65
- package/admin/components/ContentModelEditor/Editor.js.map +1 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +6 -4
- package/admin/components/ContentModelEditor/FieldsSidebar.js +37 -31
- package/admin/components/ContentModelEditor/FieldsSidebar.js.map +1 -0
- package/admin/components/ContentModelEditor/Header.d.ts +3 -2
- package/admin/components/ContentModelEditor/Header.js +20 -11
- package/admin/components/ContentModelEditor/Header.js.map +1 -0
- package/admin/components/ContentModelEditor/PreviewTab.js +25 -21
- package/admin/components/ContentModelEditor/PreviewTab.js.map +1 -0
- package/admin/components/ContentModelEditor/index.d.ts +2 -0
- package/admin/components/ContentModelEditor/index.js +27 -0
- package/admin/components/ContentModelEditor/index.js.map +1 -0
- package/admin/components/ContentModelEditor/useModelEditor.d.ts +1 -0
- package/admin/components/ContentModelEditor/useModelEditor.js +16 -0
- package/admin/components/ContentModelEditor/useModelEditor.js.map +1 -0
- package/admin/components/DelayedOnChange.d.ts +42 -0
- package/admin/components/DelayedOnChange.js +110 -0
- package/admin/components/DelayedOnChange.js.map +1 -0
- package/admin/components/Dialog.d.ts +8 -0
- package/admin/components/Dialog.js +28 -0
- package/admin/components/Dialog.js.map +1 -0
- package/admin/components/DragPreview.d.ts +3 -2
- package/admin/components/DragPreview.js +42 -38
- package/admin/components/DragPreview.js.map +1 -0
- package/admin/components/Draggable.d.ts +9 -6
- package/admin/components/Draggable.js +45 -40
- package/admin/components/Draggable.js.map +1 -0
- package/admin/components/DropZone/Center.d.ts +7 -6
- package/admin/components/DropZone/Center.js +50 -52
- package/admin/components/DropZone/Center.js.map +1 -0
- package/admin/components/DropZone/Horizontal.d.ts +7 -5
- package/admin/components/DropZone/Horizontal.js +29 -26
- package/admin/components/DropZone/Horizontal.js.map +1 -0
- package/admin/components/DropZone/Vertical.d.ts +4 -4
- package/admin/components/DropZone/Vertical.js +28 -24
- package/admin/components/DropZone/Vertical.js.map +1 -0
- package/admin/components/DropZone/index.js +27 -4
- package/admin/components/DropZone/index.js.map +1 -0
- package/admin/components/Droppable.d.ts +23 -12
- package/admin/components/Droppable.js +48 -34
- package/admin/components/Droppable.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +1 -1
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +54 -46
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +1 -8
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +88 -69
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +3 -5
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +61 -35
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.d.ts +10 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.js +34 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.d.ts +8 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.js +189 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +7 -5
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +14 -10
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +8 -6
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +17 -14
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.d.ts +13 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.js +91 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +8 -8
- package/admin/components/FieldEditor/EditFieldDialog.js +133 -220
- package/admin/components/FieldEditor/EditFieldDialog.js.map +1 -0
- package/admin/components/FieldEditor/Field.d.ts +8 -1
- package/admin/components/FieldEditor/Field.js +319 -114
- package/admin/components/FieldEditor/Field.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditor.d.ts +6 -6
- package/admin/components/FieldEditor/FieldEditor.js +126 -81
- package/admin/components/FieldEditor/FieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +79 -30
- package/admin/components/FieldEditor/FieldEditorContext.js +150 -124
- package/admin/components/FieldEditor/FieldEditorContext.js.map +1 -0
- package/admin/components/FieldEditor/Styled.d.ts +10 -2
- package/admin/components/FieldEditor/Styled.js +23 -20
- package/admin/components/FieldEditor/Styled.js.map +1 -0
- package/admin/components/FieldEditor/index.d.ts +1 -1
- package/admin/components/FieldEditor/index.js +19 -2
- package/admin/components/FieldEditor/index.js.map +1 -0
- package/admin/components/FieldEditor/useModelFieldEditor.d.ts +2 -0
- package/admin/components/FieldEditor/useModelFieldEditor.js +15 -0
- package/admin/components/FieldEditor/useModelFieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/utils/deleteField.d.ts +6 -8
- package/admin/components/FieldEditor/utils/deleteField.js +21 -12
- package/admin/components/FieldEditor/utils/deleteField.js.map +1 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +6 -5
- package/admin/components/FieldEditor/utils/getFieldPosition.js +14 -9
- package/admin/components/FieldEditor/utils/getFieldPosition.js.map +1 -0
- package/admin/components/FieldEditor/utils/index.js +34 -4
- package/admin/components/FieldEditor/utils/index.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveField.d.ts +6 -5
- package/admin/components/FieldEditor/utils/moveField.js +37 -31
- package/admin/components/FieldEditor/utils/moveField.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveRow.d.ts +5 -6
- package/admin/components/FieldEditor/utils/moveRow.js +16 -8
- package/admin/components/FieldEditor/utils/moveRow.js.map +1 -0
- package/admin/components/IconPicker.d.ts +7 -0
- package/admin/components/IconPicker.js +213 -0
- package/admin/components/IconPicker.js.map +1 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.d.ts +36 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.js +18 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.js.map +1 -0
- package/admin/components/ModelFieldProvider/index.d.ts +2 -0
- package/admin/components/ModelFieldProvider/index.js +27 -0
- package/admin/components/ModelFieldProvider/index.js.map +1 -0
- package/admin/components/ModelFieldProvider/useModelField.d.ts +35 -0
- package/admin/components/ModelFieldProvider/useModelField.js +33 -0
- package/admin/components/ModelFieldProvider/useModelField.js.map +1 -0
- package/admin/components/ModelProvider/ModelContext.d.ts +9 -0
- package/admin/components/ModelProvider/ModelContext.js +18 -0
- package/admin/components/ModelProvider/ModelContext.js.map +1 -0
- package/admin/components/ModelProvider/index.d.ts +2 -0
- package/admin/components/ModelProvider/index.js +27 -0
- package/admin/components/ModelProvider/index.js.map +1 -0
- package/admin/components/ModelProvider/useModel.d.ts +9 -0
- package/admin/components/ModelProvider/useModel.js +20 -0
- package/admin/components/ModelProvider/useModel.js.map +1 -0
- package/admin/constants/statusLabels.d.ts +2 -8
- package/admin/constants/statusLabels.js +17 -12
- package/admin/constants/statusLabels.js.map +1 -0
- package/admin/contexts/Cms/NetworkError.js +10 -5
- package/admin/contexts/Cms/NetworkError.js.map +1 -0
- package/admin/contexts/Cms/index.d.ts +64 -5
- package/admin/contexts/Cms/index.js +117 -32
- package/admin/contexts/Cms/index.js.map +1 -0
- package/admin/elements/ContentGroupMenuElement.js +19 -13
- package/admin/elements/ContentGroupMenuElement.js.map +1 -0
- package/admin/elements/ContentModelMenuElement.js +19 -13
- package/admin/elements/ContentModelMenuElement.js.map +1 -0
- package/admin/elements/NothingToShowElement.d.ts +1 -1
- package/admin/elements/NothingToShowElement.js +36 -39
- package/admin/elements/NothingToShowElement.js.map +1 -0
- package/admin/graphql/contentEntries.d.ts +145 -11
- package/admin/graphql/contentEntries.js +99 -55
- package/admin/graphql/contentEntries.js.map +1 -0
- package/admin/graphql/contentModels.d.ts +29 -1
- package/admin/graphql/contentModels.js +25 -6
- package/admin/graphql/contentModels.js.map +1 -0
- package/admin/graphql/createFieldsList.d.ts +7 -2
- package/admin/graphql/createFieldsList.js +23 -9
- package/admin/graphql/createFieldsList.js.map +1 -0
- package/admin/hooks/index.d.ts +7 -0
- package/admin/hooks/index.js +112 -5
- package/admin/hooks/index.js.map +1 -0
- package/admin/hooks/useApolloClient.d.ts +2 -1
- package/admin/hooks/useApolloClient.js +11 -6
- package/admin/hooks/useApolloClient.js.map +1 -0
- package/admin/hooks/useCms.d.ts +2 -2
- package/admin/hooks/useCms.js +10 -7
- package/admin/hooks/useCms.js.map +1 -0
- package/admin/hooks/useContentModels.d.ts +6 -0
- package/admin/hooks/useContentModels.js +33 -0
- package/admin/hooks/useContentModels.js.map +1 -0
- package/admin/hooks/useLazyQuery.d.ts +4 -1
- package/admin/hooks/useLazyQuery.js +14 -10
- package/admin/hooks/useLazyQuery.js.map +1 -0
- package/admin/hooks/useMutation.d.ts +4 -1
- package/admin/hooks/useMutation.js +14 -10
- package/admin/hooks/useMutation.js.map +1 -0
- package/admin/hooks/usePermission.d.ts +19 -20
- package/admin/hooks/usePermission.js +60 -114
- package/admin/hooks/usePermission.js.map +1 -0
- package/admin/hooks/useQuery.d.ts +4 -1
- package/admin/hooks/useQuery.js +14 -10
- package/admin/hooks/useQuery.js.map +1 -0
- package/admin/hooks/useQueryLocale.d.ts +4 -0
- package/admin/hooks/useQueryLocale.js +21 -0
- package/admin/hooks/useQueryLocale.js.map +1 -0
- package/admin/icons/clone.svg +14 -0
- package/admin/icons/draft.svg +3 -0
- package/admin/icons/published.svg +3 -0
- package/admin/icons/unpublished.svg +3 -0
- package/admin/menus/CmsMenuLoader.d.ts +2 -0
- package/admin/menus/CmsMenuLoader.js +46 -0
- package/admin/menus/CmsMenuLoader.js.map +1 -0
- package/admin/menus/ContentGroupsMenuItems.d.ts +2 -0
- package/admin/menus/ContentGroupsMenuItems.js +85 -0
- package/admin/menus/ContentGroupsMenuItems.js.map +1 -0
- package/admin/{plugins/menus → menus}/GlobalSearchPlugins.d.ts +2 -1
- package/admin/menus/GlobalSearchPlugins.js +59 -0
- package/admin/menus/GlobalSearchPlugins.js.map +1 -0
- package/admin/menus/NothingToShowElement.d.ts +2 -0
- package/admin/menus/NothingToShowElement.js +53 -0
- package/admin/menus/NothingToShowElement.js.map +1 -0
- package/admin/plugins/apiInformation/index.js +21 -16
- package/admin/plugins/apiInformation/index.js.map +1 -0
- package/admin/plugins/arrayUtils.d.ts +12 -0
- package/admin/plugins/arrayUtils.js +45 -0
- package/admin/plugins/arrayUtils.js.map +1 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +24 -26
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +23 -24
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/editor/defaultBar/BackButton.d.ts +1 -1
- package/admin/plugins/editor/defaultBar/BackButton.js +21 -12
- package/admin/plugins/editor/defaultBar/BackButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/CreateContentButton.js +29 -27
- package/admin/plugins/editor/defaultBar/CreateContentButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Divider.d.ts +6 -1
- package/admin/plugins/editor/defaultBar/Divider.js +11 -3
- package/admin/plugins/editor/defaultBar/Divider.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +4 -4
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js +67 -56
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +23 -17
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +9 -2
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +23 -10
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.js +13 -1
- package/admin/plugins/editor/defaultBar/FormSettings/index.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/Name.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/Name/Name.js +45 -42
- package/admin/plugins/editor/defaultBar/Name/Name.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +14 -3
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js +18 -7
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/index.js +12 -1
- package/admin/plugins/editor/defaultBar/Name/index.js.map +1 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js +59 -59
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/index.js +23 -15
- package/admin/plugins/editor/defaultBar/index.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.d.ts +2 -2
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js +55 -20
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.js +21 -15
- package/admin/plugins/editor/formSettings/components/GroupSelect.js.map +1 -0
- package/admin/plugins/editor/formSettings/index.js +15 -6
- package/admin/plugins/editor/formSettings/index.js.map +1 -0
- package/admin/plugins/entry/DefaultOnEntryDelete.d.ts +2 -0
- package/admin/plugins/entry/DefaultOnEntryDelete.js +157 -0
- package/admin/plugins/entry/DefaultOnEntryDelete.js.map +1 -0
- package/admin/plugins/entry/DefaultOnEntryPublish.d.ts +2 -0
- package/admin/plugins/entry/DefaultOnEntryPublish.js +134 -0
- package/admin/plugins/entry/DefaultOnEntryPublish.js.map +1 -0
- package/admin/plugins/fieldRenderers/Accordion.d.ts +5 -6
- package/admin/plugins/fieldRenderers/Accordion.js +44 -35
- package/admin/plugins/fieldRenderers/Accordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +17 -7
- package/admin/plugins/fieldRenderers/DynamicSection.js +44 -43
- package/admin/plugins/fieldRenderers/DynamicSection.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +22 -15
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/index.js +10 -2
- package/admin/plugins/fieldRenderers/boolean/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/checkboxes.js +42 -28
- package/admin/plugins/fieldRenderers/checkboxes.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.d.ts +10 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.js +68 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +6 -6
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +130 -95
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +6 -5
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +117 -79
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +8 -9
- package/admin/plugins/fieldRenderers/dateTime/Input.js +16 -11
- package/admin/plugins/fieldRenderers/dateTime/Input.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +10 -3
- package/admin/plugins/fieldRenderers/dateTime/Select.js +12 -6
- package/admin/plugins/fieldRenderers/dateTime/Select.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +3 -3
- package/admin/plugins/fieldRenderers/dateTime/Time.js +60 -8
- package/admin/plugins/fieldRenderers/dateTime/Time.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +31 -30
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +47 -45
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/index.js +11 -3
- package/admin/plugins/fieldRenderers/dateTime/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +12 -9
- package/admin/plugins/fieldRenderers/dateTime/utils.js +66 -22
- package/admin/plugins/fieldRenderers/dateTime/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.d.ts +12 -0
- package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.js +85 -0
- package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.d.ts +11 -0
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.js +114 -0
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.d.ts +11 -0
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js +54 -0
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.d.ts +8 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.js +54 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.d.ts +8 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.js +40 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.d.ts +6 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js +17 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.d.ts +2 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js +56 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/File.d.ts +5 -5
- package/admin/plugins/fieldRenderers/file/File.js +38 -29
- package/admin/plugins/fieldRenderers/file/File.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileField.js +43 -43
- package/admin/plugins/fieldRenderers/file/fileField.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js +86 -75
- package/admin/plugins/fieldRenderers/file/fileFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/index.js +11 -3
- package/admin/plugins/fieldRenderers/file/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/utils.d.ts +9 -4
- package/admin/plugins/fieldRenderers/file/utils.js +23 -17
- package/admin/plugins/fieldRenderers/file/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/index.js +11 -3
- package/admin/plugins/fieldRenderers/longText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longText.js +22 -15
- package/admin/plugins/fieldRenderers/longText/longText.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.js +24 -18
- package/admin/plugins/fieldRenderers/longText/longTexts.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/index.js +11 -3
- package/admin/plugins/fieldRenderers/number/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js +22 -15
- package/admin/plugins/fieldRenderers/number/numberInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.js +24 -19
- package/admin/plugins/fieldRenderers/number/numberInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.d.ts +11 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.js +48 -5
- package/admin/plugins/fieldRenderers/object/StyledComponents.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/arrow_drop_down.svg +1 -0
- package/admin/plugins/fieldRenderers/object/arrow_drop_up.svg +1 -0
- package/admin/plugins/fieldRenderers/object/index.js +13 -3
- package/admin/plugins/fieldRenderers/object/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.js +116 -60
- package/admin/plugins/fieldRenderers/object/multipleObjects.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js +122 -0
- package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/singleObjectAccordion.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/singleObjectAccordion.js +45 -0
- package/admin/plugins/fieldRenderers/object/singleObjectAccordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.js +52 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.js.map +1 -0
- package/admin/plugins/fieldRenderers/radioButtons.js +35 -23
- package/admin/plugins/fieldRenderers/radioButtons.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedMultipleReferenceField.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedMultipleReferenceField.js +275 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedMultipleReferenceField.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedSingleReferenceField.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedSingleReferenceField.js +185 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedSingleReferenceField.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Entries.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Entries.js +61 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Entries.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Entry.d.ts +27 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Entry.js +153 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Entry.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Loader.d.ts +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Loader.js +37 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Loader.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/NewReferencedEntryDialog.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/NewReferencedEntryDialog.js +142 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/NewReferencedEntryDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Options.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Options.js +118 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Options.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/ReferencesDialog.d.ts +11 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/ReferencesDialog.js +183 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/ReferencesDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Search.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Search.js +60 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/Search.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/assets/add-circle.svg +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/assets/down-arrow.svg +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/assets/link.svg +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/assets/search.svg +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/Dialog.d.ts +19 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/Dialog.js +35 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/Dialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/DialogHeader.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/DialogHeader.js +90 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/DialogHeader.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/dialog/assets/close.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Box.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Box.js +64 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Box.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/CreatedBy.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/CreatedBy.js +26 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/CreatedBy.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Description.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Description.js +31 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Description.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Image.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Image.js +65 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Image.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModelName.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModelName.js +25 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModelName.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModifiedBy.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModifiedBy.js +30 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModifiedBy.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveDown.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveDown.js +24 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveDown.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveUp.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveUp.js +24 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveUp.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Remove.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Remove.js +44 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Remove.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Select.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Select.js +82 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Select.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Status.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Status.js +32 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Status.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Title.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Title.js +24 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Title.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/View.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/View.js +22 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/View.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/move-down.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/move-up.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/remove.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/selected.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/status-draft.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/status-published.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/status-unpublished.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/assets/view.svg +3 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/elements/ButtonLink.d.ts +18 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/elements/ButtonLink.js +84 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/elements/ButtonLink.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelList.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelList.js +55 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelList.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelListItem.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelListItem.js +98 -0
- package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelListItem.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/detailedReferenceRenderer.d.ts +2 -0
- package/admin/plugins/fieldRenderers/ref/advanced/detailedReferenceRenderer.js +46 -0
- package/admin/plugins/fieldRenderers/ref/advanced/detailedReferenceRenderer.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/detailedReferencesRenderer.d.ts +2 -0
- package/admin/plugins/fieldRenderers/ref/advanced/detailedReferencesRenderer.js +45 -0
- package/admin/plugins/fieldRenderers/ref/advanced/detailedReferencesRenderer.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/graphql.d.ts +44 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/graphql.js +21 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/graphql.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/useEntries.d.ts +15 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/useEntries.js +187 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/useEntries.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/useReferences.d.ts +12 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/useReferences.js +214 -0
- package/admin/plugins/fieldRenderers/ref/advanced/hooks/useReferences.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/index.d.ts +1 -0
- package/admin/plugins/fieldRenderers/ref/advanced/index.js +12 -0
- package/admin/plugins/fieldRenderers/ref/advanced/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +8 -5
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +108 -43
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +8 -5
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +87 -46
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/EntryStatus.d.ts +10 -0
- package/admin/plugins/fieldRenderers/ref/components/EntryStatus.js +56 -0
- package/admin/plugins/fieldRenderers/ref/components/EntryStatus.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.js +41 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.d.ts +10 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js +152 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.js +16 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/graphql.d.ts +59 -1
- package/admin/plugins/fieldRenderers/ref/components/graphql.js +30 -8
- package/admin/plugins/fieldRenderers/ref/components/graphql.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/helpers.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/components/helpers.js +47 -0
- package/admin/plugins/fieldRenderers/ref/components/helpers.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/renderItem.d.ts +10 -2
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js +36 -8
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/types.d.ts +36 -0
- package/admin/plugins/fieldRenderers/ref/components/types.js +5 -0
- package/admin/plugins/fieldRenderers/ref/components/types.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/useReference.d.ts +8 -13
- package/admin/plugins/fieldRenderers/ref/components/useReference.js +153 -163
- package/admin/plugins/fieldRenderers/ref/components/useReference.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +11 -14
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js +144 -122
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.d.ts +12 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.js +59 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.js +41 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/index.js +13 -3
- package/admin/plugins/fieldRenderers/ref/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInput.js +19 -12
- package/admin/plugins/fieldRenderers/ref/refInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js +20 -15
- package/admin/plugins/fieldRenderers/ref/refInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/index.js +11 -3
- package/admin/plugins/fieldRenderers/richText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js +31 -20
- package/admin/plugins/fieldRenderers/richText/richTextInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +38 -27
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/select.js +41 -18
- package/admin/plugins/fieldRenderers/select.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/index.js +11 -3
- package/admin/plugins/fieldRenderers/text/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInput.js +22 -15
- package/admin/plugins/fieldRenderers/text/textInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInputs.js +24 -19
- package/admin/plugins/fieldRenderers/text/textInputs.js.map +1 -0
- package/admin/plugins/fieldValidators/date/availableValidators.js +9 -4
- package/admin/plugins/fieldValidators/date/availableValidators.js.map +1 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +3 -2
- package/admin/plugins/fieldValidators/date/createDateInputField.js +24 -21
- package/admin/plugins/fieldValidators/date/createDateInputField.js.map +1 -0
- package/admin/plugins/fieldValidators/dateGte.d.ts +2 -2
- package/admin/plugins/fieldValidators/dateGte.js +77 -31
- package/admin/plugins/fieldValidators/dateGte.js.map +1 -0
- package/admin/plugins/fieldValidators/dateLte.d.ts +2 -2
- package/admin/plugins/fieldValidators/dateLte.js +77 -31
- package/admin/plugins/fieldValidators/dateLte.js.map +1 -0
- package/admin/plugins/fieldValidators/dynamicZone.d.ts +2 -0
- package/admin/plugins/fieldValidators/dynamicZone.js +163 -0
- package/admin/plugins/fieldValidators/dynamicZone.js.map +1 -0
- package/admin/plugins/fieldValidators/gte.d.ts +3 -3
- package/admin/plugins/fieldValidators/gte.js +51 -14
- package/admin/plugins/fieldValidators/gte.js.map +1 -0
- package/admin/plugins/fieldValidators/in.d.ts +3 -3
- package/admin/plugins/fieldValidators/in.js +51 -14
- package/admin/plugins/fieldValidators/in.js.map +1 -0
- package/admin/plugins/fieldValidators/lte.d.ts +3 -3
- package/admin/plugins/fieldValidators/lte.js +51 -14
- package/admin/plugins/fieldValidators/lte.js.map +1 -0
- package/admin/plugins/fieldValidators/maxLength.d.ts +3 -3
- package/admin/plugins/fieldValidators/maxLength.js +62 -15
- package/admin/plugins/fieldValidators/maxLength.js.map +1 -0
- package/admin/plugins/fieldValidators/minLength.d.ts +3 -3
- package/admin/plugins/fieldValidators/minLength.js +62 -15
- package/admin/plugins/fieldValidators/minLength.js.map +1 -0
- package/admin/plugins/fieldValidators/pattern.d.ts +3 -3
- package/admin/plugins/fieldValidators/pattern.js +125 -63
- package/admin/plugins/fieldValidators/pattern.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/email.js +16 -6
- package/admin/plugins/fieldValidators/patternPlugins/email.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +15 -5
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js +19 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +15 -5
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js +19 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/url.js +15 -5
- package/admin/plugins/fieldValidators/patternPlugins/url.js.map +1 -0
- package/admin/plugins/fieldValidators/required.d.ts +3 -3
- package/admin/plugins/fieldValidators/required.js +16 -4
- package/admin/plugins/fieldValidators/required.js.map +1 -0
- package/admin/plugins/fieldValidators/unique.js +39 -0
- package/admin/plugins/fieldValidators/unique.js.map +1 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +7 -5
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +109 -71
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js.map +1 -0
- package/admin/plugins/fields/boolean.d.ts +2 -2
- package/admin/plugins/fields/boolean.js +35 -12
- package/admin/plugins/fields/boolean.js.map +1 -0
- package/admin/plugins/fields/dateTime.d.ts +2 -2
- package/admin/plugins/fields/dateTime.js +72 -52
- package/admin/plugins/fields/dateTime.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/AddTemplate.d.ts +11 -0
- package/admin/plugins/fields/dynamicZone/AddTemplate.js +91 -0
- package/admin/plugins/fields/dynamicZone/AddTemplate.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/DynamicZone.d.ts +2 -0
- package/admin/plugins/fields/dynamicZone/DynamicZone.js +62 -0
- package/admin/plugins/fields/dynamicZone/DynamicZone.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.d.ts +11 -0
- package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.js +104 -0
- package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/TemplateDialog.d.ts +9 -0
- package/admin/plugins/fields/dynamicZone/TemplateDialog.js +141 -0
- package/admin/plugins/fields/dynamicZone/TemplateDialog.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/commonValidators.d.ts +2 -0
- package/admin/plugins/fields/dynamicZone/commonValidators.js +26 -0
- package/admin/plugins/fields/dynamicZone/commonValidators.js.map +1 -0
- package/admin/plugins/fields/dynamicZone.d.ts +2 -0
- package/admin/plugins/fields/dynamicZone.js +83 -0
- package/admin/plugins/fields/dynamicZone.js.map +1 -0
- package/admin/plugins/fields/file.d.ts +2 -2
- package/admin/plugins/fields/file.js +26 -20
- package/admin/plugins/fields/file.js.map +1 -0
- package/admin/plugins/fields/longText.d.ts +2 -2
- package/admin/plugins/fields/longText.js +26 -20
- package/admin/plugins/fields/longText.js.map +1 -0
- package/admin/plugins/fields/number.d.ts +2 -2
- package/admin/plugins/fields/number.js +31 -25
- package/admin/plugins/fields/number.js.map +1 -0
- package/admin/plugins/fields/object/ObjectFields.d.ts +7 -4
- package/admin/plugins/fields/object/ObjectFields.js +25 -18
- package/admin/plugins/fields/object/ObjectFields.js.map +1 -0
- package/admin/plugins/fields/object.d.ts +2 -2
- package/admin/plugins/fields/object.js +27 -16
- package/admin/plugins/fields/object.js.map +1 -0
- package/admin/plugins/fields/ref/graphql.d.ts +8 -0
- package/admin/plugins/fields/ref/graphql.js +12 -0
- package/admin/plugins/fields/ref/graphql.js.map +1 -0
- package/admin/plugins/fields/ref/renderInfo.d.ts +9 -0
- package/admin/plugins/fields/ref/renderInfo.js +116 -0
- package/admin/plugins/fields/ref/renderInfo.js.map +1 -0
- package/admin/plugins/fields/ref.d.ts +2 -2
- package/admin/plugins/fields/ref.js +119 -116
- package/admin/plugins/fields/ref.js.map +1 -0
- package/admin/plugins/fields/richText.d.ts +2 -2
- package/admin/plugins/fields/richText.js +26 -21
- package/admin/plugins/fields/richText.js.map +1 -0
- package/admin/plugins/fields/text.d.ts +2 -2
- package/admin/plugins/fields/text.js +30 -24
- package/admin/plugins/fields/text.js.map +1 -0
- package/admin/plugins/getObjectId.d.ts +3 -3
- package/admin/plugins/getObjectId.js +14 -11
- package/admin/plugins/getObjectId.js.map +1 -0
- package/admin/plugins/icons.js +24 -12
- package/admin/plugins/icons.js.map +1 -0
- package/admin/plugins/index.d.ts +28 -7
- package/admin/plugins/index.js +20 -14
- package/admin/plugins/index.js.map +1 -0
- package/admin/plugins/install.d.ts +22 -0
- package/admin/plugins/install.js +76 -88
- package/admin/plugins/install.js.map +1 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +11 -5
- package/admin/plugins/permissionRenderer/CmsPermissions.js +81 -107
- package/admin/plugins/permissionRenderer/CmsPermissions.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +12 -8
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js +61 -60
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +11 -8
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js +48 -42
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +8 -6
- package/admin/plugins/permissionRenderer/components/ContentModelList.js +33 -28
- package/admin/plugins/permissionRenderer/components/ContentModelList.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +14 -10
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +65 -58
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +10 -5
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +26 -13
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +12 -27
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js +51 -34
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +6 -1
- package/admin/plugins/permissionRenderer/components/StyledComponents.js +11 -3
- package/admin/plugins/permissionRenderer/components/StyledComponents.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/types.d.ts +16 -0
- package/admin/plugins/permissionRenderer/components/types.js +5 -0
- package/admin/plugins/permissionRenderer/components/types.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.d.ts +18 -1
- package/admin/plugins/permissionRenderer/components/useCmsData.js +92 -64
- package/admin/plugins/permissionRenderer/components/useCmsData.js.map +1 -0
- package/admin/plugins/permissionRenderer/index.d.ts +2 -2
- package/admin/plugins/permissionRenderer/index.js +18 -9
- package/admin/plugins/permissionRenderer/index.js.map +1 -0
- package/admin/plugins/routes.js +51 -42
- package/admin/plugins/routes.js.map +1 -0
- package/admin/plugins/transformers/dateTransformer.d.ts +1 -2
- package/admin/plugins/transformers/dateTransformer.js +119 -30
- package/admin/plugins/transformers/dateTransformer.js.map +1 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.d.ts +2 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.js +36 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.js.map +1 -0
- package/admin/plugins/transformers/index.js +13 -5
- package/admin/plugins/transformers/index.js.map +1 -0
- package/admin/plugins/transformers/numberTransformer.d.ts +1 -2
- package/admin/plugins/transformers/numberTransformer.js +9 -3
- package/admin/plugins/transformers/numberTransformer.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/UpgradeItemsInfo.d.ts +7 -0
- package/admin/plugins/upgrades/5.19.0/UpgradeItemsInfo.js +65 -0
- package/admin/plugins/upgrades/5.19.0/UpgradeItemsInfo.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/createCmsApolloClient.d.ts +7 -0
- package/admin/plugins/upgrades/5.19.0/createCmsApolloClient.js +67 -0
- package/admin/plugins/upgrades/5.19.0/createCmsApolloClient.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/createListEntriesQuery.d.ts +2 -0
- package/admin/plugins/upgrades/5.19.0/createListEntriesQuery.js +26 -0
- package/admin/plugins/upgrades/5.19.0/createListEntriesQuery.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/createListModelsQuery.d.ts +1 -0
- package/admin/plugins/upgrades/5.19.0/createListModelsQuery.js +20 -0
- package/admin/plugins/upgrades/5.19.0/createListModelsQuery.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/createRepublishMutation.d.ts +2 -0
- package/admin/plugins/upgrades/5.19.0/createRepublishMutation.js +23 -0
- package/admin/plugins/upgrades/5.19.0/createRepublishMutation.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/createUpgradeMutation.d.ts +1 -0
- package/admin/plugins/upgrades/5.19.0/createUpgradeMutation.js +20 -0
- package/admin/plugins/upgrades/5.19.0/createUpgradeMutation.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/fetchModelEntries.d.ts +7 -0
- package/admin/plugins/upgrades/5.19.0/fetchModelEntries.js +137 -0
- package/admin/plugins/upgrades/5.19.0/fetchModelEntries.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/types.d.ts +47 -0
- package/admin/plugins/upgrades/5.19.0/types.js +5 -0
- package/admin/plugins/upgrades/5.19.0/types.js.map +1 -0
- package/admin/plugins/upgrades/5.33.0/locales.d.ts +7 -0
- package/admin/plugins/upgrades/5.33.0/locales.js +65 -0
- package/admin/plugins/upgrades/5.33.0/locales.js.map +1 -0
- package/admin/plugins/upgrades/5.33.0/types.d.ts +7 -0
- package/admin/plugins/upgrades/5.33.0/types.js +5 -0
- package/admin/plugins/upgrades/5.33.0/types.js.map +1 -0
- package/admin/plugins/upgrades/5.33.0/upgrade.d.ts +8 -0
- package/admin/plugins/upgrades/5.33.0/upgrade.js +81 -0
- package/admin/plugins/upgrades/5.33.0/upgrade.js.map +1 -0
- package/admin/plugins/upgrades/v5.0.0.js +58 -32
- package/admin/plugins/upgrades/v5.0.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.19.0.d.ts +5 -0
- package/admin/plugins/upgrades/v5.19.0.js +684 -0
- package/admin/plugins/upgrades/v5.19.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.33.0.d.ts +6 -0
- package/admin/plugins/upgrades/v5.33.0.js +191 -0
- package/admin/plugins/upgrades/v5.33.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.5.0.js +58 -32
- package/admin/plugins/upgrades/v5.5.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.8.0.js +58 -32
- package/admin/plugins/upgrades/v5.8.0.js.map +1 -0
- package/admin/plugins/welcomeScreenWidget.js +17 -9
- package/admin/plugins/welcomeScreenWidget.js.map +1 -0
- package/admin/views/contentEntries/ContentEntries.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntries.js +66 -62
- package/admin/views/contentEntries/ContentEntries.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +19 -15
- package/admin/views/contentEntries/ContentEntriesContext.js +56 -44
- package/admin/views/contentEntries/ContentEntriesContext.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntriesList.js +138 -118
- package/admin/views/contentEntries/ContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +19 -14
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +124 -74
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.d.ts +1 -0
- package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.js +23 -0
- package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.d.ts +4 -4
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +114 -117
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js +29 -26
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/cache.d.ts +9 -7
- package/admin/views/contentEntries/ContentEntry/cache.js +111 -96
- package/admin/views/contentEntries/ContentEntry/cache.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/Header.js +24 -18
- package/admin/views/contentEntries/ContentEntry/header/Header.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js +100 -117
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/index.js +19 -24
- package/admin/views/contentEntries/ContentEntry/header/index.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js +47 -42
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +1 -3
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js +71 -75
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js +24 -23
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js +92 -56
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +23 -9
- package/admin/views/contentEntries/ContentEntry/useRevision.js +206 -295
- package/admin/views/contentEntries/ContentEntry/useRevision.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry.d.ts +1 -2
- package/admin/views/contentEntries/ContentEntry.js +51 -53
- package/admin/views/contentEntries/ContentEntry.js.map +1 -0
- package/admin/views/contentEntries/experiment/ContentEntriesModule.d.ts +2 -0
- package/admin/views/contentEntries/experiment/ContentEntriesModule.js +68 -0
- package/admin/views/contentEntries/experiment/ContentEntriesModule.js.map +1 -0
- package/admin/views/contentEntries/experiment/ContentEntriesRenderer.d.ts +2 -0
- package/admin/views/contentEntries/experiment/ContentEntriesRenderer.js +24 -0
- package/admin/views/contentEntries/experiment/ContentEntriesRenderer.js.map +1 -0
- package/admin/views/contentEntries/experiment/ContentEntriesViewConfig.d.ts +35 -0
- package/admin/views/contentEntries/experiment/ContentEntriesViewConfig.js +131 -0
- package/admin/views/contentEntries/experiment/ContentEntriesViewConfig.js.map +1 -0
- package/admin/views/contentEntries/experiment/Property.d.ts +34 -0
- package/admin/views/contentEntries/experiment/Property.js +200 -0
- package/admin/views/contentEntries/experiment/Property.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntries.js +14 -4
- package/admin/views/contentEntries/hooks/useContentEntries.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +4 -7
- package/admin/views/contentEntries/hooks/useContentEntriesList.js +79 -81
- package/admin/views/contentEntries/hooks/useContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntry.js +14 -4
- package/admin/views/contentEntries/hooks/useContentEntry.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroups.d.ts +2 -2
- package/admin/views/contentModelGroups/ContentModelGroups.js +26 -22
- package/admin/views/contentModelGroups/ContentModelGroups.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +151 -173
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +180 -166
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js.map +1 -0
- package/admin/views/contentModelGroups/graphql.d.ts +68 -0
- package/admin/views/contentModelGroups/graphql.js +36 -8
- package/admin/views/contentModelGroups/graphql.js.map +1 -0
- package/admin/views/contentModels/CloneContentModelDialog.d.ts +10 -0
- package/admin/views/contentModels/CloneContentModelDialog.js +255 -0
- package/admin/views/contentModels/CloneContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/ContentModelEditor.d.ts +3 -2
- package/admin/views/contentModels/ContentModelEditor.js +27 -28
- package/admin/views/contentModels/ContentModelEditor.js.map +1 -0
- package/admin/views/contentModels/ContentModels.d.ts +2 -2
- package/admin/views/contentModels/ContentModels.js +58 -37
- package/admin/views/contentModels/ContentModels.js.map +1 -0
- package/admin/views/contentModels/ContentModelsDataList.d.ts +6 -4
- package/admin/views/contentModels/ContentModelsDataList.js +215 -197
- package/admin/views/contentModels/ContentModelsDataList.js.map +1 -0
- package/admin/views/contentModels/NewContentModelDialog.d.ts +2 -2
- package/admin/views/contentModels/NewContentModelDialog.js +186 -168
- package/admin/views/contentModels/NewContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/cache.d.ts +12 -4
- package/admin/views/contentModels/cache.js +79 -33
- package/admin/views/contentModels/cache.js.map +1 -0
- package/admin/views/contentModels/helpers/apiNameValidator.d.ts +8 -0
- package/admin/views/contentModels/helpers/apiNameValidator.js +116 -0
- package/admin/views/contentModels/helpers/apiNameValidator.js.map +1 -0
- package/admin/views/contentModels/helpers/nameValidator.d.ts +6 -0
- package/admin/views/contentModels/helpers/nameValidator.js +63 -0
- package/admin/views/contentModels/helpers/nameValidator.js.map +1 -0
- package/admin/views/contentModels/types.d.ts +4 -0
- package/admin/views/contentModels/types.js +5 -0
- package/admin/views/contentModels/types.js.map +1 -0
- package/admin/views/utils.d.ts +3 -2
- package/admin/views/utils.js +16 -23
- package/admin/views/utils.js.map +1 -0
- package/admin/viewsGraphql.d.ts +63 -0
- package/admin/viewsGraphql.js +46 -9
- package/admin/viewsGraphql.js.map +1 -0
- package/allPlugins.d.ts +34 -0
- package/allPlugins.js +51 -0
- package/allPlugins.js.map +1 -0
- package/index.d.ts +12 -0
- package/index.js +39 -0
- package/index.js.map +1 -0
- package/package.json +49 -51
- package/{types.d.ts → types/index.d.ts} +137 -146
- package/types/index.js +38 -0
- package/types/index.js.map +1 -0
- package/types/model.d.ts +88 -0
- package/types/model.js +5 -0
- package/types/model.js.map +1 -0
- package/types/shared.d.ts +5 -0
- package/types/shared.js +5 -0
- package/types/shared.js.map +1 -0
- package/types/validation.d.ts +70 -0
- package/types/validation.js +5 -0
- package/types/validation.js.map +1 -0
- package/utils/CmsModelFieldValidatorConfigAdapter.d.ts +15 -0
- package/utils/CmsModelFieldValidatorConfigAdapter.js +79 -0
- package/utils/CmsModelFieldValidatorConfigAdapter.js.map +1 -0
- package/utils/createTypeName.d.ts +1 -0
- package/utils/createTypeName.js +13 -0
- package/utils/createTypeName.js.map +1 -0
- package/utils/createValidators.d.ts +3 -0
- package/utils/createValidators.js +76 -0
- package/utils/createValidators.js.map +1 -0
- package/utils/getFetchPolicy.d.ts +6 -0
- package/utils/getFetchPolicy.js +17 -0
- package/utils/getFetchPolicy.js.map +1 -0
- package/utils/getModelTitleFieldId.d.ts +2 -0
- package/utils/getModelTitleFieldId.js +13 -0
- package/utils/getModelTitleFieldId.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/createValidators.d.ts +0 -1
- package/admin/components/ContentEntryForm/functions/createValidators.js +0 -58
- package/admin/components/ContentModelEditor/Context.d.ts +0 -23
- package/admin/components/ContentModelEditor/Context.js +0 -218
- package/admin/components/ContentModelEditor/useContentModelEditor.d.ts +0 -1
- package/admin/components/ContentModelEditor/useContentModelEditor.js +0 -11
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.d.ts +0 -10
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +0 -121
- package/admin/components/FieldEditor/useFieldEditor.d.ts +0 -1
- package/admin/components/FieldEditor/useFieldEditor.js +0 -5
- package/admin/plugins/fieldRenderers/object/singleObject.js +0 -45
- package/admin/plugins/fieldRenderers/ref/components/getOptions.d.ts +0 -1
- package/admin/plugins/fieldRenderers/ref/components/getOptions.js +0 -21
- package/admin/plugins/menus/CmsMenuLoader.d.ts +0 -7
- package/admin/plugins/menus/CmsMenuLoader.js +0 -76
- package/admin/plugins/menus/ContentGroupsMenuItems.d.ts +0 -6
- package/admin/plugins/menus/ContentGroupsMenuItems.js +0 -154
- package/admin/plugins/menus/GlobalSearchPlugins.js +0 -53
- package/admin/plugins/menus.d.ts +0 -4
- package/admin/plugins/menus.js +0 -19
- package/admin/plugins/validators/dateGte.js +0 -23
- package/admin/plugins/validators/dateLte.d.ts +0 -3
- package/admin/plugins/validators/dateLte.js +0 -23
- package/admin/plugins/validators/gte.d.ts +0 -3
- package/admin/plugins/validators/gte.js +0 -15
- package/admin/plugins/validators/in.d.ts +0 -3
- package/admin/plugins/validators/in.js +0 -15
- package/admin/plugins/validators/lte.d.ts +0 -3
- package/admin/plugins/validators/lte.js +0 -15
- package/admin/plugins/validators/maxLength.d.ts +0 -3
- package/admin/plugins/validators/maxLength.js +0 -15
- package/admin/plugins/validators/minLength.d.ts +0 -3
- package/admin/plugins/validators/minLength.js +0 -15
- package/admin/plugins/validators/pattern.d.ts +0 -9
- package/admin/plugins/validators/pattern.js +0 -34
- package/admin/plugins/validators/patternPlugins/email.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/email.js +0 -9
- package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/lowerCase.js +0 -9
- package/admin/plugins/validators/patternPlugins/upperCase.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/upperCase.js +0 -9
- package/admin/plugins/validators/patternPlugins/url.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/url.js +0 -9
- package/admin/plugins/validators/required.d.ts +0 -3
- package/admin/plugins/validators/required.js +0 -11
- package/admin/plugins/validators/timeGte.d.ts +0 -3
- package/admin/plugins/validators/timeGte.js +0 -19
- package/admin/plugins/validators/timeLte.d.ts +0 -3
- package/admin/plugins/validators/timeLte.js +0 -19
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.d.ts +0 -3
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +0 -67
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/rule-24px.svg +0 -1
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +0 -3
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +0 -69
- package/admin/views/contentEntries/ContentEntry/header/requestReview/emoji_people-24px.svg +0 -1
- package/admin/views/contentModelGroups/DelayedOnChange.d.ts +0 -25
- package/admin/views/contentModelGroups/DelayedOnChange.js +0 -134
- package/admin/views/contentModelGroups/IconPicker.d.ts +0 -7
- package/admin/views/contentModelGroups/IconPicker.js +0 -204
- package/types.js +0 -1
- /package/admin/plugins/fieldRenderers/object/{singleObject.d.ts → multipleObjectsAccordion.d.ts} +0 -0
- /package/admin/plugins/{validators/dateGte.d.ts → fieldValidators/unique.d.ts} +0 -0
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _get = _interopRequireDefault(require("lodash/get"));
|
|
11
|
+
var _i18n = require("@webiny/app/i18n");
|
|
12
|
+
var _Label = _interopRequireDefault(require("./Label"));
|
|
13
|
+
var _useBind = require("./useBind");
|
|
14
|
+
var _useRenderPlugins = require("./useRenderPlugins");
|
|
15
|
+
var _ModelFieldProvider = require("../ModelFieldProvider");
|
|
3
16
|
var _templateObject;
|
|
4
|
-
|
|
5
|
-
import React from "react";
|
|
6
|
-
import get from "lodash/get";
|
|
7
|
-
import { i18n } from "@webiny/app/i18n";
|
|
8
|
-
import Label from "./Label";
|
|
9
|
-
import { useBind } from "./useBind";
|
|
10
|
-
import { useRenderPlugins } from "./useRenderPlugins";
|
|
11
|
-
var t = i18n.ns("app-headless-cms/admin/components/content-form");
|
|
12
|
-
|
|
17
|
+
var t = _i18n.i18n.ns("app-headless-cms/admin/components/content-form");
|
|
13
18
|
var RenderFieldElement = function RenderFieldElement(props) {
|
|
14
|
-
var renderPlugins = useRenderPlugins();
|
|
19
|
+
var renderPlugins = (0, _useRenderPlugins.useRenderPlugins)();
|
|
15
20
|
var field = props.field,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var getBind = useBind({
|
|
21
|
+
Bind = props.Bind,
|
|
22
|
+
contentModel = props.contentModel;
|
|
23
|
+
var getBind = (0, _useBind.useBind)({
|
|
19
24
|
Bind: Bind,
|
|
20
25
|
field: field
|
|
21
26
|
});
|
|
22
27
|
var renderPlugin = renderPlugins.find(function (plugin) {
|
|
23
|
-
return plugin.renderer.rendererName ===
|
|
28
|
+
return plugin.renderer.rendererName === (0, _get.default)(field, "renderer.name");
|
|
24
29
|
});
|
|
25
|
-
|
|
26
30
|
if (!renderPlugin) {
|
|
27
|
-
return t(_templateObject || (_templateObject =
|
|
28
|
-
fieldName: /*#__PURE__*/
|
|
31
|
+
return t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["Cannot render \"{fieldName}\" field - field renderer missing."])))({
|
|
32
|
+
fieldName: /*#__PURE__*/_react.default.createElement("strong", null, field.fieldId)
|
|
29
33
|
});
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_ModelFieldProvider.ModelFieldProvider, {
|
|
36
|
+
field: field
|
|
37
|
+
}, renderPlugin.renderer.render({
|
|
33
38
|
field: field,
|
|
34
39
|
getBind: getBind,
|
|
35
|
-
Label:
|
|
40
|
+
Label: _Label.default,
|
|
36
41
|
contentModel: contentModel
|
|
37
|
-
});
|
|
42
|
+
}));
|
|
38
43
|
};
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
var _default = RenderFieldElement;
|
|
45
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","RenderFieldElement","props","renderPlugins","useRenderPlugins","field","Bind","contentModel","getBind","useBind","renderPlugin","find","plugin","renderer","rendererName","get","fieldName","fieldId","render","Label"],"sources":["RenderFieldElement.tsx"],"sourcesContent":["import React from \"react\";\nimport { CmsModelField, CmsEditorContentModel, BindComponent } from \"~/types\";\nimport get from \"lodash/get\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport Label from \"./Label\";\nimport { useBind } from \"./useBind\";\nimport { useRenderPlugins } from \"./useRenderPlugins\";\nimport { ModelFieldProvider } from \"../ModelFieldProvider\";\n\nconst t = i18n.ns(\"app-headless-cms/admin/components/content-form\");\n\ninterface RenderFieldElementProps {\n field: CmsModelField;\n Bind: BindComponent;\n contentModel: CmsEditorContentModel;\n}\n\nconst RenderFieldElement: React.FC<RenderFieldElementProps> = props => {\n const renderPlugins = useRenderPlugins();\n const { field, Bind, contentModel } = props;\n const getBind = useBind({ Bind, field });\n\n const renderPlugin = renderPlugins.find(\n plugin => plugin.renderer.rendererName === get(field, \"renderer.name\")\n );\n\n if (!renderPlugin) {\n return t`Cannot render \"{fieldName}\" field - field renderer missing.`({\n fieldName: <strong>{field.fieldId}</strong>\n });\n }\n\n return (\n <ModelFieldProvider field={field}>\n {renderPlugin.renderer.render({ field, getBind, Label, contentModel })}\n </ModelFieldProvider>\n );\n};\n\nexport default RenderFieldElement;\n"],"mappings":";;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAA2D;AAE3D,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,gDAAgD,CAAC;AAQnE,IAAMC,kBAAqD,GAAG,SAAxDA,kBAAqD,CAAGC,KAAK,EAAI;EACnE,IAAMC,aAAa,GAAG,IAAAC,kCAAgB,GAAE;EACxC,IAAQC,KAAK,GAAyBH,KAAK,CAAnCG,KAAK;IAAEC,IAAI,GAAmBJ,KAAK,CAA5BI,IAAI;IAAEC,YAAY,GAAKL,KAAK,CAAtBK,YAAY;EACjC,IAAMC,OAAO,GAAG,IAAAC,gBAAO,EAAC;IAAEH,IAAI,EAAJA,IAAI;IAAED,KAAK,EAALA;EAAM,CAAC,CAAC;EAExC,IAAMK,YAAY,GAAGP,aAAa,CAACQ,IAAI,CACnC,UAAAC,MAAM;IAAA,OAAIA,MAAM,CAACC,QAAQ,CAACC,YAAY,KAAK,IAAAC,YAAG,EAACV,KAAK,EAAE,eAAe,CAAC;EAAA,EACzE;EAED,IAAI,CAACK,YAAY,EAAE;IACf,OAAOZ,CAAC,iJAA8D;MAClEkB,SAAS,eAAE,6CAASX,KAAK,CAACY,OAAO;IACrC,CAAC,CAAC;EACN;EAEA,oBACI,6BAAC,sCAAkB;IAAC,KAAK,EAAEZ;EAAM,GAC5BK,YAAY,CAACG,QAAQ,CAACK,MAAM,CAAC;IAAEb,KAAK,EAALA,KAAK;IAAEG,OAAO,EAAPA,OAAO;IAAEW,KAAK,EAALA,cAAK;IAAEZ,YAAY,EAAZA;EAAa,CAAC,CAAC,CACrD;AAE7B,CAAC;AAAC,eAEaN,kBAAkB;AAAA"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { CmsModelField } from "../../../../types";
|
|
2
|
+
import { BindComponentRenderProp } from "@webiny/form";
|
|
3
|
+
interface GetValueParams {
|
|
4
|
+
bind: BindComponentRenderProp;
|
|
5
|
+
field: Pick<CmsModelField, "multipleValues">;
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const getValue: (params: GetValueParams) => string;
|
|
9
|
+
export {};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
var bind = _ref.bind,
|
|
3
|
-
field = _ref.field,
|
|
4
|
-
index = _ref.index;
|
|
5
|
-
var value = bind.value || null;
|
|
1
|
+
"use strict";
|
|
6
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getValue = void 0;
|
|
7
|
+
var getValue = function getValue(params) {
|
|
8
|
+
var bind = params.bind,
|
|
9
|
+
field = params.field,
|
|
10
|
+
index = params.index;
|
|
11
|
+
var value = bind.value || null;
|
|
7
12
|
if (field.multipleValues) {
|
|
8
13
|
if (!Array.isArray(value)) {
|
|
9
14
|
value = [];
|
|
10
15
|
}
|
|
11
|
-
|
|
12
16
|
if (index >= 0) {
|
|
13
17
|
return value[index] || null;
|
|
14
18
|
}
|
|
15
|
-
|
|
16
19
|
return value;
|
|
17
20
|
}
|
|
18
|
-
|
|
19
21
|
return value;
|
|
20
|
-
};
|
|
22
|
+
};
|
|
23
|
+
exports.getValue = getValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getValue","params","bind","field","index","value","multipleValues","Array","isArray"],"sources":["getValue.ts"],"sourcesContent":["import { CmsModelField } from \"~/types\";\nimport { BindComponentRenderProp } from \"@webiny/form\";\n\ninterface GetValueParams {\n bind: BindComponentRenderProp;\n field: Pick<CmsModelField, \"multipleValues\">;\n index: number;\n}\nexport const getValue = (params: GetValueParams): string => {\n const { bind, field, index } = params;\n let value = bind.value || null;\n\n if (field.multipleValues) {\n if (!Array.isArray(value)) {\n value = [];\n }\n\n if (index >= 0) {\n return value[index] || null;\n }\n\n return value;\n }\n\n return value;\n};\n"],"mappings":";;;;;;AAQO,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,MAAsB,EAAa;EACxD,IAAQC,IAAI,GAAmBD,MAAM,CAA7BC,IAAI;IAAEC,KAAK,GAAYF,MAAM,CAAvBE,KAAK;IAAEC,KAAK,GAAKH,MAAM,CAAhBG,KAAK;EAC1B,IAAIC,KAAK,GAAGH,IAAI,CAACG,KAAK,IAAI,IAAI;EAE9B,IAAIF,KAAK,CAACG,cAAc,EAAE;IACtB,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;MACvBA,KAAK,GAAG,EAAE;IACd;IAEA,IAAID,KAAK,IAAI,CAAC,EAAE;MACZ,OAAOC,KAAK,CAACD,KAAK,CAAC,IAAI,IAAI;IAC/B;IAEA,OAAOC,KAAK;EAChB;EAEA,OAAOA,KAAK;AAChB,CAAC;AAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { CmsModelField } from "../../../../types";
|
|
2
|
+
import { BindComponentRenderProp } from "@webiny/form";
|
|
3
|
+
interface setValueParams {
|
|
4
|
+
value: string[];
|
|
5
|
+
bind: BindComponentRenderProp;
|
|
6
|
+
field: Pick<CmsModelField, "multipleValues">;
|
|
7
|
+
index: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const setValue: (params: setValueParams) => void;
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export var setValue = function setValue(_ref) {
|
|
3
|
-
var value = _ref.value,
|
|
4
|
-
bind = _ref.bind,
|
|
5
|
-
field = _ref.field,
|
|
6
|
-
index = _ref.index;
|
|
7
|
-
var newValue = field.multipleValues ? _toConsumableArray(bind.value || []) : bind.value;
|
|
1
|
+
"use strict";
|
|
8
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.setValue = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var setValue = function setValue(params) {
|
|
10
|
+
var value = params.value,
|
|
11
|
+
bind = params.bind,
|
|
12
|
+
field = params.field,
|
|
13
|
+
index = params.index;
|
|
14
|
+
var newValue = field.multipleValues ? (0, _toConsumableArray2.default)(bind.value || []) : bind.value;
|
|
9
15
|
if (field.multipleValues) {
|
|
10
16
|
if (index >= 0) {
|
|
11
17
|
newValue[index] = value;
|
|
@@ -15,6 +21,6 @@ export var setValue = function setValue(_ref) {
|
|
|
15
21
|
} else {
|
|
16
22
|
newValue = value;
|
|
17
23
|
}
|
|
18
|
-
|
|
19
24
|
bind.onChange(newValue);
|
|
20
|
-
};
|
|
25
|
+
};
|
|
26
|
+
exports.setValue = setValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["setValue","params","value","bind","field","index","newValue","multipleValues","onChange"],"sources":["setValue.ts"],"sourcesContent":["import { CmsModelField } from \"~/types\";\nimport { BindComponentRenderProp } from \"@webiny/form\";\n\ninterface setValueParams {\n value: string[];\n bind: BindComponentRenderProp;\n field: Pick<CmsModelField, \"multipleValues\">;\n index: number;\n}\nexport const setValue = (params: setValueParams): void => {\n const { value, bind, field, index } = params;\n let newValue = field.multipleValues ? [...(bind.value || [])] : bind.value;\n\n if (field.multipleValues) {\n if (index >= 0) {\n newValue[index] = value;\n } else {\n newValue = value;\n }\n } else {\n newValue = value;\n }\n\n bind.onChange(newValue);\n};\n"],"mappings":";;;;;;;;AASO,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,MAAsB,EAAW;EACtD,IAAQC,KAAK,GAAyBD,MAAM,CAApCC,KAAK;IAAEC,IAAI,GAAmBF,MAAM,CAA7BE,IAAI;IAAEC,KAAK,GAAYH,MAAM,CAAvBG,KAAK;IAAEC,KAAK,GAAKJ,MAAM,CAAhBI,KAAK;EACjC,IAAIC,QAAQ,GAAGF,KAAK,CAACG,cAAc,oCAAQJ,IAAI,CAACD,KAAK,IAAI,EAAE,IAAKC,IAAI,CAACD,KAAK;EAE1E,IAAIE,KAAK,CAACG,cAAc,EAAE;IACtB,IAAIF,KAAK,IAAI,CAAC,EAAE;MACZC,QAAQ,CAACD,KAAK,CAAC,GAAGH,KAAK;IAC3B,CAAC,MAAM;MACHI,QAAQ,GAAGJ,KAAK;IACpB;EACJ,CAAC,MAAM;IACHI,QAAQ,GAAGJ,KAAK;EACpB;EAEAC,IAAI,CAACK,QAAQ,CAACF,QAAQ,CAAC;AAC3B,CAAC;AAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BindComponent } from "
|
|
2
|
-
import { CmsEditorField } from "../../../types";
|
|
1
|
+
import { BindComponent, CmsModelField } from "../../../types";
|
|
3
2
|
interface UseBindProps {
|
|
4
|
-
field:
|
|
5
|
-
Bind: BindComponent
|
|
6
|
-
parentName?: string;
|
|
7
|
-
};
|
|
3
|
+
field: CmsModelField;
|
|
4
|
+
Bind: BindComponent;
|
|
8
5
|
}
|
|
9
|
-
export
|
|
6
|
+
export interface GetBindCallable {
|
|
7
|
+
(index?: number): BindComponent;
|
|
8
|
+
}
|
|
9
|
+
export declare function useBind({ Bind: ParentBind, field }: UseBindProps): (index?: any) => BindComponent;
|
|
10
10
|
export {};
|
|
@@ -1,76 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useBind = useBind;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _createValidators = require("../../../utils/createValidators");
|
|
13
|
+
function useBind(_ref) {
|
|
6
14
|
var ParentBind = _ref.Bind,
|
|
7
|
-
|
|
8
|
-
var memoizedBindComponents = useRef({});
|
|
9
|
-
return useCallback(function () {
|
|
15
|
+
field = _ref.field;
|
|
16
|
+
var memoizedBindComponents = (0, _react.useRef)({});
|
|
17
|
+
return (0, _react.useCallback)(function () {
|
|
10
18
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
11
|
-
var parentName = ParentBind.parentName;
|
|
19
|
+
var parentName = ParentBind.parentName;
|
|
20
|
+
// If there's a parent name assigned to the given Bind component, we need to include it in the new field "name".
|
|
12
21
|
// This allows us to have nested fields (like "object" field with nested properties)
|
|
13
|
-
|
|
14
22
|
var name = [parentName, field.fieldId, index >= 0 ? index : undefined].filter(function (v) {
|
|
15
23
|
return v !== undefined;
|
|
16
24
|
}).join(".");
|
|
17
|
-
|
|
18
25
|
if (memoizedBindComponents.current[name]) {
|
|
19
26
|
return memoizedBindComponents.current[name];
|
|
20
27
|
}
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
var listValidators = createValidators(field.listValidation || []);
|
|
28
|
+
var validators = (0, _createValidators.createValidators)(field, field.validation || []);
|
|
29
|
+
var listValidators = (0, _createValidators.createValidators)(field, field.listValidation || []);
|
|
24
30
|
var defaultValue = field.multipleValues ? [] : undefined;
|
|
25
31
|
var isMultipleValues = index === -1 && field.multipleValues;
|
|
26
32
|
var inputValidators = isMultipleValues ? listValidators : validators;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return /*#__PURE__*/React.createElement(ParentBind, {
|
|
33
|
+
memoizedBindComponents.current[name] = function UseBind(params) {
|
|
34
|
+
var childName = params.name,
|
|
35
|
+
childValidators = params.validators,
|
|
36
|
+
children = params.children;
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(ParentBind, {
|
|
33
38
|
name: childName || name,
|
|
34
39
|
validators: childValidators || inputValidators,
|
|
35
40
|
defaultValue: index === -1 ? defaultValue : null
|
|
36
41
|
}, function (bind) {
|
|
37
42
|
// Multiple-values functions below.
|
|
38
|
-
var props =
|
|
39
|
-
|
|
43
|
+
var props = (0, _objectSpread2.default)({}, bind);
|
|
40
44
|
if (field.multipleValues && index === -1) {
|
|
41
|
-
props.appendValue = function (newValue) {
|
|
42
|
-
bind.
|
|
45
|
+
props.appendValue = function (newValue, index) {
|
|
46
|
+
var currentValue = bind.value || [];
|
|
47
|
+
var newIndex = index !== null && index !== void 0 ? index : currentValue.length;
|
|
48
|
+
bind.onChange([].concat((0, _toConsumableArray2.default)(currentValue.slice(0, newIndex)), [newValue], (0, _toConsumableArray2.default)(currentValue.slice(newIndex))));
|
|
43
49
|
};
|
|
44
|
-
|
|
45
50
|
props.prependValue = function (newValue) {
|
|
46
|
-
bind.onChange([newValue].concat(
|
|
51
|
+
bind.onChange([newValue].concat((0, _toConsumableArray2.default)(bind.value || [])));
|
|
47
52
|
};
|
|
48
|
-
|
|
49
53
|
props.appendValues = function (newValues) {
|
|
50
|
-
bind.onChange([].concat(
|
|
54
|
+
bind.onChange([].concat((0, _toConsumableArray2.default)(bind.value || []), (0, _toConsumableArray2.default)(newValues)));
|
|
51
55
|
};
|
|
52
|
-
|
|
53
56
|
props.removeValue = function (index) {
|
|
54
|
-
if (index
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
if (index < 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
var value = bind.value;
|
|
61
|
+
value = [].concat((0, _toConsumableArray2.default)(value.slice(0, index)), (0, _toConsumableArray2.default)(value.slice(index + 1)));
|
|
62
|
+
bind.onChange(value);
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
// To make sure the field is still valid, we must trigger validation.
|
|
65
|
+
bind.form.validateInput(field.fieldId);
|
|
66
|
+
};
|
|
67
|
+
props.moveValueUp = function (index) {
|
|
68
|
+
if (index <= 0) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var value = (0, _toConsumableArray2.default)(bind.value);
|
|
72
|
+
value.splice(index, 1);
|
|
73
|
+
value.splice(index - 1, 0, bind.value[index]);
|
|
74
|
+
bind.onChange(value);
|
|
75
|
+
};
|
|
76
|
+
props.moveValueDown = function (index) {
|
|
77
|
+
if (index >= bind.value.length) {
|
|
78
|
+
return;
|
|
60
79
|
}
|
|
80
|
+
var value = (0, _toConsumableArray2.default)(bind.value);
|
|
81
|
+
value.splice(index, 1);
|
|
82
|
+
value.splice(index + 1, 0, bind.value[index]);
|
|
83
|
+
bind.onChange(value);
|
|
61
84
|
};
|
|
62
85
|
}
|
|
63
|
-
|
|
64
86
|
if (typeof children === "function") {
|
|
65
87
|
return children(props);
|
|
66
88
|
}
|
|
67
|
-
|
|
68
|
-
return /*#__PURE__*/cloneElement(children, props);
|
|
89
|
+
return /*#__PURE__*/(0, _react.cloneElement)(children, props);
|
|
69
90
|
});
|
|
70
|
-
};
|
|
71
|
-
|
|
91
|
+
};
|
|
72
92
|
|
|
93
|
+
// We need to keep track of current field name, to support nested fields.
|
|
73
94
|
memoizedBindComponents.current[name].parentName = name;
|
|
95
|
+
memoizedBindComponents.current[name].displayName = "ParentBind<".concat(name, ">");
|
|
74
96
|
return memoizedBindComponents.current[name];
|
|
75
97
|
}, [field.fieldId]);
|
|
76
98
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useBind","ParentBind","Bind","field","memoizedBindComponents","useRef","useCallback","index","parentName","name","fieldId","undefined","filter","v","join","current","validators","createValidators","validation","listValidators","listValidation","defaultValue","multipleValues","isMultipleValues","inputValidators","UseBind","params","childName","childValidators","children","bind","props","appendValue","newValue","currentValue","value","newIndex","length","onChange","slice","prependValue","appendValues","newValues","removeValue","form","validateInput","moveValueUp","splice","moveValueDown","cloneElement","displayName"],"sources":["useBind.tsx"],"sourcesContent":["import React, { useRef, useCallback, cloneElement } from \"react\";\nimport { createValidators } from \"~/utils/createValidators\";\nimport { BindComponent, CmsModelField } from \"~/types\";\nimport { Validator } from \"@webiny/validation/types\";\n\ninterface UseBindProps {\n field: CmsModelField;\n Bind: BindComponent;\n}\n\ninterface UseBindParams {\n name?: string;\n validators?: Validator | Validator[];\n children?: any;\n}\n\nexport interface GetBindCallable {\n (index?: number): BindComponent;\n}\n\nexport function useBind({ Bind: ParentBind, field }: UseBindProps) {\n const memoizedBindComponents = useRef<Record<string, BindComponent>>({});\n\n return useCallback(\n (index = -1) => {\n const { parentName } = ParentBind;\n // If there's a parent name assigned to the given Bind component, we need to include it in the new field \"name\".\n // This allows us to have nested fields (like \"object\" field with nested properties)\n const name = [parentName, field.fieldId, index >= 0 ? index : undefined]\n .filter(v => v !== undefined)\n .join(\".\");\n\n if (memoizedBindComponents.current[name]) {\n return memoizedBindComponents.current[name];\n }\n\n const validators = createValidators(field, field.validation || []);\n const listValidators = createValidators(field, field.listValidation || []);\n const defaultValue: string[] | undefined = field.multipleValues ? [] : undefined;\n const isMultipleValues = index === -1 && field.multipleValues;\n const inputValidators = isMultipleValues ? listValidators : validators;\n\n memoizedBindComponents.current[name] = function UseBind(params: UseBindParams) {\n const { name: childName, validators: childValidators, children } = params;\n\n return (\n <ParentBind\n name={childName || name}\n validators={childValidators || inputValidators}\n defaultValue={index === -1 ? defaultValue : null}\n >\n {bind => {\n // Multiple-values functions below.\n const props = { ...bind };\n if (field.multipleValues && index === -1) {\n props.appendValue = (newValue: any, index?: number) => {\n const currentValue = bind.value || [];\n const newIndex = index ?? currentValue.length;\n\n bind.onChange([\n ...currentValue.slice(0, newIndex),\n newValue,\n ...currentValue.slice(newIndex)\n ]);\n };\n props.prependValue = (newValue: any) => {\n bind.onChange([newValue, ...(bind.value || [])]);\n };\n props.appendValues = (newValues: any[]) => {\n bind.onChange([...(bind.value || []), ...newValues]);\n };\n\n props.removeValue = (index: number) => {\n if (index < 0) {\n return;\n }\n let value = bind.value;\n value = [...value.slice(0, index), ...value.slice(index + 1)];\n\n bind.onChange(value);\n\n // To make sure the field is still valid, we must trigger validation.\n bind.form.validateInput(field.fieldId);\n };\n\n props.moveValueUp = (index: number) => {\n if (index <= 0) {\n return;\n }\n\n const value = [...bind.value];\n value.splice(index, 1);\n value.splice(index - 1, 0, bind.value[index]);\n\n bind.onChange(value);\n };\n\n props.moveValueDown = (index: number) => {\n if (index >= bind.value.length) {\n return;\n }\n\n const value = [...bind.value];\n value.splice(index, 1);\n value.splice(index + 1, 0, bind.value[index]);\n\n bind.onChange(value);\n };\n }\n\n if (typeof children === \"function\") {\n return children(props);\n }\n\n return cloneElement(children, props);\n }}\n </ParentBind>\n );\n };\n\n // We need to keep track of current field name, to support nested fields.\n memoizedBindComponents.current[name].parentName = name;\n memoizedBindComponents.current[name].displayName = `ParentBind<${name}>`;\n\n return memoizedBindComponents.current[name];\n },\n [field.fieldId]\n );\n}\n"],"mappings":";;;;;;;;;;AAAA;AACA;AAmBO,SAASA,OAAO,OAA4C;EAAA,IAAnCC,UAAU,QAAhBC,IAAI;IAAcC,KAAK,QAALA,KAAK;EAC7C,IAAMC,sBAAsB,GAAG,IAAAC,aAAM,EAAgC,CAAC,CAAC,CAAC;EAExE,OAAO,IAAAC,kBAAW,EACd,YAAgB;IAAA,IAAfC,KAAK,uEAAG,CAAC,CAAC;IACP,IAAQC,UAAU,GAAKP,UAAU,CAAzBO,UAAU;IAClB;IACA;IACA,IAAMC,IAAI,GAAG,CAACD,UAAU,EAAEL,KAAK,CAACO,OAAO,EAAEH,KAAK,IAAI,CAAC,GAAGA,KAAK,GAAGI,SAAS,CAAC,CACnEC,MAAM,CAAC,UAAAC,CAAC;MAAA,OAAIA,CAAC,KAAKF,SAAS;IAAA,EAAC,CAC5BG,IAAI,CAAC,GAAG,CAAC;IAEd,IAAIV,sBAAsB,CAACW,OAAO,CAACN,IAAI,CAAC,EAAE;MACtC,OAAOL,sBAAsB,CAACW,OAAO,CAACN,IAAI,CAAC;IAC/C;IAEA,IAAMO,UAAU,GAAG,IAAAC,kCAAgB,EAACd,KAAK,EAAEA,KAAK,CAACe,UAAU,IAAI,EAAE,CAAC;IAClE,IAAMC,cAAc,GAAG,IAAAF,kCAAgB,EAACd,KAAK,EAAEA,KAAK,CAACiB,cAAc,IAAI,EAAE,CAAC;IAC1E,IAAMC,YAAkC,GAAGlB,KAAK,CAACmB,cAAc,GAAG,EAAE,GAAGX,SAAS;IAChF,IAAMY,gBAAgB,GAAGhB,KAAK,KAAK,CAAC,CAAC,IAAIJ,KAAK,CAACmB,cAAc;IAC7D,IAAME,eAAe,GAAGD,gBAAgB,GAAGJ,cAAc,GAAGH,UAAU;IAEtEZ,sBAAsB,CAACW,OAAO,CAACN,IAAI,CAAC,GAAG,SAASgB,OAAO,CAACC,MAAqB,EAAE;MAC3E,IAAcC,SAAS,GAA4CD,MAAM,CAAjEjB,IAAI;QAAyBmB,eAAe,GAAeF,MAAM,CAAhDV,UAAU;QAAmBa,QAAQ,GAAKH,MAAM,CAAnBG,QAAQ;MAE9D,oBACI,6BAAC,UAAU;QACP,IAAI,EAAEF,SAAS,IAAIlB,IAAK;QACxB,UAAU,EAAEmB,eAAe,IAAIJ,eAAgB;QAC/C,YAAY,EAAEjB,KAAK,KAAK,CAAC,CAAC,GAAGc,YAAY,GAAG;MAAK,GAEhD,UAAAS,IAAI,EAAI;QACL;QACA,IAAMC,KAAK,mCAAQD,IAAI,CAAE;QACzB,IAAI3B,KAAK,CAACmB,cAAc,IAAIf,KAAK,KAAK,CAAC,CAAC,EAAE;UACtCwB,KAAK,CAACC,WAAW,GAAG,UAACC,QAAa,EAAE1B,KAAc,EAAK;YACnD,IAAM2B,YAAY,GAAGJ,IAAI,CAACK,KAAK,IAAI,EAAE;YACrC,IAAMC,QAAQ,GAAG7B,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI2B,YAAY,CAACG,MAAM;YAE7CP,IAAI,CAACQ,QAAQ,4CACNJ,YAAY,CAACK,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC,IAClCH,QAAQ,oCACLC,YAAY,CAACK,KAAK,CAACH,QAAQ,CAAC,GACjC;UACN,CAAC;UACDL,KAAK,CAACS,YAAY,GAAG,UAACP,QAAa,EAAK;YACpCH,IAAI,CAACQ,QAAQ,EAAEL,QAAQ,0CAAMH,IAAI,CAACK,KAAK,IAAI,EAAE,GAAG;UACpD,CAAC;UACDJ,KAAK,CAACU,YAAY,GAAG,UAACC,SAAgB,EAAK;YACvCZ,IAAI,CAACQ,QAAQ,4CAAMR,IAAI,CAACK,KAAK,IAAI,EAAE,oCAAMO,SAAS,GAAE;UACxD,CAAC;UAEDX,KAAK,CAACY,WAAW,GAAG,UAACpC,KAAa,EAAK;YACnC,IAAIA,KAAK,GAAG,CAAC,EAAE;cACX;YACJ;YACA,IAAI4B,KAAK,GAAGL,IAAI,CAACK,KAAK;YACtBA,KAAK,8CAAOA,KAAK,CAACI,KAAK,CAAC,CAAC,EAAEhC,KAAK,CAAC,oCAAK4B,KAAK,CAACI,KAAK,CAAChC,KAAK,GAAG,CAAC,CAAC,EAAC;YAE7DuB,IAAI,CAACQ,QAAQ,CAACH,KAAK,CAAC;;YAEpB;YACAL,IAAI,CAACc,IAAI,CAACC,aAAa,CAAC1C,KAAK,CAACO,OAAO,CAAC;UAC1C,CAAC;UAEDqB,KAAK,CAACe,WAAW,GAAG,UAACvC,KAAa,EAAK;YACnC,IAAIA,KAAK,IAAI,CAAC,EAAE;cACZ;YACJ;YAEA,IAAM4B,KAAK,oCAAOL,IAAI,CAACK,KAAK,CAAC;YAC7BA,KAAK,CAACY,MAAM,CAACxC,KAAK,EAAE,CAAC,CAAC;YACtB4B,KAAK,CAACY,MAAM,CAACxC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAEuB,IAAI,CAACK,KAAK,CAAC5B,KAAK,CAAC,CAAC;YAE7CuB,IAAI,CAACQ,QAAQ,CAACH,KAAK,CAAC;UACxB,CAAC;UAEDJ,KAAK,CAACiB,aAAa,GAAG,UAACzC,KAAa,EAAK;YACrC,IAAIA,KAAK,IAAIuB,IAAI,CAACK,KAAK,CAACE,MAAM,EAAE;cAC5B;YACJ;YAEA,IAAMF,KAAK,oCAAOL,IAAI,CAACK,KAAK,CAAC;YAC7BA,KAAK,CAACY,MAAM,CAACxC,KAAK,EAAE,CAAC,CAAC;YACtB4B,KAAK,CAACY,MAAM,CAACxC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAEuB,IAAI,CAACK,KAAK,CAAC5B,KAAK,CAAC,CAAC;YAE7CuB,IAAI,CAACQ,QAAQ,CAACH,KAAK,CAAC;UACxB,CAAC;QACL;QAEA,IAAI,OAAON,QAAQ,KAAK,UAAU,EAAE;UAChC,OAAOA,QAAQ,CAACE,KAAK,CAAC;QAC1B;QAEA,oBAAO,IAAAkB,mBAAY,EAACpB,QAAQ,EAAEE,KAAK,CAAC;MACxC,CAAC,CACQ;IAErB,CAAC;;IAED;IACA3B,sBAAsB,CAACW,OAAO,CAACN,IAAI,CAAC,CAACD,UAAU,GAAGC,IAAI;IACtDL,sBAAsB,CAACW,OAAO,CAACN,IAAI,CAAC,CAACyC,WAAW,wBAAiBzC,IAAI,MAAG;IAExE,OAAOL,sBAAsB,CAACW,OAAO,CAACN,IAAI,CAAC;EAC/C,CAAC,EACD,CAACN,KAAK,CAACO,OAAO,CAAC,CAClB;AACL"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { FormOnSubmit } from "@webiny/form";
|
|
3
|
-
import {
|
|
3
|
+
import { CmsEditorContentEntry, CmsEditorFieldRendererPlugin } from "../../../types";
|
|
4
4
|
interface UseContentEntryForm {
|
|
5
5
|
data: Record<string, any>;
|
|
6
6
|
loading: boolean;
|
|
7
7
|
setLoading: Dispatch<SetStateAction<boolean>>;
|
|
8
8
|
onChange: FormOnSubmit;
|
|
9
|
-
onSubmit:
|
|
9
|
+
onSubmit: FormOnSubmit;
|
|
10
10
|
invalidFields: Record<string, string>;
|
|
11
11
|
renderPlugins: CmsEditorFieldRendererPlugin[];
|
|
12
12
|
}
|
|
13
13
|
export interface UseContentEntryFormParams {
|
|
14
|
-
|
|
15
|
-
entry?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
14
|
+
entry: Partial<CmsEditorContentEntry>;
|
|
18
15
|
onChange?: FormOnSubmit;
|
|
19
16
|
onSubmit?: FormOnSubmit;
|
|
17
|
+
addEntryToListCache: boolean;
|
|
20
18
|
}
|
|
21
19
|
export declare function useContentEntryForm(params: UseContentEntryFormParams): UseContentEntryForm;
|
|
22
20
|
export {};
|