@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,48 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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.FieldEditorProvider = exports.FieldEditorContext = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _dotPropImmutable = _interopRequireDefault(require("dot-prop-immutable"));
|
|
13
|
+
var _useDeepCompareEffect = _interopRequireDefault(require("use-deep-compare-effect"));
|
|
14
|
+
var _plugins = require("@webiny/plugins");
|
|
15
|
+
var utils = _interopRequireWildcard(require("./utils"));
|
|
16
|
+
var _useModelFieldEditor = require("./useModelFieldEditor");
|
|
17
|
+
var _utils2 = require("@webiny/utils");
|
|
18
|
+
var FieldEditorContext = /*#__PURE__*/_react.default.createContext(undefined);
|
|
19
|
+
/**
|
|
20
|
+
* We try to generate the random id string but with the check that it does not exist already.
|
|
21
|
+
* Chances that the same string exists are quite small, but let's check it anyway.
|
|
22
|
+
*
|
|
23
|
+
* In most cases, there will be no iterations anyway...
|
|
24
|
+
*/
|
|
25
|
+
exports.FieldEditorContext = FieldEditorContext;
|
|
26
|
+
var maxGenerateIdIterations = 100;
|
|
27
|
+
var generateFieldId = function generateFieldId(layout) {
|
|
28
|
+
var id = (0, _utils2.generateAlphaNumericLowerCaseId)(8);
|
|
29
|
+
var iteration = 0;
|
|
30
|
+
while (layout.includes(id) && iteration < maxGenerateIdIterations) {
|
|
31
|
+
id = (0, _utils2.generateAlphaNumericLowerCaseId)(8);
|
|
32
|
+
iteration++;
|
|
33
|
+
}
|
|
34
|
+
if (iteration >= maxGenerateIdIterations) {
|
|
35
|
+
throw new Error("Could not generate field ID in ".concat(maxGenerateIdIterations, " iterations."));
|
|
36
|
+
}
|
|
37
|
+
return id;
|
|
38
|
+
};
|
|
39
|
+
var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
13
40
|
var parent = _ref.parent,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
41
|
+
fields = _ref.fields,
|
|
42
|
+
layout = _ref.layout,
|
|
43
|
+
onChange = _ref.onChange,
|
|
44
|
+
children = _ref.children;
|
|
18
45
|
// We need to determine depth of this provider so we can render drop zones with correct z-indexes.
|
|
19
46
|
var depth = 0;
|
|
20
|
-
|
|
21
47
|
try {
|
|
22
|
-
var editor =
|
|
48
|
+
var editor = (0, _useModelFieldEditor.useModelFieldEditor)();
|
|
23
49
|
depth = editor.depth + 1;
|
|
24
|
-
} catch (_unused) {
|
|
50
|
+
} catch (_unused) {
|
|
51
|
+
// There's no parent provider, so this is the top-level one.
|
|
25
52
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
var _useState = (0, _react.useState)({
|
|
54
|
+
layout: layout,
|
|
55
|
+
fields: fields,
|
|
56
|
+
field: null,
|
|
57
|
+
dropTarget: {
|
|
58
|
+
row: -1,
|
|
59
|
+
index: null
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
63
|
+
state = _useState2[0],
|
|
64
|
+
setState = _useState2[1];
|
|
65
|
+
(0, _useDeepCompareEffect.default)(function () {
|
|
38
66
|
onChange({
|
|
39
67
|
fields: state.fields,
|
|
40
68
|
layout: state.layout
|
|
41
69
|
});
|
|
42
70
|
}, [state.fields, state.layout]);
|
|
43
|
-
var editField = useCallback(function (field) {
|
|
71
|
+
var editField = (0, _react.useCallback)(function (field) {
|
|
44
72
|
setState(function (state) {
|
|
45
|
-
return
|
|
73
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
46
74
|
field: field
|
|
47
75
|
});
|
|
48
76
|
});
|
|
@@ -50,14 +78,14 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
50
78
|
var onDropTarget = {
|
|
51
79
|
dropTarget: parent ? parent.fieldId : null
|
|
52
80
|
};
|
|
53
|
-
var onFieldDrop = useCallback(function (source, dropTarget) {
|
|
81
|
+
var onFieldDrop = (0, _react.useCallback)(function (source, dropTarget) {
|
|
54
82
|
var pos = source.pos,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
83
|
+
type = source.type,
|
|
84
|
+
fieldType = source.fieldType,
|
|
85
|
+
field = source.field,
|
|
86
|
+
_source$fields = source.fields,
|
|
87
|
+
fields = _source$fields === void 0 ? [] : _source$fields;
|
|
59
88
|
var parentId = parent ? parent.fieldId : null;
|
|
60
|
-
|
|
61
89
|
if (type === "row") {
|
|
62
90
|
if (parentId !== source.parent) {
|
|
63
91
|
// We're dragging an existing row from another fieldset
|
|
@@ -70,16 +98,18 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
70
98
|
}
|
|
71
99
|
});
|
|
72
100
|
});
|
|
73
|
-
} else {
|
|
101
|
+
} else if (pos && pos.row !== undefined) {
|
|
74
102
|
// We're dragging a row within the same fieldset
|
|
75
103
|
moveRow(pos.row, dropTarget.row);
|
|
76
104
|
}
|
|
77
|
-
|
|
78
105
|
return onDropTarget;
|
|
79
|
-
}
|
|
80
|
-
|
|
106
|
+
}
|
|
81
107
|
|
|
108
|
+
// If source pos is set, we are moving an existing field.
|
|
82
109
|
if (pos) {
|
|
110
|
+
if (!field) {
|
|
111
|
+
return onDropTarget;
|
|
112
|
+
}
|
|
83
113
|
if (parentId !== source.parent) {
|
|
84
114
|
// We're dragging an existing field from another fieldset
|
|
85
115
|
insertField({
|
|
@@ -93,136 +123,135 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
93
123
|
position: dropTarget
|
|
94
124
|
});
|
|
95
125
|
}
|
|
96
|
-
|
|
97
126
|
return onDropTarget;
|
|
98
127
|
}
|
|
99
|
-
|
|
128
|
+
if (!fieldType) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
100
131
|
var plugin = getFieldPlugin(fieldType);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
132
|
+
if (!plugin) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
var fieldData = plugin.field.createField();
|
|
136
|
+
if (plugin.field.canEditSettings !== false) {
|
|
137
|
+
editField(fieldData);
|
|
138
|
+
setState(function (state) {
|
|
139
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
140
|
+
dropTarget: dropTarget
|
|
141
|
+
});
|
|
105
142
|
});
|
|
106
|
-
}
|
|
143
|
+
} else {
|
|
144
|
+
insertField({
|
|
145
|
+
field: fieldData,
|
|
146
|
+
position: dropTarget
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
107
150
|
}, []);
|
|
108
|
-
|
|
109
151
|
var onEndDrag = function onEndDrag(_ref2, monitor) {
|
|
110
152
|
var type = _ref2.type,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
153
|
+
field = _ref2.field,
|
|
154
|
+
fields = _ref2.fields;
|
|
114
155
|
if (!monitor.didDrop()) {
|
|
115
156
|
return;
|
|
116
|
-
}
|
|
117
|
-
|
|
157
|
+
}
|
|
118
158
|
|
|
159
|
+
// Check if we dropped outside of the source fieldset, and if yes, remove the field from the original parent.
|
|
119
160
|
var _monitor$getDropResul = monitor.getDropResult(),
|
|
120
|
-
|
|
121
|
-
|
|
161
|
+
dropTarget = _monitor$getDropResul.dropTarget;
|
|
122
162
|
var parentId = parent ? parent.fieldId : null;
|
|
123
|
-
|
|
124
163
|
if (dropTarget === parentId) {
|
|
125
164
|
return;
|
|
126
165
|
}
|
|
127
|
-
|
|
128
|
-
var removeFields = type === "row" ? fields : [field];
|
|
166
|
+
var removeFields = type === "row" ? fields || [] : field ? [field] : [];
|
|
129
167
|
removeFields.forEach(function (field) {
|
|
130
168
|
return deleteField(field);
|
|
131
169
|
});
|
|
132
170
|
};
|
|
133
|
-
|
|
134
171
|
var getFieldsInLayout = function getFieldsInLayout() {
|
|
135
172
|
// Replace every field ID with actual field object.
|
|
136
|
-
|
|
173
|
+
return state.layout.filter(function (arr) {
|
|
137
174
|
return arr.length;
|
|
138
|
-
}))
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
id: fieldId
|
|
175
|
+
}).map(function (row) {
|
|
176
|
+
return row.map(function (id) {
|
|
177
|
+
return getField({
|
|
178
|
+
id: id
|
|
143
179
|
});
|
|
144
|
-
});
|
|
180
|
+
}).filter(Boolean);
|
|
181
|
+
}).filter(function (row) {
|
|
182
|
+
return row.length > 0;
|
|
145
183
|
});
|
|
146
|
-
return fields;
|
|
147
184
|
};
|
|
185
|
+
|
|
148
186
|
/**
|
|
149
187
|
* Return field plugin.
|
|
150
188
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
189
|
var getFieldPlugin = function getFieldPlugin(type) {
|
|
154
|
-
return plugins.byType("cms-editor-field-type").find(function (
|
|
155
|
-
|
|
156
|
-
return field.type === type;
|
|
190
|
+
return _plugins.plugins.byType("cms-editor-field-type").find(function (plugin) {
|
|
191
|
+
return plugin.field.type === type;
|
|
157
192
|
});
|
|
158
193
|
};
|
|
194
|
+
var getFieldRendererPlugin = function getFieldRendererPlugin(name) {
|
|
195
|
+
return _plugins.plugins.byType("cms-editor-field-renderer").find(function (plugin) {
|
|
196
|
+
return plugin.renderer.rendererName === name;
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
|
|
159
200
|
/**
|
|
160
201
|
* Checks if field of given type already exists in the list of fields.
|
|
161
202
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
203
|
var getField = function getField(query) {
|
|
165
204
|
return state.fields.find(function (field) {
|
|
166
205
|
for (var key in query) {
|
|
167
206
|
if (!(key in field)) {
|
|
168
|
-
return
|
|
207
|
+
return false;
|
|
169
208
|
}
|
|
170
|
-
|
|
209
|
+
// TODO @ts-refactor figure if there is a way to fix this.
|
|
210
|
+
// @ts-ignore
|
|
171
211
|
if (field[key] !== query[key]) {
|
|
172
|
-
return
|
|
212
|
+
return false;
|
|
173
213
|
}
|
|
174
214
|
}
|
|
175
|
-
|
|
176
215
|
return true;
|
|
177
216
|
});
|
|
178
217
|
};
|
|
218
|
+
|
|
179
219
|
/**
|
|
180
220
|
* Inserts a new field into the target position.
|
|
181
221
|
*/
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
var field = _ref4.field,
|
|
186
|
-
position = _ref4.position;
|
|
187
|
-
|
|
222
|
+
var insertField = function insertField(_ref3) {
|
|
223
|
+
var field = _ref3.field,
|
|
224
|
+
position = _ref3.position;
|
|
188
225
|
if (!field.id) {
|
|
189
|
-
field.id =
|
|
226
|
+
field.id = generateFieldId(layout.flat());
|
|
190
227
|
}
|
|
191
|
-
|
|
192
228
|
if (!field.type) {
|
|
193
229
|
throw new Error("Field \"type\" missing.");
|
|
194
230
|
}
|
|
195
|
-
|
|
196
231
|
var fieldPlugin = getFieldPlugin(field.type);
|
|
197
|
-
|
|
198
232
|
if (!fieldPlugin) {
|
|
199
|
-
throw new Error("
|
|
233
|
+
throw new Error("No plugin found for field type \"".concat(field.type, "\"."));
|
|
200
234
|
}
|
|
235
|
+
setState(function (prev) {
|
|
236
|
+
var next = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
237
|
+
fields: (prev.fields || []).concat(field)
|
|
238
|
+
});
|
|
201
239
|
|
|
202
|
-
|
|
203
|
-
data = dot.set(data, "fields", function (fields) {
|
|
204
|
-
if (Array.isArray(fields)) {
|
|
205
|
-
return fields.concat(field);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return [field];
|
|
209
|
-
}); // Move field to position where it was dropped.
|
|
210
|
-
|
|
240
|
+
// Move field to position where it was dropped.
|
|
211
241
|
return utils.moveField({
|
|
212
242
|
field: field,
|
|
213
243
|
position: position,
|
|
214
|
-
data:
|
|
244
|
+
data: next
|
|
215
245
|
});
|
|
216
246
|
});
|
|
217
247
|
};
|
|
248
|
+
|
|
218
249
|
/**
|
|
219
250
|
* Moves field to the given target position.
|
|
220
251
|
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
var field = _ref5.field,
|
|
225
|
-
position = _ref5.position;
|
|
252
|
+
var moveField = function moveField(_ref4) {
|
|
253
|
+
var field = _ref4.field,
|
|
254
|
+
position = _ref4.position;
|
|
226
255
|
setState(function (data) {
|
|
227
256
|
return utils.moveField({
|
|
228
257
|
field: field,
|
|
@@ -231,11 +260,10 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
231
260
|
});
|
|
232
261
|
});
|
|
233
262
|
};
|
|
263
|
+
|
|
234
264
|
/**
|
|
235
265
|
* Moves row to a destination row.
|
|
236
266
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
239
267
|
var moveRow = function moveRow(source, destination) {
|
|
240
268
|
setState(function (data) {
|
|
241
269
|
return utils.moveRow({
|
|
@@ -245,25 +273,24 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
245
273
|
});
|
|
246
274
|
});
|
|
247
275
|
};
|
|
276
|
+
|
|
248
277
|
/**
|
|
249
278
|
* Updates field.
|
|
250
279
|
*/
|
|
251
|
-
|
|
252
|
-
|
|
253
280
|
var updateField = function updateField(field) {
|
|
254
281
|
setState(function (data) {
|
|
255
282
|
for (var i = 0; i < data.fields.length; i++) {
|
|
256
283
|
if (data.fields[i].id === field.id) {
|
|
257
|
-
return
|
|
284
|
+
return _dotPropImmutable.default.set(data, "fields.".concat(i), field);
|
|
258
285
|
}
|
|
259
286
|
}
|
|
287
|
+
return data;
|
|
260
288
|
});
|
|
261
289
|
};
|
|
290
|
+
|
|
262
291
|
/**
|
|
263
292
|
* Deletes a field (both from the list of field and the layout).
|
|
264
293
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
294
|
var deleteField = function deleteField(field) {
|
|
268
295
|
setState(function (data) {
|
|
269
296
|
return utils.deleteField({
|
|
@@ -272,33 +299,30 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
272
299
|
});
|
|
273
300
|
});
|
|
274
301
|
};
|
|
275
|
-
|
|
276
|
-
var noConflict = useCallback(function (isVisible) {
|
|
302
|
+
var noConflict = (0, _react.useCallback)(function (isVisible) {
|
|
277
303
|
return function (item) {
|
|
278
304
|
var sameParent = item.parent === onDropTarget.dropTarget;
|
|
279
305
|
var draggedFields = [];
|
|
280
|
-
|
|
281
306
|
switch (item.type) {
|
|
282
307
|
case "row":
|
|
283
|
-
item.fields.forEach(function (field) {
|
|
308
|
+
(item.fields || []).forEach(function (field) {
|
|
284
309
|
return draggedFields.push(field.fieldId);
|
|
285
310
|
});
|
|
286
311
|
break;
|
|
287
|
-
|
|
288
312
|
case "field":
|
|
313
|
+
if (!item.field) {
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
289
316
|
draggedFields.push(item.field.fieldId);
|
|
290
317
|
break;
|
|
291
|
-
|
|
292
318
|
default:
|
|
293
319
|
break;
|
|
294
320
|
}
|
|
295
|
-
|
|
296
321
|
if (draggedFields.length && !sameParent && fields.some(function (field) {
|
|
297
322
|
return draggedFields.includes(field.fieldId);
|
|
298
323
|
})) {
|
|
299
324
|
return false;
|
|
300
325
|
}
|
|
301
|
-
|
|
302
326
|
return typeof isVisible === "function" ? isVisible(item) : true;
|
|
303
327
|
};
|
|
304
328
|
}, [fields.map(function (f) {
|
|
@@ -309,6 +333,7 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
309
333
|
depth: depth,
|
|
310
334
|
getFieldsInLayout: getFieldsInLayout,
|
|
311
335
|
getFieldPlugin: getFieldPlugin,
|
|
336
|
+
getFieldRendererPlugin: getFieldRendererPlugin,
|
|
312
337
|
getField: getField,
|
|
313
338
|
editField: editField,
|
|
314
339
|
field: state.field,
|
|
@@ -324,7 +349,8 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
324
349
|
noConflict: noConflict,
|
|
325
350
|
layout: state.layout
|
|
326
351
|
};
|
|
327
|
-
return /*#__PURE__*/
|
|
352
|
+
return /*#__PURE__*/_react.default.createElement(FieldEditorContext.Provider, {
|
|
328
353
|
value: value
|
|
329
354
|
}, children);
|
|
330
|
-
};
|
|
355
|
+
};
|
|
356
|
+
exports.FieldEditorProvider = FieldEditorProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FieldEditorContext","React","createContext","undefined","maxGenerateIdIterations","generateFieldId","layout","id","generateAlphaNumericLowerCaseId","iteration","includes","Error","FieldEditorProvider","parent","fields","onChange","children","depth","editor","useModelFieldEditor","useState","field","dropTarget","row","index","state","setState","useDeepCompareEffect","editField","useCallback","onDropTarget","fieldId","onFieldDrop","source","pos","type","fieldType","parentId","forEach","insertField","position","moveRow","moveField","plugin","getFieldPlugin","fieldData","createField","canEditSettings","onEndDrag","monitor","didDrop","getDropResult","removeFields","deleteField","getFieldsInLayout","filter","arr","length","map","getField","Boolean","plugins","byType","find","getFieldRendererPlugin","name","renderer","rendererName","query","key","flat","fieldPlugin","prev","next","concat","utils","data","destination","updateField","i","dot","set","noConflict","isVisible","item","sameParent","draggedFields","push","some","f","join","value"],"sources":["FieldEditorContext.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport dot from \"dot-prop-immutable\";\nimport useDeepCompareEffect from \"use-deep-compare-effect\";\nimport {\n CmsModelField,\n CmsEditorFieldId,\n CmsEditorFieldRendererPlugin,\n CmsEditorFieldsLayout,\n CmsEditorFieldTypePlugin,\n FieldLayoutPosition\n} from \"~/types\";\nimport { plugins } from \"@webiny/plugins\";\nimport * as utils from \"./utils\";\nimport { FieldEditorProps } from \"./FieldEditor\";\nimport { DragObjectWithType, DragSourceMonitor } from \"react-dnd\";\nimport { useModelFieldEditor } from \"~/admin/components/FieldEditor/useModelFieldEditor\";\nimport { generateAlphaNumericLowerCaseId } from \"@webiny/utils\";\n\ninterface DropTarget {\n row: number;\n index: number | null;\n}\n\ninterface Position {\n row: number;\n index: number;\n}\n\nexport interface DragSource extends DragObjectWithType {\n parent?: string;\n pos?: Partial<Position>;\n type: \"row\" | \"field\" | \"newField\";\n fieldType?: string;\n field?: CmsModelField | null;\n fields?: CmsModelField[];\n}\n\n/**\n * Property in GetFieldParams can be any key from CmsEditorField, but TS does not allow union types\n */\ninterface GetFieldParams {\n id?: string;\n fieldId?: string;\n}\ninterface InsertFieldParams {\n field: CmsModelField;\n position: FieldLayoutPosition;\n}\ninterface MoveFieldParams {\n field: CmsEditorFieldId | CmsModelField;\n position: FieldLayoutPosition;\n}\ninterface GetFieldsInLayoutCallable {\n (): CmsModelField[][];\n}\ninterface GetFieldPluginCallable {\n (type: string): CmsEditorFieldTypePlugin | undefined;\n}\ninterface GetFieldCallable {\n (query: GetFieldParams): CmsModelField | undefined;\n}\ninterface GetFieldRendererCallable {\n (rendererName: string): CmsEditorFieldRendererPlugin | undefined;\n}\ninterface OnFieldDropCallable {\n (source: Partial<DragSource>, target: DropTarget): void;\n}\ninterface InsertFieldCallable {\n (params: InsertFieldParams): void;\n}\ninterface MoveFieldCallable {\n (params: MoveFieldParams): void;\n}\ninterface OnEndDragCallable {\n (item: DragSource, monitor: DragSourceMonitor): void;\n}\ninterface MoveRowCallable {\n (source: number, destination: number): void;\n}\ninterface UpdateFieldCallable {\n (field: CmsModelField): void;\n}\ninterface DeleteFieldCallable {\n (field: Pick<CmsModelField, \"id\">): void;\n}\nexport interface IsVisibleCallable {\n (item: DragSource): boolean;\n}\ninterface NoConflictCallable {\n (cb?: IsVisibleCallable): (item: DragSource) => boolean;\n}\nexport interface FieldEditorContext {\n fields: CmsModelField[][];\n noConflict: NoConflictCallable;\n layout: CmsEditorFieldsLayout;\n onChange?: (data: any) => void;\n getFieldsInLayout: GetFieldsInLayoutCallable;\n getFieldPlugin: GetFieldPluginCallable;\n getField: GetFieldCallable;\n getFieldRendererPlugin: GetFieldRendererCallable;\n editField: (field: CmsModelField | null) => void;\n field: CmsModelField | null;\n parent?: CmsModelField;\n depth: number;\n dropTarget: DropTarget;\n onFieldDrop: OnFieldDropCallable;\n onEndDrag: OnEndDragCallable;\n insertField: InsertFieldCallable;\n moveField: MoveFieldCallable;\n moveRow: MoveRowCallable;\n updateField: UpdateFieldCallable;\n deleteField: DeleteFieldCallable;\n}\n\ninterface FieldEditorProviderProps extends FieldEditorProps {\n children: React.ReactElement;\n}\n\nexport const FieldEditorContext = React.createContext<FieldEditorContext | undefined>(undefined);\n/**\n * We try to generate the random id string but with the check that it does not exist already.\n * Chances that the same string exists are quite small, but let's check it anyway.\n *\n * In most cases, there will be no iterations anyway...\n */\nconst maxGenerateIdIterations = 100;\nconst generateFieldId = (layout: string[]): string => {\n let id = generateAlphaNumericLowerCaseId(8);\n\n let iteration = 0;\n while (layout.includes(id) && iteration < maxGenerateIdIterations) {\n id = generateAlphaNumericLowerCaseId(8);\n iteration++;\n }\n if (iteration >= maxGenerateIdIterations) {\n throw new Error(`Could not generate field ID in ${maxGenerateIdIterations} iterations.`);\n }\n return id;\n};\n\ninterface State {\n layout: CmsEditorFieldsLayout;\n fields: CmsModelField[];\n field: CmsModelField | null;\n dropTarget: DropTarget;\n}\nexport const FieldEditorProvider: React.FC<FieldEditorProviderProps> = ({\n parent,\n fields,\n layout,\n onChange,\n children\n}) => {\n // We need to determine depth of this provider so we can render drop zones with correct z-indexes.\n let depth = 0;\n try {\n const editor = useModelFieldEditor();\n depth = editor.depth + 1;\n } catch {\n // There's no parent provider, so this is the top-level one.\n }\n\n const [state, setState] = useState<State>({\n layout,\n fields,\n field: null,\n dropTarget: {\n row: -1,\n index: null\n }\n });\n\n useDeepCompareEffect(() => {\n onChange({ fields: state.fields, layout: state.layout });\n }, [state.fields, state.layout]);\n\n const editField = useCallback((field: CmsModelField | null) => {\n setState(state => ({ ...state, field }));\n }, []);\n\n const onDropTarget = {\n dropTarget: parent ? parent.fieldId : null\n };\n\n const onFieldDrop = useCallback<OnFieldDropCallable>((source, dropTarget) => {\n const { pos, type, fieldType, field, fields = [] } = source;\n\n const parentId = parent ? parent.fieldId : null;\n\n if (type === \"row\") {\n if (parentId !== source.parent) {\n // We're dragging an existing row from another fieldset\n fields.forEach((field, index) => {\n insertField({\n field,\n position: {\n row: dropTarget.row,\n index: index === 0 ? null : index\n }\n });\n });\n } else if (pos && pos.row !== undefined) {\n // We're dragging a row within the same fieldset\n moveRow(pos.row, dropTarget.row);\n }\n\n return onDropTarget;\n }\n\n // If source pos is set, we are moving an existing field.\n if (pos) {\n if (!field) {\n return onDropTarget;\n }\n if (parentId !== source.parent) {\n // We're dragging an existing field from another fieldset\n insertField({ field, position: dropTarget });\n } else {\n // We're dragging a field within the same fieldset\n moveField({ field, position: dropTarget });\n }\n return onDropTarget;\n }\n\n if (!fieldType) {\n return null;\n }\n const plugin = getFieldPlugin(fieldType);\n if (!plugin) {\n return null;\n }\n\n const fieldData = plugin.field.createField() as CmsModelField;\n\n if (plugin.field.canEditSettings !== false) {\n editField(fieldData);\n setState(state => ({\n ...state,\n dropTarget\n }));\n } else {\n insertField({ field: fieldData, position: dropTarget });\n }\n return null;\n }, []);\n\n const onEndDrag: OnEndDragCallable = ({ type, field, fields }, monitor) => {\n if (!monitor.didDrop()) {\n return;\n }\n\n // Check if we dropped outside of the source fieldset, and if yes, remove the field from the original parent.\n const { dropTarget } = monitor.getDropResult();\n const parentId = parent ? parent.fieldId : null;\n if (dropTarget === parentId) {\n return;\n }\n\n const removeFields = type === \"row\" ? fields || [] : field ? [field] : [];\n removeFields.forEach(field => deleteField(field));\n };\n\n const getFieldsInLayout: GetFieldsInLayoutCallable = () => {\n // Replace every field ID with actual field object.\n return state.layout\n .filter(arr => arr.length)\n .map(row => {\n return row\n .map(id => {\n return getField({ id });\n })\n .filter(Boolean);\n })\n .filter(row => {\n return row.length > 0;\n }) as CmsModelField[][];\n };\n\n /**\n * Return field plugin.\n */\n const getFieldPlugin: GetFieldPluginCallable = type => {\n return plugins\n .byType<CmsEditorFieldTypePlugin>(\"cms-editor-field-type\")\n .find(plugin => plugin.field.type === type);\n };\n\n const getFieldRendererPlugin: GetFieldRendererCallable = name => {\n return plugins\n .byType<CmsEditorFieldRendererPlugin>(\"cms-editor-field-renderer\")\n .find(plugin => plugin.renderer.rendererName === name);\n };\n\n /**\n * Checks if field of given type already exists in the list of fields.\n */\n const getField: GetFieldCallable = query => {\n return state.fields.find(field => {\n for (const key in query) {\n if (!(key in field)) {\n return false;\n }\n // TODO @ts-refactor figure if there is a way to fix this.\n // @ts-ignore\n if (field[key] !== query[key]) {\n return false;\n }\n }\n\n return true;\n });\n };\n\n /**\n * Inserts a new field into the target position.\n */\n const insertField: InsertFieldCallable = ({ field, position }) => {\n if (!field.id) {\n field.id = generateFieldId(layout.flat());\n }\n\n if (!field.type) {\n throw new Error(`Field \"type\" missing.`);\n }\n\n const fieldPlugin = getFieldPlugin(field.type);\n if (!fieldPlugin) {\n throw new Error(`No plugin found for field type \"${field.type}\".`);\n }\n\n setState(prev => {\n const next: State = {\n ...prev,\n fields: (prev.fields || []).concat(field)\n };\n\n // Move field to position where it was dropped.\n return utils.moveField({ field, position, data: next });\n });\n };\n\n /**\n * Moves field to the given target position.\n */\n const moveField: MoveFieldCallable = ({ field, position }) => {\n setState(data => {\n return utils.moveField<State>({ field, position, data });\n });\n };\n\n /**\n * Moves row to a destination row.\n */\n const moveRow: MoveRowCallable = (source, destination) => {\n setState(data => {\n return utils.moveRow({ data, source, destination });\n });\n };\n\n /**\n * Updates field.\n */\n const updateField: UpdateFieldCallable = field => {\n setState(data => {\n for (let i = 0; i < data.fields.length; i++) {\n if (data.fields[i].id === field.id) {\n return dot.set(data, `fields.${i}`, field);\n }\n }\n return data;\n });\n };\n\n /**\n * Deletes a field (both from the list of field and the layout).\n */\n const deleteField: DeleteFieldCallable = field => {\n setState(data => {\n return utils.deleteField({ field, data });\n });\n };\n\n const noConflict: NoConflictCallable = useCallback(\n (isVisible?: IsVisibleCallable) => item => {\n const sameParent = item.parent === onDropTarget.dropTarget;\n const draggedFields: string[] = [];\n switch (item.type) {\n case \"row\":\n (item.fields || []).forEach(field => draggedFields.push(field.fieldId));\n break;\n case \"field\":\n if (!item.field) {\n break;\n }\n draggedFields.push(item.field.fieldId);\n break;\n default:\n break;\n }\n\n if (\n draggedFields.length &&\n !sameParent &&\n fields.some(field => draggedFields.includes(field.fieldId))\n ) {\n return false;\n }\n\n return typeof isVisible === \"function\" ? isVisible(item) : true;\n },\n [fields.map(f => f.fieldId).join(\".\")]\n );\n\n const value: FieldEditorContext = {\n parent,\n depth,\n getFieldsInLayout,\n getFieldPlugin,\n getFieldRendererPlugin,\n getField,\n editField,\n field: state.field,\n dropTarget: state.dropTarget,\n onFieldDrop,\n onEndDrag,\n insertField,\n moveField,\n moveRow,\n updateField,\n deleteField,\n fields: getFieldsInLayout(),\n noConflict,\n layout: state.layout\n };\n\n return <FieldEditorContext.Provider value={value}>{children}</FieldEditorContext.Provider>;\n};\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AASA;AACA;AAGA;AACA;AAsGO,IAAMA,kBAAkB,gBAAGC,cAAK,CAACC,aAAa,CAAiCC,SAAS,CAAC;AAChG;AACA;AACA;AACA;AACA;AACA;AALA;AAMA,IAAMC,uBAAuB,GAAG,GAAG;AACnC,IAAMC,eAAe,GAAG,SAAlBA,eAAe,CAAIC,MAAgB,EAAa;EAClD,IAAIC,EAAE,GAAG,IAAAC,uCAA+B,EAAC,CAAC,CAAC;EAE3C,IAAIC,SAAS,GAAG,CAAC;EACjB,OAAOH,MAAM,CAACI,QAAQ,CAACH,EAAE,CAAC,IAAIE,SAAS,GAAGL,uBAAuB,EAAE;IAC/DG,EAAE,GAAG,IAAAC,uCAA+B,EAAC,CAAC,CAAC;IACvCC,SAAS,EAAE;EACf;EACA,IAAIA,SAAS,IAAIL,uBAAuB,EAAE;IACtC,MAAM,IAAIO,KAAK,0CAAmCP,uBAAuB,kBAAe;EAC5F;EACA,OAAOG,EAAE;AACb,CAAC;AAQM,IAAMK,mBAAuD,GAAG,SAA1DA,mBAAuD,OAM9D;EAAA,IALFC,MAAM,QAANA,MAAM;IACNC,MAAM,QAANA,MAAM;IACNR,MAAM,QAANA,MAAM;IACNS,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;EAER;EACA,IAAIC,KAAK,GAAG,CAAC;EACb,IAAI;IACA,IAAMC,MAAM,GAAG,IAAAC,wCAAmB,GAAE;IACpCF,KAAK,GAAGC,MAAM,CAACD,KAAK,GAAG,CAAC;EAC5B,CAAC,CAAC,gBAAM;IACJ;EAAA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AC;AAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
/// <reference types="web" />
|
|
4
|
+
export declare const RowContainer: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: import("react").ElementType<any> | undefined;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
export declare const Row: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
12
|
export declare const fieldContainer: string;
|
|
5
13
|
export declare const rowHandle: string;
|
|
6
14
|
export declare const fieldHandle: string;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})({
|
|
7
|
-
position: "relative",
|
|
8
|
-
display: "flex",
|
|
9
|
-
flexDirection: "column",
|
|
10
|
-
marginBottom: 20,
|
|
11
|
-
borderRadius: 2,
|
|
12
|
-
backgroundColor: "var(--mdc-theme-surface)",
|
|
13
|
-
border: "1px solid var(--mdc-theme-on-background)",
|
|
14
|
-
boxShadow: "var(--mdc-theme-on-background) 1px 1px 1px, var(--mdc-theme-on-background) 1px 1px 2px"
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
15
6
|
});
|
|
16
|
-
|
|
7
|
+
exports.rowHandle = exports.fieldHandle = exports.fieldContainer = exports.RowContainer = exports.Row = void 0;
|
|
8
|
+
var _emotion = require("emotion");
|
|
9
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
+
var RowContainer = /*#__PURE__*/(0, _styled.default)("div", {
|
|
11
|
+
label: "RowContainer",
|
|
12
|
+
target: "e1pk1rsi0"
|
|
13
|
+
})("position:relative;display:flex;flex-direction:column;margin-bottom:20px;border-radius:2px;background-color:var(--mdc-theme-surface);border:1px solid var(--mdc-theme-on-background);box-shadow:var(--mdc-theme-on-background) 1px 1px 1px,var(--mdc-theme-on-background) 1px 1px 2px;:last-child{margin-bottom:5px;}");
|
|
14
|
+
exports.RowContainer = RowContainer;
|
|
15
|
+
var Row = /*#__PURE__*/(0, _styled.default)("div", {
|
|
17
16
|
target: "e1pk1rsi1",
|
|
18
17
|
label: "Row"
|
|
19
18
|
})({
|
|
@@ -24,11 +23,12 @@ export var Row = /*#__PURE__*/styled("div", {
|
|
|
24
23
|
paddingRight: 10,
|
|
25
24
|
position: "relative"
|
|
26
25
|
});
|
|
27
|
-
|
|
26
|
+
exports.Row = Row;
|
|
27
|
+
var fieldContainer = /*#__PURE__*/(0, _emotion.css)({
|
|
28
28
|
position: "relative",
|
|
29
29
|
flex: "1 100%",
|
|
30
30
|
backgroundColor: "var(--mdc-theme-background)",
|
|
31
|
-
padding: "
|
|
31
|
+
padding: "2px 15px 2px",
|
|
32
32
|
margin: 10,
|
|
33
33
|
borderRadius: 2,
|
|
34
34
|
border: "1px solid var(--mdc-theme-on-background)",
|
|
@@ -39,7 +39,8 @@ export var fieldContainer = /*#__PURE__*/css({
|
|
|
39
39
|
boxShadow: "var(--mdc-theme-on-background) 1px 1px 1px, var(--mdc-theme-on-background) 1px 1px 2px"
|
|
40
40
|
}
|
|
41
41
|
}, "label:fieldContainer;");
|
|
42
|
-
|
|
42
|
+
exports.fieldContainer = fieldContainer;
|
|
43
|
+
var rowHandle = /*#__PURE__*/(0, _emotion.css)({
|
|
43
44
|
width: 30,
|
|
44
45
|
cursor: "grab",
|
|
45
46
|
position: "absolute",
|
|
@@ -49,6 +50,8 @@ export var rowHandle = /*#__PURE__*/css({
|
|
|
49
50
|
zIndex: 1,
|
|
50
51
|
color: "var(--mdc-theme-on-surface)"
|
|
51
52
|
}, "label:rowHandle;");
|
|
52
|
-
|
|
53
|
+
exports.rowHandle = rowHandle;
|
|
54
|
+
var fieldHandle = /*#__PURE__*/(0, _emotion.css)({
|
|
53
55
|
cursor: "grab"
|
|
54
|
-
}, "label:fieldHandle;");
|
|
56
|
+
}, "label:fieldHandle;");
|
|
57
|
+
exports.fieldHandle = fieldHandle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RowContainer","styled","Row","display","flexDirection","backgroundColor","paddingLeft","paddingRight","position","fieldContainer","css","flex","padding","margin","borderRadius","border","transition","color","cursor","boxShadow","rowHandle","width","left","top","transform","zIndex","fieldHandle"],"sources":["Styled.ts"],"sourcesContent":["import { css } from \"emotion\";\nimport styled from \"@emotion/styled\";\n\nexport const RowContainer = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n margin-bottom: 20px;\n border-radius: 2px;\n background-color: var(--mdc-theme-surface);\n border: 1px solid var(--mdc-theme-on-background);\n box-shadow: var(--mdc-theme-on-background) 1px 1px 1px,\n var(--mdc-theme-on-background) 1px 1px 2px;\n :last-child {\n margin-bottom: 5px;\n }\n`;\n\nexport const Row = styled(\"div\")({\n display: \"flex\",\n flexDirection: \"row\",\n backgroundColor: \"var(--mdc-theme-surface)\",\n paddingLeft: 40,\n paddingRight: 10,\n position: \"relative\"\n});\n\nexport const fieldContainer = css({\n position: \"relative\",\n flex: \"1 100%\",\n backgroundColor: \"var(--mdc-theme-background)\",\n padding: \"2px 15px 2px\",\n margin: 10,\n borderRadius: 2,\n border: \"1px solid var(--mdc-theme-on-background)\",\n transition: \"box-shadow 225ms\",\n color: \"var(--mdc-theme-on-surface)\",\n cursor: \"grab\",\n \"&:hover\": {\n boxShadow:\n \"var(--mdc-theme-on-background) 1px 1px 1px, var(--mdc-theme-on-background) 1px 1px 2px\"\n }\n});\n\nexport const rowHandle = css({\n width: 30,\n cursor: \"grab\",\n position: \"absolute\",\n left: 10,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n zIndex: 1,\n color: \"var(--mdc-theme-on-surface)\"\n});\n\nexport const fieldHandle = css({\n cursor: \"grab\"\n});\n"],"mappings":";;;;;;;AAAA;AACA;AAEO,IAAMA,YAAY,oBAAGC,eAAM;EAAA;EAAA;AAAA,0TAajC;AAAC;AAEK,IAAMC,GAAG,oBAAGD,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EAC7BE,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,KAAK;EACpBC,eAAe,EAAE,0BAA0B;EAC3CC,WAAW,EAAE,EAAE;EACfC,YAAY,EAAE,EAAE;EAChBC,QAAQ,EAAE;AACd,CAAC,CAAC;AAAC;AAEI,IAAMC,cAAc,gBAAG,IAAAC,YAAG,EAAC;EAC9BF,QAAQ,EAAE,UAAU;EACpBG,IAAI,EAAE,QAAQ;EACdN,eAAe,EAAE,6BAA6B;EAC9CO,OAAO,EAAE,cAAc;EACvBC,MAAM,EAAE,EAAE;EACVC,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE,0CAA0C;EAClDC,UAAU,EAAE,kBAAkB;EAC9BC,KAAK,EAAE,6BAA6B;EACpCC,MAAM,EAAE,MAAM;EACd,SAAS,EAAE;IACPC,SAAS,EACL;EACR;AACJ,CAAC,0BAAC;AAAC;AAEI,IAAMC,SAAS,gBAAG,IAAAV,YAAG,EAAC;EACzBW,KAAK,EAAE,EAAE;EACTH,MAAM,EAAE,MAAM;EACdV,QAAQ,EAAE,UAAU;EACpBc,IAAI,EAAE,EAAE;EACRC,GAAG,EAAE,KAAK;EACVC,SAAS,EAAE,kBAAkB;EAC7BC,MAAM,EAAE,CAAC;EACTR,KAAK,EAAE;AACX,CAAC,qBAAC;AAAC;AAEI,IAAMS,WAAW,gBAAG,IAAAhB,YAAG,EAAC;EAC3BQ,MAAM,EAAE;AACZ,CAAC,uBAAC;AAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { FieldEditor } from "./FieldEditor";
|
|
2
|
-
export {
|
|
2
|
+
export { useModelFieldEditor } from "./useModelFieldEditor";
|