@webiny/app-headless-cms 5.23.1 → 5.24.0-beta.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
|
@@ -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-lte",
|
|
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-max-length",
|
|
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-min-length",
|
|
7
7
|
validator: {
|
|
@@ -40,4 +40,5 @@ export default {
|
|
|
40
40
|
return validate;
|
|
41
41
|
}()
|
|
42
42
|
}
|
|
43
|
-
};
|
|
43
|
+
};
|
|
44
|
+
export default plugin;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
validator: {
|
|
5
|
-
name: string;
|
|
6
|
-
validate: (value: any, validator: any) => Promise<boolean>;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPlugin } from "../../../types";
|
|
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 { plugins } from "@webiny/plugins";
|
|
4
|
-
|
|
4
|
+
var plugin = {
|
|
5
5
|
type: "cms-model-field-validator",
|
|
6
6
|
name: "cms-model-field-validator-pattern",
|
|
7
7
|
validator: {
|
|
@@ -60,4 +60,5 @@ export default {
|
|
|
60
60
|
return validate;
|
|
61
61
|
}()
|
|
62
62
|
}
|
|
63
|
-
};
|
|
63
|
+
};
|
|
64
|
+
export default plugin;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pattern: {
|
|
5
|
-
name: string;
|
|
6
|
-
regex: string;
|
|
7
|
-
flags: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPatternPlugin } from "../../../../types";
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPatternPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var plugin = {
|
|
2
2
|
type: "cms-model-field-validator-pattern",
|
|
3
3
|
name: "cms-model-field-validator-pattern-email",
|
|
4
4
|
pattern: {
|
|
@@ -6,4 +6,5 @@ export default {
|
|
|
6
6
|
regex: "^\\w[\\w.-]*@([\\w-]+\\.)+[\\w-]+$",
|
|
7
7
|
flags: "i"
|
|
8
8
|
}
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export default plugin;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pattern: {
|
|
5
|
-
name: string;
|
|
6
|
-
regex: string;
|
|
7
|
-
flags: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPatternPlugin } from "../../../../types";
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPatternPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pattern: {
|
|
5
|
-
name: string;
|
|
6
|
-
regex: string;
|
|
7
|
-
flags: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPatternPlugin } from "../../../../types";
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPatternPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var plugin = {
|
|
2
2
|
type: "cms-model-field-validator-pattern",
|
|
3
3
|
name: "cms-model-field-validator-pattern-lower-case-space",
|
|
4
4
|
pattern: {
|
|
@@ -6,4 +6,5 @@ export default {
|
|
|
6
6
|
regex: "^([a-z\\s]+)$",
|
|
7
7
|
flags: ""
|
|
8
8
|
}
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export default plugin;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pattern: {
|
|
5
|
-
name: string;
|
|
6
|
-
regex: string;
|
|
7
|
-
flags: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPatternPlugin } from "../../../../types";
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPatternPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pattern: {
|
|
5
|
-
name: string;
|
|
6
|
-
regex: string;
|
|
7
|
-
flags: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPatternPlugin } from "../../../../types";
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPatternPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var plugin = {
|
|
2
2
|
type: "cms-model-field-validator-pattern",
|
|
3
3
|
name: "cms-model-field-validator-pattern-upper-case-space",
|
|
4
4
|
pattern: {
|
|
@@ -6,4 +6,5 @@ export default {
|
|
|
6
6
|
regex: "^([A-Z\\s]+)$",
|
|
7
7
|
flags: ""
|
|
8
8
|
}
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export default plugin;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pattern: {
|
|
5
|
-
name: string;
|
|
6
|
-
regex: string;
|
|
7
|
-
flags: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CmsModelFieldValidatorPatternPlugin } from "../../../../types";
|
|
2
|
+
declare const plugin: CmsModelFieldValidatorPatternPlugin;
|
|
3
|
+
export default plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var plugin = {
|
|
2
2
|
type: "cms-model-field-validator-pattern",
|
|
3
3
|
name: "cms-model-field-validator-pattern-url",
|
|
4
4
|
pattern: {
|
|
@@ -6,4 +6,5 @@ export default {
|
|
|
6
6
|
regex: "^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$",
|
|
7
7
|
flags: "i"
|
|
8
8
|
}
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
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,5 +1,5 @@
|
|
|
1
1
|
import { validation } from "@webiny/validation";
|
|
2
|
-
|
|
2
|
+
var plugin = {
|
|
3
3
|
type: "cms-model-field-validator",
|
|
4
4
|
name: "cms-model-field-validator-required",
|
|
5
5
|
validator: {
|
|
@@ -8,4 +8,5 @@ export default {
|
|
|
8
8
|
return validation.validate(value, "required");
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
};
|
|
11
|
+
};
|
|
12
|
+
export default plugin;
|
|
@@ -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;
|
|
@@ -14,7 +14,7 @@ import { Provider as ContentEntriesProvider } from "./ContentEntriesContext";
|
|
|
14
14
|
import { GET_CONTENT_MODEL } from "../../graphql/contentModels";
|
|
15
15
|
import { useQuery } from "../../hooks";
|
|
16
16
|
import ContentEntriesList from "./ContentEntriesList";
|
|
17
|
-
import ContentEntry from "./ContentEntry";
|
|
17
|
+
import { ContentEntry } from "./ContentEntry";
|
|
18
18
|
import { Provider as ContentEntryProvider } from "./ContentEntry/ContentEntryContext";
|
|
19
19
|
var t = i18n.ns("app-headless-cms/admin/content-entries");
|
|
20
20
|
|
|
@@ -41,7 +41,7 @@ var ContentEntries = function ContentEntries() {
|
|
|
41
41
|
modelId: modelId
|
|
42
42
|
},
|
|
43
43
|
onCompleted: function onCompleted(data) {
|
|
44
|
-
var contentModel = get(data, "getContentModel.data");
|
|
44
|
+
var contentModel = get(data, "getContentModel.data", null);
|
|
45
45
|
|
|
46
46
|
if (contentModel) {
|
|
47
47
|
return setContentModel(contentModel);
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { CmsEditorContentModel } from "../../../types";
|
|
3
|
+
export interface CmsEntriesSorter {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
3
7
|
export interface ListQueryVariables {
|
|
4
|
-
sort?: string;
|
|
8
|
+
sort?: string[];
|
|
5
9
|
status?: string;
|
|
10
|
+
where?: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
6
13
|
}
|
|
7
14
|
export interface ContentEntriesContext {
|
|
8
15
|
contentModel: CmsEditorContentModel;
|
|
9
|
-
sorters:
|
|
10
|
-
label: string;
|
|
11
|
-
value: string;
|
|
12
|
-
}>;
|
|
16
|
+
sorters: CmsEntriesSorter[];
|
|
13
17
|
canCreate: boolean;
|
|
14
18
|
listQueryVariables: ListQueryVariables;
|
|
15
19
|
setListQueryVariables: Dispatch<SetStateAction<ListQueryVariables>>;
|
|
@@ -24,7 +24,7 @@ export var Provider = function Provider(_ref) {
|
|
|
24
24
|
identity = _useSecurity.identity;
|
|
25
25
|
|
|
26
26
|
var _useState = useState({
|
|
27
|
-
sort: SORTERS[0].value
|
|
27
|
+
sort: [SORTERS[0].value]
|
|
28
28
|
}),
|
|
29
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
30
|
listQueryVariables = _useState2[0],
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ContentEntriesList:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ContentEntriesList: React.FC;
|
|
3
3
|
export default ContentEntriesList;
|
|
@@ -6,6 +6,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
6
6
|
import React, { useMemo } from "react";
|
|
7
7
|
import debounce from "lodash/debounce";
|
|
8
8
|
import { css } from "emotion";
|
|
9
|
+
/**
|
|
10
|
+
* Package timeago-react does not have types.
|
|
11
|
+
*/
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
|
|
9
14
|
import TimeAgo from "timeago-react";
|
|
10
15
|
import pluralize from "pluralize";
|
|
11
16
|
import styled from "@emotion/styled";
|
|
@@ -74,9 +79,14 @@ var ContentEntriesList = function ContentEntriesList() {
|
|
|
74
79
|
loadMore();
|
|
75
80
|
}
|
|
76
81
|
}, 500), [data]);
|
|
82
|
+
|
|
83
|
+
var formInitialData = _objectSpread(_objectSpread({}, listQueryVariables), {}, {
|
|
84
|
+
sort: listQueryVariables.sort ? listQueryVariables.sort[0] : ""
|
|
85
|
+
});
|
|
86
|
+
|
|
77
87
|
var entriesDataListModalOverlay = useMemo(function () {
|
|
78
88
|
return /*#__PURE__*/React.createElement(UIList.DataListModalOverlay, null, /*#__PURE__*/React.createElement(Form, {
|
|
79
|
-
data:
|
|
89
|
+
data: formInitialData,
|
|
80
90
|
onChange: function onChange(_ref) {
|
|
81
91
|
var status = _ref.status,
|
|
82
92
|
sort = _ref.sort;
|
|
@@ -28,8 +28,5 @@ interface UseContentEntryProviderProps {
|
|
|
28
28
|
isNewEntry?: () => boolean;
|
|
29
29
|
}
|
|
30
30
|
export declare const useContentEntryProviderProps: () => UseContentEntryProviderProps;
|
|
31
|
-
export declare const Provider:
|
|
32
|
-
({ children, isNewEntry, getContentId }: ContentEntryContextProviderProps): JSX.Element;
|
|
33
|
-
displayName: string;
|
|
34
|
-
};
|
|
31
|
+
export declare const Provider: React.FC<ContentEntryContextProviderProps>;
|
|
35
32
|
export {};
|
|
@@ -4,10 +4,10 @@ import isEmpty from "lodash/isEmpty";
|
|
|
4
4
|
import get from "lodash/get";
|
|
5
5
|
import { useRouter } from "@webiny/react-router";
|
|
6
6
|
import { useSnackbar } from "@webiny/app-admin/hooks/useSnackbar";
|
|
7
|
-
import * as GQL from "../../../graphql/contentEntries";
|
|
8
7
|
import { useQuery } from "../../../hooks";
|
|
9
8
|
import { useContentEntries } from "../hooks/useContentEntries";
|
|
10
9
|
import { parseIdentifier } from "@webiny/utils";
|
|
10
|
+
import { createReadQuery, createRevisionsQuery } from "../../../graphql/contentEntries";
|
|
11
11
|
export var Context = /*#__PURE__*/React.createContext(null);
|
|
12
12
|
export var useContentEntryProviderProps = function useContentEntryProviderProps() {
|
|
13
13
|
var _useRouter = useRouter(),
|
|
@@ -67,14 +67,14 @@ export var Provider = function Provider(_ref) {
|
|
|
67
67
|
|
|
68
68
|
var _useMemo = useMemo(function () {
|
|
69
69
|
return {
|
|
70
|
-
READ_CONTENT:
|
|
70
|
+
READ_CONTENT: createReadQuery(contentModel)
|
|
71
71
|
};
|
|
72
72
|
}, [contentModel.modelId]),
|
|
73
73
|
READ_CONTENT = _useMemo.READ_CONTENT;
|
|
74
74
|
|
|
75
75
|
var _useMemo2 = useMemo(function () {
|
|
76
76
|
return {
|
|
77
|
-
GET_REVISIONS:
|
|
77
|
+
GET_REVISIONS: createRevisionsQuery(contentModel)
|
|
78
78
|
};
|
|
79
79
|
}, [contentModel.modelId]),
|
|
80
80
|
GET_REVISIONS = _useMemo2.GET_REVISIONS;
|
|
@@ -100,10 +100,12 @@ export var Provider = function Provider(_ref) {
|
|
|
100
100
|
|
|
101
101
|
var error = data.content.error;
|
|
102
102
|
|
|
103
|
-
if (error) {
|
|
104
|
-
|
|
105
|
-
showSnackbar(error.message);
|
|
103
|
+
if (!error) {
|
|
104
|
+
return;
|
|
106
105
|
}
|
|
106
|
+
|
|
107
|
+
history.push("/cms/content-entries/".concat(contentModel.modelId));
|
|
108
|
+
showSnackbar(error.message);
|
|
107
109
|
}
|
|
108
110
|
});
|
|
109
111
|
var getRevisions = useQuery(GET_REVISIONS, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { CmsEditorContentEntry } from "../../../../types";
|
|
3
|
-
|
|
3
|
+
interface RevisionListItemProps {
|
|
4
4
|
revision: CmsEditorContentEntry;
|
|
5
|
-
}
|
|
6
|
-
declare const RevisionListItem:
|
|
5
|
+
}
|
|
6
|
+
declare const RevisionListItem: React.FC<RevisionListItemProps>;
|
|
7
7
|
export default RevisionListItem;
|
|
@@ -4,6 +4,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
4
4
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { css } from "emotion";
|
|
7
|
+
/**
|
|
8
|
+
* Package timeago-react does not have types.
|
|
9
|
+
*/
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
|
|
7
12
|
import TimeAgo from "timeago-react";
|
|
8
13
|
import { ListItem, ListItemText, ListItemTextPrimary, ListItemTextSecondary, ListItemGraphic, ListItemMeta } from "@webiny/ui/List";
|
|
9
14
|
import { IconButton } from "@webiny/ui/Button";
|
|
@@ -114,7 +119,9 @@ var RevisionListItem = function RevisionListItem(_ref) {
|
|
|
114
119
|
className: revisionsMenu,
|
|
115
120
|
"data-testid": "cms.content-form.revisions.more-options"
|
|
116
121
|
}, canEdit(entry, "cms.contentEntry") && /*#__PURE__*/React.createElement(MenuItem, {
|
|
117
|
-
onClick:
|
|
122
|
+
onClick: function onClick() {
|
|
123
|
+
return createRevision(revision.id);
|
|
124
|
+
},
|
|
118
125
|
"data-testid": "cms.revision.create-revision"
|
|
119
126
|
}, /*#__PURE__*/React.createElement(ListItemGraphic, null, /*#__PURE__*/React.createElement(Icon, {
|
|
120
127
|
icon: /*#__PURE__*/React.createElement(AddIcon, null)
|
|
@@ -135,7 +142,9 @@ var RevisionListItem = function RevisionListItem(_ref) {
|
|
|
135
142
|
}, /*#__PURE__*/React.createElement(ListItemGraphic, null, /*#__PURE__*/React.createElement(Icon, {
|
|
136
143
|
icon: /*#__PURE__*/React.createElement(PublishIcon, null)
|
|
137
144
|
})), t(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["Publish"])))), revision.meta.status === "published" && canUnpublish("cms.contentEntry") && /*#__PURE__*/React.createElement(MenuItem, {
|
|
138
|
-
onClick:
|
|
145
|
+
onClick: function onClick() {
|
|
146
|
+
return unpublishRevision(revision.id);
|
|
147
|
+
},
|
|
139
148
|
"data-testid": "cms.revision.unpublish"
|
|
140
149
|
}, /*#__PURE__*/React.createElement(ListItemGraphic, null, /*#__PURE__*/React.createElement(Icon, {
|
|
141
150
|
icon: /*#__PURE__*/React.createElement(UnpublishIcon, null)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const RevisionsList:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const RevisionsList: React.FC;
|
|
3
3
|
export default RevisionsList;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { CmsEditorContentEntry } from "../../../../types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
1
|
+
import { CmsContentEntryRevision, CmsEditorContentEntry, CmsModel } from "../../../../types";
|
|
2
|
+
import { DataProxy } from "apollo-cache";
|
|
3
|
+
import { CmsEntriesListQueryVariables } from "../../../graphql/contentEntries";
|
|
4
|
+
export declare const addEntryToListCache: (model: CmsModel, cache: DataProxy, entry: CmsEditorContentEntry, variables: CmsEntriesListQueryVariables) => void;
|
|
5
|
+
export declare const updateLatestRevisionInListCache: (model: CmsModel, cache: DataProxy, revision: CmsContentEntryRevision, variables: CmsEntriesListQueryVariables) => void;
|
|
6
|
+
export declare const removeEntryFromListCache: (model: CmsModel, cache: DataProxy, revision: CmsContentEntryRevision, variables: CmsEntriesListQueryVariables) => void;
|
|
7
|
+
export declare const removeRevisionFromEntryCache: (model: CmsModel, cache: DataProxy, revision: CmsContentEntryRevision) => CmsContentEntryRevision[];
|
|
8
|
+
export declare const addRevisionToRevisionsCache: (model: CmsModel, cache: DataProxy, revision: CmsContentEntryRevision) => void;
|
|
9
|
+
export declare const unpublishPreviouslyPublishedRevision: (model: CmsModel, cache: DataProxy, publishedId: string) => void;
|
|
@@ -5,20 +5,28 @@ import dotProp from "dot-prop-immutable";
|
|
|
5
5
|
import orderBy from "lodash/orderBy";
|
|
6
6
|
import * as GQL from "../../../graphql/contentEntries";
|
|
7
7
|
import { parseIdentifier } from "@webiny/utils";
|
|
8
|
+
|
|
8
9
|
/*
|
|
9
10
|
* We need to preserve the order of entries with new entry addition
|
|
10
11
|
* because we're not re-fetching the list but updating it directly inside cache.
|
|
11
12
|
* */
|
|
12
|
-
|
|
13
13
|
var sortEntries = function sortEntries(list, sort) {
|
|
14
|
-
if (!sort
|
|
14
|
+
if (!sort) {
|
|
15
|
+
return list;
|
|
16
|
+
} else if (Array.isArray(sort) === false) {
|
|
17
|
+
console.log("Sort is not an Array of string.");
|
|
18
|
+
return list;
|
|
19
|
+
} else if (sort.length === 0) {
|
|
15
20
|
return list;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
var _sort
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
var _sort = _slicedToArray(sort, 1),
|
|
24
|
+
sortBy = _sort[0];
|
|
25
|
+
|
|
26
|
+
var _sortBy$split = sortBy.split("_"),
|
|
27
|
+
_sortBy$split2 = _slicedToArray(_sortBy$split, 2),
|
|
28
|
+
key = _sortBy$split2[0],
|
|
29
|
+
value = _sortBy$split2[1];
|
|
22
30
|
|
|
23
31
|
var order = value.toLowerCase();
|
|
24
32
|
return orderBy(list, [key], [order]);
|
|
@@ -116,23 +124,21 @@ export var removeRevisionFromEntryCache = function removeRevisionFromEntryCache(
|
|
|
116
124
|
};
|
|
117
125
|
|
|
118
126
|
var _cache$readQuery4 = cache.readQuery(gqlParams),
|
|
119
|
-
|
|
127
|
+
revisionsData = _cache$readQuery4.revisions;
|
|
120
128
|
|
|
121
|
-
if (!
|
|
122
|
-
return;
|
|
129
|
+
if (!revisionsData || !revisionsData.data || revisionsData.data.length === 0) {
|
|
130
|
+
return [];
|
|
123
131
|
}
|
|
124
132
|
|
|
125
|
-
var
|
|
126
|
-
return item.id
|
|
133
|
+
var revisions = revisionsData.data.filter(function (item) {
|
|
134
|
+
return item.id !== revision.id;
|
|
127
135
|
});
|
|
128
|
-
var newRevisions = dotProp.delete(revisions, "data.".concat(index));
|
|
129
136
|
cache.writeQuery(_objectSpread(_objectSpread({}, gqlParams), {}, {
|
|
130
137
|
data: {
|
|
131
|
-
revisions:
|
|
138
|
+
revisions: revisions
|
|
132
139
|
}
|
|
133
|
-
}));
|
|
134
|
-
|
|
135
|
-
return newRevisions.data;
|
|
140
|
+
}));
|
|
141
|
+
return revisions;
|
|
136
142
|
};
|
|
137
143
|
export var addRevisionToRevisionsCache = function addRevisionToRevisionsCache(model, cache, revision) {
|
|
138
144
|
var gqlParams = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const Header:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const Header: React.FC;
|
|
3
3
|
export default Header;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ContentFormOptionsMenu:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ContentFormOptionsMenu: React.FC;
|
|
3
3
|
export default ContentFormOptionsMenu;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const RequestReview:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const RequestReview: React.FC;
|
|
3
3
|
export default RequestReview;
|
package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const RevisionSelector:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const RevisionSelector: React.FC;
|
|
3
3
|
export default RevisionSelector;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const SaveAndPublishButton:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const SaveAndPublishButton: React.FC;
|
|
3
3
|
export default SaveAndPublishButton;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const SaveContentButton:
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const SaveContentButton: React.FC;
|
|
3
3
|
export default SaveContentButton;
|