@webiny/app-headless-cms 5.21.0-beta.0 → 5.22.0-beta.2
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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
@@ -13,6 +14,23 @@ import * as GQLCache from "../../views/contentEntries/ContentEntry/cache";
|
|
|
13
14
|
import { prepareFormData } from "../../views/contentEntries/ContentEntry/prepareFormData";
|
|
14
15
|
import { useContentEntry } from "../../views/contentEntries/hooks/useContentEntry";
|
|
15
16
|
import { plugins } from "@webiny/plugins";
|
|
17
|
+
/**
|
|
18
|
+
* Used for some fields to convert their values.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var convertDefaultValue = function convertDefaultValue(field, value) {
|
|
22
|
+
switch (field.type) {
|
|
23
|
+
case "boolean":
|
|
24
|
+
return Boolean(value);
|
|
25
|
+
|
|
26
|
+
case "number":
|
|
27
|
+
return Number(value);
|
|
28
|
+
|
|
29
|
+
default:
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
16
34
|
export function useContentEntryForm(params) {
|
|
17
35
|
var _useContentEntry = useContentEntry(),
|
|
18
36
|
listQueryVariables = _useContentEntry.listQueryVariables;
|
|
@@ -110,7 +128,10 @@ export function useContentEntryForm(params) {
|
|
|
110
128
|
}
|
|
111
129
|
|
|
112
130
|
resetInvalidFieldValues();
|
|
113
|
-
|
|
131
|
+
|
|
132
|
+
if (typeof params.onSubmit !== "function") {
|
|
133
|
+
GQLCache.addEntryToListCache(contentModel, cache, entry, listQueryVariables);
|
|
134
|
+
}
|
|
114
135
|
}
|
|
115
136
|
});
|
|
116
137
|
|
|
@@ -131,7 +152,13 @@ export function useContentEntryForm(params) {
|
|
|
131
152
|
case 10:
|
|
132
153
|
resetInvalidFieldValues();
|
|
133
154
|
showSnackbar("".concat(contentModel.name, " entry created successfully!"));
|
|
134
|
-
|
|
155
|
+
|
|
156
|
+
if (typeof params.onSubmit === "function") {
|
|
157
|
+
params.onSubmit(entry);
|
|
158
|
+
} else {
|
|
159
|
+
goToRevision(entry.id);
|
|
160
|
+
}
|
|
161
|
+
|
|
135
162
|
return _context.abrupt("return", entry);
|
|
136
163
|
|
|
137
164
|
case 14:
|
|
@@ -225,7 +252,7 @@ export function useContentEntryForm(params) {
|
|
|
225
252
|
GQLCache.updateLatestRevisionInListCache(contentModel, cache, newRevision, listQueryVariables);
|
|
226
253
|
GQLCache.addRevisionToRevisionsCache(contentModel, cache, newRevision);
|
|
227
254
|
showSnackbar("A new revision was created!");
|
|
228
|
-
|
|
255
|
+
goToRevision(newRevision.id);
|
|
229
256
|
}
|
|
230
257
|
});
|
|
231
258
|
|
|
@@ -310,24 +337,95 @@ export function useContentEntryForm(params) {
|
|
|
310
337
|
|
|
311
338
|
var getDefaultValues = function getDefaultValues() {
|
|
312
339
|
var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
313
|
-
var values = {};
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
340
|
+
var values = {};
|
|
341
|
+
/**
|
|
342
|
+
* Assign the default values:
|
|
343
|
+
* * check the settings.defaultValue
|
|
344
|
+
* * check the predefinedValues for selected value
|
|
345
|
+
*/
|
|
346
|
+
|
|
347
|
+
var _iterator = _createForOfIteratorHelper(contentModel.fields),
|
|
348
|
+
_step;
|
|
349
|
+
|
|
350
|
+
try {
|
|
351
|
+
var _loop = function _loop() {
|
|
352
|
+
var field = _step.value;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* When checking if defaultValue is set in settings, we do the undefined check because it can be null, 0, empty string, false, etc...
|
|
356
|
+
*/
|
|
357
|
+
var settings = field.settings,
|
|
358
|
+
_field$multipleValues = field.multipleValues,
|
|
359
|
+
multipleValues = _field$multipleValues === void 0 ? false : _field$multipleValues;
|
|
360
|
+
|
|
361
|
+
if (settings && settings.defaultValue !== undefined) {
|
|
362
|
+
/**
|
|
363
|
+
* Special type of field is the boolean one.
|
|
364
|
+
* We MUST set true/false for default value.
|
|
365
|
+
*/
|
|
366
|
+
values[field.fieldId] = convertDefaultValue(field, settings.defaultValue);
|
|
367
|
+
return "continue";
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* No point in going further if predefined values are not enabled.
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
var predefinedValues = field.predefinedValues;
|
|
375
|
+
|
|
376
|
+
if (!predefinedValues || !predefinedValues.enabled || Array.isArray(predefinedValues.values) === false) {
|
|
377
|
+
return "continue";
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* When field is not a multiple values one, we find the first possible default selected value and set it as field value.
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
if (!multipleValues) {
|
|
385
|
+
var selectedValue = predefinedValues.values.find(function (_ref8) {
|
|
386
|
+
var selected = _ref8.selected;
|
|
387
|
+
return !!selected;
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
if (selectedValue) {
|
|
391
|
+
values[field.fieldId] = convertDefaultValue(field, selectedValue.value);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
return "continue";
|
|
323
395
|
}
|
|
324
|
-
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
*/
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
values[field.fieldId] = predefinedValues.values.filter(function (_ref9) {
|
|
402
|
+
var selected = _ref9.selected;
|
|
403
|
+
return !!selected;
|
|
404
|
+
}).map(function (_ref10) {
|
|
405
|
+
var value = _ref10.value;
|
|
406
|
+
return convertDefaultValue(field, value);
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
411
|
+
var _ret = _loop();
|
|
412
|
+
|
|
413
|
+
if (_ret === "continue") continue;
|
|
414
|
+
}
|
|
415
|
+
} catch (err) {
|
|
416
|
+
_iterator.e(err);
|
|
417
|
+
} finally {
|
|
418
|
+
_iterator.f();
|
|
419
|
+
}
|
|
325
420
|
|
|
326
421
|
return _objectSpread(_objectSpread({}, values), overrides);
|
|
327
422
|
};
|
|
328
423
|
|
|
329
424
|
return {
|
|
330
|
-
|
|
425
|
+
/**
|
|
426
|
+
* If entry is not set or entry.id does not exist, it means that form is for the new entry, so fetch default values.
|
|
427
|
+
*/
|
|
428
|
+
data: entry && entry.id ? entry : getDefaultValues(),
|
|
331
429
|
loading: loading,
|
|
332
430
|
setLoading: setLoading,
|
|
333
431
|
onChange: params.onChange,
|
|
@@ -43,9 +43,11 @@ var cleanupModelDataFields = function cleanupModelDataFields(fields) {
|
|
|
43
43
|
enabled: enabled,
|
|
44
44
|
values: values.map(function (_ref3) {
|
|
45
45
|
var label = _ref3.label,
|
|
46
|
-
value = _ref3.value
|
|
46
|
+
value = _ref3.value,
|
|
47
|
+
selected = _ref3.selected;
|
|
47
48
|
return {
|
|
48
49
|
label: label,
|
|
50
|
+
selected: selected || false,
|
|
49
51
|
value: String(value)
|
|
50
52
|
};
|
|
51
53
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const EditContainer: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
2
|
+
export declare const EditContainer: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.DetailedHTMLProps<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>;
|
|
3
3
|
export declare const Editor: () => JSX.Element;
|
|
@@ -14,7 +14,7 @@ import { LeftPanel, RightPanel, SplitView } from "@webiny/app-admin/components/S
|
|
|
14
14
|
import { Icon } from "@webiny/ui/Icon";
|
|
15
15
|
import { Typography } from "@webiny/ui/Typography";
|
|
16
16
|
import { Tab, Tabs } from "@webiny/ui/Tabs";
|
|
17
|
-
import { ReactComponent as FormIcon } from "
|
|
17
|
+
import { ReactComponent as FormIcon } from "./icons/round-assignment-24px.svg";
|
|
18
18
|
import { FieldsSidebar } from "./FieldsSidebar";
|
|
19
19
|
import { FieldEditor } from "../FieldEditor";
|
|
20
20
|
import { PreviewTab } from "./PreviewTab";
|
|
@@ -10,5 +10,6 @@ export declare type DraggableProps = {
|
|
|
10
10
|
endDrag?: any;
|
|
11
11
|
target?: string[];
|
|
12
12
|
};
|
|
13
|
-
declare
|
|
14
|
-
|
|
13
|
+
declare function Draggable(props: DraggableProps): JSX.Element;
|
|
14
|
+
declare const _default: React.MemoExoticComponent<typeof Draggable>;
|
|
15
|
+
export default _default;
|
|
@@ -2,7 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { useDrag, DragPreviewImage } from "react-dnd";
|
|
4
4
|
var emptyImage = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
function Draggable(props) {
|
|
6
7
|
var children = props.children,
|
|
7
8
|
beginDrag = props.beginDrag,
|
|
8
9
|
endDrag = props.endDrag,
|
|
@@ -45,5 +46,6 @@ var Draggable = /*#__PURE__*/React.memo(function (props) {
|
|
|
45
46
|
isDragging: isDragging,
|
|
46
47
|
drag: drag
|
|
47
48
|
}));
|
|
48
|
-
}
|
|
49
|
-
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default /*#__PURE__*/React.memo(Draggable);
|
|
@@ -19,5 +19,6 @@ export declare type DroppableProps = {
|
|
|
19
19
|
}) => boolean;
|
|
20
20
|
onDrop?: (item: DragSource) => void;
|
|
21
21
|
};
|
|
22
|
-
declare
|
|
23
|
-
|
|
22
|
+
declare function Droppable(props: DroppableProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
23
|
+
declare const _default: React.MemoExoticComponent<typeof Droppable>;
|
|
24
|
+
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useDrop } from "react-dnd";
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
function Droppable(props) {
|
|
5
6
|
var children = props.children,
|
|
6
7
|
onDrop = props.onDrop,
|
|
7
8
|
_props$isVisible = props.isVisible,
|
|
@@ -41,5 +42,6 @@ var Droppable = /*#__PURE__*/React.memo(function (props) {
|
|
|
41
42
|
item: item,
|
|
42
43
|
drop: drop
|
|
43
44
|
});
|
|
44
|
-
}
|
|
45
|
-
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default /*#__PURE__*/React.memo(Droppable);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CmsEditorField, CmsEditorFieldTypePlugin } from "../../../../types";
|
|
3
|
+
import { FormRenderPropParams } from "@webiny/form";
|
|
4
|
+
export interface Props {
|
|
5
|
+
field: CmsEditorField;
|
|
6
|
+
fieldPlugin: CmsEditorFieldTypePlugin;
|
|
7
|
+
form: FormRenderPropParams;
|
|
8
|
+
}
|
|
9
|
+
declare const PredefinedValues: React.FC<Props>;
|
|
10
|
+
export default PredefinedValues;
|
|
@@ -2,7 +2,8 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
|
2
2
|
import React, { useCallback, useRef, cloneElement } from "react";
|
|
3
3
|
import getValue from "./functions/getValue";
|
|
4
4
|
import setValue from "./functions/setValue";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
var PredefinedValues = function PredefinedValues(_ref) {
|
|
6
7
|
var field = _ref.field,
|
|
7
8
|
fieldPlugin = _ref.fieldPlugin,
|
|
8
9
|
form = _ref.form;
|
|
@@ -48,8 +49,11 @@ export default function PredefinedValues(_ref) {
|
|
|
48
49
|
|
|
49
50
|
return memoizedBindComponents.current[memoKey];
|
|
50
51
|
}, []);
|
|
51
|
-
return fieldPlugin.field.renderPredefinedValues({
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fieldPlugin.field.renderPredefinedValues({
|
|
52
53
|
field: field,
|
|
53
|
-
getBind: getBind
|
|
54
|
-
|
|
55
|
-
}
|
|
54
|
+
getBind: getBind,
|
|
55
|
+
form: form
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default PredefinedValues;
|
|
@@ -10,10 +10,10 @@ import { css } from "emotion";
|
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
11
|
import { IconButton } from "@webiny/ui/Button";
|
|
12
12
|
import { Typography } from "@webiny/ui/Typography";
|
|
13
|
-
import { ReactComponent as EditIcon } from "
|
|
14
|
-
import { ReactComponent as DeleteIcon } from "
|
|
15
|
-
import { ReactComponent as TitleIcon } from "
|
|
16
|
-
import { ReactComponent as MoreVerticalIcon } from "
|
|
13
|
+
import { ReactComponent as EditIcon } from "../../icons/edit.svg";
|
|
14
|
+
import { ReactComponent as DeleteIcon } from "../../icons/delete.svg";
|
|
15
|
+
import { ReactComponent as TitleIcon } from "../../icons/title-24px.svg";
|
|
16
|
+
import { ReactComponent as MoreVerticalIcon } from "../../icons/more_vert.svg";
|
|
17
17
|
import { Menu, MenuItem } from "@webiny/ui/Menu";
|
|
18
18
|
import { plugins } from "@webiny/plugins";
|
|
19
19
|
import { ListItemGraphic } from "@webiny/ui/List";
|
|
@@ -6,7 +6,7 @@ import React, { Fragment } from "react";
|
|
|
6
6
|
import get from "lodash/get";
|
|
7
7
|
import { Icon } from "@webiny/ui/Icon";
|
|
8
8
|
import { i18n } from "@webiny/app/i18n";
|
|
9
|
-
import { ReactComponent as HandleIcon } from "
|
|
9
|
+
import { ReactComponent as HandleIcon } from "../../icons/round-drag_indicator-24px.svg";
|
|
10
10
|
import { Center, Vertical, Horizontal } from "../DropZone";
|
|
11
11
|
import Draggable from "../Draggable";
|
|
12
12
|
import EditFieldDialog from "./EditFieldDialog";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const RowContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
3
|
-
export declare const Row: 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 RowContainer: 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>;
|
|
3
|
+
export declare const Row: 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>;
|
|
4
4
|
export declare const fieldContainer: string;
|
|
5
5
|
export declare const rowHandle: string;
|
|
6
6
|
export declare const fieldHandle: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
3
4
|
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
@@ -13,5 +14,5 @@ export var ContentGroupMenuElement = /*#__PURE__*/function (_NavigationMenuEleme
|
|
|
13
14
|
return _super.apply(this, arguments);
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
return ContentGroupMenuElement;
|
|
17
|
+
return _createClass(ContentGroupMenuElement);
|
|
17
18
|
}(NavigationMenuElement);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
3
4
|
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
@@ -13,5 +14,5 @@ export var ContentModelMenuElement = /*#__PURE__*/function (_NavigationMenuEleme
|
|
|
13
14
|
return _super.apply(this, arguments);
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
return ContentModelMenuElement;
|
|
17
|
+
return _createClass(ContentModelMenuElement);
|
|
17
18
|
}(NavigationMenuElement);
|
|
@@ -47,7 +47,7 @@ export var NothingToShowElement = /*#__PURE__*/function (_NavigationMenuElemen)
|
|
|
47
47
|
return _this;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
return NothingToShowElement;
|
|
50
|
+
return _createClass(NothingToShowElement);
|
|
51
51
|
}(NavigationMenuElement);
|
|
52
52
|
export var NothingToShowRenderer = /*#__PURE__*/function (_UIRenderer) {
|
|
53
53
|
_inherits(NothingToShowRenderer, _UIRenderer);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FIELDS_FIELDS = "\n id\n fieldId\n type\n label\n placeholderText\n helpText \n predefinedValues {\n enabled\n values {\n label\n value\n }\n }\n multipleValues \n renderer {\n name\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n";
|
|
1
|
+
export declare const FIELDS_FIELDS = "\n id\n fieldId\n type\n label\n placeholderText\n helpText \n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n multipleValues \n renderer {\n name\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n";
|
|
2
2
|
export declare const MODEL_FIELDS: string;
|
|
3
3
|
export declare const GET_CONTENT_MODEL: import("graphql").DocumentNode;
|
|
4
4
|
export declare const UPDATE_CONTENT_MODEL: import("graphql").DocumentNode;
|
|
@@ -3,7 +3,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
5
|
import gql from "graphql-tag";
|
|
6
|
-
export var FIELDS_FIELDS = "\n id\n fieldId\n type\n label\n placeholderText\n helpText \n predefinedValues {\n enabled\n values {\n label\n value\n }\n }\n multipleValues \n renderer {\n name\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n";
|
|
6
|
+
export var FIELDS_FIELDS = "\n id\n fieldId\n type\n label\n placeholderText\n helpText \n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n multipleValues \n renderer {\n name\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n";
|
|
7
7
|
export var MODEL_FIELDS = "\n name\n group {\n id\n name\n }\n description\n modelId\n savedOn\n titleFieldId\n lockedFields\n layout\n fields {\n ".concat(FIELDS_FIELDS, "\n }\n");
|
|
8
8
|
export var GET_CONTENT_MODEL = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query CmsGetContentModel($modelId: ID!) {\n getContentModel(modelId: $modelId) {\n data {\n ", "\n }\n error {\n code\n message\n data\n }\n }\n }\n"])), MODEL_FIELDS);
|
|
9
9
|
export var UPDATE_CONTENT_MODEL = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n mutation CmsUpdateContentModel($modelId: ID!, $data: CmsContentModelUpdateInput!) {\n updateContentModel(modelId: $modelId, data: $data) {\n data {\n ", "\n }\n error {\n code\n message\n data\n }\n }\n }\n"])), MODEL_FIELDS);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Fragment } from "react";
|
|
2
2
|
import { AddMenu as Menu } from "@webiny/app-admin";
|
|
3
|
-
import { ReactComponent as HeadlessCmsIcon } from "
|
|
3
|
+
import { ReactComponent as HeadlessCmsIcon } from "../icons/devices_other-black-24px.svg";
|
|
4
4
|
import GlobalSearchPlugins from "./GlobalSearchPlugins";
|
|
5
5
|
import usePermission from "../hooks/usePermission";
|
|
6
6
|
import { ContentGroupsMenuItems } from "./ContentGroupsMenuItems";
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { css } from "emotion";
|
|
3
3
|
import { IconButton } from "@webiny/ui/Button";
|
|
4
4
|
import { useRouter } from "@webiny/react-router";
|
|
5
|
-
import { ReactComponent as BackIcon } from "
|
|
5
|
+
import { ReactComponent as BackIcon } from "./icons/round-arrow_back-24px.svg";
|
|
6
6
|
var backStyles = /*#__PURE__*/css({
|
|
7
7
|
marginLeft: -10
|
|
8
8
|
}, "label:backStyles;");
|
|
@@ -8,7 +8,7 @@ import { useRouter } from "@webiny/react-router";
|
|
|
8
8
|
import { i18n } from "@webiny/app/i18n";
|
|
9
9
|
import { IconButton } from "@webiny/ui/Button";
|
|
10
10
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
11
|
-
import { ReactComponent as ViewListIcon } from "
|
|
11
|
+
import { ReactComponent as ViewListIcon } from "../../../icons/view_list.svg";
|
|
12
12
|
import { GET_CONTENT_MODEL } from "../../../graphql/contentModels";
|
|
13
13
|
import { useContentModelEditor } from "../../../components/ContentModelEditor/useContentModelEditor";
|
|
14
14
|
var t = i18n.namespace("app-headless-cms/admin/editor/top-bar/save-button");
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Divider: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
2
|
+
declare const Divider: 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>;
|
|
3
3
|
export default Divider;
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useState, useCallback } from "react";
|
|
3
3
|
import { IconButton } from "@webiny/ui/Button";
|
|
4
4
|
import FormSettings from "./FormSettings";
|
|
5
|
-
import { ReactComponent as SettingsIcon } from "
|
|
5
|
+
import { ReactComponent as SettingsIcon } from "./../icons/settings.svg";
|
|
6
6
|
|
|
7
7
|
var FormSettingsButton = function FormSettingsButton() {
|
|
8
8
|
var _useState = useState(false),
|