@firecms/core 3.0.0-canary.58 → 3.0.0-canary.59
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/components/VirtualTable/VirtualTableProps.d.ts +4 -0
- package/dist/index.es.js +1037 -1035
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/components/VirtualTable/VirtualTable.tsx +3 -1
- package/src/components/VirtualTable/VirtualTableProps.tsx +5 -0
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as n, jsxs as v, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import * as yt from "react";
|
|
3
|
-
import S, { useRef as
|
|
3
|
+
import S, { useRef as le, useEffect as z, useContext as Le, useCallback as x, useMemo as he, useState as R, createElement as ea, createRef as ta, createContext as ra, forwardRef as ia, useLayoutEffect as Gr, useDeferredValue as na } from "react";
|
|
4
4
|
import { SnackbarProvider as oa, useSnackbar as aa } from "notistack";
|
|
5
5
|
import Qi from "object-hash";
|
|
6
6
|
import { useCreateFormex as pn, Formex as fn, setIn as jr, Field as hn, getIn as Dt, useFormex as ri } from "@firecms/formex";
|
|
7
|
-
import { getColorSchemeForSeed as gn, CHIP_COLORS as sa, Tooltip as ke, ErrorIcon as An, Typography as
|
|
8
|
-
import
|
|
7
|
+
import { getColorSchemeForSeed as gn, CHIP_COLORS as sa, Tooltip as ke, ErrorIcon as An, Typography as q, CircleIcon as bn, FunctionsIcon as la, iconKeys as ii, coolIconKeys as Yr, Icon as ni, IconButton as de, ContentCopyIcon as pr, OpenInNewIcon as Yt, DescriptionIcon as ca, Skeleton as Ye, Chip as oi, cls as Z, defaultBorderMixin as Se, KeyboardTabIcon as ai, Checkbox as Lt, Markdown as si, TextareaAutosize as da, MultiSelect as yn, MultiSelectItem as wn, Select as tt, SelectItem as rt, BooleanSwitch as ua, DateTimeField as Ut, paperMixin as fr, ErrorOutlineIcon as ma, EditIcon as pa, Button as ge, RemoveCircleIcon as fa, Menu as xt, MoreVertIcon as vn, MenuItem as Re, CircularProgress as Et, SearchBar as li, Badge as Ri, ArrowUpwardIcon as Sr, Popover as ci, FilterListIcon as ha, AssignmentIcon as ga, CenteredView as er, Label as di, TextField as wt, ClearIcon as Tt, BooleanSwitchWithLabel as hr, useOutsideAlerter as kn, Dialog as ui, DialogContent as mi, DialogActions as Ct, FileCopyIcon as Aa, ArchiveIcon as ba, DeleteIcon as Lr, AddIcon as ct, ExpandablePanel as dt, Card as ya, ArrowForwardIcon as _n, cardMixin as wa, cardClickableMixin as va, focusedMixin as Ur, StarIcon as xn, StarBorderIcon as En, Collapse as Cn, Container as ka, FilterListOffIcon as _a, SearchIcon as xa, LoadingButton as Ea, Avatar as Di, DarkModeIcon as Ca, LightModeIcon as Ba, LogoutIcon as Sa, fieldBackgroundHoverMixin as pi, HandleIcon as Ia, RemoveIcon as fi, debounce as Na, InfoIcon as Fa, CloseIcon as Bn, fieldBackgroundMixin as ar, fieldBackgroundDisabledMixin as Sn, ArrowDropDownIcon as In, useInjectStyles as Pa, Alert as Qa, ShortTextIcon as Ra, SubjectIcon as Da, FormatQuoteIcon as Ta, HttpIcon as Oa, EmailIcon as Ma, FlagIcon as za, ListIcon as Va, ListAltIcon as Ga, NumbersIcon as ja, FormatListNumberedIcon as Ti, UploadFileIcon as Ya, DriveFolderUploadIcon as La, LinkIcon as Ua, AddLinkIcon as $a, ScheduleIcon as qa, BallotIcon as Oi, RepeatIcon as Mi, ViewStreamIcon as Wa, Tab as Ir, Tabs as Ja, Sheet as Nn, useLocaleConfig as Ha, MenuIcon as zi, ChevronLeftIcon as Za } from "@firecms/ui";
|
|
8
|
+
import $ from "react-fast-compare";
|
|
9
9
|
import { Link as gr, useNavigate as $t, useLocation as Ar, UNSAFE_NavigationContext as Xa, NavLink as Ka, Route as tr, Routes as es } from "react-router-dom";
|
|
10
10
|
import { format as ts } from "date-fns";
|
|
11
11
|
import * as rs from "date-fns/locale";
|
|
@@ -360,14 +360,14 @@ function Ne({
|
|
|
360
360
|
/* @__PURE__ */ n(An, { size: "small", color: "error" }),
|
|
361
361
|
/* @__PURE__ */ v("div", { className: "pl-2", children: [
|
|
362
362
|
e && /* @__PURE__ */ n(
|
|
363
|
-
|
|
363
|
+
q,
|
|
364
364
|
{
|
|
365
365
|
variant: "body2",
|
|
366
366
|
className: "font-medium",
|
|
367
367
|
children: e
|
|
368
368
|
}
|
|
369
369
|
),
|
|
370
|
-
/* @__PURE__ */ n(
|
|
370
|
+
/* @__PURE__ */ n(q, { variant: "body2", children: i })
|
|
371
371
|
] })
|
|
372
372
|
]
|
|
373
373
|
}
|
|
@@ -2445,7 +2445,7 @@ const Hr = S.memo(
|
|
|
2445
2445
|
const s = Yr.length;
|
|
2446
2446
|
return o || (o = Yr[xs(t.path) % s]), /* @__PURE__ */ n(ni, { iconKey: o, size: "medium", className: r });
|
|
2447
2447
|
},
|
|
2448
|
-
(e, t) =>
|
|
2448
|
+
(e, t) => $(e.collectionOrView?.icon, t.collectionOrView?.icon)
|
|
2449
2449
|
), cr = ii.reduce((e, t) => (e[t] = t, e), {});
|
|
2450
2450
|
function Nu(e, t) {
|
|
2451
2451
|
if (t !== void 0 && t === 1)
|
|
@@ -2774,7 +2774,7 @@ function Kn(e, t, r = "", i = 0, a = 10) {
|
|
|
2774
2774
|
}) : e !== t && console.log("Changed props:", r));
|
|
2775
2775
|
}
|
|
2776
2776
|
function Gu(e, t = 3) {
|
|
2777
|
-
const r =
|
|
2777
|
+
const r = le(e);
|
|
2778
2778
|
z(() => {
|
|
2779
2779
|
console.log("Changed props:"), Kn(e, r.current, "", 0, t), r.current = e;
|
|
2780
2780
|
});
|
|
@@ -2808,7 +2808,7 @@ const eo = S.createContext({}), Xe = (e) => {
|
|
|
2808
2808
|
close: i
|
|
2809
2809
|
}), [r, i]);
|
|
2810
2810
|
}, oo = S.createContext(void 0), Bt = () => Le(oo), ao = S.createContext({}), Qs = ({ children: e }) => {
|
|
2811
|
-
const [t, r] =
|
|
2811
|
+
const [t, r] = R([]), i = le(t), a = (l) => {
|
|
2812
2812
|
i.current = l, r(l);
|
|
2813
2813
|
}, o = x(() => {
|
|
2814
2814
|
if (t.length === 0)
|
|
@@ -2838,7 +2838,7 @@ const eo = S.createContext({}), Xe = (e) => {
|
|
|
2838
2838
|
`dialog_${c}`
|
|
2839
2839
|
))
|
|
2840
2840
|
] });
|
|
2841
|
-
}, Rs = () => Le(ao), so = S.createContext({}), pe = () => Le(so), lo = S.createContext({}), St = () => Le(lo),
|
|
2841
|
+
}, Rs = () => Le(ao), so = S.createContext({}), pe = () => Le(so), lo = S.createContext({}), St = () => Le(lo), Ie = () => {
|
|
2842
2842
|
const e = mt(), t = vr(), r = pt(), i = _e(), a = Xe(), o = Wt(), s = ft(), l = Bt(), c = Rs(), d = pe(), u = St(), p = S.useRef({
|
|
2843
2843
|
authController: e,
|
|
2844
2844
|
sideDialogsController: t,
|
|
@@ -2876,7 +2876,7 @@ function ju({
|
|
|
2876
2876
|
itemCount: a,
|
|
2877
2877
|
searchString: o
|
|
2878
2878
|
}) {
|
|
2879
|
-
const s = Xe(t), c = _e().resolveAliasesFrom(e), d = i ? i[0] : void 0, u = i ? i[1] : void 0, p =
|
|
2879
|
+
const s = Xe(t), c = _e().resolveAliasesFrom(e), d = i ? i[0] : void 0, u = i ? i[1] : void 0, p = Ie(), [m, f] = R([]), [g, A] = R(!1), [h, b] = R(), [y, w] = R(!1);
|
|
2880
2880
|
return z(() => {
|
|
2881
2881
|
A(!0);
|
|
2882
2882
|
const E = async (C) => {
|
|
@@ -2936,7 +2936,7 @@ function co({
|
|
|
2936
2936
|
collection: r,
|
|
2937
2937
|
useCache: i = !1
|
|
2938
2938
|
}) {
|
|
2939
|
-
const a = Xe(r), s = _e().resolveAliasesFrom(e), l =
|
|
2939
|
+
const a = Xe(r), s = _e().resolveAliasesFrom(e), l = Ie(), [c, d] = R(), [u, p] = R(!0), [m, f] = R();
|
|
2940
2940
|
return z(() => {
|
|
2941
2941
|
p(!0);
|
|
2942
2942
|
const g = async (h) => {
|
|
@@ -3146,7 +3146,7 @@ function Ts({
|
|
|
3146
3146
|
function Yu({
|
|
3147
3147
|
path: e
|
|
3148
3148
|
}) {
|
|
3149
|
-
const t =
|
|
3149
|
+
const t = Ie(), [r, i] = R(), [a, o] = R(!1), [s, l] = R();
|
|
3150
3150
|
return z(() => {
|
|
3151
3151
|
t.navigation && (o(!0), l(void 0), Ts({ path: e, context: t }).then((d) => {
|
|
3152
3152
|
i(d);
|
|
@@ -3154,7 +3154,7 @@ function Yu({
|
|
|
3154
3154
|
}, [e, t]), t.navigation ? { data: r, dataLoading: a, dataLoadingError: s } : { dataLoading: !0 };
|
|
3155
3155
|
}
|
|
3156
3156
|
const Os = () => Le(On), Ms = (e) => {
|
|
3157
|
-
const { onSuccess: t, onError: r, disableClipboardAPI: i = !1, copiedDuration: a } = e || {}, o =
|
|
3157
|
+
const { onSuccess: t, onError: r, disableClipboardAPI: i = !1, copiedDuration: a } = e || {}, o = le(null), [s, l] = R(!1), [c, d] = R("");
|
|
3158
3158
|
z(() => {
|
|
3159
3159
|
a && setTimeout(() => l(!1), a);
|
|
3160
3160
|
}, [s]);
|
|
@@ -3205,7 +3205,7 @@ typeof window < "u" && window.addEventListener("resize", () => {
|
|
|
3205
3205
|
e !== Vt && (Vt = e, Vs());
|
|
3206
3206
|
});
|
|
3207
3207
|
const qe = () => {
|
|
3208
|
-
const [e, t] =
|
|
3208
|
+
const [e, t] = R(Vt);
|
|
3209
3209
|
return z(() => {
|
|
3210
3210
|
const r = (i) => {
|
|
3211
3211
|
t(i);
|
|
@@ -3302,66 +3302,66 @@ function Uu(e) {
|
|
|
3302
3302
|
userConfigPersistence: d,
|
|
3303
3303
|
dataSourceDelegate: u,
|
|
3304
3304
|
injectCollections: p
|
|
3305
|
-
} = e, m =
|
|
3305
|
+
} = e, m = le(), f = le(), g = le(), [A, h] = R(!1), [b, y] = R(void 0), [w, E] = R(!0), [_, C] = R(void 0), k = Ee(t), B = Ee(r), F = k ? `/${k}` : "/", I = k ? `/${k}/${B}` : `/${B}`, P = x(
|
|
3306
3306
|
(T) => k ? `/${k}/${Ht(T)}` : `/${Ht(T)}`,
|
|
3307
3307
|
[k]
|
|
3308
3308
|
), D = x(
|
|
3309
3309
|
(T) => `${Ee(r)}/${Ht(T)}`,
|
|
3310
3310
|
[r]
|
|
3311
|
-
),
|
|
3312
|
-
let
|
|
3313
|
-
...(T ?? []).map((
|
|
3314
|
-
url: D(
|
|
3311
|
+
), Y = x((T, oe, te, J) => {
|
|
3312
|
+
let j = [
|
|
3313
|
+
...(T ?? []).map((N) => N.hideFromNavigation ? void 0 : {
|
|
3314
|
+
url: D(N.id ?? N.path),
|
|
3315
3315
|
type: "collection",
|
|
3316
|
-
name:
|
|
3317
|
-
path:
|
|
3318
|
-
collection:
|
|
3319
|
-
description:
|
|
3320
|
-
group: qi(
|
|
3316
|
+
name: N.name.trim(),
|
|
3317
|
+
path: N.id ?? N.path,
|
|
3318
|
+
collection: N,
|
|
3319
|
+
description: N.description?.trim(),
|
|
3320
|
+
group: qi(N)
|
|
3321
3321
|
}).filter(Boolean),
|
|
3322
|
-
...(
|
|
3323
|
-
url:
|
|
3324
|
-
name:
|
|
3322
|
+
...(oe ?? []).map((N) => N.hideFromNavigation ? void 0 : {
|
|
3323
|
+
url: P(Array.isArray(N.path) ? N.path[0] : N.path),
|
|
3324
|
+
name: N.name.trim(),
|
|
3325
3325
|
type: "view",
|
|
3326
|
-
path:
|
|
3327
|
-
view:
|
|
3328
|
-
description:
|
|
3329
|
-
group: qi(
|
|
3326
|
+
path: N.path,
|
|
3327
|
+
view: N,
|
|
3328
|
+
description: N.description?.trim(),
|
|
3329
|
+
group: qi(N)
|
|
3330
3330
|
}).filter(Boolean),
|
|
3331
|
-
...(
|
|
3332
|
-
url:
|
|
3333
|
-
name:
|
|
3331
|
+
...(te ?? []).map((N) => N.hideFromNavigation ? void 0 : {
|
|
3332
|
+
url: P(Array.isArray(N.path) ? N.path[0] : N.path),
|
|
3333
|
+
name: N.name.trim(),
|
|
3334
3334
|
type: "admin",
|
|
3335
|
-
path:
|
|
3336
|
-
view:
|
|
3337
|
-
description:
|
|
3335
|
+
path: N.path,
|
|
3336
|
+
view: N,
|
|
3337
|
+
description: N.description?.trim(),
|
|
3338
3338
|
group: "Admin"
|
|
3339
3339
|
}).filter(Boolean)
|
|
3340
3340
|
];
|
|
3341
|
-
|
|
3342
|
-
const Ae =
|
|
3343
|
-
return Ae === -1 &&
|
|
3341
|
+
j = j.sort((N, Q) => N.group !== "Views" && N.group !== "Admin" && (Q.group === "Views" || Q.group === "Admin") ? -1 : Q.group !== "Views" && Q.group !== "Admin" && (N.group === "Views" || N.group === "Admin") || N.group === "Admin" && Q.group !== "Admin" ? 1 : N.group !== "Admin" && Q.group === "Admin" || N.group === "Views" && Q.group !== "Views" ? -1 : N.group !== "Views" && Q.group === "Views" ? 1 : 0), J && (j = j.sort((N, Q) => {
|
|
3342
|
+
const Ae = J.indexOf(N.path), Be = J.indexOf(Q.path);
|
|
3343
|
+
return Ae === -1 && Be === -1 ? 0 : Ae === -1 ? 1 : Be === -1 ? -1 : Ae - Be;
|
|
3344
3344
|
}));
|
|
3345
|
-
const
|
|
3345
|
+
const V = Object.values(j).map((N) => N.group).filter(Boolean).filter((N, Q, Ae) => Ae.indexOf(N) === Q);
|
|
3346
3346
|
return {
|
|
3347
|
-
navigationEntries:
|
|
3348
|
-
groups:
|
|
3347
|
+
navigationEntries: j,
|
|
3348
|
+
groups: V
|
|
3349
3349
|
};
|
|
3350
|
-
}, [
|
|
3350
|
+
}, [P, D]), ne = x(async () => {
|
|
3351
3351
|
if (!i.initialLoading) {
|
|
3352
3352
|
console.debug("Refreshing navigation");
|
|
3353
3353
|
try {
|
|
3354
|
-
const [T = [],
|
|
3354
|
+
const [T = [], oe, te = []] = await Promise.all(
|
|
3355
3355
|
[
|
|
3356
3356
|
Ls(a, o, i, u, p),
|
|
3357
3357
|
$i(s, i, u),
|
|
3358
3358
|
$i(l, i, u)
|
|
3359
3359
|
]
|
|
3360
3360
|
);
|
|
3361
|
-
let
|
|
3362
|
-
ho(m.current ?? [], T) || (m.current = T,
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3361
|
+
let J = !1;
|
|
3362
|
+
ho(m.current ?? [], T) || (m.current = T, J = !0), $(f.current, oe) || (f.current = oe, J = !0), $(g.current, te) || (g.current = te, J = !0);
|
|
3363
|
+
const j = Y(T, oe, te, c);
|
|
3364
|
+
J && !$(b, j) && y(j);
|
|
3365
3365
|
} catch (T) {
|
|
3366
3366
|
console.error(T), C(T);
|
|
3367
3367
|
}
|
|
@@ -3374,116 +3374,116 @@ function Uu(e) {
|
|
|
3374
3374
|
i.initialLoading,
|
|
3375
3375
|
s,
|
|
3376
3376
|
l,
|
|
3377
|
-
|
|
3377
|
+
Y,
|
|
3378
3378
|
p
|
|
3379
3379
|
]);
|
|
3380
3380
|
z(() => {
|
|
3381
|
-
|
|
3382
|
-
}, [
|
|
3383
|
-
const
|
|
3384
|
-
const
|
|
3385
|
-
if (!
|
|
3381
|
+
ne();
|
|
3382
|
+
}, [ne]);
|
|
3383
|
+
const ie = x((T, oe = !1) => {
|
|
3384
|
+
const te = m.current;
|
|
3385
|
+
if (!te)
|
|
3386
3386
|
return;
|
|
3387
|
-
const
|
|
3388
|
-
let
|
|
3389
|
-
if (
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3392
|
-
...
|
|
3393
|
-
subcollections:
|
|
3394
|
-
callbacks:
|
|
3395
|
-
permissions:
|
|
3387
|
+
const J = hi(Ee(T), te), j = oe ? d?.getCollectionConfig(T) : void 0, V = J ? $e(J, j ?? {}) : void 0;
|
|
3388
|
+
let N = V;
|
|
3389
|
+
if (V) {
|
|
3390
|
+
const Q = V.subcollections, Ae = V.callbacks, Be = V.permissions;
|
|
3391
|
+
N = {
|
|
3392
|
+
...N,
|
|
3393
|
+
subcollections: N?.subcollections ?? Q,
|
|
3394
|
+
callbacks: N?.callbacks ?? Ae,
|
|
3395
|
+
permissions: N?.permissions ?? Be
|
|
3396
3396
|
};
|
|
3397
3397
|
}
|
|
3398
|
-
if (
|
|
3399
|
-
return {
|
|
3398
|
+
if (N)
|
|
3399
|
+
return { ...V, ...N };
|
|
3400
3400
|
}, [d]), H = x((T) => {
|
|
3401
|
-
const
|
|
3402
|
-
if (
|
|
3401
|
+
const oe = m.current;
|
|
3402
|
+
if (oe === void 0)
|
|
3403
3403
|
throw Error("getCollectionFromPaths: Collections have not been initialised yet");
|
|
3404
|
-
let
|
|
3405
|
-
for (let
|
|
3406
|
-
const
|
|
3407
|
-
if (
|
|
3404
|
+
let te = [...oe ?? []];
|
|
3405
|
+
for (let J = 0; J < T.length; J++) {
|
|
3406
|
+
const j = T[J], V = te.find((N) => N.id === j || N.path === j);
|
|
3407
|
+
if (!V)
|
|
3408
3408
|
return;
|
|
3409
|
-
if (
|
|
3410
|
-
return
|
|
3409
|
+
if (te = V.subcollections, J === T.length - 1)
|
|
3410
|
+
return V;
|
|
3411
3411
|
}
|
|
3412
|
-
}, []),
|
|
3413
|
-
const
|
|
3414
|
-
if (
|
|
3412
|
+
}, []), U = x((T) => {
|
|
3413
|
+
const oe = m.current;
|
|
3414
|
+
if (oe === void 0)
|
|
3415
3415
|
throw Error("getCollectionFromIds: Collections have not been initialised yet");
|
|
3416
|
-
let
|
|
3417
|
-
for (let
|
|
3418
|
-
const
|
|
3419
|
-
if (
|
|
3416
|
+
let te = [...oe ?? []];
|
|
3417
|
+
for (let J = 0; J < T.length; J++) {
|
|
3418
|
+
const j = T[J], V = te.find((N) => N.id === j);
|
|
3419
|
+
if (!V)
|
|
3420
3420
|
return;
|
|
3421
|
-
if (
|
|
3422
|
-
return
|
|
3421
|
+
if (te = V.subcollections, J === T.length - 1)
|
|
3422
|
+
return V;
|
|
3423
3423
|
}
|
|
3424
|
-
}, []),
|
|
3425
|
-
(T) => Ee(T + "/").startsWith(Ee(
|
|
3426
|
-
[
|
|
3427
|
-
),
|
|
3428
|
-
if (T.startsWith(
|
|
3429
|
-
return T.replace(
|
|
3430
|
-
throw Error("Expected path starting with " +
|
|
3431
|
-
}, [
|
|
3424
|
+
}, []), O = x(
|
|
3425
|
+
(T) => Ee(T + "/").startsWith(Ee(I) + "/"),
|
|
3426
|
+
[I]
|
|
3427
|
+
), K = x((T) => {
|
|
3428
|
+
if (T.startsWith(I))
|
|
3429
|
+
return T.replace(I, "");
|
|
3430
|
+
throw Error("Expected path starting with " + I);
|
|
3431
|
+
}, [I]), ee = x(
|
|
3432
3432
|
({
|
|
3433
3433
|
path: T
|
|
3434
3434
|
}) => `s/edit/${Ht(T)}`,
|
|
3435
3435
|
[]
|
|
3436
|
-
),
|
|
3437
|
-
const
|
|
3438
|
-
return zn(T,
|
|
3439
|
-
}, []),
|
|
3440
|
-
const
|
|
3436
|
+
), se = x((T) => {
|
|
3437
|
+
const oe = m.current ?? [];
|
|
3438
|
+
return zn(T, oe);
|
|
3439
|
+
}, []), ce = x((T) => {
|
|
3440
|
+
const oe = m.current ?? [];
|
|
3441
3441
|
return po({
|
|
3442
3442
|
path: T,
|
|
3443
|
-
collections:
|
|
3443
|
+
collections: oe
|
|
3444
3444
|
});
|
|
3445
|
-
}, []),
|
|
3446
|
-
const
|
|
3447
|
-
|
|
3448
|
-
const
|
|
3449
|
-
for (let
|
|
3450
|
-
|
|
3451
|
-
return
|
|
3452
|
-
}, [
|
|
3453
|
-
let
|
|
3454
|
-
const
|
|
3455
|
-
for (let
|
|
3456
|
-
const
|
|
3457
|
-
if (!
|
|
3458
|
-
throw Error(`Collection with id ${
|
|
3459
|
-
|
|
3445
|
+
}, []), W = x((T) => {
|
|
3446
|
+
const te = T.split("/").filter((j, V) => V % 2 === 0);
|
|
3447
|
+
te.pop();
|
|
3448
|
+
const J = [];
|
|
3449
|
+
for (let j = 1; j <= te.length; j++)
|
|
3450
|
+
J.push(te.slice(0, j));
|
|
3451
|
+
return J.map((j) => H(j)?.id).filter(Boolean);
|
|
3452
|
+
}, [ce]), re = x((T) => {
|
|
3453
|
+
let te = m.current;
|
|
3454
|
+
const J = [];
|
|
3455
|
+
for (let j = 0; j < T.length; j++) {
|
|
3456
|
+
const V = T[j], N = te.find((Q) => Q.id === V);
|
|
3457
|
+
if (!N)
|
|
3458
|
+
throw Error(`Collection with id ${V} not found`);
|
|
3459
|
+
J.push(N.path), te = N.subcollections;
|
|
3460
3460
|
}
|
|
3461
|
-
return
|
|
3462
|
-
}, [
|
|
3461
|
+
return J;
|
|
3462
|
+
}, [U]);
|
|
3463
3463
|
return {
|
|
3464
3464
|
collections: m.current,
|
|
3465
3465
|
views: f.current,
|
|
3466
3466
|
adminViews: g.current,
|
|
3467
3467
|
loading: !A || w,
|
|
3468
3468
|
navigationLoadingError: _,
|
|
3469
|
-
homeUrl:
|
|
3469
|
+
homeUrl: F,
|
|
3470
3470
|
basePath: t,
|
|
3471
3471
|
baseCollectionPath: r,
|
|
3472
3472
|
initialised: A,
|
|
3473
|
-
getCollection:
|
|
3473
|
+
getCollection: ie,
|
|
3474
3474
|
getCollectionFromPaths: H,
|
|
3475
|
-
getCollectionFromIds:
|
|
3476
|
-
isUrlCollectionPath:
|
|
3477
|
-
urlPathToDataPath:
|
|
3475
|
+
getCollectionFromIds: U,
|
|
3476
|
+
isUrlCollectionPath: O,
|
|
3477
|
+
urlPathToDataPath: K,
|
|
3478
3478
|
buildUrlCollectionPath: D,
|
|
3479
|
-
buildUrlEditCollectionPath:
|
|
3480
|
-
buildCMSUrlPath:
|
|
3481
|
-
resolveAliasesFrom:
|
|
3479
|
+
buildUrlEditCollectionPath: ee,
|
|
3480
|
+
buildCMSUrlPath: P,
|
|
3481
|
+
resolveAliasesFrom: se,
|
|
3482
3482
|
topLevelNavigation: b,
|
|
3483
|
-
refreshNavigation:
|
|
3484
|
-
getParentReferencesFromPath:
|
|
3485
|
-
getParentCollectionIds:
|
|
3486
|
-
convertIdsToPaths:
|
|
3483
|
+
refreshNavigation: ne,
|
|
3484
|
+
getParentReferencesFromPath: ce,
|
|
3485
|
+
getParentCollectionIds: W,
|
|
3486
|
+
convertIdsToPaths: re
|
|
3487
3487
|
};
|
|
3488
3488
|
}
|
|
3489
3489
|
function $u(e, t) {
|
|
@@ -3532,10 +3532,10 @@ function Us(e, t) {
|
|
|
3532
3532
|
subcollections: a,
|
|
3533
3533
|
...o
|
|
3534
3534
|
} = t;
|
|
3535
|
-
return ho(r ?? [], a ?? []) ?
|
|
3535
|
+
return ho(r ?? [], a ?? []) ? $(i, o) : !1;
|
|
3536
3536
|
}
|
|
3537
3537
|
function qu() {
|
|
3538
|
-
const e =
|
|
3538
|
+
const e = le({}), t = x((f) => {
|
|
3539
3539
|
const g = localStorage.getItem(f);
|
|
3540
3540
|
return g ? JSON.parse(g) : {};
|
|
3541
3541
|
}, []), r = x((f) => {
|
|
@@ -3546,7 +3546,7 @@ function qu() {
|
|
|
3546
3546
|
localStorage.setItem(A, JSON.stringify(g));
|
|
3547
3547
|
const h = e.current[A], b = $e(h ?? t(f), g);
|
|
3548
3548
|
e.current[A] = $e(e.current[A], b);
|
|
3549
|
-
}, [t]), [a, o] =
|
|
3549
|
+
}, [t]), [a, o] = R([]), [s, l] = R([]), [c, d] = R([]);
|
|
3550
3550
|
z(() => {
|
|
3551
3551
|
o(localStorage.getItem("recently_visited_paths") ? JSON.parse(localStorage.getItem("recently_visited_paths")) : []), l(localStorage.getItem("favourite_paths") ? JSON.parse(localStorage.getItem("favourite_paths")) : []), d(localStorage.getItem("collapsed_groups") ? JSON.parse(localStorage.getItem("collapsed_groups")) : []);
|
|
3552
3552
|
}, []);
|
|
@@ -3569,7 +3569,7 @@ function qu() {
|
|
|
3569
3569
|
};
|
|
3570
3570
|
}
|
|
3571
3571
|
function Wu() {
|
|
3572
|
-
const e = x(() => typeof window > "u" ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches, []), r = (localStorage.getItem("prefers-dark-mode") != null ? localStorage.getItem("prefers-dark-mode") === "true" : null) ?? e, [i, a] =
|
|
3572
|
+
const e = x(() => typeof window > "u" ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches, []), r = (localStorage.getItem("prefers-dark-mode") != null ? localStorage.getItem("prefers-dark-mode") === "true" : null) ?? e, [i, a] = R(r ? "dark" : "light");
|
|
3573
3573
|
z(() => {
|
|
3574
3574
|
a(r ? "dark" : "light"), l(r ? "dark" : "light");
|
|
3575
3575
|
}, [r]);
|
|
@@ -3596,11 +3596,11 @@ function Ju({
|
|
|
3596
3596
|
storageSource: i,
|
|
3597
3597
|
dataSourceDelegate: a
|
|
3598
3598
|
}) {
|
|
3599
|
-
const o = !!r, [s, l] =
|
|
3599
|
+
const o = !!r, [s, l] = R(o), [c, d] = R(!1), [u, p] = R(!o || !!t.loginSkipped), m = u && (!o || !!t.user || !!t.loginSkipped) && !c;
|
|
3600
3600
|
z(() => {
|
|
3601
3601
|
t.loginSkipped && p(!0);
|
|
3602
3602
|
}, [t.loginSkipped]);
|
|
3603
|
-
const f =
|
|
3603
|
+
const f = le(), g = x(async () => {
|
|
3604
3604
|
if (e || t.initialLoading)
|
|
3605
3605
|
return;
|
|
3606
3606
|
if (!t.user && !t.loginSkipped) {
|
|
@@ -3608,7 +3608,7 @@ function Ju({
|
|
|
3608
3608
|
return;
|
|
3609
3609
|
}
|
|
3610
3610
|
const A = t.user;
|
|
3611
|
-
if (r instanceof Function && A &&
|
|
3611
|
+
if (r instanceof Function && A && !$(f.current?.uid, A.uid)) {
|
|
3612
3612
|
l(!0);
|
|
3613
3613
|
try {
|
|
3614
3614
|
await r({
|
|
@@ -3670,7 +3670,7 @@ function Js({
|
|
|
3670
3670
|
size: e,
|
|
3671
3671
|
url: t
|
|
3672
3672
|
}) {
|
|
3673
|
-
const [r, i] =
|
|
3673
|
+
const [r, i] = R(!1), a = he(() => vt(e), [e]);
|
|
3674
3674
|
return e === "tiny" ? /* @__PURE__ */ n(
|
|
3675
3675
|
"img",
|
|
3676
3676
|
{
|
|
@@ -3714,7 +3714,7 @@ function Js({
|
|
|
3714
3714
|
{
|
|
3715
3715
|
className: "rounded-full absolute bottom-[-4px] right-8",
|
|
3716
3716
|
children: /* @__PURE__ */ n(
|
|
3717
|
-
|
|
3717
|
+
de,
|
|
3718
3718
|
{
|
|
3719
3719
|
variant: "filled",
|
|
3720
3720
|
size: "small",
|
|
@@ -3731,7 +3731,7 @@ function Js({
|
|
|
3731
3731
|
}
|
|
3732
3732
|
) }),
|
|
3733
3733
|
/* @__PURE__ */ n(ke, { title: "Open image in new tab", children: /* @__PURE__ */ n(
|
|
3734
|
-
|
|
3734
|
+
de,
|
|
3735
3735
|
{
|
|
3736
3736
|
variant: "filled",
|
|
3737
3737
|
component: "a",
|
|
@@ -3805,7 +3805,7 @@ function dr({
|
|
|
3805
3805
|
children: [
|
|
3806
3806
|
/* @__PURE__ */ n(ca, { className: "flex-grow" }),
|
|
3807
3807
|
i && /* @__PURE__ */ n(ke, { title: i, children: /* @__PURE__ */ n(
|
|
3808
|
-
|
|
3808
|
+
q,
|
|
3809
3809
|
{
|
|
3810
3810
|
className: "max-w-full truncate rtl text-left",
|
|
3811
3811
|
variant: "caption",
|
|
@@ -4124,7 +4124,7 @@ function Ji({
|
|
|
4124
4124
|
return u ? /* @__PURE__ */ n(
|
|
4125
4125
|
S.Fragment,
|
|
4126
4126
|
{
|
|
4127
|
-
children: /* @__PURE__ */ n("div", { className: Z(
|
|
4127
|
+
children: /* @__PURE__ */ n("div", { className: Z(Se, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
|
|
4128
4128
|
Fe,
|
|
4129
4129
|
{
|
|
4130
4130
|
propertyKey: e,
|
|
@@ -4181,7 +4181,7 @@ function sl({
|
|
|
4181
4181
|
) }),
|
|
4182
4182
|
/* @__PURE__ */ v("div", { className: "flex flex-col flex-grow w-full m-1", children: [
|
|
4183
4183
|
s !== "tiny" && l && (d ? /* @__PURE__ */ n("div", { className: `${s !== "medium" ? "block whitespace-nowrap overflow-hidden truncate" : ""}`, children: /* @__PURE__ */ n(
|
|
4184
|
-
|
|
4184
|
+
q,
|
|
4185
4185
|
{
|
|
4186
4186
|
variant: "caption",
|
|
4187
4187
|
color: "disabled",
|
|
@@ -4236,7 +4236,7 @@ function sl({
|
|
|
4236
4236
|
title: `See details for ${d.id}`,
|
|
4237
4237
|
className: s !== "tiny" ? "self-start" : "",
|
|
4238
4238
|
children: /* @__PURE__ */ n(
|
|
4239
|
-
|
|
4239
|
+
de,
|
|
4240
4240
|
{
|
|
4241
4241
|
color: "inherit",
|
|
4242
4242
|
size: "small",
|
|
@@ -4287,7 +4287,7 @@ const yo = yt.forwardRef(({
|
|
|
4287
4287
|
i === "tiny" ? "p-1" : "p-2",
|
|
4288
4288
|
"flex border rounded-lg",
|
|
4289
4289
|
r ? "cursor-pointer" : "",
|
|
4290
|
-
|
|
4290
|
+
Se,
|
|
4291
4291
|
o
|
|
4292
4292
|
),
|
|
4293
4293
|
onClick: (d) => {
|
|
@@ -4587,7 +4587,7 @@ function fl({
|
|
|
4587
4587
|
(p, m) => /* @__PURE__ */ n(
|
|
4588
4588
|
S.Fragment,
|
|
4589
4589
|
{
|
|
4590
|
-
children: /* @__PURE__ */ n("div", { className: Z(
|
|
4590
|
+
children: /* @__PURE__ */ n("div", { className: Z(Se, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: p && /* @__PURE__ */ n(
|
|
4591
4591
|
Fe,
|
|
4592
4592
|
{
|
|
4593
4593
|
propertyKey: e,
|
|
@@ -4639,7 +4639,7 @@ function hl({
|
|
|
4639
4639
|
return /* @__PURE__ */ v(
|
|
4640
4640
|
"div",
|
|
4641
4641
|
{
|
|
4642
|
-
className: Z(
|
|
4642
|
+
className: Z(Se, "last:border-b-0 border-b"),
|
|
4643
4643
|
children: [
|
|
4644
4644
|
/* @__PURE__ */ v(
|
|
4645
4645
|
"div",
|
|
@@ -4651,7 +4651,7 @@ function hl({
|
|
|
4651
4651
|
{
|
|
4652
4652
|
className: "min-w-[140px] w-[25%] py-1",
|
|
4653
4653
|
children: /* @__PURE__ */ n(
|
|
4654
|
-
|
|
4654
|
+
q,
|
|
4655
4655
|
{
|
|
4656
4656
|
variant: "caption",
|
|
4657
4657
|
className: "font-mono break-words",
|
|
@@ -4679,7 +4679,7 @@ function hl({
|
|
|
4679
4679
|
]
|
|
4680
4680
|
}
|
|
4681
4681
|
),
|
|
4682
|
-
(c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: Z(
|
|
4682
|
+
(c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: Z(Se, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ n(
|
|
4683
4683
|
Fe,
|
|
4684
4684
|
{
|
|
4685
4685
|
propertyKey: s,
|
|
@@ -4704,7 +4704,7 @@ function vo({ value: e }) {
|
|
|
4704
4704
|
children: Object.entries(e).map(([t, r]) => /* @__PURE__ */ v(
|
|
4705
4705
|
"div",
|
|
4706
4706
|
{
|
|
4707
|
-
className: Z(
|
|
4707
|
+
className: Z(Se, "last:border-b-0 border-b"),
|
|
4708
4708
|
children: [
|
|
4709
4709
|
/* @__PURE__ */ v(
|
|
4710
4710
|
"div",
|
|
@@ -4716,7 +4716,7 @@ function vo({ value: e }) {
|
|
|
4716
4716
|
{
|
|
4717
4717
|
className: "min-w-[140px] w-[25%] py-1",
|
|
4718
4718
|
children: /* @__PURE__ */ n(
|
|
4719
|
-
|
|
4719
|
+
q,
|
|
4720
4720
|
{
|
|
4721
4721
|
variant: "caption",
|
|
4722
4722
|
className: "font-mono break-words",
|
|
@@ -4731,13 +4731,13 @@ function vo({ value: e }) {
|
|
|
4731
4731
|
"div",
|
|
4732
4732
|
{
|
|
4733
4733
|
className: "flex-grow max-w-[75%]",
|
|
4734
|
-
children: typeof r != "object" && /* @__PURE__ */ n(
|
|
4734
|
+
children: typeof r != "object" && /* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(me, { children: r && r.toString() }) })
|
|
4735
4735
|
}
|
|
4736
4736
|
)
|
|
4737
4737
|
]
|
|
4738
4738
|
}
|
|
4739
4739
|
),
|
|
4740
|
-
typeof r == "object" && /* @__PURE__ */ n("div", { className: Z(
|
|
4740
|
+
typeof r == "object" && /* @__PURE__ */ n("div", { className: Z(Se, "border-l pl-4"), children: /* @__PURE__ */ n(vo, { value: r }) })
|
|
4741
4741
|
]
|
|
4742
4742
|
},
|
|
4743
4743
|
`map_preview_table_${t}}`
|
|
@@ -4947,7 +4947,7 @@ const Fe = S.memo(function(t) {
|
|
|
4947
4947
|
}
|
|
4948
4948
|
) : i = lt(o, u.dataType, s) : i = JSON.stringify(s);
|
|
4949
4949
|
return i == null || Array.isArray(i) && i.length === 0 ? /* @__PURE__ */ n(gt, {}) : i;
|
|
4950
|
-
},
|
|
4950
|
+
}, $);
|
|
4951
4951
|
function lt(e, t, r) {
|
|
4952
4952
|
return console.warn(`Unexpected value for property ${e}, of type ${t}`, r), /* @__PURE__ */ n(
|
|
4953
4953
|
Ne,
|
|
@@ -5010,7 +5010,7 @@ const Xu = yt.memo(
|
|
|
5010
5010
|
function({
|
|
5011
5011
|
builder: t
|
|
5012
5012
|
}) {
|
|
5013
|
-
const [r, i] =
|
|
5013
|
+
const [r, i] = R(!0), [a, o] = R(null);
|
|
5014
5014
|
return z(() => {
|
|
5015
5015
|
let s = !1;
|
|
5016
5016
|
return t.then((l) => {
|
|
@@ -5037,7 +5037,7 @@ function ko({
|
|
|
5037
5037
|
fields: a.propertyConfigs
|
|
5038
5038
|
}), [t, r, e, a.propertyConfigs]).properties;
|
|
5039
5039
|
return /* @__PURE__ */ n("div", { className: "w-full " + i, children: /* @__PURE__ */ v("div", { className: "w-full mb-4", children: [
|
|
5040
|
-
/* @__PURE__ */ v("div", { className: Z(
|
|
5040
|
+
/* @__PURE__ */ v("div", { className: Z(Se, "flex justify-between py-2 border-b last:border-b-0"), children: [
|
|
5041
5041
|
/* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: "Id" }) }),
|
|
5042
5042
|
/* @__PURE__ */ v(
|
|
5043
5043
|
"div",
|
|
@@ -5051,7 +5051,7 @@ function ko({
|
|
|
5051
5051
|
href: a.entityLinkBuilder({ entity: e }),
|
|
5052
5052
|
rel: "noopener noreferrer",
|
|
5053
5053
|
target: "_blank",
|
|
5054
|
-
children: /* @__PURE__ */ n(
|
|
5054
|
+
children: /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
|
|
5055
5055
|
Yt,
|
|
5056
5056
|
{
|
|
5057
5057
|
size: "small"
|
|
@@ -5068,7 +5068,7 @@ function ko({
|
|
|
5068
5068
|
return /* @__PURE__ */ v(
|
|
5069
5069
|
"div",
|
|
5070
5070
|
{
|
|
5071
|
-
className: Z(
|
|
5071
|
+
className: Z(Se, "flex justify-between py-2 border-b last:border-b-0"),
|
|
5072
5072
|
children: [
|
|
5073
5073
|
/* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: c.name }) }),
|
|
5074
5074
|
/* @__PURE__ */ n(
|
|
@@ -5100,7 +5100,7 @@ function yl(e) {
|
|
|
5100
5100
|
multiline: a,
|
|
5101
5101
|
updateValue: o,
|
|
5102
5102
|
focused: s
|
|
5103
|
-
} = e, l =
|
|
5103
|
+
} = e, l = le(i), [c, d] = R(i), u = le(!1);
|
|
5104
5104
|
z(() => {
|
|
5105
5105
|
l.current !== i && i !== c && d(i), l.current = i;
|
|
5106
5106
|
}, [i]);
|
|
@@ -5254,7 +5254,7 @@ function wl(e) {
|
|
|
5254
5254
|
value: r,
|
|
5255
5255
|
updateValue: i,
|
|
5256
5256
|
focused: a
|
|
5257
|
-
} = e, o = r && typeof r == "number" ? r.toString() : "", [s, l] =
|
|
5257
|
+
} = e, o = r && typeof r == "number" ? r.toString() : "", [s, l] = R(o), c = le(r);
|
|
5258
5258
|
z(() => {
|
|
5259
5259
|
c.current !== r && String(r) !== s && l(r ? r.toString() : null), c.current = r;
|
|
5260
5260
|
}, [r]);
|
|
@@ -5352,7 +5352,7 @@ class me extends S.Component {
|
|
|
5352
5352
|
/* @__PURE__ */ n(An, { color: "error", size: "small" }),
|
|
5353
5353
|
/* @__PURE__ */ n("div", { className: "ml-4", children: "Error" })
|
|
5354
5354
|
] }),
|
|
5355
|
-
/* @__PURE__ */ n(
|
|
5355
|
+
/* @__PURE__ */ n(q, { variant: "caption", children: this.state.error?.message ?? "See the error in the console" })
|
|
5356
5356
|
] }) : this.props.children;
|
|
5357
5357
|
}
|
|
5358
5358
|
}
|
|
@@ -5409,9 +5409,9 @@ function xo({
|
|
|
5409
5409
|
storagePathOrDownloadUrl: k,
|
|
5410
5410
|
metadata: p,
|
|
5411
5411
|
size: m
|
|
5412
|
-
})), [A, h] =
|
|
5412
|
+
})), [A, h] = R(i), [b, y] = R(g);
|
|
5413
5413
|
z(() => {
|
|
5414
|
-
|
|
5414
|
+
$(A, i) || (h(i), y(g));
|
|
5415
5415
|
}, [g, i, A]);
|
|
5416
5416
|
const w = x(async (k) => {
|
|
5417
5417
|
if (d.fileName) {
|
|
@@ -5421,16 +5421,16 @@ function xo({
|
|
|
5421
5421
|
return B;
|
|
5422
5422
|
}
|
|
5423
5423
|
return Mt() + "_" + k.name;
|
|
5424
|
-
}, [e, t, r, a, o, d]), E = x((k) => xl(d.storagePath, d, t, e, r, a, k, o) ?? "/", [e, t, r, a, o, d]), _ = x(async (k, B,
|
|
5424
|
+
}, [e, t, r, a, o, d]), E = x((k) => xl(d.storagePath, d, t, e, r, a, k, o) ?? "/", [e, t, r, a, o, d]), _ = x(async (k, B, F) => {
|
|
5425
5425
|
console.debug("onFileUploadComplete", k, B);
|
|
5426
|
-
let
|
|
5427
|
-
if (d.storeUrl && (
|
|
5426
|
+
let I = k;
|
|
5427
|
+
if (d.storeUrl && (I = (await s.getDownloadURL(k)).url), d.postProcess && I && (I = await d.postProcess(I)), !I) {
|
|
5428
5428
|
console.warn("uploadPathOrDownloadUrl is null");
|
|
5429
5429
|
return;
|
|
5430
5430
|
}
|
|
5431
|
-
let
|
|
5432
|
-
B.storagePathOrDownloadUrl =
|
|
5433
|
-
const D =
|
|
5431
|
+
let P;
|
|
5432
|
+
B.storagePathOrDownloadUrl = I, B.metadata = F, P = [...b], P = Xi(P), y(P);
|
|
5433
|
+
const D = P.filter((Y) => !!Y.storagePathOrDownloadUrl).map((Y) => Y.storagePathOrDownloadUrl);
|
|
5434
5434
|
c(u ? D : D ? D[0] : null);
|
|
5435
5435
|
}, [b, u, c, d, s]), C = x(async (k) => {
|
|
5436
5436
|
if (!k.length || l)
|
|
@@ -5439,20 +5439,20 @@ function xo({
|
|
|
5439
5439
|
if (u)
|
|
5440
5440
|
B = [
|
|
5441
5441
|
...b,
|
|
5442
|
-
...await Promise.all(k.map(async (
|
|
5442
|
+
...await Promise.all(k.map(async (F) => (f && Xr(F) && (F = await en(F, f)), {
|
|
5443
5443
|
id: Dr(),
|
|
5444
|
-
file:
|
|
5445
|
-
fileName: await w(
|
|
5444
|
+
file: F,
|
|
5445
|
+
fileName: await w(F),
|
|
5446
5446
|
metadata: p,
|
|
5447
5447
|
size: m
|
|
5448
5448
|
})))
|
|
5449
5449
|
];
|
|
5450
5450
|
else {
|
|
5451
|
-
let
|
|
5452
|
-
f && Xr(
|
|
5451
|
+
let F = k[0];
|
|
5452
|
+
f && Xr(F) && (F = await en(F, f)), B = [{
|
|
5453
5453
|
id: Dr(),
|
|
5454
|
-
file:
|
|
5455
|
-
fileName: await w(
|
|
5454
|
+
file: F,
|
|
5455
|
+
fileName: await w(F),
|
|
5456
5456
|
metadata: p,
|
|
5457
5457
|
size: m
|
|
5458
5458
|
}];
|
|
@@ -5540,18 +5540,18 @@ function Eo({
|
|
|
5540
5540
|
] });
|
|
5541
5541
|
}
|
|
5542
5542
|
function Co({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPopup: a, children: o }) {
|
|
5543
|
-
const s =
|
|
5543
|
+
const s = le(null), l = x(() => {
|
|
5544
5544
|
if (a) {
|
|
5545
5545
|
const d = s && s?.current?.getBoundingClientRect();
|
|
5546
5546
|
a(d);
|
|
5547
5547
|
}
|
|
5548
|
-
}, []), c =
|
|
5548
|
+
}, []), c = le();
|
|
5549
5549
|
return z(() => {
|
|
5550
5550
|
c.current && i && c.current.focus({ preventScroll: !0 });
|
|
5551
5551
|
}, [i]), /* @__PURE__ */ n(G, { children: (e || !t && r) && /* @__PURE__ */ v("div", { ref: s, className: "absolute top-0.5 right-0.5 flex items-center", children: [
|
|
5552
5552
|
i && o,
|
|
5553
5553
|
i && !t && r && /* @__PURE__ */ n(
|
|
5554
|
-
|
|
5554
|
+
de,
|
|
5555
5555
|
{
|
|
5556
5556
|
ref: c,
|
|
5557
5557
|
color: "inherit",
|
|
@@ -5677,13 +5677,13 @@ function Fl({
|
|
|
5677
5677
|
onFileUploadComplete: A,
|
|
5678
5678
|
storagePathBuilder: h
|
|
5679
5679
|
}) {
|
|
5680
|
-
const [b, y] =
|
|
5680
|
+
const [b, y] = R(!1), w = d && u === "medium" ? "small" : u;
|
|
5681
5681
|
if (d) {
|
|
5682
|
-
const
|
|
5683
|
-
if (Array.isArray(
|
|
5682
|
+
const O = e;
|
|
5683
|
+
if (Array.isArray(O.of))
|
|
5684
5684
|
throw Error("Using array properties instead of single one in `of` in ArrayProperty");
|
|
5685
|
-
if (
|
|
5686
|
-
if (
|
|
5685
|
+
if (O.of) {
|
|
5686
|
+
if (O.of.dataType !== "string")
|
|
5687
5687
|
throw Error("Storage field using array must be of data type string");
|
|
5688
5688
|
} else
|
|
5689
5689
|
throw Error("Storage field using array must be of data type string");
|
|
@@ -5691,32 +5691,32 @@ function Fl({
|
|
|
5691
5691
|
const E = f?.metadata, _ = !!r, C = ft(), {
|
|
5692
5692
|
open: k,
|
|
5693
5693
|
getRootProps: B,
|
|
5694
|
-
getInputProps:
|
|
5695
|
-
isDragActive:
|
|
5696
|
-
isDragAccept:
|
|
5694
|
+
getInputProps: F,
|
|
5695
|
+
isDragActive: I,
|
|
5696
|
+
isDragAccept: P,
|
|
5697
5697
|
isDragReject: D
|
|
5698
5698
|
} = Pn(
|
|
5699
5699
|
{
|
|
5700
|
-
accept: f.acceptedFiles ? f.acceptedFiles.map((
|
|
5700
|
+
accept: f.acceptedFiles ? f.acceptedFiles.map((O) => ({ [O]: [] })).reduce((O, K) => ({ ...O, ...K }), {}) : void 0,
|
|
5701
5701
|
disabled: p,
|
|
5702
5702
|
maxSize: f.maxSize,
|
|
5703
5703
|
noClick: !0,
|
|
5704
5704
|
noKeyboard: !0,
|
|
5705
5705
|
onDrop: g,
|
|
5706
|
-
onDropRejected: (
|
|
5707
|
-
for (const
|
|
5708
|
-
for (const
|
|
5706
|
+
onDropRejected: (O, K) => {
|
|
5707
|
+
for (const ee of O)
|
|
5708
|
+
for (const se of ee.errors)
|
|
5709
5709
|
C.open({
|
|
5710
5710
|
type: "error",
|
|
5711
5711
|
message: `Error uploading file: File is larger than ${f.maxSize} bytes`
|
|
5712
5712
|
});
|
|
5713
5713
|
}
|
|
5714
5714
|
}
|
|
5715
|
-
), { ...
|
|
5715
|
+
), { ...Y } = B(), ne = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", ie = d ? e.of : e, H = he(() => vt(w), [w]), U = !p && l;
|
|
5716
5716
|
return /* @__PURE__ */ v(
|
|
5717
5717
|
"div",
|
|
5718
5718
|
{
|
|
5719
|
-
...
|
|
5719
|
+
...Y,
|
|
5720
5720
|
onMouseEnter: () => y(!0),
|
|
5721
5721
|
onMouseMove: () => y(!0),
|
|
5722
5722
|
onMouseLeave: () => y(!1),
|
|
@@ -5724,35 +5724,35 @@ function Fl({
|
|
|
5724
5724
|
Cl,
|
|
5725
5725
|
"relative w-full h-full flex",
|
|
5726
5726
|
`justify-${_ ? "start" : "center"}`,
|
|
5727
|
-
|
|
5728
|
-
|
|
5727
|
+
I ? Bl : "",
|
|
5728
|
+
P ? Sl : "",
|
|
5729
5729
|
D ? Il : ""
|
|
5730
5730
|
),
|
|
5731
5731
|
children: [
|
|
5732
|
-
/* @__PURE__ */ n("input", { autoFocus: m, ...
|
|
5733
|
-
r.map((
|
|
5734
|
-
let
|
|
5735
|
-
return
|
|
5732
|
+
/* @__PURE__ */ n("input", { autoFocus: m, ...F() }),
|
|
5733
|
+
r.map((O, K) => {
|
|
5734
|
+
let ee;
|
|
5735
|
+
return O.storagePathOrDownloadUrl ? ee = /* @__PURE__ */ n(
|
|
5736
5736
|
Pl,
|
|
5737
5737
|
{
|
|
5738
|
-
property:
|
|
5739
|
-
value:
|
|
5738
|
+
property: ie,
|
|
5739
|
+
value: O.storagePathOrDownloadUrl,
|
|
5740
5740
|
entity: o,
|
|
5741
5741
|
size: w
|
|
5742
5742
|
},
|
|
5743
|
-
`storage_preview_${
|
|
5744
|
-
) :
|
|
5743
|
+
`storage_preview_${K}`
|
|
5744
|
+
) : O.file && (ee = /* @__PURE__ */ n(
|
|
5745
5745
|
Eo,
|
|
5746
5746
|
{
|
|
5747
|
-
entry:
|
|
5747
|
+
entry: O,
|
|
5748
5748
|
metadata: E,
|
|
5749
|
-
storagePath: h(
|
|
5749
|
+
storagePath: h(O.file),
|
|
5750
5750
|
onFileUploadComplete: A,
|
|
5751
5751
|
imageSize: H,
|
|
5752
5752
|
simple: !0
|
|
5753
5753
|
},
|
|
5754
|
-
`storage_progress_${
|
|
5755
|
-
)),
|
|
5754
|
+
`storage_progress_${K}`
|
|
5755
|
+
)), ee;
|
|
5756
5756
|
}),
|
|
5757
5757
|
!r && /* @__PURE__ */ n(
|
|
5758
5758
|
"div",
|
|
@@ -5760,12 +5760,12 @@ function Fl({
|
|
|
5760
5760
|
className: "flex-grow m-2 max-w-[200px]",
|
|
5761
5761
|
onClick: k,
|
|
5762
5762
|
children: /* @__PURE__ */ n(
|
|
5763
|
-
|
|
5763
|
+
q,
|
|
5764
5764
|
{
|
|
5765
5765
|
className: "text-gray-400 dark:text-gray-600",
|
|
5766
5766
|
variant: "body2",
|
|
5767
5767
|
align: "center",
|
|
5768
|
-
children:
|
|
5768
|
+
children: ne
|
|
5769
5769
|
}
|
|
5770
5770
|
)
|
|
5771
5771
|
}
|
|
@@ -5773,13 +5773,13 @@ function Fl({
|
|
|
5773
5773
|
/* @__PURE__ */ n(
|
|
5774
5774
|
Co,
|
|
5775
5775
|
{
|
|
5776
|
-
showError:
|
|
5776
|
+
showError: U,
|
|
5777
5777
|
disabled: p,
|
|
5778
5778
|
showExpandIcon: !0,
|
|
5779
5779
|
selected: s,
|
|
5780
5780
|
openPopup: p ? void 0 : a,
|
|
5781
5781
|
children: /* @__PURE__ */ n(
|
|
5782
|
-
|
|
5782
|
+
de,
|
|
5783
5783
|
{
|
|
5784
5784
|
color: "inherit",
|
|
5785
5785
|
size: "small",
|
|
@@ -5915,7 +5915,7 @@ const Ql = S.memo(
|
|
|
5915
5915
|
)
|
|
5916
5916
|
] }) : /* @__PURE__ */ n(Ne, { error: "The specified collection does not exist" });
|
|
5917
5917
|
},
|
|
5918
|
-
|
|
5918
|
+
$
|
|
5919
5919
|
);
|
|
5920
5920
|
ze.addMethod(ze.array, "uniqueInArray", function(e = (r) => r, t) {
|
|
5921
5921
|
return this.test("uniqueInArray", t, (r) => !r || r.length === new Set(r.map(e)).size);
|
|
@@ -6217,85 +6217,85 @@ const Yl = ({
|
|
|
6217
6217
|
hideOverflow: A = !0,
|
|
6218
6218
|
showExpandIcon: h = !0
|
|
6219
6219
|
}) {
|
|
6220
|
-
const [b, y] = Fn(), w =
|
|
6220
|
+
const [b, y] = Fn(), w = le(null), E = he(() => kr(i), [i]), [_, C] = R(!1), [k, B] = R(l), F = !o && !!c;
|
|
6221
6221
|
z(() => {
|
|
6222
6222
|
l && B(!0);
|
|
6223
|
-
const
|
|
6223
|
+
const se = setTimeout(() => {
|
|
6224
6224
|
B(!1);
|
|
6225
6225
|
}, 800);
|
|
6226
6226
|
return () => {
|
|
6227
|
-
clearTimeout(
|
|
6227
|
+
clearTimeout(se);
|
|
6228
6228
|
};
|
|
6229
6229
|
}, [l]);
|
|
6230
|
-
let
|
|
6230
|
+
let I = 0;
|
|
6231
6231
|
if (!p)
|
|
6232
6232
|
switch (i) {
|
|
6233
6233
|
case "l":
|
|
6234
6234
|
case "xl":
|
|
6235
|
-
|
|
6235
|
+
I = 4;
|
|
6236
6236
|
break;
|
|
6237
6237
|
case "m":
|
|
6238
|
-
|
|
6238
|
+
I = 2;
|
|
6239
6239
|
break;
|
|
6240
6240
|
case "s":
|
|
6241
6241
|
default:
|
|
6242
|
-
|
|
6242
|
+
I = 1;
|
|
6243
6243
|
break;
|
|
6244
6244
|
}
|
|
6245
|
-
let
|
|
6245
|
+
let P;
|
|
6246
6246
|
switch (d) {
|
|
6247
6247
|
case "right":
|
|
6248
|
-
|
|
6248
|
+
P = "flex-end";
|
|
6249
6249
|
break;
|
|
6250
6250
|
case "center":
|
|
6251
|
-
|
|
6251
|
+
P = "center";
|
|
6252
6252
|
break;
|
|
6253
6253
|
case "left":
|
|
6254
6254
|
default:
|
|
6255
|
-
|
|
6255
|
+
P = "flex-start";
|
|
6256
6256
|
}
|
|
6257
6257
|
const D = x(() => {
|
|
6258
6258
|
if (!f)
|
|
6259
6259
|
return;
|
|
6260
|
-
const
|
|
6261
|
-
o ? f(void 0) : !a &&
|
|
6262
|
-
}, [w, f, a, o]),
|
|
6263
|
-
D(),
|
|
6264
|
-
}, [D]),
|
|
6260
|
+
const se = w && w?.current?.getBoundingClientRect();
|
|
6261
|
+
o ? f(void 0) : !a && se && f(se);
|
|
6262
|
+
}, [w, f, a, o]), Y = x((se) => {
|
|
6263
|
+
D(), se.stopPropagation();
|
|
6264
|
+
}, [D]), ne = he(() => y ? y.height > E : !1, [y, E]), ie = !F && a, H = !o && u && ne, U = !o && !u && ne, O = x(() => C(!0), []), K = x(() => C(!1), []), ee = F ? "border-red-500" : k ? "border-green-500" : ie ? "border-primary" : "border-transparent";
|
|
6265
6265
|
return /* @__PURE__ */ v(
|
|
6266
6266
|
"div",
|
|
6267
6267
|
{
|
|
6268
6268
|
className: Z(
|
|
6269
6269
|
"transition-colors duration-100 ease-in-out",
|
|
6270
|
-
`flex relative h-full rounded-md p-${
|
|
6270
|
+
`flex relative h-full rounded-md p-${I} border border-4 border-opacity-75`,
|
|
6271
6271
|
_ && !o ? "bg-gray-50 dark:bg-gray-900" : "",
|
|
6272
6272
|
l ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "",
|
|
6273
6273
|
A ? "overflow-hidden" : "",
|
|
6274
|
-
|
|
6275
|
-
|
|
6274
|
+
ie ? "bg-gray-50 dark:bg-gray-900" : "",
|
|
6275
|
+
ee
|
|
6276
6276
|
),
|
|
6277
6277
|
ref: w,
|
|
6278
6278
|
style: {
|
|
6279
|
-
justifyContent:
|
|
6280
|
-
alignItems: o || !
|
|
6279
|
+
justifyContent: P,
|
|
6280
|
+
alignItems: o || !ne ? "center" : void 0,
|
|
6281
6281
|
width: g ?? "100%",
|
|
6282
6282
|
textAlign: d
|
|
6283
6283
|
},
|
|
6284
6284
|
tabIndex: a || o ? void 0 : 0,
|
|
6285
|
-
onFocus:
|
|
6286
|
-
onMouseEnter:
|
|
6287
|
-
onMouseMove:
|
|
6288
|
-
onMouseLeave:
|
|
6285
|
+
onFocus: Y,
|
|
6286
|
+
onMouseEnter: O,
|
|
6287
|
+
onMouseMove: O,
|
|
6288
|
+
onMouseLeave: K,
|
|
6289
6289
|
children: [
|
|
6290
6290
|
/* @__PURE__ */ v(me, { children: [
|
|
6291
|
-
m && !
|
|
6292
|
-
(!m ||
|
|
6291
|
+
m && !U && t,
|
|
6292
|
+
(!m || U) && /* @__PURE__ */ n(
|
|
6293
6293
|
Yl,
|
|
6294
6294
|
{
|
|
6295
6295
|
fullHeight: m ?? !1,
|
|
6296
|
-
justifyContent:
|
|
6296
|
+
justifyContent: P,
|
|
6297
6297
|
scrollable: H ?? !1,
|
|
6298
|
-
faded:
|
|
6298
|
+
faded: U,
|
|
6299
6299
|
children: !m && /* @__PURE__ */ n(
|
|
6300
6300
|
"div",
|
|
6301
6301
|
{
|
|
@@ -6303,7 +6303,7 @@ const Yl = ({
|
|
|
6303
6303
|
style: {
|
|
6304
6304
|
display: "flex",
|
|
6305
6305
|
width: "100%",
|
|
6306
|
-
justifyContent:
|
|
6306
|
+
justifyContent: P,
|
|
6307
6307
|
height: m ? "100%" : void 0
|
|
6308
6308
|
},
|
|
6309
6309
|
children: t
|
|
@@ -6325,7 +6325,7 @@ function Ue({
|
|
|
6325
6325
|
value: t,
|
|
6326
6326
|
setValue: r
|
|
6327
6327
|
}) {
|
|
6328
|
-
const i =
|
|
6328
|
+
const i = le(null);
|
|
6329
6329
|
z(() => {
|
|
6330
6330
|
typeof e.disabled == "object" && !!e.disabled.clearOnDisabled ? t != null && (i.current = t, r(null)) : i.current && (r(i.current), i.current = null);
|
|
6331
6331
|
}, [e]);
|
|
@@ -6354,11 +6354,11 @@ const $l = S.memo(
|
|
|
6354
6354
|
selectedCell: A,
|
|
6355
6355
|
select: h,
|
|
6356
6356
|
setPopupCell: b
|
|
6357
|
-
} = Ll(), y = A?.propertyKey === t && A?.entity.path === d.path && A?.entity.id === d.id, [w, E] =
|
|
6358
|
-
|
|
6359
|
-
|
|
6357
|
+
} = Ll(), y = A?.propertyKey === t && A?.entity.path === d.path && A?.entity.id === d.id, [w, E] = R(i), _ = le(i), [C, k] = R(), [B, F] = R(), [I, P] = R(!1), D = x(() => {
|
|
6358
|
+
P(!0), setTimeout(() => {
|
|
6359
|
+
P(!1);
|
|
6360
6360
|
}, 100);
|
|
6361
|
-
}, []),
|
|
6361
|
+
}, []), Y = !!a.Field, ne = !!a.Preview, ie = qt(a), H = typeof a.disabled == "object" ? a.disabled.disabledMessage : void 0, U = u || p || !!a.disabled, O = he(() => Gt({
|
|
6362
6362
|
property: a,
|
|
6363
6363
|
entityId: d.id,
|
|
6364
6364
|
customFieldValidator: r,
|
|
@@ -6366,70 +6366,70 @@ const $l = S.memo(
|
|
|
6366
6366
|
}), [d.id, a, t]);
|
|
6367
6367
|
z(
|
|
6368
6368
|
() => {
|
|
6369
|
-
|
|
6369
|
+
$(i, _.current) || (F(void 0), E(i), _.current = i, D());
|
|
6370
6370
|
},
|
|
6371
6371
|
[D, i]
|
|
6372
6372
|
);
|
|
6373
|
-
const
|
|
6374
|
-
|
|
6375
|
-
if (
|
|
6373
|
+
const K = (N) => {
|
|
6374
|
+
$(N, _.current) || (P(!1), O.validate(N).then(() => {
|
|
6375
|
+
if (F(void 0), _.current = N, f)
|
|
6376
6376
|
try {
|
|
6377
6377
|
f({
|
|
6378
|
-
value:
|
|
6378
|
+
value: N,
|
|
6379
6379
|
propertyKey: t,
|
|
6380
6380
|
setError: k,
|
|
6381
6381
|
onValueUpdated: D,
|
|
6382
6382
|
data: d
|
|
6383
6383
|
});
|
|
6384
|
-
} catch (
|
|
6385
|
-
console.error("onValueChange error",
|
|
6384
|
+
} catch (Q) {
|
|
6385
|
+
console.error("onValueChange error", Q), k(Q);
|
|
6386
6386
|
}
|
|
6387
|
-
}).catch((
|
|
6388
|
-
|
|
6387
|
+
}).catch((Q) => {
|
|
6388
|
+
F(Q);
|
|
6389
6389
|
}));
|
|
6390
6390
|
};
|
|
6391
6391
|
z(() => {
|
|
6392
|
-
|
|
6393
|
-
}, [w,
|
|
6394
|
-
const
|
|
6395
|
-
let
|
|
6396
|
-
|
|
6392
|
+
O.validate(w).then(() => F(void 0)).catch(F);
|
|
6393
|
+
}, [w, O, t, a, d]);
|
|
6394
|
+
const ee = (N) => {
|
|
6395
|
+
let Q;
|
|
6396
|
+
N === void 0 ? Q = null : Q = N, E(Q), K(Q);
|
|
6397
6397
|
};
|
|
6398
6398
|
Ue({
|
|
6399
6399
|
property: a,
|
|
6400
6400
|
value: w,
|
|
6401
|
-
setValue:
|
|
6401
|
+
setValue: ee
|
|
6402
6402
|
});
|
|
6403
|
-
const
|
|
6404
|
-
h(
|
|
6403
|
+
const se = x((N) => {
|
|
6404
|
+
h(N ? {
|
|
6405
6405
|
width: s,
|
|
6406
6406
|
height: l,
|
|
6407
6407
|
entity: d,
|
|
6408
|
-
cellRect:
|
|
6408
|
+
cellRect: N,
|
|
6409
6409
|
propertyKey: t
|
|
6410
6410
|
} : void 0);
|
|
6411
|
-
}, [d, l, t, h, s]),
|
|
6412
|
-
b && b(
|
|
6411
|
+
}, [d, l, t, h, s]), ce = (N) => {
|
|
6412
|
+
b && b(N ? {
|
|
6413
6413
|
width: s,
|
|
6414
6414
|
height: l,
|
|
6415
6415
|
entity: d,
|
|
6416
|
-
cellRect:
|
|
6416
|
+
cellRect: N,
|
|
6417
6417
|
propertyKey: t
|
|
6418
6418
|
} : void 0);
|
|
6419
6419
|
};
|
|
6420
|
-
let
|
|
6421
|
-
const
|
|
6422
|
-
if (u ||
|
|
6420
|
+
let W, re = !1, T = !1, oe = !0, te = !1, J = !1, j = !0;
|
|
6421
|
+
const V = !U && C;
|
|
6422
|
+
if (u || ie)
|
|
6423
6423
|
return /* @__PURE__ */ n(
|
|
6424
6424
|
ur,
|
|
6425
6425
|
{
|
|
6426
6426
|
size: g,
|
|
6427
6427
|
width: s,
|
|
6428
|
-
saved:
|
|
6428
|
+
saved: I,
|
|
6429
6429
|
value: w,
|
|
6430
6430
|
align: o ?? "left",
|
|
6431
6431
|
fullHeight: !1,
|
|
6432
|
-
disabledTooltip: H ?? (
|
|
6432
|
+
disabledTooltip: H ?? (ie ? "Read only" : void 0),
|
|
6433
6433
|
disabled: !0,
|
|
6434
6434
|
children: /* @__PURE__ */ n(
|
|
6435
6435
|
Fe,
|
|
@@ -6445,116 +6445,116 @@ const $l = S.memo(
|
|
|
6445
6445
|
},
|
|
6446
6446
|
`${t}_${d.path}_${d.id}`
|
|
6447
6447
|
);
|
|
6448
|
-
if (!
|
|
6448
|
+
if (!Y && (!ne || y)) {
|
|
6449
6449
|
if (Ul(a))
|
|
6450
|
-
|
|
6450
|
+
W = /* @__PURE__ */ n(
|
|
6451
6451
|
Nl,
|
|
6452
6452
|
{
|
|
6453
6453
|
error: B ?? C,
|
|
6454
|
-
disabled:
|
|
6454
|
+
disabled: U,
|
|
6455
6455
|
focused: y,
|
|
6456
6456
|
selected: y,
|
|
6457
|
-
openPopup: b ?
|
|
6457
|
+
openPopup: b ? ce : void 0,
|
|
6458
6458
|
property: a,
|
|
6459
6459
|
entity: d,
|
|
6460
6460
|
path: c,
|
|
6461
6461
|
value: w,
|
|
6462
6462
|
previewSize: it(g),
|
|
6463
|
-
updateValue:
|
|
6463
|
+
updateValue: ee,
|
|
6464
6464
|
propertyKey: t
|
|
6465
6465
|
}
|
|
6466
|
-
),
|
|
6466
|
+
), j = !1, T = !0, J = !0, te = !0;
|
|
6467
6467
|
else if (y && a.dataType === "number") {
|
|
6468
|
-
const
|
|
6469
|
-
|
|
6468
|
+
const Q = a;
|
|
6469
|
+
Q.enumValues ? (W = /* @__PURE__ */ n(
|
|
6470
6470
|
Rr,
|
|
6471
6471
|
{
|
|
6472
6472
|
name: t,
|
|
6473
6473
|
multiple: !1,
|
|
6474
|
-
disabled:
|
|
6474
|
+
disabled: U,
|
|
6475
6475
|
focused: y,
|
|
6476
6476
|
valueType: "number",
|
|
6477
6477
|
small: it(g) !== "medium",
|
|
6478
|
-
enumValues:
|
|
6478
|
+
enumValues: Q.enumValues,
|
|
6479
6479
|
error: B ?? C,
|
|
6480
6480
|
internalValue: w,
|
|
6481
|
-
updateValue:
|
|
6481
|
+
updateValue: ee
|
|
6482
6482
|
}
|
|
6483
|
-
),
|
|
6483
|
+
), J = !0) : (W = /* @__PURE__ */ n(
|
|
6484
6484
|
wl,
|
|
6485
6485
|
{
|
|
6486
6486
|
align: o,
|
|
6487
6487
|
error: B ?? C,
|
|
6488
6488
|
focused: y,
|
|
6489
|
-
disabled:
|
|
6489
|
+
disabled: U,
|
|
6490
6490
|
value: w,
|
|
6491
|
-
updateValue:
|
|
6491
|
+
updateValue: ee
|
|
6492
6492
|
}
|
|
6493
|
-
),
|
|
6493
|
+
), re = !0);
|
|
6494
6494
|
} else if (y && a.dataType === "string") {
|
|
6495
|
-
const
|
|
6496
|
-
if (
|
|
6497
|
-
|
|
6495
|
+
const Q = a;
|
|
6496
|
+
if (Q.enumValues)
|
|
6497
|
+
W = /* @__PURE__ */ n(
|
|
6498
6498
|
Rr,
|
|
6499
6499
|
{
|
|
6500
6500
|
name: t,
|
|
6501
6501
|
multiple: !1,
|
|
6502
6502
|
focused: y,
|
|
6503
|
-
disabled:
|
|
6503
|
+
disabled: U,
|
|
6504
6504
|
valueType: "string",
|
|
6505
6505
|
small: it(g) !== "medium",
|
|
6506
|
-
enumValues:
|
|
6506
|
+
enumValues: Q.enumValues,
|
|
6507
6507
|
error: B ?? C,
|
|
6508
6508
|
internalValue: w,
|
|
6509
|
-
updateValue:
|
|
6509
|
+
updateValue: ee
|
|
6510
6510
|
}
|
|
6511
|
-
),
|
|
6512
|
-
else if (!
|
|
6513
|
-
const Ae = !!
|
|
6514
|
-
|
|
6511
|
+
), J = !0;
|
|
6512
|
+
else if (!Q.storage) {
|
|
6513
|
+
const Ae = !!Q.multiline || !!Q.markdown;
|
|
6514
|
+
W = /* @__PURE__ */ n(
|
|
6515
6515
|
yl,
|
|
6516
6516
|
{
|
|
6517
6517
|
error: B ?? C,
|
|
6518
|
-
disabled:
|
|
6518
|
+
disabled: U,
|
|
6519
6519
|
multiline: Ae,
|
|
6520
6520
|
focused: y,
|
|
6521
6521
|
value: w,
|
|
6522
|
-
updateValue:
|
|
6522
|
+
updateValue: ee
|
|
6523
6523
|
}
|
|
6524
|
-
),
|
|
6524
|
+
), re = !0;
|
|
6525
6525
|
}
|
|
6526
6526
|
} else if (a.dataType === "boolean")
|
|
6527
|
-
|
|
6527
|
+
W = /* @__PURE__ */ n(
|
|
6528
6528
|
vl,
|
|
6529
6529
|
{
|
|
6530
6530
|
error: B ?? C,
|
|
6531
|
-
disabled:
|
|
6531
|
+
disabled: U,
|
|
6532
6532
|
focused: y,
|
|
6533
6533
|
internalValue: w,
|
|
6534
|
-
updateValue:
|
|
6534
|
+
updateValue: ee
|
|
6535
6535
|
}
|
|
6536
6536
|
);
|
|
6537
6537
|
else if (a.dataType === "date")
|
|
6538
|
-
|
|
6538
|
+
W = /* @__PURE__ */ n(
|
|
6539
6539
|
kl,
|
|
6540
6540
|
{
|
|
6541
6541
|
name: t,
|
|
6542
6542
|
error: B ?? C,
|
|
6543
|
-
disabled:
|
|
6543
|
+
disabled: U,
|
|
6544
6544
|
mode: a.mode,
|
|
6545
6545
|
focused: y,
|
|
6546
6546
|
internalValue: w,
|
|
6547
|
-
updateValue:
|
|
6547
|
+
updateValue: ee
|
|
6548
6548
|
}
|
|
6549
|
-
),
|
|
6549
|
+
), J = !0, oe = !1, re = !1;
|
|
6550
6550
|
else if (a.dataType === "reference")
|
|
6551
|
-
typeof a.path == "string" && (
|
|
6551
|
+
typeof a.path == "string" && (W = /* @__PURE__ */ n(
|
|
6552
6552
|
tn,
|
|
6553
6553
|
{
|
|
6554
6554
|
name: t,
|
|
6555
6555
|
internalValue: w,
|
|
6556
|
-
updateValue:
|
|
6557
|
-
disabled:
|
|
6556
|
+
updateValue: ee,
|
|
6557
|
+
disabled: U,
|
|
6558
6558
|
size: g,
|
|
6559
6559
|
path: a.path,
|
|
6560
6560
|
multiselect: !1,
|
|
@@ -6564,45 +6564,45 @@ const $l = S.memo(
|
|
|
6564
6564
|
title: a.name,
|
|
6565
6565
|
forceFilter: a.forceFilter
|
|
6566
6566
|
}
|
|
6567
|
-
)),
|
|
6567
|
+
)), re = !1;
|
|
6568
6568
|
else if (a.dataType === "array") {
|
|
6569
|
-
const
|
|
6570
|
-
if (!
|
|
6569
|
+
const Q = a;
|
|
6570
|
+
if (!Q.of && !Q.oneOf)
|
|
6571
6571
|
throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);
|
|
6572
|
-
|
|
6572
|
+
Q.of && !Array.isArray(Q.of) && (Q.of.dataType === "string" || Q.of.dataType === "number" ? y && Q.of.enumValues && (W = /* @__PURE__ */ n(
|
|
6573
6573
|
Rr,
|
|
6574
6574
|
{
|
|
6575
6575
|
name: t,
|
|
6576
6576
|
multiple: !0,
|
|
6577
|
-
disabled:
|
|
6577
|
+
disabled: U,
|
|
6578
6578
|
focused: y,
|
|
6579
6579
|
small: it(g) !== "medium",
|
|
6580
|
-
valueType:
|
|
6581
|
-
enumValues:
|
|
6580
|
+
valueType: Q.of.dataType,
|
|
6581
|
+
enumValues: Q.of.enumValues,
|
|
6582
6582
|
error: B ?? C,
|
|
6583
6583
|
internalValue: w,
|
|
6584
|
-
updateValue:
|
|
6584
|
+
updateValue: ee
|
|
6585
6585
|
}
|
|
6586
|
-
),
|
|
6586
|
+
), re = !0, J = !0, oe = !1) : Q.of.dataType === "reference" && (typeof Q.of.path == "string" && (W = /* @__PURE__ */ n(
|
|
6587
6587
|
tn,
|
|
6588
6588
|
{
|
|
6589
6589
|
name: t,
|
|
6590
|
-
disabled:
|
|
6590
|
+
disabled: U,
|
|
6591
6591
|
internalValue: w,
|
|
6592
|
-
updateValue:
|
|
6592
|
+
updateValue: ee,
|
|
6593
6593
|
size: g,
|
|
6594
6594
|
multiselect: !0,
|
|
6595
|
-
path:
|
|
6596
|
-
previewProperties:
|
|
6597
|
-
title:
|
|
6598
|
-
forceFilter:
|
|
6599
|
-
includeId:
|
|
6600
|
-
includeEntityLink:
|
|
6595
|
+
path: Q.of.path,
|
|
6596
|
+
previewProperties: Q.of.previewProperties,
|
|
6597
|
+
title: Q.name,
|
|
6598
|
+
forceFilter: Q.of.forceFilter,
|
|
6599
|
+
includeId: Q.of.includeId,
|
|
6600
|
+
includeEntityLink: Q.of.includeEntityLink
|
|
6601
6601
|
}
|
|
6602
|
-
)),
|
|
6602
|
+
)), re = !1));
|
|
6603
6603
|
}
|
|
6604
6604
|
}
|
|
6605
|
-
return
|
|
6605
|
+
return W || (re = !1, T = m && y && !W && !U && !ie, W = /* @__PURE__ */ n(
|
|
6606
6606
|
Fe,
|
|
6607
6607
|
{
|
|
6608
6608
|
width: s,
|
|
@@ -6617,30 +6617,30 @@ const $l = S.memo(
|
|
|
6617
6617
|
{
|
|
6618
6618
|
size: g,
|
|
6619
6619
|
width: s,
|
|
6620
|
-
onSelect:
|
|
6620
|
+
onSelect: se,
|
|
6621
6621
|
selected: y,
|
|
6622
|
-
disabled:
|
|
6622
|
+
disabled: U || ie,
|
|
6623
6623
|
disabledTooltip: H ?? "Disabled",
|
|
6624
|
-
removePadding:
|
|
6625
|
-
fullHeight:
|
|
6626
|
-
saved:
|
|
6624
|
+
removePadding: te,
|
|
6625
|
+
fullHeight: J,
|
|
6626
|
+
saved: I,
|
|
6627
6627
|
error: B ?? C,
|
|
6628
6628
|
align: o,
|
|
6629
|
-
allowScroll:
|
|
6629
|
+
allowScroll: re,
|
|
6630
6630
|
showExpandIcon: T,
|
|
6631
6631
|
value: w,
|
|
6632
|
-
hideOverflow:
|
|
6633
|
-
actions:
|
|
6632
|
+
hideOverflow: oe,
|
|
6633
|
+
actions: j && /* @__PURE__ */ n(
|
|
6634
6634
|
Co,
|
|
6635
6635
|
{
|
|
6636
|
-
showError:
|
|
6637
|
-
disabled:
|
|
6636
|
+
showError: V,
|
|
6637
|
+
disabled: U,
|
|
6638
6638
|
showExpandIcon: T,
|
|
6639
6639
|
selected: y,
|
|
6640
|
-
openPopup:
|
|
6640
|
+
openPopup: U ? void 0 : ce
|
|
6641
6641
|
}
|
|
6642
6642
|
),
|
|
6643
|
-
children:
|
|
6643
|
+
children: W
|
|
6644
6644
|
},
|
|
6645
6645
|
`cell_${t}_${d.path}_${d.id}`
|
|
6646
6646
|
);
|
|
@@ -6648,7 +6648,7 @@ const $l = S.memo(
|
|
|
6648
6648
|
ql
|
|
6649
6649
|
);
|
|
6650
6650
|
function ql(e, t) {
|
|
6651
|
-
return e.height === t.height && e.propertyKey === t.propertyKey && e.align === t.align && e.width === t.width &&
|
|
6651
|
+
return e.height === t.height && e.propertyKey === t.propertyKey && e.align === t.align && e.width === t.width && $(e.property, t.property) && $(e.value, t.value) && $(e.entity.id, t.entity.id) && $(e.entity.values, t.entity.values);
|
|
6652
6652
|
}
|
|
6653
6653
|
const ki = function({
|
|
6654
6654
|
entity: t,
|
|
@@ -6666,7 +6666,7 @@ const ki = function({
|
|
|
6666
6666
|
hideId: f,
|
|
6667
6667
|
selectionController: g
|
|
6668
6668
|
}) {
|
|
6669
|
-
const A = qe(), h =
|
|
6669
|
+
const A = qe(), h = Ie(), b = x((k) => {
|
|
6670
6670
|
g?.toggleEntitySelection(t);
|
|
6671
6671
|
}, [t, g?.toggleEntitySelection]), y = x((k) => {
|
|
6672
6672
|
k.stopPropagation(), g?.toggleEntitySelection(t);
|
|
@@ -6688,10 +6688,10 @@ const ki = function({
|
|
|
6688
6688
|
children: [
|
|
6689
6689
|
(w || l) && /* @__PURE__ */ v("div", { className: "w-34 flex justify-center", children: [
|
|
6690
6690
|
C.map((k, B) => /* @__PURE__ */ n(ke, { title: k.name, children: /* @__PURE__ */ n(
|
|
6691
|
-
|
|
6691
|
+
de,
|
|
6692
6692
|
{
|
|
6693
|
-
onClick: (
|
|
6694
|
-
|
|
6693
|
+
onClick: (F) => {
|
|
6694
|
+
F.stopPropagation(), k.onClick({
|
|
6695
6695
|
entity: t,
|
|
6696
6696
|
fullPath: i,
|
|
6697
6697
|
collection: r,
|
|
@@ -6710,7 +6710,7 @@ const ki = function({
|
|
|
6710
6710
|
xt,
|
|
6711
6711
|
{
|
|
6712
6712
|
trigger: /* @__PURE__ */ n(
|
|
6713
|
-
|
|
6713
|
+
de,
|
|
6714
6714
|
{
|
|
6715
6715
|
size: A ? "medium" : "small",
|
|
6716
6716
|
children: /* @__PURE__ */ n(vn, {})
|
|
@@ -6719,8 +6719,8 @@ const ki = function({
|
|
|
6719
6719
|
children: _.map((k, B) => /* @__PURE__ */ v(
|
|
6720
6720
|
Re,
|
|
6721
6721
|
{
|
|
6722
|
-
onClick: (
|
|
6723
|
-
|
|
6722
|
+
onClick: (F) => {
|
|
6723
|
+
F.stopPropagation(), k.onClick({
|
|
6724
6724
|
entity: t,
|
|
6725
6725
|
fullPath: i,
|
|
6726
6726
|
collection: r,
|
|
@@ -6750,7 +6750,7 @@ const ki = function({
|
|
|
6750
6750
|
) })
|
|
6751
6751
|
] }),
|
|
6752
6752
|
!f && c !== "xs" && /* @__PURE__ */ n("div", { className: "w-[138px] text-center overflow-hidden truncate", children: t ? /* @__PURE__ */ v(
|
|
6753
|
-
|
|
6753
|
+
q,
|
|
6754
6754
|
{
|
|
6755
6755
|
onClick: (k) => {
|
|
6756
6756
|
k.stopPropagation();
|
|
@@ -6798,7 +6798,7 @@ function Wl({
|
|
|
6798
6798
|
return /* @__PURE__ */ v(
|
|
6799
6799
|
"div",
|
|
6800
6800
|
{
|
|
6801
|
-
className: Z(
|
|
6801
|
+
className: Z(Se, "no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),
|
|
6802
6802
|
children: [
|
|
6803
6803
|
/* @__PURE__ */ v("div", { className: "flex items-center gap-2 md:mr-4 mr-2", children: [
|
|
6804
6804
|
c && /* @__PURE__ */ n("div", { className: "hidden lg:block", children: c }),
|
|
@@ -6945,7 +6945,7 @@ function Kr({ text: e, ...t }) {
|
|
|
6945
6945
|
children: /* @__PURE__ */ v("div", { className: "m-auto flex flex-col gap-2 items-center", children: [
|
|
6946
6946
|
/* @__PURE__ */ n(Et, { ...t }),
|
|
6947
6947
|
e && /* @__PURE__ */ n(
|
|
6948
|
-
|
|
6948
|
+
q,
|
|
6949
6949
|
{
|
|
6950
6950
|
color: "secondary",
|
|
6951
6951
|
variant: "caption",
|
|
@@ -6971,7 +6971,7 @@ const Xl = S.memo(
|
|
|
6971
6971
|
createFilterField: u,
|
|
6972
6972
|
AdditionalHeaderWidget: p
|
|
6973
6973
|
}) {
|
|
6974
|
-
const [m, f] =
|
|
6974
|
+
const [m, f] = R(!1), [g, A] = S.useState(!1), [h, b] = S.useState(!1), y = x((k) => {
|
|
6975
6975
|
A(!0);
|
|
6976
6976
|
}, []), w = x((k, B) => {
|
|
6977
6977
|
s(c, k), B !== void 0 && A(B);
|
|
@@ -7025,7 +7025,7 @@ const Xl = S.memo(
|
|
|
7025
7025
|
color: "secondary",
|
|
7026
7026
|
invisible: !a,
|
|
7027
7027
|
children: /* @__PURE__ */ v(
|
|
7028
|
-
|
|
7028
|
+
de,
|
|
7029
7029
|
{
|
|
7030
7030
|
size: "small",
|
|
7031
7031
|
className: m || g ? "bg-white dark:bg-gray-950" : void 0,
|
|
@@ -7055,7 +7055,7 @@ const Xl = S.memo(
|
|
|
7055
7055
|
className: h ? "hidden" : void 0,
|
|
7056
7056
|
modal: !0,
|
|
7057
7057
|
trigger: /* @__PURE__ */ n(
|
|
7058
|
-
|
|
7058
|
+
de,
|
|
7059
7059
|
{
|
|
7060
7060
|
className: m || g ? "bg-white dark:bg-gray-950" : void 0,
|
|
7061
7061
|
size: "small",
|
|
@@ -7094,7 +7094,7 @@ const Xl = S.memo(
|
|
|
7094
7094
|
}
|
|
7095
7095
|
) });
|
|
7096
7096
|
},
|
|
7097
|
-
|
|
7097
|
+
$
|
|
7098
7098
|
);
|
|
7099
7099
|
function Kl({
|
|
7100
7100
|
column: e,
|
|
@@ -7105,7 +7105,7 @@ function Kl({
|
|
|
7105
7105
|
hidden: o,
|
|
7106
7106
|
setHidden: s
|
|
7107
7107
|
}) {
|
|
7108
|
-
const l = e.key, [c, d] =
|
|
7108
|
+
const l = e.key, [c, d] = R(r);
|
|
7109
7109
|
if (z(() => {
|
|
7110
7110
|
d(r);
|
|
7111
7111
|
}, [r]), !e.filter)
|
|
@@ -7134,7 +7134,7 @@ function Kl({
|
|
|
7134
7134
|
/* @__PURE__ */ n(
|
|
7135
7135
|
"div",
|
|
7136
7136
|
{
|
|
7137
|
-
className: Z(
|
|
7137
|
+
className: Z(Se, "py-4 px-6 text-xs font-semibold uppercase border-b"),
|
|
7138
7138
|
children: e.title ?? l
|
|
7139
7139
|
}
|
|
7140
7140
|
),
|
|
@@ -7179,13 +7179,13 @@ const ec = ({
|
|
|
7179
7179
|
createFilterField: c,
|
|
7180
7180
|
AddColumnComponent: d
|
|
7181
7181
|
}) => {
|
|
7182
|
-
const u = e.map(() => ta()), [p, m] =
|
|
7183
|
-
const B = e[_],
|
|
7184
|
-
width:
|
|
7182
|
+
const u = e.map(() => ta()), [p, m] = R(-1), f = x((_, C, k) => {
|
|
7183
|
+
const B = e[_], F = 100, I = 800, P = C > I ? I : C < F ? F : C, D = {
|
|
7184
|
+
width: P,
|
|
7185
7185
|
key: B.key,
|
|
7186
7186
|
column: {
|
|
7187
7187
|
...B,
|
|
7188
|
-
width:
|
|
7188
|
+
width: P
|
|
7189
7189
|
}
|
|
7190
7190
|
};
|
|
7191
7191
|
k ? l(D) : s(D);
|
|
@@ -7218,7 +7218,7 @@ const ec = ({
|
|
|
7218
7218
|
return /* @__PURE__ */ v(
|
|
7219
7219
|
"div",
|
|
7220
7220
|
{
|
|
7221
|
-
className: Z(
|
|
7221
|
+
className: Z(Se, "z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),
|
|
7222
7222
|
children: [
|
|
7223
7223
|
e.map((_, C) => {
|
|
7224
7224
|
const k = e[C], B = k && o && o[k.key] ? o[k.key] : void 0;
|
|
@@ -7282,7 +7282,7 @@ const ec = ({
|
|
|
7282
7282
|
}
|
|
7283
7283
|
);
|
|
7284
7284
|
},
|
|
7285
|
-
|
|
7285
|
+
$
|
|
7286
7286
|
), rc = S.memo(
|
|
7287
7287
|
function(t) {
|
|
7288
7288
|
return t.rowData && t.cellRenderer(
|
|
@@ -7298,7 +7298,7 @@ const ec = ({
|
|
|
7298
7298
|
}
|
|
7299
7299
|
);
|
|
7300
7300
|
},
|
|
7301
|
-
(e, t) =>
|
|
7301
|
+
(e, t) => $(e.rowData, t.rowData) && $(e.column, t.column) && $(e.cellData, t.cellData) && $(e.rowIndex, t.rowIndex) && $(e.cellRenderer, t.cellRenderer) && $(e.columnIndex, t.columnIndex)
|
|
7302
7302
|
), _r = ra({});
|
|
7303
7303
|
_r.displayName = "VirtualListContext";
|
|
7304
7304
|
const ic = ia(({
|
|
@@ -7363,44 +7363,45 @@ const ic = ia(({
|
|
|
7363
7363
|
hoverRow: b,
|
|
7364
7364
|
createFilterField: y,
|
|
7365
7365
|
rowClassName: w,
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7366
|
+
style: E,
|
|
7367
|
+
className: _,
|
|
7368
|
+
endAdornment: C,
|
|
7369
|
+
AddColumnComponent: k
|
|
7369
7370
|
}) {
|
|
7370
|
-
const
|
|
7371
|
+
const B = p ? p[0] : void 0, F = p ? p[1] : void 0, [I, P] = R(o), D = le(null), Y = le(0);
|
|
7371
7372
|
z(() => {
|
|
7372
|
-
|
|
7373
|
+
P(o);
|
|
7373
7374
|
}, [o]);
|
|
7374
|
-
const [
|
|
7375
|
-
|
|
7376
|
-
}, [
|
|
7377
|
-
|
|
7378
|
-
}, [
|
|
7375
|
+
const [ne, ie] = Fn(), H = x((j) => {
|
|
7376
|
+
P(I.map((V) => V.key === j.column.key ? j.column : V));
|
|
7377
|
+
}, [I]), U = x((j) => {
|
|
7378
|
+
P(I.map((V) => V.key === j.column.key ? j.column : V)), l && l(j);
|
|
7379
|
+
}, [I, l]), O = le();
|
|
7379
7380
|
z(() => {
|
|
7380
|
-
|
|
7381
|
+
O.current = c;
|
|
7381
7382
|
}, [c]);
|
|
7382
|
-
const
|
|
7383
|
-
|
|
7384
|
-
}, []),
|
|
7385
|
-
const
|
|
7386
|
-
|
|
7387
|
-
}, [d,
|
|
7383
|
+
const K = x(() => {
|
|
7384
|
+
Y.current = 0, D.current && D.current.scrollTo(D.current?.scrollLeft, 0);
|
|
7385
|
+
}, []), ee = x((j) => {
|
|
7386
|
+
const V = B === j && F === "desc", Q = B === j && F === "asc" ? "desc" : V ? void 0 : "asc", Ae = V ? void 0 : j, Be = O.current, ae = Q && Ae ? [Ae, Q] : void 0;
|
|
7387
|
+
Be && d && !d(Be, ae) && u && u(void 0), r && r(), g && g(ae), K();
|
|
7388
|
+
}, [d, F, u, r, g, K, B]);
|
|
7388
7389
|
x(() => {
|
|
7389
|
-
|
|
7390
|
+
Y.current = 0, g && g(void 0);
|
|
7390
7391
|
}, [g]);
|
|
7391
|
-
const
|
|
7392
|
-
i && (t?.length ?? 0) > 0 &&
|
|
7393
|
-
}, [t?.length, i]),
|
|
7394
|
-
scrollOffset:
|
|
7395
|
-
scrollUpdateWasRequested:
|
|
7392
|
+
const se = Math.max((t?.length ?? 0) * a - ie.height, 0), ce = x((j) => {
|
|
7393
|
+
i && (t?.length ?? 0) > 0 && j > Y.current + 600 && (Y.current = j, i());
|
|
7394
|
+
}, [t?.length, i]), W = x(({
|
|
7395
|
+
scrollOffset: j,
|
|
7396
|
+
scrollUpdateWasRequested: V
|
|
7396
7397
|
}) => {
|
|
7397
|
-
!
|
|
7398
|
-
}, [
|
|
7399
|
-
|
|
7400
|
-
const
|
|
7401
|
-
let
|
|
7402
|
-
|
|
7403
|
-
}, [d,
|
|
7398
|
+
!V && j >= se - 600 && ce(j);
|
|
7399
|
+
}, [se, ce]), re = x((j, V) => {
|
|
7400
|
+
Y.current = 0;
|
|
7401
|
+
const N = O.current;
|
|
7402
|
+
let Q = N ? { ...N } : {};
|
|
7403
|
+
V ? Q[j.key] = V : delete Q[j.key], !d || d(Q, B && F ? [B, F] : void 0) || (Q = V ? { [j.key]: V } : {}), u && u(Q);
|
|
7404
|
+
}, [d, F, u, B]), T = x(() => A ? /* @__PURE__ */ n(Kr, {}) : /* @__PURE__ */ v(
|
|
7404
7405
|
"div",
|
|
7405
7406
|
{
|
|
7406
7407
|
className: "flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",
|
|
@@ -7409,54 +7410,55 @@ const ic = ia(({
|
|
|
7409
7410
|
f
|
|
7410
7411
|
]
|
|
7411
7412
|
}
|
|
7412
|
-
), [f, A]),
|
|
7413
|
+
), [f, A]), oe = !A && (t?.length ?? 0) === 0, te = m ? /* @__PURE__ */ v(
|
|
7413
7414
|
er,
|
|
7414
7415
|
{
|
|
7415
7416
|
maxWidth: "2xl",
|
|
7416
7417
|
className: "flex flex-col gap-2",
|
|
7417
7418
|
children: [
|
|
7418
|
-
/* @__PURE__ */ n(
|
|
7419
|
+
/* @__PURE__ */ n(q, { variant: "h6", children: "Error fetching data from the data source" }),
|
|
7419
7420
|
m?.message && /* @__PURE__ */ n(ac, { text: m.message })
|
|
7420
7421
|
]
|
|
7421
7422
|
}
|
|
7422
|
-
) :
|
|
7423
|
+
) : oe ? T() : void 0, J = {
|
|
7423
7424
|
data: t,
|
|
7424
7425
|
rowHeight: a,
|
|
7425
7426
|
cellRenderer: h,
|
|
7426
|
-
columns:
|
|
7427
|
-
currentSort:
|
|
7427
|
+
columns: I,
|
|
7428
|
+
currentSort: F,
|
|
7428
7429
|
onRowClick: s,
|
|
7429
|
-
customView:
|
|
7430
|
-
onColumnResize:
|
|
7431
|
-
onColumnResizeEnd:
|
|
7432
|
-
filter:
|
|
7433
|
-
onColumnSort:
|
|
7434
|
-
onFilterUpdate:
|
|
7435
|
-
sortByProperty:
|
|
7430
|
+
customView: te,
|
|
7431
|
+
onColumnResize: H,
|
|
7432
|
+
onColumnResizeEnd: U,
|
|
7433
|
+
filter: O.current,
|
|
7434
|
+
onColumnSort: ee,
|
|
7435
|
+
onFilterUpdate: re,
|
|
7436
|
+
sortByProperty: B,
|
|
7436
7437
|
hoverRow: b ?? !1,
|
|
7437
7438
|
createFilterField: y,
|
|
7438
7439
|
rowClassName: w,
|
|
7439
|
-
endAdornment:
|
|
7440
|
-
AddColumnComponent:
|
|
7440
|
+
endAdornment: C,
|
|
7441
|
+
AddColumnComponent: k
|
|
7441
7442
|
};
|
|
7442
7443
|
return /* @__PURE__ */ n(
|
|
7443
7444
|
"div",
|
|
7444
7445
|
{
|
|
7445
|
-
ref:
|
|
7446
|
-
|
|
7446
|
+
ref: ne,
|
|
7447
|
+
style: E,
|
|
7448
|
+
className: Z("h-full w-full", _),
|
|
7447
7449
|
children: /* @__PURE__ */ n(
|
|
7448
7450
|
_r.Provider,
|
|
7449
7451
|
{
|
|
7450
|
-
value:
|
|
7452
|
+
value: J,
|
|
7451
7453
|
children: /* @__PURE__ */ n(
|
|
7452
7454
|
oc,
|
|
7453
7455
|
{
|
|
7454
|
-
outerRef:
|
|
7455
|
-
width:
|
|
7456
|
-
height:
|
|
7457
|
-
itemCount: (t?.length ?? 0) + (
|
|
7458
|
-
onScroll:
|
|
7459
|
-
includeAddColumn: !!
|
|
7456
|
+
outerRef: D,
|
|
7457
|
+
width: ie.width,
|
|
7458
|
+
height: ie.height,
|
|
7459
|
+
itemCount: (t?.length ?? 0) + (C ? 1 : 0),
|
|
7460
|
+
onScroll: W,
|
|
7461
|
+
includeAddColumn: !!k,
|
|
7460
7462
|
itemSize: a
|
|
7461
7463
|
},
|
|
7462
7464
|
a
|
|
@@ -7466,7 +7468,7 @@ const ic = ia(({
|
|
|
7466
7468
|
}
|
|
7467
7469
|
);
|
|
7468
7470
|
},
|
|
7469
|
-
|
|
7471
|
+
$
|
|
7470
7472
|
);
|
|
7471
7473
|
function oc({
|
|
7472
7474
|
outerRef: e,
|
|
@@ -7580,20 +7582,20 @@ function sc({
|
|
|
7580
7582
|
}) {
|
|
7581
7583
|
const d = i ? ["array-contains"] : ["==", "!=", ">", "<", ">=", "<="];
|
|
7582
7584
|
i ? d.push("array-contains-any") : d.push("in", "not-in");
|
|
7583
|
-
const [u, p] = t || [d[0], void 0], [m, f] =
|
|
7584
|
-
function b(
|
|
7585
|
-
const D = Tr.includes(m),
|
|
7586
|
-
let
|
|
7587
|
-
D !==
|
|
7588
|
-
const
|
|
7585
|
+
const [u, p] = t || [d[0], void 0], [m, f] = R(u), [g, A] = R(p), h = g ? Array.isArray(g) ? g.map((I) => I?.isEntityReference && I?.isEntityReference() ? I.id : null).filter(Boolean) : [g.id] : [];
|
|
7586
|
+
function b(I, P) {
|
|
7587
|
+
const D = Tr.includes(m), Y = Tr.includes(I);
|
|
7588
|
+
let ne = P;
|
|
7589
|
+
D !== Y && (ne = Y ? ne?.isEntityReference && ne?.isEntityReference() ? [ne] : [] : void 0), f(I), A(ne);
|
|
7590
|
+
const ie = ne !== null && Array.isArray(ne) ? ne.length > 0 : ne !== void 0;
|
|
7589
7591
|
r(
|
|
7590
|
-
|
|
7592
|
+
I && ie ? [I, ne] : void 0
|
|
7591
7593
|
);
|
|
7592
7594
|
}
|
|
7593
|
-
const y = _e(), w = he(() => a ? y.getCollection(a) : void 0, [a]), E = (
|
|
7594
|
-
b(m, at(
|
|
7595
|
-
}, _ = (
|
|
7596
|
-
b(m,
|
|
7595
|
+
const y = _e(), w = he(() => a ? y.getCollection(a) : void 0, [a]), E = (I) => {
|
|
7596
|
+
b(m, at(I));
|
|
7597
|
+
}, _ = (I) => {
|
|
7598
|
+
b(m, I.map((P) => at(P)));
|
|
7597
7599
|
}, C = Tr.includes(m), k = Jt(
|
|
7598
7600
|
{
|
|
7599
7601
|
multiselect: C,
|
|
@@ -7608,14 +7610,14 @@ function sc({
|
|
|
7608
7610
|
}
|
|
7609
7611
|
), B = () => {
|
|
7610
7612
|
c(!0), k.open();
|
|
7611
|
-
},
|
|
7613
|
+
}, F = (I) => /* @__PURE__ */ n(
|
|
7612
7614
|
Ze,
|
|
7613
7615
|
{
|
|
7614
7616
|
disabled: !a,
|
|
7615
7617
|
previewProperties: l,
|
|
7616
7618
|
size: "medium",
|
|
7617
7619
|
onClick: B,
|
|
7618
|
-
reference:
|
|
7620
|
+
reference: I,
|
|
7619
7621
|
hover: !0,
|
|
7620
7622
|
includeId: s,
|
|
7621
7623
|
includeEntityLink: !1
|
|
@@ -7626,16 +7628,16 @@ function sc({
|
|
|
7626
7628
|
tt,
|
|
7627
7629
|
{
|
|
7628
7630
|
value: m,
|
|
7629
|
-
onValueChange: (
|
|
7630
|
-
b(
|
|
7631
|
+
onValueChange: (I) => {
|
|
7632
|
+
b(I, g);
|
|
7631
7633
|
},
|
|
7632
|
-
renderValue: (
|
|
7633
|
-
children: d.map((
|
|
7634
|
+
renderValue: (I) => rn[I],
|
|
7635
|
+
children: d.map((I) => /* @__PURE__ */ n(rt, { value: I, children: rn[I] }, I))
|
|
7634
7636
|
}
|
|
7635
7637
|
) }),
|
|
7636
7638
|
/* @__PURE__ */ v("div", { className: "flex-grow ml-2 h-full gap-2 flex flex-col", children: [
|
|
7637
|
-
g && Array.isArray(g) && /* @__PURE__ */ n("div", { children: g.map((
|
|
7638
|
-
g && !Array.isArray(g) && /* @__PURE__ */ n("div", { children:
|
|
7639
|
+
g && Array.isArray(g) && /* @__PURE__ */ n("div", { children: g.map((I, P) => F(I)) }),
|
|
7640
|
+
g && !Array.isArray(g) && /* @__PURE__ */ n("div", { children: F(g) }),
|
|
7639
7641
|
(!g || Array.isArray(g) && g.length === 0) && /* @__PURE__ */ n(
|
|
7640
7642
|
ge,
|
|
7641
7643
|
{
|
|
@@ -7658,7 +7660,7 @@ function sc({
|
|
|
7658
7660
|
id: "null-filter",
|
|
7659
7661
|
checked: g === null,
|
|
7660
7662
|
size: "small",
|
|
7661
|
-
onCheckedChange: (
|
|
7663
|
+
onCheckedChange: (I) => {
|
|
7662
7664
|
g !== null ? b(m, null) : b(m, void 0);
|
|
7663
7665
|
}
|
|
7664
7666
|
}
|
|
@@ -7693,7 +7695,7 @@ function lc({
|
|
|
7693
7695
|
}) {
|
|
7694
7696
|
const l = a ? ["array-contains"] : ["==", "!=", ">", "<", ">=", "<="];
|
|
7695
7697
|
o && (a ? l.push("array-contains-any") : l.push("in", "not-in"));
|
|
7696
|
-
const [c, d] = t || [l[0], void 0], [u, p] =
|
|
7698
|
+
const [c, d] = t || [l[0], void 0], [u, p] = R(c), [m, f] = R(d);
|
|
7697
7699
|
function g(h, b) {
|
|
7698
7700
|
let y = b;
|
|
7699
7701
|
const w = Or.includes(u), E = Or.includes(h);
|
|
@@ -7728,7 +7730,7 @@ function lc({
|
|
|
7728
7730
|
g(u, b);
|
|
7729
7731
|
},
|
|
7730
7732
|
endAdornment: m && /* @__PURE__ */ n(
|
|
7731
|
-
|
|
7733
|
+
de,
|
|
7732
7734
|
{
|
|
7733
7735
|
onClick: (h) => g(u, void 0),
|
|
7734
7736
|
children: /* @__PURE__ */ n(Tt, {})
|
|
@@ -7746,7 +7748,7 @@ function lc({
|
|
|
7746
7748
|
},
|
|
7747
7749
|
multiple: A,
|
|
7748
7750
|
endAdornment: m && /* @__PURE__ */ n(
|
|
7749
|
-
|
|
7751
|
+
de,
|
|
7750
7752
|
{
|
|
7751
7753
|
className: "absolute right-2 top-3",
|
|
7752
7754
|
onClick: (h) => g(u, void 0),
|
|
@@ -7845,7 +7847,7 @@ function dc({
|
|
|
7845
7847
|
setValue: a,
|
|
7846
7848
|
title: o
|
|
7847
7849
|
}) {
|
|
7848
|
-
const { locale: s } = pe(), l = t ? ["array-contains"] : ["==", "!=", ">", "<", ">=", "<="], [c, d] = i || [l[0], void 0], [u, p] =
|
|
7850
|
+
const { locale: s } = pe(), l = t ? ["array-contains"] : ["==", "!=", ">", "<", ">=", "<="], [c, d] = i || [l[0], void 0], [u, p] = R(c), [m, f] = R(d);
|
|
7849
7851
|
function g(A, h) {
|
|
7850
7852
|
let b = h;
|
|
7851
7853
|
const y = an.includes(u), w = an.includes(A);
|
|
@@ -7933,48 +7935,48 @@ const uc = S.memo(
|
|
|
7933
7935
|
setPopupCell: k
|
|
7934
7936
|
},
|
|
7935
7937
|
filterable: B = !0,
|
|
7936
|
-
emptyComponent:
|
|
7937
|
-
columns:
|
|
7938
|
-
forceFilter:
|
|
7938
|
+
emptyComponent: F,
|
|
7939
|
+
columns: I,
|
|
7940
|
+
forceFilter: P,
|
|
7939
7941
|
highlightedRow: D,
|
|
7940
|
-
endAdornment:
|
|
7941
|
-
AddColumnComponent:
|
|
7942
|
+
endAdornment: Y,
|
|
7943
|
+
AddColumnComponent: ne
|
|
7942
7944
|
}) {
|
|
7943
|
-
const
|
|
7945
|
+
const ie = le(null), [H, U] = S.useState(void 0), O = () => {
|
|
7944
7946
|
!_ || d || u || y !== void 0 && w?.(y + E);
|
|
7945
|
-
},
|
|
7947
|
+
}, K = x(() => {
|
|
7946
7948
|
w?.(E);
|
|
7947
|
-
}, [E]),
|
|
7949
|
+
}, [E]), ee = x(({ rowData: re }) => {
|
|
7948
7950
|
if (!l)
|
|
7949
|
-
return i && i(
|
|
7951
|
+
return i && i(re);
|
|
7950
7952
|
}, [i, l]);
|
|
7951
7953
|
kn(
|
|
7952
|
-
|
|
7954
|
+
ie,
|
|
7953
7955
|
() => {
|
|
7954
|
-
H &&
|
|
7956
|
+
H && ce();
|
|
7955
7957
|
},
|
|
7956
7958
|
!!H
|
|
7957
7959
|
), z(() => {
|
|
7958
|
-
const
|
|
7959
|
-
T.keyCode === 27 &&
|
|
7960
|
+
const re = (T) => {
|
|
7961
|
+
T.keyCode === 27 && ce();
|
|
7960
7962
|
};
|
|
7961
|
-
return document.addEventListener("keydown",
|
|
7962
|
-
document.removeEventListener("keydown",
|
|
7963
|
+
return document.addEventListener("keydown", re, !1), () => {
|
|
7964
|
+
document.removeEventListener("keydown", re, !1);
|
|
7963
7965
|
};
|
|
7964
7966
|
});
|
|
7965
|
-
const
|
|
7966
|
-
|
|
7967
|
-
}, []),
|
|
7968
|
-
|
|
7969
|
-
}, []),
|
|
7970
|
-
f?.({ ...
|
|
7971
|
-
}, [
|
|
7967
|
+
const se = x((re) => {
|
|
7968
|
+
U(re);
|
|
7969
|
+
}, []), ce = x(() => {
|
|
7970
|
+
U(void 0);
|
|
7971
|
+
}, []), W = x((re) => {
|
|
7972
|
+
f?.({ ...re, ...P });
|
|
7973
|
+
}, [P]);
|
|
7972
7974
|
return /* @__PURE__ */ n(
|
|
7973
7975
|
So.Provider,
|
|
7974
7976
|
{
|
|
7975
7977
|
value: {
|
|
7976
7978
|
setPopupCell: k,
|
|
7977
|
-
select:
|
|
7979
|
+
select: se,
|
|
7978
7980
|
onValueChange: t,
|
|
7979
7981
|
size: s ?? "m",
|
|
7980
7982
|
selectedCell: H
|
|
@@ -7983,33 +7985,33 @@ const uc = S.memo(
|
|
|
7983
7985
|
"div",
|
|
7984
7986
|
{
|
|
7985
7987
|
className: "h-full w-full flex flex-col bg-white dark:bg-gray-950",
|
|
7986
|
-
ref:
|
|
7988
|
+
ref: ie,
|
|
7987
7989
|
children: /* @__PURE__ */ n(
|
|
7988
7990
|
nc,
|
|
7989
7991
|
{
|
|
7990
7992
|
data: c,
|
|
7991
|
-
columns:
|
|
7993
|
+
columns: I,
|
|
7992
7994
|
cellRenderer: r,
|
|
7993
|
-
onRowClick: l ? void 0 : i ?
|
|
7994
|
-
onEndReached:
|
|
7995
|
-
onResetPagination:
|
|
7995
|
+
onRowClick: l ? void 0 : i ? ee : void 0,
|
|
7996
|
+
onEndReached: O,
|
|
7997
|
+
onResetPagination: K,
|
|
7996
7998
|
error: p,
|
|
7997
7999
|
paginationEnabled: _,
|
|
7998
8000
|
onColumnResize: a,
|
|
7999
8001
|
rowHeight: kr(s),
|
|
8000
8002
|
loading: d,
|
|
8001
8003
|
filter: m,
|
|
8002
|
-
onFilterUpdate: f ?
|
|
8004
|
+
onFilterUpdate: f ? W : void 0,
|
|
8003
8005
|
sortBy: g,
|
|
8004
8006
|
onSortByUpdate: A,
|
|
8005
8007
|
hoverRow: o,
|
|
8006
8008
|
checkFilterCombination: C,
|
|
8007
8009
|
createFilterField: B ? mc : void 0,
|
|
8008
|
-
rowClassName: x((
|
|
8010
|
+
rowClassName: x((re) => D?.(re) ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "", [D]),
|
|
8009
8011
|
className: "flex-grow",
|
|
8010
|
-
emptyComponent:
|
|
8011
|
-
endAdornment:
|
|
8012
|
-
AddColumnComponent:
|
|
8012
|
+
emptyComponent: F,
|
|
8013
|
+
endAdornment: Y,
|
|
8014
|
+
AddColumnComponent: ne
|
|
8013
8015
|
}
|
|
8014
8016
|
)
|
|
8015
8017
|
}
|
|
@@ -8017,7 +8019,7 @@ const uc = S.memo(
|
|
|
8017
8019
|
}
|
|
8018
8020
|
);
|
|
8019
8021
|
},
|
|
8020
|
-
|
|
8022
|
+
$
|
|
8021
8023
|
);
|
|
8022
8024
|
function mc({
|
|
8023
8025
|
id: e,
|
|
@@ -8114,20 +8116,20 @@ const Qo = function({
|
|
|
8114
8116
|
properties: C,
|
|
8115
8117
|
tableController: k,
|
|
8116
8118
|
filterable: B = !0,
|
|
8117
|
-
sortable:
|
|
8118
|
-
endAdornment:
|
|
8119
|
-
AddColumnComponent:
|
|
8119
|
+
sortable: F = !0,
|
|
8120
|
+
endAdornment: I,
|
|
8121
|
+
AddColumnComponent: P,
|
|
8120
8122
|
AdditionalHeaderWidget: D,
|
|
8121
|
-
additionalIDHeaderWidget:
|
|
8122
|
-
emptyComponent:
|
|
8123
|
-
getIdColumnWidth:
|
|
8123
|
+
additionalIDHeaderWidget: Y,
|
|
8124
|
+
emptyComponent: ne,
|
|
8125
|
+
getIdColumnWidth: ie,
|
|
8124
8126
|
onTextSearchClick: H,
|
|
8125
|
-
textSearchLoading:
|
|
8126
|
-
enablePopupIcon:
|
|
8127
|
+
textSearchLoading: U,
|
|
8128
|
+
enablePopupIcon: O
|
|
8127
8129
|
}) {
|
|
8128
|
-
const
|
|
8129
|
-
A && A(M),
|
|
8130
|
-
}, []),
|
|
8130
|
+
const K = le(null), ee = qe(), se = (p?.selectedEntities?.length > 0 ? p?.selectedEntities : m)?.filter(Boolean), ce = Ie(), [W, re] = S.useState(_ ?? "m"), T = se?.map((M) => M.id), oe = x((M) => {
|
|
8131
|
+
A && A(M), re(M);
|
|
8132
|
+
}, []), te = x((M) => k.setSearchString?.(M), []), J = he(() => w ? w.map((M) => ({ [M.key]: M })).reduce((M, ue) => ({ ...M, ...ue }), {}) : {}, [w]), j = c, V = ({
|
|
8131
8133
|
column: M,
|
|
8132
8134
|
columnIndex: ue,
|
|
8133
8135
|
rowData: ve,
|
|
@@ -8147,34 +8149,34 @@ const Qo = function({
|
|
|
8147
8149
|
propertyKey: We,
|
|
8148
8150
|
property: He,
|
|
8149
8151
|
value: xe?.values ? ot(xe.values, We) : void 0,
|
|
8150
|
-
customFieldValidator:
|
|
8152
|
+
customFieldValidator: j,
|
|
8151
8153
|
columnIndex: ue,
|
|
8152
8154
|
width: M.width,
|
|
8153
|
-
height: kr(
|
|
8155
|
+
height: kr(W),
|
|
8154
8156
|
entity: xe,
|
|
8155
8157
|
disabled: Je,
|
|
8156
|
-
enablePopupIcon:
|
|
8158
|
+
enablePopupIcon: O,
|
|
8157
8159
|
path: xe.path
|
|
8158
8160
|
},
|
|
8159
8161
|
`property_table_cell_${xe.id}_${We}`
|
|
8160
8162
|
) : nt() }) : null;
|
|
8161
|
-
},
|
|
8163
|
+
}, N = x(({
|
|
8162
8164
|
column: M,
|
|
8163
8165
|
rowData: ue,
|
|
8164
8166
|
width: ve
|
|
8165
8167
|
}) => {
|
|
8166
|
-
const we = ue, xe =
|
|
8168
|
+
const we = ue, xe = J[M.key], We = xe.dependencies ? Object.entries(we.values).filter(([Ke, st]) => xe.dependencies.includes(Ke)).reduce((Ke, st) => ({ ...Ke, ...st }), {}) : we, Je = xe.Builder;
|
|
8167
8169
|
if (!Je && !xe.value)
|
|
8168
8170
|
throw new Error("When using additional fields you need to provide a Builder or a value");
|
|
8169
|
-
const He = Je ? /* @__PURE__ */ n(Je, { entity: we, context:
|
|
8171
|
+
const He = Je ? /* @__PURE__ */ n(Je, { entity: we, context: ce }) : /* @__PURE__ */ n(G, { children: xe.value?.({
|
|
8170
8172
|
entity: we,
|
|
8171
|
-
context:
|
|
8173
|
+
context: ce
|
|
8172
8174
|
}) });
|
|
8173
8175
|
return /* @__PURE__ */ n(
|
|
8174
8176
|
ur,
|
|
8175
8177
|
{
|
|
8176
8178
|
width: ve,
|
|
8177
|
-
size:
|
|
8179
|
+
size: W,
|
|
8178
8180
|
value: We,
|
|
8179
8181
|
selected: !1,
|
|
8180
8182
|
disabled: !0,
|
|
@@ -8186,10 +8188,10 @@ const Qo = function({
|
|
|
8186
8188
|
},
|
|
8187
8189
|
`additional_table_cell_${we.id}_${M.key}`
|
|
8188
8190
|
);
|
|
8189
|
-
}, [
|
|
8191
|
+
}, [W, T]), Q = (() => {
|
|
8190
8192
|
const M = Zl({
|
|
8191
8193
|
properties: C,
|
|
8192
|
-
sortable:
|
|
8194
|
+
sortable: F,
|
|
8193
8195
|
forceFilter: i,
|
|
8194
8196
|
AdditionalHeaderWidget: D
|
|
8195
8197
|
}), ue = w ? w.map((ve) => ({
|
|
@@ -8200,25 +8202,25 @@ const Qo = function({
|
|
|
8200
8202
|
width: ve.width ?? 200
|
|
8201
8203
|
})) : [];
|
|
8202
8204
|
return [...M, ...ue];
|
|
8203
|
-
})(),
|
|
8205
|
+
})(), Be = [
|
|
8204
8206
|
{
|
|
8205
8207
|
key: "id_ewcfedcswdf3",
|
|
8206
|
-
width:
|
|
8208
|
+
width: ie?.() ?? (ee ? 160 : 130),
|
|
8207
8209
|
title: "ID",
|
|
8208
8210
|
resizable: !1,
|
|
8209
|
-
frozen:
|
|
8211
|
+
frozen: ee,
|
|
8210
8212
|
headerAlign: "center",
|
|
8211
8213
|
align: "center",
|
|
8212
|
-
AdditionalHeaderWidget: () =>
|
|
8214
|
+
AdditionalHeaderWidget: () => Y
|
|
8213
8215
|
},
|
|
8214
|
-
...E ? E.map((M) =>
|
|
8215
|
-
],
|
|
8216
|
+
...E ? E.map((M) => Q.find((ue) => ue.key === M.key)).filter(Boolean) : Q
|
|
8217
|
+
], ae = (M) => {
|
|
8216
8218
|
const ue = M.column, ve = M.columns, we = ue.key;
|
|
8217
8219
|
try {
|
|
8218
8220
|
if (M.columnIndex === 0)
|
|
8219
8221
|
return l ? l({
|
|
8220
8222
|
entity: M.rowData,
|
|
8221
|
-
size:
|
|
8223
|
+
size: W,
|
|
8222
8224
|
width: ue.width,
|
|
8223
8225
|
frozen: ue.frozen
|
|
8224
8226
|
}) : /* @__PURE__ */ n(
|
|
@@ -8228,19 +8230,19 @@ const Qo = function({
|
|
|
8228
8230
|
width: ue.width,
|
|
8229
8231
|
frozen: ue.frozen,
|
|
8230
8232
|
isSelected: !1,
|
|
8231
|
-
size:
|
|
8233
|
+
size: W
|
|
8232
8234
|
}
|
|
8233
8235
|
);
|
|
8234
|
-
if (
|
|
8235
|
-
return
|
|
8236
|
+
if (J[we])
|
|
8237
|
+
return N(M);
|
|
8236
8238
|
if (M.columnIndex < ve.length + 1)
|
|
8237
|
-
return
|
|
8239
|
+
return V(M);
|
|
8238
8240
|
throw Error("Internal: columns not mapped properly");
|
|
8239
8241
|
} catch (xe) {
|
|
8240
8242
|
return console.error("Error rendering cell", xe), /* @__PURE__ */ n(
|
|
8241
8243
|
ur,
|
|
8242
8244
|
{
|
|
8243
|
-
size:
|
|
8245
|
+
size: W,
|
|
8244
8246
|
width: ue.width,
|
|
8245
8247
|
saved: !1,
|
|
8246
8248
|
value: null,
|
|
@@ -8255,18 +8257,18 @@ const Qo = function({
|
|
|
8255
8257
|
return /* @__PURE__ */ v(
|
|
8256
8258
|
"div",
|
|
8257
8259
|
{
|
|
8258
|
-
ref:
|
|
8260
|
+
ref: K,
|
|
8259
8261
|
style: r,
|
|
8260
8262
|
className: Z("h-full w-full flex flex-col bg-white dark:bg-gray-950", t),
|
|
8261
8263
|
children: [
|
|
8262
8264
|
/* @__PURE__ */ n(
|
|
8263
8265
|
Wl,
|
|
8264
8266
|
{
|
|
8265
|
-
onTextSearch: h ?
|
|
8266
|
-
textSearchLoading:
|
|
8267
|
+
onTextSearch: h ? te : void 0,
|
|
8268
|
+
textSearchLoading: U,
|
|
8267
8269
|
onTextSearchClick: h ? H : void 0,
|
|
8268
|
-
size:
|
|
8269
|
-
onSizeChanged:
|
|
8270
|
+
size: W,
|
|
8271
|
+
onSizeChanged: oe,
|
|
8270
8272
|
title: s,
|
|
8271
8273
|
actionsStart: a,
|
|
8272
8274
|
actions: o,
|
|
@@ -8276,10 +8278,10 @@ const Qo = function({
|
|
|
8276
8278
|
/* @__PURE__ */ n(
|
|
8277
8279
|
uc,
|
|
8278
8280
|
{
|
|
8279
|
-
columns:
|
|
8280
|
-
size:
|
|
8281
|
+
columns: Be,
|
|
8282
|
+
size: W,
|
|
8281
8283
|
inlineEditing: y,
|
|
8282
|
-
cellRenderer:
|
|
8284
|
+
cellRenderer: ae,
|
|
8283
8285
|
onEntityClick: f,
|
|
8284
8286
|
highlightedRow: x((M) => T?.includes(M.id) ?? !1, [T]),
|
|
8285
8287
|
tableController: k,
|
|
@@ -8287,9 +8289,9 @@ const Qo = function({
|
|
|
8287
8289
|
onColumnResize: g,
|
|
8288
8290
|
hoverRow: b,
|
|
8289
8291
|
filterable: B,
|
|
8290
|
-
emptyComponent:
|
|
8291
|
-
endAdornment:
|
|
8292
|
-
AddColumnComponent:
|
|
8292
|
+
emptyComponent: ne,
|
|
8293
|
+
endAdornment: I,
|
|
8294
|
+
AddColumnComponent: P
|
|
8293
8295
|
}
|
|
8294
8296
|
)
|
|
8295
8297
|
]
|
|
@@ -8306,10 +8308,10 @@ function pc({
|
|
|
8306
8308
|
return [...t, ...e.filter((i) => !r.has(i.id))];
|
|
8307
8309
|
}
|
|
8308
8310
|
function fc(e, t, r = 5e3) {
|
|
8309
|
-
const [i, a] = S.useState(e), o = S.useRef(i.length ?? 0), s = S.useRef(!1), l = S.useRef(t), c =
|
|
8311
|
+
const [i, a] = S.useState(e), o = S.useRef(i.length ?? 0), s = S.useRef(!1), l = S.useRef(t), c = !$(l.current, t), d = e.length >= o.current || c;
|
|
8310
8312
|
return S.useEffect(() => {
|
|
8311
8313
|
const u = () => {
|
|
8312
|
-
|
|
8314
|
+
$(i, e) || (l.current = t, o.current = e.length, a(e)), s.current = !1;
|
|
8313
8315
|
};
|
|
8314
8316
|
s.current = !0;
|
|
8315
8317
|
let p;
|
|
@@ -8331,21 +8333,21 @@ function Ro({
|
|
|
8331
8333
|
initialSort: s,
|
|
8332
8334
|
forceFilter: l
|
|
8333
8335
|
} = t, [c, d] = S.useState(void 0), u = _e(), p = Xe(t), m = he(() => u.resolveAliasesFrom(e), [e, u.resolveAliasesFrom]), f = a ?? l, g = t.pagination === void 0 || !!t.pagination, A = typeof t.pagination == "number" ? t.pagination : hc, [h, b] = S.useState(), [y, w] = S.useState(g ? A : void 0), E = he(() => {
|
|
8334
|
-
if (s && f && !
|
|
8336
|
+
if (s && f && !ee(f, s)) {
|
|
8335
8337
|
console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");
|
|
8336
8338
|
return;
|
|
8337
8339
|
}
|
|
8338
8340
|
return s;
|
|
8339
8341
|
}, [s, f]);
|
|
8340
8342
|
z(() => {
|
|
8341
|
-
|
|
8343
|
+
$(f, _) || C(f);
|
|
8342
8344
|
}, [f]);
|
|
8343
|
-
const [_, C] = S.useState(f ?? o ?? void 0), [k, B] = S.useState(E),
|
|
8345
|
+
const [_, C] = S.useState(f ?? o ?? void 0), [k, B] = S.useState(E), F = k ? k[0] : void 0, I = k ? k[1] : void 0, P = Ie(), [D, Y] = R([]), [ne, ie] = R(!1), [H, U] = R(), [O, K] = R(!1), ee = x((T, oe) => p.isFilterCombinationValid ? p.isFilterCombinationValid({
|
|
8344
8346
|
path: m,
|
|
8345
8347
|
collection: t,
|
|
8346
8348
|
filterValues: T,
|
|
8347
|
-
sortBy:
|
|
8348
|
-
}) : !0, []),
|
|
8349
|
+
sortBy: oe
|
|
8350
|
+
}) : !0, []), se = x(() => C(f ?? void 0), [f]), ce = x((T) => {
|
|
8349
8351
|
if (f) {
|
|
8350
8352
|
console.warn("Filter is not compatible with the force filter. Ignoring filter");
|
|
8351
8353
|
return;
|
|
@@ -8353,39 +8355,39 @@ function Ro({
|
|
|
8353
8355
|
T && Object.keys(T).length === 0 ? C(void 0) : C(T);
|
|
8354
8356
|
}, [f]);
|
|
8355
8357
|
z(() => {
|
|
8356
|
-
|
|
8357
|
-
const T = async (
|
|
8358
|
+
ie(!0);
|
|
8359
|
+
const T = async (te) => {
|
|
8358
8360
|
if (t.callbacks?.onFetch)
|
|
8359
8361
|
try {
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
+
te = await Promise.all(
|
|
8363
|
+
te.map((J) => t.callbacks.onFetch({
|
|
8362
8364
|
collection: t,
|
|
8363
8365
|
path: m,
|
|
8364
|
-
entity:
|
|
8365
|
-
context:
|
|
8366
|
+
entity: J,
|
|
8367
|
+
context: P
|
|
8366
8368
|
}))
|
|
8367
8369
|
);
|
|
8368
|
-
} catch (
|
|
8369
|
-
console.error(
|
|
8370
|
+
} catch (J) {
|
|
8371
|
+
console.error(J);
|
|
8370
8372
|
}
|
|
8371
|
-
|
|
8372
|
-
...
|
|
8373
|
+
ie(!1), U(void 0), Y(te.map((J) => ({
|
|
8374
|
+
...J
|
|
8373
8375
|
// values: sanitizeData(e.values, resolvedCollection.properties)
|
|
8374
|
-
}))),
|
|
8375
|
-
},
|
|
8376
|
-
console.error("ERROR",
|
|
8376
|
+
}))), K(!y || te.length < y);
|
|
8377
|
+
}, oe = (te) => {
|
|
8378
|
+
console.error("ERROR", te), ie(!1), Y([]), U(te);
|
|
8377
8379
|
};
|
|
8378
8380
|
return p.listenCollection ? p.listenCollection({
|
|
8379
8381
|
path: m,
|
|
8380
8382
|
collection: t,
|
|
8381
8383
|
onUpdate: T,
|
|
8382
|
-
onError:
|
|
8384
|
+
onError: oe,
|
|
8383
8385
|
searchString: h,
|
|
8384
8386
|
filter: _,
|
|
8385
8387
|
limit: y,
|
|
8386
8388
|
startAfter: void 0,
|
|
8387
|
-
orderBy:
|
|
8388
|
-
order:
|
|
8389
|
+
orderBy: F,
|
|
8390
|
+
order: I
|
|
8389
8391
|
}) : (p.fetchCollection({
|
|
8390
8392
|
path: m,
|
|
8391
8393
|
collection: t,
|
|
@@ -8393,43 +8395,43 @@ function Ro({
|
|
|
8393
8395
|
filter: _,
|
|
8394
8396
|
limit: y,
|
|
8395
8397
|
startAfter: void 0,
|
|
8396
|
-
orderBy:
|
|
8397
|
-
order:
|
|
8398
|
-
}).then(T).catch(
|
|
8398
|
+
orderBy: F,
|
|
8399
|
+
order: I
|
|
8400
|
+
}).then(T).catch(oe), () => {
|
|
8399
8401
|
});
|
|
8400
|
-
}, [m, y,
|
|
8401
|
-
const
|
|
8402
|
+
}, [m, y, I, F, _, h]);
|
|
8403
|
+
const W = pc({
|
|
8402
8404
|
data: D,
|
|
8403
8405
|
entitiesDisplayedFirst: r
|
|
8404
8406
|
});
|
|
8405
8407
|
return {
|
|
8406
|
-
data: fc(
|
|
8408
|
+
data: fc(W, {
|
|
8407
8409
|
filterValues: _,
|
|
8408
8410
|
sortBy: k,
|
|
8409
8411
|
searchString: h,
|
|
8410
8412
|
lastDeleteTimestamp: i
|
|
8411
8413
|
}),
|
|
8412
|
-
dataLoading:
|
|
8413
|
-
noMoreToLoad:
|
|
8414
|
+
dataLoading: ne,
|
|
8415
|
+
noMoreToLoad: O,
|
|
8414
8416
|
dataLoadingError: H,
|
|
8415
8417
|
filterValues: _,
|
|
8416
|
-
setFilterValues:
|
|
8418
|
+
setFilterValues: ce,
|
|
8417
8419
|
sortBy: k,
|
|
8418
8420
|
setSortBy: B,
|
|
8419
8421
|
searchString: h,
|
|
8420
8422
|
setSearchString: b,
|
|
8421
|
-
clearFilter:
|
|
8423
|
+
clearFilter: se,
|
|
8422
8424
|
itemCount: y,
|
|
8423
8425
|
setItemCount: w,
|
|
8424
8426
|
paginationEnabled: g,
|
|
8425
8427
|
pageSize: A,
|
|
8426
|
-
checkFilterCombination:
|
|
8428
|
+
checkFilterCombination: ee,
|
|
8427
8429
|
popupCell: c,
|
|
8428
8430
|
setPopupCell: d
|
|
8429
8431
|
};
|
|
8430
8432
|
}
|
|
8431
8433
|
function Do(e) {
|
|
8432
|
-
const [t, r] =
|
|
8434
|
+
const [t, r] = R([]), i = x((o) => {
|
|
8433
8435
|
let s;
|
|
8434
8436
|
t.map((l) => l.id).includes(o.id) ? (e?.(o, !1), s = t.filter((l) => l.id !== o.id)) : (e?.(o, !0), s = [...t, o]), r(s);
|
|
8435
8437
|
}, [t]), a = x((o) => t.map((s) => s.id).includes(o.id), [t]);
|
|
@@ -8441,7 +8443,7 @@ function Do(e) {
|
|
|
8441
8443
|
};
|
|
8442
8444
|
}
|
|
8443
8445
|
function To({ collection: e, fullPath: t, parentCollectionIds: r }) {
|
|
8444
|
-
const i =
|
|
8446
|
+
const i = Ie(), a = pe(), [o, s] = R(!1), [l, c] = R(!1);
|
|
8445
8447
|
let d, u = !!e.textSearchEnabled;
|
|
8446
8448
|
return a?.plugins && (d = a.plugins?.find((m) => !!m.collectionView?.onTextSearchClick) ? () => {
|
|
8447
8449
|
s(!0), Promise.all(a.plugins?.map((m) => m.collectionView?.onTextSearchClick ? m.collectionView.onTextSearchClick({ context: i, path: t, collection: e, parentCollectionIds: r }) : Promise.resolve(!0))).then((m) => {
|
|
@@ -8461,7 +8463,7 @@ function Oo({
|
|
|
8461
8463
|
onMultipleEntitiesDelete: s,
|
|
8462
8464
|
path: l
|
|
8463
8465
|
}) {
|
|
8464
|
-
const c = Xe(t), d = pe(), u = ft(), [p, m] =
|
|
8466
|
+
const c = Xe(t), d = pe(), u = ft(), [p, m] = R(!1), [f, g] = S.useState(), [A, h] = S.useState(), b = Ie();
|
|
8465
8467
|
S.useEffect(() => {
|
|
8466
8468
|
if (e) {
|
|
8467
8469
|
const D = Array.isArray(e) && e.length === 1 ? e[0] : e;
|
|
@@ -8476,21 +8478,21 @@ function Oo({
|
|
|
8476
8478
|
r();
|
|
8477
8479
|
}, [r]), E = x((D) => {
|
|
8478
8480
|
console.debug("Deleted", D);
|
|
8479
|
-
}, []), _ = x((D,
|
|
8481
|
+
}, []), _ = x((D, Y) => {
|
|
8480
8482
|
u.open({
|
|
8481
8483
|
type: "error",
|
|
8482
|
-
message: "Error deleting: " +
|
|
8483
|
-
}), console.error("Error deleting entity"), console.error(
|
|
8484
|
-
}, [y.name]), C = x((D,
|
|
8484
|
+
message: "Error deleting: " + Y?.message
|
|
8485
|
+
}), console.error("Error deleting entity"), console.error(Y);
|
|
8486
|
+
}, [y.name]), C = x((D, Y) => {
|
|
8485
8487
|
u.open({
|
|
8486
8488
|
type: "error",
|
|
8487
|
-
message: "Error before deleting: " +
|
|
8488
|
-
}), console.error(
|
|
8489
|
-
}, [y.name]), k = x((D,
|
|
8489
|
+
message: "Error before deleting: " + Y?.message
|
|
8490
|
+
}), console.error(Y);
|
|
8491
|
+
}, [y.name]), k = x((D, Y) => {
|
|
8490
8492
|
u.open({
|
|
8491
8493
|
type: "error",
|
|
8492
|
-
message: "Error after deleting: " +
|
|
8493
|
-
}), console.error(
|
|
8494
|
+
message: "Error after deleting: " + Y?.message
|
|
8495
|
+
}), console.error(Y);
|
|
8494
8496
|
}, [y.name]), B = x((D) => Ds({
|
|
8495
8497
|
dataSource: c,
|
|
8496
8498
|
entity: D,
|
|
@@ -8501,7 +8503,7 @@ function Oo({
|
|
|
8501
8503
|
onPreDeleteHookError: C,
|
|
8502
8504
|
onDeleteSuccessHookError: k,
|
|
8503
8505
|
context: b
|
|
8504
|
-
}), [c, y, a, E, _, C, k, b]),
|
|
8506
|
+
}), [c, y, a, E, _, C, k, b]), F = x(async () => {
|
|
8505
8507
|
f && (m(!0), A ? Promise.all(f.map(B)).then((D) => {
|
|
8506
8508
|
m(!1), s && f && s(l, f), D.every(Boolean) ? u.open({
|
|
8507
8509
|
type: "success",
|
|
@@ -8520,12 +8522,12 @@ function Oo({
|
|
|
8520
8522
|
}), r());
|
|
8521
8523
|
}));
|
|
8522
8524
|
}, [f, A, B, s, l, r, u, y.name, o]);
|
|
8523
|
-
let
|
|
8525
|
+
let I;
|
|
8524
8526
|
if (f && A)
|
|
8525
|
-
|
|
8527
|
+
I = /* @__PURE__ */ n(G, { children: "Multiple entities" });
|
|
8526
8528
|
else {
|
|
8527
8529
|
const D = f;
|
|
8528
|
-
|
|
8530
|
+
I = D ? /* @__PURE__ */ n(
|
|
8529
8531
|
ko,
|
|
8530
8532
|
{
|
|
8531
8533
|
entity: D,
|
|
@@ -8534,7 +8536,7 @@ function Oo({
|
|
|
8534
8536
|
}
|
|
8535
8537
|
) : /* @__PURE__ */ n(G, {});
|
|
8536
8538
|
}
|
|
8537
|
-
const
|
|
8539
|
+
const P = A ? /* @__PURE__ */ v(G, { children: [
|
|
8538
8540
|
/* @__PURE__ */ n("b", { children: y.name }),
|
|
8539
8541
|
": Confirm multiple delete?"
|
|
8540
8542
|
] }) : `Would you like to delete this ${y.singularName ?? y.name}?`;
|
|
@@ -8547,8 +8549,8 @@ function Oo({
|
|
|
8547
8549
|
onOpenChange: (D) => D ? void 0 : r(),
|
|
8548
8550
|
children: [
|
|
8549
8551
|
/* @__PURE__ */ v(mi, { fullHeight: !0, children: [
|
|
8550
|
-
/* @__PURE__ */ n(
|
|
8551
|
-
!A && /* @__PURE__ */ n("div", { className: "p-4", children:
|
|
8552
|
+
/* @__PURE__ */ n(q, { variant: "subtitle2", className: "p-4", children: P }),
|
|
8553
|
+
!A && /* @__PURE__ */ n("div", { className: "p-4", children: I })
|
|
8552
8554
|
] }),
|
|
8553
8555
|
/* @__PURE__ */ v(Ct, { children: [
|
|
8554
8556
|
p && /* @__PURE__ */ n(Et, { size: "small" }),
|
|
@@ -8567,7 +8569,7 @@ function Oo({
|
|
|
8567
8569
|
{
|
|
8568
8570
|
autoFocus: !0,
|
|
8569
8571
|
disabled: p,
|
|
8570
|
-
onClick:
|
|
8572
|
+
onClick: F,
|
|
8571
8573
|
variant: "filled",
|
|
8572
8574
|
color: "primary",
|
|
8573
8575
|
children: "Ok"
|
|
@@ -8696,36 +8698,36 @@ function Ac({
|
|
|
8696
8698
|
forceFilter: l,
|
|
8697
8699
|
maxSelection: c
|
|
8698
8700
|
}) {
|
|
8699
|
-
const d = Fi(), u = pt(), p = _e(), m = St(), f = pe(), g = p.resolveAliasesFrom(a), A = Xe(i), [h, b] =
|
|
8700
|
-
let
|
|
8701
|
-
const
|
|
8701
|
+
const d = Fi(), u = pt(), p = _e(), m = St(), f = pe(), g = p.resolveAliasesFrom(a), A = Xe(i), [h, b] = R([]), y = (H) => {
|
|
8702
|
+
let U;
|
|
8703
|
+
const O = w.selectedEntities;
|
|
8702
8704
|
if (m.onAnalyticsEvent?.("reference_selection_toggle", {
|
|
8703
8705
|
path: g,
|
|
8704
8706
|
entityId: H.id
|
|
8705
|
-
}),
|
|
8706
|
-
if (
|
|
8707
|
-
|
|
8707
|
+
}), O) {
|
|
8708
|
+
if (O.map((K) => K.id).indexOf(H.id) > -1)
|
|
8709
|
+
U = O.filter((K) => K.id !== H.id);
|
|
8708
8710
|
else {
|
|
8709
|
-
if (c &&
|
|
8711
|
+
if (c && O.length >= c)
|
|
8710
8712
|
return;
|
|
8711
|
-
|
|
8713
|
+
U = [...O, H];
|
|
8712
8714
|
}
|
|
8713
|
-
w.setSelectedEntities(
|
|
8715
|
+
w.setSelectedEntities(U), t && t(U);
|
|
8714
8716
|
}
|
|
8715
8717
|
}, w = Do(y);
|
|
8716
8718
|
z(() => {
|
|
8717
8719
|
let H = !1;
|
|
8718
|
-
const
|
|
8719
|
-
return
|
|
8720
|
-
|
|
8720
|
+
const U = o?.map((O) => O?.toString()).filter(Boolean);
|
|
8721
|
+
return U && i ? Promise.all(
|
|
8722
|
+
U.map((O) => A.fetchEntity({
|
|
8721
8723
|
path: g,
|
|
8722
|
-
entityId:
|
|
8724
|
+
entityId: O,
|
|
8723
8725
|
collection: i
|
|
8724
8726
|
}))
|
|
8725
|
-
).then((
|
|
8727
|
+
).then((O) => {
|
|
8726
8728
|
if (!H) {
|
|
8727
|
-
const
|
|
8728
|
-
w.setSelectedEntities(
|
|
8729
|
+
const K = O.filter((ee) => ee !== void 0);
|
|
8730
|
+
w.setSelectedEntities(K), b(K);
|
|
8729
8731
|
}
|
|
8730
8732
|
}) : (w.setSelectedEntities([]), b([])), () => {
|
|
8731
8733
|
H = !0;
|
|
@@ -8754,19 +8756,19 @@ function Ac({
|
|
|
8754
8756
|
});
|
|
8755
8757
|
}, k = ({
|
|
8756
8758
|
entity: H,
|
|
8757
|
-
size:
|
|
8758
|
-
width:
|
|
8759
|
-
frozen:
|
|
8759
|
+
size: U,
|
|
8760
|
+
width: O,
|
|
8761
|
+
frozen: K
|
|
8760
8762
|
}) => {
|
|
8761
|
-
const
|
|
8763
|
+
const ee = w.selectedEntities, se = ee && ee.map((ce) => ce.id).indexOf(H.id) > -1;
|
|
8762
8764
|
return /* @__PURE__ */ n(
|
|
8763
8765
|
ki,
|
|
8764
8766
|
{
|
|
8765
|
-
width:
|
|
8766
|
-
frozen:
|
|
8767
|
+
width: O,
|
|
8768
|
+
frozen: K,
|
|
8767
8769
|
entity: H,
|
|
8768
|
-
size:
|
|
8769
|
-
isSelected:
|
|
8770
|
+
size: U,
|
|
8771
|
+
isSelected: se,
|
|
8770
8772
|
selectionEnabled: r,
|
|
8771
8773
|
hideId: i?.hideIdFromCollection,
|
|
8772
8774
|
fullPath: g,
|
|
@@ -8783,21 +8785,21 @@ function Ac({
|
|
|
8783
8785
|
error: "Could not find collection with id " + i
|
|
8784
8786
|
}
|
|
8785
8787
|
);
|
|
8786
|
-
const
|
|
8788
|
+
const F = he(() => je({
|
|
8787
8789
|
collection: i,
|
|
8788
8790
|
path: g,
|
|
8789
8791
|
values: {},
|
|
8790
8792
|
fields: f.propertyConfigs
|
|
8791
|
-
}), [i, f.propertyConfigs, g]),
|
|
8793
|
+
}), [i, f.propertyConfigs, g]), I = No(F, !1), P = Ro({
|
|
8792
8794
|
fullPath: g,
|
|
8793
8795
|
collection: i,
|
|
8794
8796
|
entitiesDisplayedFirst: h,
|
|
8795
8797
|
forceFilter: l
|
|
8796
8798
|
}), {
|
|
8797
8799
|
textSearchLoading: D,
|
|
8798
|
-
textSearchInitialised:
|
|
8799
|
-
onTextSearchClick:
|
|
8800
|
-
textSearchEnabled:
|
|
8800
|
+
textSearchInitialised: Y,
|
|
8801
|
+
onTextSearchClick: ne,
|
|
8802
|
+
textSearchEnabled: ie
|
|
8801
8803
|
} = (
|
|
8802
8804
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
8803
8805
|
To({
|
|
@@ -8810,16 +8812,16 @@ function Ac({
|
|
|
8810
8812
|
Qo,
|
|
8811
8813
|
{
|
|
8812
8814
|
textSearchLoading: D,
|
|
8813
|
-
onTextSearchClick:
|
|
8814
|
-
textSearchEnabled:
|
|
8815
|
-
displayedColumnIds:
|
|
8815
|
+
onTextSearchClick: Y ? void 0 : ne,
|
|
8816
|
+
textSearchEnabled: ie,
|
|
8817
|
+
displayedColumnIds: I,
|
|
8816
8818
|
onEntityClick: _,
|
|
8817
|
-
tableController:
|
|
8819
|
+
tableController: P,
|
|
8818
8820
|
enablePopupIcon: !1,
|
|
8819
8821
|
tableRowActionsBuilder: k,
|
|
8820
|
-
title: /* @__PURE__ */ n(
|
|
8822
|
+
title: /* @__PURE__ */ n(q, { variant: "subtitle2", children: i.singularName ? `Select ${i.singularName}` : `Select from ${i.name}` }),
|
|
8821
8823
|
defaultSize: i.defaultSize,
|
|
8822
|
-
properties:
|
|
8824
|
+
properties: F.properties,
|
|
8823
8825
|
forceFilter: l,
|
|
8824
8826
|
inlineEditing: !1,
|
|
8825
8827
|
selectionController: w,
|
|
@@ -8836,7 +8838,7 @@ function Ac({
|
|
|
8836
8838
|
) }),
|
|
8837
8839
|
/* @__PURE__ */ v(Ct, { translucent: !1, children: [
|
|
8838
8840
|
s && /* @__PURE__ */ n(
|
|
8839
|
-
|
|
8841
|
+
q,
|
|
8840
8842
|
{
|
|
8841
8843
|
variant: "body2",
|
|
8842
8844
|
className: "flex-grow text-left",
|
|
@@ -8922,7 +8924,7 @@ function sn({
|
|
|
8922
8924
|
}
|
|
8923
8925
|
},
|
|
8924
8926
|
title: /* @__PURE__ */ n(
|
|
8925
|
-
|
|
8927
|
+
q,
|
|
8926
8928
|
{
|
|
8927
8929
|
color: "secondary",
|
|
8928
8930
|
className: "font-medium ml-1",
|
|
@@ -8973,7 +8975,7 @@ function yc({
|
|
|
8973
8975
|
}
|
|
8974
8976
|
),
|
|
8975
8977
|
/* @__PURE__ */ n(
|
|
8976
|
-
|
|
8978
|
+
q,
|
|
8977
8979
|
{
|
|
8978
8980
|
gutterBottom: !0,
|
|
8979
8981
|
variant: "h5",
|
|
@@ -8982,7 +8984,7 @@ function yc({
|
|
|
8982
8984
|
}
|
|
8983
8985
|
),
|
|
8984
8986
|
t && /* @__PURE__ */ n(
|
|
8985
|
-
|
|
8987
|
+
q,
|
|
8986
8988
|
{
|
|
8987
8989
|
variant: "body2",
|
|
8988
8990
|
color: "secondary",
|
|
@@ -9018,7 +9020,7 @@ function wc({
|
|
|
9018
9020
|
/* @__PURE__ */ v("div", { className: "flex flex-row items-center flex-grow gap-2 ", children: [
|
|
9019
9021
|
r,
|
|
9020
9022
|
/* @__PURE__ */ n(
|
|
9021
|
-
|
|
9023
|
+
q,
|
|
9022
9024
|
{
|
|
9023
9025
|
gutterBottom: !0,
|
|
9024
9026
|
variant: "h5",
|
|
@@ -9043,9 +9045,9 @@ function vc({
|
|
|
9043
9045
|
onClick: s,
|
|
9044
9046
|
type: l
|
|
9045
9047
|
}) {
|
|
9046
|
-
const c = Bt(), d = /* @__PURE__ */ n(Hr, { collectionOrView: t ?? r }), u = $t(), p =
|
|
9048
|
+
const c = Bt(), d = /* @__PURE__ */ n(Hr, { collectionOrView: t ?? r }), u = $t(), p = Ie(), m = pe(), f = (c?.favouritePaths ?? []).includes(e), g = c ? [
|
|
9047
9049
|
/* @__PURE__ */ n(
|
|
9048
|
-
|
|
9050
|
+
de,
|
|
9049
9051
|
{
|
|
9050
9052
|
onClick: (h) => {
|
|
9051
9053
|
h.preventDefault(), h.stopPropagation(), f ? c.setFavouritePaths(
|
|
@@ -9193,7 +9195,7 @@ function Ec({
|
|
|
9193
9195
|
additionalChildrenStart: t,
|
|
9194
9196
|
additionalChildrenEnd: r
|
|
9195
9197
|
}) {
|
|
9196
|
-
const i =
|
|
9198
|
+
const i = Ie(), a = pe(), o = _e();
|
|
9197
9199
|
if (!o.topLevelNavigation)
|
|
9198
9200
|
throw Error("Navigation not ready in FireCMSHomePage");
|
|
9199
9201
|
const {
|
|
@@ -9203,7 +9205,7 @@ function Ec({
|
|
|
9203
9205
|
} = xc(), {
|
|
9204
9206
|
navigationEntries: d,
|
|
9205
9207
|
groups: u
|
|
9206
|
-
} = o.topLevelNavigation, [p, m] =
|
|
9208
|
+
} = o.topLevelNavigation, [p, m] = R(null), f = p ? d.filter((w) => p.includes(w.url)) : d;
|
|
9207
9209
|
z(() => {
|
|
9208
9210
|
_t.addDocuments(d);
|
|
9209
9211
|
}, [d]);
|
|
@@ -9285,12 +9287,12 @@ function Ec({
|
|
|
9285
9287
|
{
|
|
9286
9288
|
...B,
|
|
9287
9289
|
onClick: () => {
|
|
9288
|
-
let
|
|
9289
|
-
B.type === "collection" ?
|
|
9290
|
+
let F;
|
|
9291
|
+
B.type === "collection" ? F = "home_navigate_to_collection" : B.type === "view" ? F = "home_navigate_to_view" : B.type === "admin" ? F = "home_navigate_to_admin_view" : F = "unmapped_event", i.analyticsController?.onAnalyticsEvent?.(F, { path: B.path });
|
|
9290
9292
|
}
|
|
9291
9293
|
}
|
|
9292
9294
|
) }, `nav_${B.group}_${B.name}`)),
|
|
9293
|
-
w?.toLowerCase() !== "admin" && _ && _.map((B,
|
|
9295
|
+
w?.toLowerCase() !== "admin" && _ && _.map((B, F) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(B, { ...C }) }, `nav_${w}_add_${F}`))
|
|
9294
9296
|
] })
|
|
9295
9297
|
},
|
|
9296
9298
|
`plugin_section_${w}`
|
|
@@ -9315,7 +9317,7 @@ function Cc({
|
|
|
9315
9317
|
tableController: c,
|
|
9316
9318
|
collectionEntitiesCount: d
|
|
9317
9319
|
}) {
|
|
9318
|
-
const u =
|
|
9320
|
+
const u = Ie(), m = pe().plugins ?? [], f = mt(), g = qe(), A = l.selectedEntities, h = zt(e, f, s, null) && i && (g ? /* @__PURE__ */ v(
|
|
9319
9321
|
ge,
|
|
9320
9322
|
{
|
|
9321
9323
|
id: `add_entity_${s}`,
|
|
@@ -9356,7 +9358,7 @@ function Cc({
|
|
|
9356
9358
|
]
|
|
9357
9359
|
}
|
|
9358
9360
|
) : /* @__PURE__ */ n(
|
|
9359
|
-
|
|
9361
|
+
de,
|
|
9360
9362
|
{
|
|
9361
9363
|
color: "primary",
|
|
9362
9364
|
disabled: !A?.length || !b,
|
|
@@ -9431,7 +9433,7 @@ function Bc({
|
|
|
9431
9433
|
});
|
|
9432
9434
|
}
|
|
9433
9435
|
function Sc() {
|
|
9434
|
-
const [e, t] =
|
|
9436
|
+
const [e, t] = R({ width: 0, height: 0 });
|
|
9435
9437
|
return Gr(() => {
|
|
9436
9438
|
function r() {
|
|
9437
9439
|
t({ width: window.innerWidth, height: window.innerHeight });
|
|
@@ -9440,7 +9442,7 @@ function Sc() {
|
|
|
9440
9442
|
}, []), e;
|
|
9441
9443
|
}
|
|
9442
9444
|
const Ic = ({ onResize: e }) => {
|
|
9443
|
-
const t =
|
|
9445
|
+
const t = le(0), r = le(null), i = le(e);
|
|
9444
9446
|
i.current = e;
|
|
9445
9447
|
const a = x((s) => {
|
|
9446
9448
|
t.current && cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
@@ -9493,13 +9495,13 @@ function Fc({
|
|
|
9493
9495
|
onCellValueChange: d,
|
|
9494
9496
|
container: u
|
|
9495
9497
|
}) {
|
|
9496
|
-
const p =
|
|
9498
|
+
const p = Ie(), m = pe(), [f, g] = S.useState(), [A, h] = R(), b = t?.id, [y, w] = R(t), [E, _] = R(y?.values), C = a ? je({
|
|
9497
9499
|
collection: a,
|
|
9498
9500
|
path: o,
|
|
9499
9501
|
values: E,
|
|
9500
9502
|
entityId: b,
|
|
9501
9503
|
fields: m.propertyConfigs
|
|
9502
|
-
}) : void 0, k = Sc(), B = S.useRef(null),
|
|
9504
|
+
}) : void 0, k = Sc(), B = S.useRef(null), F = S.useRef(null), I = S.useRef(!1), P = x(() => {
|
|
9503
9505
|
if (!s)
|
|
9504
9506
|
throw Error("getInitialLocation error");
|
|
9505
9507
|
return {
|
|
@@ -9507,55 +9509,55 @@ function Fc({
|
|
|
9507
9509
|
y: s.top < k.height - s.bottom ? s.y + s.height / 2 : s.y - s.height / 2
|
|
9508
9510
|
};
|
|
9509
9511
|
}, [s, k.height, k.width]), D = x(({
|
|
9510
|
-
x:
|
|
9511
|
-
y:
|
|
9512
|
+
x: V,
|
|
9513
|
+
y: N
|
|
9512
9514
|
}) => {
|
|
9513
|
-
const
|
|
9514
|
-
if (!
|
|
9515
|
+
const Q = B.current?.getBoundingClientRect();
|
|
9516
|
+
if (!Q)
|
|
9515
9517
|
throw Error("normalizePosition called before draggableBoundingRect is set");
|
|
9516
9518
|
return {
|
|
9517
|
-
x: Math.max(0, Math.min(
|
|
9518
|
-
y: Math.max(0, Math.min(
|
|
9519
|
+
x: Math.max(0, Math.min(V, k.width - Q.width)),
|
|
9520
|
+
y: Math.max(0, Math.min(N, k.height - Q.height))
|
|
9519
9521
|
};
|
|
9520
|
-
}, [k]),
|
|
9521
|
-
const
|
|
9522
|
-
if (!s || !
|
|
9522
|
+
}, [k]), Y = x((V) => {
|
|
9523
|
+
const N = B.current?.getBoundingClientRect();
|
|
9524
|
+
if (!s || !N)
|
|
9523
9525
|
return;
|
|
9524
|
-
const
|
|
9525
|
-
(!A ||
|
|
9526
|
-
}, [s,
|
|
9526
|
+
const Q = V ?? D(P());
|
|
9527
|
+
(!A || Q.x !== A.x || Q.y !== A.y) && h(Q);
|
|
9528
|
+
}, [s, P, D, A]);
|
|
9527
9529
|
Bc({
|
|
9528
9530
|
containerRef: B,
|
|
9529
|
-
innerRef:
|
|
9531
|
+
innerRef: F,
|
|
9530
9532
|
x: A?.x,
|
|
9531
9533
|
y: A?.y,
|
|
9532
|
-
onMove:
|
|
9534
|
+
onMove: Y
|
|
9533
9535
|
}), z(
|
|
9534
9536
|
() => {
|
|
9535
|
-
|
|
9537
|
+
I.current = !1;
|
|
9536
9538
|
},
|
|
9537
9539
|
[i, y]
|
|
9538
9540
|
), Gr(
|
|
9539
9541
|
() => {
|
|
9540
|
-
const
|
|
9541
|
-
!s ||
|
|
9542
|
+
const V = B.current?.getBoundingClientRect();
|
|
9543
|
+
!s || !V || I.current || (Y(), I.current = !0);
|
|
9542
9544
|
},
|
|
9543
|
-
[s,
|
|
9545
|
+
[s, Y, I.current]
|
|
9544
9546
|
), Gr(
|
|
9545
9547
|
() => {
|
|
9546
|
-
|
|
9548
|
+
Y(A);
|
|
9547
9549
|
},
|
|
9548
9550
|
[k, s]
|
|
9549
9551
|
);
|
|
9550
|
-
const
|
|
9552
|
+
const ne = he(() => {
|
|
9551
9553
|
if (!(!C || !b))
|
|
9552
9554
|
return Bo(
|
|
9553
9555
|
b,
|
|
9554
9556
|
i && C.properties[i] ? { [i]: C.properties[i] } : {},
|
|
9555
9557
|
r
|
|
9556
9558
|
);
|
|
9557
|
-
}, [C, b, i, r]),
|
|
9558
|
-
value:
|
|
9559
|
+
}, [C, b, i, r]), ie = x(() => Y(A), [A, Y]), H = async (V) => (g(null), a && y && d && i ? d({
|
|
9560
|
+
value: V[i],
|
|
9559
9561
|
propertyKey: i,
|
|
9560
9562
|
data: y,
|
|
9561
9563
|
setError: g,
|
|
@@ -9564,22 +9566,22 @@ function Fc({
|
|
|
9564
9566
|
}) : Promise.resolve());
|
|
9565
9567
|
if (!y)
|
|
9566
9568
|
return /* @__PURE__ */ n(G, {});
|
|
9567
|
-
const
|
|
9569
|
+
const U = pn({
|
|
9568
9570
|
initialValues: y?.values ?? {},
|
|
9569
|
-
validation: (
|
|
9570
|
-
const
|
|
9571
|
-
return
|
|
9572
|
-
|
|
9573
|
-
}),
|
|
9571
|
+
validation: (V) => ne?.validate(V, { abortEarly: !1 }).then(() => ({})).catch((N) => {
|
|
9572
|
+
const Q = {};
|
|
9573
|
+
return N.inner.forEach((Ae) => {
|
|
9574
|
+
Q[Ae.path] = Ae.message;
|
|
9575
|
+
}), Q;
|
|
9574
9576
|
}),
|
|
9575
9577
|
validateOnInitialRender: !0,
|
|
9576
|
-
onSubmit: (
|
|
9577
|
-
H(
|
|
9578
|
+
onSubmit: (V, N) => {
|
|
9579
|
+
H(V).then(() => c()).finally(() => N.setSubmitting(!1));
|
|
9578
9580
|
}
|
|
9579
|
-
}), { values:
|
|
9581
|
+
}), { values: O, isSubmitting: K, setFieldValue: ee, handleSubmit: se } = U;
|
|
9580
9582
|
if (z(() => {
|
|
9581
|
-
|
|
9582
|
-
}, [
|
|
9583
|
+
$(O, E) || _(O);
|
|
9584
|
+
}, [O]), !y)
|
|
9583
9585
|
return /* @__PURE__ */ n(
|
|
9584
9586
|
Ne,
|
|
9585
9587
|
{
|
|
@@ -9588,33 +9590,33 @@ function Fc({
|
|
|
9588
9590
|
);
|
|
9589
9591
|
if (!C)
|
|
9590
9592
|
return /* @__PURE__ */ n(G, {});
|
|
9591
|
-
const
|
|
9593
|
+
const ce = K, W = {
|
|
9592
9594
|
collection: C,
|
|
9593
9595
|
entityId: b,
|
|
9594
|
-
values:
|
|
9596
|
+
values: O,
|
|
9595
9597
|
path: o,
|
|
9596
|
-
setFieldValue:
|
|
9598
|
+
setFieldValue: ee,
|
|
9597
9599
|
save: H
|
|
9598
|
-
},
|
|
9600
|
+
}, re = i && At(C.properties, i), T = i && re ? {
|
|
9599
9601
|
propertyKey: i,
|
|
9600
|
-
disabled:
|
|
9601
|
-
property:
|
|
9602
|
+
disabled: K || qt(re) || !!re.disabled,
|
|
9603
|
+
property: re,
|
|
9602
9604
|
includeDescription: !1,
|
|
9603
9605
|
underlyingValueHasChanged: !1,
|
|
9604
|
-
context:
|
|
9606
|
+
context: W,
|
|
9605
9607
|
tableMode: !0,
|
|
9606
9608
|
partOfArray: !1,
|
|
9607
9609
|
partOfBlock: !1,
|
|
9608
9610
|
autoFocus: l
|
|
9609
9611
|
} : void 0;
|
|
9610
|
-
let
|
|
9612
|
+
let oe = /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(
|
|
9611
9613
|
"div",
|
|
9612
9614
|
{
|
|
9613
9615
|
className: "w-[560px] max-w-full max-h-[85vh]",
|
|
9614
9616
|
children: /* @__PURE__ */ v(
|
|
9615
9617
|
"form",
|
|
9616
9618
|
{
|
|
9617
|
-
onSubmit:
|
|
9619
|
+
onSubmit: se,
|
|
9618
9620
|
noValidate: !0,
|
|
9619
9621
|
children: [
|
|
9620
9622
|
/* @__PURE__ */ n(
|
|
@@ -9624,7 +9626,7 @@ function Fc({
|
|
|
9624
9626
|
children: /* @__PURE__ */ n(
|
|
9625
9627
|
"div",
|
|
9626
9628
|
{
|
|
9627
|
-
ref:
|
|
9629
|
+
ref: F,
|
|
9628
9630
|
className: "cursor-auto",
|
|
9629
9631
|
style: { cursor: "auto !important" },
|
|
9630
9632
|
children: T && /* @__PURE__ */ n(It, { ...T })
|
|
@@ -9638,7 +9640,7 @@ function Fc({
|
|
|
9638
9640
|
variant: "filled",
|
|
9639
9641
|
color: "primary",
|
|
9640
9642
|
type: "submit",
|
|
9641
|
-
disabled:
|
|
9643
|
+
disabled: ce,
|
|
9642
9644
|
children: "Save"
|
|
9643
9645
|
}
|
|
9644
9646
|
) })
|
|
@@ -9648,10 +9650,10 @@ function Fc({
|
|
|
9648
9650
|
},
|
|
9649
9651
|
`popup_form_${e}_${b}_${i}`
|
|
9650
9652
|
) });
|
|
9651
|
-
const
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9653
|
+
const te = m.plugins;
|
|
9654
|
+
te && te.forEach((V) => {
|
|
9655
|
+
V.form?.provider && (oe = /* @__PURE__ */ n(
|
|
9656
|
+
V.form.provider.Component,
|
|
9655
9657
|
{
|
|
9656
9658
|
status: "existing",
|
|
9657
9659
|
path: o,
|
|
@@ -9659,22 +9661,22 @@ function Fc({
|
|
|
9659
9661
|
entity: y,
|
|
9660
9662
|
context: p,
|
|
9661
9663
|
currentEntityId: b,
|
|
9662
|
-
formContext:
|
|
9663
|
-
|
|
9664
|
-
children:
|
|
9664
|
+
formContext: W,
|
|
9665
|
+
...V.form.provider.props,
|
|
9666
|
+
children: oe
|
|
9665
9667
|
}
|
|
9666
9668
|
));
|
|
9667
9669
|
});
|
|
9668
|
-
const
|
|
9670
|
+
const J = /* @__PURE__ */ v(
|
|
9669
9671
|
"div",
|
|
9670
9672
|
{
|
|
9671
9673
|
className: `text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${l ? "" : "hidden"} cursor-grab max-w-[100vw]`,
|
|
9672
9674
|
children: [
|
|
9673
|
-
|
|
9674
|
-
f && /* @__PURE__ */ n(
|
|
9675
|
+
oe,
|
|
9676
|
+
f && /* @__PURE__ */ n(q, { color: "error", children: f.message })
|
|
9675
9677
|
]
|
|
9676
9678
|
}
|
|
9677
|
-
),
|
|
9679
|
+
), j = /* @__PURE__ */ v(
|
|
9678
9680
|
"div",
|
|
9679
9681
|
{
|
|
9680
9682
|
style: {
|
|
@@ -9683,13 +9685,13 @@ function Fc({
|
|
|
9683
9685
|
className: `inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${l ? "visible" : "invisible"} cursor-grab overflow-visible`,
|
|
9684
9686
|
ref: B,
|
|
9685
9687
|
children: [
|
|
9686
|
-
/* @__PURE__ */ n(Ic, { onResize:
|
|
9688
|
+
/* @__PURE__ */ n(Ic, { onResize: ie }),
|
|
9687
9689
|
/* @__PURE__ */ v(
|
|
9688
9690
|
"div",
|
|
9689
9691
|
{
|
|
9690
9692
|
className: "overflow-hidden",
|
|
9691
9693
|
children: [
|
|
9692
|
-
|
|
9694
|
+
J,
|
|
9693
9695
|
/* @__PURE__ */ n(
|
|
9694
9696
|
"div",
|
|
9695
9697
|
{
|
|
@@ -9699,11 +9701,11 @@ function Fc({
|
|
|
9699
9701
|
height: "32px"
|
|
9700
9702
|
},
|
|
9701
9703
|
children: /* @__PURE__ */ n(
|
|
9702
|
-
|
|
9704
|
+
de,
|
|
9703
9705
|
{
|
|
9704
9706
|
size: "small",
|
|
9705
|
-
onClick: (
|
|
9706
|
-
|
|
9707
|
+
onClick: (V) => {
|
|
9708
|
+
V.stopPropagation(), c();
|
|
9707
9709
|
},
|
|
9708
9710
|
children: /* @__PURE__ */ n(
|
|
9709
9711
|
Tt,
|
|
@@ -9728,7 +9730,7 @@ function Fc({
|
|
|
9728
9730
|
{
|
|
9729
9731
|
asChild: !0,
|
|
9730
9732
|
container: u,
|
|
9731
|
-
children: /* @__PURE__ */ n(fn, { value:
|
|
9733
|
+
children: /* @__PURE__ */ n(fn, { value: U, children: j })
|
|
9732
9734
|
}
|
|
9733
9735
|
);
|
|
9734
9736
|
}
|
|
@@ -9769,7 +9771,7 @@ function Qc({
|
|
|
9769
9771
|
tableController: o,
|
|
9770
9772
|
collectionEntitiesCount: s
|
|
9771
9773
|
}) {
|
|
9772
|
-
const l =
|
|
9774
|
+
const l = Ie(), d = pe().plugins ?? [], u = {
|
|
9773
9775
|
path: i,
|
|
9774
9776
|
relativePath: t,
|
|
9775
9777
|
parentCollectionIds: r,
|
|
@@ -9800,14 +9802,14 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9800
9802
|
className: a,
|
|
9801
9803
|
...o
|
|
9802
9804
|
}) {
|
|
9803
|
-
const s =
|
|
9805
|
+
const s = Ie(), l = t ?? o.path, c = Xe(o), d = _e(), u = pt(), p = mt(), m = Bt(), f = St(), g = pe(), A = S.useRef(null), h = he(() => {
|
|
9804
9806
|
const X = m?.getCollectionConfig(l);
|
|
9805
9807
|
return X ? $e(o, X) : o;
|
|
9806
9808
|
}, [o, l, m?.getCollectionConfig]), b = S.useRef(h);
|
|
9807
9809
|
z(() => {
|
|
9808
9810
|
b.current = h;
|
|
9809
9811
|
}, [h]);
|
|
9810
|
-
const y = zt(h, p, l, null), [w, E] =
|
|
9812
|
+
const y = zt(h, p, l, null), [w, E] = R(void 0), [_, C] = S.useState(void 0), [k, B] = S.useState(0), [F, I] = R(0), P = x(() => {
|
|
9811
9813
|
const X = w;
|
|
9812
9814
|
setTimeout(() => {
|
|
9813
9815
|
X === w && E(void 0);
|
|
@@ -9815,21 +9817,21 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9815
9817
|
}, [w]), D = x((X) => {
|
|
9816
9818
|
const fe = b.current;
|
|
9817
9819
|
return Hn(fe, p, l, X ?? null) ? fe.inlineEditing === void 0 || fe.inlineEditing : !1;
|
|
9818
|
-
}, [p, l]),
|
|
9819
|
-
selectedEntities:
|
|
9820
|
-
isEntitySelected:
|
|
9821
|
-
setSelectedEntities:
|
|
9822
|
-
} =
|
|
9820
|
+
}, [p, l]), Y = h.selectionEnabled === void 0 || h.selectionEnabled, ne = !D(), [ie, H] = R(!1), U = Do(), O = h.selectionController ?? U, {
|
|
9821
|
+
selectedEntities: K,
|
|
9822
|
+
isEntitySelected: ee,
|
|
9823
|
+
setSelectedEntities: se
|
|
9824
|
+
} = O;
|
|
9823
9825
|
z(() => {
|
|
9824
9826
|
C(void 0);
|
|
9825
|
-
}, [
|
|
9826
|
-
const
|
|
9827
|
+
}, [K]);
|
|
9828
|
+
const ce = Ro({
|
|
9827
9829
|
fullPath: l,
|
|
9828
9830
|
collection: h,
|
|
9829
9831
|
lastDeleteTimestamp: k
|
|
9830
|
-
}),
|
|
9831
|
-
|
|
9832
|
-
}, [
|
|
9832
|
+
}), W = S.useRef(Math.random().toString(36)), re = ce.popupCell, T = x(() => {
|
|
9833
|
+
ce.setPopupCell?.(void 0);
|
|
9834
|
+
}, [ce.setPopupCell]), oe = x((X) => {
|
|
9833
9835
|
console.log("Entity clicked", X);
|
|
9834
9836
|
const fe = b.current;
|
|
9835
9837
|
return E(X), f.onAnalyticsEvent?.("edit_entity_clicked", {
|
|
@@ -9840,9 +9842,9 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9840
9842
|
path: X.path,
|
|
9841
9843
|
collection: fe,
|
|
9842
9844
|
updateUrl: !0,
|
|
9843
|
-
onClose:
|
|
9845
|
+
onClose: P
|
|
9844
9846
|
});
|
|
9845
|
-
}, [
|
|
9847
|
+
}, [P, u]), te = x(() => {
|
|
9846
9848
|
const X = b.current;
|
|
9847
9849
|
f.onAnalyticsEvent?.("new_entity_click", {
|
|
9848
9850
|
path: l
|
|
@@ -9850,24 +9852,24 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9850
9852
|
path: l,
|
|
9851
9853
|
collection: X,
|
|
9852
9854
|
updateUrl: !0,
|
|
9853
|
-
onClose:
|
|
9855
|
+
onClose: P
|
|
9854
9856
|
});
|
|
9855
|
-
}, [l, u]),
|
|
9857
|
+
}, [l, u]), J = () => {
|
|
9856
9858
|
f.onAnalyticsEvent?.("multiple_delete_dialog_open", {
|
|
9857
9859
|
path: l
|
|
9858
|
-
}), C(
|
|
9859
|
-
},
|
|
9860
|
+
}), C(K);
|
|
9861
|
+
}, j = (X, fe) => {
|
|
9860
9862
|
f.onAnalyticsEvent?.("single_entity_deleted", {
|
|
9861
9863
|
path: l
|
|
9862
|
-
}),
|
|
9863
|
-
},
|
|
9864
|
+
}), se((be) => be.filter((ye) => ye.id !== fe.id)), B(Date.now());
|
|
9865
|
+
}, V = (X, fe) => {
|
|
9864
9866
|
f.onAnalyticsEvent?.("multiple_entities_deleted", {
|
|
9865
9867
|
path: l
|
|
9866
|
-
}),
|
|
9868
|
+
}), se([]), C(void 0), B(Date.now());
|
|
9867
9869
|
};
|
|
9868
|
-
let
|
|
9869
|
-
g?.plugins && (
|
|
9870
|
-
const
|
|
9870
|
+
let N;
|
|
9871
|
+
g?.plugins && (N = g.plugins.find((X) => X.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);
|
|
9872
|
+
const Q = x((X, fe) => {
|
|
9871
9873
|
if (m) {
|
|
9872
9874
|
const be = m.getCollectionConfig(X), ye = $e(be, fe);
|
|
9873
9875
|
m.onCollectionModified(X, ye);
|
|
@@ -9880,10 +9882,10 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9880
9882
|
if (!At(be.properties, fe))
|
|
9881
9883
|
return;
|
|
9882
9884
|
const ye = Go(fe, X);
|
|
9883
|
-
|
|
9884
|
-
}, [
|
|
9885
|
-
m &&
|
|
9886
|
-
}, [
|
|
9885
|
+
Q(l, ye);
|
|
9886
|
+
}, [Q, l]), Be = x((X) => {
|
|
9887
|
+
m && Q(l, { defaultSize: X });
|
|
9888
|
+
}, [Q, l, m]), ae = zt(h, p, l, null), M = x(
|
|
9887
9889
|
({
|
|
9888
9890
|
name: X,
|
|
9889
9891
|
value: fe,
|
|
@@ -9988,7 +9990,7 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9988
9990
|
customEntityActions: fe
|
|
9989
9991
|
}) => {
|
|
9990
9992
|
const be = X ? wi(h, p, l, X) : !0, ye = [gc];
|
|
9991
|
-
return
|
|
9993
|
+
return ae && ye.push(Mo), be && ye.push(zo), fe && ye.push(...fe), ye;
|
|
9992
9994
|
}, Er = () => {
|
|
9993
9995
|
const X = st({}), fe = X.filter((Ce) => Ce.collapsed !== !1), ye = X.filter((Ce) => Ce.collapsed === !1).length * (Ke ? 40 : 30);
|
|
9994
9996
|
return (Ke ? 80 + ye : 70 + ye) + (fe.length > 0 ? Ke ? 40 : 30 : 0);
|
|
@@ -9998,7 +10000,7 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
9998
10000
|
width: be,
|
|
9999
10001
|
frozen: ye
|
|
10000
10002
|
}) => {
|
|
10001
|
-
const Ce =
|
|
10003
|
+
const Ce = ee(X), Qt = st({
|
|
10002
10004
|
entity: X,
|
|
10003
10005
|
customEntityActions: h.entityActions
|
|
10004
10006
|
});
|
|
@@ -10009,27 +10011,27 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10009
10011
|
width: be,
|
|
10010
10012
|
frozen: ye,
|
|
10011
10013
|
isSelected: Ce,
|
|
10012
|
-
selectionEnabled:
|
|
10014
|
+
selectionEnabled: Y,
|
|
10013
10015
|
size: fe,
|
|
10014
10016
|
highlightEntity: E,
|
|
10015
|
-
unhighlightEntity:
|
|
10017
|
+
unhighlightEntity: P,
|
|
10016
10018
|
collection: h,
|
|
10017
10019
|
fullPath: l,
|
|
10018
10020
|
actions: Qt,
|
|
10019
10021
|
hideId: h?.hideIdFromCollection,
|
|
10020
10022
|
onCollectionChange: He,
|
|
10021
|
-
selectionController:
|
|
10023
|
+
selectionController: O
|
|
10022
10024
|
}
|
|
10023
10025
|
);
|
|
10024
|
-
},
|
|
10026
|
+
}, L = /* @__PURE__ */ n(
|
|
10025
10027
|
ci,
|
|
10026
10028
|
{
|
|
10027
|
-
open:
|
|
10029
|
+
open: ie,
|
|
10028
10030
|
onOpenChange: H,
|
|
10029
10031
|
enabled: !!h.description,
|
|
10030
10032
|
trigger: /* @__PURE__ */ v("div", { className: "flex flex-col items-start", children: [
|
|
10031
10033
|
/* @__PURE__ */ n(
|
|
10032
|
-
|
|
10034
|
+
q,
|
|
10033
10035
|
{
|
|
10034
10036
|
variant: "subtitle1",
|
|
10035
10037
|
className: `leading-none truncate max-w-[160px] lg:max-w-[240px] ${h.description ? "cursor-pointer" : "cursor-auto"}`,
|
|
@@ -10044,9 +10046,9 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10044
10046
|
{
|
|
10045
10047
|
fullPath: l,
|
|
10046
10048
|
collection: h,
|
|
10047
|
-
filter:
|
|
10048
|
-
sortBy:
|
|
10049
|
-
onCountChange:
|
|
10049
|
+
filter: ce.filterValues,
|
|
10050
|
+
sortBy: ce.sortBy,
|
|
10051
|
+
onCountChange: I
|
|
10050
10052
|
}
|
|
10051
10053
|
)
|
|
10052
10054
|
] }),
|
|
@@ -10073,9 +10075,9 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10073
10075
|
`plugin_header_action_${Qt}`
|
|
10074
10076
|
);
|
|
10075
10077
|
}) }) : null;
|
|
10076
|
-
}, [g.plugins, l, r]), Qe =
|
|
10077
|
-
return typeof
|
|
10078
|
-
|
|
10078
|
+
}, [g.plugins, l, r]), Qe = N ? function() {
|
|
10079
|
+
return typeof N == "function" ? /* @__PURE__ */ n(
|
|
10080
|
+
N,
|
|
10079
10081
|
{
|
|
10080
10082
|
fullPath: l,
|
|
10081
10083
|
parentCollectionIds: r ?? [],
|
|
@@ -10102,17 +10104,17 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10102
10104
|
Qo,
|
|
10103
10105
|
{
|
|
10104
10106
|
additionalFields: Je,
|
|
10105
|
-
tableController:
|
|
10107
|
+
tableController: ce,
|
|
10106
10108
|
enablePopupIcon: !0,
|
|
10107
10109
|
displayedColumnIds: We,
|
|
10108
|
-
onSizeChanged:
|
|
10109
|
-
onEntityClick:
|
|
10110
|
+
onSizeChanged: Be,
|
|
10111
|
+
onEntityClick: oe,
|
|
10110
10112
|
onColumnResize: Ae,
|
|
10111
10113
|
onValueChange: ue,
|
|
10112
10114
|
tableRowActionsBuilder: Cr,
|
|
10113
10115
|
uniqueFieldValidator: M,
|
|
10114
|
-
title:
|
|
10115
|
-
selectionController:
|
|
10116
|
+
title: L,
|
|
10117
|
+
selectionController: O,
|
|
10116
10118
|
highlightedEntities: w ? [w] : [],
|
|
10117
10119
|
defaultSize: h.defaultSize,
|
|
10118
10120
|
properties: we.properties,
|
|
@@ -10125,11 +10127,11 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10125
10127
|
{
|
|
10126
10128
|
parentCollectionIds: r ?? [],
|
|
10127
10129
|
collection: h,
|
|
10128
|
-
tableController:
|
|
10130
|
+
tableController: ce,
|
|
10129
10131
|
path: l,
|
|
10130
10132
|
relativePath: h.path,
|
|
10131
|
-
selectionController:
|
|
10132
|
-
collectionEntitiesCount:
|
|
10133
|
+
selectionController: O,
|
|
10134
|
+
collectionEntitiesCount: F
|
|
10133
10135
|
}
|
|
10134
10136
|
),
|
|
10135
10137
|
actions: /* @__PURE__ */ n(
|
|
@@ -10137,24 +10139,24 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10137
10139
|
{
|
|
10138
10140
|
parentCollectionIds: r ?? [],
|
|
10139
10141
|
collection: h,
|
|
10140
|
-
tableController:
|
|
10141
|
-
onMultipleDeleteClick:
|
|
10142
|
-
onNewClick:
|
|
10142
|
+
tableController: ce,
|
|
10143
|
+
onMultipleDeleteClick: J,
|
|
10144
|
+
onNewClick: te,
|
|
10143
10145
|
path: l,
|
|
10144
10146
|
relativePath: h.path,
|
|
10145
|
-
selectionController:
|
|
10146
|
-
selectionEnabled:
|
|
10147
|
-
collectionEntitiesCount:
|
|
10147
|
+
selectionController: O,
|
|
10148
|
+
selectionEnabled: Y,
|
|
10149
|
+
collectionEntitiesCount: F
|
|
10148
10150
|
}
|
|
10149
10151
|
),
|
|
10150
|
-
emptyComponent: y &&
|
|
10151
|
-
/* @__PURE__ */ n(
|
|
10152
|
+
emptyComponent: y && ce.filterValues === void 0 && ce.sortBy === void 0 ? /* @__PURE__ */ v("div", { className: "flex flex-col items-center justify-center", children: [
|
|
10153
|
+
/* @__PURE__ */ n(q, { variant: "subtitle2", children: "So empty..." }),
|
|
10152
10154
|
/* @__PURE__ */ v(
|
|
10153
10155
|
ge,
|
|
10154
10156
|
{
|
|
10155
10157
|
color: "primary",
|
|
10156
10158
|
variant: "outlined",
|
|
10157
|
-
onClick:
|
|
10159
|
+
onClick: te,
|
|
10158
10160
|
className: "mt-4",
|
|
10159
10161
|
children: [
|
|
10160
10162
|
/* @__PURE__ */ n(ct, {}),
|
|
@@ -10162,8 +10164,8 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10162
10164
|
]
|
|
10163
10165
|
}
|
|
10164
10166
|
)
|
|
10165
|
-
] }) : /* @__PURE__ */ n(
|
|
10166
|
-
hoverRow:
|
|
10167
|
+
] }) : /* @__PURE__ */ n(q, { variant: "label", children: "No results with the applied filter/sort" }),
|
|
10168
|
+
hoverRow: ne,
|
|
10167
10169
|
inlineEditing: D(),
|
|
10168
10170
|
AdditionalHeaderWidget: Pe,
|
|
10169
10171
|
AddColumnComponent: Qe,
|
|
@@ -10181,19 +10183,19 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10181
10183
|
/* @__PURE__ */ n(
|
|
10182
10184
|
Nc,
|
|
10183
10185
|
{
|
|
10184
|
-
open: !!
|
|
10186
|
+
open: !!re,
|
|
10185
10187
|
onClose: T,
|
|
10186
|
-
cellRect:
|
|
10187
|
-
propertyKey:
|
|
10188
|
+
cellRect: re?.cellRect,
|
|
10189
|
+
propertyKey: re?.propertyKey,
|
|
10188
10190
|
collection: h,
|
|
10189
|
-
entity:
|
|
10190
|
-
tableKey:
|
|
10191
|
+
entity: re?.entity,
|
|
10192
|
+
tableKey: W.current,
|
|
10191
10193
|
customFieldValidator: M,
|
|
10192
10194
|
path: ve,
|
|
10193
10195
|
onCellValueChange: ue,
|
|
10194
10196
|
container: A.current
|
|
10195
10197
|
},
|
|
10196
|
-
`popup_form_${
|
|
10198
|
+
`popup_form_${re?.propertyKey}_${re?.entity?.id}`
|
|
10197
10199
|
),
|
|
10198
10200
|
_ && /* @__PURE__ */ n(
|
|
10199
10201
|
Oo,
|
|
@@ -10203,8 +10205,8 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10203
10205
|
collection: h,
|
|
10204
10206
|
callbacks: h.callbacks,
|
|
10205
10207
|
open: !!_,
|
|
10206
|
-
onEntityDelete:
|
|
10207
|
-
onMultipleEntitiesDelete:
|
|
10208
|
+
onEntityDelete: j,
|
|
10209
|
+
onMultipleEntitiesDelete: V,
|
|
10208
10210
|
onClose: () => C(void 0)
|
|
10209
10211
|
}
|
|
10210
10212
|
)
|
|
@@ -10212,7 +10214,7 @@ const Rc = "collectionGroupParent", Vo = S.memo(
|
|
|
10212
10214
|
}
|
|
10213
10215
|
);
|
|
10214
10216
|
},
|
|
10215
|
-
(e, t) =>
|
|
10217
|
+
(e, t) => $(e.fullPath, t.fullPath) && $(e.parentCollectionIds, t.parentCollectionIds) && $(e.isSubCollection, t.isSubCollection) && $(e.className, t.className) && $(e.properties, t.properties) && $(e.propertiesOrder, t.propertiesOrder) && $(e.hideIdFromCollection, t.hideIdFromCollection) && $(e.inlineEditing, t.inlineEditing) && $(e.selectionEnabled, t.selectionEnabled) && $(e.selectionController, t.selectionController) && $(e.Actions, t.Actions) && $(e.defaultSize, t.defaultSize) && $(e.initialFilter, t.initialFilter) && $(e.initialSort, t.initialSort) && $(e.textSearchEnabled, t.textSearchEnabled) && $(e.additionalFields, t.additionalFields) && $(e.sideDialogWidth, t.sideDialogWidth) && $(e.forceFilter, t.forceFilter)
|
|
10216
10218
|
);
|
|
10217
10219
|
function Dc({
|
|
10218
10220
|
fullPath: e,
|
|
@@ -10221,7 +10223,7 @@ function Dc({
|
|
|
10221
10223
|
sortBy: i,
|
|
10222
10224
|
onCountChange: a
|
|
10223
10225
|
}) {
|
|
10224
|
-
const o = Xe(t), s = _e(), [l, c] =
|
|
10226
|
+
const o = Xe(t), s = _e(), [l, c] = R(void 0), [d, u] = R(void 0), p = i ? i[0] : void 0, m = i ? i[1] : void 0, f = he(() => s.resolveAliasesFrom(e), [e, s.resolveAliasesFrom]);
|
|
10225
10227
|
return z(() => {
|
|
10226
10228
|
o.countEntities && o.countEntities({
|
|
10227
10229
|
path: f,
|
|
@@ -10233,7 +10235,7 @@ function Dc({
|
|
|
10233
10235
|
}, [e, o.countEntities, f, t, r, p, m]), z(() => {
|
|
10234
10236
|
a && (u(void 0), a(l ?? 0));
|
|
10235
10237
|
}, [a, l]), d ? null : /* @__PURE__ */ n(
|
|
10236
|
-
|
|
10238
|
+
q,
|
|
10237
10239
|
{
|
|
10238
10240
|
className: "w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",
|
|
10239
10241
|
variant: "caption",
|
|
@@ -10259,7 +10261,7 @@ function Tc({
|
|
|
10259
10261
|
{
|
|
10260
10262
|
open: r,
|
|
10261
10263
|
onOpenChange: i,
|
|
10262
|
-
trigger: /* @__PURE__ */ n(
|
|
10264
|
+
trigger: /* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(xa, { size: "small" }) }),
|
|
10263
10265
|
children: /* @__PURE__ */ n(
|
|
10264
10266
|
"form",
|
|
10265
10267
|
{
|
|
@@ -10322,7 +10324,7 @@ function Oc() {
|
|
|
10322
10324
|
className: "m-auto flex items-center flex-col",
|
|
10323
10325
|
children: [
|
|
10324
10326
|
/* @__PURE__ */ n(
|
|
10325
|
-
|
|
10327
|
+
q,
|
|
10326
10328
|
{
|
|
10327
10329
|
variant: "h4",
|
|
10328
10330
|
align: "center",
|
|
@@ -10330,7 +10332,7 @@ function Oc() {
|
|
|
10330
10332
|
children: "Page not found"
|
|
10331
10333
|
}
|
|
10332
10334
|
),
|
|
10333
|
-
/* @__PURE__ */ n(
|
|
10335
|
+
/* @__PURE__ */ n(q, { align: "center", gutterBottom: !0, children: "This page does not exist or you may not have access to it" }),
|
|
10334
10336
|
/* @__PURE__ */ n(
|
|
10335
10337
|
ge,
|
|
10336
10338
|
{
|
|
@@ -10359,7 +10361,7 @@ function im({
|
|
|
10359
10361
|
onOpenChange: (s) => s ? void 0 : r(),
|
|
10360
10362
|
children: [
|
|
10361
10363
|
/* @__PURE__ */ v(mi, { children: [
|
|
10362
|
-
/* @__PURE__ */ n(
|
|
10364
|
+
/* @__PURE__ */ n(q, { variant: "h6", className: "mb-2", children: i }),
|
|
10363
10365
|
o
|
|
10364
10366
|
] }),
|
|
10365
10367
|
/* @__PURE__ */ v(Ct, { children: [
|
|
@@ -10599,7 +10601,7 @@ const Mc = function({
|
|
|
10599
10601
|
}
|
|
10600
10602
|
) : /* @__PURE__ */ n(jo, { width: "32px", height: "32px" })),
|
|
10601
10603
|
typeof t == "string" ? /* @__PURE__ */ n(
|
|
10602
|
-
|
|
10604
|
+
q,
|
|
10603
10605
|
{
|
|
10604
10606
|
variant: "subtitle1",
|
|
10605
10607
|
noWrap: !0,
|
|
@@ -10614,7 +10616,7 @@ const Mc = function({
|
|
|
10614
10616
|
/* @__PURE__ */ n("div", { className: "flex-grow" }),
|
|
10615
10617
|
r && /* @__PURE__ */ n(me, { children: r }),
|
|
10616
10618
|
l && /* @__PURE__ */ n(
|
|
10617
|
-
|
|
10619
|
+
de,
|
|
10618
10620
|
{
|
|
10619
10621
|
color: "inherit",
|
|
10620
10622
|
"aria-label": "Open drawer",
|
|
@@ -10625,8 +10627,8 @@ const Mc = function({
|
|
|
10625
10627
|
),
|
|
10626
10628
|
/* @__PURE__ */ v(xt, { trigger: y, children: [
|
|
10627
10629
|
b && /* @__PURE__ */ v("div", { className: "px-4 py-2 mb-2", children: [
|
|
10628
|
-
b.displayName && /* @__PURE__ */ n(
|
|
10629
|
-
b.email && /* @__PURE__ */ n(
|
|
10630
|
+
b.displayName && /* @__PURE__ */ n(q, { variant: "body1", color: "secondary", children: b.displayName }),
|
|
10631
|
+
b.email && /* @__PURE__ */ n(q, { variant: "body2", color: "secondary", children: b.email })
|
|
10630
10632
|
] }),
|
|
10631
10633
|
o,
|
|
10632
10634
|
!o && /* @__PURE__ */ v(Re, { onClick: f.signOut, children: [
|
|
@@ -10652,7 +10654,7 @@ function Yo({
|
|
|
10652
10654
|
newDefaultEntry: c,
|
|
10653
10655
|
onValueChange: d
|
|
10654
10656
|
}) {
|
|
10655
|
-
const u = r && Array.isArray(r) && r.length > 0, p =
|
|
10657
|
+
const u = r && Array.isArray(r) && r.length > 0, p = le(zc(r)), [m, f] = R(
|
|
10656
10658
|
u ? Object.values(p.current) : []
|
|
10657
10659
|
);
|
|
10658
10660
|
z(() => {
|
|
@@ -10812,7 +10814,7 @@ function Vc({
|
|
|
10812
10814
|
provided: a,
|
|
10813
10815
|
copy: o
|
|
10814
10816
|
}) {
|
|
10815
|
-
const [s, l] =
|
|
10817
|
+
const [s, l] = R(!1), c = S.useRef(null);
|
|
10816
10818
|
return kn(c, () => l(!1)), /* @__PURE__ */ n(
|
|
10817
10819
|
"div",
|
|
10818
10820
|
{
|
|
@@ -10828,7 +10830,7 @@ function Vc({
|
|
|
10828
10830
|
title: "Drag to move. Click for more options",
|
|
10829
10831
|
children: [
|
|
10830
10832
|
/* @__PURE__ */ n(
|
|
10831
|
-
|
|
10833
|
+
de,
|
|
10832
10834
|
{
|
|
10833
10835
|
size: "small",
|
|
10834
10836
|
disabled: t,
|
|
@@ -11008,7 +11010,7 @@ function om({
|
|
|
11008
11010
|
}
|
|
11009
11011
|
),
|
|
11010
11012
|
/* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ? Yr : r).map((c) => /* @__PURE__ */ n(ke, { title: c, children: /* @__PURE__ */ n(
|
|
11011
|
-
|
|
11013
|
+
de,
|
|
11012
11014
|
{
|
|
11013
11015
|
shape: "square",
|
|
11014
11016
|
toggled: e === c,
|
|
@@ -11023,7 +11025,7 @@ function am({
|
|
|
11023
11025
|
error: e,
|
|
11024
11026
|
children: t
|
|
11025
11027
|
}) {
|
|
11026
|
-
return t ? /* @__PURE__ */ n(
|
|
11028
|
+
return t ? /* @__PURE__ */ n(q, { variant: "caption", color: e ? "error" : "secondary", className: "ml-3.5 mt-0.5", children: t }) : null;
|
|
11027
11029
|
}
|
|
11028
11030
|
function Ci({
|
|
11029
11031
|
name: e,
|
|
@@ -11065,7 +11067,7 @@ function Oe({
|
|
|
11065
11067
|
return null;
|
|
11066
11068
|
if (t && e)
|
|
11067
11069
|
return /* @__PURE__ */ n(
|
|
11068
|
-
|
|
11070
|
+
q,
|
|
11069
11071
|
{
|
|
11070
11072
|
variant: "caption",
|
|
11071
11073
|
className: "ml-3.5 text-red-500 dark:text-red-500",
|
|
@@ -11075,7 +11077,7 @@ function Oe({
|
|
|
11075
11077
|
const s = typeof r.disabled == "object" ? r.disabled.disabledMessage : void 0;
|
|
11076
11078
|
return /* @__PURE__ */ v("div", { className: "flex ml-3.5 mt-1", children: [
|
|
11077
11079
|
/* @__PURE__ */ n(
|
|
11078
|
-
|
|
11080
|
+
q,
|
|
11079
11081
|
{
|
|
11080
11082
|
variant: "caption",
|
|
11081
11083
|
color: a ? "disabled" : "secondary",
|
|
@@ -11089,7 +11091,7 @@ function Oe({
|
|
|
11089
11091
|
title: r.longDescription,
|
|
11090
11092
|
side: "bottom",
|
|
11091
11093
|
children: /* @__PURE__ */ n(
|
|
11092
|
-
|
|
11094
|
+
de,
|
|
11093
11095
|
{
|
|
11094
11096
|
size: "small",
|
|
11095
11097
|
className: "self-start",
|
|
@@ -11169,7 +11171,7 @@ function cn({
|
|
|
11169
11171
|
}
|
|
11170
11172
|
),
|
|
11171
11173
|
endAdornment: c.clearable && /* @__PURE__ */ n(
|
|
11172
|
-
|
|
11174
|
+
de,
|
|
11173
11175
|
{
|
|
11174
11176
|
onClick: p,
|
|
11175
11177
|
children: /* @__PURE__ */ n(Tt, {})
|
|
@@ -11451,7 +11453,7 @@ function Lo({
|
|
|
11451
11453
|
{
|
|
11452
11454
|
title: "Remove",
|
|
11453
11455
|
children: /* @__PURE__ */ n(
|
|
11454
|
-
|
|
11456
|
+
de,
|
|
11455
11457
|
{
|
|
11456
11458
|
size: "small",
|
|
11457
11459
|
onClick: (c) => {
|
|
@@ -11589,14 +11591,14 @@ function Hc({
|
|
|
11589
11591
|
isDragReject: k
|
|
11590
11592
|
} = Pn(
|
|
11591
11593
|
{
|
|
11592
|
-
accept: e.acceptedFiles ? e.acceptedFiles.map((B) => ({ [B]: [] })).reduce((B,
|
|
11594
|
+
accept: e.acceptedFiles ? e.acceptedFiles.map((B) => ({ [B]: [] })).reduce((B, F) => ({ ...B, ...F }), {}) : void 0,
|
|
11593
11595
|
disabled: r || i,
|
|
11594
11596
|
noDragEventsBubbling: !0,
|
|
11595
11597
|
maxSize: e.maxSize,
|
|
11596
11598
|
onDrop: a,
|
|
11597
|
-
onDropRejected: (B,
|
|
11598
|
-
for (const
|
|
11599
|
-
for (const
|
|
11599
|
+
onDropRejected: (B, F) => {
|
|
11600
|
+
for (const I of B)
|
|
11601
|
+
for (const P of I.errors)
|
|
11600
11602
|
y.open({
|
|
11601
11603
|
type: "error",
|
|
11602
11604
|
message: `Error uploading file: File is larger than ${e.maxSize} bytes`
|
|
@@ -11641,9 +11643,9 @@ function Hc({
|
|
|
11641
11643
|
...E()
|
|
11642
11644
|
}
|
|
11643
11645
|
),
|
|
11644
|
-
c.map((B,
|
|
11645
|
-
let
|
|
11646
|
-
return B.storagePathOrDownloadUrl ?
|
|
11646
|
+
c.map((B, F) => {
|
|
11647
|
+
let I;
|
|
11648
|
+
return B.storagePathOrDownloadUrl ? I = /* @__PURE__ */ n(
|
|
11647
11649
|
Lo,
|
|
11648
11650
|
{
|
|
11649
11651
|
collection: t,
|
|
@@ -11655,7 +11657,7 @@ function Hc({
|
|
|
11655
11657
|
onRemove: p,
|
|
11656
11658
|
size: B.size
|
|
11657
11659
|
}
|
|
11658
|
-
) : B.file && (
|
|
11660
|
+
) : B.file && (I = /* @__PURE__ */ n(
|
|
11659
11661
|
Eo,
|
|
11660
11662
|
{
|
|
11661
11663
|
entry: B,
|
|
@@ -11669,19 +11671,19 @@ function Hc({
|
|
|
11669
11671
|
Dn,
|
|
11670
11672
|
{
|
|
11671
11673
|
draggableId: `array_field_${h}_${B.id}`,
|
|
11672
|
-
index:
|
|
11673
|
-
children: (
|
|
11674
|
+
index: F,
|
|
11675
|
+
children: (P, D) => /* @__PURE__ */ n(
|
|
11674
11676
|
"div",
|
|
11675
11677
|
{
|
|
11676
11678
|
tabIndex: -1,
|
|
11677
|
-
ref:
|
|
11678
|
-
...
|
|
11679
|
-
...
|
|
11679
|
+
ref: P.innerRef,
|
|
11680
|
+
...P.draggableProps,
|
|
11681
|
+
...P.dragHandleProps,
|
|
11680
11682
|
className: Z(Ur, "rounded-md"),
|
|
11681
11683
|
style: {
|
|
11682
|
-
...
|
|
11684
|
+
...P.draggableProps.style
|
|
11683
11685
|
},
|
|
11684
|
-
children:
|
|
11686
|
+
children: I
|
|
11685
11687
|
}
|
|
11686
11688
|
)
|
|
11687
11689
|
},
|
|
@@ -11697,7 +11699,7 @@ function Hc({
|
|
|
11697
11699
|
{
|
|
11698
11700
|
className: "flex-grow min-h-[38px] box-border m-2 text-center",
|
|
11699
11701
|
children: /* @__PURE__ */ n(
|
|
11700
|
-
|
|
11702
|
+
q,
|
|
11701
11703
|
{
|
|
11702
11704
|
align: "center",
|
|
11703
11705
|
variant: "label",
|
|
@@ -11739,8 +11741,8 @@ function Zc({
|
|
|
11739
11741
|
return;
|
|
11740
11742
|
const k = [...i], B = k[_];
|
|
11741
11743
|
k.splice(_, 1), k.splice(C, 0, B), a(k);
|
|
11742
|
-
const
|
|
11743
|
-
o(
|
|
11744
|
+
const F = k.filter((I) => !!I.storagePathOrDownloadUrl).map((I) => I.storagePathOrDownloadUrl);
|
|
11745
|
+
o(F);
|
|
11744
11746
|
}, [s, o, a, i]), b = x((_) => {
|
|
11745
11747
|
_.destination && h(_.source.index, _.destination.index);
|
|
11746
11748
|
}, [h]), y = x((_) => {
|
|
@@ -11853,7 +11855,7 @@ function Rt({
|
|
|
11853
11855
|
multiline: g,
|
|
11854
11856
|
disabled: s,
|
|
11855
11857
|
endAdornment: c.clearable && /* @__PURE__ */ n(
|
|
11856
|
-
|
|
11858
|
+
de,
|
|
11857
11859
|
{
|
|
11858
11860
|
onClick: m,
|
|
11859
11861
|
children: /* @__PURE__ */ n(Tt, {})
|
|
@@ -12137,7 +12139,7 @@ const It = S.memo(rd, (e, t) => {
|
|
|
12137
12139
|
if (e.propertyKey !== t.propertyKey)
|
|
12138
12140
|
return !1;
|
|
12139
12141
|
const r = De(e.property) || e.property.fromBuilder, i = De(t.property) || t.property.fromBuilder;
|
|
12140
|
-
return !((r === i ||
|
|
12142
|
+
return !((r === i || $(e.property, t.property)) && e.disabled === t.disabled) || ei(t.property), !1;
|
|
12141
12143
|
});
|
|
12142
12144
|
function rd({
|
|
12143
12145
|
propertyKey: e,
|
|
@@ -12223,10 +12225,10 @@ function id({
|
|
|
12223
12225
|
},
|
|
12224
12226
|
fieldProps: p
|
|
12225
12227
|
}) {
|
|
12226
|
-
const { plugins: m } = pe(), f = r.customProps, g = p.field.value, A = Dt(p.form.errors, t), h = Dt(p.form.touched, t), b = A && (p.form.submitCount > 0 || r.validation?.unique) && (!Array.isArray(A) || !!A.filter((B) => !!B).length), w = nd(d.path, d.collection, t, r, e, m) ?? e, E = p.form.isSubmitting, _ = x((B,
|
|
12227
|
-
p.form.setFieldTouched(t, !0, !1), p.form.setFieldValue(t, B,
|
|
12228
|
-
}, []), C = x((B,
|
|
12229
|
-
p.form.setFieldTouched(t, !0, !1), p.form.setFieldValue(B,
|
|
12228
|
+
const { plugins: m } = pe(), f = r.customProps, g = p.field.value, A = Dt(p.form.errors, t), h = Dt(p.form.touched, t), b = A && (p.form.submitCount > 0 || r.validation?.unique) && (!Array.isArray(A) || !!A.filter((B) => !!B).length), w = nd(d.path, d.collection, t, r, e, m) ?? e, E = p.form.isSubmitting, _ = x((B, F) => {
|
|
12229
|
+
p.form.setFieldTouched(t, !0, !1), p.form.setFieldValue(t, B, F);
|
|
12230
|
+
}, []), C = x((B, F, I) => {
|
|
12231
|
+
p.form.setFieldTouched(t, !0, !1), p.form.setFieldValue(B, F, I);
|
|
12230
12232
|
}, []);
|
|
12231
12233
|
return /* @__PURE__ */ v(me, { children: [
|
|
12232
12234
|
/* @__PURE__ */ n(w, { ...{
|
|
@@ -12250,7 +12252,7 @@ function id({
|
|
|
12250
12252
|
customProps: f,
|
|
12251
12253
|
context: d
|
|
12252
12254
|
} }),
|
|
12253
|
-
a && !E && /* @__PURE__ */ n(
|
|
12255
|
+
a && !E && /* @__PURE__ */ n(q, { variant: "caption", className: "ml-3.5", children: "This value has been updated elsewhere" })
|
|
12254
12256
|
] });
|
|
12255
12257
|
}
|
|
12256
12258
|
const ei = (e, t) => {
|
|
@@ -12260,7 +12262,7 @@ const ei = (e, t) => {
|
|
|
12260
12262
|
return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((a) => ei(a, t)) : r.dataType === "array" && "resolvedProperties" in r ? i || r.resolvedProperties?.some((a) => a && ei(a, t)) : i;
|
|
12261
12263
|
};
|
|
12262
12264
|
function nd(e, t, r, i, a, o) {
|
|
12263
|
-
return
|
|
12265
|
+
return le((() => {
|
|
12264
12266
|
let l = null;
|
|
12265
12267
|
return o && o.forEach((c) => {
|
|
12266
12268
|
const d = qo(i);
|
|
@@ -12588,7 +12590,7 @@ function sd({
|
|
|
12588
12590
|
) : A === "array" ? /* @__PURE__ */ n(
|
|
12589
12591
|
"div",
|
|
12590
12592
|
{
|
|
12591
|
-
className: Z(
|
|
12593
|
+
className: Z(Se, "ml-2 pl-2 border-l border-solid"),
|
|
12592
12594
|
children: /* @__PURE__ */ n(
|
|
12593
12595
|
Yo,
|
|
12594
12596
|
{
|
|
@@ -12627,7 +12629,7 @@ function sd({
|
|
|
12627
12629
|
) : A === "map" ? /* @__PURE__ */ n(
|
|
12628
12630
|
"div",
|
|
12629
12631
|
{
|
|
12630
|
-
className: Z(
|
|
12632
|
+
className: Z(Se, "ml-2 pl-2 border-l border-solid"),
|
|
12631
12633
|
children: /* @__PURE__ */ n(
|
|
12632
12634
|
Bi,
|
|
12633
12635
|
{
|
|
@@ -12643,7 +12645,7 @@ function sd({
|
|
|
12643
12645
|
)
|
|
12644
12646
|
}
|
|
12645
12647
|
) : /* @__PURE__ */ n(
|
|
12646
|
-
|
|
12648
|
+
q,
|
|
12647
12649
|
{
|
|
12648
12650
|
variant: "caption",
|
|
12649
12651
|
children: `Data type ${A} not supported yet`
|
|
@@ -12655,7 +12657,7 @@ function sd({
|
|
|
12655
12657
|
}
|
|
12656
12658
|
return /* @__PURE__ */ v(G, { children: [
|
|
12657
12659
|
/* @__PURE__ */ v(
|
|
12658
|
-
|
|
12660
|
+
q,
|
|
12659
12661
|
{
|
|
12660
12662
|
component: "div",
|
|
12661
12663
|
className: "font-mono flex flex-row gap-1",
|
|
@@ -12677,7 +12679,7 @@ function sd({
|
|
|
12677
12679
|
xt,
|
|
12678
12680
|
{
|
|
12679
12681
|
trigger: /* @__PURE__ */ n(
|
|
12680
|
-
|
|
12682
|
+
de,
|
|
12681
12683
|
{
|
|
12682
12684
|
size: "small",
|
|
12683
12685
|
className: "h-7 w-7",
|
|
@@ -12737,7 +12739,7 @@ function sd({
|
|
|
12737
12739
|
}
|
|
12738
12740
|
),
|
|
12739
12741
|
/* @__PURE__ */ n(
|
|
12740
|
-
|
|
12742
|
+
de,
|
|
12741
12743
|
{
|
|
12742
12744
|
"aria-label": "delete",
|
|
12743
12745
|
size: "small",
|
|
@@ -12759,7 +12761,7 @@ function ld({
|
|
|
12759
12761
|
value: r,
|
|
12760
12762
|
setValue: i
|
|
12761
12763
|
}) {
|
|
12762
|
-
const { locale: a } = pe(), [o, s] =
|
|
12764
|
+
const { locale: a } = pe(), [o, s] = R(ti(r) ?? "string");
|
|
12763
12765
|
function l(d) {
|
|
12764
12766
|
s(d);
|
|
12765
12767
|
}
|
|
@@ -12798,7 +12800,7 @@ function ld({
|
|
|
12798
12800
|
i(p);
|
|
12799
12801
|
}
|
|
12800
12802
|
}
|
|
12801
|
-
) : u === "array" ? /* @__PURE__ */ n(
|
|
12803
|
+
) : u === "array" ? /* @__PURE__ */ n(q, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: Z(Se, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
|
|
12802
12804
|
Bi,
|
|
12803
12805
|
{
|
|
12804
12806
|
value: d,
|
|
@@ -12807,7 +12809,7 @@ function ld({
|
|
|
12807
12809
|
}
|
|
12808
12810
|
}
|
|
12809
12811
|
) }) : /* @__PURE__ */ n(
|
|
12810
|
-
|
|
12812
|
+
q,
|
|
12811
12813
|
{
|
|
12812
12814
|
variant: "caption",
|
|
12813
12815
|
children: `Data type ${u} not supported yet`
|
|
@@ -12816,7 +12818,7 @@ function ld({
|
|
|
12816
12818
|
}
|
|
12817
12819
|
return /* @__PURE__ */ v(G, { children: [
|
|
12818
12820
|
/* @__PURE__ */ v(
|
|
12819
|
-
|
|
12821
|
+
q,
|
|
12820
12822
|
{
|
|
12821
12823
|
component: "div",
|
|
12822
12824
|
className: "font-mono flex min-h-12 flex-row gap-1 items-center",
|
|
@@ -12826,7 +12828,7 @@ function ld({
|
|
|
12826
12828
|
xt,
|
|
12827
12829
|
{
|
|
12828
12830
|
trigger: /* @__PURE__ */ n(
|
|
12829
|
-
|
|
12831
|
+
de,
|
|
12830
12832
|
{
|
|
12831
12833
|
size: "small",
|
|
12832
12834
|
className: "h-7 w-7",
|
|
@@ -12924,7 +12926,7 @@ function cd({
|
|
|
12924
12926
|
throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");
|
|
12925
12927
|
if (!c.resolvedProperties || !Array.isArray(c.resolvedProperties))
|
|
12926
12928
|
throw Error("RepeatFieldBinding - Internal error: Expected array in 'property.resolvedProperties'");
|
|
12927
|
-
const f = c.expanded === void 0 ? !0 : c.expanded, g = c.of, [A, h] =
|
|
12929
|
+
const f = c.expanded === void 0 ? !0 : c.expanded, g = c.of, [A, h] = R();
|
|
12928
12930
|
Ue({
|
|
12929
12931
|
property: c,
|
|
12930
12932
|
value: t,
|
|
@@ -13012,7 +13014,7 @@ function dd({
|
|
|
13012
13014
|
value: t,
|
|
13013
13015
|
setValue: o
|
|
13014
13016
|
});
|
|
13015
|
-
const [g, A] =
|
|
13017
|
+
const [g, A] = R(), h = x((E, _) => /* @__PURE__ */ n(
|
|
13016
13018
|
ud,
|
|
13017
13019
|
{
|
|
13018
13020
|
name: `${e}.${E}`,
|
|
@@ -13083,7 +13085,7 @@ function ud({
|
|
|
13083
13085
|
autoFocus: s,
|
|
13084
13086
|
context: l
|
|
13085
13087
|
}) {
|
|
13086
|
-
const c = r && r[i], [d, u] =
|
|
13088
|
+
const c = r && r[i], [d, u] = R(c ?? void 0), p = ri();
|
|
13087
13089
|
z(() => {
|
|
13088
13090
|
c || b(Object.keys(o)[0]);
|
|
13089
13091
|
}, []), z(() => {
|
|
@@ -13116,7 +13118,7 @@ function ud({
|
|
|
13116
13118
|
{
|
|
13117
13119
|
className: "mb-2",
|
|
13118
13120
|
placeholder: /* @__PURE__ */ n(
|
|
13119
|
-
|
|
13121
|
+
q,
|
|
13120
13122
|
{
|
|
13121
13123
|
variant: "caption",
|
|
13122
13124
|
className: "px-4 py-2 font-medium",
|
|
@@ -13184,7 +13186,7 @@ function pd({
|
|
|
13184
13186
|
includeDescription: u,
|
|
13185
13187
|
context: p
|
|
13186
13188
|
}) {
|
|
13187
|
-
const [m, f] = S.useState(t), g =
|
|
13189
|
+
const [m, f] = S.useState(t), g = le(t);
|
|
13188
13190
|
Pa("MarkdownFieldBinding", fd);
|
|
13189
13191
|
const A = na({
|
|
13190
13192
|
internalValue: m,
|
|
@@ -13196,7 +13198,7 @@ function pd({
|
|
|
13196
13198
|
A.internalValue !== g.current && r(A.internalValue);
|
|
13197
13199
|
}, [A]), /* @__PURE__ */ v(G, { children: [
|
|
13198
13200
|
!d && /* @__PURE__ */ n(
|
|
13199
|
-
|
|
13201
|
+
q,
|
|
13200
13202
|
{
|
|
13201
13203
|
variant: "caption",
|
|
13202
13204
|
className: "flex-grow",
|
|
@@ -13949,7 +13951,7 @@ function bd({
|
|
|
13949
13951
|
value: (o && r === "existing" ? o.id : t) ?? "",
|
|
13950
13952
|
endAdornment: s ? /* @__PURE__ */ n(Et, { size: "small" }) : o ? /* @__PURE__ */ v(G, { children: [
|
|
13951
13953
|
/* @__PURE__ */ n(ke, { title: "Copy", children: /* @__PURE__ */ n(
|
|
13952
|
-
|
|
13954
|
+
de,
|
|
13953
13955
|
{
|
|
13954
13956
|
onClick: (A) => m(o.id),
|
|
13955
13957
|
"aria-label": "copy-id",
|
|
@@ -13957,7 +13959,7 @@ function bd({
|
|
|
13957
13959
|
}
|
|
13958
13960
|
) }),
|
|
13959
13961
|
f?.entityLinkBuilder && /* @__PURE__ */ n(ke, { title: "Open in the console", children: /* @__PURE__ */ n(
|
|
13960
|
-
|
|
13962
|
+
de,
|
|
13961
13963
|
{
|
|
13962
13964
|
component: "a",
|
|
13963
13965
|
href: f.entityLinkBuilder({ entity: o }),
|
|
@@ -14013,7 +14015,7 @@ function bd({
|
|
|
14013
14015
|
}
|
|
14014
14016
|
),
|
|
14015
14017
|
l.id && /* @__PURE__ */ n(
|
|
14016
|
-
|
|
14018
|
+
q,
|
|
14017
14019
|
{
|
|
14018
14020
|
variant: "caption",
|
|
14019
14021
|
className: "ml-3.5 text-red-500 dark:text-red-500",
|
|
@@ -14023,11 +14025,11 @@ function bd({
|
|
|
14023
14025
|
] });
|
|
14024
14026
|
}
|
|
14025
14027
|
function yd({ propertyId: e }) {
|
|
14026
|
-
const [t, r] =
|
|
14028
|
+
const [t, r] = R(!1);
|
|
14027
14029
|
return /* @__PURE__ */ v("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
|
|
14028
14030
|
/* @__PURE__ */ v("div", { children: [
|
|
14029
14031
|
/* @__PURE__ */ n(
|
|
14030
|
-
|
|
14032
|
+
q,
|
|
14031
14033
|
{
|
|
14032
14034
|
variant: "caption",
|
|
14033
14035
|
className: "min-w-20 text-slate-400",
|
|
@@ -14035,9 +14037,9 @@ function yd({ propertyId: e }) {
|
|
|
14035
14037
|
children: t ? "Copied" : "Property ID"
|
|
14036
14038
|
}
|
|
14037
14039
|
),
|
|
14038
|
-
/* @__PURE__ */ n(
|
|
14040
|
+
/* @__PURE__ */ n(q, { variant: "caption", className: "text-white", children: /* @__PURE__ */ n("code", { children: e }) })
|
|
14039
14041
|
] }),
|
|
14040
|
-
/* @__PURE__ */ n(
|
|
14042
|
+
/* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(
|
|
14041
14043
|
pr,
|
|
14042
14044
|
{
|
|
14043
14045
|
size: "smallest",
|
|
@@ -14076,16 +14078,16 @@ function vd({
|
|
|
14076
14078
|
autoSave: p,
|
|
14077
14079
|
onIdUpdateError: m
|
|
14078
14080
|
}) {
|
|
14079
|
-
const f = St(), g = pe(), A =
|
|
14081
|
+
const f = St(), g = pe(), A = Ie(), h = Xe(r), b = g.plugins, y = he(() => je({
|
|
14080
14082
|
collection: r,
|
|
14081
14083
|
path: t,
|
|
14082
14084
|
values: i?.values,
|
|
14083
14085
|
fields: g.propertyConfigs
|
|
14084
|
-
}), [i?.values, t, g.propertyConfigs]), w = (e === "new" || e === "copy") && !!y.customId && y.customId !== "optional", E = he(() => e === "new" || e === "copy" ? w ? void 0 : h.generateEntityId(t) : i?.id, []), _ =
|
|
14085
|
-
collection:
|
|
14086
|
+
}), [i?.values, t, g.propertyConfigs]), w = (e === "new" || e === "copy") && !!y.customId && y.customId !== "optional", E = he(() => e === "new" || e === "copy" ? w ? void 0 : h.generateEntityId(t) : i?.id, []), _ = le(!1), C = le(mn(y, e, i)), [k, B] = S.useState(E), [F, I] = S.useState(!1), [P, D] = S.useState(), [Y, ne] = S.useState(!1), [ie, H] = R(i?.values ?? C.current), U = (ae) => a({
|
|
14087
|
+
collection: se,
|
|
14086
14088
|
path: t,
|
|
14087
14089
|
entityId: k,
|
|
14088
|
-
values:
|
|
14090
|
+
values: ae,
|
|
14089
14091
|
previousValues: i?.values,
|
|
14090
14092
|
closeAfterSave: _.current,
|
|
14091
14093
|
autoSave: p ?? !1
|
|
@@ -14096,12 +14098,12 @@ function vd({
|
|
|
14096
14098
|
console.error(M), D(M);
|
|
14097
14099
|
}).finally(() => {
|
|
14098
14100
|
_.current = !1;
|
|
14099
|
-
}),
|
|
14101
|
+
}), O = (ae, M) => {
|
|
14100
14102
|
if (w && !k) {
|
|
14101
|
-
console.error("Missing custom Id"),
|
|
14103
|
+
console.error("Missing custom Id"), I(!0), M.setSubmitting(!1);
|
|
14102
14104
|
return;
|
|
14103
14105
|
}
|
|
14104
|
-
if (D(void 0),
|
|
14106
|
+
if (D(void 0), I(!1), e === "existing") {
|
|
14105
14107
|
if (!i?.id)
|
|
14106
14108
|
throw Error("Form misconfiguration when saving, no id for existing entity");
|
|
14107
14109
|
} else if (e === "new" || e === "copy") {
|
|
@@ -14109,19 +14111,19 @@ function vd({
|
|
|
14109
14111
|
throw Error("Form misconfiguration when saving, entityId should be set");
|
|
14110
14112
|
} else
|
|
14111
14113
|
throw Error("New FormType added, check EntityForm");
|
|
14112
|
-
return
|
|
14114
|
+
return U(ae)?.then((ue) => {
|
|
14113
14115
|
M.resetForm({
|
|
14114
|
-
values:
|
|
14116
|
+
values: ae,
|
|
14115
14117
|
submitCount: 0,
|
|
14116
14118
|
touched: {}
|
|
14117
14119
|
});
|
|
14118
14120
|
}).finally(() => {
|
|
14119
14121
|
M.setSubmitting(!1);
|
|
14120
14122
|
});
|
|
14121
|
-
},
|
|
14123
|
+
}, K = pn({
|
|
14122
14124
|
initialValues: C.current,
|
|
14123
|
-
onSubmit:
|
|
14124
|
-
validation: (
|
|
14125
|
+
onSubmit: O,
|
|
14126
|
+
validation: (ae) => j?.validate(ae, { abortEarly: !1 }).then(() => ({})).catch((M) => {
|
|
14125
14127
|
const ue = {};
|
|
14126
14128
|
return M.inner.forEach((ve) => {
|
|
14127
14129
|
ue[ve.path] = ve.message;
|
|
@@ -14130,84 +14132,84 @@ function vd({
|
|
|
14130
14132
|
});
|
|
14131
14133
|
z(() => {
|
|
14132
14134
|
C.current = mn(y, e, i);
|
|
14133
|
-
const
|
|
14134
|
-
!
|
|
14135
|
-
Object.entries(
|
|
14135
|
+
const ae = K.initialValues;
|
|
14136
|
+
!K.isSubmitting && ae && e === "existing" ? te(
|
|
14137
|
+
Object.entries(se.properties).map(([M, ue]) => {
|
|
14136
14138
|
if (br(ue))
|
|
14137
14139
|
return {};
|
|
14138
|
-
const ve =
|
|
14139
|
-
return
|
|
14140
|
+
const ve = ae[M], we = C.current[M];
|
|
14141
|
+
return $(ve, we) ? {} : { [M]: we };
|
|
14140
14142
|
}).reduce((M, ue) => ({ ...M, ...ue }), {})
|
|
14141
|
-
) :
|
|
14143
|
+
) : te({});
|
|
14142
14144
|
}, [i, y, e]);
|
|
14143
|
-
const
|
|
14144
|
-
const M =
|
|
14145
|
-
H(
|
|
14145
|
+
const ee = (ae) => {
|
|
14146
|
+
const M = K.initialValues;
|
|
14147
|
+
H(ae), l && l(ae), p && ae && !$(ae, M) && U(ae);
|
|
14146
14148
|
};
|
|
14147
14149
|
z(() => {
|
|
14148
14150
|
k && c && c(k);
|
|
14149
14151
|
}, [k, c]);
|
|
14150
|
-
const
|
|
14152
|
+
const se = je({
|
|
14151
14153
|
collection: r,
|
|
14152
14154
|
path: t,
|
|
14153
14155
|
entityId: k,
|
|
14154
|
-
values:
|
|
14155
|
-
previousValues:
|
|
14156
|
+
values: ie,
|
|
14157
|
+
previousValues: K.initialValues,
|
|
14156
14158
|
fields: g.propertyConfigs
|
|
14157
|
-
}),
|
|
14158
|
-
if (
|
|
14159
|
-
|
|
14159
|
+
}), ce = Zn(se, g.propertyConfigs), W = ie && ce ? ot(ie, ce) : void 0, re = r.callbacks?.onIdUpdate, T = x(async () => {
|
|
14160
|
+
if (re && ie && (e === "new" || e === "copy")) {
|
|
14161
|
+
ne(!0);
|
|
14160
14162
|
try {
|
|
14161
|
-
const
|
|
14162
|
-
collection:
|
|
14163
|
+
const ae = await re({
|
|
14164
|
+
collection: se,
|
|
14163
14165
|
path: t,
|
|
14164
14166
|
entityId: k,
|
|
14165
|
-
values:
|
|
14167
|
+
values: ie,
|
|
14166
14168
|
context: A
|
|
14167
14169
|
});
|
|
14168
|
-
B(
|
|
14169
|
-
} catch (
|
|
14170
|
-
m && m(
|
|
14170
|
+
B(ae);
|
|
14171
|
+
} catch (ae) {
|
|
14172
|
+
m && m(ae), console.error(ae);
|
|
14171
14173
|
}
|
|
14172
|
-
|
|
14174
|
+
ne(!1);
|
|
14173
14175
|
}
|
|
14174
|
-
}, [k,
|
|
14176
|
+
}, [k, ie, e]);
|
|
14175
14177
|
z(() => {
|
|
14176
14178
|
T();
|
|
14177
14179
|
}, [T]);
|
|
14178
|
-
const [
|
|
14180
|
+
const [oe, te] = R({}), J = x(
|
|
14179
14181
|
({
|
|
14180
|
-
name:
|
|
14182
|
+
name: ae,
|
|
14181
14183
|
value: M,
|
|
14182
14184
|
property: ue
|
|
14183
|
-
}) => h.checkUniqueField(t,
|
|
14185
|
+
}) => h.checkUniqueField(t, ae, M, k),
|
|
14184
14186
|
[h, t, k]
|
|
14185
|
-
),
|
|
14187
|
+
), j = he(
|
|
14186
14188
|
() => k ? Bo(
|
|
14187
14189
|
k,
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
+
se.properties,
|
|
14191
|
+
J
|
|
14190
14192
|
) : void 0,
|
|
14191
|
-
[k,
|
|
14192
|
-
),
|
|
14193
|
-
entity:
|
|
14193
|
+
[k, se.properties, J]
|
|
14194
|
+
), V = mt(), N = x(({
|
|
14195
|
+
entity: ae,
|
|
14194
14196
|
customEntityActions: M
|
|
14195
14197
|
}) => {
|
|
14196
|
-
const ue = zt(r,
|
|
14198
|
+
const ue = zt(r, V, t, null), ve = ae ? wi(r, V, t, ae) : !0, we = [];
|
|
14197
14199
|
return ue && we.push(Mo), ve && we.push(zo), M && we.push(...M), we;
|
|
14198
|
-
}, [
|
|
14200
|
+
}, [V, r, t]), Q = [], Ae = {
|
|
14199
14201
|
// @ts-ignore
|
|
14200
|
-
setFieldValue: x(
|
|
14201
|
-
values:
|
|
14202
|
-
collection:
|
|
14202
|
+
setFieldValue: x(K.setFieldValue, []),
|
|
14203
|
+
values: K.values,
|
|
14204
|
+
collection: se,
|
|
14203
14205
|
entityId: k,
|
|
14204
14206
|
path: t,
|
|
14205
|
-
save:
|
|
14206
|
-
},
|
|
14207
|
+
save: U
|
|
14208
|
+
}, Be = le(null);
|
|
14207
14209
|
if (z(() => {
|
|
14208
|
-
d && !xd(
|
|
14210
|
+
d && !xd(Be.current ?? void 0, Ae) && (d(Ae), Be.current = Ae);
|
|
14209
14211
|
}, [Ae, d]), b && r) {
|
|
14210
|
-
const
|
|
14212
|
+
const ae = {
|
|
14211
14213
|
entityId: k,
|
|
14212
14214
|
path: t,
|
|
14213
14215
|
status: e,
|
|
@@ -14216,34 +14218,34 @@ function vd({
|
|
|
14216
14218
|
currentEntityId: k,
|
|
14217
14219
|
formContext: Ae
|
|
14218
14220
|
};
|
|
14219
|
-
|
|
14221
|
+
Q.push(...b.map((M, ue) => M.form?.Actions ? /* @__PURE__ */ n(
|
|
14220
14222
|
M.form.Actions,
|
|
14221
14223
|
{
|
|
14222
|
-
...
|
|
14224
|
+
...ae
|
|
14223
14225
|
},
|
|
14224
14226
|
`actions_${M.key}`
|
|
14225
14227
|
) : null).filter(Boolean));
|
|
14226
14228
|
}
|
|
14227
|
-
return /* @__PURE__ */ n(fn, { value:
|
|
14228
|
-
|
|
14229
|
+
return /* @__PURE__ */ n(fn, { value: K, children: /* @__PURE__ */ v("div", { className: "h-full overflow-auto", children: [
|
|
14230
|
+
Q.length > 0 && /* @__PURE__ */ n(
|
|
14229
14231
|
"div",
|
|
14230
14232
|
{
|
|
14231
14233
|
className: Z("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),
|
|
14232
|
-
children:
|
|
14234
|
+
children: Q
|
|
14233
14235
|
}
|
|
14234
14236
|
),
|
|
14235
14237
|
/* @__PURE__ */ v("div", { className: "pt-12 pb-16 pl-8 pr-8 md:pl-10 md:pr-10", children: [
|
|
14236
14238
|
/* @__PURE__ */ v(
|
|
14237
14239
|
"div",
|
|
14238
14240
|
{
|
|
14239
|
-
className: `w-full py-2 flex flex-col items-start mt-${4 + (
|
|
14241
|
+
className: `w-full py-2 flex flex-col items-start mt-${4 + (Q ? 8 : 0)} lg:mt-${8 + (Q ? 8 : 0)} mb-8`,
|
|
14240
14242
|
children: [
|
|
14241
14243
|
/* @__PURE__ */ n(
|
|
14242
|
-
|
|
14244
|
+
q,
|
|
14243
14245
|
{
|
|
14244
14246
|
className: "mt-4 flex-grow line-clamp-1 " + r.hideIdFromForm ? "mb-2" : "mb-0",
|
|
14245
14247
|
variant: "h4",
|
|
14246
|
-
children:
|
|
14248
|
+
children: W ?? r.singularName ?? r.name
|
|
14247
14249
|
}
|
|
14248
14250
|
),
|
|
14249
14251
|
/* @__PURE__ */ n(Qa, { color: "base", className: "w-full", size: "small", children: /* @__PURE__ */ v("code", { className: "text-xs select-all", children: [
|
|
@@ -14261,28 +14263,28 @@ function vd({
|
|
|
14261
14263
|
entityId: k,
|
|
14262
14264
|
status: e,
|
|
14263
14265
|
onChange: B,
|
|
14264
|
-
error:
|
|
14265
|
-
loading:
|
|
14266
|
+
error: F,
|
|
14267
|
+
loading: Y,
|
|
14266
14268
|
entity: i
|
|
14267
14269
|
}
|
|
14268
14270
|
),
|
|
14269
14271
|
k && /* @__PURE__ */ n(
|
|
14270
14272
|
kd,
|
|
14271
14273
|
{
|
|
14272
|
-
...
|
|
14273
|
-
initialValues:
|
|
14274
|
+
...K,
|
|
14275
|
+
initialValues: K.initialValues,
|
|
14274
14276
|
onModified: s,
|
|
14275
14277
|
onDiscard: o,
|
|
14276
|
-
onValuesChanged:
|
|
14277
|
-
underlyingChanges:
|
|
14278
|
+
onValuesChanged: ee,
|
|
14279
|
+
underlyingChanges: oe,
|
|
14278
14280
|
entity: i,
|
|
14279
|
-
resolvedCollection:
|
|
14281
|
+
resolvedCollection: se,
|
|
14280
14282
|
formContext: Ae,
|
|
14281
14283
|
status: e,
|
|
14282
|
-
savingError:
|
|
14284
|
+
savingError: P,
|
|
14283
14285
|
closeAfterSaveRef: _,
|
|
14284
14286
|
autoSave: p,
|
|
14285
|
-
entityActions:
|
|
14287
|
+
entityActions: N({
|
|
14286
14288
|
entity: i,
|
|
14287
14289
|
customEntityActions: r.entityActions
|
|
14288
14290
|
})
|
|
@@ -14312,28 +14314,28 @@ function kd(e) {
|
|
|
14312
14314
|
closeAfterSaveRef: b,
|
|
14313
14315
|
autoSave: y,
|
|
14314
14316
|
entityActions: w
|
|
14315
|
-
} = e, E =
|
|
14317
|
+
} = e, E = Ie(), _ = w.filter((P) => P.includeInForm === void 0 || P.includeInForm), C = pt(), k = h;
|
|
14316
14318
|
z(() => {
|
|
14317
14319
|
i && i(k), a && a(t);
|
|
14318
14320
|
}, [k, t]), z(() => {
|
|
14319
|
-
!y && !p && o && l && Object.entries(o).forEach(([
|
|
14320
|
-
const
|
|
14321
|
-
|
|
14321
|
+
!y && !p && o && l && Object.entries(o).forEach(([P, D]) => {
|
|
14322
|
+
const Y = t[P];
|
|
14323
|
+
!$(D, Y) && !c[P] && (console.debug("Updated value from the datasource:", P, D), d(P, D !== void 0 ? D : null));
|
|
14322
14324
|
});
|
|
14323
14325
|
}, [p, y, o, l, t, c, d]);
|
|
14324
|
-
const B = /* @__PURE__ */ n("div", { className: "flex flex-col gap-8", children: (u.propertiesOrder ?? Object.keys(u.properties)).map((
|
|
14325
|
-
const D = u.properties[
|
|
14326
|
+
const B = /* @__PURE__ */ n("div", { className: "flex flex-col gap-8", children: (u.propertiesOrder ?? Object.keys(u.properties)).map((P) => {
|
|
14327
|
+
const D = u.properties[P];
|
|
14326
14328
|
if (!D)
|
|
14327
|
-
return console.warn(`Property ${
|
|
14328
|
-
const
|
|
14329
|
+
return console.warn(`Property ${P} not found in collection ${u.name}`), null;
|
|
14330
|
+
const Y = !!o && Object.keys(o).includes(P) && !!c[P], ne = !y && p || qt(D) || !!D.disabled;
|
|
14329
14331
|
if (br(D))
|
|
14330
14332
|
return null;
|
|
14331
14333
|
const H = {
|
|
14332
|
-
propertyKey:
|
|
14333
|
-
disabled:
|
|
14334
|
+
propertyKey: P,
|
|
14335
|
+
disabled: ne,
|
|
14334
14336
|
property: D,
|
|
14335
14337
|
includeDescription: D.description || D.longDescription,
|
|
14336
|
-
underlyingValueHasChanged:
|
|
14338
|
+
underlyingValueHasChanged: Y && !y,
|
|
14337
14339
|
context: s,
|
|
14338
14340
|
tableMode: !1,
|
|
14339
14341
|
partOfArray: !1,
|
|
@@ -14343,11 +14345,11 @@ function kd(e) {
|
|
|
14343
14345
|
return /* @__PURE__ */ n(
|
|
14344
14346
|
"div",
|
|
14345
14347
|
{
|
|
14346
|
-
id: `form_field_${
|
|
14348
|
+
id: `form_field_${P}`,
|
|
14347
14349
|
children: /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
|
|
14348
14350
|
ke,
|
|
14349
14351
|
{
|
|
14350
|
-
title: /* @__PURE__ */ n(yd, { propertyId:
|
|
14352
|
+
title: /* @__PURE__ */ n(yd, { propertyId: P }),
|
|
14351
14353
|
delayDuration: 800,
|
|
14352
14354
|
side: "left",
|
|
14353
14355
|
align: "start",
|
|
@@ -14356,9 +14358,9 @@ function kd(e) {
|
|
|
14356
14358
|
}
|
|
14357
14359
|
) })
|
|
14358
14360
|
},
|
|
14359
|
-
`field_${u.name}_${
|
|
14361
|
+
`field_${u.name}_${P}`
|
|
14360
14362
|
);
|
|
14361
|
-
}).filter(Boolean) }),
|
|
14363
|
+
}).filter(Boolean) }), F = p || !k && m === "existing", I = S.useRef(null);
|
|
14362
14364
|
return /* @__PURE__ */ v(
|
|
14363
14365
|
"form",
|
|
14364
14366
|
{
|
|
@@ -14370,22 +14372,22 @@ function kd(e) {
|
|
|
14370
14372
|
"div",
|
|
14371
14373
|
{
|
|
14372
14374
|
className: "mt-12",
|
|
14373
|
-
ref:
|
|
14375
|
+
ref: I,
|
|
14374
14376
|
children: [
|
|
14375
14377
|
B,
|
|
14376
|
-
/* @__PURE__ */ n(gd, { containerRef:
|
|
14378
|
+
/* @__PURE__ */ n(gd, { containerRef: I })
|
|
14377
14379
|
]
|
|
14378
14380
|
}
|
|
14379
14381
|
),
|
|
14380
14382
|
/* @__PURE__ */ n("div", { className: "h-14" }),
|
|
14381
14383
|
!y && /* @__PURE__ */ v(Ct, { position: "absolute", children: [
|
|
14382
|
-
A && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n(
|
|
14383
|
-
l && _.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: _.map((
|
|
14384
|
-
|
|
14384
|
+
A && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n(q, { color: "error", children: A.message }) }),
|
|
14385
|
+
l && _.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: _.map((P) => /* @__PURE__ */ n(
|
|
14386
|
+
de,
|
|
14385
14387
|
{
|
|
14386
14388
|
color: "primary",
|
|
14387
14389
|
onClick: (D) => {
|
|
14388
|
-
D.stopPropagation(), l &&
|
|
14390
|
+
D.stopPropagation(), l && P.onClick({
|
|
14389
14391
|
entity: l,
|
|
14390
14392
|
fullPath: u.path,
|
|
14391
14393
|
collection: u,
|
|
@@ -14393,16 +14395,16 @@ function kd(e) {
|
|
|
14393
14395
|
sideEntityController: C
|
|
14394
14396
|
});
|
|
14395
14397
|
},
|
|
14396
|
-
children:
|
|
14398
|
+
children: P.icon
|
|
14397
14399
|
},
|
|
14398
|
-
|
|
14400
|
+
P.name
|
|
14399
14401
|
)) }),
|
|
14400
14402
|
p && /* @__PURE__ */ n(Et, { size: "small" }),
|
|
14401
14403
|
/* @__PURE__ */ n(
|
|
14402
14404
|
ge,
|
|
14403
14405
|
{
|
|
14404
14406
|
variant: "text",
|
|
14405
|
-
disabled:
|
|
14407
|
+
disabled: F || p,
|
|
14406
14408
|
type: "reset",
|
|
14407
14409
|
children: m === "existing" ? "Discard" : "Clear"
|
|
14408
14410
|
}
|
|
@@ -14413,7 +14415,7 @@ function kd(e) {
|
|
|
14413
14415
|
variant: "text",
|
|
14414
14416
|
color: "primary",
|
|
14415
14417
|
type: "submit",
|
|
14416
|
-
disabled:
|
|
14418
|
+
disabled: F || p,
|
|
14417
14419
|
onClick: () => {
|
|
14418
14420
|
b.current = !1;
|
|
14419
14421
|
},
|
|
@@ -14430,7 +14432,7 @@ function kd(e) {
|
|
|
14430
14432
|
variant: "filled",
|
|
14431
14433
|
color: "primary",
|
|
14432
14434
|
type: "submit",
|
|
14433
|
-
disabled:
|
|
14435
|
+
disabled: F || p,
|
|
14434
14436
|
onClick: () => {
|
|
14435
14437
|
b.current = !0;
|
|
14436
14438
|
},
|
|
@@ -14457,7 +14459,7 @@ function _d(e) {
|
|
|
14457
14459
|
return t;
|
|
14458
14460
|
}
|
|
14459
14461
|
function xd(e, t) {
|
|
14460
|
-
return e?.path === t?.path && e?.entityId === t?.entityId &&
|
|
14462
|
+
return e?.path === t?.path && e?.entityId === t?.entityId && $(e?.values, t?.values) && $(e?.collection, t?.collection);
|
|
14461
14463
|
}
|
|
14462
14464
|
function Ed(e) {
|
|
14463
14465
|
return Object.keys(Si).includes(e);
|
|
@@ -15056,71 +15058,71 @@ function Id({
|
|
|
15056
15058
|
onClose: d
|
|
15057
15059
|
}) {
|
|
15058
15060
|
a.customId && a.formAutoSave && console.warn(`The collection ${a.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);
|
|
15059
|
-
const [u, p] =
|
|
15061
|
+
const [u, p] = R(!1), [m, f] = R(void 0);
|
|
15060
15062
|
yi(m, () => {
|
|
15061
|
-
m &&
|
|
15062
|
-
entityId:
|
|
15063
|
+
m && N({
|
|
15064
|
+
entityId: W?.id,
|
|
15063
15065
|
collection: a,
|
|
15064
15066
|
path: e,
|
|
15065
15067
|
values: m,
|
|
15066
15068
|
closeAfterSave: !1
|
|
15067
15069
|
});
|
|
15068
15070
|
}, !1, 2e3);
|
|
15069
|
-
const g = Xe(a), A = Fi(), h = pt(), b = ft(), y = pe(), w =
|
|
15071
|
+
const g = Xe(a), A = Fi(), h = pt(), b = ft(), y = pe(), w = Ie(), E = mt(), [_, C] = R(void 0), [k, B] = R(i ? "copy" : t ? "existing" : "new"), F = le(void 0), I = F.current, P = (a.subcollections ?? []).filter((L) => !L.hideFromNavigation), D = P?.length ?? 0, Y = a.entityViews, ne = Y?.length ?? 0, ie = a.formAutoSave && !a.customId, H = ne > 0 || D > 0, U = r ?? qn(
|
|
15070
15072
|
a ? a.defaultSelectedView : void 0,
|
|
15071
15073
|
{
|
|
15072
15074
|
status: k,
|
|
15073
15075
|
entityId: t
|
|
15074
15076
|
}
|
|
15075
|
-
),
|
|
15076
|
-
entity:
|
|
15077
|
-
dataLoading:
|
|
15077
|
+
), O = le(U ?? Zt), K = O.current === Zt, {
|
|
15078
|
+
entity: ee,
|
|
15079
|
+
dataLoading: se,
|
|
15078
15080
|
// eslint-disable-next-line no-unused-vars
|
|
15079
|
-
dataLoadingError:
|
|
15081
|
+
dataLoadingError: ce
|
|
15080
15082
|
} = co({
|
|
15081
15083
|
path: e,
|
|
15082
15084
|
entityId: t,
|
|
15083
15085
|
collection: a,
|
|
15084
15086
|
useCache: !1
|
|
15085
|
-
}), [
|
|
15087
|
+
}), [W, re] = R(ee), [T, oe] = R(void 0);
|
|
15086
15088
|
z(() => {
|
|
15087
|
-
|
|
15088
|
-
}, [
|
|
15089
|
+
ee && re(ee);
|
|
15090
|
+
}, [ee]), z(() => {
|
|
15089
15091
|
if (k === "new")
|
|
15090
|
-
|
|
15092
|
+
oe(!1);
|
|
15091
15093
|
else {
|
|
15092
|
-
const
|
|
15093
|
-
|
|
15094
|
+
const L = W ? Hn(a, E, e, W ?? null) : !1;
|
|
15095
|
+
W && oe(!L);
|
|
15094
15096
|
}
|
|
15095
|
-
}, [E,
|
|
15096
|
-
const
|
|
15097
|
+
}, [E, W, k]);
|
|
15098
|
+
const te = x((L) => {
|
|
15097
15099
|
p(!1), b.open({
|
|
15098
15100
|
type: "error",
|
|
15099
|
-
message: "Error before saving: " +
|
|
15100
|
-
}), console.error(
|
|
15101
|
-
}, [b]),
|
|
15101
|
+
message: "Error before saving: " + L?.message
|
|
15102
|
+
}), console.error(L);
|
|
15103
|
+
}, [b]), J = x((L) => {
|
|
15102
15104
|
p(!1), b.open({
|
|
15103
15105
|
type: "error",
|
|
15104
|
-
message: "Error after saving (entity is saved): " +
|
|
15105
|
-
}), console.error(
|
|
15106
|
-
}, [b]),
|
|
15107
|
-
p(!1),
|
|
15106
|
+
message: "Error after saving (entity is saved): " + L?.message
|
|
15107
|
+
}), console.error(L);
|
|
15108
|
+
}, [b]), j = (L, Pe) => {
|
|
15109
|
+
p(!1), ie || b.open({
|
|
15108
15110
|
type: "success",
|
|
15109
15111
|
message: `${a.singularName ?? a.name}: Saved correctly`
|
|
15110
|
-
}),
|
|
15112
|
+
}), re(L), B("existing"), s(!1), c && c({ entity: L }), Pe ? (console.log("Closing side dialog"), A.setBlocked(!1), A.close(!0), d?.()) : k !== "existing" && h.replace({
|
|
15111
15113
|
path: e,
|
|
15112
|
-
entityId:
|
|
15113
|
-
selectedSubPath:
|
|
15114
|
+
entityId: L.id,
|
|
15115
|
+
selectedSubPath: O.current,
|
|
15114
15116
|
updateUrl: !0,
|
|
15115
15117
|
collection: a
|
|
15116
15118
|
});
|
|
15117
|
-
},
|
|
15119
|
+
}, V = x((L) => {
|
|
15118
15120
|
p(!1), b.open({
|
|
15119
15121
|
type: "error",
|
|
15120
|
-
message: "Error saving: " +
|
|
15121
|
-
}), console.error("Error saving entity", e, t), console.error(
|
|
15122
|
-
}, [t, e, b]),
|
|
15123
|
-
values:
|
|
15122
|
+
message: "Error saving: " + L?.message
|
|
15123
|
+
}), console.error("Error saving entity", e, t), console.error(L);
|
|
15124
|
+
}, [t, e, b]), N = ({
|
|
15125
|
+
values: L,
|
|
15124
15126
|
previousValues: Pe,
|
|
15125
15127
|
closeAfterSave: Qe,
|
|
15126
15128
|
entityId: et,
|
|
@@ -15129,18 +15131,18 @@ function Id({
|
|
|
15129
15131
|
}) => (p(!0), uo({
|
|
15130
15132
|
path: Ft,
|
|
15131
15133
|
entityId: et,
|
|
15132
|
-
values:
|
|
15134
|
+
values: L,
|
|
15133
15135
|
previousValues: Pe,
|
|
15134
15136
|
collection: Nt,
|
|
15135
15137
|
status: k,
|
|
15136
15138
|
dataSource: g,
|
|
15137
15139
|
context: w,
|
|
15138
|
-
onSaveSuccess: (Pt) =>
|
|
15139
|
-
onSaveFailure:
|
|
15140
|
-
onPreSaveHookError:
|
|
15141
|
-
onSaveSuccessHookError:
|
|
15142
|
-
}).then()),
|
|
15143
|
-
collection:
|
|
15140
|
+
onSaveSuccess: (Pt) => j(Pt, Qe),
|
|
15141
|
+
onSaveFailure: V,
|
|
15142
|
+
onPreSaveHookError: te,
|
|
15143
|
+
onSaveSuccessHookError: J
|
|
15144
|
+
}).then()), Q = async ({
|
|
15145
|
+
collection: L,
|
|
15144
15146
|
path: Pe,
|
|
15145
15147
|
entityId: Qe,
|
|
15146
15148
|
values: et,
|
|
@@ -15152,24 +15154,24 @@ function Id({
|
|
|
15152
15154
|
if (Pt)
|
|
15153
15155
|
f(et);
|
|
15154
15156
|
else
|
|
15155
|
-
return
|
|
15156
|
-
collection:
|
|
15157
|
+
return N({
|
|
15158
|
+
collection: L,
|
|
15157
15159
|
path: Pe,
|
|
15158
15160
|
entityId: Qe,
|
|
15159
15161
|
values: et,
|
|
15160
15162
|
previousValues: Nt,
|
|
15161
15163
|
closeAfterSave: Ft
|
|
15162
15164
|
});
|
|
15163
|
-
}, Ae =
|
|
15164
|
-
(
|
|
15165
|
-
if (!
|
|
15165
|
+
}, Ae = Y ? Y.map((L) => Ho(L, y.entityViews)).filter(Boolean) : [], Be = Y && Ae.map(
|
|
15166
|
+
(L, Pe) => {
|
|
15167
|
+
if (!L || O.current !== L.key)
|
|
15166
15168
|
return null;
|
|
15167
|
-
const Qe =
|
|
15169
|
+
const Qe = L.Builder;
|
|
15168
15170
|
return Qe ? /* @__PURE__ */ n(
|
|
15169
15171
|
"div",
|
|
15170
15172
|
{
|
|
15171
15173
|
className: Z(
|
|
15172
|
-
|
|
15174
|
+
Se,
|
|
15173
15175
|
"relative flex-grow w-full h-full overflow-auto "
|
|
15174
15176
|
),
|
|
15175
15177
|
role: "tabpanel",
|
|
@@ -15177,38 +15179,38 @@ function Id({
|
|
|
15177
15179
|
Qe,
|
|
15178
15180
|
{
|
|
15179
15181
|
collection: a,
|
|
15180
|
-
entity:
|
|
15181
|
-
modifiedValues:
|
|
15182
|
+
entity: W,
|
|
15183
|
+
modifiedValues: I ?? W?.values,
|
|
15182
15184
|
formContext: _
|
|
15183
15185
|
}
|
|
15184
15186
|
) })
|
|
15185
15187
|
},
|
|
15186
|
-
`custom_view_${
|
|
15188
|
+
`custom_view_${L.key}`
|
|
15187
15189
|
) : (console.error("customView.Builder is not defined"), null);
|
|
15188
15190
|
}
|
|
15189
|
-
).filter(Boolean),
|
|
15190
|
-
(
|
|
15191
|
-
const Qe =
|
|
15192
|
-
return
|
|
15191
|
+
).filter(Boolean), ae = se && !W || (!W || T === void 0) && (k === "existing" || k === "copy"), M = ae || u, ue = P && P.map(
|
|
15192
|
+
(L, Pe) => {
|
|
15193
|
+
const Qe = L.id ?? L.path, et = W ? `${e}/${W?.id}/${Ee(Qe)}` : void 0;
|
|
15194
|
+
return O.current !== Qe ? null : /* @__PURE__ */ v(
|
|
15193
15195
|
"div",
|
|
15194
15196
|
{
|
|
15195
15197
|
className: "relative flex-grow h-full overflow-auto w-full",
|
|
15196
15198
|
role: "tabpanel",
|
|
15197
15199
|
children: [
|
|
15198
15200
|
M && /* @__PURE__ */ n(Kr, {}),
|
|
15199
|
-
!
|
|
15201
|
+
!ae && (W && et ? /* @__PURE__ */ n(
|
|
15200
15202
|
Vo,
|
|
15201
15203
|
{
|
|
15202
15204
|
fullPath: et,
|
|
15203
15205
|
parentCollectionIds: [...o, a.id],
|
|
15204
15206
|
isSubCollection: !0,
|
|
15205
|
-
...
|
|
15207
|
+
...L
|
|
15206
15208
|
}
|
|
15207
15209
|
) : /* @__PURE__ */ n(
|
|
15208
15210
|
"div",
|
|
15209
15211
|
{
|
|
15210
15212
|
className: "flex items-center justify-center w-full h-full p-3",
|
|
15211
|
-
children: /* @__PURE__ */ n(
|
|
15213
|
+
children: /* @__PURE__ */ n(q, { variant: "label", children: "You need to save your entity before adding additional collections" })
|
|
15212
15214
|
}
|
|
15213
15215
|
))
|
|
15214
15216
|
]
|
|
@@ -15218,50 +15220,50 @@ function Id({
|
|
|
15218
15220
|
}
|
|
15219
15221
|
).filter(Boolean), ve = x(() => {
|
|
15220
15222
|
s(!1);
|
|
15221
|
-
}, []), we = (
|
|
15222
|
-
|
|
15223
|
+
}, []), we = (L) => {
|
|
15224
|
+
O.current = L, h.replace({
|
|
15223
15225
|
path: e,
|
|
15224
15226
|
entityId: t,
|
|
15225
|
-
selectedSubPath:
|
|
15227
|
+
selectedSubPath: L === Zt ? void 0 : L,
|
|
15226
15228
|
updateUrl: !0,
|
|
15227
15229
|
collection: a
|
|
15228
15230
|
});
|
|
15229
|
-
}, xe = x((
|
|
15230
|
-
|
|
15231
|
-
}, []), We = x((
|
|
15231
|
+
}, xe = x((L) => {
|
|
15232
|
+
F.current = L;
|
|
15233
|
+
}, []), We = x((L) => {
|
|
15232
15234
|
b.open({
|
|
15233
15235
|
type: "error",
|
|
15234
15236
|
message: "Error updating id, check the console"
|
|
15235
15237
|
});
|
|
15236
|
-
}, []), Je = x((
|
|
15237
|
-
|
|
15238
|
+
}, []), Je = x((L) => {
|
|
15239
|
+
re((Pe) => Pe ? {
|
|
15238
15240
|
...Pe,
|
|
15239
|
-
id:
|
|
15241
|
+
id: L
|
|
15240
15242
|
} : void 0);
|
|
15241
|
-
}, []), He = (
|
|
15242
|
-
|
|
15243
|
+
}, []), He = (L) => {
|
|
15244
|
+
ie || s(L);
|
|
15243
15245
|
};
|
|
15244
15246
|
function Ke() {
|
|
15245
|
-
const
|
|
15247
|
+
const L = y.plugins;
|
|
15246
15248
|
let Pe = /* @__PURE__ */ n(
|
|
15247
15249
|
wd,
|
|
15248
15250
|
{
|
|
15249
15251
|
status: k,
|
|
15250
15252
|
path: e,
|
|
15251
15253
|
collection: a,
|
|
15252
|
-
onEntitySaveRequested:
|
|
15254
|
+
onEntitySaveRequested: Q,
|
|
15253
15255
|
onDiscard: ve,
|
|
15254
15256
|
onValuesChanged: xe,
|
|
15255
15257
|
onModified: He,
|
|
15256
|
-
entity:
|
|
15258
|
+
entity: W,
|
|
15257
15259
|
onIdChange: Je,
|
|
15258
15260
|
onFormContextChange: C,
|
|
15259
15261
|
hideId: a.hideIdFromForm,
|
|
15260
|
-
autoSave:
|
|
15262
|
+
autoSave: ie,
|
|
15261
15263
|
onIdUpdateError: We
|
|
15262
15264
|
}
|
|
15263
15265
|
);
|
|
15264
|
-
return
|
|
15266
|
+
return L && L.forEach((Qe) => {
|
|
15265
15267
|
Qe.form?.provider && (Pe = /* @__PURE__ */ n(
|
|
15266
15268
|
Qe.form.provider.Component,
|
|
15267
15269
|
{
|
|
@@ -15271,7 +15273,7 @@ function Id({
|
|
|
15271
15273
|
onDiscard: ve,
|
|
15272
15274
|
onValuesChanged: xe,
|
|
15273
15275
|
onModified: He,
|
|
15274
|
-
entity:
|
|
15276
|
+
entity: W,
|
|
15275
15277
|
context: w,
|
|
15276
15278
|
formContext: _,
|
|
15277
15279
|
...Qe.form.provider.props,
|
|
@@ -15282,7 +15284,7 @@ function Id({
|
|
|
15282
15284
|
}
|
|
15283
15285
|
const st = T === void 0 ? /* @__PURE__ */ n(G, {}) : T ? /* @__PURE__ */ v(G, { children: [
|
|
15284
15286
|
/* @__PURE__ */ n(
|
|
15285
|
-
|
|
15287
|
+
q,
|
|
15286
15288
|
{
|
|
15287
15289
|
className: "mt-16 mb-8 mx-8",
|
|
15288
15290
|
variant: "h4",
|
|
@@ -15293,30 +15295,30 @@ function Id({
|
|
|
15293
15295
|
ko,
|
|
15294
15296
|
{
|
|
15295
15297
|
className: "px-12",
|
|
15296
|
-
entity:
|
|
15298
|
+
entity: W,
|
|
15297
15299
|
path: e,
|
|
15298
15300
|
collection: a
|
|
15299
15301
|
}
|
|
15300
15302
|
)
|
|
15301
|
-
] }) : Ke(), Er =
|
|
15302
|
-
(
|
|
15303
|
+
] }) : Ke(), Er = P && P.map(
|
|
15304
|
+
(L) => /* @__PURE__ */ n(
|
|
15303
15305
|
Ir,
|
|
15304
15306
|
{
|
|
15305
15307
|
className: "text-sm min-w-[140px]",
|
|
15306
|
-
value:
|
|
15307
|
-
children:
|
|
15308
|
+
value: L.id,
|
|
15309
|
+
children: L.name
|
|
15308
15310
|
},
|
|
15309
|
-
`entity_detail_collection_tab_${
|
|
15311
|
+
`entity_detail_collection_tab_${L.name}`
|
|
15310
15312
|
)
|
|
15311
15313
|
), Cr = Ae.map(
|
|
15312
|
-
(
|
|
15314
|
+
(L) => /* @__PURE__ */ n(
|
|
15313
15315
|
Ir,
|
|
15314
15316
|
{
|
|
15315
15317
|
className: "text-sm min-w-[140px]",
|
|
15316
|
-
value:
|
|
15317
|
-
children:
|
|
15318
|
+
value: L.key,
|
|
15319
|
+
children: L.name
|
|
15318
15320
|
},
|
|
15319
|
-
`entity_detail_collection_tab_${
|
|
15321
|
+
`entity_detail_collection_tab_${L.name}`
|
|
15320
15322
|
)
|
|
15321
15323
|
);
|
|
15322
15324
|
return /* @__PURE__ */ n(
|
|
@@ -15327,14 +15329,14 @@ function Id({
|
|
|
15327
15329
|
/* @__PURE__ */ v(
|
|
15328
15330
|
"div",
|
|
15329
15331
|
{
|
|
15330
|
-
className: Z(
|
|
15332
|
+
className: Z(Se, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
|
|
15331
15333
|
children: [
|
|
15332
15334
|
/* @__PURE__ */ n(
|
|
15333
15335
|
"div",
|
|
15334
15336
|
{
|
|
15335
15337
|
className: "pb-1 self-center",
|
|
15336
15338
|
children: /* @__PURE__ */ n(
|
|
15337
|
-
|
|
15339
|
+
de,
|
|
15338
15340
|
{
|
|
15339
15341
|
onClick: () => (d?.(), A.close(!1)),
|
|
15340
15342
|
size: "large",
|
|
@@ -15344,7 +15346,7 @@ function Id({
|
|
|
15344
15346
|
}
|
|
15345
15347
|
),
|
|
15346
15348
|
/* @__PURE__ */ n("div", { className: "flex-grow" }),
|
|
15347
|
-
|
|
15349
|
+
ae && /* @__PURE__ */ n(
|
|
15348
15350
|
"div",
|
|
15349
15351
|
{
|
|
15350
15352
|
className: "self-center",
|
|
@@ -15354,9 +15356,9 @@ function Id({
|
|
|
15354
15356
|
/* @__PURE__ */ v(
|
|
15355
15357
|
Ja,
|
|
15356
15358
|
{
|
|
15357
|
-
value:
|
|
15358
|
-
onValueChange: (
|
|
15359
|
-
we(
|
|
15359
|
+
value: O.current,
|
|
15360
|
+
onValueChange: (L) => {
|
|
15361
|
+
we(L);
|
|
15360
15362
|
},
|
|
15361
15363
|
className: "pl-4 pr-4 pt-0",
|
|
15362
15364
|
children: [
|
|
@@ -15393,13 +15395,13 @@ function Id({
|
|
|
15393
15395
|
"div",
|
|
15394
15396
|
{
|
|
15395
15397
|
role: "tabpanel",
|
|
15396
|
-
hidden: !
|
|
15398
|
+
hidden: !K,
|
|
15397
15399
|
id: `form_${e}`,
|
|
15398
15400
|
className: " w-full",
|
|
15399
|
-
children:
|
|
15401
|
+
children: ae ? /* @__PURE__ */ n(Kr, {}) : st
|
|
15400
15402
|
}
|
|
15401
15403
|
),
|
|
15402
|
-
|
|
15404
|
+
Be,
|
|
15403
15405
|
ue
|
|
15404
15406
|
]
|
|
15405
15407
|
}
|
|
@@ -15460,9 +15462,9 @@ function Fd({
|
|
|
15460
15462
|
onOpenChange: (o) => o ? r() : t(),
|
|
15461
15463
|
children: [
|
|
15462
15464
|
/* @__PURE__ */ v(mi, { children: [
|
|
15463
|
-
/* @__PURE__ */ n(
|
|
15465
|
+
/* @__PURE__ */ n(q, { variant: "h6", children: a }),
|
|
15464
15466
|
i,
|
|
15465
|
-
/* @__PURE__ */ n(
|
|
15467
|
+
/* @__PURE__ */ n(q, { children: "Are you sure you want to leave this page?" })
|
|
15466
15468
|
] }),
|
|
15467
15469
|
/* @__PURE__ */ v(Ct, { children: [
|
|
15468
15470
|
/* @__PURE__ */ n(ge, { variant: "text", onClick: r, autoFocus: !0, children: " Cancel " }),
|
|
@@ -15497,7 +15499,7 @@ function Pd({
|
|
|
15497
15499
|
offsetPosition: e,
|
|
15498
15500
|
panel: t
|
|
15499
15501
|
}) {
|
|
15500
|
-
const [r, i] =
|
|
15502
|
+
const [r, i] = R(!1), [a, o] = R(!1), [s, l] = R(), c = S.useRef(t?.width), d = c.current, u = vr(), {
|
|
15501
15503
|
navigationWasBlocked: p,
|
|
15502
15504
|
handleOk: m,
|
|
15503
15505
|
handleCancel: f
|
|
@@ -15632,7 +15634,7 @@ function or(e, t = 0) {
|
|
|
15632
15634
|
return e.dataType === "array" && e.oneOf ? t + 3 : e.dataType === "array" && e.of ? Array.isArray(e.of) ? Math.max(...e.of.map((r) => or(r, t + 1))) : or(e.of, t + 1) : t + 1;
|
|
15633
15635
|
}
|
|
15634
15636
|
const Td = (e, t) => {
|
|
15635
|
-
const r = Ar(), i =
|
|
15637
|
+
const r = Ar(), i = le(!1), a = !qe();
|
|
15636
15638
|
z(() => {
|
|
15637
15639
|
if (!e.loading && !i.current) {
|
|
15638
15640
|
if (console.debug("Initialising side entity controller"), e.isUrlCollectionPath(r.pathname)) {
|
|
@@ -15724,12 +15726,12 @@ const Xt = (e, t, r, i) => {
|
|
|
15724
15726
|
};
|
|
15725
15727
|
};
|
|
15726
15728
|
function Md() {
|
|
15727
|
-
const e = Ar(), t = $t(), [r, i] =
|
|
15729
|
+
const e = Ar(), t = $t(), [r, i] = R([]), a = le(r), o = le({}), s = le(0), l = (p) => {
|
|
15728
15730
|
a.current = p, i(p);
|
|
15729
15731
|
};
|
|
15730
15732
|
z(() => {
|
|
15731
15733
|
const f = (e.state?.panels ?? []).map((g) => o.current[g]).filter((g) => !!g);
|
|
15732
|
-
|
|
15734
|
+
$(a.current.map((g) => g.key), f.map((g) => g.key)) || l(f);
|
|
15733
15735
|
}, [e]);
|
|
15734
15736
|
const c = x(() => {
|
|
15735
15737
|
if (r.length === 0)
|
|
@@ -16025,7 +16027,7 @@ async function Gd(e, t) {
|
|
|
16025
16027
|
).then(async (i) => i.json());
|
|
16026
16028
|
}
|
|
16027
16029
|
function jd(e, t) {
|
|
16028
|
-
const [r, i] =
|
|
16030
|
+
const [r, i] = R(null), a = le(null), o = t?.map((s) => s.key);
|
|
16029
16031
|
return z(() => {
|
|
16030
16032
|
e.user && e.user.uid !== a.current && !e.initialLoading && (Gd(e, o).then(i), a.current = e.user.uid);
|
|
16031
16033
|
}, [e, o]), r;
|
|
@@ -16076,8 +16078,8 @@ function cm(e) {
|
|
|
16076
16078
|
error: s.authError
|
|
16077
16079
|
}
|
|
16078
16080
|
) }) : C?.blocked ? /* @__PURE__ */ v(er, { maxWidth: "md", fullScreen: !0, children: [
|
|
16079
|
-
/* @__PURE__ */ n(
|
|
16080
|
-
/* @__PURE__ */ v(
|
|
16081
|
+
/* @__PURE__ */ n(q, { variant: "h4", children: "Access blocked" }),
|
|
16082
|
+
/* @__PURE__ */ v(q, { children: [
|
|
16081
16083
|
"This app has been blocked. Please reach out at ",
|
|
16082
16084
|
/* @__PURE__ */ n(
|
|
16083
16085
|
"a",
|
|
@@ -16088,7 +16090,7 @@ function cm(e) {
|
|
|
16088
16090
|
),
|
|
16089
16091
|
" for more information."
|
|
16090
16092
|
] }),
|
|
16091
|
-
C?.message && /* @__PURE__ */ v(
|
|
16093
|
+
C?.message && /* @__PURE__ */ v(q, { children: [
|
|
16092
16094
|
"Response from the server: ",
|
|
16093
16095
|
C?.message
|
|
16094
16096
|
] })
|
|
@@ -16146,7 +16148,7 @@ function Yd({
|
|
|
16146
16148
|
loading: e,
|
|
16147
16149
|
children: t
|
|
16148
16150
|
}) {
|
|
16149
|
-
const r =
|
|
16151
|
+
const r = Ie(), i = pe();
|
|
16150
16152
|
let a = t({
|
|
16151
16153
|
context: r,
|
|
16152
16154
|
loading: e
|
|
@@ -16237,7 +16239,7 @@ function Ud() {
|
|
|
16237
16239
|
{
|
|
16238
16240
|
className: "pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",
|
|
16239
16241
|
children: /* @__PURE__ */ n(
|
|
16240
|
-
|
|
16242
|
+
q,
|
|
16241
16243
|
{
|
|
16242
16244
|
variant: "caption",
|
|
16243
16245
|
color: "secondary",
|
|
@@ -16278,7 +16280,7 @@ function Ud() {
|
|
|
16278
16280
|
open: c,
|
|
16279
16281
|
onOpenChange: d,
|
|
16280
16282
|
trigger: /* @__PURE__ */ v(
|
|
16281
|
-
|
|
16283
|
+
de,
|
|
16282
16284
|
{
|
|
16283
16285
|
shape: "square",
|
|
16284
16286
|
className: "m-4 text-gray-900 dark:text-white w-fit",
|
|
@@ -16404,7 +16406,7 @@ const dm = S.memo(
|
|
|
16404
16406
|
/* @__PURE__ */ n(
|
|
16405
16407
|
"div",
|
|
16406
16408
|
{
|
|
16407
|
-
className: Z(
|
|
16409
|
+
className: Z(Se, "flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),
|
|
16408
16410
|
children: /* @__PURE__ */ n(me, { children: r })
|
|
16409
16411
|
}
|
|
16410
16412
|
)
|
|
@@ -16415,7 +16417,7 @@ const dm = S.memo(
|
|
|
16415
16417
|
}
|
|
16416
16418
|
) });
|
|
16417
16419
|
},
|
|
16418
|
-
|
|
16420
|
+
$
|
|
16419
16421
|
), Wd = () => /* @__PURE__ */ n("div", { className: "flex flex-col min-h-[68px]" });
|
|
16420
16422
|
function Jd(e) {
|
|
16421
16423
|
const t = _e(), r = e.displayed ? e.open ? $d : 72 : 0, i = /* @__PURE__ */ v(
|
|
@@ -16435,7 +16437,7 @@ function Jd(e) {
|
|
|
16435
16437
|
sideOffset: 12,
|
|
16436
16438
|
className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",
|
|
16437
16439
|
children: /* @__PURE__ */ n(
|
|
16438
|
-
|
|
16440
|
+
de,
|
|
16439
16441
|
{
|
|
16440
16442
|
color: "inherit",
|
|
16441
16443
|
"aria-label": "Open menu",
|
|
@@ -16506,7 +16508,7 @@ function Jd(e) {
|
|
|
16506
16508
|
{
|
|
16507
16509
|
className: `absolute right-0 top-4 ${e.open ? "opacity-100" : "opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,
|
|
16508
16510
|
children: /* @__PURE__ */ n(
|
|
16509
|
-
|
|
16511
|
+
de,
|
|
16510
16512
|
{
|
|
16511
16513
|
"aria-label": "Close drawer",
|
|
16512
16514
|
onClick: () => e.setDrawerOpen(!1),
|
|
@@ -16519,7 +16521,7 @@ function Jd(e) {
|
|
|
16519
16521
|
}
|
|
16520
16522
|
) : e.displayed ? /* @__PURE__ */ v(G, { children: [
|
|
16521
16523
|
/* @__PURE__ */ n(
|
|
16522
|
-
|
|
16524
|
+
de,
|
|
16523
16525
|
{
|
|
16524
16526
|
color: "inherit",
|
|
16525
16527
|
"aria-label": "Open drawer",
|
|
@@ -16831,7 +16833,7 @@ export {
|
|
|
16831
16833
|
Rs as useDialogsController,
|
|
16832
16834
|
qd as useDrawer,
|
|
16833
16835
|
co as useEntityFetch,
|
|
16834
|
-
|
|
16836
|
+
Ie as useFireCMSContext,
|
|
16835
16837
|
qe as useLargeLayout,
|
|
16836
16838
|
Os as useModeController,
|
|
16837
16839
|
_e as useNavigationController,
|