@firecms/collection_editor 3.0.0-rc.1 → 3.0.0-rc.3
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 +837 -509
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +837 -509
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_inference.d.ts +1 -1
- package/dist/ui/collection_editor/properties/StringPropertyField.d.ts +1 -1
- package/dist/utils/entities.d.ts +1 -1
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +2 -2
- package/src/types/collection_inference.ts +1 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +13 -0
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +1 -1
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +0 -8
- package/src/ui/collection_editor/PropertyEditView.tsx +5 -3
- package/src/ui/collection_editor/PropertyFieldPreview.tsx +5 -5
- package/src/ui/collection_editor/UnsavedChangesDialog.tsx +1 -1
- package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +10 -2
- package/src/ui/collection_editor/properties/MarkdownPropertyField.tsx +1 -1
- package/src/ui/collection_editor/properties/StoragePropertyField.tsx +135 -5
- package/src/ui/collection_editor/properties/StringPropertyField.tsx +5 -1
- package/src/ui/collection_editor/properties/validation/ValidationPanel.tsx +1 -1
- package/src/ui/collection_editor/utils/supported_fields.tsx +1 -0
- package/src/ui/collection_editor/utils/update_property_for_widget.ts +28 -6
- package/src/utils/collections.ts +0 -1
- package/src/utils/entities.ts +6 -9
package/dist/index.umd.js
CHANGED
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
return t18;
|
|
170
170
|
}
|
|
171
171
|
function CollectionDetailsForm(t0) {
|
|
172
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(202);
|
|
173
173
|
const {
|
|
174
174
|
isNewCollection,
|
|
175
175
|
reservedGroups,
|
|
@@ -760,242 +760,282 @@
|
|
|
760
760
|
} else {
|
|
761
761
|
t84 = $[131];
|
|
762
762
|
}
|
|
763
|
-
const t85 =
|
|
763
|
+
const t85 = values.inlineEditing === void 0 || values.inlineEditing ? "Data can be edited directly in the table view" : "Data can be edited only in the form view";
|
|
764
764
|
let t86;
|
|
765
765
|
if ($[132] !== setFieldValue) {
|
|
766
|
-
t86 = (v_1) =>
|
|
767
|
-
if (v_1 === "code_defined") {
|
|
768
|
-
throw new Error("This should not happen");
|
|
769
|
-
}
|
|
770
|
-
setFieldValue("customId", v_1);
|
|
771
|
-
};
|
|
766
|
+
t86 = (v_1) => setFieldValue("inlineEditing", v_1);
|
|
772
767
|
$[132] = setFieldValue;
|
|
773
768
|
$[133] = t86;
|
|
774
769
|
} else {
|
|
775
770
|
t86 = $[133];
|
|
776
771
|
}
|
|
777
|
-
const t87 =
|
|
772
|
+
const t87 = values.inlineEditing === void 0 ? true : values.inlineEditing;
|
|
778
773
|
let t88;
|
|
774
|
+
if ($[134] !== t85 || $[135] !== t86 || $[136] !== t87) {
|
|
775
|
+
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: t85, onValueChange: t86, value: t87 });
|
|
776
|
+
$[134] = t85;
|
|
777
|
+
$[135] = t86;
|
|
778
|
+
$[136] = t87;
|
|
779
|
+
$[137] = t88;
|
|
780
|
+
} else {
|
|
781
|
+
t88 = $[137];
|
|
782
|
+
}
|
|
779
783
|
let t89;
|
|
784
|
+
if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
|
|
785
|
+
t89 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Allow editing data directly in the table view, without opening the form view." });
|
|
786
|
+
$[138] = t89;
|
|
787
|
+
} else {
|
|
788
|
+
t89 = $[138];
|
|
789
|
+
}
|
|
780
790
|
let t90;
|
|
781
|
-
if ($[
|
|
782
|
-
|
|
783
|
-
t89 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
784
|
-
t90 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
785
|
-
$[134] = t88;
|
|
786
|
-
$[135] = t89;
|
|
787
|
-
$[136] = t90;
|
|
788
|
-
} else {
|
|
789
|
-
t88 = $[134];
|
|
790
|
-
t89 = $[135];
|
|
791
|
-
t90 = $[136];
|
|
792
|
-
}
|
|
793
|
-
let t91;
|
|
794
|
-
if ($[137] !== t85 || $[138] !== t86 || $[139] !== t87) {
|
|
795
|
-
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$5, children: [
|
|
791
|
+
if ($[139] !== t88) {
|
|
792
|
+
t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
796
793
|
t88,
|
|
797
|
-
t89
|
|
798
|
-
|
|
799
|
-
]
|
|
800
|
-
$[
|
|
801
|
-
$[138] = t86;
|
|
802
|
-
$[139] = t87;
|
|
803
|
-
$[140] = t91;
|
|
794
|
+
t89
|
|
795
|
+
] });
|
|
796
|
+
$[139] = t88;
|
|
797
|
+
$[140] = t90;
|
|
804
798
|
} else {
|
|
805
|
-
|
|
799
|
+
t90 = $[140];
|
|
806
800
|
}
|
|
801
|
+
const t91 = customIdValue === "code_defined";
|
|
807
802
|
let t92;
|
|
808
803
|
if ($[141] !== setFieldValue) {
|
|
809
|
-
t92 = (v_2) =>
|
|
804
|
+
t92 = (v_2) => {
|
|
805
|
+
if (v_2 === "code_defined") {
|
|
806
|
+
throw new Error("This should not happen");
|
|
807
|
+
}
|
|
808
|
+
setFieldValue("customId", v_2);
|
|
809
|
+
};
|
|
810
810
|
$[141] = setFieldValue;
|
|
811
811
|
$[142] = t92;
|
|
812
812
|
} else {
|
|
813
813
|
t92 = $[142];
|
|
814
814
|
}
|
|
815
|
-
const t93 =
|
|
815
|
+
const t93 = customIdValue ?? "";
|
|
816
816
|
let t94;
|
|
817
|
-
if ($[143] !== t92 || $[144] !== t93) {
|
|
818
|
-
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
|
|
819
|
-
$[143] = t92;
|
|
820
|
-
$[144] = t93;
|
|
821
|
-
$[145] = t94;
|
|
822
|
-
} else {
|
|
823
|
-
t94 = $[145];
|
|
824
|
-
}
|
|
825
817
|
let t95;
|
|
826
|
-
if ($[146] === Symbol.for("react.memo_cache_sentinel")) {
|
|
827
|
-
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." });
|
|
828
|
-
$[146] = t95;
|
|
829
|
-
} else {
|
|
830
|
-
t95 = $[146];
|
|
831
|
-
}
|
|
832
818
|
let t96;
|
|
833
|
-
if ($[
|
|
834
|
-
|
|
819
|
+
if ($[143] === Symbol.for("react.memo_cache_sentinel")) {
|
|
820
|
+
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
821
|
+
t95 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
822
|
+
t96 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
823
|
+
$[143] = t94;
|
|
824
|
+
$[144] = t95;
|
|
825
|
+
$[145] = t96;
|
|
826
|
+
} else {
|
|
827
|
+
t94 = $[143];
|
|
828
|
+
t95 = $[144];
|
|
829
|
+
t96 = $[145];
|
|
830
|
+
}
|
|
831
|
+
let t97;
|
|
832
|
+
if ($[146] !== t91 || $[147] !== t92 || $[148] !== t93) {
|
|
833
|
+
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$5, children: [
|
|
835
834
|
t94,
|
|
836
|
-
t95
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
$[
|
|
835
|
+
t95,
|
|
836
|
+
t96
|
|
837
|
+
] }) });
|
|
838
|
+
$[146] = t91;
|
|
839
|
+
$[147] = t92;
|
|
840
|
+
$[148] = t93;
|
|
841
|
+
$[149] = t97;
|
|
840
842
|
} else {
|
|
841
|
-
|
|
843
|
+
t97 = $[149];
|
|
842
844
|
}
|
|
843
|
-
let
|
|
844
|
-
if ($[
|
|
845
|
-
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
} else {
|
|
849
|
-
t97 = $[150];
|
|
850
|
-
}
|
|
851
|
-
const t98 = values.textSearchEnabled ?? false;
|
|
852
|
-
let t99;
|
|
853
|
-
if ($[151] !== t97 || $[152] !== t98) {
|
|
854
|
-
t99 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
|
|
855
|
-
$[151] = t97;
|
|
856
|
-
$[152] = t98;
|
|
857
|
-
$[153] = t99;
|
|
845
|
+
let t98;
|
|
846
|
+
if ($[150] !== setFieldValue) {
|
|
847
|
+
t98 = (v_3) => setFieldValue("collectionGroup", v_3);
|
|
848
|
+
$[150] = setFieldValue;
|
|
849
|
+
$[151] = t98;
|
|
858
850
|
} else {
|
|
859
|
-
|
|
851
|
+
t98 = $[151];
|
|
860
852
|
}
|
|
853
|
+
const t99 = values.collectionGroup ?? false;
|
|
861
854
|
let t100;
|
|
862
|
-
if ($[
|
|
863
|
-
t100 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
855
|
+
if ($[152] !== t98 || $[153] !== t99) {
|
|
856
|
+
t100 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t98, value: t99 });
|
|
857
|
+
$[152] = t98;
|
|
858
|
+
$[153] = t99;
|
|
864
859
|
$[154] = t100;
|
|
865
860
|
} else {
|
|
866
861
|
t100 = $[154];
|
|
867
862
|
}
|
|
868
863
|
let t101;
|
|
869
|
-
if ($[155]
|
|
870
|
-
t101 = /* @__PURE__ */ jsxRuntime.
|
|
871
|
-
|
|
872
|
-
t100
|
|
873
|
-
] });
|
|
874
|
-
$[155] = t99;
|
|
875
|
-
$[156] = t101;
|
|
864
|
+
if ($[155] === Symbol.for("react.memo_cache_sentinel")) {
|
|
865
|
+
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." });
|
|
866
|
+
$[155] = t101;
|
|
876
867
|
} else {
|
|
877
|
-
t101 = $[
|
|
868
|
+
t101 = $[155];
|
|
878
869
|
}
|
|
879
870
|
let t102;
|
|
880
|
-
if ($[
|
|
881
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
871
|
+
if ($[156] !== t100) {
|
|
872
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
873
|
+
t100,
|
|
874
|
+
t101
|
|
875
|
+
] });
|
|
876
|
+
$[156] = t100;
|
|
877
|
+
$[157] = t102;
|
|
878
|
+
} else {
|
|
879
|
+
t102 = $[157];
|
|
880
|
+
}
|
|
881
|
+
let t103;
|
|
882
|
+
if ($[158] !== setFieldValue) {
|
|
883
|
+
t103 = (v_4) => setFieldValue("textSearchEnabled", v_4);
|
|
884
|
+
$[158] = setFieldValue;
|
|
885
|
+
$[159] = t103;
|
|
886
|
+
} else {
|
|
887
|
+
t103 = $[159];
|
|
888
|
+
}
|
|
889
|
+
const t104 = values.textSearchEnabled ?? false;
|
|
890
|
+
let t105;
|
|
891
|
+
if ($[160] !== t103 || $[161] !== t104) {
|
|
892
|
+
t105 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t103, value: t104 });
|
|
893
|
+
$[160] = t103;
|
|
894
|
+
$[161] = t104;
|
|
895
|
+
$[162] = t105;
|
|
896
|
+
} else {
|
|
897
|
+
t105 = $[162];
|
|
898
|
+
}
|
|
899
|
+
let t106;
|
|
900
|
+
if ($[163] === Symbol.for("react.memo_cache_sentinel")) {
|
|
901
|
+
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." });
|
|
902
|
+
$[163] = t106;
|
|
903
|
+
} else {
|
|
904
|
+
t106 = $[163];
|
|
905
|
+
}
|
|
906
|
+
let t107;
|
|
907
|
+
if ($[164] !== t105) {
|
|
908
|
+
t107 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
909
|
+
t105,
|
|
910
|
+
t106
|
|
911
|
+
] });
|
|
912
|
+
$[164] = t105;
|
|
913
|
+
$[165] = t107;
|
|
914
|
+
} else {
|
|
915
|
+
t107 = $[165];
|
|
916
|
+
}
|
|
917
|
+
let t108;
|
|
918
|
+
if ($[166] !== t102 || $[167] !== t107 || $[168] !== t48 || $[169] !== t56 || $[170] !== t68 || $[171] !== t75 || $[172] !== t78 || $[173] !== t84 || $[174] !== t90 || $[175] !== t97) {
|
|
919
|
+
t108 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
882
920
|
t48,
|
|
883
921
|
t56,
|
|
884
922
|
t68,
|
|
885
923
|
t75,
|
|
886
924
|
t78,
|
|
887
925
|
t84,
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
926
|
+
t90,
|
|
927
|
+
t97,
|
|
928
|
+
t102,
|
|
929
|
+
t107
|
|
891
930
|
] });
|
|
892
|
-
$[157] = t101;
|
|
893
|
-
$[158] = t48;
|
|
894
|
-
$[159] = t56;
|
|
895
|
-
$[160] = t68;
|
|
896
|
-
$[161] = t75;
|
|
897
|
-
$[162] = t78;
|
|
898
|
-
$[163] = t84;
|
|
899
|
-
$[164] = t91;
|
|
900
|
-
$[165] = t96;
|
|
901
931
|
$[166] = t102;
|
|
932
|
+
$[167] = t107;
|
|
933
|
+
$[168] = t48;
|
|
934
|
+
$[169] = t56;
|
|
935
|
+
$[170] = t68;
|
|
936
|
+
$[171] = t75;
|
|
937
|
+
$[172] = t78;
|
|
938
|
+
$[173] = t84;
|
|
939
|
+
$[174] = t90;
|
|
940
|
+
$[175] = t97;
|
|
941
|
+
$[176] = t108;
|
|
942
|
+
} else {
|
|
943
|
+
t108 = $[176];
|
|
944
|
+
}
|
|
945
|
+
let t109;
|
|
946
|
+
if ($[177] !== advancedPanelExpanded || $[178] !== t108) {
|
|
947
|
+
t109 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t108 });
|
|
948
|
+
$[177] = advancedPanelExpanded;
|
|
949
|
+
$[178] = t108;
|
|
950
|
+
$[179] = t109;
|
|
902
951
|
} else {
|
|
903
|
-
|
|
952
|
+
t109 = $[179];
|
|
904
953
|
}
|
|
905
|
-
let
|
|
906
|
-
if ($[
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
$[168] = t102;
|
|
910
|
-
$[169] = t103;
|
|
911
|
-
} else {
|
|
912
|
-
t103 = $[169];
|
|
913
|
-
}
|
|
914
|
-
let t104;
|
|
915
|
-
if ($[170] !== children || $[171] !== t103) {
|
|
916
|
-
t104 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
917
|
-
t103,
|
|
954
|
+
let t110;
|
|
955
|
+
if ($[180] !== children || $[181] !== t109) {
|
|
956
|
+
t110 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
957
|
+
t109,
|
|
918
958
|
children
|
|
919
959
|
] });
|
|
920
|
-
$[
|
|
921
|
-
$[
|
|
922
|
-
$[
|
|
960
|
+
$[180] = children;
|
|
961
|
+
$[181] = t109;
|
|
962
|
+
$[182] = t110;
|
|
923
963
|
} else {
|
|
924
|
-
|
|
964
|
+
t110 = $[182];
|
|
925
965
|
}
|
|
926
|
-
let
|
|
927
|
-
if ($[
|
|
928
|
-
|
|
966
|
+
let t111;
|
|
967
|
+
if ($[183] !== t110 || $[184] !== t23 || $[185] !== t31 || $[186] !== t34 || $[187] !== t40) {
|
|
968
|
+
t111 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4", children: [
|
|
929
969
|
t23,
|
|
930
970
|
t31,
|
|
931
971
|
t34,
|
|
932
972
|
t40,
|
|
933
|
-
|
|
973
|
+
t110
|
|
934
974
|
] });
|
|
935
|
-
$[
|
|
936
|
-
$[
|
|
937
|
-
$[
|
|
938
|
-
$[
|
|
939
|
-
$[
|
|
940
|
-
$[
|
|
975
|
+
$[183] = t110;
|
|
976
|
+
$[184] = t23;
|
|
977
|
+
$[185] = t31;
|
|
978
|
+
$[186] = t34;
|
|
979
|
+
$[187] = t40;
|
|
980
|
+
$[188] = t111;
|
|
941
981
|
} else {
|
|
942
|
-
|
|
982
|
+
t111 = $[188];
|
|
943
983
|
}
|
|
944
|
-
let
|
|
945
|
-
if ($[
|
|
946
|
-
|
|
984
|
+
let t112;
|
|
985
|
+
if ($[189] === Symbol.for("react.memo_cache_sentinel")) {
|
|
986
|
+
t112 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
947
987
|
height: "52px"
|
|
948
988
|
} });
|
|
949
|
-
$[
|
|
989
|
+
$[189] = t112;
|
|
950
990
|
} else {
|
|
951
|
-
|
|
991
|
+
t112 = $[189];
|
|
952
992
|
}
|
|
953
|
-
const
|
|
954
|
-
let
|
|
955
|
-
if ($[
|
|
956
|
-
|
|
993
|
+
const t113 = typeof values.icon === "string" ? values.icon : void 0;
|
|
994
|
+
let t114;
|
|
995
|
+
if ($[190] !== setFieldValue) {
|
|
996
|
+
t114 = (icon) => {
|
|
957
997
|
setIconDialogOpen(false);
|
|
958
998
|
setFieldValue("icon", icon);
|
|
959
999
|
};
|
|
960
|
-
$[
|
|
961
|
-
$[
|
|
1000
|
+
$[190] = setFieldValue;
|
|
1001
|
+
$[191] = t114;
|
|
962
1002
|
} else {
|
|
963
|
-
|
|
1003
|
+
t114 = $[191];
|
|
964
1004
|
}
|
|
965
|
-
let
|
|
966
|
-
if ($[
|
|
967
|
-
|
|
968
|
-
$[
|
|
969
|
-
$[
|
|
970
|
-
$[
|
|
1005
|
+
let t115;
|
|
1006
|
+
if ($[192] !== t113 || $[193] !== t114) {
|
|
1007
|
+
t115 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: t113, onIconSelected: t114 }) });
|
|
1008
|
+
$[192] = t113;
|
|
1009
|
+
$[193] = t114;
|
|
1010
|
+
$[194] = t115;
|
|
971
1011
|
} else {
|
|
972
|
-
|
|
1012
|
+
t115 = $[194];
|
|
973
1013
|
}
|
|
974
|
-
let
|
|
975
|
-
if ($[
|
|
976
|
-
|
|
977
|
-
$[
|
|
978
|
-
$[
|
|
979
|
-
$[
|
|
1014
|
+
let t116;
|
|
1015
|
+
if ($[195] !== iconDialogOpen || $[196] !== t115) {
|
|
1016
|
+
t116 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t115 });
|
|
1017
|
+
$[195] = iconDialogOpen;
|
|
1018
|
+
$[196] = t115;
|
|
1019
|
+
$[197] = t116;
|
|
980
1020
|
} else {
|
|
981
|
-
|
|
1021
|
+
t116 = $[197];
|
|
982
1022
|
}
|
|
983
|
-
let
|
|
984
|
-
if ($[
|
|
985
|
-
|
|
1023
|
+
let t117;
|
|
1024
|
+
if ($[198] !== t111 || $[199] !== t116 || $[200] !== t15) {
|
|
1025
|
+
t117 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
986
1026
|
t15,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1027
|
+
t111,
|
|
1028
|
+
t112,
|
|
1029
|
+
t116
|
|
990
1030
|
] }) });
|
|
991
|
-
$[
|
|
992
|
-
$[
|
|
993
|
-
$[
|
|
994
|
-
$[
|
|
1031
|
+
$[198] = t111;
|
|
1032
|
+
$[199] = t116;
|
|
1033
|
+
$[200] = t15;
|
|
1034
|
+
$[201] = t117;
|
|
995
1035
|
} else {
|
|
996
|
-
|
|
1036
|
+
t117 = $[201];
|
|
997
1037
|
}
|
|
998
|
-
return
|
|
1038
|
+
return t117;
|
|
999
1039
|
}
|
|
1000
1040
|
function _temp3$5(value_3) {
|
|
1001
1041
|
if (value_3 === "code_defined") {
|
|
@@ -1957,7 +1997,7 @@
|
|
|
1957
1997
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1958
1998
|
t1 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
1959
1999
|
/* @__PURE__ */ jsxRuntime.jsx(ui.RuleIcon, {}),
|
|
1960
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-
|
|
2000
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-4", children: "Validation" })
|
|
1961
2001
|
] });
|
|
1962
2002
|
$[0] = t1;
|
|
1963
2003
|
} else {
|
|
@@ -2029,7 +2069,7 @@
|
|
|
2029
2069
|
"text/*": "Text files"
|
|
2030
2070
|
};
|
|
2031
2071
|
function StoragePropertyField(t0) {
|
|
2032
|
-
const $ = reactCompilerRuntime.c(
|
|
2072
|
+
const $ = reactCompilerRuntime.c(180);
|
|
2033
2073
|
const {
|
|
2034
2074
|
multiple,
|
|
2035
2075
|
existing,
|
|
@@ -2045,6 +2085,12 @@
|
|
|
2045
2085
|
const maxSize = `${baseStoragePath}.maxSize`;
|
|
2046
2086
|
const storagePath = `${baseStoragePath}.storagePath`;
|
|
2047
2087
|
const storeUrl = `${baseStoragePath}.storeUrl`;
|
|
2088
|
+
const imageResize = `${baseStoragePath}.imageResize`;
|
|
2089
|
+
const imageResizeMaxWidth = `${imageResize}.maxWidth`;
|
|
2090
|
+
const imageResizeMaxHeight = `${imageResize}.maxHeight`;
|
|
2091
|
+
const imageResizeMode = `${imageResize}.mode`;
|
|
2092
|
+
const imageResizeFormat = `${imageResize}.format`;
|
|
2093
|
+
const imageResizeQuality = `${imageResize}.quality`;
|
|
2048
2094
|
let t1;
|
|
2049
2095
|
if ($[0] !== fileName || $[1] !== values) {
|
|
2050
2096
|
t1 = formex.getIn(values, fileName) ?? "{rand}_{file}";
|
|
@@ -2072,6 +2118,13 @@
|
|
|
2072
2118
|
let t12;
|
|
2073
2119
|
let t13;
|
|
2074
2120
|
let t14;
|
|
2121
|
+
let t15;
|
|
2122
|
+
let t16;
|
|
2123
|
+
let t17;
|
|
2124
|
+
let t18;
|
|
2125
|
+
let t19;
|
|
2126
|
+
let t20;
|
|
2127
|
+
let t21;
|
|
2075
2128
|
let t3;
|
|
2076
2129
|
let t4;
|
|
2077
2130
|
let t5;
|
|
@@ -2079,63 +2132,86 @@
|
|
|
2079
2132
|
let t7;
|
|
2080
2133
|
let t8;
|
|
2081
2134
|
let t9;
|
|
2082
|
-
if ($[6] !== acceptedFiles || $[7] !== disabled || $[8] !== existing || $[9] !== fileName || $[10] !== fileNameValue || $[11] !==
|
|
2135
|
+
if ($[6] !== acceptedFiles || $[7] !== disabled || $[8] !== existing || $[9] !== fileName || $[10] !== fileNameValue || $[11] !== imageResizeFormat || $[12] !== imageResizeMaxHeight || $[13] !== imageResizeMaxWidth || $[14] !== imageResizeMode || $[15] !== imageResizeQuality || $[16] !== maxSize || $[17] !== setFieldValue || $[18] !== storagePath || $[19] !== storagePathValue || $[20] !== storeUrl || $[21] !== values) {
|
|
2083
2136
|
const maxSizeValue = formex.getIn(values, maxSize);
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
$[
|
|
2137
|
+
const imageResizeMaxWidthValue = formex.getIn(values, imageResizeMaxWidth);
|
|
2138
|
+
const imageResizeMaxHeightValue = formex.getIn(values, imageResizeMaxHeight);
|
|
2139
|
+
let t222;
|
|
2140
|
+
if ($[43] !== imageResizeMode || $[44] !== values) {
|
|
2141
|
+
t222 = formex.getIn(values, imageResizeMode) ?? "cover";
|
|
2142
|
+
$[43] = imageResizeMode;
|
|
2143
|
+
$[44] = values;
|
|
2144
|
+
$[45] = t222;
|
|
2090
2145
|
} else {
|
|
2091
|
-
|
|
2146
|
+
t222 = $[45];
|
|
2092
2147
|
}
|
|
2093
|
-
const
|
|
2148
|
+
const imageResizeModeValue = t222;
|
|
2149
|
+
let t232;
|
|
2150
|
+
if ($[46] !== imageResizeFormat || $[47] !== values) {
|
|
2151
|
+
t232 = formex.getIn(values, imageResizeFormat) ?? "original";
|
|
2152
|
+
$[46] = imageResizeFormat;
|
|
2153
|
+
$[47] = values;
|
|
2154
|
+
$[48] = t232;
|
|
2155
|
+
} else {
|
|
2156
|
+
t232 = $[48];
|
|
2157
|
+
}
|
|
2158
|
+
const imageResizeFormatValue = t232;
|
|
2159
|
+
const imageResizeQualityValue = formex.getIn(values, imageResizeQuality);
|
|
2160
|
+
let t242;
|
|
2161
|
+
if ($[49] !== acceptedFiles || $[50] !== values) {
|
|
2162
|
+
t242 = formex.getIn(values, acceptedFiles);
|
|
2163
|
+
$[49] = acceptedFiles;
|
|
2164
|
+
$[50] = values;
|
|
2165
|
+
$[51] = t242;
|
|
2166
|
+
} else {
|
|
2167
|
+
t242 = $[51];
|
|
2168
|
+
}
|
|
2169
|
+
const storedValue = t242;
|
|
2094
2170
|
const fileTypesValue = Array.isArray(storedValue) ? storedValue : void 0;
|
|
2095
2171
|
const allFileTypesSelected = !fileTypesValue || fileTypesValue.length === 0;
|
|
2096
|
-
let
|
|
2097
|
-
if ($[
|
|
2098
|
-
|
|
2172
|
+
let t252;
|
|
2173
|
+
if ($[52] !== acceptedFiles || $[53] !== setFieldValue) {
|
|
2174
|
+
t252 = (value) => {
|
|
2099
2175
|
if (!value) {
|
|
2100
2176
|
setFieldValue(acceptedFiles, void 0);
|
|
2101
2177
|
} else {
|
|
2102
2178
|
setFieldValue(acceptedFiles, value);
|
|
2103
2179
|
}
|
|
2104
2180
|
};
|
|
2105
|
-
$[
|
|
2106
|
-
$[
|
|
2107
|
-
$[
|
|
2181
|
+
$[52] = acceptedFiles;
|
|
2182
|
+
$[53] = setFieldValue;
|
|
2183
|
+
$[54] = t252;
|
|
2108
2184
|
} else {
|
|
2109
|
-
|
|
2185
|
+
t252 = $[54];
|
|
2110
2186
|
}
|
|
2111
|
-
const handleTypesChange =
|
|
2187
|
+
const handleTypesChange = t252;
|
|
2112
2188
|
const hasFilenameCallback = typeof fileNameValue === "function";
|
|
2113
2189
|
const hasStoragePathCallback = typeof storagePathValue === "function";
|
|
2114
|
-
|
|
2190
|
+
t21 = "col-span-12";
|
|
2115
2191
|
T1 = ui.ExpandablePanel;
|
|
2116
|
-
if ($[
|
|
2117
|
-
|
|
2192
|
+
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2193
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
2118
2194
|
/* @__PURE__ */ jsxRuntime.jsx(ui.CloudUploadIcon, {}),
|
|
2119
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-
|
|
2195
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-4", children: "File upload config" })
|
|
2120
2196
|
] });
|
|
2121
|
-
$[
|
|
2197
|
+
$[55] = t20;
|
|
2122
2198
|
} else {
|
|
2123
|
-
|
|
2199
|
+
t20 = $[55];
|
|
2124
2200
|
}
|
|
2125
|
-
|
|
2126
|
-
let
|
|
2127
|
-
if ($[
|
|
2128
|
-
|
|
2129
|
-
$[
|
|
2130
|
-
$[
|
|
2201
|
+
t10 = "grid grid-cols-12 gap-2 p-4";
|
|
2202
|
+
let t262;
|
|
2203
|
+
if ($[56] !== fileTypesValue) {
|
|
2204
|
+
t262 = fileTypesValue ?? [];
|
|
2205
|
+
$[56] = fileTypesValue;
|
|
2206
|
+
$[57] = t262;
|
|
2131
2207
|
} else {
|
|
2132
|
-
|
|
2208
|
+
t262 = $[57];
|
|
2133
2209
|
}
|
|
2134
|
-
const
|
|
2135
|
-
let
|
|
2136
|
-
if ($[
|
|
2137
|
-
|
|
2138
|
-
const [value_0, label] =
|
|
2210
|
+
const t272 = allFileTypesSelected ? void 0 : "Allowed file types";
|
|
2211
|
+
let t282;
|
|
2212
|
+
if ($[58] !== acceptedFiles || $[59] !== setFieldValue) {
|
|
2213
|
+
t282 = Object.entries(fileTypes).map((t293) => {
|
|
2214
|
+
const [value_0, label] = t293;
|
|
2139
2215
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.MultiSelectItem, { value: value_0, className: "flex items-center gap-2", children: [
|
|
2140
2216
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: label }),
|
|
2141
2217
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "text", onClick: (e) => {
|
|
@@ -2145,50 +2221,50 @@
|
|
|
2145
2221
|
}, children: "Only" })
|
|
2146
2222
|
] }, value_0);
|
|
2147
2223
|
});
|
|
2148
|
-
$[
|
|
2149
|
-
$[
|
|
2150
|
-
$[
|
|
2224
|
+
$[58] = acceptedFiles;
|
|
2225
|
+
$[59] = setFieldValue;
|
|
2226
|
+
$[60] = t282;
|
|
2151
2227
|
} else {
|
|
2152
|
-
|
|
2228
|
+
t282 = $[60];
|
|
2153
2229
|
}
|
|
2154
|
-
if ($[
|
|
2155
|
-
|
|
2156
|
-
$[
|
|
2157
|
-
$[
|
|
2158
|
-
$[
|
|
2159
|
-
$[
|
|
2160
|
-
$[
|
|
2161
|
-
$[
|
|
2162
|
-
$[
|
|
2230
|
+
if ($[61] !== acceptedFiles || $[62] !== disabled || $[63] !== handleTypesChange || $[64] !== t262 || $[65] !== t272 || $[66] !== t282) {
|
|
2231
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t262, onValueChange: handleTypesChange, label: t272, renderValues: _temp3$4, children: t282 }) });
|
|
2232
|
+
$[61] = acceptedFiles;
|
|
2233
|
+
$[62] = disabled;
|
|
2234
|
+
$[63] = handleTypesChange;
|
|
2235
|
+
$[64] = t262;
|
|
2236
|
+
$[65] = t272;
|
|
2237
|
+
$[66] = t282;
|
|
2238
|
+
$[67] = t11;
|
|
2163
2239
|
} else {
|
|
2164
|
-
|
|
2240
|
+
t11 = $[67];
|
|
2165
2241
|
}
|
|
2166
|
-
const
|
|
2167
|
-
const
|
|
2168
|
-
if ($[
|
|
2169
|
-
|
|
2170
|
-
$[
|
|
2171
|
-
$[
|
|
2172
|
-
$[
|
|
2173
|
-
$[
|
|
2242
|
+
const t292 = hasFilenameCallback || disabled;
|
|
2243
|
+
const t302 = hasFilenameCallback ? "-" : fileNameValue;
|
|
2244
|
+
if ($[68] !== fileName || $[69] !== t292 || $[70] !== t302) {
|
|
2245
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: fileName, as: ui.DebouncedTextField, label: "File name", size: "small", disabled: t292, value: t302 }) });
|
|
2246
|
+
$[68] = fileName;
|
|
2247
|
+
$[69] = t292;
|
|
2248
|
+
$[70] = t302;
|
|
2249
|
+
$[71] = t12;
|
|
2174
2250
|
} else {
|
|
2175
|
-
|
|
2251
|
+
t12 = $[71];
|
|
2176
2252
|
}
|
|
2177
|
-
const
|
|
2178
|
-
const
|
|
2179
|
-
let
|
|
2180
|
-
if ($[
|
|
2181
|
-
|
|
2182
|
-
$[
|
|
2183
|
-
$[
|
|
2184
|
-
$[
|
|
2185
|
-
$[
|
|
2253
|
+
const t312 = hasStoragePathCallback || disabled;
|
|
2254
|
+
const t322 = hasStoragePathCallback ? "-" : storagePathValue;
|
|
2255
|
+
let t33;
|
|
2256
|
+
if ($[72] !== storagePath || $[73] !== t312 || $[74] !== t322) {
|
|
2257
|
+
t33 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: storagePath, as: ui.DebouncedTextField, label: "Storage path", disabled: t312, size: "small", value: t322 });
|
|
2258
|
+
$[72] = storagePath;
|
|
2259
|
+
$[73] = t312;
|
|
2260
|
+
$[74] = t322;
|
|
2261
|
+
$[75] = t33;
|
|
2186
2262
|
} else {
|
|
2187
|
-
|
|
2263
|
+
t33 = $[75];
|
|
2188
2264
|
}
|
|
2189
|
-
let
|
|
2190
|
-
if ($[
|
|
2191
|
-
|
|
2265
|
+
let t34;
|
|
2266
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2267
|
+
t34 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "ml-3.5 mt-1 mb-2", children: [
|
|
2192
2268
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "You can use the following placeholders in the file name and storage path values:" }),
|
|
2193
2269
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { children: [
|
|
2194
2270
|
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "{file} - Full name of the uploaded file" }),
|
|
@@ -2200,220 +2276,445 @@
|
|
|
2200
2276
|
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "{rand} - Random value used to avoid name collisions" })
|
|
2201
2277
|
] })
|
|
2202
2278
|
] });
|
|
2203
|
-
$[
|
|
2279
|
+
$[76] = t34;
|
|
2204
2280
|
} else {
|
|
2205
|
-
|
|
2281
|
+
t34 = $[76];
|
|
2206
2282
|
}
|
|
2207
|
-
let
|
|
2208
|
-
if ($[
|
|
2209
|
-
|
|
2283
|
+
let t35;
|
|
2284
|
+
if ($[77] !== disabled || $[78] !== existing) {
|
|
2285
|
+
t35 = (t362) => {
|
|
2210
2286
|
const {
|
|
2211
2287
|
field,
|
|
2212
2288
|
form
|
|
2213
|
-
} =
|
|
2289
|
+
} = t362;
|
|
2214
2290
|
return /* @__PURE__ */ jsxRuntime.jsx(SwitchControl, { label: "Save URL instead of storage path", disabled: existing || disabled, form, field });
|
|
2215
2291
|
};
|
|
2216
|
-
$[
|
|
2217
|
-
$[
|
|
2218
|
-
$[
|
|
2292
|
+
$[77] = disabled;
|
|
2293
|
+
$[78] = existing;
|
|
2294
|
+
$[79] = t35;
|
|
2219
2295
|
} else {
|
|
2220
|
-
|
|
2296
|
+
t35 = $[79];
|
|
2221
2297
|
}
|
|
2222
|
-
let
|
|
2223
|
-
if ($[
|
|
2224
|
-
|
|
2225
|
-
$[
|
|
2226
|
-
$[
|
|
2227
|
-
$[
|
|
2298
|
+
let t36;
|
|
2299
|
+
if ($[80] !== storeUrl || $[81] !== t35) {
|
|
2300
|
+
t36 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: storeUrl, type: "checkbox", children: t35 });
|
|
2301
|
+
$[80] = storeUrl;
|
|
2302
|
+
$[81] = t35;
|
|
2303
|
+
$[82] = t36;
|
|
2228
2304
|
} else {
|
|
2229
|
-
|
|
2305
|
+
t36 = $[82];
|
|
2230
2306
|
}
|
|
2231
|
-
let
|
|
2232
|
-
if ($[
|
|
2233
|
-
|
|
2234
|
-
$[
|
|
2307
|
+
let t37;
|
|
2308
|
+
if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2309
|
+
t37 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "ml-3.5 mt-1 mb-2", children: "Turn this setting on, if you prefer to save the download URL of the uploaded file instead of the storage path. You can only change this prop upon creation." });
|
|
2310
|
+
$[83] = t37;
|
|
2235
2311
|
} else {
|
|
2236
|
-
|
|
2312
|
+
t37 = $[83];
|
|
2237
2313
|
}
|
|
2238
|
-
if ($[
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2314
|
+
if ($[84] !== t33 || $[85] !== t36) {
|
|
2315
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
2316
|
+
t33,
|
|
2317
|
+
t34,
|
|
2318
|
+
t36,
|
|
2319
|
+
t37
|
|
2244
2320
|
] });
|
|
2245
|
-
$[
|
|
2246
|
-
$[
|
|
2247
|
-
$[
|
|
2321
|
+
$[84] = t33;
|
|
2322
|
+
$[85] = t36;
|
|
2323
|
+
$[86] = t13;
|
|
2248
2324
|
} else {
|
|
2249
|
-
|
|
2325
|
+
t13 = $[86];
|
|
2250
2326
|
}
|
|
2251
|
-
|
|
2327
|
+
const t38 = maxSizeValue !== void 0 && maxSizeValue !== null ? maxSizeValue.toString() : "";
|
|
2328
|
+
let t39;
|
|
2329
|
+
if ($[87] !== maxSize || $[88] !== setFieldValue) {
|
|
2330
|
+
t39 = (e_0) => {
|
|
2331
|
+
const value_1 = e_0.target.value;
|
|
2332
|
+
if (value_1 === "") {
|
|
2333
|
+
setFieldValue(maxSize, void 0);
|
|
2334
|
+
} else {
|
|
2335
|
+
setFieldValue(maxSize, parseInt(value_1));
|
|
2336
|
+
}
|
|
2337
|
+
};
|
|
2338
|
+
$[87] = maxSize;
|
|
2339
|
+
$[88] = setFieldValue;
|
|
2340
|
+
$[89] = t39;
|
|
2341
|
+
} else {
|
|
2342
|
+
t39 = $[89];
|
|
2343
|
+
}
|
|
2344
|
+
if ($[90] !== maxSize || $[91] !== t38 || $[92] !== t39) {
|
|
2345
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DebouncedTextField, { name: maxSize, type: "number", label: "Max size (in bytes)", size: "small", value: t38, onChange: t39 }) });
|
|
2346
|
+
$[90] = maxSize;
|
|
2347
|
+
$[91] = t38;
|
|
2348
|
+
$[92] = t39;
|
|
2349
|
+
$[93] = t14;
|
|
2350
|
+
} else {
|
|
2351
|
+
t14 = $[93];
|
|
2352
|
+
}
|
|
2353
|
+
if ($[94] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2354
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
2355
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", color: "secondary", className: "mb-2 block", children: "Image Resize Configuration" }),
|
|
2356
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "mb-2 block text-xs", children: "Automatically resize and optimize images before upload (JPEG, PNG, WebP only)" })
|
|
2357
|
+
] });
|
|
2358
|
+
$[94] = t15;
|
|
2359
|
+
} else {
|
|
2360
|
+
t15 = $[94];
|
|
2361
|
+
}
|
|
2362
|
+
const t40 = imageResizeMaxWidthValue !== void 0 && imageResizeMaxWidthValue !== null ? imageResizeMaxWidthValue.toString() : "";
|
|
2363
|
+
let t41;
|
|
2364
|
+
if ($[95] !== imageResizeMaxWidth || $[96] !== setFieldValue) {
|
|
2365
|
+
t41 = (e_1) => {
|
|
2366
|
+
const value_2 = e_1.target.value;
|
|
2367
|
+
if (value_2 === "") {
|
|
2368
|
+
setFieldValue(imageResizeMaxWidth, void 0);
|
|
2369
|
+
} else {
|
|
2370
|
+
setFieldValue(imageResizeMaxWidth, parseInt(value_2));
|
|
2371
|
+
}
|
|
2372
|
+
};
|
|
2373
|
+
$[95] = imageResizeMaxWidth;
|
|
2374
|
+
$[96] = setFieldValue;
|
|
2375
|
+
$[97] = t41;
|
|
2376
|
+
} else {
|
|
2377
|
+
t41 = $[97];
|
|
2378
|
+
}
|
|
2379
|
+
if ($[98] !== disabled || $[99] !== imageResizeMaxWidth || $[100] !== t40 || $[101] !== t41) {
|
|
2380
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DebouncedTextField, { name: imageResizeMaxWidth, type: "number", label: "Max width (px)", size: "small", disabled, value: t40, onChange: t41 }) });
|
|
2381
|
+
$[98] = disabled;
|
|
2382
|
+
$[99] = imageResizeMaxWidth;
|
|
2383
|
+
$[100] = t40;
|
|
2384
|
+
$[101] = t41;
|
|
2385
|
+
$[102] = t16;
|
|
2386
|
+
} else {
|
|
2387
|
+
t16 = $[102];
|
|
2388
|
+
}
|
|
2389
|
+
const t42 = imageResizeMaxHeightValue !== void 0 && imageResizeMaxHeightValue !== null ? imageResizeMaxHeightValue.toString() : "";
|
|
2390
|
+
let t43;
|
|
2391
|
+
if ($[103] !== imageResizeMaxHeight || $[104] !== setFieldValue) {
|
|
2392
|
+
t43 = (e_2) => {
|
|
2393
|
+
const value_3 = e_2.target.value;
|
|
2394
|
+
if (value_3 === "") {
|
|
2395
|
+
setFieldValue(imageResizeMaxHeight, void 0);
|
|
2396
|
+
} else {
|
|
2397
|
+
setFieldValue(imageResizeMaxHeight, parseInt(value_3));
|
|
2398
|
+
}
|
|
2399
|
+
};
|
|
2400
|
+
$[103] = imageResizeMaxHeight;
|
|
2401
|
+
$[104] = setFieldValue;
|
|
2402
|
+
$[105] = t43;
|
|
2403
|
+
} else {
|
|
2404
|
+
t43 = $[105];
|
|
2405
|
+
}
|
|
2406
|
+
if ($[106] !== disabled || $[107] !== imageResizeMaxHeight || $[108] !== t42 || $[109] !== t43) {
|
|
2407
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DebouncedTextField, { name: imageResizeMaxHeight, type: "number", label: "Max height (px)", size: "small", disabled, value: t42, onChange: t43 }) });
|
|
2408
|
+
$[106] = disabled;
|
|
2409
|
+
$[107] = imageResizeMaxHeight;
|
|
2410
|
+
$[108] = t42;
|
|
2411
|
+
$[109] = t43;
|
|
2412
|
+
$[110] = t17;
|
|
2413
|
+
} else {
|
|
2414
|
+
t17 = $[110];
|
|
2415
|
+
}
|
|
2416
|
+
const t44 = imageResizeModeValue || "cover";
|
|
2417
|
+
let t45;
|
|
2418
|
+
if ($[111] !== imageResizeMode || $[112] !== setFieldValue) {
|
|
2419
|
+
t45 = (value_4) => setFieldValue(imageResizeMode, value_4 || "cover");
|
|
2420
|
+
$[111] = imageResizeMode;
|
|
2421
|
+
$[112] = setFieldValue;
|
|
2422
|
+
$[113] = t45;
|
|
2423
|
+
} else {
|
|
2424
|
+
t45 = $[113];
|
|
2425
|
+
}
|
|
2426
|
+
let t46;
|
|
2427
|
+
let t47;
|
|
2428
|
+
if ($[114] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2429
|
+
t46 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "contain", children: "Contain (fit within bounds)" });
|
|
2430
|
+
t47 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "cover", children: "Cover (fill bounds, may crop)" });
|
|
2431
|
+
$[114] = t46;
|
|
2432
|
+
$[115] = t47;
|
|
2433
|
+
} else {
|
|
2434
|
+
t46 = $[114];
|
|
2435
|
+
t47 = $[115];
|
|
2436
|
+
}
|
|
2437
|
+
if ($[116] !== disabled || $[117] !== imageResizeMode || $[118] !== t44 || $[119] !== t45) {
|
|
2438
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { disabled, name: imageResizeMode, fullWidth: true, size: "medium", value: t44, onValueChange: t45, label: "Resize mode", renderValue: _temp4$2, children: [
|
|
2439
|
+
t46,
|
|
2440
|
+
t47
|
|
2441
|
+
] }) });
|
|
2442
|
+
$[116] = disabled;
|
|
2443
|
+
$[117] = imageResizeMode;
|
|
2444
|
+
$[118] = t44;
|
|
2445
|
+
$[119] = t45;
|
|
2446
|
+
$[120] = t18;
|
|
2447
|
+
} else {
|
|
2448
|
+
t18 = $[120];
|
|
2449
|
+
}
|
|
2450
|
+
const t48 = imageResizeFormatValue || "original";
|
|
2451
|
+
let t49;
|
|
2452
|
+
if ($[121] !== imageResizeFormat || $[122] !== setFieldValue) {
|
|
2453
|
+
t49 = (value_5) => setFieldValue(imageResizeFormat, value_5 || "original");
|
|
2454
|
+
$[121] = imageResizeFormat;
|
|
2455
|
+
$[122] = setFieldValue;
|
|
2456
|
+
$[123] = t49;
|
|
2457
|
+
} else {
|
|
2458
|
+
t49 = $[123];
|
|
2459
|
+
}
|
|
2460
|
+
let t50;
|
|
2461
|
+
let t51;
|
|
2462
|
+
let t52;
|
|
2463
|
+
let t53;
|
|
2464
|
+
if ($[124] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2465
|
+
t50 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "original", children: "Original (keep same format)" });
|
|
2466
|
+
t51 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "jpeg", children: "JPEG" });
|
|
2467
|
+
t52 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "png", children: "PNG" });
|
|
2468
|
+
t53 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "webp", children: "WebP (best compression)" });
|
|
2469
|
+
$[124] = t50;
|
|
2470
|
+
$[125] = t51;
|
|
2471
|
+
$[126] = t52;
|
|
2472
|
+
$[127] = t53;
|
|
2473
|
+
} else {
|
|
2474
|
+
t50 = $[124];
|
|
2475
|
+
t51 = $[125];
|
|
2476
|
+
t52 = $[126];
|
|
2477
|
+
t53 = $[127];
|
|
2478
|
+
}
|
|
2479
|
+
if ($[128] !== disabled || $[129] !== imageResizeFormat || $[130] !== t48 || $[131] !== t49) {
|
|
2480
|
+
t19 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { disabled, size: "medium", fullWidth: true, name: imageResizeFormat, value: t48, onValueChange: t49, label: "Output format", renderValue: _temp5, children: [
|
|
2481
|
+
t50,
|
|
2482
|
+
t51,
|
|
2483
|
+
t52,
|
|
2484
|
+
t53
|
|
2485
|
+
] }) });
|
|
2486
|
+
$[128] = disabled;
|
|
2487
|
+
$[129] = imageResizeFormat;
|
|
2488
|
+
$[130] = t48;
|
|
2489
|
+
$[131] = t49;
|
|
2490
|
+
$[132] = t19;
|
|
2491
|
+
} else {
|
|
2492
|
+
t19 = $[132];
|
|
2493
|
+
}
|
|
2494
|
+
t9 = "col-span-12";
|
|
2252
2495
|
T0 = ui.DebouncedTextField;
|
|
2253
|
-
t3 =
|
|
2496
|
+
t3 = imageResizeQuality;
|
|
2254
2497
|
t4 = "number";
|
|
2255
|
-
t5 = "
|
|
2498
|
+
t5 = "Quality (0-100)";
|
|
2256
2499
|
t6 = "small";
|
|
2257
|
-
t7 =
|
|
2500
|
+
t7 = disabled;
|
|
2501
|
+
t8 = imageResizeQualityValue !== void 0 && imageResizeQualityValue !== null ? imageResizeQualityValue.toString() : "";
|
|
2258
2502
|
$[6] = acceptedFiles;
|
|
2259
2503
|
$[7] = disabled;
|
|
2260
2504
|
$[8] = existing;
|
|
2261
2505
|
$[9] = fileName;
|
|
2262
2506
|
$[10] = fileNameValue;
|
|
2263
|
-
$[11] =
|
|
2264
|
-
$[12] =
|
|
2265
|
-
$[13] =
|
|
2266
|
-
$[14] =
|
|
2267
|
-
$[15] =
|
|
2268
|
-
$[16] =
|
|
2269
|
-
$[17] =
|
|
2270
|
-
$[18] =
|
|
2271
|
-
$[19] =
|
|
2272
|
-
$[20] =
|
|
2273
|
-
$[21] =
|
|
2274
|
-
$[22] =
|
|
2275
|
-
$[23] =
|
|
2276
|
-
$[24] =
|
|
2277
|
-
$[25] =
|
|
2278
|
-
$[26] =
|
|
2279
|
-
$[27] =
|
|
2280
|
-
$[28] =
|
|
2281
|
-
$[29] =
|
|
2282
|
-
$[30] =
|
|
2507
|
+
$[11] = imageResizeFormat;
|
|
2508
|
+
$[12] = imageResizeMaxHeight;
|
|
2509
|
+
$[13] = imageResizeMaxWidth;
|
|
2510
|
+
$[14] = imageResizeMode;
|
|
2511
|
+
$[15] = imageResizeQuality;
|
|
2512
|
+
$[16] = maxSize;
|
|
2513
|
+
$[17] = setFieldValue;
|
|
2514
|
+
$[18] = storagePath;
|
|
2515
|
+
$[19] = storagePathValue;
|
|
2516
|
+
$[20] = storeUrl;
|
|
2517
|
+
$[21] = values;
|
|
2518
|
+
$[22] = T0;
|
|
2519
|
+
$[23] = T1;
|
|
2520
|
+
$[24] = t10;
|
|
2521
|
+
$[25] = t11;
|
|
2522
|
+
$[26] = t12;
|
|
2523
|
+
$[27] = t13;
|
|
2524
|
+
$[28] = t14;
|
|
2525
|
+
$[29] = t15;
|
|
2526
|
+
$[30] = t16;
|
|
2527
|
+
$[31] = t17;
|
|
2528
|
+
$[32] = t18;
|
|
2529
|
+
$[33] = t19;
|
|
2530
|
+
$[34] = t20;
|
|
2531
|
+
$[35] = t21;
|
|
2532
|
+
$[36] = t3;
|
|
2533
|
+
$[37] = t4;
|
|
2534
|
+
$[38] = t5;
|
|
2535
|
+
$[39] = t6;
|
|
2536
|
+
$[40] = t7;
|
|
2537
|
+
$[41] = t8;
|
|
2538
|
+
$[42] = t9;
|
|
2283
2539
|
} else {
|
|
2284
|
-
T0 = $[
|
|
2285
|
-
T1 = $[
|
|
2286
|
-
t10 = $[
|
|
2287
|
-
t11 = $[
|
|
2288
|
-
t12 = $[
|
|
2289
|
-
t13 = $[
|
|
2290
|
-
t14 = $[
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2540
|
+
T0 = $[22];
|
|
2541
|
+
T1 = $[23];
|
|
2542
|
+
t10 = $[24];
|
|
2543
|
+
t11 = $[25];
|
|
2544
|
+
t12 = $[26];
|
|
2545
|
+
t13 = $[27];
|
|
2546
|
+
t14 = $[28];
|
|
2547
|
+
t15 = $[29];
|
|
2548
|
+
t16 = $[30];
|
|
2549
|
+
t17 = $[31];
|
|
2550
|
+
t18 = $[32];
|
|
2551
|
+
t19 = $[33];
|
|
2552
|
+
t20 = $[34];
|
|
2553
|
+
t21 = $[35];
|
|
2554
|
+
t3 = $[36];
|
|
2555
|
+
t4 = $[37];
|
|
2556
|
+
t5 = $[38];
|
|
2557
|
+
t6 = $[39];
|
|
2558
|
+
t7 = $[40];
|
|
2559
|
+
t8 = $[41];
|
|
2560
|
+
t9 = $[42];
|
|
2298
2561
|
}
|
|
2299
|
-
let
|
|
2300
|
-
if ($[
|
|
2301
|
-
|
|
2302
|
-
const
|
|
2303
|
-
if (
|
|
2304
|
-
setFieldValue(
|
|
2562
|
+
let t22;
|
|
2563
|
+
if ($[133] !== imageResizeQuality || $[134] !== setFieldValue) {
|
|
2564
|
+
t22 = (e_3) => {
|
|
2565
|
+
const value_6 = e_3.target.value;
|
|
2566
|
+
if (value_6 === "") {
|
|
2567
|
+
setFieldValue(imageResizeQuality, void 0);
|
|
2305
2568
|
} else {
|
|
2306
|
-
|
|
2569
|
+
const numValue = parseInt(value_6);
|
|
2570
|
+
if (numValue >= 0 && numValue <= 100) {
|
|
2571
|
+
setFieldValue(imageResizeQuality, numValue);
|
|
2572
|
+
}
|
|
2307
2573
|
}
|
|
2308
2574
|
};
|
|
2309
|
-
$[
|
|
2310
|
-
$[
|
|
2311
|
-
$[
|
|
2575
|
+
$[133] = imageResizeQuality;
|
|
2576
|
+
$[134] = setFieldValue;
|
|
2577
|
+
$[135] = t22;
|
|
2312
2578
|
} else {
|
|
2313
|
-
|
|
2579
|
+
t22 = $[135];
|
|
2314
2580
|
}
|
|
2315
|
-
let
|
|
2316
|
-
if ($[
|
|
2317
|
-
|
|
2318
|
-
$[
|
|
2319
|
-
$[
|
|
2320
|
-
$[
|
|
2321
|
-
$[
|
|
2322
|
-
$[
|
|
2323
|
-
$[
|
|
2324
|
-
$[
|
|
2325
|
-
$[
|
|
2581
|
+
let t23;
|
|
2582
|
+
if ($[136] !== T0 || $[137] !== t22 || $[138] !== t3 || $[139] !== t4 || $[140] !== t5 || $[141] !== t6 || $[142] !== t7 || $[143] !== t8) {
|
|
2583
|
+
t23 = /* @__PURE__ */ jsxRuntime.jsx(T0, { name: t3, type: t4, label: t5, size: t6, disabled: t7, value: t8, onChange: t22 });
|
|
2584
|
+
$[136] = T0;
|
|
2585
|
+
$[137] = t22;
|
|
2586
|
+
$[138] = t3;
|
|
2587
|
+
$[139] = t4;
|
|
2588
|
+
$[140] = t5;
|
|
2589
|
+
$[141] = t6;
|
|
2590
|
+
$[142] = t7;
|
|
2591
|
+
$[143] = t8;
|
|
2592
|
+
$[144] = t23;
|
|
2326
2593
|
} else {
|
|
2327
|
-
|
|
2594
|
+
t23 = $[144];
|
|
2328
2595
|
}
|
|
2329
|
-
let
|
|
2330
|
-
if ($[
|
|
2331
|
-
|
|
2332
|
-
$[
|
|
2333
|
-
$[81] = t8;
|
|
2334
|
-
$[82] = t17;
|
|
2596
|
+
let t24;
|
|
2597
|
+
if ($[145] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2598
|
+
t24 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "ml-3.5 mt-1 mb-2", children: "Higher quality = larger file size. Recommended: 80-90 for photos, 90-100 for graphics" });
|
|
2599
|
+
$[145] = t24;
|
|
2335
2600
|
} else {
|
|
2336
|
-
|
|
2601
|
+
t24 = $[145];
|
|
2337
2602
|
}
|
|
2338
|
-
let
|
|
2339
|
-
if ($[
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
t12,
|
|
2344
|
-
t17
|
|
2603
|
+
let t25;
|
|
2604
|
+
if ($[146] !== t23 || $[147] !== t9) {
|
|
2605
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
|
|
2606
|
+
t23,
|
|
2607
|
+
t24
|
|
2345
2608
|
] });
|
|
2346
|
-
$[
|
|
2347
|
-
$[
|
|
2348
|
-
$[
|
|
2349
|
-
$[86] = t17;
|
|
2350
|
-
$[87] = t9;
|
|
2351
|
-
$[88] = t18;
|
|
2609
|
+
$[146] = t23;
|
|
2610
|
+
$[147] = t9;
|
|
2611
|
+
$[148] = t25;
|
|
2352
2612
|
} else {
|
|
2353
|
-
|
|
2613
|
+
t25 = $[148];
|
|
2354
2614
|
}
|
|
2355
|
-
let
|
|
2356
|
-
if ($[
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2615
|
+
let t26;
|
|
2616
|
+
if ($[149] !== t10 || $[150] !== t11 || $[151] !== t12 || $[152] !== t13 || $[153] !== t14 || $[154] !== t15 || $[155] !== t16 || $[156] !== t17 || $[157] !== t18 || $[158] !== t19 || $[159] !== t25) {
|
|
2617
|
+
t26 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t10, children: [
|
|
2618
|
+
t11,
|
|
2619
|
+
t12,
|
|
2620
|
+
t13,
|
|
2621
|
+
t14,
|
|
2622
|
+
t15,
|
|
2623
|
+
t16,
|
|
2624
|
+
t17,
|
|
2625
|
+
t18,
|
|
2626
|
+
t19,
|
|
2627
|
+
t25
|
|
2628
|
+
] });
|
|
2629
|
+
$[149] = t10;
|
|
2630
|
+
$[150] = t11;
|
|
2631
|
+
$[151] = t12;
|
|
2632
|
+
$[152] = t13;
|
|
2633
|
+
$[153] = t14;
|
|
2634
|
+
$[154] = t15;
|
|
2635
|
+
$[155] = t16;
|
|
2636
|
+
$[156] = t17;
|
|
2637
|
+
$[157] = t18;
|
|
2638
|
+
$[158] = t19;
|
|
2639
|
+
$[159] = t25;
|
|
2640
|
+
$[160] = t26;
|
|
2641
|
+
} else {
|
|
2642
|
+
t26 = $[160];
|
|
2643
|
+
}
|
|
2644
|
+
let t27;
|
|
2645
|
+
if ($[161] !== T1 || $[162] !== t20 || $[163] !== t26) {
|
|
2646
|
+
t27 = /* @__PURE__ */ jsxRuntime.jsx(T1, { title: t20, children: t26 });
|
|
2647
|
+
$[161] = T1;
|
|
2648
|
+
$[162] = t20;
|
|
2649
|
+
$[163] = t26;
|
|
2650
|
+
$[164] = t27;
|
|
2362
2651
|
} else {
|
|
2363
|
-
|
|
2652
|
+
t27 = $[164];
|
|
2364
2653
|
}
|
|
2365
|
-
let
|
|
2366
|
-
if ($[
|
|
2367
|
-
|
|
2368
|
-
$[
|
|
2369
|
-
$[
|
|
2370
|
-
$[
|
|
2654
|
+
let t28;
|
|
2655
|
+
if ($[165] !== t21 || $[166] !== t27) {
|
|
2656
|
+
t28 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t21, children: t27 });
|
|
2657
|
+
$[165] = t21;
|
|
2658
|
+
$[166] = t27;
|
|
2659
|
+
$[167] = t28;
|
|
2371
2660
|
} else {
|
|
2372
|
-
|
|
2661
|
+
t28 = $[167];
|
|
2373
2662
|
}
|
|
2374
|
-
let
|
|
2375
|
-
if ($[
|
|
2376
|
-
|
|
2377
|
-
$[
|
|
2378
|
-
$[
|
|
2379
|
-
$[
|
|
2663
|
+
let t29;
|
|
2664
|
+
if ($[168] !== disabled || $[169] !== multiple) {
|
|
2665
|
+
t29 = !multiple && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(GeneralPropertyValidation, { disabled }) });
|
|
2666
|
+
$[168] = disabled;
|
|
2667
|
+
$[169] = multiple;
|
|
2668
|
+
$[170] = t29;
|
|
2380
2669
|
} else {
|
|
2381
|
-
|
|
2670
|
+
t29 = $[170];
|
|
2382
2671
|
}
|
|
2383
|
-
let
|
|
2384
|
-
if ($[
|
|
2385
|
-
|
|
2386
|
-
$[
|
|
2387
|
-
$[
|
|
2388
|
-
$[
|
|
2672
|
+
let t30;
|
|
2673
|
+
if ($[171] !== disabled || $[172] !== multiple) {
|
|
2674
|
+
t30 = multiple && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ArrayPropertyValidation, { disabled }) });
|
|
2675
|
+
$[171] = disabled;
|
|
2676
|
+
$[172] = multiple;
|
|
2677
|
+
$[173] = t30;
|
|
2389
2678
|
} else {
|
|
2390
|
-
|
|
2679
|
+
t30 = $[173];
|
|
2391
2680
|
}
|
|
2392
|
-
let
|
|
2393
|
-
if ($[
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2681
|
+
let t31;
|
|
2682
|
+
if ($[174] !== t29 || $[175] !== t30) {
|
|
2683
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ValidationPanel, { children: [
|
|
2684
|
+
t29,
|
|
2685
|
+
t30
|
|
2397
2686
|
] }) });
|
|
2398
|
-
$[
|
|
2399
|
-
$[
|
|
2400
|
-
$[
|
|
2687
|
+
$[174] = t29;
|
|
2688
|
+
$[175] = t30;
|
|
2689
|
+
$[176] = t31;
|
|
2401
2690
|
} else {
|
|
2402
|
-
|
|
2691
|
+
t31 = $[176];
|
|
2403
2692
|
}
|
|
2404
|
-
let
|
|
2405
|
-
if ($[
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2693
|
+
let t32;
|
|
2694
|
+
if ($[177] !== t28 || $[178] !== t31) {
|
|
2695
|
+
t32 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2696
|
+
t28,
|
|
2697
|
+
t31
|
|
2409
2698
|
] });
|
|
2410
|
-
$[
|
|
2411
|
-
$[
|
|
2412
|
-
$[
|
|
2699
|
+
$[177] = t28;
|
|
2700
|
+
$[178] = t31;
|
|
2701
|
+
$[179] = t32;
|
|
2413
2702
|
} else {
|
|
2414
|
-
|
|
2703
|
+
t32 = $[179];
|
|
2415
2704
|
}
|
|
2416
|
-
return
|
|
2705
|
+
return t32;
|
|
2706
|
+
}
|
|
2707
|
+
function _temp5(selected_1) {
|
|
2708
|
+
if (!selected_1) {
|
|
2709
|
+
return "Original";
|
|
2710
|
+
}
|
|
2711
|
+
return selected_1.charAt(0).toUpperCase() + selected_1.slice(1);
|
|
2712
|
+
}
|
|
2713
|
+
function _temp4$2(selected_0) {
|
|
2714
|
+
if (!selected_0) {
|
|
2715
|
+
return "Cover";
|
|
2716
|
+
}
|
|
2717
|
+
return selected_0 === "contain" ? "Contain (fit within bounds)" : "Cover (fill bounds, may crop)";
|
|
2417
2718
|
}
|
|
2418
2719
|
function _temp3$4(selected) {
|
|
2419
2720
|
if (!selected || selected.length === 0) {
|
|
@@ -2428,13 +2729,12 @@
|
|
|
2428
2729
|
return fileTypes[v];
|
|
2429
2730
|
}
|
|
2430
2731
|
function editableProperty(property) {
|
|
2431
|
-
if (core.isPropertyBuilder(property))
|
|
2432
|
-
|
|
2433
|
-
else {
|
|
2434
|
-
|
|
2435
|
-
if (
|
|
2436
|
-
|
|
2437
|
-
return Boolean(eProperty.editable);
|
|
2732
|
+
if (core.isPropertyBuilder(property)) {
|
|
2733
|
+
return false;
|
|
2734
|
+
} else {
|
|
2735
|
+
if (property.dataType === "array" && typeof property.of === "function") return false;
|
|
2736
|
+
else if (property.dataType === "array" && Array.isArray(property.of)) return false;
|
|
2737
|
+
return property.editable === void 0 ? true : Boolean(property.editable);
|
|
2438
2738
|
}
|
|
2439
2739
|
}
|
|
2440
2740
|
function removeNonEditableProperties(properties) {
|
|
@@ -2506,14 +2806,14 @@
|
|
|
2506
2806
|
}
|
|
2507
2807
|
let t6;
|
|
2508
2808
|
if ($[9] !== includeName || $[10] !== property.name) {
|
|
2509
|
-
t6 = includeName && /* @__PURE__ */ jsxRuntime.jsx(core.ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "
|
|
2809
|
+
t6 = includeName && /* @__PURE__ */ jsxRuntime.jsx(core.ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", component: "span", className: "flex-grow pr-2", children: property.name ? property.name : " " }) });
|
|
2510
2810
|
$[9] = includeName;
|
|
2511
2811
|
$[10] = property.name;
|
|
2512
2812
|
$[11] = t6;
|
|
2513
2813
|
} else {
|
|
2514
2814
|
t6 = $[11];
|
|
2515
2815
|
}
|
|
2516
|
-
const t7 = includeName ? "body2" : "
|
|
2816
|
+
const t7 = includeName ? "body2" : "label";
|
|
2517
2817
|
const t8 = propertyConfig?.name;
|
|
2518
2818
|
let t9;
|
|
2519
2819
|
if ($[12] !== t7 || $[13] !== t8) {
|
|
@@ -2623,7 +2923,7 @@
|
|
|
2623
2923
|
}
|
|
2624
2924
|
let t3;
|
|
2625
2925
|
if ($[5] !== propertyConfig) {
|
|
2626
|
-
t3 = !propertyConfig && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8
|
|
2926
|
+
t3 = !propertyConfig && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 flex items-center justify-center rounded-full shadow text-white bg-surface-500", children: /* @__PURE__ */ jsxRuntime.jsx(ui.FunctionsIcon, { color: "inherit", size: "small" }) });
|
|
2627
2927
|
$[5] = propertyConfig;
|
|
2628
2928
|
$[6] = t3;
|
|
2629
2929
|
} else {
|
|
@@ -2665,7 +2965,7 @@
|
|
|
2665
2965
|
const t10 = property?.name ? property.name : name;
|
|
2666
2966
|
let t11;
|
|
2667
2967
|
if ($[15] !== t10) {
|
|
2668
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "
|
|
2968
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", component: "span", className: "flex-grow pr-2", children: t10 });
|
|
2669
2969
|
$[15] = t10;
|
|
2670
2970
|
$[16] = t11;
|
|
2671
2971
|
} else {
|
|
@@ -3775,7 +4075,7 @@
|
|
|
3775
4075
|
return t25;
|
|
3776
4076
|
});
|
|
3777
4077
|
function StringPropertyField(t0) {
|
|
3778
|
-
const $ = reactCompilerRuntime.c(
|
|
4078
|
+
const $ = reactCompilerRuntime.c(32);
|
|
3779
4079
|
const {
|
|
3780
4080
|
widgetId,
|
|
3781
4081
|
disabled,
|
|
@@ -3797,7 +4097,7 @@
|
|
|
3797
4097
|
}
|
|
3798
4098
|
let t2;
|
|
3799
4099
|
if ($[4] !== disabled || $[5] !== showErrors || $[6] !== widgetId) {
|
|
3800
|
-
t2 = widgetId === "
|
|
4100
|
+
t2 = widgetId === "user_select" && /* @__PURE__ */ jsxRuntime.jsx(StringPropertyValidation, { disabled, showErrors });
|
|
3801
4101
|
$[4] = disabled;
|
|
3802
4102
|
$[5] = showErrors;
|
|
3803
4103
|
$[6] = widgetId;
|
|
@@ -3807,7 +4107,7 @@
|
|
|
3807
4107
|
}
|
|
3808
4108
|
let t3;
|
|
3809
4109
|
if ($[8] !== disabled || $[9] !== showErrors || $[10] !== widgetId) {
|
|
3810
|
-
t3 = widgetId === "
|
|
4110
|
+
t3 = widgetId === "multiline" && /* @__PURE__ */ jsxRuntime.jsx(StringPropertyValidation, { disabled, length: true, lowercase: true, max: true, min: true, trim: true, uppercase: true, showErrors });
|
|
3811
4111
|
$[8] = disabled;
|
|
3812
4112
|
$[9] = showErrors;
|
|
3813
4113
|
$[10] = widgetId;
|
|
@@ -3816,60 +4116,72 @@
|
|
|
3816
4116
|
t3 = $[11];
|
|
3817
4117
|
}
|
|
3818
4118
|
let t4;
|
|
3819
|
-
if ($[12] !==
|
|
3820
|
-
t4 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
] }) });
|
|
3825
|
-
$[12] = t1;
|
|
3826
|
-
$[13] = t2;
|
|
3827
|
-
$[14] = t3;
|
|
4119
|
+
if ($[12] !== disabled || $[13] !== showErrors || $[14] !== widgetId) {
|
|
4120
|
+
t4 = widgetId === "email" && /* @__PURE__ */ jsxRuntime.jsx(StringPropertyValidation, { disabled, max: true, min: true, trim: true, showErrors });
|
|
4121
|
+
$[12] = disabled;
|
|
4122
|
+
$[13] = showErrors;
|
|
4123
|
+
$[14] = widgetId;
|
|
3828
4124
|
$[15] = t4;
|
|
3829
4125
|
} else {
|
|
3830
4126
|
t4 = $[15];
|
|
3831
4127
|
}
|
|
3832
4128
|
let t5;
|
|
3833
|
-
if ($[16] !==
|
|
3834
|
-
t5 = (
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
4129
|
+
if ($[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4) {
|
|
4130
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ValidationPanel, { children: [
|
|
4131
|
+
t1,
|
|
4132
|
+
t2,
|
|
4133
|
+
t3,
|
|
4134
|
+
t4
|
|
4135
|
+
] }) });
|
|
4136
|
+
$[16] = t1;
|
|
4137
|
+
$[17] = t2;
|
|
4138
|
+
$[18] = t3;
|
|
4139
|
+
$[19] = t4;
|
|
4140
|
+
$[20] = t5;
|
|
3839
4141
|
} else {
|
|
3840
|
-
t5 = $[
|
|
4142
|
+
t5 = $[20];
|
|
3841
4143
|
}
|
|
3842
4144
|
let t6;
|
|
3843
|
-
if ($[
|
|
3844
|
-
t6 =
|
|
3845
|
-
|
|
3846
|
-
|
|
4145
|
+
if ($[21] !== setFieldValue) {
|
|
4146
|
+
t6 = (e) => {
|
|
4147
|
+
setFieldValue("defaultValue", e.target.value === "" ? void 0 : e.target.value);
|
|
4148
|
+
};
|
|
4149
|
+
$[21] = setFieldValue;
|
|
4150
|
+
$[22] = t6;
|
|
3847
4151
|
} else {
|
|
3848
|
-
t6 = $[
|
|
4152
|
+
t6 = $[22];
|
|
3849
4153
|
}
|
|
3850
4154
|
let t7;
|
|
3851
|
-
if ($[
|
|
3852
|
-
t7 =
|
|
3853
|
-
$[
|
|
3854
|
-
$[
|
|
3855
|
-
$[22] = t6;
|
|
3856
|
-
$[23] = t7;
|
|
4155
|
+
if ($[23] !== values) {
|
|
4156
|
+
t7 = formex.getIn(values, "defaultValue") ?? "";
|
|
4157
|
+
$[23] = values;
|
|
4158
|
+
$[24] = t7;
|
|
3857
4159
|
} else {
|
|
3858
|
-
t7 = $[
|
|
4160
|
+
t7 = $[24];
|
|
3859
4161
|
}
|
|
3860
4162
|
let t8;
|
|
3861
|
-
if ($[
|
|
3862
|
-
t8 = /* @__PURE__ */ jsxRuntime.
|
|
3863
|
-
|
|
3864
|
-
|
|
4163
|
+
if ($[25] !== disabled || $[26] !== t6 || $[27] !== t7) {
|
|
4164
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { name: "defaultValue", disabled, onChange: t6, label: "Default value", value: t7 }) });
|
|
4165
|
+
$[25] = disabled;
|
|
4166
|
+
$[26] = t6;
|
|
4167
|
+
$[27] = t7;
|
|
4168
|
+
$[28] = t8;
|
|
4169
|
+
} else {
|
|
4170
|
+
t8 = $[28];
|
|
4171
|
+
}
|
|
4172
|
+
let t9;
|
|
4173
|
+
if ($[29] !== t5 || $[30] !== t8) {
|
|
4174
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4175
|
+
t5,
|
|
4176
|
+
t8
|
|
3865
4177
|
] });
|
|
3866
|
-
$[
|
|
3867
|
-
$[
|
|
3868
|
-
$[
|
|
4178
|
+
$[29] = t5;
|
|
4179
|
+
$[30] = t8;
|
|
4180
|
+
$[31] = t9;
|
|
3869
4181
|
} else {
|
|
3870
|
-
|
|
4182
|
+
t9 = $[31];
|
|
3871
4183
|
}
|
|
3872
|
-
return
|
|
4184
|
+
return t9;
|
|
3873
4185
|
}
|
|
3874
4186
|
function BooleanPropertyField(t0) {
|
|
3875
4187
|
const $ = reactCompilerRuntime.c(10);
|
|
@@ -4891,7 +5203,21 @@
|
|
|
4891
5203
|
markdown: void 0,
|
|
4892
5204
|
email: void 0,
|
|
4893
5205
|
url: void 0,
|
|
4894
|
-
enumValues: void 0
|
|
5206
|
+
enumValues: void 0,
|
|
5207
|
+
userSelect: void 0
|
|
5208
|
+
});
|
|
5209
|
+
} else if (selectedWidgetId === "user_select") {
|
|
5210
|
+
updatedProperty = core.mergeDeep(propertyData, {
|
|
5211
|
+
dataType: "string",
|
|
5212
|
+
propertyConfig: "user_select",
|
|
5213
|
+
editable: propertyData.editable !== void 0 ? propertyData.editable : true,
|
|
5214
|
+
storage: void 0,
|
|
5215
|
+
multiline: void 0,
|
|
5216
|
+
markdown: void 0,
|
|
5217
|
+
email: void 0,
|
|
5218
|
+
url: void 0,
|
|
5219
|
+
enumValues: void 0,
|
|
5220
|
+
userSelect: true
|
|
4895
5221
|
});
|
|
4896
5222
|
} else if (selectedWidgetId === "multiline") {
|
|
4897
5223
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
@@ -4903,7 +5229,8 @@
|
|
|
4903
5229
|
markdown: void 0,
|
|
4904
5230
|
email: void 0,
|
|
4905
5231
|
url: void 0,
|
|
4906
|
-
enumValues: void 0
|
|
5232
|
+
enumValues: void 0,
|
|
5233
|
+
userSelect: void 0
|
|
4907
5234
|
});
|
|
4908
5235
|
} else if (selectedWidgetId === "markdown") {
|
|
4909
5236
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
@@ -4914,7 +5241,8 @@
|
|
|
4914
5241
|
multiline: void 0,
|
|
4915
5242
|
markdown: true,
|
|
4916
5243
|
email: void 0,
|
|
4917
|
-
url: void 0
|
|
5244
|
+
url: void 0,
|
|
5245
|
+
userSelect: void 0
|
|
4918
5246
|
});
|
|
4919
5247
|
} else if (selectedWidgetId === "url") {
|
|
4920
5248
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
@@ -4926,7 +5254,8 @@
|
|
|
4926
5254
|
markdown: void 0,
|
|
4927
5255
|
email: void 0,
|
|
4928
5256
|
url: true,
|
|
4929
|
-
enumValues: void 0
|
|
5257
|
+
enumValues: void 0,
|
|
5258
|
+
userSelect: void 0
|
|
4930
5259
|
});
|
|
4931
5260
|
} else if (selectedWidgetId === "email") {
|
|
4932
5261
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
@@ -4938,7 +5267,8 @@
|
|
|
4938
5267
|
markdown: void 0,
|
|
4939
5268
|
email: true,
|
|
4940
5269
|
url: void 0,
|
|
4941
|
-
enumValues: void 0
|
|
5270
|
+
enumValues: void 0,
|
|
5271
|
+
userSelect: void 0
|
|
4942
5272
|
});
|
|
4943
5273
|
} else if (selectedWidgetId === "select") {
|
|
4944
5274
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
@@ -4950,7 +5280,8 @@
|
|
|
4950
5280
|
markdown: void 0,
|
|
4951
5281
|
email: void 0,
|
|
4952
5282
|
url: void 0,
|
|
4953
|
-
enumValues: propertyData.enumValues ?? []
|
|
5283
|
+
enumValues: propertyData.enumValues ?? [],
|
|
5284
|
+
userSelect: void 0
|
|
4954
5285
|
});
|
|
4955
5286
|
} else if (selectedWidgetId === "multi_select") {
|
|
4956
5287
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
@@ -5217,7 +5548,7 @@
|
|
|
5217
5548
|
}
|
|
5218
5549
|
}
|
|
5219
5550
|
}
|
|
5220
|
-
const supportedFieldsIds = ["text_field", "multiline", "markdown", "url", "email", "select", "multi_select", "number_input", "number_select", "multi_number_select", "file_upload", "multi_file_upload", "reference", "reference_as_string", "multi_references", "switch", "date_time", "group", "key_value", "repeat", "block"];
|
|
5551
|
+
const supportedFieldsIds = ["text_field", "multiline", "markdown", "url", "email", "user_select", "select", "multi_select", "number_input", "number_select", "multi_number_select", "file_upload", "multi_file_upload", "reference", "reference_as_string", "multi_references", "switch", "date_time", "group", "key_value", "repeat", "block"];
|
|
5221
5552
|
const supportedFields = Object.entries(core.DEFAULT_FIELD_CONFIGS).filter(([id]) => supportedFieldsIds.includes(id)).map(([id, config]) => ({
|
|
5222
5553
|
[id]: config
|
|
5223
5554
|
})).reduce((a, b) => ({
|
|
@@ -5286,7 +5617,7 @@
|
|
|
5286
5617
|
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5287
5618
|
t12 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
5288
5619
|
/* @__PURE__ */ jsxRuntime.jsx(ui.CloudUploadIcon, {}),
|
|
5289
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-
|
|
5620
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-4", children: "File upload config" })
|
|
5290
5621
|
] });
|
|
5291
5622
|
$[26] = t12;
|
|
5292
5623
|
} else {
|
|
@@ -5545,7 +5876,7 @@
|
|
|
5545
5876
|
const initialValue = t2;
|
|
5546
5877
|
let t3;
|
|
5547
5878
|
if ($[1] !== collectionEditable || $[2] !== property) {
|
|
5548
|
-
t3 = Boolean(property && !editableProperty(property))
|
|
5879
|
+
t3 = Boolean(property && !editableProperty(property)) || !collectionEditable;
|
|
5549
5880
|
$[1] = collectionEditable;
|
|
5550
5881
|
$[2] = property;
|
|
5551
5882
|
$[3] = t3;
|
|
@@ -5605,7 +5936,6 @@
|
|
|
5605
5936
|
let t7;
|
|
5606
5937
|
if ($[13] !== doOnPropertyChanged || $[14] !== existingProperty) {
|
|
5607
5938
|
t7 = (newPropertyWithId, controller) => {
|
|
5608
|
-
console.debug("onSubmit", newPropertyWithId);
|
|
5609
5939
|
const {
|
|
5610
5940
|
id: id_0,
|
|
5611
5941
|
...property_1
|
|
@@ -6024,7 +6354,7 @@
|
|
|
6024
6354
|
}
|
|
6025
6355
|
const onWidgetSelectChanged = t9;
|
|
6026
6356
|
let childComponent;
|
|
6027
|
-
if (selectedFieldConfigId === "text_field" || selectedFieldConfigId === "multiline" || selectedFieldConfigId === "email") {
|
|
6357
|
+
if (selectedFieldConfigId === "text_field" || selectedFieldConfigId === "multiline" || selectedFieldConfigId === "user_select" || selectedFieldConfigId === "email") {
|
|
6028
6358
|
let t102;
|
|
6029
6359
|
if ($[27] !== disabled || $[28] !== selectedFieldConfigId || $[29] !== showErrors) {
|
|
6030
6360
|
t102 = /* @__PURE__ */ jsxRuntime.jsx(StringPropertyField, { widgetId: selectedFieldConfigId, disabled, showErrors });
|
|
@@ -6270,9 +6600,11 @@
|
|
|
6270
6600
|
t10 = disabled && /* @__PURE__ */ jsxRuntime.jsxs(ui.InfoLabel, { mode: "warn", children: [
|
|
6271
6601
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: "This property can't be edited" }),
|
|
6272
6602
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
6273
|
-
"You may not have permission to edit it or it is defined in code with
|
|
6603
|
+
"You may not have permission to edit it or it is defined in code with the ",
|
|
6274
6604
|
/* @__PURE__ */ jsxRuntime.jsx("code", { children: "editable" }),
|
|
6275
|
-
" flag"
|
|
6605
|
+
" flag set to ",
|
|
6606
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { children: "false" }),
|
|
6607
|
+
"."
|
|
6276
6608
|
] })
|
|
6277
6609
|
] });
|
|
6278
6610
|
$[95] = disabled;
|
|
@@ -6457,6 +6789,7 @@
|
|
|
6457
6789
|
url: "Text",
|
|
6458
6790
|
email: "Text",
|
|
6459
6791
|
switch: "Boolean",
|
|
6792
|
+
user_select: "Users",
|
|
6460
6793
|
select: "Select",
|
|
6461
6794
|
multi_select: "Select",
|
|
6462
6795
|
number_input: "Number",
|
|
@@ -6732,7 +7065,7 @@
|
|
|
6732
7065
|
const t4 = shouldWarnChangingDataType ? "secondary" : void 0;
|
|
6733
7066
|
let t5;
|
|
6734
7067
|
if ($[6] !== propertyConfig.name || $[7] !== t4) {
|
|
6735
|
-
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: t4, children: propertyConfig.name });
|
|
7068
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", color: t4, children: propertyConfig.name });
|
|
6736
7069
|
$[6] = propertyConfig.name;
|
|
6737
7070
|
$[7] = t4;
|
|
6738
7071
|
$[8] = t5;
|
|
@@ -7132,13 +7465,6 @@
|
|
|
7132
7465
|
setFieldValue(previousPropertyPath, void 0, false);
|
|
7133
7466
|
setFieldTouched(previousPropertyPath, false, false);
|
|
7134
7467
|
}
|
|
7135
|
-
console.debug("onPropertyChanged", {
|
|
7136
|
-
id: id_0,
|
|
7137
|
-
property: property_0,
|
|
7138
|
-
previousId,
|
|
7139
|
-
namespace: namespace_3,
|
|
7140
|
-
propertyPath
|
|
7141
|
-
});
|
|
7142
7468
|
if (propertyPath) {
|
|
7143
7469
|
setFieldValue(propertyPath, property_0, false);
|
|
7144
7470
|
setFieldTouched(propertyPath, true, false);
|
|
@@ -7258,7 +7584,7 @@
|
|
|
7258
7584
|
}
|
|
7259
7585
|
let t6;
|
|
7260
7586
|
if ($[8] !== t4) {
|
|
7261
|
-
t6 = /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { children: [
|
|
7587
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { className: "mt-4", children: [
|
|
7262
7588
|
t4,
|
|
7263
7589
|
t5
|
|
7264
7590
|
] });
|
|
@@ -8984,104 +9310,106 @@
|
|
|
8984
9310
|
return t9;
|
|
8985
9311
|
}
|
|
8986
9312
|
function CollectionEditorImportDataPreview(t0) {
|
|
8987
|
-
const $ = reactCompilerRuntime.c(
|
|
9313
|
+
const $ = reactCompilerRuntime.c(20);
|
|
8988
9314
|
const {
|
|
8989
9315
|
importConfig,
|
|
8990
9316
|
properties,
|
|
8991
9317
|
propertiesOrder
|
|
8992
9318
|
} = t0;
|
|
8993
9319
|
const authController = core.useAuthController();
|
|
9320
|
+
const navigation = core.useNavigationController();
|
|
8994
9321
|
const [loading, setLoading] = React.useState(false);
|
|
8995
9322
|
let t1;
|
|
8996
|
-
if ($[0] !== authController || $[1] !== importConfig || $[2] !== properties) {
|
|
9323
|
+
if ($[0] !== authController || $[1] !== importConfig || $[2] !== navigation || $[3] !== properties) {
|
|
8997
9324
|
t1 = async function loadEntities2() {
|
|
8998
|
-
const mappedData = importConfig.importData.map((d) => data_import.convertDataToEntity(authController, d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
9325
|
+
const mappedData = importConfig.importData.map((d) => data_import.convertDataToEntity(authController, navigation, d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
8999
9326
|
importConfig.setEntities(mappedData);
|
|
9000
9327
|
};
|
|
9001
9328
|
$[0] = authController;
|
|
9002
9329
|
$[1] = importConfig;
|
|
9003
|
-
$[2] =
|
|
9004
|
-
$[3] =
|
|
9330
|
+
$[2] = navigation;
|
|
9331
|
+
$[3] = properties;
|
|
9332
|
+
$[4] = t1;
|
|
9005
9333
|
} else {
|
|
9006
|
-
t1 = $[
|
|
9334
|
+
t1 = $[4];
|
|
9007
9335
|
}
|
|
9008
9336
|
const loadEntities = t1;
|
|
9009
9337
|
let t2;
|
|
9010
|
-
if ($[
|
|
9338
|
+
if ($[5] !== loadEntities) {
|
|
9011
9339
|
t2 = () => {
|
|
9012
9340
|
loadEntities().finally(() => setLoading(false));
|
|
9013
9341
|
};
|
|
9014
|
-
$[
|
|
9015
|
-
$[
|
|
9342
|
+
$[5] = loadEntities;
|
|
9343
|
+
$[6] = t2;
|
|
9016
9344
|
} else {
|
|
9017
|
-
t2 = $[
|
|
9345
|
+
t2 = $[6];
|
|
9018
9346
|
}
|
|
9019
9347
|
let t3;
|
|
9020
|
-
if ($[
|
|
9348
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9021
9349
|
t3 = [];
|
|
9022
|
-
$[
|
|
9350
|
+
$[7] = t3;
|
|
9023
9351
|
} else {
|
|
9024
|
-
t3 = $[
|
|
9352
|
+
t3 = $[7];
|
|
9025
9353
|
}
|
|
9026
9354
|
React.useEffect(t2, t3);
|
|
9027
9355
|
const selectionController = core.useSelectionController();
|
|
9028
9356
|
if (loading) {
|
|
9029
9357
|
let t42;
|
|
9030
|
-
if ($[
|
|
9358
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9031
9359
|
t42 = /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {});
|
|
9032
|
-
$[
|
|
9360
|
+
$[8] = t42;
|
|
9033
9361
|
} else {
|
|
9034
|
-
t42 = $[
|
|
9362
|
+
t42 = $[8];
|
|
9035
9363
|
}
|
|
9036
9364
|
return t42;
|
|
9037
9365
|
}
|
|
9038
9366
|
let t4;
|
|
9039
|
-
if ($[
|
|
9367
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9040
9368
|
t4 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9041
9369
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", children: "Imported data preview" }),
|
|
9042
9370
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", children: "Entities with the same id will be overwritten" })
|
|
9043
9371
|
] });
|
|
9044
|
-
$[
|
|
9372
|
+
$[9] = t4;
|
|
9045
9373
|
} else {
|
|
9046
|
-
t4 = $[
|
|
9374
|
+
t4 = $[9];
|
|
9047
9375
|
}
|
|
9048
9376
|
let t5;
|
|
9049
|
-
if ($[
|
|
9377
|
+
if ($[10] !== importConfig.entities) {
|
|
9050
9378
|
t5 = {
|
|
9051
9379
|
data: importConfig.entities,
|
|
9052
9380
|
dataLoading: false,
|
|
9053
9381
|
noMoreToLoad: false
|
|
9054
9382
|
};
|
|
9055
|
-
$[
|
|
9056
|
-
$[
|
|
9383
|
+
$[10] = importConfig.entities;
|
|
9384
|
+
$[11] = t5;
|
|
9057
9385
|
} else {
|
|
9058
|
-
t5 = $[
|
|
9386
|
+
t5 = $[11];
|
|
9059
9387
|
}
|
|
9060
9388
|
let t6;
|
|
9061
|
-
if ($[
|
|
9389
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9062
9390
|
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12" });
|
|
9063
|
-
$[
|
|
9391
|
+
$[12] = t6;
|
|
9064
9392
|
} else {
|
|
9065
|
-
t6 = $[
|
|
9393
|
+
t6 = $[12];
|
|
9066
9394
|
}
|
|
9067
9395
|
let t7;
|
|
9068
|
-
if ($[
|
|
9396
|
+
if ($[13] !== propertiesOrder) {
|
|
9069
9397
|
t7 = propertiesOrder.map(_temp$2);
|
|
9070
|
-
$[
|
|
9071
|
-
$[
|
|
9398
|
+
$[13] = propertiesOrder;
|
|
9399
|
+
$[14] = t7;
|
|
9072
9400
|
} else {
|
|
9073
|
-
t7 = $[
|
|
9401
|
+
t7 = $[14];
|
|
9074
9402
|
}
|
|
9075
9403
|
let t8;
|
|
9076
|
-
if ($[
|
|
9404
|
+
if ($[15] !== properties || $[16] !== selectionController || $[17] !== t5 || $[18] !== t7) {
|
|
9077
9405
|
t8 = /* @__PURE__ */ jsxRuntime.jsx(core.EntityCollectionTable, { title: t4, tableController: t5, endAdornment: t6, filterable: false, sortable: false, selectionController, displayedColumnIds: t7, openEntityMode: "side_panel", properties, enablePopupIcon: false });
|
|
9078
|
-
$[
|
|
9079
|
-
$[
|
|
9080
|
-
$[
|
|
9081
|
-
$[
|
|
9082
|
-
$[
|
|
9406
|
+
$[15] = properties;
|
|
9407
|
+
$[16] = selectionController;
|
|
9408
|
+
$[17] = t5;
|
|
9409
|
+
$[18] = t7;
|
|
9410
|
+
$[19] = t8;
|
|
9083
9411
|
} else {
|
|
9084
|
-
t8 = $[
|
|
9412
|
+
t8 = $[19];
|
|
9085
9413
|
}
|
|
9086
9414
|
return t8;
|
|
9087
9415
|
}
|
|
@@ -9728,7 +10056,7 @@
|
|
|
9728
10056
|
};
|
|
9729
10057
|
const doCollectionInference = collectionInference ? (collection_0) => {
|
|
9730
10058
|
if (!collectionInference) return void 0;
|
|
9731
|
-
return collectionInference?.(collection_0.path, collection_0.collectionGroup ?? false, parentPaths ?? []);
|
|
10059
|
+
return collectionInference?.(collection_0.path, collection_0.collectionGroup ?? false, parentPaths ?? [], collection_0.databaseId);
|
|
9732
10060
|
} : void 0;
|
|
9733
10061
|
const inferCollectionFromData = async (newCollection) => {
|
|
9734
10062
|
try {
|
|
@@ -10173,7 +10501,7 @@
|
|
|
10173
10501
|
currentPropertiesOrder,
|
|
10174
10502
|
editedCollectionId,
|
|
10175
10503
|
parentCollectionIds: parentCollectionIds_0,
|
|
10176
|
-
collectionEditable: collection?.editable
|
|
10504
|
+
collectionEditable: collection?.editable === void 0 || collection?.editable === true,
|
|
10177
10505
|
existingEntities: existingEntities_0
|
|
10178
10506
|
});
|
|
10179
10507
|
};
|