@webiny/app-headless-cms 5.21.0 → 5.22.0-beta.3
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/useContentEntryForm.js +113 -15
- package/admin/components/ContentModelEditor/Context.js +3 -1
- package/admin/components/ContentModelEditor/Editor.d.ts +1 -1
- package/admin/components/ContentModelEditor/Editor.js +1 -1
- package/admin/components/Draggable.d.ts +3 -2
- package/admin/components/Draggable.js +5 -3
- package/admin/components/Droppable.d.ts +3 -2
- package/admin/components/Droppable.js +5 -3
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +10 -5
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +9 -5
- package/admin/components/FieldEditor/Field.js +4 -4
- package/admin/components/FieldEditor/FieldEditor.js +1 -1
- package/admin/components/FieldEditor/Styled.d.ts +2 -2
- package/admin/elements/ContentGroupMenuElement.js +2 -1
- package/admin/elements/ContentModelMenuElement.js +2 -1
- package/admin/elements/NothingToShowElement.js +1 -1
- package/admin/graphql/contentModels.d.ts +1 -1
- package/admin/graphql/contentModels.js +1 -1
- package/admin/menus/CmsMenuLoader.js +1 -1
- package/admin/plugins/editor/defaultBar/BackButton.js +1 -1
- package/admin/plugins/editor/defaultBar/CreateContentButton.js +1 -1
- package/admin/plugins/editor/defaultBar/Divider.d.ts +1 -1
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +1 -1
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +2 -2
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +3 -3
- package/admin/plugins/editor/formSettings/index.js +1 -1
- package/admin/plugins/fieldRenderers/DynamicSection.js +1 -1
- package/admin/plugins/fieldRenderers/checkboxes.js +18 -15
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.d.ts +9 -0
- package/admin/plugins/fieldRenderers/dateTime/DateOnly.js +39 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +2 -3
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +61 -59
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +4 -4
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +52 -51
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +6 -7
- package/admin/plugins/fieldRenderers/dateTime/Input.js +2 -5
- package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +10 -3
- package/admin/plugins/fieldRenderers/dateTime/Select.js +2 -5
- package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +3 -3
- package/admin/plugins/fieldRenderers/dateTime/Time.js +33 -9
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +8 -13
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +9 -13
- package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +7 -6
- package/admin/plugins/fieldRenderers/dateTime/utils.js +51 -9
- package/admin/plugins/fieldRenderers/file/fileField.js +1 -2
- package/admin/plugins/fieldRenderers/file/utils.js +1 -1
- package/admin/plugins/fieldRenderers/longText/longTexts.js +1 -1
- package/admin/plugins/fieldRenderers/number/numberInputs.js +1 -1
- package/admin/plugins/fieldRenderers/object/multipleObjects.js +1 -1
- package/admin/plugins/fieldRenderers/radioButtons.js +4 -3
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.d.ts +5 -0
- package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.js +30 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.d.ts +9 -0
- package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js +147 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.d.ts +1 -0
- package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.js +3 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.d.ts +11 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.js +30 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.d.ts +10 -0
- package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.js +28 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +1 -1
- package/admin/plugins/fieldRenderers/text/textInputs.js +1 -1
- package/admin/plugins/fieldValidators/date/createDateInputField.js +8 -13
- package/admin/plugins/fieldValidators/unique.d.ts +3 -0
- package/admin/plugins/fieldValidators/unique.js +12 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +7 -4
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +88 -53
- package/admin/plugins/fields/boolean.js +19 -2
- package/admin/plugins/fields/dateTime.js +17 -6
- package/admin/plugins/fields/file.js +1 -1
- package/admin/plugins/fields/longText.js +1 -1
- package/admin/plugins/fields/number.js +1 -1
- package/admin/plugins/fields/object.js +1 -1
- package/admin/plugins/fields/ref.js +1 -1
- package/admin/plugins/fields/richText.js +1 -1
- package/admin/plugins/fields/text.js +2 -2
- package/admin/plugins/index.d.ts +1 -1
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +1 -1
- package/admin/plugins/permissionRenderer/index.js +1 -1
- package/admin/plugins/transformers/dateTransformer.js +5 -7
- package/admin/plugins/validators/unique.d.ts +7 -0
- package/admin/plugins/validators/unique.js +38 -0
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +7 -7
- package/admin/views/contentEntries/ContentEntriesContext.js +3 -1
- package/admin/views/contentEntries/ContentEntriesList.js +2 -2
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +10 -3
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +27 -7
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +9 -9
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js +2 -2
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +1 -1
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +1 -1
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js +1 -1
- package/admin/views/contentEntries/ContentEntry.js +1 -1
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +2 -2
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +1 -1
- package/admin/views/contentModels/ContentModelEditor.js +1 -1
- package/admin/views/contentModels/ContentModelsDataList.js +4 -4
- package/package.json +31 -37
- package/types.d.ts +4 -1
|
@@ -13,7 +13,7 @@ import { Cell, Grid } from "@webiny/ui/Grid";
|
|
|
13
13
|
import { MultiAutoComplete } from "@webiny/ui/AutoComplete";
|
|
14
14
|
import { CircularProgress } from "@webiny/ui/Progress";
|
|
15
15
|
import { useSnackbar } from "@webiny/app-admin/hooks/useSnackbar";
|
|
16
|
-
import { ReactComponent as RefIcon } from "
|
|
16
|
+
import { ReactComponent as RefIcon } from "./icons/round-link-24px.svg";
|
|
17
17
|
import { i18n } from "@webiny/app/i18n";
|
|
18
18
|
var t = i18n.ns("app-headless-cms/admin/fields");
|
|
19
19
|
var plugin = {
|
|
@@ -5,7 +5,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { i18n } from "@webiny/app/i18n";
|
|
7
7
|
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
8
|
-
import { ReactComponent as NotesIcon } from "
|
|
8
|
+
import { ReactComponent as NotesIcon } from "./icons/round-text_fields-24px.svg";
|
|
9
9
|
import { Input } from "@webiny/ui/Input";
|
|
10
10
|
var t = i18n.ns("app-headless-cms/admin/fields");
|
|
11
11
|
var plugin = {
|
|
@@ -3,7 +3,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
4
4
|
|
|
5
5
|
import React from "react";
|
|
6
|
-
import { ReactComponent as TextIcon } from "
|
|
6
|
+
import { ReactComponent as TextIcon } from "./icons/round-text_fields-24px.svg";
|
|
7
7
|
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
8
8
|
import { i18n } from "@webiny/app/i18n";
|
|
9
9
|
import { Input } from "@webiny/ui/Input";
|
|
@@ -14,7 +14,7 @@ var plugin = {
|
|
|
14
14
|
name: "cms-editor-field-type-text",
|
|
15
15
|
field: {
|
|
16
16
|
type: "text",
|
|
17
|
-
validators: ["required", "minLength", "maxLength", "pattern"],
|
|
17
|
+
validators: ["required", "minLength", "maxLength", "pattern", "unique"],
|
|
18
18
|
label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Text"]))),
|
|
19
19
|
description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Titles, names, single line values."]))),
|
|
20
20
|
icon: /*#__PURE__*/React.createElement(TextIcon, null),
|
package/admin/plugins/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const _default: () => (import("
|
|
2
|
+
declare const _default: () => (import("../../types").CmsEditorFormSettingsPlugin | import("../../types").CmsIconsPlugin | import("../../types").CmsFieldValueTransformer[] | import("@webiny/app/types").CacheGetObjectIdPlugin | import("@webiny/app/types").RoutePlugin[] | import("@webiny/app-admin/types").AdminInstallationPlugin | import("@webiny/app-admin/types").AdminAppPermissionRendererPlugin | import("../../types").CmsContentDetailsPlugin[] | {
|
|
3
3
|
name: string;
|
|
4
4
|
type: string;
|
|
5
5
|
render(): JSX.Element;
|
|
@@ -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>, "children" | "style" | "slot" | "title" | "onError" | "color" | "translate" | "hidden" | "className" | "id" | "lang" | "role" | "tabIndex" | "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" | "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" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">, object>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AccordionItem } from "@webiny/ui/Accordion";
|
|
3
|
-
import { ReactComponent as HeadlessCMSIcon } from "
|
|
3
|
+
import { ReactComponent as HeadlessCMSIcon } from "../../icons/devices_other-black-24px.svg";
|
|
4
4
|
import { CMSPermissions } from "./CmsPermissions";
|
|
5
5
|
export default {
|
|
6
6
|
type: "admin-app-permissions-renderer",
|
|
@@ -14,7 +14,7 @@ var throwTransformError = function throwTransformError(params) {
|
|
|
14
14
|
|
|
15
15
|
var dateOnly = function dateOnly(value) {
|
|
16
16
|
if (!value) {
|
|
17
|
-
return new Date().toISOString().substr(0, 10);
|
|
17
|
+
return null; // return new Date().toISOString().substr(0, 10);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
try {
|
|
@@ -51,7 +51,7 @@ var extractTimeZone = function extractTimeZone(value) {
|
|
|
51
51
|
|
|
52
52
|
var extractTime = function extractTime(value) {
|
|
53
53
|
if (!value) {
|
|
54
|
-
return
|
|
54
|
+
return null;
|
|
55
55
|
} else if (value.includes(":") === false) {
|
|
56
56
|
throw new WebinyError("Time value is missing : separators.", "TIME_ERROR", {
|
|
57
57
|
value: value
|
|
@@ -69,9 +69,7 @@ var extractTime = function extractTime(value) {
|
|
|
69
69
|
|
|
70
70
|
var dateTimeWithTimezone = function dateTimeWithTimezone(value) {
|
|
71
71
|
if (!value) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return _date.replace(/\.([0-9]+)Z/, "+00:00");
|
|
72
|
+
return null;
|
|
75
73
|
} else if (value.includes("T") === false) {
|
|
76
74
|
return value;
|
|
77
75
|
}
|
|
@@ -104,7 +102,7 @@ var dateTimeWithTimezone = function dateTimeWithTimezone(value) {
|
|
|
104
102
|
|
|
105
103
|
var dateTimeWithoutTimezone = function dateTimeWithoutTimezone(value) {
|
|
106
104
|
if (!value) {
|
|
107
|
-
return
|
|
105
|
+
return null;
|
|
108
106
|
} else if (value.includes(" ") === false) {
|
|
109
107
|
return value;
|
|
110
108
|
}
|
|
@@ -122,7 +120,7 @@ var dateTimeWithoutTimezone = function dateTimeWithoutTimezone(value) {
|
|
|
122
120
|
|
|
123
121
|
var time = function time(value) {
|
|
124
122
|
if (!value) {
|
|
125
|
-
return
|
|
123
|
+
return null;
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
return extractTime(value);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsModelFieldValidatorPlugin } from "../../../types";
|
|
2
|
+
declare const _default: () => CmsModelFieldValidatorPlugin;
|
|
3
|
+
/**
|
|
4
|
+
* In the UI we will pretend that field is unique.
|
|
5
|
+
* When saving the entry, API call will check for the uniqueness.
|
|
6
|
+
*/
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* In the UI we will pretend that field is unique.
|
|
6
|
+
* When saving the entry, API call will check for the uniqueness.
|
|
7
|
+
*/
|
|
8
|
+
export default (function () {
|
|
9
|
+
return {
|
|
10
|
+
type: "cms-model-field-validator",
|
|
11
|
+
name: "cms-model-field-validator-unique",
|
|
12
|
+
validator: {
|
|
13
|
+
name: "unique",
|
|
14
|
+
validate: function () {
|
|
15
|
+
var _validate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
16
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
17
|
+
while (1) {
|
|
18
|
+
switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
return _context.abrupt("return", true);
|
|
21
|
+
|
|
22
|
+
case 1:
|
|
23
|
+
case "end":
|
|
24
|
+
return _context.stop();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, _callee);
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
function validate() {
|
|
31
|
+
return _validate.apply(this, arguments);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return validate;
|
|
35
|
+
}()
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
});
|
|
@@ -13,12 +13,12 @@ export interface ContentEntriesContext {
|
|
|
13
13
|
canCreate: boolean;
|
|
14
14
|
listQueryVariables: ListQueryVariables;
|
|
15
15
|
setListQueryVariables: Dispatch<SetStateAction<ListQueryVariables>>;
|
|
16
|
+
insideDialog?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const Context: React.Context<ContentEntriesContext>;
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
19
|
+
export interface ContentEntriesContextProviderProps {
|
|
20
|
+
contentModel: CmsEditorContentModel;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
insideDialog?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const Provider: React.FC<ContentEntriesContextProviderProps>;
|
|
@@ -17,7 +17,8 @@ var SORTERS = [{
|
|
|
17
17
|
export var Context = /*#__PURE__*/React.createContext(null);
|
|
18
18
|
export var Provider = function Provider(_ref) {
|
|
19
19
|
var contentModel = _ref.contentModel,
|
|
20
|
-
children = _ref.children
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
insideDialog = _ref.insideDialog;
|
|
21
22
|
|
|
22
23
|
var _useSecurity = useSecurity(),
|
|
23
24
|
identity = _useSecurity.identity;
|
|
@@ -65,6 +66,7 @@ export var Provider = function Provider(_ref) {
|
|
|
65
66
|
}]);
|
|
66
67
|
}, [contentModel.modelId]);
|
|
67
68
|
var value = {
|
|
69
|
+
insideDialog: insideDialog,
|
|
68
70
|
contentModel: contentModel,
|
|
69
71
|
sorters: sorters,
|
|
70
72
|
canCreate: canCreate,
|
|
@@ -17,8 +17,8 @@ import { ButtonIcon, ButtonSecondary } from "@webiny/ui/Button";
|
|
|
17
17
|
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
18
18
|
import { Select } from "@webiny/ui/Select";
|
|
19
19
|
import { Scrollbar } from "@webiny/ui/Scrollbar";
|
|
20
|
-
import { ReactComponent as AddIcon } from "@
|
|
21
|
-
import { ReactComponent as FilterIcon } from "@
|
|
20
|
+
import { ReactComponent as AddIcon } from "@webiny/app-admin/assets/icons/add-18px.svg";
|
|
21
|
+
import { ReactComponent as FilterIcon } from "@webiny/app-admin/assets/icons/filter-24px.svg";
|
|
22
22
|
import SearchUI from "@webiny/app-admin/components/SearchUI";
|
|
23
23
|
import statusLabels from "../../constants/statusLabels";
|
|
24
24
|
import { useCallback } from "react";
|
|
@@ -20,9 +20,16 @@ export interface ContentEntryContext extends ContentEntriesContext {
|
|
|
20
20
|
showEmptyView: boolean;
|
|
21
21
|
}
|
|
22
22
|
export declare const Context: React.Context<ContentEntryContext>;
|
|
23
|
+
export interface ContentEntryContextProviderProps extends GetContentEntryFormType {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
interface GetContentEntryFormType {
|
|
27
|
+
getContentId?: () => string | null;
|
|
28
|
+
isNewEntry?: () => boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const useContentEntryProviderProps: () => GetContentEntryFormType;
|
|
23
31
|
export declare const Provider: {
|
|
24
|
-
({ children }:
|
|
25
|
-
children: any;
|
|
26
|
-
}): JSX.Element;
|
|
32
|
+
({ children, isNewEntry, getContentId }: ContentEntryContextProviderProps): JSX.Element;
|
|
27
33
|
displayName: string;
|
|
28
34
|
};
|
|
35
|
+
export {};
|
|
@@ -9,8 +9,29 @@ import { useQuery } from "../../../hooks";
|
|
|
9
9
|
import { useContentEntries } from "../hooks/useContentEntries";
|
|
10
10
|
import { parseIdentifier } from "@webiny/utils";
|
|
11
11
|
export var Context = /*#__PURE__*/React.createContext(null);
|
|
12
|
+
export var useContentEntryProviderProps = function useContentEntryProviderProps() {
|
|
13
|
+
var _useRouter = useRouter(),
|
|
14
|
+
location = _useRouter.location;
|
|
15
|
+
|
|
16
|
+
var query = new URLSearchParams(location.search);
|
|
17
|
+
|
|
18
|
+
var isNewEntry = function isNewEntry() {
|
|
19
|
+
return query.get("new") === "true";
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var getContentId = function getContentId() {
|
|
23
|
+
return query.get("id");
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
getContentId: getContentId,
|
|
28
|
+
isNewEntry: isNewEntry
|
|
29
|
+
};
|
|
30
|
+
};
|
|
12
31
|
export var Provider = function Provider(_ref) {
|
|
13
|
-
var children = _ref.children
|
|
32
|
+
var children = _ref.children,
|
|
33
|
+
isNewEntry = _ref.isNewEntry,
|
|
34
|
+
getContentId = _ref.getContentId;
|
|
14
35
|
|
|
15
36
|
var _useContentEntries = useContentEntries(),
|
|
16
37
|
contentModel = _useContentEntries.contentModel,
|
|
@@ -22,9 +43,8 @@ export var Provider = function Provider(_ref) {
|
|
|
22
43
|
var formRef = useRef(null);
|
|
23
44
|
var tabsRef = useRef(null);
|
|
24
45
|
|
|
25
|
-
var
|
|
26
|
-
history =
|
|
27
|
-
location = _useRouter.location;
|
|
46
|
+
var _useRouter2 = useRouter(),
|
|
47
|
+
history = _useRouter2.history;
|
|
28
48
|
|
|
29
49
|
var _useSnackbar = useSnackbar(),
|
|
30
50
|
showSnackbar = _useSnackbar.showSnackbar;
|
|
@@ -34,9 +54,9 @@ export var Provider = function Provider(_ref) {
|
|
|
34
54
|
isLoading = _useState2[0],
|
|
35
55
|
setLoading = _useState2[1];
|
|
36
56
|
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var contentId =
|
|
57
|
+
var contentEntryProviderProps = useContentEntryProviderProps();
|
|
58
|
+
var newEntry = typeof isNewEntry === "function" ? isNewEntry() : contentEntryProviderProps.isNewEntry();
|
|
59
|
+
var contentId = typeof getContentId === "function" ? getContentId() : contentEntryProviderProps.getContentId();
|
|
40
60
|
var revisionId = contentId ? decodeURIComponent(contentId) : null;
|
|
41
61
|
var entryId = null;
|
|
42
62
|
|
|
@@ -11,15 +11,15 @@ import { Icon } from "@webiny/ui/Icon";
|
|
|
11
11
|
import { MenuItem, Menu, MenuDivider } from "@webiny/ui/Menu";
|
|
12
12
|
import { ConfirmationDialog } from "@webiny/ui/ConfirmationDialog";
|
|
13
13
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
14
|
-
import { ReactComponent as MoreVerticalIcon } from "
|
|
15
|
-
import { ReactComponent as LockIcon } from "
|
|
16
|
-
import { ReactComponent as BeenHereIcon } from "
|
|
17
|
-
import { ReactComponent as GestureIcon } from "
|
|
18
|
-
import { ReactComponent as AddIcon } from "
|
|
19
|
-
import { ReactComponent as EditIcon } from "
|
|
20
|
-
import { ReactComponent as PublishIcon } from "
|
|
21
|
-
import { ReactComponent as UnpublishIcon } from "
|
|
22
|
-
import { ReactComponent as DeleteIcon } from "
|
|
14
|
+
import { ReactComponent as MoreVerticalIcon } from "../../../icons/more_vert.svg";
|
|
15
|
+
import { ReactComponent as LockIcon } from "../../../icons/lock.svg";
|
|
16
|
+
import { ReactComponent as BeenHereIcon } from "../../../icons/beenhere.svg";
|
|
17
|
+
import { ReactComponent as GestureIcon } from "../../../icons/gesture.svg";
|
|
18
|
+
import { ReactComponent as AddIcon } from "../../../icons/add.svg";
|
|
19
|
+
import { ReactComponent as EditIcon } from "../../../icons/edit.svg";
|
|
20
|
+
import { ReactComponent as PublishIcon } from "../../../icons/publish.svg";
|
|
21
|
+
import { ReactComponent as UnpublishIcon } from "../../../icons/unpublish.svg";
|
|
22
|
+
import { ReactComponent as DeleteIcon } from "../../../icons/delete.svg";
|
|
23
23
|
import { i18n } from "@webiny/app/i18n";
|
|
24
24
|
import { useRevision } from "./useRevision";
|
|
25
25
|
import usePermission from "../../../hooks/usePermission";
|
|
@@ -19,8 +19,8 @@ import { useConfirmationDialog } from "@webiny/app-admin/hooks/useConfirmationDi
|
|
|
19
19
|
import { i18n } from "@webiny/app/i18n";
|
|
20
20
|
import { createDeleteMutation } from "../../../../../graphql/contentEntries";
|
|
21
21
|
import usePermission from "../../../../../hooks/usePermission";
|
|
22
|
-
import { ReactComponent as MoreVerticalIcon } from "
|
|
23
|
-
import { ReactComponent as DeleteIcon } from "
|
|
22
|
+
import { ReactComponent as MoreVerticalIcon } from "../../../../../icons/more_vert.svg";
|
|
23
|
+
import { ReactComponent as DeleteIcon } from "../../../../../icons/delete.svg";
|
|
24
24
|
import { removeEntryFromListCache } from "../../cache";
|
|
25
25
|
import { useMutation } from "../../../../../hooks";
|
|
26
26
|
import { useContentEntry } from "../../../hooks/useContentEntry";
|
|
@@ -9,7 +9,7 @@ import { IconButton } from "@webiny/ui/Button";
|
|
|
9
9
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
10
10
|
import { useConfirmationDialog } from "@webiny/app-admin/hooks/useConfirmationDialog";
|
|
11
11
|
import { i18n } from "@webiny/app/i18n";
|
|
12
|
-
import { ReactComponent as RequestChangesIcon } from "
|
|
12
|
+
import { ReactComponent as RequestChangesIcon } from "./rule-24px.svg";
|
|
13
13
|
import usePermission from "../../../../../hooks/usePermission";
|
|
14
14
|
import { useRevision } from "../../useRevision";
|
|
15
15
|
import { useContentEntry } from "../../../hooks/useContentEntry";
|
|
@@ -9,7 +9,7 @@ import { IconButton } from "@webiny/ui/Button";
|
|
|
9
9
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
10
10
|
import { useConfirmationDialog } from "@webiny/app-admin/hooks/useConfirmationDialog";
|
|
11
11
|
import { i18n } from "@webiny/app/i18n";
|
|
12
|
-
import { ReactComponent as RequestReviewIcon } from "
|
|
12
|
+
import { ReactComponent as RequestReviewIcon } from "./emoji_people-24px.svg";
|
|
13
13
|
import { useRevision } from "../../useRevision";
|
|
14
14
|
import usePermission from "../../../../../hooks/usePermission";
|
|
15
15
|
import { useContentEntry } from "../../../hooks/useContentEntry";
|
|
@@ -6,7 +6,7 @@ import { ButtonDefault } from "@webiny/ui/Button";
|
|
|
6
6
|
import { Icon } from "@webiny/ui/Icon";
|
|
7
7
|
import { Typography } from "@webiny/ui/Typography";
|
|
8
8
|
import { Menu, MenuItem } from "@webiny/ui/Menu";
|
|
9
|
-
import { ReactComponent as DownButton } from "
|
|
9
|
+
import { ReactComponent as DownButton } from "../../../../../icons/round-arrow_drop_down-24px.svg";
|
|
10
10
|
import { useContentEntry } from "../../../hooks/useContentEntry";
|
|
11
11
|
import statusLabels from "../../../../../constants/statusLabels";
|
|
12
12
|
var buttonStyle = /*#__PURE__*/css({
|
|
@@ -7,7 +7,7 @@ import { css } from "emotion";
|
|
|
7
7
|
import styled from "@emotion/styled";
|
|
8
8
|
import EmptyView from "@webiny/app-admin/components/EmptyView";
|
|
9
9
|
import { ButtonDefault, ButtonIcon } from "@webiny/ui/Button";
|
|
10
|
-
import { ReactComponent as AddIcon } from "@
|
|
10
|
+
import { ReactComponent as AddIcon } from "@webiny/app-admin/assets/icons/add-18px.svg";
|
|
11
11
|
import { i18n } from "@webiny/app/i18n";
|
|
12
12
|
import { Tab, Tabs } from "@webiny/ui/Tabs";
|
|
13
13
|
import { Elevation } from "@webiny/ui/Elevation";
|
|
@@ -22,8 +22,8 @@ import { ButtonIcon, ButtonSecondary } from "@webiny/ui/Button";
|
|
|
22
22
|
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
23
23
|
import { Select } from "@webiny/ui/Select";
|
|
24
24
|
import SearchUI from "@webiny/app-admin/components/SearchUI";
|
|
25
|
-
import { ReactComponent as AddIcon } from "@
|
|
26
|
-
import { ReactComponent as FilterIcon } from "@
|
|
25
|
+
import { ReactComponent as AddIcon } from "@webiny/app-admin/assets/icons/add-18px.svg";
|
|
26
|
+
import { ReactComponent as FilterIcon } from "@webiny/app-admin/assets/icons/filter-24px.svg";
|
|
27
27
|
import { serializeSorters, deserializeSorters } from "../utils";
|
|
28
28
|
import usePermission from "../../hooks/usePermission";
|
|
29
29
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
@@ -26,7 +26,7 @@ import IconPicker from "./IconPicker";
|
|
|
26
26
|
import { useRouter } from "@webiny/react-router";
|
|
27
27
|
import { useSnackbar } from "@webiny/app-admin/hooks/useSnackbar";
|
|
28
28
|
import EmptyView from "@webiny/app-admin/components/EmptyView";
|
|
29
|
-
import { ReactComponent as AddIcon } from "@
|
|
29
|
+
import { ReactComponent as AddIcon } from "@webiny/app-admin/assets/icons/add-18px.svg";
|
|
30
30
|
import { useMutation, useQuery } from "../../hooks";
|
|
31
31
|
import * as GQL from "./graphql";
|
|
32
32
|
import usePermission from "../../hooks/usePermission";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import HTML5Backend from "react-dnd-html5-backend";
|
|
2
|
+
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
3
3
|
import { DndProvider } from "react-dnd";
|
|
4
4
|
import { Editor } from "../../components/ContentModelEditor/Editor";
|
|
5
5
|
import { useRouter } from "@webiny/react-router";
|
|
@@ -11,8 +11,8 @@ import { css } from "emotion";
|
|
|
11
11
|
import get from "lodash/get";
|
|
12
12
|
import { useRouter } from "@webiny/react-router";
|
|
13
13
|
import { DeleteIcon, EditIcon } from "@webiny/ui/List/DataList/icons";
|
|
14
|
-
import { ReactComponent as ViewListIcon } from "
|
|
15
|
-
import { ReactComponent as CloneIcon } from "
|
|
14
|
+
import { ReactComponent as ViewListIcon } from "../../icons/view_list.svg";
|
|
15
|
+
import { ReactComponent as CloneIcon } from "../../icons/clone.svg";
|
|
16
16
|
import { useApolloClient, useQuery } from "../../hooks";
|
|
17
17
|
import { useSnackbar } from "@webiny/app-admin/hooks/useSnackbar";
|
|
18
18
|
import * as UIL from "@webiny/ui/List";
|
|
@@ -22,13 +22,13 @@ import { i18n } from "@webiny/app/i18n";
|
|
|
22
22
|
import { useConfirmationDialog } from "@webiny/app-admin/hooks/useConfirmationDialog";
|
|
23
23
|
import { removeModelFromGroupCache, removeModelFromListCache } from "./cache";
|
|
24
24
|
import * as GQL from "../../viewsGraphql";
|
|
25
|
-
import { ReactComponent as AddIcon } from "@
|
|
25
|
+
import { ReactComponent as AddIcon } from "@webiny/app-admin/assets/icons/add-18px.svg";
|
|
26
26
|
import SearchUI from "@webiny/app-admin/components/SearchUI";
|
|
27
27
|
import { deserializeSorters, serializeSorters } from "../utils";
|
|
28
28
|
import orderBy from "lodash/orderBy";
|
|
29
29
|
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
30
30
|
import { Select } from "@webiny/ui/Select";
|
|
31
|
-
import { ReactComponent as FilterIcon } from "@
|
|
31
|
+
import { ReactComponent as FilterIcon } from "@webiny/app-admin/assets/icons/filter-24px.svg";
|
|
32
32
|
import usePermission from "../../hooks/usePermission";
|
|
33
33
|
var t = i18n.namespace("FormsApp.ContentModelsDataList");
|
|
34
34
|
var SORTERS = [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-headless-cms",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.0-beta.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,29 +14,29 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@apollo/react-hooks": "3.1.5",
|
|
17
|
-
"@babel/runtime": "7.16.
|
|
18
|
-
"@emotion/core": "10.
|
|
19
|
-
"@emotion/styled": "10.0
|
|
17
|
+
"@babel/runtime": "7.16.7",
|
|
18
|
+
"@emotion/core": "10.3.1",
|
|
19
|
+
"@emotion/styled": "10.3.0",
|
|
20
20
|
"@fortawesome/fontawesome-svg-core": "1.2.36",
|
|
21
21
|
"@fortawesome/free-brands-svg-icons": "5.15.4",
|
|
22
22
|
"@fortawesome/free-regular-svg-icons": "5.15.4",
|
|
23
23
|
"@fortawesome/free-solid-svg-icons": "5.15.4",
|
|
24
24
|
"@fortawesome/react-fontawesome": "0.1.16",
|
|
25
|
-
"@svgr/webpack": "
|
|
25
|
+
"@svgr/webpack": "6.2.0",
|
|
26
26
|
"@types/react": "16.14.2",
|
|
27
|
-
"@webiny/app": "5.
|
|
28
|
-
"@webiny/app-admin": "5.
|
|
29
|
-
"@webiny/app-graphql-playground": "5.
|
|
30
|
-
"@webiny/app-i18n": "5.
|
|
31
|
-
"@webiny/app-plugin-admin-welcome-screen": "5.
|
|
32
|
-
"@webiny/app-security": "5.
|
|
33
|
-
"@webiny/error": "5.
|
|
34
|
-
"@webiny/form": "5.
|
|
35
|
-
"@webiny/plugins": "5.
|
|
36
|
-
"@webiny/react-router": "5.
|
|
37
|
-
"@webiny/ui": "5.
|
|
38
|
-
"@webiny/utils": "5.
|
|
39
|
-
"@webiny/validation": "5.
|
|
27
|
+
"@webiny/app": "5.22.0-beta.3",
|
|
28
|
+
"@webiny/app-admin": "5.22.0-beta.3",
|
|
29
|
+
"@webiny/app-graphql-playground": "5.22.0-beta.3",
|
|
30
|
+
"@webiny/app-i18n": "5.22.0-beta.3",
|
|
31
|
+
"@webiny/app-plugin-admin-welcome-screen": "5.22.0-beta.3",
|
|
32
|
+
"@webiny/app-security": "5.22.0-beta.3",
|
|
33
|
+
"@webiny/error": "5.22.0-beta.3",
|
|
34
|
+
"@webiny/form": "5.22.0-beta.3",
|
|
35
|
+
"@webiny/plugins": "5.22.0-beta.3",
|
|
36
|
+
"@webiny/react-router": "5.22.0-beta.3",
|
|
37
|
+
"@webiny/ui": "5.22.0-beta.3",
|
|
38
|
+
"@webiny/utils": "5.22.0-beta.3",
|
|
39
|
+
"@webiny/validation": "5.22.0-beta.3",
|
|
40
40
|
"apollo-cache": "1.3.5",
|
|
41
41
|
"apollo-client": "2.6.10",
|
|
42
42
|
"apollo-link": "1.2.14",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"classnames": "2.3.1",
|
|
46
46
|
"dot-prop-immutable": "2.1.1",
|
|
47
47
|
"emotion": "10.0.27",
|
|
48
|
-
"graphql": "
|
|
48
|
+
"graphql": "15.8.0",
|
|
49
49
|
"graphql-tag": "2.12.6",
|
|
50
50
|
"lodash": "4.17.21",
|
|
51
51
|
"pluralize": "8.0.0",
|
|
52
|
-
"prop-types": "15.
|
|
52
|
+
"prop-types": "15.8.1",
|
|
53
53
|
"raw.macro": "0.4.2",
|
|
54
54
|
"react": "16.14.0",
|
|
55
|
-
"react-dnd": "
|
|
56
|
-
"react-dnd-html5-backend": "
|
|
55
|
+
"react-dnd": "11.1.3",
|
|
56
|
+
"react-dnd-html5-backend": "11.1.3",
|
|
57
57
|
"react-dom": "16.14.0",
|
|
58
|
-
"react-helmet": "
|
|
58
|
+
"react-helmet": "6.1.0",
|
|
59
59
|
"react-hotkeyz": "1.0.4",
|
|
60
60
|
"react-virtualized": "9.22.3",
|
|
61
61
|
"shortid": "2.2.16",
|
|
@@ -63,17 +63,16 @@
|
|
|
63
63
|
"use-deep-compare-effect": "1.8.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/cli": "^7.
|
|
67
|
-
"@babel/core": "^7.
|
|
68
|
-
"@babel/preset-env": "^7.
|
|
69
|
-
"@babel/preset-react": "^7.
|
|
70
|
-
"@babel/preset-typescript": "^7.
|
|
71
|
-
"@webiny/cli": "^5.
|
|
72
|
-
"@webiny/project-utils": "^5.
|
|
66
|
+
"@babel/cli": "^7.16.0",
|
|
67
|
+
"@babel/core": "^7.16.0",
|
|
68
|
+
"@babel/preset-env": "^7.16.4",
|
|
69
|
+
"@babel/preset-react": "^7.16.0",
|
|
70
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
71
|
+
"@webiny/cli": "^5.22.0-beta.3",
|
|
72
|
+
"@webiny/project-utils": "^5.22.0-beta.3",
|
|
73
73
|
"babel-plugin-emotion": "^9.2.8",
|
|
74
74
|
"babel-plugin-lodash": "^3.3.4",
|
|
75
75
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
76
|
-
"babel-plugin-named-asset-import": "^1.0.0-next.3e165448",
|
|
77
76
|
"execa": "^5.0.0",
|
|
78
77
|
"rimraf": "^3.0.2",
|
|
79
78
|
"ttypescript": "^1.5.12",
|
|
@@ -87,11 +86,6 @@
|
|
|
87
86
|
"build": "yarn webiny run build",
|
|
88
87
|
"watch": "yarn webiny run watch"
|
|
89
88
|
},
|
|
90
|
-
"svgo": {
|
|
91
|
-
"plugins": {
|
|
92
|
-
"removeViewBox": false
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
89
|
"adio": {
|
|
96
90
|
"ignore": {
|
|
97
91
|
"src": [
|
|
@@ -107,5 +101,5 @@
|
|
|
107
101
|
]
|
|
108
102
|
}
|
|
109
103
|
},
|
|
110
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "7a6b4ce3b9f31fe0702fffd28b7959c637e9a20b"
|
|
111
105
|
}
|
package/types.d.ts
CHANGED
|
@@ -134,8 +134,9 @@ export interface CmsEditorFieldTypePlugin extends Plugin {
|
|
|
134
134
|
*/
|
|
135
135
|
renderPredefinedValues?: (params: {
|
|
136
136
|
form: FormRenderPropParams;
|
|
137
|
+
field: CmsEditorField;
|
|
137
138
|
getBind: (index?: number) => any;
|
|
138
|
-
}) => React.
|
|
139
|
+
}) => React.ReactElement;
|
|
139
140
|
/**
|
|
140
141
|
* Object wrapper for GraphQL stuff
|
|
141
142
|
*/
|
|
@@ -237,6 +238,7 @@ export interface CmsEditorFieldRendererPlugin extends Plugin {
|
|
|
237
238
|
export interface CmsEditorFieldPredefinedValuesEntry {
|
|
238
239
|
label: string;
|
|
239
240
|
value: string;
|
|
241
|
+
selected?: boolean;
|
|
240
242
|
}
|
|
241
243
|
export interface CmsEditorFieldPredefinedValues {
|
|
242
244
|
enabled: boolean;
|
|
@@ -254,6 +256,7 @@ export declare type CmsEditorField<T = unknown> = T & {
|
|
|
254
256
|
multipleValues?: boolean;
|
|
255
257
|
predefinedValues?: CmsEditorFieldPredefinedValues;
|
|
256
258
|
settings?: {
|
|
259
|
+
defaultValue?: string | null | undefined;
|
|
257
260
|
[key: string]: any;
|
|
258
261
|
};
|
|
259
262
|
renderer: {
|