@firecms/core 3.0.0-canary.47 → 3.0.0-canary.49

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
@@ -4,7 +4,7 @@ import I, { useRef as se, useEffect as z, useContext as qe, useCallback as x, us
4
4
  import { SnackbarProvider as oa, useSnackbar as aa } from "notistack";
5
5
  import Qi from "object-hash";
6
6
  import { useCreateFormex as pn, Formex as fn, setIn as Gr, Field as hn, getIn as Dt, useFormex as ti } from "@firecms/formex";
7
- import { getColorSchemeForSeed as gn, CHIP_COLORS as sa, Tooltip as _e, ErrorIcon as An, Typography as $, CircleIcon as bn, FunctionsIcon as la, iconKeys as ri, coolIconKeys as jr, Icon as ii, IconButton as ce, ContentCopyIcon as ni, OpenInNewIcon as pr, DescriptionIcon as ca, Skeleton as Ye, Chip as oi, cn as H, defaultBorderMixin as Be, KeyboardTabIcon as ai, Checkbox as Yt, Markdown as si, TextareaAutosize as da, MultiSelect as yn, MultiSelectItem as wn, Select as tt, SelectItem as rt, BooleanSwitch as ua, DateTimeField as qt, paperMixin as fr, ErrorOutlineIcon as ma, EditIcon as pa, Button as ge, RemoveCircleIcon as fa, Menu as Et, MoreVertIcon as vn, MenuItem as Re, CircularProgress as Ut, SearchBar as li, Badge as Ri, ArrowUpwardIcon as Br, Popover as ci, FilterListIcon as ha, AssignmentIcon as ga, CenteredView as er, Label as di, TextField as wt, ClearIcon as Tt, BooleanSwitchWithLabel as hr, useOutsideAlerter as _n, DialogActions as Ct, AddIcon as ct, ExpandablePanel as dt, Card as Aa, ArrowForwardIcon as kn, cardMixin as ba, cardClickableMixin as ya, focusedMixin as Yr, StarIcon as xn, StarBorderIcon as En, Collapse as Cn, Container as wa, DeleteIcon as qr, Dialog as ui, DialogContent as mi, FileCopyIcon as va, FilterListOffIcon as _a, SearchIcon as ka, LoadingButton as xa, Avatar as Di, DarkModeIcon as Ea, LightModeIcon as Ca, LogoutIcon as Ba, fieldBackgroundHoverMixin as pi, HandleIcon as Sa, RemoveIcon as fi, debounce as Ia, InfoIcon as Na, CloseIcon as Bn, fieldBackgroundMixin as ar, fieldBackgroundDisabledMixin as Sn, ArrowDropDownIcon as In, useInjectStyles as Fa, ContentPasteIcon as Pa, Alert as Qa, ShortTextIcon as Ra, SubjectIcon as Da, FormatQuoteIcon as Ta, HttpIcon as Oa, EmailIcon as Ma, FlagIcon as za, ListIcon as Va, ListAltIcon as Ga, NumbersIcon as ja, FormatListNumberedIcon as Ti, UploadFileIcon as Ya, DriveFolderUploadIcon as qa, LinkIcon as Ua, AddLinkIcon as La, ScheduleIcon as $a, BallotIcon as Oi, RepeatIcon as Mi, ViewStreamIcon as Wa, Tab as Sr, Tabs as Ja, Sheet as Nn, useLocaleConfig as Ha, MenuIcon as zi, ChevronLeftIcon as Za } from "@firecms/ui";
7
+ import { getColorSchemeForSeed as gn, CHIP_COLORS as sa, Tooltip as _e, ErrorIcon as An, Typography as $, CircleIcon as bn, FunctionsIcon as la, iconKeys as ri, coolIconKeys as jr, Icon as ii, IconButton as ce, ContentCopyIcon as ni, OpenInNewIcon as pr, DescriptionIcon as ca, Skeleton as Ye, Chip as oi, cn as H, defaultBorderMixin as Ce, KeyboardTabIcon as ai, Checkbox as Yt, Markdown as si, TextareaAutosize as da, MultiSelect as yn, MultiSelectItem as wn, Select as tt, SelectItem as rt, BooleanSwitch as ua, DateTimeField as qt, paperMixin as fr, ErrorOutlineIcon as ma, EditIcon as pa, Button as ge, RemoveCircleIcon as fa, Menu as Et, MoreVertIcon as vn, MenuItem as Re, CircularProgress as Ut, SearchBar as li, Badge as Ri, ArrowUpwardIcon as Cr, Popover as ci, FilterListIcon as ha, AssignmentIcon as ga, CenteredView as er, Label as di, TextField as wt, ClearIcon as Tt, BooleanSwitchWithLabel as hr, useOutsideAlerter as _n, DialogActions as Bt, AddIcon as ct, ExpandablePanel as dt, Card as Aa, ArrowForwardIcon as kn, cardMixin as ba, cardClickableMixin as ya, focusedMixin as Yr, StarIcon as xn, StarBorderIcon as En, Collapse as Bn, Container as wa, DeleteIcon as qr, Dialog as ui, DialogContent as mi, FileCopyIcon as va, FilterListOffIcon as _a, SearchIcon as ka, LoadingButton as xa, Avatar as Di, DarkModeIcon as Ea, LightModeIcon as Ba, LogoutIcon as Ca, fieldBackgroundHoverMixin as pi, HandleIcon as Sa, RemoveIcon as fi, debounce as Ia, InfoIcon as Na, CloseIcon as Cn, fieldBackgroundMixin as ar, fieldBackgroundDisabledMixin as Sn, ArrowDropDownIcon as In, useInjectStyles as Fa, ContentPasteIcon as Pa, Alert as Qa, ShortTextIcon as Ra, SubjectIcon as Da, FormatQuoteIcon as Ta, HttpIcon as Oa, EmailIcon as Ma, FlagIcon as za, ListIcon as Va, ListAltIcon as Ga, NumbersIcon as ja, FormatListNumberedIcon as Ti, UploadFileIcon as Ya, DriveFolderUploadIcon as qa, LinkIcon as Ua, AddLinkIcon as La, ScheduleIcon as $a, BallotIcon as Oi, RepeatIcon as Mi, ViewStreamIcon as Wa, Tab as Sr, Tabs as Ja, Sheet as Nn, useLocaleConfig as Ha, MenuIcon as zi, ChevronLeftIcon as Za } from "@firecms/ui";
8
8
  import L from "react-fast-compare";
9
9
  import { Link as gr, useNavigate as Lt, useLocation as Ar, UNSAFE_NavigationContext as Xa, NavLink as Ka, Route as tr, Routes as es } from "react-router-dom";
10
10
  import { format as ts } from "date-fns";
@@ -510,7 +510,7 @@ function Wn(e, t) {
510
510
  }
511
511
  }
512
512
  }
513
- function Cu(e) {
513
+ function Bu(e) {
514
514
  return e.replace(/\.([^.]*)/g, "[$1]");
515
515
  }
516
516
  function ks(e, t) {
@@ -525,7 +525,7 @@ function ks(e, t) {
525
525
  }), o && (r[i] = o);
526
526
  }), r;
527
527
  }
528
- function Bu(e) {
528
+ function Cu(e) {
529
529
  return e.propertiesOrder ? e.propertiesOrder : [...Object.keys(e.properties), ...(e.additionalFields ?? []).map((t) => t.key)];
530
530
  }
531
531
  const yr = {
@@ -2693,7 +2693,7 @@ function Iu(e, t) {
2693
2693
  }
2694
2694
  return e;
2695
2695
  }
2696
- function Cs(e, t, r, i = 3) {
2696
+ function Bs(e, t, r, i = 3) {
2697
2697
  const o = Object.keys(e.properties);
2698
2698
  let a = r?.filter((s) => o.includes(s));
2699
2699
  return a && a.length > 0 ? a : (a = o, a.filter((s) => {
@@ -2710,7 +2710,7 @@ function Hn(e, t) {
2710
2710
  return r;
2711
2711
  }
2712
2712
  }
2713
- function Bs(e) {
2713
+ function Cs(e) {
2714
2714
  for (const t in e.properties) {
2715
2715
  const r = e.properties[t];
2716
2716
  if (r.dataType === "string" && r.storage?.acceptedFiles?.includes("image/*"))
@@ -2899,7 +2899,7 @@ const Kn = I.createContext({}), Xe = (e) => {
2899
2899
  open: r,
2900
2900
  close: i
2901
2901
  }), [r, i]);
2902
- }, no = I.createContext(void 0), Bt = () => qe(no), oo = I.createContext({}), Qs = ({ children: e }) => {
2902
+ }, no = I.createContext(void 0), Ct = () => qe(no), oo = I.createContext({}), Qs = ({ children: e }) => {
2903
2903
  const [t, r] = P([]), i = se(t), o = (l) => {
2904
2904
  i.current = l, r(l);
2905
2905
  }, a = x(() => {
@@ -2931,7 +2931,7 @@ const Kn = I.createContext({}), Xe = (e) => {
2931
2931
  ))
2932
2932
  ] });
2933
2933
  }, Rs = () => qe(oo), ao = I.createContext({}), pe = () => qe(ao), so = I.createContext({}), St = () => qe(so), Se = () => {
2934
- const e = mt(), t = vr(), r = pt(), i = ke(), o = Xe(), a = Wt(), s = ft(), l = Bt(), c = Rs(), d = pe(), u = St(), f = I.useRef({
2934
+ const e = mt(), t = vr(), r = pt(), i = ke(), o = Xe(), a = Wt(), s = ft(), l = Ct(), c = Rs(), d = pe(), u = St(), f = I.useRef({
2935
2935
  authController: e,
2936
2936
  sideDialogsController: t,
2937
2937
  sideEntityController: r,
@@ -2971,11 +2971,11 @@ function Vu({
2971
2971
  const s = Xe(t), c = ke().resolveAliasesFrom(e), d = i ? i[0] : void 0, u = i ? i[1] : void 0, f = Se(), [m, p] = P([]), [g, A] = P(!1), [h, y] = P(), [b, w] = P(!1);
2972
2972
  return z(() => {
2973
2973
  A(!0);
2974
- const E = async (C) => {
2974
+ const E = async (B) => {
2975
2975
  if (t.callbacks?.onFetch)
2976
2976
  try {
2977
- C = await Promise.all(
2978
- C.map((_) => t.callbacks.onFetch({
2977
+ B = await Promise.all(
2978
+ B.map((_) => t.callbacks.onFetch({
2979
2979
  collection: t,
2980
2980
  path: c,
2981
2981
  entity: _,
@@ -2985,12 +2985,12 @@ function Vu({
2985
2985
  } catch (_) {
2986
2986
  console.error(_);
2987
2987
  }
2988
- A(!1), y(void 0), p(C.map((_) => ({
2988
+ A(!1), y(void 0), p(B.map((_) => ({
2989
2989
  ..._
2990
2990
  // values: sanitizeData(e.values, resolvedCollection.properties)
2991
- }))), w(!o || C.length < o);
2992
- }, k = (C) => {
2993
- console.error("ERROR", C), A(!1), p([]), y(C);
2991
+ }))), w(!o || B.length < o);
2992
+ }, k = (B) => {
2993
+ console.error("ERROR", B), A(!1), p([]), y(B);
2994
2994
  };
2995
2995
  return s.listenCollection ? s.listenCollection({
2996
2996
  path: c,
@@ -3264,8 +3264,8 @@ const uo = () => qe(hi), Os = (e) => {
3264
3264
  u() && navigator.clipboard.writeText("");
3265
3265
  }, A = (b) => y("copy", typeof b == "object" ? void 0 : b), h = () => y("cut"), y = x(
3266
3266
  (b = "copy", w) => {
3267
- const E = a.current, k = E && (E.tagName === "INPUT" || E.tagName === "TEXTAREA"), C = a.current;
3268
- u() && !i && (w ? p(w) : E ? k ? (p(C.value), b === "cut" && (C.value = "")) : p(E.innerText) : f("Both the ref & text were undefined"));
3267
+ const E = a.current, k = E && (E.tagName === "INPUT" || E.tagName === "TEXTAREA"), B = a.current;
3268
+ u() && !i && (w ? p(w) : E ? k ? (p(B.value), b === "cut" && (B.value = "")) : p(E.innerText) : f("Both the ref & text were undefined"));
3269
3269
  },
3270
3270
  [i, p, f]
3271
3271
  );
@@ -3393,7 +3393,7 @@ function Yu(e) {
3393
3393
  userConfigPersistence: d,
3394
3394
  dataSourceDelegate: u,
3395
3395
  injectCollections: f
3396
- } = e, m = se(), p = se(), g = se(), [A, h] = P(!1), [y, b] = P(void 0), [w, E] = P(!0), [k, C] = P(void 0), _ = Ee(t), B = Ee(r), S = _ ? `/${_}` : "/", D = _ ? `/${_}/${B}` : `/${B}`, Q = x(
3396
+ } = e, m = se(), p = se(), g = se(), [A, h] = P(!1), [y, b] = P(void 0), [w, E] = P(!0), [k, B] = P(void 0), _ = Ee(t), C = Ee(r), S = _ ? `/${_}` : "/", D = _ ? `/${_}/${C}` : `/${C}`, Q = x(
3397
3397
  (T) => _ ? `/${_}/${Ht(T)}` : `/${Ht(T)}`,
3398
3398
  [_]
3399
3399
  ), R = x(
@@ -3454,7 +3454,7 @@ function Yu(e) {
3454
3454
  const q = G(T, ie, te, c);
3455
3455
  O && !L(y, q) && b(q);
3456
3456
  } catch (T) {
3457
- console.error(T), C(T);
3457
+ console.error(T), B(T);
3458
3458
  }
3459
3459
  E(!1), h(!0);
3460
3460
  }
@@ -4215,7 +4215,7 @@ function Ji({
4215
4215
  return u ? /* @__PURE__ */ n(
4216
4216
  I.Fragment,
4217
4217
  {
4218
- children: /* @__PURE__ */ n("div", { className: H(Be, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
4218
+ children: /* @__PURE__ */ n("div", { className: H(Ce, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
4219
4219
  Fe,
4220
4220
  {
4221
4221
  propertyKey: e,
@@ -4250,9 +4250,9 @@ function al({
4250
4250
  values: c.values,
4251
4251
  fields: f.propertyConfigs
4252
4252
  }), [p]), A = he(
4253
- () => Cs(g, f.propertyConfigs, o, s === "small" || s === "medium" ? 3 : 1),
4253
+ () => Bs(g, f.propertyConfigs, o, s === "small" || s === "medium" ? 3 : 1),
4254
4254
  [o, g, s]
4255
- ), h = Hn(g, f.propertyConfigs), y = Bs(g), b = y ? g.properties[y] : void 0, w = A.filter((E) => E !== h && E !== y);
4255
+ ), h = Hn(g, f.propertyConfigs), y = Cs(g), b = y ? g.properties[y] : void 0, w = A.filter((E) => E !== h && E !== y);
4256
4256
  return /* @__PURE__ */ v(
4257
4257
  bt,
4258
4258
  {
@@ -4377,7 +4377,7 @@ const yo = yt.forwardRef(({
4377
4377
  i === "tiny" ? "p-1" : "p-2",
4378
4378
  "flex border rounded-lg",
4379
4379
  r ? "cursor-pointer" : "",
4380
- Be,
4380
+ Ce,
4381
4381
  a
4382
4382
  ),
4383
4383
  onClick: (d) => {
@@ -4671,7 +4671,7 @@ function pl({
4671
4671
  (f, m) => /* @__PURE__ */ n(
4672
4672
  I.Fragment,
4673
4673
  {
4674
- children: /* @__PURE__ */ n("div", { className: H(Be, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: f && /* @__PURE__ */ n(
4674
+ children: /* @__PURE__ */ n("div", { className: H(Ce, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(me, { children: f && /* @__PURE__ */ n(
4675
4675
  Fe,
4676
4676
  {
4677
4677
  propertyKey: e,
@@ -4723,7 +4723,7 @@ function fl({
4723
4723
  return /* @__PURE__ */ v(
4724
4724
  "div",
4725
4725
  {
4726
- className: H(Be, "last:border-b-0 border-b"),
4726
+ className: H(Ce, "last:border-b-0 border-b"),
4727
4727
  children: [
4728
4728
  /* @__PURE__ */ v(
4729
4729
  "div",
@@ -4763,7 +4763,7 @@ function fl({
4763
4763
  ]
4764
4764
  }
4765
4765
  ),
4766
- (c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: H(Be, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ n(
4766
+ (c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: H(Ce, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ n(
4767
4767
  Fe,
4768
4768
  {
4769
4769
  propertyKey: s,
@@ -4788,7 +4788,7 @@ function vo({ value: e }) {
4788
4788
  children: Object.entries(e).map(([t, r]) => /* @__PURE__ */ v(
4789
4789
  "div",
4790
4790
  {
4791
- className: H(Be, "last:border-b-0 border-b"),
4791
+ className: H(Ce, "last:border-b-0 border-b"),
4792
4792
  children: [
4793
4793
  /* @__PURE__ */ v(
4794
4794
  "div",
@@ -4821,7 +4821,7 @@ function vo({ value: e }) {
4821
4821
  ]
4822
4822
  }
4823
4823
  ),
4824
- typeof r == "object" && /* @__PURE__ */ n("div", { className: H(Be, "border-l pl-4"), children: /* @__PURE__ */ n(vo, { value: r }) })
4824
+ typeof r == "object" && /* @__PURE__ */ n("div", { className: H(Ce, "border-l pl-4"), children: /* @__PURE__ */ n(vo, { value: r }) })
4825
4825
  ]
4826
4826
  },
4827
4827
  `map_preview_table_${t}}`
@@ -5119,7 +5119,7 @@ function _o({
5119
5119
  fields: o.propertyConfigs
5120
5120
  }), [t, r, e]).properties;
5121
5121
  return /* @__PURE__ */ n("div", { className: "w-full " + i, children: /* @__PURE__ */ v("div", { className: "w-full mb-4", children: [
5122
- /* @__PURE__ */ v("div", { className: H(Be, "flex justify-between py-2 border-b last:border-b-0"), children: [
5122
+ /* @__PURE__ */ v("div", { className: H(Ce, "flex justify-between py-2 border-b last:border-b-0"), children: [
5123
5123
  /* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: "Id" }) }),
5124
5124
  /* @__PURE__ */ v(
5125
5125
  "div",
@@ -5150,7 +5150,7 @@ function _o({
5150
5150
  return /* @__PURE__ */ v(
5151
5151
  "div",
5152
5152
  {
5153
- className: H(Be, "flex justify-between py-2 border-b last:border-b-0"),
5153
+ className: H(Ce, "flex justify-between py-2 border-b last:border-b-0"),
5154
5154
  children: [
5155
5155
  /* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: c.name }) }),
5156
5156
  /* @__PURE__ */ n(
@@ -5497,29 +5497,29 @@ function xo({
5497
5497
  }, [g, i, A]);
5498
5498
  const w = x(async (_) => {
5499
5499
  if (d.fileName) {
5500
- const B = await _l(d.fileName, d, t, e, r, o, _, a);
5501
- if (!B || B.length === 0)
5500
+ const C = await _l(d.fileName, d, t, e, r, o, _, a);
5501
+ if (!C || C.length === 0)
5502
5502
  throw Error("You need to return a valid filename");
5503
- return B;
5503
+ return C;
5504
5504
  }
5505
5505
  return Mt() + "_" + _.name;
5506
- }, [e, t, r, o, a, d]), E = x((_) => kl(d.storagePath, d, t, e, r, o, _, a) ?? "/", [e, t, r, o, a, d]), k = x(async (_, B, S) => {
5507
- console.debug("onFileUploadComplete", _, B);
5506
+ }, [e, t, r, o, a, d]), E = x((_) => kl(d.storagePath, d, t, e, r, o, _, a) ?? "/", [e, t, r, o, a, d]), k = x(async (_, C, S) => {
5507
+ console.debug("onFileUploadComplete", _, C);
5508
5508
  let D = _;
5509
5509
  if (d.storeUrl && (D = (await s.getDownloadURL(_)).url), d.postProcess && D && (D = await d.postProcess(D)), !D) {
5510
5510
  console.warn("uploadPathOrDownloadUrl is null");
5511
5511
  return;
5512
5512
  }
5513
5513
  let Q;
5514
- B.storagePathOrDownloadUrl = D, B.metadata = S, Q = [...y], Q = Xi(Q), b(Q);
5514
+ C.storagePathOrDownloadUrl = D, C.metadata = S, Q = [...y], Q = Xi(Q), b(Q);
5515
5515
  const R = Q.filter((G) => !!G.storagePathOrDownloadUrl).map((G) => G.storagePathOrDownloadUrl);
5516
5516
  c(u ? R : R ? R[0] : null);
5517
- }, [y, u, c, d, s]), C = x(async (_) => {
5517
+ }, [y, u, c, d, s]), B = x(async (_) => {
5518
5518
  if (!_.length || l)
5519
5519
  return;
5520
- let B;
5520
+ let C;
5521
5521
  if (u)
5522
- B = [
5522
+ C = [
5523
5523
  ...y,
5524
5524
  ...await Promise.all(_.map(async (S) => (p && Zr(S) && (S = await en(S, p)), {
5525
5525
  id: Rr(),
@@ -5531,7 +5531,7 @@ function xo({
5531
5531
  ];
5532
5532
  else {
5533
5533
  let S = _[0];
5534
- p && Zr(S) && (S = await en(S, p)), B = [{
5534
+ p && Zr(S) && (S = await en(S, p)), C = [{
5535
5535
  id: Rr(),
5536
5536
  file: S,
5537
5537
  fileName: await w(S),
@@ -5539,7 +5539,7 @@ function xo({
5539
5539
  size: m
5540
5540
  }];
5541
5541
  }
5542
- B = Xi(B), b(B);
5542
+ C = Xi(C), b(C);
5543
5543
  }, [l, w, y, f, u, m]);
5544
5544
  return {
5545
5545
  internalValue: y,
@@ -5548,7 +5548,7 @@ function xo({
5548
5548
  fileNameBuilder: w,
5549
5549
  storagePathBuilder: E,
5550
5550
  onFileUploadComplete: k,
5551
- onFilesAdded: C,
5551
+ onFilesAdded: B,
5552
5552
  multipleFilesSupported: u
5553
5553
  };
5554
5554
  }
@@ -5621,7 +5621,7 @@ function Eo({
5621
5621
  )
5622
5622
  ] });
5623
5623
  }
5624
- function Co({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPopup: o, children: a }) {
5624
+ function Bo({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPopup: o, children: a }) {
5625
5625
  const s = se(null), l = x(() => {
5626
5626
  if (o) {
5627
5627
  const d = s && s?.current?.getBoundingClientRect();
@@ -5684,7 +5684,7 @@ function Co({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPop
5684
5684
  )
5685
5685
  ] }) });
5686
5686
  }
5687
- const El = "max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", Cl = "pt-0 border-2 border-solid", Bl = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900", Sl = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";
5687
+ const El = "max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", Bl = "pt-0 border-2 border-solid", Cl = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900", Sl = "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";
5688
5688
  function Il(e) {
5689
5689
  const {
5690
5690
  propertyKey: t,
@@ -5770,9 +5770,9 @@ function Nl({
5770
5770
  } else
5771
5771
  throw Error("Storage field using array must be of data type string");
5772
5772
  }
5773
- const E = p?.metadata, k = !!r, C = ft(), {
5773
+ const E = p?.metadata, k = !!r, B = ft(), {
5774
5774
  open: _,
5775
- getRootProps: B,
5775
+ getRootProps: C,
5776
5776
  getInputProps: S,
5777
5777
  isDragActive: D,
5778
5778
  isDragAccept: Q,
@@ -5788,13 +5788,13 @@ function Nl({
5788
5788
  onDropRejected: (V, ee) => {
5789
5789
  for (const K of V)
5790
5790
  for (const oe of K.errors)
5791
- C.open({
5791
+ B.open({
5792
5792
  type: "error",
5793
5793
  message: `Error uploading file: File is larger than ${p.maxSize} bytes`
5794
5794
  });
5795
5795
  }
5796
5796
  }
5797
- ), { ...G } = B(), le = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", ne = d ? e.of : e, J = he(() => vt(w), [w]), Y = !f && l;
5797
+ ), { ...G } = C(), le = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", ne = d ? e.of : e, J = he(() => vt(w), [w]), Y = !f && l;
5798
5798
  return /* @__PURE__ */ v(
5799
5799
  "div",
5800
5800
  {
@@ -5806,8 +5806,8 @@ function Nl({
5806
5806
  El,
5807
5807
  "relative w-full h-full flex",
5808
5808
  `justify-${k ? "start" : "center"}`,
5809
- D ? Cl : "",
5810
- Q ? Bl : "",
5809
+ D ? Bl : "",
5810
+ Q ? Cl : "",
5811
5811
  R ? Sl : ""
5812
5812
  ),
5813
5813
  children: [
@@ -5853,7 +5853,7 @@ function Nl({
5853
5853
  }
5854
5854
  ),
5855
5855
  /* @__PURE__ */ n(
5856
- Co,
5856
+ Bo,
5857
5857
  {
5858
5858
  showError: Y,
5859
5859
  disabled: f,
@@ -5923,7 +5923,7 @@ const Pl = I.memo(
5923
5923
  } = t, p = x((k) => {
5924
5924
  o(k ? at(k) : null);
5925
5925
  }, [o]), g = x((k) => {
5926
- o(k.map((C) => at(C)));
5926
+ o(k.map((B) => at(B)));
5927
5927
  }, [o]), A = i ? Array.isArray(i) ? i.map((k) => k.id) : i.id ? [i.id] : [] : [], h = Jt(
5928
5928
  {
5929
5929
  multiselect: a,
@@ -5954,7 +5954,7 @@ const Pl = I.memo(
5954
5954
  children: /* @__PURE__ */ n(Ne, { title: "Value is not a reference.", error: "Click to edit" })
5955
5955
  }
5956
5956
  ), E = () => Array.isArray(i) ? /* @__PURE__ */ n(j, { children: i.map(
5957
- (k, C) => /* @__PURE__ */ n(
5957
+ (k, B) => /* @__PURE__ */ n(
5958
5958
  "div",
5959
5959
  {
5960
5960
  className: "w-full my-0.5",
@@ -5970,7 +5970,7 @@ const Pl = I.memo(
5970
5970
  }
5971
5971
  )
5972
5972
  },
5973
- `preview_array_ref_${r}_${C}`
5973
+ `preview_array_ref_${r}_${B}`
5974
5974
  )
5975
5975
  ) }) : /* @__PURE__ */ n(Ne, { error: "Data is not an array of references" });
5976
5976
  return m ? /* @__PURE__ */ v("div", { className: "w-full group", children: [
@@ -5996,7 +5996,7 @@ const Pl = I.memo(
5996
5996
  ze.addMethod(ze.array, "uniqueInArray", function(e = (r) => r, t) {
5997
5997
  return this.test("uniqueInArray", t, (r) => !r || r.length === new Set(r.map(e)).size);
5998
5998
  });
5999
- function Bo(e, t, r) {
5999
+ function Co(e, t, r) {
6000
6000
  const i = {};
6001
6001
  return Object.entries(t).forEach(([o, a]) => {
6002
6002
  i[o] = Gt({
@@ -6293,11 +6293,11 @@ const jl = ({
6293
6293
  hideOverflow: A = !0,
6294
6294
  showExpandIcon: h = !0
6295
6295
  }) {
6296
- const [y, b] = Fn(), w = se(null), E = he(() => kt(i), [i]), [k, C] = P(!1), [_, B] = P(l), S = !a && !!c;
6296
+ const [y, b] = Fn(), w = se(null), E = he(() => kt(i), [i]), [k, B] = P(!1), [_, C] = P(l), S = !a && !!c;
6297
6297
  z(() => {
6298
- l && B(!0);
6298
+ l && C(!0);
6299
6299
  const oe = setTimeout(() => {
6300
- B(!1);
6300
+ C(!1);
6301
6301
  }, 800);
6302
6302
  return () => {
6303
6303
  clearTimeout(oe);
@@ -6337,7 +6337,7 @@ const jl = ({
6337
6337
  a ? p(void 0) : !o && oe && p(oe);
6338
6338
  }, [w, p, o, a]), G = x((oe) => {
6339
6339
  R(), oe.stopPropagation();
6340
- }, [R]), le = he(() => b ? b.height > E : !1, [b, E]), ne = !S && o, J = !a && u && le, Y = !a && !u && le, V = x(() => C(!0), []), ee = x(() => C(!1), []), K = S ? "border-red-500" : _ ? "border-green-500" : ne ? "border-primary" : "border-transparent";
6340
+ }, [R]), le = he(() => b ? b.height > E : !1, [b, E]), ne = !S && o, J = !a && u && le, Y = !a && !u && le, V = x(() => B(!0), []), ee = x(() => B(!1), []), K = S ? "border-red-500" : _ ? "border-green-500" : ne ? "border-primary" : "border-transparent";
6341
6341
  return /* @__PURE__ */ v(
6342
6342
  "div",
6343
6343
  {
@@ -6430,7 +6430,7 @@ const Ul = I.memo(
6430
6430
  selectedCell: A,
6431
6431
  select: h,
6432
6432
  setPopupCell: y
6433
- } = Yl(), b = A?.propertyKey === t && A?.entity.path === d.path && A?.entity.id === d.id, [w, E] = P(i), k = se(i), [C, _] = P(), [B, S] = P(), [D, Q] = P(!1), R = x(() => {
6433
+ } = Yl(), b = A?.propertyKey === t && A?.entity.path === d.path && A?.entity.id === d.id, [w, E] = P(i), k = se(i), [B, _] = P(), [C, S] = P(), [D, Q] = P(!1), R = x(() => {
6434
6434
  Q(!0), setTimeout(() => {
6435
6435
  Q(!1);
6436
6436
  }, 100);
@@ -6494,7 +6494,7 @@ const Ul = I.memo(
6494
6494
  } : void 0);
6495
6495
  };
6496
6496
  let W, re = !1, T = !1, ie = !0, te = !1, O = !1, q = !0;
6497
- const Z = !Y && C;
6497
+ const Z = !Y && B;
6498
6498
  if (u || ne)
6499
6499
  return /* @__PURE__ */ n(
6500
6500
  ur,
@@ -6526,7 +6526,7 @@ const Ul = I.memo(
6526
6526
  W = /* @__PURE__ */ n(
6527
6527
  Il,
6528
6528
  {
6529
- error: B ?? C,
6529
+ error: C ?? B,
6530
6530
  disabled: Y,
6531
6531
  focused: b,
6532
6532
  selected: b,
@@ -6552,7 +6552,7 @@ const Ul = I.memo(
6552
6552
  valueType: "number",
6553
6553
  small: it(g) !== "medium",
6554
6554
  enumValues: F.enumValues,
6555
- error: B ?? C,
6555
+ error: C ?? B,
6556
6556
  internalValue: w,
6557
6557
  updateValue: K
6558
6558
  }
@@ -6560,7 +6560,7 @@ const Ul = I.memo(
6560
6560
  yl,
6561
6561
  {
6562
6562
  align: a,
6563
- error: B ?? C,
6563
+ error: C ?? B,
6564
6564
  focused: b,
6565
6565
  disabled: Y,
6566
6566
  value: w,
@@ -6580,7 +6580,7 @@ const Ul = I.memo(
6580
6580
  valueType: "string",
6581
6581
  small: it(g) !== "medium",
6582
6582
  enumValues: F.enumValues,
6583
- error: B ?? C,
6583
+ error: C ?? B,
6584
6584
  internalValue: w,
6585
6585
  updateValue: K
6586
6586
  }
@@ -6590,7 +6590,7 @@ const Ul = I.memo(
6590
6590
  W = /* @__PURE__ */ n(
6591
6591
  bl,
6592
6592
  {
6593
- error: B ?? C,
6593
+ error: C ?? B,
6594
6594
  disabled: Y,
6595
6595
  multiline: Ae,
6596
6596
  focused: b,
@@ -6603,7 +6603,7 @@ const Ul = I.memo(
6603
6603
  W = /* @__PURE__ */ n(
6604
6604
  wl,
6605
6605
  {
6606
- error: B ?? C,
6606
+ error: C ?? B,
6607
6607
  disabled: Y,
6608
6608
  focused: b,
6609
6609
  internalValue: w,
@@ -6615,7 +6615,7 @@ const Ul = I.memo(
6615
6615
  vl,
6616
6616
  {
6617
6617
  name: t,
6618
- error: B ?? C,
6618
+ error: C ?? B,
6619
6619
  disabled: Y,
6620
6620
  mode: o.mode,
6621
6621
  focused: b,
@@ -6653,7 +6653,7 @@ const Ul = I.memo(
6653
6653
  small: it(g) !== "medium",
6654
6654
  valueType: F.of.dataType,
6655
6655
  enumValues: F.of.enumValues,
6656
- error: B ?? C,
6656
+ error: C ?? B,
6657
6657
  internalValue: w,
6658
6658
  updateValue: K
6659
6659
  }
@@ -6696,14 +6696,14 @@ const Ul = I.memo(
6696
6696
  removePadding: te,
6697
6697
  fullHeight: O,
6698
6698
  saved: D,
6699
- error: B ?? C,
6699
+ error: C ?? B,
6700
6700
  align: a,
6701
6701
  allowScroll: re,
6702
6702
  showExpandIcon: T,
6703
6703
  value: w,
6704
6704
  hideOverflow: ie,
6705
6705
  actions: q && /* @__PURE__ */ n(
6706
- Co,
6706
+ Bo,
6707
6707
  {
6708
6708
  showError: Z,
6709
6709
  disabled: Y,
@@ -6742,7 +6742,7 @@ const ki = function({
6742
6742
  g?.toggleEntitySelection(t);
6743
6743
  }, [t, g?.toggleEntitySelection]), b = x((_) => {
6744
6744
  _.stopPropagation(), g?.toggleEntitySelection(t);
6745
- }, [t, g?.toggleEntitySelection]), w = m.length > 0, E = m.some((_) => _.collapsed || _.collapsed === void 0), k = m.filter((_) => _.collapsed || _.collapsed === void 0), C = m.filter((_) => _.collapsed === !1);
6745
+ }, [t, g?.toggleEntitySelection]), w = m.length > 0, E = m.some((_) => _.collapsed || _.collapsed === void 0), k = m.filter((_) => _.collapsed || _.collapsed === void 0), B = m.filter((_) => _.collapsed === !1);
6746
6746
  return /* @__PURE__ */ v(
6747
6747
  "div",
6748
6748
  {
@@ -6759,7 +6759,7 @@ const ki = function({
6759
6759
  },
6760
6760
  children: [
6761
6761
  (w || l) && /* @__PURE__ */ v("div", { className: "w-34 flex justify-center", children: [
6762
- C.map((_, B) => /* @__PURE__ */ n(_e, { title: _.name, children: /* @__PURE__ */ n(
6762
+ B.map((_, C) => /* @__PURE__ */ n(_e, { title: _.name, children: /* @__PURE__ */ n(
6763
6763
  ce,
6764
6764
  {
6765
6765
  onClick: (S) => {
@@ -6777,7 +6777,7 @@ const ki = function({
6777
6777
  size: A ? "medium" : "small",
6778
6778
  children: _.icon
6779
6779
  }
6780
- ) }, B)),
6780
+ ) }, C)),
6781
6781
  E && /* @__PURE__ */ n(
6782
6782
  Et,
6783
6783
  {
@@ -6788,7 +6788,7 @@ const ki = function({
6788
6788
  children: /* @__PURE__ */ n(vn, {})
6789
6789
  }
6790
6790
  ),
6791
- children: k.map((_, B) => /* @__PURE__ */ v(
6791
+ children: k.map((_, C) => /* @__PURE__ */ v(
6792
6792
  Re,
6793
6793
  {
6794
6794
  onClick: (S) => {
@@ -6808,7 +6808,7 @@ const ki = function({
6808
6808
  _.name
6809
6809
  ]
6810
6810
  },
6811
- B
6811
+ C
6812
6812
  ))
6813
6813
  }
6814
6814
  ),
@@ -6870,7 +6870,7 @@ function $l({
6870
6870
  return /* @__PURE__ */ v(
6871
6871
  "div",
6872
6872
  {
6873
- className: H(Be, "no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),
6873
+ className: H(Ce, "no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),
6874
6874
  children: [
6875
6875
  /* @__PURE__ */ v("div", { className: "flex items-center gap-2 md:mr-4 mr-2", children: [
6876
6876
  c && /* @__PURE__ */ n("div", { className: "hidden lg:block", children: c }),
@@ -7036,9 +7036,9 @@ const Zl = I.memo(
7036
7036
  }) {
7037
7037
  const [m, p] = P(!1), [g, A] = I.useState(!1), [h, y] = I.useState(!1), b = x((_) => {
7038
7038
  A(!0);
7039
- }, []), w = x((_, B) => {
7040
- s(c, _), B !== void 0 && A(B);
7041
- }, [c, s]), E = i === r, C = !(i !== r && i > 0) && (m || E);
7039
+ }, []), w = x((_, C) => {
7040
+ s(c, _), C !== void 0 && A(C);
7041
+ }, [c, s]), E = i === r, B = !(i !== r && i > 0) && (m || E);
7042
7042
  return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ v(
7043
7043
  "div",
7044
7044
  {
@@ -7082,7 +7082,7 @@ const Zl = I.memo(
7082
7082
  ) }),
7083
7083
  /* @__PURE__ */ v(j, { children: [
7084
7084
  f && /* @__PURE__ */ n(f, { onHover: m || g }),
7085
- c.sortable && (o || C || g) && /* @__PURE__ */ n(
7085
+ c.sortable && (o || B || g) && /* @__PURE__ */ n(
7086
7086
  Ri,
7087
7087
  {
7088
7088
  color: "secondary",
@@ -7096,9 +7096,9 @@ const Zl = I.memo(
7096
7096
  a(c.key);
7097
7097
  },
7098
7098
  children: [
7099
- !o && /* @__PURE__ */ n(Br, {}),
7100
- o === "asc" && /* @__PURE__ */ n(Br, {}),
7101
- o === "desc" && /* @__PURE__ */ n(Br, { className: "rotate-180" })
7099
+ !o && /* @__PURE__ */ n(Cr, {}),
7100
+ o === "asc" && /* @__PURE__ */ n(Cr, {}),
7101
+ o === "desc" && /* @__PURE__ */ n(Cr, { className: "rotate-180" })
7102
7102
  ]
7103
7103
  }
7104
7104
  )
@@ -7148,7 +7148,7 @@ const Zl = I.memo(
7148
7148
  ref: t,
7149
7149
  className: H(
7150
7150
  "absolute h-full w-[6px] top-0 right-0 cursor-col-resize",
7151
- C && "bg-gray-300 dark:bg-gray-700"
7151
+ B && "bg-gray-300 dark:bg-gray-700"
7152
7152
  ),
7153
7153
  onMouseDown: d ? () => d(r, c) : void 0
7154
7154
  }
@@ -7197,7 +7197,7 @@ function Xl({
7197
7197
  /* @__PURE__ */ n(
7198
7198
  "div",
7199
7199
  {
7200
- className: H(Be, "py-4 px-6 text-xs font-semibold uppercase border-b"),
7200
+ className: H(Ce, "py-4 px-6 text-xs font-semibold uppercase border-b"),
7201
7201
  children: e.title ?? l
7202
7202
  }
7203
7203
  ),
@@ -7242,31 +7242,31 @@ const Kl = ({
7242
7242
  createFilterField: c,
7243
7243
  AddColumnComponent: d
7244
7244
  }) => {
7245
- const u = e.map(() => ta()), [f, m] = P(-1), p = x((k, C, _) => {
7246
- const B = e[k], S = 100, D = 800, Q = C > D ? D : C < S ? S : C, R = {
7245
+ const u = e.map(() => ta()), [f, m] = P(-1), p = x((k, B, _) => {
7246
+ const C = e[k], S = 100, D = 800, Q = B > D ? D : B < S ? S : B, R = {
7247
7247
  width: Q,
7248
- key: B.key,
7248
+ key: C.key,
7249
7249
  column: {
7250
- ...B,
7250
+ ...C,
7251
7251
  width: Q
7252
7252
  }
7253
7253
  };
7254
7254
  _ ? l(R) : s(R);
7255
7255
  }, [e, s, l]), g = x((k) => {
7256
7256
  if (f >= 0) {
7257
- const C = u[f].current?.parentElement?.getBoundingClientRect().left;
7258
- return C ? k.clientX - C : void 0;
7257
+ const B = u[f].current?.parentElement?.getBoundingClientRect().left;
7258
+ return B ? k.clientX - B : void 0;
7259
7259
  }
7260
7260
  }, [u, f]), A = x((k) => {
7261
7261
  document.body.style.cursor = k ? "col-resize" : "auto";
7262
7262
  }, []), h = x((k) => {
7263
7263
  k.stopPropagation(), k.preventDefault();
7264
- const C = g(k);
7265
- C && p(f, C, !1);
7264
+ const B = g(k);
7265
+ B && p(f, B, !1);
7266
7266
  }, [p, g, f]), y = x((k) => {
7267
7267
  k.stopPropagation(), k.preventDefault();
7268
- const C = g(k);
7269
- C && p(f, C, !0), m(-1), A(!1);
7268
+ const B = g(k);
7269
+ B && p(f, B, !0), m(-1), A(!1);
7270
7270
  }, [p, g, f, A]), b = x(() => {
7271
7271
  document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", y);
7272
7272
  }, [h, y]), w = x(() => {
@@ -7281,18 +7281,18 @@ const Kl = ({
7281
7281
  return /* @__PURE__ */ v(
7282
7282
  "div",
7283
7283
  {
7284
- className: H(Be, "z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),
7284
+ className: H(Ce, "z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),
7285
7285
  children: [
7286
- e.map((k, C) => {
7287
- const _ = e[C], B = _ && a && a[_.key] ? a[_.key] : void 0;
7286
+ e.map((k, B) => {
7287
+ const _ = e[B], C = _ && a && a[_.key] ? a[_.key] : void 0;
7288
7288
  return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(
7289
7289
  Zl,
7290
7290
  {
7291
- resizeHandleRef: u[C],
7292
- columnIndex: C,
7291
+ resizeHandleRef: u[B],
7292
+ columnIndex: B,
7293
7293
  isResizingIndex: f,
7294
7294
  onFilterUpdate: i,
7295
- filter: B,
7295
+ filter: C,
7296
7296
  sort: o === _.key ? t : void 0,
7297
7297
  onColumnSort: r,
7298
7298
  onClickResizeColumn: E,
@@ -7428,9 +7428,9 @@ const rc = ia(({
7428
7428
  rowClassName: w,
7429
7429
  className: E,
7430
7430
  endAdornment: k,
7431
- AddColumnComponent: C
7431
+ AddColumnComponent: B
7432
7432
  }) {
7433
- const _ = f ? f[0] : void 0, B = f ? f[1] : void 0, [S, D] = P(a), Q = se(null), R = se(0);
7433
+ const _ = f ? f[0] : void 0, C = f ? f[1] : void 0, [S, D] = P(a), Q = se(null), R = se(0);
7434
7434
  z(() => {
7435
7435
  D(a);
7436
7436
  }, [a]);
@@ -7445,9 +7445,9 @@ const rc = ia(({
7445
7445
  const V = x(() => {
7446
7446
  R.current = 0, Q.current && Q.current.scrollTo(Q.current?.scrollLeft, 0);
7447
7447
  }, []), ee = x((O) => {
7448
- const q = _ === O && B === "desc", N = _ === O && B === "asc" ? "desc" : q ? void 0 : "asc", F = q ? void 0 : O, Ae = Y.current, Ie = N && F ? [F, N] : void 0;
7448
+ const q = _ === O && C === "desc", N = _ === O && C === "asc" ? "desc" : q ? void 0 : "asc", F = q ? void 0 : O, Ae = Y.current, Ie = N && F ? [F, N] : void 0;
7449
7449
  Ae && d && !d(Ae, Ie) && u && u(void 0), r && r(), g && g(Ie), V();
7450
- }, [d, B, u, r, g, V, _]);
7450
+ }, [d, C, u, r, g, V, _]);
7451
7451
  x(() => {
7452
7452
  R.current = 0, g && g(void 0);
7453
7453
  }, [g]);
@@ -7462,8 +7462,8 @@ const rc = ia(({
7462
7462
  R.current = 0;
7463
7463
  const Z = Y.current;
7464
7464
  let N = Z ? { ...Z } : {};
7465
- q ? N[O.key] = q : delete N[O.key], !d || d(N, _ && B ? [_, B] : void 0) || (N = q ? { [O.key]: q } : {}), u && u(N);
7466
- }, [d, B, u, _]), re = x(() => A ? /* @__PURE__ */ n(Xr, {}) : /* @__PURE__ */ v(
7465
+ q ? N[O.key] = q : delete N[O.key], !d || d(N, _ && C ? [_, C] : void 0) || (N = q ? { [O.key]: q } : {}), u && u(N);
7466
+ }, [d, C, u, _]), re = x(() => A ? /* @__PURE__ */ n(Xr, {}) : /* @__PURE__ */ v(
7467
7467
  "div",
7468
7468
  {
7469
7469
  className: "flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",
@@ -7487,7 +7487,7 @@ const rc = ia(({
7487
7487
  size: o,
7488
7488
  cellRenderer: h,
7489
7489
  columns: S,
7490
- currentSort: B,
7490
+ currentSort: C,
7491
7491
  onRowClick: s,
7492
7492
  customView: ie,
7493
7493
  onColumnResize: ne,
@@ -7500,7 +7500,7 @@ const rc = ia(({
7500
7500
  createFilterField: b,
7501
7501
  rowClassName: w,
7502
7502
  endAdornment: k,
7503
- AddColumnComponent: C
7503
+ AddColumnComponent: B
7504
7504
  };
7505
7505
  return /* @__PURE__ */ n(
7506
7506
  "div",
@@ -7519,7 +7519,7 @@ const rc = ia(({
7519
7519
  height: le.height,
7520
7520
  itemCount: (t?.length ?? 0) + (k ? 1 : 0),
7521
7521
  onScroll: de,
7522
- includeAddColumn: !!C,
7522
+ includeAddColumn: !!B,
7523
7523
  itemSize: kt(o)
7524
7524
  },
7525
7525
  o
@@ -7656,7 +7656,7 @@ function ac({
7656
7656
  h(f, at(S));
7657
7657
  }, E = (S) => {
7658
7658
  h(f, S.map((D) => at(D)));
7659
- }, k = Dr.includes(f), C = Jt(
7659
+ }, k = Dr.includes(f), B = Jt(
7660
7660
  {
7661
7661
  multiselect: k,
7662
7662
  path: o,
@@ -7669,8 +7669,8 @@ function ac({
7669
7669
  }
7670
7670
  }
7671
7671
  ), _ = () => {
7672
- l(!0), C.open();
7673
- }, B = (S) => /* @__PURE__ */ n(
7672
+ l(!0), B.open();
7673
+ }, C = (S) => /* @__PURE__ */ n(
7674
7674
  Ze,
7675
7675
  {
7676
7676
  disabled: !o,
@@ -7695,8 +7695,8 @@ function ac({
7695
7695
  }
7696
7696
  ) }),
7697
7697
  /* @__PURE__ */ v("div", { className: "flex-grow ml-2 h-full gap-2 flex flex-col", children: [
7698
- p && Array.isArray(p) && /* @__PURE__ */ n("div", { children: p.map((S, D) => B(S)) }),
7699
- p && !Array.isArray(p) && /* @__PURE__ */ n("div", { children: B(p) }),
7698
+ p && Array.isArray(p) && /* @__PURE__ */ n("div", { children: p.map((S, D) => C(S)) }),
7699
+ p && !Array.isArray(p) && /* @__PURE__ */ n("div", { children: C(p) }),
7700
7700
  (!p || Array.isArray(p) && p.length === 0) && /* @__PURE__ */ n(
7701
7701
  ge,
7702
7702
  {
@@ -7990,10 +7990,10 @@ const dc = I.memo(
7990
7990
  setItemCount: w,
7991
7991
  pageSize: E = 50,
7992
7992
  paginationEnabled: k,
7993
- checkFilterCombination: C,
7993
+ checkFilterCombination: B,
7994
7994
  setPopupCell: _
7995
7995
  },
7996
- filterable: B = !0,
7996
+ filterable: C = !0,
7997
7997
  emptyComponent: S,
7998
7998
  columns: D,
7999
7999
  forceFilter: Q,
@@ -8064,8 +8064,8 @@ const dc = I.memo(
8064
8064
  sortBy: g,
8065
8065
  onSortByUpdate: A,
8066
8066
  hoverRow: a,
8067
- checkFilterCombination: C,
8068
- createFilterField: B ? uc : void 0,
8067
+ checkFilterCombination: B,
8068
+ createFilterField: C ? uc : void 0,
8069
8069
  rowClassName: x((re) => R?.(re) ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "", [R]),
8070
8070
  className: "flex-grow",
8071
8071
  emptyComponent: S,
@@ -8171,9 +8171,9 @@ const Ro = function({
8171
8171
  additionalFields: w,
8172
8172
  displayedColumnIds: E,
8173
8173
  defaultSize: k,
8174
- properties: C,
8174
+ properties: B,
8175
8175
  tableController: _,
8176
- filterable: B = !0,
8176
+ filterable: C = !0,
8177
8177
  sortable: S = !0,
8178
8178
  endAdornment: D,
8179
8179
  AddColumnComponent: Q,
@@ -8248,7 +8248,7 @@ const Ro = function({
8248
8248
  );
8249
8249
  }, [W, T]), F = (() => {
8250
8250
  const M = Hl({
8251
- properties: C,
8251
+ properties: B,
8252
8252
  sortable: S,
8253
8253
  forceFilter: i,
8254
8254
  AdditionalHeaderWidget: R
@@ -8346,7 +8346,7 @@ const Ro = function({
8346
8346
  onValueChange: u,
8347
8347
  onColumnResize: g,
8348
8348
  hoverRow: y,
8349
- filterable: B,
8349
+ filterable: C,
8350
8350
  emptyComponent: le,
8351
8351
  endAdornment: D,
8352
8352
  AddColumnComponent: Q
@@ -8398,19 +8398,19 @@ function Do({
8398
8398
  return s;
8399
8399
  }, [s, p]);
8400
8400
  z(() => {
8401
- L(p, k) || C(p);
8401
+ L(p, k) || B(p);
8402
8402
  }, [p]);
8403
- const [k, C] = I.useState(p ?? a ?? void 0), [_, B] = I.useState(E), S = _ ? _[0] : void 0, D = _ ? _[1] : void 0, Q = Se(), [R, G] = P([]), [le, ne] = P(!1), [J, Y] = P(), [V, ee] = P(!1), K = x((T, ie) => f.isFilterCombinationValid ? f.isFilterCombinationValid({
8403
+ const [k, B] = I.useState(p ?? a ?? void 0), [_, C] = I.useState(E), S = _ ? _[0] : void 0, D = _ ? _[1] : void 0, Q = Se(), [R, G] = P([]), [le, ne] = P(!1), [J, Y] = P(), [V, ee] = P(!1), K = x((T, ie) => f.isFilterCombinationValid ? f.isFilterCombinationValid({
8404
8404
  path: m,
8405
8405
  collection: t,
8406
8406
  filterValues: T,
8407
8407
  sortBy: ie
8408
- }) : !0, []), oe = x(() => C(p ?? void 0), [p]), de = x((T) => {
8408
+ }) : !0, []), oe = x(() => B(p ?? void 0), [p]), de = x((T) => {
8409
8409
  if (p) {
8410
8410
  console.warn("Filter is not compatible with the force filter. Ignoring filter");
8411
8411
  return;
8412
8412
  }
8413
- T && Object.keys(T).length === 0 ? C(void 0) : C(T);
8413
+ T && Object.keys(T).length === 0 ? B(void 0) : B(T);
8414
8414
  }, [p]);
8415
8415
  z(() => {
8416
8416
  ne(!0);
@@ -8475,7 +8475,7 @@ function Do({
8475
8475
  filterValues: k,
8476
8476
  setFilterValues: de,
8477
8477
  sortBy: _,
8478
- setSortBy: B,
8478
+ setSortBy: C,
8479
8479
  searchString: h,
8480
8480
  setSearchString: y,
8481
8481
  clearFilter: oe,
@@ -8566,7 +8566,7 @@ function hc({
8566
8566
  path: g,
8567
8567
  entityId: J.id
8568
8568
  }), e(J), d.close(!1)) : b(J);
8569
- }, C = () => {
8569
+ }, B = () => {
8570
8570
  m.onAnalyticsEvent?.("reference_selection_new_entity", {
8571
8571
  path: g
8572
8572
  }), u.open({
@@ -8599,7 +8599,7 @@ function hc({
8599
8599
  selectionController: w
8600
8600
  }
8601
8601
  );
8602
- }, B = x((J) => {
8602
+ }, C = x((J) => {
8603
8603
  J.stopPropagation(), d.close(!1);
8604
8604
  }, [d]);
8605
8605
  if (!i)
@@ -8654,13 +8654,13 @@ function hc({
8654
8654
  {
8655
8655
  collection: i,
8656
8656
  path: g,
8657
- onNewClick: C,
8657
+ onNewClick: B,
8658
8658
  onClear: E
8659
8659
  }
8660
8660
  )
8661
8661
  }
8662
8662
  ) }),
8663
- /* @__PURE__ */ v(Ct, { translucent: !1, children: [
8663
+ /* @__PURE__ */ v(Bt, { translucent: !1, children: [
8664
8664
  s && /* @__PURE__ */ n(
8665
8665
  $,
8666
8666
  {
@@ -8672,7 +8672,7 @@ function hc({
8672
8672
  /* @__PURE__ */ n(
8673
8673
  ge,
8674
8674
  {
8675
- onClick: B,
8675
+ onClick: C,
8676
8676
  color: "primary",
8677
8677
  variant: "filled",
8678
8678
  children: "Done"
@@ -8730,7 +8730,7 @@ function sn({
8730
8730
  children: e,
8731
8731
  group: t
8732
8732
  }) {
8733
- const r = Bt();
8733
+ const r = Ct();
8734
8734
  return /* @__PURE__ */ n(
8735
8735
  dt,
8736
8736
  {
@@ -8869,7 +8869,7 @@ function yc({
8869
8869
  onClick: s,
8870
8870
  type: l
8871
8871
  }) {
8872
- const c = Bt(), d = /* @__PURE__ */ n(Jr, { collectionOrView: t ?? r }), u = Lt(), f = Se(), m = pe(), p = (c?.favouritePaths ?? []).includes(e), g = c ? [
8872
+ const c = Ct(), d = /* @__PURE__ */ n(Jr, { collectionOrView: t ?? r }), u = Lt(), f = Se(), m = pe(), p = (c?.favouritePaths ?? []).includes(e), g = c ? [
8873
8873
  /* @__PURE__ */ n(
8874
8874
  ce,
8875
8875
  {
@@ -8938,7 +8938,7 @@ function yc({
8938
8938
  );
8939
8939
  }
8940
8940
  function wc({ entry: e }) {
8941
- const t = Lt(), r = Bt();
8941
+ const t = Lt(), r = Ct();
8942
8942
  if (!r)
8943
8943
  return null;
8944
8944
  const i = r.favouritePaths.includes(e.path), o = (a) => {
@@ -8973,11 +8973,11 @@ function wc({ entry: e }) {
8973
8973
  );
8974
8974
  }
8975
8975
  function vc({ hidden: e }) {
8976
- const t = ke(), r = Bt();
8976
+ const t = ke(), r = Ct();
8977
8977
  if (!r)
8978
8978
  return null;
8979
8979
  const i = (r?.favouritePaths ?? []).map((o) => t.topLevelNavigation?.navigationEntries.find((a) => a.path === o)).filter(Boolean);
8980
- return /* @__PURE__ */ n(Cn, { in: i.length > 0, children: /* @__PURE__ */ n("div", { className: "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]", children: i.map((o) => /* @__PURE__ */ n(
8980
+ return /* @__PURE__ */ n(Bn, { in: i.length > 0, children: /* @__PURE__ */ n("div", { className: "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]", children: i.map((o) => /* @__PURE__ */ n(
8981
8981
  wc,
8982
8982
  {
8983
8983
  entry: o
@@ -9051,12 +9051,12 @@ function kc({
9051
9051
  context: i
9052
9052
  };
9053
9053
  b = /* @__PURE__ */ n(j, { children: o.plugins.filter((E) => E.homePage?.includeSection).map((E, k) => {
9054
- const C = E.homePage.includeSection(w);
9054
+ const B = E.homePage.includeSection(w);
9055
9055
  return /* @__PURE__ */ n(
9056
9056
  sn,
9057
9057
  {
9058
- group: C.title,
9059
- children: C.children
9058
+ group: B.title,
9059
+ children: B.children
9060
9060
  },
9061
9061
  `plugin_section_${E.key}`
9062
9062
  );
@@ -9093,30 +9093,30 @@ function kc({
9093
9093
  t,
9094
9094
  h,
9095
9095
  A.map((w, E) => {
9096
- const k = [], C = {
9096
+ const k = [], B = {
9097
9097
  group: w,
9098
9098
  context: i
9099
9099
  };
9100
- o.plugins && o.plugins.forEach((B) => {
9101
- B.homePage?.AdditionalCards && k.push(...jt(B.homePage?.AdditionalCards));
9100
+ o.plugins && o.plugins.forEach((C) => {
9101
+ C.homePage?.AdditionalCards && k.push(...jt(C.homePage?.AdditionalCards));
9102
9102
  });
9103
- const _ = p.filter((B) => B.group === w || !B.group && w === void 0);
9103
+ const _ = p.filter((C) => C.group === w || !C.group && w === void 0);
9104
9104
  return _.length === 0 && k.length === 0 ? null : /* @__PURE__ */ n(
9105
9105
  sn,
9106
9106
  {
9107
9107
  group: w,
9108
9108
  children: /* @__PURE__ */ v("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [
9109
- _.map((B) => /* @__PURE__ */ n("div", { className: "col-span-1", children: /* @__PURE__ */ n(
9109
+ _.map((C) => /* @__PURE__ */ n("div", { className: "col-span-1", children: /* @__PURE__ */ n(
9110
9110
  yc,
9111
9111
  {
9112
- ...B,
9112
+ ...C,
9113
9113
  onClick: () => {
9114
9114
  let S;
9115
- B.type === "collection" ? S = "home_navigate_to_collection" : B.type === "view" ? S = "home_navigate_to_view" : B.type === "admin" ? S = "home_navigate_to_admin_view" : S = "unmapped_event", i.analyticsController?.onAnalyticsEvent?.(S, { path: B.path });
9115
+ C.type === "collection" ? S = "home_navigate_to_collection" : C.type === "view" ? S = "home_navigate_to_view" : C.type === "admin" ? S = "home_navigate_to_admin_view" : S = "unmapped_event", i.analyticsController?.onAnalyticsEvent?.(S, { path: C.path });
9116
9116
  }
9117
9117
  }
9118
- ) }, `nav_${B.group}_${B.name}`)),
9119
- w?.toLowerCase() !== "admin" && k && k.map((B, S) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(B, { ...C }) }, `nav_${w}_add_${S}`))
9118
+ ) }, `nav_${C.group}_${C.name}`)),
9119
+ w?.toLowerCase() !== "admin" && k && k.map((C, S) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(C, { ...B }) }, `nav_${w}_add_${S}`))
9120
9120
  ] })
9121
9121
  },
9122
9122
  `plugin_section_${w}`
@@ -9207,9 +9207,9 @@ function xc({
9207
9207
  context: u,
9208
9208
  tableController: c,
9209
9209
  collectionEntitiesCount: d
9210
- }, E = jt(e.Actions).map((k, C) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(k, { ...w }) }, `actions_${C}`));
9211
- return m && m.forEach((k, C) => {
9212
- k.collectionView?.CollectionActions && E.push(...jt(k.collectionView?.CollectionActions).map((_, B) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(_, { ...w, ...k.collectionView?.collectionActionsProps }) }, `plugin_actions_${C}_${B}`)));
9210
+ }, E = jt(e.Actions).map((k, B) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(k, { ...w }) }, `actions_${B}`));
9211
+ return m && m.forEach((k, B) => {
9212
+ k.collectionView?.CollectionActions && E.push(...jt(k.collectionView?.CollectionActions).map((_, C) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(_, { ...w, ...k.collectionView?.collectionActionsProps }) }, `plugin_actions_${B}_${C}`)));
9213
9213
  }), /* @__PURE__ */ v(j, { children: [
9214
9214
  E,
9215
9215
  b,
@@ -9256,7 +9256,7 @@ function Ec({
9256
9256
  };
9257
9257
  });
9258
9258
  }
9259
- function Cc() {
9259
+ function Bc() {
9260
9260
  const [e, t] = P({ width: 0, height: 0 });
9261
9261
  return Vr(() => {
9262
9262
  function r() {
@@ -9265,7 +9265,7 @@ function Cc() {
9265
9265
  return window.addEventListener("resize", r), r(), () => window.removeEventListener("resize", r);
9266
9266
  }, []), e;
9267
9267
  }
9268
- const Bc = ({ onResize: e }) => {
9268
+ const Cc = ({ onResize: e }) => {
9269
9269
  const t = se(0), r = se(null), i = se(e);
9270
9270
  i.current = e;
9271
9271
  const o = x((s) => {
@@ -9319,13 +9319,13 @@ function Ic({
9319
9319
  onCellValueChange: d,
9320
9320
  container: u
9321
9321
  }) {
9322
- const f = Se(), m = pe(), [p, g] = I.useState(), [A, h] = P(), y = t?.id, [b, w] = P(t), [E, k] = P(b?.values), C = o ? je({
9322
+ const f = Se(), m = pe(), [p, g] = I.useState(), [A, h] = P(), y = t?.id, [b, w] = P(t), [E, k] = P(b?.values), B = o ? je({
9323
9323
  collection: o,
9324
9324
  path: a,
9325
9325
  values: E,
9326
9326
  entityId: y,
9327
9327
  fields: m.propertyConfigs
9328
- }) : void 0, _ = Cc(), B = I.useRef(null), S = I.useRef(null), D = I.useRef(!1), Q = x(() => {
9328
+ }) : void 0, _ = Bc(), C = I.useRef(null), S = I.useRef(null), D = I.useRef(!1), Q = x(() => {
9329
9329
  if (!s)
9330
9330
  throw Error("getInitialLocation error");
9331
9331
  return {
@@ -9336,7 +9336,7 @@ function Ic({
9336
9336
  x: Z,
9337
9337
  y: N
9338
9338
  }) => {
9339
- const F = B.current?.getBoundingClientRect();
9339
+ const F = C.current?.getBoundingClientRect();
9340
9340
  if (!F)
9341
9341
  throw Error("normalizePosition called before draggableBoundingRect is set");
9342
9342
  return {
@@ -9344,14 +9344,14 @@ function Ic({
9344
9344
  y: Math.max(0, Math.min(N, _.height - F.height))
9345
9345
  };
9346
9346
  }, [_]), G = x((Z) => {
9347
- const N = B.current?.getBoundingClientRect();
9347
+ const N = C.current?.getBoundingClientRect();
9348
9348
  if (!s || !N)
9349
9349
  return;
9350
9350
  const F = Z ?? R(Q());
9351
9351
  (!A || F.x !== A.x || F.y !== A.y) && h(F);
9352
9352
  }, [s, Q, R, A]);
9353
9353
  Ec({
9354
- containerRef: B,
9354
+ containerRef: C,
9355
9355
  innerRef: S,
9356
9356
  x: A?.x,
9357
9357
  y: A?.y,
@@ -9363,7 +9363,7 @@ function Ic({
9363
9363
  [i, b]
9364
9364
  ), Vr(
9365
9365
  () => {
9366
- const Z = B.current?.getBoundingClientRect();
9366
+ const Z = C.current?.getBoundingClientRect();
9367
9367
  !s || !Z || D.current || (G(), D.current = !0);
9368
9368
  },
9369
9369
  [s, G, D.current]
@@ -9374,13 +9374,13 @@ function Ic({
9374
9374
  [_, s]
9375
9375
  );
9376
9376
  const le = he(() => {
9377
- if (!(!C || !y))
9378
- return Bo(
9377
+ if (!(!B || !y))
9378
+ return Co(
9379
9379
  y,
9380
- i && C.properties[i] ? { [i]: C.properties[i] } : {},
9380
+ i && B.properties[i] ? { [i]: B.properties[i] } : {},
9381
9381
  r
9382
9382
  );
9383
- }, [C, y, i, r]), ne = x(() => G(A), [A, G]), J = async (Z) => (g(null), o && b && d && i ? d({
9383
+ }, [B, y, i, r]), ne = x(() => G(A), [A, G]), J = async (Z) => (g(null), o && b && d && i ? d({
9384
9384
  value: Z[i],
9385
9385
  propertyKey: i,
9386
9386
  data: b,
@@ -9412,16 +9412,16 @@ function Ic({
9412
9412
  error: "PopupFormField misconfiguration"
9413
9413
  }
9414
9414
  );
9415
- if (!C)
9415
+ if (!B)
9416
9416
  return /* @__PURE__ */ n(j, {});
9417
9417
  const de = ee, W = {
9418
- collection: C,
9418
+ collection: B,
9419
9419
  entityId: y,
9420
9420
  values: V,
9421
9421
  path: a,
9422
9422
  setFieldValue: K,
9423
9423
  save: J
9424
- }, re = i && At(C.properties, i), T = i && re ? {
9424
+ }, re = i && At(B.properties, i), T = i && re ? {
9425
9425
  propertyKey: i,
9426
9426
  disabled: ee || $t(re) || !!re.disabled,
9427
9427
  property: re,
@@ -9458,7 +9458,7 @@ function Ic({
9458
9458
  )
9459
9459
  }
9460
9460
  ),
9461
- /* @__PURE__ */ n(Ct, { children: /* @__PURE__ */ n(
9461
+ /* @__PURE__ */ n(Bt, { children: /* @__PURE__ */ n(
9462
9462
  ge,
9463
9463
  {
9464
9464
  variant: "filled",
@@ -9481,7 +9481,7 @@ function Ic({
9481
9481
  {
9482
9482
  status: "existing",
9483
9483
  path: a,
9484
- collection: C,
9484
+ collection: B,
9485
9485
  entity: b,
9486
9486
  context: f,
9487
9487
  currentEntityId: y,
@@ -9507,9 +9507,9 @@ function Ic({
9507
9507
  boxShadow: "0 0 0 2px rgba(128,128,128,0.2)"
9508
9508
  },
9509
9509
  className: `inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${l ? "visible" : "invisible"} cursor-grab overflow-visible`,
9510
- ref: B,
9510
+ ref: C,
9511
9511
  children: [
9512
- /* @__PURE__ */ n(Bc, { onResize: ne }),
9512
+ /* @__PURE__ */ n(Cc, { onResize: ne }),
9513
9513
  /* @__PURE__ */ v(
9514
9514
  "div",
9515
9515
  {
@@ -9588,7 +9588,7 @@ function Mo({
9588
9588
  type: "error",
9589
9589
  message: "Error deleting: " + G?.message
9590
9590
  }), console.error("Error deleting entity"), console.error(G);
9591
- }, [b.name]), C = x((R, G) => {
9591
+ }, [b.name]), B = x((R, G) => {
9592
9592
  u.open({
9593
9593
  type: "error",
9594
9594
  message: "Error before deleting: " + G?.message
@@ -9598,18 +9598,18 @@ function Mo({
9598
9598
  type: "error",
9599
9599
  message: "Error after deleting: " + G?.message
9600
9600
  }), console.error(G);
9601
- }, [b.name]), B = x((R) => Ds({
9601
+ }, [b.name]), C = x((R) => Ds({
9602
9602
  dataSource: c,
9603
9603
  entity: R,
9604
9604
  collection: b,
9605
9605
  callbacks: o,
9606
9606
  onDeleteSuccess: E,
9607
9607
  onDeleteFailure: k,
9608
- onPreDeleteHookError: C,
9608
+ onPreDeleteHookError: B,
9609
9609
  onDeleteSuccessHookError: _,
9610
9610
  context: y
9611
- }), [c, b, o, E, k, C, _, y]), S = x(async () => {
9612
- p && (m(!0), A ? Promise.all(p.map(B)).then((R) => {
9611
+ }), [c, b, o, E, k, B, _, y]), S = x(async () => {
9612
+ p && (m(!0), A ? Promise.all(p.map(C)).then((R) => {
9613
9613
  m(!1), s && p && s(l, p), R.every(Boolean) ? u.open({
9614
9614
  type: "success",
9615
9615
  message: `${b.name}: multiple deleted`
@@ -9620,13 +9620,13 @@ function Mo({
9620
9620
  type: "error",
9621
9621
  message: `${b.name}: Error deleting entities`
9622
9622
  }), r();
9623
- }) : B(p).then((R) => {
9623
+ }) : C(p).then((R) => {
9624
9624
  m(!1), R && (a && p && a(l, p), u.open({
9625
9625
  type: "success",
9626
9626
  message: `${b.singularName ?? b.name} deleted`
9627
9627
  }), r());
9628
9628
  }));
9629
- }, [p, A, B, s, l, r, u, b.name, a]);
9629
+ }, [p, A, C, s, l, r, u, b.name, a]);
9630
9630
  let D;
9631
9631
  if (p && A)
9632
9632
  D = /* @__PURE__ */ n(j, { children: "Multiple entities" });
@@ -9657,7 +9657,7 @@ function Mo({
9657
9657
  /* @__PURE__ */ n($, { variant: "subtitle2", className: "p-4", children: Q }),
9658
9658
  !A && /* @__PURE__ */ n("div", { className: "p-4", children: D })
9659
9659
  ] }),
9660
- /* @__PURE__ */ v(Ct, { children: [
9660
+ /* @__PURE__ */ v(Bt, { children: [
9661
9661
  f && /* @__PURE__ */ n(Ut, { size: "small" }),
9662
9662
  /* @__PURE__ */ n(
9663
9663
  ge,
@@ -9838,14 +9838,14 @@ const Qc = "collectionGroupParent", Go = I.memo(
9838
9838
  className: o,
9839
9839
  ...a
9840
9840
  }) {
9841
- const s = Se(), l = t ?? a.path, c = Xe(a), d = ke(), u = pt(), f = mt(), m = Bt(), p = St(), g = pe(), A = I.useRef(null), h = he(() => {
9841
+ const s = Se(), l = t ?? a.path, c = Xe(a), d = ke(), u = pt(), f = mt(), m = Ct(), p = St(), g = pe(), A = I.useRef(null), h = he(() => {
9842
9842
  const X = m?.getCollectionConfig(l);
9843
9843
  return X ? Le(a, X) : a;
9844
9844
  }, [a, l, m?.getCollectionConfig]), y = I.useRef(h);
9845
9845
  z(() => {
9846
9846
  y.current = h;
9847
9847
  }, [h]);
9848
- const b = zt(h, f, l, null), [w, E] = P(void 0), [k, C] = I.useState(void 0), [_, B] = I.useState(0), [S, D] = P(0), Q = x(() => {
9848
+ const b = zt(h, f, l, null), [w, E] = P(void 0), [k, B] = I.useState(void 0), [_, C] = I.useState(0), [S, D] = P(0), Q = x(() => {
9849
9849
  const X = w;
9850
9850
  setTimeout(() => {
9851
9851
  X === w && E(void 0);
@@ -9859,7 +9859,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
9859
9859
  setSelectedEntities: oe
9860
9860
  } = V;
9861
9861
  z(() => {
9862
- C(void 0);
9862
+ B(void 0);
9863
9863
  }, [ee]);
9864
9864
  const de = Do({
9865
9865
  fullPath: l,
@@ -9893,15 +9893,15 @@ const Qc = "collectionGroupParent", Go = I.memo(
9893
9893
  }, [l, u]), O = () => {
9894
9894
  p.onAnalyticsEvent?.("multiple_delete_dialog_open", {
9895
9895
  path: l
9896
- }), C(ee);
9896
+ }), B(ee);
9897
9897
  }, q = (X, fe) => {
9898
9898
  p.onAnalyticsEvent?.("single_entity_deleted", {
9899
9899
  path: l
9900
- }), oe((be) => be.filter((ye) => ye.id !== fe.id)), B(Date.now());
9900
+ }), oe((be) => be.filter((ye) => ye.id !== fe.id)), C(Date.now());
9901
9901
  }, Z = (X, fe) => {
9902
9902
  p.onAnalyticsEvent?.("multiple_entities_deleted", {
9903
9903
  path: l
9904
- }), oe([]), C(void 0), B(Date.now());
9904
+ }), oe([]), B(void 0), C(Date.now());
9905
9905
  };
9906
9906
  let N;
9907
9907
  g?.plugins && (N = g.plugins.find((X) => X.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);
@@ -9934,18 +9934,18 @@ const Qc = "collectionGroupParent", Go = I.memo(
9934
9934
  propertyKey: fe,
9935
9935
  onValueUpdated: be,
9936
9936
  setError: ye,
9937
- data: Ce
9937
+ data: Be
9938
9938
  }) => {
9939
- const Qt = Gr({ ...Ce.values }, fe, X), Cr = {
9939
+ const Qt = Gr({ ...Be.values }, fe, X), Br = {
9940
9940
  path: l,
9941
- entityId: Ce.id,
9941
+ entityId: Be.id,
9942
9942
  values: Qt,
9943
- previousValues: Ce.values,
9943
+ previousValues: Be.values,
9944
9944
  collection: h,
9945
9945
  status: "existing"
9946
9946
  };
9947
9947
  return co({
9948
- ...Cr,
9948
+ ...Br,
9949
9949
  collection: h,
9950
9950
  dataSource: c,
9951
9951
  context: s,
@@ -9985,8 +9985,8 @@ const Qc = "collectionGroupParent", Go = I.memo(
9985
9985
  color: "primary",
9986
9986
  variant: "outlined",
9987
9987
  startIcon: /* @__PURE__ */ n(ai, { size: "small" }),
9988
- onClick: (Ce) => {
9989
- Ce.stopPropagation(), u.open({
9988
+ onClick: (Be) => {
9989
+ Be.stopPropagation(), u.open({
9990
9990
  path: l,
9991
9991
  entityId: ye.id,
9992
9992
  selectedSubPath: be.id ?? be.path,
@@ -10004,13 +10004,13 @@ const Qc = "collectionGroupParent", Go = I.memo(
10004
10004
  dependencies: [],
10005
10005
  Builder: ({ entity: be }) => {
10006
10006
  const ye = d.getParentReferencesFromPath(be.path);
10007
- return /* @__PURE__ */ n(j, { children: ye.map((Ce) => /* @__PURE__ */ n(
10007
+ return /* @__PURE__ */ n(j, { children: ye.map((Be) => /* @__PURE__ */ n(
10008
10008
  Ze,
10009
10009
  {
10010
- reference: Ce,
10010
+ reference: Be,
10011
10011
  size: "tiny"
10012
10012
  },
10013
- Ce.path + "/" + Ce.id
10013
+ Be.path + "/" + Be.id
10014
10014
  )) });
10015
10015
  }
10016
10016
  }] : [];
@@ -10020,7 +10020,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
10020
10020
  ...fe
10021
10021
  ];
10022
10022
  }, [h, l, u]), He = x(() => {
10023
- B(Date.now());
10023
+ C(Date.now());
10024
10024
  }, []), Ke = $e(), st = ({
10025
10025
  entity: X,
10026
10026
  customEntityActions: fe
@@ -10028,7 +10028,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
10028
10028
  const be = X ? vi(h, f, l, X) : !0, ye = [Nc];
10029
10029
  return ae && ye.push(zo), be && ye.push(Vo), fe && ye.push(...fe), ye;
10030
10030
  }, xr = () => {
10031
- const X = st({}), fe = X.filter((Ce) => Ce.collapsed !== !1), ye = X.filter((Ce) => Ce.collapsed === !1).length * (Ke ? 40 : 30);
10031
+ const X = st({}), fe = X.filter((Be) => Be.collapsed !== !1), ye = X.filter((Be) => Be.collapsed === !1).length * (Ke ? 40 : 30);
10032
10032
  return (Ke ? 80 + ye : 70 + ye) + (fe.length > 0 ? Ke ? 40 : 30 : 0);
10033
10033
  }, Er = ({
10034
10034
  entity: X,
@@ -10036,7 +10036,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
10036
10036
  width: be,
10037
10037
  frozen: ye
10038
10038
  }) => {
10039
- const Ce = K(X), Qt = st({
10039
+ const Be = K(X), Qt = st({
10040
10040
  entity: X,
10041
10041
  customEntityActions: h.entityActions
10042
10042
  });
@@ -10046,7 +10046,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
10046
10046
  entity: X,
10047
10047
  width: be,
10048
10048
  frozen: ye,
10049
- isSelected: Ce,
10049
+ isSelected: Be,
10050
10050
  selectionEnabled: G,
10051
10051
  size: fe,
10052
10052
  highlightEntity: E,
@@ -10096,10 +10096,10 @@ const Qc = "collectionGroupParent", Go = I.memo(
10096
10096
  onHover: be
10097
10097
  }) => {
10098
10098
  const ye = y.current;
10099
- return g.plugins ? /* @__PURE__ */ n(j, { children: g.plugins.filter((Ce) => Ce.collectionView?.HeaderAction).map((Ce, Qt) => {
10100
- const Cr = Ce.collectionView.HeaderAction;
10099
+ return g.plugins ? /* @__PURE__ */ n(j, { children: g.plugins.filter((Be) => Be.collectionView?.HeaderAction).map((Be, Qt) => {
10100
+ const Br = Be.collectionView.HeaderAction;
10101
10101
  return /* @__PURE__ */ n(
10102
- Cr,
10102
+ Br,
10103
10103
  {
10104
10104
  onHover: be,
10105
10105
  propertyKey: fe,
@@ -10243,7 +10243,7 @@ const Qc = "collectionGroupParent", Go = I.memo(
10243
10243
  open: !!k,
10244
10244
  onEntityDelete: q,
10245
10245
  onMultipleEntitiesDelete: Z,
10246
- onClose: () => C(void 0)
10246
+ onClose: () => B(void 0)
10247
10247
  }
10248
10248
  )
10249
10249
  ]
@@ -10398,7 +10398,7 @@ function Ku({
10398
10398
  /* @__PURE__ */ n($, { variant: "h6", className: "mb-2", children: i }),
10399
10399
  a
10400
10400
  ] }),
10401
- /* @__PURE__ */ v(Ct, { children: [
10401
+ /* @__PURE__ */ v(Bt, { children: [
10402
10402
  /* @__PURE__ */ n(
10403
10403
  ge,
10404
10404
  {
@@ -10655,7 +10655,7 @@ const Oc = function({
10655
10655
  "aria-label": "Open drawer",
10656
10656
  onClick: g,
10657
10657
  size: "large",
10658
- children: p === "dark" ? /* @__PURE__ */ n(Ea, {}) : /* @__PURE__ */ n(Ca, {})
10658
+ children: p === "dark" ? /* @__PURE__ */ n(Ea, {}) : /* @__PURE__ */ n(Ba, {})
10659
10659
  }
10660
10660
  ),
10661
10661
  /* @__PURE__ */ v(Et, { trigger: y, children: [
@@ -10665,7 +10665,7 @@ const Oc = function({
10665
10665
  ] }),
10666
10666
  a,
10667
10667
  !a && /* @__PURE__ */ v(Re, { onClick: m.signOut, children: [
10668
- /* @__PURE__ */ n(Ba, {}),
10668
+ /* @__PURE__ */ n(Ca, {}),
10669
10669
  "Log Out"
10670
10670
  ] })
10671
10671
  ] })
@@ -10697,8 +10697,8 @@ function qo({
10697
10697
  if (k in f.current)
10698
10698
  return f.current[k];
10699
10699
  {
10700
- const C = nr();
10701
- return f.current[k] = C, C;
10700
+ const B = nr();
10701
+ return f.current[k] = B, B;
10702
10702
  }
10703
10703
  });
10704
10704
  p(b);
@@ -10723,19 +10723,19 @@ function qo({
10723
10723
  return /* @__PURE__ */ n(Qn, { onDragEnd: (b) => {
10724
10724
  if (!b.destination)
10725
10725
  return;
10726
- const w = b.source.index, E = b.destination.index, k = [...m], C = k[w];
10727
- k[w] = k[E], k[E] = C, p(k), d(Vc(r, w, E));
10726
+ const w = b.source.index, E = b.destination.index, k = [...m], B = k[w];
10727
+ k[w] = k[E], k[E] = B, p(k), d(Vc(r, w, E));
10728
10728
  }, children: /* @__PURE__ */ n(
10729
10729
  Rn,
10730
10730
  {
10731
10731
  droppableId: e,
10732
10732
  renderClone: (b, w, E) => {
10733
- const k = E.source.index, C = m[k];
10733
+ const k = E.source.index, B = m[k];
10734
10734
  return /* @__PURE__ */ n(
10735
10735
  ln,
10736
10736
  {
10737
10737
  provided: b,
10738
- internalId: C,
10738
+ internalId: B,
10739
10739
  index: k,
10740
10740
  size: a,
10741
10741
  disabled: i,
@@ -10758,10 +10758,10 @@ function qo({
10758
10758
  draggableId: `array_field_${E}`,
10759
10759
  isDragDisabled: i,
10760
10760
  index: k,
10761
- children: (C, _) => /* @__PURE__ */ n(
10761
+ children: (B, _) => /* @__PURE__ */ n(
10762
10762
  ln,
10763
10763
  {
10764
- provided: C,
10764
+ provided: B,
10765
10765
  internalId: E,
10766
10766
  index: k,
10767
10767
  size: a,
@@ -11048,7 +11048,7 @@ function rm({
11048
11048
  }) {
11049
11049
  return t ? /* @__PURE__ */ n($, { variant: "caption", color: e ? "error" : "secondary", className: "ml-3.5 mt-0.5", children: t }) : null;
11050
11050
  }
11051
- function Ci({
11051
+ function Bi({
11052
11052
  name: e,
11053
11053
  addLabel: t,
11054
11054
  value: r,
@@ -11285,7 +11285,7 @@ function dn({
11285
11285
  onClick: (h) => {
11286
11286
  h.preventDefault(), h.stopPropagation(), r(t.filter((y) => y !== p));
11287
11287
  },
11288
- children: /* @__PURE__ */ n(Bn, { size: "smallest" })
11288
+ children: /* @__PURE__ */ n(Cn, { size: "smallest" })
11289
11289
  }
11290
11290
  )
11291
11291
  ]
@@ -11344,7 +11344,7 @@ function jc({
11344
11344
  const f = l.of;
11345
11345
  if (f.dataType !== "reference")
11346
11346
  throw Error("ArrayOfReferencesField expected a property containing references");
11347
- const m = l.expanded === void 0 ? !0 : l.expanded, p = t && Array.isArray(t) ? t.map((C) => C.id) : [];
11347
+ const m = l.expanded === void 0 ? !0 : l.expanded, p = t && Array.isArray(t) ? t.map((B) => B.id) : [];
11348
11348
  Ue({
11349
11349
  property: l,
11350
11350
  value: t,
@@ -11353,8 +11353,8 @@ function jc({
11353
11353
  const g = ke(), A = he(() => f.path ? g.getCollection(f.path) : void 0, [f.path]);
11354
11354
  if (!A)
11355
11355
  throw Error(`Couldn't find the corresponding collection for the path: ${f.path}`);
11356
- const h = x((C) => {
11357
- console.debug("onMultipleEntitiesSelected", C), d(C.map((_) => at(_)));
11356
+ const h = x((B) => {
11357
+ console.debug("onMultipleEntitiesSelected", B), d(B.map((_) => at(_)));
11358
11358
  }, [d]), y = Jt(
11359
11359
  {
11360
11360
  multiselect: !0,
@@ -11364,11 +11364,11 @@ function jc({
11364
11364
  selectedEntityIds: p,
11365
11365
  forceFilter: f.forceFilter
11366
11366
  }
11367
- ), b = x((C) => {
11368
- C.preventDefault(), y.open();
11369
- }, [y]), w = x((C, _) => {
11370
- const B = t && t.length > C ? t[C] : void 0;
11371
- return B ? /* @__PURE__ */ n(
11367
+ ), b = x((B) => {
11368
+ B.preventDefault(), y.open();
11369
+ }, [y]), w = x((B, _) => {
11370
+ const C = t && t.length > B ? t[B] : void 0;
11371
+ return C ? /* @__PURE__ */ n(
11372
11372
  Ze,
11373
11373
  {
11374
11374
  disabled: !f.path,
@@ -11376,7 +11376,7 @@ function jc({
11376
11376
  size: "medium",
11377
11377
  onClick: b,
11378
11378
  hover: !o,
11379
- reference: B
11379
+ reference: C
11380
11380
  },
11381
11381
  _
11382
11382
  ) : /* @__PURE__ */ n("div", { children: "Internal ERROR" });
@@ -11397,7 +11397,7 @@ function jc({
11397
11397
  ),
11398
11398
  A && /* @__PURE__ */ v("div", { className: "group", children: [
11399
11399
  /* @__PURE__ */ n(
11400
- Ci,
11400
+ Bi,
11401
11401
  {
11402
11402
  value: t,
11403
11403
  addLabel: l.name ? "Add reference to " + l.name : "Add reference",
@@ -11606,17 +11606,17 @@ function Jc({
11606
11606
  getRootProps: w,
11607
11607
  getInputProps: E,
11608
11608
  isDragActive: k,
11609
- isDragAccept: C,
11609
+ isDragAccept: B,
11610
11610
  isDragReject: _
11611
11611
  } = Pn(
11612
11612
  {
11613
- accept: e.acceptedFiles ? e.acceptedFiles.map((B) => ({ [B]: [] })).reduce((B, S) => ({ ...B, ...S }), {}) : void 0,
11613
+ accept: e.acceptedFiles ? e.acceptedFiles.map((C) => ({ [C]: [] })).reduce((C, S) => ({ ...C, ...S }), {}) : void 0,
11614
11614
  disabled: r || i,
11615
11615
  noDragEventsBubbling: !0,
11616
11616
  maxSize: e.maxSize,
11617
11617
  onDrop: o,
11618
- onDropRejected: (B, S) => {
11619
- for (const D of B)
11618
+ onDropRejected: (C, S) => {
11619
+ for (const D of C)
11620
11620
  for (const Q of D.errors)
11621
11621
  b.open({
11622
11622
  type: "error",
@@ -11639,7 +11639,7 @@ function Jc({
11639
11639
  [Uc]: !k,
11640
11640
  [Lc]: k,
11641
11641
  [Wc]: _,
11642
- [$c]: C,
11642
+ [$c]: B,
11643
11643
  [qc]: r
11644
11644
  }
11645
11645
  ),
@@ -11662,26 +11662,26 @@ function Jc({
11662
11662
  ...E()
11663
11663
  }
11664
11664
  ),
11665
- c.map((B, S) => {
11665
+ c.map((C, S) => {
11666
11666
  let D;
11667
- return B.storagePathOrDownloadUrl ? D = /* @__PURE__ */ n(
11667
+ return C.storagePathOrDownloadUrl ? D = /* @__PURE__ */ n(
11668
11668
  Uo,
11669
11669
  {
11670
11670
  collection: t,
11671
- name: `storage_preview_${B.storagePathOrDownloadUrl}`,
11671
+ name: `storage_preview_${C.storagePathOrDownloadUrl}`,
11672
11672
  property: d,
11673
11673
  disabled: r,
11674
11674
  entity: u,
11675
- value: B.storagePathOrDownloadUrl,
11675
+ value: C.storagePathOrDownloadUrl,
11676
11676
  onRemove: f,
11677
- size: B.size
11677
+ size: C.size
11678
11678
  }
11679
- ) : B.file && (D = /* @__PURE__ */ n(
11679
+ ) : C.file && (D = /* @__PURE__ */ n(
11680
11680
  Eo,
11681
11681
  {
11682
- entry: B,
11682
+ entry: C,
11683
11683
  metadata: m,
11684
- storagePath: p(B.file),
11684
+ storagePath: p(C.file),
11685
11685
  onFileUploadComplete: g,
11686
11686
  imageSize: A === "medium" ? 220 : 118,
11687
11687
  simple: !1
@@ -11689,7 +11689,7 @@ function Jc({
11689
11689
  )), /* @__PURE__ */ n(
11690
11690
  Dn,
11691
11691
  {
11692
- draggableId: `array_field_${h}_${B.id}`,
11692
+ draggableId: `array_field_${h}_${C.id}`,
11693
11693
  index: S,
11694
11694
  children: (Q, R) => /* @__PURE__ */ n(
11695
11695
  "div",
@@ -11706,7 +11706,7 @@ function Jc({
11706
11706
  }
11707
11707
  )
11708
11708
  },
11709
- `array_field_${h}_${B.id}`
11709
+ `array_field_${h}_${C.id}`
11710
11710
  );
11711
11711
  }),
11712
11712
  s.placeholder
@@ -11755,19 +11755,19 @@ function Hc({
11755
11755
  } else
11756
11756
  throw Error("Storage field using array must be of data type string");
11757
11757
  }
11758
- const g = f?.metadata, A = s ? "small" : "medium", h = x((k, C) => {
11758
+ const g = f?.metadata, A = s ? "small" : "medium", h = x((k, B) => {
11759
11759
  if (!s)
11760
11760
  return;
11761
- const _ = [...i], B = _[k];
11762
- _.splice(k, 1), _.splice(C, 0, B), o(_);
11761
+ const _ = [...i], C = _[k];
11762
+ _.splice(k, 1), _.splice(B, 0, C), o(_);
11763
11763
  const S = _.filter((D) => !!D.storagePathOrDownloadUrl).map((D) => D.storagePathOrDownloadUrl);
11764
11764
  a(S);
11765
11765
  }, [s, a, o, i]), y = x((k) => {
11766
11766
  k.destination && h(k.source.index, k.destination.index);
11767
11767
  }, [h]), b = x((k) => {
11768
11768
  if (s) {
11769
- const C = i.filter((_) => _.storagePathOrDownloadUrl !== k);
11770
- a(C.filter((_) => !!_.storagePathOrDownloadUrl).map((_) => _.storagePathOrDownloadUrl)), o(C);
11769
+ const B = i.filter((_) => _.storagePathOrDownloadUrl !== k);
11770
+ a(B.filter((_) => !!_.storagePathOrDownloadUrl).map((_) => _.storagePathOrDownloadUrl)), o(B);
11771
11771
  } else
11772
11772
  a(null), o([]);
11773
11773
  }, [i, s, a]), w = s ? "Drag 'n' drop some files here, or click to select files" : "Drag 'n' drop a file here, or click to select one", E = s ? t.of : t;
@@ -11776,8 +11776,8 @@ function Hc({
11776
11776
  {
11777
11777
  droppableId: `droppable_${r}`,
11778
11778
  direction: "horizontal",
11779
- renderClone: (k, C, _) => {
11780
- const B = i[_.source.index];
11779
+ renderClone: (k, B, _) => {
11780
+ const C = i[_.source.index];
11781
11781
  return /* @__PURE__ */ n(
11782
11782
  "div",
11783
11783
  {
@@ -11790,25 +11790,25 @@ function Hc({
11790
11790
  Uo,
11791
11791
  {
11792
11792
  collection: e,
11793
- name: `storage_preview_${B.storagePathOrDownloadUrl}`,
11793
+ name: `storage_preview_${C.storagePathOrDownloadUrl}`,
11794
11794
  property: E,
11795
11795
  disabled: !0,
11796
11796
  entity: m,
11797
- value: B.storagePathOrDownloadUrl,
11797
+ value: C.storagePathOrDownloadUrl,
11798
11798
  onRemove: b,
11799
- size: B.size
11799
+ size: C.size
11800
11800
  }
11801
11801
  )
11802
11802
  }
11803
11803
  );
11804
11804
  },
11805
- children: (k, C) => /* @__PURE__ */ n(
11805
+ children: (k, B) => /* @__PURE__ */ n(
11806
11806
  Jc,
11807
11807
  {
11808
11808
  storage: f,
11809
11809
  collection: e,
11810
11810
  disabled: c,
11811
- isDraggingOver: C.isDraggingOver,
11811
+ isDraggingOver: B.isDraggingOver,
11812
11812
  droppableProvided: k,
11813
11813
  onFilesAdded: d,
11814
11814
  multipleFilesSupported: s,
@@ -11895,7 +11895,7 @@ function Rt({
11895
11895
  }
11896
11896
  ),
11897
11897
  f && /* @__PURE__ */ n(
11898
- Cn,
11898
+ Bn,
11899
11899
  {
11900
11900
  className: "mt-1 ml-1",
11901
11901
  in: !!r,
@@ -12242,10 +12242,10 @@ function rd({
12242
12242
  },
12243
12243
  fieldProps: f
12244
12244
  }) {
12245
- const { plugins: m } = pe(), p = r.customProps, g = f.field.value, A = Dt(f.form.errors, t), h = Dt(f.form.touched, t), y = A && (f.form.submitCount > 0 || r.validation?.unique) && (!Array.isArray(A) || !!A.filter((B) => !!B).length), w = id(d.path, d.collection, t, r, e, m) ?? e, E = f.form.isSubmitting, k = x((B, S) => {
12246
- f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(t, B, S);
12247
- }, []), C = x((B, S, D) => {
12248
- f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(B, S, D);
12245
+ const { plugins: m } = pe(), p = r.customProps, g = f.field.value, A = Dt(f.form.errors, t), h = Dt(f.form.touched, t), y = A && (f.form.submitCount > 0 || r.validation?.unique) && (!Array.isArray(A) || !!A.filter((C) => !!C).length), w = id(d.path, d.collection, t, r, e, m) ?? e, E = f.form.isSubmitting, k = x((C, S) => {
12246
+ f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(t, C, S);
12247
+ }, []), B = x((C, S, D) => {
12248
+ f.form.setFieldTouched(t, !0, !1), f.form.setFieldValue(C, S, D);
12249
12249
  }, []);
12250
12250
  return /* @__PURE__ */ v(me, { children: [
12251
12251
  /* @__PURE__ */ n(w, { ...{
@@ -12253,7 +12253,7 @@ function rd({
12253
12253
  value: g,
12254
12254
  // initialValue,
12255
12255
  setValue: k,
12256
- setFieldValue: C,
12256
+ setFieldValue: B,
12257
12257
  error: A,
12258
12258
  touched: h,
12259
12259
  showError: y,
@@ -12393,7 +12393,7 @@ function od({
12393
12393
  if (!a.keyValue)
12394
12394
  throw Error(`Your property ${e} needs to have the 'keyValue' prop in order to use this field binding`);
12395
12395
  const p = /* @__PURE__ */ n(
12396
- Bi,
12396
+ Ci,
12397
12397
  {
12398
12398
  value: t,
12399
12399
  setValue: s,
@@ -12432,7 +12432,7 @@ function od({
12432
12432
  )
12433
12433
  ] });
12434
12434
  }
12435
- function Bi({
12435
+ function Ci({
12436
12436
  value: e,
12437
12437
  setValue: t,
12438
12438
  fieldName: r,
@@ -12607,7 +12607,7 @@ function ad({
12607
12607
  ) : A === "array" ? /* @__PURE__ */ n(
12608
12608
  "div",
12609
12609
  {
12610
- className: H(Be, "ml-2 pl-2 border-l border-solid"),
12610
+ className: H(Ce, "ml-2 pl-2 border-l border-solid"),
12611
12611
  children: /* @__PURE__ */ n(
12612
12612
  qo,
12613
12613
  {
@@ -12646,9 +12646,9 @@ function ad({
12646
12646
  ) : A === "map" ? /* @__PURE__ */ n(
12647
12647
  "div",
12648
12648
  {
12649
- className: H(Be, "ml-2 pl-2 border-l border-solid"),
12649
+ className: H(Ce, "ml-2 pl-2 border-l border-solid"),
12650
12650
  children: /* @__PURE__ */ n(
12651
- Bi,
12651
+ Ci,
12652
12652
  {
12653
12653
  value: p,
12654
12654
  fieldName: g,
@@ -12817,8 +12817,8 @@ function sd({
12817
12817
  i(f);
12818
12818
  }
12819
12819
  }
12820
- ) : u === "array" ? /* @__PURE__ */ n($, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: H(Be, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
12821
- Bi,
12820
+ ) : u === "array" ? /* @__PURE__ */ n($, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: H(Ce, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
12821
+ Ci,
12822
12822
  {
12823
12823
  value: d,
12824
12824
  setValue: (f) => {
@@ -12950,10 +12950,10 @@ function ld({
12950
12950
  setValue: a
12951
12951
  });
12952
12952
  const y = (E, k) => {
12953
- const C = c.resolvedProperties[E] ?? g, _ = {
12953
+ const B = c.resolvedProperties[E] ?? g, _ = {
12954
12954
  propertyKey: `${e}.${E}`,
12955
12955
  disabled: m,
12956
- property: C,
12956
+ property: B,
12957
12957
  includeDescription: d,
12958
12958
  underlyingValueHasChanged: u,
12959
12959
  context: f,
@@ -12964,7 +12964,7 @@ function ld({
12964
12964
  };
12965
12965
  return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ n(It, { ..._ }) });
12966
12966
  }, b = /* @__PURE__ */ n(
12967
- Ci,
12967
+ Bi,
12968
12968
  {
12969
12969
  value: t,
12970
12970
  addLabel: c.name ? "Add entry to " + c.name : "Add entry",
@@ -13053,7 +13053,7 @@ function cd({
13053
13053
  className: "text-text-secondary dark:text-text-secondary-dark"
13054
13054
  }
13055
13055
  ), b = Object.keys(c.oneOf.properties)[0], w = /* @__PURE__ */ n(
13056
- Ci,
13056
+ Bi,
13057
13057
  {
13058
13058
  value: t,
13059
13059
  name: e,
@@ -14095,13 +14095,12 @@ function wd({
14095
14095
  autoSave: f,
14096
14096
  onIdUpdateError: m
14097
14097
  }) {
14098
- console.log("inputCollection", r);
14099
14098
  const p = St(), g = pe(), A = Se(), h = Xe(r), y = g.plugins, b = he(() => je({
14100
14099
  collection: r,
14101
14100
  path: t,
14102
14101
  values: i?.values,
14103
14102
  fields: g.propertyConfigs
14104
- }), [i?.values, t]), w = (e === "new" || e === "copy") && !!b.customId && b.customId !== "optional", E = he(() => e === "new" || e === "copy" ? w ? void 0 : h.generateEntityId(t) : i?.id, []), k = se(!1), C = se(mn(b, e, i)), [_, B] = I.useState(E), [S, D] = I.useState(!1), [Q, R] = I.useState(), [G, le] = I.useState(!1), [ne, J] = P(i?.values ?? C.current), Y = (ae) => o({
14103
+ }), [i?.values, t]), w = (e === "new" || e === "copy") && !!b.customId && b.customId !== "optional", E = he(() => e === "new" || e === "copy" ? w ? void 0 : h.generateEntityId(t) : i?.id, []), k = se(!1), B = se(mn(b, e, i)), [_, C] = I.useState(E), [S, D] = I.useState(!1), [Q, R] = I.useState(), [G, le] = I.useState(!1), [ne, J] = P(i?.values ?? B.current), Y = (ae) => o({
14105
14104
  collection: oe,
14106
14105
  path: t,
14107
14106
  entityId: _,
@@ -14139,7 +14138,7 @@ function wd({
14139
14138
  M.setSubmitting(!1);
14140
14139
  });
14141
14140
  }, ee = pn({
14142
- initialValues: C.current,
14141
+ initialValues: B.current,
14143
14142
  onSubmit: V,
14144
14143
  validation: (ae) => q?.validate(ae, { abortEarly: !1 }).then(() => ({})).catch((M) => {
14145
14144
  const ue = {};
@@ -14149,13 +14148,13 @@ function wd({
14149
14148
  })
14150
14149
  });
14151
14150
  z(() => {
14152
- C.current = mn(b, e, i);
14151
+ B.current = mn(b, e, i);
14153
14152
  const ae = ee.initialValues;
14154
14153
  !ee.isSubmitting && ae && e === "existing" ? te(
14155
14154
  Object.entries(oe.properties).map(([M, ue]) => {
14156
14155
  if (br(ue))
14157
14156
  return {};
14158
- const ve = ae[M], we = C.current[M];
14157
+ const ve = ae[M], we = B.current[M];
14159
14158
  return L(ve, we) ? {} : { [M]: we };
14160
14159
  }).reduce((M, ue) => ({ ...M, ...ue }), {})
14161
14160
  ) : te({});
@@ -14174,9 +14173,7 @@ function wd({
14174
14173
  values: ne,
14175
14174
  previousValues: ee.initialValues,
14176
14175
  fields: g.propertyConfigs
14177
- });
14178
- console.log("internalValues", ne), console.log("resolvedCollection", oe);
14179
- const de = Hn(oe, g.propertyConfigs), W = ne && de ? ot(ne, de) : void 0, re = r.callbacks?.onIdUpdate, T = x(async () => {
14176
+ }), de = Hn(oe, g.propertyConfigs), W = ne && de ? ot(ne, de) : void 0, re = r.callbacks?.onIdUpdate, T = x(async () => {
14180
14177
  if (re && ne && (e === "new" || e === "copy")) {
14181
14178
  le(!0);
14182
14179
  try {
@@ -14187,7 +14184,7 @@ function wd({
14187
14184
  values: ne,
14188
14185
  context: A
14189
14186
  });
14190
- B(ae);
14187
+ C(ae);
14191
14188
  } catch (ae) {
14192
14189
  m && m(ae), console.error(ae);
14193
14190
  }
@@ -14205,7 +14202,7 @@ function wd({
14205
14202
  }) => h.checkUniqueField(t, ae, M, _),
14206
14203
  [h, t, _]
14207
14204
  ), q = he(
14208
- () => _ ? Bo(
14205
+ () => _ ? Co(
14209
14206
  _,
14210
14207
  oe.properties,
14211
14208
  O
@@ -14282,7 +14279,7 @@ function wd({
14282
14279
  customId: r.customId,
14283
14280
  entityId: _,
14284
14281
  status: e,
14285
- onChange: B,
14282
+ onChange: C,
14286
14283
  error: S,
14287
14284
  loading: G,
14288
14285
  entity: i
@@ -14334,7 +14331,7 @@ function vd(e) {
14334
14331
  closeAfterSaveRef: y,
14335
14332
  autoSave: b,
14336
14333
  entityActions: w
14337
- } = e, E = Se(), k = w.filter((Q) => Q.includeInForm === void 0 || Q.includeInForm), C = pt(), _ = h;
14334
+ } = e, E = Se(), k = w.filter((Q) => Q.includeInForm === void 0 || Q.includeInForm), B = pt(), _ = h;
14338
14335
  z(() => {
14339
14336
  i && i(_), o && o(t);
14340
14337
  }, [_, t]), z(() => {
@@ -14343,7 +14340,7 @@ function vd(e) {
14343
14340
  !L(R, G) && !c[Q] && (console.debug("Updated value from the datasource:", Q, R), d(Q, R !== void 0 ? R : null));
14344
14341
  });
14345
14342
  }, [f, b, a, l, t, c, d]);
14346
- const B = /* @__PURE__ */ n("div", { className: "flex flex-col gap-8", children: (u.propertiesOrder ?? Object.keys(u.properties)).map((Q) => {
14343
+ const C = /* @__PURE__ */ n("div", { className: "flex flex-col gap-8", children: (u.propertiesOrder ?? Object.keys(u.properties)).map((Q) => {
14347
14344
  const R = u.properties[Q];
14348
14345
  if (!R)
14349
14346
  return console.warn(`Property ${Q} not found in collection ${u.name}`), null;
@@ -14394,13 +14391,13 @@ function vd(e) {
14394
14391
  className: "mt-12",
14395
14392
  ref: D,
14396
14393
  children: [
14397
- B,
14394
+ C,
14398
14395
  /* @__PURE__ */ n(hd, { containerRef: D })
14399
14396
  ]
14400
14397
  }
14401
14398
  ),
14402
14399
  /* @__PURE__ */ n("div", { className: "h-14" }),
14403
- !b && /* @__PURE__ */ v(Ct, { position: "absolute", children: [
14400
+ !b && /* @__PURE__ */ v(Bt, { position: "absolute", children: [
14404
14401
  A && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n($, { color: "error", children: A.message }) }),
14405
14402
  l && k.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: k.map((Q) => /* @__PURE__ */ n(
14406
14403
  ce,
@@ -14412,7 +14409,7 @@ function vd(e) {
14412
14409
  fullPath: u.path,
14413
14410
  collection: u,
14414
14411
  context: E,
14415
- sideEntityController: C
14412
+ sideEntityController: B
14416
14413
  });
14417
14414
  },
14418
14415
  children: Q.icon
@@ -15048,7 +15045,7 @@ function Ni(e) {
15048
15045
  }
15049
15046
  return s;
15050
15047
  }
15051
- const Cd = "100vw", Bd = "55vw", mr = "768px", Zt = "main_##Q$SC^#S6";
15048
+ const Bd = "100vw", Cd = "55vw", mr = "768px", Zt = "main_##Q$SC^#S6";
15052
15049
  function Sd({
15053
15050
  path: e,
15054
15051
  entityId: t,
@@ -15072,7 +15069,7 @@ function Sd({
15072
15069
  closeAfterSave: !1
15073
15070
  });
15074
15071
  }, !1, 2e3);
15075
- const g = Xe(o), A = Fi(), h = pt(), y = ft(), b = pe(), w = Se(), E = mt(), [k, C] = P(void 0), [_, B] = P(i ? "copy" : t ? "existing" : "new"), S = se(void 0), D = S.current, Q = (o.subcollections ?? []).filter((U) => !U.hideFromNavigation), R = Q?.length ?? 0, G = o.entityViews, le = G?.length ?? 0, ne = o.formAutoSave && !o.customId, J = le > 0 || R > 0, Y = r ?? Ln(
15072
+ const g = Xe(o), A = Fi(), h = pt(), y = ft(), b = pe(), w = Se(), E = mt(), [k, B] = P(void 0), [_, C] = P(i ? "copy" : t ? "existing" : "new"), S = se(void 0), D = S.current, Q = (o.subcollections ?? []).filter((U) => !U.hideFromNavigation), R = Q?.length ?? 0, G = o.entityViews, le = G?.length ?? 0, ne = o.formAutoSave && !o.customId, J = le > 0 || R > 0, Y = r ?? Ln(
15076
15073
  o ? o.defaultSelectedView : void 0,
15077
15074
  {
15078
15075
  status: _,
@@ -15113,7 +15110,7 @@ function Sd({
15113
15110
  f(!1), ne || y.open({
15114
15111
  type: "success",
15115
15112
  message: `${o.singularName ?? o.name}: Saved correctly`
15116
- }), re(U), B("existing"), s(!1), c && c({ entity: U }), Pe ? (A.setBlocked(!1), A.close(!0), d?.()) : _ !== "existing" && h.replace({
15113
+ }), re(U), C("existing"), s(!1), c && c({ entity: U }), Pe ? (A.setBlocked(!1), A.close(!0), d?.()) : _ !== "existing" && h.replace({
15117
15114
  path: e,
15118
15115
  entityId: U.id,
15119
15116
  selectedSubPath: V.current,
@@ -15173,7 +15170,7 @@ function Sd({
15173
15170
  "div",
15174
15171
  {
15175
15172
  className: H(
15176
- Be,
15173
+ Ce,
15177
15174
  "relative flex-grow w-full h-full overflow-auto "
15178
15175
  ),
15179
15176
  role: "tabpanel",
@@ -15245,7 +15242,6 @@ function Sd({
15245
15242
  }, []), He = (U) => {
15246
15243
  ne || s(U);
15247
15244
  };
15248
- console.log("eeee", o);
15249
15245
  function Ke() {
15250
15246
  const U = b.plugins;
15251
15247
  let Pe = /* @__PURE__ */ n(
@@ -15260,7 +15256,7 @@ function Sd({
15260
15256
  onModified: He,
15261
15257
  entity: W,
15262
15258
  onIdChange: Je,
15263
- onFormContextChange: C,
15259
+ onFormContextChange: B,
15264
15260
  hideId: o.hideIdFromForm,
15265
15261
  autoSave: ne,
15266
15262
  onIdUpdateError: We
@@ -15332,7 +15328,7 @@ function Sd({
15332
15328
  /* @__PURE__ */ v(
15333
15329
  "div",
15334
15330
  {
15335
- className: H(Be, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
15331
+ className: H(Ce, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
15336
15332
  children: [
15337
15333
  /* @__PURE__ */ n(
15338
15334
  "div",
@@ -15343,7 +15339,7 @@ function Sd({
15343
15339
  {
15344
15340
  onClick: () => (d?.(), A.close(!1)),
15345
15341
  size: "large",
15346
- children: /* @__PURE__ */ n(Bn, {})
15342
+ children: /* @__PURE__ */ n(Cn, {})
15347
15343
  }
15348
15344
  )
15349
15345
  }
@@ -15469,7 +15465,7 @@ function Nd({
15469
15465
  i,
15470
15466
  /* @__PURE__ */ n($, { children: "Are you sure you want to leave this page?" })
15471
15467
  ] }),
15472
- /* @__PURE__ */ v(Ct, { children: [
15468
+ /* @__PURE__ */ v(Bt, { children: [
15473
15469
  /* @__PURE__ */ n(ge, { variant: "text", onClick: r, autoFocus: !0, children: " Cancel " }),
15474
15470
  /* @__PURE__ */ n(ge, { onClick: t, children: " Ok " })
15475
15471
  ] })
@@ -15608,10 +15604,10 @@ function Pd(e) {
15608
15604
  const Ko = "new";
15609
15605
  function Qd(e, t) {
15610
15606
  if (t)
15611
- return Cd;
15607
+ return Bd;
15612
15608
  const r = !e.selectedSubPath;
15613
15609
  let i;
15614
- return e.width ? i = typeof e.width == "number" ? `${e.width}px` : e.width : e.collection?.sideDialogWidth && (i = typeof e.collection.sideDialogWidth == "number" ? `${e.collection.sideDialogWidth}px` : e.collection.sideDialogWidth), r ? i || (e.collection ? Rd(e.collection) : mr) : `calc(${Bd} + ${i ?? mr})`;
15610
+ return e.width ? i = typeof e.width == "number" ? `${e.width}px` : e.width : e.collection?.sideDialogWidth && (i = typeof e.collection.sideDialogWidth == "number" ? `${e.collection.sideDialogWidth}px` : e.collection.sideDialogWidth), r ? i || (e.collection ? Rd(e.collection) : mr) : `calc(${Cd} + ${i ?? mr})`;
15615
15611
  }
15616
15612
  const zr = {};
15617
15613
  function Rd(e) {
@@ -16056,7 +16052,7 @@ function om(e) {
16056
16052
  delegate: d,
16057
16053
  propertyConfigs: m,
16058
16054
  navigationController: A
16059
- }), y = Od(), b = Dd(A, y), w = u?.some((B) => B.loading) ?? !1, E = l.initialLoading || A.loading || w, k = {
16055
+ }), y = Od(), b = Dd(A, y), w = u?.some((C) => C.loading) ?? !1, E = l.initialLoading || A.loading || w, k = {
16060
16056
  dateTimeFormat: a,
16061
16057
  locale: s,
16062
16058
  entityLinkBuilder: i,
@@ -16064,7 +16060,7 @@ function om(e) {
16064
16060
  entityViews: p ?? [],
16065
16061
  propertyConfigs: m ?? {},
16066
16062
  components: g
16067
- }, C = he(() => ({
16063
+ }, B = he(() => ({
16068
16064
  onAnalyticsEvent: f
16069
16065
  }), []), _ = Gd(l, u);
16070
16066
  return A.navigationLoadingError ? /* @__PURE__ */ n(er, { maxWidth: "md", children: /* @__PURE__ */ n(
@@ -16096,7 +16092,7 @@ function om(e) {
16096
16092
  "Response from the server: ",
16097
16093
  _?.message
16098
16094
  ] })
16099
- ] }) : /* @__PURE__ */ n(hi.Provider, { value: t, children: /* @__PURE__ */ n(so.Provider, { value: C, children: /* @__PURE__ */ n(ao.Provider, { value: k, children: /* @__PURE__ */ n(
16095
+ ] }) : /* @__PURE__ */ n(hi.Provider, { value: t, children: /* @__PURE__ */ n(so.Provider, { value: B, children: /* @__PURE__ */ n(ao.Provider, { value: k, children: /* @__PURE__ */ n(
16100
16096
  no.Provider,
16101
16097
  {
16102
16098
  value: o,
@@ -16398,7 +16394,7 @@ const Ud = 280, am = I.memo(
16398
16394
  /* @__PURE__ */ n(
16399
16395
  "div",
16400
16396
  {
16401
- className: H(Be, "flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),
16397
+ className: H(Ce, "flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),
16402
16398
  children: /* @__PURE__ */ n(me, { children: r })
16403
16399
  }
16404
16400
  )
@@ -16643,7 +16639,7 @@ export {
16643
16639
  om as FireCMS,
16644
16640
  Oc as FireCMSAppBar,
16645
16641
  Yo as FireCMSLogo,
16646
- Ci as FormikArrayContainer,
16642
+ Bi as FormikArrayContainer,
16647
16643
  Vn as GeoPoint,
16648
16644
  Jr as IconForView,
16649
16645
  Ws as ImagePreview,
@@ -16711,7 +16707,7 @@ export {
16711
16707
  qi as flattenObject,
16712
16708
  $n as fullPathToCollectionSegments,
16713
16709
  Ss as getArrayValuesCount,
16714
- Cu as getBracketNotation,
16710
+ Bu as getBracketNotation,
16715
16711
  gi as getCollectionByPathOrId,
16716
16712
  Ai as getCollectionPathsCombinations,
16717
16713
  Eu as getColorForProperty,
@@ -16719,12 +16715,12 @@ export {
16719
16715
  Ei as getColumnKeysForProperty,
16720
16716
  Ed as getDefaultFieldConfig,
16721
16717
  Ii as getDefaultFieldId,
16722
- Bu as getDefaultPropertiesOrder,
16718
+ Cu as getDefaultPropertiesOrder,
16723
16719
  bi as getDefaultValueFor,
16724
16720
  jn as getDefaultValueForDataType,
16725
16721
  lr as getDefaultValuesFor,
16726
- Bs as getEntityImagePreviewPropertyKey,
16727
- Cs as getEntityPreviewKeys,
16722
+ Cs as getEntityImagePreviewPropertyKey,
16723
+ Bs as getEntityPreviewKeys,
16728
16724
  Hn as getEntityTitlePropertyKey,
16729
16725
  kr as getFieldConfig,
16730
16726
  Wo as getFieldId,