@starasia/admin 8.4.1 → 8.4.2
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 +2 -2
- package/dist/index.es.js +906 -892
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "@starasia/alert";
|
|
2
2
|
import { Badges as ft, Badge as Sn } from "@starasia/badges";
|
|
3
3
|
export * from "@starasia/badges";
|
|
4
|
-
import { Box as
|
|
4
|
+
import { Box as f } from "@starasia/box";
|
|
5
5
|
export * from "@starasia/box";
|
|
6
6
|
import { Breadcrumb as Fn, BreadcrumbItem as Fr, BreadcrumbLink as En } from "@starasia/breadcrumb";
|
|
7
7
|
export * from "@starasia/breadcrumb";
|
|
@@ -59,7 +59,7 @@ import { Skeleton as ut } from "@starasia/skeleton";
|
|
|
59
59
|
export * from "@starasia/skeleton";
|
|
60
60
|
export * from "@starasia/progress-stepper";
|
|
61
61
|
import { jsx as e, Fragment as ie, jsxs as u } from "react/jsx-runtime";
|
|
62
|
-
import tt, { createContext as It, useState as R, useContext as at, useCallback as Q, useMemo as fe, memo as qe, useEffect as U, useRef as
|
|
62
|
+
import tt, { createContext as It, useState as R, useContext as at, useCallback as Q, useMemo as fe, memo as qe, useEffect as U, useRef as ce, useLayoutEffect as it, forwardRef as ur, isValidElement as nr, Children as Rn, useImperativeHandle as Vn } from "react";
|
|
63
63
|
import { useSearchParams as Rt, useNavigate as hr, useLocation as gt, Outlet as Lr, Link as Et, useParams as tn } from "react-router";
|
|
64
64
|
import On, { createPortal as rn } from "react-dom";
|
|
65
65
|
import Hn from "react-easy-crop";
|
|
@@ -91,23 +91,23 @@ const Tn = {
|
|
|
91
91
|
const [r, n] = R({}), o = Q(
|
|
92
92
|
(c) => {
|
|
93
93
|
n(
|
|
94
|
-
(
|
|
94
|
+
(d) => typeof c == "function" ? c(d) : c
|
|
95
95
|
);
|
|
96
96
|
},
|
|
97
97
|
[]
|
|
98
98
|
), i = Q(
|
|
99
|
-
(c,
|
|
100
|
-
n((
|
|
101
|
-
const
|
|
102
|
-
return { ...
|
|
99
|
+
(c, d) => {
|
|
100
|
+
n((a) => {
|
|
101
|
+
const m = typeof d == "function" ? d(a[c]) : d;
|
|
102
|
+
return { ...a, [c]: m };
|
|
103
103
|
});
|
|
104
104
|
},
|
|
105
105
|
[]
|
|
106
106
|
), l = Q((c) => {
|
|
107
|
-
n((
|
|
108
|
-
if (!(c in
|
|
109
|
-
const
|
|
110
|
-
return delete
|
|
107
|
+
n((d) => {
|
|
108
|
+
if (!(c in d)) return d;
|
|
109
|
+
const a = { ...d };
|
|
110
|
+
return delete a[c], a;
|
|
111
111
|
});
|
|
112
112
|
}, []), s = fe(
|
|
113
113
|
() => ({ badges: r, setBadge: i, setBadges: o, clearBadge: l }),
|
|
@@ -126,7 +126,7 @@ const Tn = {
|
|
|
126
126
|
initialUserData: l,
|
|
127
127
|
theme: s
|
|
128
128
|
}) => {
|
|
129
|
-
const c = Nn({ initialUserData: l }), { theme:
|
|
129
|
+
const c = Nn({ initialUserData: l }), { theme: d } = zn();
|
|
130
130
|
return /* @__PURE__ */ e(
|
|
131
131
|
nn.Provider,
|
|
132
132
|
{
|
|
@@ -138,7 +138,7 @@ const Tn = {
|
|
|
138
138
|
setUserData: c.setUserData,
|
|
139
139
|
menuBottom: n
|
|
140
140
|
},
|
|
141
|
-
children: /* @__PURE__ */ e($n, { children: s ? /* @__PURE__ */ e(Er, { value: s, children: t }) :
|
|
141
|
+
children: /* @__PURE__ */ e($n, { children: s ? /* @__PURE__ */ e(Er, { value: s, children: t }) : d ? /* @__PURE__ */ e(Er, { value: d, children: t }) : t })
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
}, Hl = qe(Pn);
|
|
@@ -181,7 +181,7 @@ function _n({
|
|
|
181
181
|
}
|
|
182
182
|
const fr = It(null);
|
|
183
183
|
function Zn({ children: t }) {
|
|
184
|
-
const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c,
|
|
184
|
+
const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c, d] = R(0), a = Q(() => (d((m) => m + 1), () => d((m) => m - 1)), []);
|
|
185
185
|
return /* @__PURE__ */ e(
|
|
186
186
|
fr.Provider,
|
|
187
187
|
{
|
|
@@ -193,7 +193,7 @@ function Zn({ children: t }) {
|
|
|
193
193
|
setAppendNode: i,
|
|
194
194
|
setReplaceNode: s,
|
|
195
195
|
replaceCount: c,
|
|
196
|
-
registerReplace:
|
|
196
|
+
registerReplace: a
|
|
197
197
|
},
|
|
198
198
|
children: t
|
|
199
199
|
}
|
|
@@ -224,11 +224,11 @@ function Tl({
|
|
|
224
224
|
}
|
|
225
225
|
const mr = It(null);
|
|
226
226
|
function qn({ children: t }) {
|
|
227
|
-
const [r, n] = R({}), [o, i] = R({}), l = Q((
|
|
228
|
-
n((
|
|
229
|
-
}, []), s = Q((
|
|
230
|
-
...
|
|
231
|
-
[
|
|
227
|
+
const [r, n] = R({}), [o, i] = R({}), l = Q((d, a) => {
|
|
228
|
+
n((m) => m[d] === a ? m : { ...m, [d]: a });
|
|
229
|
+
}, []), s = Q((d) => (i((a) => ({ ...a, [d]: (a[d] ?? 0) + 1 })), () => i((a) => ({
|
|
230
|
+
...a,
|
|
231
|
+
[d]: Math.max(0, (a[d] ?? 0) - 1)
|
|
232
232
|
}))), []), c = fe(
|
|
233
233
|
() => ({ outletNodes: r, setOutletNode: l, slotCounts: o, registerSlot: s }),
|
|
234
234
|
[r, l, o, s]
|
|
@@ -236,7 +236,7 @@ function qn({ children: t }) {
|
|
|
236
236
|
return /* @__PURE__ */ e(mr.Provider, { value: c, children: t });
|
|
237
237
|
}
|
|
238
238
|
function Un({ slotKey: t, fallback: r }) {
|
|
239
|
-
const n = at(mr), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i =
|
|
239
|
+
const n = at(mr), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i = ce(n == null ? void 0 : n.setOutletNode);
|
|
240
240
|
i.current = n == null ? void 0 : n.setOutletNode;
|
|
241
241
|
const l = Q(
|
|
242
242
|
(s) => {
|
|
@@ -249,7 +249,7 @@ function Un({ slotKey: t, fallback: r }) {
|
|
|
249
249
|
return /* @__PURE__ */ e(ie, { children: o ? /* @__PURE__ */ e("div", { ref: l, style: { display: "contents" } }) : r });
|
|
250
250
|
}
|
|
251
251
|
function Nl({ slotKey: t, children: r }) {
|
|
252
|
-
const n = at(mr), o =
|
|
252
|
+
const n = at(mr), o = ce(n == null ? void 0 : n.registerSlot);
|
|
253
253
|
if (o.current = n == null ? void 0 : n.registerSlot, U(() => {
|
|
254
254
|
var l;
|
|
255
255
|
return (l = o.current) == null ? void 0 : l.call(o, t);
|
|
@@ -335,11 +335,11 @@ function jl({
|
|
|
335
335
|
isLoggingOut: l,
|
|
336
336
|
loadingComponent: s,
|
|
337
337
|
sidebarHeaderContent: c,
|
|
338
|
-
headerActions:
|
|
339
|
-
profileRole:
|
|
340
|
-
profileMenuButtons:
|
|
341
|
-
profileMenuItems:
|
|
342
|
-
logoutButton:
|
|
338
|
+
headerActions: d,
|
|
339
|
+
profileRole: a,
|
|
340
|
+
profileMenuButtons: m,
|
|
341
|
+
profileMenuItems: p,
|
|
342
|
+
logoutButton: g
|
|
343
343
|
}) {
|
|
344
344
|
var Ke, ot;
|
|
345
345
|
const [x] = Rt(), W = x.get("embed") === "true", y = on(), { badges: k } = jn(), E = hr(), w = gt(), v = !ke("md"), [A, z] = R(!1), [C, B] = R(!1), [j, G] = R(!1), [_, X] = R(!1), [te, me] = R(
|
|
@@ -348,7 +348,7 @@ function jl({
|
|
|
348
348
|
U(() => {
|
|
349
349
|
Wr = te;
|
|
350
350
|
}, [te]);
|
|
351
|
-
const ne =
|
|
351
|
+
const ne = ce(null), ye = ce(null);
|
|
352
352
|
U(() => {
|
|
353
353
|
const S = ne.current;
|
|
354
354
|
if (!S) return;
|
|
@@ -1053,7 +1053,7 @@ function jl({
|
|
|
1053
1053
|
/* @__PURE__ */ e(Gn, { children: r })
|
|
1054
1054
|
] }),
|
|
1055
1055
|
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
1056
|
-
|
|
1056
|
+
d,
|
|
1057
1057
|
/* @__PURE__ */ u(We, { position: "bottom-right", children: [
|
|
1058
1058
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
|
|
1059
1059
|
"div",
|
|
@@ -1200,7 +1200,7 @@ function jl({
|
|
|
1200
1200
|
children: (n == null ? void 0 : n.email) || "unknown"
|
|
1201
1201
|
}
|
|
1202
1202
|
),
|
|
1203
|
-
|
|
1203
|
+
a && /* @__PURE__ */ e(
|
|
1204
1204
|
"p",
|
|
1205
1205
|
{
|
|
1206
1206
|
style: {
|
|
@@ -1212,14 +1212,14 @@ function jl({
|
|
|
1212
1212
|
overflow: "hidden",
|
|
1213
1213
|
textOverflow: "ellipsis"
|
|
1214
1214
|
},
|
|
1215
|
-
children:
|
|
1215
|
+
children: a
|
|
1216
1216
|
}
|
|
1217
1217
|
)
|
|
1218
1218
|
]
|
|
1219
1219
|
}
|
|
1220
1220
|
) }),
|
|
1221
|
-
(
|
|
1222
|
-
|
|
1221
|
+
(m && m.length > 0 || p) && /* @__PURE__ */ u(ze, { children: [
|
|
1222
|
+
m == null ? void 0 : m.map((S, $) => /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
|
|
1223
1223
|
"button",
|
|
1224
1224
|
{
|
|
1225
1225
|
type: "button",
|
|
@@ -1237,9 +1237,9 @@ function jl({
|
|
|
1237
1237
|
]
|
|
1238
1238
|
}
|
|
1239
1239
|
) }, `${S.label}-${$}`)),
|
|
1240
|
-
|
|
1240
|
+
p
|
|
1241
1241
|
] }),
|
|
1242
|
-
|
|
1242
|
+
g ?? /* @__PURE__ */ e(sr, { children: /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
|
|
1243
1243
|
"button",
|
|
1244
1244
|
{
|
|
1245
1245
|
type: "button",
|
|
@@ -1311,9 +1311,9 @@ function jl({
|
|
|
1311
1311
|
/* @__PURE__ */ u(lr, { isShow: A, onHide: Ee, children: [
|
|
1312
1312
|
/* @__PURE__ */ e(Qr, { children: "Confirmation Logout" }),
|
|
1313
1313
|
/* @__PURE__ */ e(cr, { children: "Are you sure you want to end the session and exit the page?" }),
|
|
1314
|
-
/* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ e(
|
|
1315
|
-
/* @__PURE__ */ e(
|
|
1316
|
-
/* @__PURE__ */ e(
|
|
1314
|
+
/* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ e(f, { direction: "column", display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ u(le, { direction: "row", gap: "sm", align: "center", children: [
|
|
1315
|
+
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(T, { secondary: !0, onClick: Ee, children: "Cancel" }) }),
|
|
1316
|
+
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(T, { primary: !0, onClick: Ne, children: "Yes, Sure" }) })
|
|
1317
1317
|
] }) }) })
|
|
1318
1318
|
] }),
|
|
1319
1319
|
ae && /* @__PURE__ */ u(ie, { children: [
|
|
@@ -1429,7 +1429,7 @@ function jl({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
const gr = ur(
|
|
1431
1431
|
({ children: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1432
|
-
|
|
1432
|
+
f,
|
|
1433
1433
|
{
|
|
1434
1434
|
ref: n,
|
|
1435
1435
|
role: "button",
|
|
@@ -1451,7 +1451,7 @@ const gr = ur(
|
|
|
1451
1451
|
}) => {
|
|
1452
1452
|
const [s, c] = R(!1);
|
|
1453
1453
|
return /* @__PURE__ */ u(
|
|
1454
|
-
|
|
1454
|
+
f,
|
|
1455
1455
|
{
|
|
1456
1456
|
direction: "row",
|
|
1457
1457
|
gap: "xs",
|
|
@@ -1492,22 +1492,22 @@ const gr = ur(
|
|
|
1492
1492
|
iconColor: o,
|
|
1493
1493
|
hoverIconColor: i
|
|
1494
1494
|
}) => {
|
|
1495
|
-
const [l, s] = R(!1), c = o ?? "var(--sa-text-subtle, #8c8f97)",
|
|
1495
|
+
const [l, s] = R(!1), c = o ?? "var(--sa-text-subtle, #8c8f97)", d = i ?? "var(--sa-text-subtle, #8c8f97)", a = t.length > 1 ? t[0] : void 0, m = !!(a != null && a.to || a != null && a.onClick), p = /* @__PURE__ */ e(
|
|
1496
1496
|
F,
|
|
1497
1497
|
{
|
|
1498
1498
|
name: n || "ChevronLeft",
|
|
1499
1499
|
size: "xs",
|
|
1500
|
-
onMouseEnter:
|
|
1501
|
-
onMouseLeave:
|
|
1500
|
+
onMouseEnter: m ? () => s(!0) : void 0,
|
|
1501
|
+
onMouseLeave: m ? () => s(!1) : void 0,
|
|
1502
1502
|
style: {
|
|
1503
|
-
color:
|
|
1503
|
+
color: m && l ? d : c,
|
|
1504
1504
|
transition: "color 0.15s ease",
|
|
1505
|
-
cursor:
|
|
1505
|
+
cursor: m ? "pointer" : void 0
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
),
|
|
1509
|
-
return /* @__PURE__ */ u(
|
|
1510
|
-
|
|
1508
|
+
), g = a != null && a.to ? /* @__PURE__ */ e(Et, { to: a.to, replace: !0, style: { textDecoration: "none" }, children: p }) : a != null && a.onClick ? /* @__PURE__ */ e(gr, { onClick: a.onClick, children: p }) : p;
|
|
1509
|
+
return /* @__PURE__ */ u(f, { direction: "row", gap: "xs", align: "center", children: [
|
|
1510
|
+
g,
|
|
1511
1511
|
/* @__PURE__ */ e(Fn, { separator: r, size: "md", children: t.map((x, W) => {
|
|
1512
1512
|
const y = W === t.length - 1;
|
|
1513
1513
|
return x.to && !y ? /* @__PURE__ */ e(Fr, { children: /* @__PURE__ */ e(Et, { to: x.to, children: x.label }) }, W) : /* @__PURE__ */ e(Fr, { currentPage: y, children: /* @__PURE__ */ e(En, { onClick: y ? void 0 : x.onClick, children: x.label }) }, W);
|
|
@@ -1524,7 +1524,7 @@ const gr = ur(
|
|
|
1524
1524
|
iconColor: l.iconColor,
|
|
1525
1525
|
hoverIconColor: l.hoverIconColor
|
|
1526
1526
|
}
|
|
1527
|
-
) : i ? /* @__PURE__ */ e(
|
|
1527
|
+
) : i ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Et, { to: i, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(Ar, { ...l }) }) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(gr, { onClick: o, children: /* @__PURE__ */ e(Ar, { ...l }) }) });
|
|
1528
1528
|
}, Gt = [
|
|
1529
1529
|
// brand (blue)
|
|
1530
1530
|
{
|
|
@@ -1611,9 +1611,9 @@ function Qn({
|
|
|
1611
1611
|
selectedGroupId: o,
|
|
1612
1612
|
onSelect: i
|
|
1613
1613
|
}) {
|
|
1614
|
-
const [l, s] = R(void 0), c = (
|
|
1615
|
-
i(
|
|
1616
|
-
},
|
|
1614
|
+
const [l, s] = R(void 0), c = (a) => {
|
|
1615
|
+
i(a), r();
|
|
1616
|
+
}, d = Gt[0];
|
|
1617
1617
|
return /* @__PURE__ */ e(
|
|
1618
1618
|
lr,
|
|
1619
1619
|
{
|
|
@@ -1642,27 +1642,27 @@ function Qn({
|
|
|
1642
1642
|
onMouseLeave: () => s(void 0),
|
|
1643
1643
|
style: Vr,
|
|
1644
1644
|
children: [
|
|
1645
|
-
/* @__PURE__ */ e("div", { style: Ir(o === null, l === "all",
|
|
1645
|
+
/* @__PURE__ */ e("div", { style: Ir(o === null, l === "all", d), children: /* @__PURE__ */ e("div", { style: { color: d.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(F, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1646
1646
|
/* @__PURE__ */ e("span", { style: Rr, children: "Semua" })
|
|
1647
1647
|
]
|
|
1648
1648
|
}
|
|
1649
1649
|
),
|
|
1650
|
-
n.map((
|
|
1650
|
+
n.map((a, m) => {
|
|
1651
1651
|
var y;
|
|
1652
|
-
const
|
|
1652
|
+
const p = o === a.id, g = l === a.id, x = ((y = a.items[0]) == null ? void 0 : y.icon) ?? "Grid", W = Gt[(m + 1) % Gt.length];
|
|
1653
1653
|
return /* @__PURE__ */ u(
|
|
1654
1654
|
"button",
|
|
1655
1655
|
{
|
|
1656
|
-
onClick: () => c(
|
|
1657
|
-
onMouseEnter: () => s(
|
|
1656
|
+
onClick: () => c(a.id),
|
|
1657
|
+
onMouseEnter: () => s(a.id),
|
|
1658
1658
|
onMouseLeave: () => s(void 0),
|
|
1659
1659
|
style: Vr,
|
|
1660
1660
|
children: [
|
|
1661
|
-
/* @__PURE__ */ e("div", { style: Ir(
|
|
1662
|
-
/* @__PURE__ */ e("span", { style: Rr, children:
|
|
1661
|
+
/* @__PURE__ */ e("div", { style: Ir(p, g, W), children: /* @__PURE__ */ e("div", { style: { color: W.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(F, { name: x, size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1662
|
+
/* @__PURE__ */ e("span", { style: Rr, children: a.name })
|
|
1663
1663
|
]
|
|
1664
1664
|
},
|
|
1665
|
-
|
|
1665
|
+
a.id
|
|
1666
1666
|
);
|
|
1667
1667
|
})
|
|
1668
1668
|
]
|
|
@@ -1675,13 +1675,13 @@ function _l({
|
|
|
1675
1675
|
onSelect: t,
|
|
1676
1676
|
"aria-label": r = "Pilih module"
|
|
1677
1677
|
} = {}) {
|
|
1678
|
-
const n = on(), o = hr(), { selectedGroupId: i, setSelectedGroupId: l } = sn(), [s, c] = R(!1),
|
|
1679
|
-
var
|
|
1680
|
-
if (l(
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1678
|
+
const n = on(), o = hr(), { selectedGroupId: i, setSelectedGroupId: l } = sn(), [s, c] = R(!1), d = (a) => {
|
|
1679
|
+
var m;
|
|
1680
|
+
if (l(a), a !== null) {
|
|
1681
|
+
const p = n.menus.find((x) => x.id === a), g = (m = p == null ? void 0 : p.items[0]) == null ? void 0 : m.to;
|
|
1682
|
+
g && o(g);
|
|
1683
1683
|
}
|
|
1684
|
-
t == null || t(
|
|
1684
|
+
t == null || t(a);
|
|
1685
1685
|
};
|
|
1686
1686
|
return /* @__PURE__ */ u(ie, { children: [
|
|
1687
1687
|
/* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
|
|
@@ -1702,11 +1702,11 @@ function _l({
|
|
|
1702
1702
|
cursor: "pointer"
|
|
1703
1703
|
},
|
|
1704
1704
|
"aria-label": r,
|
|
1705
|
-
onMouseEnter: (
|
|
1706
|
-
|
|
1705
|
+
onMouseEnter: (a) => {
|
|
1706
|
+
a.currentTarget.style.backgroundColor = "var(--sa-background-primary-inverse, #f8f8f8)";
|
|
1707
1707
|
},
|
|
1708
|
-
onMouseLeave: (
|
|
1709
|
-
|
|
1708
|
+
onMouseLeave: (a) => {
|
|
1709
|
+
a.currentTarget.style.backgroundColor = "transparent";
|
|
1710
1710
|
},
|
|
1711
1711
|
children: /* @__PURE__ */ e(F, { name: "GridApplication", size: "sm" })
|
|
1712
1712
|
}
|
|
@@ -1732,9 +1732,9 @@ function _l({
|
|
|
1732
1732
|
{
|
|
1733
1733
|
isShow: s,
|
|
1734
1734
|
onHide: () => c(!1),
|
|
1735
|
-
menus: n.menus.filter((
|
|
1735
|
+
menus: n.menus.filter((a) => a.parentGroupId === void 0),
|
|
1736
1736
|
selectedGroupId: i,
|
|
1737
|
-
onSelect:
|
|
1737
|
+
onSelect: d
|
|
1738
1738
|
}
|
|
1739
1739
|
)
|
|
1740
1740
|
] });
|
|
@@ -1773,11 +1773,11 @@ const Yn = (t, r) => {
|
|
|
1773
1773
|
verticalAlign: l
|
|
1774
1774
|
}),
|
|
1775
1775
|
[i, l]
|
|
1776
|
-
),
|
|
1776
|
+
), d = () => typeof r == "string" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: r }) : r, a = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(D, { color: "primary", fontWeight: "medium", children: t }) : t, m = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: n }) : n;
|
|
1777
1777
|
return /* @__PURE__ */ u(He, { children: [
|
|
1778
|
-
/* @__PURE__ */ e(Te, { style: s, width: o, children:
|
|
1779
|
-
n ? /* @__PURE__ */ e(Te, { style: c, width: 24, children:
|
|
1780
|
-
/* @__PURE__ */ e(Te, { style: s, children:
|
|
1778
|
+
/* @__PURE__ */ e(Te, { style: s, width: o, children: d() }),
|
|
1779
|
+
n ? /* @__PURE__ */ e(Te, { style: c, width: 24, children: m() }) : null,
|
|
1780
|
+
/* @__PURE__ */ e(Te, { style: s, children: a() })
|
|
1781
1781
|
] });
|
|
1782
1782
|
}
|
|
1783
1783
|
), Kn = qe(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(dr, { children: t.map((o, i) => /* @__PURE__ */ e(
|
|
@@ -1801,7 +1801,7 @@ const Yn = (t, r) => {
|
|
|
1801
1801
|
const s = fe(
|
|
1802
1802
|
() => Yn(o, t),
|
|
1803
1803
|
[o, t]
|
|
1804
|
-
), c = s.length > 2,
|
|
1804
|
+
), c = s.length > 2, d = () => {
|
|
1805
1805
|
switch (r) {
|
|
1806
1806
|
case 1:
|
|
1807
1807
|
return "width-full";
|
|
@@ -1816,7 +1816,7 @@ const Yn = (t, r) => {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
};
|
|
1818
1818
|
return /* @__PURE__ */ e(
|
|
1819
|
-
|
|
1819
|
+
f,
|
|
1820
1820
|
{
|
|
1821
1821
|
gap: c ? void 0 : "lg",
|
|
1822
1822
|
direction: "row",
|
|
@@ -1828,23 +1828,23 @@ const Yn = (t, r) => {
|
|
|
1828
1828
|
borderWidth: l ? "border" : void 0,
|
|
1829
1829
|
borderStyle: l ? "border-solid" : void 0,
|
|
1830
1830
|
borderColor: l ? "border-subtle" : void 0,
|
|
1831
|
-
children: s.map((
|
|
1832
|
-
|
|
1831
|
+
children: s.map((a, m) => /* @__PURE__ */ e(
|
|
1832
|
+
f,
|
|
1833
1833
|
{
|
|
1834
1834
|
direction: "column",
|
|
1835
1835
|
flex: c ? void 0 : "1",
|
|
1836
|
-
width: c ?
|
|
1836
|
+
width: c ? d() : void 0,
|
|
1837
1837
|
marginBottom: c ? "lg" : void 0,
|
|
1838
1838
|
children: /* @__PURE__ */ e(
|
|
1839
1839
|
Kn,
|
|
1840
1840
|
{
|
|
1841
1841
|
labelWidth: i,
|
|
1842
|
-
fields:
|
|
1842
|
+
fields: a,
|
|
1843
1843
|
separator: n
|
|
1844
1844
|
}
|
|
1845
1845
|
)
|
|
1846
1846
|
},
|
|
1847
|
-
|
|
1847
|
+
m
|
|
1848
1848
|
))
|
|
1849
1849
|
}
|
|
1850
1850
|
);
|
|
@@ -1852,7 +1852,7 @@ const Yn = (t, r) => {
|
|
|
1852
1852
|
), ei = ({ backButton: t }) => {
|
|
1853
1853
|
const [r, n] = R(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
|
|
1854
1854
|
return /* @__PURE__ */ u(
|
|
1855
|
-
|
|
1855
|
+
f,
|
|
1856
1856
|
{
|
|
1857
1857
|
direction: "row",
|
|
1858
1858
|
gap: "xs",
|
|
@@ -1896,24 +1896,24 @@ const Yn = (t, r) => {
|
|
|
1896
1896
|
header: l = !0,
|
|
1897
1897
|
headerBorder: s = !1,
|
|
1898
1898
|
subHeaders: c,
|
|
1899
|
-
action:
|
|
1900
|
-
titleTagProps:
|
|
1901
|
-
containerProps:
|
|
1902
|
-
headerProps:
|
|
1899
|
+
action: d,
|
|
1900
|
+
titleTagProps: a,
|
|
1901
|
+
containerProps: m,
|
|
1902
|
+
headerProps: p
|
|
1903
1903
|
}) => {
|
|
1904
|
-
const
|
|
1904
|
+
const g = ke("md"), x = hr(), W = gt(), y = t == null ? void 0 : t.show, k = () => {
|
|
1905
1905
|
if (typeof (t == null ? void 0 : t.onClick) == "function") {
|
|
1906
1906
|
t.onClick();
|
|
1907
1907
|
return;
|
|
1908
1908
|
}
|
|
1909
1909
|
x(-1, { replace: !0 });
|
|
1910
1910
|
}, E = () => {
|
|
1911
|
-
if (!
|
|
1912
|
-
if (nr(
|
|
1913
|
-
const C =
|
|
1911
|
+
if (!d) return null;
|
|
1912
|
+
if (nr(d)) return d;
|
|
1913
|
+
const C = d.filter(
|
|
1914
1914
|
(B) => B && (B.title || B.icon)
|
|
1915
1915
|
);
|
|
1916
|
-
return C.length === 0 ? null :
|
|
1916
|
+
return C.length === 0 ? null : g ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: C.map(({ title: B, icon: j, buttonProps: G, onClick: _ }, X) => /* @__PURE__ */ e(
|
|
1917
1917
|
T,
|
|
1918
1918
|
{
|
|
1919
1919
|
iconLeft: j ? /* @__PURE__ */ e(F, { name: j, size: "md" }) : void 0,
|
|
@@ -1954,7 +1954,7 @@ const Yn = (t, r) => {
|
|
|
1954
1954
|
] });
|
|
1955
1955
|
}, w = () => {
|
|
1956
1956
|
const C = /* @__PURE__ */ e(ei, { backButton: t });
|
|
1957
|
-
return t != null && t.navigateTo ? /* @__PURE__ */ e(
|
|
1957
|
+
return t != null && t.navigateTo ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
|
|
1958
1958
|
Et,
|
|
1959
1959
|
{
|
|
1960
1960
|
to: t.navigateTo,
|
|
@@ -1962,35 +1962,35 @@ const Yn = (t, r) => {
|
|
|
1962
1962
|
style: { textDecoration: "none" },
|
|
1963
1963
|
children: C
|
|
1964
1964
|
}
|
|
1965
|
-
) }) : /* @__PURE__ */ e(
|
|
1965
|
+
) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(gr, { onClick: k, children: C }) });
|
|
1966
1966
|
}, V = () => {
|
|
1967
|
-
const C = !!r, B = Array.isArray(
|
|
1967
|
+
const C = !!r, B = Array.isArray(d) && d.length > 0, j = nr(d) ? !0 : B;
|
|
1968
1968
|
if (!C && !j && !y) return null;
|
|
1969
|
-
const _ =
|
|
1969
|
+
const _ = g || !g && B;
|
|
1970
1970
|
return /* @__PURE__ */ u(
|
|
1971
|
-
|
|
1971
|
+
f,
|
|
1972
1972
|
{
|
|
1973
1973
|
direction: "column",
|
|
1974
1974
|
gap: "xs",
|
|
1975
|
-
paddingBlock: (
|
|
1976
|
-
paddingInline: (
|
|
1977
|
-
...
|
|
1975
|
+
paddingBlock: (p == null ? void 0 : p.paddingBlock) ?? "sm",
|
|
1976
|
+
paddingInline: (p == null ? void 0 : p.paddingInline) ?? "md",
|
|
1977
|
+
...p,
|
|
1978
1978
|
style: {
|
|
1979
1979
|
...s ? { borderBottom: "1px solid var(--sa-border-subtle, #0b120e24)" } : {},
|
|
1980
|
-
...
|
|
1980
|
+
...p == null ? void 0 : p.style
|
|
1981
1981
|
},
|
|
1982
1982
|
children: [
|
|
1983
1983
|
y && w(),
|
|
1984
1984
|
(C || j) && /* @__PURE__ */ u(
|
|
1985
|
-
|
|
1985
|
+
f,
|
|
1986
1986
|
{
|
|
1987
1987
|
direction: _ ? "row" : "column",
|
|
1988
1988
|
gap: "sm",
|
|
1989
1989
|
justify: "space-between",
|
|
1990
1990
|
align: _ ? "center" : "flex-start",
|
|
1991
1991
|
children: [
|
|
1992
|
-
C ? typeof r == "string" ? /* @__PURE__ */ u(
|
|
1993
|
-
/* @__PURE__ */ u(
|
|
1992
|
+
C ? typeof r == "string" ? /* @__PURE__ */ u(f, { direction: "row", gap: "lg", align: "center", children: [
|
|
1993
|
+
/* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
1994
1994
|
n && /* @__PURE__ */ e(F, { name: n, size: "md", color: "primary" }),
|
|
1995
1995
|
/* @__PURE__ */ e(
|
|
1996
1996
|
D,
|
|
@@ -2002,7 +2002,7 @@ const Yn = (t, r) => {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
)
|
|
2004
2004
|
] }),
|
|
2005
|
-
o && /* @__PURE__ */ e(Sn, { border: !0, size: "lg", text: o, ...
|
|
2005
|
+
o && /* @__PURE__ */ e(Sn, { border: !0, size: "lg", text: o, ...a })
|
|
2006
2006
|
] }) : r : null,
|
|
2007
2007
|
E()
|
|
2008
2008
|
]
|
|
@@ -2018,7 +2018,7 @@ const Yn = (t, r) => {
|
|
|
2018
2018
|
const _ = j.order ?? 0;
|
|
2019
2019
|
_ >= B && (B = _, C = G);
|
|
2020
2020
|
}), c.map(({ content: j, order: G, borderBottom: _ = !0 }, X) => /* @__PURE__ */ e(
|
|
2021
|
-
|
|
2021
|
+
f,
|
|
2022
2022
|
{
|
|
2023
2023
|
direction: "column",
|
|
2024
2024
|
paddingTop: "sm",
|
|
@@ -2037,7 +2037,7 @@ const Yn = (t, r) => {
|
|
|
2037
2037
|
}, A = () => {
|
|
2038
2038
|
const C = l ? V() : null, B = v();
|
|
2039
2039
|
return !C && !B ? null : /* @__PURE__ */ u(
|
|
2040
|
-
|
|
2040
|
+
f,
|
|
2041
2041
|
{
|
|
2042
2042
|
direction: "column",
|
|
2043
2043
|
style: {
|
|
@@ -2055,13 +2055,13 @@ const Yn = (t, r) => {
|
|
|
2055
2055
|
);
|
|
2056
2056
|
}, z = () => i;
|
|
2057
2057
|
return /* @__PURE__ */ u(
|
|
2058
|
-
|
|
2058
|
+
f,
|
|
2059
2059
|
{
|
|
2060
2060
|
direction: "column",
|
|
2061
2061
|
as: "main",
|
|
2062
|
-
...
|
|
2062
|
+
...m,
|
|
2063
2063
|
style: {
|
|
2064
|
-
...(
|
|
2064
|
+
...(m == null ? void 0 : m.style) ?? {},
|
|
2065
2065
|
animation: "pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"
|
|
2066
2066
|
},
|
|
2067
2067
|
children: [
|
|
@@ -2084,9 +2084,9 @@ const Yn = (t, r) => {
|
|
|
2084
2084
|
closeButton: l = ri,
|
|
2085
2085
|
width: s,
|
|
2086
2086
|
minWidth: c = "357px",
|
|
2087
|
-
maxWidth:
|
|
2088
|
-
},
|
|
2089
|
-
const
|
|
2087
|
+
maxWidth: d = "357px"
|
|
2088
|
+
}, a) => {
|
|
2089
|
+
const m = Or(s ?? c), p = Or(s ?? d);
|
|
2090
2090
|
return /* @__PURE__ */ e(
|
|
2091
2091
|
Xr,
|
|
2092
2092
|
{
|
|
@@ -2094,15 +2094,15 @@ const Yn = (t, r) => {
|
|
|
2094
2094
|
isShow: r,
|
|
2095
2095
|
position: "right",
|
|
2096
2096
|
onHide: t,
|
|
2097
|
-
ref:
|
|
2097
|
+
ref: a,
|
|
2098
2098
|
style: {
|
|
2099
|
-
minWidth:
|
|
2100
|
-
maxWidth:
|
|
2099
|
+
minWidth: m,
|
|
2100
|
+
maxWidth: p,
|
|
2101
2101
|
...o
|
|
2102
2102
|
},
|
|
2103
|
-
children: /* @__PURE__ */ u(
|
|
2103
|
+
children: /* @__PURE__ */ u(f, { direction: "column", padding: "lg", children: [
|
|
2104
2104
|
l ? /* @__PURE__ */ u(
|
|
2105
|
-
|
|
2105
|
+
f,
|
|
2106
2106
|
{
|
|
2107
2107
|
direction: "row",
|
|
2108
2108
|
align: "center",
|
|
@@ -2133,7 +2133,7 @@ const Yn = (t, r) => {
|
|
|
2133
2133
|
({ children: t, borderBottom: r = !0, padding: n = !0 }) => {
|
|
2134
2134
|
const o = ke("lg");
|
|
2135
2135
|
return /* @__PURE__ */ e(
|
|
2136
|
-
|
|
2136
|
+
f,
|
|
2137
2137
|
{
|
|
2138
2138
|
direction: "column",
|
|
2139
2139
|
padding: n ? "md" : "spacing-0",
|
|
@@ -2150,7 +2150,7 @@ const Yn = (t, r) => {
|
|
|
2150
2150
|
({ children: t, borderTop: r = !0, padding: n = !0 }) => {
|
|
2151
2151
|
const o = ke("lg");
|
|
2152
2152
|
return /* @__PURE__ */ e(
|
|
2153
|
-
|
|
2153
|
+
f,
|
|
2154
2154
|
{
|
|
2155
2155
|
direction: "column",
|
|
2156
2156
|
padding: n ? "md" : "spacing-0",
|
|
@@ -2165,7 +2165,7 @@ const Yn = (t, r) => {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
), oi = qe(
|
|
2167
2167
|
({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
2168
|
-
|
|
2168
|
+
f,
|
|
2169
2169
|
{
|
|
2170
2170
|
direction: "column",
|
|
2171
2171
|
padding: "md",
|
|
@@ -2186,28 +2186,28 @@ const Yn = (t, r) => {
|
|
|
2186
2186
|
footer: l,
|
|
2187
2187
|
actionContainer: s,
|
|
2188
2188
|
containerProps: c,
|
|
2189
|
-
bodyProps:
|
|
2190
|
-
headerProps:
|
|
2191
|
-
footerProps:
|
|
2192
|
-
variantTag:
|
|
2189
|
+
bodyProps: d,
|
|
2190
|
+
headerProps: a = { borderBottom: !0 },
|
|
2191
|
+
footerProps: m = { borderTop: !0 },
|
|
2192
|
+
variantTag: p = "info"
|
|
2193
2193
|
}) => {
|
|
2194
|
-
const
|
|
2194
|
+
const g = ke("lg"), x = () => n ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
2195
2195
|
/* @__PURE__ */ e(D, { fontWeight: "medium", children: r }),
|
|
2196
|
-
/* @__PURE__ */ e(ft, { border: !0, text: n, variant:
|
|
2196
|
+
/* @__PURE__ */ e(ft, { border: !0, text: n, variant: p })
|
|
2197
2197
|
] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: r }), W = () => i || /* @__PURE__ */ u(
|
|
2198
|
-
|
|
2198
|
+
f,
|
|
2199
2199
|
{
|
|
2200
2200
|
direction: "row",
|
|
2201
2201
|
justify: "space-between",
|
|
2202
2202
|
align: "flex-start",
|
|
2203
2203
|
gap: "md",
|
|
2204
2204
|
children: [
|
|
2205
|
-
/* @__PURE__ */ e(
|
|
2205
|
+
/* @__PURE__ */ e(f, { direction: "column", children: r ? x() : null }),
|
|
2206
2206
|
/* @__PURE__ */ e(
|
|
2207
|
-
|
|
2207
|
+
f,
|
|
2208
2208
|
{
|
|
2209
2209
|
direction: "column",
|
|
2210
|
-
style:
|
|
2210
|
+
style: g ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
|
|
2211
2211
|
...s,
|
|
2212
2212
|
children: o ?? null
|
|
2213
2213
|
}
|
|
@@ -2216,7 +2216,7 @@ const Yn = (t, r) => {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
), y = !!(i || r || o);
|
|
2218
2218
|
return /* @__PURE__ */ u(
|
|
2219
|
-
|
|
2219
|
+
f,
|
|
2220
2220
|
{
|
|
2221
2221
|
direction: "column",
|
|
2222
2222
|
bg: "white",
|
|
@@ -2231,9 +2231,9 @@ const Yn = (t, r) => {
|
|
|
2231
2231
|
...(c == null ? void 0 : c.style) ?? {}
|
|
2232
2232
|
},
|
|
2233
2233
|
children: [
|
|
2234
|
-
i !== null && y ? /* @__PURE__ */ e(an, { ...
|
|
2235
|
-
/* @__PURE__ */ e(oi, { ...
|
|
2236
|
-
l ? /* @__PURE__ */ e(dn, { ...
|
|
2234
|
+
i !== null && y ? /* @__PURE__ */ e(an, { ...a, children: W() }) : null,
|
|
2235
|
+
/* @__PURE__ */ e(oi, { ...d, children: t }),
|
|
2236
|
+
l ? /* @__PURE__ */ e(dn, { ...m, children: l }) : null
|
|
2237
2237
|
]
|
|
2238
2238
|
}
|
|
2239
2239
|
);
|
|
@@ -2258,10 +2258,10 @@ const Yn = (t, r) => {
|
|
|
2258
2258
|
setSearchParams: r,
|
|
2259
2259
|
searchParams: t,
|
|
2260
2260
|
searchQueries: n,
|
|
2261
|
-
isHasQuery: (
|
|
2262
|
-
getQueryParam: (
|
|
2261
|
+
isHasQuery: (m, p) => t.has(m) && t.get(m) === p,
|
|
2262
|
+
getQueryParam: (m) => t.get(m),
|
|
2263
2263
|
// route params
|
|
2264
|
-
getRouteParam: (
|
|
2264
|
+
getRouteParam: (m) => o[m],
|
|
2265
2265
|
params: o,
|
|
2266
2266
|
// location info
|
|
2267
2267
|
location: i,
|
|
@@ -2278,43 +2278,43 @@ const Yn = (t, r) => {
|
|
|
2278
2278
|
searchQueries: l,
|
|
2279
2279
|
dropdownSearchKey: s,
|
|
2280
2280
|
filterKey: c = "filter",
|
|
2281
|
-
pageKey:
|
|
2281
|
+
pageKey: d = "page"
|
|
2282
2282
|
}) => {
|
|
2283
2283
|
if (o) {
|
|
2284
|
-
let
|
|
2284
|
+
let a;
|
|
2285
2285
|
switch (n) {
|
|
2286
2286
|
case "search":
|
|
2287
|
-
|
|
2287
|
+
a = wi(t);
|
|
2288
2288
|
break;
|
|
2289
2289
|
case "dropdown":
|
|
2290
2290
|
case "dropdown-multiple":
|
|
2291
|
-
|
|
2291
|
+
a = xi(t);
|
|
2292
2292
|
break;
|
|
2293
2293
|
case "radio":
|
|
2294
|
-
|
|
2294
|
+
a = bi(t);
|
|
2295
2295
|
break;
|
|
2296
2296
|
case "date-range":
|
|
2297
|
-
|
|
2297
|
+
a = vi(t);
|
|
2298
2298
|
break;
|
|
2299
2299
|
case "advanced-date-range":
|
|
2300
|
-
|
|
2300
|
+
a = Di(t);
|
|
2301
2301
|
break;
|
|
2302
2302
|
case "date":
|
|
2303
|
-
|
|
2303
|
+
a = Ci(t);
|
|
2304
2304
|
break;
|
|
2305
2305
|
default:
|
|
2306
|
-
|
|
2306
|
+
a = t;
|
|
2307
2307
|
break;
|
|
2308
2308
|
}
|
|
2309
|
-
if (typeof
|
|
2310
|
-
const
|
|
2309
|
+
if (typeof a < "u") {
|
|
2310
|
+
const p = {
|
|
2311
2311
|
...l[c] && typeof l[c] == "string" ? JSON.parse(l[c]) : void 0,
|
|
2312
|
-
[r]:
|
|
2313
|
-
},
|
|
2314
|
-
s && typeof s == "string" && delete
|
|
2312
|
+
[r]: a
|
|
2313
|
+
}, g = { ...l };
|
|
2314
|
+
s && typeof s == "string" && delete g[s], delete g[d];
|
|
2315
2315
|
const x = {
|
|
2316
|
-
...
|
|
2317
|
-
[c]: JSON.stringify(
|
|
2316
|
+
...g,
|
|
2317
|
+
[c]: JSON.stringify(p)
|
|
2318
2318
|
}, W = new URLSearchParams(l).toString(), y = new URLSearchParams(
|
|
2319
2319
|
x
|
|
2320
2320
|
).toString();
|
|
@@ -2381,44 +2381,44 @@ const Yn = (t, r) => {
|
|
|
2381
2381
|
pageKey: o,
|
|
2382
2382
|
filters: i
|
|
2383
2383
|
}) => {
|
|
2384
|
-
const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), [
|
|
2384
|
+
const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), [d, a] = R({}), m = () => {
|
|
2385
2385
|
l.delete(n || "filter"), s(l);
|
|
2386
|
-
},
|
|
2387
|
-
switch (
|
|
2386
|
+
}, p = (g, x) => {
|
|
2387
|
+
switch (g.type) {
|
|
2388
2388
|
case "radio": {
|
|
2389
|
-
const { show: W = !0 } =
|
|
2390
|
-
return W && /* @__PURE__ */ e(
|
|
2389
|
+
const { show: W = !0 } = g;
|
|
2390
|
+
return W && /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
|
|
2391
2391
|
}
|
|
2392
2392
|
case "dropdown": {
|
|
2393
|
-
const { show: W = !0 } =
|
|
2394
|
-
return W && /* @__PURE__ */ e(
|
|
2393
|
+
const { show: W = !0 } = g;
|
|
2394
|
+
return W && /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
|
|
2395
2395
|
}
|
|
2396
2396
|
case "date-range":
|
|
2397
|
-
return /* @__PURE__ */ e(
|
|
2397
|
+
return /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
|
|
2398
2398
|
case "date":
|
|
2399
|
-
return /* @__PURE__ */ e(
|
|
2399
|
+
return /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
|
|
2400
2400
|
case "dropdown-multiple": {
|
|
2401
|
-
const { show: W = !0 } =
|
|
2402
|
-
return W && /* @__PURE__ */ e(
|
|
2401
|
+
const { show: W = !0 } = g;
|
|
2402
|
+
return W && /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
|
|
2403
2403
|
}
|
|
2404
2404
|
default:
|
|
2405
2405
|
return null;
|
|
2406
2406
|
}
|
|
2407
2407
|
};
|
|
2408
|
-
return /* @__PURE__ */ e(ii, { onHide: r, show: t || !1, children: /* @__PURE__ */ u(
|
|
2408
|
+
return /* @__PURE__ */ e(ii, { onHide: r, show: t || !1, children: /* @__PURE__ */ u(f, { direction: "column", gap: "md", children: [
|
|
2409
2409
|
/* @__PURE__ */ u(le, { direction: "row", justify: "space-between", align: "center", children: [
|
|
2410
|
-
/* @__PURE__ */ e(
|
|
2410
|
+
/* @__PURE__ */ e(f, { direction: "column", children: "Filter" }),
|
|
2411
2411
|
/* @__PURE__ */ e(
|
|
2412
|
-
|
|
2412
|
+
f,
|
|
2413
2413
|
{
|
|
2414
2414
|
direction: "column",
|
|
2415
2415
|
style: { cursor: "pointer" },
|
|
2416
|
-
onClick:
|
|
2416
|
+
onClick: m,
|
|
2417
2417
|
children: "Reset"
|
|
2418
2418
|
}
|
|
2419
2419
|
)
|
|
2420
2420
|
] }),
|
|
2421
|
-
i == null ? void 0 : i.map((
|
|
2421
|
+
i == null ? void 0 : i.map((g, x) => p(g, x))
|
|
2422
2422
|
] }) });
|
|
2423
2423
|
}, Ei = ({
|
|
2424
2424
|
searchKey: t = "q",
|
|
@@ -2429,16 +2429,16 @@ const Yn = (t, r) => {
|
|
|
2429
2429
|
showSearchFilter: l = !0,
|
|
2430
2430
|
showStatusFilter: s = !0,
|
|
2431
2431
|
filterKey: c = "filter",
|
|
2432
|
-
pageKey:
|
|
2433
|
-
customWidthSearch:
|
|
2434
|
-
handleOnReset:
|
|
2435
|
-
filterConfigs:
|
|
2436
|
-
buttonToggleProps:
|
|
2432
|
+
pageKey: d = "page",
|
|
2433
|
+
customWidthSearch: a,
|
|
2434
|
+
handleOnReset: m,
|
|
2435
|
+
filterConfigs: p,
|
|
2436
|
+
buttonToggleProps: g,
|
|
2437
2437
|
position: x = "right",
|
|
2438
2438
|
titleSearchLabel: W = "Work Order",
|
|
2439
2439
|
withTitleLabels: y = !1
|
|
2440
2440
|
}) => {
|
|
2441
|
-
const E = (
|
|
2441
|
+
const E = (g == null ? void 0 : g.isShowLabel) ?? !0, [w, V] = R(!1), [v, A] = R(0), z = () => {
|
|
2442
2442
|
A((O) => O + 1);
|
|
2443
2443
|
}, { searchParams: C, setSearchParams: B, getQueryParam: j } = Ie(), G = zt(C.toString()), _ = pr(t, C, c) || "", [X, te] = R(_), me = j(c), de = !!(me && !(() => {
|
|
2444
2444
|
if (me)
|
|
@@ -2463,7 +2463,7 @@ const Yn = (t, r) => {
|
|
|
2463
2463
|
searchQueries: G,
|
|
2464
2464
|
setSearchParams: B,
|
|
2465
2465
|
filterKey: c,
|
|
2466
|
-
pageKey:
|
|
2466
|
+
pageKey: d
|
|
2467
2467
|
});
|
|
2468
2468
|
}, 350);
|
|
2469
2469
|
return () => {
|
|
@@ -2476,7 +2476,7 @@ const Yn = (t, r) => {
|
|
|
2476
2476
|
G,
|
|
2477
2477
|
B,
|
|
2478
2478
|
c,
|
|
2479
|
-
|
|
2479
|
+
d
|
|
2480
2480
|
]), /* @__PURE__ */ u(
|
|
2481
2481
|
le,
|
|
2482
2482
|
{
|
|
@@ -2486,12 +2486,12 @@ const Yn = (t, r) => {
|
|
|
2486
2486
|
},
|
|
2487
2487
|
align: "flex-end",
|
|
2488
2488
|
children: [
|
|
2489
|
-
de && /* @__PURE__ */ e(
|
|
2489
|
+
de && /* @__PURE__ */ e(f, { direction: "column", justify: "flex-end", children: /* @__PURE__ */ e(
|
|
2490
2490
|
T,
|
|
2491
2491
|
{
|
|
2492
2492
|
onClick: () => {
|
|
2493
2493
|
const O = new URLSearchParams(C);
|
|
2494
|
-
O.delete(c), B(O), te(""), z(),
|
|
2494
|
+
O.delete(c), B(O), te(""), z(), m && m();
|
|
2495
2495
|
},
|
|
2496
2496
|
variant: "outline",
|
|
2497
2497
|
tone: "neutral",
|
|
@@ -2499,7 +2499,7 @@ const Yn = (t, r) => {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
) }),
|
|
2501
2501
|
i == null ? void 0 : i.map(({ minWidth: O, content: ne, title: ye, onClickContainer: ge }, pe) => /* @__PURE__ */ u(
|
|
2502
|
-
|
|
2502
|
+
f,
|
|
2503
2503
|
{
|
|
2504
2504
|
direction: "column",
|
|
2505
2505
|
gap: "sm",
|
|
@@ -2514,7 +2514,7 @@ const Yn = (t, r) => {
|
|
|
2514
2514
|
},
|
|
2515
2515
|
`extended-filter-${pe}-${v}`
|
|
2516
2516
|
)),
|
|
2517
|
-
!!(
|
|
2517
|
+
!!(p != null && p.length) && /* @__PURE__ */ e(
|
|
2518
2518
|
T,
|
|
2519
2519
|
{
|
|
2520
2520
|
primary: de,
|
|
@@ -2523,7 +2523,7 @@ const Yn = (t, r) => {
|
|
|
2523
2523
|
F,
|
|
2524
2524
|
{
|
|
2525
2525
|
size: "sm",
|
|
2526
|
-
name: (
|
|
2526
|
+
name: (g == null ? void 0 : g.icon) || "FilterHorizontal",
|
|
2527
2527
|
style: {
|
|
2528
2528
|
color: me ? "var(--sa-background-brand, #04254f)" : "var(--sa-text-primary, #292a2e)"
|
|
2529
2529
|
}
|
|
@@ -2535,7 +2535,7 @@ const Yn = (t, r) => {
|
|
|
2535
2535
|
}
|
|
2536
2536
|
),
|
|
2537
2537
|
s && /* @__PURE__ */ u(
|
|
2538
|
-
|
|
2538
|
+
f,
|
|
2539
2539
|
{
|
|
2540
2540
|
direction: "column",
|
|
2541
2541
|
gap: "sm",
|
|
@@ -2594,12 +2594,12 @@ const Yn = (t, r) => {
|
|
|
2594
2594
|
}
|
|
2595
2595
|
),
|
|
2596
2596
|
l && /* @__PURE__ */ u(
|
|
2597
|
-
|
|
2597
|
+
f,
|
|
2598
2598
|
{
|
|
2599
2599
|
direction: "column",
|
|
2600
2600
|
gap: "sm",
|
|
2601
2601
|
style: {
|
|
2602
|
-
width:
|
|
2602
|
+
width: a && ee ? a : ee ? "310px" : ""
|
|
2603
2603
|
},
|
|
2604
2604
|
children: [
|
|
2605
2605
|
y && /* @__PURE__ */ u(Ge.SubH3, { children: [
|
|
@@ -2626,8 +2626,8 @@ const Yn = (t, r) => {
|
|
|
2626
2626
|
isOpen: w,
|
|
2627
2627
|
onClose: () => V(!1),
|
|
2628
2628
|
filterKey: c,
|
|
2629
|
-
filters:
|
|
2630
|
-
pageKey:
|
|
2629
|
+
filters: p,
|
|
2630
|
+
pageKey: d
|
|
2631
2631
|
}
|
|
2632
2632
|
)
|
|
2633
2633
|
]
|
|
@@ -2641,10 +2641,10 @@ function yr({
|
|
|
2641
2641
|
pageKey: o = "page",
|
|
2642
2642
|
searchKey: i = "q"
|
|
2643
2643
|
}) {
|
|
2644
|
-
const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(),
|
|
2644
|
+
const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), d = fe(
|
|
2645
2645
|
() => Object.fromEntries(t.map((v) => [v.key, v])),
|
|
2646
2646
|
[t]
|
|
2647
|
-
),
|
|
2647
|
+
), a = fe(() => {
|
|
2648
2648
|
const v = (l.get(n) || "").split(",").map((z) => z.trim()).filter(Boolean);
|
|
2649
2649
|
let A = [];
|
|
2650
2650
|
try {
|
|
@@ -2653,10 +2653,10 @@ function yr({
|
|
|
2653
2653
|
} catch {
|
|
2654
2654
|
}
|
|
2655
2655
|
return t.map((z) => z.key).filter((z) => {
|
|
2656
|
-
const C =
|
|
2656
|
+
const C = d[z];
|
|
2657
2657
|
return (C == null ? void 0 : C.locked) || v.includes(z) || A.includes(z);
|
|
2658
2658
|
});
|
|
2659
|
-
}, [l, n, r, i, t,
|
|
2659
|
+
}, [l, n, r, i, t, d]), m = Q(
|
|
2660
2660
|
(v) => {
|
|
2661
2661
|
try {
|
|
2662
2662
|
return v[r] ? JSON.parse(v[r]) : {};
|
|
@@ -2665,39 +2665,39 @@ function yr({
|
|
|
2665
2665
|
}
|
|
2666
2666
|
},
|
|
2667
2667
|
[r]
|
|
2668
|
-
),
|
|
2668
|
+
), p = Q(
|
|
2669
2669
|
(v) => {
|
|
2670
2670
|
const A = { ...c };
|
|
2671
2671
|
v.length ? A[n] = v.join(",") : delete A[n], s(A);
|
|
2672
2672
|
},
|
|
2673
2673
|
[c, n, s]
|
|
2674
|
-
),
|
|
2674
|
+
), g = Q(
|
|
2675
2675
|
(v) => {
|
|
2676
|
-
|
|
2676
|
+
a.includes(v) || p([...a, v]);
|
|
2677
2677
|
},
|
|
2678
|
-
[
|
|
2678
|
+
[a, p]
|
|
2679
2679
|
), x = Q(
|
|
2680
2680
|
(v) => {
|
|
2681
2681
|
var B;
|
|
2682
|
-
if ((B =
|
|
2683
|
-
const A = { ...c }, z =
|
|
2682
|
+
if ((B = d[v]) != null && B.locked) return;
|
|
2683
|
+
const A = { ...c }, z = a.filter((j) => j !== v);
|
|
2684
2684
|
z.length ? A[n] = z.join(",") : delete A[n];
|
|
2685
|
-
const C =
|
|
2685
|
+
const C = m(A);
|
|
2686
2686
|
v in C && (delete C[v], Object.keys(C).length ? A[r] = JSON.stringify(C) : delete A[r]), delete A[o], s(A);
|
|
2687
2687
|
},
|
|
2688
2688
|
[
|
|
2689
2689
|
c,
|
|
2690
|
-
|
|
2690
|
+
a,
|
|
2691
2691
|
n,
|
|
2692
2692
|
r,
|
|
2693
2693
|
o,
|
|
2694
|
-
|
|
2694
|
+
m,
|
|
2695
2695
|
s,
|
|
2696
|
-
|
|
2696
|
+
d
|
|
2697
2697
|
]
|
|
2698
2698
|
), W = Q(
|
|
2699
|
-
(v) =>
|
|
2700
|
-
[
|
|
2699
|
+
(v) => a.includes(v) ? x(v) : g(v),
|
|
2700
|
+
[a, g, x]
|
|
2701
2701
|
), y = Q(
|
|
2702
2702
|
(v) => {
|
|
2703
2703
|
switch (v.type) {
|
|
@@ -2720,18 +2720,18 @@ function yr({
|
|
|
2720
2720
|
return A ? new Date(A) : void 0;
|
|
2721
2721
|
}
|
|
2722
2722
|
case "date-compact": {
|
|
2723
|
-
const z =
|
|
2723
|
+
const z = m(Object.fromEntries(l.entries()))[v.key];
|
|
2724
2724
|
return z && typeof z == "object" ? z : void 0;
|
|
2725
2725
|
}
|
|
2726
2726
|
default:
|
|
2727
2727
|
return;
|
|
2728
2728
|
}
|
|
2729
2729
|
},
|
|
2730
|
-
[l, r,
|
|
2730
|
+
[l, r, m]
|
|
2731
2731
|
), k = Q(
|
|
2732
2732
|
(v, A) => {
|
|
2733
2733
|
if (v.type === "date-compact") {
|
|
2734
|
-
const z = { ...c }, C =
|
|
2734
|
+
const z = { ...c }, C = m(z);
|
|
2735
2735
|
A == null ? delete C[v.key] : C[v.key] = A, Object.keys(C).length ? z[r] = JSON.stringify(C) : delete z[r], delete z[o], s(z);
|
|
2736
2736
|
return;
|
|
2737
2737
|
}
|
|
@@ -2745,22 +2745,22 @@ function yr({
|
|
|
2745
2745
|
pageKey: o
|
|
2746
2746
|
});
|
|
2747
2747
|
},
|
|
2748
|
-
[c, s, r, o,
|
|
2748
|
+
[c, s, r, o, m]
|
|
2749
2749
|
), E = Q(
|
|
2750
2750
|
(v) => {
|
|
2751
|
-
const A = { ...c }, z =
|
|
2751
|
+
const A = { ...c }, z = m(A);
|
|
2752
2752
|
v in z && (delete z[v], Object.keys(z).length ? A[r] = JSON.stringify(z) : delete A[r]), delete A[o], s(A);
|
|
2753
2753
|
},
|
|
2754
|
-
[c, r, o,
|
|
2754
|
+
[c, r, o, m, s]
|
|
2755
2755
|
), w = Q(() => {
|
|
2756
2756
|
const v = { ...c };
|
|
2757
2757
|
delete v[r], delete v[n], delete v[o], s(v);
|
|
2758
|
-
}, [c, r, n, o, s]), V =
|
|
2758
|
+
}, [c, r, n, o, s]), V = a.length > 0;
|
|
2759
2759
|
return {
|
|
2760
|
-
activeKeys:
|
|
2761
|
-
configByKey:
|
|
2760
|
+
activeKeys: a,
|
|
2761
|
+
configByKey: d,
|
|
2762
2762
|
hasActiveFilter: V,
|
|
2763
|
-
addFilter:
|
|
2763
|
+
addFilter: g,
|
|
2764
2764
|
removeFilter: x,
|
|
2765
2765
|
toggleFilter: W,
|
|
2766
2766
|
getValue: y,
|
|
@@ -2801,7 +2801,7 @@ function Mi({
|
|
|
2801
2801
|
const l = fe(
|
|
2802
2802
|
() => ({ order: t.map((C) => C.key), hidden: [] }),
|
|
2803
2803
|
[t]
|
|
2804
|
-
), s = r ? pt.columns(r) : void 0, c = (C, B) => Ct({ order: C.order ?? B, hidden: C.hidden ?? [] }, t), [
|
|
2804
|
+
), s = r ? pt.columns(r) : void 0, c = (C, B) => Ct({ order: C.order ?? B, hidden: C.hidden ?? [] }, t), [d, a] = R(() => {
|
|
2805
2805
|
if (i && (i.order || i.hidden))
|
|
2806
2806
|
return c(i, t.map((C) => C.key));
|
|
2807
2807
|
if (s) {
|
|
@@ -2809,56 +2809,56 @@ function Mi({
|
|
|
2809
2809
|
if (C && Array.isArray(C.order)) return Ct(C, t);
|
|
2810
2810
|
}
|
|
2811
2811
|
return l;
|
|
2812
|
-
}),
|
|
2813
|
-
U(() =>
|
|
2814
|
-
const
|
|
2815
|
-
|
|
2816
|
-
const
|
|
2812
|
+
}), m = t.map((C) => C.key).join("|");
|
|
2813
|
+
U(() => a((C) => Ct(C, t)), [m]);
|
|
2814
|
+
const p = ce(d);
|
|
2815
|
+
p.current = d;
|
|
2816
|
+
const g = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, x = ce(g);
|
|
2817
2817
|
U(() => {
|
|
2818
|
-
if (
|
|
2819
|
-
x.current =
|
|
2820
|
-
const C =
|
|
2821
|
-
B.order.join("|") === C.order.join("|") && B.hidden.join("|") === C.hidden.join("|") || (
|
|
2822
|
-
}, [
|
|
2823
|
-
const W =
|
|
2818
|
+
if (g == null || x.current === g) return;
|
|
2819
|
+
x.current = g;
|
|
2820
|
+
const C = p.current, B = c(i, C.order);
|
|
2821
|
+
B.order.join("|") === C.order.join("|") && B.hidden.join("|") === C.hidden.join("|") || (a(B), s && n.set(s, B));
|
|
2822
|
+
}, [g, m]);
|
|
2823
|
+
const W = ce(!1);
|
|
2824
2824
|
U(() => {
|
|
2825
|
-
W.current || (W.current = !0, o == null || o(
|
|
2825
|
+
W.current || (W.current = !0, o == null || o(d));
|
|
2826
2826
|
}, []);
|
|
2827
2827
|
const y = Q(
|
|
2828
2828
|
(C) => {
|
|
2829
|
-
|
|
2829
|
+
a(C), s && n.set(s, C), o == null || o(C);
|
|
2830
2830
|
},
|
|
2831
2831
|
[s, n, o]
|
|
2832
2832
|
), k = fe(() => {
|
|
2833
2833
|
const C = new Map(t.map((B) => [B.key, B]));
|
|
2834
|
-
return
|
|
2835
|
-
}, [
|
|
2834
|
+
return d.order.filter((B) => C.has(B)).map((B) => ({ ...C.get(B), visible: !d.hidden.includes(B) }));
|
|
2835
|
+
}, [d, t]), E = Q(
|
|
2836
2836
|
(C) => {
|
|
2837
|
-
const B =
|
|
2838
|
-
y({ ...
|
|
2837
|
+
const B = d.hidden.includes(C) ? d.hidden.filter((j) => j !== C) : [...d.hidden, C];
|
|
2838
|
+
y({ ...d, hidden: B });
|
|
2839
2839
|
},
|
|
2840
|
-
[
|
|
2840
|
+
[d, y]
|
|
2841
2841
|
), w = Q(
|
|
2842
2842
|
(C, B) => {
|
|
2843
2843
|
if (C === B) return;
|
|
2844
|
-
const j = [...
|
|
2845
|
-
j.splice(B, 0, G), y({ ...
|
|
2844
|
+
const j = [...d.order], [G] = j.splice(C, 1);
|
|
2845
|
+
j.splice(B, 0, G), y({ ...d, order: j });
|
|
2846
2846
|
},
|
|
2847
|
-
[
|
|
2847
|
+
[d, y]
|
|
2848
2848
|
), V = Q(
|
|
2849
2849
|
(C) => {
|
|
2850
2850
|
y({
|
|
2851
|
-
...
|
|
2851
|
+
...d,
|
|
2852
2852
|
hidden: C ? t.filter((B) => !B.locked).map((B) => B.key) : []
|
|
2853
2853
|
});
|
|
2854
2854
|
},
|
|
2855
|
-
[
|
|
2855
|
+
[d, t, y]
|
|
2856
2856
|
), v = Q(() => y(l), [y, l]), A = Q(
|
|
2857
2857
|
(C) => y(Ct(C, t)),
|
|
2858
2858
|
[y, t]
|
|
2859
|
-
), z =
|
|
2859
|
+
), z = d.hidden.length === 0;
|
|
2860
2860
|
return {
|
|
2861
|
-
state:
|
|
2861
|
+
state: d,
|
|
2862
2862
|
orderedColumns: k,
|
|
2863
2863
|
allVisible: z,
|
|
2864
2864
|
toggleVisibility: E,
|
|
@@ -2876,15 +2876,15 @@ function Wi({
|
|
|
2876
2876
|
getColumns: i,
|
|
2877
2877
|
applyColumns: l
|
|
2878
2878
|
}) {
|
|
2879
|
-
const { searchParams: s, setSearchParams: c } = Ie(),
|
|
2880
|
-
() =>
|
|
2881
|
-
),
|
|
2879
|
+
const { searchParams: s, setSearchParams: c } = Ie(), d = t ? pt.savedViews(t) : void 0, [a, m] = R(
|
|
2880
|
+
() => d ? r.get(d) || [] : []
|
|
2881
|
+
), p = Q(
|
|
2882
2882
|
(y) => {
|
|
2883
|
-
|
|
2883
|
+
m(y), d && r.set(d, y);
|
|
2884
2884
|
},
|
|
2885
|
-
[
|
|
2885
|
+
[d]
|
|
2886
2886
|
// storage identity is stable (module singleton / caller-provided)
|
|
2887
|
-
),
|
|
2887
|
+
), g = Q(
|
|
2888
2888
|
(y) => {
|
|
2889
2889
|
const k = y.trim();
|
|
2890
2890
|
if (!k) return;
|
|
@@ -2900,12 +2900,12 @@ function Wi({
|
|
|
2900
2900
|
columns: i == null ? void 0 : i(),
|
|
2901
2901
|
createdAt: Date.now()
|
|
2902
2902
|
};
|
|
2903
|
-
|
|
2903
|
+
p([...a, w]);
|
|
2904
2904
|
},
|
|
2905
|
-
[n, s, i,
|
|
2905
|
+
[n, s, i, p, a]
|
|
2906
2906
|
), x = Q(
|
|
2907
|
-
(y) =>
|
|
2908
|
-
[
|
|
2907
|
+
(y) => p(a.filter((k) => k.id !== y)),
|
|
2908
|
+
[p, a]
|
|
2909
2909
|
), W = Q(
|
|
2910
2910
|
(y) => {
|
|
2911
2911
|
const k = Object.fromEntries(s.entries());
|
|
@@ -2914,9 +2914,9 @@ function Wi({
|
|
|
2914
2914
|
[s, n, o, c, l]
|
|
2915
2915
|
);
|
|
2916
2916
|
return {
|
|
2917
|
-
enabled: !!
|
|
2918
|
-
views:
|
|
2919
|
-
saveView:
|
|
2917
|
+
enabled: !!d,
|
|
2918
|
+
views: a,
|
|
2919
|
+
saveView: g,
|
|
2920
2920
|
deleteView: x,
|
|
2921
2921
|
applyView: W
|
|
2922
2922
|
};
|
|
@@ -2927,26 +2927,33 @@ function Bi({
|
|
|
2927
2927
|
snapshotKeys: n,
|
|
2928
2928
|
enabled: o = !0
|
|
2929
2929
|
}) {
|
|
2930
|
-
const { searchParams: i } = Ie(), l = t && o ? pt.lastState(t) : void 0;
|
|
2930
|
+
const { searchParams: i } = Ie(), l = t && o ? pt.lastState(t) : void 0, s = ce(l);
|
|
2931
2931
|
U(() => {
|
|
2932
|
-
if (!l)
|
|
2932
|
+
if (!l) {
|
|
2933
|
+
s.current = l;
|
|
2934
|
+
return;
|
|
2935
|
+
}
|
|
2936
|
+
if (s.current !== l) {
|
|
2937
|
+
s.current = l;
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2933
2940
|
const a = {};
|
|
2934
|
-
n.forEach((
|
|
2935
|
-
const
|
|
2936
|
-
|
|
2941
|
+
n.forEach((m) => {
|
|
2942
|
+
const p = i.get(m);
|
|
2943
|
+
p != null && (a[m] = p);
|
|
2937
2944
|
}), Object.keys(a).length !== 0 && r.set(l, a);
|
|
2938
2945
|
}, [i, l, n, r]);
|
|
2939
|
-
const
|
|
2946
|
+
const c = Q(() => {
|
|
2940
2947
|
if (!l) return null;
|
|
2941
2948
|
const a = r.get(l);
|
|
2942
2949
|
return a && Object.keys(a).length > 0 ? a : null;
|
|
2943
|
-
}, [l, r]),
|
|
2950
|
+
}, [l, r]), d = Q(() => {
|
|
2944
2951
|
l && r.remove(l);
|
|
2945
2952
|
}, [l, r]);
|
|
2946
2953
|
return {
|
|
2947
2954
|
enabled: !!l,
|
|
2948
|
-
read:
|
|
2949
|
-
clear:
|
|
2955
|
+
read: c,
|
|
2956
|
+
clear: d
|
|
2950
2957
|
};
|
|
2951
2958
|
}
|
|
2952
2959
|
function zi({
|
|
@@ -2956,27 +2963,34 @@ function zi({
|
|
|
2956
2963
|
pageSizeOptions: o,
|
|
2957
2964
|
enabled: i = !0
|
|
2958
2965
|
}) {
|
|
2959
|
-
const { searchParams: l } = Ie(), s = t && i ? pt.perPage(t) : void 0, c = l.toString();
|
|
2966
|
+
const { searchParams: l } = Ie(), s = t && i ? pt.perPage(t) : void 0, c = l.toString(), d = ce(s);
|
|
2960
2967
|
U(() => {
|
|
2961
|
-
if (!s)
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2968
|
+
if (!s) {
|
|
2969
|
+
d.current = s;
|
|
2970
|
+
return;
|
|
2971
|
+
}
|
|
2972
|
+
if (d.current !== s) {
|
|
2973
|
+
d.current = s;
|
|
2974
|
+
return;
|
|
2975
|
+
}
|
|
2976
|
+
const p = l.get(n);
|
|
2977
|
+
if (!p) return;
|
|
2978
|
+
const g = Number(p);
|
|
2965
2979
|
!Number.isFinite(g) || g <= 0 || r.set(s, g);
|
|
2966
2980
|
}, [c, s, n, r]);
|
|
2967
2981
|
const a = Q(() => {
|
|
2968
2982
|
if (!s) return null;
|
|
2969
|
-
const
|
|
2970
|
-
if (
|
|
2971
|
-
const g = Number(
|
|
2983
|
+
const p = r.get(s);
|
|
2984
|
+
if (p == null) return null;
|
|
2985
|
+
const g = Number(p);
|
|
2972
2986
|
return !Number.isFinite(g) || g <= 0 || o && !o.includes(g) ? null : String(g);
|
|
2973
|
-
}, [s, r, o]),
|
|
2987
|
+
}, [s, r, o]), m = Q(() => {
|
|
2974
2988
|
s && r.remove(s);
|
|
2975
2989
|
}, [s, r]);
|
|
2976
2990
|
return {
|
|
2977
2991
|
enabled: !!s,
|
|
2978
2992
|
read: a,
|
|
2979
|
-
clear:
|
|
2993
|
+
clear: m
|
|
2980
2994
|
};
|
|
2981
2995
|
}
|
|
2982
2996
|
let Ut = {}, Jt = !1, Qt = null;
|
|
@@ -2996,20 +3010,20 @@ function Ii({
|
|
|
2996
3010
|
readSnapshot: o,
|
|
2997
3011
|
readPerPage: i
|
|
2998
3012
|
}) {
|
|
2999
|
-
const { searchParams: l, setSearchParams: s, location: c } = Ie(),
|
|
3013
|
+
const { searchParams: l, setSearchParams: s, location: c } = Ie(), d = ce(null);
|
|
3000
3014
|
U(() => {
|
|
3001
|
-
if (!t ||
|
|
3002
|
-
|
|
3003
|
-
const
|
|
3015
|
+
if (!t || d.current === c.pathname) return;
|
|
3016
|
+
d.current = c.pathname;
|
|
3017
|
+
const a = {};
|
|
3004
3018
|
if (!l.has(n)) {
|
|
3005
|
-
const
|
|
3006
|
-
|
|
3019
|
+
const m = i();
|
|
3020
|
+
m && (a[n] = m);
|
|
3007
3021
|
}
|
|
3008
|
-
if (!r.some((
|
|
3009
|
-
const
|
|
3010
|
-
|
|
3022
|
+
if (!r.some((m) => l.has(m))) {
|
|
3023
|
+
const m = o();
|
|
3024
|
+
m && Object.assign(a, m);
|
|
3011
3025
|
}
|
|
3012
|
-
Object.keys(
|
|
3026
|
+
Object.keys(a).length !== 0 && Ai(a, s);
|
|
3013
3027
|
}, [c.pathname, t]);
|
|
3014
3028
|
}
|
|
3015
3029
|
const Ri = ({
|
|
@@ -3034,7 +3048,7 @@ const Ri = ({
|
|
|
3034
3048
|
{
|
|
3035
3049
|
style: { minWidth: 260 },
|
|
3036
3050
|
title: /* @__PURE__ */ u(
|
|
3037
|
-
|
|
3051
|
+
f,
|
|
3038
3052
|
{
|
|
3039
3053
|
display: "flex",
|
|
3040
3054
|
direction: "row",
|
|
@@ -3197,7 +3211,7 @@ const Ri = ({
|
|
|
3197
3211
|
{
|
|
3198
3212
|
style: { width: 260 },
|
|
3199
3213
|
title: /* @__PURE__ */ u(
|
|
3200
|
-
|
|
3214
|
+
f,
|
|
3201
3215
|
{
|
|
3202
3216
|
display: "flex",
|
|
3203
3217
|
direction: "row",
|
|
@@ -3218,7 +3232,7 @@ const Ri = ({
|
|
|
3218
3232
|
clearable: !0,
|
|
3219
3233
|
filter: t.mode,
|
|
3220
3234
|
value: r,
|
|
3221
|
-
onChange: (
|
|
3235
|
+
onChange: (d) => d == null ? o() : n(d),
|
|
3222
3236
|
withPadding: !1
|
|
3223
3237
|
}
|
|
3224
3238
|
)
|
|
@@ -3255,22 +3269,22 @@ const Ri = ({
|
|
|
3255
3269
|
onClear: o,
|
|
3256
3270
|
onRemove: i
|
|
3257
3271
|
}) => {
|
|
3258
|
-
const l = (r == null ? void 0 : r.op) ?? "is", s = r ? ji(r) : null, c = !!s,
|
|
3272
|
+
const l = (r == null ? void 0 : r.op) ?? "is", s = r ? ji(r) : null, c = !!s, d = c ? /* @__PURE__ */ u(ie, { children: [
|
|
3259
3273
|
/* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: [
|
|
3260
3274
|
t.label,
|
|
3261
3275
|
":"
|
|
3262
3276
|
] }),
|
|
3263
3277
|
" ",
|
|
3264
3278
|
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: fn(s) })
|
|
3265
|
-
] }) : t.label,
|
|
3266
|
-
if (
|
|
3267
|
-
if (
|
|
3268
|
-
n({ op:
|
|
3279
|
+
] }) : t.label, a = (m) => {
|
|
3280
|
+
if (m !== l) {
|
|
3281
|
+
if (m === "is-empty" || m === "is-not-empty") {
|
|
3282
|
+
n({ op: m });
|
|
3269
3283
|
return;
|
|
3270
3284
|
}
|
|
3271
|
-
if (
|
|
3285
|
+
if (m === "is-relative-to-today") {
|
|
3272
3286
|
n({
|
|
3273
|
-
op:
|
|
3287
|
+
op: m,
|
|
3274
3288
|
relative: (r == null ? void 0 : r.relative) ?? {
|
|
3275
3289
|
direction: "past",
|
|
3276
3290
|
count: 1,
|
|
@@ -3279,11 +3293,11 @@ const Ri = ({
|
|
|
3279
3293
|
});
|
|
3280
3294
|
return;
|
|
3281
3295
|
}
|
|
3282
|
-
if (
|
|
3283
|
-
n({ op:
|
|
3296
|
+
if (m === "is-between") {
|
|
3297
|
+
n({ op: m, from: r == null ? void 0 : r.from, to: r == null ? void 0 : r.to });
|
|
3284
3298
|
return;
|
|
3285
3299
|
}
|
|
3286
|
-
n({ op:
|
|
3300
|
+
n({ op: m, date: r == null ? void 0 : r.date });
|
|
3287
3301
|
}
|
|
3288
3302
|
};
|
|
3289
3303
|
return /* @__PURE__ */ u(We, { position: "bottom-left", children: [
|
|
@@ -3295,7 +3309,7 @@ const Ri = ({
|
|
|
3295
3309
|
size: "sm",
|
|
3296
3310
|
iconLeft: c ? /* @__PURE__ */ e(F, { name: "Calendar", size: "sm" }) : void 0,
|
|
3297
3311
|
iconRight: /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }),
|
|
3298
|
-
children:
|
|
3312
|
+
children: d
|
|
3299
3313
|
}
|
|
3300
3314
|
) }),
|
|
3301
3315
|
/* @__PURE__ */ u(Be, { children: [
|
|
@@ -3304,7 +3318,7 @@ const Ri = ({
|
|
|
3304
3318
|
{
|
|
3305
3319
|
style: { width: 320 },
|
|
3306
3320
|
title: /* @__PURE__ */ u(
|
|
3307
|
-
|
|
3321
|
+
f,
|
|
3308
3322
|
{
|
|
3309
3323
|
display: "flex",
|
|
3310
3324
|
direction: "row",
|
|
@@ -3314,7 +3328,7 @@ const Ri = ({
|
|
|
3314
3328
|
fullWidth: !0,
|
|
3315
3329
|
children: [
|
|
3316
3330
|
/* @__PURE__ */ u(
|
|
3317
|
-
|
|
3331
|
+
f,
|
|
3318
3332
|
{
|
|
3319
3333
|
display: "flex",
|
|
3320
3334
|
direction: "row",
|
|
@@ -3323,7 +3337,7 @@ const Ri = ({
|
|
|
3323
3337
|
style: { minWidth: 0 },
|
|
3324
3338
|
children: [
|
|
3325
3339
|
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "subtlest", children: t.label }),
|
|
3326
|
-
/* @__PURE__ */ e(_i, { op: l, onChange:
|
|
3340
|
+
/* @__PURE__ */ e(_i, { op: l, onChange: a })
|
|
3327
3341
|
]
|
|
3328
3342
|
}
|
|
3329
3343
|
),
|
|
@@ -3360,7 +3374,7 @@ const Ri = ({
|
|
|
3360
3374
|
)) }) })
|
|
3361
3375
|
] }), Zi = ({ value: t, op: r, onChange: n }) => {
|
|
3362
3376
|
if (r === "is-empty" || r === "is-not-empty")
|
|
3363
|
-
return /* @__PURE__ */ e(
|
|
3377
|
+
return /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No further input required." }) });
|
|
3364
3378
|
if (r === "is-between") {
|
|
3365
3379
|
const o = t != null && t.from || t != null && t.to ? {
|
|
3366
3380
|
from: t != null && t.from ? new Date(t.from) : null,
|
|
@@ -3428,8 +3442,8 @@ const Ri = ({
|
|
|
3428
3442
|
);
|
|
3429
3443
|
}, Gi = ({ value: t, onChange: r }) => {
|
|
3430
3444
|
const n = (t == null ? void 0 : t.direction) ?? "past", o = (t == null ? void 0 : t.count) ?? 1, i = (t == null ? void 0 : t.period) ?? "week", l = n !== "this", s = hn({ direction: n, count: o, period: i });
|
|
3431
|
-
return /* @__PURE__ */ u(
|
|
3432
|
-
/* @__PURE__ */ u(
|
|
3445
|
+
return /* @__PURE__ */ u(f, { direction: "column", display: "flex", gap: "sm", children: [
|
|
3446
|
+
/* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
|
|
3433
3447
|
/* @__PURE__ */ u(We, { position: "bottom-left", children: [
|
|
3434
3448
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3435
3449
|
T,
|
|
@@ -3463,10 +3477,10 @@ const Ri = ({
|
|
|
3463
3477
|
clearable: !1,
|
|
3464
3478
|
value: o,
|
|
3465
3479
|
onChange: (c) => {
|
|
3466
|
-
const
|
|
3480
|
+
const d = Number(c.target.value);
|
|
3467
3481
|
r({
|
|
3468
3482
|
direction: n,
|
|
3469
|
-
count: Number.isFinite(
|
|
3483
|
+
count: Number.isFinite(d) && d > 0 ? d : 1,
|
|
3470
3484
|
period: i
|
|
3471
3485
|
});
|
|
3472
3486
|
},
|
|
@@ -3520,21 +3534,21 @@ const Ri = ({
|
|
|
3520
3534
|
onClear: o,
|
|
3521
3535
|
onRemove: i
|
|
3522
3536
|
}) => {
|
|
3523
|
-
const l = t.type === "dropdown-multiple", s = r.length, [c,
|
|
3524
|
-
if (
|
|
3537
|
+
const l = t.type === "dropdown-multiple", s = r.length, [c, d] = R(""), a = t.options, m = typeof t.onSearch == "function", p = (() => {
|
|
3538
|
+
if (m) return a;
|
|
3525
3539
|
const k = c.trim().toLowerCase();
|
|
3526
|
-
return k ?
|
|
3527
|
-
})(),
|
|
3540
|
+
return k ? a.filter((E) => E.label.toLowerCase().includes(k)) : a;
|
|
3541
|
+
})(), g = (k) => r.some((E) => E.value === k.value), x = (k) => {
|
|
3528
3542
|
if (!l) {
|
|
3529
|
-
n([{ label: k.label, value: k.value }]),
|
|
3543
|
+
n([{ label: k.label, value: k.value }]), d("");
|
|
3530
3544
|
return;
|
|
3531
3545
|
}
|
|
3532
3546
|
n(
|
|
3533
|
-
|
|
3547
|
+
g(k) ? r.filter((E) => E.value !== k.value) : [...r, { label: k.label, value: k.value }]
|
|
3534
3548
|
);
|
|
3535
3549
|
}, W = (k) => {
|
|
3536
3550
|
var E;
|
|
3537
|
-
|
|
3551
|
+
d(k), (E = t.onSearch) == null || E.call(t, k);
|
|
3538
3552
|
}, y = s === 0 ? t.label : /* @__PURE__ */ u(ie, { children: [
|
|
3539
3553
|
/* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: [
|
|
3540
3554
|
t.label,
|
|
@@ -3560,7 +3574,7 @@ const Ri = ({
|
|
|
3560
3574
|
{
|
|
3561
3575
|
style: { width: 260 },
|
|
3562
3576
|
title: /* @__PURE__ */ u(
|
|
3563
|
-
|
|
3577
|
+
f,
|
|
3564
3578
|
{
|
|
3565
3579
|
display: "flex",
|
|
3566
3580
|
direction: "row",
|
|
@@ -3573,7 +3587,7 @@ const Ri = ({
|
|
|
3573
3587
|
]
|
|
3574
3588
|
}
|
|
3575
3589
|
),
|
|
3576
|
-
children: /* @__PURE__ */ u(
|
|
3590
|
+
children: /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
|
|
3577
3591
|
/* @__PURE__ */ e(
|
|
3578
3592
|
Bt,
|
|
3579
3593
|
{
|
|
@@ -3592,18 +3606,18 @@ const Ri = ({
|
|
|
3592
3606
|
}
|
|
3593
3607
|
),
|
|
3594
3608
|
/* @__PURE__ */ e(
|
|
3595
|
-
|
|
3609
|
+
f,
|
|
3596
3610
|
{
|
|
3597
3611
|
direction: "column",
|
|
3598
3612
|
overflow: "overflow-y-auto",
|
|
3599
3613
|
customMaxHeight: "240px",
|
|
3600
|
-
children: t.isLoading ? /* @__PURE__ */ e(
|
|
3614
|
+
children: t.isLoading ? /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "Loading…" }) }) : p.length === 0 ? /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No results" }) }) : p.map((k) => /* @__PURE__ */ e(
|
|
3601
3615
|
Ve,
|
|
3602
3616
|
{
|
|
3603
3617
|
closeOnSelect: !l,
|
|
3604
|
-
selected:
|
|
3618
|
+
selected: g(k),
|
|
3605
3619
|
startIcon: k.avatar,
|
|
3606
|
-
endIcon:
|
|
3620
|
+
endIcon: g(k) ? /* @__PURE__ */ e(F, { name: "Check" }) : void 0,
|
|
3607
3621
|
description: k.description,
|
|
3608
3622
|
onClick: () => x(k),
|
|
3609
3623
|
children: k.label
|
|
@@ -3633,15 +3647,15 @@ const Ri = ({
|
|
|
3633
3647
|
onClear: o,
|
|
3634
3648
|
onRemove: i
|
|
3635
3649
|
}) => {
|
|
3636
|
-
const l = new Set(r.map((
|
|
3650
|
+
const l = new Set(r.map((g) => g.value)), s = r.length, c = t.options.length > 0 && t.options.every((g) => l.has(g.value)), d = s > 0 && !c, a = (g) => {
|
|
3637
3651
|
n(
|
|
3638
|
-
l.has(
|
|
3652
|
+
l.has(g.value) ? r.filter((x) => x.value !== g.value) : [...r, { label: g.label, value: g.value }]
|
|
3639
3653
|
);
|
|
3640
|
-
},
|
|
3654
|
+
}, m = () => {
|
|
3641
3655
|
n(
|
|
3642
|
-
c ? [] : t.options.map((
|
|
3656
|
+
c ? [] : t.options.map((g) => ({ label: g.label, value: g.value }))
|
|
3643
3657
|
);
|
|
3644
|
-
},
|
|
3658
|
+
}, p = s === 0 ? t.label : /* @__PURE__ */ u(ie, { children: [
|
|
3645
3659
|
/* @__PURE__ */ u(D, { as: "span", fontWeight: "semibold", children: [
|
|
3646
3660
|
t.label,
|
|
3647
3661
|
":"
|
|
@@ -3658,7 +3672,7 @@ const Ri = ({
|
|
|
3658
3672
|
size: "sm",
|
|
3659
3673
|
iconLeft: s > 0 ? /* @__PURE__ */ e(F, { name: "Tag", size: "sm" }) : void 0,
|
|
3660
3674
|
iconRight: /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }),
|
|
3661
|
-
children:
|
|
3675
|
+
children: p
|
|
3662
3676
|
}
|
|
3663
3677
|
) }),
|
|
3664
3678
|
/* @__PURE__ */ e(Be, { children: /* @__PURE__ */ u(
|
|
@@ -3666,7 +3680,7 @@ const Ri = ({
|
|
|
3666
3680
|
{
|
|
3667
3681
|
style: { width: 240 },
|
|
3668
3682
|
title: /* @__PURE__ */ u(
|
|
3669
|
-
|
|
3683
|
+
f,
|
|
3670
3684
|
{
|
|
3671
3685
|
display: "flex",
|
|
3672
3686
|
direction: "row",
|
|
@@ -3685,27 +3699,27 @@ const Ri = ({
|
|
|
3685
3699
|
{
|
|
3686
3700
|
closeOnSelect: !1,
|
|
3687
3701
|
selected: c,
|
|
3688
|
-
onClick:
|
|
3702
|
+
onClick: m,
|
|
3689
3703
|
startIcon: /* @__PURE__ */ e(
|
|
3690
3704
|
jr,
|
|
3691
3705
|
{
|
|
3692
|
-
checked: c ||
|
|
3693
|
-
indeterminate:
|
|
3706
|
+
checked: c || d,
|
|
3707
|
+
indeterminate: d
|
|
3694
3708
|
}
|
|
3695
3709
|
),
|
|
3696
3710
|
children: "Select All"
|
|
3697
3711
|
}
|
|
3698
3712
|
),
|
|
3699
|
-
t.options.map((
|
|
3713
|
+
t.options.map((g) => /* @__PURE__ */ e(
|
|
3700
3714
|
Ve,
|
|
3701
3715
|
{
|
|
3702
3716
|
closeOnSelect: !1,
|
|
3703
|
-
selected: l.has(
|
|
3704
|
-
onClick: () =>
|
|
3705
|
-
startIcon: /* @__PURE__ */ e(jr, { checked: l.has(
|
|
3706
|
-
children:
|
|
3717
|
+
selected: l.has(g.value),
|
|
3718
|
+
onClick: () => a(g),
|
|
3719
|
+
startIcon: /* @__PURE__ */ e(jr, { checked: l.has(g.value) }),
|
|
3720
|
+
children: g.label
|
|
3707
3721
|
},
|
|
3708
|
-
|
|
3722
|
+
g.value
|
|
3709
3723
|
))
|
|
3710
3724
|
]
|
|
3711
3725
|
}
|
|
@@ -3721,35 +3735,35 @@ const Ri = ({
|
|
|
3721
3735
|
}) => /* @__PURE__ */ e(ie, { children: t.map((s) => {
|
|
3722
3736
|
const c = r[s];
|
|
3723
3737
|
if (!c) return null;
|
|
3724
|
-
const
|
|
3738
|
+
const d = n(c), a = c.locked ? void 0 : () => l(s);
|
|
3725
3739
|
return c.type === "date" || c.type === "date-compact" ? /* @__PURE__ */ e(
|
|
3726
3740
|
Ni,
|
|
3727
3741
|
{
|
|
3728
3742
|
field: c,
|
|
3729
|
-
value:
|
|
3730
|
-
onChange: (
|
|
3743
|
+
value: d,
|
|
3744
|
+
onChange: (m) => o(c, m),
|
|
3731
3745
|
onClear: () => i(s),
|
|
3732
|
-
onRemove:
|
|
3746
|
+
onRemove: a
|
|
3733
3747
|
},
|
|
3734
3748
|
s
|
|
3735
3749
|
) : c.type === "checkbox-multiple" ? /* @__PURE__ */ e(
|
|
3736
3750
|
Qi,
|
|
3737
3751
|
{
|
|
3738
3752
|
field: c,
|
|
3739
|
-
value:
|
|
3740
|
-
onChange: (
|
|
3753
|
+
value: d || [],
|
|
3754
|
+
onChange: (m) => o(c, m),
|
|
3741
3755
|
onClear: () => i(s),
|
|
3742
|
-
onRemove:
|
|
3756
|
+
onRemove: a
|
|
3743
3757
|
},
|
|
3744
3758
|
s
|
|
3745
3759
|
) : /* @__PURE__ */ e(
|
|
3746
3760
|
Ui,
|
|
3747
3761
|
{
|
|
3748
3762
|
field: c,
|
|
3749
|
-
value:
|
|
3750
|
-
onChange: (
|
|
3763
|
+
value: d || [],
|
|
3764
|
+
onChange: (m) => o(c, m),
|
|
3751
3765
|
onClear: () => i(s),
|
|
3752
|
-
onRemove:
|
|
3766
|
+
onRemove: a
|
|
3753
3767
|
},
|
|
3754
3768
|
s
|
|
3755
3769
|
);
|
|
@@ -3764,11 +3778,11 @@ const Ri = ({
|
|
|
3764
3778
|
showPagination: c = !0
|
|
3765
3779
|
}) => {
|
|
3766
3780
|
var E;
|
|
3767
|
-
const { searchQueries:
|
|
3768
|
-
|
|
3781
|
+
const { searchQueries: d, setSearchParams: a, searchParams: m } = Ie(), p = m.get(n), g = p ? Number(p) : i, x = (w) => {
|
|
3782
|
+
a({ ...d, [r]: String(w) });
|
|
3769
3783
|
}, W = (w) => {
|
|
3770
|
-
|
|
3771
|
-
...
|
|
3784
|
+
a({
|
|
3785
|
+
...d,
|
|
3772
3786
|
[n]: w,
|
|
3773
3787
|
[r]: "1"
|
|
3774
3788
|
// reset to first page when page size changes
|
|
@@ -3785,13 +3799,13 @@ const Ri = ({
|
|
|
3785
3799
|
size: "xs",
|
|
3786
3800
|
iconRight: /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }),
|
|
3787
3801
|
"aria-label": "Rows per page",
|
|
3788
|
-
children: Pr(
|
|
3802
|
+
children: Pr(g)
|
|
3789
3803
|
}
|
|
3790
3804
|
) }),
|
|
3791
3805
|
/* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(ze, { children: o.map((w) => /* @__PURE__ */ e(
|
|
3792
3806
|
Ve,
|
|
3793
3807
|
{
|
|
3794
|
-
selected: w ===
|
|
3808
|
+
selected: w === g,
|
|
3795
3809
|
onClick: () => W(String(w)),
|
|
3796
3810
|
children: Pr(w)
|
|
3797
3811
|
},
|
|
@@ -3799,7 +3813,7 @@ const Ri = ({
|
|
|
3799
3813
|
)) }) })
|
|
3800
3814
|
] }),
|
|
3801
3815
|
c && ((t == null ? void 0 : t.totalPage) ?? 0) > 1 && /* @__PURE__ */ e(
|
|
3802
|
-
|
|
3816
|
+
f,
|
|
3803
3817
|
{
|
|
3804
3818
|
direction: "column",
|
|
3805
3819
|
display: "flex",
|
|
@@ -3843,13 +3857,13 @@ const Ki = 240, gn = ({
|
|
|
3843
3857
|
placeholder: o = "Search",
|
|
3844
3858
|
shortcut: i = "/"
|
|
3845
3859
|
}) => {
|
|
3846
|
-
const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(),
|
|
3860
|
+
const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), d = pr(t, l, r) || "", [a, m] = R(!!d), [p, g] = R(!d), [x, W] = R(d), y = Ln(x, 350), k = ce(null);
|
|
3847
3861
|
U(() => {
|
|
3848
|
-
W(
|
|
3849
|
-
}, [a]), U(() => {
|
|
3850
|
-
d && p(!1);
|
|
3862
|
+
W(d), d && m(!0);
|
|
3851
3863
|
}, [d]), U(() => {
|
|
3852
|
-
|
|
3864
|
+
a && g(!1);
|
|
3865
|
+
}, [a]), U(() => {
|
|
3866
|
+
y !== d && Mt({
|
|
3853
3867
|
value: y,
|
|
3854
3868
|
name: t,
|
|
3855
3869
|
type: "search",
|
|
@@ -3860,15 +3874,15 @@ const Ki = 240, gn = ({
|
|
|
3860
3874
|
});
|
|
3861
3875
|
}, [y]);
|
|
3862
3876
|
const E = Q(() => {
|
|
3863
|
-
|
|
3877
|
+
m(!0), requestAnimationFrame(() => {
|
|
3864
3878
|
var A;
|
|
3865
3879
|
return (A = k.current) == null ? void 0 : A.focus();
|
|
3866
3880
|
});
|
|
3867
3881
|
}, []);
|
|
3868
3882
|
return Xi(i, E), // No internal gap: the trigger and the animated input are never visible at
|
|
3869
3883
|
// the same time, so spacing to neighbours is handled by the parent cluster.
|
|
3870
|
-
/* @__PURE__ */ u(
|
|
3871
|
-
|
|
3884
|
+
/* @__PURE__ */ u(f, { display: "flex", direction: "row", align: "center", gap: "spacing-0", children: [
|
|
3885
|
+
p && /* @__PURE__ */ e(
|
|
3872
3886
|
T,
|
|
3873
3887
|
{
|
|
3874
3888
|
variant: "outline",
|
|
@@ -3881,14 +3895,14 @@ const Ki = 240, gn = ({
|
|
|
3881
3895
|
}
|
|
3882
3896
|
),
|
|
3883
3897
|
/* @__PURE__ */ u(
|
|
3884
|
-
|
|
3898
|
+
f,
|
|
3885
3899
|
{
|
|
3886
3900
|
onTransitionEnd: () => {
|
|
3887
|
-
|
|
3901
|
+
a || g(!0);
|
|
3888
3902
|
},
|
|
3889
3903
|
style: {
|
|
3890
3904
|
position: "relative",
|
|
3891
|
-
width:
|
|
3905
|
+
width: a ? Ki : 0,
|
|
3892
3906
|
overflow: "hidden",
|
|
3893
3907
|
transition: "width 220ms ease"
|
|
3894
3908
|
},
|
|
@@ -3905,16 +3919,16 @@ const Ki = 240, gn = ({
|
|
|
3905
3919
|
onChange: (A) => W(A.target.value),
|
|
3906
3920
|
onKeyDown: (A) => {
|
|
3907
3921
|
var z;
|
|
3908
|
-
A.key === "Escape" && !x && (
|
|
3922
|
+
A.key === "Escape" && !x && (m(!1), (z = k.current) == null || z.blur());
|
|
3909
3923
|
},
|
|
3910
3924
|
onBlur: () => {
|
|
3911
|
-
x ||
|
|
3925
|
+
x || m(!1);
|
|
3912
3926
|
},
|
|
3913
|
-
tabIndex:
|
|
3927
|
+
tabIndex: a ? 0 : -1
|
|
3914
3928
|
}
|
|
3915
3929
|
),
|
|
3916
|
-
|
|
3917
|
-
|
|
3930
|
+
a && !x && /* @__PURE__ */ e(
|
|
3931
|
+
f,
|
|
3918
3932
|
{
|
|
3919
3933
|
align: "center",
|
|
3920
3934
|
justify: "center",
|
|
@@ -3948,11 +3962,11 @@ const Ki = 240, gn = ({
|
|
|
3948
3962
|
onReorder: o,
|
|
3949
3963
|
onSetAllHidden: i
|
|
3950
3964
|
}) => {
|
|
3951
|
-
const [l, s] = R(null), [c,
|
|
3952
|
-
l !== null && c !== null && l !== c && o(l, c), s(null),
|
|
3953
|
-
},
|
|
3954
|
-
const x =
|
|
3955
|
-
x < 0 || x >= t.length || o(
|
|
3965
|
+
const [l, s] = R(null), [c, d] = R(null), a = () => {
|
|
3966
|
+
l !== null && c !== null && l !== c && o(l, c), s(null), d(null);
|
|
3967
|
+
}, m = (p, g) => {
|
|
3968
|
+
const x = p + g;
|
|
3969
|
+
x < 0 || x >= t.length || o(p, x);
|
|
3956
3970
|
};
|
|
3957
3971
|
return /* @__PURE__ */ u(We, { position: "bottom-right", children: [
|
|
3958
3972
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
@@ -3966,7 +3980,7 @@ const Ki = 240, gn = ({
|
|
|
3966
3980
|
}
|
|
3967
3981
|
) }),
|
|
3968
3982
|
/* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ u(
|
|
3969
|
-
|
|
3983
|
+
f,
|
|
3970
3984
|
{
|
|
3971
3985
|
padding: "sm",
|
|
3972
3986
|
direction: "column",
|
|
@@ -3976,7 +3990,7 @@ const Ki = 240, gn = ({
|
|
|
3976
3990
|
children: [
|
|
3977
3991
|
/* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Customize Column Table" }),
|
|
3978
3992
|
/* @__PURE__ */ u(
|
|
3979
|
-
|
|
3993
|
+
f,
|
|
3980
3994
|
{
|
|
3981
3995
|
direction: "row",
|
|
3982
3996
|
display: "flex",
|
|
@@ -3998,10 +4012,10 @@ const Ki = 240, gn = ({
|
|
|
3998
4012
|
]
|
|
3999
4013
|
}
|
|
4000
4014
|
),
|
|
4001
|
-
/* @__PURE__ */ e(
|
|
4002
|
-
const x = !
|
|
4015
|
+
/* @__PURE__ */ e(f, { direction: "column", overflow: "overflow-y-auto", children: t.map((p, g) => {
|
|
4016
|
+
const x = !p.locked;
|
|
4003
4017
|
return /* @__PURE__ */ u(
|
|
4004
|
-
|
|
4018
|
+
f,
|
|
4005
4019
|
{
|
|
4006
4020
|
direction: "row",
|
|
4007
4021
|
display: "flex",
|
|
@@ -4009,19 +4023,19 @@ const Ki = 240, gn = ({
|
|
|
4009
4023
|
gap: "sm",
|
|
4010
4024
|
paddingBlock: "xs",
|
|
4011
4025
|
draggable: x,
|
|
4012
|
-
onDragStart: () => x && s(
|
|
4026
|
+
onDragStart: () => x && s(g),
|
|
4013
4027
|
onDragOver: (y) => {
|
|
4014
|
-
y.preventDefault(),
|
|
4028
|
+
y.preventDefault(), d(g);
|
|
4015
4029
|
},
|
|
4016
|
-
onDrop:
|
|
4017
|
-
onDragEnd:
|
|
4030
|
+
onDrop: a,
|
|
4031
|
+
onDragEnd: a,
|
|
4018
4032
|
style: {
|
|
4019
4033
|
minHeight: 32,
|
|
4020
|
-
boxShadow: c ===
|
|
4034
|
+
boxShadow: c === g && l !== null && l !== g ? "inset 0 2px 0 0 var(--sa-background-brand, #04254f)" : void 0
|
|
4021
4035
|
},
|
|
4022
4036
|
children: [
|
|
4023
4037
|
/* @__PURE__ */ e(
|
|
4024
|
-
|
|
4038
|
+
f,
|
|
4025
4039
|
{
|
|
4026
4040
|
direction: "column",
|
|
4027
4041
|
as: "div",
|
|
@@ -4029,11 +4043,11 @@ const Ki = 240, gn = ({
|
|
|
4029
4043
|
justify: "center",
|
|
4030
4044
|
role: "button",
|
|
4031
4045
|
tabIndex: x ? 0 : -1,
|
|
4032
|
-
"aria-label": `Reorder ${
|
|
4046
|
+
"aria-label": `Reorder ${p.title}`,
|
|
4033
4047
|
"aria-disabled": !x || void 0,
|
|
4034
4048
|
color: "icon-subtlest",
|
|
4035
4049
|
onKeyDown: (y) => {
|
|
4036
|
-
x && (y.key === "ArrowUp" ? (y.preventDefault(),
|
|
4050
|
+
x && (y.key === "ArrowUp" ? (y.preventDefault(), m(g, -1)) : y.key === "ArrowDown" && (y.preventDefault(), m(g, 1)));
|
|
4037
4051
|
},
|
|
4038
4052
|
style: {
|
|
4039
4053
|
display: "inline-flex",
|
|
@@ -4043,7 +4057,7 @@ const Ki = 240, gn = ({
|
|
|
4043
4057
|
children: /* @__PURE__ */ e(F, { name: "DragVertical", width: 16, height: 16 })
|
|
4044
4058
|
}
|
|
4045
4059
|
),
|
|
4046
|
-
|
|
4060
|
+
p.icon && /* @__PURE__ */ e(f, { direction: "column", align: "center", color: "icon-subtle", style: { display: "inline-flex" }, children: p.icon }),
|
|
4047
4061
|
/* @__PURE__ */ e(
|
|
4048
4062
|
D,
|
|
4049
4063
|
{
|
|
@@ -4051,22 +4065,22 @@ const Ki = 240, gn = ({
|
|
|
4051
4065
|
fontWeight: "medium",
|
|
4052
4066
|
color: "primary",
|
|
4053
4067
|
truncate: !0,
|
|
4054
|
-
children:
|
|
4068
|
+
children: p.title
|
|
4055
4069
|
}
|
|
4056
4070
|
),
|
|
4057
|
-
/* @__PURE__ */ e(
|
|
4071
|
+
/* @__PURE__ */ e(f, { direction: "column", style: { marginLeft: "auto" }, children: /* @__PURE__ */ e(
|
|
4058
4072
|
At,
|
|
4059
4073
|
{
|
|
4060
4074
|
size: "sm",
|
|
4061
|
-
checked:
|
|
4062
|
-
disabled:
|
|
4063
|
-
onChange: () => n(
|
|
4064
|
-
"aria-label": `Toggle ${
|
|
4075
|
+
checked: p.visible,
|
|
4076
|
+
disabled: p.locked,
|
|
4077
|
+
onChange: () => n(p.key),
|
|
4078
|
+
"aria-label": `Toggle ${p.title} column`
|
|
4065
4079
|
}
|
|
4066
4080
|
) })
|
|
4067
4081
|
]
|
|
4068
4082
|
},
|
|
4069
|
-
|
|
4083
|
+
p.key
|
|
4070
4084
|
);
|
|
4071
4085
|
}) })
|
|
4072
4086
|
]
|
|
@@ -4101,14 +4115,14 @@ const Ki = 240, gn = ({
|
|
|
4101
4115
|
width: "260px"
|
|
4102
4116
|
},
|
|
4103
4117
|
children: [
|
|
4104
|
-
/* @__PURE__ */ e(ze, { children: /* @__PURE__ */ u(
|
|
4118
|
+
/* @__PURE__ */ e(ze, { children: /* @__PURE__ */ u(f, { direction: "column", padding: "xs", gap: "sm", children: [
|
|
4105
4119
|
/* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Saved Views" }),
|
|
4106
4120
|
/* @__PURE__ */ e(
|
|
4107
|
-
|
|
4121
|
+
f,
|
|
4108
4122
|
{
|
|
4109
4123
|
direction: "column",
|
|
4110
4124
|
overflow: "overflow-y-auto",
|
|
4111
|
-
children: t.length === 0 ? /* @__PURE__ */ e(
|
|
4125
|
+
children: t.length === 0 ? /* @__PURE__ */ e(f, { direction: "column", paddingBlock: "sm", children: /* @__PURE__ */ e(D, { fontSize: "sm", color: "subtlest", children: "No saved views yet" }) }) : t.map((c) => /* @__PURE__ */ e(
|
|
4112
4126
|
Ve,
|
|
4113
4127
|
{
|
|
4114
4128
|
startIcon: /* @__PURE__ */ e(F, { name: "Bookmark" }),
|
|
@@ -4121,8 +4135,8 @@ const Ki = 240, gn = ({
|
|
|
4121
4135
|
size: "sm",
|
|
4122
4136
|
iconLeft: /* @__PURE__ */ e(F, { name: "Trash2" }),
|
|
4123
4137
|
"aria-label": `Delete ${c.name}`,
|
|
4124
|
-
onClick: (
|
|
4125
|
-
|
|
4138
|
+
onClick: (d) => {
|
|
4139
|
+
d.stopPropagation(), n(c.id);
|
|
4126
4140
|
}
|
|
4127
4141
|
}
|
|
4128
4142
|
),
|
|
@@ -4136,8 +4150,8 @@ const Ki = 240, gn = ({
|
|
|
4136
4150
|
/* @__PURE__ */ e(
|
|
4137
4151
|
sr,
|
|
4138
4152
|
{
|
|
4139
|
-
children: /* @__PURE__ */ u(
|
|
4140
|
-
/* @__PURE__ */ e(
|
|
4153
|
+
children: /* @__PURE__ */ u(f, { direction: "row", gap: "xs", children: [
|
|
4154
|
+
/* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 0 0", minWidth: 0 }, children: /* @__PURE__ */ e(
|
|
4141
4155
|
st,
|
|
4142
4156
|
{
|
|
4143
4157
|
size: "sm",
|
|
@@ -4177,21 +4191,21 @@ const Ki = 240, gn = ({
|
|
|
4177
4191
|
hasActiveFilter: l,
|
|
4178
4192
|
onToggle: s,
|
|
4179
4193
|
onReset: c,
|
|
4180
|
-
getValue:
|
|
4181
|
-
setValue:
|
|
4182
|
-
clearValue:
|
|
4183
|
-
removeFilter:
|
|
4194
|
+
getValue: d,
|
|
4195
|
+
setValue: a,
|
|
4196
|
+
clearValue: m,
|
|
4197
|
+
removeFilter: p
|
|
4184
4198
|
}) => {
|
|
4185
|
-
const
|
|
4199
|
+
const g = o.length;
|
|
4186
4200
|
return /* @__PURE__ */ e(Xr, { position: "bottom", isShow: t, onHide: r, children: /* @__PURE__ */ u(
|
|
4187
|
-
|
|
4201
|
+
f,
|
|
4188
4202
|
{
|
|
4189
4203
|
direction: "column",
|
|
4190
4204
|
customMaxHeight: "85vh",
|
|
4191
4205
|
style: { minHeight: 280 },
|
|
4192
4206
|
children: [
|
|
4193
4207
|
/* @__PURE__ */ u(
|
|
4194
|
-
|
|
4208
|
+
f,
|
|
4195
4209
|
{
|
|
4196
4210
|
direction: "row",
|
|
4197
4211
|
display: "flex",
|
|
@@ -4203,11 +4217,11 @@ const Ki = 240, gn = ({
|
|
|
4203
4217
|
borderBottom: "1px solid var(--sa-border-subtle, rgba(11, 18, 14, 0.14))"
|
|
4204
4218
|
},
|
|
4205
4219
|
children: [
|
|
4206
|
-
/* @__PURE__ */ u(
|
|
4220
|
+
/* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
|
|
4207
4221
|
/* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Filter" }),
|
|
4208
|
-
|
|
4222
|
+
g > 0 && /* @__PURE__ */ u(D, { fontSize: "sm", color: "subtle", children: [
|
|
4209
4223
|
"(",
|
|
4210
|
-
|
|
4224
|
+
g,
|
|
4211
4225
|
")"
|
|
4212
4226
|
] })
|
|
4213
4227
|
] }),
|
|
@@ -4226,7 +4240,7 @@ const Ki = 240, gn = ({
|
|
|
4226
4240
|
}
|
|
4227
4241
|
),
|
|
4228
4242
|
/* @__PURE__ */ u(
|
|
4229
|
-
|
|
4243
|
+
f,
|
|
4230
4244
|
{
|
|
4231
4245
|
direction: "column",
|
|
4232
4246
|
gap: "lg",
|
|
@@ -4234,10 +4248,10 @@ const Ki = 240, gn = ({
|
|
|
4234
4248
|
overflow: "overflow-y-auto",
|
|
4235
4249
|
style: { flex: "1 1 auto", minHeight: 0 },
|
|
4236
4250
|
children: [
|
|
4237
|
-
|
|
4251
|
+
g > 0 && /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
|
|
4238
4252
|
/* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Filter aktif" }),
|
|
4239
4253
|
/* @__PURE__ */ e(
|
|
4240
|
-
|
|
4254
|
+
f,
|
|
4241
4255
|
{
|
|
4242
4256
|
direction: "row",
|
|
4243
4257
|
display: "flex",
|
|
@@ -4249,21 +4263,21 @@ const Ki = 240, gn = ({
|
|
|
4249
4263
|
{
|
|
4250
4264
|
activeKeys: o,
|
|
4251
4265
|
configByKey: i,
|
|
4252
|
-
getValue:
|
|
4253
|
-
setValue:
|
|
4254
|
-
clearValue:
|
|
4255
|
-
removeFilter:
|
|
4266
|
+
getValue: d,
|
|
4267
|
+
setValue: a,
|
|
4268
|
+
clearValue: m,
|
|
4269
|
+
removeFilter: p
|
|
4256
4270
|
}
|
|
4257
4271
|
)
|
|
4258
4272
|
}
|
|
4259
4273
|
)
|
|
4260
4274
|
] }),
|
|
4261
|
-
n.length > 0 && /* @__PURE__ */ u(
|
|
4275
|
+
n.length > 0 && /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
|
|
4262
4276
|
/* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Tambah filter" }),
|
|
4263
|
-
/* @__PURE__ */ e(
|
|
4277
|
+
/* @__PURE__ */ e(f, { direction: "column", children: n.map((x) => {
|
|
4264
4278
|
const W = o.includes(x.key), y = !!x.locked;
|
|
4265
4279
|
return /* @__PURE__ */ u(
|
|
4266
|
-
|
|
4280
|
+
f,
|
|
4267
4281
|
{
|
|
4268
4282
|
direction: "row",
|
|
4269
4283
|
display: "flex",
|
|
@@ -4277,7 +4291,7 @@ const Ki = 240, gn = ({
|
|
|
4277
4291
|
},
|
|
4278
4292
|
children: [
|
|
4279
4293
|
/* @__PURE__ */ u(
|
|
4280
|
-
|
|
4294
|
+
f,
|
|
4281
4295
|
{
|
|
4282
4296
|
direction: "row",
|
|
4283
4297
|
display: "flex",
|
|
@@ -4286,7 +4300,7 @@ const Ki = 240, gn = ({
|
|
|
4286
4300
|
style: { minWidth: 0 },
|
|
4287
4301
|
children: [
|
|
4288
4302
|
x.icon && /* @__PURE__ */ e(
|
|
4289
|
-
|
|
4303
|
+
f,
|
|
4290
4304
|
{
|
|
4291
4305
|
direction: "column",
|
|
4292
4306
|
align: "center",
|
|
@@ -4319,7 +4333,7 @@ const Ki = 240, gn = ({
|
|
|
4319
4333
|
}
|
|
4320
4334
|
),
|
|
4321
4335
|
/* @__PURE__ */ u(
|
|
4322
|
-
|
|
4336
|
+
f,
|
|
4323
4337
|
{
|
|
4324
4338
|
direction: "row",
|
|
4325
4339
|
display: "flex",
|
|
@@ -4330,7 +4344,7 @@ const Ki = 240, gn = ({
|
|
|
4330
4344
|
borderTop: "1px solid var(--sa-border-subtle, rgba(11, 18, 14, 0.14))"
|
|
4331
4345
|
},
|
|
4332
4346
|
children: [
|
|
4333
|
-
/* @__PURE__ */ e(
|
|
4347
|
+
/* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
|
|
4334
4348
|
T,
|
|
4335
4349
|
{
|
|
4336
4350
|
variant: "outline",
|
|
@@ -4342,7 +4356,7 @@ const Ki = 240, gn = ({
|
|
|
4342
4356
|
children: "Reset"
|
|
4343
4357
|
}
|
|
4344
4358
|
) }),
|
|
4345
|
-
/* @__PURE__ */ e(
|
|
4359
|
+
/* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
|
|
4346
4360
|
T,
|
|
4347
4361
|
{
|
|
4348
4362
|
variant: "primary",
|
|
@@ -4366,10 +4380,10 @@ const Ki = 240, gn = ({
|
|
|
4366
4380
|
defaultPerPage: o = 10,
|
|
4367
4381
|
showPageSize: i
|
|
4368
4382
|
}) => {
|
|
4369
|
-
const { searchQueries: l, setSearchParams: s, searchParams: c } = Ie(),
|
|
4383
|
+
const { searchQueries: l, setSearchParams: s, searchParams: c } = Ie(), d = c.get(t), a = d ? Number(d) : o, m = (p) => {
|
|
4370
4384
|
s({
|
|
4371
4385
|
...l,
|
|
4372
|
-
[t]:
|
|
4386
|
+
[t]: p,
|
|
4373
4387
|
[r]: "1"
|
|
4374
4388
|
});
|
|
4375
4389
|
};
|
|
@@ -4385,16 +4399,16 @@ const Ki = 240, gn = ({
|
|
|
4385
4399
|
}
|
|
4386
4400
|
) }),
|
|
4387
4401
|
/* @__PURE__ */ e(Be, { children: /* @__PURE__ */ u(ze, { style: { minWidth: 200 }, children: [
|
|
4388
|
-
/* @__PURE__ */ e(
|
|
4389
|
-
n.map((
|
|
4402
|
+
/* @__PURE__ */ e(f, { paddingInline: "sm", paddingBlock: "xs", children: /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Rows per page" }) }),
|
|
4403
|
+
n.map((p) => /* @__PURE__ */ e(
|
|
4390
4404
|
Ve,
|
|
4391
4405
|
{
|
|
4392
|
-
selected:
|
|
4393
|
-
endIcon:
|
|
4394
|
-
onClick: () =>
|
|
4395
|
-
children: to(
|
|
4406
|
+
selected: p === a,
|
|
4407
|
+
endIcon: p === a ? /* @__PURE__ */ e(F, { name: "Check" }) : void 0,
|
|
4408
|
+
onClick: () => m(String(p)),
|
|
4409
|
+
children: to(p)
|
|
4396
4410
|
},
|
|
4397
|
-
|
|
4411
|
+
p
|
|
4398
4412
|
))
|
|
4399
4413
|
] }) })
|
|
4400
4414
|
] }) : null;
|
|
@@ -4408,11 +4422,11 @@ const Ki = 240, gn = ({
|
|
|
4408
4422
|
hasActiveFilter: l,
|
|
4409
4423
|
toggleFilter: s,
|
|
4410
4424
|
removeFilter: c,
|
|
4411
|
-
getValue:
|
|
4412
|
-
setValue:
|
|
4413
|
-
clearValue:
|
|
4414
|
-
onReset:
|
|
4415
|
-
searchable:
|
|
4425
|
+
getValue: d,
|
|
4426
|
+
setValue: a,
|
|
4427
|
+
clearValue: m,
|
|
4428
|
+
onReset: p,
|
|
4429
|
+
searchable: g,
|
|
4416
4430
|
searchKey: x,
|
|
4417
4431
|
filterKey: W,
|
|
4418
4432
|
pageKey: y,
|
|
@@ -4439,10 +4453,10 @@ const Ki = 240, gn = ({
|
|
|
4439
4453
|
} = t, [ye, ge] = R(!1), { searchQueries: pe, setSearchParams: Ee } = Ie(), Ne = (w == null ? void 0 : w.rangeStart) ?? (((w == null ? void 0 : w.currentPage) || 0) > 1 ? (((w == null ? void 0 : w.currentPage) || 0) - 1) * ((w == null ? void 0 : w.perPage) || 0) + 1 : 1), Ue = (w == null ? void 0 : w.rangeEnd) ?? ((w == null ? void 0 : w.totalCurrentPage) !== (w == null ? void 0 : w.perPage) ? w == null ? void 0 : w.totalData : ((w == null ? void 0 : w.currentPage) || 1) * ((w == null ? void 0 : w.totalCurrentPage) || 0)), Je = ($e) => {
|
|
4440
4454
|
Ee({ ...pe, [y]: String($e) });
|
|
4441
4455
|
}, Ce = C || z && !!(w != null && w.totalPage), we = () => {
|
|
4442
|
-
|
|
4456
|
+
p(), ge(!1);
|
|
4443
4457
|
};
|
|
4444
4458
|
return /* @__PURE__ */ u(
|
|
4445
|
-
|
|
4459
|
+
f,
|
|
4446
4460
|
{
|
|
4447
4461
|
direction: "column",
|
|
4448
4462
|
gap: "sm",
|
|
@@ -4455,7 +4469,7 @@ const Ki = 240, gn = ({
|
|
|
4455
4469
|
"aria-label": "Filter bar",
|
|
4456
4470
|
children: [
|
|
4457
4471
|
/* @__PURE__ */ u(
|
|
4458
|
-
|
|
4472
|
+
f,
|
|
4459
4473
|
{
|
|
4460
4474
|
direction: "row",
|
|
4461
4475
|
display: "flex",
|
|
@@ -4465,7 +4479,7 @@ const Ki = 240, gn = ({
|
|
|
4465
4479
|
fullWidth: !0,
|
|
4466
4480
|
overflow: "overflow-auto",
|
|
4467
4481
|
children: [
|
|
4468
|
-
|
|
4482
|
+
g && /* @__PURE__ */ e(
|
|
4469
4483
|
gn,
|
|
4470
4484
|
{
|
|
4471
4485
|
searchKey: x,
|
|
@@ -4488,7 +4502,7 @@ const Ki = 240, gn = ({
|
|
|
4488
4502
|
}
|
|
4489
4503
|
),
|
|
4490
4504
|
/* @__PURE__ */ u(
|
|
4491
|
-
|
|
4505
|
+
f,
|
|
4492
4506
|
{
|
|
4493
4507
|
direction: "row",
|
|
4494
4508
|
display: "flex",
|
|
@@ -4532,7 +4546,7 @@ const Ki = 240, gn = ({
|
|
|
4532
4546
|
}
|
|
4533
4547
|
),
|
|
4534
4548
|
Ce && /* @__PURE__ */ u(
|
|
4535
|
-
|
|
4549
|
+
f,
|
|
4536
4550
|
{
|
|
4537
4551
|
direction: "row",
|
|
4538
4552
|
display: "flex",
|
|
@@ -4541,7 +4555,7 @@ const Ki = 240, gn = ({
|
|
|
4541
4555
|
gap: "sm",
|
|
4542
4556
|
fullWidth: !0,
|
|
4543
4557
|
children: [
|
|
4544
|
-
C ? /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${Ne}-${Ue} of ${((Ae = w == null ? void 0 : w.totalData) == null ? void 0 : Ae.toLocaleString()) || 0}` }) : /* @__PURE__ */ e(
|
|
4558
|
+
C ? /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${Ne}-${Ue} of ${((Ae = w == null ? void 0 : w.totalData) == null ? void 0 : Ae.toLocaleString()) || 0}` }) : /* @__PURE__ */ e(f, { direction: "column" }),
|
|
4545
4559
|
z && !!(w != null && w.totalPage) && /* @__PURE__ */ e(
|
|
4546
4560
|
ar,
|
|
4547
4561
|
{
|
|
@@ -4567,9 +4581,9 @@ const Ki = 240, gn = ({
|
|
|
4567
4581
|
hasActiveFilter: l,
|
|
4568
4582
|
onToggle: s,
|
|
4569
4583
|
onReset: we,
|
|
4570
|
-
getValue:
|
|
4571
|
-
setValue:
|
|
4572
|
-
clearValue:
|
|
4584
|
+
getValue: d,
|
|
4585
|
+
setValue: a,
|
|
4586
|
+
clearValue: m,
|
|
4573
4587
|
removeFilter: c
|
|
4574
4588
|
}
|
|
4575
4589
|
)
|
|
@@ -4585,11 +4599,11 @@ const Ki = 240, gn = ({
|
|
|
4585
4599
|
perPageKey: l = "perPage",
|
|
4586
4600
|
pageSizeOptions: s = [25, 50, 100],
|
|
4587
4601
|
defaultPerPage: c,
|
|
4588
|
-
showPagination:
|
|
4589
|
-
showResultCount:
|
|
4590
|
-
showPageSize:
|
|
4591
|
-
searchable:
|
|
4592
|
-
searchKey:
|
|
4602
|
+
showPagination: d = !0,
|
|
4603
|
+
showResultCount: a = !0,
|
|
4604
|
+
showPageSize: m = !0,
|
|
4605
|
+
searchable: p = !1,
|
|
4606
|
+
searchKey: g = "q",
|
|
4593
4607
|
searchPlaceholder: x = "Search",
|
|
4594
4608
|
searchShortcut: W = "/",
|
|
4595
4609
|
pagination: y,
|
|
@@ -4617,7 +4631,7 @@ const Ki = 240, gn = ({
|
|
|
4617
4631
|
filterKey: n,
|
|
4618
4632
|
activeFilterKey: o,
|
|
4619
4633
|
pageKey: i,
|
|
4620
|
-
searchKey:
|
|
4634
|
+
searchKey: g
|
|
4621
4635
|
}), O = Mi({
|
|
4622
4636
|
columns: k,
|
|
4623
4637
|
scopeId: B,
|
|
@@ -4654,7 +4668,7 @@ const Ki = 240, gn = ({
|
|
|
4654
4668
|
ee(), ye.clear(), C == null || C();
|
|
4655
4669
|
};
|
|
4656
4670
|
return ke("md") ? /* @__PURE__ */ u(
|
|
4657
|
-
|
|
4671
|
+
f,
|
|
4658
4672
|
{
|
|
4659
4673
|
display: "flex",
|
|
4660
4674
|
direction: "row",
|
|
@@ -4670,7 +4684,7 @@ const Ki = 240, gn = ({
|
|
|
4670
4684
|
"aria-label": "Filter bar",
|
|
4671
4685
|
children: [
|
|
4672
4686
|
/* @__PURE__ */ u(
|
|
4673
|
-
|
|
4687
|
+
f,
|
|
4674
4688
|
{
|
|
4675
4689
|
direction: "row",
|
|
4676
4690
|
display: "flex",
|
|
@@ -4689,7 +4703,7 @@ const Ki = 240, gn = ({
|
|
|
4689
4703
|
}
|
|
4690
4704
|
),
|
|
4691
4705
|
/* @__PURE__ */ u(
|
|
4692
|
-
|
|
4706
|
+
f,
|
|
4693
4707
|
{
|
|
4694
4708
|
direction: "row",
|
|
4695
4709
|
display: "flex",
|
|
@@ -4725,7 +4739,7 @@ const Ki = 240, gn = ({
|
|
|
4725
4739
|
]
|
|
4726
4740
|
}
|
|
4727
4741
|
),
|
|
4728
|
-
/* @__PURE__ */ u(
|
|
4742
|
+
/* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "sm", children: [
|
|
4729
4743
|
/* @__PURE__ */ e(
|
|
4730
4744
|
Yi,
|
|
4731
4745
|
{
|
|
@@ -4734,15 +4748,15 @@ const Ki = 240, gn = ({
|
|
|
4734
4748
|
perPageKey: l,
|
|
4735
4749
|
pageSizeOptions: s,
|
|
4736
4750
|
defaultPerPage: pe,
|
|
4737
|
-
showPagination:
|
|
4738
|
-
showResultCount:
|
|
4739
|
-
showPageSize:
|
|
4751
|
+
showPagination: d,
|
|
4752
|
+
showResultCount: a,
|
|
4753
|
+
showPageSize: m
|
|
4740
4754
|
}
|
|
4741
4755
|
),
|
|
4742
|
-
|
|
4756
|
+
p && /* @__PURE__ */ e(
|
|
4743
4757
|
gn,
|
|
4744
4758
|
{
|
|
4745
|
-
searchKey:
|
|
4759
|
+
searchKey: g,
|
|
4746
4760
|
filterKey: n,
|
|
4747
4761
|
pageKey: i,
|
|
4748
4762
|
placeholder: x,
|
|
@@ -4785,8 +4799,8 @@ const Ki = 240, gn = ({
|
|
|
4785
4799
|
setValue: ae,
|
|
4786
4800
|
clearValue: de,
|
|
4787
4801
|
onReset: Ne,
|
|
4788
|
-
searchable:
|
|
4789
|
-
searchKey:
|
|
4802
|
+
searchable: p,
|
|
4803
|
+
searchKey: g,
|
|
4790
4804
|
filterKey: n,
|
|
4791
4805
|
pageKey: i,
|
|
4792
4806
|
searchPlaceholder: x,
|
|
@@ -4795,9 +4809,9 @@ const Ki = 240, gn = ({
|
|
|
4795
4809
|
perPageKey: l,
|
|
4796
4810
|
pageSizeOptions: s,
|
|
4797
4811
|
defaultPerPage: pe,
|
|
4798
|
-
showPagination:
|
|
4799
|
-
showResultCount:
|
|
4800
|
-
showPageSize:
|
|
4812
|
+
showPagination: d,
|
|
4813
|
+
showResultCount: a,
|
|
4814
|
+
showPageSize: m,
|
|
4801
4815
|
hasColumns: k.length > 0,
|
|
4802
4816
|
orderedColumns: O.orderedColumns,
|
|
4803
4817
|
allVisible: O.allVisible,
|
|
@@ -4847,10 +4861,10 @@ const Ki = 240, gn = ({
|
|
|
4847
4861
|
perPageKey: l = "perPage",
|
|
4848
4862
|
searchKey: s = "q",
|
|
4849
4863
|
defaultPage: c = 1,
|
|
4850
|
-
defaultPerPage:
|
|
4851
|
-
paramKeys:
|
|
4852
|
-
serialize:
|
|
4853
|
-
} = t, { activeKeys:
|
|
4864
|
+
defaultPerPage: d = 10,
|
|
4865
|
+
paramKeys: a,
|
|
4866
|
+
serialize: m
|
|
4867
|
+
} = t, { activeKeys: p, configByKey: g, hasActiveFilter: x, getValue: W } = yr({
|
|
4854
4868
|
configs: r,
|
|
4855
4869
|
filterKey: n,
|
|
4856
4870
|
activeFilterKey: o,
|
|
@@ -4858,20 +4872,20 @@ const Ki = 240, gn = ({
|
|
|
4858
4872
|
searchKey: s
|
|
4859
4873
|
}), { searchParams: y } = Ie(), k = y.toString();
|
|
4860
4874
|
return fe(() => {
|
|
4861
|
-
const w = {}, V = {}, v = _r(y.get(i), c), A = _r(y.get(l),
|
|
4862
|
-
w[(
|
|
4875
|
+
const w = {}, V = {}, v = _r(y.get(i), c), A = _r(y.get(l), d);
|
|
4876
|
+
w[(a == null ? void 0 : a.page) ?? "page"] = v, w[(a == null ? void 0 : a.perPage) ?? "perPage"] = A;
|
|
4863
4877
|
const z = pr(s, y, n) || "";
|
|
4864
|
-
z && (w[(
|
|
4878
|
+
z && (w[(a == null ? void 0 : a.search) ?? "search"] = z);
|
|
4865
4879
|
let C = !1;
|
|
4866
|
-
for (const B of
|
|
4867
|
-
const j =
|
|
4880
|
+
for (const B of p) {
|
|
4881
|
+
const j = g[B];
|
|
4868
4882
|
if (!j) continue;
|
|
4869
4883
|
const G = W(j);
|
|
4870
4884
|
V[B] = G;
|
|
4871
|
-
const _ =
|
|
4885
|
+
const _ = m == null ? void 0 : m[B], X = _ ? _(G) : lo(j, G);
|
|
4872
4886
|
if (X == null || Array.isArray(X) && X.length === 0)
|
|
4873
4887
|
continue;
|
|
4874
|
-
const te = (
|
|
4888
|
+
const te = (a == null ? void 0 : a[B]) ?? B;
|
|
4875
4889
|
w[te] = X, C = !0;
|
|
4876
4890
|
}
|
|
4877
4891
|
return {
|
|
@@ -4881,17 +4895,17 @@ const Ki = 240, gn = ({
|
|
|
4881
4895
|
};
|
|
4882
4896
|
}, [
|
|
4883
4897
|
k,
|
|
4884
|
-
|
|
4898
|
+
p.join("|"),
|
|
4885
4899
|
n,
|
|
4886
4900
|
o,
|
|
4887
4901
|
i,
|
|
4888
4902
|
l,
|
|
4889
4903
|
s,
|
|
4890
4904
|
c,
|
|
4891
|
-
a,
|
|
4892
4905
|
d,
|
|
4893
|
-
|
|
4894
|
-
|
|
4906
|
+
a,
|
|
4907
|
+
m,
|
|
4908
|
+
g
|
|
4895
4909
|
]);
|
|
4896
4910
|
}, co = [
|
|
4897
4911
|
"dropdown",
|
|
@@ -4905,17 +4919,17 @@ const Ki = 240, gn = ({
|
|
|
4905
4919
|
pageKey: o,
|
|
4906
4920
|
searchKey: i
|
|
4907
4921
|
}) => {
|
|
4908
|
-
const { configByKey: l, getValue: s, setValue: c, removeFilter:
|
|
4922
|
+
const { configByKey: l, getValue: s, setValue: c, removeFilter: d, clearAll: a, hasActiveFilter: m } = yr({
|
|
4909
4923
|
configs: t,
|
|
4910
4924
|
filterKey: r,
|
|
4911
4925
|
activeFilterKey: n,
|
|
4912
4926
|
pageKey: o,
|
|
4913
4927
|
searchKey: i
|
|
4914
|
-
}),
|
|
4928
|
+
}), p = (E, w) => {
|
|
4915
4929
|
var v;
|
|
4916
4930
|
const V = E.options;
|
|
4917
4931
|
return ((v = V == null ? void 0 : V.find((A) => A.value === w)) == null ? void 0 : v.label) ?? w;
|
|
4918
|
-
},
|
|
4932
|
+
}, g = Q(
|
|
4919
4933
|
(E) => {
|
|
4920
4934
|
const w = l[E];
|
|
4921
4935
|
if (!w) return [];
|
|
@@ -4929,26 +4943,26 @@ const Ki = 240, gn = ({
|
|
|
4929
4943
|
if (!V || !co.includes(V.type)) return;
|
|
4930
4944
|
const v = Array.isArray(w) ? w : [w];
|
|
4931
4945
|
if (v.length === 0) {
|
|
4932
|
-
|
|
4946
|
+
d(E);
|
|
4933
4947
|
return;
|
|
4934
4948
|
}
|
|
4935
4949
|
c(
|
|
4936
4950
|
V,
|
|
4937
|
-
v.map((A) => ({ label:
|
|
4951
|
+
v.map((A) => ({ label: p(V, A), value: A }))
|
|
4938
4952
|
);
|
|
4939
4953
|
},
|
|
4940
|
-
[l, c,
|
|
4954
|
+
[l, c, d]
|
|
4941
4955
|
), W = Q(
|
|
4942
4956
|
(E, w) => {
|
|
4943
|
-
const V =
|
|
4957
|
+
const V = g(E);
|
|
4944
4958
|
x(E, V.includes(w) ? V.filter((v) => v !== w) : [...V, w]);
|
|
4945
4959
|
},
|
|
4946
|
-
[
|
|
4960
|
+
[g, x]
|
|
4947
4961
|
), y = Q(
|
|
4948
|
-
(E, w) =>
|
|
4949
|
-
[
|
|
4950
|
-
), k = Q((E) =>
|
|
4951
|
-
return { set: x, toggle: W, clear: k, clearAll:
|
|
4962
|
+
(E, w) => g(E).includes(w),
|
|
4963
|
+
[g]
|
|
4964
|
+
), k = Q((E) => d(E), [d]);
|
|
4965
|
+
return { set: x, toggle: W, clear: k, clearAll: a, isActive: y, values: g, hasActiveFilter: m };
|
|
4952
4966
|
}, ec = (t, r) => {
|
|
4953
4967
|
if (!t) return {};
|
|
4954
4968
|
const { fromKey: n, toKey: o, opKey: i } = r, l = {};
|
|
@@ -4973,7 +4987,7 @@ const Ki = 240, gn = ({
|
|
|
4973
4987
|
return l;
|
|
4974
4988
|
}
|
|
4975
4989
|
}, so = ({ children: t, borderRadius: r, height: n }) => {
|
|
4976
|
-
const o =
|
|
4990
|
+
const o = ce(null), [i, l] = R("100vh");
|
|
4977
4991
|
return U(() => {
|
|
4978
4992
|
if (n) return;
|
|
4979
4993
|
const s = () => {
|
|
@@ -4984,7 +4998,7 @@ const Ki = 240, gn = ({
|
|
|
4984
4998
|
};
|
|
4985
4999
|
return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
4986
5000
|
}, [n]), /* @__PURE__ */ e(
|
|
4987
|
-
|
|
5001
|
+
f,
|
|
4988
5002
|
{
|
|
4989
5003
|
ref: o,
|
|
4990
5004
|
fullWidth: !0,
|
|
@@ -5010,7 +5024,7 @@ const Ki = 240, gn = ({
|
|
|
5010
5024
|
}) => {
|
|
5011
5025
|
const s = ke("md"), c = l ? /* @__PURE__ */ e(Ei, { ...i }) : null;
|
|
5012
5026
|
return /* @__PURE__ */ e(
|
|
5013
|
-
|
|
5027
|
+
f,
|
|
5014
5028
|
{
|
|
5015
5029
|
style: {
|
|
5016
5030
|
display: "flex",
|
|
@@ -5029,14 +5043,14 @@ const Ki = 240, gn = ({
|
|
|
5029
5043
|
gap: "16px"
|
|
5030
5044
|
},
|
|
5031
5045
|
children: o ? o({ filter: c }) : /* @__PURE__ */ u(ie, { children: [
|
|
5032
|
-
/* @__PURE__ */ u(
|
|
5046
|
+
/* @__PURE__ */ u(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0 }, children: [
|
|
5033
5047
|
c,
|
|
5034
5048
|
n
|
|
5035
5049
|
] }),
|
|
5036
|
-
/* @__PURE__ */ u(
|
|
5050
|
+
/* @__PURE__ */ u(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flexShrink: 0 }, children: [
|
|
5037
5051
|
r,
|
|
5038
5052
|
t ? nr(t) ? t : /* @__PURE__ */ e(
|
|
5039
|
-
|
|
5053
|
+
f,
|
|
5040
5054
|
{
|
|
5041
5055
|
style: {
|
|
5042
5056
|
display: "flex",
|
|
@@ -5046,14 +5060,14 @@ const Ki = 240, gn = ({
|
|
|
5046
5060
|
textWrap: "nowrap"
|
|
5047
5061
|
},
|
|
5048
5062
|
children: t.map(
|
|
5049
|
-
({ title:
|
|
5063
|
+
({ title: a, icon: m, buttonProps: p, onClick: g }, x) => !a && !m ? null : /* @__PURE__ */ e(
|
|
5050
5064
|
T,
|
|
5051
5065
|
{
|
|
5052
5066
|
fullWidth: !s,
|
|
5053
|
-
iconLeft:
|
|
5054
|
-
onClick:
|
|
5055
|
-
...
|
|
5056
|
-
children:
|
|
5067
|
+
iconLeft: m ? /* @__PURE__ */ e(F, { name: m }) : void 0,
|
|
5068
|
+
onClick: g,
|
|
5069
|
+
...p,
|
|
5070
|
+
children: a
|
|
5057
5071
|
},
|
|
5058
5072
|
`action-${x}`
|
|
5059
5073
|
)
|
|
@@ -5069,7 +5083,7 @@ const Ki = 240, gn = ({
|
|
|
5069
5083
|
withMarginBottom: r = !0,
|
|
5070
5084
|
withMarginTop: n = !0
|
|
5071
5085
|
}) => /* @__PURE__ */ u(
|
|
5072
|
-
|
|
5086
|
+
f,
|
|
5073
5087
|
{
|
|
5074
5088
|
style: {
|
|
5075
5089
|
display: "flex",
|
|
@@ -5103,17 +5117,17 @@ const Ki = 240, gn = ({
|
|
|
5103
5117
|
showPagination: i = !0,
|
|
5104
5118
|
totalData: l
|
|
5105
5119
|
}) => {
|
|
5106
|
-
const { searchQueries: s, setSearchParams: c, searchParams:
|
|
5120
|
+
const { searchQueries: s, setSearchParams: c, searchParams: d } = Ie(), a = d.get(n), m = (W) => {
|
|
5107
5121
|
c({ ...s, [r]: String(W) });
|
|
5108
|
-
},
|
|
5122
|
+
}, p = (W) => {
|
|
5109
5123
|
c({
|
|
5110
5124
|
...s,
|
|
5111
5125
|
[n]: W,
|
|
5112
5126
|
[r]: "1"
|
|
5113
5127
|
});
|
|
5114
|
-
},
|
|
5128
|
+
}, g = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), x = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
|
|
5115
5129
|
return /* @__PURE__ */ e(
|
|
5116
|
-
|
|
5130
|
+
f,
|
|
5117
5131
|
{
|
|
5118
5132
|
style: {
|
|
5119
5133
|
display: "flex",
|
|
@@ -5129,7 +5143,7 @@ const Ki = 240, gn = ({
|
|
|
5129
5143
|
flexShrink: 0
|
|
5130
5144
|
},
|
|
5131
5145
|
children: i ? /* @__PURE__ */ u(ie, { children: [
|
|
5132
|
-
/* @__PURE__ */ u(
|
|
5146
|
+
/* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center", textWrap: "nowrap" }, children: [
|
|
5133
5147
|
/* @__PURE__ */ e(D, { children: "Rows Per Page: " }),
|
|
5134
5148
|
/* @__PURE__ */ e(
|
|
5135
5149
|
Bt,
|
|
@@ -5142,20 +5156,20 @@ const Ki = 240, gn = ({
|
|
|
5142
5156
|
{ label: "100", value: "100" }
|
|
5143
5157
|
],
|
|
5144
5158
|
onChange: (W) => {
|
|
5145
|
-
|
|
5159
|
+
p(W[0].value);
|
|
5146
5160
|
},
|
|
5147
|
-
value:
|
|
5148
|
-
defaultValue:
|
|
5161
|
+
value: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }],
|
|
5162
|
+
defaultValue: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }]
|
|
5149
5163
|
}
|
|
5150
5164
|
),
|
|
5151
|
-
/* @__PURE__ */ e(D, { children: `${
|
|
5165
|
+
/* @__PURE__ */ e(D, { children: `${g}-${x} of ${(t == null ? void 0 : t.totalData) || 0}` })
|
|
5152
5166
|
] }),
|
|
5153
5167
|
/* @__PURE__ */ e(
|
|
5154
5168
|
ar,
|
|
5155
5169
|
{
|
|
5156
5170
|
currentPage: t != null && t.currentPage ? Number(t == null ? void 0 : t.currentPage) : 1,
|
|
5157
5171
|
totalPages: t != null && t.totalPage ? Number(t == null ? void 0 : t.totalPage) : 1,
|
|
5158
|
-
onPageChange:
|
|
5172
|
+
onPageChange: m
|
|
5159
5173
|
}
|
|
5160
5174
|
)
|
|
5161
5175
|
] }) : /* @__PURE__ */ e(
|
|
@@ -5169,7 +5183,7 @@ const Ki = 240, gn = ({
|
|
|
5169
5183
|
}
|
|
5170
5184
|
);
|
|
5171
5185
|
}, fo = ({ filter: t, columnTitle: r }) => {
|
|
5172
|
-
const [n, o] = R(!1), i =
|
|
5186
|
+
const [n, o] = R(!1), i = ce(null), l = ce(null), s = ce(null), [c, d] = R(""), [a, m] = R({ top: 0, left: 0 }), p = t.selectedValues, g = fe(() => c ? t.options.filter(
|
|
5173
5187
|
(y) => y.label.toLowerCase().includes(c.toLowerCase())
|
|
5174
5188
|
) : t.options, [t.options, c]);
|
|
5175
5189
|
U(() => {
|
|
@@ -5177,13 +5191,13 @@ const Ki = 240, gn = ({
|
|
|
5177
5191
|
const y = l.current.getBoundingClientRect(), k = 280, E = {
|
|
5178
5192
|
top: y.bottom + 8
|
|
5179
5193
|
};
|
|
5180
|
-
t.position === "left" || y.left + k > window.innerWidth ? E.right = window.innerWidth - y.right : E.left = y.left,
|
|
5194
|
+
t.position === "left" || y.left + k > window.innerWidth ? E.right = window.innerWidth - y.right : E.left = y.left, m(E);
|
|
5181
5195
|
}
|
|
5182
5196
|
}, [n, t.position]), U(() => {
|
|
5183
5197
|
n && s.current ? setTimeout(() => {
|
|
5184
5198
|
var y;
|
|
5185
5199
|
return (y = s.current) == null ? void 0 : y.focus();
|
|
5186
|
-
}, 50) :
|
|
5200
|
+
}, 50) : d("");
|
|
5187
5201
|
}, [n]), U(() => {
|
|
5188
5202
|
const y = (k) => {
|
|
5189
5203
|
i.current && !i.current.contains(k.target) && l.current && !l.current.contains(k.target) && o(!1);
|
|
@@ -5191,12 +5205,12 @@ const Ki = 240, gn = ({
|
|
|
5191
5205
|
return n && document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
5192
5206
|
}, [n]);
|
|
5193
5207
|
const x = (y) => {
|
|
5194
|
-
const k =
|
|
5208
|
+
const k = p.includes(y) ? p.filter((E) => E !== y) : [...p, y];
|
|
5195
5209
|
t.onFilterChange(k);
|
|
5196
5210
|
}, W = () => t.onFilterChange([]);
|
|
5197
|
-
return /* @__PURE__ */ u(
|
|
5211
|
+
return /* @__PURE__ */ u(f, { direction: "column", style: { position: "relative" }, children: [
|
|
5198
5212
|
/* @__PURE__ */ e(
|
|
5199
|
-
|
|
5213
|
+
f,
|
|
5200
5214
|
{
|
|
5201
5215
|
ref: l,
|
|
5202
5216
|
style: {
|
|
@@ -5215,20 +5229,20 @@ const Ki = 240, gn = ({
|
|
|
5215
5229
|
name: n ? "ChevronUp" : "ChevronDown",
|
|
5216
5230
|
size: "sm",
|
|
5217
5231
|
style: {
|
|
5218
|
-
color:
|
|
5232
|
+
color: p.length > 0 ? "var(--sa-color-brand-500, #1a4fa0)" : "var(--sa-text-subtle, #8c8f97)"
|
|
5219
5233
|
}
|
|
5220
5234
|
}
|
|
5221
5235
|
)
|
|
5222
5236
|
}
|
|
5223
5237
|
),
|
|
5224
5238
|
n && /* @__PURE__ */ u(
|
|
5225
|
-
|
|
5239
|
+
f,
|
|
5226
5240
|
{
|
|
5227
5241
|
ref: i,
|
|
5228
5242
|
style: {
|
|
5229
5243
|
position: "fixed",
|
|
5230
|
-
top: `${
|
|
5231
|
-
...
|
|
5244
|
+
top: `${a.top}px`,
|
|
5245
|
+
...a.left !== void 0 ? { left: `${a.left}px` } : { right: `${a.right}px` },
|
|
5232
5246
|
backgroundColor: "white",
|
|
5233
5247
|
borderRadius: "4px",
|
|
5234
5248
|
minWidth: "280px",
|
|
@@ -5241,7 +5255,7 @@ const Ki = 240, gn = ({
|
|
|
5241
5255
|
},
|
|
5242
5256
|
children: [
|
|
5243
5257
|
/* @__PURE__ */ u(
|
|
5244
|
-
|
|
5258
|
+
f,
|
|
5245
5259
|
{
|
|
5246
5260
|
style: {
|
|
5247
5261
|
display: "flex",
|
|
@@ -5259,7 +5273,7 @@ const Ki = 240, gn = ({
|
|
|
5259
5273
|
"Filter ",
|
|
5260
5274
|
r
|
|
5261
5275
|
] }),
|
|
5262
|
-
|
|
5276
|
+
p.length > 0 && /* @__PURE__ */ e(f, { direction: "column", style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
|
|
5263
5277
|
D,
|
|
5264
5278
|
{
|
|
5265
5279
|
fontSize: "xs",
|
|
@@ -5275,7 +5289,7 @@ const Ki = 240, gn = ({
|
|
|
5275
5289
|
}
|
|
5276
5290
|
),
|
|
5277
5291
|
!t.hideSearch && /* @__PURE__ */ e(
|
|
5278
|
-
|
|
5292
|
+
f,
|
|
5279
5293
|
{
|
|
5280
5294
|
direction: "column",
|
|
5281
5295
|
style: {
|
|
@@ -5291,14 +5305,14 @@ const Ki = 240, gn = ({
|
|
|
5291
5305
|
placeholder: `Search ${r.toLowerCase()}...`,
|
|
5292
5306
|
leftIcon: /* @__PURE__ */ e(F, { name: "Search", size: "sm" }),
|
|
5293
5307
|
value: c,
|
|
5294
|
-
onChange: (y) =>
|
|
5308
|
+
onChange: (y) => d(y.target.value),
|
|
5295
5309
|
style: { fontSize: "14px" }
|
|
5296
5310
|
}
|
|
5297
5311
|
)
|
|
5298
5312
|
}
|
|
5299
5313
|
),
|
|
5300
5314
|
/* @__PURE__ */ e(
|
|
5301
|
-
|
|
5315
|
+
f,
|
|
5302
5316
|
{
|
|
5303
5317
|
direction: "column",
|
|
5304
5318
|
className: "ts-filter-dropdown-options",
|
|
@@ -5309,7 +5323,7 @@ const Ki = 240, gn = ({
|
|
|
5309
5323
|
paddingRight: "8px"
|
|
5310
5324
|
},
|
|
5311
5325
|
children: t.isLoadingOptions ? /* @__PURE__ */ u(
|
|
5312
|
-
|
|
5326
|
+
f,
|
|
5313
5327
|
{
|
|
5314
5328
|
style: {
|
|
5315
5329
|
paddingTop: "40px",
|
|
@@ -5342,8 +5356,8 @@ const Ki = 240, gn = ({
|
|
|
5342
5356
|
)
|
|
5343
5357
|
]
|
|
5344
5358
|
}
|
|
5345
|
-
) :
|
|
5346
|
-
|
|
5359
|
+
) : g.length > 0 ? /* @__PURE__ */ e(f, { direction: "column", style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: g.map((y) => /* @__PURE__ */ u(
|
|
5360
|
+
f,
|
|
5347
5361
|
{
|
|
5348
5362
|
style: {
|
|
5349
5363
|
display: "flex",
|
|
@@ -5357,22 +5371,22 @@ const Ki = 240, gn = ({
|
|
|
5357
5371
|
cursor: "pointer",
|
|
5358
5372
|
borderRadius: "8px",
|
|
5359
5373
|
transition: "all 0.2s ease",
|
|
5360
|
-
backgroundColor:
|
|
5374
|
+
backgroundColor: p.includes(y.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
|
|
5361
5375
|
},
|
|
5362
5376
|
onClick: (k) => {
|
|
5363
5377
|
k.stopPropagation(), x(y.value);
|
|
5364
5378
|
},
|
|
5365
5379
|
onMouseEnter: (k) => {
|
|
5366
|
-
|
|
5380
|
+
p.includes(y.value) || (k.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), k.currentTarget.style.transform = "translateX(2px)";
|
|
5367
5381
|
},
|
|
5368
5382
|
onMouseLeave: (k) => {
|
|
5369
|
-
k.currentTarget.style.backgroundColor =
|
|
5383
|
+
k.currentTarget.style.backgroundColor = p.includes(y.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", k.currentTarget.style.transform = "translateX(0)";
|
|
5370
5384
|
},
|
|
5371
5385
|
children: [
|
|
5372
5386
|
/* @__PURE__ */ e(
|
|
5373
5387
|
Ft,
|
|
5374
5388
|
{
|
|
5375
|
-
checked:
|
|
5389
|
+
checked: p.includes(y.value),
|
|
5376
5390
|
onChange: () => {
|
|
5377
5391
|
}
|
|
5378
5392
|
}
|
|
@@ -5381,8 +5395,8 @@ const Ki = 240, gn = ({
|
|
|
5381
5395
|
D,
|
|
5382
5396
|
{
|
|
5383
5397
|
fontSize: "sm",
|
|
5384
|
-
fontWeight:
|
|
5385
|
-
color:
|
|
5398
|
+
fontWeight: p.includes(y.value) ? "medium" : "normal",
|
|
5399
|
+
color: p.includes(y.value) ? "primary" : "gray-700",
|
|
5386
5400
|
children: y.label
|
|
5387
5401
|
}
|
|
5388
5402
|
)
|
|
@@ -5390,7 +5404,7 @@ const Ki = 240, gn = ({
|
|
|
5390
5404
|
},
|
|
5391
5405
|
y.value
|
|
5392
5406
|
)) }) : /* @__PURE__ */ u(
|
|
5393
|
-
|
|
5407
|
+
f,
|
|
5394
5408
|
{
|
|
5395
5409
|
style: {
|
|
5396
5410
|
paddingTop: "40px",
|
|
@@ -5423,8 +5437,8 @@ const Ki = 240, gn = ({
|
|
|
5423
5437
|
)
|
|
5424
5438
|
}
|
|
5425
5439
|
),
|
|
5426
|
-
|
|
5427
|
-
|
|
5440
|
+
p.length > 0 && /* @__PURE__ */ e(
|
|
5441
|
+
f,
|
|
5428
5442
|
{
|
|
5429
5443
|
direction: "column",
|
|
5430
5444
|
style: {
|
|
@@ -5436,9 +5450,9 @@ const Ki = 240, gn = ({
|
|
|
5436
5450
|
backgroundColor: "var(--sa-color-brand-50, #e6edf6)",
|
|
5437
5451
|
marginTop: "auto"
|
|
5438
5452
|
},
|
|
5439
|
-
children: /* @__PURE__ */ u(
|
|
5453
|
+
children: /* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "4px" }, children: [
|
|
5440
5454
|
/* @__PURE__ */ e(
|
|
5441
|
-
|
|
5455
|
+
f,
|
|
5442
5456
|
{
|
|
5443
5457
|
direction: "column",
|
|
5444
5458
|
style: {
|
|
@@ -5449,12 +5463,12 @@ const Ki = 240, gn = ({
|
|
|
5449
5463
|
fontWeight: 600,
|
|
5450
5464
|
color: "white"
|
|
5451
5465
|
},
|
|
5452
|
-
children:
|
|
5466
|
+
children: p.length
|
|
5453
5467
|
}
|
|
5454
5468
|
),
|
|
5455
5469
|
/* @__PURE__ */ u(D, { fontSize: "xs", color: "primary", fontWeight: "medium", children: [
|
|
5456
5470
|
"item",
|
|
5457
|
-
|
|
5471
|
+
p.length > 1 ? "s" : "",
|
|
5458
5472
|
" selected"
|
|
5459
5473
|
] })
|
|
5460
5474
|
] })
|
|
@@ -5529,11 +5543,11 @@ const Ki = 240, gn = ({
|
|
|
5529
5543
|
isLoading: l,
|
|
5530
5544
|
visibleHandleDelete: s,
|
|
5531
5545
|
visibleHandleUpdate: c,
|
|
5532
|
-
visibleHandleDetail:
|
|
5533
|
-
showHeadBorder:
|
|
5534
|
-
scrollParentRef:
|
|
5535
|
-
frozenCount:
|
|
5536
|
-
onFrozenCountChange:
|
|
5546
|
+
visibleHandleDetail: d,
|
|
5547
|
+
showHeadBorder: a = !1,
|
|
5548
|
+
scrollParentRef: m,
|
|
5549
|
+
frozenCount: p = 0,
|
|
5550
|
+
onFrozenCountChange: g,
|
|
5537
5551
|
customActions: x,
|
|
5538
5552
|
actionsOrder: W = ["detail", "update", "delete", "custom"],
|
|
5539
5553
|
customEmptyState: y,
|
|
@@ -5562,15 +5576,15 @@ const Ki = 240, gn = ({
|
|
|
5562
5576
|
if (typeof Z == "string") return L[Z];
|
|
5563
5577
|
}, [Ne, Ue] = R(!1);
|
|
5564
5578
|
U(() => {
|
|
5565
|
-
if (!(
|
|
5566
|
-
const L =
|
|
5579
|
+
if (!(m != null && m.current)) return;
|
|
5580
|
+
const L = m.current;
|
|
5567
5581
|
Ue(L.scrollHeight > L.clientHeight);
|
|
5568
|
-
}, [r,
|
|
5569
|
-
const Je =
|
|
5582
|
+
}, [r, m]);
|
|
5583
|
+
const Je = ce(null), [Ce, we] = R([]), [Ae, $e] = R(
|
|
5570
5584
|
() => E ?? {}
|
|
5571
|
-
), Ke =
|
|
5585
|
+
), Ke = ce(null);
|
|
5572
5586
|
it(() => {
|
|
5573
|
-
if (!
|
|
5587
|
+
if (!p || !Je.current) {
|
|
5574
5588
|
we([]);
|
|
5575
5589
|
return;
|
|
5576
5590
|
}
|
|
@@ -5579,11 +5593,11 @@ const Ki = 240, gn = ({
|
|
|
5579
5593
|
), Z = [];
|
|
5580
5594
|
let N = 0;
|
|
5581
5595
|
L.forEach((P, J) => {
|
|
5582
|
-
Z[J] = N, J <
|
|
5596
|
+
Z[J] = N, J < p && (N += P.offsetWidth);
|
|
5583
5597
|
}), we(Z);
|
|
5584
|
-
}, [
|
|
5598
|
+
}, [p, t, r, Ae]);
|
|
5585
5599
|
const ot = (L) => {
|
|
5586
|
-
|
|
5600
|
+
g && g(L < p ? L : L + 1);
|
|
5587
5601
|
}, S = (L, Z) => {
|
|
5588
5602
|
const N = Ae[L];
|
|
5589
5603
|
if (N !== void 0) {
|
|
@@ -5623,7 +5637,7 @@ const Ki = 240, gn = ({
|
|
|
5623
5637
|
children: /* @__PURE__ */ u(He, { children: [
|
|
5624
5638
|
t.map((L, Z) => {
|
|
5625
5639
|
var yt, xt;
|
|
5626
|
-
const N =
|
|
5640
|
+
const N = p > 0 && Z < p, P = Ce[Z] ?? 0, J = $(L), Se = Z === t.length - 1 && ee && C, je = X(L), Re = !!L.sortable && !!je, Oe = Re && (_ == null ? void 0 : _.key) === je ? _.direction : null, dt = L.title || ((yt = L.accessor) == null ? void 0 : yt.toString()) || "", Pe = (xt = L.headerTooltip) != null && xt.showIcon ? /* @__PURE__ */ e(
|
|
5627
5641
|
F,
|
|
5628
5642
|
{
|
|
5629
5643
|
name: "InfoCircle",
|
|
@@ -5670,9 +5684,9 @@ const Ki = 240, gn = ({
|
|
|
5670
5684
|
left: N ? P : void 0,
|
|
5671
5685
|
zIndex: N ? 4 : 2,
|
|
5672
5686
|
paddingLeft: Z === 0 ? "12px" : "",
|
|
5673
|
-
borderRight:
|
|
5674
|
-
borderBottom:
|
|
5675
|
-
boxShadow:
|
|
5687
|
+
borderRight: a && !Se && !N ? ne : void 0,
|
|
5688
|
+
borderBottom: a ? ne : void 0,
|
|
5689
|
+
boxShadow: a && N ? ge : void 0,
|
|
5676
5690
|
backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
5677
5691
|
textAlign: L.textAlign === "text-right" ? "right" : L.textAlign === "text-center" ? "center" : "left",
|
|
5678
5692
|
...S(Z, L.width)
|
|
@@ -5697,7 +5711,7 @@ const Ki = 240, gn = ({
|
|
|
5697
5711
|
columnTitle: L.title
|
|
5698
5712
|
}
|
|
5699
5713
|
),
|
|
5700
|
-
|
|
5714
|
+
g && /* @__PURE__ */ e(
|
|
5701
5715
|
"button",
|
|
5702
5716
|
{
|
|
5703
5717
|
onClick: () => ot(Z),
|
|
@@ -5755,15 +5769,15 @@ const Ki = 240, gn = ({
|
|
|
5755
5769
|
top: 0,
|
|
5756
5770
|
right: 0,
|
|
5757
5771
|
zIndex: 3,
|
|
5758
|
-
borderBottom:
|
|
5759
|
-
boxShadow:
|
|
5772
|
+
borderBottom: a ? ne : void 0,
|
|
5773
|
+
boxShadow: a && C ? ye : void 0
|
|
5760
5774
|
}
|
|
5761
5775
|
}
|
|
5762
5776
|
) : null
|
|
5763
5777
|
] })
|
|
5764
5778
|
}
|
|
5765
5779
|
),
|
|
5766
|
-
/* @__PURE__ */ e(en, { children: l ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { colSpan: t.length + 1, children: /* @__PURE__ */ u(
|
|
5780
|
+
/* @__PURE__ */ e(en, { children: l ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { colSpan: t.length + 1, children: /* @__PURE__ */ u(f, { direction: "column", style: { gap: "16px" }, children: [
|
|
5767
5781
|
/* @__PURE__ */ e(ut, { variant: "list" }),
|
|
5768
5782
|
/* @__PURE__ */ e(ut, { variant: "list" }),
|
|
5769
5783
|
/* @__PURE__ */ e(ut, { variant: "list" }),
|
|
@@ -5791,7 +5805,7 @@ const Ki = 240, gn = ({
|
|
|
5791
5805
|
},
|
|
5792
5806
|
children: [
|
|
5793
5807
|
t.map((N, P) => {
|
|
5794
|
-
const J = N.render ? N.render(L, Z, r) : Ee(L, N.accessor), xe =
|
|
5808
|
+
const J = N.render ? N.render(L, Z, r) : Ee(L, N.accessor), xe = p > 0 && P < p, Se = Ce[P] ?? 0, je = Ae[P] !== void 0, Re = xe && P === p - 1;
|
|
5795
5809
|
return /* @__PURE__ */ e(
|
|
5796
5810
|
Te,
|
|
5797
5811
|
{
|
|
@@ -5836,7 +5850,7 @@ const Ki = 240, gn = ({
|
|
|
5836
5850
|
transition: "background-color 0.3s ease"
|
|
5837
5851
|
}, children: /* @__PURE__ */ e(le, { direction: "row", align: "center", justify: "center", gap: "sm", children: W.map((N) => {
|
|
5838
5852
|
const P = Z === r.length - 1 ? "top" : "bottom";
|
|
5839
|
-
return N === "detail" && n && (
|
|
5853
|
+
return N === "detail" && n && (d == null ? void 0 : d(L)) !== !1 ? /* @__PURE__ */ e(Me, { label: "Detail", position: P, children: /* @__PURE__ */ e(
|
|
5840
5854
|
T,
|
|
5841
5855
|
{
|
|
5842
5856
|
size: "xs",
|
|
@@ -5876,16 +5890,16 @@ const Ki = 240, gn = ({
|
|
|
5876
5890
|
headerProps: n,
|
|
5877
5891
|
footerProps: o
|
|
5878
5892
|
}) => {
|
|
5879
|
-
var
|
|
5880
|
-
const i =
|
|
5893
|
+
var p;
|
|
5894
|
+
const i = ce(null), [l, s] = R(
|
|
5881
5895
|
(r == null ? void 0 : r.defaultFrozenCount) ?? 0
|
|
5882
|
-
), c = (n == null ? void 0 : n.show) ?? !0,
|
|
5883
|
-
typeof
|
|
5884
|
-
const
|
|
5896
|
+
), c = (n == null ? void 0 : n.show) ?? !0, d = ce(null), a = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
|
|
5897
|
+
typeof a == "number" && (d.current = a);
|
|
5898
|
+
const m = (o == null ? void 0 : o.showFooter) ?? (a === void 0 ? d.current !== 0 : a !== 0);
|
|
5885
5899
|
return /* @__PURE__ */ u(so, { ...t, children: [
|
|
5886
5900
|
c && /* @__PURE__ */ e(ao, { ...n }),
|
|
5887
5901
|
/* @__PURE__ */ e(
|
|
5888
|
-
|
|
5902
|
+
f,
|
|
5889
5903
|
{
|
|
5890
5904
|
direction: "column",
|
|
5891
5905
|
ref: i,
|
|
@@ -5905,7 +5919,7 @@ const Ki = 240, gn = ({
|
|
|
5905
5919
|
) : null
|
|
5906
5920
|
}
|
|
5907
5921
|
),
|
|
5908
|
-
|
|
5922
|
+
m && /* @__PURE__ */ e(
|
|
5909
5923
|
ho,
|
|
5910
5924
|
{
|
|
5911
5925
|
pagination: r == null ? void 0 : r.pagination,
|
|
@@ -5967,39 +5981,39 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
5967
5981
|
onSort: l,
|
|
5968
5982
|
onClearSort: s,
|
|
5969
5983
|
onToggleFreeze: c,
|
|
5970
|
-
onHide:
|
|
5984
|
+
onHide: d
|
|
5971
5985
|
}) => {
|
|
5972
|
-
const [
|
|
5986
|
+
const [a, m] = R(!1), p = ce(null), g = ce(null), [x, W] = R(
|
|
5973
5987
|
{ top: 0, left: 0 }
|
|
5974
5988
|
);
|
|
5975
5989
|
U(() => {
|
|
5976
|
-
if (
|
|
5977
|
-
const k =
|
|
5990
|
+
if (a && p.current) {
|
|
5991
|
+
const k = p.current.getBoundingClientRect(), E = k.left + Gr > window.innerWidth;
|
|
5978
5992
|
W({
|
|
5979
5993
|
top: k.bottom + 6,
|
|
5980
5994
|
...E ? { right: window.innerWidth - k.right } : { left: k.left }
|
|
5981
5995
|
});
|
|
5982
5996
|
}
|
|
5983
|
-
}, [
|
|
5984
|
-
if (!
|
|
5997
|
+
}, [a]), U(() => {
|
|
5998
|
+
if (!a) return;
|
|
5985
5999
|
const k = (E) => {
|
|
5986
|
-
|
|
6000
|
+
g.current && !g.current.contains(E.target) && p.current && !p.current.contains(E.target) && m(!1);
|
|
5987
6001
|
};
|
|
5988
6002
|
return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
5989
|
-
}, [
|
|
6003
|
+
}, [a]);
|
|
5990
6004
|
const y = (k) => {
|
|
5991
|
-
k(),
|
|
6005
|
+
k(), m(!1);
|
|
5992
6006
|
};
|
|
5993
6007
|
return /* @__PURE__ */ u(ie, { children: [
|
|
5994
6008
|
/* @__PURE__ */ e(
|
|
5995
6009
|
"button",
|
|
5996
6010
|
{
|
|
5997
|
-
ref:
|
|
6011
|
+
ref: p,
|
|
5998
6012
|
type: "button",
|
|
5999
6013
|
className: "sa-tl-menu-trigger",
|
|
6000
|
-
"data-active": t ||
|
|
6014
|
+
"data-active": t || a ? "true" : "false",
|
|
6001
6015
|
onClick: (k) => {
|
|
6002
|
-
k.stopPropagation(),
|
|
6016
|
+
k.stopPropagation(), m((E) => !E);
|
|
6003
6017
|
},
|
|
6004
6018
|
title: "Column options",
|
|
6005
6019
|
style: {
|
|
@@ -6018,10 +6032,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6018
6032
|
children: /* @__PURE__ */ e(bo, { sortDir: o, frozen: i })
|
|
6019
6033
|
}
|
|
6020
6034
|
),
|
|
6021
|
-
|
|
6022
|
-
|
|
6035
|
+
a && /* @__PURE__ */ u(
|
|
6036
|
+
f,
|
|
6023
6037
|
{
|
|
6024
|
-
ref:
|
|
6038
|
+
ref: g,
|
|
6025
6039
|
onClick: (k) => k.stopPropagation(),
|
|
6026
6040
|
style: {
|
|
6027
6041
|
position: "fixed",
|
|
@@ -6074,7 +6088,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6074
6088
|
icon: "EyeClosed",
|
|
6075
6089
|
label: "Hide column",
|
|
6076
6090
|
danger: !0,
|
|
6077
|
-
onClick: () => y(
|
|
6091
|
+
onClick: () => y(d)
|
|
6078
6092
|
}
|
|
6079
6093
|
)
|
|
6080
6094
|
]
|
|
@@ -6144,11 +6158,11 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6144
6158
|
widthStorageKey: l,
|
|
6145
6159
|
columnState: s,
|
|
6146
6160
|
onColumnStateChange: c,
|
|
6147
|
-
columnMenu:
|
|
6148
|
-
sort:
|
|
6149
|
-
defaultSort:
|
|
6150
|
-
onSortChange:
|
|
6151
|
-
height:
|
|
6161
|
+
columnMenu: d = !1,
|
|
6162
|
+
sort: a,
|
|
6163
|
+
defaultSort: m,
|
|
6164
|
+
onSortChange: p,
|
|
6165
|
+
height: g,
|
|
6152
6166
|
mobileLayout: x = "cards",
|
|
6153
6167
|
mobileBreakpoint: W = "md",
|
|
6154
6168
|
groupSeparator: y,
|
|
@@ -6169,10 +6183,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6169
6183
|
() => /* @__PURE__ */ new Set()
|
|
6170
6184
|
), G = s !== void 0, [_, X] = R({}), te = s ?? _, me = (b) => {
|
|
6171
6185
|
c == null || c(b), G || X(b);
|
|
6172
|
-
}, ae =
|
|
6173
|
-
|
|
6174
|
-
), O = ae ?
|
|
6175
|
-
|
|
6186
|
+
}, ae = a !== void 0, [de, ee] = R(
|
|
6187
|
+
m ?? null
|
|
6188
|
+
), O = ae ? a ?? null : de, ne = !p, ye = (b) => {
|
|
6189
|
+
p == null || p(b), ae || ee(b);
|
|
6176
6190
|
}, { headerGroups: ge, leafColumns: pe, hasGroups: Ee } = fe(() => {
|
|
6177
6191
|
var be;
|
|
6178
6192
|
const b = new Set(te.hidden ?? []), M = (K, he) => K.key ?? (typeof K.accessor == "string" ? K.accessor : `col-${he}`), I = t.map((K, he) => {
|
|
@@ -6211,7 +6225,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6211
6225
|
return [...r].sort(
|
|
6212
6226
|
(I, Y) => ko(Je(b.col, I), Je(b.col, Y)) * M
|
|
6213
6227
|
);
|
|
6214
|
-
}, [r, ne, O, pe]), Ae = !Ee, $e = !!l && Ae, [Ke, ot] = Wn(l ?? ""), S = $e ? Ke : void 0, $ =
|
|
6228
|
+
}, [r, ne, O, pe]), Ae = !Ee, $e = !!l && Ae, [Ke, ot] = Wn(l ?? ""), S = $e ? Ke : void 0, $ = ce(null), [H, L] = R();
|
|
6215
6229
|
it(() => {
|
|
6216
6230
|
L(void 0);
|
|
6217
6231
|
}, [Ue]), it(() => {
|
|
@@ -6234,9 +6248,9 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6234
6248
|
let M = 0;
|
|
6235
6249
|
for (let I = 0; I < b; I++) M += H[I] ?? 0;
|
|
6236
6250
|
return M;
|
|
6237
|
-
}, Re =
|
|
6251
|
+
}, Re = ce(null), [Oe, dt] = R("100vh");
|
|
6238
6252
|
it(() => {
|
|
6239
|
-
if (
|
|
6253
|
+
if (g !== void 0) return;
|
|
6240
6254
|
const b = () => {
|
|
6241
6255
|
if (Re.current) {
|
|
6242
6256
|
const M = Re.current.getBoundingClientRect().top;
|
|
@@ -6244,7 +6258,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6244
6258
|
}
|
|
6245
6259
|
};
|
|
6246
6260
|
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
6247
|
-
}, [
|
|
6261
|
+
}, [g]);
|
|
6248
6262
|
const Pe = (b, M) => n ? n(b, M) : M, Ye = (b, M, I) => b.render ? b.render(M, I, we) : Do(M, b.accessor), Qe = pe.length + (A ? 1 : 0), yt = (b, M) => {
|
|
6249
6263
|
M || me({
|
|
6250
6264
|
...te,
|
|
@@ -6320,7 +6334,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6320
6334
|
const I = et(b);
|
|
6321
6335
|
return I.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: I.map((Y) => /* @__PURE__ */ e(tt.Fragment, { children: bt(Y, b, M, { showLabel: !1 }) }, Y.key)) }) : null;
|
|
6322
6336
|
}, Ht = (b, M) => {
|
|
6323
|
-
const { col: I, key: Y } = b, ue = Ne.get(Y) ?? 0, be = Se(ue), K = be && ue === xe, he = (O == null ? void 0 : O.key) === Y ? O.direction : null, Le =
|
|
6337
|
+
const { col: I, key: Y } = b, ue = Ne.get(Y) ?? 0, be = Se(ue), K = be && ue === xe, he = (O == null ? void 0 : O.key) === Y ? O.direction : null, Le = d && !I.disableMenu ? /* @__PURE__ */ e(
|
|
6324
6338
|
vo,
|
|
6325
6339
|
{
|
|
6326
6340
|
active: !!he || be,
|
|
@@ -6444,7 +6458,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6444
6458
|
}), Sr = (b, M) => {
|
|
6445
6459
|
const I = Nt ? Ye(Nt.col, b, M) : null;
|
|
6446
6460
|
return typeof I == "string" || typeof I == "number" ? /* @__PURE__ */ e(D, { as: "span", style: Dt, children: I }) : /* @__PURE__ */ e("span", { style: Dt, children: I });
|
|
6447
|
-
}, Dn = we.length === 0 ? /* @__PURE__ */ e(
|
|
6461
|
+
}, Dn = we.length === 0 ? /* @__PURE__ */ e(f, { style: { padding: 16, textAlign: "center" }, children: E }) : x === "expand" ? /* @__PURE__ */ e(f, { style: { display: "flex", flexDirection: "column" }, children: we.map((b, M) => {
|
|
6448
6462
|
const I = Pe(b, M), Y = B.has(I);
|
|
6449
6463
|
return /* @__PURE__ */ u("div", { style: { borderBottom: Kt }, children: [
|
|
6450
6464
|
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
@@ -6497,11 +6511,11 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6497
6511
|
)
|
|
6498
6512
|
] }, I);
|
|
6499
6513
|
}) }) : /* @__PURE__ */ e(
|
|
6500
|
-
|
|
6514
|
+
f,
|
|
6501
6515
|
{
|
|
6502
6516
|
style: { display: "flex", flexDirection: "column", gap: 8, padding: 8 },
|
|
6503
6517
|
children: we.map((b, M) => /* @__PURE__ */ u(
|
|
6504
|
-
|
|
6518
|
+
f,
|
|
6505
6519
|
{
|
|
6506
6520
|
style: {
|
|
6507
6521
|
border: Kt,
|
|
@@ -6657,13 +6671,13 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6657
6671
|
), $t = z ? we.findIndex((b, M) => Pe(b, M) === z.rowKey) : -1, jt = $t >= 0 ? we[$t] : null;
|
|
6658
6672
|
return /* @__PURE__ */ u(ie, { children: [
|
|
6659
6673
|
/* @__PURE__ */ e(
|
|
6660
|
-
|
|
6674
|
+
f,
|
|
6661
6675
|
{
|
|
6662
6676
|
ref: Re,
|
|
6663
6677
|
fullWidth: !0,
|
|
6664
6678
|
style: {
|
|
6665
6679
|
overflow: "auto",
|
|
6666
|
-
height:
|
|
6680
|
+
height: g ?? Oe
|
|
6667
6681
|
},
|
|
6668
6682
|
children: v ? Dn : kn
|
|
6669
6683
|
}
|
|
@@ -6687,35 +6701,35 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6687
6701
|
paramKeys: l,
|
|
6688
6702
|
scopeId: s,
|
|
6689
6703
|
storage: c = un
|
|
6690
|
-
} = t, { searchParams:
|
|
6704
|
+
} = t, { searchParams: d, setSearchParams: a, searchQueries: m } = Ie(), p = d.toString(), g = s ? pt.tableSort(s) : void 0, x = ce(!1);
|
|
6691
6705
|
U(() => {
|
|
6692
|
-
if (x.current || (x.current = !0, !
|
|
6706
|
+
if (x.current || (x.current = !0, !g) || d.has(r) || d.has(n))
|
|
6693
6707
|
return;
|
|
6694
|
-
const V = c.get(
|
|
6695
|
-
!(V != null && V.key) || !tr(V.direction) ||
|
|
6696
|
-
...Object.fromEntries(
|
|
6708
|
+
const V = c.get(g);
|
|
6709
|
+
!(V != null && V.key) || !tr(V.direction) || a({
|
|
6710
|
+
...Object.fromEntries(d.entries()),
|
|
6697
6711
|
[r]: V.key,
|
|
6698
6712
|
[n]: V.direction
|
|
6699
6713
|
});
|
|
6700
6714
|
}, []);
|
|
6701
6715
|
const W = fe(() => {
|
|
6702
|
-
const V =
|
|
6716
|
+
const V = d.get(r), v = d.get(n);
|
|
6703
6717
|
return V && tr(v) ? { key: V, direction: v } : i;
|
|
6704
|
-
}, [
|
|
6718
|
+
}, [p, r, n, i]);
|
|
6705
6719
|
U(() => {
|
|
6706
|
-
if (!
|
|
6707
|
-
const V =
|
|
6708
|
-
V && tr(v) ? c.set(
|
|
6709
|
-
}, [
|
|
6720
|
+
if (!g) return;
|
|
6721
|
+
const V = d.get(r), v = d.get(n);
|
|
6722
|
+
V && tr(v) ? c.set(g, { key: V, direction: v }) : c.remove(g);
|
|
6723
|
+
}, [p, g, r, n, c]);
|
|
6710
6724
|
const y = (l == null ? void 0 : l.sortBy) ?? "sortBy", k = (l == null ? void 0 : l.sortOrder) ?? "sortOrder", E = fe(() => W ? {
|
|
6711
6725
|
[y]: W.key,
|
|
6712
6726
|
[k]: W.direction
|
|
6713
6727
|
} : {}, [W, y, k]), w = Q(
|
|
6714
6728
|
(V) => {
|
|
6715
|
-
const v = { ...
|
|
6716
|
-
V ? (v[r] = V.key, v[n] = V.direction) : (delete v[r], delete v[n]), delete v[o],
|
|
6729
|
+
const v = { ...m };
|
|
6730
|
+
V ? (v[r] = V.key, v[n] = V.direction) : (delete v[r], delete v[n]), delete v[o], a(v);
|
|
6717
6731
|
},
|
|
6718
|
-
[
|
|
6732
|
+
[m, r, n, o, a]
|
|
6719
6733
|
);
|
|
6720
6734
|
return { sort: W, setSort: w, params: E };
|
|
6721
6735
|
}, xr = ({
|
|
@@ -6727,7 +6741,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6727
6741
|
children: n,
|
|
6728
6742
|
loading: o,
|
|
6729
6743
|
isLoading: i
|
|
6730
|
-
}) => /* @__PURE__ */ e(ie, { children: i ? o : t ? n : r }),
|
|
6744
|
+
}) => /* @__PURE__ */ e(ie, { children: i ? o : t ? n : r }), se = (t) => /* @__PURE__ */ e(
|
|
6731
6745
|
D,
|
|
6732
6746
|
{
|
|
6733
6747
|
...t,
|
|
@@ -6744,10 +6758,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6744
6758
|
fullWidth: o = !1,
|
|
6745
6759
|
...i
|
|
6746
6760
|
}) => {
|
|
6747
|
-
var c,
|
|
6761
|
+
var c, d, a;
|
|
6748
6762
|
const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
6749
6763
|
return /* @__PURE__ */ u(
|
|
6750
|
-
|
|
6764
|
+
f,
|
|
6751
6765
|
{
|
|
6752
6766
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
6753
6767
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -6758,32 +6772,32 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6758
6772
|
{
|
|
6759
6773
|
condition: !!i.inputProps.required,
|
|
6760
6774
|
fallback: /* @__PURE__ */ u(
|
|
6761
|
-
|
|
6775
|
+
f,
|
|
6762
6776
|
{
|
|
6763
6777
|
direction: "column",
|
|
6764
6778
|
customMaxWidth: s,
|
|
6765
6779
|
fullWidth: o,
|
|
6766
6780
|
children: [
|
|
6767
|
-
/* @__PURE__ */ e(
|
|
6781
|
+
/* @__PURE__ */ e(se, { children: i.title }),
|
|
6768
6782
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
|
|
6769
6783
|
]
|
|
6770
6784
|
}
|
|
6771
6785
|
),
|
|
6772
6786
|
children: /* @__PURE__ */ u(
|
|
6773
|
-
|
|
6787
|
+
f,
|
|
6774
6788
|
{
|
|
6775
6789
|
direction: "column",
|
|
6776
6790
|
customMaxWidth: s,
|
|
6777
6791
|
fullWidth: o,
|
|
6778
6792
|
children: [
|
|
6779
6793
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
6780
|
-
/* @__PURE__ */ e(
|
|
6781
|
-
/* @__PURE__ */ e(
|
|
6794
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
|
|
6795
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
6782
6796
|
/* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
6783
6797
|
Me,
|
|
6784
6798
|
{
|
|
6785
|
-
label: (
|
|
6786
|
-
arrowPosition: (
|
|
6799
|
+
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
6800
|
+
arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
|
|
6787
6801
|
...i.tooltip,
|
|
6788
6802
|
children: /* @__PURE__ */ e(
|
|
6789
6803
|
F,
|
|
@@ -6805,7 +6819,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6805
6819
|
)
|
|
6806
6820
|
}
|
|
6807
6821
|
),
|
|
6808
|
-
/* @__PURE__ */ u(
|
|
6822
|
+
/* @__PURE__ */ u(f, { direction: "column", gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
|
|
6809
6823
|
/* @__PURE__ */ e(
|
|
6810
6824
|
st,
|
|
6811
6825
|
{
|
|
@@ -6829,10 +6843,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6829
6843
|
fullWidth: o = !1,
|
|
6830
6844
|
...i
|
|
6831
6845
|
}) => {
|
|
6832
|
-
var c,
|
|
6846
|
+
var c, d, a;
|
|
6833
6847
|
const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
6834
6848
|
return /* @__PURE__ */ u(
|
|
6835
|
-
|
|
6849
|
+
f,
|
|
6836
6850
|
{
|
|
6837
6851
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
6838
6852
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -6843,32 +6857,32 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6843
6857
|
{
|
|
6844
6858
|
condition: !!i.inputProps.required,
|
|
6845
6859
|
fallback: /* @__PURE__ */ u(
|
|
6846
|
-
|
|
6860
|
+
f,
|
|
6847
6861
|
{
|
|
6848
6862
|
direction: "column",
|
|
6849
6863
|
customMaxWidth: s,
|
|
6850
6864
|
fullWidth: o,
|
|
6851
6865
|
children: [
|
|
6852
|
-
/* @__PURE__ */ e(
|
|
6866
|
+
/* @__PURE__ */ e(se, { children: i.title }),
|
|
6853
6867
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
|
|
6854
6868
|
]
|
|
6855
6869
|
}
|
|
6856
6870
|
),
|
|
6857
6871
|
children: /* @__PURE__ */ u(
|
|
6858
|
-
|
|
6872
|
+
f,
|
|
6859
6873
|
{
|
|
6860
6874
|
direction: "column",
|
|
6861
6875
|
customMaxWidth: s,
|
|
6862
6876
|
fullWidth: o,
|
|
6863
6877
|
children: [
|
|
6864
6878
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
6865
|
-
/* @__PURE__ */ e(
|
|
6866
|
-
/* @__PURE__ */ e(
|
|
6879
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
|
|
6880
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
6867
6881
|
/* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
6868
6882
|
Me,
|
|
6869
6883
|
{
|
|
6870
|
-
label: (
|
|
6871
|
-
arrowPosition: (
|
|
6884
|
+
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
6885
|
+
arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
|
|
6872
6886
|
...i.tooltip,
|
|
6873
6887
|
children: /* @__PURE__ */ e(
|
|
6874
6888
|
F,
|
|
@@ -6890,9 +6904,9 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6890
6904
|
)
|
|
6891
6905
|
}
|
|
6892
6906
|
),
|
|
6893
|
-
/* @__PURE__ */ u(
|
|
6907
|
+
/* @__PURE__ */ u(f, { direction: "column", gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
|
|
6894
6908
|
/* @__PURE__ */ e(
|
|
6895
|
-
|
|
6909
|
+
f,
|
|
6896
6910
|
{
|
|
6897
6911
|
direction: "column",
|
|
6898
6912
|
style: {
|
|
@@ -6916,17 +6930,17 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6916
6930
|
);
|
|
6917
6931
|
}, Eo = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-border-danger)" : "var(--sa-border-subtle)", Lo = (t) => {
|
|
6918
6932
|
var c;
|
|
6919
|
-
const [r, n] = R(!1), o = (
|
|
6920
|
-
|
|
6921
|
-
}, i = (
|
|
6922
|
-
|
|
6923
|
-
}, l = (
|
|
6924
|
-
|
|
6925
|
-
}, s = (
|
|
6926
|
-
|
|
6933
|
+
const [r, n] = R(!1), o = (d) => {
|
|
6934
|
+
d.preventDefault(), d.stopPropagation();
|
|
6935
|
+
}, i = (d) => {
|
|
6936
|
+
d.preventDefault(), d.stopPropagation(), d.dataTransfer && t.handleOnFileChange(d.dataTransfer.files.item(0));
|
|
6937
|
+
}, l = (d) => {
|
|
6938
|
+
d.preventDefault(), n(!0);
|
|
6939
|
+
}, s = (d) => {
|
|
6940
|
+
d.preventDefault(), n(!1);
|
|
6927
6941
|
};
|
|
6928
6942
|
return /* @__PURE__ */ u(
|
|
6929
|
-
|
|
6943
|
+
f,
|
|
6930
6944
|
{
|
|
6931
6945
|
width: "width-full",
|
|
6932
6946
|
paddingInline: "md",
|
|
@@ -6977,7 +6991,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6977
6991
|
}
|
|
6978
6992
|
)
|
|
6979
6993
|
] }),
|
|
6980
|
-
/* @__PURE__ */ e(D, { fontSize: "sm", color: "gray-500", children: (c = t.fileSupports) == null ? void 0 : c.map((
|
|
6994
|
+
/* @__PURE__ */ e(D, { fontSize: "sm", color: "gray-500", children: (c = t.fileSupports) == null ? void 0 : c.map((d) => d.toLocaleUpperCase()).join(", ") })
|
|
6981
6995
|
] })
|
|
6982
6996
|
]
|
|
6983
6997
|
}
|
|
@@ -7156,7 +7170,7 @@ function Ro(t) {
|
|
|
7156
7170
|
const Vo = (t) => {
|
|
7157
7171
|
var r, n;
|
|
7158
7172
|
return /* @__PURE__ */ u(
|
|
7159
|
-
|
|
7173
|
+
f,
|
|
7160
7174
|
{
|
|
7161
7175
|
width: "width-full",
|
|
7162
7176
|
paddingInline: "md",
|
|
@@ -7233,8 +7247,8 @@ const Vo = (t) => {
|
|
|
7233
7247
|
labelPosition: r = "outside-top",
|
|
7234
7248
|
...n
|
|
7235
7249
|
}) => {
|
|
7236
|
-
var
|
|
7237
|
-
const o =
|
|
7250
|
+
var g;
|
|
7251
|
+
const o = ce(null), i = () => {
|
|
7238
7252
|
if (n.defaultFile) {
|
|
7239
7253
|
window.open(n.defaultFile.url);
|
|
7240
7254
|
return;
|
|
@@ -7255,11 +7269,11 @@ const Vo = (t) => {
|
|
|
7255
7269
|
alignItems: "center"
|
|
7256
7270
|
}, children: "Optional" }),
|
|
7257
7271
|
n.required && /* @__PURE__ */ e("span", { style: { fontSize: "14px", fontWeight: 500, color: "var(--sa-text-error)" }, children: "*" })
|
|
7258
|
-
] }) : null,
|
|
7272
|
+
] }) : null, d = n.description ? /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.description }) : null, a = /* @__PURE__ */ u(ie, { children: [
|
|
7259
7273
|
n.helperText && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.helperText }),
|
|
7260
7274
|
n.errorText && t === "error" && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-error, #a4133c)", lineHeight: "18px" }, children: n.errorText }),
|
|
7261
7275
|
n.errorMessage && !n.errorText && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-error, #a4133c)", lineHeight: "18px" }, children: n.errorMessage })
|
|
7262
|
-
] }),
|
|
7276
|
+
] }), m = /* @__PURE__ */ e(
|
|
7263
7277
|
"input",
|
|
7264
7278
|
{
|
|
7265
7279
|
type: "file",
|
|
@@ -7269,10 +7283,10 @@ const Vo = (t) => {
|
|
|
7269
7283
|
var W;
|
|
7270
7284
|
return n.handleOnChangeFile(((W = x.target.files) == null ? void 0 : W.item(0)) || null);
|
|
7271
7285
|
},
|
|
7272
|
-
accept: (
|
|
7286
|
+
accept: (g = n.fileSupportOption) == null ? void 0 : g.map((x) => "." + (x == null ? void 0 : x.toLowerCase())).join(", ")
|
|
7273
7287
|
}
|
|
7274
|
-
),
|
|
7275
|
-
|
|
7288
|
+
), p = /* @__PURE__ */ u(
|
|
7289
|
+
f,
|
|
7276
7290
|
{
|
|
7277
7291
|
direction: "column",
|
|
7278
7292
|
fullWidth: !0,
|
|
@@ -7285,7 +7299,7 @@ const Vo = (t) => {
|
|
|
7285
7299
|
gap: "md",
|
|
7286
7300
|
...n.containerProps,
|
|
7287
7301
|
children: [
|
|
7288
|
-
|
|
7302
|
+
m,
|
|
7289
7303
|
(n.fileSelected || n.defaultFile) && /* @__PURE__ */ e(
|
|
7290
7304
|
Vo,
|
|
7291
7305
|
{
|
|
@@ -7312,17 +7326,17 @@ const Vo = (t) => {
|
|
|
7312
7326
|
return r === "outside-left" ? /* @__PURE__ */ u(le, { direction: "row", align: "flex-start", gap: "sm", style: { width: "100%" }, children: [
|
|
7313
7327
|
/* @__PURE__ */ u(le, { direction: "column", gap: "xs", style: { width: "40%", minWidth: "120px", paddingTop: "10px" }, children: [
|
|
7314
7328
|
c,
|
|
7315
|
-
|
|
7329
|
+
d
|
|
7316
7330
|
] }),
|
|
7317
7331
|
/* @__PURE__ */ u(le, { direction: "column", gap: "sm", style: { flex: 1, minWidth: 0 }, children: [
|
|
7318
|
-
|
|
7319
|
-
|
|
7332
|
+
p,
|
|
7333
|
+
a
|
|
7320
7334
|
] })
|
|
7321
7335
|
] }) : /* @__PURE__ */ u(le, { direction: "column", gap: "sm", style: { width: "100%" }, children: [
|
|
7322
7336
|
c,
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7337
|
+
d,
|
|
7338
|
+
p,
|
|
7339
|
+
a
|
|
7326
7340
|
] });
|
|
7327
7341
|
}, Ho = ({
|
|
7328
7342
|
size: t = "md",
|
|
@@ -7331,10 +7345,10 @@ const Vo = (t) => {
|
|
|
7331
7345
|
fullWidth: o = !1,
|
|
7332
7346
|
...i
|
|
7333
7347
|
}) => {
|
|
7334
|
-
var c,
|
|
7348
|
+
var c, d, a;
|
|
7335
7349
|
const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
7336
7350
|
return /* @__PURE__ */ u(
|
|
7337
|
-
|
|
7351
|
+
f,
|
|
7338
7352
|
{
|
|
7339
7353
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
7340
7354
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -7345,32 +7359,32 @@ const Vo = (t) => {
|
|
|
7345
7359
|
{
|
|
7346
7360
|
condition: !!i.inputProps.required,
|
|
7347
7361
|
fallback: /* @__PURE__ */ u(
|
|
7348
|
-
|
|
7362
|
+
f,
|
|
7349
7363
|
{
|
|
7350
7364
|
direction: "column",
|
|
7351
7365
|
customMaxWidth: s,
|
|
7352
7366
|
fullWidth: o,
|
|
7353
7367
|
children: [
|
|
7354
|
-
/* @__PURE__ */ e(
|
|
7368
|
+
/* @__PURE__ */ e(se, { children: i.title }),
|
|
7355
7369
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
|
|
7356
7370
|
]
|
|
7357
7371
|
}
|
|
7358
7372
|
),
|
|
7359
7373
|
children: /* @__PURE__ */ u(
|
|
7360
|
-
|
|
7374
|
+
f,
|
|
7361
7375
|
{
|
|
7362
7376
|
direction: "column",
|
|
7363
7377
|
customMaxWidth: s,
|
|
7364
7378
|
fullWidth: o,
|
|
7365
7379
|
children: [
|
|
7366
7380
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
7367
|
-
/* @__PURE__ */ e(
|
|
7368
|
-
/* @__PURE__ */ e(
|
|
7381
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
|
|
7382
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
7369
7383
|
/* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7370
7384
|
Me,
|
|
7371
7385
|
{
|
|
7372
|
-
label: (
|
|
7373
|
-
arrowPosition: (
|
|
7386
|
+
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
7387
|
+
arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
|
|
7374
7388
|
...i.tooltip,
|
|
7375
7389
|
children: /* @__PURE__ */ e(
|
|
7376
7390
|
F,
|
|
@@ -7413,10 +7427,10 @@ const Vo = (t) => {
|
|
|
7413
7427
|
required: i = !1,
|
|
7414
7428
|
...l
|
|
7415
7429
|
}) => {
|
|
7416
|
-
var
|
|
7430
|
+
var d, a, m, p;
|
|
7417
7431
|
const s = l.hideMessageError || !1, c = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
7418
7432
|
return /* @__PURE__ */ u(
|
|
7419
|
-
|
|
7433
|
+
f,
|
|
7420
7434
|
{
|
|
7421
7435
|
gap: r === "horizontal" || r === "horizontal-inline" ? "spacing-96" : "sm",
|
|
7422
7436
|
direction: r === "horizontal" || r === "horizontal-inline" ? "row" : "column",
|
|
@@ -7427,32 +7441,32 @@ const Vo = (t) => {
|
|
|
7427
7441
|
{
|
|
7428
7442
|
condition: !!i,
|
|
7429
7443
|
fallback: /* @__PURE__ */ u(
|
|
7430
|
-
|
|
7444
|
+
f,
|
|
7431
7445
|
{
|
|
7432
7446
|
direction: "column",
|
|
7433
7447
|
customMaxWidth: c,
|
|
7434
7448
|
fullWidth: o,
|
|
7435
7449
|
children: [
|
|
7436
|
-
/* @__PURE__ */ e(
|
|
7450
|
+
/* @__PURE__ */ e(se, { children: l.title }),
|
|
7437
7451
|
/* @__PURE__ */ e(Ge.Body3, { props: { color: "gray-500" }, children: l.description })
|
|
7438
7452
|
]
|
|
7439
7453
|
}
|
|
7440
7454
|
),
|
|
7441
7455
|
children: /* @__PURE__ */ u(
|
|
7442
|
-
|
|
7456
|
+
f,
|
|
7443
7457
|
{
|
|
7444
7458
|
direction: "column",
|
|
7445
7459
|
customMaxWidth: c,
|
|
7446
7460
|
fullWidth: o,
|
|
7447
7461
|
children: [
|
|
7448
7462
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
7449
|
-
/* @__PURE__ */ e(
|
|
7450
|
-
/* @__PURE__ */ e(
|
|
7451
|
-
/* @__PURE__ */ e(oe, { condition: !!((
|
|
7463
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: l.title }),
|
|
7464
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
7465
|
+
/* @__PURE__ */ e(oe, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
|
|
7452
7466
|
Me,
|
|
7453
7467
|
{
|
|
7454
|
-
label: (
|
|
7455
|
-
arrowPosition: (
|
|
7468
|
+
label: (a = l.tooltip) == null ? void 0 : a.label,
|
|
7469
|
+
arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
|
|
7456
7470
|
...l.tooltip,
|
|
7457
7471
|
children: /* @__PURE__ */ e(
|
|
7458
7472
|
F,
|
|
@@ -7475,7 +7489,7 @@ const Vo = (t) => {
|
|
|
7475
7489
|
}
|
|
7476
7490
|
),
|
|
7477
7491
|
/* @__PURE__ */ e(
|
|
7478
|
-
|
|
7492
|
+
f,
|
|
7479
7493
|
{
|
|
7480
7494
|
gap: r === "horizontal-inline" ? "xl" : "md",
|
|
7481
7495
|
direction: r === "horizontal-inline" ? "row" : "column",
|
|
@@ -7483,12 +7497,12 @@ const Vo = (t) => {
|
|
|
7483
7497
|
children: /* @__PURE__ */ e(
|
|
7484
7498
|
xr,
|
|
7485
7499
|
{
|
|
7486
|
-
of: (
|
|
7487
|
-
...
|
|
7488
|
-
isChecked: l.checkBoxesAreChecked.includes(
|
|
7500
|
+
of: (p = l.checkBoxesList) == null ? void 0 : p.map((g) => ({
|
|
7501
|
+
...g,
|
|
7502
|
+
isChecked: l.checkBoxesAreChecked.includes(g.id)
|
|
7489
7503
|
})),
|
|
7490
|
-
render: (
|
|
7491
|
-
|
|
7504
|
+
render: (g) => g.renderBadge ? /* @__PURE__ */ u(
|
|
7505
|
+
f,
|
|
7492
7506
|
{
|
|
7493
7507
|
direction: "row",
|
|
7494
7508
|
justify: "space-between",
|
|
@@ -7498,26 +7512,26 @@ const Vo = (t) => {
|
|
|
7498
7512
|
/* @__PURE__ */ e(
|
|
7499
7513
|
Ft,
|
|
7500
7514
|
{
|
|
7501
|
-
name:
|
|
7502
|
-
value:
|
|
7503
|
-
checked:
|
|
7504
|
-
onChange: (x) => l.onChecked(x.target.value,
|
|
7505
|
-
label:
|
|
7506
|
-
description:
|
|
7515
|
+
name: g.name,
|
|
7516
|
+
value: g.id,
|
|
7517
|
+
checked: g.isChecked,
|
|
7518
|
+
onChange: (x) => l.onChecked(x.target.value, g),
|
|
7519
|
+
label: g.name,
|
|
7520
|
+
description: g.description
|
|
7507
7521
|
}
|
|
7508
7522
|
),
|
|
7509
|
-
|
|
7523
|
+
g.renderBadge
|
|
7510
7524
|
]
|
|
7511
7525
|
}
|
|
7512
7526
|
) : /* @__PURE__ */ e(
|
|
7513
7527
|
Ft,
|
|
7514
7528
|
{
|
|
7515
|
-
name:
|
|
7516
|
-
value:
|
|
7517
|
-
checked:
|
|
7518
|
-
onChange: (x) => l.onChecked(x.target.value,
|
|
7519
|
-
label:
|
|
7520
|
-
description:
|
|
7529
|
+
name: g.name,
|
|
7530
|
+
value: g.id,
|
|
7531
|
+
checked: g.isChecked,
|
|
7532
|
+
onChange: (x) => l.onChecked(x.target.value, g),
|
|
7533
|
+
label: g.name,
|
|
7534
|
+
description: g.description
|
|
7521
7535
|
}
|
|
7522
7536
|
)
|
|
7523
7537
|
}
|
|
@@ -7537,25 +7551,25 @@ const Vo = (t) => {
|
|
|
7537
7551
|
var l;
|
|
7538
7552
|
const i = t === "horizontal-inline" || t === "horizontal-block" ? r === "sm" ? 342 : r === "lg" ? 400 : 342 : void 0;
|
|
7539
7553
|
return /* @__PURE__ */ u(
|
|
7540
|
-
|
|
7554
|
+
f,
|
|
7541
7555
|
{
|
|
7542
7556
|
gap: t === "horizontal-inline" || t === "horizontal-block" ? "spacing-96" : "sm",
|
|
7543
7557
|
direction: t === "horizontal-inline" || t === "horizontal-block" ? "row" : "column",
|
|
7544
7558
|
children: [
|
|
7545
7559
|
/* @__PURE__ */ e(oe, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ u(
|
|
7546
|
-
|
|
7560
|
+
f,
|
|
7547
7561
|
{
|
|
7548
7562
|
direction: "column",
|
|
7549
7563
|
customMaxWidth: i,
|
|
7550
7564
|
fullWidth: n,
|
|
7551
7565
|
children: [
|
|
7552
|
-
o.title && /* @__PURE__ */ e(
|
|
7566
|
+
o.title && /* @__PURE__ */ e(se, { children: o.title }),
|
|
7553
7567
|
/* @__PURE__ */ e(oe, { condition: !!o.description, children: /* @__PURE__ */ e(D, { color: "gray-500", children: o.description }) })
|
|
7554
7568
|
]
|
|
7555
7569
|
}
|
|
7556
7570
|
) }),
|
|
7557
7571
|
/* @__PURE__ */ e(
|
|
7558
|
-
|
|
7572
|
+
f,
|
|
7559
7573
|
{
|
|
7560
7574
|
gap: "sm",
|
|
7561
7575
|
direction: t === "horizontal" || t === "horizontal-inline" ? "row" : "column",
|
|
@@ -7568,35 +7582,35 @@ const Vo = (t) => {
|
|
|
7568
7582
|
...s,
|
|
7569
7583
|
isChecked: o.radioIsChecked === s.id
|
|
7570
7584
|
})),
|
|
7571
|
-
render: ({ value: s, id: c, isChecked:
|
|
7585
|
+
render: ({ value: s, id: c, isChecked: d, subInput: a, label: m, description: p }) => /* @__PURE__ */ u(f, { direction: "column", gap: "xs", customMaxWidth: i, children: [
|
|
7572
7586
|
/* @__PURE__ */ e(
|
|
7573
7587
|
In,
|
|
7574
7588
|
{
|
|
7575
7589
|
id: `${c.toString()}-${s}`,
|
|
7576
|
-
name: o.groupName ||
|
|
7577
|
-
label:
|
|
7590
|
+
name: o.groupName || m,
|
|
7591
|
+
label: m,
|
|
7578
7592
|
value: s,
|
|
7579
|
-
checked:
|
|
7580
|
-
onChange: (
|
|
7593
|
+
checked: d,
|
|
7594
|
+
onChange: (g) => o.onChecked({
|
|
7581
7595
|
id: c,
|
|
7582
|
-
label:
|
|
7583
|
-
value:
|
|
7596
|
+
label: g.target.name,
|
|
7597
|
+
value: g.target.value
|
|
7584
7598
|
}),
|
|
7585
7599
|
disabled: o.disableAll
|
|
7586
7600
|
},
|
|
7587
7601
|
c
|
|
7588
7602
|
),
|
|
7589
|
-
|
|
7603
|
+
p && /* @__PURE__ */ e(
|
|
7590
7604
|
D,
|
|
7591
7605
|
{
|
|
7592
7606
|
color: "gray-500",
|
|
7593
7607
|
style: {
|
|
7594
7608
|
marginLeft: 28
|
|
7595
7609
|
},
|
|
7596
|
-
children:
|
|
7610
|
+
children: p
|
|
7597
7611
|
}
|
|
7598
7612
|
),
|
|
7599
|
-
|
|
7613
|
+
a
|
|
7600
7614
|
] })
|
|
7601
7615
|
}
|
|
7602
7616
|
)
|
|
@@ -7613,10 +7627,10 @@ const Vo = (t) => {
|
|
|
7613
7627
|
fullWidth: o = !1,
|
|
7614
7628
|
...i
|
|
7615
7629
|
}) => {
|
|
7616
|
-
var c,
|
|
7630
|
+
var c, d, a;
|
|
7617
7631
|
const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
7618
7632
|
return /* @__PURE__ */ u(
|
|
7619
|
-
|
|
7633
|
+
f,
|
|
7620
7634
|
{
|
|
7621
7635
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
7622
7636
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -7627,32 +7641,32 @@ const Vo = (t) => {
|
|
|
7627
7641
|
{
|
|
7628
7642
|
condition: !!i.inputProps.required,
|
|
7629
7643
|
fallback: /* @__PURE__ */ u(
|
|
7630
|
-
|
|
7644
|
+
f,
|
|
7631
7645
|
{
|
|
7632
7646
|
direction: "column",
|
|
7633
7647
|
customMaxWidth: s,
|
|
7634
7648
|
fullWidth: o,
|
|
7635
7649
|
children: [
|
|
7636
|
-
/* @__PURE__ */ e(
|
|
7650
|
+
/* @__PURE__ */ e(se, { children: i.title }),
|
|
7637
7651
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
|
|
7638
7652
|
]
|
|
7639
7653
|
}
|
|
7640
7654
|
),
|
|
7641
7655
|
children: /* @__PURE__ */ u(
|
|
7642
|
-
|
|
7656
|
+
f,
|
|
7643
7657
|
{
|
|
7644
7658
|
direction: "column",
|
|
7645
7659
|
customMaxWidth: s,
|
|
7646
7660
|
fullWidth: o,
|
|
7647
7661
|
children: [
|
|
7648
7662
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
7649
|
-
/* @__PURE__ */ e(
|
|
7650
|
-
/* @__PURE__ */ e(
|
|
7663
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
|
|
7664
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
7651
7665
|
/* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7652
7666
|
Me,
|
|
7653
7667
|
{
|
|
7654
|
-
label: (
|
|
7655
|
-
arrowPosition: (
|
|
7668
|
+
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
7669
|
+
arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
|
|
7656
7670
|
...i.tooltip,
|
|
7657
7671
|
children: /* @__PURE__ */ e(
|
|
7658
7672
|
F,
|
|
@@ -7697,10 +7711,10 @@ const Vo = (t) => {
|
|
|
7697
7711
|
fullWidth: i = !1,
|
|
7698
7712
|
...l
|
|
7699
7713
|
}) => {
|
|
7700
|
-
var c,
|
|
7714
|
+
var c, d, a;
|
|
7701
7715
|
const s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
7702
7716
|
return /* @__PURE__ */ u(
|
|
7703
|
-
|
|
7717
|
+
f,
|
|
7704
7718
|
{
|
|
7705
7719
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
7706
7720
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -7711,32 +7725,32 @@ const Vo = (t) => {
|
|
|
7711
7725
|
{
|
|
7712
7726
|
condition: o,
|
|
7713
7727
|
fallback: /* @__PURE__ */ u(
|
|
7714
|
-
|
|
7728
|
+
f,
|
|
7715
7729
|
{
|
|
7716
7730
|
direction: "column",
|
|
7717
7731
|
customMaxWidth: s,
|
|
7718
7732
|
fullWidth: i,
|
|
7719
7733
|
children: [
|
|
7720
|
-
/* @__PURE__ */ e(
|
|
7734
|
+
/* @__PURE__ */ e(se, { children: l.title }),
|
|
7721
7735
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: l.titleDescription })
|
|
7722
7736
|
]
|
|
7723
7737
|
}
|
|
7724
7738
|
),
|
|
7725
7739
|
children: /* @__PURE__ */ u(
|
|
7726
|
-
|
|
7740
|
+
f,
|
|
7727
7741
|
{
|
|
7728
7742
|
direction: "column",
|
|
7729
7743
|
customMaxWidth: s,
|
|
7730
7744
|
fullWidth: i,
|
|
7731
7745
|
children: [
|
|
7732
7746
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
7733
|
-
/* @__PURE__ */ e(
|
|
7734
|
-
/* @__PURE__ */ e(
|
|
7747
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: l.title }),
|
|
7748
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
7735
7749
|
/* @__PURE__ */ e(oe, { condition: !!((c = l.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7736
7750
|
Me,
|
|
7737
7751
|
{
|
|
7738
|
-
label: (
|
|
7739
|
-
arrowPosition: (
|
|
7752
|
+
label: (d = l.tooltip) == null ? void 0 : d.label,
|
|
7753
|
+
arrowPosition: (a = l.tooltip) == null ? void 0 : a.arrowPosition,
|
|
7740
7754
|
...l.tooltip,
|
|
7741
7755
|
children: /* @__PURE__ */ e(
|
|
7742
7756
|
F,
|
|
@@ -7777,16 +7791,16 @@ const Vo = (t) => {
|
|
|
7777
7791
|
...n
|
|
7778
7792
|
}) => {
|
|
7779
7793
|
const o = An(), i = (s) => {
|
|
7780
|
-
var a,
|
|
7794
|
+
var d, a, m, p, g, x;
|
|
7781
7795
|
if (!s) return;
|
|
7782
|
-
const c = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (
|
|
7796
|
+
const c = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (a = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.red) == null ? void 0 : a[600] : t === "secondary-primary" ? (p = (m = o == null ? void 0 : o.computed) == null ? void 0 : m.blue) == null ? void 0 : p[700] : (x = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.gray) == null ? void 0 : x[50];
|
|
7783
7797
|
return /* @__PURE__ */ e(F, { name: s, size: r, style: { color: c } });
|
|
7784
7798
|
}, l = () => {
|
|
7785
|
-
var c,
|
|
7799
|
+
var c, d, a, m;
|
|
7786
7800
|
if (t !== "secondary-danger" && t !== "secondary-primary")
|
|
7787
7801
|
return n.title;
|
|
7788
7802
|
const s = {
|
|
7789
|
-
color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (
|
|
7803
|
+
color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (d = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : d[600] : (m = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.blue) == null ? void 0 : m[700]
|
|
7790
7804
|
};
|
|
7791
7805
|
switch (r) {
|
|
7792
7806
|
case "xs":
|
|
@@ -7831,10 +7845,10 @@ const Vo = (t) => {
|
|
|
7831
7845
|
fullWidth: o = !1,
|
|
7832
7846
|
...i
|
|
7833
7847
|
}) => {
|
|
7834
|
-
var c,
|
|
7848
|
+
var c, d, a;
|
|
7835
7849
|
const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
7836
7850
|
return /* @__PURE__ */ u(
|
|
7837
|
-
|
|
7851
|
+
f,
|
|
7838
7852
|
{
|
|
7839
7853
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
7840
7854
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -7845,32 +7859,32 @@ const Vo = (t) => {
|
|
|
7845
7859
|
{
|
|
7846
7860
|
condition: !!i.inputProps.required,
|
|
7847
7861
|
fallback: /* @__PURE__ */ u(
|
|
7848
|
-
|
|
7862
|
+
f,
|
|
7849
7863
|
{
|
|
7850
7864
|
direction: "column",
|
|
7851
7865
|
customMaxWidth: s,
|
|
7852
7866
|
fullWidth: o,
|
|
7853
7867
|
children: [
|
|
7854
|
-
/* @__PURE__ */ e(
|
|
7868
|
+
/* @__PURE__ */ e(se, { children: i.title }),
|
|
7855
7869
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
|
|
7856
7870
|
]
|
|
7857
7871
|
}
|
|
7858
7872
|
),
|
|
7859
7873
|
children: /* @__PURE__ */ u(
|
|
7860
|
-
|
|
7874
|
+
f,
|
|
7861
7875
|
{
|
|
7862
7876
|
direction: "column",
|
|
7863
7877
|
customMaxWidth: s,
|
|
7864
7878
|
fullWidth: o,
|
|
7865
7879
|
children: [
|
|
7866
7880
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
7867
|
-
/* @__PURE__ */ e(
|
|
7868
|
-
/* @__PURE__ */ e(
|
|
7881
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
|
|
7882
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
7869
7883
|
/* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7870
7884
|
Me,
|
|
7871
7885
|
{
|
|
7872
|
-
label: (
|
|
7873
|
-
arrowPosition: (
|
|
7886
|
+
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
7887
|
+
arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
|
|
7874
7888
|
...i.tooltip,
|
|
7875
7889
|
children: /* @__PURE__ */ e(
|
|
7876
7890
|
F,
|
|
@@ -7894,7 +7908,7 @@ const Vo = (t) => {
|
|
|
7894
7908
|
),
|
|
7895
7909
|
/* @__PURE__ */ u(le, { direction: "column", gap: "xs", children: [
|
|
7896
7910
|
/* @__PURE__ */ e(
|
|
7897
|
-
|
|
7911
|
+
f,
|
|
7898
7912
|
{
|
|
7899
7913
|
direction: "column",
|
|
7900
7914
|
style: {
|
|
@@ -7938,8 +7952,8 @@ async function Go(t, r) {
|
|
|
7938
7952
|
), new Promise((l, s) => {
|
|
7939
7953
|
o.toBlob((c) => {
|
|
7940
7954
|
if (!c) return s("Canvas is empty");
|
|
7941
|
-
const
|
|
7942
|
-
l(
|
|
7955
|
+
const d = new File([c], "cropped.png", { type: "image/png" });
|
|
7956
|
+
l(d);
|
|
7943
7957
|
}, "image/png");
|
|
7944
7958
|
});
|
|
7945
7959
|
}
|
|
@@ -7962,10 +7976,10 @@ const Jr = {
|
|
|
7962
7976
|
size: l = "96",
|
|
7963
7977
|
aspect: s = "1:1",
|
|
7964
7978
|
containerProps: c,
|
|
7965
|
-
maxFileSize:
|
|
7966
|
-
onError:
|
|
7967
|
-
},
|
|
7968
|
-
const
|
|
7979
|
+
maxFileSize: d = 2,
|
|
7980
|
+
onError: a
|
|
7981
|
+
}, m) => {
|
|
7982
|
+
const p = ke("md"), [g, x] = R(!1), [W, y] = R(null), [k, E] = R(!1), [w, V] = R({ x: 0, y: 0 }), [v, A] = R(1), [z, C] = R(null);
|
|
7969
7983
|
U(() => {
|
|
7970
7984
|
r === null && i(null);
|
|
7971
7985
|
}, [r]);
|
|
@@ -7986,20 +8000,20 @@ const Jr = {
|
|
|
7986
8000
|
if (!(!W || !z))
|
|
7987
8001
|
try {
|
|
7988
8002
|
const ee = await Go(W, z);
|
|
7989
|
-
if (
|
|
7990
|
-
|
|
8003
|
+
if (d && ee.size > d * 1024 * 1024) {
|
|
8004
|
+
a == null || a(`Ukuran file maksimal ${d}MB`);
|
|
7991
8005
|
return;
|
|
7992
8006
|
}
|
|
7993
8007
|
t == null || t(ee);
|
|
7994
8008
|
const O = URL.createObjectURL(ee);
|
|
7995
8009
|
i(O, ee), E(!1);
|
|
7996
8010
|
} catch {
|
|
7997
|
-
|
|
8011
|
+
a == null || a("Gagal memproses gambar");
|
|
7998
8012
|
}
|
|
7999
|
-
}, _ =
|
|
8013
|
+
}, _ = ce(null), X = () => {
|
|
8000
8014
|
_.current && _.current.click();
|
|
8001
8015
|
};
|
|
8002
|
-
Vn(
|
|
8016
|
+
Vn(m, () => ({
|
|
8003
8017
|
openFileDialog: () => {
|
|
8004
8018
|
var ee;
|
|
8005
8019
|
(ee = _.current) == null || ee.click();
|
|
@@ -8008,7 +8022,7 @@ const Jr = {
|
|
|
8008
8022
|
const te = parseInt(l, 10), me = Jr[s];
|
|
8009
8023
|
let ae, de;
|
|
8010
8024
|
return me >= 1 ? (de = te, ae = te * me) : (ae = te, de = te / me), /* @__PURE__ */ u(
|
|
8011
|
-
|
|
8025
|
+
f,
|
|
8012
8026
|
{
|
|
8013
8027
|
direction: "column",
|
|
8014
8028
|
display: "flex",
|
|
@@ -8042,7 +8056,7 @@ const Jr = {
|
|
|
8042
8056
|
}
|
|
8043
8057
|
}
|
|
8044
8058
|
) : /* @__PURE__ */ e(
|
|
8045
|
-
|
|
8059
|
+
f,
|
|
8046
8060
|
{
|
|
8047
8061
|
display: "flex",
|
|
8048
8062
|
direction: "column",
|
|
@@ -8063,7 +8077,7 @@ const Jr = {
|
|
|
8063
8077
|
}
|
|
8064
8078
|
),
|
|
8065
8079
|
/* @__PURE__ */ u(
|
|
8066
|
-
|
|
8080
|
+
f,
|
|
8067
8081
|
{
|
|
8068
8082
|
direction: "column",
|
|
8069
8083
|
position: "absolute",
|
|
@@ -8074,7 +8088,7 @@ const Jr = {
|
|
|
8074
8088
|
style: {
|
|
8075
8089
|
inset: 0,
|
|
8076
8090
|
backgroundColor: "var(--sa-color-black-alpha-a30, #080f214a)",
|
|
8077
|
-
opacity:
|
|
8091
|
+
opacity: g ? 1 : 0,
|
|
8078
8092
|
transition: "opacity 0.3s ease-in-out"
|
|
8079
8093
|
},
|
|
8080
8094
|
onClick: X,
|
|
@@ -8090,7 +8104,7 @@ const Jr = {
|
|
|
8090
8104
|
style: { display: "none" }
|
|
8091
8105
|
}
|
|
8092
8106
|
),
|
|
8093
|
-
/* @__PURE__ */ u(
|
|
8107
|
+
/* @__PURE__ */ u(f, { display: "flex", align: "center", gap: "spacing-2", direction: "row", children: [
|
|
8094
8108
|
/* @__PURE__ */ e(
|
|
8095
8109
|
F,
|
|
8096
8110
|
{
|
|
@@ -8112,7 +8126,7 @@ const Jr = {
|
|
|
8112
8126
|
}
|
|
8113
8127
|
),
|
|
8114
8128
|
n && /* @__PURE__ */ e(
|
|
8115
|
-
|
|
8129
|
+
f,
|
|
8116
8130
|
{
|
|
8117
8131
|
direction: "column",
|
|
8118
8132
|
position: "absolute",
|
|
@@ -8125,7 +8139,7 @@ const Jr = {
|
|
|
8125
8139
|
backgroundColor: "var(--sa-color-white-alpha-a80, #e5e9f640)"
|
|
8126
8140
|
},
|
|
8127
8141
|
children: /* @__PURE__ */ e(
|
|
8128
|
-
|
|
8142
|
+
f,
|
|
8129
8143
|
{
|
|
8130
8144
|
direction: "column",
|
|
8131
8145
|
borderRadius: "rounded-full",
|
|
@@ -8162,7 +8176,7 @@ const Jr = {
|
|
|
8162
8176
|
borderRadius: "var(--sa-radii-md)",
|
|
8163
8177
|
boxShadow: "0 20px 60px rgba(0,0,0,0.3)",
|
|
8164
8178
|
overflow: "hidden",
|
|
8165
|
-
width:
|
|
8179
|
+
width: p ? s === "1:1" ? "min(90vw, 480px)" : `min(90vw, ${ae * 2}px)` : "calc(100vw - 2rem)",
|
|
8166
8180
|
display: "flex",
|
|
8167
8181
|
flexDirection: "column"
|
|
8168
8182
|
},
|
|
@@ -8229,10 +8243,10 @@ const Jr = {
|
|
|
8229
8243
|
required: i = !1,
|
|
8230
8244
|
...l
|
|
8231
8245
|
}) => {
|
|
8232
|
-
var
|
|
8246
|
+
var d, a, m;
|
|
8233
8247
|
const s = l.hideMessageError || !1, c = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
8234
8248
|
return /* @__PURE__ */ u(
|
|
8235
|
-
|
|
8249
|
+
f,
|
|
8236
8250
|
{
|
|
8237
8251
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
8238
8252
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -8243,32 +8257,32 @@ const Jr = {
|
|
|
8243
8257
|
{
|
|
8244
8258
|
condition: !!i,
|
|
8245
8259
|
fallback: /* @__PURE__ */ u(
|
|
8246
|
-
|
|
8260
|
+
f,
|
|
8247
8261
|
{
|
|
8248
8262
|
direction: "column",
|
|
8249
8263
|
customMaxWidth: c,
|
|
8250
8264
|
fullWidth: o,
|
|
8251
8265
|
children: [
|
|
8252
|
-
/* @__PURE__ */ e(
|
|
8266
|
+
/* @__PURE__ */ e(se, { children: l.title }),
|
|
8253
8267
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: l.description })
|
|
8254
8268
|
]
|
|
8255
8269
|
}
|
|
8256
8270
|
),
|
|
8257
8271
|
children: /* @__PURE__ */ u(
|
|
8258
|
-
|
|
8272
|
+
f,
|
|
8259
8273
|
{
|
|
8260
8274
|
direction: "column",
|
|
8261
8275
|
customMaxWidth: c,
|
|
8262
8276
|
fullWidth: o,
|
|
8263
8277
|
children: [
|
|
8264
8278
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
8265
|
-
/* @__PURE__ */ e(
|
|
8266
|
-
/* @__PURE__ */ e(
|
|
8267
|
-
/* @__PURE__ */ e(oe, { condition: !!((
|
|
8279
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: l.title }),
|
|
8280
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
8281
|
+
/* @__PURE__ */ e(oe, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
|
|
8268
8282
|
Me,
|
|
8269
8283
|
{
|
|
8270
|
-
label: (
|
|
8271
|
-
arrowPosition: (
|
|
8284
|
+
label: (a = l.tooltip) == null ? void 0 : a.label,
|
|
8285
|
+
arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
|
|
8272
8286
|
...l.tooltip,
|
|
8273
8287
|
children: /* @__PURE__ */ e(
|
|
8274
8288
|
F,
|
|
@@ -8304,10 +8318,10 @@ const Jr = {
|
|
|
8304
8318
|
fullWidth: o = !1,
|
|
8305
8319
|
...i
|
|
8306
8320
|
}) => {
|
|
8307
|
-
var s, c,
|
|
8321
|
+
var s, c, d;
|
|
8308
8322
|
const l = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
8309
8323
|
return /* @__PURE__ */ u(
|
|
8310
|
-
|
|
8324
|
+
f,
|
|
8311
8325
|
{
|
|
8312
8326
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
8313
8327
|
direction: r === "horizontal" ? "row" : "column",
|
|
@@ -8318,32 +8332,32 @@ const Jr = {
|
|
|
8318
8332
|
{
|
|
8319
8333
|
condition: !!i.inputProps.required,
|
|
8320
8334
|
fallback: /* @__PURE__ */ u(
|
|
8321
|
-
|
|
8335
|
+
f,
|
|
8322
8336
|
{
|
|
8323
8337
|
direction: "column",
|
|
8324
8338
|
customMaxWidth: l,
|
|
8325
8339
|
fullWidth: o,
|
|
8326
8340
|
children: [
|
|
8327
|
-
/* @__PURE__ */ e(
|
|
8341
|
+
/* @__PURE__ */ e(se, { children: i.title }),
|
|
8328
8342
|
/* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
|
|
8329
8343
|
]
|
|
8330
8344
|
}
|
|
8331
8345
|
),
|
|
8332
8346
|
children: /* @__PURE__ */ u(
|
|
8333
|
-
|
|
8347
|
+
f,
|
|
8334
8348
|
{
|
|
8335
8349
|
direction: "column",
|
|
8336
8350
|
customMaxWidth: l,
|
|
8337
8351
|
fullWidth: o,
|
|
8338
8352
|
children: [
|
|
8339
8353
|
/* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
|
|
8340
|
-
/* @__PURE__ */ e(
|
|
8341
|
-
/* @__PURE__ */ e(
|
|
8354
|
+
/* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
|
|
8355
|
+
/* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
|
|
8342
8356
|
/* @__PURE__ */ e(oe, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
|
|
8343
8357
|
Me,
|
|
8344
8358
|
{
|
|
8345
8359
|
label: (c = i.tooltip) == null ? void 0 : c.label,
|
|
8346
|
-
arrowPosition: (
|
|
8360
|
+
arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
|
|
8347
8361
|
...i.tooltip,
|
|
8348
8362
|
children: /* @__PURE__ */ e(
|
|
8349
8363
|
F,
|
|
@@ -8377,18 +8391,18 @@ const Jr = {
|
|
|
8377
8391
|
toggleShow: i = !0,
|
|
8378
8392
|
disabled: l = !1
|
|
8379
8393
|
}) => {
|
|
8380
|
-
var
|
|
8394
|
+
var m;
|
|
8381
8395
|
const [s, c] = R([]);
|
|
8382
8396
|
U(() => {
|
|
8383
|
-
t && c([...t.map((
|
|
8397
|
+
t && c([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
|
|
8384
8398
|
}, [t]);
|
|
8385
|
-
const
|
|
8399
|
+
const d = (m = s.find((p) => p.id === r)) == null ? void 0 : m.isActive, a = Q(() => {
|
|
8386
8400
|
c(
|
|
8387
|
-
(
|
|
8388
|
-
), n && n(!
|
|
8389
|
-
}, [r, n,
|
|
8401
|
+
(p) => p.map((g) => g.id === r ? { ...g, isActive: !g.isActive } : g)
|
|
8402
|
+
), n && n(!d);
|
|
8403
|
+
}, [r, n, d]);
|
|
8390
8404
|
return /* @__PURE__ */ e(
|
|
8391
|
-
|
|
8405
|
+
f,
|
|
8392
8406
|
{
|
|
8393
8407
|
direction: "row",
|
|
8394
8408
|
gap: "md",
|
|
@@ -8399,9 +8413,9 @@ const Jr = {
|
|
|
8399
8413
|
At,
|
|
8400
8414
|
{
|
|
8401
8415
|
disabled: l,
|
|
8402
|
-
checked:
|
|
8403
|
-
onChange:
|
|
8404
|
-
label:
|
|
8416
|
+
checked: d,
|
|
8417
|
+
onChange: a,
|
|
8418
|
+
label: d ? "Active" : "Inactive"
|
|
8405
8419
|
}
|
|
8406
8420
|
)
|
|
8407
8421
|
}
|
|
@@ -8428,7 +8442,7 @@ const Jr = {
|
|
|
8428
8442
|
return U(() => (window.addEventListener("scroll", o), () => {
|
|
8429
8443
|
window.removeEventListener("scroll", o);
|
|
8430
8444
|
}), []), /* @__PURE__ */ e(
|
|
8431
|
-
|
|
8445
|
+
f,
|
|
8432
8446
|
{
|
|
8433
8447
|
direction: "column",
|
|
8434
8448
|
style: {
|
|
@@ -8437,7 +8451,7 @@ const Jr = {
|
|
|
8437
8451
|
right: 0
|
|
8438
8452
|
},
|
|
8439
8453
|
children: /* @__PURE__ */ e(
|
|
8440
|
-
|
|
8454
|
+
f,
|
|
8441
8455
|
{
|
|
8442
8456
|
direction: "column",
|
|
8443
8457
|
position: "absolute",
|
|
@@ -8474,7 +8488,7 @@ const Jr = {
|
|
|
8474
8488
|
}, kc = ({ pageLayout: t, children: r, wrapperProps: n, containerProps: o }) => {
|
|
8475
8489
|
const i = ke("md"), l = (o == null ? void 0 : o.customWidth) ?? 264;
|
|
8476
8490
|
return /* @__PURE__ */ u(
|
|
8477
|
-
|
|
8491
|
+
f,
|
|
8478
8492
|
{
|
|
8479
8493
|
display: "block",
|
|
8480
8494
|
direction: "row",
|
|
@@ -8486,7 +8500,7 @@ const Jr = {
|
|
|
8486
8500
|
children: [
|
|
8487
8501
|
t,
|
|
8488
8502
|
/* @__PURE__ */ e(
|
|
8489
|
-
|
|
8503
|
+
f,
|
|
8490
8504
|
{
|
|
8491
8505
|
direction: "column",
|
|
8492
8506
|
show: "desktop",
|
|
@@ -8516,8 +8530,8 @@ const Jr = {
|
|
|
8516
8530
|
withScrollToTopButton: r = !1,
|
|
8517
8531
|
scrollToTopButtonProps: n,
|
|
8518
8532
|
containerProps: o
|
|
8519
|
-
}) => /* @__PURE__ */ e(
|
|
8520
|
-
|
|
8533
|
+
}) => /* @__PURE__ */ e(f, { direction: "column", position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 999)" }, children: /* @__PURE__ */ u(
|
|
8534
|
+
f,
|
|
8521
8535
|
{
|
|
8522
8536
|
position: "fixed",
|
|
8523
8537
|
bottom: "bottom-0",
|
|
@@ -8547,14 +8561,14 @@ const Jr = {
|
|
|
8547
8561
|
t
|
|
8548
8562
|
]
|
|
8549
8563
|
}
|
|
8550
|
-
) }), Fc = ({ fields: t }) => /* @__PURE__ */ e(
|
|
8564
|
+
) }), Fc = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
|
|
8551
8565
|
xr,
|
|
8552
8566
|
{
|
|
8553
8567
|
of: t,
|
|
8554
8568
|
render: (r, n) => /* @__PURE__ */ e(Yo, { ...r }, n)
|
|
8555
8569
|
}
|
|
8556
|
-
) }), Yo = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ u(
|
|
8557
|
-
n ? /* @__PURE__ */ u(
|
|
8570
|
+
) }), Yo = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ u(f, { display: "flex", direction: "column", gap: "sm", children: [
|
|
8571
|
+
n ? /* @__PURE__ */ u(f, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
|
|
8558
8572
|
/* @__PURE__ */ e(F, { name: n, color: "subtle" }),
|
|
8559
8573
|
/* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t })
|
|
8560
8574
|
] }) : /* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t }),
|
|
@@ -8715,13 +8729,13 @@ const Ec = ({
|
|
|
8715
8729
|
leftIcon: l,
|
|
8716
8730
|
showButton: s = !0,
|
|
8717
8731
|
customHeight: c,
|
|
8718
|
-
childrenButton:
|
|
8719
|
-
customIcon:
|
|
8732
|
+
childrenButton: d,
|
|
8733
|
+
customIcon: a
|
|
8720
8734
|
}) => {
|
|
8721
|
-
const
|
|
8735
|
+
const m = () => {
|
|
8722
8736
|
switch (o) {
|
|
8723
8737
|
case "primary":
|
|
8724
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children:
|
|
8738
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: d || t }) });
|
|
8725
8739
|
case "secondary":
|
|
8726
8740
|
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { secondary: !0, iconLeft: l, onClick: n, children: i ? /* @__PURE__ */ e(
|
|
8727
8741
|
D,
|
|
@@ -8730,17 +8744,17 @@ const Ec = ({
|
|
|
8730
8744
|
fontSize: "md",
|
|
8731
8745
|
fontWeight: "medium",
|
|
8732
8746
|
style: { color: "var(--sa-background-success, #28ac6e)" },
|
|
8733
|
-
children:
|
|
8747
|
+
children: d || t
|
|
8734
8748
|
}
|
|
8735
|
-
) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: n, children:
|
|
8749
|
+
) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: n, children: d || t }) });
|
|
8736
8750
|
case "success":
|
|
8737
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: n, children:
|
|
8751
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { success: !0, onClick: n, children: d || t }) });
|
|
8738
8752
|
default:
|
|
8739
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children:
|
|
8753
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: d || t }) });
|
|
8740
8754
|
}
|
|
8741
8755
|
};
|
|
8742
8756
|
return /* @__PURE__ */ u(
|
|
8743
|
-
|
|
8757
|
+
f,
|
|
8744
8758
|
{
|
|
8745
8759
|
height: "height-full",
|
|
8746
8760
|
display: "flex",
|
|
@@ -8751,19 +8765,19 @@ const Ec = ({
|
|
|
8751
8765
|
marginBlock: "auto",
|
|
8752
8766
|
customHeight: c,
|
|
8753
8767
|
children: [
|
|
8754
|
-
|
|
8755
|
-
/* @__PURE__ */ e(
|
|
8768
|
+
a || /* @__PURE__ */ e(Xo, {}),
|
|
8769
|
+
/* @__PURE__ */ e(f, { direction: "column", children: r.map((p, g) => /* @__PURE__ */ e(
|
|
8756
8770
|
Ge.Body1,
|
|
8757
8771
|
{
|
|
8758
8772
|
props: {
|
|
8759
8773
|
align: "center",
|
|
8760
8774
|
textAlign: "center"
|
|
8761
8775
|
},
|
|
8762
|
-
children:
|
|
8776
|
+
children: g > 2 ? null : p
|
|
8763
8777
|
},
|
|
8764
|
-
|
|
8778
|
+
g
|
|
8765
8779
|
)) }),
|
|
8766
|
-
s ?
|
|
8780
|
+
s ? m() : null
|
|
8767
8781
|
]
|
|
8768
8782
|
}
|
|
8769
8783
|
);
|
|
@@ -8983,7 +8997,7 @@ function Ko({ width: t, height: r }) {
|
|
|
8983
8997
|
function Lc({ onClick: t }) {
|
|
8984
8998
|
const r = ke("md");
|
|
8985
8999
|
return /* @__PURE__ */ u(
|
|
8986
|
-
|
|
9000
|
+
f,
|
|
8987
9001
|
{
|
|
8988
9002
|
direction: "column",
|
|
8989
9003
|
height: "height-screen",
|
|
@@ -9256,7 +9270,7 @@ function el({ width: t, height: r }) {
|
|
|
9256
9270
|
function Mc({ onClick: t }) {
|
|
9257
9271
|
const r = ke("md");
|
|
9258
9272
|
return /* @__PURE__ */ u(
|
|
9259
|
-
|
|
9273
|
+
f,
|
|
9260
9274
|
{
|
|
9261
9275
|
direction: "column",
|
|
9262
9276
|
height: "height-screen",
|
|
@@ -9965,7 +9979,7 @@ function tl({ width: t, height: r }) {
|
|
|
9965
9979
|
function Wc({ onClick: t }) {
|
|
9966
9980
|
const r = ke("md");
|
|
9967
9981
|
return /* @__PURE__ */ u(
|
|
9968
|
-
|
|
9982
|
+
f,
|
|
9969
9983
|
{
|
|
9970
9984
|
direction: "column",
|
|
9971
9985
|
height: "height-screen",
|
|
@@ -10019,14 +10033,14 @@ const Bc = (t) => {
|
|
|
10019
10033
|
/* @__PURE__ */ e(Qr, { ...t.dialogTitleProps, children: typeof t.title == "string" ? /* @__PURE__ */ e(D, { fontSize: "lg", fontWeight: "medium", children: t.title }) : t.title }),
|
|
10020
10034
|
/* @__PURE__ */ e(cr, { children: typeof t.description == "string" ? /* @__PURE__ */ e(D, { fontSize: "md", lineHeight: "leading-6", color: "brand", children: t.description }) : t.description }),
|
|
10021
10035
|
/* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ e(
|
|
10022
|
-
|
|
10036
|
+
f,
|
|
10023
10037
|
{
|
|
10024
10038
|
display: "flex",
|
|
10025
10039
|
direction: ((n = t.containerConfirmBtnProps) == null ? void 0 : n.direction) || "row",
|
|
10026
10040
|
justify: ((o = t.containerConfirmBtnProps) == null ? void 0 : o.justify) || "flex-end",
|
|
10027
10041
|
...t.containerConfirmBtnProps,
|
|
10028
10042
|
children: /* @__PURE__ */ u(
|
|
10029
|
-
|
|
10043
|
+
f,
|
|
10030
10044
|
{
|
|
10031
10045
|
display: "flex",
|
|
10032
10046
|
direction: ((i = t.wrapperConfirmBtnProps) == null ? void 0 : i.direction) || "row",
|
|
@@ -10036,7 +10050,7 @@ const Bc = (t) => {
|
|
|
10036
10050
|
children: [
|
|
10037
10051
|
t.onCancel && /* @__PURE__ */ e(T, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
|
|
10038
10052
|
/* @__PURE__ */ e(
|
|
10039
|
-
|
|
10053
|
+
f,
|
|
10040
10054
|
{
|
|
10041
10055
|
direction: "column",
|
|
10042
10056
|
fullWidth: !0,
|
|
@@ -10074,17 +10088,17 @@ const Bc = (t) => {
|
|
|
10074
10088
|
paddingBlock: l = "spacing-0",
|
|
10075
10089
|
header: s,
|
|
10076
10090
|
footer: c,
|
|
10077
|
-
title:
|
|
10078
|
-
titleTag:
|
|
10079
|
-
action:
|
|
10080
|
-
actionContainer:
|
|
10081
|
-
containerProps:
|
|
10091
|
+
title: d,
|
|
10092
|
+
titleTag: a,
|
|
10093
|
+
action: m,
|
|
10094
|
+
actionContainer: p,
|
|
10095
|
+
containerProps: g,
|
|
10082
10096
|
bodyProps: x,
|
|
10083
10097
|
headerProps: W = { borderBottom: !0 },
|
|
10084
10098
|
footerProps: y = { borderTop: !0 },
|
|
10085
10099
|
variantTag: k = "info"
|
|
10086
10100
|
}) => {
|
|
10087
|
-
const E =
|
|
10101
|
+
const E = ce(null), [w, V] = R("100vh");
|
|
10088
10102
|
U(() => {
|
|
10089
10103
|
const C = () => {
|
|
10090
10104
|
if (E.current) {
|
|
@@ -10094,24 +10108,24 @@ const Bc = (t) => {
|
|
|
10094
10108
|
};
|
|
10095
10109
|
return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
|
|
10096
10110
|
}, []);
|
|
10097
|
-
const v = () =>
|
|
10098
|
-
/* @__PURE__ */ e(D, { fontWeight: "medium", children:
|
|
10099
|
-
/* @__PURE__ */ e(ft, { border: !0, text:
|
|
10100
|
-
] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children:
|
|
10101
|
-
|
|
10111
|
+
const v = () => a ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
10112
|
+
/* @__PURE__ */ e(D, { fontWeight: "medium", children: d }),
|
|
10113
|
+
/* @__PURE__ */ e(ft, { border: !0, text: a, variant: k })
|
|
10114
|
+
] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: d }), A = () => s || /* @__PURE__ */ u(
|
|
10115
|
+
f,
|
|
10102
10116
|
{
|
|
10103
10117
|
direction: "row",
|
|
10104
10118
|
justify: "space-between",
|
|
10105
10119
|
align: "flex-start",
|
|
10106
10120
|
gap: "md",
|
|
10107
10121
|
children: [
|
|
10108
|
-
/* @__PURE__ */ e(
|
|
10109
|
-
/* @__PURE__ */ e(
|
|
10122
|
+
/* @__PURE__ */ e(f, { direction: "column", children: d ? v() : null }),
|
|
10123
|
+
/* @__PURE__ */ e(f, { direction: "column", ...p, children: m ?? null })
|
|
10110
10124
|
]
|
|
10111
10125
|
}
|
|
10112
|
-
), z = !!(s ||
|
|
10126
|
+
), z = !!(s || d || m);
|
|
10113
10127
|
return /* @__PURE__ */ u(
|
|
10114
|
-
|
|
10128
|
+
f,
|
|
10115
10129
|
{
|
|
10116
10130
|
ref: E,
|
|
10117
10131
|
height: r,
|
|
@@ -10121,17 +10135,17 @@ const Bc = (t) => {
|
|
|
10121
10135
|
paddingInline: i,
|
|
10122
10136
|
bg: "white",
|
|
10123
10137
|
direction: "column",
|
|
10124
|
-
...
|
|
10138
|
+
...g,
|
|
10125
10139
|
style: {
|
|
10126
10140
|
backgroundColor: "var(--sa-background-primary, #ffffff)",
|
|
10127
10141
|
display: "flex",
|
|
10128
10142
|
minHeight: w,
|
|
10129
|
-
...(
|
|
10143
|
+
...(g == null ? void 0 : g.style) ?? {}
|
|
10130
10144
|
},
|
|
10131
10145
|
children: [
|
|
10132
10146
|
s !== null && z ? /* @__PURE__ */ e(an, { ...W, children: A() }) : null,
|
|
10133
10147
|
/* @__PURE__ */ e(
|
|
10134
|
-
|
|
10148
|
+
f,
|
|
10135
10149
|
{
|
|
10136
10150
|
direction: "column",
|
|
10137
10151
|
padding: "spacing-0",
|
|
@@ -10152,18 +10166,18 @@ const Bc = (t) => {
|
|
|
10152
10166
|
), Ac = tt.memo(
|
|
10153
10167
|
({ value: t, options: r = [], onChange: n, multiple: o }) => {
|
|
10154
10168
|
const i = (t == null ? void 0 : t.map((c) => c.value)) || [], l = (r == null ? void 0 : r.filter((c) => i.includes(c.value))) || [], s = (c) => {
|
|
10155
|
-
const
|
|
10156
|
-
let
|
|
10157
|
-
o ?
|
|
10169
|
+
const d = [...l];
|
|
10170
|
+
let a = [];
|
|
10171
|
+
o ? a = i.includes(c.value) ? d.filter((m) => m.value !== c.value) : [...d, c] : a = [c], n == null || n(a);
|
|
10158
10172
|
};
|
|
10159
|
-
return /* @__PURE__ */ e(
|
|
10173
|
+
return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((c, d) => /* @__PURE__ */ e(
|
|
10160
10174
|
T,
|
|
10161
10175
|
{
|
|
10162
10176
|
...i.includes(c.value) ? { primary: !0 } : { secondary: !0 },
|
|
10163
10177
|
onClick: () => s(c),
|
|
10164
10178
|
children: c.label
|
|
10165
10179
|
},
|
|
10166
|
-
|
|
10180
|
+
d
|
|
10167
10181
|
)) });
|
|
10168
10182
|
}
|
|
10169
10183
|
);
|
|
@@ -10277,30 +10291,30 @@ function ll(t) {
|
|
|
10277
10291
|
onViewModeChange: l,
|
|
10278
10292
|
showViewModeToggle: s = !0,
|
|
10279
10293
|
showCloseButton: c = !0,
|
|
10280
|
-
size:
|
|
10281
|
-
asideWidth:
|
|
10282
|
-
disableEscapeClose:
|
|
10283
|
-
disableBackdropClose:
|
|
10284
|
-
lockBodyScroll:
|
|
10294
|
+
size: d,
|
|
10295
|
+
asideWidth: a,
|
|
10296
|
+
disableEscapeClose: m = !1,
|
|
10297
|
+
disableBackdropClose: p = !1,
|
|
10298
|
+
lockBodyScroll: g = !0,
|
|
10285
10299
|
children: x
|
|
10286
10300
|
} = t, [W, y] = R(i), k = o ?? W, w = ke("md") ? k : "fullscreen", V = Q(
|
|
10287
10301
|
(X) => {
|
|
10288
10302
|
o === void 0 && y(X), l == null || l(X);
|
|
10289
10303
|
},
|
|
10290
10304
|
[o, l]
|
|
10291
|
-
), v =
|
|
10305
|
+
), v = ce(null);
|
|
10292
10306
|
U(() => {
|
|
10293
|
-
if (!(!r || !
|
|
10307
|
+
if (!(!r || !g))
|
|
10294
10308
|
return v.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
|
|
10295
10309
|
document.body.style.overflow = v.current ?? "";
|
|
10296
10310
|
};
|
|
10297
|
-
}, [r,
|
|
10298
|
-
if (!r ||
|
|
10311
|
+
}, [r, g]), U(() => {
|
|
10312
|
+
if (!r || m) return;
|
|
10299
10313
|
const X = (te) => {
|
|
10300
10314
|
te.key === "Escape" && n();
|
|
10301
10315
|
};
|
|
10302
10316
|
return window.addEventListener("keydown", X), () => window.removeEventListener("keydown", X);
|
|
10303
|
-
}, [r,
|
|
10317
|
+
}, [r, m, n]);
|
|
10304
10318
|
const A = fe(
|
|
10305
10319
|
() => kt(x, br),
|
|
10306
10320
|
[x]
|
|
@@ -10321,10 +10335,10 @@ function ll(t) {
|
|
|
10321
10335
|
w === "fullscreen" && Fe["lyd-fullscreen"],
|
|
10322
10336
|
w === "sidebar" && Fe["lyd-sidebar"]
|
|
10323
10337
|
].filter(Boolean).join(" "), G = {
|
|
10324
|
-
"--lyd-max-w": ol(
|
|
10325
|
-
...
|
|
10338
|
+
"--lyd-max-w": ol(d),
|
|
10339
|
+
...a !== void 0 && { "--lyd-aside-w": a }
|
|
10326
10340
|
}, _ = () => {
|
|
10327
|
-
|
|
10341
|
+
p || n();
|
|
10328
10342
|
};
|
|
10329
10343
|
return /* @__PURE__ */ u(
|
|
10330
10344
|
"div",
|
|
@@ -10476,10 +10490,10 @@ const Rc = (t) => {
|
|
|
10476
10490
|
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [o, i] = Rt(), l = zt(o.toString());
|
|
10477
10491
|
return {
|
|
10478
10492
|
activeTab: l[n] ? parseInt(l[n]) : r,
|
|
10479
|
-
handleTabChange: (
|
|
10493
|
+
handleTabChange: (d) => {
|
|
10480
10494
|
i({
|
|
10481
10495
|
...l,
|
|
10482
|
-
[n]:
|
|
10496
|
+
[n]: d.toString()
|
|
10483
10497
|
});
|
|
10484
10498
|
},
|
|
10485
10499
|
searchQueries: l
|
|
@@ -10493,16 +10507,16 @@ function Vc({
|
|
|
10493
10507
|
const o = gt();
|
|
10494
10508
|
U(() => {
|
|
10495
10509
|
let i = null, l = null;
|
|
10496
|
-
for (const
|
|
10497
|
-
const
|
|
10498
|
-
if (
|
|
10499
|
-
i =
|
|
10510
|
+
for (const d of r) {
|
|
10511
|
+
const a = d.items.find((m) => m.to ? m.to === "/" ? o.pathname === "/" : !!(m.to === o.pathname || o.pathname.startsWith(m.to + "/")) : !1);
|
|
10512
|
+
if (a) {
|
|
10513
|
+
i = a, l = d;
|
|
10500
10514
|
break;
|
|
10501
10515
|
}
|
|
10502
10516
|
}
|
|
10503
10517
|
const s = [];
|
|
10504
10518
|
i != null && i.title && s.push(i.title), l != null && l.name && s.push(l.name.toTitleCase());
|
|
10505
|
-
const c = (
|
|
10519
|
+
const c = (d, a) => d.length > 0 ? `${d.join(" - ")} | ${a}` : a;
|
|
10506
10520
|
document.title = (n || c)(s, t);
|
|
10507
10521
|
}, [o.pathname]);
|
|
10508
10522
|
}
|
|
@@ -10513,10 +10527,10 @@ const Oc = () => {
|
|
|
10513
10527
|
setSearchParams: r,
|
|
10514
10528
|
searchParams: t,
|
|
10515
10529
|
searchQueries: n,
|
|
10516
|
-
isHasQuery: (
|
|
10517
|
-
getQueryParam: (
|
|
10530
|
+
isHasQuery: (m, p) => t.has(m) && t.get(m) === p,
|
|
10531
|
+
getQueryParam: (m) => t.get(m),
|
|
10518
10532
|
// route params
|
|
10519
|
-
getRouteParam: (
|
|
10533
|
+
getRouteParam: (m) => o[m],
|
|
10520
10534
|
params: o,
|
|
10521
10535
|
// location info
|
|
10522
10536
|
location: i,
|
|
@@ -10529,23 +10543,23 @@ function Hc(t) {
|
|
|
10529
10543
|
var o, i;
|
|
10530
10544
|
const r = t.decodedAccessToken;
|
|
10531
10545
|
return fe(() => {
|
|
10532
|
-
var
|
|
10533
|
-
const l = ((
|
|
10534
|
-
(
|
|
10535
|
-
const
|
|
10536
|
-
return { ...
|
|
10546
|
+
var d, a;
|
|
10547
|
+
const l = ((a = (d = r == null ? void 0 : r.access) == null ? void 0 : d.role) == null ? void 0 : a.code) ?? "", s = Object.keys(t.role).reduce(
|
|
10548
|
+
(m, p) => {
|
|
10549
|
+
const g = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
|
|
10550
|
+
return { ...m, [g]: !1 };
|
|
10537
10551
|
},
|
|
10538
10552
|
{}
|
|
10539
10553
|
);
|
|
10540
10554
|
return {
|
|
10541
|
-
...Object.keys(t.role).reduce((
|
|
10542
|
-
const
|
|
10555
|
+
...Object.keys(t.role).reduce((m, p) => {
|
|
10556
|
+
const g = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
|
|
10543
10557
|
return {
|
|
10544
|
-
...
|
|
10545
|
-
[
|
|
10558
|
+
...m,
|
|
10559
|
+
[g]: l === t.role[p]
|
|
10546
10560
|
};
|
|
10547
10561
|
}, s),
|
|
10548
|
-
hasRole: (
|
|
10562
|
+
hasRole: (m) => l === t.role[m],
|
|
10549
10563
|
getRoleKey: () => l
|
|
10550
10564
|
};
|
|
10551
10565
|
}, [(i = (o = r == null ? void 0 : r.access) == null ? void 0 : o.role) == null ? void 0 : i.code, t]);
|