@firecms/core 3.0.0-canary.187 → 3.0.0-canary.188
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
|
@@ -7,5 +7,5 @@ interface MarkdownEditorFieldProps {
|
|
|
7
7
|
};
|
|
8
8
|
editorProps?: Partial<FireCMSEditorProps>;
|
|
9
9
|
}
|
|
10
|
-
export declare function MarkdownEditorFieldBinding({ property, propertyKey, value, setValue, includeDescription, showError, error, minimalistView, isSubmitting, context, customProps, }: FieldProps<string, MarkdownEditorFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function MarkdownEditorFieldBinding({ property, propertyKey, value, setValue, includeDescription, showError, error, minimalistView, disabled: disabledProp, isSubmitting, context, customProps, }: FieldProps<string, MarkdownEditorFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { forwardRef, useState, useRef, useEffect, useContext, useCallback, useMemo, createElement, createRef, createContext, useLayoutEffect, useDeferredValue } from "react";
|
|
5
|
-
import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, cls, ContentCopyIcon, ErrorIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, OpenInNewIcon, DescriptionIcon, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, EditIcon, DoNotDisturbOnIcon, Menu, MoreVertIcon, MenuItem, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, DeleteIcon, AddIcon, ExpandablePanel, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, StarIcon, Collapse, Container, Alert, CheckIcon, LoadingButton, NotesIcon, FilterListOffIcon, SearchIcon, Avatar, DarkModeIcon, LightModeIcon, BrightnessMediumIcon, LogoutIcon, HandleIcon, RemoveIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, fieldBackgroundMixin,
|
|
5
|
+
import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, cls, ContentCopyIcon, ErrorIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, OpenInNewIcon, DescriptionIcon, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, EditIcon, DoNotDisturbOnIcon, Menu, MoreVertIcon, MenuItem, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, DeleteIcon, AddIcon, ExpandablePanel, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, StarIcon, Collapse, Container, Alert, CheckIcon, LoadingButton, NotesIcon, FilterListOffIcon, SearchIcon, Avatar, DarkModeIcon, LightModeIcon, BrightnessMediumIcon, LogoutIcon, HandleIcon, RemoveIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, fieldBackgroundMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, ArrowDropDownIcon, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, MailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, Tab, Tabs, Sheet, OpenInFullIcon, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
|
|
6
6
|
import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
|
|
7
7
|
import hash from "object-hash";
|
|
8
8
|
import { useFormex, setIn, getIn, useCreateFormex, Formex, Field } from "@firecms/formex";
|
|
@@ -5442,7 +5442,7 @@ function _temp$r(e_0) {
|
|
|
5442
5442
|
return e_0.stopPropagation();
|
|
5443
5443
|
}
|
|
5444
5444
|
function UrlComponentPreview(t0) {
|
|
5445
|
-
const $ = c(
|
|
5445
|
+
const $ = c(31);
|
|
5446
5446
|
const {
|
|
5447
5447
|
url,
|
|
5448
5448
|
previewType,
|
|
@@ -5566,7 +5566,7 @@ function UrlComponentPreview(t0) {
|
|
|
5566
5566
|
}
|
|
5567
5567
|
let t6;
|
|
5568
5568
|
if ($[22] !== hint) {
|
|
5569
|
-
t6 = hint && /* @__PURE__ */ jsx(
|
|
5569
|
+
t6 = hint && /* @__PURE__ */ jsx(Typography, { className: "max-w-full truncate rtl text-left", variant: "caption", children: hint });
|
|
5570
5570
|
$[22] = hint;
|
|
5571
5571
|
$[23] = t6;
|
|
5572
5572
|
} else {
|
|
@@ -5585,7 +5585,16 @@ function UrlComponentPreview(t0) {
|
|
|
5585
5585
|
} else {
|
|
5586
5586
|
t7 = $[27];
|
|
5587
5587
|
}
|
|
5588
|
-
|
|
5588
|
+
let t8;
|
|
5589
|
+
if ($[28] !== hint || $[29] !== t7) {
|
|
5590
|
+
t8 = /* @__PURE__ */ jsx(Tooltip, { title: hint, children: t7 });
|
|
5591
|
+
$[28] = hint;
|
|
5592
|
+
$[29] = t7;
|
|
5593
|
+
$[30] = t8;
|
|
5594
|
+
} else {
|
|
5595
|
+
t8 = $[30];
|
|
5596
|
+
}
|
|
5597
|
+
return t8;
|
|
5589
5598
|
}
|
|
5590
5599
|
}
|
|
5591
5600
|
}
|
|
@@ -8023,12 +8032,7 @@ function useStorageUploadController({
|
|
|
8023
8032
|
const metadata = storage?.metadata;
|
|
8024
8033
|
const size = multipleFilesSupported ? "medium" : "large";
|
|
8025
8034
|
const compression = storage?.imageCompression;
|
|
8026
|
-
const internalInitialValue = (multipleFilesSupported
|
|
8027
|
-
id: getRandomId$2(),
|
|
8028
|
-
storagePathOrDownloadUrl: entry,
|
|
8029
|
-
metadata,
|
|
8030
|
-
size
|
|
8031
|
-
}));
|
|
8035
|
+
const internalInitialValue = getInternalInitialValue(multipleFilesSupported, value, metadata, size);
|
|
8032
8036
|
const [initialValue, setInitialValue] = useState(value);
|
|
8033
8037
|
const [internalValue, setInternalValue] = useState(internalInitialValue);
|
|
8034
8038
|
useEffect(() => {
|
|
@@ -8072,8 +8076,8 @@ function useStorageUploadController({
|
|
|
8072
8076
|
propertyKey
|
|
8073
8077
|
}) ?? "/";
|
|
8074
8078
|
}, [entityId, entityValues, path, resolvedProperty, propertyKey, storage]);
|
|
8075
|
-
const onFileUploadComplete = useCallback(async (uploadedPath,
|
|
8076
|
-
console.debug("onFileUploadComplete", uploadedPath,
|
|
8079
|
+
const onFileUploadComplete = useCallback(async (uploadedPath, entry, metadata_0) => {
|
|
8080
|
+
console.debug("onFileUploadComplete", uploadedPath, entry);
|
|
8077
8081
|
let uploadPathOrDownloadUrl = uploadedPath;
|
|
8078
8082
|
if (storage.storeUrl) {
|
|
8079
8083
|
uploadPathOrDownloadUrl = (await storageSource.getDownloadURL(uploadedPath)).url;
|
|
@@ -8086,8 +8090,8 @@ function useStorageUploadController({
|
|
|
8086
8090
|
return;
|
|
8087
8091
|
}
|
|
8088
8092
|
let newValue;
|
|
8089
|
-
|
|
8090
|
-
|
|
8093
|
+
entry.storagePathOrDownloadUrl = uploadPathOrDownloadUrl;
|
|
8094
|
+
entry.metadata = metadata_0;
|
|
8091
8095
|
newValue = [...internalValue];
|
|
8092
8096
|
newValue = removeDuplicates(newValue);
|
|
8093
8097
|
setInternalValue(newValue);
|
|
@@ -8141,6 +8145,24 @@ function useStorageUploadController({
|
|
|
8141
8145
|
multipleFilesSupported
|
|
8142
8146
|
};
|
|
8143
8147
|
}
|
|
8148
|
+
function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
|
|
8149
|
+
let strings = [];
|
|
8150
|
+
if (multipleFilesSupported) {
|
|
8151
|
+
if (Array.isArray(value) && value.every((v) => typeof v === "string")) {
|
|
8152
|
+
strings = value ?? [];
|
|
8153
|
+
}
|
|
8154
|
+
} else {
|
|
8155
|
+
if (typeof value === "string") {
|
|
8156
|
+
strings = value ? [value] : [];
|
|
8157
|
+
}
|
|
8158
|
+
}
|
|
8159
|
+
return strings.map((entry) => ({
|
|
8160
|
+
id: getRandomId$2(),
|
|
8161
|
+
storagePathOrDownloadUrl: entry,
|
|
8162
|
+
metadata,
|
|
8163
|
+
size
|
|
8164
|
+
}));
|
|
8165
|
+
}
|
|
8144
8166
|
function removeDuplicates(items) {
|
|
8145
8167
|
return items.filter((item, i) => {
|
|
8146
8168
|
return (items.map((v) => v.storagePathOrDownloadUrl).indexOf(item.storagePathOrDownloadUrl) === i || !item.storagePathOrDownloadUrl) && (items.map((v) => v.file).indexOf(item.file) === i || !item.file);
|
|
@@ -8220,7 +8242,7 @@ function StorageUploadProgress({
|
|
|
8220
8242
|
return /* @__PURE__ */ jsx("div", { className: `m-4 w-${imageSize} h-${imageSize}`, children: loading && /* @__PURE__ */ jsx(Skeleton, { className: `w-${imageSize} h-${imageSize}` }) });
|
|
8221
8243
|
}
|
|
8222
8244
|
return /* @__PURE__ */ jsxs("div", { className: cls(paperMixin, "relative m-4 border-box flex items-center justify-center", `min-w-[${imageSize}px] min-h-[${imageSize}px]`), children: [
|
|
8223
|
-
loading && /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-full" }),
|
|
8245
|
+
loading && /* @__PURE__ */ jsx(Skeleton, { className: "m-4 w-full h-full" }),
|
|
8224
8246
|
error && /* @__PURE__ */ jsx(ErrorView, { title: "Error uploading file", error })
|
|
8225
8247
|
] });
|
|
8226
8248
|
}
|
|
@@ -9839,7 +9861,6 @@ function saveEntityToCache(path, data) {
|
|
|
9839
9861
|
if (isLocalStorageAvailable) {
|
|
9840
9862
|
try {
|
|
9841
9863
|
const key = LOCAL_STORAGE_PREFIX + path;
|
|
9842
|
-
console.log("Saving entity to cache", key, data);
|
|
9843
9864
|
const entityString = JSON.stringify(data, customReplacer);
|
|
9844
9865
|
localStorage.setItem(key, entityString);
|
|
9845
9866
|
} catch (error) {
|
|
@@ -17451,7 +17472,7 @@ function _temp$9(e) {
|
|
|
17451
17472
|
return e.stopPropagation();
|
|
17452
17473
|
}
|
|
17453
17474
|
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";
|
|
17454
|
-
const disabledClasses =
|
|
17475
|
+
const disabledClasses = fieldBackgroundDisabledMixin;
|
|
17455
17476
|
const nonActiveDropClasses = fieldBackgroundHoverMixin;
|
|
17456
17477
|
const activeDropClasses = "pt-0 border-2 border-solid";
|
|
17457
17478
|
const acceptDropClasses = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500";
|
|
@@ -17608,7 +17629,7 @@ function StorageUploadFieldBinding(t0) {
|
|
|
17608
17629
|
return t12;
|
|
17609
17630
|
}
|
|
17610
17631
|
function FileDropComponent(t0) {
|
|
17611
|
-
const $ = c(
|
|
17632
|
+
const $ = c(64);
|
|
17612
17633
|
const {
|
|
17613
17634
|
storage,
|
|
17614
17635
|
disabled,
|
|
@@ -17700,12 +17721,13 @@ function FileDropComponent(t0) {
|
|
|
17700
17721
|
t5 = $[12];
|
|
17701
17722
|
}
|
|
17702
17723
|
const t6 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
|
17703
|
-
const t7 =
|
|
17704
|
-
const t8 =
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17724
|
+
const t7 = disabled ? "text-surface-accent-600 dark:text-surface-accent-500" : "";
|
|
17725
|
+
const t8 = multipleFilesSupported && internalValue.length ? "" : "flex";
|
|
17726
|
+
const t9 = !isDragActive;
|
|
17727
|
+
let t10;
|
|
17728
|
+
if ($[13] !== disabled || $[14] !== isDragAccept || $[15] !== isDragActive || $[16] !== isDragReject || $[17] !== t6 || $[18] !== t7 || $[19] !== t8 || $[20] !== t9) {
|
|
17729
|
+
t10 = cls(fieldBackgroundMixin, t6, t7, dropZoneClasses, t8, {
|
|
17730
|
+
[nonActiveDropClasses]: t9,
|
|
17709
17731
|
[activeDropClasses]: isDragActive,
|
|
17710
17732
|
[rejectDropClasses]: isDragReject,
|
|
17711
17733
|
[acceptDropClasses]: isDragAccept,
|
|
@@ -17719,122 +17741,125 @@ function FileDropComponent(t0) {
|
|
|
17719
17741
|
$[18] = t7;
|
|
17720
17742
|
$[19] = t8;
|
|
17721
17743
|
$[20] = t9;
|
|
17744
|
+
$[21] = t10;
|
|
17722
17745
|
} else {
|
|
17723
|
-
|
|
17746
|
+
t10 = $[21];
|
|
17724
17747
|
}
|
|
17725
|
-
const
|
|
17726
|
-
const
|
|
17727
|
-
const
|
|
17728
|
-
const
|
|
17729
|
-
let
|
|
17730
|
-
if ($[
|
|
17731
|
-
|
|
17732
|
-
$[21] = t12;
|
|
17748
|
+
const t11 = droppableProvided.droppableProps;
|
|
17749
|
+
const t12 = droppableProvided.innerRef;
|
|
17750
|
+
const t13 = multipleFilesSupported && internalValue.length ? "overflow-auto" : "";
|
|
17751
|
+
const t14 = multipleFilesSupported && internalValue.length ? "min-h-[180px]" : "min-h-[250px]";
|
|
17752
|
+
let t15;
|
|
17753
|
+
if ($[22] !== t13 || $[23] !== t14) {
|
|
17754
|
+
t15 = cls("flex items-center p-1 no-scrollbar", t13, t14);
|
|
17733
17755
|
$[22] = t13;
|
|
17734
17756
|
$[23] = t14;
|
|
17757
|
+
$[24] = t15;
|
|
17735
17758
|
} else {
|
|
17736
|
-
|
|
17759
|
+
t15 = $[24];
|
|
17737
17760
|
}
|
|
17738
|
-
let
|
|
17739
|
-
if ($[
|
|
17740
|
-
|
|
17741
|
-
$[
|
|
17742
|
-
$[
|
|
17761
|
+
let t16;
|
|
17762
|
+
if ($[25] !== getInputProps) {
|
|
17763
|
+
t16 = getInputProps();
|
|
17764
|
+
$[25] = getInputProps;
|
|
17765
|
+
$[26] = t16;
|
|
17743
17766
|
} else {
|
|
17744
|
-
|
|
17767
|
+
t16 = $[26];
|
|
17745
17768
|
}
|
|
17746
|
-
let
|
|
17747
|
-
if ($[
|
|
17748
|
-
|
|
17749
|
-
$[
|
|
17750
|
-
$[27] = t15;
|
|
17769
|
+
let t17;
|
|
17770
|
+
if ($[27] !== autoFocus || $[28] !== t16) {
|
|
17771
|
+
t17 = /* @__PURE__ */ jsx("input", { autoFocus, ...t16 });
|
|
17772
|
+
$[27] = autoFocus;
|
|
17751
17773
|
$[28] = t16;
|
|
17774
|
+
$[29] = t17;
|
|
17752
17775
|
} else {
|
|
17753
|
-
|
|
17776
|
+
t17 = $[29];
|
|
17754
17777
|
}
|
|
17755
|
-
let
|
|
17756
|
-
if ($[
|
|
17757
|
-
let
|
|
17758
|
-
if ($[
|
|
17759
|
-
|
|
17778
|
+
let t18;
|
|
17779
|
+
if ($[30] !== disabled || $[31] !== internalValue || $[32] !== metadata || $[33] !== name || $[34] !== onClear || $[35] !== onFileUploadComplete || $[36] !== property || $[37] !== size || $[38] !== storagePathBuilder) {
|
|
17780
|
+
let t192;
|
|
17781
|
+
if ($[40] !== disabled || $[41] !== metadata || $[42] !== name || $[43] !== onClear || $[44] !== onFileUploadComplete || $[45] !== property || $[46] !== size || $[47] !== storagePathBuilder) {
|
|
17782
|
+
t192 = (entry, index) => {
|
|
17760
17783
|
let child;
|
|
17761
17784
|
if (entry.storagePathOrDownloadUrl) {
|
|
17762
17785
|
child = /* @__PURE__ */ jsx(StorageItemPreview, { name: `storage_preview_${entry.storagePathOrDownloadUrl}`, property, disabled, value: entry.storagePathOrDownloadUrl, onRemove: onClear, size: entry.size });
|
|
17763
17786
|
} else {
|
|
17764
17787
|
if (entry.file) {
|
|
17765
|
-
child = /* @__PURE__ */ jsx(StorageUploadProgress, { entry, metadata, storagePath: storagePathBuilder(entry.file), onFileUploadComplete, imageSize: size === "
|
|
17788
|
+
child = /* @__PURE__ */ jsx(StorageUploadProgress, { entry, metadata, storagePath: storagePathBuilder(entry.file), onFileUploadComplete, imageSize: size === "large" ? 220 : 118, simple: false });
|
|
17766
17789
|
}
|
|
17767
17790
|
}
|
|
17768
17791
|
return /* @__PURE__ */ jsx(Draggable, { draggableId: `array_field_${name}_${entry.id}`, index, children: (provided, snapshot) => /* @__PURE__ */ jsx("div", { tabIndex: -1, ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, className: cls("rounded-md"), style: {
|
|
17769
17792
|
...provided.draggableProps.style
|
|
17770
17793
|
}, children: child }) }, `array_field_${name}_${entry.id}`);
|
|
17771
17794
|
};
|
|
17772
|
-
$[
|
|
17773
|
-
$[
|
|
17774
|
-
$[
|
|
17775
|
-
$[
|
|
17776
|
-
$[
|
|
17777
|
-
$[
|
|
17778
|
-
$[
|
|
17779
|
-
$[
|
|
17780
|
-
$[
|
|
17795
|
+
$[40] = disabled;
|
|
17796
|
+
$[41] = metadata;
|
|
17797
|
+
$[42] = name;
|
|
17798
|
+
$[43] = onClear;
|
|
17799
|
+
$[44] = onFileUploadComplete;
|
|
17800
|
+
$[45] = property;
|
|
17801
|
+
$[46] = size;
|
|
17802
|
+
$[47] = storagePathBuilder;
|
|
17803
|
+
$[48] = t192;
|
|
17781
17804
|
} else {
|
|
17782
|
-
|
|
17783
|
-
}
|
|
17784
|
-
|
|
17785
|
-
$[
|
|
17786
|
-
$[
|
|
17787
|
-
$[
|
|
17788
|
-
$[
|
|
17789
|
-
$[
|
|
17790
|
-
$[
|
|
17791
|
-
$[
|
|
17792
|
-
$[
|
|
17793
|
-
$[
|
|
17794
|
-
$[
|
|
17795
|
-
} else {
|
|
17796
|
-
|
|
17805
|
+
t192 = $[48];
|
|
17806
|
+
}
|
|
17807
|
+
t18 = internalValue.map(t192);
|
|
17808
|
+
$[30] = disabled;
|
|
17809
|
+
$[31] = internalValue;
|
|
17810
|
+
$[32] = metadata;
|
|
17811
|
+
$[33] = name;
|
|
17812
|
+
$[34] = onClear;
|
|
17813
|
+
$[35] = onFileUploadComplete;
|
|
17814
|
+
$[36] = property;
|
|
17815
|
+
$[37] = size;
|
|
17816
|
+
$[38] = storagePathBuilder;
|
|
17817
|
+
$[39] = t18;
|
|
17818
|
+
} else {
|
|
17819
|
+
t18 = $[39];
|
|
17797
17820
|
}
|
|
17798
|
-
let
|
|
17799
|
-
if ($[
|
|
17800
|
-
|
|
17801
|
-
t16,
|
|
17821
|
+
let t19;
|
|
17822
|
+
if ($[49] !== droppableProvided.droppableProps || $[50] !== droppableProvided.innerRef || $[51] !== droppableProvided.placeholder || $[52] !== t15 || $[53] !== t17 || $[54] !== t18) {
|
|
17823
|
+
t19 = /* @__PURE__ */ jsxs("div", { ...t11, ref: t12, className: t15, children: [
|
|
17802
17824
|
t17,
|
|
17825
|
+
t18,
|
|
17803
17826
|
droppableProvided.placeholder
|
|
17804
17827
|
] });
|
|
17805
|
-
$[
|
|
17806
|
-
$[
|
|
17807
|
-
$[
|
|
17808
|
-
$[
|
|
17809
|
-
$[52] = t16;
|
|
17828
|
+
$[49] = droppableProvided.droppableProps;
|
|
17829
|
+
$[50] = droppableProvided.innerRef;
|
|
17830
|
+
$[51] = droppableProvided.placeholder;
|
|
17831
|
+
$[52] = t15;
|
|
17810
17832
|
$[53] = t17;
|
|
17811
17833
|
$[54] = t18;
|
|
17834
|
+
$[55] = t19;
|
|
17812
17835
|
} else {
|
|
17813
|
-
|
|
17836
|
+
t19 = $[55];
|
|
17814
17837
|
}
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
$[56] =
|
|
17838
|
+
const t20 = disabled ? "text-surface-accent-600 dark:text-surface-accent-500" : "";
|
|
17839
|
+
let t21;
|
|
17840
|
+
if ($[56] !== helpText || $[57] !== t20) {
|
|
17841
|
+
t21 = /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-[38px] box-border m-2 text-center", children: /* @__PURE__ */ jsx(Typography, { align: "center", variant: "label", className: t20, children: helpText }) });
|
|
17842
|
+
$[56] = helpText;
|
|
17843
|
+
$[57] = t20;
|
|
17844
|
+
$[58] = t21;
|
|
17820
17845
|
} else {
|
|
17821
|
-
|
|
17846
|
+
t21 = $[58];
|
|
17822
17847
|
}
|
|
17823
|
-
let
|
|
17824
|
-
if ($[
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17848
|
+
let t22;
|
|
17849
|
+
if ($[59] !== t10 || $[60] !== t19 || $[61] !== t21 || $[62] !== t5) {
|
|
17850
|
+
t22 = /* @__PURE__ */ jsxs("div", { ...t5, className: t10, children: [
|
|
17851
|
+
t19,
|
|
17852
|
+
t21
|
|
17828
17853
|
] });
|
|
17829
|
-
$[
|
|
17830
|
-
$[
|
|
17831
|
-
$[
|
|
17832
|
-
$[
|
|
17833
|
-
$[
|
|
17854
|
+
$[59] = t10;
|
|
17855
|
+
$[60] = t19;
|
|
17856
|
+
$[61] = t21;
|
|
17857
|
+
$[62] = t5;
|
|
17858
|
+
$[63] = t22;
|
|
17834
17859
|
} else {
|
|
17835
|
-
|
|
17860
|
+
t22 = $[63];
|
|
17836
17861
|
}
|
|
17837
|
-
return
|
|
17862
|
+
return t22;
|
|
17838
17863
|
}
|
|
17839
17864
|
function _temp2$4(a, b) {
|
|
17840
17865
|
return {
|
|
@@ -20099,7 +20124,7 @@ function _temp$6(t0) {
|
|
|
20099
20124
|
};
|
|
20100
20125
|
}
|
|
20101
20126
|
function MarkdownEditorFieldBinding(t0) {
|
|
20102
|
-
const $ = c(
|
|
20127
|
+
const $ = c(57);
|
|
20103
20128
|
const {
|
|
20104
20129
|
property,
|
|
20105
20130
|
propertyKey,
|
|
@@ -20109,9 +20134,12 @@ function MarkdownEditorFieldBinding(t0) {
|
|
|
20109
20134
|
showError,
|
|
20110
20135
|
error,
|
|
20111
20136
|
minimalistView,
|
|
20137
|
+
disabled: disabledProp,
|
|
20138
|
+
isSubmitting,
|
|
20112
20139
|
context,
|
|
20113
20140
|
customProps
|
|
20114
20141
|
} = t0;
|
|
20142
|
+
const disabled = disabledProp || isSubmitting;
|
|
20115
20143
|
const highlight = customProps?.highlight;
|
|
20116
20144
|
const editorProps = customProps?.editorProps;
|
|
20117
20145
|
const storageSource = useStorageSource();
|
|
@@ -20260,83 +20288,87 @@ function MarkdownEditorFieldBinding(t0) {
|
|
|
20260
20288
|
t9 = $[27];
|
|
20261
20289
|
}
|
|
20262
20290
|
let t10;
|
|
20263
|
-
if ($[28] !==
|
|
20264
|
-
t10 = /* @__PURE__ */ jsx(FireCMSEditor, { content: value, onMarkdownContentChange: onContentChange, version: t8, highlight, handleImageUpload: t9, ...editorProps });
|
|
20265
|
-
$[28] =
|
|
20266
|
-
$[29] =
|
|
20267
|
-
$[30] =
|
|
20268
|
-
$[31] =
|
|
20269
|
-
$[32] =
|
|
20270
|
-
$[33] =
|
|
20271
|
-
$[34] =
|
|
20291
|
+
if ($[28] !== disabled || $[29] !== editorProps || $[30] !== highlight || $[31] !== onContentChange || $[32] !== t8 || $[33] !== t9 || $[34] !== value) {
|
|
20292
|
+
t10 = /* @__PURE__ */ jsx(FireCMSEditor, { content: value, onMarkdownContentChange: onContentChange, version: t8, highlight, disabled, handleImageUpload: t9, ...editorProps });
|
|
20293
|
+
$[28] = disabled;
|
|
20294
|
+
$[29] = editorProps;
|
|
20295
|
+
$[30] = highlight;
|
|
20296
|
+
$[31] = onContentChange;
|
|
20297
|
+
$[32] = t8;
|
|
20298
|
+
$[33] = t9;
|
|
20299
|
+
$[34] = value;
|
|
20300
|
+
$[35] = t10;
|
|
20272
20301
|
} else {
|
|
20273
|
-
t10 = $[
|
|
20302
|
+
t10 = $[35];
|
|
20274
20303
|
}
|
|
20275
20304
|
const editor = t10;
|
|
20276
20305
|
if (minimalistView) {
|
|
20277
20306
|
return editor;
|
|
20278
20307
|
}
|
|
20279
20308
|
let t11;
|
|
20280
|
-
if ($[
|
|
20309
|
+
if ($[36] !== property) {
|
|
20281
20310
|
t11 = getIconForProperty(property, "small");
|
|
20282
|
-
$[
|
|
20283
|
-
$[
|
|
20311
|
+
$[36] = property;
|
|
20312
|
+
$[37] = t11;
|
|
20284
20313
|
} else {
|
|
20285
|
-
t11 = $[
|
|
20314
|
+
t11 = $[37];
|
|
20286
20315
|
}
|
|
20287
20316
|
const t12 = property.validation?.required;
|
|
20288
20317
|
let t13;
|
|
20289
|
-
if ($[
|
|
20318
|
+
if ($[38] !== property.name || $[39] !== propertyKey || $[40] !== t11 || $[41] !== t12) {
|
|
20290
20319
|
t13 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t11, required: t12, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" });
|
|
20291
|
-
$[
|
|
20292
|
-
$[
|
|
20293
|
-
$[
|
|
20294
|
-
$[
|
|
20295
|
-
$[
|
|
20296
|
-
} else {
|
|
20297
|
-
t13 = $[41];
|
|
20298
|
-
}
|
|
20299
|
-
let t14;
|
|
20300
|
-
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
20301
|
-
t14 = cls("rounded-md", fieldBackgroundMixin, fieldBackgroundHoverMixin);
|
|
20302
|
-
$[42] = t14;
|
|
20320
|
+
$[38] = property.name;
|
|
20321
|
+
$[39] = propertyKey;
|
|
20322
|
+
$[40] = t11;
|
|
20323
|
+
$[41] = t12;
|
|
20324
|
+
$[42] = t13;
|
|
20303
20325
|
} else {
|
|
20304
|
-
|
|
20326
|
+
t13 = $[42];
|
|
20305
20327
|
}
|
|
20328
|
+
const t14 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
|
20306
20329
|
let t15;
|
|
20307
|
-
if ($[43] !==
|
|
20308
|
-
t15 =
|
|
20309
|
-
$[43] =
|
|
20330
|
+
if ($[43] !== t14) {
|
|
20331
|
+
t15 = cls("rounded-md", fieldBackgroundMixin, t14);
|
|
20332
|
+
$[43] = t14;
|
|
20310
20333
|
$[44] = t15;
|
|
20311
20334
|
} else {
|
|
20312
20335
|
t15 = $[44];
|
|
20313
20336
|
}
|
|
20314
20337
|
let t16;
|
|
20315
|
-
if ($[45] !==
|
|
20316
|
-
t16 = /* @__PURE__ */ jsx(
|
|
20317
|
-
$[45] =
|
|
20318
|
-
$[46] =
|
|
20319
|
-
$[47] =
|
|
20320
|
-
$[48] = showError;
|
|
20321
|
-
$[49] = t16;
|
|
20338
|
+
if ($[45] !== editor || $[46] !== t15) {
|
|
20339
|
+
t16 = /* @__PURE__ */ jsx("div", { className: t15, children: editor });
|
|
20340
|
+
$[45] = editor;
|
|
20341
|
+
$[46] = t15;
|
|
20342
|
+
$[47] = t16;
|
|
20322
20343
|
} else {
|
|
20323
|
-
t16 = $[
|
|
20344
|
+
t16 = $[47];
|
|
20324
20345
|
}
|
|
20325
20346
|
let t17;
|
|
20326
|
-
if ($[
|
|
20327
|
-
t17 = /* @__PURE__ */
|
|
20347
|
+
if ($[48] !== error || $[49] !== includeDescription || $[50] !== property || $[51] !== showError) {
|
|
20348
|
+
t17 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error, property });
|
|
20349
|
+
$[48] = error;
|
|
20350
|
+
$[49] = includeDescription;
|
|
20351
|
+
$[50] = property;
|
|
20352
|
+
$[51] = showError;
|
|
20353
|
+
$[52] = t17;
|
|
20354
|
+
} else {
|
|
20355
|
+
t17 = $[52];
|
|
20356
|
+
}
|
|
20357
|
+
let t18;
|
|
20358
|
+
if ($[53] !== t13 || $[54] !== t16 || $[55] !== t17) {
|
|
20359
|
+
t18 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20328
20360
|
t13,
|
|
20329
|
-
|
|
20330
|
-
|
|
20361
|
+
t16,
|
|
20362
|
+
t17
|
|
20331
20363
|
] });
|
|
20332
|
-
$[
|
|
20333
|
-
$[
|
|
20334
|
-
$[
|
|
20335
|
-
$[
|
|
20364
|
+
$[53] = t13;
|
|
20365
|
+
$[54] = t16;
|
|
20366
|
+
$[55] = t17;
|
|
20367
|
+
$[56] = t18;
|
|
20336
20368
|
} else {
|
|
20337
|
-
|
|
20369
|
+
t18 = $[56];
|
|
20338
20370
|
}
|
|
20339
|
-
return
|
|
20371
|
+
return t18;
|
|
20340
20372
|
}
|
|
20341
20373
|
function ArrayCustomShapedFieldBinding(t0) {
|
|
20342
20374
|
const $ = c(46);
|