@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.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("@hello-pangea/dnd"), 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", "@hello-pangea/dnd", "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.dnd, global.JSON5, global.prismReactRenderer, global.data_import_export, global.reactRouter));
3
- })(this, function(exports2, jsxRuntime, reactCompilerRuntime, core, React, equal, ui, Yup, formex, schema_inference, dnd, JSON5, prismReactRenderer, data_import_export, reactRouter) {
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(186);
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 ?? null;
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 = customIdValue === "code_defined";
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 = customIdValue ?? "";
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 ($[127] === Symbol.for("react.memo_cache_sentinel")) {
764
- t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
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
- t90
781
- ] }) });
782
- $[130] = t85;
783
- $[131] = t86;
784
- $[132] = t87;
785
- $[133] = t91;
776
+ t89
777
+ ] });
778
+ $[132] = t88;
779
+ $[133] = t90;
786
780
  } else {
787
- t91 = $[133];
781
+ t90 = $[133];
788
782
  }
783
+ const t91 = customIdValue === "code_defined";
789
784
  let t92;
790
785
  if ($[134] !== setFieldValue) {
791
- t92 = (v_1) => setFieldValue("collectionGroup", 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 = values.collectionGroup ?? false;
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 ($[140] !== t94) {
816
- t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
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
- $[140] = t94;
821
- $[141] = t96;
817
+ t95,
818
+ t96
819
+ ] }) });
820
+ $[139] = t91;
821
+ $[140] = t92;
822
+ $[141] = t93;
823
+ $[142] = t97;
822
824
  } else {
823
- t96 = $[141];
825
+ t97 = $[142];
824
826
  }
825
- let t97;
826
- if ($[142] !== setFieldValue) {
827
- t97 = (v_2) => setFieldValue("textSearchEnabled", v_2);
828
- $[142] = setFieldValue;
829
- $[143] = t97;
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
- t99 = $[146];
833
+ t98 = $[144];
842
834
  }
835
+ const t99 = values.collectionGroup ?? false;
843
836
  let t100;
844
- if ($[147] === Symbol.for("react.memo_cache_sentinel")) {
845
- t100 = /* @__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." });
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] !== t99) {
852
- t101 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
853
- t99,
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 = $[149];
850
+ t101 = $[148];
860
851
  }
861
852
  let t102;
862
- if ($[150] !== t101 || $[151] !== t54 || $[152] !== t62 || $[153] !== t74 || $[154] !== t81 || $[155] !== t84 || $[156] !== t91 || $[157] !== t96) {
863
- t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
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
- t91,
870
- t96,
871
- t101
907
+ t90,
908
+ t97,
909
+ t102,
910
+ t107
872
911
  ] });
873
- $[150] = t101;
874
- $[151] = t54;
875
- $[152] = t62;
876
- $[153] = t74;
877
- $[154] = t81;
878
- $[155] = t84;
879
- $[156] = t91;
880
- $[157] = t96;
881
- $[158] = t102;
882
- } else {
883
- t102 = $[158];
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 t103;
886
- if ($[159] !== advancedPanelExpanded || $[160] !== t102) {
887
- t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t102 });
888
- $[159] = advancedPanelExpanded;
889
- $[160] = t102;
890
- $[161] = t103;
891
- } else {
892
- t103 = $[161];
893
- }
894
- let t104;
895
- if ($[162] !== children || $[163] !== t103) {
896
- t104 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
897
- t103,
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
- $[162] = children;
901
- $[163] = t103;
902
- $[164] = t104;
940
+ $[172] = children;
941
+ $[173] = t109;
942
+ $[174] = t110;
903
943
  } else {
904
- t104 = $[164];
944
+ t110 = $[174];
905
945
  }
906
- let t105;
907
- if ($[165] !== t104 || $[166] !== t27 || $[167] !== t36 || $[168] !== t37 || $[169] !== t40 || $[170] !== t46) {
908
- t105 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
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
- t104
954
+ t110
915
955
  ] });
916
- $[165] = t104;
917
- $[166] = t27;
918
- $[167] = t36;
919
- $[168] = t37;
920
- $[169] = t40;
921
- $[170] = t46;
922
- $[171] = t105;
923
- } else {
924
- t105 = $[171];
925
- }
926
- let t106;
927
- if ($[172] === Symbol.for("react.memo_cache_sentinel")) {
928
- t106 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
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
- $[172] = t106;
971
+ $[182] = t112;
932
972
  } else {
933
- t106 = $[172];
973
+ t112 = $[182];
934
974
  }
935
- let t107;
936
- if ($[173] !== setFieldValue) {
937
- t107 = (icon) => {
975
+ let t113;
976
+ if ($[183] !== setFieldValue) {
977
+ t113 = (icon) => {
938
978
  setIconDialogOpen(false);
939
979
  setFieldValue("icon", icon);
940
980
  };
941
- $[173] = setFieldValue;
942
- $[174] = t107;
981
+ $[183] = setFieldValue;
982
+ $[184] = t113;
943
983
  } else {
944
- t107 = $[174];
984
+ t113 = $[184];
945
985
  }
946
- let t108;
947
- if ($[175] !== t107 || $[176] !== values.icon) {
948
- t108 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t107 }) });
949
- $[175] = t107;
950
- $[176] = values.icon;
951
- $[177] = t108;
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
- t108 = $[177];
993
+ t114 = $[187];
954
994
  }
955
- let t109;
956
- if ($[178] !== iconDialogOpen || $[179] !== t108) {
957
- t109 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t108 });
958
- $[178] = iconDialogOpen;
959
- $[179] = t108;
960
- $[180] = t109;
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
- t109 = $[180];
1002
+ t115 = $[190];
963
1003
  }
964
- let t110;
965
- if ($[181] !== T0 || $[182] !== t105 || $[183] !== t109 || $[184] !== t18) {
966
- t110 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
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
- t105,
969
- t106,
970
- t109
1008
+ t111,
1009
+ t112,
1010
+ t115
971
1011
  ] }) });
972
- $[181] = T0;
973
- $[182] = t105;
974
- $[183] = t109;
975
- $[184] = t18;
976
- $[185] = t110;
1012
+ $[191] = T0;
1013
+ $[192] = t111;
1014
+ $[193] = t115;
1015
+ $[194] = t18;
1016
+ $[195] = t116;
977
1017
  } else {
978
- t110 = $[185];
1018
+ t116 = $[195];
979
1019
  }
980
- return t110;
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(26);
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] !== namespace || $[4] !== onPropertyMove || $[5] !== propertiesOrder) {
2768
- t2 = (result) => {
2769
- if (!result.destination) {
2770
- return;
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] = namespace;
2782
- $[4] = onPropertyMove;
2783
- $[5] = propertiesOrder;
2784
- $[6] = t2;
2813
+ $[3] = t2;
2785
2814
  } else {
2786
- t2 = $[6];
2815
+ t2 = $[3];
2787
2816
  }
2788
- const onDragEnd = t2;
2789
- const t3 = `droppable_${namespace}`;
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 ($[7] !== additionalFields || $[8] !== className || $[9] !== collectionEditable || $[10] !== errors || $[11] !== inferredPropertyKeys || $[12] !== namespace || $[13] !== onPropertyClick || $[14] !== onPropertyMove || $[15] !== onPropertyRemove || $[16] !== properties || $[17] !== propertiesOrder || $[18] !== selectedPropertyKey) {
2792
- t4 = (droppableProvided, droppableSnapshot) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ...droppableProvided.droppableProps, ref: droppableProvided.innerRef, className, children: [
2793
- propertiesOrder && propertiesOrder.map((propertyKey, index) => {
2794
- const property = properties[propertyKey];
2795
- const additionalField = additionalFields?.find((field) => field.key === propertyKey);
2796
- if (!property && !additionalField) {
2797
- console.warn(`Property ${propertyKey} not found in properties or additionalFields`);
2798
- return null;
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
- return /* @__PURE__ */ jsxRuntime.jsx(dnd.Draggable, { draggableId: `array_field_${namespace}_${propertyKey}}`, index, children: (provided, snapshot) => /* @__PURE__ */ jsxRuntime.jsx(core.ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyTreeEntry, { propertyKey, propertyOrBuilder: property, additionalField, provided, errors, namespace, inferredPropertyKeys, onPropertyMove, onPropertyRemove, onPropertyClick: snapshot.isDragging ? void 0 : onPropertyClick, selectedPropertyKey, collectionEditable }) }) }, `array_field_${namespace}_${propertyKey}}`);
2801
- }).filter(Boolean),
2802
- droppableProvided.placeholder
2803
- ] });
2804
- $[7] = additionalFields;
2805
- $[8] = className;
2806
- $[9] = collectionEditable;
2807
- $[10] = errors;
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 ($[20] !== t3 || $[21] !== t4) {
2822
- t5 = /* @__PURE__ */ jsxRuntime.jsx(dnd.Droppable, { droppableId: t3, children: t4 });
2823
- $[20] = t3;
2824
- $[21] = t4;
2825
- $[22] = t5;
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 = $[22];
2878
+ t5 = $[11];
2828
2879
  }
2880
+ const items = t5;
2829
2881
  let t6;
2830
- if ($[23] !== onDragEnd || $[24] !== t5) {
2831
- t6 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(dnd.DragDropContext, { onDragEnd, children: t5 }) });
2832
- $[23] = onDragEnd;
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 = $[25];
2886
+ t6 = $[14];
2837
2887
  }
2838
- return t6;
2839
- }, (prevProps, nextProps) => {
2840
- const isSelected = nextProps.selectedPropertyKey?.startsWith(nextProps.namespace ?? "");
2841
- const wasSelected = prevProps.selectedPropertyKey?.startsWith(prevProps.namespace ?? "");
2842
- if (isSelected || wasSelected) return false;
2843
- return equal(prevProps.properties, nextProps.properties) && prevProps.propertiesOrder === nextProps.propertiesOrder && equal(prevProps.additionalFields, nextProps.additionalFields) && equal(prevProps.errors, nextProps.errors) && equal(prevProps.onPropertyClick, nextProps.onPropertyClick) && // equal(prevProps.onPropertyMove, nextProps.onPropertyMove) &&
2844
- // equal(prevProps.onPropertyRemove, nextProps.onPropertyRemove) &&
2845
- prevProps.namespace === nextProps.namespace && prevProps.collectionEditable === nextProps.collectionEditable;
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(53);
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] !== inferredPropertyKeys || $[1] !== namespace || $[2] !== propertyKey) {
2865
- t1 = inferredPropertyKeys?.includes(namespace ? `${namespace}.${propertyKey}` : propertyKey);
2866
- $[0] = inferredPropertyKeys;
2867
- $[1] = namespace;
2868
- $[2] = propertyKey;
2869
- $[3] = t1;
2962
+ if ($[0] !== id) {
2963
+ t1 = {
2964
+ id
2965
+ };
2966
+ $[0] = id;
2967
+ $[1] = t1;
2870
2968
  } else {
2871
- t1 = $[3];
2969
+ t1 = $[1];
2872
2970
  }
2873
- const isPropertyInferred = t1;
2971
+ const {
2972
+ attributes,
2973
+ listeners,
2974
+ setNodeRef,
2975
+ transform,
2976
+ transition,
2977
+ isDragging
2978
+ } = sortable.useSortable(t1);
2874
2979
  let t2;
2875
- if ($[4] !== namespace || $[5] !== propertyKey) {
2876
- t2 = getFullId(propertyKey, namespace);
2877
- $[4] = namespace;
2878
- $[5] = propertyKey;
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 = $[6];
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 fullId = t2;
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 t32;
2891
- if ($[7] !== collectionEditable || $[8] !== errors || $[9] !== fullId || $[10] !== onPropertyClick || $[11] !== onPropertyMove || $[12] !== onPropertyRemove || $[13] !== property.properties || $[14] !== property.propertiesOrder || $[15] !== selectedPropertyKey) {
2892
- t32 = /* @__PURE__ */ jsxRuntime.jsx(PropertyTree, { selectedPropertyKey, namespace: fullId, properties: property.properties, propertiesOrder: property.propertiesOrder, errors, onPropertyClick, onPropertyMove, onPropertyRemove, collectionEditable });
2893
- $[7] = collectionEditable;
2894
- $[8] = errors;
2895
- $[9] = fullId;
2896
- $[10] = onPropertyClick;
2897
- $[11] = onPropertyMove;
2898
- $[12] = onPropertyRemove;
2899
- $[13] = property.properties;
2900
- $[14] = property.propertiesOrder;
2901
- $[15] = selectedPropertyKey;
2902
- $[16] = t32;
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
- t32 = $[16];
3036
+ t62 = $[21];
2905
3037
  }
2906
- subtree = t32;
3038
+ subtree = t62;
2907
3039
  }
2908
3040
  }
2909
3041
  const selected = selectedPropertyKey === fullId;
2910
- let t3;
2911
- if ($[17] !== collectionEditable || $[18] !== propertyOrBuilder) {
2912
- t3 = propertyOrBuilder && (collectionEditable && !core.isPropertyBuilder(propertyOrBuilder) || editableProperty(propertyOrBuilder));
2913
- $[17] = collectionEditable;
2914
- $[18] = propertyOrBuilder;
2915
- $[19] = t3;
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
- t3 = $[19];
3049
+ t6 = $[24];
2918
3050
  }
2919
- const editable = t3;
2920
- let t4;
2921
- if ($[20] !== subtree) {
2922
- t4 = subtree && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute border-l " + ui.defaultBorderMixin, style: {
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
- $[20] = subtree;
2928
- $[21] = t4;
3059
+ $[25] = subtree;
3060
+ $[26] = t7;
2929
3061
  } else {
2930
- t4 = $[21];
3062
+ t7 = $[26];
2931
3063
  }
2932
- let t5;
2933
- if ($[22] !== additionalField || $[23] !== editable || $[24] !== hasError || $[25] !== namespace || $[26] !== onPropertyClick || $[27] !== propertyKey || $[28] !== propertyOrBuilder || $[29] !== selected) {
2934
- t5 = !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 });
2935
- $[22] = additionalField;
2936
- $[23] = editable;
2937
- $[24] = hasError;
2938
- $[25] = namespace;
2939
- $[26] = onPropertyClick;
2940
- $[27] = propertyKey;
2941
- $[28] = propertyOrBuilder;
2942
- $[29] = selected;
2943
- $[30] = t5;
2944
- } else {
2945
- t5 = $[30];
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 t6;
2948
- if ($[31] !== isPropertyInferred) {
2949
- t6 = isPropertyInferred && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsxRuntime.jsx(ui.AutorenewIcon, { size: "small", className: "p-2" }) });
2950
- $[31] = isPropertyInferred;
2951
- $[32] = t6;
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
- t6 = $[32];
3085
+ t9 = $[37];
2954
3086
  }
2955
- let t7;
2956
- if ($[33] !== namespace || $[34] !== onPropertyRemove || $[35] !== propertyKey) {
2957
- t7 = onPropertyRemove && /* @__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" }) }) });
2958
- $[33] = namespace;
2959
- $[34] = onPropertyRemove;
2960
- $[35] = propertyKey;
2961
- $[36] = t7;
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
- t7 = $[36];
3096
+ t10 = $[42];
2964
3097
  }
2965
- let t8;
2966
- if ($[37] !== onPropertyMove) {
2967
- t8 = onPropertyMove && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Move", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { component: "span", size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DragHandleIcon, { size: "small" }) }) });
2968
- $[37] = onPropertyMove;
2969
- $[38] = t8;
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
- t8 = $[38];
3106
+ t11 = $[46];
2972
3107
  }
2973
- let t9;
2974
- if ($[39] !== t6 || $[40] !== t7 || $[41] !== t8) {
2975
- t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-2 right-2 flex flex-row ", children: [
2976
- t6,
2977
- t7,
2978
- t8
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
- $[39] = t6;
2981
- $[40] = t7;
2982
- $[41] = t8;
2983
- $[42] = t9;
3115
+ $[47] = t10;
3116
+ $[48] = t11;
3117
+ $[49] = t9;
3118
+ $[50] = t12;
2984
3119
  } else {
2985
- t9 = $[42];
3120
+ t12 = $[50];
2986
3121
  }
2987
- let t10;
2988
- if ($[43] !== subtree) {
2989
- t10 = subtree && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-16", children: subtree });
2990
- $[43] = subtree;
2991
- $[44] = t10;
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
- t10 = $[44];
3128
+ t13 = $[52];
2994
3129
  }
2995
- let t11;
2996
- if ($[45] !== provided.dragHandleProps || $[46] !== provided.draggableProps || $[47] !== provided.innerRef || $[48] !== t10 || $[49] !== t4 || $[50] !== t5 || $[51] !== t9) {
2997
- t11 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, className: "relative -ml-8", children: [
2998
- t4,
2999
- t5,
3000
- t9,
3001
- t10
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
- $[45] = provided.dragHandleProps;
3004
- $[46] = provided.draggableProps;
3005
- $[47] = provided.innerRef;
3006
- $[48] = t10;
3007
- $[49] = t4;
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
- t11 = $[52];
3144
+ t14 = $[57];
3013
3145
  }
3014
- return t11;
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: "small", label: "Spread children as columns", onValueChange: t18, value: t19 });
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;