@firecms/core 3.0.0-alpha.63 → 3.0.0-alpha.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +288 -289
- 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 +3 -3
- package/src/core/Scaffold.tsx +5 -8
- package/src/index.ts +0 -2
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as E, Fragment as G } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import Q, { useState as P, useEffect as V, useContext as Ye, useCallback as w, useMemo as oe, useRef as de, createContext as ri, createElement as Oo, createRef as Go, forwardRef as Vo, useLayoutEffect as
|
|
2
|
+
import * as Dn from "react";
|
|
3
|
+
import Q, { useState as P, useEffect as V, useContext as Ye, useCallback as w, useMemo as oe, useRef as de, createContext as ri, createElement as Oo, createRef as Go, forwardRef as Vo, useLayoutEffect as Rn, useDeferredValue as Yo } from "react";
|
|
4
4
|
import { SnackbarProvider as zo, useSnackbar as Uo } from "notistack";
|
|
5
5
|
import wr from "object-hash";
|
|
6
|
-
import { getIn as
|
|
7
|
-
import { CHIP_COLORS as
|
|
8
|
-
|
|
9
|
-
import { useNavigate as mn, useLocation as jt, Link as Kn, UNSAFE_NavigationContext as Dl, NavLink as Rl, Route as Zt, Routes as Pl } from "react-router-dom";
|
|
6
|
+
import { getIn as Pn, Field as $o, FastField as ii, useFormikContext as oi, ErrorMessage as jo, Formik as li, Form as si, setIn as Lo } from "formik";
|
|
7
|
+
import { CHIP_COLORS as Mn, CircleIcon as ai, FunctionsIcon as _o, iconKeys as Wo, Icon as ci, coolIconKeys as Er, Tooltip as ye, ErrorIcon as Ai, Typography as J, IconButton as se, ContentCopyIcon as en, OpenInNewIcon as cn, DescriptionIcon as Jo, Skeleton as Ve, Chip as Wn, cn as Z, defaultBorderMixin as Ce, KeyboardTabIcon as Jn, Checkbox as di, Markdown as An, TextareaAutosize as Ho, MultiSelect as ui, MultiSelectItem as fi, Select as Ke, SelectItem as et, BooleanSwitch as qo, DateTimeField as zt, paperMixin as dn, ErrorOutlineIcon as Zo, EditIcon as Xo, Button as ce, useOutsideAlerter as Ko, RemoveCircleIcon as el, CircularProgress as un, Badge as Br, ArrowUpwardIcon as yn, Popover as Hn, FilterListIcon as tl, AssignmentIcon as nl, Menu as Ut, MoreVertIcon as mi, MenuItem as Ne, FilterListOffIcon as rl, SearchBar as gi, TextField as At, ClearIcon as Mt, BooleanSwitchWithLabel as $t, Dialog as qn, DialogContent as Zn, DialogActions as xt, AddIcon as dt, DeleteIcon as Tn, InfoIcon as il, CloseIcon as hi, ExpandablePanel as ft, RemoveIcon as tn, fieldBackgroundMixin as pi, fieldBackgroundDisabledMixin as vi, fieldBackgroundHoverMixin as Xn, focusedMixin as xr, Collapse as bi, ArrowDropDownIcon as yi, useInjectStyles as ol, FileCopyIcon as ll, SearchIcon as sl, Card as al, StarIcon as wi, StarBorderIcon as Ei, ArrowForwardIcon as cl, Container as Al, LoadingButton as dl, Avatar as Cr, DarkModeIcon as ul, LightModeIcon as fl, LogoutIcon as ml, Tab as wn, Tabs as gl, Sheet as Bi, CenteredView as kr, MenuIcon as Ir, ChevronLeftIcon as hl, ShortTextIcon as pl, SubjectIcon as vl, FormatQuoteIcon as bl, HttpIcon as yl, EmailIcon as wl, ListIcon as El, ListAltIcon as Bl, NumbersIcon as xl, FormatListNumberedIcon as Sr, UploadFileIcon as Cl, DriveFolderUploadIcon as kl, LinkIcon as Il, AddLinkIcon as Sl, FlagIcon as Nl, ScheduleIcon as Fl, BallotIcon as Nr, RepeatIcon as Fr, ViewStreamIcon as Ql } from "@firecms/ui";
|
|
8
|
+
import { useNavigate as fn, useLocation as jt, Link as Kn, UNSAFE_NavigationContext as Dl, NavLink as Rl, Route as Zt, Routes as Pl } from "react-router-dom";
|
|
10
9
|
import ue from "react-fast-compare";
|
|
11
10
|
import { format as Ml } from "date-fns";
|
|
12
11
|
import * as xi from "date-fns/locale";
|
|
@@ -16,7 +15,7 @@ import { DragDropContext as Ci, Droppable as ki, Draggable as Ii } from "@hello-
|
|
|
16
15
|
import { useDropzone as Si } from "react-dropzone";
|
|
17
16
|
import Ol from "react-image-file-resizer";
|
|
18
17
|
import Gl from "markdown-it";
|
|
19
|
-
import Xt, { Plugins as
|
|
18
|
+
import Xt, { Plugins as En } from "react-markdown-editor-lite";
|
|
20
19
|
import * as Re from "yup";
|
|
21
20
|
import { registerLocale as Vl, setDefaultLocale as Yl } from "react-datepicker";
|
|
22
21
|
import * as zl from "js-search";
|
|
@@ -138,13 +137,13 @@ const _l = (e, ...t) => ({
|
|
|
138
137
|
[r]: e[r]
|
|
139
138
|
}), {})
|
|
140
139
|
});
|
|
141
|
-
function
|
|
140
|
+
function Bn(e) {
|
|
142
141
|
return e && typeof e == "object" && !Array.isArray(e);
|
|
143
142
|
}
|
|
144
143
|
function Le(e, t) {
|
|
145
|
-
const n =
|
|
146
|
-
return n &&
|
|
147
|
-
|
|
144
|
+
const n = Bn(e), r = n ? { ...e } : e;
|
|
145
|
+
return n && Bn(t) && Object.keys(t).forEach((o) => {
|
|
146
|
+
Bn(t[o]) ? o in e ? r[o] = Le(e[o], t[o]) : Object.assign(r, { [o]: t[o] }) : Object.assign(r, { [o]: t[o] });
|
|
148
147
|
}), r;
|
|
149
148
|
}
|
|
150
149
|
function ut(e, t) {
|
|
@@ -215,7 +214,7 @@ const Tt = "type", nn = "value";
|
|
|
215
214
|
function Lt(e) {
|
|
216
215
|
return e.readOnly || e.dataType === "date" && e.autoValue ? !0 : e.dataType === "reference" ? !e.path : !1;
|
|
217
216
|
}
|
|
218
|
-
function
|
|
217
|
+
function mn(e) {
|
|
219
218
|
return typeof e.disabled == "object" && !!e.disabled.hidden;
|
|
220
219
|
}
|
|
221
220
|
function Me(e) {
|
|
@@ -268,20 +267,20 @@ function st(e) {
|
|
|
268
267
|
}
|
|
269
268
|
function Ri(e, t, n) {
|
|
270
269
|
const r = Object.entries(t).map(([l, s]) => {
|
|
271
|
-
const a = e && e[l], c =
|
|
270
|
+
const a = e && e[l], c = On(a, s, n);
|
|
272
271
|
if (c !== void 0)
|
|
273
272
|
return { [l]: c };
|
|
274
273
|
}).reduce((l, s) => ({ ...l, ...s }), {}), o = { ...e, ...r };
|
|
275
274
|
if (Object.keys(o).length !== 0)
|
|
276
275
|
return o;
|
|
277
276
|
}
|
|
278
|
-
function
|
|
277
|
+
function On(e, t, n) {
|
|
279
278
|
let r;
|
|
280
279
|
if (t.dataType === "map" && t.properties)
|
|
281
280
|
r = Ri(e, t.properties, n);
|
|
282
281
|
else if (t.dataType === "array")
|
|
283
282
|
if (t.of && Array.isArray(e))
|
|
284
|
-
r = e.map((o) =>
|
|
283
|
+
r = e.map((o) => On(o, t.of, n));
|
|
285
284
|
else if (t.oneOf && Array.isArray(e)) {
|
|
286
285
|
const o = t.oneOf?.typeField ?? Tt, l = t.oneOf?.valueField ?? nn;
|
|
287
286
|
r = e.map((s) => {
|
|
@@ -292,7 +291,7 @@ function Gn(e, t, n) {
|
|
|
292
291
|
const a = s[o], c = t.oneOf?.properties[a];
|
|
293
292
|
return !a || !c ? s : {
|
|
294
293
|
[o]: a,
|
|
295
|
-
[l]:
|
|
294
|
+
[l]: On(s[l], c, n)
|
|
296
295
|
};
|
|
297
296
|
});
|
|
298
297
|
} else
|
|
@@ -308,8 +307,8 @@ function Pi(e) {
|
|
|
308
307
|
return Math.abs(t);
|
|
309
308
|
}
|
|
310
309
|
function Mi(e) {
|
|
311
|
-
const t = Pi(e), n = Object.keys(
|
|
312
|
-
return
|
|
310
|
+
const t = Pi(e), n = Object.keys(Mn), r = t % n.length;
|
|
311
|
+
return Mn[n[r]];
|
|
313
312
|
}
|
|
314
313
|
function mt(e) {
|
|
315
314
|
return Array.isArray(e) ? e : Object.entries(e).map(([t, n]) => typeof n == "string" ? {
|
|
@@ -330,7 +329,7 @@ function Hl(e, t) {
|
|
|
330
329
|
return Mi(t.toString());
|
|
331
330
|
if (typeof n == "object" && "color" in n) {
|
|
332
331
|
if (typeof n.color == "string")
|
|
333
|
-
return
|
|
332
|
+
return Mn[n.color];
|
|
334
333
|
if (typeof n.color == "object")
|
|
335
334
|
return n.color;
|
|
336
335
|
}
|
|
@@ -352,7 +351,7 @@ const Ge = ({
|
|
|
352
351
|
fields: s
|
|
353
352
|
}) => {
|
|
354
353
|
const a = l?.getCollectionConfig(t), c = ut(a, "properties"), A = rn(e.properties), u = r ?? A, m = o ?? r ?? A, f = Object.entries(e.properties).map(([h, p]) => {
|
|
355
|
-
const b = u ?
|
|
354
|
+
const b = u ? Pn(u, h) : void 0, v = Te({
|
|
356
355
|
propertyKey: h,
|
|
357
356
|
propertyOrBuilder: p,
|
|
358
357
|
values: u,
|
|
@@ -648,7 +647,7 @@ function Ot(e = 5) {
|
|
|
648
647
|
function UA() {
|
|
649
648
|
return Math.floor(Math.random() * 16777215).toString(16);
|
|
650
649
|
}
|
|
651
|
-
function
|
|
650
|
+
function Gn(e, t = "_", n = !0) {
|
|
652
651
|
if (!e)
|
|
653
652
|
return "";
|
|
654
653
|
const r = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-", o = `aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;
|
|
@@ -719,7 +718,7 @@ function rs(e, t) {
|
|
|
719
718
|
function _A(e) {
|
|
720
719
|
return /* @__PURE__ */ i(ai, { size: e });
|
|
721
720
|
}
|
|
722
|
-
function
|
|
721
|
+
function Vn(e, t) {
|
|
723
722
|
const n = e?.Icon ?? ai;
|
|
724
723
|
return /* @__PURE__ */ i(n, { size: t });
|
|
725
724
|
}
|
|
@@ -728,7 +727,7 @@ function Ie(e, t = "small", n = {}) {
|
|
|
728
727
|
return /* @__PURE__ */ i(_o, { size: t });
|
|
729
728
|
{
|
|
730
729
|
const r = vr(e, n);
|
|
731
|
-
return
|
|
730
|
+
return Vn(r, t);
|
|
732
731
|
}
|
|
733
732
|
}
|
|
734
733
|
function WA(e, t) {
|
|
@@ -774,16 +773,16 @@ function is(e, t) {
|
|
|
774
773
|
function HA(e) {
|
|
775
774
|
return e.propertiesOrder ? e.propertiesOrder : [...Object.keys(e.properties), ...(e.additionalFields ?? []).map((t) => t.key)];
|
|
776
775
|
}
|
|
777
|
-
const
|
|
776
|
+
const gn = {
|
|
778
777
|
read: !0,
|
|
779
778
|
edit: !0,
|
|
780
779
|
create: !0,
|
|
781
780
|
delete: !0
|
|
782
781
|
};
|
|
783
|
-
function
|
|
782
|
+
function hn(e, t, n, r) {
|
|
784
783
|
const o = e.permissions;
|
|
785
784
|
if (o === void 0)
|
|
786
|
-
return
|
|
785
|
+
return gn;
|
|
787
786
|
if (typeof o == "object")
|
|
788
787
|
return o;
|
|
789
788
|
if (typeof o == "function")
|
|
@@ -797,24 +796,24 @@ function pn(e, t, n, r) {
|
|
|
797
796
|
throw console.error("Permissions:", o), Error("New type of permission added and not mapped");
|
|
798
797
|
}
|
|
799
798
|
function Ui(e, t, n, r) {
|
|
800
|
-
return
|
|
799
|
+
return hn(e, t, n, r).edit ?? gn.edit;
|
|
801
800
|
}
|
|
802
801
|
function Gt(e, t, n, r) {
|
|
803
|
-
return
|
|
802
|
+
return hn(e, t, n, r).create ?? gn.create;
|
|
804
803
|
}
|
|
805
804
|
function cr(e, t, n, r) {
|
|
806
|
-
return
|
|
805
|
+
return hn(e, t, n, r).delete ?? gn.delete;
|
|
807
806
|
}
|
|
808
807
|
function os(e, t) {
|
|
809
|
-
if (e && (e =
|
|
808
|
+
if (e && (e = Gn(e), e in on))
|
|
810
809
|
return e in on ? /* @__PURE__ */ i(ci, { iconKey: e, size: "medium", className: t }) : void 0;
|
|
811
810
|
}
|
|
812
|
-
function
|
|
811
|
+
function Yn(e, t) {
|
|
813
812
|
const n = os(e.icon, t);
|
|
814
813
|
if (e?.icon && n)
|
|
815
814
|
return n;
|
|
816
|
-
let r =
|
|
817
|
-
r in on && (o = r), o || (r =
|
|
815
|
+
let r = Gn(("singularName" in e ? e.singularName : void 0) ?? e.name), o;
|
|
816
|
+
r in on && (o = r), o || (r = Gn(e.path), r in on && (o = r));
|
|
818
817
|
const l = Er.length;
|
|
819
818
|
return o || (o = Er[Pi(e.path) % l]), /* @__PURE__ */ i(ci, { iconKey: o, size: "medium", className: t });
|
|
820
819
|
}
|
|
@@ -1015,21 +1014,21 @@ function cs(e) {
|
|
|
1015
1014
|
return Me(r) ? t[n] = r : t[n] = { ...r, editable: !1 }, t;
|
|
1016
1015
|
}, {});
|
|
1017
1016
|
}
|
|
1018
|
-
function
|
|
1017
|
+
function zn(e, t, n) {
|
|
1019
1018
|
if (e) {
|
|
1020
1019
|
const o = e({
|
|
1021
1020
|
collection: t,
|
|
1022
1021
|
parentPaths: n
|
|
1023
1022
|
}) ?? t;
|
|
1024
|
-
return o.subcollections && (o.subcollections = o.subcollections.map((l) =>
|
|
1023
|
+
return o.subcollections && (o.subcollections = o.subcollections.map((l) => zn(e, l, [...n, t.path]))), o;
|
|
1025
1024
|
} else
|
|
1026
1025
|
return t;
|
|
1027
1026
|
}
|
|
1028
1027
|
function As(e, t, n = [], r) {
|
|
1029
1028
|
const o = (t ?? []).map((a) => {
|
|
1030
1029
|
const c = e?.find((A) => A.id === a.id);
|
|
1031
|
-
return c ? ds(c, a, n, r) :
|
|
1032
|
-
}), l = o.map((a) => a.id), s = e.filter((a) => !l.includes(a.id)).map((a) => r ?
|
|
1030
|
+
return c ? ds(c, a, n, r) : zn(r, a, n);
|
|
1031
|
+
}), l = o.map((a) => a.id), s = e.filter((a) => !l.includes(a.id)).map((a) => r ? zn(r, a, n) : a);
|
|
1033
1032
|
return [...o, ...s];
|
|
1034
1033
|
}
|
|
1035
1034
|
function ds(e, t, n = [], r) {
|
|
@@ -1122,7 +1121,7 @@ function od(e) {
|
|
|
1122
1121
|
function ld(e) {
|
|
1123
1122
|
return e;
|
|
1124
1123
|
}
|
|
1125
|
-
const us = "100vw", fs = "55vw", Or = "768px", ji = Q.createContext({}), _e = () => Ye(ji), Li = Q.createContext({}),
|
|
1124
|
+
const us = "100vw", fs = "55vw", Or = "768px", ji = Q.createContext({}), _e = () => Ye(ji), Li = Q.createContext({}), we = () => Ye(Li), ht = () => Ye(Ni), _i = Q.createContext({}), pn = () => Ye(_i), Wi = Q.createContext({}), pt = () => Ye(Wi), Ji = Q.createContext({}), _t = () => Ye(Ji), vt = () => {
|
|
1126
1125
|
const {
|
|
1127
1126
|
enqueueSnackbar: e,
|
|
1128
1127
|
closeSnackbar: t
|
|
@@ -1175,7 +1174,7 @@ const us = "100vw", fs = "55vw", Or = "768px", ji = Q.createContext({}), _e = ()
|
|
|
1175
1174
|
))
|
|
1176
1175
|
] });
|
|
1177
1176
|
}, gs = () => Ye(qi), Zi = ri({}), ee = () => {
|
|
1178
|
-
const e = Ye(Zi), t = ht(), n =
|
|
1177
|
+
const e = Ye(Zi), t = ht(), n = pn(), r = pt(), o = we(), l = _e(), s = _t(), a = vt(), c = Ct(), A = gs();
|
|
1179
1178
|
return {
|
|
1180
1179
|
...e,
|
|
1181
1180
|
authController: t,
|
|
@@ -1197,7 +1196,7 @@ function hs({
|
|
|
1197
1196
|
itemCount: o,
|
|
1198
1197
|
searchString: l
|
|
1199
1198
|
}) {
|
|
1200
|
-
const s = _e(), c =
|
|
1199
|
+
const s = _e(), c = we().resolveAliasesFrom(e), A = r ? r[0] : void 0, u = r ? r[1] : void 0, m = ee(), [f, d] = P([]), [g, h] = P(!1), [p, b] = P(), [v, y] = P(!1);
|
|
1201
1200
|
return V(() => {
|
|
1202
1201
|
h(!0);
|
|
1203
1202
|
const x = async (k) => {
|
|
@@ -1250,14 +1249,14 @@ function hs({
|
|
|
1250
1249
|
noMoreToLoad: v
|
|
1251
1250
|
};
|
|
1252
1251
|
}
|
|
1253
|
-
const
|
|
1252
|
+
const xn = {};
|
|
1254
1253
|
function Xi({
|
|
1255
1254
|
path: e,
|
|
1256
1255
|
entityId: t,
|
|
1257
1256
|
collection: n,
|
|
1258
1257
|
useCache: r = !1
|
|
1259
1258
|
}) {
|
|
1260
|
-
const o = _e(), s =
|
|
1259
|
+
const o = _e(), s = we().resolveAliasesFrom(e), a = ee(), [c, A] = P(), [u, m] = P(!0), [f, d] = P();
|
|
1261
1260
|
return V(() => {
|
|
1262
1261
|
m(!0);
|
|
1263
1262
|
const g = async (p) => {
|
|
@@ -1272,11 +1271,11 @@ function Xi({
|
|
|
1272
1271
|
} catch (b) {
|
|
1273
1272
|
console.error(b);
|
|
1274
1273
|
}
|
|
1275
|
-
|
|
1274
|
+
xn[`${s}/${t}`] = p, A(p), m(!1), d(void 0);
|
|
1276
1275
|
}, h = (p) => {
|
|
1277
1276
|
console.error("ERROR fetching entity", p), m(!1), A(void 0), d(p);
|
|
1278
1277
|
};
|
|
1279
|
-
return t && r &&
|
|
1278
|
+
return t && r && xn[`${s}/${t}`] ? (A(xn[`${s}/${t}`]), m(!1), d(void 0), () => {
|
|
1280
1279
|
}) : t && s && n ? o.listenEntity ? o.listenEntity({
|
|
1281
1280
|
path: s,
|
|
1282
1281
|
entityId: t,
|
|
@@ -1537,7 +1536,7 @@ const eo = () => Ye(tr), bs = (e) => {
|
|
|
1537
1536
|
};
|
|
1538
1537
|
function to(e) {
|
|
1539
1538
|
return /* @__PURE__ */ i(
|
|
1540
|
-
|
|
1539
|
+
ye,
|
|
1541
1540
|
{
|
|
1542
1541
|
...e,
|
|
1543
1542
|
tooltipClassName: "!text-red-500 bg-red-50",
|
|
@@ -1649,7 +1648,7 @@ function xs({
|
|
|
1649
1648
|
}
|
|
1650
1649
|
),
|
|
1651
1650
|
n && /* @__PURE__ */ E(G, { children: [
|
|
1652
|
-
navigator && /* @__PURE__ */ i(
|
|
1651
|
+
navigator && /* @__PURE__ */ i(ye, { title: "Copy url to clipboard", children: /* @__PURE__ */ i(
|
|
1653
1652
|
"div",
|
|
1654
1653
|
{
|
|
1655
1654
|
className: "rounded-full absolute bottom-[-4px] right-8",
|
|
@@ -1670,7 +1669,7 @@ function xs({
|
|
|
1670
1669
|
)
|
|
1671
1670
|
}
|
|
1672
1671
|
) }),
|
|
1673
|
-
/* @__PURE__ */ i(
|
|
1672
|
+
/* @__PURE__ */ i(ye, { title: "Open image in new tab", children: /* @__PURE__ */ i(
|
|
1674
1673
|
se,
|
|
1675
1674
|
{
|
|
1676
1675
|
variant: "filled",
|
|
@@ -1686,7 +1685,7 @@ function xs({
|
|
|
1686
1685
|
size: "small",
|
|
1687
1686
|
onClick: (s) => s.stopPropagation(),
|
|
1688
1687
|
children: /* @__PURE__ */ i(
|
|
1689
|
-
|
|
1688
|
+
cn,
|
|
1690
1689
|
{
|
|
1691
1690
|
className: "text-gray-500",
|
|
1692
1691
|
size: "small"
|
|
@@ -1744,7 +1743,7 @@ function ln({
|
|
|
1744
1743
|
},
|
|
1745
1744
|
children: [
|
|
1746
1745
|
/* @__PURE__ */ i(Jo, { className: "flex-grow" }),
|
|
1747
|
-
r && /* @__PURE__ */ i(
|
|
1746
|
+
r && /* @__PURE__ */ i(ye, { title: r, children: /* @__PURE__ */ i(
|
|
1748
1747
|
J,
|
|
1749
1748
|
{
|
|
1750
1749
|
className: "max-w-full truncate rtl text-left",
|
|
@@ -1765,7 +1764,7 @@ function ln({
|
|
|
1765
1764
|
},
|
|
1766
1765
|
target: "_blank",
|
|
1767
1766
|
children: [
|
|
1768
|
-
/* @__PURE__ */ i(
|
|
1767
|
+
/* @__PURE__ */ i(cn, { size: "small" }),
|
|
1769
1768
|
e
|
|
1770
1769
|
]
|
|
1771
1770
|
}
|
|
@@ -1783,9 +1782,9 @@ function Vt({
|
|
|
1783
1782
|
} else if (e.dataType === "array") {
|
|
1784
1783
|
const r = e;
|
|
1785
1784
|
r.of && (Array.isArray(r.of) ? n = /* @__PURE__ */ E(G, { children: [
|
|
1786
|
-
r.of.map((o, l) =>
|
|
1785
|
+
r.of.map((o, l) => Cn(o, l)),
|
|
1787
1786
|
" "
|
|
1788
|
-
] }) : r.of.dataType === "map" && r.of.properties ? n = ks(r.of.properties, t, r.of.previewProperties) : r.of.dataType === "string" ? r.of.enumValues ? n = Ss() : r.of.storage ? n =
|
|
1787
|
+
] }) : r.of.dataType === "map" && r.of.properties ? n = ks(r.of.properties, t, r.of.previewProperties) : r.of.dataType === "string" ? r.of.enumValues ? n = Ss() : r.of.storage ? n = Cn(r.of) : n = Is() : n = Cn(r.of));
|
|
1789
1788
|
} else
|
|
1790
1789
|
e.dataType === "map" ? n = Cs(e, t) : e.dataType === "date" ? n = lt() : e.dataType === "reference" ? n = Ns() : (e.dataType, n = lt());
|
|
1791
1790
|
return n || null;
|
|
@@ -1865,7 +1864,7 @@ function Ss() {
|
|
|
1865
1864
|
(e, t) => /* @__PURE__ */ i(G, { children: lt(t) })
|
|
1866
1865
|
) });
|
|
1867
1866
|
}
|
|
1868
|
-
function
|
|
1867
|
+
function Cn(e, t = 0) {
|
|
1869
1868
|
return /* @__PURE__ */ i(
|
|
1870
1869
|
"div",
|
|
1871
1870
|
{
|
|
@@ -2080,7 +2079,7 @@ function Vr({
|
|
|
2080
2079
|
}
|
|
2081
2080
|
) });
|
|
2082
2081
|
}
|
|
2083
|
-
const He =
|
|
2082
|
+
const He = Dn.memo(function(t) {
|
|
2084
2083
|
const n = t.reference;
|
|
2085
2084
|
return n instanceof je ? /* @__PURE__ */ i(Os, { ...t }) : (console.warn("Reference preview received value of type", typeof n), /* @__PURE__ */ i(
|
|
2086
2085
|
Ar,
|
|
@@ -2109,7 +2108,7 @@ function Os({
|
|
|
2109
2108
|
onClick: l,
|
|
2110
2109
|
allowEntityNavigation: s = !0
|
|
2111
2110
|
}) {
|
|
2112
|
-
const a = ee(), A =
|
|
2111
|
+
const a = ee(), A = we().getCollection(t.path);
|
|
2113
2112
|
if (!A) {
|
|
2114
2113
|
if (a.components?.missingReference)
|
|
2115
2114
|
return /* @__PURE__ */ i(a.components.missingReference, { path: t.path });
|
|
@@ -2199,7 +2198,7 @@ function Gs({ reference: e, collection: t, previewProperties: n, size: r, disabl
|
|
|
2199
2198
|
]
|
|
2200
2199
|
}
|
|
2201
2200
|
),
|
|
2202
|
-
/* @__PURE__ */ i("div", { className: `my-${r === "tiny" ? 2 : 4}`, children: !o && d && l && /* @__PURE__ */ i(
|
|
2201
|
+
/* @__PURE__ */ i("div", { className: `my-${r === "tiny" ? 2 : 4}`, children: !o && d && l && /* @__PURE__ */ i(ye, { title: `See details for ${d.id}`, children: /* @__PURE__ */ i(
|
|
2203
2202
|
se,
|
|
2204
2203
|
{
|
|
2205
2204
|
color: "inherit",
|
|
@@ -2680,7 +2679,7 @@ const Fe = Q.memo(function(t) {
|
|
|
2680
2679
|
size: t.size,
|
|
2681
2680
|
storagePathOrDownloadUrl: s
|
|
2682
2681
|
}
|
|
2683
|
-
) : m.markdown ? r = /* @__PURE__ */ i(
|
|
2682
|
+
) : m.markdown ? r = /* @__PURE__ */ i(An, { source: s }) : r = /* @__PURE__ */ i(
|
|
2684
2683
|
io,
|
|
2685
2684
|
{
|
|
2686
2685
|
...t,
|
|
@@ -2836,7 +2835,7 @@ function cd({
|
|
|
2836
2835
|
`table_${m}_${f}`
|
|
2837
2836
|
)) }) });
|
|
2838
2837
|
}
|
|
2839
|
-
const Ad =
|
|
2838
|
+
const Ad = Dn.memo(
|
|
2840
2839
|
function({
|
|
2841
2840
|
builder: t
|
|
2842
2841
|
}) {
|
|
@@ -2850,7 +2849,7 @@ const Ad = Rn.memo(
|
|
|
2850
2849
|
}), () => {
|
|
2851
2850
|
s = !0;
|
|
2852
2851
|
};
|
|
2853
|
-
}, [t]), n ? /* @__PURE__ */ i(Ve, {}) : /* @__PURE__ */ i(
|
|
2852
|
+
}, [t]), n ? /* @__PURE__ */ i(Ve, {}) : /* @__PURE__ */ i(Dn.Fragment, { children: o });
|
|
2854
2853
|
}
|
|
2855
2854
|
);
|
|
2856
2855
|
function so({
|
|
@@ -2878,7 +2877,7 @@ function so({
|
|
|
2878
2877
|
rel: "noopener noreferrer",
|
|
2879
2878
|
target: "_blank",
|
|
2880
2879
|
children: /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
|
|
2881
|
-
|
|
2880
|
+
cn,
|
|
2882
2881
|
{
|
|
2883
2882
|
size: "small"
|
|
2884
2883
|
}
|
|
@@ -2977,7 +2976,7 @@ function Js(e) {
|
|
|
2977
2976
|
}
|
|
2978
2977
|
);
|
|
2979
2978
|
}
|
|
2980
|
-
function
|
|
2979
|
+
function kn(e) {
|
|
2981
2980
|
const {
|
|
2982
2981
|
name: t,
|
|
2983
2982
|
enumValues: n,
|
|
@@ -3240,7 +3239,7 @@ function Ao({
|
|
|
3240
3239
|
if (!A)
|
|
3241
3240
|
throw Error("Storage meta must be specified");
|
|
3242
3241
|
const m = A?.metadata, f = u ? "small" : "medium", d = A?.imageCompression, g = (u ? r ?? [] : r ? [r] : []).map((B) => ({
|
|
3243
|
-
id:
|
|
3242
|
+
id: In(),
|
|
3244
3243
|
storagePathOrDownloadUrl: B,
|
|
3245
3244
|
metadata: m,
|
|
3246
3245
|
size: f
|
|
@@ -3274,8 +3273,8 @@ function Ao({
|
|
|
3274
3273
|
if (u)
|
|
3275
3274
|
I = [
|
|
3276
3275
|
...b,
|
|
3277
|
-
...await Promise.all(B.map(async (S) => (d &&
|
|
3278
|
-
id:
|
|
3276
|
+
...await Promise.all(B.map(async (S) => (d && Un(S) && (S = await jr(S, d)), {
|
|
3277
|
+
id: In(),
|
|
3279
3278
|
file: S,
|
|
3280
3279
|
fileName: await y(S),
|
|
3281
3280
|
metadata: m,
|
|
@@ -3284,8 +3283,8 @@ function Ao({
|
|
|
3284
3283
|
];
|
|
3285
3284
|
else {
|
|
3286
3285
|
let S = B[0];
|
|
3287
|
-
d &&
|
|
3288
|
-
id:
|
|
3286
|
+
d && Un(S) && (S = await jr(S, d)), I = [{
|
|
3287
|
+
id: In(),
|
|
3289
3288
|
file: S,
|
|
3290
3289
|
fileName: await y(S),
|
|
3291
3290
|
metadata: m,
|
|
@@ -3310,15 +3309,15 @@ function Ur(e) {
|
|
|
3310
3309
|
(t, n) => (e.map((r) => r.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl) === n || !t.storagePathOrDownloadUrl) && (e.map((r) => r.file).indexOf(t.file) === n || !t.file)
|
|
3311
3310
|
);
|
|
3312
3311
|
}
|
|
3313
|
-
function
|
|
3312
|
+
function In() {
|
|
3314
3313
|
return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
|
|
3315
3314
|
}
|
|
3316
3315
|
const $r = {
|
|
3317
3316
|
"image/jpeg": "JPEG",
|
|
3318
3317
|
"image/png": "PNG",
|
|
3319
3318
|
"image/webp": "WEBP"
|
|
3320
|
-
},
|
|
3321
|
-
const r = t.quality === void 0 ? ea : t.quality, o = r >= 0 && r <= 100 ? r : 100, l =
|
|
3319
|
+
}, Un = (e) => $r[e.type] ? $r[e.type] : null, ea = 100, jr = (e, t) => new Promise((n) => {
|
|
3320
|
+
const r = t.quality === void 0 ? ea : t.quality, o = r >= 0 && r <= 100 ? r : 100, l = Un(e);
|
|
3322
3321
|
if (!l)
|
|
3323
3322
|
throw Error("resizeAndCompressImage: Unsupported image format");
|
|
3324
3323
|
Ol.imageFileResizer(
|
|
@@ -3360,7 +3359,7 @@ function uo({
|
|
|
3360
3359
|
return Q.useEffect(() => (f.current = !0, t.file && g(t.file, t.fileName), () => {
|
|
3361
3360
|
f.current = !1;
|
|
3362
3361
|
}), [t.file, t.fileName, g]), l ? /* @__PURE__ */ i("div", { className: `m-4 w-${o} h-${o}`, children: u && /* @__PURE__ */ i(Ve, { className: `w-${o} h-${o}` }) }) : /* @__PURE__ */ E("div", { className: Z(
|
|
3363
|
-
|
|
3362
|
+
dn,
|
|
3364
3363
|
"relative m-4 border-box flex items-center justify-center",
|
|
3365
3364
|
`min-w-[${o}px] min-h-[${o}px]`
|
|
3366
3365
|
), children: [
|
|
@@ -3651,7 +3650,7 @@ function sa({
|
|
|
3651
3650
|
);
|
|
3652
3651
|
}
|
|
3653
3652
|
function Lr(e) {
|
|
3654
|
-
const t = ee(), n =
|
|
3653
|
+
const t = ee(), n = we(), { path: r } = e, o = n.getCollection(r);
|
|
3655
3654
|
if (!o) {
|
|
3656
3655
|
if (t.components?.missingReference)
|
|
3657
3656
|
return /* @__PURE__ */ i(t.components.missingReference, { path: r });
|
|
@@ -4031,7 +4030,7 @@ const va = ({
|
|
|
4031
4030
|
},
|
|
4032
4031
|
children: o
|
|
4033
4032
|
}
|
|
4034
|
-
),
|
|
4033
|
+
), $n = Q.memo(
|
|
4035
4034
|
function({
|
|
4036
4035
|
children: t,
|
|
4037
4036
|
actions: n,
|
|
@@ -4160,7 +4159,7 @@ const va = ({
|
|
|
4160
4159
|
)
|
|
4161
4160
|
] }),
|
|
4162
4161
|
n,
|
|
4163
|
-
l && B && s && /* @__PURE__ */ i("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ i(
|
|
4162
|
+
l && B && s && /* @__PURE__ */ i("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ i(ye, { title: s, children: /* @__PURE__ */ i(el, { size: "smallest", color: "disabled", className: "text-gray-500" }) }) })
|
|
4164
4163
|
]
|
|
4165
4164
|
}
|
|
4166
4165
|
);
|
|
@@ -4252,11 +4251,11 @@ const ya = Q.memo(
|
|
|
4252
4251
|
propertyKey: t
|
|
4253
4252
|
} : void 0);
|
|
4254
4253
|
};
|
|
4255
|
-
let _, X = !1, ge = !1,
|
|
4254
|
+
let _, X = !1, ge = !1, he = !0, D = !1, $ = !1, q = !0;
|
|
4256
4255
|
const ne = !L && k;
|
|
4257
4256
|
if (u || U)
|
|
4258
4257
|
return /* @__PURE__ */ i(
|
|
4259
|
-
|
|
4258
|
+
$n,
|
|
4260
4259
|
{
|
|
4261
4260
|
size: g,
|
|
4262
4261
|
width: s,
|
|
@@ -4302,7 +4301,7 @@ const ya = Q.memo(
|
|
|
4302
4301
|
else if (v && o.dataType === "number") {
|
|
4303
4302
|
const T = o;
|
|
4304
4303
|
T.enumValues ? (_ = /* @__PURE__ */ i(
|
|
4305
|
-
|
|
4304
|
+
kn,
|
|
4306
4305
|
{
|
|
4307
4306
|
name: t,
|
|
4308
4307
|
multiple: !1,
|
|
@@ -4330,7 +4329,7 @@ const ya = Q.memo(
|
|
|
4330
4329
|
const T = o;
|
|
4331
4330
|
if (T.enumValues)
|
|
4332
4331
|
_ = /* @__PURE__ */ i(
|
|
4333
|
-
|
|
4332
|
+
kn,
|
|
4334
4333
|
{
|
|
4335
4334
|
name: t,
|
|
4336
4335
|
multiple: !1,
|
|
@@ -4381,7 +4380,7 @@ const ya = Q.memo(
|
|
|
4381
4380
|
internalValue: y,
|
|
4382
4381
|
updateValue: j
|
|
4383
4382
|
}
|
|
4384
|
-
), $ = !0,
|
|
4383
|
+
), $ = !0, he = !1, X = !1;
|
|
4385
4384
|
else if (o.dataType === "reference")
|
|
4386
4385
|
typeof o.path == "string" && (_ = /* @__PURE__ */ i(
|
|
4387
4386
|
Lr,
|
|
@@ -4403,7 +4402,7 @@ const ya = Q.memo(
|
|
|
4403
4402
|
if (!T.of && !T.oneOf)
|
|
4404
4403
|
throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);
|
|
4405
4404
|
T.of && !Array.isArray(T.of) && (T.of.dataType === "string" || T.of.dataType === "number" ? v && T.of.enumValues && (_ = /* @__PURE__ */ i(
|
|
4406
|
-
|
|
4405
|
+
kn,
|
|
4407
4406
|
{
|
|
4408
4407
|
name: t,
|
|
4409
4408
|
multiple: !0,
|
|
@@ -4416,7 +4415,7 @@ const ya = Q.memo(
|
|
|
4416
4415
|
internalValue: y,
|
|
4417
4416
|
updateValue: j
|
|
4418
4417
|
}
|
|
4419
|
-
), X = !0, $ = !0,
|
|
4418
|
+
), X = !0, $ = !0, he = !1) : T.of.dataType === "reference" && (typeof T.of.path == "string" && (_ = /* @__PURE__ */ i(
|
|
4420
4419
|
Lr,
|
|
4421
4420
|
{
|
|
4422
4421
|
name: t,
|
|
@@ -4444,7 +4443,7 @@ const ya = Q.memo(
|
|
|
4444
4443
|
size: ot(g)
|
|
4445
4444
|
}
|
|
4446
4445
|
)), /* @__PURE__ */ i(
|
|
4447
|
-
|
|
4446
|
+
$n,
|
|
4448
4447
|
{
|
|
4449
4448
|
size: g,
|
|
4450
4449
|
width: s,
|
|
@@ -4460,7 +4459,7 @@ const ya = Q.memo(
|
|
|
4460
4459
|
allowScroll: X,
|
|
4461
4460
|
showExpandIcon: ge,
|
|
4462
4461
|
value: y,
|
|
4463
|
-
hideOverflow:
|
|
4462
|
+
hideOverflow: he,
|
|
4464
4463
|
actions: q && /* @__PURE__ */ i(
|
|
4465
4464
|
fo,
|
|
4466
4465
|
{
|
|
@@ -4481,13 +4480,13 @@ const ya = Q.memo(
|
|
|
4481
4480
|
function wa(e, t) {
|
|
4482
4481
|
return e.height === t.height && e.propertyKey === t.propertyKey && e.align === t.align && e.width === t.width && ue(e.property, t.property) && ue(e.value, t.value) && ue(e.entity.id, t.entity.id) && ue(e.entity.values, t.entity.values);
|
|
4483
4482
|
}
|
|
4484
|
-
function
|
|
4483
|
+
function jn({ text: e, ...t }) {
|
|
4485
4484
|
return /* @__PURE__ */ i(
|
|
4486
4485
|
"div",
|
|
4487
4486
|
{
|
|
4488
4487
|
className: "flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900 gap-4",
|
|
4489
4488
|
children: /* @__PURE__ */ E("div", { className: "m-auto flex flex-col gap-2 items-center", children: [
|
|
4490
|
-
/* @__PURE__ */ i(
|
|
4489
|
+
/* @__PURE__ */ i(un, { ...t }),
|
|
4491
4490
|
e && /* @__PURE__ */ i(
|
|
4492
4491
|
J,
|
|
4493
4492
|
{
|
|
@@ -4577,9 +4576,9 @@ const Ea = Q.memo(
|
|
|
4577
4576
|
l(c.key);
|
|
4578
4577
|
},
|
|
4579
4578
|
children: [
|
|
4580
|
-
!o && /* @__PURE__ */ i(
|
|
4581
|
-
o === "asc" && /* @__PURE__ */ i(
|
|
4582
|
-
o === "desc" && /* @__PURE__ */ i(
|
|
4579
|
+
!o && /* @__PURE__ */ i(yn, {}),
|
|
4580
|
+
o === "asc" && /* @__PURE__ */ i(yn, {}),
|
|
4581
|
+
o === "desc" && /* @__PURE__ */ i(yn, { className: "rotate-180" })
|
|
4583
4582
|
]
|
|
4584
4583
|
}
|
|
4585
4584
|
)
|
|
@@ -4833,12 +4832,12 @@ const xa = ({
|
|
|
4833
4832
|
);
|
|
4834
4833
|
},
|
|
4835
4834
|
(e, t) => ue(e, t)
|
|
4836
|
-
),
|
|
4837
|
-
|
|
4835
|
+
), vn = ri({});
|
|
4836
|
+
vn.displayName = "VirtualListContext";
|
|
4838
4837
|
const Ia = Vo(({
|
|
4839
4838
|
children: e,
|
|
4840
4839
|
...t
|
|
4841
|
-
}, n) => /* @__PURE__ */ i(
|
|
4840
|
+
}, n) => /* @__PURE__ */ i(vn.Consumer, { children: (r) => {
|
|
4842
4841
|
const o = r.customView;
|
|
4843
4842
|
return /* @__PURE__ */ E(G, { children: [
|
|
4844
4843
|
/* @__PURE__ */ i(
|
|
@@ -4916,7 +4915,7 @@ const Ia = Vo(({
|
|
|
4916
4915
|
const j = w(() => {
|
|
4917
4916
|
M.current = 0, N.current && N.current.scrollTo(N.current?.scrollLeft, 0);
|
|
4918
4917
|
}, []), Y = w((F) => {
|
|
4919
|
-
const T = B === F && I === "desc", Ee = B === F && I === "asc" ? "desc" : T ? void 0 : "asc",
|
|
4918
|
+
const T = B === F && I === "desc", Ee = B === F && I === "asc" ? "desc" : T ? void 0 : "asc", pe = T ? void 0 : F, Se = le.current, tt = Ee && pe ? [pe, Ee] : void 0;
|
|
4920
4919
|
Se && A && !A(Se, tt) && u && u(void 0), n && n(), g && g(tt), j();
|
|
4921
4920
|
}, [A, I, u, n, g, j, B]), ae = w(() => {
|
|
4922
4921
|
M.current = 0, g && g(void 0);
|
|
@@ -4927,7 +4926,7 @@ const Ia = Vo(({
|
|
|
4927
4926
|
scrollUpdateWasRequested: T
|
|
4928
4927
|
}) => {
|
|
4929
4928
|
!T && F >= _ - 600 && X(F);
|
|
4930
|
-
}, [_, X]),
|
|
4929
|
+
}, [_, X]), he = w((F, T) => {
|
|
4931
4930
|
M.current = 0;
|
|
4932
4931
|
const me = le.current;
|
|
4933
4932
|
let Ee = me ? { ...me } : {};
|
|
@@ -4938,10 +4937,10 @@ const Ia = Vo(({
|
|
|
4938
4937
|
className: "h-full flex flex-col items-center justify-center sticky left-0",
|
|
4939
4938
|
children: [
|
|
4940
4939
|
/* @__PURE__ */ i(J, { variant: "h6", children: "Error fetching data from the data source" }),
|
|
4941
|
-
f?.message && /* @__PURE__ */ i(
|
|
4940
|
+
f?.message && /* @__PURE__ */ i(An, { className: "px-4 break-all", source: f.message })
|
|
4942
4941
|
]
|
|
4943
4942
|
}
|
|
4944
|
-
), [f?.message]), $ = w(() => h ? /* @__PURE__ */ i(
|
|
4943
|
+
), [f?.message]), $ = w(() => h ? /* @__PURE__ */ i(jn, {}) : /* @__PURE__ */ E(
|
|
4945
4944
|
"div",
|
|
4946
4945
|
{
|
|
4947
4946
|
className: "flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",
|
|
@@ -4957,7 +4956,7 @@ const Ia = Vo(({
|
|
|
4957
4956
|
ref: U,
|
|
4958
4957
|
className: Z("h-full w-full", x),
|
|
4959
4958
|
children: /* @__PURE__ */ i(
|
|
4960
|
-
|
|
4959
|
+
vn.Provider,
|
|
4961
4960
|
{
|
|
4962
4961
|
value: {
|
|
4963
4962
|
data: t,
|
|
@@ -4971,7 +4970,7 @@ const Ia = Vo(({
|
|
|
4971
4970
|
onColumnResizeEnd: te,
|
|
4972
4971
|
filter: le.current,
|
|
4973
4972
|
onColumnSort: Y,
|
|
4974
|
-
onFilterUpdate:
|
|
4973
|
+
onFilterUpdate: he,
|
|
4975
4974
|
sortByProperty: B,
|
|
4976
4975
|
hoverRow: b ?? !1,
|
|
4977
4976
|
createFilterField: v,
|
|
@@ -5011,7 +5010,7 @@ function Na({
|
|
|
5011
5010
|
const a = w(({
|
|
5012
5011
|
index: c,
|
|
5013
5012
|
style: A
|
|
5014
|
-
}) => /* @__PURE__ */ i(
|
|
5013
|
+
}) => /* @__PURE__ */ i(vn.Consumer, { children: ({
|
|
5015
5014
|
onRowClick: u,
|
|
5016
5015
|
data: m,
|
|
5017
5016
|
columns: f,
|
|
@@ -5120,7 +5119,7 @@ const ur = Q.memo(function({
|
|
|
5120
5119
|
},
|
|
5121
5120
|
children: [
|
|
5122
5121
|
(y || a) && /* @__PURE__ */ E("div", { className: "w-34 flex justify-center", children: [
|
|
5123
|
-
k.map((B, I) => /* @__PURE__ */ i(
|
|
5122
|
+
k.map((B, I) => /* @__PURE__ */ i(ye, { title: B.name, children: /* @__PURE__ */ i(
|
|
5124
5123
|
se,
|
|
5125
5124
|
{
|
|
5126
5125
|
onClick: (S) => {
|
|
@@ -5173,7 +5172,7 @@ const ur = Q.memo(function({
|
|
|
5173
5172
|
))
|
|
5174
5173
|
}
|
|
5175
5174
|
),
|
|
5176
|
-
a && /* @__PURE__ */ i(
|
|
5175
|
+
a && /* @__PURE__ */ i(ye, { title: `Select ${t.id}`, children: /* @__PURE__ */ i(
|
|
5177
5176
|
di,
|
|
5178
5177
|
{
|
|
5179
5178
|
size: h ? "medium" : "small",
|
|
@@ -5239,7 +5238,7 @@ function Fa(e) {
|
|
|
5239
5238
|
n
|
|
5240
5239
|
] }),
|
|
5241
5240
|
/* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
|
|
5242
|
-
t && /* @__PURE__ */ i("div", { className: "w-[22px]", children: e.loading && /* @__PURE__ */ i(
|
|
5241
|
+
t && /* @__PURE__ */ i("div", { className: "w-[22px]", children: e.loading && /* @__PURE__ */ i(un, { size: "small" }) }),
|
|
5243
5242
|
e.onTextSearch && /* @__PURE__ */ i(
|
|
5244
5243
|
gi,
|
|
5245
5244
|
{
|
|
@@ -5265,7 +5264,7 @@ const _r = {
|
|
|
5265
5264
|
"not-in": "Not in",
|
|
5266
5265
|
"array-contains": "Contains",
|
|
5267
5266
|
"array-contains-any": "Contains Any"
|
|
5268
|
-
},
|
|
5267
|
+
}, Sn = ["array-contains-any", "in", "not-in"];
|
|
5269
5268
|
function Qa({
|
|
5270
5269
|
name: e,
|
|
5271
5270
|
value: t,
|
|
@@ -5280,7 +5279,7 @@ function Qa({
|
|
|
5280
5279
|
r ? c.push("array-contains-any") : c.push("in", "not-in");
|
|
5281
5280
|
const [m, f] = t || [c[0], void 0], [d, g] = P(m), [h, p] = P(f), b = h ? Array.isArray(h) ? h.map((N) => N instanceof je ? N.id : null).filter(Boolean) : [h.id] : [];
|
|
5282
5281
|
function v(N, M) {
|
|
5283
|
-
const U =
|
|
5282
|
+
const U = Sn.includes(d), H = Sn.includes(N);
|
|
5284
5283
|
let L = M;
|
|
5285
5284
|
U !== H && (L = H ? L instanceof je ? [L] : [] : void 0), g(N), p(L);
|
|
5286
5285
|
const te = L !== null && Array.isArray(L) ? L.length > 0 : L !== void 0;
|
|
@@ -5288,11 +5287,11 @@ function Qa({
|
|
|
5288
5287
|
N && te ? [N, L] : void 0
|
|
5289
5288
|
);
|
|
5290
5289
|
}
|
|
5291
|
-
const y =
|
|
5290
|
+
const y = we(), x = oe(() => o ? y.getCollection(o) : void 0, [o]), C = (N) => {
|
|
5292
5291
|
v(d, st(N));
|
|
5293
5292
|
}, k = (N) => {
|
|
5294
5293
|
v(d, N.map((M) => st(M)));
|
|
5295
|
-
}, B =
|
|
5294
|
+
}, B = Sn.includes(d), I = Wt(
|
|
5296
5295
|
{
|
|
5297
5296
|
multiselect: B,
|
|
5298
5297
|
path: o,
|
|
@@ -5365,7 +5364,7 @@ const Wr = {
|
|
|
5365
5364
|
"not-in": "Not in",
|
|
5366
5365
|
"array-contains": "Contains",
|
|
5367
5366
|
"array-contains-any": "Any"
|
|
5368
|
-
},
|
|
5367
|
+
}, Nn = ["array-contains-any", "in", "not-in"];
|
|
5369
5368
|
function Da({
|
|
5370
5369
|
name: e,
|
|
5371
5370
|
value: t,
|
|
@@ -5380,14 +5379,14 @@ function Da({
|
|
|
5380
5379
|
const [c, A] = t || [a[0], void 0], [u, m] = P(c), [f, d] = P(A);
|
|
5381
5380
|
function g(p, b) {
|
|
5382
5381
|
let v = b;
|
|
5383
|
-
const y =
|
|
5382
|
+
const y = Nn.includes(u), x = Nn.includes(p);
|
|
5384
5383
|
y !== x && (v = x ? typeof b == "string" || typeof b == "number" ? [b] : [] : ""), typeof v == "number" && isNaN(v) && (v = void 0), m(p), d(v);
|
|
5385
5384
|
const C = v !== null && Array.isArray(v) ? v.length > 0 : v !== void 0;
|
|
5386
5385
|
n(
|
|
5387
5386
|
p && C ? [p, v] : void 0
|
|
5388
5387
|
);
|
|
5389
5388
|
}
|
|
5390
|
-
const h =
|
|
5389
|
+
const h = Nn.includes(u);
|
|
5391
5390
|
return /* @__PURE__ */ E("div", { className: "flex w-[440px] items-center", children: [
|
|
5392
5391
|
/* @__PURE__ */ i("div", { className: "w-[80px]", children: /* @__PURE__ */ i(
|
|
5393
5392
|
Ke,
|
|
@@ -5634,13 +5633,13 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5634
5633
|
filterable: _ = !0,
|
|
5635
5634
|
sortable: X = !0,
|
|
5636
5635
|
endAdornment: ge,
|
|
5637
|
-
AddColumnComponent:
|
|
5636
|
+
AddColumnComponent: he,
|
|
5638
5637
|
AdditionalHeaderWidget: D,
|
|
5639
5638
|
additionalIDHeaderWidget: $,
|
|
5640
5639
|
emptyComponent: q,
|
|
5641
5640
|
getIdColumnWidth: ne
|
|
5642
5641
|
}) {
|
|
5643
|
-
const F = We(), T = !!t, me = A?.selectedEntities?.length > 0 ? A?.selectedEntities : u, Ee = ee(), [
|
|
5642
|
+
const F = We(), T = !!t, me = A?.selectedEntities?.length > 0 ? A?.selectedEntities : u, Ee = ee(), [pe, Se] = Q.useState(y ?? "m"), [tt, qe] = Q.useState(void 0), Je = me?.map((W) => W.id), It = !!S && Object.keys(S).length > 0, bt = () => {
|
|
5644
5643
|
!j || k || B || L !== void 0 && te?.(L + le);
|
|
5645
5644
|
}, St = w(() => {
|
|
5646
5645
|
te?.(le);
|
|
@@ -5665,14 +5664,14 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5665
5664
|
}, []), z = s, O = w(({
|
|
5666
5665
|
column: W,
|
|
5667
5666
|
columnIndex: Be,
|
|
5668
|
-
rowData:
|
|
5667
|
+
rowData: be,
|
|
5669
5668
|
rowIndex: Oe
|
|
5670
5669
|
}) => {
|
|
5671
|
-
const fe =
|
|
5670
|
+
const fe = be, Ze = W.key;
|
|
5672
5671
|
let Xe = W.custom?.disabled;
|
|
5673
|
-
const
|
|
5672
|
+
const bn = fe.values ? ut(fe.values, Ze) : void 0, at = a?.({
|
|
5674
5673
|
propertyKey: Ze,
|
|
5675
|
-
propertyValue:
|
|
5674
|
+
propertyValue: bn,
|
|
5676
5675
|
entity: fe
|
|
5677
5676
|
}) ?? W.custom.resolvedProperty;
|
|
5678
5677
|
return at?.disabled || (Xe = !1), at ? /* @__PURE__ */ i(Ae, { children: fe ? /* @__PURE__ */ i(
|
|
@@ -5686,27 +5685,27 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5686
5685
|
customFieldValidator: z,
|
|
5687
5686
|
columnIndex: Be,
|
|
5688
5687
|
width: W.width,
|
|
5689
|
-
height: Et(
|
|
5688
|
+
height: Et(pe),
|
|
5690
5689
|
entity: fe,
|
|
5691
5690
|
disabled: Xe,
|
|
5692
5691
|
path: fe.path
|
|
5693
5692
|
},
|
|
5694
5693
|
`property_table_cell_${fe.id}_${Ze}`
|
|
5695
5694
|
) : lt() }) : null;
|
|
5696
|
-
}, [z, p,
|
|
5695
|
+
}, [z, p, pe, Je]), K = w(({
|
|
5697
5696
|
column: W,
|
|
5698
5697
|
rowData: Be,
|
|
5699
|
-
width:
|
|
5698
|
+
width: be
|
|
5700
5699
|
}) => {
|
|
5701
5700
|
const Oe = Be, fe = it[W.key], Ze = fe.dependencies ? Object.entries(Oe.values).filter(([at, yr]) => fe.dependencies.includes(at)).reduce((at, yr) => ({ ...at, ...yr }), {}) : Oe, Xe = fe.Builder;
|
|
5702
5701
|
if (!Xe && !fe.value)
|
|
5703
5702
|
throw new Error("When using additional fields you need to provide a Builder or a value");
|
|
5704
|
-
const
|
|
5703
|
+
const bn = Xe ? /* @__PURE__ */ i(Xe, { entity: Oe, context: Ee }) : /* @__PURE__ */ i(G, { children: fe.value?.({ entity: Oe, context: Ee }) });
|
|
5705
5704
|
return /* @__PURE__ */ i(
|
|
5706
|
-
|
|
5705
|
+
$n,
|
|
5707
5706
|
{
|
|
5708
|
-
width:
|
|
5709
|
-
size:
|
|
5707
|
+
width: be,
|
|
5708
|
+
size: pe,
|
|
5710
5709
|
value: Ze,
|
|
5711
5710
|
selected: !1,
|
|
5712
5711
|
disabled: !0,
|
|
@@ -5714,26 +5713,26 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5714
5713
|
allowScroll: !1,
|
|
5715
5714
|
showExpandIcon: !1,
|
|
5716
5715
|
disabledTooltip: "This column can't be edited directly",
|
|
5717
|
-
children: /* @__PURE__ */ i(Ae, { children:
|
|
5716
|
+
children: /* @__PURE__ */ i(Ae, { children: bn })
|
|
5718
5717
|
},
|
|
5719
5718
|
`additional_table_cell_${Oe.id}_${W.key}`
|
|
5720
5719
|
);
|
|
5721
|
-
}, [it,
|
|
5720
|
+
}, [it, pe, Je]), re = oe(
|
|
5722
5721
|
() => {
|
|
5723
|
-
const W = Object.entries(x).flatMap(([
|
|
5724
|
-
key:
|
|
5722
|
+
const W = Object.entries(x).flatMap(([be, Oe]) => fr(Oe, be)).map(({
|
|
5723
|
+
key: be,
|
|
5725
5724
|
disabled: Oe
|
|
5726
5725
|
}) => {
|
|
5727
|
-
const fe = zi(x,
|
|
5726
|
+
const fe = zi(x, be);
|
|
5728
5727
|
if (!fe)
|
|
5729
|
-
throw Error("Internal error: no property found in path " +
|
|
5728
|
+
throw Error("Internal error: no property found in path " + be);
|
|
5730
5729
|
const Ze = yo(fe);
|
|
5731
5730
|
return {
|
|
5732
|
-
key:
|
|
5731
|
+
key: be,
|
|
5733
5732
|
align: Ws(fe),
|
|
5734
5733
|
icon: (Xe) => Ie(fe, "small"),
|
|
5735
|
-
title: fe.name ??
|
|
5736
|
-
sortable: X && (t ? Object.keys(t).includes(
|
|
5734
|
+
title: fe.name ?? be,
|
|
5735
|
+
sortable: X && (t ? Object.keys(t).includes(be) : !0),
|
|
5737
5736
|
filter: !T && Ze,
|
|
5738
5737
|
width: ao(fe),
|
|
5739
5738
|
resizable: !0,
|
|
@@ -5741,14 +5740,14 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5741
5740
|
resolvedProperty: fe,
|
|
5742
5741
|
disabled: Oe
|
|
5743
5742
|
},
|
|
5744
|
-
AdditionalHeaderWidget: ({ onHover: Xe }) => D ? /* @__PURE__ */ i(D, { property: fe, propertyKey:
|
|
5743
|
+
AdditionalHeaderWidget: ({ onHover: Xe }) => D ? /* @__PURE__ */ i(D, { property: fe, propertyKey: be, onHover: Xe }) : void 0
|
|
5745
5744
|
};
|
|
5746
|
-
}), Be = b ? b.map((
|
|
5747
|
-
key:
|
|
5745
|
+
}), Be = b ? b.map((be) => ({
|
|
5746
|
+
key: be.key,
|
|
5748
5747
|
align: "left",
|
|
5749
5748
|
sortable: !1,
|
|
5750
|
-
title:
|
|
5751
|
-
width:
|
|
5749
|
+
title: be.name,
|
|
5750
|
+
width: be.width ?? 200
|
|
5752
5751
|
})) : [];
|
|
5753
5752
|
return [...W, ...Be];
|
|
5754
5753
|
},
|
|
@@ -5762,15 +5761,15 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5762
5761
|
headerAlign: "center",
|
|
5763
5762
|
align: "center",
|
|
5764
5763
|
AdditionalHeaderWidget: () => $
|
|
5765
|
-
}), [ne, F]),
|
|
5764
|
+
}), [ne, F]), ve = oe(() => [
|
|
5766
5765
|
ie,
|
|
5767
5766
|
...v.map((W) => re.find((Be) => Be.key === W.key)).filter(Boolean)
|
|
5768
5767
|
], [re, v, ie]), Ue = w((W) => {
|
|
5769
|
-
const Be = W.column,
|
|
5768
|
+
const Be = W.column, be = W.columns, Oe = Be.key;
|
|
5770
5769
|
if (W.columnIndex === 0)
|
|
5771
5770
|
return l ? l({
|
|
5772
5771
|
entity: W.rowData,
|
|
5773
|
-
size:
|
|
5772
|
+
size: pe,
|
|
5774
5773
|
width: Be.width,
|
|
5775
5774
|
frozen: Be.frozen
|
|
5776
5775
|
}) : /* @__PURE__ */ i(
|
|
@@ -5780,15 +5779,15 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5780
5779
|
width: Be.width,
|
|
5781
5780
|
frozen: Be.frozen,
|
|
5782
5781
|
isSelected: !1,
|
|
5783
|
-
size:
|
|
5782
|
+
size: pe
|
|
5784
5783
|
}
|
|
5785
5784
|
);
|
|
5786
5785
|
if (it[Oe])
|
|
5787
5786
|
return K(W);
|
|
5788
|
-
if (W.columnIndex <
|
|
5787
|
+
if (W.columnIndex < be.length + 1)
|
|
5789
5788
|
return O(W);
|
|
5790
5789
|
throw Error("Internal: columns not mapped properly");
|
|
5791
|
-
}, [it, l,
|
|
5790
|
+
}, [it, l, pe, K, O]), Dt = w((W) => {
|
|
5792
5791
|
R?.({ ...W, ...t });
|
|
5793
5792
|
}, [t]);
|
|
5794
5793
|
return /* @__PURE__ */ i(
|
|
@@ -5798,7 +5797,7 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5798
5797
|
setPopupCell: ae,
|
|
5799
5798
|
select: Ft,
|
|
5800
5799
|
onValueChange: c,
|
|
5801
|
-
size:
|
|
5800
|
+
size: pe,
|
|
5802
5801
|
selectedCell: tt,
|
|
5803
5802
|
selectedEntityIds: Je
|
|
5804
5803
|
},
|
|
@@ -5810,7 +5809,7 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5810
5809
|
filterIsSet: It,
|
|
5811
5810
|
onTextSearch: g ? Nt : void 0,
|
|
5812
5811
|
clearFilter: H,
|
|
5813
|
-
size:
|
|
5812
|
+
size: pe,
|
|
5814
5813
|
onSizeChanged: rt,
|
|
5815
5814
|
title: o,
|
|
5816
5815
|
actionsStart: n,
|
|
@@ -5822,7 +5821,7 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5822
5821
|
Sa,
|
|
5823
5822
|
{
|
|
5824
5823
|
data: C,
|
|
5825
|
-
columns:
|
|
5824
|
+
columns: ve,
|
|
5826
5825
|
cellRenderer: Ue,
|
|
5827
5826
|
onRowClick: p ? void 0 : m ? nt : void 0,
|
|
5828
5827
|
onEndReached: bt,
|
|
@@ -5830,7 +5829,7 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5830
5829
|
error: I,
|
|
5831
5830
|
paginationEnabled: j,
|
|
5832
5831
|
onColumnResize: f,
|
|
5833
|
-
size:
|
|
5832
|
+
size: pe,
|
|
5834
5833
|
loading: k,
|
|
5835
5834
|
filter: S,
|
|
5836
5835
|
onFilterUpdate: R ? Dt : void 0,
|
|
@@ -5843,7 +5842,7 @@ const Ta = {}, vo = Q.createContext(Ta), Oa = () => Ye(vo), bo = Q.memo(
|
|
|
5843
5842
|
rowClassName: w((W) => Je?.includes(W.id) ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "", [Je]),
|
|
5844
5843
|
className: "flex-grow",
|
|
5845
5844
|
endAdornment: ge,
|
|
5846
|
-
AddColumnComponent:
|
|
5845
|
+
AddColumnComponent: he
|
|
5847
5846
|
}
|
|
5848
5847
|
)
|
|
5849
5848
|
] })
|
|
@@ -5958,7 +5957,7 @@ function wo({
|
|
|
5958
5957
|
initialFilter: l,
|
|
5959
5958
|
initialSort: s,
|
|
5960
5959
|
forceFilter: a
|
|
5961
|
-
} = t, [c, A] = Q.useState(void 0), u =
|
|
5960
|
+
} = t, [c, A] = Q.useState(void 0), u = we(), m = _e(), f = oe(() => u.resolveAliasesFrom(e), [e, u.resolveAliasesFrom]), d = o ?? a, g = t.pagination === void 0 || !!t.pagination, h = typeof t.pagination == "number" ? t.pagination : za, [p, b] = Q.useState(), [v, y] = Q.useState(g ? h : void 0), x = w((j, Y) => m.isFilterCombinationValid ? m.isFilterCombinationValid({
|
|
5962
5961
|
path: f,
|
|
5963
5962
|
collection: t,
|
|
5964
5963
|
filterValues: j,
|
|
@@ -6119,7 +6118,7 @@ function Eo({
|
|
|
6119
6118
|
!g && /* @__PURE__ */ i("div", { className: "p-4", children: S })
|
|
6120
6119
|
] }),
|
|
6121
6120
|
/* @__PURE__ */ E(xt, { children: [
|
|
6122
|
-
u && /* @__PURE__ */ i(
|
|
6121
|
+
u && /* @__PURE__ */ i(un, { size: "small" }),
|
|
6123
6122
|
/* @__PURE__ */ i(
|
|
6124
6123
|
ce,
|
|
6125
6124
|
{
|
|
@@ -6146,7 +6145,7 @@ function Eo({
|
|
|
6146
6145
|
}
|
|
6147
6146
|
);
|
|
6148
6147
|
}
|
|
6149
|
-
function
|
|
6148
|
+
function sn(e) {
|
|
6150
6149
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
6151
6150
|
}
|
|
6152
6151
|
function Ua({
|
|
@@ -6193,7 +6192,7 @@ function Ua({
|
|
|
6193
6192
|
{
|
|
6194
6193
|
variant: "text",
|
|
6195
6194
|
disabled: !g?.length || !p,
|
|
6196
|
-
startIcon: /* @__PURE__ */ i(
|
|
6195
|
+
startIcon: /* @__PURE__ */ i(Tn, {}),
|
|
6197
6196
|
onClick: o,
|
|
6198
6197
|
color: "primary",
|
|
6199
6198
|
className: "lg:w-20",
|
|
@@ -6209,11 +6208,11 @@ function Ua({
|
|
|
6209
6208
|
color: "primary",
|
|
6210
6209
|
disabled: !g?.length || !p,
|
|
6211
6210
|
onClick: o,
|
|
6212
|
-
children: /* @__PURE__ */ i(
|
|
6211
|
+
children: /* @__PURE__ */ i(Tn, {})
|
|
6213
6212
|
}
|
|
6214
6213
|
);
|
|
6215
6214
|
b = /* @__PURE__ */ i(
|
|
6216
|
-
|
|
6215
|
+
ye,
|
|
6217
6216
|
{
|
|
6218
6217
|
title: p ? "Delete" : "You have selected at least one entity you cannot delete",
|
|
6219
6218
|
children: x
|
|
@@ -6229,9 +6228,9 @@ function Ua({
|
|
|
6229
6228
|
context: u,
|
|
6230
6229
|
tableController: c,
|
|
6231
6230
|
collectionEntitiesCount: A
|
|
6232
|
-
}, y =
|
|
6231
|
+
}, y = sn(e.Actions).map((x, C) => /* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(x, { ...v }) }, `actions_${C}`));
|
|
6233
6232
|
return m && m.forEach((x, C) => {
|
|
6234
|
-
x.collections?.CollectionActions && y.push(...
|
|
6233
|
+
x.collections?.CollectionActions && y.push(...sn(x.collections?.CollectionActions).map((k, B) => /* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(k, { ...v, ...x.collections?.collectionActionsProps }) }, `plugin_actions_${C}_${B}`)));
|
|
6235
6234
|
}), /* @__PURE__ */ E(G, { children: [
|
|
6236
6235
|
y,
|
|
6237
6236
|
b,
|
|
@@ -6280,7 +6279,7 @@ function $a({
|
|
|
6280
6279
|
}
|
|
6281
6280
|
function ja() {
|
|
6282
6281
|
const [e, t] = P({ width: 0, height: 0 });
|
|
6283
|
-
return
|
|
6282
|
+
return Rn(() => {
|
|
6284
6283
|
function n() {
|
|
6285
6284
|
t({ width: window.innerWidth, height: window.innerHeight });
|
|
6286
6285
|
}
|
|
@@ -6375,7 +6374,7 @@ function dd({
|
|
|
6375
6374
|
}
|
|
6376
6375
|
);
|
|
6377
6376
|
return r ? /* @__PURE__ */ i(
|
|
6378
|
-
|
|
6377
|
+
ye,
|
|
6379
6378
|
{
|
|
6380
6379
|
title: r,
|
|
6381
6380
|
children: a
|
|
@@ -6413,7 +6412,7 @@ function Qe({
|
|
|
6413
6412
|
}
|
|
6414
6413
|
),
|
|
6415
6414
|
n.longDescription && /* @__PURE__ */ i(
|
|
6416
|
-
|
|
6415
|
+
ye,
|
|
6417
6416
|
{
|
|
6418
6417
|
title: n.longDescription,
|
|
6419
6418
|
side: "bottom",
|
|
@@ -6632,7 +6631,7 @@ function _a({
|
|
|
6632
6631
|
value: t,
|
|
6633
6632
|
setValue: A
|
|
6634
6633
|
});
|
|
6635
|
-
const p =
|
|
6634
|
+
const p = we(), b = oe(() => m.path ? p.getCollection(m.path) : void 0, [m.path]);
|
|
6636
6635
|
if (!b)
|
|
6637
6636
|
throw Error(`Couldn't find the corresponding collection for the path: ${m.path}`);
|
|
6638
6637
|
const v = w((I) => {
|
|
@@ -6746,7 +6745,7 @@ function Bo({
|
|
|
6746
6745
|
size: s
|
|
6747
6746
|
}) {
|
|
6748
6747
|
return /* @__PURE__ */ E("div", { className: Z(
|
|
6749
|
-
|
|
6748
|
+
dn,
|
|
6750
6749
|
"relative m-4 border-box flex items-center justify-center",
|
|
6751
6750
|
s === "medium" ? "min-w-[220px] min-h-[220px] max-w-[220px]" : "min-w-[118px] min-h-[118px] max-w-[118px]"
|
|
6752
6751
|
), children: [
|
|
@@ -6755,7 +6754,7 @@ function Bo({
|
|
|
6755
6754
|
{
|
|
6756
6755
|
className: "absolute rounded-full -top-2 -right-2 z-10 bg-white dark:bg-gray-900",
|
|
6757
6756
|
children: /* @__PURE__ */ i(
|
|
6758
|
-
|
|
6757
|
+
ye,
|
|
6759
6758
|
{
|
|
6760
6759
|
title: "Remove",
|
|
6761
6760
|
children: /* @__PURE__ */ i(
|
|
@@ -7314,7 +7313,7 @@ function xo({
|
|
|
7314
7313
|
/* @__PURE__ */ i(
|
|
7315
7314
|
"div",
|
|
7316
7315
|
{
|
|
7317
|
-
className: Z(
|
|
7316
|
+
className: Z(dn, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"),
|
|
7318
7317
|
children: /* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(
|
|
7319
7318
|
Fe,
|
|
7320
7319
|
{
|
|
@@ -7360,7 +7359,7 @@ function ic({
|
|
|
7360
7359
|
value: e,
|
|
7361
7360
|
setValue: t
|
|
7362
7361
|
});
|
|
7363
|
-
const m = e && e instanceof je, f =
|
|
7362
|
+
const m = e && e instanceof je, f = we(), d = oe(() => c.path ? f.getCollection(c.path) : void 0, [c.path]);
|
|
7364
7363
|
if (!d)
|
|
7365
7364
|
throw Error(`Couldn't find the corresponding collection for the path: ${c.path}`);
|
|
7366
7365
|
const g = w((b) => {
|
|
@@ -7434,7 +7433,7 @@ const kt = Q.memo(oc, (e, t) => {
|
|
|
7434
7433
|
if (e.propertyKey !== t.propertyKey)
|
|
7435
7434
|
return !1;
|
|
7436
7435
|
const n = Me(e.property) || e.property.fromBuilder, r = Me(t.property) || t.property.fromBuilder;
|
|
7437
|
-
return !((n === r || ue(e.property, t.property)) && e.disabled === t.disabled) ||
|
|
7436
|
+
return !((n === r || ue(e.property, t.property)) && e.disabled === t.disabled) || an(t.property), !1;
|
|
7438
7437
|
});
|
|
7439
7438
|
function oc({
|
|
7440
7439
|
propertyKey: e,
|
|
@@ -7448,7 +7447,7 @@ function oc({
|
|
|
7448
7447
|
partOfBlock: c,
|
|
7449
7448
|
autoFocus: A
|
|
7450
7449
|
}) {
|
|
7451
|
-
const u = ee(), f =
|
|
7450
|
+
const u = ee(), f = an(t, u.plugins) ? $o : ii;
|
|
7452
7451
|
return /* @__PURE__ */ i(
|
|
7453
7452
|
f,
|
|
7454
7453
|
{
|
|
@@ -7464,7 +7463,7 @@ function oc({
|
|
|
7464
7463
|
entityId: n.entityId,
|
|
7465
7464
|
fields: u.propertyConfigs
|
|
7466
7465
|
});
|
|
7467
|
-
if (h === null ||
|
|
7466
|
+
if (h === null || mn(h))
|
|
7468
7467
|
return /* @__PURE__ */ i(G, {});
|
|
7469
7468
|
if (Lt(h))
|
|
7470
7469
|
g = xo;
|
|
@@ -7522,7 +7521,7 @@ function lc({
|
|
|
7522
7521
|
},
|
|
7523
7522
|
fieldProps: m
|
|
7524
7523
|
}) {
|
|
7525
|
-
const { plugins: f } = ee(), d = n.customProps, g = m.field.value, h = m.meta.initialValue, p =
|
|
7524
|
+
const { plugins: f } = ee(), d = n.customProps, g = m.field.value, h = m.meta.initialValue, p = Pn(m.form.errors, t), b = Pn(m.form.touched, t), v = p && (m.form.submitCount > 0 || n.validation?.unique) && (!Array.isArray(p) || !!p.filter((I) => !!I).length);
|
|
7526
7525
|
sc(A.path, A.collection, t, n, e, f);
|
|
7527
7526
|
const y = e, x = m.form.isSubmitting, C = w((I, S) => {
|
|
7528
7527
|
m.form.setFieldTouched(t, !0, !1), m.form.setFieldValue(t, I, S);
|
|
@@ -7554,11 +7553,11 @@ function lc({
|
|
|
7554
7553
|
o && !x && /* @__PURE__ */ i(J, { variant: "caption", className: "ml-3.5", children: "This value has been updated elsewhere" })
|
|
7555
7554
|
] });
|
|
7556
7555
|
}
|
|
7557
|
-
const
|
|
7556
|
+
const an = (e, t) => {
|
|
7558
7557
|
if (t?.some((o) => o.form?.fieldBuilder) || Me(e))
|
|
7559
7558
|
return !0;
|
|
7560
7559
|
const n = e, r = !!n.Field || "fromBuilder" in n && n.fromBuilder;
|
|
7561
|
-
return n.dataType === "map" && n.properties ? r || Object.values(n.properties).some((o) =>
|
|
7560
|
+
return n.dataType === "map" && n.properties ? r || Object.values(n.properties).some((o) => an(o, t)) : n.dataType === "array" && "resolvedProperties" in n ? r || n.resolvedProperties?.some((o) => o && an(o, t)) : r;
|
|
7562
7561
|
};
|
|
7563
7562
|
function sc(e, t, n, r, o, l) {
|
|
7564
7563
|
return de((() => {
|
|
@@ -7604,7 +7603,7 @@ function ac({
|
|
|
7604
7603
|
l.properties,
|
|
7605
7604
|
...Object.keys(t).filter((v) => v in l.properties)
|
|
7606
7605
|
) : h = {} : h = l.properties;
|
|
7607
|
-
const p = /* @__PURE__ */ i(G, { children: /* @__PURE__ */ i("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([v, y]) => !
|
|
7606
|
+
const p = /* @__PURE__ */ i(G, { children: /* @__PURE__ */ i("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([v, y]) => !mn(y)).map(
|
|
7608
7607
|
([v, y], x) => {
|
|
7609
7608
|
const C = {
|
|
7610
7609
|
propertyKey: `${e}.${v}`,
|
|
@@ -7721,7 +7720,7 @@ function gr({
|
|
|
7721
7720
|
disabled: r
|
|
7722
7721
|
}) {
|
|
7723
7722
|
const [o, l] = Q.useState(
|
|
7724
|
-
Object.keys(e ?? {}).map((c) => [
|
|
7723
|
+
Object.keys(e ?? {}).map((c) => [Fn(), {
|
|
7725
7724
|
key: c,
|
|
7726
7725
|
dataType: Ln(e?.[c]) ?? "string"
|
|
7727
7726
|
}])
|
|
@@ -7729,7 +7728,7 @@ function gr({
|
|
|
7729
7728
|
V(() => {
|
|
7730
7729
|
const c = o.map(([d, { key: g }]) => g), A = Object.entries(e ?? {}).filter(([d, g]) => g !== void 0).map(([d]) => d), u = A.filter((d) => !c.includes(d)), m = c.filter((d) => !A.includes(d)), f = [...o];
|
|
7731
7730
|
u.forEach((d) => {
|
|
7732
|
-
f.push([
|
|
7731
|
+
f.push([Fn(), {
|
|
7733
7732
|
key: d,
|
|
7734
7733
|
dataType: Ln(e?.[d]) ?? "string"
|
|
7735
7734
|
}]);
|
|
@@ -7805,7 +7804,7 @@ function gr({
|
|
|
7805
7804
|
c.preventDefault(), t({
|
|
7806
7805
|
...e ?? {},
|
|
7807
7806
|
"": null
|
|
7808
|
-
}), l([...o, [
|
|
7807
|
+
}), l([...o, [Fn(), {
|
|
7809
7808
|
key: "",
|
|
7810
7809
|
dataType: "string"
|
|
7811
7810
|
}]]);
|
|
@@ -8185,7 +8184,7 @@ function dc({
|
|
|
8185
8184
|
l === "map" && c(n, l)
|
|
8186
8185
|
] });
|
|
8187
8186
|
}
|
|
8188
|
-
function
|
|
8187
|
+
function Fn() {
|
|
8189
8188
|
return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
|
|
8190
8189
|
}
|
|
8191
8190
|
function Ln(e) {
|
|
@@ -8405,7 +8404,7 @@ function mc({
|
|
|
8405
8404
|
const y = v ? l[v] : void 0;
|
|
8406
8405
|
u(v), m.setFieldTouched(g), m.setFieldValue(g, v), m.setFieldValue(h, y ? or(y) : null);
|
|
8407
8406
|
};
|
|
8408
|
-
return /* @__PURE__ */ E("div", { className: Z(
|
|
8407
|
+
return /* @__PURE__ */ E("div", { className: Z(dn, "bg-transparent p-4 my-4 py-8"), children: [
|
|
8409
8408
|
/* @__PURE__ */ i(
|
|
8410
8409
|
ii,
|
|
8411
8410
|
{
|
|
@@ -8464,9 +8463,9 @@ function mc({
|
|
|
8464
8463
|
}
|
|
8465
8464
|
const gc = new Gl();
|
|
8466
8465
|
try {
|
|
8467
|
-
Xt.use(
|
|
8466
|
+
Xt.use(En.AutoResize, {
|
|
8468
8467
|
min: 100
|
|
8469
|
-
}), Xt.unuse(
|
|
8468
|
+
}), Xt.unuse(En.FontUnderline), Xt.unuse(En.Clear);
|
|
8470
8469
|
} catch {
|
|
8471
8470
|
}
|
|
8472
8471
|
function hc({
|
|
@@ -9246,7 +9245,7 @@ function wc({
|
|
|
9246
9245
|
name: "id",
|
|
9247
9246
|
value: (l && n === "existing" ? l.id : t) ?? "",
|
|
9248
9247
|
endAdornment: l ? /* @__PURE__ */ E(G, { children: [
|
|
9249
|
-
/* @__PURE__ */ i(
|
|
9248
|
+
/* @__PURE__ */ i(ye, { title: "Copy", children: /* @__PURE__ */ i(
|
|
9250
9249
|
se,
|
|
9251
9250
|
{
|
|
9252
9251
|
onClick: (d) => u(l.id),
|
|
@@ -9254,7 +9253,7 @@ function wc({
|
|
|
9254
9253
|
children: /* @__PURE__ */ i(en, { size: "small" })
|
|
9255
9254
|
}
|
|
9256
9255
|
) }),
|
|
9257
|
-
m?.entityLinkBuilder && /* @__PURE__ */ i(
|
|
9256
|
+
m?.entityLinkBuilder && /* @__PURE__ */ i(ye, { title: "Open in the console", children: /* @__PURE__ */ i(
|
|
9258
9257
|
se,
|
|
9259
9258
|
{
|
|
9260
9259
|
component: "a",
|
|
@@ -9263,7 +9262,7 @@ function wc({
|
|
|
9263
9262
|
target: "_blank",
|
|
9264
9263
|
onClick: (d) => d.stopPropagation(),
|
|
9265
9264
|
"aria-label": "go-to-datasource",
|
|
9266
|
-
children: /* @__PURE__ */ i(
|
|
9265
|
+
children: /* @__PURE__ */ i(cn, { size: "small" })
|
|
9267
9266
|
}
|
|
9268
9267
|
) })
|
|
9269
9268
|
] }) : void 0
|
|
@@ -9365,7 +9364,7 @@ const Ec = {
|
|
|
9365
9364
|
}), Promise.resolve(void 0);
|
|
9366
9365
|
}
|
|
9367
9366
|
}, Io = {
|
|
9368
|
-
icon: /* @__PURE__ */ i(
|
|
9367
|
+
icon: /* @__PURE__ */ i(Tn, {}),
|
|
9369
9368
|
name: "Delete",
|
|
9370
9369
|
onClick({
|
|
9371
9370
|
entity: e,
|
|
@@ -9465,7 +9464,7 @@ function xc({
|
|
|
9465
9464
|
}
|
|
9466
9465
|
}, [C, U, e]);
|
|
9467
9466
|
const j = oe(() => M && e === "existing" ? Object.entries(te.properties).map(([D, $]) => {
|
|
9468
|
-
if (
|
|
9467
|
+
if (mn($))
|
|
9469
9468
|
return {};
|
|
9470
9469
|
const q = M[D], ne = x[D];
|
|
9471
9470
|
return ue(q, ne) ? {} : { [D]: ne };
|
|
@@ -9520,7 +9519,7 @@ function xc({
|
|
|
9520
9519
|
_
|
|
9521
9520
|
) : void 0,
|
|
9522
9521
|
[C, te.properties, _]
|
|
9523
|
-
), ge = ht(),
|
|
9522
|
+
), ge = ht(), he = w(({ entity: D, customEntityActions: $ }) => {
|
|
9524
9523
|
const q = Gt(n, ge, $e(t), null), ne = D ? cr(n, ge, $e(t), D) : !0, F = [];
|
|
9525
9524
|
return q && F.push(ko), ne && F.push(Io), $ && F.push(...$), F;
|
|
9526
9525
|
}, [ge, n, t]);
|
|
@@ -9618,7 +9617,7 @@ function xc({
|
|
|
9618
9617
|
savingError: S,
|
|
9619
9618
|
closeAfterSaveRef: y,
|
|
9620
9619
|
autoSave: m,
|
|
9621
|
-
entityActions:
|
|
9620
|
+
entityActions: he({ entity: r, customEntityActions: n.entityActions })
|
|
9622
9621
|
}
|
|
9623
9622
|
)
|
|
9624
9623
|
]
|
|
@@ -9664,7 +9663,7 @@ function Cc(e) {
|
|
|
9664
9663
|
if (!R)
|
|
9665
9664
|
return console.warn(`Property ${S} not found in collection ${A.name}`), null;
|
|
9666
9665
|
const N = !!o && Object.keys(o).includes(S) && !!a[S], M = !p && u || Lt(R) || !!R.disabled;
|
|
9667
|
-
if (
|
|
9666
|
+
if (mn(R))
|
|
9668
9667
|
return null;
|
|
9669
9668
|
const H = {
|
|
9670
9669
|
propertyKey: S,
|
|
@@ -9840,13 +9839,13 @@ function Ic({
|
|
|
9840
9839
|
R.current = !1;
|
|
9841
9840
|
},
|
|
9842
9841
|
[r, v]
|
|
9843
|
-
),
|
|
9842
|
+
), Rn(
|
|
9844
9843
|
() => {
|
|
9845
9844
|
const Y = I.current?.getBoundingClientRect();
|
|
9846
9845
|
!s || !Y || R.current || (U(), R.current = !0);
|
|
9847
9846
|
},
|
|
9848
9847
|
[s, U, R.current]
|
|
9849
|
-
),
|
|
9848
|
+
), Rn(
|
|
9850
9849
|
() => {
|
|
9851
9850
|
U(h);
|
|
9852
9851
|
},
|
|
@@ -9904,7 +9903,7 @@ function Ic({
|
|
|
9904
9903
|
);
|
|
9905
9904
|
if (!k)
|
|
9906
9905
|
return /* @__PURE__ */ i(G, {});
|
|
9907
|
-
const ge = X,
|
|
9906
|
+
const ge = X, he = {
|
|
9908
9907
|
collection: k,
|
|
9909
9908
|
entityId: b,
|
|
9910
9909
|
values: Y,
|
|
@@ -9917,7 +9916,7 @@ function Ic({
|
|
|
9917
9916
|
property: D,
|
|
9918
9917
|
includeDescription: !1,
|
|
9919
9918
|
underlyingValueHasChanged: !1,
|
|
9920
|
-
context:
|
|
9919
|
+
context: he,
|
|
9921
9920
|
tableMode: !0,
|
|
9922
9921
|
partOfArray: !1,
|
|
9923
9922
|
partOfBlock: !1,
|
|
@@ -9975,7 +9974,7 @@ function Ic({
|
|
|
9975
9974
|
entity: v,
|
|
9976
9975
|
context: f,
|
|
9977
9976
|
currentEntityId: b,
|
|
9978
|
-
formContext:
|
|
9977
|
+
formContext: he,
|
|
9979
9978
|
...F.form.provider.props,
|
|
9980
9979
|
children: q
|
|
9981
9980
|
}
|
|
@@ -10053,7 +10052,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10053
10052
|
className: o,
|
|
10054
10053
|
...l
|
|
10055
10054
|
}) {
|
|
10056
|
-
const s = _e(), a =
|
|
10055
|
+
const s = _e(), a = we(), c = pt(), A = ht(), u = Ct(), m = ee(), f = Q.useRef(null), d = oe(() => {
|
|
10057
10056
|
const O = u?.getCollectionConfig(t);
|
|
10058
10057
|
return O ? Le(l, O) : l;
|
|
10059
10058
|
}, [l, t, u?.getCollectionConfig]), g = Gt(d, A, $e(t), null), [h, p] = P(void 0), [b, v] = Q.useState(void 0), [y, x] = Q.useState(0), [C, k] = P(0), B = w(() => {
|
|
@@ -10086,7 +10085,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10086
10085
|
collection: d,
|
|
10087
10086
|
updateUrl: !0,
|
|
10088
10087
|
onClose: B
|
|
10089
|
-
})), [t, d, c]),
|
|
10088
|
+
})), [t, d, c]), he = w(() => {
|
|
10090
10089
|
m.onAnalyticsEvent?.("new_entity_click", {
|
|
10091
10090
|
path: t
|
|
10092
10091
|
}), c.open({
|
|
@@ -10131,7 +10130,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10131
10130
|
F(t, re);
|
|
10132
10131
|
}, [d, F, t]), me = w((O) => {
|
|
10133
10132
|
u && F(t, { defaultSize: O });
|
|
10134
|
-
}, [F, t, u]), Ee = Gt(d, A, $e(t), null),
|
|
10133
|
+
}, [F, t, u]), Ee = Gt(d, A, $e(t), null), pe = w(
|
|
10135
10134
|
({
|
|
10136
10135
|
name: O,
|
|
10137
10136
|
value: K,
|
|
@@ -10144,7 +10143,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10144
10143
|
context: K,
|
|
10145
10144
|
value: re,
|
|
10146
10145
|
propertyKey: ie,
|
|
10147
|
-
onValueUpdated:
|
|
10146
|
+
onValueUpdated: ve,
|
|
10148
10147
|
setError: Ue,
|
|
10149
10148
|
entity: Dt
|
|
10150
10149
|
}) => {
|
|
@@ -10162,9 +10161,9 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10162
10161
|
callbacks: d.callbacks,
|
|
10163
10162
|
dataSource: s,
|
|
10164
10163
|
context: K,
|
|
10165
|
-
onSaveSuccess: () =>
|
|
10166
|
-
onSaveFailure: (
|
|
10167
|
-
console.error("Save failure"), console.error(
|
|
10164
|
+
onSaveSuccess: () => ve(),
|
|
10165
|
+
onSaveFailure: (be) => {
|
|
10166
|
+
console.error("Save failure"), console.error(be), Ue(be);
|
|
10168
10167
|
}
|
|
10169
10168
|
});
|
|
10170
10169
|
}, tt = a.resolveAliasesFrom(t), qe = oe(() => Ge({
|
|
@@ -10198,8 +10197,8 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10198
10197
|
color: "primary",
|
|
10199
10198
|
variant: "outlined",
|
|
10200
10199
|
startIcon: /* @__PURE__ */ i(Jn, { size: "small" }),
|
|
10201
|
-
onClick: (
|
|
10202
|
-
|
|
10200
|
+
onClick: (ve) => {
|
|
10201
|
+
ve.stopPropagation(), c.open({
|
|
10203
10202
|
path: t,
|
|
10204
10203
|
entityId: ie.id,
|
|
10205
10204
|
selectedSubPath: re.id ?? re.path,
|
|
@@ -10217,13 +10216,13 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10217
10216
|
dependencies: [],
|
|
10218
10217
|
Builder: ({ entity: re }) => {
|
|
10219
10218
|
const ie = a.getParentReferencesFromPath(re.path);
|
|
10220
|
-
return /* @__PURE__ */ i(G, { children: ie.map((
|
|
10219
|
+
return /* @__PURE__ */ i(G, { children: ie.map((ve) => /* @__PURE__ */ i(
|
|
10221
10220
|
He,
|
|
10222
10221
|
{
|
|
10223
|
-
reference:
|
|
10222
|
+
reference: ve,
|
|
10224
10223
|
size: "tiny"
|
|
10225
10224
|
},
|
|
10226
|
-
|
|
10225
|
+
ve.path + "/" + ve.id
|
|
10227
10226
|
)) });
|
|
10228
10227
|
}
|
|
10229
10228
|
}] : [];
|
|
@@ -10238,7 +10237,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10238
10237
|
const re = O ? cr(d, A, $e(t), O) : !0, ie = [Ec];
|
|
10239
10238
|
return Ee && ie.push(ko), re && ie.push(Io), K && ie.push(...K), ie;
|
|
10240
10239
|
}, [A, d, Ee, t]), Nt = w(() => {
|
|
10241
|
-
const O = rt({}), K = O.filter((
|
|
10240
|
+
const O = rt({}), K = O.filter((ve) => ve.collapsed !== !1), ie = O.filter((ve) => ve.collapsed === !1).length * (nt ? 40 : 30);
|
|
10242
10241
|
return (nt ? 80 + ie : 70 + ie) + (K.length > 0 ? nt ? 40 : 30 : 0);
|
|
10243
10242
|
}, [nt, rt]), it = w(({
|
|
10244
10243
|
entity: O,
|
|
@@ -10246,14 +10245,14 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10246
10245
|
width: re,
|
|
10247
10246
|
frozen: ie
|
|
10248
10247
|
}) => {
|
|
10249
|
-
const
|
|
10248
|
+
const ve = le(O), Ue = rt({ entity: O, customEntityActions: d.entityActions });
|
|
10250
10249
|
return /* @__PURE__ */ i(
|
|
10251
10250
|
ur,
|
|
10252
10251
|
{
|
|
10253
10252
|
entity: O,
|
|
10254
10253
|
width: re,
|
|
10255
10254
|
frozen: ie,
|
|
10256
|
-
isSelected:
|
|
10255
|
+
isSelected: ve,
|
|
10257
10256
|
selectionEnabled: S,
|
|
10258
10257
|
size: K,
|
|
10259
10258
|
highlightEntity: p,
|
|
@@ -10295,7 +10294,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10295
10294
|
}
|
|
10296
10295
|
)
|
|
10297
10296
|
] }),
|
|
10298
|
-
children: d.description && /* @__PURE__ */ i("div", { className: "m-4 text-gray-900 dark:text-white", children: /* @__PURE__ */ i(
|
|
10297
|
+
children: d.description && /* @__PURE__ */ i("div", { className: "m-4 text-gray-900 dark:text-white", children: /* @__PURE__ */ i(An, { source: d.description }) })
|
|
10299
10298
|
}
|
|
10300
10299
|
);
|
|
10301
10300
|
function Qt({
|
|
@@ -10303,7 +10302,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10303
10302
|
propertyKey: K,
|
|
10304
10303
|
onHover: re
|
|
10305
10304
|
}) {
|
|
10306
|
-
return m.plugins ? /* @__PURE__ */ i(G, { children: m.plugins.filter((ie) => ie.collectionView?.HeaderAction).map((ie,
|
|
10305
|
+
return m.plugins ? /* @__PURE__ */ i(G, { children: m.plugins.filter((ie) => ie.collectionView?.HeaderAction).map((ie, ve) => {
|
|
10307
10306
|
const Ue = ie.collectionView.HeaderAction;
|
|
10308
10307
|
return /* @__PURE__ */ i(
|
|
10309
10308
|
Ue,
|
|
@@ -10315,7 +10314,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10315
10314
|
collection: d,
|
|
10316
10315
|
parentCollectionIds: n ?? []
|
|
10317
10316
|
},
|
|
10318
|
-
`plugin_header_action_${
|
|
10317
|
+
`plugin_header_action_${ve}`
|
|
10319
10318
|
);
|
|
10320
10319
|
}) }) : null;
|
|
10321
10320
|
}
|
|
@@ -10346,7 +10345,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10346
10345
|
onColumnResize: T,
|
|
10347
10346
|
onValueChange: Se,
|
|
10348
10347
|
tableRowActionsBuilder: it,
|
|
10349
|
-
uniqueFieldValidator:
|
|
10348
|
+
uniqueFieldValidator: pe,
|
|
10350
10349
|
title: Ft,
|
|
10351
10350
|
selectionController: H,
|
|
10352
10351
|
highlightedEntities: h ? [h] : [],
|
|
@@ -10360,7 +10359,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10360
10359
|
collection: d,
|
|
10361
10360
|
tableController: Y,
|
|
10362
10361
|
onMultipleDeleteClick: D,
|
|
10363
|
-
onNewClick:
|
|
10362
|
+
onNewClick: he,
|
|
10364
10363
|
path: t,
|
|
10365
10364
|
relativePath: d.path,
|
|
10366
10365
|
selectionController: H,
|
|
@@ -10375,7 +10374,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10375
10374
|
{
|
|
10376
10375
|
color: "primary",
|
|
10377
10376
|
variant: "outlined",
|
|
10378
|
-
onClick:
|
|
10377
|
+
onClick: he,
|
|
10379
10378
|
className: "mt-4",
|
|
10380
10379
|
children: [
|
|
10381
10380
|
/* @__PURE__ */ i(dt, {}),
|
|
@@ -10409,7 +10408,7 @@ const Sc = "collectionGroupParent", So = Q.memo(
|
|
|
10409
10408
|
collection: d,
|
|
10410
10409
|
entity: _?.entity,
|
|
10411
10410
|
tableKey: ae.current,
|
|
10412
|
-
customFieldValidator:
|
|
10411
|
+
customFieldValidator: pe,
|
|
10413
10412
|
path: tt,
|
|
10414
10413
|
onCellValueChange: Se,
|
|
10415
10414
|
container: f.current
|
|
@@ -10454,7 +10453,7 @@ function Nc({
|
|
|
10454
10453
|
sortBy: r,
|
|
10455
10454
|
onCountChange: o
|
|
10456
10455
|
}) {
|
|
10457
|
-
const l = _e(), s =
|
|
10456
|
+
const l = _e(), s = we(), [a, c] = P(void 0), [A, u] = P(void 0), m = r ? r[0] : void 0, f = r ? r[1] : void 0, d = oe(() => s.resolveAliasesFrom(e), [e, s.resolveAliasesFrom]);
|
|
10458
10457
|
return V(() => {
|
|
10459
10458
|
l.countEntities({
|
|
10460
10459
|
path: d,
|
|
@@ -10487,7 +10486,7 @@ function Fc({
|
|
|
10487
10486
|
path: t
|
|
10488
10487
|
}) {
|
|
10489
10488
|
const [n, r] = Q.useState(!1), [o, l] = Q.useState(""), s = pt();
|
|
10490
|
-
return /* @__PURE__ */ i(
|
|
10489
|
+
return /* @__PURE__ */ i(ye, { title: n ? void 0 : "Find by ID", children: /* @__PURE__ */ i(
|
|
10491
10490
|
Hn,
|
|
10492
10491
|
{
|
|
10493
10492
|
open: n,
|
|
@@ -10544,7 +10543,7 @@ function Qc({
|
|
|
10544
10543
|
forceFilter: a,
|
|
10545
10544
|
maxSelection: c
|
|
10546
10545
|
}) {
|
|
10547
|
-
const A = hr(), u = pt(), m =
|
|
10546
|
+
const A = hr(), u = pt(), m = we(), f = ee(), d = m.resolveAliasesFrom(o), g = _e(), [h, p] = P([]), b = No();
|
|
10548
10547
|
V(() => {
|
|
10549
10548
|
let N = !1;
|
|
10550
10549
|
const M = l?.map((U) => U?.toString()).filter(Boolean);
|
|
@@ -10774,7 +10773,7 @@ function Rc({
|
|
|
10774
10773
|
description: l,
|
|
10775
10774
|
onClick: s
|
|
10776
10775
|
}) {
|
|
10777
|
-
const a = Ct(), c =
|
|
10776
|
+
const a = Ct(), c = Yn(n ?? e), A = fn(), u = ee(), m = (a?.favouritePaths ?? []).includes(t);
|
|
10778
10777
|
let f;
|
|
10779
10778
|
if (u.plugins && n) {
|
|
10780
10779
|
const d = {
|
|
@@ -10867,7 +10866,7 @@ function Rc({
|
|
|
10867
10866
|
variant: "body2",
|
|
10868
10867
|
color: "secondary",
|
|
10869
10868
|
component: "div",
|
|
10870
|
-
children: /* @__PURE__ */ i(
|
|
10869
|
+
children: /* @__PURE__ */ i(An, { source: l })
|
|
10871
10870
|
}
|
|
10872
10871
|
)
|
|
10873
10872
|
]
|
|
@@ -10879,7 +10878,7 @@ function Rc({
|
|
|
10879
10878
|
);
|
|
10880
10879
|
}
|
|
10881
10880
|
function Pc({ entry: e }) {
|
|
10882
|
-
const t =
|
|
10881
|
+
const t = fn(), n = Ct();
|
|
10883
10882
|
if (!n)
|
|
10884
10883
|
return null;
|
|
10885
10884
|
const r = n.favouritePaths.includes(e.path), o = (l) => {
|
|
@@ -10914,7 +10913,7 @@ function Pc({ entry: e }) {
|
|
|
10914
10913
|
);
|
|
10915
10914
|
}
|
|
10916
10915
|
function Mc({ hidden: e }) {
|
|
10917
|
-
const t =
|
|
10916
|
+
const t = we(), n = Ct();
|
|
10918
10917
|
if (!n)
|
|
10919
10918
|
return null;
|
|
10920
10919
|
const r = (n?.favouritePaths ?? []).map((o) => t.topLevelNavigation?.navigationEntries.find((l) => l.path === o)).filter(Boolean);
|
|
@@ -10926,10 +10925,10 @@ function Mc({ hidden: e }) {
|
|
|
10926
10925
|
o.path
|
|
10927
10926
|
)) }) });
|
|
10928
10927
|
}
|
|
10929
|
-
const
|
|
10928
|
+
const Qn = {};
|
|
10930
10929
|
function Tc() {
|
|
10931
10930
|
const e = jt(), t = Q.useRef(null), [n, r] = Q.useState(0), [o, l] = Q.useState("down"), s = w(() => {
|
|
10932
|
-
!t.current || !e.key || (
|
|
10931
|
+
!t.current || !e.key || (Qn[e.key] = t.current.scrollTop, r(t.current.scrollTop), l(t.current.scrollTop > n ? "down" : "up"));
|
|
10933
10932
|
}, [t, e.key, n]);
|
|
10934
10933
|
return V(() => {
|
|
10935
10934
|
const a = t.current;
|
|
@@ -10938,9 +10937,9 @@ function Tc() {
|
|
|
10938
10937
|
a && a.removeEventListener("scroll", s);
|
|
10939
10938
|
};
|
|
10940
10939
|
}, [t, s, e]), V(() => {
|
|
10941
|
-
!t.current || !
|
|
10940
|
+
!t.current || !Qn[e.key] || t.current.scrollTo(
|
|
10942
10941
|
{
|
|
10943
|
-
top:
|
|
10942
|
+
top: Qn[e.key],
|
|
10944
10943
|
behavior: "auto"
|
|
10945
10944
|
}
|
|
10946
10945
|
);
|
|
@@ -10960,7 +10959,7 @@ function Oc({
|
|
|
10960
10959
|
additionalChildrenStart: t,
|
|
10961
10960
|
additionalChildrenEnd: n
|
|
10962
10961
|
}) {
|
|
10963
|
-
const r = ee(), o =
|
|
10962
|
+
const r = ee(), o = we();
|
|
10964
10963
|
if (!o.topLevelNavigation)
|
|
10965
10964
|
throw Error("Navigation not ready in FireCMSHomePage");
|
|
10966
10965
|
const {
|
|
@@ -11038,7 +11037,7 @@ function Oc({
|
|
|
11038
11037
|
context: r
|
|
11039
11038
|
};
|
|
11040
11039
|
r.plugins && r.plugins.forEach((B) => {
|
|
11041
|
-
B.homePage?.AdditionalCards && x.push(...
|
|
11040
|
+
B.homePage?.AdditionalCards && x.push(...sn(B.homePage?.AdditionalCards));
|
|
11042
11041
|
});
|
|
11043
11042
|
const k = f.filter((B) => B.group === v || !B.group && v === void 0);
|
|
11044
11043
|
return k.length === 0 && x.length === 0 ? null : /* @__PURE__ */ i(
|
|
@@ -11078,7 +11077,7 @@ function ud({ propertyConfig: e }) {
|
|
|
11078
11077
|
style: {
|
|
11079
11078
|
background: e?.color ?? n?.color ?? "#888"
|
|
11080
11079
|
},
|
|
11081
|
-
children: e?.Icon ?
|
|
11080
|
+
children: e?.Icon ? Vn(e, "medium") : Vn(n, "medium")
|
|
11082
11081
|
}
|
|
11083
11082
|
);
|
|
11084
11083
|
}
|
|
@@ -11308,7 +11307,7 @@ const Yc = function({
|
|
|
11308
11307
|
style: c,
|
|
11309
11308
|
user: A
|
|
11310
11309
|
}) {
|
|
11311
|
-
const u =
|
|
11310
|
+
const u = we(), m = ht(), {
|
|
11312
11311
|
mode: f,
|
|
11313
11312
|
toggleMode: d
|
|
11314
11313
|
} = eo(), g = We(), h = A ?? m.user;
|
|
@@ -11581,7 +11580,7 @@ function Uc({
|
|
|
11581
11580
|
...o.dragHandleProps,
|
|
11582
11581
|
children: [
|
|
11583
11582
|
/* @__PURE__ */ i(
|
|
11584
|
-
|
|
11583
|
+
ye,
|
|
11585
11584
|
{
|
|
11586
11585
|
side: e === "column" ? "left" : void 0,
|
|
11587
11586
|
title: "Move",
|
|
@@ -11607,7 +11606,7 @@ function Uc({
|
|
|
11607
11606
|
),
|
|
11608
11607
|
!a && !s && /* @__PURE__ */ E(G, { children: [
|
|
11609
11608
|
/* @__PURE__ */ i(
|
|
11610
|
-
|
|
11609
|
+
ye,
|
|
11611
11610
|
{
|
|
11612
11611
|
title: "Remove",
|
|
11613
11612
|
side: e === "column" ? "left" : void 0,
|
|
@@ -11629,7 +11628,7 @@ function Uc({
|
|
|
11629
11628
|
}
|
|
11630
11629
|
),
|
|
11631
11630
|
/* @__PURE__ */ i(
|
|
11632
|
-
|
|
11631
|
+
ye,
|
|
11633
11632
|
{
|
|
11634
11633
|
side: e === "column" ? "left" : void 0,
|
|
11635
11634
|
title: "Copy in this position",
|
|
@@ -11696,7 +11695,7 @@ function md({
|
|
|
11696
11695
|
size: A,
|
|
11697
11696
|
className: u
|
|
11698
11697
|
}) {
|
|
11699
|
-
const m =
|
|
11698
|
+
const m = we(), f = oe(() => m.getCollection(n), [n, m]);
|
|
11700
11699
|
if (!f)
|
|
11701
11700
|
throw Error(`Couldn't find the corresponding collection for the path: ${n}`);
|
|
11702
11701
|
const d = w((v) => {
|
|
@@ -11800,7 +11799,7 @@ function De({
|
|
|
11800
11799
|
);
|
|
11801
11800
|
}
|
|
11802
11801
|
function Wt(e) {
|
|
11803
|
-
const t =
|
|
11802
|
+
const t = we(), n = pn(), r = w(() => {
|
|
11804
11803
|
if (e.path) {
|
|
11805
11804
|
let l = e.collection;
|
|
11806
11805
|
if (l || (l = t.getCollection(e.path)), !l)
|
|
@@ -11880,7 +11879,7 @@ function Lc({
|
|
|
11880
11879
|
entityId: t,
|
|
11881
11880
|
collection: o,
|
|
11882
11881
|
useCache: !1
|
|
11883
|
-
}), [X, ge] = P(Y), [
|
|
11882
|
+
}), [X, ge] = P(Y), [he, D] = P(void 0);
|
|
11884
11883
|
V(() => {
|
|
11885
11884
|
Y && ge(Y);
|
|
11886
11885
|
}, [Y]), V(() => {
|
|
@@ -11923,10 +11922,10 @@ function Lc({
|
|
|
11923
11922
|
closeAfterSave: K,
|
|
11924
11923
|
entityId: re,
|
|
11925
11924
|
collection: ie,
|
|
11926
|
-
path:
|
|
11925
|
+
path: ve
|
|
11927
11926
|
}) => {
|
|
11928
11927
|
m(!0), Ki({
|
|
11929
|
-
path:
|
|
11928
|
+
path: ve,
|
|
11930
11929
|
entityId: re,
|
|
11931
11930
|
values: z,
|
|
11932
11931
|
previousValues: O,
|
|
@@ -11945,7 +11944,7 @@ function Lc({
|
|
|
11945
11944
|
entityId: K,
|
|
11946
11945
|
values: re,
|
|
11947
11946
|
previousValues: ie,
|
|
11948
|
-
closeAfterSave:
|
|
11947
|
+
closeAfterSave: ve,
|
|
11949
11948
|
autoSave: Ue
|
|
11950
11949
|
}) => {
|
|
11951
11950
|
k && (Ue ? d(re) : T({
|
|
@@ -11954,9 +11953,9 @@ function Lc({
|
|
|
11954
11953
|
entityId: K,
|
|
11955
11954
|
values: re,
|
|
11956
11955
|
previousValues: ie,
|
|
11957
|
-
closeAfterSave:
|
|
11956
|
+
closeAfterSave: ve
|
|
11958
11957
|
}));
|
|
11959
|
-
}, Ee = M ? M.map((z) => Gi(z, v.entityViews)).filter(Boolean) : [],
|
|
11958
|
+
}, Ee = M ? M.map((z) => Gi(z, v.entityViews)).filter(Boolean) : [], pe = M && Ee.map(
|
|
11960
11959
|
(z, O) => {
|
|
11961
11960
|
if (!z || le.current !== z.key)
|
|
11962
11961
|
return null;
|
|
@@ -11982,7 +11981,7 @@ function Lc({
|
|
|
11982
11981
|
`custom_view_${z.key}`
|
|
11983
11982
|
) : (console.error("customView.Builder is not defined"), null);
|
|
11984
11983
|
}
|
|
11985
|
-
).filter(Boolean), Se = ae && !X || (!X ||
|
|
11984
|
+
).filter(Boolean), Se = ae && !X || (!X || he === void 0) && (k === "existing" || k === "copy"), tt = Se || u, qe = R && R.map(
|
|
11986
11985
|
(z, O) => {
|
|
11987
11986
|
const K = z.id ?? z.path, re = X ? `${e}/${X?.id}/${xe(K)}` : void 0;
|
|
11988
11987
|
return le.current !== K ? null : /* @__PURE__ */ E(
|
|
@@ -11991,7 +11990,7 @@ function Lc({
|
|
|
11991
11990
|
className: "relative flex-grow h-full overflow-auto w-full",
|
|
11992
11991
|
role: "tabpanel",
|
|
11993
11992
|
children: [
|
|
11994
|
-
tt && /* @__PURE__ */ i(
|
|
11993
|
+
tt && /* @__PURE__ */ i(jn, {}),
|
|
11995
11994
|
!Se && (X && re ? /* @__PURE__ */ i(
|
|
11996
11995
|
So,
|
|
11997
11996
|
{
|
|
@@ -12076,7 +12075,7 @@ function Lc({
|
|
|
12076
12075
|
));
|
|
12077
12076
|
}), /* @__PURE__ */ i(Ae, { children: O });
|
|
12078
12077
|
}
|
|
12079
|
-
const it =
|
|
12078
|
+
const it = he === void 0 ? /* @__PURE__ */ i(G, {}) : he ? /* @__PURE__ */ E(G, { children: [
|
|
12080
12079
|
/* @__PURE__ */ i(
|
|
12081
12080
|
J,
|
|
12082
12081
|
{
|
|
@@ -12096,7 +12095,7 @@ function Lc({
|
|
|
12096
12095
|
)
|
|
12097
12096
|
] }) : Nt(), Ft = R && R.map(
|
|
12098
12097
|
(z) => /* @__PURE__ */ i(
|
|
12099
|
-
|
|
12098
|
+
wn,
|
|
12100
12099
|
{
|
|
12101
12100
|
className: "text-sm min-w-[140px]",
|
|
12102
12101
|
value: z.id,
|
|
@@ -12106,7 +12105,7 @@ function Lc({
|
|
|
12106
12105
|
)
|
|
12107
12106
|
), Qt = Ee.map(
|
|
12108
12107
|
(z) => /* @__PURE__ */ i(
|
|
12109
|
-
|
|
12108
|
+
wn,
|
|
12110
12109
|
{
|
|
12111
12110
|
className: "text-sm min-w-[140px]",
|
|
12112
12111
|
value: z.key,
|
|
@@ -12144,7 +12143,7 @@ function Lc({
|
|
|
12144
12143
|
"div",
|
|
12145
12144
|
{
|
|
12146
12145
|
className: "self-center",
|
|
12147
|
-
children: /* @__PURE__ */ i(
|
|
12146
|
+
children: /* @__PURE__ */ i(un, { size: "small" })
|
|
12148
12147
|
}
|
|
12149
12148
|
),
|
|
12150
12149
|
/* @__PURE__ */ E(
|
|
@@ -12157,7 +12156,7 @@ function Lc({
|
|
|
12157
12156
|
className: "pl-4 pr-4 pt-0",
|
|
12158
12157
|
children: [
|
|
12159
12158
|
/* @__PURE__ */ i(
|
|
12160
|
-
|
|
12159
|
+
wn,
|
|
12161
12160
|
{
|
|
12162
12161
|
disabled: !L,
|
|
12163
12162
|
value: Jt,
|
|
@@ -12192,10 +12191,10 @@ function Lc({
|
|
|
12192
12191
|
hidden: !j,
|
|
12193
12192
|
id: `form_${e}`,
|
|
12194
12193
|
className: " w-full",
|
|
12195
|
-
children: Se ? /* @__PURE__ */ i(
|
|
12194
|
+
children: Se ? /* @__PURE__ */ i(jn, {}) : it
|
|
12196
12195
|
}
|
|
12197
12196
|
),
|
|
12198
|
-
|
|
12197
|
+
pe,
|
|
12199
12198
|
qe
|
|
12200
12199
|
]
|
|
12201
12200
|
}
|
|
@@ -12205,7 +12204,7 @@ function Lc({
|
|
|
12205
12204
|
);
|
|
12206
12205
|
}
|
|
12207
12206
|
function _c(e, t) {
|
|
12208
|
-
const [n, r] = Q.useState(), { navigator: o } = Q.useContext(Dl), l =
|
|
12207
|
+
const [n, r] = Q.useState(), { navigator: o } = Q.useContext(Dl), l = fn(), s = () => {
|
|
12209
12208
|
r(void 0);
|
|
12210
12209
|
}, a = () => {
|
|
12211
12210
|
t(), r(void 0), l(-1);
|
|
@@ -12279,7 +12278,7 @@ const Do = Q.createContext({
|
|
|
12279
12278
|
}
|
|
12280
12279
|
}), hr = () => Ye(Do);
|
|
12281
12280
|
function hd() {
|
|
12282
|
-
const t =
|
|
12281
|
+
const t = pn().sidePanels, n = [...t];
|
|
12283
12282
|
return n.push(void 0), /* @__PURE__ */ i(G, { children: n.map((r, o) => /* @__PURE__ */ i(
|
|
12284
12283
|
Jc,
|
|
12285
12284
|
{
|
|
@@ -12293,7 +12292,7 @@ function Jc({
|
|
|
12293
12292
|
offsetPosition: e,
|
|
12294
12293
|
panel: t
|
|
12295
12294
|
}) {
|
|
12296
|
-
const [n, r] = P(!1), [o, l] = P(!1), [s, a] = P(), c = Q.useRef(t?.width), A = c.current, u =
|
|
12295
|
+
const [n, r] = P(!1), [o, l] = P(!1), [s, a] = P(), c = Q.useRef(t?.width), A = c.current, u = pn(), {
|
|
12297
12296
|
navigationWasBlocked: m,
|
|
12298
12297
|
handleOk: f,
|
|
12299
12298
|
handleCancel: d
|
|
@@ -12361,7 +12360,7 @@ function Hc(e) {
|
|
|
12361
12360
|
blocked: t,
|
|
12362
12361
|
setBlocked: n,
|
|
12363
12362
|
setBlockedNavigationMessage: r
|
|
12364
|
-
} = hr(), o =
|
|
12363
|
+
} = hr(), o = we(), l = oe(() => o.getParentCollectionIds(e.path), [o, e.path]), s = oe(() => {
|
|
12365
12364
|
if (!e)
|
|
12366
12365
|
return;
|
|
12367
12366
|
let c = e.collection;
|
|
@@ -12488,7 +12487,7 @@ const Ht = (e, t, n) => {
|
|
|
12488
12487
|
};
|
|
12489
12488
|
};
|
|
12490
12489
|
function Kc() {
|
|
12491
|
-
const e = jt(), t =
|
|
12490
|
+
const e = jt(), t = fn(), [n, r] = P([]), o = de(n), l = de({}), s = de(0), a = (m) => {
|
|
12492
12491
|
o.current = m, r(m);
|
|
12493
12492
|
};
|
|
12494
12493
|
V(() => {
|
|
@@ -12659,11 +12658,11 @@ function rA({
|
|
|
12659
12658
|
const ne = nr(xe(D), A), F = q ? l?.getCollectionConfig(D) : void 0, T = ne ? Le(ne, F) : void 0;
|
|
12660
12659
|
let me = T;
|
|
12661
12660
|
if (T) {
|
|
12662
|
-
const Ee = T.subcollections,
|
|
12661
|
+
const Ee = T.subcollections, pe = T.callbacks, Se = T.permissions;
|
|
12663
12662
|
me = {
|
|
12664
12663
|
...me,
|
|
12665
12664
|
subcollections: me?.subcollections ?? Ee,
|
|
12666
|
-
callbacks: me?.callbacks ??
|
|
12665
|
+
callbacks: me?.callbacks ?? pe,
|
|
12667
12666
|
permissions: me?.permissions ?? Se
|
|
12668
12667
|
};
|
|
12669
12668
|
}
|
|
@@ -12714,7 +12713,7 @@ function rA({
|
|
|
12714
12713
|
}, [A]), ae = c.state, _ = ae && ae.base_location ? ae.base_location : c, X = w((D) => Po({
|
|
12715
12714
|
path: D,
|
|
12716
12715
|
collections: A
|
|
12717
|
-
}), [A]), ge = w((D) => X(D).map(($) => $.id), [X]),
|
|
12716
|
+
}), [A]), ge = w((D) => X(D).map(($) => $.id), [X]), he = w(
|
|
12718
12717
|
(D) => {
|
|
12719
12718
|
let $ = A;
|
|
12720
12719
|
const q = [];
|
|
@@ -12751,14 +12750,14 @@ function rA({
|
|
|
12751
12750
|
refreshNavigation: M,
|
|
12752
12751
|
getParentReferencesFromPath: X,
|
|
12753
12752
|
getParentCollectionIds: ge,
|
|
12754
|
-
convertIdsToPaths:
|
|
12753
|
+
convertIdsToPaths: he
|
|
12755
12754
|
}), [t, _, e, S, R, j, A, X, U, H, B, d, te, b, y, M, Y, h, le, m]);
|
|
12756
12755
|
}
|
|
12757
12756
|
function qt(e) {
|
|
12758
12757
|
return encodeURIComponent(xe(e)).replaceAll("%2F", "/").replaceAll("%23", "#");
|
|
12759
12758
|
}
|
|
12760
12759
|
function Mo(e, t) {
|
|
12761
|
-
return e.filter((n) => n.permissions ?
|
|
12760
|
+
return e.filter((n) => n.permissions ? hn(n, t, [n.path], null).read !== !1 : !0).map((n) => n.subcollections ? {
|
|
12762
12761
|
...n,
|
|
12763
12762
|
subcollections: Mo(n.subcollections, t)
|
|
12764
12763
|
} : n);
|
|
@@ -13134,7 +13133,7 @@ function aA({
|
|
|
13134
13133
|
drawerOpen: t,
|
|
13135
13134
|
closeDrawer: n
|
|
13136
13135
|
}) {
|
|
13137
|
-
const r = ee(), o =
|
|
13136
|
+
const r = ee(), o = we(), l = e && !t, s = We();
|
|
13138
13137
|
if (!o.topLevelNavigation)
|
|
13139
13138
|
throw Error("Navigation not ready in Drawer");
|
|
13140
13139
|
const {
|
|
@@ -13167,7 +13166,7 @@ function aA({
|
|
|
13167
13166
|
Object.values(a).filter((d) => d.group === f).map((d, g) => /* @__PURE__ */ i(
|
|
13168
13167
|
ti,
|
|
13169
13168
|
{
|
|
13170
|
-
icon:
|
|
13169
|
+
icon: Yn(d.collection ?? d.view),
|
|
13171
13170
|
tooltipsOpen: l,
|
|
13172
13171
|
drawerOpen: t,
|
|
13173
13172
|
onClick: () => m(d),
|
|
@@ -13184,7 +13183,7 @@ function aA({
|
|
|
13184
13183
|
A.map((f, d) => /* @__PURE__ */ i(
|
|
13185
13184
|
ti,
|
|
13186
13185
|
{
|
|
13187
|
-
icon:
|
|
13186
|
+
icon: Yn(f.collection ?? f.view),
|
|
13188
13187
|
tooltipsOpen: l,
|
|
13189
13188
|
onClick: () => m(f),
|
|
13190
13189
|
drawerOpen: t,
|
|
@@ -13238,7 +13237,7 @@ function ti({
|
|
|
13238
13237
|
}
|
|
13239
13238
|
);
|
|
13240
13239
|
return n ? a : /* @__PURE__ */ i(
|
|
13241
|
-
|
|
13240
|
+
ye,
|
|
13242
13241
|
{
|
|
13243
13242
|
open: r,
|
|
13244
13243
|
side: "right",
|
|
@@ -13259,9 +13258,9 @@ const cA = 280, vd = Q.memo(
|
|
|
13259
13258
|
drawerProps: c,
|
|
13260
13259
|
FireCMSAppBarComponent: A = Yc,
|
|
13261
13260
|
fireCMSAppBarComponentProps: u
|
|
13262
|
-
} = t, m = We(), f
|
|
13263
|
-
|
|
13264
|
-
}, []),
|
|
13261
|
+
} = t, m = We(), [f, d] = Q.useState(!1), [g, h] = Q.useState(!1), p = w(() => h(!0), []), b = w(() => h(!1), []), v = w(() => {
|
|
13262
|
+
d(!1);
|
|
13263
|
+
}, []), y = f || !!(m && s && g);
|
|
13265
13264
|
return /* @__PURE__ */ E(
|
|
13266
13265
|
"div",
|
|
13267
13266
|
{
|
|
@@ -13282,7 +13281,7 @@ const cA = 280, vd = Q.memo(
|
|
|
13282
13281
|
{
|
|
13283
13282
|
title: r,
|
|
13284
13283
|
includeDrawer: l,
|
|
13285
|
-
drawerOpen:
|
|
13284
|
+
drawerOpen: y,
|
|
13286
13285
|
...u
|
|
13287
13286
|
}
|
|
13288
13287
|
),
|
|
@@ -13290,22 +13289,22 @@ const cA = 280, vd = Q.memo(
|
|
|
13290
13289
|
dA,
|
|
13291
13290
|
{
|
|
13292
13291
|
displayed: l,
|
|
13293
|
-
onMouseEnter:
|
|
13294
|
-
onMouseMove:
|
|
13295
|
-
onMouseLeave:
|
|
13296
|
-
open:
|
|
13292
|
+
onMouseEnter: p,
|
|
13293
|
+
onMouseMove: p,
|
|
13294
|
+
onMouseLeave: b,
|
|
13295
|
+
open: y,
|
|
13297
13296
|
logo: o,
|
|
13298
|
-
hovered:
|
|
13299
|
-
setDrawerOpen:
|
|
13300
|
-
children: l &&
|
|
13297
|
+
hovered: g,
|
|
13298
|
+
setDrawerOpen: d,
|
|
13299
|
+
children: l && /* @__PURE__ */ i(
|
|
13301
13300
|
a,
|
|
13302
13301
|
{
|
|
13303
|
-
hovered:
|
|
13304
|
-
drawerOpen:
|
|
13305
|
-
closeDrawer:
|
|
13302
|
+
hovered: g,
|
|
13303
|
+
drawerOpen: y,
|
|
13304
|
+
closeDrawer: v,
|
|
13306
13305
|
...c
|
|
13307
13306
|
}
|
|
13308
|
-
)
|
|
13307
|
+
)
|
|
13309
13308
|
}
|
|
13310
13309
|
),
|
|
13311
13310
|
/* @__PURE__ */ E(
|
|
@@ -13331,7 +13330,7 @@ const cA = 280, vd = Q.memo(
|
|
|
13331
13330
|
ue
|
|
13332
13331
|
), AA = () => /* @__PURE__ */ i("div", { className: "flex flex-col min-h-[68px]" });
|
|
13333
13332
|
function dA(e) {
|
|
13334
|
-
const t =
|
|
13333
|
+
const t = we(), n = e.displayed ? e.open ? cA : 72 : 0, r = /* @__PURE__ */ E(
|
|
13335
13334
|
"div",
|
|
13336
13335
|
{
|
|
13337
13336
|
className: "relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",
|
|
@@ -13341,7 +13340,7 @@ function dA(e) {
|
|
|
13341
13340
|
},
|
|
13342
13341
|
children: [
|
|
13343
13342
|
!e.open && e.displayed && /* @__PURE__ */ i(
|
|
13344
|
-
|
|
13343
|
+
ye,
|
|
13345
13344
|
{
|
|
13346
13345
|
title: "Open menu",
|
|
13347
13346
|
side: "right",
|
|
@@ -13370,7 +13369,7 @@ function dA(e) {
|
|
|
13370
13369
|
},
|
|
13371
13370
|
className: Z("cursor-pointer"),
|
|
13372
13371
|
children: /* @__PURE__ */ i(
|
|
13373
|
-
|
|
13372
|
+
ye,
|
|
13374
13373
|
{
|
|
13375
13374
|
title: "Home",
|
|
13376
13375
|
sideOffset: 20,
|
|
@@ -13773,7 +13772,7 @@ const bd = Q.memo(
|
|
|
13773
13772
|
HomePage: t = Oc,
|
|
13774
13773
|
customRoutes: n
|
|
13775
13774
|
}) {
|
|
13776
|
-
const r = jt(), o =
|
|
13775
|
+
const r = jt(), o = we();
|
|
13777
13776
|
if (!o)
|
|
13778
13777
|
return /* @__PURE__ */ i(G, {});
|
|
13779
13778
|
const l = r.state, s = l && l.base_location ? l.base_location : r, a = [];
|
|
@@ -13794,7 +13793,7 @@ const bd = Q.memo(
|
|
|
13794
13793
|
parentCollectionIds: [],
|
|
13795
13794
|
fullPath: f.id ?? f.path,
|
|
13796
13795
|
...f,
|
|
13797
|
-
Actions:
|
|
13796
|
+
Actions: sn(f.Actions)
|
|
13798
13797
|
},
|
|
13799
13798
|
`collection_view_${f.id ?? f.path}`
|
|
13800
13799
|
)
|
|
@@ -13905,7 +13904,7 @@ export {
|
|
|
13905
13904
|
fc as BlockFieldBinding,
|
|
13906
13905
|
Ls as BooleanPreview,
|
|
13907
13906
|
es as COLLECTION_PATH_SEPARATOR,
|
|
13908
|
-
|
|
13907
|
+
jn as CircularProgressCenter,
|
|
13909
13908
|
pr as DEFAULT_FIELD_CONFIGS,
|
|
13910
13909
|
js as DatePreview,
|
|
13911
13910
|
nc as DateTimeFieldBinding,
|
|
@@ -14004,8 +14003,8 @@ export {
|
|
|
14004
14003
|
Qi as getHashValue,
|
|
14005
14004
|
os as getIcon,
|
|
14006
14005
|
Ie as getIconForProperty,
|
|
14007
|
-
|
|
14008
|
-
|
|
14006
|
+
Yn as getIconForView,
|
|
14007
|
+
Vn as getIconForWidget,
|
|
14009
14008
|
_A as getIdIcon,
|
|
14010
14009
|
lr as getLabelOrConfigFrom,
|
|
14011
14010
|
MA as getLastSegment,
|
|
@@ -14020,8 +14019,8 @@ export {
|
|
|
14020
14019
|
uA as isDefaultFieldConfigId,
|
|
14021
14020
|
Rr as isEmptyObject,
|
|
14022
14021
|
GA as isEnumValueDisabled,
|
|
14023
|
-
|
|
14024
|
-
|
|
14022
|
+
mn as isHidden,
|
|
14023
|
+
Bn as isObject,
|
|
14025
14024
|
Me as isPropertyBuilder,
|
|
14026
14025
|
Lt as isReadOnly,
|
|
14027
14026
|
rs as isReferenceProperty,
|
|
@@ -14053,7 +14052,7 @@ export {
|
|
|
14053
14052
|
Gi as resolveEntityView,
|
|
14054
14053
|
VA as resolveEnumValues,
|
|
14055
14054
|
vs as resolveNavigationFrom,
|
|
14056
|
-
|
|
14055
|
+
hn as resolvePermissions,
|
|
14057
14056
|
Ti as resolveProperties,
|
|
14058
14057
|
Te as resolveProperty,
|
|
14059
14058
|
Oi as resolvePropertyEnum,
|
|
@@ -14062,12 +14061,12 @@ export {
|
|
|
14062
14061
|
ts as segmentsToStrippedPath,
|
|
14063
14062
|
$A as serializeRegExp,
|
|
14064
14063
|
ZA as singular,
|
|
14065
|
-
|
|
14064
|
+
Gn as slugify,
|
|
14066
14065
|
Vi as sortProperties,
|
|
14067
14066
|
Pr as stripCollectionPath,
|
|
14068
14067
|
YA as toKebabCase,
|
|
14069
14068
|
zA as toSnakeCase,
|
|
14070
|
-
|
|
14069
|
+
On as traverseValueProperty,
|
|
14071
14070
|
Ri as traverseValuesProperties,
|
|
14072
14071
|
RA as unslugify,
|
|
14073
14072
|
Jl as updateDateAutoValues,
|
|
@@ -14086,12 +14085,12 @@ export {
|
|
|
14086
14085
|
ee as useFireCMSContext,
|
|
14087
14086
|
We as useLargeLayout,
|
|
14088
14087
|
eo as useModeController,
|
|
14089
|
-
|
|
14088
|
+
we as useNavigationController,
|
|
14090
14089
|
Wt as useReferenceDialog,
|
|
14091
14090
|
sd as useResolvedNavigationFrom,
|
|
14092
14091
|
No as useSelectionController,
|
|
14093
14092
|
hr as useSideDialogContext,
|
|
14094
|
-
|
|
14093
|
+
pn as useSideDialogsController,
|
|
14095
14094
|
pt as useSideEntityController,
|
|
14096
14095
|
vt as useSnackbarController,
|
|
14097
14096
|
_t as useStorageSource
|