@starasia/admin 8.6.1 → 8.7.1
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/components/PageLayout/index.d.ts +2 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +576 -564
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Box as f } from "@starasia/box";
|
|
|
5
5
|
export * from "@starasia/box";
|
|
6
6
|
import { Breadcrumb as In, BreadcrumbItem as Lr, BreadcrumbLink as Rn } from "@starasia/breadcrumb";
|
|
7
7
|
export * from "@starasia/breadcrumb";
|
|
8
|
-
import { Button as
|
|
8
|
+
import { Button as O } from "@starasia/button";
|
|
9
9
|
export * from "@starasia/button";
|
|
10
10
|
export * from "@starasia/card";
|
|
11
11
|
import { StarasiaDate as pt } from "@starasia/date";
|
|
@@ -22,13 +22,13 @@ import { searchParamsToObject as Rt } from "@starasia/http";
|
|
|
22
22
|
export * from "@starasia/http";
|
|
23
23
|
import { Input as ht } from "@starasia/input";
|
|
24
24
|
export * from "@starasia/input";
|
|
25
|
-
import { Menu as Be, MenuButton as De, MenuLists as ze, MenuHeading as
|
|
25
|
+
import { Menu as Be, MenuButton as De, MenuLists as ze, MenuHeading as Hn, MenuBody as Ae, MenuFooter as ar, MenuItem as Ne } from "@starasia/menu";
|
|
26
26
|
export * from "@starasia/menu";
|
|
27
27
|
import { Pagination as dr } from "@starasia/pagination";
|
|
28
28
|
export * from "@starasia/pagination";
|
|
29
29
|
import { storage as qt } from "@starasia/storage";
|
|
30
30
|
export * from "@starasia/storage";
|
|
31
|
-
import { Tr as Te, Td as Re, Table as ur, Thead as tn, Th as ut, Tbody as rn, useColumnWidths as
|
|
31
|
+
import { Tr as Te, Td as Re, Table as ur, Thead as tn, Th as ut, Tbody as rn, useColumnWidths as On } from "@starasia/table";
|
|
32
32
|
export * from "@starasia/table";
|
|
33
33
|
export * from "@starasia/tabs";
|
|
34
34
|
import { Textarea as Tn } from "@starasia/textarea";
|
|
@@ -59,8 +59,8 @@ import { Skeleton as Ye } 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 Ke, { createContext as
|
|
63
|
-
import { useSearchParams as
|
|
62
|
+
import Ke, { createContext as Ht, useState as R, useContext as ft, useCallback as Y, useMemo as ge, memo as Je, useEffect as J, useRef as se, useLayoutEffect as lt, forwardRef as hr, isValidElement as ir, Children as _n, useImperativeHandle as Pn } from "react";
|
|
63
|
+
import { useSearchParams as Ot, useNavigate as fr, useLocation as yt, Outlet as Wr, Link as Wt, useParams as nn } from "react-router";
|
|
64
64
|
import Zn, { createPortal as on } from "react-dom";
|
|
65
65
|
import Gn from "react-easy-crop";
|
|
66
66
|
const qn = {
|
|
@@ -71,7 +71,7 @@ const qn = {
|
|
|
71
71
|
userData: null,
|
|
72
72
|
setUserData: () => {
|
|
73
73
|
}
|
|
74
|
-
}, ln =
|
|
74
|
+
}, ln = Ht(qn), cn = () => ft(ln), Un = (t) => {
|
|
75
75
|
const [r, n] = R(
|
|
76
76
|
(t == null ? void 0 : t.initialUserData) || null
|
|
77
77
|
);
|
|
@@ -79,7 +79,7 @@ const qn = {
|
|
|
79
79
|
userData: r,
|
|
80
80
|
setUserData: n
|
|
81
81
|
};
|
|
82
|
-
}, sn =
|
|
82
|
+
}, sn = Ht({
|
|
83
83
|
badges: {},
|
|
84
84
|
setBadge: () => {
|
|
85
85
|
},
|
|
@@ -88,14 +88,14 @@ const qn = {
|
|
|
88
88
|
clearBadge: () => {
|
|
89
89
|
}
|
|
90
90
|
}), Jn = ({ children: t }) => {
|
|
91
|
-
const [r, n] = R({}), o =
|
|
91
|
+
const [r, n] = R({}), o = Y(
|
|
92
92
|
(c) => {
|
|
93
93
|
n(
|
|
94
94
|
(d) => typeof c == "function" ? c(d) : c
|
|
95
95
|
);
|
|
96
96
|
},
|
|
97
97
|
[]
|
|
98
|
-
), i =
|
|
98
|
+
), i = Y(
|
|
99
99
|
(c, d) => {
|
|
100
100
|
n((a) => {
|
|
101
101
|
const m = typeof d == "function" ? d(a[c]) : d;
|
|
@@ -103,7 +103,7 @@ const qn = {
|
|
|
103
103
|
});
|
|
104
104
|
},
|
|
105
105
|
[]
|
|
106
|
-
), l =
|
|
106
|
+
), l = Y((c) => {
|
|
107
107
|
n((d) => {
|
|
108
108
|
if (!(c in d)) return d;
|
|
109
109
|
const a = { ...d };
|
|
@@ -179,9 +179,9 @@ function Xn({
|
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
|
-
const mr =
|
|
182
|
+
const mr = Ht(null);
|
|
183
183
|
function Kn({ children: t }) {
|
|
184
|
-
const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c, d] = R(0), a =
|
|
184
|
+
const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c, d] = R(0), a = Y(() => (d((m) => m + 1), () => d((m) => m - 1)), []);
|
|
185
185
|
return /* @__PURE__ */ e(
|
|
186
186
|
mr.Provider,
|
|
187
187
|
{
|
|
@@ -212,7 +212,7 @@ function ql({
|
|
|
212
212
|
mode: r = "append"
|
|
213
213
|
}) {
|
|
214
214
|
const n = ft(mr);
|
|
215
|
-
if (
|
|
215
|
+
if (J(() => {
|
|
216
216
|
if (!(r !== "replace" || !n))
|
|
217
217
|
return n.registerReplace();
|
|
218
218
|
}, [r, n]), !n)
|
|
@@ -222,11 +222,11 @@ function ql({
|
|
|
222
222
|
const o = r === "prepend" ? n.prependNode : r === "replace" ? n.replaceNode : n.appendNode;
|
|
223
223
|
return o ? on(t, o) : null;
|
|
224
224
|
}
|
|
225
|
-
const gr =
|
|
225
|
+
const gr = Ht(null);
|
|
226
226
|
function ti({ children: t }) {
|
|
227
|
-
const [r, n] = R({}), [o, i] = R({}), l =
|
|
227
|
+
const [r, n] = R({}), [o, i] = R({}), l = Y((d, a) => {
|
|
228
228
|
n((m) => m[d] === a ? m : { ...m, [d]: a });
|
|
229
|
-
}, []), s =
|
|
229
|
+
}, []), s = Y((d) => (i((a) => ({ ...a, [d]: (a[d] ?? 0) + 1 })), () => i((a) => ({
|
|
230
230
|
...a,
|
|
231
231
|
[d]: Math.max(0, (a[d] ?? 0) - 1)
|
|
232
232
|
}))), []), c = ge(
|
|
@@ -238,7 +238,7 @@ function ti({ children: t }) {
|
|
|
238
238
|
function ri({ slotKey: t, fallback: r }) {
|
|
239
239
|
const n = ft(gr), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i = se(n == null ? void 0 : n.setOutletNode);
|
|
240
240
|
i.current = n == null ? void 0 : n.setOutletNode;
|
|
241
|
-
const l =
|
|
241
|
+
const l = Y(
|
|
242
242
|
(s) => {
|
|
243
243
|
var c;
|
|
244
244
|
return (c = i.current) == null ? void 0 : c.call(i, t, s);
|
|
@@ -250,7 +250,7 @@ function ri({ slotKey: t, fallback: r }) {
|
|
|
250
250
|
}
|
|
251
251
|
function Ul({ slotKey: t, children: r }) {
|
|
252
252
|
const n = ft(gr), o = se(n == null ? void 0 : n.registerSlot);
|
|
253
|
-
if (o.current = n == null ? void 0 : n.registerSlot,
|
|
253
|
+
if (o.current = n == null ? void 0 : n.registerSlot, J(() => {
|
|
254
254
|
var l;
|
|
255
255
|
return (l = o.current) == null ? void 0 : l.call(o, t);
|
|
256
256
|
}, [t]), !n)
|
|
@@ -278,7 +278,7 @@ function dn() {
|
|
|
278
278
|
const [t, r] = R(
|
|
279
279
|
() => Br()
|
|
280
280
|
);
|
|
281
|
-
return
|
|
281
|
+
return J(() => {
|
|
282
282
|
const o = () => {
|
|
283
283
|
r(Br());
|
|
284
284
|
}, i = (l) => {
|
|
@@ -342,14 +342,14 @@ function Ql({
|
|
|
342
342
|
logoutButton: g
|
|
343
343
|
}) {
|
|
344
344
|
var Ie, et;
|
|
345
|
-
const [b] =
|
|
345
|
+
const [b] = Ot(), B = b.get("embed") === "true", y = cn(), { badges: k } = Qn(), L = fr(), z = yt(), C = !ke("md"), [V, I] = R(!1), [v, M] = R(!1), [$, N] = R(!1), [P, G] = R(!1), [oe, pe] = R(
|
|
346
346
|
() => new Set(zr)
|
|
347
|
-
), [ne, he] = R(null), { selectedGroupId:
|
|
348
|
-
|
|
349
|
-
zr =
|
|
350
|
-
}, [
|
|
347
|
+
), [ne, he] = R(null), { selectedGroupId: X, setSelectedGroupId: K } = dn();
|
|
348
|
+
J(() => {
|
|
349
|
+
zr = oe;
|
|
350
|
+
}, [oe]);
|
|
351
351
|
const me = se(null), te = se(null);
|
|
352
|
-
|
|
352
|
+
J(() => {
|
|
353
353
|
const S = me.current;
|
|
354
354
|
if (!S) return;
|
|
355
355
|
const Z = () => {
|
|
@@ -377,25 +377,25 @@ function Ql({
|
|
|
377
377
|
);
|
|
378
378
|
S && S.scrollIntoView({ block: "center", behavior: "instant" });
|
|
379
379
|
}));
|
|
380
|
-
}, [y.menus]),
|
|
380
|
+
}, [y.menus]), J(() => {
|
|
381
381
|
ot = !0, de();
|
|
382
|
-
const S = setTimeout(de, 0), Z = setTimeout(de, 50),
|
|
382
|
+
const S = setTimeout(de, 0), Z = setTimeout(de, 50), j = setTimeout(de, 100), W = setTimeout(de, 200), H = setTimeout(() => {
|
|
383
383
|
ot = !1;
|
|
384
384
|
}, 300), T = setTimeout(() => {
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
const Ce =
|
|
388
|
-
Le.top >= Ce.top && Le.bottom <= Ce.bottom ||
|
|
385
|
+
const _ = me.current, Q = _ == null ? void 0 : _.querySelector("[data-menu-active='true']");
|
|
386
|
+
if (_ && Q) {
|
|
387
|
+
const Ce = _.getBoundingClientRect(), Le = Q.getBoundingClientRect();
|
|
388
|
+
Le.top >= Ce.top && Le.bottom <= Ce.bottom || Q.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
389
389
|
}
|
|
390
390
|
}, 250);
|
|
391
391
|
return () => {
|
|
392
|
-
clearTimeout(S), clearTimeout(Z), clearTimeout(
|
|
392
|
+
clearTimeout(S), clearTimeout(Z), clearTimeout(j), clearTimeout(W), clearTimeout(H), clearTimeout(T);
|
|
393
393
|
};
|
|
394
|
-
}, [z.pathname]),
|
|
394
|
+
}, [z.pathname]), J(() => {
|
|
395
395
|
te.current && (te.current.scrollTop = 0);
|
|
396
|
-
}, [z.pathname]),
|
|
397
|
-
C &&
|
|
398
|
-
}, [z.pathname, C]),
|
|
396
|
+
}, [z.pathname]), J(() => {
|
|
397
|
+
C && N(!1);
|
|
398
|
+
}, [z.pathname, C]), J(() => {
|
|
399
399
|
C && M(!0);
|
|
400
400
|
}, [C]);
|
|
401
401
|
const Fe = () => {
|
|
@@ -406,64 +406,64 @@ function Ql({
|
|
|
406
406
|
I(!1), i();
|
|
407
407
|
}, Ee = (S) => {
|
|
408
408
|
const Z = [S.to];
|
|
409
|
-
return S.children && Z.push(...S.children.map((
|
|
410
|
-
},
|
|
409
|
+
return S.children && Z.push(...S.children.map((j) => j.to)), Z;
|
|
410
|
+
}, He = [
|
|
411
411
|
...y.menus.flatMap((S) => S.items.flatMap(Ee)),
|
|
412
412
|
...((Ie = y.menuBottom) == null ? void 0 : Ie.flatMap(Ee)) ?? []
|
|
413
413
|
], xe = (S) => {
|
|
414
414
|
if (!z.pathname.startsWith(S)) return !1;
|
|
415
|
-
const Z =
|
|
415
|
+
const Z = He.filter((j) => z.pathname.startsWith(j)).sort((j, W) => W.length - j.length)[0];
|
|
416
416
|
return S === Z;
|
|
417
417
|
};
|
|
418
|
-
|
|
418
|
+
J(() => {
|
|
419
419
|
var Z;
|
|
420
|
-
const S = (
|
|
420
|
+
const S = (j) => {
|
|
421
421
|
var W;
|
|
422
|
-
(W =
|
|
423
|
-
const T = new Set(
|
|
424
|
-
return T.add(
|
|
422
|
+
(W = j.children) != null && W.some((H) => z.pathname.startsWith(H.to)) && pe((H) => {
|
|
423
|
+
const T = new Set(H);
|
|
424
|
+
return T.add(j.id), T;
|
|
425
425
|
});
|
|
426
426
|
};
|
|
427
|
-
y.menus.forEach((
|
|
428
|
-
|
|
427
|
+
y.menus.forEach((j) => {
|
|
428
|
+
j.items.forEach(S);
|
|
429
429
|
}), (Z = y.menuBottom) == null || Z.forEach(S);
|
|
430
430
|
}, [z.pathname, y.menus, y.menuBottom]);
|
|
431
431
|
const $e = (S) => {
|
|
432
432
|
pe((Z) => {
|
|
433
|
-
const
|
|
434
|
-
return
|
|
433
|
+
const j = new Set(Z);
|
|
434
|
+
return j.has(S) ? j.delete(S) : j.add(S), j;
|
|
435
435
|
});
|
|
436
436
|
};
|
|
437
|
-
|
|
438
|
-
y.menus.length !== 0 &&
|
|
439
|
-
}, [y.menus,
|
|
437
|
+
J(() => {
|
|
438
|
+
y.menus.length !== 0 && X !== null && !y.menus.some((S) => S.id === X) && K(null);
|
|
439
|
+
}, [y.menus, X, K]);
|
|
440
440
|
const Qe = ge(() => {
|
|
441
|
-
if (
|
|
441
|
+
if (X !== null)
|
|
442
442
|
return y.menus.filter(
|
|
443
|
-
(
|
|
443
|
+
(j) => j.id === X || j.parentGroupId === X
|
|
444
444
|
);
|
|
445
|
-
const S = y.menus.filter((
|
|
445
|
+
const S = y.menus.filter((j) => j.parentGroupId === void 0), Z = y.menus.filter((j) => j.parentGroupId !== void 0).flatMap((j) => j.items);
|
|
446
446
|
return Z.length === 0 ? S : [
|
|
447
447
|
...S,
|
|
448
448
|
{ id: 18, name: "Pengaturan", items: Z, parentGroupId: void 0 }
|
|
449
449
|
];
|
|
450
|
-
}, [y.menus,
|
|
450
|
+
}, [y.menus, X]);
|
|
451
451
|
if (B)
|
|
452
452
|
return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: t || /* @__PURE__ */ e(Wr, {}) });
|
|
453
453
|
const be = (S) => {
|
|
454
|
-
const Z = S.children && S.children.length > 0,
|
|
454
|
+
const Z = S.children && S.children.length > 0, j = oe.has(S.id), W = Z ? S.children.some((_) => xe(_.to)) : xe(S.to), H = Ut(S.badge, k[S.id]), T = !!H && v && !C;
|
|
455
455
|
return /* @__PURE__ */ u("div", { "data-menu-active": W || void 0, children: [
|
|
456
456
|
/* @__PURE__ */ u(
|
|
457
457
|
"button",
|
|
458
458
|
{
|
|
459
|
-
onClick: (
|
|
459
|
+
onClick: (_) => {
|
|
460
460
|
if (Z)
|
|
461
461
|
if (v && !C) {
|
|
462
|
-
const
|
|
462
|
+
const Q = _.currentTarget.getBoundingClientRect();
|
|
463
463
|
he({
|
|
464
464
|
item: S,
|
|
465
|
-
top:
|
|
466
|
-
left:
|
|
465
|
+
top: Q.top,
|
|
466
|
+
left: Q.right + 8
|
|
467
467
|
});
|
|
468
468
|
} else
|
|
469
469
|
$e(S.id);
|
|
@@ -489,11 +489,11 @@ function Ql({
|
|
|
489
489
|
cursor: "pointer"
|
|
490
490
|
},
|
|
491
491
|
title: v && !C ? S.title : void 0,
|
|
492
|
-
onMouseEnter: (
|
|
493
|
-
W || (
|
|
492
|
+
onMouseEnter: (_) => {
|
|
493
|
+
W || (_.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
|
|
494
494
|
},
|
|
495
|
-
onMouseLeave: (
|
|
496
|
-
W || (
|
|
495
|
+
onMouseLeave: (_) => {
|
|
496
|
+
W || (_.currentTarget.style.backgroundColor = "transparent");
|
|
497
497
|
},
|
|
498
498
|
children: [
|
|
499
499
|
/* @__PURE__ */ u(
|
|
@@ -542,11 +542,11 @@ function Ql({
|
|
|
542
542
|
children: S.title
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
|
-
|
|
545
|
+
H && /* @__PURE__ */ e(
|
|
546
546
|
gt,
|
|
547
547
|
{
|
|
548
|
-
text: String(
|
|
549
|
-
variant:
|
|
548
|
+
text: String(H.value),
|
|
549
|
+
variant: H.variant ?? "info",
|
|
550
550
|
size: "xs",
|
|
551
551
|
border: !0
|
|
552
552
|
}
|
|
@@ -559,7 +559,7 @@ function Ql({
|
|
|
559
559
|
height: "1rem",
|
|
560
560
|
flexShrink: 0,
|
|
561
561
|
transition: "transform 0.2s",
|
|
562
|
-
transform:
|
|
562
|
+
transform: j ? "rotate(180deg)" : "rotate(0deg)"
|
|
563
563
|
},
|
|
564
564
|
fill: "none",
|
|
565
565
|
stroke: "currentColor",
|
|
@@ -580,8 +580,8 @@ function Ql({
|
|
|
580
580
|
}
|
|
581
581
|
),
|
|
582
582
|
Z && (!v || C) && (() => {
|
|
583
|
-
const
|
|
584
|
-
(
|
|
583
|
+
const _ = S.children.findIndex(
|
|
584
|
+
(Q) => xe(Q.to)
|
|
585
585
|
);
|
|
586
586
|
return /* @__PURE__ */ u(
|
|
587
587
|
"div",
|
|
@@ -592,9 +592,9 @@ function Ql({
|
|
|
592
592
|
paddingLeft: "1.125rem",
|
|
593
593
|
overflow: "hidden",
|
|
594
594
|
transition: "all 0.3s ease-in-out",
|
|
595
|
-
maxHeight:
|
|
596
|
-
opacity:
|
|
597
|
-
marginTop:
|
|
595
|
+
maxHeight: j ? `${S.children.length * 36}px` : "0px",
|
|
596
|
+
opacity: j ? 1 : 0,
|
|
597
|
+
marginTop: j ? "0.25rem" : "0px"
|
|
598
598
|
},
|
|
599
599
|
children: [
|
|
600
600
|
/* @__PURE__ */ e(
|
|
@@ -612,14 +612,14 @@ function Ql({
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
),
|
|
615
|
-
|
|
615
|
+
_ >= 0 && /* @__PURE__ */ e(
|
|
616
616
|
"span",
|
|
617
617
|
{
|
|
618
618
|
"aria-hidden": "true",
|
|
619
619
|
style: {
|
|
620
620
|
position: "absolute",
|
|
621
621
|
left: 0,
|
|
622
|
-
top: `${
|
|
622
|
+
top: `${_ * 32}px`,
|
|
623
623
|
width: "1.5px",
|
|
624
624
|
height: "32px",
|
|
625
625
|
backgroundColor: "var(--sa-text-primary, #292a2e)",
|
|
@@ -629,15 +629,15 @@ function Ql({
|
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
),
|
|
632
|
-
S.children.map((
|
|
632
|
+
S.children.map((Q) => {
|
|
633
633
|
const Ce = Ut(
|
|
634
|
-
|
|
635
|
-
k[
|
|
634
|
+
Q.badge,
|
|
635
|
+
k[Q.id]
|
|
636
636
|
);
|
|
637
637
|
return /* @__PURE__ */ u(
|
|
638
638
|
"button",
|
|
639
639
|
{
|
|
640
|
-
onClick: () => L(
|
|
640
|
+
onClick: () => L(Q.to),
|
|
641
641
|
style: {
|
|
642
642
|
width: "100%",
|
|
643
643
|
display: "flex",
|
|
@@ -648,24 +648,24 @@ function Ql({
|
|
|
648
648
|
paddingTop: "0.25rem",
|
|
649
649
|
paddingBottom: "0.25rem",
|
|
650
650
|
height: "2rem",
|
|
651
|
-
borderRadius: xe(
|
|
651
|
+
borderRadius: xe(Q.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
|
|
652
652
|
textAlign: "left",
|
|
653
|
-
backgroundColor: xe(
|
|
654
|
-
color: xe(
|
|
653
|
+
backgroundColor: xe(Q.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
|
|
654
|
+
color: xe(Q.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
|
|
655
655
|
cursor: "pointer",
|
|
656
|
-
border: xe(
|
|
656
|
+
border: xe(Q.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
|
|
657
657
|
},
|
|
658
658
|
onMouseEnter: (Le) => {
|
|
659
|
-
xe(
|
|
659
|
+
xe(Q.to) || (Le.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
|
|
660
660
|
},
|
|
661
661
|
onMouseLeave: (Le) => {
|
|
662
|
-
xe(
|
|
662
|
+
xe(Q.to) || (Le.currentTarget.style.backgroundColor = "transparent");
|
|
663
663
|
},
|
|
664
664
|
children: [
|
|
665
665
|
/* @__PURE__ */ e(
|
|
666
666
|
E,
|
|
667
667
|
{
|
|
668
|
-
name:
|
|
668
|
+
name: Q.icon,
|
|
669
669
|
size: "sm",
|
|
670
670
|
style: { flexShrink: 0 }
|
|
671
671
|
}
|
|
@@ -682,7 +682,7 @@ function Ql({
|
|
|
682
682
|
overflow: "hidden",
|
|
683
683
|
textOverflow: "ellipsis"
|
|
684
684
|
},
|
|
685
|
-
children:
|
|
685
|
+
children: Q.title
|
|
686
686
|
}
|
|
687
687
|
),
|
|
688
688
|
Ce && /* @__PURE__ */ e(
|
|
@@ -696,7 +696,7 @@ function Ql({
|
|
|
696
696
|
)
|
|
697
697
|
]
|
|
698
698
|
},
|
|
699
|
-
|
|
699
|
+
Q.id
|
|
700
700
|
);
|
|
701
701
|
})
|
|
702
702
|
]
|
|
@@ -715,7 +715,7 @@ function Ql({
|
|
|
715
715
|
// backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
716
716
|
position: "relative",
|
|
717
717
|
"--app-sidebar-width": C ? "0px" : v ? "4.375rem" : "16.375rem",
|
|
718
|
-
"--app-footer-zindex": C &&
|
|
718
|
+
"--app-footer-zindex": C && $ ? "40" : "999"
|
|
719
719
|
},
|
|
720
720
|
children: [
|
|
721
721
|
C && /* @__PURE__ */ e(
|
|
@@ -726,11 +726,11 @@ function Ql({
|
|
|
726
726
|
inset: 0,
|
|
727
727
|
backgroundColor: "var(--sa-color-black-alpha-a50, #181a198f)",
|
|
728
728
|
zIndex: 40,
|
|
729
|
-
opacity:
|
|
730
|
-
pointerEvents:
|
|
729
|
+
opacity: $ ? 0.5 : 0,
|
|
730
|
+
pointerEvents: $ ? "auto" : "none",
|
|
731
731
|
transition: "opacity 0.3s"
|
|
732
732
|
},
|
|
733
|
-
onClick: () =>
|
|
733
|
+
onClick: () => N(!1)
|
|
734
734
|
}
|
|
735
735
|
),
|
|
736
736
|
/* @__PURE__ */ u(
|
|
@@ -742,7 +742,7 @@ function Ql({
|
|
|
742
742
|
...C && {
|
|
743
743
|
inset: 0,
|
|
744
744
|
zIndex: 50,
|
|
745
|
-
transform:
|
|
745
|
+
transform: $ ? "translateX(0)" : "translateX(-100%)"
|
|
746
746
|
},
|
|
747
747
|
backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
748
748
|
borderRight: "1px solid var(--sa-border-subtle, #0b120e24)",
|
|
@@ -755,8 +755,8 @@ function Ql({
|
|
|
755
755
|
/* @__PURE__ */ e(
|
|
756
756
|
"div",
|
|
757
757
|
{
|
|
758
|
-
onMouseEnter: () =>
|
|
759
|
-
onMouseLeave: () =>
|
|
758
|
+
onMouseEnter: () => G(!0),
|
|
759
|
+
onMouseLeave: () => G(!1),
|
|
760
760
|
style: {
|
|
761
761
|
height: "4rem",
|
|
762
762
|
display: "flex",
|
|
@@ -768,7 +768,7 @@ function Ql({
|
|
|
768
768
|
position: "relative"
|
|
769
769
|
},
|
|
770
770
|
children: (() => {
|
|
771
|
-
const S = !C && v &&
|
|
771
|
+
const S = !C && v && !$, Z = S && P;
|
|
772
772
|
return /* @__PURE__ */ u(ie, { children: [
|
|
773
773
|
/* @__PURE__ */ u(
|
|
774
774
|
"div",
|
|
@@ -796,7 +796,7 @@ function Ql({
|
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
),
|
|
799
|
-
(!v ||
|
|
799
|
+
(!v || $) && /* @__PURE__ */ e(
|
|
800
800
|
"span",
|
|
801
801
|
{
|
|
802
802
|
style: {
|
|
@@ -875,7 +875,7 @@ function Ql({
|
|
|
875
875
|
C && /* @__PURE__ */ e(
|
|
876
876
|
"button",
|
|
877
877
|
{
|
|
878
|
-
onClick: () =>
|
|
878
|
+
onClick: () => N(!1),
|
|
879
879
|
"aria-label": "Close menu",
|
|
880
880
|
style: {
|
|
881
881
|
padding: "0.375rem",
|
|
@@ -1021,7 +1021,7 @@ function Ql({
|
|
|
1021
1021
|
C && /* @__PURE__ */ e(
|
|
1022
1022
|
"button",
|
|
1023
1023
|
{
|
|
1024
|
-
onClick: () =>
|
|
1024
|
+
onClick: () => N(!0),
|
|
1025
1025
|
style: {
|
|
1026
1026
|
padding: "0.375rem",
|
|
1027
1027
|
borderRadius: "0.5rem",
|
|
@@ -1138,7 +1138,7 @@ function Ql({
|
|
|
1138
1138
|
marginTop: "16px"
|
|
1139
1139
|
},
|
|
1140
1140
|
children: [
|
|
1141
|
-
/* @__PURE__ */ e(
|
|
1141
|
+
/* @__PURE__ */ e(Hn, { children: /* @__PURE__ */ u(
|
|
1142
1142
|
"div",
|
|
1143
1143
|
{
|
|
1144
1144
|
style: {
|
|
@@ -1225,11 +1225,11 @@ function Ql({
|
|
|
1225
1225
|
type: "button",
|
|
1226
1226
|
onClick: S.onClick,
|
|
1227
1227
|
style: Ir,
|
|
1228
|
-
onMouseEnter: (
|
|
1229
|
-
|
|
1228
|
+
onMouseEnter: (j) => {
|
|
1229
|
+
j.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)";
|
|
1230
1230
|
},
|
|
1231
|
-
onMouseLeave: (
|
|
1232
|
-
|
|
1231
|
+
onMouseLeave: (j) => {
|
|
1232
|
+
j.currentTarget.style.backgroundColor = "transparent";
|
|
1233
1233
|
},
|
|
1234
1234
|
children: [
|
|
1235
1235
|
/* @__PURE__ */ e(E, { name: S.icon, size: "md" }),
|
|
@@ -1312,8 +1312,8 @@ function Ql({
|
|
|
1312
1312
|
/* @__PURE__ */ e(Xr, { children: "Confirmation Logout" }),
|
|
1313
1313
|
/* @__PURE__ */ e(sr, { children: "Are you sure you want to end the session and exit the page?" }),
|
|
1314
1314
|
/* @__PURE__ */ e(Kr, { children: /* @__PURE__ */ e(f, { direction: "column", display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ u(ce, { direction: "row", gap: "sm", align: "center", children: [
|
|
1315
|
-
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(
|
|
1316
|
-
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(
|
|
1315
|
+
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(O, { secondary: !0, onClick: Ze, children: "Cancel" }) }),
|
|
1316
|
+
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(O, { primary: !0, onClick: ye, children: "Yes, Sure" }) })
|
|
1317
1317
|
] }) }) })
|
|
1318
1318
|
] }),
|
|
1319
1319
|
ne && /* @__PURE__ */ u(ie, { children: [
|
|
@@ -1366,7 +1366,7 @@ function Ql({
|
|
|
1366
1366
|
}
|
|
1367
1367
|
),
|
|
1368
1368
|
(et = ne.item.children) == null ? void 0 : et.map((S) => {
|
|
1369
|
-
const Z = xe(S.to),
|
|
1369
|
+
const Z = xe(S.to), j = Ut(
|
|
1370
1370
|
S.badge,
|
|
1371
1371
|
k[S.id]
|
|
1372
1372
|
);
|
|
@@ -1407,11 +1407,11 @@ function Ql({
|
|
|
1407
1407
|
}
|
|
1408
1408
|
),
|
|
1409
1409
|
/* @__PURE__ */ e("span", { style: { flex: 1, whiteSpace: "nowrap" }, children: S.title }),
|
|
1410
|
-
|
|
1410
|
+
j && /* @__PURE__ */ e(
|
|
1411
1411
|
gt,
|
|
1412
1412
|
{
|
|
1413
|
-
text: String(
|
|
1414
|
-
variant:
|
|
1413
|
+
text: String(j.value),
|
|
1414
|
+
variant: j.variant ?? "info",
|
|
1415
1415
|
size: "xs",
|
|
1416
1416
|
border: !0
|
|
1417
1417
|
}
|
|
@@ -1585,7 +1585,7 @@ function Vr(t, r, n) {
|
|
|
1585
1585
|
transition: "box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease, border-color 0.15s ease"
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1588
|
+
const Hr = {
|
|
1589
1589
|
fontSize: "11px",
|
|
1590
1590
|
fontWeight: 500,
|
|
1591
1591
|
textAlign: "center",
|
|
@@ -1594,7 +1594,7 @@ const Or = {
|
|
|
1594
1594
|
color: "var(--sa-background-primary, #ffffff)",
|
|
1595
1595
|
lineHeight: "1.3",
|
|
1596
1596
|
maxWidth: "80px"
|
|
1597
|
-
},
|
|
1597
|
+
}, Or = {
|
|
1598
1598
|
display: "flex",
|
|
1599
1599
|
flexDirection: "column",
|
|
1600
1600
|
alignItems: "center",
|
|
@@ -1640,10 +1640,10 @@ function ii({
|
|
|
1640
1640
|
onClick: () => c(null),
|
|
1641
1641
|
onMouseEnter: () => s("all"),
|
|
1642
1642
|
onMouseLeave: () => s(void 0),
|
|
1643
|
-
style:
|
|
1643
|
+
style: Or,
|
|
1644
1644
|
children: [
|
|
1645
1645
|
/* @__PURE__ */ e("div", { style: Vr(o === null, l === "all", d), children: /* @__PURE__ */ e("div", { style: { color: d.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(E, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1646
|
-
/* @__PURE__ */ e("span", { style:
|
|
1646
|
+
/* @__PURE__ */ e("span", { style: Hr, children: "Semua" })
|
|
1647
1647
|
]
|
|
1648
1648
|
}
|
|
1649
1649
|
),
|
|
@@ -1656,10 +1656,10 @@ function ii({
|
|
|
1656
1656
|
onClick: () => c(a.id),
|
|
1657
1657
|
onMouseEnter: () => s(a.id),
|
|
1658
1658
|
onMouseLeave: () => s(void 0),
|
|
1659
|
-
style:
|
|
1659
|
+
style: Or,
|
|
1660
1660
|
children: [
|
|
1661
1661
|
/* @__PURE__ */ e("div", { style: Vr(p, g, B), children: /* @__PURE__ */ e("div", { style: { color: B.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(E, { name: b, size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1662
|
-
/* @__PURE__ */ e("span", { style:
|
|
1662
|
+
/* @__PURE__ */ e("span", { style: Hr, children: a.name })
|
|
1663
1663
|
]
|
|
1664
1664
|
},
|
|
1665
1665
|
a.id
|
|
@@ -1913,18 +1913,18 @@ const oi = (t, r) => {
|
|
|
1913
1913
|
const v = d.filter(
|
|
1914
1914
|
(M) => M && (M.title || M.icon)
|
|
1915
1915
|
);
|
|
1916
|
-
return v.length === 0 ? null : g ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: v.map(({ title: M, icon:
|
|
1917
|
-
|
|
1916
|
+
return v.length === 0 ? null : g ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: v.map(({ title: M, icon: $, buttonProps: N, onClick: P }, G) => /* @__PURE__ */ e(
|
|
1917
|
+
O,
|
|
1918
1918
|
{
|
|
1919
|
-
iconLeft:
|
|
1920
|
-
onClick:
|
|
1921
|
-
|
|
1919
|
+
iconLeft: $ ? /* @__PURE__ */ e(E, { name: $, size: "md" }) : void 0,
|
|
1920
|
+
onClick: P,
|
|
1921
|
+
...N,
|
|
1922
1922
|
children: M
|
|
1923
1923
|
},
|
|
1924
|
-
`action-${
|
|
1924
|
+
`action-${G}`
|
|
1925
1925
|
)) }) : /* @__PURE__ */ u(Be, { position: "bottom-right", children: [
|
|
1926
1926
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
1927
|
-
|
|
1927
|
+
O,
|
|
1928
1928
|
{
|
|
1929
1929
|
variant: "tertiary",
|
|
1930
1930
|
size: "sm",
|
|
@@ -1937,18 +1937,18 @@ const oi = (t, r) => {
|
|
|
1937
1937
|
"aria-label": "Actions"
|
|
1938
1938
|
}
|
|
1939
1939
|
) }),
|
|
1940
|
-
/* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ae, { style: { minWidth: 200 }, children: v.map(({ title: M, icon:
|
|
1941
|
-
const
|
|
1940
|
+
/* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ae, { style: { minWidth: 200 }, children: v.map(({ title: M, icon: $, buttonProps: N, onClick: P }, G) => {
|
|
1941
|
+
const oe = (N == null ? void 0 : N.tone) === "error" || (N == null ? void 0 : N.danger) === !0;
|
|
1942
1942
|
return /* @__PURE__ */ e(
|
|
1943
1943
|
Ne,
|
|
1944
1944
|
{
|
|
1945
|
-
intent:
|
|
1946
|
-
disabled:
|
|
1947
|
-
startIcon:
|
|
1948
|
-
onClick:
|
|
1945
|
+
intent: oe ? "danger" : void 0,
|
|
1946
|
+
disabled: N == null ? void 0 : N.disabled,
|
|
1947
|
+
startIcon: $ ? /* @__PURE__ */ e(E, { name: $ }) : void 0,
|
|
1948
|
+
onClick: P,
|
|
1949
1949
|
children: M
|
|
1950
1950
|
},
|
|
1951
|
-
`action-${
|
|
1951
|
+
`action-${G}`
|
|
1952
1952
|
);
|
|
1953
1953
|
}) }) })
|
|
1954
1954
|
] });
|
|
@@ -1964,9 +1964,9 @@ const oi = (t, r) => {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(pr, { onClick: k, children: v }) });
|
|
1966
1966
|
}, D = () => {
|
|
1967
|
-
const v = !!r, M = Array.isArray(d) && d.length > 0,
|
|
1968
|
-
if (!v &&
|
|
1969
|
-
const
|
|
1967
|
+
const v = !!r, M = Array.isArray(d) && d.length > 0, $ = ir(d) ? !0 : M;
|
|
1968
|
+
if (!v && !$ && !y) return null;
|
|
1969
|
+
const P = g || !g && M;
|
|
1970
1970
|
return /* @__PURE__ */ u(
|
|
1971
1971
|
f,
|
|
1972
1972
|
{
|
|
@@ -1976,18 +1976,25 @@ const oi = (t, r) => {
|
|
|
1976
1976
|
paddingInline: (p == null ? void 0 : p.paddingInline) ?? "md",
|
|
1977
1977
|
...p,
|
|
1978
1978
|
style: {
|
|
1979
|
-
|
|
1979
|
+
// Use an inset box-shadow instead of a real border so the 1px line
|
|
1980
|
+
// doesn't add to the header's rendered height (a border on an
|
|
1981
|
+
// auto-height box always grows it by 1px, causing a layout shift when
|
|
1982
|
+
// headerBorder toggles on/off). box-shadow draws the line without
|
|
1983
|
+
// touching the box model.
|
|
1984
|
+
...s ? {
|
|
1985
|
+
boxShadow: "inset 0 -1px 0 0 var(--sa-border-subtle, #0b120e24)"
|
|
1986
|
+
} : {},
|
|
1980
1987
|
...p == null ? void 0 : p.style
|
|
1981
1988
|
},
|
|
1982
1989
|
children: [
|
|
1983
1990
|
y && z(),
|
|
1984
|
-
(v ||
|
|
1991
|
+
(v || $) && /* @__PURE__ */ u(
|
|
1985
1992
|
f,
|
|
1986
1993
|
{
|
|
1987
|
-
direction:
|
|
1994
|
+
direction: P ? "row" : "column",
|
|
1988
1995
|
gap: "sm",
|
|
1989
1996
|
justify: "space-between",
|
|
1990
|
-
align:
|
|
1997
|
+
align: P ? "center" : "flex-start",
|
|
1991
1998
|
children: [
|
|
1992
1999
|
v ? typeof r == "string" ? /* @__PURE__ */ u(f, { direction: "row", gap: "lg", align: "center", children: [
|
|
1993
2000
|
/* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
@@ -2013,26 +2020,31 @@ const oi = (t, r) => {
|
|
|
2013
2020
|
);
|
|
2014
2021
|
}, C = () => {
|
|
2015
2022
|
if (!c || c.length === 0) return null;
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2023
|
+
const v = c.filter((N) => N.show !== !1);
|
|
2024
|
+
if (v.length === 0) return null;
|
|
2025
|
+
let M = 0, $ = -1 / 0;
|
|
2026
|
+
return v.forEach((N, P) => {
|
|
2027
|
+
const G = N.order ?? 0;
|
|
2028
|
+
G >= $ && ($ = G, M = P);
|
|
2029
|
+
}), v.map(({ content: N, order: P, borderBottom: G = !0 }, oe) => /* @__PURE__ */ e(
|
|
2021
2030
|
f,
|
|
2022
2031
|
{
|
|
2023
2032
|
direction: "column",
|
|
2024
2033
|
paddingTop: "sm",
|
|
2025
|
-
paddingBottom:
|
|
2034
|
+
paddingBottom: G || oe === M ? "sm" : "spacing-0",
|
|
2026
2035
|
paddingInline: "md",
|
|
2027
2036
|
style: {
|
|
2028
|
-
|
|
2029
|
-
|
|
2037
|
+
// Inset box-shadow (not a real border) so the divider line doesn't
|
|
2038
|
+
// add 1px to the row height — keeps the sub-header stack from shifting
|
|
2039
|
+
// when borderBottom toggles. See renderHeader for the same rationale.
|
|
2040
|
+
...G ? {
|
|
2041
|
+
boxShadow: "inset 0 -1px 0 0 var(--sa-border-subtle, #0b120e24)"
|
|
2030
2042
|
} : {},
|
|
2031
|
-
|
|
2043
|
+
...P !== void 0 ? { order: P } : {}
|
|
2032
2044
|
},
|
|
2033
2045
|
children: N
|
|
2034
2046
|
},
|
|
2035
|
-
`sub-header-${
|
|
2047
|
+
`sub-header-${oe}`
|
|
2036
2048
|
));
|
|
2037
2049
|
}, V = () => {
|
|
2038
2050
|
const v = l ? D() : null, M = C();
|
|
@@ -2041,11 +2053,11 @@ const oi = (t, r) => {
|
|
|
2041
2053
|
{
|
|
2042
2054
|
direction: "column",
|
|
2043
2055
|
style: {
|
|
2044
|
-
// With subHeaders, the gap to the body comes entirely from the
|
|
2056
|
+
// With visible subHeaders, the gap to the body comes entirely from the
|
|
2045
2057
|
// bottom-most row's own paddingBottom (forced to sm in renderSubHeaders),
|
|
2046
2058
|
// so the last row is sm from the body whether or not it has a border.
|
|
2047
|
-
// Without subHeaders the header keeps its usual md gap
|
|
2048
|
-
marginBottom:
|
|
2059
|
+
// Without any visible subHeaders the header keeps its usual md gap.
|
|
2060
|
+
marginBottom: M ? "var(--sa-spacing-0)" : "var(--sa-spacing-md)"
|
|
2049
2061
|
},
|
|
2050
2062
|
children: [
|
|
2051
2063
|
v,
|
|
@@ -2252,7 +2264,7 @@ const oi = (t, r) => {
|
|
|
2252
2264
|
Body2: ki,
|
|
2253
2265
|
Body3: Si
|
|
2254
2266
|
}, Ve = () => {
|
|
2255
|
-
const [t, r] =
|
|
2267
|
+
const [t, r] = Ot(), n = Rt(t.toString()), o = nn(), i = yt(), l = o.id;
|
|
2256
2268
|
return {
|
|
2257
2269
|
// query params
|
|
2258
2270
|
setSearchParams: r,
|
|
@@ -2440,7 +2452,7 @@ const oi = (t, r) => {
|
|
|
2440
2452
|
}) => {
|
|
2441
2453
|
const L = (g == null ? void 0 : g.isShowLabel) ?? !0, [z, D] = R(!1), [C, V] = R(0), I = () => {
|
|
2442
2454
|
V((K) => K + 1);
|
|
2443
|
-
}, { searchParams: v, setSearchParams: M, getQueryParam:
|
|
2455
|
+
}, { searchParams: v, setSearchParams: M, getQueryParam: $ } = Ve(), N = Rt(v.toString()), P = yr(t, v, c) || "", [G, oe] = R(P), pe = $(c), he = !!(pe && !(() => {
|
|
2444
2456
|
if (pe)
|
|
2445
2457
|
try {
|
|
2446
2458
|
const K = JSON.parse(pe);
|
|
@@ -2449,18 +2461,18 @@ const oi = (t, r) => {
|
|
|
2449
2461
|
console.error("Filter parameter is not a valid JSON:", K);
|
|
2450
2462
|
}
|
|
2451
2463
|
return !1;
|
|
2452
|
-
})()),
|
|
2453
|
-
return
|
|
2454
|
-
|
|
2455
|
-
}, [
|
|
2456
|
-
if (
|
|
2464
|
+
})()), X = ke("md");
|
|
2465
|
+
return J(() => {
|
|
2466
|
+
oe(P);
|
|
2467
|
+
}, [P]), J(() => {
|
|
2468
|
+
if (G === P)
|
|
2457
2469
|
return;
|
|
2458
2470
|
const K = window.setTimeout(() => {
|
|
2459
2471
|
zt({
|
|
2460
|
-
value:
|
|
2472
|
+
value: G,
|
|
2461
2473
|
name: t,
|
|
2462
2474
|
type: "search",
|
|
2463
|
-
searchQueries:
|
|
2475
|
+
searchQueries: N,
|
|
2464
2476
|
setSearchParams: M,
|
|
2465
2477
|
filterKey: c,
|
|
2466
2478
|
pageKey: d
|
|
@@ -2470,10 +2482,10 @@ const oi = (t, r) => {
|
|
|
2470
2482
|
window.clearTimeout(K);
|
|
2471
2483
|
};
|
|
2472
2484
|
}, [
|
|
2473
|
-
|
|
2474
|
-
|
|
2485
|
+
G,
|
|
2486
|
+
P,
|
|
2475
2487
|
t,
|
|
2476
|
-
|
|
2488
|
+
N,
|
|
2477
2489
|
M,
|
|
2478
2490
|
c,
|
|
2479
2491
|
d
|
|
@@ -2482,16 +2494,16 @@ const oi = (t, r) => {
|
|
|
2482
2494
|
{
|
|
2483
2495
|
gap: "md",
|
|
2484
2496
|
style: {
|
|
2485
|
-
flexDirection:
|
|
2497
|
+
flexDirection: X && b === "left" ? "row" : X && b === "right" ? "row-reverse" : "column"
|
|
2486
2498
|
},
|
|
2487
2499
|
align: "flex-end",
|
|
2488
2500
|
children: [
|
|
2489
2501
|
he && /* @__PURE__ */ e(f, { direction: "column", justify: "flex-end", children: /* @__PURE__ */ e(
|
|
2490
|
-
|
|
2502
|
+
O,
|
|
2491
2503
|
{
|
|
2492
2504
|
onClick: () => {
|
|
2493
2505
|
const K = new URLSearchParams(v);
|
|
2494
|
-
K.delete(c), M(K),
|
|
2506
|
+
K.delete(c), M(K), oe(""), I(), m && m();
|
|
2495
2507
|
},
|
|
2496
2508
|
variant: "outline",
|
|
2497
2509
|
tone: "neutral",
|
|
@@ -2515,7 +2527,7 @@ const oi = (t, r) => {
|
|
|
2515
2527
|
`extended-filter-${Fe}-${C}`
|
|
2516
2528
|
)),
|
|
2517
2529
|
!!(p != null && p.length) && /* @__PURE__ */ e(
|
|
2518
|
-
|
|
2530
|
+
O,
|
|
2519
2531
|
{
|
|
2520
2532
|
primary: he,
|
|
2521
2533
|
secondary: !he,
|
|
@@ -2529,7 +2541,7 @@ const oi = (t, r) => {
|
|
|
2529
2541
|
}
|
|
2530
2542
|
}
|
|
2531
2543
|
),
|
|
2532
|
-
fullWidth: !
|
|
2544
|
+
fullWidth: !X,
|
|
2533
2545
|
onClick: () => D(!0),
|
|
2534
2546
|
children: L ? "Filter" : void 0
|
|
2535
2547
|
}
|
|
@@ -2582,7 +2594,7 @@ const oi = (t, r) => {
|
|
|
2582
2594
|
value: K,
|
|
2583
2595
|
name: r,
|
|
2584
2596
|
type: "dropdown",
|
|
2585
|
-
searchQueries:
|
|
2597
|
+
searchQueries: N,
|
|
2586
2598
|
setSearchParams: M,
|
|
2587
2599
|
filterKey: c
|
|
2588
2600
|
}),
|
|
@@ -2599,7 +2611,7 @@ const oi = (t, r) => {
|
|
|
2599
2611
|
direction: "column",
|
|
2600
2612
|
gap: "sm",
|
|
2601
2613
|
style: {
|
|
2602
|
-
width: a &&
|
|
2614
|
+
width: a && X ? a : X ? "310px" : ""
|
|
2603
2615
|
},
|
|
2604
2616
|
children: [
|
|
2605
2617
|
y && /* @__PURE__ */ u(Ue.SubH3, { children: [
|
|
@@ -2611,8 +2623,8 @@ const oi = (t, r) => {
|
|
|
2611
2623
|
{
|
|
2612
2624
|
placeholder: n,
|
|
2613
2625
|
leftIcon: /* @__PURE__ */ e(E, { name: "Search", width: 20, height: 20 }),
|
|
2614
|
-
onChange: (K) =>
|
|
2615
|
-
value:
|
|
2626
|
+
onChange: (K) => oe(K.target.value),
|
|
2627
|
+
value: G,
|
|
2616
2628
|
fullWidth: !0
|
|
2617
2629
|
},
|
|
2618
2630
|
C + 1 + c
|
|
@@ -2656,7 +2668,7 @@ function xr({
|
|
|
2656
2668
|
const v = d[I];
|
|
2657
2669
|
return (v == null ? void 0 : v.locked) || C.includes(I) || V.includes(I);
|
|
2658
2670
|
});
|
|
2659
|
-
}, [l, n, r, i, t, d]), m =
|
|
2671
|
+
}, [l, n, r, i, t, d]), m = Y(
|
|
2660
2672
|
(C) => {
|
|
2661
2673
|
try {
|
|
2662
2674
|
return C[r] ? JSON.parse(C[r]) : {};
|
|
@@ -2665,22 +2677,22 @@ function xr({
|
|
|
2665
2677
|
}
|
|
2666
2678
|
},
|
|
2667
2679
|
[r]
|
|
2668
|
-
), p =
|
|
2680
|
+
), p = Y(
|
|
2669
2681
|
(C) => {
|
|
2670
2682
|
const V = { ...c };
|
|
2671
2683
|
C.length ? V[n] = C.join(",") : delete V[n], s(V);
|
|
2672
2684
|
},
|
|
2673
2685
|
[c, n, s]
|
|
2674
|
-
), g =
|
|
2686
|
+
), g = Y(
|
|
2675
2687
|
(C) => {
|
|
2676
2688
|
a.includes(C) || p([...a, C]);
|
|
2677
2689
|
},
|
|
2678
2690
|
[a, p]
|
|
2679
|
-
), b =
|
|
2691
|
+
), b = Y(
|
|
2680
2692
|
(C) => {
|
|
2681
2693
|
var M;
|
|
2682
2694
|
if ((M = d[C]) != null && M.locked) return;
|
|
2683
|
-
const V = { ...c }, I = a.filter((
|
|
2695
|
+
const V = { ...c }, I = a.filter(($) => $ !== C);
|
|
2684
2696
|
I.length ? V[n] = I.join(",") : delete V[n];
|
|
2685
2697
|
const v = m(V);
|
|
2686
2698
|
C in v && (delete v[C], Object.keys(v).length ? V[r] = JSON.stringify(v) : delete V[r]), delete V[o], s(V);
|
|
@@ -2695,10 +2707,10 @@ function xr({
|
|
|
2695
2707
|
s,
|
|
2696
2708
|
d
|
|
2697
2709
|
]
|
|
2698
|
-
), B =
|
|
2710
|
+
), B = Y(
|
|
2699
2711
|
(C) => a.includes(C) ? b(C) : g(C),
|
|
2700
2712
|
[a, g, b]
|
|
2701
|
-
), y =
|
|
2713
|
+
), y = Y(
|
|
2702
2714
|
(C) => {
|
|
2703
2715
|
switch (C.type) {
|
|
2704
2716
|
case "dropdown":
|
|
@@ -2728,7 +2740,7 @@ function xr({
|
|
|
2728
2740
|
}
|
|
2729
2741
|
},
|
|
2730
2742
|
[l, r, m]
|
|
2731
|
-
), k =
|
|
2743
|
+
), k = Y(
|
|
2732
2744
|
(C, V) => {
|
|
2733
2745
|
if (C.type === "date-compact") {
|
|
2734
2746
|
const I = { ...c }, v = m(I);
|
|
@@ -2746,13 +2758,13 @@ function xr({
|
|
|
2746
2758
|
});
|
|
2747
2759
|
},
|
|
2748
2760
|
[c, s, r, o, m]
|
|
2749
|
-
), L =
|
|
2761
|
+
), L = Y(
|
|
2750
2762
|
(C) => {
|
|
2751
2763
|
const V = { ...c }, I = m(V);
|
|
2752
2764
|
C in I && (delete I[C], Object.keys(I).length ? V[r] = JSON.stringify(I) : delete V[r]), delete V[o], s(V);
|
|
2753
2765
|
},
|
|
2754
2766
|
[c, r, o, m, s]
|
|
2755
|
-
), z =
|
|
2767
|
+
), z = Y(() => {
|
|
2756
2768
|
const C = { ...c };
|
|
2757
2769
|
delete C[r], delete C[n], delete C[o], s(C);
|
|
2758
2770
|
}, [c, r, n, o, s]), D = a.length > 0;
|
|
@@ -2791,7 +2803,7 @@ const fn = {
|
|
|
2791
2803
|
const i = t.hidden.filter((l) => n.has(l));
|
|
2792
2804
|
return { order: o, hidden: i };
|
|
2793
2805
|
};
|
|
2794
|
-
function
|
|
2806
|
+
function Hi({
|
|
2795
2807
|
columns: t,
|
|
2796
2808
|
scopeId: r,
|
|
2797
2809
|
storage: n,
|
|
@@ -2810,21 +2822,21 @@ function Oi({
|
|
|
2810
2822
|
}
|
|
2811
2823
|
return l;
|
|
2812
2824
|
}), m = t.map((v) => v.key).join("|");
|
|
2813
|
-
|
|
2825
|
+
J(() => a((v) => wt(v, t)), [m]);
|
|
2814
2826
|
const p = se(d);
|
|
2815
2827
|
p.current = d;
|
|
2816
2828
|
const g = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, b = se(g);
|
|
2817
|
-
|
|
2829
|
+
J(() => {
|
|
2818
2830
|
if (g == null || b.current === g) return;
|
|
2819
2831
|
b.current = g;
|
|
2820
2832
|
const v = p.current, M = c(i, v.order);
|
|
2821
2833
|
M.order.join("|") === v.order.join("|") && M.hidden.join("|") === v.hidden.join("|") || (a(M), s && n.set(s, M));
|
|
2822
2834
|
}, [g, m]);
|
|
2823
2835
|
const B = se(!1);
|
|
2824
|
-
|
|
2836
|
+
J(() => {
|
|
2825
2837
|
B.current || (B.current = !0, o == null || o(d));
|
|
2826
2838
|
}, []);
|
|
2827
|
-
const y =
|
|
2839
|
+
const y = Y(
|
|
2828
2840
|
(v) => {
|
|
2829
2841
|
a(v), s && n.set(s, v), o == null || o(v);
|
|
2830
2842
|
},
|
|
@@ -2832,20 +2844,20 @@ function Oi({
|
|
|
2832
2844
|
), k = ge(() => {
|
|
2833
2845
|
const v = new Map(t.map((M) => [M.key, M]));
|
|
2834
2846
|
return d.order.filter((M) => v.has(M)).map((M) => ({ ...v.get(M), visible: !d.hidden.includes(M) }));
|
|
2835
|
-
}, [d, t]), L =
|
|
2847
|
+
}, [d, t]), L = Y(
|
|
2836
2848
|
(v) => {
|
|
2837
|
-
const M = d.hidden.includes(v) ? d.hidden.filter((
|
|
2849
|
+
const M = d.hidden.includes(v) ? d.hidden.filter(($) => $ !== v) : [...d.hidden, v];
|
|
2838
2850
|
y({ ...d, hidden: M });
|
|
2839
2851
|
},
|
|
2840
2852
|
[d, y]
|
|
2841
|
-
), z =
|
|
2853
|
+
), z = Y(
|
|
2842
2854
|
(v, M) => {
|
|
2843
2855
|
if (v === M) return;
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2856
|
+
const $ = [...d.order], [N] = $.splice(v, 1);
|
|
2857
|
+
$.splice(M, 0, N), y({ ...d, order: $ });
|
|
2846
2858
|
},
|
|
2847
2859
|
[d, y]
|
|
2848
|
-
), D =
|
|
2860
|
+
), D = Y(
|
|
2849
2861
|
(v) => {
|
|
2850
2862
|
y({
|
|
2851
2863
|
...d,
|
|
@@ -2853,7 +2865,7 @@ function Oi({
|
|
|
2853
2865
|
});
|
|
2854
2866
|
},
|
|
2855
2867
|
[d, t, y]
|
|
2856
|
-
), C =
|
|
2868
|
+
), C = Y(() => y(l), [y, l]), V = Y(
|
|
2857
2869
|
(v) => y(wt(v, t)),
|
|
2858
2870
|
[y, t]
|
|
2859
2871
|
), I = d.hidden.length === 0;
|
|
@@ -2868,7 +2880,7 @@ function Oi({
|
|
|
2868
2880
|
applyState: V
|
|
2869
2881
|
};
|
|
2870
2882
|
}
|
|
2871
|
-
function
|
|
2883
|
+
function Oi({
|
|
2872
2884
|
scopeId: t,
|
|
2873
2885
|
storage: r,
|
|
2874
2886
|
snapshotKeys: n,
|
|
@@ -2878,13 +2890,13 @@ function Hi({
|
|
|
2878
2890
|
}) {
|
|
2879
2891
|
const { searchParams: s, setSearchParams: c } = Ve(), d = t ? xt.savedViews(t) : void 0, [a, m] = R(
|
|
2880
2892
|
() => d ? r.get(d) || [] : []
|
|
2881
|
-
), p =
|
|
2893
|
+
), p = Y(
|
|
2882
2894
|
(y) => {
|
|
2883
2895
|
m(y), d && r.set(d, y);
|
|
2884
2896
|
},
|
|
2885
2897
|
[d]
|
|
2886
2898
|
// storage identity is stable (module singleton / caller-provided)
|
|
2887
|
-
), g =
|
|
2899
|
+
), g = Y(
|
|
2888
2900
|
(y) => {
|
|
2889
2901
|
const k = y.trim();
|
|
2890
2902
|
if (!k) return;
|
|
@@ -2903,10 +2915,10 @@ function Hi({
|
|
|
2903
2915
|
p([...a, z]);
|
|
2904
2916
|
},
|
|
2905
2917
|
[n, s, i, p, a]
|
|
2906
|
-
), b =
|
|
2918
|
+
), b = Y(
|
|
2907
2919
|
(y) => p(a.filter((k) => k.id !== y)),
|
|
2908
2920
|
[p, a]
|
|
2909
|
-
), B =
|
|
2921
|
+
), B = Y(
|
|
2910
2922
|
(y) => {
|
|
2911
2923
|
const k = Object.fromEntries(s.entries());
|
|
2912
2924
|
n.forEach((L) => delete k[L]), Object.assign(k, y.query), delete k[o], c(k), y.columns && (l == null || l(y.columns));
|
|
@@ -2928,7 +2940,7 @@ function Ti({
|
|
|
2928
2940
|
enabled: o = !0
|
|
2929
2941
|
}) {
|
|
2930
2942
|
const { searchParams: i } = Ve(), l = t && o ? xt.lastState(t) : void 0, s = se(l);
|
|
2931
|
-
|
|
2943
|
+
J(() => {
|
|
2932
2944
|
if (!l) {
|
|
2933
2945
|
s.current = l;
|
|
2934
2946
|
return;
|
|
@@ -2943,11 +2955,11 @@ function Ti({
|
|
|
2943
2955
|
p != null && (a[m] = p);
|
|
2944
2956
|
}), Object.keys(a).length !== 0 && r.set(l, a);
|
|
2945
2957
|
}, [i, l, n, r]);
|
|
2946
|
-
const c =
|
|
2958
|
+
const c = Y(() => {
|
|
2947
2959
|
if (!l) return null;
|
|
2948
2960
|
const a = r.get(l);
|
|
2949
2961
|
return a && Object.keys(a).length > 0 ? a : null;
|
|
2950
|
-
}, [l, r]), d =
|
|
2962
|
+
}, [l, r]), d = Y(() => {
|
|
2951
2963
|
l && r.remove(l);
|
|
2952
2964
|
}, [l, r]);
|
|
2953
2965
|
return {
|
|
@@ -2964,7 +2976,7 @@ function Ni({
|
|
|
2964
2976
|
enabled: i = !0
|
|
2965
2977
|
}) {
|
|
2966
2978
|
const { searchParams: l } = Ve(), s = t && i ? xt.perPage(t) : void 0, c = l.toString(), d = se(s);
|
|
2967
|
-
|
|
2979
|
+
J(() => {
|
|
2968
2980
|
if (!s) {
|
|
2969
2981
|
d.current = s;
|
|
2970
2982
|
return;
|
|
@@ -2978,13 +2990,13 @@ function Ni({
|
|
|
2978
2990
|
const g = Number(p);
|
|
2979
2991
|
!Number.isFinite(g) || g <= 0 || r.set(s, g);
|
|
2980
2992
|
}, [c, s, n, r]);
|
|
2981
|
-
const a =
|
|
2993
|
+
const a = Y(() => {
|
|
2982
2994
|
if (!s) return null;
|
|
2983
2995
|
const p = r.get(s);
|
|
2984
2996
|
if (p == null) return null;
|
|
2985
2997
|
const g = Number(p);
|
|
2986
2998
|
return !Number.isFinite(g) || g <= 0 || o && !o.includes(g) ? null : String(g);
|
|
2987
|
-
}, [s, r, o]), m =
|
|
2999
|
+
}, [s, r, o]), m = Y(() => {
|
|
2988
3000
|
s && r.remove(s);
|
|
2989
3001
|
}, [s, r]);
|
|
2990
3002
|
return {
|
|
@@ -3011,7 +3023,7 @@ function ji({
|
|
|
3011
3023
|
readPerPage: i
|
|
3012
3024
|
}) {
|
|
3013
3025
|
const { searchParams: l, setSearchParams: s, location: c } = Ve(), d = se(null);
|
|
3014
|
-
|
|
3026
|
+
J(() => {
|
|
3015
3027
|
if (!t || d.current === c.pathname) return;
|
|
3016
3028
|
d.current = c.pathname;
|
|
3017
3029
|
const a = {};
|
|
@@ -3034,7 +3046,7 @@ const _i = ({
|
|
|
3034
3046
|
onReset: i
|
|
3035
3047
|
}) => t.length ? /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3036
3048
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3037
|
-
|
|
3049
|
+
O,
|
|
3038
3050
|
{
|
|
3039
3051
|
variant: o ? "secondary" : "outline",
|
|
3040
3052
|
tone: "neutral",
|
|
@@ -3058,7 +3070,7 @@ const _i = ({
|
|
|
3058
3070
|
children: [
|
|
3059
3071
|
/* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", color: "subtlest", children: "Add Filter" }),
|
|
3060
3072
|
o && i && /* @__PURE__ */ e(
|
|
3061
|
-
|
|
3073
|
+
O,
|
|
3062
3074
|
{
|
|
3063
3075
|
variant: "link",
|
|
3064
3076
|
tone: "brand",
|
|
@@ -3091,7 +3103,7 @@ const _i = ({
|
|
|
3091
3103
|
onRemove: r
|
|
3092
3104
|
}) => /* @__PURE__ */ u(Be, { position: "bottom-right", children: [
|
|
3093
3105
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3094
|
-
|
|
3106
|
+
O,
|
|
3095
3107
|
{
|
|
3096
3108
|
variant: "link",
|
|
3097
3109
|
tone: "neutral",
|
|
@@ -3196,7 +3208,7 @@ const _i = ({
|
|
|
3196
3208
|
] }) : t.label;
|
|
3197
3209
|
return /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3198
3210
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3199
|
-
|
|
3211
|
+
O,
|
|
3200
3212
|
{
|
|
3201
3213
|
variant: s ? "secondary" : "outline",
|
|
3202
3214
|
tone: "neutral",
|
|
@@ -3302,7 +3314,7 @@ const _i = ({
|
|
|
3302
3314
|
};
|
|
3303
3315
|
return /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3304
3316
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3305
|
-
|
|
3317
|
+
O,
|
|
3306
3318
|
{
|
|
3307
3319
|
variant: c ? "secondary" : "outline",
|
|
3308
3320
|
tone: "neutral",
|
|
@@ -3353,7 +3365,7 @@ const _i = ({
|
|
|
3353
3365
|
] });
|
|
3354
3366
|
}, Xi = ({ op: t, onChange: r }) => /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3355
3367
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3356
|
-
|
|
3368
|
+
O,
|
|
3357
3369
|
{
|
|
3358
3370
|
variant: "link",
|
|
3359
3371
|
tone: "neutral",
|
|
@@ -3446,7 +3458,7 @@ const _i = ({
|
|
|
3446
3458
|
/* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
|
|
3447
3459
|
/* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3448
3460
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3449
|
-
|
|
3461
|
+
O,
|
|
3450
3462
|
{
|
|
3451
3463
|
variant: "outline",
|
|
3452
3464
|
tone: "neutral",
|
|
@@ -3489,7 +3501,7 @@ const _i = ({
|
|
|
3489
3501
|
),
|
|
3490
3502
|
/* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3491
3503
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3492
|
-
|
|
3504
|
+
O,
|
|
3493
3505
|
{
|
|
3494
3506
|
variant: "outline",
|
|
3495
3507
|
tone: "neutral",
|
|
@@ -3559,7 +3571,7 @@ const _i = ({
|
|
|
3559
3571
|
] });
|
|
3560
3572
|
return /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3561
3573
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3562
|
-
|
|
3574
|
+
O,
|
|
3563
3575
|
{
|
|
3564
3576
|
variant: s > 0 ? "secondary" : "outline",
|
|
3565
3577
|
tone: "neutral",
|
|
@@ -3665,7 +3677,7 @@ const _i = ({
|
|
|
3665
3677
|
] });
|
|
3666
3678
|
return /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3667
3679
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3668
|
-
|
|
3680
|
+
O,
|
|
3669
3681
|
{
|
|
3670
3682
|
variant: s > 0 ? "secondary" : "outline",
|
|
3671
3683
|
tone: "neutral",
|
|
@@ -3792,7 +3804,7 @@ const _i = ({
|
|
|
3792
3804
|
l && /* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${y}-${k} of ${((L = t == null ? void 0 : t.totalData) == null ? void 0 : L.toLocaleString()) || 0}` }),
|
|
3793
3805
|
s && /* @__PURE__ */ u(Be, { position: "bottom-left", children: [
|
|
3794
3806
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3795
|
-
|
|
3807
|
+
O,
|
|
3796
3808
|
{
|
|
3797
3809
|
variant: "outline",
|
|
3798
3810
|
tone: "neutral",
|
|
@@ -3839,7 +3851,7 @@ const _i = ({
|
|
|
3839
3851
|
] });
|
|
3840
3852
|
};
|
|
3841
3853
|
function lo(t, r, n = !0) {
|
|
3842
|
-
|
|
3854
|
+
J(() => {
|
|
3843
3855
|
if (!n) return;
|
|
3844
3856
|
const o = (i) => {
|
|
3845
3857
|
var c;
|
|
@@ -3859,11 +3871,11 @@ const co = 240, yn = ({
|
|
|
3859
3871
|
collapsible: l = !0
|
|
3860
3872
|
}) => {
|
|
3861
3873
|
const { searchParams: s, setSearchParams: c, searchQueries: d } = Ve(), a = yr(t, s, r) || "", [m, p] = R(!l || !!a), [g, b] = R(l && !a), [B, y] = R(a), k = Vn(B, 350), L = se(null);
|
|
3862
|
-
|
|
3874
|
+
J(() => {
|
|
3863
3875
|
y(a), a && p(!0);
|
|
3864
|
-
}, [a]),
|
|
3876
|
+
}, [a]), J(() => {
|
|
3865
3877
|
m && b(!1);
|
|
3866
|
-
}, [m]),
|
|
3878
|
+
}, [m]), J(() => {
|
|
3867
3879
|
k !== a && zt({
|
|
3868
3880
|
value: k,
|
|
3869
3881
|
name: t,
|
|
@@ -3874,7 +3886,7 @@ const co = 240, yn = ({
|
|
|
3874
3886
|
pageKey: n
|
|
3875
3887
|
});
|
|
3876
3888
|
}, [k]);
|
|
3877
|
-
const z =
|
|
3889
|
+
const z = Y(() => {
|
|
3878
3890
|
p(!0), requestAnimationFrame(() => {
|
|
3879
3891
|
var I;
|
|
3880
3892
|
return (I = L.current) == null ? void 0 : I.focus();
|
|
@@ -3884,7 +3896,7 @@ const co = 240, yn = ({
|
|
|
3884
3896
|
// the same time, so spacing to neighbours is handled by the parent cluster.
|
|
3885
3897
|
/* @__PURE__ */ u(f, { display: "flex", direction: "row", align: "center", gap: "spacing-0", children: [
|
|
3886
3898
|
g && /* @__PURE__ */ e(
|
|
3887
|
-
|
|
3899
|
+
O,
|
|
3888
3900
|
{
|
|
3889
3901
|
variant: "outline",
|
|
3890
3902
|
tone: "neutral",
|
|
@@ -3971,7 +3983,7 @@ const co = 240, yn = ({
|
|
|
3971
3983
|
};
|
|
3972
3984
|
return /* @__PURE__ */ u(Be, { position: "bottom-right", children: [
|
|
3973
3985
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
3974
|
-
|
|
3986
|
+
O,
|
|
3975
3987
|
{
|
|
3976
3988
|
variant: r ? "outline" : "secondary",
|
|
3977
3989
|
tone: "neutral",
|
|
@@ -4001,7 +4013,7 @@ const co = 240, yn = ({
|
|
|
4001
4013
|
children: [
|
|
4002
4014
|
/* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", color: "subtle", children: "Show in table" }),
|
|
4003
4015
|
/* @__PURE__ */ e(
|
|
4004
|
-
|
|
4016
|
+
O,
|
|
4005
4017
|
{
|
|
4006
4018
|
variant: "link",
|
|
4007
4019
|
tone: "info",
|
|
@@ -4100,7 +4112,7 @@ const co = 240, yn = ({
|
|
|
4100
4112
|
};
|
|
4101
4113
|
return /* @__PURE__ */ u(Be, { position: "bottom-right", children: [
|
|
4102
4114
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
4103
|
-
|
|
4115
|
+
O,
|
|
4104
4116
|
{
|
|
4105
4117
|
variant: t.length > 0 ? "secondary" : "outline",
|
|
4106
4118
|
tone: (t.length > 0, "neutral"),
|
|
@@ -4129,7 +4141,7 @@ const co = 240, yn = ({
|
|
|
4129
4141
|
startIcon: /* @__PURE__ */ e(E, { name: "Bookmark" }),
|
|
4130
4142
|
onClick: () => r(c),
|
|
4131
4143
|
endIcon: /* @__PURE__ */ e(
|
|
4132
|
-
|
|
4144
|
+
O,
|
|
4133
4145
|
{
|
|
4134
4146
|
variant: "link",
|
|
4135
4147
|
tone: "error",
|
|
@@ -4166,7 +4178,7 @@ const co = 240, yn = ({
|
|
|
4166
4178
|
}
|
|
4167
4179
|
) }),
|
|
4168
4180
|
/* @__PURE__ */ e(
|
|
4169
|
-
|
|
4181
|
+
O,
|
|
4170
4182
|
{
|
|
4171
4183
|
variant: "primary",
|
|
4172
4184
|
tone: "brand",
|
|
@@ -4227,7 +4239,7 @@ const co = 240, yn = ({
|
|
|
4227
4239
|
] })
|
|
4228
4240
|
] }),
|
|
4229
4241
|
/* @__PURE__ */ e(
|
|
4230
|
-
|
|
4242
|
+
O,
|
|
4231
4243
|
{
|
|
4232
4244
|
variant: "link",
|
|
4233
4245
|
tone: "neutral",
|
|
@@ -4346,7 +4358,7 @@ const co = 240, yn = ({
|
|
|
4346
4358
|
},
|
|
4347
4359
|
children: [
|
|
4348
4360
|
/* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
|
|
4349
|
-
|
|
4361
|
+
O,
|
|
4350
4362
|
{
|
|
4351
4363
|
variant: "outline",
|
|
4352
4364
|
tone: "neutral",
|
|
@@ -4358,7 +4370,7 @@ const co = 240, yn = ({
|
|
|
4358
4370
|
}
|
|
4359
4371
|
) }),
|
|
4360
4372
|
/* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
|
|
4361
|
-
|
|
4373
|
+
O,
|
|
4362
4374
|
{
|
|
4363
4375
|
variant: "primary",
|
|
4364
4376
|
tone: "brand",
|
|
@@ -4390,7 +4402,7 @@ const co = 240, yn = ({
|
|
|
4390
4402
|
};
|
|
4391
4403
|
return i ? /* @__PURE__ */ u(Be, { position: "bottom-right", children: [
|
|
4392
4404
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
4393
|
-
|
|
4405
|
+
O,
|
|
4394
4406
|
{
|
|
4395
4407
|
variant: "outline",
|
|
4396
4408
|
tone: "neutral",
|
|
@@ -4440,19 +4452,19 @@ const co = 240, yn = ({
|
|
|
4440
4452
|
defaultPerPage: I,
|
|
4441
4453
|
showPagination: v,
|
|
4442
4454
|
showResultCount: M,
|
|
4443
|
-
showPageSize:
|
|
4444
|
-
hasColumns:
|
|
4445
|
-
orderedColumns:
|
|
4446
|
-
allVisible:
|
|
4447
|
-
onToggleVisibility:
|
|
4455
|
+
showPageSize: $,
|
|
4456
|
+
hasColumns: N,
|
|
4457
|
+
orderedColumns: P,
|
|
4458
|
+
allVisible: G,
|
|
4459
|
+
onToggleVisibility: oe,
|
|
4448
4460
|
onReorder: pe,
|
|
4449
4461
|
onSetAllHidden: ne,
|
|
4450
4462
|
showSavedViews: he,
|
|
4451
|
-
savedViews:
|
|
4463
|
+
savedViews: X,
|
|
4452
4464
|
onApplyView: K,
|
|
4453
4465
|
onDeleteView: me,
|
|
4454
4466
|
onSaveView: te
|
|
4455
|
-
} = t, [de, Fe] = R(!1), { searchQueries: Ze, setSearchParams: ye } = Ve(), Ee = (D == null ? void 0 : D.rangeStart) ?? (((D == null ? void 0 : D.currentPage) || 0) > 1 ? (((D == null ? void 0 : D.currentPage) || 0) - 1) * ((D == null ? void 0 : D.perPage) || 0) + 1 : 1),
|
|
4467
|
+
} = t, [de, Fe] = R(!1), { searchQueries: Ze, setSearchParams: ye } = Ve(), Ee = (D == null ? void 0 : D.rangeStart) ?? (((D == null ? void 0 : D.currentPage) || 0) > 1 ? (((D == null ? void 0 : D.currentPage) || 0) - 1) * ((D == null ? void 0 : D.perPage) || 0) + 1 : 1), He = (D == null ? void 0 : D.rangeEnd) ?? ((D == null ? void 0 : D.totalCurrentPage) !== (D == null ? void 0 : D.perPage) ? D == null ? void 0 : D.totalData : ((D == null ? void 0 : D.currentPage) || 1) * ((D == null ? void 0 : D.totalCurrentPage) || 0)), xe = (Ie) => {
|
|
4456
4468
|
ye({ ...Ze, [y]: String(Ie) });
|
|
4457
4469
|
}, $e = M || v && !!(D != null && D.totalPage), Qe = () => {
|
|
4458
4470
|
p(), Fe(!1);
|
|
@@ -4493,7 +4505,7 @@ const co = 240, yn = ({
|
|
|
4493
4505
|
}
|
|
4494
4506
|
),
|
|
4495
4507
|
/* @__PURE__ */ e(
|
|
4496
|
-
|
|
4508
|
+
O,
|
|
4497
4509
|
{
|
|
4498
4510
|
variant: l ? "secondary" : "outline",
|
|
4499
4511
|
tone: "neutral",
|
|
@@ -4516,18 +4528,18 @@ const co = 240, yn = ({
|
|
|
4516
4528
|
he && /* @__PURE__ */ e(
|
|
4517
4529
|
bn,
|
|
4518
4530
|
{
|
|
4519
|
-
views:
|
|
4531
|
+
views: X,
|
|
4520
4532
|
onApply: K,
|
|
4521
4533
|
onDelete: me,
|
|
4522
4534
|
onSave: te
|
|
4523
4535
|
}
|
|
4524
4536
|
),
|
|
4525
|
-
|
|
4537
|
+
N && /* @__PURE__ */ e(
|
|
4526
4538
|
xn,
|
|
4527
4539
|
{
|
|
4528
|
-
columns:
|
|
4529
|
-
allVisible:
|
|
4530
|
-
onToggle:
|
|
4540
|
+
columns: P,
|
|
4541
|
+
allVisible: G,
|
|
4542
|
+
onToggle: oe,
|
|
4531
4543
|
onReorder: pe,
|
|
4532
4544
|
onSetAllHidden: ne
|
|
4533
4545
|
}
|
|
@@ -4539,7 +4551,7 @@ const co = 240, yn = ({
|
|
|
4539
4551
|
pageKey: y,
|
|
4540
4552
|
pageSizeOptions: V,
|
|
4541
4553
|
defaultPerPage: I,
|
|
4542
|
-
showPageSize:
|
|
4554
|
+
showPageSize: $
|
|
4543
4555
|
}
|
|
4544
4556
|
)
|
|
4545
4557
|
]
|
|
@@ -4558,7 +4570,7 @@ const co = 240, yn = ({
|
|
|
4558
4570
|
gap: "sm",
|
|
4559
4571
|
fullWidth: !0,
|
|
4560
4572
|
children: [
|
|
4561
|
-
M ? /* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${Ee}-${
|
|
4573
|
+
M ? /* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${Ee}-${He} of ${((be = D == null ? void 0 : D.totalData) == null ? void 0 : be.toLocaleString()) || 0}` }) : /* @__PURE__ */ e(f, { direction: "column" }),
|
|
4562
4574
|
v && !!(D != null && D.totalPage) && /* @__PURE__ */ e(
|
|
4563
4575
|
dr,
|
|
4564
4576
|
{
|
|
@@ -4619,16 +4631,16 @@ const co = 240, yn = ({
|
|
|
4619
4631
|
savedViews: I,
|
|
4620
4632
|
persistLastState: v = !0,
|
|
4621
4633
|
storage: M = fn,
|
|
4622
|
-
onReset:
|
|
4634
|
+
onReset: $
|
|
4623
4635
|
}) => {
|
|
4624
|
-
const
|
|
4625
|
-
activeKeys:
|
|
4626
|
-
configByKey:
|
|
4627
|
-
hasActiveFilter:
|
|
4636
|
+
const N = V ?? (I == null ? void 0 : I.scopeId), {
|
|
4637
|
+
activeKeys: P,
|
|
4638
|
+
configByKey: G,
|
|
4639
|
+
hasActiveFilter: oe,
|
|
4628
4640
|
toggleFilter: pe,
|
|
4629
4641
|
removeFilter: ne,
|
|
4630
4642
|
getValue: he,
|
|
4631
|
-
setValue:
|
|
4643
|
+
setValue: X,
|
|
4632
4644
|
clearValue: K,
|
|
4633
4645
|
clearAll: me
|
|
4634
4646
|
} = xr({
|
|
@@ -4637,40 +4649,40 @@ const co = 240, yn = ({
|
|
|
4637
4649
|
activeFilterKey: o,
|
|
4638
4650
|
pageKey: i,
|
|
4639
4651
|
searchKey: g
|
|
4640
|
-
}), te =
|
|
4652
|
+
}), te = Hi({
|
|
4641
4653
|
columns: z,
|
|
4642
|
-
scopeId:
|
|
4654
|
+
scopeId: N,
|
|
4643
4655
|
storage: M,
|
|
4644
4656
|
onColumnsChange: D,
|
|
4645
4657
|
value: C
|
|
4646
|
-
}), de =
|
|
4647
|
-
scopeId:
|
|
4658
|
+
}), de = Oi({
|
|
4659
|
+
scopeId: N,
|
|
4648
4660
|
storage: M,
|
|
4649
4661
|
snapshotKeys: [o, n, l],
|
|
4650
4662
|
pageKey: i,
|
|
4651
4663
|
getColumns: () => te.state,
|
|
4652
4664
|
applyColumns: te.applyState
|
|
4653
4665
|
}), Fe = Ti({
|
|
4654
|
-
scopeId:
|
|
4666
|
+
scopeId: N,
|
|
4655
4667
|
storage: M,
|
|
4656
4668
|
snapshotKeys: [o, n, i],
|
|
4657
4669
|
enabled: v
|
|
4658
4670
|
}), Ze = Ni({
|
|
4659
|
-
scopeId:
|
|
4671
|
+
scopeId: N,
|
|
4660
4672
|
storage: M,
|
|
4661
4673
|
perPageKey: l,
|
|
4662
4674
|
pageSizeOptions: s,
|
|
4663
4675
|
enabled: v
|
|
4664
4676
|
});
|
|
4665
4677
|
ji({
|
|
4666
|
-
enabled: v &&
|
|
4678
|
+
enabled: v && !!N,
|
|
4667
4679
|
snapshotKeys: [o, n, i],
|
|
4668
4680
|
perPageKey: l,
|
|
4669
4681
|
readSnapshot: Fe.read,
|
|
4670
4682
|
readPerPage: Ze.read
|
|
4671
4683
|
});
|
|
4672
|
-
const ye = c ?? s[0] ?? 25, Ee = !!(I != null && I.enabled) && de.enabled,
|
|
4673
|
-
me(), Fe.clear(),
|
|
4684
|
+
const ye = c ?? s[0] ?? 25, Ee = !!(I != null && I.enabled) && de.enabled, He = () => {
|
|
4685
|
+
me(), Fe.clear(), $ == null || $();
|
|
4674
4686
|
}, xe = ke("md"), $e = p ? /* @__PURE__ */ e(
|
|
4675
4687
|
yn,
|
|
4676
4688
|
{
|
|
@@ -4711,10 +4723,10 @@ const co = 240, yn = ({
|
|
|
4711
4723
|
_i,
|
|
4712
4724
|
{
|
|
4713
4725
|
configs: r,
|
|
4714
|
-
activeKeys:
|
|
4726
|
+
activeKeys: P,
|
|
4715
4727
|
onToggle: pe,
|
|
4716
|
-
hasActiveFilter:
|
|
4717
|
-
onReset:
|
|
4728
|
+
hasActiveFilter: oe,
|
|
4729
|
+
onReset: He
|
|
4718
4730
|
}
|
|
4719
4731
|
),
|
|
4720
4732
|
y === "left" && $e,
|
|
@@ -4731,21 +4743,21 @@ const co = 240, yn = ({
|
|
|
4731
4743
|
/* @__PURE__ */ e(
|
|
4732
4744
|
pn,
|
|
4733
4745
|
{
|
|
4734
|
-
activeKeys:
|
|
4735
|
-
configByKey:
|
|
4746
|
+
activeKeys: P,
|
|
4747
|
+
configByKey: G,
|
|
4736
4748
|
getValue: he,
|
|
4737
|
-
setValue:
|
|
4749
|
+
setValue: X,
|
|
4738
4750
|
clearValue: K,
|
|
4739
4751
|
removeFilter: ne
|
|
4740
4752
|
}
|
|
4741
4753
|
),
|
|
4742
|
-
|
|
4743
|
-
|
|
4754
|
+
oe && /* @__PURE__ */ e(
|
|
4755
|
+
O,
|
|
4744
4756
|
{
|
|
4745
4757
|
variant: "link",
|
|
4746
4758
|
tone: "brand",
|
|
4747
4759
|
size: "sm",
|
|
4748
|
-
onClick:
|
|
4760
|
+
onClick: He,
|
|
4749
4761
|
children: "Reset"
|
|
4750
4762
|
}
|
|
4751
4763
|
)
|
|
@@ -4797,15 +4809,15 @@ const co = 240, yn = ({
|
|
|
4797
4809
|
{
|
|
4798
4810
|
withPadding: t,
|
|
4799
4811
|
configs: r,
|
|
4800
|
-
activeKeys:
|
|
4801
|
-
configByKey:
|
|
4802
|
-
hasActiveFilter:
|
|
4812
|
+
activeKeys: P,
|
|
4813
|
+
configByKey: G,
|
|
4814
|
+
hasActiveFilter: oe,
|
|
4803
4815
|
toggleFilter: pe,
|
|
4804
4816
|
removeFilter: ne,
|
|
4805
4817
|
getValue: he,
|
|
4806
|
-
setValue:
|
|
4818
|
+
setValue: X,
|
|
4807
4819
|
clearValue: K,
|
|
4808
|
-
onReset:
|
|
4820
|
+
onReset: He,
|
|
4809
4821
|
searchable: p,
|
|
4810
4822
|
searchKey: g,
|
|
4811
4823
|
filterKey: n,
|
|
@@ -4886,15 +4898,15 @@ const co = 240, yn = ({
|
|
|
4886
4898
|
I && (z[(a == null ? void 0 : a.search) ?? "search"] = I);
|
|
4887
4899
|
let v = !1;
|
|
4888
4900
|
for (const M of p) {
|
|
4889
|
-
const
|
|
4890
|
-
if (
|
|
4891
|
-
const
|
|
4892
|
-
D[M] =
|
|
4893
|
-
const
|
|
4894
|
-
if (
|
|
4901
|
+
const $ = g[M];
|
|
4902
|
+
if (!$) continue;
|
|
4903
|
+
const N = B($);
|
|
4904
|
+
D[M] = N;
|
|
4905
|
+
const P = m == null ? void 0 : m[M], G = P ? P(N) : go($, N);
|
|
4906
|
+
if (G == null || Array.isArray(G) && G.length === 0)
|
|
4895
4907
|
continue;
|
|
4896
|
-
const
|
|
4897
|
-
z[
|
|
4908
|
+
const oe = (a == null ? void 0 : a[M]) ?? M;
|
|
4909
|
+
z[oe] = G, v = !0;
|
|
4898
4910
|
}
|
|
4899
4911
|
return {
|
|
4900
4912
|
params: z,
|
|
@@ -4937,7 +4949,7 @@ const co = 240, yn = ({
|
|
|
4937
4949
|
var C;
|
|
4938
4950
|
const D = L.options;
|
|
4939
4951
|
return ((C = D == null ? void 0 : D.find((V) => V.value === z)) == null ? void 0 : C.label) ?? z;
|
|
4940
|
-
}, g =
|
|
4952
|
+
}, g = Y(
|
|
4941
4953
|
(L) => {
|
|
4942
4954
|
const z = l[L];
|
|
4943
4955
|
if (!z) return [];
|
|
@@ -4945,7 +4957,7 @@ const co = 240, yn = ({
|
|
|
4945
4957
|
return Array.isArray(D) ? D.map((C) => String(C.value)) : [];
|
|
4946
4958
|
},
|
|
4947
4959
|
[l, s]
|
|
4948
|
-
), b =
|
|
4960
|
+
), b = Y(
|
|
4949
4961
|
(L, z) => {
|
|
4950
4962
|
const D = l[L];
|
|
4951
4963
|
if (!D || !po.includes(D.type)) return;
|
|
@@ -4960,16 +4972,16 @@ const co = 240, yn = ({
|
|
|
4960
4972
|
);
|
|
4961
4973
|
},
|
|
4962
4974
|
[l, c, d]
|
|
4963
|
-
), B =
|
|
4975
|
+
), B = Y(
|
|
4964
4976
|
(L, z) => {
|
|
4965
4977
|
const D = g(L);
|
|
4966
4978
|
b(L, D.includes(z) ? D.filter((C) => C !== z) : [...D, z]);
|
|
4967
4979
|
},
|
|
4968
4980
|
[g, b]
|
|
4969
|
-
), y =
|
|
4981
|
+
), y = Y(
|
|
4970
4982
|
(L, z) => g(L).includes(z),
|
|
4971
4983
|
[g]
|
|
4972
|
-
), k =
|
|
4984
|
+
), k = Y((L) => d(L), [d]);
|
|
4973
4985
|
return { set: b, toggle: B, clear: k, clearAll: a, isActive: y, values: g, hasActiveFilter: m };
|
|
4974
4986
|
}, sc = (t, r) => {
|
|
4975
4987
|
if (!t) return {};
|
|
@@ -4996,7 +5008,7 @@ const co = 240, yn = ({
|
|
|
4996
5008
|
}
|
|
4997
5009
|
}, yo = ({ children: t, borderRadius: r, height: n }) => {
|
|
4998
5010
|
const o = se(null), [i, l] = R("100vh");
|
|
4999
|
-
return
|
|
5011
|
+
return J(() => {
|
|
5000
5012
|
if (n) return;
|
|
5001
5013
|
const s = () => {
|
|
5002
5014
|
if (o.current) {
|
|
@@ -5069,7 +5081,7 @@ const co = 240, yn = ({
|
|
|
5069
5081
|
},
|
|
5070
5082
|
children: t.map(
|
|
5071
5083
|
({ title: a, icon: m, buttonProps: p, onClick: g }, b) => !a && !m ? null : /* @__PURE__ */ e(
|
|
5072
|
-
|
|
5084
|
+
O,
|
|
5073
5085
|
{
|
|
5074
5086
|
fullWidth: !s,
|
|
5075
5087
|
iconLeft: m ? /* @__PURE__ */ e(E, { name: m }) : void 0,
|
|
@@ -5194,19 +5206,19 @@ const co = 240, yn = ({
|
|
|
5194
5206
|
const [n, o] = R(!1), i = se(null), l = se(null), s = se(null), [c, d] = R(""), [a, m] = R({ top: 0, left: 0 }), p = t.selectedValues, g = ge(() => c ? t.options.filter(
|
|
5195
5207
|
(y) => y.label.toLowerCase().includes(c.toLowerCase())
|
|
5196
5208
|
) : t.options, [t.options, c]);
|
|
5197
|
-
|
|
5209
|
+
J(() => {
|
|
5198
5210
|
if (n && l.current) {
|
|
5199
5211
|
const y = l.current.getBoundingClientRect(), k = 280, L = {
|
|
5200
5212
|
top: y.bottom + 8
|
|
5201
5213
|
};
|
|
5202
5214
|
t.position === "left" || y.left + k > window.innerWidth ? L.right = window.innerWidth - y.right : L.left = y.left, m(L);
|
|
5203
5215
|
}
|
|
5204
|
-
}, [n, t.position]),
|
|
5216
|
+
}, [n, t.position]), J(() => {
|
|
5205
5217
|
n && s.current ? setTimeout(() => {
|
|
5206
5218
|
var y;
|
|
5207
5219
|
return (y = s.current) == null ? void 0 : y.focus();
|
|
5208
5220
|
}, 50) : d("");
|
|
5209
|
-
}, [n]),
|
|
5221
|
+
}, [n]), J(() => {
|
|
5210
5222
|
const y = (k) => {
|
|
5211
5223
|
i.current && !i.current.contains(k.target) && l.current && !l.current.contains(k.target) && o(!1);
|
|
5212
5224
|
};
|
|
@@ -5568,73 +5580,73 @@ const co = 240, yn = ({
|
|
|
5568
5580
|
onSortChange: I,
|
|
5569
5581
|
showActionDivider: v = !1
|
|
5570
5582
|
}) => {
|
|
5571
|
-
const M = C !== void 0, [N
|
|
5583
|
+
const M = C !== void 0, [$, N] = R(
|
|
5572
5584
|
V ?? null
|
|
5573
|
-
),
|
|
5585
|
+
), P = M ? C ?? null : $, G = (W) => {
|
|
5574
5586
|
if (W.sortKey) return W.sortKey;
|
|
5575
5587
|
if (typeof W.accessor == "string") return W.accessor;
|
|
5576
|
-
},
|
|
5577
|
-
const
|
|
5578
|
-
if (!
|
|
5588
|
+
}, oe = (W) => {
|
|
5589
|
+
const H = G(W);
|
|
5590
|
+
if (!H) return;
|
|
5579
5591
|
let T;
|
|
5580
|
-
!
|
|
5581
|
-
}, ne = [n, o, i].filter((W) => W !== void 0).length, he = !!b,
|
|
5582
|
-
if (!
|
|
5583
|
-
if (typeof
|
|
5584
|
-
if (typeof
|
|
5592
|
+
!P || P.key !== H ? T = { key: H, direction: "asc" } : P.direction === "asc" ? T = { key: H, direction: "desc" } : T = null, M || N(T), I == null || I(T);
|
|
5593
|
+
}, ne = [n, o, i].filter((W) => W !== void 0).length, he = !!b, X = !!n || !!o || !!i || he, K = "var(--sa-border-subtle, #0b120e24)", me = `1px solid ${K}`, te = `inset 1px 0 0 ${K}`, de = `inset -1px 0 0 ${K}`, Fe = ne === 3 ? he ? "178px" : "140px" : ne === 2 ? he ? "140px" : "102px" : ne === 1 ? he ? "112px" : "74px" : he ? "74px" : "", Ze = (W, H) => {
|
|
5594
|
+
if (!H) return W;
|
|
5595
|
+
if (typeof H == "function") return H(W);
|
|
5596
|
+
if (typeof H == "string") return W[H];
|
|
5585
5597
|
}, [ye, Ee] = R(!1);
|
|
5586
|
-
|
|
5598
|
+
J(() => {
|
|
5587
5599
|
if (!(m != null && m.current)) return;
|
|
5588
5600
|
const W = m.current;
|
|
5589
5601
|
Ee(W.scrollHeight > W.clientHeight);
|
|
5590
5602
|
}, [r, m]);
|
|
5591
|
-
const
|
|
5603
|
+
const He = se(null), [xe, $e] = R([]), [Qe, be] = R(
|
|
5592
5604
|
() => L ?? {}
|
|
5593
5605
|
), Ie = se(null);
|
|
5594
5606
|
lt(() => {
|
|
5595
|
-
if (!p || !
|
|
5607
|
+
if (!p || !He.current) {
|
|
5596
5608
|
$e([]);
|
|
5597
5609
|
return;
|
|
5598
5610
|
}
|
|
5599
5611
|
const W = Array.from(
|
|
5600
|
-
|
|
5601
|
-
),
|
|
5612
|
+
He.current.querySelectorAll("thead tr th")
|
|
5613
|
+
), H = [];
|
|
5602
5614
|
let T = 0;
|
|
5603
|
-
W.forEach((
|
|
5604
|
-
|
|
5605
|
-
}), $e(
|
|
5615
|
+
W.forEach((_, Q) => {
|
|
5616
|
+
H[Q] = T, Q < p && (T += _.offsetWidth);
|
|
5617
|
+
}), $e(H);
|
|
5606
5618
|
}, [p, t, r, Qe]);
|
|
5607
5619
|
const et = (W) => {
|
|
5608
5620
|
g && g(W < p ? W : W + 1);
|
|
5609
|
-
}, S = (W,
|
|
5621
|
+
}, S = (W, H) => {
|
|
5610
5622
|
const T = Qe[W];
|
|
5611
5623
|
if (T !== void 0) {
|
|
5612
|
-
const
|
|
5613
|
-
return { width:
|
|
5624
|
+
const _ = `${T}px`;
|
|
5625
|
+
return { width: _, minWidth: _, maxWidth: _ };
|
|
5614
5626
|
}
|
|
5615
|
-
return
|
|
5616
|
-
}, Z = (W) => k && (W.resizable ?? !0),
|
|
5627
|
+
return H ? { width: H } : {};
|
|
5628
|
+
}, Z = (W) => k && (W.resizable ?? !0), j = (W, H) => {
|
|
5617
5629
|
W.preventDefault(), W.stopPropagation();
|
|
5618
5630
|
const T = W.currentTarget.closest("th");
|
|
5619
5631
|
if (!T) return;
|
|
5620
|
-
const
|
|
5621
|
-
Ie.current = { colIndex:
|
|
5622
|
-
const
|
|
5632
|
+
const _ = Math.round(T.getBoundingClientRect().width);
|
|
5633
|
+
Ie.current = { colIndex: H, startX: W.clientX, startWidth: _ };
|
|
5634
|
+
const Q = document.body.style.userSelect, Ce = document.body.style.cursor;
|
|
5623
5635
|
document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
|
|
5624
5636
|
const Le = (_e) => {
|
|
5625
5637
|
var nt;
|
|
5626
|
-
const
|
|
5627
|
-
if (!
|
|
5628
|
-
const tt = ((nt = t[
|
|
5638
|
+
const Oe = Ie.current;
|
|
5639
|
+
if (!Oe) return;
|
|
5640
|
+
const tt = ((nt = t[Oe.colIndex]) == null ? void 0 : nt.minWidth) ?? D, rt = Math.max(tt, Oe.startWidth + (_e.clientX - Oe.startX));
|
|
5629
5641
|
be(
|
|
5630
|
-
(Pe) => Pe[
|
|
5642
|
+
(Pe) => Pe[Oe.colIndex] === rt ? Pe : { ...Pe, [Oe.colIndex]: rt }
|
|
5631
5643
|
);
|
|
5632
5644
|
}, je = () => {
|
|
5633
|
-
document.removeEventListener("mousemove", Le), document.removeEventListener("mouseup", je), document.body.style.userSelect =
|
|
5645
|
+
document.removeEventListener("mousemove", Le), document.removeEventListener("mouseup", je), document.body.style.userSelect = Q, document.body.style.cursor = Ce, Ie.current = null, z && be((_e) => (z(_e), _e));
|
|
5634
5646
|
};
|
|
5635
5647
|
document.addEventListener("mousemove", Le), document.addEventListener("mouseup", je);
|
|
5636
5648
|
};
|
|
5637
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
5649
|
+
return /* @__PURE__ */ e("div", { ref: He, children: /* @__PURE__ */ u(ur, { fullWidth: !0, children: [
|
|
5638
5650
|
/* @__PURE__ */ e(
|
|
5639
5651
|
tn,
|
|
5640
5652
|
{
|
|
@@ -5643,9 +5655,9 @@ const co = 240, yn = ({
|
|
|
5643
5655
|
whiteSpace: "nowrap"
|
|
5644
5656
|
},
|
|
5645
5657
|
children: /* @__PURE__ */ u(Te, { children: [
|
|
5646
|
-
t.map((W,
|
|
5658
|
+
t.map((W, H) => {
|
|
5647
5659
|
var ct, st;
|
|
5648
|
-
const T = p > 0 &&
|
|
5660
|
+
const T = p > 0 && H < p, _ = xe[H] ?? 0, Q = Z(W), Le = H === t.length - 1 && X && v, je = G(W), _e = !!W.sortable && !!je, Oe = _e && (P == null ? void 0 : P.key) === je ? P.direction : null, tt = W.title || ((ct = W.accessor) == null ? void 0 : ct.toString()) || "", rt = (st = W.headerTooltip) != null && st.showIcon ? /* @__PURE__ */ e(
|
|
5649
5661
|
E,
|
|
5650
5662
|
{
|
|
5651
5663
|
name: "InfoCircle",
|
|
@@ -5656,8 +5668,8 @@ const co = 240, yn = ({
|
|
|
5656
5668
|
"button",
|
|
5657
5669
|
{
|
|
5658
5670
|
type: "button",
|
|
5659
|
-
onClick: () =>
|
|
5660
|
-
title:
|
|
5671
|
+
onClick: () => oe(W),
|
|
5672
|
+
title: Oe === "asc" ? "Sorted ascending — click to sort descending" : Oe === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
|
|
5661
5673
|
style: {
|
|
5662
5674
|
flex: 1,
|
|
5663
5675
|
minWidth: 0,
|
|
@@ -5676,7 +5688,7 @@ const co = 240, yn = ({
|
|
|
5676
5688
|
children: [
|
|
5677
5689
|
nt,
|
|
5678
5690
|
rt,
|
|
5679
|
-
/* @__PURE__ */ e(wo, { direction:
|
|
5691
|
+
/* @__PURE__ */ e(wo, { direction: Oe })
|
|
5680
5692
|
]
|
|
5681
5693
|
}
|
|
5682
5694
|
) : /* @__PURE__ */ u("span", { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
@@ -5689,15 +5701,15 @@ const co = 240, yn = ({
|
|
|
5689
5701
|
style: {
|
|
5690
5702
|
position: "sticky",
|
|
5691
5703
|
top: 0,
|
|
5692
|
-
left: T ?
|
|
5704
|
+
left: T ? _ : void 0,
|
|
5693
5705
|
zIndex: T ? 4 : 2,
|
|
5694
|
-
paddingLeft:
|
|
5706
|
+
paddingLeft: H === 0 ? "12px" : "",
|
|
5695
5707
|
borderRight: a && !Le && !T ? me : void 0,
|
|
5696
5708
|
borderBottom: a ? me : void 0,
|
|
5697
5709
|
boxShadow: a && T ? de : void 0,
|
|
5698
5710
|
backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
5699
5711
|
textAlign: W.textAlign === "text-right" ? "right" : W.textAlign === "text-center" ? "center" : "left",
|
|
5700
|
-
...S(
|
|
5712
|
+
...S(H, W.width)
|
|
5701
5713
|
},
|
|
5702
5714
|
children: [
|
|
5703
5715
|
/* @__PURE__ */ u(
|
|
@@ -5722,7 +5734,7 @@ const co = 240, yn = ({
|
|
|
5722
5734
|
g && /* @__PURE__ */ e(
|
|
5723
5735
|
"button",
|
|
5724
5736
|
{
|
|
5725
|
-
onClick: () => et(
|
|
5737
|
+
onClick: () => et(H),
|
|
5726
5738
|
title: T ? "Unfreeze column" : "Freeze column",
|
|
5727
5739
|
style: {
|
|
5728
5740
|
background: "none",
|
|
@@ -5742,10 +5754,10 @@ const co = 240, yn = ({
|
|
|
5742
5754
|
]
|
|
5743
5755
|
}
|
|
5744
5756
|
),
|
|
5745
|
-
|
|
5757
|
+
Q && /* @__PURE__ */ e(
|
|
5746
5758
|
"div",
|
|
5747
5759
|
{
|
|
5748
|
-
onMouseDown: (at) =>
|
|
5760
|
+
onMouseDown: (at) => j(at, H),
|
|
5749
5761
|
onClick: (at) => at.stopPropagation(),
|
|
5750
5762
|
role: "separator",
|
|
5751
5763
|
"aria-orientation": "vertical",
|
|
@@ -5765,10 +5777,10 @@ const co = 240, yn = ({
|
|
|
5765
5777
|
)
|
|
5766
5778
|
]
|
|
5767
5779
|
},
|
|
5768
|
-
`table-head-${
|
|
5780
|
+
`table-head-${H}`
|
|
5769
5781
|
);
|
|
5770
5782
|
}),
|
|
5771
|
-
|
|
5783
|
+
X ? /* @__PURE__ */ e(
|
|
5772
5784
|
ut,
|
|
5773
5785
|
{
|
|
5774
5786
|
style: {
|
|
@@ -5791,29 +5803,29 @@ const co = 240, yn = ({
|
|
|
5791
5803
|
/* @__PURE__ */ e(Ye, { variant: "list" }),
|
|
5792
5804
|
/* @__PURE__ */ e(Ye, { variant: "list" }),
|
|
5793
5805
|
/* @__PURE__ */ e(Ye, { variant: "list" })
|
|
5794
|
-
] }) }) }) : !(r != null && r.length) && y ? /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(Re, { colSpan: t.length + 1, children: y }) }) : r == null ? void 0 : r.map((W,
|
|
5806
|
+
] }) }) }) : !(r != null && r.length) && y ? /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(Re, { colSpan: t.length + 1, children: y }) }) : r == null ? void 0 : r.map((W, H) => /* @__PURE__ */ u(
|
|
5795
5807
|
Te,
|
|
5796
5808
|
{
|
|
5797
5809
|
style: {
|
|
5798
5810
|
transition: "background-color 0.3s ease",
|
|
5799
5811
|
padding: 0,
|
|
5800
|
-
borderBottom:
|
|
5812
|
+
borderBottom: H === r.length - 1 && ye ? void 0 : "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
5801
5813
|
},
|
|
5802
5814
|
onMouseEnter: (T) => {
|
|
5803
|
-
const
|
|
5804
|
-
|
|
5805
|
-
|
|
5815
|
+
const _ = T.currentTarget;
|
|
5816
|
+
_.style.backgroundColor = qr, Array.from(_.querySelectorAll("td")).forEach((Q) => {
|
|
5817
|
+
Q.style.position === "sticky" && (Q.style.backgroundColor = qr);
|
|
5806
5818
|
});
|
|
5807
5819
|
},
|
|
5808
5820
|
onMouseLeave: (T) => {
|
|
5809
|
-
const
|
|
5810
|
-
|
|
5811
|
-
|
|
5821
|
+
const _ = T.currentTarget;
|
|
5822
|
+
_.style.backgroundColor = "", Array.from(_.querySelectorAll("td")).forEach((Q) => {
|
|
5823
|
+
Q.style.position === "sticky" && (Q.style.backgroundColor = er);
|
|
5812
5824
|
});
|
|
5813
5825
|
},
|
|
5814
5826
|
children: [
|
|
5815
|
-
t.map((T,
|
|
5816
|
-
const
|
|
5827
|
+
t.map((T, _) => {
|
|
5828
|
+
const Q = T.render ? T.render(W, H, r) : Ze(W, T.accessor), Ce = p > 0 && _ < p, Le = xe[_] ?? 0, je = Qe[_] !== void 0, _e = Ce && _ === p - 1;
|
|
5817
5829
|
return /* @__PURE__ */ e(
|
|
5818
5830
|
Re,
|
|
5819
5831
|
{
|
|
@@ -5823,16 +5835,16 @@ const co = 240, yn = ({
|
|
|
5823
5835
|
zIndex: Ce ? 1 : void 0,
|
|
5824
5836
|
backgroundColor: Ce ? er : void 0,
|
|
5825
5837
|
transition: Ce ? "background-color 0.3s ease" : void 0,
|
|
5826
|
-
paddingLeft:
|
|
5838
|
+
paddingLeft: _ === 0 ? "12px" : "",
|
|
5827
5839
|
whiteSpace: "nowrap",
|
|
5828
5840
|
overflow: je ? "hidden" : void 0,
|
|
5829
5841
|
borderLeft: T.showBorderLeft ? me : void 0,
|
|
5830
5842
|
borderRight: T.showBorderRight ? me : void 0,
|
|
5831
5843
|
boxShadow: _e ? de : void 0,
|
|
5832
5844
|
textAlign: T.textAlign === "text-right" ? "right" : T.textAlign === "text-center" ? "center" : "left",
|
|
5833
|
-
...S(
|
|
5845
|
+
...S(_, T.width)
|
|
5834
5846
|
},
|
|
5835
|
-
children: typeof
|
|
5847
|
+
children: typeof Q == "string" ? /* @__PURE__ */ e(
|
|
5836
5848
|
w,
|
|
5837
5849
|
{
|
|
5838
5850
|
style: {
|
|
@@ -5841,14 +5853,14 @@ const co = 240, yn = ({
|
|
|
5841
5853
|
textOverflow: "ellipsis",
|
|
5842
5854
|
textAlign: T.textAlign === "text-right" ? "right" : T.textAlign === "text-center" ? "center" : "left"
|
|
5843
5855
|
},
|
|
5844
|
-
children:
|
|
5856
|
+
children: Q
|
|
5845
5857
|
}
|
|
5846
|
-
) :
|
|
5858
|
+
) : Q
|
|
5847
5859
|
},
|
|
5848
|
-
`row-${
|
|
5860
|
+
`row-${H}-col-${_}`
|
|
5849
5861
|
);
|
|
5850
5862
|
}),
|
|
5851
|
-
|
|
5863
|
+
X ? /* @__PURE__ */ e(Re, { style: {
|
|
5852
5864
|
width: Fe,
|
|
5853
5865
|
position: "sticky",
|
|
5854
5866
|
right: 0,
|
|
@@ -5857,9 +5869,9 @@ const co = 240, yn = ({
|
|
|
5857
5869
|
boxShadow: v ? te : void 0,
|
|
5858
5870
|
transition: "background-color 0.3s ease"
|
|
5859
5871
|
}, children: /* @__PURE__ */ e(ce, { direction: "row", align: "center", justify: "center", gap: "sm", children: B.map((T) => {
|
|
5860
|
-
const
|
|
5861
|
-
return T === "detail" && n && (d == null ? void 0 : d(W)) !== !1 ? /* @__PURE__ */ e(We, { label: "Detail", position:
|
|
5862
|
-
|
|
5872
|
+
const _ = H === r.length - 1 ? "top" : "bottom";
|
|
5873
|
+
return T === "detail" && n && (d == null ? void 0 : d(W)) !== !1 ? /* @__PURE__ */ e(We, { label: "Detail", position: _, children: /* @__PURE__ */ e(
|
|
5874
|
+
O,
|
|
5863
5875
|
{
|
|
5864
5876
|
size: "xs",
|
|
5865
5877
|
variant: "outline",
|
|
@@ -5867,8 +5879,8 @@ const co = 240, yn = ({
|
|
|
5867
5879
|
onClick: () => n(W.id, W),
|
|
5868
5880
|
iconLeft: /* @__PURE__ */ e(E, { name: "DocumentClean", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
5869
5881
|
}
|
|
5870
|
-
) }, "detail") : T === "update" && o && (c == null ? void 0 : c(W)) !== !1 ? /* @__PURE__ */ e(We, { label: "Update", position:
|
|
5871
|
-
|
|
5882
|
+
) }, "detail") : T === "update" && o && (c == null ? void 0 : c(W)) !== !1 ? /* @__PURE__ */ e(We, { label: "Update", position: _, children: /* @__PURE__ */ e(
|
|
5883
|
+
O,
|
|
5872
5884
|
{
|
|
5873
5885
|
size: "xs",
|
|
5874
5886
|
variant: "outline",
|
|
@@ -5876,8 +5888,8 @@ const co = 240, yn = ({
|
|
|
5876
5888
|
onClick: () => o(W),
|
|
5877
5889
|
iconLeft: /* @__PURE__ */ e(E, { name: "Edit1", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
5878
5890
|
}
|
|
5879
|
-
) }, "update") : T === "delete" && i && (s == null ? void 0 : s(W)) !== !1 ? /* @__PURE__ */ e(We, { label: "Delete", position:
|
|
5880
|
-
|
|
5891
|
+
) }, "update") : T === "delete" && i && (s == null ? void 0 : s(W)) !== !1 ? /* @__PURE__ */ e(We, { label: "Delete", position: _, children: /* @__PURE__ */ e(
|
|
5892
|
+
O,
|
|
5881
5893
|
{
|
|
5882
5894
|
size: "xs",
|
|
5883
5895
|
variant: "outline",
|
|
@@ -5889,7 +5901,7 @@ const co = 240, yn = ({
|
|
|
5889
5901
|
}) }) }) : null
|
|
5890
5902
|
]
|
|
5891
5903
|
},
|
|
5892
|
-
`${W}${
|
|
5904
|
+
`${W}${H}`
|
|
5893
5905
|
)) })
|
|
5894
5906
|
] }) });
|
|
5895
5907
|
}, So = ({
|
|
@@ -5994,7 +6006,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
5994
6006
|
const [a, m] = R(!1), p = se(null), g = se(null), [b, B] = R(
|
|
5995
6007
|
{ top: 0, left: 0 }
|
|
5996
6008
|
);
|
|
5997
|
-
|
|
6009
|
+
J(() => {
|
|
5998
6010
|
if (a && p.current) {
|
|
5999
6011
|
const k = p.current.getBoundingClientRect(), L = k.left + Ur > window.innerWidth;
|
|
6000
6012
|
B({
|
|
@@ -6002,7 +6014,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6002
6014
|
...L ? { right: window.innerWidth - k.right } : { left: k.left }
|
|
6003
6015
|
});
|
|
6004
6016
|
}
|
|
6005
|
-
}, [a]),
|
|
6017
|
+
}, [a]), J(() => {
|
|
6006
6018
|
if (!a) return;
|
|
6007
6019
|
const k = (L) => {
|
|
6008
6020
|
g.current && !g.current.contains(L.target) && p.current && !p.current.contains(L.target) && m(!1);
|
|
@@ -6181,22 +6193,22 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6181
6193
|
rowActions: C
|
|
6182
6194
|
}) => {
|
|
6183
6195
|
Wo();
|
|
6184
|
-
const I = !ke(B) && b !== "scroll", v = !!(C != null && C.length), [M,
|
|
6185
|
-
|
|
6196
|
+
const I = !ke(B) && b !== "scroll", v = !!(C != null && C.length), [M, $] = R(null);
|
|
6197
|
+
J(() => {
|
|
6186
6198
|
if (!M) return;
|
|
6187
|
-
const x = () =>
|
|
6199
|
+
const x = () => $(null), F = setTimeout(() => document.addEventListener("click", x), 0);
|
|
6188
6200
|
return () => {
|
|
6189
6201
|
clearTimeout(F), document.removeEventListener("click", x);
|
|
6190
6202
|
};
|
|
6191
6203
|
}, [M]);
|
|
6192
|
-
const [
|
|
6204
|
+
const [N, P] = R(
|
|
6193
6205
|
() => /* @__PURE__ */ new Set()
|
|
6194
|
-
),
|
|
6195
|
-
c == null || c(x),
|
|
6196
|
-
},
|
|
6206
|
+
), G = s !== void 0, [oe, pe] = R({}), ne = s ?? oe, he = (x) => {
|
|
6207
|
+
c == null || c(x), G || pe(x);
|
|
6208
|
+
}, X = a !== void 0, [K, me] = R(
|
|
6197
6209
|
m ?? null
|
|
6198
|
-
), te =
|
|
6199
|
-
p == null || p(x),
|
|
6210
|
+
), te = X ? a ?? null : K, de = !p, Fe = (x) => {
|
|
6211
|
+
p == null || p(x), X || me(x);
|
|
6200
6212
|
}, { headerGroups: Ze, leafColumns: ye, hasGroups: Ee } = ge(() => {
|
|
6201
6213
|
var ve;
|
|
6202
6214
|
const x = new Set(ne.hidden ?? []), F = (ee, fe) => ee.key ?? (typeof ee.accessor == "string" ? ee.accessor : `col-${fe}`), A = t.map((ee, fe) => {
|
|
@@ -6212,16 +6224,16 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6212
6224
|
isGroup: !1,
|
|
6213
6225
|
leaves: x.has(Me.key) ? [] : [Me]
|
|
6214
6226
|
};
|
|
6215
|
-
}).filter((ee) => ee.leaves.length > 0),
|
|
6227
|
+
}).filter((ee) => ee.leaves.length > 0), q = A.some((ee) => ee.isGroup);
|
|
6216
6228
|
let ue = A.flatMap((ee) => ee.leaves);
|
|
6217
|
-
if (!
|
|
6229
|
+
if (!q && ((ve = ne.order) != null && ve.length)) {
|
|
6218
6230
|
const ee = new Map(ne.order.map((fe, Me) => [fe, Me]));
|
|
6219
6231
|
ue = [...ue].sort(
|
|
6220
6232
|
(fe, Me) => (ee.get(fe.key) ?? 1 / 0) - (ee.get(Me.key) ?? 1 / 0)
|
|
6221
6233
|
);
|
|
6222
6234
|
}
|
|
6223
|
-
return { headerGroups: A, leafColumns: ue, hasGroups:
|
|
6224
|
-
}, [t, ne]),
|
|
6235
|
+
return { headerGroups: A, leafColumns: ue, hasGroups: q };
|
|
6236
|
+
}, [t, ne]), He = ge(
|
|
6225
6237
|
() => new Map(ye.map((x, F) => [x.key, F])),
|
|
6226
6238
|
[ye]
|
|
6227
6239
|
), xe = ye.map((x) => x.key).join("|"), $e = (x, F) => {
|
|
@@ -6233,30 +6245,30 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6233
6245
|
if (!x) return r;
|
|
6234
6246
|
const F = te.direction === "asc" ? 1 : -1;
|
|
6235
6247
|
return [...r].sort(
|
|
6236
|
-
(A,
|
|
6248
|
+
(A, q) => zo($e(x.col, A), $e(x.col, q)) * F
|
|
6237
6249
|
);
|
|
6238
|
-
}, [r, de, te, ye]), Ie = !Ee, et = !!l && Ie, [S, Z] =
|
|
6250
|
+
}, [r, de, te, ye]), Ie = !Ee, et = !!l && Ie, [S, Z] = On(l ?? ""), j = et ? S : void 0, W = se(null), [H, T] = R();
|
|
6239
6251
|
lt(() => {
|
|
6240
6252
|
T(void 0);
|
|
6241
6253
|
}, [xe]), lt(() => {
|
|
6242
|
-
if (!Ie ||
|
|
6254
|
+
if (!Ie || H || !W.current) return;
|
|
6243
6255
|
const x = W.current.querySelectorAll("th.sa-tl-leaf");
|
|
6244
6256
|
T(Array.from(x).map((F) => F.offsetWidth));
|
|
6245
|
-
}, [
|
|
6246
|
-
const [
|
|
6257
|
+
}, [H, Ie]);
|
|
6258
|
+
const [_, Q] = R(0);
|
|
6247
6259
|
lt(() => {
|
|
6248
6260
|
if (!Ee || !W.current) return;
|
|
6249
6261
|
const x = W.current.querySelector(":scope > tr");
|
|
6250
|
-
x &&
|
|
6262
|
+
x && Q(x.offsetHeight);
|
|
6251
6263
|
}, [Ee, xe]);
|
|
6252
6264
|
const Ce = (x, F) => {
|
|
6253
|
-
if ((
|
|
6265
|
+
if ((j == null ? void 0 : j[F]) != null) return j[F];
|
|
6254
6266
|
if (x.width != null) return x.width;
|
|
6255
|
-
if ((
|
|
6256
|
-
}, Le = (x, F) => typeof x.width == "number" ? x.width :
|
|
6257
|
-
if (!
|
|
6267
|
+
if ((H == null ? void 0 : H[F]) != null) return H[F];
|
|
6268
|
+
}, Le = (x, F) => typeof x.width == "number" ? x.width : H == null ? void 0 : H[F], je = ne.frozenKey && !Ee ? ye.findIndex((x) => x.key === ne.frozenKey) : -1, _e = (x) => x <= je, Oe = (x) => {
|
|
6269
|
+
if (!H) return 0;
|
|
6258
6270
|
let F = 0;
|
|
6259
|
-
for (let A = 0; A < x; A++) F +=
|
|
6271
|
+
for (let A = 0; A < x; A++) F += H[A] ?? 0;
|
|
6260
6272
|
return F;
|
|
6261
6273
|
}, tt = se(null), [rt, nt] = R("100vh");
|
|
6262
6274
|
lt(() => {
|
|
@@ -6270,13 +6282,13 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6270
6282
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
6271
6283
|
}, [g]);
|
|
6272
6284
|
const Pe = (x, F) => n ? n(x, F) : F, ct = (x, F, A) => x.render ? x.render(F, A, be) : Bo(F, x.accessor), st = ye.length + (v ? 1 : 0), at = ["80%", "55%", "70%", "45%", "90%", "60%"], vn = (x, F) => at[(x * 7 + F * 3) % at.length], Cn = (x, F) => /* @__PURE__ */ e(Ye, { height: 14, width: vn(x, F), borderRadius: "rounded-sm" }), wn = Array.from({ length: D }, (x, F) => /* @__PURE__ */ u(Te, { children: [
|
|
6273
|
-
ye.map(({ col: A, key:
|
|
6285
|
+
ye.map(({ col: A, key: q }, ue) => /* @__PURE__ */ e(
|
|
6274
6286
|
Re,
|
|
6275
6287
|
{
|
|
6276
6288
|
style: { textAlign: Ft(A.align) },
|
|
6277
6289
|
children: Cn(F, ue)
|
|
6278
6290
|
},
|
|
6279
|
-
`sa-tl-sk-${F}-${
|
|
6291
|
+
`sa-tl-sk-${F}-${q}`
|
|
6280
6292
|
)),
|
|
6281
6293
|
v && /* @__PURE__ */ e(Re, { style: { width: 1, padding: 0, border: "none" } })
|
|
6282
6294
|
] }, `sa-tl-sk-${F}`)), Dn = (x, F) => {
|
|
@@ -6301,10 +6313,10 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6301
6313
|
paddingRight: 16,
|
|
6302
6314
|
paddingLeft: 40,
|
|
6303
6315
|
background: "linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"
|
|
6304
|
-
}, vt = (x, F, A,
|
|
6316
|
+
}, vt = (x, F, A, q) => {
|
|
6305
6317
|
var Ge;
|
|
6306
|
-
const ue = (Ge = x.disabled) == null ? void 0 : Ge.call(x, F), ve = (
|
|
6307
|
-
|
|
6318
|
+
const ue = (Ge = x.disabled) == null ? void 0 : Ge.call(x, F), ve = (q == null ? void 0 : q.showLabel) ?? x.showLabel, ee = (q == null ? void 0 : q.size) ?? "xs", fe = /* @__PURE__ */ e(
|
|
6319
|
+
O,
|
|
6308
6320
|
{
|
|
6309
6321
|
size: ee,
|
|
6310
6322
|
variant: x.variant ?? "tertiary",
|
|
@@ -6328,13 +6340,13 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6328
6340
|
style: kr,
|
|
6329
6341
|
onClick: (ee) => ee.stopPropagation(),
|
|
6330
6342
|
children: /* @__PURE__ */ e(We, { label: "Aksi lainnya", position: "top", children: /* @__PURE__ */ e(
|
|
6331
|
-
|
|
6343
|
+
O,
|
|
6332
6344
|
{
|
|
6333
6345
|
size: "xs",
|
|
6334
6346
|
variant: "tertiary",
|
|
6335
6347
|
onClick: (ee) => {
|
|
6336
6348
|
const fe = ee.currentTarget.getBoundingClientRect();
|
|
6337
|
-
|
|
6349
|
+
$(ve ? null : {
|
|
6338
6350
|
rowKey: ue,
|
|
6339
6351
|
top: fe.bottom + 4,
|
|
6340
6352
|
right: window.innerWidth - fe.right
|
|
@@ -6349,12 +6361,12 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6349
6361
|
return /* @__PURE__ */ e("div", { className: "sa-tl-row-actions", style: kr, children: A.map((ue) => /* @__PURE__ */ e(Ke.Fragment, { children: vt(ue, x, F) }, ue.key)) });
|
|
6350
6362
|
}, Fn = (x, F) => {
|
|
6351
6363
|
const A = bt(x);
|
|
6352
|
-
return A.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 6, flexWrap: "wrap", paddingTop: 8, marginTop: 8, borderTop: kt }, children: A.map((
|
|
6364
|
+
return A.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 6, flexWrap: "wrap", paddingTop: 8, marginTop: 8, borderTop: kt }, children: A.map((q) => /* @__PURE__ */ e(Ke.Fragment, { children: vt(q, x, F, { showLabel: !0, size: "sm" }) }, q.key)) }) : null;
|
|
6353
6365
|
}, En = (x, F) => {
|
|
6354
6366
|
const A = bt(x);
|
|
6355
|
-
return A.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: A.map((
|
|
6367
|
+
return A.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: A.map((q) => /* @__PURE__ */ e(Ke.Fragment, { children: vt(q, x, F, { showLabel: !1 }) }, q.key)) }) : null;
|
|
6356
6368
|
}, $t = (x, F) => {
|
|
6357
|
-
const { col: A, key:
|
|
6369
|
+
const { col: A, key: q } = x, ue = He.get(q) ?? 0, ve = _e(ue), ee = ve && ue === je, fe = (te == null ? void 0 : te.key) === q ? te.direction : null, Me = d && !A.disableMenu ? /* @__PURE__ */ e(
|
|
6358
6370
|
Lo,
|
|
6359
6371
|
{
|
|
6360
6372
|
active: !!fe || ve,
|
|
@@ -6362,10 +6374,10 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6362
6374
|
canHide: !A.locked,
|
|
6363
6375
|
sortDir: fe,
|
|
6364
6376
|
frozen: ve,
|
|
6365
|
-
onSort: (Gt) => Fe({ key:
|
|
6377
|
+
onSort: (Gt) => Fe({ key: q, direction: Gt }),
|
|
6366
6378
|
onClearSort: () => Fe(null),
|
|
6367
|
-
onToggleFreeze: () => kn(
|
|
6368
|
-
onHide: () => Dn(
|
|
6379
|
+
onToggleFreeze: () => kn(q),
|
|
6380
|
+
onHide: () => Dn(q, A.locked)
|
|
6369
6381
|
}
|
|
6370
6382
|
) : null, Ge = A.align === "right", dt = A.align === "right" ? "flex-end" : A.align === "center" ? "center" : "flex-start", it = /* @__PURE__ */ u(
|
|
6371
6383
|
"span",
|
|
@@ -6398,7 +6410,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6398
6410
|
width: Ce(A, ue),
|
|
6399
6411
|
position: "sticky",
|
|
6400
6412
|
top: (F == null ? void 0 : F.top) ?? 0,
|
|
6401
|
-
left: ve ?
|
|
6413
|
+
left: ve ? Oe(ue) : void 0,
|
|
6402
6414
|
zIndex: ve ? 3 : 2,
|
|
6403
6415
|
backgroundColor: mt,
|
|
6404
6416
|
boxShadow: ee ? Jr : void 0
|
|
@@ -6422,12 +6434,12 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6422
6434
|
}
|
|
6423
6435
|
)
|
|
6424
6436
|
},
|
|
6425
|
-
`th-${
|
|
6437
|
+
`th-${q}`
|
|
6426
6438
|
);
|
|
6427
|
-
}, jt = ye.filter((x) => !x.col.hideOnMobile), _t = jt.find((x) => x.col.primary) ?? jt[0], Ln = jt.filter((x) => x !== _t), Mn = (x) =>
|
|
6439
|
+
}, jt = ye.filter((x) => !x.col.hideOnMobile), _t = jt.find((x) => x.col.primary) ?? jt[0], Ln = jt.filter((x) => x !== _t), Mn = (x) => P((F) => {
|
|
6428
6440
|
const A = new Set(F);
|
|
6429
6441
|
return A.has(x) ? A.delete(x) : A.add(x), A;
|
|
6430
|
-
}), Sr = (x, F) => Ln.map(({ col: A, key:
|
|
6442
|
+
}), Sr = (x, F) => Ln.map(({ col: A, key: q }) => {
|
|
6431
6443
|
const ue = ct(A, x, F), ve = typeof ue == "string" || typeof ue == "number" ? /* @__PURE__ */ e(
|
|
6432
6444
|
w,
|
|
6433
6445
|
{
|
|
@@ -6473,7 +6485,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6473
6485
|
ve
|
|
6474
6486
|
]
|
|
6475
6487
|
},
|
|
6476
|
-
|
|
6488
|
+
q
|
|
6477
6489
|
);
|
|
6478
6490
|
}), Fr = (x, F) => {
|
|
6479
6491
|
const A = _t ? ct(_t.col, x, F) : null;
|
|
@@ -6516,7 +6528,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6516
6528
|
children: L == null ? void 0 : L.content
|
|
6517
6529
|
}
|
|
6518
6530
|
), Bn = z ? Wn : be.length === 0 ? Er : b === "expand" ? /* @__PURE__ */ e(f, { style: { display: "flex", flexDirection: "column" }, children: be.map((x, F) => {
|
|
6519
|
-
const A = Pe(x, F),
|
|
6531
|
+
const A = Pe(x, F), q = N.has(A);
|
|
6520
6532
|
return /* @__PURE__ */ u("div", { style: { borderBottom: kt }, children: [
|
|
6521
6533
|
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
6522
6534
|
/* @__PURE__ */ u(
|
|
@@ -6544,7 +6556,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6544
6556
|
/* @__PURE__ */ e(
|
|
6545
6557
|
E,
|
|
6546
6558
|
{
|
|
6547
|
-
name:
|
|
6559
|
+
name: q ? "ChevronUp" : "ChevronDown",
|
|
6548
6560
|
size: "sm",
|
|
6549
6561
|
style: { flexShrink: 0 }
|
|
6550
6562
|
}
|
|
@@ -6554,7 +6566,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6554
6566
|
),
|
|
6555
6567
|
v && En(x, F)
|
|
6556
6568
|
] }),
|
|
6557
|
-
|
|
6569
|
+
q && /* @__PURE__ */ e(
|
|
6558
6570
|
"div",
|
|
6559
6571
|
{
|
|
6560
6572
|
style: {
|
|
@@ -6597,7 +6609,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6597
6609
|
className: "sa-table-layout",
|
|
6598
6610
|
fullWidth: !0,
|
|
6599
6611
|
size: o,
|
|
6600
|
-
resizable: i && Ie &&
|
|
6612
|
+
resizable: i && Ie && H !== void 0,
|
|
6601
6613
|
onWidthsChange: et ? Z : void 0,
|
|
6602
6614
|
children: [
|
|
6603
6615
|
/* @__PURE__ */ e(tn, { ref: W, children: Ee ? /* @__PURE__ */ u(ie, { children: [
|
|
@@ -6637,7 +6649,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6637
6649
|
)
|
|
6638
6650
|
] }),
|
|
6639
6651
|
/* @__PURE__ */ e(Te, { children: Ze.flatMap(
|
|
6640
|
-
(x) => x.isGroup ? x.leaves.map((F) => $t(F, { top:
|
|
6652
|
+
(x) => x.isGroup ? x.leaves.map((F) => $t(F, { top: _ })) : []
|
|
6641
6653
|
) })
|
|
6642
6654
|
] }) : /* @__PURE__ */ u(Te, { children: [
|
|
6643
6655
|
ye.map((x) => $t(x)),
|
|
@@ -6667,11 +6679,11 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6667
6679
|
return /* @__PURE__ */ u(Ke.Fragment, { children: [
|
|
6668
6680
|
A != null && A !== !1 && /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(Re, { colSpan: st, style: { backgroundColor: mt }, children: A }) }),
|
|
6669
6681
|
/* @__PURE__ */ u(Te, { children: [
|
|
6670
|
-
ye.map(({ col:
|
|
6682
|
+
ye.map(({ col: q, key: ue }, ve) => {
|
|
6671
6683
|
var dt;
|
|
6672
|
-
const ee = (dt =
|
|
6684
|
+
const ee = (dt = q.cellProps) == null ? void 0 : dt.call(q, x, F, be);
|
|
6673
6685
|
if (ee != null && ee.hidden) return null;
|
|
6674
|
-
const fe = _e(ve), Me = fe && ve === je, Ge = ct(
|
|
6686
|
+
const fe = _e(ve), Me = fe && ve === je, Ge = ct(q, x, F);
|
|
6675
6687
|
return /* @__PURE__ */ e(
|
|
6676
6688
|
Re,
|
|
6677
6689
|
{
|
|
@@ -6679,11 +6691,11 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6679
6691
|
colSpan: ee == null ? void 0 : ee.colSpan,
|
|
6680
6692
|
rowSpan: ee == null ? void 0 : ee.rowSpan,
|
|
6681
6693
|
style: {
|
|
6682
|
-
textAlign: Ft(
|
|
6683
|
-
width: Ce(
|
|
6684
|
-
minWidth:
|
|
6694
|
+
textAlign: Ft(q.align),
|
|
6695
|
+
width: Ce(q, ve),
|
|
6696
|
+
minWidth: q.minWidth,
|
|
6685
6697
|
position: fe ? "sticky" : void 0,
|
|
6686
|
-
left: fe ?
|
|
6698
|
+
left: fe ? Oe(ve) : void 0,
|
|
6687
6699
|
zIndex: fe ? 1 : void 0,
|
|
6688
6700
|
boxShadow: Me ? Jr : void 0
|
|
6689
6701
|
},
|
|
@@ -6694,7 +6706,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6694
6706
|
whiteSpace: "nowrap",
|
|
6695
6707
|
overflow: "hidden",
|
|
6696
6708
|
textOverflow: "ellipsis",
|
|
6697
|
-
textAlign: Ft(
|
|
6709
|
+
textAlign: Ft(q.align)
|
|
6698
6710
|
},
|
|
6699
6711
|
children: Ge
|
|
6700
6712
|
}
|
|
@@ -6759,7 +6771,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6759
6771
|
scopeId: s,
|
|
6760
6772
|
storage: c = fn
|
|
6761
6773
|
} = t, { searchParams: d, setSearchParams: a, searchQueries: m } = Ve(), p = d.toString(), g = s ? xt.tableSort(s) : void 0, b = se(!1);
|
|
6762
|
-
|
|
6774
|
+
J(() => {
|
|
6763
6775
|
if (b.current || (b.current = !0, !g) || d.has(r) || d.has(n))
|
|
6764
6776
|
return;
|
|
6765
6777
|
const D = c.get(g);
|
|
@@ -6773,7 +6785,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6773
6785
|
const D = d.get(r), C = d.get(n);
|
|
6774
6786
|
return D && rr(C) ? { key: D, direction: C } : i;
|
|
6775
6787
|
}, [p, r, n, i]);
|
|
6776
|
-
|
|
6788
|
+
J(() => {
|
|
6777
6789
|
if (!g) return;
|
|
6778
6790
|
const D = d.get(r), C = d.get(n);
|
|
6779
6791
|
D && rr(C) ? c.set(g, { key: D, direction: C }) : c.remove(g);
|
|
@@ -6781,7 +6793,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6781
6793
|
const y = (l == null ? void 0 : l.sortBy) ?? "sortBy", k = (l == null ? void 0 : l.sortOrder) ?? "sortOrder", L = ge(() => B ? {
|
|
6782
6794
|
[y]: B.key,
|
|
6783
6795
|
[k]: B.direction
|
|
6784
|
-
} : {}, [B, y, k]), z =
|
|
6796
|
+
} : {}, [B, y, k]), z = Y(
|
|
6785
6797
|
(D) => {
|
|
6786
6798
|
const C = { ...m };
|
|
6787
6799
|
D ? (C[r] = D.key, C[n] = D.direction) : (delete C[r], delete C[n]), delete C[o], a(C);
|
|
@@ -6792,7 +6804,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6792
6804
|
}, br = ({
|
|
6793
6805
|
of: t,
|
|
6794
6806
|
render: r
|
|
6795
|
-
}) => _n.toArray(t == null ? void 0 : t.map((n, o, i) => r(n, o, i))),
|
|
6807
|
+
}) => _n.toArray(t == null ? void 0 : t.map((n, o, i) => r(n, o, i))), le = ({
|
|
6796
6808
|
condition: t,
|
|
6797
6809
|
fallback: r,
|
|
6798
6810
|
children: n,
|
|
@@ -6825,7 +6837,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6825
6837
|
...i.containerProps,
|
|
6826
6838
|
children: [
|
|
6827
6839
|
i.title && /* @__PURE__ */ e(
|
|
6828
|
-
|
|
6840
|
+
le,
|
|
6829
6841
|
{
|
|
6830
6842
|
condition: !!i.inputProps.required,
|
|
6831
6843
|
fallback: /* @__PURE__ */ u(
|
|
@@ -6850,7 +6862,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6850
6862
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
6851
6863
|
/* @__PURE__ */ e(ae, { fontSize: t, children: i.title }),
|
|
6852
6864
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
6853
|
-
/* @__PURE__ */ e(
|
|
6865
|
+
/* @__PURE__ */ e(le, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
6854
6866
|
We,
|
|
6855
6867
|
{
|
|
6856
6868
|
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
@@ -6870,7 +6882,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6870
6882
|
}
|
|
6871
6883
|
) })
|
|
6872
6884
|
] }),
|
|
6873
|
-
/* @__PURE__ */ e(
|
|
6885
|
+
/* @__PURE__ */ e(le, { condition: !!i.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: i.description }) })
|
|
6874
6886
|
]
|
|
6875
6887
|
}
|
|
6876
6888
|
)
|
|
@@ -6910,7 +6922,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6910
6922
|
onClick: i.onClickContainer,
|
|
6911
6923
|
children: [
|
|
6912
6924
|
i.title && /* @__PURE__ */ e(
|
|
6913
|
-
|
|
6925
|
+
le,
|
|
6914
6926
|
{
|
|
6915
6927
|
condition: !!i.inputProps.required,
|
|
6916
6928
|
fallback: /* @__PURE__ */ u(
|
|
@@ -6935,7 +6947,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6935
6947
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
6936
6948
|
/* @__PURE__ */ e(ae, { fontSize: t, children: i.title }),
|
|
6937
6949
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
6938
|
-
/* @__PURE__ */ e(
|
|
6950
|
+
/* @__PURE__ */ e(le, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
6939
6951
|
We,
|
|
6940
6952
|
{
|
|
6941
6953
|
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
@@ -6955,7 +6967,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6955
6967
|
}
|
|
6956
6968
|
) })
|
|
6957
6969
|
] }),
|
|
6958
|
-
/* @__PURE__ */ e(
|
|
6970
|
+
/* @__PURE__ */ e(le, { condition: !!i.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: i.description }) })
|
|
6959
6971
|
]
|
|
6960
6972
|
}
|
|
6961
6973
|
)
|
|
@@ -7057,7 +7069,7 @@ const ac = Fo(So), Ur = 200, tr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7057
7069
|
function hc(t) {
|
|
7058
7070
|
return t.split(" ").map((r) => r[0]).join("").slice(0, 2).toUpperCase();
|
|
7059
7071
|
}
|
|
7060
|
-
const
|
|
7072
|
+
const Ho = (t) => {
|
|
7061
7073
|
const r = {
|
|
7062
7074
|
day: "2-digit",
|
|
7063
7075
|
month: "short",
|
|
@@ -7111,7 +7123,7 @@ function pc(t) {
|
|
|
7111
7123
|
const n = r.getFullYear(), o = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
|
|
7112
7124
|
return `${n}-${o}-${i}`;
|
|
7113
7125
|
}
|
|
7114
|
-
const
|
|
7126
|
+
const Oo = "sa-admin", qe = (t) => `var(--${Oo}-${t})`, yc = {
|
|
7115
7127
|
base: {
|
|
7116
7128
|
borderColor: qe("base-border-color"),
|
|
7117
7129
|
textColor: qe("base-text-color"),
|
|
@@ -7279,12 +7291,12 @@ const Po = (t) => {
|
|
|
7279
7291
|
] }) : /* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
7280
7292
|
/* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", children: jo(((n = t.fileSelected) == null ? void 0 : n.size.toString()) || "100000") }),
|
|
7281
7293
|
/* @__PURE__ */ e(E, { name: "Dot", size: "xs" }),
|
|
7282
|
-
/* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children:
|
|
7294
|
+
/* @__PURE__ */ e(w, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: Ho(/* @__PURE__ */ new Date()) })
|
|
7283
7295
|
] })
|
|
7284
7296
|
] })
|
|
7285
7297
|
] }),
|
|
7286
7298
|
/* @__PURE__ */ e(
|
|
7287
|
-
|
|
7299
|
+
O,
|
|
7288
7300
|
{
|
|
7289
7301
|
size: "xs",
|
|
7290
7302
|
variant: "tertiary",
|
|
@@ -7412,7 +7424,7 @@ const Po = (t) => {
|
|
|
7412
7424
|
...i.containerProps,
|
|
7413
7425
|
children: [
|
|
7414
7426
|
i.title && /* @__PURE__ */ e(
|
|
7415
|
-
|
|
7427
|
+
le,
|
|
7416
7428
|
{
|
|
7417
7429
|
condition: !!i.inputProps.required,
|
|
7418
7430
|
fallback: /* @__PURE__ */ u(
|
|
@@ -7437,7 +7449,7 @@ const Po = (t) => {
|
|
|
7437
7449
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
7438
7450
|
/* @__PURE__ */ e(ae, { fontSize: t, children: i.title }),
|
|
7439
7451
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
7440
|
-
/* @__PURE__ */ e(
|
|
7452
|
+
/* @__PURE__ */ e(le, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7441
7453
|
We,
|
|
7442
7454
|
{
|
|
7443
7455
|
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
@@ -7457,7 +7469,7 @@ const Po = (t) => {
|
|
|
7457
7469
|
}
|
|
7458
7470
|
) })
|
|
7459
7471
|
] }),
|
|
7460
|
-
/* @__PURE__ */ e(
|
|
7472
|
+
/* @__PURE__ */ e(le, { condition: !!i.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: i.description }) })
|
|
7461
7473
|
]
|
|
7462
7474
|
}
|
|
7463
7475
|
)
|
|
@@ -7494,7 +7506,7 @@ const Po = (t) => {
|
|
|
7494
7506
|
...l.containerProps,
|
|
7495
7507
|
children: [
|
|
7496
7508
|
l.title && /* @__PURE__ */ e(
|
|
7497
|
-
|
|
7509
|
+
le,
|
|
7498
7510
|
{
|
|
7499
7511
|
condition: !!i,
|
|
7500
7512
|
fallback: /* @__PURE__ */ u(
|
|
@@ -7519,7 +7531,7 @@ const Po = (t) => {
|
|
|
7519
7531
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
7520
7532
|
/* @__PURE__ */ e(ae, { fontSize: t, children: l.title }),
|
|
7521
7533
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
7522
|
-
/* @__PURE__ */ e(
|
|
7534
|
+
/* @__PURE__ */ e(le, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
|
|
7523
7535
|
We,
|
|
7524
7536
|
{
|
|
7525
7537
|
label: (a = l.tooltip) == null ? void 0 : a.label,
|
|
@@ -7539,7 +7551,7 @@ const Po = (t) => {
|
|
|
7539
7551
|
}
|
|
7540
7552
|
) })
|
|
7541
7553
|
] }),
|
|
7542
|
-
/* @__PURE__ */ e(
|
|
7554
|
+
/* @__PURE__ */ e(le, { condition: !!l.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: l.description }) })
|
|
7543
7555
|
]
|
|
7544
7556
|
}
|
|
7545
7557
|
)
|
|
@@ -7613,7 +7625,7 @@ const Po = (t) => {
|
|
|
7613
7625
|
gap: t === "horizontal-inline" || t === "horizontal-block" ? "spacing-96" : "sm",
|
|
7614
7626
|
direction: t === "horizontal-inline" || t === "horizontal-block" ? "row" : "column",
|
|
7615
7627
|
children: [
|
|
7616
|
-
/* @__PURE__ */ e(
|
|
7628
|
+
/* @__PURE__ */ e(le, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ u(
|
|
7617
7629
|
f,
|
|
7618
7630
|
{
|
|
7619
7631
|
direction: "column",
|
|
@@ -7621,7 +7633,7 @@ const Po = (t) => {
|
|
|
7621
7633
|
fullWidth: n,
|
|
7622
7634
|
children: [
|
|
7623
7635
|
o.title && /* @__PURE__ */ e(ae, { children: o.title }),
|
|
7624
|
-
/* @__PURE__ */ e(
|
|
7636
|
+
/* @__PURE__ */ e(le, { condition: !!o.description, children: /* @__PURE__ */ e(w, { color: "gray-500", children: o.description }) })
|
|
7625
7637
|
]
|
|
7626
7638
|
}
|
|
7627
7639
|
) }),
|
|
@@ -7694,7 +7706,7 @@ const Po = (t) => {
|
|
|
7694
7706
|
...i.containerProps,
|
|
7695
7707
|
children: [
|
|
7696
7708
|
i.title && /* @__PURE__ */ e(
|
|
7697
|
-
|
|
7709
|
+
le,
|
|
7698
7710
|
{
|
|
7699
7711
|
condition: !!i.inputProps.required,
|
|
7700
7712
|
fallback: /* @__PURE__ */ u(
|
|
@@ -7719,7 +7731,7 @@ const Po = (t) => {
|
|
|
7719
7731
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
7720
7732
|
/* @__PURE__ */ e(ae, { fontSize: t, children: i.title }),
|
|
7721
7733
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
7722
|
-
/* @__PURE__ */ e(
|
|
7734
|
+
/* @__PURE__ */ e(le, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7723
7735
|
We,
|
|
7724
7736
|
{
|
|
7725
7737
|
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
@@ -7739,7 +7751,7 @@ const Po = (t) => {
|
|
|
7739
7751
|
}
|
|
7740
7752
|
) })
|
|
7741
7753
|
] }),
|
|
7742
|
-
/* @__PURE__ */ e(
|
|
7754
|
+
/* @__PURE__ */ e(le, { condition: !!i.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: i.description }) })
|
|
7743
7755
|
]
|
|
7744
7756
|
}
|
|
7745
7757
|
)
|
|
@@ -7778,7 +7790,7 @@ const Po = (t) => {
|
|
|
7778
7790
|
...l.containerProps,
|
|
7779
7791
|
children: [
|
|
7780
7792
|
l.title && /* @__PURE__ */ e(
|
|
7781
|
-
|
|
7793
|
+
le,
|
|
7782
7794
|
{
|
|
7783
7795
|
condition: o,
|
|
7784
7796
|
fallback: /* @__PURE__ */ u(
|
|
@@ -7803,7 +7815,7 @@ const Po = (t) => {
|
|
|
7803
7815
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
7804
7816
|
/* @__PURE__ */ e(ae, { fontSize: t, children: l.title }),
|
|
7805
7817
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
7806
|
-
/* @__PURE__ */ e(
|
|
7818
|
+
/* @__PURE__ */ e(le, { condition: !!((c = l.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7807
7819
|
We,
|
|
7808
7820
|
{
|
|
7809
7821
|
label: (d = l.tooltip) == null ? void 0 : d.label,
|
|
@@ -7823,7 +7835,7 @@ const Po = (t) => {
|
|
|
7823
7835
|
}
|
|
7824
7836
|
) })
|
|
7825
7837
|
] }),
|
|
7826
|
-
/* @__PURE__ */ e(
|
|
7838
|
+
/* @__PURE__ */ e(le, { condition: !!l.titleDescription, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: l.titleDescription }) })
|
|
7827
7839
|
]
|
|
7828
7840
|
}
|
|
7829
7841
|
)
|
|
@@ -7872,7 +7884,7 @@ const Po = (t) => {
|
|
|
7872
7884
|
}
|
|
7873
7885
|
};
|
|
7874
7886
|
return /* @__PURE__ */ e(
|
|
7875
|
-
|
|
7887
|
+
O,
|
|
7876
7888
|
{
|
|
7877
7889
|
fullWidth: !0,
|
|
7878
7890
|
disabled: n.disabled,
|
|
@@ -7912,7 +7924,7 @@ const Po = (t) => {
|
|
|
7912
7924
|
onClick: i.onClickContainer,
|
|
7913
7925
|
children: [
|
|
7914
7926
|
i.title && /* @__PURE__ */ e(
|
|
7915
|
-
|
|
7927
|
+
le,
|
|
7916
7928
|
{
|
|
7917
7929
|
condition: !!i.inputProps.required,
|
|
7918
7930
|
fallback: /* @__PURE__ */ u(
|
|
@@ -7937,7 +7949,7 @@ const Po = (t) => {
|
|
|
7937
7949
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
7938
7950
|
/* @__PURE__ */ e(ae, { fontSize: t, children: i.title }),
|
|
7939
7951
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
7940
|
-
/* @__PURE__ */ e(
|
|
7952
|
+
/* @__PURE__ */ e(le, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
|
|
7941
7953
|
We,
|
|
7942
7954
|
{
|
|
7943
7955
|
label: (d = i.tooltip) == null ? void 0 : d.label,
|
|
@@ -7957,7 +7969,7 @@ const Po = (t) => {
|
|
|
7957
7969
|
}
|
|
7958
7970
|
) })
|
|
7959
7971
|
] }),
|
|
7960
|
-
/* @__PURE__ */ e(
|
|
7972
|
+
/* @__PURE__ */ e(le, { condition: !!i.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: i.description }) })
|
|
7961
7973
|
]
|
|
7962
7974
|
}
|
|
7963
7975
|
)
|
|
@@ -8037,48 +8049,48 @@ const Yr = {
|
|
|
8037
8049
|
onError: a
|
|
8038
8050
|
}, m) => {
|
|
8039
8051
|
const p = ke("md"), [g, b] = R(!1), [B, y] = R(null), [k, L] = R(!1), [z, D] = R({ x: 0, y: 0 }), [C, V] = R(1), [I, v] = R(null);
|
|
8040
|
-
|
|
8052
|
+
J(() => {
|
|
8041
8053
|
r === null && i(null);
|
|
8042
8054
|
}, [r]);
|
|
8043
|
-
const M =
|
|
8044
|
-
(
|
|
8055
|
+
const M = Y(
|
|
8056
|
+
(X, K) => {
|
|
8045
8057
|
v(K);
|
|
8046
8058
|
},
|
|
8047
8059
|
[]
|
|
8048
|
-
),
|
|
8060
|
+
), $ = (X) => {
|
|
8049
8061
|
var te;
|
|
8050
|
-
const K = (te =
|
|
8062
|
+
const K = (te = X.target.files) == null ? void 0 : te[0];
|
|
8051
8063
|
if (!K) return;
|
|
8052
8064
|
const me = new FileReader();
|
|
8053
8065
|
me.onload = () => {
|
|
8054
8066
|
y(me.result), L(!0);
|
|
8055
8067
|
}, me.readAsDataURL(K);
|
|
8056
|
-
},
|
|
8068
|
+
}, N = async () => {
|
|
8057
8069
|
if (!(!B || !I))
|
|
8058
8070
|
try {
|
|
8059
|
-
const
|
|
8060
|
-
if (d &&
|
|
8071
|
+
const X = await el(B, I);
|
|
8072
|
+
if (d && X.size > d * 1024 * 1024) {
|
|
8061
8073
|
a == null || a(`Ukuran file maksimal ${d}MB`);
|
|
8062
8074
|
return;
|
|
8063
8075
|
}
|
|
8064
|
-
t == null || t(
|
|
8065
|
-
const K = URL.createObjectURL(
|
|
8066
|
-
i(K,
|
|
8076
|
+
t == null || t(X);
|
|
8077
|
+
const K = URL.createObjectURL(X);
|
|
8078
|
+
i(K, X), L(!1);
|
|
8067
8079
|
} catch {
|
|
8068
8080
|
a == null || a("Gagal memproses gambar");
|
|
8069
8081
|
}
|
|
8070
|
-
},
|
|
8071
|
-
|
|
8082
|
+
}, P = se(null), G = () => {
|
|
8083
|
+
P.current && P.current.click();
|
|
8072
8084
|
};
|
|
8073
8085
|
Pn(m, () => ({
|
|
8074
8086
|
openFileDialog: () => {
|
|
8075
|
-
var
|
|
8076
|
-
(
|
|
8087
|
+
var X;
|
|
8088
|
+
(X = P.current) == null || X.click();
|
|
8077
8089
|
}
|
|
8078
8090
|
}));
|
|
8079
|
-
const
|
|
8091
|
+
const oe = parseInt(l, 10), pe = Yr[s];
|
|
8080
8092
|
let ne, he;
|
|
8081
|
-
return pe >= 1 ? (he =
|
|
8093
|
+
return pe >= 1 ? (he = oe, ne = oe * pe) : (ne = oe, he = oe / pe), /* @__PURE__ */ u(
|
|
8082
8094
|
f,
|
|
8083
8095
|
{
|
|
8084
8096
|
direction: "column",
|
|
@@ -8148,15 +8160,15 @@ const Yr = {
|
|
|
8148
8160
|
opacity: g ? 1 : 0,
|
|
8149
8161
|
transition: "opacity 0.3s ease-in-out"
|
|
8150
8162
|
},
|
|
8151
|
-
onClick:
|
|
8163
|
+
onClick: G,
|
|
8152
8164
|
children: [
|
|
8153
8165
|
/* @__PURE__ */ e(
|
|
8154
8166
|
"input",
|
|
8155
8167
|
{
|
|
8156
|
-
ref:
|
|
8168
|
+
ref: P,
|
|
8157
8169
|
type: "file",
|
|
8158
8170
|
accept: "image/*",
|
|
8159
|
-
onChange:
|
|
8171
|
+
onChange: $,
|
|
8160
8172
|
disabled: n,
|
|
8161
8173
|
style: { display: "none" }
|
|
8162
8174
|
}
|
|
@@ -8169,7 +8181,7 @@ const Yr = {
|
|
|
8169
8181
|
style: { color: "var(--sa-background-primary, #ffffff)" }
|
|
8170
8182
|
}
|
|
8171
8183
|
),
|
|
8172
|
-
/* @__PURE__ */ e(
|
|
8184
|
+
/* @__PURE__ */ e(le, { condition: l.toNumber() > 80, children: /* @__PURE__ */ e(
|
|
8173
8185
|
w,
|
|
8174
8186
|
{
|
|
8175
8187
|
color: "gray-50",
|
|
@@ -8237,7 +8249,7 @@ const Yr = {
|
|
|
8237
8249
|
display: "flex",
|
|
8238
8250
|
flexDirection: "column"
|
|
8239
8251
|
},
|
|
8240
|
-
onClick: (
|
|
8252
|
+
onClick: (X) => X.stopPropagation(),
|
|
8241
8253
|
children: [
|
|
8242
8254
|
/* @__PURE__ */ e(
|
|
8243
8255
|
"div",
|
|
@@ -8276,8 +8288,8 @@ const Yr = {
|
|
|
8276
8288
|
borderTop: "1px solid var(--sa-border-subtle)"
|
|
8277
8289
|
},
|
|
8278
8290
|
children: [
|
|
8279
|
-
/* @__PURE__ */ e(
|
|
8280
|
-
/* @__PURE__ */ e(
|
|
8291
|
+
/* @__PURE__ */ e(O, { size: "sm", secondary: !0, onClick: () => L(!1), children: "Cancel" }),
|
|
8292
|
+
/* @__PURE__ */ e(O, { size: "sm", primary: !0, onClick: N, children: "Crop" })
|
|
8281
8293
|
]
|
|
8282
8294
|
}
|
|
8283
8295
|
)
|
|
@@ -8310,7 +8322,7 @@ const Yr = {
|
|
|
8310
8322
|
...l.containerProps,
|
|
8311
8323
|
children: [
|
|
8312
8324
|
l.title && /* @__PURE__ */ e(
|
|
8313
|
-
|
|
8325
|
+
le,
|
|
8314
8326
|
{
|
|
8315
8327
|
condition: !!i,
|
|
8316
8328
|
fallback: /* @__PURE__ */ u(
|
|
@@ -8335,7 +8347,7 @@ const Yr = {
|
|
|
8335
8347
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
8336
8348
|
/* @__PURE__ */ e(ae, { fontSize: t, children: l.title }),
|
|
8337
8349
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
8338
|
-
/* @__PURE__ */ e(
|
|
8350
|
+
/* @__PURE__ */ e(le, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
|
|
8339
8351
|
We,
|
|
8340
8352
|
{
|
|
8341
8353
|
label: (a = l.tooltip) == null ? void 0 : a.label,
|
|
@@ -8355,7 +8367,7 @@ const Yr = {
|
|
|
8355
8367
|
}
|
|
8356
8368
|
) })
|
|
8357
8369
|
] }),
|
|
8358
|
-
/* @__PURE__ */ e(
|
|
8370
|
+
/* @__PURE__ */ e(le, { condition: !!l.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: l.description }) })
|
|
8359
8371
|
]
|
|
8360
8372
|
}
|
|
8361
8373
|
)
|
|
@@ -8385,7 +8397,7 @@ const Yr = {
|
|
|
8385
8397
|
...i.containerProps,
|
|
8386
8398
|
children: [
|
|
8387
8399
|
i.title && /* @__PURE__ */ e(
|
|
8388
|
-
|
|
8400
|
+
le,
|
|
8389
8401
|
{
|
|
8390
8402
|
condition: !!i.inputProps.required,
|
|
8391
8403
|
fallback: /* @__PURE__ */ u(
|
|
@@ -8410,7 +8422,7 @@ const Yr = {
|
|
|
8410
8422
|
/* @__PURE__ */ u(ce, { direction: "row", gap: "xs", align: "center", children: [
|
|
8411
8423
|
/* @__PURE__ */ e(ae, { fontSize: t, children: i.title }),
|
|
8412
8424
|
/* @__PURE__ */ e(ae, { color: "error", fontSize: t, children: n }),
|
|
8413
|
-
/* @__PURE__ */ e(
|
|
8425
|
+
/* @__PURE__ */ e(le, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
|
|
8414
8426
|
We,
|
|
8415
8427
|
{
|
|
8416
8428
|
label: (c = i.tooltip) == null ? void 0 : c.label,
|
|
@@ -8430,7 +8442,7 @@ const Yr = {
|
|
|
8430
8442
|
}
|
|
8431
8443
|
) })
|
|
8432
8444
|
] }),
|
|
8433
|
-
/* @__PURE__ */ e(
|
|
8445
|
+
/* @__PURE__ */ e(le, { condition: !!i.description, children: /* @__PURE__ */ e(w, { fontSize: t, color: "gray-500", children: i.description }) })
|
|
8434
8446
|
]
|
|
8435
8447
|
}
|
|
8436
8448
|
)
|
|
@@ -8450,10 +8462,10 @@ const Yr = {
|
|
|
8450
8462
|
}) => {
|
|
8451
8463
|
var m;
|
|
8452
8464
|
const [s, c] = R([]);
|
|
8453
|
-
|
|
8465
|
+
J(() => {
|
|
8454
8466
|
t && c([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
|
|
8455
8467
|
}, [t]);
|
|
8456
|
-
const d = (m = s.find((p) => p.id === r)) == null ? void 0 : m.isActive, a =
|
|
8468
|
+
const d = (m = s.find((p) => p.id === r)) == null ? void 0 : m.isActive, a = Y(() => {
|
|
8457
8469
|
c(
|
|
8458
8470
|
(p) => p.map((g) => g.id === r ? { ...g, isActive: !g.isActive } : g)
|
|
8459
8471
|
), n && n(!d);
|
|
@@ -8496,7 +8508,7 @@ const Yr = {
|
|
|
8496
8508
|
}, i = () => {
|
|
8497
8509
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
8498
8510
|
};
|
|
8499
|
-
return
|
|
8511
|
+
return J(() => (window.addEventListener("scroll", o), () => {
|
|
8500
8512
|
window.removeEventListener("scroll", o);
|
|
8501
8513
|
}), []), /* @__PURE__ */ e(
|
|
8502
8514
|
f,
|
|
@@ -8519,7 +8531,7 @@ const Yr = {
|
|
|
8519
8531
|
transition: "transform 0.2s ease-in-out"
|
|
8520
8532
|
},
|
|
8521
8533
|
children: /* @__PURE__ */ e(
|
|
8522
|
-
|
|
8534
|
+
O,
|
|
8523
8535
|
{
|
|
8524
8536
|
secondary: !0,
|
|
8525
8537
|
size: "xs",
|
|
@@ -8792,9 +8804,9 @@ const Rc = ({
|
|
|
8792
8804
|
const m = () => {
|
|
8793
8805
|
switch (o) {
|
|
8794
8806
|
case "primary":
|
|
8795
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(
|
|
8807
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(O, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(O, { primary: !0, onClick: n, children: d || t }) });
|
|
8796
8808
|
case "secondary":
|
|
8797
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(
|
|
8809
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(O, { secondary: !0, iconLeft: l, onClick: n, children: i ? /* @__PURE__ */ e(
|
|
8798
8810
|
w,
|
|
8799
8811
|
{
|
|
8800
8812
|
fontFamily: "Poppins",
|
|
@@ -8803,11 +8815,11 @@ const Rc = ({
|
|
|
8803
8815
|
style: { color: "var(--sa-background-success, #28ac6e)" },
|
|
8804
8816
|
children: d || t
|
|
8805
8817
|
}
|
|
8806
|
-
) : t }) : /* @__PURE__ */ e(
|
|
8818
|
+
) : t }) : /* @__PURE__ */ e(O, { secondary: !0, onClick: n, children: d || t }) });
|
|
8807
8819
|
case "success":
|
|
8808
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(
|
|
8820
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(O, { success: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(O, { success: !0, onClick: n, children: d || t }) });
|
|
8809
8821
|
default:
|
|
8810
|
-
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(
|
|
8822
|
+
return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(O, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(O, { primary: !0, onClick: n, children: d || t }) });
|
|
8811
8823
|
}
|
|
8812
8824
|
};
|
|
8813
8825
|
return /* @__PURE__ */ u(
|
|
@@ -8838,7 +8850,7 @@ const Rc = ({
|
|
|
8838
8850
|
]
|
|
8839
8851
|
}
|
|
8840
8852
|
);
|
|
8841
|
-
},
|
|
8853
|
+
}, U = {
|
|
8842
8854
|
c001A72: "#001A72",
|
|
8843
8855
|
c64B5F6: "#64B5F6",
|
|
8844
8856
|
c98B4CB: "#98B4CB",
|
|
@@ -8862,23 +8874,23 @@ function cl({ width: t, height: r }) {
|
|
|
8862
8874
|
"path",
|
|
8863
8875
|
{
|
|
8864
8876
|
d: "M32.4375 254.5H612.437",
|
|
8865
|
-
stroke:
|
|
8877
|
+
stroke: U.c64B5F6,
|
|
8866
8878
|
strokeWidth: "5",
|
|
8867
8879
|
strokeLinecap: "round"
|
|
8868
8880
|
}
|
|
8869
8881
|
),
|
|
8870
|
-
/* @__PURE__ */ e("rect", { x: "216.562", y: "45.5605", width: "55", height: "20", fill:
|
|
8871
|
-
/* @__PURE__ */ e("rect", { x: "14.4375", y: "89.7803", width: "46", height: "20", fill:
|
|
8872
|
-
/* @__PURE__ */ e("rect", { x: "0.4375", y: "111.78", width: "46", height: "20", fill:
|
|
8873
|
-
/* @__PURE__ */ e("rect", { x: "0.4375", y: "67.7803", width: "46", height: "20", fill:
|
|
8874
|
-
/* @__PURE__ */ e("rect", { x: "344.312", y: "0.5", width: "55", height: "20", fill:
|
|
8875
|
-
/* @__PURE__ */ e("rect", { x: "549.562", y: "86.7803", width: "55", height: "20", fill:
|
|
8876
|
-
/* @__PURE__ */ e("rect", { x: "566.562", y: "64.7803", width: "55", height: "20", fill:
|
|
8882
|
+
/* @__PURE__ */ e("rect", { x: "216.562", y: "45.5605", width: "55", height: "20", fill: U.cD6EBFD }),
|
|
8883
|
+
/* @__PURE__ */ e("rect", { x: "14.4375", y: "89.7803", width: "46", height: "20", fill: U.cD6EBFD }),
|
|
8884
|
+
/* @__PURE__ */ e("rect", { x: "0.4375", y: "111.78", width: "46", height: "20", fill: U.cD6EBFD }),
|
|
8885
|
+
/* @__PURE__ */ e("rect", { x: "0.4375", y: "67.7803", width: "46", height: "20", fill: U.cD6EBFD }),
|
|
8886
|
+
/* @__PURE__ */ e("rect", { x: "344.312", y: "0.5", width: "55", height: "20", fill: U.cD6EBFD }),
|
|
8887
|
+
/* @__PURE__ */ e("rect", { x: "549.562", y: "86.7803", width: "55", height: "20", fill: U.cD6EBFD }),
|
|
8888
|
+
/* @__PURE__ */ e("rect", { x: "566.562", y: "64.7803", width: "55", height: "20", fill: U.cD6EBFD }),
|
|
8877
8889
|
/* @__PURE__ */ e(
|
|
8878
8890
|
"path",
|
|
8879
8891
|
{
|
|
8880
8892
|
d: "M233.438 165.217C233.438 132.764 239.035 107.198 250.231 88.5189C261.596 69.8396 279.832 60.5 304.938 60.5C330.043 60.5 348.194 69.8396 359.389 88.5189C370.755 107.198 376.438 132.764 376.438 165.217C376.438 198.047 370.755 223.802 359.389 242.481C348.194 261.16 330.043 270.5 304.938 270.5C279.832 270.5 261.596 261.16 250.231 242.481C239.035 223.802 233.438 198.047 233.438 165.217ZM333.69 165.217C333.69 146.16 331.824 131.538 328.092 121.349C324.36 110.972 316.642 105.783 304.938 105.783C293.233 105.783 285.515 110.972 281.783 121.349C278.051 131.538 276.185 146.16 276.185 165.217C276.185 178.047 276.863 188.708 278.22 197.198C279.577 205.5 282.292 212.292 286.363 217.575C290.604 222.67 296.795 225.217 304.938 225.217C313.08 225.217 319.187 222.67 323.258 217.575C327.499 212.292 330.298 205.5 331.655 197.198C333.012 188.708 333.69 178.047 333.69 165.217Z",
|
|
8881
|
-
fill:
|
|
8893
|
+
fill: U.cD0E5F7
|
|
8882
8894
|
}
|
|
8883
8895
|
),
|
|
8884
8896
|
/* @__PURE__ */ e(
|
|
@@ -8887,7 +8899,7 @@ function cl({ width: t, height: r }) {
|
|
|
8887
8899
|
fillRule: "evenodd",
|
|
8888
8900
|
clipRule: "evenodd",
|
|
8889
8901
|
d: "M50.4375 235.124V194.28L138.96 60.5H192.466V191.32H215.438V235.124H192.466V249.5H144.563V235.124H50.4375ZM100.862 191.32L147.925 116.143V191.32H100.862Z",
|
|
8890
|
-
fill:
|
|
8902
|
+
fill: U.cBBDEFB,
|
|
8891
8903
|
fillOpacity: "0.6"
|
|
8892
8904
|
}
|
|
8893
8905
|
),
|
|
@@ -8897,41 +8909,41 @@ function cl({ width: t, height: r }) {
|
|
|
8897
8909
|
fillRule: "evenodd",
|
|
8898
8910
|
clipRule: "evenodd",
|
|
8899
8911
|
d: "M394.438 235.124V194.28L482.96 60.5H536.466V191.32H559.438V235.124H536.466V249.5H488.563V235.124H394.438ZM444.862 191.32L491.925 116.143V191.32H444.862Z",
|
|
8900
|
-
fill:
|
|
8912
|
+
fill: U.cBBDEFB,
|
|
8901
8913
|
fillOpacity: "0.6"
|
|
8902
8914
|
}
|
|
8903
8915
|
),
|
|
8904
|
-
/* @__PURE__ */ e("path", { d: "M349.472 171.5H261.64V186.396H349.472V171.5Z", fill:
|
|
8905
|
-
/* @__PURE__ */ e("path", { d: "M261.64 171.5L244.719 186.396H261.64V171.5Z", fill:
|
|
8916
|
+
/* @__PURE__ */ e("path", { d: "M349.472 171.5H261.64V186.396H349.472V171.5Z", fill: U.c98B4CB }),
|
|
8917
|
+
/* @__PURE__ */ e("path", { d: "M261.64 171.5L244.719 186.396H261.64V171.5Z", fill: U.c98B4CB }),
|
|
8906
8918
|
/* @__PURE__ */ e(
|
|
8907
8919
|
"path",
|
|
8908
8920
|
{
|
|
8909
8921
|
d: "M363.574 186.396L349.472 171.5V186.396H363.574Z",
|
|
8910
|
-
fill:
|
|
8922
|
+
fill: U.c98B4CB
|
|
8911
8923
|
}
|
|
8912
8924
|
),
|
|
8913
8925
|
/* @__PURE__ */ e(
|
|
8914
8926
|
"path",
|
|
8915
8927
|
{
|
|
8916
8928
|
d: "M244.719 200.89V264.5H363.574V200.89M244.719 200.89H233.438L244.719 186.396M244.719 200.89H363.574M363.574 200.89H372.437L363.574 186.396M244.719 186.396L261.64 171.5M244.719 186.396H261.64M363.574 186.396L349.472 171.5M363.574 186.396H349.472M261.64 171.5H349.472M261.64 171.5V186.396M349.472 171.5V186.396M349.472 186.396H261.64",
|
|
8917
|
-
stroke:
|
|
8929
|
+
stroke: U.c000000,
|
|
8918
8930
|
strokeWidth: "2"
|
|
8919
8931
|
}
|
|
8920
8932
|
),
|
|
8921
|
-
/* @__PURE__ */ e("rect", { x: "246.438", y: "202.5", width: "116", height: "60", fill:
|
|
8933
|
+
/* @__PURE__ */ e("rect", { x: "246.438", y: "202.5", width: "116", height: "60", fill: U.cFFFFFF }),
|
|
8922
8934
|
/* @__PURE__ */ e(
|
|
8923
8935
|
"path",
|
|
8924
8936
|
{
|
|
8925
8937
|
d: "M245.536 187.5H362.959L369.438 198.5H237.438L245.536 187.5Z",
|
|
8926
|
-
fill:
|
|
8938
|
+
fill: U.cFFFFFF
|
|
8927
8939
|
}
|
|
8928
8940
|
),
|
|
8929
8941
|
/* @__PURE__ */ e(
|
|
8930
8942
|
"path",
|
|
8931
8943
|
{
|
|
8932
8944
|
d: "M332.438 129.846C332.438 141.175 329.183 152.403 323.949 160.772C318.699 169.168 311.592 174.5 303.938 174.5C296.283 174.5 289.176 169.168 283.926 160.772C278.692 152.403 275.438 141.175 275.438 129.846C275.438 118.458 277.838 109.628 282.543 103.663C287.216 97.7387 294.274 94.5 303.938 94.5C313.601 94.5 320.659 97.7387 325.332 103.663C330.037 109.628 332.438 118.458 332.438 129.846Z",
|
|
8933
|
-
fill:
|
|
8934
|
-
stroke:
|
|
8945
|
+
fill: U.cFFFFFF,
|
|
8946
|
+
stroke: U.c000000,
|
|
8935
8947
|
strokeWidth: "2"
|
|
8936
8948
|
}
|
|
8937
8949
|
),
|
|
@@ -8939,7 +8951,7 @@ function cl({ width: t, height: r }) {
|
|
|
8939
8951
|
"path",
|
|
8940
8952
|
{
|
|
8941
8953
|
d: "M281.438 145.5C284.032 154.136 285.762 158.682 290.951 164.591M292.681 166.409C293.624 167.647 295.708 169.591 297.438 170.5",
|
|
8942
|
-
stroke:
|
|
8954
|
+
stroke: U.c000000,
|
|
8943
8955
|
strokeWidth: "2",
|
|
8944
8956
|
strokeLinecap: "round",
|
|
8945
8957
|
strokeLinejoin: "round"
|
|
@@ -8949,7 +8961,7 @@ function cl({ width: t, height: r }) {
|
|
|
8949
8961
|
"path",
|
|
8950
8962
|
{
|
|
8951
8963
|
d: "M304.438 175C299.54 176.339 297.208 177.876 293.938 182.5M304.438 175C301.183 178.041 299.537 178.883 299.438 182.5M304.438 175C308.173 177.107 309.635 178.834 311.438 182.5",
|
|
8952
|
-
stroke:
|
|
8964
|
+
stroke: U.c000000,
|
|
8953
8965
|
strokeWidth: "2",
|
|
8954
8966
|
strokeLinecap: "round",
|
|
8955
8967
|
strokeLinejoin: "round"
|
|
@@ -8959,7 +8971,7 @@ function cl({ width: t, height: r }) {
|
|
|
8959
8971
|
"path",
|
|
8960
8972
|
{
|
|
8961
8973
|
d: "M304.936 175.5C303.438 180 302.529 181.628 304.936 186.5",
|
|
8962
|
-
stroke:
|
|
8974
|
+
stroke: U.c000000,
|
|
8963
8975
|
strokeWidth: "2",
|
|
8964
8976
|
strokeLinecap: "round",
|
|
8965
8977
|
strokeLinejoin: "round"
|
|
@@ -8969,30 +8981,30 @@ function cl({ width: t, height: r }) {
|
|
|
8969
8981
|
"path",
|
|
8970
8982
|
{
|
|
8971
8983
|
d: "M288.178 120.981C289.969 120.93 290.921 121.313 292.167 122.754",
|
|
8972
|
-
stroke:
|
|
8984
|
+
stroke: U.c000000,
|
|
8973
8985
|
strokeWidth: "2",
|
|
8974
8986
|
strokeLinecap: "round",
|
|
8975
8987
|
strokeLinejoin: "round"
|
|
8976
8988
|
}
|
|
8977
8989
|
),
|
|
8978
|
-
/* @__PURE__ */ e("circle", { cx: "291.724", cy: "118.765", r: "3.1027", fill:
|
|
8990
|
+
/* @__PURE__ */ e("circle", { cx: "291.724", cy: "118.765", r: "3.1027", fill: U.c000000 }),
|
|
8979
8991
|
/* @__PURE__ */ e(
|
|
8980
8992
|
"path",
|
|
8981
8993
|
{
|
|
8982
8994
|
d: "M308.128 122.463C309.123 120.973 309.987 120.418 311.883 120.237",
|
|
8983
|
-
stroke:
|
|
8995
|
+
stroke: U.c000000,
|
|
8984
8996
|
strokeWidth: "2",
|
|
8985
8997
|
strokeLinecap: "round",
|
|
8986
8998
|
strokeLinejoin: "round"
|
|
8987
8999
|
}
|
|
8988
9000
|
),
|
|
8989
|
-
/* @__PURE__ */ e("circle", { cx: "307.681", cy: "118.765", r: "3.1027", fill:
|
|
8990
|
-
/* @__PURE__ */ e("ellipse", { cx: "297.938", cy: "134.5", rx: "2.5", ry: "2", fill:
|
|
9001
|
+
/* @__PURE__ */ e("circle", { cx: "307.681", cy: "118.765", r: "3.1027", fill: U.c000000 }),
|
|
9002
|
+
/* @__PURE__ */ e("ellipse", { cx: "297.938", cy: "134.5", rx: "2.5", ry: "2", fill: U.c000000 }),
|
|
8991
9003
|
/* @__PURE__ */ e(
|
|
8992
9004
|
"path",
|
|
8993
9005
|
{
|
|
8994
9006
|
d: "M340.437 97.5L333.438 104.5M333.438 97.5L340.438 104.5",
|
|
8995
|
-
stroke:
|
|
9007
|
+
stroke: U.c001A72,
|
|
8996
9008
|
strokeWidth: "2",
|
|
8997
9009
|
strokeLinecap: "round",
|
|
8998
9010
|
strokeLinejoin: "round"
|
|
@@ -9002,7 +9014,7 @@ function cl({ width: t, height: r }) {
|
|
|
9002
9014
|
"path",
|
|
9003
9015
|
{
|
|
9004
9016
|
d: "M265.437 115.5L260.438 120.5M260.438 115.5L265.438 120.5",
|
|
9005
|
-
stroke:
|
|
9017
|
+
stroke: U.c001A72,
|
|
9006
9018
|
strokeWidth: "1.2",
|
|
9007
9019
|
strokeLinecap: "round",
|
|
9008
9020
|
strokeLinejoin: "round"
|
|
@@ -9012,7 +9024,7 @@ function cl({ width: t, height: r }) {
|
|
|
9012
9024
|
"path",
|
|
9013
9025
|
{
|
|
9014
9026
|
d: "M288.437 87.5L283.438 92.5M283.438 87.5L288.438 92.5",
|
|
9015
|
-
stroke:
|
|
9027
|
+
stroke: U.c001A72,
|
|
9016
9028
|
strokeWidth: "1.2",
|
|
9017
9029
|
strokeLinecap: "round",
|
|
9018
9030
|
strokeLinejoin: "round"
|
|
@@ -9022,7 +9034,7 @@ function cl({ width: t, height: r }) {
|
|
|
9022
9034
|
"path",
|
|
9023
9035
|
{
|
|
9024
9036
|
d: "M305.437 83.5L298.438 90.5M298.438 83.5L305.438 90.5",
|
|
9025
|
-
stroke:
|
|
9037
|
+
stroke: U.c001A72,
|
|
9026
9038
|
strokeWidth: "1.5",
|
|
9027
9039
|
strokeLinecap: "round",
|
|
9028
9040
|
strokeLinejoin: "round"
|
|
@@ -9032,21 +9044,21 @@ function cl({ width: t, height: r }) {
|
|
|
9032
9044
|
"path",
|
|
9033
9045
|
{
|
|
9034
9046
|
d: "M342.437 145.5L337.438 150.5M337.438 145.5L342.438 150.5",
|
|
9035
|
-
stroke:
|
|
9047
|
+
stroke: U.c001A72,
|
|
9036
9048
|
strokeWidth: "1.2",
|
|
9037
9049
|
strokeLinecap: "round",
|
|
9038
9050
|
strokeLinejoin: "round"
|
|
9039
9051
|
}
|
|
9040
9052
|
),
|
|
9041
|
-
/* @__PURE__ */ e("circle", { cx: "339.938", cy: "111", r: "2.5", fill:
|
|
9042
|
-
/* @__PURE__ */ e("circle", { cx: "336.438", cy: "94.5", r: "1", fill:
|
|
9043
|
-
/* @__PURE__ */ e("circle", { cx: "347.438", cy: "99.5", r: "1", fill:
|
|
9044
|
-
/* @__PURE__ */ e("circle", { cx: "267.438", cy: "109.5", r: "2", fill:
|
|
9045
|
-
/* @__PURE__ */ e("circle", { cx: "293.438", cy: "85.5", r: "2", fill:
|
|
9046
|
-
/* @__PURE__ */ e("circle", { cx: "339.438", cy: "138.5", r: "2", fill:
|
|
9047
|
-
/* @__PURE__ */ e("circle", { cx: "267.438", cy: "150.5", r: "2", fill:
|
|
9048
|
-
/* @__PURE__ */ e("circle", { cx: "268.438", cy: "118.5", r: "1", fill:
|
|
9049
|
-
/* @__PURE__ */ e("circle", { cx: "260.438", cy: "124.5", r: "1", fill:
|
|
9053
|
+
/* @__PURE__ */ e("circle", { cx: "339.938", cy: "111", r: "2.5", fill: U.c001A72 }),
|
|
9054
|
+
/* @__PURE__ */ e("circle", { cx: "336.438", cy: "94.5", r: "1", fill: U.c001A72 }),
|
|
9055
|
+
/* @__PURE__ */ e("circle", { cx: "347.438", cy: "99.5", r: "1", fill: U.c001A72 }),
|
|
9056
|
+
/* @__PURE__ */ e("circle", { cx: "267.438", cy: "109.5", r: "2", fill: U.c001A72 }),
|
|
9057
|
+
/* @__PURE__ */ e("circle", { cx: "293.438", cy: "85.5", r: "2", fill: U.c001A72 }),
|
|
9058
|
+
/* @__PURE__ */ e("circle", { cx: "339.438", cy: "138.5", r: "2", fill: U.c001A72 }),
|
|
9059
|
+
/* @__PURE__ */ e("circle", { cx: "267.438", cy: "150.5", r: "2", fill: U.c001A72 }),
|
|
9060
|
+
/* @__PURE__ */ e("circle", { cx: "268.438", cy: "118.5", r: "1", fill: U.c001A72 }),
|
|
9061
|
+
/* @__PURE__ */ e("circle", { cx: "260.438", cy: "124.5", r: "1", fill: U.c001A72 })
|
|
9050
9062
|
]
|
|
9051
9063
|
}
|
|
9052
9064
|
) });
|
|
@@ -9083,7 +9095,7 @@ function Vc({ onClick: t }) {
|
|
|
9083
9095
|
children: "Sorry, we couldn't find the page you are looking for"
|
|
9084
9096
|
}
|
|
9085
9097
|
),
|
|
9086
|
-
t && /* @__PURE__ */ e(
|
|
9098
|
+
t && /* @__PURE__ */ e(O, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
9087
9099
|
]
|
|
9088
9100
|
}
|
|
9089
9101
|
);
|
|
@@ -9324,7 +9336,7 @@ function sl({ width: t, height: r }) {
|
|
|
9324
9336
|
}
|
|
9325
9337
|
) });
|
|
9326
9338
|
}
|
|
9327
|
-
function
|
|
9339
|
+
function Hc({ onClick: t }) {
|
|
9328
9340
|
const r = ke("md");
|
|
9329
9341
|
return /* @__PURE__ */ u(
|
|
9330
9342
|
f,
|
|
@@ -9339,7 +9351,7 @@ function Oc({ onClick: t }) {
|
|
|
9339
9351
|
children: [
|
|
9340
9352
|
/* @__PURE__ */ e(sl, { width: r ? 600 : 300 }),
|
|
9341
9353
|
/* @__PURE__ */ e(w, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
|
|
9342
|
-
t && /* @__PURE__ */ e(
|
|
9354
|
+
t && /* @__PURE__ */ e(O, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
9343
9355
|
]
|
|
9344
9356
|
}
|
|
9345
9357
|
);
|
|
@@ -10033,7 +10045,7 @@ function al({ width: t, height: r }) {
|
|
|
10033
10045
|
}
|
|
10034
10046
|
) });
|
|
10035
10047
|
}
|
|
10036
|
-
function
|
|
10048
|
+
function Oc({ onClick: t }) {
|
|
10037
10049
|
const r = ke("md");
|
|
10038
10050
|
return /* @__PURE__ */ u(
|
|
10039
10051
|
f,
|
|
@@ -10066,7 +10078,7 @@ function Hc({ onClick: t }) {
|
|
|
10066
10078
|
children: "we are trying to fix the problem"
|
|
10067
10079
|
}
|
|
10068
10080
|
),
|
|
10069
|
-
t && /* @__PURE__ */ e(
|
|
10081
|
+
t && /* @__PURE__ */ e(O, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
10070
10082
|
]
|
|
10071
10083
|
}
|
|
10072
10084
|
);
|
|
@@ -10105,7 +10117,7 @@ const Tc = (t) => {
|
|
|
10105
10117
|
gap: ((s = t.wrapperConfirmBtnProps) == null ? void 0 : s.gap) || "sm",
|
|
10106
10118
|
...t.wrapperConfirmBtnProps,
|
|
10107
10119
|
children: [
|
|
10108
|
-
t.onCancel && /* @__PURE__ */ e(
|
|
10120
|
+
t.onCancel && /* @__PURE__ */ e(O, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
|
|
10109
10121
|
/* @__PURE__ */ e(
|
|
10110
10122
|
f,
|
|
10111
10123
|
{
|
|
@@ -10115,7 +10127,7 @@ const Tc = (t) => {
|
|
|
10115
10127
|
textWrap: "nowrap"
|
|
10116
10128
|
},
|
|
10117
10129
|
children: /* @__PURE__ */ e(
|
|
10118
|
-
|
|
10130
|
+
O,
|
|
10119
10131
|
{
|
|
10120
10132
|
...t.buttonConfirmProps,
|
|
10121
10133
|
onClick: t.onConfirm,
|
|
@@ -10156,7 +10168,7 @@ const Tc = (t) => {
|
|
|
10156
10168
|
variantTag: k = "info"
|
|
10157
10169
|
}) => {
|
|
10158
10170
|
const L = se(null), [z, D] = R("100vh");
|
|
10159
|
-
|
|
10171
|
+
J(() => {
|
|
10160
10172
|
const v = () => {
|
|
10161
10173
|
if (L.current) {
|
|
10162
10174
|
const M = L.current.getBoundingClientRect().top;
|
|
@@ -10228,7 +10240,7 @@ const Tc = (t) => {
|
|
|
10228
10240
|
o ? a = i.includes(c.value) ? d.filter((m) => m.value !== c.value) : [...d, c] : a = [c], n == null || n(a);
|
|
10229
10241
|
};
|
|
10230
10242
|
return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((c, d) => /* @__PURE__ */ e(
|
|
10231
|
-
|
|
10243
|
+
O,
|
|
10232
10244
|
{
|
|
10233
10245
|
...i.includes(c.value) ? { primary: !0 } : { secondary: !0 },
|
|
10234
10246
|
onClick: () => s(c),
|
|
@@ -10354,23 +10366,23 @@ function ml(t) {
|
|
|
10354
10366
|
disableBackdropClose: p = !1,
|
|
10355
10367
|
lockBodyScroll: g = !0,
|
|
10356
10368
|
children: b
|
|
10357
|
-
} = t, [B, y] = R(i), k = o ?? B, z = ke("md") ? k : "fullscreen", D =
|
|
10358
|
-
(
|
|
10359
|
-
o === void 0 && y(
|
|
10369
|
+
} = t, [B, y] = R(i), k = o ?? B, z = ke("md") ? k : "fullscreen", D = Y(
|
|
10370
|
+
(G) => {
|
|
10371
|
+
o === void 0 && y(G), l == null || l(G);
|
|
10360
10372
|
},
|
|
10361
10373
|
[o, l]
|
|
10362
10374
|
), C = se(null);
|
|
10363
|
-
|
|
10375
|
+
J(() => {
|
|
10364
10376
|
if (!(!r || !g))
|
|
10365
10377
|
return C.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
|
|
10366
10378
|
document.body.style.overflow = C.current ?? "";
|
|
10367
10379
|
};
|
|
10368
|
-
}, [r, g]),
|
|
10380
|
+
}, [r, g]), J(() => {
|
|
10369
10381
|
if (!r || m) return;
|
|
10370
|
-
const
|
|
10371
|
-
|
|
10382
|
+
const G = (oe) => {
|
|
10383
|
+
oe.key === "Escape" && n();
|
|
10372
10384
|
};
|
|
10373
|
-
return window.addEventListener("keydown",
|
|
10385
|
+
return window.addEventListener("keydown", G), () => window.removeEventListener("keydown", G);
|
|
10374
10386
|
}, [r, m, n]);
|
|
10375
10387
|
const V = ge(
|
|
10376
10388
|
() => Et(b, vr),
|
|
@@ -10386,22 +10398,22 @@ function ml(t) {
|
|
|
10386
10398
|
[b]
|
|
10387
10399
|
);
|
|
10388
10400
|
if (!r) return null;
|
|
10389
|
-
const
|
|
10401
|
+
const $ = [
|
|
10390
10402
|
Se["lyd-panel"],
|
|
10391
10403
|
z === "modal" && Se["lyd-modal"],
|
|
10392
10404
|
z === "fullscreen" && Se["lyd-fullscreen"],
|
|
10393
10405
|
z === "sidebar" && Se["lyd-sidebar"]
|
|
10394
|
-
].filter(Boolean).join(" "),
|
|
10406
|
+
].filter(Boolean).join(" "), N = {
|
|
10395
10407
|
"--lyd-max-w": fl(d),
|
|
10396
10408
|
...a !== void 0 && { "--lyd-aside-w": a }
|
|
10397
|
-
},
|
|
10409
|
+
}, P = () => {
|
|
10398
10410
|
p || n();
|
|
10399
10411
|
};
|
|
10400
10412
|
return /* @__PURE__ */ u(
|
|
10401
10413
|
"div",
|
|
10402
10414
|
{
|
|
10403
10415
|
className: Se["lyd-root"],
|
|
10404
|
-
style:
|
|
10416
|
+
style: N,
|
|
10405
10417
|
role: "dialog",
|
|
10406
10418
|
"aria-modal": "true",
|
|
10407
10419
|
children: [
|
|
@@ -10409,11 +10421,11 @@ function ml(t) {
|
|
|
10409
10421
|
"div",
|
|
10410
10422
|
{
|
|
10411
10423
|
className: Se["lyd-backdrop"],
|
|
10412
|
-
onClick:
|
|
10424
|
+
onClick: P,
|
|
10413
10425
|
"aria-hidden": "true"
|
|
10414
10426
|
}
|
|
10415
10427
|
),
|
|
10416
|
-
/* @__PURE__ */ u("div", { className:
|
|
10428
|
+
/* @__PURE__ */ u("div", { className: $, children: [
|
|
10417
10429
|
/* @__PURE__ */ u("div", { className: Se["lyd-header"], children: [
|
|
10418
10430
|
/* @__PURE__ */ e("div", { className: Se["lyd-header-content"], children: V }),
|
|
10419
10431
|
/* @__PURE__ */ u("div", { className: Se["lyd-header-actions"], children: [
|
|
@@ -10446,7 +10458,7 @@ Nt.Body = Cr;
|
|
|
10446
10458
|
Nt.Aside = wr;
|
|
10447
10459
|
Nt.Footer = Dr;
|
|
10448
10460
|
function jc({ url: t, filename: r, onClose: n }) {
|
|
10449
|
-
return
|
|
10461
|
+
return J(() => {
|
|
10450
10462
|
const o = (i) => {
|
|
10451
10463
|
i.key === "Escape" && n();
|
|
10452
10464
|
};
|
|
@@ -10544,7 +10556,7 @@ function jc({ url: t, filename: r, onClose: n }) {
|
|
|
10544
10556
|
);
|
|
10545
10557
|
}
|
|
10546
10558
|
const _c = (t) => {
|
|
10547
|
-
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [o, i] =
|
|
10559
|
+
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [o, i] = Ot(), l = Rt(o.toString());
|
|
10548
10560
|
return {
|
|
10549
10561
|
activeTab: l[n] ? parseInt(l[n]) : r,
|
|
10550
10562
|
handleTabChange: (d) => {
|
|
@@ -10562,7 +10574,7 @@ function Pc({
|
|
|
10562
10574
|
formatTitle: n
|
|
10563
10575
|
}) {
|
|
10564
10576
|
const o = yt();
|
|
10565
|
-
|
|
10577
|
+
J(() => {
|
|
10566
10578
|
let i = null, l = null;
|
|
10567
10579
|
for (const d of r) {
|
|
10568
10580
|
const a = d.items.find((m) => m.to ? m.to === "/" ? o.pathname === "/" : !!(m.to === o.pathname || o.pathname.startsWith(m.to + "/")) : !1);
|
|
@@ -10578,7 +10590,7 @@ function Pc({
|
|
|
10578
10590
|
}, [o.pathname]);
|
|
10579
10591
|
}
|
|
10580
10592
|
const Zc = () => {
|
|
10581
|
-
const [t, r] =
|
|
10593
|
+
const [t, r] = Ot(), n = Rt(t.toString()), o = nn(), i = yt(), l = o.id;
|
|
10582
10594
|
return {
|
|
10583
10595
|
// query params
|
|
10584
10596
|
setSearchParams: r,
|
|
@@ -10633,13 +10645,13 @@ export {
|
|
|
10633
10645
|
Lo as ColumnMenu,
|
|
10634
10646
|
Tc as ConfirmationDialog,
|
|
10635
10647
|
ko as DataTable,
|
|
10636
|
-
|
|
10648
|
+
le as DecisionWrapper,
|
|
10637
10649
|
br as EachUtils,
|
|
10638
10650
|
Rc as EmptyStatePage,
|
|
10639
10651
|
oc as FilterBar,
|
|
10640
10652
|
Ii as FilterDrawer,
|
|
10641
10653
|
Ac as FloatingFooter,
|
|
10642
|
-
|
|
10654
|
+
Hc as ForbiddenPage,
|
|
10643
10655
|
Bc as Form,
|
|
10644
10656
|
Nc as FullSection,
|
|
10645
10657
|
ql as HeaderLeftSlot,
|
|
@@ -10665,7 +10677,7 @@ export {
|
|
|
10665
10677
|
hn as SectionFooter,
|
|
10666
10678
|
un as SectionHeader,
|
|
10667
10679
|
$c as SelectButton,
|
|
10668
|
-
|
|
10680
|
+
Oc as ServerErrorPage,
|
|
10669
10681
|
Jn as SidebarBadgesProvider,
|
|
10670
10682
|
Ul as SidebarGroupSlot,
|
|
10671
10683
|
ri as SidebarGroupSlotOutlet,
|
|
@@ -10685,7 +10697,7 @@ export {
|
|
|
10685
10697
|
sc as expandDateCompact,
|
|
10686
10698
|
vc as formHasChanged,
|
|
10687
10699
|
pc as formatDate,
|
|
10688
|
-
|
|
10700
|
+
Ho as formatDateToIndonesian,
|
|
10689
10701
|
mc as formatRupiah,
|
|
10690
10702
|
Ai as getDateFilterValue,
|
|
10691
10703
|
nc as getDateRangeFilterValue,
|