@firecms/core 3.0.0-canary.50 → 3.0.0-canary.51
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/core/Drawer.d.ts +5 -12
- package/dist/core/DrawerNavigationItem.d.ts +9 -0
- package/dist/core/Scaffold.d.ts +6 -9
- package/dist/core/index.d.ts +3 -4
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.es.js +708 -690
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/util/icon_synonyms.d.ts +1 -0
- package/package.json +4 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +526 -525
- package/src/components/EntityView.tsx +1 -1
- package/src/components/PropertyIdCopyTooltipContent.tsx +2 -3
- package/src/components/ReferenceWidget.tsx +1 -1
- package/src/components/common/types.tsx +1 -1
- package/src/core/Drawer.tsx +14 -66
- package/src/core/DrawerNavigationItem.tsx +62 -0
- package/src/core/FireCMS.tsx +4 -4
- package/src/core/Scaffold.tsx +75 -61
- package/src/core/index.tsx +3 -4
- package/src/form/EntityForm.tsx +2 -1
- package/src/hooks/index.tsx +1 -0
- package/src/types/storage.ts +1 -1
- package/src/util/icon_synonyms.ts +3 -2
- package/dist/internal/useBuildCustomizationController.d.ts +0 -2
- package/src/internal/useBuildCustomizationController.tsx +0 -5
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as v, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import * as yt from "react";
|
|
3
|
-
import I, { useRef as se, useEffect as z, useContext as qe, useCallback as x, useMemo as he, useState as P, createElement as
|
|
4
|
-
import { SnackbarProvider as
|
|
3
|
+
import I, { useRef as se, useEffect as z, useContext as qe, useCallback as x, useMemo as he, useState as P, createElement as ta, createRef as ra, createContext as ia, forwardRef as na, useLayoutEffect as Gr, useDeferredValue as oa } from "react";
|
|
4
|
+
import { SnackbarProvider as aa, useSnackbar as sa } from "notistack";
|
|
5
5
|
import Qi from "object-hash";
|
|
6
|
-
import { useCreateFormex as pn, Formex as fn, setIn as
|
|
7
|
-
import { getColorSchemeForSeed as gn, CHIP_COLORS as
|
|
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 la, Tooltip as _e, ErrorIcon as An, Typography as $, CircleIcon as bn, FunctionsIcon as ca, iconKeys as ii, coolIconKeys as Yr, Icon as ni, IconButton as ce, ContentCopyIcon as pr, OpenInNewIcon as fr, DescriptionIcon as da, Skeleton as Ye, Chip as oi, cn as H, defaultBorderMixin as Be, KeyboardTabIcon as ai, Checkbox as Yt, Markdown as si, TextareaAutosize as ua, MultiSelect as yn, MultiSelectItem as wn, Select as tt, SelectItem as rt, BooleanSwitch as ma, DateTimeField as qt, paperMixin as hr, ErrorOutlineIcon as pa, EditIcon as fa, Button as ge, RemoveCircleIcon as ha, Menu as Et, MoreVertIcon as vn, MenuItem as Re, CircularProgress as Ut, SearchBar as li, Badge as Ri, ArrowUpwardIcon as Sr, Popover as ci, FilterListIcon as ga, AssignmentIcon as Aa, CenteredView as er, Label as di, TextField as wt, ClearIcon as Tt, BooleanSwitchWithLabel as gr, useOutsideAlerter as _n, DialogActions as Ct, AddIcon as ct, ExpandablePanel as dt, Card as ba, ArrowForwardIcon as kn, cardMixin as ya, cardClickableMixin as wa, focusedMixin as qr, StarIcon as xn, StarBorderIcon as En, Collapse as Cn, Container as va, DeleteIcon as Ur, Dialog as ui, DialogContent as mi, FileCopyIcon as _a, FilterListOffIcon as ka, 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 qa, LinkIcon as Ua, AddLinkIcon as La, ScheduleIcon as $a, 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
8
|
import L from "react-fast-compare";
|
|
9
|
-
import { Link as
|
|
9
|
+
import { Link as Ar, useNavigate as Lt, useLocation as br, 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";
|
|
12
12
|
import Fn from "react-use-measure";
|
|
@@ -16,11 +16,11 @@ import is from "react-image-file-resizer";
|
|
|
16
16
|
import * as Tn from "js-search";
|
|
17
17
|
import { FixedSizeList as ns } from "react-window";
|
|
18
18
|
import os from "markdown-it";
|
|
19
|
-
import rr, { Plugins as
|
|
19
|
+
import rr, { Plugins as Nr } from "react-markdown-editor-lite";
|
|
20
20
|
import * as ze from "yup";
|
|
21
21
|
import * as as from "@radix-ui/react-portal";
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const uu = ({ children: e }) => /* @__PURE__ */ n(
|
|
23
|
+
aa,
|
|
24
24
|
{
|
|
25
25
|
maxSnack: 3,
|
|
26
26
|
autoHideDuration: 3500,
|
|
@@ -32,7 +32,7 @@ const du = ({ children: e }) => /* @__PURE__ */ n(
|
|
|
32
32
|
},
|
|
33
33
|
toggleMode: () => {
|
|
34
34
|
}
|
|
35
|
-
}, hi = I.createContext(ss),
|
|
35
|
+
}, hi = I.createContext(ss), mu = hi.Provider, On = I.createContext({});
|
|
36
36
|
function Ee(e) {
|
|
37
37
|
return ls(cs(e));
|
|
38
38
|
}
|
|
@@ -42,10 +42,10 @@ function ls(e) {
|
|
|
42
42
|
function cs(e) {
|
|
43
43
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function pu(e) {
|
|
46
46
|
return e.startsWith("/") ? e : `/${e}`;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function fu(e) {
|
|
49
49
|
const t = Ee(e);
|
|
50
50
|
if (t.includes("/")) {
|
|
51
51
|
const r = t.split("/");
|
|
@@ -128,7 +128,7 @@ class Vn {
|
|
|
128
128
|
this.latitude = t, this.longitude = r;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
class
|
|
131
|
+
class hu {
|
|
132
132
|
value;
|
|
133
133
|
constructor(t) {
|
|
134
134
|
this.value = t;
|
|
@@ -140,13 +140,13 @@ const ds = (e, ...t) => ({
|
|
|
140
140
|
[i]: e[i]
|
|
141
141
|
}), {})
|
|
142
142
|
});
|
|
143
|
-
function
|
|
143
|
+
function Fr(e) {
|
|
144
144
|
return e && typeof e == "object" && !Array.isArray(e);
|
|
145
145
|
}
|
|
146
146
|
function Le(e, t) {
|
|
147
|
-
const r =
|
|
148
|
-
return r &&
|
|
149
|
-
|
|
147
|
+
const r = Fr(e), i = r ? { ...e } : e;
|
|
148
|
+
return r && Fr(t) && Object.keys(t).forEach((o) => {
|
|
149
|
+
Fr(t[o]) ? o in e ? i[o] = Le(e[o], t[o]) : Object.assign(i, { [o]: t[o] }) : Object.assign(i, { [o]: t[o] });
|
|
150
150
|
}), i;
|
|
151
151
|
}
|
|
152
152
|
function ot(e, t) {
|
|
@@ -161,7 +161,7 @@ function ot(e, t) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function gu(e, t) {
|
|
165
165
|
let r = { ...e };
|
|
166
166
|
const i = t.split("."), o = i.pop();
|
|
167
167
|
for (const a of i)
|
|
@@ -217,7 +217,7 @@ const Ot = "type", sr = "value";
|
|
|
217
217
|
function $t(e) {
|
|
218
218
|
return e.readOnly || e.dataType === "date" && e.autoValue ? !0 : e.dataType === "reference" ? !e.path : !1;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function yr(e) {
|
|
221
221
|
return typeof e.disabled == "object" && !!e.disabled.hidden;
|
|
222
222
|
}
|
|
223
223
|
function De(e) {
|
|
@@ -259,7 +259,7 @@ function ms({
|
|
|
259
259
|
}
|
|
260
260
|
) ?? {};
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Au(e, t) {
|
|
263
263
|
const r = e;
|
|
264
264
|
return Object.entries(t).forEach(([i, o]) => {
|
|
265
265
|
e && e[i] !== void 0 ? r[i] = e[i] : o.validation?.required && (r[i] = null);
|
|
@@ -270,20 +270,20 @@ function at(e) {
|
|
|
270
270
|
}
|
|
271
271
|
function Yn(e, t, r) {
|
|
272
272
|
const i = Object.entries(t).map(([a, s]) => {
|
|
273
|
-
const l = e && e[a], c =
|
|
273
|
+
const l = e && e[a], c = Lr(l, s, r);
|
|
274
274
|
if (c !== void 0)
|
|
275
275
|
return { [a]: c };
|
|
276
276
|
}).reduce((a, s) => ({ ...a, ...s }), {}), o = { ...e, ...i };
|
|
277
277
|
if (Object.keys(o).length !== 0)
|
|
278
278
|
return o;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Lr(e, t, r) {
|
|
281
281
|
let i;
|
|
282
282
|
if (t.dataType === "map" && t.properties)
|
|
283
283
|
i = Yn(e, t.properties, r);
|
|
284
284
|
else if (t.dataType === "array")
|
|
285
285
|
if (t.of && Array.isArray(e))
|
|
286
|
-
i = e.map((o) =>
|
|
286
|
+
i = e.map((o) => Lr(o, t.of, r));
|
|
287
287
|
else if (t.oneOf && Array.isArray(e)) {
|
|
288
288
|
const o = t.oneOf?.typeField ?? Ot, a = t.oneOf?.valueField ?? sr;
|
|
289
289
|
i = e.map((s) => {
|
|
@@ -294,7 +294,7 @@ function Ur(e, t, r) {
|
|
|
294
294
|
const l = s[o], c = t.oneOf?.properties[l];
|
|
295
295
|
return !l || !c ? s : {
|
|
296
296
|
[o]: l,
|
|
297
|
-
[a]:
|
|
297
|
+
[a]: Lr(s[a], c, r)
|
|
298
298
|
};
|
|
299
299
|
});
|
|
300
300
|
} else
|
|
@@ -322,12 +322,12 @@ function ps(e, t) {
|
|
|
322
322
|
return gn(t.toString());
|
|
323
323
|
if (typeof r == "object" && "color" in r) {
|
|
324
324
|
if (typeof r.color == "string")
|
|
325
|
-
return
|
|
325
|
+
return la[r.color];
|
|
326
326
|
if (typeof r.color == "object")
|
|
327
327
|
return r.color;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function bu(e) {
|
|
331
331
|
return typeof e == "object" && e.disabled;
|
|
332
332
|
}
|
|
333
333
|
function fs(e) {
|
|
@@ -399,20 +399,20 @@ function Ln(e, t) {
|
|
|
399
399
|
const hs = (e, t) => e.map((r) => r.permissions ? r : {
|
|
400
400
|
...r,
|
|
401
401
|
permissions: t
|
|
402
|
-
}), gs = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,
|
|
402
|
+
}), gs = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, yu = (e) => {
|
|
403
403
|
const t = e.match(gs);
|
|
404
404
|
return t ? t.map((r) => r.toLowerCase()).join("-") : "";
|
|
405
|
-
}, As = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,
|
|
405
|
+
}, As = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, wu = (e) => {
|
|
406
406
|
const t = e.match(As);
|
|
407
407
|
return t ? t.map((r) => r.toLowerCase()).join("_") : "";
|
|
408
408
|
};
|
|
409
409
|
function Mt(e = 5) {
|
|
410
410
|
return Math.random().toString(36).slice(2, 2 + e);
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function vu() {
|
|
413
413
|
return Math.floor(Math.random() * 16777215).toString(16);
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function $r(e, t = "_", r = !0) {
|
|
416
416
|
if (!e)
|
|
417
417
|
return "";
|
|
418
418
|
const i = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-", o = `aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;
|
|
@@ -423,7 +423,7 @@ function Lr(e, t = "_", r = !0) {
|
|
|
423
423
|
t
|
|
424
424
|
).trim().replace(/^\s+|\s+$/g, ""), r ? e.toLowerCase() : e;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function _u(e) {
|
|
427
427
|
return e ? e.includes("-") || e.includes("_") || !e.includes(" ") ? e.replace(/[-_]/g, " ").replace(/\w\S*/g, function(r) {
|
|
428
428
|
return r.charAt(0).toUpperCase() + r.substr(1);
|
|
429
429
|
}).trim() : e.trim() : "";
|
|
@@ -438,7 +438,7 @@ function ws(e) {
|
|
|
438
438
|
function $n(e) {
|
|
439
439
|
return e.split("/").filter((t, r) => r % 2 === 0);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function ku(e) {
|
|
442
442
|
return e ? e.toString() : "";
|
|
443
443
|
}
|
|
444
444
|
function vs(e) {
|
|
@@ -447,7 +447,7 @@ function vs(e) {
|
|
|
447
447
|
const t = e.match(/\/(.*?)\/([a-z]*)?$/i);
|
|
448
448
|
return t ? new RegExp(t[1], t[2] || "") : new RegExp(e, "");
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function xu(e) {
|
|
451
451
|
return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/) ? !0 : !!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/);
|
|
452
452
|
}
|
|
453
453
|
function wi(e, t, r, i = 300) {
|
|
@@ -470,23 +470,23 @@ function _s(e, t) {
|
|
|
470
470
|
});
|
|
471
471
|
return r ? r.dataType === "reference" ? !0 : r.dataType === "array" ? Array.isArray(r.of) ? !1 : r.of?.dataType === "reference" : !1 : null;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Eu(e) {
|
|
474
474
|
return /* @__PURE__ */ n(bn, { size: e });
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Wr(e, t) {
|
|
477
477
|
const r = e?.Icon ?? bn;
|
|
478
478
|
return /* @__PURE__ */ n(r, { size: t });
|
|
479
479
|
}
|
|
480
480
|
function Te(e, t = "small", r = {}) {
|
|
481
481
|
if (De(e))
|
|
482
|
-
return /* @__PURE__ */ n(
|
|
482
|
+
return /* @__PURE__ */ n(ca, { size: t });
|
|
483
483
|
{
|
|
484
|
-
const i =
|
|
485
|
-
return
|
|
484
|
+
const i = xr(e, r);
|
|
485
|
+
return Wr(i, t);
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
return De(e) ? "#888" :
|
|
488
|
+
function Cu(e, t) {
|
|
489
|
+
return De(e) ? "#888" : xr(e, t)?.color ?? "#666";
|
|
490
490
|
}
|
|
491
491
|
function At(e, t) {
|
|
492
492
|
if (typeof e == "object") {
|
|
@@ -525,19 +525,19 @@ function ks(e, t) {
|
|
|
525
525
|
}), o && (r[i] = o);
|
|
526
526
|
}), r;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Su(e) {
|
|
529
529
|
return e.propertiesOrder ? e.propertiesOrder : [...Object.keys(e.properties), ...(e.additionalFields ?? []).map((t) => t.key)];
|
|
530
530
|
}
|
|
531
|
-
const
|
|
531
|
+
const wr = {
|
|
532
532
|
read: !0,
|
|
533
533
|
edit: !0,
|
|
534
534
|
create: !0,
|
|
535
535
|
delete: !0
|
|
536
536
|
};
|
|
537
|
-
function
|
|
537
|
+
function vr(e, t, r, i) {
|
|
538
538
|
const o = e.permissions;
|
|
539
539
|
if (o === void 0)
|
|
540
|
-
return
|
|
540
|
+
return wr;
|
|
541
541
|
if (typeof o == "object")
|
|
542
542
|
return o;
|
|
543
543
|
if (typeof o == "function") {
|
|
@@ -554,15 +554,15 @@ function wr(e, t, r, i) {
|
|
|
554
554
|
throw console.error("Permissions:", o), Error("New type of permission added and not mapped");
|
|
555
555
|
}
|
|
556
556
|
function Jn(e, t, r, i) {
|
|
557
|
-
return
|
|
557
|
+
return vr(e, t, r, i)?.edit ?? wr.edit;
|
|
558
558
|
}
|
|
559
559
|
function zt(e, t, r, i) {
|
|
560
|
-
return
|
|
560
|
+
return vr(e, t, r, i)?.create ?? wr.create;
|
|
561
561
|
}
|
|
562
562
|
function vi(e, t, r, i) {
|
|
563
|
-
return
|
|
563
|
+
return vr(e, t, r, i)?.delete ?? wr.delete;
|
|
564
564
|
}
|
|
565
|
-
const
|
|
565
|
+
const Jr = {
|
|
566
566
|
abc: "alphabet character font letter symbol text type",
|
|
567
567
|
access_alarm: "clock time",
|
|
568
568
|
access_alarms: "clock time",
|
|
@@ -708,6 +708,7 @@ const Wr = {
|
|
|
708
708
|
auto_stories: "audiobook flipping pages reading story",
|
|
709
709
|
av_timer: "clock countdown duration minutes seconds stopwatch",
|
|
710
710
|
baby_changing_station: "babies bathroom body children father human infant kids mother newborn people person toddler wc young",
|
|
711
|
+
back: "arrow_back",
|
|
711
712
|
backpack: "bookbag knapsack storage travel",
|
|
712
713
|
backspace: "arrow cancel clear correct delete erase remove",
|
|
713
714
|
backup: "arrow cloud data drive files folders point storage submit upload",
|
|
@@ -921,8 +922,8 @@ const Wr = {
|
|
|
921
922
|
contact_phone: "account avatar call communicate face human information message mobile number people person profile user",
|
|
922
923
|
contacts: "account address avatar call cell face human information mobile number people person phone profile user",
|
|
923
924
|
contact_support: "? alert announcement bubble chat comment communicate help information mark message punctuation speech symbol vquestion",
|
|
924
|
-
content_copy: "
|
|
925
|
-
content_cut: "
|
|
925
|
+
content_copy: "copy document duplicate file multiple past",
|
|
926
|
+
content_cut: "cut document file past scissors trim",
|
|
926
927
|
content_paste: "clipboard copy cut document file multiple",
|
|
927
928
|
content_paste_go: "clipboard disabled document enabled file slash",
|
|
928
929
|
content_paste_off: "clipboard disabled document enabled file slash",
|
|
@@ -2510,10 +2511,10 @@ const Wr = {
|
|
|
2510
2511
|
zoom_out_map: "arrows destination location maps move place stop"
|
|
2511
2512
|
}, _i = new Tn.Search("key");
|
|
2512
2513
|
_i.addIndex("synonyms");
|
|
2513
|
-
_i.addDocuments(
|
|
2514
|
+
_i.addDocuments(ii.map((e) => ({
|
|
2514
2515
|
key: e,
|
|
2515
2516
|
// @ts-ignore
|
|
2516
|
-
synonyms:
|
|
2517
|
+
synonyms: Jr[e] ?? []
|
|
2517
2518
|
})));
|
|
2518
2519
|
function xs(e) {
|
|
2519
2520
|
let t = 0, r, i;
|
|
@@ -2522,24 +2523,24 @@ function xs(e) {
|
|
|
2522
2523
|
return Math.abs(t);
|
|
2523
2524
|
}
|
|
2524
2525
|
function Es(e, t) {
|
|
2525
|
-
if (e && (e =
|
|
2526
|
-
return e in cr ? /* @__PURE__ */ n(
|
|
2526
|
+
if (e && (e = $r(e), e in cr))
|
|
2527
|
+
return e in cr ? /* @__PURE__ */ n(ni, { iconKey: e, size: "medium", className: t }) : void 0;
|
|
2527
2528
|
}
|
|
2528
|
-
const
|
|
2529
|
+
const Hr = I.memo(
|
|
2529
2530
|
function({ collectionOrView: t, className: r }) {
|
|
2530
2531
|
if (!t)
|
|
2531
2532
|
return /* @__PURE__ */ n(j, {});
|
|
2532
2533
|
const i = Es(t.icon, r);
|
|
2533
2534
|
if (t?.icon && i)
|
|
2534
2535
|
return i;
|
|
2535
|
-
let o =
|
|
2536
|
-
o in cr && (a = o), a || (o =
|
|
2537
|
-
const s =
|
|
2538
|
-
return a || (a =
|
|
2536
|
+
let o = $r(("singularName" in t ? t.singularName : void 0) ?? t.name), a;
|
|
2537
|
+
o in cr && (a = o), a || (o = $r(t.path), o in cr && (a = o));
|
|
2538
|
+
const s = Yr.length;
|
|
2539
|
+
return a || (a = Yr[xs(t.path) % s]), /* @__PURE__ */ n(ni, { iconKey: a, size: "medium", className: r });
|
|
2539
2540
|
},
|
|
2540
2541
|
(e, t) => L(e.collectionOrView?.icon, t.collectionOrView?.icon)
|
|
2541
|
-
), cr =
|
|
2542
|
-
function
|
|
2542
|
+
), cr = ii.reduce((e, t) => (e[t] = t, e), {});
|
|
2543
|
+
function Iu(e, t) {
|
|
2543
2544
|
if (t !== void 0 && t === 1)
|
|
2544
2545
|
return e;
|
|
2545
2546
|
const r = {
|
|
@@ -2611,7 +2612,7 @@ function Su(e, t) {
|
|
|
2611
2612
|
}
|
|
2612
2613
|
return e;
|
|
2613
2614
|
}
|
|
2614
|
-
function
|
|
2615
|
+
function Nu(e, t) {
|
|
2615
2616
|
if (t !== void 0 && t !== 1)
|
|
2616
2617
|
return e;
|
|
2617
2618
|
const r = {
|
|
@@ -2693,7 +2694,7 @@ function Iu(e, t) {
|
|
|
2693
2694
|
}
|
|
2694
2695
|
return e;
|
|
2695
2696
|
}
|
|
2696
|
-
function
|
|
2697
|
+
function Cs(e, t, r, i = 3) {
|
|
2697
2698
|
const o = Object.keys(e.properties);
|
|
2698
2699
|
let a = r?.filter((s) => o.includes(s));
|
|
2699
2700
|
return a && a.length > 0 ? a : (a = o, a.filter((s) => {
|
|
@@ -2706,11 +2707,11 @@ function Hn(e, t) {
|
|
|
2706
2707
|
return e.titleProperty;
|
|
2707
2708
|
for (const r in e.properties) {
|
|
2708
2709
|
const i = e.properties[r];
|
|
2709
|
-
if (!De(i) &&
|
|
2710
|
+
if (!De(i) && xr(i, t)?.key === "text_field")
|
|
2710
2711
|
return r;
|
|
2711
2712
|
}
|
|
2712
2713
|
}
|
|
2713
|
-
function
|
|
2714
|
+
function Bs(e) {
|
|
2714
2715
|
for (const t in e.properties) {
|
|
2715
2716
|
const r = e.properties[t];
|
|
2716
2717
|
if (r.dataType === "string" && r.storage?.acceptedFiles?.includes("image/*"))
|
|
@@ -2751,21 +2752,21 @@ function Ns(e) {
|
|
|
2751
2752
|
return De(i) ? t[r] = i : t[r] = { ...i, editable: !1 }, t;
|
|
2752
2753
|
}, {});
|
|
2753
2754
|
}
|
|
2754
|
-
function
|
|
2755
|
+
function Zr(e, t, r) {
|
|
2755
2756
|
if (e) {
|
|
2756
2757
|
const o = e({
|
|
2757
2758
|
collection: t,
|
|
2758
2759
|
parentPaths: r
|
|
2759
2760
|
}) ?? t;
|
|
2760
|
-
return o.subcollections && (o.subcollections = o.subcollections.map((a) =>
|
|
2761
|
+
return o.subcollections && (o.subcollections = o.subcollections.map((a) => Zr(e, a, [...r, t.path]))), o;
|
|
2761
2762
|
} else
|
|
2762
2763
|
return t;
|
|
2763
2764
|
}
|
|
2764
2765
|
function Fs(e, t, r = [], i) {
|
|
2765
2766
|
const o = (t ?? []).map((l) => {
|
|
2766
2767
|
const c = e?.find((d) => d.id === l.id);
|
|
2767
|
-
return c ? Ps(c, l, r, i) :
|
|
2768
|
-
}), a = o.map((l) => l.id), s = e.filter((l) => !a.includes(l.id)).map((l) => i ?
|
|
2768
|
+
return c ? Ps(c, l, r, i) : Zr(i, l, r);
|
|
2769
|
+
}), a = o.map((l) => l.id), s = e.filter((l) => !a.includes(l.id)).map((l) => i ? Zr(i, l, r) : l);
|
|
2769
2770
|
return [...o, ...s];
|
|
2770
2771
|
}
|
|
2771
2772
|
function Ps(e, t, r = [], i) {
|
|
@@ -2833,9 +2834,6 @@ function Ui(e) {
|
|
|
2833
2834
|
...(e.additionalFields ?? [])?.map((t) => t.key)
|
|
2834
2835
|
];
|
|
2835
2836
|
}
|
|
2836
|
-
function Nu(e) {
|
|
2837
|
-
return e;
|
|
2838
|
-
}
|
|
2839
2837
|
function Fu(e) {
|
|
2840
2838
|
return e;
|
|
2841
2839
|
}
|
|
@@ -2860,12 +2858,15 @@ function Ou(e) {
|
|
|
2860
2858
|
function Mu(e) {
|
|
2861
2859
|
return e;
|
|
2862
2860
|
}
|
|
2861
|
+
function zu(e) {
|
|
2862
|
+
return e;
|
|
2863
|
+
}
|
|
2863
2864
|
function Xn(e, t, r = "", i = 0, o = 10) {
|
|
2864
2865
|
i > o || (e && t && typeof e == "object" && typeof t == "object" ? Object.keys(e).forEach((a) => {
|
|
2865
2866
|
Xn(e[a], t[a], r + "." + a, i + 1, o);
|
|
2866
2867
|
}) : e !== t && console.log("Changed props:", r));
|
|
2867
2868
|
}
|
|
2868
|
-
function
|
|
2869
|
+
function Vu(e, t = 3) {
|
|
2869
2870
|
const r = se(e);
|
|
2870
2871
|
z(() => {
|
|
2871
2872
|
console.log("Changed props:"), Xn(e, r.current, "", 0, t), r.current = e;
|
|
@@ -2874,14 +2875,14 @@ function zu(e, t = 3) {
|
|
|
2874
2875
|
const Kn = I.createContext({}), Xe = (e) => {
|
|
2875
2876
|
const t = qe(Kn);
|
|
2876
2877
|
return e?.overrides?.dataSource ? e?.overrides.dataSource : t;
|
|
2877
|
-
}, eo = I.createContext({}), ke = () => qe(eo), mt = () => qe(On), to = I.createContext({}),
|
|
2878
|
+
}, eo = I.createContext({}), ke = () => qe(eo), mt = () => qe(On), to = I.createContext({}), _r = () => qe(to), ro = I.createContext({}), pt = () => qe(ro), io = I.createContext({}), Wt = (e) => {
|
|
2878
2879
|
const t = qe(io);
|
|
2879
2880
|
return e?.overrides?.storageSource ? e.overrides.storageSource : t;
|
|
2880
2881
|
}, ft = () => {
|
|
2881
2882
|
const {
|
|
2882
2883
|
enqueueSnackbar: e,
|
|
2883
2884
|
closeSnackbar: t
|
|
2884
|
-
} =
|
|
2885
|
+
} = sa(), r = x((o) => {
|
|
2885
2886
|
const {
|
|
2886
2887
|
type: a,
|
|
2887
2888
|
message: s,
|
|
@@ -2899,7 +2900,7 @@ const Kn = I.createContext({}), Xe = (e) => {
|
|
|
2899
2900
|
open: r,
|
|
2900
2901
|
close: i
|
|
2901
2902
|
}), [r, i]);
|
|
2902
|
-
}, no = I.createContext(void 0),
|
|
2903
|
+
}, no = I.createContext(void 0), Bt = () => qe(no), oo = I.createContext({}), Qs = ({ children: e }) => {
|
|
2903
2904
|
const [t, r] = P([]), i = se(t), o = (l) => {
|
|
2904
2905
|
i.current = l, r(l);
|
|
2905
2906
|
}, a = x(() => {
|
|
@@ -2931,7 +2932,7 @@ const Kn = I.createContext({}), Xe = (e) => {
|
|
|
2931
2932
|
))
|
|
2932
2933
|
] });
|
|
2933
2934
|
}, Rs = () => qe(oo), ao = I.createContext({}), pe = () => qe(ao), so = I.createContext({}), St = () => qe(so), Se = () => {
|
|
2934
|
-
const e = mt(), t =
|
|
2935
|
+
const e = mt(), t = _r(), r = pt(), i = ke(), o = Xe(), a = Wt(), s = ft(), l = Bt(), c = Rs(), d = pe(), u = St(), f = I.useRef({
|
|
2935
2936
|
authController: e,
|
|
2936
2937
|
sideDialogsController: t,
|
|
2937
2938
|
sideEntityController: r,
|
|
@@ -2960,7 +2961,7 @@ const Kn = I.createContext({}), Xe = (e) => {
|
|
|
2960
2961
|
};
|
|
2961
2962
|
}, [e, c, i, t]), f.current;
|
|
2962
2963
|
};
|
|
2963
|
-
function
|
|
2964
|
+
function Gu({
|
|
2964
2965
|
path: e,
|
|
2965
2966
|
collection: t,
|
|
2966
2967
|
filterValues: r,
|
|
@@ -2971,11 +2972,11 @@ function Vu({
|
|
|
2971
2972
|
const s = Xe(t), c = ke().resolveAliasesFrom(e), d = i ? i[0] : void 0, u = i ? i[1] : void 0, f = Se(), [m, p] = P([]), [g, A] = P(!1), [h, y] = P(), [b, w] = P(!1);
|
|
2972
2973
|
return z(() => {
|
|
2973
2974
|
A(!0);
|
|
2974
|
-
const E = async (
|
|
2975
|
+
const E = async (C) => {
|
|
2975
2976
|
if (t.callbacks?.onFetch)
|
|
2976
2977
|
try {
|
|
2977
|
-
|
|
2978
|
-
|
|
2978
|
+
C = await Promise.all(
|
|
2979
|
+
C.map((_) => t.callbacks.onFetch({
|
|
2979
2980
|
collection: t,
|
|
2980
2981
|
path: c,
|
|
2981
2982
|
entity: _,
|
|
@@ -2985,12 +2986,12 @@ function Vu({
|
|
|
2985
2986
|
} catch (_) {
|
|
2986
2987
|
console.error(_);
|
|
2987
2988
|
}
|
|
2988
|
-
A(!1), y(void 0), p(
|
|
2989
|
+
A(!1), y(void 0), p(C.map((_) => ({
|
|
2989
2990
|
..._
|
|
2990
2991
|
// values: sanitizeData(e.values, resolvedCollection.properties)
|
|
2991
|
-
}))), w(!o ||
|
|
2992
|
-
}, k = (
|
|
2993
|
-
console.error("ERROR",
|
|
2992
|
+
}))), w(!o || C.length < o);
|
|
2993
|
+
}, k = (C) => {
|
|
2994
|
+
console.error("ERROR", C), A(!1), p([]), y(C);
|
|
2994
2995
|
};
|
|
2995
2996
|
return s.listenCollection ? s.listenCollection({
|
|
2996
2997
|
path: c,
|
|
@@ -3021,7 +3022,7 @@ function Vu({
|
|
|
3021
3022
|
noMoreToLoad: b
|
|
3022
3023
|
};
|
|
3023
3024
|
}
|
|
3024
|
-
const
|
|
3025
|
+
const Pr = {};
|
|
3025
3026
|
function lo({
|
|
3026
3027
|
path: e,
|
|
3027
3028
|
entityId: t,
|
|
@@ -3043,11 +3044,11 @@ function lo({
|
|
|
3043
3044
|
} catch (y) {
|
|
3044
3045
|
console.error(y);
|
|
3045
3046
|
}
|
|
3046
|
-
|
|
3047
|
+
Pr[`${s}/${t}`] = h, d(h), f(!1), p(void 0);
|
|
3047
3048
|
}, A = (h) => {
|
|
3048
3049
|
console.error("ERROR fetching entity", h), f(!1), d(void 0), p(h);
|
|
3049
3050
|
};
|
|
3050
|
-
return t && i &&
|
|
3051
|
+
return t && i && Pr[`${s}/${t}`] ? (d(Pr[`${s}/${t}`]), f(!1), p(void 0), () => {
|
|
3051
3052
|
}) : t && s && r ? o.listenEntity ? o.listenEntity({
|
|
3052
3053
|
path: s,
|
|
3053
3054
|
entityId: t,
|
|
@@ -3234,7 +3235,7 @@ function Ts({
|
|
|
3234
3235
|
}).filter((s) => !!s);
|
|
3235
3236
|
return Promise.all(a);
|
|
3236
3237
|
}
|
|
3237
|
-
function
|
|
3238
|
+
function ju({
|
|
3238
3239
|
path: e
|
|
3239
3240
|
}) {
|
|
3240
3241
|
const t = Se(), [r, i] = P(), [o, a] = P(!1), [s, l] = P();
|
|
@@ -3264,8 +3265,8 @@ const uo = () => qe(hi), Os = (e) => {
|
|
|
3264
3265
|
u() && navigator.clipboard.writeText("");
|
|
3265
3266
|
}, A = (b) => y("copy", typeof b == "object" ? void 0 : b), h = () => y("cut"), y = x(
|
|
3266
3267
|
(b = "copy", w) => {
|
|
3267
|
-
const E = a.current, k = E && (E.tagName === "INPUT" || E.tagName === "TEXTAREA"),
|
|
3268
|
-
u() && !i && (w ? p(w) : E ? k ? (p(
|
|
3268
|
+
const E = a.current, k = E && (E.tagName === "INPUT" || E.tagName === "TEXTAREA"), C = a.current;
|
|
3269
|
+
u() && !i && (w ? p(w) : E ? k ? (p(C.value), b === "cut" && (C.value = "")) : p(E.innerText) : f("Both the ref & text were undefined"));
|
|
3269
3270
|
},
|
|
3270
3271
|
[i, p, f]
|
|
3271
3272
|
);
|
|
@@ -3311,7 +3312,7 @@ function mo(e = "lg") {
|
|
|
3311
3312
|
return typeof window > "u" ? !1 : window.matchMedia(`(min-width: ${Ms[e] + 1}px)`).matches;
|
|
3312
3313
|
}
|
|
3313
3314
|
function Jt(e) {
|
|
3314
|
-
const t = ke(), r =
|
|
3315
|
+
const t = ke(), r = _r(), i = x(() => {
|
|
3315
3316
|
if (e.path) {
|
|
3316
3317
|
let a = e.collection;
|
|
3317
3318
|
if (a || (a = t.getCollection(e.path)), !a)
|
|
@@ -3342,7 +3343,7 @@ function Jt(e) {
|
|
|
3342
3343
|
}
|
|
3343
3344
|
const Vs = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAAB9pJREFUWMONl12obVUVx39jzLk+9j7nHq9y1QT1qpcbSIaXQFGs24PQl3HroSQyqHwJFJF6qaceCsqQoJdELHoIC6EeJCSKsi/TFLGozGsKXksljRLxnrP3WmvOOUYPa+19zsmPWpux5pxrzTX///Exx5hb+B/X1y+/nuIlVKF5m0v1YbQ55tIcKTQXFerNQkumOZ1oTiXCqUH8saR+74L8ZIWWux7+7JuuL2/04s5jJyhWQlXV71KtbhCtr1WtD6s0KlrjNBRaEi3JGzpv6bymQ0sn9mwv9otB7Ls7kn9Xo+U7D9z8/xG4+bz3cs35SjE/HEK8NWr8RBOrs+tQUUlEtAYaijRkbxmY0fuMzucsfcbSWnZQtiWxJL3Uid09iH0jIM8/1f+d3/zuS29M4PvHrmG+cZA8dMdjiLfNYrx6owrMVKlVUQkgkeI1iYbBJ3A2WPpKNtnx+UQisy29L0gPDGKfrwkPn2bJPfd/Zo0ZVp0fvOOdnLGxheX+A/Mq3nGwqS8/q645o4psxkgbhFqdSgqVJKIkghgqjuDoWh+dlm1AI0gUC3o4C9d04idbmZ06euQDPPHMj3YJ3HnkrZx98Fys2PFZ1dxxsJkdPbOecaBqmcWGqBVBIkEiKkoQJ5IJJBTbY8aRgBMwjxgVJoJJwDScnYUrOy2PBamfv/CS4zz9zE+IAIfPuQQzPzyrmq9u1e3RM+qWeaipNCCiE4DjbjgF94xZQj2htpjeK84ImqlIUpO9JllgEKgJDFpfOoh8paN8chbOeQ4g/OTq97PdLXSz3fjiVjO7/sx6g804ow41QWuCrjQPBB3bkZQgAkpBJOMojmIEjIgRKV6RpaYIZHGKQlK5OIv0L8bul8eOfsxjDJGD8613z6rmhq1qxkY1o9YKFUFEEED2xqoE1MNoWgPBwQZMl2SrSbQM9NQyUMlA5S3Rlcqd6E50RdRvPMvn9yE8qP9+9WWtQvXxzdic8xrwPaJrUYJGoq4sVBM1Ukuiln4UBipJVJrGoHUhrARB0XMQ/cizbSd61uaZlzUhXjuvWmqt9oOyAmUPEabnkSDV2j0Rp2YgksZdQpoCtRBwAiN4cKYdw4m3pNnbY9Tw4SZUh9tQEda+ld1WpmThgoivU8fYDbgEggRcleiZ6BOoFNRXLQQX1Eelggsgh8GPx6DhWB2iRgkj2OTuVX8dBzJtMx93BAKK4hIwUUSEID4BGspecWTfDwSCw+UxqByJoqPf9+xmYWQg7H3u+5Poyk3o5BZDxRBxxH29fdkF3YcBXKHgF+m+hLxn4OvbnnbPzMkjsm/+f5cXec2ye6ZfpO6+OX7pE8TqPj1zcN/7Zu8CDm44Bu6skrKjuOs0FlxWCJNMYxMOqLlR3DAvsAKaZo6t7+u7r6nhjN/5RKIQKESKhykhjeIINgJi+0m4Fiuns2WKZQybtJ2AfAWzGu/ayt0wz5gXimeKQyKSPI4kiCMhDxSgyLiOiY9kxnW2NVs+1ZeBbAmzhLmtgd0d8z1k1mIUTxQbKD5gnkmuDN6QvCF5TaIie0UmkIU1id3WcfwZHUo61eWB3gayDdOiZR+JXUuMWmcbyGWcny2RzOi8obeWwRsGrxm8JlGPBHCyOJmpJkwkHHs09pnfL1L60KLqtBKZtprhU+lVmSq9+xRsBfOMW6L4QLFM7zWdz+l8Ru8tA+10YKlJIiSxkcC6dQqlmJc/xaHIvTuZT7UpHalFUHEqL6iGsfKtM8FEzMdy7J4oXui9mk5CczpGErtEKgacQUZJE3gSwzw/i+dfx2G7e6IcOPALCXIkakGkYx4iwceyq+uENPp+RSI7DN7Q+5ylb7JgJLH0+XRGbOlRerWJwNgmnOwJ83Tvq/7KX2KZb1nJfnfp5YRoda7hFC/MQyGI7Mteow2E4pHkDT2zyfS758HV4bSjolOjF2PYS4KBbN2L5vmHZ7DpsWQnDsvfLj1+Lwufy9LSO2y5M1Mnik8OEJxAoSJRk7xhoKX3+URiztI3WPgGS2/p1OnE6CcSvRQGH+htQfH07dPSP7Lp9ajcNy+9DnG/oMT67qqZHz/QtGxVyjworQqVCIjiPiaaTD1ttZZ+fTIeCXQ+Y6HCQm0tO5LYpmfHlyy9/1nCPi3ICw/99JbxUHrdvxr6Q4depdhTfeGapVeH+imKxwhv6ZnR+5zeN0aNGU2+ZIPON0cX0LBQYSnGQgsLSSzoWdiCHVvQ2fLP2fMtwf2vDz50K6TpVPxj/sn7Ni5iu9l6Tof+yd78yoWFQ0uvWYvVLK1h6e34B8RnY9DZnIW3LAijxpLYkZ6Fd+z4km3bYcd2WNry8ezppsZ5ZMd2+MfTv3xtjbr9/PfwyoFDzPvtq7I2t+Vq/m6pt4hxThVaojao1CANRkORmkwkiTCI00thKYWOzJJR+6V1JE8/z2JfqGgfW9jLPPLg7a9Xe8frHs7j5MVXESxfmLS5KYXmxhQ3z/a4icQNRFtEGlwjJkoRIamTmIKNTE+it57kw0sF+1ah3CkSXkiPf42Htl+3WL/2+vIFJ6ishJ3QXD1o9dEhVCcGbS7ModUcakwrigaKChkoYmQK2XMp5L8V/F7DfuDePYrEcv8f7npdnDcksEvkg9RewquhuayTcHzQeCyJXpFVD2fRzSxCFtkuwqks8mjB/ujYr9y6k0gs9528503X/w/F3eUgyIBI4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMFQxOToyODozMyswMDowMEzeSx4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTBUMTk6Mjg6MzMrMDA6MDA9g/OiAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE2MjA2NzQ5MTMk8oswAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMjEtMDUtMTAvOGIxNDNhYjgwODhkMjBlZThkYmUzOTFhN2NkNmQ3NmQuaWNvLnBuZ9msgG0AAAAASUVORK5CYII=
|
|
3344
3345
|
`;
|
|
3345
|
-
function
|
|
3346
|
+
function Yu(e, t) {
|
|
3346
3347
|
z(() => {
|
|
3347
3348
|
if (document) {
|
|
3348
3349
|
document.title = `${e} - FireCMS`;
|
|
@@ -3380,7 +3381,7 @@ function po(e) {
|
|
|
3380
3381
|
return s;
|
|
3381
3382
|
}
|
|
3382
3383
|
const Gs = "/", js = "/c";
|
|
3383
|
-
function
|
|
3384
|
+
function qu(e) {
|
|
3384
3385
|
const {
|
|
3385
3386
|
basePath: t = Gs,
|
|
3386
3387
|
baseCollectionPath: r = js,
|
|
@@ -3393,7 +3394,7 @@ function Yu(e) {
|
|
|
3393
3394
|
userConfigPersistence: d,
|
|
3394
3395
|
dataSourceDelegate: u,
|
|
3395
3396
|
injectCollections: f
|
|
3396
|
-
} = e, m = se(), p = se(), g = se(), [A, h] = P(!1), [y, b] = P(void 0), [w, E] = P(!0), [k,
|
|
3397
|
+
} = e, m = se(), p = se(), g = se(), [A, h] = P(!1), [y, b] = P(void 0), [w, E] = P(!0), [k, C] = P(void 0), _ = Ee(t), B = Ee(r), S = _ ? `/${_}` : "/", D = _ ? `/${_}/${B}` : `/${B}`, Q = x(
|
|
3397
3398
|
(T) => _ ? `/${_}/${Ht(T)}` : `/${Ht(T)}`,
|
|
3398
3399
|
[_]
|
|
3399
3400
|
), R = x(
|
|
@@ -3454,7 +3455,7 @@ function Yu(e) {
|
|
|
3454
3455
|
const q = G(T, ie, te, c);
|
|
3455
3456
|
O && !L(y, q) && b(q);
|
|
3456
3457
|
} catch (T) {
|
|
3457
|
-
console.error(T),
|
|
3458
|
+
console.error(T), C(T);
|
|
3458
3459
|
}
|
|
3459
3460
|
E(!1), h(!0);
|
|
3460
3461
|
}
|
|
@@ -3577,14 +3578,14 @@ function Yu(e) {
|
|
|
3577
3578
|
convertIdsToPaths: re
|
|
3578
3579
|
};
|
|
3579
3580
|
}
|
|
3580
|
-
function
|
|
3581
|
+
function Uu(e, t) {
|
|
3581
3582
|
return t ? `${Ee(e)}/${Ee(t)}` : Ee(e);
|
|
3582
3583
|
}
|
|
3583
3584
|
function Ht(e) {
|
|
3584
3585
|
return encodeURIComponent(Ee(e)).replaceAll("%2F", "/").replaceAll("%23", "#");
|
|
3585
3586
|
}
|
|
3586
3587
|
function fo(e, t) {
|
|
3587
|
-
return e.filter((r) => r.permissions ?
|
|
3588
|
+
return e.filter((r) => r.permissions ? vr(r, t, r.path, null)?.read !== !1 : !0).map((r) => r.subcollections ? {
|
|
3588
3589
|
...r,
|
|
3589
3590
|
subcollections: fo(r.subcollections, t)
|
|
3590
3591
|
} : r);
|
|
@@ -3625,7 +3626,7 @@ function qs(e, t) {
|
|
|
3625
3626
|
} = t;
|
|
3626
3627
|
return ho(r ?? [], o ?? []) ? L(i, a) : !1;
|
|
3627
3628
|
}
|
|
3628
|
-
function
|
|
3629
|
+
function Lu() {
|
|
3629
3630
|
const e = se({}), t = x((p) => {
|
|
3630
3631
|
const g = localStorage.getItem(p);
|
|
3631
3632
|
return g ? JSON.parse(g) : {};
|
|
@@ -3659,7 +3660,7 @@ function Uu() {
|
|
|
3659
3660
|
setCollapsedGroups: m
|
|
3660
3661
|
};
|
|
3661
3662
|
}
|
|
3662
|
-
function
|
|
3663
|
+
function $u() {
|
|
3663
3664
|
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, o] = P(r ? "dark" : "light");
|
|
3664
3665
|
z(() => {
|
|
3665
3666
|
o(r ? "dark" : "light"), l(r ? "dark" : "light");
|
|
@@ -3680,7 +3681,7 @@ function Lu() {
|
|
|
3680
3681
|
toggleMode: c
|
|
3681
3682
|
};
|
|
3682
3683
|
}
|
|
3683
|
-
function
|
|
3684
|
+
function Wu({
|
|
3684
3685
|
disabled: e,
|
|
3685
3686
|
authController: t,
|
|
3686
3687
|
authenticator: r,
|
|
@@ -3811,7 +3812,7 @@ function Ws({
|
|
|
3811
3812
|
size: "small",
|
|
3812
3813
|
onClick: (s) => (s.stopPropagation(), s.preventDefault(), navigator.clipboard.writeText(t)),
|
|
3813
3814
|
children: /* @__PURE__ */ n(
|
|
3814
|
-
|
|
3815
|
+
pr,
|
|
3815
3816
|
{
|
|
3816
3817
|
className: "text-gray-500",
|
|
3817
3818
|
size: "small"
|
|
@@ -3837,7 +3838,7 @@ function Ws({
|
|
|
3837
3838
|
size: "small",
|
|
3838
3839
|
onClick: (s) => s.stopPropagation(),
|
|
3839
3840
|
children: /* @__PURE__ */ n(
|
|
3840
|
-
|
|
3841
|
+
fr,
|
|
3841
3842
|
{
|
|
3842
3843
|
className: "text-gray-500",
|
|
3843
3844
|
size: "small"
|
|
@@ -3894,7 +3895,7 @@ function dr({
|
|
|
3894
3895
|
height: vt(r)
|
|
3895
3896
|
},
|
|
3896
3897
|
children: [
|
|
3897
|
-
/* @__PURE__ */ n(
|
|
3898
|
+
/* @__PURE__ */ n(da, { className: "flex-grow" }),
|
|
3898
3899
|
i && /* @__PURE__ */ n(_e, { title: i, children: /* @__PURE__ */ n(
|
|
3899
3900
|
$,
|
|
3900
3901
|
{
|
|
@@ -3916,7 +3917,7 @@ function dr({
|
|
|
3916
3917
|
},
|
|
3917
3918
|
target: "_blank",
|
|
3918
3919
|
children: [
|
|
3919
|
-
/* @__PURE__ */ n(
|
|
3920
|
+
/* @__PURE__ */ n(fr, { size: "small" }),
|
|
3920
3921
|
e
|
|
3921
3922
|
]
|
|
3922
3923
|
}
|
|
@@ -3934,9 +3935,9 @@ function _t({
|
|
|
3934
3935
|
} else if (e.dataType === "array") {
|
|
3935
3936
|
const i = e;
|
|
3936
3937
|
i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ v(j, { children: [
|
|
3937
|
-
i.of.map((o, a) =>
|
|
3938
|
+
i.of.map((o, a) => Qr(o, a)),
|
|
3938
3939
|
" "
|
|
3939
|
-
] }) : i.of.dataType === "map" && i.of.properties ? r = Hs(i.of.properties, t, i.of.previewProperties) : i.of.dataType === "string" ? i.of.enumValues ? r = Xs() : i.of.storage ? r =
|
|
3940
|
+
] }) : i.of.dataType === "map" && i.of.properties ? r = Hs(i.of.properties, t, i.of.previewProperties) : i.of.dataType === "string" ? i.of.enumValues ? r = Xs() : i.of.storage ? r = Qr(i.of) : r = Zs() : r = Qr(i.of));
|
|
3940
3941
|
} else
|
|
3941
3942
|
e.dataType === "map" ? r = Js(e, t) : e.dataType === "date" ? r = nt() : e.dataType === "reference" ? r = Ks() : (e.dataType, r = nt());
|
|
3942
3943
|
return r || null;
|
|
@@ -4016,7 +4017,7 @@ function Xs() {
|
|
|
4016
4017
|
(e, t) => /* @__PURE__ */ n(j, { children: nt(t) })
|
|
4017
4018
|
) });
|
|
4018
4019
|
}
|
|
4019
|
-
function
|
|
4020
|
+
function Qr(e, t = 0) {
|
|
4020
4021
|
return /* @__PURE__ */ n(
|
|
4021
4022
|
"div",
|
|
4022
4023
|
{
|
|
@@ -4068,7 +4069,7 @@ function tl(e) {
|
|
|
4068
4069
|
function nt(e, t = 120) {
|
|
4069
4070
|
return /* @__PURE__ */ n(Ye, { width: t }, `skeleton_${e}`);
|
|
4070
4071
|
}
|
|
4071
|
-
function
|
|
4072
|
+
function Ju(e) {
|
|
4072
4073
|
return /* @__PURE__ */ n(
|
|
4073
4074
|
Ye,
|
|
4074
4075
|
{
|
|
@@ -4215,7 +4216,7 @@ function Ji({
|
|
|
4215
4216
|
return u ? /* @__PURE__ */ n(
|
|
4216
4217
|
I.Fragment,
|
|
4217
4218
|
{
|
|
4218
|
-
children: /* @__PURE__ */ n("div", { className: H(
|
|
4219
|
+
children: /* @__PURE__ */ n("div", { className: H(Be, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
|
|
4219
4220
|
Fe,
|
|
4220
4221
|
{
|
|
4221
4222
|
propertyKey: e,
|
|
@@ -4250,9 +4251,9 @@ function al({
|
|
|
4250
4251
|
values: c.values,
|
|
4251
4252
|
fields: f.propertyConfigs
|
|
4252
4253
|
}), [p]), A = he(
|
|
4253
|
-
() =>
|
|
4254
|
+
() => Cs(g, f.propertyConfigs, o, s === "small" || s === "medium" ? 3 : 1),
|
|
4254
4255
|
[o, g, s]
|
|
4255
|
-
), h = Hn(g, f.propertyConfigs), y =
|
|
4256
|
+
), h = Hn(g, f.propertyConfigs), y = Bs(g), b = y ? g.properties[y] : void 0, w = A.filter((E) => E !== h && E !== y);
|
|
4256
4257
|
return /* @__PURE__ */ v(
|
|
4257
4258
|
bt,
|
|
4258
4259
|
{
|
|
@@ -4377,7 +4378,7 @@ const yo = yt.forwardRef(({
|
|
|
4377
4378
|
i === "tiny" ? "p-1" : "p-2",
|
|
4378
4379
|
"flex border rounded-lg",
|
|
4379
4380
|
r ? "cursor-pointer" : "",
|
|
4380
|
-
|
|
4381
|
+
Be,
|
|
4381
4382
|
a
|
|
4382
4383
|
),
|
|
4383
4384
|
onClick: (d) => {
|
|
@@ -4671,7 +4672,7 @@ function pl({
|
|
|
4671
4672
|
(f, m) => /* @__PURE__ */ n(
|
|
4672
4673
|
I.Fragment,
|
|
4673
4674
|
{
|
|
4674
|
-
children: /* @__PURE__ */ n("div", { className: H(
|
|
4675
|
+
children: /* @__PURE__ */ n("div", { className: H(Be, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: f && /* @__PURE__ */ n(
|
|
4675
4676
|
Fe,
|
|
4676
4677
|
{
|
|
4677
4678
|
propertyKey: e,
|
|
@@ -4723,7 +4724,7 @@ function fl({
|
|
|
4723
4724
|
return /* @__PURE__ */ v(
|
|
4724
4725
|
"div",
|
|
4725
4726
|
{
|
|
4726
|
-
className: H(
|
|
4727
|
+
className: H(Be, "last:border-b-0 border-b"),
|
|
4727
4728
|
children: [
|
|
4728
4729
|
/* @__PURE__ */ v(
|
|
4729
4730
|
"div",
|
|
@@ -4763,7 +4764,7 @@ function fl({
|
|
|
4763
4764
|
]
|
|
4764
4765
|
}
|
|
4765
4766
|
),
|
|
4766
|
-
(c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: H(
|
|
4767
|
+
(c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: H(Be, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ n(
|
|
4767
4768
|
Fe,
|
|
4768
4769
|
{
|
|
4769
4770
|
propertyKey: s,
|
|
@@ -4788,7 +4789,7 @@ function vo({ value: e }) {
|
|
|
4788
4789
|
children: Object.entries(e).map(([t, r]) => /* @__PURE__ */ v(
|
|
4789
4790
|
"div",
|
|
4790
4791
|
{
|
|
4791
|
-
className: H(
|
|
4792
|
+
className: H(Be, "last:border-b-0 border-b"),
|
|
4792
4793
|
children: [
|
|
4793
4794
|
/* @__PURE__ */ v(
|
|
4794
4795
|
"div",
|
|
@@ -4821,7 +4822,7 @@ function vo({ value: e }) {
|
|
|
4821
4822
|
]
|
|
4822
4823
|
}
|
|
4823
4824
|
),
|
|
4824
|
-
typeof r == "object" && /* @__PURE__ */ n("div", { className: H(
|
|
4825
|
+
typeof r == "object" && /* @__PURE__ */ n("div", { className: H(Be, "border-l pl-4"), children: /* @__PURE__ */ n(vo, { value: r }) })
|
|
4825
4826
|
]
|
|
4826
4827
|
},
|
|
4827
4828
|
`map_preview_table_${t}}`
|
|
@@ -4896,7 +4897,7 @@ const Fe = I.memo(function(t) {
|
|
|
4896
4897
|
if (s === void 0 || u === null)
|
|
4897
4898
|
i = /* @__PURE__ */ n(gt, {});
|
|
4898
4899
|
else if (u.Preview)
|
|
4899
|
-
i =
|
|
4900
|
+
i = ta(
|
|
4900
4901
|
u.Preview,
|
|
4901
4902
|
{
|
|
4902
4903
|
propertyKey: a,
|
|
@@ -5039,7 +5040,7 @@ function lt(e, t, r) {
|
|
|
5039
5040
|
}
|
|
5040
5041
|
);
|
|
5041
5042
|
}
|
|
5042
|
-
function
|
|
5043
|
+
function Hu({
|
|
5043
5044
|
propertyKey: e,
|
|
5044
5045
|
value: t,
|
|
5045
5046
|
property: r,
|
|
@@ -5088,7 +5089,7 @@ function Ju({
|
|
|
5088
5089
|
`table_${f}_${m}`
|
|
5089
5090
|
)) }) });
|
|
5090
5091
|
}
|
|
5091
|
-
const
|
|
5092
|
+
const Zu = yt.memo(
|
|
5092
5093
|
function({
|
|
5093
5094
|
builder: t
|
|
5094
5095
|
}) {
|
|
@@ -5117,9 +5118,9 @@ function _o({
|
|
|
5117
5118
|
entityId: e.id,
|
|
5118
5119
|
values: e.values,
|
|
5119
5120
|
fields: o.propertyConfigs
|
|
5120
|
-
}), [t, r, e]).properties;
|
|
5121
|
+
}), [t, r, e, o.propertyConfigs]).properties;
|
|
5121
5122
|
return /* @__PURE__ */ n("div", { className: "w-full " + i, children: /* @__PURE__ */ v("div", { className: "w-full mb-4", children: [
|
|
5122
|
-
/* @__PURE__ */ v("div", { className: H(
|
|
5123
|
+
/* @__PURE__ */ v("div", { className: H(Be, "flex justify-between py-2 border-b last:border-b-0"), children: [
|
|
5123
5124
|
/* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: "Id" }) }),
|
|
5124
5125
|
/* @__PURE__ */ v(
|
|
5125
5126
|
"div",
|
|
@@ -5134,7 +5135,7 @@ function _o({
|
|
|
5134
5135
|
rel: "noopener noreferrer",
|
|
5135
5136
|
target: "_blank",
|
|
5136
5137
|
children: /* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(
|
|
5137
|
-
|
|
5138
|
+
fr,
|
|
5138
5139
|
{
|
|
5139
5140
|
size: "small"
|
|
5140
5141
|
}
|
|
@@ -5150,7 +5151,7 @@ function _o({
|
|
|
5150
5151
|
return /* @__PURE__ */ v(
|
|
5151
5152
|
"div",
|
|
5152
5153
|
{
|
|
5153
|
-
className: H(
|
|
5154
|
+
className: H(Be, "flex justify-between py-2 border-b last:border-b-0"),
|
|
5154
5155
|
children: [
|
|
5155
5156
|
/* @__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 }) }),
|
|
5156
5157
|
/* @__PURE__ */ n(
|
|
@@ -5192,7 +5193,7 @@ function bl(e) {
|
|
|
5192
5193
|
return wi(c, f, !s, 2e3), z(() => {
|
|
5193
5194
|
t.current && s && !u.current ? (u.current = !0, t.current.focus({ preventScroll: !0 }), t.current.selectionStart = t.current.value.length, t.current.selectionEnd = t.current.value.length) : u.current = s;
|
|
5194
5195
|
}, [s, t]), /* @__PURE__ */ n(
|
|
5195
|
-
|
|
5196
|
+
ua,
|
|
5196
5197
|
{
|
|
5197
5198
|
ref: t,
|
|
5198
5199
|
style: {
|
|
@@ -5224,7 +5225,7 @@ function bl(e) {
|
|
|
5224
5225
|
}
|
|
5225
5226
|
);
|
|
5226
5227
|
}
|
|
5227
|
-
function
|
|
5228
|
+
function Rr(e) {
|
|
5228
5229
|
const {
|
|
5229
5230
|
name: t,
|
|
5230
5231
|
enumValues: r,
|
|
@@ -5386,7 +5387,7 @@ function wl(e) {
|
|
|
5386
5387
|
return z(() => {
|
|
5387
5388
|
o.current && i && o.current.focus({ preventScroll: !0 });
|
|
5388
5389
|
}, [i, o]), /* @__PURE__ */ n(
|
|
5389
|
-
|
|
5390
|
+
ma,
|
|
5390
5391
|
{
|
|
5391
5392
|
ref: o,
|
|
5392
5393
|
size: "small",
|
|
@@ -5487,7 +5488,7 @@ function xo({
|
|
|
5487
5488
|
if (!d)
|
|
5488
5489
|
throw Error("Storage meta must be specified");
|
|
5489
5490
|
const f = d?.metadata, m = u ? "small" : "medium", p = d?.imageCompression, g = (u ? i ?? [] : i ? [i] : []).map((_) => ({
|
|
5490
|
-
id:
|
|
5491
|
+
id: Dr(),
|
|
5491
5492
|
storagePathOrDownloadUrl: _,
|
|
5492
5493
|
metadata: f,
|
|
5493
5494
|
size: m
|
|
@@ -5497,32 +5498,32 @@ function xo({
|
|
|
5497
5498
|
}, [g, i, A]);
|
|
5498
5499
|
const w = x(async (_) => {
|
|
5499
5500
|
if (d.fileName) {
|
|
5500
|
-
const
|
|
5501
|
-
if (!
|
|
5501
|
+
const B = await _l(d.fileName, d, t, e, r, o, _, a);
|
|
5502
|
+
if (!B || B.length === 0)
|
|
5502
5503
|
throw Error("You need to return a valid filename");
|
|
5503
|
-
return
|
|
5504
|
+
return B;
|
|
5504
5505
|
}
|
|
5505
5506
|
return Mt() + "_" + _.name;
|
|
5506
|
-
}, [e, t, r, o, a, d]), E = x((_) => kl(d.storagePath, d, t, e, r, o, _, a) ?? "/", [e, t, r, o, a, d]), k = x(async (_,
|
|
5507
|
-
console.debug("onFileUploadComplete", _,
|
|
5507
|
+
}, [e, t, r, o, a, d]), E = x((_) => kl(d.storagePath, d, t, e, r, o, _, a) ?? "/", [e, t, r, o, a, d]), k = x(async (_, B, S) => {
|
|
5508
|
+
console.debug("onFileUploadComplete", _, B);
|
|
5508
5509
|
let D = _;
|
|
5509
5510
|
if (d.storeUrl && (D = (await s.getDownloadURL(_)).url), d.postProcess && D && (D = await d.postProcess(D)), !D) {
|
|
5510
5511
|
console.warn("uploadPathOrDownloadUrl is null");
|
|
5511
5512
|
return;
|
|
5512
5513
|
}
|
|
5513
5514
|
let Q;
|
|
5514
|
-
|
|
5515
|
+
B.storagePathOrDownloadUrl = D, B.metadata = S, Q = [...y], Q = Xi(Q), b(Q);
|
|
5515
5516
|
const R = Q.filter((G) => !!G.storagePathOrDownloadUrl).map((G) => G.storagePathOrDownloadUrl);
|
|
5516
5517
|
c(u ? R : R ? R[0] : null);
|
|
5517
|
-
}, [y, u, c, d, s]),
|
|
5518
|
+
}, [y, u, c, d, s]), C = x(async (_) => {
|
|
5518
5519
|
if (!_.length || l)
|
|
5519
5520
|
return;
|
|
5520
|
-
let
|
|
5521
|
+
let B;
|
|
5521
5522
|
if (u)
|
|
5522
|
-
|
|
5523
|
+
B = [
|
|
5523
5524
|
...y,
|
|
5524
|
-
...await Promise.all(_.map(async (S) => (p &&
|
|
5525
|
-
id:
|
|
5525
|
+
...await Promise.all(_.map(async (S) => (p && Xr(S) && (S = await en(S, p)), {
|
|
5526
|
+
id: Dr(),
|
|
5526
5527
|
file: S,
|
|
5527
5528
|
fileName: await w(S),
|
|
5528
5529
|
metadata: f,
|
|
@@ -5531,15 +5532,15 @@ function xo({
|
|
|
5531
5532
|
];
|
|
5532
5533
|
else {
|
|
5533
5534
|
let S = _[0];
|
|
5534
|
-
p &&
|
|
5535
|
-
id:
|
|
5535
|
+
p && Xr(S) && (S = await en(S, p)), B = [{
|
|
5536
|
+
id: Dr(),
|
|
5536
5537
|
file: S,
|
|
5537
5538
|
fileName: await w(S),
|
|
5538
5539
|
metadata: f,
|
|
5539
5540
|
size: m
|
|
5540
5541
|
}];
|
|
5541
5542
|
}
|
|
5542
|
-
|
|
5543
|
+
B = Xi(B), b(B);
|
|
5543
5544
|
}, [l, w, y, f, u, m]);
|
|
5544
5545
|
return {
|
|
5545
5546
|
internalValue: y,
|
|
@@ -5548,7 +5549,7 @@ function xo({
|
|
|
5548
5549
|
fileNameBuilder: w,
|
|
5549
5550
|
storagePathBuilder: E,
|
|
5550
5551
|
onFileUploadComplete: k,
|
|
5551
|
-
onFilesAdded:
|
|
5552
|
+
onFilesAdded: C,
|
|
5552
5553
|
multipleFilesSupported: u
|
|
5553
5554
|
};
|
|
5554
5555
|
}
|
|
@@ -5557,15 +5558,15 @@ function Xi(e) {
|
|
|
5557
5558
|
(t, r) => (e.map((i) => i.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl) === r || !t.storagePathOrDownloadUrl) && (e.map((i) => i.file).indexOf(t.file) === r || !t.file)
|
|
5558
5559
|
);
|
|
5559
5560
|
}
|
|
5560
|
-
function
|
|
5561
|
+
function Dr() {
|
|
5561
5562
|
return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
|
|
5562
5563
|
}
|
|
5563
5564
|
const Ki = {
|
|
5564
5565
|
"image/jpeg": "JPEG",
|
|
5565
5566
|
"image/png": "PNG",
|
|
5566
5567
|
"image/webp": "WEBP"
|
|
5567
|
-
},
|
|
5568
|
-
const i = t.quality === void 0 ? xl : t.quality, o = i >= 0 && i <= 100 ? i : 100, a =
|
|
5568
|
+
}, Xr = (e) => Ki[e.type] ? Ki[e.type] : null, xl = 100, en = (e, t) => new Promise((r) => {
|
|
5569
|
+
const i = t.quality === void 0 ? xl : t.quality, o = i >= 0 && i <= 100 ? i : 100, a = Xr(e);
|
|
5569
5570
|
if (!a)
|
|
5570
5571
|
throw Error("resizeAndCompressImage: Unsupported image format");
|
|
5571
5572
|
is.imageFileResizer(
|
|
@@ -5607,7 +5608,7 @@ function Eo({
|
|
|
5607
5608
|
return I.useEffect(() => (m.current = !0, t.file && g(t.file, t.fileName), () => {
|
|
5608
5609
|
m.current = !1;
|
|
5609
5610
|
}), [t.file, t.fileName, g]), a ? /* @__PURE__ */ n("div", { className: `m-4 w-${o} h-${o}`, children: u && /* @__PURE__ */ n(Ye, { className: `w-${o} h-${o}` }) }) : /* @__PURE__ */ v("div", { className: H(
|
|
5610
|
-
|
|
5611
|
+
hr,
|
|
5611
5612
|
"relative m-4 border-box flex items-center justify-center",
|
|
5612
5613
|
`min-w-[${o}px] min-h-[${o}px]`
|
|
5613
5614
|
), children: [
|
|
@@ -5621,7 +5622,7 @@ function Eo({
|
|
|
5621
5622
|
)
|
|
5622
5623
|
] });
|
|
5623
5624
|
}
|
|
5624
|
-
function
|
|
5625
|
+
function Co({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPopup: o, children: a }) {
|
|
5625
5626
|
const s = se(null), l = x(() => {
|
|
5626
5627
|
if (o) {
|
|
5627
5628
|
const d = s && s?.current?.getBoundingClientRect();
|
|
@@ -5674,7 +5675,7 @@ function Bo({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPop
|
|
|
5674
5675
|
style: { width: 32, height: 32 },
|
|
5675
5676
|
title: e.message,
|
|
5676
5677
|
children: /* @__PURE__ */ n(
|
|
5677
|
-
|
|
5678
|
+
pa,
|
|
5678
5679
|
{
|
|
5679
5680
|
size: "small",
|
|
5680
5681
|
color: "error"
|
|
@@ -5684,7 +5685,7 @@ function Bo({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPop
|
|
|
5684
5685
|
)
|
|
5685
5686
|
] }) });
|
|
5686
5687
|
}
|
|
5687
|
-
const El = "max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",
|
|
5688
|
+
const El = "max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", Cl = "pt-0 border-2 border-solid", Bl = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900", Sl = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";
|
|
5688
5689
|
function Il(e) {
|
|
5689
5690
|
const {
|
|
5690
5691
|
propertyKey: t,
|
|
@@ -5770,9 +5771,9 @@ function Nl({
|
|
|
5770
5771
|
} else
|
|
5771
5772
|
throw Error("Storage field using array must be of data type string");
|
|
5772
5773
|
}
|
|
5773
|
-
const E = p?.metadata, k = !!r,
|
|
5774
|
+
const E = p?.metadata, k = !!r, C = ft(), {
|
|
5774
5775
|
open: _,
|
|
5775
|
-
getRootProps:
|
|
5776
|
+
getRootProps: B,
|
|
5776
5777
|
getInputProps: S,
|
|
5777
5778
|
isDragActive: D,
|
|
5778
5779
|
isDragAccept: Q,
|
|
@@ -5788,13 +5789,13 @@ function Nl({
|
|
|
5788
5789
|
onDropRejected: (V, ee) => {
|
|
5789
5790
|
for (const K of V)
|
|
5790
5791
|
for (const oe of K.errors)
|
|
5791
|
-
|
|
5792
|
+
C.open({
|
|
5792
5793
|
type: "error",
|
|
5793
5794
|
message: `Error uploading file: File is larger than ${p.maxSize} bytes`
|
|
5794
5795
|
});
|
|
5795
5796
|
}
|
|
5796
5797
|
}
|
|
5797
|
-
), { ...G } =
|
|
5798
|
+
), { ...G } = B(), le = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", ne = d ? e.of : e, J = he(() => vt(w), [w]), Y = !f && l;
|
|
5798
5799
|
return /* @__PURE__ */ v(
|
|
5799
5800
|
"div",
|
|
5800
5801
|
{
|
|
@@ -5806,8 +5807,8 @@ function Nl({
|
|
|
5806
5807
|
El,
|
|
5807
5808
|
"relative w-full h-full flex",
|
|
5808
5809
|
`justify-${k ? "start" : "center"}`,
|
|
5809
|
-
D ?
|
|
5810
|
-
Q ?
|
|
5810
|
+
D ? Cl : "",
|
|
5811
|
+
Q ? Bl : "",
|
|
5811
5812
|
R ? Sl : ""
|
|
5812
5813
|
),
|
|
5813
5814
|
children: [
|
|
@@ -5853,7 +5854,7 @@ function Nl({
|
|
|
5853
5854
|
}
|
|
5854
5855
|
),
|
|
5855
5856
|
/* @__PURE__ */ n(
|
|
5856
|
-
|
|
5857
|
+
Co,
|
|
5857
5858
|
{
|
|
5858
5859
|
showError: Y,
|
|
5859
5860
|
disabled: f,
|
|
@@ -5866,7 +5867,7 @@ function Nl({
|
|
|
5866
5867
|
color: "inherit",
|
|
5867
5868
|
size: "small",
|
|
5868
5869
|
onClick: _,
|
|
5869
|
-
children: /* @__PURE__ */ n(
|
|
5870
|
+
children: /* @__PURE__ */ n(fa, { size: "small", className: "text-gray-500" })
|
|
5870
5871
|
}
|
|
5871
5872
|
)
|
|
5872
5873
|
}
|
|
@@ -5923,7 +5924,7 @@ const Pl = I.memo(
|
|
|
5923
5924
|
} = t, p = x((k) => {
|
|
5924
5925
|
o(k ? at(k) : null);
|
|
5925
5926
|
}, [o]), g = x((k) => {
|
|
5926
|
-
o(k.map((
|
|
5927
|
+
o(k.map((C) => at(C)));
|
|
5927
5928
|
}, [o]), A = i ? Array.isArray(i) ? i.map((k) => k.id) : i.id ? [i.id] : [] : [], h = Jt(
|
|
5928
5929
|
{
|
|
5929
5930
|
multiselect: a,
|
|
@@ -5954,7 +5955,7 @@ const Pl = I.memo(
|
|
|
5954
5955
|
children: /* @__PURE__ */ n(Ne, { title: "Value is not a reference.", error: "Click to edit" })
|
|
5955
5956
|
}
|
|
5956
5957
|
), E = () => Array.isArray(i) ? /* @__PURE__ */ n(j, { children: i.map(
|
|
5957
|
-
(k,
|
|
5958
|
+
(k, C) => /* @__PURE__ */ n(
|
|
5958
5959
|
"div",
|
|
5959
5960
|
{
|
|
5960
5961
|
className: "w-full my-0.5",
|
|
@@ -5970,7 +5971,7 @@ const Pl = I.memo(
|
|
|
5970
5971
|
}
|
|
5971
5972
|
)
|
|
5972
5973
|
},
|
|
5973
|
-
`preview_array_ref_${r}_${
|
|
5974
|
+
`preview_array_ref_${r}_${C}`
|
|
5974
5975
|
)
|
|
5975
5976
|
) }) : /* @__PURE__ */ n(Ne, { error: "Data is not an array of references" });
|
|
5976
5977
|
return m ? /* @__PURE__ */ v("div", { className: "w-full group", children: [
|
|
@@ -5996,7 +5997,7 @@ const Pl = I.memo(
|
|
|
5996
5997
|
ze.addMethod(ze.array, "uniqueInArray", function(e = (r) => r, t) {
|
|
5997
5998
|
return this.test("uniqueInArray", t, (r) => !r || r.length === new Set(r.map(e)).size);
|
|
5998
5999
|
});
|
|
5999
|
-
function
|
|
6000
|
+
function Bo(e, t, r) {
|
|
6000
6001
|
const i = {};
|
|
6001
6002
|
return Object.entries(t).forEach(([o, a]) => {
|
|
6002
6003
|
i[o] = Gt({
|
|
@@ -6293,11 +6294,11 @@ const jl = ({
|
|
|
6293
6294
|
hideOverflow: A = !0,
|
|
6294
6295
|
showExpandIcon: h = !0
|
|
6295
6296
|
}) {
|
|
6296
|
-
const [y, b] = Fn(), w = se(null), E = he(() => kt(i), [i]), [k,
|
|
6297
|
+
const [y, b] = Fn(), w = se(null), E = he(() => kt(i), [i]), [k, C] = P(!1), [_, B] = P(l), S = !a && !!c;
|
|
6297
6298
|
z(() => {
|
|
6298
|
-
l &&
|
|
6299
|
+
l && B(!0);
|
|
6299
6300
|
const oe = setTimeout(() => {
|
|
6300
|
-
|
|
6301
|
+
B(!1);
|
|
6301
6302
|
}, 800);
|
|
6302
6303
|
return () => {
|
|
6303
6304
|
clearTimeout(oe);
|
|
@@ -6337,7 +6338,7 @@ const jl = ({
|
|
|
6337
6338
|
a ? p(void 0) : !o && oe && p(oe);
|
|
6338
6339
|
}, [w, p, o, a]), G = x((oe) => {
|
|
6339
6340
|
R(), oe.stopPropagation();
|
|
6340
|
-
}, [R]), le = he(() => b ? b.height > E : !1, [b, E]), ne = !S && o, J = !a && u && le, Y = !a && !u && le, V = x(() =>
|
|
6341
|
+
}, [R]), le = he(() => b ? b.height > E : !1, [b, E]), ne = !S && o, J = !a && u && le, Y = !a && !u && le, V = x(() => C(!0), []), ee = x(() => C(!1), []), K = S ? "border-red-500" : _ ? "border-green-500" : ne ? "border-primary" : "border-transparent";
|
|
6341
6342
|
return /* @__PURE__ */ v(
|
|
6342
6343
|
"div",
|
|
6343
6344
|
{
|
|
@@ -6389,7 +6390,7 @@ const jl = ({
|
|
|
6389
6390
|
)
|
|
6390
6391
|
] }),
|
|
6391
6392
|
r,
|
|
6392
|
-
a && k && s && /* @__PURE__ */ n("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ n(_e, { title: s, children: /* @__PURE__ */ n(
|
|
6393
|
+
a && k && s && /* @__PURE__ */ n("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ n(_e, { title: s, children: /* @__PURE__ */ n(ha, { size: "smallest", color: "disabled", className: "text-gray-500" }) }) })
|
|
6393
6394
|
]
|
|
6394
6395
|
}
|
|
6395
6396
|
);
|
|
@@ -6430,7 +6431,7 @@ const Ul = I.memo(
|
|
|
6430
6431
|
selectedCell: A,
|
|
6431
6432
|
select: h,
|
|
6432
6433
|
setPopupCell: y
|
|
6433
|
-
} = Yl(), b = A?.propertyKey === t && A?.entity.path === d.path && A?.entity.id === d.id, [w, E] = P(i), k = se(i), [
|
|
6434
|
+
} = Yl(), b = A?.propertyKey === t && A?.entity.path === d.path && A?.entity.id === d.id, [w, E] = P(i), k = se(i), [C, _] = P(), [B, S] = P(), [D, Q] = P(!1), R = x(() => {
|
|
6434
6435
|
Q(!0), setTimeout(() => {
|
|
6435
6436
|
Q(!1);
|
|
6436
6437
|
}, 100);
|
|
@@ -6494,7 +6495,7 @@ const Ul = I.memo(
|
|
|
6494
6495
|
} : void 0);
|
|
6495
6496
|
};
|
|
6496
6497
|
let W, re = !1, T = !1, ie = !0, te = !1, O = !1, q = !0;
|
|
6497
|
-
const Z = !Y &&
|
|
6498
|
+
const Z = !Y && C;
|
|
6498
6499
|
if (u || ne)
|
|
6499
6500
|
return /* @__PURE__ */ n(
|
|
6500
6501
|
ur,
|
|
@@ -6526,7 +6527,7 @@ const Ul = I.memo(
|
|
|
6526
6527
|
W = /* @__PURE__ */ n(
|
|
6527
6528
|
Il,
|
|
6528
6529
|
{
|
|
6529
|
-
error:
|
|
6530
|
+
error: B ?? C,
|
|
6530
6531
|
disabled: Y,
|
|
6531
6532
|
focused: b,
|
|
6532
6533
|
selected: b,
|
|
@@ -6543,7 +6544,7 @@ const Ul = I.memo(
|
|
|
6543
6544
|
else if (b && o.dataType === "number") {
|
|
6544
6545
|
const F = o;
|
|
6545
6546
|
F.enumValues ? (W = /* @__PURE__ */ n(
|
|
6546
|
-
|
|
6547
|
+
Rr,
|
|
6547
6548
|
{
|
|
6548
6549
|
name: t,
|
|
6549
6550
|
multiple: !1,
|
|
@@ -6552,7 +6553,7 @@ const Ul = I.memo(
|
|
|
6552
6553
|
valueType: "number",
|
|
6553
6554
|
small: it(g) !== "medium",
|
|
6554
6555
|
enumValues: F.enumValues,
|
|
6555
|
-
error:
|
|
6556
|
+
error: B ?? C,
|
|
6556
6557
|
internalValue: w,
|
|
6557
6558
|
updateValue: K
|
|
6558
6559
|
}
|
|
@@ -6560,7 +6561,7 @@ const Ul = I.memo(
|
|
|
6560
6561
|
yl,
|
|
6561
6562
|
{
|
|
6562
6563
|
align: a,
|
|
6563
|
-
error:
|
|
6564
|
+
error: B ?? C,
|
|
6564
6565
|
focused: b,
|
|
6565
6566
|
disabled: Y,
|
|
6566
6567
|
value: w,
|
|
@@ -6571,7 +6572,7 @@ const Ul = I.memo(
|
|
|
6571
6572
|
const F = o;
|
|
6572
6573
|
if (F.enumValues)
|
|
6573
6574
|
W = /* @__PURE__ */ n(
|
|
6574
|
-
|
|
6575
|
+
Rr,
|
|
6575
6576
|
{
|
|
6576
6577
|
name: t,
|
|
6577
6578
|
multiple: !1,
|
|
@@ -6580,7 +6581,7 @@ const Ul = I.memo(
|
|
|
6580
6581
|
valueType: "string",
|
|
6581
6582
|
small: it(g) !== "medium",
|
|
6582
6583
|
enumValues: F.enumValues,
|
|
6583
|
-
error:
|
|
6584
|
+
error: B ?? C,
|
|
6584
6585
|
internalValue: w,
|
|
6585
6586
|
updateValue: K
|
|
6586
6587
|
}
|
|
@@ -6590,7 +6591,7 @@ const Ul = I.memo(
|
|
|
6590
6591
|
W = /* @__PURE__ */ n(
|
|
6591
6592
|
bl,
|
|
6592
6593
|
{
|
|
6593
|
-
error:
|
|
6594
|
+
error: B ?? C,
|
|
6594
6595
|
disabled: Y,
|
|
6595
6596
|
multiline: Ae,
|
|
6596
6597
|
focused: b,
|
|
@@ -6603,7 +6604,7 @@ const Ul = I.memo(
|
|
|
6603
6604
|
W = /* @__PURE__ */ n(
|
|
6604
6605
|
wl,
|
|
6605
6606
|
{
|
|
6606
|
-
error:
|
|
6607
|
+
error: B ?? C,
|
|
6607
6608
|
disabled: Y,
|
|
6608
6609
|
focused: b,
|
|
6609
6610
|
internalValue: w,
|
|
@@ -6615,7 +6616,7 @@ const Ul = I.memo(
|
|
|
6615
6616
|
vl,
|
|
6616
6617
|
{
|
|
6617
6618
|
name: t,
|
|
6618
|
-
error:
|
|
6619
|
+
error: B ?? C,
|
|
6619
6620
|
disabled: Y,
|
|
6620
6621
|
mode: o.mode,
|
|
6621
6622
|
focused: b,
|
|
@@ -6644,7 +6645,7 @@ const Ul = I.memo(
|
|
|
6644
6645
|
if (!F.of && !F.oneOf)
|
|
6645
6646
|
throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);
|
|
6646
6647
|
F.of && !Array.isArray(F.of) && (F.of.dataType === "string" || F.of.dataType === "number" ? b && F.of.enumValues && (W = /* @__PURE__ */ n(
|
|
6647
|
-
|
|
6648
|
+
Rr,
|
|
6648
6649
|
{
|
|
6649
6650
|
name: t,
|
|
6650
6651
|
multiple: !0,
|
|
@@ -6653,7 +6654,7 @@ const Ul = I.memo(
|
|
|
6653
6654
|
small: it(g) !== "medium",
|
|
6654
6655
|
valueType: F.of.dataType,
|
|
6655
6656
|
enumValues: F.of.enumValues,
|
|
6656
|
-
error:
|
|
6657
|
+
error: B ?? C,
|
|
6657
6658
|
internalValue: w,
|
|
6658
6659
|
updateValue: K
|
|
6659
6660
|
}
|
|
@@ -6696,14 +6697,14 @@ const Ul = I.memo(
|
|
|
6696
6697
|
removePadding: te,
|
|
6697
6698
|
fullHeight: O,
|
|
6698
6699
|
saved: D,
|
|
6699
|
-
error:
|
|
6700
|
+
error: B ?? C,
|
|
6700
6701
|
align: a,
|
|
6701
6702
|
allowScroll: re,
|
|
6702
6703
|
showExpandIcon: T,
|
|
6703
6704
|
value: w,
|
|
6704
6705
|
hideOverflow: ie,
|
|
6705
6706
|
actions: q && /* @__PURE__ */ n(
|
|
6706
|
-
|
|
6707
|
+
Co,
|
|
6707
6708
|
{
|
|
6708
6709
|
showError: Z,
|
|
6709
6710
|
disabled: Y,
|
|
@@ -6742,7 +6743,7 @@ const ki = function({
|
|
|
6742
6743
|
g?.toggleEntitySelection(t);
|
|
6743
6744
|
}, [t, g?.toggleEntitySelection]), b = x((_) => {
|
|
6744
6745
|
_.stopPropagation(), g?.toggleEntitySelection(t);
|
|
6745
|
-
}, [t, g?.toggleEntitySelection]), w = m.length > 0, E = m.some((_) => _.collapsed || _.collapsed === void 0), k = m.filter((_) => _.collapsed || _.collapsed === void 0),
|
|
6746
|
+
}, [t, g?.toggleEntitySelection]), w = m.length > 0, E = m.some((_) => _.collapsed || _.collapsed === void 0), k = m.filter((_) => _.collapsed || _.collapsed === void 0), C = m.filter((_) => _.collapsed === !1);
|
|
6746
6747
|
return /* @__PURE__ */ v(
|
|
6747
6748
|
"div",
|
|
6748
6749
|
{
|
|
@@ -6759,7 +6760,7 @@ const ki = function({
|
|
|
6759
6760
|
},
|
|
6760
6761
|
children: [
|
|
6761
6762
|
(w || l) && /* @__PURE__ */ v("div", { className: "w-34 flex justify-center", children: [
|
|
6762
|
-
|
|
6763
|
+
C.map((_, B) => /* @__PURE__ */ n(_e, { title: _.name, children: /* @__PURE__ */ n(
|
|
6763
6764
|
ce,
|
|
6764
6765
|
{
|
|
6765
6766
|
onClick: (S) => {
|
|
@@ -6777,7 +6778,7 @@ const ki = function({
|
|
|
6777
6778
|
size: A ? "medium" : "small",
|
|
6778
6779
|
children: _.icon
|
|
6779
6780
|
}
|
|
6780
|
-
) },
|
|
6781
|
+
) }, B)),
|
|
6781
6782
|
E && /* @__PURE__ */ n(
|
|
6782
6783
|
Et,
|
|
6783
6784
|
{
|
|
@@ -6788,7 +6789,7 @@ const ki = function({
|
|
|
6788
6789
|
children: /* @__PURE__ */ n(vn, {})
|
|
6789
6790
|
}
|
|
6790
6791
|
),
|
|
6791
|
-
children: k.map((_,
|
|
6792
|
+
children: k.map((_, B) => /* @__PURE__ */ v(
|
|
6792
6793
|
Re,
|
|
6793
6794
|
{
|
|
6794
6795
|
onClick: (S) => {
|
|
@@ -6808,7 +6809,7 @@ const ki = function({
|
|
|
6808
6809
|
_.name
|
|
6809
6810
|
]
|
|
6810
6811
|
},
|
|
6811
|
-
|
|
6812
|
+
B
|
|
6812
6813
|
))
|
|
6813
6814
|
}
|
|
6814
6815
|
),
|
|
@@ -6870,7 +6871,7 @@ function $l({
|
|
|
6870
6871
|
return /* @__PURE__ */ v(
|
|
6871
6872
|
"div",
|
|
6872
6873
|
{
|
|
6873
|
-
className: H(
|
|
6874
|
+
className: H(Be, "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"),
|
|
6874
6875
|
children: [
|
|
6875
6876
|
/* @__PURE__ */ v("div", { className: "flex items-center gap-2 md:mr-4 mr-2", children: [
|
|
6876
6877
|
c && /* @__PURE__ */ n("div", { className: "hidden lg:block", children: c }),
|
|
@@ -6959,7 +6960,7 @@ function Ei(e, t, r) {
|
|
|
6959
6960
|
disabled: r || !!e.disabled || !!e.readOnly
|
|
6960
6961
|
}];
|
|
6961
6962
|
}
|
|
6962
|
-
function
|
|
6963
|
+
function Xu(e) {
|
|
6963
6964
|
return {
|
|
6964
6965
|
key: "id_ewcfedcswdf3",
|
|
6965
6966
|
width: e ? 160 : 130,
|
|
@@ -7000,7 +7001,7 @@ function Hl({ properties: e, sortable: t, forceFilter: r, AdditionalHeaderWidget
|
|
|
7000
7001
|
function Qo(e, t = !1) {
|
|
7001
7002
|
return t ? ["string", "number", "date", "reference"].includes(e.dataType) : e.dataType === "array" ? e.of ? Qo(e.of, !0) : !1 : ["string", "number", "boolean", "date", "reference", "array"].includes(e.dataType);
|
|
7002
7003
|
}
|
|
7003
|
-
function
|
|
7004
|
+
function Kr({ text: e, ...t }) {
|
|
7004
7005
|
return /* @__PURE__ */ n(
|
|
7005
7006
|
"div",
|
|
7006
7007
|
{
|
|
@@ -7036,9 +7037,9 @@ const Zl = I.memo(
|
|
|
7036
7037
|
}) {
|
|
7037
7038
|
const [m, p] = P(!1), [g, A] = I.useState(!1), [h, y] = I.useState(!1), b = x((_) => {
|
|
7038
7039
|
A(!0);
|
|
7039
|
-
}, []), w = x((_,
|
|
7040
|
-
s(c, _),
|
|
7041
|
-
}, [c, s]), E = i === r,
|
|
7040
|
+
}, []), w = x((_, B) => {
|
|
7041
|
+
s(c, _), B !== void 0 && A(B);
|
|
7042
|
+
}, [c, s]), E = i === r, C = !(i !== r && i > 0) && (m || E);
|
|
7042
7043
|
return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ v(
|
|
7043
7044
|
"div",
|
|
7044
7045
|
{
|
|
@@ -7082,7 +7083,7 @@ const Zl = I.memo(
|
|
|
7082
7083
|
) }),
|
|
7083
7084
|
/* @__PURE__ */ v(j, { children: [
|
|
7084
7085
|
f && /* @__PURE__ */ n(f, { onHover: m || g }),
|
|
7085
|
-
c.sortable && (o ||
|
|
7086
|
+
c.sortable && (o || C || g) && /* @__PURE__ */ n(
|
|
7086
7087
|
Ri,
|
|
7087
7088
|
{
|
|
7088
7089
|
color: "secondary",
|
|
@@ -7096,9 +7097,9 @@ const Zl = I.memo(
|
|
|
7096
7097
|
a(c.key);
|
|
7097
7098
|
},
|
|
7098
7099
|
children: [
|
|
7099
|
-
!o && /* @__PURE__ */ n(
|
|
7100
|
-
o === "asc" && /* @__PURE__ */ n(
|
|
7101
|
-
o === "desc" && /* @__PURE__ */ n(
|
|
7100
|
+
!o && /* @__PURE__ */ n(Sr, {}),
|
|
7101
|
+
o === "asc" && /* @__PURE__ */ n(Sr, {}),
|
|
7102
|
+
o === "desc" && /* @__PURE__ */ n(Sr, { className: "rotate-180" })
|
|
7102
7103
|
]
|
|
7103
7104
|
}
|
|
7104
7105
|
)
|
|
@@ -7123,7 +7124,7 @@ const Zl = I.memo(
|
|
|
7123
7124
|
className: m || g ? "bg-white dark:bg-gray-950" : void 0,
|
|
7124
7125
|
size: "small",
|
|
7125
7126
|
onClick: b,
|
|
7126
|
-
children: /* @__PURE__ */ n(
|
|
7127
|
+
children: /* @__PURE__ */ n(ga, { size: "small" })
|
|
7127
7128
|
}
|
|
7128
7129
|
),
|
|
7129
7130
|
children: /* @__PURE__ */ n(
|
|
@@ -7148,7 +7149,7 @@ const Zl = I.memo(
|
|
|
7148
7149
|
ref: t,
|
|
7149
7150
|
className: H(
|
|
7150
7151
|
"absolute h-full w-[6px] top-0 right-0 cursor-col-resize",
|
|
7151
|
-
|
|
7152
|
+
C && "bg-gray-300 dark:bg-gray-700"
|
|
7152
7153
|
),
|
|
7153
7154
|
onMouseDown: d ? () => d(r, c) : void 0
|
|
7154
7155
|
}
|
|
@@ -7197,7 +7198,7 @@ function Xl({
|
|
|
7197
7198
|
/* @__PURE__ */ n(
|
|
7198
7199
|
"div",
|
|
7199
7200
|
{
|
|
7200
|
-
className: H(
|
|
7201
|
+
className: H(Be, "py-4 px-6 text-xs font-semibold uppercase border-b"),
|
|
7201
7202
|
children: e.title ?? l
|
|
7202
7203
|
}
|
|
7203
7204
|
),
|
|
@@ -7242,31 +7243,31 @@ const Kl = ({
|
|
|
7242
7243
|
createFilterField: c,
|
|
7243
7244
|
AddColumnComponent: d
|
|
7244
7245
|
}) => {
|
|
7245
|
-
const u = e.map(() =>
|
|
7246
|
-
const
|
|
7246
|
+
const u = e.map(() => ra()), [f, m] = P(-1), p = x((k, C, _) => {
|
|
7247
|
+
const B = e[k], S = 100, D = 800, Q = C > D ? D : C < S ? S : C, R = {
|
|
7247
7248
|
width: Q,
|
|
7248
|
-
key:
|
|
7249
|
+
key: B.key,
|
|
7249
7250
|
column: {
|
|
7250
|
-
...
|
|
7251
|
+
...B,
|
|
7251
7252
|
width: Q
|
|
7252
7253
|
}
|
|
7253
7254
|
};
|
|
7254
7255
|
_ ? l(R) : s(R);
|
|
7255
7256
|
}, [e, s, l]), g = x((k) => {
|
|
7256
7257
|
if (f >= 0) {
|
|
7257
|
-
const
|
|
7258
|
-
return
|
|
7258
|
+
const C = u[f].current?.parentElement?.getBoundingClientRect().left;
|
|
7259
|
+
return C ? k.clientX - C : void 0;
|
|
7259
7260
|
}
|
|
7260
7261
|
}, [u, f]), A = x((k) => {
|
|
7261
7262
|
document.body.style.cursor = k ? "col-resize" : "auto";
|
|
7262
7263
|
}, []), h = x((k) => {
|
|
7263
7264
|
k.stopPropagation(), k.preventDefault();
|
|
7264
|
-
const
|
|
7265
|
-
|
|
7265
|
+
const C = g(k);
|
|
7266
|
+
C && p(f, C, !1);
|
|
7266
7267
|
}, [p, g, f]), y = x((k) => {
|
|
7267
7268
|
k.stopPropagation(), k.preventDefault();
|
|
7268
|
-
const
|
|
7269
|
-
|
|
7269
|
+
const C = g(k);
|
|
7270
|
+
C && p(f, C, !0), m(-1), A(!1);
|
|
7270
7271
|
}, [p, g, f, A]), b = x(() => {
|
|
7271
7272
|
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", y);
|
|
7272
7273
|
}, [h, y]), w = x(() => {
|
|
@@ -7281,18 +7282,18 @@ const Kl = ({
|
|
|
7281
7282
|
return /* @__PURE__ */ v(
|
|
7282
7283
|
"div",
|
|
7283
7284
|
{
|
|
7284
|
-
className: H(
|
|
7285
|
+
className: H(Be, "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"),
|
|
7285
7286
|
children: [
|
|
7286
|
-
e.map((k,
|
|
7287
|
-
const _ = e[
|
|
7287
|
+
e.map((k, C) => {
|
|
7288
|
+
const _ = e[C], B = _ && a && a[_.key] ? a[_.key] : void 0;
|
|
7288
7289
|
return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
|
|
7289
7290
|
Zl,
|
|
7290
7291
|
{
|
|
7291
|
-
resizeHandleRef: u[
|
|
7292
|
-
columnIndex:
|
|
7292
|
+
resizeHandleRef: u[C],
|
|
7293
|
+
columnIndex: C,
|
|
7293
7294
|
isResizingIndex: f,
|
|
7294
7295
|
onFilterUpdate: i,
|
|
7295
|
-
filter:
|
|
7296
|
+
filter: B,
|
|
7296
7297
|
sort: o === _.key ? t : void 0,
|
|
7297
7298
|
onColumnSort: r,
|
|
7298
7299
|
onClickResizeColumn: E,
|
|
@@ -7362,12 +7363,12 @@ const Kl = ({
|
|
|
7362
7363
|
);
|
|
7363
7364
|
},
|
|
7364
7365
|
(e, t) => L(e.rowData, t.rowData) && L(e.column, t.column) && L(e.cellData, t.cellData) && L(e.rowIndex, t.rowIndex) && L(e.cellRenderer, t.cellRenderer) && L(e.columnIndex, t.columnIndex)
|
|
7365
|
-
),
|
|
7366
|
-
|
|
7367
|
-
const rc =
|
|
7366
|
+
), kr = ia({});
|
|
7367
|
+
kr.displayName = "VirtualListContext";
|
|
7368
|
+
const rc = na(({
|
|
7368
7369
|
children: e,
|
|
7369
7370
|
...t
|
|
7370
|
-
}, r) => /* @__PURE__ */ n(
|
|
7371
|
+
}, r) => /* @__PURE__ */ n(kr.Consumer, { children: (i) => {
|
|
7371
7372
|
const o = i.customView;
|
|
7372
7373
|
return /* @__PURE__ */ v(j, { children: [
|
|
7373
7374
|
/* @__PURE__ */ n(
|
|
@@ -7428,9 +7429,9 @@ const rc = ia(({
|
|
|
7428
7429
|
rowClassName: w,
|
|
7429
7430
|
className: E,
|
|
7430
7431
|
endAdornment: k,
|
|
7431
|
-
AddColumnComponent:
|
|
7432
|
+
AddColumnComponent: C
|
|
7432
7433
|
}) {
|
|
7433
|
-
const _ = f ? f[0] : void 0,
|
|
7434
|
+
const _ = f ? f[0] : void 0, B = f ? f[1] : void 0, [S, D] = P(a), Q = se(null), R = se(0);
|
|
7434
7435
|
z(() => {
|
|
7435
7436
|
D(a);
|
|
7436
7437
|
}, [a]);
|
|
@@ -7445,9 +7446,9 @@ const rc = ia(({
|
|
|
7445
7446
|
const V = x(() => {
|
|
7446
7447
|
R.current = 0, Q.current && Q.current.scrollTo(Q.current?.scrollLeft, 0);
|
|
7447
7448
|
}, []), ee = x((O) => {
|
|
7448
|
-
const q = _ === O &&
|
|
7449
|
+
const q = _ === O && B === "desc", N = _ === O && B === "asc" ? "desc" : q ? void 0 : "asc", F = q ? void 0 : O, Ae = Y.current, Ie = N && F ? [F, N] : void 0;
|
|
7449
7450
|
Ae && d && !d(Ae, Ie) && u && u(void 0), r && r(), g && g(Ie), V();
|
|
7450
|
-
}, [d,
|
|
7451
|
+
}, [d, B, u, r, g, V, _]);
|
|
7451
7452
|
x(() => {
|
|
7452
7453
|
R.current = 0, g && g(void 0);
|
|
7453
7454
|
}, [g]);
|
|
@@ -7462,13 +7463,13 @@ const rc = ia(({
|
|
|
7462
7463
|
R.current = 0;
|
|
7463
7464
|
const Z = Y.current;
|
|
7464
7465
|
let N = Z ? { ...Z } : {};
|
|
7465
|
-
q ? N[O.key] = q : delete N[O.key], !d || d(N, _ &&
|
|
7466
|
-
}, [d,
|
|
7466
|
+
q ? N[O.key] = q : delete N[O.key], !d || d(N, _ && B ? [_, B] : void 0) || (N = q ? { [O.key]: q } : {}), u && u(N);
|
|
7467
|
+
}, [d, B, u, _]), re = x(() => A ? /* @__PURE__ */ n(Kr, {}) : /* @__PURE__ */ v(
|
|
7467
7468
|
"div",
|
|
7468
7469
|
{
|
|
7469
7470
|
className: "flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",
|
|
7470
7471
|
children: [
|
|
7471
|
-
/* @__PURE__ */ n(
|
|
7472
|
+
/* @__PURE__ */ n(Aa, {}),
|
|
7472
7473
|
p
|
|
7473
7474
|
]
|
|
7474
7475
|
}
|
|
@@ -7487,7 +7488,7 @@ const rc = ia(({
|
|
|
7487
7488
|
size: o,
|
|
7488
7489
|
cellRenderer: h,
|
|
7489
7490
|
columns: S,
|
|
7490
|
-
currentSort:
|
|
7491
|
+
currentSort: B,
|
|
7491
7492
|
onRowClick: s,
|
|
7492
7493
|
customView: ie,
|
|
7493
7494
|
onColumnResize: ne,
|
|
@@ -7500,7 +7501,7 @@ const rc = ia(({
|
|
|
7500
7501
|
createFilterField: b,
|
|
7501
7502
|
rowClassName: w,
|
|
7502
7503
|
endAdornment: k,
|
|
7503
|
-
AddColumnComponent:
|
|
7504
|
+
AddColumnComponent: C
|
|
7504
7505
|
};
|
|
7505
7506
|
return /* @__PURE__ */ n(
|
|
7506
7507
|
"div",
|
|
@@ -7508,7 +7509,7 @@ const rc = ia(({
|
|
|
7508
7509
|
ref: G,
|
|
7509
7510
|
className: H("h-full w-full", E),
|
|
7510
7511
|
children: /* @__PURE__ */ n(
|
|
7511
|
-
|
|
7512
|
+
kr.Provider,
|
|
7512
7513
|
{
|
|
7513
7514
|
value: te,
|
|
7514
7515
|
children: /* @__PURE__ */ n(
|
|
@@ -7519,7 +7520,7 @@ const rc = ia(({
|
|
|
7519
7520
|
height: le.height,
|
|
7520
7521
|
itemCount: (t?.length ?? 0) + (k ? 1 : 0),
|
|
7521
7522
|
onScroll: de,
|
|
7522
|
-
includeAddColumn: !!
|
|
7523
|
+
includeAddColumn: !!C,
|
|
7523
7524
|
itemSize: kt(o)
|
|
7524
7525
|
},
|
|
7525
7526
|
o
|
|
@@ -7543,7 +7544,7 @@ function nc({
|
|
|
7543
7544
|
const l = x(({
|
|
7544
7545
|
index: c,
|
|
7545
7546
|
style: d
|
|
7546
|
-
}) => /* @__PURE__ */ n(
|
|
7547
|
+
}) => /* @__PURE__ */ n(kr.Consumer, { children: ({
|
|
7547
7548
|
onRowClick: u,
|
|
7548
7549
|
data: f,
|
|
7549
7550
|
columns: m,
|
|
@@ -7629,7 +7630,7 @@ const oc = ({ text: e }) => {
|
|
|
7629
7630
|
"not-in": "Not in",
|
|
7630
7631
|
"array-contains": "Contains",
|
|
7631
7632
|
"array-contains-any": "Contains Any"
|
|
7632
|
-
},
|
|
7633
|
+
}, Tr = ["array-contains-any", "in", "not-in"];
|
|
7633
7634
|
function ac({
|
|
7634
7635
|
name: e,
|
|
7635
7636
|
value: t,
|
|
@@ -7644,7 +7645,7 @@ function ac({
|
|
|
7644
7645
|
i ? c.push("array-contains-any") : c.push("in", "not-in");
|
|
7645
7646
|
const [d, u] = t || [c[0], void 0], [f, m] = P(d), [p, g] = P(u), A = p ? Array.isArray(p) ? p.map((S) => S?.isEntityReference && S?.isEntityReference() ? S.id : null).filter(Boolean) : [p.id] : [];
|
|
7646
7647
|
function h(S, D) {
|
|
7647
|
-
const Q =
|
|
7648
|
+
const Q = Tr.includes(f), R = Tr.includes(S);
|
|
7648
7649
|
let G = D;
|
|
7649
7650
|
Q !== R && (G = R ? G?.isEntityReference && G?.isEntityReference() ? [G] : [] : void 0), m(S), g(G);
|
|
7650
7651
|
const le = G !== null && Array.isArray(G) ? G.length > 0 : G !== void 0;
|
|
@@ -7656,7 +7657,7 @@ function ac({
|
|
|
7656
7657
|
h(f, at(S));
|
|
7657
7658
|
}, E = (S) => {
|
|
7658
7659
|
h(f, S.map((D) => at(D)));
|
|
7659
|
-
}, k =
|
|
7660
|
+
}, k = Tr.includes(f), C = Jt(
|
|
7660
7661
|
{
|
|
7661
7662
|
multiselect: k,
|
|
7662
7663
|
path: o,
|
|
@@ -7669,8 +7670,8 @@ function ac({
|
|
|
7669
7670
|
}
|
|
7670
7671
|
}
|
|
7671
7672
|
), _ = () => {
|
|
7672
|
-
l(!0),
|
|
7673
|
-
},
|
|
7673
|
+
l(!0), C.open();
|
|
7674
|
+
}, B = (S) => /* @__PURE__ */ n(
|
|
7674
7675
|
Ze,
|
|
7675
7676
|
{
|
|
7676
7677
|
disabled: !o,
|
|
@@ -7695,8 +7696,8 @@ function ac({
|
|
|
7695
7696
|
}
|
|
7696
7697
|
) }),
|
|
7697
7698
|
/* @__PURE__ */ v("div", { className: "flex-grow ml-2 h-full gap-2 flex flex-col", children: [
|
|
7698
|
-
p && Array.isArray(p) && /* @__PURE__ */ n("div", { children: p.map((S, D) =>
|
|
7699
|
-
p && !Array.isArray(p) && /* @__PURE__ */ n("div", { children:
|
|
7699
|
+
p && Array.isArray(p) && /* @__PURE__ */ n("div", { children: p.map((S, D) => B(S)) }),
|
|
7700
|
+
p && !Array.isArray(p) && /* @__PURE__ */ n("div", { children: B(p) }),
|
|
7700
7701
|
(!p || Array.isArray(p) && p.length === 0) && /* @__PURE__ */ n(
|
|
7701
7702
|
ge,
|
|
7702
7703
|
{
|
|
@@ -7742,7 +7743,7 @@ const nn = {
|
|
|
7742
7743
|
"not-in": "Not in",
|
|
7743
7744
|
"array-contains": "Contains",
|
|
7744
7745
|
"array-contains-any": "Any"
|
|
7745
|
-
},
|
|
7746
|
+
}, Or = ["array-contains-any", "in", "not-in"];
|
|
7746
7747
|
function sc({
|
|
7747
7748
|
name: e,
|
|
7748
7749
|
value: t,
|
|
@@ -7757,14 +7758,14 @@ function sc({
|
|
|
7757
7758
|
const [c, d] = t || [l[0], void 0], [u, f] = P(c), [m, p] = P(d);
|
|
7758
7759
|
function g(h, y) {
|
|
7759
7760
|
let b = y;
|
|
7760
|
-
const w =
|
|
7761
|
+
const w = Or.includes(u), E = Or.includes(h);
|
|
7761
7762
|
w !== E && (b = E ? typeof y == "string" || typeof y == "number" ? [y] : [] : void 0), typeof b == "number" && isNaN(b) && (b = void 0), f(h), p(b);
|
|
7762
7763
|
const k = b !== null && Array.isArray(b) ? b.length > 0 : b !== void 0;
|
|
7763
7764
|
r(
|
|
7764
7765
|
h && k ? [h, b] : void 0
|
|
7765
7766
|
);
|
|
7766
7767
|
}
|
|
7767
|
-
const A =
|
|
7768
|
+
const A = Or.includes(u);
|
|
7768
7769
|
return /* @__PURE__ */ v("div", { className: "flex w-[440px]", children: [
|
|
7769
7770
|
/* @__PURE__ */ n("div", { className: "w-[80px]", children: /* @__PURE__ */ n(
|
|
7770
7771
|
tt,
|
|
@@ -7877,7 +7878,7 @@ function lc({
|
|
|
7877
7878
|
}
|
|
7878
7879
|
const a = r && r[1];
|
|
7879
7880
|
return /* @__PURE__ */ n("div", { className: "w-[300px]", children: /* @__PURE__ */ n(
|
|
7880
|
-
|
|
7881
|
+
gr,
|
|
7881
7882
|
{
|
|
7882
7883
|
value: a,
|
|
7883
7884
|
allowIndeterminate: !0,
|
|
@@ -7990,10 +7991,10 @@ const dc = I.memo(
|
|
|
7990
7991
|
setItemCount: w,
|
|
7991
7992
|
pageSize: E = 50,
|
|
7992
7993
|
paginationEnabled: k,
|
|
7993
|
-
checkFilterCombination:
|
|
7994
|
+
checkFilterCombination: C,
|
|
7994
7995
|
setPopupCell: _
|
|
7995
7996
|
},
|
|
7996
|
-
filterable:
|
|
7997
|
+
filterable: B = !0,
|
|
7997
7998
|
emptyComponent: S,
|
|
7998
7999
|
columns: D,
|
|
7999
8000
|
forceFilter: Q,
|
|
@@ -8064,8 +8065,8 @@ const dc = I.memo(
|
|
|
8064
8065
|
sortBy: g,
|
|
8065
8066
|
onSortByUpdate: A,
|
|
8066
8067
|
hoverRow: a,
|
|
8067
|
-
checkFilterCombination:
|
|
8068
|
-
createFilterField:
|
|
8068
|
+
checkFilterCombination: C,
|
|
8069
|
+
createFilterField: B ? uc : void 0,
|
|
8069
8070
|
rowClassName: x((re) => R?.(re) ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "", [R]),
|
|
8070
8071
|
className: "flex-grow",
|
|
8071
8072
|
emptyComponent: S,
|
|
@@ -8171,9 +8172,9 @@ const Ro = function({
|
|
|
8171
8172
|
additionalFields: w,
|
|
8172
8173
|
displayedColumnIds: E,
|
|
8173
8174
|
defaultSize: k,
|
|
8174
|
-
properties:
|
|
8175
|
+
properties: C,
|
|
8175
8176
|
tableController: _,
|
|
8176
|
-
filterable:
|
|
8177
|
+
filterable: B = !0,
|
|
8177
8178
|
sortable: S = !0,
|
|
8178
8179
|
endAdornment: D,
|
|
8179
8180
|
AddColumnComponent: Q,
|
|
@@ -8248,7 +8249,7 @@ const Ro = function({
|
|
|
8248
8249
|
);
|
|
8249
8250
|
}, [W, T]), F = (() => {
|
|
8250
8251
|
const M = Hl({
|
|
8251
|
-
properties:
|
|
8252
|
+
properties: C,
|
|
8252
8253
|
sortable: S,
|
|
8253
8254
|
forceFilter: i,
|
|
8254
8255
|
AdditionalHeaderWidget: R
|
|
@@ -8346,7 +8347,7 @@ const Ro = function({
|
|
|
8346
8347
|
onValueChange: u,
|
|
8347
8348
|
onColumnResize: g,
|
|
8348
8349
|
hoverRow: y,
|
|
8349
|
-
filterable:
|
|
8350
|
+
filterable: B,
|
|
8350
8351
|
emptyComponent: le,
|
|
8351
8352
|
endAdornment: D,
|
|
8352
8353
|
AddColumnComponent: Q
|
|
@@ -8398,19 +8399,19 @@ function Do({
|
|
|
8398
8399
|
return s;
|
|
8399
8400
|
}, [s, p]);
|
|
8400
8401
|
z(() => {
|
|
8401
|
-
L(p, k) ||
|
|
8402
|
+
L(p, k) || C(p);
|
|
8402
8403
|
}, [p]);
|
|
8403
|
-
const [k,
|
|
8404
|
+
const [k, C] = I.useState(p ?? a ?? void 0), [_, B] = I.useState(E), S = _ ? _[0] : void 0, D = _ ? _[1] : void 0, Q = Se(), [R, G] = P([]), [le, ne] = P(!1), [J, Y] = P(), [V, ee] = P(!1), K = x((T, ie) => f.isFilterCombinationValid ? f.isFilterCombinationValid({
|
|
8404
8405
|
path: m,
|
|
8405
8406
|
collection: t,
|
|
8406
8407
|
filterValues: T,
|
|
8407
8408
|
sortBy: ie
|
|
8408
|
-
}) : !0, []), oe = x(() =>
|
|
8409
|
+
}) : !0, []), oe = x(() => C(p ?? void 0), [p]), de = x((T) => {
|
|
8409
8410
|
if (p) {
|
|
8410
8411
|
console.warn("Filter is not compatible with the force filter. Ignoring filter");
|
|
8411
8412
|
return;
|
|
8412
8413
|
}
|
|
8413
|
-
T && Object.keys(T).length === 0 ?
|
|
8414
|
+
T && Object.keys(T).length === 0 ? C(void 0) : C(T);
|
|
8414
8415
|
}, [p]);
|
|
8415
8416
|
z(() => {
|
|
8416
8417
|
ne(!0);
|
|
@@ -8475,7 +8476,7 @@ function Do({
|
|
|
8475
8476
|
filterValues: k,
|
|
8476
8477
|
setFilterValues: de,
|
|
8477
8478
|
sortBy: _,
|
|
8478
|
-
setSortBy:
|
|
8479
|
+
setSortBy: B,
|
|
8479
8480
|
searchString: h,
|
|
8480
8481
|
setSearchString: y,
|
|
8481
8482
|
clearFilter: oe,
|
|
@@ -8566,7 +8567,7 @@ function hc({
|
|
|
8566
8567
|
path: g,
|
|
8567
8568
|
entityId: J.id
|
|
8568
8569
|
}), e(J), d.close(!1)) : b(J);
|
|
8569
|
-
},
|
|
8570
|
+
}, C = () => {
|
|
8570
8571
|
m.onAnalyticsEvent?.("reference_selection_new_entity", {
|
|
8571
8572
|
path: g
|
|
8572
8573
|
}), u.open({
|
|
@@ -8599,7 +8600,7 @@ function hc({
|
|
|
8599
8600
|
selectionController: w
|
|
8600
8601
|
}
|
|
8601
8602
|
);
|
|
8602
|
-
},
|
|
8603
|
+
}, B = x((J) => {
|
|
8603
8604
|
J.stopPropagation(), d.close(!1);
|
|
8604
8605
|
}, [d]);
|
|
8605
8606
|
if (!i)
|
|
@@ -8654,13 +8655,13 @@ function hc({
|
|
|
8654
8655
|
{
|
|
8655
8656
|
collection: i,
|
|
8656
8657
|
path: g,
|
|
8657
|
-
onNewClick:
|
|
8658
|
+
onNewClick: C,
|
|
8658
8659
|
onClear: E
|
|
8659
8660
|
}
|
|
8660
8661
|
)
|
|
8661
8662
|
}
|
|
8662
8663
|
) }),
|
|
8663
|
-
/* @__PURE__ */ v(
|
|
8664
|
+
/* @__PURE__ */ v(Ct, { translucent: !1, children: [
|
|
8664
8665
|
s && /* @__PURE__ */ n(
|
|
8665
8666
|
$,
|
|
8666
8667
|
{
|
|
@@ -8672,7 +8673,7 @@ function hc({
|
|
|
8672
8673
|
/* @__PURE__ */ n(
|
|
8673
8674
|
ge,
|
|
8674
8675
|
{
|
|
8675
|
-
onClick:
|
|
8676
|
+
onClick: B,
|
|
8676
8677
|
color: "primary",
|
|
8677
8678
|
variant: "filled",
|
|
8678
8679
|
children: "Done"
|
|
@@ -8730,7 +8731,7 @@ function sn({
|
|
|
8730
8731
|
children: e,
|
|
8731
8732
|
group: t
|
|
8732
8733
|
}) {
|
|
8733
|
-
const r =
|
|
8734
|
+
const r = Bt();
|
|
8734
8735
|
return /* @__PURE__ */ n(
|
|
8735
8736
|
dt,
|
|
8736
8737
|
{
|
|
@@ -8767,7 +8768,7 @@ function Ac({
|
|
|
8767
8768
|
onClick: o
|
|
8768
8769
|
}) {
|
|
8769
8770
|
return /* @__PURE__ */ n(
|
|
8770
|
-
|
|
8771
|
+
ba,
|
|
8771
8772
|
{
|
|
8772
8773
|
className: H("h-full p-4 cursor-pointer min-h-[230px]"),
|
|
8773
8774
|
onClick: () => {
|
|
@@ -8830,13 +8831,13 @@ function bc({
|
|
|
8830
8831
|
icon: r
|
|
8831
8832
|
}) {
|
|
8832
8833
|
return /* @__PURE__ */ n(j, { children: /* @__PURE__ */ v(
|
|
8833
|
-
|
|
8834
|
+
Ar,
|
|
8834
8835
|
{
|
|
8835
8836
|
tabIndex: 0,
|
|
8836
8837
|
className: H(
|
|
8837
|
-
ba,
|
|
8838
8838
|
ya,
|
|
8839
|
-
|
|
8839
|
+
wa,
|
|
8840
|
+
qr,
|
|
8840
8841
|
"cursor-pointer flex flex-row items-center px-4 py-2 text-inherit dark:text-inherit visited:text-inherit visited:dark:text-inherit hover:text-inherit hover:dark:text-inherit "
|
|
8841
8842
|
),
|
|
8842
8843
|
to: t,
|
|
@@ -8869,7 +8870,7 @@ function yc({
|
|
|
8869
8870
|
onClick: s,
|
|
8870
8871
|
type: l
|
|
8871
8872
|
}) {
|
|
8872
|
-
const c =
|
|
8873
|
+
const c = Bt(), d = /* @__PURE__ */ n(Hr, { collectionOrView: t ?? r }), u = Lt(), f = Se(), m = pe(), p = (c?.favouritePaths ?? []).includes(e), g = c ? [
|
|
8873
8874
|
/* @__PURE__ */ n(
|
|
8874
8875
|
ce,
|
|
8875
8876
|
{
|
|
@@ -8938,7 +8939,7 @@ function yc({
|
|
|
8938
8939
|
);
|
|
8939
8940
|
}
|
|
8940
8941
|
function wc({ entry: e }) {
|
|
8941
|
-
const t = Lt(), r =
|
|
8942
|
+
const t = Lt(), r = Bt();
|
|
8942
8943
|
if (!r)
|
|
8943
8944
|
return null;
|
|
8944
8945
|
const i = r.favouritePaths.includes(e.path), o = (a) => {
|
|
@@ -8973,11 +8974,11 @@ function wc({ entry: e }) {
|
|
|
8973
8974
|
);
|
|
8974
8975
|
}
|
|
8975
8976
|
function vc({ hidden: e }) {
|
|
8976
|
-
const t = ke(), r =
|
|
8977
|
+
const t = ke(), r = Bt();
|
|
8977
8978
|
if (!r)
|
|
8978
8979
|
return null;
|
|
8979
8980
|
const i = (r?.favouritePaths ?? []).map((o) => t.topLevelNavigation?.navigationEntries.find((a) => a.path === o)).filter(Boolean);
|
|
8980
|
-
return /* @__PURE__ */ n(
|
|
8981
|
+
return /* @__PURE__ */ n(Cn, { in: i.length > 0, children: /* @__PURE__ */ n("div", { className: "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]", children: i.map((o) => /* @__PURE__ */ n(
|
|
8981
8982
|
wc,
|
|
8982
8983
|
{
|
|
8983
8984
|
entry: o
|
|
@@ -8985,10 +8986,10 @@ function vc({ hidden: e }) {
|
|
|
8985
8986
|
o.path
|
|
8986
8987
|
)) }) });
|
|
8987
8988
|
}
|
|
8988
|
-
const
|
|
8989
|
+
const Mr = {};
|
|
8989
8990
|
function _c() {
|
|
8990
|
-
const e =
|
|
8991
|
-
!t.current || !e.key || (
|
|
8991
|
+
const e = br(), t = I.useRef(null), [r, i] = I.useState(0), [o, a] = I.useState("down"), s = x(() => {
|
|
8992
|
+
!t.current || !e.key || (Mr[e.key] = t.current.scrollTop, i(t.current.scrollTop), a(t.current.scrollTop > r ? "down" : "up"));
|
|
8992
8993
|
}, [t, e.key, r]);
|
|
8993
8994
|
return z(() => {
|
|
8994
8995
|
const l = t.current;
|
|
@@ -8997,9 +8998,9 @@ function _c() {
|
|
|
8997
8998
|
l && l.removeEventListener("scroll", s);
|
|
8998
8999
|
};
|
|
8999
9000
|
}, [t, s, e]), z(() => {
|
|
9000
|
-
!t.current || !
|
|
9001
|
+
!t.current || !Mr[e.key] || t.current.scrollTo(
|
|
9001
9002
|
{
|
|
9002
|
-
top:
|
|
9003
|
+
top: Mr[e.key],
|
|
9003
9004
|
behavior: "auto"
|
|
9004
9005
|
}
|
|
9005
9006
|
);
|
|
@@ -9051,12 +9052,12 @@ function kc({
|
|
|
9051
9052
|
context: i
|
|
9052
9053
|
};
|
|
9053
9054
|
b = /* @__PURE__ */ n(j, { children: o.plugins.filter((E) => E.homePage?.includeSection).map((E, k) => {
|
|
9054
|
-
const
|
|
9055
|
+
const C = E.homePage.includeSection(w);
|
|
9055
9056
|
return /* @__PURE__ */ n(
|
|
9056
9057
|
sn,
|
|
9057
9058
|
{
|
|
9058
|
-
group:
|
|
9059
|
-
children:
|
|
9059
|
+
group: C.title,
|
|
9060
|
+
children: C.children
|
|
9060
9061
|
},
|
|
9061
9062
|
`plugin_section_${E.key}`
|
|
9062
9063
|
);
|
|
@@ -9068,7 +9069,7 @@ function kc({
|
|
|
9068
9069
|
id: "home_page",
|
|
9069
9070
|
ref: s,
|
|
9070
9071
|
className: "py-2 overflow-auto h-full w-full",
|
|
9071
|
-
children: /* @__PURE__ */ v(
|
|
9072
|
+
children: /* @__PURE__ */ v(va, { maxWidth: "6xl", children: [
|
|
9072
9073
|
/* @__PURE__ */ v(
|
|
9073
9074
|
"div",
|
|
9074
9075
|
{
|
|
@@ -9093,30 +9094,30 @@ function kc({
|
|
|
9093
9094
|
t,
|
|
9094
9095
|
h,
|
|
9095
9096
|
A.map((w, E) => {
|
|
9096
|
-
const k = [],
|
|
9097
|
+
const k = [], C = {
|
|
9097
9098
|
group: w,
|
|
9098
9099
|
context: i
|
|
9099
9100
|
};
|
|
9100
|
-
o.plugins && o.plugins.forEach((
|
|
9101
|
-
|
|
9101
|
+
o.plugins && o.plugins.forEach((B) => {
|
|
9102
|
+
B.homePage?.AdditionalCards && k.push(...jt(B.homePage?.AdditionalCards));
|
|
9102
9103
|
});
|
|
9103
|
-
const _ = p.filter((
|
|
9104
|
+
const _ = p.filter((B) => B.group === w || !B.group && w === void 0);
|
|
9104
9105
|
return _.length === 0 && k.length === 0 ? null : /* @__PURE__ */ n(
|
|
9105
9106
|
sn,
|
|
9106
9107
|
{
|
|
9107
9108
|
group: w,
|
|
9108
9109
|
children: /* @__PURE__ */ v("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [
|
|
9109
|
-
_.map((
|
|
9110
|
+
_.map((B) => /* @__PURE__ */ n("div", { className: "col-span-1", children: /* @__PURE__ */ n(
|
|
9110
9111
|
yc,
|
|
9111
9112
|
{
|
|
9112
|
-
...
|
|
9113
|
+
...B,
|
|
9113
9114
|
onClick: () => {
|
|
9114
9115
|
let S;
|
|
9115
|
-
|
|
9116
|
+
B.type === "collection" ? S = "home_navigate_to_collection" : B.type === "view" ? S = "home_navigate_to_view" : B.type === "admin" ? S = "home_navigate_to_admin_view" : S = "unmapped_event", i.analyticsController?.onAnalyticsEvent?.(S, { path: B.path });
|
|
9116
9117
|
}
|
|
9117
9118
|
}
|
|
9118
|
-
) }, `nav_${
|
|
9119
|
-
w?.toLowerCase() !== "admin" && k && k.map((
|
|
9119
|
+
) }, `nav_${B.group}_${B.name}`)),
|
|
9120
|
+
w?.toLowerCase() !== "admin" && k && k.map((B, S) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(B, { ...C }) }, `nav_${w}_add_${S}`))
|
|
9120
9121
|
] })
|
|
9121
9122
|
},
|
|
9122
9123
|
`plugin_section_${w}`
|
|
@@ -9171,7 +9172,7 @@ function xc({
|
|
|
9171
9172
|
{
|
|
9172
9173
|
variant: "text",
|
|
9173
9174
|
disabled: !A?.length || !y,
|
|
9174
|
-
startIcon: /* @__PURE__ */ n(
|
|
9175
|
+
startIcon: /* @__PURE__ */ n(Ur, {}),
|
|
9175
9176
|
onClick: o,
|
|
9176
9177
|
color: "primary",
|
|
9177
9178
|
className: "lg:w-20",
|
|
@@ -9187,7 +9188,7 @@ function xc({
|
|
|
9187
9188
|
color: "primary",
|
|
9188
9189
|
disabled: !A?.length || !y,
|
|
9189
9190
|
onClick: o,
|
|
9190
|
-
children: /* @__PURE__ */ n(
|
|
9191
|
+
children: /* @__PURE__ */ n(Ur, {})
|
|
9191
9192
|
}
|
|
9192
9193
|
);
|
|
9193
9194
|
b = /* @__PURE__ */ n(
|
|
@@ -9207,9 +9208,9 @@ function xc({
|
|
|
9207
9208
|
context: u,
|
|
9208
9209
|
tableController: c,
|
|
9209
9210
|
collectionEntitiesCount: d
|
|
9210
|
-
}, E = jt(e.Actions).map((k,
|
|
9211
|
-
return m && m.forEach((k,
|
|
9212
|
-
k.collectionView?.CollectionActions && E.push(...jt(k.collectionView?.CollectionActions).map((_,
|
|
9211
|
+
}, E = jt(e.Actions).map((k, C) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(k, { ...w }) }, `actions_${C}`));
|
|
9212
|
+
return m && m.forEach((k, C) => {
|
|
9213
|
+
k.collectionView?.CollectionActions && E.push(...jt(k.collectionView?.CollectionActions).map((_, B) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(_, { ...w, ...k.collectionView?.collectionActionsProps }) }, `plugin_actions_${C}_${B}`)));
|
|
9213
9214
|
}), /* @__PURE__ */ v(j, { children: [
|
|
9214
9215
|
E,
|
|
9215
9216
|
b,
|
|
@@ -9256,16 +9257,16 @@ function Ec({
|
|
|
9256
9257
|
};
|
|
9257
9258
|
});
|
|
9258
9259
|
}
|
|
9259
|
-
function
|
|
9260
|
+
function Cc() {
|
|
9260
9261
|
const [e, t] = P({ width: 0, height: 0 });
|
|
9261
|
-
return
|
|
9262
|
+
return Gr(() => {
|
|
9262
9263
|
function r() {
|
|
9263
9264
|
t({ width: window.innerWidth, height: window.innerHeight });
|
|
9264
9265
|
}
|
|
9265
9266
|
return window.addEventListener("resize", r), r(), () => window.removeEventListener("resize", r);
|
|
9266
9267
|
}, []), e;
|
|
9267
9268
|
}
|
|
9268
|
-
const
|
|
9269
|
+
const Bc = ({ onResize: e }) => {
|
|
9269
9270
|
const t = se(0), r = se(null), i = se(e);
|
|
9270
9271
|
i.current = e;
|
|
9271
9272
|
const o = x((s) => {
|
|
@@ -9319,13 +9320,13 @@ function Ic({
|
|
|
9319
9320
|
onCellValueChange: d,
|
|
9320
9321
|
container: u
|
|
9321
9322
|
}) {
|
|
9322
|
-
const f = Se(), m = pe(), [p, g] = I.useState(), [A, h] = P(), y = t?.id, [b, w] = P(t), [E, k] = P(b?.values),
|
|
9323
|
+
const f = Se(), m = pe(), [p, g] = I.useState(), [A, h] = P(), y = t?.id, [b, w] = P(t), [E, k] = P(b?.values), C = o ? je({
|
|
9323
9324
|
collection: o,
|
|
9324
9325
|
path: a,
|
|
9325
9326
|
values: E,
|
|
9326
9327
|
entityId: y,
|
|
9327
9328
|
fields: m.propertyConfigs
|
|
9328
|
-
}) : void 0, _ =
|
|
9329
|
+
}) : void 0, _ = Cc(), B = I.useRef(null), S = I.useRef(null), D = I.useRef(!1), Q = x(() => {
|
|
9329
9330
|
if (!s)
|
|
9330
9331
|
throw Error("getInitialLocation error");
|
|
9331
9332
|
return {
|
|
@@ -9336,7 +9337,7 @@ function Ic({
|
|
|
9336
9337
|
x: Z,
|
|
9337
9338
|
y: N
|
|
9338
9339
|
}) => {
|
|
9339
|
-
const F =
|
|
9340
|
+
const F = B.current?.getBoundingClientRect();
|
|
9340
9341
|
if (!F)
|
|
9341
9342
|
throw Error("normalizePosition called before draggableBoundingRect is set");
|
|
9342
9343
|
return {
|
|
@@ -9344,14 +9345,14 @@ function Ic({
|
|
|
9344
9345
|
y: Math.max(0, Math.min(N, _.height - F.height))
|
|
9345
9346
|
};
|
|
9346
9347
|
}, [_]), G = x((Z) => {
|
|
9347
|
-
const N =
|
|
9348
|
+
const N = B.current?.getBoundingClientRect();
|
|
9348
9349
|
if (!s || !N)
|
|
9349
9350
|
return;
|
|
9350
9351
|
const F = Z ?? R(Q());
|
|
9351
9352
|
(!A || F.x !== A.x || F.y !== A.y) && h(F);
|
|
9352
9353
|
}, [s, Q, R, A]);
|
|
9353
9354
|
Ec({
|
|
9354
|
-
containerRef:
|
|
9355
|
+
containerRef: B,
|
|
9355
9356
|
innerRef: S,
|
|
9356
9357
|
x: A?.x,
|
|
9357
9358
|
y: A?.y,
|
|
@@ -9361,26 +9362,26 @@ function Ic({
|
|
|
9361
9362
|
D.current = !1;
|
|
9362
9363
|
},
|
|
9363
9364
|
[i, b]
|
|
9364
|
-
),
|
|
9365
|
+
), Gr(
|
|
9365
9366
|
() => {
|
|
9366
|
-
const Z =
|
|
9367
|
+
const Z = B.current?.getBoundingClientRect();
|
|
9367
9368
|
!s || !Z || D.current || (G(), D.current = !0);
|
|
9368
9369
|
},
|
|
9369
9370
|
[s, G, D.current]
|
|
9370
|
-
),
|
|
9371
|
+
), Gr(
|
|
9371
9372
|
() => {
|
|
9372
9373
|
G(A);
|
|
9373
9374
|
},
|
|
9374
9375
|
[_, s]
|
|
9375
9376
|
);
|
|
9376
9377
|
const le = he(() => {
|
|
9377
|
-
if (!(!
|
|
9378
|
-
return
|
|
9378
|
+
if (!(!C || !y))
|
|
9379
|
+
return Bo(
|
|
9379
9380
|
y,
|
|
9380
|
-
i &&
|
|
9381
|
+
i && C.properties[i] ? { [i]: C.properties[i] } : {},
|
|
9381
9382
|
r
|
|
9382
9383
|
);
|
|
9383
|
-
}, [
|
|
9384
|
+
}, [C, y, i, r]), ne = x(() => G(A), [A, G]), J = async (Z) => (g(null), o && b && d && i ? d({
|
|
9384
9385
|
value: Z[i],
|
|
9385
9386
|
propertyKey: i,
|
|
9386
9387
|
data: b,
|
|
@@ -9412,16 +9413,16 @@ function Ic({
|
|
|
9412
9413
|
error: "PopupFormField misconfiguration"
|
|
9413
9414
|
}
|
|
9414
9415
|
);
|
|
9415
|
-
if (!
|
|
9416
|
+
if (!C)
|
|
9416
9417
|
return /* @__PURE__ */ n(j, {});
|
|
9417
9418
|
const de = ee, W = {
|
|
9418
|
-
collection:
|
|
9419
|
+
collection: C,
|
|
9419
9420
|
entityId: y,
|
|
9420
9421
|
values: V,
|
|
9421
9422
|
path: a,
|
|
9422
9423
|
setFieldValue: K,
|
|
9423
9424
|
save: J
|
|
9424
|
-
}, re = i && At(
|
|
9425
|
+
}, re = i && At(C.properties, i), T = i && re ? {
|
|
9425
9426
|
propertyKey: i,
|
|
9426
9427
|
disabled: ee || $t(re) || !!re.disabled,
|
|
9427
9428
|
property: re,
|
|
@@ -9458,7 +9459,7 @@ function Ic({
|
|
|
9458
9459
|
)
|
|
9459
9460
|
}
|
|
9460
9461
|
),
|
|
9461
|
-
/* @__PURE__ */ n(
|
|
9462
|
+
/* @__PURE__ */ n(Ct, { children: /* @__PURE__ */ n(
|
|
9462
9463
|
ge,
|
|
9463
9464
|
{
|
|
9464
9465
|
variant: "filled",
|
|
@@ -9481,7 +9482,7 @@ function Ic({
|
|
|
9481
9482
|
{
|
|
9482
9483
|
status: "existing",
|
|
9483
9484
|
path: a,
|
|
9484
|
-
collection:
|
|
9485
|
+
collection: C,
|
|
9485
9486
|
entity: b,
|
|
9486
9487
|
context: f,
|
|
9487
9488
|
currentEntityId: y,
|
|
@@ -9507,9 +9508,9 @@ function Ic({
|
|
|
9507
9508
|
boxShadow: "0 0 0 2px rgba(128,128,128,0.2)"
|
|
9508
9509
|
},
|
|
9509
9510
|
className: `inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${l ? "visible" : "invisible"} cursor-grab overflow-visible`,
|
|
9510
|
-
ref:
|
|
9511
|
+
ref: B,
|
|
9511
9512
|
children: [
|
|
9512
|
-
/* @__PURE__ */ n(
|
|
9513
|
+
/* @__PURE__ */ n(Bc, { onResize: ne }),
|
|
9513
9514
|
/* @__PURE__ */ v(
|
|
9514
9515
|
"div",
|
|
9515
9516
|
{
|
|
@@ -9588,7 +9589,7 @@ function Mo({
|
|
|
9588
9589
|
type: "error",
|
|
9589
9590
|
message: "Error deleting: " + G?.message
|
|
9590
9591
|
}), console.error("Error deleting entity"), console.error(G);
|
|
9591
|
-
}, [b.name]),
|
|
9592
|
+
}, [b.name]), C = x((R, G) => {
|
|
9592
9593
|
u.open({
|
|
9593
9594
|
type: "error",
|
|
9594
9595
|
message: "Error before deleting: " + G?.message
|
|
@@ -9598,18 +9599,18 @@ function Mo({
|
|
|
9598
9599
|
type: "error",
|
|
9599
9600
|
message: "Error after deleting: " + G?.message
|
|
9600
9601
|
}), console.error(G);
|
|
9601
|
-
}, [b.name]),
|
|
9602
|
+
}, [b.name]), B = x((R) => Ds({
|
|
9602
9603
|
dataSource: c,
|
|
9603
9604
|
entity: R,
|
|
9604
9605
|
collection: b,
|
|
9605
9606
|
callbacks: o,
|
|
9606
9607
|
onDeleteSuccess: E,
|
|
9607
9608
|
onDeleteFailure: k,
|
|
9608
|
-
onPreDeleteHookError:
|
|
9609
|
+
onPreDeleteHookError: C,
|
|
9609
9610
|
onDeleteSuccessHookError: _,
|
|
9610
9611
|
context: y
|
|
9611
|
-
}), [c, b, o, E, k,
|
|
9612
|
-
p && (m(!0), A ? Promise.all(p.map(
|
|
9612
|
+
}), [c, b, o, E, k, C, _, y]), S = x(async () => {
|
|
9613
|
+
p && (m(!0), A ? Promise.all(p.map(B)).then((R) => {
|
|
9613
9614
|
m(!1), s && p && s(l, p), R.every(Boolean) ? u.open({
|
|
9614
9615
|
type: "success",
|
|
9615
9616
|
message: `${b.name}: multiple deleted`
|
|
@@ -9620,13 +9621,13 @@ function Mo({
|
|
|
9620
9621
|
type: "error",
|
|
9621
9622
|
message: `${b.name}: Error deleting entities`
|
|
9622
9623
|
}), r();
|
|
9623
|
-
}) :
|
|
9624
|
+
}) : B(p).then((R) => {
|
|
9624
9625
|
m(!1), R && (a && p && a(l, p), u.open({
|
|
9625
9626
|
type: "success",
|
|
9626
9627
|
message: `${b.singularName ?? b.name} deleted`
|
|
9627
9628
|
}), r());
|
|
9628
9629
|
}));
|
|
9629
|
-
}, [p, A,
|
|
9630
|
+
}, [p, A, B, s, l, r, u, b.name, a]);
|
|
9630
9631
|
let D;
|
|
9631
9632
|
if (p && A)
|
|
9632
9633
|
D = /* @__PURE__ */ n(j, { children: "Multiple entities" });
|
|
@@ -9657,7 +9658,7 @@ function Mo({
|
|
|
9657
9658
|
/* @__PURE__ */ n($, { variant: "subtitle2", className: "p-4", children: Q }),
|
|
9658
9659
|
!A && /* @__PURE__ */ n("div", { className: "p-4", children: D })
|
|
9659
9660
|
] }),
|
|
9660
|
-
/* @__PURE__ */ v(
|
|
9661
|
+
/* @__PURE__ */ v(Ct, { children: [
|
|
9661
9662
|
f && /* @__PURE__ */ n(Ut, { size: "small" }),
|
|
9662
9663
|
/* @__PURE__ */ n(
|
|
9663
9664
|
ge,
|
|
@@ -9711,7 +9712,7 @@ const Nc = {
|
|
|
9711
9712
|
}), Promise.resolve(void 0);
|
|
9712
9713
|
}
|
|
9713
9714
|
}, zo = {
|
|
9714
|
-
icon: /* @__PURE__ */ n(
|
|
9715
|
+
icon: /* @__PURE__ */ n(_a, {}),
|
|
9715
9716
|
name: "Copy",
|
|
9716
9717
|
onClick({
|
|
9717
9718
|
entity: e,
|
|
@@ -9733,7 +9734,7 @@ const Nc = {
|
|
|
9733
9734
|
}), Promise.resolve(void 0);
|
|
9734
9735
|
}
|
|
9735
9736
|
}, Vo = {
|
|
9736
|
-
icon: /* @__PURE__ */ n(
|
|
9737
|
+
icon: /* @__PURE__ */ n(Ur, {}),
|
|
9737
9738
|
name: "Delete",
|
|
9738
9739
|
onClick({
|
|
9739
9740
|
entity: e,
|
|
@@ -9790,7 +9791,7 @@ function Fc({
|
|
|
9790
9791
|
},
|
|
9791
9792
|
size: "small",
|
|
9792
9793
|
children: [
|
|
9793
|
-
/* @__PURE__ */ n(
|
|
9794
|
+
/* @__PURE__ */ n(ka, {}),
|
|
9794
9795
|
o
|
|
9795
9796
|
]
|
|
9796
9797
|
}
|
|
@@ -9838,14 +9839,16 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
9838
9839
|
className: o,
|
|
9839
9840
|
...a
|
|
9840
9841
|
}) {
|
|
9841
|
-
const s = Se()
|
|
9842
|
+
const s = Se();
|
|
9843
|
+
console.debug("EntityCollectionView context", s.customizationController.propertyConfigs);
|
|
9844
|
+
const l = t ?? a.path, c = Xe(a), d = ke(), u = pt(), f = mt(), m = Bt(), p = St(), g = pe(), A = I.useRef(null), h = he(() => {
|
|
9842
9845
|
const X = m?.getCollectionConfig(l);
|
|
9843
9846
|
return X ? Le(a, X) : a;
|
|
9844
9847
|
}, [a, l, m?.getCollectionConfig]), y = I.useRef(h);
|
|
9845
9848
|
z(() => {
|
|
9846
9849
|
y.current = h;
|
|
9847
9850
|
}, [h]);
|
|
9848
|
-
const b = zt(h, f, l, null), [w, E] = P(void 0), [k,
|
|
9851
|
+
const b = zt(h, f, l, null), [w, E] = P(void 0), [k, C] = I.useState(void 0), [_, B] = I.useState(0), [S, D] = P(0), Q = x(() => {
|
|
9849
9852
|
const X = w;
|
|
9850
9853
|
setTimeout(() => {
|
|
9851
9854
|
X === w && E(void 0);
|
|
@@ -9859,7 +9862,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
9859
9862
|
setSelectedEntities: oe
|
|
9860
9863
|
} = V;
|
|
9861
9864
|
z(() => {
|
|
9862
|
-
|
|
9865
|
+
C(void 0);
|
|
9863
9866
|
}, [ee]);
|
|
9864
9867
|
const de = Do({
|
|
9865
9868
|
fullPath: l,
|
|
@@ -9893,15 +9896,15 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
9893
9896
|
}, [l, u]), O = () => {
|
|
9894
9897
|
p.onAnalyticsEvent?.("multiple_delete_dialog_open", {
|
|
9895
9898
|
path: l
|
|
9896
|
-
}),
|
|
9899
|
+
}), C(ee);
|
|
9897
9900
|
}, q = (X, fe) => {
|
|
9898
9901
|
p.onAnalyticsEvent?.("single_entity_deleted", {
|
|
9899
9902
|
path: l
|
|
9900
|
-
}), oe((be) => be.filter((ye) => ye.id !== fe.id)),
|
|
9903
|
+
}), oe((be) => be.filter((ye) => ye.id !== fe.id)), B(Date.now());
|
|
9901
9904
|
}, Z = (X, fe) => {
|
|
9902
9905
|
p.onAnalyticsEvent?.("multiple_entities_deleted", {
|
|
9903
9906
|
path: l
|
|
9904
|
-
}), oe([]),
|
|
9907
|
+
}), oe([]), C(void 0), B(Date.now());
|
|
9905
9908
|
};
|
|
9906
9909
|
let N;
|
|
9907
9910
|
g?.plugins && (N = g.plugins.find((X) => X.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);
|
|
@@ -9934,13 +9937,13 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
9934
9937
|
propertyKey: fe,
|
|
9935
9938
|
onValueUpdated: be,
|
|
9936
9939
|
setError: ye,
|
|
9937
|
-
data:
|
|
9940
|
+
data: Ce
|
|
9938
9941
|
}) => {
|
|
9939
|
-
const Qt =
|
|
9942
|
+
const Qt = jr({ ...Ce.values }, fe, X), Br = {
|
|
9940
9943
|
path: l,
|
|
9941
|
-
entityId:
|
|
9944
|
+
entityId: Ce.id,
|
|
9942
9945
|
values: Qt,
|
|
9943
|
-
previousValues:
|
|
9946
|
+
previousValues: Ce.values,
|
|
9944
9947
|
collection: h,
|
|
9945
9948
|
status: "existing"
|
|
9946
9949
|
};
|
|
@@ -9985,8 +9988,8 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
9985
9988
|
color: "primary",
|
|
9986
9989
|
variant: "outlined",
|
|
9987
9990
|
startIcon: /* @__PURE__ */ n(ai, { size: "small" }),
|
|
9988
|
-
onClick: (
|
|
9989
|
-
|
|
9991
|
+
onClick: (Ce) => {
|
|
9992
|
+
Ce.stopPropagation(), u.open({
|
|
9990
9993
|
path: l,
|
|
9991
9994
|
entityId: ye.id,
|
|
9992
9995
|
selectedSubPath: be.id ?? be.path,
|
|
@@ -10004,13 +10007,13 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10004
10007
|
dependencies: [],
|
|
10005
10008
|
Builder: ({ entity: be }) => {
|
|
10006
10009
|
const ye = d.getParentReferencesFromPath(be.path);
|
|
10007
|
-
return /* @__PURE__ */ n(j, { children: ye.map((
|
|
10010
|
+
return /* @__PURE__ */ n(j, { children: ye.map((Ce) => /* @__PURE__ */ n(
|
|
10008
10011
|
Ze,
|
|
10009
10012
|
{
|
|
10010
|
-
reference:
|
|
10013
|
+
reference: Ce,
|
|
10011
10014
|
size: "tiny"
|
|
10012
10015
|
},
|
|
10013
|
-
|
|
10016
|
+
Ce.path + "/" + Ce.id
|
|
10014
10017
|
)) });
|
|
10015
10018
|
}
|
|
10016
10019
|
}] : [];
|
|
@@ -10020,23 +10023,23 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10020
10023
|
...fe
|
|
10021
10024
|
];
|
|
10022
10025
|
}, [h, l, u]), He = x(() => {
|
|
10023
|
-
|
|
10026
|
+
B(Date.now());
|
|
10024
10027
|
}, []), Ke = $e(), st = ({
|
|
10025
10028
|
entity: X,
|
|
10026
10029
|
customEntityActions: fe
|
|
10027
10030
|
}) => {
|
|
10028
10031
|
const be = X ? vi(h, f, l, X) : !0, ye = [Nc];
|
|
10029
10032
|
return ae && ye.push(zo), be && ye.push(Vo), fe && ye.push(...fe), ye;
|
|
10030
|
-
},
|
|
10031
|
-
const X = st({}), fe = X.filter((
|
|
10033
|
+
}, Er = () => {
|
|
10034
|
+
const X = st({}), fe = X.filter((Ce) => Ce.collapsed !== !1), ye = X.filter((Ce) => Ce.collapsed === !1).length * (Ke ? 40 : 30);
|
|
10032
10035
|
return (Ke ? 80 + ye : 70 + ye) + (fe.length > 0 ? Ke ? 40 : 30 : 0);
|
|
10033
|
-
},
|
|
10036
|
+
}, Cr = ({
|
|
10034
10037
|
entity: X,
|
|
10035
10038
|
size: fe,
|
|
10036
10039
|
width: be,
|
|
10037
10040
|
frozen: ye
|
|
10038
10041
|
}) => {
|
|
10039
|
-
const
|
|
10042
|
+
const Ce = K(X), Qt = st({
|
|
10040
10043
|
entity: X,
|
|
10041
10044
|
customEntityActions: h.entityActions
|
|
10042
10045
|
});
|
|
@@ -10046,7 +10049,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10046
10049
|
entity: X,
|
|
10047
10050
|
width: be,
|
|
10048
10051
|
frozen: ye,
|
|
10049
|
-
isSelected:
|
|
10052
|
+
isSelected: Ce,
|
|
10050
10053
|
selectionEnabled: G,
|
|
10051
10054
|
size: fe,
|
|
10052
10055
|
highlightEntity: E,
|
|
@@ -10096,8 +10099,8 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10096
10099
|
onHover: be
|
|
10097
10100
|
}) => {
|
|
10098
10101
|
const ye = y.current;
|
|
10099
|
-
return g.plugins ? /* @__PURE__ */ n(j, { children: g.plugins.filter((
|
|
10100
|
-
const Br =
|
|
10102
|
+
return g.plugins ? /* @__PURE__ */ n(j, { children: g.plugins.filter((Ce) => Ce.collectionView?.HeaderAction).map((Ce, Qt) => {
|
|
10103
|
+
const Br = Ce.collectionView.HeaderAction;
|
|
10101
10104
|
return /* @__PURE__ */ n(
|
|
10102
10105
|
Br,
|
|
10103
10106
|
{
|
|
@@ -10147,7 +10150,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10147
10150
|
onEntityClick: ie,
|
|
10148
10151
|
onColumnResize: Ae,
|
|
10149
10152
|
onValueChange: ue,
|
|
10150
|
-
tableRowActionsBuilder:
|
|
10153
|
+
tableRowActionsBuilder: Cr,
|
|
10151
10154
|
uniqueFieldValidator: M,
|
|
10152
10155
|
title: U,
|
|
10153
10156
|
selectionController: V,
|
|
@@ -10205,7 +10208,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10205
10208
|
inlineEditing: R(),
|
|
10206
10209
|
AdditionalHeaderWidget: Pe,
|
|
10207
10210
|
AddColumnComponent: Qe,
|
|
10208
|
-
getIdColumnWidth:
|
|
10211
|
+
getIdColumnWidth: Er,
|
|
10209
10212
|
additionalIDHeaderWidget: /* @__PURE__ */ n(
|
|
10210
10213
|
Dc,
|
|
10211
10214
|
{
|
|
@@ -10243,7 +10246,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
|
|
|
10243
10246
|
open: !!k,
|
|
10244
10247
|
onEntityDelete: q,
|
|
10245
10248
|
onMultipleEntitiesDelete: Z,
|
|
10246
|
-
onClose: () =>
|
|
10249
|
+
onClose: () => C(void 0)
|
|
10247
10250
|
}
|
|
10248
10251
|
)
|
|
10249
10252
|
]
|
|
@@ -10297,7 +10300,7 @@ function Dc({
|
|
|
10297
10300
|
{
|
|
10298
10301
|
open: r,
|
|
10299
10302
|
onOpenChange: i,
|
|
10300
|
-
trigger: /* @__PURE__ */ n(ce, { size: "small", children: /* @__PURE__ */ n(
|
|
10303
|
+
trigger: /* @__PURE__ */ n(ce, { size: "small", children: /* @__PURE__ */ n(xa, { size: "small" }) }),
|
|
10301
10304
|
children: /* @__PURE__ */ n(
|
|
10302
10305
|
"form",
|
|
10303
10306
|
{
|
|
@@ -10340,7 +10343,7 @@ function Dc({
|
|
|
10340
10343
|
}
|
|
10341
10344
|
) });
|
|
10342
10345
|
}
|
|
10343
|
-
function
|
|
10346
|
+
function Ku({ propertyConfig: e }) {
|
|
10344
10347
|
const t = "h-8 w-8 p-1 rounded-full shadow text-white", r = typeof e?.property == "object" ? Ed(e.property) : void 0;
|
|
10345
10348
|
return /* @__PURE__ */ n(
|
|
10346
10349
|
"div",
|
|
@@ -10349,7 +10352,7 @@ function Xu({ propertyConfig: e }) {
|
|
|
10349
10352
|
style: {
|
|
10350
10353
|
background: e?.color ?? r?.color ?? "#888"
|
|
10351
10354
|
},
|
|
10352
|
-
children: e?.Icon ?
|
|
10355
|
+
children: e?.Icon ? Wr(e, "medium") : Wr(r, "medium")
|
|
10353
10356
|
}
|
|
10354
10357
|
);
|
|
10355
10358
|
}
|
|
@@ -10373,7 +10376,7 @@ function Tc() {
|
|
|
10373
10376
|
ge,
|
|
10374
10377
|
{
|
|
10375
10378
|
variant: "text",
|
|
10376
|
-
component:
|
|
10379
|
+
component: Ar,
|
|
10377
10380
|
to: "/",
|
|
10378
10381
|
children: "Back to home"
|
|
10379
10382
|
}
|
|
@@ -10382,7 +10385,7 @@ function Tc() {
|
|
|
10382
10385
|
}
|
|
10383
10386
|
) });
|
|
10384
10387
|
}
|
|
10385
|
-
function
|
|
10388
|
+
function em({
|
|
10386
10389
|
open: e,
|
|
10387
10390
|
onAccept: t,
|
|
10388
10391
|
onCancel: r,
|
|
@@ -10400,7 +10403,7 @@ function Ku({
|
|
|
10400
10403
|
/* @__PURE__ */ n($, { variant: "h6", className: "mb-2", children: i }),
|
|
10401
10404
|
a
|
|
10402
10405
|
] }),
|
|
10403
|
-
/* @__PURE__ */ v(
|
|
10406
|
+
/* @__PURE__ */ v(Ct, { children: [
|
|
10404
10407
|
/* @__PURE__ */ n(
|
|
10405
10408
|
ge,
|
|
10406
10409
|
{
|
|
@@ -10411,7 +10414,7 @@ function Ku({
|
|
|
10411
10414
|
}
|
|
10412
10415
|
),
|
|
10413
10416
|
/* @__PURE__ */ n(
|
|
10414
|
-
|
|
10417
|
+
Ea,
|
|
10415
10418
|
{
|
|
10416
10419
|
color: "primary",
|
|
10417
10420
|
type: "submit",
|
|
@@ -10622,7 +10625,7 @@ const Oc = function({
|
|
|
10622
10625
|
),
|
|
10623
10626
|
children: /* @__PURE__ */ v("div", { className: "flex flex-row gap-2 px-4 h-full items-center", children: [
|
|
10624
10627
|
f && /* @__PURE__ */ n("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ n(
|
|
10625
|
-
|
|
10628
|
+
Ar,
|
|
10626
10629
|
{
|
|
10627
10630
|
className: "visited:text-inherit visited:dark:text-inherit",
|
|
10628
10631
|
to: f?.basePath ?? "/",
|
|
@@ -10657,7 +10660,7 @@ const Oc = function({
|
|
|
10657
10660
|
"aria-label": "Open drawer",
|
|
10658
10661
|
onClick: g,
|
|
10659
10662
|
size: "large",
|
|
10660
|
-
children: p === "dark" ? /* @__PURE__ */ n(
|
|
10663
|
+
children: p === "dark" ? /* @__PURE__ */ n(Ca, {}) : /* @__PURE__ */ n(Ba, {})
|
|
10661
10664
|
}
|
|
10662
10665
|
),
|
|
10663
10666
|
/* @__PURE__ */ v(Et, { trigger: y, children: [
|
|
@@ -10667,7 +10670,7 @@ const Oc = function({
|
|
|
10667
10670
|
] }),
|
|
10668
10671
|
a,
|
|
10669
10672
|
!a && /* @__PURE__ */ v(Re, { onClick: m.signOut, children: [
|
|
10670
|
-
/* @__PURE__ */ n(
|
|
10673
|
+
/* @__PURE__ */ n(Sa, {}),
|
|
10671
10674
|
"Log Out"
|
|
10672
10675
|
] })
|
|
10673
10676
|
] })
|
|
@@ -10699,8 +10702,8 @@ function qo({
|
|
|
10699
10702
|
if (k in f.current)
|
|
10700
10703
|
return f.current[k];
|
|
10701
10704
|
{
|
|
10702
|
-
const
|
|
10703
|
-
return f.current[k] =
|
|
10705
|
+
const C = nr();
|
|
10706
|
+
return f.current[k] = C, C;
|
|
10704
10707
|
}
|
|
10705
10708
|
});
|
|
10706
10709
|
p(b);
|
|
@@ -10725,19 +10728,19 @@ function qo({
|
|
|
10725
10728
|
return /* @__PURE__ */ n(Qn, { onDragEnd: (b) => {
|
|
10726
10729
|
if (!b.destination)
|
|
10727
10730
|
return;
|
|
10728
|
-
const w = b.source.index, E = b.destination.index, k = [...m],
|
|
10729
|
-
k[w] = k[E], k[E] =
|
|
10731
|
+
const w = b.source.index, E = b.destination.index, k = [...m], C = k[w];
|
|
10732
|
+
k[w] = k[E], k[E] = C, p(k), d(Vc(r, w, E));
|
|
10730
10733
|
}, children: /* @__PURE__ */ n(
|
|
10731
10734
|
Rn,
|
|
10732
10735
|
{
|
|
10733
10736
|
droppableId: e,
|
|
10734
10737
|
renderClone: (b, w, E) => {
|
|
10735
|
-
const k = E.source.index,
|
|
10738
|
+
const k = E.source.index, C = m[k];
|
|
10736
10739
|
return /* @__PURE__ */ n(
|
|
10737
10740
|
ln,
|
|
10738
10741
|
{
|
|
10739
10742
|
provided: b,
|
|
10740
|
-
internalId:
|
|
10743
|
+
internalId: C,
|
|
10741
10744
|
index: k,
|
|
10742
10745
|
size: a,
|
|
10743
10746
|
disabled: i,
|
|
@@ -10760,10 +10763,10 @@ function qo({
|
|
|
10760
10763
|
draggableId: `array_field_${E}`,
|
|
10761
10764
|
isDragDisabled: i,
|
|
10762
10765
|
index: k,
|
|
10763
|
-
children: (
|
|
10766
|
+
children: (C, _) => /* @__PURE__ */ n(
|
|
10764
10767
|
ln,
|
|
10765
10768
|
{
|
|
10766
|
-
provided:
|
|
10769
|
+
provided: C,
|
|
10767
10770
|
internalId: E,
|
|
10768
10771
|
index: k,
|
|
10769
10772
|
size: a,
|
|
@@ -10874,7 +10877,7 @@ function zc({
|
|
|
10874
10877
|
l(!1);
|
|
10875
10878
|
},
|
|
10876
10879
|
className: `cursor-${t ? "inherit" : "grab"}`,
|
|
10877
|
-
children: /* @__PURE__ */ n(
|
|
10880
|
+
children: /* @__PURE__ */ n(Ia, {})
|
|
10878
10881
|
}
|
|
10879
10882
|
),
|
|
10880
10883
|
/* @__PURE__ */ v(
|
|
@@ -10893,7 +10896,7 @@ function zc({
|
|
|
10893
10896
|
/* @__PURE__ */ v(Re, { dense: !0, onClick: () => {
|
|
10894
10897
|
l(!1), a(i);
|
|
10895
10898
|
}, children: [
|
|
10896
|
-
/* @__PURE__ */ n(
|
|
10899
|
+
/* @__PURE__ */ n(pr, { size: "small" }),
|
|
10897
10900
|
"Copy"
|
|
10898
10901
|
] })
|
|
10899
10902
|
]
|
|
@@ -10912,7 +10915,7 @@ function Vc(e, t, r) {
|
|
|
10912
10915
|
function nr() {
|
|
10913
10916
|
return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
|
|
10914
10917
|
}
|
|
10915
|
-
function
|
|
10918
|
+
function tm({
|
|
10916
10919
|
name: e,
|
|
10917
10920
|
multiselect: t = !1,
|
|
10918
10921
|
path: r,
|
|
@@ -10975,7 +10978,7 @@ function em({
|
|
|
10975
10978
|
"div",
|
|
10976
10979
|
{
|
|
10977
10980
|
className: H(
|
|
10978
|
-
"text-sm font-medium
|
|
10981
|
+
"text-sm font-medium",
|
|
10979
10982
|
"min-w-80 flex flex-col gap-4",
|
|
10980
10983
|
"relative transition-colors duration-200 ease-in rounded font-medium",
|
|
10981
10984
|
i ? "bg-opacity-50" : "hover:bg-opacity-75",
|
|
@@ -11002,15 +11005,15 @@ function em({
|
|
|
11002
11005
|
);
|
|
11003
11006
|
}
|
|
11004
11007
|
const Gc = 220;
|
|
11005
|
-
|
|
11006
|
-
|
|
11008
|
+
Jr && process.env.NODE_ENV !== "production" && Object.keys(Jr).forEach((e) => {
|
|
11009
|
+
ii.includes(e) || console.warn(`The icon ${e} no longer exists. Remove it from \`iconSynonyms\``);
|
|
11007
11010
|
});
|
|
11008
|
-
function
|
|
11011
|
+
function rm({
|
|
11009
11012
|
selectedIcon: e = "",
|
|
11010
11013
|
onIconSelected: t
|
|
11011
11014
|
}) {
|
|
11012
11015
|
const [r, i] = I.useState(null), [o, a] = I.useState(""), s = I.useMemo(
|
|
11013
|
-
() =>
|
|
11016
|
+
() => Na((c) => {
|
|
11014
11017
|
if (!c || c === "")
|
|
11015
11018
|
i(null);
|
|
11016
11019
|
else {
|
|
@@ -11032,25 +11035,25 @@ function tm({
|
|
|
11032
11035
|
placeholder: "Search for more icons…"
|
|
11033
11036
|
}
|
|
11034
11037
|
),
|
|
11035
|
-
/* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ?
|
|
11038
|
+
/* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ? Yr : r).map((c) => /* @__PURE__ */ n(_e, { title: c, children: /* @__PURE__ */ n(
|
|
11036
11039
|
ce,
|
|
11037
11040
|
{
|
|
11038
11041
|
shape: "square",
|
|
11039
11042
|
toggled: e === c,
|
|
11040
11043
|
onClick: t ? () => t(c) : void 0,
|
|
11041
11044
|
className: "box-content m-1",
|
|
11042
|
-
children: /* @__PURE__ */ n(
|
|
11045
|
+
children: /* @__PURE__ */ n(ni, { iconKey: c, size: 24 })
|
|
11043
11046
|
}
|
|
11044
11047
|
) }, c)) })
|
|
11045
11048
|
] });
|
|
11046
11049
|
}
|
|
11047
|
-
function
|
|
11050
|
+
function im({
|
|
11048
11051
|
error: e,
|
|
11049
11052
|
children: t
|
|
11050
11053
|
}) {
|
|
11051
11054
|
return t ? /* @__PURE__ */ n($, { variant: "caption", color: e ? "error" : "secondary", className: "ml-3.5 mt-0.5", children: t }) : null;
|
|
11052
11055
|
}
|
|
11053
|
-
function
|
|
11056
|
+
function Ci({
|
|
11054
11057
|
name: e,
|
|
11055
11058
|
addLabel: t,
|
|
11056
11059
|
value: r,
|
|
@@ -11119,7 +11122,7 @@ function Oe({
|
|
|
11119
11122
|
size: "small",
|
|
11120
11123
|
className: "self-start",
|
|
11121
11124
|
children: /* @__PURE__ */ n(
|
|
11122
|
-
|
|
11125
|
+
Fa,
|
|
11123
11126
|
{
|
|
11124
11127
|
color: "disabled",
|
|
11125
11128
|
size: "small"
|
|
@@ -11287,7 +11290,7 @@ function dn({
|
|
|
11287
11290
|
onClick: (h) => {
|
|
11288
11291
|
h.preventDefault(), h.stopPropagation(), r(t.filter((y) => y !== p));
|
|
11289
11292
|
},
|
|
11290
|
-
children: /* @__PURE__ */ n(
|
|
11293
|
+
children: /* @__PURE__ */ n(Bn, { size: "smallest" })
|
|
11291
11294
|
}
|
|
11292
11295
|
)
|
|
11293
11296
|
]
|
|
@@ -11346,7 +11349,7 @@ function jc({
|
|
|
11346
11349
|
const f = l.of;
|
|
11347
11350
|
if (f.dataType !== "reference")
|
|
11348
11351
|
throw Error("ArrayOfReferencesField expected a property containing references");
|
|
11349
|
-
const m = l.expanded === void 0 ? !0 : l.expanded, p = t && Array.isArray(t) ? t.map((
|
|
11352
|
+
const m = l.expanded === void 0 ? !0 : l.expanded, p = t && Array.isArray(t) ? t.map((C) => C.id) : [];
|
|
11350
11353
|
Ue({
|
|
11351
11354
|
property: l,
|
|
11352
11355
|
value: t,
|
|
@@ -11355,8 +11358,8 @@ function jc({
|
|
|
11355
11358
|
const g = ke(), A = he(() => f.path ? g.getCollection(f.path) : void 0, [f.path]);
|
|
11356
11359
|
if (!A)
|
|
11357
11360
|
throw Error(`Couldn't find the corresponding collection for the path: ${f.path}`);
|
|
11358
|
-
const h = x((
|
|
11359
|
-
console.debug("onMultipleEntitiesSelected",
|
|
11361
|
+
const h = x((C) => {
|
|
11362
|
+
console.debug("onMultipleEntitiesSelected", C), d(C.map((_) => at(_)));
|
|
11360
11363
|
}, [d]), y = Jt(
|
|
11361
11364
|
{
|
|
11362
11365
|
multiselect: !0,
|
|
@@ -11366,11 +11369,11 @@ function jc({
|
|
|
11366
11369
|
selectedEntityIds: p,
|
|
11367
11370
|
forceFilter: f.forceFilter
|
|
11368
11371
|
}
|
|
11369
|
-
), b = x((
|
|
11370
|
-
|
|
11371
|
-
}, [y]), w = x((
|
|
11372
|
-
const
|
|
11373
|
-
return
|
|
11372
|
+
), b = x((C) => {
|
|
11373
|
+
C.preventDefault(), y.open();
|
|
11374
|
+
}, [y]), w = x((C, _) => {
|
|
11375
|
+
const B = t && t.length > C ? t[C] : void 0;
|
|
11376
|
+
return B ? /* @__PURE__ */ n(
|
|
11374
11377
|
Ze,
|
|
11375
11378
|
{
|
|
11376
11379
|
disabled: !f.path,
|
|
@@ -11378,7 +11381,7 @@ function jc({
|
|
|
11378
11381
|
size: "medium",
|
|
11379
11382
|
onClick: b,
|
|
11380
11383
|
hover: !o,
|
|
11381
|
-
reference:
|
|
11384
|
+
reference: B
|
|
11382
11385
|
},
|
|
11383
11386
|
_
|
|
11384
11387
|
) : /* @__PURE__ */ n("div", { children: "Internal ERROR" });
|
|
@@ -11399,7 +11402,7 @@ function jc({
|
|
|
11399
11402
|
),
|
|
11400
11403
|
A && /* @__PURE__ */ v("div", { className: "group", children: [
|
|
11401
11404
|
/* @__PURE__ */ n(
|
|
11402
|
-
|
|
11405
|
+
Ci,
|
|
11403
11406
|
{
|
|
11404
11407
|
value: t,
|
|
11405
11408
|
addLabel: l.name ? "Add reference to " + l.name : "Add reference",
|
|
@@ -11461,7 +11464,7 @@ function Uo({
|
|
|
11461
11464
|
collection: l
|
|
11462
11465
|
}) {
|
|
11463
11466
|
return /* @__PURE__ */ v("div", { className: H(
|
|
11464
|
-
|
|
11467
|
+
hr,
|
|
11465
11468
|
"relative m-4 border-box flex items-center justify-center",
|
|
11466
11469
|
s === "medium" ? "min-w-[220px] min-h-[220px] max-w-[220px]" : "min-w-[118px] min-h-[118px] max-w-[118px]"
|
|
11467
11470
|
), children: [
|
|
@@ -11608,17 +11611,17 @@ function Jc({
|
|
|
11608
11611
|
getRootProps: w,
|
|
11609
11612
|
getInputProps: E,
|
|
11610
11613
|
isDragActive: k,
|
|
11611
|
-
isDragAccept:
|
|
11614
|
+
isDragAccept: C,
|
|
11612
11615
|
isDragReject: _
|
|
11613
11616
|
} = Pn(
|
|
11614
11617
|
{
|
|
11615
|
-
accept: e.acceptedFiles ? e.acceptedFiles.map((
|
|
11618
|
+
accept: e.acceptedFiles ? e.acceptedFiles.map((B) => ({ [B]: [] })).reduce((B, S) => ({ ...B, ...S }), {}) : void 0,
|
|
11616
11619
|
disabled: r || i,
|
|
11617
11620
|
noDragEventsBubbling: !0,
|
|
11618
11621
|
maxSize: e.maxSize,
|
|
11619
11622
|
onDrop: o,
|
|
11620
|
-
onDropRejected: (
|
|
11621
|
-
for (const D of
|
|
11623
|
+
onDropRejected: (B, S) => {
|
|
11624
|
+
for (const D of B)
|
|
11622
11625
|
for (const Q of D.errors)
|
|
11623
11626
|
b.open({
|
|
11624
11627
|
type: "error",
|
|
@@ -11636,12 +11639,12 @@ function Jc({
|
|
|
11636
11639
|
r ? Sn : pi,
|
|
11637
11640
|
Yc,
|
|
11638
11641
|
a && c.length ? "" : "flex",
|
|
11639
|
-
|
|
11642
|
+
qr,
|
|
11640
11643
|
{
|
|
11641
11644
|
[Uc]: !k,
|
|
11642
11645
|
[Lc]: k,
|
|
11643
11646
|
[Wc]: _,
|
|
11644
|
-
[$c]:
|
|
11647
|
+
[$c]: C,
|
|
11645
11648
|
[qc]: r
|
|
11646
11649
|
}
|
|
11647
11650
|
),
|
|
@@ -11664,26 +11667,26 @@ function Jc({
|
|
|
11664
11667
|
...E()
|
|
11665
11668
|
}
|
|
11666
11669
|
),
|
|
11667
|
-
c.map((
|
|
11670
|
+
c.map((B, S) => {
|
|
11668
11671
|
let D;
|
|
11669
|
-
return
|
|
11672
|
+
return B.storagePathOrDownloadUrl ? D = /* @__PURE__ */ n(
|
|
11670
11673
|
Uo,
|
|
11671
11674
|
{
|
|
11672
11675
|
collection: t,
|
|
11673
|
-
name: `storage_preview_${
|
|
11676
|
+
name: `storage_preview_${B.storagePathOrDownloadUrl}`,
|
|
11674
11677
|
property: d,
|
|
11675
11678
|
disabled: r,
|
|
11676
11679
|
entity: u,
|
|
11677
|
-
value:
|
|
11680
|
+
value: B.storagePathOrDownloadUrl,
|
|
11678
11681
|
onRemove: f,
|
|
11679
|
-
size:
|
|
11682
|
+
size: B.size
|
|
11680
11683
|
}
|
|
11681
|
-
) :
|
|
11684
|
+
) : B.file && (D = /* @__PURE__ */ n(
|
|
11682
11685
|
Eo,
|
|
11683
11686
|
{
|
|
11684
|
-
entry:
|
|
11687
|
+
entry: B,
|
|
11685
11688
|
metadata: m,
|
|
11686
|
-
storagePath: p(
|
|
11689
|
+
storagePath: p(B.file),
|
|
11687
11690
|
onFileUploadComplete: g,
|
|
11688
11691
|
imageSize: A === "medium" ? 220 : 118,
|
|
11689
11692
|
simple: !1
|
|
@@ -11691,7 +11694,7 @@ function Jc({
|
|
|
11691
11694
|
)), /* @__PURE__ */ n(
|
|
11692
11695
|
Dn,
|
|
11693
11696
|
{
|
|
11694
|
-
draggableId: `array_field_${h}_${
|
|
11697
|
+
draggableId: `array_field_${h}_${B.id}`,
|
|
11695
11698
|
index: S,
|
|
11696
11699
|
children: (Q, R) => /* @__PURE__ */ n(
|
|
11697
11700
|
"div",
|
|
@@ -11700,7 +11703,7 @@ function Jc({
|
|
|
11700
11703
|
ref: Q.innerRef,
|
|
11701
11704
|
...Q.draggableProps,
|
|
11702
11705
|
...Q.dragHandleProps,
|
|
11703
|
-
className: H(
|
|
11706
|
+
className: H(qr, "rounded-md"),
|
|
11704
11707
|
style: {
|
|
11705
11708
|
...Q.draggableProps.style
|
|
11706
11709
|
},
|
|
@@ -11708,7 +11711,7 @@ function Jc({
|
|
|
11708
11711
|
}
|
|
11709
11712
|
)
|
|
11710
11713
|
},
|
|
11711
|
-
`array_field_${h}_${
|
|
11714
|
+
`array_field_${h}_${B.id}`
|
|
11712
11715
|
);
|
|
11713
11716
|
}),
|
|
11714
11717
|
s.placeholder
|
|
@@ -11757,19 +11760,19 @@ function Hc({
|
|
|
11757
11760
|
} else
|
|
11758
11761
|
throw Error("Storage field using array must be of data type string");
|
|
11759
11762
|
}
|
|
11760
|
-
const g = f?.metadata, A = s ? "small" : "medium", h = x((k,
|
|
11763
|
+
const g = f?.metadata, A = s ? "small" : "medium", h = x((k, C) => {
|
|
11761
11764
|
if (!s)
|
|
11762
11765
|
return;
|
|
11763
|
-
const _ = [...i],
|
|
11764
|
-
_.splice(k, 1), _.splice(
|
|
11766
|
+
const _ = [...i], B = _[k];
|
|
11767
|
+
_.splice(k, 1), _.splice(C, 0, B), o(_);
|
|
11765
11768
|
const S = _.filter((D) => !!D.storagePathOrDownloadUrl).map((D) => D.storagePathOrDownloadUrl);
|
|
11766
11769
|
a(S);
|
|
11767
11770
|
}, [s, a, o, i]), y = x((k) => {
|
|
11768
11771
|
k.destination && h(k.source.index, k.destination.index);
|
|
11769
11772
|
}, [h]), b = x((k) => {
|
|
11770
11773
|
if (s) {
|
|
11771
|
-
const
|
|
11772
|
-
a(
|
|
11774
|
+
const C = i.filter((_) => _.storagePathOrDownloadUrl !== k);
|
|
11775
|
+
a(C.filter((_) => !!_.storagePathOrDownloadUrl).map((_) => _.storagePathOrDownloadUrl)), o(C);
|
|
11773
11776
|
} else
|
|
11774
11777
|
a(null), o([]);
|
|
11775
11778
|
}, [i, s, a]), w = s ? "Drag 'n' drop some files here, or click to select files" : "Drag 'n' drop a file here, or click to select one", E = s ? t.of : t;
|
|
@@ -11778,8 +11781,8 @@ function Hc({
|
|
|
11778
11781
|
{
|
|
11779
11782
|
droppableId: `droppable_${r}`,
|
|
11780
11783
|
direction: "horizontal",
|
|
11781
|
-
renderClone: (k,
|
|
11782
|
-
const
|
|
11784
|
+
renderClone: (k, C, _) => {
|
|
11785
|
+
const B = i[_.source.index];
|
|
11783
11786
|
return /* @__PURE__ */ n(
|
|
11784
11787
|
"div",
|
|
11785
11788
|
{
|
|
@@ -11792,25 +11795,25 @@ function Hc({
|
|
|
11792
11795
|
Uo,
|
|
11793
11796
|
{
|
|
11794
11797
|
collection: e,
|
|
11795
|
-
name: `storage_preview_${
|
|
11798
|
+
name: `storage_preview_${B.storagePathOrDownloadUrl}`,
|
|
11796
11799
|
property: E,
|
|
11797
11800
|
disabled: !0,
|
|
11798
11801
|
entity: m,
|
|
11799
|
-
value:
|
|
11802
|
+
value: B.storagePathOrDownloadUrl,
|
|
11800
11803
|
onRemove: b,
|
|
11801
|
-
size:
|
|
11804
|
+
size: B.size
|
|
11802
11805
|
}
|
|
11803
11806
|
)
|
|
11804
11807
|
}
|
|
11805
11808
|
);
|
|
11806
11809
|
},
|
|
11807
|
-
children: (k,
|
|
11810
|
+
children: (k, C) => /* @__PURE__ */ n(
|
|
11808
11811
|
Jc,
|
|
11809
11812
|
{
|
|
11810
11813
|
storage: f,
|
|
11811
11814
|
collection: e,
|
|
11812
11815
|
disabled: c,
|
|
11813
|
-
isDraggingOver:
|
|
11816
|
+
isDraggingOver: C.isDraggingOver,
|
|
11814
11817
|
droppableProvided: k,
|
|
11815
11818
|
onFilesAdded: d,
|
|
11816
11819
|
multipleFilesSupported: s,
|
|
@@ -11897,7 +11900,7 @@ function Rt({
|
|
|
11897
11900
|
}
|
|
11898
11901
|
),
|
|
11899
11902
|
f && /* @__PURE__ */ n(
|
|
11900
|
-
|
|
11903
|
+
Cn,
|
|
11901
11904
|
{
|
|
11902
11905
|
className: "mt-1 ml-1",
|
|
11903
11906
|
in: !!r,
|
|
@@ -11931,7 +11934,7 @@ const Zc = I.forwardRef(function({
|
|
|
11931
11934
|
setValue: i
|
|
11932
11935
|
}), /* @__PURE__ */ v(j, { children: [
|
|
11933
11936
|
/* @__PURE__ */ n(
|
|
11934
|
-
|
|
11937
|
+
gr,
|
|
11935
11938
|
{
|
|
11936
11939
|
value: r,
|
|
11937
11940
|
onValueChange: (m) => i(m),
|
|
@@ -12037,7 +12040,7 @@ function Lo({
|
|
|
12037
12040
|
/* @__PURE__ */ n(
|
|
12038
12041
|
"div",
|
|
12039
12042
|
{
|
|
12040
|
-
className: H(
|
|
12043
|
+
className: H(hr, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"),
|
|
12041
12044
|
children: /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
|
|
12042
12045
|
Fe,
|
|
12043
12046
|
{
|
|
@@ -12158,7 +12161,7 @@ const It = I.memo(td, (e, t) => {
|
|
|
12158
12161
|
if (e.propertyKey !== t.propertyKey)
|
|
12159
12162
|
return !1;
|
|
12160
12163
|
const r = De(e.property) || e.property.fromBuilder, i = De(t.property) || t.property.fromBuilder;
|
|
12161
|
-
return !((r === i || L(e.property, t.property)) && e.disabled === t.disabled) ||
|
|
12164
|
+
return !((r === i || L(e.property, t.property)) && e.disabled === t.disabled) || ei(t.property), !1;
|
|
12162
12165
|
});
|
|
12163
12166
|
function td({
|
|
12164
12167
|
propertyKey: e,
|
|
@@ -12187,14 +12190,14 @@ function td({
|
|
|
12187
12190
|
entityId: r.entityId,
|
|
12188
12191
|
fields: u.propertyConfigs
|
|
12189
12192
|
});
|
|
12190
|
-
if (p === null ||
|
|
12193
|
+
if (p === null || yr(p))
|
|
12191
12194
|
return /* @__PURE__ */ n(j, {});
|
|
12192
12195
|
if ($t(p))
|
|
12193
12196
|
m = Lo;
|
|
12194
12197
|
else if (p.Field)
|
|
12195
12198
|
typeof p.Field == "function" && (m = p.Field);
|
|
12196
12199
|
else {
|
|
12197
|
-
const A =
|
|
12200
|
+
const A = xr(p, u.propertyConfigs);
|
|
12198
12201
|
if (!A)
|
|
12199
12202
|
throw console.log("INTERNAL: Could not find field config for property", { propertyKey: e, resolvedProperty: p, fields: u.propertyConfigs, propertyConfig: A }), new Error(`INTERNAL: Could not find field config for property ${e}`);
|
|
12200
12203
|
m = Ge({
|
|
@@ -12244,10 +12247,10 @@ function rd({
|
|
|
12244
12247
|
},
|
|
12245
12248
|
fieldProps: f
|
|
12246
12249
|
}) {
|
|
12247
|
-
const { plugins: m } = pe(), p = r.customProps, g = f.field.value, A = Dt(f.form.errors, t), h = Dt(f.form.touched, t), y = A && (f.form.submitCount > 0 || r.validation?.unique) && (!Array.isArray(A) || !!A.filter((
|
|
12248
|
-
f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(t,
|
|
12249
|
-
}, []),
|
|
12250
|
-
f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(
|
|
12250
|
+
const { plugins: m } = pe(), p = r.customProps, g = f.field.value, A = Dt(f.form.errors, t), h = Dt(f.form.touched, t), y = A && (f.form.submitCount > 0 || r.validation?.unique) && (!Array.isArray(A) || !!A.filter((B) => !!B).length), w = id(d.path, d.collection, t, r, e, m) ?? e, E = f.form.isSubmitting, k = x((B, S) => {
|
|
12251
|
+
f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(t, B, S);
|
|
12252
|
+
}, []), C = x((B, S, D) => {
|
|
12253
|
+
f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(B, S, D);
|
|
12251
12254
|
}, []);
|
|
12252
12255
|
return /* @__PURE__ */ v(me, { children: [
|
|
12253
12256
|
/* @__PURE__ */ n(w, { ...{
|
|
@@ -12255,7 +12258,7 @@ function rd({
|
|
|
12255
12258
|
value: g,
|
|
12256
12259
|
// initialValue,
|
|
12257
12260
|
setValue: k,
|
|
12258
|
-
setFieldValue:
|
|
12261
|
+
setFieldValue: C,
|
|
12259
12262
|
error: A,
|
|
12260
12263
|
touched: h,
|
|
12261
12264
|
showError: y,
|
|
@@ -12274,11 +12277,11 @@ function rd({
|
|
|
12274
12277
|
o && !E && /* @__PURE__ */ n($, { variant: "caption", className: "ml-3.5", children: "This value has been updated elsewhere" })
|
|
12275
12278
|
] });
|
|
12276
12279
|
}
|
|
12277
|
-
const
|
|
12280
|
+
const ei = (e, t) => {
|
|
12278
12281
|
if (t?.some((o) => o.form?.fieldBuilder) || De(e))
|
|
12279
12282
|
return !0;
|
|
12280
12283
|
const r = e, i = !!r.Field || "fromBuilder" in r && r.fromBuilder;
|
|
12281
|
-
return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((o) =>
|
|
12284
|
+
return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((o) => ei(o, t)) : r.dataType === "array" && "resolvedProperties" in r ? i || r.resolvedProperties?.some((o) => o && ei(o, t)) : i;
|
|
12282
12285
|
};
|
|
12283
12286
|
function id(e, t, r, i, o, a) {
|
|
12284
12287
|
return se((() => {
|
|
@@ -12324,7 +12327,7 @@ function nd({
|
|
|
12324
12327
|
a.properties,
|
|
12325
12328
|
...Object.keys(t).filter((b) => b in a.properties)
|
|
12326
12329
|
) : A = {} : A = a.properties;
|
|
12327
|
-
const h = /* @__PURE__ */ n(j, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(A).filter(([b, w]) => !
|
|
12330
|
+
const h = /* @__PURE__ */ n(j, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(A).filter(([b, w]) => !yr(w)).map(
|
|
12328
12331
|
([b, w], E) => {
|
|
12329
12332
|
const k = {
|
|
12330
12333
|
propertyKey: `${e}.${b}`,
|
|
@@ -12395,7 +12398,7 @@ function od({
|
|
|
12395
12398
|
if (!a.keyValue)
|
|
12396
12399
|
throw Error(`Your property ${e} needs to have the 'keyValue' prop in order to use this field binding`);
|
|
12397
12400
|
const p = /* @__PURE__ */ n(
|
|
12398
|
-
|
|
12401
|
+
Bi,
|
|
12399
12402
|
{
|
|
12400
12403
|
value: t,
|
|
12401
12404
|
setValue: s,
|
|
@@ -12434,24 +12437,24 @@ function od({
|
|
|
12434
12437
|
)
|
|
12435
12438
|
] });
|
|
12436
12439
|
}
|
|
12437
|
-
function
|
|
12440
|
+
function Bi({
|
|
12438
12441
|
value: e,
|
|
12439
12442
|
setValue: t,
|
|
12440
12443
|
fieldName: r,
|
|
12441
12444
|
disabled: i
|
|
12442
12445
|
}) {
|
|
12443
12446
|
const [o, a] = I.useState(
|
|
12444
|
-
Object.keys(e ?? {}).map((c) => [
|
|
12447
|
+
Object.keys(e ?? {}).map((c) => [zr(), {
|
|
12445
12448
|
key: c,
|
|
12446
|
-
dataType:
|
|
12449
|
+
dataType: ti(e?.[c]) ?? "string"
|
|
12447
12450
|
}])
|
|
12448
12451
|
);
|
|
12449
12452
|
z(() => {
|
|
12450
12453
|
const c = o.map(([p, { key: g }]) => g), d = Object.entries(e ?? {}).filter(([p, g]) => g !== void 0).map(([p]) => p), u = d.filter((p) => !c.includes(p)), f = c.filter((p) => !d.includes(p)), m = [...o];
|
|
12451
12454
|
u.forEach((p) => {
|
|
12452
|
-
m.push([
|
|
12455
|
+
m.push([zr(), {
|
|
12453
12456
|
key: p,
|
|
12454
|
-
dataType:
|
|
12457
|
+
dataType: ti(e?.[p]) ?? "string"
|
|
12455
12458
|
}]);
|
|
12456
12459
|
}), f.forEach((p) => {
|
|
12457
12460
|
const g = m.findIndex(([A, { key: h }]) => h === p);
|
|
@@ -12525,7 +12528,7 @@ function Ci({
|
|
|
12525
12528
|
c.preventDefault(), t({
|
|
12526
12529
|
...e ?? {},
|
|
12527
12530
|
"": null
|
|
12528
|
-
}), a([...o, [
|
|
12531
|
+
}), a([...o, [zr(), {
|
|
12529
12532
|
key: "",
|
|
12530
12533
|
dataType: "string"
|
|
12531
12534
|
}]]);
|
|
@@ -12593,7 +12596,7 @@ function ad({
|
|
|
12593
12596
|
}
|
|
12594
12597
|
}
|
|
12595
12598
|
) : A === "boolean" ? /* @__PURE__ */ n(
|
|
12596
|
-
|
|
12599
|
+
gr,
|
|
12597
12600
|
{
|
|
12598
12601
|
value: p,
|
|
12599
12602
|
size: "small",
|
|
@@ -12609,7 +12612,7 @@ function ad({
|
|
|
12609
12612
|
) : A === "array" ? /* @__PURE__ */ n(
|
|
12610
12613
|
"div",
|
|
12611
12614
|
{
|
|
12612
|
-
className: H(
|
|
12615
|
+
className: H(Be, "ml-2 pl-2 border-l border-solid"),
|
|
12613
12616
|
children: /* @__PURE__ */ n(
|
|
12614
12617
|
qo,
|
|
12615
12618
|
{
|
|
@@ -12648,9 +12651,9 @@ function ad({
|
|
|
12648
12651
|
) : A === "map" ? /* @__PURE__ */ n(
|
|
12649
12652
|
"div",
|
|
12650
12653
|
{
|
|
12651
|
-
className: H(
|
|
12654
|
+
className: H(Be, "ml-2 pl-2 border-l border-solid"),
|
|
12652
12655
|
children: /* @__PURE__ */ n(
|
|
12653
|
-
|
|
12656
|
+
Bi,
|
|
12654
12657
|
{
|
|
12655
12658
|
value: p,
|
|
12656
12659
|
fieldName: g,
|
|
@@ -12780,7 +12783,7 @@ function sd({
|
|
|
12780
12783
|
value: r,
|
|
12781
12784
|
setValue: i
|
|
12782
12785
|
}) {
|
|
12783
|
-
const { locale: o } = pe(), [a, s] = P(
|
|
12786
|
+
const { locale: o } = pe(), [a, s] = P(ti(r) ?? "string");
|
|
12784
12787
|
function l(d) {
|
|
12785
12788
|
s(d);
|
|
12786
12789
|
}
|
|
@@ -12810,7 +12813,7 @@ function sd({
|
|
|
12810
12813
|
}
|
|
12811
12814
|
}
|
|
12812
12815
|
) : u === "boolean" ? /* @__PURE__ */ n(
|
|
12813
|
-
|
|
12816
|
+
gr,
|
|
12814
12817
|
{
|
|
12815
12818
|
value: d,
|
|
12816
12819
|
size: "small",
|
|
@@ -12819,8 +12822,8 @@ function sd({
|
|
|
12819
12822
|
i(f);
|
|
12820
12823
|
}
|
|
12821
12824
|
}
|
|
12822
|
-
) : u === "array" ? /* @__PURE__ */ n($, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: H(
|
|
12823
|
-
|
|
12825
|
+
) : u === "array" ? /* @__PURE__ */ n($, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: H(Be, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
|
|
12826
|
+
Bi,
|
|
12824
12827
|
{
|
|
12825
12828
|
value: d,
|
|
12826
12829
|
setValue: (f) => {
|
|
@@ -12905,10 +12908,10 @@ function sd({
|
|
|
12905
12908
|
a === "map" && c(r, a)
|
|
12906
12909
|
] });
|
|
12907
12910
|
}
|
|
12908
|
-
function
|
|
12911
|
+
function zr() {
|
|
12909
12912
|
return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
|
|
12910
12913
|
}
|
|
12911
|
-
function
|
|
12914
|
+
function ti(e) {
|
|
12912
12915
|
if (typeof e == "string" || e === null)
|
|
12913
12916
|
return "string";
|
|
12914
12917
|
if (typeof e == "number")
|
|
@@ -12952,10 +12955,10 @@ function ld({
|
|
|
12952
12955
|
setValue: a
|
|
12953
12956
|
});
|
|
12954
12957
|
const y = (E, k) => {
|
|
12955
|
-
const
|
|
12958
|
+
const C = c.resolvedProperties[E] ?? g, _ = {
|
|
12956
12959
|
propertyKey: `${e}.${E}`,
|
|
12957
12960
|
disabled: m,
|
|
12958
|
-
property:
|
|
12961
|
+
property: C,
|
|
12959
12962
|
includeDescription: d,
|
|
12960
12963
|
underlyingValueHasChanged: u,
|
|
12961
12964
|
context: f,
|
|
@@ -12966,7 +12969,7 @@ function ld({
|
|
|
12966
12969
|
};
|
|
12967
12970
|
return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(It, { ..._ }) });
|
|
12968
12971
|
}, b = /* @__PURE__ */ n(
|
|
12969
|
-
|
|
12972
|
+
Ci,
|
|
12970
12973
|
{
|
|
12971
12974
|
value: t,
|
|
12972
12975
|
addLabel: c.name ? "Add entry to " + c.name : "Add entry",
|
|
@@ -13055,7 +13058,7 @@ function cd({
|
|
|
13055
13058
|
className: "text-text-secondary dark:text-text-secondary-dark"
|
|
13056
13059
|
}
|
|
13057
13060
|
), b = Object.keys(c.oneOf.properties)[0], w = /* @__PURE__ */ n(
|
|
13058
|
-
|
|
13061
|
+
Ci,
|
|
13059
13062
|
{
|
|
13060
13063
|
value: t,
|
|
13061
13064
|
name: e,
|
|
@@ -13104,7 +13107,7 @@ function dd({
|
|
|
13104
13107
|
autoFocus: s,
|
|
13105
13108
|
context: l
|
|
13106
13109
|
}) {
|
|
13107
|
-
const c = r && r[i], [d, u] = P(c ?? void 0), f =
|
|
13110
|
+
const c = r && r[i], [d, u] = P(c ?? void 0), f = ri();
|
|
13108
13111
|
z(() => {
|
|
13109
13112
|
c || y(Object.keys(a)[0]);
|
|
13110
13113
|
}, []), z(() => {
|
|
@@ -13125,7 +13128,7 @@ function dd({
|
|
|
13125
13128
|
const w = b ? a[b] : void 0;
|
|
13126
13129
|
u(b), f.setFieldTouched(g, !0), f.setFieldValue(g, b), f.setFieldValue(A, w ? bi(w) : null);
|
|
13127
13130
|
};
|
|
13128
|
-
return /* @__PURE__ */ v("div", { className: H(
|
|
13131
|
+
return /* @__PURE__ */ v("div", { className: H(hr, "bg-transparent p-4 my-4 py-8"), children: [
|
|
13129
13132
|
/* @__PURE__ */ n(
|
|
13130
13133
|
hn,
|
|
13131
13134
|
{
|
|
@@ -13186,9 +13189,9 @@ function dd({
|
|
|
13186
13189
|
}
|
|
13187
13190
|
const ud = new os();
|
|
13188
13191
|
try {
|
|
13189
|
-
rr.use(
|
|
13192
|
+
rr.use(Nr.AutoResize, {
|
|
13190
13193
|
min: 100
|
|
13191
|
-
}), rr.unuse(
|
|
13194
|
+
}), rr.unuse(Nr.FontUnderline), rr.unuse(Nr.Clear);
|
|
13192
13195
|
} catch {
|
|
13193
13196
|
}
|
|
13194
13197
|
function md({
|
|
@@ -13206,8 +13209,8 @@ function md({
|
|
|
13206
13209
|
context: f
|
|
13207
13210
|
}) {
|
|
13208
13211
|
const [m, p] = I.useState(t), g = se(t);
|
|
13209
|
-
|
|
13210
|
-
const A =
|
|
13212
|
+
Pa("MarkdownFieldBinding", pd);
|
|
13213
|
+
const A = oa({
|
|
13211
13214
|
internalValue: m,
|
|
13212
13215
|
value: t
|
|
13213
13216
|
});
|
|
@@ -13921,7 +13924,7 @@ function fd({
|
|
|
13921
13924
|
] });
|
|
13922
13925
|
}
|
|
13923
13926
|
const hd = ({ containerRef: e }) => {
|
|
13924
|
-
const { isSubmitting: t, isValidating: r, errors: i } =
|
|
13927
|
+
const { isSubmitting: t, isValidating: r, errors: i } = ri();
|
|
13925
13928
|
return z(() => {
|
|
13926
13929
|
const o = Object.keys(i);
|
|
13927
13930
|
if (o.length > 0 && t && !r) {
|
|
@@ -13955,7 +13958,7 @@ function Ad({
|
|
|
13955
13958
|
entity: a,
|
|
13956
13959
|
loading: s
|
|
13957
13960
|
}) {
|
|
13958
|
-
const { errors: l } =
|
|
13961
|
+
const { errors: l } = ri(), c = r === "existing" || !e, d = r !== "existing" && !e, u = he(() => {
|
|
13959
13962
|
if (!(!e || typeof e == "boolean" || e === "optional"))
|
|
13960
13963
|
return ut(e);
|
|
13961
13964
|
}, [e]), f = ft(), { copy: m } = Os({
|
|
@@ -13974,7 +13977,7 @@ function Ad({
|
|
|
13974
13977
|
{
|
|
13975
13978
|
onClick: (A) => m(a.id),
|
|
13976
13979
|
"aria-label": "copy-id",
|
|
13977
|
-
children: /* @__PURE__ */ n(
|
|
13980
|
+
children: /* @__PURE__ */ n(pr, { size: "small" })
|
|
13978
13981
|
}
|
|
13979
13982
|
) }),
|
|
13980
13983
|
p?.entityLinkBuilder && /* @__PURE__ */ n(_e, { title: "Open in the console", children: /* @__PURE__ */ n(
|
|
@@ -13986,7 +13989,7 @@ function Ad({
|
|
|
13986
13989
|
target: "_blank",
|
|
13987
13990
|
onClick: (A) => A.stopPropagation(),
|
|
13988
13991
|
"aria-label": "go-to-datasource",
|
|
13989
|
-
children: /* @__PURE__ */ n(
|
|
13992
|
+
children: /* @__PURE__ */ n(fr, { size: "small" })
|
|
13990
13993
|
}
|
|
13991
13994
|
) })
|
|
13992
13995
|
] }) : void 0
|
|
@@ -14059,7 +14062,7 @@ function bd({ propertyId: e }) {
|
|
|
14059
14062
|
/* @__PURE__ */ n($, { variant: "caption", className: "text-white", children: /* @__PURE__ */ n("code", { children: e }) })
|
|
14060
14063
|
] }),
|
|
14061
14064
|
/* @__PURE__ */ n(ce, { size: "small", children: /* @__PURE__ */ n(
|
|
14062
|
-
|
|
14065
|
+
pr,
|
|
14063
14066
|
{
|
|
14064
14067
|
size: "smallest",
|
|
14065
14068
|
className: "text-white",
|
|
@@ -14097,12 +14100,14 @@ function wd({
|
|
|
14097
14100
|
autoSave: f,
|
|
14098
14101
|
onIdUpdateError: m
|
|
14099
14102
|
}) {
|
|
14100
|
-
const p = St(), g = pe()
|
|
14103
|
+
const p = St(), g = pe();
|
|
14104
|
+
console.log("EntityFormInternal propertyConfigs", g.propertyConfigs);
|
|
14105
|
+
const A = Se(), h = Xe(r), y = g.plugins, b = he(() => je({
|
|
14101
14106
|
collection: r,
|
|
14102
14107
|
path: t,
|
|
14103
14108
|
values: i?.values,
|
|
14104
14109
|
fields: g.propertyConfigs
|
|
14105
|
-
}), [i?.values, t]), w = (e === "new" || e === "copy") && !!b.customId && b.customId !== "optional", E = he(() => e === "new" || e === "copy" ? w ? void 0 : h.generateEntityId(t) : i?.id, []), k = se(!1),
|
|
14110
|
+
}), [i?.values, t, g.propertyConfigs]), w = (e === "new" || e === "copy") && !!b.customId && b.customId !== "optional", E = he(() => e === "new" || e === "copy" ? w ? void 0 : h.generateEntityId(t) : i?.id, []), k = se(!1), C = se(mn(b, e, i)), [_, B] = I.useState(E), [S, D] = I.useState(!1), [Q, R] = I.useState(), [G, le] = I.useState(!1), [ne, J] = P(i?.values ?? C.current), Y = (ae) => o({
|
|
14106
14111
|
collection: oe,
|
|
14107
14112
|
path: t,
|
|
14108
14113
|
entityId: _,
|
|
@@ -14140,7 +14145,7 @@ function wd({
|
|
|
14140
14145
|
M.setSubmitting(!1);
|
|
14141
14146
|
});
|
|
14142
14147
|
}, ee = pn({
|
|
14143
|
-
initialValues:
|
|
14148
|
+
initialValues: C.current,
|
|
14144
14149
|
onSubmit: V,
|
|
14145
14150
|
validation: (ae) => q?.validate(ae, { abortEarly: !1 }).then(() => ({})).catch((M) => {
|
|
14146
14151
|
const ue = {};
|
|
@@ -14150,13 +14155,13 @@ function wd({
|
|
|
14150
14155
|
})
|
|
14151
14156
|
});
|
|
14152
14157
|
z(() => {
|
|
14153
|
-
|
|
14158
|
+
C.current = mn(b, e, i);
|
|
14154
14159
|
const ae = ee.initialValues;
|
|
14155
14160
|
!ee.isSubmitting && ae && e === "existing" ? te(
|
|
14156
14161
|
Object.entries(oe.properties).map(([M, ue]) => {
|
|
14157
|
-
if (
|
|
14162
|
+
if (yr(ue))
|
|
14158
14163
|
return {};
|
|
14159
|
-
const ve = ae[M], we =
|
|
14164
|
+
const ve = ae[M], we = C.current[M];
|
|
14160
14165
|
return L(ve, we) ? {} : { [M]: we };
|
|
14161
14166
|
}).reduce((M, ue) => ({ ...M, ...ue }), {})
|
|
14162
14167
|
) : te({});
|
|
@@ -14186,7 +14191,7 @@ function wd({
|
|
|
14186
14191
|
values: ne,
|
|
14187
14192
|
context: A
|
|
14188
14193
|
});
|
|
14189
|
-
|
|
14194
|
+
B(ae);
|
|
14190
14195
|
} catch (ae) {
|
|
14191
14196
|
m && m(ae), console.error(ae);
|
|
14192
14197
|
}
|
|
@@ -14204,7 +14209,7 @@ function wd({
|
|
|
14204
14209
|
}) => h.checkUniqueField(t, ae, M, _),
|
|
14205
14210
|
[h, t, _]
|
|
14206
14211
|
), q = he(
|
|
14207
|
-
() => _ ?
|
|
14212
|
+
() => _ ? Bo(
|
|
14208
14213
|
_,
|
|
14209
14214
|
oe.properties,
|
|
14210
14215
|
O
|
|
@@ -14281,7 +14286,7 @@ function wd({
|
|
|
14281
14286
|
customId: r.customId,
|
|
14282
14287
|
entityId: _,
|
|
14283
14288
|
status: e,
|
|
14284
|
-
onChange:
|
|
14289
|
+
onChange: B,
|
|
14285
14290
|
error: S,
|
|
14286
14291
|
loading: G,
|
|
14287
14292
|
entity: i
|
|
@@ -14333,7 +14338,7 @@ function vd(e) {
|
|
|
14333
14338
|
closeAfterSaveRef: y,
|
|
14334
14339
|
autoSave: b,
|
|
14335
14340
|
entityActions: w
|
|
14336
|
-
} = e, E = Se(), k = w.filter((Q) => Q.includeInForm === void 0 || Q.includeInForm),
|
|
14341
|
+
} = e, E = Se(), k = w.filter((Q) => Q.includeInForm === void 0 || Q.includeInForm), C = pt(), _ = h;
|
|
14337
14342
|
z(() => {
|
|
14338
14343
|
i && i(_), o && o(t);
|
|
14339
14344
|
}, [_, t]), z(() => {
|
|
@@ -14342,12 +14347,12 @@ function vd(e) {
|
|
|
14342
14347
|
!L(R, G) && !c[Q] && (console.debug("Updated value from the datasource:", Q, R), d(Q, R !== void 0 ? R : null));
|
|
14343
14348
|
});
|
|
14344
14349
|
}, [f, b, a, l, t, c, d]);
|
|
14345
|
-
const
|
|
14350
|
+
const B = /* @__PURE__ */ n("div", { className: "flex flex-col gap-8", children: (u.propertiesOrder ?? Object.keys(u.properties)).map((Q) => {
|
|
14346
14351
|
const R = u.properties[Q];
|
|
14347
14352
|
if (!R)
|
|
14348
14353
|
return console.warn(`Property ${Q} not found in collection ${u.name}`), null;
|
|
14349
14354
|
const G = !!a && Object.keys(a).includes(Q) && !!c[Q], le = !b && f || $t(R) || !!R.disabled;
|
|
14350
|
-
if (
|
|
14355
|
+
if (yr(R))
|
|
14351
14356
|
return null;
|
|
14352
14357
|
const J = {
|
|
14353
14358
|
propertyKey: Q,
|
|
@@ -14393,13 +14398,13 @@ function vd(e) {
|
|
|
14393
14398
|
className: "mt-12",
|
|
14394
14399
|
ref: D,
|
|
14395
14400
|
children: [
|
|
14396
|
-
|
|
14401
|
+
B,
|
|
14397
14402
|
/* @__PURE__ */ n(hd, { containerRef: D })
|
|
14398
14403
|
]
|
|
14399
14404
|
}
|
|
14400
14405
|
),
|
|
14401
14406
|
/* @__PURE__ */ n("div", { className: "h-14" }),
|
|
14402
|
-
!b && /* @__PURE__ */ v(
|
|
14407
|
+
!b && /* @__PURE__ */ v(Ct, { position: "absolute", children: [
|
|
14403
14408
|
A && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n($, { color: "error", children: A.message }) }),
|
|
14404
14409
|
l && k.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: k.map((Q) => /* @__PURE__ */ n(
|
|
14405
14410
|
ce,
|
|
@@ -14411,7 +14416,7 @@ function vd(e) {
|
|
|
14411
14416
|
fullPath: u.path,
|
|
14412
14417
|
collection: u,
|
|
14413
14418
|
context: E,
|
|
14414
|
-
sideEntityController:
|
|
14419
|
+
sideEntityController: C
|
|
14415
14420
|
});
|
|
14416
14421
|
},
|
|
14417
14422
|
children: Q.icon
|
|
@@ -14470,9 +14475,9 @@ function _d(e) {
|
|
|
14470
14475
|
let t = {};
|
|
14471
14476
|
if (e.inner) {
|
|
14472
14477
|
if (e.inner.length === 0)
|
|
14473
|
-
return
|
|
14478
|
+
return jr(t, e.path, e.message);
|
|
14474
14479
|
for (const r of e.inner)
|
|
14475
|
-
Dt(t, r.path) || (t =
|
|
14480
|
+
Dt(t, r.path) || (t = jr(t, r.path, r.message));
|
|
14476
14481
|
}
|
|
14477
14482
|
return t;
|
|
14478
14483
|
}
|
|
@@ -14758,7 +14763,7 @@ function Ed(e) {
|
|
|
14758
14763
|
}
|
|
14759
14764
|
return Si[t];
|
|
14760
14765
|
}
|
|
14761
|
-
function
|
|
14766
|
+
function xr(e, t) {
|
|
14762
14767
|
const r = Wo(e), i = Ii(e);
|
|
14763
14768
|
if (!i) {
|
|
14764
14769
|
console.error("No field id found for property", e);
|
|
@@ -14989,7 +14994,7 @@ function Ho(e, t) {
|
|
|
14989
14994
|
fromBuilder: t ?? !1
|
|
14990
14995
|
} : e;
|
|
14991
14996
|
}
|
|
14992
|
-
function
|
|
14997
|
+
function nm(e) {
|
|
14993
14998
|
return typeof e == "object" ? Object.entries(e).map(([t, r]) => typeof r == "string" ? {
|
|
14994
14999
|
id: t,
|
|
14995
15000
|
label: r
|
|
@@ -15047,7 +15052,7 @@ function Ni(e) {
|
|
|
15047
15052
|
}
|
|
15048
15053
|
return s;
|
|
15049
15054
|
}
|
|
15050
|
-
const
|
|
15055
|
+
const Cd = "100vw", Bd = "55vw", mr = "768px", Zt = "main_##Q$SC^#S6";
|
|
15051
15056
|
function Sd({
|
|
15052
15057
|
path: e,
|
|
15053
15058
|
entityId: t,
|
|
@@ -15071,7 +15076,7 @@ function Sd({
|
|
|
15071
15076
|
closeAfterSave: !1
|
|
15072
15077
|
});
|
|
15073
15078
|
}, !1, 2e3);
|
|
15074
|
-
const g = Xe(o), A = Fi(), h = pt(), y = ft(), b = pe(), w = Se(), E = mt(), [k,
|
|
15079
|
+
const g = Xe(o), A = Fi(), h = pt(), y = ft(), b = pe(), w = Se(), E = mt(), [k, C] = P(void 0), [_, B] = P(i ? "copy" : t ? "existing" : "new"), S = se(void 0), D = S.current, Q = (o.subcollections ?? []).filter((U) => !U.hideFromNavigation), R = Q?.length ?? 0, G = o.entityViews, le = G?.length ?? 0, ne = o.formAutoSave && !o.customId, J = le > 0 || R > 0, Y = r ?? Ln(
|
|
15075
15080
|
o ? o.defaultSelectedView : void 0,
|
|
15076
15081
|
{
|
|
15077
15082
|
status: _,
|
|
@@ -15112,7 +15117,7 @@ function Sd({
|
|
|
15112
15117
|
f(!1), ne || y.open({
|
|
15113
15118
|
type: "success",
|
|
15114
15119
|
message: `${o.singularName ?? o.name}: Saved correctly`
|
|
15115
|
-
}), re(U),
|
|
15120
|
+
}), re(U), B("existing"), s(!1), c && c({ entity: U }), Pe ? (A.setBlocked(!1), A.close(!0), d?.()) : _ !== "existing" && h.replace({
|
|
15116
15121
|
path: e,
|
|
15117
15122
|
entityId: U.id,
|
|
15118
15123
|
selectedSubPath: V.current,
|
|
@@ -15172,7 +15177,7 @@ function Sd({
|
|
|
15172
15177
|
"div",
|
|
15173
15178
|
{
|
|
15174
15179
|
className: H(
|
|
15175
|
-
|
|
15180
|
+
Be,
|
|
15176
15181
|
"relative flex-grow w-full h-full overflow-auto "
|
|
15177
15182
|
),
|
|
15178
15183
|
role: "tabpanel",
|
|
@@ -15198,7 +15203,7 @@ function Sd({
|
|
|
15198
15203
|
className: "relative flex-grow h-full overflow-auto w-full",
|
|
15199
15204
|
role: "tabpanel",
|
|
15200
15205
|
children: [
|
|
15201
|
-
M && /* @__PURE__ */ n(
|
|
15206
|
+
M && /* @__PURE__ */ n(Kr, {}),
|
|
15202
15207
|
!ae && (W && et ? /* @__PURE__ */ n(
|
|
15203
15208
|
Go,
|
|
15204
15209
|
{
|
|
@@ -15258,7 +15263,7 @@ function Sd({
|
|
|
15258
15263
|
onModified: He,
|
|
15259
15264
|
entity: W,
|
|
15260
15265
|
onIdChange: Je,
|
|
15261
|
-
onFormContextChange:
|
|
15266
|
+
onFormContextChange: C,
|
|
15262
15267
|
hideId: o.hideIdFromForm,
|
|
15263
15268
|
autoSave: ne,
|
|
15264
15269
|
onIdUpdateError: We
|
|
@@ -15301,9 +15306,9 @@ function Sd({
|
|
|
15301
15306
|
collection: o
|
|
15302
15307
|
}
|
|
15303
15308
|
)
|
|
15304
|
-
] }) : Ke(),
|
|
15309
|
+
] }) : Ke(), Er = Q && Q.map(
|
|
15305
15310
|
(U) => /* @__PURE__ */ n(
|
|
15306
|
-
|
|
15311
|
+
Ir,
|
|
15307
15312
|
{
|
|
15308
15313
|
className: "text-sm min-w-[140px]",
|
|
15309
15314
|
value: U.id,
|
|
@@ -15311,9 +15316,9 @@ function Sd({
|
|
|
15311
15316
|
},
|
|
15312
15317
|
`entity_detail_collection_tab_${U.name}`
|
|
15313
15318
|
)
|
|
15314
|
-
),
|
|
15319
|
+
), Cr = Ae.map(
|
|
15315
15320
|
(U) => /* @__PURE__ */ n(
|
|
15316
|
-
|
|
15321
|
+
Ir,
|
|
15317
15322
|
{
|
|
15318
15323
|
className: "text-sm min-w-[140px]",
|
|
15319
15324
|
value: U.key,
|
|
@@ -15330,7 +15335,7 @@ function Sd({
|
|
|
15330
15335
|
/* @__PURE__ */ v(
|
|
15331
15336
|
"div",
|
|
15332
15337
|
{
|
|
15333
|
-
className: H(
|
|
15338
|
+
className: H(Be, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
|
|
15334
15339
|
children: [
|
|
15335
15340
|
/* @__PURE__ */ n(
|
|
15336
15341
|
"div",
|
|
@@ -15341,7 +15346,7 @@ function Sd({
|
|
|
15341
15346
|
{
|
|
15342
15347
|
onClick: () => (d?.(), A.close(!1)),
|
|
15343
15348
|
size: "large",
|
|
15344
|
-
children: /* @__PURE__ */ n(
|
|
15349
|
+
children: /* @__PURE__ */ n(Bn, {})
|
|
15345
15350
|
}
|
|
15346
15351
|
)
|
|
15347
15352
|
}
|
|
@@ -15364,7 +15369,7 @@ function Sd({
|
|
|
15364
15369
|
className: "pl-4 pr-4 pt-0",
|
|
15365
15370
|
children: [
|
|
15366
15371
|
/* @__PURE__ */ n(
|
|
15367
|
-
|
|
15372
|
+
Ir,
|
|
15368
15373
|
{
|
|
15369
15374
|
disabled: !J,
|
|
15370
15375
|
value: Zt,
|
|
@@ -15372,8 +15377,8 @@ function Sd({
|
|
|
15372
15377
|
children: o.singularName ?? o.name
|
|
15373
15378
|
}
|
|
15374
15379
|
),
|
|
15375
|
-
|
|
15376
|
-
|
|
15380
|
+
Cr,
|
|
15381
|
+
Er
|
|
15377
15382
|
]
|
|
15378
15383
|
}
|
|
15379
15384
|
)
|
|
@@ -15399,7 +15404,7 @@ function Sd({
|
|
|
15399
15404
|
hidden: !ee,
|
|
15400
15405
|
id: `form_${e}`,
|
|
15401
15406
|
className: " w-full",
|
|
15402
|
-
children: ae ? /* @__PURE__ */ n(
|
|
15407
|
+
children: ae ? /* @__PURE__ */ n(Kr, {}) : st
|
|
15403
15408
|
}
|
|
15404
15409
|
),
|
|
15405
15410
|
Ie,
|
|
@@ -15467,7 +15472,7 @@ function Nd({
|
|
|
15467
15472
|
i,
|
|
15468
15473
|
/* @__PURE__ */ n($, { children: "Are you sure you want to leave this page?" })
|
|
15469
15474
|
] }),
|
|
15470
|
-
/* @__PURE__ */ v(
|
|
15475
|
+
/* @__PURE__ */ v(Ct, { children: [
|
|
15471
15476
|
/* @__PURE__ */ n(ge, { variant: "text", onClick: r, autoFocus: !0, children: " Cancel " }),
|
|
15472
15477
|
/* @__PURE__ */ n(ge, { onClick: t, children: " Ok " })
|
|
15473
15478
|
] })
|
|
@@ -15485,8 +15490,8 @@ const Xo = I.createContext({
|
|
|
15485
15490
|
close: () => {
|
|
15486
15491
|
}
|
|
15487
15492
|
}), Fi = () => qe(Xo);
|
|
15488
|
-
function
|
|
15489
|
-
const t =
|
|
15493
|
+
function om() {
|
|
15494
|
+
const t = _r().sidePanels, r = [...t];
|
|
15490
15495
|
return r.push(void 0), /* @__PURE__ */ n(j, { children: r.map((i, o) => /* @__PURE__ */ n(
|
|
15491
15496
|
Fd,
|
|
15492
15497
|
{
|
|
@@ -15500,7 +15505,7 @@ function Fd({
|
|
|
15500
15505
|
offsetPosition: e,
|
|
15501
15506
|
panel: t
|
|
15502
15507
|
}) {
|
|
15503
|
-
const [r, i] = P(!1), [o, a] = P(!1), [s, l] = P(), c = I.useRef(t?.width), d = c.current, u =
|
|
15508
|
+
const [r, i] = P(!1), [o, a] = P(!1), [s, l] = P(), c = I.useRef(t?.width), d = c.current, u = _r(), {
|
|
15504
15509
|
navigationWasBlocked: f,
|
|
15505
15510
|
handleOk: m,
|
|
15506
15511
|
handleCancel: p
|
|
@@ -15606,15 +15611,15 @@ function Pd(e) {
|
|
|
15606
15611
|
const Ko = "new";
|
|
15607
15612
|
function Qd(e, t) {
|
|
15608
15613
|
if (t)
|
|
15609
|
-
return
|
|
15614
|
+
return Cd;
|
|
15610
15615
|
const r = !e.selectedSubPath;
|
|
15611
15616
|
let i;
|
|
15612
|
-
return e.width ? i = typeof e.width == "number" ? `${e.width}px` : e.width : e.collection?.sideDialogWidth && (i = typeof e.collection.sideDialogWidth == "number" ? `${e.collection.sideDialogWidth}px` : e.collection.sideDialogWidth), r ? i || (e.collection ? Rd(e.collection) : mr) : `calc(${
|
|
15617
|
+
return e.width ? i = typeof e.width == "number" ? `${e.width}px` : e.width : e.collection?.sideDialogWidth && (i = typeof e.collection.sideDialogWidth == "number" ? `${e.collection.sideDialogWidth}px` : e.collection.sideDialogWidth), r ? i || (e.collection ? Rd(e.collection) : mr) : `calc(${Bd} + ${i ?? mr})`;
|
|
15613
15618
|
}
|
|
15614
|
-
const
|
|
15619
|
+
const Vr = {};
|
|
15615
15620
|
function Rd(e) {
|
|
15616
|
-
if (
|
|
15617
|
-
return
|
|
15621
|
+
if (Vr[e.id])
|
|
15622
|
+
return Vr[e.id];
|
|
15618
15623
|
const t = je({
|
|
15619
15624
|
collection: e,
|
|
15620
15625
|
path: "__ignored"
|
|
@@ -15624,7 +15629,7 @@ function Rd(e) {
|
|
|
15624
15629
|
const i = Object.values(t.properties).map((a) => or(a)), o = Math.max(...i);
|
|
15625
15630
|
o < 3 ? r = mr : r = 768 + 32 * (o - 2) + "px";
|
|
15626
15631
|
}
|
|
15627
|
-
return
|
|
15632
|
+
return Vr[e.id] = r, r;
|
|
15628
15633
|
}
|
|
15629
15634
|
function or(e, t = 0) {
|
|
15630
15635
|
if (e.dataType === "map" && e.properties) {
|
|
@@ -15634,7 +15639,7 @@ function or(e, t = 0) {
|
|
|
15634
15639
|
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;
|
|
15635
15640
|
}
|
|
15636
15641
|
const Dd = (e, t) => {
|
|
15637
|
-
const r =
|
|
15642
|
+
const r = br(), i = se(!1), o = !$e();
|
|
15638
15643
|
z(() => {
|
|
15639
15644
|
if (!e.loading && !i.current) {
|
|
15640
15645
|
if (console.debug("Initialising side entity controller"), e.isUrlCollectionPath(r.pathname)) {
|
|
@@ -15726,7 +15731,7 @@ const Xt = (e, t, r, i) => {
|
|
|
15726
15731
|
};
|
|
15727
15732
|
};
|
|
15728
15733
|
function Od() {
|
|
15729
|
-
const e =
|
|
15734
|
+
const e = br(), t = Lt(), [r, i] = P([]), o = se(r), a = se({}), s = se(0), l = (f) => {
|
|
15730
15735
|
o.current = f, i(f);
|
|
15731
15736
|
};
|
|
15732
15737
|
z(() => {
|
|
@@ -16032,7 +16037,7 @@ function Gd(e, t) {
|
|
|
16032
16037
|
e.user && e.user.uid !== o.current && !e.initialLoading && (Vd(e, a).then(i), o.current = e.user.uid);
|
|
16033
16038
|
}, [e, a]), r;
|
|
16034
16039
|
}
|
|
16035
|
-
function
|
|
16040
|
+
function am(e) {
|
|
16036
16041
|
const t = uo(), {
|
|
16037
16042
|
children: r,
|
|
16038
16043
|
entityLinkBuilder: i,
|
|
@@ -16049,12 +16054,12 @@ function om(e) {
|
|
|
16049
16054
|
components: g,
|
|
16050
16055
|
navigationController: A
|
|
16051
16056
|
} = e;
|
|
16052
|
-
Ha(s);
|
|
16057
|
+
Ha(s), console.debug("FireCMS propertyConfigs", m);
|
|
16053
16058
|
const h = Md({
|
|
16054
16059
|
delegate: d,
|
|
16055
16060
|
propertyConfigs: m,
|
|
16056
16061
|
navigationController: A
|
|
16057
|
-
}), y = Od(), b = Dd(A, y), w = u?.some((
|
|
16062
|
+
}), y = Od(), b = Dd(A, y), w = u?.some((B) => B.loading) ?? !1, E = l.initialLoading || A.loading || w, k = {
|
|
16058
16063
|
dateTimeFormat: a,
|
|
16059
16064
|
locale: s,
|
|
16060
16065
|
entityLinkBuilder: i,
|
|
@@ -16062,7 +16067,7 @@ function om(e) {
|
|
|
16062
16067
|
entityViews: p ?? [],
|
|
16063
16068
|
propertyConfigs: m ?? {},
|
|
16064
16069
|
components: g
|
|
16065
|
-
},
|
|
16070
|
+
}, C = he(() => ({
|
|
16066
16071
|
onAnalyticsEvent: f
|
|
16067
16072
|
}), []), _ = Gd(l, u);
|
|
16068
16073
|
return A.navigationLoadingError ? /* @__PURE__ */ n(er, { maxWidth: "md", children: /* @__PURE__ */ n(
|
|
@@ -16094,7 +16099,7 @@ function om(e) {
|
|
|
16094
16099
|
"Response from the server: ",
|
|
16095
16100
|
_?.message
|
|
16096
16101
|
] })
|
|
16097
|
-
] }) : /* @__PURE__ */ n(hi.Provider, { value: t, children: /* @__PURE__ */ n(so.Provider, { value:
|
|
16102
|
+
] }) : /* @__PURE__ */ n(hi.Provider, { value: t, children: /* @__PURE__ */ n(so.Provider, { value: C, children: /* @__PURE__ */ n(ao.Provider, { value: k, children: /* @__PURE__ */ n(
|
|
16098
16103
|
no.Provider,
|
|
16099
16104
|
{
|
|
16100
16105
|
value: o,
|
|
@@ -16166,11 +16171,69 @@ function jd({
|
|
|
16166
16171
|
}), /* @__PURE__ */ n(j, { children: o });
|
|
16167
16172
|
}
|
|
16168
16173
|
function Yd({
|
|
16169
|
-
|
|
16170
|
-
|
|
16171
|
-
|
|
16174
|
+
name: e,
|
|
16175
|
+
icon: t,
|
|
16176
|
+
drawerOpen: r,
|
|
16177
|
+
tooltipsOpen: i,
|
|
16178
|
+
url: o,
|
|
16179
|
+
onClick: a
|
|
16172
16180
|
}) {
|
|
16173
|
-
const
|
|
16181
|
+
const l = /* @__PURE__ */ v(
|
|
16182
|
+
Ka,
|
|
16183
|
+
{
|
|
16184
|
+
onClick: a,
|
|
16185
|
+
style: {
|
|
16186
|
+
width: r ? "280px" : "72px",
|
|
16187
|
+
transition: r ? "width 150ms ease-in" : void 0
|
|
16188
|
+
},
|
|
16189
|
+
className: ({ isActive: c }) => H(
|
|
16190
|
+
"rounded-r-lg truncate",
|
|
16191
|
+
"hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
|
|
16192
|
+
"flex flex-row items-center mr-8",
|
|
16193
|
+
// "transition-all ease-in-out delay-100 duration-300",
|
|
16194
|
+
// drawerOpen ? "w-full" : "w-18",
|
|
16195
|
+
r ? "pl-8 h-12" : "pl-6 h-11",
|
|
16196
|
+
"font-medium text-sm",
|
|
16197
|
+
c ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-30" : ""
|
|
16198
|
+
),
|
|
16199
|
+
to: o,
|
|
16200
|
+
children: [
|
|
16201
|
+
/* @__PURE__ */ n(
|
|
16202
|
+
"div",
|
|
16203
|
+
{
|
|
16204
|
+
className: "text-gray-600 dark:text-gray-500",
|
|
16205
|
+
children: t
|
|
16206
|
+
}
|
|
16207
|
+
),
|
|
16208
|
+
/* @__PURE__ */ n(
|
|
16209
|
+
"div",
|
|
16210
|
+
{
|
|
16211
|
+
className: H(
|
|
16212
|
+
r ? "opacity-100" : "opacity-0 hidden",
|
|
16213
|
+
"ml-4 font-inherit text-inherit"
|
|
16214
|
+
),
|
|
16215
|
+
children: e.toUpperCase()
|
|
16216
|
+
}
|
|
16217
|
+
)
|
|
16218
|
+
]
|
|
16219
|
+
}
|
|
16220
|
+
);
|
|
16221
|
+
return /* @__PURE__ */ n(
|
|
16222
|
+
_e,
|
|
16223
|
+
{
|
|
16224
|
+
open: r ? !1 : i,
|
|
16225
|
+
side: "right",
|
|
16226
|
+
title: e,
|
|
16227
|
+
children: l
|
|
16228
|
+
}
|
|
16229
|
+
);
|
|
16230
|
+
}
|
|
16231
|
+
function qd() {
|
|
16232
|
+
const {
|
|
16233
|
+
hovered: e,
|
|
16234
|
+
drawerOpen: t,
|
|
16235
|
+
closeDrawer: r
|
|
16236
|
+
} = Ld(), i = St(), o = ke(), a = e && !t, s = $e(), l = Lt(), [c, d] = I.useState(!1);
|
|
16174
16237
|
if (!o.topLevelNavigation)
|
|
16175
16238
|
throw Error("Navigation not ready in Drawer");
|
|
16176
16239
|
const {
|
|
@@ -16201,9 +16264,9 @@ function Yd({
|
|
|
16201
16264
|
children: [
|
|
16202
16265
|
g(h),
|
|
16203
16266
|
Object.values(u).filter((y) => y.group === h).map((y, b) => /* @__PURE__ */ n(
|
|
16204
|
-
|
|
16267
|
+
Yd,
|
|
16205
16268
|
{
|
|
16206
|
-
icon: /* @__PURE__ */ n(
|
|
16269
|
+
icon: /* @__PURE__ */ n(Hr, { collectionOrView: y.collection ?? y.view }),
|
|
16207
16270
|
tooltipsOpen: a,
|
|
16208
16271
|
drawerOpen: t,
|
|
16209
16272
|
onClick: () => A(y),
|
|
@@ -16257,7 +16320,7 @@ function Yd({
|
|
|
16257
16320
|
b.preventDefault(), l(h.path);
|
|
16258
16321
|
},
|
|
16259
16322
|
children: [
|
|
16260
|
-
/* @__PURE__ */ n(
|
|
16323
|
+
/* @__PURE__ */ n(Hr, { collectionOrView: h.view }),
|
|
16261
16324
|
h.name
|
|
16262
16325
|
]
|
|
16263
16326
|
},
|
|
@@ -16267,65 +16330,21 @@ function Yd({
|
|
|
16267
16330
|
)
|
|
16268
16331
|
] });
|
|
16269
16332
|
}
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
width: r ? "280px" : "72px",
|
|
16284
|
-
transition: r ? "width 150ms ease-in" : void 0
|
|
16285
|
-
},
|
|
16286
|
-
className: ({ isActive: c }) => H(
|
|
16287
|
-
"rounded-r-xl truncate",
|
|
16288
|
-
"hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
|
|
16289
|
-
"flex flex-row items-center mr-8",
|
|
16290
|
-
// "transition-all ease-in-out delay-100 duration-300",
|
|
16291
|
-
// drawerOpen ? "w-full" : "w-18",
|
|
16292
|
-
r ? "pl-8 h-12" : "pl-6 h-11",
|
|
16293
|
-
"font-medium text-sm",
|
|
16294
|
-
c ? "bg-slate-200 bg-opacity-75 dark:bg-gray-800" : ""
|
|
16295
|
-
),
|
|
16296
|
-
to: o,
|
|
16297
|
-
children: [
|
|
16298
|
-
/* @__PURE__ */ n(
|
|
16299
|
-
"div",
|
|
16300
|
-
{
|
|
16301
|
-
className: "text-gray-600 dark:text-gray-500",
|
|
16302
|
-
children: t
|
|
16303
|
-
}
|
|
16304
|
-
),
|
|
16305
|
-
/* @__PURE__ */ n(
|
|
16306
|
-
"div",
|
|
16307
|
-
{
|
|
16308
|
-
className: H(
|
|
16309
|
-
r ? "opacity-100" : "opacity-0 hidden",
|
|
16310
|
-
"ml-4 font-inherit text-inherit"
|
|
16311
|
-
),
|
|
16312
|
-
children: e.toUpperCase()
|
|
16313
|
-
}
|
|
16314
|
-
)
|
|
16315
|
-
]
|
|
16316
|
-
}
|
|
16317
|
-
);
|
|
16318
|
-
return /* @__PURE__ */ n(
|
|
16319
|
-
_e,
|
|
16320
|
-
{
|
|
16321
|
-
open: r ? !1 : i,
|
|
16322
|
-
side: "right",
|
|
16323
|
-
title: e,
|
|
16324
|
-
children: l
|
|
16325
|
-
}
|
|
16326
|
-
);
|
|
16333
|
+
const Ud = 280, ea = I.createContext({
|
|
16334
|
+
hovered: !1,
|
|
16335
|
+
drawerOpen: !1,
|
|
16336
|
+
openDrawer: () => {
|
|
16337
|
+
throw new Error("openDrawer not implemented");
|
|
16338
|
+
},
|
|
16339
|
+
closeDrawer: () => {
|
|
16340
|
+
throw new Error("closeDrawer not implemented");
|
|
16341
|
+
},
|
|
16342
|
+
autoOpenDrawer: !1
|
|
16343
|
+
});
|
|
16344
|
+
function Ld() {
|
|
16345
|
+
return I.useContext(ea);
|
|
16327
16346
|
}
|
|
16328
|
-
const
|
|
16347
|
+
const sm = I.memo(
|
|
16329
16348
|
function(t) {
|
|
16330
16349
|
const {
|
|
16331
16350
|
children: r,
|
|
@@ -16333,14 +16352,21 @@ const Ud = 280, am = I.memo(
|
|
|
16333
16352
|
logo: o,
|
|
16334
16353
|
includeDrawer: a = !0,
|
|
16335
16354
|
autoOpenDrawer: s,
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16339
|
-
|
|
16340
|
-
|
|
16341
|
-
|
|
16342
|
-
|
|
16343
|
-
|
|
16355
|
+
drawer: l = /* @__PURE__ */ n(qd, {}),
|
|
16356
|
+
FireCMSAppBar: c = Oc,
|
|
16357
|
+
fireCMSAppBarProps: d
|
|
16358
|
+
} = t, u = $e(), [f, m] = I.useState(!1), [p, g] = I.useState(!1), A = x(() => g(!0), []), h = x(() => g(!1), []), y = x(() => {
|
|
16359
|
+
m(!0);
|
|
16360
|
+
}, []), b = x(() => {
|
|
16361
|
+
m(!1);
|
|
16362
|
+
}, []), w = f || !!(u && s && p);
|
|
16363
|
+
return /* @__PURE__ */ n(ea.Provider, { value: {
|
|
16364
|
+
hovered: p,
|
|
16365
|
+
drawerOpen: w,
|
|
16366
|
+
closeDrawer: b,
|
|
16367
|
+
openDrawer: y,
|
|
16368
|
+
autoOpenDrawer: s
|
|
16369
|
+
}, children: /* @__PURE__ */ v(
|
|
16344
16370
|
"div",
|
|
16345
16371
|
{
|
|
16346
16372
|
className: "flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",
|
|
@@ -16350,41 +16376,30 @@ const Ud = 280, am = I.memo(
|
|
|
16350
16376
|
paddingRight: "env(safe-area-inset-right)",
|
|
16351
16377
|
paddingBottom: "env(safe-area-inset-bottom)",
|
|
16352
16378
|
height: "100dvh"
|
|
16353
|
-
// "@supports (height: 100dvh)": {
|
|
16354
|
-
// height: "100dvh"
|
|
16355
|
-
// }
|
|
16356
16379
|
},
|
|
16357
16380
|
children: [
|
|
16358
16381
|
/* @__PURE__ */ n(
|
|
16359
|
-
|
|
16382
|
+
c,
|
|
16360
16383
|
{
|
|
16361
16384
|
title: i,
|
|
16362
16385
|
includeDrawer: a,
|
|
16363
16386
|
logo: o,
|
|
16364
16387
|
drawerOpen: w,
|
|
16365
|
-
...
|
|
16388
|
+
...d
|
|
16366
16389
|
}
|
|
16367
16390
|
),
|
|
16368
16391
|
/* @__PURE__ */ n(
|
|
16369
|
-
|
|
16392
|
+
Wd,
|
|
16370
16393
|
{
|
|
16371
16394
|
displayed: a,
|
|
16372
|
-
onMouseEnter:
|
|
16373
|
-
onMouseMove:
|
|
16374
|
-
onMouseLeave:
|
|
16395
|
+
onMouseEnter: A,
|
|
16396
|
+
onMouseMove: A,
|
|
16397
|
+
onMouseLeave: h,
|
|
16375
16398
|
open: w,
|
|
16376
16399
|
logo: o,
|
|
16377
|
-
hovered:
|
|
16378
|
-
setDrawerOpen:
|
|
16379
|
-
children: a &&
|
|
16380
|
-
l,
|
|
16381
|
-
{
|
|
16382
|
-
hovered: g,
|
|
16383
|
-
drawerOpen: w,
|
|
16384
|
-
closeDrawer: b,
|
|
16385
|
-
...c
|
|
16386
|
-
}
|
|
16387
|
-
)
|
|
16400
|
+
hovered: p,
|
|
16401
|
+
setDrawerOpen: m,
|
|
16402
|
+
children: a && l
|
|
16388
16403
|
}
|
|
16389
16404
|
),
|
|
16390
16405
|
/* @__PURE__ */ v(
|
|
@@ -16392,11 +16407,11 @@ const Ud = 280, am = I.memo(
|
|
|
16392
16407
|
{
|
|
16393
16408
|
className: "flex flex-col flex-grow overflow-auto",
|
|
16394
16409
|
children: [
|
|
16395
|
-
/* @__PURE__ */ n(
|
|
16410
|
+
/* @__PURE__ */ n($d, {}),
|
|
16396
16411
|
/* @__PURE__ */ n(
|
|
16397
16412
|
"div",
|
|
16398
16413
|
{
|
|
16399
|
-
className: H(
|
|
16414
|
+
className: H(Be, "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"),
|
|
16400
16415
|
children: /* @__PURE__ */ n(me, { children: r })
|
|
16401
16416
|
}
|
|
16402
16417
|
)
|
|
@@ -16405,11 +16420,11 @@ const Ud = 280, am = I.memo(
|
|
|
16405
16420
|
)
|
|
16406
16421
|
]
|
|
16407
16422
|
}
|
|
16408
|
-
);
|
|
16423
|
+
) });
|
|
16409
16424
|
},
|
|
16410
16425
|
L
|
|
16411
|
-
),
|
|
16412
|
-
function
|
|
16426
|
+
), $d = () => /* @__PURE__ */ n("div", { className: "flex flex-col min-h-[68px]" });
|
|
16427
|
+
function Wd(e) {
|
|
16413
16428
|
const t = ke(), r = e.displayed ? e.open ? Ud : 72 : 0, i = /* @__PURE__ */ v(
|
|
16414
16429
|
"div",
|
|
16415
16430
|
{
|
|
@@ -16455,7 +16470,7 @@ function $d(e) {
|
|
|
16455
16470
|
sideOffset: 20,
|
|
16456
16471
|
side: "right",
|
|
16457
16472
|
children: /* @__PURE__ */ n(
|
|
16458
|
-
|
|
16473
|
+
Ar,
|
|
16459
16474
|
{
|
|
16460
16475
|
to: t.basePath,
|
|
16461
16476
|
children: e.logo ? /* @__PURE__ */ n(
|
|
@@ -16533,12 +16548,12 @@ function $d(e) {
|
|
|
16533
16548
|
)
|
|
16534
16549
|
] }) : null;
|
|
16535
16550
|
}
|
|
16536
|
-
const
|
|
16551
|
+
const lm = I.memo(
|
|
16537
16552
|
function({
|
|
16538
16553
|
homePage: t = /* @__PURE__ */ n(kc, {}),
|
|
16539
16554
|
customRoutes: r
|
|
16540
16555
|
}) {
|
|
16541
|
-
const i =
|
|
16556
|
+
const i = br(), o = ke();
|
|
16542
16557
|
if (!o)
|
|
16543
16558
|
return /* @__PURE__ */ n(j, {});
|
|
16544
16559
|
const a = i.state, s = a && a.base_location ? a.base_location : i, l = [];
|
|
@@ -16604,7 +16619,7 @@ export {
|
|
|
16604
16619
|
fd as ArrayCustomShapedFieldBinding,
|
|
16605
16620
|
wo as ArrayEnumPreview,
|
|
16606
16621
|
zc as ArrayItemOptions,
|
|
16607
|
-
|
|
16622
|
+
Hu as ArrayOfMapsPreview,
|
|
16608
16623
|
jc as ArrayOfReferencesFieldBinding,
|
|
16609
16624
|
dl as ArrayOfReferencesPreview,
|
|
16610
16625
|
ul as ArrayOfStorageComponentsPreview,
|
|
@@ -16612,19 +16627,20 @@ export {
|
|
|
16612
16627
|
pl as ArrayOneOfPreview,
|
|
16613
16628
|
Zi as ArrayPropertyEnumPreview,
|
|
16614
16629
|
Ji as ArrayPropertyPreview,
|
|
16615
|
-
|
|
16630
|
+
Zu as AsyncPreviewComponent,
|
|
16616
16631
|
On as AuthControllerContext,
|
|
16617
16632
|
cd as BlockFieldBinding,
|
|
16618
16633
|
gl as BooleanPreview,
|
|
16619
16634
|
ys as COLLECTION_PATH_SEPARATOR,
|
|
16620
|
-
|
|
16635
|
+
Kr as CircularProgressCenter,
|
|
16621
16636
|
Si as DEFAULT_FIELD_CONFIGS,
|
|
16637
|
+
Ud as DRAWER_WIDTH,
|
|
16622
16638
|
hl as DatePreview,
|
|
16623
16639
|
Xc as DateTimeFieldBinding,
|
|
16624
16640
|
kc as DefaultHomePage,
|
|
16625
|
-
|
|
16626
|
-
|
|
16627
|
-
|
|
16641
|
+
em as DeleteConfirmationDialog,
|
|
16642
|
+
qd as Drawer,
|
|
16643
|
+
Yd as DrawerNavigationItem,
|
|
16628
16644
|
gt as EmptyValue,
|
|
16629
16645
|
ki as EntityCollectionRowActions,
|
|
16630
16646
|
Ro as EntityCollectionTable,
|
|
@@ -16636,14 +16652,14 @@ export {
|
|
|
16636
16652
|
Ve as EnumValuesChip,
|
|
16637
16653
|
me as ErrorBoundary,
|
|
16638
16654
|
Ne as ErrorView,
|
|
16639
|
-
|
|
16655
|
+
im as FieldCaption,
|
|
16640
16656
|
Oe as FieldHelperText,
|
|
16641
|
-
|
|
16657
|
+
am as FireCMS,
|
|
16642
16658
|
Oc as FireCMSAppBar,
|
|
16643
16659
|
Yo as FireCMSLogo,
|
|
16644
|
-
|
|
16660
|
+
Ci as FormikArrayContainer,
|
|
16645
16661
|
Vn as GeoPoint,
|
|
16646
|
-
|
|
16662
|
+
Hr as IconForView,
|
|
16647
16663
|
Ws as ImagePreview,
|
|
16648
16664
|
od as KeyValueFieldBinding,
|
|
16649
16665
|
vo as KeyValuePreview,
|
|
@@ -16652,15 +16668,15 @@ export {
|
|
|
16652
16668
|
fl as MapPropertyPreview,
|
|
16653
16669
|
md as MarkdownFieldBinding,
|
|
16654
16670
|
hi as ModeControllerContext,
|
|
16655
|
-
|
|
16671
|
+
mu as ModeControllerProvider,
|
|
16656
16672
|
dn as MultiSelectBinding,
|
|
16657
16673
|
Ac as NavigationCard,
|
|
16658
16674
|
yc as NavigationCardBinding,
|
|
16659
16675
|
sn as NavigationGroup,
|
|
16660
|
-
|
|
16676
|
+
lm as NavigationRoutes,
|
|
16661
16677
|
Tc as NotFoundPage,
|
|
16662
16678
|
Al as NumberPropertyPreview,
|
|
16663
|
-
|
|
16679
|
+
Ku as PropertyConfigBadge,
|
|
16664
16680
|
It as PropertyFieldBinding,
|
|
16665
16681
|
Fe as PropertyPreview,
|
|
16666
16682
|
Ul as PropertyTableCell,
|
|
@@ -16668,16 +16684,16 @@ export {
|
|
|
16668
16684
|
Kc as ReferenceFieldBinding,
|
|
16669
16685
|
Ze as ReferencePreview,
|
|
16670
16686
|
hc as ReferenceSelectionTable,
|
|
16671
|
-
|
|
16687
|
+
tm as ReferenceWidget,
|
|
16672
16688
|
ld as RepeatFieldBinding,
|
|
16673
|
-
|
|
16674
|
-
|
|
16689
|
+
sm as Scaffold,
|
|
16690
|
+
rm as SearchIconsView,
|
|
16675
16691
|
cn as SelectFieldBinding,
|
|
16676
16692
|
dc as SelectableTable,
|
|
16677
|
-
|
|
16693
|
+
om as SideDialogs,
|
|
16678
16694
|
_t as SkeletonPropertyComponent,
|
|
16679
16695
|
bc as SmallNavigationCard,
|
|
16680
|
-
|
|
16696
|
+
uu as SnackbarProvider,
|
|
16681
16697
|
rl as StorageThumbnail,
|
|
16682
16698
|
nl as StorageThumbnailInternal,
|
|
16683
16699
|
un as StorageUploadFieldBinding,
|
|
@@ -16685,21 +16701,21 @@ export {
|
|
|
16685
16701
|
Zc as SwitchFieldBinding,
|
|
16686
16702
|
Rt as TextFieldBinding,
|
|
16687
16703
|
dr as UrlComponentPreview,
|
|
16688
|
-
|
|
16704
|
+
hu as Vector,
|
|
16689
16705
|
ic as VirtualTable,
|
|
16690
|
-
|
|
16706
|
+
pu as addInitialSlash,
|
|
16691
16707
|
hs as applyPermissionsFunctionIfEmpty,
|
|
16692
|
-
|
|
16693
|
-
|
|
16694
|
-
|
|
16708
|
+
Mu as buildAdditionalFieldDelegate,
|
|
16709
|
+
Fu as buildCollection,
|
|
16710
|
+
Ou as buildEntityCallbacks,
|
|
16695
16711
|
fs as buildEnumLabel,
|
|
16696
|
-
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16702
|
-
|
|
16712
|
+
Tu as buildEnumValueConfig,
|
|
16713
|
+
Du as buildEnumValues,
|
|
16714
|
+
zu as buildFieldConfig,
|
|
16715
|
+
Xu as buildIdColumn,
|
|
16716
|
+
Qu as buildProperties,
|
|
16717
|
+
Ru as buildPropertiesOrBuilder,
|
|
16718
|
+
Pu as buildProperty,
|
|
16703
16719
|
zt as canCreateEntity,
|
|
16704
16720
|
vi as canDeleteEntity,
|
|
16705
16721
|
Jn as canEditEntity,
|
|
@@ -16712,65 +16728,65 @@ export {
|
|
|
16712
16728
|
Bu as getBracketNotation,
|
|
16713
16729
|
gi as getCollectionByPathOrId,
|
|
16714
16730
|
Ai as getCollectionPathsCombinations,
|
|
16715
|
-
|
|
16731
|
+
Cu as getColorForProperty,
|
|
16716
16732
|
ps as getColorScheme,
|
|
16717
16733
|
Ei as getColumnKeysForProperty,
|
|
16718
16734
|
Ed as getDefaultFieldConfig,
|
|
16719
16735
|
Ii as getDefaultFieldId,
|
|
16720
|
-
|
|
16736
|
+
Su as getDefaultPropertiesOrder,
|
|
16721
16737
|
bi as getDefaultValueFor,
|
|
16722
16738
|
jn as getDefaultValueForDataType,
|
|
16723
16739
|
lr as getDefaultValuesFor,
|
|
16724
|
-
|
|
16725
|
-
|
|
16740
|
+
Bs as getEntityImagePreviewPropertyKey,
|
|
16741
|
+
Cs as getEntityPreviewKeys,
|
|
16726
16742
|
Hn as getEntityTitlePropertyKey,
|
|
16727
|
-
|
|
16743
|
+
xr as getFieldConfig,
|
|
16728
16744
|
Wo as getFieldId,
|
|
16729
16745
|
Gn as getHashValue,
|
|
16730
16746
|
Es as getIcon,
|
|
16731
16747
|
Te as getIconForProperty,
|
|
16732
|
-
|
|
16733
|
-
|
|
16748
|
+
Wr as getIconForWidget,
|
|
16749
|
+
Eu as getIdIcon,
|
|
16734
16750
|
yi as getLabelOrConfigFrom,
|
|
16735
|
-
|
|
16751
|
+
fu as getLastSegment,
|
|
16736
16752
|
ks as getPropertiesWithPropertiesOrder,
|
|
16737
16753
|
At as getPropertyInPath,
|
|
16738
16754
|
nr as getRandomId,
|
|
16739
16755
|
at as getReferenceFrom,
|
|
16740
16756
|
Wn as getResolvedPropertyInPath,
|
|
16741
|
-
|
|
16757
|
+
Uu as getSidePanelKey,
|
|
16742
16758
|
ot as getValueInPath,
|
|
16743
16759
|
vs as hydrateRegExp,
|
|
16744
|
-
|
|
16760
|
+
Jr as iconSynonyms,
|
|
16745
16761
|
_i as iconsSearch,
|
|
16746
16762
|
xd as isDefaultFieldConfigId,
|
|
16747
16763
|
ji as isEmptyObject,
|
|
16748
|
-
|
|
16749
|
-
|
|
16750
|
-
|
|
16764
|
+
bu as isEnumValueDisabled,
|
|
16765
|
+
yr as isHidden,
|
|
16766
|
+
Fr as isObject,
|
|
16751
16767
|
De as isPropertyBuilder,
|
|
16752
16768
|
$t as isReadOnly,
|
|
16753
16769
|
_s as isReferenceProperty,
|
|
16754
|
-
|
|
16770
|
+
xu as isValidRegExp,
|
|
16755
16771
|
Fs as joinCollectionLists,
|
|
16756
16772
|
Is as makePropertiesEditable,
|
|
16757
16773
|
Ns as makePropertiesNonEditable,
|
|
16758
16774
|
Ps as mergeCollection,
|
|
16759
16775
|
Le as mergeDeep,
|
|
16760
16776
|
ds as pick,
|
|
16761
|
-
|
|
16777
|
+
Iu as plural,
|
|
16762
16778
|
Xn as printChanged,
|
|
16763
16779
|
Hl as propertiesToColumns,
|
|
16764
|
-
|
|
16780
|
+
vu as randomColor,
|
|
16765
16781
|
Mt as randomString,
|
|
16766
16782
|
Vi as removeFunctions,
|
|
16767
|
-
|
|
16783
|
+
gu as removeInPath,
|
|
16768
16784
|
Ee as removeInitialAndTrailingSlashes,
|
|
16769
16785
|
ls as removeInitialSlash,
|
|
16770
16786
|
us as removePropsIfExisting,
|
|
16771
16787
|
cs as removeTrailingSlash,
|
|
16772
16788
|
Gi as removeUndefined,
|
|
16773
|
-
|
|
16789
|
+
Ju as renderSkeletonCaptionText,
|
|
16774
16790
|
Ao as renderSkeletonIcon,
|
|
16775
16791
|
go as renderSkeletonImageThumbnail,
|
|
16776
16792
|
nt as renderSkeletonText,
|
|
@@ -16779,55 +16795,57 @@ export {
|
|
|
16779
16795
|
Mn as resolveCollectionPathIds,
|
|
16780
16796
|
Ln as resolveDefaultSelectedView,
|
|
16781
16797
|
Zo as resolveEntityView,
|
|
16782
|
-
|
|
16798
|
+
nm as resolveEnumValues,
|
|
16783
16799
|
Ts as resolveNavigationFrom,
|
|
16784
|
-
|
|
16800
|
+
vr as resolvePermissions,
|
|
16785
16801
|
Jo as resolveProperties,
|
|
16786
16802
|
Ge as resolveProperty,
|
|
16787
16803
|
Ho as resolvePropertyEnum,
|
|
16788
|
-
|
|
16804
|
+
Au as sanitizeData,
|
|
16789
16805
|
co as saveEntityWithCallbacks,
|
|
16790
16806
|
ws as segmentsToStrippedPath,
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
|
|
16807
|
+
ku as serializeRegExp,
|
|
16808
|
+
Nu as singular,
|
|
16809
|
+
$r as slugify,
|
|
16794
16810
|
Un as sortProperties,
|
|
16795
16811
|
Yi as stripCollectionPath,
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16812
|
+
yu as toKebabCase,
|
|
16813
|
+
wu as toSnakeCase,
|
|
16814
|
+
Lr as traverseValueProperty,
|
|
16799
16815
|
Yn as traverseValuesProperties,
|
|
16800
|
-
|
|
16816
|
+
_u as unslugify,
|
|
16801
16817
|
ms as updateDateAutoValues,
|
|
16802
16818
|
mt as useAuthController,
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16819
|
+
Yu as useBrowserTitleAndIcon,
|
|
16820
|
+
Lu as useBuildLocalConfigurationPersistence,
|
|
16821
|
+
$u as useBuildModeController,
|
|
16822
|
+
qu as useBuildNavigationController,
|
|
16807
16823
|
Ue as useClearRestoreValue,
|
|
16808
16824
|
Os as useClipboard,
|
|
16809
|
-
|
|
16825
|
+
Gu as useCollectionFetch,
|
|
16810
16826
|
Fo as useColumnIds,
|
|
16811
16827
|
pe as useCustomizationController,
|
|
16812
16828
|
Xe as useDataSource,
|
|
16813
16829
|
Do as useDataSourceEntityCollectionTableController,
|
|
16814
16830
|
wi as useDebouncedCallback,
|
|
16815
16831
|
pc as useDebouncedData,
|
|
16832
|
+
Rs as useDialogsController,
|
|
16833
|
+
Ld as useDrawer,
|
|
16816
16834
|
lo as useEntityFetch,
|
|
16817
16835
|
Se as useFireCMSContext,
|
|
16818
16836
|
$e as useLargeLayout,
|
|
16819
16837
|
uo as useModeController,
|
|
16820
16838
|
ke as useNavigationController,
|
|
16821
16839
|
Jt as useReferenceDialog,
|
|
16822
|
-
|
|
16840
|
+
ju as useResolvedNavigationFrom,
|
|
16823
16841
|
To as useSelectionController,
|
|
16824
16842
|
Fi as useSideDialogContext,
|
|
16825
|
-
|
|
16843
|
+
_r as useSideDialogsController,
|
|
16826
16844
|
pt as useSideEntityController,
|
|
16827
16845
|
ft as useSnackbarController,
|
|
16828
16846
|
Wt as useStorageSource,
|
|
16829
16847
|
Oo as useTableSearchHelper,
|
|
16830
|
-
|
|
16831
|
-
|
|
16848
|
+
Vu as useTraceUpdate,
|
|
16849
|
+
Wu as useValidateAuthenticator
|
|
16832
16850
|
};
|
|
16833
16851
|
//# sourceMappingURL=index.es.js.map
|