@firecms/collection_editor 3.0.0-rc.2 → 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 +714 -419
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +714 -419
- package/dist/index.umd.js.map +1 -1
- package/dist/utils/entities.d.ts +1 -1
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +1 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +13 -0
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +0 -8
- package/src/ui/collection_editor/PropertyEditView.tsx +2 -2
- package/src/ui/collection_editor/PropertyFieldPreview.tsx +2 -2
- package/src/ui/collection_editor/UnsavedChangesDialog.tsx +1 -1
- 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/validation/ValidationPanel.tsx +1 -1
- package/src/utils/collections.ts +0 -1
- package/src/utils/entities.ts +6 -9
package/dist/index.es.js
CHANGED
|
@@ -165,7 +165,7 @@ function LayoutModeSwitch(t0) {
|
|
|
165
165
|
return t18;
|
|
166
166
|
}
|
|
167
167
|
function CollectionDetailsForm(t0) {
|
|
168
|
-
const $ = c(
|
|
168
|
+
const $ = c(202);
|
|
169
169
|
const {
|
|
170
170
|
isNewCollection,
|
|
171
171
|
reservedGroups,
|
|
@@ -756,242 +756,282 @@ function CollectionDetailsForm(t0) {
|
|
|
756
756
|
} else {
|
|
757
757
|
t84 = $[131];
|
|
758
758
|
}
|
|
759
|
-
const t85 =
|
|
759
|
+
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";
|
|
760
760
|
let t86;
|
|
761
761
|
if ($[132] !== setFieldValue) {
|
|
762
|
-
t86 = (v_1) =>
|
|
763
|
-
if (v_1 === "code_defined") {
|
|
764
|
-
throw new Error("This should not happen");
|
|
765
|
-
}
|
|
766
|
-
setFieldValue("customId", v_1);
|
|
767
|
-
};
|
|
762
|
+
t86 = (v_1) => setFieldValue("inlineEditing", v_1);
|
|
768
763
|
$[132] = setFieldValue;
|
|
769
764
|
$[133] = t86;
|
|
770
765
|
} else {
|
|
771
766
|
t86 = $[133];
|
|
772
767
|
}
|
|
773
|
-
const t87 =
|
|
768
|
+
const t87 = values.inlineEditing === void 0 ? true : values.inlineEditing;
|
|
774
769
|
let t88;
|
|
770
|
+
if ($[134] !== t85 || $[135] !== t86 || $[136] !== t87) {
|
|
771
|
+
t88 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: t85, onValueChange: t86, value: t87 });
|
|
772
|
+
$[134] = t85;
|
|
773
|
+
$[135] = t86;
|
|
774
|
+
$[136] = t87;
|
|
775
|
+
$[137] = t88;
|
|
776
|
+
} else {
|
|
777
|
+
t88 = $[137];
|
|
778
|
+
}
|
|
775
779
|
let t89;
|
|
780
|
+
if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
|
|
781
|
+
t89 = /* @__PURE__ */ jsx(FieldCaption, { children: "Allow editing data directly in the table view, without opening the form view." });
|
|
782
|
+
$[138] = t89;
|
|
783
|
+
} else {
|
|
784
|
+
t89 = $[138];
|
|
785
|
+
}
|
|
776
786
|
let t90;
|
|
777
|
-
if ($[
|
|
778
|
-
|
|
779
|
-
t89 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
|
|
780
|
-
t90 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
781
|
-
$[134] = t88;
|
|
782
|
-
$[135] = t89;
|
|
783
|
-
$[136] = t90;
|
|
784
|
-
} else {
|
|
785
|
-
t88 = $[134];
|
|
786
|
-
t89 = $[135];
|
|
787
|
-
t90 = $[136];
|
|
788
|
-
}
|
|
789
|
-
let t91;
|
|
790
|
-
if ($[137] !== t85 || $[138] !== t86 || $[139] !== t87) {
|
|
791
|
-
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$5, children: [
|
|
787
|
+
if ($[139] !== t88) {
|
|
788
|
+
t90 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
792
789
|
t88,
|
|
793
|
-
t89
|
|
794
|
-
|
|
795
|
-
]
|
|
796
|
-
$[
|
|
797
|
-
$[138] = t86;
|
|
798
|
-
$[139] = t87;
|
|
799
|
-
$[140] = t91;
|
|
790
|
+
t89
|
|
791
|
+
] });
|
|
792
|
+
$[139] = t88;
|
|
793
|
+
$[140] = t90;
|
|
800
794
|
} else {
|
|
801
|
-
|
|
795
|
+
t90 = $[140];
|
|
802
796
|
}
|
|
797
|
+
const t91 = customIdValue === "code_defined";
|
|
803
798
|
let t92;
|
|
804
799
|
if ($[141] !== setFieldValue) {
|
|
805
|
-
t92 = (v_2) =>
|
|
800
|
+
t92 = (v_2) => {
|
|
801
|
+
if (v_2 === "code_defined") {
|
|
802
|
+
throw new Error("This should not happen");
|
|
803
|
+
}
|
|
804
|
+
setFieldValue("customId", v_2);
|
|
805
|
+
};
|
|
806
806
|
$[141] = setFieldValue;
|
|
807
807
|
$[142] = t92;
|
|
808
808
|
} else {
|
|
809
809
|
t92 = $[142];
|
|
810
810
|
}
|
|
811
|
-
const t93 =
|
|
811
|
+
const t93 = customIdValue ?? "";
|
|
812
812
|
let t94;
|
|
813
|
-
if ($[143] !== t92 || $[144] !== t93) {
|
|
814
|
-
t94 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
|
|
815
|
-
$[143] = t92;
|
|
816
|
-
$[144] = t93;
|
|
817
|
-
$[145] = t94;
|
|
818
|
-
} else {
|
|
819
|
-
t94 = $[145];
|
|
820
|
-
}
|
|
821
813
|
let t95;
|
|
822
|
-
if ($[146] === Symbol.for("react.memo_cache_sentinel")) {
|
|
823
|
-
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." });
|
|
824
|
-
$[146] = t95;
|
|
825
|
-
} else {
|
|
826
|
-
t95 = $[146];
|
|
827
|
-
}
|
|
828
814
|
let t96;
|
|
829
|
-
if ($[
|
|
830
|
-
|
|
815
|
+
if ($[143] === Symbol.for("react.memo_cache_sentinel")) {
|
|
816
|
+
t94 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
817
|
+
t95 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: "Users must define an ID" });
|
|
818
|
+
t96 = /* @__PURE__ */ jsx(SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
819
|
+
$[143] = t94;
|
|
820
|
+
$[144] = t95;
|
|
821
|
+
$[145] = t96;
|
|
822
|
+
} else {
|
|
823
|
+
t94 = $[143];
|
|
824
|
+
t95 = $[144];
|
|
825
|
+
t96 = $[145];
|
|
826
|
+
}
|
|
827
|
+
let t97;
|
|
828
|
+
if ($[146] !== t91 || $[147] !== t92 || $[148] !== t93) {
|
|
829
|
+
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$5, children: [
|
|
831
830
|
t94,
|
|
832
|
-
t95
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
$[
|
|
831
|
+
t95,
|
|
832
|
+
t96
|
|
833
|
+
] }) });
|
|
834
|
+
$[146] = t91;
|
|
835
|
+
$[147] = t92;
|
|
836
|
+
$[148] = t93;
|
|
837
|
+
$[149] = t97;
|
|
836
838
|
} else {
|
|
837
|
-
|
|
839
|
+
t97 = $[149];
|
|
838
840
|
}
|
|
839
|
-
let
|
|
840
|
-
if ($[
|
|
841
|
-
|
|
842
|
-
$[
|
|
843
|
-
$[
|
|
844
|
-
} else {
|
|
845
|
-
t97 = $[150];
|
|
846
|
-
}
|
|
847
|
-
const t98 = values.textSearchEnabled ?? false;
|
|
848
|
-
let t99;
|
|
849
|
-
if ($[151] !== t97 || $[152] !== t98) {
|
|
850
|
-
t99 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
|
|
851
|
-
$[151] = t97;
|
|
852
|
-
$[152] = t98;
|
|
853
|
-
$[153] = t99;
|
|
841
|
+
let t98;
|
|
842
|
+
if ($[150] !== setFieldValue) {
|
|
843
|
+
t98 = (v_3) => setFieldValue("collectionGroup", v_3);
|
|
844
|
+
$[150] = setFieldValue;
|
|
845
|
+
$[151] = t98;
|
|
854
846
|
} else {
|
|
855
|
-
|
|
847
|
+
t98 = $[151];
|
|
856
848
|
}
|
|
849
|
+
const t99 = values.collectionGroup ?? false;
|
|
857
850
|
let t100;
|
|
858
|
-
if ($[
|
|
859
|
-
t100 = /* @__PURE__ */ jsx(
|
|
851
|
+
if ($[152] !== t98 || $[153] !== t99) {
|
|
852
|
+
t100 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t98, value: t99 });
|
|
853
|
+
$[152] = t98;
|
|
854
|
+
$[153] = t99;
|
|
860
855
|
$[154] = t100;
|
|
861
856
|
} else {
|
|
862
857
|
t100 = $[154];
|
|
863
858
|
}
|
|
864
859
|
let t101;
|
|
865
|
-
if ($[155]
|
|
866
|
-
t101 = /* @__PURE__ */
|
|
867
|
-
|
|
868
|
-
t100
|
|
869
|
-
] });
|
|
870
|
-
$[155] = t99;
|
|
871
|
-
$[156] = t101;
|
|
860
|
+
if ($[155] === Symbol.for("react.memo_cache_sentinel")) {
|
|
861
|
+
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." });
|
|
862
|
+
$[155] = t101;
|
|
872
863
|
} else {
|
|
873
|
-
t101 = $[
|
|
864
|
+
t101 = $[155];
|
|
874
865
|
}
|
|
875
866
|
let t102;
|
|
876
|
-
if ($[
|
|
877
|
-
t102 = /* @__PURE__ */ jsxs("div", { className: "
|
|
867
|
+
if ($[156] !== t100) {
|
|
868
|
+
t102 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
869
|
+
t100,
|
|
870
|
+
t101
|
|
871
|
+
] });
|
|
872
|
+
$[156] = t100;
|
|
873
|
+
$[157] = t102;
|
|
874
|
+
} else {
|
|
875
|
+
t102 = $[157];
|
|
876
|
+
}
|
|
877
|
+
let t103;
|
|
878
|
+
if ($[158] !== setFieldValue) {
|
|
879
|
+
t103 = (v_4) => setFieldValue("textSearchEnabled", v_4);
|
|
880
|
+
$[158] = setFieldValue;
|
|
881
|
+
$[159] = t103;
|
|
882
|
+
} else {
|
|
883
|
+
t103 = $[159];
|
|
884
|
+
}
|
|
885
|
+
const t104 = values.textSearchEnabled ?? false;
|
|
886
|
+
let t105;
|
|
887
|
+
if ($[160] !== t103 || $[161] !== t104) {
|
|
888
|
+
t105 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t103, value: t104 });
|
|
889
|
+
$[160] = t103;
|
|
890
|
+
$[161] = t104;
|
|
891
|
+
$[162] = t105;
|
|
892
|
+
} else {
|
|
893
|
+
t105 = $[162];
|
|
894
|
+
}
|
|
895
|
+
let t106;
|
|
896
|
+
if ($[163] === Symbol.for("react.memo_cache_sentinel")) {
|
|
897
|
+
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." });
|
|
898
|
+
$[163] = t106;
|
|
899
|
+
} else {
|
|
900
|
+
t106 = $[163];
|
|
901
|
+
}
|
|
902
|
+
let t107;
|
|
903
|
+
if ($[164] !== t105) {
|
|
904
|
+
t107 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
905
|
+
t105,
|
|
906
|
+
t106
|
|
907
|
+
] });
|
|
908
|
+
$[164] = t105;
|
|
909
|
+
$[165] = t107;
|
|
910
|
+
} else {
|
|
911
|
+
t107 = $[165];
|
|
912
|
+
}
|
|
913
|
+
let t108;
|
|
914
|
+
if ($[166] !== t102 || $[167] !== t107 || $[168] !== t48 || $[169] !== t56 || $[170] !== t68 || $[171] !== t75 || $[172] !== t78 || $[173] !== t84 || $[174] !== t90 || $[175] !== t97) {
|
|
915
|
+
t108 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
878
916
|
t48,
|
|
879
917
|
t56,
|
|
880
918
|
t68,
|
|
881
919
|
t75,
|
|
882
920
|
t78,
|
|
883
921
|
t84,
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
922
|
+
t90,
|
|
923
|
+
t97,
|
|
924
|
+
t102,
|
|
925
|
+
t107
|
|
887
926
|
] });
|
|
888
|
-
$[157] = t101;
|
|
889
|
-
$[158] = t48;
|
|
890
|
-
$[159] = t56;
|
|
891
|
-
$[160] = t68;
|
|
892
|
-
$[161] = t75;
|
|
893
|
-
$[162] = t78;
|
|
894
|
-
$[163] = t84;
|
|
895
|
-
$[164] = t91;
|
|
896
|
-
$[165] = t96;
|
|
897
927
|
$[166] = t102;
|
|
928
|
+
$[167] = t107;
|
|
929
|
+
$[168] = t48;
|
|
930
|
+
$[169] = t56;
|
|
931
|
+
$[170] = t68;
|
|
932
|
+
$[171] = t75;
|
|
933
|
+
$[172] = t78;
|
|
934
|
+
$[173] = t84;
|
|
935
|
+
$[174] = t90;
|
|
936
|
+
$[175] = t97;
|
|
937
|
+
$[176] = t108;
|
|
938
|
+
} else {
|
|
939
|
+
t108 = $[176];
|
|
940
|
+
}
|
|
941
|
+
let t109;
|
|
942
|
+
if ($[177] !== advancedPanelExpanded || $[178] !== t108) {
|
|
943
|
+
t109 = /* @__PURE__ */ jsx(ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t108 });
|
|
944
|
+
$[177] = advancedPanelExpanded;
|
|
945
|
+
$[178] = t108;
|
|
946
|
+
$[179] = t109;
|
|
898
947
|
} else {
|
|
899
|
-
|
|
948
|
+
t109 = $[179];
|
|
900
949
|
}
|
|
901
|
-
let
|
|
902
|
-
if ($[
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
$[168] = t102;
|
|
906
|
-
$[169] = t103;
|
|
907
|
-
} else {
|
|
908
|
-
t103 = $[169];
|
|
909
|
-
}
|
|
910
|
-
let t104;
|
|
911
|
-
if ($[170] !== children || $[171] !== t103) {
|
|
912
|
-
t104 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
913
|
-
t103,
|
|
950
|
+
let t110;
|
|
951
|
+
if ($[180] !== children || $[181] !== t109) {
|
|
952
|
+
t110 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
953
|
+
t109,
|
|
914
954
|
children
|
|
915
955
|
] });
|
|
916
|
-
$[
|
|
917
|
-
$[
|
|
918
|
-
$[
|
|
956
|
+
$[180] = children;
|
|
957
|
+
$[181] = t109;
|
|
958
|
+
$[182] = t110;
|
|
919
959
|
} else {
|
|
920
|
-
|
|
960
|
+
t110 = $[182];
|
|
921
961
|
}
|
|
922
|
-
let
|
|
923
|
-
if ($[
|
|
924
|
-
|
|
962
|
+
let t111;
|
|
963
|
+
if ($[183] !== t110 || $[184] !== t23 || $[185] !== t31 || $[186] !== t34 || $[187] !== t40) {
|
|
964
|
+
t111 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4", children: [
|
|
925
965
|
t23,
|
|
926
966
|
t31,
|
|
927
967
|
t34,
|
|
928
968
|
t40,
|
|
929
|
-
|
|
969
|
+
t110
|
|
930
970
|
] });
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
933
|
-
$[
|
|
934
|
-
$[
|
|
935
|
-
$[
|
|
936
|
-
$[
|
|
971
|
+
$[183] = t110;
|
|
972
|
+
$[184] = t23;
|
|
973
|
+
$[185] = t31;
|
|
974
|
+
$[186] = t34;
|
|
975
|
+
$[187] = t40;
|
|
976
|
+
$[188] = t111;
|
|
937
977
|
} else {
|
|
938
|
-
|
|
978
|
+
t111 = $[188];
|
|
939
979
|
}
|
|
940
|
-
let
|
|
941
|
-
if ($[
|
|
942
|
-
|
|
980
|
+
let t112;
|
|
981
|
+
if ($[189] === Symbol.for("react.memo_cache_sentinel")) {
|
|
982
|
+
t112 = /* @__PURE__ */ jsx("div", { style: {
|
|
943
983
|
height: "52px"
|
|
944
984
|
} });
|
|
945
|
-
$[
|
|
985
|
+
$[189] = t112;
|
|
946
986
|
} else {
|
|
947
|
-
|
|
987
|
+
t112 = $[189];
|
|
948
988
|
}
|
|
949
|
-
const
|
|
950
|
-
let
|
|
951
|
-
if ($[
|
|
952
|
-
|
|
989
|
+
const t113 = typeof values.icon === "string" ? values.icon : void 0;
|
|
990
|
+
let t114;
|
|
991
|
+
if ($[190] !== setFieldValue) {
|
|
992
|
+
t114 = (icon) => {
|
|
953
993
|
setIconDialogOpen(false);
|
|
954
994
|
setFieldValue("icon", icon);
|
|
955
995
|
};
|
|
956
|
-
$[
|
|
957
|
-
$[
|
|
996
|
+
$[190] = setFieldValue;
|
|
997
|
+
$[191] = t114;
|
|
958
998
|
} else {
|
|
959
|
-
|
|
999
|
+
t114 = $[191];
|
|
960
1000
|
}
|
|
961
|
-
let
|
|
962
|
-
if ($[
|
|
963
|
-
|
|
964
|
-
$[
|
|
965
|
-
$[
|
|
966
|
-
$[
|
|
1001
|
+
let t115;
|
|
1002
|
+
if ($[192] !== t113 || $[193] !== t114) {
|
|
1003
|
+
t115 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: t113, onIconSelected: t114 }) });
|
|
1004
|
+
$[192] = t113;
|
|
1005
|
+
$[193] = t114;
|
|
1006
|
+
$[194] = t115;
|
|
967
1007
|
} else {
|
|
968
|
-
|
|
1008
|
+
t115 = $[194];
|
|
969
1009
|
}
|
|
970
|
-
let
|
|
971
|
-
if ($[
|
|
972
|
-
|
|
973
|
-
$[
|
|
974
|
-
$[
|
|
975
|
-
$[
|
|
1010
|
+
let t116;
|
|
1011
|
+
if ($[195] !== iconDialogOpen || $[196] !== t115) {
|
|
1012
|
+
t116 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t115 });
|
|
1013
|
+
$[195] = iconDialogOpen;
|
|
1014
|
+
$[196] = t115;
|
|
1015
|
+
$[197] = t116;
|
|
976
1016
|
} else {
|
|
977
|
-
|
|
1017
|
+
t116 = $[197];
|
|
978
1018
|
}
|
|
979
|
-
let
|
|
980
|
-
if ($[
|
|
981
|
-
|
|
1019
|
+
let t117;
|
|
1020
|
+
if ($[198] !== t111 || $[199] !== t116 || $[200] !== t15) {
|
|
1021
|
+
t117 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
982
1022
|
t15,
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1023
|
+
t111,
|
|
1024
|
+
t112,
|
|
1025
|
+
t116
|
|
986
1026
|
] }) });
|
|
987
|
-
$[
|
|
988
|
-
$[
|
|
989
|
-
$[
|
|
990
|
-
$[
|
|
1027
|
+
$[198] = t111;
|
|
1028
|
+
$[199] = t116;
|
|
1029
|
+
$[200] = t15;
|
|
1030
|
+
$[201] = t117;
|
|
991
1031
|
} else {
|
|
992
|
-
|
|
1032
|
+
t117 = $[201];
|
|
993
1033
|
}
|
|
994
|
-
return
|
|
1034
|
+
return t117;
|
|
995
1035
|
}
|
|
996
1036
|
function _temp3$5(value_3) {
|
|
997
1037
|
if (value_3 === "code_defined") {
|
|
@@ -1953,7 +1993,7 @@ function ValidationPanel(t0) {
|
|
|
1953
1993
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1954
1994
|
t1 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
1955
1995
|
/* @__PURE__ */ jsx(RuleIcon, {}),
|
|
1956
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-
|
|
1996
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: "Validation" })
|
|
1957
1997
|
] });
|
|
1958
1998
|
$[0] = t1;
|
|
1959
1999
|
} else {
|
|
@@ -2025,7 +2065,7 @@ const fileTypes = {
|
|
|
2025
2065
|
"text/*": "Text files"
|
|
2026
2066
|
};
|
|
2027
2067
|
function StoragePropertyField(t0) {
|
|
2028
|
-
const $ = c(
|
|
2068
|
+
const $ = c(180);
|
|
2029
2069
|
const {
|
|
2030
2070
|
multiple,
|
|
2031
2071
|
existing,
|
|
@@ -2041,6 +2081,12 @@ function StoragePropertyField(t0) {
|
|
|
2041
2081
|
const maxSize = `${baseStoragePath}.maxSize`;
|
|
2042
2082
|
const storagePath = `${baseStoragePath}.storagePath`;
|
|
2043
2083
|
const storeUrl = `${baseStoragePath}.storeUrl`;
|
|
2084
|
+
const imageResize = `${baseStoragePath}.imageResize`;
|
|
2085
|
+
const imageResizeMaxWidth = `${imageResize}.maxWidth`;
|
|
2086
|
+
const imageResizeMaxHeight = `${imageResize}.maxHeight`;
|
|
2087
|
+
const imageResizeMode = `${imageResize}.mode`;
|
|
2088
|
+
const imageResizeFormat = `${imageResize}.format`;
|
|
2089
|
+
const imageResizeQuality = `${imageResize}.quality`;
|
|
2044
2090
|
let t1;
|
|
2045
2091
|
if ($[0] !== fileName || $[1] !== values) {
|
|
2046
2092
|
t1 = getIn(values, fileName) ?? "{rand}_{file}";
|
|
@@ -2068,6 +2114,13 @@ function StoragePropertyField(t0) {
|
|
|
2068
2114
|
let t12;
|
|
2069
2115
|
let t13;
|
|
2070
2116
|
let t14;
|
|
2117
|
+
let t15;
|
|
2118
|
+
let t16;
|
|
2119
|
+
let t17;
|
|
2120
|
+
let t18;
|
|
2121
|
+
let t19;
|
|
2122
|
+
let t20;
|
|
2123
|
+
let t21;
|
|
2071
2124
|
let t3;
|
|
2072
2125
|
let t4;
|
|
2073
2126
|
let t5;
|
|
@@ -2075,63 +2128,86 @@ function StoragePropertyField(t0) {
|
|
|
2075
2128
|
let t7;
|
|
2076
2129
|
let t8;
|
|
2077
2130
|
let t9;
|
|
2078
|
-
if ($[6] !== acceptedFiles || $[7] !== disabled || $[8] !== existing || $[9] !== fileName || $[10] !== fileNameValue || $[11] !==
|
|
2131
|
+
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) {
|
|
2079
2132
|
const maxSizeValue = getIn(values, maxSize);
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
$[
|
|
2133
|
+
const imageResizeMaxWidthValue = getIn(values, imageResizeMaxWidth);
|
|
2134
|
+
const imageResizeMaxHeightValue = getIn(values, imageResizeMaxHeight);
|
|
2135
|
+
let t222;
|
|
2136
|
+
if ($[43] !== imageResizeMode || $[44] !== values) {
|
|
2137
|
+
t222 = getIn(values, imageResizeMode) ?? "cover";
|
|
2138
|
+
$[43] = imageResizeMode;
|
|
2139
|
+
$[44] = values;
|
|
2140
|
+
$[45] = t222;
|
|
2141
|
+
} else {
|
|
2142
|
+
t222 = $[45];
|
|
2143
|
+
}
|
|
2144
|
+
const imageResizeModeValue = t222;
|
|
2145
|
+
let t232;
|
|
2146
|
+
if ($[46] !== imageResizeFormat || $[47] !== values) {
|
|
2147
|
+
t232 = getIn(values, imageResizeFormat) ?? "original";
|
|
2148
|
+
$[46] = imageResizeFormat;
|
|
2149
|
+
$[47] = values;
|
|
2150
|
+
$[48] = t232;
|
|
2151
|
+
} else {
|
|
2152
|
+
t232 = $[48];
|
|
2153
|
+
}
|
|
2154
|
+
const imageResizeFormatValue = t232;
|
|
2155
|
+
const imageResizeQualityValue = getIn(values, imageResizeQuality);
|
|
2156
|
+
let t242;
|
|
2157
|
+
if ($[49] !== acceptedFiles || $[50] !== values) {
|
|
2158
|
+
t242 = getIn(values, acceptedFiles);
|
|
2159
|
+
$[49] = acceptedFiles;
|
|
2160
|
+
$[50] = values;
|
|
2161
|
+
$[51] = t242;
|
|
2086
2162
|
} else {
|
|
2087
|
-
|
|
2163
|
+
t242 = $[51];
|
|
2088
2164
|
}
|
|
2089
|
-
const storedValue =
|
|
2165
|
+
const storedValue = t242;
|
|
2090
2166
|
const fileTypesValue = Array.isArray(storedValue) ? storedValue : void 0;
|
|
2091
2167
|
const allFileTypesSelected = !fileTypesValue || fileTypesValue.length === 0;
|
|
2092
|
-
let
|
|
2093
|
-
if ($[
|
|
2094
|
-
|
|
2168
|
+
let t252;
|
|
2169
|
+
if ($[52] !== acceptedFiles || $[53] !== setFieldValue) {
|
|
2170
|
+
t252 = (value) => {
|
|
2095
2171
|
if (!value) {
|
|
2096
2172
|
setFieldValue(acceptedFiles, void 0);
|
|
2097
2173
|
} else {
|
|
2098
2174
|
setFieldValue(acceptedFiles, value);
|
|
2099
2175
|
}
|
|
2100
2176
|
};
|
|
2101
|
-
$[
|
|
2102
|
-
$[
|
|
2103
|
-
$[
|
|
2177
|
+
$[52] = acceptedFiles;
|
|
2178
|
+
$[53] = setFieldValue;
|
|
2179
|
+
$[54] = t252;
|
|
2104
2180
|
} else {
|
|
2105
|
-
|
|
2181
|
+
t252 = $[54];
|
|
2106
2182
|
}
|
|
2107
|
-
const handleTypesChange =
|
|
2183
|
+
const handleTypesChange = t252;
|
|
2108
2184
|
const hasFilenameCallback = typeof fileNameValue === "function";
|
|
2109
2185
|
const hasStoragePathCallback = typeof storagePathValue === "function";
|
|
2110
|
-
|
|
2186
|
+
t21 = "col-span-12";
|
|
2111
2187
|
T1 = ExpandablePanel;
|
|
2112
|
-
if ($[
|
|
2113
|
-
|
|
2188
|
+
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2189
|
+
t20 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
2114
2190
|
/* @__PURE__ */ jsx(CloudUploadIcon, {}),
|
|
2115
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-
|
|
2191
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: "File upload config" })
|
|
2116
2192
|
] });
|
|
2117
|
-
$[
|
|
2193
|
+
$[55] = t20;
|
|
2118
2194
|
} else {
|
|
2119
|
-
|
|
2195
|
+
t20 = $[55];
|
|
2120
2196
|
}
|
|
2121
|
-
|
|
2122
|
-
let
|
|
2123
|
-
if ($[
|
|
2124
|
-
|
|
2125
|
-
$[
|
|
2126
|
-
$[
|
|
2197
|
+
t10 = "grid grid-cols-12 gap-2 p-4";
|
|
2198
|
+
let t262;
|
|
2199
|
+
if ($[56] !== fileTypesValue) {
|
|
2200
|
+
t262 = fileTypesValue ?? [];
|
|
2201
|
+
$[56] = fileTypesValue;
|
|
2202
|
+
$[57] = t262;
|
|
2127
2203
|
} else {
|
|
2128
|
-
|
|
2204
|
+
t262 = $[57];
|
|
2129
2205
|
}
|
|
2130
|
-
const
|
|
2131
|
-
let
|
|
2132
|
-
if ($[
|
|
2133
|
-
|
|
2134
|
-
const [value_0, label] =
|
|
2206
|
+
const t272 = allFileTypesSelected ? void 0 : "Allowed file types";
|
|
2207
|
+
let t282;
|
|
2208
|
+
if ($[58] !== acceptedFiles || $[59] !== setFieldValue) {
|
|
2209
|
+
t282 = Object.entries(fileTypes).map((t293) => {
|
|
2210
|
+
const [value_0, label] = t293;
|
|
2135
2211
|
return /* @__PURE__ */ jsxs(MultiSelectItem, { value: value_0, className: "flex items-center gap-2", children: [
|
|
2136
2212
|
/* @__PURE__ */ jsx("div", { className: "flex-grow", children: label }),
|
|
2137
2213
|
/* @__PURE__ */ jsx(Button, { size: "small", variant: "text", onClick: (e) => {
|
|
@@ -2141,50 +2217,50 @@ function StoragePropertyField(t0) {
|
|
|
2141
2217
|
}, children: "Only" })
|
|
2142
2218
|
] }, value_0);
|
|
2143
2219
|
});
|
|
2144
|
-
$[
|
|
2145
|
-
$[
|
|
2146
|
-
$[
|
|
2220
|
+
$[58] = acceptedFiles;
|
|
2221
|
+
$[59] = setFieldValue;
|
|
2222
|
+
$[60] = t282;
|
|
2147
2223
|
} else {
|
|
2148
|
-
|
|
2224
|
+
t282 = $[60];
|
|
2149
2225
|
}
|
|
2150
|
-
if ($[
|
|
2151
|
-
|
|
2152
|
-
$[
|
|
2153
|
-
$[
|
|
2154
|
-
$[
|
|
2155
|
-
$[
|
|
2156
|
-
$[
|
|
2157
|
-
$[
|
|
2158
|
-
$[
|
|
2226
|
+
if ($[61] !== acceptedFiles || $[62] !== disabled || $[63] !== handleTypesChange || $[64] !== t262 || $[65] !== t272 || $[66] !== t282) {
|
|
2227
|
+
t11 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t262, onValueChange: handleTypesChange, label: t272, renderValues: _temp3$4, children: t282 }) });
|
|
2228
|
+
$[61] = acceptedFiles;
|
|
2229
|
+
$[62] = disabled;
|
|
2230
|
+
$[63] = handleTypesChange;
|
|
2231
|
+
$[64] = t262;
|
|
2232
|
+
$[65] = t272;
|
|
2233
|
+
$[66] = t282;
|
|
2234
|
+
$[67] = t11;
|
|
2159
2235
|
} else {
|
|
2160
|
-
|
|
2236
|
+
t11 = $[67];
|
|
2161
2237
|
}
|
|
2162
|
-
const
|
|
2163
|
-
const
|
|
2164
|
-
if ($[
|
|
2165
|
-
|
|
2166
|
-
$[
|
|
2167
|
-
$[
|
|
2168
|
-
$[
|
|
2169
|
-
$[
|
|
2238
|
+
const t292 = hasFilenameCallback || disabled;
|
|
2239
|
+
const t302 = hasFilenameCallback ? "-" : fileNameValue;
|
|
2240
|
+
if ($[68] !== fileName || $[69] !== t292 || $[70] !== t302) {
|
|
2241
|
+
t12 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Field, { name: fileName, as: DebouncedTextField, label: "File name", size: "small", disabled: t292, value: t302 }) });
|
|
2242
|
+
$[68] = fileName;
|
|
2243
|
+
$[69] = t292;
|
|
2244
|
+
$[70] = t302;
|
|
2245
|
+
$[71] = t12;
|
|
2170
2246
|
} else {
|
|
2171
|
-
|
|
2247
|
+
t12 = $[71];
|
|
2172
2248
|
}
|
|
2173
|
-
const
|
|
2174
|
-
const
|
|
2175
|
-
let
|
|
2176
|
-
if ($[
|
|
2177
|
-
|
|
2178
|
-
$[
|
|
2179
|
-
$[
|
|
2180
|
-
$[
|
|
2181
|
-
$[
|
|
2249
|
+
const t312 = hasStoragePathCallback || disabled;
|
|
2250
|
+
const t322 = hasStoragePathCallback ? "-" : storagePathValue;
|
|
2251
|
+
let t33;
|
|
2252
|
+
if ($[72] !== storagePath || $[73] !== t312 || $[74] !== t322) {
|
|
2253
|
+
t33 = /* @__PURE__ */ jsx(Field, { name: storagePath, as: DebouncedTextField, label: "Storage path", disabled: t312, size: "small", value: t322 });
|
|
2254
|
+
$[72] = storagePath;
|
|
2255
|
+
$[73] = t312;
|
|
2256
|
+
$[74] = t322;
|
|
2257
|
+
$[75] = t33;
|
|
2182
2258
|
} else {
|
|
2183
|
-
|
|
2259
|
+
t33 = $[75];
|
|
2184
2260
|
}
|
|
2185
|
-
let
|
|
2186
|
-
if ($[
|
|
2187
|
-
|
|
2261
|
+
let t34;
|
|
2262
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2263
|
+
t34 = /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "ml-3.5 mt-1 mb-2", children: [
|
|
2188
2264
|
/* @__PURE__ */ jsx("p", { children: "You can use the following placeholders in the file name and storage path values:" }),
|
|
2189
2265
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
2190
2266
|
/* @__PURE__ */ jsx("li", { children: "{file} - Full name of the uploaded file" }),
|
|
@@ -2196,220 +2272,445 @@ function StoragePropertyField(t0) {
|
|
|
2196
2272
|
/* @__PURE__ */ jsx("li", { children: "{rand} - Random value used to avoid name collisions" })
|
|
2197
2273
|
] })
|
|
2198
2274
|
] });
|
|
2199
|
-
$[
|
|
2275
|
+
$[76] = t34;
|
|
2200
2276
|
} else {
|
|
2201
|
-
|
|
2277
|
+
t34 = $[76];
|
|
2202
2278
|
}
|
|
2203
|
-
let
|
|
2204
|
-
if ($[
|
|
2205
|
-
|
|
2279
|
+
let t35;
|
|
2280
|
+
if ($[77] !== disabled || $[78] !== existing) {
|
|
2281
|
+
t35 = (t362) => {
|
|
2206
2282
|
const {
|
|
2207
2283
|
field,
|
|
2208
2284
|
form
|
|
2209
|
-
} =
|
|
2285
|
+
} = t362;
|
|
2210
2286
|
return /* @__PURE__ */ jsx(SwitchControl, { label: "Save URL instead of storage path", disabled: existing || disabled, form, field });
|
|
2211
2287
|
};
|
|
2212
|
-
$[
|
|
2213
|
-
$[
|
|
2214
|
-
$[
|
|
2288
|
+
$[77] = disabled;
|
|
2289
|
+
$[78] = existing;
|
|
2290
|
+
$[79] = t35;
|
|
2215
2291
|
} else {
|
|
2216
|
-
|
|
2292
|
+
t35 = $[79];
|
|
2217
2293
|
}
|
|
2218
|
-
let
|
|
2219
|
-
if ($[
|
|
2220
|
-
|
|
2221
|
-
$[
|
|
2222
|
-
$[
|
|
2223
|
-
$[
|
|
2294
|
+
let t36;
|
|
2295
|
+
if ($[80] !== storeUrl || $[81] !== t35) {
|
|
2296
|
+
t36 = /* @__PURE__ */ jsx(Field, { name: storeUrl, type: "checkbox", children: t35 });
|
|
2297
|
+
$[80] = storeUrl;
|
|
2298
|
+
$[81] = t35;
|
|
2299
|
+
$[82] = t36;
|
|
2224
2300
|
} else {
|
|
2225
|
-
|
|
2301
|
+
t36 = $[82];
|
|
2226
2302
|
}
|
|
2227
|
-
let
|
|
2228
|
-
if ($[
|
|
2229
|
-
|
|
2230
|
-
$[
|
|
2303
|
+
let t37;
|
|
2304
|
+
if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2305
|
+
t37 = /* @__PURE__ */ jsx(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." });
|
|
2306
|
+
$[83] = t37;
|
|
2231
2307
|
} else {
|
|
2232
|
-
|
|
2308
|
+
t37 = $[83];
|
|
2233
2309
|
}
|
|
2234
|
-
if ($[
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2310
|
+
if ($[84] !== t33 || $[85] !== t36) {
|
|
2311
|
+
t13 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
|
|
2312
|
+
t33,
|
|
2313
|
+
t34,
|
|
2314
|
+
t36,
|
|
2315
|
+
t37
|
|
2240
2316
|
] });
|
|
2241
|
-
$[
|
|
2242
|
-
$[
|
|
2243
|
-
$[
|
|
2317
|
+
$[84] = t33;
|
|
2318
|
+
$[85] = t36;
|
|
2319
|
+
$[86] = t13;
|
|
2244
2320
|
} else {
|
|
2245
|
-
|
|
2321
|
+
t13 = $[86];
|
|
2246
2322
|
}
|
|
2247
|
-
|
|
2323
|
+
const t38 = maxSizeValue !== void 0 && maxSizeValue !== null ? maxSizeValue.toString() : "";
|
|
2324
|
+
let t39;
|
|
2325
|
+
if ($[87] !== maxSize || $[88] !== setFieldValue) {
|
|
2326
|
+
t39 = (e_0) => {
|
|
2327
|
+
const value_1 = e_0.target.value;
|
|
2328
|
+
if (value_1 === "") {
|
|
2329
|
+
setFieldValue(maxSize, void 0);
|
|
2330
|
+
} else {
|
|
2331
|
+
setFieldValue(maxSize, parseInt(value_1));
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2334
|
+
$[87] = maxSize;
|
|
2335
|
+
$[88] = setFieldValue;
|
|
2336
|
+
$[89] = t39;
|
|
2337
|
+
} else {
|
|
2338
|
+
t39 = $[89];
|
|
2339
|
+
}
|
|
2340
|
+
if ($[90] !== maxSize || $[91] !== t38 || $[92] !== t39) {
|
|
2341
|
+
t14 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(DebouncedTextField, { name: maxSize, type: "number", label: "Max size (in bytes)", size: "small", value: t38, onChange: t39 }) });
|
|
2342
|
+
$[90] = maxSize;
|
|
2343
|
+
$[91] = t38;
|
|
2344
|
+
$[92] = t39;
|
|
2345
|
+
$[93] = t14;
|
|
2346
|
+
} else {
|
|
2347
|
+
t14 = $[93];
|
|
2348
|
+
}
|
|
2349
|
+
if ($[94] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2350
|
+
t15 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
2351
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", color: "secondary", className: "mb-2 block", children: "Image Resize Configuration" }),
|
|
2352
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "mb-2 block text-xs", children: "Automatically resize and optimize images before upload (JPEG, PNG, WebP only)" })
|
|
2353
|
+
] });
|
|
2354
|
+
$[94] = t15;
|
|
2355
|
+
} else {
|
|
2356
|
+
t15 = $[94];
|
|
2357
|
+
}
|
|
2358
|
+
const t40 = imageResizeMaxWidthValue !== void 0 && imageResizeMaxWidthValue !== null ? imageResizeMaxWidthValue.toString() : "";
|
|
2359
|
+
let t41;
|
|
2360
|
+
if ($[95] !== imageResizeMaxWidth || $[96] !== setFieldValue) {
|
|
2361
|
+
t41 = (e_1) => {
|
|
2362
|
+
const value_2 = e_1.target.value;
|
|
2363
|
+
if (value_2 === "") {
|
|
2364
|
+
setFieldValue(imageResizeMaxWidth, void 0);
|
|
2365
|
+
} else {
|
|
2366
|
+
setFieldValue(imageResizeMaxWidth, parseInt(value_2));
|
|
2367
|
+
}
|
|
2368
|
+
};
|
|
2369
|
+
$[95] = imageResizeMaxWidth;
|
|
2370
|
+
$[96] = setFieldValue;
|
|
2371
|
+
$[97] = t41;
|
|
2372
|
+
} else {
|
|
2373
|
+
t41 = $[97];
|
|
2374
|
+
}
|
|
2375
|
+
if ($[98] !== disabled || $[99] !== imageResizeMaxWidth || $[100] !== t40 || $[101] !== t41) {
|
|
2376
|
+
t16 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { name: imageResizeMaxWidth, type: "number", label: "Max width (px)", size: "small", disabled, value: t40, onChange: t41 }) });
|
|
2377
|
+
$[98] = disabled;
|
|
2378
|
+
$[99] = imageResizeMaxWidth;
|
|
2379
|
+
$[100] = t40;
|
|
2380
|
+
$[101] = t41;
|
|
2381
|
+
$[102] = t16;
|
|
2382
|
+
} else {
|
|
2383
|
+
t16 = $[102];
|
|
2384
|
+
}
|
|
2385
|
+
const t42 = imageResizeMaxHeightValue !== void 0 && imageResizeMaxHeightValue !== null ? imageResizeMaxHeightValue.toString() : "";
|
|
2386
|
+
let t43;
|
|
2387
|
+
if ($[103] !== imageResizeMaxHeight || $[104] !== setFieldValue) {
|
|
2388
|
+
t43 = (e_2) => {
|
|
2389
|
+
const value_3 = e_2.target.value;
|
|
2390
|
+
if (value_3 === "") {
|
|
2391
|
+
setFieldValue(imageResizeMaxHeight, void 0);
|
|
2392
|
+
} else {
|
|
2393
|
+
setFieldValue(imageResizeMaxHeight, parseInt(value_3));
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2396
|
+
$[103] = imageResizeMaxHeight;
|
|
2397
|
+
$[104] = setFieldValue;
|
|
2398
|
+
$[105] = t43;
|
|
2399
|
+
} else {
|
|
2400
|
+
t43 = $[105];
|
|
2401
|
+
}
|
|
2402
|
+
if ($[106] !== disabled || $[107] !== imageResizeMaxHeight || $[108] !== t42 || $[109] !== t43) {
|
|
2403
|
+
t17 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { name: imageResizeMaxHeight, type: "number", label: "Max height (px)", size: "small", disabled, value: t42, onChange: t43 }) });
|
|
2404
|
+
$[106] = disabled;
|
|
2405
|
+
$[107] = imageResizeMaxHeight;
|
|
2406
|
+
$[108] = t42;
|
|
2407
|
+
$[109] = t43;
|
|
2408
|
+
$[110] = t17;
|
|
2409
|
+
} else {
|
|
2410
|
+
t17 = $[110];
|
|
2411
|
+
}
|
|
2412
|
+
const t44 = imageResizeModeValue || "cover";
|
|
2413
|
+
let t45;
|
|
2414
|
+
if ($[111] !== imageResizeMode || $[112] !== setFieldValue) {
|
|
2415
|
+
t45 = (value_4) => setFieldValue(imageResizeMode, value_4 || "cover");
|
|
2416
|
+
$[111] = imageResizeMode;
|
|
2417
|
+
$[112] = setFieldValue;
|
|
2418
|
+
$[113] = t45;
|
|
2419
|
+
} else {
|
|
2420
|
+
t45 = $[113];
|
|
2421
|
+
}
|
|
2422
|
+
let t46;
|
|
2423
|
+
let t47;
|
|
2424
|
+
if ($[114] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2425
|
+
t46 = /* @__PURE__ */ jsx(SelectItem, { value: "contain", children: "Contain (fit within bounds)" });
|
|
2426
|
+
t47 = /* @__PURE__ */ jsx(SelectItem, { value: "cover", children: "Cover (fill bounds, may crop)" });
|
|
2427
|
+
$[114] = t46;
|
|
2428
|
+
$[115] = t47;
|
|
2429
|
+
} else {
|
|
2430
|
+
t46 = $[114];
|
|
2431
|
+
t47 = $[115];
|
|
2432
|
+
}
|
|
2433
|
+
if ($[116] !== disabled || $[117] !== imageResizeMode || $[118] !== t44 || $[119] !== t45) {
|
|
2434
|
+
t18 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsxs(Select, { disabled, name: imageResizeMode, fullWidth: true, size: "medium", value: t44, onValueChange: t45, label: "Resize mode", renderValue: _temp4$2, children: [
|
|
2435
|
+
t46,
|
|
2436
|
+
t47
|
|
2437
|
+
] }) });
|
|
2438
|
+
$[116] = disabled;
|
|
2439
|
+
$[117] = imageResizeMode;
|
|
2440
|
+
$[118] = t44;
|
|
2441
|
+
$[119] = t45;
|
|
2442
|
+
$[120] = t18;
|
|
2443
|
+
} else {
|
|
2444
|
+
t18 = $[120];
|
|
2445
|
+
}
|
|
2446
|
+
const t48 = imageResizeFormatValue || "original";
|
|
2447
|
+
let t49;
|
|
2448
|
+
if ($[121] !== imageResizeFormat || $[122] !== setFieldValue) {
|
|
2449
|
+
t49 = (value_5) => setFieldValue(imageResizeFormat, value_5 || "original");
|
|
2450
|
+
$[121] = imageResizeFormat;
|
|
2451
|
+
$[122] = setFieldValue;
|
|
2452
|
+
$[123] = t49;
|
|
2453
|
+
} else {
|
|
2454
|
+
t49 = $[123];
|
|
2455
|
+
}
|
|
2456
|
+
let t50;
|
|
2457
|
+
let t51;
|
|
2458
|
+
let t52;
|
|
2459
|
+
let t53;
|
|
2460
|
+
if ($[124] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2461
|
+
t50 = /* @__PURE__ */ jsx(SelectItem, { value: "original", children: "Original (keep same format)" });
|
|
2462
|
+
t51 = /* @__PURE__ */ jsx(SelectItem, { value: "jpeg", children: "JPEG" });
|
|
2463
|
+
t52 = /* @__PURE__ */ jsx(SelectItem, { value: "png", children: "PNG" });
|
|
2464
|
+
t53 = /* @__PURE__ */ jsx(SelectItem, { value: "webp", children: "WebP (best compression)" });
|
|
2465
|
+
$[124] = t50;
|
|
2466
|
+
$[125] = t51;
|
|
2467
|
+
$[126] = t52;
|
|
2468
|
+
$[127] = t53;
|
|
2469
|
+
} else {
|
|
2470
|
+
t50 = $[124];
|
|
2471
|
+
t51 = $[125];
|
|
2472
|
+
t52 = $[126];
|
|
2473
|
+
t53 = $[127];
|
|
2474
|
+
}
|
|
2475
|
+
if ($[128] !== disabled || $[129] !== imageResizeFormat || $[130] !== t48 || $[131] !== t49) {
|
|
2476
|
+
t19 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsxs(Select, { disabled, size: "medium", fullWidth: true, name: imageResizeFormat, value: t48, onValueChange: t49, label: "Output format", renderValue: _temp5, children: [
|
|
2477
|
+
t50,
|
|
2478
|
+
t51,
|
|
2479
|
+
t52,
|
|
2480
|
+
t53
|
|
2481
|
+
] }) });
|
|
2482
|
+
$[128] = disabled;
|
|
2483
|
+
$[129] = imageResizeFormat;
|
|
2484
|
+
$[130] = t48;
|
|
2485
|
+
$[131] = t49;
|
|
2486
|
+
$[132] = t19;
|
|
2487
|
+
} else {
|
|
2488
|
+
t19 = $[132];
|
|
2489
|
+
}
|
|
2490
|
+
t9 = "col-span-12";
|
|
2248
2491
|
T0 = DebouncedTextField;
|
|
2249
|
-
t3 =
|
|
2492
|
+
t3 = imageResizeQuality;
|
|
2250
2493
|
t4 = "number";
|
|
2251
|
-
t5 = "
|
|
2494
|
+
t5 = "Quality (0-100)";
|
|
2252
2495
|
t6 = "small";
|
|
2253
|
-
t7 =
|
|
2496
|
+
t7 = disabled;
|
|
2497
|
+
t8 = imageResizeQualityValue !== void 0 && imageResizeQualityValue !== null ? imageResizeQualityValue.toString() : "";
|
|
2254
2498
|
$[6] = acceptedFiles;
|
|
2255
2499
|
$[7] = disabled;
|
|
2256
2500
|
$[8] = existing;
|
|
2257
2501
|
$[9] = fileName;
|
|
2258
2502
|
$[10] = fileNameValue;
|
|
2259
|
-
$[11] =
|
|
2260
|
-
$[12] =
|
|
2261
|
-
$[13] =
|
|
2262
|
-
$[14] =
|
|
2263
|
-
$[15] =
|
|
2264
|
-
$[16] =
|
|
2265
|
-
$[17] =
|
|
2266
|
-
$[18] =
|
|
2267
|
-
$[19] =
|
|
2268
|
-
$[20] =
|
|
2269
|
-
$[21] =
|
|
2270
|
-
$[22] =
|
|
2271
|
-
$[23] =
|
|
2272
|
-
$[24] =
|
|
2273
|
-
$[25] =
|
|
2274
|
-
$[26] =
|
|
2275
|
-
$[27] =
|
|
2276
|
-
$[28] =
|
|
2277
|
-
$[29] =
|
|
2278
|
-
$[30] =
|
|
2503
|
+
$[11] = imageResizeFormat;
|
|
2504
|
+
$[12] = imageResizeMaxHeight;
|
|
2505
|
+
$[13] = imageResizeMaxWidth;
|
|
2506
|
+
$[14] = imageResizeMode;
|
|
2507
|
+
$[15] = imageResizeQuality;
|
|
2508
|
+
$[16] = maxSize;
|
|
2509
|
+
$[17] = setFieldValue;
|
|
2510
|
+
$[18] = storagePath;
|
|
2511
|
+
$[19] = storagePathValue;
|
|
2512
|
+
$[20] = storeUrl;
|
|
2513
|
+
$[21] = values;
|
|
2514
|
+
$[22] = T0;
|
|
2515
|
+
$[23] = T1;
|
|
2516
|
+
$[24] = t10;
|
|
2517
|
+
$[25] = t11;
|
|
2518
|
+
$[26] = t12;
|
|
2519
|
+
$[27] = t13;
|
|
2520
|
+
$[28] = t14;
|
|
2521
|
+
$[29] = t15;
|
|
2522
|
+
$[30] = t16;
|
|
2523
|
+
$[31] = t17;
|
|
2524
|
+
$[32] = t18;
|
|
2525
|
+
$[33] = t19;
|
|
2526
|
+
$[34] = t20;
|
|
2527
|
+
$[35] = t21;
|
|
2528
|
+
$[36] = t3;
|
|
2529
|
+
$[37] = t4;
|
|
2530
|
+
$[38] = t5;
|
|
2531
|
+
$[39] = t6;
|
|
2532
|
+
$[40] = t7;
|
|
2533
|
+
$[41] = t8;
|
|
2534
|
+
$[42] = t9;
|
|
2279
2535
|
} else {
|
|
2280
|
-
T0 = $[
|
|
2281
|
-
T1 = $[
|
|
2282
|
-
t10 = $[
|
|
2283
|
-
t11 = $[
|
|
2284
|
-
t12 = $[
|
|
2285
|
-
t13 = $[
|
|
2286
|
-
t14 = $[
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2536
|
+
T0 = $[22];
|
|
2537
|
+
T1 = $[23];
|
|
2538
|
+
t10 = $[24];
|
|
2539
|
+
t11 = $[25];
|
|
2540
|
+
t12 = $[26];
|
|
2541
|
+
t13 = $[27];
|
|
2542
|
+
t14 = $[28];
|
|
2543
|
+
t15 = $[29];
|
|
2544
|
+
t16 = $[30];
|
|
2545
|
+
t17 = $[31];
|
|
2546
|
+
t18 = $[32];
|
|
2547
|
+
t19 = $[33];
|
|
2548
|
+
t20 = $[34];
|
|
2549
|
+
t21 = $[35];
|
|
2550
|
+
t3 = $[36];
|
|
2551
|
+
t4 = $[37];
|
|
2552
|
+
t5 = $[38];
|
|
2553
|
+
t6 = $[39];
|
|
2554
|
+
t7 = $[40];
|
|
2555
|
+
t8 = $[41];
|
|
2556
|
+
t9 = $[42];
|
|
2294
2557
|
}
|
|
2295
|
-
let
|
|
2296
|
-
if ($[
|
|
2297
|
-
|
|
2298
|
-
const
|
|
2299
|
-
if (
|
|
2300
|
-
setFieldValue(
|
|
2558
|
+
let t22;
|
|
2559
|
+
if ($[133] !== imageResizeQuality || $[134] !== setFieldValue) {
|
|
2560
|
+
t22 = (e_3) => {
|
|
2561
|
+
const value_6 = e_3.target.value;
|
|
2562
|
+
if (value_6 === "") {
|
|
2563
|
+
setFieldValue(imageResizeQuality, void 0);
|
|
2301
2564
|
} else {
|
|
2302
|
-
|
|
2565
|
+
const numValue = parseInt(value_6);
|
|
2566
|
+
if (numValue >= 0 && numValue <= 100) {
|
|
2567
|
+
setFieldValue(imageResizeQuality, numValue);
|
|
2568
|
+
}
|
|
2303
2569
|
}
|
|
2304
2570
|
};
|
|
2305
|
-
$[
|
|
2306
|
-
$[
|
|
2307
|
-
$[
|
|
2571
|
+
$[133] = imageResizeQuality;
|
|
2572
|
+
$[134] = setFieldValue;
|
|
2573
|
+
$[135] = t22;
|
|
2308
2574
|
} else {
|
|
2309
|
-
|
|
2575
|
+
t22 = $[135];
|
|
2310
2576
|
}
|
|
2311
|
-
let
|
|
2312
|
-
if ($[
|
|
2313
|
-
|
|
2314
|
-
$[
|
|
2315
|
-
$[
|
|
2316
|
-
$[
|
|
2317
|
-
$[
|
|
2318
|
-
$[
|
|
2319
|
-
$[
|
|
2320
|
-
$[
|
|
2321
|
-
$[
|
|
2577
|
+
let t23;
|
|
2578
|
+
if ($[136] !== T0 || $[137] !== t22 || $[138] !== t3 || $[139] !== t4 || $[140] !== t5 || $[141] !== t6 || $[142] !== t7 || $[143] !== t8) {
|
|
2579
|
+
t23 = /* @__PURE__ */ jsx(T0, { name: t3, type: t4, label: t5, size: t6, disabled: t7, value: t8, onChange: t22 });
|
|
2580
|
+
$[136] = T0;
|
|
2581
|
+
$[137] = t22;
|
|
2582
|
+
$[138] = t3;
|
|
2583
|
+
$[139] = t4;
|
|
2584
|
+
$[140] = t5;
|
|
2585
|
+
$[141] = t6;
|
|
2586
|
+
$[142] = t7;
|
|
2587
|
+
$[143] = t8;
|
|
2588
|
+
$[144] = t23;
|
|
2322
2589
|
} else {
|
|
2323
|
-
|
|
2590
|
+
t23 = $[144];
|
|
2324
2591
|
}
|
|
2325
|
-
let
|
|
2326
|
-
if ($[
|
|
2327
|
-
|
|
2328
|
-
$[
|
|
2329
|
-
$[81] = t8;
|
|
2330
|
-
$[82] = t17;
|
|
2592
|
+
let t24;
|
|
2593
|
+
if ($[145] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2594
|
+
t24 = /* @__PURE__ */ jsx(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" });
|
|
2595
|
+
$[145] = t24;
|
|
2331
2596
|
} else {
|
|
2332
|
-
|
|
2597
|
+
t24 = $[145];
|
|
2333
2598
|
}
|
|
2334
|
-
let
|
|
2335
|
-
if ($[
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
t12,
|
|
2340
|
-
t17
|
|
2599
|
+
let t25;
|
|
2600
|
+
if ($[146] !== t23 || $[147] !== t9) {
|
|
2601
|
+
t25 = /* @__PURE__ */ jsxs("div", { className: t9, children: [
|
|
2602
|
+
t23,
|
|
2603
|
+
t24
|
|
2341
2604
|
] });
|
|
2342
|
-
$[
|
|
2343
|
-
$[
|
|
2344
|
-
$[
|
|
2345
|
-
$[86] = t17;
|
|
2346
|
-
$[87] = t9;
|
|
2347
|
-
$[88] = t18;
|
|
2605
|
+
$[146] = t23;
|
|
2606
|
+
$[147] = t9;
|
|
2607
|
+
$[148] = t25;
|
|
2348
2608
|
} else {
|
|
2349
|
-
|
|
2609
|
+
t25 = $[148];
|
|
2350
2610
|
}
|
|
2351
|
-
let
|
|
2352
|
-
if ($[
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2611
|
+
let t26;
|
|
2612
|
+
if ($[149] !== t10 || $[150] !== t11 || $[151] !== t12 || $[152] !== t13 || $[153] !== t14 || $[154] !== t15 || $[155] !== t16 || $[156] !== t17 || $[157] !== t18 || $[158] !== t19 || $[159] !== t25) {
|
|
2613
|
+
t26 = /* @__PURE__ */ jsxs("div", { className: t10, children: [
|
|
2614
|
+
t11,
|
|
2615
|
+
t12,
|
|
2616
|
+
t13,
|
|
2617
|
+
t14,
|
|
2618
|
+
t15,
|
|
2619
|
+
t16,
|
|
2620
|
+
t17,
|
|
2621
|
+
t18,
|
|
2622
|
+
t19,
|
|
2623
|
+
t25
|
|
2624
|
+
] });
|
|
2625
|
+
$[149] = t10;
|
|
2626
|
+
$[150] = t11;
|
|
2627
|
+
$[151] = t12;
|
|
2628
|
+
$[152] = t13;
|
|
2629
|
+
$[153] = t14;
|
|
2630
|
+
$[154] = t15;
|
|
2631
|
+
$[155] = t16;
|
|
2632
|
+
$[156] = t17;
|
|
2633
|
+
$[157] = t18;
|
|
2634
|
+
$[158] = t19;
|
|
2635
|
+
$[159] = t25;
|
|
2636
|
+
$[160] = t26;
|
|
2637
|
+
} else {
|
|
2638
|
+
t26 = $[160];
|
|
2639
|
+
}
|
|
2640
|
+
let t27;
|
|
2641
|
+
if ($[161] !== T1 || $[162] !== t20 || $[163] !== t26) {
|
|
2642
|
+
t27 = /* @__PURE__ */ jsx(T1, { title: t20, children: t26 });
|
|
2643
|
+
$[161] = T1;
|
|
2644
|
+
$[162] = t20;
|
|
2645
|
+
$[163] = t26;
|
|
2646
|
+
$[164] = t27;
|
|
2358
2647
|
} else {
|
|
2359
|
-
|
|
2648
|
+
t27 = $[164];
|
|
2360
2649
|
}
|
|
2361
|
-
let
|
|
2362
|
-
if ($[
|
|
2363
|
-
|
|
2364
|
-
$[
|
|
2365
|
-
$[
|
|
2366
|
-
$[
|
|
2650
|
+
let t28;
|
|
2651
|
+
if ($[165] !== t21 || $[166] !== t27) {
|
|
2652
|
+
t28 = /* @__PURE__ */ jsx("div", { className: t21, children: t27 });
|
|
2653
|
+
$[165] = t21;
|
|
2654
|
+
$[166] = t27;
|
|
2655
|
+
$[167] = t28;
|
|
2367
2656
|
} else {
|
|
2368
|
-
|
|
2657
|
+
t28 = $[167];
|
|
2369
2658
|
}
|
|
2370
|
-
let
|
|
2371
|
-
if ($[
|
|
2372
|
-
|
|
2373
|
-
$[
|
|
2374
|
-
$[
|
|
2375
|
-
$[
|
|
2659
|
+
let t29;
|
|
2660
|
+
if ($[168] !== disabled || $[169] !== multiple) {
|
|
2661
|
+
t29 = !multiple && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-2", children: /* @__PURE__ */ jsx(GeneralPropertyValidation, { disabled }) });
|
|
2662
|
+
$[168] = disabled;
|
|
2663
|
+
$[169] = multiple;
|
|
2664
|
+
$[170] = t29;
|
|
2376
2665
|
} else {
|
|
2377
|
-
|
|
2666
|
+
t29 = $[170];
|
|
2378
2667
|
}
|
|
2379
|
-
let
|
|
2380
|
-
if ($[
|
|
2381
|
-
|
|
2382
|
-
$[
|
|
2383
|
-
$[
|
|
2384
|
-
$[
|
|
2668
|
+
let t30;
|
|
2669
|
+
if ($[171] !== disabled || $[172] !== multiple) {
|
|
2670
|
+
t30 = multiple && /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(ArrayPropertyValidation, { disabled }) });
|
|
2671
|
+
$[171] = disabled;
|
|
2672
|
+
$[172] = multiple;
|
|
2673
|
+
$[173] = t30;
|
|
2385
2674
|
} else {
|
|
2386
|
-
|
|
2675
|
+
t30 = $[173];
|
|
2387
2676
|
}
|
|
2388
|
-
let
|
|
2389
|
-
if ($[
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2677
|
+
let t31;
|
|
2678
|
+
if ($[174] !== t29 || $[175] !== t30) {
|
|
2679
|
+
t31 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(ValidationPanel, { children: [
|
|
2680
|
+
t29,
|
|
2681
|
+
t30
|
|
2393
2682
|
] }) });
|
|
2394
|
-
$[
|
|
2395
|
-
$[
|
|
2396
|
-
$[
|
|
2683
|
+
$[174] = t29;
|
|
2684
|
+
$[175] = t30;
|
|
2685
|
+
$[176] = t31;
|
|
2397
2686
|
} else {
|
|
2398
|
-
|
|
2687
|
+
t31 = $[176];
|
|
2399
2688
|
}
|
|
2400
|
-
let
|
|
2401
|
-
if ($[
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2689
|
+
let t32;
|
|
2690
|
+
if ($[177] !== t28 || $[178] !== t31) {
|
|
2691
|
+
t32 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2692
|
+
t28,
|
|
2693
|
+
t31
|
|
2405
2694
|
] });
|
|
2406
|
-
$[
|
|
2407
|
-
$[
|
|
2408
|
-
$[
|
|
2695
|
+
$[177] = t28;
|
|
2696
|
+
$[178] = t31;
|
|
2697
|
+
$[179] = t32;
|
|
2409
2698
|
} else {
|
|
2410
|
-
|
|
2699
|
+
t32 = $[179];
|
|
2411
2700
|
}
|
|
2412
|
-
return
|
|
2701
|
+
return t32;
|
|
2702
|
+
}
|
|
2703
|
+
function _temp5(selected_1) {
|
|
2704
|
+
if (!selected_1) {
|
|
2705
|
+
return "Original";
|
|
2706
|
+
}
|
|
2707
|
+
return selected_1.charAt(0).toUpperCase() + selected_1.slice(1);
|
|
2708
|
+
}
|
|
2709
|
+
function _temp4$2(selected_0) {
|
|
2710
|
+
if (!selected_0) {
|
|
2711
|
+
return "Cover";
|
|
2712
|
+
}
|
|
2713
|
+
return selected_0 === "contain" ? "Contain (fit within bounds)" : "Cover (fill bounds, may crop)";
|
|
2413
2714
|
}
|
|
2414
2715
|
function _temp3$4(selected) {
|
|
2415
2716
|
if (!selected || selected.length === 0) {
|
|
@@ -2424,13 +2725,12 @@ function _temp$a(v) {
|
|
|
2424
2725
|
return fileTypes[v];
|
|
2425
2726
|
}
|
|
2426
2727
|
function editableProperty(property) {
|
|
2427
|
-
if (isPropertyBuilder(property))
|
|
2428
|
-
|
|
2429
|
-
else {
|
|
2430
|
-
|
|
2431
|
-
if (
|
|
2432
|
-
|
|
2433
|
-
return Boolean(eProperty.editable);
|
|
2728
|
+
if (isPropertyBuilder(property)) {
|
|
2729
|
+
return false;
|
|
2730
|
+
} else {
|
|
2731
|
+
if (property.dataType === "array" && typeof property.of === "function") return false;
|
|
2732
|
+
else if (property.dataType === "array" && Array.isArray(property.of)) return false;
|
|
2733
|
+
return property.editable === void 0 ? true : Boolean(property.editable);
|
|
2434
2734
|
}
|
|
2435
2735
|
}
|
|
2436
2736
|
function removeNonEditableProperties(properties) {
|
|
@@ -2509,7 +2809,7 @@ function PropertyFieldPreview(t0) {
|
|
|
2509
2809
|
} else {
|
|
2510
2810
|
t6 = $[11];
|
|
2511
2811
|
}
|
|
2512
|
-
const t7 = includeName ? "body2" : "
|
|
2812
|
+
const t7 = includeName ? "body2" : "label";
|
|
2513
2813
|
const t8 = propertyConfig?.name;
|
|
2514
2814
|
let t9;
|
|
2515
2815
|
if ($[12] !== t7 || $[13] !== t8) {
|
|
@@ -2661,7 +2961,7 @@ function NonEditablePropertyPreview(t0) {
|
|
|
2661
2961
|
const t10 = property?.name ? property.name : name;
|
|
2662
2962
|
let t11;
|
|
2663
2963
|
if ($[15] !== t10) {
|
|
2664
|
-
t11 = /* @__PURE__ */ jsx(Typography, { variant: "
|
|
2964
|
+
t11 = /* @__PURE__ */ jsx(Typography, { variant: "label", component: "span", className: "flex-grow pr-2", children: t10 });
|
|
2665
2965
|
$[15] = t10;
|
|
2666
2966
|
$[16] = t11;
|
|
2667
2967
|
} else {
|
|
@@ -5313,7 +5613,7 @@ function MarkdownPropertyField(t0) {
|
|
|
5313
5613
|
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5314
5614
|
t12 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
5315
5615
|
/* @__PURE__ */ jsx(CloudUploadIcon, {}),
|
|
5316
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-
|
|
5616
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-4", children: "File upload config" })
|
|
5317
5617
|
] });
|
|
5318
5618
|
$[26] = t12;
|
|
5319
5619
|
} else {
|
|
@@ -5572,7 +5872,7 @@ const PropertyForm = React__default.memo(function PropertyForm2(props) {
|
|
|
5572
5872
|
const initialValue = t2;
|
|
5573
5873
|
let t3;
|
|
5574
5874
|
if ($[1] !== collectionEditable || $[2] !== property) {
|
|
5575
|
-
t3 = Boolean(property && !editableProperty(property))
|
|
5875
|
+
t3 = Boolean(property && !editableProperty(property)) || !collectionEditable;
|
|
5576
5876
|
$[1] = collectionEditable;
|
|
5577
5877
|
$[2] = property;
|
|
5578
5878
|
$[3] = t3;
|
|
@@ -6296,9 +6596,11 @@ function PropertyEditFormFields(t0) {
|
|
|
6296
6596
|
t10 = disabled && /* @__PURE__ */ jsxs(InfoLabel, { mode: "warn", children: [
|
|
6297
6597
|
/* @__PURE__ */ jsx(Typography, { children: "This property can't be edited" }),
|
|
6298
6598
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", children: [
|
|
6299
|
-
"You may not have permission to edit it or it is defined in code with
|
|
6599
|
+
"You may not have permission to edit it or it is defined in code with the ",
|
|
6300
6600
|
/* @__PURE__ */ jsx("code", { children: "editable" }),
|
|
6301
|
-
" flag"
|
|
6601
|
+
" flag set to ",
|
|
6602
|
+
/* @__PURE__ */ jsx("code", { children: "false" }),
|
|
6603
|
+
"."
|
|
6302
6604
|
] })
|
|
6303
6605
|
] });
|
|
6304
6606
|
$[95] = disabled;
|
|
@@ -7159,13 +7461,6 @@ function CollectionPropertiesEditorForm({
|
|
|
7159
7461
|
setFieldValue(previousPropertyPath, void 0, false);
|
|
7160
7462
|
setFieldTouched(previousPropertyPath, false, false);
|
|
7161
7463
|
}
|
|
7162
|
-
console.debug("onPropertyChanged", {
|
|
7163
|
-
id: id_0,
|
|
7164
|
-
property: property_0,
|
|
7165
|
-
previousId,
|
|
7166
|
-
namespace: namespace_3,
|
|
7167
|
-
propertyPath
|
|
7168
|
-
});
|
|
7169
7464
|
if (propertyPath) {
|
|
7170
7465
|
setFieldValue(propertyPath, property_0, false);
|
|
7171
7466
|
setFieldTouched(propertyPath, true, false);
|
|
@@ -7285,7 +7580,7 @@ function UnsavedChangesDialog(t0) {
|
|
|
7285
7580
|
}
|
|
7286
7581
|
let t6;
|
|
7287
7582
|
if ($[8] !== t4) {
|
|
7288
|
-
t6 = /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
7583
|
+
t6 = /* @__PURE__ */ jsxs(DialogContent, { className: "mt-4", children: [
|
|
7289
7584
|
t4,
|
|
7290
7585
|
t5
|
|
7291
7586
|
] });
|
|
@@ -10202,7 +10497,7 @@ const ConfigControllerProvider = React__default.memo(function ConfigControllerPr
|
|
|
10202
10497
|
currentPropertiesOrder,
|
|
10203
10498
|
editedCollectionId,
|
|
10204
10499
|
parentCollectionIds: parentCollectionIds_0,
|
|
10205
|
-
collectionEditable: collection?.editable
|
|
10500
|
+
collectionEditable: collection?.editable === void 0 || collection?.editable === true,
|
|
10206
10501
|
existingEntities: existingEntities_0
|
|
10207
10502
|
});
|
|
10208
10503
|
};
|