@archbase/admin 4.0.4 → 4.0.18

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.
Binary file
package/dist/index.js CHANGED
@@ -31,15 +31,15 @@ const Je = me.createContext({}), ko = ({
31
31
  onNavigationDataChange: c,
32
32
  initialSidebarCollapsed: i
33
33
  }) => {
34
- const [u, d] = fe(i), [h, p] = fe(!1), [b, y] = fe(() => a === !0), [z, S] = fe(null), g = he(!1), [T, w] = eA({
34
+ const [u, d] = fe(i), [h, p] = fe(!1), [b, y] = fe(() => a === !0), [z, w] = fe(null), g = he(!1), [R, x] = eA({
35
35
  value: c !== void 0 ? A : void 0,
36
36
  defaultValue: a ? [] : A,
37
37
  finalValue: [],
38
38
  onChange: c
39
39
  });
40
40
  se(() => {
41
- }, [T, a]);
42
- const { securityManager: R } = hr({
41
+ }, [R, a]);
42
+ const { securityManager: T } = hr({
43
43
  resourceName: s?.navigationResourceName ? s.navigationResourceName : "ArchbaseAdvancedSidebar",
44
44
  resourceDescription: s?.navigationResourceDescription ? s.navigationResourceDescription : "archbase:Navegação",
45
45
  enableSecurity: a
@@ -54,55 +54,55 @@ const Je = me.createContext({}), ko = ({
54
54
  if (g.current)
55
55
  return;
56
56
  A.filter((D) => D.showInSidebar).forEach((D) => {
57
- R.registerAction(D.label, D.label), D?.links?.forEach((E) => R.registerAction(`${D.label} -> ${E.label}`, `${D.label} -> ${E.label}`));
57
+ T.registerAction(D.label, D.label), D?.links?.forEach((E) => T.registerAction(`${D.label} -> ${E.label}`, `${D.label} -> ${E.label}`));
58
58
  });
59
59
  const Q = () => {
60
60
  g.current = !0;
61
61
  const D = A.map((E) => ({
62
62
  ...E,
63
- disabled: !R.hasPermission(E.label),
63
+ disabled: !T.hasPermission(E.label),
64
64
  links: E.links && E.links.map((C) => {
65
- const L = R.hasPermission(`${E.label} -> ${C.label}`);
65
+ const L = T.hasPermission(`${E.label} -> ${C.label}`);
66
66
  return {
67
67
  ...C,
68
68
  disabled: !L
69
69
  };
70
70
  })
71
71
  }));
72
- w(D), y(!1), S(null);
73
- }, q = !R.isLoading() && !R.isError();
74
- if (R.isError()) {
72
+ x(D), y(!1), w(null);
73
+ }, q = !T.isLoading() && !T.isError();
74
+ if (T.isError()) {
75
75
  g.current = !0;
76
- const D = R.getError() || "Erro ao carregar permissões de navegação";
77
- S(D), y(!1), w(A);
76
+ const D = T.getError() || "Erro ao carregar permissões de navegação";
77
+ w(D), y(!1), x(A);
78
78
  return;
79
79
  }
80
80
  if (q) {
81
81
  Q();
82
82
  return;
83
83
  }
84
- y(!0), S(null);
84
+ y(!0), w(null);
85
85
  let m = !1;
86
- const x = setInterval(() => {
87
- if (!m && R.isError()) {
88
- clearInterval(x), g.current = !0;
89
- const D = R.getError() || "Erro ao carregar permissões de navegação";
90
- S(D), y(!1), w(A);
86
+ const S = setInterval(() => {
87
+ if (!m && T.isError()) {
88
+ clearInterval(S), g.current = !0;
89
+ const D = T.getError() || "Erro ao carregar permissões de navegação";
90
+ w(D), y(!1), x(A);
91
91
  }
92
92
  }, 100), P = setTimeout(() => {
93
- m || (clearInterval(x), y((D) => D && (g.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), w(A), !1)));
93
+ m || (clearInterval(S), y((D) => D && (g.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), x(A), !1)));
94
94
  }, 3e3);
95
- return R.apply(() => {
96
- m || (clearInterval(x), clearTimeout(P), Q());
95
+ return T.apply(() => {
96
+ m || (clearInterval(S), clearTimeout(P), Q());
97
97
  }), () => {
98
- m = !0, clearInterval(x), clearTimeout(P);
98
+ m = !0, clearInterval(S), clearTimeout(P);
99
99
  };
100
- }, [r?.id, a, A, R, w]), /* @__PURE__ */ e(
100
+ }, [r?.id, a, A, T, x]), /* @__PURE__ */ e(
101
101
  Je.Provider,
102
102
  {
103
103
  value: {
104
- navigationData: T,
105
- setNavigationData: w,
104
+ navigationData: R,
105
+ setNavigationData: x,
106
106
  user: r,
107
107
  owner: t,
108
108
  company: o,
@@ -328,21 +328,21 @@ const Ro = ({ navigationData: A, color: r }) => {
328
328
  navigationData: b = [],
329
329
  logo: y,
330
330
  headerActions: z,
331
- styleLogo: S,
331
+ styleLogo: w,
332
332
  showLanguageSelector: g = !1,
333
- sideBarHiddenBreakPoint: T,
334
- headerLeftContent: w,
335
- toggleColorScheme: R,
333
+ sideBarHiddenBreakPoint: R,
334
+ headerLeftContent: x,
335
+ toggleColorScheme: T,
336
336
  logoLeftSection: Y,
337
337
  logoRightSection: Q,
338
338
  showBurger: q = !0,
339
339
  showCommands: $ = !0,
340
340
  sunColor: m,
341
- moonColor: x,
341
+ moonColor: S,
342
342
  styles: P
343
343
  }) => {
344
344
  const D = pe(), { colorScheme: E, toggleColorScheme: C } = te(), L = ye(Je), j = CA(
345
- `(max-width: ${T ? ae(T) : D.breakpoints.md})`
345
+ `(max-width: ${R ? ae(R) : D.breakpoints.md})`
346
346
  ), U = CA(
347
347
  `(max-width: ${d ? ae(d) : D.breakpoints.md})`
348
348
  );
@@ -355,7 +355,7 @@ const Ro = ({ navigationData: A, color: r }) => {
355
355
  {
356
356
  style: {
357
357
  height: 50,
358
- ...S
358
+ ...w
359
359
  },
360
360
  alt: "logo",
361
361
  src: y
@@ -375,10 +375,10 @@ const Ro = ({ navigationData: A, color: r }) => {
375
375
  }
376
376
  ),
377
377
  /* @__PURE__ */ e("div", { children: $ && /* @__PURE__ */ e(Ro, { navigationData: b }) }),
378
- /* @__PURE__ */ e(G, { style: { flex: 1 }, children: w }),
378
+ /* @__PURE__ */ e(G, { style: { flex: 1 }, children: x }),
379
379
  /* @__PURE__ */ I(Eo, { children: [
380
380
  i && z,
381
- u && /* @__PURE__ */ e(So, { toggleColorScheme: R, sunColor: m, moonColor: x }),
381
+ u && /* @__PURE__ */ e(So, { toggleColorScheme: T, sunColor: m, moonColor: S }),
382
382
  W && /* @__PURE__ */ e(wo, {}),
383
383
  /* @__PURE__ */ I(oe, { shadow: "md", width: 200, position: "bottom-end", styles: P?.menu, children: [
384
384
  /* @__PURE__ */ e(oe.Target, { children: /* @__PURE__ */ I("div", { children: [
@@ -421,7 +421,7 @@ const Ro = ({ navigationData: A, color: r }) => {
421
421
  oe.Item,
422
422
  {
423
423
  leftSection: E === "dark" ? /* @__PURE__ */ e(QA, { size: o }) : /* @__PURE__ */ e(KA, { size: o }),
424
- onClick: R || C,
424
+ onClick: T || C,
425
425
  children: `${re().t("archbase:toggleColorScheme")}`
426
426
  }
427
427
  ),
@@ -796,17 +796,17 @@ function Oo({
796
796
  onMenuItemClick: b,
797
797
  onClickActionIcon: y,
798
798
  withBorder: z = !1,
799
- showGroupLabels: S = !0,
799
+ showGroupLabels: w = !0,
800
800
  theme: g,
801
- sidebarRef: T,
802
- defaultGroupIcon: w,
803
- selectedGroupName: R,
801
+ sidebarRef: R,
802
+ defaultGroupIcon: x,
803
+ selectedGroupName: T,
804
804
  sideBarHeaderContent: Y,
805
805
  iconsWithBackground: Q = !1,
806
806
  menuItemHeight: q = 40,
807
807
  highlightActiveMenuItem: $ = !0,
808
808
  backgroundDarkColor: m,
809
- backgroundLightColor: x,
809
+ backgroundLightColor: S,
810
810
  textDarkColor: P,
811
811
  textLightColor: D,
812
812
  iconDarkColor: E,
@@ -819,13 +819,13 @@ function Oo({
819
819
  skeletonItemCount: de = 8,
820
820
  skeletonGroupCount: ge = 3
821
821
  }) {
822
- const [k, f] = fe(""), v = aA(), N = Ue(), { colorScheme: M } = te(), H = M === "dark" ? m ?? g.colors.dark[7] : x ?? g.white, O = l || (M === "dark" ? g.colors[g.primaryColor][8] : g.colors[g.primaryColor][0]), K = M === "dark" ? P ?? "var(--mantine-color-text)" : D ?? "var(--mantine-color-text)", B = M === "dark" ? E ?? g.colors[g.primaryColor][0] : C ?? g.colors[g.primaryColor][7], ee = le(() => {
822
+ const [k, f] = fe(""), v = aA(), N = Ue(), { colorScheme: M } = te(), H = M === "dark" ? m ?? g.colors.dark[7] : S ?? g.white, O = l || (M === "dark" ? g.colors[g.primaryColor][8] : g.colors[g.primaryColor][0]), K = M === "dark" ? P ?? "var(--mantine-color-text)" : D ?? "var(--mantine-color-text)", B = M === "dark" ? E ?? g.colors[g.primaryColor][0] : C ?? g.colors[g.primaryColor][7], ee = le(() => {
823
823
  const ue = /* @__PURE__ */ new Set();
824
824
  return A.forEach((Ae) => {
825
825
  if (Ae.showInSidebar && (!Ae.disabled || !Ae.hideDisabledItem)) {
826
826
  let Pe = !1;
827
827
  Ae.group || (Ae.group = {
828
- icon: w || /* @__PURE__ */ e(GA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
828
+ icon: x || /* @__PURE__ */ e(GA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
829
829
  label: "Default",
830
830
  name: "Default",
831
831
  hint: "Default",
@@ -840,7 +840,7 @@ function Oo({
840
840
  {
841
841
  content: Ae.group.hint,
842
842
  label: Ae.group.label,
843
- disabled: S,
843
+ disabled: w,
844
844
  children: /* @__PURE__ */ I(
845
845
  X,
846
846
  {
@@ -864,7 +864,7 @@ function Oo({
864
864
  children: Ae.group.icon
865
865
  }
866
866
  ),
867
- S ? /* @__PURE__ */ e(
867
+ w ? /* @__PURE__ */ e(
868
868
  ve,
869
869
  {
870
870
  size: "xs",
@@ -897,7 +897,7 @@ function Oo({
897
897
  K,
898
898
  B
899
899
  ), ke = p || k === "" ? "0px" : `calc(${t} - ${r})`, Ee = s || (M === "dark" ? g.colors[g.primaryColor][6] : g.colors[g.primaryColor][7]), V = F(() => {
900
- R && ee.map((ue) => ue.name).includes(R) ? f(R) : ee.length > 1 && f("Default");
900
+ T && ee.map((ue) => ue.name).includes(T) ? f(T) : ee.length > 1 && f("Default");
901
901
  }, []);
902
902
  se(() => {
903
903
  V();
@@ -920,7 +920,7 @@ function Oo({
920
920
  ) : k !== "" ? /* @__PURE__ */ e(
921
921
  YA,
922
922
  {
923
- ref: T,
923
+ ref: R,
924
924
  rootStyles: {
925
925
  [`.${XA.container}`]: {
926
926
  background: H,
@@ -983,7 +983,7 @@ function Oo({
983
983
  (ue, Ne) => SA(g, p, b, ue, Ne, Q, N.pathname, $, K, L)
984
984
  );
985
985
  return /* @__PURE__ */ e(Re, { children: ee.length == 1 ? Do(
986
- T,
986
+ R,
987
987
  p,
988
988
  t,
989
989
  n,
@@ -1032,12 +1032,12 @@ function hA({
1032
1032
  defaultValue: o,
1033
1033
  finalValue: !1,
1034
1034
  onChange: l
1035
- }), [z, S] = eA({
1035
+ }), [z, w] = eA({
1036
1036
  value: s,
1037
1037
  defaultValue: a,
1038
1038
  finalValue: "",
1039
1039
  onChange: c
1040
- }), [g, T] = fe(""), [w, R] = fe(() => {
1040
+ }), [g, R] = fe(""), [x, T] = fe(() => {
1041
1041
  const E = /* @__PURE__ */ new Set();
1042
1042
  return r.forEach((C, L) => {
1043
1043
  C.initiallyOpened && C.links && C.links.length > 0 && E.add(`group-${L}`);
@@ -1045,21 +1045,21 @@ function hA({
1045
1045
  }), Y = h.pathname, Q = F(() => {
1046
1046
  y(!b);
1047
1047
  }, [b, y]), q = F((E) => {
1048
- R((C) => {
1048
+ T((C) => {
1049
1049
  const L = new Set(C);
1050
1050
  return L.has(E) ? L.delete(E) : L.add(E), L;
1051
1051
  });
1052
1052
  }, []), $ = F((E) => {
1053
- R((C) => {
1053
+ T((C) => {
1054
1054
  const L = new Set(C);
1055
1055
  return L.add(E), L;
1056
1056
  });
1057
1057
  }, []), m = F((E) => {
1058
- R((C) => {
1058
+ T((C) => {
1059
1059
  const L = new Set(C);
1060
1060
  return L.delete(E), L;
1061
1061
  });
1062
- }, []), x = le(() => {
1062
+ }, []), S = le(() => {
1063
1063
  if (!g.trim())
1064
1064
  return r;
1065
1065
  const E = g.toLowerCase().trim(), C = (L) => L.reduce((j, U) => {
@@ -1083,13 +1083,13 @@ function hA({
1083
1083
  setCollapsed: y,
1084
1084
  toggleCollapsed: Q,
1085
1085
  activeGroup: z,
1086
- setActiveGroup: S,
1086
+ setActiveGroup: w,
1087
1087
  activeItemPath: Y,
1088
1088
  navigateToItem: P,
1089
1089
  searchQuery: g,
1090
- setSearchQuery: T,
1091
- filteredItems: x,
1092
- expandedGroups: w,
1090
+ setSearchQuery: R,
1091
+ filteredItems: S,
1092
+ expandedGroups: x,
1093
1093
  toggleGroup: q,
1094
1094
  expandGroup: $,
1095
1095
  collapseGroup: m,
@@ -1102,12 +1102,12 @@ function hA({
1102
1102
  y,
1103
1103
  Q,
1104
1104
  z,
1105
- S,
1105
+ w,
1106
1106
  Y,
1107
1107
  P,
1108
1108
  g,
1109
+ S,
1109
1110
  x,
1110
- w,
1111
1111
  q,
1112
1112
  $,
1113
1113
  m,
@@ -1280,18 +1280,18 @@ function Me({
1280
1280
  hoverColor: s,
1281
1281
  itemHeight: c = 40
1282
1282
  }) {
1283
- const i = pe(), { colorScheme: u } = te(), d = A, [h, p] = fe(!1), b = l || "var(--mantine-color-text)", y = a || i.colors[i.primaryColor][6], z = s || i.colors[i.primaryColor][6], S = s ? `color-mix(in srgb, ${s} 80%, black)` : i.colors[i.primaryColor][8], g = h ? o ? S : z : o ? z : "transparent", T = h || o ? i.white : b, w = h || o ? i.white : y, R = typeof A.disabled == "function" ? A.disabled() : A.disabled;
1284
- if (R && A.hideDisabledItem || !A.showInSidebar)
1283
+ const i = pe(), { colorScheme: u } = te(), d = A, [h, p] = fe(!1), b = l || "var(--mantine-color-text)", y = a || i.colors[i.primaryColor][6], z = s || i.colors[i.primaryColor][6], w = s ? `color-mix(in srgb, ${s} 80%, black)` : i.colors[i.primaryColor][8], g = h ? o ? w : z : o ? z : "transparent", R = h || o ? i.white : b, x = h || o ? i.white : y, T = typeof A.disabled == "function" ? A.disabled() : A.disabled;
1284
+ if (T && A.hideDisabledItem || !A.showInSidebar)
1285
1285
  return null;
1286
1286
  const Y = F(() => {
1287
- !R && n && n(A);
1288
- }, [R, n, A]), Q = we.t(A.label), q = () => d.badge ? /* @__PURE__ */ e(lA, { size: "xs", color: d.badgeColor || "blue", variant: "filled", children: d.badge }) : null, $ = () => d.shortcut ? /* @__PURE__ */ e(MA, { size: "xs", style: { marginLeft: "auto" }, children: d.shortcut }) : null;
1287
+ !T && n && n(A);
1288
+ }, [T, n, A]), Q = we.t(A.label), q = () => d.badge ? /* @__PURE__ */ e(lA, { size: "xs", color: d.badgeColor || "blue", variant: "filled", children: d.badge }) : null, $ = () => d.shortcut ? /* @__PURE__ */ e(MA, { size: "xs", style: { marginLeft: "auto" }, children: d.shortcut }) : null;
1289
1289
  if (A.links && A.links.length > 0) {
1290
- const m = A.links.filter((x) => {
1291
- const P = typeof x.disabled == "function" ? x.disabled() : x.disabled;
1292
- return x.showInSidebar && (!P || !x.hideDisabledItem);
1290
+ const m = A.links.filter((S) => {
1291
+ const P = typeof S.disabled == "function" ? S.disabled() : S.disabled;
1292
+ return S.showInSidebar && (!P || !S.hideDisabledItem);
1293
1293
  });
1294
- return m.length === 0 && R && A.hideDisabledItem ? null : t ? /* @__PURE__ */ I(
1294
+ return m.length === 0 && T && A.hideDisabledItem ? null : t ? /* @__PURE__ */ I(
1295
1295
  oe,
1296
1296
  {
1297
1297
  position: "right-start",
@@ -1343,15 +1343,15 @@ function Me({
1343
1343
  ) }) }) }),
1344
1344
  /* @__PURE__ */ I(oe.Dropdown, { children: [
1345
1345
  /* @__PURE__ */ e(oe.Label, { children: Q }),
1346
- m.map((x, P) => {
1347
- const D = typeof x.disabled == "function" ? x.disabled() : x.disabled;
1346
+ m.map((S, P) => {
1347
+ const D = typeof S.disabled == "function" ? S.disabled() : S.disabled;
1348
1348
  return /* @__PURE__ */ e(
1349
1349
  oe.Item,
1350
1350
  {
1351
- leftSection: x.icon,
1351
+ leftSection: S.icon,
1352
1352
  disabled: D,
1353
- onClick: () => n?.(x),
1354
- children: we.t(x.label)
1353
+ onClick: () => n?.(S),
1354
+ children: we.t(S.label)
1355
1355
  },
1356
1356
  P
1357
1357
  );
@@ -1363,8 +1363,8 @@ function Me({
1363
1363
  kA,
1364
1364
  {
1365
1365
  label: Q,
1366
- leftSection: /* @__PURE__ */ e(G, { style: { color: w }, children: A.icon }),
1367
- rightSection: /* @__PURE__ */ I(G, { style: { display: "flex", alignItems: "center", gap: 4, color: T }, children: [
1366
+ leftSection: /* @__PURE__ */ e(G, { style: { color: x }, children: A.icon }),
1367
+ rightSection: /* @__PURE__ */ I(G, { style: { display: "flex", alignItems: "center", gap: 4, color: R }, children: [
1368
1368
  q(),
1369
1369
  /* @__PURE__ */ e(
1370
1370
  iA,
@@ -1378,7 +1378,7 @@ function Me({
1378
1378
  ] }),
1379
1379
  childrenOffset: 28,
1380
1380
  defaultOpened: A.initiallyOpened || o,
1381
- disabled: R,
1381
+ disabled: T,
1382
1382
  onMouseEnter: () => p(!0),
1383
1383
  onMouseLeave: () => p(!1),
1384
1384
  style: {
@@ -1391,16 +1391,16 @@ function Me({
1391
1391
  borderRadius: 0
1392
1392
  },
1393
1393
  label: {
1394
- color: T
1394
+ color: R
1395
1395
  },
1396
1396
  children: {
1397
1397
  paddingLeft: 0
1398
1398
  }
1399
1399
  },
1400
- children: m.map((x, P) => /* @__PURE__ */ e(
1400
+ children: m.map((S, P) => /* @__PURE__ */ e(
1401
1401
  Me,
1402
1402
  {
1403
- item: x,
1403
+ item: S,
1404
1404
  depth: r + 1,
1405
1405
  collapsed: t,
1406
1406
  active: o,
@@ -1426,15 +1426,15 @@ function Me({
1426
1426
  {
1427
1427
  style: {
1428
1428
  width: "100%",
1429
- cursor: R ? "not-allowed" : "pointer",
1430
- opacity: R ? 0.5 : 1,
1429
+ cursor: T ? "not-allowed" : "pointer",
1430
+ opacity: T ? 0.5 : 1,
1431
1431
  backgroundColor: o ? z : "transparent",
1432
1432
  transition: "background-color 150ms ease",
1433
1433
  padding: "2px 0"
1434
1434
  },
1435
1435
  onClick: Y,
1436
1436
  onMouseEnter: (m) => {
1437
- R || (m.currentTarget.style.backgroundColor = o ? S : z);
1437
+ T || (m.currentTarget.style.backgroundColor = o ? w : z);
1438
1438
  },
1439
1439
  onMouseLeave: (m) => {
1440
1440
  m.currentTarget.style.backgroundColor = o ? z : "transparent";
@@ -1465,13 +1465,13 @@ function Me({
1465
1465
  kA,
1466
1466
  {
1467
1467
  label: Q,
1468
- leftSection: /* @__PURE__ */ e(G, { style: { color: w }, children: A.icon }),
1469
- rightSection: /* @__PURE__ */ I(G, { style: { display: "flex", alignItems: "center", gap: 4, color: T }, children: [
1468
+ leftSection: /* @__PURE__ */ e(G, { style: { color: x }, children: A.icon }),
1469
+ rightSection: /* @__PURE__ */ I(G, { style: { display: "flex", alignItems: "center", gap: 4, color: R }, children: [
1470
1470
  q(),
1471
1471
  $()
1472
1472
  ] }),
1473
1473
  active: o,
1474
- disabled: R,
1474
+ disabled: T,
1475
1475
  onClick: Y,
1476
1476
  onMouseEnter: () => p(!0),
1477
1477
  onMouseLeave: () => p(!1),
@@ -1486,7 +1486,7 @@ function Me({
1486
1486
  borderRadius: 0
1487
1487
  },
1488
1488
  label: {
1489
- color: T
1489
+ color: R
1490
1490
  }
1491
1491
  }
1492
1492
  }
@@ -1503,7 +1503,7 @@ function $o({
1503
1503
  }) {
1504
1504
  const s = pe(), { colorScheme: c } = te(), [i, u] = fe(o), d = n !== void 0, h = d ? n : i, p = F(() => {
1505
1505
  d ? l?.(!h) : u((g) => !g);
1506
- }, [d, h, l]), b = c === "dark" ? s.colors.dark[6] : s.colors.gray[1], y = c === "dark" ? s.colors.dark[5] : s.colors.gray[2], z = c === "dark" ? s.colors.gray[4] : s.colors.gray[7], S = c === "dark" ? s.colors[s.primaryColor][4] : s.colors[s.primaryColor][6];
1506
+ }, [d, h, l]), b = c === "dark" ? s.colors.dark[6] : s.colors.gray[1], y = c === "dark" ? s.colors.dark[5] : s.colors.gray[2], z = c === "dark" ? s.colors.gray[4] : s.colors.gray[7], w = c === "dark" ? s.colors[s.primaryColor][4] : s.colors[s.primaryColor][6];
1507
1507
  return /* @__PURE__ */ I(G, { children: [
1508
1508
  /* @__PURE__ */ e(
1509
1509
  rA,
@@ -1525,7 +1525,7 @@ function $o({
1525
1525
  },
1526
1526
  children: /* @__PURE__ */ I(xe, { justify: "space-between", wrap: "nowrap", children: [
1527
1527
  /* @__PURE__ */ I(xe, { gap: "xs", wrap: "nowrap", children: [
1528
- r && /* @__PURE__ */ e(G, { style: { color: S }, children: r }),
1528
+ r && /* @__PURE__ */ e(G, { style: { color: w }, children: r }),
1529
1529
  /* @__PURE__ */ e(ve, { size: "sm", fw: 600, c: z, children: we.t(A) })
1530
1530
  ] }),
1531
1531
  /* @__PURE__ */ e(
@@ -1925,17 +1925,17 @@ function Go({
1925
1925
  skeletonItemCount: b = 8,
1926
1926
  backgroundDarkColor: y,
1927
1927
  backgroundLightColor: z,
1928
- textDarkColor: S,
1928
+ textDarkColor: w,
1929
1929
  textLightColor: g,
1930
- iconDarkColor: T,
1931
- iconLightColor: w,
1932
- activeColor: R,
1930
+ iconDarkColor: R,
1931
+ iconLightColor: x,
1932
+ activeColor: T,
1933
1933
  withBorder: Y = !0,
1934
1934
  withShadow: Q = !1,
1935
1935
  highlightActiveItem: q = !0,
1936
1936
  onMenuItemClick: $
1937
1937
  }) {
1938
- const m = pe(), { colorScheme: x } = te(), { collapsed: P, toggleCollapsed: D } = uA(), E = x === "dark" ? y ?? m.colors.dark[7] : z ?? m.white, C = x === "dark" ? S ?? m.colors.gray[3] : g ?? m.colors.gray[7], L = x === "dark" ? T ?? m.colors[m.primaryColor][4] : w ?? m.colors[m.primaryColor][6], j = R ? m.colors[R]?.[6] ?? m.colors[m.primaryColor][6] : m.colors[m.primaryColor][6], {
1938
+ const m = pe(), { colorScheme: S } = te(), { collapsed: P, toggleCollapsed: D } = uA(), E = S === "dark" ? y ?? m.colors.dark[7] : z ?? m.white, C = S === "dark" ? w ?? m.colors.gray[3] : g ?? m.colors.gray[7], L = S === "dark" ? R ?? m.colors[m.primaryColor][4] : x ?? m.colors[m.primaryColor][6], j = T ? m.colors[T]?.[6] ?? m.colors[m.primaryColor][6] : m.colors[m.primaryColor][6], {
1939
1939
  query: U,
1940
1940
  setQuery: J,
1941
1941
  filteredItems: W,
@@ -2061,7 +2061,7 @@ function Go({
2061
2061
  flexDirection: "column",
2062
2062
  overflow: "hidden",
2063
2063
  transition: "width 200ms ease",
2064
- borderRight: Y ? `1px solid ${x === "dark" ? m.colors.dark[5] : m.colors.gray[2]}` : void 0,
2064
+ borderRight: Y ? `1px solid ${S === "dark" ? m.colors.dark[5] : m.colors.gray[2]}` : void 0,
2065
2065
  boxShadow: Q ? m.shadows.sm : void 0
2066
2066
  },
2067
2067
  children: [
@@ -2101,7 +2101,7 @@ function Go({
2101
2101
  flexShrink: 0,
2102
2102
  height: i,
2103
2103
  backgroundColor: E,
2104
- borderTop: Y ? `1px solid ${x === "dark" ? m.colors.dark[5] : m.colors.gray[2]}` : void 0
2104
+ borderTop: Y ? `1px solid ${S === "dark" ? m.colors.dark[5] : m.colors.gray[2]}` : void 0
2105
2105
  },
2106
2106
  children: c
2107
2107
  }
@@ -2266,13 +2266,13 @@ function Uo({
2266
2266
  iconLightColor: b,
2267
2267
  activeColor: y,
2268
2268
  withBorder: z = !0,
2269
- withShadow: S = !1,
2269
+ withShadow: w = !1,
2270
2270
  highlightActiveItem: g = !0,
2271
- onMenuItemClick: T
2271
+ onMenuItemClick: R
2272
2272
  }) {
2273
- const w = pe(), { colorScheme: R } = te(), { toggleCollapsed: Y } = uA(), Q = R === "dark" ? d ?? w.colors.dark[7] : h ?? w.white, q = R === "dark" ? p ?? w.colors[w.primaryColor][4] : b ?? w.colors[w.primaryColor][6], $ = y ?? w.primaryColor, { navigateToItem: m, isItemActive: x, isItemOrChildActive: P } = pA({
2273
+ const x = pe(), { colorScheme: T } = te(), { toggleCollapsed: Y } = uA(), Q = T === "dark" ? d ?? x.colors.dark[7] : h ?? x.white, q = T === "dark" ? p ?? x.colors[x.primaryColor][4] : b ?? x.colors[x.primaryColor][6], $ = y ?? x.primaryColor, { navigateToItem: m, isItemActive: S, isItemOrChildActive: P } = pA({
2274
2274
  navigationData: A,
2275
- onMenuItemClick: T
2275
+ onMenuItemClick: R
2276
2276
  });
2277
2277
  fA({
2278
2278
  navigationData: A,
@@ -2291,13 +2291,13 @@ function Uo({
2291
2291
  Ho,
2292
2292
  {
2293
2293
  item: L,
2294
- active: g && (x(L) || P(L)),
2294
+ active: g && (S(L) || P(L)),
2295
2295
  onClick: m,
2296
2296
  iconColor: q,
2297
2297
  activeColor: $
2298
2298
  },
2299
2299
  j
2300
- )) }), C = R === "dark" ? w.colors.dark[5] : w.colors.gray[2];
2300
+ )) }), C = T === "dark" ? x.colors.dark[5] : x.colors.gray[2];
2301
2301
  return /* @__PURE__ */ I(
2302
2302
  G,
2303
2303
  {
@@ -2308,7 +2308,7 @@ function Uo({
2308
2308
  display: "flex",
2309
2309
  flexDirection: "column",
2310
2310
  overflow: "hidden",
2311
- boxShadow: S ? w.shadows.sm : void 0,
2311
+ boxShadow: w ? x.shadows.sm : void 0,
2312
2312
  borderRight: z ? `1px solid ${C}` : void 0
2313
2313
  },
2314
2314
  children: [
@@ -2319,7 +2319,7 @@ function Uo({
2319
2319
  flexShrink: 0,
2320
2320
  display: "flex",
2321
2321
  justifyContent: "center",
2322
- padding: w.spacing.xs
2322
+ padding: x.spacing.xs
2323
2323
  },
2324
2324
  children: o
2325
2325
  }
@@ -2344,7 +2344,7 @@ function Uo({
2344
2344
  height: l,
2345
2345
  display: "flex",
2346
2346
  justifyContent: "center",
2347
- padding: w.spacing.xs
2347
+ padding: x.spacing.xs
2348
2348
  },
2349
2349
  children: n
2350
2350
  }
@@ -2397,17 +2397,17 @@ function Vo({
2397
2397
  skeletonItemCount: b = 8,
2398
2398
  skeletonGroupCount: y = 3,
2399
2399
  backgroundDarkColor: z,
2400
- backgroundLightColor: S,
2400
+ backgroundLightColor: w,
2401
2401
  textDarkColor: g,
2402
- textLightColor: T,
2403
- iconDarkColor: w,
2404
- iconLightColor: R,
2402
+ textLightColor: R,
2403
+ iconDarkColor: x,
2404
+ iconLightColor: T,
2405
2405
  activeColor: Y,
2406
2406
  groupBackgroundColor: Q,
2407
2407
  selectedGroupColor: q,
2408
2408
  groupColor: $,
2409
2409
  groupLabelDarkColor: m,
2410
- groupLabelLightColor: x,
2410
+ groupLabelLightColor: S,
2411
2411
  withBorder: P = !1,
2412
2412
  highlightActiveItem: D = !0,
2413
2413
  onMenuItemClick: E
@@ -2417,7 +2417,7 @@ function Vo({
2417
2417
  toggleCollapsed: U,
2418
2418
  activeGroup: J,
2419
2419
  setActiveGroup: W
2420
- } = uA(), de = L === "dark" ? z ?? C.colors.dark[7] : S ?? C.white, ge = L === "dark" ? g ?? C.colors.gray[3] : T ?? C.colors.gray[7], k = L === "dark" ? w ?? C.colors[C.primaryColor][4] : R ?? C.colors[C.primaryColor][6], f = Y ? C.colors[Y]?.[6] ?? C.colors[C.primaryColor][6] : C.colors[C.primaryColor][6], v = Q || (L === "dark" ? C.colors[C.primaryColor][6] : C.colors[C.primaryColor][7]), N = q || (L === "dark" ? C.colors[C.primaryColor][8] : C.colors[C.primaryColor][0]), { navigateToItem: M, isItemActive: H } = pA({
2420
+ } = uA(), de = L === "dark" ? z ?? C.colors.dark[7] : w ?? C.white, ge = L === "dark" ? g ?? C.colors.gray[3] : R ?? C.colors.gray[7], k = L === "dark" ? x ?? C.colors[C.primaryColor][4] : T ?? C.colors[C.primaryColor][6], f = Y ? C.colors[Y]?.[6] ?? C.colors[C.primaryColor][6] : C.colors[C.primaryColor][6], v = Q || (L === "dark" ? C.colors[C.primaryColor][6] : C.colors[C.primaryColor][7]), N = q || (L === "dark" ? C.colors[C.primaryColor][8] : C.colors[C.primaryColor][0]), { navigateToItem: M, isItemActive: H } = pA({
2421
2421
  navigationData: A,
2422
2422
  onMenuItemClick: E
2423
2423
  });
@@ -2671,11 +2671,11 @@ var _o = zA(function(A) {
2671
2671
  let { errorElement: r = OA, cacheNodeClassName: t, children: o, cacheKey: n, exclude: l, include: a, enableActivity: s } = A, { active: c, renderCount: i, destroy: u, transition: d, viewTransition: h, duration: p, containerDivRef: b } = A, y = he(!1);
2672
2672
  y.current = y.current || c;
2673
2673
  let z = le(() => {
2674
- let S = document.createElement("div");
2675
- return WA(S).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", i.toString()), S.className = er + (t ? ` ${t}` : ""), S;
2674
+ let w = document.createElement("div");
2675
+ return WA(w).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", i.toString()), w.className = er + (t ? ` ${t}` : ""), w;
2676
2676
  }, [i, t]);
2677
2677
  return se(() => {
2678
- let S = Zo(n, l, a), g = b.current;
2678
+ let w = Zo(n, l, a), g = b.current;
2679
2679
  if (!g) {
2680
2680
  console.warn("keepalive: cache container not found");
2681
2681
  return;
@@ -2683,21 +2683,21 @@ var _o = zA(function(A) {
2683
2683
  if (d)
2684
2684
  (async () => {
2685
2685
  if (c) {
2686
- let T = PA(g, n);
2687
- if (await RA(p - 40), sA(T), g.contains(z))
2686
+ let R = PA(g, n);
2687
+ if (await RA(p - 40), sA(R), g.contains(z))
2688
2688
  return;
2689
2689
  LA(g, z);
2690
2690
  } else
2691
- S || (await RA(p), u(n));
2691
+ w || (await RA(p), u(n));
2692
2692
  })();
2693
2693
  else if (c) {
2694
- let T = () => {
2695
- let w = PA(g, n);
2696
- sA(w), !g.contains(z) && LA(g, z);
2694
+ let R = () => {
2695
+ let x = PA(g, n);
2696
+ sA(x), !g.contains(z) && LA(g, z);
2697
2697
  };
2698
- h && document.startViewTransition ? document.startViewTransition(T) : T();
2698
+ h && document.startViewTransition ? document.startViewTransition(R) : R();
2699
2699
  } else
2700
- S || u(n);
2700
+ w || u(n);
2701
2701
  }, [c, b, n, l, a]), y.current ? po(e(r, { children: Wo && s ? I(Jo, { mode: c ? "visible" : "hidden", children: [" ", o] }) : o }), z, n) : null;
2702
2702
  }, (A, r) => A.active === r.active && A.renderCount === r.renderCount && A.children === r.children && A.exclude === r.exclude && A.include === r.include), et = _o, At = (A) => {
2703
2703
  typeof We < "u" && Ye(We) ? We(A) : A();
@@ -2706,62 +2706,62 @@ function rr() {
2706
2706
  return he(null);
2707
2707
  }
2708
2708
  function ot(A) {
2709
- let { activeCacheKey: r, max: t = 10, exclude: o, include: n, onBeforeActive: l, customContainerRef: a, cacheNodeClassName: s = "cache-component", containerClassName: c = "keep-alive-render", errorElement: i, transition: u = !1, viewTransition: d = !1, duration: h = 200, children: p, aliveRef: b, maxAliveTime: y = 0, enableActivity: z = !1 } = A, S = a || he(null), [g, T] = fe([]);
2709
+ let { activeCacheKey: r, max: t = 10, exclude: o, include: n, onBeforeActive: l, customContainerRef: a, cacheNodeClassName: s = "cache-component", containerClassName: c = "keep-alive-render", errorElement: i, transition: u = !1, viewTransition: d = !1, duration: h = 200, children: p, aliveRef: b, maxAliveTime: y = 0, enableActivity: z = !1 } = A, w = a || he(null), [g, R] = fe([]);
2710
2710
  cr(() => {
2711
2711
  mA(r) || rt(() => {
2712
- T(($) => {
2712
+ R(($) => {
2713
2713
  let m = Date.now();
2714
- if ($.find((x) => x.cacheKey === r))
2715
- return $.map((x) => {
2716
- if (x.cacheKey === r) {
2714
+ if ($.find((S) => S.cacheKey === r))
2715
+ return $.map((S) => {
2716
+ if (S.cacheKey === r) {
2717
2717
  let P = !1;
2718
2718
  if (Ye(l) && l(r), y) {
2719
- let D = x.lastActiveTime;
2719
+ let D = S.lastActiveTime;
2720
2720
  if (nA(y)) {
2721
2721
  let E = y.find((C) => JA(C.match) ? C.match.test(r) : C.match === r);
2722
2722
  E && (P = E && D + E.expire * 1e3 < m);
2723
2723
  } else
2724
2724
  P = D + y * 1e3 < m;
2725
2725
  }
2726
- return { ...x, ele: p, lastActiveTime: m, renderCount: P ? x.renderCount + 1 : x.renderCount };
2726
+ return { ...S, ele: p, lastActiveTime: m, renderCount: P ? S.renderCount + 1 : S.renderCount };
2727
2727
  }
2728
- return x;
2728
+ return S;
2729
2729
  });
2730
2730
  if (Ye(l) && l(r), $.length > t) {
2731
- let x = $.reduce((P, D) => P.lastActiveTime < D.lastActiveTime ? P : D);
2732
- $.splice($.indexOf(x), 1);
2731
+ let S = $.reduce((P, D) => P.lastActiveTime < D.lastActiveTime ? P : D);
2732
+ $.splice($.indexOf(S), 1);
2733
2733
  }
2734
2734
  return [...$, { cacheKey: r, lastActiveTime: m, ele: p, renderCount: 0 }];
2735
2735
  });
2736
2736
  });
2737
2737
  }, [r, p]);
2738
- let w = F(($) => {
2739
- T((m) => {
2740
- let x = $ || r;
2741
- return m.map((P) => P.cacheKey === x ? { ...P, renderCount: P.renderCount + 1 } : P);
2738
+ let x = F(($) => {
2739
+ R((m) => {
2740
+ let S = $ || r;
2741
+ return m.map((P) => P.cacheKey === S ? { ...P, renderCount: P.renderCount + 1 } : P);
2742
2742
  });
2743
- }, [T, r]), R = F(($) => {
2744
- let m = $ || r, x = nA(m) ? m : [m];
2743
+ }, [R, r]), T = F(($) => {
2744
+ let m = $ || r, S = nA(m) ? m : [m];
2745
2745
  return new Promise((P) => {
2746
2746
  _e(() => {
2747
- T((D) => [...D.filter((E) => !x.includes(E.cacheKey))]), P();
2747
+ R((D) => [...D.filter((E) => !S.includes(E.cacheKey))]), P();
2748
2748
  });
2749
2749
  });
2750
- }, [T, r]), Y = F(() => new Promise(($) => {
2750
+ }, [R, r]), Y = F(() => new Promise(($) => {
2751
2751
  _e(() => {
2752
- T([]), $();
2752
+ R([]), $();
2753
2753
  });
2754
- }), [T]), Q = F(($) => {
2754
+ }), [R]), Q = F(($) => {
2755
2755
  let m = $ || r;
2756
- return new Promise((x) => {
2756
+ return new Promise((S) => {
2757
2757
  _e(() => {
2758
- T((P) => [...P.filter((D) => D.cacheKey === m)]), x();
2758
+ R((P) => [...P.filter((D) => D.cacheKey === m)]), S();
2759
2759
  });
2760
2760
  });
2761
- }, [r, T]), q = F(() => g, [g]);
2762
- return dr(b, () => ({ refresh: w, destroy: R, destroyAll: Y, destroyOther: Q, getCacheNodes: q })), I(OA, { children: [e("div", { ref: S, className: c, style: { height: "100%" } }), g.map(($) => {
2763
- let { cacheKey: m, ele: x, renderCount: P } = $;
2764
- return e(Xo, { active: r === m, refresh: w, destroy: R, destroyAll: Y, destroyOther: Q, getCacheNodes: q, children: e(et, { destroy: R, include: n, exclude: o, transition: u, viewTransition: d, duration: h, renderCount: P, containerDivRef: S, errorElement: i, active: r === m, cacheNodeClassName: s, cacheKey: m, enableActivity: z, children: x }) }, `${m}-${P}`);
2761
+ }, [r, R]), q = F(() => g, [g]);
2762
+ return dr(b, () => ({ refresh: x, destroy: T, destroyAll: Y, destroyOther: Q, getCacheNodes: q })), I(OA, { children: [e("div", { ref: w, className: c, style: { height: "100%" } }), g.map(($) => {
2763
+ let { cacheKey: m, ele: S, renderCount: P } = $;
2764
+ return e(Xo, { active: r === m, refresh: x, destroy: T, destroyAll: Y, destroyOther: Q, getCacheNodes: q, children: e(et, { destroy: T, include: n, exclude: o, transition: u, viewTransition: d, duration: h, renderCount: P, containerDivRef: w, errorElement: i, active: r === m, cacheNodeClassName: s, cacheKey: m, enableActivity: z, children: S }) }, `${m}-${P}`);
2765
2765
  })] });
2766
2766
  }
2767
2767
  var tt = ot, nt = () => ye(ZA), or = nt;
@@ -2848,8 +2848,8 @@ const gt = ({ children: A, maxKeepAliveTabs: r = 10, ...t }) => {
2848
2848
  const o = rr(), l = ye(nr) || o, a = he(null), s = he(""), { keepAlivePaths: c, routeElements: i } = le(() => {
2849
2849
  const p = me.Children.toArray(A), b = p.map((g) => {
2850
2850
  if (me.isValidElement(g)) {
2851
- const T = g.props?.path || "", w = g.type === Xe;
2852
- return `${T}:${w}`;
2851
+ const R = g.props?.path || "", x = g.type === Xe;
2852
+ return `${R}:${x}`;
2853
2853
  }
2854
2854
  return "";
2855
2855
  }).join("|");
@@ -2860,24 +2860,24 @@ const gt = ({ children: A, maxKeepAliveTabs: r = 10, ...t }) => {
2860
2860
  p.forEach((g) => {
2861
2861
  if (me.isValidElement(g))
2862
2862
  if (g.type === Xe) {
2863
- const T = g.props;
2864
- T.path && y.push(T.path);
2865
- const w = T.component, R = typeof w == "function" ? me.createElement(w) : w;
2863
+ const R = g.props;
2864
+ R.path && y.push(R.path);
2865
+ const x = R.component, T = typeof x == "function" ? me.createElement(x) : x;
2866
2866
  z.push(
2867
2867
  /* @__PURE__ */ e(
2868
2868
  qe,
2869
2869
  {
2870
- path: T.path,
2871
- element: /* @__PURE__ */ e(pt, { children: R })
2870
+ path: R.path,
2871
+ element: /* @__PURE__ */ e(pt, { children: T })
2872
2872
  },
2873
- T.path || g.key
2873
+ R.path || g.key
2874
2874
  )
2875
2875
  );
2876
2876
  } else
2877
2877
  z.push(g);
2878
2878
  });
2879
- const S = { keepAlivePaths: y, routeElements: z };
2880
- return a.current = S, S;
2879
+ const w = { keepAlivePaths: y, routeElements: z };
2880
+ return a.current = w, w;
2881
2881
  }, [A]), u = ye(je), d = le(() => ({
2882
2882
  requestUnregister: (p) => {
2883
2883
  l.current?.destroy(p);
@@ -2962,17 +2962,17 @@ function vt({
2962
2962
  selectedGroupColor: b = "#132441",
2963
2963
  groupColor: y = "white",
2964
2964
  backgroundGroupColor: z = "#132441",
2965
- groupLabelDarkColor: S = "white",
2965
+ groupLabelDarkColor: w = "white",
2966
2966
  groupLabelLightColor: g = "white",
2967
- headerColor: T,
2968
- footerHeight: w,
2969
- iconsWithBackground: R,
2967
+ headerColor: R,
2968
+ footerHeight: x,
2969
+ iconsWithBackground: T,
2970
2970
  menuItemHeight: Y,
2971
2971
  showSideBar: Q = !0,
2972
2972
  showHeader: q = !0,
2973
2973
  headerStyle: $ = {},
2974
2974
  highlightActiveMenuItem: m = !0,
2975
- customRenderSidebar: x,
2975
+ customRenderSidebar: S,
2976
2976
  showCollapsedButton: P = !0,
2977
2977
  sideBarBackgroundDarkColor: D,
2978
2978
  sideBarBackgroundLightColor: E,
@@ -3021,7 +3021,7 @@ function vt({
3021
3021
  }, [v.hidden, ne]), se(() => {
3022
3022
  c && c(v.collapsed);
3023
3023
  }, [v.collapsed, c]);
3024
- const Ie = ge === "minimal" || v.collapsed ? n : o, Le = (Z, ie = !1) => x ? x({ width: o, height: Z, isHidden: K }) : ge === "legacy" ? /* @__PURE__ */ e(
3024
+ const Ie = ge === "minimal" || v.collapsed ? n : o, Le = (Z, ie = !1) => S ? S({ width: o, height: Z, isHidden: K }) : ge === "legacy" ? /* @__PURE__ */ e(
3025
3025
  Oo,
3026
3026
  {
3027
3027
  navigationData: v.navigationData,
@@ -3031,7 +3031,7 @@ function vt({
3031
3031
  selectedGroupColor: b,
3032
3032
  groupColor: y,
3033
3033
  backgroundGroupColor: z,
3034
- groupLabelDarkColor: S,
3034
+ groupLabelDarkColor: w,
3035
3035
  groupLabelLightColor: g,
3036
3036
  showGroupLabels: !1,
3037
3037
  collapsed: ie ? !1 : v.collapsed,
@@ -3046,7 +3046,7 @@ function vt({
3046
3046
  sidebarRef: H,
3047
3047
  defaultGroupIcon: d,
3048
3048
  selectedGroupName: u,
3049
- iconsWithBackground: R,
3049
+ iconsWithBackground: T,
3050
3050
  menuItemHeight: Y,
3051
3051
  highlightActiveMenuItem: m,
3052
3052
  backgroundDarkColor: D,
@@ -3093,7 +3093,7 @@ function vt({
3093
3093
  groupBackgroundColor: z,
3094
3094
  selectedGroupColor: b,
3095
3095
  groupColor: y,
3096
- groupLabelDarkColor: S,
3096
+ groupLabelDarkColor: w,
3097
3097
  groupLabelLightColor: g,
3098
3098
  activeColor: W,
3099
3099
  withBorder: !1,
@@ -3140,14 +3140,14 @@ function vt({
3140
3140
  {
3141
3141
  header: { height: "60px", collapsed: !q },
3142
3142
  navbar: Ae,
3143
- footer: { height: w || "0px" },
3143
+ footer: { height: x || "0px" },
3144
3144
  styles: Pe,
3145
3145
  children: [
3146
3146
  /* @__PURE__ */ e(
3147
3147
  Qe.Header,
3148
3148
  {
3149
3149
  p: "xs",
3150
- color: T,
3150
+ color: R,
3151
3151
  display: "flex",
3152
3152
  style: {
3153
3153
  backgroundColor: "var(--mantine-primary-color-8)",
@@ -3211,17 +3211,17 @@ function bn({
3211
3211
  onHiddenSidebar: b,
3212
3212
  sidebarDefaultGroupIcon: y,
3213
3213
  sidebarSelectedGroupName: z,
3214
- sideBarHeaderHeight: S,
3214
+ sideBarHeaderHeight: w,
3215
3215
  sideBarHeaderContent: g,
3216
- selectedGroupColor: T = "#132441",
3217
- groupColor: w = "white",
3218
- backgroundGroupColor: R = "#132441",
3216
+ selectedGroupColor: R = "#132441",
3217
+ groupColor: x = "white",
3218
+ backgroundGroupColor: T = "#132441",
3219
3219
  groupLabelDarkColor: Y = "white",
3220
3220
  groupLabelLightColor: Q = "white",
3221
3221
  headerColor: q,
3222
3222
  footerHeight: $,
3223
3223
  iconsWithBackground: m,
3224
- menuItemHeight: x,
3224
+ menuItemHeight: S,
3225
3225
  showSideBar: P,
3226
3226
  showHeader: D,
3227
3227
  headerStyle: E,
@@ -3268,13 +3268,13 @@ function bn({
3268
3268
  sideBarWidth: c,
3269
3269
  sideBarCollapsedWidth: i,
3270
3270
  sideBarHiddenBreakPoint: u,
3271
- sideBarHeaderHeight: S,
3271
+ sideBarHeaderHeight: w,
3272
3272
  sideBarHeaderContent: g,
3273
3273
  sideBarFooterHeight: d,
3274
3274
  sideBarFooterContent: h,
3275
- selectedGroupColor: T,
3276
- groupColor: w,
3277
- backgroundGroupColor: R,
3275
+ selectedGroupColor: R,
3276
+ groupColor: x,
3277
+ backgroundGroupColor: T,
3278
3278
  groupLabelDarkColor: Y,
3279
3279
  groupLabelLightColor: Q,
3280
3280
  onCollapsedSideBar: p,
@@ -3284,7 +3284,7 @@ function bn({
3284
3284
  headerColor: q,
3285
3285
  footerHeight: $,
3286
3286
  iconsWithBackground: m,
3287
- menuItemHeight: x,
3287
+ menuItemHeight: S,
3288
3288
  showSideBar: P,
3289
3289
  showHeader: D,
3290
3290
  headerStyle: E,
@@ -3364,7 +3364,7 @@ function vn({
3364
3364
  }) {
3365
3365
  const [l, a] = me.useTransition(), s = He(), { colorScheme: c } = te(), [i, u] = fe(n), [d, h] = fe(o), p = he(void 0), b = Ue(), y = he([]);
3366
3366
  fo(y);
3367
- const z = ar(), { state: S, dispatch: g } = z, T = ye(Je), w = ct(), { start: R, done: Y } = bt(), Q = he(r), q = he(t);
3367
+ const z = ar(), { state: w, dispatch: g } = z, R = ye(Je), x = ct(), { start: T, done: Y } = bt(), Q = he(r), q = he(t);
3368
3368
  se(() => {
3369
3369
  Q.current = r, q.current = t;
3370
3370
  });
@@ -3372,8 +3372,8 @@ function vn({
3372
3372
  se(() => {
3373
3373
  p.current = $.current, $.current = d;
3374
3374
  }, [d]);
3375
- const m = he(!1), x = F((k, f) => {
3376
- console.log(`[TabContainer] handleOnClose called for: ${k}`), R(), w ? (console.log(`[TabContainer] Destroying keepAlive cache for: ${k}`), w.destroy(k)) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
3375
+ const m = he(!1), S = F((k, f) => {
3376
+ console.log(`[TabContainer] handleOnClose called for: ${k}`), T(), x ? (console.log(`[TabContainer] Destroying keepAlive cache for: ${k}`), x.destroy(k)) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
3377
3377
  const v = i.findIndex((K) => K.path === k);
3378
3378
  let N = f?.redirectUrl;
3379
3379
  !N && v >= 0 && (N = i[v].redirect);
@@ -3394,17 +3394,17 @@ function vn({
3394
3394
  if (u(O), H && H != null)
3395
3395
  h(H), s(N || H);
3396
3396
  else {
3397
- if (h(void 0), !T.navigationRootLink) {
3397
+ if (h(void 0), !R.navigationRootLink) {
3398
3398
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3399
3399
  return;
3400
3400
  }
3401
- s(T.navigationRootLink);
3401
+ s(R.navigationRootLink);
3402
3402
  }
3403
3403
  g({ type: "DONE", link: "" }), Y();
3404
- }, [i, d, s, T.navigationRootLink, g, w, R, Y]);
3404
+ }, [i, d, s, R.navigationRootLink, g, x, T, Y]);
3405
3405
  se(() => {
3406
- S?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${S?.linkClosed}`), x(S?.linkClosed, S?.payload));
3407
- }, [S?.linkClosed, S?.payload, x]);
3406
+ w?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${w?.linkClosed}`), S(w?.linkClosed, w?.payload));
3407
+ }, [w?.linkClosed, w?.payload, S]);
3408
3408
  const P = (k) => {
3409
3409
  const f = {
3410
3410
  item: void 0,
@@ -3473,7 +3473,7 @@ function vn({
3473
3473
  }, [b.pathname]);
3474
3474
  const L = (k) => {
3475
3475
  const f = i.filter((v) => v.id === k);
3476
- f && f.length > 0 && b.pathname !== f[0].path && (R(), s(f[0].path), Y()), a(() => {
3476
+ f && f.length > 0 && b.pathname !== f[0].path && (T(), s(f[0].path), Y()), a(() => {
3477
3477
  h(k);
3478
3478
  });
3479
3479
  }, j = (k) => {
@@ -3484,16 +3484,16 @@ function vn({
3484
3484
  console.error("[TabContainer] Dispatch failed:", f);
3485
3485
  }
3486
3486
  }, U = F(() => {
3487
- if (w?.destroyAll(), u([]), h(void 0), !T.navigationRootLink) {
3487
+ if (x?.destroyAll(), u([]), h(void 0), !R.navigationRootLink) {
3488
3488
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3489
3489
  return;
3490
3490
  }
3491
- s(T.navigationRootLink);
3492
- }, [s, T.navigationRootLink, w]), J = F((k) => {
3491
+ s(R.navigationRootLink);
3492
+ }, [s, R.navigationRootLink, x]), J = F((k) => {
3493
3493
  const f = i.findIndex((O) => O.id === k);
3494
3494
  if (f <= 0)
3495
3495
  return;
3496
- i.slice(0, f).forEach((O) => w?.destroy(O.path));
3496
+ i.slice(0, f).forEach((O) => x?.destroy(O.path));
3497
3497
  const N = i.slice(f), M = N.find((O) => O.id === d)?.id || N[0]?.id, H = N.map((O) => ({
3498
3498
  ...O,
3499
3499
  active: O.id === M
@@ -3503,11 +3503,11 @@ function vn({
3503
3503
  const O = H.find((K) => K.id === M);
3504
3504
  O && b.pathname !== O.path && s(O.path);
3505
3505
  }
3506
- }, [i, d, s, b.pathname, w]), W = F((k) => {
3506
+ }, [i, d, s, b.pathname, x]), W = F((k) => {
3507
3507
  const f = i.findIndex((O) => O.id === k);
3508
3508
  if (f === -1 || f >= i.length - 1)
3509
3509
  return;
3510
- i.slice(f + 1).forEach((O) => w?.destroy(O.path));
3510
+ i.slice(f + 1).forEach((O) => x?.destroy(O.path));
3511
3511
  const N = i.slice(0, f + 1), M = N.find((O) => O.id === d)?.id || N[N.length - 1]?.id, H = N.map((O) => ({
3512
3512
  ...O,
3513
3513
  active: O.id === M
@@ -3517,14 +3517,14 @@ function vn({
3517
3517
  const O = H.find((K) => K.id === M);
3518
3518
  O && b.pathname !== O.path && s(O.path);
3519
3519
  }
3520
- }, [i, d, s, b.pathname, w]), de = F((k) => {
3520
+ }, [i, d, s, b.pathname, x]), de = F((k) => {
3521
3521
  const f = i.find((N) => N.id === k);
3522
3522
  if (!f)
3523
3523
  return;
3524
- w?.destroyOther(f.path);
3524
+ x?.destroyOther(f.path);
3525
3525
  const v = [{ ...f, active: !0 }];
3526
3526
  u(v), h(k), b.pathname !== f.path && s(f.path);
3527
- }, [i, s, b.pathname, w]);
3527
+ }, [i, s, b.pathname, x]);
3528
3528
  return /* @__PURE__ */ e("div", { ref: y, children: /* @__PURE__ */ e(
3529
3529
  go,
3530
3530
  {
@@ -3687,20 +3687,21 @@ function xn({ opened: A, handleClose: r, userId: t, updateUser: o, options: n })
3687
3687
  loadOnStart: !0,
3688
3688
  validator: s,
3689
3689
  id: t,
3690
- onLoadComplete: (S) => {
3691
- S.isBrowsing() && S.edit(), a();
3690
+ onLoadComplete: (w) => {
3691
+ w.isBrowsing() && w.edit(), a();
3692
3692
  },
3693
- onDestroy: (S) => {
3693
+ onDestroy: (w) => {
3694
3694
  },
3695
- onError: (S, g) => {
3696
- co.showError(re().t("archbase:WARNING"), S, g);
3695
+ onError: (w, g) => {
3696
+ const R = w instanceof Error ? w.message : typeof w == "string" ? w : JSON.stringify(w);
3697
+ co.showError(re().t("archbase:WARNING"), R, g);
3697
3698
  }
3698
3699
  });
3699
3700
  se(() => {
3700
3701
  A && d && d.isBrowsing() && d.edit();
3701
3702
  }, [d, A]);
3702
- const z = (S) => {
3703
- S && (console.log(S), o(S.name, S.avatar));
3703
+ const z = (w) => {
3704
+ w && (console.log(w), o(w.name, w.avatar));
3704
3705
  };
3705
3706
  return /* @__PURE__ */ e(
3706
3707
  vo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/admin",
3
- "version": "4.0.4",
3
+ "version": "4.0.18",
4
4
  "description": "Admin interface components for Archbase React",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -43,12 +43,12 @@
43
43
  "react-router-dom": "^6.28.0",
44
44
  "usehooks-ts": "^2.16.0",
45
45
  "zustand": "^5.0.6",
46
- "@archbase/components": "4.0.4",
47
- "@archbase/core": "4.0.4",
48
- "@archbase/data": "4.0.4",
49
- "@archbase/layout": "4.0.4",
50
- "@archbase/security": "4.0.4",
51
- "@archbase/template": "4.0.4"
46
+ "@archbase/components": "4.0.18",
47
+ "@archbase/core": "4.0.18",
48
+ "@archbase/data": "4.0.18",
49
+ "@archbase/layout": "4.0.18",
50
+ "@archbase/security": "4.0.18",
51
+ "@archbase/template": "4.0.18"
52
52
  },
53
53
  "devDependencies": {
54
54
  "keepalive-for-react": "^5.0.7",
Binary file