@webiny/app-headless-cms 0.0.0-mt-3 → 0.0.0-unstable.2af142b57e
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 +45 -0
- package/HeadlessCMS.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryForm.js +129 -48
- package/admin/components/ContentEntryForm/ContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +42 -19
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js.map +1 -0
- package/admin/components/ContentEntryForm/Fields.d.ts +5 -6
- package/admin/components/ContentEntryForm/Fields.js +21 -15
- package/admin/components/ContentEntryForm/Fields.js.map +1 -0
- package/admin/components/ContentEntryForm/Label.d.ts +2 -4
- package/admin/components/ContentEntryForm/Label.js +18 -12
- package/admin/components/ContentEntryForm/Label.js.map +1 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +6 -5
- package/admin/components/ContentEntryForm/RenderFieldElement.js +29 -24
- package/admin/components/ContentEntryForm/RenderFieldElement.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/getValue.d.ts +9 -5
- package/admin/components/ContentEntryForm/functions/getValue.js +12 -9
- package/admin/components/ContentEntryForm/functions/getValue.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/setValue.d.ts +10 -6
- package/admin/components/ContentEntryForm/functions/setValue.js +15 -9
- package/admin/components/ContentEntryForm/functions/setValue.js.map +1 -0
- package/admin/components/ContentEntryForm/useBind.d.ts +7 -7
- package/admin/components/ContentEntryForm/useBind.js +61 -39
- package/admin/components/ContentEntryForm/useBind.js.map +1 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.d.ts +4 -6
- package/admin/components/ContentEntryForm/useContentEntryForm.js +396 -294
- package/admin/components/ContentEntryForm/useContentEntryForm.js.map +1 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.js +11 -5
- package/admin/components/ContentEntryForm/useRenderPlugins.js.map +1 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.d.ts +40 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js +260 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js.map +1 -0
- package/admin/components/ContentModelEditor/Editor.d.ts +3 -2
- package/admin/components/ContentModelEditor/Editor.js +69 -65
- package/admin/components/ContentModelEditor/Editor.js.map +1 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +6 -4
- package/admin/components/ContentModelEditor/FieldsSidebar.js +37 -31
- package/admin/components/ContentModelEditor/FieldsSidebar.js.map +1 -0
- package/admin/components/ContentModelEditor/Header.d.ts +3 -2
- package/admin/components/ContentModelEditor/Header.js +20 -11
- package/admin/components/ContentModelEditor/Header.js.map +1 -0
- package/admin/components/ContentModelEditor/PreviewTab.js +25 -21
- package/admin/components/ContentModelEditor/PreviewTab.js.map +1 -0
- package/admin/components/ContentModelEditor/index.d.ts +2 -0
- package/admin/components/ContentModelEditor/index.js +27 -0
- package/admin/components/ContentModelEditor/index.js.map +1 -0
- package/admin/components/ContentModelEditor/useModelEditor.d.ts +1 -0
- package/admin/components/ContentModelEditor/useModelEditor.js +16 -0
- package/admin/components/ContentModelEditor/useModelEditor.js.map +1 -0
- package/admin/components/DelayedOnChange.d.ts +42 -0
- package/admin/components/DelayedOnChange.js +110 -0
- package/admin/components/DelayedOnChange.js.map +1 -0
- package/admin/components/Dialog.d.ts +4 -0
- package/admin/components/Dialog.js +28 -0
- package/admin/components/Dialog.js.map +1 -0
- package/admin/components/DragPreview.d.ts +3 -2
- package/admin/components/DragPreview.js +42 -38
- package/admin/components/DragPreview.js.map +1 -0
- package/admin/components/Draggable.d.ts +9 -6
- package/admin/components/Draggable.js +45 -40
- package/admin/components/Draggable.js.map +1 -0
- package/admin/components/DropZone/Center.d.ts +7 -6
- package/admin/components/DropZone/Center.js +50 -52
- package/admin/components/DropZone/Center.js.map +1 -0
- package/admin/components/DropZone/Horizontal.d.ts +7 -5
- package/admin/components/DropZone/Horizontal.js +29 -26
- package/admin/components/DropZone/Horizontal.js.map +1 -0
- package/admin/components/DropZone/Vertical.d.ts +4 -4
- package/admin/components/DropZone/Vertical.js +28 -24
- package/admin/components/DropZone/Vertical.js.map +1 -0
- package/admin/components/DropZone/index.js +27 -4
- package/admin/components/DropZone/index.js.map +1 -0
- package/admin/components/Droppable.d.ts +23 -12
- package/admin/components/Droppable.js +48 -34
- package/admin/components/Droppable.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +1 -1
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +54 -46
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +1 -8
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +88 -69
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +3 -5
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +61 -35
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.d.ts +10 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.js +34 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.d.ts +8 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.js +189 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +7 -5
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +14 -10
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +8 -6
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +17 -14
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.d.ts +13 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.js +91 -0
- package/admin/components/FieldEditor/EditFieldDialog/getValidators.js.map +1 -0
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +8 -8
- package/admin/components/FieldEditor/EditFieldDialog.js +133 -220
- package/admin/components/FieldEditor/EditFieldDialog.js.map +1 -0
- package/admin/components/FieldEditor/Field.d.ts +8 -1
- package/admin/components/FieldEditor/Field.js +117 -106
- package/admin/components/FieldEditor/Field.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditor.d.ts +6 -6
- package/admin/components/FieldEditor/FieldEditor.js +126 -81
- package/admin/components/FieldEditor/FieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +79 -30
- package/admin/components/FieldEditor/FieldEditorContext.js +150 -124
- package/admin/components/FieldEditor/FieldEditorContext.js.map +1 -0
- package/admin/components/FieldEditor/Styled.d.ts +4 -2
- package/admin/components/FieldEditor/Styled.js +23 -20
- package/admin/components/FieldEditor/Styled.js.map +1 -0
- package/admin/components/FieldEditor/index.d.ts +1 -1
- package/admin/components/FieldEditor/index.js +19 -2
- package/admin/components/FieldEditor/index.js.map +1 -0
- package/admin/components/FieldEditor/useModelFieldEditor.d.ts +2 -0
- package/admin/components/FieldEditor/useModelFieldEditor.js +15 -0
- package/admin/components/FieldEditor/useModelFieldEditor.js.map +1 -0
- package/admin/components/FieldEditor/utils/deleteField.d.ts +6 -8
- package/admin/components/FieldEditor/utils/deleteField.js +21 -12
- package/admin/components/FieldEditor/utils/deleteField.js.map +1 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +6 -5
- package/admin/components/FieldEditor/utils/getFieldPosition.js +14 -9
- package/admin/components/FieldEditor/utils/getFieldPosition.js.map +1 -0
- package/admin/components/FieldEditor/utils/index.js +34 -4
- package/admin/components/FieldEditor/utils/index.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveField.d.ts +6 -5
- package/admin/components/FieldEditor/utils/moveField.js +37 -31
- package/admin/components/FieldEditor/utils/moveField.js.map +1 -0
- package/admin/components/FieldEditor/utils/moveRow.d.ts +5 -6
- package/admin/components/FieldEditor/utils/moveRow.js +16 -8
- package/admin/components/FieldEditor/utils/moveRow.js.map +1 -0
- package/admin/components/IconPicker.d.ts +7 -0
- package/admin/components/IconPicker.js +213 -0
- package/admin/components/IconPicker.js.map +1 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.d.ts +36 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.js +18 -0
- package/admin/components/ModelFieldProvider/ModelFieldContext.js.map +1 -0
- package/admin/components/ModelFieldProvider/index.d.ts +2 -0
- package/admin/components/ModelFieldProvider/index.js +27 -0
- package/admin/components/ModelFieldProvider/index.js.map +1 -0
- package/admin/components/ModelFieldProvider/useModelField.d.ts +35 -0
- package/admin/components/ModelFieldProvider/useModelField.js +33 -0
- package/admin/components/ModelFieldProvider/useModelField.js.map +1 -0
- package/admin/components/ModelProvider/ModelContext.d.ts +9 -0
- package/admin/components/ModelProvider/ModelContext.js +18 -0
- package/admin/components/ModelProvider/ModelContext.js.map +1 -0
- package/admin/components/ModelProvider/index.d.ts +2 -0
- package/admin/components/ModelProvider/index.js +27 -0
- package/admin/components/ModelProvider/index.js.map +1 -0
- package/admin/components/ModelProvider/useModel.d.ts +9 -0
- package/admin/components/ModelProvider/useModel.js +20 -0
- package/admin/components/ModelProvider/useModel.js.map +1 -0
- package/admin/constants/statusLabels.d.ts +2 -8
- package/admin/constants/statusLabels.js +17 -12
- package/admin/constants/statusLabels.js.map +1 -0
- package/admin/contexts/Cms/NetworkError.js +10 -5
- package/admin/contexts/Cms/NetworkError.js.map +1 -0
- package/admin/contexts/Cms/index.d.ts +64 -5
- package/admin/contexts/Cms/index.js +117 -32
- package/admin/contexts/Cms/index.js.map +1 -0
- package/admin/elements/ContentGroupMenuElement.js +19 -13
- package/admin/elements/ContentGroupMenuElement.js.map +1 -0
- package/admin/elements/ContentModelMenuElement.js +19 -13
- package/admin/elements/ContentModelMenuElement.js.map +1 -0
- package/admin/elements/NothingToShowElement.d.ts +1 -1
- package/admin/elements/NothingToShowElement.js +36 -39
- package/admin/elements/NothingToShowElement.js.map +1 -0
- package/admin/graphql/contentEntries.d.ts +145 -11
- package/admin/graphql/contentEntries.js +103 -56
- package/admin/graphql/contentEntries.js.map +1 -0
- package/admin/graphql/contentModels.d.ts +29 -1
- package/admin/graphql/contentModels.js +25 -6
- package/admin/graphql/contentModels.js.map +1 -0
- package/admin/graphql/createFieldsList.d.ts +7 -2
- package/admin/graphql/createFieldsList.js +16 -8
- package/admin/graphql/createFieldsList.js.map +1 -0
- package/admin/hooks/index.d.ts +6 -0
- package/admin/hooks/index.js +100 -5
- package/admin/hooks/index.js.map +1 -0
- package/admin/hooks/useApolloClient.d.ts +2 -1
- package/admin/hooks/useApolloClient.js +11 -6
- package/admin/hooks/useApolloClient.js.map +1 -0
- package/admin/hooks/useCms.d.ts +2 -2
- package/admin/hooks/useCms.js +10 -7
- package/admin/hooks/useCms.js.map +1 -0
- package/admin/hooks/useLazyQuery.d.ts +4 -1
- package/admin/hooks/useLazyQuery.js +14 -10
- package/admin/hooks/useLazyQuery.js.map +1 -0
- package/admin/hooks/useMutation.d.ts +4 -1
- package/admin/hooks/useMutation.js +14 -10
- package/admin/hooks/useMutation.js.map +1 -0
- package/admin/hooks/usePermission.d.ts +19 -20
- package/admin/hooks/usePermission.js +60 -114
- package/admin/hooks/usePermission.js.map +1 -0
- package/admin/hooks/useQuery.d.ts +4 -1
- package/admin/hooks/useQuery.js +14 -10
- package/admin/hooks/useQuery.js.map +1 -0
- package/admin/hooks/useQueryLocale.d.ts +4 -0
- package/admin/hooks/useQueryLocale.js +21 -0
- package/admin/hooks/useQueryLocale.js.map +1 -0
- package/admin/icons/clone.svg +14 -0
- package/admin/icons/draft.svg +3 -0
- package/admin/icons/published.svg +3 -0
- package/admin/icons/unpublished.svg +3 -0
- package/admin/menus/CmsMenuLoader.d.ts +2 -0
- package/admin/menus/CmsMenuLoader.js +46 -0
- package/admin/menus/CmsMenuLoader.js.map +1 -0
- package/admin/menus/ContentGroupsMenuItems.d.ts +2 -0
- package/admin/menus/ContentGroupsMenuItems.js +85 -0
- package/admin/menus/ContentGroupsMenuItems.js.map +1 -0
- package/admin/{plugins/menus → menus}/GlobalSearchPlugins.d.ts +2 -1
- package/admin/menus/GlobalSearchPlugins.js +59 -0
- package/admin/menus/GlobalSearchPlugins.js.map +1 -0
- package/admin/menus/NothingToShowElement.d.ts +2 -0
- package/admin/menus/NothingToShowElement.js +53 -0
- package/admin/menus/NothingToShowElement.js.map +1 -0
- package/admin/plugins/apiInformation/index.js +21 -16
- package/admin/plugins/apiInformation/index.js.map +1 -0
- package/admin/plugins/arrayUtils.d.ts +12 -0
- package/admin/plugins/arrayUtils.js +45 -0
- package/admin/plugins/arrayUtils.js.map +1 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +24 -26
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +23 -24
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js.map +1 -0
- package/admin/plugins/editor/defaultBar/BackButton.d.ts +1 -1
- package/admin/plugins/editor/defaultBar/BackButton.js +21 -12
- package/admin/plugins/editor/defaultBar/BackButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/CreateContentButton.js +29 -27
- package/admin/plugins/editor/defaultBar/CreateContentButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Divider.d.ts +3 -1
- package/admin/plugins/editor/defaultBar/Divider.js +11 -3
- package/admin/plugins/editor/defaultBar/Divider.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +4 -4
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js +67 -56
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +23 -17
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +3 -2
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +23 -10
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.js +13 -1
- package/admin/plugins/editor/defaultBar/FormSettings/index.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/Name.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/Name/Name.js +45 -42
- package/admin/plugins/editor/defaultBar/Name/Name.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +5 -3
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js +18 -7
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js.map +1 -0
- package/admin/plugins/editor/defaultBar/Name/index.js +12 -1
- package/admin/plugins/editor/defaultBar/Name/index.js.map +1 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js +59 -59
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js.map +1 -0
- package/admin/plugins/editor/defaultBar/index.js +23 -15
- package/admin/plugins/editor/defaultBar/index.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js +33 -20
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js.map +1 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.js +21 -15
- package/admin/plugins/editor/formSettings/components/GroupSelect.js.map +1 -0
- package/admin/plugins/editor/formSettings/index.js +15 -6
- package/admin/plugins/editor/formSettings/index.js.map +1 -0
- package/admin/plugins/entry/DefaultOnEntryDelete.d.ts +2 -0
- package/admin/plugins/entry/DefaultOnEntryDelete.js +157 -0
- package/admin/plugins/entry/DefaultOnEntryDelete.js.map +1 -0
- package/admin/plugins/entry/DefaultOnEntryPublish.d.ts +2 -0
- package/admin/plugins/entry/DefaultOnEntryPublish.js +134 -0
- package/admin/plugins/entry/DefaultOnEntryPublish.js.map +1 -0
- package/admin/plugins/fieldRenderers/Accordion.d.ts +5 -6
- package/admin/plugins/fieldRenderers/Accordion.js +44 -35
- package/admin/plugins/fieldRenderers/Accordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +17 -7
- package/admin/plugins/fieldRenderers/DynamicSection.js +44 -43
- package/admin/plugins/fieldRenderers/DynamicSection.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +22 -15
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js.map +1 -0
- package/admin/plugins/fieldRenderers/boolean/index.js +10 -2
- package/admin/plugins/fieldRenderers/boolean/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/checkboxes.js +42 -28
- package/admin/plugins/fieldRenderers/checkboxes.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.d.ts +10 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.js +68 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +6 -6
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +130 -95
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +6 -5
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +117 -79
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +8 -9
- package/admin/plugins/fieldRenderers/dateTime/Input.js +16 -11
- package/admin/plugins/fieldRenderers/dateTime/Input.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +10 -3
- package/admin/plugins/fieldRenderers/dateTime/Select.js +12 -6
- package/admin/plugins/fieldRenderers/dateTime/Select.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +3 -3
- package/admin/plugins/fieldRenderers/dateTime/Time.js +60 -8
- package/admin/plugins/fieldRenderers/dateTime/Time.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +31 -30
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +47 -45
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/index.js +11 -3
- package/admin/plugins/fieldRenderers/dateTime/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +12 -9
- package/admin/plugins/fieldRenderers/dateTime/utils.js +66 -22
- package/admin/plugins/fieldRenderers/dateTime/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.d.ts +12 -0
- package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.js +85 -0
- package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.d.ts +11 -0
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.js +114 -0
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.d.ts +11 -0
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js +54 -0
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.d.ts +8 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.js +54 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.d.ts +8 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.js +40 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.d.ts +6 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js +17 -0
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js.map +1 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.d.ts +2 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js +56 -0
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/File.d.ts +5 -5
- package/admin/plugins/fieldRenderers/file/File.js +38 -29
- package/admin/plugins/fieldRenderers/file/File.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileField.js +43 -43
- package/admin/plugins/fieldRenderers/file/fileField.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js +86 -75
- package/admin/plugins/fieldRenderers/file/fileFields.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/index.js +11 -3
- package/admin/plugins/fieldRenderers/file/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/file/utils.d.ts +9 -4
- package/admin/plugins/fieldRenderers/file/utils.js +23 -17
- package/admin/plugins/fieldRenderers/file/utils.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/index.js +11 -3
- package/admin/plugins/fieldRenderers/longText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longText.js +22 -15
- package/admin/plugins/fieldRenderers/longText/longText.js.map +1 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.js +24 -18
- package/admin/plugins/fieldRenderers/longText/longTexts.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/index.js +11 -3
- package/admin/plugins/fieldRenderers/number/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js +22 -15
- package/admin/plugins/fieldRenderers/number/numberInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.js +24 -19
- package/admin/plugins/fieldRenderers/number/numberInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.d.ts +5 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.js +48 -5
- package/admin/plugins/fieldRenderers/object/StyledComponents.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/arrow_drop_down.svg +1 -0
- package/admin/plugins/fieldRenderers/object/arrow_drop_up.svg +1 -0
- package/admin/plugins/fieldRenderers/object/index.js +13 -3
- package/admin/plugins/fieldRenderers/object/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.js +116 -60
- package/admin/plugins/fieldRenderers/object/multipleObjects.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js +122 -0
- package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/singleObjectAccordion.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/singleObjectAccordion.js +45 -0
- package/admin/plugins/fieldRenderers/object/singleObjectAccordion.js.map +1 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.js +52 -0
- package/admin/plugins/fieldRenderers/object/singleObjectInline.js.map +1 -0
- package/admin/plugins/fieldRenderers/radioButtons.js +35 -23
- package/admin/plugins/fieldRenderers/radioButtons.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +8 -5
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +108 -43
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +8 -5
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +87 -46
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/EntryStatus.d.ts +10 -0
- package/admin/plugins/fieldRenderers/ref/components/EntryStatus.js +56 -0
- package/admin/plugins/fieldRenderers/ref/components/EntryStatus.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.d.ts +7 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.js +41 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.d.ts +10 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js +152 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.js +16 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/graphql.d.ts +59 -1
- package/admin/plugins/fieldRenderers/ref/components/graphql.js +30 -8
- package/admin/plugins/fieldRenderers/ref/components/graphql.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/helpers.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/components/helpers.js +47 -0
- package/admin/plugins/fieldRenderers/ref/components/helpers.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/renderItem.d.ts +10 -2
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js +36 -8
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/types.d.ts +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 +8 -13
- package/admin/plugins/fieldRenderers/ref/components/useReference.js +153 -163
- package/admin/plugins/fieldRenderers/ref/components/useReference.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +11 -14
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js +144 -122
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.d.ts +12 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.js +59 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.d.ts +8 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.js +41 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/index.js +11 -3
- package/admin/plugins/fieldRenderers/ref/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInput.js +19 -12
- package/admin/plugins/fieldRenderers/ref/refInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js +20 -15
- package/admin/plugins/fieldRenderers/ref/refInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/index.js +11 -3
- package/admin/plugins/fieldRenderers/richText/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js +31 -20
- package/admin/plugins/fieldRenderers/richText/richTextInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +38 -27
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js.map +1 -0
- package/admin/plugins/fieldRenderers/select.js +41 -18
- package/admin/plugins/fieldRenderers/select.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/index.js +11 -3
- package/admin/plugins/fieldRenderers/text/index.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInput.js +22 -15
- package/admin/plugins/fieldRenderers/text/textInput.js.map +1 -0
- package/admin/plugins/fieldRenderers/text/textInputs.js +24 -19
- package/admin/plugins/fieldRenderers/text/textInputs.js.map +1 -0
- package/admin/plugins/fieldValidators/date/availableValidators.js +9 -4
- package/admin/plugins/fieldValidators/date/availableValidators.js.map +1 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +3 -2
- package/admin/plugins/fieldValidators/date/createDateInputField.js +24 -21
- package/admin/plugins/fieldValidators/date/createDateInputField.js.map +1 -0
- package/admin/plugins/fieldValidators/dateGte.d.ts +2 -2
- package/admin/plugins/fieldValidators/dateGte.js +77 -31
- package/admin/plugins/fieldValidators/dateGte.js.map +1 -0
- package/admin/plugins/fieldValidators/dateLte.d.ts +2 -2
- package/admin/plugins/fieldValidators/dateLte.js +77 -31
- package/admin/plugins/fieldValidators/dateLte.js.map +1 -0
- package/admin/plugins/fieldValidators/dynamicZone.d.ts +2 -0
- package/admin/plugins/fieldValidators/dynamicZone.js +163 -0
- package/admin/plugins/fieldValidators/dynamicZone.js.map +1 -0
- package/admin/plugins/fieldValidators/gte.d.ts +3 -3
- package/admin/plugins/fieldValidators/gte.js +51 -14
- package/admin/plugins/fieldValidators/gte.js.map +1 -0
- package/admin/plugins/fieldValidators/in.d.ts +3 -3
- package/admin/plugins/fieldValidators/in.js +51 -14
- package/admin/plugins/fieldValidators/in.js.map +1 -0
- package/admin/plugins/fieldValidators/lte.d.ts +3 -3
- package/admin/plugins/fieldValidators/lte.js +51 -14
- package/admin/plugins/fieldValidators/lte.js.map +1 -0
- package/admin/plugins/fieldValidators/maxLength.d.ts +3 -3
- package/admin/plugins/fieldValidators/maxLength.js +62 -15
- package/admin/plugins/fieldValidators/maxLength.js.map +1 -0
- package/admin/plugins/fieldValidators/minLength.d.ts +3 -3
- package/admin/plugins/fieldValidators/minLength.js +62 -15
- package/admin/plugins/fieldValidators/minLength.js.map +1 -0
- package/admin/plugins/fieldValidators/pattern.d.ts +3 -3
- package/admin/plugins/fieldValidators/pattern.js +125 -63
- package/admin/plugins/fieldValidators/pattern.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/email.js +16 -6
- package/admin/plugins/fieldValidators/patternPlugins/email.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +15 -5
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js +19 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +15 -5
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js +19 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js.map +1 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +3 -3
- package/admin/plugins/fieldValidators/patternPlugins/url.js +15 -5
- package/admin/plugins/fieldValidators/patternPlugins/url.js.map +1 -0
- package/admin/plugins/fieldValidators/required.d.ts +3 -3
- package/admin/plugins/fieldValidators/required.js +16 -4
- package/admin/plugins/fieldValidators/required.js.map +1 -0
- package/admin/plugins/fieldValidators/unique.js +39 -0
- package/admin/plugins/fieldValidators/unique.js.map +1 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +7 -5
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +109 -71
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js.map +1 -0
- package/admin/plugins/fields/boolean.d.ts +2 -2
- package/admin/plugins/fields/boolean.js +35 -12
- package/admin/plugins/fields/boolean.js.map +1 -0
- package/admin/plugins/fields/dateTime.d.ts +2 -2
- package/admin/plugins/fields/dateTime.js +72 -52
- package/admin/plugins/fields/dateTime.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/AddTemplate.d.ts +11 -0
- package/admin/plugins/fields/dynamicZone/AddTemplate.js +91 -0
- package/admin/plugins/fields/dynamicZone/AddTemplate.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/DynamicZone.d.ts +2 -0
- package/admin/plugins/fields/dynamicZone/DynamicZone.js +62 -0
- package/admin/plugins/fields/dynamicZone/DynamicZone.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.d.ts +11 -0
- package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.js +104 -0
- package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/TemplateDialog.d.ts +9 -0
- package/admin/plugins/fields/dynamicZone/TemplateDialog.js +141 -0
- package/admin/plugins/fields/dynamicZone/TemplateDialog.js.map +1 -0
- package/admin/plugins/fields/dynamicZone/commonValidators.d.ts +2 -0
- package/admin/plugins/fields/dynamicZone/commonValidators.js +26 -0
- package/admin/plugins/fields/dynamicZone/commonValidators.js.map +1 -0
- package/admin/plugins/fields/dynamicZone.d.ts +2 -0
- package/admin/plugins/fields/dynamicZone.js +83 -0
- package/admin/plugins/fields/dynamicZone.js.map +1 -0
- package/admin/plugins/fields/file.d.ts +2 -2
- package/admin/plugins/fields/file.js +26 -20
- package/admin/plugins/fields/file.js.map +1 -0
- package/admin/plugins/fields/longText.d.ts +2 -2
- package/admin/plugins/fields/longText.js +26 -20
- package/admin/plugins/fields/longText.js.map +1 -0
- package/admin/plugins/fields/number.d.ts +2 -2
- package/admin/plugins/fields/number.js +31 -25
- package/admin/plugins/fields/number.js.map +1 -0
- package/admin/plugins/fields/object/ObjectFields.d.ts +7 -4
- package/admin/plugins/fields/object/ObjectFields.js +25 -18
- package/admin/plugins/fields/object/ObjectFields.js.map +1 -0
- package/admin/plugins/fields/object.d.ts +2 -2
- package/admin/plugins/fields/object.js +27 -16
- package/admin/plugins/fields/object.js.map +1 -0
- package/admin/plugins/fields/ref.d.ts +2 -2
- package/admin/plugins/fields/ref.js +116 -115
- package/admin/plugins/fields/ref.js.map +1 -0
- package/admin/plugins/fields/richText.d.ts +2 -2
- package/admin/plugins/fields/richText.js +26 -21
- package/admin/plugins/fields/richText.js.map +1 -0
- package/admin/plugins/fields/text.d.ts +2 -2
- package/admin/plugins/fields/text.js +30 -24
- package/admin/plugins/fields/text.js.map +1 -0
- package/admin/plugins/getObjectId.d.ts +3 -3
- package/admin/plugins/getObjectId.js +14 -11
- package/admin/plugins/getObjectId.js.map +1 -0
- package/admin/plugins/icons.js +24 -12
- package/admin/plugins/icons.js.map +1 -0
- package/admin/plugins/index.d.ts +28 -7
- package/admin/plugins/index.js +20 -14
- package/admin/plugins/index.js.map +1 -0
- package/admin/plugins/install.d.ts +22 -0
- package/admin/plugins/install.js +107 -83
- package/admin/plugins/install.js.map +1 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +11 -5
- package/admin/plugins/permissionRenderer/CmsPermissions.js +81 -107
- package/admin/plugins/permissionRenderer/CmsPermissions.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +12 -8
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js +61 -60
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +11 -8
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js +48 -42
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +8 -6
- package/admin/plugins/permissionRenderer/components/ContentModelList.js +33 -28
- package/admin/plugins/permissionRenderer/components/ContentModelList.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +14 -10
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +65 -58
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +10 -5
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +26 -13
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +12 -27
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js +51 -34
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +3 -1
- package/admin/plugins/permissionRenderer/components/StyledComponents.js +11 -3
- package/admin/plugins/permissionRenderer/components/StyledComponents.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/types.d.ts +16 -0
- package/admin/plugins/permissionRenderer/components/types.js +5 -0
- package/admin/plugins/permissionRenderer/components/types.js.map +1 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.d.ts +17 -1
- package/admin/plugins/permissionRenderer/components/useCmsData.js +92 -64
- package/admin/plugins/permissionRenderer/components/useCmsData.js.map +1 -0
- package/admin/plugins/permissionRenderer/index.d.ts +2 -2
- package/admin/plugins/permissionRenderer/index.js +18 -9
- package/admin/plugins/permissionRenderer/index.js.map +1 -0
- package/admin/plugins/routes.js +51 -42
- package/admin/plugins/routes.js.map +1 -0
- package/admin/plugins/transformers/dateTransformer.d.ts +1 -2
- package/admin/plugins/transformers/dateTransformer.js +119 -30
- package/admin/plugins/transformers/dateTransformer.js.map +1 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.d.ts +2 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.js +36 -0
- package/admin/plugins/transformers/dynamicZoneTransformer.js.map +1 -0
- package/admin/plugins/transformers/index.js +13 -5
- package/admin/plugins/transformers/index.js.map +1 -0
- package/admin/plugins/transformers/numberTransformer.d.ts +1 -2
- package/admin/plugins/transformers/numberTransformer.js +9 -3
- package/admin/plugins/transformers/numberTransformer.js.map +1 -0
- package/admin/plugins/upgrades/5.19.0/UpgradeItemsInfo.d.ts +7 -0
- package/admin/plugins/upgrades/5.19.0/UpgradeItemsInfo.js +51 -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 +54 -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 +18 -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 +14 -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 +16 -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 +14 -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 +108 -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 +48 -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 +59 -0
- package/admin/plugins/upgrades/5.33.0/upgrade.js.map +1 -0
- package/admin/plugins/upgrades/v5.0.0.js +66 -69
- 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 +538 -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 +162 -0
- package/admin/plugins/upgrades/v5.33.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.5.0.js +66 -69
- package/admin/plugins/upgrades/v5.5.0.js.map +1 -0
- package/admin/plugins/upgrades/v5.8.0.js +66 -69
- package/admin/plugins/upgrades/v5.8.0.js.map +1 -0
- package/admin/plugins/welcomeScreenWidget.js +17 -9
- package/admin/plugins/welcomeScreenWidget.js.map +1 -0
- package/admin/views/contentEntries/ContentEntries.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntries.js +66 -62
- package/admin/views/contentEntries/ContentEntries.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +19 -15
- package/admin/views/contentEntries/ContentEntriesContext.js +56 -44
- package/admin/views/contentEntries/ContentEntriesContext.js.map +1 -0
- package/admin/views/contentEntries/ContentEntriesList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntriesList.js +138 -118
- package/admin/views/contentEntries/ContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +19 -14
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +124 -74
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.d.ts +1 -0
- package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.js +23 -0
- package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.d.ts +4 -4
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +114 -117
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js +29 -26
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/cache.d.ts +9 -7
- package/admin/views/contentEntries/ContentEntry/cache.js +111 -96
- package/admin/views/contentEntries/ContentEntry/cache.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/Header.js +24 -18
- package/admin/views/contentEntries/ContentEntry/header/Header.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js +100 -117
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/index.js +19 -24
- package/admin/views/contentEntries/ContentEntry/header/index.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js +47 -42
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +1 -3
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js +71 -75
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js +24 -23
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js +92 -56
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +23 -9
- package/admin/views/contentEntries/ContentEntry/useRevision.js +206 -295
- package/admin/views/contentEntries/ContentEntry/useRevision.js.map +1 -0
- package/admin/views/contentEntries/ContentEntry.d.ts +1 -2
- package/admin/views/contentEntries/ContentEntry.js +51 -53
- package/admin/views/contentEntries/ContentEntry.js.map +1 -0
- package/admin/views/contentEntries/experiment/ContentEntriesModule.d.ts +2 -0
- package/admin/views/contentEntries/experiment/ContentEntriesModule.js +68 -0
- package/admin/views/contentEntries/experiment/ContentEntriesModule.js.map +1 -0
- package/admin/views/contentEntries/experiment/ContentEntriesRenderer.d.ts +2 -0
- package/admin/views/contentEntries/experiment/ContentEntriesRenderer.js +24 -0
- package/admin/views/contentEntries/experiment/ContentEntriesRenderer.js.map +1 -0
- package/admin/views/contentEntries/experiment/ContentEntriesViewConfig.d.ts +35 -0
- package/admin/views/contentEntries/experiment/ContentEntriesViewConfig.js +131 -0
- package/admin/views/contentEntries/experiment/ContentEntriesViewConfig.js.map +1 -0
- package/admin/views/contentEntries/experiment/Property.d.ts +34 -0
- package/admin/views/contentEntries/experiment/Property.js +200 -0
- package/admin/views/contentEntries/experiment/Property.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntries.js +14 -4
- package/admin/views/contentEntries/hooks/useContentEntries.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +4 -7
- package/admin/views/contentEntries/hooks/useContentEntriesList.js +79 -81
- package/admin/views/contentEntries/hooks/useContentEntriesList.js.map +1 -0
- package/admin/views/contentEntries/hooks/useContentEntry.js +14 -4
- package/admin/views/contentEntries/hooks/useContentEntry.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroups.d.ts +2 -2
- package/admin/views/contentModelGroups/ContentModelGroups.js +26 -22
- package/admin/views/contentModelGroups/ContentModelGroups.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +151 -173
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js.map +1 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +177 -166
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js.map +1 -0
- package/admin/views/contentModelGroups/graphql.d.ts +68 -0
- package/admin/views/contentModelGroups/graphql.js +36 -8
- package/admin/views/contentModelGroups/graphql.js.map +1 -0
- package/admin/views/contentModels/CloneContentModelDialog.d.ts +11 -0
- package/admin/views/contentModels/CloneContentModelDialog.js +230 -0
- package/admin/views/contentModels/CloneContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/ContentModelEditor.d.ts +3 -2
- package/admin/views/contentModels/ContentModelEditor.js +27 -28
- package/admin/views/contentModels/ContentModelEditor.js.map +1 -0
- package/admin/views/contentModels/ContentModels.d.ts +2 -2
- package/admin/views/contentModels/ContentModels.js +59 -37
- package/admin/views/contentModels/ContentModels.js.map +1 -0
- package/admin/views/contentModels/ContentModelsDataList.d.ts +6 -4
- package/admin/views/contentModels/ContentModelsDataList.js +180 -189
- package/admin/views/contentModels/ContentModelsDataList.js.map +1 -0
- package/admin/views/contentModels/NewContentModelDialog.d.ts +2 -2
- package/admin/views/contentModels/NewContentModelDialog.js +194 -160
- package/admin/views/contentModels/NewContentModelDialog.js.map +1 -0
- package/admin/views/contentModels/cache.d.ts +12 -4
- package/admin/views/contentModels/cache.js +79 -33
- package/admin/views/contentModels/cache.js.map +1 -0
- package/admin/views/contentModels/types.d.ts +4 -0
- package/admin/views/contentModels/types.js +5 -0
- package/admin/views/contentModels/types.js.map +1 -0
- package/admin/views/utils.d.ts +3 -2
- package/admin/views/utils.js +16 -23
- package/admin/views/utils.js.map +1 -0
- package/admin/viewsGraphql.d.ts +63 -0
- package/admin/viewsGraphql.js +43 -9
- package/admin/viewsGraphql.js.map +1 -0
- package/allPlugins.d.ts +34 -0
- package/allPlugins.js +51 -0
- package/allPlugins.js.map +1 -0
- package/index.d.ts +12 -0
- package/index.js +39 -0
- package/index.js.map +1 -0
- package/package.json +49 -50
- package/{types.d.ts → types/index.d.ts} +130 -146
- package/types/index.js +38 -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 +79 -0
- package/utils/CmsModelFieldValidatorConfigAdapter.js.map +1 -0
- package/utils/createTypeName.d.ts +1 -0
- package/utils/createTypeName.js +13 -0
- package/utils/createTypeName.js.map +1 -0
- package/utils/createValidators.d.ts +3 -0
- package/utils/createValidators.js +76 -0
- package/utils/createValidators.js.map +1 -0
- package/utils/getFetchPolicy.d.ts +6 -0
- package/utils/getFetchPolicy.js +17 -0
- package/utils/getFetchPolicy.js.map +1 -0
- package/utils/getModelTitleFieldId.d.ts +2 -0
- package/utils/getModelTitleFieldId.js +13 -0
- package/utils/getModelTitleFieldId.js.map +1 -0
- package/admin/components/ContentEntryForm/functions/createValidators.d.ts +0 -1
- package/admin/components/ContentEntryForm/functions/createValidators.js +0 -58
- package/admin/components/ContentModelEditor/Context.d.ts +0 -23
- package/admin/components/ContentModelEditor/Context.js +0 -218
- package/admin/components/ContentModelEditor/useContentModelEditor.d.ts +0 -1
- package/admin/components/ContentModelEditor/useContentModelEditor.js +0 -11
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.d.ts +0 -10
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +0 -121
- package/admin/components/FieldEditor/useFieldEditor.d.ts +0 -1
- package/admin/components/FieldEditor/useFieldEditor.js +0 -5
- package/admin/plugins/fieldRenderers/object/singleObject.js +0 -45
- package/admin/plugins/fieldRenderers/ref/components/getOptions.d.ts +0 -1
- package/admin/plugins/fieldRenderers/ref/components/getOptions.js +0 -21
- package/admin/plugins/menus/CmsMenuLoader.d.ts +0 -7
- package/admin/plugins/menus/CmsMenuLoader.js +0 -76
- package/admin/plugins/menus/ContentGroupsMenuItems.d.ts +0 -6
- package/admin/plugins/menus/ContentGroupsMenuItems.js +0 -154
- package/admin/plugins/menus/GlobalSearchPlugins.js +0 -53
- package/admin/plugins/menus.d.ts +0 -4
- package/admin/plugins/menus.js +0 -19
- package/admin/plugins/validators/dateGte.js +0 -23
- package/admin/plugins/validators/dateLte.d.ts +0 -3
- package/admin/plugins/validators/dateLte.js +0 -23
- package/admin/plugins/validators/gte.d.ts +0 -3
- package/admin/plugins/validators/gte.js +0 -15
- package/admin/plugins/validators/in.d.ts +0 -3
- package/admin/plugins/validators/in.js +0 -15
- package/admin/plugins/validators/lte.d.ts +0 -3
- package/admin/plugins/validators/lte.js +0 -15
- package/admin/plugins/validators/maxLength.d.ts +0 -3
- package/admin/plugins/validators/maxLength.js +0 -15
- package/admin/plugins/validators/minLength.d.ts +0 -3
- package/admin/plugins/validators/minLength.js +0 -15
- package/admin/plugins/validators/pattern.d.ts +0 -9
- package/admin/plugins/validators/pattern.js +0 -34
- package/admin/plugins/validators/patternPlugins/email.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/email.js +0 -9
- package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/lowerCase.js +0 -9
- package/admin/plugins/validators/patternPlugins/upperCase.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/upperCase.js +0 -9
- package/admin/plugins/validators/patternPlugins/url.d.ts +0 -10
- package/admin/plugins/validators/patternPlugins/url.js +0 -9
- package/admin/plugins/validators/required.d.ts +0 -3
- package/admin/plugins/validators/required.js +0 -11
- package/admin/plugins/validators/timeGte.d.ts +0 -3
- package/admin/plugins/validators/timeGte.js +0 -19
- package/admin/plugins/validators/timeLte.d.ts +0 -3
- package/admin/plugins/validators/timeLte.js +0 -19
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.d.ts +0 -3
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +0 -67
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/rule-24px.svg +0 -1
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +0 -3
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +0 -69
- package/admin/views/contentEntries/ContentEntry/header/requestReview/emoji_people-24px.svg +0 -1
- package/admin/views/contentModelGroups/DelayedOnChange.d.ts +0 -25
- package/admin/views/contentModelGroups/DelayedOnChange.js +0 -134
- package/admin/views/contentModelGroups/IconPicker.d.ts +0 -7
- package/admin/views/contentModelGroups/IconPicker.js +0 -204
- package/types.js +0 -1
- /package/admin/plugins/fieldRenderers/object/{singleObject.d.ts → multipleObjectsAccordion.d.ts} +0 -0
- /package/admin/plugins/{validators/dateGte.d.ts → fieldValidators/unique.d.ts} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _i18n = require("@webiny/app/i18n");
|
|
14
|
+
var _SimpleForm = require("@webiny/app-admin/components/SimpleForm");
|
|
15
|
+
var _reactHooks = require("@apollo/react-hooks");
|
|
16
|
+
var _Alert = require("@webiny/ui/Alert");
|
|
17
|
+
var _Progress = require("@webiny/ui/Progress");
|
|
18
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
19
|
+
var _Button = require("@webiny/ui/Button");
|
|
20
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
21
|
+
var _locales = require("./5.33.0/locales");
|
|
22
|
+
var _upgrade = require("./5.33.0/upgrade");
|
|
23
|
+
var _templateObject, _templateObject2;
|
|
24
|
+
var t = _i18n.i18n.ns("app-headless-cms/admin/installation");
|
|
25
|
+
var getLabel = function getLabel(params) {
|
|
26
|
+
var error = params.error,
|
|
27
|
+
loading = params.loading,
|
|
28
|
+
upgrading = params.upgrading,
|
|
29
|
+
done = params.done;
|
|
30
|
+
if (error) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
32
|
+
title: t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["Something went wrong"]))),
|
|
33
|
+
type: "danger"
|
|
34
|
+
}, error);
|
|
35
|
+
} else if (upgrading) {
|
|
36
|
+
return t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Upgrading Headless CMS..."])));
|
|
37
|
+
} else if (loading) {
|
|
38
|
+
return "Loading Headless CMS information";
|
|
39
|
+
} else if (done) {
|
|
40
|
+
return "Upgrade done.";
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
var getLocaleList = function getLocaleList(locales) {
|
|
45
|
+
if (!locales) {
|
|
46
|
+
return null;
|
|
47
|
+
} else if (locales.length === 0) {
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
49
|
+
span: 12
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
51
|
+
use: "body1",
|
|
52
|
+
tag: "div"
|
|
53
|
+
}, "There are no locales to be upgraded...? This must be an error, please check the log.")));
|
|
54
|
+
}
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
56
|
+
span: 12
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
58
|
+
use: "body1",
|
|
59
|
+
tag: "div"
|
|
60
|
+
}, "List of locales to be upgraded: ", locales.map(function (locale) {
|
|
61
|
+
return locale.code;
|
|
62
|
+
}).join(", "))));
|
|
63
|
+
};
|
|
64
|
+
var Upgrade = function Upgrade(_ref) {
|
|
65
|
+
var onInstalled = _ref.onInstalled;
|
|
66
|
+
var client = (0, _reactHooks.useApolloClient)();
|
|
67
|
+
var _useState = (0, _react.useState)({
|
|
68
|
+
locales: null,
|
|
69
|
+
error: null,
|
|
70
|
+
loading: false,
|
|
71
|
+
upgrading: false,
|
|
72
|
+
done: false
|
|
73
|
+
}),
|
|
74
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
75
|
+
state = _useState2[0],
|
|
76
|
+
setState = _useState2[1];
|
|
77
|
+
var locales = state.locales,
|
|
78
|
+
error = state.error,
|
|
79
|
+
loading = state.loading,
|
|
80
|
+
upgrading = state.upgrading,
|
|
81
|
+
done = state.done;
|
|
82
|
+
(0, _react.useEffect)(function () {
|
|
83
|
+
if (locales || loading || done || !!error || upgrading) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setState(function (prev) {
|
|
87
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
88
|
+
loading: true
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
(0, _locales.fetchLocales)({
|
|
92
|
+
client: client
|
|
93
|
+
}).then(function (locales) {
|
|
94
|
+
setState(function (prev) {
|
|
95
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
96
|
+
loading: false,
|
|
97
|
+
locales: locales
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}).catch(function (ex) {
|
|
101
|
+
setState(function (prev) {
|
|
102
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
103
|
+
loading: false,
|
|
104
|
+
error: ex.message
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}, []);
|
|
109
|
+
var startUpgrade = (0, _react.useCallback)(function () {
|
|
110
|
+
if (upgrading) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
setState(function (prev) {
|
|
114
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
115
|
+
upgrading: true
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
(0, _upgrade.runUpgrade)({
|
|
119
|
+
locales: locales,
|
|
120
|
+
client: client
|
|
121
|
+
}).then(function () {
|
|
122
|
+
setState(function (prev) {
|
|
123
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
124
|
+
error: null,
|
|
125
|
+
upgrading: false,
|
|
126
|
+
done: true
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
onInstalled();
|
|
130
|
+
}).catch(function (error) {
|
|
131
|
+
setState(function (prev) {
|
|
132
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
|
|
133
|
+
upgrading: false,
|
|
134
|
+
done: false,
|
|
135
|
+
error: (error === null || error === void 0 ? void 0 : error.message) || "Unknown error. Please check the log."
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
console.log("error: ", JSON.stringify(error || {}));
|
|
139
|
+
});
|
|
140
|
+
}, [upgrading, locales, client]);
|
|
141
|
+
var label = getLabel({
|
|
142
|
+
error: error,
|
|
143
|
+
upgrading: upgrading,
|
|
144
|
+
done: done,
|
|
145
|
+
loading: loading
|
|
146
|
+
});
|
|
147
|
+
return /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleForm, null, !!label && /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, {
|
|
148
|
+
label: label
|
|
149
|
+
}), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormHeader, {
|
|
150
|
+
title: "Upgrade Headless CMS"
|
|
151
|
+
}), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormContent, null, /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
152
|
+
span: 12
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
154
|
+
use: "body1",
|
|
155
|
+
tag: "div"
|
|
156
|
+
}, "This upgrade will do the following:", /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, "update all model fields in all models and locales to contain", " ", /*#__PURE__*/_react.default.createElement("strong", null, "storageId")))))), getLocaleList(locales)), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormFooter, null, /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
157
|
+
disabled: loading || upgrading || done || !!error,
|
|
158
|
+
onClick: startUpgrade
|
|
159
|
+
}, "Upgrade")));
|
|
160
|
+
};
|
|
161
|
+
var _default = Upgrade;
|
|
162
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","getLabel","params","error","loading","upgrading","done","getLocaleList","locales","length","map","locale","code","join","Upgrade","onInstalled","client","useApolloClient","useState","state","setState","useEffect","prev","fetchLocales","then","catch","ex","message","startUpgrade","useCallback","runUpgrade","console","log","JSON","stringify","label"],"sources":["v5.33.0.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport {\n SimpleForm,\n SimpleFormContent,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"@webiny/app-admin/components/SimpleForm\";\nimport { useApolloClient } from \"@apollo/react-hooks\";\nimport { Alert } from \"@webiny/ui/Alert\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { ButtonPrimary } from \"@webiny/ui/Button\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { I18NLocaleItem } from \"@webiny/app-i18n/types\";\nimport { fetchLocales } from \"./5.33.0/locales\";\nimport { runUpgrade } from \"./5.33.0/upgrade\";\n\nconst t = i18n.ns(\"app-headless-cms/admin/installation\");\n\nconst getLabel = (params: Pick<UpgradeState, \"error\" | \"loading\" | \"upgrading\" | \"done\">) => {\n const { error, loading, upgrading, done } = params;\n if (error) {\n return (\n <Alert title={t`Something went wrong`} type={\"danger\"}>\n {error}\n </Alert>\n );\n } else if (upgrading) {\n return t`Upgrading Headless CMS...`;\n } else if (loading) {\n return \"Loading Headless CMS information\";\n } else if (done) {\n return `Upgrade done.`;\n }\n return null;\n};\n\nconst getLocaleList = (locales?: I18NLocaleItem[] | null) => {\n if (!locales) {\n return null;\n } else if (locales.length === 0) {\n return (\n <Grid>\n <Cell span={12}>\n <Typography use={\"body1\"} tag={\"div\"}>\n There are no locales to be upgraded...? This must be an error, please check\n the log.\n </Typography>\n </Cell>\n </Grid>\n );\n }\n return (\n <Grid>\n <Cell span={12}>\n <Typography use={\"body1\"} tag={\"div\"}>\n List of locales to be upgraded: {locales.map(locale => locale.code).join(\", \")}\n </Typography>\n </Cell>\n </Grid>\n );\n};\n\ninterface UpgradeState {\n locales?: I18NLocaleItem[] | null;\n error?: string | null;\n loading: boolean;\n upgrading: boolean;\n done: boolean;\n}\ninterface UpgradeProps {\n onInstalled: () => void;\n}\nconst Upgrade: React.FC<UpgradeProps> = ({ onInstalled }) => {\n const client = useApolloClient();\n\n const [state, setState] = useState<UpgradeState>({\n locales: null,\n error: null,\n loading: false,\n upgrading: false,\n done: false\n });\n\n const { locales, error, loading, upgrading, done } = state;\n\n useEffect(() => {\n if (locales || loading || done || !!error || upgrading) {\n return;\n }\n setState(prev => {\n return {\n ...prev,\n loading: true\n };\n });\n\n fetchLocales({ client })\n .then((locales: I18NLocaleItem[]) => {\n setState(prev => {\n return {\n ...prev,\n loading: false,\n locales\n };\n });\n })\n .catch(ex => {\n setState(prev => {\n return {\n ...prev,\n loading: false,\n error: ex.message\n };\n });\n });\n }, []);\n\n const startUpgrade = useCallback(() => {\n if (upgrading) {\n return;\n }\n\n setState(prev => {\n return {\n ...prev,\n upgrading: true\n };\n });\n runUpgrade({\n locales,\n client\n })\n .then(() => {\n setState(prev => {\n return {\n ...prev,\n error: null,\n upgrading: false,\n done: true\n };\n });\n onInstalled();\n })\n .catch((error?: Error) => {\n setState(prev => {\n return {\n ...prev,\n upgrading: false,\n done: false,\n error: error?.message || \"Unknown error. Please check the log.\"\n };\n });\n console.log(`error: `, JSON.stringify(error || {}));\n });\n }, [upgrading, locales, client]);\n\n const label = getLabel({\n error,\n upgrading,\n done,\n loading\n });\n\n return (\n <SimpleForm>\n {!!label && <CircularProgress label={label} />}\n <SimpleFormHeader title={\"Upgrade Headless CMS\"} />\n <SimpleFormContent>\n <Grid>\n <Cell span={12}>\n <Typography use={\"body1\"} tag={\"div\"}>\n This upgrade will do the following:\n <ul>\n <li>\n update all model fields in all models and locales to contain{\" \"}\n <strong>storageId</strong>\n </li>\n </ul>\n </Typography>\n </Cell>\n </Grid>\n {getLocaleList(locales)}\n </SimpleFormContent>\n <SimpleFormFooter>\n <ButtonPrimary\n disabled={loading || upgrading || done || !!error}\n onClick={startUpgrade}\n >\n Upgrade\n </ButtonPrimary>\n </SimpleFormFooter>\n </SimpleForm>\n );\n};\n\nexport default Upgrade;\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAA8C;AAE9C,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,qCAAqC,CAAC;AAExD,IAAMC,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,MAAsE,EAAK;EACzF,IAAQC,KAAK,GAA+BD,MAAM,CAA1CC,KAAK;IAAEC,OAAO,GAAsBF,MAAM,CAAnCE,OAAO;IAAEC,SAAS,GAAWH,MAAM,CAA1BG,SAAS;IAAEC,IAAI,GAAKJ,MAAM,CAAfI,IAAI;EACvC,IAAIH,KAAK,EAAE;IACP,oBACI,6BAAC,YAAK;MAAC,KAAK,EAAEL,CAAC,uGAAuB;MAAC,IAAI,EAAE;IAAS,GACjDK,KAAK,CACF;EAEhB,CAAC,MAAM,IAAIE,SAAS,EAAE;IAClB,OAAOP,CAAC;EACZ,CAAC,MAAM,IAAIM,OAAO,EAAE;IAChB,OAAO,kCAAkC;EAC7C,CAAC,MAAM,IAAIE,IAAI,EAAE;IACb;EACJ;EACA,OAAO,IAAI;AACf,CAAC;AAED,IAAMC,aAAa,GAAG,SAAhBA,aAAa,CAAIC,OAAiC,EAAK;EACzD,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,IAAI;EACf,CAAC,MAAM,IAAIA,OAAO,CAACC,MAAM,KAAK,CAAC,EAAE;IAC7B,oBACI,6BAAC,UAAI,qBACD,6BAAC,UAAI;MAAC,IAAI,EAAE;IAAG,gBACX,6BAAC,sBAAU;MAAC,GAAG,EAAE,OAAQ;MAAC,GAAG,EAAE;IAAM,GAAC,sFAGtC,CAAa,CACV,CACJ;EAEf;EACA,oBACI,6BAAC,UAAI,qBACD,6BAAC,UAAI;IAAC,IAAI,EAAE;EAAG,gBACX,6BAAC,sBAAU;IAAC,GAAG,EAAE,OAAQ;IAAC,GAAG,EAAE;EAAM,GAAC,kCACF,EAACD,OAAO,CAACE,GAAG,CAAC,UAAAC,MAAM;IAAA,OAAIA,MAAM,CAACC,IAAI;EAAA,EAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CACrE,CACV,CACJ;AAEf,CAAC;AAYD,IAAMC,OAA+B,GAAG,SAAlCA,OAA+B,OAAwB;EAAA,IAAlBC,WAAW,QAAXA,WAAW;EAClD,IAAMC,MAAM,GAAG,IAAAC,2BAAe,GAAE;EAEhC,gBAA0B,IAAAC,eAAQ,EAAe;MAC7CV,OAAO,EAAE,IAAI;MACbL,KAAK,EAAE,IAAI;MACXC,OAAO,EAAE,KAAK;MACdC,SAAS,EAAE,KAAK;MAChBC,IAAI,EAAE;IACV,CAAC,CAAC;IAAA;IANKa,KAAK;IAAEC,QAAQ;EAQtB,IAAQZ,OAAO,GAAsCW,KAAK,CAAlDX,OAAO;IAAEL,KAAK,GAA+BgB,KAAK,CAAzChB,KAAK;IAAEC,OAAO,GAAsBe,KAAK,CAAlCf,OAAO;IAAEC,SAAS,GAAWc,KAAK,CAAzBd,SAAS;IAAEC,IAAI,GAAKa,KAAK,CAAdb,IAAI;EAEhD,IAAAe,gBAAS,EAAC,YAAM;IACZ,IAAIb,OAAO,IAAIJ,OAAO,IAAIE,IAAI,IAAI,CAAC,CAACH,KAAK,IAAIE,SAAS,EAAE;MACpD;IACJ;IACAe,QAAQ,CAAC,UAAAE,IAAI,EAAI;MACb,mEACOA,IAAI;QACPlB,OAAO,EAAE;MAAI;IAErB,CAAC,CAAC;IAEF,IAAAmB,qBAAY,EAAC;MAAEP,MAAM,EAANA;IAAO,CAAC,CAAC,CACnBQ,IAAI,CAAC,UAAChB,OAAyB,EAAK;MACjCY,QAAQ,CAAC,UAAAE,IAAI,EAAI;QACb,mEACOA,IAAI;UACPlB,OAAO,EAAE,KAAK;UACdI,OAAO,EAAPA;QAAO;MAEf,CAAC,CAAC;IACN,CAAC,CAAC,CACDiB,KAAK,CAAC,UAAAC,EAAE,EAAI;MACTN,QAAQ,CAAC,UAAAE,IAAI,EAAI;QACb,mEACOA,IAAI;UACPlB,OAAO,EAAE,KAAK;UACdD,KAAK,EAAEuB,EAAE,CAACC;QAAO;MAEzB,CAAC,CAAC;IACN,CAAC,CAAC;EACV,CAAC,EAAE,EAAE,CAAC;EAEN,IAAMC,YAAY,GAAG,IAAAC,kBAAW,EAAC,YAAM;IACnC,IAAIxB,SAAS,EAAE;MACX;IACJ;IAEAe,QAAQ,CAAC,UAAAE,IAAI,EAAI;MACb,mEACOA,IAAI;QACPjB,SAAS,EAAE;MAAI;IAEvB,CAAC,CAAC;IACF,IAAAyB,mBAAU,EAAC;MACPtB,OAAO,EAAPA,OAAO;MACPQ,MAAM,EAANA;IACJ,CAAC,CAAC,CACGQ,IAAI,CAAC,YAAM;MACRJ,QAAQ,CAAC,UAAAE,IAAI,EAAI;QACb,mEACOA,IAAI;UACPnB,KAAK,EAAE,IAAI;UACXE,SAAS,EAAE,KAAK;UAChBC,IAAI,EAAE;QAAI;MAElB,CAAC,CAAC;MACFS,WAAW,EAAE;IACjB,CAAC,CAAC,CACDU,KAAK,CAAC,UAACtB,KAAa,EAAK;MACtBiB,QAAQ,CAAC,UAAAE,IAAI,EAAI;QACb,mEACOA,IAAI;UACPjB,SAAS,EAAE,KAAK;UAChBC,IAAI,EAAE,KAAK;UACXH,KAAK,EAAE,CAAAA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEwB,OAAO,KAAI;QAAsC;MAEvE,CAAC,CAAC;MACFI,OAAO,CAACC,GAAG,YAAYC,IAAI,CAACC,SAAS,CAAC/B,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC;EACV,CAAC,EAAE,CAACE,SAAS,EAAEG,OAAO,EAAEQ,MAAM,CAAC,CAAC;EAEhC,IAAMmB,KAAK,GAAGlC,QAAQ,CAAC;IACnBE,KAAK,EAALA,KAAK;IACLE,SAAS,EAATA,SAAS;IACTC,IAAI,EAAJA,IAAI;IACJF,OAAO,EAAPA;EACJ,CAAC,CAAC;EAEF,oBACI,6BAAC,sBAAU,QACN,CAAC,CAAC+B,KAAK,iBAAI,6BAAC,0BAAgB;IAAC,KAAK,EAAEA;EAAM,EAAG,eAC9C,6BAAC,4BAAgB;IAAC,KAAK,EAAE;EAAuB,EAAG,eACnD,6BAAC,6BAAiB,qBACd,6BAAC,UAAI,qBACD,6BAAC,UAAI;IAAC,IAAI,EAAE;EAAG,gBACX,6BAAC,sBAAU;IAAC,GAAG,EAAE,OAAQ;IAAC,GAAG,EAAE;EAAM,GAAC,qCAElC,qEACI,yCAAI,8DAC4D,EAAC,GAAG,eAChE,6CAAQ,WAAS,CAAS,CACzB,CACJ,CACI,CACV,CACJ,EACN5B,aAAa,CAACC,OAAO,CAAC,CACP,eACpB,6BAAC,4BAAgB,qBACb,6BAAC,qBAAa;IACV,QAAQ,EAAEJ,OAAO,IAAIC,SAAS,IAAIC,IAAI,IAAI,CAAC,CAACH,KAAM;IAClD,OAAO,EAAEyB;EAAa,GACzB,SAED,CAAgB,CACD,CACV;AAErB,CAAC;AAAC,eAEad,OAAO;AAAA"}
|
|
@@ -1,85 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
1
|
+
"use strict";
|
|
4
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
|
|
15
|
+
var _i18n = require("@webiny/app/i18n");
|
|
16
|
+
var _SimpleForm = require("@webiny/app-admin/components/SimpleForm");
|
|
17
|
+
var _reactHooks = require("@apollo/react-hooks");
|
|
18
|
+
var _Alert = require("@webiny/ui/Alert");
|
|
19
|
+
var _Progress = require("@webiny/ui/Progress");
|
|
20
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
21
|
+
var _Button = require("@webiny/ui/Button");
|
|
22
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
5
23
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import React, { useCallback, useState } from "react";
|
|
9
|
-
import gql from "graphql-tag";
|
|
10
|
-
import { i18n } from "@webiny/app/i18n";
|
|
11
|
-
import { SimpleForm, SimpleFormContent, SimpleFormFooter, SimpleFormHeader } from "@webiny/app-admin/components/SimpleForm";
|
|
12
|
-
import { useApolloClient } from "@apollo/react-hooks";
|
|
13
|
-
import { Alert } from "@webiny/ui/Alert";
|
|
14
|
-
import { CircularProgress } from "@webiny/ui/Progress";
|
|
15
|
-
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
16
|
-
import { ButtonPrimary } from "@webiny/ui/Button";
|
|
17
|
-
import { Typography } from "@webiny/ui/Typography";
|
|
18
|
-
var t = i18n.ns("app-headless-cms/admin/installation");
|
|
19
|
-
var UPGRADE = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mutation UpgradeCMS($version: String!) {\n cms {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n"])));
|
|
20
|
-
|
|
24
|
+
var t = _i18n.i18n.ns("app-headless-cms/admin/installation");
|
|
25
|
+
var UPGRADE = (0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n mutation UpgradeCMS($version: String!) {\n cms {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n"])));
|
|
21
26
|
var Upgrade = function Upgrade(_ref) {
|
|
22
27
|
var onInstalled = _ref.onInstalled;
|
|
23
|
-
var client = useApolloClient();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
onInstalled();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
case 3:
|
|
61
|
-
case "end":
|
|
62
|
-
return _context.stop();
|
|
63
|
-
}
|
|
28
|
+
var client = (0, _reactHooks.useApolloClient)();
|
|
29
|
+
var _useState = (0, _react.useState)(null),
|
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
|
+
error = _useState2[0],
|
|
32
|
+
setError = _useState2[1];
|
|
33
|
+
var _useState3 = (0, _react.useState)(false),
|
|
34
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
35
|
+
loading = _useState4[0],
|
|
36
|
+
setLoading = _useState4[1];
|
|
37
|
+
var startUpgrade = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
38
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
39
|
+
while (1) switch (_context.prev = _context.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
setLoading(true);
|
|
42
|
+
_context.next = 3;
|
|
43
|
+
return client.mutate({
|
|
44
|
+
mutation: UPGRADE,
|
|
45
|
+
variables: {
|
|
46
|
+
version: "5.5.0"
|
|
47
|
+
}
|
|
48
|
+
}).then(function (_ref3) {
|
|
49
|
+
var data = _ref3.data;
|
|
50
|
+
setLoading(false);
|
|
51
|
+
var error = data.cms.upgrade.error;
|
|
52
|
+
if (error) {
|
|
53
|
+
setError(error.message);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
onInstalled();
|
|
57
|
+
});
|
|
58
|
+
case 3:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
64
61
|
}
|
|
65
62
|
}, _callee);
|
|
66
63
|
})), []);
|
|
67
|
-
var label = error ? /*#__PURE__*/
|
|
68
|
-
title: t(_templateObject2 || (_templateObject2 =
|
|
64
|
+
var label = error ? /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
65
|
+
title: t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Something went wrong"]))),
|
|
69
66
|
type: "danger"
|
|
70
|
-
}, error) : t(_templateObject3 || (_templateObject3 =
|
|
71
|
-
return /*#__PURE__*/
|
|
67
|
+
}, error) : t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Upgrading Headless CMS..."])));
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleForm, null, loading && /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, {
|
|
72
69
|
label: label
|
|
73
|
-
}), /*#__PURE__*/
|
|
70
|
+
}), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormHeader, {
|
|
74
71
|
title: "Upgrade Headless CMS"
|
|
75
|
-
}), /*#__PURE__*/
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormContent, null, /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
76
73
|
span: 12
|
|
77
|
-
}, /*#__PURE__*/
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
78
75
|
use: "body1",
|
|
79
76
|
tag: "div"
|
|
80
|
-
}, "This upgrade will do the following:", /*#__PURE__*/
|
|
77
|
+
}, "This upgrade will do the following:", /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, "migrate the Headless CMS permissions in security groups."), /*#__PURE__*/_react.default.createElement("li", null, "migrate the Headless CMS permissions in API keys.")))))), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormFooter, null, /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
81
78
|
onClick: startUpgrade
|
|
82
79
|
}, "Upgrade")));
|
|
83
80
|
};
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
var _default = Upgrade;
|
|
82
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","UPGRADE","gql","Upgrade","onInstalled","client","useApolloClient","useState","error","setError","loading","setLoading","startUpgrade","useCallback","mutate","mutation","variables","version","then","data","cms","upgrade","message","label"],"sources":["v5.5.0.tsx"],"sourcesContent":["// @ts-nocheck\nimport React, { useCallback, useState } from \"react\";\nimport gql from \"graphql-tag\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport {\n SimpleForm,\n SimpleFormContent,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"@webiny/app-admin/components/SimpleForm\";\nimport { useApolloClient } from \"@apollo/react-hooks\";\nimport { Alert } from \"@webiny/ui/Alert\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { ButtonPrimary } from \"@webiny/ui/Button\";\nimport { Typography } from \"@webiny/ui/Typography\";\n\nconst t = i18n.ns(\"app-headless-cms/admin/installation\");\n\nconst UPGRADE = gql`\n mutation UpgradeCMS($version: String!) {\n cms {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\nconst Upgrade = ({ onInstalled }) => {\n const client = useApolloClient();\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(false);\n\n const startUpgrade = useCallback(async () => {\n setLoading(true);\n await client\n .mutate({\n mutation: UPGRADE,\n variables: {\n version: \"5.5.0\"\n }\n })\n .then(({ data }) => {\n setLoading(false);\n const { error } = data.cms.upgrade;\n if (error) {\n setError(error.message);\n return;\n }\n\n onInstalled();\n });\n }, []);\n\n const label = error ? (\n <Alert title={t`Something went wrong`} type={\"danger\"}>\n {error}\n </Alert>\n ) : (\n t`Upgrading Headless CMS...`\n );\n\n return (\n <SimpleForm>\n {loading && <CircularProgress label={label} />}\n <SimpleFormHeader title={\"Upgrade Headless CMS\"} />\n <SimpleFormContent>\n <Grid>\n <Cell span={12}>\n <Typography use={\"body1\"} tag={\"div\"}>\n This upgrade will do the following:\n <ul>\n <li>migrate the Headless CMS permissions in security groups.</li>\n <li>migrate the Headless CMS permissions in API keys.</li>\n </ul>\n </Typography>\n </Cell>\n </Grid>\n </SimpleFormContent>\n <SimpleFormFooter>\n <ButtonPrimary onClick={startUpgrade}>Upgrade</ButtonPrimary>\n </SimpleFormFooter>\n </SimpleForm>\n );\n};\n\nexport default Upgrade;\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAAmD;AAEnD,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,qCAAqC,CAAC;AAExD,IAAMC,OAAO,OAAGC,mBAAG,iXAalB;AAED,IAAMC,OAAO,GAAG,SAAVA,OAAO,OAAwB;EAAA,IAAlBC,WAAW,QAAXA,WAAW;EAC1B,IAAMC,MAAM,GAAG,IAAAC,2BAAe,GAAE;EAChC,gBAA0B,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAAA;IAAjCC,KAAK;IAAEC,QAAQ;EACtB,iBAA8B,IAAAF,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAtCG,OAAO;IAAEC,UAAU;EAE1B,IAAMC,YAAY,GAAG,IAAAC,kBAAW,uGAAC;IAAA;MAAA;QAAA;UAC7BF,UAAU,CAAC,IAAI,CAAC;UAAC;UAAA,OACXN,MAAM,CACPS,MAAM,CAAC;YACJC,QAAQ,EAAEd,OAAO;YACjBe,SAAS,EAAE;cACPC,OAAO,EAAE;YACb;UACJ,CAAC,CAAC,CACDC,IAAI,CAAC,iBAAc;YAAA,IAAXC,IAAI,SAAJA,IAAI;YACTR,UAAU,CAAC,KAAK,CAAC;YACjB,IAAQH,KAAK,GAAKW,IAAI,CAACC,GAAG,CAACC,OAAO,CAA1Bb,KAAK;YACb,IAAIA,KAAK,EAAE;cACPC,QAAQ,CAACD,KAAK,CAACc,OAAO,CAAC;cACvB;YACJ;YAEAlB,WAAW,EAAE;UACjB,CAAC,CAAC;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACT,IAAE,EAAE,CAAC;EAEN,IAAMmB,KAAK,GAAGf,KAAK,gBACf,6BAAC,YAAK;IAAC,KAAK,EAAEV,CAAC,yGAAuB;IAAC,IAAI,EAAE;EAAS,GACjDU,KAAK,CACF,GAERV,CAAC,8GACJ;EAED,oBACI,6BAAC,sBAAU,QACNY,OAAO,iBAAI,6BAAC,0BAAgB;IAAC,KAAK,EAAEa;EAAM,EAAG,eAC9C,6BAAC,4BAAgB;IAAC,KAAK,EAAE;EAAuB,EAAG,eACnD,6BAAC,6BAAiB,qBACd,6BAAC,UAAI,qBACD,6BAAC,UAAI;IAAC,IAAI,EAAE;EAAG,gBACX,6BAAC,sBAAU;IAAC,GAAG,EAAE,OAAQ;IAAC,GAAG,EAAE;EAAM,GAAC,qCAElC,qEACI,yCAAI,0DAAwD,CAAK,eACjE,yCAAI,mDAAiD,CAAK,CACzD,CACI,CACV,CACJ,CACS,eACpB,6BAAC,4BAAgB,qBACb,6BAAC,qBAAa;IAAC,OAAO,EAAEX;EAAa,GAAC,SAAO,CAAgB,CAC9C,CACV;AAErB,CAAC;AAAC,eAEaT,OAAO;AAAA"}
|
|
@@ -1,85 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
1
|
+
"use strict";
|
|
4
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
|
|
15
|
+
var _i18n = require("@webiny/app/i18n");
|
|
16
|
+
var _SimpleForm = require("@webiny/app-admin/components/SimpleForm");
|
|
17
|
+
var _reactHooks = require("@apollo/react-hooks");
|
|
18
|
+
var _Alert = require("@webiny/ui/Alert");
|
|
19
|
+
var _Progress = require("@webiny/ui/Progress");
|
|
20
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
21
|
+
var _Button = require("@webiny/ui/Button");
|
|
22
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
5
23
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import React, { useCallback, useState } from "react";
|
|
9
|
-
import gql from "graphql-tag";
|
|
10
|
-
import { i18n } from "@webiny/app/i18n";
|
|
11
|
-
import { SimpleForm, SimpleFormContent, SimpleFormFooter, SimpleFormHeader } from "@webiny/app-admin/components/SimpleForm";
|
|
12
|
-
import { useApolloClient } from "@apollo/react-hooks";
|
|
13
|
-
import { Alert } from "@webiny/ui/Alert";
|
|
14
|
-
import { CircularProgress } from "@webiny/ui/Progress";
|
|
15
|
-
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
16
|
-
import { ButtonPrimary } from "@webiny/ui/Button";
|
|
17
|
-
import { Typography } from "@webiny/ui/Typography";
|
|
18
|
-
var t = i18n.ns("app-headless-cms/admin/installation");
|
|
19
|
-
var UPGRADE = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mutation UpgradeCMS($version: String!) {\n cms {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n"])));
|
|
20
|
-
|
|
24
|
+
var t = _i18n.i18n.ns("app-headless-cms/admin/installation");
|
|
25
|
+
var UPGRADE = (0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n mutation UpgradeCMS($version: String!) {\n cms {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n"])));
|
|
21
26
|
var Upgrade = function Upgrade(_ref) {
|
|
22
27
|
var onInstalled = _ref.onInstalled;
|
|
23
|
-
var client = useApolloClient();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
onInstalled();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
case 3:
|
|
61
|
-
case "end":
|
|
62
|
-
return _context.stop();
|
|
63
|
-
}
|
|
28
|
+
var client = (0, _reactHooks.useApolloClient)();
|
|
29
|
+
var _useState = (0, _react.useState)(null),
|
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
|
+
error = _useState2[0],
|
|
32
|
+
setError = _useState2[1];
|
|
33
|
+
var _useState3 = (0, _react.useState)(false),
|
|
34
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
35
|
+
loading = _useState4[0],
|
|
36
|
+
setLoading = _useState4[1];
|
|
37
|
+
var startUpgrade = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
38
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
39
|
+
while (1) switch (_context.prev = _context.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
setLoading(true);
|
|
42
|
+
_context.next = 3;
|
|
43
|
+
return client.mutate({
|
|
44
|
+
mutation: UPGRADE,
|
|
45
|
+
variables: {
|
|
46
|
+
version: "5.8.0"
|
|
47
|
+
}
|
|
48
|
+
}).then(function (_ref3) {
|
|
49
|
+
var data = _ref3.data;
|
|
50
|
+
setLoading(false);
|
|
51
|
+
var error = data.cms.upgrade.error;
|
|
52
|
+
if (error) {
|
|
53
|
+
setError(error.message);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
onInstalled();
|
|
57
|
+
});
|
|
58
|
+
case 3:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
64
61
|
}
|
|
65
62
|
}, _callee);
|
|
66
63
|
})), []);
|
|
67
|
-
var label = error ? /*#__PURE__*/
|
|
68
|
-
title: t(_templateObject2 || (_templateObject2 =
|
|
64
|
+
var label = error ? /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
65
|
+
title: t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Something went wrong"]))),
|
|
69
66
|
type: "danger"
|
|
70
|
-
}, error) : t(_templateObject3 || (_templateObject3 =
|
|
71
|
-
return /*#__PURE__*/
|
|
67
|
+
}, error) : t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Upgrading Headless CMS..."])));
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleForm, null, loading && /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, {
|
|
72
69
|
label: label
|
|
73
|
-
}), /*#__PURE__*/
|
|
70
|
+
}), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormHeader, {
|
|
74
71
|
title: "Upgrade Headless CMS"
|
|
75
|
-
}), /*#__PURE__*/
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormContent, null, /*#__PURE__*/_react.default.createElement(_Grid.Grid, null, /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
76
73
|
span: 12
|
|
77
|
-
}, /*#__PURE__*/
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
78
75
|
use: "body1",
|
|
79
76
|
tag: "div"
|
|
80
|
-
}, "This upgrade will do the following:", /*#__PURE__*/
|
|
77
|
+
}, "This upgrade will do the following:", /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, "add the ", /*#__PURE__*/_react.default.createElement("strong", null, "tenant"), " and ", /*#__PURE__*/_react.default.createElement("strong", null, "entryId"), " to all of the records in the DynamoDB and Elasticsearch.")))))), /*#__PURE__*/_react.default.createElement(_SimpleForm.SimpleFormFooter, null, /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
81
78
|
onClick: startUpgrade
|
|
82
79
|
}, "Upgrade")));
|
|
83
80
|
};
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
var _default = Upgrade;
|
|
82
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","UPGRADE","gql","Upgrade","onInstalled","client","useApolloClient","useState","error","setError","loading","setLoading","startUpgrade","useCallback","mutate","mutation","variables","version","then","data","cms","upgrade","message","label"],"sources":["v5.8.0.tsx"],"sourcesContent":["// @ts-nocheck\nimport React, { useCallback, useState } from \"react\";\nimport gql from \"graphql-tag\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport {\n SimpleForm,\n SimpleFormContent,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"@webiny/app-admin/components/SimpleForm\";\nimport { useApolloClient } from \"@apollo/react-hooks\";\nimport { Alert } from \"@webiny/ui/Alert\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { ButtonPrimary } from \"@webiny/ui/Button\";\nimport { Typography } from \"@webiny/ui/Typography\";\n\nconst t = i18n.ns(\"app-headless-cms/admin/installation\");\n\nconst UPGRADE = gql`\n mutation UpgradeCMS($version: String!) {\n cms {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\nconst Upgrade = ({ onInstalled }) => {\n const client = useApolloClient();\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(false);\n\n const startUpgrade = useCallback(async () => {\n setLoading(true);\n await client\n .mutate({\n mutation: UPGRADE,\n variables: {\n version: \"5.8.0\"\n }\n })\n .then(({ data }) => {\n setLoading(false);\n const { error } = data.cms.upgrade;\n if (error) {\n setError(error.message);\n return;\n }\n\n onInstalled();\n });\n }, []);\n\n const label = error ? (\n <Alert title={t`Something went wrong`} type={\"danger\"}>\n {error}\n </Alert>\n ) : (\n t`Upgrading Headless CMS...`\n );\n\n return (\n <SimpleForm>\n {loading && <CircularProgress label={label} />}\n <SimpleFormHeader title={\"Upgrade Headless CMS\"} />\n <SimpleFormContent>\n <Grid>\n <Cell span={12}>\n <Typography use={\"body1\"} tag={\"div\"}>\n This upgrade will do the following:\n <ul>\n <li>\n add the <strong>tenant</strong> and <strong>entryId</strong> to\n all of the records in the DynamoDB and Elasticsearch.\n </li>\n </ul>\n </Typography>\n </Cell>\n </Grid>\n </SimpleFormContent>\n <SimpleFormFooter>\n <ButtonPrimary onClick={startUpgrade}>Upgrade</ButtonPrimary>\n </SimpleFormFooter>\n </SimpleForm>\n );\n};\n\nexport default Upgrade;\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAAmD;AAEnD,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,qCAAqC,CAAC;AAExD,IAAMC,OAAO,OAAGC,mBAAG,iXAalB;AAED,IAAMC,OAAO,GAAG,SAAVA,OAAO,OAAwB;EAAA,IAAlBC,WAAW,QAAXA,WAAW;EAC1B,IAAMC,MAAM,GAAG,IAAAC,2BAAe,GAAE;EAChC,gBAA0B,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAAA;IAAjCC,KAAK;IAAEC,QAAQ;EACtB,iBAA8B,IAAAF,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAtCG,OAAO;IAAEC,UAAU;EAE1B,IAAMC,YAAY,GAAG,IAAAC,kBAAW,uGAAC;IAAA;MAAA;QAAA;UAC7BF,UAAU,CAAC,IAAI,CAAC;UAAC;UAAA,OACXN,MAAM,CACPS,MAAM,CAAC;YACJC,QAAQ,EAAEd,OAAO;YACjBe,SAAS,EAAE;cACPC,OAAO,EAAE;YACb;UACJ,CAAC,CAAC,CACDC,IAAI,CAAC,iBAAc;YAAA,IAAXC,IAAI,SAAJA,IAAI;YACTR,UAAU,CAAC,KAAK,CAAC;YACjB,IAAQH,KAAK,GAAKW,IAAI,CAACC,GAAG,CAACC,OAAO,CAA1Bb,KAAK;YACb,IAAIA,KAAK,EAAE;cACPC,QAAQ,CAACD,KAAK,CAACc,OAAO,CAAC;cACvB;YACJ;YAEAlB,WAAW,EAAE;UACjB,CAAC,CAAC;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACT,IAAE,EAAE,CAAC;EAEN,IAAMmB,KAAK,GAAGf,KAAK,gBACf,6BAAC,YAAK;IAAC,KAAK,EAAEV,CAAC,yGAAuB;IAAC,IAAI,EAAE;EAAS,GACjDU,KAAK,CACF,GAERV,CAAC,8GACJ;EAED,oBACI,6BAAC,sBAAU,QACNY,OAAO,iBAAI,6BAAC,0BAAgB;IAAC,KAAK,EAAEa;EAAM,EAAG,eAC9C,6BAAC,4BAAgB;IAAC,KAAK,EAAE;EAAuB,EAAG,eACnD,6BAAC,6BAAiB,qBACd,6BAAC,UAAI,qBACD,6BAAC,UAAI;IAAC,IAAI,EAAE;EAAG,gBACX,6BAAC,sBAAU;IAAC,GAAG,EAAE,OAAQ;IAAC,GAAG,EAAE;EAAM,GAAC,qCAElC,qEACI,yCAAI,UACQ,4DAAQ,QAAM,CAAS,SAAK,4DAAQ,SAAO,CAAS,6DAEhE,CAAK,CACJ,CACI,CACV,CACJ,CACS,eACpB,6BAAC,4BAAgB,qBACb,6BAAC,qBAAa;IAAC,OAAO,EAAEX;EAAa,GAAC,SAAO,CAAgB,CAC9C,CACV;AAErB,CAAC;AAAC,eAEaT,OAAO;AAAA"}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactRouter = require("@webiny/react-router");
|
|
10
|
+
var _Button = require("@webiny/ui/Button");
|
|
11
|
+
var _emotion = require("emotion");
|
|
12
|
+
var linkStyle = /*#__PURE__*/(0, _emotion.css)({
|
|
6
13
|
textDecoration: "none",
|
|
7
14
|
"&:hover": {
|
|
8
15
|
textDecoration: "none"
|
|
9
16
|
}
|
|
10
17
|
}, "label:linkStyle;");
|
|
11
|
-
var buttonStyle = /*#__PURE__*/css({
|
|
18
|
+
var buttonStyle = /*#__PURE__*/(0, _emotion.css)({
|
|
12
19
|
margin: "1rem auto 1rem auto"
|
|
13
20
|
}, "label:buttonStyle;");
|
|
14
21
|
var plugin = {
|
|
@@ -16,14 +23,15 @@ var plugin = {
|
|
|
16
23
|
name: "admin-welcome-screen-widget-headless-cms",
|
|
17
24
|
permission: "cms.endpoint.manage",
|
|
18
25
|
widget: {
|
|
19
|
-
cta: /*#__PURE__*/
|
|
26
|
+
cta: /*#__PURE__*/_react.default.createElement(_reactRouter.Link, {
|
|
20
27
|
to: "/cms/content-models",
|
|
21
28
|
className: linkStyle
|
|
22
|
-
}, /*#__PURE__*/
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.ButtonSecondary, {
|
|
23
30
|
className: buttonStyle
|
|
24
31
|
}, "New Content Model")),
|
|
25
32
|
description: "GraphQL based headless CMS with powerful content modeling features.",
|
|
26
33
|
title: "Headless CMS"
|
|
27
34
|
}
|
|
28
35
|
};
|
|
29
|
-
|
|
36
|
+
var _default = plugin;
|
|
37
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["linkStyle","css","textDecoration","buttonStyle","margin","plugin","type","name","permission","widget","cta","description","title"],"sources":["welcomeScreenWidget.tsx"],"sourcesContent":["import React from \"react\";\nimport { Link } from \"@webiny/react-router\";\nimport { AdminWelcomeScreenWidgetPlugin } from \"@webiny/app-plugin-admin-welcome-screen/types\";\nimport { ButtonSecondary } from \"@webiny/ui/Button\";\nimport { css } from \"emotion\";\n\nconst linkStyle = css({\n textDecoration: \"none\",\n \"&:hover\": {\n textDecoration: \"none\"\n }\n});\n\nconst buttonStyle = css({\n margin: \"1rem auto 1rem auto\"\n});\n\nconst plugin: AdminWelcomeScreenWidgetPlugin = {\n type: \"admin-welcome-screen-widget\",\n name: \"admin-welcome-screen-widget-headless-cms\",\n permission: \"cms.endpoint.manage\",\n widget: {\n cta: (\n <Link to=\"/cms/content-models\" className={linkStyle}>\n <ButtonSecondary className={buttonStyle}>New Content Model</ButtonSecondary>\n </Link>\n ),\n description: \"GraphQL based headless CMS with powerful content modeling features.\",\n title: \"Headless CMS\"\n }\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AAEA,IAAMA,SAAS,gBAAG,IAAAC,YAAG,EAAC;EAClBC,cAAc,EAAE,MAAM;EACtB,SAAS,EAAE;IACPA,cAAc,EAAE;EACpB;AACJ,CAAC,qBAAC;AAEF,IAAMC,WAAW,gBAAG,IAAAF,YAAG,EAAC;EACpBG,MAAM,EAAE;AACZ,CAAC,uBAAC;AAEF,IAAMC,MAAsC,GAAG;EAC3CC,IAAI,EAAE,6BAA6B;EACnCC,IAAI,EAAE,0CAA0C;EAChDC,UAAU,EAAE,qBAAqB;EACjCC,MAAM,EAAE;IACJC,GAAG,eACC,6BAAC,iBAAI;MAAC,EAAE,EAAC,qBAAqB;MAAC,SAAS,EAAEV;IAAU,gBAChD,6BAAC,uBAAe;MAAC,SAAS,EAAEG;IAAY,GAAC,mBAAiB,CAAkB,CAEnF;IACDQ,WAAW,EAAE,qEAAqE;IAClFC,KAAK,EAAE;EACX;AACJ,CAAC;AAAC,eAEaP,MAAM;AAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ContentEntries:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ContentEntries: React.FC;
|
|
3
3
|
export default ContentEntries;
|