@firecms/core 3.0.0-canary.71 → 3.0.0-canary.72

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as n, jsxs as v, Fragment as M } from "react/jsx-runtime";
2
2
  import * as kt from "react";
3
- import S, { useRef as ce, useEffect as O, useContext as $e, useCallback as x, useMemo as he, useState as P, createElement as xa, createRef as Ea, createContext as Ca, forwardRef as Ba, useLayoutEffect as Kr, useDeferredValue as Sa } from "react";
3
+ import S, { useRef as ce, useEffect as O, useContext as $e, useCallback as x, useMemo as he, useState as P, createElement as xa, createRef as Ea, createContext as Ca, forwardRef as Ba, useLayoutEffect as ei, useDeferredValue as Sa } from "react";
4
4
  import { SnackbarProvider as Ia, useSnackbar as Na } from "notistack";
5
5
  import Ji from "object-hash";
6
- import { useCreateFormex as Sn, Formex as In, setIn as ei, Field as Nn, getIn as jt, useFormex as pi } from "@firecms/formex";
7
- import { getColorSchemeForSeed as Fn, CHIP_COLORS as Fa, Tooltip as ke, ErrorIcon as Pn, Typography as L, CircleIcon as Qn, FunctionsIcon as Pa, iconKeys as fi, coolIconKeys as ti, Icon as hi, IconButton as de, ContentCopyIcon as vr, OpenInNewIcon as Ht, DescriptionIcon as Qa, Skeleton as Ue, Chip as gi, cls as U, defaultBorderMixin as Se, KeyboardTabIcon as Ai, Checkbox as Zt, Markdown as bi, TextareaAutosize as Da, MultiSelect as Dn, MultiSelectItem as Rn, Select as nt, SelectItem as ot, BooleanSwitch as Ra, DateTimeField as Xt, paperMixin as kr, ErrorOutlineIcon as Ta, EditIcon as Oa, Button as ge, RemoveCircleIcon as Ma, Menu as St, MoreVertIcon as Tn, MenuItem as Pe, CircularProgress as _t, SearchBar as yi, Badge as Hi, ArrowUpwardIcon as Vr, Popover as wi, FilterListIcon as za, AssignmentIcon as Va, CenteredView as sr, Label as vi, TextField as xt, ClearIcon as Yt, BooleanSwitchWithLabel as _r, useOutsideAlerter as On, Dialog as ki, DialogContent as _i, DialogActions as It, FileCopyIcon as Ga, ArchiveIcon as ja, DeleteIcon as ri, AddIcon as pt, ExpandablePanel as ft, Card as Ya, ArrowForwardIcon as Mn, cardMixin as La, cardClickableMixin as Ua, focusedMixin as ii, StarIcon as zn, StarBorderIcon as Vn, Collapse as Gn, Container as $a, FilterListOffIcon as qa, SearchIcon as Wa, LoadingButton as Ja, Avatar as Zi, DarkModeIcon as Ha, LightModeIcon as Za, LogoutIcon as Xa, fieldBackgroundHoverMixin as xr, HandleIcon as Ka, RemoveIcon as xi, debounce as es, InfoIcon as ts, CloseIcon as jn, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Yn, ArrowDropDownIcon as Ln, useInjectStyles as rs, ShortTextIcon as is, SubjectIcon as ns, FormatQuoteIcon as os, HttpIcon as as, EmailIcon as ss, FlagIcon as ls, ListIcon as cs, ListAltIcon as ds, NumbersIcon as us, FormatListNumberedIcon as Xi, UploadFileIcon as ms, DriveFolderUploadIcon as ps, LinkIcon as fs, AddLinkIcon as hs, ScheduleIcon as gs, BallotIcon as Ki, RepeatIcon as en, ViewStreamIcon as As, Tab as Gr, Tabs as bs, Alert as ys, Sheet as Un, useLocaleConfig as ws, MenuIcon as tn, ChevronLeftIcon as vs } from "@firecms/ui";
6
+ import { useCreateFormex as Sn, Formex as In, setIn as ti, Field as Nn, getIn as jt, useFormex as fi } from "@firecms/formex";
7
+ import { getColorSchemeForSeed as Fn, CHIP_COLORS as Fa, Tooltip as ke, ErrorIcon as Pn, Typography as L, CircleIcon as Qn, FunctionsIcon as Pa, iconKeys as hi, coolIconKeys as ri, Icon as gi, IconButton as de, ContentCopyIcon as vr, OpenInNewIcon as Ht, DescriptionIcon as Qa, Skeleton as Ue, Chip as Ai, cls as U, defaultBorderMixin as Se, KeyboardTabIcon as bi, Checkbox as Zt, Markdown as yi, TextareaAutosize as Da, MultiSelect as Dn, MultiSelectItem as Rn, Select as nt, SelectItem as ot, BooleanSwitch as Ra, DateTimeField as Xt, paperMixin as kr, ErrorOutlineIcon as Ta, EditIcon as Oa, Button as ge, RemoveCircleIcon as Ma, Menu as St, MoreVertIcon as Tn, MenuItem as Pe, CircularProgress as _t, SearchBar as wi, Badge as Hi, ArrowUpwardIcon as Gr, Popover as vi, FilterListIcon as za, AssignmentIcon as Va, CenteredView as sr, Label as ki, TextField as xt, ClearIcon as Yt, BooleanSwitchWithLabel as _r, useOutsideAlerter as On, Dialog as _i, DialogContent as xi, DialogActions as It, FileCopyIcon as Ga, ArchiveIcon as ja, DeleteIcon as ii, AddIcon as pt, ExpandablePanel as ft, Card as Ya, ArrowForwardIcon as Mn, cardMixin as La, cardClickableMixin as Ua, focusedMixin as ni, StarIcon as zn, StarBorderIcon as Vn, Collapse as Gn, Container as $a, FilterListOffIcon as qa, SearchIcon as Wa, LoadingButton as Ja, Avatar as Zi, DarkModeIcon as Ha, LightModeIcon as Za, LogoutIcon as Xa, fieldBackgroundHoverMixin as xr, HandleIcon as Ka, RemoveIcon as Ei, debounce as es, InfoIcon as ts, CloseIcon as jn, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Yn, ArrowDropDownIcon as Ln, useInjectStyles as rs, ShortTextIcon as is, SubjectIcon as ns, FormatQuoteIcon as os, HttpIcon as as, EmailIcon as ss, FlagIcon as ls, ListIcon as cs, ListAltIcon as ds, NumbersIcon as us, FormatListNumberedIcon as Xi, UploadFileIcon as ms, DriveFolderUploadIcon as ps, LinkIcon as fs, AddLinkIcon as hs, ScheduleIcon as gs, BallotIcon as Ki, RepeatIcon as en, ViewStreamIcon as As, Tab as jr, Tabs as bs, Alert as ys, Sheet as Un, useLocaleConfig as ws, MenuIcon as tn, ChevronLeftIcon as vs } from "@firecms/ui";
8
8
  import J from "react-fast-compare";
9
9
  import { Link as Er, useNavigate as Kt, useLocation as Cr, UNSAFE_NavigationContext as ks, NavLink as _s, Route as lr, Routes as xs } from "react-router-dom";
10
10
  import { format as Es } from "date-fns";
@@ -17,7 +17,7 @@ import * as Zn from "js-search";
17
17
  import { FixedSizeList as Ss } from "react-window";
18
18
  import * as Oe from "yup";
19
19
  import Is from "markdown-it";
20
- import cr, { Plugins as jr } from "react-markdown-editor-lite";
20
+ import cr, { Plugins as Yr } from "react-markdown-editor-lite";
21
21
  import * as Ns from "@radix-ui/react-portal";
22
22
  const Mu = ({ children: e }) => /* @__PURE__ */ n(
23
23
  Ia,
@@ -60,7 +60,7 @@ function eo(e, t) {
60
60
  const a = t.find((s) => s.id === i[0]);
61
61
  let o;
62
62
  if (a && (o = a.path), i.length > 1) {
63
- const s = Ei(o ?? i[0], t);
63
+ const s = Ci(o ?? i[0], t);
64
64
  if (!s?.subcollections)
65
65
  return r;
66
66
  const l = r.split("/").slice(2).join("/");
@@ -68,11 +68,11 @@ function eo(e, t) {
68
68
  } else
69
69
  return o ?? r;
70
70
  }
71
- function Ei(e, t) {
71
+ function Ci(e, t) {
72
72
  const r = Ee(e).split("/");
73
73
  if (r.length % 2 === 0)
74
74
  throw Error(`getCollectionByPathOrId: Collection paths must have an odd number of segments: ${e}`);
75
- const i = Ci(r);
75
+ const i = Bi(r);
76
76
  let a;
77
77
  for (let o = 0; o < i.length; o++) {
78
78
  const s = i[o], l = t && t.sort((c, d) => (c.id ?? "").localeCompare(d.id ?? "")).find((c) => c.id === s || c.path === s);
@@ -81,7 +81,7 @@ function Ei(e, t) {
81
81
  a = l;
82
82
  else if (l.subcollections) {
83
83
  const c = e.replace(s, "").split("/").slice(2).join("/");
84
- c.length > 0 && (a = Ei(c, l.subcollections));
84
+ c.length > 0 && (a = Ci(c, l.subcollections));
85
85
  }
86
86
  }
87
87
  if (a)
@@ -89,7 +89,7 @@ function Ei(e, t) {
89
89
  }
90
90
  return a;
91
91
  }
92
- function Ci(e) {
92
+ function Bi(e) {
93
93
  const t = e.length > 0 && e.length % 2 === 0 ? e.splice(0, e.length - 1) : e, r = t.length, i = [];
94
94
  for (let a = r; a > 0; a = a - 2)
95
95
  i.push(t.slice(0, a).join("/"));
@@ -140,14 +140,14 @@ const Ds = (e, ...t) => ({
140
140
  [i]: e[i]
141
141
  }), {})
142
142
  });
143
- function Yr(e) {
143
+ function Lr(e) {
144
144
  return e && typeof e == "object" && !Array.isArray(e);
145
145
  }
146
146
  function He(e, t) {
147
- const r = Yr(e), i = r ? { ...e } : e;
148
- return r && Yr(t) && Object.keys(t).forEach((a) => {
147
+ const r = Lr(e), i = r ? { ...e } : e;
148
+ return r && Lr(t) && Object.keys(t).forEach((a) => {
149
149
  const o = t[a];
150
- Yr(o) ? a in e ? i[a] = He(e[a], o) : Object.assign(i, { [a]: o }) : Object.assign(i, { [a]: o });
150
+ Lr(o) ? a in e ? i[a] = He(e[a], o) : Object.assign(i, { [a]: o }) : Object.assign(i, { [a]: o });
151
151
  }), i;
152
152
  }
153
153
  function dt(e, t) {
@@ -218,7 +218,7 @@ const Lt = "type", fr = "value";
218
218
  function er(e) {
219
219
  return e.readOnly || e.dataType === "date" && e.autoValue ? !0 : e.dataType === "reference" ? !e.path : !1;
220
220
  }
221
- function Bi(e) {
221
+ function Si(e) {
222
222
  return typeof e.disabled == "object" && !!e.disabled.hidden;
223
223
  }
224
224
  function Qe(e) {
@@ -226,11 +226,11 @@ function Qe(e) {
226
226
  }
227
227
  function hr(e) {
228
228
  return e ? Object.entries(e).map(([t, r]) => {
229
- const i = Si(r);
229
+ const i = Br(r);
230
230
  return i === void 0 ? {} : { [t]: i };
231
231
  }).reduce((t, r) => ({ ...t, ...r }), {}) : {};
232
232
  }
233
- function Si(e) {
233
+ function Br(e) {
234
234
  if (!Qe(e))
235
235
  if (e.dataType === "map" && e.properties) {
236
236
  const t = hr(e.properties);
@@ -271,7 +271,7 @@ function ut(e) {
271
271
  }
272
272
  function oo(e, t, r) {
273
273
  const i = Object.entries(t).map(([o, s]) => {
274
- const l = e && e[o], c = ni(l, s, r);
274
+ const l = e && e[o], c = oi(l, s, r);
275
275
  if (c === null)
276
276
  return null;
277
277
  if (c !== void 0)
@@ -280,13 +280,13 @@ function oo(e, t, r) {
280
280
  if (Object.keys(a).length !== 0)
281
281
  return a;
282
282
  }
283
- function ni(e, t, r) {
283
+ function oi(e, t, r) {
284
284
  let i;
285
285
  if (t.dataType === "map" && t.properties)
286
286
  i = oo(e, t.properties, r);
287
287
  else if (t.dataType === "array")
288
288
  if (t.of && Array.isArray(e))
289
- i = e.map((a) => ni(a, t.of, r));
289
+ i = e.map((a) => oi(a, t.of, r));
290
290
  else if (t.oneOf && Array.isArray(e)) {
291
291
  const a = t.oneOf?.typeField ?? Lt, o = t.oneOf?.valueField ?? fr;
292
292
  i = e.map((s) => {
@@ -297,7 +297,7 @@ function ni(e, t, r) {
297
297
  const l = s[a], c = t.oneOf?.properties[l];
298
298
  return !l || !c ? s : {
299
299
  [a]: l,
300
- [o]: ni(s[o], c, r)
300
+ [o]: oi(s[o], c, r)
301
301
  };
302
302
  });
303
303
  } else
@@ -415,7 +415,7 @@ function Ut(e = 5) {
415
415
  function Wu() {
416
416
  return Math.floor(Math.random() * 16777215).toString(16);
417
417
  }
418
- function oi(e, t = "_", r = !0) {
418
+ function ai(e, t = "_", r = !0) {
419
419
  if (!e)
420
420
  return "";
421
421
  const i = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-", a = `aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;
@@ -476,7 +476,7 @@ function $s(e, t) {
476
476
  function Xu(e) {
477
477
  return /* @__PURE__ */ n(Qn, { size: e });
478
478
  }
479
- function ai(e, t) {
479
+ function si(e, t) {
480
480
  const r = e?.Icon ?? Qn;
481
481
  return /* @__PURE__ */ n(r, { size: t });
482
482
  }
@@ -484,12 +484,12 @@ function De(e, t = "small", r = {}) {
484
484
  if (Qe(e))
485
485
  return /* @__PURE__ */ n(Pa, { size: t });
486
486
  {
487
- const i = Pr(e, r);
488
- return ai(i, t);
487
+ const i = Qr(e, r);
488
+ return si(i, t);
489
489
  }
490
490
  }
491
491
  function Ku(e, t) {
492
- return Qe(e) ? "#888" : Pr(e, t)?.color ?? "#666";
492
+ return Qe(e) ? "#888" : Qr(e, t)?.color ?? "#666";
493
493
  }
494
494
  function wt(e, t) {
495
495
  if (typeof e == "object") {
@@ -531,16 +531,16 @@ function qs(e, t) {
531
531
  function tm(e) {
532
532
  return e.propertiesOrder ? e.propertiesOrder : [...Object.keys(e.properties), ...(e.additionalFields ?? []).map((t) => t.key)];
533
533
  }
534
- const Br = {
534
+ const Sr = {
535
535
  read: !0,
536
536
  edit: !0,
537
537
  create: !0,
538
538
  delete: !0
539
539
  };
540
- function Sr(e, t, r, i) {
540
+ function Ir(e, t, r, i) {
541
541
  const a = e.permissions;
542
542
  if (a === void 0)
543
- return Br;
543
+ return Sr;
544
544
  if (typeof a == "object")
545
545
  return a;
546
546
  if (typeof a == "function") {
@@ -557,15 +557,15 @@ function Sr(e, t, r, i) {
557
557
  throw console.error("Permissions:", a), Error("New type of permission added and not mapped");
558
558
  }
559
559
  function mo(e, t, r, i) {
560
- return Sr(e, t, r, i)?.edit ?? Br.edit;
560
+ return Ir(e, t, r, i)?.edit ?? Sr.edit;
561
561
  }
562
562
  function $t(e, t, r, i) {
563
- return e.collectionGroup ? !1 : Sr(e, t, r, i)?.create ?? Br.create;
563
+ return e.collectionGroup ? !1 : Ir(e, t, r, i)?.create ?? Sr.create;
564
564
  }
565
565
  function Fi(e, t, r, i) {
566
- return Sr(e, t, r, i)?.delete ?? Br.delete;
566
+ return Ir(e, t, r, i)?.delete ?? Sr.delete;
567
567
  }
568
- const si = {
568
+ const li = {
569
569
  abc: "alphabet character font letter symbol text type",
570
570
  access_alarm: "clock time",
571
571
  access_alarms: "clock time",
@@ -2420,10 +2420,10 @@ const si = {
2420
2420
  zoom_out_map: "arrows destination location maps move place stop"
2421
2421
  }, Pi = new Zn.Search("key");
2422
2422
  Pi.addIndex("synonyms");
2423
- Pi.addDocuments(fi.map((e) => ({
2423
+ Pi.addDocuments(hi.map((e) => ({
2424
2424
  key: e,
2425
2425
  // @ts-ignore
2426
- synonyms: si[e] ?? []
2426
+ synonyms: li[e] ?? []
2427
2427
  })));
2428
2428
  function Ws(e) {
2429
2429
  let t = 0, r, i;
@@ -2432,23 +2432,23 @@ function Ws(e) {
2432
2432
  return Math.abs(t);
2433
2433
  }
2434
2434
  function Js(e, t) {
2435
- if (e && (e = oi(e), e in gr))
2436
- return e in gr ? /* @__PURE__ */ n(hi, { iconKey: e, size: "medium", className: t }) : void 0;
2435
+ if (e && (e = ai(e), e in gr))
2436
+ return e in gr ? /* @__PURE__ */ n(gi, { iconKey: e, size: "medium", className: t }) : void 0;
2437
2437
  }
2438
- const li = S.memo(
2438
+ const ci = S.memo(
2439
2439
  function({ collectionOrView: t, className: r }) {
2440
2440
  if (!t)
2441
2441
  return /* @__PURE__ */ n(M, {});
2442
2442
  const i = Js(t.icon, r);
2443
2443
  if (t?.icon && i)
2444
2444
  return i;
2445
- let a = oi(("singularName" in t ? t.singularName : void 0) ?? t.name), o;
2446
- a in gr && (o = a), o || (a = oi(t.path), a in gr && (o = a));
2447
- const s = ti.length;
2448
- return o || (o = ti[Ws(t.path) % s]), /* @__PURE__ */ n(hi, { iconKey: o, size: "medium", className: r });
2445
+ let a = ai(("singularName" in t ? t.singularName : void 0) ?? t.name), o;
2446
+ a in gr && (o = a), o || (a = ai(t.path), a in gr && (o = a));
2447
+ const s = ri.length;
2448
+ return o || (o = ri[Ws(t.path) % s]), /* @__PURE__ */ n(gi, { iconKey: o, size: "medium", className: r });
2449
2449
  },
2450
2450
  (e, t) => J(e.collectionOrView?.icon, t.collectionOrView?.icon)
2451
- ), gr = fi.reduce((e, t) => (e[t] = t, e), {});
2451
+ ), gr = hi.reduce((e, t) => (e[t] = t, e), {});
2452
2452
  function rm(e, t) {
2453
2453
  if (t !== void 0 && t === 1)
2454
2454
  return e;
@@ -2616,7 +2616,7 @@ function po(e, t) {
2616
2616
  return e.titleProperty;
2617
2617
  for (const r in e.properties) {
2618
2618
  const i = e.properties[r];
2619
- if (!Qe(i) && Pr(i, t)?.key === "text_field")
2619
+ if (!Qe(i) && Qr(i, t)?.key === "text_field")
2620
2620
  return r;
2621
2621
  }
2622
2622
  }
@@ -2661,21 +2661,21 @@ function el(e) {
2661
2661
  return Qe(i) ? t[r] = i : t[r] = { ...i, editable: !1 }, t;
2662
2662
  }, {});
2663
2663
  }
2664
- function ci(e, t, r) {
2664
+ function di(e, t, r) {
2665
2665
  if (e) {
2666
2666
  const a = e({
2667
2667
  collection: t,
2668
2668
  parentPaths: r
2669
2669
  }) ?? t;
2670
- return a.subcollections && (a.subcollections = a.subcollections.map((o) => ci(e, o, [...r, t.path]))), a;
2670
+ return a.subcollections && (a.subcollections = a.subcollections.map((o) => di(e, o, [...r, t.path]))), a;
2671
2671
  } else
2672
2672
  return t;
2673
2673
  }
2674
2674
  function tl(e, t, r = [], i) {
2675
2675
  const a = (t ?? []).map((l) => {
2676
2676
  const c = e?.find((d) => d.id === l.id);
2677
- return c ? rl(c, l, r, i) : ci(i, l, r);
2678
- }), o = a.map((l) => l.id), s = e.filter((l) => !o.includes(l.id)).map((l) => i ? ci(i, l, r) : l);
2677
+ return c ? rl(c, l, r, i) : di(i, l, r);
2678
+ }), o = a.map((l) => l.id), s = e.filter((l) => !o.includes(l.id)).map((l) => i ? di(i, l, r) : l);
2679
2679
  return [...a, ...s];
2680
2680
  }
2681
2681
  function rl(e, t, r = [], i) {
@@ -2784,7 +2784,7 @@ function pm(e, t = 3) {
2784
2784
  const go = S.createContext({}), tt = (e) => {
2785
2785
  const t = $e(go);
2786
2786
  return e?.overrides?.dataSource ? e?.overrides.dataSource : t;
2787
- }, Ao = S.createContext({}), _e = () => $e(Ao), Nt = () => $e(Kn), bo = S.createContext({}), Ir = () => $e(bo), yo = S.createContext({}), Ft = () => $e(yo), wo = S.createContext({}), tr = (e) => {
2787
+ }, Ao = S.createContext({}), _e = () => $e(Ao), Nt = () => $e(Kn), bo = S.createContext({}), Nr = () => $e(bo), yo = S.createContext({}), Ft = () => $e(yo), wo = S.createContext({}), tr = (e) => {
2788
2788
  const t = $e(wo);
2789
2789
  return e?.overrides?.storageSource ? e.overrides.storageSource : t;
2790
2790
  }, gt = () => {
@@ -2841,7 +2841,7 @@ const go = S.createContext({}), tt = (e) => {
2841
2841
  ))
2842
2842
  ] });
2843
2843
  }, nl = () => $e(ko), _o = S.createContext({}), fe = () => $e(_o), xo = S.createContext({}), Qt = () => $e(xo), Re = () => {
2844
- const e = Nt(), t = Ir(), r = Ft(), i = _e(), a = tt(), o = tr(), s = gt(), l = Pt(), c = nl(), d = fe(), u = Qt(), f = S.useRef({
2844
+ 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({
2845
2845
  authController: e,
2846
2846
  sideDialogsController: t,
2847
2847
  sideEntityController: r,
@@ -2931,7 +2931,7 @@ function fm({
2931
2931
  noMoreToLoad: w
2932
2932
  };
2933
2933
  }
2934
- const Lr = {};
2934
+ const Ur = {};
2935
2935
  function Eo({
2936
2936
  path: e,
2937
2937
  entityId: t,
@@ -2953,11 +2953,11 @@ function Eo({
2953
2953
  } catch (y) {
2954
2954
  console.error(y);
2955
2955
  }
2956
- Lr[`${s}/${t}`] = g, d(g), f(!1), p(void 0);
2956
+ Ur[`${s}/${t}`] = g, d(g), f(!1), p(void 0);
2957
2957
  }, A = (g) => {
2958
2958
  console.error("ERROR fetching entity", g), f(!1), d(void 0), p(g);
2959
2959
  };
2960
- return t && i && Lr[`${s}/${t}`] ? (d(Lr[`${s}/${t}`]), f(!1), p(void 0), () => {
2960
+ return t && i && Ur[`${s}/${t}`] ? (d(Ur[`${s}/${t}`]), f(!1), p(void 0), () => {
2961
2961
  }) : t && s && r ? a.listenEntity ? a.listenEntity({
2962
2962
  path: s,
2963
2963
  entityId: t,
@@ -3222,7 +3222,7 @@ function Bo(e = "lg") {
3222
3222
  return typeof window > "u" ? !1 : window.matchMedia(`(min-width: ${cl[e] + 1}px)`).matches;
3223
3223
  }
3224
3224
  function rr(e) {
3225
- const t = _e(), r = Ir(), i = x(() => {
3225
+ const t = _e(), r = Nr(), i = x(() => {
3226
3226
  if (e.path) {
3227
3227
  let o = e.collection;
3228
3228
  if (o || (o = t.getCollection(e.path)), !o)
@@ -3267,7 +3267,7 @@ function So(e) {
3267
3267
  path: t,
3268
3268
  collections: r = [],
3269
3269
  currentFullPath: i
3270
- } = e, a = Ee(t).split("/"), o = Ci(a), s = [];
3270
+ } = e, a = Ee(t).split("/"), o = Bi(a), s = [];
3271
3271
  for (let l = 0; l < o.length; l++) {
3272
3272
  const c = o[l], d = r && r.find((u) => u.id === c || u.path === c);
3273
3273
  if (d) {
@@ -3386,7 +3386,7 @@ function Am(e) {
3386
3386
  const K = m.current;
3387
3387
  if (!K)
3388
3388
  return;
3389
- const H = Ei(Ee(T), K), j = ne ? d?.getCollectionConfig(T) : void 0, G = H ? He(H, j ?? {}) : void 0;
3389
+ const H = Ci(Ee(T), K), j = ne ? d?.getCollectionConfig(T) : void 0, G = H ? He(H, j ?? {}) : void 0;
3390
3390
  let I = G;
3391
3391
  if (G) {
3392
3392
  const R = G.subcollections, me = G.callbacks, Ie = G.permissions;
@@ -3495,7 +3495,7 @@ function nr(e) {
3495
3495
  return encodeURIComponent(Ee(e)).replaceAll("%2F", "/").replaceAll("%23", "#");
3496
3496
  }
3497
3497
  function Io(e, t) {
3498
- return e.filter((r) => r.permissions ? Sr(r, t, r.path, null)?.read !== !1 : !0).map((r) => r.subcollections ? {
3498
+ return e.filter((r) => r.permissions ? Ir(r, t, r.path, null)?.read !== !1 : !0).map((r) => r.subcollections ? {
3499
3499
  ...r,
3500
3500
  subcollections: Io(r.subcollections, t)
3501
3501
  } : r);
@@ -3845,9 +3845,9 @@ function Ct({
3845
3845
  } else if (e.dataType === "array") {
3846
3846
  const i = e;
3847
3847
  i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ v(M, { children: [
3848
- i.of.map((a, o) => Ur(a, o)),
3848
+ i.of.map((a, o) => $r(a, o)),
3849
3849
  " "
3850
- ] }) : 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 = Ur(i.of) : r = kl() : r = Ur(i.of));
3850
+ ] }) : 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));
3851
3851
  } else
3852
3852
  e.dataType === "map" ? r = wl(e, t) : e.dataType === "date" ? r = ct() : e.dataType === "reference" ? r = xl() : (e.dataType, r = ct());
3853
3853
  return r || null;
@@ -3927,7 +3927,7 @@ function _l() {
3927
3927
  (e, t) => /* @__PURE__ */ n(M, { children: ct(t) })
3928
3928
  ) });
3929
3929
  }
3930
- function Ur(e, t = 0) {
3930
+ function $r(e, t = 0) {
3931
3931
  return /* @__PURE__ */ n(
3932
3932
  "div",
3933
3933
  {
@@ -4037,7 +4037,7 @@ function je({
4037
4037
  return null;
4038
4038
  const o = ht(e), s = t !== void 0 ? Ii(o, t) : void 0, l = Ms(s), c = Os(o, t);
4039
4039
  return /* @__PURE__ */ v(
4040
- gi,
4040
+ Ai,
4041
4041
  {
4042
4042
  className: i,
4043
4043
  colorScheme: c,
@@ -4070,7 +4070,7 @@ function Qo({
4070
4070
  } else if (r.previewAsTag) {
4071
4071
  const a = Fn(e ?? "");
4072
4072
  return /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
4073
- gi,
4073
+ Ai,
4074
4074
  {
4075
4075
  colorScheme: a,
4076
4076
  size: i,
@@ -4253,7 +4253,7 @@ function Fl({
4253
4253
  updateUrl: !0
4254
4254
  });
4255
4255
  },
4256
- children: /* @__PURE__ */ n(Ai, { size: "small" })
4256
+ children: /* @__PURE__ */ n(bi, { size: "small" })
4257
4257
  }
4258
4258
  )
4259
4259
  }
@@ -4851,7 +4851,7 @@ const Fe = S.memo(function(t) {
4851
4851
  size: t.size,
4852
4852
  storagePathOrDownloadUrl: s
4853
4853
  }
4854
- ) : f.markdown ? i = /* @__PURE__ */ n(bi, { source: s, size: "small" }) : i = /* @__PURE__ */ n(
4854
+ ) : f.markdown ? i = /* @__PURE__ */ n(yi, { source: s, size: "small" }) : i = /* @__PURE__ */ n(
4855
4855
  Qo,
4856
4856
  {
4857
4857
  ...t,
@@ -5144,7 +5144,7 @@ function Yl(e) {
5144
5144
  }
5145
5145
  );
5146
5146
  }
5147
- function $r(e) {
5147
+ function qr(e) {
5148
5148
  const {
5149
5149
  name: t,
5150
5150
  enumValues: r,
@@ -5443,7 +5443,7 @@ function zo({
5443
5443
  if (!d)
5444
5444
  throw Error("Storage meta must be specified");
5445
5445
  const f = d?.metadata, m = u ? "small" : "medium", p = d?.imageCompression, h = (u ? i ?? [] : i ? [i] : []).map((C) => ({
5446
- id: qr(),
5446
+ id: Wr(),
5447
5447
  storagePathOrDownloadUrl: C,
5448
5448
  metadata: f,
5449
5449
  size: m
@@ -5495,8 +5495,8 @@ function zo({
5495
5495
  if (u)
5496
5496
  B = [
5497
5497
  ...y,
5498
- ...await Promise.all(C.map(async (Q) => (p && di(Q) && (Q = await An(Q, p)), {
5499
- id: qr(),
5498
+ ...await Promise.all(C.map(async (Q) => (p && ui(Q) && (Q = await An(Q, p)), {
5499
+ id: Wr(),
5500
5500
  file: Q,
5501
5501
  fileName: await b(Q),
5502
5502
  metadata: f,
@@ -5505,8 +5505,8 @@ function zo({
5505
5505
  ];
5506
5506
  else {
5507
5507
  let Q = C[0];
5508
- p && di(Q) && (Q = await An(Q, p)), B = [{
5509
- id: qr(),
5508
+ p && ui(Q) && (Q = await An(Q, p)), B = [{
5509
+ id: Wr(),
5510
5510
  file: Q,
5511
5511
  fileName: await b(Q),
5512
5512
  metadata: f,
@@ -5531,15 +5531,15 @@ function hn(e) {
5531
5531
  (t, r) => (e.map((i) => i.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl) === r || !t.storagePathOrDownloadUrl) && (e.map((i) => i.file).indexOf(t.file) === r || !t.file)
5532
5532
  );
5533
5533
  }
5534
- function qr() {
5534
+ function Wr() {
5535
5535
  return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
5536
5536
  }
5537
5537
  const gn = {
5538
5538
  "image/jpeg": "JPEG",
5539
5539
  "image/png": "PNG",
5540
5540
  "image/webp": "WEBP"
5541
- }, di = (e) => gn[e.type] ? gn[e.type] : null, Jl = 100, An = (e, t) => new Promise((r) => {
5542
- const i = t.quality === void 0 ? Jl : t.quality, a = i >= 0 && i <= 100 ? i : 100, o = di(e);
5541
+ }, ui = (e) => gn[e.type] ? gn[e.type] : null, Jl = 100, An = (e, t) => new Promise((r) => {
5542
+ const i = t.quality === void 0 ? Jl : t.quality, a = i >= 0 && i <= 100 ? i : 100, o = ui(e);
5543
5543
  if (!o)
5544
5544
  throw Error("resizeAndCompressImage: Unsupported image format");
5545
5545
  Bs.imageFileResizer(
@@ -6214,7 +6214,7 @@ function mc({
6214
6214
  const s = e.validation;
6215
6215
  return s ? (o = s.required ? o.required(s?.requiredMessage ? s.requiredMessage : "Required").nullable(!0) : o.notRequired().nullable(!0), (s.min || s.min === 0) && (o = o.min(s.min, `${e.name} should be min ${s.min} entries long`)), s.max && (o = o.max(s.max, `${e.name} should be max ${s.max} entries long`))) : o = o.notRequired().nullable(!0), o;
6216
6216
  }
6217
- function Nr(e) {
6217
+ function Fr(e) {
6218
6218
  switch (e) {
6219
6219
  case "xl":
6220
6220
  return 400;
@@ -6273,7 +6273,7 @@ const pc = ({
6273
6273
  hideOverflow: A = !0,
6274
6274
  showExpandIcon: g = !0
6275
6275
  }) {
6276
- const [y, w] = $n(), b = ce(null), _ = he(() => Nr(i), [i]), [k, E] = P(!1), [C, B] = P(l), Q = !o && !!c;
6276
+ const [y, w] = $n(), b = ce(null), _ = he(() => Fr(i), [i]), [k, E] = P(!1), [C, B] = P(l), Q = !o && !!c;
6277
6277
  O(() => {
6278
6278
  l && B(!0);
6279
6279
  const Ae = setTimeout(() => {
@@ -6491,7 +6491,7 @@ const gc = S.memo(
6491
6491
  Fe,
6492
6492
  {
6493
6493
  width: s,
6494
- height: Nr(h),
6494
+ height: Fr(h),
6495
6495
  propertyKey: t,
6496
6496
  property: a,
6497
6497
  value: b,
@@ -6523,7 +6523,7 @@ const gc = S.memo(
6523
6523
  else if (w && a.dataType === "number") {
6524
6524
  const R = a;
6525
6525
  R.enumValues ? (se = /* @__PURE__ */ n(
6526
- $r,
6526
+ qr,
6527
6527
  {
6528
6528
  name: t,
6529
6529
  multiple: !1,
@@ -6551,7 +6551,7 @@ const gc = S.memo(
6551
6551
  const R = a;
6552
6552
  if (R.enumValues)
6553
6553
  se = /* @__PURE__ */ n(
6554
- $r,
6554
+ qr,
6555
6555
  {
6556
6556
  name: t,
6557
6557
  multiple: !1,
@@ -6626,7 +6626,7 @@ const gc = S.memo(
6626
6626
  if (!R.of && !R.oneOf)
6627
6627
  throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);
6628
6628
  R.of && !Array.isArray(R.of) && (R.of.dataType === "string" || R.of.dataType === "number" ? w && R.of.enumValues && (se = /* @__PURE__ */ n(
6629
- $r,
6629
+ qr,
6630
6630
  {
6631
6631
  name: t,
6632
6632
  multiple: !0,
@@ -6864,7 +6864,7 @@ function bc({
6864
6864
  /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
6865
6865
  u && /* @__PURE__ */ n("div", { className: "w-[22px]", children: r && /* @__PURE__ */ n(_t, { size: "small" }) }),
6866
6866
  (a || o) && /* @__PURE__ */ n(
6867
- yi,
6867
+ wi,
6868
6868
  {
6869
6869
  inputRef: d,
6870
6870
  loading: l,
@@ -7089,9 +7089,9 @@ const kc = S.memo(
7089
7089
  o(c.key);
7090
7090
  },
7091
7091
  children: [
7092
- !a && /* @__PURE__ */ n(Vr, {}),
7093
- a === "asc" && /* @__PURE__ */ n(Vr, {}),
7094
- a === "desc" && /* @__PURE__ */ n(Vr, { className: "rotate-180" })
7092
+ !a && /* @__PURE__ */ n(Gr, {}),
7093
+ a === "asc" && /* @__PURE__ */ n(Gr, {}),
7094
+ a === "desc" && /* @__PURE__ */ n(Gr, { className: "rotate-180" })
7095
7095
  ]
7096
7096
  }
7097
7097
  )
@@ -7104,7 +7104,7 @@ const kc = S.memo(
7104
7104
  color: "secondary",
7105
7105
  invisible: !l,
7106
7106
  children: /* @__PURE__ */ n(
7107
- wi,
7107
+ vi,
7108
7108
  {
7109
7109
  open: h,
7110
7110
  onOpenChange: A,
@@ -7355,12 +7355,12 @@ const xc = ({
7355
7355
  );
7356
7356
  },
7357
7357
  (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)
7358
- ), Fr = Ca({});
7359
- Fr.displayName = "VirtualListContext";
7358
+ ), Pr = Ca({});
7359
+ Pr.displayName = "VirtualListContext";
7360
7360
  const Bc = Ba(({
7361
7361
  children: e,
7362
7362
  ...t
7363
- }, r) => /* @__PURE__ */ n(Fr.Consumer, { children: (i) => {
7363
+ }, r) => /* @__PURE__ */ n(Pr.Consumer, { children: (i) => {
7364
7364
  const a = i.customView;
7365
7365
  return /* @__PURE__ */ v(M, { children: [
7366
7366
  /* @__PURE__ */ n(
@@ -7503,7 +7503,7 @@ const Bc = Ba(({
7503
7503
  style: _,
7504
7504
  className: U("h-full w-full", k),
7505
7505
  children: /* @__PURE__ */ n(
7506
- Fr.Provider,
7506
+ Pr.Provider,
7507
7507
  {
7508
7508
  value: H,
7509
7509
  children: /* @__PURE__ */ n(
@@ -7538,7 +7538,7 @@ function Ic({
7538
7538
  const l = x(({
7539
7539
  index: c,
7540
7540
  style: d
7541
- }) => /* @__PURE__ */ n(Fr.Consumer, { children: ({
7541
+ }) => /* @__PURE__ */ n(Pr.Consumer, { children: ({
7542
7542
  onRowClick: u,
7543
7543
  data: f,
7544
7544
  columns: m,
@@ -7624,7 +7624,7 @@ const Nc = ({ text: e }) => {
7624
7624
  "not-in": "Not in",
7625
7625
  "array-contains": "Contains",
7626
7626
  "array-contains-any": "Contains Any"
7627
- }, Wr = ["array-contains-any", "in", "not-in"];
7627
+ }, Jr = ["array-contains-any", "in", "not-in"];
7628
7628
  function Fc({
7629
7629
  name: e,
7630
7630
  value: t,
@@ -7640,7 +7640,7 @@ function Fc({
7640
7640
  i ? d.push("array-contains-any") : d.push("in", "not-in");
7641
7641
  const [u, f] = t || [d[0], void 0], [m, p] = P(u), [h, A] = P(f), g = h ? Array.isArray(h) ? h.map((D) => D?.isEntityReference && D?.isEntityReference() ? D.id : null).filter(Boolean) : [h.id] : [];
7642
7642
  function y(D, F) {
7643
- const z = Wr.includes(m), $ = Wr.includes(D);
7643
+ const z = Jr.includes(m), $ = Jr.includes(D);
7644
7644
  let oe = F;
7645
7645
  z !== $ && (oe = $ ? oe?.isEntityReference && oe?.isEntityReference() ? [oe] : [] : void 0), p(D), A(oe);
7646
7646
  const Y = oe !== null && Array.isArray(oe) ? oe.length > 0 : oe !== void 0;
@@ -7652,7 +7652,7 @@ function Fc({
7652
7652
  y(m, ut(D));
7653
7653
  }, k = (D) => {
7654
7654
  y(m, D.map((F) => ut(F)));
7655
- }, E = Wr.includes(m), C = rr(
7655
+ }, E = Jr.includes(m), C = rr(
7656
7656
  {
7657
7657
  multiselect: E,
7658
7658
  path: a,
@@ -7705,7 +7705,7 @@ function Fc({
7705
7705
  }
7706
7706
  ),
7707
7707
  !i && /* @__PURE__ */ v(
7708
- vi,
7708
+ ki,
7709
7709
  {
7710
7710
  className: "border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800",
7711
7711
  htmlFor: "null-filter",
@@ -7739,7 +7739,7 @@ const wn = {
7739
7739
  "not-in": "Not in",
7740
7740
  "array-contains": "Contains",
7741
7741
  "array-contains-any": "Any"
7742
- }, Jr = ["array-contains-any", "in", "not-in"];
7742
+ }, Hr = ["array-contains-any", "in", "not-in"];
7743
7743
  function Pc({
7744
7744
  name: e,
7745
7745
  value: t,
@@ -7754,14 +7754,14 @@ function Pc({
7754
7754
  const [c, d] = t || [l[0], void 0], [u, f] = P(c), [m, p] = P(d);
7755
7755
  function h(g, y) {
7756
7756
  let w = y;
7757
- const b = Jr.includes(u), _ = Jr.includes(g);
7757
+ const b = Hr.includes(u), _ = Hr.includes(g);
7758
7758
  b !== _ && (w = _ ? typeof y == "string" || typeof y == "number" ? [y] : [] : void 0), typeof w == "number" && isNaN(w) && (w = void 0), f(g), p(w);
7759
7759
  const k = w !== null && Array.isArray(w) ? w.length > 0 : w !== void 0;
7760
7760
  r(
7761
7761
  g && k ? [g, w] : void 0
7762
7762
  );
7763
7763
  }
7764
- const A = Jr.includes(u);
7764
+ const A = Hr.includes(u);
7765
7765
  return /* @__PURE__ */ v("div", { className: "flex w-[440px]", children: [
7766
7766
  /* @__PURE__ */ n("div", { className: "w-[80px]", children: /* @__PURE__ */ n(
7767
7767
  nt,
@@ -7838,7 +7838,7 @@ function Pc({
7838
7838
  }
7839
7839
  ),
7840
7840
  !a && /* @__PURE__ */ v(
7841
- vi,
7841
+ ki,
7842
7842
  {
7843
7843
  className: "border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800",
7844
7844
  htmlFor: "null-filter",
@@ -7940,7 +7940,7 @@ function Dc({
7940
7940
  }
7941
7941
  ),
7942
7942
  /* @__PURE__ */ v(
7943
- vi,
7943
+ ki,
7944
7944
  {
7945
7945
  className: "border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800",
7946
7946
  htmlFor: "null-filter",
@@ -8054,7 +8054,7 @@ const Rc = S.memo(
8054
8054
  error: f,
8055
8055
  paginationEnabled: k,
8056
8056
  onColumnResize: a,
8057
- rowHeight: Nr(s),
8057
+ rowHeight: Fr(s),
8058
8058
  loading: d,
8059
8059
  filter: m,
8060
8060
  onFilterUpdate: p ? se : void 0,
@@ -8208,7 +8208,7 @@ const Wo = function({
8208
8208
  customFieldValidator: j,
8209
8209
  columnIndex: xe,
8210
8210
  width: ie.width,
8211
- height: Nr(se),
8211
+ height: Fr(se),
8212
8212
  entity: Ce,
8213
8213
  disabled: Ke,
8214
8214
  enablePopupIcon: V,
@@ -8623,14 +8623,14 @@ function Xo({
8623
8623
  ": Confirm multiple delete?"
8624
8624
  ] }) : `Would you like to delete this ${w.singularName ?? w.name}?`;
8625
8625
  return /* @__PURE__ */ v(
8626
- ki,
8626
+ _i,
8627
8627
  {
8628
8628
  maxWidth: A ? "lg" : "2xl",
8629
8629
  "aria-labelledby": "delete-dialog",
8630
8630
  open: i,
8631
8631
  onOpenChange: (z) => z ? void 0 : r(),
8632
8632
  children: [
8633
- /* @__PURE__ */ v(_i, { fullHeight: !0, children: [
8633
+ /* @__PURE__ */ v(xi, { fullHeight: !0, children: [
8634
8634
  /* @__PURE__ */ n(L, { variant: "subtitle2", className: "p-4", children: F }),
8635
8635
  !A && /* @__PURE__ */ n("div", { className: "p-4", children: D })
8636
8636
  ] }),
@@ -8663,7 +8663,7 @@ function Xo({
8663
8663
  );
8664
8664
  }
8665
8665
  const Vc = {
8666
- icon: /* @__PURE__ */ n(Ai, {}),
8666
+ icon: /* @__PURE__ */ n(bi, {}),
8667
8667
  name: "Edit",
8668
8668
  collapsed: !1,
8669
8669
  onClick({
@@ -8732,7 +8732,7 @@ const Vc = {
8732
8732
  return window.open(`https://example.com/${e.id}`, "_blank"), Promise.resolve(void 0);
8733
8733
  }
8734
8734
  }, ea = {
8735
- icon: /* @__PURE__ */ n(ri, {}),
8735
+ icon: /* @__PURE__ */ n(ii, {}),
8736
8736
  name: "Delete",
8737
8737
  onClick({
8738
8738
  entity: e,
@@ -9071,7 +9071,7 @@ function Yc({
9071
9071
  variant: "body2",
9072
9072
  color: "secondary",
9073
9073
  component: "div",
9074
- children: /* @__PURE__ */ n(bi, { source: t, size: "small" })
9074
+ children: /* @__PURE__ */ n(yi, { source: t, size: "small" })
9075
9075
  }
9076
9076
  )
9077
9077
  ]
@@ -9094,7 +9094,7 @@ function Lc({
9094
9094
  className: U(
9095
9095
  La,
9096
9096
  Ua,
9097
- ii,
9097
+ ni,
9098
9098
  "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 "
9099
9099
  ),
9100
9100
  to: t,
@@ -9127,7 +9127,7 @@ function Uc({
9127
9127
  onClick: s,
9128
9128
  type: l
9129
9129
  }) {
9130
- const c = Pt(), d = /* @__PURE__ */ n(li, { collectionOrView: t ?? r }), u = Kt(), f = Re(), m = fe(), p = (c?.favouritePaths ?? []).includes(e), h = c ? [
9130
+ const c = Pt(), d = /* @__PURE__ */ n(ci, { collectionOrView: t ?? r }), u = Kt(), f = Re(), m = fe(), p = (c?.favouritePaths ?? []).includes(e), h = c ? [
9131
9131
  /* @__PURE__ */ n(
9132
9132
  de,
9133
9133
  {
@@ -9207,7 +9207,7 @@ function $c({ entry: e }) {
9207
9207
  );
9208
9208
  };
9209
9209
  return /* @__PURE__ */ n(
9210
- gi,
9210
+ Ai,
9211
9211
  {
9212
9212
  onClick: () => t(e.url),
9213
9213
  icon: i ? /* @__PURE__ */ n(
@@ -9243,10 +9243,10 @@ function qc({ hidden: e }) {
9243
9243
  a.path
9244
9244
  )) }) });
9245
9245
  }
9246
- const Hr = {};
9246
+ const Zr = {};
9247
9247
  function Wc() {
9248
9248
  const e = Cr(), t = S.useRef(null), [r, i] = S.useState(0), [a, o] = S.useState("down"), s = x(() => {
9249
- !t.current || !e.key || (Hr[e.key] = t.current.scrollTop, i(t.current.scrollTop), o(t.current.scrollTop > r ? "down" : "up"));
9249
+ !t.current || !e.key || (Zr[e.key] = t.current.scrollTop, i(t.current.scrollTop), o(t.current.scrollTop > r ? "down" : "up"));
9250
9250
  }, [t, e.key, r]);
9251
9251
  return O(() => {
9252
9252
  const l = t.current;
@@ -9255,9 +9255,9 @@ function Wc() {
9255
9255
  l && l.removeEventListener("scroll", s);
9256
9256
  };
9257
9257
  }, [t, s, e]), O(() => {
9258
- !t.current || !Hr[e.key] || t.current.scrollTo(
9258
+ !t.current || !Zr[e.key] || t.current.scrollTo(
9259
9259
  {
9260
- top: Hr[e.key],
9260
+ top: Zr[e.key],
9261
9261
  behavior: "auto"
9262
9262
  }
9263
9263
  );
@@ -9334,7 +9334,7 @@ function Jc({
9334
9334
  style: { top: c === "down" ? -84 : 0 },
9335
9335
  children: [
9336
9336
  /* @__PURE__ */ n(
9337
- yi,
9337
+ wi,
9338
9338
  {
9339
9339
  onTextSearch: h,
9340
9340
  placeholder: "Search collections",
@@ -9429,7 +9429,7 @@ function Hc({
9429
9429
  {
9430
9430
  variant: "text",
9431
9431
  disabled: !A?.length || !y,
9432
- startIcon: /* @__PURE__ */ n(ri, {}),
9432
+ startIcon: /* @__PURE__ */ n(ii, {}),
9433
9433
  onClick: a,
9434
9434
  color: "primary",
9435
9435
  className: "lg:w-20",
@@ -9445,7 +9445,7 @@ function Hc({
9445
9445
  color: "primary",
9446
9446
  disabled: !A?.length || !y,
9447
9447
  onClick: a,
9448
- children: /* @__PURE__ */ n(ri, {})
9448
+ children: /* @__PURE__ */ n(ii, {})
9449
9449
  }
9450
9450
  );
9451
9451
  w = /* @__PURE__ */ n(
@@ -9516,7 +9516,7 @@ function Zc({
9516
9516
  }
9517
9517
  function Xc() {
9518
9518
  const [e, t] = P({ width: 0, height: 0 });
9519
- return Kr(() => {
9519
+ return ei(() => {
9520
9520
  function r() {
9521
9521
  t({ width: window.innerWidth, height: window.innerHeight });
9522
9522
  }
@@ -9619,13 +9619,13 @@ function td({
9619
9619
  D.current = !1;
9620
9620
  },
9621
9621
  [i, w]
9622
- ), Kr(
9622
+ ), ei(
9623
9623
  () => {
9624
9624
  const G = B.current?.getBoundingClientRect();
9625
9625
  !s || !G || D.current || ($(), D.current = !0);
9626
9626
  },
9627
9627
  [s, $, D.current]
9628
- ), Kr(
9628
+ ), ei(
9629
9629
  () => {
9630
9630
  $(A);
9631
9631
  },
@@ -9983,7 +9983,7 @@ const nd = "collectionGroupParent", ta = S.memo(
9983
9983
  setError: ye,
9984
9984
  data: we
9985
9985
  }) => {
9986
- const Je = ei({ ...we.values }, le, W), st = {
9986
+ const Je = ti({ ...we.values }, le, W), st = {
9987
9987
  path: l,
9988
9988
  entityId: we.id,
9989
9989
  values: Je,
@@ -10031,7 +10031,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10031
10031
  {
10032
10032
  color: "primary",
10033
10033
  variant: "outlined",
10034
- startIcon: /* @__PURE__ */ n(Ai, { size: "small" }),
10034
+ startIcon: /* @__PURE__ */ n(bi, { size: "small" }),
10035
10035
  onClick: (we) => {
10036
10036
  we.stopPropagation(), u.open({
10037
10037
  path: l,
@@ -10107,7 +10107,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10107
10107
  }
10108
10108
  );
10109
10109
  }, at = /* @__PURE__ */ n(
10110
- wi,
10110
+ vi,
10111
10111
  {
10112
10112
  open: Y,
10113
10113
  onOpenChange: X,
@@ -10135,7 +10135,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10135
10135
  }
10136
10136
  )
10137
10137
  ] }),
10138
- children: g.description && /* @__PURE__ */ n("div", { className: "m-4 text-gray-900 dark:text-white", children: /* @__PURE__ */ n(bi, { source: g.description }) })
10138
+ children: g.description && /* @__PURE__ */ n("div", { className: "m-4 text-gray-900 dark:text-white", children: /* @__PURE__ */ n(yi, { source: g.description }) })
10139
10139
  }
10140
10140
  ), Tt = x(({
10141
10141
  property: W,
@@ -10158,7 +10158,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10158
10158
  `plugin_header_action_${Je}`
10159
10159
  );
10160
10160
  }) }) : null;
10161
- }, [h.plugins, l, r]), Qr = I ? function() {
10161
+ }, [h.plugins, l, r]), Dr = I ? function() {
10162
10162
  return typeof I == "function" ? /* @__PURE__ */ n(
10163
10163
  I,
10164
10164
  {
@@ -10168,10 +10168,10 @@ const nd = "collectionGroupParent", ta = S.memo(
10168
10168
  }
10169
10169
  ) : null;
10170
10170
  } : void 0, {
10171
- textSearchLoading: Dr,
10172
- textSearchInitialised: Rr,
10171
+ textSearchLoading: Rr,
10172
+ textSearchInitialised: Tr,
10173
10173
  onTextSearchClick: bt,
10174
- textSearchEnabled: Tr
10174
+ textSearchEnabled: Or
10175
10175
  } = Zo({
10176
10176
  collection: g,
10177
10177
  fullPath: Ve,
@@ -10202,9 +10202,9 @@ const nd = "collectionGroupParent", ta = S.memo(
10202
10202
  defaultSize: g.defaultSize,
10203
10203
  properties: Te.properties,
10204
10204
  getPropertyFor: Ce,
10205
- onTextSearchClick: Rr ? void 0 : bt,
10206
- textSearchLoading: Dr,
10207
- textSearchEnabled: Tr,
10205
+ onTextSearchClick: Tr ? void 0 : bt,
10206
+ textSearchLoading: Rr,
10207
+ textSearchEnabled: Or,
10208
10208
  actionsStart: /* @__PURE__ */ n(
10209
10209
  id,
10210
10210
  {
@@ -10251,7 +10251,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10251
10251
  hoverRow: oe,
10252
10252
  inlineEditing: z(),
10253
10253
  AdditionalHeaderWidget: Tt,
10254
- AddColumnComponent: Qr,
10254
+ AddColumnComponent: Dr,
10255
10255
  getIdColumnWidth: ir,
10256
10256
  additionalIDHeaderWidget: /* @__PURE__ */ n(
10257
10257
  ad,
@@ -10340,7 +10340,7 @@ function ad({
10340
10340
  }) {
10341
10341
  const [r, i] = S.useState(!1), [a, o] = S.useState(""), s = Ft();
10342
10342
  return /* @__PURE__ */ n(ke, { title: r ? void 0 : "Find by ID", children: /* @__PURE__ */ n(
10343
- wi,
10343
+ vi,
10344
10344
  {
10345
10345
  open: r,
10346
10346
  onOpenChange: i,
@@ -10396,7 +10396,7 @@ function Sm({ propertyConfig: e }) {
10396
10396
  style: {
10397
10397
  background: e?.color ?? r?.color ?? "#888"
10398
10398
  },
10399
- children: e?.Icon ? ai(e, "medium") : ai(r, "medium")
10399
+ children: e?.Icon ? si(e, "medium") : si(r, "medium")
10400
10400
  }
10401
10401
  );
10402
10402
  }
@@ -10438,12 +10438,12 @@ function Im({
10438
10438
  body: o
10439
10439
  }) {
10440
10440
  return /* @__PURE__ */ v(
10441
- ki,
10441
+ _i,
10442
10442
  {
10443
10443
  open: e,
10444
10444
  onOpenChange: (s) => s ? void 0 : r(),
10445
10445
  children: [
10446
- /* @__PURE__ */ v(_i, { children: [
10446
+ /* @__PURE__ */ v(xi, { children: [
10447
10447
  /* @__PURE__ */ n(L, { variant: "h6", className: "mb-2", children: i }),
10448
10448
  o
10449
10449
  ] }),
@@ -10946,7 +10946,7 @@ function dd({
10946
10946
  /* @__PURE__ */ v(Pe, { dense: !0, onClick: (d) => {
10947
10947
  l(!1), r(i);
10948
10948
  }, children: [
10949
- /* @__PURE__ */ n(xi, { size: "small" }),
10949
+ /* @__PURE__ */ n(Ei, { size: "small" }),
10950
10950
  "Remove"
10951
10951
  ] }),
10952
10952
  /* @__PURE__ */ v(Pe, { dense: !0, onClick: () => {
@@ -11073,8 +11073,8 @@ function Nm({
11073
11073
  );
11074
11074
  }
11075
11075
  const md = 220;
11076
- si && process.env.NODE_ENV !== "production" && Object.keys(si).forEach((e) => {
11077
- fi.includes(e) || console.warn(`The icon ${e} no longer exists. Remove it from \`iconSynonyms\``);
11076
+ li && process.env.NODE_ENV !== "production" && Object.keys(li).forEach((e) => {
11077
+ hi.includes(e) || console.warn(`The icon ${e} no longer exists. Remove it from \`iconSynonyms\``);
11078
11078
  });
11079
11079
  function Fm({
11080
11080
  selectedIcon: e = "",
@@ -11095,7 +11095,7 @@ function Fm({
11095
11095
  s.clear();
11096
11096
  }), [a, s]), /* @__PURE__ */ v(M, { children: [
11097
11097
  /* @__PURE__ */ n(
11098
- yi,
11098
+ wi,
11099
11099
  {
11100
11100
  autoFocus: !1,
11101
11101
  innerClassName: "w-full sticky top-0 z-10",
@@ -11103,14 +11103,14 @@ function Fm({
11103
11103
  placeholder: "Search for more icons…"
11104
11104
  }
11105
11105
  ),
11106
- /* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ? ti : r).map((c) => /* @__PURE__ */ n(ke, { title: c, children: /* @__PURE__ */ n(
11106
+ /* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ? ri : r).map((c) => /* @__PURE__ */ n(ke, { title: c, children: /* @__PURE__ */ n(
11107
11107
  de,
11108
11108
  {
11109
11109
  shape: "square",
11110
11110
  toggled: e === c,
11111
11111
  onClick: t ? () => t(c) : void 0,
11112
11112
  className: "box-content m-1",
11113
- children: /* @__PURE__ */ n(hi, { iconKey: c, size: 24 })
11113
+ children: /* @__PURE__ */ n(gi, { iconKey: c, size: 24 })
11114
11114
  }
11115
11115
  ) }, c)) })
11116
11116
  ] });
@@ -11551,7 +11551,7 @@ function aa({
11551
11551
  onClick: (s) => {
11552
11552
  s.stopPropagation(), i(r);
11553
11553
  },
11554
- children: /* @__PURE__ */ n(xi, { size: "small" })
11554
+ children: /* @__PURE__ */ n(Ei, { size: "small" })
11555
11555
  }
11556
11556
  )
11557
11557
  }
@@ -11697,7 +11697,7 @@ function wd({
11697
11697
  t ? Yn : xr,
11698
11698
  fd,
11699
11699
  a && l.length ? "" : "flex",
11700
- ii,
11700
+ ni,
11701
11701
  {
11702
11702
  [gd]: !b,
11703
11703
  [Ad]: b,
@@ -11759,7 +11759,7 @@ function wd({
11759
11759
  ref: Q.innerRef,
11760
11760
  ...Q.draggableProps,
11761
11761
  ...Q.dragHandleProps,
11762
- className: U(ii, "rounded-md"),
11762
+ className: U(ni, "rounded-md"),
11763
11763
  style: {
11764
11764
  ...Q.draggableProps.style
11765
11765
  },
@@ -12213,7 +12213,7 @@ const Dt = S.memo(Cd, (e, t) => {
12213
12213
  if (e.propertyKey !== t.propertyKey)
12214
12214
  return !1;
12215
12215
  const r = Qe(e.property) || e.property.fromBuilder, i = Qe(t.property) || t.property.fromBuilder;
12216
- return !((r === i || J(e.property, t.property)) && e.disabled === t.disabled) || ui(t.property), !1;
12216
+ return !((r === i || J(e.property, t.property)) && e.disabled === t.disabled) || mi(t.property), !1;
12217
12217
  });
12218
12218
  function Cd({
12219
12219
  propertyKey: e,
@@ -12242,14 +12242,14 @@ function Cd({
12242
12242
  entityId: r.entityId,
12243
12243
  fields: u.propertyConfigs
12244
12244
  });
12245
- if (p === null || Bi(p))
12245
+ if (p === null || Si(p))
12246
12246
  return /* @__PURE__ */ n(M, {});
12247
12247
  if (er(p))
12248
12248
  m = sa;
12249
12249
  else if (p.Field)
12250
12250
  typeof p.Field == "function" && (m = p.Field);
12251
12251
  else {
12252
- const A = Pr(p, u.propertyConfigs);
12252
+ const A = Qr(p, u.propertyConfigs);
12253
12253
  if (!A)
12254
12254
  throw console.log("INTERNAL: Could not find field config for property", {
12255
12255
  propertyKey: e,
@@ -12342,11 +12342,11 @@ function Bd({
12342
12342
  a && !_ && /* @__PURE__ */ n(L, { variant: "caption", className: "ml-3.5", children: "This value has been updated elsewhere" })
12343
12343
  ] });
12344
12344
  }
12345
- const ui = (e, t) => {
12345
+ const mi = (e, t) => {
12346
12346
  if (t?.some((a) => a.form?.fieldBuilder) || Qe(e))
12347
12347
  return !0;
12348
12348
  const r = e, i = !!r.Field || "fromBuilder" in r && r.fromBuilder;
12349
- return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((a) => ui(a, t)) : r.dataType === "array" && "resolvedProperties" in r ? i || r.resolvedProperties?.some((a) => a && ui(a, t)) : i;
12349
+ return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((a) => mi(a, t)) : r.dataType === "array" && "resolvedProperties" in r ? i || r.resolvedProperties?.some((a) => a && mi(a, t)) : i;
12350
12350
  };
12351
12351
  function Sd({
12352
12352
  path: e,
@@ -12398,7 +12398,7 @@ function Id({
12398
12398
  o.properties,
12399
12399
  ...Object.keys(t).filter((y) => y in o.properties)
12400
12400
  ) : h = {} : h = o.properties;
12401
- const A = /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([y, w]) => !Bi(w)).map(
12401
+ const A = /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([y, w]) => !Si(w)).map(
12402
12402
  ([y, w], b) => {
12403
12403
  const _ = {
12404
12404
  propertyKey: `${e}.${y}`,
@@ -12515,17 +12515,17 @@ function zi({
12515
12515
  disabled: i
12516
12516
  }) {
12517
12517
  const [a, o] = S.useState(
12518
- Object.keys(e ?? {}).map((c) => [Zr(), {
12518
+ Object.keys(e ?? {}).map((c) => [Xr(), {
12519
12519
  key: c,
12520
- dataType: mi(e?.[c]) ?? "string"
12520
+ dataType: pi(e?.[c]) ?? "string"
12521
12521
  }])
12522
12522
  );
12523
12523
  O(() => {
12524
12524
  const c = a.map(([p, { key: h }]) => h), d = Object.entries(e ?? {}).filter(([p, h]) => h !== void 0).map(([p]) => p), u = d.filter((p) => !c.includes(p)), f = c.filter((p) => !d.includes(p)), m = [...a];
12525
12525
  u.forEach((p) => {
12526
- m.push([Zr(), {
12526
+ m.push([Xr(), {
12527
12527
  key: p,
12528
- dataType: mi(e?.[p]) ?? "string"
12528
+ dataType: pi(e?.[p]) ?? "string"
12529
12529
  }]);
12530
12530
  }), f.forEach((p) => {
12531
12531
  const h = m.findIndex(([A, { key: g }]) => g === p);
@@ -12599,7 +12599,7 @@ function zi({
12599
12599
  c.preventDefault(), t({
12600
12600
  ...e ?? {},
12601
12601
  "": null
12602
- }), o([...a, [Zr(), {
12602
+ }), o([...a, [Xr(), {
12603
12603
  key: "",
12604
12604
  dataType: "string"
12605
12605
  }]]);
@@ -12838,7 +12838,7 @@ function Fd({
12838
12838
  size: "small",
12839
12839
  onClick: a,
12840
12840
  className: "h-7 w-7",
12841
- children: /* @__PURE__ */ n(xi, { size: "small" })
12841
+ children: /* @__PURE__ */ n(Ei, { size: "small" })
12842
12842
  }
12843
12843
  )
12844
12844
  ]
@@ -12854,7 +12854,7 @@ function Pd({
12854
12854
  value: r,
12855
12855
  setValue: i
12856
12856
  }) {
12857
- const { locale: a } = fe(), [o, s] = P(mi(r) ?? "string");
12857
+ const { locale: a } = fe(), [o, s] = P(pi(r) ?? "string");
12858
12858
  function l(d) {
12859
12859
  s(d);
12860
12860
  }
@@ -12979,10 +12979,10 @@ function Pd({
12979
12979
  o === "map" && c(r, o)
12980
12980
  ] });
12981
12981
  }
12982
- function Zr() {
12982
+ function Xr() {
12983
12983
  return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
12984
12984
  }
12985
- function mi(e) {
12985
+ function pi(e) {
12986
12986
  if (typeof e == "string" || e === null)
12987
12987
  return "string";
12988
12988
  if (typeof e == "number")
@@ -13050,7 +13050,7 @@ function Qd({
13050
13050
  onInternalIdAdded: g,
13051
13051
  disabled: a || !!c.disabled,
13052
13052
  includeAddButton: !c.disabled,
13053
- newDefaultEntry: c.of.defaultValue
13053
+ newDefaultEntry: Br(c.of)
13054
13054
  }
13055
13055
  ), b = /* @__PURE__ */ n(
13056
13056
  ze,
@@ -13141,7 +13141,7 @@ function Dd({
13141
13141
  setFieldValue: s,
13142
13142
  newDefaultEntry: {
13143
13143
  [c.oneOf.typeField ?? Lt]: w,
13144
- [c.oneOf.valueField ?? fr]: Si(c.oneOf.properties[w])
13144
+ [c.oneOf.valueField ?? fr]: Br(c.oneOf.properties[w])
13145
13145
  }
13146
13146
  }
13147
13147
  );
@@ -13178,7 +13178,7 @@ function Rd({
13178
13178
  autoFocus: s,
13179
13179
  context: l
13180
13180
  }) {
13181
- const c = r && r[i], [d, u] = P(c ?? void 0), f = pi();
13181
+ const c = r && r[i], [d, u] = P(c ?? void 0), f = fi();
13182
13182
  O(() => {
13183
13183
  c || y(Object.keys(o)[0]);
13184
13184
  }, []), O(() => {
@@ -13197,7 +13197,7 @@ function Rd({
13197
13197
  tableMode: !1
13198
13198
  } : void 0, y = (w) => {
13199
13199
  const b = w ? o[w] : void 0;
13200
- u(w), f.setFieldTouched(h, !0), f.setFieldValue(h, w), f.setFieldValue(A, b ? Si(b) : null);
13200
+ u(w), f.setFieldTouched(h, !0), f.setFieldValue(h, w), f.setFieldValue(A, b ? Br(b) : null);
13201
13201
  };
13202
13202
  return /* @__PURE__ */ v("div", { className: U(kr, "bg-transparent p-4 my-4 py-8"), children: [
13203
13203
  /* @__PURE__ */ n(
@@ -13260,9 +13260,9 @@ function Rd({
13260
13260
  }
13261
13261
  const Td = new Is();
13262
13262
  try {
13263
- cr.use(jr.AutoResize, {
13263
+ cr.use(Yr.AutoResize, {
13264
13264
  min: 100
13265
- }), cr.unuse(jr.FontUnderline), cr.unuse(jr.Clear);
13265
+ }), cr.unuse(Yr.FontUnderline), cr.unuse(Yr.Clear);
13266
13266
  } catch {
13267
13267
  }
13268
13268
  function Od({
@@ -14273,7 +14273,7 @@ function Gd(e) {
14273
14273
  }
14274
14274
  return Vi[t];
14275
14275
  }
14276
- function Pr(e, t) {
14276
+ function Qr(e, t) {
14277
14277
  const r = la(e), i = Gi(e);
14278
14278
  if (!i) {
14279
14279
  console.error("No field id found for property", e);
@@ -14533,7 +14533,7 @@ function ji(e) {
14533
14533
  path: t,
14534
14534
  collections: r = [],
14535
14535
  currentFullPath: i
14536
- } = e, a = Ee(t).split("/"), o = Ci(a), s = [];
14536
+ } = e, a = Ee(t).split("/"), o = Bi(a), s = [];
14537
14537
  for (let l = 0; l < o.length; l++) {
14538
14538
  const c = o[l], d = r && r.find((u) => u.id === c || u.path === c);
14539
14539
  if (d) {
@@ -14587,7 +14587,7 @@ function Ld({
14587
14587
  entity: o,
14588
14588
  loading: s
14589
14589
  }) {
14590
- const { errors: l } = pi(), c = r === "existing" || !e, d = r !== "existing" && !e, u = he(() => {
14590
+ const { errors: l } = fi(), c = r === "existing" || !e, d = r !== "existing" && !e, u = he(() => {
14591
14591
  if (!(!e || typeof e == "boolean" || e === "optional"))
14592
14592
  return ht(e);
14593
14593
  }, [e]), f = gt(), { copy: m } = ll({
@@ -14676,7 +14676,7 @@ function Ld({
14676
14676
  ] });
14677
14677
  }
14678
14678
  const Ud = ({ containerRef: e }) => {
14679
- const { isSubmitting: t, isValidating: r, errors: i } = pi();
14679
+ const { isSubmitting: t, isValidating: r, errors: i } = fi();
14680
14680
  return O(() => {
14681
14681
  const a = Object.keys(i);
14682
14682
  if (a.length > 0 && t && !r) {
@@ -14842,7 +14842,7 @@ function Jd({
14842
14842
  status: F,
14843
14843
  dataSource: y,
14844
14844
  context: E,
14845
- onSaveSuccess: (zr) => Te(zr, ve),
14845
+ onSaveSuccess: (Vr) => Te(Vr, ve),
14846
14846
  onSaveFailure: Ce,
14847
14847
  onPreSaveHookError: xe,
14848
14848
  onSaveSuccessHookError: Ve
@@ -14853,10 +14853,10 @@ function Jd({
14853
14853
  values: Ge,
14854
14854
  previousValues: it,
14855
14855
  closeAfterSave: zt,
14856
- autoSave: zr
14856
+ autoSave: Vr
14857
14857
  }) => {
14858
14858
  if (F)
14859
- if (zr)
14859
+ if (Vr)
14860
14860
  h(Ge);
14861
14861
  else
14862
14862
  return We({
@@ -14929,7 +14929,7 @@ function Jd({
14929
14929
  path: e,
14930
14930
  save: Rt,
14931
14931
  formex: re
14932
- }, Tt = j ? j.map((N) => ua(N, k.entityViews)).filter(Boolean) : [], Qr = Tt.find((N) => N.key === ee.current), Dr = !I && (ee.current === Gt || Qr?.includeActions), Rr = j && Tt.map(
14932
+ }, Tt = j ? j.map((N) => ua(N, k.entityViews)).filter(Boolean) : [], Dr = Tt.find((N) => N.key === ee.current), Rr = !I && (ee.current === Gt || Dr?.includeActions), Tr = j && Tt.map(
14933
14933
  (N, Z) => {
14934
14934
  if (!N || ee.current !== N.key)
14935
14935
  return null;
@@ -14955,7 +14955,7 @@ function Jd({
14955
14955
  `custom_view_${N.key}`
14956
14956
  ) : (console.error("customView.Builder is not defined"), null);
14957
14957
  }
14958
- ).filter(Boolean), bt = u && !me || (!me || Xe === void 0) && (F === "existing" || F === "copy"), Tr = bt || f, W = K && K.map(
14958
+ ).filter(Boolean), bt = u && !me || (!me || Xe === void 0) && (F === "existing" || F === "copy"), Or = bt || f, W = K && K.map(
14959
14959
  (N, Z) => {
14960
14960
  const ve = N.id ?? N.path, Ge = me ? `${e}/${me?.id}/${Ee(ve)}` : void 0;
14961
14961
  return ee.current !== ve ? null : /* @__PURE__ */ v(
@@ -14964,7 +14964,7 @@ function Jd({
14964
14964
  className: "relative flex-grow h-full overflow-auto w-full",
14965
14965
  role: "tabpanel",
14966
14966
  children: [
14967
- Tr && /* @__PURE__ */ n(yr, {}),
14967
+ Or && /* @__PURE__ */ n(yr, {}),
14968
14968
  !bt && (me && Ge ? /* @__PURE__ */ n(
14969
14969
  ta,
14970
14970
  {
@@ -15065,10 +15065,10 @@ function Jd({
15065
15065
  }) => {
15066
15066
  const ve = $t(A, g, e, null), Ge = N ? Fi(A, g, e, N) : !0, it = [];
15067
15067
  return ve && it.push(Ko), Ge && it.push(ea), Z && it.push(...Z), it;
15068
- }, [g, A, e]), Or = re.dirty;
15068
+ }, [g, A, e]), Mr = re.dirty;
15069
15069
  O(() => {
15070
- I ? re.values && !J(re.values, ir.current) && Rt(re.values) : s(Or);
15071
- }, [Or, re.values]), O(() => {
15070
+ I ? re.values && !J(re.values, ir.current) && Rt(re.values) : s(Mr);
15071
+ }, [Mr, re.values]), O(() => {
15072
15072
  !I && !re.isSubmitting && Mt && d && Object.entries(Mt).forEach(([N, Z]) => {
15073
15073
  const ve = re.values[N];
15074
15074
  !J(Z, ve) && !re.touched[N] && (console.debug("Updated value from the datasource:", N, Z), re.setFieldValue(N, Z !== void 0 ? Z : null));
@@ -15079,7 +15079,7 @@ function Jd({
15079
15079
  if (!Z)
15080
15080
  return console.warn(`Property ${N} not found in collection ${Be.name}`), null;
15081
15081
  const ve = !!Mt && Object.keys(Mt).includes(N) && !!re.touched[N], Ge = !I && re.isSubmitting || er(Z) || !!Z.disabled;
15082
- if (Bi(Z))
15082
+ if (Si(Z))
15083
15083
  return null;
15084
15084
  const zt = {
15085
15085
  propertyKey: N,
@@ -15111,7 +15111,7 @@ function Jd({
15111
15111
  },
15112
15112
  `field_${Be.name}_${N}`
15113
15113
  );
15114
- }).filter(Boolean) }), Mr = re.isSubmitting || !Or && F === "existing", qi = S.useRef(null), Wi = Aa({
15114
+ }).filter(Boolean) }), zr = re.isSubmitting || !Mr && F === "existing", qi = S.useRef(null), Wi = Aa({
15115
15115
  entity: d,
15116
15116
  customEntityActions: A.entityActions
15117
15117
  }).filter((N) => N.includeInForm === void 0 || N.includeInForm), ya = /* @__PURE__ */ v(It, { position: "absolute", children: [
@@ -15138,7 +15138,7 @@ function Jd({
15138
15138
  ge,
15139
15139
  {
15140
15140
  variant: "text",
15141
- disabled: Mr || re.isSubmitting,
15141
+ disabled: zr || re.isSubmitting,
15142
15142
  type: "reset",
15143
15143
  children: F === "existing" ? "Discard" : "Clear"
15144
15144
  }
@@ -15149,7 +15149,7 @@ function Jd({
15149
15149
  variant: "text",
15150
15150
  color: "primary",
15151
15151
  type: "submit",
15152
- disabled: Mr || re.isSubmitting,
15152
+ disabled: zr || re.isSubmitting,
15153
15153
  onClick: () => {
15154
15154
  C.current = !1;
15155
15155
  },
@@ -15166,7 +15166,7 @@ function Jd({
15166
15166
  variant: "filled",
15167
15167
  color: "primary",
15168
15168
  type: "submit",
15169
- disabled: Mr || re.isSubmitting,
15169
+ disabled: zr || re.isSubmitting,
15170
15170
  onClick: () => {
15171
15171
  C.current = !0;
15172
15172
  },
@@ -15274,7 +15274,7 @@ function Jd({
15274
15274
  )
15275
15275
  ] }) : wa(), ka = K && K.map(
15276
15276
  (N) => /* @__PURE__ */ n(
15277
- Gr,
15277
+ jr,
15278
15278
  {
15279
15279
  className: "text-sm min-w-[140px]",
15280
15280
  value: N.id,
@@ -15284,7 +15284,7 @@ function Jd({
15284
15284
  )
15285
15285
  ), _a = Tt.map(
15286
15286
  (N) => /* @__PURE__ */ n(
15287
- Gr,
15287
+ jr,
15288
15288
  {
15289
15289
  className: "text-sm min-w-[140px]",
15290
15290
  value: N.key,
@@ -15332,7 +15332,7 @@ function Jd({
15332
15332
  className: "pl-4 pr-4 pt-0",
15333
15333
  children: [
15334
15334
  /* @__PURE__ */ n(
15335
- Gr,
15335
+ jr,
15336
15336
  {
15337
15337
  disabled: !R,
15338
15338
  value: Gt,
@@ -15366,9 +15366,9 @@ function Jd({
15366
15366
  children: bt ? /* @__PURE__ */ n(yr, {}) : va
15367
15367
  }
15368
15368
  ),
15369
- Rr,
15369
+ Tr,
15370
15370
  W,
15371
- Dr && ya
15371
+ Rr && ya
15372
15372
  ]
15373
15373
  }
15374
15374
  )
@@ -15389,9 +15389,9 @@ function Zd(e) {
15389
15389
  let t = {};
15390
15390
  if (e.inner) {
15391
15391
  if (e.inner.length === 0)
15392
- return ei(t, e.path, e.message);
15392
+ return ti(t, e.path, e.message);
15393
15393
  for (const r of e.inner)
15394
- jt(t, r.path) || (t = ei(t, r.path, r.message));
15394
+ jt(t, r.path) || (t = ti(t, r.path, r.message));
15395
15395
  }
15396
15396
  return t;
15397
15397
  }
@@ -15441,12 +15441,12 @@ function Kd({
15441
15441
  title: a
15442
15442
  }) {
15443
15443
  return /* @__PURE__ */ v(
15444
- ki,
15444
+ _i,
15445
15445
  {
15446
15446
  open: e,
15447
15447
  onOpenChange: (o) => o ? r() : t(),
15448
15448
  children: [
15449
- /* @__PURE__ */ v(_i, { children: [
15449
+ /* @__PURE__ */ v(xi, { children: [
15450
15450
  /* @__PURE__ */ n(L, { variant: "h6", children: a }),
15451
15451
  i,
15452
15452
  /* @__PURE__ */ n(L, { children: "Are you sure you want to leave this page?" })
@@ -15470,7 +15470,7 @@ const pa = S.createContext({
15470
15470
  }
15471
15471
  }), Yi = () => $e(pa);
15472
15472
  function Dm() {
15473
- const t = Ir().sidePanels, r = [...t];
15473
+ const t = Nr().sidePanels, r = [...t];
15474
15474
  return r.push(void 0), /* @__PURE__ */ n(M, { children: r.map((i, a) => /* @__PURE__ */ n(
15475
15475
  eu,
15476
15476
  {
@@ -15484,7 +15484,7 @@ function eu({
15484
15484
  offsetPosition: e,
15485
15485
  panel: t
15486
15486
  }) {
15487
- const [r, i] = P(!1), [a, o] = P(!1), [s, l] = P(), c = S.useRef(t?.width), d = c.current, u = Ir(), {
15487
+ const [r, i] = P(!1), [a, o] = P(!1), [s, l] = P(), c = S.useRef(t?.width), d = c.current, u = Nr(), {
15488
15488
  navigationWasBlocked: f,
15489
15489
  handleOk: m,
15490
15490
  handleCancel: p
@@ -15594,10 +15594,10 @@ function ru(e, t) {
15594
15594
  let i;
15595
15595
  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})`;
15596
15596
  }
15597
- const Xr = {};
15597
+ const Kr = {};
15598
15598
  function iu(e) {
15599
- if (Xr[e.id])
15600
- return Xr[e.id];
15599
+ if (Kr[e.id])
15600
+ return Kr[e.id];
15601
15601
  const t = Le({
15602
15602
  collection: e,
15603
15603
  path: "__ignored",
@@ -15608,7 +15608,7 @@ function iu(e) {
15608
15608
  const i = Object.values(t.properties).map((o) => mr(o)), a = Math.max(...i);
15609
15609
  a < 3 ? r = wr : r = 768 + 32 * (a - 2) + "px";
15610
15610
  }
15611
- return Xr[e.id] = r, r;
15611
+ return Kr[e.id] = r, r;
15612
15612
  }
15613
15613
  function mr(e, t = 0) {
15614
15614
  if (e.dataType === "map" && e.properties) {
@@ -16412,7 +16412,7 @@ function gu({
16412
16412
  Object.values(p).filter((_) => _.group === b).map((_, k) => /* @__PURE__ */ n(
16413
16413
  hu,
16414
16414
  {
16415
- icon: /* @__PURE__ */ n(li, { collectionOrView: _.collection ?? _.view }),
16415
+ icon: /* @__PURE__ */ n(ci, { collectionOrView: _.collection ?? _.view }),
16416
16416
  tooltipsOpen: c,
16417
16417
  drawerOpen: i,
16418
16418
  onClick: () => w(_),
@@ -16466,7 +16466,7 @@ function gu({
16466
16466
  k.preventDefault(), u(b.path);
16467
16467
  },
16468
16468
  children: [
16469
- /* @__PURE__ */ n(li, { collectionOrView: b.view }),
16469
+ /* @__PURE__ */ n(ci, { collectionOrView: b.view }),
16470
16470
  b.name
16471
16471
  ]
16472
16472
  },
@@ -16644,7 +16644,7 @@ export {
16644
16644
  ia as FireCMSLogo,
16645
16645
  Mi as FormikArrayContainer,
16646
16646
  ro as GeoPoint,
16647
- li as IconForView,
16647
+ ci as IconForView,
16648
16648
  yl as ImagePreview,
16649
16649
  Nd as KeyValueFieldBinding,
16650
16650
  To as KeyValuePreview,
@@ -16716,26 +16716,26 @@ export {
16716
16716
  co as fullPathToCollectionSegments,
16717
16717
  Xs as getArrayValuesCount,
16718
16718
  em as getBracketNotation,
16719
- Ei as getCollectionByPathOrId,
16720
- Ci as getCollectionPathsCombinations,
16719
+ Ci as getCollectionByPathOrId,
16720
+ Bi as getCollectionPathsCombinations,
16721
16721
  Ku as getColorForProperty,
16722
16722
  Os as getColorScheme,
16723
16723
  Ti as getColumnKeysForProperty,
16724
16724
  Gd as getDefaultFieldConfig,
16725
16725
  Gi as getDefaultFieldId,
16726
16726
  tm as getDefaultPropertiesOrder,
16727
- Si as getDefaultValueFor,
16727
+ Br as getDefaultValueFor,
16728
16728
  no as getDefaultValueForDataType,
16729
16729
  hr as getDefaultValuesFor,
16730
16730
  Zs as getEntityImagePreviewPropertyKey,
16731
16731
  Hs as getEntityPreviewKeys,
16732
16732
  po as getEntityTitlePropertyKey,
16733
- Pr as getFieldConfig,
16733
+ Qr as getFieldConfig,
16734
16734
  la as getFieldId,
16735
16735
  io as getHashValue,
16736
16736
  Js as getIcon,
16737
16737
  De as getIconForProperty,
16738
- ai as getIconForWidget,
16738
+ si as getIconForWidget,
16739
16739
  Xu as getIdIcon,
16740
16740
  Ii as getLabelOrConfigFrom,
16741
16741
  Gu as getLastSegment,
@@ -16747,13 +16747,13 @@ export {
16747
16747
  bm as getSidePanelKey,
16748
16748
  dt as getValueInPath,
16749
16749
  Us as hydrateRegExp,
16750
- si as iconSynonyms,
16750
+ li as iconSynonyms,
16751
16751
  Pi as iconsSearch,
16752
16752
  Vd as isDefaultFieldConfigId,
16753
16753
  on as isEmptyObject,
16754
16754
  Uu as isEnumValueDisabled,
16755
- Bi as isHidden,
16756
- Yr as isObject,
16755
+ Si as isHidden,
16756
+ Lr as isObject,
16757
16757
  Qe as isPropertyBuilder,
16758
16758
  er as isReadOnly,
16759
16759
  $s as isReferenceProperty,
@@ -16788,7 +16788,7 @@ export {
16788
16788
  ua as resolveEntityView,
16789
16789
  Qm as resolveEnumValues,
16790
16790
  al as resolveNavigationFrom,
16791
- Sr as resolvePermissions,
16791
+ Ir as resolvePermissions,
16792
16792
  ca as resolveProperties,
16793
16793
  Ye as resolveProperty,
16794
16794
  da as resolvePropertyEnum,
@@ -16797,12 +16797,12 @@ export {
16797
16797
  Ls as segmentsToStrippedPath,
16798
16798
  Hu as serializeRegExp,
16799
16799
  im as singular,
16800
- oi as slugify,
16800
+ ai as slugify,
16801
16801
  so as sortProperties,
16802
16802
  an as stripCollectionPath,
16803
16803
  $u as toKebabCase,
16804
16804
  qu as toSnakeCase,
16805
- ni as traverseValueProperty,
16805
+ oi as traverseValueProperty,
16806
16806
  oo as traverseValuesProperties,
16807
16807
  Ju as unslugify,
16808
16808
  Ts as updateDateAutoValues,
@@ -16832,7 +16832,7 @@ export {
16832
16832
  fc as useSelectableTableController,
16833
16833
  Ho as useSelectionController,
16834
16834
  Yi as useSideDialogContext,
16835
- Ir as useSideDialogsController,
16835
+ Nr as useSideDialogsController,
16836
16836
  Ft as useSideEntityController,
16837
16837
  gt as useSnackbarController,
16838
16838
  tr as useStorageSource,