@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 CHANGED
@@ -4,11 +4,14 @@ import { FieldCaption, SearchIconsView, toSnakeCase, singular, IconForView, Arra
4
4
  import * as React from "react";
5
5
  import React__default, { useContext, useState, useEffect, useMemo, useRef, useDeferredValue } from "react";
6
6
  import equal from "react-fast-compare";
7
- import { cls, Typography, VerticalSplitIcon, Tooltip, Card, SquareIcon, useAutoComplete, Chip, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, IconButton, DebouncedTextField, BooleanSwitchWithLabel, SettingsIcon, CloseIcon, Select, ExpandablePanel, Dialog, Badge, AutorenewIcon, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, RuleIcon, MultiSelectItem, CloudUploadIcon, MultiSelect, cardMixin, cardClickableMixin, cardSelectedMixin, FunctionsIcon, DoNotDisturbOnIcon, defaultBorderMixin, RemoveIcon, DragHandleIcon, AddIcon, SelectGroup, DeleteIcon, InfoLabel, fieldBackgroundMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, WarningIcon, ContentCopyIcon, CodeIcon, Table, TableBody, TableRow, TableCell, Alert, Icon, coolIconKeys, Tabs, Tab, ArrowBackIcon, LoadingButton, CheckIcon, Menu, MoreVertIcon, MenuItem, UndoIcon, SaveIcon } from "@firecms/ui";
7
+ import { cls, Typography, VerticalSplitIcon, Tooltip, Card, SquareIcon, useAutoComplete, Chip, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, IconButton, DebouncedTextField, BooleanSwitchWithLabel, SettingsIcon, CloseIcon, Select, ExpandablePanel, Dialog, Badge, AutorenewIcon, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, RuleIcon, MultiSelectItem, CloudUploadIcon, MultiSelect, cardMixin, cardClickableMixin, cardSelectedMixin, FunctionsIcon, DoNotDisturbOnIcon, DragHandleIcon, defaultBorderMixin, RemoveIcon, AddIcon, SelectGroup, DeleteIcon, InfoLabel, fieldBackgroundMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, WarningIcon, ContentCopyIcon, CodeIcon, Table, TableBody, TableRow, TableCell, Alert, Icon, coolIconKeys, Tabs, Tab, ArrowBackIcon, LoadingButton, CheckIcon, Menu, MoreVertIcon, MenuItem, UndoIcon, SaveIcon } from "@firecms/ui";
8
8
  import * as Yup from "yup";
9
9
  import { useFormex, getIn, Field, useCreateFormex, Formex, clone } from "@firecms/formex";
10
10
  import { extractEnumFromValues, buildPropertyFromData, buildEntityPropertiesFromData } from "@firecms/schema_inference";
11
- import { Draggable, Droppable, DragDropContext } from "@hello-pangea/dnd";
11
+ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from "@dnd-kit/core";
12
+ import { useSortable, sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
13
+ import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
14
+ import { CSS } from "@dnd-kit/utilities";
12
15
  import JSON5 from "json5";
13
16
  import { Highlight, themes } from "prism-react-renderer";
14
17
  import { ImportFileUpload, getInferenceType, ImportNewPropertyFieldPreview, DataNewPropertiesMapping, convertDataToEntity, useImportConfig, ImportSaveInProgress } from "@firecms/data_import_export";
@@ -162,7 +165,7 @@ function LayoutModeSwitch(t0) {
162
165
  return t18;
163
166
  }
164
167
  function CollectionDetailsForm(t0) {
165
- const $ = c(186);
168
+ const $ = c(196);
166
169
  const {
167
170
  isNewCollection,
168
171
  reservedGroups,
@@ -444,7 +447,7 @@ function CollectionDetailsForm(t0) {
444
447
  }
445
448
  const t37 = !isSubcollection && /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-4 relative", children: [
446
449
  /* @__PURE__ */ jsx(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" }),
447
- /* @__PURE__ */ jsx(Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsx(AutocompleteItem, { onClick: () => {
450
+ /* @__PURE__ */ jsx(Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsx(AutocompleteItem, { className: "pr-6 pl-14", onClick: () => {
448
451
  setAutoCompleteOpen(false);
449
452
  setFieldValue("group", group_0 ?? null);
450
453
  }, children: /* @__PURE__ */ jsx("div", { className: "flex-grow", children: group_0 }) }, index + "_" + group_0)) }),
@@ -468,7 +471,7 @@ function CollectionDetailsForm(t0) {
468
471
  } else {
469
472
  t40 = $[58];
470
473
  }
471
- const t41 = values.history === null ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
474
+ 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";
472
475
  let t42;
473
476
  if ($[59] !== setFieldValue) {
474
477
  t42 = (v) => setFieldValue("history", v);
@@ -477,7 +480,7 @@ function CollectionDetailsForm(t0) {
477
480
  } else {
478
481
  t42 = $[60];
479
482
  }
480
- const t43 = values.history ?? null;
483
+ const t43 = values.history === void 0 ? null : values.history;
481
484
  let t44;
482
485
  if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
483
486
  t44 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
@@ -735,242 +738,282 @@ function CollectionDetailsForm(t0) {
735
738
  } else {
736
739
  t84 = $[124];
737
740
  }
738
- const t85 = customIdValue === "code_defined";
741
+ const t85 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
739
742
  let t86;
740
743
  if ($[125] !== setFieldValue) {
741
- t86 = (v_0) => {
742
- if (v_0 === "code_defined") {
743
- throw new Error("This should not happen");
744
- }
745
- setFieldValue("customId", v_0);
746
- };
744
+ t86 = (v_0) => setFieldValue("includeJsonView", v_0);
747
745
  $[125] = setFieldValue;
748
746
  $[126] = t86;
749
747
  } else {
750
748
  t86 = $[126];
751
749
  }
752
- const t87 = customIdValue ?? "";
750
+ const t87 = values.includeJsonView === void 0 ? true : values.includeJsonView;
753
751
  let t88;
752
+ if ($[127] !== t85 || $[128] !== t86 || $[129] !== t87) {
753
+ t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: t85, onValueChange: t86, value: t87 });
754
+ $[127] = t85;
755
+ $[128] = t86;
756
+ $[129] = t87;
757
+ $[130] = t88;
758
+ } else {
759
+ t88 = $[130];
760
+ }
754
761
  let t89;
762
+ if ($[131] === Symbol.for("react.memo_cache_sentinel")) {
763
+ t89 = /* @__PURE__ */ jsx(FieldCaption, { children: "Include the JSON representation of the document." });
764
+ $[131] = t89;
765
+ } else {
766
+ t89 = $[131];
767
+ }
755
768
  let t90;
756
- if ($[127] === Symbol.for("react.memo_cache_sentinel")) {
757
- t88 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
758
- t89 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
759
- t90 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
760
- $[127] = t88;
761
- $[128] = t89;
762
- $[129] = t90;
763
- } else {
764
- t88 = $[127];
765
- t89 = $[128];
766
- t90 = $[129];
767
- }
768
- let t91;
769
- if ($[130] !== t85 || $[131] !== t86 || $[132] !== t87) {
770
- t91 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t85, onValueChange: t86, value: t87, renderValue: _temp3$4, children: [
769
+ if ($[132] !== t88) {
770
+ t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
771
771
  t88,
772
- t89,
773
- t90
774
- ] }) });
775
- $[130] = t85;
776
- $[131] = t86;
777
- $[132] = t87;
778
- $[133] = t91;
772
+ t89
773
+ ] });
774
+ $[132] = t88;
775
+ $[133] = t90;
779
776
  } else {
780
- t91 = $[133];
777
+ t90 = $[133];
781
778
  }
779
+ const t91 = customIdValue === "code_defined";
782
780
  let t92;
783
781
  if ($[134] !== setFieldValue) {
784
- t92 = (v_1) => setFieldValue("collectionGroup", v_1);
782
+ t92 = (v_1) => {
783
+ if (v_1 === "code_defined") {
784
+ throw new Error("This should not happen");
785
+ }
786
+ setFieldValue("customId", v_1);
787
+ };
785
788
  $[134] = setFieldValue;
786
789
  $[135] = t92;
787
790
  } else {
788
791
  t92 = $[135];
789
792
  }
790
- const t93 = values.collectionGroup ?? false;
793
+ const t93 = customIdValue ?? "";
791
794
  let t94;
792
- if ($[136] !== t92 || $[137] !== t93) {
793
- t94 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
794
- $[136] = t92;
795
- $[137] = t93;
796
- $[138] = t94;
797
- } else {
798
- t94 = $[138];
799
- }
800
795
  let t95;
801
- if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
802
- t95 = /* @__PURE__ */ jsx(FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
803
- $[139] = t95;
804
- } else {
805
- t95 = $[139];
806
- }
807
796
  let t96;
808
- if ($[140] !== t94) {
809
- t96 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
797
+ if ($[136] === Symbol.for("react.memo_cache_sentinel")) {
798
+ t94 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
799
+ t95 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
800
+ t96 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
801
+ $[136] = t94;
802
+ $[137] = t95;
803
+ $[138] = t96;
804
+ } else {
805
+ t94 = $[136];
806
+ t95 = $[137];
807
+ t96 = $[138];
808
+ }
809
+ let t97;
810
+ if ($[139] !== t91 || $[140] !== t92 || $[141] !== t93) {
811
+ t97 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t91, onValueChange: t92, value: t93, renderValue: _temp3$4, children: [
810
812
  t94,
811
- t95
812
- ] });
813
- $[140] = t94;
814
- $[141] = t96;
813
+ t95,
814
+ t96
815
+ ] }) });
816
+ $[139] = t91;
817
+ $[140] = t92;
818
+ $[141] = t93;
819
+ $[142] = t97;
815
820
  } else {
816
- t96 = $[141];
821
+ t97 = $[142];
817
822
  }
818
- let t97;
819
- if ($[142] !== setFieldValue) {
820
- t97 = (v_2) => setFieldValue("textSearchEnabled", v_2);
821
- $[142] = setFieldValue;
822
- $[143] = t97;
823
- } else {
824
- t97 = $[143];
825
- }
826
- const t98 = values.textSearchEnabled ?? false;
827
- let t99;
828
- if ($[144] !== t97 || $[145] !== t98) {
829
- t99 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
830
- $[144] = t97;
831
- $[145] = t98;
832
- $[146] = t99;
823
+ let t98;
824
+ if ($[143] !== setFieldValue) {
825
+ t98 = (v_2) => setFieldValue("collectionGroup", v_2);
826
+ $[143] = setFieldValue;
827
+ $[144] = t98;
833
828
  } else {
834
- t99 = $[146];
829
+ t98 = $[144];
835
830
  }
831
+ const t99 = values.collectionGroup ?? false;
836
832
  let t100;
837
- if ($[147] === Symbol.for("react.memo_cache_sentinel")) {
838
- t100 = /* @__PURE__ */ jsx(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." });
833
+ if ($[145] !== t98 || $[146] !== t99) {
834
+ t100 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t98, value: t99 });
835
+ $[145] = t98;
836
+ $[146] = t99;
839
837
  $[147] = t100;
840
838
  } else {
841
839
  t100 = $[147];
842
840
  }
843
841
  let t101;
844
- if ($[148] !== t99) {
845
- t101 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
846
- t99,
847
- t100
848
- ] });
849
- $[148] = t99;
850
- $[149] = t101;
842
+ if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
843
+ t101 = /* @__PURE__ */ jsx(FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
844
+ $[148] = t101;
851
845
  } else {
852
- t101 = $[149];
846
+ t101 = $[148];
853
847
  }
854
848
  let t102;
855
- if ($[150] !== t101 || $[151] !== t54 || $[152] !== t62 || $[153] !== t74 || $[154] !== t81 || $[155] !== t84 || $[156] !== t91 || $[157] !== t96) {
856
- t102 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
849
+ if ($[149] !== t100) {
850
+ t102 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
851
+ t100,
852
+ t101
853
+ ] });
854
+ $[149] = t100;
855
+ $[150] = t102;
856
+ } else {
857
+ t102 = $[150];
858
+ }
859
+ let t103;
860
+ if ($[151] !== setFieldValue) {
861
+ t103 = (v_3) => setFieldValue("textSearchEnabled", v_3);
862
+ $[151] = setFieldValue;
863
+ $[152] = t103;
864
+ } else {
865
+ t103 = $[152];
866
+ }
867
+ const t104 = values.textSearchEnabled ?? false;
868
+ let t105;
869
+ if ($[153] !== t103 || $[154] !== t104) {
870
+ t105 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t103, value: t104 });
871
+ $[153] = t103;
872
+ $[154] = t104;
873
+ $[155] = t105;
874
+ } else {
875
+ t105 = $[155];
876
+ }
877
+ let t106;
878
+ if ($[156] === Symbol.for("react.memo_cache_sentinel")) {
879
+ t106 = /* @__PURE__ */ jsx(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." });
880
+ $[156] = t106;
881
+ } else {
882
+ t106 = $[156];
883
+ }
884
+ let t107;
885
+ if ($[157] !== t105) {
886
+ t107 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
887
+ t105,
888
+ t106
889
+ ] });
890
+ $[157] = t105;
891
+ $[158] = t107;
892
+ } else {
893
+ t107 = $[158];
894
+ }
895
+ let t108;
896
+ if ($[159] !== t102 || $[160] !== t107 || $[161] !== t54 || $[162] !== t62 || $[163] !== t74 || $[164] !== t81 || $[165] !== t84 || $[166] !== t90 || $[167] !== t97) {
897
+ t108 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
857
898
  t54,
858
899
  t62,
859
900
  t74,
860
901
  t81,
861
902
  t84,
862
- t91,
863
- t96,
864
- t101
903
+ t90,
904
+ t97,
905
+ t102,
906
+ t107
865
907
  ] });
866
- $[150] = t101;
867
- $[151] = t54;
868
- $[152] = t62;
869
- $[153] = t74;
870
- $[154] = t81;
871
- $[155] = t84;
872
- $[156] = t91;
873
- $[157] = t96;
874
- $[158] = t102;
875
- } else {
876
- t102 = $[158];
908
+ $[159] = t102;
909
+ $[160] = t107;
910
+ $[161] = t54;
911
+ $[162] = t62;
912
+ $[163] = t74;
913
+ $[164] = t81;
914
+ $[165] = t84;
915
+ $[166] = t90;
916
+ $[167] = t97;
917
+ $[168] = t108;
918
+ } else {
919
+ t108 = $[168];
877
920
  }
878
- let t103;
879
- if ($[159] !== advancedPanelExpanded || $[160] !== t102) {
880
- t103 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t102 });
881
- $[159] = advancedPanelExpanded;
882
- $[160] = t102;
883
- $[161] = t103;
884
- } else {
885
- t103 = $[161];
886
- }
887
- let t104;
888
- if ($[162] !== children || $[163] !== t103) {
889
- t104 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
890
- t103,
921
+ let t109;
922
+ if ($[169] !== advancedPanelExpanded || $[170] !== t108) {
923
+ t109 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t108 });
924
+ $[169] = advancedPanelExpanded;
925
+ $[170] = t108;
926
+ $[171] = t109;
927
+ } else {
928
+ t109 = $[171];
929
+ }
930
+ let t110;
931
+ if ($[172] !== children || $[173] !== t109) {
932
+ t110 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
933
+ t109,
891
934
  children
892
935
  ] });
893
- $[162] = children;
894
- $[163] = t103;
895
- $[164] = t104;
936
+ $[172] = children;
937
+ $[173] = t109;
938
+ $[174] = t110;
896
939
  } else {
897
- t104 = $[164];
940
+ t110 = $[174];
898
941
  }
899
- let t105;
900
- if ($[165] !== t104 || $[166] !== t27 || $[167] !== t36 || $[168] !== t37 || $[169] !== t40 || $[170] !== t46) {
901
- t105 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
942
+ let t111;
943
+ if ($[175] !== t110 || $[176] !== t27 || $[177] !== t36 || $[178] !== t37 || $[179] !== t40 || $[180] !== t46) {
944
+ t111 = /* @__PURE__ */ jsxs("div", { className: t19, children: [
902
945
  t27,
903
946
  t36,
904
947
  t37,
905
948
  t40,
906
949
  t46,
907
- t104
950
+ t110
908
951
  ] });
909
- $[165] = t104;
910
- $[166] = t27;
911
- $[167] = t36;
912
- $[168] = t37;
913
- $[169] = t40;
914
- $[170] = t46;
915
- $[171] = t105;
916
- } else {
917
- t105 = $[171];
918
- }
919
- let t106;
920
- if ($[172] === Symbol.for("react.memo_cache_sentinel")) {
921
- t106 = /* @__PURE__ */ jsx("div", { style: {
952
+ $[175] = t110;
953
+ $[176] = t27;
954
+ $[177] = t36;
955
+ $[178] = t37;
956
+ $[179] = t40;
957
+ $[180] = t46;
958
+ $[181] = t111;
959
+ } else {
960
+ t111 = $[181];
961
+ }
962
+ let t112;
963
+ if ($[182] === Symbol.for("react.memo_cache_sentinel")) {
964
+ t112 = /* @__PURE__ */ jsx("div", { style: {
922
965
  height: "52px"
923
966
  } });
924
- $[172] = t106;
967
+ $[182] = t112;
925
968
  } else {
926
- t106 = $[172];
969
+ t112 = $[182];
927
970
  }
928
- let t107;
929
- if ($[173] !== setFieldValue) {
930
- t107 = (icon) => {
971
+ let t113;
972
+ if ($[183] !== setFieldValue) {
973
+ t113 = (icon) => {
931
974
  setIconDialogOpen(false);
932
975
  setFieldValue("icon", icon);
933
976
  };
934
- $[173] = setFieldValue;
935
- $[174] = t107;
977
+ $[183] = setFieldValue;
978
+ $[184] = t113;
936
979
  } else {
937
- t107 = $[174];
980
+ t113 = $[184];
938
981
  }
939
- let t108;
940
- if ($[175] !== t107 || $[176] !== values.icon) {
941
- t108 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t107 }) });
942
- $[175] = t107;
943
- $[176] = values.icon;
944
- $[177] = t108;
982
+ let t114;
983
+ if ($[185] !== t113 || $[186] !== values.icon) {
984
+ t114 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t113 }) });
985
+ $[185] = t113;
986
+ $[186] = values.icon;
987
+ $[187] = t114;
945
988
  } else {
946
- t108 = $[177];
989
+ t114 = $[187];
947
990
  }
948
- let t109;
949
- if ($[178] !== iconDialogOpen || $[179] !== t108) {
950
- t109 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t108 });
951
- $[178] = iconDialogOpen;
952
- $[179] = t108;
953
- $[180] = t109;
991
+ let t115;
992
+ if ($[188] !== iconDialogOpen || $[189] !== t114) {
993
+ t115 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t114 });
994
+ $[188] = iconDialogOpen;
995
+ $[189] = t114;
996
+ $[190] = t115;
954
997
  } else {
955
- t109 = $[180];
998
+ t115 = $[190];
956
999
  }
957
- let t110;
958
- if ($[181] !== T0 || $[182] !== t105 || $[183] !== t109 || $[184] !== t18) {
959
- t110 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
1000
+ let t116;
1001
+ if ($[191] !== T0 || $[192] !== t111 || $[193] !== t115 || $[194] !== t18) {
1002
+ t116 = /* @__PURE__ */ jsx("div", { className: t7, children: /* @__PURE__ */ jsxs(T0, { maxWidth: t8, className: t9, children: [
960
1003
  t18,
961
- t105,
962
- t106,
963
- t109
1004
+ t111,
1005
+ t112,
1006
+ t115
964
1007
  ] }) });
965
- $[181] = T0;
966
- $[182] = t105;
967
- $[183] = t109;
968
- $[184] = t18;
969
- $[185] = t110;
1008
+ $[191] = T0;
1009
+ $[192] = t111;
1010
+ $[193] = t115;
1011
+ $[194] = t18;
1012
+ $[195] = t116;
970
1013
  } else {
971
- t110 = $[185];
1014
+ t116 = $[195];
972
1015
  }
973
- return t110;
1016
+ return t116;
974
1017
  }
975
1018
  function _temp3$4(value_3) {
976
1019
  if (value_3 === "code_defined") {
@@ -2731,7 +2774,7 @@ function NonEditablePropertyPreview(t0) {
2731
2774
  return t19;
2732
2775
  }
2733
2776
  const PropertyTree = React__default.memo(function PropertyTree2(t0) {
2734
- const $ = c(26);
2777
+ const $ = c(37);
2735
2778
  const {
2736
2779
  namespace,
2737
2780
  selectedPropertyKey,
@@ -2757,94 +2800,152 @@ const PropertyTree = React__default.memo(function PropertyTree2(t0) {
2757
2800
  }
2758
2801
  const propertiesOrder = t1;
2759
2802
  let t2;
2760
- if ($[3] !== namespace || $[4] !== onPropertyMove || $[5] !== propertiesOrder) {
2761
- t2 = (result) => {
2762
- if (!result.destination) {
2763
- return;
2764
- }
2765
- const startIndex = result.source.index;
2766
- const endIndex = result.destination.index;
2767
- const newPropertiesOrder = Array.from(propertiesOrder);
2768
- const [removed] = newPropertiesOrder.splice(startIndex, 1);
2769
- newPropertiesOrder.splice(endIndex, 0, removed);
2770
- if (onPropertyMove) {
2771
- onPropertyMove(newPropertiesOrder, namespace);
2803
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
2804
+ t2 = {
2805
+ activationConstraint: {
2806
+ distance: 5
2772
2807
  }
2773
2808
  };
2774
- $[3] = namespace;
2775
- $[4] = onPropertyMove;
2776
- $[5] = propertiesOrder;
2777
- $[6] = t2;
2809
+ $[3] = t2;
2778
2810
  } else {
2779
- t2 = $[6];
2811
+ t2 = $[3];
2780
2812
  }
2781
- const onDragEnd = t2;
2782
- const t3 = `droppable_${namespace}`;
2813
+ let t3;
2814
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
2815
+ t3 = {
2816
+ coordinateGetter: sortableKeyboardCoordinates
2817
+ };
2818
+ $[4] = t3;
2819
+ } else {
2820
+ t3 = $[4];
2821
+ }
2822
+ const sensors = useSensors(useSensor(PointerSensor, t2), useSensor(KeyboardSensor, t3));
2783
2823
  let t4;
2784
- 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) {
2785
- t4 = (droppableProvided, droppableSnapshot) => /* @__PURE__ */ jsxs("div", { ...droppableProvided.droppableProps, ref: droppableProvided.innerRef, className, children: [
2786
- propertiesOrder && propertiesOrder.map((propertyKey, index) => {
2787
- const property = properties[propertyKey];
2788
- const additionalField = additionalFields?.find((field) => field.key === propertyKey);
2789
- if (!property && !additionalField) {
2790
- console.warn(`Property ${propertyKey} not found in properties or additionalFields`);
2791
- return null;
2824
+ if ($[5] !== namespace || $[6] !== onPropertyMove || $[7] !== propertiesOrder) {
2825
+ t4 = (event) => {
2826
+ const {
2827
+ active,
2828
+ over
2829
+ } = event;
2830
+ if (!over || active.id === over.id) {
2831
+ return;
2832
+ }
2833
+ const activeId = String(active.id);
2834
+ const overId = String(over.id);
2835
+ const activeKey = activeId.includes(".") ? activeId.split(".").pop() : activeId;
2836
+ const overKey = overId.includes(".") ? overId.split(".").pop() : overId;
2837
+ if (!activeKey || !overKey) {
2838
+ return;
2839
+ }
2840
+ const oldIndex = propertiesOrder.indexOf(activeKey);
2841
+ const newIndex = propertiesOrder.indexOf(overKey);
2842
+ if (oldIndex !== -1 && newIndex !== -1) {
2843
+ const newPropertiesOrder = [...propertiesOrder];
2844
+ const [removed] = newPropertiesOrder.splice(oldIndex, 1);
2845
+ newPropertiesOrder.splice(newIndex, 0, removed);
2846
+ if (onPropertyMove) {
2847
+ onPropertyMove(newPropertiesOrder, namespace);
2792
2848
  }
2793
- return /* @__PURE__ */ jsx(Draggable, { draggableId: `array_field_${namespace}_${propertyKey}}`, index, children: (provided, snapshot) => /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyTreeEntry, { propertyKey, propertyOrBuilder: property, additionalField, provided, errors, namespace, inferredPropertyKeys, onPropertyMove, onPropertyRemove, onPropertyClick: snapshot.isDragging ? void 0 : onPropertyClick, selectedPropertyKey, collectionEditable }) }) }, `array_field_${namespace}_${propertyKey}}`);
2794
- }).filter(Boolean),
2795
- droppableProvided.placeholder
2796
- ] });
2797
- $[7] = additionalFields;
2798
- $[8] = className;
2799
- $[9] = collectionEditable;
2800
- $[10] = errors;
2801
- $[11] = inferredPropertyKeys;
2802
- $[12] = namespace;
2803
- $[13] = onPropertyClick;
2804
- $[14] = onPropertyMove;
2805
- $[15] = onPropertyRemove;
2806
- $[16] = properties;
2807
- $[17] = propertiesOrder;
2808
- $[18] = selectedPropertyKey;
2809
- $[19] = t4;
2810
- } else {
2811
- t4 = $[19];
2849
+ }
2850
+ };
2851
+ $[5] = namespace;
2852
+ $[6] = onPropertyMove;
2853
+ $[7] = propertiesOrder;
2854
+ $[8] = t4;
2855
+ } else {
2856
+ t4 = $[8];
2812
2857
  }
2858
+ const handleDragEnd = t4;
2813
2859
  let t5;
2814
- if ($[20] !== t3 || $[21] !== t4) {
2815
- t5 = /* @__PURE__ */ jsx(Droppable, { droppableId: t3, children: t4 });
2816
- $[20] = t3;
2817
- $[21] = t4;
2818
- $[22] = t5;
2860
+ if ($[9] !== namespace || $[10] !== propertiesOrder) {
2861
+ let t62;
2862
+ if ($[12] !== namespace) {
2863
+ t62 = (key) => getFullId(key, namespace);
2864
+ $[12] = namespace;
2865
+ $[13] = t62;
2866
+ } else {
2867
+ t62 = $[13];
2868
+ }
2869
+ t5 = propertiesOrder.map(t62);
2870
+ $[9] = namespace;
2871
+ $[10] = propertiesOrder;
2872
+ $[11] = t5;
2819
2873
  } else {
2820
- t5 = $[22];
2874
+ t5 = $[11];
2821
2875
  }
2876
+ const items = t5;
2822
2877
  let t6;
2823
- if ($[23] !== onDragEnd || $[24] !== t5) {
2824
- t6 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(DragDropContext, { onDragEnd, children: t5 }) });
2825
- $[23] = onDragEnd;
2826
- $[24] = t5;
2827
- $[25] = t6;
2878
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
2879
+ t6 = [restrictToVerticalAxis];
2880
+ $[14] = t6;
2828
2881
  } else {
2829
- t6 = $[25];
2882
+ t6 = $[14];
2830
2883
  }
2831
- return t6;
2832
- }, (prevProps, nextProps) => {
2833
- const isSelected = nextProps.selectedPropertyKey?.startsWith(nextProps.namespace ?? "");
2834
- const wasSelected = prevProps.selectedPropertyKey?.startsWith(prevProps.namespace ?? "");
2835
- if (isSelected || wasSelected) return false;
2836
- 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) &&
2837
- // equal(prevProps.onPropertyRemove, nextProps.onPropertyRemove) &&
2838
- prevProps.namespace === nextProps.namespace && prevProps.collectionEditable === nextProps.collectionEditable;
2839
- });
2884
+ let t7;
2885
+ if ($[15] !== additionalFields || $[16] !== collectionEditable || $[17] !== errors || $[18] !== inferredPropertyKeys || $[19] !== namespace || $[20] !== onPropertyClick || $[21] !== onPropertyMove || $[22] !== onPropertyRemove || $[23] !== properties || $[24] !== propertiesOrder || $[25] !== selectedPropertyKey) {
2886
+ t7 = propertiesOrder && propertiesOrder.map((propertyKey, index) => {
2887
+ const property = properties[propertyKey];
2888
+ const additionalField = additionalFields?.find((field) => field.key === propertyKey);
2889
+ if (!property && !additionalField) {
2890
+ console.warn(`Property ${propertyKey} not found in properties or additionalFields`);
2891
+ return null;
2892
+ }
2893
+ const id = getFullId(propertyKey, namespace);
2894
+ return /* @__PURE__ */ jsx(PropertyTreeEntry, { id, propertyKey, propertyOrBuilder: property, additionalField, errors, namespace, inferredPropertyKeys, onPropertyMove, onPropertyRemove, onPropertyClick, selectedPropertyKey, collectionEditable }, id);
2895
+ }).filter(Boolean);
2896
+ $[15] = additionalFields;
2897
+ $[16] = collectionEditable;
2898
+ $[17] = errors;
2899
+ $[18] = inferredPropertyKeys;
2900
+ $[19] = namespace;
2901
+ $[20] = onPropertyClick;
2902
+ $[21] = onPropertyMove;
2903
+ $[22] = onPropertyRemove;
2904
+ $[23] = properties;
2905
+ $[24] = propertiesOrder;
2906
+ $[25] = selectedPropertyKey;
2907
+ $[26] = t7;
2908
+ } else {
2909
+ t7 = $[26];
2910
+ }
2911
+ let t8;
2912
+ if ($[27] !== className || $[28] !== t7) {
2913
+ t8 = /* @__PURE__ */ jsx("div", { className, children: t7 });
2914
+ $[27] = className;
2915
+ $[28] = t7;
2916
+ $[29] = t8;
2917
+ } else {
2918
+ t8 = $[29];
2919
+ }
2920
+ let t9;
2921
+ if ($[30] !== items || $[31] !== t8) {
2922
+ t9 = /* @__PURE__ */ jsx(SortableContext, { items, strategy: verticalListSortingStrategy, children: t8 });
2923
+ $[30] = items;
2924
+ $[31] = t8;
2925
+ $[32] = t9;
2926
+ } else {
2927
+ t9 = $[32];
2928
+ }
2929
+ let t10;
2930
+ if ($[33] !== handleDragEnd || $[34] !== sensors || $[35] !== t9) {
2931
+ t10 = /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, modifiers: t6, children: t9 });
2932
+ $[33] = handleDragEnd;
2933
+ $[34] = sensors;
2934
+ $[35] = t9;
2935
+ $[36] = t10;
2936
+ } else {
2937
+ t10 = $[36];
2938
+ }
2939
+ return t10;
2940
+ }, equal);
2840
2941
  function PropertyTreeEntry(t0) {
2841
- const $ = c(53);
2942
+ const $ = c(62);
2842
2943
  const {
2944
+ id,
2843
2945
  propertyKey,
2844
2946
  namespace,
2845
2947
  propertyOrBuilder,
2846
2948
  additionalField,
2847
- provided,
2848
2949
  selectedPropertyKey,
2849
2950
  errors,
2850
2951
  onPropertyClick,
@@ -2854,157 +2955,201 @@ function PropertyTreeEntry(t0) {
2854
2955
  collectionEditable
2855
2956
  } = t0;
2856
2957
  let t1;
2857
- if ($[0] !== inferredPropertyKeys || $[1] !== namespace || $[2] !== propertyKey) {
2858
- t1 = inferredPropertyKeys?.includes(namespace ? `${namespace}.${propertyKey}` : propertyKey);
2859
- $[0] = inferredPropertyKeys;
2860
- $[1] = namespace;
2861
- $[2] = propertyKey;
2862
- $[3] = t1;
2958
+ if ($[0] !== id) {
2959
+ t1 = {
2960
+ id
2961
+ };
2962
+ $[0] = id;
2963
+ $[1] = t1;
2863
2964
  } else {
2864
- t1 = $[3];
2965
+ t1 = $[1];
2865
2966
  }
2866
- const isPropertyInferred = t1;
2967
+ const {
2968
+ attributes,
2969
+ listeners,
2970
+ setNodeRef,
2971
+ transform,
2972
+ transition,
2973
+ isDragging
2974
+ } = useSortable(t1);
2867
2975
  let t2;
2868
- if ($[4] !== namespace || $[5] !== propertyKey) {
2869
- t2 = getFullId(propertyKey, namespace);
2870
- $[4] = namespace;
2871
- $[5] = propertyKey;
2872
- $[6] = t2;
2976
+ if ($[2] !== transform) {
2977
+ t2 = CSS.Translate.toString(transform);
2978
+ $[2] = transform;
2979
+ $[3] = t2;
2873
2980
  } else {
2874
- t2 = $[6];
2981
+ t2 = $[3];
2982
+ }
2983
+ const t3 = isDragging ? 10 : void 0;
2984
+ let t4;
2985
+ if ($[4] !== t2 || $[5] !== t3 || $[6] !== transition) {
2986
+ t4 = {
2987
+ transform: t2,
2988
+ transition,
2989
+ zIndex: t3,
2990
+ position: "relative"
2991
+ };
2992
+ $[4] = t2;
2993
+ $[5] = t3;
2994
+ $[6] = transition;
2995
+ $[7] = t4;
2996
+ } else {
2997
+ t4 = $[7];
2875
2998
  }
2876
- const fullId = t2;
2999
+ const style = t4;
3000
+ let t5;
3001
+ if ($[8] !== inferredPropertyKeys || $[9] !== namespace || $[10] !== propertyKey) {
3002
+ t5 = inferredPropertyKeys?.includes(namespace ? `${namespace}.${propertyKey}` : propertyKey);
3003
+ $[8] = inferredPropertyKeys;
3004
+ $[9] = namespace;
3005
+ $[10] = propertyKey;
3006
+ $[11] = t5;
3007
+ } else {
3008
+ t5 = $[11];
3009
+ }
3010
+ const isPropertyInferred = t5;
3011
+ const fullId = id;
2877
3012
  const fullIdPath = getFullIdPath(propertyKey, namespace);
2878
3013
  const hasError = fullIdPath in errors;
2879
3014
  let subtree;
2880
3015
  if (typeof propertyOrBuilder === "object") {
2881
3016
  const property = propertyOrBuilder;
2882
3017
  if (property.dataType === "map" && property.properties) {
2883
- let t32;
2884
- if ($[7] !== collectionEditable || $[8] !== errors || $[9] !== fullId || $[10] !== onPropertyClick || $[11] !== onPropertyMove || $[12] !== onPropertyRemove || $[13] !== property.properties || $[14] !== property.propertiesOrder || $[15] !== selectedPropertyKey) {
2885
- t32 = /* @__PURE__ */ jsx(PropertyTree, { selectedPropertyKey, namespace: fullId, properties: property.properties, propertiesOrder: property.propertiesOrder, errors, onPropertyClick, onPropertyMove, onPropertyRemove, collectionEditable });
2886
- $[7] = collectionEditable;
2887
- $[8] = errors;
2888
- $[9] = fullId;
2889
- $[10] = onPropertyClick;
2890
- $[11] = onPropertyMove;
2891
- $[12] = onPropertyRemove;
2892
- $[13] = property.properties;
2893
- $[14] = property.propertiesOrder;
2894
- $[15] = selectedPropertyKey;
2895
- $[16] = t32;
3018
+ let t62;
3019
+ if ($[12] !== collectionEditable || $[13] !== errors || $[14] !== fullId || $[15] !== onPropertyClick || $[16] !== onPropertyMove || $[17] !== onPropertyRemove || $[18] !== property.properties || $[19] !== property.propertiesOrder || $[20] !== selectedPropertyKey) {
3020
+ t62 = /* @__PURE__ */ jsx(PropertyTree, { selectedPropertyKey, namespace: fullId, properties: property.properties, propertiesOrder: property.propertiesOrder, errors, onPropertyClick, onPropertyMove, onPropertyRemove, collectionEditable });
3021
+ $[12] = collectionEditable;
3022
+ $[13] = errors;
3023
+ $[14] = fullId;
3024
+ $[15] = onPropertyClick;
3025
+ $[16] = onPropertyMove;
3026
+ $[17] = onPropertyRemove;
3027
+ $[18] = property.properties;
3028
+ $[19] = property.propertiesOrder;
3029
+ $[20] = selectedPropertyKey;
3030
+ $[21] = t62;
2896
3031
  } else {
2897
- t32 = $[16];
3032
+ t62 = $[21];
2898
3033
  }
2899
- subtree = t32;
3034
+ subtree = t62;
2900
3035
  }
2901
3036
  }
2902
3037
  const selected = selectedPropertyKey === fullId;
2903
- let t3;
2904
- if ($[17] !== collectionEditable || $[18] !== propertyOrBuilder) {
2905
- t3 = propertyOrBuilder && (collectionEditable && !isPropertyBuilder(propertyOrBuilder) || editableProperty(propertyOrBuilder));
2906
- $[17] = collectionEditable;
2907
- $[18] = propertyOrBuilder;
2908
- $[19] = t3;
3038
+ let t6;
3039
+ if ($[22] !== collectionEditable || $[23] !== propertyOrBuilder) {
3040
+ t6 = propertyOrBuilder && (collectionEditable && !isPropertyBuilder(propertyOrBuilder) || editableProperty(propertyOrBuilder));
3041
+ $[22] = collectionEditable;
3042
+ $[23] = propertyOrBuilder;
3043
+ $[24] = t6;
2909
3044
  } else {
2910
- t3 = $[19];
3045
+ t6 = $[24];
2911
3046
  }
2912
- const editable = t3;
2913
- let t4;
2914
- if ($[20] !== subtree) {
2915
- t4 = subtree && /* @__PURE__ */ jsx("div", { className: "absolute border-l " + defaultBorderMixin, style: {
3047
+ const editable = t6;
3048
+ let t7;
3049
+ if ($[25] !== subtree) {
3050
+ t7 = subtree && /* @__PURE__ */ jsx("div", { className: "absolute border-l " + defaultBorderMixin, style: {
2916
3051
  left: "32px",
2917
3052
  top: "64px",
2918
3053
  bottom: "16px"
2919
3054
  } });
2920
- $[20] = subtree;
2921
- $[21] = t4;
3055
+ $[25] = subtree;
3056
+ $[26] = t7;
2922
3057
  } else {
2923
- t4 = $[21];
3058
+ t7 = $[26];
2924
3059
  }
2925
- let t5;
2926
- if ($[22] !== additionalField || $[23] !== editable || $[24] !== hasError || $[25] !== namespace || $[26] !== onPropertyClick || $[27] !== propertyKey || $[28] !== propertyOrBuilder || $[29] !== selected) {
2927
- t5 = !isPropertyBuilder(propertyOrBuilder) && !additionalField && editable ? /* @__PURE__ */ jsx(PropertyFieldPreview, { property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, includeName: true, selected, hasError }) : /* @__PURE__ */ jsx(NonEditablePropertyPreview, { name: propertyKey, property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, selected });
2928
- $[22] = additionalField;
2929
- $[23] = editable;
2930
- $[24] = hasError;
2931
- $[25] = namespace;
2932
- $[26] = onPropertyClick;
2933
- $[27] = propertyKey;
2934
- $[28] = propertyOrBuilder;
2935
- $[29] = selected;
2936
- $[30] = t5;
2937
- } else {
2938
- t5 = $[30];
3060
+ let t8;
3061
+ if ($[27] !== additionalField || $[28] !== editable || $[29] !== hasError || $[30] !== namespace || $[31] !== onPropertyClick || $[32] !== propertyKey || $[33] !== propertyOrBuilder || $[34] !== selected) {
3062
+ t8 = /* @__PURE__ */ jsx("div", { children: !isPropertyBuilder(propertyOrBuilder) && !additionalField && editable ? /* @__PURE__ */ jsx(PropertyFieldPreview, { property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, includeName: true, selected, hasError }) : /* @__PURE__ */ jsx(NonEditablePropertyPreview, { name: propertyKey, property: propertyOrBuilder, onClick: onPropertyClick ? () => onPropertyClick(propertyKey, namespace) : void 0, selected }) });
3063
+ $[27] = additionalField;
3064
+ $[28] = editable;
3065
+ $[29] = hasError;
3066
+ $[30] = namespace;
3067
+ $[31] = onPropertyClick;
3068
+ $[32] = propertyKey;
3069
+ $[33] = propertyOrBuilder;
3070
+ $[34] = selected;
3071
+ $[35] = t8;
3072
+ } else {
3073
+ t8 = $[35];
2939
3074
  }
2940
- let t6;
2941
- if ($[31] !== isPropertyInferred) {
2942
- t6 = isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsx(AutorenewIcon, { size: "small", className: "p-2" }) });
2943
- $[31] = isPropertyInferred;
2944
- $[32] = t6;
3075
+ let t9;
3076
+ if ($[36] !== isPropertyInferred) {
3077
+ t9 = isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsx(AutorenewIcon, { size: "small", className: "p-2" }) });
3078
+ $[36] = isPropertyInferred;
3079
+ $[37] = t9;
2945
3080
  } else {
2946
- t6 = $[32];
3081
+ t9 = $[37];
2947
3082
  }
2948
- let t7;
2949
- if ($[33] !== namespace || $[34] !== onPropertyRemove || $[35] !== propertyKey) {
2950
- t7 = onPropertyRemove && /* @__PURE__ */ jsx(Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: () => onPropertyRemove(propertyKey, namespace), children: /* @__PURE__ */ jsx(RemoveIcon, { size: "small" }) }) });
2951
- $[33] = namespace;
2952
- $[34] = onPropertyRemove;
2953
- $[35] = propertyKey;
2954
- $[36] = t7;
3083
+ let t10;
3084
+ if ($[38] !== isPropertyInferred || $[39] !== namespace || $[40] !== onPropertyRemove || $[41] !== propertyKey) {
3085
+ t10 = onPropertyRemove && !isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: () => onPropertyRemove(propertyKey, namespace), children: /* @__PURE__ */ jsx(RemoveIcon, { size: "small" }) }) });
3086
+ $[38] = isPropertyInferred;
3087
+ $[39] = namespace;
3088
+ $[40] = onPropertyRemove;
3089
+ $[41] = propertyKey;
3090
+ $[42] = t10;
2955
3091
  } else {
2956
- t7 = $[36];
3092
+ t10 = $[42];
2957
3093
  }
2958
- let t8;
2959
- if ($[37] !== onPropertyMove) {
2960
- t8 = onPropertyMove && /* @__PURE__ */ jsx(Tooltip, { title: "Move", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { component: "span", size: "small", children: /* @__PURE__ */ jsx(DragHandleIcon, { size: "small" }) }) });
2961
- $[37] = onPropertyMove;
2962
- $[38] = t8;
3094
+ let t11;
3095
+ if ($[43] !== attributes || $[44] !== listeners || $[45] !== onPropertyMove) {
3096
+ t11 = onPropertyMove && /* @__PURE__ */ jsx(Tooltip, { title: "Move", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { component: "span", size: "small", ...attributes, ...listeners, children: /* @__PURE__ */ jsx(DragHandleIcon, { size: "small" }) }) });
3097
+ $[43] = attributes;
3098
+ $[44] = listeners;
3099
+ $[45] = onPropertyMove;
3100
+ $[46] = t11;
2963
3101
  } else {
2964
- t8 = $[38];
3102
+ t11 = $[46];
2965
3103
  }
2966
- let t9;
2967
- if ($[39] !== t6 || $[40] !== t7 || $[41] !== t8) {
2968
- t9 = /* @__PURE__ */ jsxs("div", { className: "absolute top-2 right-2 flex flex-row ", children: [
2969
- t6,
2970
- t7,
2971
- t8
3104
+ let t12;
3105
+ if ($[47] !== t10 || $[48] !== t11 || $[49] !== t9) {
3106
+ t12 = /* @__PURE__ */ jsxs("div", { className: "absolute top-2 right-2 flex flex-row", children: [
3107
+ t9,
3108
+ t10,
3109
+ t11
2972
3110
  ] });
2973
- $[39] = t6;
2974
- $[40] = t7;
2975
- $[41] = t8;
2976
- $[42] = t9;
3111
+ $[47] = t10;
3112
+ $[48] = t11;
3113
+ $[49] = t9;
3114
+ $[50] = t12;
2977
3115
  } else {
2978
- t9 = $[42];
3116
+ t12 = $[50];
2979
3117
  }
2980
- let t10;
2981
- if ($[43] !== subtree) {
2982
- t10 = subtree && /* @__PURE__ */ jsx("div", { className: "ml-16", children: subtree });
2983
- $[43] = subtree;
2984
- $[44] = t10;
3118
+ let t13;
3119
+ if ($[51] !== subtree) {
3120
+ t13 = subtree && /* @__PURE__ */ jsx("div", { className: "ml-16", children: subtree });
3121
+ $[51] = subtree;
3122
+ $[52] = t13;
2985
3123
  } else {
2986
- t10 = $[44];
3124
+ t13 = $[52];
2987
3125
  }
2988
- let t11;
2989
- if ($[45] !== provided.dragHandleProps || $[46] !== provided.draggableProps || $[47] !== provided.innerRef || $[48] !== t10 || $[49] !== t4 || $[50] !== t5 || $[51] !== t9) {
2990
- t11 = /* @__PURE__ */ jsxs("div", { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, className: "relative -ml-8", children: [
2991
- t4,
2992
- t5,
2993
- t9,
2994
- t10
3126
+ let t14;
3127
+ if ($[53] !== t12 || $[54] !== t13 || $[55] !== t7 || $[56] !== t8) {
3128
+ t14 = /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3129
+ t7,
3130
+ t8,
3131
+ t12,
3132
+ t13
2995
3133
  ] });
2996
- $[45] = provided.dragHandleProps;
2997
- $[46] = provided.draggableProps;
2998
- $[47] = provided.innerRef;
2999
- $[48] = t10;
3000
- $[49] = t4;
3001
- $[50] = t5;
3002
- $[51] = t9;
3003
- $[52] = t11;
3134
+ $[53] = t12;
3135
+ $[54] = t13;
3136
+ $[55] = t7;
3137
+ $[56] = t8;
3138
+ $[57] = t14;
3004
3139
  } else {
3005
- t11 = $[52];
3140
+ t14 = $[57];
3006
3141
  }
3007
- return t11;
3142
+ let t15;
3143
+ if ($[58] !== setNodeRef || $[59] !== style || $[60] !== t14) {
3144
+ t15 = /* @__PURE__ */ jsx("div", { ref: setNodeRef, style, className: "relative -ml-8", children: t14 });
3145
+ $[58] = setNodeRef;
3146
+ $[59] = style;
3147
+ $[60] = t14;
3148
+ $[61] = t15;
3149
+ } else {
3150
+ t15 = $[61];
3151
+ }
3152
+ return t15;
3008
3153
  }
3009
3154
  function MapPropertyField(t0) {
3010
3155
  const $ = c(67);
@@ -3218,7 +3363,7 @@ function MapPropertyField(t0) {
3218
3363
  const t19 = values.spreadChildren ?? false;
3219
3364
  let t20;
3220
3365
  if ($[40] !== t18 || $[41] !== t19) {
3221
- t20 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "small", label: "Spread children as columns", onValueChange: t18, value: t19 });
3366
+ t20 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "medium", label: "Spread children as columns", onValueChange: t18, value: t19 });
3222
3367
  $[40] = t18;
3223
3368
  $[41] = t19;
3224
3369
  $[42] = t20;
@@ -4690,7 +4835,7 @@ function AdvancedPropertyValidation(t0) {
4690
4835
  field,
4691
4836
  form
4692
4837
  } = t22;
4693
- return /* @__PURE__ */ 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 });
4838
+ return /* @__PURE__ */ 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 });
4694
4839
  } }) });
4695
4840
  $[0] = disabled;
4696
4841
  $[1] = t1;
@@ -4704,7 +4849,7 @@ function AdvancedPropertyValidation(t0) {
4704
4849
  field: field_0,
4705
4850
  form: form_0
4706
4851
  } = t32;
4707
- return /* @__PURE__ */ jsx(SwitchControl, { label: "Read only", disabled, tooltip: "Is this a read only field. Display only as a preview", form: form_0, field: field_0 });
4852
+ return /* @__PURE__ */ 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 });
4708
4853
  } }) });
4709
4854
  $[2] = disabled;
4710
4855
  $[3] = t2;