unifyedx-storybook-new 0.2.7 → 0.2.12

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.
@@ -1,14 +1,14 @@
1
1
  import { jsxs as l, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
2
  import ae, { useState as O, useMemo as ce, useId as ea, Fragment as Q, useEffect as X, useCallback as K, useRef as ue } from "react";
3
- import { a as J, U as ut, X as ye, P as _, L as mt, C as je, b as Ge, f as Ve, d as va, D as Na, F as ht, e as pt, h as gt, T as Ue, u as yt, i as ft, I as bt, j as vt, k as Nt, l as xt, m as kt, n as wt, S as xa, o as ka, M as Ct, p as St, q as wa, r as Dt, A as Tt, E as $t, s as Ft, t as At, v as Et, w as Rt, x as Ca, y as It, z as Sa, B as Da, G as zt, H as Bt, J as Pt, K as qe, N as aa, O as ta, Q as Lt, R as Ot, V as Ta, W as Mt, Y as sa, Z as Vt, _ as Ut, $ as $a, a0 as qt, a1 as jt, a2 as Gt, a3 as _t, a4 as Wt, a5 as Yt, a6 as Jt, a7 as Qt, a8 as Xt, a9 as Zt, aa as Ht, ab as Kt, ac as er, ad as ar, ae as tr } from "./vendor-zgKTz69B.js";
3
+ import { a as J, U as ut, X as ye, P as _, L as mt, C as je, b as Ge, f as Ve, d as va, D as Na, F as ht, e as pt, h as gt, T as Ue, u as yt, i as ft, I as bt, j as vt, k as Nt, l as xt, m as kt, n as wt, S as xa, o as ka, M as Ct, p as St, q as wa, r as Dt, A as $t, E as Ft, s as Tt, t as At, v as Et, w as Rt, x as Ca, y as It, z as Sa, B as Da, G as zt, H as Pt, J as Bt, K as qe, N as aa, O as ta, Q as Lt, R as Ot, V as $a, W as Mt, Y as sa, Z as Vt, _ as Ut, $ as Fa, a0 as qt, a1 as jt, a2 as Gt, a3 as _t, a4 as Wt, a5 as Yt, a6 as Jt, a7 as Qt, a8 as Xt, a9 as Zt, aa as Ht, ab as Kt, ac as er, ad as ar, ae as tr } from "./vendor-zgKTz69B.js";
4
4
  import { Popover as rr, PopoverButton as nr, PopoverPanel as sr, Transition as oe, Dialog as me, TransitionChild as ge, DialogPanel as Se, DialogTitle as _e, TabGroup as lr, TabList as or, Tab as re, TabPanels as ir, RadioGroup as ze, Listbox as Z, ListboxButton as cr, ListboxOptions as dr, ListboxOption as ur, SwitchGroup as mr, Switch as Ze, Menu as hr, MenuButton as pr, Portal as gr, MenuItems as yr, MenuItem as fr, DialogBackdrop as br } from "@headlessui/react";
5
5
  import { motion as ne, AnimatePresence as be } from "framer-motion";
6
6
  import { d as vr } from "./vendor-lodash-BD0xlZyL.js";
7
- import { useFloating as Fa, offset as Aa, flip as Ea, shift as Ra, autoUpdate as Ia, useClick as Nr, useDismiss as xr, useInteractions as kr, FloatingPortal as wr } from "@floating-ui/react";
7
+ import { useFloating as Ta, offset as Aa, flip as Ea, shift as Ra, autoUpdate as Ia, useClick as Nr, useDismiss as xr, useInteractions as kr, FloatingPortal as wr } from "@floating-ui/react";
8
8
  import He, { debounce as Cr } from "lodash";
9
9
  import { toast as le, ToastContainer as Sr, Slide as Dr } from "react-toastify";
10
10
  import "react-toastify/dist/ReactToastify.css";
11
- import { P as Tr, S as $r, F as Fr, G as Ar, a as Er, E as Rr, b as Ir, C as zr, R as Br, c as Pr, d as Lr, e as Or, f as Mr, I as Vr, g as ia } from "./vendor-syncfusion-DGcZfoFG.js";
11
+ import { P as $r, S as Fr, F as Tr, G as Ar, a as Er, E as Rr, b as Ir, C as zr, R as Pr, c as Br, d as Lr, e as Or, f as Mr, I as Vr, g as ia } from "./vendor-syncfusion-DGcZfoFG.js";
12
12
  const Ur = (t) => {
13
13
  let r = 2166136261;
14
14
  for (let s = 0; s < t.length; s++)
@@ -33,10 +33,10 @@ const Ur = (t) => {
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  u
36
- ), g = N ? "transparent" : o || b.bg, T = n || b.text;
36
+ ), g = N ? "transparent" : o || b.bg, $ = n || b.text;
37
37
  return /* @__PURE__ */ l("div", { className: m, style: {
38
38
  backgroundColor: g,
39
- color: T
39
+ color: $
40
40
  }, ...i, children: [
41
41
  N && /* @__PURE__ */ e(
42
42
  "img",
@@ -156,13 +156,13 @@ const _r = {
156
156
  onClick: k,
157
157
  ...m
158
158
  }) => {
159
- const g = y || u, T = d && !N, L = J(
159
+ const g = y || u, $ = d && !N, L = J(
160
160
  "btn-base",
161
161
  _r[b],
162
162
  Wr[i],
163
163
  {
164
164
  "is-loading": u,
165
- "btn-icon-only": T
165
+ "btn-icon-only": $
166
166
  },
167
167
  n
168
168
  );
@@ -174,8 +174,8 @@ const _r = {
174
174
  className: L,
175
175
  disabled: g,
176
176
  onClick: k,
177
- title: r || T && o || (typeof N == "string" ? N : void 0),
178
- "aria-label": o || T && r || (typeof N == "string" ? N : void 0),
177
+ title: r || $ && o || (typeof N == "string" ? N : void 0),
178
+ "aria-label": o || $ && r || (typeof N == "string" ? N : void 0),
179
179
  ...m,
180
180
  children: u ? /* @__PURE__ */ e(mt, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ l(ee, { children: [
181
181
  d && /* @__PURE__ */ e(d, { size: b === "large" ? 20 : 16 }),
@@ -208,7 +208,7 @@ const _r = {
208
208
  }
209
209
  )
210
210
  ] }, o);
211
- }) }) }), Ba = ({
211
+ }) }) }), Pa = ({
212
212
  label: t,
213
213
  id: r,
214
214
  error: s,
@@ -248,7 +248,7 @@ const _r = {
248
248
  ] }),
249
249
  s && /* @__PURE__ */ e("p", { className: "checkbox-error-message", children: s })
250
250
  ] });
251
- }, Pa = ({ children: t }) => /* @__PURE__ */ e(rr, { className: "popover-container", children: t }), La = ({ children: t }) => /* @__PURE__ */ e(nr, { as: "div", children: t }), Oa = ({ children: t, className: r }) => /* @__PURE__ */ e(sr, { className: `popover-panel ${r || ""}`, children: t }), Ma = ({
251
+ }, Ba = ({ children: t }) => /* @__PURE__ */ e(rr, { className: "popover-container", children: t }), La = ({ children: t }) => /* @__PURE__ */ e(nr, { as: "div", children: t }), Oa = ({ children: t, className: r }) => /* @__PURE__ */ e(sr, { className: `popover-panel ${r || ""}`, children: t }), Ma = ({
252
252
  value: t,
253
253
  onChange: r,
254
254
  onClear: s,
@@ -264,7 +264,7 @@ const _r = {
264
264
  };
265
265
  return /* @__PURE__ */ l("div", { className: J("datepicker-wrapper", d), children: [
266
266
  n && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: n }),
267
- /* @__PURE__ */ l(Pa, { children: [
267
+ /* @__PURE__ */ l(Ba, { children: [
268
268
  /* @__PURE__ */ e(La, { asChild: !0, children: /* @__PURE__ */ l("div", { className: "datepicker-input-container", children: [
269
269
  /* @__PURE__ */ l(
270
270
  "button",
@@ -328,7 +328,7 @@ const _r = {
328
328
  ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: o });
329
329
  return /* @__PURE__ */ l("div", { className: J("datepicker-wrapper", d), children: [
330
330
  n && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: n }),
331
- /* @__PURE__ */ l(Pa, { children: [
331
+ /* @__PURE__ */ l(Ba, { children: [
332
332
  /* @__PURE__ */ e(La, { asChild: !0, children: /* @__PURE__ */ l("div", { className: "datepicker-input-container", children: [
333
333
  /* @__PURE__ */ l(
334
334
  "button",
@@ -635,7 +635,7 @@ const _r = {
635
635
  title: m = "Upload Files",
636
636
  subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
637
637
  }) => {
638
- const T = i.length > 0 || d.length > 0;
638
+ const $ = i.length > 0 || d.length > 0;
639
639
  return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(
640
640
  me,
641
641
  {
@@ -711,7 +711,7 @@ const _r = {
711
711
  }
712
712
  ),
713
713
  k.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: k.filesToUpload.message }),
714
- T && /* @__PURE__ */ l("div", { className: "file-list-container", children: [
714
+ $ && /* @__PURE__ */ l("div", { className: "file-list-container", children: [
715
715
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
716
716
  /* @__PURE__ */ l("ul", { className: "file-list", children: [
717
717
  i.map((L, E) => /* @__PURE__ */ l(
@@ -828,11 +828,11 @@ const _r = {
828
828
  // Deep copy
829
829
  onSubmit: (C) => {
830
830
  const I = {};
831
- Object.keys(C).forEach((B) => {
832
- I[B] = {
833
- operator: C[B].operator || "in",
834
- values: Array.isArray(C[B].values) ? C[B].values : [],
835
- range: C[B].range || null
831
+ Object.keys(C).forEach((P) => {
832
+ I[P] = {
833
+ operator: C[P].operator || "in",
834
+ values: Array.isArray(C[P].values) ? C[P].values : [],
835
+ range: C[P].range || null
836
836
  };
837
837
  }), console.log("[storybook filter] Applied Filters:", I), typeof s == "function" && s({
838
838
  filters: I,
@@ -841,7 +841,7 @@ const _r = {
841
841
  },
842
842
  enableReinitialize: !0
843
843
  }), k = ce(() => n.reduce((C, I) => {
844
- const B = I.key, A = a.values[B];
844
+ const P = I.key, A = a.values[P];
845
845
  let U = !1;
846
846
  if (A)
847
847
  switch (I.type) {
@@ -853,26 +853,26 @@ const _r = {
853
853
  (A.range && A.range !== "" || Array.isArray(A.values) && A.values.length > 0) && (U = !0);
854
854
  break;
855
855
  }
856
- return C[B] = U, C;
856
+ return C[P] = U, C;
857
857
  }, {}), [n, a.values]), m = Object.values(k).filter(Boolean).length, g = async (C, I) => {
858
858
  try {
859
859
  N((A) => ({ ...A, [C]: !0 }));
860
- const B = await i(C, I);
861
- y((A) => ({ ...A, [C]: B }));
862
- } catch (B) {
863
- console.error(`Error fetching ${C} users:`, B);
860
+ const P = await i(C, I);
861
+ y((A) => ({ ...A, [C]: P }));
862
+ } catch (P) {
863
+ console.error(`Error fetching ${C} users:`, P);
864
864
  } finally {
865
- N((B) => ({ ...B, [C]: !1 }));
865
+ N((P) => ({ ...P, [C]: !1 }));
866
866
  }
867
- }, T = (C) => {
868
- const I = n[C].key, B = n[C].url;
869
- n[C].type === "multiselect-users" && d[I].length === 0 && !b[I] && g(I, B);
867
+ }, $ = (C) => {
868
+ const I = n[C].key, P = n[C].url;
869
+ n[C].type === "multiselect-users" && d[I].length === 0 && !b[I] && g(I, P);
870
870
  }, L = () => {
871
871
  a.resetForm(), y({ createdBy: [], updatedBy: [] }), o();
872
872
  }, E = (C) => {
873
873
  const I = n.find((U) => U.key === C);
874
874
  if (!I) return null;
875
- const B = a.values[C] || u[C], A = Array.isArray(B.values) ? B.values : [];
875
+ const P = a.values[C] || u[C], A = Array.isArray(P.values) ? P.values : [];
876
876
  switch (I.type) {
877
877
  case "multiselect":
878
878
  return /* @__PURE__ */ l("div", { className: "filter-panel-content", children: [
@@ -881,7 +881,7 @@ const _r = {
881
881
  /* @__PURE__ */ e(
882
882
  "select",
883
883
  {
884
- value: B.operator || "in",
884
+ value: P.operator || "in",
885
885
  onChange: (c) => a.setFieldValue(`${C}.operator`, c.target.value),
886
886
  className: "filter-select",
887
887
  children: I.operators.map((c) => /* @__PURE__ */ e("option", { value: c, children: c === "in" ? "Includes" : "Excludes" }, c))
@@ -921,7 +921,7 @@ const _r = {
921
921
  className: "filter-checkbox-input",
922
922
  checked: A.includes(c.value),
923
923
  onChange: (h) => {
924
- const x = h.target.checked ? [...A, c.value] : A.filter(($) => $ !== c.value);
924
+ const x = h.target.checked ? [...A, c.value] : A.filter((F) => F !== c.value);
925
925
  a.setFieldValue(`${C}.values`, x);
926
926
  }
927
927
  }
@@ -945,7 +945,7 @@ const _r = {
945
945
  /* @__PURE__ */ e(
946
946
  "select",
947
947
  {
948
- value: B.operator || "in",
948
+ value: P.operator || "in",
949
949
  onChange: (c) => a.setFieldValue(`${C}.operator`, c.target.value),
950
950
  className: "filter-select",
951
951
  children: I.operators.map((c) => /* @__PURE__ */ e("option", { value: c, children: c === "in" ? "Includes" : "Excludes" }, c))
@@ -988,7 +988,7 @@ const _r = {
988
988
  className: "filter-checkbox-input",
989
989
  checked: A.includes(c.email),
990
990
  onChange: (h) => {
991
- const x = h.target.checked ? [...A, c.email] : A.filter(($) => $ !== c.email);
991
+ const x = h.target.checked ? [...A, c.email] : A.filter((F) => F !== c.email);
992
992
  a.setFieldValue(
993
993
  `${C}.values`,
994
994
  x
@@ -1011,7 +1011,7 @@ const _r = {
1011
1011
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1012
1012
  ] });
1013
1013
  case "date":
1014
- const G = B.values || [], [v, p] = G, f = v && p, w = {
1014
+ const G = P.values || [], [v, p] = G, f = v && p, w = {
1015
1015
  startDate: v instanceof Date ? v : /* @__PURE__ */ new Date(),
1016
1016
  // Fallback to today
1017
1017
  endDate: p instanceof Date ? p : /* @__PURE__ */ new Date(),
@@ -1024,7 +1024,7 @@ const _r = {
1024
1024
  /* @__PURE__ */ e(
1025
1025
  "select",
1026
1026
  {
1027
- value: B.operator,
1027
+ value: P.operator,
1028
1028
  onChange: (c) => a.setFieldValue(`${C}.operator`, c.target.value),
1029
1029
  className: "filter-select",
1030
1030
  children: I.operators.map((c) => /* @__PURE__ */ e("option", { value: c, children: c === "in" ? "Is" : "Is not" }, c))
@@ -1110,7 +1110,7 @@ const _r = {
1110
1110
  lr,
1111
1111
  {
1112
1112
  vertical: !0,
1113
- onChange: T,
1113
+ onChange: $,
1114
1114
  style: {
1115
1115
  display: "flex",
1116
1116
  flexGrow: 1
@@ -1235,16 +1235,20 @@ const _r = {
1235
1235
  title: s,
1236
1236
  children: o,
1237
1237
  // For the description/body content
1238
- primaryButtonText: n = "Confirm",
1239
- secondaryButtonText: u = "Cancel",
1238
+ primaryButtonText: n,
1239
+ // No default
1240
+ secondaryButtonText: u,
1241
+ // No default
1240
1242
  variant: i = "info",
1241
1243
  // 'info', 'warning', 'delete'
1242
1244
  loading: d = !1,
1243
- buttonProps: y = {}
1245
+ buttonProps: y = {},
1246
+ size: b
1247
+ // Add size prop
1244
1248
  }) => {
1245
- const b = ma[i] || ma.info, N = b.icon, a = () => {
1249
+ const N = ma[i] || ma.info, a = N.icon, k = () => {
1246
1250
  r({ primary: !0, secondary: !1 });
1247
- }, k = () => {
1251
+ }, m = () => {
1248
1252
  r({ primary: !1, secondary: !0 });
1249
1253
  };
1250
1254
  return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(me, { as: "div", className: "modal-dialog", onClose: () => r({}), children: [
@@ -1271,27 +1275,27 @@ const _r = {
1271
1275
  leave: "ease-in duration-200",
1272
1276
  leaveFrom: "opacity-100 scale-100",
1273
1277
  leaveTo: "opacity-0 scale-95",
1274
- children: /* @__PURE__ */ l(Se, { className: "modal-panel", children: [
1278
+ children: /* @__PURE__ */ l(Se, { className: b === "large" ? "modal-panel modal-panel--large" : "modal-panel", children: [
1275
1279
  /* @__PURE__ */ l("div", { className: "modal-content-wrapper", children: [
1276
- /* @__PURE__ */ e("div", { className: `modal-icon-container ${b.iconClass}`, children: /* @__PURE__ */ e(N, { size: 24, "aria-hidden": "true" }) }),
1280
+ /* @__PURE__ */ e("div", { className: `modal-icon-container ${N.iconClass}`, children: /* @__PURE__ */ e(a, { size: 24, "aria-hidden": "true" }) }),
1277
1281
  /* @__PURE__ */ l("div", { className: "modal-text-content", children: [
1278
1282
  /* @__PURE__ */ e(_e, { as: "h3", className: "modal-title", children: s }),
1279
1283
  /* @__PURE__ */ e("div", { className: "modal-description", children: o })
1280
1284
  ] })
1281
1285
  ] }),
1282
- /* @__PURE__ */ l("div", { className: "modal-footer", children: [
1283
- /* @__PURE__ */ e(
1286
+ (n || u) && /* @__PURE__ */ l("div", { className: "modal-footer", children: [
1287
+ u && /* @__PURE__ */ e(
1284
1288
  H,
1285
1289
  {
1286
- onClick: k,
1290
+ onClick: m,
1287
1291
  label: u,
1288
1292
  category: "secondary"
1289
1293
  }
1290
1294
  ),
1291
- /* @__PURE__ */ e(
1295
+ n && /* @__PURE__ */ e(
1292
1296
  H,
1293
1297
  {
1294
- onClick: a,
1298
+ onClick: k,
1295
1299
  label: n,
1296
1300
  ...y
1297
1301
  }
@@ -1920,7 +1924,7 @@ const _r = {
1920
1924
  onClick: u.onBack,
1921
1925
  className: "wizard-back-button",
1922
1926
  "aria-label": "Go back to previous step",
1923
- children: /* @__PURE__ */ e(Tt, { size: 20 })
1927
+ children: /* @__PURE__ */ e($t, { size: 20 })
1924
1928
  }
1925
1929
  ),
1926
1930
  /* @__PURE__ */ l("div", { className: "wizard-header-text", children: [
@@ -2052,9 +2056,9 @@ const _r = {
2052
2056
  ] }), an = ({
2053
2057
  options: t = [],
2054
2058
  onSelect: r,
2055
- triggerIcon: s = $t
2059
+ triggerIcon: s = Ft
2056
2060
  }) => {
2057
- const { refs: o, floatingStyles: n } = Fa({
2061
+ const { refs: o, floatingStyles: n } = Ta({
2058
2062
  whileElementsMounted: Ia,
2059
2063
  middleware: [Aa(5), Ea(), Ra({ padding: 5 })]
2060
2064
  });
@@ -2282,7 +2286,7 @@ function dn({
2282
2286
  enableAuthRedirect: t = !0,
2283
2287
  defaultOpenHeaders: r = {}
2284
2288
  } = {}) {
2285
- const s = Ft.create({
2289
+ const s = Tt.create({
2286
2290
  baseURL: We()
2287
2291
  // ✅ base URL here
2288
2292
  // You can set general timeouts/etc. here
@@ -2493,7 +2497,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2493
2497
  },
2494
2498
  isChanged: d = !1
2495
2499
  }) => {
2496
- const [y, b] = O(ga[0]), [N, a] = O(""), k = oa(N, 400), [m, g] = O([]), [T, L] = O(/* @__PURE__ */ new Set()), [E, C] = O(!1), [I, B] = O(ya[0]), {
2500
+ const [y, b] = O(ga[0]), [N, a] = O(""), k = oa(N, 400), [m, g] = O([]), [$, L] = O(/* @__PURE__ */ new Set()), [E, C] = O(!1), [I, P] = O(ya[0]), {
2497
2501
  control: A,
2498
2502
  handleSubmit: U,
2499
2503
  watch: q,
@@ -2501,7 +2505,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2501
2505
  } = zt({
2502
2506
  defaultValues: { pendingInvites: [] },
2503
2507
  resolver: Lt(yn)
2504
- }), { fields: p, append: f, remove: w, update: c } = Bt({
2508
+ }), { fields: p, append: f, remove: w, update: c } = Pt({
2505
2509
  control: A,
2506
2510
  name: "pendingInvites"
2507
2511
  }), h = q("pendingInvites");
@@ -2515,12 +2519,12 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2515
2519
  const V = new Set(z);
2516
2520
  return V.has(D) ? V.delete(D) : V.add(D), V;
2517
2521
  });
2518
- }, $ = () => {
2519
- m.filter((D) => T.has(D.id)).forEach((D) => {
2522
+ }, F = () => {
2523
+ m.filter((D) => $.has(D.id)).forEach((D) => {
2520
2524
  p.find((z) => z.id === D.id) || f({ ...D, permission: I.name });
2521
2525
  }), L(/* @__PURE__ */ new Set()), a("");
2522
2526
  }, R = (D) => {
2523
- B(D), p.forEach(
2527
+ P(D), p.forEach(
2524
2528
  (z, V) => c(V, { ...p[V], permission: D.name })
2525
2529
  );
2526
2530
  }, j = async (D) => {
@@ -2567,7 +2571,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2567
2571
  }, S = (D) => {
2568
2572
  const z = o[y.code].find((V) => V.name === D.name) || h.find((V) => V.name === D.name);
2569
2573
  return z ? `${z.permission}` : "";
2570
- }, F = () => {
2574
+ }, T = () => {
2571
2575
  switch (n) {
2572
2576
  case se.DRIVE:
2573
2577
  return "Share with others";
@@ -2578,13 +2582,13 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2578
2582
  default:
2579
2583
  return "Add User, Groups or Roles test";
2580
2584
  }
2581
- }, M = ce(() => T.size === 0 && !d, [T, d]);
2585
+ }, M = ce(() => $.size === 0 && !d, [$, d]);
2582
2586
  return /* @__PURE__ */ l("div", { className: "flex flex-col h-full bg-white", children: [
2583
2587
  /* @__PURE__ */ l("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2584
- /* @__PURE__ */ e(me.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: F() }),
2588
+ /* @__PURE__ */ e(me.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: T() }),
2585
2589
  /* @__PURE__ */ l("div", { className: "flex items-center gap-4", children: [
2586
2590
  n === se.DRIVE && /* @__PURE__ */ l("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
2587
- /* @__PURE__ */ e(Pt, { className: "h-5 w-5" }),
2591
+ /* @__PURE__ */ e(Bt, { className: "h-5 w-5" }),
2588
2592
  " Copy Link"
2589
2593
  ] }),
2590
2594
  /* @__PURE__ */ e(
@@ -2681,7 +2685,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2681
2685
  "input",
2682
2686
  {
2683
2687
  type: "checkbox",
2684
- checked: T.has(D.id),
2688
+ checked: $.has(D.id),
2685
2689
  readOnly: !0,
2686
2690
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2687
2691
  disabled: !!z
@@ -2717,8 +2721,8 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2717
2721
  /* @__PURE__ */ e(
2718
2722
  "button",
2719
2723
  {
2720
- onClick: $,
2721
- disabled: T.size === 0,
2724
+ onClick: F,
2725
+ disabled: $.size === 0,
2722
2726
  className: "px-3 py-1 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed hover:cursor-pointer",
2723
2727
  children: "Add"
2724
2728
  }
@@ -2878,7 +2882,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2878
2882
  { name: "Can manage", icon: Da, value: "edit" },
2879
2883
  { name: "Remove", icon: Ot, isDestructive: !0, value: "remove" }
2880
2884
  ], bn = ({ item: t, allowedPermissions: r, onPermissionChange: s }) => {
2881
- const [o, n] = O(!1), { refs: u, floatingStyles: i, context: d } = Fa({
2885
+ const [o, n] = O(!1), { refs: u, floatingStyles: i, context: d } = Ta({
2882
2886
  open: o,
2883
2887
  onOpenChange: n,
2884
2888
  middleware: [Aa(8), Ea(), Ra({ padding: 8 })],
@@ -2929,24 +2933,24 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2929
2933
  Z.Option,
2930
2934
  {
2931
2935
  className: ({
2932
- active: T
2936
+ active: $
2933
2937
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
2934
- ${T ? "bg-blue-100 text-blue-900" : "text-gray-900"}
2935
- ${g.isDestructive && T ? "bg-red-100 text-red-900" : ""}
2936
- ${g.isDestructive && !T ? "text-red-600" : ""}`,
2938
+ ${$ ? "bg-blue-100 text-blue-900" : "text-gray-900"}
2939
+ ${g.isDestructive && $ ? "bg-red-100 text-red-900" : ""}
2940
+ ${g.isDestructive && !$ ? "text-red-600" : ""}`,
2937
2941
  value: g,
2938
- children: ({ selected: T }) => /* @__PURE__ */ l(ee, { children: [
2942
+ children: ({ selected: $ }) => /* @__PURE__ */ l(ee, { children: [
2939
2943
  /* @__PURE__ */ l(
2940
2944
  "span",
2941
2945
  {
2942
- className: `flex items-center gap-2 truncate ${T ? "font-medium" : "font-normal"}`,
2946
+ className: `flex items-center gap-2 truncate ${$ ? "font-medium" : "font-normal"}`,
2943
2947
  children: [
2944
2948
  /* @__PURE__ */ e(g.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
2945
2949
  g.name
2946
2950
  ]
2947
2951
  }
2948
2952
  ),
2949
- T && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ta, { className: "h-5 w-5", "aria-hidden": "true" }) })
2953
+ $ && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ta, { className: "h-5 w-5", "aria-hidden": "true" }) })
2950
2954
  ] })
2951
2955
  },
2952
2956
  g.name
@@ -2976,7 +2980,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2976
2980
  roles: i.roles.filter(
2977
2981
  (E) => E.name.toLowerCase().includes(k.toLowerCase())
2978
2982
  )
2979
- }, g = async (E, C, I, B) => {
2983
+ }, g = async (E, C, I, P) => {
2980
2984
  const A = C.value;
2981
2985
  d(A === "Remove" ? (U) => ({
2982
2986
  ...U,
@@ -2987,7 +2991,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2987
2991
  (q) => q.id === E.id ? { ...q, permission: A } : q
2988
2992
  )
2989
2993
  }));
2990
- }, T = ["users", "groups", "roles"], L = ["Users", "Groups", "Roles"];
2994
+ }, $ = ["users", "groups", "roles"], L = ["Users", "Groups", "Roles"];
2991
2995
  return (
2992
2996
  // The main structure remains the same...
2993
2997
  /* @__PURE__ */ l("div", { className: "flex flex-col h-full bg-gray-50", children: [
@@ -2998,7 +3002,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2998
3002
  onClick: () => r(i),
2999
3003
  className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 hover:cursor-pointer p-2 rounded-md hover:bg-gray-100",
3000
3004
  children: [
3001
- /* @__PURE__ */ e(Ta, { className: "h-5 w-5" }),
3005
+ /* @__PURE__ */ e($a, { className: "h-5 w-5" }),
3002
3006
  " Back"
3003
3007
  ]
3004
3008
  }
@@ -3043,7 +3047,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3043
3047
  animate: { y: 0, opacity: 1 },
3044
3048
  exit: { y: -10, opacity: 0 },
3045
3049
  transition: { duration: 0.2 },
3046
- children: /* @__PURE__ */ e(re.Panels, { as: Q, children: T.map((E) => /* @__PURE__ */ e(
3050
+ children: /* @__PURE__ */ e(re.Panels, { as: Q, children: $.map((E) => /* @__PURE__ */ e(
3047
3051
  re.Panel,
3048
3052
  {
3049
3053
  className: "space-y-3 focus:outline-none",
@@ -3214,7 +3218,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3214
3218
  onClick: r,
3215
3219
  className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 p-2 rounded-md hover:bg-gray-100 hover:cursor-pointer",
3216
3220
  children: [
3217
- /* @__PURE__ */ e(Ta, { className: "h-5 w-5" }),
3221
+ /* @__PURE__ */ e($a, { className: "h-5 w-5" }),
3218
3222
  " Back"
3219
3223
  ]
3220
3224
  }
@@ -3263,7 +3267,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3263
3267
  allowedPermissions: d = [],
3264
3268
  ...y
3265
3269
  }) => {
3266
- const [b, N] = O(de.INVITE), [a, k] = O(t), [m, g] = O(null), [T, L] = O(!1), [E, C] = O([]), [I, B] = O(de.MANAGE), A = () => {
3270
+ const [b, N] = O(de.INVITE), [a, k] = O(t), [m, g] = O(null), [$, L] = O(!1), [E, C] = O([]), [I, P] = O(de.MANAGE), A = () => {
3267
3271
  N(de.INVITE), g(null), u();
3268
3272
  }, U = () => {
3269
3273
  N(de.MANAGE);
@@ -3276,7 +3280,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3276
3280
  }
3277
3281
  C(resp);
3278
3282
  }
3279
- g({ id: p, type: w, name: f }), B(b), N(de.MEMBERS);
3283
+ g({ id: p, type: w, name: f }), P(b), N(de.MEMBERS);
3280
3284
  }, G = (p) => {
3281
3285
  k(p);
3282
3286
  const f = !He.isEqual(
@@ -3357,7 +3361,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3357
3361
  onFinalSubmit: (p) => {
3358
3362
  s(p, a);
3359
3363
  },
3360
- isChanged: T
3364
+ isChanged: $
3361
3365
  }
3362
3366
  )
3363
3367
  },
@@ -3367,7 +3371,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3367
3371
  })() }) }) })
3368
3372
  ] }) });
3369
3373
  };
3370
- function Be(...t) {
3374
+ function Pe(...t) {
3371
3375
  return t.filter(Boolean).join(" ");
3372
3376
  }
3373
3377
  function Ye({
@@ -3390,14 +3394,14 @@ function Ye({
3390
3394
  serverLoading: a = !1,
3391
3395
  minSearchChars: k = 2,
3392
3396
  // NEW: mappers (id/label keys)
3393
- getOptionId: m = (T) => String(T.id),
3394
- getOptionLabel: g = (T) => T.name
3397
+ getOptionId: m = ($) => String($.id),
3398
+ getOptionLabel: g = ($) => $.name
3395
3399
  }) {
3396
- const T = ea(), L = ea(), [E, C] = O(""), I = ue(""), B = ce(() => {
3400
+ const $ = ea(), L = ea(), [E, C] = O(""), I = ue(""), P = ce(() => {
3397
3401
  const p = /* @__PURE__ */ new Map();
3398
3402
  for (const f of r) p.set(m(f), f);
3399
3403
  return p;
3400
- }, [r, m]), A = ce(() => Array.isArray(s) ? s.map((p) => p && typeof p == "object" ? B.get(m(p)) || null : B.get(String(p))).filter(Boolean) : [], [s, B, m]), U = ce(() => {
3404
+ }, [r, m]), A = ce(() => Array.isArray(s) ? s.map((p) => p && typeof p == "object" ? P.get(m(p)) || null : P.get(String(p))).filter(Boolean) : [], [s, P, m]), U = ce(() => {
3401
3405
  if (!E) return r;
3402
3406
  const p = E.toLowerCase();
3403
3407
  return r.filter((f) => g(f).toLowerCase().includes(p));
@@ -3432,7 +3436,7 @@ function Ye({
3432
3436
  /* @__PURE__ */ e(
3433
3437
  Z.Label,
3434
3438
  {
3435
- id: T,
3439
+ id: $,
3436
3440
  className: "block text-sm font-medium leading-6 text-gray-900",
3437
3441
  children: t
3438
3442
  }
@@ -3441,11 +3445,11 @@ function Ye({
3441
3445
  /* @__PURE__ */ l(
3442
3446
  Z.Button,
3443
3447
  {
3444
- "aria-labelledby": T,
3448
+ "aria-labelledby": $,
3445
3449
  "aria-invalid": !!i,
3446
3450
  "aria-describedby": i ? L : void 0,
3447
3451
  onBlur: n,
3448
- className: Be(
3452
+ className: Pe(
3449
3453
  "relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
3450
3454
  i ? "ring-red-500" : "ring-gray-300"
3451
3455
  ),
@@ -3474,31 +3478,31 @@ function Ye({
3474
3478
  ) }),
3475
3479
  b === "server" && a && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3476
3480
  q.length === 0 && !a ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: b === "server" ? E.length < k ? `Type at least ${k} characters to search.` : "No results." : "No options found." }) : q.map((f) => {
3477
- const w = m(f), c = g(f), h = A.some(($) => m($) === w), x = y !== -1 && A.length >= y && !h;
3481
+ const w = m(f), c = g(f), h = A.some((F) => m(F) === w), x = y !== -1 && A.length >= y && !h;
3478
3482
  return /* @__PURE__ */ e(
3479
3483
  Z.Option,
3480
3484
  {
3481
3485
  value: f,
3482
3486
  disabled: x,
3483
- className: ({ active: $ }) => Be(
3484
- x ? " text-gray-400 bg-white cursor-not-allowed" : $ ? " bg-gray-200 text-gray-900" : " text-gray-900",
3487
+ className: ({ active: F }) => Pe(
3488
+ x ? " text-gray-400 bg-white cursor-not-allowed" : F ? " bg-gray-200 text-gray-900" : " text-gray-900",
3485
3489
  " relative cursor-default select-none py-2 pl-3 pr-9"
3486
3490
  ),
3487
- children: ({ selected: $, active: R }) => /* @__PURE__ */ l(ee, { children: [
3491
+ children: ({ selected: F, active: R }) => /* @__PURE__ */ l(ee, { children: [
3488
3492
  /* @__PURE__ */ e(
3489
3493
  "span",
3490
3494
  {
3491
- className: Be(
3492
- $ ? "font-semibold" : "font-normal",
3495
+ className: Pe(
3496
+ F ? "font-semibold" : "font-normal",
3493
3497
  "block truncate"
3494
3498
  ),
3495
3499
  children: c
3496
3500
  }
3497
3501
  ),
3498
- $ && /* @__PURE__ */ e(
3502
+ F && /* @__PURE__ */ e(
3499
3503
  "span",
3500
3504
  {
3501
- className: Be(
3505
+ className: Pe(
3502
3506
  R ? " text-gray-900" : " text-gray-600",
3503
3507
  " absolute inset-y-0 right-0 flex items-center pr-4"
3504
3508
  ),
@@ -3671,7 +3675,7 @@ function Cn({
3671
3675
  dropId: N,
3672
3676
  indent: a = 24
3673
3677
  }) {
3674
- const { setNodeRef: k, isOver: m } = Vt({ id: N }), { attributes: g, listeners: T, setNodeRef: L, transform: E, isDragging: C } = Ut({ id: b }), I = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [B, A] = O(!1), [U, q] = O(t.name), G = () => {
3678
+ const { setNodeRef: k, isOver: m } = Vt({ id: N }), { attributes: g, listeners: $, setNodeRef: L, transform: E, isDragging: C } = Ut({ id: b }), I = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [P, A] = O(!1), [U, q] = O(t.name), G = () => {
3675
3679
  const p = U.trim();
3676
3680
  A(!1), p && p !== t.name ? i?.(t, p) : q(t.name);
3677
3681
  }, v = ce(() => /* @__PURE__ */ e(
@@ -3698,8 +3702,8 @@ function Cn({
3698
3702
  },
3699
3703
  children: [
3700
3704
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(wa, { size: 16 }) : /* @__PURE__ */ e(je, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3701
- /* @__PURE__ */ e($a, { size: 16, className: "tv-folder-ic" }),
3702
- /* @__PURE__ */ e("div", { className: "tv-name", ref: L, children: B ? /* @__PURE__ */ e(
3705
+ /* @__PURE__ */ e(Fa, { size: 16, className: "tv-folder-ic" }),
3706
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: L, children: P ? /* @__PURE__ */ e(
3703
3707
  "input",
3704
3708
  {
3705
3709
  className: "tv-input",
@@ -3712,7 +3716,7 @@ function Cn({
3712
3716
  autoFocus: !0
3713
3717
  }
3714
3718
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => A(!0), children: t.name }) }),
3715
- /* @__PURE__ */ e(wn, { listeners: T, attributes: g }),
3719
+ /* @__PURE__ */ e(wn, { listeners: $, attributes: g }),
3716
3720
  /* @__PURE__ */ e("div", { className: "tv-actions", children: y ? y(t, {
3717
3721
  onCreateChild: () => u?.(t),
3718
3722
  onRename: () => A(!0),
@@ -3722,8 +3726,8 @@ function Cn({
3722
3726
  }
3723
3727
  );
3724
3728
  }
3725
- const Sn = (t) => String(t.id ?? t._id), Dn = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", Tn = (t) => t.name ?? t.label ?? "", $n = (t) => Array.isArray(t) && t.some((r) => Array.isArray(r.children));
3726
- function Fn(t, { rootId: r, getId: s, getParent: o, getName: n }) {
3729
+ const Sn = (t) => String(t.id ?? t._id), Dn = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", $n = (t) => t.name ?? t.label ?? "", Fn = (t) => Array.isArray(t) && t.some((r) => Array.isArray(r.children));
3730
+ function Tn(t, { rootId: r, getId: s, getParent: o, getName: n }) {
3727
3731
  const u = /* @__PURE__ */ new Map();
3728
3732
  t.forEach((d) => {
3729
3733
  const y = s(d);
@@ -3801,7 +3805,7 @@ function ps({
3801
3805
  title: s = "Folders",
3802
3806
  getId: o = Sn,
3803
3807
  getParent: n = Dn,
3804
- getName: u = Tn,
3808
+ getName: u = $n,
3805
3809
  onSelect: i,
3806
3810
  onCreateRoot: d,
3807
3811
  onCreateChild: y,
@@ -3813,67 +3817,67 @@ function ps({
3813
3817
  // ← allow root moves by default now
3814
3818
  indentUnit: g = 24
3815
3819
  }) {
3816
- const { roots: T } = ce(() => $n(t) ? An(t, { rootId: r, getId: o, getName: u }) : Fn(
3820
+ const { roots: $ } = ce(() => Fn(t) ? An(t, { rootId: r, getId: o, getName: u }) : Tn(
3817
3821
  t.map((x) => ({ ...x })),
3818
3822
  { rootId: r, getId: o, getParent: n, getName: u }
3819
3823
  ), [t, r, o, n, u]), [L, E] = O({}), C = K((x) => {
3820
- const $ = {};
3824
+ const F = {};
3821
3825
  return (function R(j) {
3822
3826
  j.forEach((S) => {
3823
- $[S.id] = !0, S.children?.length && R(S.children);
3827
+ F[S.id] = !0, S.children?.length && R(S.children);
3824
3828
  });
3825
- })(x), $;
3829
+ })(x), F;
3826
3830
  }, []);
3827
3831
  ae.useEffect(() => {
3828
- E(C(T));
3829
- }, [T, C]);
3832
+ E(C($));
3833
+ }, [$, C]);
3830
3834
  const I = K(
3831
- (x) => E(($) => ({ ...$, [x]: !$[x] })),
3835
+ (x) => E((F) => ({ ...F, [x]: !F[x] })),
3832
3836
  []
3833
- ), [B, A] = O(() => Ae(T));
3834
- ae.useEffect(() => A(Ae(T)), [T]);
3837
+ ), [P, A] = O(() => Ae($));
3838
+ ae.useEffect(() => A(Ae($)), [$]);
3835
3839
  const U = qt(
3836
3840
  jt(Yt, { activationConstraint: { delay: 250, tolerance: 5 } })
3837
3841
  ), q = ue(null), [G, v] = O(null), p = ue(0), f = () => {
3838
3842
  }, w = ({ delta: x }) => {
3839
3843
  p.current = x?.x ?? 0;
3840
3844
  }, c = K(
3841
- ({ active: x, over: $ }) => {
3845
+ ({ active: x, over: F }) => {
3842
3846
  const R = p.current;
3843
- if (p.current = 0, v(null), !x || !$) return;
3844
- const j = String(x.id).replace(/^drag-/, ""), S = String($.id).replace(/^drop-/, "");
3847
+ if (p.current = 0, v(null), !x || !F) return;
3848
+ const j = String(x.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
3845
3849
  if (!j || !S || j === S) return;
3846
- let F = S;
3850
+ let T = S;
3847
3851
  const M = Math.max(0, Math.floor(-R / g));
3848
3852
  if (M > 0) {
3849
3853
  let ie = S;
3850
3854
  for (let xe = 0; xe < M; xe++) {
3851
- const P = Ka(B, ie, null);
3852
- if (!P) break;
3853
- if (!P.parentId) {
3854
- F = r;
3855
+ const B = Ka(P, ie, null);
3856
+ if (!B) break;
3857
+ if (!B.parentId) {
3858
+ T = r;
3855
3859
  break;
3856
3860
  }
3857
- F = P.parentId, ie = P.parentId;
3861
+ T = B.parentId, ie = B.parentId;
3858
3862
  }
3859
3863
  }
3860
- if (m && F === r) {
3861
- A(Ae(T));
3864
+ if (m && T === r) {
3865
+ A(Ae($));
3862
3866
  return;
3863
3867
  }
3864
- const D = Ae(B), { newRoots: z, removed: V } = En(D, j);
3868
+ const D = Ae(P), { newRoots: z, removed: V } = En(D, j);
3865
3869
  if (!V) return;
3866
- const Ne = Rn(z, F, V);
3867
- A(Ne), a?.({ sourceId: j, destParentId: F, newTree: Ne });
3870
+ const Ne = Rn(z, T, V);
3871
+ A(Ne), a?.({ sourceId: j, destParentId: T, newTree: Ne });
3868
3872
  },
3869
- [B, T, r, m, g, a]
3873
+ [P, $, r, m, g, a]
3870
3874
  ), h = K(
3871
- (x, $ = 0) => x.map((R) => /* @__PURE__ */ l(ae.Fragment, { children: [
3875
+ (x, F = 0) => x.map((R) => /* @__PURE__ */ l(ae.Fragment, { children: [
3872
3876
  /* @__PURE__ */ e(
3873
3877
  Cn,
3874
3878
  {
3875
3879
  node: R,
3876
- depth: $,
3880
+ depth: F,
3877
3881
  expanded: !!L[R.id],
3878
3882
  onToggle: () => I(R.id),
3879
3883
  onSelect: i,
@@ -3886,29 +3890,29 @@ function ps({
3886
3890
  indent: g
3887
3891
  }
3888
3892
  ),
3889
- L[R.id] && R.children?.length > 0 ? h(R.children, $ + 1) : null
3893
+ L[R.id] && R.children?.length > 0 ? h(R.children, F + 1) : null
3890
3894
  ] }, R.id)),
3891
3895
  [L, g, y, N, b, i, k, I]
3892
3896
  );
3893
3897
  return ae.useMemo(() => {
3894
3898
  if (!G) return null;
3895
3899
  const x = String(G).replace(/^drag-/, "");
3896
- function $(R) {
3900
+ function F(R) {
3897
3901
  for (const j of R) {
3898
3902
  if (j.id === x) return j;
3899
- const S = j.children?.length ? $(j.children) : null;
3903
+ const S = j.children?.length ? F(j.children) : null;
3900
3904
  if (S) return S;
3901
3905
  }
3902
3906
  return null;
3903
3907
  }
3904
- return $(B);
3905
- }, [G, B]), /* @__PURE__ */ l("div", { className: "tv", children: [
3908
+ return F(P);
3909
+ }, [G, P]), /* @__PURE__ */ l("div", { className: "tv", children: [
3906
3910
  s !== !1 && /* @__PURE__ */ l("div", { className: "tv-header", children: [
3907
3911
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
3908
3912
  /* @__PURE__ */ e("button", { className: "tv-btn", onClick: d, children: "+ New folder" })
3909
3913
  ] }),
3910
3914
  /* @__PURE__ */ l("div", { className: "tv-root-row", children: [
3911
- /* @__PURE__ */ e($a, { size: 16, className: "tv-folder-ic" }),
3915
+ /* @__PURE__ */ e(Fa, { size: 16, className: "tv-folder-ic" }),
3912
3916
  /* @__PURE__ */ e("strong", { children: "ROOT" }),
3913
3917
  /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: d, children: "+" })
3914
3918
  ] }),
@@ -3921,7 +3925,7 @@ function ps({
3921
3925
  onDragMove: w,
3922
3926
  onDragEnd: c,
3923
3927
  modifiers: [_t],
3924
- children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: h(B, 0) })
3928
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: h(P, 0) })
3925
3929
  }
3926
3930
  )
3927
3931
  ] });
@@ -3974,24 +3978,24 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
3974
3978
  }, [n.key, i, s]);
3975
3979
  const N = (a) => {
3976
3980
  if (!a.dependsOn) return !0;
3977
- const { field: k, value: m, operator: g = "equals" } = a.dependsOn, T = i[k];
3981
+ const { field: k, value: m, operator: g = "equals" } = a.dependsOn, $ = i[k];
3978
3982
  switch (g) {
3979
3983
  case "equals":
3980
- return T === m;
3984
+ return $ === m;
3981
3985
  case "notEquals":
3982
- return T !== m;
3986
+ return $ !== m;
3983
3987
  case "contains":
3984
- return Array.isArray(T) && T.includes(m);
3988
+ return Array.isArray($) && $.includes(m);
3985
3989
  case "notContains":
3986
- return !Array.isArray(T) || !T.includes(m);
3990
+ return !Array.isArray($) || !$.includes(m);
3987
3991
  case "greaterThan":
3988
- return Number(T) > Number(m);
3992
+ return Number($) > Number(m);
3989
3993
  case "lessThan":
3990
- return Number(T) < Number(m);
3994
+ return Number($) < Number(m);
3991
3995
  case "isEmpty":
3992
- return !T || Array.isArray(T) && T.length === 0;
3996
+ return !$ || Array.isArray($) && $.length === 0;
3993
3997
  case "isNotEmpty":
3994
- return T && (!Array.isArray(T) || T.length > 0);
3998
+ return $ && (!Array.isArray($) || $.length > 0);
3995
3999
  default:
3996
4000
  return !0;
3997
4001
  }
@@ -4087,7 +4091,7 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4087
4091
  ] }),
4088
4092
  a.fieldtype === "checkbox" && /* @__PURE__ */ l("div", { children: [
4089
4093
  /* @__PURE__ */ e(
4090
- Ba,
4094
+ Pa,
4091
4095
  {
4092
4096
  name: a.key,
4093
4097
  checked: !!(i[a.key] || a.default),
@@ -4272,8 +4276,8 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4272
4276
  value: m.value,
4273
4277
  checked: i[a.key] === m.value,
4274
4278
  onChange: (g) => {
4275
- const T = { ...i, [a.key]: g.target.value };
4276
- d(T), s && s(n.key, T);
4279
+ const $ = { ...i, [a.key]: g.target.value };
4280
+ d($), s && s(n.key, $);
4277
4281
  },
4278
4282
  disabled: a.disabled
4279
4283
  }
@@ -4390,8 +4394,8 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4390
4394
  type: "file",
4391
4395
  name: a.key,
4392
4396
  onChange: (m) => {
4393
- const g = m.target.files[0], T = { ...i, [a.key]: g ? g.name : "" };
4394
- d(T), s && s(n.key, T);
4397
+ const g = m.target.files[0], $ = { ...i, [a.key]: g ? g.name : "" };
4398
+ d($), s && s(n.key, $);
4395
4399
  },
4396
4400
  accept: a.accept,
4397
4401
  className: `w-full ${o[n.key]?.[a.key] ? "border-red-500" : ""}`
@@ -4434,7 +4438,7 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4434
4438
  ] }) });
4435
4439
  }
4436
4440
  const zn = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4437
- function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4441
+ function Pn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4438
4442
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4439
4443
  const [n, u] = O(t), [i, d] = O(null), [y, b] = O(null);
4440
4444
  console.log(`[DataTableRenderer] ${n.key} - Received props:`, { item: t, initialData: r });
@@ -4457,11 +4461,11 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4457
4461
  }, [n.key, N, s]), X(() => () => {
4458
4462
  g.current && clearTimeout(g.current);
4459
4463
  }, []);
4460
- const T = (v) => {
4464
+ const $ = (v) => {
4461
4465
  const p = (c, h) => {
4462
4466
  console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: c, value: h, type: typeof h }), a((x) => {
4463
- const $ = [...x];
4464
- return $[c][v.key] = h, $;
4467
+ const F = [...x];
4468
+ return F[c][v.key] = h, F;
4465
4469
  });
4466
4470
  }, f = (c) => o[n.key]?.[c]?.[v.key], w = (c) => {
4467
4471
  const h = f(c);
@@ -4577,12 +4581,12 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4577
4581
  return (c, h) => {
4578
4582
  const x = () => {
4579
4583
  if (v.optionsFrom && r) {
4580
- const { config: $, valueField: R, labelField: j } = v.optionsFrom, S = r[$] || [];
4584
+ const { config: F, valueField: R, labelField: j } = v.optionsFrom, S = r[F] || [];
4581
4585
  if (Array.isArray(S))
4582
- return S.map((F) => ({
4583
- id: F[R] || "",
4584
- value: F[R] || "",
4585
- label: F[j] || ""
4586
+ return S.map((T) => ({
4587
+ id: T[R] || "",
4588
+ value: T[R] || "",
4589
+ label: T[j] || ""
4586
4590
  }));
4587
4591
  }
4588
4592
  return v.options || [];
@@ -4593,7 +4597,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4593
4597
  {
4594
4598
  index: h,
4595
4599
  value: c[v.key] || "",
4596
- onChange: ($) => p(h, $),
4600
+ onChange: (F) => p(h, F),
4597
4601
  options: x(),
4598
4602
  placeholder: v.placeholder || `Select ${v.label}`,
4599
4603
  required: v.required,
@@ -4611,7 +4615,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4611
4615
  Ye,
4612
4616
  {
4613
4617
  selectedItems: x,
4614
- onSelectionChange: ($) => p(h, $),
4618
+ onSelectionChange: (F) => p(h, F),
4615
4619
  options: v.options || [],
4616
4620
  placeholder: v.placeholder || `Select ${v.label}`,
4617
4621
  className: "w-full"
@@ -4621,7 +4625,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4621
4625
  case "checkbox":
4622
4626
  case "boolean":
4623
4627
  return (c, h) => /* @__PURE__ */ e(
4624
- Ba,
4628
+ Pa,
4625
4629
  {
4626
4630
  checked: !!c[v.key],
4627
4631
  onChange: (x) => p(h, x),
@@ -4696,13 +4700,13 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4696
4700
  );
4697
4701
  case "audience":
4698
4702
  return (c, h) => {
4699
- const x = c[v.key] || { users: [], groups: [], roles: [] }, $ = [
4703
+ const x = c[v.key] || { users: [], groups: [], roles: [] }, F = [
4700
4704
  ...x.users || [],
4701
4705
  ...x.groups || [],
4702
4706
  ...x.roles || []
4703
4707
  ];
4704
4708
  return /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
4705
- /* @__PURE__ */ e(zn, { children: $.length > 0 ? $.slice(0, 3).map((R, j) => /* @__PURE__ */ e(
4709
+ /* @__PURE__ */ e(zn, { children: F.length > 0 ? F.slice(0, 3).map((R, j) => /* @__PURE__ */ e(
4706
4710
  za,
4707
4711
  {
4708
4712
  size: "small",
@@ -4718,7 +4722,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4718
4722
  onClick: () => {
4719
4723
  b(v.key), d(h);
4720
4724
  },
4721
- children: $.length > 0 ? "Edit" : "Assign"
4725
+ children: F.length > 0 ? "Edit" : "Assign"
4722
4726
  }
4723
4727
  )
4724
4728
  ] });
@@ -4755,8 +4759,8 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4755
4759
  {
4756
4760
  type: "file",
4757
4761
  onChange: (x) => {
4758
- const $ = x.target.files[0];
4759
- p(h, $ ? $.name : "");
4762
+ const F = x.target.files[0];
4763
+ p(h, F ? F.name : "");
4760
4764
  },
4761
4765
  accept: v.accept,
4762
4766
  className: "w-full"
@@ -4807,7 +4811,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4807
4811
  const f = [...p];
4808
4812
  return f.splice(v, 1), f;
4809
4813
  });
4810
- }, []), [C, I] = O(null), B = K((v, p) => {
4814
+ }, []), [C, I] = O(null), P = K((v, p) => {
4811
4815
  I(p), v.dataTransfer.effectAllowed = "move", v.dataTransfer.setData("text/html", "");
4812
4816
  }, []), A = K((v) => {
4813
4817
  v.preventDefault(), v.dataTransfer.dropEffect = "move";
@@ -4822,7 +4826,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4822
4826
  console.log("[DataTableRenderer] handleAddAudience called with:", v), a((p) => {
4823
4827
  const f = [...p];
4824
4828
  if (i !== null && y && f[i]) {
4825
- const w = v.pendingInvites || [], c = w.filter(($) => $.type === "User"), h = w.filter(($) => $.type === "Group"), x = w.filter(($) => $.type === "Role");
4829
+ const w = v.pendingInvites || [], c = w.filter((F) => F.type === "User"), h = w.filter((F) => F.type === "Group"), x = w.filter((F) => F.type === "Role");
4826
4830
  f[i][y] = {
4827
4831
  users: [...f[i][y]?.users || [], ...c],
4828
4832
  groups: [...f[i][y]?.groups || [], ...h],
@@ -4865,13 +4869,13 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4865
4869
  {
4866
4870
  className: `hover:bg-gray-50 ${C === p ? "opacity-50" : ""}`,
4867
4871
  draggable: !0,
4868
- onDragStart: (f) => B(f, p),
4872
+ onDragStart: (f) => P(f, p),
4869
4873
  onDragOver: A,
4870
4874
  onDrop: (f) => U(f, p),
4871
4875
  onDragEnd: q,
4872
4876
  children: [
4873
4877
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(sa, { size: 16 }) }) }),
4874
- n.fields.map((f, w) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: T(f)(v, p) }, w)),
4878
+ n.fields.map((f, w) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(f)(v, p) }, w)),
4875
4879
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
4876
4880
  "button",
4877
4881
  {
@@ -4907,7 +4911,7 @@ function Bn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4907
4911
  })()
4908
4912
  ] });
4909
4913
  }
4910
- const Fe = {
4914
+ const Te = {
4911
4915
  containerId: "ui-toast",
4912
4916
  position: "bottom-right",
4913
4917
  autoClose: 3500,
@@ -4921,12 +4925,12 @@ const fa = () => {
4921
4925
  }, ba = () => {
4922
4926
  typeof document > "u" || (Me = Math.max(0, Me - 1), Me === 0 && document.body.classList.remove("toast-backdrop"));
4923
4927
  }, ke = {
4924
- success: (t, r) => le.success(t, { ...Fe, ...r }),
4925
- info: (t, r) => le.info(t, { ...Fe, ...r }),
4926
- warn: (t, r) => le.warn(t, { ...Fe, ...r }),
4928
+ success: (t, r) => le.success(t, { ...Te, ...r }),
4929
+ info: (t, r) => le.info(t, { ...Te, ...r }),
4930
+ warn: (t, r) => le.warn(t, { ...Te, ...r }),
4927
4931
  // Error: no autoClose + modal-like behavior via backdrop
4928
4932
  error: (t, r) => le.error(t, {
4929
- ...Fe,
4933
+ ...Te,
4930
4934
  autoClose: !1,
4931
4935
  closeOnClick: !1,
4932
4936
  draggable: !1,
@@ -4949,21 +4953,21 @@ const fa = () => {
4949
4953
  onClose: ba
4950
4954
  }
4951
4955
  },
4952
- { ...Fe, ...s }
4956
+ { ...Te, ...s }
4953
4957
  )
4954
- }, Pe = (t) => {
4958
+ }, Be = (t) => {
4955
4959
  try {
4956
4960
  return `${We()}${Ya()}${t}`;
4957
4961
  } catch {
4958
4962
  return t;
4959
4963
  }
4960
- }, Pn = {
4961
- collectionList: Pe("/unifyedxmanagedquicklinks/config/collection/list"),
4962
- collectionCreate: Pe("/unifyedxmanagedquicklinks/config/collection/create"),
4963
- collectionUpdate: Pe("/unifyedxmanagedquicklinks/config/collection"),
4964
- updateCollection: Pe("/unifyedxmanagedquicklinks/config/collection/updateOrder")
4964
+ }, Bn = {
4965
+ collectionList: Be("/unifyedxmanagedquicklinks/config/collection/list"),
4966
+ collectionCreate: Be("/unifyedxmanagedquicklinks/config/collection/create"),
4967
+ collectionUpdate: Be("/unifyedxmanagedquicklinks/config/collection"),
4968
+ updateCollection: Be("/unifyedxmanagedquicklinks/config/collection/updateOrder")
4965
4969
  }, et = ({
4966
- endpoints: t = Pn,
4970
+ endpoints: t = Bn,
4967
4971
  className: r = "",
4968
4972
  onCollectionChange: s,
4969
4973
  showSearch: o = !0,
@@ -4974,15 +4978,15 @@ const fa = () => {
4974
4978
  initialData: y = null
4975
4979
  // Add prop for initial demo data
4976
4980
  }) => {
4977
- const [b, N] = O(null), [a, k] = O(""), [m, g] = O(() => Array.isArray(y) ? y : []), [T, L] = O(null), [E, C] = O(null), [I, B] = O(""), A = async () => {
4981
+ const [b, N] = O(null), [a, k] = O(""), [m, g] = O(() => Array.isArray(y) ? y : []), [$, L] = O(null), [E, C] = O(null), [I, P] = O(""), A = async () => {
4978
4982
  try {
4979
4983
  const S = await Ee(t.collectionList);
4980
4984
  if (S) {
4981
- const F = S.map((M, D) => ({
4985
+ const T = S.map((M, D) => ({
4982
4986
  ...M,
4983
4987
  order: typeof M.order == "number" ? M.order : D + 1
4984
4988
  }));
4985
- F.sort((M, D) => (M.order ?? 0) - (D.order ?? 0)), g(F), s?.(F);
4989
+ T.sort((M, D) => (M.order ?? 0) - (D.order ?? 0)), g(T), s?.(T);
4986
4990
  }
4987
4991
  } catch (S) {
4988
4992
  console.log("Error loading collections:", S), typeof window < "u" && !window.location.pathname.includes("iframe.html") && le.error("Failed to load collections");
@@ -4998,19 +5002,19 @@ const fa = () => {
4998
5002
  }, q = () => {
4999
5003
  if (!n || b !== null) return;
5000
5004
  const S = `temp-${Date.now()}`;
5001
- g((F) => [
5002
- ...F,
5005
+ g((T) => [
5006
+ ...T,
5003
5007
  {
5004
5008
  id: S,
5005
5009
  categoryName: "",
5006
5010
  links: [],
5007
- order: (F.at(-1)?.order ?? 0) + 1,
5011
+ order: (T.at(-1)?.order ?? 0) + 1,
5008
5012
  _temp: !0
5009
5013
  }
5010
5014
  ]), N(S), k("");
5011
5015
  }, G = () => {
5012
5016
  b != null && (g((S) => {
5013
- const F = S.find((D) => D.id === b), M = F && F._temp ? S.filter((D) => D.id !== b) : S;
5017
+ const T = S.find((D) => D.id === b), M = T && T._temp ? S.filter((D) => D.id !== b) : S;
5014
5018
  return s?.(M), M;
5015
5019
  }), N(null), k(""));
5016
5020
  }, v = async () => {
@@ -5018,64 +5022,64 @@ const fa = () => {
5018
5022
  const S = typeof b == "string" && b.startsWith("temp-");
5019
5023
  try {
5020
5024
  if (S) {
5021
- const F = await Re(t.collectionCreate, {
5025
+ const T = await Re(t.collectionCreate, {
5022
5026
  categoryName: a.trim(),
5023
5027
  order: (Array.isArray(m) && m.length > 0 ? m.at(-1)?.order ?? 0 : 0) + 1
5024
5028
  });
5025
- F && (g((M) => {
5026
- const D = M.map((z) => z.id === b ? F : z);
5029
+ T && (g((M) => {
5030
+ const D = M.map((z) => z.id === b ? T : z);
5027
5031
  return s?.(D), D;
5028
5032
  }), ke.success("Collection created successfully"));
5029
5033
  } else {
5030
- const F = await mn(
5034
+ const T = await mn(
5031
5035
  `${t.collectionUpdate}/${b}?newName=${a.trim()}`
5032
5036
  );
5033
5037
  g((M) => {
5034
5038
  const D = M.map(
5035
- (z) => z.id === b ? F && F.id ? { ...z, ...F } : { ...z, categoryName: a.trim() } : z
5039
+ (z) => z.id === b ? T && T.id ? { ...z, ...T } : { ...z, categoryName: a.trim() } : z
5036
5040
  );
5037
5041
  return s?.(D), D;
5038
5042
  }), le.success("Collection updated successfully");
5039
5043
  }
5040
5044
  N(null), k("");
5041
- } catch (F) {
5042
- console.log(F), le.error("Failed to save collection");
5045
+ } catch (T) {
5046
+ console.log(T), le.error("Failed to save collection");
5043
5047
  }
5044
5048
  }, p = async (S) => {
5045
5049
  if (i)
5046
5050
  try {
5047
5051
  await un(`${t.collectionUpdate}/${S.id}`) && (le.success("Deleted successfully", { autoClose: 3e3 }), A());
5048
- } catch (F) {
5049
- console.log(F), le.error("Failed to delete collection");
5052
+ } catch (T) {
5053
+ console.log(T), le.error("Failed to delete collection");
5050
5054
  }
5051
- }, f = (S, F, M) => {
5052
- if (!d || !F || !M || F === M) return S;
5053
- const D = S.findIndex((ie) => ie.id === F), z = S.findIndex((ie) => ie.id === M);
5055
+ }, f = (S, T, M) => {
5056
+ if (!d || !T || !M || T === M) return S;
5057
+ const D = S.findIndex((ie) => ie.id === T), z = S.findIndex((ie) => ie.id === M);
5054
5058
  if (D === -1 || z === -1) return S;
5055
5059
  const V = [...S], [Ne] = V.splice(D, 1);
5056
5060
  return V.splice(z, 0, Ne), V.map((ie, xe) => ({ ...ie, order: xe + 1 }));
5057
5061
  }, w = async (S) => {
5058
- const F = S.map((M) => ({
5062
+ const T = S.map((M) => ({
5059
5063
  id: M.id,
5060
5064
  order: M.order,
5061
5065
  categoryName: M.categoryName
5062
5066
  }));
5063
5067
  try {
5064
- await Re(t.updateCollection, F);
5068
+ await Re(t.updateCollection, T);
5065
5069
  } catch (M) {
5066
5070
  console.log(M), le.error("Failed to save order", { autoClose: 2500 });
5067
5071
  }
5068
- }, c = (S, F) => {
5069
- d && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(F)), L(F));
5072
+ }, c = (S, T) => {
5073
+ d && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(T)), L(T));
5070
5074
  }, h = (S) => {
5071
- T && S !== E && C(S);
5075
+ $ && S !== E && C(S);
5072
5076
  }, x = (S) => {
5073
5077
  S.preventDefault();
5074
- }, $ = async (S, F) => {
5078
+ }, F = async (S, T) => {
5075
5079
  S.preventDefault();
5076
5080
  const M = S.dataTransfer.getData("text/plain");
5077
5081
  M && (g((D) => {
5078
- const z = f(D, M, F);
5082
+ const z = f(D, M, T);
5079
5083
  return console.log("Reordered", z), w(z), s?.(z), z;
5080
5084
  }), L(null), C(null));
5081
5085
  }, R = () => {
@@ -5089,7 +5093,7 @@ const fa = () => {
5089
5093
  he,
5090
5094
  {
5091
5095
  value: I,
5092
- onDebouncedChange: B,
5096
+ onDebouncedChange: P,
5093
5097
  placeholder: "Search Collection",
5094
5098
  customClass: "mr-4 searchmanagecollection"
5095
5099
  }
@@ -5108,13 +5112,13 @@ const fa = () => {
5108
5112
  )
5109
5113
  ] }) }),
5110
5114
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: j.map((S) => {
5111
- const F = b === S.id, M = S?.links?.length ?? 0, D = T === S.id, z = E === S.id && T !== S.id;
5115
+ const T = b === S.id, M = S?.links?.length ?? 0, D = $ === S.id, z = E === S.id && $ !== S.id;
5112
5116
  return /* @__PURE__ */ e(
5113
5117
  "div",
5114
5118
  {
5115
5119
  onDragEnter: () => h(S.id),
5116
5120
  onDragOver: x,
5117
- onDrop: (V) => $(V, S.id),
5121
+ onDrop: (V) => F(V, S.id),
5118
5122
  onDragEnd: R,
5119
5123
  className: [
5120
5124
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
@@ -5122,7 +5126,7 @@ const fa = () => {
5122
5126
  z ? "ring-2 ring-gray-800/20" : "",
5123
5127
  D ? "opacity-60" : ""
5124
5128
  ].join(" "),
5125
- children: F ? /* @__PURE__ */ l(ee, { children: [
5129
+ children: T ? /* @__PURE__ */ l(ee, { children: [
5126
5130
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
5127
5131
  "input",
5128
5132
  {
@@ -5245,7 +5249,7 @@ const fa = () => {
5245
5249
  /* @__PURE__ */ e("span", { className: "font-mono", children: String(t?.type ?? "N/A") })
5246
5250
  ] }), Ce = /* @__PURE__ */ Object.create(null);
5247
5251
  Ce.section = In;
5248
- Ce.datatable = Bn;
5252
+ Ce.datatable = Pn;
5249
5253
  Ce.managecollectionlist = at;
5250
5254
  Ce["manage-collection-list"] = at;
5251
5255
  function On(t) {
@@ -5262,36 +5266,36 @@ function Vn({
5262
5266
  onCancel: o,
5263
5267
  onSave: n
5264
5268
  }) {
5265
- const [u, i] = ae.useState(r), [d, y] = ae.useState(null), [b, N] = O(!1), [a, k] = O(!1), [m, g] = O({}), T = `${ve()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, L = T, [E, C] = O(1), I = (f) => {
5269
+ const [u, i] = ae.useState(r), [d, y] = ae.useState(null), [b, N] = O(!1), [a, k] = O(!1), [m, g] = O({}), $ = `${ve()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, L = $, [E, C] = O(1), I = (f) => {
5266
5270
  if (!r || !r.configuration)
5267
5271
  return f;
5268
5272
  const w = {}, c = f?.configuration || {};
5269
5273
  return r.configuration.forEach((h) => {
5270
5274
  if (h.key && h.type === "datatable") {
5271
- const $ = (c[h.key] || []).map((R, j) => {
5275
+ const F = (c[h.key] || []).map((R, j) => {
5272
5276
  const S = { id: R.id || 0 };
5273
- return h.fields && h.fields.forEach((F) => {
5274
- if (F.fieldtype === "audience") {
5277
+ return h.fields && h.fields.forEach((T) => {
5278
+ if (T.fieldtype === "audience") {
5275
5279
  let M = { users: [], groups: [], roles: [] };
5276
- R[F.key] && (Array.isArray(R[F.key]) ? M = { users: [], groups: [], roles: [] } : typeof R[F.key] == "object" && (M = {
5277
- users: R[F.key].users || [],
5278
- groups: R[F.key].groups || [],
5279
- roles: R[F.key].roles || []
5280
- })), S[F.key] = M;
5280
+ R[T.key] && (Array.isArray(R[T.key]) ? M = { users: [], groups: [], roles: [] } : typeof R[T.key] == "object" && (M = {
5281
+ users: R[T.key].users || [],
5282
+ groups: R[T.key].groups || [],
5283
+ roles: R[T.key].roles || []
5284
+ })), S[T.key] = M;
5281
5285
  } else
5282
- S[F.key] = R[F.key] || F.default || "";
5286
+ S[T.key] = R[T.key] || T.default || "";
5283
5287
  }), S;
5284
5288
  });
5285
- if ($.length === 0) {
5289
+ if (F.length === 0) {
5286
5290
  const R = { id: 0 };
5287
5291
  h.fields && h.fields.forEach((j) => {
5288
5292
  j.fieldtype === "audience" ? R[j.key] = { users: [], groups: [], roles: [] } : R[j.key] = j.default || "";
5289
- }), $.push(R);
5293
+ }), F.push(R);
5290
5294
  }
5291
- w[h.key] = $;
5295
+ w[h.key] = F;
5292
5296
  } else h.key && (w[h.key] = c[h.key] || {});
5293
5297
  }), w;
5294
- }, B = () => {
5298
+ }, P = () => {
5295
5299
  if (r && r.configuration) {
5296
5300
  const f = {};
5297
5301
  r.configuration.forEach((w) => {
@@ -5319,12 +5323,12 @@ function Vn({
5319
5323
  const f = async () => {
5320
5324
  try {
5321
5325
  N(!0);
5322
- let w = await Ee(T);
5326
+ let w = await Ee($);
5323
5327
  if (w) {
5324
5328
  const c = I(w);
5325
5329
  y(c);
5326
5330
  } else
5327
- B();
5331
+ P();
5328
5332
  } catch (w) {
5329
5333
  console.error("Error fetching configuration:", w);
5330
5334
  let c = "Failed to load configuration";
@@ -5332,12 +5336,12 @@ function Vn({
5332
5336
  const h = w.response.status, x = w.response.data?.message || w.response.data?.error;
5333
5337
  h === 400 ? c = x || "Invalid request. Please check the application ID." : h === 401 ? c = "You are not authorized to access this configuration." : h === 403 ? c = "Access denied. You don't have permission to view this configuration." : h === 404 ? c = "Configuration not found. It may not exist yet or the application ID is incorrect." : h >= 500 ? c = x || "Server error. Please try again later." : c = x || `Failed to load configuration (Error ${h})`;
5334
5338
  } else w.request ? c = "Network error. Please check your connection and try again." : c = w.message || "An unexpected error occurred while loading configuration.";
5335
- ke.error(c), B();
5339
+ ke.error(c), P();
5336
5340
  } finally {
5337
5341
  N(!1);
5338
5342
  }
5339
5343
  };
5340
- r && (i(r), t ? f() : B());
5344
+ r && (i(r), t ? f() : P());
5341
5345
  }, [r, E, t, s]);
5342
5346
  const A = (f, w) => {
5343
5347
  y((c) => ({
@@ -5360,10 +5364,10 @@ function Vn({
5360
5364
  else if (w.type === "datatable") {
5361
5365
  const c = d[w.key];
5362
5366
  Array.isArray(c) && c.forEach((h, x) => {
5363
- w.fields.forEach(($) => {
5364
- if ($.required) {
5365
- const R = h[$.key];
5366
- (!R || typeof R == "string" && R.trim() === "") && (f[w.key] || (f[w.key] = {}), f[w.key][x] || (f[w.key][x] = {}), f[w.key][x][$.key] = `${$.label} is required`);
5367
+ w.fields.forEach((F) => {
5368
+ if (F.required) {
5369
+ const R = h[F.key];
5370
+ (!R || typeof R == "string" && R.trim() === "") && (f[w.key] || (f[w.key] = {}), f[w.key][x] || (f[w.key][x] = {}), f[w.key][x][F.key] = `${F.label} is required`);
5367
5371
  }
5368
5372
  });
5369
5373
  });
@@ -5375,8 +5379,8 @@ function Vn({
5375
5379
  let c = [];
5376
5380
  Object.keys(f).forEach((h) => {
5377
5381
  typeof f[h] == "object" && Object.keys(f[h]).forEach((x) => {
5378
- typeof f[h][x] == "object" ? Object.keys(f[h][x]).forEach(($) => {
5379
- c.push(`${h} row ${parseInt(x) + 1}: ${f[h][x][$]}`);
5382
+ typeof f[h][x] == "object" ? Object.keys(f[h][x]).forEach((F) => {
5383
+ c.push(`${h} row ${parseInt(x) + 1}: ${f[h][x][F]}`);
5380
5384
  }) : c.push(`${h}: ${f[h][x]}`);
5381
5385
  });
5382
5386
  });
@@ -5387,19 +5391,19 @@ function Vn({
5387
5391
  k(!0);
5388
5392
  const c = {};
5389
5393
  d && Object.keys(d).forEach((x) => {
5390
- const $ = r?.configuration?.find(
5394
+ const F = r?.configuration?.find(
5391
5395
  (R) => R.key === x && R.type === "datatable"
5392
5396
  );
5393
- $ && Array.isArray(d[x]) ? c[x] = d[x].map((R) => {
5397
+ F && Array.isArray(d[x]) ? c[x] = d[x].map((R) => {
5394
5398
  const j = { id: R.id || 0 };
5395
- return $.fields && $.fields.forEach((S) => {
5399
+ return F.fields && F.fields.forEach((S) => {
5396
5400
  if (S.fieldtype === "audience") {
5397
- let F = { users: [], groups: [], roles: [] };
5398
- R[S.key] && typeof R[S.key] == "object" && !Array.isArray(R[S.key]) && (F = {
5401
+ let T = { users: [], groups: [], roles: [] };
5402
+ R[S.key] && typeof R[S.key] == "object" && !Array.isArray(R[S.key]) && (T = {
5399
5403
  users: R[S.key].users || [],
5400
5404
  groups: R[S.key].groups || [],
5401
5405
  roles: R[S.key].roles || []
5402
- }), j[S.key] = F;
5406
+ }), j[S.key] = T;
5403
5407
  } else
5404
5408
  j[S.key] = R[S.key] || "";
5405
5409
  }), j;
@@ -5431,7 +5435,7 @@ function Vn({
5431
5435
  return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
5432
5436
  const p = r?.configuration || u?.configuration;
5433
5437
  return X(() => {
5434
- s && r ? (!d || Object.keys(d).length === 0) && B() : s && !r && B();
5438
+ s && r ? (!d || Object.keys(d).length === 0) && P() : s && !r && P();
5435
5439
  }, [s, r]), /* @__PURE__ */ l("div", { children: [
5436
5440
  /* @__PURE__ */ l(
5437
5441
  "div",
@@ -5503,7 +5507,7 @@ const ys = ({
5503
5507
  disabled: !0,
5504
5508
  placeholder: r
5505
5509
  }, f.some((x) => x.key === "displayname")) {
5506
- const x = f.findIndex(($) => $.key === "displayname");
5510
+ const x = f.findIndex((F) => F.key === "displayname");
5507
5511
  f[x] = {
5508
5512
  ...f[x],
5509
5513
  default: r,
@@ -5528,7 +5532,7 @@ const ys = ({
5528
5532
  };
5529
5533
  }
5530
5534
  return p;
5531
- }), T = {
5535
+ }), $ = {
5532
5536
  heading: "App Details",
5533
5537
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5534
5538
  isLeftArrow: !0,
@@ -5553,7 +5557,7 @@ const ys = ({
5553
5557
  ae.useEffect(() => {
5554
5558
  y(I());
5555
5559
  }, [g]);
5556
- const B = K((p) => {
5560
+ const P = K((p) => {
5557
5561
  console.log("Config saved with data:", p), Object.keys(p).forEach((f) => {
5558
5562
  const w = p[f];
5559
5563
  console.log(`Checking section ${f}:`, w), w && w.displayname && (console.log("Found displayname:", w.displayname), y(w.displayname));
@@ -5584,7 +5588,7 @@ const ys = ({
5584
5588
  ...k
5585
5589
  }, q = [
5586
5590
  { label: "Overview", content: v(U) },
5587
- { label: "Configuration", content: /* @__PURE__ */ e(Vn, { appid: r, configdata: { configuration: g }, disableApi: s, onCancel: E, onSave: B }) }
5591
+ { label: "Configuration", content: /* @__PURE__ */ e(Vn, { appid: r, configdata: { configuration: g }, disableApi: s, onCancel: E, onSave: P }) }
5588
5592
  ];
5589
5593
  function G(p) {
5590
5594
  return p ? p.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: p } }) : p : "📱";
@@ -5635,11 +5639,11 @@ const ys = ({
5635
5639
  /* @__PURE__ */ e(
5636
5640
  en,
5637
5641
  {
5638
- heading: T.heading,
5639
- subHeading: L.length > 0 ? void 0 : T.subHeading,
5642
+ heading: $.heading,
5643
+ subHeading: L.length > 0 ? void 0 : $.subHeading,
5640
5644
  breadcrumbItems: L,
5641
- isLeftArrow: T.isLeftArrow,
5642
- onBackClick: T.onBackClick
5645
+ isLeftArrow: $.isLeftArrow,
5646
+ onBackClick: $.onBackClick
5643
5647
  }
5644
5648
  ),
5645
5649
  /* @__PURE__ */ l("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
@@ -5728,7 +5732,7 @@ const bs = ({
5728
5732
  showExcel: k = !1,
5729
5733
  showPdf: m = !1,
5730
5734
  showRefresh: g = !1,
5731
- showAdd: T = !1,
5735
+ showAdd: $ = !1,
5732
5736
  // Additional props
5733
5737
  searchPlaceholder: L = "Search...",
5734
5738
  handleRefreshClick: E = () => {
@@ -5737,9 +5741,9 @@ const bs = ({
5737
5741
  },
5738
5742
  // Optional: override export file names
5739
5743
  excelFileName: I,
5740
- pdfFileName: B
5744
+ pdfFileName: P
5741
5745
  }) => {
5742
- const A = () => n?.current || o?.current, [U, q] = ae.useState(""), G = (t || "export").toString().trim() || "export", v = `${I || G}.xlsx`, p = `${B || G}.pdf`, f = (h, x, $) => Math.max(x, Math.min(h, $)), w = K(
5746
+ const A = () => n?.current || o?.current, [U, q] = ae.useState(""), G = (t || "export").toString().trim() || "export", v = `${I || G}.xlsx`, p = `${P || G}.pdf`, f = (h, x, F) => Math.max(x, Math.min(h, F)), w = K(
5743
5747
  (h) => {
5744
5748
  const x = A();
5745
5749
  if (console.log("openColumnChooserNear", x), !!x?.openColumnChooser) {
@@ -5748,12 +5752,12 @@ const bs = ({
5748
5752
  return;
5749
5753
  }
5750
5754
  try {
5751
- const $ = h.currentTarget.getBoundingClientRect(), R = $.left + window.scrollX, j = $.bottom + window.scrollY;
5752
- let S = R - 120, F = j - 120;
5755
+ const F = h.currentTarget.getBoundingClientRect(), R = F.left + window.scrollX, j = F.bottom + window.scrollY;
5756
+ let S = R - 120, T = j - 120;
5753
5757
  const M = window.innerWidth, D = window.innerHeight;
5754
- S = f(S, window.scrollX + 8, window.scrollX + M - 340), F = f(F, window.scrollY, window.scrollY + D - 120), console.log("openColumnChooserNear", S, F), x.openColumnChooser(S, F);
5755
- } catch ($) {
5756
- console.log("coloumn choose error", $);
5758
+ S = f(S, window.scrollX + 8, window.scrollX + M - 340), T = f(T, window.scrollY, window.scrollY + D - 120), console.log("openColumnChooserNear", S, T), x.openColumnChooser(S, T);
5759
+ } catch (F) {
5760
+ console.log("coloumn choose error", F);
5757
5761
  }
5758
5762
  }
5759
5763
  },
@@ -5761,20 +5765,20 @@ const bs = ({
5761
5765
  // no external deps; reads ref at call time
5762
5766
  ), c = K(
5763
5767
  (h, x) => {
5764
- const $ = A();
5765
- if ($)
5768
+ const F = A();
5769
+ if (F)
5766
5770
  switch (h) {
5767
5771
  case "ColumnChooser":
5768
- b && (console.log("openColumnChooser", x), x ? w(x) : $.openColumnChooser?.()), console.log("openColumnChooser out", x);
5772
+ b && (console.log("openColumnChooser", x), x ? w(x) : F.openColumnChooser?.()), console.log("openColumnChooser out", x);
5769
5773
  break;
5770
5774
  case "Print":
5771
- a && $.print?.();
5775
+ a && F.print?.();
5772
5776
  break;
5773
5777
  case "Excel":
5774
- k && $.excelExport?.({ fileName: v });
5778
+ k && F.excelExport?.({ fileName: v });
5775
5779
  break;
5776
5780
  case "Pdf":
5777
- m && $.pdfExport?.({ fileName: p });
5781
+ m && F.pdfExport?.({ fileName: p });
5778
5782
  break;
5779
5783
  case "Refresh":
5780
5784
  g && E();
@@ -5872,7 +5876,7 @@ const bs = ({
5872
5876
  }
5873
5877
  )
5874
5878
  ] }),
5875
- T && u && /* @__PURE__ */ e(
5879
+ $ && u && /* @__PURE__ */ e(
5876
5880
  H,
5877
5881
  {
5878
5882
  label: d,
@@ -5905,12 +5909,12 @@ function vs(t) {
5905
5909
  allowPdfExport: k = !1,
5906
5910
  showColumnChooser: m = !1,
5907
5911
  enableSearchApi: g = !1,
5908
- height: T = "600",
5912
+ height: $ = "600",
5909
5913
  selectionSettings: L = { type: "Multiple", mode: "Row" },
5910
5914
  enableCheckbox: E = !1,
5911
5915
  columns: C = [],
5912
5916
  onGridStateChange: I,
5913
- onRowSelected: B,
5917
+ onRowSelected: P,
5914
5918
  onRowDeselected: A,
5915
5919
  onRowDoubleClick: U,
5916
5920
  apiRef: q,
@@ -5919,32 +5923,32 @@ function vs(t) {
5919
5923
  pageSettings: p,
5920
5924
  sortSettings: f,
5921
5925
  ...w
5922
- } = G || {}, [c, h] = ae.useState(p?.page || 1), [x, $] = ae.useState(f?.pageSize || 20), [R, j] = ae.useState(f?.sortKey || "updatedDate"), [S, F] = ae.useState(f?.direction || "Descending"), M = ce(() => {
5923
- const P = [Tr];
5924
- return i && P.push($r), d && P.push(Fr), y && P.push(Ar), g && P.push(Er), a && P.push(Rr), k && P.push(Ir), m && P.push(zr), N && P.push(Br), b && P.push(Pr), P.push(Lr), P;
5926
+ } = G || {}, [c, h] = ae.useState(p?.page || 1), [x, F] = ae.useState(f?.pageSize || 20), [R, j] = ae.useState(f?.sortKey || "updatedDate"), [S, T] = ae.useState(f?.direction || "Descending"), M = ce(() => {
5927
+ const B = [$r];
5928
+ return i && B.push(Fr), d && B.push(Tr), y && B.push(Ar), g && B.push(Er), a && B.push(Rr), k && B.push(Ir), m && B.push(zr), N && B.push(Pr), b && B.push(Br), B.push(Lr), B;
5925
5929
  }, [i, d, y, g, a, k, m, N, b]), D = ce(() => {
5926
- const P = () => v.current, te = (W, pe) => {
5930
+ const B = () => v.current, te = (W, pe) => {
5927
5931
  !pe && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
5928
5932
  };
5929
5933
  return {
5930
- getInstance: () => P(),
5931
- refresh: () => P()?.refresh?.(),
5932
- getSelectedRecords: () => P()?.getSelectedRecords?.() ?? [],
5933
- clearSelection: () => P()?.clearSelection?.(),
5934
- selectRow: (W) => P()?.selectRow?.(W),
5935
- selectRows: (W) => P()?.selectRows?.(W),
5934
+ getInstance: () => B(),
5935
+ refresh: () => B()?.refresh?.(),
5936
+ getSelectedRecords: () => B()?.getSelectedRecords?.() ?? [],
5937
+ clearSelection: () => B()?.clearSelection?.(),
5938
+ selectRow: (W) => B()?.selectRow?.(W),
5939
+ selectRows: (W) => B()?.selectRows?.(W),
5936
5940
  search: (W) => {
5937
- te("search()", g), P()?.search?.(W);
5941
+ te("search()", g), B()?.search?.(W);
5938
5942
  },
5939
- print: () => P()?.print?.(),
5943
+ print: () => B()?.print?.(),
5940
5944
  excelExport: (W) => {
5941
- te("excelExport()", a), P()?.excelExport?.(W);
5945
+ te("excelExport()", a), B()?.excelExport?.(W);
5942
5946
  },
5943
5947
  pdfExport: (W) => {
5944
- te("pdfExport()", k), P()?.pdfExport?.(W);
5948
+ te("pdfExport()", k), B()?.pdfExport?.(W);
5945
5949
  },
5946
5950
  openColumnChooser: (W, pe) => {
5947
- te("openColumnChooser()", m), P()?.columnChooserModule?.openColumnChooser?.(W, pe);
5951
+ te("openColumnChooser()", m), B()?.columnChooserModule?.openColumnChooser?.(W, pe);
5948
5952
  }
5949
5953
  };
5950
5954
  }, []);
@@ -5953,40 +5957,40 @@ function vs(t) {
5953
5957
  }, [q, D]), X(() => () => {
5954
5958
  q && (q.current = null);
5955
5959
  }, []);
5956
- const z = (P) => {
5957
- const te = String(P || "");
5960
+ const z = (B) => {
5961
+ const te = String(B || "");
5958
5962
  return te === "Ascending" || te === "Descending" ? te : te.toLowerCase() === "ascending" ? "Ascending" : "Descending";
5959
- }, V = (P) => {
5960
- const te = v.current, W = P?.requestType, pe = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Te = P?.pageSize ?? te?.pageSettings?.pageSize ?? x, Ie = P?.currentPage ?? te?.pageSettings?.currentPage ?? n, Je = P?.columnName && P?.direction ? [{ field: P.columnName, dir: z(P.direction) }] : (te?.sortSettings?.columns || []).map(($e) => ({
5961
- field: $e.field,
5962
- dir: z($e.direction ?? $e.dir)
5963
- })), Qe = P?.searchString ?? "", Xe = P?.columns ?? te?.filterSettings?.columns ?? [];
5963
+ }, V = (B) => {
5964
+ const te = v.current, W = B?.requestType, pe = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", $e = B?.pageSize ?? te?.pageSettings?.pageSize ?? x, Ie = B?.currentPage ?? te?.pageSettings?.currentPage ?? n, Je = B?.columnName && B?.direction ? [{ field: B.columnName, dir: z(B.direction) }] : (te?.sortSettings?.columns || []).map((Fe) => ({
5965
+ field: Fe.field,
5966
+ dir: z(Fe.direction ?? Fe.dir)
5967
+ })), Qe = B?.searchString ?? "", Xe = B?.columns ?? te?.filterSettings?.columns ?? [];
5964
5968
  return {
5965
5969
  reason: pe,
5966
- page: { index: Ie, size: Te, skip: (Ie - 1) * Te, take: Te },
5970
+ page: { index: Ie, size: $e, skip: (Ie - 1) * $e, take: $e },
5967
5971
  sort: Je,
5968
5972
  // [{ field, dir: 'Ascending'|'Descending' }]
5969
5973
  search: Qe,
5970
5974
  filters: Xe,
5971
- rawEvent: P
5975
+ rawEvent: B
5972
5976
  };
5973
- }, Ne = (P) => {
5977
+ }, Ne = (B) => {
5974
5978
  setTimeout(() => {
5975
5979
  v?.current?.hideSpinner();
5976
- }, 1e3), P.requestType === "paging" && (h(P.currentPage), $(P.pageSize)), P.requestType === "sorting" && (j(P.columnName || "updatedDate"), F(P.direction === "Ascending" ? "ASC" : "DESC")), I && I(V(P), P);
5977
- }, ie = (P) => {
5978
- typeof U == "function" && U(P?.rowData, P);
5980
+ }, 1e3), B.requestType === "paging" && (h(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (j(B.columnName || "updatedDate"), T(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(V(B), B);
5981
+ }, ie = (B) => {
5982
+ typeof U == "function" && U(B?.rowData, B);
5979
5983
  }, xe = () => {
5980
- const P = [];
5981
- return E && P.push(/* @__PURE__ */ e(ia, { type: "checkbox", width: "50" }, "__checkbox__")), C.forEach((te, W) => {
5984
+ const B = [];
5985
+ return E && B.push(/* @__PURE__ */ e(ia, { type: "checkbox", width: "50" }, "__checkbox__")), C.forEach((te, W) => {
5982
5986
  const {
5983
5987
  field: pe,
5984
- headerText: Te,
5988
+ headerText: $e,
5985
5989
  width: Ie,
5986
5990
  textAlign: Je = "Left",
5987
5991
  template: Qe,
5988
5992
  isPrimaryKey: Xe,
5989
- showInColumnChooser: $e = !0,
5993
+ showInColumnChooser: Fe = !0,
5990
5994
  allowFiltering: tt = !0,
5991
5995
  allowSorting: rt = !0,
5992
5996
  type: nt,
@@ -5997,17 +6001,17 @@ function vs(t) {
5997
6001
  customAttributes: ct,
5998
6002
  ...dt
5999
6003
  } = te || {};
6000
- P.push(
6004
+ B.push(
6001
6005
  /* @__PURE__ */ e(
6002
6006
  ia,
6003
6007
  {
6004
6008
  field: pe,
6005
- headerText: Te,
6009
+ headerText: $e,
6006
6010
  width: Ie,
6007
6011
  textAlign: Je,
6008
6012
  template: Qe,
6009
6013
  isPrimaryKey: Xe,
6010
- showInColumnChooser: $e,
6014
+ showInColumnChooser: Fe,
6011
6015
  allowFiltering: tt,
6012
6016
  allowSorting: rt,
6013
6017
  type: nt,
@@ -6021,7 +6025,7 @@ function vs(t) {
6021
6025
  pe || `col-${W}`
6022
6026
  )
6023
6027
  );
6024
- }), P;
6028
+ }), B;
6025
6029
  };
6026
6030
  return /* @__PURE__ */ l(
6027
6031
  Or,
@@ -6032,7 +6036,7 @@ function vs(t) {
6032
6036
  result: r,
6033
6037
  count: s
6034
6038
  },
6035
- height: T,
6039
+ height: $,
6036
6040
  allowPaging: u,
6037
6041
  allowSorting: i,
6038
6042
  allowFiltering: d,
@@ -6047,7 +6051,7 @@ function vs(t) {
6047
6051
  allowUnsort: !1
6048
6052
  },
6049
6053
  actionBegin: Ne,
6050
- rowSelected: B,
6054
+ rowSelected: P,
6051
6055
  rowDeselected: A,
6052
6056
  recordDoubleClick: ie,
6053
6057
  ...w,
@@ -6065,7 +6069,7 @@ export {
6065
6069
  Kn as Badge,
6066
6070
  Yr as Breadcrumbs,
6067
6071
  Gr as Button,
6068
- Ba as Checkbox,
6072
+ Pa as Checkbox,
6069
6073
  vs as CustomDataGrid,
6070
6074
  hs as CustomDialog,
6071
6075
  bs as CustomGridToolbar,