@firecms/core 3.0.0-canary.79 → 3.0.0-canary.80

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 O } from "react/jsx-runtime";
2
2
  import * as kt from "react";
3
- import S, { useRef as ce, useEffect as z, useContext as $e, useCallback as x, useMemo as he, useState as Q, createElement as Ca, createRef as Ba, createContext as Sa, forwardRef as Ia, useLayoutEffect as ei, useDeferredValue as Na } from "react";
3
+ import S, { useRef as de, useEffect as z, useContext as $e, useCallback as x, useMemo as he, useState as Q, createElement as Ca, createRef as Ba, createContext as Sa, forwardRef as Ia, useLayoutEffect as ei, useDeferredValue as Na } from "react";
4
4
  import { SnackbarProvider as Fa, useSnackbar as Pa } from "notistack";
5
5
  import Ji from "object-hash";
6
6
  import { useCreateFormex as In, Formex as Nn, setIn as ti, Field as Fn, getIn as _t, useFormex as fi } from "@firecms/formex";
7
- import { getColorSchemeForSeed as Pn, CHIP_COLORS as Qa, Tooltip as ke, ErrorIcon as Qn, Typography as U, CircleIcon as Dn, FunctionsIcon as Da, iconKeys as hi, coolIconKeys as ri, Icon as gi, IconButton as de, ContentCopyIcon as vr, OpenInNewIcon as Zt, DescriptionIcon as Rn, cls as L, Skeleton as Le, Chip as Ai, defaultBorderMixin as Se, KeyboardTabIcon as bi, Checkbox as Xt, Markdown as yi, TextareaAutosize as Ra, MultiSelect as Tn, MultiSelectItem as On, Select as nt, SelectItem as ot, BooleanSwitch as Ta, DateTimeField as Kt, paperMixin as kr, ErrorOutlineIcon as Oa, EditIcon as za, Button as ge, RemoveCircleIcon as Ma, Menu as It, MoreVertIcon as zn, MenuItem as Pe, CircularProgress as xt, 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 Et, ClearIcon as Ut, BooleanSwitchWithLabel as _r, useOutsideAlerter as Mn, Dialog as _i, DialogContent as xi, DialogActions as Nt, FileCopyIcon as ja, ArchiveIcon as Ya, DeleteIcon as ii, AddIcon as pt, ExpandablePanel as ft, Card as Ua, ArrowForwardIcon as Vn, cardMixin as La, cardClickableMixin as $a, focusedMixin as ni, StarIcon as Gn, StarBorderIcon as jn, Collapse as Yn, 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 Un, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Ln, ArrowDropDownIcon as $n, 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 qn, useLocaleConfig as vs, MenuIcon as tn, ChevronLeftIcon as ks } from "@firecms/ui";
7
+ import { getColorSchemeForSeed as Pn, CHIP_COLORS as Qa, Tooltip as ke, ErrorIcon as Qn, Typography as U, CircleIcon as Dn, FunctionsIcon as Da, iconKeys as hi, coolIconKeys as ri, Icon as gi, IconButton as ue, ContentCopyIcon as vr, OpenInNewIcon as Zt, DescriptionIcon as Rn, cls as L, Skeleton as Le, Chip as Ai, defaultBorderMixin as Se, KeyboardTabIcon as bi, Checkbox as Xt, Markdown as yi, TextareaAutosize as Ra, MultiSelect as Tn, MultiSelectItem as On, Select as nt, SelectItem as ot, BooleanSwitch as Ta, DateTimeField as Kt, paperMixin as kr, ErrorOutlineIcon as Oa, EditIcon as za, Button as ge, RemoveCircleIcon as Ma, Menu as It, MoreVertIcon as zn, MenuItem as Pe, CircularProgress as xt, 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 Et, ClearIcon as Ut, BooleanSwitchWithLabel as _r, useOutsideAlerter as Mn, Dialog as _i, DialogContent as xi, DialogActions as Nt, FileCopyIcon as ja, ArchiveIcon as Ya, DeleteIcon as ii, AddIcon as pt, ExpandablePanel as ft, Card as Ua, ArrowForwardIcon as Vn, cardMixin as La, cardClickableMixin as $a, focusedMixin as ni, StarIcon as Gn, StarBorderIcon as jn, Collapse as Yn, 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 Un, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Ln, ArrowDropDownIcon as $n, 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 qn, useLocaleConfig as vs, MenuIcon as tn, ChevronLeftIcon as ks } from "@firecms/ui";
8
8
  import J from "react-fast-compare";
9
9
  import { Link as Er, useNavigate as Ft, useLocation as Cr, UNSAFE_NavigationContext as _s, NavLink as xs, Route as lr, Routes as Es } from "react-router-dom";
10
10
  import { format as Cs } from "date-fns";
@@ -2775,7 +2775,7 @@ function Ao(e, t, r = "", i = 0, a = 10) {
2775
2775
  }) : e !== t && console.log("Changed props:", r));
2776
2776
  }
2777
2777
  function fm(e, t = 3) {
2778
- const r = ce(e);
2778
+ const r = de(e);
2779
2779
  z(() => {
2780
2780
  console.log("Changed props:"), Ao(e, r.current, "", 0, t), r.current = e;
2781
2781
  });
@@ -2809,7 +2809,7 @@ const bo = S.createContext({}), tt = (e) => {
2809
2809
  close: i
2810
2810
  }), [r, i]);
2811
2811
  }, _o = S.createContext(void 0), Dt = () => $e(_o), xo = S.createContext({}), il = ({ children: e }) => {
2812
- const [t, r] = Q([]), i = ce(t), a = (l) => {
2812
+ const [t, r] = Q([]), i = de(t), a = (l) => {
2813
2813
  i.current = l, r(l);
2814
2814
  }, o = x(() => {
2815
2815
  if (t.length === 0)
@@ -3155,7 +3155,7 @@ function gm({
3155
3155
  }, [e, t]), t.navigation ? { data: r, dataLoading: a, dataLoadingError: s } : { dataLoading: !0 };
3156
3156
  }
3157
3157
  const sl = () => $e(eo), ll = (e) => {
3158
- const { onSuccess: t, onError: r, disableClipboardAPI: i = !1, copiedDuration: a } = e || {}, o = ce(null), [s, l] = Q(!1), [c, d] = Q("");
3158
+ const { onSuccess: t, onError: r, disableClipboardAPI: i = !1, copiedDuration: a } = e || {}, o = de(null), [s, l] = Q(!1), [c, d] = Q("");
3159
3159
  z(() => {
3160
3160
  a && setTimeout(() => l(!1), a);
3161
3161
  }, [s]);
@@ -3301,7 +3301,7 @@ function bm(e) {
3301
3301
  userConfigPersistence: d,
3302
3302
  dataSourceDelegate: p,
3303
3303
  injectCollections: m
3304
- } = e, u = ce(), f = ce(), h = ce(), [g, A] = Q(!1), [w, b] = Q(void 0), [y, k] = Q(!0), [_, E] = Q(void 0), C = Ee(t), B = Ee(r), P = C ? `/${C}` : "/", D = C ? `/${C}/${B}` : `/${B}`, F = x(
3304
+ } = e, u = de(), f = de(), h = de(), [g, A] = Q(!1), [w, b] = Q(void 0), [y, k] = Q(!0), [_, E] = Q(void 0), C = Ee(t), B = Ee(r), P = C ? `/${C}` : "/", D = C ? `/${C}/${B}` : `/${B}`, F = x(
3305
3305
  (T) => C ? `/${C}/${nr(T)}` : `/${nr(T)}`,
3306
3306
  [C]
3307
3307
  ), M = x(
@@ -3435,7 +3435,7 @@ function bm(e) {
3435
3435
  ), Ae = x((T) => {
3436
3436
  const ne = u.current ?? [];
3437
3437
  return ro(T, ne);
3438
- }, []), ue = x((T) => {
3438
+ }, []), le = x((T) => {
3439
3439
  const ne = u.current ?? [];
3440
3440
  return No({
3441
3441
  path: T,
@@ -3448,7 +3448,7 @@ function bm(e) {
3448
3448
  for (let j = 1; j <= K.length; j++)
3449
3449
  H.push(K.slice(0, j));
3450
3450
  return H.map((j) => X(j)?.id).filter(Boolean);
3451
- }, [ue]), ee = x((T) => {
3451
+ }, [le]), ee = x((T) => {
3452
3452
  let K = u.current;
3453
3453
  const H = [];
3454
3454
  for (let j = 0; j < T.length; j++) {
@@ -3480,7 +3480,7 @@ function bm(e) {
3480
3480
  resolveAliasesFrom: Ae,
3481
3481
  topLevelNavigation: w,
3482
3482
  refreshNavigation: oe,
3483
- getParentReferencesFromPath: ue,
3483
+ getParentReferencesFromPath: le,
3484
3484
  getParentCollectionIds: se,
3485
3485
  convertIdsToPaths: ee
3486
3486
  };
@@ -3534,7 +3534,7 @@ function hl(e, t) {
3534
3534
  return Po(r ?? [], a ?? []) ? J(i, o) : !1;
3535
3535
  }
3536
3536
  function wm() {
3537
- const e = ce({}), t = x((f) => {
3537
+ const e = de({}), t = x((f) => {
3538
3538
  const h = localStorage.getItem(f);
3539
3539
  return h ? JSON.parse(h) : {};
3540
3540
  }, []), r = x((f) => {
@@ -3599,7 +3599,7 @@ function km({
3599
3599
  z(() => {
3600
3600
  t.loginSkipped && m(!0);
3601
3601
  }, [t.loginSkipped]);
3602
- const f = ce(), h = x(async () => {
3602
+ const f = de(), h = x(async () => {
3603
3603
  if (e || t.initialLoading)
3604
3604
  return;
3605
3605
  if (!t.user && !t.loginSkipped) {
@@ -3706,7 +3706,7 @@ function yl({
3706
3706
  ),
3707
3707
  /* @__PURE__ */ v("div", { className: "flex flex-row gap-2 absolute bottom-[-4px] right-[-4px] invisible group-hover:visible", children: [
3708
3708
  navigator && /* @__PURE__ */ n(ke, { title: "Copy url to clipboard", side: "bottom", children: /* @__PURE__ */ n(
3709
- de,
3709
+ ue,
3710
3710
  {
3711
3711
  variant: "filled",
3712
3712
  size: "small",
@@ -3721,7 +3721,7 @@ function yl({
3721
3721
  }
3722
3722
  ) }),
3723
3723
  /* @__PURE__ */ n(ke, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ n(
3724
- de,
3724
+ ue,
3725
3725
  {
3726
3726
  className: "invisible group-hover:visible",
3727
3727
  variant: "filled",
@@ -4247,7 +4247,7 @@ function Pl({
4247
4247
  title: `See details for ${d.id}`,
4248
4248
  className: s !== "tiny" ? "self-start" : "",
4249
4249
  children: /* @__PURE__ */ n(
4250
- de,
4250
+ ue,
4251
4251
  {
4252
4252
  color: "inherit",
4253
4253
  size: "small",
@@ -5068,7 +5068,7 @@ function Mo({
5068
5068
  href: a.entityLinkBuilder({ entity: e }),
5069
5069
  rel: "noopener noreferrer",
5070
5070
  target: "_blank",
5071
- children: /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
5071
+ children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(
5072
5072
  Zt,
5073
5073
  {
5074
5074
  size: "small"
@@ -5117,7 +5117,7 @@ function Ul(e) {
5117
5117
  multiline: a,
5118
5118
  updateValue: o,
5119
5119
  focused: s
5120
- } = e, l = ce(i), [c, d] = Q(i), p = ce(!1);
5120
+ } = e, l = de(i), [c, d] = Q(i), p = de(!1);
5121
5121
  z(() => {
5122
5122
  l.current !== i && i !== c && d(i), l.current = i;
5123
5123
  }, [i]);
@@ -5271,7 +5271,7 @@ function Ll(e) {
5271
5271
  value: r,
5272
5272
  updateValue: i,
5273
5273
  focused: a
5274
- } = e, o = r && typeof r == "number" ? r.toString() : "", [s, l] = Q(o), c = ce(r);
5274
+ } = e, o = r && typeof r == "number" ? r.toString() : "", [s, l] = Q(o), c = de(r);
5275
5275
  z(() => {
5276
5276
  c.current !== r && String(r) !== s && l(r ? r.toString() : null), c.current = r;
5277
5277
  }, [r]);
@@ -5611,18 +5611,18 @@ function jo({
5611
5611
  ] });
5612
5612
  }
5613
5613
  function Yo({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPopup: a, children: o }) {
5614
- const s = ce(null), l = x(() => {
5614
+ const s = de(null), l = x(() => {
5615
5615
  if (a) {
5616
5616
  const d = s && s?.current?.getBoundingClientRect();
5617
5617
  a(d);
5618
5618
  }
5619
- }, []), c = ce();
5619
+ }, []), c = de();
5620
5620
  return z(() => {
5621
5621
  c.current && i && c.current.focus({ preventScroll: !0 });
5622
5622
  }, [i]), /* @__PURE__ */ n(O, { children: (e || !t && r) && /* @__PURE__ */ v("div", { ref: s, className: "absolute top-0.5 right-0.5 flex items-center", children: [
5623
5623
  i && o,
5624
5624
  i && !t && r && /* @__PURE__ */ n(
5625
- de,
5625
+ ue,
5626
5626
  {
5627
5627
  ref: c,
5628
5628
  color: "inherit",
@@ -5850,7 +5850,7 @@ function rc({
5850
5850
  selected: s,
5851
5851
  openPopup: m ? void 0 : a,
5852
5852
  children: /* @__PURE__ */ n(
5853
- de,
5853
+ ue,
5854
5854
  {
5855
5855
  color: "inherit",
5856
5856
  size: "small",
@@ -6288,7 +6288,7 @@ const fc = ({
6288
6288
  hideOverflow: g = !0,
6289
6289
  showExpandIcon: A = !0
6290
6290
  }) {
6291
- const [w, b] = Wn(), y = ce(null), k = he(() => Fr(i), [i]), [_, E] = Q(!1), [C, B] = Q(l), P = !o && !!c;
6291
+ const [w, b] = Wn(), y = de(null), k = he(() => Fr(i), [i]), [_, E] = Q(!1), [C, B] = Q(l), P = !o && !!c;
6292
6292
  z(() => {
6293
6293
  l && B(!0);
6294
6294
  const Ae = setTimeout(() => {
@@ -6395,7 +6395,7 @@ function qe({
6395
6395
  value: t,
6396
6396
  setValue: r
6397
6397
  }) {
6398
- const i = ce(null);
6398
+ const i = de(null);
6399
6399
  z(() => {
6400
6400
  typeof e.disabled == "object" && !!e.disabled.clearOnDisabled ? t != null && (i.current = t, r(null)) : i.current && (r(i.current), i.current = null);
6401
6401
  }, [e]);
@@ -6424,7 +6424,7 @@ const Ac = S.memo(
6424
6424
  selectedCell: g,
6425
6425
  select: A,
6426
6426
  setPopupCell: w
6427
- } = hc(), b = g?.propertyKey === t && g?.entity.path === d.path && g?.entity.id === d.id, [y, k] = Q(i), _ = ce(i), [E, C] = Q(), [B, P] = Q(), [D, F] = Q(!1), M = x(() => {
6427
+ } = hc(), b = g?.propertyKey === t && g?.entity.path === d.path && g?.entity.id === d.id, [y, k] = Q(i), _ = de(i), [E, C] = Q(), [B, P] = Q(), [D, F] = Q(!1), M = x(() => {
6428
6428
  F(!0), setTimeout(() => {
6429
6429
  F(!1);
6430
6430
  }, 100);
@@ -6478,7 +6478,7 @@ const Ac = S.memo(
6478
6478
  cellRect: I,
6479
6479
  propertyKey: t
6480
6480
  } : void 0);
6481
- }, [d, l, t, A, s]), ue = (I) => {
6481
+ }, [d, l, t, A, s]), le = (I) => {
6482
6482
  w && w(I ? {
6483
6483
  width: s,
6484
6484
  height: l,
@@ -6524,7 +6524,7 @@ const Ac = S.memo(
6524
6524
  disabled: q,
6525
6525
  focused: b,
6526
6526
  selected: b,
6527
- openPopup: w ? ue : void 0,
6527
+ openPopup: w ? le : void 0,
6528
6528
  property: a,
6529
6529
  entity: d,
6530
6530
  path: c,
@@ -6707,7 +6707,7 @@ const Ac = S.memo(
6707
6707
  disabled: q,
6708
6708
  showExpandIcon: T,
6709
6709
  selected: b,
6710
- openPopup: q ? void 0 : ue
6710
+ openPopup: q ? void 0 : le
6711
6711
  }
6712
6712
  ),
6713
6713
  children: se
@@ -6758,7 +6758,7 @@ const Qi = function({
6758
6758
  children: [
6759
6759
  (y || l) && /* @__PURE__ */ v("div", { className: "w-34 flex justify-center", children: [
6760
6760
  E.map((C, B) => /* @__PURE__ */ n(ke, { title: C.name, children: /* @__PURE__ */ n(
6761
- de,
6761
+ ue,
6762
6762
  {
6763
6763
  onClick: (P) => {
6764
6764
  P.stopPropagation(), C.onClick({
@@ -6780,7 +6780,7 @@ const Qi = function({
6780
6780
  It,
6781
6781
  {
6782
6782
  trigger: /* @__PURE__ */ n(
6783
- de,
6783
+ ue,
6784
6784
  {
6785
6785
  size: g ? "medium" : "small",
6786
6786
  children: /* @__PURE__ */ n(zn, {})
@@ -7088,7 +7088,7 @@ const _c = S.memo(
7088
7088
  color: "secondary",
7089
7089
  invisible: !a,
7090
7090
  children: /* @__PURE__ */ v(
7091
- de,
7091
+ ue,
7092
7092
  {
7093
7093
  size: "small",
7094
7094
  className: u || h ? "bg-white dark:bg-gray-950" : void 0,
@@ -7118,7 +7118,7 @@ const _c = S.memo(
7118
7118
  className: A ? "hidden" : void 0,
7119
7119
  modal: !0,
7120
7120
  trigger: /* @__PURE__ */ n(
7121
- de,
7121
+ ue,
7122
7122
  {
7123
7123
  className: u || h ? "bg-white dark:bg-gray-950" : void 0,
7124
7124
  size: "small",
@@ -7430,7 +7430,7 @@ const Sc = Ia(({
7430
7430
  endAdornment: E,
7431
7431
  AddColumnComponent: C
7432
7432
  }) {
7433
- const B = m ? m[0] : void 0, P = m ? m[1] : void 0, [D, F] = Q(o), M = ce(null), $ = ce(0);
7433
+ const B = m ? m[0] : void 0, P = m ? m[1] : void 0, [D, F] = Q(o), M = de(null), $ = de(0);
7434
7434
  z(() => {
7435
7435
  F(o);
7436
7436
  }, [o]);
@@ -7438,7 +7438,7 @@ const Sc = Ia(({
7438
7438
  F(D.map((G) => G.key === j.column.key ? j.column : G));
7439
7439
  }, [D]), q = x((j) => {
7440
7440
  F(D.map((G) => G.key === j.column.key ? j.column : G)), l && l(j);
7441
- }, [D, l]), V = ce();
7441
+ }, [D, l]), V = de();
7442
7442
  z(() => {
7443
7443
  V.current = c;
7444
7444
  }, [c]);
@@ -7451,14 +7451,14 @@ const Sc = Ia(({
7451
7451
  x(() => {
7452
7452
  $.current = 0, h && h(void 0);
7453
7453
  }, [h]);
7454
- const Ae = Math.max((t?.length ?? 0) * a - Y.height, 0), ue = x((j) => {
7454
+ const Ae = Math.max((t?.length ?? 0) * a - Y.height, 0), le = x((j) => {
7455
7455
  i && (t?.length ?? 0) > 0 && j > $.current + 600 && ($.current = j, i());
7456
7456
  }, [t?.length, i]), se = x(({
7457
7457
  scrollOffset: j,
7458
7458
  scrollUpdateWasRequested: G
7459
7459
  }) => {
7460
- !G && j >= Ae - 600 && ue(j);
7461
- }, [Ae, ue]), ee = x((j, G) => {
7460
+ !G && j >= Ae - 600 && le(j);
7461
+ }, [Ae, le]), ee = x((j, G) => {
7462
7462
  $.current = 0;
7463
7463
  const I = V.current;
7464
7464
  let R = I ? { ...I } : {};
@@ -7792,7 +7792,7 @@ function Qc({
7792
7792
  h(p, w);
7793
7793
  },
7794
7794
  endAdornment: u && /* @__PURE__ */ n(
7795
- de,
7795
+ ue,
7796
7796
  {
7797
7797
  onClick: (A) => h(p, void 0),
7798
7798
  children: /* @__PURE__ */ n(Ut, {})
@@ -7810,7 +7810,7 @@ function Qc({
7810
7810
  },
7811
7811
  multiple: g,
7812
7812
  endAdornment: u && /* @__PURE__ */ n(
7813
- de,
7813
+ ue,
7814
7814
  {
7815
7815
  className: "absolute right-2 top-3",
7816
7816
  onClick: (A) => h(p, void 0),
@@ -8004,7 +8004,7 @@ const Tc = S.memo(
8004
8004
  endAdornment: $,
8005
8005
  AddColumnComponent: oe
8006
8006
  }) {
8007
- const Y = ce(null), [X, q] = S.useState(void 0), V = () => {
8007
+ const Y = de(null), [X, q] = S.useState(void 0), V = () => {
8008
8008
  !_ || d || p || b !== void 0 && y?.(b + k);
8009
8009
  }, ae = x(() => {
8010
8010
  y?.(k);
@@ -8015,12 +8015,12 @@ const Tc = S.memo(
8015
8015
  Mn(
8016
8016
  Y,
8017
8017
  () => {
8018
- X && ue();
8018
+ X && le();
8019
8019
  },
8020
8020
  !!X
8021
8021
  ), z(() => {
8022
8022
  const ee = (T) => {
8023
- T.keyCode === 27 && ue();
8023
+ T.keyCode === 27 && le();
8024
8024
  };
8025
8025
  return document.addEventListener("keydown", ee, !1), () => {
8026
8026
  document.removeEventListener("keydown", ee, !1);
@@ -8028,7 +8028,7 @@ const Tc = S.memo(
8028
8028
  });
8029
8029
  const Ae = x((ee) => {
8030
8030
  q(ee);
8031
- }, []), ue = x(() => {
8031
+ }, []), le = x(() => {
8032
8032
  q(void 0);
8033
8033
  }, []), se = x((ee) => {
8034
8034
  f?.({ ...ee, ...F });
@@ -8189,7 +8189,7 @@ const Ho = function({
8189
8189
  textSearchLoading: q,
8190
8190
  enablePopupIcon: V
8191
8191
  }) {
8192
- const ae = ce(null), te = Ze(), Ae = (m?.selectedEntities?.length > 0 ? m?.selectedEntities : u)?.filter(Boolean), ue = Re(), [se, ee] = S.useState(_ ?? "m"), T = Ae?.map((ie) => ie.id), ne = x((ie) => {
8192
+ const ae = de(null), te = Ze(), Ae = (m?.selectedEntities?.length > 0 ? m?.selectedEntities : u)?.filter(Boolean), le = Re(), [se, ee] = S.useState(_ ?? "m"), T = Ae?.map((ie) => ie.id), ne = x((ie) => {
8193
8193
  g && g(ie), ee(ie);
8194
8194
  }, []), K = x((ie) => C.setSearchString?.(ie), []), H = he(() => y ? y.map((ie) => ({ [ie.key]: ie })).reduce((ie, xe) => ({ ...ie, ...xe }), {}) : {}, [y]), j = c, G = ({
8195
8195
  column: ie,
@@ -8230,9 +8230,9 @@ const Ho = function({
8230
8230
  const Te = xe, Ce = H[ie.key], We = Ce.dependencies ? Object.entries(Te.values).filter(([re, Be]) => Ce.dependencies.includes(re)).reduce((re, Be) => ({ ...re, ...Be }), {}) : Te, Ke = Ce.Builder;
8231
8231
  if (!Ke && !Ce.value)
8232
8232
  throw new Error("When using additional fields you need to provide a Builder or a value");
8233
- const rt = Ke ? /* @__PURE__ */ n(Ke, { entity: Te, context: ue }) : /* @__PURE__ */ n(O, { children: Ce.value?.({
8233
+ const rt = Ke ? /* @__PURE__ */ n(Ke, { entity: Te, context: le }) : /* @__PURE__ */ n(O, { children: Ce.value?.({
8234
8234
  entity: Te,
8235
- context: ue
8235
+ context: le
8236
8236
  }) });
8237
8237
  return /* @__PURE__ */ n(
8238
8238
  br,
@@ -8409,7 +8409,7 @@ function Zo({
8409
8409
  collection: t,
8410
8410
  filterValues: T,
8411
8411
  sortBy: ne
8412
- }) : !0, []), Ae = x(() => E(f ?? void 0), [f]), ue = x((T) => {
8412
+ }) : !0, []), Ae = x(() => E(f ?? void 0), [f]), le = x((T) => {
8413
8413
  if (f) {
8414
8414
  console.warn("Filter is not compatible with the force filter. Ignoring filter");
8415
8415
  return;
@@ -8477,7 +8477,7 @@ function Zo({
8477
8477
  noMoreToLoad: V,
8478
8478
  dataLoadingError: X,
8479
8479
  filterValues: _,
8480
- setFilterValues: ue,
8480
+ setFilterValues: le,
8481
8481
  sortBy: C,
8482
8482
  setSortBy: B,
8483
8483
  searchString: A,
@@ -8851,7 +8851,7 @@ function jc({
8851
8851
  width: V,
8852
8852
  frozen: ae
8853
8853
  }) => {
8854
- const te = y.selectedEntities, Ae = te && te.map((ue) => ue.id).indexOf(X.id) > -1;
8854
+ const te = y.selectedEntities, Ae = te && te.map((le) => le.id).indexOf(X.id) > -1;
8855
8855
  return /* @__PURE__ */ n(
8856
8856
  Qi,
8857
8857
  {
@@ -9138,7 +9138,7 @@ function $c({
9138
9138
  }) {
9139
9139
  const c = Dt(), d = /* @__PURE__ */ n(ci, { collectionOrView: t ?? r }), p = Ft(), m = Re(), u = fe(), f = (c?.favouritePaths ?? []).includes(e), h = c ? [
9140
9140
  /* @__PURE__ */ n(
9141
- de,
9141
+ ue,
9142
9142
  {
9143
9143
  onClick: (A) => {
9144
9144
  A.preventDefault(), A.stopPropagation(), f ? c.setFavouritePaths(
@@ -9449,7 +9449,7 @@ function Zc({
9449
9449
  ]
9450
9450
  }
9451
9451
  ) : /* @__PURE__ */ n(
9452
- de,
9452
+ ue,
9453
9453
  {
9454
9454
  color: "primary",
9455
9455
  disabled: !g?.length || !w,
@@ -9533,7 +9533,7 @@ function Kc() {
9533
9533
  }, []), e;
9534
9534
  }
9535
9535
  const ed = ({ onResize: e }) => {
9536
- const t = ce(0), r = ce(null), i = ce(e);
9536
+ const t = de(0), r = de(null), i = de(e);
9537
9537
  i.current = e;
9538
9538
  const a = x((s) => {
9539
9539
  t.current && cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
@@ -9679,7 +9679,7 @@ function rd({
9679
9679
  );
9680
9680
  if (!E)
9681
9681
  return /* @__PURE__ */ n(O, {});
9682
- const ue = ae, se = {
9682
+ const le = ae, se = {
9683
9683
  collection: E,
9684
9684
  entityId: w,
9685
9685
  values: V,
@@ -9730,7 +9730,7 @@ function rd({
9730
9730
  variant: "filled",
9731
9731
  color: "primary",
9732
9732
  type: "submit",
9733
- disabled: ue,
9733
+ disabled: le,
9734
9734
  children: "Save"
9735
9735
  }
9736
9736
  ) })
@@ -9791,7 +9791,7 @@ function rd({
9791
9791
  height: "32px"
9792
9792
  },
9793
9793
  children: /* @__PURE__ */ n(
9794
- de,
9794
+ ue,
9795
9795
  {
9796
9796
  size: "small",
9797
9797
  onClick: (G) => {
@@ -9905,8 +9905,8 @@ const od = "collectionGroupParent", ia = S.memo(
9905
9905
  W === y && k(void 0);
9906
9906
  }, 2400);
9907
9907
  }, [y]), M = x((W) => {
9908
- const le = w.current;
9909
- return fo(le, m, l, W ?? null) ? le.inlineEditing === void 0 || le.inlineEditing : !1;
9908
+ const ce = w.current;
9909
+ return fo(ce, m, l, W ?? null) ? ce.inlineEditing === void 0 || ce.inlineEditing : !1;
9910
9910
  }, [m, l]), $ = A.selectionEnabled === void 0 || A.selectionEnabled, oe = !M(), [Y, X] = Q(!1), q = Xo(), V = A.selectionController ?? q, {
9911
9911
  selectedEntities: ae,
9912
9912
  isEntitySelected: te,
@@ -9915,22 +9915,22 @@ const od = "collectionGroupParent", ia = S.memo(
9915
9915
  z(() => {
9916
9916
  E(void 0);
9917
9917
  }, [ae]);
9918
- const ue = Zo({
9918
+ const le = Zo({
9919
9919
  fullPath: l,
9920
9920
  collection: A,
9921
9921
  lastDeleteTimestamp: C
9922
- }), se = S.useRef(Math.random().toString(36)), ee = ue.popupCell, T = x(() => {
9923
- ue.setPopupCell?.(void 0);
9924
- }, [ue.setPopupCell]), ne = x((W) => {
9922
+ }), se = S.useRef(Math.random().toString(36)), ee = le.popupCell, T = x(() => {
9923
+ le.setPopupCell?.(void 0);
9924
+ }, [le.setPopupCell]), ne = x((W) => {
9925
9925
  console.log("Entity clicked", W);
9926
- const le = w.current;
9926
+ const ce = w.current;
9927
9927
  return k(W), f.onAnalyticsEvent?.("edit_entity_clicked", {
9928
9928
  path: W.path,
9929
9929
  entityId: W.id
9930
9930
  }), p.open({
9931
9931
  entityId: W.id,
9932
9932
  path: W.path,
9933
- collection: le,
9933
+ collection: ce,
9934
9934
  updateUrl: !0,
9935
9935
  onClose: F
9936
9936
  });
@@ -9948,48 +9948,48 @@ const od = "collectionGroupParent", ia = S.memo(
9948
9948
  f.onAnalyticsEvent?.("multiple_delete_dialog_open", {
9949
9949
  path: l
9950
9950
  }), E(ae);
9951
- }, j = (W, le) => {
9951
+ }, j = (W, ce) => {
9952
9952
  f.onAnalyticsEvent?.("single_entity_deleted", {
9953
9953
  path: l
9954
- }), Ae((be) => be.filter((ye) => ye.id !== le.id)), B(Date.now());
9955
- }, G = (W, le) => {
9954
+ }), Ae((be) => be.filter((ye) => ye.id !== ce.id)), B(Date.now());
9955
+ }, G = (W, ce) => {
9956
9956
  f.onAnalyticsEvent?.("multiple_entities_deleted", {
9957
9957
  path: l
9958
9958
  }), Ae([]), E(void 0), B(Date.now());
9959
9959
  };
9960
9960
  let I;
9961
9961
  h?.plugins && (I = h.plugins.find((W) => W.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);
9962
- const R = x((W, le) => {
9962
+ const R = x((W, ce) => {
9963
9963
  if (u) {
9964
- const be = u.getCollectionConfig(W), ye = He(be, le);
9964
+ const be = u.getCollectionConfig(W), ye = He(be, ce);
9965
9965
  u.onCollectionModified(W, ye);
9966
9966
  }
9967
9967
  }, [u]), me = x(({
9968
9968
  width: W,
9969
- key: le
9969
+ key: ce
9970
9970
  }) => {
9971
9971
  const be = w.current;
9972
- if (!wt(be.properties, le)) return;
9973
- const ye = na(le, W);
9972
+ if (!wt(be.properties, ce)) return;
9973
+ const ye = na(ce, W);
9974
9974
  R(l, ye);
9975
9975
  }, [R, l]), Ie = x((W) => {
9976
9976
  u && R(l, { defaultSize: W });
9977
9977
  }, [R, l, u]), Xe = qt(A, m, l, null), ie = x(
9978
9978
  ({
9979
9979
  name: W,
9980
- value: le,
9980
+ value: ce,
9981
9981
  property: be,
9982
9982
  entityId: ye
9983
- }) => c.checkUniqueField(l, W, le, ye),
9983
+ }) => c.checkUniqueField(l, W, ce, ye),
9984
9984
  [l]
9985
9985
  ), xe = ({
9986
9986
  value: W,
9987
- propertyKey: le,
9987
+ propertyKey: ce,
9988
9988
  onValueUpdated: be,
9989
9989
  setError: ye,
9990
9990
  data: we
9991
9991
  }) => {
9992
- const Je = ti({ ...we.values }, le, W), st = {
9992
+ const Je = ti({ ...we.values }, ce, W), st = {
9993
9993
  path: l,
9994
9994
  entityId: we.id,
9995
9995
  values: Je,
@@ -10015,15 +10015,15 @@ const od = "collectionGroupParent", ia = S.memo(
10015
10015
  fields: h.propertyConfigs
10016
10016
  }), [A, l]), Ce = x(({
10017
10017
  propertyKey: W,
10018
- entity: le
10018
+ entity: ce
10019
10019
  }) => {
10020
10020
  let be = wt(A.properties, W);
10021
10021
  return be || (be = wt(Te.properties, W)), Ye({
10022
10022
  propertyKey: W,
10023
10023
  propertyOrBuilder: be,
10024
- path: le.path,
10025
- values: le.values,
10026
- entityId: le.id,
10024
+ path: ce.path,
10025
+ values: ce.values,
10026
+ entityId: ce.id,
10027
10027
  fields: h.propertyConfigs
10028
10028
  });
10029
10029
  }, [A.properties, h.propertyConfigs, Te.properties]), We = qo(Te, !0), Ke = he(() => {
@@ -10050,7 +10050,7 @@ const od = "collectionGroupParent", ia = S.memo(
10050
10050
  children: be.name
10051
10051
  }
10052
10052
  )
10053
- })) ?? [], le = A.collectionGroup ? [{
10053
+ })) ?? [], ce = A.collectionGroup ? [{
10054
10054
  key: od,
10055
10055
  name: "Parent entities",
10056
10056
  width: 260,
@@ -10070,22 +10070,22 @@ const od = "collectionGroupParent", ia = S.memo(
10070
10070
  return [
10071
10071
  ...A.additionalFields ?? [],
10072
10072
  ...W,
10073
- ...le
10073
+ ...ce
10074
10074
  ];
10075
10075
  }, [A, l, p]), rt = x(() => {
10076
10076
  B(Date.now());
10077
10077
  }, []), re = Ze(), Be = ({
10078
10078
  entity: W,
10079
- customEntityActions: le
10079
+ customEntityActions: ce
10080
10080
  }) => {
10081
10081
  const be = W ? Fi(A, m, l, W) : !0, ye = [Gc];
10082
- return Xe && ye.push(ta), be && ye.push(ra), le && ye.push(...le), ye;
10082
+ return Xe && ye.push(ta), be && ye.push(ra), ce && ye.push(...ce), ye;
10083
10083
  }, ir = () => {
10084
- const W = Be({}), le = W.filter((we) => we.collapsed !== !1), ye = W.filter((we) => we.collapsed === !1).length * (re ? 40 : 30);
10085
- return (re ? 80 + ye : 70 + ye) + (le.length > 0 ? re ? 40 : 30 : 0);
10084
+ const W = Be({}), ce = W.filter((we) => we.collapsed !== !1), ye = W.filter((we) => we.collapsed === !1).length * (re ? 40 : 30);
10085
+ return (re ? 80 + ye : 70 + ye) + (ce.length > 0 ? re ? 40 : 30 : 0);
10086
10086
  }, Ot = ({
10087
10087
  entity: W,
10088
- size: le,
10088
+ size: ce,
10089
10089
  width: be,
10090
10090
  frozen: ye
10091
10091
  }) => {
@@ -10101,7 +10101,7 @@ const od = "collectionGroupParent", ia = S.memo(
10101
10101
  frozen: ye,
10102
10102
  isSelected: we,
10103
10103
  selectionEnabled: $,
10104
- size: le,
10104
+ size: ce,
10105
10105
  highlightEntity: k,
10106
10106
  unhighlightEntity: F,
10107
10107
  collection: A,
@@ -10135,8 +10135,8 @@ const od = "collectionGroupParent", ia = S.memo(
10135
10135
  {
10136
10136
  fullPath: l,
10137
10137
  collection: A,
10138
- filter: ue.filterValues,
10139
- sortBy: ue.sortBy,
10138
+ filter: le.filterValues,
10139
+ sortBy: le.sortBy,
10140
10140
  onCountChange: D
10141
10141
  }
10142
10142
  )
@@ -10145,7 +10145,7 @@ const od = "collectionGroupParent", ia = S.memo(
10145
10145
  }
10146
10146
  ), zt = x(({
10147
10147
  property: W,
10148
- propertyKey: le,
10148
+ propertyKey: ce,
10149
10149
  onHover: be
10150
10150
  }) => {
10151
10151
  const ye = w.current;
@@ -10155,10 +10155,11 @@ const od = "collectionGroupParent", ia = S.memo(
10155
10155
  st,
10156
10156
  {
10157
10157
  onHover: be,
10158
- propertyKey: le,
10158
+ propertyKey: ce,
10159
10159
  property: W,
10160
10160
  fullPath: l,
10161
10161
  collection: ye,
10162
+ tableController: le,
10162
10163
  parentCollectionIds: r ?? []
10163
10164
  },
10164
10165
  `plugin_header_action_${Je}`
@@ -10170,7 +10171,8 @@ const od = "collectionGroupParent", ia = S.memo(
10170
10171
  {
10171
10172
  fullPath: l,
10172
10173
  parentCollectionIds: r ?? [],
10173
- collection: A
10174
+ collection: A,
10175
+ tableController: le
10174
10176
  }
10175
10177
  ) : null;
10176
10178
  } : void 0, {
@@ -10193,7 +10195,7 @@ const od = "collectionGroupParent", ia = S.memo(
10193
10195
  Ho,
10194
10196
  {
10195
10197
  additionalFields: Ke,
10196
- tableController: ue,
10198
+ tableController: le,
10197
10199
  enablePopupIcon: !0,
10198
10200
  displayedColumnIds: We,
10199
10201
  onSizeChanged: Ie,
@@ -10216,7 +10218,7 @@ const od = "collectionGroupParent", ia = S.memo(
10216
10218
  {
10217
10219
  parentCollectionIds: r ?? [],
10218
10220
  collection: A,
10219
- tableController: ue,
10221
+ tableController: le,
10220
10222
  path: l,
10221
10223
  relativePath: A.path,
10222
10224
  selectionController: V,
@@ -10228,7 +10230,7 @@ const od = "collectionGroupParent", ia = S.memo(
10228
10230
  {
10229
10231
  parentCollectionIds: r ?? [],
10230
10232
  collection: A,
10231
- tableController: ue,
10233
+ tableController: le,
10232
10234
  onMultipleDeleteClick: H,
10233
10235
  onNewClick: K,
10234
10236
  path: l,
@@ -10238,7 +10240,7 @@ const od = "collectionGroupParent", ia = S.memo(
10238
10240
  collectionEntitiesCount: P
10239
10241
  }
10240
10242
  ),
10241
- emptyComponent: b && ue.filterValues === void 0 && ue.sortBy === void 0 ? /* @__PURE__ */ v("div", { className: "flex flex-col items-center justify-center", children: [
10243
+ emptyComponent: b && le.filterValues === void 0 && le.sortBy === void 0 ? /* @__PURE__ */ v("div", { className: "flex flex-col items-center justify-center", children: [
10242
10244
  /* @__PURE__ */ n(U, { variant: "subtitle2", children: "So empty..." }),
10243
10245
  /* @__PURE__ */ v(
10244
10246
  ge,
@@ -10350,7 +10352,7 @@ function sd({
10350
10352
  {
10351
10353
  open: r,
10352
10354
  onOpenChange: i,
10353
- trigger: /* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(Ja, { size: "small" }) }),
10355
+ trigger: /* @__PURE__ */ n(ue, { size: "small", children: /* @__PURE__ */ n(Ja, { size: "small" }) }),
10354
10356
  children: /* @__PURE__ */ n(
10355
10357
  "form",
10356
10358
  {
@@ -10716,7 +10718,7 @@ const cd = function({
10716
10718
  /* @__PURE__ */ n("div", { className: "flex-grow" }),
10717
10719
  r && /* @__PURE__ */ n(pe, { children: r }),
10718
10720
  o && /* @__PURE__ */ n(
10719
- de,
10721
+ ue,
10720
10722
  {
10721
10723
  color: "inherit",
10722
10724
  "aria-label": "Open drawer",
@@ -10756,7 +10758,7 @@ function sa({
10756
10758
  newDefaultEntry: c,
10757
10759
  onValueChange: d
10758
10760
  }) {
10759
- const p = r && Array.isArray(r) && r.length > 0, m = ce(dd(r)), [u, f] = Q(
10761
+ const p = r && Array.isArray(r) && r.length > 0, m = de(dd(r)), [u, f] = Q(
10760
10762
  p ? Object.values(m.current) : []
10761
10763
  );
10762
10764
  z(() => {
@@ -10931,7 +10933,7 @@ function ud({
10931
10933
  title: "Drag to move. Click for more options",
10932
10934
  children: [
10933
10935
  /* @__PURE__ */ n(
10934
- de,
10936
+ ue,
10935
10937
  {
10936
10938
  size: "small",
10937
10939
  disabled: t,
@@ -11111,7 +11113,7 @@ function Pm({
11111
11113
  }
11112
11114
  ),
11113
11115
  /* @__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(
11114
- de,
11116
+ ue,
11115
11117
  {
11116
11118
  shape: "square",
11117
11119
  toggled: e === c,
@@ -11192,7 +11194,7 @@ function ze({
11192
11194
  title: r.longDescription,
11193
11195
  side: "bottom",
11194
11196
  children: /* @__PURE__ */ n(
11195
- de,
11197
+ ue,
11196
11198
  {
11197
11199
  size: "small",
11198
11200
  className: "self-start",
@@ -11272,7 +11274,7 @@ function Cn({
11272
11274
  }
11273
11275
  ),
11274
11276
  endAdornment: c.clearable && /* @__PURE__ */ n(
11275
- de,
11277
+ ue,
11276
11278
  {
11277
11279
  onClick: m,
11278
11280
  children: /* @__PURE__ */ n(Ut, {})
@@ -11562,7 +11564,7 @@ function la({
11562
11564
  {
11563
11565
  title: "Remove",
11564
11566
  children: /* @__PURE__ */ n(
11565
- de,
11567
+ ue,
11566
11568
  {
11567
11569
  size: "small",
11568
11570
  onClick: (c) => {
@@ -11955,7 +11957,7 @@ function jt({
11955
11957
  multiline: h,
11956
11958
  disabled: s,
11957
11959
  endAdornment: c.clearable && /* @__PURE__ */ n(
11958
- de,
11960
+ ue,
11959
11961
  {
11960
11962
  onClick: u,
11961
11963
  children: /* @__PURE__ */ n(Ut, {})
@@ -12382,7 +12384,7 @@ function Id({
12382
12384
  Component: a,
12383
12385
  plugins: o
12384
12386
  }) {
12385
- return ce((() => {
12387
+ return de((() => {
12386
12388
  let l = null;
12387
12389
  return o && o.forEach((c) => {
12388
12390
  const d = da(i);
@@ -12800,7 +12802,7 @@ function Pd({
12800
12802
  /* @__PURE__ */ v(
12801
12803
  It,
12802
12804
  {
12803
- trigger: /* @__PURE__ */ n(de, { size: "smallest", children: /* @__PURE__ */ n($n, { size: "small" }) }),
12805
+ trigger: /* @__PURE__ */ n(ue, { size: "smallest", children: /* @__PURE__ */ n($n, { size: "small" }) }),
12804
12806
  children: [
12805
12807
  /* @__PURE__ */ n(
12806
12808
  Pe,
@@ -12854,7 +12856,7 @@ function Pd({
12854
12856
  }
12855
12857
  ),
12856
12858
  /* @__PURE__ */ n(
12857
- de,
12859
+ ue,
12858
12860
  {
12859
12861
  "aria-label": "delete",
12860
12862
  size: "smallest",
@@ -12943,7 +12945,7 @@ function Qd({
12943
12945
  It,
12944
12946
  {
12945
12947
  trigger: /* @__PURE__ */ n(
12946
- de,
12948
+ ue,
12947
12949
  {
12948
12950
  size: "small",
12949
12951
  className: "h-7 w-7",
@@ -13308,7 +13310,7 @@ function zd({
13308
13310
  includeDescription: p,
13309
13311
  context: m
13310
13312
  }) {
13311
- const [u, f] = S.useState(t), h = ce(t);
13313
+ const [u, f] = S.useState(t), h = de(t);
13312
13314
  is("MarkdownFieldBinding", Md);
13313
13315
  const g = Na({
13314
13316
  internalValue: u,
@@ -14635,7 +14637,7 @@ function Ld({
14635
14637
  value: (o && r === "existing" ? o.id : t) ?? "",
14636
14638
  endAdornment: s ? /* @__PURE__ */ n(xt, { size: "small" }) : o ? /* @__PURE__ */ v(O, { children: [
14637
14639
  /* @__PURE__ */ n(ke, { title: "Copy", children: /* @__PURE__ */ n(
14638
- de,
14640
+ ue,
14639
14641
  {
14640
14642
  onClick: (g) => u(o.id),
14641
14643
  "aria-label": "copy-id",
@@ -14643,7 +14645,7 @@ function Ld({
14643
14645
  }
14644
14646
  ) }),
14645
14647
  f?.entityLinkBuilder && /* @__PURE__ */ n(ke, { title: "Open in the console", children: /* @__PURE__ */ n(
14646
- de,
14648
+ ue,
14647
14649
  {
14648
14650
  component: "a",
14649
14651
  href: f.entityLinkBuilder({ entity: o }),
@@ -14749,7 +14751,7 @@ function Wd({ propertyId: e }) {
14749
14751
  ),
14750
14752
  /* @__PURE__ */ n(U, { variant: "caption", className: "text-white", children: /* @__PURE__ */ n("code", { children: e }) })
14751
14753
  ] }),
14752
- /* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(
14754
+ /* @__PURE__ */ n(ue, { size: "small", children: /* @__PURE__ */ n(
14753
14755
  vr,
14754
14756
  {
14755
14757
  size: "smallest",
@@ -14811,18 +14813,18 @@ function Hd({
14811
14813
  closeAfterSave: !1
14812
14814
  });
14813
14815
  }, !1, 2e3);
14814
- const g = a, A = Pt(), w = tt(a), b = Yi(), y = Qt(), k = gt(), _ = fe(), E = Re(), C = ce(!1), B = Rt(), P = he(() => Ue({
14816
+ const g = a, A = Pt(), w = tt(a), b = Yi(), y = Qt(), k = gt(), _ = fe(), E = Re(), C = de(!1), B = Rt(), P = he(() => Ue({
14815
14817
  collection: g,
14816
14818
  path: e,
14817
14819
  values: d?.values,
14818
14820
  fields: _.propertyConfigs
14819
- }), [d?.values, e, _.propertyConfigs]), D = i ? "copy" : t ? "existing" : "new", [F, M] = Q(D), $ = (F === "new" || F === "copy") && !!P.customId && P.customId !== "optional", oe = he(() => F === "new" || F === "copy" ? $ ? void 0 : w.generateEntityId(e) : t, [t, F]), [Y, X] = S.useState(oe), [q, V] = S.useState(!1), [ae, te] = S.useState(), [Ae, ue] = S.useState(!1), se = r ?? uo(
14821
+ }), [d?.values, e, _.propertyConfigs]), D = i ? "copy" : t ? "existing" : "new", [F, M] = Q(D), $ = (F === "new" || F === "copy") && !!P.customId && P.customId !== "optional", oe = he(() => F === "new" || F === "copy" ? $ ? void 0 : w.generateEntityId(e) : t, [t, F]), [Y, X] = S.useState(oe), [q, V] = S.useState(!1), [ae, te] = S.useState(), [Ae, le] = S.useState(!1), se = r ?? uo(
14820
14822
  a ? a.defaultSelectedView : void 0,
14821
14823
  {
14822
14824
  status: F,
14823
14825
  entityId: Y
14824
14826
  }
14825
- ), ee = ce(se ?? Yt), T = ce(Zd(P, F, d)), ne = ee.current === Yt, K = (a.subcollections ?? []).filter((N) => !N.hideFromNavigation), H = K?.length ?? 0, j = a.entityViews, G = j?.length ?? 0, I = a.formAutoSave && !a.customId, R = G > 0 || H > 0, [me, Ie] = Q(d), [Xe, ie] = Q(void 0);
14827
+ ), ee = de(se ?? Yt), T = de(Zd(P, F, d)), ne = ee.current === Yt, K = (a.subcollections ?? []).filter((N) => !N.hideFromNavigation), H = K?.length ?? 0, j = a.entityViews, G = j?.length ?? 0, I = a.formAutoSave && !a.customId, R = G > 0 || H > 0, [me, Ie] = Q(d), [Xe, ie] = Q(void 0);
14826
14828
  z(() => {
14827
14829
  d && Ie(d);
14828
14830
  }, [d]), z(() => {
@@ -14937,7 +14939,7 @@ function Hd({
14937
14939
  values: re.values,
14938
14940
  previousValues: re.initialValues,
14939
14941
  fields: _.propertyConfigs
14940
- }), ir = ce(d?.values), Ot = (N) => (ir.current = N, Ke({
14942
+ }), ir = de(d?.values), Ot = (N) => (ir.current = N, Ke({
14941
14943
  collection: Be,
14942
14944
  path: e,
14943
14945
  entityId: Y,
@@ -15017,7 +15019,7 @@ function Hd({
15017
15019
  `subcol_${ve}`
15018
15020
  );
15019
15021
  }
15020
- ).filter(Boolean), le = x(() => {
15022
+ ).filter(Boolean), ce = x(() => {
15021
15023
  s(!1);
15022
15024
  }, []), be = (N) => {
15023
15025
  ee.current = N, y.replace({
@@ -15058,7 +15060,7 @@ function Hd({
15058
15060
  }
15059
15061
  const Mt = ho(Be, _.propertyConfigs), Aa = re.values && Mt ? dt(re.values, Mt) : void 0, Ui = g.callbacks?.onIdUpdate, Li = x(async () => {
15060
15062
  if (Ui && re.values && (F === "new" || F === "copy")) {
15061
- ue(!0);
15063
+ le(!0);
15062
15064
  try {
15063
15065
  const N = await Ui({
15064
15066
  collection: Be,
@@ -15071,7 +15073,7 @@ function Hd({
15071
15073
  } catch (N) {
15072
15074
  ye && ye(N), console.error(N);
15073
15075
  }
15074
- ue(!1);
15076
+ le(!1);
15075
15077
  }
15076
15078
  }, [Y, re.values, F]);
15077
15079
  z(() => {
@@ -15148,7 +15150,7 @@ function Hd({
15148
15150
  }).filter((N) => N.includeInForm === void 0 || N.includeInForm), va = /* @__PURE__ */ v(Nt, { position: "absolute", children: [
15149
15151
  ae && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n(U, { color: "error", children: ae.message }) }),
15150
15152
  d && Wi.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: Wi.map((N) => /* @__PURE__ */ n(
15151
- de,
15153
+ ue,
15152
15154
  {
15153
15155
  color: "primary",
15154
15156
  onClick: (Z) => {
@@ -15275,7 +15277,7 @@ function Hd({
15275
15277
  status: F,
15276
15278
  path: e,
15277
15279
  collection: a,
15278
- onDiscard: le,
15280
+ onDiscard: ce,
15279
15281
  entity: me,
15280
15282
  context: E,
15281
15283
  formContext: at,
@@ -15337,7 +15339,7 @@ function Hd({
15337
15339
  {
15338
15340
  className: "pb-1 self-center",
15339
15341
  children: /* @__PURE__ */ n(
15340
- de,
15342
+ ue,
15341
15343
  {
15342
15344
  onClick: () => (c?.(), b.close(!1)),
15343
15345
  children: /* @__PURE__ */ n(Un, { size: "small" })
@@ -15383,7 +15385,7 @@ function Hd({
15383
15385
  "form",
15384
15386
  {
15385
15387
  onSubmit: re.handleSubmit,
15386
- onReset: () => (re.resetForm(), le && le()),
15388
+ onReset: () => (re.resetForm(), ce && ce()),
15387
15389
  noValidate: !0,
15388
15390
  className: "flex-grow h-full flex overflow-auto flex-col w-full",
15389
15391
  children: [
@@ -15645,7 +15647,7 @@ function mr(e, t = 0) {
15645
15647
  } 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;
15646
15648
  }
15647
15649
  const ou = (e, t) => {
15648
- const r = Cr(), i = ce(!1), a = !Ze();
15650
+ const r = Cr(), i = de(!1), a = !Ze();
15649
15651
  z(() => {
15650
15652
  if (!e.loading && !i.current) {
15651
15653
  if (console.debug("Initialising side entity controller"), e.isUrlCollectionPath(r.pathname)) {
@@ -15737,7 +15739,7 @@ const or = (e, t, r, i) => {
15737
15739
  };
15738
15740
  };
15739
15741
  function su() {
15740
- const e = Cr(), t = Ft(), [r, i] = Q([]), a = ce(r), o = ce({}), s = ce(0), l = (m) => {
15742
+ const e = Cr(), t = Ft(), [r, i] = Q([]), a = de(r), o = de({}), s = de(0), l = (m) => {
15741
15743
  a.current = m, i(m);
15742
15744
  };
15743
15745
  z(() => {
@@ -16039,7 +16041,7 @@ async function du(e, t) {
16039
16041
  ).then(async (i) => i.json());
16040
16042
  }
16041
16043
  function uu(e, t) {
16042
- const [r, i] = Q(null), a = ce(null), o = t?.map((s) => s.key);
16044
+ const [r, i] = Q(null), a = de(null), o = t?.map((s) => s.key);
16043
16045
  return z(() => {
16044
16046
  e.user && e.user.uid !== a.current && !e.initialLoading && (du(e, o).then(i), a.current = e.user.uid);
16045
16047
  }, [e, o]), r;
@@ -16271,7 +16273,7 @@ function hu(e) {
16271
16273
  sideOffset: 12,
16272
16274
  className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
16273
16275
  children: /* @__PURE__ */ n(
16274
- de,
16276
+ ue,
16275
16277
  {
16276
16278
  color: "inherit",
16277
16279
  "aria-label": "Open menu",
@@ -16288,7 +16290,7 @@ function hu(e) {
16288
16290
  {
16289
16291
  className: `z-20 absolute right-0 top-4 ${e.open ? "opacity-100" : "opacity-0 invisible"} transition-opacity duration-200 ease-in-out`,
16290
16292
  children: /* @__PURE__ */ n(
16291
- de,
16293
+ ue,
16292
16294
  {
16293
16295
  "aria-label": "Close drawer",
16294
16296
  onClick: () => e.setDrawerOpen(!1),
@@ -16316,7 +16318,7 @@ function hu(e) {
16316
16318
  }
16317
16319
  ) : e.displayed ? /* @__PURE__ */ v(O, { children: [
16318
16320
  /* @__PURE__ */ n(
16319
- de,
16321
+ ue,
16320
16322
  {
16321
16323
  color: "inherit",
16322
16324
  "aria-label": "Open drawer",
@@ -16458,7 +16460,7 @@ function Au({
16458
16460
  open: m,
16459
16461
  onOpenChange: u,
16460
16462
  trigger: /* @__PURE__ */ v(
16461
- de,
16463
+ ue,
16462
16464
  {
16463
16465
  shape: "square",
16464
16466
  className: "m-4 text-gray-900 dark:text-white w-fit",