@firecms/core 3.0.0-canary.75 → 3.0.0-canary.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +525 -557
- 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/icons.d.ts +2 -2
- package/package.json +18 -18
- package/src/util/objects.ts +17 -7
package/dist/index.es.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsx as n, jsxs as v, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import * as kt from "react";
|
|
3
|
-
import S, { useRef as ce, useEffect as M, useContext as $e, useCallback as x, useMemo as he, useState as P, createElement as
|
|
4
|
-
import { SnackbarProvider as
|
|
3
|
+
import S, { useRef as ce, useEffect as M, useContext as $e, useCallback as x, useMemo as he, useState as P, createElement as Ea, createRef as Ca, createContext as Ba, forwardRef as Sa, useLayoutEffect as ei, useDeferredValue as Ia } from "react";
|
|
4
|
+
import { SnackbarProvider as Na, useSnackbar as Fa } from "notistack";
|
|
5
5
|
import Ji from "object-hash";
|
|
6
|
-
import { useCreateFormex as
|
|
7
|
-
import { getColorSchemeForSeed as
|
|
6
|
+
import { useCreateFormex as In, Formex as Nn, setIn as ti, Field as Fn, getIn as jt, useFormex as fi } from "@firecms/formex";
|
|
7
|
+
import { getColorSchemeForSeed as Pn, CHIP_COLORS as Pa, Tooltip as ke, ErrorIcon as Qn, Typography as Y, CircleIcon as Dn, FunctionsIcon as Qa, iconKeys as hi, coolIconKeys as ri, Icon as gi, IconButton as de, ContentCopyIcon as vr, OpenInNewIcon as Ht, DescriptionIcon as Da, Skeleton as Ue, Chip as Ai, cls as U, defaultBorderMixin as Se, KeyboardTabIcon as bi, Checkbox as Zt, Markdown as yi, TextareaAutosize as Ra, MultiSelect as Rn, MultiSelectItem as Tn, Select as nt, SelectItem as ot, BooleanSwitch as Ta, DateTimeField as Xt, paperMixin as kr, ErrorOutlineIcon as Oa, EditIcon as Ma, Button as ge, RemoveCircleIcon as za, Menu as St, MoreVertIcon as On, MenuItem as Pe, CircularProgress as _t, SearchBar as wi, Badge as Hi, ArrowUpwardIcon as Gr, Popover as vi, FilterListIcon as Va, AssignmentIcon as Ga, CenteredView as sr, Label as ki, TextField as xt, ClearIcon as Yt, BooleanSwitchWithLabel as _r, useOutsideAlerter as Mn, Dialog as _i, DialogContent as xi, DialogActions as It, FileCopyIcon as ja, ArchiveIcon as Ya, DeleteIcon as ii, AddIcon as pt, ExpandablePanel as ft, Card as La, ArrowForwardIcon as zn, cardMixin as Ua, cardClickableMixin as $a, focusedMixin as ni, StarIcon as Vn, StarBorderIcon as Gn, Collapse as jn, Container as qa, FilterListOffIcon as Wa, SearchIcon as Ja, LoadingButton as Ha, Avatar as Zi, DarkModeIcon as Za, LightModeIcon as Xa, LogoutIcon as Ka, fieldBackgroundHoverMixin as xr, HandleIcon as es, RemoveIcon as Ei, debounce as ts, InfoIcon as rs, CloseIcon as Yn, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Ln, ArrowDropDownIcon as Un, useInjectStyles as is, ShortTextIcon as ns, SubjectIcon as os, FormatQuoteIcon as as, HttpIcon as ss, EmailIcon as ls, FlagIcon as cs, ListIcon as ds, ListAltIcon as us, NumbersIcon as ms, FormatListNumberedIcon as Xi, UploadFileIcon as ps, DriveFolderUploadIcon as fs, LinkIcon as hs, AddLinkIcon as gs, ScheduleIcon as As, BallotIcon as Ki, RepeatIcon as en, ViewStreamIcon as bs, Tab as jr, Tabs as ys, Alert as ws, Sheet as $n, useLocaleConfig as vs, MenuIcon as tn, ChevronLeftIcon as ks } from "@firecms/ui";
|
|
8
8
|
import J from "react-fast-compare";
|
|
9
|
-
import { Link as Er, useNavigate as Kt, useLocation as Cr, UNSAFE_NavigationContext as
|
|
10
|
-
import { format as
|
|
11
|
-
import * as
|
|
12
|
-
import
|
|
13
|
-
import { useDropzone as
|
|
14
|
-
import { DragDropContext as
|
|
15
|
-
import
|
|
16
|
-
import * as
|
|
17
|
-
import { FixedSizeList as
|
|
9
|
+
import { Link as Er, useNavigate as Kt, useLocation as Cr, UNSAFE_NavigationContext as _s, NavLink as xs, Route as lr, Routes as Es } from "react-router-dom";
|
|
10
|
+
import { format as Cs } from "date-fns";
|
|
11
|
+
import * as Bs from "date-fns/locale";
|
|
12
|
+
import qn from "react-use-measure";
|
|
13
|
+
import { useDropzone as Wn } from "react-dropzone";
|
|
14
|
+
import { DragDropContext as Jn, Droppable as Hn, Draggable as Zn } from "@hello-pangea/dnd";
|
|
15
|
+
import Ss from "react-image-file-resizer";
|
|
16
|
+
import * as Xn from "js-search";
|
|
17
|
+
import { FixedSizeList as Is } from "react-window";
|
|
18
18
|
import * as Oe from "yup";
|
|
19
|
-
import
|
|
19
|
+
import Ns from "markdown-it";
|
|
20
20
|
import cr, { Plugins as Yr } from "react-markdown-editor-lite";
|
|
21
|
-
import * as
|
|
21
|
+
import * as Fs from "@radix-ui/react-portal";
|
|
22
22
|
const Mu = ({ children: e }) => /* @__PURE__ */ n(
|
|
23
|
-
|
|
23
|
+
Na,
|
|
24
24
|
{
|
|
25
25
|
maxSnack: 3,
|
|
26
26
|
autoHideDuration: 3500,
|
|
27
27
|
children: e
|
|
28
28
|
}
|
|
29
|
-
),
|
|
29
|
+
), Ps = {
|
|
30
30
|
mode: "light",
|
|
31
31
|
setMode: (e) => {
|
|
32
32
|
},
|
|
33
33
|
toggleMode: () => {
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, Kn = S.createContext(Ps), zu = Kn.Provider, eo = S.createContext({});
|
|
36
36
|
function Ee(e) {
|
|
37
|
-
return
|
|
37
|
+
return Qs(Ds(e));
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Qs(e) {
|
|
40
40
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Ds(e) {
|
|
43
43
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
44
44
|
}
|
|
45
45
|
function Vu(e) {
|
|
@@ -53,7 +53,7 @@ function Gu(e) {
|
|
|
53
53
|
}
|
|
54
54
|
return t;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function to(e, t) {
|
|
57
57
|
const r = Ee(e), i = r.split("/");
|
|
58
58
|
if (i.length % 2 === 0)
|
|
59
59
|
throw Error(`resolveCollectionPathAliases: Collection paths must have an odd number of segments: ${e}`);
|
|
@@ -64,7 +64,7 @@ function eo(e, t) {
|
|
|
64
64
|
if (!s?.subcollections)
|
|
65
65
|
return r;
|
|
66
66
|
const l = r.split("/").slice(2).join("/");
|
|
67
|
-
return (o ?? i[0]) + "/" + i[1] + "/" +
|
|
67
|
+
return (o ?? i[0]) + "/" + i[1] + "/" + to(l, s.subcollections);
|
|
68
68
|
} else
|
|
69
69
|
return o ?? r;
|
|
70
70
|
}
|
|
@@ -84,8 +84,7 @@ function Ci(e, t) {
|
|
|
84
84
|
c.length > 0 && (a = Ci(c, l.subcollections));
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
if (a)
|
|
88
|
-
break;
|
|
87
|
+
if (a) break;
|
|
89
88
|
}
|
|
90
89
|
return a;
|
|
91
90
|
}
|
|
@@ -95,7 +94,7 @@ function Bi(e) {
|
|
|
95
94
|
i.push(t.slice(0, a).join("/"));
|
|
96
95
|
return i;
|
|
97
96
|
}
|
|
98
|
-
class
|
|
97
|
+
class ro {
|
|
99
98
|
/**
|
|
100
99
|
* ID of the entity
|
|
101
100
|
*/
|
|
@@ -115,7 +114,7 @@ class to {
|
|
|
115
114
|
return !0;
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
|
-
class
|
|
117
|
+
class io {
|
|
119
118
|
/**
|
|
120
119
|
* The latitude of this GeoPoint instance.
|
|
121
120
|
*/
|
|
@@ -134,7 +133,7 @@ class ju {
|
|
|
134
133
|
this.value = t;
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
|
-
const
|
|
136
|
+
const Rs = (e, ...t) => ({
|
|
138
137
|
...t.reduce((r, i) => ({
|
|
139
138
|
...r,
|
|
140
139
|
[i]: e[i]
|
|
@@ -173,15 +172,14 @@ function rn(e) {
|
|
|
173
172
|
if (e !== void 0)
|
|
174
173
|
return e === null ? null : typeof e == "object" ? Object.entries(e).filter(([t, r]) => typeof r != "function").map(([t, r]) => Array.isArray(r) ? { [t]: r.map((i) => rn(i)) } : typeof r == "object" ? { [t]: rn(r) } : { [t]: r }).reduce((t, r) => ({ ...t, ...r }), {}) : e;
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
if (!e)
|
|
178
|
-
return null;
|
|
175
|
+
function no(e) {
|
|
176
|
+
if (!e) return null;
|
|
179
177
|
if (typeof e == "object") {
|
|
180
178
|
if ("id" in e)
|
|
181
179
|
return e.id;
|
|
182
180
|
if (e instanceof Date)
|
|
183
181
|
return e.toLocaleString();
|
|
184
|
-
if (e instanceof
|
|
182
|
+
if (e instanceof io)
|
|
185
183
|
return Ji(e);
|
|
186
184
|
}
|
|
187
185
|
return Ji(e, { ignoreUnknown: !0 });
|
|
@@ -205,14 +203,19 @@ function nn(e, t) {
|
|
|
205
203
|
function on(e) {
|
|
206
204
|
return e && Object.getPrototypeOf(e) === Object.prototype && Object.keys(e).length === 0;
|
|
207
205
|
}
|
|
208
|
-
function
|
|
206
|
+
function an(e, t) {
|
|
209
207
|
const r = (o) => typeof o == "object" && o !== null, i = (o) => Array.isArray(o);
|
|
210
208
|
if (!r(e) || !r(t))
|
|
211
209
|
return e;
|
|
212
210
|
const a = i(e) ? [...e] : { ...e };
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
if (i(a))
|
|
212
|
+
for (let o = a.length - 1; o >= 0; o--)
|
|
213
|
+
a[o] === t[o] ? a.splice(o, 1) : r(a[o]) && r(t[o]) && (a[o] = an(a[o], t[o]));
|
|
214
|
+
else
|
|
215
|
+
Object.keys(t).forEach((o) => {
|
|
216
|
+
o in a && (r(a[o]) && r(t[o]) ? a[o] = an(a[o], t[o]) : a[o] === t[o] && delete a[o]);
|
|
217
|
+
});
|
|
218
|
+
return a;
|
|
216
219
|
}
|
|
217
220
|
const Lt = "type", fr = "value";
|
|
218
221
|
function er(e) {
|
|
@@ -238,10 +241,10 @@ function Br(e) {
|
|
|
238
241
|
const t = hr(e.properties);
|
|
239
242
|
return Object.keys(t).length === 0 ? void 0 : t;
|
|
240
243
|
} else
|
|
241
|
-
return
|
|
244
|
+
return oo(e.dataType);
|
|
242
245
|
}
|
|
243
246
|
}
|
|
244
|
-
function
|
|
247
|
+
function oo(e) {
|
|
245
248
|
return e === "string" || e === "number" ? null : e === "boolean" ? !1 : e === "date" ? null : e === "array" ? [] : e === "map" ? {} : null;
|
|
246
249
|
}
|
|
247
250
|
function Ts({
|
|
@@ -251,7 +254,7 @@ function Ts({
|
|
|
251
254
|
timestampNowValue: i,
|
|
252
255
|
setDateToMidnight: a
|
|
253
256
|
}) {
|
|
254
|
-
return
|
|
257
|
+
return ao(
|
|
255
258
|
e,
|
|
256
259
|
t,
|
|
257
260
|
(o, s) => {
|
|
@@ -270,13 +273,12 @@ function Lu(e, t) {
|
|
|
270
273
|
}), r;
|
|
271
274
|
}
|
|
272
275
|
function ut(e) {
|
|
273
|
-
return new
|
|
276
|
+
return new ro(e.id, e.path);
|
|
274
277
|
}
|
|
275
|
-
function
|
|
278
|
+
function ao(e, t, r) {
|
|
276
279
|
const i = Object.entries(t).map(([o, s]) => {
|
|
277
280
|
const l = e && e[o], c = oi(l, s, r);
|
|
278
|
-
if (c === null)
|
|
279
|
-
return null;
|
|
281
|
+
if (c === null) return null;
|
|
280
282
|
if (c !== void 0)
|
|
281
283
|
return { [o]: c };
|
|
282
284
|
}).reduce((o, s) => ({ ...o, ...s }), {}), a = { ...e, ...i };
|
|
@@ -286,17 +288,15 @@ function oo(e, t, r) {
|
|
|
286
288
|
function oi(e, t, r) {
|
|
287
289
|
let i;
|
|
288
290
|
if (t.dataType === "map" && t.properties)
|
|
289
|
-
i =
|
|
291
|
+
i = ao(e, t.properties, r);
|
|
290
292
|
else if (t.dataType === "array")
|
|
291
293
|
if (t.of && Array.isArray(e))
|
|
292
294
|
i = e.map((a) => oi(a, t.of, r));
|
|
293
295
|
else if (t.oneOf && Array.isArray(e)) {
|
|
294
296
|
const a = t.oneOf?.typeField ?? Lt, o = t.oneOf?.valueField ?? fr;
|
|
295
297
|
i = e.map((s) => {
|
|
296
|
-
if (s === null)
|
|
297
|
-
|
|
298
|
-
if (typeof s != "object")
|
|
299
|
-
return s;
|
|
298
|
+
if (s === null) return null;
|
|
299
|
+
if (typeof s != "object") return s;
|
|
300
300
|
const l = s[a], c = t.oneOf?.properties[l];
|
|
301
301
|
return !l || !c ? s : {
|
|
302
302
|
[a]: l,
|
|
@@ -325,10 +325,10 @@ function Ii(e, t) {
|
|
|
325
325
|
function Os(e, t) {
|
|
326
326
|
const r = Ii(e, t);
|
|
327
327
|
if (!r?.color)
|
|
328
|
-
return
|
|
328
|
+
return Pn(t.toString());
|
|
329
329
|
if (typeof r == "object" && "color" in r) {
|
|
330
330
|
if (typeof r.color == "string")
|
|
331
|
-
return
|
|
331
|
+
return Pa[r.color];
|
|
332
332
|
if (typeof r.color == "object")
|
|
333
333
|
return r.color;
|
|
334
334
|
}
|
|
@@ -340,7 +340,7 @@ function Ms(e) {
|
|
|
340
340
|
if (e !== void 0)
|
|
341
341
|
return typeof e == "object" ? e.label : e;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function so(e) {
|
|
344
344
|
return /* @__PURE__ */ n(
|
|
345
345
|
ke,
|
|
346
346
|
{
|
|
@@ -362,7 +362,7 @@ function Ne({
|
|
|
362
362
|
{
|
|
363
363
|
className: "flex items-center m-2",
|
|
364
364
|
children: [
|
|
365
|
-
/* @__PURE__ */ n(
|
|
365
|
+
/* @__PURE__ */ n(Qn, { size: "small", color: "error" }),
|
|
366
366
|
/* @__PURE__ */ v("div", { className: "pl-2", children: [
|
|
367
367
|
e && /* @__PURE__ */ n(
|
|
368
368
|
Y,
|
|
@@ -377,9 +377,9 @@ function Ne({
|
|
|
377
377
|
]
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
|
-
return r ? /* @__PURE__ */ n(
|
|
380
|
+
return r ? /* @__PURE__ */ n(so, { title: r, children: a }) : a;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function lo(e, t) {
|
|
383
383
|
try {
|
|
384
384
|
const r = Object.keys(e);
|
|
385
385
|
return (t ?? r).map((a) => {
|
|
@@ -388,7 +388,7 @@ function so(e, t) {
|
|
|
388
388
|
return !Qe(o) && o?.dataType === "map" && o.properties ? {
|
|
389
389
|
[a]: {
|
|
390
390
|
...o,
|
|
391
|
-
properties:
|
|
391
|
+
properties: lo(o.properties, o.propertiesOrder)
|
|
392
392
|
}
|
|
393
393
|
} : { [a]: o };
|
|
394
394
|
} else
|
|
@@ -398,7 +398,7 @@ function so(e, t) {
|
|
|
398
398
|
return console.error("Error sorting properties", r), e;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function co(e, t) {
|
|
402
402
|
if (e)
|
|
403
403
|
return typeof e == "string" ? e : e(t);
|
|
404
404
|
}
|
|
@@ -419,8 +419,7 @@ function Wu() {
|
|
|
419
419
|
return Math.floor(Math.random() * 16777215).toString(16);
|
|
420
420
|
}
|
|
421
421
|
function ai(e, t = "_", r = !0) {
|
|
422
|
-
if (!e)
|
|
423
|
-
return "";
|
|
422
|
+
if (!e) return "";
|
|
424
423
|
const i = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-", a = `aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;
|
|
425
424
|
for (let o = 0, s = i.length; o < s; o++)
|
|
426
425
|
e = e.replace(new RegExp(i.charAt(o), "g"), a.charAt(o));
|
|
@@ -435,21 +434,20 @@ function Ju(e) {
|
|
|
435
434
|
}).trim() : e.trim() : "";
|
|
436
435
|
}
|
|
437
436
|
const js = "MMMM dd, yyyy, HH:mm:ss", Ys = "::";
|
|
438
|
-
function
|
|
439
|
-
return Ls(
|
|
437
|
+
function sn(e) {
|
|
438
|
+
return Ls(uo(e));
|
|
440
439
|
}
|
|
441
440
|
function Ls(e) {
|
|
442
441
|
return e.length === 1 ? e[0] : e.reduce((t, r) => `${t}${Ys}${r}`);
|
|
443
442
|
}
|
|
444
|
-
function
|
|
443
|
+
function uo(e) {
|
|
445
444
|
return e.split("/").filter((t, r) => r % 2 === 0);
|
|
446
445
|
}
|
|
447
446
|
function Hu(e) {
|
|
448
447
|
return e ? e.toString() : "";
|
|
449
448
|
}
|
|
450
449
|
function Us(e) {
|
|
451
|
-
if (!e)
|
|
452
|
-
return;
|
|
450
|
+
if (!e) return;
|
|
453
451
|
const t = e.match(/\/(.*?)\/([a-z]*)?$/i);
|
|
454
452
|
return t ? new RegExp(t[1], t[2] || "") : new RegExp(e, "");
|
|
455
453
|
}
|
|
@@ -477,15 +475,15 @@ function $s(e, t) {
|
|
|
477
475
|
return r ? r.dataType === "reference" ? !0 : r.dataType === "array" ? Array.isArray(r.of) ? !1 : r.of?.dataType === "reference" : !1 : null;
|
|
478
476
|
}
|
|
479
477
|
function Xu(e) {
|
|
480
|
-
return /* @__PURE__ */ n(
|
|
478
|
+
return /* @__PURE__ */ n(Dn, { size: e });
|
|
481
479
|
}
|
|
482
480
|
function si(e, t) {
|
|
483
|
-
const r = e?.Icon ??
|
|
481
|
+
const r = e?.Icon ?? Dn;
|
|
484
482
|
return /* @__PURE__ */ n(r, { size: t });
|
|
485
483
|
}
|
|
486
484
|
function De(e, t = "small", r = {}) {
|
|
487
485
|
if (Qe(e))
|
|
488
|
-
return /* @__PURE__ */ n(
|
|
486
|
+
return /* @__PURE__ */ n(Qa, { size: t });
|
|
489
487
|
{
|
|
490
488
|
const i = Qr(e, r);
|
|
491
489
|
return si(i, t);
|
|
@@ -505,14 +503,14 @@ function wt(e, t) {
|
|
|
505
503
|
}
|
|
506
504
|
}
|
|
507
505
|
}
|
|
508
|
-
function
|
|
506
|
+
function mo(e, t) {
|
|
509
507
|
if (typeof e == "object") {
|
|
510
508
|
if (t in e)
|
|
511
509
|
return e[t];
|
|
512
510
|
if (t.includes(".")) {
|
|
513
511
|
const r = t.split("."), i = e[r[0]];
|
|
514
512
|
if (i.dataType === "map" && i.properties)
|
|
515
|
-
return
|
|
513
|
+
return mo(i.properties, r.slice(1).join("."));
|
|
516
514
|
}
|
|
517
515
|
}
|
|
518
516
|
}
|
|
@@ -520,8 +518,7 @@ function em(e) {
|
|
|
520
518
|
return e.replace(/\.([^.]*)/g, "[$1]");
|
|
521
519
|
}
|
|
522
520
|
function qs(e, t) {
|
|
523
|
-
if (!t)
|
|
524
|
-
return e;
|
|
521
|
+
if (!t) return e;
|
|
525
522
|
const r = {};
|
|
526
523
|
return t.filter(Boolean).forEach((i) => {
|
|
527
524
|
const a = wt(e, i);
|
|
@@ -547,7 +544,7 @@ function Ir(e, t, r, i) {
|
|
|
547
544
|
if (typeof a == "object")
|
|
548
545
|
return a;
|
|
549
546
|
if (typeof a == "function") {
|
|
550
|
-
const o =
|
|
547
|
+
const o = uo(r);
|
|
551
548
|
return a({
|
|
552
549
|
entity: i,
|
|
553
550
|
path: r,
|
|
@@ -559,7 +556,7 @@ function Ir(e, t, r, i) {
|
|
|
559
556
|
}
|
|
560
557
|
throw console.error("Permissions:", a), Error("New type of permission added and not mapped");
|
|
561
558
|
}
|
|
562
|
-
function
|
|
559
|
+
function po(e, t, r, i) {
|
|
563
560
|
return Ir(e, t, r, i)?.edit ?? Sr.edit;
|
|
564
561
|
}
|
|
565
562
|
function $t(e, t, r, i) {
|
|
@@ -2421,7 +2418,7 @@ const li = {
|
|
|
2421
2418
|
zoom_in_map: "arrows destination location maps move place stop",
|
|
2422
2419
|
zoom_out: "find glass look magnifier magnifying minus negative scale search see size smaller",
|
|
2423
2420
|
zoom_out_map: "arrows destination location maps move place stop"
|
|
2424
|
-
}, Pi = new
|
|
2421
|
+
}, Pi = new Xn.Search("key");
|
|
2425
2422
|
Pi.addIndex("synonyms");
|
|
2426
2423
|
Pi.addDocuments(hi.map((e) => ({
|
|
2427
2424
|
key: e,
|
|
@@ -2440,8 +2437,7 @@ function Js(e, t) {
|
|
|
2440
2437
|
}
|
|
2441
2438
|
const ci = S.memo(
|
|
2442
2439
|
function({ collectionOrView: t, className: r }) {
|
|
2443
|
-
if (!t)
|
|
2444
|
-
return /* @__PURE__ */ n(O, {});
|
|
2440
|
+
if (!t) return /* @__PURE__ */ n(O, {});
|
|
2445
2441
|
const i = Js(t.icon, r);
|
|
2446
2442
|
if (t?.icon && i)
|
|
2447
2443
|
return i;
|
|
@@ -2614,7 +2610,7 @@ function Hs(e, t, r, i = 3) {
|
|
|
2614
2610
|
return l && !Qe(l) && !$s(l, t);
|
|
2615
2611
|
}).slice(0, i));
|
|
2616
2612
|
}
|
|
2617
|
-
function
|
|
2613
|
+
function fo(e, t) {
|
|
2618
2614
|
if (e.titleProperty)
|
|
2619
2615
|
return e.titleProperty;
|
|
2620
2616
|
for (const r in e.properties) {
|
|
@@ -2630,12 +2626,12 @@ function Zs(e) {
|
|
|
2630
2626
|
return t;
|
|
2631
2627
|
}
|
|
2632
2628
|
}
|
|
2633
|
-
function
|
|
2629
|
+
function ln(e, t = "") {
|
|
2634
2630
|
return e && Object.keys(e).reduce((r, i) => {
|
|
2635
2631
|
const a = t ? `${t}.${i}` : i;
|
|
2636
2632
|
return typeof e[i] == "object" && e[i] !== null ? Array.isArray(e[i]) ? e[i].forEach((o, s) => {
|
|
2637
|
-
Object.assign(r,
|
|
2638
|
-
}) : Object.assign(r,
|
|
2633
|
+
Object.assign(r, ln(o, `${a}[${s}]`));
|
|
2634
|
+
}) : Object.assign(r, ln(e[i], a)) : r[a] = e[i], r;
|
|
2639
2635
|
}, {});
|
|
2640
2636
|
}
|
|
2641
2637
|
function Xs(e) {
|
|
@@ -2690,13 +2686,13 @@ function rl(e, t, r = [], i) {
|
|
|
2690
2686
|
), o = { ...e.properties };
|
|
2691
2687
|
Object.keys(t.properties).forEach((m) => {
|
|
2692
2688
|
const p = e.properties[m];
|
|
2693
|
-
p ? o[m] =
|
|
2689
|
+
p ? o[m] = ho(p, t.properties[m]) : o[m] = t.properties[m];
|
|
2694
2690
|
});
|
|
2695
|
-
const s = He(e, t), l =
|
|
2691
|
+
const s = He(e, t), l = cn(e), c = cn(t), d = [.../* @__PURE__ */ new Set([...c, ...l])], u = [.../* @__PURE__ */ new Set([...e.entityViews ?? [], ...t.entityViews ?? []])];
|
|
2696
2692
|
let f = {
|
|
2697
2693
|
...s,
|
|
2698
2694
|
subcollections: a,
|
|
2699
|
-
properties:
|
|
2695
|
+
properties: lo(o, d),
|
|
2700
2696
|
propertiesOrder: d,
|
|
2701
2697
|
entityViews: u
|
|
2702
2698
|
};
|
|
@@ -2709,7 +2705,7 @@ function rl(e, t, r = [], i) {
|
|
|
2709
2705
|
}
|
|
2710
2706
|
return f;
|
|
2711
2707
|
}
|
|
2712
|
-
function
|
|
2708
|
+
function ho(e, t) {
|
|
2713
2709
|
if (Qe(t))
|
|
2714
2710
|
return t;
|
|
2715
2711
|
if (Qe(e))
|
|
@@ -2720,7 +2716,7 @@ function fo(e, t) {
|
|
|
2720
2716
|
const o = "properties" in e ? e.properties : {}, s = "properties" in t ? t.properties : {}, l = "propertiesOrder" in e && e.propertiesOrder ? e.propertiesOrder : Object.keys(o), c = "propertiesOrder" in t && t.propertiesOrder ? t.propertiesOrder : "properties" in t ? Object.keys(t.properties) : [], d = [.../* @__PURE__ */ new Set([...l, ...c])], u = { ...o };
|
|
2721
2717
|
return Object.keys(t.properties).forEach((f) => {
|
|
2722
2718
|
const m = o[f];
|
|
2723
|
-
m && (u[f] =
|
|
2719
|
+
m && (u[f] = ho(m, s[f]));
|
|
2724
2720
|
}), {
|
|
2725
2721
|
...r,
|
|
2726
2722
|
editable: i && a,
|
|
@@ -2734,7 +2730,7 @@ function fo(e, t) {
|
|
|
2734
2730
|
};
|
|
2735
2731
|
}
|
|
2736
2732
|
}
|
|
2737
|
-
function
|
|
2733
|
+
function cn(e) {
|
|
2738
2734
|
if (e.propertiesOrder && e.propertiesOrder.length > 0) {
|
|
2739
2735
|
const t = e.propertiesOrder;
|
|
2740
2736
|
return e.additionalFields && e.additionalFields.forEach((r) => {
|
|
@@ -2773,28 +2769,28 @@ function um(e) {
|
|
|
2773
2769
|
function mm(e) {
|
|
2774
2770
|
return e;
|
|
2775
2771
|
}
|
|
2776
|
-
function
|
|
2772
|
+
function go(e, t, r = "", i = 0, a = 10) {
|
|
2777
2773
|
i > a || (e && t && typeof e == "object" && typeof t == "object" ? Object.keys(e).forEach((o) => {
|
|
2778
|
-
|
|
2774
|
+
go(e[o], t[o], r + "." + o, i + 1, a);
|
|
2779
2775
|
}) : e !== t && console.log("Changed props:", r));
|
|
2780
2776
|
}
|
|
2781
2777
|
function pm(e, t = 3) {
|
|
2782
2778
|
const r = ce(e);
|
|
2783
2779
|
M(() => {
|
|
2784
|
-
console.log("Changed props:"),
|
|
2780
|
+
console.log("Changed props:"), go(e, r.current, "", 0, t), r.current = e;
|
|
2785
2781
|
});
|
|
2786
2782
|
}
|
|
2787
|
-
const
|
|
2788
|
-
const t = $e(
|
|
2783
|
+
const Ao = S.createContext({}), tt = (e) => {
|
|
2784
|
+
const t = $e(Ao);
|
|
2789
2785
|
return e?.overrides?.dataSource ? e?.overrides.dataSource : t;
|
|
2790
|
-
},
|
|
2791
|
-
const t = $e(
|
|
2786
|
+
}, bo = S.createContext({}), _e = () => $e(bo), Nt = () => $e(eo), yo = S.createContext({}), Nr = () => $e(yo), wo = S.createContext({}), Ft = () => $e(wo), vo = S.createContext({}), tr = (e) => {
|
|
2787
|
+
const t = $e(vo);
|
|
2792
2788
|
return e?.overrides?.storageSource ? e.overrides.storageSource : t;
|
|
2793
2789
|
}, gt = () => {
|
|
2794
2790
|
const {
|
|
2795
2791
|
enqueueSnackbar: e,
|
|
2796
2792
|
closeSnackbar: t
|
|
2797
|
-
} =
|
|
2793
|
+
} = Fa(), r = x((a) => {
|
|
2798
2794
|
const {
|
|
2799
2795
|
type: o,
|
|
2800
2796
|
message: s,
|
|
@@ -2812,7 +2808,7 @@ const go = S.createContext({}), tt = (e) => {
|
|
|
2812
2808
|
open: r,
|
|
2813
2809
|
close: i
|
|
2814
2810
|
}), [r, i]);
|
|
2815
|
-
},
|
|
2811
|
+
}, ko = S.createContext(void 0), Pt = () => $e(ko), _o = S.createContext({}), il = ({ children: e }) => {
|
|
2816
2812
|
const [t, r] = P([]), i = ce(t), a = (l) => {
|
|
2817
2813
|
i.current = l, r(l);
|
|
2818
2814
|
}, o = x(() => {
|
|
@@ -2829,7 +2825,7 @@ const go = S.createContext({}), tt = (e) => {
|
|
|
2829
2825
|
}
|
|
2830
2826
|
};
|
|
2831
2827
|
}, [t]);
|
|
2832
|
-
return /* @__PURE__ */ v(
|
|
2828
|
+
return /* @__PURE__ */ v(_o.Provider, { value: {
|
|
2833
2829
|
open: s,
|
|
2834
2830
|
close: o
|
|
2835
2831
|
}, children: [
|
|
@@ -2843,7 +2839,7 @@ const go = S.createContext({}), tt = (e) => {
|
|
|
2843
2839
|
`dialog_${c}`
|
|
2844
2840
|
))
|
|
2845
2841
|
] });
|
|
2846
|
-
}, nl = () => $e(
|
|
2842
|
+
}, nl = () => $e(_o), xo = S.createContext({}), fe = () => $e(xo), Eo = S.createContext({}), Qt = () => $e(Eo), Re = () => {
|
|
2847
2843
|
const e = Nt(), t = Nr(), r = Ft(), i = _e(), a = tt(), o = tr(), s = gt(), l = Pt(), c = nl(), d = fe(), u = Qt(), f = S.useRef({
|
|
2848
2844
|
authController: e,
|
|
2849
2845
|
sideDialogsController: t,
|
|
@@ -2935,7 +2931,7 @@ function fm({
|
|
|
2935
2931
|
};
|
|
2936
2932
|
}
|
|
2937
2933
|
const Ur = {};
|
|
2938
|
-
function
|
|
2934
|
+
function Co({
|
|
2939
2935
|
path: e,
|
|
2940
2936
|
entityId: t,
|
|
2941
2937
|
collection: r,
|
|
@@ -2980,7 +2976,7 @@ function Eo({
|
|
|
2980
2976
|
dataLoadingError: m
|
|
2981
2977
|
};
|
|
2982
2978
|
}
|
|
2983
|
-
async function
|
|
2979
|
+
async function Bo({
|
|
2984
2980
|
collection: e,
|
|
2985
2981
|
path: t,
|
|
2986
2982
|
entityId: r,
|
|
@@ -3158,16 +3154,14 @@ function hm({
|
|
|
3158
3154
|
}).catch((d) => l(d)).finally(() => o(!1)));
|
|
3159
3155
|
}, [e, t]), t.navigation ? { data: r, dataLoading: a, dataLoadingError: s } : { dataLoading: !0 };
|
|
3160
3156
|
}
|
|
3161
|
-
const sl = () => $e(
|
|
3157
|
+
const sl = () => $e(Kn), ll = (e) => {
|
|
3162
3158
|
const { onSuccess: t, onError: r, disableClipboardAPI: i = !1, copiedDuration: a } = e || {}, o = ce(null), [s, l] = P(!1), [c, d] = P("");
|
|
3163
3159
|
M(() => {
|
|
3164
3160
|
a && setTimeout(() => l(!1), a);
|
|
3165
3161
|
}, [s]);
|
|
3166
3162
|
const u = () => navigator.clipboard !== void 0, f = x((w) => {
|
|
3167
|
-
if (r)
|
|
3168
|
-
|
|
3169
|
-
else
|
|
3170
|
-
throw new Error(w);
|
|
3163
|
+
if (r) r(w);
|
|
3164
|
+
else throw new Error(w);
|
|
3171
3165
|
}, [r]), m = x((w) => {
|
|
3172
3166
|
t && t(w), l(!0), d(w);
|
|
3173
3167
|
}, [t]), p = x((w) => {
|
|
@@ -3201,12 +3195,12 @@ const sl = () => $e(Xn), ll = (e) => {
|
|
|
3201
3195
|
"2xl": 1536,
|
|
3202
3196
|
"3xl": 1920
|
|
3203
3197
|
};
|
|
3204
|
-
let qt =
|
|
3198
|
+
let qt = So("lg");
|
|
3205
3199
|
const dr = [], dl = () => {
|
|
3206
3200
|
dr.forEach((e) => e(qt));
|
|
3207
3201
|
};
|
|
3208
3202
|
typeof window < "u" && window.addEventListener("resize", () => {
|
|
3209
|
-
const e =
|
|
3203
|
+
const e = So("lg");
|
|
3210
3204
|
e !== qt && (qt = e, dl());
|
|
3211
3205
|
});
|
|
3212
3206
|
const Ze = () => {
|
|
@@ -3221,7 +3215,7 @@ const Ze = () => {
|
|
|
3221
3215
|
};
|
|
3222
3216
|
}, []), e;
|
|
3223
3217
|
};
|
|
3224
|
-
function
|
|
3218
|
+
function So(e = "lg") {
|
|
3225
3219
|
return typeof window > "u" ? !1 : window.matchMedia(`(min-width: ${cl[e] + 1}px)`).matches;
|
|
3226
3220
|
}
|
|
3227
3221
|
function rr(e) {
|
|
@@ -3265,7 +3259,7 @@ function gm(e, t) {
|
|
|
3265
3259
|
}
|
|
3266
3260
|
}, [e, t]);
|
|
3267
3261
|
}
|
|
3268
|
-
function
|
|
3262
|
+
function Io(e) {
|
|
3269
3263
|
const {
|
|
3270
3264
|
path: t,
|
|
3271
3265
|
collections: r = [],
|
|
@@ -3277,11 +3271,11 @@ function So(e) {
|
|
|
3277
3271
|
const u = d.id ?? d.path, f = i && i.length > 0 ? i + "/" + u : u, m = Ee(Ee(t).replace(c, "")), p = m.length > 0 ? m.split("/") : [];
|
|
3278
3272
|
if (p.length > 0) {
|
|
3279
3273
|
const h = p[0], A = f + "/" + h;
|
|
3280
|
-
if (s.push(new
|
|
3274
|
+
if (s.push(new ro(h, f)), p.length > 1) {
|
|
3281
3275
|
const g = p.slice(1).join("/");
|
|
3282
3276
|
if (!d)
|
|
3283
3277
|
throw Error("collection not found resolving path: " + d);
|
|
3284
|
-
d.subcollections && s.push(...
|
|
3278
|
+
d.subcollections && s.push(...Io({
|
|
3285
3279
|
path: g,
|
|
3286
3280
|
collections: d.subcollections,
|
|
3287
3281
|
currentFullPath: A
|
|
@@ -3322,7 +3316,7 @@ function Am(e) {
|
|
|
3322
3316
|
path: I.id ?? I.path,
|
|
3323
3317
|
collection: I,
|
|
3324
3318
|
description: I.description?.trim(),
|
|
3325
|
-
group:
|
|
3319
|
+
group: un(I)
|
|
3326
3320
|
}).filter(Boolean),
|
|
3327
3321
|
...(ne ?? []).map((I) => I.hideFromNavigation ? void 0 : {
|
|
3328
3322
|
url: F(Array.isArray(I.path) ? I.path[0] : I.path),
|
|
@@ -3331,7 +3325,7 @@ function Am(e) {
|
|
|
3331
3325
|
path: I.path,
|
|
3332
3326
|
view: I,
|
|
3333
3327
|
description: I.description?.trim(),
|
|
3334
|
-
group:
|
|
3328
|
+
group: un(I)
|
|
3335
3329
|
}).filter(Boolean),
|
|
3336
3330
|
...(K ?? []).map((I) => I.hideFromNavigation ? void 0 : {
|
|
3337
3331
|
url: F(Array.isArray(I.path) ? I.path[0] : I.path),
|
|
@@ -3359,12 +3353,12 @@ function Am(e) {
|
|
|
3359
3353
|
const [T = [], ne, K = []] = await Promise.all(
|
|
3360
3354
|
[
|
|
3361
3355
|
fl(a, o, i, u, f),
|
|
3362
|
-
|
|
3363
|
-
|
|
3356
|
+
dn(s, i, u),
|
|
3357
|
+
dn(l, i, u)
|
|
3364
3358
|
]
|
|
3365
3359
|
);
|
|
3366
3360
|
let H = !1;
|
|
3367
|
-
|
|
3361
|
+
Fo(m.current ?? [], T) || (m.current = T, H = !0), J(p.current, ne) || (p.current = ne, H = !0), J(h.current, K) || (h.current = K, H = !0);
|
|
3368
3362
|
const j = $(T, ne, K, c);
|
|
3369
3363
|
H && !J(y, j) && w(j);
|
|
3370
3364
|
} catch (T) {
|
|
@@ -3440,10 +3434,10 @@ function Am(e) {
|
|
|
3440
3434
|
[]
|
|
3441
3435
|
), Ae = x((T) => {
|
|
3442
3436
|
const ne = m.current ?? [];
|
|
3443
|
-
return
|
|
3437
|
+
return to(T, ne);
|
|
3444
3438
|
}, []), ue = x((T) => {
|
|
3445
3439
|
const ne = m.current ?? [];
|
|
3446
|
-
return
|
|
3440
|
+
return Io({
|
|
3447
3441
|
path: T,
|
|
3448
3442
|
collections: ne
|
|
3449
3443
|
});
|
|
@@ -3497,10 +3491,10 @@ function bm(e, t) {
|
|
|
3497
3491
|
function nr(e) {
|
|
3498
3492
|
return encodeURIComponent(Ee(e)).replaceAll("%2F", "/").replaceAll("%23", "#");
|
|
3499
3493
|
}
|
|
3500
|
-
function
|
|
3494
|
+
function No(e, t) {
|
|
3501
3495
|
return e.filter((r) => r.permissions ? Ir(r, t, r.path, null)?.read !== !1 : !0).map((r) => r.subcollections ? {
|
|
3502
3496
|
...r,
|
|
3503
|
-
subcollections:
|
|
3497
|
+
subcollections: No(r.subcollections, t)
|
|
3504
3498
|
} : r);
|
|
3505
3499
|
}
|
|
3506
3500
|
async function fl(e, t, r, i, a) {
|
|
@@ -3509,9 +3503,9 @@ async function fl(e, t, r, i, a) {
|
|
|
3509
3503
|
user: r.user,
|
|
3510
3504
|
authController: r,
|
|
3511
3505
|
dataSource: i
|
|
3512
|
-
}) : Array.isArray(e) && (o = e), a && (o = a(o ?? [])), o = zs(o, t), o =
|
|
3506
|
+
}) : Array.isArray(e) && (o = e), a && (o = a(o ?? [])), o = zs(o, t), o = No(o, r), o;
|
|
3513
3507
|
}
|
|
3514
|
-
async function
|
|
3508
|
+
async function dn(e, t, r) {
|
|
3515
3509
|
let i = [];
|
|
3516
3510
|
return typeof e == "function" ? i = await e({
|
|
3517
3511
|
user: t.user,
|
|
@@ -3519,11 +3513,11 @@ async function cn(e, t, r) {
|
|
|
3519
3513
|
dataSource: r
|
|
3520
3514
|
}) : Array.isArray(e) && (i = e), i;
|
|
3521
3515
|
}
|
|
3522
|
-
function
|
|
3516
|
+
function un(e) {
|
|
3523
3517
|
const t = e.group?.trim();
|
|
3524
3518
|
return !t || t === "" ? "Views" : t ?? "Views";
|
|
3525
3519
|
}
|
|
3526
|
-
function
|
|
3520
|
+
function Fo(e, t) {
|
|
3527
3521
|
if (e.length !== t.length)
|
|
3528
3522
|
return !1;
|
|
3529
3523
|
const r = [...e], i = [...t], a = r.sort((s, l) => s.id.localeCompare(l.id)), o = i.sort((s, l) => s.id.localeCompare(l.id));
|
|
@@ -3537,17 +3531,17 @@ function hl(e, t) {
|
|
|
3537
3531
|
subcollections: a,
|
|
3538
3532
|
...o
|
|
3539
3533
|
} = t;
|
|
3540
|
-
return
|
|
3534
|
+
return Fo(r ?? [], a ?? []) ? J(i, o) : !1;
|
|
3541
3535
|
}
|
|
3542
3536
|
function ym() {
|
|
3543
3537
|
const e = ce({}), t = x((p) => {
|
|
3544
3538
|
const h = localStorage.getItem(p);
|
|
3545
3539
|
return h ? JSON.parse(h) : {};
|
|
3546
3540
|
}, []), r = x((p) => {
|
|
3547
|
-
const h = `collection_config::${
|
|
3541
|
+
const h = `collection_config::${sn(p)}`;
|
|
3548
3542
|
return e.current[h] ? e.current[h] : t(h);
|
|
3549
3543
|
}, [t]), i = x((p, h) => {
|
|
3550
|
-
const A = `collection_config::${
|
|
3544
|
+
const A = `collection_config::${sn(p)}`;
|
|
3551
3545
|
localStorage.setItem(A, JSON.stringify(h));
|
|
3552
3546
|
const g = e.current[A], y = He(g ?? t(p), h);
|
|
3553
3547
|
e.current[A] = He(e.current[A], y);
|
|
@@ -3808,7 +3802,7 @@ function Ar({
|
|
|
3808
3802
|
height: Et(r)
|
|
3809
3803
|
},
|
|
3810
3804
|
children: [
|
|
3811
|
-
/* @__PURE__ */ n(
|
|
3805
|
+
/* @__PURE__ */ n(Da, { className: "flex-grow" }),
|
|
3812
3806
|
i && /* @__PURE__ */ n(ke, { title: i, children: /* @__PURE__ */ n(
|
|
3813
3807
|
Y,
|
|
3814
3808
|
{
|
|
@@ -3844,15 +3838,14 @@ function Ct({
|
|
|
3844
3838
|
let r;
|
|
3845
3839
|
if (e.dataType === "string") {
|
|
3846
3840
|
const i = e;
|
|
3847
|
-
i.url ? r = El(i, t) : i.storage ? r =
|
|
3841
|
+
i.url ? r = El(i, t) : i.storage ? r = Po(t) : r = ct();
|
|
3848
3842
|
} else if (e.dataType === "array") {
|
|
3849
3843
|
const i = e;
|
|
3850
3844
|
i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ v(O, { children: [
|
|
3851
3845
|
i.of.map((a, o) => $r(a, o)),
|
|
3852
3846
|
" "
|
|
3853
3847
|
] }) : i.of.dataType === "map" && i.of.properties ? r = vl(i.of.properties, t, i.of.previewProperties) : i.of.dataType === "string" ? i.of.enumValues ? r = _l() : i.of.storage ? r = $r(i.of) : r = kl() : r = $r(i.of));
|
|
3854
|
-
} else
|
|
3855
|
-
e.dataType === "map" ? r = wl(e, t) : e.dataType === "date" ? r = ct() : e.dataType === "reference" ? r = xl() : (e.dataType, r = ct());
|
|
3848
|
+
} else e.dataType === "map" ? r = wl(e, t) : e.dataType === "date" ? r = ct() : e.dataType === "reference" ? r = xl() : (e.dataType, r = ct());
|
|
3856
3849
|
return r || null;
|
|
3857
3850
|
}
|
|
3858
3851
|
function wl(e, t) {
|
|
@@ -3949,7 +3942,7 @@ function $r(e, t = 0) {
|
|
|
3949
3942
|
"array_index_" + t
|
|
3950
3943
|
);
|
|
3951
3944
|
}
|
|
3952
|
-
function
|
|
3945
|
+
function Po(e) {
|
|
3953
3946
|
const t = e === "tiny" ? 40 : e === "small" ? 100 : 200;
|
|
3954
3947
|
return /* @__PURE__ */ n(
|
|
3955
3948
|
Ue,
|
|
@@ -3966,7 +3959,7 @@ function El(e, t = "medium") {
|
|
|
3966
3959
|
return typeof e.url == "boolean" ? /* @__PURE__ */ v("div", { style: {
|
|
3967
3960
|
display: "flex"
|
|
3968
3961
|
}, children: [
|
|
3969
|
-
|
|
3962
|
+
Qo(),
|
|
3970
3963
|
ct()
|
|
3971
3964
|
] }) : Cl(t);
|
|
3972
3965
|
}
|
|
@@ -3975,7 +3968,7 @@ function Cl(e) {
|
|
|
3975
3968
|
"div",
|
|
3976
3969
|
{
|
|
3977
3970
|
className: `w-${Et(e)} h-${Et(e)}`,
|
|
3978
|
-
children:
|
|
3971
|
+
children: Qo()
|
|
3979
3972
|
}
|
|
3980
3973
|
);
|
|
3981
3974
|
}
|
|
@@ -3990,31 +3983,30 @@ function km(e) {
|
|
|
3990
3983
|
}
|
|
3991
3984
|
);
|
|
3992
3985
|
}
|
|
3993
|
-
function
|
|
3986
|
+
function Qo() {
|
|
3994
3987
|
return /* @__PURE__ */ n(Ue, { width: 24, height: 24 });
|
|
3995
3988
|
}
|
|
3996
3989
|
const Bl = S.memo(Il, Sl);
|
|
3997
3990
|
function Sl(e, t) {
|
|
3998
3991
|
return e.size === t.size && e.storagePathOrDownloadUrl === t.storagePathOrDownloadUrl && e.storeUrl === t.storeUrl;
|
|
3999
3992
|
}
|
|
4000
|
-
const
|
|
3993
|
+
const mn = {};
|
|
4001
3994
|
function Il({
|
|
4002
3995
|
storeUrl: e,
|
|
4003
3996
|
storagePathOrDownloadUrl: t,
|
|
4004
3997
|
size: r
|
|
4005
3998
|
}) {
|
|
4006
|
-
const [i, a] = S.useState(void 0), o = tr(), [s, l] = S.useState(
|
|
3999
|
+
const [i, a] = S.useState(void 0), o = tr(), [s, l] = S.useState(mn[t]);
|
|
4007
4000
|
if (M(() => {
|
|
4008
4001
|
if (!t)
|
|
4009
4002
|
return;
|
|
4010
4003
|
let u = !1;
|
|
4011
4004
|
return o.getDownloadURL(t).then(function(f) {
|
|
4012
|
-
u || (l(f),
|
|
4005
|
+
u || (l(f), mn[t] = f);
|
|
4013
4006
|
}).catch(a), () => {
|
|
4014
4007
|
u = !0;
|
|
4015
4008
|
};
|
|
4016
|
-
}, [t]), !t)
|
|
4017
|
-
return null;
|
|
4009
|
+
}, [t]), !t) return null;
|
|
4018
4010
|
const c = s?.metadata ? Nl(s?.metadata.contentType) : void 0, d = c?.startsWith("image") ? "image" : c?.startsWith("video") ? "video" : c?.startsWith("audio") ? "audio" : "file";
|
|
4019
4011
|
return s?.fileNotFound ? /* @__PURE__ */ n(Ne, { error: "File not found" }) : s?.url ? /* @__PURE__ */ n(
|
|
4020
4012
|
Ar,
|
|
@@ -4024,7 +4016,7 @@ function Il({
|
|
|
4024
4016
|
size: r,
|
|
4025
4017
|
hint: t
|
|
4026
4018
|
}
|
|
4027
|
-
) :
|
|
4019
|
+
) : Po(r);
|
|
4028
4020
|
}
|
|
4029
4021
|
function Nl(e) {
|
|
4030
4022
|
return e.startsWith("image") ? "image/*" : e.startsWith("video") ? "video/*" : e.startsWith("audio") ? "audio/*" : e.startsWith("application") ? "application/*" : e.startsWith("text") ? "text/*" : e.startsWith("font") ? "font/*" : e;
|
|
@@ -4036,8 +4028,7 @@ function je({
|
|
|
4036
4028
|
className: i,
|
|
4037
4029
|
children: a
|
|
4038
4030
|
}) {
|
|
4039
|
-
if (!e)
|
|
4040
|
-
return null;
|
|
4031
|
+
if (!e) return null;
|
|
4041
4032
|
const o = ht(e), s = t !== void 0 ? Ii(o, t) : void 0, l = Ms(s), c = Os(o, t);
|
|
4042
4033
|
return /* @__PURE__ */ v(
|
|
4043
4034
|
Ai,
|
|
@@ -4054,14 +4045,14 @@ function je({
|
|
|
4054
4045
|
}
|
|
4055
4046
|
);
|
|
4056
4047
|
}
|
|
4057
|
-
function
|
|
4048
|
+
function Do({
|
|
4058
4049
|
propertyKey: e,
|
|
4059
4050
|
value: t,
|
|
4060
4051
|
property: r,
|
|
4061
4052
|
size: i
|
|
4062
4053
|
}) {
|
|
4063
4054
|
if (r.enumValues) {
|
|
4064
|
-
const a = t, o =
|
|
4055
|
+
const a = t, o = ua(r);
|
|
4065
4056
|
return /* @__PURE__ */ n(
|
|
4066
4057
|
je,
|
|
4067
4058
|
{
|
|
@@ -4071,7 +4062,7 @@ function Qo({
|
|
|
4071
4062
|
}
|
|
4072
4063
|
);
|
|
4073
4064
|
} else if (r.previewAsTag) {
|
|
4074
|
-
const a =
|
|
4065
|
+
const a = Pn(e ?? "");
|
|
4075
4066
|
return /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
|
|
4076
4067
|
Ai,
|
|
4077
4068
|
{
|
|
@@ -4091,8 +4082,7 @@ function Qo({
|
|
|
4091
4082
|
}
|
|
4092
4083
|
);
|
|
4093
4084
|
{
|
|
4094
|
-
if (!t)
|
|
4095
|
-
return /* @__PURE__ */ n(O, {});
|
|
4085
|
+
if (!t) return /* @__PURE__ */ n(O, {});
|
|
4096
4086
|
const a = t.split(`
|
|
4097
4087
|
`);
|
|
4098
4088
|
return t && t.includes(`
|
|
@@ -4103,7 +4093,7 @@ function Qo({
|
|
|
4103
4093
|
}
|
|
4104
4094
|
}
|
|
4105
4095
|
}
|
|
4106
|
-
function
|
|
4096
|
+
function pn({
|
|
4107
4097
|
propertyKey: e,
|
|
4108
4098
|
value: t,
|
|
4109
4099
|
property: r,
|
|
@@ -4120,8 +4110,7 @@ function mn({
|
|
|
4120
4110
|
if (o.dataType !== "array")
|
|
4121
4111
|
throw Error("Picked wrong preview component ArrayPreview");
|
|
4122
4112
|
const s = t;
|
|
4123
|
-
if (!s)
|
|
4124
|
-
return null;
|
|
4113
|
+
if (!s) return null;
|
|
4125
4114
|
const l = i === "medium" ? "small" : "tiny";
|
|
4126
4115
|
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: s && s.map(
|
|
4127
4116
|
(c, d) => {
|
|
@@ -4167,7 +4156,7 @@ function Fl({
|
|
|
4167
4156
|
}), [h]), g = he(
|
|
4168
4157
|
() => Hs(A, m.propertyConfigs, a, s === "small" || s === "medium" ? 3 : 1),
|
|
4169
4158
|
[a, A, s]
|
|
4170
|
-
), y =
|
|
4159
|
+
), y = fo(A, m.propertyConfigs), w = Zs(A), b = w ? A.properties[w] : void 0, _ = g.filter((k) => k !== y && k !== w);
|
|
4171
4160
|
return /* @__PURE__ */ v(
|
|
4172
4161
|
vt,
|
|
4173
4162
|
{
|
|
@@ -4266,7 +4255,7 @@ function Fl({
|
|
|
4266
4255
|
}
|
|
4267
4256
|
);
|
|
4268
4257
|
}
|
|
4269
|
-
const
|
|
4258
|
+
const Ro = kt.forwardRef(({
|
|
4270
4259
|
children: e,
|
|
4271
4260
|
hover: t,
|
|
4272
4261
|
onClick: r,
|
|
@@ -4302,8 +4291,8 @@ const Do = kt.forwardRef(({
|
|
|
4302
4291
|
children: e
|
|
4303
4292
|
}
|
|
4304
4293
|
));
|
|
4305
|
-
|
|
4306
|
-
const vt = kt.memo(
|
|
4294
|
+
Ro.displayName = "EntityPreviewContainer";
|
|
4295
|
+
const vt = kt.memo(Ro), et = kt.memo(function(t) {
|
|
4307
4296
|
const r = t.reference;
|
|
4308
4297
|
return typeof r == "object" && "isEntityReference" in r && r.isEntityReference() ? /* @__PURE__ */ n(Ql, { ...t }) : (console.warn("Reference preview received value of type", typeof r), /* @__PURE__ */ n(
|
|
4309
4298
|
vt,
|
|
@@ -4369,14 +4358,14 @@ function Dl({
|
|
|
4369
4358
|
entity: d,
|
|
4370
4359
|
dataLoading: u,
|
|
4371
4360
|
dataLoadingError: f
|
|
4372
|
-
} =
|
|
4361
|
+
} = Co({
|
|
4373
4362
|
path: e.path,
|
|
4374
4363
|
entityId: e.id,
|
|
4375
4364
|
collection: t,
|
|
4376
4365
|
useCache: !0
|
|
4377
4366
|
});
|
|
4378
|
-
d &&
|
|
4379
|
-
const m = d ??
|
|
4367
|
+
d && fn.set(e.pathWithId, d);
|
|
4368
|
+
const m = d ?? fn.get(e.pathWithId);
|
|
4380
4369
|
let p;
|
|
4381
4370
|
return e ? m && !m.values && (p = /* @__PURE__ */ n(
|
|
4382
4371
|
Ne,
|
|
@@ -4423,7 +4412,7 @@ function Dl({
|
|
|
4423
4412
|
}
|
|
4424
4413
|
);
|
|
4425
4414
|
}
|
|
4426
|
-
const
|
|
4415
|
+
const fn = /* @__PURE__ */ new Map();
|
|
4427
4416
|
function Rl({
|
|
4428
4417
|
propertyKey: e,
|
|
4429
4418
|
value: t,
|
|
@@ -4493,7 +4482,7 @@ function Tl({
|
|
|
4493
4482
|
) }, `preview_array_storage_${e}_${c}`)
|
|
4494
4483
|
) });
|
|
4495
4484
|
}
|
|
4496
|
-
function
|
|
4485
|
+
function To({
|
|
4497
4486
|
name: e,
|
|
4498
4487
|
value: t,
|
|
4499
4488
|
enumValues: r,
|
|
@@ -4516,7 +4505,7 @@ function Ro({
|
|
|
4516
4505
|
)
|
|
4517
4506
|
) });
|
|
4518
4507
|
}
|
|
4519
|
-
function
|
|
4508
|
+
function hn({
|
|
4520
4509
|
propertyKey: e,
|
|
4521
4510
|
value: t,
|
|
4522
4511
|
property: r,
|
|
@@ -4528,7 +4517,7 @@ function fn({
|
|
|
4528
4517
|
if (!a.enumValues)
|
|
4529
4518
|
throw Error("Picked wrong preview component ArrayEnumPreview");
|
|
4530
4519
|
return t ? /* @__PURE__ */ n(
|
|
4531
|
-
|
|
4520
|
+
To,
|
|
4532
4521
|
{
|
|
4533
4522
|
name: e,
|
|
4534
4523
|
value: t,
|
|
@@ -4558,7 +4547,7 @@ function Ol({
|
|
|
4558
4547
|
const s = o.of;
|
|
4559
4548
|
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: t && t.map(
|
|
4560
4549
|
(l, c) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
|
|
4561
|
-
|
|
4550
|
+
Do,
|
|
4562
4551
|
{
|
|
4563
4552
|
propertyKey: e,
|
|
4564
4553
|
property: s,
|
|
@@ -4585,8 +4574,7 @@ function Ml({
|
|
|
4585
4574
|
if (!o?.oneOf)
|
|
4586
4575
|
throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${e}`);
|
|
4587
4576
|
const s = t;
|
|
4588
|
-
if (!s)
|
|
4589
|
-
return null;
|
|
4577
|
+
if (!s) return null;
|
|
4590
4578
|
const l = i === "medium" ? "small" : "tiny", c = o.oneOf.typeField ?? Lt, d = o.oneOf.valueField ?? fr, u = o.oneOf.properties;
|
|
4591
4579
|
return /* @__PURE__ */ n("div", { className: "flex flex-col", children: s && s.map(
|
|
4592
4580
|
(f, m) => /* @__PURE__ */ n(
|
|
@@ -4617,9 +4605,8 @@ function zl({
|
|
|
4617
4605
|
throw Error("Picked wrong preview component MapPropertyPreview");
|
|
4618
4606
|
const a = r;
|
|
4619
4607
|
if (!a.properties || Object.keys(a.properties ?? {}).length === 0)
|
|
4620
|
-
return /* @__PURE__ */ n(
|
|
4621
|
-
if (!t)
|
|
4622
|
-
return null;
|
|
4608
|
+
return /* @__PURE__ */ n(Oo, { value: t });
|
|
4609
|
+
if (!t) return null;
|
|
4623
4610
|
const o = Object.keys(a.properties);
|
|
4624
4611
|
return i === "tiny" ? /* @__PURE__ */ n("div", { className: "w-full flex flex-col space-y-1 md:space-y-2", children: o.map((s, l) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
4625
4612
|
pe,
|
|
@@ -4701,7 +4688,7 @@ function zl({
|
|
|
4701
4688
|
}
|
|
4702
4689
|
);
|
|
4703
4690
|
}
|
|
4704
|
-
function
|
|
4691
|
+
function Oo({ value: e }) {
|
|
4705
4692
|
return typeof e != "object" ? null : e ? /* @__PURE__ */ n(
|
|
4706
4693
|
"div",
|
|
4707
4694
|
{
|
|
@@ -4742,7 +4729,7 @@ function To({ value: e }) {
|
|
|
4742
4729
|
]
|
|
4743
4730
|
}
|
|
4744
4731
|
),
|
|
4745
|
-
typeof r == "object" && /* @__PURE__ */ n("div", { className: U(Se, "border-l pl-4"), children: /* @__PURE__ */ n(
|
|
4732
|
+
typeof r == "object" && /* @__PURE__ */ n("div", { className: U(Se, "border-l pl-4"), children: /* @__PURE__ */ n(Oo, { value: r }) })
|
|
4746
4733
|
]
|
|
4747
4734
|
},
|
|
4748
4735
|
`map_preview_table_${t}}`
|
|
@@ -4753,7 +4740,7 @@ function To({ value: e }) {
|
|
|
4753
4740
|
function Vl({
|
|
4754
4741
|
date: e
|
|
4755
4742
|
}) {
|
|
4756
|
-
const t = fe(), r = t?.locale ?
|
|
4743
|
+
const t = fe(), r = t?.locale ? Bs[t?.locale] : void 0, i = t?.dateTimeFormat ?? js, a = e ? Cs(e, i, { locale: r }) : "";
|
|
4757
4744
|
return /* @__PURE__ */ n(O, { children: a });
|
|
4758
4745
|
}
|
|
4759
4746
|
function Gl({
|
|
@@ -4817,7 +4804,7 @@ const Fe = S.memo(function(t) {
|
|
|
4817
4804
|
if (s === void 0 || u === null)
|
|
4818
4805
|
i = /* @__PURE__ */ n(yt, {});
|
|
4819
4806
|
else if (u.Preview)
|
|
4820
|
-
i =
|
|
4807
|
+
i = Ea(
|
|
4821
4808
|
u.Preview,
|
|
4822
4809
|
{
|
|
4823
4810
|
propertyKey: o,
|
|
@@ -4855,7 +4842,7 @@ const Fe = S.memo(function(t) {
|
|
|
4855
4842
|
storagePathOrDownloadUrl: s
|
|
4856
4843
|
}
|
|
4857
4844
|
) : f.markdown ? i = /* @__PURE__ */ n(yi, { source: s, size: "small" }) : i = /* @__PURE__ */ n(
|
|
4858
|
-
|
|
4845
|
+
Do,
|
|
4859
4846
|
{
|
|
4860
4847
|
...t,
|
|
4861
4848
|
property: f,
|
|
@@ -4868,7 +4855,7 @@ const Fe = S.memo(function(t) {
|
|
|
4868
4855
|
if (!f.of && !f.oneOf)
|
|
4869
4856
|
throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${o}`);
|
|
4870
4857
|
f.of ? Array.isArray(f.of) ? i = /* @__PURE__ */ n(
|
|
4871
|
-
|
|
4858
|
+
pn,
|
|
4872
4859
|
{
|
|
4873
4860
|
...t,
|
|
4874
4861
|
value: s,
|
|
@@ -4882,7 +4869,7 @@ const Fe = S.memo(function(t) {
|
|
|
4882
4869
|
property: u
|
|
4883
4870
|
}
|
|
4884
4871
|
) : f.of.dataType === "string" ? f.of.enumValues ? i = /* @__PURE__ */ n(
|
|
4885
|
-
|
|
4872
|
+
hn,
|
|
4886
4873
|
{
|
|
4887
4874
|
...t,
|
|
4888
4875
|
value: s,
|
|
@@ -4903,14 +4890,14 @@ const Fe = S.memo(function(t) {
|
|
|
4903
4890
|
property: u
|
|
4904
4891
|
}
|
|
4905
4892
|
) : f.of.dataType === "number" && f.of.enumValues ? i = /* @__PURE__ */ n(
|
|
4906
|
-
|
|
4893
|
+
hn,
|
|
4907
4894
|
{
|
|
4908
4895
|
...t,
|
|
4909
4896
|
value: s,
|
|
4910
4897
|
property: u
|
|
4911
4898
|
}
|
|
4912
4899
|
) : i = /* @__PURE__ */ n(
|
|
4913
|
-
|
|
4900
|
+
pn,
|
|
4914
4901
|
{
|
|
4915
4902
|
...t,
|
|
4916
4903
|
value: s,
|
|
@@ -4926,31 +4913,30 @@ const Fe = S.memo(function(t) {
|
|
|
4926
4913
|
));
|
|
4927
4914
|
} else
|
|
4928
4915
|
i = mt(o, u.dataType, s);
|
|
4929
|
-
else
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
) : i = mt(o, u.dataType, s) : i = JSON.stringify(s);
|
|
4916
|
+
else u.dataType === "map" ? typeof s == "object" ? i = /* @__PURE__ */ n(
|
|
4917
|
+
zl,
|
|
4918
|
+
{
|
|
4919
|
+
...t,
|
|
4920
|
+
property: u
|
|
4921
|
+
}
|
|
4922
|
+
) : i = mt(o, u.dataType, s) : u.dataType === "date" ? s instanceof Date ? i = /* @__PURE__ */ n(Vl, { date: s }) : i = mt(o, u.dataType, s) : u.dataType === "reference" ? typeof u.path == "string" ? typeof s == "object" && "isEntityReference" in s && s.isEntityReference() ? i = /* @__PURE__ */ n(
|
|
4923
|
+
et,
|
|
4924
|
+
{
|
|
4925
|
+
disabled: !u.path,
|
|
4926
|
+
previewProperties: u.previewProperties,
|
|
4927
|
+
includeId: u.includeId,
|
|
4928
|
+
includeEntityLink: u.includeEntityLink,
|
|
4929
|
+
size: t.size,
|
|
4930
|
+
reference: s
|
|
4931
|
+
}
|
|
4932
|
+
) : i = mt(o, u.dataType, s) : i = /* @__PURE__ */ n(yt, {}) : u.dataType === "boolean" ? typeof s == "boolean" ? i = /* @__PURE__ */ n(Gl, { value: s, size: l, property: u }) : i = mt(o, u.dataType, s) : u.dataType === "number" ? typeof s == "number" ? i = /* @__PURE__ */ n(
|
|
4933
|
+
jl,
|
|
4934
|
+
{
|
|
4935
|
+
...t,
|
|
4936
|
+
value: s,
|
|
4937
|
+
property: u
|
|
4938
|
+
}
|
|
4939
|
+
) : i = mt(o, u.dataType, s) : i = JSON.stringify(s);
|
|
4954
4940
|
return i == null || Array.isArray(i) && i.length === 0 ? /* @__PURE__ */ n(yt, {}) : i;
|
|
4955
4941
|
}, J);
|
|
4956
4942
|
function mt(e, t, r) {
|
|
@@ -4982,8 +4968,7 @@ function _m({
|
|
|
4982
4968
|
if (!l)
|
|
4983
4969
|
throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);
|
|
4984
4970
|
const c = t, d = s.previewProperties;
|
|
4985
|
-
if (!c)
|
|
4986
|
-
return null;
|
|
4971
|
+
if (!c) return null;
|
|
4987
4972
|
let u = d;
|
|
4988
4973
|
return (!u || !u.length) && (u = Object.keys(l), i && (u = u.slice(0, 3))), /* @__PURE__ */ n("div", { className: "table-auto text-xs", children: /* @__PURE__ */ n("div", { children: c && c.map((f, m) => /* @__PURE__ */ n(
|
|
4989
4974
|
"div",
|
|
@@ -5028,7 +5013,7 @@ const xm = kt.memo(
|
|
|
5028
5013
|
}, [t]), r ? /* @__PURE__ */ n(Ue, {}) : /* @__PURE__ */ n(kt.Fragment, { children: a });
|
|
5029
5014
|
}
|
|
5030
5015
|
);
|
|
5031
|
-
function
|
|
5016
|
+
function Mo({
|
|
5032
5017
|
entity: e,
|
|
5033
5018
|
collection: t,
|
|
5034
5019
|
path: r,
|
|
@@ -5115,7 +5100,7 @@ function Yl(e) {
|
|
|
5115
5100
|
return Ni(c, f, !s, 2e3), M(() => {
|
|
5116
5101
|
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;
|
|
5117
5102
|
}, [s, t]), /* @__PURE__ */ n(
|
|
5118
|
-
|
|
5103
|
+
Ra,
|
|
5119
5104
|
{
|
|
5120
5105
|
ref: t,
|
|
5121
5106
|
style: {
|
|
@@ -5175,7 +5160,7 @@ function qr(e) {
|
|
|
5175
5160
|
else
|
|
5176
5161
|
throw Error("Missing mapping in TableSelect");
|
|
5177
5162
|
}, [d, c, u]), h = (A, g) => d && Array.isArray(A) ? /* @__PURE__ */ n(
|
|
5178
|
-
|
|
5163
|
+
To,
|
|
5179
5164
|
{
|
|
5180
5165
|
value: A,
|
|
5181
5166
|
name: t,
|
|
@@ -5193,7 +5178,7 @@ function qr(e) {
|
|
|
5193
5178
|
`${A}-${g}`
|
|
5194
5179
|
);
|
|
5195
5180
|
return d ? /* @__PURE__ */ n(
|
|
5196
|
-
|
|
5181
|
+
Rn,
|
|
5197
5182
|
{
|
|
5198
5183
|
inputRef: m,
|
|
5199
5184
|
containerClassName: "w-full h-full",
|
|
@@ -5206,7 +5191,7 @@ function qr(e) {
|
|
|
5206
5191
|
onMultiValueChange: p,
|
|
5207
5192
|
renderValue: h,
|
|
5208
5193
|
children: r?.map((A) => /* @__PURE__ */ n(
|
|
5209
|
-
|
|
5194
|
+
Tn,
|
|
5210
5195
|
{
|
|
5211
5196
|
value: String(A.id),
|
|
5212
5197
|
children: /* @__PURE__ */ n(
|
|
@@ -5309,7 +5294,7 @@ function Ul(e) {
|
|
|
5309
5294
|
return M(() => {
|
|
5310
5295
|
a.current && i && a.current.focus({ preventScroll: !0 });
|
|
5311
5296
|
}, [i, a]), /* @__PURE__ */ n(
|
|
5312
|
-
|
|
5297
|
+
Ta,
|
|
5313
5298
|
{
|
|
5314
5299
|
ref: a,
|
|
5315
5300
|
size: "small",
|
|
@@ -5354,7 +5339,7 @@ class pe extends S.Component {
|
|
|
5354
5339
|
render() {
|
|
5355
5340
|
return this.state.error ? /* @__PURE__ */ v("div", { className: "flex flex-col m-2", children: [
|
|
5356
5341
|
/* @__PURE__ */ v("div", { className: "flex items-center m-2", children: [
|
|
5357
|
-
/* @__PURE__ */ n(
|
|
5342
|
+
/* @__PURE__ */ n(Qn, { color: "error", size: "small" }),
|
|
5358
5343
|
/* @__PURE__ */ n("div", { className: "ml-4", children: "Error" })
|
|
5359
5344
|
] }),
|
|
5360
5345
|
/* @__PURE__ */ n(Y, { variant: "caption", children: this.state.error?.message ?? "See the error in the console" })
|
|
@@ -5380,7 +5365,7 @@ async function ql({
|
|
|
5380
5365
|
file: s,
|
|
5381
5366
|
storage: t,
|
|
5382
5367
|
propertyKey: l
|
|
5383
|
-
}), c || console.warn("Storage callback returned empty result. Using default name value")) : c =
|
|
5368
|
+
}), c || console.warn("Storage callback returned empty result. Using default name value")) : c = zo({
|
|
5384
5369
|
file: s,
|
|
5385
5370
|
input: e,
|
|
5386
5371
|
entityId: i,
|
|
@@ -5407,7 +5392,7 @@ function Wl({
|
|
|
5407
5392
|
file: s,
|
|
5408
5393
|
storage: t,
|
|
5409
5394
|
propertyKey: l
|
|
5410
|
-
}), c || console.warn("Storage callback returned empty result. Using default name value")) : c =
|
|
5395
|
+
}), c || console.warn("Storage callback returned empty result. Using default name value")) : c = zo({
|
|
5411
5396
|
file: s,
|
|
5412
5397
|
input: e,
|
|
5413
5398
|
entityId: i,
|
|
@@ -5415,7 +5400,7 @@ function Wl({
|
|
|
5415
5400
|
path: a
|
|
5416
5401
|
}), c || (c = Ut() + "_" + s.name), c;
|
|
5417
5402
|
}
|
|
5418
|
-
function
|
|
5403
|
+
function zo({
|
|
5419
5404
|
file: e,
|
|
5420
5405
|
input: t,
|
|
5421
5406
|
entityId: r,
|
|
@@ -5431,7 +5416,7 @@ function Mo({
|
|
|
5431
5416
|
}
|
|
5432
5417
|
return s || (s = Ut() + "_" + e.name), s;
|
|
5433
5418
|
}
|
|
5434
|
-
function
|
|
5419
|
+
function Vo({
|
|
5435
5420
|
entityId: e,
|
|
5436
5421
|
entityValues: t,
|
|
5437
5422
|
path: r,
|
|
@@ -5488,7 +5473,7 @@ function zo({
|
|
|
5488
5473
|
return;
|
|
5489
5474
|
}
|
|
5490
5475
|
let F;
|
|
5491
|
-
B.storagePathOrDownloadUrl = D, B.metadata = Q, F = [...y], F =
|
|
5476
|
+
B.storagePathOrDownloadUrl = D, B.metadata = Q, F = [...y], F = gn(F), w(F);
|
|
5492
5477
|
const z = F.filter(($) => !!$.storagePathOrDownloadUrl).map(($) => $.storagePathOrDownloadUrl);
|
|
5493
5478
|
c(u ? z : z ? z[0] : null);
|
|
5494
5479
|
}, [y, u, c, d, s]), E = x(async (C) => {
|
|
@@ -5498,7 +5483,7 @@ function zo({
|
|
|
5498
5483
|
if (u)
|
|
5499
5484
|
B = [
|
|
5500
5485
|
...y,
|
|
5501
|
-
...await Promise.all(C.map(async (Q) => (p && ui(Q) && (Q = await
|
|
5486
|
+
...await Promise.all(C.map(async (Q) => (p && ui(Q) && (Q = await bn(Q, p)), {
|
|
5502
5487
|
id: Wr(),
|
|
5503
5488
|
file: Q,
|
|
5504
5489
|
fileName: await b(Q),
|
|
@@ -5508,7 +5493,7 @@ function zo({
|
|
|
5508
5493
|
];
|
|
5509
5494
|
else {
|
|
5510
5495
|
let Q = C[0];
|
|
5511
|
-
p && ui(Q) && (Q = await
|
|
5496
|
+
p && ui(Q) && (Q = await bn(Q, p)), B = [{
|
|
5512
5497
|
id: Wr(),
|
|
5513
5498
|
file: Q,
|
|
5514
5499
|
fileName: await b(Q),
|
|
@@ -5516,7 +5501,7 @@ function zo({
|
|
|
5516
5501
|
size: m
|
|
5517
5502
|
}];
|
|
5518
5503
|
}
|
|
5519
|
-
B =
|
|
5504
|
+
B = gn(B), w(B);
|
|
5520
5505
|
}, [l, b, y, f, u, m]);
|
|
5521
5506
|
return {
|
|
5522
5507
|
internalValue: y,
|
|
@@ -5529,7 +5514,7 @@ function zo({
|
|
|
5529
5514
|
multipleFilesSupported: u
|
|
5530
5515
|
};
|
|
5531
5516
|
}
|
|
5532
|
-
function
|
|
5517
|
+
function gn(e) {
|
|
5533
5518
|
return e.filter(
|
|
5534
5519
|
(t, r) => (e.map((i) => i.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl) === r || !t.storagePathOrDownloadUrl) && (e.map((i) => i.file).indexOf(t.file) === r || !t.file)
|
|
5535
5520
|
);
|
|
@@ -5537,15 +5522,15 @@ function hn(e) {
|
|
|
5537
5522
|
function Wr() {
|
|
5538
5523
|
return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
|
|
5539
5524
|
}
|
|
5540
|
-
const
|
|
5525
|
+
const An = {
|
|
5541
5526
|
"image/jpeg": "JPEG",
|
|
5542
5527
|
"image/png": "PNG",
|
|
5543
5528
|
"image/webp": "WEBP"
|
|
5544
|
-
}, ui = (e) =>
|
|
5529
|
+
}, ui = (e) => An[e.type] ? An[e.type] : null, Jl = 100, bn = (e, t) => new Promise((r) => {
|
|
5545
5530
|
const i = t.quality === void 0 ? Jl : t.quality, a = i >= 0 && i <= 100 ? i : 100, o = ui(e);
|
|
5546
5531
|
if (!o)
|
|
5547
5532
|
throw Error("resizeAndCompressImage: Unsupported image format");
|
|
5548
|
-
|
|
5533
|
+
Ss.imageFileResizer(
|
|
5549
5534
|
e,
|
|
5550
5535
|
t.maxWidth || Number.MAX_VALUE,
|
|
5551
5536
|
t.maxHeight || Number.MAX_VALUE,
|
|
@@ -5556,7 +5541,7 @@ const gn = {
|
|
|
5556
5541
|
"file"
|
|
5557
5542
|
);
|
|
5558
5543
|
});
|
|
5559
|
-
function
|
|
5544
|
+
function Go({
|
|
5560
5545
|
storagePath: e,
|
|
5561
5546
|
entry: t,
|
|
5562
5547
|
metadata: r,
|
|
@@ -5598,7 +5583,7 @@ function Vo({
|
|
|
5598
5583
|
)
|
|
5599
5584
|
] });
|
|
5600
5585
|
}
|
|
5601
|
-
function
|
|
5586
|
+
function jo({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPopup: a, children: o }) {
|
|
5602
5587
|
const s = ce(null), l = x(() => {
|
|
5603
5588
|
if (a) {
|
|
5604
5589
|
const d = s && s?.current?.getBoundingClientRect();
|
|
@@ -5644,14 +5629,14 @@ function Go({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPop
|
|
|
5644
5629
|
}
|
|
5645
5630
|
),
|
|
5646
5631
|
e && /* @__PURE__ */ n(
|
|
5647
|
-
|
|
5632
|
+
so,
|
|
5648
5633
|
{
|
|
5649
5634
|
side: "left",
|
|
5650
5635
|
className: "flex items-center justify-center",
|
|
5651
5636
|
style: { width: 32, height: 32 },
|
|
5652
5637
|
title: e.message,
|
|
5653
5638
|
children: /* @__PURE__ */ n(
|
|
5654
|
-
|
|
5639
|
+
Oa,
|
|
5655
5640
|
{
|
|
5656
5641
|
size: "small",
|
|
5657
5642
|
color: "error"
|
|
@@ -5683,7 +5668,7 @@ function ec(e) {
|
|
|
5683
5668
|
onFileUploadComplete: y,
|
|
5684
5669
|
storagePathBuilder: w,
|
|
5685
5670
|
multipleFilesSupported: b
|
|
5686
|
-
} =
|
|
5671
|
+
} = Vo({
|
|
5687
5672
|
entityValues: c.values,
|
|
5688
5673
|
entityId: c.id,
|
|
5689
5674
|
path: d,
|
|
@@ -5754,7 +5739,7 @@ function tc({
|
|
|
5754
5739
|
isDragActive: D,
|
|
5755
5740
|
isDragAccept: F,
|
|
5756
5741
|
isDragReject: z
|
|
5757
|
-
} =
|
|
5742
|
+
} = Wn(
|
|
5758
5743
|
{
|
|
5759
5744
|
accept: p.acceptedFiles ? p.acceptedFiles.map((V) => ({ [V]: [] })).reduce((V, ae) => ({ ...V, ...ae }), {}) : void 0,
|
|
5760
5745
|
disabled: f,
|
|
@@ -5801,7 +5786,7 @@ function tc({
|
|
|
5801
5786
|
},
|
|
5802
5787
|
`storage_preview_${ae}`
|
|
5803
5788
|
) : V.file && (te = /* @__PURE__ */ n(
|
|
5804
|
-
|
|
5789
|
+
Go,
|
|
5805
5790
|
{
|
|
5806
5791
|
entry: V,
|
|
5807
5792
|
metadata: _,
|
|
@@ -5830,7 +5815,7 @@ function tc({
|
|
|
5830
5815
|
}
|
|
5831
5816
|
),
|
|
5832
5817
|
/* @__PURE__ */ n(
|
|
5833
|
-
|
|
5818
|
+
jo,
|
|
5834
5819
|
{
|
|
5835
5820
|
showError: q,
|
|
5836
5821
|
disabled: f,
|
|
@@ -5843,7 +5828,7 @@ function tc({
|
|
|
5843
5828
|
color: "inherit",
|
|
5844
5829
|
size: "small",
|
|
5845
5830
|
onClick: C,
|
|
5846
|
-
children: /* @__PURE__ */ n(
|
|
5831
|
+
children: /* @__PURE__ */ n(Ma, { size: "small", className: "text-gray-500" })
|
|
5847
5832
|
}
|
|
5848
5833
|
)
|
|
5849
5834
|
}
|
|
@@ -5874,7 +5859,7 @@ function rc({
|
|
|
5874
5859
|
}
|
|
5875
5860
|
);
|
|
5876
5861
|
}
|
|
5877
|
-
function
|
|
5862
|
+
function yn(e) {
|
|
5878
5863
|
const t = fe(), r = _e(), { path: i } = e, a = r.getCollection(i);
|
|
5879
5864
|
if (!a) {
|
|
5880
5865
|
if (t.components?.missingReference)
|
|
@@ -5979,7 +5964,7 @@ const ic = S.memo(
|
|
|
5979
5964
|
Oe.addMethod(Oe.array, "uniqueInArray", function(e = (r) => r, t) {
|
|
5980
5965
|
return this.test("uniqueInArray", t, (r) => !r || r.length === new Set(r.map(e)).size);
|
|
5981
5966
|
});
|
|
5982
|
-
function
|
|
5967
|
+
function Yo(e, t, r) {
|
|
5983
5968
|
const i = {};
|
|
5984
5969
|
return Object.entries(t).forEach(([a, o]) => {
|
|
5985
5970
|
i[a] = Wt({
|
|
@@ -6276,7 +6261,7 @@ const pc = ({
|
|
|
6276
6261
|
hideOverflow: A = !0,
|
|
6277
6262
|
showExpandIcon: g = !0
|
|
6278
6263
|
}) {
|
|
6279
|
-
const [y, w] =
|
|
6264
|
+
const [y, w] = qn(), b = ce(null), _ = he(() => Fr(i), [i]), [k, E] = P(!1), [C, B] = P(l), Q = !o && !!c;
|
|
6280
6265
|
M(() => {
|
|
6281
6266
|
l && B(!0);
|
|
6282
6267
|
const Ae = setTimeout(() => {
|
|
@@ -6314,8 +6299,7 @@ const pc = ({
|
|
|
6314
6299
|
F = "flex-start";
|
|
6315
6300
|
}
|
|
6316
6301
|
const z = x(() => {
|
|
6317
|
-
if (!p)
|
|
6318
|
-
return;
|
|
6302
|
+
if (!p) return;
|
|
6319
6303
|
const Ae = b && b?.current?.getBoundingClientRect();
|
|
6320
6304
|
o ? p(void 0) : !a && Ae && p(Ae);
|
|
6321
6305
|
}, [b, p, a, o]), $ = x((Ae) => {
|
|
@@ -6372,13 +6356,13 @@ const pc = ({
|
|
|
6372
6356
|
)
|
|
6373
6357
|
] }),
|
|
6374
6358
|
r,
|
|
6375
|
-
o && k && s && /* @__PURE__ */ n("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ n(ke, { title: s, children: /* @__PURE__ */ n(
|
|
6359
|
+
o && k && s && /* @__PURE__ */ n("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ n(ke, { title: s, children: /* @__PURE__ */ n(za, { size: "smallest", color: "disabled", className: "text-gray-500" }) }) })
|
|
6376
6360
|
]
|
|
6377
6361
|
}
|
|
6378
6362
|
);
|
|
6379
6363
|
},
|
|
6380
6364
|
(e, t) => e.error === t.error && e.value === t.value && e.disabled === t.disabled && e.saved === t.saved && e.allowScroll === t.allowScroll && e.align === t.align && e.size === t.size && e.disabledTooltip === t.disabledTooltip && e.width === t.width && e.showExpandIcon === t.showExpandIcon && e.removePadding === t.removePadding && e.fullHeight === t.fullHeight && e.selected === t.selected
|
|
6381
|
-
),
|
|
6365
|
+
), Lo = S.createContext({}), fc = () => $e(Lo);
|
|
6382
6366
|
function qe({
|
|
6383
6367
|
property: e,
|
|
6384
6368
|
value: t,
|
|
@@ -6608,7 +6592,7 @@ const gc = S.memo(
|
|
|
6608
6592
|
), H = !0, ne = !1, ee = !1;
|
|
6609
6593
|
else if (a.dataType === "reference")
|
|
6610
6594
|
typeof a.path == "string" && (se = /* @__PURE__ */ n(
|
|
6611
|
-
|
|
6595
|
+
yn,
|
|
6612
6596
|
{
|
|
6613
6597
|
name: t,
|
|
6614
6598
|
internalValue: b,
|
|
@@ -6643,7 +6627,7 @@ const gc = S.memo(
|
|
|
6643
6627
|
updateValue: te
|
|
6644
6628
|
}
|
|
6645
6629
|
), ee = !0, H = !0, ne = !1) : R.of.dataType === "reference" && (typeof R.of.path == "string" && (se = /* @__PURE__ */ n(
|
|
6646
|
-
|
|
6630
|
+
yn,
|
|
6647
6631
|
{
|
|
6648
6632
|
name: t,
|
|
6649
6633
|
disabled: q,
|
|
@@ -6690,7 +6674,7 @@ const gc = S.memo(
|
|
|
6690
6674
|
value: b,
|
|
6691
6675
|
hideOverflow: ne,
|
|
6692
6676
|
actions: j && /* @__PURE__ */ n(
|
|
6693
|
-
|
|
6677
|
+
jo,
|
|
6694
6678
|
{
|
|
6695
6679
|
showError: G,
|
|
6696
6680
|
disabled: q,
|
|
@@ -6772,7 +6756,7 @@ const Qi = function({
|
|
|
6772
6756
|
de,
|
|
6773
6757
|
{
|
|
6774
6758
|
size: A ? "medium" : "small",
|
|
6775
|
-
children: /* @__PURE__ */ n(
|
|
6759
|
+
children: /* @__PURE__ */ n(On, {})
|
|
6776
6760
|
}
|
|
6777
6761
|
),
|
|
6778
6762
|
children: k.map((C, B) => /* @__PURE__ */ v(
|
|
@@ -6887,25 +6871,24 @@ function bc({
|
|
|
6887
6871
|
function yc(e) {
|
|
6888
6872
|
return e.dataType === "boolean" ? "center" : e.dataType === "number" ? e.enumValues ? "left" : "right" : e.dataType === "date" ? "right" : "left";
|
|
6889
6873
|
}
|
|
6890
|
-
function
|
|
6874
|
+
function Uo(e) {
|
|
6891
6875
|
if (e.columnWidth)
|
|
6892
6876
|
return e.columnWidth;
|
|
6893
6877
|
if (e.dataType === "string")
|
|
6894
6878
|
return e.url ? 280 : e.storage ? 160 : e.enumValues ? 200 : e.multiline || e.markdown ? 300 : (e.email, 200);
|
|
6895
6879
|
if (e.dataType === "array") {
|
|
6896
6880
|
const t = e;
|
|
6897
|
-
return t.of ? Array.isArray(e.of) ? 300 :
|
|
6898
|
-
} else
|
|
6899
|
-
return e.dataType === "number" ? e.enumValues ? 200 : 140 : e.dataType === "map" ? 360 : e.dataType === "date" ? 200 : e.dataType === "reference" ? 220 : e.dataType === "boolean" ? 140 : 200;
|
|
6881
|
+
return t.of ? Array.isArray(e.of) ? 300 : Uo(t.of) : 300;
|
|
6882
|
+
} else return e.dataType === "number" ? e.enumValues ? 200 : 140 : e.dataType === "map" ? 360 : e.dataType === "date" ? 200 : e.dataType === "reference" ? 220 : e.dataType === "boolean" ? 140 : 200;
|
|
6900
6883
|
}
|
|
6901
6884
|
function Di(e) {
|
|
6902
6885
|
return `subcollection:${e.id ?? e.path}`;
|
|
6903
6886
|
}
|
|
6904
6887
|
const Ri = "collectionGroupParent";
|
|
6905
|
-
function
|
|
6888
|
+
function $o(e, t) {
|
|
6906
6889
|
return he(() => {
|
|
6907
6890
|
if (e.propertiesOrder) {
|
|
6908
|
-
const r =
|
|
6891
|
+
const r = qo(e, e.propertiesOrder);
|
|
6909
6892
|
return e.collectionGroup && r.push({
|
|
6910
6893
|
key: Ri,
|
|
6911
6894
|
disabled: !0
|
|
@@ -6914,7 +6897,7 @@ function Uo(e, t) {
|
|
|
6914
6897
|
return wc(e, t);
|
|
6915
6898
|
}, [e, t]);
|
|
6916
6899
|
}
|
|
6917
|
-
function
|
|
6900
|
+
function qo(e, t) {
|
|
6918
6901
|
return t.flatMap((r) => {
|
|
6919
6902
|
const i = e.properties[r];
|
|
6920
6903
|
return i ? i.hideFromCollection ? [null] : i.disabled && typeof i.disabled == "object" && i.disabled.hidden ? [null] : i.dataType === "map" && i.spreadChildren && i.properties ? Ti(i, r) : [{
|
|
@@ -6941,7 +6924,7 @@ function wc(e, t) {
|
|
|
6941
6924
|
const s = a.map((l) => Di(l));
|
|
6942
6925
|
o.push(...s.filter((l) => !o.includes(l)));
|
|
6943
6926
|
}
|
|
6944
|
-
return e.collectionGroup && o.push(Ri),
|
|
6927
|
+
return e.collectionGroup && o.push(Ri), qo(e, o);
|
|
6945
6928
|
}
|
|
6946
6929
|
function Ti(e, t, r) {
|
|
6947
6930
|
return e.dataType === "map" && e.spreadChildren && e.properties ? Object.entries(e.properties).flatMap(
|
|
@@ -6972,10 +6955,10 @@ function vc({ properties: e, sortable: t, forceFilter: r, AdditionalHeaderWidget
|
|
|
6972
6955
|
key: o,
|
|
6973
6956
|
disabled: s
|
|
6974
6957
|
}) => {
|
|
6975
|
-
const l =
|
|
6958
|
+
const l = mo(e, o);
|
|
6976
6959
|
if (!l)
|
|
6977
6960
|
throw Error("Internal error: no property found in path " + o);
|
|
6978
|
-
const c =
|
|
6961
|
+
const c = Wo(l);
|
|
6979
6962
|
return {
|
|
6980
6963
|
key: o,
|
|
6981
6964
|
align: yc(l),
|
|
@@ -6983,7 +6966,7 @@ function vc({ properties: e, sortable: t, forceFilter: r, AdditionalHeaderWidget
|
|
|
6983
6966
|
title: l.name ?? o,
|
|
6984
6967
|
sortable: t,
|
|
6985
6968
|
filter: !a && c,
|
|
6986
|
-
width:
|
|
6969
|
+
width: Uo(l),
|
|
6987
6970
|
resizable: !0,
|
|
6988
6971
|
custom: {
|
|
6989
6972
|
resolvedProperty: l,
|
|
@@ -6993,8 +6976,8 @@ function vc({ properties: e, sortable: t, forceFilter: r, AdditionalHeaderWidget
|
|
|
6993
6976
|
};
|
|
6994
6977
|
});
|
|
6995
6978
|
}
|
|
6996
|
-
function
|
|
6997
|
-
return t ? ["string", "number", "date", "reference"].includes(e.dataType) : e.dataType === "array" ? e.of ?
|
|
6979
|
+
function Wo(e, t = !1) {
|
|
6980
|
+
return t ? ["string", "number", "date", "reference"].includes(e.dataType) : e.dataType === "array" ? e.of ? Wo(e.of, !0) : !1 : ["string", "number", "boolean", "date", "reference", "array"].includes(e.dataType);
|
|
6998
6981
|
}
|
|
6999
6982
|
function yr({ text: e, ...t }) {
|
|
7000
6983
|
return /* @__PURE__ */ n(
|
|
@@ -7119,7 +7102,7 @@ const kc = S.memo(
|
|
|
7119
7102
|
className: m || h ? "bg-white dark:bg-gray-950" : void 0,
|
|
7120
7103
|
size: "small",
|
|
7121
7104
|
onClick: w,
|
|
7122
|
-
children: /* @__PURE__ */ n(
|
|
7105
|
+
children: /* @__PURE__ */ n(Va, { size: "small" })
|
|
7123
7106
|
}
|
|
7124
7107
|
),
|
|
7125
7108
|
children: /* @__PURE__ */ n(
|
|
@@ -7167,8 +7150,7 @@ function _c({
|
|
|
7167
7150
|
const l = e.key, [c, d] = P(r);
|
|
7168
7151
|
if (M(() => {
|
|
7169
7152
|
d(r);
|
|
7170
|
-
}, [r]), !e.filter)
|
|
7171
|
-
return null;
|
|
7153
|
+
}, [r]), !e.filter) return null;
|
|
7172
7154
|
const u = () => {
|
|
7173
7155
|
t(c, !1);
|
|
7174
7156
|
}, f = (h) => {
|
|
@@ -7238,7 +7220,7 @@ const xc = ({
|
|
|
7238
7220
|
createFilterField: c,
|
|
7239
7221
|
AddColumnComponent: d
|
|
7240
7222
|
}) => {
|
|
7241
|
-
const u = e.map(() =>
|
|
7223
|
+
const u = e.map(() => Ca()), [f, m] = P(-1), p = x((k, E, C) => {
|
|
7242
7224
|
const B = e[k], Q = 100, D = 800, F = E > D ? D : E < Q ? Q : E, z = {
|
|
7243
7225
|
width: F,
|
|
7244
7226
|
key: B.key,
|
|
@@ -7358,9 +7340,9 @@ const xc = ({
|
|
|
7358
7340
|
);
|
|
7359
7341
|
},
|
|
7360
7342
|
(e, t) => J(e.rowData, t.rowData) && J(e.column, t.column) && J(e.cellData, t.cellData) && J(e.rowIndex, t.rowIndex) && J(e.cellRenderer, t.cellRenderer) && J(e.columnIndex, t.columnIndex)
|
|
7361
|
-
), Pr =
|
|
7343
|
+
), Pr = Ba({});
|
|
7362
7344
|
Pr.displayName = "VirtualListContext";
|
|
7363
|
-
const Bc =
|
|
7345
|
+
const Bc = Sa(({
|
|
7364
7346
|
children: e,
|
|
7365
7347
|
...t
|
|
7366
7348
|
}, r) => /* @__PURE__ */ n(Pr.Consumer, { children: (i) => {
|
|
@@ -7431,7 +7413,7 @@ const Bc = Ba(({
|
|
|
7431
7413
|
M(() => {
|
|
7432
7414
|
F(o);
|
|
7433
7415
|
}, [o]);
|
|
7434
|
-
const [oe, L] =
|
|
7416
|
+
const [oe, L] = qn(), X = x((j) => {
|
|
7435
7417
|
F(D.map((G) => G.key === j.column.key ? j.column : G));
|
|
7436
7418
|
}, [D]), q = x((j) => {
|
|
7437
7419
|
F(D.map((G) => G.key === j.column.key ? j.column : G)), l && l(j);
|
|
@@ -7465,7 +7447,7 @@ const Bc = Ba(({
|
|
|
7465
7447
|
{
|
|
7466
7448
|
className: "flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",
|
|
7467
7449
|
children: [
|
|
7468
|
-
/* @__PURE__ */ n(
|
|
7450
|
+
/* @__PURE__ */ n(Ga, {}),
|
|
7469
7451
|
p
|
|
7470
7452
|
]
|
|
7471
7453
|
}
|
|
@@ -7599,7 +7581,7 @@ function Ic({
|
|
|
7599
7581
|
);
|
|
7600
7582
|
} }), []);
|
|
7601
7583
|
return /* @__PURE__ */ n(
|
|
7602
|
-
|
|
7584
|
+
Is,
|
|
7603
7585
|
{
|
|
7604
7586
|
outerRef: e,
|
|
7605
7587
|
innerElementType: Bc,
|
|
@@ -7616,7 +7598,7 @@ function Ic({
|
|
|
7616
7598
|
const Nc = ({ text: e }) => {
|
|
7617
7599
|
const t = /https?:\/\/[^\s]+/g, r = e.replace(t, (i) => `<a href="${i}" class="underline" target="_blank">Link</a><br/>`);
|
|
7618
7600
|
return /* @__PURE__ */ n("div", { className: "break-all", dangerouslySetInnerHTML: { __html: r } });
|
|
7619
|
-
},
|
|
7601
|
+
}, wn = {
|
|
7620
7602
|
"==": "==",
|
|
7621
7603
|
"!=": "!=",
|
|
7622
7604
|
">": ">",
|
|
@@ -7690,8 +7672,8 @@ function Fc({
|
|
|
7690
7672
|
onValueChange: (D) => {
|
|
7691
7673
|
y(D, h);
|
|
7692
7674
|
},
|
|
7693
|
-
renderValue: (D) =>
|
|
7694
|
-
children: d.map((D) => /* @__PURE__ */ n(ot, { value: D, children:
|
|
7675
|
+
renderValue: (D) => wn[D],
|
|
7676
|
+
children: d.map((D) => /* @__PURE__ */ n(ot, { value: D, children: wn[D] }, D))
|
|
7695
7677
|
}
|
|
7696
7678
|
) }),
|
|
7697
7679
|
/* @__PURE__ */ v("div", { className: "flex-grow ml-2 h-full gap-2 flex flex-col", children: [
|
|
@@ -7731,7 +7713,7 @@ function Fc({
|
|
|
7731
7713
|
] })
|
|
7732
7714
|
] });
|
|
7733
7715
|
}
|
|
7734
|
-
const
|
|
7716
|
+
const vn = {
|
|
7735
7717
|
"==": "==",
|
|
7736
7718
|
"!=": "!=",
|
|
7737
7719
|
">": ">",
|
|
@@ -7774,8 +7756,8 @@ function Pc({
|
|
|
7774
7756
|
onValueChange: (g) => {
|
|
7775
7757
|
h(g, m);
|
|
7776
7758
|
},
|
|
7777
|
-
renderValue: (g) =>
|
|
7778
|
-
children: l.map((g) => /* @__PURE__ */ n(ot, { value: g, children:
|
|
7759
|
+
renderValue: (g) => vn[g],
|
|
7760
|
+
children: l.map((g) => /* @__PURE__ */ n(ot, { value: g, children: vn[g] }, g))
|
|
7779
7761
|
}
|
|
7780
7762
|
) }),
|
|
7781
7763
|
/* @__PURE__ */ v("div", { className: "flex-grow ml-2 flex flex-col gap-2", children: [
|
|
@@ -7886,7 +7868,7 @@ function Qc({
|
|
|
7886
7868
|
}
|
|
7887
7869
|
) });
|
|
7888
7870
|
}
|
|
7889
|
-
const
|
|
7871
|
+
const kn = {
|
|
7890
7872
|
"==": "==",
|
|
7891
7873
|
"!=": "!=",
|
|
7892
7874
|
">": ">",
|
|
@@ -7897,7 +7879,7 @@ const vn = {
|
|
|
7897
7879
|
in: "in",
|
|
7898
7880
|
"array-contains": "Contains",
|
|
7899
7881
|
"array-contains-any": "Any"
|
|
7900
|
-
},
|
|
7882
|
+
}, _n = ["array-contains-any", "in"];
|
|
7901
7883
|
function Dc({
|
|
7902
7884
|
name: e,
|
|
7903
7885
|
isArray: t,
|
|
@@ -7909,7 +7891,7 @@ function Dc({
|
|
|
7909
7891
|
const { locale: s } = fe(), l = t ? ["array-contains"] : ["==", "!=", ">", "<", ">=", "<="], [c, d] = i || [l[0], void 0], [u, f] = P(c), [m, p] = P(d);
|
|
7910
7892
|
function h(A, g) {
|
|
7911
7893
|
let y = g;
|
|
7912
|
-
const w =
|
|
7894
|
+
const w = _n.includes(u), b = _n.includes(A);
|
|
7913
7895
|
w !== b && (y = b ? g ? [g] : [] : ""), f(A), p(y === null ? void 0 : y);
|
|
7914
7896
|
const _ = y !== null && Array.isArray(y) ? y.length > 0 : y !== void 0;
|
|
7915
7897
|
a(
|
|
@@ -7924,8 +7906,8 @@ function Dc({
|
|
|
7924
7906
|
onValueChange: (A) => {
|
|
7925
7907
|
h(A, m);
|
|
7926
7908
|
},
|
|
7927
|
-
renderValue: (A) =>
|
|
7928
|
-
children: l.map((A) => /* @__PURE__ */ n(ot, { value: A, children:
|
|
7909
|
+
renderValue: (A) => kn[A],
|
|
7910
|
+
children: l.map((A) => /* @__PURE__ */ n(ot, { value: A, children: kn[A] }, A))
|
|
7929
7911
|
}
|
|
7930
7912
|
) }),
|
|
7931
7913
|
/* @__PURE__ */ v("div", { className: "flex-grow ml-2 flex flex-col gap-2", children: [
|
|
@@ -8009,7 +7991,7 @@ const Rc = S.memo(
|
|
|
8009
7991
|
if (!l)
|
|
8010
7992
|
return i && i(ee);
|
|
8011
7993
|
}, [i, l]);
|
|
8012
|
-
|
|
7994
|
+
Mn(
|
|
8013
7995
|
L,
|
|
8014
7996
|
() => {
|
|
8015
7997
|
X && ue();
|
|
@@ -8031,7 +8013,7 @@ const Rc = S.memo(
|
|
|
8031
8013
|
p?.({ ...ee, ...F });
|
|
8032
8014
|
}, [F]);
|
|
8033
8015
|
return /* @__PURE__ */ n(
|
|
8034
|
-
|
|
8016
|
+
Lo.Provider,
|
|
8035
8017
|
{
|
|
8036
8018
|
value: {
|
|
8037
8019
|
setPopupCell: C,
|
|
@@ -8150,7 +8132,7 @@ function Tc({
|
|
|
8150
8132
|
}
|
|
8151
8133
|
return /* @__PURE__ */ n("div", { children: `Currently the filter field ${s.dataType} is not supported` });
|
|
8152
8134
|
}
|
|
8153
|
-
const
|
|
8135
|
+
const Jo = function({
|
|
8154
8136
|
className: t,
|
|
8155
8137
|
style: r,
|
|
8156
8138
|
forceFilter: i,
|
|
@@ -8380,7 +8362,7 @@ function Mc(e, t, r = 5e3) {
|
|
|
8380
8362
|
}, [e, r, t, d]), d ? e : i;
|
|
8381
8363
|
}
|
|
8382
8364
|
const zc = 50;
|
|
8383
|
-
function
|
|
8365
|
+
function Ho({
|
|
8384
8366
|
fullPath: e,
|
|
8385
8367
|
collection: t,
|
|
8386
8368
|
entitiesDisplayedFirst: r,
|
|
@@ -8489,7 +8471,7 @@ function Jo({
|
|
|
8489
8471
|
setPopupCell: d
|
|
8490
8472
|
};
|
|
8491
8473
|
}
|
|
8492
|
-
function
|
|
8474
|
+
function Zo(e) {
|
|
8493
8475
|
const [t, r] = P([]), i = x((o) => {
|
|
8494
8476
|
let s;
|
|
8495
8477
|
t.map((l) => l.id).includes(o.id) ? (e?.(o, !1), s = t.filter((l) => l.id !== o.id)) : (e?.(o, !0), s = [...t, o]), r(s);
|
|
@@ -8501,7 +8483,7 @@ function Ho(e) {
|
|
|
8501
8483
|
toggleEntitySelection: i
|
|
8502
8484
|
};
|
|
8503
8485
|
}
|
|
8504
|
-
function
|
|
8486
|
+
function Xo({
|
|
8505
8487
|
collection: e,
|
|
8506
8488
|
fullPath: t,
|
|
8507
8489
|
parentCollectionIds: r
|
|
@@ -8538,7 +8520,7 @@ function Zo({
|
|
|
8538
8520
|
textSearchEnabled: f
|
|
8539
8521
|
};
|
|
8540
8522
|
}
|
|
8541
|
-
function
|
|
8523
|
+
function Ko({
|
|
8542
8524
|
entityOrEntitiesToDelete: e,
|
|
8543
8525
|
collection: t,
|
|
8544
8526
|
onClose: r,
|
|
@@ -8613,7 +8595,7 @@ function Xo({
|
|
|
8613
8595
|
else {
|
|
8614
8596
|
const z = p;
|
|
8615
8597
|
D = z ? /* @__PURE__ */ n(
|
|
8616
|
-
|
|
8598
|
+
Mo,
|
|
8617
8599
|
{
|
|
8618
8600
|
entity: z,
|
|
8619
8601
|
collection: t,
|
|
@@ -8690,8 +8672,8 @@ const Vc = {
|
|
|
8690
8672
|
onClose: () => o?.(e)
|
|
8691
8673
|
}), Promise.resolve(void 0);
|
|
8692
8674
|
}
|
|
8693
|
-
},
|
|
8694
|
-
icon: /* @__PURE__ */ n(
|
|
8675
|
+
}, ea = {
|
|
8676
|
+
icon: /* @__PURE__ */ n(ja, {}),
|
|
8695
8677
|
name: "Copy",
|
|
8696
8678
|
onClick({
|
|
8697
8679
|
entity: e,
|
|
@@ -8713,7 +8695,7 @@ const Vc = {
|
|
|
8713
8695
|
}), Promise.resolve(void 0);
|
|
8714
8696
|
}
|
|
8715
8697
|
}, Cm = {
|
|
8716
|
-
icon: /* @__PURE__ */ n(
|
|
8698
|
+
icon: /* @__PURE__ */ n(Ya, {}),
|
|
8717
8699
|
name: "Archive",
|
|
8718
8700
|
onClick({
|
|
8719
8701
|
entity: e,
|
|
@@ -8734,7 +8716,7 @@ const Vc = {
|
|
|
8734
8716
|
}) {
|
|
8735
8717
|
return window.open(`https://example.com/${e.id}`, "_blank"), Promise.resolve(void 0);
|
|
8736
8718
|
}
|
|
8737
|
-
},
|
|
8719
|
+
}, ta = {
|
|
8738
8720
|
icon: /* @__PURE__ */ n(ii, {}),
|
|
8739
8721
|
name: "Delete",
|
|
8740
8722
|
onClick({
|
|
@@ -8752,7 +8734,7 @@ const Vc = {
|
|
|
8752
8734
|
if (!r || !t)
|
|
8753
8735
|
throw new Error("deleteEntityAction: Collection is undefined");
|
|
8754
8736
|
return /* @__PURE__ */ n(
|
|
8755
|
-
|
|
8737
|
+
Ko,
|
|
8756
8738
|
{
|
|
8757
8739
|
entityOrEntitiesToDelete: e,
|
|
8758
8740
|
path: t,
|
|
@@ -8799,7 +8781,7 @@ function Gc({
|
|
|
8799
8781
|
}
|
|
8800
8782
|
b.setSelectedEntities(q), t && t(q);
|
|
8801
8783
|
}
|
|
8802
|
-
}, b =
|
|
8784
|
+
}, b = Zo(w);
|
|
8803
8785
|
M(() => {
|
|
8804
8786
|
let X = !1;
|
|
8805
8787
|
const q = o?.map((V) => V?.toString()).filter(Boolean);
|
|
@@ -8875,7 +8857,7 @@ function Gc({
|
|
|
8875
8857
|
path: h,
|
|
8876
8858
|
values: {},
|
|
8877
8859
|
fields: p.propertyConfigs
|
|
8878
|
-
}), [i, p.propertyConfigs, h]), D =
|
|
8860
|
+
}), [i, p.propertyConfigs, h]), D = $o(Q, !1), F = Ho({
|
|
8879
8861
|
fullPath: h,
|
|
8880
8862
|
collection: i,
|
|
8881
8863
|
entitiesDisplayedFirst: g,
|
|
@@ -8887,14 +8869,14 @@ function Gc({
|
|
|
8887
8869
|
textSearchEnabled: L
|
|
8888
8870
|
} = (
|
|
8889
8871
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
8890
|
-
|
|
8872
|
+
Xo({
|
|
8891
8873
|
collection: i,
|
|
8892
8874
|
fullPath: h
|
|
8893
8875
|
})
|
|
8894
8876
|
);
|
|
8895
8877
|
return /* @__PURE__ */ v("div", { className: "flex flex-col h-full", children: [
|
|
8896
8878
|
/* @__PURE__ */ n("div", { className: "flex-grow", children: g && /* @__PURE__ */ n(
|
|
8897
|
-
|
|
8879
|
+
Jo,
|
|
8898
8880
|
{
|
|
8899
8881
|
textSearchLoading: z,
|
|
8900
8882
|
onTextSearchClick: $ ? void 0 : oe,
|
|
@@ -8987,7 +8969,7 @@ function jc({
|
|
|
8987
8969
|
function Jt(e) {
|
|
8988
8970
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
8989
8971
|
}
|
|
8990
|
-
function
|
|
8972
|
+
function xn({
|
|
8991
8973
|
children: e,
|
|
8992
8974
|
group: t
|
|
8993
8975
|
}) {
|
|
@@ -9028,7 +9010,7 @@ function Yc({
|
|
|
9028
9010
|
onClick: a
|
|
9029
9011
|
}) {
|
|
9030
9012
|
return /* @__PURE__ */ n(
|
|
9031
|
-
|
|
9013
|
+
La,
|
|
9032
9014
|
{
|
|
9033
9015
|
className: U("h-full p-4 cursor-pointer min-h-[230px]"),
|
|
9034
9016
|
onClick: () => {
|
|
@@ -9080,7 +9062,7 @@ function Yc({
|
|
|
9080
9062
|
]
|
|
9081
9063
|
}
|
|
9082
9064
|
),
|
|
9083
|
-
/* @__PURE__ */ n("div", { style: { alignSelf: "flex-end" }, children: /* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(
|
|
9065
|
+
/* @__PURE__ */ n("div", { style: { alignSelf: "flex-end" }, children: /* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(zn, { className: "text-primary" }) }) })
|
|
9084
9066
|
] })
|
|
9085
9067
|
}
|
|
9086
9068
|
);
|
|
@@ -9095,8 +9077,8 @@ function Lc({
|
|
|
9095
9077
|
{
|
|
9096
9078
|
tabIndex: 0,
|
|
9097
9079
|
className: U(
|
|
9098
|
-
La,
|
|
9099
9080
|
Ua,
|
|
9081
|
+
$a,
|
|
9100
9082
|
ni,
|
|
9101
9083
|
"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 "
|
|
9102
9084
|
),
|
|
@@ -9115,7 +9097,7 @@ function Lc({
|
|
|
9115
9097
|
}
|
|
9116
9098
|
)
|
|
9117
9099
|
] }),
|
|
9118
|
-
/* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(
|
|
9100
|
+
/* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(zn, { color: "primary" }) })
|
|
9119
9101
|
]
|
|
9120
9102
|
}
|
|
9121
9103
|
) });
|
|
@@ -9142,13 +9124,13 @@ function Uc({
|
|
|
9142
9124
|
);
|
|
9143
9125
|
},
|
|
9144
9126
|
children: p ? /* @__PURE__ */ n(
|
|
9145
|
-
|
|
9127
|
+
Vn,
|
|
9146
9128
|
{
|
|
9147
9129
|
size: 18,
|
|
9148
9130
|
className: "text-secondary"
|
|
9149
9131
|
}
|
|
9150
9132
|
) : /* @__PURE__ */ n(
|
|
9151
|
-
|
|
9133
|
+
Gn,
|
|
9152
9134
|
{
|
|
9153
9135
|
size: 18,
|
|
9154
9136
|
className: "text-gray-400 dark:text-gray-500"
|
|
@@ -9214,14 +9196,14 @@ function $c({ entry: e }) {
|
|
|
9214
9196
|
{
|
|
9215
9197
|
onClick: () => t(e.url),
|
|
9216
9198
|
icon: i ? /* @__PURE__ */ n(
|
|
9217
|
-
|
|
9199
|
+
Vn,
|
|
9218
9200
|
{
|
|
9219
9201
|
onClick: a,
|
|
9220
9202
|
size: 18,
|
|
9221
9203
|
className: "text-secondary"
|
|
9222
9204
|
}
|
|
9223
9205
|
) : /* @__PURE__ */ n(
|
|
9224
|
-
|
|
9206
|
+
Gn,
|
|
9225
9207
|
{
|
|
9226
9208
|
onClick: a,
|
|
9227
9209
|
size: 18,
|
|
@@ -9238,7 +9220,7 @@ function qc({ hidden: e }) {
|
|
|
9238
9220
|
if (!r)
|
|
9239
9221
|
return null;
|
|
9240
9222
|
const i = (r?.favouritePaths ?? []).map((a) => t.topLevelNavigation?.navigationEntries.find((o) => o.path === a)).filter(Boolean);
|
|
9241
|
-
return /* @__PURE__ */ n(
|
|
9223
|
+
return /* @__PURE__ */ n(jn, { in: i.length > 0, children: /* @__PURE__ */ n("div", { className: "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]", children: i.map((a) => /* @__PURE__ */ n(
|
|
9242
9224
|
$c,
|
|
9243
9225
|
{
|
|
9244
9226
|
entry: a
|
|
@@ -9270,7 +9252,7 @@ function Wc() {
|
|
|
9270
9252
|
direction: a
|
|
9271
9253
|
};
|
|
9272
9254
|
}
|
|
9273
|
-
const Bt = new
|
|
9255
|
+
const Bt = new Xn.Search("url");
|
|
9274
9256
|
Bt.addIndex("name");
|
|
9275
9257
|
Bt.addIndex("description");
|
|
9276
9258
|
Bt.addIndex("group");
|
|
@@ -9314,7 +9296,7 @@ function Jc({
|
|
|
9314
9296
|
w = /* @__PURE__ */ n(O, { children: a.plugins.filter((_) => _.homePage?.includeSection).map((_, k) => {
|
|
9315
9297
|
const E = _.homePage.includeSection(b);
|
|
9316
9298
|
return /* @__PURE__ */ n(
|
|
9317
|
-
|
|
9299
|
+
xn,
|
|
9318
9300
|
{
|
|
9319
9301
|
group: E.title,
|
|
9320
9302
|
children: E.children
|
|
@@ -9329,7 +9311,7 @@ function Jc({
|
|
|
9329
9311
|
id: "home_page",
|
|
9330
9312
|
ref: s,
|
|
9331
9313
|
className: "py-2 overflow-auto h-full w-full",
|
|
9332
|
-
children: /* @__PURE__ */ v(
|
|
9314
|
+
children: /* @__PURE__ */ v(qa, { maxWidth: "6xl", children: [
|
|
9333
9315
|
/* @__PURE__ */ v(
|
|
9334
9316
|
"div",
|
|
9335
9317
|
{
|
|
@@ -9363,7 +9345,7 @@ function Jc({
|
|
|
9363
9345
|
});
|
|
9364
9346
|
const C = p.filter((B) => B.group === b || !B.group && b === void 0);
|
|
9365
9347
|
return C.length === 0 && k.length === 0 ? null : /* @__PURE__ */ n(
|
|
9366
|
-
|
|
9348
|
+
xn,
|
|
9367
9349
|
{
|
|
9368
9350
|
group: b,
|
|
9369
9351
|
children: /* @__PURE__ */ v("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [
|
|
@@ -9587,8 +9569,7 @@ function td({
|
|
|
9587
9569
|
entityId: y,
|
|
9588
9570
|
fields: m.propertyConfigs
|
|
9589
9571
|
}) : void 0, C = Xc(), B = S.useRef(null), Q = S.useRef(null), D = S.useRef(!1), F = x(() => {
|
|
9590
|
-
if (!s)
|
|
9591
|
-
throw Error("getInitialLocation error");
|
|
9572
|
+
if (!s) throw Error("getInitialLocation error");
|
|
9592
9573
|
return {
|
|
9593
9574
|
x: s.left < C.width - s.right ? s.x + s.width / 2 : s.x - s.width / 2,
|
|
9594
9575
|
y: s.top < C.height - s.bottom ? s.y + s.height / 2 : s.y - s.height / 2
|
|
@@ -9606,8 +9587,7 @@ function td({
|
|
|
9606
9587
|
};
|
|
9607
9588
|
}, [C]), $ = x((G) => {
|
|
9608
9589
|
const I = B.current?.getBoundingClientRect();
|
|
9609
|
-
if (!s || !I)
|
|
9610
|
-
return;
|
|
9590
|
+
if (!s || !I) return;
|
|
9611
9591
|
const R = G ?? z(F());
|
|
9612
9592
|
(!A || R.x !== A.x || R.y !== A.y) && g(R);
|
|
9613
9593
|
}, [s, F, z, A]);
|
|
@@ -9636,7 +9616,7 @@ function td({
|
|
|
9636
9616
|
);
|
|
9637
9617
|
const oe = he(() => {
|
|
9638
9618
|
if (!(!E || !y))
|
|
9639
|
-
return
|
|
9619
|
+
return Yo(
|
|
9640
9620
|
y,
|
|
9641
9621
|
i && E.properties[i] ? { [i]: E.properties[i] } : {},
|
|
9642
9622
|
r
|
|
@@ -9651,7 +9631,7 @@ function td({
|
|
|
9651
9631
|
}) : Promise.resolve());
|
|
9652
9632
|
if (!w)
|
|
9653
9633
|
return /* @__PURE__ */ n(O, {});
|
|
9654
|
-
const q =
|
|
9634
|
+
const q = In({
|
|
9655
9635
|
initialValues: w?.values ?? {},
|
|
9656
9636
|
validation: (G) => oe?.validate(G, { abortEarly: !1 }).then(() => ({})).catch((I) => {
|
|
9657
9637
|
const R = {};
|
|
@@ -9812,11 +9792,11 @@ function td({
|
|
|
9812
9792
|
`draggable_${i}_${y}_${l}`
|
|
9813
9793
|
);
|
|
9814
9794
|
return /* @__PURE__ */ n(
|
|
9815
|
-
|
|
9795
|
+
Fs.Root,
|
|
9816
9796
|
{
|
|
9817
9797
|
asChild: !0,
|
|
9818
9798
|
container: u,
|
|
9819
|
-
children: /* @__PURE__ */ n(
|
|
9799
|
+
children: /* @__PURE__ */ n(Nn, { value: q, children: j })
|
|
9820
9800
|
}
|
|
9821
9801
|
);
|
|
9822
9802
|
}
|
|
@@ -9840,7 +9820,7 @@ function rd({
|
|
|
9840
9820
|
},
|
|
9841
9821
|
size: "small",
|
|
9842
9822
|
children: [
|
|
9843
|
-
/* @__PURE__ */ n(
|
|
9823
|
+
/* @__PURE__ */ n(Wa, {}),
|
|
9844
9824
|
a
|
|
9845
9825
|
]
|
|
9846
9826
|
}
|
|
@@ -9880,7 +9860,7 @@ function id({
|
|
|
9880
9860
|
m.collectionView?.CollectionActionsStart && f.push(...Jt(m.collectionView?.CollectionActionsStart).map((h, A) => /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(h, { ...u, ...m.collectionView?.collectionActionsStartProps }) }, `plugin_actions_${p}_${A}`)));
|
|
9881
9861
|
}), /* @__PURE__ */ n(O, { children: f });
|
|
9882
9862
|
}
|
|
9883
|
-
const nd = "collectionGroupParent",
|
|
9863
|
+
const nd = "collectionGroupParent", ra = S.memo(
|
|
9884
9864
|
function({
|
|
9885
9865
|
fullPath: t,
|
|
9886
9866
|
parentCollectionIds: r,
|
|
@@ -9902,8 +9882,8 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
9902
9882
|
}, 2400);
|
|
9903
9883
|
}, [b]), z = x((W) => {
|
|
9904
9884
|
const le = y.current;
|
|
9905
|
-
return
|
|
9906
|
-
}, [f, l]), $ = g.selectionEnabled === void 0 || g.selectionEnabled, oe = !z(), [L, X] = P(!1), q =
|
|
9885
|
+
return po(le, f, l, W ?? null) ? le.inlineEditing === void 0 || le.inlineEditing : !1;
|
|
9886
|
+
}, [f, l]), $ = g.selectionEnabled === void 0 || g.selectionEnabled, oe = !z(), [L, X] = P(!1), q = Zo(), V = g.selectionController ?? q, {
|
|
9907
9887
|
selectedEntities: ae,
|
|
9908
9888
|
isEntitySelected: te,
|
|
9909
9889
|
setSelectedEntities: Ae
|
|
@@ -9911,7 +9891,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
9911
9891
|
M(() => {
|
|
9912
9892
|
E(void 0);
|
|
9913
9893
|
}, [ae]);
|
|
9914
|
-
const ue =
|
|
9894
|
+
const ue = Ho({
|
|
9915
9895
|
fullPath: l,
|
|
9916
9896
|
collection: g,
|
|
9917
9897
|
lastDeleteTimestamp: C
|
|
@@ -9965,9 +9945,8 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
9965
9945
|
key: le
|
|
9966
9946
|
}) => {
|
|
9967
9947
|
const be = y.current;
|
|
9968
|
-
if (!wt(be.properties, le))
|
|
9969
|
-
|
|
9970
|
-
const ye = ra(le, W);
|
|
9948
|
+
if (!wt(be.properties, le)) return;
|
|
9949
|
+
const ye = ia(le, W);
|
|
9971
9950
|
R(l, ye);
|
|
9972
9951
|
}, [R, l]), Ie = x((W) => {
|
|
9973
9952
|
m && R(l, { defaultSize: W });
|
|
@@ -9994,7 +9973,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
9994
9973
|
collection: g,
|
|
9995
9974
|
status: "existing"
|
|
9996
9975
|
};
|
|
9997
|
-
return
|
|
9976
|
+
return Bo({
|
|
9998
9977
|
...st,
|
|
9999
9978
|
collection: g,
|
|
10000
9979
|
dataSource: c,
|
|
@@ -10023,7 +10002,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
10023
10002
|
entityId: le.id,
|
|
10024
10003
|
fields: h.propertyConfigs
|
|
10025
10004
|
});
|
|
10026
|
-
}, [g.properties, h.propertyConfigs, Te.properties]), We =
|
|
10005
|
+
}, [g.properties, h.propertyConfigs, Te.properties]), We = $o(Te, !0), Ke = he(() => {
|
|
10027
10006
|
const W = g.subcollections?.map((be) => ({
|
|
10028
10007
|
key: Di(be),
|
|
10029
10008
|
name: be.name,
|
|
@@ -10076,7 +10055,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
10076
10055
|
customEntityActions: le
|
|
10077
10056
|
}) => {
|
|
10078
10057
|
const be = W ? Fi(g, f, l, W) : !0, ye = [Vc];
|
|
10079
|
-
return Xe && ye.push(
|
|
10058
|
+
return Xe && ye.push(ea), be && ye.push(ta), le && ye.push(...le), ye;
|
|
10080
10059
|
}, ir = () => {
|
|
10081
10060
|
const W = Be({}), le = W.filter((we) => we.collapsed !== !1), ye = W.filter((we) => we.collapsed === !1).length * (re ? 40 : 30);
|
|
10082
10061
|
return (re ? 80 + ye : 70 + ye) + (le.length > 0 ? re ? 40 : 30 : 0);
|
|
@@ -10175,7 +10154,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
10175
10154
|
textSearchInitialised: Tr,
|
|
10176
10155
|
onTextSearchClick: bt,
|
|
10177
10156
|
textSearchEnabled: Or
|
|
10178
|
-
} =
|
|
10157
|
+
} = Xo({
|
|
10179
10158
|
collection: g,
|
|
10180
10159
|
fullPath: Ve,
|
|
10181
10160
|
parentCollectionIds: r
|
|
@@ -10187,7 +10166,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
10187
10166
|
ref: A,
|
|
10188
10167
|
children: [
|
|
10189
10168
|
/* @__PURE__ */ n(
|
|
10190
|
-
|
|
10169
|
+
Jo,
|
|
10191
10170
|
{
|
|
10192
10171
|
additionalFields: Ke,
|
|
10193
10172
|
tableController: ue,
|
|
@@ -10284,7 +10263,7 @@ const nd = "collectionGroupParent", ta = S.memo(
|
|
|
10284
10263
|
`popup_form_${ee?.propertyKey}_${ee?.entity?.id}`
|
|
10285
10264
|
),
|
|
10286
10265
|
k && /* @__PURE__ */ n(
|
|
10287
|
-
|
|
10266
|
+
Ko,
|
|
10288
10267
|
{
|
|
10289
10268
|
entityOrEntitiesToDelete: k,
|
|
10290
10269
|
path: l,
|
|
@@ -10330,10 +10309,10 @@ function od({
|
|
|
10330
10309
|
}
|
|
10331
10310
|
);
|
|
10332
10311
|
}
|
|
10333
|
-
function
|
|
10312
|
+
function ia(e, t) {
|
|
10334
10313
|
if (e.includes(".")) {
|
|
10335
10314
|
const [r, ...i] = e.split(".");
|
|
10336
|
-
return { properties: { [r]:
|
|
10315
|
+
return { properties: { [r]: ia(i.join("."), t) } };
|
|
10337
10316
|
}
|
|
10338
10317
|
return { properties: { [e]: { columnWidth: t } } };
|
|
10339
10318
|
}
|
|
@@ -10347,7 +10326,7 @@ function ad({
|
|
|
10347
10326
|
{
|
|
10348
10327
|
open: r,
|
|
10349
10328
|
onOpenChange: i,
|
|
10350
|
-
trigger: /* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(
|
|
10329
|
+
trigger: /* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(Ja, { size: "small" }) }),
|
|
10351
10330
|
children: /* @__PURE__ */ n(
|
|
10352
10331
|
"form",
|
|
10353
10332
|
{
|
|
@@ -10461,7 +10440,7 @@ function Im({
|
|
|
10461
10440
|
}
|
|
10462
10441
|
),
|
|
10463
10442
|
/* @__PURE__ */ n(
|
|
10464
|
-
|
|
10443
|
+
Ha,
|
|
10465
10444
|
{
|
|
10466
10445
|
color: "primary",
|
|
10467
10446
|
type: "submit",
|
|
@@ -10475,7 +10454,7 @@ function Im({
|
|
|
10475
10454
|
}
|
|
10476
10455
|
);
|
|
10477
10456
|
}
|
|
10478
|
-
function
|
|
10457
|
+
function na({
|
|
10479
10458
|
width: e,
|
|
10480
10459
|
height: t,
|
|
10481
10460
|
className: r,
|
|
@@ -10618,7 +10597,7 @@ function ia({
|
|
|
10618
10597
|
}
|
|
10619
10598
|
);
|
|
10620
10599
|
}
|
|
10621
|
-
const
|
|
10600
|
+
const oa = S.createContext({
|
|
10622
10601
|
hasDrawer: !1,
|
|
10623
10602
|
drawerHovered: !1,
|
|
10624
10603
|
drawerOpen: !1,
|
|
@@ -10631,7 +10610,7 @@ const na = S.createContext({
|
|
|
10631
10610
|
autoOpenDrawer: !1
|
|
10632
10611
|
});
|
|
10633
10612
|
function Oi() {
|
|
10634
|
-
return S.useContext(
|
|
10613
|
+
return S.useContext(oa);
|
|
10635
10614
|
}
|
|
10636
10615
|
const ld = function({
|
|
10637
10616
|
title: t,
|
|
@@ -10696,7 +10675,7 @@ const ld = function({
|
|
|
10696
10675
|
alt: "Logo",
|
|
10697
10676
|
className: U("w-[32px] h-[32px] object-contain")
|
|
10698
10677
|
}
|
|
10699
|
-
) : /* @__PURE__ */ n(
|
|
10678
|
+
) : /* @__PURE__ */ n(na, { width: "32px", height: "32px" })),
|
|
10700
10679
|
typeof t == "string" ? /* @__PURE__ */ n(
|
|
10701
10680
|
Y,
|
|
10702
10681
|
{
|
|
@@ -10719,7 +10698,7 @@ const ld = function({
|
|
|
10719
10698
|
"aria-label": "Open drawer",
|
|
10720
10699
|
onClick: A,
|
|
10721
10700
|
size: "large",
|
|
10722
|
-
children: h === "dark" ? /* @__PURE__ */ n(
|
|
10701
|
+
children: h === "dark" ? /* @__PURE__ */ n(Za, {}) : /* @__PURE__ */ n(Xa, {})
|
|
10723
10702
|
}
|
|
10724
10703
|
),
|
|
10725
10704
|
/* @__PURE__ */ v(St, { trigger: w, children: [
|
|
@@ -10729,7 +10708,7 @@ const ld = function({
|
|
|
10729
10708
|
] }),
|
|
10730
10709
|
a,
|
|
10731
10710
|
!a && /* @__PURE__ */ v(Pe, { onClick: p.signOut, children: [
|
|
10732
|
-
/* @__PURE__ */ n(
|
|
10711
|
+
/* @__PURE__ */ n(Ka, {}),
|
|
10733
10712
|
"Log Out"
|
|
10734
10713
|
] })
|
|
10735
10714
|
] })
|
|
@@ -10737,9 +10716,9 @@ const ld = function({
|
|
|
10737
10716
|
}
|
|
10738
10717
|
);
|
|
10739
10718
|
}, cd = (e) => e && Array.isArray(e) && e.length > 0 ? e.map((t, r) => t ? {
|
|
10740
|
-
[
|
|
10719
|
+
[no(t) + r]: ur()
|
|
10741
10720
|
} : {}).reduce((t, r) => ({ ...t, ...r }), {}) : {};
|
|
10742
|
-
function
|
|
10721
|
+
function aa({
|
|
10743
10722
|
droppableId: e,
|
|
10744
10723
|
addLabel: t,
|
|
10745
10724
|
value: r,
|
|
@@ -10757,7 +10736,7 @@ function oa({
|
|
|
10757
10736
|
M(() => {
|
|
10758
10737
|
if (u && r && r.length !== m.length) {
|
|
10759
10738
|
const w = r.map((b, _) => {
|
|
10760
|
-
const k =
|
|
10739
|
+
const k = no(b) + _;
|
|
10761
10740
|
if (k in f.current)
|
|
10762
10741
|
return f.current[k];
|
|
10763
10742
|
{
|
|
@@ -10769,8 +10748,7 @@ function oa({
|
|
|
10769
10748
|
}
|
|
10770
10749
|
}, [u, m.length, r]);
|
|
10771
10750
|
const h = (w) => {
|
|
10772
|
-
if (w.preventDefault(), i)
|
|
10773
|
-
return;
|
|
10751
|
+
if (w.preventDefault(), i) return;
|
|
10774
10752
|
const b = ur(), _ = [...m, b];
|
|
10775
10753
|
s && s(b), p(_), d([...r ?? [], c]);
|
|
10776
10754
|
}, A = (w) => {
|
|
@@ -10784,19 +10762,19 @@ function oa({
|
|
|
10784
10762
|
];
|
|
10785
10763
|
s && s(b), p(k), d([...r.slice(0, w + 1), _, ...r.slice(w + 1)]);
|
|
10786
10764
|
};
|
|
10787
|
-
return /* @__PURE__ */ n(
|
|
10765
|
+
return /* @__PURE__ */ n(Jn, { onDragEnd: (w) => {
|
|
10788
10766
|
if (!w.destination)
|
|
10789
10767
|
return;
|
|
10790
10768
|
const b = w.source.index, _ = w.destination.index, k = [...m], E = k[b];
|
|
10791
10769
|
k[b] = k[_], k[_] = E, p(k), d(ud(r, b, _));
|
|
10792
10770
|
}, children: /* @__PURE__ */ n(
|
|
10793
|
-
|
|
10771
|
+
Hn,
|
|
10794
10772
|
{
|
|
10795
10773
|
droppableId: e,
|
|
10796
10774
|
renderClone: (w, b, _) => {
|
|
10797
10775
|
const k = _.source.index, E = m[k];
|
|
10798
10776
|
return /* @__PURE__ */ n(
|
|
10799
|
-
|
|
10777
|
+
En,
|
|
10800
10778
|
{
|
|
10801
10779
|
provided: w,
|
|
10802
10780
|
internalId: E,
|
|
@@ -10817,13 +10795,13 @@ function oa({
|
|
|
10817
10795
|
ref: w.innerRef,
|
|
10818
10796
|
children: [
|
|
10819
10797
|
u && m.map((_, k) => /* @__PURE__ */ n(
|
|
10820
|
-
|
|
10798
|
+
Zn,
|
|
10821
10799
|
{
|
|
10822
10800
|
draggableId: `array_field_${_}`,
|
|
10823
10801
|
isDragDisabled: i,
|
|
10824
10802
|
index: k,
|
|
10825
10803
|
children: (E, C) => /* @__PURE__ */ n(
|
|
10826
|
-
|
|
10804
|
+
En,
|
|
10827
10805
|
{
|
|
10828
10806
|
provided: E,
|
|
10829
10807
|
internalId: _,
|
|
@@ -10858,7 +10836,7 @@ function oa({
|
|
|
10858
10836
|
}
|
|
10859
10837
|
) });
|
|
10860
10838
|
}
|
|
10861
|
-
function
|
|
10839
|
+
function En({
|
|
10862
10840
|
provided: e,
|
|
10863
10841
|
index: t,
|
|
10864
10842
|
internalId: r,
|
|
@@ -10912,7 +10890,7 @@ function dd({
|
|
|
10912
10890
|
copy: o
|
|
10913
10891
|
}) {
|
|
10914
10892
|
const [s, l] = P(!1), c = S.useRef(null);
|
|
10915
|
-
return
|
|
10893
|
+
return Mn(c, () => l(!1)), /* @__PURE__ */ n(
|
|
10916
10894
|
"div",
|
|
10917
10895
|
{
|
|
10918
10896
|
className: `pl-2 pt-1 pb-4 flex ${e === "row" ? "flex-row-reverse" : "flex-col"} items-center`,
|
|
@@ -10936,7 +10914,7 @@ function dd({
|
|
|
10936
10914
|
l(!1);
|
|
10937
10915
|
},
|
|
10938
10916
|
className: `cursor-${t ? "inherit" : "grab"}`,
|
|
10939
|
-
children: /* @__PURE__ */ n(
|
|
10917
|
+
children: /* @__PURE__ */ n(es, {})
|
|
10940
10918
|
}
|
|
10941
10919
|
),
|
|
10942
10920
|
/* @__PURE__ */ v(
|
|
@@ -11084,7 +11062,7 @@ function Fm({
|
|
|
11084
11062
|
onIconSelected: t
|
|
11085
11063
|
}) {
|
|
11086
11064
|
const [r, i] = S.useState(null), [a, o] = S.useState(""), s = S.useMemo(
|
|
11087
|
-
() =>
|
|
11065
|
+
() => ts((c) => {
|
|
11088
11066
|
if (!c || c === "")
|
|
11089
11067
|
i(null);
|
|
11090
11068
|
else {
|
|
@@ -11137,7 +11115,7 @@ function Mi({
|
|
|
11137
11115
|
setFieldValue: d
|
|
11138
11116
|
}) {
|
|
11139
11117
|
return /* @__PURE__ */ n(
|
|
11140
|
-
|
|
11118
|
+
aa,
|
|
11141
11119
|
{
|
|
11142
11120
|
droppableId: e,
|
|
11143
11121
|
addLabel: t,
|
|
@@ -11193,7 +11171,7 @@ function Me({
|
|
|
11193
11171
|
size: "small",
|
|
11194
11172
|
className: "self-start",
|
|
11195
11173
|
children: /* @__PURE__ */ n(
|
|
11196
|
-
|
|
11174
|
+
rs,
|
|
11197
11175
|
{
|
|
11198
11176
|
color: "disabled",
|
|
11199
11177
|
size: "small"
|
|
@@ -11229,7 +11207,7 @@ function ze({
|
|
|
11229
11207
|
}
|
|
11230
11208
|
);
|
|
11231
11209
|
}
|
|
11232
|
-
function
|
|
11210
|
+
function Cn({
|
|
11233
11211
|
propertyKey: e,
|
|
11234
11212
|
value: t,
|
|
11235
11213
|
setValue: r,
|
|
@@ -11315,7 +11293,7 @@ function En({
|
|
|
11315
11293
|
)
|
|
11316
11294
|
] });
|
|
11317
11295
|
}
|
|
11318
|
-
function
|
|
11296
|
+
function Bn({
|
|
11319
11297
|
propertyKey: e,
|
|
11320
11298
|
value: t,
|
|
11321
11299
|
setValue: r,
|
|
@@ -11361,7 +11339,7 @@ function Cn({
|
|
|
11361
11339
|
onClick: (g) => {
|
|
11362
11340
|
g.preventDefault(), g.stopPropagation(), r(t.filter((y) => y !== p));
|
|
11363
11341
|
},
|
|
11364
|
-
children: /* @__PURE__ */ n(
|
|
11342
|
+
children: /* @__PURE__ */ n(Yn, { size: "smallest" })
|
|
11365
11343
|
}
|
|
11366
11344
|
)
|
|
11367
11345
|
]
|
|
@@ -11371,7 +11349,7 @@ function Cn({
|
|
|
11371
11349
|
}, [u, r, t]);
|
|
11372
11350
|
return /* @__PURE__ */ v("div", { className: "mt-0.5 ml-0.5 mt-2", children: [
|
|
11373
11351
|
/* @__PURE__ */ n(
|
|
11374
|
-
|
|
11352
|
+
Rn,
|
|
11375
11353
|
{
|
|
11376
11354
|
value: f ? t.map((p) => p.toString()) : [],
|
|
11377
11355
|
disabled: o,
|
|
@@ -11389,7 +11367,7 @@ function Cn({
|
|
|
11389
11367
|
let h;
|
|
11390
11368
|
return d && d?.dataType === "number" ? h = p ? p.map((A) => parseFloat(A)) : [] : h = p, r(h);
|
|
11391
11369
|
},
|
|
11392
|
-
children: u.map((p) => String(p.id)).map((p) => /* @__PURE__ */ n(
|
|
11370
|
+
children: u.map((p) => String(p.id)).map((p) => /* @__PURE__ */ n(Tn, { value: p, children: m(p, !0) }, p))
|
|
11393
11371
|
}
|
|
11394
11372
|
),
|
|
11395
11373
|
/* @__PURE__ */ n(
|
|
@@ -11533,7 +11511,7 @@ function pd({
|
|
|
11533
11511
|
)
|
|
11534
11512
|
] });
|
|
11535
11513
|
}
|
|
11536
|
-
function
|
|
11514
|
+
function sa({
|
|
11537
11515
|
name: e,
|
|
11538
11516
|
property: t,
|
|
11539
11517
|
value: r,
|
|
@@ -11580,7 +11558,7 @@ function aa({
|
|
|
11580
11558
|
] });
|
|
11581
11559
|
}
|
|
11582
11560
|
const fd = "box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", hd = "border-dotted-gray", gd = xr, Ad = "pt-0 border-2 border-solid", bd = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500", yd = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500";
|
|
11583
|
-
function
|
|
11561
|
+
function Sn({
|
|
11584
11562
|
propertyKey: e,
|
|
11585
11563
|
value: t,
|
|
11586
11564
|
setValue: r,
|
|
@@ -11603,7 +11581,7 @@ function Bn({
|
|
|
11603
11581
|
onFileUploadComplete: y,
|
|
11604
11582
|
storagePathBuilder: w,
|
|
11605
11583
|
multipleFilesSupported: b
|
|
11606
|
-
} =
|
|
11584
|
+
} = Vo({
|
|
11607
11585
|
entityValues: d.values,
|
|
11608
11586
|
entityId: d.entityId,
|
|
11609
11587
|
path: d.path,
|
|
@@ -11681,7 +11659,7 @@ function wd({
|
|
|
11681
11659
|
isDragActive: b,
|
|
11682
11660
|
isDragAccept: _,
|
|
11683
11661
|
isDragReject: k
|
|
11684
|
-
} =
|
|
11662
|
+
} = Wn(
|
|
11685
11663
|
{
|
|
11686
11664
|
accept: e.acceptedFiles ? e.acceptedFiles.map((E) => ({ [E]: [] })).reduce((E, C) => ({ ...E, ...C }), {}) : void 0,
|
|
11687
11665
|
disabled: t || r,
|
|
@@ -11704,7 +11682,7 @@ function wd({
|
|
|
11704
11682
|
...y(),
|
|
11705
11683
|
className: U(
|
|
11706
11684
|
pr,
|
|
11707
|
-
t ?
|
|
11685
|
+
t ? Ln : xr,
|
|
11708
11686
|
fd,
|
|
11709
11687
|
a && l.length ? "" : "flex",
|
|
11710
11688
|
ni,
|
|
@@ -11738,7 +11716,7 @@ function wd({
|
|
|
11738
11716
|
l.map((E, C) => {
|
|
11739
11717
|
let B;
|
|
11740
11718
|
return E.storagePathOrDownloadUrl ? B = /* @__PURE__ */ n(
|
|
11741
|
-
|
|
11719
|
+
sa,
|
|
11742
11720
|
{
|
|
11743
11721
|
name: `storage_preview_${E.storagePathOrDownloadUrl}`,
|
|
11744
11722
|
property: c,
|
|
@@ -11748,7 +11726,7 @@ function wd({
|
|
|
11748
11726
|
size: E.size
|
|
11749
11727
|
}
|
|
11750
11728
|
) : E.file && (B = /* @__PURE__ */ n(
|
|
11751
|
-
|
|
11729
|
+
Go,
|
|
11752
11730
|
{
|
|
11753
11731
|
entry: E,
|
|
11754
11732
|
metadata: u,
|
|
@@ -11758,7 +11736,7 @@ function wd({
|
|
|
11758
11736
|
simple: !1
|
|
11759
11737
|
}
|
|
11760
11738
|
)), /* @__PURE__ */ n(
|
|
11761
|
-
|
|
11739
|
+
Zn,
|
|
11762
11740
|
{
|
|
11763
11741
|
draggableId: `array_field_${h}_${E.id}`,
|
|
11764
11742
|
index: C,
|
|
@@ -11825,8 +11803,7 @@ function vd({
|
|
|
11825
11803
|
throw Error("Storage field using array must be of data type string");
|
|
11826
11804
|
}
|
|
11827
11805
|
const m = u?.metadata, p = o ? "small" : "medium", h = x((b, _) => {
|
|
11828
|
-
if (!o)
|
|
11829
|
-
return;
|
|
11806
|
+
if (!o) return;
|
|
11830
11807
|
const k = [...r], E = k[b];
|
|
11831
11808
|
k.splice(b, 1), k.splice(_, 0, E), i(k);
|
|
11832
11809
|
const C = k.filter((B) => !!B.storagePathOrDownloadUrl).map((B) => B.storagePathOrDownloadUrl);
|
|
@@ -11840,8 +11817,8 @@ function vd({
|
|
|
11840
11817
|
} else
|
|
11841
11818
|
a(null), i([]);
|
|
11842
11819
|
}, [r, o, a]), y = o ? "Drag 'n' drop some files here, or click to select files" : "Drag 'n' drop a file here, or click to select one", w = o ? e.of : e;
|
|
11843
|
-
return /* @__PURE__ */ n(
|
|
11844
|
-
|
|
11820
|
+
return /* @__PURE__ */ n(Jn, { onDragEnd: A, children: /* @__PURE__ */ n(
|
|
11821
|
+
Hn,
|
|
11845
11822
|
{
|
|
11846
11823
|
droppableId: `droppable_${t}`,
|
|
11847
11824
|
direction: "horizontal",
|
|
@@ -11856,7 +11833,7 @@ function vd({
|
|
|
11856
11833
|
style: b.draggableProps.style,
|
|
11857
11834
|
className: "rounded",
|
|
11858
11835
|
children: /* @__PURE__ */ n(
|
|
11859
|
-
|
|
11836
|
+
sa,
|
|
11860
11837
|
{
|
|
11861
11838
|
name: `storage_preview_${E.storagePathOrDownloadUrl}`,
|
|
11862
11839
|
property: w,
|
|
@@ -11960,7 +11937,7 @@ function Vt({
|
|
|
11960
11937
|
}
|
|
11961
11938
|
),
|
|
11962
11939
|
f && /* @__PURE__ */ n(
|
|
11963
|
-
|
|
11940
|
+
jn,
|
|
11964
11941
|
{
|
|
11965
11942
|
className: "mt-1 ml-1",
|
|
11966
11943
|
in: !!r,
|
|
@@ -12075,7 +12052,7 @@ function _d({
|
|
|
12075
12052
|
)
|
|
12076
12053
|
] });
|
|
12077
12054
|
}
|
|
12078
|
-
function
|
|
12055
|
+
function la({
|
|
12079
12056
|
propertyKey: e,
|
|
12080
12057
|
value: t,
|
|
12081
12058
|
error: r,
|
|
@@ -12124,7 +12101,7 @@ function sa({
|
|
|
12124
12101
|
] });
|
|
12125
12102
|
}
|
|
12126
12103
|
function xd(e) {
|
|
12127
|
-
return typeof e.property.path != "string" ? /* @__PURE__ */ n(
|
|
12104
|
+
return typeof e.property.path != "string" ? /* @__PURE__ */ n(la, { ...e }) : /* @__PURE__ */ n(Ed, { ...e });
|
|
12128
12105
|
}
|
|
12129
12106
|
function Ed({
|
|
12130
12107
|
value: e,
|
|
@@ -12239,7 +12216,7 @@ function Cd({
|
|
|
12239
12216
|
}) {
|
|
12240
12217
|
const u = fe();
|
|
12241
12218
|
return /* @__PURE__ */ n(
|
|
12242
|
-
|
|
12219
|
+
Fn,
|
|
12243
12220
|
{
|
|
12244
12221
|
name: e,
|
|
12245
12222
|
children: (f) => {
|
|
@@ -12255,7 +12232,7 @@ function Cd({
|
|
|
12255
12232
|
if (p === null || Si(p))
|
|
12256
12233
|
return /* @__PURE__ */ n(O, {});
|
|
12257
12234
|
if (er(p))
|
|
12258
|
-
m =
|
|
12235
|
+
m = la;
|
|
12259
12236
|
else if (p.Field)
|
|
12260
12237
|
typeof p.Field == "function" && (m = p.Field);
|
|
12261
12238
|
else {
|
|
@@ -12369,7 +12346,7 @@ function Sd({
|
|
|
12369
12346
|
return ce((() => {
|
|
12370
12347
|
let l = null;
|
|
12371
12348
|
return o && o.forEach((c) => {
|
|
12372
|
-
const d =
|
|
12349
|
+
const d = ca(i);
|
|
12373
12350
|
if (d && c.form?.fieldBuilder) {
|
|
12374
12351
|
const u = {
|
|
12375
12352
|
fieldConfigId: d,
|
|
@@ -12404,7 +12381,7 @@ function Id({
|
|
|
12404
12381
|
if (!o.properties)
|
|
12405
12382
|
throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);
|
|
12406
12383
|
let h;
|
|
12407
|
-
m ? t ? h =
|
|
12384
|
+
m ? t ? h = Rs(
|
|
12408
12385
|
o.properties,
|
|
12409
12386
|
...Object.keys(t).filter((y) => y in o.properties)
|
|
12410
12387
|
) : h = {} : h = o.properties;
|
|
@@ -12552,7 +12529,7 @@ function zi({
|
|
|
12552
12529
|
dataType: d
|
|
12553
12530
|
}] : u)), t({
|
|
12554
12531
|
...e ?? {},
|
|
12555
|
-
[a.find((u) => u[0] === c)?.[1].key ?? ""]:
|
|
12532
|
+
[a.find((u) => u[0] === c)?.[1].key ?? ""]: oo(d)
|
|
12556
12533
|
});
|
|
12557
12534
|
};
|
|
12558
12535
|
return /* @__PURE__ */ v("div", { className: "py-1 flex flex-col gap-1", children: [
|
|
@@ -12695,7 +12672,7 @@ function Fd({
|
|
|
12695
12672
|
{
|
|
12696
12673
|
className: U(Se, "ml-2 pl-2 border-l border-solid"),
|
|
12697
12674
|
children: /* @__PURE__ */ n(
|
|
12698
|
-
|
|
12675
|
+
aa,
|
|
12699
12676
|
{
|
|
12700
12677
|
value: p,
|
|
12701
12678
|
newDefaultEntry: "",
|
|
@@ -12786,7 +12763,7 @@ function Fd({
|
|
|
12786
12763
|
{
|
|
12787
12764
|
size: "small",
|
|
12788
12765
|
className: "h-7 w-7",
|
|
12789
|
-
children: /* @__PURE__ */ n(
|
|
12766
|
+
children: /* @__PURE__ */ n(Un, {})
|
|
12790
12767
|
}
|
|
12791
12768
|
),
|
|
12792
12769
|
children: [
|
|
@@ -12935,7 +12912,7 @@ function Pd({
|
|
|
12935
12912
|
{
|
|
12936
12913
|
size: "small",
|
|
12937
12914
|
className: "h-7 w-7",
|
|
12938
|
-
children: /* @__PURE__ */ n(
|
|
12915
|
+
children: /* @__PURE__ */ n(Un, {})
|
|
12939
12916
|
}
|
|
12940
12917
|
),
|
|
12941
12918
|
children: [
|
|
@@ -13005,7 +12982,7 @@ function pi(e) {
|
|
|
13005
12982
|
return "date";
|
|
13006
12983
|
if (e?.isEntityReference && e?.isEntityReference())
|
|
13007
12984
|
return "reference";
|
|
13008
|
-
if (e instanceof
|
|
12985
|
+
if (e instanceof io)
|
|
13009
12986
|
return "geopoint";
|
|
13010
12987
|
if (typeof e == "object")
|
|
13011
12988
|
return "map";
|
|
@@ -13218,7 +13195,7 @@ function Rd({
|
|
|
13218
13195
|
};
|
|
13219
13196
|
return /* @__PURE__ */ v("div", { className: U(kr, "bg-transparent p-4 my-4 py-8"), children: [
|
|
13220
13197
|
/* @__PURE__ */ n(
|
|
13221
|
-
|
|
13198
|
+
Fn,
|
|
13222
13199
|
{
|
|
13223
13200
|
name: h,
|
|
13224
13201
|
children: (w) => {
|
|
@@ -13275,7 +13252,7 @@ function Rd({
|
|
|
13275
13252
|
/* @__PURE__ */ n(Dt, { ...g }, `form_control_${e}_${d}`)
|
|
13276
13253
|
] });
|
|
13277
13254
|
}
|
|
13278
|
-
const Td = new
|
|
13255
|
+
const Td = new Ns();
|
|
13279
13256
|
try {
|
|
13280
13257
|
cr.use(Yr.AutoResize, {
|
|
13281
13258
|
min: 100
|
|
@@ -13297,8 +13274,8 @@ function Od({
|
|
|
13297
13274
|
context: f
|
|
13298
13275
|
}) {
|
|
13299
13276
|
const [m, p] = S.useState(t), h = ce(t);
|
|
13300
|
-
|
|
13301
|
-
const A =
|
|
13277
|
+
is("MarkdownFieldBinding", Md);
|
|
13278
|
+
const A = Ia({
|
|
13302
13279
|
internalValue: m,
|
|
13303
13280
|
value: t
|
|
13304
13281
|
});
|
|
@@ -13329,7 +13306,7 @@ function Od({
|
|
|
13329
13306
|
value: m ?? "",
|
|
13330
13307
|
className: U(
|
|
13331
13308
|
pr,
|
|
13332
|
-
o ?
|
|
13309
|
+
o ? Ln : xr,
|
|
13333
13310
|
"text-base"
|
|
13334
13311
|
),
|
|
13335
13312
|
readOnly: o,
|
|
@@ -14026,7 +14003,7 @@ const Vi = {
|
|
|
14026
14003
|
key: "text_field",
|
|
14027
14004
|
name: "Text field",
|
|
14028
14005
|
description: "Simple short text",
|
|
14029
|
-
Icon:
|
|
14006
|
+
Icon: ns,
|
|
14030
14007
|
color: "#2d7ff9",
|
|
14031
14008
|
property: {
|
|
14032
14009
|
dataType: "string",
|
|
@@ -14037,7 +14014,7 @@ const Vi = {
|
|
|
14037
14014
|
key: "multiline",
|
|
14038
14015
|
name: "Multiline",
|
|
14039
14016
|
description: "Text with multiple lines",
|
|
14040
|
-
Icon:
|
|
14017
|
+
Icon: os,
|
|
14041
14018
|
color: "#2d7ff9",
|
|
14042
14019
|
property: {
|
|
14043
14020
|
dataType: "string",
|
|
@@ -14049,7 +14026,7 @@ const Vi = {
|
|
|
14049
14026
|
key: "markdown",
|
|
14050
14027
|
name: "Markdown",
|
|
14051
14028
|
description: "Text with advanced markdown syntax",
|
|
14052
|
-
Icon:
|
|
14029
|
+
Icon: as,
|
|
14053
14030
|
color: "#2d7ff9",
|
|
14054
14031
|
property: {
|
|
14055
14032
|
dataType: "string",
|
|
@@ -14061,7 +14038,7 @@ const Vi = {
|
|
|
14061
14038
|
key: "url",
|
|
14062
14039
|
name: "Url",
|
|
14063
14040
|
description: "Text with URL validation",
|
|
14064
|
-
Icon:
|
|
14041
|
+
Icon: ss,
|
|
14065
14042
|
color: "#154fb3",
|
|
14066
14043
|
property: {
|
|
14067
14044
|
dataType: "string",
|
|
@@ -14073,7 +14050,7 @@ const Vi = {
|
|
|
14073
14050
|
key: "email",
|
|
14074
14051
|
name: "Email",
|
|
14075
14052
|
description: "Text with email validation",
|
|
14076
|
-
Icon:
|
|
14053
|
+
Icon: ls,
|
|
14077
14054
|
color: "#154fb3",
|
|
14078
14055
|
property: {
|
|
14079
14056
|
dataType: "string",
|
|
@@ -14085,7 +14062,7 @@ const Vi = {
|
|
|
14085
14062
|
key: "switch",
|
|
14086
14063
|
name: "Switch",
|
|
14087
14064
|
description: "Boolean true or false field (or yes or no, 0 or 1...)",
|
|
14088
|
-
Icon:
|
|
14065
|
+
Icon: cs,
|
|
14089
14066
|
color: "#20d9d2",
|
|
14090
14067
|
property: {
|
|
14091
14068
|
dataType: "boolean",
|
|
@@ -14096,19 +14073,19 @@ const Vi = {
|
|
|
14096
14073
|
key: "select",
|
|
14097
14074
|
name: "Select/enum",
|
|
14098
14075
|
description: "Select one text value from within an enumeration",
|
|
14099
|
-
Icon:
|
|
14076
|
+
Icon: ds,
|
|
14100
14077
|
color: "#4223c9",
|
|
14101
14078
|
property: {
|
|
14102
14079
|
dataType: "string",
|
|
14103
14080
|
enumValues: [],
|
|
14104
|
-
Field:
|
|
14081
|
+
Field: Cn
|
|
14105
14082
|
}
|
|
14106
14083
|
},
|
|
14107
14084
|
multi_select: {
|
|
14108
14085
|
key: "multi_select",
|
|
14109
14086
|
name: "Multi select",
|
|
14110
14087
|
description: "Select multiple text values from within an enumeration",
|
|
14111
|
-
Icon:
|
|
14088
|
+
Icon: us,
|
|
14112
14089
|
color: "#4223c9",
|
|
14113
14090
|
property: {
|
|
14114
14091
|
dataType: "array",
|
|
@@ -14116,14 +14093,14 @@ const Vi = {
|
|
|
14116
14093
|
dataType: "string",
|
|
14117
14094
|
enumValues: []
|
|
14118
14095
|
},
|
|
14119
|
-
Field:
|
|
14096
|
+
Field: Bn
|
|
14120
14097
|
}
|
|
14121
14098
|
},
|
|
14122
14099
|
number_input: {
|
|
14123
14100
|
key: "number_input",
|
|
14124
14101
|
name: "Number input",
|
|
14125
14102
|
description: "Simple number field with validation",
|
|
14126
|
-
Icon:
|
|
14103
|
+
Icon: ms,
|
|
14127
14104
|
color: "#bec920",
|
|
14128
14105
|
property: {
|
|
14129
14106
|
dataType: "number",
|
|
@@ -14139,7 +14116,7 @@ const Vi = {
|
|
|
14139
14116
|
property: {
|
|
14140
14117
|
dataType: "number",
|
|
14141
14118
|
enumValues: [],
|
|
14142
|
-
Field:
|
|
14119
|
+
Field: Cn
|
|
14143
14120
|
}
|
|
14144
14121
|
},
|
|
14145
14122
|
multi_number_select: {
|
|
@@ -14154,28 +14131,28 @@ const Vi = {
|
|
|
14154
14131
|
dataType: "number",
|
|
14155
14132
|
enumValues: []
|
|
14156
14133
|
},
|
|
14157
|
-
Field:
|
|
14134
|
+
Field: Bn
|
|
14158
14135
|
}
|
|
14159
14136
|
},
|
|
14160
14137
|
file_upload: {
|
|
14161
14138
|
key: "file_upload",
|
|
14162
14139
|
name: "File upload",
|
|
14163
14140
|
description: "Input for uploading single files",
|
|
14164
|
-
Icon:
|
|
14141
|
+
Icon: ps,
|
|
14165
14142
|
color: "#f92d9a",
|
|
14166
14143
|
property: {
|
|
14167
14144
|
dataType: "string",
|
|
14168
14145
|
storage: {
|
|
14169
14146
|
storagePath: "{path}"
|
|
14170
14147
|
},
|
|
14171
|
-
Field:
|
|
14148
|
+
Field: Sn
|
|
14172
14149
|
}
|
|
14173
14150
|
},
|
|
14174
14151
|
multi_file_upload: {
|
|
14175
14152
|
key: "multi_file_upload",
|
|
14176
14153
|
name: "Multiple file upload",
|
|
14177
14154
|
description: "Input for uploading multiple files",
|
|
14178
|
-
Icon:
|
|
14155
|
+
Icon: fs,
|
|
14179
14156
|
color: "#f92d9a",
|
|
14180
14157
|
property: {
|
|
14181
14158
|
dataType: "array",
|
|
@@ -14185,14 +14162,14 @@ const Vi = {
|
|
|
14185
14162
|
storagePath: "{path}"
|
|
14186
14163
|
}
|
|
14187
14164
|
},
|
|
14188
|
-
Field:
|
|
14165
|
+
Field: Sn
|
|
14189
14166
|
}
|
|
14190
14167
|
},
|
|
14191
14168
|
reference: {
|
|
14192
14169
|
key: "reference",
|
|
14193
14170
|
name: "Reference",
|
|
14194
14171
|
description: "The value refers to a different collection",
|
|
14195
|
-
Icon:
|
|
14172
|
+
Icon: hs,
|
|
14196
14173
|
color: "#ff0042",
|
|
14197
14174
|
property: {
|
|
14198
14175
|
dataType: "reference",
|
|
@@ -14203,7 +14180,7 @@ const Vi = {
|
|
|
14203
14180
|
key: "multi_references",
|
|
14204
14181
|
name: "Multiple references",
|
|
14205
14182
|
description: "Multiple values that refer to a different collection",
|
|
14206
|
-
Icon:
|
|
14183
|
+
Icon: gs,
|
|
14207
14184
|
color: "#ff0042",
|
|
14208
14185
|
property: {
|
|
14209
14186
|
dataType: "array",
|
|
@@ -14217,7 +14194,7 @@ const Vi = {
|
|
|
14217
14194
|
key: "date_time",
|
|
14218
14195
|
name: "Date/time",
|
|
14219
14196
|
description: "A date time select field",
|
|
14220
|
-
Icon:
|
|
14197
|
+
Icon: As,
|
|
14221
14198
|
color: "#8b46ff",
|
|
14222
14199
|
property: {
|
|
14223
14200
|
dataType: "date",
|
|
@@ -14278,7 +14255,7 @@ const Vi = {
|
|
|
14278
14255
|
key: "block",
|
|
14279
14256
|
name: "Block",
|
|
14280
14257
|
description: "A complex field that allows the user to compose different fields together, with a key->value format",
|
|
14281
|
-
Icon:
|
|
14258
|
+
Icon: bs,
|
|
14282
14259
|
color: "#ff9408",
|
|
14283
14260
|
property: {
|
|
14284
14261
|
dataType: "array",
|
|
@@ -14298,7 +14275,7 @@ function Gd(e) {
|
|
|
14298
14275
|
return Vi[t];
|
|
14299
14276
|
}
|
|
14300
14277
|
function Qr(e, t) {
|
|
14301
|
-
const r =
|
|
14278
|
+
const r = ca(e), i = Gi(e);
|
|
14302
14279
|
if (!i) {
|
|
14303
14280
|
console.error("No field id found for property", e);
|
|
14304
14281
|
return;
|
|
@@ -14326,7 +14303,7 @@ function Gi(e) {
|
|
|
14326
14303
|
}
|
|
14327
14304
|
console.error("Unsupported field config mapping", e);
|
|
14328
14305
|
}
|
|
14329
|
-
function
|
|
14306
|
+
function ca(e) {
|
|
14330
14307
|
return e.propertyConfig ? e.propertyConfig : Gi(e);
|
|
14331
14308
|
}
|
|
14332
14309
|
const Le = ({
|
|
@@ -14392,7 +14369,7 @@ function Ye({
|
|
|
14392
14369
|
} else {
|
|
14393
14370
|
const o = e;
|
|
14394
14371
|
if (o.dataType === "map" && o.properties) {
|
|
14395
|
-
const s =
|
|
14372
|
+
const s = da({
|
|
14396
14373
|
ignoreMissingFields: r,
|
|
14397
14374
|
...i,
|
|
14398
14375
|
properties: o.properties
|
|
@@ -14403,16 +14380,14 @@ function Ye({
|
|
|
14403
14380
|
fromBuilder: t,
|
|
14404
14381
|
properties: s
|
|
14405
14382
|
};
|
|
14406
|
-
} else
|
|
14407
|
-
o
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
}) : (o.dataType === "string" || o.dataType === "number") && o.enumValues && (a = da(o, t));
|
|
14383
|
+
} else o.dataType === "array" ? a = At({
|
|
14384
|
+
property: o,
|
|
14385
|
+
fromBuilder: t,
|
|
14386
|
+
ignoreMissingFields: r,
|
|
14387
|
+
...i
|
|
14388
|
+
}) : (o.dataType === "string" || o.dataType === "number") && o.enumValues && (a = ua(o, t));
|
|
14413
14389
|
}
|
|
14414
|
-
else
|
|
14415
|
-
return null;
|
|
14390
|
+
else return null;
|
|
14416
14391
|
if (a || (a = {
|
|
14417
14392
|
...e,
|
|
14418
14393
|
resolved: !0,
|
|
@@ -14493,7 +14468,7 @@ function At({
|
|
|
14493
14468
|
ignoreMissingFields: r,
|
|
14494
14469
|
...i
|
|
14495
14470
|
});
|
|
14496
|
-
}).filter((c) => !!c) : [], l =
|
|
14471
|
+
}).filter((c) => !!c) : [], l = da({
|
|
14497
14472
|
properties: t.oneOf.properties,
|
|
14498
14473
|
ignoreMissingFields: r,
|
|
14499
14474
|
...i
|
|
@@ -14518,7 +14493,7 @@ function At({
|
|
|
14518
14493
|
throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`");
|
|
14519
14494
|
}
|
|
14520
14495
|
}
|
|
14521
|
-
function
|
|
14496
|
+
function da({
|
|
14522
14497
|
properties: e,
|
|
14523
14498
|
ignoreMissingFields: t,
|
|
14524
14499
|
...r
|
|
@@ -14535,7 +14510,7 @@ function ca({
|
|
|
14535
14510
|
} : {};
|
|
14536
14511
|
}).filter((i) => i !== null).reduce((i, a) => ({ ...i, ...a }), {});
|
|
14537
14512
|
}
|
|
14538
|
-
function
|
|
14513
|
+
function ua(e, t) {
|
|
14539
14514
|
return typeof e.enumValues == "object" ? {
|
|
14540
14515
|
...e,
|
|
14541
14516
|
resolved: !0,
|
|
@@ -14549,7 +14524,7 @@ function Qm(e) {
|
|
|
14549
14524
|
label: r
|
|
14550
14525
|
} : r) : Array.isArray(e) ? e : void 0;
|
|
14551
14526
|
}
|
|
14552
|
-
function
|
|
14527
|
+
function ma(e, t) {
|
|
14553
14528
|
return typeof e == "string" ? t?.find((r) => r.key === e) : e;
|
|
14554
14529
|
}
|
|
14555
14530
|
function ji(e) {
|
|
@@ -14579,7 +14554,7 @@ function ji(e) {
|
|
|
14579
14554
|
const g = p.slice(1).join("/");
|
|
14580
14555
|
if (!d)
|
|
14581
14556
|
throw Error("collection not found resolving path: " + d);
|
|
14582
|
-
const y = d.entityViews, w = y && y.map((b) =>
|
|
14557
|
+
const y = d.entityViews, w = y && y.map((b) => ma(b, e.contextEntityViews)).filter(Boolean).find((b) => b.key === g);
|
|
14583
14558
|
if (w) {
|
|
14584
14559
|
const b = i && i.length > 0 ? i + "/" + w.key : w.key;
|
|
14585
14560
|
s.push({
|
|
@@ -14587,13 +14562,12 @@ function ji(e) {
|
|
|
14587
14562
|
path: b,
|
|
14588
14563
|
view: w
|
|
14589
14564
|
});
|
|
14590
|
-
} else
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14595
|
-
|
|
14596
|
-
}));
|
|
14565
|
+
} else d.subcollections && s.push(...ji({
|
|
14566
|
+
path: g,
|
|
14567
|
+
collections: d.subcollections,
|
|
14568
|
+
currentFullPath: A,
|
|
14569
|
+
contextEntityViews: e.contextEntityViews
|
|
14570
|
+
}));
|
|
14597
14571
|
}
|
|
14598
14572
|
}
|
|
14599
14573
|
break;
|
|
@@ -14708,7 +14682,7 @@ const Ud = ({ containerRef: e }) => {
|
|
|
14708
14682
|
`#form_field_${a[0]}`
|
|
14709
14683
|
);
|
|
14710
14684
|
if (o && e?.current) {
|
|
14711
|
-
const s =
|
|
14685
|
+
const s = pa(e.current);
|
|
14712
14686
|
if (s) {
|
|
14713
14687
|
const c = o.getBoundingClientRect().top;
|
|
14714
14688
|
s.scrollTo({
|
|
@@ -14724,7 +14698,7 @@ const Ud = ({ containerRef: e }) => {
|
|
|
14724
14698
|
}, $d = (e) => {
|
|
14725
14699
|
const t = e && e.scrollHeight > e.clientHeight, r = e ? window.getComputedStyle(e).overflowY : null, i = r && r.indexOf("hidden") !== -1;
|
|
14726
14700
|
return t && !i;
|
|
14727
|
-
},
|
|
14701
|
+
}, pa = (e) => !e || e === document.body ? document.body : $d(e) ? e : pa(e.parentNode);
|
|
14728
14702
|
function qd({ propertyId: e }) {
|
|
14729
14703
|
const [t, r] = P(!1);
|
|
14730
14704
|
return /* @__PURE__ */ v("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
|
|
@@ -14762,7 +14736,7 @@ function Wd({
|
|
|
14762
14736
|
dataLoading: i,
|
|
14763
14737
|
// eslint-disable-next-line no-unused-vars
|
|
14764
14738
|
dataLoadingError: a
|
|
14765
|
-
} =
|
|
14739
|
+
} = Co({
|
|
14766
14740
|
path: t.path,
|
|
14767
14741
|
entityId: e,
|
|
14768
14742
|
collection: t.collection,
|
|
@@ -14807,7 +14781,7 @@ function Jd({
|
|
|
14807
14781
|
path: e,
|
|
14808
14782
|
values: d?.values,
|
|
14809
14783
|
fields: k.propertyConfigs
|
|
14810
|
-
}), [d?.values, e, k.propertyConfigs]), D = i ? "copy" : t ? "existing" : "new", [F, z] = P(D), $ = (F === "new" || F === "copy") && !!Q.customId && Q.customId !== "optional", oe = he(() => F === "new" || F === "copy" ? $ ? void 0 : y.generateEntityId(e) : t, [t, F]), [L, X] = S.useState(oe), [q, V] = S.useState(!1), [ae, te] = S.useState(), [Ae, ue] = S.useState(!1), se = r ??
|
|
14784
|
+
}), [d?.values, e, k.propertyConfigs]), D = i ? "copy" : t ? "existing" : "new", [F, z] = P(D), $ = (F === "new" || F === "copy") && !!Q.customId && Q.customId !== "optional", oe = he(() => F === "new" || F === "copy" ? $ ? void 0 : y.generateEntityId(e) : t, [t, F]), [L, X] = S.useState(oe), [q, V] = S.useState(!1), [ae, te] = S.useState(), [Ae, ue] = S.useState(!1), se = r ?? co(
|
|
14811
14785
|
a ? a.defaultSelectedView : void 0,
|
|
14812
14786
|
{
|
|
14813
14787
|
status: F,
|
|
@@ -14820,7 +14794,7 @@ function Jd({
|
|
|
14820
14794
|
if (F === "new")
|
|
14821
14795
|
ie(!1);
|
|
14822
14796
|
else {
|
|
14823
|
-
const N = me ?
|
|
14797
|
+
const N = me ? po(a, g, e, me ?? null) : !1;
|
|
14824
14798
|
me && ie(!N);
|
|
14825
14799
|
}
|
|
14826
14800
|
}, [g, me, F]);
|
|
@@ -14857,7 +14831,7 @@ function Jd({
|
|
|
14857
14831
|
entityId: Ge,
|
|
14858
14832
|
collection: it,
|
|
14859
14833
|
path: zt
|
|
14860
|
-
}) => (m(!0),
|
|
14834
|
+
}) => (m(!0), Bo({
|
|
14861
14835
|
path: zt,
|
|
14862
14836
|
entityId: Ge,
|
|
14863
14837
|
values: N,
|
|
@@ -14897,8 +14871,7 @@ function Jd({
|
|
|
14897
14871
|
return;
|
|
14898
14872
|
}
|
|
14899
14873
|
if (te(void 0), V(!1), F === "existing") {
|
|
14900
|
-
if (!d?.id)
|
|
14901
|
-
throw Error("Form misconfiguration when saving, no id for existing entity");
|
|
14874
|
+
if (!d?.id) throw Error("Form misconfiguration when saving, no id for existing entity");
|
|
14902
14875
|
} else if (F === "new" || F === "copy") {
|
|
14903
14876
|
if (A.customId && A.customId !== "optional" && !L)
|
|
14904
14877
|
throw Error("Form misconfiguration when saving, entityId should be set");
|
|
@@ -14913,10 +14886,10 @@ function Jd({
|
|
|
14913
14886
|
}).finally(() => {
|
|
14914
14887
|
Z.setSubmitting(!1);
|
|
14915
14888
|
});
|
|
14916
|
-
}, re =
|
|
14889
|
+
}, re = In({
|
|
14917
14890
|
initialValues: T.current,
|
|
14918
14891
|
onSubmit: rt,
|
|
14919
|
-
validation: (N) =>
|
|
14892
|
+
validation: (N) => Aa?.validate(N, { abortEarly: !1 }).then(() => ({})).catch((Z) => {
|
|
14920
14893
|
const ve = {};
|
|
14921
14894
|
return Z.inner.forEach((Ge) => {
|
|
14922
14895
|
ve[Ge.path] = Ge.message;
|
|
@@ -14953,7 +14926,7 @@ function Jd({
|
|
|
14953
14926
|
path: e,
|
|
14954
14927
|
save: Rt,
|
|
14955
14928
|
formex: re
|
|
14956
|
-
}, Tt = j ? j.map((N) =>
|
|
14929
|
+
}, Tt = j ? j.map((N) => ma(N, k.entityViews)).filter(Boolean) : [], Dr = Tt.find((N) => N.key === ee.current), Rr = !I && (ee.current === Gt || Dr?.includeActions), Tr = j && Tt.map(
|
|
14957
14930
|
(N, Z) => {
|
|
14958
14931
|
if (!N || ee.current !== N.key)
|
|
14959
14932
|
return null;
|
|
@@ -14990,7 +14963,7 @@ function Jd({
|
|
|
14990
14963
|
children: [
|
|
14991
14964
|
Or && /* @__PURE__ */ n(yr, {}),
|
|
14992
14965
|
!bt && (me && Ge ? /* @__PURE__ */ n(
|
|
14993
|
-
|
|
14966
|
+
ra,
|
|
14994
14967
|
{
|
|
14995
14968
|
fullPath: Ge,
|
|
14996
14969
|
parentCollectionIds: [...o, a.id],
|
|
@@ -15048,7 +15021,7 @@ function Jd({
|
|
|
15048
15021
|
`actions_${Z.key}`
|
|
15049
15022
|
) : null).filter(Boolean));
|
|
15050
15023
|
}
|
|
15051
|
-
const Ot =
|
|
15024
|
+
const Ot = fo(Be, k.propertyConfigs), ga = re.values && Ot ? dt(re.values, Ot) : void 0, Li = A.callbacks?.onIdUpdate, Ui = x(async () => {
|
|
15052
15025
|
if (Li && re.values && (F === "new" || F === "copy")) {
|
|
15053
15026
|
ue(!0);
|
|
15054
15027
|
try {
|
|
@@ -15076,19 +15049,19 @@ function Jd({
|
|
|
15076
15049
|
property: ve
|
|
15077
15050
|
}) => y.checkUniqueField(e, N, Z, L),
|
|
15078
15051
|
[y, e, L]
|
|
15079
|
-
),
|
|
15080
|
-
() => L ?
|
|
15052
|
+
), Aa = he(
|
|
15053
|
+
() => L ? Yo(
|
|
15081
15054
|
L,
|
|
15082
15055
|
Be.properties,
|
|
15083
15056
|
$i
|
|
15084
15057
|
) : void 0,
|
|
15085
15058
|
[L, Be.properties, $i]
|
|
15086
|
-
),
|
|
15059
|
+
), ba = x(({
|
|
15087
15060
|
entity: N,
|
|
15088
15061
|
customEntityActions: Z
|
|
15089
15062
|
}) => {
|
|
15090
15063
|
const ve = $t(A, g, e, null), Ge = N ? Fi(A, g, e, N) : !0, it = [];
|
|
15091
|
-
return ve && it.push(
|
|
15064
|
+
return ve && it.push(ea), Ge && it.push(ta), Z && it.push(...Z), it;
|
|
15092
15065
|
}, [g, A, e]), Mr = re.dirty;
|
|
15093
15066
|
M(() => {
|
|
15094
15067
|
I ? re.values && !J(re.values, ir.current) && Rt(re.values) : s(Mr);
|
|
@@ -15098,13 +15071,12 @@ function Jd({
|
|
|
15098
15071
|
!J(Z, ve) && !re.touched[N] && (console.debug("Updated value from the datasource:", N, Z), re.setFieldValue(N, Z !== void 0 ? Z : null));
|
|
15099
15072
|
});
|
|
15100
15073
|
}, [re.isSubmitting, I, Mt, d, re.values, re.touched, re.setFieldValue]);
|
|
15101
|
-
const
|
|
15074
|
+
const ya = /* @__PURE__ */ n(O, { children: (Be.propertiesOrder ?? Object.keys(Be.properties)).map((N) => {
|
|
15102
15075
|
const Z = Be.properties[N];
|
|
15103
15076
|
if (!Z)
|
|
15104
15077
|
return console.warn(`Property ${N} not found in collection ${Be.name}`), null;
|
|
15105
15078
|
const ve = !!Mt && Object.keys(Mt).includes(N) && !!re.touched[N], Ge = !I && re.isSubmitting || er(Z) || !!Z.disabled;
|
|
15106
|
-
if (Si(Z))
|
|
15107
|
-
return null;
|
|
15079
|
+
if (Si(Z)) return null;
|
|
15108
15080
|
const zt = {
|
|
15109
15081
|
propertyKey: N,
|
|
15110
15082
|
disabled: Ge,
|
|
@@ -15135,10 +15107,10 @@ function Jd({
|
|
|
15135
15107
|
},
|
|
15136
15108
|
`field_${Be.name}_${N}`
|
|
15137
15109
|
);
|
|
15138
|
-
}).filter(Boolean) }), zr = re.isSubmitting || !Mr && F === "existing", qi = S.useRef(null), Wi =
|
|
15110
|
+
}).filter(Boolean) }), zr = re.isSubmitting || !Mr && F === "existing", qi = S.useRef(null), Wi = ba({
|
|
15139
15111
|
entity: d,
|
|
15140
15112
|
customEntityActions: A.entityActions
|
|
15141
|
-
}).filter((N) => N.includeInForm === void 0 || N.includeInForm),
|
|
15113
|
+
}).filter((N) => N.includeInForm === void 0 || N.includeInForm), wa = /* @__PURE__ */ v(It, { position: "absolute", children: [
|
|
15142
15114
|
ae && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n(Y, { color: "error", children: ae.message }) }),
|
|
15143
15115
|
d && Wi.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: Wi.map((N) => /* @__PURE__ */ n(
|
|
15144
15116
|
de,
|
|
@@ -15202,7 +15174,7 @@ function Jd({
|
|
|
15202
15174
|
}
|
|
15203
15175
|
)
|
|
15204
15176
|
] });
|
|
15205
|
-
function
|
|
15177
|
+
function va() {
|
|
15206
15178
|
let N = /* @__PURE__ */ v("div", { className: "h-full overflow-auto", children: [
|
|
15207
15179
|
Je.length > 0 && /* @__PURE__ */ n(
|
|
15208
15180
|
"div",
|
|
@@ -15222,10 +15194,10 @@ function Jd({
|
|
|
15222
15194
|
{
|
|
15223
15195
|
className: "mt-4 flex-grow line-clamp-1 " + A.hideIdFromForm ? "mb-2" : "mb-0",
|
|
15224
15196
|
variant: "h4",
|
|
15225
|
-
children:
|
|
15197
|
+
children: ga ?? A.singularName ?? A.name
|
|
15226
15198
|
}
|
|
15227
15199
|
),
|
|
15228
|
-
/* @__PURE__ */ n(
|
|
15200
|
+
/* @__PURE__ */ n(ws, { color: "base", className: "w-full", size: "small", children: /* @__PURE__ */ v("code", { className: "text-xs select-all", children: [
|
|
15229
15201
|
e,
|
|
15230
15202
|
"/",
|
|
15231
15203
|
L
|
|
@@ -15252,7 +15224,7 @@ function Jd({
|
|
|
15252
15224
|
className: "mt-12 flex flex-col gap-8",
|
|
15253
15225
|
ref: qi,
|
|
15254
15226
|
children: [
|
|
15255
|
-
|
|
15227
|
+
ya,
|
|
15256
15228
|
/* @__PURE__ */ n(Ud, { containerRef: qi })
|
|
15257
15229
|
]
|
|
15258
15230
|
}
|
|
@@ -15278,7 +15250,7 @@ function Jd({
|
|
|
15278
15250
|
));
|
|
15279
15251
|
}), /* @__PURE__ */ n(pe, { children: N });
|
|
15280
15252
|
}
|
|
15281
|
-
const
|
|
15253
|
+
const ka = Xe === void 0 ? /* @__PURE__ */ n(O, {}) : Xe ? /* @__PURE__ */ v(O, { children: [
|
|
15282
15254
|
/* @__PURE__ */ n(
|
|
15283
15255
|
Y,
|
|
15284
15256
|
{
|
|
@@ -15288,7 +15260,7 @@ function Jd({
|
|
|
15288
15260
|
}
|
|
15289
15261
|
),
|
|
15290
15262
|
/* @__PURE__ */ n(
|
|
15291
|
-
|
|
15263
|
+
Mo,
|
|
15292
15264
|
{
|
|
15293
15265
|
className: "px-12",
|
|
15294
15266
|
entity: me,
|
|
@@ -15296,7 +15268,7 @@ function Jd({
|
|
|
15296
15268
|
collection: a
|
|
15297
15269
|
}
|
|
15298
15270
|
)
|
|
15299
|
-
] }) :
|
|
15271
|
+
] }) : va(), _a = K && K.map(
|
|
15300
15272
|
(N) => /* @__PURE__ */ n(
|
|
15301
15273
|
jr,
|
|
15302
15274
|
{
|
|
@@ -15306,7 +15278,7 @@ function Jd({
|
|
|
15306
15278
|
},
|
|
15307
15279
|
`entity_detail_collection_tab_${N.name}`
|
|
15308
15280
|
)
|
|
15309
|
-
),
|
|
15281
|
+
), xa = Tt.map(
|
|
15310
15282
|
(N) => /* @__PURE__ */ n(
|
|
15311
15283
|
jr,
|
|
15312
15284
|
{
|
|
@@ -15319,7 +15291,7 @@ function Jd({
|
|
|
15319
15291
|
);
|
|
15320
15292
|
return M(() => {
|
|
15321
15293
|
L && we && we(L);
|
|
15322
|
-
}, [L, we]), /* @__PURE__ */ n(
|
|
15294
|
+
}, [L, we]), /* @__PURE__ */ n(Nn, { value: re, children: /* @__PURE__ */ v("div", { className: "flex flex-col h-full w-full transition-width duration-250 ease-in-out", children: [
|
|
15323
15295
|
/* @__PURE__ */ v(
|
|
15324
15296
|
"div",
|
|
15325
15297
|
{
|
|
@@ -15333,7 +15305,7 @@ function Jd({
|
|
|
15333
15305
|
de,
|
|
15334
15306
|
{
|
|
15335
15307
|
onClick: () => (c?.(), w.close(!1)),
|
|
15336
|
-
children: /* @__PURE__ */ n(
|
|
15308
|
+
children: /* @__PURE__ */ n(Yn, { size: "small" })
|
|
15337
15309
|
}
|
|
15338
15310
|
)
|
|
15339
15311
|
}
|
|
@@ -15347,7 +15319,7 @@ function Jd({
|
|
|
15347
15319
|
}
|
|
15348
15320
|
),
|
|
15349
15321
|
/* @__PURE__ */ v(
|
|
15350
|
-
|
|
15322
|
+
ys,
|
|
15351
15323
|
{
|
|
15352
15324
|
value: ee.current,
|
|
15353
15325
|
onValueChange: (N) => {
|
|
@@ -15364,8 +15336,8 @@ function Jd({
|
|
|
15364
15336
|
children: a.singularName ?? a.name
|
|
15365
15337
|
}
|
|
15366
15338
|
),
|
|
15367
|
-
|
|
15368
|
-
|
|
15339
|
+
xa,
|
|
15340
|
+
_a
|
|
15369
15341
|
]
|
|
15370
15342
|
}
|
|
15371
15343
|
)
|
|
@@ -15387,12 +15359,12 @@ function Jd({
|
|
|
15387
15359
|
hidden: !ne,
|
|
15388
15360
|
id: `form_${e}`,
|
|
15389
15361
|
className: " w-full",
|
|
15390
|
-
children: bt ? /* @__PURE__ */ n(yr, {}) :
|
|
15362
|
+
children: bt ? /* @__PURE__ */ n(yr, {}) : ka
|
|
15391
15363
|
}
|
|
15392
15364
|
),
|
|
15393
15365
|
Tr,
|
|
15394
15366
|
W,
|
|
15395
|
-
Rr &&
|
|
15367
|
+
Rr && wa
|
|
15396
15368
|
]
|
|
15397
15369
|
}
|
|
15398
15370
|
)
|
|
@@ -15420,7 +15392,7 @@ function Zd(e) {
|
|
|
15420
15392
|
return t;
|
|
15421
15393
|
}
|
|
15422
15394
|
function Xd(e, t) {
|
|
15423
|
-
const [r, i] = S.useState(), { navigator: a } = S.useContext(
|
|
15395
|
+
const [r, i] = S.useState(), { navigator: a } = S.useContext(_s), o = Kt(), s = () => {
|
|
15424
15396
|
i(void 0);
|
|
15425
15397
|
}, l = () => {
|
|
15426
15398
|
t(), i(void 0), o(-1);
|
|
@@ -15439,8 +15411,7 @@ function Xd(e, t) {
|
|
|
15439
15411
|
}
|
|
15440
15412
|
}, []);
|
|
15441
15413
|
return S.useEffect(() => {
|
|
15442
|
-
if (!e || r || !("block" in a))
|
|
15443
|
-
return;
|
|
15414
|
+
if (!e || r || !("block" in a)) return;
|
|
15444
15415
|
const d = a.block((u) => {
|
|
15445
15416
|
const f = {
|
|
15446
15417
|
...u,
|
|
@@ -15483,7 +15454,7 @@ function Kd({
|
|
|
15483
15454
|
}
|
|
15484
15455
|
);
|
|
15485
15456
|
}
|
|
15486
|
-
const
|
|
15457
|
+
const fa = S.createContext({
|
|
15487
15458
|
width: "",
|
|
15488
15459
|
blocked: !1,
|
|
15489
15460
|
setBlocked: (e) => {
|
|
@@ -15492,7 +15463,7 @@ const pa = S.createContext({
|
|
|
15492
15463
|
},
|
|
15493
15464
|
close: () => {
|
|
15494
15465
|
}
|
|
15495
|
-
}), Yi = () => $e(
|
|
15466
|
+
}), Yi = () => $e(fa);
|
|
15496
15467
|
function Dm() {
|
|
15497
15468
|
const t = Nr().sidePanels, r = [...t];
|
|
15498
15469
|
return r.push(void 0), /* @__PURE__ */ n(O, { children: r.map((i, a) => /* @__PURE__ */ n(
|
|
@@ -15527,7 +15498,7 @@ function eu({
|
|
|
15527
15498
|
a && !y ? i(!0) : (u.close(), t?.onClose?.());
|
|
15528
15499
|
};
|
|
15529
15500
|
return /* @__PURE__ */ v(
|
|
15530
|
-
|
|
15501
|
+
fa.Provider,
|
|
15531
15502
|
{
|
|
15532
15503
|
value: {
|
|
15533
15504
|
blocked: a,
|
|
@@ -15538,7 +15509,7 @@ function eu({
|
|
|
15538
15509
|
},
|
|
15539
15510
|
children: [
|
|
15540
15511
|
/* @__PURE__ */ v(
|
|
15541
|
-
|
|
15512
|
+
$n,
|
|
15542
15513
|
{
|
|
15543
15514
|
open: !!t,
|
|
15544
15515
|
onOpenChange: (y) => !y && g(),
|
|
@@ -15577,8 +15548,7 @@ function tu(e) {
|
|
|
15577
15548
|
setBlocked: r,
|
|
15578
15549
|
setBlockedNavigationMessage: i
|
|
15579
15550
|
} = Yi(), a = _e(), o = he(() => a.getParentCollectionIds(e.path), [a, e.path]), s = he(() => {
|
|
15580
|
-
if (!e)
|
|
15581
|
-
return;
|
|
15551
|
+
if (!e) return;
|
|
15582
15552
|
let c = e.collection;
|
|
15583
15553
|
const d = a.getCollection(e.path);
|
|
15584
15554
|
if (d && (c = d), !c)
|
|
@@ -15610,10 +15580,9 @@ function tu(e) {
|
|
|
15610
15580
|
}
|
|
15611
15581
|
) }) });
|
|
15612
15582
|
}
|
|
15613
|
-
const
|
|
15583
|
+
const ha = "new";
|
|
15614
15584
|
function ru(e, t) {
|
|
15615
|
-
if (t)
|
|
15616
|
-
return jd;
|
|
15585
|
+
if (t) return jd;
|
|
15617
15586
|
const r = !e.selectedSubPath;
|
|
15618
15587
|
let i;
|
|
15619
15588
|
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 ? iu(e.collection) : wr) : `calc(${Yd} + ${i ?? wr})`;
|
|
@@ -15638,15 +15607,14 @@ function mr(e, t = 0) {
|
|
|
15638
15607
|
if (e.dataType === "map" && e.properties) {
|
|
15639
15608
|
const r = Object.values(e.properties).flatMap((i) => mr(i, t + 1));
|
|
15640
15609
|
return Math.max(...r);
|
|
15641
|
-
} else
|
|
15642
|
-
return e.dataType === "array" && e.oneOf ? t + 3 : e.dataType === "array" && e.of ? Array.isArray(e.of) ? Math.max(...e.of.map((r) => mr(r, t + 1))) : mr(e.of, t + 1) : t + 1;
|
|
15610
|
+
} else return e.dataType === "array" && e.oneOf ? t + 3 : e.dataType === "array" && e.of ? Array.isArray(e.of) ? Math.max(...e.of.map((r) => mr(r, t + 1))) : mr(e.of, t + 1) : t + 1;
|
|
15643
15611
|
}
|
|
15644
15612
|
const nu = (e, t) => {
|
|
15645
15613
|
const r = Cr(), i = ce(!1), a = !Ze();
|
|
15646
15614
|
M(() => {
|
|
15647
15615
|
if (!e.loading && !i.current) {
|
|
15648
15616
|
if (console.debug("Initialising side entity controller"), e.isUrlCollectionPath(r.pathname)) {
|
|
15649
|
-
const c = r.hash === `#${
|
|
15617
|
+
const c = r.hash === `#${ha}`, d = e.urlPathToDataPath(r.pathname), u = ou(d, e.collections ?? [], c);
|
|
15650
15618
|
for (let f = 0; f < u.length; f++) {
|
|
15651
15619
|
const m = u[f];
|
|
15652
15620
|
setTimeout(() => {
|
|
@@ -15662,7 +15630,7 @@ const nu = (e, t) => {
|
|
|
15662
15630
|
}, [t]), s = x((c) => {
|
|
15663
15631
|
if (c.copy && !c.entityId)
|
|
15664
15632
|
throw Error("If you want to copy an entity you need to provide an entityId");
|
|
15665
|
-
const d =
|
|
15633
|
+
const d = co(
|
|
15666
15634
|
c.collection ? c.collection.defaultSelectedView : void 0,
|
|
15667
15635
|
{
|
|
15668
15636
|
status: c.copy ? "copy" : c.entityId ? "existing" : "new",
|
|
@@ -15720,7 +15688,7 @@ function ou(e, t, r) {
|
|
|
15720
15688
|
}), a;
|
|
15721
15689
|
}
|
|
15722
15690
|
const or = (e, t, r, i) => {
|
|
15723
|
-
const a = Ee(e.path), o = e.entityId ? t(`${a}/${e.entityId}/${e.selectedSubPath || ""}`) : t(`${a}#${
|
|
15691
|
+
const a = Ee(e.path), o = e.entityId ? t(`${a}/${e.entityId}/${e.selectedSubPath || ""}`) : t(`${a}#${ha}`), s = r(e.path), l = {
|
|
15724
15692
|
...e,
|
|
15725
15693
|
path: s
|
|
15726
15694
|
};
|
|
@@ -16058,7 +16026,7 @@ function Rm(e) {
|
|
|
16058
16026
|
components: p,
|
|
16059
16027
|
navigationController: h
|
|
16060
16028
|
} = e;
|
|
16061
|
-
|
|
16029
|
+
vs(o);
|
|
16062
16030
|
const A = su({
|
|
16063
16031
|
delegate: c,
|
|
16064
16032
|
propertyConfigs: f,
|
|
@@ -16103,32 +16071,32 @@ function Rm(e) {
|
|
|
16103
16071
|
"Response from the server: ",
|
|
16104
16072
|
E?.message
|
|
16105
16073
|
] })
|
|
16106
|
-
] }) : /* @__PURE__ */ n(
|
|
16107
|
-
|
|
16074
|
+
] }) : /* @__PURE__ */ n(Eo.Provider, { value: k, children: /* @__PURE__ */ n(xo.Provider, { value: _, children: /* @__PURE__ */ n(
|
|
16075
|
+
ko.Provider,
|
|
16108
16076
|
{
|
|
16109
16077
|
value: i,
|
|
16110
16078
|
children: /* @__PURE__ */ n(
|
|
16111
|
-
|
|
16079
|
+
vo.Provider,
|
|
16112
16080
|
{
|
|
16113
16081
|
value: l,
|
|
16114
16082
|
children: /* @__PURE__ */ n(
|
|
16115
|
-
|
|
16083
|
+
Ao.Provider,
|
|
16116
16084
|
{
|
|
16117
16085
|
value: A,
|
|
16118
16086
|
children: /* @__PURE__ */ n(
|
|
16119
|
-
|
|
16087
|
+
eo.Provider,
|
|
16120
16088
|
{
|
|
16121
16089
|
value: s,
|
|
16122
16090
|
children: /* @__PURE__ */ n(
|
|
16123
|
-
|
|
16091
|
+
yo.Provider,
|
|
16124
16092
|
{
|
|
16125
16093
|
value: g,
|
|
16126
16094
|
children: /* @__PURE__ */ n(
|
|
16127
|
-
|
|
16095
|
+
wo.Provider,
|
|
16128
16096
|
{
|
|
16129
16097
|
value: y,
|
|
16130
16098
|
children: /* @__PURE__ */ n(
|
|
16131
|
-
|
|
16099
|
+
bo.Provider,
|
|
16132
16100
|
{
|
|
16133
16101
|
value: h,
|
|
16134
16102
|
children: /* @__PURE__ */ n(il, { children: /* @__PURE__ */ n(
|
|
@@ -16193,7 +16161,7 @@ const mu = 280, Tm = S.memo(
|
|
|
16193
16161
|
}, []), b = x(() => {
|
|
16194
16162
|
p(!1);
|
|
16195
16163
|
}, []), _ = m || !!(f && i && h);
|
|
16196
|
-
return /* @__PURE__ */ n(
|
|
16164
|
+
return /* @__PURE__ */ n(oa.Provider, { value: {
|
|
16197
16165
|
logo: a,
|
|
16198
16166
|
hasDrawer: u,
|
|
16199
16167
|
drawerHovered: h,
|
|
@@ -16289,7 +16257,7 @@ function fu(e) {
|
|
|
16289
16257
|
{
|
|
16290
16258
|
"aria-label": "Close drawer",
|
|
16291
16259
|
onClick: () => e.setDrawerOpen(!1),
|
|
16292
|
-
children: /* @__PURE__ */ n(
|
|
16260
|
+
children: /* @__PURE__ */ n(ks, {})
|
|
16293
16261
|
}
|
|
16294
16262
|
)
|
|
16295
16263
|
}
|
|
@@ -16324,7 +16292,7 @@ function fu(e) {
|
|
|
16324
16292
|
}
|
|
16325
16293
|
),
|
|
16326
16294
|
/* @__PURE__ */ n(
|
|
16327
|
-
|
|
16295
|
+
$n,
|
|
16328
16296
|
{
|
|
16329
16297
|
side: "left",
|
|
16330
16298
|
transparent: !0,
|
|
@@ -16344,7 +16312,7 @@ function hu({
|
|
|
16344
16312
|
onClick: o
|
|
16345
16313
|
}) {
|
|
16346
16314
|
const l = /* @__PURE__ */ v(
|
|
16347
|
-
|
|
16315
|
+
xs,
|
|
16348
16316
|
{
|
|
16349
16317
|
onClick: o,
|
|
16350
16318
|
style: {
|
|
@@ -16467,7 +16435,7 @@ function gu({
|
|
|
16467
16435
|
open: c,
|
|
16468
16436
|
side: "right",
|
|
16469
16437
|
sideOffset: 28,
|
|
16470
|
-
children: /* @__PURE__ */ n(
|
|
16438
|
+
children: /* @__PURE__ */ n(On, {})
|
|
16471
16439
|
}
|
|
16472
16440
|
),
|
|
16473
16441
|
i && /* @__PURE__ */ n(
|
|
@@ -16530,7 +16498,7 @@ function Au({ logo: e }) {
|
|
|
16530
16498
|
r ?? "w-[112px] h-[112px]"
|
|
16531
16499
|
)
|
|
16532
16500
|
}
|
|
16533
|
-
) : /* @__PURE__ */ n(
|
|
16501
|
+
) : /* @__PURE__ */ n(na, {})
|
|
16534
16502
|
}
|
|
16535
16503
|
)
|
|
16536
16504
|
}
|
|
@@ -16560,7 +16528,7 @@ const Om = S.memo(
|
|
|
16560
16528
|
{
|
|
16561
16529
|
path: p + "/*",
|
|
16562
16530
|
element: /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
|
|
16563
|
-
|
|
16531
|
+
ra,
|
|
16564
16532
|
{
|
|
16565
16533
|
isSubCollection: !1,
|
|
16566
16534
|
parentCollectionIds: [],
|
|
@@ -16575,7 +16543,7 @@ const Om = S.memo(
|
|
|
16575
16543
|
);
|
|
16576
16544
|
}
|
|
16577
16545
|
);
|
|
16578
|
-
return /* @__PURE__ */ v(
|
|
16546
|
+
return /* @__PURE__ */ v(Es, { location: s, children: [
|
|
16579
16547
|
d,
|
|
16580
16548
|
l,
|
|
16581
16549
|
/* @__PURE__ */ n(
|
|
@@ -16621,11 +16589,11 @@ function yu({
|
|
|
16621
16589
|
yu.componentType = "AppBar";
|
|
16622
16590
|
export {
|
|
16623
16591
|
yu as AppBar,
|
|
16624
|
-
|
|
16625
|
-
|
|
16626
|
-
|
|
16592
|
+
oa as AppContext,
|
|
16593
|
+
aa as ArrayContainer,
|
|
16594
|
+
En as ArrayContainerItem,
|
|
16627
16595
|
zd as ArrayCustomShapedFieldBinding,
|
|
16628
|
-
|
|
16596
|
+
To as ArrayEnumPreview,
|
|
16629
16597
|
dd as ArrayItemOptions,
|
|
16630
16598
|
_m as ArrayOfMapsPreview,
|
|
16631
16599
|
pd as ArrayOfReferencesFieldBinding,
|
|
@@ -16633,10 +16601,10 @@ export {
|
|
|
16633
16601
|
Tl as ArrayOfStorageComponentsPreview,
|
|
16634
16602
|
Ol as ArrayOfStringsPreview,
|
|
16635
16603
|
Ml as ArrayOneOfPreview,
|
|
16636
|
-
|
|
16637
|
-
|
|
16604
|
+
hn as ArrayPropertyEnumPreview,
|
|
16605
|
+
pn as ArrayPropertyPreview,
|
|
16638
16606
|
xm as AsyncPreviewComponent,
|
|
16639
|
-
|
|
16607
|
+
eo as AuthControllerContext,
|
|
16640
16608
|
Dd as BlockFieldBinding,
|
|
16641
16609
|
Gl as BooleanPreview,
|
|
16642
16610
|
Ys as COLLECTION_PATH_SEPARATOR,
|
|
@@ -16654,34 +16622,34 @@ export {
|
|
|
16654
16622
|
hu as DrawerNavigationItem,
|
|
16655
16623
|
yt as EmptyValue,
|
|
16656
16624
|
Qi as EntityCollectionRowActions,
|
|
16657
|
-
|
|
16658
|
-
|
|
16625
|
+
Jo as EntityCollectionTable,
|
|
16626
|
+
ra as EntityCollectionView,
|
|
16659
16627
|
Hc as EntityCollectionViewActions,
|
|
16660
|
-
|
|
16661
|
-
|
|
16628
|
+
ro as EntityReference,
|
|
16629
|
+
Mo as EntityView,
|
|
16662
16630
|
je as EnumValuesChip,
|
|
16663
16631
|
pe as ErrorBoundary,
|
|
16664
16632
|
Ne as ErrorView,
|
|
16665
16633
|
Pm as FieldCaption,
|
|
16666
16634
|
Me as FieldHelperText,
|
|
16667
16635
|
Rm as FireCMS,
|
|
16668
|
-
|
|
16636
|
+
na as FireCMSLogo,
|
|
16669
16637
|
Mi as FormikArrayContainer,
|
|
16670
|
-
|
|
16638
|
+
io as GeoPoint,
|
|
16671
16639
|
ci as IconForView,
|
|
16672
16640
|
yl as ImagePreview,
|
|
16673
16641
|
Nd as KeyValueFieldBinding,
|
|
16674
|
-
|
|
16642
|
+
Oo as KeyValuePreview,
|
|
16675
16643
|
ze as LabelWithIcon,
|
|
16676
16644
|
Id as MapFieldBinding,
|
|
16677
16645
|
zl as MapPropertyPreview,
|
|
16678
16646
|
Od as MarkdownFieldBinding,
|
|
16679
|
-
|
|
16647
|
+
Kn as ModeControllerContext,
|
|
16680
16648
|
zu as ModeControllerProvider,
|
|
16681
|
-
|
|
16649
|
+
Bn as MultiSelectBinding,
|
|
16682
16650
|
Yc as NavigationCard,
|
|
16683
16651
|
Uc as NavigationCardBinding,
|
|
16684
|
-
|
|
16652
|
+
xn as NavigationGroup,
|
|
16685
16653
|
Om as NavigationRoutes,
|
|
16686
16654
|
sd as NotFoundPage,
|
|
16687
16655
|
jl as NumberPropertyPreview,
|
|
@@ -16689,7 +16657,7 @@ export {
|
|
|
16689
16657
|
Dt as PropertyFieldBinding,
|
|
16690
16658
|
Fe as PropertyPreview,
|
|
16691
16659
|
gc as PropertyTableCell,
|
|
16692
|
-
|
|
16660
|
+
la as ReadOnlyFieldBinding,
|
|
16693
16661
|
xd as ReferenceFieldBinding,
|
|
16694
16662
|
et as ReferencePreview,
|
|
16695
16663
|
Gc as ReferenceSelectionTable,
|
|
@@ -16697,17 +16665,17 @@ export {
|
|
|
16697
16665
|
Qd as RepeatFieldBinding,
|
|
16698
16666
|
Tm as Scaffold,
|
|
16699
16667
|
Fm as SearchIconsView,
|
|
16700
|
-
|
|
16668
|
+
Cn as SelectFieldBinding,
|
|
16701
16669
|
Rc as SelectableTable,
|
|
16702
|
-
|
|
16670
|
+
Lo as SelectableTableContext,
|
|
16703
16671
|
Dm as SideDialogs,
|
|
16704
16672
|
Ct as SkeletonPropertyComponent,
|
|
16705
16673
|
Lc as SmallNavigationCard,
|
|
16706
16674
|
Mu as SnackbarProvider,
|
|
16707
16675
|
Bl as StorageThumbnail,
|
|
16708
16676
|
Il as StorageThumbnailInternal,
|
|
16709
|
-
|
|
16710
|
-
|
|
16677
|
+
Sn as StorageUploadFieldBinding,
|
|
16678
|
+
Do as StringPropertyPreview,
|
|
16711
16679
|
kd as SwitchFieldBinding,
|
|
16712
16680
|
Vt as TextFieldBinding,
|
|
16713
16681
|
Ar as UrlComponentPreview,
|
|
@@ -16729,15 +16697,15 @@ export {
|
|
|
16729
16697
|
om as buildProperty,
|
|
16730
16698
|
$t as canCreateEntity,
|
|
16731
16699
|
Fi as canDeleteEntity,
|
|
16732
|
-
|
|
16733
|
-
|
|
16700
|
+
po as canEditEntity,
|
|
16701
|
+
ea as copyEntityAction,
|
|
16734
16702
|
js as defaultDateFormat,
|
|
16735
|
-
|
|
16703
|
+
ta as deleteEntityAction,
|
|
16736
16704
|
ol as deleteEntityWithCallbacks,
|
|
16737
16705
|
Vc as editEntityAction,
|
|
16738
16706
|
ht as enumToObjectEntries,
|
|
16739
|
-
|
|
16740
|
-
|
|
16707
|
+
ln as flattenObject,
|
|
16708
|
+
uo as fullPathToCollectionSegments,
|
|
16741
16709
|
Xs as getArrayValuesCount,
|
|
16742
16710
|
em as getBracketNotation,
|
|
16743
16711
|
Ci as getCollectionByPathOrId,
|
|
@@ -16749,14 +16717,14 @@ export {
|
|
|
16749
16717
|
Gi as getDefaultFieldId,
|
|
16750
16718
|
tm as getDefaultPropertiesOrder,
|
|
16751
16719
|
Br as getDefaultValueFor,
|
|
16752
|
-
|
|
16720
|
+
oo as getDefaultValueForDataType,
|
|
16753
16721
|
hr as getDefaultValuesFor,
|
|
16754
16722
|
Zs as getEntityImagePreviewPropertyKey,
|
|
16755
16723
|
Hs as getEntityPreviewKeys,
|
|
16756
|
-
|
|
16724
|
+
fo as getEntityTitlePropertyKey,
|
|
16757
16725
|
Qr as getFieldConfig,
|
|
16758
|
-
|
|
16759
|
-
|
|
16726
|
+
ca as getFieldId,
|
|
16727
|
+
no as getHashValue,
|
|
16760
16728
|
Js as getIcon,
|
|
16761
16729
|
De as getIconForProperty,
|
|
16762
16730
|
si as getIconForWidget,
|
|
@@ -16767,7 +16735,7 @@ export {
|
|
|
16767
16735
|
wt as getPropertyInPath,
|
|
16768
16736
|
ur as getRandomId,
|
|
16769
16737
|
ut as getReferenceFrom,
|
|
16770
|
-
|
|
16738
|
+
mo as getResolvedPropertyInPath,
|
|
16771
16739
|
bm as getSidePanelKey,
|
|
16772
16740
|
dt as getValueInPath,
|
|
16773
16741
|
Us as hydrateRegExp,
|
|
@@ -16788,46 +16756,46 @@ export {
|
|
|
16788
16756
|
rl as mergeCollection,
|
|
16789
16757
|
He as mergeDeep,
|
|
16790
16758
|
Bm as openWebsiteAction,
|
|
16791
|
-
|
|
16759
|
+
Rs as pick,
|
|
16792
16760
|
rm as plural,
|
|
16793
|
-
|
|
16761
|
+
go as printChanged,
|
|
16794
16762
|
vc as propertiesToColumns,
|
|
16795
16763
|
Wu as randomColor,
|
|
16796
16764
|
Ut as randomString,
|
|
16797
16765
|
rn as removeFunctions,
|
|
16798
16766
|
Yu as removeInPath,
|
|
16799
16767
|
Ee as removeInitialAndTrailingSlashes,
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16768
|
+
Qs as removeInitialSlash,
|
|
16769
|
+
an as removePropsIfExisting,
|
|
16770
|
+
Ds as removeTrailingSlash,
|
|
16803
16771
|
nn as removeUndefined,
|
|
16804
16772
|
km as renderSkeletonCaptionText,
|
|
16805
|
-
|
|
16806
|
-
|
|
16773
|
+
Qo as renderSkeletonIcon,
|
|
16774
|
+
Po as renderSkeletonImageThumbnail,
|
|
16807
16775
|
ct as renderSkeletonText,
|
|
16808
16776
|
At as resolveArrayProperty,
|
|
16809
16777
|
Le as resolveCollection,
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16778
|
+
to as resolveCollectionPathIds,
|
|
16779
|
+
co as resolveDefaultSelectedView,
|
|
16780
|
+
ma as resolveEntityView,
|
|
16813
16781
|
Qm as resolveEnumValues,
|
|
16814
16782
|
al as resolveNavigationFrom,
|
|
16815
16783
|
Ir as resolvePermissions,
|
|
16816
|
-
|
|
16784
|
+
da as resolveProperties,
|
|
16817
16785
|
Ye as resolveProperty,
|
|
16818
|
-
|
|
16786
|
+
ua as resolvePropertyEnum,
|
|
16819
16787
|
Lu as sanitizeData,
|
|
16820
|
-
|
|
16788
|
+
Bo as saveEntityWithCallbacks,
|
|
16821
16789
|
Ls as segmentsToStrippedPath,
|
|
16822
16790
|
Hu as serializeRegExp,
|
|
16823
16791
|
im as singular,
|
|
16824
16792
|
ai as slugify,
|
|
16825
|
-
|
|
16826
|
-
|
|
16793
|
+
lo as sortProperties,
|
|
16794
|
+
sn as stripCollectionPath,
|
|
16827
16795
|
$u as toKebabCase,
|
|
16828
16796
|
qu as toSnakeCase,
|
|
16829
16797
|
oi as traverseValueProperty,
|
|
16830
|
-
|
|
16798
|
+
ao as traverseValuesProperties,
|
|
16831
16799
|
Ju as unslugify,
|
|
16832
16800
|
Ts as updateDateAutoValues,
|
|
16833
16801
|
Oi as useApp,
|
|
@@ -16839,14 +16807,14 @@ export {
|
|
|
16839
16807
|
qe as useClearRestoreValue,
|
|
16840
16808
|
ll as useClipboard,
|
|
16841
16809
|
fm as useCollectionFetch,
|
|
16842
|
-
|
|
16810
|
+
$o as useColumnIds,
|
|
16843
16811
|
fe as useCustomizationController,
|
|
16844
16812
|
tt as useDataSource,
|
|
16845
|
-
|
|
16813
|
+
Ho as useDataSourceEntityCollectionTableController,
|
|
16846
16814
|
Ni as useDebouncedCallback,
|
|
16847
16815
|
Mc as useDebouncedData,
|
|
16848
16816
|
nl as useDialogsController,
|
|
16849
|
-
|
|
16817
|
+
Co as useEntityFetch,
|
|
16850
16818
|
Re as useFireCMSContext,
|
|
16851
16819
|
Ze as useLargeLayout,
|
|
16852
16820
|
sl as useModeController,
|
|
@@ -16854,13 +16822,13 @@ export {
|
|
|
16854
16822
|
rr as useReferenceDialog,
|
|
16855
16823
|
hm as useResolvedNavigationFrom,
|
|
16856
16824
|
fc as useSelectableTableController,
|
|
16857
|
-
|
|
16825
|
+
Zo as useSelectionController,
|
|
16858
16826
|
Yi as useSideDialogContext,
|
|
16859
16827
|
Nr as useSideDialogsController,
|
|
16860
16828
|
Ft as useSideEntityController,
|
|
16861
16829
|
gt as useSnackbarController,
|
|
16862
16830
|
tr as useStorageSource,
|
|
16863
|
-
|
|
16831
|
+
Xo as useTableSearchHelper,
|
|
16864
16832
|
pm as useTraceUpdate,
|
|
16865
16833
|
vm as useValidateAuthenticator
|
|
16866
16834
|
};
|