@firecms/collection_editor 3.0.0-beta.13 → 3.0.0-beta.14
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/README.md +165 -1
- package/dist/ConfigControllerProvider.d.ts +0 -1
- package/dist/index.es.js +988 -791
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +984 -790
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +0 -1
- package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +1 -1
- package/dist/ui/collection_editor/PropertyTree.d.ts +2 -3
- package/dist/useCollectionEditorPlugin.d.ts +3 -3
- package/package.json +8 -9
- package/src/ConfigControllerProvider.tsx +0 -5
- package/src/types/collection_editor_controller.tsx +0 -2
- package/src/ui/HomePageEditorCollectionAction.tsx +2 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +34 -0
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +5 -21
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +5 -4
- package/src/ui/collection_editor/PropertyEditView.tsx +1 -2
- package/src/ui/collection_editor/PropertyTree.tsx +183 -139
- package/src/ui/collection_editor/properties/MapPropertyField.tsx +1 -1
- package/src/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +2 -0
- package/src/useCollectionEditorPlugin.tsx +5 -6
- package/src/utils/collections.ts +1 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("@firecms/core"), require("react"), require("react-fast-compare"), require("@firecms/ui"), require("yup"), require("@firecms/formex"), require("@firecms/schema_inference"), require("@
|
|
3
|
-
})(this, function(exports2, jsxRuntime, reactCompilerRuntime, core, React, equal, ui, Yup, formex, schema_inference,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("@firecms/core"), require("react"), require("react-fast-compare"), require("@firecms/ui"), require("yup"), require("@firecms/formex"), require("@firecms/schema_inference"), require("@dnd-kit/core"), require("@dnd-kit/sortable"), require("@dnd-kit/modifiers"), require("@dnd-kit/utilities"), require("json5"), require("prism-react-renderer"), require("@firecms/data_import_export"), require("react-router")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react-compiler-runtime", "@firecms/core", "react", "react-fast-compare", "@firecms/ui", "yup", "@firecms/formex", "@firecms/schema_inference", "@dnd-kit/core", "@dnd-kit/sortable", "@dnd-kit/modifiers", "@dnd-kit/utilities", "json5", "prism-react-renderer", "@firecms/data_import_export", "react-router"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS collection editor"] = {}, global.jsxRuntime, global.reactCompilerRuntime, global.core, global.React, global.equal, global.ui, global.Yup, global.formex, global.schema_inference, global.core$1, global.sortable, global.modifiers, global.utilities, global.JSON5, global.prismReactRenderer, global.data_import_export, global.reactRouter));
|
|
3
|
+
})(this, function(exports2, jsxRuntime, reactCompilerRuntime, core, React, equal, ui, Yup, formex, schema_inference, core$1, sortable, modifiers, utilities, JSON5, prismReactRenderer, data_import_export, reactRouter) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
return t18;
|
|
170
170
|
}
|
|
171
171
|
function CollectionDetailsForm(t0) {
|
|
172
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(196);
|
|
173
173
|
const {
|
|
174
174
|
isNewCollection,
|
|
175
175
|
reservedGroups,
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
}
|
|
452
452
|
const t37 = !isSubcollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 sm:col-span-4 relative", children: [
|
|
453
453
|
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: showErrors && Boolean(errors.group), disabled: isSubmitting, value: values.group ?? "", autoComplete: "off", onChange: (event) => setFieldValue("group", event.target.value), name: "group", inputRef: groupRef, label: "Group" }),
|
|
454
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.AutocompleteItem, { onClick: () => {
|
|
454
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.AutocompleteItem, { className: "pr-6 pl-14", onClick: () => {
|
|
455
455
|
setAutoCompleteOpen(false);
|
|
456
456
|
setFieldValue("group", group_0 ?? null);
|
|
457
457
|
}, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: group_0 }) }, index + "_" + group_0)) }),
|
|
@@ -475,101 +475,143 @@
|
|
|
475
475
|
} else {
|
|
476
476
|
t40 = $[58];
|
|
477
477
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
] });
|
|
484
|
-
$[59] = t41;
|
|
485
|
-
} else {
|
|
486
|
-
t41 = $[59];
|
|
487
|
-
}
|
|
488
|
-
const t42 = !isNewCollection;
|
|
489
|
-
const t43 = showErrors && Boolean(errors.id);
|
|
490
|
-
let t44;
|
|
491
|
-
if ($[60] !== t42 || $[61] !== t43) {
|
|
492
|
-
t44 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
478
|
+
const t41 = values.history === null || values.history === void 0 ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
|
|
479
|
+
let t42;
|
|
480
|
+
if ($[59] !== setFieldValue) {
|
|
481
|
+
t42 = (v) => setFieldValue("history", v);
|
|
482
|
+
$[59] = setFieldValue;
|
|
493
483
|
$[60] = t42;
|
|
494
|
-
$[61] = t43;
|
|
495
|
-
$[62] = t44;
|
|
496
484
|
} else {
|
|
497
|
-
|
|
485
|
+
t42 = $[60];
|
|
498
486
|
}
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
487
|
+
const t43 = values.history === void 0 ? null : values.history;
|
|
488
|
+
let t44;
|
|
489
|
+
if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
|
|
490
|
+
t44 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
|
|
491
|
+
$[61] = t41;
|
|
492
|
+
$[62] = t42;
|
|
493
|
+
$[63] = t43;
|
|
494
|
+
$[64] = t44;
|
|
495
|
+
} else {
|
|
496
|
+
t44 = $[64];
|
|
497
|
+
}
|
|
498
|
+
let t45;
|
|
499
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
500
|
+
t45 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
|
|
501
|
+
"When enabled, each document in this collection will have a history of changes. This is useful for auditing purposes. The data is stored in a subcollection of the document in your database, called ",
|
|
502
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "__history" }),
|
|
503
|
+
"."
|
|
504
|
+
] });
|
|
505
|
+
$[65] = t45;
|
|
507
506
|
} else {
|
|
508
|
-
|
|
507
|
+
t45 = $[65];
|
|
509
508
|
}
|
|
510
|
-
let
|
|
511
|
-
if ($[66] !== t44
|
|
512
|
-
|
|
509
|
+
let t46;
|
|
510
|
+
if ($[66] !== t44) {
|
|
511
|
+
t46 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
513
512
|
t44,
|
|
514
|
-
|
|
513
|
+
t45
|
|
515
514
|
] });
|
|
516
515
|
$[66] = t44;
|
|
517
|
-
$[67] =
|
|
518
|
-
|
|
516
|
+
$[67] = t46;
|
|
517
|
+
} else {
|
|
518
|
+
t46 = $[67];
|
|
519
|
+
}
|
|
520
|
+
let t47;
|
|
521
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
522
|
+
t47 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
523
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
525
|
+
] });
|
|
526
|
+
$[68] = t47;
|
|
519
527
|
} else {
|
|
520
|
-
|
|
528
|
+
t47 = $[68];
|
|
521
529
|
}
|
|
522
|
-
const
|
|
530
|
+
const t48 = !isNewCollection;
|
|
531
|
+
const t49 = showErrors && Boolean(errors.id);
|
|
523
532
|
let t50;
|
|
524
|
-
if ($[69] !==
|
|
525
|
-
t50 = (
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
};
|
|
529
|
-
$[69] = handleChange;
|
|
530
|
-
$[70] = setFieldTouched;
|
|
533
|
+
if ($[69] !== t48 || $[70] !== t49) {
|
|
534
|
+
t50 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t48, label: "Collection id", error: t49 });
|
|
535
|
+
$[69] = t48;
|
|
536
|
+
$[70] = t49;
|
|
531
537
|
$[71] = t50;
|
|
532
538
|
} else {
|
|
533
539
|
t50 = $[71];
|
|
534
540
|
}
|
|
535
|
-
const t51 =
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
} else {
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
541
|
+
const t51 = touched.id && Boolean(errors.id);
|
|
542
|
+
const t52 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
543
|
+
let t53;
|
|
544
|
+
if ($[72] !== t51 || $[73] !== t52) {
|
|
545
|
+
t53 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t51, children: t52 });
|
|
546
|
+
$[72] = t51;
|
|
547
|
+
$[73] = t52;
|
|
548
|
+
$[74] = t53;
|
|
549
|
+
} else {
|
|
550
|
+
t53 = $[74];
|
|
551
|
+
}
|
|
552
|
+
let t54;
|
|
553
|
+
if ($[75] !== t50 || $[76] !== t53) {
|
|
554
|
+
t54 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
555
|
+
t50,
|
|
556
|
+
t53
|
|
557
|
+
] });
|
|
558
|
+
$[75] = t50;
|
|
551
559
|
$[76] = t53;
|
|
552
560
|
$[77] = t54;
|
|
553
|
-
$[78] = t55;
|
|
554
561
|
} else {
|
|
555
|
-
|
|
562
|
+
t54 = $[77];
|
|
556
563
|
}
|
|
564
|
+
const t55 = showErrors && Boolean(errors.singularName);
|
|
557
565
|
let t56;
|
|
558
|
-
if ($[
|
|
559
|
-
t56 =
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
-
$[
|
|
566
|
+
if ($[78] !== handleChange || $[79] !== setFieldTouched) {
|
|
567
|
+
t56 = (e_0) => {
|
|
568
|
+
setFieldTouched("singularName", true);
|
|
569
|
+
return handleChange(e_0);
|
|
570
|
+
};
|
|
571
|
+
$[78] = handleChange;
|
|
572
|
+
$[79] = setFieldTouched;
|
|
573
|
+
$[80] = t56;
|
|
566
574
|
} else {
|
|
567
|
-
t56 = $[
|
|
575
|
+
t56 = $[80];
|
|
568
576
|
}
|
|
569
|
-
const t57 =
|
|
577
|
+
const t57 = values.singularName ?? "";
|
|
570
578
|
let t58;
|
|
571
|
-
if ($[82] !==
|
|
572
|
-
t58 = (
|
|
579
|
+
if ($[81] !== t55 || $[82] !== t56 || $[83] !== t57) {
|
|
580
|
+
t58 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t55, name: "singularName", "aria-describedby": "singularName-helper", onChange: t56, value: t57, label: "Singular name" });
|
|
581
|
+
$[81] = t55;
|
|
582
|
+
$[82] = t56;
|
|
583
|
+
$[83] = t57;
|
|
584
|
+
$[84] = t58;
|
|
585
|
+
} else {
|
|
586
|
+
t58 = $[84];
|
|
587
|
+
}
|
|
588
|
+
const t59 = showErrors && Boolean(errors.singularName);
|
|
589
|
+
const t60 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
590
|
+
let t61;
|
|
591
|
+
if ($[85] !== t59 || $[86] !== t60) {
|
|
592
|
+
t61 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t59, children: t60 });
|
|
593
|
+
$[85] = t59;
|
|
594
|
+
$[86] = t60;
|
|
595
|
+
$[87] = t61;
|
|
596
|
+
} else {
|
|
597
|
+
t61 = $[87];
|
|
598
|
+
}
|
|
599
|
+
let t62;
|
|
600
|
+
if ($[88] !== t58 || $[89] !== t61) {
|
|
601
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
602
|
+
t58,
|
|
603
|
+
t61
|
|
604
|
+
] });
|
|
605
|
+
$[88] = t58;
|
|
606
|
+
$[89] = t61;
|
|
607
|
+
$[90] = t62;
|
|
608
|
+
} else {
|
|
609
|
+
t62 = $[90];
|
|
610
|
+
}
|
|
611
|
+
const t63 = showErrors && Boolean(errors.sideDialogWidth);
|
|
612
|
+
let t64;
|
|
613
|
+
if ($[91] !== setFieldTouched || $[92] !== setFieldValue) {
|
|
614
|
+
t64 = (e_1) => {
|
|
573
615
|
setFieldTouched("sideDialogWidth", true);
|
|
574
616
|
const value_0 = e_1.target.value;
|
|
575
617
|
if (!value_0) {
|
|
@@ -580,360 +622,402 @@
|
|
|
580
622
|
}
|
|
581
623
|
}
|
|
582
624
|
};
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
625
|
+
$[91] = setFieldTouched;
|
|
626
|
+
$[92] = setFieldValue;
|
|
627
|
+
$[93] = t64;
|
|
586
628
|
} else {
|
|
587
|
-
|
|
629
|
+
t64 = $[93];
|
|
588
630
|
}
|
|
589
|
-
let
|
|
590
|
-
if ($[
|
|
591
|
-
|
|
631
|
+
let t65;
|
|
632
|
+
if ($[94] !== setFieldValue) {
|
|
633
|
+
t65 = () => {
|
|
592
634
|
setFieldValue("sideDialogWidth", null);
|
|
593
635
|
};
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
636
|
+
$[94] = setFieldValue;
|
|
637
|
+
$[95] = t65;
|
|
596
638
|
} else {
|
|
597
|
-
|
|
639
|
+
t65 = $[95];
|
|
598
640
|
}
|
|
599
|
-
const
|
|
600
|
-
let t61;
|
|
601
|
-
if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
|
|
602
|
-
t61 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
603
|
-
$[87] = t61;
|
|
604
|
-
} else {
|
|
605
|
-
t61 = $[87];
|
|
606
|
-
}
|
|
607
|
-
let t62;
|
|
608
|
-
if ($[88] !== t59 || $[89] !== t60) {
|
|
609
|
-
t62 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
610
|
-
$[88] = t59;
|
|
611
|
-
$[89] = t60;
|
|
612
|
-
$[90] = t62;
|
|
613
|
-
} else {
|
|
614
|
-
t62 = $[90];
|
|
615
|
-
}
|
|
616
|
-
const t63 = values.sideDialogWidth ?? "";
|
|
617
|
-
let t64;
|
|
618
|
-
if ($[91] !== t57 || $[92] !== t58 || $[93] !== t62 || $[94] !== t63) {
|
|
619
|
-
t64 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t57, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t58, endAdornment: t62, value: t63, label: "Side dialog width" });
|
|
620
|
-
$[91] = t57;
|
|
621
|
-
$[92] = t58;
|
|
622
|
-
$[93] = t62;
|
|
623
|
-
$[94] = t63;
|
|
624
|
-
$[95] = t64;
|
|
625
|
-
} else {
|
|
626
|
-
t64 = $[95];
|
|
627
|
-
}
|
|
628
|
-
const t65 = showErrors && Boolean(errors.singularName);
|
|
629
|
-
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
641
|
+
const t66 = !values.sideDialogWidth;
|
|
630
642
|
let t67;
|
|
631
|
-
if ($[96]
|
|
632
|
-
t67 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
633
|
-
$[96] =
|
|
634
|
-
$[97] = t66;
|
|
635
|
-
$[98] = t67;
|
|
643
|
+
if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
|
|
644
|
+
t67 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
645
|
+
$[96] = t67;
|
|
636
646
|
} else {
|
|
637
|
-
t67 = $[
|
|
647
|
+
t67 = $[96];
|
|
638
648
|
}
|
|
639
649
|
let t68;
|
|
640
|
-
if ($[
|
|
641
|
-
t68 = /* @__PURE__ */ jsxRuntime.
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
]
|
|
645
|
-
|
|
646
|
-
$[
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
t71 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t69, name: "description", value: t70, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
656
|
-
$[102] = handleChange;
|
|
650
|
+
if ($[97] !== t65 || $[98] !== t66) {
|
|
651
|
+
t68 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t65, disabled: t66, children: t67 });
|
|
652
|
+
$[97] = t65;
|
|
653
|
+
$[98] = t66;
|
|
654
|
+
$[99] = t68;
|
|
655
|
+
} else {
|
|
656
|
+
t68 = $[99];
|
|
657
|
+
}
|
|
658
|
+
const t69 = values.sideDialogWidth ?? "";
|
|
659
|
+
let t70;
|
|
660
|
+
if ($[100] !== t63 || $[101] !== t64 || $[102] !== t68 || $[103] !== t69) {
|
|
661
|
+
t70 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t63, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t64, endAdornment: t68, value: t69, label: "Side dialog width" });
|
|
662
|
+
$[100] = t63;
|
|
663
|
+
$[101] = t64;
|
|
664
|
+
$[102] = t68;
|
|
657
665
|
$[103] = t69;
|
|
658
666
|
$[104] = t70;
|
|
659
|
-
$[105] = t71;
|
|
660
667
|
} else {
|
|
661
|
-
|
|
668
|
+
t70 = $[104];
|
|
662
669
|
}
|
|
663
|
-
const
|
|
664
|
-
const
|
|
665
|
-
let
|
|
666
|
-
if ($[
|
|
667
|
-
|
|
670
|
+
const t71 = showErrors && Boolean(errors.singularName);
|
|
671
|
+
const t72 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
672
|
+
let t73;
|
|
673
|
+
if ($[105] !== t71 || $[106] !== t72) {
|
|
674
|
+
t73 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t71, children: t72 });
|
|
675
|
+
$[105] = t71;
|
|
668
676
|
$[106] = t72;
|
|
669
677
|
$[107] = t73;
|
|
670
|
-
$[108] = t74;
|
|
671
678
|
} else {
|
|
672
|
-
|
|
679
|
+
t73 = $[107];
|
|
673
680
|
}
|
|
674
|
-
let
|
|
675
|
-
if ($[
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
681
|
+
let t74;
|
|
682
|
+
if ($[108] !== t70 || $[109] !== t73) {
|
|
683
|
+
t74 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
684
|
+
t70,
|
|
685
|
+
t73
|
|
679
686
|
] });
|
|
680
|
-
$[
|
|
687
|
+
$[108] = t70;
|
|
688
|
+
$[109] = t73;
|
|
681
689
|
$[110] = t74;
|
|
682
|
-
$[111] = t75;
|
|
683
690
|
} else {
|
|
684
|
-
|
|
691
|
+
t74 = $[110];
|
|
685
692
|
}
|
|
686
|
-
const
|
|
693
|
+
const t75 = showErrors && Boolean(errors.description);
|
|
694
|
+
const t76 = values.description ?? "";
|
|
687
695
|
let t77;
|
|
688
|
-
if ($[112]
|
|
689
|
-
t77 =
|
|
690
|
-
$[
|
|
696
|
+
if ($[111] !== handleChange || $[112] !== t75 || $[113] !== t76) {
|
|
697
|
+
t77 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t75, name: "description", value: t76, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
698
|
+
$[111] = handleChange;
|
|
699
|
+
$[112] = t75;
|
|
700
|
+
$[113] = t76;
|
|
701
|
+
$[114] = t77;
|
|
691
702
|
} else {
|
|
692
|
-
t77 = $[
|
|
703
|
+
t77 = $[114];
|
|
693
704
|
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
t78 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$b, children: t77 }) });
|
|
697
|
-
$[113] = handleChange;
|
|
698
|
-
$[114] = t76;
|
|
699
|
-
$[115] = t78;
|
|
700
|
-
} else {
|
|
701
|
-
t78 = $[115];
|
|
702
|
-
}
|
|
703
|
-
const t79 = customIdValue === "code_defined";
|
|
705
|
+
const t78 = showErrors && Boolean(errors.description);
|
|
706
|
+
const t79 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
704
707
|
let t80;
|
|
705
|
-
if ($[116] !==
|
|
706
|
-
t80 = (
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
setFieldValue("customId", v);
|
|
711
|
-
};
|
|
712
|
-
$[116] = setFieldValue;
|
|
708
|
+
if ($[115] !== t78 || $[116] !== t79) {
|
|
709
|
+
t80 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t78, children: t79 });
|
|
710
|
+
$[115] = t78;
|
|
711
|
+
$[116] = t79;
|
|
713
712
|
$[117] = t80;
|
|
714
713
|
} else {
|
|
715
714
|
t80 = $[117];
|
|
716
715
|
}
|
|
717
|
-
|
|
718
|
-
|
|
716
|
+
let t81;
|
|
717
|
+
if ($[118] !== t77 || $[119] !== t80) {
|
|
718
|
+
t81 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
719
|
+
t77,
|
|
720
|
+
t80
|
|
721
|
+
] });
|
|
722
|
+
$[118] = t77;
|
|
723
|
+
$[119] = t80;
|
|
724
|
+
$[120] = t81;
|
|
725
|
+
} else {
|
|
726
|
+
t81 = $[120];
|
|
727
|
+
}
|
|
728
|
+
const t82 = values.defaultSize ?? "";
|
|
719
729
|
let t83;
|
|
730
|
+
if ($[121] === Symbol.for("react.memo_cache_sentinel")) {
|
|
731
|
+
t83 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
732
|
+
$[121] = t83;
|
|
733
|
+
} else {
|
|
734
|
+
t83 = $[121];
|
|
735
|
+
}
|
|
720
736
|
let t84;
|
|
721
|
-
if ($[
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
$[
|
|
726
|
-
$[119] = t83;
|
|
727
|
-
$[120] = t84;
|
|
728
|
-
} else {
|
|
729
|
-
t82 = $[118];
|
|
730
|
-
t83 = $[119];
|
|
731
|
-
t84 = $[120];
|
|
732
|
-
}
|
|
733
|
-
let t85;
|
|
734
|
-
if ($[121] !== t79 || $[122] !== t80 || $[123] !== t81) {
|
|
735
|
-
t85 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t79, onValueChange: t80, value: t81, renderValue: _temp3$4, children: [
|
|
736
|
-
t82,
|
|
737
|
-
t83,
|
|
738
|
-
t84
|
|
739
|
-
] }) });
|
|
740
|
-
$[121] = t79;
|
|
741
|
-
$[122] = t80;
|
|
742
|
-
$[123] = t81;
|
|
743
|
-
$[124] = t85;
|
|
737
|
+
if ($[122] !== handleChange || $[123] !== t82) {
|
|
738
|
+
t84 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t82, renderValue: _temp$b, children: t83 }) });
|
|
739
|
+
$[122] = handleChange;
|
|
740
|
+
$[123] = t82;
|
|
741
|
+
$[124] = t84;
|
|
744
742
|
} else {
|
|
745
|
-
|
|
743
|
+
t84 = $[124];
|
|
746
744
|
}
|
|
745
|
+
const t85 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
|
|
747
746
|
let t86;
|
|
748
747
|
if ($[125] !== setFieldValue) {
|
|
749
|
-
t86 = (v_0) => setFieldValue("
|
|
748
|
+
t86 = (v_0) => setFieldValue("includeJsonView", v_0);
|
|
750
749
|
$[125] = setFieldValue;
|
|
751
750
|
$[126] = t86;
|
|
752
751
|
} else {
|
|
753
752
|
t86 = $[126];
|
|
754
753
|
}
|
|
755
|
-
const t87 = values.
|
|
754
|
+
const t87 = values.includeJsonView === void 0 ? true : values.includeJsonView;
|
|
756
755
|
let t88;
|
|
757
|
-
if ($[127] !==
|
|
758
|
-
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label:
|
|
759
|
-
$[127] =
|
|
760
|
-
$[128] =
|
|
761
|
-
$[129] =
|
|
756
|
+
if ($[127] !== t85 || $[128] !== t86 || $[129] !== t87) {
|
|
757
|
+
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: t85, onValueChange: t86, value: t87 });
|
|
758
|
+
$[127] = t85;
|
|
759
|
+
$[128] = t86;
|
|
760
|
+
$[129] = t87;
|
|
761
|
+
$[130] = t88;
|
|
762
762
|
} else {
|
|
763
|
-
t88 = $[
|
|
763
|
+
t88 = $[130];
|
|
764
764
|
}
|
|
765
765
|
let t89;
|
|
766
|
-
if ($[
|
|
767
|
-
t89 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "
|
|
768
|
-
$[
|
|
766
|
+
if ($[131] === Symbol.for("react.memo_cache_sentinel")) {
|
|
767
|
+
t89 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Include the JSON representation of the document." });
|
|
768
|
+
$[131] = t89;
|
|
769
769
|
} else {
|
|
770
|
-
t89 = $[
|
|
770
|
+
t89 = $[131];
|
|
771
771
|
}
|
|
772
772
|
let t90;
|
|
773
|
-
if ($[
|
|
774
|
-
t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12
|
|
773
|
+
if ($[132] !== t88) {
|
|
774
|
+
t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
775
775
|
t88,
|
|
776
776
|
t89
|
|
777
777
|
] });
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
778
|
+
$[132] = t88;
|
|
779
|
+
$[133] = t90;
|
|
780
780
|
} else {
|
|
781
|
-
t90 = $[
|
|
781
|
+
t90 = $[133];
|
|
782
782
|
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
783
|
+
const t91 = customIdValue === "code_defined";
|
|
784
|
+
let t92;
|
|
785
|
+
if ($[134] !== setFieldValue) {
|
|
786
|
+
t92 = (v_1) => {
|
|
787
|
+
if (v_1 === "code_defined") {
|
|
788
|
+
throw new Error("This should not happen");
|
|
789
|
+
}
|
|
790
|
+
setFieldValue("customId", v_1);
|
|
791
|
+
};
|
|
792
|
+
$[134] = setFieldValue;
|
|
793
|
+
$[135] = t92;
|
|
788
794
|
} else {
|
|
789
|
-
|
|
795
|
+
t92 = $[135];
|
|
790
796
|
}
|
|
791
|
-
const
|
|
792
|
-
let
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
797
|
+
const t93 = customIdValue ?? "";
|
|
798
|
+
let t94;
|
|
799
|
+
let t95;
|
|
800
|
+
let t96;
|
|
801
|
+
if ($[136] === Symbol.for("react.memo_cache_sentinel")) {
|
|
802
|
+
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
803
|
+
t95 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
804
|
+
t96 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
805
|
+
$[136] = t94;
|
|
806
|
+
$[137] = t95;
|
|
807
|
+
$[138] = t96;
|
|
808
|
+
} else {
|
|
809
|
+
t94 = $[136];
|
|
810
|
+
t95 = $[137];
|
|
811
|
+
t96 = $[138];
|
|
812
|
+
}
|
|
813
|
+
let t97;
|
|
814
|
+
if ($[139] !== t91 || $[140] !== t92 || $[141] !== t93) {
|
|
815
|
+
t97 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t91, onValueChange: t92, value: t93, renderValue: _temp3$4, children: [
|
|
816
|
+
t94,
|
|
817
|
+
t95,
|
|
818
|
+
t96
|
|
819
|
+
] }) });
|
|
820
|
+
$[139] = t91;
|
|
821
|
+
$[140] = t92;
|
|
822
|
+
$[141] = t93;
|
|
823
|
+
$[142] = t97;
|
|
798
824
|
} else {
|
|
799
|
-
|
|
825
|
+
t97 = $[142];
|
|
800
826
|
}
|
|
801
|
-
let
|
|
802
|
-
if ($[
|
|
803
|
-
|
|
804
|
-
$[
|
|
827
|
+
let t98;
|
|
828
|
+
if ($[143] !== setFieldValue) {
|
|
829
|
+
t98 = (v_2) => setFieldValue("collectionGroup", v_2);
|
|
830
|
+
$[143] = setFieldValue;
|
|
831
|
+
$[144] = t98;
|
|
805
832
|
} else {
|
|
806
|
-
|
|
833
|
+
t98 = $[144];
|
|
807
834
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
]
|
|
814
|
-
$[
|
|
815
|
-
$[140] = t95;
|
|
835
|
+
const t99 = values.collectionGroup ?? false;
|
|
836
|
+
let t100;
|
|
837
|
+
if ($[145] !== t98 || $[146] !== t99) {
|
|
838
|
+
t100 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t98, value: t99 });
|
|
839
|
+
$[145] = t98;
|
|
840
|
+
$[146] = t99;
|
|
841
|
+
$[147] = t100;
|
|
816
842
|
} else {
|
|
817
|
-
|
|
843
|
+
t100 = $[147];
|
|
818
844
|
}
|
|
819
|
-
let
|
|
820
|
-
if ($[
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
t75,
|
|
826
|
-
t78,
|
|
827
|
-
t85,
|
|
828
|
-
t90,
|
|
829
|
-
t95
|
|
830
|
-
] });
|
|
831
|
-
$[141] = t48;
|
|
832
|
-
$[142] = t56;
|
|
833
|
-
$[143] = t68;
|
|
834
|
-
$[144] = t75;
|
|
835
|
-
$[145] = t78;
|
|
836
|
-
$[146] = t85;
|
|
837
|
-
$[147] = t90;
|
|
838
|
-
$[148] = t95;
|
|
839
|
-
$[149] = t96;
|
|
840
|
-
} else {
|
|
841
|
-
t96 = $[149];
|
|
845
|
+
let t101;
|
|
846
|
+
if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
|
|
847
|
+
t101 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
|
|
848
|
+
$[148] = t101;
|
|
849
|
+
} else {
|
|
850
|
+
t101 = $[148];
|
|
842
851
|
}
|
|
843
|
-
let
|
|
844
|
-
if ($[
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
852
|
+
let t102;
|
|
853
|
+
if ($[149] !== t100) {
|
|
854
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
855
|
+
t100,
|
|
856
|
+
t101
|
|
857
|
+
] });
|
|
858
|
+
$[149] = t100;
|
|
859
|
+
$[150] = t102;
|
|
849
860
|
} else {
|
|
850
|
-
|
|
861
|
+
t102 = $[150];
|
|
851
862
|
}
|
|
852
|
-
let
|
|
853
|
-
if ($[
|
|
854
|
-
|
|
863
|
+
let t103;
|
|
864
|
+
if ($[151] !== setFieldValue) {
|
|
865
|
+
t103 = (v_3) => setFieldValue("textSearchEnabled", v_3);
|
|
866
|
+
$[151] = setFieldValue;
|
|
867
|
+
$[152] = t103;
|
|
868
|
+
} else {
|
|
869
|
+
t103 = $[152];
|
|
870
|
+
}
|
|
871
|
+
const t104 = values.textSearchEnabled ?? false;
|
|
872
|
+
let t105;
|
|
873
|
+
if ($[153] !== t103 || $[154] !== t104) {
|
|
874
|
+
t105 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t103, value: t104 });
|
|
875
|
+
$[153] = t103;
|
|
876
|
+
$[154] = t104;
|
|
877
|
+
$[155] = t105;
|
|
878
|
+
} else {
|
|
879
|
+
t105 = $[155];
|
|
880
|
+
}
|
|
881
|
+
let t106;
|
|
882
|
+
if ($[156] === Symbol.for("react.memo_cache_sentinel")) {
|
|
883
|
+
t106 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
|
|
884
|
+
$[156] = t106;
|
|
885
|
+
} else {
|
|
886
|
+
t106 = $[156];
|
|
887
|
+
}
|
|
888
|
+
let t107;
|
|
889
|
+
if ($[157] !== t105) {
|
|
890
|
+
t107 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
891
|
+
t105,
|
|
892
|
+
t106
|
|
893
|
+
] });
|
|
894
|
+
$[157] = t105;
|
|
895
|
+
$[158] = t107;
|
|
896
|
+
} else {
|
|
897
|
+
t107 = $[158];
|
|
898
|
+
}
|
|
899
|
+
let t108;
|
|
900
|
+
if ($[159] !== t102 || $[160] !== t107 || $[161] !== t54 || $[162] !== t62 || $[163] !== t74 || $[164] !== t81 || $[165] !== t84 || $[166] !== t90 || $[167] !== t97) {
|
|
901
|
+
t108 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
902
|
+
t54,
|
|
903
|
+
t62,
|
|
904
|
+
t74,
|
|
905
|
+
t81,
|
|
906
|
+
t84,
|
|
907
|
+
t90,
|
|
855
908
|
t97,
|
|
909
|
+
t102,
|
|
910
|
+
t107
|
|
911
|
+
] });
|
|
912
|
+
$[159] = t102;
|
|
913
|
+
$[160] = t107;
|
|
914
|
+
$[161] = t54;
|
|
915
|
+
$[162] = t62;
|
|
916
|
+
$[163] = t74;
|
|
917
|
+
$[164] = t81;
|
|
918
|
+
$[165] = t84;
|
|
919
|
+
$[166] = t90;
|
|
920
|
+
$[167] = t97;
|
|
921
|
+
$[168] = t108;
|
|
922
|
+
} else {
|
|
923
|
+
t108 = $[168];
|
|
924
|
+
}
|
|
925
|
+
let t109;
|
|
926
|
+
if ($[169] !== advancedPanelExpanded || $[170] !== t108) {
|
|
927
|
+
t109 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t108 });
|
|
928
|
+
$[169] = advancedPanelExpanded;
|
|
929
|
+
$[170] = t108;
|
|
930
|
+
$[171] = t109;
|
|
931
|
+
} else {
|
|
932
|
+
t109 = $[171];
|
|
933
|
+
}
|
|
934
|
+
let t110;
|
|
935
|
+
if ($[172] !== children || $[173] !== t109) {
|
|
936
|
+
t110 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
937
|
+
t109,
|
|
856
938
|
children
|
|
857
939
|
] });
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
940
|
+
$[172] = children;
|
|
941
|
+
$[173] = t109;
|
|
942
|
+
$[174] = t110;
|
|
861
943
|
} else {
|
|
862
|
-
|
|
944
|
+
t110 = $[174];
|
|
863
945
|
}
|
|
864
|
-
let
|
|
865
|
-
if ($[
|
|
866
|
-
|
|
946
|
+
let t111;
|
|
947
|
+
if ($[175] !== t110 || $[176] !== t27 || $[177] !== t36 || $[178] !== t37 || $[179] !== t40 || $[180] !== t46) {
|
|
948
|
+
t111 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
|
|
867
949
|
t27,
|
|
868
950
|
t36,
|
|
869
951
|
t37,
|
|
870
952
|
t40,
|
|
871
|
-
|
|
953
|
+
t46,
|
|
954
|
+
t110
|
|
872
955
|
] });
|
|
873
|
-
$[
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
$[
|
|
878
|
-
$[
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
956
|
+
$[175] = t110;
|
|
957
|
+
$[176] = t27;
|
|
958
|
+
$[177] = t36;
|
|
959
|
+
$[178] = t37;
|
|
960
|
+
$[179] = t40;
|
|
961
|
+
$[180] = t46;
|
|
962
|
+
$[181] = t111;
|
|
963
|
+
} else {
|
|
964
|
+
t111 = $[181];
|
|
965
|
+
}
|
|
966
|
+
let t112;
|
|
967
|
+
if ($[182] === Symbol.for("react.memo_cache_sentinel")) {
|
|
968
|
+
t112 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
885
969
|
height: "52px"
|
|
886
970
|
} });
|
|
887
|
-
$[
|
|
971
|
+
$[182] = t112;
|
|
888
972
|
} else {
|
|
889
|
-
|
|
973
|
+
t112 = $[182];
|
|
890
974
|
}
|
|
891
|
-
let
|
|
892
|
-
if ($[
|
|
893
|
-
|
|
975
|
+
let t113;
|
|
976
|
+
if ($[183] !== setFieldValue) {
|
|
977
|
+
t113 = (icon) => {
|
|
894
978
|
setIconDialogOpen(false);
|
|
895
979
|
setFieldValue("icon", icon);
|
|
896
980
|
};
|
|
897
|
-
$[
|
|
898
|
-
$[
|
|
981
|
+
$[183] = setFieldValue;
|
|
982
|
+
$[184] = t113;
|
|
899
983
|
} else {
|
|
900
|
-
|
|
984
|
+
t113 = $[184];
|
|
901
985
|
}
|
|
902
|
-
let
|
|
903
|
-
if ($[
|
|
904
|
-
|
|
905
|
-
$[
|
|
906
|
-
$[
|
|
907
|
-
$[
|
|
986
|
+
let t114;
|
|
987
|
+
if ($[185] !== t113 || $[186] !== values.icon) {
|
|
988
|
+
t114 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t113 }) });
|
|
989
|
+
$[185] = t113;
|
|
990
|
+
$[186] = values.icon;
|
|
991
|
+
$[187] = t114;
|
|
908
992
|
} else {
|
|
909
|
-
|
|
993
|
+
t114 = $[187];
|
|
910
994
|
}
|
|
911
|
-
let
|
|
912
|
-
if ($[
|
|
913
|
-
|
|
914
|
-
$[
|
|
915
|
-
$[
|
|
916
|
-
$[
|
|
995
|
+
let t115;
|
|
996
|
+
if ($[188] !== iconDialogOpen || $[189] !== t114) {
|
|
997
|
+
t115 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t114 });
|
|
998
|
+
$[188] = iconDialogOpen;
|
|
999
|
+
$[189] = t114;
|
|
1000
|
+
$[190] = t115;
|
|
917
1001
|
} else {
|
|
918
|
-
|
|
1002
|
+
t115 = $[190];
|
|
919
1003
|
}
|
|
920
|
-
let
|
|
921
|
-
if ($[
|
|
922
|
-
|
|
1004
|
+
let t116;
|
|
1005
|
+
if ($[191] !== T0 || $[192] !== t111 || $[193] !== t115 || $[194] !== t18) {
|
|
1006
|
+
t116 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
923
1007
|
t18,
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1008
|
+
t111,
|
|
1009
|
+
t112,
|
|
1010
|
+
t115
|
|
927
1011
|
] }) });
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
930
|
-
$[
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
1012
|
+
$[191] = T0;
|
|
1013
|
+
$[192] = t111;
|
|
1014
|
+
$[193] = t115;
|
|
1015
|
+
$[194] = t18;
|
|
1016
|
+
$[195] = t116;
|
|
933
1017
|
} else {
|
|
934
|
-
|
|
1018
|
+
t116 = $[195];
|
|
935
1019
|
}
|
|
936
|
-
return
|
|
1020
|
+
return t116;
|
|
937
1021
|
}
|
|
938
1022
|
function _temp3$4(value_3) {
|
|
939
1023
|
if (value_3 === "code_defined") {
|
|
@@ -2694,7 +2778,7 @@
|
|
|
2694
2778
|
return t19;
|
|
2695
2779
|
}
|
|
2696
2780
|
const PropertyTree = React.memo(function PropertyTree2(t0) {
|
|
2697
|
-
const $ = reactCompilerRuntime.c(
|
|
2781
|
+
const $ = reactCompilerRuntime.c(37);
|
|
2698
2782
|
const {
|
|
2699
2783
|
namespace,
|
|
2700
2784
|
selectedPropertyKey,
|
|
@@ -2720,94 +2804,152 @@
|
|
|
2720
2804
|
}
|
|
2721
2805
|
const propertiesOrder = t1;
|
|
2722
2806
|
let t2;
|
|
2723
|
-
if ($[3]
|
|
2724
|
-
t2 =
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
}
|
|
2728
|
-
const startIndex = result.source.index;
|
|
2729
|
-
const endIndex = result.destination.index;
|
|
2730
|
-
const newPropertiesOrder = Array.from(propertiesOrder);
|
|
2731
|
-
const [removed] = newPropertiesOrder.splice(startIndex, 1);
|
|
2732
|
-
newPropertiesOrder.splice(endIndex, 0, removed);
|
|
2733
|
-
if (onPropertyMove) {
|
|
2734
|
-
onPropertyMove(newPropertiesOrder, namespace);
|
|
2807
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2808
|
+
t2 = {
|
|
2809
|
+
activationConstraint: {
|
|
2810
|
+
distance: 5
|
|
2735
2811
|
}
|
|
2736
2812
|
};
|
|
2737
|
-
$[3] =
|
|
2738
|
-
$[4] = onPropertyMove;
|
|
2739
|
-
$[5] = propertiesOrder;
|
|
2740
|
-
$[6] = t2;
|
|
2813
|
+
$[3] = t2;
|
|
2741
2814
|
} else {
|
|
2742
|
-
t2 = $[
|
|
2815
|
+
t2 = $[3];
|
|
2743
2816
|
}
|
|
2744
|
-
|
|
2745
|
-
|
|
2817
|
+
let t3;
|
|
2818
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2819
|
+
t3 = {
|
|
2820
|
+
coordinateGetter: sortable.sortableKeyboardCoordinates
|
|
2821
|
+
};
|
|
2822
|
+
$[4] = t3;
|
|
2823
|
+
} else {
|
|
2824
|
+
t3 = $[4];
|
|
2825
|
+
}
|
|
2826
|
+
const sensors = core$1.useSensors(core$1.useSensor(core$1.PointerSensor, t2), core$1.useSensor(core$1.KeyboardSensor, t3));
|
|
2746
2827
|
let t4;
|
|
2747
|
-
if ($[
|
|
2748
|
-
t4 = (
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2828
|
+
if ($[5] !== namespace || $[6] !== onPropertyMove || $[7] !== propertiesOrder) {
|
|
2829
|
+
t4 = (event) => {
|
|
2830
|
+
const {
|
|
2831
|
+
active,
|
|
2832
|
+
over
|
|
2833
|
+
} = event;
|
|
2834
|
+
if (!over || active.id === over.id) {
|
|
2835
|
+
return;
|
|
2836
|
+
}
|
|
2837
|
+
const activeId = String(active.id);
|
|
2838
|
+
const overId = String(over.id);
|
|
2839
|
+
const activeKey = activeId.includes(".") ? activeId.split(".").pop() : activeId;
|
|
2840
|
+
const overKey = overId.includes(".") ? overId.split(".").pop() : overId;
|
|
2841
|
+
if (!activeKey || !overKey) {
|
|
2842
|
+
return;
|
|
2843
|
+
}
|
|
2844
|
+
const oldIndex = propertiesOrder.indexOf(activeKey);
|
|
2845
|
+
const newIndex = propertiesOrder.indexOf(overKey);
|
|
2846
|
+
if (oldIndex !== -1 && newIndex !== -1) {
|
|
2847
|
+
const newPropertiesOrder = [...propertiesOrder];
|
|
2848
|
+
const [removed] = newPropertiesOrder.splice(oldIndex, 1);
|
|
2849
|
+
newPropertiesOrder.splice(newIndex, 0, removed);
|
|
2850
|
+
if (onPropertyMove) {
|
|
2851
|
+
onPropertyMove(newPropertiesOrder, namespace);
|
|
2755
2852
|
}
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
]
|
|
2760
|
-
$[7] =
|
|
2761
|
-
$[8] =
|
|
2762
|
-
|
|
2763
|
-
$[
|
|
2764
|
-
$[11] = inferredPropertyKeys;
|
|
2765
|
-
$[12] = namespace;
|
|
2766
|
-
$[13] = onPropertyClick;
|
|
2767
|
-
$[14] = onPropertyMove;
|
|
2768
|
-
$[15] = onPropertyRemove;
|
|
2769
|
-
$[16] = properties;
|
|
2770
|
-
$[17] = propertiesOrder;
|
|
2771
|
-
$[18] = selectedPropertyKey;
|
|
2772
|
-
$[19] = t4;
|
|
2773
|
-
} else {
|
|
2774
|
-
t4 = $[19];
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
$[5] = namespace;
|
|
2856
|
+
$[6] = onPropertyMove;
|
|
2857
|
+
$[7] = propertiesOrder;
|
|
2858
|
+
$[8] = t4;
|
|
2859
|
+
} else {
|
|
2860
|
+
t4 = $[8];
|
|
2775
2861
|
}
|
|
2862
|
+
const handleDragEnd = t4;
|
|
2776
2863
|
let t5;
|
|
2777
|
-
if ($[
|
|
2778
|
-
|
|
2779
|
-
$[
|
|
2780
|
-
|
|
2781
|
-
|
|
2864
|
+
if ($[9] !== namespace || $[10] !== propertiesOrder) {
|
|
2865
|
+
let t62;
|
|
2866
|
+
if ($[12] !== namespace) {
|
|
2867
|
+
t62 = (key) => getFullId(key, namespace);
|
|
2868
|
+
$[12] = namespace;
|
|
2869
|
+
$[13] = t62;
|
|
2870
|
+
} else {
|
|
2871
|
+
t62 = $[13];
|
|
2872
|
+
}
|
|
2873
|
+
t5 = propertiesOrder.map(t62);
|
|
2874
|
+
$[9] = namespace;
|
|
2875
|
+
$[10] = propertiesOrder;
|
|
2876
|
+
$[11] = t5;
|
|
2782
2877
|
} else {
|
|
2783
|
-
t5 = $[
|
|
2878
|
+
t5 = $[11];
|
|
2784
2879
|
}
|
|
2880
|
+
const items = t5;
|
|
2785
2881
|
let t6;
|
|
2786
|
-
if ($[
|
|
2787
|
-
t6 =
|
|
2788
|
-
$[
|
|
2789
|
-
$[24] = t5;
|
|
2790
|
-
$[25] = t6;
|
|
2882
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2883
|
+
t6 = [modifiers.restrictToVerticalAxis];
|
|
2884
|
+
$[14] = t6;
|
|
2791
2885
|
} else {
|
|
2792
|
-
t6 = $[
|
|
2886
|
+
t6 = $[14];
|
|
2793
2887
|
}
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2888
|
+
let t7;
|
|
2889
|
+
if ($[15] !== additionalFields || $[16] !== collectionEditable || $[17] !== errors || $[18] !== inferredPropertyKeys || $[19] !== namespace || $[20] !== onPropertyClick || $[21] !== onPropertyMove || $[22] !== onPropertyRemove || $[23] !== properties || $[24] !== propertiesOrder || $[25] !== selectedPropertyKey) {
|
|
2890
|
+
t7 = propertiesOrder && propertiesOrder.map((propertyKey, index) => {
|
|
2891
|
+
const property = properties[propertyKey];
|
|
2892
|
+
const additionalField = additionalFields?.find((field) => field.key === propertyKey);
|
|
2893
|
+
if (!property && !additionalField) {
|
|
2894
|
+
console.warn(`Property ${propertyKey} not found in properties or additionalFields`);
|
|
2895
|
+
return null;
|
|
2896
|
+
}
|
|
2897
|
+
const id = getFullId(propertyKey, namespace);
|
|
2898
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PropertyTreeEntry, { id, propertyKey, propertyOrBuilder: property, additionalField, errors, namespace, inferredPropertyKeys, onPropertyMove, onPropertyRemove, onPropertyClick, selectedPropertyKey, collectionEditable }, id);
|
|
2899
|
+
}).filter(Boolean);
|
|
2900
|
+
$[15] = additionalFields;
|
|
2901
|
+
$[16] = collectionEditable;
|
|
2902
|
+
$[17] = errors;
|
|
2903
|
+
$[18] = inferredPropertyKeys;
|
|
2904
|
+
$[19] = namespace;
|
|
2905
|
+
$[20] = onPropertyClick;
|
|
2906
|
+
$[21] = onPropertyMove;
|
|
2907
|
+
$[22] = onPropertyRemove;
|
|
2908
|
+
$[23] = properties;
|
|
2909
|
+
$[24] = propertiesOrder;
|
|
2910
|
+
$[25] = selectedPropertyKey;
|
|
2911
|
+
$[26] = t7;
|
|
2912
|
+
} else {
|
|
2913
|
+
t7 = $[26];
|
|
2914
|
+
}
|
|
2915
|
+
let t8;
|
|
2916
|
+
if ($[27] !== className || $[28] !== t7) {
|
|
2917
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: t7 });
|
|
2918
|
+
$[27] = className;
|
|
2919
|
+
$[28] = t7;
|
|
2920
|
+
$[29] = t8;
|
|
2921
|
+
} else {
|
|
2922
|
+
t8 = $[29];
|
|
2923
|
+
}
|
|
2924
|
+
let t9;
|
|
2925
|
+
if ($[30] !== items || $[31] !== t8) {
|
|
2926
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items, strategy: sortable.verticalListSortingStrategy, children: t8 });
|
|
2927
|
+
$[30] = items;
|
|
2928
|
+
$[31] = t8;
|
|
2929
|
+
$[32] = t9;
|
|
2930
|
+
} else {
|
|
2931
|
+
t9 = $[32];
|
|
2932
|
+
}
|
|
2933
|
+
let t10;
|
|
2934
|
+
if ($[33] !== handleDragEnd || $[34] !== sensors || $[35] !== t9) {
|
|
2935
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, modifiers: t6, children: t9 });
|
|
2936
|
+
$[33] = handleDragEnd;
|
|
2937
|
+
$[34] = sensors;
|
|
2938
|
+
$[35] = t9;
|
|
2939
|
+
$[36] = t10;
|
|
2940
|
+
} else {
|
|
2941
|
+
t10 = $[36];
|
|
2942
|
+
}
|
|
2943
|
+
return t10;
|
|
2944
|
+
}, equal);
|
|
2803
2945
|
function PropertyTreeEntry(t0) {
|
|
2804
|
-
const $ = reactCompilerRuntime.c(
|
|
2946
|
+
const $ = reactCompilerRuntime.c(62);
|
|
2805
2947
|
const {
|
|
2948
|
+
id,
|
|
2806
2949
|
propertyKey,
|
|
2807
2950
|
namespace,
|
|
2808
2951
|
propertyOrBuilder,
|
|
2809
2952
|
additionalField,
|
|
2810
|
-
provided,
|
|
2811
2953
|
selectedPropertyKey,
|
|
2812
2954
|
errors,
|
|
2813
2955
|
onPropertyClick,
|
|
@@ -2817,157 +2959,201 @@
|
|
|
2817
2959
|
collectionEditable
|
|
2818
2960
|
} = t0;
|
|
2819
2961
|
let t1;
|
|
2820
|
-
if ($[0] !==
|
|
2821
|
-
t1 =
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
$[
|
|
2825
|
-
$[
|
|
2962
|
+
if ($[0] !== id) {
|
|
2963
|
+
t1 = {
|
|
2964
|
+
id
|
|
2965
|
+
};
|
|
2966
|
+
$[0] = id;
|
|
2967
|
+
$[1] = t1;
|
|
2826
2968
|
} else {
|
|
2827
|
-
t1 = $[
|
|
2969
|
+
t1 = $[1];
|
|
2828
2970
|
}
|
|
2829
|
-
const
|
|
2971
|
+
const {
|
|
2972
|
+
attributes,
|
|
2973
|
+
listeners,
|
|
2974
|
+
setNodeRef,
|
|
2975
|
+
transform,
|
|
2976
|
+
transition,
|
|
2977
|
+
isDragging
|
|
2978
|
+
} = sortable.useSortable(t1);
|
|
2830
2979
|
let t2;
|
|
2831
|
-
if ($[
|
|
2832
|
-
t2 =
|
|
2833
|
-
$[
|
|
2834
|
-
$[
|
|
2835
|
-
$[6] = t2;
|
|
2980
|
+
if ($[2] !== transform) {
|
|
2981
|
+
t2 = utilities.CSS.Translate.toString(transform);
|
|
2982
|
+
$[2] = transform;
|
|
2983
|
+
$[3] = t2;
|
|
2836
2984
|
} else {
|
|
2837
|
-
t2 = $[
|
|
2985
|
+
t2 = $[3];
|
|
2838
2986
|
}
|
|
2839
|
-
const
|
|
2987
|
+
const t3 = isDragging ? 10 : void 0;
|
|
2988
|
+
let t4;
|
|
2989
|
+
if ($[4] !== t2 || $[5] !== t3 || $[6] !== transition) {
|
|
2990
|
+
t4 = {
|
|
2991
|
+
transform: t2,
|
|
2992
|
+
transition,
|
|
2993
|
+
zIndex: t3,
|
|
2994
|
+
position: "relative"
|
|
2995
|
+
};
|
|
2996
|
+
$[4] = t2;
|
|
2997
|
+
$[5] = t3;
|
|
2998
|
+
$[6] = transition;
|
|
2999
|
+
$[7] = t4;
|
|
3000
|
+
} else {
|
|
3001
|
+
t4 = $[7];
|
|
3002
|
+
}
|
|
3003
|
+
const style = t4;
|
|
3004
|
+
let t5;
|
|
3005
|
+
if ($[8] !== inferredPropertyKeys || $[9] !== namespace || $[10] !== propertyKey) {
|
|
3006
|
+
t5 = inferredPropertyKeys?.includes(namespace ? `${namespace}.${propertyKey}` : propertyKey);
|
|
3007
|
+
$[8] = inferredPropertyKeys;
|
|
3008
|
+
$[9] = namespace;
|
|
3009
|
+
$[10] = propertyKey;
|
|
3010
|
+
$[11] = t5;
|
|
3011
|
+
} else {
|
|
3012
|
+
t5 = $[11];
|
|
3013
|
+
}
|
|
3014
|
+
const isPropertyInferred = t5;
|
|
3015
|
+
const fullId = id;
|
|
2840
3016
|
const fullIdPath = getFullIdPath(propertyKey, namespace);
|
|
2841
3017
|
const hasError = fullIdPath in errors;
|
|
2842
3018
|
let subtree;
|
|
2843
3019
|
if (typeof propertyOrBuilder === "object") {
|
|
2844
3020
|
const property = propertyOrBuilder;
|
|
2845
3021
|
if (property.dataType === "map" && property.properties) {
|
|
2846
|
-
let
|
|
2847
|
-
if ($[
|
|
2848
|
-
|
|
2849
|
-
$[
|
|
2850
|
-
$[
|
|
2851
|
-
$[
|
|
2852
|
-
$[
|
|
2853
|
-
$[
|
|
2854
|
-
$[
|
|
2855
|
-
$[
|
|
2856
|
-
$[
|
|
2857
|
-
$[
|
|
2858
|
-
$[
|
|
3022
|
+
let t62;
|
|
3023
|
+
if ($[12] !== collectionEditable || $[13] !== errors || $[14] !== fullId || $[15] !== onPropertyClick || $[16] !== onPropertyMove || $[17] !== onPropertyRemove || $[18] !== property.properties || $[19] !== property.propertiesOrder || $[20] !== selectedPropertyKey) {
|
|
3024
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsx(PropertyTree, { selectedPropertyKey, namespace: fullId, properties: property.properties, propertiesOrder: property.propertiesOrder, errors, onPropertyClick, onPropertyMove, onPropertyRemove, collectionEditable });
|
|
3025
|
+
$[12] = collectionEditable;
|
|
3026
|
+
$[13] = errors;
|
|
3027
|
+
$[14] = fullId;
|
|
3028
|
+
$[15] = onPropertyClick;
|
|
3029
|
+
$[16] = onPropertyMove;
|
|
3030
|
+
$[17] = onPropertyRemove;
|
|
3031
|
+
$[18] = property.properties;
|
|
3032
|
+
$[19] = property.propertiesOrder;
|
|
3033
|
+
$[20] = selectedPropertyKey;
|
|
3034
|
+
$[21] = t62;
|
|
2859
3035
|
} else {
|
|
2860
|
-
|
|
3036
|
+
t62 = $[21];
|
|
2861
3037
|
}
|
|
2862
|
-
subtree =
|
|
3038
|
+
subtree = t62;
|
|
2863
3039
|
}
|
|
2864
3040
|
}
|
|
2865
3041
|
const selected = selectedPropertyKey === fullId;
|
|
2866
|
-
let
|
|
2867
|
-
if ($[
|
|
2868
|
-
|
|
2869
|
-
$[
|
|
2870
|
-
$[
|
|
2871
|
-
$[
|
|
3042
|
+
let t6;
|
|
3043
|
+
if ($[22] !== collectionEditable || $[23] !== propertyOrBuilder) {
|
|
3044
|
+
t6 = propertyOrBuilder && (collectionEditable && !core.isPropertyBuilder(propertyOrBuilder) || editableProperty(propertyOrBuilder));
|
|
3045
|
+
$[22] = collectionEditable;
|
|
3046
|
+
$[23] = propertyOrBuilder;
|
|
3047
|
+
$[24] = t6;
|
|
2872
3048
|
} else {
|
|
2873
|
-
|
|
3049
|
+
t6 = $[24];
|
|
2874
3050
|
}
|
|
2875
|
-
const editable =
|
|
2876
|
-
let
|
|
2877
|
-
if ($[
|
|
2878
|
-
|
|
3051
|
+
const editable = t6;
|
|
3052
|
+
let t7;
|
|
3053
|
+
if ($[25] !== subtree) {
|
|
3054
|
+
t7 = subtree && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute border-l " + ui.defaultBorderMixin, style: {
|
|
2879
3055
|
left: "32px",
|
|
2880
3056
|
top: "64px",
|
|
2881
3057
|
bottom: "16px"
|
|
2882
3058
|
} });
|
|
2883
|
-
$[
|
|
2884
|
-
$[
|
|
3059
|
+
$[25] = subtree;
|
|
3060
|
+
$[26] = t7;
|
|
2885
3061
|
} else {
|
|
2886
|
-
|
|
3062
|
+
t7 = $[26];
|
|
2887
3063
|
}
|
|
2888
|
-
let
|
|
2889
|
-
if ($[
|
|
2890
|
-
|
|
2891
|
-
$[
|
|
2892
|
-
$[
|
|
2893
|
-
$[
|
|
2894
|
-
$[
|
|
2895
|
-
$[
|
|
2896
|
-
$[
|
|
2897
|
-
$[
|
|
2898
|
-
$[
|
|
2899
|
-
$[
|
|
2900
|
-
} else {
|
|
2901
|
-
|
|
3064
|
+
let t8;
|
|
3065
|
+
if ($[27] !== additionalField || $[28] !== editable || $[29] !== hasError || $[30] !== namespace || $[31] !== onPropertyClick || $[32] !== propertyKey || $[33] !== propertyOrBuilder || $[34] !== selected) {
|
|
3066
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: !core.isPropertyBuilder(propertyOrBuilder) && !additionalField && editable ? /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldPreview, { property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, includeName: true, selected, hasError }) : /* @__PURE__ */ jsxRuntime.jsx(NonEditablePropertyPreview, { name: propertyKey, property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, selected }) });
|
|
3067
|
+
$[27] = additionalField;
|
|
3068
|
+
$[28] = editable;
|
|
3069
|
+
$[29] = hasError;
|
|
3070
|
+
$[30] = namespace;
|
|
3071
|
+
$[31] = onPropertyClick;
|
|
3072
|
+
$[32] = propertyKey;
|
|
3073
|
+
$[33] = propertyOrBuilder;
|
|
3074
|
+
$[34] = selected;
|
|
3075
|
+
$[35] = t8;
|
|
3076
|
+
} else {
|
|
3077
|
+
t8 = $[35];
|
|
2902
3078
|
}
|
|
2903
|
-
let
|
|
2904
|
-
if ($[
|
|
2905
|
-
|
|
2906
|
-
$[
|
|
2907
|
-
$[
|
|
3079
|
+
let t9;
|
|
3080
|
+
if ($[36] !== isPropertyInferred) {
|
|
3081
|
+
t9 = isPropertyInferred && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsxRuntime.jsx(ui.AutorenewIcon, { size: "small", className: "p-2" }) });
|
|
3082
|
+
$[36] = isPropertyInferred;
|
|
3083
|
+
$[37] = t9;
|
|
2908
3084
|
} else {
|
|
2909
|
-
|
|
3085
|
+
t9 = $[37];
|
|
2910
3086
|
}
|
|
2911
|
-
let
|
|
2912
|
-
if ($[
|
|
2913
|
-
|
|
2914
|
-
$[
|
|
2915
|
-
$[
|
|
2916
|
-
$[
|
|
2917
|
-
$[
|
|
3087
|
+
let t10;
|
|
3088
|
+
if ($[38] !== isPropertyInferred || $[39] !== namespace || $[40] !== onPropertyRemove || $[41] !== propertyKey) {
|
|
3089
|
+
t10 = onPropertyRemove && !isPropertyInferred && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", color: "inherit", onClick: () => onPropertyRemove(propertyKey, namespace), children: /* @__PURE__ */ jsxRuntime.jsx(ui.RemoveIcon, { size: "small" }) }) });
|
|
3090
|
+
$[38] = isPropertyInferred;
|
|
3091
|
+
$[39] = namespace;
|
|
3092
|
+
$[40] = onPropertyRemove;
|
|
3093
|
+
$[41] = propertyKey;
|
|
3094
|
+
$[42] = t10;
|
|
2918
3095
|
} else {
|
|
2919
|
-
|
|
3096
|
+
t10 = $[42];
|
|
2920
3097
|
}
|
|
2921
|
-
let
|
|
2922
|
-
if ($[
|
|
2923
|
-
|
|
2924
|
-
$[
|
|
2925
|
-
$[
|
|
3098
|
+
let t11;
|
|
3099
|
+
if ($[43] !== attributes || $[44] !== listeners || $[45] !== onPropertyMove) {
|
|
3100
|
+
t11 = onPropertyMove && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Move", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { component: "span", size: "small", ...attributes, ...listeners, children: /* @__PURE__ */ jsxRuntime.jsx(ui.DragHandleIcon, { size: "small" }) }) });
|
|
3101
|
+
$[43] = attributes;
|
|
3102
|
+
$[44] = listeners;
|
|
3103
|
+
$[45] = onPropertyMove;
|
|
3104
|
+
$[46] = t11;
|
|
2926
3105
|
} else {
|
|
2927
|
-
|
|
3106
|
+
t11 = $[46];
|
|
2928
3107
|
}
|
|
2929
|
-
let
|
|
2930
|
-
if ($[
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
3108
|
+
let t12;
|
|
3109
|
+
if ($[47] !== t10 || $[48] !== t11 || $[49] !== t9) {
|
|
3110
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-2 right-2 flex flex-row", children: [
|
|
3111
|
+
t9,
|
|
3112
|
+
t10,
|
|
3113
|
+
t11
|
|
2935
3114
|
] });
|
|
2936
|
-
$[
|
|
2937
|
-
$[
|
|
2938
|
-
$[
|
|
2939
|
-
$[
|
|
3115
|
+
$[47] = t10;
|
|
3116
|
+
$[48] = t11;
|
|
3117
|
+
$[49] = t9;
|
|
3118
|
+
$[50] = t12;
|
|
2940
3119
|
} else {
|
|
2941
|
-
|
|
3120
|
+
t12 = $[50];
|
|
2942
3121
|
}
|
|
2943
|
-
let
|
|
2944
|
-
if ($[
|
|
2945
|
-
|
|
2946
|
-
$[
|
|
2947
|
-
$[
|
|
3122
|
+
let t13;
|
|
3123
|
+
if ($[51] !== subtree) {
|
|
3124
|
+
t13 = subtree && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-16", children: subtree });
|
|
3125
|
+
$[51] = subtree;
|
|
3126
|
+
$[52] = t13;
|
|
2948
3127
|
} else {
|
|
2949
|
-
|
|
3128
|
+
t13 = $[52];
|
|
2950
3129
|
}
|
|
2951
|
-
let
|
|
2952
|
-
if ($[
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
3130
|
+
let t14;
|
|
3131
|
+
if ($[53] !== t12 || $[54] !== t13 || $[55] !== t7 || $[56] !== t8) {
|
|
3132
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3133
|
+
t7,
|
|
3134
|
+
t8,
|
|
3135
|
+
t12,
|
|
3136
|
+
t13
|
|
2958
3137
|
] });
|
|
2959
|
-
$[
|
|
2960
|
-
$[
|
|
2961
|
-
$[
|
|
2962
|
-
$[
|
|
2963
|
-
$[
|
|
2964
|
-
$[50] = t5;
|
|
2965
|
-
$[51] = t9;
|
|
2966
|
-
$[52] = t11;
|
|
3138
|
+
$[53] = t12;
|
|
3139
|
+
$[54] = t13;
|
|
3140
|
+
$[55] = t7;
|
|
3141
|
+
$[56] = t8;
|
|
3142
|
+
$[57] = t14;
|
|
2967
3143
|
} else {
|
|
2968
|
-
|
|
3144
|
+
t14 = $[57];
|
|
2969
3145
|
}
|
|
2970
|
-
|
|
3146
|
+
let t15;
|
|
3147
|
+
if ($[58] !== setNodeRef || $[59] !== style || $[60] !== t14) {
|
|
3148
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: setNodeRef, style, className: "relative -ml-8", children: t14 });
|
|
3149
|
+
$[58] = setNodeRef;
|
|
3150
|
+
$[59] = style;
|
|
3151
|
+
$[60] = t14;
|
|
3152
|
+
$[61] = t15;
|
|
3153
|
+
} else {
|
|
3154
|
+
t15 = $[61];
|
|
3155
|
+
}
|
|
3156
|
+
return t15;
|
|
2971
3157
|
}
|
|
2972
3158
|
function MapPropertyField(t0) {
|
|
2973
3159
|
const $ = reactCompilerRuntime.c(67);
|
|
@@ -3181,7 +3367,7 @@
|
|
|
3181
3367
|
const t19 = values.spreadChildren ?? false;
|
|
3182
3368
|
let t20;
|
|
3183
3369
|
if ($[40] !== t18 || $[41] !== t19) {
|
|
3184
|
-
t20 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "
|
|
3370
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "medium", label: "Spread children as columns", onValueChange: t18, value: t19 });
|
|
3185
3371
|
$[40] = t18;
|
|
3186
3372
|
$[41] = t19;
|
|
3187
3373
|
$[42] = t20;
|
|
@@ -4653,7 +4839,7 @@
|
|
|
4653
4839
|
field,
|
|
4654
4840
|
form
|
|
4655
4841
|
} = t22;
|
|
4656
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SwitchControl, { label: "Hide from collection", disabled, form, tooltip: "Hide this field from the collection view. It will still be visible in the form view", field });
|
|
4842
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SwitchControl, { label: "Hide from collection", size: "medium", disabled, form, tooltip: "Hide this field from the collection view. It will still be visible in the form view", field });
|
|
4657
4843
|
} }) });
|
|
4658
4844
|
$[0] = disabled;
|
|
4659
4845
|
$[1] = t1;
|
|
@@ -4667,7 +4853,7 @@
|
|
|
4667
4853
|
field: field_0,
|
|
4668
4854
|
form: form_0
|
|
4669
4855
|
} = t32;
|
|
4670
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SwitchControl, { label: "Read only", disabled, tooltip: "Is this a read only field. Display only as a preview", form: form_0, field: field_0 });
|
|
4856
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SwitchControl, { label: "Read only", size: "medium", disabled, tooltip: "Is this a read only field. Display only as a preview", form: form_0, field: field_0 });
|
|
4671
4857
|
} }) });
|
|
4672
4858
|
$[2] = disabled;
|
|
4673
4859
|
$[3] = t2;
|
|
@@ -5800,7 +5986,7 @@
|
|
|
5800
5986
|
let t6;
|
|
5801
5987
|
if ($[14] !== errors || $[15] !== onError || $[16] !== propertyNamespace || $[17] !== values?.id) {
|
|
5802
5988
|
t6 = () => {
|
|
5803
|
-
if (values?.id && onError
|
|
5989
|
+
if (values?.id && onError) {
|
|
5804
5990
|
onError(values?.id, propertyNamespace, errors);
|
|
5805
5991
|
}
|
|
5806
5992
|
};
|
|
@@ -6977,8 +7163,8 @@
|
|
|
6977
7163
|
setSelectedPropertyKey(propertyKey_2);
|
|
6978
7164
|
setSelectedPropertyNamespace(namespace_5);
|
|
6979
7165
|
};
|
|
6980
|
-
const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-2 h-full bg-
|
|
6981
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("p-4 md:p-8 pb-20 md:pb-20", "col-span-12 lg:col-span-5 h-full overflow-auto", !asDialog && "border-r " + ui.defaultBorderMixin), children: [
|
|
7166
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-2 h-full bg-white dark:bg-surface-950", children: [
|
|
7167
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("bg-surface-50 dark:bg-surface-900", "p-4 md:p-8 pb-20 md:pb-20", "col-span-12 lg:col-span-5 h-full overflow-auto", !asDialog && "border-r " + ui.defaultBorderMixin), children: [
|
|
6982
7168
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex my-2", children: [
|
|
6983
7169
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-grow mb-4", children: [
|
|
6984
7170
|
/* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "name", as: ui.DebouncedTextField, invisible: true, className: "-ml-1", inputClassName: "text-2xl font-headers", placeholder: "Collection name", size: "small", required: true, error: Boolean(errors?.name) }),
|
|
@@ -6997,7 +7183,7 @@
|
|
|
6997
7183
|
/* @__PURE__ */ jsxRuntime.jsx(core.ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyTree, { className: "pl-8", inferredPropertyKeys, selectedPropertyKey: selectedPropertyKey ? getFullId(selectedPropertyKey, selectedPropertyNamespace) : void 0, properties: values.properties, additionalFields: values.additionalFields, propertiesOrder: usedPropertiesOrder, onPropertyClick, onPropertyMove, onPropertyRemove: isNewCollection ? deleteProperty : void 0, collectionEditable, errors }) }),
|
|
6998
7184
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { className: "mt-8 w-full", color: "primary", variant: "outlined", size: "large", onClick: () => setNewPropertyDialogOpen(true), startIcon: /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, {}), children: "Add new property" })
|
|
6999
7185
|
] }),
|
|
7000
|
-
!asDialog && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto pb-20 md:pb-20", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7186
|
+
!asDialog && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto pb-20 md:pb-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-8 min-h-full w-full flex flex-col justify-center", children: [
|
|
7001
7187
|
selectedPropertyFullId && selectedProperty && !core.isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsxRuntime.jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs, collectionEditable }, `edit_view_${selectedPropertyIndex}`),
|
|
7002
7188
|
!selectedProperty && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center justify-center h-full gap-4", children: [
|
|
7003
7189
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", className: "", children: emptyCollection ? "Now you can add your first property" : "Select a property to edit it" }),
|
|
@@ -8072,7 +8258,7 @@
|
|
|
8072
8258
|
}
|
|
8073
8259
|
};
|
|
8074
8260
|
function CollectionEditorWelcomeView(t0) {
|
|
8075
|
-
const $ = reactCompilerRuntime.c(
|
|
8261
|
+
const $ = reactCompilerRuntime.c(52);
|
|
8076
8262
|
const {
|
|
8077
8263
|
path,
|
|
8078
8264
|
pathSuggestions,
|
|
@@ -8109,6 +8295,10 @@
|
|
|
8109
8295
|
setFieldValue,
|
|
8110
8296
|
setValues
|
|
8111
8297
|
} = formex.useFormex();
|
|
8298
|
+
const noSuggestions = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0;
|
|
8299
|
+
if (!noSuggestions) {
|
|
8300
|
+
return null;
|
|
8301
|
+
}
|
|
8112
8302
|
let t3;
|
|
8113
8303
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8114
8304
|
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
|
|
@@ -8160,173 +8350,162 @@
|
|
|
8160
8350
|
t7 = $[15];
|
|
8161
8351
|
}
|
|
8162
8352
|
let t8;
|
|
8163
|
-
if ($[16] !==
|
|
8164
|
-
t8 =
|
|
8165
|
-
$[16] = filteredPathSuggestions;
|
|
8166
|
-
$[17] = loadingPathSuggestions;
|
|
8167
|
-
$[18] = t8;
|
|
8168
|
-
} else {
|
|
8169
|
-
t8 = $[18];
|
|
8170
|
-
}
|
|
8171
|
-
let t9;
|
|
8172
|
-
if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
|
|
8173
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8353
|
+
if ($[16] !== t6 || $[17] !== t7) {
|
|
8354
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8174
8355
|
t5,
|
|
8175
8356
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
|
|
8176
8357
|
t6,
|
|
8177
|
-
t7
|
|
8178
|
-
t8
|
|
8358
|
+
t7
|
|
8179
8359
|
] })
|
|
8180
8360
|
] });
|
|
8181
|
-
$[
|
|
8182
|
-
$[
|
|
8183
|
-
$[
|
|
8184
|
-
$[22] = t9;
|
|
8361
|
+
$[16] = t6;
|
|
8362
|
+
$[17] = t7;
|
|
8363
|
+
$[18] = t8;
|
|
8185
8364
|
} else {
|
|
8186
|
-
|
|
8365
|
+
t8 = $[18];
|
|
8366
|
+
}
|
|
8367
|
+
let t9;
|
|
8368
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8369
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
|
|
8370
|
+
$[19] = t9;
|
|
8371
|
+
} else {
|
|
8372
|
+
t9 = $[19];
|
|
8187
8373
|
}
|
|
8188
8374
|
let t10;
|
|
8189
|
-
if ($[
|
|
8190
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
8191
|
-
$[
|
|
8375
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8376
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
|
|
8377
|
+
$[20] = t10;
|
|
8192
8378
|
} else {
|
|
8193
|
-
t10 = $[
|
|
8379
|
+
t10 = $[20];
|
|
8194
8380
|
}
|
|
8195
8381
|
let t11;
|
|
8196
|
-
if ($[
|
|
8197
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
8198
|
-
|
|
8382
|
+
if ($[21] !== onContinue || $[22] !== setValues) {
|
|
8383
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
|
|
8384
|
+
setValues(productsCollectionTemplate);
|
|
8385
|
+
onContinue();
|
|
8386
|
+
} });
|
|
8387
|
+
$[21] = onContinue;
|
|
8388
|
+
$[22] = setValues;
|
|
8389
|
+
$[23] = t11;
|
|
8199
8390
|
} else {
|
|
8200
|
-
t11 = $[
|
|
8391
|
+
t11 = $[23];
|
|
8201
8392
|
}
|
|
8202
8393
|
let t12;
|
|
8394
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8395
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
|
|
8396
|
+
$[24] = t12;
|
|
8397
|
+
} else {
|
|
8398
|
+
t12 = $[24];
|
|
8399
|
+
}
|
|
8400
|
+
let t13;
|
|
8203
8401
|
if ($[25] !== onContinue || $[26] !== setValues) {
|
|
8204
|
-
|
|
8205
|
-
setValues(
|
|
8402
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
|
|
8403
|
+
setValues(usersCollectionTemplate);
|
|
8206
8404
|
onContinue();
|
|
8207
8405
|
} });
|
|
8208
8406
|
$[25] = onContinue;
|
|
8209
8407
|
$[26] = setValues;
|
|
8210
|
-
$[27] =
|
|
8408
|
+
$[27] = t13;
|
|
8211
8409
|
} else {
|
|
8212
|
-
|
|
8410
|
+
t13 = $[27];
|
|
8213
8411
|
}
|
|
8214
|
-
let
|
|
8412
|
+
let t14;
|
|
8215
8413
|
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8216
|
-
|
|
8217
|
-
$[28] =
|
|
8414
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
|
|
8415
|
+
$[28] = t14;
|
|
8218
8416
|
} else {
|
|
8219
|
-
|
|
8417
|
+
t14 = $[28];
|
|
8220
8418
|
}
|
|
8221
|
-
let
|
|
8419
|
+
let t15;
|
|
8222
8420
|
if ($[29] !== onContinue || $[30] !== setValues) {
|
|
8223
|
-
|
|
8224
|
-
setValues(
|
|
8421
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
|
|
8422
|
+
setValues(blogCollectionTemplate);
|
|
8225
8423
|
onContinue();
|
|
8226
8424
|
} });
|
|
8227
8425
|
$[29] = onContinue;
|
|
8228
8426
|
$[30] = setValues;
|
|
8229
|
-
$[31] =
|
|
8427
|
+
$[31] = t15;
|
|
8230
8428
|
} else {
|
|
8231
|
-
|
|
8429
|
+
t15 = $[31];
|
|
8232
8430
|
}
|
|
8233
|
-
let
|
|
8431
|
+
let t16;
|
|
8234
8432
|
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8235
|
-
|
|
8236
|
-
$[32] =
|
|
8433
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8434
|
+
$[32] = t16;
|
|
8237
8435
|
} else {
|
|
8238
|
-
|
|
8436
|
+
t16 = $[32];
|
|
8239
8437
|
}
|
|
8240
|
-
let
|
|
8438
|
+
let t17;
|
|
8241
8439
|
if ($[33] !== onContinue || $[34] !== setValues) {
|
|
8242
|
-
|
|
8243
|
-
setValues(
|
|
8440
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
|
|
8441
|
+
setValues(pagesCollectionTemplate);
|
|
8244
8442
|
onContinue();
|
|
8245
8443
|
} });
|
|
8246
8444
|
$[33] = onContinue;
|
|
8247
8445
|
$[34] = setValues;
|
|
8248
|
-
$[35] =
|
|
8249
|
-
} else {
|
|
8250
|
-
t16 = $[35];
|
|
8251
|
-
}
|
|
8252
|
-
let t17;
|
|
8253
|
-
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8254
|
-
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8255
|
-
$[36] = t17;
|
|
8446
|
+
$[35] = t17;
|
|
8256
8447
|
} else {
|
|
8257
|
-
t17 = $[
|
|
8448
|
+
t17 = $[35];
|
|
8258
8449
|
}
|
|
8259
8450
|
let t18;
|
|
8260
|
-
if ($[37] !==
|
|
8261
|
-
t18 = /* @__PURE__ */ jsxRuntime.
|
|
8262
|
-
|
|
8263
|
-
onContinue();
|
|
8264
|
-
} });
|
|
8265
|
-
$[37] = onContinue;
|
|
8266
|
-
$[38] = setValues;
|
|
8267
|
-
$[39] = t18;
|
|
8268
|
-
} else {
|
|
8269
|
-
t18 = $[39];
|
|
8270
|
-
}
|
|
8271
|
-
let t19;
|
|
8272
|
-
if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
|
|
8273
|
-
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8274
|
-
t10,
|
|
8451
|
+
if ($[36] !== t11 || $[37] !== t13 || $[38] !== t15 || $[39] !== t17) {
|
|
8452
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8453
|
+
t9,
|
|
8275
8454
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8455
|
+
t11,
|
|
8456
|
+
t13,
|
|
8457
|
+
t15,
|
|
8458
|
+
t17
|
|
8280
8459
|
] })
|
|
8281
8460
|
] });
|
|
8282
|
-
$[
|
|
8283
|
-
$[
|
|
8284
|
-
$[
|
|
8285
|
-
$[
|
|
8286
|
-
$[
|
|
8461
|
+
$[36] = t11;
|
|
8462
|
+
$[37] = t13;
|
|
8463
|
+
$[38] = t15;
|
|
8464
|
+
$[39] = t17;
|
|
8465
|
+
$[40] = t18;
|
|
8287
8466
|
} else {
|
|
8288
|
-
|
|
8467
|
+
t18 = $[40];
|
|
8289
8468
|
}
|
|
8290
|
-
let
|
|
8291
|
-
if ($[
|
|
8292
|
-
|
|
8469
|
+
let t19;
|
|
8470
|
+
if ($[41] !== onContinue || $[42] !== parentCollection) {
|
|
8471
|
+
t19 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8293
8472
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
|
|
8294
8473
|
/* @__PURE__ */ jsxRuntime.jsx(data_import_export.ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
|
|
8295
8474
|
] });
|
|
8296
|
-
$[
|
|
8297
|
-
$[
|
|
8298
|
-
$[
|
|
8475
|
+
$[41] = onContinue;
|
|
8476
|
+
$[42] = parentCollection;
|
|
8477
|
+
$[43] = t19;
|
|
8299
8478
|
} else {
|
|
8300
|
-
|
|
8479
|
+
t19 = $[43];
|
|
8301
8480
|
}
|
|
8302
|
-
let
|
|
8303
|
-
if ($[
|
|
8304
|
-
|
|
8305
|
-
$[
|
|
8306
|
-
$[
|
|
8481
|
+
let t20;
|
|
8482
|
+
if ($[44] !== onContinue) {
|
|
8483
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
|
|
8484
|
+
$[44] = onContinue;
|
|
8485
|
+
$[45] = t20;
|
|
8307
8486
|
} else {
|
|
8308
|
-
|
|
8487
|
+
t20 = $[45];
|
|
8309
8488
|
}
|
|
8310
|
-
let
|
|
8311
|
-
if ($[
|
|
8312
|
-
|
|
8489
|
+
let t21;
|
|
8490
|
+
if ($[46] !== t18 || $[47] !== t19 || $[48] !== t20 || $[49] !== t4 || $[50] !== t8) {
|
|
8491
|
+
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
8313
8492
|
t3,
|
|
8314
8493
|
t4,
|
|
8315
|
-
|
|
8494
|
+
t8,
|
|
8495
|
+
t18,
|
|
8316
8496
|
t19,
|
|
8317
|
-
t20
|
|
8318
|
-
t21
|
|
8497
|
+
t20
|
|
8319
8498
|
] }) });
|
|
8320
|
-
$[
|
|
8321
|
-
$[
|
|
8322
|
-
$[
|
|
8323
|
-
$[
|
|
8324
|
-
$[
|
|
8325
|
-
$[
|
|
8499
|
+
$[46] = t18;
|
|
8500
|
+
$[47] = t19;
|
|
8501
|
+
$[48] = t20;
|
|
8502
|
+
$[49] = t4;
|
|
8503
|
+
$[50] = t8;
|
|
8504
|
+
$[51] = t21;
|
|
8326
8505
|
} else {
|
|
8327
|
-
|
|
8506
|
+
t21 = $[51];
|
|
8328
8507
|
}
|
|
8329
|
-
return
|
|
8508
|
+
return t21;
|
|
8330
8509
|
}
|
|
8331
8510
|
function TemplateButton(t0) {
|
|
8332
8511
|
const $ = reactCompilerRuntime.c(10);
|
|
@@ -9540,7 +9719,7 @@
|
|
|
9540
9719
|
const ConfigControllerContext = React.createContext({});
|
|
9541
9720
|
const CollectionEditorContext = React.createContext({});
|
|
9542
9721
|
const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
|
|
9543
|
-
const $ = reactCompilerRuntime.c(
|
|
9722
|
+
const $ = reactCompilerRuntime.c(65);
|
|
9544
9723
|
const {
|
|
9545
9724
|
children,
|
|
9546
9725
|
collectionConfigController,
|
|
@@ -9548,7 +9727,6 @@
|
|
|
9548
9727
|
reservedGroups,
|
|
9549
9728
|
collectionInference,
|
|
9550
9729
|
extraView,
|
|
9551
|
-
getPathSuggestions,
|
|
9552
9730
|
getUser,
|
|
9553
9731
|
getData,
|
|
9554
9732
|
onAnalyticsEvent
|
|
@@ -9669,26 +9847,24 @@
|
|
|
9669
9847
|
const createCollection = t3;
|
|
9670
9848
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
9671
9849
|
let t5;
|
|
9672
|
-
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !==
|
|
9850
|
+
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== t4) {
|
|
9673
9851
|
t5 = {
|
|
9674
9852
|
editCollection,
|
|
9675
9853
|
createCollection,
|
|
9676
9854
|
editProperty,
|
|
9677
|
-
configPermissions: t4
|
|
9678
|
-
getPathSuggestions
|
|
9855
|
+
configPermissions: t4
|
|
9679
9856
|
};
|
|
9680
9857
|
$[6] = createCollection;
|
|
9681
9858
|
$[7] = editCollection;
|
|
9682
9859
|
$[8] = editProperty;
|
|
9683
|
-
$[9] =
|
|
9684
|
-
$[10] =
|
|
9685
|
-
$[11] = t5;
|
|
9860
|
+
$[9] = t4;
|
|
9861
|
+
$[10] = t5;
|
|
9686
9862
|
} else {
|
|
9687
|
-
t5 = $[
|
|
9863
|
+
t5 = $[10];
|
|
9688
9864
|
}
|
|
9689
9865
|
const t6 = Boolean(currentDialog);
|
|
9690
9866
|
let t7;
|
|
9691
|
-
if ($[
|
|
9867
|
+
if ($[11] !== currentDialog || $[12] !== navigate || $[13] !== navigation) {
|
|
9692
9868
|
t7 = (collection_0) => {
|
|
9693
9869
|
if (currentDialog?.redirect) {
|
|
9694
9870
|
if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
|
|
@@ -9698,29 +9874,28 @@
|
|
|
9698
9874
|
}
|
|
9699
9875
|
setCurrentDialog(void 0);
|
|
9700
9876
|
};
|
|
9701
|
-
$[
|
|
9702
|
-
$[
|
|
9703
|
-
$[
|
|
9704
|
-
$[
|
|
9877
|
+
$[11] = currentDialog;
|
|
9878
|
+
$[12] = navigate;
|
|
9879
|
+
$[13] = navigation;
|
|
9880
|
+
$[14] = t7;
|
|
9705
9881
|
} else {
|
|
9706
|
-
t7 = $[
|
|
9882
|
+
t7 = $[14];
|
|
9707
9883
|
}
|
|
9708
9884
|
let t8;
|
|
9709
|
-
if ($[
|
|
9710
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView,
|
|
9711
|
-
$[
|
|
9712
|
-
$[
|
|
9713
|
-
$[
|
|
9714
|
-
$[
|
|
9715
|
-
$[
|
|
9716
|
-
$[
|
|
9717
|
-
$[
|
|
9718
|
-
$[
|
|
9719
|
-
$[
|
|
9720
|
-
$[
|
|
9721
|
-
$[26] = t8;
|
|
9885
|
+
if ($[15] !== collectionConfigController || $[16] !== collectionInference || $[17] !== currentDialog || $[18] !== extraView || $[19] !== getData || $[20] !== getUser || $[21] !== reservedGroups || $[22] !== t6 || $[23] !== t7) {
|
|
9886
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, handleClose: t7 });
|
|
9887
|
+
$[15] = collectionConfigController;
|
|
9888
|
+
$[16] = collectionInference;
|
|
9889
|
+
$[17] = currentDialog;
|
|
9890
|
+
$[18] = extraView;
|
|
9891
|
+
$[19] = getData;
|
|
9892
|
+
$[20] = getUser;
|
|
9893
|
+
$[21] = reservedGroups;
|
|
9894
|
+
$[22] = t6;
|
|
9895
|
+
$[23] = t7;
|
|
9896
|
+
$[24] = t8;
|
|
9722
9897
|
} else {
|
|
9723
|
-
t8 = $[
|
|
9898
|
+
t8 = $[24];
|
|
9724
9899
|
}
|
|
9725
9900
|
const t9 = Boolean(currentPropertyDialog);
|
|
9726
9901
|
const t10 = Boolean(currentPropertyDialog?.propertyKey);
|
|
@@ -9728,21 +9903,21 @@
|
|
|
9728
9903
|
const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
|
|
9729
9904
|
const t13 = currentPropertyDialog?.collectionEditable ?? false;
|
|
9730
9905
|
let t14;
|
|
9731
|
-
if ($[
|
|
9906
|
+
if ($[25] !== currentPropertyDialog || $[26] !== getData || $[27] !== navigation) {
|
|
9732
9907
|
t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
|
|
9733
9908
|
console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
|
|
9734
9909
|
const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
|
|
9735
9910
|
return getData(resolvedPath, []);
|
|
9736
9911
|
} : void 0;
|
|
9737
|
-
$[
|
|
9738
|
-
$[
|
|
9739
|
-
$[
|
|
9740
|
-
$[
|
|
9912
|
+
$[25] = currentPropertyDialog;
|
|
9913
|
+
$[26] = getData;
|
|
9914
|
+
$[27] = navigation;
|
|
9915
|
+
$[28] = t14;
|
|
9741
9916
|
} else {
|
|
9742
|
-
t14 = $[
|
|
9917
|
+
t14 = $[28];
|
|
9743
9918
|
}
|
|
9744
9919
|
let t15;
|
|
9745
|
-
if ($[
|
|
9920
|
+
if ($[29] !== collectionConfigController || $[30] !== currentPropertyDialog || $[31] !== snackbarController) {
|
|
9746
9921
|
t15 = (t162) => {
|
|
9747
9922
|
const {
|
|
9748
9923
|
id: id_0,
|
|
@@ -9771,15 +9946,15 @@
|
|
|
9771
9946
|
return false;
|
|
9772
9947
|
});
|
|
9773
9948
|
};
|
|
9774
|
-
$[
|
|
9775
|
-
$[
|
|
9776
|
-
$[
|
|
9777
|
-
$[
|
|
9949
|
+
$[29] = collectionConfigController;
|
|
9950
|
+
$[30] = currentPropertyDialog;
|
|
9951
|
+
$[31] = snackbarController;
|
|
9952
|
+
$[32] = t15;
|
|
9778
9953
|
} else {
|
|
9779
|
-
t15 = $[
|
|
9954
|
+
t15 = $[32];
|
|
9780
9955
|
}
|
|
9781
9956
|
let t16;
|
|
9782
|
-
if ($[
|
|
9957
|
+
if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog?.currentPropertiesOrder || $[35] !== currentPropertyDialog?.editedCollectionId || $[36] !== currentPropertyDialog?.namespace || $[37] !== currentPropertyDialog?.parentCollectionIds || $[38] !== currentPropertyDialog?.propertyKey || $[39] !== snackbarController) {
|
|
9783
9958
|
t16 = () => {
|
|
9784
9959
|
if (!currentPropertyDialog?.propertyKey) {
|
|
9785
9960
|
return;
|
|
@@ -9802,21 +9977,21 @@
|
|
|
9802
9977
|
return false;
|
|
9803
9978
|
});
|
|
9804
9979
|
};
|
|
9805
|
-
$[
|
|
9806
|
-
$[
|
|
9807
|
-
$[
|
|
9808
|
-
$[
|
|
9809
|
-
$[
|
|
9810
|
-
$[
|
|
9811
|
-
$[
|
|
9812
|
-
$[
|
|
9980
|
+
$[33] = collectionConfigController;
|
|
9981
|
+
$[34] = currentPropertyDialog?.currentPropertiesOrder;
|
|
9982
|
+
$[35] = currentPropertyDialog?.editedCollectionId;
|
|
9983
|
+
$[36] = currentPropertyDialog?.namespace;
|
|
9984
|
+
$[37] = currentPropertyDialog?.parentCollectionIds;
|
|
9985
|
+
$[38] = currentPropertyDialog?.propertyKey;
|
|
9986
|
+
$[39] = snackbarController;
|
|
9987
|
+
$[40] = t16;
|
|
9813
9988
|
} else {
|
|
9814
|
-
t16 = $[
|
|
9989
|
+
t16 = $[40];
|
|
9815
9990
|
}
|
|
9816
9991
|
let t17;
|
|
9817
9992
|
let t18;
|
|
9818
9993
|
let t19;
|
|
9819
|
-
if ($[
|
|
9994
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9820
9995
|
t17 = () => {
|
|
9821
9996
|
setCurrentPropertyDialog(void 0);
|
|
9822
9997
|
};
|
|
@@ -9824,64 +9999,64 @@
|
|
|
9824
9999
|
setCurrentPropertyDialog(void 0);
|
|
9825
10000
|
};
|
|
9826
10001
|
t19 = {};
|
|
9827
|
-
$[
|
|
9828
|
-
$[
|
|
9829
|
-
$[
|
|
10002
|
+
$[41] = t17;
|
|
10003
|
+
$[42] = t18;
|
|
10004
|
+
$[43] = t19;
|
|
9830
10005
|
} else {
|
|
9831
|
-
t17 = $[
|
|
9832
|
-
t18 = $[
|
|
9833
|
-
t19 = $[
|
|
10006
|
+
t17 = $[41];
|
|
10007
|
+
t18 = $[42];
|
|
10008
|
+
t19 = $[43];
|
|
9834
10009
|
}
|
|
9835
10010
|
let t20;
|
|
9836
|
-
if ($[
|
|
10011
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9837
10012
|
t20 = [];
|
|
9838
|
-
$[
|
|
10013
|
+
$[44] = t20;
|
|
9839
10014
|
} else {
|
|
9840
|
-
t20 = $[
|
|
10015
|
+
t20 = $[44];
|
|
9841
10016
|
}
|
|
9842
10017
|
const t21 = currentPropertyDialog?.property;
|
|
9843
10018
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
9844
10019
|
let t23;
|
|
9845
|
-
if ($[
|
|
10020
|
+
if ($[45] !== propertyConfigs || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t21 || $[54] !== t22 || $[55] !== t9) {
|
|
9846
10021
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp2, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
|
|
9847
|
-
$[
|
|
9848
|
-
$[
|
|
9849
|
-
$[
|
|
9850
|
-
$[
|
|
9851
|
-
$[
|
|
9852
|
-
$[
|
|
9853
|
-
$[
|
|
9854
|
-
$[
|
|
9855
|
-
$[
|
|
9856
|
-
$[
|
|
9857
|
-
$[
|
|
9858
|
-
$[
|
|
9859
|
-
} else {
|
|
9860
|
-
t23 = $[
|
|
10022
|
+
$[45] = propertyConfigs;
|
|
10023
|
+
$[46] = t10;
|
|
10024
|
+
$[47] = t11;
|
|
10025
|
+
$[48] = t12;
|
|
10026
|
+
$[49] = t13;
|
|
10027
|
+
$[50] = t14;
|
|
10028
|
+
$[51] = t15;
|
|
10029
|
+
$[52] = t16;
|
|
10030
|
+
$[53] = t21;
|
|
10031
|
+
$[54] = t22;
|
|
10032
|
+
$[55] = t9;
|
|
10033
|
+
$[56] = t23;
|
|
10034
|
+
} else {
|
|
10035
|
+
t23 = $[56];
|
|
9861
10036
|
}
|
|
9862
10037
|
let t24;
|
|
9863
|
-
if ($[
|
|
10038
|
+
if ($[57] !== children || $[58] !== t23 || $[59] !== t5 || $[60] !== t8) {
|
|
9864
10039
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
|
|
9865
10040
|
children,
|
|
9866
10041
|
t8,
|
|
9867
10042
|
t23
|
|
9868
10043
|
] });
|
|
9869
|
-
$[
|
|
9870
|
-
$[
|
|
9871
|
-
$[
|
|
9872
|
-
$[
|
|
9873
|
-
$[
|
|
10044
|
+
$[57] = children;
|
|
10045
|
+
$[58] = t23;
|
|
10046
|
+
$[59] = t5;
|
|
10047
|
+
$[60] = t8;
|
|
10048
|
+
$[61] = t24;
|
|
9874
10049
|
} else {
|
|
9875
|
-
t24 = $[
|
|
10050
|
+
t24 = $[61];
|
|
9876
10051
|
}
|
|
9877
10052
|
let t25;
|
|
9878
|
-
if ($[
|
|
10053
|
+
if ($[62] !== collectionConfigController || $[63] !== t24) {
|
|
9879
10054
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
9880
|
-
$[
|
|
9881
|
-
$[
|
|
9882
|
-
$[
|
|
10055
|
+
$[62] = collectionConfigController;
|
|
10056
|
+
$[63] = t24;
|
|
10057
|
+
$[64] = t25;
|
|
9883
10058
|
} else {
|
|
9884
|
-
t25 = $[
|
|
10059
|
+
t25 = $[64];
|
|
9885
10060
|
}
|
|
9886
10061
|
return t25;
|
|
9887
10062
|
}, equal);
|
|
@@ -10052,7 +10227,7 @@
|
|
|
10052
10227
|
const deleteCollection = t3;
|
|
10053
10228
|
let t4;
|
|
10054
10229
|
if ($[11] !== permissions.deleteCollections) {
|
|
10055
|
-
t4 = permissions.deleteCollections && /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.MoreVertIcon, { size: "small" }) }), children: /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { dense: true, onClick: (event) => {
|
|
10230
|
+
t4 = permissions.deleteCollections && /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ui.MoreVertIcon, { size: "small" }) }), children: /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { dense: true, onClick: (event) => {
|
|
10056
10231
|
event.preventDefault();
|
|
10057
10232
|
event.stopPropagation();
|
|
10058
10233
|
setDeleteRequested(true);
|
|
@@ -10067,7 +10242,7 @@
|
|
|
10067
10242
|
}
|
|
10068
10243
|
let t5;
|
|
10069
10244
|
if ($[13] !== onEditCollectionClicked || $[14] !== permissions.editCollections) {
|
|
10070
|
-
t5 = permissions.editCollections && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: (event_0) => {
|
|
10245
|
+
t5 = permissions.editCollections && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: (event_0) => {
|
|
10071
10246
|
onEditCollectionClicked();
|
|
10072
10247
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, { size: "small" }) });
|
|
10073
10248
|
$[13] = onEditCollectionClicked;
|
|
@@ -10496,21 +10671,22 @@
|
|
|
10496
10671
|
return t8;
|
|
10497
10672
|
}
|
|
10498
10673
|
function useCollectionEditorPlugin(t0) {
|
|
10499
|
-
const $ = reactCompilerRuntime.c(
|
|
10674
|
+
const $ = reactCompilerRuntime.c(19);
|
|
10500
10675
|
const {
|
|
10501
10676
|
collectionConfigController,
|
|
10502
10677
|
configPermissions,
|
|
10503
10678
|
reservedGroups,
|
|
10504
10679
|
extraView,
|
|
10505
|
-
getPathSuggestions,
|
|
10506
10680
|
getUser,
|
|
10507
10681
|
collectionInference,
|
|
10508
10682
|
getData,
|
|
10509
|
-
onAnalyticsEvent
|
|
10683
|
+
onAnalyticsEvent,
|
|
10684
|
+
includeIntroView: t1
|
|
10510
10685
|
} = t0;
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10686
|
+
const includeIntroView = t1 === void 0 ? true : t1;
|
|
10687
|
+
let t2;
|
|
10688
|
+
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== reservedGroups) {
|
|
10689
|
+
t2 = {
|
|
10514
10690
|
Component: ConfigControllerProvider,
|
|
10515
10691
|
props: {
|
|
10516
10692
|
collectionConfigController,
|
|
@@ -10518,7 +10694,6 @@
|
|
|
10518
10694
|
collectionInference,
|
|
10519
10695
|
reservedGroups,
|
|
10520
10696
|
extraView,
|
|
10521
|
-
getPathSuggestions,
|
|
10522
10697
|
getUser,
|
|
10523
10698
|
getData,
|
|
10524
10699
|
onAnalyticsEvent
|
|
@@ -10529,53 +10704,72 @@
|
|
|
10529
10704
|
$[2] = configPermissions;
|
|
10530
10705
|
$[3] = extraView;
|
|
10531
10706
|
$[4] = getData;
|
|
10532
|
-
$[5] =
|
|
10533
|
-
$[6] =
|
|
10534
|
-
$[7] =
|
|
10535
|
-
$[8] =
|
|
10536
|
-
$[9] = t1;
|
|
10707
|
+
$[5] = getUser;
|
|
10708
|
+
$[6] = onAnalyticsEvent;
|
|
10709
|
+
$[7] = reservedGroups;
|
|
10710
|
+
$[8] = t2;
|
|
10537
10711
|
} else {
|
|
10538
|
-
|
|
10712
|
+
t2 = $[8];
|
|
10539
10713
|
}
|
|
10540
|
-
let t2;
|
|
10541
10714
|
let t3;
|
|
10542
|
-
if ($[
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10715
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10716
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {});
|
|
10717
|
+
$[9] = t3;
|
|
10718
|
+
} else {
|
|
10719
|
+
t3 = $[9];
|
|
10720
|
+
}
|
|
10721
|
+
let t4;
|
|
10722
|
+
if ($[10] !== includeIntroView) {
|
|
10723
|
+
t4 = includeIntroView ? /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}) : void 0;
|
|
10724
|
+
$[10] = includeIntroView;
|
|
10725
|
+
$[11] = t4;
|
|
10726
|
+
} else {
|
|
10727
|
+
t4 = $[11];
|
|
10728
|
+
}
|
|
10729
|
+
let t5;
|
|
10730
|
+
if ($[12] !== t4) {
|
|
10731
|
+
t5 = {
|
|
10732
|
+
additionalActions: t3,
|
|
10733
|
+
additionalChildrenStart: t4,
|
|
10546
10734
|
CollectionActions: HomePageEditorCollectionAction,
|
|
10547
10735
|
AdditionalCards: NewCollectionCard
|
|
10548
10736
|
};
|
|
10549
|
-
|
|
10737
|
+
$[12] = t4;
|
|
10738
|
+
$[13] = t5;
|
|
10739
|
+
} else {
|
|
10740
|
+
t5 = $[13];
|
|
10741
|
+
}
|
|
10742
|
+
let t6;
|
|
10743
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10744
|
+
t6 = {
|
|
10550
10745
|
CollectionActionsStart: EditorCollectionActionStart,
|
|
10551
10746
|
CollectionActions: EditorCollectionAction,
|
|
10552
10747
|
HeaderAction: CollectionViewHeaderAction,
|
|
10553
10748
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10554
10749
|
};
|
|
10555
|
-
$[
|
|
10556
|
-
$[11] = t3;
|
|
10750
|
+
$[14] = t6;
|
|
10557
10751
|
} else {
|
|
10558
|
-
|
|
10559
|
-
t3 = $[11];
|
|
10752
|
+
t6 = $[14];
|
|
10560
10753
|
}
|
|
10561
|
-
let
|
|
10562
|
-
if ($[
|
|
10563
|
-
|
|
10754
|
+
let t7;
|
|
10755
|
+
if ($[15] !== collectionConfigController.loading || $[16] !== t2 || $[17] !== t5) {
|
|
10756
|
+
t7 = {
|
|
10564
10757
|
key: "collection_editor",
|
|
10565
10758
|
loading: collectionConfigController.loading,
|
|
10566
|
-
provider:
|
|
10567
|
-
homePage:
|
|
10568
|
-
collectionView:
|
|
10759
|
+
provider: t2,
|
|
10760
|
+
homePage: t5,
|
|
10761
|
+
collectionView: t6
|
|
10569
10762
|
};
|
|
10570
|
-
$[
|
|
10571
|
-
$[
|
|
10572
|
-
$[
|
|
10763
|
+
$[15] = collectionConfigController.loading;
|
|
10764
|
+
$[16] = t2;
|
|
10765
|
+
$[17] = t5;
|
|
10766
|
+
$[18] = t7;
|
|
10573
10767
|
} else {
|
|
10574
|
-
|
|
10768
|
+
t7 = $[18];
|
|
10575
10769
|
}
|
|
10576
|
-
return
|
|
10770
|
+
return t7;
|
|
10577
10771
|
}
|
|
10578
|
-
function IntroWidget(
|
|
10772
|
+
function IntroWidget() {
|
|
10579
10773
|
const $ = reactCompilerRuntime.c(11);
|
|
10580
10774
|
const navigation = core.useNavigationController();
|
|
10581
10775
|
if (!navigation.topLevelNavigation) {
|
|
@@ -10583,35 +10777,35 @@
|
|
|
10583
10777
|
}
|
|
10584
10778
|
const authController = core.useAuthController();
|
|
10585
10779
|
const collectionEditorController = useCollectionEditorController();
|
|
10586
|
-
let
|
|
10780
|
+
let t0;
|
|
10587
10781
|
if ($[0] !== authController || $[1] !== collectionEditorController) {
|
|
10588
|
-
|
|
10782
|
+
t0 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
|
|
10589
10783
|
user: authController.user
|
|
10590
10784
|
}).createCollections : true;
|
|
10591
10785
|
$[0] = authController;
|
|
10592
10786
|
$[1] = collectionEditorController;
|
|
10593
|
-
$[2] =
|
|
10787
|
+
$[2] = t0;
|
|
10594
10788
|
} else {
|
|
10595
|
-
|
|
10789
|
+
t0 = $[2];
|
|
10596
10790
|
}
|
|
10597
|
-
const canCreateCollections =
|
|
10791
|
+
const canCreateCollections = t0;
|
|
10598
10792
|
if (!navigation.initialised || (navigation.collections ?? []).length > 0) {
|
|
10599
10793
|
return null;
|
|
10600
10794
|
}
|
|
10795
|
+
let t1;
|
|
10601
10796
|
let t2;
|
|
10602
|
-
let t3;
|
|
10603
10797
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
$[3] =
|
|
10607
|
-
$[4] =
|
|
10798
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "uppercase", children: "No collections found" });
|
|
10799
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: "Start building collections in FireCMS easily. Map them to your existing database data, import from files, or use our templates." });
|
|
10800
|
+
$[3] = t1;
|
|
10801
|
+
$[4] = t2;
|
|
10608
10802
|
} else {
|
|
10609
|
-
|
|
10610
|
-
|
|
10803
|
+
t1 = $[3];
|
|
10804
|
+
t2 = $[4];
|
|
10611
10805
|
}
|
|
10612
|
-
let
|
|
10806
|
+
let t3;
|
|
10613
10807
|
if ($[5] !== canCreateCollections || $[6] !== collectionEditorController) {
|
|
10614
|
-
|
|
10808
|
+
t3 = canCreateCollections && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: collectionEditorController && canCreateCollections ? () => collectionEditorController.createCollection({
|
|
10615
10809
|
parentCollectionIds: [],
|
|
10616
10810
|
redirect: true,
|
|
10617
10811
|
sourceClick: "new_collection_card"
|
|
@@ -10621,31 +10815,31 @@
|
|
|
10621
10815
|
] });
|
|
10622
10816
|
$[5] = canCreateCollections;
|
|
10623
10817
|
$[6] = collectionEditorController;
|
|
10624
|
-
$[7] =
|
|
10818
|
+
$[7] = t3;
|
|
10625
10819
|
} else {
|
|
10626
|
-
|
|
10820
|
+
t3 = $[7];
|
|
10627
10821
|
}
|
|
10628
|
-
let
|
|
10822
|
+
let t4;
|
|
10629
10823
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10630
|
-
|
|
10631
|
-
$[8] =
|
|
10824
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "secondary", children: "You can also define collections programmatically." });
|
|
10825
|
+
$[8] = t4;
|
|
10632
10826
|
} else {
|
|
10633
|
-
|
|
10827
|
+
t4 = $[8];
|
|
10634
10828
|
}
|
|
10635
|
-
let
|
|
10636
|
-
if ($[9] !==
|
|
10637
|
-
|
|
10829
|
+
let t5;
|
|
10830
|
+
if ($[9] !== t3) {
|
|
10831
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Paper, { className: "my-4 px-4 py-6 flex flex-col bg-white dark:bg-surface-accent-800 gap-2", children: [
|
|
10832
|
+
t1,
|
|
10638
10833
|
t2,
|
|
10639
10834
|
t3,
|
|
10640
|
-
t4
|
|
10641
|
-
t5
|
|
10835
|
+
t4
|
|
10642
10836
|
] });
|
|
10643
|
-
$[9] =
|
|
10644
|
-
$[10] =
|
|
10837
|
+
$[9] = t3;
|
|
10838
|
+
$[10] = t5;
|
|
10645
10839
|
} else {
|
|
10646
|
-
|
|
10840
|
+
t5 = $[10];
|
|
10647
10841
|
}
|
|
10648
|
-
return
|
|
10842
|
+
return t5;
|
|
10649
10843
|
}
|
|
10650
10844
|
const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
|
|
10651
10845
|
const markAsEditable = (c) => {
|