@firecms/core 3.0.0-canary.187 → 3.0.0-canary.189
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/form/field_bindings/MarkdownEditorFieldBinding.d.ts +1 -1
- package/dist/index.es.js +186 -154
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +185 -153
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/core/EntityForm.tsx +8 -4
- package/src/form/components/StorageUploadProgress.tsx +1 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +8 -5
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +5 -3
- package/src/preview/components/UrlComponentPreview.tsx +17 -18
- package/src/util/entity_cache.ts +0 -1
- package/src/util/useStorageUploadController.tsx +39 -21
package/dist/index.umd.js
CHANGED
|
@@ -5444,7 +5444,7 @@
|
|
|
5444
5444
|
return e_0.stopPropagation();
|
|
5445
5445
|
}
|
|
5446
5446
|
function UrlComponentPreview(t0) {
|
|
5447
|
-
const $ = reactCompilerRuntime.c(
|
|
5447
|
+
const $ = reactCompilerRuntime.c(31);
|
|
5448
5448
|
const {
|
|
5449
5449
|
url,
|
|
5450
5450
|
previewType,
|
|
@@ -5568,7 +5568,7 @@
|
|
|
5568
5568
|
}
|
|
5569
5569
|
let t6;
|
|
5570
5570
|
if ($[22] !== hint) {
|
|
5571
|
-
t6 = hint && /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
5571
|
+
t6 = hint && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "max-w-full truncate rtl text-left", variant: "caption", children: hint });
|
|
5572
5572
|
$[22] = hint;
|
|
5573
5573
|
$[23] = t6;
|
|
5574
5574
|
} else {
|
|
@@ -5587,7 +5587,16 @@
|
|
|
5587
5587
|
} else {
|
|
5588
5588
|
t7 = $[27];
|
|
5589
5589
|
}
|
|
5590
|
-
|
|
5590
|
+
let t8;
|
|
5591
|
+
if ($[28] !== hint || $[29] !== t7) {
|
|
5592
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: hint, children: t7 });
|
|
5593
|
+
$[28] = hint;
|
|
5594
|
+
$[29] = t7;
|
|
5595
|
+
$[30] = t8;
|
|
5596
|
+
} else {
|
|
5597
|
+
t8 = $[30];
|
|
5598
|
+
}
|
|
5599
|
+
return t8;
|
|
5591
5600
|
}
|
|
5592
5601
|
}
|
|
5593
5602
|
}
|
|
@@ -8025,12 +8034,7 @@
|
|
|
8025
8034
|
const metadata = storage?.metadata;
|
|
8026
8035
|
const size = multipleFilesSupported ? "medium" : "large";
|
|
8027
8036
|
const compression = storage?.imageCompression;
|
|
8028
|
-
const internalInitialValue = (multipleFilesSupported
|
|
8029
|
-
id: getRandomId$2(),
|
|
8030
|
-
storagePathOrDownloadUrl: entry,
|
|
8031
|
-
metadata,
|
|
8032
|
-
size
|
|
8033
|
-
}));
|
|
8037
|
+
const internalInitialValue = getInternalInitialValue(multipleFilesSupported, value, metadata, size);
|
|
8034
8038
|
const [initialValue, setInitialValue] = React.useState(value);
|
|
8035
8039
|
const [internalValue, setInternalValue] = React.useState(internalInitialValue);
|
|
8036
8040
|
React.useEffect(() => {
|
|
@@ -8074,8 +8078,8 @@
|
|
|
8074
8078
|
propertyKey
|
|
8075
8079
|
}) ?? "/";
|
|
8076
8080
|
}, [entityId, entityValues, path, resolvedProperty, propertyKey, storage]);
|
|
8077
|
-
const onFileUploadComplete = React.useCallback(async (uploadedPath,
|
|
8078
|
-
console.debug("onFileUploadComplete", uploadedPath,
|
|
8081
|
+
const onFileUploadComplete = React.useCallback(async (uploadedPath, entry, metadata_0) => {
|
|
8082
|
+
console.debug("onFileUploadComplete", uploadedPath, entry);
|
|
8079
8083
|
let uploadPathOrDownloadUrl = uploadedPath;
|
|
8080
8084
|
if (storage.storeUrl) {
|
|
8081
8085
|
uploadPathOrDownloadUrl = (await storageSource.getDownloadURL(uploadedPath)).url;
|
|
@@ -8088,8 +8092,8 @@
|
|
|
8088
8092
|
return;
|
|
8089
8093
|
}
|
|
8090
8094
|
let newValue;
|
|
8091
|
-
|
|
8092
|
-
|
|
8095
|
+
entry.storagePathOrDownloadUrl = uploadPathOrDownloadUrl;
|
|
8096
|
+
entry.metadata = metadata_0;
|
|
8093
8097
|
newValue = [...internalValue];
|
|
8094
8098
|
newValue = removeDuplicates(newValue);
|
|
8095
8099
|
setInternalValue(newValue);
|
|
@@ -8143,6 +8147,24 @@
|
|
|
8143
8147
|
multipleFilesSupported
|
|
8144
8148
|
};
|
|
8145
8149
|
}
|
|
8150
|
+
function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
|
|
8151
|
+
let strings = [];
|
|
8152
|
+
if (multipleFilesSupported) {
|
|
8153
|
+
if (Array.isArray(value) && value.every((v) => typeof v === "string")) {
|
|
8154
|
+
strings = value ?? [];
|
|
8155
|
+
}
|
|
8156
|
+
} else {
|
|
8157
|
+
if (typeof value === "string") {
|
|
8158
|
+
strings = value ? [value] : [];
|
|
8159
|
+
}
|
|
8160
|
+
}
|
|
8161
|
+
return strings.map((entry) => ({
|
|
8162
|
+
id: getRandomId$2(),
|
|
8163
|
+
storagePathOrDownloadUrl: entry,
|
|
8164
|
+
metadata,
|
|
8165
|
+
size
|
|
8166
|
+
}));
|
|
8167
|
+
}
|
|
8146
8168
|
function removeDuplicates(items) {
|
|
8147
8169
|
return items.filter((item, i) => {
|
|
8148
8170
|
return (items.map((v) => v.storagePathOrDownloadUrl).indexOf(item.storagePathOrDownloadUrl) === i || !item.storagePathOrDownloadUrl) && (items.map((v) => v.file).indexOf(item.file) === i || !item.file);
|
|
@@ -8222,7 +8244,7 @@
|
|
|
8222
8244
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `m-4 w-${imageSize} h-${imageSize}`, children: loading && /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { className: `w-${imageSize} h-${imageSize}` }) });
|
|
8223
8245
|
}
|
|
8224
8246
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls(ui.paperMixin, "relative m-4 border-box flex items-center justify-center", `min-w-[${imageSize}px] min-h-[${imageSize}px]`), children: [
|
|
8225
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { className: "w-full h-full" }),
|
|
8247
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { className: "m-4 w-full h-full" }),
|
|
8226
8248
|
error && /* @__PURE__ */ jsxRuntime.jsx(ErrorView, { title: "Error uploading file", error })
|
|
8227
8249
|
] });
|
|
8228
8250
|
}
|
|
@@ -9841,7 +9863,6 @@
|
|
|
9841
9863
|
if (isLocalStorageAvailable) {
|
|
9842
9864
|
try {
|
|
9843
9865
|
const key = LOCAL_STORAGE_PREFIX + path;
|
|
9844
|
-
console.log("Saving entity to cache", key, data);
|
|
9845
9866
|
const entityString = JSON.stringify(data, customReplacer);
|
|
9846
9867
|
localStorage.setItem(key, entityString);
|
|
9847
9868
|
} catch (error) {
|
|
@@ -17453,7 +17474,7 @@
|
|
|
17453
17474
|
return e.stopPropagation();
|
|
17454
17475
|
}
|
|
17455
17476
|
const dropZoneClasses = "box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid";
|
|
17456
|
-
const disabledClasses =
|
|
17477
|
+
const disabledClasses = ui.fieldBackgroundDisabledMixin;
|
|
17457
17478
|
const nonActiveDropClasses = ui.fieldBackgroundHoverMixin;
|
|
17458
17479
|
const activeDropClasses = "pt-0 border-2 border-solid";
|
|
17459
17480
|
const acceptDropClasses = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500";
|
|
@@ -17610,7 +17631,7 @@
|
|
|
17610
17631
|
return t12;
|
|
17611
17632
|
}
|
|
17612
17633
|
function FileDropComponent(t0) {
|
|
17613
|
-
const $ = reactCompilerRuntime.c(
|
|
17634
|
+
const $ = reactCompilerRuntime.c(64);
|
|
17614
17635
|
const {
|
|
17615
17636
|
storage,
|
|
17616
17637
|
disabled,
|
|
@@ -17702,12 +17723,13 @@
|
|
|
17702
17723
|
t5 = $[12];
|
|
17703
17724
|
}
|
|
17704
17725
|
const t6 = disabled ? ui.fieldBackgroundDisabledMixin : ui.fieldBackgroundHoverMixin;
|
|
17705
|
-
const t7 =
|
|
17706
|
-
const t8 =
|
|
17707
|
-
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17726
|
+
const t7 = disabled ? "text-surface-accent-600 dark:text-surface-accent-500" : "";
|
|
17727
|
+
const t8 = multipleFilesSupported && internalValue.length ? "" : "flex";
|
|
17728
|
+
const t9 = !isDragActive;
|
|
17729
|
+
let t10;
|
|
17730
|
+
if ($[13] !== disabled || $[14] !== isDragAccept || $[15] !== isDragActive || $[16] !== isDragReject || $[17] !== t6 || $[18] !== t7 || $[19] !== t8 || $[20] !== t9) {
|
|
17731
|
+
t10 = ui.cls(ui.fieldBackgroundMixin, t6, t7, dropZoneClasses, t8, {
|
|
17732
|
+
[nonActiveDropClasses]: t9,
|
|
17711
17733
|
[activeDropClasses]: isDragActive,
|
|
17712
17734
|
[rejectDropClasses]: isDragReject,
|
|
17713
17735
|
[acceptDropClasses]: isDragAccept,
|
|
@@ -17721,122 +17743,125 @@
|
|
|
17721
17743
|
$[18] = t7;
|
|
17722
17744
|
$[19] = t8;
|
|
17723
17745
|
$[20] = t9;
|
|
17746
|
+
$[21] = t10;
|
|
17724
17747
|
} else {
|
|
17725
|
-
|
|
17748
|
+
t10 = $[21];
|
|
17726
17749
|
}
|
|
17727
|
-
const
|
|
17728
|
-
const
|
|
17729
|
-
const
|
|
17730
|
-
const
|
|
17731
|
-
let
|
|
17732
|
-
if ($[
|
|
17733
|
-
|
|
17734
|
-
$[21] = t12;
|
|
17750
|
+
const t11 = droppableProvided.droppableProps;
|
|
17751
|
+
const t12 = droppableProvided.innerRef;
|
|
17752
|
+
const t13 = multipleFilesSupported && internalValue.length ? "overflow-auto" : "";
|
|
17753
|
+
const t14 = multipleFilesSupported && internalValue.length ? "min-h-[180px]" : "min-h-[250px]";
|
|
17754
|
+
let t15;
|
|
17755
|
+
if ($[22] !== t13 || $[23] !== t14) {
|
|
17756
|
+
t15 = ui.cls("flex items-center p-1 no-scrollbar", t13, t14);
|
|
17735
17757
|
$[22] = t13;
|
|
17736
17758
|
$[23] = t14;
|
|
17759
|
+
$[24] = t15;
|
|
17737
17760
|
} else {
|
|
17738
|
-
|
|
17761
|
+
t15 = $[24];
|
|
17739
17762
|
}
|
|
17740
|
-
let
|
|
17741
|
-
if ($[
|
|
17742
|
-
|
|
17743
|
-
$[
|
|
17744
|
-
$[
|
|
17763
|
+
let t16;
|
|
17764
|
+
if ($[25] !== getInputProps) {
|
|
17765
|
+
t16 = getInputProps();
|
|
17766
|
+
$[25] = getInputProps;
|
|
17767
|
+
$[26] = t16;
|
|
17745
17768
|
} else {
|
|
17746
|
-
|
|
17769
|
+
t16 = $[26];
|
|
17747
17770
|
}
|
|
17748
|
-
let
|
|
17749
|
-
if ($[
|
|
17750
|
-
|
|
17751
|
-
$[
|
|
17752
|
-
$[27] = t15;
|
|
17771
|
+
let t17;
|
|
17772
|
+
if ($[27] !== autoFocus || $[28] !== t16) {
|
|
17773
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx("input", { autoFocus, ...t16 });
|
|
17774
|
+
$[27] = autoFocus;
|
|
17753
17775
|
$[28] = t16;
|
|
17776
|
+
$[29] = t17;
|
|
17754
17777
|
} else {
|
|
17755
|
-
|
|
17778
|
+
t17 = $[29];
|
|
17756
17779
|
}
|
|
17757
|
-
let
|
|
17758
|
-
if ($[
|
|
17759
|
-
let
|
|
17760
|
-
if ($[
|
|
17761
|
-
|
|
17780
|
+
let t18;
|
|
17781
|
+
if ($[30] !== disabled || $[31] !== internalValue || $[32] !== metadata || $[33] !== name || $[34] !== onClear || $[35] !== onFileUploadComplete || $[36] !== property || $[37] !== size || $[38] !== storagePathBuilder) {
|
|
17782
|
+
let t192;
|
|
17783
|
+
if ($[40] !== disabled || $[41] !== metadata || $[42] !== name || $[43] !== onClear || $[44] !== onFileUploadComplete || $[45] !== property || $[46] !== size || $[47] !== storagePathBuilder) {
|
|
17784
|
+
t192 = (entry, index) => {
|
|
17762
17785
|
let child;
|
|
17763
17786
|
if (entry.storagePathOrDownloadUrl) {
|
|
17764
17787
|
child = /* @__PURE__ */ jsxRuntime.jsx(StorageItemPreview, { name: `storage_preview_${entry.storagePathOrDownloadUrl}`, property, disabled, value: entry.storagePathOrDownloadUrl, onRemove: onClear, size: entry.size });
|
|
17765
17788
|
} else {
|
|
17766
17789
|
if (entry.file) {
|
|
17767
|
-
child = /* @__PURE__ */ jsxRuntime.jsx(StorageUploadProgress, { entry, metadata, storagePath: storagePathBuilder(entry.file), onFileUploadComplete, imageSize: size === "
|
|
17790
|
+
child = /* @__PURE__ */ jsxRuntime.jsx(StorageUploadProgress, { entry, metadata, storagePath: storagePathBuilder(entry.file), onFileUploadComplete, imageSize: size === "large" ? 220 : 118, simple: false });
|
|
17768
17791
|
}
|
|
17769
17792
|
}
|
|
17770
17793
|
return /* @__PURE__ */ jsxRuntime.jsx(dnd.Draggable, { draggableId: `array_field_${name}_${entry.id}`, index, children: (provided, snapshot) => /* @__PURE__ */ jsxRuntime.jsx("div", { tabIndex: -1, ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, className: ui.cls("rounded-md"), style: {
|
|
17771
17794
|
...provided.draggableProps.style
|
|
17772
17795
|
}, children: child }) }, `array_field_${name}_${entry.id}`);
|
|
17773
17796
|
};
|
|
17774
|
-
$[
|
|
17775
|
-
$[
|
|
17776
|
-
$[
|
|
17777
|
-
$[
|
|
17778
|
-
$[
|
|
17779
|
-
$[
|
|
17780
|
-
$[
|
|
17781
|
-
$[
|
|
17782
|
-
$[
|
|
17797
|
+
$[40] = disabled;
|
|
17798
|
+
$[41] = metadata;
|
|
17799
|
+
$[42] = name;
|
|
17800
|
+
$[43] = onClear;
|
|
17801
|
+
$[44] = onFileUploadComplete;
|
|
17802
|
+
$[45] = property;
|
|
17803
|
+
$[46] = size;
|
|
17804
|
+
$[47] = storagePathBuilder;
|
|
17805
|
+
$[48] = t192;
|
|
17783
17806
|
} else {
|
|
17784
|
-
|
|
17785
|
-
}
|
|
17786
|
-
|
|
17787
|
-
$[
|
|
17788
|
-
$[
|
|
17789
|
-
$[
|
|
17790
|
-
$[
|
|
17791
|
-
$[
|
|
17792
|
-
$[
|
|
17793
|
-
$[
|
|
17794
|
-
$[
|
|
17795
|
-
$[
|
|
17796
|
-
$[
|
|
17797
|
-
} else {
|
|
17798
|
-
|
|
17807
|
+
t192 = $[48];
|
|
17808
|
+
}
|
|
17809
|
+
t18 = internalValue.map(t192);
|
|
17810
|
+
$[30] = disabled;
|
|
17811
|
+
$[31] = internalValue;
|
|
17812
|
+
$[32] = metadata;
|
|
17813
|
+
$[33] = name;
|
|
17814
|
+
$[34] = onClear;
|
|
17815
|
+
$[35] = onFileUploadComplete;
|
|
17816
|
+
$[36] = property;
|
|
17817
|
+
$[37] = size;
|
|
17818
|
+
$[38] = storagePathBuilder;
|
|
17819
|
+
$[39] = t18;
|
|
17820
|
+
} else {
|
|
17821
|
+
t18 = $[39];
|
|
17799
17822
|
}
|
|
17800
|
-
let
|
|
17801
|
-
if ($[
|
|
17802
|
-
|
|
17803
|
-
t16,
|
|
17823
|
+
let t19;
|
|
17824
|
+
if ($[49] !== droppableProvided.droppableProps || $[50] !== droppableProvided.innerRef || $[51] !== droppableProvided.placeholder || $[52] !== t15 || $[53] !== t17 || $[54] !== t18) {
|
|
17825
|
+
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ...t11, ref: t12, className: t15, children: [
|
|
17804
17826
|
t17,
|
|
17827
|
+
t18,
|
|
17805
17828
|
droppableProvided.placeholder
|
|
17806
17829
|
] });
|
|
17807
|
-
$[
|
|
17808
|
-
$[
|
|
17809
|
-
$[
|
|
17810
|
-
$[
|
|
17811
|
-
$[52] = t16;
|
|
17830
|
+
$[49] = droppableProvided.droppableProps;
|
|
17831
|
+
$[50] = droppableProvided.innerRef;
|
|
17832
|
+
$[51] = droppableProvided.placeholder;
|
|
17833
|
+
$[52] = t15;
|
|
17812
17834
|
$[53] = t17;
|
|
17813
17835
|
$[54] = t18;
|
|
17836
|
+
$[55] = t19;
|
|
17814
17837
|
} else {
|
|
17815
|
-
|
|
17838
|
+
t19 = $[55];
|
|
17816
17839
|
}
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
$[56] =
|
|
17840
|
+
const t20 = disabled ? "text-surface-accent-600 dark:text-surface-accent-500" : "";
|
|
17841
|
+
let t21;
|
|
17842
|
+
if ($[56] !== helpText || $[57] !== t20) {
|
|
17843
|
+
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow min-h-[38px] box-border m-2 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { align: "center", variant: "label", className: t20, children: helpText }) });
|
|
17844
|
+
$[56] = helpText;
|
|
17845
|
+
$[57] = t20;
|
|
17846
|
+
$[58] = t21;
|
|
17822
17847
|
} else {
|
|
17823
|
-
|
|
17848
|
+
t21 = $[58];
|
|
17824
17849
|
}
|
|
17825
|
-
let
|
|
17826
|
-
if ($[
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17850
|
+
let t22;
|
|
17851
|
+
if ($[59] !== t10 || $[60] !== t19 || $[61] !== t21 || $[62] !== t5) {
|
|
17852
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ...t5, className: t10, children: [
|
|
17853
|
+
t19,
|
|
17854
|
+
t21
|
|
17830
17855
|
] });
|
|
17831
|
-
$[
|
|
17832
|
-
$[
|
|
17833
|
-
$[
|
|
17834
|
-
$[
|
|
17835
|
-
$[
|
|
17856
|
+
$[59] = t10;
|
|
17857
|
+
$[60] = t19;
|
|
17858
|
+
$[61] = t21;
|
|
17859
|
+
$[62] = t5;
|
|
17860
|
+
$[63] = t22;
|
|
17836
17861
|
} else {
|
|
17837
|
-
|
|
17862
|
+
t22 = $[63];
|
|
17838
17863
|
}
|
|
17839
|
-
return
|
|
17864
|
+
return t22;
|
|
17840
17865
|
}
|
|
17841
17866
|
function _temp2$4(a, b) {
|
|
17842
17867
|
return {
|
|
@@ -20101,7 +20126,7 @@
|
|
|
20101
20126
|
};
|
|
20102
20127
|
}
|
|
20103
20128
|
function MarkdownEditorFieldBinding(t0) {
|
|
20104
|
-
const $ = reactCompilerRuntime.c(
|
|
20129
|
+
const $ = reactCompilerRuntime.c(57);
|
|
20105
20130
|
const {
|
|
20106
20131
|
property,
|
|
20107
20132
|
propertyKey,
|
|
@@ -20111,9 +20136,12 @@
|
|
|
20111
20136
|
showError,
|
|
20112
20137
|
error,
|
|
20113
20138
|
minimalistView,
|
|
20139
|
+
disabled: disabledProp,
|
|
20140
|
+
isSubmitting,
|
|
20114
20141
|
context,
|
|
20115
20142
|
customProps
|
|
20116
20143
|
} = t0;
|
|
20144
|
+
const disabled = disabledProp || isSubmitting;
|
|
20117
20145
|
const highlight = customProps?.highlight;
|
|
20118
20146
|
const editorProps = customProps?.editorProps;
|
|
20119
20147
|
const storageSource = useStorageSource();
|
|
@@ -20262,83 +20290,87 @@
|
|
|
20262
20290
|
t9 = $[27];
|
|
20263
20291
|
}
|
|
20264
20292
|
let t10;
|
|
20265
|
-
if ($[28] !==
|
|
20266
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(editor.FireCMSEditor, { content: value, onMarkdownContentChange: onContentChange, version: t8, highlight, handleImageUpload: t9, ...editorProps });
|
|
20267
|
-
$[28] =
|
|
20268
|
-
$[29] =
|
|
20269
|
-
$[30] =
|
|
20270
|
-
$[31] =
|
|
20271
|
-
$[32] =
|
|
20272
|
-
$[33] =
|
|
20273
|
-
$[34] =
|
|
20293
|
+
if ($[28] !== disabled || $[29] !== editorProps || $[30] !== highlight || $[31] !== onContentChange || $[32] !== t8 || $[33] !== t9 || $[34] !== value) {
|
|
20294
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(editor.FireCMSEditor, { content: value, onMarkdownContentChange: onContentChange, version: t8, highlight, disabled, handleImageUpload: t9, ...editorProps });
|
|
20295
|
+
$[28] = disabled;
|
|
20296
|
+
$[29] = editorProps;
|
|
20297
|
+
$[30] = highlight;
|
|
20298
|
+
$[31] = onContentChange;
|
|
20299
|
+
$[32] = t8;
|
|
20300
|
+
$[33] = t9;
|
|
20301
|
+
$[34] = value;
|
|
20302
|
+
$[35] = t10;
|
|
20274
20303
|
} else {
|
|
20275
|
-
t10 = $[
|
|
20304
|
+
t10 = $[35];
|
|
20276
20305
|
}
|
|
20277
20306
|
const editor$1 = t10;
|
|
20278
20307
|
if (minimalistView) {
|
|
20279
20308
|
return editor$1;
|
|
20280
20309
|
}
|
|
20281
20310
|
let t11;
|
|
20282
|
-
if ($[
|
|
20311
|
+
if ($[36] !== property) {
|
|
20283
20312
|
t11 = getIconForProperty(property, "small");
|
|
20284
|
-
$[
|
|
20285
|
-
$[
|
|
20313
|
+
$[36] = property;
|
|
20314
|
+
$[37] = t11;
|
|
20286
20315
|
} else {
|
|
20287
|
-
t11 = $[
|
|
20316
|
+
t11 = $[37];
|
|
20288
20317
|
}
|
|
20289
20318
|
const t12 = property.validation?.required;
|
|
20290
20319
|
let t13;
|
|
20291
|
-
if ($[
|
|
20320
|
+
if ($[38] !== property.name || $[39] !== propertyKey || $[40] !== t11 || $[41] !== t12) {
|
|
20292
20321
|
t13 = /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: t11, required: t12, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" });
|
|
20293
|
-
$[
|
|
20294
|
-
$[
|
|
20295
|
-
$[
|
|
20296
|
-
$[
|
|
20297
|
-
$[
|
|
20298
|
-
} else {
|
|
20299
|
-
t13 = $[41];
|
|
20300
|
-
}
|
|
20301
|
-
let t14;
|
|
20302
|
-
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
20303
|
-
t14 = ui.cls("rounded-md", ui.fieldBackgroundMixin, ui.fieldBackgroundHoverMixin);
|
|
20304
|
-
$[42] = t14;
|
|
20322
|
+
$[38] = property.name;
|
|
20323
|
+
$[39] = propertyKey;
|
|
20324
|
+
$[40] = t11;
|
|
20325
|
+
$[41] = t12;
|
|
20326
|
+
$[42] = t13;
|
|
20305
20327
|
} else {
|
|
20306
|
-
|
|
20328
|
+
t13 = $[42];
|
|
20307
20329
|
}
|
|
20330
|
+
const t14 = disabled ? ui.fieldBackgroundDisabledMixin : ui.fieldBackgroundHoverMixin;
|
|
20308
20331
|
let t15;
|
|
20309
|
-
if ($[43] !==
|
|
20310
|
-
t15 =
|
|
20311
|
-
$[43] =
|
|
20332
|
+
if ($[43] !== t14) {
|
|
20333
|
+
t15 = ui.cls("rounded-md", ui.fieldBackgroundMixin, t14);
|
|
20334
|
+
$[43] = t14;
|
|
20312
20335
|
$[44] = t15;
|
|
20313
20336
|
} else {
|
|
20314
20337
|
t15 = $[44];
|
|
20315
20338
|
}
|
|
20316
20339
|
let t16;
|
|
20317
|
-
if ($[45] !==
|
|
20318
|
-
t16 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
20319
|
-
$[45] =
|
|
20320
|
-
$[46] =
|
|
20321
|
-
$[47] =
|
|
20322
|
-
$[48] = showError;
|
|
20323
|
-
$[49] = t16;
|
|
20340
|
+
if ($[45] !== editor$1 || $[46] !== t15) {
|
|
20341
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t15, children: editor$1 });
|
|
20342
|
+
$[45] = editor$1;
|
|
20343
|
+
$[46] = t15;
|
|
20344
|
+
$[47] = t16;
|
|
20324
20345
|
} else {
|
|
20325
|
-
t16 = $[
|
|
20346
|
+
t16 = $[47];
|
|
20326
20347
|
}
|
|
20327
20348
|
let t17;
|
|
20328
|
-
if ($[
|
|
20329
|
-
t17 = /* @__PURE__ */ jsxRuntime.
|
|
20349
|
+
if ($[48] !== error || $[49] !== includeDescription || $[50] !== property || $[51] !== showError) {
|
|
20350
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(FieldHelperText, { includeDescription, showError, error, property });
|
|
20351
|
+
$[48] = error;
|
|
20352
|
+
$[49] = includeDescription;
|
|
20353
|
+
$[50] = property;
|
|
20354
|
+
$[51] = showError;
|
|
20355
|
+
$[52] = t17;
|
|
20356
|
+
} else {
|
|
20357
|
+
t17 = $[52];
|
|
20358
|
+
}
|
|
20359
|
+
let t18;
|
|
20360
|
+
if ($[53] !== t13 || $[54] !== t16 || $[55] !== t17) {
|
|
20361
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20330
20362
|
t13,
|
|
20331
|
-
|
|
20332
|
-
|
|
20363
|
+
t16,
|
|
20364
|
+
t17
|
|
20333
20365
|
] });
|
|
20334
|
-
$[
|
|
20335
|
-
$[
|
|
20336
|
-
$[
|
|
20337
|
-
$[
|
|
20366
|
+
$[53] = t13;
|
|
20367
|
+
$[54] = t16;
|
|
20368
|
+
$[55] = t17;
|
|
20369
|
+
$[56] = t18;
|
|
20338
20370
|
} else {
|
|
20339
|
-
|
|
20371
|
+
t18 = $[56];
|
|
20340
20372
|
}
|
|
20341
|
-
return
|
|
20373
|
+
return t18;
|
|
20342
20374
|
}
|
|
20343
20375
|
function ArrayCustomShapedFieldBinding(t0) {
|
|
20344
20376
|
const $ = reactCompilerRuntime.c(46);
|