@starasia/admin 1.3.2 → 1.3.4
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.cjs.js +1 -1
- package/dist/index.es.js +141 -141
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export * from "@starasia/alert";
|
|
2
|
-
import { Badges as
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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";
|
|
@@ -51,12 +51,12 @@ export * from "@starasia/progress";
|
|
|
51
51
|
export * from "@starasia/stepper";
|
|
52
52
|
export * from "@starasia/accordion";
|
|
53
53
|
export * from "@starasia/story-record";
|
|
54
|
-
import { Skeleton as
|
|
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
|
|
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
|
|
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
|
-
},
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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
|
-
|
|
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
|
-
}, []),
|
|
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(
|
|
@@ -359,7 +359,7 @@ function Ft({
|
|
|
359
359
|
});
|
|
360
360
|
});
|
|
361
361
|
}, [I.pathname, w.menus]);
|
|
362
|
-
const
|
|
362
|
+
const sA = (m) => {
|
|
363
363
|
Z((y) => {
|
|
364
364
|
const S = new Set(y);
|
|
365
365
|
return S.has(m) ? S.delete(m) : S.add(m), S;
|
|
@@ -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
|
-
},
|
|
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(
|
|
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:
|
|
625
|
+
children: GA.map((m) => /* @__PURE__ */ s("div", { style: { marginBottom: "1rem" }, children: [
|
|
626
626
|
(!N || h) && /* @__PURE__ */ A(
|
|
627
627
|
"div",
|
|
628
628
|
{
|
|
@@ -648,7 +648,7 @@ function Ft({
|
|
|
648
648
|
"button",
|
|
649
649
|
{
|
|
650
650
|
onClick: () => {
|
|
651
|
-
S ?
|
|
651
|
+
S ? sA(y.id) : B(y.to);
|
|
652
652
|
},
|
|
653
653
|
style: {
|
|
654
654
|
width: "100%",
|
|
@@ -753,11 +753,11 @@ function Ft({
|
|
|
753
753
|
transition: "all 0.2s",
|
|
754
754
|
cursor: "pointer"
|
|
755
755
|
},
|
|
756
|
-
onMouseEnter: (
|
|
757
|
-
iA($.to) || (
|
|
756
|
+
onMouseEnter: (OA) => {
|
|
757
|
+
iA($.to) || (OA.currentTarget.style.backgroundColor = "#f3f4f6");
|
|
758
758
|
},
|
|
759
|
-
onMouseLeave: (
|
|
760
|
-
iA($.to) || (
|
|
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(
|
|
966
|
+
children: e || /* @__PURE__ */ A(UA, {})
|
|
967
967
|
}
|
|
968
968
|
)
|
|
969
969
|
] })
|
|
@@ -1111,14 +1111,14 @@ const zt = _(
|
|
|
1111
1111
|
lastIndex: t,
|
|
1112
1112
|
labelAlign: n = "top"
|
|
1113
1113
|
}) => {
|
|
1114
|
-
const l =
|
|
1114
|
+
const l = cA(
|
|
1115
1115
|
() => ({
|
|
1116
1116
|
padding: 0,
|
|
1117
1117
|
paddingBottom: t ? 0 : 8,
|
|
1118
1118
|
verticalAlign: n
|
|
1119
1119
|
}),
|
|
1120
1120
|
[t]
|
|
1121
|
-
), c =
|
|
1121
|
+
), c = cA(
|
|
1122
1122
|
() => ({
|
|
1123
1123
|
padding: 0,
|
|
1124
1124
|
paddingRight: 8,
|
|
@@ -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(
|
|
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,
|
|
@@ -1151,7 +1151,7 @@ const zt = _(
|
|
|
1151
1151
|
fields: o = [],
|
|
1152
1152
|
labelWidth: t = 150
|
|
1153
1153
|
}) => {
|
|
1154
|
-
const n =
|
|
1154
|
+
const n = cA(
|
|
1155
1155
|
() => be(o, e),
|
|
1156
1156
|
[o, e]
|
|
1157
1157
|
), l = n.length > 2, c = () => {
|
|
@@ -1262,13 +1262,13 @@ const zt = _(
|
|
|
1262
1262
|
containerProps: c,
|
|
1263
1263
|
headerProps: g
|
|
1264
1264
|
}) => {
|
|
1265
|
-
const C = X("lg"), Q =
|
|
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 ?
|
|
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(
|
|
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 =
|
|
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 =
|
|
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(
|
|
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,
|
|
@@ -1565,7 +1565,7 @@ const zt = _(
|
|
|
1565
1565
|
iconProps: c,
|
|
1566
1566
|
variant: g = "default"
|
|
1567
1567
|
}) => {
|
|
1568
|
-
const C =
|
|
1568
|
+
const C = cA(
|
|
1569
1569
|
() => ({
|
|
1570
1570
|
zIndex: 10,
|
|
1571
1571
|
width: "150px",
|
|
@@ -1601,9 +1601,9 @@ const zt = _(
|
|
|
1601
1601
|
Q.id || w
|
|
1602
1602
|
)) })
|
|
1603
1603
|
] });
|
|
1604
|
-
}, qt = _(qe),
|
|
1604
|
+
}, qt = _(qe), oe = gA.memo(({ text: e, onClose: i }) => {
|
|
1605
1605
|
var o, t;
|
|
1606
|
-
const r =
|
|
1606
|
+
const r = KA();
|
|
1607
1607
|
return /* @__PURE__ */ s(
|
|
1608
1608
|
a,
|
|
1609
1609
|
{
|
|
@@ -1642,19 +1642,19 @@ const zt = _(
|
|
|
1642
1642
|
]
|
|
1643
1643
|
}
|
|
1644
1644
|
);
|
|
1645
|
-
}), Te =
|
|
1645
|
+
}), Te = gA.memo(({ items: e = [], onClose: i }) => /* @__PURE__ */ A(
|
|
1646
1646
|
a,
|
|
1647
1647
|
{
|
|
1648
1648
|
direction: "row",
|
|
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(
|
|
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
|
-
)),
|
|
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
|
-
},
|
|
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)
|
|
@@ -1672,10 +1672,10 @@ const zt = _(
|
|
|
1672
1672
|
}
|
|
1673
1673
|
let r = new Date(e);
|
|
1674
1674
|
return r = typeof e != "object" ? void 0 : r, r;
|
|
1675
|
-
}, Re =
|
|
1675
|
+
}, Re = gA.memo(({ title: e, resetButton: i }) => /* @__PURE__ */ s(a, { direction: "row", justify: "space-between", marginBottom: "md", children: [
|
|
1676
1676
|
/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(d, { fontWeight: "bold", children: e }) }),
|
|
1677
1677
|
/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(BA, { onClick: i == null ? void 0 : i.onClick, children: /* @__PURE__ */ A(d, { fontWeight: "bold", color: "error", children: (i == null ? void 0 : i.label) || "Reset" }) }) })
|
|
1678
|
-
] })), ve =
|
|
1678
|
+
] })), ve = gA.memo(
|
|
1679
1679
|
({ value: e, options: i = [], onChange: r, multiple: o }) => {
|
|
1680
1680
|
const t = (e == null ? void 0 : e.map((c) => c.value)) || [], n = (i == null ? void 0 : i.filter((c) => t.includes(c.value))) || [], l = (c) => {
|
|
1681
1681
|
const g = [...n];
|
|
@@ -1692,8 +1692,8 @@ const zt = _(
|
|
|
1692
1692
|
g
|
|
1693
1693
|
)) });
|
|
1694
1694
|
}
|
|
1695
|
-
),
|
|
1696
|
-
|
|
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 ||
|
|
1734
|
+
defaultValue: w || RA()
|
|
1735
1735
|
}
|
|
1736
1736
|
);
|
|
1737
1737
|
case "date":
|
|
1738
1738
|
return /* @__PURE__ */ A(
|
|
1739
|
-
|
|
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 ||
|
|
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
|
-
|
|
1781
|
+
ne,
|
|
1782
1782
|
{
|
|
1783
1783
|
ref: x,
|
|
1784
1784
|
onChange: o,
|
|
@@ -1793,7 +1793,7 @@ const zt = _(
|
|
|
1793
1793
|
] });
|
|
1794
1794
|
}
|
|
1795
1795
|
)
|
|
1796
|
-
), Pe =
|
|
1796
|
+
), Pe = gA.memo(
|
|
1797
1797
|
({
|
|
1798
1798
|
show: e,
|
|
1799
1799
|
title: i,
|
|
@@ -1810,10 +1810,10 @@ const zt = _(
|
|
|
1810
1810
|
Ue(B);
|
|
1811
1811
|
break;
|
|
1812
1812
|
case "dropdown":
|
|
1813
|
-
|
|
1813
|
+
WA(B);
|
|
1814
1814
|
break;
|
|
1815
1815
|
case "select-button":
|
|
1816
|
-
|
|
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
|
-
|
|
1836
|
+
ne,
|
|
1837
1837
|
{
|
|
1838
1838
|
borderBottom: I !== r.length - 1,
|
|
1839
1839
|
onChange: Q,
|
|
@@ -1847,9 +1847,9 @@ const zt = _(
|
|
|
1847
1847
|
}
|
|
1848
1848
|
) });
|
|
1849
1849
|
}
|
|
1850
|
-
), Ve =
|
|
1850
|
+
), Ve = gA.memo(({ active: e, onClick: i }) => {
|
|
1851
1851
|
var o, t;
|
|
1852
|
-
const r =
|
|
1852
|
+
const r = KA();
|
|
1853
1853
|
return /* @__PURE__ */ A(
|
|
1854
1854
|
BA,
|
|
1855
1855
|
{
|
|
@@ -2047,28 +2047,28 @@ const nr = (e) => {
|
|
|
2047
2047
|
i[r] = e[r];
|
|
2048
2048
|
}
|
|
2049
2049
|
}), i;
|
|
2050
|
-
},
|
|
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 =
|
|
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;
|
|
2059
2059
|
}, cr = (e) => {
|
|
2060
2060
|
var R;
|
|
2061
|
-
const i =
|
|
2061
|
+
const i = cA(() => ({ ...ei, ...e }), [e]), [r, o] = b(!1), [t, n] = b(!1), [l] = b(void 0), c = () => n(!0), g = () => n(!1), C = t ? g : c, Q = () => {
|
|
2062
2062
|
o(!0);
|
|
2063
2063
|
}, w = (x) => {
|
|
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 =
|
|
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 =
|
|
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:
|
|
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
|
-
},
|
|
2157
|
-
const [e, i] = uA(), r = DA(e.toString()), o =
|
|
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),
|
|
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
|
-
},
|
|
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 } =
|
|
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 } =
|
|
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
|
-
|
|
2360
|
+
vA({
|
|
2361
2361
|
value: G,
|
|
2362
2362
|
name: e,
|
|
2363
2363
|
type: "search",
|
|
@@ -2398,7 +2398,7 @@ 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:
|
|
2401
|
+
t == null ? void 0 : t.map(({ minWidth: z, content: iA, title: sA, onClickContainer: LA }, GA) => /* @__PURE__ */ s(
|
|
2402
2402
|
a,
|
|
2403
2403
|
{
|
|
2404
2404
|
gap: "sm",
|
|
@@ -2407,11 +2407,11 @@ const nr = (e) => {
|
|
|
2407
2407
|
minWidth: z
|
|
2408
2408
|
},
|
|
2409
2409
|
children: [
|
|
2410
|
-
|
|
2410
|
+
sA && /* @__PURE__ */ A(q.SubH3, { children: sA }),
|
|
2411
2411
|
iA
|
|
2412
2412
|
]
|
|
2413
2413
|
},
|
|
2414
|
-
|
|
2414
|
+
`extended-filter-${GA}-${x}`
|
|
2415
2415
|
)),
|
|
2416
2416
|
!!(w != null && w.length) && /* @__PURE__ */ A(
|
|
2417
2417
|
O,
|
|
@@ -2455,20 +2455,20 @@ const nr = (e) => {
|
|
|
2455
2455
|
value: "inactive"
|
|
2456
2456
|
}
|
|
2457
2457
|
],
|
|
2458
|
-
defaultValue:
|
|
2458
|
+
defaultValue: bA({
|
|
2459
2459
|
get: "value",
|
|
2460
2460
|
name: i,
|
|
2461
2461
|
searchParams: Z,
|
|
2462
2462
|
filterKey: c
|
|
2463
2463
|
}) ? [
|
|
2464
2464
|
{
|
|
2465
|
-
label:
|
|
2465
|
+
label: bA({
|
|
2466
2466
|
get: "value",
|
|
2467
2467
|
name: i,
|
|
2468
2468
|
searchParams: Z,
|
|
2469
2469
|
filterKey: c
|
|
2470
2470
|
}) === "active" ? "Active" : "InActive",
|
|
2471
|
-
value:
|
|
2471
|
+
value: bA({
|
|
2472
2472
|
get: "value",
|
|
2473
2473
|
name: i,
|
|
2474
2474
|
searchParams: Z,
|
|
@@ -2476,7 +2476,7 @@ const nr = (e) => {
|
|
|
2476
2476
|
})
|
|
2477
2477
|
}
|
|
2478
2478
|
] : [],
|
|
2479
|
-
onChange: (z) =>
|
|
2479
|
+
onChange: (z) => vA({
|
|
2480
2480
|
value: z,
|
|
2481
2481
|
name: i,
|
|
2482
2482
|
type: "dropdown",
|
|
@@ -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 ?
|
|
2565
|
+
const o = X("md"), t = () => e ? ee(e) ? e : /* @__PURE__ */ A(
|
|
2566
2566
|
a,
|
|
2567
2567
|
{
|
|
2568
2568
|
style: {
|
|
@@ -2652,7 +2652,7 @@ const nr = (e) => {
|
|
|
2652
2652
|
showPagination: t = !0,
|
|
2653
2653
|
totalData: n
|
|
2654
2654
|
}) => {
|
|
2655
|
-
const { searchQueries: l, setSearchParams: c, searchParams: g } =
|
|
2655
|
+
const { searchQueries: l, setSearchParams: c, searchParams: g } = JA(), C = g.get(r), Q = (L) => {
|
|
2656
2656
|
c({ ...l, [i]: String(L) });
|
|
2657
2657
|
}, w = (L) => {
|
|
2658
2658
|
c({
|
|
@@ -2717,7 +2717,7 @@ const nr = (e) => {
|
|
|
2717
2717
|
}
|
|
2718
2718
|
);
|
|
2719
2719
|
}, Si = ({ filter: e, columnTitle: i }) => {
|
|
2720
|
-
const [r, o] = b(!1), t = eA(null), n = eA(null), l = eA(null), [c, g] = b(""), [C, Q] = b({ top: 0, left: 0 }), w = e.selectedValues, B =
|
|
2720
|
+
const [r, o] = b(!1), t = eA(null), n = eA(null), l = eA(null), [c, g] = b(""), [C, Q] = b({ top: 0, left: 0 }), w = e.selectedValues, B = cA(() => c ? e.options.filter(
|
|
2721
2721
|
(h) => h.label.toLowerCase().includes(c.toLowerCase())
|
|
2722
2722
|
) : e.options, [e.options, c]);
|
|
2723
2723
|
W(() => {
|
|
@@ -2916,7 +2916,7 @@ const nr = (e) => {
|
|
|
2916
2916
|
},
|
|
2917
2917
|
children: [
|
|
2918
2918
|
/* @__PURE__ */ A(
|
|
2919
|
-
|
|
2919
|
+
NA,
|
|
2920
2920
|
{
|
|
2921
2921
|
checked: w.includes(h.value),
|
|
2922
2922
|
onChange: () => {
|
|
@@ -3024,7 +3024,7 @@ const nr = (e) => {
|
|
|
3024
3024
|
/* @__PURE__ */ A("path", { d: e ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
3025
3025
|
]
|
|
3026
3026
|
}
|
|
3027
|
-
), MA = "var(--starasia-ui-table-bg-default, #ffffff)",
|
|
3027
|
+
), MA = "var(--starasia-ui-table-bg-default, #ffffff)", YA = "var(--starasia-ui-color-gray-100)", Gi = ({
|
|
3028
3028
|
columns: e,
|
|
3029
3029
|
records: i,
|
|
3030
3030
|
handleDetail: r,
|
|
@@ -3053,7 +3053,7 @@ const nr = (e) => {
|
|
|
3053
3053
|
P(k.scrollHeight > k.clientHeight);
|
|
3054
3054
|
}, [i, Q]);
|
|
3055
3055
|
const Z = eA(null), [V, AA] = b([]);
|
|
3056
|
-
|
|
3056
|
+
FA(() => {
|
|
3057
3057
|
if (!w || !Z.current) {
|
|
3058
3058
|
AA([]);
|
|
3059
3059
|
return;
|
|
@@ -3069,7 +3069,7 @@ const nr = (e) => {
|
|
|
3069
3069
|
const H = (k) => {
|
|
3070
3070
|
B && B(k < w ? k : k + 1);
|
|
3071
3071
|
};
|
|
3072
|
-
return /* @__PURE__ */ A("div", { ref: Z, children: /* @__PURE__ */ s(
|
|
3072
|
+
return /* @__PURE__ */ A("div", { ref: Z, children: /* @__PURE__ */ s(_A, { fullWidth: !0, children: [
|
|
3073
3073
|
/* @__PURE__ */ A(
|
|
3074
3074
|
we,
|
|
3075
3075
|
{
|
|
@@ -3082,7 +3082,7 @@ const nr = (e) => {
|
|
|
3082
3082
|
var F;
|
|
3083
3083
|
const E = w > 0 && G < w, D = V[G] ?? 0;
|
|
3084
3084
|
return /* @__PURE__ */ A(
|
|
3085
|
-
|
|
3085
|
+
qA,
|
|
3086
3086
|
{
|
|
3087
3087
|
style: {
|
|
3088
3088
|
position: "sticky",
|
|
@@ -3143,7 +3143,7 @@ const nr = (e) => {
|
|
|
3143
3143
|
);
|
|
3144
3144
|
}),
|
|
3145
3145
|
r || o || t || I ? /* @__PURE__ */ A(
|
|
3146
|
-
|
|
3146
|
+
qA,
|
|
3147
3147
|
{
|
|
3148
3148
|
style: {
|
|
3149
3149
|
backgroundColor: "var(--starasia-ui-table-bg-header)",
|
|
@@ -3159,11 +3159,11 @@ const nr = (e) => {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
),
|
|
3161
3161
|
/* @__PURE__ */ A(Qe, { children: n ? /* @__PURE__ */ A(QA, { children: /* @__PURE__ */ A(CA, { colSpan: e.length + 1, children: /* @__PURE__ */ s(a, { style: { gap: "16px" }, children: [
|
|
3162
|
-
/* @__PURE__ */ A(
|
|
3163
|
-
/* @__PURE__ */ A(
|
|
3164
|
-
/* @__PURE__ */ A(
|
|
3165
|
-
/* @__PURE__ */ A(
|
|
3166
|
-
/* @__PURE__ */ A(
|
|
3162
|
+
/* @__PURE__ */ A(lA, { variant: "list" }),
|
|
3163
|
+
/* @__PURE__ */ A(lA, { variant: "list" }),
|
|
3164
|
+
/* @__PURE__ */ A(lA, { variant: "list" }),
|
|
3165
|
+
/* @__PURE__ */ A(lA, { variant: "list" }),
|
|
3166
|
+
/* @__PURE__ */ A(lA, { variant: "list" })
|
|
3167
3167
|
] }) }) }) : !(i != null && i.length) && h ? /* @__PURE__ */ A(QA, { children: /* @__PURE__ */ A(CA, { colSpan: e.length + 1, children: h }) }) : i == null ? void 0 : i.map((k, G) => /* @__PURE__ */ s(
|
|
3168
3168
|
QA,
|
|
3169
3169
|
{
|
|
@@ -3174,11 +3174,11 @@ const nr = (e) => {
|
|
|
3174
3174
|
},
|
|
3175
3175
|
onMouseOver: (E) => {
|
|
3176
3176
|
const D = E.currentTarget;
|
|
3177
|
-
D.style.backgroundColor =
|
|
3178
|
-
f.style.backgroundColor =
|
|
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;
|
|
3179
3179
|
});
|
|
3180
3180
|
const F = Array.from(D.querySelectorAll("td")).at(-1);
|
|
3181
|
-
F && F.style.position === "sticky" && (F.style.backgroundColor =
|
|
3181
|
+
F && F.style.position === "sticky" && (F.style.backgroundColor = YA);
|
|
3182
3182
|
},
|
|
3183
3183
|
onMouseOut: (E) => {
|
|
3184
3184
|
const D = E.currentTarget;
|
|
@@ -3253,7 +3253,7 @@ const nr = (e) => {
|
|
|
3253
3253
|
onClick: () => t(k.id, k),
|
|
3254
3254
|
iconLeft: /* @__PURE__ */ A(M, { name: "Trash1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-red-600))" } })
|
|
3255
3255
|
}
|
|
3256
|
-
) }, "delete") : E === "custom" ? /* @__PURE__ */ A(
|
|
3256
|
+
) }, "delete") : E === "custom" ? /* @__PURE__ */ A(gA.Fragment, { children: I == null ? void 0 : I(k) }, "custom") : null;
|
|
3257
3257
|
}) }) }) : null
|
|
3258
3258
|
]
|
|
3259
3259
|
},
|
|
@@ -3321,7 +3321,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3321
3321
|
children: r,
|
|
3322
3322
|
loading: o,
|
|
3323
3323
|
isLoading: t
|
|
3324
|
-
}) => /* @__PURE__ */ A(U, { children: t ? o : e ? r : i }),
|
|
3324
|
+
}) => /* @__PURE__ */ A(U, { children: t ? o : e ? r : i }), le = ({
|
|
3325
3325
|
item: e,
|
|
3326
3326
|
handleSwitch: i,
|
|
3327
3327
|
handleToSelectOrg: r,
|
|
@@ -3389,7 +3389,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3389
3389
|
]
|
|
3390
3390
|
}
|
|
3391
3391
|
);
|
|
3392
|
-
},
|
|
3392
|
+
}, pA = ({
|
|
3393
3393
|
dataApps: e,
|
|
3394
3394
|
handleSwitch: i,
|
|
3395
3395
|
title: r,
|
|
@@ -3406,7 +3406,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3406
3406
|
{
|
|
3407
3407
|
of: e,
|
|
3408
3408
|
render: (C) => /* @__PURE__ */ A(
|
|
3409
|
-
|
|
3409
|
+
le,
|
|
3410
3410
|
{
|
|
3411
3411
|
item: C,
|
|
3412
3412
|
showIcon: n,
|
|
@@ -3431,7 +3431,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3431
3431
|
setSelectedApp: g
|
|
3432
3432
|
}) => {
|
|
3433
3433
|
var Q;
|
|
3434
|
-
const C =
|
|
3434
|
+
const C = $A();
|
|
3435
3435
|
return /* @__PURE__ */ s(SA, { onHide: e, show: i, closeButton: !1, children: [
|
|
3436
3436
|
/* @__PURE__ */ s(
|
|
3437
3437
|
BA,
|
|
@@ -3471,12 +3471,12 @@ const Qr = bi(Oi), kA = ({
|
|
|
3471
3471
|
condition: !!(o != null && o.length),
|
|
3472
3472
|
isLoading: c,
|
|
3473
3473
|
loading: /* @__PURE__ */ s(a, { marginTop: "sm", gap: "md", children: [
|
|
3474
|
-
/* @__PURE__ */ A(
|
|
3475
|
-
/* @__PURE__ */ A(
|
|
3476
|
-
/* @__PURE__ */ A(
|
|
3474
|
+
/* @__PURE__ */ A(lA, { variant: "list" }),
|
|
3475
|
+
/* @__PURE__ */ A(lA, { variant: "list" }),
|
|
3476
|
+
/* @__PURE__ */ A(lA, { variant: "list" })
|
|
3477
3477
|
] }),
|
|
3478
3478
|
children: /* @__PURE__ */ A(
|
|
3479
|
-
|
|
3479
|
+
pA,
|
|
3480
3480
|
{
|
|
3481
3481
|
dataApps: o == null ? void 0 : o.map((w) => {
|
|
3482
3482
|
var B;
|
|
@@ -3513,7 +3513,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3513
3513
|
)
|
|
3514
3514
|
] }),
|
|
3515
3515
|
/* @__PURE__ */ A(
|
|
3516
|
-
|
|
3516
|
+
pA,
|
|
3517
3517
|
{
|
|
3518
3518
|
title: "Organization Apps",
|
|
3519
3519
|
show: r == null ? void 0 : r.some((w) => w.isTenant),
|
|
@@ -3526,7 +3526,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3526
3526
|
}
|
|
3527
3527
|
),
|
|
3528
3528
|
/* @__PURE__ */ A(
|
|
3529
|
-
|
|
3529
|
+
pA,
|
|
3530
3530
|
{
|
|
3531
3531
|
title: "Single Apps",
|
|
3532
3532
|
show: r == null ? void 0 : r.some((w) => !w.isTenant),
|
|
@@ -3537,7 +3537,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3537
3537
|
)
|
|
3538
3538
|
] })
|
|
3539
3539
|
] });
|
|
3540
|
-
},
|
|
3540
|
+
}, jA = ({
|
|
3541
3541
|
dataApps: e,
|
|
3542
3542
|
handleSwitch: i,
|
|
3543
3543
|
title: r,
|
|
@@ -3554,7 +3554,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3554
3554
|
{
|
|
3555
3555
|
of: e,
|
|
3556
3556
|
render: (C) => /* @__PURE__ */ A(
|
|
3557
|
-
|
|
3557
|
+
le,
|
|
3558
3558
|
{
|
|
3559
3559
|
item: C,
|
|
3560
3560
|
showIcon: n,
|
|
@@ -3576,7 +3576,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3576
3576
|
setSelectedApp: n
|
|
3577
3577
|
}) => {
|
|
3578
3578
|
var c, g, C, Q, w;
|
|
3579
|
-
const l =
|
|
3579
|
+
const l = $A();
|
|
3580
3580
|
return /* @__PURE__ */ s(SA, { onHide: e, show: i, closeButton: !1, children: [
|
|
3581
3581
|
/* @__PURE__ */ s(
|
|
3582
3582
|
BA,
|
|
@@ -3615,7 +3615,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3615
3615
|
{
|
|
3616
3616
|
condition: !!((C = (g = l.data) == null ? void 0 : g.organizations) != null && C.length),
|
|
3617
3617
|
children: /* @__PURE__ */ A(
|
|
3618
|
-
|
|
3618
|
+
jA,
|
|
3619
3619
|
{
|
|
3620
3620
|
dataApps: (w = (Q = l.data) == null ? void 0 : Q.organizations) == null ? void 0 : w.map((B) => {
|
|
3621
3621
|
var I;
|
|
@@ -3652,7 +3652,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3652
3652
|
)
|
|
3653
3653
|
] }),
|
|
3654
3654
|
/* @__PURE__ */ A(
|
|
3655
|
-
|
|
3655
|
+
jA,
|
|
3656
3656
|
{
|
|
3657
3657
|
title: "Organization Apps",
|
|
3658
3658
|
show: r == null ? void 0 : r.some((B) => B.isTenant),
|
|
@@ -3665,7 +3665,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3665
3665
|
}
|
|
3666
3666
|
),
|
|
3667
3667
|
/* @__PURE__ */ A(
|
|
3668
|
-
|
|
3668
|
+
jA,
|
|
3669
3669
|
{
|
|
3670
3670
|
title: "Single Apps",
|
|
3671
3671
|
show: r == null ? void 0 : r.some((B) => !B.isTenant),
|
|
@@ -3826,7 +3826,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3826
3826
|
color: e.color || "gray-700",
|
|
3827
3827
|
children: e.children
|
|
3828
3828
|
}
|
|
3829
|
-
),
|
|
3829
|
+
), nA = (e) => /* @__PURE__ */ A(d, { color: "red-600", fontSize: "sm", children: e.message }), Ni = ({
|
|
3830
3830
|
size: e = "md",
|
|
3831
3831
|
direction: i = "vertical",
|
|
3832
3832
|
requiredTitle: r = "(Required)",
|
|
@@ -3905,7 +3905,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3905
3905
|
fullWidth: !0
|
|
3906
3906
|
}
|
|
3907
3907
|
),
|
|
3908
|
-
!n && t.errorMessage && /* @__PURE__ */ A(
|
|
3908
|
+
!n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage }),
|
|
3909
3909
|
t.inputProps.extended && t.inputProps.extended
|
|
3910
3910
|
] })
|
|
3911
3911
|
]
|
|
@@ -3996,7 +3996,7 @@ const Qr = bi(Oi), kA = ({
|
|
|
3996
3996
|
)
|
|
3997
3997
|
}
|
|
3998
3998
|
),
|
|
3999
|
-
!n && t.errorMessage && /* @__PURE__ */ A(
|
|
3999
|
+
!n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage }),
|
|
4000
4000
|
t.inputProps.extended && t.inputProps.extended
|
|
4001
4001
|
] })
|
|
4002
4002
|
]
|
|
@@ -4312,7 +4312,7 @@ const Ji = (e) => {
|
|
|
4312
4312
|
status: t.errorMessage ? "error" : "default"
|
|
4313
4313
|
}
|
|
4314
4314
|
),
|
|
4315
|
-
!n && t.errorMessage && /* @__PURE__ */ A(
|
|
4315
|
+
!n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage })
|
|
4316
4316
|
] })
|
|
4317
4317
|
]
|
|
4318
4318
|
}
|
|
@@ -4408,7 +4408,7 @@ const Ji = (e) => {
|
|
|
4408
4408
|
...n.badgeContainerProps,
|
|
4409
4409
|
children: [
|
|
4410
4410
|
/* @__PURE__ */ A(
|
|
4411
|
-
|
|
4411
|
+
NA,
|
|
4412
4412
|
{
|
|
4413
4413
|
name: B.name,
|
|
4414
4414
|
value: B.id,
|
|
@@ -4422,7 +4422,7 @@ const Ji = (e) => {
|
|
|
4422
4422
|
]
|
|
4423
4423
|
}
|
|
4424
4424
|
) : /* @__PURE__ */ A(
|
|
4425
|
-
|
|
4425
|
+
NA,
|
|
4426
4426
|
{
|
|
4427
4427
|
name: B.name,
|
|
4428
4428
|
value: B.id,
|
|
@@ -4436,7 +4436,7 @@ const Ji = (e) => {
|
|
|
4436
4436
|
)
|
|
4437
4437
|
}
|
|
4438
4438
|
),
|
|
4439
|
-
!l && n.errorMessage && /* @__PURE__ */ A(
|
|
4439
|
+
!l && n.errorMessage && /* @__PURE__ */ A(nA, { message: n.errorMessage })
|
|
4440
4440
|
]
|
|
4441
4441
|
}
|
|
4442
4442
|
);
|
|
@@ -4514,7 +4514,7 @@ const Ji = (e) => {
|
|
|
4514
4514
|
)
|
|
4515
4515
|
}
|
|
4516
4516
|
),
|
|
4517
|
-
o.errorMessage && /* @__PURE__ */ A(
|
|
4517
|
+
o.errorMessage && /* @__PURE__ */ A(nA, { message: o.errorMessage })
|
|
4518
4518
|
]
|
|
4519
4519
|
}
|
|
4520
4520
|
);
|
|
@@ -4596,7 +4596,7 @@ const Ji = (e) => {
|
|
|
4596
4596
|
status: t.errorMessage ? "error" : "default"
|
|
4597
4597
|
}
|
|
4598
4598
|
),
|
|
4599
|
-
!n && t.errorMessage && /* @__PURE__ */ A(
|
|
4599
|
+
!n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage })
|
|
4600
4600
|
] })
|
|
4601
4601
|
]
|
|
4602
4602
|
}
|
|
@@ -4671,7 +4671,7 @@ const Ji = (e) => {
|
|
|
4671
4671
|
}
|
|
4672
4672
|
),
|
|
4673
4673
|
/* @__PURE__ */ A(
|
|
4674
|
-
|
|
4674
|
+
Ae,
|
|
4675
4675
|
{
|
|
4676
4676
|
checked: n.checked,
|
|
4677
4677
|
onChange: n.onChange,
|
|
@@ -4679,7 +4679,7 @@ const Ji = (e) => {
|
|
|
4679
4679
|
description: n.description
|
|
4680
4680
|
}
|
|
4681
4681
|
),
|
|
4682
|
-
n.errorMessage && /* @__PURE__ */ A(
|
|
4682
|
+
n.errorMessage && /* @__PURE__ */ A(nA, { message: n.errorMessage })
|
|
4683
4683
|
]
|
|
4684
4684
|
}
|
|
4685
4685
|
);
|
|
@@ -4688,7 +4688,7 @@ const Ji = (e) => {
|
|
|
4688
4688
|
size: i = "md",
|
|
4689
4689
|
...r
|
|
4690
4690
|
}) => {
|
|
4691
|
-
const o =
|
|
4691
|
+
const o = KA(), t = (l) => {
|
|
4692
4692
|
var g, C, Q, w, B, I;
|
|
4693
4693
|
if (!l) return;
|
|
4694
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];
|
|
@@ -4812,7 +4812,7 @@ const Ji = (e) => {
|
|
|
4812
4812
|
width: i === "horizontal" && t.customWidth ? t.customWidth : i === "horizontal" ? "343px" : ""
|
|
4813
4813
|
},
|
|
4814
4814
|
children: /* @__PURE__ */ A(
|
|
4815
|
-
|
|
4815
|
+
XA,
|
|
4816
4816
|
{
|
|
4817
4817
|
size: e,
|
|
4818
4818
|
...t.inputProps,
|
|
@@ -4821,7 +4821,7 @@ const Ji = (e) => {
|
|
|
4821
4821
|
)
|
|
4822
4822
|
}
|
|
4823
4823
|
),
|
|
4824
|
-
!n && t.errorMessage && /* @__PURE__ */ A(
|
|
4824
|
+
!n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage })
|
|
4825
4825
|
] })
|
|
4826
4826
|
]
|
|
4827
4827
|
}
|
|
@@ -4854,7 +4854,7 @@ async function $i(e, i) {
|
|
|
4854
4854
|
}, "image/png");
|
|
4855
4855
|
});
|
|
4856
4856
|
}
|
|
4857
|
-
const
|
|
4857
|
+
const PA = {
|
|
4858
4858
|
"1:1": 1,
|
|
4859
4859
|
"4:3": 4 / 3,
|
|
4860
4860
|
"16:9": 16 / 9,
|
|
@@ -4863,7 +4863,7 @@ const vA = {
|
|
|
4863
4863
|
"2:3": 2 / 3,
|
|
4864
4864
|
"3:2": 3 / 2,
|
|
4865
4865
|
"32:9": 32 / 9
|
|
4866
|
-
}, _i =
|
|
4866
|
+
}, _i = ZA(
|
|
4867
4867
|
({
|
|
4868
4868
|
handleUpload: e,
|
|
4869
4869
|
urlImage: i,
|
|
@@ -4880,14 +4880,14 @@ const vA = {
|
|
|
4880
4880
|
W(() => {
|
|
4881
4881
|
i === null && t(null);
|
|
4882
4882
|
}, [i]);
|
|
4883
|
-
const V =
|
|
4883
|
+
const V = HA(
|
|
4884
4884
|
(J, z) => {
|
|
4885
4885
|
Z(z);
|
|
4886
4886
|
},
|
|
4887
4887
|
[]
|
|
4888
4888
|
), AA = (J) => {
|
|
4889
|
-
var
|
|
4890
|
-
const z = (
|
|
4889
|
+
var sA;
|
|
4890
|
+
const z = (sA = J.target.files) == null ? void 0 : sA[0];
|
|
4891
4891
|
if (!z) return;
|
|
4892
4892
|
const iA = new FileReader();
|
|
4893
4893
|
iA.onload = () => {
|
|
@@ -4916,7 +4916,7 @@ const vA = {
|
|
|
4916
4916
|
(J = k.current) == null || J.click();
|
|
4917
4917
|
}
|
|
4918
4918
|
}));
|
|
4919
|
-
const E = parseInt(n, 10), D =
|
|
4919
|
+
const E = parseInt(n, 10), D = PA[l];
|
|
4920
4920
|
let F, f;
|
|
4921
4921
|
return D >= 1 ? (f = E, F = E * D) : (F = E, f = E / D), /* @__PURE__ */ s(
|
|
4922
4922
|
a,
|
|
@@ -5071,7 +5071,7 @@ const vA = {
|
|
|
5071
5071
|
image: L,
|
|
5072
5072
|
crop: N,
|
|
5073
5073
|
zoom: x,
|
|
5074
|
-
aspect: l ?
|
|
5074
|
+
aspect: l ? PA[l] : void 0,
|
|
5075
5075
|
onCropChange: R,
|
|
5076
5076
|
onZoomChange: u,
|
|
5077
5077
|
onCropComplete: V,
|
|
@@ -5164,7 +5164,7 @@ const vA = {
|
|
|
5164
5164
|
),
|
|
5165
5165
|
/* @__PURE__ */ s(T, { gap: "xs", children: [
|
|
5166
5166
|
/* @__PURE__ */ A(_i, { ...n.inputProps }),
|
|
5167
|
-
!l && n.errorMessage && /* @__PURE__ */ A(
|
|
5167
|
+
!l && n.errorMessage && /* @__PURE__ */ A(nA, { message: n.errorMessage })
|
|
5168
5168
|
] })
|
|
5169
5169
|
]
|
|
5170
5170
|
}
|
|
@@ -5254,7 +5254,7 @@ const vA = {
|
|
|
5254
5254
|
W(() => {
|
|
5255
5255
|
e && c([...e.map((w) => ({ id: w.id, isActive: w.isActive }))]);
|
|
5256
5256
|
}, [e]);
|
|
5257
|
-
const g = (Q = l.find((w) => w.id === i)) == null ? void 0 : Q.isActive, C =
|
|
5257
|
+
const g = (Q = l.find((w) => w.id === i)) == null ? void 0 : Q.isActive, C = HA(() => {
|
|
5258
5258
|
c(
|
|
5259
5259
|
(w) => w.map((B) => B.id === i ? { ...B, isActive: !B.isActive } : B)
|
|
5260
5260
|
), r && r(!g);
|
|
@@ -5268,7 +5268,7 @@ const vA = {
|
|
|
5268
5268
|
width: o
|
|
5269
5269
|
},
|
|
5270
5270
|
children: t && /* @__PURE__ */ A(
|
|
5271
|
-
|
|
5271
|
+
Ae,
|
|
5272
5272
|
{
|
|
5273
5273
|
disabled: n,
|
|
5274
5274
|
checked: g,
|
|
@@ -6948,7 +6948,7 @@ function Lr({
|
|
|
6948
6948
|
}, [o.pathname]);
|
|
6949
6949
|
}
|
|
6950
6950
|
const Gr = () => {
|
|
6951
|
-
const [e, i] = uA(), r = DA(e.toString()), o =
|
|
6951
|
+
const [e, i] = uA(), r = DA(e.toString()), o = te(), t = fA(), n = o.id;
|
|
6952
6952
|
return {
|
|
6953
6953
|
// query params
|
|
6954
6954
|
setSearchParams: i,
|
|
@@ -6969,7 +6969,7 @@ const Gr = () => {
|
|
|
6969
6969
|
function Or(e) {
|
|
6970
6970
|
var o, t;
|
|
6971
6971
|
const i = e.decodedAccessToken;
|
|
6972
|
-
return
|
|
6972
|
+
return cA(() => {
|
|
6973
6973
|
var g, C;
|
|
6974
6974
|
const n = ((C = (g = i == null ? void 0 : i.access) == null ? void 0 : g.role) == null ? void 0 : C.code) ?? "", l = Object.keys(e.role).reduce(
|
|
6975
6975
|
(Q, w) => {
|
|
@@ -6997,7 +6997,7 @@ export {
|
|
|
6997
6997
|
Mi as AdvanceFilterBar,
|
|
6998
6998
|
Nt as App,
|
|
6999
6999
|
Le as AppComponent,
|
|
7000
|
-
|
|
7000
|
+
re as AppContext,
|
|
7001
7001
|
Ft as AppLayout,
|
|
7002
7002
|
Ir as AsideBar,
|
|
7003
7003
|
zt as AuthLayout,
|
|
@@ -7045,8 +7045,8 @@ export {
|
|
|
7045
7045
|
sr as getValueDropdownMultipleFilter,
|
|
7046
7046
|
ar as getValueRadioFilter,
|
|
7047
7047
|
ki as getValueSearch,
|
|
7048
|
-
|
|
7049
|
-
|
|
7048
|
+
bA as getValuesFilter,
|
|
7049
|
+
vA as handleChangeFilter,
|
|
7050
7050
|
lr as handleOnScroll,
|
|
7051
7051
|
rr as isEmail,
|
|
7052
7052
|
wr as isFilterActive,
|
|
@@ -7069,7 +7069,7 @@ export {
|
|
|
7069
7069
|
Se as useAppState,
|
|
7070
7070
|
Or as useAuthRole,
|
|
7071
7071
|
Lr as useDynamicTitle,
|
|
7072
|
-
|
|
7072
|
+
JA as useRouteInfo,
|
|
7073
7073
|
Gr as useRouteParams,
|
|
7074
7074
|
Sr as useTabState
|
|
7075
7075
|
};
|