@webiny/app-headless-cms 0.0.0-ee-vpcs.549378cf03
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 +66 -0
- package/HeadlessCMS.js.map +1 -0
- package/LICENSE +21 -0
- package/README.md +18 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +8 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.js +189 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +7 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +82 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js.map +1 -0
- package/admin/components/ContentEntryForm/Fields.d.ts +11 -0
- package/admin/components/ContentEntryForm/Fields.js +46 -0
- package/admin/components/ContentEntryForm/Fields.js.map +1 -0
- package/admin/components/ContentEntryForm/Label.d.ts +3 -0
- package/admin/components/ContentEntryForm/Label.js +34 -0
- package/admin/components/ContentEntryForm/Label.js.map +1 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +9 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.js +60 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/getValue.d.ts +9 -0
- package/admin/components/ContentEntryForm/functions/getValue.js +29 -0
- package/admin/components/ContentEntryForm/functions/getValue.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/setValue.d.ts +10 -0
- package/admin/components/ContentEntryForm/functions/setValue.js +32 -0
- package/admin/components/ContentEntryForm/functions/setValue.js.map +1 -0
- package/admin/components/ContentEntryForm/useBind.d.ts +10 -0
- package/admin/components/ContentEntryForm/useBind.js +118 -0
- package/admin/components/ContentEntryForm/useBind.js.map +1 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.d.ts +20 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.js +561 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.d.ts +2 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.js +16 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.js.map +1 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.d.ts +40 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js +323 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js.map +1 -0
- package/admin/components/ContentModelEditor/Editor.d.ts +4 -0
- package/admin/components/ContentModelEditor/Editor.js +175 -0
- package/admin/components/ContentModelEditor/Editor.js.map +1 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +6 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.js +109 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.js.map +1 -0
- package/admin/components/ContentModelEditor/Header.d.ts +3 -0
- package/admin/components/ContentModelEditor/Header.js +41 -0
- package/admin/components/ContentModelEditor/Header.js.map +1 -0
- package/admin/components/ContentModelEditor/PreviewTab.d.ts +2 -0
- package/admin/components/ContentModelEditor/PreviewTab.js +55 -0
- package/admin/components/ContentModelEditor/PreviewTab.js.map +1 -0
- package/admin/components/ContentModelEditor/icons/round-assignment-24px.svg +4 -0
- package/admin/components/ContentModelEditor/icons/round-drag_indicator-24px.svg +4 -0
- package/admin/components/ContentModelEditor/index.d.ts +2 -0
- package/admin/components/ContentModelEditor/index.js +31 -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 +22 -0
- package/admin/components/ContentModelEditor/useModelEditor.js.map +1 -0
- package/admin/components/DelayedOnChange.d.ts +42 -0
- package/admin/components/DelayedOnChange.js +135 -0
- package/admin/components/DelayedOnChange.js.map +1 -0
- package/admin/components/Dialog.d.ts +4 -0
- package/admin/components/Dialog.js +32 -0
- package/admin/components/Dialog.js.map +1 -0
- package/admin/components/DragPreview.d.ts +3 -0
- package/admin/components/DragPreview.js +120 -0
- package/admin/components/DragPreview.js.map +1 -0
- package/admin/components/Draggable.d.ts +17 -0
- package/admin/components/Draggable.js +66 -0
- package/admin/components/Draggable.js.map +1 -0
- package/admin/components/DropZone/Center.d.ts +13 -0
- package/admin/components/DropZone/Center.js +71 -0
- package/admin/components/DropZone/Center.js.map +1 -0
- package/admin/components/DropZone/Horizontal.d.ts +11 -0
- package/admin/components/DropZone/Horizontal.js +97 -0
- package/admin/components/DropZone/Horizontal.js.map +1 -0
- package/admin/components/DropZone/Vertical.d.ts +10 -0
- package/admin/components/DropZone/Vertical.js +93 -0
- package/admin/components/DropZone/Vertical.js.map +1 -0
- package/admin/components/DropZone/index.d.ts +4 -0
- package/admin/components/DropZone/index.js +31 -0
- package/admin/components/DropZone/index.js.map +1 -0
- package/admin/components/Droppable.d.ts +34 -0
- package/admin/components/Droppable.js +72 -0
- package/admin/components/Droppable.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +3 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +118 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +3 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +167 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +3 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +106 -0
- 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 +42 -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 +227 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +8 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +26 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +9 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +31 -0
- 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 +115 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +9 -0
- package/admin/components/FieldEditor/EditFieldDialog.js +182 -0
- package/admin/components/FieldEditor/EditFieldDialog.js.map +1 -0
- package/admin/components/FieldEditor/Field.d.ts +10 -0
- package/admin/components/FieldEditor/Field.js +238 -0
- package/admin/components/FieldEditor/Field.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditor.d.ts +12 -0
- package/admin/components/FieldEditor/FieldEditor.js +249 -0
- package/admin/components/FieldEditor/FieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +102 -0
- package/admin/components/FieldEditor/FieldEditorContext.js +416 -0
- package/admin/components/FieldEditor/FieldEditorContext.js.map +1 -0
- package/admin/components/FieldEditor/Styled.d.ts +8 -0
- package/admin/components/FieldEditor/Styled.js +61 -0
- package/admin/components/FieldEditor/Styled.js.map +1 -0
- package/admin/components/FieldEditor/index.d.ts +2 -0
- package/admin/components/FieldEditor/index.js +21 -0
- package/admin/components/FieldEditor/index.js.map +1 -0
- package/admin/components/FieldEditor/useModelFieldEditor.d.ts +2 -0
- package/admin/components/FieldEditor/useModelFieldEditor.js +20 -0
- package/admin/components/FieldEditor/useModelFieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/utils/deleteField.d.ts +8 -0
- package/admin/components/FieldEditor/utils/deleteField.js +52 -0
- package/admin/components/FieldEditor/utils/deleteField.js.map +1 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +7 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.js +30 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.js.map +1 -0
- package/admin/components/FieldEditor/utils/index.d.ts +4 -0
- package/admin/components/FieldEditor/utils/index.js +39 -0
- package/admin/components/FieldEditor/utils/index.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveField.d.ts +8 -0
- package/admin/components/FieldEditor/utils/moveField.js +67 -0
- package/admin/components/FieldEditor/utils/moveField.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveRow.d.ts +8 -0
- package/admin/components/FieldEditor/utils/moveRow.js +23 -0
- package/admin/components/FieldEditor/utils/moveRow.js.map +1 -0
- package/admin/components/IconPicker.d.ts +7 -0
- package/admin/components/IconPicker.js +238 -0
- package/admin/components/IconPicker.js.map +1 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.d.ts +36 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.js +24 -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 +31 -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 +42 -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 +24 -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 +31 -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 +25 -0
- package/admin/components/ModelProvider/useModel.js.map +1 -0
- package/admin/constants/statusLabels.d.ts +2 -0
- package/admin/constants/statusLabels.js +24 -0
- package/admin/constants/statusLabels.js.map +1 -0
- package/admin/contexts/Cms/NetworkError.d.ts +2 -0
- package/admin/contexts/Cms/NetworkError.js +17 -0
- package/admin/contexts/Cms/NetworkError.js.map +1 -0
- package/admin/contexts/Cms/index.d.ts +75 -0
- package/admin/contexts/Cms/index.js +169 -0
- package/admin/contexts/Cms/index.js.map +1 -0
- package/admin/elements/ContentGroupMenuElement.d.ts +3 -0
- package/admin/elements/ContentGroupMenuElement.js +34 -0
- package/admin/elements/ContentGroupMenuElement.js.map +1 -0
- package/admin/elements/ContentModelMenuElement.d.ts +3 -0
- package/admin/elements/ContentModelMenuElement.js +34 -0
- package/admin/elements/ContentModelMenuElement.js.map +1 -0
- package/admin/elements/NothingToShowElement.d.ts +15 -0
- package/admin/elements/NothingToShowElement.js +109 -0
- package/admin/elements/NothingToShowElement.js.map +1 -0
- package/admin/graphql/contentEntries.d.ts +146 -0
- package/admin/graphql/contentEntries.js +153 -0
- package/admin/graphql/contentEntries.js.map +1 -0
- package/admin/graphql/contentModels.d.ts +32 -0
- package/admin/graphql/contentModels.js +34 -0
- package/admin/graphql/contentModels.js.map +1 -0
- package/admin/graphql/createFieldsList.d.ts +7 -0
- package/admin/graphql/createFieldsList.js +38 -0
- package/admin/graphql/createFieldsList.js.map +1 -0
- package/admin/hooks/index.d.ts +11 -0
- package/admin/hooks/index.js +113 -0
- package/admin/hooks/index.js.map +1 -0
- package/admin/hooks/useApolloClient.d.ts +3 -0
- package/admin/hooks/useApolloClient.js +20 -0
- package/admin/hooks/useApolloClient.js.map +1 -0
- package/admin/hooks/useCms.d.ts +3 -0
- package/admin/hooks/useCms.js +23 -0
- package/admin/hooks/useCms.js.map +1 -0
- package/admin/hooks/useLazyQuery.d.ts +5 -0
- package/admin/hooks/useLazyQuery.js +28 -0
- package/admin/hooks/useLazyQuery.js.map +1 -0
- package/admin/hooks/useMutation.d.ts +5 -0
- package/admin/hooks/useMutation.js +28 -0
- package/admin/hooks/useMutation.js.map +1 -0
- package/admin/hooks/usePermission.d.ts +26 -0
- package/admin/hooks/usePermission.js +206 -0
- package/admin/hooks/usePermission.js.map +1 -0
- package/admin/hooks/useQuery.d.ts +5 -0
- package/admin/hooks/useQuery.js +29 -0
- 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/add.svg +5 -0
- package/admin/icons/arrow_forward-24px.svg +1 -0
- package/admin/icons/baseline-autorenew-24px.svg +4 -0
- package/admin/icons/beenhere.svg +1 -0
- package/admin/icons/call_split-24px.svg +4 -0
- package/admin/icons/clone.svg +14 -0
- package/admin/icons/close.svg +13 -0
- package/admin/icons/delete.svg +12 -0
- package/admin/icons/devices_other-black-24px.svg +1 -0
- package/admin/icons/done-24px.svg +1 -0
- package/admin/icons/draft.svg +3 -0
- package/admin/icons/edit.svg +17 -0
- package/admin/icons/emoji_people-24px.svg +1 -0
- package/admin/icons/gesture.svg +1 -0
- package/admin/icons/help_outline.svg +1 -0
- package/admin/icons/how_to_vote-24px.svg +4 -0
- package/admin/icons/info.svg +1 -0
- package/admin/icons/lock.svg +1 -0
- package/admin/icons/more_vert.svg +12 -0
- package/admin/icons/publish.svg +1 -0
- package/admin/icons/published.svg +3 -0
- package/admin/icons/round-arrow_drop_down-24px.svg +12 -0
- package/admin/icons/round-drag_indicator-24px.svg +4 -0
- package/admin/icons/round-translate-24px.svg +4 -0
- package/admin/icons/rule-24px.svg +1 -0
- package/admin/icons/title-24px.svg +1 -0
- package/admin/icons/unpublish.svg +4 -0
- package/admin/icons/unpublished.svg +3 -0
- package/admin/icons/view_list.svg +1 -0
- package/admin/icons/visibility.svg +16 -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/menus/GlobalSearchPlugins.d.ts +9 -0
- package/admin/menus/GlobalSearchPlugins.js +69 -0
- package/admin/menus/GlobalSearchPlugins.js.map +1 -0
- package/admin/menus/NothingToShowElement.d.ts +2 -0
- package/admin/menus/NothingToShowElement.js +60 -0
- package/admin/menus/NothingToShowElement.js.map +1 -0
- package/admin/plugins/apiInformation/index.d.ts +3 -0
- package/admin/plugins/apiInformation/index.js +75 -0
- package/admin/plugins/apiInformation/index.js.map +1 -0
- package/admin/plugins/apiInformation/placeholder.manage.graphql +18 -0
- package/admin/plugins/apiInformation/placeholder.preview.graphql +15 -0
- package/admin/plugins/apiInformation/placeholder.read.graphql +16 -0
- package/admin/plugins/arrayUtils.d.ts +12 -0
- package/admin/plugins/arrayUtils.js +53 -0
- package/admin/plugins/arrayUtils.js.map +1 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.d.ts +21 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +73 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.d.ts +10 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +49 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/editor/defaultBar/BackButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/BackButton.js +40 -0
- package/admin/plugins/editor/defaultBar/BackButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.js +65 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Divider.d.ts +5 -0
- package/admin/plugins/editor/defaultBar/Divider.js +22 -0
- package/admin/plugins/editor/defaultBar/Divider.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +6 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js +128 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +43 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +7 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +62 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.d.ts +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.js +15 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/Name.d.ts +7 -0
- package/admin/plugins/editor/defaultBar/Name/Name.js +102 -0
- package/admin/plugins/editor/defaultBar/Name/Name.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +7 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js +63 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/index.d.ts +1 -0
- package/admin/plugins/editor/defaultBar/Name/index.js +13 -0
- package/admin/plugins/editor/defaultBar/Name/index.js.map +1 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js +89 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/icons/more_vert.svg +12 -0
- package/admin/plugins/editor/defaultBar/icons/round-arrow_back-24px.svg +13 -0
- package/admin/plugins/editor/defaultBar/icons/round-arrow_drop_down-24px.svg +12 -0
- package/admin/plugins/editor/defaultBar/icons/settings.svg +25 -0
- package/admin/plugins/editor/defaultBar/index.d.ts +7 -0
- package/admin/plugins/editor/defaultBar/index.js +61 -0
- package/admin/plugins/editor/defaultBar/index.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.d.ts +7 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js +59 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.d.ts +3 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.js +47 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.js.map +1 -0
- package/admin/plugins/editor/formSettings/icons/round-settings-24px.svg +1 -0
- package/admin/plugins/editor/formSettings/index.d.ts +3 -0
- package/admin/plugins/editor/formSettings/index.js +29 -0
- 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 +9 -0
- package/admin/plugins/fieldRenderers/Accordion.js +147 -0
- package/admin/plugins/fieldRenderers/Accordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +24 -0
- package/admin/plugins/fieldRenderers/DynamicSection.js +121 -0
- package/admin/plugins/fieldRenderers/DynamicSection.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.d.ts +3 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +50 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/boolean/index.js +13 -0
- package/admin/plugins/fieldRenderers/boolean/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/checkboxes.d.ts +3 -0
- package/admin/plugins/fieldRenderers/checkboxes.js +70 -0
- 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 +9 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +229 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +9 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +192 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +15 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.js +40 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +10 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.js +24 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.js +85 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +73 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +106 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/dateTime/index.js +15 -0
- package/admin/plugins/fieldRenderers/dateTime/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +18 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.js +226 -0
- 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 +107 -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 +139 -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 +68 -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 +63 -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 +53 -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 +22 -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 +66 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/File.d.ts +15 -0
- package/admin/plugins/fieldRenderers/file/File.js +103 -0
- package/admin/plugins/fieldRenderers/file/File.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileField.d.ts +3 -0
- package/admin/plugins/fieldRenderers/file/fileField.js +76 -0
- package/admin/plugins/fieldRenderers/file/fileField.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileFields.d.ts +3 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js +155 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/file/index.js +15 -0
- package/admin/plugins/fieldRenderers/file/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/utils.d.ts +12 -0
- package/admin/plugins/fieldRenderers/file/utils.js +68 -0
- package/admin/plugins/fieldRenderers/file/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/longText/index.js +15 -0
- package/admin/plugins/fieldRenderers/longText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longText.d.ts +3 -0
- package/admin/plugins/fieldRenderers/longText/longText.js +52 -0
- package/admin/plugins/fieldRenderers/longText/longText.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.d.ts +3 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.js +60 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/number/index.js +15 -0
- package/admin/plugins/fieldRenderers/number/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js +55 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.js +66 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.d.ts +9 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.js +52 -0
- 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.d.ts +2 -0
- package/admin/plugins/fieldRenderers/object/index.js +19 -0
- package/admin/plugins/fieldRenderers/object/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.js +153 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js +146 -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 +54 -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 +64 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.js.map +1 -0
- package/admin/plugins/fieldRenderers/radioButtons.d.ts +3 -0
- package/admin/plugins/fieldRenderers/radioButtons.js +68 -0
- package/admin/plugins/fieldRenderers/radioButtons.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +150 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +133 -0
- 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 +198 -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 +62 -0
- package/admin/plugins/fieldRenderers/ref/components/graphql.js +37 -0
- 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 -0
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js +56 -0
- 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 +17 -0
- package/admin/plugins/fieldRenderers/ref/components/useReference.js +278 -0
- package/admin/plugins/fieldRenderers/ref/components/useReference.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +16 -0
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js +232 -0
- 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 +75 -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.d.ts +2 -0
- package/admin/plugins/fieldRenderers/ref/index.js +15 -0
- package/admin/plugins/fieldRenderers/ref/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/ref/refInput.js +46 -0
- package/admin/plugins/fieldRenderers/ref/refInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js +52 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/richText/index.js +15 -0
- package/admin/plugins/fieldRenderers/richText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js +73 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +107 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/select.d.ts +3 -0
- package/admin/plugins/fieldRenderers/select.js +70 -0
- package/admin/plugins/fieldRenderers/select.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/text/index.js +15 -0
- package/admin/plugins/fieldRenderers/text/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/text/textInput.js +51 -0
- package/admin/plugins/fieldRenderers/text/textInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/text/textInputs.js +62 -0
- package/admin/plugins/fieldRenderers/text/textInputs.js.map +1 -0
- package/admin/plugins/fieldValidators/date/availableValidators.d.ts +1 -0
- package/admin/plugins/fieldValidators/date/availableValidators.js +20 -0
- package/admin/plugins/fieldValidators/date/availableValidators.js.map +1 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +4 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.js +46 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.js.map +1 -0
- package/admin/plugins/fieldValidators/dateGte.d.ts +3 -0
- package/admin/plugins/fieldValidators/dateGte.js +113 -0
- package/admin/plugins/fieldValidators/dateGte.js.map +1 -0
- package/admin/plugins/fieldValidators/dateLte.d.ts +3 -0
- package/admin/plugins/fieldValidators/dateLte.js +113 -0
- package/admin/plugins/fieldValidators/dateLte.js.map +1 -0
- package/admin/plugins/fieldValidators/dynamicZone.d.ts +2 -0
- package/admin/plugins/fieldValidators/dynamicZone.js +215 -0
- package/admin/plugins/fieldValidators/dynamicZone.js.map +1 -0
- package/admin/plugins/fieldValidators/gte.d.ts +3 -0
- package/admin/plugins/fieldValidators/gte.js +81 -0
- package/admin/plugins/fieldValidators/gte.js.map +1 -0
- package/admin/plugins/fieldValidators/in.d.ts +3 -0
- package/admin/plugins/fieldValidators/in.js +80 -0
- package/admin/plugins/fieldValidators/in.js.map +1 -0
- package/admin/plugins/fieldValidators/lte.d.ts +3 -0
- package/admin/plugins/fieldValidators/lte.js +81 -0
- package/admin/plugins/fieldValidators/lte.js.map +1 -0
- package/admin/plugins/fieldValidators/maxLength.d.ts +3 -0
- package/admin/plugins/fieldValidators/maxLength.js +91 -0
- package/admin/plugins/fieldValidators/maxLength.js.map +1 -0
- package/admin/plugins/fieldValidators/minLength.d.ts +3 -0
- package/admin/plugins/fieldValidators/minLength.js +91 -0
- package/admin/plugins/fieldValidators/minLength.js.map +1 -0
- package/admin/plugins/fieldValidators/pattern.d.ts +3 -0
- package/admin/plugins/fieldValidators/pattern.js +168 -0
- package/admin/plugins/fieldValidators/pattern.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.js +19 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +19 -0
- 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 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +19 -0
- 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 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.js +19 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.js.map +1 -0
- package/admin/plugins/fieldValidators/required.d.ts +3 -0
- package/admin/plugins/fieldValidators/required.js +24 -0
- package/admin/plugins/fieldValidators/required.js.map +1 -0
- package/admin/plugins/fieldValidators/unique.d.ts +3 -0
- package/admin/plugins/fieldValidators/unique.js +49 -0
- package/admin/plugins/fieldValidators/unique.js.map +1 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +8 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +168 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js.map +1 -0
- package/admin/plugins/fields/boolean.d.ts +3 -0
- package/admin/plugins/fields/boolean.js +65 -0
- package/admin/plugins/fields/boolean.js.map +1 -0
- package/admin/plugins/fields/dateTime.d.ts +3 -0
- package/admin/plugins/fields/dateTime.js +114 -0
- 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 +114 -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 +82 -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 +127 -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 +174 -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 +97 -0
- package/admin/plugins/fields/dynamicZone.js.map +1 -0
- package/admin/plugins/fields/file.d.ts +3 -0
- package/admin/plugins/fields/file.js +63 -0
- package/admin/plugins/fields/file.js.map +1 -0
- package/admin/plugins/fields/icons/ballot_black_24dp.svg +1 -0
- package/admin/plugins/fields/icons/dropdown-icon.svg +16 -0
- package/admin/plugins/fields/icons/notes-black-24px.svg +1 -0
- package/admin/plugins/fields/icons/round-check_box-24px.svg +4 -0
- package/admin/plugins/fields/icons/round-link-24px.svg +1 -0
- package/admin/plugins/fields/icons/round-looks_3-24px.svg +4 -0
- package/admin/plugins/fields/icons/round-notes.svg +1 -0
- package/admin/plugins/fields/icons/round-radio_button_checked-24px.svg +5 -0
- package/admin/plugins/fields/icons/round-short_text.svg +1 -0
- package/admin/plugins/fields/icons/round-subject.svg +1 -0
- package/admin/plugins/fields/icons/round-text_fields-24px.svg +4 -0
- package/admin/plugins/fields/icons/round-visibility_off-24px.svg +4 -0
- package/admin/plugins/fields/icons/round_insert_drive_file-24px.svg +1 -0
- package/admin/plugins/fields/icons/schedule-black-24px.svg +1 -0
- package/admin/plugins/fields/icons/title-black-24px.svg +1 -0
- package/admin/plugins/fields/icons/toggle_on-black-24px.svg +1 -0
- package/admin/plugins/fields/longText.d.ts +3 -0
- package/admin/plugins/fields/longText.js +63 -0
- package/admin/plugins/fields/longText.js.map +1 -0
- package/admin/plugins/fields/number.d.ts +3 -0
- package/admin/plugins/fields/number.js +81 -0
- package/admin/plugins/fields/number.js.map +1 -0
- package/admin/plugins/fields/object/ObjectFields.d.ts +7 -0
- package/admin/plugins/fields/object/ObjectFields.js +49 -0
- package/admin/plugins/fields/object/ObjectFields.js.map +1 -0
- package/admin/plugins/fields/object.d.ts +3 -0
- package/admin/plugins/fields/object.js +67 -0
- package/admin/plugins/fields/object.js.map +1 -0
- package/admin/plugins/fields/ref.d.ts +3 -0
- package/admin/plugins/fields/ref.js +179 -0
- package/admin/plugins/fields/ref.js.map +1 -0
- package/admin/plugins/fields/richText.d.ts +3 -0
- package/admin/plugins/fields/richText.js +61 -0
- package/admin/plugins/fields/richText.js.map +1 -0
- package/admin/plugins/fields/text.d.ts +3 -0
- package/admin/plugins/fields/text.js +69 -0
- package/admin/plugins/fields/text.js.map +1 -0
- package/admin/plugins/getObjectId.d.ts +3 -0
- package/admin/plugins/getObjectId.js +20 -0
- package/admin/plugins/getObjectId.js.map +1 -0
- package/admin/plugins/icons.d.ts +3 -0
- package/admin/plugins/icons.js +62 -0
- package/admin/plugins/icons.js.map +1 -0
- package/admin/plugins/index.d.ts +34 -0
- package/admin/plugins/index.js +32 -0
- package/admin/plugins/index.js.map +1 -0
- package/admin/plugins/install.d.ts +25 -0
- package/admin/plugins/install.js +180 -0
- package/admin/plugins/install.js.map +1 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +11 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.js +368 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +12 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js +136 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +12 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js +98 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +9 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.js +71 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +14 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +131 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +10 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +47 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +19 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js +99 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +4 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.js +21 -0
- 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 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.js +112 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.js.map +1 -0
- package/admin/plugins/permissionRenderer/index.d.ts +3 -0
- package/admin/plugins/permissionRenderer/index.js +31 -0
- package/admin/plugins/permissionRenderer/index.js.map +1 -0
- package/admin/plugins/routes.d.ts +3 -0
- package/admin/plugins/routes.js +115 -0
- package/admin/plugins/routes.js.map +1 -0
- package/admin/plugins/transformers/dateTransformer.d.ts +2 -0
- package/admin/plugins/transformers/dateTransformer.js +164 -0
- package/admin/plugins/transformers/dateTransformer.js.map +1 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.d.ts +2 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.js +45 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.js.map +1 -0
- package/admin/plugins/transformers/index.d.ts +3 -0
- package/admin/plugins/transformers/index.js +18 -0
- package/admin/plugins/transformers/index.js.map +1 -0
- package/admin/plugins/transformers/numberTransformer.d.ts +2 -0
- package/admin/plugins/transformers/numberTransformer.js +23 -0
- 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.d.ts +5 -0
- package/admin/plugins/upgrades/v5.0.0.js +111 -0
- 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.d.ts +5 -0
- package/admin/plugins/upgrades/v5.5.0.js +111 -0
- package/admin/plugins/upgrades/v5.5.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.8.0.d.ts +5 -0
- package/admin/plugins/upgrades/v5.8.0.js +111 -0
- package/admin/plugins/upgrades/v5.8.0.js.map +1 -0
- package/admin/plugins/welcomeScreenWidget.d.ts +3 -0
- package/admin/plugins/welcomeScreenWidget.js +43 -0
- package/admin/plugins/welcomeScreenWidget.js.map +1 -0
- package/admin/views/contentEntries/ContentEntries.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntries.js +108 -0
- package/admin/views/contentEntries/ContentEntries.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +28 -0
- package/admin/views/contentEntries/ContentEntriesContext.js +115 -0
- package/admin/views/contentEntries/ContentEntriesContext.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesList.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntriesList.js +234 -0
- package/admin/views/contentEntries/ContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +33 -0
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +209 -0
- 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 +7 -0
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +189 -0
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js +78 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/cache.d.ts +9 -0
- package/admin/views/contentEntries/ContentEntry/cache.js +252 -0
- package/admin/views/contentEntries/ContentEntry/cache.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.js +47 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js +170 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/index.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/index.js +64 -0
- package/admin/views/contentEntries/ContentEntry/header/index.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.d.ts +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +13 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +13 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js +97 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js +112 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js +47 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.d.ts +2 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js +148 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +27 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.js +311 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry.d.ts +11 -0
- package/admin/views/contentEntries/ContentEntry.js +120 -0
- 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 +80 -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.d.ts +1 -0
- package/admin/views/contentEntries/hooks/useContentEntries.js +20 -0
- package/admin/views/contentEntries/hooks/useContentEntries.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +18 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.js +173 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntry.d.ts +1 -0
- package/admin/views/contentEntries/hooks/useContentEntry.js +20 -0
- package/admin/views/contentEntries/hooks/useContentEntry.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroups.d.ts +3 -0
- package/admin/views/contentModelGroups/ContentModelGroups.js +52 -0
- package/admin/views/contentModelGroups/ContentModelGroups.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +6 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +274 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +6 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +302 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js.map +1 -0
- package/admin/views/contentModelGroups/graphql.d.ts +73 -0
- package/admin/views/contentModelGroups/graphql.js +47 -0
- package/admin/views/contentModelGroups/graphql.js.map +1 -0
- package/admin/views/contentModels/CloneContentModelDialog.d.ts +11 -0
- package/admin/views/contentModels/CloneContentModelDialog.js +299 -0
- package/admin/views/contentModels/CloneContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/ContentModelEditor.d.ts +3 -0
- package/admin/views/contentModels/ContentModelEditor.js +48 -0
- package/admin/views/contentModels/ContentModelEditor.js.map +1 -0
- package/admin/views/contentModels/ContentModels.d.ts +3 -0
- package/admin/views/contentModels/ContentModels.js +123 -0
- package/admin/views/contentModels/ContentModels.js.map +1 -0
- package/admin/views/contentModels/ContentModelsDataList.d.ts +9 -0
- package/admin/views/contentModels/ContentModelsDataList.js +333 -0
- package/admin/views/contentModels/ContentModelsDataList.js.map +1 -0
- package/admin/views/contentModels/NewContentModelDialog.d.ts +8 -0
- package/admin/views/contentModels/NewContentModelDialog.js +317 -0
- package/admin/views/contentModels/NewContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/cache.d.ts +13 -0
- package/admin/views/contentModels/cache.js +137 -0
- 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 -0
- package/admin/views/utils.js +26 -0
- package/admin/views/utils.js.map +1 -0
- package/admin/viewsGraphql.d.ts +67 -0
- package/admin/viewsGraphql.js +53 -0
- package/admin/viewsGraphql.js.map +1 -0
- package/allPlugins.d.ts +34 -0
- package/allPlugins.js +95 -0
- package/allPlugins.js.map +1 -0
- package/index.d.ts +12 -0
- package/index.js +44 -0
- package/index.js.map +1 -0
- package/package.json +108 -0
- package/types/index.d.ts +468 -0
- package/types/index.js +44 -0
- package/types/index.js.map +1 -0
- package/types/model.d.ts +83 -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 +91 -0
- package/utils/CmsModelFieldValidatorConfigAdapter.js.map +1 -0
- package/utils/createTypeName.d.ts +1 -0
- package/utils/createTypeName.js +18 -0
- package/utils/createTypeName.js.map +1 -0
- package/utils/createValidators.d.ts +3 -0
- package/utils/createValidators.js +97 -0
- package/utils/createValidators.js.map +1 -0
- package/utils/getFetchPolicy.d.ts +6 -0
- package/utils/getFetchPolicy.js +19 -0
- package/utils/getFetchPolicy.js.map +1 -0
- package/utils/getModelTitleFieldId.d.ts +2 -0
- package/utils/getModelTitleFieldId.js +16 -0
- package/utils/getModelTitleFieldId.js.map +1 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _plugins = require("@webiny/plugins");
|
|
17
|
+
|
|
18
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
19
|
+
|
|
20
|
+
var _i18n = require("@webiny/app/i18n");
|
|
21
|
+
|
|
22
|
+
var _Radio = require("@webiny/ui/Radio");
|
|
23
|
+
|
|
24
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
25
|
+
|
|
26
|
+
var _emotion = require("emotion");
|
|
27
|
+
|
|
28
|
+
var _validation = require("@webiny/validation");
|
|
29
|
+
|
|
30
|
+
var _hooks = require("../../../hooks");
|
|
31
|
+
|
|
32
|
+
var _form = require("@webiny/form");
|
|
33
|
+
|
|
34
|
+
var _templateObject, _templateObject2;
|
|
35
|
+
|
|
36
|
+
var t = _i18n.i18n.ns("app-headless-cms/admin/content-model-editor/tabs/appearance-tab");
|
|
37
|
+
|
|
38
|
+
var style = {
|
|
39
|
+
topLabel: /*#__PURE__*/(0, _emotion.css)({
|
|
40
|
+
marginBottom: 25
|
|
41
|
+
}, "label:topLabel;"),
|
|
42
|
+
noComponentsMessage: /*#__PURE__*/(0, _emotion.css)({
|
|
43
|
+
textAlign: "center",
|
|
44
|
+
padding: 25
|
|
45
|
+
}, "label:noComponentsMessage;"),
|
|
46
|
+
radioContainer: /*#__PURE__*/(0, _emotion.css)({
|
|
47
|
+
marginBottom: 10
|
|
48
|
+
}, "label:radioContainer;")
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var AppearanceTab = function AppearanceTab() {
|
|
52
|
+
var _field$predefinedValu;
|
|
53
|
+
|
|
54
|
+
var form = (0, _form.useForm)();
|
|
55
|
+
|
|
56
|
+
var _useModelField = (0, _hooks.useModelField)(),
|
|
57
|
+
field = _useModelField.field,
|
|
58
|
+
fieldPlugin = _useModelField.fieldPlugin;
|
|
59
|
+
|
|
60
|
+
var renderPlugins = _plugins.plugins.byType("cms-editor-field-renderer").filter(function (item) {
|
|
61
|
+
return item.renderer.canUse({
|
|
62
|
+
field: field,
|
|
63
|
+
fieldPlugin: fieldPlugin
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
(0, _react.useEffect)(function () {
|
|
68
|
+
// If the currently selected render plugin is no longer available, select the first available one.
|
|
69
|
+
var currentlySelectedRenderAvailable = renderPlugins.find(function (item) {
|
|
70
|
+
return item.renderer.rendererName === field.renderer.name;
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
if (currentlySelectedRenderAvailable) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (renderPlugins[0]) {
|
|
78
|
+
form.setValue("renderer.name", renderPlugins[0].renderer.rendererName);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
console.info("No renderers for field ".concat(field.fieldId, " found."), field);
|
|
83
|
+
}, [field.id, field.multipleValues, (_field$predefinedValu = field.predefinedValues) === null || _field$predefinedValu === void 0 ? void 0 : _field$predefinedValu.enabled]);
|
|
84
|
+
|
|
85
|
+
if (renderPlugins.length === 0) {
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
87
|
+
span: 12,
|
|
88
|
+
className: style.noComponentsMessage
|
|
89
|
+
}, t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["There are no components that can render this field."])))));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
93
|
+
span: 12
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: style.topLabel
|
|
96
|
+
}, t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Choose a component that will render the field:"])))), /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
97
|
+
name: "renderer.name",
|
|
98
|
+
validate: _validation.validation.create("required")
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_Radio.RadioGroup, null, function (_ref) {
|
|
100
|
+
var onChange = _ref.onChange,
|
|
101
|
+
getValue = _ref.getValue;
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderPlugins.map(function (item) {
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
+
key: item.name,
|
|
105
|
+
className: style.radioContainer
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement(_Radio.Radio, {
|
|
107
|
+
value: getValue(item.renderer.rendererName),
|
|
108
|
+
onChange: onChange(item.renderer.rendererName),
|
|
109
|
+
label: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, item.renderer.name), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
110
|
+
use: "caption"
|
|
111
|
+
}, item.renderer.description)))
|
|
112
|
+
}));
|
|
113
|
+
}));
|
|
114
|
+
}))));
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
var _default = AppearanceTab;
|
|
118
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","style","topLabel","css","marginBottom","noComponentsMessage","textAlign","padding","radioContainer","AppearanceTab","form","useForm","useModelField","field","fieldPlugin","renderPlugins","plugins","byType","filter","item","renderer","canUse","useEffect","currentlySelectedRenderAvailable","find","rendererName","name","setValue","console","info","fieldId","id","multipleValues","predefinedValues","enabled","length","validation","create","onChange","getValue","map","description"],"sources":["AppearanceTab.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Grid, Cell } from \"@webiny/ui/Grid\";\nimport { CmsModelField, CmsEditorFieldRendererPlugin } from \"~/types\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport { Radio, RadioGroup } from \"@webiny/ui/Radio\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { css } from \"emotion\";\nimport { validation } from \"@webiny/validation\";\nimport { useModelField } from \"~/admin/hooks\";\nimport { useForm, Bind } from \"@webiny/form\";\n\nconst t = i18n.ns(\"app-headless-cms/admin/content-model-editor/tabs/appearance-tab\");\n\nconst style = {\n topLabel: css({\n marginBottom: 25\n }),\n noComponentsMessage: css({\n textAlign: \"center\",\n padding: 25\n }),\n radioContainer: css({\n marginBottom: 10\n })\n};\n\nconst AppearanceTab = () => {\n const form = useForm<CmsModelField>();\n const { field, fieldPlugin } = useModelField();\n\n const renderPlugins = plugins\n .byType<CmsEditorFieldRendererPlugin>(\"cms-editor-field-renderer\")\n .filter(item => item.renderer.canUse({ field, fieldPlugin }));\n\n useEffect((): void => {\n // If the currently selected render plugin is no longer available, select the first available one.\n const currentlySelectedRenderAvailable = renderPlugins.find(\n item => item.renderer.rendererName === field.renderer.name\n );\n\n if (currentlySelectedRenderAvailable) {\n return;\n }\n\n if (renderPlugins[0]) {\n form.setValue(\"renderer.name\", renderPlugins[0].renderer.rendererName);\n return;\n }\n\n console.info(`No renderers for field ${field.fieldId} found.`, field);\n }, [field.id, field.multipleValues, field.predefinedValues?.enabled]);\n\n if (renderPlugins.length === 0) {\n return (\n <Grid>\n <Cell\n span={12}\n className={style.noComponentsMessage}\n >{t`There are no components that can render this field.`}</Cell>\n </Grid>\n );\n }\n\n return (\n <Grid>\n <Cell span={12}>\n <div\n className={style.topLabel}\n >{t`Choose a component that will render the field:`}</div>\n <Bind name={\"renderer.name\"} validate={validation.create(\"required\")}>\n <RadioGroup>\n {({ onChange, getValue }) => (\n <React.Fragment>\n {renderPlugins.map(item => (\n <div key={item.name} className={style.radioContainer}>\n <Radio\n value={getValue(item.renderer.rendererName)}\n onChange={onChange(item.renderer.rendererName)}\n label={\n <>\n <div>{item.renderer.name}</div>\n <div>\n <Typography use={\"caption\"}>\n {item.renderer.description}\n </Typography>\n </div>\n </>\n }\n />\n </div>\n ))}\n </React.Fragment>\n )}\n </RadioGroup>\n </Bind>\n </Cell>\n </Grid>\n );\n};\n\nexport default AppearanceTab;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,167 @@
|
|
|
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.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _camelCase2 = _interopRequireDefault(require("lodash/camelCase"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _Input = require("@webiny/ui/Input");
|
|
17
|
+
|
|
18
|
+
var _Switch = require("@webiny/ui/Switch");
|
|
19
|
+
|
|
20
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
21
|
+
|
|
22
|
+
var _validation = require("@webiny/validation");
|
|
23
|
+
|
|
24
|
+
var _Tags = require("@webiny/ui/Tags");
|
|
25
|
+
|
|
26
|
+
var _form = require("@webiny/form");
|
|
27
|
+
|
|
28
|
+
var _ = require("./..");
|
|
29
|
+
|
|
30
|
+
var _hooks = require("../../../hooks");
|
|
31
|
+
|
|
32
|
+
var GeneralTab = function GeneralTab() {
|
|
33
|
+
var form = (0, _form.useForm)();
|
|
34
|
+
|
|
35
|
+
var _useModelField = (0, _hooks.useModelField)(),
|
|
36
|
+
field = _useModelField.field,
|
|
37
|
+
fieldPlugin = _useModelField.fieldPlugin;
|
|
38
|
+
|
|
39
|
+
var inputRef = (0, _react.useRef)(null);
|
|
40
|
+
|
|
41
|
+
var _useModelEditor = (0, _hooks.useModelEditor)(),
|
|
42
|
+
contentModel = _useModelEditor.data;
|
|
43
|
+
|
|
44
|
+
var _useModelFieldEditor = (0, _.useModelFieldEditor)(),
|
|
45
|
+
getField = _useModelFieldEditor.getField; // Had problems with auto-focusing the "label" field. A couple of comments on this.
|
|
46
|
+
// 1. It's probably caused by the Tabs component which wraps this component.
|
|
47
|
+
// 2. It seems that the "autoFocus" prop on the Input doesn't work. I can't see it attached in the actual DOM.
|
|
48
|
+
// 3. This works, but it's not 100%. Visually, the cursor is frozen, and that's probably caused by a bug / design
|
|
49
|
+
// in the RMWC / Material library. If you were to click somewhere on screen, and then apply focus, then
|
|
50
|
+
// it seems it's behaving correctly. ¯\_(ツ)_/¯
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
(0, _react.useEffect)(function () {
|
|
54
|
+
setTimeout(function () {
|
|
55
|
+
if (!inputRef.current) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
inputRef.current.focus();
|
|
60
|
+
},
|
|
61
|
+
/* The value of 400 was determined by manual testing. */
|
|
62
|
+
400);
|
|
63
|
+
}, []);
|
|
64
|
+
var afterChangeLabel = (0, _react.useCallback)(function (value) {
|
|
65
|
+
form.setValue("fieldId", (0, _camelCase2.default)(value));
|
|
66
|
+
}, []);
|
|
67
|
+
var beforeChangeFieldId = (0, _react.useCallback)(function (value, baseOnChange) {
|
|
68
|
+
baseOnChange(value.trim());
|
|
69
|
+
}, []);
|
|
70
|
+
var fieldIdValidator = (0, _react.useCallback)(function (fieldId) {
|
|
71
|
+
if (fieldId.trim().toLowerCase() !== "id") {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
throw new Error("Cannot use \"id\" as Field ID.");
|
|
76
|
+
}, []);
|
|
77
|
+
var uniqueFieldIdValidator = (0, _react.useCallback)(function (fieldId) {
|
|
78
|
+
var existingField = getField({
|
|
79
|
+
fieldId: fieldId
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
if (!existingField) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (existingField.id === field.id) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
throw new Error("Please enter a unique Field ID.");
|
|
91
|
+
}, []);
|
|
92
|
+
var additionalSettings = null;
|
|
93
|
+
|
|
94
|
+
if (typeof fieldPlugin.field.renderSettings === "function") {
|
|
95
|
+
additionalSettings = fieldPlugin.field.renderSettings({
|
|
96
|
+
afterChangeLabel: afterChangeLabel,
|
|
97
|
+
uniqueFieldIdValidator: uniqueFieldIdValidator,
|
|
98
|
+
contentModel: contentModel
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
var predefinedValuesEnabled = (0, _react.useMemo)(function () {
|
|
103
|
+
return fieldPlugin.field.allowPredefinedValues && typeof fieldPlugin.field.renderPredefinedValues === "function";
|
|
104
|
+
}, [field.fieldId]);
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
106
|
+
span: 6
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
108
|
+
name: "label",
|
|
109
|
+
validators: _validation.validation.create("required"),
|
|
110
|
+
afterChange: function afterChange(value) {
|
|
111
|
+
if (field.id) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
afterChangeLabel(value);
|
|
116
|
+
}
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
118
|
+
label: "Label",
|
|
119
|
+
inputRef: inputRef,
|
|
120
|
+
"data-testid": "cms.editor.field.settings.general.label"
|
|
121
|
+
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
122
|
+
span: 6
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
124
|
+
name: "fieldId",
|
|
125
|
+
validators: [_validation.validation.create("required"), uniqueFieldIdValidator, fieldIdValidator],
|
|
126
|
+
beforeChange: beforeChangeFieldId
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
128
|
+
label: "Field ID",
|
|
129
|
+
"data-testid": "cms.editor.field.settings.general.label-".concat(field.id)
|
|
130
|
+
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
131
|
+
span: 6
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
133
|
+
name: "multipleValues"
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_Switch.Switch, {
|
|
135
|
+
label: fieldPlugin.field.multipleValuesLabel,
|
|
136
|
+
disabled: !fieldPlugin.field.allowMultipleValues,
|
|
137
|
+
"data-testid": "cms.editor.field.settings.general.switch-multiplevalues"
|
|
138
|
+
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
139
|
+
span: 6
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
141
|
+
name: "predefinedValues.enabled"
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_Switch.Switch, {
|
|
143
|
+
label: "Use predefined values",
|
|
144
|
+
disabled: !predefinedValuesEnabled,
|
|
145
|
+
"data-testid": "cms.editor.field.settings.general.switch-predefinedvalues"
|
|
146
|
+
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
147
|
+
span: 12
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
149
|
+
name: "helpText"
|
|
150
|
+
}, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
151
|
+
label: "Help text",
|
|
152
|
+
description: "Help text (optional)",
|
|
153
|
+
"data-testid": "cms.editor.field.settings.general.helptext"
|
|
154
|
+
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
155
|
+
span: 12
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
157
|
+
name: "tags"
|
|
158
|
+
}, /*#__PURE__*/_react.default.createElement(_Tags.Tags, {
|
|
159
|
+
label: "Tags",
|
|
160
|
+
protectedTags: fieldPlugin.field.tags,
|
|
161
|
+
description: "Field tags (optional)",
|
|
162
|
+
"data-testid": "cms.editor.field.settings.general.tags"
|
|
163
|
+
})))), additionalSettings);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
var _default = GeneralTab;
|
|
167
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GeneralTab","form","useForm","useModelField","field","fieldPlugin","inputRef","useRef","useModelEditor","contentModel","data","useModelFieldEditor","getField","useEffect","setTimeout","current","focus","afterChangeLabel","useCallback","value","setValue","beforeChangeFieldId","baseOnChange","trim","fieldIdValidator","fieldId","toLowerCase","Error","uniqueFieldIdValidator","existingField","id","additionalSettings","renderSettings","predefinedValuesEnabled","useMemo","allowPredefinedValues","renderPredefinedValues","validation","create","multipleValuesLabel","allowMultipleValues","tags"],"sources":["GeneralTab.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useRef, useMemo } from \"react\";\nimport { camelCase } from \"lodash\";\nimport { Input } from \"@webiny/ui/Input\";\nimport { Switch } from \"@webiny/ui/Switch\";\nimport { Grid, Cell } from \"@webiny/ui/Grid\";\nimport { validation } from \"@webiny/validation\";\nimport { Tags } from \"@webiny/ui/Tags\";\nimport { useForm, Bind } from \"@webiny/form\";\nimport { useModelFieldEditor } from \"~/admin/components/FieldEditor\";\nimport { useModelEditor } from \"~/admin/hooks\";\nimport { useModelField } from \"~/admin/hooks\";\n\nconst GeneralTab = () => {\n const form = useForm();\n const { field, fieldPlugin } = useModelField();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const { data: contentModel } = useModelEditor();\n const { getField } = useModelFieldEditor();\n\n // Had problems with auto-focusing the \"label\" field. A couple of comments on this.\n // 1. It's probably caused by the Tabs component which wraps this component.\n // 2. It seems that the \"autoFocus\" prop on the Input doesn't work. I can't see it attached in the actual DOM.\n // 3. This works, but it's not 100%. Visually, the cursor is frozen, and that's probably caused by a bug / design\n // in the RMWC / Material library. If you were to click somewhere on screen, and then apply focus, then\n // it seems it's behaving correctly. ¯\\_(ツ)_/¯\n useEffect(() => {\n setTimeout(() => {\n if (!inputRef.current) {\n return;\n }\n inputRef.current.focus();\n }, /* The value of 400 was determined by manual testing. */ 400);\n }, []);\n\n const afterChangeLabel = useCallback((value: string) => {\n form.setValue(\"fieldId\", camelCase(value));\n }, []);\n\n const beforeChangeFieldId = useCallback(\n (value: string, baseOnChange: (value: string) => void) => {\n baseOnChange(value.trim());\n },\n []\n );\n\n const fieldIdValidator = useCallback(fieldId => {\n if (fieldId.trim().toLowerCase() !== \"id\") {\n return true;\n }\n\n throw new Error(`Cannot use \"id\" as Field ID.`);\n }, []);\n\n const uniqueFieldIdValidator = useCallback((fieldId: string) => {\n const existingField = getField({ fieldId });\n if (!existingField) {\n return false;\n }\n\n if (existingField.id === field.id) {\n return true;\n }\n throw new Error(\"Please enter a unique Field ID.\");\n }, []);\n\n let additionalSettings: React.ReactNode | null = null;\n if (typeof fieldPlugin.field.renderSettings === \"function\") {\n additionalSettings = fieldPlugin.field.renderSettings({\n afterChangeLabel,\n uniqueFieldIdValidator,\n contentModel\n });\n }\n\n const predefinedValuesEnabled = useMemo(\n (): boolean =>\n fieldPlugin.field.allowPredefinedValues &&\n typeof fieldPlugin.field.renderPredefinedValues === \"function\",\n [field.fieldId]\n );\n\n return (\n <>\n <Grid>\n <Cell span={6}>\n <Bind\n name={\"label\"}\n validators={validation.create(\"required\")}\n afterChange={(value: string) => {\n if (field.id) {\n return;\n }\n afterChangeLabel(value);\n }}\n >\n <Input\n label={\"Label\"}\n inputRef={inputRef}\n data-testid=\"cms.editor.field.settings.general.label\"\n />\n </Bind>\n </Cell>\n <Cell span={6}>\n <Bind\n name={\"fieldId\"}\n validators={[\n validation.create(\"required\"),\n uniqueFieldIdValidator,\n fieldIdValidator\n ]}\n beforeChange={beforeChangeFieldId}\n >\n <Input\n label={\"Field ID\"}\n data-testid={`cms.editor.field.settings.general.label-${field.id}`}\n />\n </Bind>\n </Cell>\n\n <Cell span={6}>\n <Bind name={\"multipleValues\"}>\n <Switch\n label={fieldPlugin.field.multipleValuesLabel}\n disabled={!fieldPlugin.field.allowMultipleValues}\n data-testid={`cms.editor.field.settings.general.switch-multiplevalues`}\n />\n </Bind>\n </Cell>\n <Cell span={6}>\n <Bind name={\"predefinedValues.enabled\"}>\n <Switch\n label={\"Use predefined values\"}\n disabled={!predefinedValuesEnabled}\n data-testid={`cms.editor.field.settings.general.switch-predefinedvalues`}\n />\n </Bind>\n </Cell>\n\n <Cell span={12}>\n <Bind name={\"helpText\"}>\n <Input\n label={\"Help text\"}\n description={\"Help text (optional)\"}\n data-testid={`cms.editor.field.settings.general.helptext`}\n />\n </Bind>\n </Cell>\n <Cell span={12}>\n <Bind name={\"tags\"}>\n <Tags\n label={\"Tags\"}\n protectedTags={fieldPlugin.field.tags}\n description={\"Field tags (optional)\"}\n data-testid={`cms.editor.field.settings.general.tags`}\n />\n </Bind>\n </Cell>\n </Grid>\n {additionalSettings}\n </>\n );\n};\n\nexport default GeneralTab;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA,IAAMA,UAAU,GAAG,SAAbA,UAAa,GAAM;EACrB,IAAMC,IAAI,GAAG,IAAAC,aAAA,GAAb;;EACA,qBAA+B,IAAAC,oBAAA,GAA/B;EAAA,IAAQC,KAAR,kBAAQA,KAAR;EAAA,IAAeC,WAAf,kBAAeA,WAAf;;EACA,IAAMC,QAAQ,GAAG,IAAAC,aAAA,EAAgC,IAAhC,CAAjB;;EACA,sBAA+B,IAAAC,qBAAA,GAA/B;EAAA,IAAcC,YAAd,mBAAQC,IAAR;;EACA,2BAAqB,IAAAC,qBAAA,GAArB;EAAA,IAAQC,QAAR,wBAAQA,QAAR,CALqB,CAOrB;EACA;EACA;EACA;EACA;EACA;;;EACA,IAAAC,gBAAA,EAAU,YAAM;IACZC,UAAU,CAAC,YAAM;MACb,IAAI,CAACR,QAAQ,CAACS,OAAd,EAAuB;QACnB;MACH;;MACDT,QAAQ,CAACS,OAAT,CAAiBC,KAAjB;IACH,CALS;IAKP;IAAyD,GALlD,CAAV;EAMH,CAPD,EAOG,EAPH;EASA,IAAMC,gBAAgB,GAAG,IAAAC,kBAAA,EAAY,UAACC,KAAD,EAAmB;IACpDlB,IAAI,CAACmB,QAAL,CAAc,SAAd,EAAyB,yBAAUD,KAAV,CAAzB;EACH,CAFwB,EAEtB,EAFsB,CAAzB;EAIA,IAAME,mBAAmB,GAAG,IAAAH,kBAAA,EACxB,UAACC,KAAD,EAAgBG,YAAhB,EAA0D;IACtDA,YAAY,CAACH,KAAK,CAACI,IAAN,EAAD,CAAZ;EACH,CAHuB,EAIxB,EAJwB,CAA5B;EAOA,IAAMC,gBAAgB,GAAG,IAAAN,kBAAA,EAAY,UAAAO,OAAO,EAAI;IAC5C,IAAIA,OAAO,CAACF,IAAR,GAAeG,WAAf,OAAiC,IAArC,EAA2C;MACvC,OAAO,IAAP;IACH;;IAED,MAAM,IAAIC,KAAJ,kCAAN;EACH,CANwB,EAMtB,EANsB,CAAzB;EAQA,IAAMC,sBAAsB,GAAG,IAAAV,kBAAA,EAAY,UAACO,OAAD,EAAqB;IAC5D,IAAMI,aAAa,GAAGjB,QAAQ,CAAC;MAAEa,OAAO,EAAPA;IAAF,CAAD,CAA9B;;IACA,IAAI,CAACI,aAAL,EAAoB;MAChB,OAAO,KAAP;IACH;;IAED,IAAIA,aAAa,CAACC,EAAd,KAAqB1B,KAAK,CAAC0B,EAA/B,EAAmC;MAC/B,OAAO,IAAP;IACH;;IACD,MAAM,IAAIH,KAAJ,CAAU,iCAAV,CAAN;EACH,CAV8B,EAU5B,EAV4B,CAA/B;EAYA,IAAII,kBAA0C,GAAG,IAAjD;;EACA,IAAI,OAAO1B,WAAW,CAACD,KAAZ,CAAkB4B,cAAzB,KAA4C,UAAhD,EAA4D;IACxDD,kBAAkB,GAAG1B,WAAW,CAACD,KAAZ,CAAkB4B,cAAlB,CAAiC;MAClDf,gBAAgB,EAAhBA,gBADkD;MAElDW,sBAAsB,EAAtBA,sBAFkD;MAGlDnB,YAAY,EAAZA;IAHkD,CAAjC,CAArB;EAKH;;EAED,IAAMwB,uBAAuB,GAAG,IAAAC,cAAA,EAC5B;IAAA,OACI7B,WAAW,CAACD,KAAZ,CAAkB+B,qBAAlB,IACA,OAAO9B,WAAW,CAACD,KAAZ,CAAkBgC,sBAAzB,KAAoD,UAFxD;EAAA,CAD4B,EAI5B,CAAChC,KAAK,CAACqB,OAAP,CAJ4B,CAAhC;EAOA,oBACI,yEACI,6BAAC,UAAD,qBACI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IACI,IAAI,EAAE,OADV;IAEI,UAAU,EAAEY,sBAAA,CAAWC,MAAX,CAAkB,UAAlB,CAFhB;IAGI,WAAW,EAAE,qBAACnB,KAAD,EAAmB;MAC5B,IAAIf,KAAK,CAAC0B,EAAV,EAAc;QACV;MACH;;MACDb,gBAAgB,CAACE,KAAD,CAAhB;IACH;EARL,gBAUI,6BAAC,YAAD;IACI,KAAK,EAAE,OADX;IAEI,QAAQ,EAAEb,QAFd;IAGI,eAAY;EAHhB,EAVJ,CADJ,CADJ,eAmBI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IACI,IAAI,EAAE,SADV;IAEI,UAAU,EAAE,CACR+B,sBAAA,CAAWC,MAAX,CAAkB,UAAlB,CADQ,EAERV,sBAFQ,EAGRJ,gBAHQ,CAFhB;IAOI,YAAY,EAAEH;EAPlB,gBASI,6BAAC,YAAD;IACI,KAAK,EAAE,UADX;IAEI,iEAAwDjB,KAAK,CAAC0B,EAA9D;EAFJ,EATJ,CADJ,CAnBJ,eAoCI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,cAAD;IACI,KAAK,EAAEzB,WAAW,CAACD,KAAZ,CAAkBmC,mBAD7B;IAEI,QAAQ,EAAE,CAAClC,WAAW,CAACD,KAAZ,CAAkBoC,mBAFjC;IAGI;EAHJ,EADJ,CADJ,CApCJ,eA6CI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,cAAD;IACI,KAAK,EAAE,uBADX;IAEI,QAAQ,EAAE,CAACP,uBAFf;IAGI;EAHJ,EADJ,CADJ,CA7CJ,eAuDI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,YAAD;IACI,KAAK,EAAE,WADX;IAEI,WAAW,EAAE,sBAFjB;IAGI;EAHJ,EADJ,CADJ,CAvDJ,eAgEI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,UAAD;IACI,KAAK,EAAE,MADX;IAEI,aAAa,EAAE5B,WAAW,CAACD,KAAZ,CAAkBqC,IAFrC;IAGI,WAAW,EAAE,uBAHjB;IAII;EAJJ,EADJ,CADJ,CAhEJ,CADJ,EA4EKV,kBA5EL,CADJ;AAgFH,CArJD;;eAuJe/B,U"}
|
|
@@ -0,0 +1,106 @@
|
|
|
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.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
|
+
|
|
16
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _getValue = _interopRequireDefault(require("./functions/getValue"));
|
|
21
|
+
|
|
22
|
+
var _setValue = _interopRequireDefault(require("./functions/setValue"));
|
|
23
|
+
|
|
24
|
+
var _form = require("@webiny/form");
|
|
25
|
+
|
|
26
|
+
var _hooks = require("../../../hooks");
|
|
27
|
+
|
|
28
|
+
var PredefinedValues = function PredefinedValues() {
|
|
29
|
+
var _useModelField = (0, _hooks.useModelField)(),
|
|
30
|
+
field = _useModelField.field,
|
|
31
|
+
fieldPlugin = _useModelField.fieldPlugin;
|
|
32
|
+
|
|
33
|
+
var memoizedBindComponents = (0, _react.useRef)({});
|
|
34
|
+
var getBind = (0, _react.useCallback)(function () {
|
|
35
|
+
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
36
|
+
var memoKey = index;
|
|
37
|
+
|
|
38
|
+
if (memoizedBindComponents.current[memoKey]) {
|
|
39
|
+
return memoizedBindComponents.current[memoKey];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var Bind = function Bind(_ref) {
|
|
43
|
+
var children = _ref.children,
|
|
44
|
+
name = _ref.name;
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_form.Bind, {
|
|
46
|
+
name: "predefinedValues.values"
|
|
47
|
+
}, function (bind) {
|
|
48
|
+
var props = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, bind), {}, {
|
|
49
|
+
value: (0, _getValue.default)({
|
|
50
|
+
bind: bind,
|
|
51
|
+
index: index,
|
|
52
|
+
name: name
|
|
53
|
+
}),
|
|
54
|
+
onChange: function () {
|
|
55
|
+
var _onChange = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value) {
|
|
56
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
57
|
+
while (1) {
|
|
58
|
+
switch (_context.prev = _context.next) {
|
|
59
|
+
case 0:
|
|
60
|
+
_context.next = 2;
|
|
61
|
+
return (0, _setValue.default)({
|
|
62
|
+
value: value,
|
|
63
|
+
bind: bind,
|
|
64
|
+
index: index,
|
|
65
|
+
name: name
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
case 2:
|
|
69
|
+
case "end":
|
|
70
|
+
return _context.stop();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, _callee);
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
function onChange(_x) {
|
|
77
|
+
return _onChange.apply(this, arguments);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return onChange;
|
|
81
|
+
}()
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (typeof children === "function") {
|
|
85
|
+
return children(props);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return /*#__PURE__*/(0, _react.cloneElement)(children, props);
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
memoizedBindComponents.current[memoKey] = Bind;
|
|
93
|
+
return memoizedBindComponents.current[memoKey];
|
|
94
|
+
}, []);
|
|
95
|
+
|
|
96
|
+
if (!fieldPlugin.field.renderPredefinedValues) {
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "Missing \"field.renderPredefinedValues\" method in field type plugin: \"".concat(field.type, "\"."));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, fieldPlugin.field.renderPredefinedValues({
|
|
101
|
+
getBind: getBind
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var _default = PredefinedValues;
|
|
106
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PredefinedValues","useModelField","field","fieldPlugin","memoizedBindComponents","useRef","getBind","useCallback","index","memoKey","current","Bind","children","name","bind","props","value","getValue","onChange","setValue","cloneElement","renderPredefinedValues","type"],"sources":["PredefinedValues.tsx"],"sourcesContent":["import React, { useCallback, useRef, cloneElement } from \"react\";\nimport getValue from \"./functions/getValue\";\nimport setValue from \"./functions/setValue\";\nimport { BindComponent, Bind as BaseFormBind } from \"@webiny/form\";\nimport { useModelField } from \"~/admin/hooks\";\n\ninterface MemoizedBindComponents {\n [key: string]: BindComponent;\n}\n\nconst PredefinedValues = () => {\n const { field, fieldPlugin } = useModelField();\n const memoizedBindComponents = useRef<MemoizedBindComponents>({});\n\n const getBind = useCallback((index = -1) => {\n const memoKey = index;\n if (memoizedBindComponents.current[memoKey]) {\n return memoizedBindComponents.current[memoKey];\n }\n\n const Bind: BindComponent = ({ children, name }) => {\n return (\n <BaseFormBind name={\"predefinedValues.values\"}>\n {bind => {\n const props = {\n ...bind,\n value: getValue({ bind, index, name }),\n onChange: async (value: string[]) => {\n await setValue({ value, bind, index, name });\n }\n };\n\n if (typeof children === \"function\") {\n return children(props);\n }\n\n return cloneElement(children as unknown as React.ReactElement, props);\n }}\n </BaseFormBind>\n );\n };\n\n memoizedBindComponents.current[memoKey] = Bind;\n\n return memoizedBindComponents.current[memoKey];\n }, []);\n if (!fieldPlugin.field.renderPredefinedValues) {\n return (\n <>{`Missing \"field.renderPredefinedValues\" method in field type plugin: \"${field.type}\".`}</>\n );\n }\n\n return <>{fieldPlugin.field.renderPredefinedValues({ getBind })}</>;\n};\n\nexport default PredefinedValues;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAMA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,GAAM;EAC3B,qBAA+B,IAAAC,oBAAA,GAA/B;EAAA,IAAQC,KAAR,kBAAQA,KAAR;EAAA,IAAeC,WAAf,kBAAeA,WAAf;;EACA,IAAMC,sBAAsB,GAAG,IAAAC,aAAA,EAA+B,EAA/B,CAA/B;EAEA,IAAMC,OAAO,GAAG,IAAAC,kBAAA,EAAY,YAAgB;IAAA,IAAfC,KAAe,uEAAP,CAAC,CAAM;IACxC,IAAMC,OAAO,GAAGD,KAAhB;;IACA,IAAIJ,sBAAsB,CAACM,OAAvB,CAA+BD,OAA/B,CAAJ,EAA6C;MACzC,OAAOL,sBAAsB,CAACM,OAAvB,CAA+BD,OAA/B,CAAP;IACH;;IAED,IAAME,IAAmB,GAAG,SAAtBA,IAAsB,OAAwB;MAAA,IAArBC,QAAqB,QAArBA,QAAqB;MAAA,IAAXC,IAAW,QAAXA,IAAW;MAChD,oBACI,6BAAC,UAAD;QAAc,IAAI,EAAE;MAApB,GACK,UAAAC,IAAI,EAAI;QACL,IAAMC,KAAK,+DACJD,IADI;UAEPE,KAAK,EAAE,IAAAC,iBAAA,EAAS;YAAEH,IAAI,EAAJA,IAAF;YAAQN,KAAK,EAALA,KAAR;YAAeK,IAAI,EAAJA;UAAf,CAAT,CAFA;UAGPK,QAAQ;YAAA,uGAAE,iBAAOF,KAAP;cAAA;gBAAA;kBAAA;oBAAA;sBAAA;sBAAA,OACA,IAAAG,iBAAA,EAAS;wBAAEH,KAAK,EAALA,KAAF;wBAASF,IAAI,EAAJA,IAAT;wBAAeN,KAAK,EAALA,KAAf;wBAAsBK,IAAI,EAAJA;sBAAtB,CAAT,CADA;;oBAAA;oBAAA;sBAAA;kBAAA;gBAAA;cAAA;YAAA,CAAF;;YAAA;cAAA;YAAA;;YAAA;UAAA;QAHD,EAAX;;QAQA,IAAI,OAAOD,QAAP,KAAoB,UAAxB,EAAoC;UAChC,OAAOA,QAAQ,CAACG,KAAD,CAAf;QACH;;QAED,oBAAO,IAAAK,mBAAA,EAAaR,QAAb,EAAwDG,KAAxD,CAAP;MACH,CAfL,CADJ;IAmBH,CApBD;;IAsBAX,sBAAsB,CAACM,OAAvB,CAA+BD,OAA/B,IAA0CE,IAA1C;IAEA,OAAOP,sBAAsB,CAACM,OAAvB,CAA+BD,OAA/B,CAAP;EACH,CA/Be,EA+Bb,EA/Ba,CAAhB;;EAgCA,IAAI,CAACN,WAAW,CAACD,KAAZ,CAAkBmB,sBAAvB,EAA+C;IAC3C,oBACI,8IAA2EnB,KAAK,CAACoB,IAAjF,SADJ;EAGH;;EAED,oBAAO,4DAAGnB,WAAW,CAACD,KAAZ,CAAkBmB,sBAAlB,CAAyC;IAAEf,OAAO,EAAPA;EAAF,CAAzC,CAAH,CAAP;AACH,CA3CD;;eA6CeN,gB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CmsModelFieldValidatorConfigAdapter } from "../../../../utils/CmsModelFieldValidatorConfigAdapter";
|
|
3
|
+
interface ValidatorsSectionProps {
|
|
4
|
+
title: string;
|
|
5
|
+
fieldKey: "validators" | "listValidators";
|
|
6
|
+
description: string;
|
|
7
|
+
validators: CmsModelFieldValidatorConfigAdapter[];
|
|
8
|
+
}
|
|
9
|
+
export declare const ValidationsSection: ({ title, description, fieldKey, validators }: ValidatorsSectionProps) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
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.ValidationsSection = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
13
|
+
|
|
14
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
15
|
+
|
|
16
|
+
var _ValidatorsList = require("./ValidatorsList");
|
|
17
|
+
|
|
18
|
+
var bindTo = {
|
|
19
|
+
validators: "validation",
|
|
20
|
+
listValidators: "listValidation"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var ValidationsSection = function ValidationsSection(_ref) {
|
|
24
|
+
var title = _ref.title,
|
|
25
|
+
description = _ref.description,
|
|
26
|
+
fieldKey = _ref.fieldKey,
|
|
27
|
+
validators = _ref.validators;
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
29
|
+
span: 12
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
31
|
+
use: "headline5"
|
|
32
|
+
}, title), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
33
|
+
use: "body2"
|
|
34
|
+
}, description)), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
35
|
+
span: 12
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_ValidatorsList.ValidatorsList, {
|
|
37
|
+
name: bindTo[fieldKey],
|
|
38
|
+
validators: validators
|
|
39
|
+
})));
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.ValidationsSection = ValidationsSection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["bindTo","validators","listValidators","ValidationsSection","title","description","fieldKey"],"sources":["ValidationsSection.tsx"],"sourcesContent":["import React from \"react\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { ValidatorsList } from \"./ValidatorsList\";\nimport { CmsModelFieldValidatorConfigAdapter } from \"~/utils/CmsModelFieldValidatorConfigAdapter\";\n\ninterface ValidatorsSectionProps {\n title: string;\n fieldKey: \"validators\" | \"listValidators\";\n description: string;\n validators: CmsModelFieldValidatorConfigAdapter[];\n}\n\nconst bindTo = {\n validators: \"validation\",\n listValidators: \"listValidation\"\n};\n\nexport const ValidationsSection = ({\n title,\n description,\n fieldKey,\n validators\n}: ValidatorsSectionProps) => {\n return (\n <Grid>\n <Cell span={12}>\n <Typography use={\"headline5\"}>{title}</Typography>\n <br />\n <Typography use={\"body2\"}>{description}</Typography>\n </Cell>\n <Cell span={12}>\n <ValidatorsList name={bindTo[fieldKey]} validators={validators} />\n </Cell>\n </Grid>\n );\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAUA,IAAMA,MAAM,GAAG;EACXC,UAAU,EAAE,YADD;EAEXC,cAAc,EAAE;AAFL,CAAf;;AAKO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,OAKJ;EAAA,IAJ1BC,KAI0B,QAJ1BA,KAI0B;EAAA,IAH1BC,WAG0B,QAH1BA,WAG0B;EAAA,IAF1BC,QAE0B,QAF1BA,QAE0B;EAAA,IAD1BL,UAC0B,QAD1BA,UAC0B;EAC1B,oBACI,6BAAC,UAAD,qBACI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,sBAAD;IAAY,GAAG,EAAE;EAAjB,GAA+BG,KAA/B,CADJ,eAEI,wCAFJ,eAGI,6BAAC,sBAAD;IAAY,GAAG,EAAE;EAAjB,GAA2BC,WAA3B,CAHJ,CADJ,eAMI,6BAAC,UAAD;IAAM,IAAI,EAAE;EAAZ,gBACI,6BAAC,8BAAD;IAAgB,IAAI,EAAEL,MAAM,CAACM,QAAD,CAA5B;IAAwC,UAAU,EAAEL;EAApD,EADJ,CANJ,CADJ;AAYH,CAlBM"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CmsModelFieldValidatorConfigAdapter } from "../../../../utils/CmsModelFieldValidatorConfigAdapter";
|
|
3
|
+
interface ValidatorsTabProps {
|
|
4
|
+
name: string;
|
|
5
|
+
validators: CmsModelFieldValidatorConfigAdapter[];
|
|
6
|
+
}
|
|
7
|
+
export declare const ValidatorsList: React.FC<ValidatorsTabProps>;
|
|
8
|
+
export {};
|