@firecms/collection_editor 3.0.0-canary.241 → 3.0.0-canary.244
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/dist/index.es.js +501 -356
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +498 -356
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/collection_editor/PropertyTree.d.ts +2 -3
- package/package.json +8 -8
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +17 -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/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,7 +475,7 @@
|
|
|
475
475
|
} else {
|
|
476
476
|
t40 = $[58];
|
|
477
477
|
}
|
|
478
|
-
const t41 = values.history === null ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
|
|
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
479
|
let t42;
|
|
480
480
|
if ($[59] !== setFieldValue) {
|
|
481
481
|
t42 = (v) => setFieldValue("history", v);
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
} else {
|
|
485
485
|
t42 = $[60];
|
|
486
486
|
}
|
|
487
|
-
const t43 = values.history
|
|
487
|
+
const t43 = values.history === void 0 ? null : values.history;
|
|
488
488
|
let t44;
|
|
489
489
|
if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
|
|
490
490
|
t44 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
|
|
@@ -742,242 +742,282 @@
|
|
|
742
742
|
} else {
|
|
743
743
|
t84 = $[124];
|
|
744
744
|
}
|
|
745
|
-
const t85 =
|
|
745
|
+
const t85 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
|
|
746
746
|
let t86;
|
|
747
747
|
if ($[125] !== setFieldValue) {
|
|
748
|
-
t86 = (v_0) =>
|
|
749
|
-
if (v_0 === "code_defined") {
|
|
750
|
-
throw new Error("This should not happen");
|
|
751
|
-
}
|
|
752
|
-
setFieldValue("customId", v_0);
|
|
753
|
-
};
|
|
748
|
+
t86 = (v_0) => setFieldValue("includeJsonView", v_0);
|
|
754
749
|
$[125] = setFieldValue;
|
|
755
750
|
$[126] = t86;
|
|
756
751
|
} else {
|
|
757
752
|
t86 = $[126];
|
|
758
753
|
}
|
|
759
|
-
const t87 =
|
|
754
|
+
const t87 = values.includeJsonView === void 0 ? true : values.includeJsonView;
|
|
760
755
|
let t88;
|
|
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
|
+
} else {
|
|
763
|
+
t88 = $[130];
|
|
764
|
+
}
|
|
761
765
|
let t89;
|
|
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
|
+
} else {
|
|
770
|
+
t89 = $[131];
|
|
771
|
+
}
|
|
762
772
|
let t90;
|
|
763
|
-
if ($[
|
|
764
|
-
|
|
765
|
-
t89 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
766
|
-
t90 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
767
|
-
$[127] = t88;
|
|
768
|
-
$[128] = t89;
|
|
769
|
-
$[129] = t90;
|
|
770
|
-
} else {
|
|
771
|
-
t88 = $[127];
|
|
772
|
-
t89 = $[128];
|
|
773
|
-
t90 = $[129];
|
|
774
|
-
}
|
|
775
|
-
let t91;
|
|
776
|
-
if ($[130] !== t85 || $[131] !== t86 || $[132] !== t87) {
|
|
777
|
-
t91 = /* @__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: t85, onValueChange: t86, value: t87, renderValue: _temp3$4, children: [
|
|
773
|
+
if ($[132] !== t88) {
|
|
774
|
+
t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
778
775
|
t88,
|
|
779
|
-
t89
|
|
780
|
-
|
|
781
|
-
]
|
|
782
|
-
$[
|
|
783
|
-
$[131] = t86;
|
|
784
|
-
$[132] = t87;
|
|
785
|
-
$[133] = t91;
|
|
776
|
+
t89
|
|
777
|
+
] });
|
|
778
|
+
$[132] = t88;
|
|
779
|
+
$[133] = t90;
|
|
786
780
|
} else {
|
|
787
|
-
|
|
781
|
+
t90 = $[133];
|
|
788
782
|
}
|
|
783
|
+
const t91 = customIdValue === "code_defined";
|
|
789
784
|
let t92;
|
|
790
785
|
if ($[134] !== setFieldValue) {
|
|
791
|
-
t92 = (v_1) =>
|
|
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
792
|
$[134] = setFieldValue;
|
|
793
793
|
$[135] = t92;
|
|
794
794
|
} else {
|
|
795
795
|
t92 = $[135];
|
|
796
796
|
}
|
|
797
|
-
const t93 =
|
|
797
|
+
const t93 = customIdValue ?? "";
|
|
798
798
|
let t94;
|
|
799
|
-
if ($[136] !== t92 || $[137] !== t93) {
|
|
800
|
-
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
|
|
801
|
-
$[136] = t92;
|
|
802
|
-
$[137] = t93;
|
|
803
|
-
$[138] = t94;
|
|
804
|
-
} else {
|
|
805
|
-
t94 = $[138];
|
|
806
|
-
}
|
|
807
799
|
let t95;
|
|
808
|
-
if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
|
|
809
|
-
t95 = /* @__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." });
|
|
810
|
-
$[139] = t95;
|
|
811
|
-
} else {
|
|
812
|
-
t95 = $[139];
|
|
813
|
-
}
|
|
814
800
|
let t96;
|
|
815
|
-
if ($[
|
|
816
|
-
|
|
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: [
|
|
817
816
|
t94,
|
|
818
|
-
t95
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
$[
|
|
817
|
+
t95,
|
|
818
|
+
t96
|
|
819
|
+
] }) });
|
|
820
|
+
$[139] = t91;
|
|
821
|
+
$[140] = t92;
|
|
822
|
+
$[141] = t93;
|
|
823
|
+
$[142] = t97;
|
|
822
824
|
} else {
|
|
823
|
-
|
|
825
|
+
t97 = $[142];
|
|
824
826
|
}
|
|
825
|
-
let
|
|
826
|
-
if ($[
|
|
827
|
-
|
|
828
|
-
$[
|
|
829
|
-
$[
|
|
830
|
-
} else {
|
|
831
|
-
t97 = $[143];
|
|
832
|
-
}
|
|
833
|
-
const t98 = values.textSearchEnabled ?? false;
|
|
834
|
-
let t99;
|
|
835
|
-
if ($[144] !== t97 || $[145] !== t98) {
|
|
836
|
-
t99 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
|
|
837
|
-
$[144] = t97;
|
|
838
|
-
$[145] = t98;
|
|
839
|
-
$[146] = t99;
|
|
827
|
+
let t98;
|
|
828
|
+
if ($[143] !== setFieldValue) {
|
|
829
|
+
t98 = (v_2) => setFieldValue("collectionGroup", v_2);
|
|
830
|
+
$[143] = setFieldValue;
|
|
831
|
+
$[144] = t98;
|
|
840
832
|
} else {
|
|
841
|
-
|
|
833
|
+
t98 = $[144];
|
|
842
834
|
}
|
|
835
|
+
const t99 = values.collectionGroup ?? false;
|
|
843
836
|
let t100;
|
|
844
|
-
if ($[
|
|
845
|
-
t100 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
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;
|
|
846
841
|
$[147] = t100;
|
|
847
842
|
} else {
|
|
848
843
|
t100 = $[147];
|
|
849
844
|
}
|
|
850
845
|
let t101;
|
|
851
|
-
if ($[148]
|
|
852
|
-
t101 = /* @__PURE__ */ jsxRuntime.
|
|
853
|
-
|
|
854
|
-
t100
|
|
855
|
-
] });
|
|
856
|
-
$[148] = t99;
|
|
857
|
-
$[149] = 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;
|
|
858
849
|
} else {
|
|
859
|
-
t101 = $[
|
|
850
|
+
t101 = $[148];
|
|
860
851
|
}
|
|
861
852
|
let t102;
|
|
862
|
-
if ($[
|
|
863
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
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;
|
|
860
|
+
} else {
|
|
861
|
+
t102 = $[150];
|
|
862
|
+
}
|
|
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: [
|
|
864
902
|
t54,
|
|
865
903
|
t62,
|
|
866
904
|
t74,
|
|
867
905
|
t81,
|
|
868
906
|
t84,
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
907
|
+
t90,
|
|
908
|
+
t97,
|
|
909
|
+
t102,
|
|
910
|
+
t107
|
|
872
911
|
] });
|
|
873
|
-
$[
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
$[
|
|
878
|
-
$[
|
|
879
|
-
$[
|
|
880
|
-
$[
|
|
881
|
-
$[
|
|
882
|
-
|
|
883
|
-
|
|
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];
|
|
884
924
|
}
|
|
885
|
-
let
|
|
886
|
-
if ($[
|
|
887
|
-
|
|
888
|
-
$[
|
|
889
|
-
$[
|
|
890
|
-
$[
|
|
891
|
-
} else {
|
|
892
|
-
|
|
893
|
-
}
|
|
894
|
-
let
|
|
895
|
-
if ($[
|
|
896
|
-
|
|
897
|
-
|
|
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,
|
|
898
938
|
children
|
|
899
939
|
] });
|
|
900
|
-
$[
|
|
901
|
-
$[
|
|
902
|
-
$[
|
|
940
|
+
$[172] = children;
|
|
941
|
+
$[173] = t109;
|
|
942
|
+
$[174] = t110;
|
|
903
943
|
} else {
|
|
904
|
-
|
|
944
|
+
t110 = $[174];
|
|
905
945
|
}
|
|
906
|
-
let
|
|
907
|
-
if ($[
|
|
908
|
-
|
|
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: [
|
|
909
949
|
t27,
|
|
910
950
|
t36,
|
|
911
951
|
t37,
|
|
912
952
|
t40,
|
|
913
953
|
t46,
|
|
914
|
-
|
|
954
|
+
t110
|
|
915
955
|
] });
|
|
916
|
-
$[
|
|
917
|
-
$[
|
|
918
|
-
$[
|
|
919
|
-
$[
|
|
920
|
-
$[
|
|
921
|
-
$[
|
|
922
|
-
$[
|
|
923
|
-
} else {
|
|
924
|
-
|
|
925
|
-
}
|
|
926
|
-
let
|
|
927
|
-
if ($[
|
|
928
|
-
|
|
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: {
|
|
929
969
|
height: "52px"
|
|
930
970
|
} });
|
|
931
|
-
$[
|
|
971
|
+
$[182] = t112;
|
|
932
972
|
} else {
|
|
933
|
-
|
|
973
|
+
t112 = $[182];
|
|
934
974
|
}
|
|
935
|
-
let
|
|
936
|
-
if ($[
|
|
937
|
-
|
|
975
|
+
let t113;
|
|
976
|
+
if ($[183] !== setFieldValue) {
|
|
977
|
+
t113 = (icon) => {
|
|
938
978
|
setIconDialogOpen(false);
|
|
939
979
|
setFieldValue("icon", icon);
|
|
940
980
|
};
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
981
|
+
$[183] = setFieldValue;
|
|
982
|
+
$[184] = t113;
|
|
943
983
|
} else {
|
|
944
|
-
|
|
984
|
+
t113 = $[184];
|
|
945
985
|
}
|
|
946
|
-
let
|
|
947
|
-
if ($[
|
|
948
|
-
|
|
949
|
-
$[
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
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;
|
|
952
992
|
} else {
|
|
953
|
-
|
|
993
|
+
t114 = $[187];
|
|
954
994
|
}
|
|
955
|
-
let
|
|
956
|
-
if ($[
|
|
957
|
-
|
|
958
|
-
$[
|
|
959
|
-
$[
|
|
960
|
-
$[
|
|
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;
|
|
961
1001
|
} else {
|
|
962
|
-
|
|
1002
|
+
t115 = $[190];
|
|
963
1003
|
}
|
|
964
|
-
let
|
|
965
|
-
if ($[
|
|
966
|
-
|
|
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: [
|
|
967
1007
|
t18,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1008
|
+
t111,
|
|
1009
|
+
t112,
|
|
1010
|
+
t115
|
|
971
1011
|
] }) });
|
|
972
|
-
$[
|
|
973
|
-
$[
|
|
974
|
-
$[
|
|
975
|
-
$[
|
|
976
|
-
$[
|
|
1012
|
+
$[191] = T0;
|
|
1013
|
+
$[192] = t111;
|
|
1014
|
+
$[193] = t115;
|
|
1015
|
+
$[194] = t18;
|
|
1016
|
+
$[195] = t116;
|
|
977
1017
|
} else {
|
|
978
|
-
|
|
1018
|
+
t116 = $[195];
|
|
979
1019
|
}
|
|
980
|
-
return
|
|
1020
|
+
return t116;
|
|
981
1021
|
}
|
|
982
1022
|
function _temp3$4(value_3) {
|
|
983
1023
|
if (value_3 === "code_defined") {
|
|
@@ -2738,7 +2778,7 @@
|
|
|
2738
2778
|
return t19;
|
|
2739
2779
|
}
|
|
2740
2780
|
const PropertyTree = React.memo(function PropertyTree2(t0) {
|
|
2741
|
-
const $ = reactCompilerRuntime.c(
|
|
2781
|
+
const $ = reactCompilerRuntime.c(37);
|
|
2742
2782
|
const {
|
|
2743
2783
|
namespace,
|
|
2744
2784
|
selectedPropertyKey,
|
|
@@ -2764,94 +2804,152 @@
|
|
|
2764
2804
|
}
|
|
2765
2805
|
const propertiesOrder = t1;
|
|
2766
2806
|
let t2;
|
|
2767
|
-
if ($[3]
|
|
2768
|
-
t2 =
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
}
|
|
2772
|
-
const startIndex = result.source.index;
|
|
2773
|
-
const endIndex = result.destination.index;
|
|
2774
|
-
const newPropertiesOrder = Array.from(propertiesOrder);
|
|
2775
|
-
const [removed] = newPropertiesOrder.splice(startIndex, 1);
|
|
2776
|
-
newPropertiesOrder.splice(endIndex, 0, removed);
|
|
2777
|
-
if (onPropertyMove) {
|
|
2778
|
-
onPropertyMove(newPropertiesOrder, namespace);
|
|
2807
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2808
|
+
t2 = {
|
|
2809
|
+
activationConstraint: {
|
|
2810
|
+
distance: 5
|
|
2779
2811
|
}
|
|
2780
2812
|
};
|
|
2781
|
-
$[3] =
|
|
2782
|
-
$[4] = onPropertyMove;
|
|
2783
|
-
$[5] = propertiesOrder;
|
|
2784
|
-
$[6] = t2;
|
|
2813
|
+
$[3] = t2;
|
|
2785
2814
|
} else {
|
|
2786
|
-
t2 = $[
|
|
2815
|
+
t2 = $[3];
|
|
2787
2816
|
}
|
|
2788
|
-
|
|
2789
|
-
|
|
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));
|
|
2790
2827
|
let t4;
|
|
2791
|
-
if ($[
|
|
2792
|
-
t4 = (
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
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);
|
|
2799
2852
|
}
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
]
|
|
2804
|
-
$[7] =
|
|
2805
|
-
$[8] =
|
|
2806
|
-
|
|
2807
|
-
$[
|
|
2808
|
-
$[11] = inferredPropertyKeys;
|
|
2809
|
-
$[12] = namespace;
|
|
2810
|
-
$[13] = onPropertyClick;
|
|
2811
|
-
$[14] = onPropertyMove;
|
|
2812
|
-
$[15] = onPropertyRemove;
|
|
2813
|
-
$[16] = properties;
|
|
2814
|
-
$[17] = propertiesOrder;
|
|
2815
|
-
$[18] = selectedPropertyKey;
|
|
2816
|
-
$[19] = t4;
|
|
2817
|
-
} else {
|
|
2818
|
-
t4 = $[19];
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
$[5] = namespace;
|
|
2856
|
+
$[6] = onPropertyMove;
|
|
2857
|
+
$[7] = propertiesOrder;
|
|
2858
|
+
$[8] = t4;
|
|
2859
|
+
} else {
|
|
2860
|
+
t4 = $[8];
|
|
2819
2861
|
}
|
|
2862
|
+
const handleDragEnd = t4;
|
|
2820
2863
|
let t5;
|
|
2821
|
-
if ($[
|
|
2822
|
-
|
|
2823
|
-
$[
|
|
2824
|
-
|
|
2825
|
-
|
|
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;
|
|
2826
2877
|
} else {
|
|
2827
|
-
t5 = $[
|
|
2878
|
+
t5 = $[11];
|
|
2828
2879
|
}
|
|
2880
|
+
const items = t5;
|
|
2829
2881
|
let t6;
|
|
2830
|
-
if ($[
|
|
2831
|
-
t6 =
|
|
2832
|
-
$[
|
|
2833
|
-
$[24] = t5;
|
|
2834
|
-
$[25] = t6;
|
|
2882
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2883
|
+
t6 = [modifiers.restrictToVerticalAxis];
|
|
2884
|
+
$[14] = t6;
|
|
2835
2885
|
} else {
|
|
2836
|
-
t6 = $[
|
|
2886
|
+
t6 = $[14];
|
|
2837
2887
|
}
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
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);
|
|
2847
2945
|
function PropertyTreeEntry(t0) {
|
|
2848
|
-
const $ = reactCompilerRuntime.c(
|
|
2946
|
+
const $ = reactCompilerRuntime.c(62);
|
|
2849
2947
|
const {
|
|
2948
|
+
id,
|
|
2850
2949
|
propertyKey,
|
|
2851
2950
|
namespace,
|
|
2852
2951
|
propertyOrBuilder,
|
|
2853
2952
|
additionalField,
|
|
2854
|
-
provided,
|
|
2855
2953
|
selectedPropertyKey,
|
|
2856
2954
|
errors,
|
|
2857
2955
|
onPropertyClick,
|
|
@@ -2861,157 +2959,201 @@
|
|
|
2861
2959
|
collectionEditable
|
|
2862
2960
|
} = t0;
|
|
2863
2961
|
let t1;
|
|
2864
|
-
if ($[0] !==
|
|
2865
|
-
t1 =
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
$[
|
|
2869
|
-
$[
|
|
2962
|
+
if ($[0] !== id) {
|
|
2963
|
+
t1 = {
|
|
2964
|
+
id
|
|
2965
|
+
};
|
|
2966
|
+
$[0] = id;
|
|
2967
|
+
$[1] = t1;
|
|
2870
2968
|
} else {
|
|
2871
|
-
t1 = $[
|
|
2969
|
+
t1 = $[1];
|
|
2872
2970
|
}
|
|
2873
|
-
const
|
|
2971
|
+
const {
|
|
2972
|
+
attributes,
|
|
2973
|
+
listeners,
|
|
2974
|
+
setNodeRef,
|
|
2975
|
+
transform,
|
|
2976
|
+
transition,
|
|
2977
|
+
isDragging
|
|
2978
|
+
} = sortable.useSortable(t1);
|
|
2874
2979
|
let t2;
|
|
2875
|
-
if ($[
|
|
2876
|
-
t2 =
|
|
2877
|
-
$[
|
|
2878
|
-
$[
|
|
2879
|
-
$[6] = t2;
|
|
2980
|
+
if ($[2] !== transform) {
|
|
2981
|
+
t2 = utilities.CSS.Translate.toString(transform);
|
|
2982
|
+
$[2] = transform;
|
|
2983
|
+
$[3] = t2;
|
|
2880
2984
|
} else {
|
|
2881
|
-
t2 = $[
|
|
2985
|
+
t2 = $[3];
|
|
2986
|
+
}
|
|
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];
|
|
2882
3002
|
}
|
|
2883
|
-
const
|
|
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;
|
|
2884
3016
|
const fullIdPath = getFullIdPath(propertyKey, namespace);
|
|
2885
3017
|
const hasError = fullIdPath in errors;
|
|
2886
3018
|
let subtree;
|
|
2887
3019
|
if (typeof propertyOrBuilder === "object") {
|
|
2888
3020
|
const property = propertyOrBuilder;
|
|
2889
3021
|
if (property.dataType === "map" && property.properties) {
|
|
2890
|
-
let
|
|
2891
|
-
if ($[
|
|
2892
|
-
|
|
2893
|
-
$[
|
|
2894
|
-
$[
|
|
2895
|
-
$[
|
|
2896
|
-
$[
|
|
2897
|
-
$[
|
|
2898
|
-
$[
|
|
2899
|
-
$[
|
|
2900
|
-
$[
|
|
2901
|
-
$[
|
|
2902
|
-
$[
|
|
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;
|
|
2903
3035
|
} else {
|
|
2904
|
-
|
|
3036
|
+
t62 = $[21];
|
|
2905
3037
|
}
|
|
2906
|
-
subtree =
|
|
3038
|
+
subtree = t62;
|
|
2907
3039
|
}
|
|
2908
3040
|
}
|
|
2909
3041
|
const selected = selectedPropertyKey === fullId;
|
|
2910
|
-
let
|
|
2911
|
-
if ($[
|
|
2912
|
-
|
|
2913
|
-
$[
|
|
2914
|
-
$[
|
|
2915
|
-
$[
|
|
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;
|
|
2916
3048
|
} else {
|
|
2917
|
-
|
|
3049
|
+
t6 = $[24];
|
|
2918
3050
|
}
|
|
2919
|
-
const editable =
|
|
2920
|
-
let
|
|
2921
|
-
if ($[
|
|
2922
|
-
|
|
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: {
|
|
2923
3055
|
left: "32px",
|
|
2924
3056
|
top: "64px",
|
|
2925
3057
|
bottom: "16px"
|
|
2926
3058
|
} });
|
|
2927
|
-
$[
|
|
2928
|
-
$[
|
|
3059
|
+
$[25] = subtree;
|
|
3060
|
+
$[26] = t7;
|
|
2929
3061
|
} else {
|
|
2930
|
-
|
|
3062
|
+
t7 = $[26];
|
|
2931
3063
|
}
|
|
2932
|
-
let
|
|
2933
|
-
if ($[
|
|
2934
|
-
|
|
2935
|
-
$[
|
|
2936
|
-
$[
|
|
2937
|
-
$[
|
|
2938
|
-
$[
|
|
2939
|
-
$[
|
|
2940
|
-
$[
|
|
2941
|
-
$[
|
|
2942
|
-
$[
|
|
2943
|
-
$[
|
|
2944
|
-
} else {
|
|
2945
|
-
|
|
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];
|
|
2946
3078
|
}
|
|
2947
|
-
let
|
|
2948
|
-
if ($[
|
|
2949
|
-
|
|
2950
|
-
$[
|
|
2951
|
-
$[
|
|
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;
|
|
2952
3084
|
} else {
|
|
2953
|
-
|
|
3085
|
+
t9 = $[37];
|
|
2954
3086
|
}
|
|
2955
|
-
let
|
|
2956
|
-
if ($[
|
|
2957
|
-
|
|
2958
|
-
$[
|
|
2959
|
-
$[
|
|
2960
|
-
$[
|
|
2961
|
-
$[
|
|
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;
|
|
2962
3095
|
} else {
|
|
2963
|
-
|
|
3096
|
+
t10 = $[42];
|
|
2964
3097
|
}
|
|
2965
|
-
let
|
|
2966
|
-
if ($[
|
|
2967
|
-
|
|
2968
|
-
$[
|
|
2969
|
-
$[
|
|
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;
|
|
2970
3105
|
} else {
|
|
2971
|
-
|
|
3106
|
+
t11 = $[46];
|
|
2972
3107
|
}
|
|
2973
|
-
let
|
|
2974
|
-
if ($[
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
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
|
|
2979
3114
|
] });
|
|
2980
|
-
$[
|
|
2981
|
-
$[
|
|
2982
|
-
$[
|
|
2983
|
-
$[
|
|
3115
|
+
$[47] = t10;
|
|
3116
|
+
$[48] = t11;
|
|
3117
|
+
$[49] = t9;
|
|
3118
|
+
$[50] = t12;
|
|
2984
3119
|
} else {
|
|
2985
|
-
|
|
3120
|
+
t12 = $[50];
|
|
2986
3121
|
}
|
|
2987
|
-
let
|
|
2988
|
-
if ($[
|
|
2989
|
-
|
|
2990
|
-
$[
|
|
2991
|
-
$[
|
|
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;
|
|
2992
3127
|
} else {
|
|
2993
|
-
|
|
3128
|
+
t13 = $[52];
|
|
2994
3129
|
}
|
|
2995
|
-
let
|
|
2996
|
-
if ($[
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
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
|
|
3002
3137
|
] });
|
|
3003
|
-
$[
|
|
3004
|
-
$[
|
|
3005
|
-
$[
|
|
3006
|
-
$[
|
|
3007
|
-
$[
|
|
3008
|
-
$[50] = t5;
|
|
3009
|
-
$[51] = t9;
|
|
3010
|
-
$[52] = t11;
|
|
3138
|
+
$[53] = t12;
|
|
3139
|
+
$[54] = t13;
|
|
3140
|
+
$[55] = t7;
|
|
3141
|
+
$[56] = t8;
|
|
3142
|
+
$[57] = t14;
|
|
3011
3143
|
} else {
|
|
3012
|
-
|
|
3144
|
+
t14 = $[57];
|
|
3013
3145
|
}
|
|
3014
|
-
|
|
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;
|
|
3015
3157
|
}
|
|
3016
3158
|
function MapPropertyField(t0) {
|
|
3017
3159
|
const $ = reactCompilerRuntime.c(67);
|
|
@@ -3225,7 +3367,7 @@
|
|
|
3225
3367
|
const t19 = values.spreadChildren ?? false;
|
|
3226
3368
|
let t20;
|
|
3227
3369
|
if ($[40] !== t18 || $[41] !== t19) {
|
|
3228
|
-
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 });
|
|
3229
3371
|
$[40] = t18;
|
|
3230
3372
|
$[41] = t19;
|
|
3231
3373
|
$[42] = t20;
|
|
@@ -4697,7 +4839,7 @@
|
|
|
4697
4839
|
field,
|
|
4698
4840
|
form
|
|
4699
4841
|
} = t22;
|
|
4700
|
-
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 });
|
|
4701
4843
|
} }) });
|
|
4702
4844
|
$[0] = disabled;
|
|
4703
4845
|
$[1] = t1;
|
|
@@ -4711,7 +4853,7 @@
|
|
|
4711
4853
|
field: field_0,
|
|
4712
4854
|
form: form_0
|
|
4713
4855
|
} = t32;
|
|
4714
|
-
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 });
|
|
4715
4857
|
} }) });
|
|
4716
4858
|
$[2] = disabled;
|
|
4717
4859
|
$[3] = t2;
|