@webiny/app-headless-cms 5.23.1-beta.0 → 5.24.0
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/admin/components/ContentEntryForm/ContentEntryForm.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +2 -2
- package/admin/components/ContentEntryForm/Fields.d.ts +3 -3
- package/admin/components/ContentEntryForm/Label.d.ts +2 -4
- package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +4 -2
- package/admin/components/ContentEntryForm/functions/createValidators.d.ts +2 -1
- package/admin/components/ContentEntryForm/functions/getValue.d.ts +7 -4
- package/admin/components/ContentEntryForm/functions/getValue.js +5 -4
- package/admin/components/ContentEntryForm/functions/setValue.d.ts +8 -5
- package/admin/components/ContentEntryForm/functions/setValue.js +6 -5
- package/admin/components/ContentEntryForm/useBind.d.ts +8 -4
- package/admin/components/ContentEntryForm/useBind.js +17 -10
- package/admin/components/ContentEntryForm/useContentEntryForm.js +9 -5
- package/admin/components/ContentModelEditor/Context.d.ts +18 -9
- package/admin/components/ContentModelEditor/Context.js +40 -33
- package/admin/components/ContentModelEditor/Editor.d.ts +2 -2
- package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +6 -4
- package/admin/components/ContentModelEditor/FieldsSidebar.js +11 -11
- package/admin/components/ContentModelEditor/Header.d.ts +3 -2
- package/admin/components/ContentModelEditor/Header.js +5 -2
- package/admin/components/DragPreview.d.ts +3 -2
- package/admin/components/DragPreview.js +6 -4
- package/admin/components/Draggable.d.ts +9 -7
- package/admin/components/Draggable.js +4 -3
- package/admin/components/DropZone/Center.d.ts +6 -6
- package/admin/components/DropZone/Center.js +7 -4
- package/admin/components/DropZone/Horizontal.d.ts +7 -5
- package/admin/components/DropZone/Horizontal.js +1 -1
- package/admin/components/DropZone/Vertical.d.ts +4 -4
- package/admin/components/DropZone/Vertical.js +1 -1
- package/admin/components/Droppable.d.ts +22 -13
- package/admin/components/Droppable.js +3 -3
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +8 -2
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +7 -6
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +4 -4
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +2 -2
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +3 -1
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +26 -25
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +5 -4
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +4 -4
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +6 -5
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +6 -5
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +6 -6
- package/admin/components/FieldEditor/EditFieldDialog.js +10 -10
- package/admin/components/FieldEditor/Field.d.ts +4 -4
- package/admin/components/FieldEditor/FieldEditor.d.ts +2 -2
- package/admin/components/FieldEditor/FieldEditor.js +9 -6
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +65 -20
- package/admin/components/FieldEditor/FieldEditorContext.js +27 -27
- package/admin/components/FieldEditor/Styled.d.ts +2 -2
- package/admin/components/FieldEditor/utils/deleteField.d.ts +5 -7
- package/admin/components/FieldEditor/utils/deleteField.js +6 -6
- package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +6 -5
- package/admin/components/FieldEditor/utils/getFieldPosition.js +3 -3
- package/admin/components/FieldEditor/utils/moveField.d.ts +4 -3
- package/admin/components/FieldEditor/utils/moveField.js +14 -10
- package/admin/components/FieldEditor/utils/moveRow.d.ts +5 -6
- package/admin/constants/statusLabels.d.ts +2 -8
- package/admin/constants/statusLabels.js +3 -2
- package/admin/contexts/Cms/index.d.ts +3 -3
- package/admin/contexts/Cms/index.js +2 -2
- package/admin/elements/ContentGroupMenuElement.js +1 -0
- package/admin/elements/ContentModelMenuElement.js +1 -0
- package/admin/elements/NothingToShowElement.d.ts +1 -1
- package/admin/graphql/contentEntries.d.ts +172 -11
- package/admin/graphql/contentEntries.js +55 -0
- package/admin/graphql/contentModels.d.ts +28 -0
- package/admin/graphql/contentModels.js +13 -2
- package/admin/hooks/useApolloClient.d.ts +2 -1
- package/admin/hooks/useLazyQuery.d.ts +3 -1
- package/admin/hooks/useMutation.d.ts +3 -1
- package/admin/hooks/useMutation.js +1 -1
- package/admin/hooks/usePermission.d.ts +21 -20
- package/admin/hooks/usePermission.js +5 -2
- package/admin/hooks/useQuery.d.ts +4 -1
- package/admin/hooks/useQueryLocale.d.ts +3 -1
- package/admin/menus/CmsMenuLoader.d.ts +1 -1
- package/admin/menus/CmsMenuLoader.js +5 -2
- package/admin/menus/ContentGroupsMenuItems.d.ts +2 -1
- package/admin/menus/ContentGroupsMenuItems.js +4 -6
- package/admin/menus/GlobalSearchPlugins.d.ts +2 -1
- package/admin/menus/GlobalSearchPlugins.js +1 -1
- package/admin/menus/NothingToShowElement.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/BackButton.d.ts +1 -1
- package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/Divider.d.ts +1 -1
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +4 -4
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/Name/Name.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/Name/Name.js +9 -4
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +3 -3
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +2 -2
- package/admin/plugins/fieldRenderers/Accordion.d.ts +4 -5
- package/admin/plugins/fieldRenderers/Accordion.js +2 -1
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +5 -4
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +1 -0
- package/admin/plugins/fieldRenderers/checkboxes.js +1 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +2 -1
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +3 -3
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +2 -1
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +2 -2
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +2 -2
- package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +3 -3
- package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +2 -2
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +1 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +5 -3
- package/admin/plugins/fieldRenderers/file/File.d.ts +2 -2
- package/admin/plugins/fieldRenderers/file/File.js +1 -1
- package/admin/plugins/fieldRenderers/file/fileField.js +1 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js +8 -2
- package/admin/plugins/fieldRenderers/file/utils.d.ts +8 -3
- package/admin/plugins/fieldRenderers/longText/longText.js +1 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js +1 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +6 -4
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +5 -3
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +6 -4
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +15 -9
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.d.ts +2 -1
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js +3 -2
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.d.ts +2 -2
- package/admin/plugins/fieldRenderers/ref/components/getOptions.d.ts +15 -1
- package/admin/plugins/fieldRenderers/ref/components/graphql.d.ts +60 -0
- package/admin/plugins/fieldRenderers/ref/components/graphql.js +16 -1
- package/admin/plugins/fieldRenderers/ref/components/renderItem.d.ts +2 -2
- package/admin/plugins/fieldRenderers/ref/components/useReference.d.ts +4 -4
- package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +16 -8
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js +1 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.d.ts +2 -4
- package/admin/plugins/fieldRenderers/ref/refInput.js +1 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js +1 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +1 -0
- package/admin/plugins/fieldRenderers/text/textInput.js +1 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +2 -1
- package/admin/plugins/fieldValidators/gte.d.ts +2 -2
- package/admin/plugins/fieldValidators/gte.js +3 -2
- package/admin/plugins/fieldValidators/in.d.ts +2 -2
- package/admin/plugins/fieldValidators/in.js +3 -2
- package/admin/plugins/fieldValidators/lte.d.ts +2 -2
- package/admin/plugins/fieldValidators/lte.js +3 -2
- package/admin/plugins/fieldValidators/maxLength.d.ts +2 -2
- package/admin/plugins/fieldValidators/maxLength.js +3 -2
- package/admin/plugins/fieldValidators/minLength.d.ts +2 -2
- package/admin/plugins/fieldValidators/minLength.js +3 -2
- package/admin/plugins/fieldValidators/pattern.d.ts +2 -2
- package/admin/plugins/fieldValidators/pattern.js +3 -2
- package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/email.js +3 -2
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +3 -2
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js +3 -2
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +3 -2
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js +3 -2
- package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +2 -2
- package/admin/plugins/fieldValidators/patternPlugins/url.js +3 -2
- package/admin/plugins/fieldValidators/required.d.ts +2 -2
- package/admin/plugins/fieldValidators/required.js +3 -2
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +3 -2
- package/admin/plugins/fields/object/ObjectFields.d.ts +7 -4
- package/admin/plugins/fields/ref.js +2 -1
- package/admin/plugins/icons.js +1 -1
- package/admin/plugins/index.d.ts +1 -1
- package/admin/plugins/install.d.ts +22 -0
- package/admin/plugins/install.js +36 -30
- package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +11 -5
- package/admin/plugins/permissionRenderer/CmsPermissions.js +5 -1
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +12 -8
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +11 -8
- package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +8 -6
- package/admin/plugins/permissionRenderer/components/ContentModelList.js +3 -3
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +14 -10
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +3 -2
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +10 -5
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +4 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +11 -26
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +1 -1
- package/admin/plugins/permissionRenderer/components/types.d.ts +16 -0
- package/admin/plugins/permissionRenderer/components/types.js +1 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.d.ts +17 -1
- package/admin/plugins/permissionRenderer/components/useCmsData.js +39 -25
- package/admin/plugins/permissionRenderer/index.d.ts +2 -2
- package/admin/plugins/permissionRenderer/index.js +3 -2
- package/admin/plugins/upgrades/5.19.0/createRepublishMutation.d.ts +2 -1
- package/admin/plugins/upgrades/5.19.0/fetchModelEntries.js +1 -0
- package/admin/plugins/upgrades/v5.0.0.js +1 -0
- package/admin/plugins/upgrades/v5.19.0.js +1 -0
- package/admin/plugins/upgrades/v5.5.0.js +1 -0
- package/admin/plugins/upgrades/v5.8.0.js +1 -0
- package/admin/plugins/validators/gte.d.ts +2 -2
- package/admin/plugins/validators/gte.js +3 -2
- package/admin/plugins/validators/in.d.ts +2 -2
- package/admin/plugins/validators/in.js +3 -2
- package/admin/plugins/validators/lte.d.ts +2 -2
- package/admin/plugins/validators/lte.js +3 -2
- package/admin/plugins/validators/maxLength.d.ts +2 -2
- package/admin/plugins/validators/maxLength.js +3 -2
- package/admin/plugins/validators/minLength.d.ts +2 -2
- package/admin/plugins/validators/minLength.js +3 -2
- package/admin/plugins/validators/pattern.d.ts +3 -9
- package/admin/plugins/validators/pattern.js +3 -2
- package/admin/plugins/validators/patternPlugins/email.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/email.js +3 -2
- package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/lowerCase.js +3 -2
- package/admin/plugins/validators/patternPlugins/lowerCaseSpace.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/lowerCaseSpace.js +3 -2
- package/admin/plugins/validators/patternPlugins/upperCase.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/upperCase.js +3 -2
- package/admin/plugins/validators/patternPlugins/upperCaseSpace.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/upperCaseSpace.js +3 -2
- package/admin/plugins/validators/patternPlugins/url.d.ts +3 -10
- package/admin/plugins/validators/patternPlugins/url.js +3 -2
- package/admin/plugins/validators/required.d.ts +2 -2
- package/admin/plugins/validators/required.js +3 -2
- package/admin/views/contentEntries/ContentEntries.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntries.js +2 -2
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +9 -5
- package/admin/views/contentEntries/ContentEntriesContext.js +1 -1
- package/admin/views/contentEntries/ContentEntriesList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntriesList.js +11 -1
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +1 -4
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +8 -6
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.d.ts +4 -4
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +11 -2
- package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/cache.d.ts +9 -7
- package/admin/views/contentEntries/ContentEntry/cache.js +22 -16
- package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +2 -2
- package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +31 -9
- package/admin/views/contentEntries/ContentEntry/useRevision.js +135 -113
- package/admin/views/contentEntries/ContentEntry.d.ts +1 -2
- package/admin/views/contentEntries/ContentEntry.js +2 -5
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +2 -5
- package/admin/views/contentModelGroups/ContentModelGroups.d.ts +2 -2
- package/admin/views/contentModelGroups/ContentModelGroups.js +2 -2
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +13 -21
- package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +4 -4
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +49 -32
- package/admin/views/contentModelGroups/DelayedOnChange.d.ts +29 -12
- package/admin/views/contentModelGroups/DelayedOnChange.js +13 -13
- package/admin/views/contentModelGroups/IconPicker.d.ts +3 -2
- package/admin/views/contentModelGroups/IconPicker.js +1 -1
- package/admin/views/contentModelGroups/graphql.d.ts +68 -0
- package/admin/views/contentModelGroups/graphql.js +26 -5
- package/admin/views/contentModels/CloneContentModelDialog.js +6 -5
- package/admin/views/contentModels/ContentModelEditor.d.ts +3 -2
- package/admin/views/contentModels/ContentModelEditor.js +6 -3
- package/admin/views/contentModels/ContentModels.d.ts +2 -2
- package/admin/views/contentModels/ContentModels.js +5 -5
- package/admin/views/contentModels/ContentModelsDataList.d.ts +4 -4
- package/admin/views/contentModels/ContentModelsDataList.js +17 -21
- package/admin/views/contentModels/NewContentModelDialog.d.ts +2 -2
- package/admin/views/contentModels/NewContentModelDialog.js +151 -76
- package/admin/views/contentModels/cache.d.ts +5 -4
- package/admin/views/contentModels/cache.js +9 -9
- package/admin/views/contentModels/types.d.ts +4 -0
- package/admin/views/contentModels/types.js +1 -0
- package/admin/views/utils.d.ts +3 -2
- package/admin/views/utils.js +5 -18
- package/admin/viewsGraphql.d.ts +62 -0
- package/admin/viewsGraphql.js +30 -5
- package/package.json +20 -17
- package/types.d.ts +88 -23
package/admin/plugins/install.js
CHANGED
|
@@ -5,7 +5,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
6
6
|
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
-
import React, { useState, useEffect
|
|
8
|
+
import React, { useState, useEffect } from "react";
|
|
9
9
|
import gql from "graphql-tag";
|
|
10
10
|
import { useApolloClient } from "@apollo/react-hooks";
|
|
11
11
|
import { i18n } from "@webiny/app/i18n";
|
|
@@ -21,7 +21,17 @@ var SimpleFormPlaceholder = /*#__PURE__*/styled("div", {
|
|
|
21
21
|
minWidth: 400
|
|
22
22
|
});
|
|
23
23
|
var t = i18n.ns("app-headless-cms/admin/installation");
|
|
24
|
+
/**
|
|
25
|
+
* ########################
|
|
26
|
+
* Is Installed Query
|
|
27
|
+
*/
|
|
28
|
+
|
|
24
29
|
var IS_INSTALLED = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query IsCMSInstalled {\n cms {\n version\n }\n }\n"])));
|
|
30
|
+
/**
|
|
31
|
+
* ########################
|
|
32
|
+
* Install Mutation
|
|
33
|
+
*/
|
|
34
|
+
|
|
25
35
|
var INSTALL = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n mutation InstallCms {\n cms {\n install {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n"])));
|
|
26
36
|
|
|
27
37
|
var CMSInstaller = function CMSInstaller(_ref) {
|
|
@@ -101,34 +111,30 @@ var plugin = {
|
|
|
101
111
|
onInstalled: onInstalled
|
|
102
112
|
});
|
|
103
113
|
},
|
|
104
|
-
upgrades: [{
|
|
105
|
-
version: "5.0.0",
|
|
106
|
-
getComponent
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return import("./upgrades/v5.19.0");
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}]
|
|
114
|
+
upgrades: [// {
|
|
115
|
+
// version: "5.0.0",
|
|
116
|
+
// getComponent() {
|
|
117
|
+
// return lazy(() => import("./upgrades/v5.0.0"));
|
|
118
|
+
// }
|
|
119
|
+
// },
|
|
120
|
+
// {
|
|
121
|
+
// version: "5.5.0",
|
|
122
|
+
// getComponent() {
|
|
123
|
+
// return lazy(() => import("./upgrades/v5.5.0"));
|
|
124
|
+
// }
|
|
125
|
+
// },
|
|
126
|
+
// {
|
|
127
|
+
// version: "5.8.0",
|
|
128
|
+
// getComponent() {
|
|
129
|
+
// return lazy(() => import("./upgrades/v5.8.0"));
|
|
130
|
+
// }
|
|
131
|
+
// },
|
|
132
|
+
// {
|
|
133
|
+
// version: "5.19.0",
|
|
134
|
+
// getComponent() {
|
|
135
|
+
// return lazy(() => import("./upgrades/v5.19.0"));
|
|
136
|
+
// }
|
|
137
|
+
// }
|
|
138
|
+
]
|
|
133
139
|
};
|
|
134
140
|
export default plugin;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @pavel Please review types for security permissions
|
|
3
|
+
* TODO @ts-refactor
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { CmsSecurityPermission } from "../../../types";
|
|
7
|
+
export interface CMSPermissionsProps {
|
|
8
|
+
value: CmsSecurityPermission[];
|
|
9
|
+
onChange: (value: CmsSecurityPermission[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const CMSPermissions: React.FC<CMSPermissionsProps>;
|
|
@@ -3,13 +3,17 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @pavel Please review types for security permissions
|
|
8
|
+
* TODO @ts-refactor
|
|
9
|
+
*/
|
|
6
10
|
import React, { Fragment, useCallback, useMemo } from "react";
|
|
11
|
+
import ContentModelGroupPermission from "./components/ContentModelGroupPermission";
|
|
7
12
|
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
8
13
|
import { Select } from "@webiny/ui/Select";
|
|
9
14
|
import { i18n } from "@webiny/app/i18n";
|
|
10
15
|
import { PermissionInfo, gridNoPaddingClass } from "@webiny/app-admin/components/Permissions";
|
|
11
16
|
import { Form } from "@webiny/form";
|
|
12
|
-
import ContentModelGroupPermission from "./components/ContentModelGroupPermission";
|
|
13
17
|
import { ContentModelPermission } from "./components/ContentModelPermission";
|
|
14
18
|
import { ContentEntryPermission } from "./components/ContentEntryPermission";
|
|
15
19
|
import { Checkbox, CheckboxGroup } from "@webiny/ui/Checkbox";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BindComponent } from "@webiny/form/types";
|
|
3
|
+
import { FormData } from "@webiny/form/types";
|
|
4
|
+
interface ContentEntryPermissionProps {
|
|
5
|
+
Bind: BindComponent;
|
|
6
|
+
data: FormData;
|
|
7
|
+
entity: string;
|
|
8
|
+
setValue: (name: string, value: string) => void;
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ContentEntryPermission: React.FC<ContentEntryPermissionProps>;
|
|
12
|
+
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BindComponent } from "@webiny/form/types";
|
|
3
|
+
import { FormData } from "@webiny/form/types";
|
|
4
|
+
interface ContentModelGroupPermissionProps {
|
|
5
|
+
Bind: BindComponent;
|
|
6
|
+
data: FormData;
|
|
7
|
+
entity: string;
|
|
8
|
+
title: string;
|
|
9
|
+
locales: string[];
|
|
10
|
+
}
|
|
11
|
+
declare const ContentModelGroupPermission: React.FC<ContentModelGroupPermissionProps>;
|
|
9
12
|
export default ContentModelGroupPermission;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { GetValueCallable, OnChangeCallable, PermissionSelectorCmsGroup } from "./types";
|
|
3
|
+
interface ContentModelListProps {
|
|
4
|
+
items: PermissionSelectorCmsGroup[];
|
|
5
|
+
onChange: OnChangeCallable;
|
|
6
|
+
getValue: GetValueCallable;
|
|
7
|
+
}
|
|
8
|
+
declare const ContentModelList: React.FC<ContentModelListProps>;
|
|
7
9
|
export default ContentModelList;
|
|
@@ -19,9 +19,9 @@ var ContentModelList = function ContentModelList(_ref) {
|
|
|
19
19
|
var items = _ref.items,
|
|
20
20
|
onChange = _ref.onChange,
|
|
21
21
|
getValue = _ref.getValue;
|
|
22
|
-
var list = Object.entries(groupBy(items.map(function (
|
|
23
|
-
return _objectSpread(_objectSpread({},
|
|
24
|
-
groupName: get(
|
|
22
|
+
var list = Object.entries(groupBy(items.map(function (item) {
|
|
23
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
24
|
+
groupName: get(item, "group.label")
|
|
25
25
|
});
|
|
26
26
|
}), "groupName"));
|
|
27
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, list.map(function (_ref2) {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BindComponent } from "@webiny/form/types";
|
|
3
|
+
import { FormData } from "@webiny/form/types";
|
|
4
|
+
interface ContentModelPermissionProps {
|
|
5
|
+
Bind: BindComponent;
|
|
6
|
+
data: FormData;
|
|
7
|
+
setValue: (name: string, value: string) => void;
|
|
8
|
+
entity: string;
|
|
9
|
+
title: string;
|
|
10
|
+
locales: string[];
|
|
11
|
+
selectedContentModelGroups?: Record<string, string[]>;
|
|
12
|
+
}
|
|
13
|
+
export declare const ContentModelPermission: React.FC<ContentModelPermissionProps>;
|
|
14
|
+
export {};
|
|
@@ -21,7 +21,8 @@ export var ContentModelPermission = function ContentModelPermission(_ref) {
|
|
|
21
21
|
entity = _ref.entity,
|
|
22
22
|
title = _ref.title,
|
|
23
23
|
locales = _ref.locales,
|
|
24
|
-
|
|
24
|
+
_ref$selectedContentM = _ref.selectedContentModelGroups,
|
|
25
|
+
selectedContentModelGroups = _ref$selectedContentM === void 0 ? {} : _ref$selectedContentM;
|
|
25
26
|
var modelsGroups = useCmsData(locales); // Set "cms.contentModel" access scope to "own" if "cms.contentModelGroup" === "own".
|
|
26
27
|
|
|
27
28
|
useEffect(function () {
|
|
@@ -31,7 +32,7 @@ export var ContentModelPermission = function ContentModelPermission(_ref) {
|
|
|
31
32
|
}, [data]);
|
|
32
33
|
var getItems = useCallback(function (code) {
|
|
33
34
|
var list = get(modelsGroups, "".concat(code, ".models"), []);
|
|
34
|
-
var groups = selectedContentModelGroups
|
|
35
|
+
var groups = selectedContentModelGroups[code] || [];
|
|
35
36
|
|
|
36
37
|
if (groups.length) {
|
|
37
38
|
// Filter by groups
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Verify that this is used somewhere.
|
|
3
|
+
* // TODO @ts-refactor
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface PermissionRendererWrapperProps {
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const PermissionRendererWrapper: React.FC<PermissionRendererWrapperProps>;
|
|
10
|
+
export {};
|
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BindComponent } from "@webiny/form";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
|
-
declare type Group = {
|
|
13
|
-
id: string;
|
|
14
|
-
label: string;
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
declare type RenderItemsProps = {
|
|
18
|
-
onChange: Function;
|
|
19
|
-
getValue: Function;
|
|
20
|
-
items: Model[] | Group[];
|
|
21
|
-
};
|
|
22
|
-
export declare type PermissionSelectorProps = {
|
|
3
|
+
import { GetValueCallable, OnChangeCallable, PermissionSelectorCmsGroup, PermissionSelectorCmsModel } from "./types";
|
|
4
|
+
interface RenderItemsProps {
|
|
5
|
+
onChange: OnChangeCallable;
|
|
6
|
+
getValue: GetValueCallable;
|
|
7
|
+
items: PermissionSelectorCmsModel[] | PermissionSelectorCmsGroup[];
|
|
8
|
+
}
|
|
9
|
+
export interface PermissionSelectorProps {
|
|
23
10
|
Bind: BindComponent;
|
|
24
11
|
selectorKey: string;
|
|
25
12
|
locales: string[];
|
|
26
13
|
entity: string;
|
|
27
|
-
getItems: (code: string) =>
|
|
14
|
+
getItems: (code: string) => PermissionSelectorCmsModel[] | PermissionSelectorCmsGroup[];
|
|
28
15
|
RenderItems?: React.FunctionComponent<RenderItemsProps>;
|
|
29
|
-
}
|
|
30
|
-
export declare const PermissionSelector:
|
|
31
|
-
export declare const PermissionSelectorWrapper:
|
|
32
|
-
children: any;
|
|
33
|
-
}) => JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export declare const PermissionSelector: React.FC<PermissionSelectorProps>;
|
|
18
|
+
export declare const PermissionSelectorWrapper: React.FC;
|
|
34
19
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Note: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
2
|
+
export declare const Note: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, object>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface OnChangeCallable {
|
|
2
|
+
(id: string | number): () => void;
|
|
3
|
+
}
|
|
4
|
+
export interface GetValueCallable {
|
|
5
|
+
(id: string | number): boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface PermissionSelectorCmsModel {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface PermissionSelectorCmsGroup {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface CmsDataCmsGroup {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CmsDataCmsModel {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
group: CmsDataCmsGroup;
|
|
9
|
+
}
|
|
10
|
+
export interface UseCmsDataResponseRecords {
|
|
11
|
+
models: CmsDataCmsModel[];
|
|
12
|
+
groups: CmsDataCmsGroup[];
|
|
13
|
+
}
|
|
14
|
+
export interface UseCmsDataResponse {
|
|
15
|
+
[locale: string]: UseCmsDataResponseRecords;
|
|
16
|
+
}
|
|
17
|
+
export declare const useCmsData: (locales: string[]) => UseCmsDataResponse;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
@@ -10,7 +11,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
10
11
|
import { useEffect, useReducer } from "react";
|
|
11
12
|
import gql from "graphql-tag";
|
|
12
13
|
import { useCms } from "../../../hooks";
|
|
13
|
-
var LIST_DATA = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query CmsLoadPermissionsData {\n listContentModels {\n data {\n id: modelId\n label: name\n group {\n id\n label: name\n }\n }\n }\n listContentModelGroups {\n data {\n id\n label: name\n }\n }\n }\n"])));
|
|
14
|
+
var LIST_DATA = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query CmsLoadPermissionsData {\n listContentModels {\n data {\n id: modelId\n label: name\n group {\n id\n label: name\n }\n }\n meta {\n totalCount\n cursor\n hasMoreItems\n }\n error {\n code\n message\n data\n }\n }\n listContentModelGroups {\n data {\n id\n label: name\n }\n meta {\n totalCount\n cursor\n hasMoreItems\n }\n error {\n code\n message\n data\n }\n }\n }\n"])));
|
|
14
15
|
export var useCmsData = function useCmsData(locales) {
|
|
15
16
|
var _useCms = useCms(),
|
|
16
17
|
getApolloClient = _useCms.getApolloClient;
|
|
@@ -24,33 +25,41 @@ export var useCmsData = function useCmsData(locales) {
|
|
|
24
25
|
|
|
25
26
|
var loadData = /*#__PURE__*/function () {
|
|
26
27
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
27
|
-
var
|
|
28
|
+
var _iterator, _step, _loop;
|
|
28
29
|
|
|
29
30
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30
31
|
while (1) {
|
|
31
32
|
switch (_context.prev = _context.next) {
|
|
32
33
|
case 0:
|
|
33
|
-
|
|
34
|
-
var code = locales[i];
|
|
35
|
-
var client = getApolloClient(code);
|
|
34
|
+
_iterator = _createForOfIteratorHelper(locales);
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
try {
|
|
37
|
+
_loop = function _loop() {
|
|
38
|
+
var code = _step.value;
|
|
39
|
+
var client = getApolloClient(code);
|
|
40
|
+
|
|
41
|
+
if (!state[code]) {
|
|
42
|
+
client.query({
|
|
43
|
+
query: LIST_DATA
|
|
44
|
+
}).then(function (_ref2) {
|
|
45
|
+
var data = _ref2.data;
|
|
46
|
+
var models = data.listContentModels.data;
|
|
47
|
+
var groups = data.listContentModelGroups.data;
|
|
48
|
+
setState(_objectSpread(_objectSpread({}, state), {}, _defineProperty({}, code, {
|
|
49
|
+
models: models,
|
|
50
|
+
groups: groups
|
|
51
|
+
})));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
57
|
+
_loop();
|
|
58
|
+
}
|
|
59
|
+
} catch (err) {
|
|
60
|
+
_iterator.e(err);
|
|
61
|
+
} finally {
|
|
62
|
+
_iterator.f();
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
case 2:
|
|
@@ -70,10 +79,15 @@ export var useCmsData = function useCmsData(locales) {
|
|
|
70
79
|
loadData();
|
|
71
80
|
}, [locales.sort().join(":")]);
|
|
72
81
|
return locales.reduce(function (acc, code) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
if (!state[code]) {
|
|
83
|
+
acc[code] = {
|
|
84
|
+
models: [],
|
|
85
|
+
groups: []
|
|
86
|
+
};
|
|
87
|
+
return acc;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
acc[code] = state[code];
|
|
77
91
|
return acc;
|
|
78
92
|
}, {});
|
|
79
93
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AdminAppPermissionRendererPlugin } from "@webiny/app-admin/types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const plugin: AdminAppPermissionRendererPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { AccordionItem } from "@webiny/ui/Accordion";
|
|
3
3
|
import { ReactComponent as HeadlessCMSIcon } from "../../icons/devices_other-black-24px.svg";
|
|
4
4
|
import { CMSPermissions } from "./CmsPermissions";
|
|
5
|
-
|
|
5
|
+
var plugin = {
|
|
6
6
|
type: "admin-app-permissions-renderer",
|
|
7
7
|
name: "admin-app-permissions-renderer-cms",
|
|
8
8
|
render: function render(props) {
|
|
@@ -13,4 +13,5 @@ export default {
|
|
|
13
13
|
"data-testid": "permission.cms"
|
|
14
14
|
}, /*#__PURE__*/React.createElement(CMSPermissions, props));
|
|
15
15
|
}
|
|
16
|
-
};
|
|
16
|
+
};
|
|
17
|
+
export default plugin;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { CmsModel } from "../../../../types";
|
|
2
|
+
export declare const createRepublishMutation: (model: CmsModel) => import("graphql").DocumentNode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
// @ts-nocheck
|
|
4
5
|
import { createListEntriesQuery } from "./createListEntriesQuery";
|
|
5
6
|
|
|
6
7
|
var fetchEntries = /*#__PURE__*/function () {
|
|
@@ -5,6 +5,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
6
|
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
// @ts-nocheck
|
|
8
9
|
import React, { useCallback, useState } from "react";
|
|
9
10
|
import gql from "graphql-tag";
|
|
10
11
|
import { i18n } from "@webiny/app/i18n";
|
|
@@ -8,6 +8,7 @@ import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIterat
|
|
|
8
8
|
var _templateObject, _templateObject2;
|
|
9
9
|
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
+
// @ts-nocheck
|
|
11
12
|
import React, { useCallback, useEffect, useState } from "react";
|
|
12
13
|
import { i18n } from "@webiny/app/i18n";
|
|
13
14
|
import { SimpleForm, SimpleFormContent, SimpleFormFooter, SimpleFormHeader } from "@webiny/app-admin/components/SimpleForm";
|
|
@@ -5,6 +5,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
6
|
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
// @ts-nocheck
|
|
8
9
|
import React, { useCallback, useState } from "react";
|
|
9
10
|
import gql from "graphql-tag";
|
|
10
11
|
import { i18n } from "@webiny/app/i18n";
|
|
@@ -5,6 +5,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
6
|
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
// @ts-nocheck
|
|
8
9
|
import React, { useCallback, useState } from "react";
|
|
9
10
|
import gql from "graphql-tag";
|
|
10
11
|
import { i18n } from "@webiny/app/i18n";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CmsModelFieldValidatorPlugin } from "../../../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { validation } from "@webiny/validation";
|
|
4
|
-
|
|
4
|
+
var plugin = {
|
|
5
5
|
type: "cms-model-field-validator",
|
|
6
6
|
name: "cms-model-field-validator-gte",
|
|
7
7
|
validator: {
|
|
@@ -40,4 +40,5 @@ export default {
|
|
|
40
40
|
return validate;
|
|
41
41
|
}()
|
|
42
42
|
}
|
|
43
|
-
};
|
|
43
|
+
};
|
|
44
|
+
export default plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CmsModelFieldValidatorPlugin } from "../../../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { validation } from "@webiny/validation";
|
|
4
|
-
|
|
4
|
+
var plugin = {
|
|
5
5
|
type: "cms-model-field-validator",
|
|
6
6
|
name: "cms-model-field-validator-in",
|
|
7
7
|
validator: {
|
|
@@ -40,4 +40,5 @@ export default {
|
|
|
40
40
|
return validate;
|
|
41
41
|
}()
|
|
42
42
|
}
|
|
43
|
-
};
|
|
43
|
+
};
|
|
44
|
+
export default plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CmsModelFieldValidatorPlugin } from "../../../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPlugin;
|
|
3
|
+
export default plugin;
|