@starasia/admin 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,12 +1,12 @@
1
1
  export * from "@starasia/alert";
2
- import { Badges as PA } from "@starasia/badges";
2
+ import { Badges as VA } from "@starasia/badges";
3
3
  export * from "@starasia/badges";
4
4
  import { Box as a } from "@starasia/box";
5
5
  export * from "@starasia/box";
6
6
  import { Button as O } from "@starasia/button";
7
7
  export * from "@starasia/button";
8
8
  export * from "@starasia/card";
9
- import { StarasiaDate as VA } from "@starasia/date";
9
+ import { StarasiaDate as XA } from "@starasia/date";
10
10
  export * from "@starasia/date";
11
11
  import { Dialog as dA, DialogBody as hA, DialogTitle as wA, DialogFooter as yA } from "@starasia/dialog";
12
12
  export * from "@starasia/dialog";
@@ -14,7 +14,7 @@ import { Drawer as ce } from "@starasia/drawer";
14
14
  export * from "@starasia/drawer";
15
15
  import { Dropdown as xA } from "@starasia/dropdown";
16
16
  export * from "@starasia/dropdown";
17
- import { useMediaQuery as X, useConfirmation as XA } from "@starasia/hooks";
17
+ import { useMediaQuery as X, useConfirmation as $A } from "@starasia/hooks";
18
18
  export * from "@starasia/hooks";
19
19
  import { searchParamsToObject as DA } from "@starasia/http";
20
20
  export * from "@starasia/http";
@@ -25,19 +25,19 @@ export * from "@starasia/menu";
25
25
  import { Pagination as Be } from "@starasia/pagination";
26
26
  export * from "@starasia/pagination";
27
27
  export * from "@starasia/storage";
28
- import { Tr as QA, Td as CA, Table as $A, Thead as we, Th as JA, Tbody as Qe } from "@starasia/table";
28
+ import { Tr as QA, Td as CA, Table as _A, Thead as we, Th as qA, Tbody as Qe } from "@starasia/table";
29
29
  export * from "@starasia/table";
30
30
  export * from "@starasia/tabs";
31
31
  import { Textarea as de } from "@starasia/textarea";
32
32
  export * from "@starasia/textarea";
33
- import { useTheme as he, ThemeProvider as qA, useRadius as De, useColor as zA } from "@starasia/theme";
33
+ import { useTheme as he, ThemeProvider as TA, useRadius as De, useColor as KA } from "@starasia/theme";
34
34
  export * from "@starasia/theme";
35
35
  export * from "@starasia/toast";
36
- import { Toggle as _A } from "@starasia/toggle";
36
+ import { Toggle as Ae } from "@starasia/toggle";
37
37
  export * from "@starasia/toggle";
38
38
  import { Tooltip as rA } from "@starasia/tooltip";
39
39
  export * from "@starasia/tooltip";
40
- import { Checkbox as jA } from "@starasia/checkbox";
40
+ import { Checkbox as NA } from "@starasia/checkbox";
41
41
  export * from "@starasia/checkbox";
42
42
  import { Radio as Ie } from "@starasia/radio";
43
43
  export * from "@starasia/radio";
@@ -54,9 +54,9 @@ export * from "@starasia/story-record";
54
54
  import { Skeleton as lA } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  import { jsx as A, jsxs as s, Fragment as U } from "react/jsx-runtime";
57
- import gA, { createContext as ue, useState as b, useContext as ke, memo as _, useRef as eA, useEffect as W, useLayoutEffect as NA, useMemo as cA, isValidElement as Ae, forwardRef as KA, useCallback as ZA, Children as Ee, useImperativeHandle as Me } from "react";
57
+ import gA, { createContext as ue, useState as b, useContext as ke, memo as _, useRef as eA, useEffect as W, useLayoutEffect as FA, useMemo as cA, isValidElement as ee, forwardRef as ZA, useCallback as HA, Children as Ee, useImperativeHandle as Me } from "react";
58
58
  import "@starasia/css/dist/style.css";
59
- import { useSearchParams as uA, useNavigate as ee, useLocation as fA, Outlet as TA, Link as me, useParams as ie } from "react-router";
59
+ import { useSearchParams as uA, useNavigate as ie, useLocation as fA, Outlet as UA, Link as me, useParams as te } from "react-router";
60
60
  import ye from "react-easy-crop";
61
61
  const xe = {
62
62
  menus: [],
@@ -66,7 +66,7 @@ const xe = {
66
66
  userData: null,
67
67
  setUserData: () => {
68
68
  }
69
- }, te = ue(xe), fe = () => ke(te), Se = (e) => {
69
+ }, re = ue(xe), fe = () => ke(re), Se = (e) => {
70
70
  const [i, r] = b(
71
71
  (e == null ? void 0 : e.initialUserData) || null
72
72
  );
@@ -85,7 +85,7 @@ const xe = {
85
85
  }) => {
86
86
  const c = Se({ initialUserData: n }), { theme: g } = he();
87
87
  return /* @__PURE__ */ A(
88
- te.Provider,
88
+ re.Provider,
89
89
  {
90
90
  value: {
91
91
  logo: o,
@@ -95,7 +95,7 @@ const xe = {
95
95
  setUserData: c.setUserData,
96
96
  menuBottom: r
97
97
  },
98
- children: l ? /* @__PURE__ */ A(qA, { value: l, children: e }) : g ? /* @__PURE__ */ A(qA, { value: g, children: e }) : e
98
+ children: l ? /* @__PURE__ */ A(TA, { value: l, children: e }) : g ? /* @__PURE__ */ A(TA, { value: g, children: e }) : e
99
99
  }
100
100
  );
101
101
  }, Nt = _(Le);
@@ -288,7 +288,7 @@ function Ft({
288
288
  sidebarHeaderContent: c,
289
289
  showModuleSwitcher: g = !0
290
290
  }) {
291
- const [C] = uA(), Q = C.get("embed") === "true", w = fe(), B = ee(), I = fA(), h = !X("md"), [j, p] = b(!1), [N, R] = b(!1), [x, u] = b(!1), [P, Z] = b(/* @__PURE__ */ new Set()), [V, AA] = b(!1), [H, k] = b(null), G = eA(null), E = eA(null);
291
+ const [C] = uA(), Q = C.get("embed") === "true", w = fe(), B = ie(), I = fA(), h = !X("md"), [j, p] = b(!1), [N, R] = b(!1), [x, u] = b(!1), [P, Z] = b(/* @__PURE__ */ new Set()), [V, AA] = b(!1), [H, k] = b(null), G = eA(null), E = eA(null);
292
292
  W(() => {
293
293
  const m = G.current;
294
294
  if (!m) return;
@@ -303,13 +303,13 @@ function Ft({
303
303
  aA = !1;
304
304
  }));
305
305
  };
306
- NA(() => {
306
+ FA(() => {
307
307
  aA = !0, D();
308
308
  const m = setTimeout(() => {
309
309
  aA = !1;
310
310
  }, 300);
311
311
  return () => clearTimeout(m);
312
- }, []), NA(() => {
312
+ }, []), FA(() => {
313
313
  w.menus.length > 0 && (EA > 0 ? D() : requestAnimationFrame(() => {
314
314
  var y;
315
315
  const m = (y = G.current) == null ? void 0 : y.querySelector(
@@ -382,7 +382,7 @@ function Ft({
382
382
  const S = w.menus.find((tA) => tA.id === m), v = (y = S == null ? void 0 : S.items[0]) == null ? void 0 : y.to;
383
383
  v && B(v);
384
384
  }
385
- }, le = cA(() => {
385
+ }, GA = cA(() => {
386
386
  if (H !== null)
387
387
  return w.menus.filter(
388
388
  (S) => S.id === H || S.parentGroupId === H
@@ -395,7 +395,7 @@ function Ft({
395
395
  }, [w.menus, H]);
396
396
  return W(() => {
397
397
  g || AA(!1);
398
- }, [g]), Q ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A(TA, {}) }) : /* @__PURE__ */ s(U, { children: [
398
+ }, [g]), Q ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A(UA, {}) }) : /* @__PURE__ */ s(U, { children: [
399
399
  /* @__PURE__ */ s(
400
400
  "div",
401
401
  {
@@ -622,7 +622,7 @@ function Ft({
622
622
  paddingTop: "0.5rem",
623
623
  paddingBottom: "0.5rem"
624
624
  },
625
- children: le.map((m) => /* @__PURE__ */ s("div", { style: { marginBottom: "1rem" }, children: [
625
+ children: GA.map((m) => /* @__PURE__ */ s("div", { style: { marginBottom: "1rem" }, children: [
626
626
  (!N || h) && /* @__PURE__ */ A(
627
627
  "div",
628
628
  {
@@ -753,11 +753,11 @@ function Ft({
753
753
  transition: "all 0.2s",
754
754
  cursor: "pointer"
755
755
  },
756
- onMouseEnter: (GA) => {
757
- iA($.to) || (GA.currentTarget.style.backgroundColor = "#f3f4f6");
756
+ onMouseEnter: (OA) => {
757
+ iA($.to) || (OA.currentTarget.style.backgroundColor = "#f3f4f6");
758
758
  },
759
- onMouseLeave: (GA) => {
760
- iA($.to) || (GA.currentTarget.style.backgroundColor = "transparent");
759
+ onMouseLeave: (OA) => {
760
+ iA($.to) || (OA.currentTarget.style.backgroundColor = "transparent");
761
761
  },
762
762
  children: [
763
763
  /* @__PURE__ */ A(
@@ -963,7 +963,7 @@ function Ft({
963
963
  flex: 1,
964
964
  overflowY: "auto"
965
965
  },
966
- children: e || /* @__PURE__ */ A(TA, {})
966
+ children: e || /* @__PURE__ */ A(UA, {})
967
967
  }
968
968
  )
969
969
  ] })
@@ -1134,7 +1134,7 @@ const zt = _(
1134
1134
  /* @__PURE__ */ A(CA, { style: l, children: C() })
1135
1135
  ] });
1136
1136
  }
1137
- ), pe = _(({ fields: e, separator: i, labelWidth: r }) => /* @__PURE__ */ A($A, { children: e.map((o, t) => /* @__PURE__ */ A(
1137
+ ), pe = _(({ fields: e, separator: i, labelWidth: r }) => /* @__PURE__ */ A(_A, { children: e.map((o, t) => /* @__PURE__ */ A(
1138
1138
  Ye,
1139
1139
  {
1140
1140
  separator: i,
@@ -1262,13 +1262,13 @@ const zt = _(
1262
1262
  containerProps: c,
1263
1263
  headerProps: g
1264
1264
  }) => {
1265
- const C = X("lg"), Q = ee(), w = e == null ? void 0 : e.show, B = () => {
1265
+ const C = X("lg"), Q = ie(), w = e == null ? void 0 : e.show, B = () => {
1266
1266
  if (typeof (e == null ? void 0 : e.onClick) == "function") {
1267
1267
  e.onClick();
1268
1268
  return;
1269
1269
  }
1270
1270
  Q(-1, { replace: !0 });
1271
- }, I = () => n ? Ae(n) ? n : /* @__PURE__ */ A(a, { direction: "row", gap: "lg", children: n.map(
1271
+ }, I = () => n ? ee(n) ? n : /* @__PURE__ */ A(a, { direction: "row", gap: "lg", children: n.map(
1272
1272
  ({ title: p, icon: N, buttonProps: R, onClick: x }, u) => !p && !N ? null : /* @__PURE__ */ A(
1273
1273
  O,
1274
1274
  {
@@ -1353,7 +1353,7 @@ const zt = _(
1353
1353
  children: [
1354
1354
  typeof i == "string" ? /* @__PURE__ */ s(a, { direction: "row", gap: "lg", align: "center", children: [
1355
1355
  /* @__PURE__ */ A(d, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: i }),
1356
- r && /* @__PURE__ */ A(PA, { border: !0, size: "lg", text: r, ...l })
1356
+ r && /* @__PURE__ */ A(VA, { border: !0, size: "lg", text: r, ...l })
1357
1357
  ] }) : i,
1358
1358
  I()
1359
1359
  ]
@@ -1369,7 +1369,7 @@ const zt = _(
1369
1369
  }, Ht = _(Ne), Fe = {
1370
1370
  icon: "Cross",
1371
1371
  title: ""
1372
- }, SA = KA(
1372
+ }, SA = ZA(
1373
1373
  ({
1374
1374
  onHide: e,
1375
1375
  show: i,
@@ -1481,7 +1481,7 @@ const zt = _(
1481
1481
  headerProps: I = { borderBottom: !0 },
1482
1482
  variantTag: L = "info"
1483
1483
  }) => {
1484
- const h = X("lg"), [j, p] = uA(), N = j.get(g), R = DA(j.toString()), x = ZA(
1484
+ const h = X("lg"), [j, p] = uA(), N = j.get(g), R = DA(j.toString()), x = HA(
1485
1485
  ({ target: { value: V } }) => {
1486
1486
  c && c(V), g && p({ ...R, [g]: V });
1487
1487
  },
@@ -1498,7 +1498,7 @@ const zt = _(
1498
1498
  }
1499
1499
  ), P = () => r ? /* @__PURE__ */ s(a, { direction: "row", gap: "sm", align: "center", children: [
1500
1500
  /* @__PURE__ */ A(d, { fontWeight: "medium", children: i }),
1501
- /* @__PURE__ */ A(PA, { border: !0, text: r, variant: L })
1501
+ /* @__PURE__ */ A(VA, { border: !0, text: r, variant: L })
1502
1502
  ] }) : /* @__PURE__ */ A(d, { fontWeight: "medium", children: i });
1503
1503
  return /* @__PURE__ */ s(
1504
1504
  a,
@@ -1601,9 +1601,9 @@ const zt = _(
1601
1601
  Q.id || w
1602
1602
  )) })
1603
1603
  ] });
1604
- }, qt = _(qe), re = gA.memo(({ text: e, onClose: i }) => {
1604
+ }, qt = _(qe), oe = gA.memo(({ text: e, onClose: i }) => {
1605
1605
  var o, t;
1606
- const r = zA();
1606
+ const r = KA();
1607
1607
  return /* @__PURE__ */ s(
1608
1608
  a,
1609
1609
  {
@@ -1649,12 +1649,12 @@ const zt = _(
1649
1649
  gap: "sm",
1650
1650
  flexWrap: "nowrap",
1651
1651
  style: { minWidth: "max-content" },
1652
- children: e == null ? void 0 : e.map((r, o) => r.valueText ? /* @__PURE__ */ A(re, { text: r.valueText, onClose: () => i == null ? void 0 : i(r) }, o) : null)
1652
+ children: e == null ? void 0 : e.map((r, o) => r.valueText ? /* @__PURE__ */ A(oe, { text: r.valueText, onClose: () => i == null ? void 0 : i(r) }, o) : null)
1653
1653
  }
1654
- )), UA = (e) => JSON.stringify(e), Ue = (e) => {
1654
+ )), WA = (e) => JSON.stringify(e), Ue = (e) => {
1655
1655
  const i = e;
1656
1656
  return i.hasOwnProperty("from") && i.hasOwnProperty("to") ? !i.from || !i.to ? void 0 : JSON.stringify(e) : e.toISOString();
1657
- }, WA = (e, i) => [], We = (e, i) => {
1657
+ }, RA = (e, i) => [], We = (e, i) => {
1658
1658
  if (!e)
1659
1659
  return i ? { from: /* @__PURE__ */ new Date(), to: /* @__PURE__ */ new Date() } : void 0;
1660
1660
  if (i)
@@ -1692,8 +1692,8 @@ const zt = _(
1692
1692
  g
1693
1693
  )) });
1694
1694
  }
1695
- ), oe = gA.memo(
1696
- KA(
1695
+ ), ne = gA.memo(
1696
+ ZA(
1697
1697
  ({
1698
1698
  label: e,
1699
1699
  type: i,
@@ -1731,12 +1731,12 @@ const zt = _(
1731
1731
  placeholder: n,
1732
1732
  onChange: (H) => o == null ? void 0 : o({ value: H, name: c, type: i }),
1733
1733
  dropdownLists: r || [],
1734
- defaultValue: w || WA()
1734
+ defaultValue: w || RA()
1735
1735
  }
1736
1736
  );
1737
1737
  case "date":
1738
1738
  return /* @__PURE__ */ A(
1739
- VA,
1739
+ XA,
1740
1740
  {
1741
1741
  input: I,
1742
1742
  filter: B,
@@ -1751,7 +1751,7 @@ const zt = _(
1751
1751
  ve,
1752
1752
  {
1753
1753
  multiple: g,
1754
- value: w || WA(),
1754
+ value: w || RA(),
1755
1755
  onChange: (H) => o == null ? void 0 : o({ value: H, name: c, type: i }),
1756
1756
  options: r
1757
1757
  }
@@ -1778,7 +1778,7 @@ const zt = _(
1778
1778
  }
1779
1779
  };
1780
1780
  return u ? /* @__PURE__ */ A(a, { marginBottom: "lg", children: t == null ? void 0 : t.map((H, k) => /* @__PURE__ */ A(
1781
- oe,
1781
+ ne,
1782
1782
  {
1783
1783
  ref: x,
1784
1784
  onChange: o,
@@ -1810,10 +1810,10 @@ const zt = _(
1810
1810
  Ue(B);
1811
1811
  break;
1812
1812
  case "dropdown":
1813
- UA(B);
1813
+ WA(B);
1814
1814
  break;
1815
1815
  case "select-button":
1816
- UA(B);
1816
+ WA(B);
1817
1817
  break;
1818
1818
  }
1819
1819
  }, w = () => {
@@ -1833,7 +1833,7 @@ const zt = _(
1833
1833
  children: [
1834
1834
  /* @__PURE__ */ A(Re, { title: i, resetButton: { onClick: w } }),
1835
1835
  c || l ? null : /* @__PURE__ */ A(a, { children: r == null ? void 0 : r.map((B, I) => /* @__PURE__ */ A(
1836
- oe,
1836
+ ne,
1837
1837
  {
1838
1838
  borderBottom: I !== r.length - 1,
1839
1839
  onChange: Q,
@@ -1849,7 +1849,7 @@ const zt = _(
1849
1849
  }
1850
1850
  ), Ve = gA.memo(({ active: e, onClick: i }) => {
1851
1851
  var o, t;
1852
- const r = zA();
1852
+ const r = KA();
1853
1853
  return /* @__PURE__ */ A(
1854
1854
  BA,
1855
1855
  {
@@ -2047,12 +2047,12 @@ const nr = (e) => {
2047
2047
  i[r] = e[r];
2048
2048
  }
2049
2049
  }), i;
2050
- }, FA = (e, i) => {
2050
+ }, zA = (e, i) => {
2051
2051
  let r;
2052
2052
  return i == null || i.forEach((o) => {
2053
2053
  var t;
2054
2054
  if ((t = o == null ? void 0 : o.fields) != null && t.length) {
2055
- const n = FA(e, o == null ? void 0 : o.fields);
2055
+ const n = zA(e, o == null ? void 0 : o.fields);
2056
2056
  n && (r = n);
2057
2057
  } else (o == null ? void 0 : o.name) === e && (r = o);
2058
2058
  }), r;
@@ -2064,11 +2064,11 @@ const nr = (e) => {
2064
2064
  o(x);
2065
2065
  }, B = l ? ii(l) : void 0, I = !!(B && ((R = Object.values(B)) == null ? void 0 : R.length) > 0), L = () => B ? Object.keys(B).map((x) => {
2066
2066
  var H, k, G;
2067
- const u = FA(x, i.fields), P = [];
2067
+ const u = zA(x, i.fields), P = [];
2068
2068
  let Z = "";
2069
2069
  const V = (H = u == null ? void 0 : u.childrenKey) == null ? void 0 : H.length, AA = u == null ? void 0 : u.parentKey;
2070
2070
  switch (V && ((k = u == null ? void 0 : u.childrenKey) == null || k.forEach((E) => {
2071
- const D = FA(E, i.fields);
2071
+ const D = zA(E, i.fields);
2072
2072
  D && P.push({
2073
2073
  name: D == null ? void 0 : D.name,
2074
2074
  label: D == null ? void 0 : D.label,
@@ -2139,7 +2139,7 @@ const nr = (e) => {
2139
2139
  Container: Pe,
2140
2140
  Toggle: Ve,
2141
2141
  Chips: Te,
2142
- Chip: re
2142
+ Chip: oe
2143
2143
  }, ti = (e) => /* @__PURE__ */ A(d, { variant: "h1", children: e.children, ...e.props }), ri = (e) => /* @__PURE__ */ A(d, { variant: "h2", children: e.children, ...e.props }), oi = (e) => /* @__PURE__ */ A(d, { variant: "h3", children: e.children, ...e.props }), ni = (e) => /* @__PURE__ */ A(d, { variant: "h4", children: e.children, ...e.props }), li = (e) => /* @__PURE__ */ A(d, { variant: "h5", children: e.children, ...e.props }), ci = (e) => /* @__PURE__ */ A(d, { variant: "h6", children: e.children, ...e.props }), gi = (e) => /* @__PURE__ */ A(d, { variant: "sub-h1", children: e.children, ...e.props }), si = (e) => /* @__PURE__ */ A(d, { variant: "sub-h2", children: e.children, ...e.props }), ai = (e) => /* @__PURE__ */ A(d, { variant: "sub-h3", children: e.children, ...e.props }), Ci = (e) => /* @__PURE__ */ A(d, { variant: "body-1", children: e.children, ...e.props }), Bi = (e) => /* @__PURE__ */ A(d, { variant: "body-2", children: e.children, ...e.props }), wi = (e) => /* @__PURE__ */ A(d, { variant: "body-3", children: e.children, ...e.props }), q = {
2144
2144
  H1: ti,
2145
2145
  H2: ri,
@@ -2153,8 +2153,8 @@ const nr = (e) => {
2153
2153
  Body1: Ci,
2154
2154
  Body2: Bi,
2155
2155
  Body3: wi
2156
- }, HA = () => {
2157
- const [e, i] = uA(), r = DA(e.toString()), o = ie(), t = fA(), n = o.id;
2156
+ }, JA = () => {
2157
+ const [e, i] = uA(), r = DA(e.toString()), o = te(), t = fA(), n = o.id;
2158
2158
  return {
2159
2159
  // query params
2160
2160
  setSearchParams: i,
@@ -2171,7 +2171,7 @@ const nr = (e) => {
2171
2171
  id: n,
2172
2172
  hasId: !!n
2173
2173
  };
2174
- }, Qi = (e) => JSON.stringify(e), di = (e) => JSON.stringify(e), hi = (e) => JSON.stringify(e), Di = (e) => JSON.stringify(e), Ii = (e) => e, ui = (e) => JSON.stringify(e), RA = ({
2174
+ }, Qi = (e) => JSON.stringify(e), di = (e) => JSON.stringify(e), hi = (e) => JSON.stringify(e), Di = (e) => JSON.stringify(e), Ii = (e) => e, ui = (e) => JSON.stringify(e), vA = ({
2175
2175
  value: e,
2176
2176
  name: i,
2177
2177
  type: r,
@@ -2225,7 +2225,7 @@ const nr = (e) => {
2225
2225
  t(I);
2226
2226
  }
2227
2227
  }
2228
- }, OA = ({
2228
+ }, bA = ({
2229
2229
  name: e,
2230
2230
  filterKey: i = "filter",
2231
2231
  searchParams: r,
@@ -2283,7 +2283,7 @@ const nr = (e) => {
2283
2283
  pageKey: o,
2284
2284
  filters: t
2285
2285
  }) => {
2286
- const { searchParams: n, setSearchParams: l, searchQueries: c } = HA(), [g, C] = b({}), Q = () => {
2286
+ const { searchParams: n, setSearchParams: l, searchQueries: c } = JA(), [g, C] = b({}), Q = () => {
2287
2287
  n.delete(r || "filter"), l(n);
2288
2288
  }, w = (B, I) => {
2289
2289
  switch (B.type) {
@@ -2341,7 +2341,7 @@ const nr = (e) => {
2341
2341
  }) => {
2342
2342
  const p = (B == null ? void 0 : B.isShowLabel) ?? !0, [N, R] = b(!1), [x, u] = b(0), P = () => {
2343
2343
  u((z) => z + 1);
2344
- }, { searchParams: Z, setSearchParams: V, getQueryParam: AA } = HA(), H = DA(Z.toString()), k = ki(e, Z, c) || "", [G, E] = b(k), D = AA(c), f = !!(D && !(() => {
2344
+ }, { searchParams: Z, setSearchParams: V, getQueryParam: AA } = JA(), H = DA(Z.toString()), k = ki(e, Z, c) || "", [G, E] = b(k), D = AA(c), f = !!(D && !(() => {
2345
2345
  if (D)
2346
2346
  try {
2347
2347
  const z = JSON.parse(D);
@@ -2357,7 +2357,7 @@ const nr = (e) => {
2357
2357
  if (G === k)
2358
2358
  return;
2359
2359
  const z = window.setTimeout(() => {
2360
- RA({
2360
+ vA({
2361
2361
  value: G,
2362
2362
  name: e,
2363
2363
  type: "search",
@@ -2398,6 +2398,21 @@ const nr = (e) => {
2398
2398
  children: /* @__PURE__ */ A(d, { color: "error", fontWeight: "semibold", children: "Reset" })
2399
2399
  }
2400
2400
  ) }),
2401
+ t == null ? void 0 : t.map(({ minWidth: z, content: iA, title: sA, onClickContainer: LA }, GA) => /* @__PURE__ */ s(
2402
+ a,
2403
+ {
2404
+ gap: "sm",
2405
+ onClick: LA,
2406
+ style: {
2407
+ minWidth: z
2408
+ },
2409
+ children: [
2410
+ sA && /* @__PURE__ */ A(q.SubH3, { children: sA }),
2411
+ iA
2412
+ ]
2413
+ },
2414
+ `extended-filter-${GA}-${x}`
2415
+ )),
2401
2416
  !!(w != null && w.length) && /* @__PURE__ */ A(
2402
2417
  O,
2403
2418
  {
@@ -2440,20 +2455,20 @@ const nr = (e) => {
2440
2455
  value: "inactive"
2441
2456
  }
2442
2457
  ],
2443
- defaultValue: OA({
2458
+ defaultValue: bA({
2444
2459
  get: "value",
2445
2460
  name: i,
2446
2461
  searchParams: Z,
2447
2462
  filterKey: c
2448
2463
  }) ? [
2449
2464
  {
2450
- label: OA({
2465
+ label: bA({
2451
2466
  get: "value",
2452
2467
  name: i,
2453
2468
  searchParams: Z,
2454
2469
  filterKey: c
2455
2470
  }) === "active" ? "Active" : "InActive",
2456
- value: OA({
2471
+ value: bA({
2457
2472
  get: "value",
2458
2473
  name: i,
2459
2474
  searchParams: Z,
@@ -2461,7 +2476,7 @@ const nr = (e) => {
2461
2476
  })
2462
2477
  }
2463
2478
  ] : [],
2464
- onChange: (z) => RA({
2479
+ onChange: (z) => vA({
2465
2480
  value: z,
2466
2481
  name: i,
2467
2482
  type: "dropdown",
@@ -2502,21 +2517,6 @@ const nr = (e) => {
2502
2517
  ]
2503
2518
  }
2504
2519
  ),
2505
- t == null ? void 0 : t.map(({ minWidth: z, content: iA, title: sA, onClickContainer: LA }) => /* @__PURE__ */ s(
2506
- a,
2507
- {
2508
- gap: "sm",
2509
- onClick: LA,
2510
- style: {
2511
- minWidth: z
2512
- },
2513
- children: [
2514
- /* @__PURE__ */ A(q.SubH3, { children: sA }),
2515
- iA
2516
- ]
2517
- },
2518
- sA + x
2519
- )),
2520
2520
  /* @__PURE__ */ A(
2521
2521
  Ei,
2522
2522
  {
@@ -2562,7 +2562,7 @@ const nr = (e) => {
2562
2562
  advanceFilter: i,
2563
2563
  showFilter: r = !0
2564
2564
  }) => {
2565
- const o = X("md"), t = () => e ? Ae(e) ? e : /* @__PURE__ */ A(
2565
+ const o = X("md"), t = () => e ? ee(e) ? e : /* @__PURE__ */ A(
2566
2566
  a,
2567
2567
  {
2568
2568
  style: {
@@ -2601,7 +2601,8 @@ const nr = (e) => {
2601
2601
  paddingBottom: "8px",
2602
2602
  borderBottom: "1px solid var(--starasia-ui-utility-fill-default)",
2603
2603
  flexShrink: 0,
2604
- zIndex: 2,
2604
+ position: "relative",
2605
+ zIndex: 10,
2605
2606
  flexDirection: o ? "row" : "column-reverse",
2606
2607
  gap: "16px"
2607
2608
  },
@@ -2651,7 +2652,7 @@ const nr = (e) => {
2651
2652
  showPagination: t = !0,
2652
2653
  totalData: n
2653
2654
  }) => {
2654
- const { searchQueries: l, setSearchParams: c, searchParams: g } = HA(), C = g.get(r), Q = (L) => {
2655
+ const { searchQueries: l, setSearchParams: c, searchParams: g } = JA(), C = g.get(r), Q = (L) => {
2655
2656
  c({ ...l, [i]: String(L) });
2656
2657
  }, w = (L) => {
2657
2658
  c({
@@ -2915,7 +2916,7 @@ const nr = (e) => {
2915
2916
  },
2916
2917
  children: [
2917
2918
  /* @__PURE__ */ A(
2918
- jA,
2919
+ NA,
2919
2920
  {
2920
2921
  checked: w.includes(h.value),
2921
2922
  onChange: () => {
@@ -3023,7 +3024,7 @@ const nr = (e) => {
3023
3024
  /* @__PURE__ */ A("path", { d: e ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
3024
3025
  ]
3025
3026
  }
3026
- ), MA = "var(--starasia-ui-table-bg-default, #ffffff)", bA = "var(--starasia-ui-color-gray-100)", Gi = ({
3027
+ ), MA = "var(--starasia-ui-table-bg-default, #ffffff)", YA = "var(--starasia-ui-color-gray-100)", Gi = ({
3027
3028
  columns: e,
3028
3029
  records: i,
3029
3030
  handleDetail: r,
@@ -3052,7 +3053,7 @@ const nr = (e) => {
3052
3053
  P(k.scrollHeight > k.clientHeight);
3053
3054
  }, [i, Q]);
3054
3055
  const Z = eA(null), [V, AA] = b([]);
3055
- NA(() => {
3056
+ FA(() => {
3056
3057
  if (!w || !Z.current) {
3057
3058
  AA([]);
3058
3059
  return;
@@ -3068,7 +3069,7 @@ const nr = (e) => {
3068
3069
  const H = (k) => {
3069
3070
  B && B(k < w ? k : k + 1);
3070
3071
  };
3071
- return /* @__PURE__ */ A("div", { ref: Z, children: /* @__PURE__ */ s($A, { fullWidth: !0, children: [
3072
+ return /* @__PURE__ */ A("div", { ref: Z, children: /* @__PURE__ */ s(_A, { fullWidth: !0, children: [
3072
3073
  /* @__PURE__ */ A(
3073
3074
  we,
3074
3075
  {
@@ -3081,7 +3082,7 @@ const nr = (e) => {
3081
3082
  var F;
3082
3083
  const E = w > 0 && G < w, D = V[G] ?? 0;
3083
3084
  return /* @__PURE__ */ A(
3084
- JA,
3085
+ qA,
3085
3086
  {
3086
3087
  style: {
3087
3088
  position: "sticky",
@@ -3142,7 +3143,7 @@ const nr = (e) => {
3142
3143
  );
3143
3144
  }),
3144
3145
  r || o || t || I ? /* @__PURE__ */ A(
3145
- JA,
3146
+ qA,
3146
3147
  {
3147
3148
  style: {
3148
3149
  backgroundColor: "var(--starasia-ui-table-bg-header)",
@@ -3173,11 +3174,11 @@ const nr = (e) => {
3173
3174
  },
3174
3175
  onMouseOver: (E) => {
3175
3176
  const D = E.currentTarget;
3176
- D.style.backgroundColor = bA, D.style.position = "relative", D.style.zIndex = "2", w > 0 && Array.from(D.querySelectorAll("td")).slice(0, w).forEach((f) => {
3177
- f.style.backgroundColor = bA;
3177
+ D.style.backgroundColor = YA, D.style.position = "relative", D.style.zIndex = "2", w > 0 && Array.from(D.querySelectorAll("td")).slice(0, w).forEach((f) => {
3178
+ f.style.backgroundColor = YA;
3178
3179
  });
3179
3180
  const F = Array.from(D.querySelectorAll("td")).at(-1);
3180
- F && F.style.position === "sticky" && (F.style.backgroundColor = bA);
3181
+ F && F.style.position === "sticky" && (F.style.backgroundColor = YA);
3181
3182
  },
3182
3183
  onMouseOut: (E) => {
3183
3184
  const D = E.currentTarget;
@@ -3320,7 +3321,7 @@ const Qr = bi(Oi), kA = ({
3320
3321
  children: r,
3321
3322
  loading: o,
3322
3323
  isLoading: t
3323
- }) => /* @__PURE__ */ A(U, { children: t ? o : e ? r : i }), ne = ({
3324
+ }) => /* @__PURE__ */ A(U, { children: t ? o : e ? r : i }), le = ({
3324
3325
  item: e,
3325
3326
  handleSwitch: i,
3326
3327
  handleToSelectOrg: r,
@@ -3388,7 +3389,7 @@ const Qr = bi(Oi), kA = ({
3388
3389
  ]
3389
3390
  }
3390
3391
  );
3391
- }, YA = ({
3392
+ }, pA = ({
3392
3393
  dataApps: e,
3393
3394
  handleSwitch: i,
3394
3395
  title: r,
@@ -3405,7 +3406,7 @@ const Qr = bi(Oi), kA = ({
3405
3406
  {
3406
3407
  of: e,
3407
3408
  render: (C) => /* @__PURE__ */ A(
3408
- ne,
3409
+ le,
3409
3410
  {
3410
3411
  item: C,
3411
3412
  showIcon: n,
@@ -3430,7 +3431,7 @@ const Qr = bi(Oi), kA = ({
3430
3431
  setSelectedApp: g
3431
3432
  }) => {
3432
3433
  var Q;
3433
- const C = XA();
3434
+ const C = $A();
3434
3435
  return /* @__PURE__ */ s(SA, { onHide: e, show: i, closeButton: !1, children: [
3435
3436
  /* @__PURE__ */ s(
3436
3437
  BA,
@@ -3475,7 +3476,7 @@ const Qr = bi(Oi), kA = ({
3475
3476
  /* @__PURE__ */ A(lA, { variant: "list" })
3476
3477
  ] }),
3477
3478
  children: /* @__PURE__ */ A(
3478
- YA,
3479
+ pA,
3479
3480
  {
3480
3481
  dataApps: o == null ? void 0 : o.map((w) => {
3481
3482
  var B;
@@ -3512,7 +3513,7 @@ const Qr = bi(Oi), kA = ({
3512
3513
  )
3513
3514
  ] }),
3514
3515
  /* @__PURE__ */ A(
3515
- YA,
3516
+ pA,
3516
3517
  {
3517
3518
  title: "Organization Apps",
3518
3519
  show: r == null ? void 0 : r.some((w) => w.isTenant),
@@ -3525,7 +3526,7 @@ const Qr = bi(Oi), kA = ({
3525
3526
  }
3526
3527
  ),
3527
3528
  /* @__PURE__ */ A(
3528
- YA,
3529
+ pA,
3529
3530
  {
3530
3531
  title: "Single Apps",
3531
3532
  show: r == null ? void 0 : r.some((w) => !w.isTenant),
@@ -3536,7 +3537,7 @@ const Qr = bi(Oi), kA = ({
3536
3537
  )
3537
3538
  ] })
3538
3539
  ] });
3539
- }, pA = ({
3540
+ }, jA = ({
3540
3541
  dataApps: e,
3541
3542
  handleSwitch: i,
3542
3543
  title: r,
@@ -3553,7 +3554,7 @@ const Qr = bi(Oi), kA = ({
3553
3554
  {
3554
3555
  of: e,
3555
3556
  render: (C) => /* @__PURE__ */ A(
3556
- ne,
3557
+ le,
3557
3558
  {
3558
3559
  item: C,
3559
3560
  showIcon: n,
@@ -3575,7 +3576,7 @@ const Qr = bi(Oi), kA = ({
3575
3576
  setSelectedApp: n
3576
3577
  }) => {
3577
3578
  var c, g, C, Q, w;
3578
- const l = XA();
3579
+ const l = $A();
3579
3580
  return /* @__PURE__ */ s(SA, { onHide: e, show: i, closeButton: !1, children: [
3580
3581
  /* @__PURE__ */ s(
3581
3582
  BA,
@@ -3614,7 +3615,7 @@ const Qr = bi(Oi), kA = ({
3614
3615
  {
3615
3616
  condition: !!((C = (g = l.data) == null ? void 0 : g.organizations) != null && C.length),
3616
3617
  children: /* @__PURE__ */ A(
3617
- pA,
3618
+ jA,
3618
3619
  {
3619
3620
  dataApps: (w = (Q = l.data) == null ? void 0 : Q.organizations) == null ? void 0 : w.map((B) => {
3620
3621
  var I;
@@ -3651,7 +3652,7 @@ const Qr = bi(Oi), kA = ({
3651
3652
  )
3652
3653
  ] }),
3653
3654
  /* @__PURE__ */ A(
3654
- pA,
3655
+ jA,
3655
3656
  {
3656
3657
  title: "Organization Apps",
3657
3658
  show: r == null ? void 0 : r.some((B) => B.isTenant),
@@ -3664,7 +3665,7 @@ const Qr = bi(Oi), kA = ({
3664
3665
  }
3665
3666
  ),
3666
3667
  /* @__PURE__ */ A(
3667
- pA,
3668
+ jA,
3668
3669
  {
3669
3670
  title: "Single Apps",
3670
3671
  show: r == null ? void 0 : r.some((B) => !B.isTenant),
@@ -4407,7 +4408,7 @@ const Ji = (e) => {
4407
4408
  ...n.badgeContainerProps,
4408
4409
  children: [
4409
4410
  /* @__PURE__ */ A(
4410
- jA,
4411
+ NA,
4411
4412
  {
4412
4413
  name: B.name,
4413
4414
  value: B.id,
@@ -4421,7 +4422,7 @@ const Ji = (e) => {
4421
4422
  ]
4422
4423
  }
4423
4424
  ) : /* @__PURE__ */ A(
4424
- jA,
4425
+ NA,
4425
4426
  {
4426
4427
  name: B.name,
4427
4428
  value: B.id,
@@ -4670,7 +4671,7 @@ const Ji = (e) => {
4670
4671
  }
4671
4672
  ),
4672
4673
  /* @__PURE__ */ A(
4673
- _A,
4674
+ Ae,
4674
4675
  {
4675
4676
  checked: n.checked,
4676
4677
  onChange: n.onChange,
@@ -4687,7 +4688,7 @@ const Ji = (e) => {
4687
4688
  size: i = "md",
4688
4689
  ...r
4689
4690
  }) => {
4690
- const o = zA(), t = (l) => {
4691
+ const o = KA(), t = (l) => {
4691
4692
  var g, C, Q, w, B, I;
4692
4693
  if (!l) return;
4693
4694
  const c = r.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (C = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.red) == null ? void 0 : C[600] : e === "secondary-primary" ? (w = (Q = o == null ? void 0 : o.computed) == null ? void 0 : Q.blue) == null ? void 0 : w[700] : (I = (B = o == null ? void 0 : o.computed) == null ? void 0 : B.gray) == null ? void 0 : I[50];
@@ -4811,7 +4812,7 @@ const Ji = (e) => {
4811
4812
  width: i === "horizontal" && t.customWidth ? t.customWidth : i === "horizontal" ? "343px" : ""
4812
4813
  },
4813
4814
  children: /* @__PURE__ */ A(
4814
- VA,
4815
+ XA,
4815
4816
  {
4816
4817
  size: e,
4817
4818
  ...t.inputProps,
@@ -4853,7 +4854,7 @@ async function $i(e, i) {
4853
4854
  }, "image/png");
4854
4855
  });
4855
4856
  }
4856
- const vA = {
4857
+ const PA = {
4857
4858
  "1:1": 1,
4858
4859
  "4:3": 4 / 3,
4859
4860
  "16:9": 16 / 9,
@@ -4862,7 +4863,7 @@ const vA = {
4862
4863
  "2:3": 2 / 3,
4863
4864
  "3:2": 3 / 2,
4864
4865
  "32:9": 32 / 9
4865
- }, _i = KA(
4866
+ }, _i = ZA(
4866
4867
  ({
4867
4868
  handleUpload: e,
4868
4869
  urlImage: i,
@@ -4879,7 +4880,7 @@ const vA = {
4879
4880
  W(() => {
4880
4881
  i === null && t(null);
4881
4882
  }, [i]);
4882
- const V = ZA(
4883
+ const V = HA(
4883
4884
  (J, z) => {
4884
4885
  Z(z);
4885
4886
  },
@@ -4915,7 +4916,7 @@ const vA = {
4915
4916
  (J = k.current) == null || J.click();
4916
4917
  }
4917
4918
  }));
4918
- const E = parseInt(n, 10), D = vA[l];
4919
+ const E = parseInt(n, 10), D = PA[l];
4919
4920
  let F, f;
4920
4921
  return D >= 1 ? (f = E, F = E * D) : (F = E, f = E / D), /* @__PURE__ */ s(
4921
4922
  a,
@@ -5070,7 +5071,7 @@ const vA = {
5070
5071
  image: L,
5071
5072
  crop: N,
5072
5073
  zoom: x,
5073
- aspect: l ? vA[l] : void 0,
5074
+ aspect: l ? PA[l] : void 0,
5074
5075
  onCropChange: R,
5075
5076
  onZoomChange: u,
5076
5077
  onCropComplete: V,
@@ -5253,7 +5254,7 @@ const vA = {
5253
5254
  W(() => {
5254
5255
  e && c([...e.map((w) => ({ id: w.id, isActive: w.isActive }))]);
5255
5256
  }, [e]);
5256
- const g = (Q = l.find((w) => w.id === i)) == null ? void 0 : Q.isActive, C = ZA(() => {
5257
+ const g = (Q = l.find((w) => w.id === i)) == null ? void 0 : Q.isActive, C = HA(() => {
5257
5258
  c(
5258
5259
  (w) => w.map((B) => B.id === i ? { ...B, isActive: !B.isActive } : B)
5259
5260
  ), r && r(!g);
@@ -5267,7 +5268,7 @@ const vA = {
5267
5268
  width: o
5268
5269
  },
5269
5270
  children: t && /* @__PURE__ */ A(
5270
- _A,
5271
+ Ae,
5271
5272
  {
5272
5273
  disabled: n,
5273
5274
  checked: g,
@@ -6947,7 +6948,7 @@ function Lr({
6947
6948
  }, [o.pathname]);
6948
6949
  }
6949
6950
  const Gr = () => {
6950
- const [e, i] = uA(), r = DA(e.toString()), o = ie(), t = fA(), n = o.id;
6951
+ const [e, i] = uA(), r = DA(e.toString()), o = te(), t = fA(), n = o.id;
6951
6952
  return {
6952
6953
  // query params
6953
6954
  setSearchParams: i,
@@ -6996,7 +6997,7 @@ export {
6996
6997
  Mi as AdvanceFilterBar,
6997
6998
  Nt as App,
6998
6999
  Le as AppComponent,
6999
- te as AppContext,
7000
+ re as AppContext,
7000
7001
  Ft as AppLayout,
7001
7002
  Ir as AsideBar,
7002
7003
  zt as AuthLayout,
@@ -7044,8 +7045,8 @@ export {
7044
7045
  sr as getValueDropdownMultipleFilter,
7045
7046
  ar as getValueRadioFilter,
7046
7047
  ki as getValueSearch,
7047
- OA as getValuesFilter,
7048
- RA as handleChangeFilter,
7048
+ bA as getValuesFilter,
7049
+ vA as handleChangeFilter,
7049
7050
  lr as handleOnScroll,
7050
7051
  rr as isEmail,
7051
7052
  wr as isFilterActive,
@@ -7068,7 +7069,7 @@ export {
7068
7069
  Se as useAppState,
7069
7070
  Or as useAuthRole,
7070
7071
  Lr as useDynamicTitle,
7071
- HA as useRouteInfo,
7072
+ JA as useRouteInfo,
7072
7073
  Gr as useRouteParams,
7073
7074
  Sr as useTabState
7074
7075
  };