@webiny/app-headless-cms 0.0.0-mt-2 → 0.0.0-unstable.5e7233243f
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 +62 -0
- package/HeadlessCMS.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryForm.js +143 -37
- package/admin/components/ContentEntryForm/ContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +58 -19
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js.map +1 -0
- package/admin/components/ContentEntryForm/Fields.d.ts +4 -5
- package/admin/components/ContentEntryForm/Fields.js +23 -10
- package/admin/components/ContentEntryForm/Fields.js.map +1 -0
- package/admin/components/ContentEntryForm/Label.d.ts +2 -4
- package/admin/components/ContentEntryForm/Label.js +23 -9
- package/admin/components/ContentEntryForm/Label.js.map +1 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +5 -4
- package/admin/components/ContentEntryForm/RenderFieldElement.js +31 -15
- package/admin/components/ContentEntryForm/RenderFieldElement.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/createValidators.d.ts +3 -1
- package/admin/components/ContentEntryForm/functions/createValidators.js +31 -13
- package/admin/components/ContentEntryForm/functions/createValidators.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/getValue.d.ts +9 -5
- package/admin/components/ContentEntryForm/functions/getValue.js +14 -5
- 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 +20 -8
- package/admin/components/ContentEntryForm/functions/setValue.js.map +1 -0
- package/admin/components/ContentEntryForm/useBind.d.ts +6 -6
- package/admin/components/ContentEntryForm/useBind.js +64 -25
- package/admin/components/ContentEntryForm/useBind.js.map +1 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.d.ts +4 -5
- package/admin/components/ContentEntryForm/useContentEntryForm.js +277 -94
- package/admin/components/ContentEntryForm/useContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.js +14 -5
- package/admin/components/ContentEntryForm/useRenderPlugins.js.map +1 -0
- package/admin/components/ContentModelEditor/Context.d.ts +24 -13
- package/admin/components/ContentModelEditor/Context.js +247 -86
- package/admin/components/ContentModelEditor/Context.js.map +1 -0
- package/admin/components/ContentModelEditor/Editor.d.ts +3 -2
- package/admin/components/ContentModelEditor/Editor.js +90 -53
- package/admin/components/ContentModelEditor/Editor.js.map +1 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +6 -4
- package/admin/components/ContentModelEditor/FieldsSidebar.js +47 -29
- package/admin/components/ContentModelEditor/FieldsSidebar.js.map +1 -0
- package/admin/components/ContentModelEditor/Header.d.ts +3 -2
- package/admin/components/ContentModelEditor/Header.js +28 -11
- package/admin/components/ContentModelEditor/Header.js.map +1 -0
- package/admin/components/ContentModelEditor/PreviewTab.js +36 -17
- package/admin/components/ContentModelEditor/PreviewTab.js.map +1 -0
- package/admin/components/ContentModelEditor/useContentModelEditor.d.ts +1 -1
- package/admin/components/ContentModelEditor/useContentModelEditor.js +15 -4
- package/admin/components/ContentModelEditor/useContentModelEditor.js.map +1 -0
- package/admin/components/DragPreview.d.ts +3 -2
- package/admin/components/DragPreview.js +37 -15
- package/admin/components/DragPreview.js.map +1 -0
- package/admin/components/Draggable.d.ts +9 -6
- package/admin/components/Draggable.js +26 -9
- package/admin/components/Draggable.js.map +1 -0
- package/admin/components/DropZone/Center.d.ts +6 -6
- package/admin/components/DropZone/Center.js +30 -13
- package/admin/components/DropZone/Center.js.map +1 -0
- package/admin/components/DropZone/Horizontal.d.ts +7 -5
- package/admin/components/DropZone/Horizontal.js +32 -18
- package/admin/components/DropZone/Horizontal.js.map +1 -0
- package/admin/components/DropZone/Vertical.d.ts +4 -4
- package/admin/components/DropZone/Vertical.js +29 -15
- package/admin/components/DropZone/Vertical.js.map +1 -0
- package/admin/components/DropZone/index.js +31 -4
- package/admin/components/DropZone/index.js.map +1 -0
- package/admin/components/Droppable.d.ts +22 -12
- package/admin/components/Droppable.js +24 -8
- package/admin/components/Droppable.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +8 -2
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +57 -33
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +4 -4
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +81 -48
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +10 -5
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +73 -24
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.d.ts +9 -4
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +86 -59
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +7 -5
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +17 -7
- 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 +20 -10
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +7 -7
- package/admin/components/FieldEditor/EditFieldDialog.js +183 -89
- package/admin/components/FieldEditor/EditFieldDialog.js.map +1 -0
- package/admin/components/FieldEditor/Field.d.ts +8 -1
- package/admin/components/FieldEditor/Field.js +113 -64
- package/admin/components/FieldEditor/Field.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditor.d.ts +2 -2
- package/admin/components/FieldEditor/FieldEditor.js +75 -46
- package/admin/components/FieldEditor/FieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +70 -25
- package/admin/components/FieldEditor/FieldEditorContext.js +137 -58
- package/admin/components/FieldEditor/FieldEditorContext.js.map +1 -0
- package/admin/components/FieldEditor/Styled.d.ts +4 -2
- package/admin/components/FieldEditor/Styled.js +24 -8
- package/admin/components/FieldEditor/Styled.js.map +1 -0
- package/admin/components/FieldEditor/index.js +21 -2
- package/admin/components/FieldEditor/index.js.map +1 -0
- package/admin/components/FieldEditor/useFieldEditor.js +13 -4
- package/admin/components/FieldEditor/useFieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/utils/deleteField.d.ts +6 -8
- package/admin/components/FieldEditor/utils/deleteField.js +28 -10
- 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 +16 -6
- package/admin/components/FieldEditor/utils/getFieldPosition.js.map +1 -0
- package/admin/components/FieldEditor/utils/index.js +39 -4
- package/admin/components/FieldEditor/utils/index.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveField.d.ts +5 -4
- package/admin/components/FieldEditor/utils/moveField.js +39 -23
- 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 +19 -6
- package/admin/components/FieldEditor/utils/moveRow.js.map +1 -0
- package/admin/constants/statusLabels.d.ts +2 -8
- package/admin/constants/statusLabels.js +23 -10
- package/admin/constants/statusLabels.js.map +1 -0
- package/admin/contexts/Cms/NetworkError.js +14 -4
- package/admin/contexts/Cms/NetworkError.js.map +1 -0
- package/admin/contexts/Cms/index.d.ts +64 -5
- package/admin/contexts/Cms/index.js +152 -26
- package/admin/contexts/Cms/index.js.map +1 -0
- package/admin/elements/ContentGroupMenuElement.js +28 -11
- package/admin/elements/ContentGroupMenuElement.js.map +1 -0
- package/admin/elements/ContentModelMenuElement.js +28 -11
- package/admin/elements/ContentModelMenuElement.js.map +1 -0
- package/admin/elements/NothingToShowElement.d.ts +1 -1
- package/admin/elements/NothingToShowElement.js +51 -30
- package/admin/elements/NothingToShowElement.js.map +1 -0
- package/admin/graphql/contentEntries.d.ts +172 -11
- package/admin/graphql/contentEntries.js +139 -40
- package/admin/graphql/contentEntries.js.map +1 -0
- package/admin/graphql/contentModels.d.ts +29 -1
- package/admin/graphql/contentModels.js +31 -6
- package/admin/graphql/contentModels.js.map +1 -0
- package/admin/graphql/createFieldsList.js +19 -6
- package/admin/graphql/createFieldsList.js.map +1 -0
- package/admin/hooks/index.d.ts +1 -0
- package/admin/hooks/index.js +68 -5
- package/admin/hooks/index.js.map +1 -0
- package/admin/hooks/useApolloClient.d.ts +2 -1
- package/admin/hooks/useApolloClient.js +13 -3
- package/admin/hooks/useApolloClient.js.map +1 -0
- package/admin/hooks/useCms.d.ts +2 -2
- package/admin/hooks/useCms.js +13 -4
- package/admin/hooks/useCms.js.map +1 -0
- package/admin/hooks/useLazyQuery.d.ts +4 -1
- package/admin/hooks/useLazyQuery.js +18 -6
- package/admin/hooks/useLazyQuery.js.map +1 -0
- package/admin/hooks/useMutation.d.ts +4 -1
- package/admin/hooks/useMutation.js +18 -6
- package/admin/hooks/useMutation.js.map +1 -0
- package/admin/hooks/usePermission.d.ts +21 -20
- package/admin/hooks/usePermission.js +60 -40
- package/admin/hooks/usePermission.js.map +1 -0
- package/admin/hooks/useQuery.d.ts +4 -1
- package/admin/hooks/useQuery.js +18 -6
- package/admin/hooks/useQuery.js.map +1 -0
- package/admin/hooks/useQueryLocale.d.ts +4 -0
- package/admin/hooks/useQueryLocale.js +29 -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 +60 -0
- package/admin/menus/CmsMenuLoader.js.map +1 -0
- package/admin/menus/ContentGroupsMenuItems.d.ts +2 -0
- package/admin/menus/ContentGroupsMenuItems.js +105 -0
- package/admin/menus/ContentGroupsMenuItems.js.map +1 -0
- package/admin/{plugins/menus → menus}/GlobalSearchPlugins.d.ts +2 -1
- package/admin/{plugins/menus → menus}/GlobalSearchPlugins.js +33 -17
- package/admin/menus/GlobalSearchPlugins.js.map +1 -0
- package/admin/menus/NothingToShowElement.d.ts +2 -0
- package/admin/menus/NothingToShowElement.js +57 -0
- package/admin/menus/NothingToShowElement.js.map +1 -0
- package/admin/plugins/apiInformation/index.js +23 -7
- package/admin/plugins/apiInformation/index.js.map +1 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +33 -21
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +33 -20
- 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 +31 -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 +39 -20
- package/admin/plugins/editor/defaultBar/CreateContentButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Divider.d.ts +3 -1
- package/admin/plugins/editor/defaultBar/Divider.js +14 -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 +78 -40
- 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 +29 -13
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +3 -2
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +30 -10
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.js +15 -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 +50 -28
- package/admin/plugins/editor/defaultBar/Name/Name.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +5 -3
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js +22 -7
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/index.js +13 -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 +74 -48
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/index.js +32 -15
- package/admin/plugins/editor/defaultBar/index.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js +33 -19
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.js +28 -11
- package/admin/plugins/editor/formSettings/components/GroupSelect.js.map +1 -0
- package/admin/plugins/editor/formSettings/index.js +21 -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 +204 -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 +176 -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 +46 -24
- package/admin/plugins/fieldRenderers/Accordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +16 -6
- package/admin/plugins/fieldRenderers/DynamicSection.js +44 -26
- package/admin/plugins/fieldRenderers/DynamicSection.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +29 -13
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/index.js +13 -2
- package/admin/plugins/fieldRenderers/boolean/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/checkboxes.js +51 -26
- 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 +89 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +4 -4
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +159 -78
- 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 +146 -69
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +6 -7
- package/admin/plugins/fieldRenderers/dateTime/Input.js +22 -8
- 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 +16 -5
- 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 +79 -7
- package/admin/plugins/fieldRenderers/dateTime/Time.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +41 -27
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +64 -42
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/index.js +15 -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 +92 -19
- package/admin/plugins/fieldRenderers/dateTime/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/File.d.ts +5 -5
- package/admin/plugins/fieldRenderers/file/File.js +44 -20
- package/admin/plugins/fieldRenderers/file/File.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileField.js +49 -37
- package/admin/plugins/fieldRenderers/file/fileField.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js +96 -66
- package/admin/plugins/fieldRenderers/file/fileFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/index.js +15 -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 +29 -12
- package/admin/plugins/fieldRenderers/file/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/index.js +15 -3
- package/admin/plugins/fieldRenderers/longText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longText.js +29 -13
- package/admin/plugins/fieldRenderers/longText/longText.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.js +33 -16
- package/admin/plugins/fieldRenderers/longText/longTexts.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/index.js +15 -3
- package/admin/plugins/fieldRenderers/number/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js +29 -13
- package/admin/plugins/fieldRenderers/number/numberInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.js +33 -16
- package/admin/plugins/fieldRenderers/number/numberInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.d.ts +5 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.js +52 -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 +15 -3
- package/admin/plugins/fieldRenderers/object/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.js +135 -59
- package/admin/plugins/fieldRenderers/object/multipleObjects.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/singleObject.js +38 -19
- package/admin/plugins/fieldRenderers/object/singleObject.js.map +1 -0
- package/admin/plugins/fieldRenderers/radioButtons.js +44 -21
- package/admin/plugins/fieldRenderers/radioButtons.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +8 -5
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +124 -28
- 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 +98 -30
- 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 +69 -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 +56 -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 +197 -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 +20 -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 +35 -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 +59 -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 +50 -8
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/types.d.ts +26 -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 +6 -11
- package/admin/plugins/fieldRenderers/ref/components/useReference.js +135 -97
- 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 +120 -68
- 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 +74 -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 +53 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/index.js +15 -3
- package/admin/plugins/fieldRenderers/ref/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInput.js +27 -11
- package/admin/plugins/fieldRenderers/ref/refInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js +27 -12
- package/admin/plugins/fieldRenderers/ref/refInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/index.js +15 -3
- package/admin/plugins/fieldRenderers/richText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js +39 -16
- package/admin/plugins/fieldRenderers/richText/richTextInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +51 -23
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/select.js +52 -16
- package/admin/plugins/fieldRenderers/select.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/index.js +15 -3
- package/admin/plugins/fieldRenderers/text/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInput.js +29 -13
- package/admin/plugins/fieldRenderers/text/textInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInputs.js +33 -16
- package/admin/plugins/fieldRenderers/text/textInputs.js.map +1 -0
- package/admin/plugins/fieldValidators/date/availableValidators.js +11 -2
- package/admin/plugins/fieldValidators/date/availableValidators.js.map +1 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +2 -1
- package/admin/plugins/fieldValidators/date/createDateInputField.js +33 -20
- package/admin/plugins/fieldValidators/date/createDateInputField.js.map +1 -0
- package/admin/plugins/fieldValidators/dateGte.js +33 -16
- package/admin/plugins/fieldValidators/dateGte.js.map +1 -0
- package/admin/plugins/fieldValidators/dateLte.js +33 -16
- package/admin/plugins/fieldValidators/dateLte.js.map +1 -0
- package/admin/plugins/fieldValidators/gte.d.ts +2 -2
- package/admin/plugins/fieldValidators/gte.js +25 -10
- package/admin/plugins/fieldValidators/gte.js.map +1 -0
- package/admin/plugins/fieldValidators/in.d.ts +2 -2
- package/admin/plugins/fieldValidators/in.js +25 -10
- package/admin/plugins/fieldValidators/in.js.map +1 -0
- package/admin/plugins/fieldValidators/lte.d.ts +2 -2
- package/admin/plugins/fieldValidators/lte.js +25 -10
- package/admin/plugins/fieldValidators/lte.js.map +1 -0
- package/admin/plugins/fieldValidators/maxLength.d.ts +2 -2
- package/admin/plugins/fieldValidators/maxLength.js +25 -10
- package/admin/plugins/fieldValidators/maxLength.js.map +1 -0
- package/admin/plugins/fieldValidators/minLength.d.ts +2 -2
- package/admin/plugins/fieldValidators/minLength.js +25 -10
- package/admin/plugins/fieldValidators/minLength.js.map +1 -0
- package/admin/plugins/fieldValidators/pattern.d.ts +2 -2
- package/admin/plugins/fieldValidators/pattern.js +48 -23
- package/admin/plugins/fieldValidators/pattern.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/email.js +10 -2
- package/admin/plugins/fieldValidators/patternPlugins/email.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +10 -2
- 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 +17 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +10 -2
- 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 +17 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/url.js +10 -2
- package/admin/plugins/fieldValidators/patternPlugins/url.js.map +1 -0
- package/admin/plugins/fieldValidators/required.d.ts +2 -2
- package/admin/plugins/fieldValidators/required.js +10 -2
- package/admin/plugins/fieldValidators/required.js.map +1 -0
- package/admin/plugins/fieldValidators/unique.d.ts +3 -0
- package/admin/plugins/fieldValidators/unique.js +21 -0
- package/admin/plugins/fieldValidators/unique.js.map +1 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +8 -5
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +132 -71
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js.map +1 -0
- package/admin/plugins/fields/boolean.js +44 -11
- package/admin/plugins/fields/boolean.js.map +1 -0
- package/admin/plugins/fields/dateTime.js +65 -38
- package/admin/plugins/fields/dateTime.js.map +1 -0
- package/admin/plugins/fields/file.js +33 -17
- package/admin/plugins/fields/file.js.map +1 -0
- package/admin/plugins/fields/longText.js +33 -17
- package/admin/plugins/fields/longText.js.map +1 -0
- package/admin/plugins/fields/number.js +39 -22
- 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 +30 -13
- package/admin/plugins/fields/object/ObjectFields.js.map +1 -0
- package/admin/plugins/fields/object.js +30 -14
- package/admin/plugins/fields/object.js.map +1 -0
- package/admin/plugins/fields/ref.js +67 -40
- package/admin/plugins/fields/ref.js.map +1 -0
- package/admin/plugins/fields/richText.js +33 -18
- package/admin/plugins/fields/richText.js.map +1 -0
- package/admin/plugins/fields/text.js +38 -21
- package/admin/plugins/fields/text.js.map +1 -0
- package/admin/plugins/getObjectId.d.ts +3 -3
- package/admin/plugins/getObjectId.js +19 -12
- package/admin/plugins/getObjectId.js.map +1 -0
- package/admin/plugins/icons.js +33 -11
- package/admin/plugins/icons.js.map +1 -0
- package/admin/plugins/index.d.ts +1 -7
- package/admin/plugins/index.js +32 -14
- package/admin/plugins/index.js.map +1 -0
- package/admin/plugins/install.d.ts +22 -0
- package/admin/plugins/install.js +109 -56
- package/admin/plugins/install.js.map +1 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +11 -5
- package/admin/plugins/permissionRenderer/CmsPermissions.js +88 -55
- 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 +72 -47
- 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 +56 -35
- 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 +38 -20
- 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 +76 -49
- 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 +31 -12
- 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 +54 -21
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +3 -1
- package/admin/plugins/permissionRenderer/components/StyledComponents.js +14 -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 +17 -1
- package/admin/plugins/permissionRenderer/components/useCmsData.js +77 -44
- 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 +24 -9
- package/admin/plugins/permissionRenderer/index.js.map +1 -0
- package/admin/plugins/routes.js +66 -39
- package/admin/plugins/routes.js.map +1 -0
- package/admin/plugins/transformers/dateTransformer.js +146 -26
- package/admin/plugins/transformers/dateTransformer.js.map +1 -0
- package/admin/plugins/transformers/index.js +18 -5
- package/admin/plugins/transformers/index.js.map +1 -0
- package/admin/plugins/transformers/numberTransformer.js +11 -2
- 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/validators/dateGte.js +59 -14
- package/admin/plugins/validators/dateGte.js.map +1 -0
- package/admin/plugins/validators/dateLte.js +59 -14
- package/admin/plugins/validators/dateLte.js.map +1 -0
- package/admin/plugins/validators/gte.d.ts +2 -2
- package/admin/plugins/validators/gte.js +50 -8
- package/admin/plugins/validators/gte.js.map +1 -0
- package/admin/plugins/validators/in.d.ts +2 -2
- package/admin/plugins/validators/in.js +50 -8
- package/admin/plugins/validators/in.js.map +1 -0
- package/admin/plugins/validators/lte.d.ts +2 -2
- package/admin/plugins/validators/lte.js +50 -8
- package/admin/plugins/validators/lte.js.map +1 -0
- package/admin/plugins/validators/maxLength.d.ts +2 -2
- package/admin/plugins/validators/maxLength.js +50 -8
- package/admin/plugins/validators/maxLength.js.map +1 -0
- package/admin/plugins/validators/minLength.d.ts +2 -2
- package/admin/plugins/validators/minLength.js +50 -8
- package/admin/plugins/validators/minLength.js.map +1 -0
- package/admin/plugins/validators/pattern.d.ts +3 -9
- package/admin/plugins/validators/pattern.js +66 -23
- package/admin/plugins/validators/pattern.js.map +1 -0
- package/admin/plugins/validators/patternPlugins/email.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/email.js +10 -2
- package/admin/plugins/validators/patternPlugins/email.js.map +1 -0
- package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/lowerCase.js +10 -2
- package/admin/plugins/validators/patternPlugins/lowerCase.js.map +1 -0
- package/admin/plugins/validators/patternPlugins/lowerCaseSpace.d.ts +3 -0
- package/admin/plugins/validators/patternPlugins/lowerCaseSpace.js +17 -0
- package/admin/plugins/validators/patternPlugins/lowerCaseSpace.js.map +1 -0
- package/admin/plugins/validators/patternPlugins/upperCase.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/upperCase.js +10 -2
- package/admin/plugins/validators/patternPlugins/upperCase.js.map +1 -0
- package/admin/plugins/validators/patternPlugins/upperCaseSpace.d.ts +3 -0
- package/admin/plugins/validators/patternPlugins/upperCaseSpace.js +17 -0
- package/admin/plugins/validators/patternPlugins/upperCaseSpace.js.map +1 -0
- package/admin/plugins/validators/patternPlugins/url.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/url.js +10 -2
- package/admin/plugins/validators/patternPlugins/url.js.map +1 -0
- package/admin/plugins/validators/required.d.ts +2 -2
- package/admin/plugins/validators/required.js +14 -4
- package/admin/plugins/validators/required.js.map +1 -0
- package/admin/plugins/validators/timeGte.js +49 -9
- package/admin/plugins/validators/timeGte.js.map +1 -0
- package/admin/plugins/validators/timeLte.js +49 -9
- package/admin/plugins/validators/timeLte.js.map +1 -0
- package/admin/plugins/validators/unique.d.ts +7 -0
- package/admin/plugins/validators/unique.js +50 -0
- package/admin/plugins/validators/unique.js.map +1 -0
- package/admin/plugins/welcomeScreenWidget.js +23 -9
- package/admin/plugins/welcomeScreenWidget.js.map +1 -0
- package/admin/views/contentEntries/ContentEntries.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntries.js +67 -36
- package/admin/views/contentEntries/ContentEntries.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +16 -12
- package/admin/views/contentEntries/ContentEntriesContext.js +83 -38
- package/admin/views/contentEntries/ContentEntriesContext.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntriesList.js +142 -103
- 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 +129 -48
- 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 +35 -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 +107 -70
- 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 +38 -19
- 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 +138 -73
- 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 +31 -16
- 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 +106 -77
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/index.js +33 -14
- package/admin/views/contentEntries/ContentEntry/header/index.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.d.ts +1 -3
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +51 -28
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +1 -3
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +54 -29
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.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 +55 -33
- 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 +84 -56
- 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 +29 -14
- 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 +109 -40
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +31 -9
- package/admin/views/contentEntries/ContentEntry/useRevision.js +264 -176
- 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 +62 -39
- 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 +67 -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 +32 -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 +152 -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 +248 -0
- package/admin/views/contentEntries/experiment/Property.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntries.js +13 -4
- package/admin/views/contentEntries/hooks/useContentEntries.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +3 -6
- package/admin/views/contentEntries/hooks/useContentEntriesList.js +66 -45
- package/admin/views/contentEntries/hooks/useContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntry.js +19 -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 +34 -17
- package/admin/views/contentModelGroups/ContentModelGroups.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +128 -96
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +183 -112
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js.map +1 -0
- package/admin/views/contentModelGroups/DelayedOnChange.d.ts +29 -12
- package/admin/views/contentModelGroups/DelayedOnChange.js +62 -61
- package/admin/views/contentModelGroups/DelayedOnChange.js.map +1 -0
- package/admin/views/contentModelGroups/IconPicker.d.ts +3 -2
- package/admin/views/contentModelGroups/IconPicker.js +66 -35
- package/admin/views/contentModelGroups/IconPicker.js.map +1 -0
- package/admin/views/contentModelGroups/graphql.d.ts +68 -0
- package/admin/views/contentModelGroups/graphql.js +43 -7
- package/admin/views/contentModelGroups/graphql.js.map +1 -0
- package/admin/views/contentModels/CloneContentModelDialog.d.ts +11 -0
- package/admin/views/contentModels/CloneContentModelDialog.js +312 -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 +37 -24
- package/admin/views/contentModels/ContentModelEditor.js.map +1 -0
- package/admin/views/contentModels/ContentModels.d.ts +2 -2
- package/admin/views/contentModels/ContentModels.js +69 -28
- package/admin/views/contentModels/ContentModels.js.map +1 -0
- package/admin/views/contentModels/ContentModelsDataList.d.ts +6 -4
- package/admin/views/contentModels/ContentModelsDataList.js +172 -120
- package/admin/views/contentModels/ContentModelsDataList.js.map +1 -0
- package/admin/views/contentModels/NewContentModelDialog.d.ts +2 -2
- package/admin/views/contentModels/NewContentModelDialog.js +256 -123
- package/admin/views/contentModels/NewContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/cache.d.ts +12 -4
- package/admin/views/contentModels/cache.js +100 -31
- package/admin/views/contentModels/cache.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 +19 -20
- package/admin/views/utils.js.map +1 -0
- package/admin/viewsGraphql.d.ts +63 -0
- package/admin/viewsGraphql.js +49 -8
- package/admin/viewsGraphql.js.map +1 -0
- package/index.d.ts +11 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/package.json +48 -49
- package/types.d.ts +141 -40
- package/types.js +5 -1
- package/types.js.map +1 -0
- 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.d.ts +0 -4
- package/admin/plugins/menus.js +0 -19
|
@@ -4,7 +4,7 @@ import { FieldEditorProps } from "./FieldEditor";
|
|
|
4
4
|
import { DragObjectWithType, DragSourceMonitor } from "react-dnd";
|
|
5
5
|
interface DropTarget {
|
|
6
6
|
row: number;
|
|
7
|
-
index: number;
|
|
7
|
+
index: number | null;
|
|
8
8
|
}
|
|
9
9
|
interface Position {
|
|
10
10
|
row: number;
|
|
@@ -12,42 +12,87 @@ interface Position {
|
|
|
12
12
|
}
|
|
13
13
|
export interface DragSource extends DragObjectWithType {
|
|
14
14
|
parent?: string;
|
|
15
|
-
pos
|
|
15
|
+
pos?: Partial<Position>;
|
|
16
16
|
type: "row" | "field" | "newField";
|
|
17
17
|
fieldType?: string;
|
|
18
|
-
field?: CmsEditorField;
|
|
18
|
+
field?: CmsEditorField | null;
|
|
19
19
|
fields?: CmsEditorField[];
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Property in GetFieldParams can be any key from CmsEditorField, but TS does not allow union types
|
|
23
|
+
*/
|
|
24
|
+
interface GetFieldParams {
|
|
25
|
+
id?: string;
|
|
26
|
+
fieldId?: string;
|
|
27
|
+
}
|
|
28
|
+
interface InsertFieldParams {
|
|
29
|
+
field: CmsEditorField;
|
|
30
|
+
position: FieldLayoutPosition;
|
|
31
|
+
}
|
|
32
|
+
interface MoveFieldParams {
|
|
33
|
+
field: CmsEditorFieldId | CmsEditorField;
|
|
34
|
+
position: FieldLayoutPosition;
|
|
35
|
+
}
|
|
36
|
+
interface GetFieldsInLayoutCallable {
|
|
37
|
+
(): CmsEditorField[][];
|
|
38
|
+
}
|
|
39
|
+
interface GetFieldPluginCallable {
|
|
40
|
+
(type: string): CmsEditorFieldTypePlugin | undefined;
|
|
41
|
+
}
|
|
42
|
+
interface GetFieldCallable {
|
|
43
|
+
(query: GetFieldParams): CmsEditorField | undefined;
|
|
44
|
+
}
|
|
45
|
+
interface OnFieldDropCallable {
|
|
46
|
+
(source: Partial<DragSource>, target: DropTarget): void;
|
|
47
|
+
}
|
|
48
|
+
interface InsertFieldCallable {
|
|
49
|
+
(params: InsertFieldParams): void;
|
|
50
|
+
}
|
|
51
|
+
interface MoveFieldCallable {
|
|
52
|
+
(params: MoveFieldParams): void;
|
|
53
|
+
}
|
|
54
|
+
interface OnEndDragCallable {
|
|
55
|
+
(item: DragSource, monitor: DragSourceMonitor): void;
|
|
56
|
+
}
|
|
57
|
+
interface MoveRowCallable {
|
|
58
|
+
(source: number, destination: number): void;
|
|
59
|
+
}
|
|
60
|
+
interface UpdateFieldCallable {
|
|
61
|
+
(field: Pick<CmsEditorField, "id">): void;
|
|
62
|
+
}
|
|
63
|
+
interface DeleteFieldCallable {
|
|
64
|
+
(field: Pick<CmsEditorField, "id">): void;
|
|
65
|
+
}
|
|
66
|
+
interface IsVisibleCallable {
|
|
67
|
+
(item: DragSource): boolean;
|
|
68
|
+
}
|
|
69
|
+
interface NoConflictCallable {
|
|
70
|
+
(cb?: IsVisibleCallable): (item: DragSource) => boolean;
|
|
71
|
+
}
|
|
21
72
|
export interface FieldEditorContextValue {
|
|
22
73
|
fields: CmsEditorField[][];
|
|
23
|
-
noConflict:
|
|
74
|
+
noConflict: NoConflictCallable;
|
|
24
75
|
layout: CmsEditorFieldsLayout;
|
|
25
76
|
onChange?: (data: any) => void;
|
|
26
|
-
getFieldsInLayout:
|
|
27
|
-
getFieldPlugin:
|
|
28
|
-
getField:
|
|
29
|
-
editField: (field: CmsEditorField) => void;
|
|
30
|
-
field: CmsEditorField;
|
|
31
|
-
parent
|
|
77
|
+
getFieldsInLayout: GetFieldsInLayoutCallable;
|
|
78
|
+
getFieldPlugin: GetFieldPluginCallable;
|
|
79
|
+
getField: GetFieldCallable;
|
|
80
|
+
editField: (field: CmsEditorField | null) => void;
|
|
81
|
+
field: CmsEditorField | null;
|
|
82
|
+
parent?: CmsEditorField;
|
|
32
83
|
depth: number;
|
|
33
|
-
dropTarget
|
|
34
|
-
onFieldDrop:
|
|
35
|
-
onEndDrag:
|
|
36
|
-
insertField:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
field: CmsEditorFieldId | CmsEditorField;
|
|
42
|
-
position: FieldLayoutPosition;
|
|
43
|
-
}) => void;
|
|
44
|
-
moveRow: (source: number, destination: number) => void;
|
|
45
|
-
updateField: (field: CmsEditorField) => void;
|
|
46
|
-
deleteField: (field: CmsEditorField) => void;
|
|
84
|
+
dropTarget: DropTarget;
|
|
85
|
+
onFieldDrop: OnFieldDropCallable;
|
|
86
|
+
onEndDrag: OnEndDragCallable;
|
|
87
|
+
insertField: InsertFieldCallable;
|
|
88
|
+
moveField: MoveFieldCallable;
|
|
89
|
+
moveRow: MoveRowCallable;
|
|
90
|
+
updateField: UpdateFieldCallable;
|
|
91
|
+
deleteField: DeleteFieldCallable;
|
|
47
92
|
}
|
|
48
93
|
interface FieldEditorProviderProps extends FieldEditorProps {
|
|
49
94
|
children: React.ReactElement;
|
|
50
95
|
}
|
|
51
96
|
export declare const FieldEditorContext: React.Context<FieldEditorContextValue>;
|
|
52
|
-
export declare const FieldEditorProvider:
|
|
97
|
+
export declare const FieldEditorProvider: React.FC<FieldEditorProviderProps>;
|
|
53
98
|
export {};
|
|
@@ -1,15 +1,67 @@
|
|
|
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
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.FieldEditorProvider = exports.FieldEditorContext = void 0;
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _dotPropImmutable = _interopRequireDefault(require("dot-prop-immutable"));
|
|
19
|
+
|
|
20
|
+
var _useDeepCompareEffect = _interopRequireDefault(require("use-deep-compare-effect"));
|
|
21
|
+
|
|
22
|
+
var _plugins = require("@webiny/plugins");
|
|
23
|
+
|
|
24
|
+
var utils = _interopRequireWildcard(require("./utils"));
|
|
25
|
+
|
|
26
|
+
var _useFieldEditor = require("./useFieldEditor");
|
|
27
|
+
|
|
28
|
+
var _utils2 = require("@webiny/utils");
|
|
29
|
+
|
|
30
|
+
var FieldEditorContext = /*#__PURE__*/_react.default.createContext(
|
|
31
|
+
/**
|
|
32
|
+
* Safe to cast.
|
|
33
|
+
*/
|
|
34
|
+
{
|
|
35
|
+
field: null
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* We try to generate the random id string but with the check that it does not exist already.
|
|
39
|
+
* Chances that the same string exists are quite small, but let's check it anyway.
|
|
40
|
+
*
|
|
41
|
+
* In most cases, there will be no iterations anyway...
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
exports.FieldEditorContext = FieldEditorContext;
|
|
46
|
+
var maxGenerateIdIterations = 100;
|
|
47
|
+
|
|
48
|
+
var generateFieldId = function generateFieldId(layout) {
|
|
49
|
+
var id = (0, _utils2.generateAlphaNumericLowerCaseId)(8);
|
|
50
|
+
var iteration = 0;
|
|
51
|
+
|
|
52
|
+
while (layout.includes(id) && iteration < maxGenerateIdIterations) {
|
|
53
|
+
id = (0, _utils2.generateAlphaNumericLowerCaseId)(8);
|
|
54
|
+
iteration++;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (iteration >= maxGenerateIdIterations) {
|
|
58
|
+
throw new Error("Could not generate field ID in ".concat(maxGenerateIdIterations, " iterations."));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return id;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
13
65
|
var parent = _ref.parent,
|
|
14
66
|
fields = _ref.fields,
|
|
15
67
|
layout = _ref.layout,
|
|
@@ -19,30 +71,33 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
19
71
|
var depth = 0;
|
|
20
72
|
|
|
21
73
|
try {
|
|
22
|
-
var editor = useFieldEditor();
|
|
74
|
+
var editor = (0, _useFieldEditor.useFieldEditor)();
|
|
23
75
|
depth = editor.depth + 1;
|
|
24
76
|
} catch (_unused) {// There's no parent provider, so this is the top-level one.
|
|
25
77
|
}
|
|
26
78
|
|
|
27
|
-
var _useState = useState({
|
|
79
|
+
var _useState = (0, _react.useState)({
|
|
28
80
|
layout: layout,
|
|
29
81
|
fields: fields,
|
|
30
82
|
field: null,
|
|
31
|
-
dropTarget:
|
|
83
|
+
dropTarget: {
|
|
84
|
+
row: -1,
|
|
85
|
+
index: null
|
|
86
|
+
}
|
|
32
87
|
}),
|
|
33
|
-
_useState2 =
|
|
88
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
89
|
state = _useState2[0],
|
|
35
90
|
setState = _useState2[1];
|
|
36
91
|
|
|
37
|
-
|
|
92
|
+
(0, _useDeepCompareEffect.default)(function () {
|
|
38
93
|
onChange({
|
|
39
94
|
fields: state.fields,
|
|
40
95
|
layout: state.layout
|
|
41
96
|
});
|
|
42
97
|
}, [state.fields, state.layout]);
|
|
43
|
-
var editField = useCallback(function (field) {
|
|
98
|
+
var editField = (0, _react.useCallback)(function (field) {
|
|
44
99
|
setState(function (state) {
|
|
45
|
-
return
|
|
100
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
46
101
|
field: field
|
|
47
102
|
});
|
|
48
103
|
});
|
|
@@ -50,12 +105,13 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
50
105
|
var onDropTarget = {
|
|
51
106
|
dropTarget: parent ? parent.fieldId : null
|
|
52
107
|
};
|
|
53
|
-
var onFieldDrop = useCallback(function (source, dropTarget) {
|
|
108
|
+
var onFieldDrop = (0, _react.useCallback)(function (source, dropTarget) {
|
|
54
109
|
var pos = source.pos,
|
|
55
110
|
type = source.type,
|
|
56
111
|
fieldType = source.fieldType,
|
|
57
112
|
field = source.field,
|
|
58
|
-
fields = source.fields
|
|
113
|
+
_source$fields = source.fields,
|
|
114
|
+
fields = _source$fields === void 0 ? [] : _source$fields;
|
|
59
115
|
var parentId = parent ? parent.fieldId : null;
|
|
60
116
|
|
|
61
117
|
if (type === "row") {
|
|
@@ -70,7 +126,7 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
70
126
|
}
|
|
71
127
|
});
|
|
72
128
|
});
|
|
73
|
-
} else {
|
|
129
|
+
} else if (pos && pos.row !== undefined) {
|
|
74
130
|
// We're dragging a row within the same fieldset
|
|
75
131
|
moveRow(pos.row, dropTarget.row);
|
|
76
132
|
}
|
|
@@ -80,6 +136,10 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
80
136
|
|
|
81
137
|
|
|
82
138
|
if (pos) {
|
|
139
|
+
if (!field) {
|
|
140
|
+
return onDropTarget;
|
|
141
|
+
}
|
|
142
|
+
|
|
83
143
|
if (parentId !== source.parent) {
|
|
84
144
|
// We're dragging an existing field from another fieldset
|
|
85
145
|
insertField({
|
|
@@ -97,13 +157,27 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
97
157
|
return onDropTarget;
|
|
98
158
|
}
|
|
99
159
|
|
|
160
|
+
if (!fieldType) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
|
|
100
164
|
var plugin = getFieldPlugin(fieldType);
|
|
165
|
+
|
|
166
|
+
if (!plugin) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* TODO @ts-refactor figure out better type for this.
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
|
|
101
174
|
editField(plugin.field.createField());
|
|
102
175
|
setState(function (state) {
|
|
103
|
-
return
|
|
176
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
104
177
|
dropTarget: dropTarget
|
|
105
178
|
});
|
|
106
179
|
});
|
|
180
|
+
return null;
|
|
107
181
|
}, []);
|
|
108
182
|
|
|
109
183
|
var onEndDrag = function onEndDrag(_ref2, monitor) {
|
|
@@ -125,7 +199,7 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
125
199
|
return;
|
|
126
200
|
}
|
|
127
201
|
|
|
128
|
-
var removeFields = type === "row" ? fields : [field];
|
|
202
|
+
var removeFields = type === "row" ? fields || [] : field ? [field] : [];
|
|
129
203
|
removeFields.forEach(function (field) {
|
|
130
204
|
return deleteField(field);
|
|
131
205
|
});
|
|
@@ -133,17 +207,17 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
133
207
|
|
|
134
208
|
var getFieldsInLayout = function getFieldsInLayout() {
|
|
135
209
|
// Replace every field ID with actual field object.
|
|
136
|
-
|
|
210
|
+
return state.layout.filter(function (arr) {
|
|
137
211
|
return arr.length;
|
|
138
|
-
}))
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
id: fieldId
|
|
212
|
+
}).map(function (row) {
|
|
213
|
+
return row.map(function (id) {
|
|
214
|
+
return getField({
|
|
215
|
+
id: id
|
|
143
216
|
});
|
|
144
|
-
});
|
|
217
|
+
}).filter(Boolean);
|
|
218
|
+
}).filter(function (row) {
|
|
219
|
+
return row.length > 0;
|
|
145
220
|
});
|
|
146
|
-
return fields;
|
|
147
221
|
};
|
|
148
222
|
/**
|
|
149
223
|
* Return field plugin.
|
|
@@ -151,9 +225,8 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
151
225
|
|
|
152
226
|
|
|
153
227
|
var getFieldPlugin = function getFieldPlugin(type) {
|
|
154
|
-
return plugins.byType("cms-editor-field-type").find(function (
|
|
155
|
-
|
|
156
|
-
return field.type === type;
|
|
228
|
+
return _plugins.plugins.byType("cms-editor-field-type").find(function (plugin) {
|
|
229
|
+
return plugin.field.type === type;
|
|
157
230
|
});
|
|
158
231
|
};
|
|
159
232
|
/**
|
|
@@ -165,11 +238,13 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
165
238
|
return state.fields.find(function (field) {
|
|
166
239
|
for (var key in query) {
|
|
167
240
|
if (!(key in field)) {
|
|
168
|
-
return
|
|
169
|
-
}
|
|
241
|
+
return false;
|
|
242
|
+
} // TODO @ts-refactor figure if there is a way to fix this.
|
|
243
|
+
// @ts-ignore
|
|
244
|
+
|
|
170
245
|
|
|
171
246
|
if (field[key] !== query[key]) {
|
|
172
|
-
return
|
|
247
|
+
return false;
|
|
173
248
|
}
|
|
174
249
|
}
|
|
175
250
|
|
|
@@ -181,12 +256,12 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
181
256
|
*/
|
|
182
257
|
|
|
183
258
|
|
|
184
|
-
var insertField = function insertField(
|
|
185
|
-
var field =
|
|
186
|
-
position =
|
|
259
|
+
var insertField = function insertField(_ref3) {
|
|
260
|
+
var field = _ref3.field,
|
|
261
|
+
position = _ref3.position;
|
|
187
262
|
|
|
188
263
|
if (!field.id) {
|
|
189
|
-
field.id =
|
|
264
|
+
field.id = generateFieldId(layout.flat());
|
|
190
265
|
}
|
|
191
266
|
|
|
192
267
|
if (!field.type) {
|
|
@@ -199,19 +274,15 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
199
274
|
throw new Error("Invalid field \"type\".");
|
|
200
275
|
}
|
|
201
276
|
|
|
202
|
-
setState(function (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return fields.concat(field);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return [field];
|
|
277
|
+
setState(function (prev) {
|
|
278
|
+
var next = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
279
|
+
fields: (prev.fields || []).concat(field)
|
|
209
280
|
}); // Move field to position where it was dropped.
|
|
210
281
|
|
|
211
282
|
return utils.moveField({
|
|
212
283
|
field: field,
|
|
213
284
|
position: position,
|
|
214
|
-
data:
|
|
285
|
+
data: next
|
|
215
286
|
});
|
|
216
287
|
});
|
|
217
288
|
};
|
|
@@ -220,9 +291,9 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
220
291
|
*/
|
|
221
292
|
|
|
222
293
|
|
|
223
|
-
var moveField = function moveField(
|
|
224
|
-
var field =
|
|
225
|
-
position =
|
|
294
|
+
var moveField = function moveField(_ref4) {
|
|
295
|
+
var field = _ref4.field,
|
|
296
|
+
position = _ref4.position;
|
|
226
297
|
setState(function (data) {
|
|
227
298
|
return utils.moveField({
|
|
228
299
|
field: field,
|
|
@@ -254,9 +325,11 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
254
325
|
setState(function (data) {
|
|
255
326
|
for (var i = 0; i < data.fields.length; i++) {
|
|
256
327
|
if (data.fields[i].id === field.id) {
|
|
257
|
-
return
|
|
328
|
+
return _dotPropImmutable.default.set(data, "fields.".concat(i), field);
|
|
258
329
|
}
|
|
259
330
|
}
|
|
331
|
+
|
|
332
|
+
return data;
|
|
260
333
|
});
|
|
261
334
|
};
|
|
262
335
|
/**
|
|
@@ -273,19 +346,23 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
273
346
|
});
|
|
274
347
|
};
|
|
275
348
|
|
|
276
|
-
var noConflict = useCallback(function (isVisible) {
|
|
349
|
+
var noConflict = (0, _react.useCallback)(function (isVisible) {
|
|
277
350
|
return function (item) {
|
|
278
351
|
var sameParent = item.parent === onDropTarget.dropTarget;
|
|
279
352
|
var draggedFields = [];
|
|
280
353
|
|
|
281
354
|
switch (item.type) {
|
|
282
355
|
case "row":
|
|
283
|
-
item.fields.forEach(function (field) {
|
|
356
|
+
(item.fields || []).forEach(function (field) {
|
|
284
357
|
return draggedFields.push(field.fieldId);
|
|
285
358
|
});
|
|
286
359
|
break;
|
|
287
360
|
|
|
288
361
|
case "field":
|
|
362
|
+
if (!item.field) {
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
|
|
289
366
|
draggedFields.push(item.field.fieldId);
|
|
290
367
|
break;
|
|
291
368
|
|
|
@@ -324,7 +401,9 @@ export var FieldEditorProvider = function FieldEditorProvider(_ref) {
|
|
|
324
401
|
noConflict: noConflict,
|
|
325
402
|
layout: state.layout
|
|
326
403
|
};
|
|
327
|
-
return /*#__PURE__*/
|
|
404
|
+
return /*#__PURE__*/_react.default.createElement(FieldEditorContext.Provider, {
|
|
328
405
|
value: value
|
|
329
406
|
}, children);
|
|
330
|
-
};
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
exports.FieldEditorProvider = FieldEditorProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FieldEditorContext","React","createContext","field","maxGenerateIdIterations","generateFieldId","layout","id","generateAlphaNumericLowerCaseId","iteration","includes","Error","FieldEditorProvider","parent","fields","onChange","children","depth","editor","useFieldEditor","useState","dropTarget","row","index","state","setState","useDeepCompareEffect","editField","useCallback","onDropTarget","fieldId","onFieldDrop","source","pos","type","fieldType","parentId","forEach","insertField","position","undefined","moveRow","moveField","plugin","getFieldPlugin","createField","onEndDrag","monitor","didDrop","getDropResult","removeFields","deleteField","getFieldsInLayout","filter","arr","length","map","getField","Boolean","plugins","byType","find","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 CmsEditorField,\n CmsEditorFieldId,\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 { useFieldEditor } from \"~/admin/components/FieldEditor/useFieldEditor\";\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?: CmsEditorField | null;\n fields?: CmsEditorField[];\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: CmsEditorField;\n position: FieldLayoutPosition;\n}\ninterface MoveFieldParams {\n field: CmsEditorFieldId | CmsEditorField;\n position: FieldLayoutPosition;\n}\ninterface GetFieldsInLayoutCallable {\n (): CmsEditorField[][];\n}\ninterface GetFieldPluginCallable {\n (type: string): CmsEditorFieldTypePlugin | undefined;\n}\ninterface GetFieldCallable {\n (query: GetFieldParams): CmsEditorField | 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: Pick<CmsEditorField, \"id\">): void;\n}\ninterface DeleteFieldCallable {\n (field: Pick<CmsEditorField, \"id\">): void;\n}\ninterface IsVisibleCallable {\n (item: DragSource): boolean;\n}\ninterface NoConflictCallable {\n (cb?: IsVisibleCallable): (item: DragSource) => boolean;\n}\nexport interface FieldEditorContextValue {\n fields: CmsEditorField[][];\n noConflict: NoConflictCallable;\n layout: CmsEditorFieldsLayout;\n onChange?: (data: any) => void;\n getFieldsInLayout: GetFieldsInLayoutCallable;\n getFieldPlugin: GetFieldPluginCallable;\n getField: GetFieldCallable;\n editField: (field: CmsEditorField | null) => void;\n field: CmsEditorField | null;\n parent?: CmsEditorField;\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<FieldEditorContextValue>(\n /**\n * Safe to cast.\n */\n {\n field: null\n } as unknown as FieldEditorContextValue\n);\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: CmsEditorField[];\n field: CmsEditorField | 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 = useFieldEditor();\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: CmsEditorField | 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 * TODO @ts-refactor figure out better type for this.\n */\n editField(plugin.field.createField() as CmsEditorField);\n setState(state => ({\n ...state,\n 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 CmsEditorField[][];\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 /**\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(`Invalid 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 = {\n parent,\n depth,\n getFieldsInLayout,\n getFieldPlugin,\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;;AAQA;;AACA;;AAGA;;AACA;;AAkGO,IAAMA,k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MAAM,CAAC0C,GAAP,CAAW,UAAA2B,CAAC;IAAA,OAAIA,CAAC,CAACrD,OAAN;EAAA,CAAZ,EAA2BsD,IAA3B,CAAgC,GAAhC,CAAD,CA5BmC,CAAvC;EA+BA,IAAMC,KAAK,GAAG;IACVxE,MAAM,EAANA,MADU;IAEVI,KAAK,EAALA,KAFU;IAGVmC,iBAAiB,EAAjBA,iBAHU;IAIVR,cAAc,EAAdA,cAJU;IAKVa,QAAQ,EAARA,QALU;IAMV9B,SAAS,EAATA,SANU;IAOVxB,KAAK,EAAEqB,KAAK,CAACrB,KAPH;IAQVkB,UAAU,EAAEG,KAAK,CAACH,UARR;IASVU,WAAW,EAAXA,WATU;IAUVe,SAAS,EAATA,SAVU;IAWVR,WAAW,EAAXA,WAXU;IAYVI,SAAS,EAATA,SAZU;IAaVD,OAAO,EAAPA,OAbU;IAcV+B,WAAW,EAAXA,WAdU;IAeVrB,WAAW,EAAXA,WAfU;IAgBVrC,MAAM,EAAEsC,iBAAiB,EAhBf;IAiBVwB,UAAU,EAAVA,UAjBU;IAkBVtE,MAAM,EAAEkB,KAAK,CAAClB;EAlBJ,CAAd;EAqBA,oBAAO,6BAAC,kBAAD,CAAoB,QAApB;IAA6B,KAAK,EAAE+E;EAApC,GAA4CrE,QAA5C,CAAP;AACH,CAvRM"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/// <reference types="web" />
|
|
3
|
+
/// <reference types="react" />
|
|
4
|
+
export declare const RowContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
5
|
+
export declare const Row: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
4
6
|
export declare const fieldContainer: string;
|
|
5
7
|
export declare const rowHandle: string;
|
|
6
8
|
export declare const fieldHandle: string;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.rowHandle = exports.fieldHandle = exports.fieldContainer = exports.RowContainer = exports.Row = void 0;
|
|
9
|
+
|
|
10
|
+
var _emotion = require("emotion");
|
|
11
|
+
|
|
12
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
|
+
|
|
14
|
+
var RowContainer = /*#__PURE__*/(0, _styled.default)("div", {
|
|
4
15
|
target: "e1pk1rsi0",
|
|
5
16
|
label: "RowContainer"
|
|
6
17
|
})({
|
|
@@ -13,7 +24,8 @@ export var RowContainer = /*#__PURE__*/styled("div", {
|
|
|
13
24
|
border: "1px solid var(--mdc-theme-on-background)",
|
|
14
25
|
boxShadow: "var(--mdc-theme-on-background) 1px 1px 1px, var(--mdc-theme-on-background) 1px 1px 2px"
|
|
15
26
|
});
|
|
16
|
-
|
|
27
|
+
exports.RowContainer = RowContainer;
|
|
28
|
+
var Row = /*#__PURE__*/(0, _styled.default)("div", {
|
|
17
29
|
target: "e1pk1rsi1",
|
|
18
30
|
label: "Row"
|
|
19
31
|
})({
|
|
@@ -24,7 +36,8 @@ export var Row = /*#__PURE__*/styled("div", {
|
|
|
24
36
|
paddingRight: 10,
|
|
25
37
|
position: "relative"
|
|
26
38
|
});
|
|
27
|
-
|
|
39
|
+
exports.Row = Row;
|
|
40
|
+
var fieldContainer = /*#__PURE__*/(0, _emotion.css)({
|
|
28
41
|
position: "relative",
|
|
29
42
|
flex: "1 100%",
|
|
30
43
|
backgroundColor: "var(--mdc-theme-background)",
|
|
@@ -39,7 +52,8 @@ export var fieldContainer = /*#__PURE__*/css({
|
|
|
39
52
|
boxShadow: "var(--mdc-theme-on-background) 1px 1px 1px, var(--mdc-theme-on-background) 1px 1px 2px"
|
|
40
53
|
}
|
|
41
54
|
}, "label:fieldContainer;");
|
|
42
|
-
|
|
55
|
+
exports.fieldContainer = fieldContainer;
|
|
56
|
+
var rowHandle = /*#__PURE__*/(0, _emotion.css)({
|
|
43
57
|
width: 30,
|
|
44
58
|
cursor: "grab",
|
|
45
59
|
position: "absolute",
|
|
@@ -49,6 +63,8 @@ export var rowHandle = /*#__PURE__*/css({
|
|
|
49
63
|
zIndex: 1,
|
|
50
64
|
color: "var(--mdc-theme-on-surface)"
|
|
51
65
|
}, "label:rowHandle;");
|
|
52
|
-
|
|
66
|
+
exports.rowHandle = rowHandle;
|
|
67
|
+
var fieldHandle = /*#__PURE__*/(0, _emotion.css)({
|
|
53
68
|
cursor: "grab"
|
|
54
|
-
}, "label:fieldHandle;");
|
|
69
|
+
}, "label:fieldHandle;");
|
|
70
|
+
exports.fieldHandle = fieldHandle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RowContainer","styled","position","display","flexDirection","marginBottom","borderRadius","backgroundColor","border","boxShadow","Row","paddingLeft","paddingRight","fieldContainer","css","flex","padding","margin","transition","color","cursor","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 flexDirection: \"column\",\n marginBottom: 20,\n borderRadius: 2,\n backgroundColor: \"var(--mdc-theme-surface)\",\n border: \"1px solid var(--mdc-theme-on-background)\",\n boxShadow:\n \"var(--mdc-theme-on-background) 1px 1px 1px, var(--mdc-theme-on-background) 1px 1px 2px\"\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: \"0 15px\",\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,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EACtCC,QAAQ,EAAE,UAD4B;EAEtCC,OAAO,EAAE,MAF6B;EAGtCC,aAAa,EAAE,QAHuB;EAItCC,YAAY,EAAE,EAJwB;EAKtCC,YAAY,EAAE,CALwB;EAMtCC,eAAe,EAAE,0BANqB;EAOtCC,MAAM,EAAE,0CAP8B;EAQtCC,SAAS,EACL;AATkC,CAAjB,CAAlB;;AAYA,IAAMC,GAAG,oBAAGT,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EAC7BE,OAAO,EAAE,MADoB;EAE7BC,aAAa,EAAE,KAFc;EAG7BG,eAAe,EAAE,0BAHY;EAI7BI,WAAW,EAAE,EAJgB;EAK7BC,YAAY,EAAE,EALe;EAM7BV,QAAQ,EAAE;AANmB,CAAjB,CAAT;;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