@starasia/admin 12.8.0 → 12.10.0
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/RightDrawer/index.d.ts +6 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +574 -560
- package/dist/index.umd.js +3 -3
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -10,7 +10,7 @@ export * from "@starasia/button";
|
|
|
10
10
|
export * from "@starasia/card";
|
|
11
11
|
import { StarasiaDate as Ft } from "@starasia/date";
|
|
12
12
|
export * from "@starasia/date";
|
|
13
|
-
import { Dialog as Fr, DialogTitle as
|
|
13
|
+
import { Dialog as Fr, DialogTitle as zn, DialogBody as Er, DialogFooter as Bn } from "@starasia/dialog";
|
|
14
14
|
export * from "@starasia/dialog";
|
|
15
15
|
import { Drawer as An } from "@starasia/drawer";
|
|
16
16
|
export * from "@starasia/drawer";
|
|
@@ -22,13 +22,13 @@ import { searchParamsToObject as Pt } from "@starasia/http";
|
|
|
22
22
|
export * from "@starasia/http";
|
|
23
23
|
import { Input as yt } from "@starasia/input";
|
|
24
24
|
export * from "@starasia/input";
|
|
25
|
-
import { Menu as Oe, MenuButton as We, MenuLists as He, MenuHeading as Di, MenuBody as
|
|
25
|
+
import { Menu as Oe, MenuButton as We, MenuLists as He, MenuHeading as Di, MenuBody as Te, MenuFooter as Lr, MenuItem as Pe } from "@starasia/menu";
|
|
26
26
|
export * from "@starasia/menu";
|
|
27
27
|
import { Pagination as Mr } from "@starasia/pagination";
|
|
28
28
|
export * from "@starasia/pagination";
|
|
29
29
|
import { storage as ar } from "@starasia/storage";
|
|
30
30
|
export * from "@starasia/storage";
|
|
31
|
-
import { Tr as Ne, Td as Me, Table as
|
|
31
|
+
import { Tr as Ne, Td as Me, Table as Vt, Thead as Rn, Th as ht, Tbody as wr, useColumnWidths as ki, Tfoot as Si } from "@starasia/table";
|
|
32
32
|
export * from "@starasia/table";
|
|
33
33
|
export * from "@starasia/tabs";
|
|
34
34
|
import { Textarea as Fi } from "@starasia/textarea";
|
|
@@ -40,13 +40,13 @@ import { Toggle as Zt } from "@starasia/toggle";
|
|
|
40
40
|
export * from "@starasia/toggle";
|
|
41
41
|
import { Tooltip as Ie } from "@starasia/tooltip";
|
|
42
42
|
export * from "@starasia/tooltip";
|
|
43
|
-
import { Checkbox as
|
|
43
|
+
import { Checkbox as st } from "@starasia/checkbox";
|
|
44
44
|
export * from "@starasia/checkbox";
|
|
45
45
|
import { Radio as Mi } from "@starasia/radio";
|
|
46
46
|
export * from "@starasia/radio";
|
|
47
47
|
import { Text as D } from "@starasia/text";
|
|
48
48
|
export * from "@starasia/text";
|
|
49
|
-
import { Icon as
|
|
49
|
+
import { Icon as z } from "@starasia/icon";
|
|
50
50
|
export * from "@starasia/icon";
|
|
51
51
|
import { Flex as de } from "@starasia/flex";
|
|
52
52
|
export * from "@starasia/flex";
|
|
@@ -59,8 +59,8 @@ import { Skeleton as Ke } from "@starasia/skeleton";
|
|
|
59
59
|
export * from "@starasia/skeleton";
|
|
60
60
|
export * from "@starasia/progress-stepper";
|
|
61
61
|
import { jsx as e, Fragment as re, jsxs as d } from "react/jsx-runtime";
|
|
62
|
-
import
|
|
63
|
-
import
|
|
62
|
+
import at, { createContext as bt, useState as T, useContext as dt, useCallback as q, useMemo as ge, memo as Xe, useEffect as J, useRef as le, useLayoutEffect as rt, forwardRef as Wr, isValidElement as Dr, Children as Wi, useImperativeHandle as zi } from "react";
|
|
63
|
+
import Bi, { createPortal as zr } from "react-dom";
|
|
64
64
|
import Ai from "react-easy-crop";
|
|
65
65
|
const Ri = {
|
|
66
66
|
menus: [],
|
|
@@ -71,7 +71,7 @@ const Ri = {
|
|
|
71
71
|
setUserData: () => {
|
|
72
72
|
}
|
|
73
73
|
}, In = bt(Ri), On = () => dt(In), Ii = (t) => {
|
|
74
|
-
const [r, n] =
|
|
74
|
+
const [r, n] = T(
|
|
75
75
|
(t == null ? void 0 : t.initialUserData) || null
|
|
76
76
|
);
|
|
77
77
|
return {
|
|
@@ -87,7 +87,7 @@ const Ri = {
|
|
|
87
87
|
clearBadge: () => {
|
|
88
88
|
}
|
|
89
89
|
}), Oi = ({ children: t }) => {
|
|
90
|
-
const [r, n] =
|
|
90
|
+
const [r, n] = T({}), o = q(
|
|
91
91
|
(s) => {
|
|
92
92
|
n(
|
|
93
93
|
(a) => typeof s == "function" ? s(a) : s
|
|
@@ -116,7 +116,7 @@ const Ri = {
|
|
|
116
116
|
}, Hi = () => dt(Hn), dr = (t, r) => {
|
|
117
117
|
const n = r !== void 0 ? r : t;
|
|
118
118
|
return n == null ? null : typeof n == "string" || typeof n == "number" ? { value: n } : n;
|
|
119
|
-
},
|
|
119
|
+
}, Tn = bt({
|
|
120
120
|
collapsed: !1,
|
|
121
121
|
setCollapsed: () => {
|
|
122
122
|
},
|
|
@@ -135,11 +135,11 @@ const Ri = {
|
|
|
135
135
|
},
|
|
136
136
|
toggleMobile: () => {
|
|
137
137
|
}
|
|
138
|
-
}),
|
|
138
|
+
}), Ti = ({
|
|
139
139
|
children: t,
|
|
140
140
|
defaultCollapsed: r = !1
|
|
141
141
|
}) => {
|
|
142
|
-
const [n, o] =
|
|
142
|
+
const [n, o] = T(r), [i, l] = T(!1), c = q(
|
|
143
143
|
(x) => {
|
|
144
144
|
o(
|
|
145
145
|
(M) => typeof x == "function" ? x(M) : x
|
|
@@ -179,12 +179,12 @@ const Ri = {
|
|
|
179
179
|
b
|
|
180
180
|
]
|
|
181
181
|
);
|
|
182
|
-
return /* @__PURE__ */ e(
|
|
183
|
-
},
|
|
182
|
+
return /* @__PURE__ */ e(Tn.Provider, { value: k, children: t });
|
|
183
|
+
}, Vi = () => dt(Tn), Vn = bt(null), Ni = ({
|
|
184
184
|
adapter: t,
|
|
185
185
|
children: r
|
|
186
|
-
}) => /* @__PURE__ */ e(
|
|
187
|
-
const t = dt(
|
|
186
|
+
}) => /* @__PURE__ */ e(Vn.Provider, { value: t, children: r }), nt = () => {
|
|
187
|
+
const t = dt(Vn);
|
|
188
188
|
if (!t)
|
|
189
189
|
throw new Error(
|
|
190
190
|
"[@starasia/admin] Router adapter belum dipasang. Bungkus aplikasi dengan <App routerAdapter={...} /> atau <StarasiaRouterProvider adapter={...}>. Import adapter dari '@starasia/admin/adapters/react-router' atau '@starasia/admin/adapters/tanstack'."
|
|
@@ -212,7 +212,7 @@ const Ri = {
|
|
|
212
212
|
setUserData: a.setUserData,
|
|
213
213
|
menuBottom: o
|
|
214
214
|
},
|
|
215
|
-
children: /* @__PURE__ */ e(Oi, { children: /* @__PURE__ */ e(
|
|
215
|
+
children: /* @__PURE__ */ e(Oi, { children: /* @__PURE__ */ e(Ti, { children: s ? /* @__PURE__ */ e(nn, { value: s, children: t }) : u ? /* @__PURE__ */ e(nn, { value: u, children: t }) : t }) })
|
|
216
216
|
}
|
|
217
217
|
) });
|
|
218
218
|
}, jc = Xe($i);
|
|
@@ -253,11 +253,11 @@ function ji({
|
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
|
-
const
|
|
256
|
+
const Br = bt(null);
|
|
257
257
|
function _i({ children: t }) {
|
|
258
|
-
const [r, n] =
|
|
258
|
+
const [r, n] = T(null), [o, i] = T(null), [l, c] = T(null), [s, a] = T(0), u = q(() => (a((m) => m + 1), () => a((m) => m - 1)), []);
|
|
259
259
|
return /* @__PURE__ */ e(
|
|
260
|
-
|
|
260
|
+
Br.Provider,
|
|
261
261
|
{
|
|
262
262
|
value: {
|
|
263
263
|
prependNode: r,
|
|
@@ -274,7 +274,7 @@ function _i({ children: t }) {
|
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
276
|
function Pi({ children: t }) {
|
|
277
|
-
const r = dt(
|
|
277
|
+
const r = dt(Br);
|
|
278
278
|
return r ? /* @__PURE__ */ d(re, { children: [
|
|
279
279
|
/* @__PURE__ */ e("div", { ref: r.setPrependNode, style: { display: "contents" } }),
|
|
280
280
|
r.replaceCount > 0 ? /* @__PURE__ */ e("div", { ref: r.setReplaceNode, style: { display: "contents" } }) : t,
|
|
@@ -285,7 +285,7 @@ function _c({
|
|
|
285
285
|
children: t,
|
|
286
286
|
mode: r = "append"
|
|
287
287
|
}) {
|
|
288
|
-
const n = dt(
|
|
288
|
+
const n = dt(Br);
|
|
289
289
|
if (J(() => {
|
|
290
290
|
if (!(r !== "replace" || !n))
|
|
291
291
|
return n.registerReplace();
|
|
@@ -294,11 +294,11 @@ function _c({
|
|
|
294
294
|
"[HeaderLeftSlot] used outside AppLayout — content not rendered"
|
|
295
295
|
), null;
|
|
296
296
|
const o = r === "prepend" ? n.prependNode : r === "replace" ? n.replaceNode : n.appendNode;
|
|
297
|
-
return o ?
|
|
297
|
+
return o ? zr(t, o) : null;
|
|
298
298
|
}
|
|
299
299
|
const Ar = bt(null);
|
|
300
300
|
function Zi({ children: t }) {
|
|
301
|
-
const [r, n] =
|
|
301
|
+
const [r, n] = T({}), [o, i] = T({}), l = q((a, u) => {
|
|
302
302
|
n((m) => m[a] === u ? m : { ...m, [a]: u });
|
|
303
303
|
}, []), c = q((a) => (i((u) => ({ ...u, [a]: (u[a] ?? 0) + 1 })), () => i((u) => ({
|
|
304
304
|
...u,
|
|
@@ -310,7 +310,7 @@ function Zi({ children: t }) {
|
|
|
310
310
|
return /* @__PURE__ */ e(Ar.Provider, { value: s, children: t });
|
|
311
311
|
}
|
|
312
312
|
function Gi({ slotKey: t, fallback: r }) {
|
|
313
|
-
const n = dt(Ar), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i =
|
|
313
|
+
const n = dt(Ar), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i = le(n == null ? void 0 : n.setOutletNode);
|
|
314
314
|
i.current = n == null ? void 0 : n.setOutletNode;
|
|
315
315
|
const l = q(
|
|
316
316
|
(c) => {
|
|
@@ -323,7 +323,7 @@ function Gi({ slotKey: t, fallback: r }) {
|
|
|
323
323
|
return /* @__PURE__ */ e(re, { children: o ? /* @__PURE__ */ e("div", { ref: l, style: { display: "contents" } }) : r });
|
|
324
324
|
}
|
|
325
325
|
function Pc({ slotKey: t, children: r }) {
|
|
326
|
-
const n = dt(Ar), o =
|
|
326
|
+
const n = dt(Ar), o = le(n == null ? void 0 : n.registerSlot);
|
|
327
327
|
if (o.current = n == null ? void 0 : n.registerSlot, J(() => {
|
|
328
328
|
var l;
|
|
329
329
|
return (l = o.current) == null ? void 0 : l.call(o, t);
|
|
@@ -332,7 +332,7 @@ function Pc({ slotKey: t, children: r }) {
|
|
|
332
332
|
"[SidebarGroupSlot] used outside AppLayout — content not rendered"
|
|
333
333
|
), null;
|
|
334
334
|
const i = n.outletNodes[t];
|
|
335
|
-
return i ?
|
|
335
|
+
return i ? zr(r, i) : null;
|
|
336
336
|
}
|
|
337
337
|
const Nt = "moduleSwitcherGroupId", kr = "sa-module-switcher-change";
|
|
338
338
|
function on() {
|
|
@@ -349,7 +349,7 @@ function Zc() {
|
|
|
349
349
|
Nn(null);
|
|
350
350
|
}
|
|
351
351
|
function $n() {
|
|
352
|
-
const [t, r] =
|
|
352
|
+
const [t, r] = T(
|
|
353
353
|
() => on()
|
|
354
354
|
);
|
|
355
355
|
return J(() => {
|
|
@@ -365,7 +365,7 @@ function $n() {
|
|
|
365
365
|
Nn(o), r(o);
|
|
366
366
|
} };
|
|
367
367
|
}
|
|
368
|
-
let
|
|
368
|
+
let Bt = 0, ut = !1, ln = /* @__PURE__ */ new Set();
|
|
369
369
|
const cn = () => /* @__PURE__ */ d(
|
|
370
370
|
"svg",
|
|
371
371
|
{
|
|
@@ -383,7 +383,50 @@ const cn = () => /* @__PURE__ */ d(
|
|
|
383
383
|
/* @__PURE__ */ e("line", { x1: "6", y1: "1.667", x2: "6", y2: "14.333" })
|
|
384
384
|
]
|
|
385
385
|
}
|
|
386
|
-
)
|
|
386
|
+
);
|
|
387
|
+
function qi(t) {
|
|
388
|
+
const [r, n] = T(!1), o = le(null), i = le(null);
|
|
389
|
+
return rt(() => {
|
|
390
|
+
const l = o.current;
|
|
391
|
+
if (!l) return;
|
|
392
|
+
let c = 0;
|
|
393
|
+
const s = () => {
|
|
394
|
+
c = 0;
|
|
395
|
+
const u = i.current;
|
|
396
|
+
if (!u) return;
|
|
397
|
+
const m = u.scrollWidth > l.clientWidth;
|
|
398
|
+
n((p) => p === m ? p : m);
|
|
399
|
+
}, a = new ResizeObserver(() => {
|
|
400
|
+
c || (c = requestAnimationFrame(s));
|
|
401
|
+
});
|
|
402
|
+
return a.observe(l), s(), () => {
|
|
403
|
+
c && cancelAnimationFrame(c), a.disconnect();
|
|
404
|
+
};
|
|
405
|
+
}, [t]), { containerRef: o, textRef: i, truncated: r };
|
|
406
|
+
}
|
|
407
|
+
function sn({
|
|
408
|
+
text: t,
|
|
409
|
+
textStyle: r
|
|
410
|
+
}) {
|
|
411
|
+
const { containerRef: n, textRef: o, truncated: i } = qi(t), l = /* @__PURE__ */ e(
|
|
412
|
+
"span",
|
|
413
|
+
{
|
|
414
|
+
ref: o,
|
|
415
|
+
style: {
|
|
416
|
+
display: "block",
|
|
417
|
+
fontSize: "0.875rem",
|
|
418
|
+
fontWeight: "500",
|
|
419
|
+
whiteSpace: "nowrap",
|
|
420
|
+
overflow: "hidden",
|
|
421
|
+
textOverflow: "ellipsis",
|
|
422
|
+
...r
|
|
423
|
+
},
|
|
424
|
+
children: t
|
|
425
|
+
}
|
|
426
|
+
);
|
|
427
|
+
return /* @__PURE__ */ e("div", { ref: n, style: { flex: 1, minWidth: 0 }, children: i ? /* @__PURE__ */ e(Ie, { fluid: !0, label: t, position: "top", children: l }) : l });
|
|
428
|
+
}
|
|
429
|
+
const an = {
|
|
387
430
|
width: "100%",
|
|
388
431
|
display: "flex",
|
|
389
432
|
alignItems: "center",
|
|
@@ -416,51 +459,51 @@ function Gc({
|
|
|
416
459
|
logoutButton: g
|
|
417
460
|
}) {
|
|
418
461
|
var ft, H;
|
|
419
|
-
const { useSearchParams: b, useNavigate: k, useLocation: x, Outlet: M } =
|
|
462
|
+
const { useSearchParams: b, useNavigate: k, useLocation: x, Outlet: M } = nt(), [S] = b(), A = S.get("embed") === "true", C = On(), { badges: F } = Hi(), I = k(), R = x(), E = !Le("md"), [Z, Q] = T(!1), {
|
|
420
463
|
collapsed: P,
|
|
421
464
|
setCollapsed: K,
|
|
422
465
|
mobileOpen: N,
|
|
423
466
|
setMobileOpen: Y
|
|
424
|
-
} =
|
|
467
|
+
} = Vi(), [ne, $] = T(!1), [V, j] = T(
|
|
425
468
|
() => new Set(ln)
|
|
426
|
-
), [oe, ve] =
|
|
469
|
+
), [oe, ve] = T(null), { selectedGroupId: Ce, setSelectedGroupId: fe } = $n();
|
|
427
470
|
J(() => {
|
|
428
|
-
ln =
|
|
429
|
-
}, [
|
|
430
|
-
const pe =
|
|
471
|
+
ln = V;
|
|
472
|
+
}, [V]);
|
|
473
|
+
const pe = le(null), we = le(null);
|
|
431
474
|
J(() => {
|
|
432
475
|
const w = pe.current;
|
|
433
476
|
if (!w) return;
|
|
434
|
-
const
|
|
435
|
-
ut || (
|
|
477
|
+
const B = () => {
|
|
478
|
+
ut || (Bt = w.scrollTop);
|
|
436
479
|
};
|
|
437
|
-
return w.addEventListener("scroll",
|
|
480
|
+
return w.addEventListener("scroll", B), () => w.removeEventListener("scroll", B);
|
|
438
481
|
}, []);
|
|
439
|
-
const
|
|
482
|
+
const ze = () => {
|
|
440
483
|
const w = pe.current;
|
|
441
|
-
w &&
|
|
484
|
+
w && Bt > 0 && (ut = !0, w.scrollTop = Bt, requestAnimationFrame(() => {
|
|
442
485
|
ut = !1;
|
|
443
486
|
}));
|
|
444
487
|
};
|
|
445
|
-
|
|
446
|
-
ut = !0,
|
|
488
|
+
rt(() => {
|
|
489
|
+
ut = !0, ze();
|
|
447
490
|
const w = setTimeout(() => {
|
|
448
491
|
ut = !1;
|
|
449
492
|
}, 300);
|
|
450
493
|
return () => clearTimeout(w);
|
|
451
|
-
}, []),
|
|
452
|
-
C.menus.length > 0 && (
|
|
453
|
-
var
|
|
454
|
-
const w = (
|
|
494
|
+
}, []), rt(() => {
|
|
495
|
+
C.menus.length > 0 && (Bt > 0 ? ze() : requestAnimationFrame(() => {
|
|
496
|
+
var B;
|
|
497
|
+
const w = (B = pe.current) == null ? void 0 : B.querySelector(
|
|
455
498
|
"[data-menu-active='true']"
|
|
456
499
|
);
|
|
457
500
|
w && w.scrollIntoView({ block: "center", behavior: "instant" });
|
|
458
501
|
}));
|
|
459
502
|
}, [C.menus]), J(() => {
|
|
460
|
-
ut = !0,
|
|
461
|
-
const w = setTimeout(
|
|
503
|
+
ut = !0, ze();
|
|
504
|
+
const w = setTimeout(ze, 0), B = setTimeout(ze, 50), O = setTimeout(ze, 100), G = setTimeout(ze, 200), ue = setTimeout(() => {
|
|
462
505
|
ut = !1;
|
|
463
|
-
}, 300),
|
|
506
|
+
}, 300), Be = setTimeout(() => {
|
|
464
507
|
const me = pe.current, ie = me == null ? void 0 : me.querySelector("[data-menu-active='true']");
|
|
465
508
|
if (me && ie) {
|
|
466
509
|
const xe = me.getBoundingClientRect(), Ae = ie.getBoundingClientRect();
|
|
@@ -468,7 +511,7 @@ function Gc({
|
|
|
468
511
|
}
|
|
469
512
|
}, 250);
|
|
470
513
|
return () => {
|
|
471
|
-
clearTimeout(w), clearTimeout(
|
|
514
|
+
clearTimeout(w), clearTimeout(B), clearTimeout(O), clearTimeout(G), clearTimeout(ue), clearTimeout(Be);
|
|
472
515
|
};
|
|
473
516
|
}, [R.pathname]), J(() => {
|
|
474
517
|
we.current && (we.current.scrollTop = 0);
|
|
@@ -484,32 +527,32 @@ function Gc({
|
|
|
484
527
|
}, Ge = () => {
|
|
485
528
|
Q(!1), i();
|
|
486
529
|
}, Fe = (w) => {
|
|
487
|
-
const
|
|
488
|
-
return w.children &&
|
|
530
|
+
const B = [w.to];
|
|
531
|
+
return w.children && B.push(...w.children.map((O) => O.to)), B;
|
|
489
532
|
}, qe = [
|
|
490
533
|
...C.menus.flatMap((w) => w.items.flatMap(Fe)),
|
|
491
534
|
...((ft = C.menuBottom) == null ? void 0 : ft.flatMap(Fe)) ?? []
|
|
492
535
|
], De = (w) => {
|
|
493
536
|
if (!R.pathname.startsWith(w)) return !1;
|
|
494
|
-
const
|
|
495
|
-
return w ===
|
|
537
|
+
const B = qe.filter((O) => R.pathname.startsWith(O)).sort((O, G) => G.length - O.length)[0];
|
|
538
|
+
return w === B;
|
|
496
539
|
};
|
|
497
540
|
J(() => {
|
|
498
|
-
var
|
|
541
|
+
var B;
|
|
499
542
|
const w = (O) => {
|
|
500
543
|
var G;
|
|
501
544
|
(G = O.children) != null && G.some((ue) => R.pathname.startsWith(ue.to)) && j((ue) => {
|
|
502
|
-
const
|
|
503
|
-
return
|
|
545
|
+
const Be = new Set(ue);
|
|
546
|
+
return Be.add(O.id), Be;
|
|
504
547
|
});
|
|
505
548
|
};
|
|
506
549
|
C.menus.forEach((O) => {
|
|
507
550
|
O.items.forEach(w);
|
|
508
|
-
}), (
|
|
551
|
+
}), (B = C.menuBottom) == null || B.forEach(w);
|
|
509
552
|
}, [R.pathname, C.menus, C.menuBottom]);
|
|
510
|
-
const
|
|
511
|
-
j((
|
|
512
|
-
const O = new Set(
|
|
553
|
+
const ot = (w) => {
|
|
554
|
+
j((B) => {
|
|
555
|
+
const O = new Set(B);
|
|
513
556
|
return O.has(w) ? O.delete(w) : O.add(w), O;
|
|
514
557
|
});
|
|
515
558
|
};
|
|
@@ -521,22 +564,22 @@ function Gc({
|
|
|
521
564
|
return C.menus.filter(
|
|
522
565
|
(O) => O.id === Ce || O.parentGroupId === Ce
|
|
523
566
|
);
|
|
524
|
-
const w = C.menus.filter((O) => O.parentGroupId === void 0),
|
|
525
|
-
return
|
|
567
|
+
const w = C.menus.filter((O) => O.parentGroupId === void 0), B = C.menus.filter((O) => O.parentGroupId !== void 0).flatMap((O) => O.items);
|
|
568
|
+
return B.length === 0 ? w : [
|
|
526
569
|
...w,
|
|
527
|
-
{ id: 18, name: "Pengaturan", items:
|
|
570
|
+
{ id: 18, name: "Pengaturan", items: B, parentGroupId: void 0 }
|
|
528
571
|
];
|
|
529
572
|
}, [C.menus, Ce]);
|
|
530
573
|
if (A)
|
|
531
574
|
return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: t || /* @__PURE__ */ e(M, {}) });
|
|
532
575
|
const Ue = (w) => {
|
|
533
|
-
const
|
|
576
|
+
const B = w.children && w.children.length > 0, O = V.has(w.id), G = B ? w.children.some((me) => De(me.to)) : De(w.to), ue = dr(w.badge, F[w.id]), Be = !!ue && P && !E;
|
|
534
577
|
return /* @__PURE__ */ d("div", { "data-menu-active": G || void 0, children: [
|
|
535
578
|
/* @__PURE__ */ d(
|
|
536
579
|
"button",
|
|
537
580
|
{
|
|
538
581
|
onClick: (me) => {
|
|
539
|
-
if (
|
|
582
|
+
if (B)
|
|
540
583
|
if (P && !E) {
|
|
541
584
|
const ie = me.currentTarget.getBoundingClientRect();
|
|
542
585
|
ve({
|
|
@@ -545,7 +588,7 @@ function Gc({
|
|
|
545
588
|
left: ie.right + 8
|
|
546
589
|
});
|
|
547
590
|
} else
|
|
548
|
-
|
|
591
|
+
ot(w.id);
|
|
549
592
|
else
|
|
550
593
|
I(w.to);
|
|
551
594
|
},
|
|
@@ -584,8 +627,8 @@ function Gc({
|
|
|
584
627
|
flexShrink: 0
|
|
585
628
|
},
|
|
586
629
|
children: [
|
|
587
|
-
/* @__PURE__ */ e(
|
|
588
|
-
|
|
630
|
+
/* @__PURE__ */ e(z, { name: w.icon, size: "sm", style: { flexShrink: 0 } }),
|
|
631
|
+
Be && /* @__PURE__ */ e(
|
|
589
632
|
"span",
|
|
590
633
|
{
|
|
591
634
|
"aria-hidden": "true",
|
|
@@ -606,19 +649,10 @@ function Gc({
|
|
|
606
649
|
),
|
|
607
650
|
(!P || E) && /* @__PURE__ */ d(re, { children: [
|
|
608
651
|
/* @__PURE__ */ e(
|
|
609
|
-
|
|
652
|
+
sn,
|
|
610
653
|
{
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
fontWeight: "500",
|
|
614
|
-
whiteSpace: "nowrap",
|
|
615
|
-
transition: "opacity 0.3s",
|
|
616
|
-
flex: 1,
|
|
617
|
-
minWidth: 0,
|
|
618
|
-
overflow: "hidden",
|
|
619
|
-
textOverflow: "ellipsis"
|
|
620
|
-
},
|
|
621
|
-
children: w.title
|
|
654
|
+
text: w.title,
|
|
655
|
+
textStyle: { transition: "opacity 0.3s" }
|
|
622
656
|
}
|
|
623
657
|
),
|
|
624
658
|
ue && /* @__PURE__ */ e(
|
|
@@ -630,7 +664,7 @@ function Gc({
|
|
|
630
664
|
border: !0
|
|
631
665
|
}
|
|
632
666
|
),
|
|
633
|
-
|
|
667
|
+
B && /* @__PURE__ */ e(
|
|
634
668
|
"svg",
|
|
635
669
|
{
|
|
636
670
|
style: {
|
|
@@ -658,7 +692,7 @@ function Gc({
|
|
|
658
692
|
]
|
|
659
693
|
}
|
|
660
694
|
),
|
|
661
|
-
|
|
695
|
+
B && (!P || E) && (() => {
|
|
662
696
|
const me = w.children.findIndex(
|
|
663
697
|
(ie) => De(ie.to)
|
|
664
698
|
);
|
|
@@ -742,28 +776,14 @@ function Gc({
|
|
|
742
776
|
},
|
|
743
777
|
children: [
|
|
744
778
|
/* @__PURE__ */ e(
|
|
745
|
-
|
|
779
|
+
z,
|
|
746
780
|
{
|
|
747
781
|
name: ie.icon,
|
|
748
782
|
size: "sm",
|
|
749
783
|
style: { flexShrink: 0 }
|
|
750
784
|
}
|
|
751
785
|
),
|
|
752
|
-
/* @__PURE__ */ e(
|
|
753
|
-
"span",
|
|
754
|
-
{
|
|
755
|
-
style: {
|
|
756
|
-
fontSize: "0.875rem",
|
|
757
|
-
fontWeight: "500",
|
|
758
|
-
whiteSpace: "nowrap",
|
|
759
|
-
flex: 1,
|
|
760
|
-
minWidth: 0,
|
|
761
|
-
overflow: "hidden",
|
|
762
|
-
textOverflow: "ellipsis"
|
|
763
|
-
},
|
|
764
|
-
children: ie.title
|
|
765
|
-
}
|
|
766
|
-
),
|
|
786
|
+
/* @__PURE__ */ e(sn, { text: ie.title }),
|
|
767
787
|
xe && /* @__PURE__ */ e(
|
|
768
788
|
St,
|
|
769
789
|
{
|
|
@@ -847,7 +867,7 @@ function Gc({
|
|
|
847
867
|
position: "relative"
|
|
848
868
|
},
|
|
849
869
|
children: (() => {
|
|
850
|
-
const w = !E && P && !N,
|
|
870
|
+
const w = !E && P && !N, B = w && ne;
|
|
851
871
|
return /* @__PURE__ */ d(re, { children: [
|
|
852
872
|
/* @__PURE__ */ d(
|
|
853
873
|
"div",
|
|
@@ -859,8 +879,8 @@ function Gc({
|
|
|
859
879
|
flex: w ? 1 : void 0,
|
|
860
880
|
justifyContent: w ? "center" : void 0,
|
|
861
881
|
transition: "opacity 0.2s",
|
|
862
|
-
opacity:
|
|
863
|
-
pointerEvents:
|
|
882
|
+
opacity: B ? 0 : 1,
|
|
883
|
+
pointerEvents: B ? "none" : "auto"
|
|
864
884
|
},
|
|
865
885
|
children: [
|
|
866
886
|
/* @__PURE__ */ e(
|
|
@@ -934,8 +954,8 @@ function Gc({
|
|
|
934
954
|
borderRadius: "var(--sa-radii-sm, 0.375rem)",
|
|
935
955
|
color: "var(--sa-text-primary, #292a2e)",
|
|
936
956
|
cursor: "pointer",
|
|
937
|
-
opacity:
|
|
938
|
-
pointerEvents:
|
|
957
|
+
opacity: B ? 1 : 0,
|
|
958
|
+
pointerEvents: B ? "auto" : "none",
|
|
939
959
|
transition: "opacity 0.2s"
|
|
940
960
|
},
|
|
941
961
|
children: /* @__PURE__ */ e(
|
|
@@ -1053,9 +1073,9 @@ function Gc({
|
|
|
1053
1073
|
Gi,
|
|
1054
1074
|
{
|
|
1055
1075
|
slotKey: w.slotKey,
|
|
1056
|
-
fallback: w.items.map((
|
|
1076
|
+
fallback: w.items.map((B) => Ue(B))
|
|
1057
1077
|
}
|
|
1058
|
-
) : w.items.map((
|
|
1078
|
+
) : w.items.map((B) => Ue(B)) })
|
|
1059
1079
|
] }, w.id))
|
|
1060
1080
|
}
|
|
1061
1081
|
),
|
|
@@ -1196,7 +1216,7 @@ function Gc({
|
|
|
1196
1216
|
}
|
|
1197
1217
|
),
|
|
1198
1218
|
/* @__PURE__ */ e(
|
|
1199
|
-
|
|
1219
|
+
z,
|
|
1200
1220
|
{
|
|
1201
1221
|
name: "ChevronDown",
|
|
1202
1222
|
size: "sm",
|
|
@@ -1297,13 +1317,13 @@ function Gc({
|
|
|
1297
1317
|
]
|
|
1298
1318
|
}
|
|
1299
1319
|
) }),
|
|
1300
|
-
(m && m.length > 0 || p) && /* @__PURE__ */ d(
|
|
1301
|
-
m == null ? void 0 : m.map((w,
|
|
1320
|
+
(m && m.length > 0 || p) && /* @__PURE__ */ d(Te, { children: [
|
|
1321
|
+
m == null ? void 0 : m.map((w, B) => /* @__PURE__ */ e(We, { children: /* @__PURE__ */ d(
|
|
1302
1322
|
"button",
|
|
1303
1323
|
{
|
|
1304
1324
|
type: "button",
|
|
1305
1325
|
onClick: w.onClick,
|
|
1306
|
-
style:
|
|
1326
|
+
style: an,
|
|
1307
1327
|
onMouseEnter: (O) => {
|
|
1308
1328
|
O.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)";
|
|
1309
1329
|
},
|
|
@@ -1311,11 +1331,11 @@ function Gc({
|
|
|
1311
1331
|
O.currentTarget.style.backgroundColor = "transparent";
|
|
1312
1332
|
},
|
|
1313
1333
|
children: [
|
|
1314
|
-
/* @__PURE__ */ e(
|
|
1334
|
+
/* @__PURE__ */ e(z, { name: w.icon, size: "md" }),
|
|
1315
1335
|
/* @__PURE__ */ e("span", { children: w.label })
|
|
1316
1336
|
]
|
|
1317
1337
|
}
|
|
1318
|
-
) }, `${w.label}-${
|
|
1338
|
+
) }, `${w.label}-${B}`)),
|
|
1319
1339
|
p
|
|
1320
1340
|
] }),
|
|
1321
1341
|
g ?? /* @__PURE__ */ e(Lr, { children: /* @__PURE__ */ e(We, { children: /* @__PURE__ */ d(
|
|
@@ -1324,7 +1344,7 @@ function Gc({
|
|
|
1324
1344
|
type: "button",
|
|
1325
1345
|
onClick: je,
|
|
1326
1346
|
style: {
|
|
1327
|
-
...
|
|
1347
|
+
...an,
|
|
1328
1348
|
color: "var(--sa-background-error, #c9184a)",
|
|
1329
1349
|
fontWeight: 500
|
|
1330
1350
|
},
|
|
@@ -1336,7 +1356,7 @@ function Gc({
|
|
|
1336
1356
|
},
|
|
1337
1357
|
children: [
|
|
1338
1358
|
/* @__PURE__ */ e(
|
|
1339
|
-
|
|
1359
|
+
z,
|
|
1340
1360
|
{
|
|
1341
1361
|
name: "Logout",
|
|
1342
1362
|
size: "md",
|
|
@@ -1388,9 +1408,9 @@ function Gc({
|
|
|
1388
1408
|
}
|
|
1389
1409
|
),
|
|
1390
1410
|
/* @__PURE__ */ d(Fr, { isShow: Z, onHide: Ze, children: [
|
|
1391
|
-
/* @__PURE__ */ e(
|
|
1411
|
+
/* @__PURE__ */ e(zn, { children: "Confirmation Logout" }),
|
|
1392
1412
|
/* @__PURE__ */ e(Er, { children: "Are you sure you want to end the session and exit the page?" }),
|
|
1393
|
-
/* @__PURE__ */ e(
|
|
1413
|
+
/* @__PURE__ */ e(Bn, { children: /* @__PURE__ */ e(f, { direction: "column", display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d(de, { direction: "row", gap: "sm", align: "center", children: [
|
|
1394
1414
|
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(_, { secondary: !0, onClick: Ze, children: "Cancel" }) }),
|
|
1395
1415
|
/* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(_, { primary: !0, onClick: Ge, children: "Yes, Sure" }) })
|
|
1396
1416
|
] }) }) })
|
|
@@ -1445,7 +1465,7 @@ function Gc({
|
|
|
1445
1465
|
}
|
|
1446
1466
|
),
|
|
1447
1467
|
(H = oe.item.children) == null ? void 0 : H.map((w) => {
|
|
1448
|
-
const
|
|
1468
|
+
const B = De(w.to), O = dr(
|
|
1449
1469
|
w.badge,
|
|
1450
1470
|
F[w.id]
|
|
1451
1471
|
);
|
|
@@ -1463,22 +1483,22 @@ function Gc({
|
|
|
1463
1483
|
padding: "0.5rem 0.75rem",
|
|
1464
1484
|
borderRadius: "var(--sa-radii-md, 0.5rem)",
|
|
1465
1485
|
textAlign: "left",
|
|
1466
|
-
backgroundColor:
|
|
1467
|
-
color:
|
|
1486
|
+
backgroundColor: B ? "var(--sa-color-gray-100, #f8f8f8)" : "transparent",
|
|
1487
|
+
color: B ? "var(--sa-text-primary, #292a2e)" : "var(--sa-color-gray-800, #505258)",
|
|
1468
1488
|
border: "1px solid transparent",
|
|
1469
1489
|
cursor: "pointer",
|
|
1470
1490
|
fontSize: "0.875rem",
|
|
1471
1491
|
fontWeight: 500
|
|
1472
1492
|
},
|
|
1473
1493
|
onMouseEnter: (G) => {
|
|
1474
|
-
|
|
1494
|
+
B || (G.currentTarget.style.backgroundColor = "var(--sa-color-gray-100, #f8f8f8)");
|
|
1475
1495
|
},
|
|
1476
1496
|
onMouseLeave: (G) => {
|
|
1477
|
-
|
|
1497
|
+
B || (G.currentTarget.style.backgroundColor = "transparent");
|
|
1478
1498
|
},
|
|
1479
1499
|
children: [
|
|
1480
1500
|
w.icon && /* @__PURE__ */ e(
|
|
1481
|
-
|
|
1501
|
+
z,
|
|
1482
1502
|
{
|
|
1483
1503
|
name: w.icon,
|
|
1484
1504
|
size: "sm",
|
|
@@ -1520,7 +1540,7 @@ const Gt = Wr(
|
|
|
1520
1540
|
children: t
|
|
1521
1541
|
}
|
|
1522
1542
|
)
|
|
1523
|
-
),
|
|
1543
|
+
), dn = ({
|
|
1524
1544
|
title: t,
|
|
1525
1545
|
iconName: r,
|
|
1526
1546
|
textColor: n,
|
|
@@ -1528,7 +1548,7 @@ const Gt = Wr(
|
|
|
1528
1548
|
hoverTextColor: i,
|
|
1529
1549
|
hoverIconColor: l
|
|
1530
1550
|
}) => {
|
|
1531
|
-
const [c, s] =
|
|
1551
|
+
const [c, s] = T(!1);
|
|
1532
1552
|
return /* @__PURE__ */ d(
|
|
1533
1553
|
f,
|
|
1534
1554
|
{
|
|
@@ -1540,7 +1560,7 @@ const Gt = Wr(
|
|
|
1540
1560
|
style: { cursor: "pointer" },
|
|
1541
1561
|
children: [
|
|
1542
1562
|
/* @__PURE__ */ e(
|
|
1543
|
-
|
|
1563
|
+
z,
|
|
1544
1564
|
{
|
|
1545
1565
|
name: r || "ChevronLeft",
|
|
1546
1566
|
size: "xs",
|
|
@@ -1564,15 +1584,15 @@ const Gt = Wr(
|
|
|
1564
1584
|
]
|
|
1565
1585
|
}
|
|
1566
1586
|
);
|
|
1567
|
-
},
|
|
1587
|
+
}, Ui = ({
|
|
1568
1588
|
items: t,
|
|
1569
1589
|
separator: r = "/",
|
|
1570
1590
|
iconName: n,
|
|
1571
1591
|
iconColor: o,
|
|
1572
1592
|
hoverIconColor: i
|
|
1573
1593
|
}) => {
|
|
1574
|
-
const { Link: l } =
|
|
1575
|
-
|
|
1594
|
+
const { Link: l } = nt(), [c, s] = T(!1), a = o ?? "var(--sa-text-subtle, #8c8f97)", u = i ?? "var(--sa-text-subtle, #8c8f97)", m = t.length > 1 ? t[0] : void 0, p = !!(m != null && m.to || m != null && m.onClick), g = /* @__PURE__ */ e(
|
|
1595
|
+
z,
|
|
1576
1596
|
{
|
|
1577
1597
|
name: n || "ChevronLeft",
|
|
1578
1598
|
size: "xs",
|
|
@@ -1593,9 +1613,9 @@ const Gt = Wr(
|
|
|
1593
1613
|
}) })
|
|
1594
1614
|
] });
|
|
1595
1615
|
}, qc = (t) => {
|
|
1596
|
-
const { Link: r } =
|
|
1616
|
+
const { Link: r } = nt(), { items: n, separator: o, onClick: i, navigateTo: l, ...c } = t;
|
|
1597
1617
|
return n && n.length > 0 ? /* @__PURE__ */ e(
|
|
1598
|
-
|
|
1618
|
+
Ui,
|
|
1599
1619
|
{
|
|
1600
1620
|
items: n,
|
|
1601
1621
|
separator: o,
|
|
@@ -1603,7 +1623,7 @@ const Gt = Wr(
|
|
|
1603
1623
|
iconColor: c.iconColor,
|
|
1604
1624
|
hoverIconColor: c.hoverIconColor
|
|
1605
1625
|
}
|
|
1606
|
-
) : l ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(r, { to: l, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(
|
|
1626
|
+
) : l ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(r, { to: l, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(dn, { ...c }) }) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Gt, { onClick: i, children: /* @__PURE__ */ e(dn, { ...c }) }) });
|
|
1607
1627
|
}, ur = [
|
|
1608
1628
|
// brand (blue)
|
|
1609
1629
|
{
|
|
@@ -1648,7 +1668,7 @@ const Gt = Wr(
|
|
|
1648
1668
|
activeShadow: "rgba(255, 117, 143, 0.25)"
|
|
1649
1669
|
}
|
|
1650
1670
|
];
|
|
1651
|
-
function
|
|
1671
|
+
function un(t, r, n) {
|
|
1652
1672
|
return {
|
|
1653
1673
|
display: "flex",
|
|
1654
1674
|
alignItems: "center",
|
|
@@ -1664,7 +1684,7 @@ function dn(t, r, n) {
|
|
|
1664
1684
|
transition: "box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease, border-color 0.15s ease"
|
|
1665
1685
|
};
|
|
1666
1686
|
}
|
|
1667
|
-
const
|
|
1687
|
+
const hn = {
|
|
1668
1688
|
fontSize: "11px",
|
|
1669
1689
|
fontWeight: 500,
|
|
1670
1690
|
textAlign: "center",
|
|
@@ -1673,7 +1693,7 @@ const un = {
|
|
|
1673
1693
|
color: "var(--sa-background-primary, #ffffff)",
|
|
1674
1694
|
lineHeight: "1.3",
|
|
1675
1695
|
maxWidth: "80px"
|
|
1676
|
-
},
|
|
1696
|
+
}, fn = {
|
|
1677
1697
|
display: "flex",
|
|
1678
1698
|
flexDirection: "column",
|
|
1679
1699
|
alignItems: "center",
|
|
@@ -1683,14 +1703,14 @@ const un = {
|
|
|
1683
1703
|
cursor: "pointer",
|
|
1684
1704
|
padding: 0
|
|
1685
1705
|
};
|
|
1686
|
-
function
|
|
1706
|
+
function Ji({
|
|
1687
1707
|
isShow: t,
|
|
1688
1708
|
onHide: r,
|
|
1689
1709
|
menus: n,
|
|
1690
1710
|
selectedGroupId: o,
|
|
1691
1711
|
onSelect: i
|
|
1692
1712
|
}) {
|
|
1693
|
-
const [l, c] =
|
|
1713
|
+
const [l, c] = T(void 0), s = (u) => {
|
|
1694
1714
|
i(u), r();
|
|
1695
1715
|
}, a = ur[0];
|
|
1696
1716
|
return /* @__PURE__ */ e(
|
|
@@ -1719,10 +1739,10 @@ function Ui({
|
|
|
1719
1739
|
onClick: () => s(null),
|
|
1720
1740
|
onMouseEnter: () => c("all"),
|
|
1721
1741
|
onMouseLeave: () => c(void 0),
|
|
1722
|
-
style:
|
|
1742
|
+
style: fn,
|
|
1723
1743
|
children: [
|
|
1724
|
-
/* @__PURE__ */ e("div", { style:
|
|
1725
|
-
/* @__PURE__ */ e("span", { style:
|
|
1744
|
+
/* @__PURE__ */ e("div", { style: un(o === null, l === "all", a), children: /* @__PURE__ */ e("div", { style: { color: a.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(z, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1745
|
+
/* @__PURE__ */ e("span", { style: hn, children: "Semua" })
|
|
1726
1746
|
]
|
|
1727
1747
|
}
|
|
1728
1748
|
),
|
|
@@ -1735,10 +1755,10 @@ function Ui({
|
|
|
1735
1755
|
onClick: () => s(u.id),
|
|
1736
1756
|
onMouseEnter: () => c(u.id),
|
|
1737
1757
|
onMouseLeave: () => c(void 0),
|
|
1738
|
-
style:
|
|
1758
|
+
style: fn,
|
|
1739
1759
|
children: [
|
|
1740
|
-
/* @__PURE__ */ e("div", { style:
|
|
1741
|
-
/* @__PURE__ */ e("span", { style:
|
|
1760
|
+
/* @__PURE__ */ e("div", { style: un(p, g, k), children: /* @__PURE__ */ e("div", { style: { color: k.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(z, { name: b, size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1761
|
+
/* @__PURE__ */ e("span", { style: hn, children: u.name })
|
|
1742
1762
|
]
|
|
1743
1763
|
},
|
|
1744
1764
|
u.id
|
|
@@ -1754,7 +1774,7 @@ function Uc({
|
|
|
1754
1774
|
onSelect: t,
|
|
1755
1775
|
"aria-label": r = "Pilih module"
|
|
1756
1776
|
} = {}) {
|
|
1757
|
-
const n = On(), { useNavigate: o } =
|
|
1777
|
+
const n = On(), { useNavigate: o } = nt(), i = o(), { selectedGroupId: l, setSelectedGroupId: c } = $n(), [s, a] = T(!1), u = (m) => {
|
|
1758
1778
|
var p;
|
|
1759
1779
|
if (c(m), m !== null) {
|
|
1760
1780
|
const g = n.menus.find((k) => k.id === m), b = (p = g == null ? void 0 : g.items[0]) == null ? void 0 : p.to;
|
|
@@ -1787,7 +1807,7 @@ function Uc({
|
|
|
1787
1807
|
onMouseLeave: (m) => {
|
|
1788
1808
|
m.currentTarget.style.backgroundColor = "transparent";
|
|
1789
1809
|
},
|
|
1790
|
-
children: /* @__PURE__ */ e(
|
|
1810
|
+
children: /* @__PURE__ */ e(z, { name: "GridApplication", size: "sm" })
|
|
1791
1811
|
}
|
|
1792
1812
|
),
|
|
1793
1813
|
l !== null && /* @__PURE__ */ e(
|
|
@@ -1807,7 +1827,7 @@ function Uc({
|
|
|
1807
1827
|
)
|
|
1808
1828
|
] }),
|
|
1809
1829
|
/* @__PURE__ */ e(
|
|
1810
|
-
|
|
1830
|
+
Ji,
|
|
1811
1831
|
{
|
|
1812
1832
|
isShow: s,
|
|
1813
1833
|
onHide: () => a(!1),
|
|
@@ -1818,7 +1838,7 @@ function Uc({
|
|
|
1818
1838
|
)
|
|
1819
1839
|
] });
|
|
1820
1840
|
}
|
|
1821
|
-
const
|
|
1841
|
+
const Qi = (t, r) => {
|
|
1822
1842
|
const n = [];
|
|
1823
1843
|
if (r === 0)
|
|
1824
1844
|
return n.push(t), n;
|
|
@@ -1827,7 +1847,7 @@ const Ji = (t, r) => {
|
|
|
1827
1847
|
n.push(i);
|
|
1828
1848
|
}
|
|
1829
1849
|
return n;
|
|
1830
|
-
},
|
|
1850
|
+
}, Yi = Xe(
|
|
1831
1851
|
({
|
|
1832
1852
|
value: t,
|
|
1833
1853
|
label: r,
|
|
@@ -1859,8 +1879,8 @@ const Ji = (t, r) => {
|
|
|
1859
1879
|
/* @__PURE__ */ e(Me, { style: c, children: u() })
|
|
1860
1880
|
] });
|
|
1861
1881
|
}
|
|
1862
|
-
),
|
|
1863
|
-
|
|
1882
|
+
), Xi = Xe(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(Vt, { withColumnBorder: !1, withRowBorder: !1, children: t.map((o, i) => /* @__PURE__ */ e(
|
|
1883
|
+
Yi,
|
|
1864
1884
|
{
|
|
1865
1885
|
separator: r,
|
|
1866
1886
|
labelWidth: n,
|
|
@@ -1878,7 +1898,7 @@ const Ji = (t, r) => {
|
|
|
1878
1898
|
bordered: l = !1
|
|
1879
1899
|
}) => {
|
|
1880
1900
|
const c = ge(
|
|
1881
|
-
() =>
|
|
1901
|
+
() => Qi(o, t),
|
|
1882
1902
|
[o, t]
|
|
1883
1903
|
), s = c.length > 2, a = () => {
|
|
1884
1904
|
switch (r) {
|
|
@@ -1915,7 +1935,7 @@ const Ji = (t, r) => {
|
|
|
1915
1935
|
width: s ? a() : void 0,
|
|
1916
1936
|
marginBottom: s ? "lg" : void 0,
|
|
1917
1937
|
children: /* @__PURE__ */ e(
|
|
1918
|
-
|
|
1938
|
+
Xi,
|
|
1919
1939
|
{
|
|
1920
1940
|
labelWidth: i,
|
|
1921
1941
|
fields: u,
|
|
@@ -1928,8 +1948,8 @@ const Ji = (t, r) => {
|
|
|
1928
1948
|
}
|
|
1929
1949
|
);
|
|
1930
1950
|
}
|
|
1931
|
-
),
|
|
1932
|
-
const [r, n] =
|
|
1951
|
+
), Ki = ({ backButton: t }) => {
|
|
1952
|
+
const [r, n] = T(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", c = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
|
|
1933
1953
|
return /* @__PURE__ */ d(
|
|
1934
1954
|
f,
|
|
1935
1955
|
{
|
|
@@ -1941,7 +1961,7 @@ const Ji = (t, r) => {
|
|
|
1941
1961
|
style: { cursor: "pointer" },
|
|
1942
1962
|
children: [
|
|
1943
1963
|
/* @__PURE__ */ e(
|
|
1944
|
-
|
|
1964
|
+
z,
|
|
1945
1965
|
{
|
|
1946
1966
|
name: (t == null ? void 0 : t.iconName) || "ChevronLeft",
|
|
1947
1967
|
size: "xs",
|
|
@@ -1966,7 +1986,7 @@ const Ji = (t, r) => {
|
|
|
1966
1986
|
]
|
|
1967
1987
|
}
|
|
1968
1988
|
);
|
|
1969
|
-
},
|
|
1989
|
+
}, eo = ({
|
|
1970
1990
|
backButton: t,
|
|
1971
1991
|
title: r,
|
|
1972
1992
|
titleIcon: n,
|
|
@@ -1983,7 +2003,7 @@ const Ji = (t, r) => {
|
|
|
1983
2003
|
containerProps: b,
|
|
1984
2004
|
headerProps: k
|
|
1985
2005
|
}) => {
|
|
1986
|
-
const x = Le("md"), { Link: M, useNavigate: S, useLocation: A } =
|
|
2006
|
+
const x = Le("md"), { Link: M, useNavigate: S, useLocation: A } = nt(), C = S(), F = A(), I = t == null ? void 0 : t.show, R = () => {
|
|
1987
2007
|
if (typeof (t == null ? void 0 : t.onClick) == "function") {
|
|
1988
2008
|
t.onClick();
|
|
1989
2009
|
return;
|
|
@@ -1995,11 +2015,11 @@ const Ji = (t, r) => {
|
|
|
1995
2015
|
const N = p.filter(
|
|
1996
2016
|
(Y) => Y && (Y.title || Y.icon)
|
|
1997
2017
|
);
|
|
1998
|
-
return N.length === 0 ? null : x ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: N.map(({ title: Y, icon: ne, buttonProps: $, onClick:
|
|
2018
|
+
return N.length === 0 ? null : x ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: N.map(({ title: Y, icon: ne, buttonProps: $, onClick: V }, j) => /* @__PURE__ */ e(
|
|
1999
2019
|
_,
|
|
2000
2020
|
{
|
|
2001
|
-
iconLeft: ne ? /* @__PURE__ */ e(
|
|
2002
|
-
onClick:
|
|
2021
|
+
iconLeft: ne ? /* @__PURE__ */ e(z, { name: ne, size: "md" }) : void 0,
|
|
2022
|
+
onClick: V,
|
|
2003
2023
|
...$,
|
|
2004
2024
|
children: Y
|
|
2005
2025
|
},
|
|
@@ -2011,7 +2031,7 @@ const Ji = (t, r) => {
|
|
|
2011
2031
|
variant: "tertiary",
|
|
2012
2032
|
size: "sm",
|
|
2013
2033
|
iconLeft: /* @__PURE__ */ e(
|
|
2014
|
-
|
|
2034
|
+
z,
|
|
2015
2035
|
{
|
|
2016
2036
|
name: "MenuBurger"
|
|
2017
2037
|
}
|
|
@@ -2019,15 +2039,15 @@ const Ji = (t, r) => {
|
|
|
2019
2039
|
"aria-label": "Actions"
|
|
2020
2040
|
}
|
|
2021
2041
|
) }),
|
|
2022
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
2042
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { minWidth: 200 }, children: N.map(({ title: Y, icon: ne, buttonProps: $, onClick: V }, j) => {
|
|
2023
2043
|
const oe = ($ == null ? void 0 : $.tone) === "error" || ($ == null ? void 0 : $.danger) === !0;
|
|
2024
2044
|
return /* @__PURE__ */ e(
|
|
2025
2045
|
Pe,
|
|
2026
2046
|
{
|
|
2027
2047
|
intent: oe ? "danger" : void 0,
|
|
2028
2048
|
disabled: $ == null ? void 0 : $.disabled,
|
|
2029
|
-
startIcon: ne ? /* @__PURE__ */ e(
|
|
2030
|
-
onClick:
|
|
2049
|
+
startIcon: ne ? /* @__PURE__ */ e(z, { name: ne }) : void 0,
|
|
2050
|
+
onClick: V,
|
|
2031
2051
|
children: Y
|
|
2032
2052
|
},
|
|
2033
2053
|
`action-${j}`
|
|
@@ -2035,7 +2055,7 @@ const Ji = (t, r) => {
|
|
|
2035
2055
|
}) }) })
|
|
2036
2056
|
] });
|
|
2037
2057
|
}, E = () => {
|
|
2038
|
-
const N = /* @__PURE__ */ e(
|
|
2058
|
+
const N = /* @__PURE__ */ e(Ki, { backButton: t });
|
|
2039
2059
|
return t != null && t.navigateTo ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
|
|
2040
2060
|
M,
|
|
2041
2061
|
{
|
|
@@ -2048,7 +2068,7 @@ const Ji = (t, r) => {
|
|
|
2048
2068
|
}, Z = () => {
|
|
2049
2069
|
const N = !!r, Y = Array.isArray(p) && p.length > 0, ne = Dr(p) ? !0 : Y;
|
|
2050
2070
|
if (!N && !ne && !I) return null;
|
|
2051
|
-
const
|
|
2071
|
+
const V = x || !x && Y;
|
|
2052
2072
|
return /* @__PURE__ */ d(
|
|
2053
2073
|
f,
|
|
2054
2074
|
{
|
|
@@ -2073,14 +2093,14 @@ const Ji = (t, r) => {
|
|
|
2073
2093
|
(N || ne) && /* @__PURE__ */ d(
|
|
2074
2094
|
f,
|
|
2075
2095
|
{
|
|
2076
|
-
direction:
|
|
2096
|
+
direction: V ? "row" : "column",
|
|
2077
2097
|
gap: "sm",
|
|
2078
2098
|
justify: "space-between",
|
|
2079
|
-
align:
|
|
2099
|
+
align: V ? "center" : "flex-start",
|
|
2080
2100
|
children: [
|
|
2081
2101
|
N ? typeof r == "string" ? /* @__PURE__ */ d(f, { direction: "row", gap: "lg", align: "center", children: [
|
|
2082
2102
|
/* @__PURE__ */ d(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
2083
|
-
n && /* @__PURE__ */ e(
|
|
2103
|
+
n && /* @__PURE__ */ e(z, { name: n, size: "md", color: "primary" }),
|
|
2084
2104
|
/* @__PURE__ */ e(
|
|
2085
2105
|
D,
|
|
2086
2106
|
{
|
|
@@ -2105,10 +2125,10 @@ const Ji = (t, r) => {
|
|
|
2105
2125
|
const N = m.filter(($) => $.show !== !1);
|
|
2106
2126
|
if (N.length === 0) return null;
|
|
2107
2127
|
let Y = 0, ne = -1 / 0;
|
|
2108
|
-
return N.forEach(($,
|
|
2128
|
+
return N.forEach(($, V) => {
|
|
2109
2129
|
const j = $.order ?? 0;
|
|
2110
|
-
j >= ne && (ne = j, Y =
|
|
2111
|
-
}), N.map(({ content: $, order:
|
|
2130
|
+
j >= ne && (ne = j, Y = V);
|
|
2131
|
+
}), N.map(({ content: $, order: V, borderBottom: j = !0, keepBottomPadding: oe = !1, paddingInline: ve = !0, paddingBlock: Ce = !0 }, fe) => /* @__PURE__ */ e(
|
|
2112
2132
|
f,
|
|
2113
2133
|
{
|
|
2114
2134
|
direction: "column",
|
|
@@ -2122,7 +2142,7 @@ const Ji = (t, r) => {
|
|
|
2122
2142
|
...j ? {
|
|
2123
2143
|
boxShadow: "inset 0 -1px 0 0 var(--sa-border-subtle, #0b120e24)"
|
|
2124
2144
|
} : {},
|
|
2125
|
-
...
|
|
2145
|
+
...V !== void 0 ? { order: V } : {}
|
|
2126
2146
|
},
|
|
2127
2147
|
children: $
|
|
2128
2148
|
},
|
|
@@ -2182,64 +2202,58 @@ const Ji = (t, r) => {
|
|
|
2182
2202
|
},
|
|
2183
2203
|
F.pathname
|
|
2184
2204
|
);
|
|
2185
|
-
}, Qc = Xe(
|
|
2205
|
+
}, Qc = Xe(eo), to = {
|
|
2186
2206
|
icon: "Cross",
|
|
2187
2207
|
title: ""
|
|
2188
|
-
},
|
|
2208
|
+
}, ro = Wr(
|
|
2189
2209
|
({
|
|
2190
2210
|
onHide: t,
|
|
2191
2211
|
show: r,
|
|
2192
2212
|
withBlur: n = !1,
|
|
2193
2213
|
style: o,
|
|
2194
2214
|
children: i,
|
|
2195
|
-
closeButton: l =
|
|
2215
|
+
closeButton: l = to,
|
|
2196
2216
|
width: c,
|
|
2197
|
-
minWidth: s
|
|
2198
|
-
maxWidth: a
|
|
2199
|
-
}, u) =>
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
) : null,
|
|
2238
|
-
i
|
|
2239
|
-
] })
|
|
2240
|
-
}
|
|
2241
|
-
);
|
|
2242
|
-
}
|
|
2217
|
+
minWidth: s,
|
|
2218
|
+
maxWidth: a
|
|
2219
|
+
}, u) => /* @__PURE__ */ e(
|
|
2220
|
+
An,
|
|
2221
|
+
{
|
|
2222
|
+
blur: n,
|
|
2223
|
+
isShow: r,
|
|
2224
|
+
position: "right",
|
|
2225
|
+
onHide: t,
|
|
2226
|
+
ref: u,
|
|
2227
|
+
size: c ?? a ?? s ?? "357px",
|
|
2228
|
+
style: o,
|
|
2229
|
+
children: /* @__PURE__ */ d(f, { direction: "column", padding: "lg", children: [
|
|
2230
|
+
l ? /* @__PURE__ */ d(
|
|
2231
|
+
f,
|
|
2232
|
+
{
|
|
2233
|
+
direction: "row",
|
|
2234
|
+
align: "center",
|
|
2235
|
+
gap: "sm",
|
|
2236
|
+
onClick: t,
|
|
2237
|
+
marginBottom: "lg",
|
|
2238
|
+
cursor: "pointer",
|
|
2239
|
+
children: [
|
|
2240
|
+
/* @__PURE__ */ e(
|
|
2241
|
+
z,
|
|
2242
|
+
{
|
|
2243
|
+
name: l.icon,
|
|
2244
|
+
size: "md",
|
|
2245
|
+
color: "subtle",
|
|
2246
|
+
cursor: "pointer"
|
|
2247
|
+
}
|
|
2248
|
+
),
|
|
2249
|
+
l.title ? /* @__PURE__ */ e(D, { fontFamily: "Poppins", fontSize: "md", color: "subtlest", children: l.title }) : null
|
|
2250
|
+
]
|
|
2251
|
+
}
|
|
2252
|
+
) : null,
|
|
2253
|
+
i
|
|
2254
|
+
] })
|
|
2255
|
+
}
|
|
2256
|
+
)
|
|
2243
2257
|
), jn = Xe(
|
|
2244
2258
|
({ children: t, borderBottom: r = !0, padding: n = !0 }) => {
|
|
2245
2259
|
const o = Le("lg");
|
|
@@ -2363,7 +2377,7 @@ const Ji = (t, r) => {
|
|
|
2363
2377
|
Body2: go,
|
|
2364
2378
|
Body3: po
|
|
2365
2379
|
}, $e = () => {
|
|
2366
|
-
const { useSearchParams: t, useParams: r, useLocation: n } =
|
|
2380
|
+
const { useSearchParams: t, useParams: r, useLocation: n } = nt(), [o, i] = t(), l = Pt(o.toString()), c = r(), s = n(), a = c.id;
|
|
2367
2381
|
return {
|
|
2368
2382
|
// query params
|
|
2369
2383
|
setSearchParams: i,
|
|
@@ -2492,7 +2506,7 @@ const Ji = (t, r) => {
|
|
|
2492
2506
|
pageKey: o,
|
|
2493
2507
|
filters: i
|
|
2494
2508
|
}) => {
|
|
2495
|
-
const { searchParams: l, setSearchParams: c, searchQueries: s } = $e(), [a, u] =
|
|
2509
|
+
const { searchParams: l, setSearchParams: c, searchQueries: s } = $e(), [a, u] = T({}), m = () => {
|
|
2496
2510
|
l.delete(n || "filter"), c(l);
|
|
2497
2511
|
}, p = (g, b) => {
|
|
2498
2512
|
switch (g.type) {
|
|
@@ -2549,9 +2563,9 @@ const Ji = (t, r) => {
|
|
|
2549
2563
|
titleSearchLabel: k = "Work Order",
|
|
2550
2564
|
withTitleLabels: x = !1
|
|
2551
2565
|
}) => {
|
|
2552
|
-
const S = (g == null ? void 0 : g.isShowLabel) ?? !0, [A, C] =
|
|
2566
|
+
const S = (g == null ? void 0 : g.isShowLabel) ?? !0, [A, C] = T(!1), [F, I] = T(0), R = () => {
|
|
2553
2567
|
I((j) => j + 1);
|
|
2554
|
-
}, { searchParams: W, setSearchParams: E, getQueryParam: Z } = $e(), Q = Pt(W.toString()), P = Rr(t, W, s) || "", [K, N] =
|
|
2568
|
+
}, { searchParams: W, setSearchParams: E, getQueryParam: Z } = $e(), Q = Pt(W.toString()), P = Rr(t, W, s) || "", [K, N] = T(P), Y = Z(s), $ = !!(Y && !(() => {
|
|
2555
2569
|
if (Y)
|
|
2556
2570
|
try {
|
|
2557
2571
|
const j = JSON.parse(Y);
|
|
@@ -2560,7 +2574,7 @@ const Ji = (t, r) => {
|
|
|
2560
2574
|
console.error("Filter parameter is not a valid JSON:", j);
|
|
2561
2575
|
}
|
|
2562
2576
|
return !1;
|
|
2563
|
-
})()),
|
|
2577
|
+
})()), V = Le("md");
|
|
2564
2578
|
return J(() => {
|
|
2565
2579
|
N(P);
|
|
2566
2580
|
}, [P]), J(() => {
|
|
@@ -2593,7 +2607,7 @@ const Ji = (t, r) => {
|
|
|
2593
2607
|
{
|
|
2594
2608
|
gap: "md",
|
|
2595
2609
|
style: {
|
|
2596
|
-
flexDirection:
|
|
2610
|
+
flexDirection: V && b === "left" ? "row" : V && b === "right" ? "row-reverse" : "column"
|
|
2597
2611
|
},
|
|
2598
2612
|
align: "flex-end",
|
|
2599
2613
|
children: [
|
|
@@ -2631,7 +2645,7 @@ const Ji = (t, r) => {
|
|
|
2631
2645
|
primary: $,
|
|
2632
2646
|
secondary: !$,
|
|
2633
2647
|
iconLeft: /* @__PURE__ */ e(
|
|
2634
|
-
|
|
2648
|
+
z,
|
|
2635
2649
|
{
|
|
2636
2650
|
size: "sm",
|
|
2637
2651
|
name: (g == null ? void 0 : g.icon) || "FilterHorizontal",
|
|
@@ -2640,7 +2654,7 @@ const Ji = (t, r) => {
|
|
|
2640
2654
|
}
|
|
2641
2655
|
}
|
|
2642
2656
|
),
|
|
2643
|
-
fullWidth: !
|
|
2657
|
+
fullWidth: !V,
|
|
2644
2658
|
onClick: () => C(!0),
|
|
2645
2659
|
children: S ? "Filter" : void 0
|
|
2646
2660
|
}
|
|
@@ -2710,7 +2724,7 @@ const Ji = (t, r) => {
|
|
|
2710
2724
|
direction: "column",
|
|
2711
2725
|
gap: "sm",
|
|
2712
2726
|
style: {
|
|
2713
|
-
width: u &&
|
|
2727
|
+
width: u && V ? u : V ? "310px" : ""
|
|
2714
2728
|
},
|
|
2715
2729
|
children: [
|
|
2716
2730
|
x && /* @__PURE__ */ d(Ye.SubH3, { children: [
|
|
@@ -2721,7 +2735,7 @@ const Ji = (t, r) => {
|
|
|
2721
2735
|
yt,
|
|
2722
2736
|
{
|
|
2723
2737
|
placeholder: n,
|
|
2724
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2738
|
+
leftIcon: /* @__PURE__ */ e(z, { name: "Search", width: 20, height: 20 }),
|
|
2725
2739
|
onChange: (j) => N(j.target.value),
|
|
2726
2740
|
value: K,
|
|
2727
2741
|
fullWidth: !0
|
|
@@ -2912,7 +2926,7 @@ function Lo({
|
|
|
2912
2926
|
const l = ge(
|
|
2913
2927
|
() => ({ order: t.map((W) => W.key), hidden: [] }),
|
|
2914
2928
|
[t]
|
|
2915
|
-
), c = r ? Et.columns(r) : void 0, s = (W, E) => At({ order: W.order ?? E, hidden: W.hidden ?? [] }, t), [a, u] =
|
|
2929
|
+
), c = r ? Et.columns(r) : void 0, s = (W, E) => At({ order: W.order ?? E, hidden: W.hidden ?? [] }, t), [a, u] = T(() => {
|
|
2916
2930
|
if (i && (i.order || i.hidden))
|
|
2917
2931
|
return s(i, t.map((W) => W.key));
|
|
2918
2932
|
if (c) {
|
|
@@ -2922,16 +2936,16 @@ function Lo({
|
|
|
2922
2936
|
return l;
|
|
2923
2937
|
}), m = t.map((W) => W.key).join("|");
|
|
2924
2938
|
J(() => u((W) => At(W, t)), [m]);
|
|
2925
|
-
const p =
|
|
2939
|
+
const p = le(a);
|
|
2926
2940
|
p.current = a;
|
|
2927
|
-
const g = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, b =
|
|
2941
|
+
const g = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, b = le(g);
|
|
2928
2942
|
J(() => {
|
|
2929
2943
|
if (g == null || b.current === g) return;
|
|
2930
2944
|
b.current = g;
|
|
2931
2945
|
const W = p.current, E = s(i, W.order);
|
|
2932
2946
|
E.order.join("|") === W.order.join("|") && E.hidden.join("|") === W.hidden.join("|") || (u(E), c && n.set(c, E));
|
|
2933
2947
|
}, [g, m]);
|
|
2934
|
-
const k =
|
|
2948
|
+
const k = le(!1);
|
|
2935
2949
|
J(() => {
|
|
2936
2950
|
k.current || (k.current = !0, o == null || o(a));
|
|
2937
2951
|
}, []);
|
|
@@ -2987,7 +3001,7 @@ function Mo({
|
|
|
2987
3001
|
getColumns: i,
|
|
2988
3002
|
applyColumns: l
|
|
2989
3003
|
}) {
|
|
2990
|
-
const { searchParams: c, setSearchParams: s } = $e(), a = t ? Et.savedViews(t) : void 0, [u, m] =
|
|
3004
|
+
const { searchParams: c, setSearchParams: s } = $e(), a = t ? Et.savedViews(t) : void 0, [u, m] = T(
|
|
2991
3005
|
() => a ? r.get(a) || [] : []
|
|
2992
3006
|
), p = q(
|
|
2993
3007
|
(x) => {
|
|
@@ -3047,7 +3061,7 @@ function mn(t, r, n) {
|
|
|
3047
3061
|
const i = Wo(o, n);
|
|
3048
3062
|
i === void 0 ? delete t[r] : t[r] = i;
|
|
3049
3063
|
}
|
|
3050
|
-
function
|
|
3064
|
+
function zo({
|
|
3051
3065
|
scopeId: t,
|
|
3052
3066
|
storage: r,
|
|
3053
3067
|
snapshotKeys: n,
|
|
@@ -3056,7 +3070,7 @@ function Bo({
|
|
|
3056
3070
|
searchKey: l = "q",
|
|
3057
3071
|
persistSearch: c = !0
|
|
3058
3072
|
}) {
|
|
3059
|
-
const { searchParams: s } = $e(), a = t && o ? Et.lastState(t) : void 0, u =
|
|
3073
|
+
const { searchParams: s } = $e(), a = t && o ? Et.lastState(t) : void 0, u = le(a), m = le(!1);
|
|
3060
3074
|
J(() => {
|
|
3061
3075
|
if (!a) {
|
|
3062
3076
|
u.current = a;
|
|
@@ -3097,14 +3111,14 @@ function Bo({
|
|
|
3097
3111
|
clear: g
|
|
3098
3112
|
};
|
|
3099
3113
|
}
|
|
3100
|
-
function
|
|
3114
|
+
function Bo({
|
|
3101
3115
|
scopeId: t,
|
|
3102
3116
|
storage: r,
|
|
3103
3117
|
perPageKey: n,
|
|
3104
3118
|
pageSizeOptions: o,
|
|
3105
3119
|
enabled: i = !0
|
|
3106
3120
|
}) {
|
|
3107
|
-
const { searchParams: l } = $e(), c = t && i ? Et.perPage(t) : void 0, s = l.toString(), a =
|
|
3121
|
+
const { searchParams: l } = $e(), c = t && i ? Et.perPage(t) : void 0, s = l.toString(), a = le(c);
|
|
3108
3122
|
J(() => {
|
|
3109
3123
|
if (!c) {
|
|
3110
3124
|
a.current = c;
|
|
@@ -3151,7 +3165,7 @@ function Ro({
|
|
|
3151
3165
|
readSnapshot: o,
|
|
3152
3166
|
readPerPage: i
|
|
3153
3167
|
}) {
|
|
3154
|
-
const { searchParams: l, setSearchParams: c, location: s } = $e(), a =
|
|
3168
|
+
const { searchParams: l, setSearchParams: c, location: s } = $e(), a = le(null);
|
|
3155
3169
|
J(() => {
|
|
3156
3170
|
if (!t || a.current === s.pathname) return;
|
|
3157
3171
|
a.current = s.pathname;
|
|
@@ -3180,12 +3194,12 @@ const Io = ({
|
|
|
3180
3194
|
variant: o ? "secondary" : "outline",
|
|
3181
3195
|
tone: "neutral",
|
|
3182
3196
|
size: "sm",
|
|
3183
|
-
iconLeft: /* @__PURE__ */ e(
|
|
3197
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "FilterHorizontal" }),
|
|
3184
3198
|
"aria-label": "Add filter"
|
|
3185
3199
|
}
|
|
3186
3200
|
) }),
|
|
3187
3201
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3188
|
-
|
|
3202
|
+
Te,
|
|
3189
3203
|
{
|
|
3190
3204
|
style: { minWidth: 260 },
|
|
3191
3205
|
title: /* @__PURE__ */ d(
|
|
@@ -3237,15 +3251,15 @@ const Io = ({
|
|
|
3237
3251
|
variant: "link",
|
|
3238
3252
|
tone: "neutral",
|
|
3239
3253
|
size: "xs",
|
|
3240
|
-
iconLeft: /* @__PURE__ */ e(
|
|
3254
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "MenuHorizontal" }),
|
|
3241
3255
|
"aria-label": "Filter actions"
|
|
3242
3256
|
}
|
|
3243
3257
|
) }),
|
|
3244
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(
|
|
3258
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(Te, { style: { width: 180 }, children: [
|
|
3245
3259
|
/* @__PURE__ */ e(
|
|
3246
3260
|
Pe,
|
|
3247
3261
|
{
|
|
3248
|
-
startIcon: /* @__PURE__ */ e(
|
|
3262
|
+
startIcon: /* @__PURE__ */ e(z, { name: "CrossCircle" }),
|
|
3249
3263
|
onClick: t,
|
|
3250
3264
|
children: "Clear value"
|
|
3251
3265
|
}
|
|
@@ -3254,7 +3268,7 @@ const Io = ({
|
|
|
3254
3268
|
Pe,
|
|
3255
3269
|
{
|
|
3256
3270
|
intent: "danger",
|
|
3257
|
-
startIcon: /* @__PURE__ */ e(
|
|
3271
|
+
startIcon: /* @__PURE__ */ e(z, { name: "Trash1" }),
|
|
3258
3272
|
onClick: r,
|
|
3259
3273
|
children: "Remove filter"
|
|
3260
3274
|
}
|
|
@@ -3274,7 +3288,7 @@ const Io = ({
|
|
|
3274
3288
|
}
|
|
3275
3289
|
const n = t.count ?? 1;
|
|
3276
3290
|
return t.direction === "past" ? { from: gn(r, -n, t.period), to: r } : { from: r, to: gn(r, n, t.period) };
|
|
3277
|
-
}, pn = 24, Gn = (t) => t.length > pn ? `${t.slice(0, pn)}...` : t,
|
|
3291
|
+
}, pn = 24, Gn = (t) => t.length > pn ? `${t.slice(0, pn)}...` : t, Tt = (t) => t.toLocaleDateString(void 0, {
|
|
3278
3292
|
day: "2-digit",
|
|
3279
3293
|
month: "short",
|
|
3280
3294
|
year: "numeric"
|
|
@@ -3302,7 +3316,7 @@ const Io = ({
|
|
|
3302
3316
|
past: "Past",
|
|
3303
3317
|
next: "Next",
|
|
3304
3318
|
this: "This"
|
|
3305
|
-
},
|
|
3319
|
+
}, To = ["day", "week", "month", "year"], Vo = ["past", "next", "this"], No = (t) => t.field.type === "date-compact" ? /* @__PURE__ */ e(
|
|
3306
3320
|
_o,
|
|
3307
3321
|
{
|
|
3308
3322
|
field: t.field,
|
|
@@ -3327,7 +3341,7 @@ const Io = ({
|
|
|
3327
3341
|
onClear: o,
|
|
3328
3342
|
onRemove: i
|
|
3329
3343
|
}) => {
|
|
3330
|
-
const l = r ?
|
|
3344
|
+
const l = r ? Tt(new Date(r)) : null, c = !!l, s = c ? /* @__PURE__ */ d(re, { children: [
|
|
3331
3345
|
/* @__PURE__ */ d("span", { style: { fontWeight: 500 }, children: [
|
|
3332
3346
|
t.label,
|
|
3333
3347
|
":"
|
|
@@ -3342,13 +3356,13 @@ const Io = ({
|
|
|
3342
3356
|
variant: c ? "secondary" : "outline",
|
|
3343
3357
|
tone: "neutral",
|
|
3344
3358
|
size: "sm",
|
|
3345
|
-
iconLeft: c ? /* @__PURE__ */ e(
|
|
3346
|
-
iconRight: /* @__PURE__ */ e(
|
|
3359
|
+
iconLeft: c ? /* @__PURE__ */ e(z, { name: "Calendar", size: "sm" }) : void 0,
|
|
3360
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3347
3361
|
children: s
|
|
3348
3362
|
}
|
|
3349
3363
|
) }),
|
|
3350
3364
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3351
|
-
|
|
3365
|
+
Te,
|
|
3352
3366
|
{
|
|
3353
3367
|
style: { width: 260 },
|
|
3354
3368
|
title: /* @__PURE__ */ d(
|
|
@@ -3387,9 +3401,9 @@ const Io = ({
|
|
|
3387
3401
|
case "is-after":
|
|
3388
3402
|
case "is-on-or-before":
|
|
3389
3403
|
case "is-on-or-after":
|
|
3390
|
-
return t.date ? `${jt[t.op]} ${
|
|
3404
|
+
return t.date ? `${jt[t.op]} ${Tt(new Date(t.date))}` : null;
|
|
3391
3405
|
case "is-between":
|
|
3392
|
-
return t.from && t.to ? `${
|
|
3406
|
+
return t.from && t.to ? `${Tt(new Date(t.from))} - ${Tt(new Date(t.to))}` : null;
|
|
3393
3407
|
case "is-relative-to-today": {
|
|
3394
3408
|
const r = t.relative;
|
|
3395
3409
|
if (!r) return null;
|
|
@@ -3448,14 +3462,14 @@ const Io = ({
|
|
|
3448
3462
|
variant: u ? "secondary" : "outline",
|
|
3449
3463
|
tone: "neutral",
|
|
3450
3464
|
size: "sm",
|
|
3451
|
-
iconLeft: u ? /* @__PURE__ */ e(
|
|
3452
|
-
iconRight: /* @__PURE__ */ e(
|
|
3465
|
+
iconLeft: u ? /* @__PURE__ */ e(z, { name: "Calendar", size: "sm" }) : void 0,
|
|
3466
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3453
3467
|
children: m
|
|
3454
3468
|
}
|
|
3455
3469
|
) }),
|
|
3456
3470
|
/* @__PURE__ */ d(He, { children: [
|
|
3457
3471
|
/* @__PURE__ */ e(
|
|
3458
|
-
|
|
3472
|
+
Te,
|
|
3459
3473
|
{
|
|
3460
3474
|
style: { width: 320 },
|
|
3461
3475
|
title: /* @__PURE__ */ d(
|
|
@@ -3499,16 +3513,16 @@ const Io = ({
|
|
|
3499
3513
|
variant: "link",
|
|
3500
3514
|
tone: "neutral",
|
|
3501
3515
|
size: "xs",
|
|
3502
|
-
iconRight: /* @__PURE__ */ e(
|
|
3516
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3503
3517
|
children: jt[t]
|
|
3504
3518
|
}
|
|
3505
3519
|
) }),
|
|
3506
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3520
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { width: 200 }, children: r.map((o) => /* @__PURE__ */ e(
|
|
3507
3521
|
Pe,
|
|
3508
3522
|
{
|
|
3509
3523
|
selected: t === o,
|
|
3510
3524
|
onClick: () => n(o),
|
|
3511
|
-
endIcon: t === o ? /* @__PURE__ */ e(
|
|
3525
|
+
endIcon: t === o ? /* @__PURE__ */ e(z, { name: "Check" }) : void 0,
|
|
3512
3526
|
children: jt[o]
|
|
3513
3527
|
},
|
|
3514
3528
|
o
|
|
@@ -3592,15 +3606,15 @@ const Io = ({
|
|
|
3592
3606
|
variant: "outline",
|
|
3593
3607
|
tone: "neutral",
|
|
3594
3608
|
size: "sm",
|
|
3595
|
-
iconRight: /* @__PURE__ */ e(
|
|
3609
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3596
3610
|
children: Sr[n]
|
|
3597
3611
|
}
|
|
3598
3612
|
) }),
|
|
3599
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3613
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { width: 140 }, children: Vo.map((s) => /* @__PURE__ */ e(
|
|
3600
3614
|
Pe,
|
|
3601
3615
|
{
|
|
3602
3616
|
selected: n === s,
|
|
3603
|
-
endIcon: n === s ? /* @__PURE__ */ e(
|
|
3617
|
+
endIcon: n === s ? /* @__PURE__ */ e(z, { name: "Check" }) : void 0,
|
|
3604
3618
|
onClick: () => r(
|
|
3605
3619
|
s === "this" ? { direction: s, period: i } : { direction: s, count: o, period: i }
|
|
3606
3620
|
),
|
|
@@ -3635,15 +3649,15 @@ const Io = ({
|
|
|
3635
3649
|
variant: "outline",
|
|
3636
3650
|
tone: "neutral",
|
|
3637
3651
|
size: "sm",
|
|
3638
|
-
iconRight: /* @__PURE__ */ e(
|
|
3652
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3639
3653
|
children: i
|
|
3640
3654
|
}
|
|
3641
3655
|
) }),
|
|
3642
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3656
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { width: 140 }, children: To.map((s) => /* @__PURE__ */ e(
|
|
3643
3657
|
Pe,
|
|
3644
3658
|
{
|
|
3645
3659
|
selected: i === s,
|
|
3646
|
-
endIcon: i === s ? /* @__PURE__ */ e(
|
|
3660
|
+
endIcon: i === s ? /* @__PURE__ */ e(z, { name: "Check" }) : void 0,
|
|
3647
3661
|
onClick: () => r(
|
|
3648
3662
|
n === "this" ? { direction: n, period: s } : { direction: n, count: o, period: s }
|
|
3649
3663
|
),
|
|
@@ -3675,7 +3689,7 @@ const Io = ({
|
|
|
3675
3689
|
onClear: o,
|
|
3676
3690
|
onRemove: i
|
|
3677
3691
|
}) => {
|
|
3678
|
-
const l = t.type === "dropdown-multiple", c = r.length, s = t.searchable !== !1, [a, u] =
|
|
3692
|
+
const l = t.type === "dropdown-multiple", c = r.length, s = t.searchable !== !1, [a, u] = T(""), m = t.options, p = typeof t.onSearch == "function", g = (() => {
|
|
3679
3693
|
if (p) return m;
|
|
3680
3694
|
const S = a.trim().toLowerCase();
|
|
3681
3695
|
return S ? m.filter((A) => A.label.toLowerCase().includes(S)) : m;
|
|
@@ -3705,13 +3719,13 @@ const Io = ({
|
|
|
3705
3719
|
variant: c > 0 ? "secondary" : "outline",
|
|
3706
3720
|
tone: "neutral",
|
|
3707
3721
|
size: "sm",
|
|
3708
|
-
iconLeft: c > 0 ? /* @__PURE__ */ e(
|
|
3709
|
-
iconRight: /* @__PURE__ */ e(
|
|
3722
|
+
iconLeft: c > 0 ? /* @__PURE__ */ e(z, { name: "Tag", size: "sm" }) : void 0,
|
|
3723
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3710
3724
|
children: M
|
|
3711
3725
|
}
|
|
3712
3726
|
) }),
|
|
3713
3727
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3714
|
-
|
|
3728
|
+
Te,
|
|
3715
3729
|
{
|
|
3716
3730
|
style: { width: 260 },
|
|
3717
3731
|
title: /* @__PURE__ */ d(
|
|
@@ -3758,7 +3772,7 @@ const Io = ({
|
|
|
3758
3772
|
closeOnSelect: !l,
|
|
3759
3773
|
selected: b(S),
|
|
3760
3774
|
startIcon: S.avatar,
|
|
3761
|
-
endIcon: b(S) ? /* @__PURE__ */ e(
|
|
3775
|
+
endIcon: b(S) ? /* @__PURE__ */ e(z, { name: "Check" }) : void 0,
|
|
3762
3776
|
description: S.description,
|
|
3763
3777
|
onClick: () => k(S),
|
|
3764
3778
|
children: S.label
|
|
@@ -3772,7 +3786,7 @@ const Io = ({
|
|
|
3772
3786
|
) })
|
|
3773
3787
|
] });
|
|
3774
3788
|
}, bn = 18, Jo = (t) => t.length > bn ? `${t.slice(0, bn)}...` : t, xn = ({ checked: t, indeterminate: r }) => /* @__PURE__ */ e("span", { style: { pointerEvents: "none", display: "inline-flex" }, children: /* @__PURE__ */ e(
|
|
3775
|
-
|
|
3789
|
+
st,
|
|
3776
3790
|
{
|
|
3777
3791
|
size: "sm",
|
|
3778
3792
|
checked: t,
|
|
@@ -3811,13 +3825,13 @@ const Io = ({
|
|
|
3811
3825
|
variant: c > 0 ? "secondary" : "outline",
|
|
3812
3826
|
tone: "neutral",
|
|
3813
3827
|
size: "sm",
|
|
3814
|
-
iconLeft: c > 0 ? /* @__PURE__ */ e(
|
|
3815
|
-
iconRight: /* @__PURE__ */ e(
|
|
3828
|
+
iconLeft: c > 0 ? /* @__PURE__ */ e(z, { name: "Tag", size: "sm" }) : void 0,
|
|
3829
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3816
3830
|
children: p
|
|
3817
3831
|
}
|
|
3818
3832
|
) }),
|
|
3819
3833
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(
|
|
3820
|
-
|
|
3834
|
+
Te,
|
|
3821
3835
|
{
|
|
3822
3836
|
style: { width: 240 },
|
|
3823
3837
|
title: /* @__PURE__ */ d(
|
|
@@ -3938,12 +3952,12 @@ const Io = ({
|
|
|
3938
3952
|
variant: "outline",
|
|
3939
3953
|
tone: "neutral",
|
|
3940
3954
|
size: "sm",
|
|
3941
|
-
iconRight: /* @__PURE__ */ e(
|
|
3955
|
+
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3942
3956
|
"aria-label": "Rows per page",
|
|
3943
3957
|
children: vn(g)
|
|
3944
3958
|
}
|
|
3945
3959
|
) }),
|
|
3946
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3960
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { children: o.map((A) => /* @__PURE__ */ e(
|
|
3947
3961
|
Pe,
|
|
3948
3962
|
{
|
|
3949
3963
|
selected: A === g,
|
|
@@ -3999,7 +4013,7 @@ const Ko = 240, Un = ({
|
|
|
3999
4013
|
shortcut: i = "/",
|
|
4000
4014
|
collapsible: l = !0
|
|
4001
4015
|
}) => {
|
|
4002
|
-
const { searchParams: c, setSearchParams: s, searchQueries: a } = $e(), u = Rr(t, c, r) || "", [m, p] =
|
|
4016
|
+
const { searchParams: c, setSearchParams: s, searchQueries: a } = $e(), u = Rr(t, c, r) || "", [m, p] = T(!l || !!u), [g, b] = T(l && !u), [k, x] = T(u), M = wi(k, 350), S = le(null);
|
|
4003
4017
|
J(() => {
|
|
4004
4018
|
x(u), u && p(!0);
|
|
4005
4019
|
}, [u]), J(() => {
|
|
@@ -4030,7 +4044,7 @@ const Ko = 240, Un = ({
|
|
|
4030
4044
|
variant: "outline",
|
|
4031
4045
|
tone: "neutral",
|
|
4032
4046
|
size: "sm",
|
|
4033
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4047
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Search", size: "sm" }),
|
|
4034
4048
|
"aria-label": "Search",
|
|
4035
4049
|
"aria-expanded": !1,
|
|
4036
4050
|
onClick: A
|
|
@@ -4057,7 +4071,7 @@ const Ko = 240, Un = ({
|
|
|
4057
4071
|
fullWidth: !0,
|
|
4058
4072
|
value: k,
|
|
4059
4073
|
placeholder: o,
|
|
4060
|
-
leftIcon: /* @__PURE__ */ e(
|
|
4074
|
+
leftIcon: /* @__PURE__ */ e(z, { name: "Search", width: 16, height: 16 }),
|
|
4061
4075
|
onChange: (R) => x(R.target.value),
|
|
4062
4076
|
onKeyDown: (R) => {
|
|
4063
4077
|
var W;
|
|
@@ -4104,7 +4118,7 @@ const Ko = 240, Un = ({
|
|
|
4104
4118
|
onReorder: o,
|
|
4105
4119
|
onSetAllHidden: i
|
|
4106
4120
|
}) => {
|
|
4107
|
-
const [l, c] =
|
|
4121
|
+
const [l, c] = T(null), [s, a] = T(null), u = () => {
|
|
4108
4122
|
l !== null && s !== null && l !== s && o(l, s), c(null), a(null);
|
|
4109
4123
|
}, m = (p, g) => {
|
|
4110
4124
|
const b = p + g;
|
|
@@ -4117,11 +4131,11 @@ const Ko = 240, Un = ({
|
|
|
4117
4131
|
variant: r ? "outline" : "secondary",
|
|
4118
4132
|
tone: "neutral",
|
|
4119
4133
|
size: "sm",
|
|
4120
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4134
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Grid", size: "sm" }),
|
|
4121
4135
|
"aria-label": "Customize columns"
|
|
4122
4136
|
}
|
|
4123
4137
|
) }),
|
|
4124
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
4138
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ d(
|
|
4125
4139
|
f,
|
|
4126
4140
|
{
|
|
4127
4141
|
padding: "sm",
|
|
@@ -4196,7 +4210,7 @@ const Ko = 240, Un = ({
|
|
|
4196
4210
|
cursor: b ? "grab" : "default",
|
|
4197
4211
|
opacity: b ? 1 : 0.4
|
|
4198
4212
|
},
|
|
4199
|
-
children: /* @__PURE__ */ e(
|
|
4213
|
+
children: /* @__PURE__ */ e(z, { name: "DragVertical", width: 16, height: 16 })
|
|
4200
4214
|
}
|
|
4201
4215
|
),
|
|
4202
4216
|
p.icon && /* @__PURE__ */ e(f, { direction: "column", align: "center", color: "icon-subtle", style: { display: "inline-flex" }, children: p.icon }),
|
|
@@ -4235,7 +4249,7 @@ const Ko = 240, Un = ({
|
|
|
4235
4249
|
onDelete: n,
|
|
4236
4250
|
onSave: o
|
|
4237
4251
|
}) => {
|
|
4238
|
-
const [i, l] =
|
|
4252
|
+
const [i, l] = T(""), c = () => {
|
|
4239
4253
|
const s = i.trim();
|
|
4240
4254
|
s && (o(s), l(""));
|
|
4241
4255
|
};
|
|
@@ -4246,7 +4260,7 @@ const Ko = 240, Un = ({
|
|
|
4246
4260
|
variant: t.length > 0 ? "secondary" : "outline",
|
|
4247
4261
|
tone: (t.length > 0, "neutral"),
|
|
4248
4262
|
size: "sm",
|
|
4249
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4263
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Bookmark", size: "sm" }),
|
|
4250
4264
|
"aria-label": "Saved views"
|
|
4251
4265
|
}
|
|
4252
4266
|
) }),
|
|
@@ -4257,7 +4271,7 @@ const Ko = 240, Un = ({
|
|
|
4257
4271
|
width: "260px"
|
|
4258
4272
|
},
|
|
4259
4273
|
children: [
|
|
4260
|
-
/* @__PURE__ */ e(
|
|
4274
|
+
/* @__PURE__ */ e(Te, { children: /* @__PURE__ */ d(f, { direction: "column", padding: "xs", gap: "sm", children: [
|
|
4261
4275
|
/* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Saved Views" }),
|
|
4262
4276
|
/* @__PURE__ */ e(
|
|
4263
4277
|
f,
|
|
@@ -4267,7 +4281,7 @@ const Ko = 240, Un = ({
|
|
|
4267
4281
|
children: t.length === 0 ? /* @__PURE__ */ e(f, { direction: "column", paddingBlock: "sm", children: /* @__PURE__ */ e(D, { fontSize: "sm", color: "subtlest", children: "No saved views yet" }) }) : t.map((s) => /* @__PURE__ */ e(
|
|
4268
4282
|
Pe,
|
|
4269
4283
|
{
|
|
4270
|
-
startIcon: /* @__PURE__ */ e(
|
|
4284
|
+
startIcon: /* @__PURE__ */ e(z, { name: "Bookmark" }),
|
|
4271
4285
|
onClick: () => r(s),
|
|
4272
4286
|
endIcon: /* @__PURE__ */ e(
|
|
4273
4287
|
_,
|
|
@@ -4275,7 +4289,7 @@ const Ko = 240, Un = ({
|
|
|
4275
4289
|
variant: "link",
|
|
4276
4290
|
tone: "error",
|
|
4277
4291
|
size: "sm",
|
|
4278
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4292
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Trash2" }),
|
|
4279
4293
|
"aria-label": `Delete ${s.name}`,
|
|
4280
4294
|
onClick: (a) => {
|
|
4281
4295
|
a.stopPropagation(), n(s.id);
|
|
@@ -4373,7 +4387,7 @@ const Ko = 240, Un = ({
|
|
|
4373
4387
|
variant: "link",
|
|
4374
4388
|
tone: "neutral",
|
|
4375
4389
|
size: "sm",
|
|
4376
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4390
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Cross" }),
|
|
4377
4391
|
"aria-label": "Close filter",
|
|
4378
4392
|
onClick: r
|
|
4379
4393
|
}
|
|
@@ -4536,17 +4550,17 @@ const Ko = 240, Un = ({
|
|
|
4536
4550
|
variant: "outline",
|
|
4537
4551
|
tone: "neutral",
|
|
4538
4552
|
size: "sm",
|
|
4539
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4553
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "MenuVertical", size: "sm" }),
|
|
4540
4554
|
"aria-label": "More options"
|
|
4541
4555
|
}
|
|
4542
4556
|
) }),
|
|
4543
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(
|
|
4557
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(Te, { style: { minWidth: 200 }, children: [
|
|
4544
4558
|
/* @__PURE__ */ e(f, { paddingInline: "sm", paddingBlock: "xs", children: /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Rows per page" }) }),
|
|
4545
4559
|
n.map((p) => /* @__PURE__ */ e(
|
|
4546
4560
|
Pe,
|
|
4547
4561
|
{
|
|
4548
4562
|
selected: p === u,
|
|
4549
|
-
endIcon: p === u ? /* @__PURE__ */ e(
|
|
4563
|
+
endIcon: p === u ? /* @__PURE__ */ e(z, { name: "Check" }) : void 0,
|
|
4550
4564
|
onClick: () => m(String(p)),
|
|
4551
4565
|
children: tl(p)
|
|
4552
4566
|
},
|
|
@@ -4589,13 +4603,13 @@ const Ko = 240, Un = ({
|
|
|
4589
4603
|
onReorder: Y,
|
|
4590
4604
|
onSetAllHidden: ne,
|
|
4591
4605
|
showSavedViews: $,
|
|
4592
|
-
savedViews:
|
|
4606
|
+
savedViews: V,
|
|
4593
4607
|
onApplyView: j,
|
|
4594
4608
|
onDeleteView: oe,
|
|
4595
4609
|
onSaveView: ve,
|
|
4596
4610
|
leadingActions: Ce
|
|
4597
|
-
} = t, [fe, pe] =
|
|
4598
|
-
|
|
4611
|
+
} = t, [fe, pe] = T(!1), { searchQueries: we, setSearchParams: ze } = $e(), je = (C == null ? void 0 : C.rangeStart) ?? (((C == null ? void 0 : C.currentPage) || 0) > 1 ? (((C == null ? void 0 : C.currentPage) || 0) - 1) * ((C == null ? void 0 : C.perPage) || 0) + 1 : 1), Ze = (C == null ? void 0 : C.rangeEnd) ?? ((C == null ? void 0 : C.totalCurrentPage) !== (C == null ? void 0 : C.perPage) ? C == null ? void 0 : C.totalData : ((C == null ? void 0 : C.currentPage) || 1) * ((C == null ? void 0 : C.totalCurrentPage) || 0)), Ge = (ot) => {
|
|
4612
|
+
ze({ ...we, [x]: String(ot) });
|
|
4599
4613
|
}, Fe = E || W && !!(C != null && C.totalPage), qe = () => {
|
|
4600
4614
|
p(), pe(!1);
|
|
4601
4615
|
};
|
|
@@ -4640,7 +4654,7 @@ const Ko = 240, Un = ({
|
|
|
4640
4654
|
variant: l ? "secondary" : "outline",
|
|
4641
4655
|
tone: "neutral",
|
|
4642
4656
|
size: "sm",
|
|
4643
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4657
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "FilterHorizontal" }),
|
|
4644
4658
|
onClick: () => pe(!0),
|
|
4645
4659
|
"aria-label": "Open filters",
|
|
4646
4660
|
children: l ? `Filter: ${o.length}` : null
|
|
@@ -4659,7 +4673,7 @@ const Ko = 240, Un = ({
|
|
|
4659
4673
|
$ && /* @__PURE__ */ e(
|
|
4660
4674
|
Qn,
|
|
4661
4675
|
{
|
|
4662
|
-
views:
|
|
4676
|
+
views: V,
|
|
4663
4677
|
onApply: j,
|
|
4664
4678
|
onDelete: oe,
|
|
4665
4679
|
onSave: ve
|
|
@@ -4771,7 +4785,7 @@ const Ko = 240, Un = ({
|
|
|
4771
4785
|
configByKey: Y,
|
|
4772
4786
|
hasActiveFilter: ne,
|
|
4773
4787
|
toggleFilter: $,
|
|
4774
|
-
removeFilter:
|
|
4788
|
+
removeFilter: V,
|
|
4775
4789
|
getValue: j,
|
|
4776
4790
|
setValue: oe,
|
|
4777
4791
|
clearValue: ve,
|
|
@@ -4795,7 +4809,7 @@ const Ko = 240, Un = ({
|
|
|
4795
4809
|
pageKey: i,
|
|
4796
4810
|
getColumns: () => fe.state,
|
|
4797
4811
|
applyColumns: fe.applyState
|
|
4798
|
-
}), we =
|
|
4812
|
+
}), we = zo({
|
|
4799
4813
|
scopeId: K,
|
|
4800
4814
|
storage: Z,
|
|
4801
4815
|
snapshotKeys: [o, n, i],
|
|
@@ -4803,7 +4817,7 @@ const Ko = 240, Un = ({
|
|
|
4803
4817
|
filterKey: n,
|
|
4804
4818
|
searchKey: g,
|
|
4805
4819
|
persistSearch: E
|
|
4806
|
-
}),
|
|
4820
|
+
}), ze = Bo({
|
|
4807
4821
|
scopeId: K,
|
|
4808
4822
|
storage: Z,
|
|
4809
4823
|
perPageKey: l,
|
|
@@ -4815,7 +4829,7 @@ const Ko = 240, Un = ({
|
|
|
4815
4829
|
snapshotKeys: [o, n, i],
|
|
4816
4830
|
perPageKey: l,
|
|
4817
4831
|
readSnapshot: we.read,
|
|
4818
|
-
readPerPage:
|
|
4832
|
+
readPerPage: ze.read
|
|
4819
4833
|
});
|
|
4820
4834
|
const je = s ?? c[0] ?? 25, Ze = !!(R != null && R.enabled) && pe.enabled, Ge = () => {
|
|
4821
4835
|
Ce(), we.clear(), Q == null || Q();
|
|
@@ -4884,7 +4898,7 @@ const Ko = 240, Un = ({
|
|
|
4884
4898
|
getValue: j,
|
|
4885
4899
|
setValue: oe,
|
|
4886
4900
|
clearValue: ve,
|
|
4887
|
-
removeFilter:
|
|
4901
|
+
removeFilter: V
|
|
4888
4902
|
}
|
|
4889
4903
|
),
|
|
4890
4904
|
ne && /* @__PURE__ */ e(
|
|
@@ -4950,7 +4964,7 @@ const Ko = 240, Un = ({
|
|
|
4950
4964
|
configByKey: Y,
|
|
4951
4965
|
hasActiveFilter: ne,
|
|
4952
4966
|
toggleFilter: $,
|
|
4953
|
-
removeFilter:
|
|
4967
|
+
removeFilter: V,
|
|
4954
4968
|
getValue: j,
|
|
4955
4969
|
setValue: oe,
|
|
4956
4970
|
clearValue: ve,
|
|
@@ -5145,7 +5159,7 @@ const Ko = 240, Un = ({
|
|
|
5145
5159
|
return l;
|
|
5146
5160
|
}
|
|
5147
5161
|
}, sl = ({ children: t, borderRadius: r, height: n }) => {
|
|
5148
|
-
const o =
|
|
5162
|
+
const o = le(null), [i, l] = T("100vh");
|
|
5149
5163
|
return J(() => {
|
|
5150
5164
|
if (n) return;
|
|
5151
5165
|
const c = () => {
|
|
@@ -5222,7 +5236,7 @@ const Ko = 240, Un = ({
|
|
|
5222
5236
|
_,
|
|
5223
5237
|
{
|
|
5224
5238
|
fullWidth: !c,
|
|
5225
|
-
iconLeft: m ? /* @__PURE__ */ e(
|
|
5239
|
+
iconLeft: m ? /* @__PURE__ */ e(z, { name: m }) : void 0,
|
|
5226
5240
|
onClick: g,
|
|
5227
5241
|
...p,
|
|
5228
5242
|
children: u
|
|
@@ -5341,7 +5355,7 @@ const Ko = 240, Un = ({
|
|
|
5341
5355
|
}
|
|
5342
5356
|
);
|
|
5343
5357
|
}, hl = ({ filter: t, columnTitle: r }) => {
|
|
5344
|
-
const [n, o] =
|
|
5358
|
+
const [n, o] = T(!1), i = le(null), l = le(null), c = le(null), [s, a] = T(""), [u, m] = T({ top: 0, left: 0 }), p = t.selectedValues, g = ge(() => s ? t.options.filter(
|
|
5345
5359
|
(x) => x.label.toLowerCase().includes(s.toLowerCase())
|
|
5346
5360
|
) : t.options, [t.options, s]);
|
|
5347
5361
|
J(() => {
|
|
@@ -5382,7 +5396,7 @@ const Ko = 240, Un = ({
|
|
|
5382
5396
|
x.stopPropagation(), n || (M = t.onOpen) == null || M.call(t), o((S) => !S);
|
|
5383
5397
|
},
|
|
5384
5398
|
children: /* @__PURE__ */ e(
|
|
5385
|
-
|
|
5399
|
+
z,
|
|
5386
5400
|
{
|
|
5387
5401
|
name: n ? "ChevronUp" : "ChevronDown",
|
|
5388
5402
|
size: "sm",
|
|
@@ -5461,7 +5475,7 @@ const Ko = 240, Un = ({
|
|
|
5461
5475
|
{
|
|
5462
5476
|
ref: c,
|
|
5463
5477
|
placeholder: `Search ${r.toLowerCase()}...`,
|
|
5464
|
-
leftIcon: /* @__PURE__ */ e(
|
|
5478
|
+
leftIcon: /* @__PURE__ */ e(z, { name: "Search", size: "sm" }),
|
|
5465
5479
|
value: s,
|
|
5466
5480
|
onChange: (x) => a(x.target.value),
|
|
5467
5481
|
style: { fontSize: "14px" }
|
|
@@ -5493,7 +5507,7 @@ const Ko = 240, Un = ({
|
|
|
5493
5507
|
},
|
|
5494
5508
|
children: [
|
|
5495
5509
|
/* @__PURE__ */ e(
|
|
5496
|
-
|
|
5510
|
+
z,
|
|
5497
5511
|
{
|
|
5498
5512
|
name: "Loading",
|
|
5499
5513
|
size: "lg",
|
|
@@ -5542,7 +5556,7 @@ const Ko = 240, Un = ({
|
|
|
5542
5556
|
},
|
|
5543
5557
|
children: [
|
|
5544
5558
|
/* @__PURE__ */ e(
|
|
5545
|
-
|
|
5559
|
+
st,
|
|
5546
5560
|
{
|
|
5547
5561
|
checked: p.includes(x.value),
|
|
5548
5562
|
onChange: () => {
|
|
@@ -5574,7 +5588,7 @@ const Ko = 240, Un = ({
|
|
|
5574
5588
|
},
|
|
5575
5589
|
children: [
|
|
5576
5590
|
/* @__PURE__ */ e(
|
|
5577
|
-
|
|
5591
|
+
z,
|
|
5578
5592
|
{
|
|
5579
5593
|
name: "Search",
|
|
5580
5594
|
size: "lg",
|
|
@@ -5718,7 +5732,7 @@ const Ko = 240, Un = ({
|
|
|
5718
5732
|
onSortChange: R,
|
|
5719
5733
|
showActionDivider: W = !1
|
|
5720
5734
|
}) => {
|
|
5721
|
-
const E = F !== void 0, [Z, Q] =
|
|
5735
|
+
const E = F !== void 0, [Z, Q] = T(
|
|
5722
5736
|
I ?? null
|
|
5723
5737
|
), P = E ? F ?? null : Z, K = (H) => {
|
|
5724
5738
|
if (H.sortKey) return H.sortKey;
|
|
@@ -5726,22 +5740,22 @@ const Ko = 240, Un = ({
|
|
|
5726
5740
|
}, N = (H) => {
|
|
5727
5741
|
const w = K(H);
|
|
5728
5742
|
if (!w) return;
|
|
5729
|
-
let
|
|
5730
|
-
!P || P.key !== w ?
|
|
5731
|
-
}, ne = [n, o, i].filter((H) => H !== void 0).length, $ = !!b,
|
|
5743
|
+
let B;
|
|
5744
|
+
!P || P.key !== w ? B = { key: w, direction: "asc" } : P.direction === "asc" ? B = { key: w, direction: "desc" } : B = null, E || Q(B), R == null || R(B);
|
|
5745
|
+
}, ne = [n, o, i].filter((H) => H !== void 0).length, $ = !!b, V = !!n || !!o || !!i || $, j = "var(--sa-border-subtle, #0b120e24)", oe = `1px solid ${j}`, ve = `inset 1px 0 0 ${j}`, Ce = `inset -1px 0 0 ${j}`, fe = ne === 3 ? $ ? "178px" : "140px" : ne === 2 ? $ ? "140px" : "102px" : ne === 1 ? $ ? "112px" : "74px" : $ ? "74px" : "", pe = (H, w) => {
|
|
5732
5746
|
if (!w) return H;
|
|
5733
5747
|
if (typeof w == "function") return w(H);
|
|
5734
5748
|
if (typeof w == "string") return H[w];
|
|
5735
|
-
}, [we,
|
|
5749
|
+
}, [we, ze] = T(!1);
|
|
5736
5750
|
J(() => {
|
|
5737
5751
|
if (!(m != null && m.current)) return;
|
|
5738
5752
|
const H = m.current;
|
|
5739
|
-
|
|
5753
|
+
ze(H.scrollHeight > H.clientHeight);
|
|
5740
5754
|
}, [r, m]);
|
|
5741
|
-
const je =
|
|
5755
|
+
const je = le(null), [Ze, Ge] = T([]), [Fe, qe] = T(
|
|
5742
5756
|
() => S ?? {}
|
|
5743
|
-
), De =
|
|
5744
|
-
|
|
5757
|
+
), De = le(null);
|
|
5758
|
+
rt(() => {
|
|
5745
5759
|
if (!p || !je.current) {
|
|
5746
5760
|
Ge([]);
|
|
5747
5761
|
return;
|
|
@@ -5749,42 +5763,42 @@ const Ko = 240, Un = ({
|
|
|
5749
5763
|
const H = Array.from(
|
|
5750
5764
|
je.current.querySelectorAll("thead tr th")
|
|
5751
5765
|
), w = [];
|
|
5752
|
-
let
|
|
5766
|
+
let B = 0;
|
|
5753
5767
|
H.forEach((O, G) => {
|
|
5754
|
-
w[G] =
|
|
5768
|
+
w[G] = B, G < p && (B += O.offsetWidth);
|
|
5755
5769
|
}), Ge(w);
|
|
5756
5770
|
}, [p, t, r, Fe]);
|
|
5757
|
-
const
|
|
5771
|
+
const ot = (H) => {
|
|
5758
5772
|
g && g(H < p ? H : H + 1);
|
|
5759
5773
|
}, ke = (H, w) => {
|
|
5760
|
-
const
|
|
5761
|
-
if (
|
|
5762
|
-
const O = `${
|
|
5774
|
+
const B = Fe[H];
|
|
5775
|
+
if (B !== void 0) {
|
|
5776
|
+
const O = `${B}px`;
|
|
5763
5777
|
return { width: O, minWidth: O, maxWidth: O };
|
|
5764
5778
|
}
|
|
5765
5779
|
return w ? { width: w } : {};
|
|
5766
5780
|
}, Ue = (H) => M && (H.resizable ?? !0), ft = (H, w) => {
|
|
5767
5781
|
H.preventDefault(), H.stopPropagation();
|
|
5768
|
-
const
|
|
5769
|
-
if (!
|
|
5770
|
-
const O = Math.round(
|
|
5782
|
+
const B = H.currentTarget.closest("th");
|
|
5783
|
+
if (!B) return;
|
|
5784
|
+
const O = Math.round(B.getBoundingClientRect().width);
|
|
5771
5785
|
De.current = { colIndex: w, startX: H.clientX, startWidth: O };
|
|
5772
5786
|
const G = document.body.style.userSelect, ue = document.body.style.cursor;
|
|
5773
5787
|
document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
|
|
5774
|
-
const
|
|
5775
|
-
var
|
|
5788
|
+
const Be = (ie) => {
|
|
5789
|
+
var lt;
|
|
5776
5790
|
const xe = De.current;
|
|
5777
5791
|
if (!xe) return;
|
|
5778
|
-
const Ae = ((
|
|
5792
|
+
const Ae = ((lt = t[xe.colIndex]) == null ? void 0 : lt.minWidth) ?? C, Se = Math.max(Ae, xe.startWidth + (ie.clientX - xe.startX));
|
|
5779
5793
|
qe(
|
|
5780
|
-
(
|
|
5794
|
+
(ct) => ct[xe.colIndex] === Se ? ct : { ...ct, [xe.colIndex]: Se }
|
|
5781
5795
|
);
|
|
5782
5796
|
}, me = () => {
|
|
5783
|
-
document.removeEventListener("mousemove",
|
|
5797
|
+
document.removeEventListener("mousemove", Be), document.removeEventListener("mouseup", me), document.body.style.userSelect = G, document.body.style.cursor = ue, De.current = null, A && qe((ie) => (A(ie), ie));
|
|
5784
5798
|
};
|
|
5785
|
-
document.addEventListener("mousemove",
|
|
5799
|
+
document.addEventListener("mousemove", Be), document.addEventListener("mouseup", me);
|
|
5786
5800
|
};
|
|
5787
|
-
return /* @__PURE__ */ e("div", { ref: je, children: /* @__PURE__ */ d(
|
|
5801
|
+
return /* @__PURE__ */ e("div", { ref: je, children: /* @__PURE__ */ d(Vt, { fullWidth: !0, children: [
|
|
5788
5802
|
/* @__PURE__ */ e(
|
|
5789
5803
|
Rn,
|
|
5790
5804
|
{
|
|
@@ -5795,14 +5809,14 @@ const Ko = 240, Un = ({
|
|
|
5795
5809
|
children: /* @__PURE__ */ d(Ne, { children: [
|
|
5796
5810
|
t.map((H, w) => {
|
|
5797
5811
|
var Lt, mt;
|
|
5798
|
-
const
|
|
5799
|
-
|
|
5812
|
+
const B = p > 0 && w < p, O = Ze[w] ?? 0, G = Ue(H), Be = w === t.length - 1 && V && W, me = K(H), ie = !!H.sortable && !!me, xe = ie && (P == null ? void 0 : P.key) === me ? P.direction : null, Ae = H.title || ((Lt = H.accessor) == null ? void 0 : Lt.toString()) || "", Se = (mt = H.headerTooltip) != null && mt.showIcon ? /* @__PURE__ */ e(
|
|
5813
|
+
z,
|
|
5800
5814
|
{
|
|
5801
5815
|
name: "InfoCircle",
|
|
5802
5816
|
size: "xs",
|
|
5803
5817
|
style: { flexShrink: 0, color: "var(--sa-icon-subtle, #8c8f97)", opacity: 0.75 }
|
|
5804
5818
|
}
|
|
5805
|
-
) : null,
|
|
5819
|
+
) : null, lt = /* @__PURE__ */ e("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: Ae }), ct = ie ? /* @__PURE__ */ d(
|
|
5806
5820
|
"button",
|
|
5807
5821
|
{
|
|
5808
5822
|
type: "button",
|
|
@@ -5824,13 +5838,13 @@ const Ko = 240, Un = ({
|
|
|
5824
5838
|
textAlign: H.textAlign === "text-right" ? "right" : H.textAlign === "text-center" ? "center" : "left"
|
|
5825
5839
|
},
|
|
5826
5840
|
children: [
|
|
5827
|
-
|
|
5841
|
+
lt,
|
|
5828
5842
|
Se,
|
|
5829
5843
|
/* @__PURE__ */ e(fl, { direction: xe })
|
|
5830
5844
|
]
|
|
5831
5845
|
}
|
|
5832
5846
|
) : /* @__PURE__ */ d("span", { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
5833
|
-
|
|
5847
|
+
lt,
|
|
5834
5848
|
Se
|
|
5835
5849
|
] });
|
|
5836
5850
|
return /* @__PURE__ */ d(
|
|
@@ -5839,12 +5853,12 @@ const Ko = 240, Un = ({
|
|
|
5839
5853
|
style: {
|
|
5840
5854
|
position: "sticky",
|
|
5841
5855
|
top: 0,
|
|
5842
|
-
left:
|
|
5843
|
-
zIndex:
|
|
5856
|
+
left: B ? O : void 0,
|
|
5857
|
+
zIndex: B ? 4 : 2,
|
|
5844
5858
|
paddingLeft: w === 0 ? "12px" : "",
|
|
5845
|
-
borderRight: u && !
|
|
5859
|
+
borderRight: u && !Be && !B ? oe : void 0,
|
|
5846
5860
|
borderBottom: u ? oe : void 0,
|
|
5847
|
-
boxShadow: u &&
|
|
5861
|
+
boxShadow: u && B ? Ce : void 0,
|
|
5848
5862
|
backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
5849
5863
|
textAlign: H.textAlign === "text-right" ? "right" : H.textAlign === "text-center" ? "center" : "left",
|
|
5850
5864
|
...ke(w, H.width)
|
|
@@ -5861,7 +5875,7 @@ const Ko = 240, Un = ({
|
|
|
5861
5875
|
minWidth: 0
|
|
5862
5876
|
},
|
|
5863
5877
|
children: [
|
|
5864
|
-
H.headerTooltip ? /* @__PURE__ */ e(Ie, { label: H.headerTooltip.content, position: "bottom", children:
|
|
5878
|
+
H.headerTooltip ? /* @__PURE__ */ e(Ie, { label: H.headerTooltip.content, position: "bottom", children: ct }) : ct,
|
|
5865
5879
|
H.filter && /* @__PURE__ */ e(
|
|
5866
5880
|
hl,
|
|
5867
5881
|
{
|
|
@@ -5872,8 +5886,8 @@ const Ko = 240, Un = ({
|
|
|
5872
5886
|
g && /* @__PURE__ */ e(
|
|
5873
5887
|
"button",
|
|
5874
5888
|
{
|
|
5875
|
-
onClick: () =>
|
|
5876
|
-
title:
|
|
5889
|
+
onClick: () => ot(w),
|
|
5890
|
+
title: B ? "Unfreeze column" : "Freeze column",
|
|
5877
5891
|
style: {
|
|
5878
5892
|
background: "none",
|
|
5879
5893
|
border: "none",
|
|
@@ -5882,11 +5896,11 @@ const Ko = 240, Un = ({
|
|
|
5882
5896
|
display: "flex",
|
|
5883
5897
|
alignItems: "center",
|
|
5884
5898
|
flexShrink: 0,
|
|
5885
|
-
color:
|
|
5886
|
-
opacity:
|
|
5899
|
+
color: B ? "var(--sa-background-brand, #04254f)" : "var(--sa-text-subtle, #8c8f97)",
|
|
5900
|
+
opacity: B ? 1 : 0.45,
|
|
5887
5901
|
transition: "opacity 0.15s"
|
|
5888
5902
|
},
|
|
5889
|
-
children: /* @__PURE__ */ e(ml, { frozen:
|
|
5903
|
+
children: /* @__PURE__ */ e(ml, { frozen: B })
|
|
5890
5904
|
}
|
|
5891
5905
|
)
|
|
5892
5906
|
]
|
|
@@ -5918,7 +5932,7 @@ const Ko = 240, Un = ({
|
|
|
5918
5932
|
`table-head-${w}`
|
|
5919
5933
|
);
|
|
5920
5934
|
}),
|
|
5921
|
-
|
|
5935
|
+
V ? /* @__PURE__ */ e(
|
|
5922
5936
|
ht,
|
|
5923
5937
|
{
|
|
5924
5938
|
style: {
|
|
@@ -5949,38 +5963,38 @@ const Ko = 240, Un = ({
|
|
|
5949
5963
|
padding: 0,
|
|
5950
5964
|
borderBottom: w === r.length - 1 && we ? void 0 : "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
5951
5965
|
},
|
|
5952
|
-
onMouseEnter: (
|
|
5953
|
-
const O =
|
|
5966
|
+
onMouseEnter: (B) => {
|
|
5967
|
+
const O = B.currentTarget;
|
|
5954
5968
|
O.style.backgroundColor = wn, Array.from(O.querySelectorAll("td")).forEach((G) => {
|
|
5955
5969
|
G.style.position === "sticky" && (G.style.backgroundColor = wn);
|
|
5956
5970
|
});
|
|
5957
5971
|
},
|
|
5958
|
-
onMouseLeave: (
|
|
5959
|
-
const O =
|
|
5972
|
+
onMouseLeave: (B) => {
|
|
5973
|
+
const O = B.currentTarget;
|
|
5960
5974
|
O.style.backgroundColor = "", Array.from(O.querySelectorAll("td")).forEach((G) => {
|
|
5961
5975
|
G.style.position === "sticky" && (G.style.backgroundColor = pr);
|
|
5962
5976
|
});
|
|
5963
5977
|
},
|
|
5964
5978
|
children: [
|
|
5965
|
-
t.map((
|
|
5966
|
-
const G =
|
|
5979
|
+
t.map((B, O) => {
|
|
5980
|
+
const G = B.render ? B.render(H, w, r) : pe(H, B.accessor), ue = p > 0 && O < p, Be = Ze[O] ?? 0, me = Fe[O] !== void 0, ie = ue && O === p - 1;
|
|
5967
5981
|
return /* @__PURE__ */ e(
|
|
5968
5982
|
Me,
|
|
5969
5983
|
{
|
|
5970
5984
|
style: {
|
|
5971
5985
|
position: ue ? "sticky" : void 0,
|
|
5972
|
-
left: ue ?
|
|
5986
|
+
left: ue ? Be : void 0,
|
|
5973
5987
|
zIndex: ue ? 1 : void 0,
|
|
5974
5988
|
backgroundColor: ue ? pr : void 0,
|
|
5975
5989
|
transition: ue ? "background-color 0.3s ease" : void 0,
|
|
5976
5990
|
paddingLeft: O === 0 ? "12px" : "",
|
|
5977
5991
|
whiteSpace: "nowrap",
|
|
5978
5992
|
overflow: me ? "hidden" : void 0,
|
|
5979
|
-
borderLeft:
|
|
5980
|
-
borderRight:
|
|
5993
|
+
borderLeft: B.showBorderLeft ? oe : void 0,
|
|
5994
|
+
borderRight: B.showBorderRight ? oe : void 0,
|
|
5981
5995
|
boxShadow: ie ? Ce : void 0,
|
|
5982
|
-
textAlign:
|
|
5983
|
-
...ke(O,
|
|
5996
|
+
textAlign: B.textAlign === "text-right" ? "right" : B.textAlign === "text-center" ? "center" : "left",
|
|
5997
|
+
...ke(O, B.width)
|
|
5984
5998
|
},
|
|
5985
5999
|
children: typeof G == "string" ? /* @__PURE__ */ e(
|
|
5986
6000
|
D,
|
|
@@ -5989,7 +6003,7 @@ const Ko = 240, Un = ({
|
|
|
5989
6003
|
whiteSpace: "nowrap",
|
|
5990
6004
|
overflow: "hidden",
|
|
5991
6005
|
textOverflow: "ellipsis",
|
|
5992
|
-
textAlign:
|
|
6006
|
+
textAlign: B.textAlign === "text-right" ? "right" : B.textAlign === "text-center" ? "center" : "left"
|
|
5993
6007
|
},
|
|
5994
6008
|
children: G
|
|
5995
6009
|
}
|
|
@@ -5998,7 +6012,7 @@ const Ko = 240, Un = ({
|
|
|
5998
6012
|
`row-${w}-col-${O}`
|
|
5999
6013
|
);
|
|
6000
6014
|
}),
|
|
6001
|
-
|
|
6015
|
+
V ? /* @__PURE__ */ e(Me, { style: {
|
|
6002
6016
|
width: fe,
|
|
6003
6017
|
position: "sticky",
|
|
6004
6018
|
right: 0,
|
|
@@ -6006,36 +6020,36 @@ const Ko = 240, Un = ({
|
|
|
6006
6020
|
backgroundColor: pr,
|
|
6007
6021
|
boxShadow: W ? ve : void 0,
|
|
6008
6022
|
transition: "background-color 0.3s ease"
|
|
6009
|
-
}, children: /* @__PURE__ */ e(de, { direction: "row", align: "center", justify: "center", gap: "sm", children: k.map((
|
|
6023
|
+
}, children: /* @__PURE__ */ e(de, { direction: "row", align: "center", justify: "center", gap: "sm", children: k.map((B) => {
|
|
6010
6024
|
const O = w === r.length - 1 ? "top" : "bottom";
|
|
6011
|
-
return
|
|
6025
|
+
return B === "detail" && n && (a == null ? void 0 : a(H)) !== !1 ? /* @__PURE__ */ e(Ie, { label: "Detail", position: O, children: /* @__PURE__ */ e(
|
|
6012
6026
|
_,
|
|
6013
6027
|
{
|
|
6014
6028
|
size: "xs",
|
|
6015
6029
|
variant: "outline",
|
|
6016
6030
|
tone: "neutral",
|
|
6017
6031
|
onClick: () => n(H.id, H),
|
|
6018
|
-
iconLeft: /* @__PURE__ */ e(
|
|
6032
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "DocumentClean", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
6019
6033
|
}
|
|
6020
|
-
) }, "detail") :
|
|
6034
|
+
) }, "detail") : B === "update" && o && (s == null ? void 0 : s(H)) !== !1 ? /* @__PURE__ */ e(Ie, { label: "Update", position: O, children: /* @__PURE__ */ e(
|
|
6021
6035
|
_,
|
|
6022
6036
|
{
|
|
6023
6037
|
size: "xs",
|
|
6024
6038
|
variant: "outline",
|
|
6025
6039
|
tone: "neutral",
|
|
6026
6040
|
onClick: () => o(H),
|
|
6027
|
-
iconLeft: /* @__PURE__ */ e(
|
|
6041
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Edit1", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
6028
6042
|
}
|
|
6029
|
-
) }, "update") :
|
|
6043
|
+
) }, "update") : B === "delete" && i && (c == null ? void 0 : c(H)) !== !1 ? /* @__PURE__ */ e(Ie, { label: "Delete", position: O, children: /* @__PURE__ */ e(
|
|
6030
6044
|
_,
|
|
6031
6045
|
{
|
|
6032
6046
|
size: "xs",
|
|
6033
6047
|
variant: "outline",
|
|
6034
6048
|
tone: "neutral",
|
|
6035
6049
|
onClick: () => i(H.id, H),
|
|
6036
|
-
iconLeft: /* @__PURE__ */ e(
|
|
6050
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
|
|
6037
6051
|
}
|
|
6038
|
-
) }, "delete") :
|
|
6052
|
+
) }, "delete") : B === "custom" ? /* @__PURE__ */ e(at.Fragment, { children: b == null ? void 0 : b(H) }, "custom") : null;
|
|
6039
6053
|
}) }) }) : null
|
|
6040
6054
|
]
|
|
6041
6055
|
},
|
|
@@ -6049,9 +6063,9 @@ const Ko = 240, Un = ({
|
|
|
6049
6063
|
footerProps: o
|
|
6050
6064
|
}) => {
|
|
6051
6065
|
var p;
|
|
6052
|
-
const i =
|
|
6066
|
+
const i = le(null), [l, c] = T(
|
|
6053
6067
|
(r == null ? void 0 : r.defaultFrozenCount) ?? 0
|
|
6054
|
-
), s = (n == null ? void 0 : n.show) ?? !0, a =
|
|
6068
|
+
), s = (n == null ? void 0 : n.show) ?? !0, a = le(null), u = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
|
|
6055
6069
|
typeof u == "number" && (a.current = u);
|
|
6056
6070
|
const m = (o == null ? void 0 : o.showFooter) ?? (u === void 0 ? a.current !== 0 : u !== 0);
|
|
6057
6071
|
return /* @__PURE__ */ d(sl, { ...t, children: [
|
|
@@ -6098,7 +6112,7 @@ function yl(t) {
|
|
|
6098
6112
|
const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)", bl = ({
|
|
6099
6113
|
sortDir: t,
|
|
6100
6114
|
frozen: r
|
|
6101
|
-
}) => t === "asc" ? /* @__PURE__ */ e(
|
|
6115
|
+
}) => t === "asc" ? /* @__PURE__ */ e(z, { name: "ChevronSmallUp" }) : t === "desc" ? /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }) : r ? /* @__PURE__ */ e(z, { name: "LockOn", size: "xs" }) : /* @__PURE__ */ e(z, { name: "Filter", size: "xs" }), Rt = ({ icon: t, label: r, active: n, danger: o, onClick: i }) => {
|
|
6102
6116
|
const l = o ? "var(--sa-color-error-600, #c9184a)" : "var(--sa-text-primary, #292a2e)";
|
|
6103
6117
|
return /* @__PURE__ */ d(
|
|
6104
6118
|
"button",
|
|
@@ -6125,7 +6139,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6125
6139
|
c.currentTarget.style.background = n ? "var(--sa-background-brand-subtlest, #e6edf6)" : "none";
|
|
6126
6140
|
},
|
|
6127
6141
|
children: [
|
|
6128
|
-
/* @__PURE__ */ e(
|
|
6142
|
+
/* @__PURE__ */ e(z, { name: t, size: "sm", style: { color: l, flexShrink: 0 } }),
|
|
6129
6143
|
/* @__PURE__ */ e(D, { as: "span", style: { color: l }, children: r })
|
|
6130
6144
|
]
|
|
6131
6145
|
}
|
|
@@ -6141,7 +6155,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6141
6155
|
onToggleFreeze: s,
|
|
6142
6156
|
onHide: a
|
|
6143
6157
|
}) => {
|
|
6144
|
-
const [u, m] =
|
|
6158
|
+
const [u, m] = T(!1), p = le(null), g = le(null), [b, k] = T(
|
|
6145
6159
|
{ top: 0, left: 0 }
|
|
6146
6160
|
);
|
|
6147
6161
|
J(() => {
|
|
@@ -6354,50 +6368,50 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6354
6368
|
isRowSelectable: N
|
|
6355
6369
|
}) => {
|
|
6356
6370
|
Cl();
|
|
6357
|
-
const ne = !Le(M) && x !== "scroll", $ = !!(E != null && E.length), [
|
|
6371
|
+
const ne = !Le(M) && x !== "scroll", $ = !!(E != null && E.length), [V, j] = T(null);
|
|
6358
6372
|
J(() => {
|
|
6359
|
-
if (!
|
|
6373
|
+
if (!V) return;
|
|
6360
6374
|
const y = () => j(null), v = setTimeout(() => document.addEventListener("click", y), 0);
|
|
6361
6375
|
return () => {
|
|
6362
6376
|
clearTimeout(v), document.removeEventListener("click", y);
|
|
6363
6377
|
};
|
|
6364
|
-
}, [
|
|
6365
|
-
const [oe, ve] =
|
|
6378
|
+
}, [V]);
|
|
6379
|
+
const [oe, ve] = T(
|
|
6366
6380
|
() => /* @__PURE__ */ new Set()
|
|
6367
|
-
), Ce = a !== void 0, [fe, pe] =
|
|
6381
|
+
), Ce = a !== void 0, [fe, pe] = T({}), we = a ?? fe, ze = (y) => {
|
|
6368
6382
|
u == null || u(y), Ce || pe(y);
|
|
6369
|
-
}, je = p !== void 0, [Ze, Ge] =
|
|
6383
|
+
}, je = p !== void 0, [Ze, Ge] = T(
|
|
6370
6384
|
g ?? null
|
|
6371
6385
|
), Fe = je ? p ?? null : Ze, qe = !b, De = (y) => {
|
|
6372
6386
|
b == null || b(y), je || Ge(y);
|
|
6373
|
-
}, { headerGroups:
|
|
6387
|
+
}, { headerGroups: ot, leafColumns: ke, hasGroups: Ue } = ge(() => {
|
|
6374
6388
|
var ae;
|
|
6375
|
-
const y = new Set(we.hidden ?? []), v = (
|
|
6389
|
+
const y = new Set(we.hidden ?? []), v = (ce, ye) => ce.key ?? (typeof ce.accessor == "string" ? ce.accessor : `col-${ye}`), L = t.map((ce, ye) => {
|
|
6376
6390
|
var _e;
|
|
6377
|
-
if ((_e =
|
|
6378
|
-
const vt =
|
|
6379
|
-
return { col:
|
|
6391
|
+
if ((_e = ce.children) != null && _e.length) {
|
|
6392
|
+
const vt = ce.children.map((Je, Ct) => ({ col: Je, key: v(Je, `${ye}-${Ct}`) })).filter((Je) => !y.has(Je.key));
|
|
6393
|
+
return { col: ce, key: ce.key ?? `group-${ye}`, isGroup: !0, leaves: vt };
|
|
6380
6394
|
}
|
|
6381
|
-
const be = { col:
|
|
6395
|
+
const be = { col: ce, key: v(ce, `${ye}`) };
|
|
6382
6396
|
return {
|
|
6383
|
-
col:
|
|
6397
|
+
col: ce,
|
|
6384
6398
|
key: be.key,
|
|
6385
6399
|
isGroup: !1,
|
|
6386
6400
|
leaves: y.has(be.key) ? [] : [be]
|
|
6387
6401
|
};
|
|
6388
|
-
}).filter((
|
|
6389
|
-
let te = L.flatMap((
|
|
6402
|
+
}).filter((ce) => ce.leaves.length > 0), U = L.some((ce) => ce.isGroup);
|
|
6403
|
+
let te = L.flatMap((ce) => ce.leaves);
|
|
6390
6404
|
if (!U && ((ae = we.order) != null && ae.length)) {
|
|
6391
|
-
const
|
|
6405
|
+
const ce = new Map(we.order.map((ye, be) => [ye, be]));
|
|
6392
6406
|
te = [...te].sort(
|
|
6393
|
-
(ye, be) => (
|
|
6407
|
+
(ye, be) => (ce.get(ye.key) ?? 1 / 0) - (ce.get(be.key) ?? 1 / 0)
|
|
6394
6408
|
);
|
|
6395
6409
|
}
|
|
6396
6410
|
return { headerGroups: L, leafColumns: te, hasGroups: U };
|
|
6397
6411
|
}, [t, we]), ft = ge(
|
|
6398
6412
|
() => new Map(ke.map((y, v) => [y.key, v])),
|
|
6399
6413
|
[ke]
|
|
6400
|
-
), H = !Ue && ke.some((y) => (y.col.headerColSpan ?? 1) > 1), w = ke.map((y) => y.key).join("|"),
|
|
6414
|
+
), H = !Ue && ke.some((y) => (y.col.headerColSpan ?? 1) > 1), w = ke.map((y) => y.key).join("|"), B = (y, v) => {
|
|
6401
6415
|
const L = y.sortKey ?? (typeof y.accessor == "string" ? y.accessor : void 0);
|
|
6402
6416
|
return L ? v[L] : void 0;
|
|
6403
6417
|
}, O = (y) => y.sortable ?? (!!y.sortKey || typeof y.accessor == "string"), G = ge(() => {
|
|
@@ -6406,18 +6420,18 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6406
6420
|
if (!y) return r;
|
|
6407
6421
|
const v = Fe.direction === "asc" ? 1 : -1;
|
|
6408
6422
|
return [...r].sort(
|
|
6409
|
-
(L, U) => kl(
|
|
6423
|
+
(L, U) => kl(B(y.col, L), B(y.col, U)) * v
|
|
6410
6424
|
);
|
|
6411
|
-
}, [r, qe, Fe, ke]), ue = !Ue && !H,
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
}, [w]),
|
|
6425
|
+
}, [r, qe, Fe, ke]), ue = !Ue && !H, Be = !!s && ue, [me, ie] = ki(s ?? ""), xe = Be ? me : void 0, Ae = le(null), [Se, lt] = T();
|
|
6426
|
+
rt(() => {
|
|
6427
|
+
lt(void 0);
|
|
6428
|
+
}, [w]), rt(() => {
|
|
6415
6429
|
if (!ue || Se || !Ae.current) return;
|
|
6416
6430
|
const y = Ae.current.querySelectorAll("th.sa-tl-leaf");
|
|
6417
|
-
|
|
6431
|
+
lt(Array.from(y).map((v) => v.offsetWidth));
|
|
6418
6432
|
}, [Se, ue]);
|
|
6419
|
-
const [
|
|
6420
|
-
|
|
6433
|
+
const [ct, Lt] = T(0);
|
|
6434
|
+
rt(() => {
|
|
6421
6435
|
if (!Ue || !Ae.current) return;
|
|
6422
6436
|
const y = Ae.current.querySelector(":scope > tr");
|
|
6423
6437
|
y && Lt(y.offsetHeight);
|
|
@@ -6431,8 +6445,8 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6431
6445
|
let v = jr;
|
|
6432
6446
|
for (let L = 0; L < y; L++) v += Se[L] ?? 0;
|
|
6433
6447
|
return v;
|
|
6434
|
-
}, Qt =
|
|
6435
|
-
|
|
6448
|
+
}, Qt = le(null), [Xn, Kn] = T("100vh");
|
|
6449
|
+
rt(() => {
|
|
6436
6450
|
if (k !== void 0) return;
|
|
6437
6451
|
const y = () => {
|
|
6438
6452
|
if (Qt.current) {
|
|
@@ -6444,7 +6458,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6444
6458
|
};
|
|
6445
6459
|
return y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
|
|
6446
6460
|
}, [k]);
|
|
6447
|
-
const et = (y, v) => n ? n(y, v) : v, Yt = Q !== void 0, [Pr, ei] =
|
|
6461
|
+
const et = (y, v) => n ? n(y, v) : v, Yt = Q !== void 0, [Pr, ei] = T(
|
|
6448
6462
|
() => new Set(P ?? [])
|
|
6449
6463
|
), tt = ge(
|
|
6450
6464
|
() => Yt ? new Set(Q) : Pr,
|
|
@@ -6484,11 +6498,11 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6484
6498
|
)),
|
|
6485
6499
|
$ && /* @__PURE__ */ e(Me, { style: { width: 1, padding: 0, border: "none" } })
|
|
6486
6500
|
] }, `sa-tl-sk-${v}`)), oi = (y, v) => {
|
|
6487
|
-
v ||
|
|
6501
|
+
v || ze({
|
|
6488
6502
|
...we,
|
|
6489
6503
|
hidden: [...we.hidden ?? [], y]
|
|
6490
6504
|
});
|
|
6491
|
-
}, li = (y) =>
|
|
6505
|
+
}, li = (y) => ze({
|
|
6492
6506
|
...we,
|
|
6493
6507
|
frozenKey: we.frozenKey === y ? void 0 : y
|
|
6494
6508
|
}), Mt = (y) => (E ?? []).filter((v) => {
|
|
@@ -6507,15 +6521,15 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6507
6521
|
background: "linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"
|
|
6508
6522
|
}, Wt = (y, v, L, U) => {
|
|
6509
6523
|
var _e;
|
|
6510
|
-
const te = (_e = y.disabled) == null ? void 0 : _e.call(y, v), ae = (U == null ? void 0 : U.showLabel) ?? y.showLabel,
|
|
6524
|
+
const te = (_e = y.disabled) == null ? void 0 : _e.call(y, v), ae = (U == null ? void 0 : U.showLabel) ?? y.showLabel, ce = (U == null ? void 0 : U.size) ?? "xs", ye = /* @__PURE__ */ e(
|
|
6511
6525
|
_,
|
|
6512
6526
|
{
|
|
6513
|
-
size:
|
|
6527
|
+
size: ce,
|
|
6514
6528
|
variant: y.variant ?? "tertiary",
|
|
6515
6529
|
tone: y.tone ?? "neutral",
|
|
6516
6530
|
disabled: te,
|
|
6517
6531
|
onClick: () => y.onClick(v, L),
|
|
6518
|
-
iconLeft: y.icon ? /* @__PURE__ */ e(
|
|
6532
|
+
iconLeft: y.icon ? /* @__PURE__ */ e(z, { name: y.icon, size: "sm" }) : void 0,
|
|
6519
6533
|
children: ae && y.label
|
|
6520
6534
|
}
|
|
6521
6535
|
), be = y.tooltip;
|
|
@@ -6524,41 +6538,41 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6524
6538
|
const L = Mt(y);
|
|
6525
6539
|
if (!L.length) return null;
|
|
6526
6540
|
if (L.length > 5) {
|
|
6527
|
-
const te = et(y, v), ae = (
|
|
6541
|
+
const te = et(y, v), ae = (V == null ? void 0 : V.rowKey) === te;
|
|
6528
6542
|
return /* @__PURE__ */ e(
|
|
6529
6543
|
"div",
|
|
6530
6544
|
{
|
|
6531
6545
|
className: "sa-tl-row-actions",
|
|
6532
6546
|
style: Jr,
|
|
6533
|
-
onClick: (
|
|
6547
|
+
onClick: (ce) => ce.stopPropagation(),
|
|
6534
6548
|
children: /* @__PURE__ */ e(Ie, { label: "Aksi lainnya", position: "top", children: /* @__PURE__ */ e(
|
|
6535
6549
|
_,
|
|
6536
6550
|
{
|
|
6537
6551
|
size: "xs",
|
|
6538
6552
|
variant: "tertiary",
|
|
6539
|
-
onClick: (
|
|
6540
|
-
const ye =
|
|
6553
|
+
onClick: (ce) => {
|
|
6554
|
+
const ye = ce.currentTarget.getBoundingClientRect();
|
|
6541
6555
|
j(ae ? null : {
|
|
6542
6556
|
rowKey: te,
|
|
6543
6557
|
top: ye.bottom + 4,
|
|
6544
6558
|
right: window.innerWidth - ye.right
|
|
6545
6559
|
});
|
|
6546
6560
|
},
|
|
6547
|
-
children: /* @__PURE__ */ e(
|
|
6561
|
+
children: /* @__PURE__ */ e(z, { name: "MenuVertical", size: "sm" })
|
|
6548
6562
|
}
|
|
6549
6563
|
) })
|
|
6550
6564
|
}
|
|
6551
6565
|
);
|
|
6552
6566
|
}
|
|
6553
|
-
return /* @__PURE__ */ e("div", { className: "sa-tl-row-actions", style: Jr, children: L.map((te) => /* @__PURE__ */ e(
|
|
6567
|
+
return /* @__PURE__ */ e("div", { className: "sa-tl-row-actions", style: Jr, children: L.map((te) => /* @__PURE__ */ e(at.Fragment, { children: Wt(te, y, v) }, te.key)) });
|
|
6554
6568
|
}, si = (y, v) => {
|
|
6555
6569
|
const L = Mt(y);
|
|
6556
|
-
return L.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 6, flexWrap: "wrap", paddingTop: 8, marginTop: 8, borderTop: wt }, children: L.map((U) => /* @__PURE__ */ e(
|
|
6570
|
+
return L.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 6, flexWrap: "wrap", paddingTop: 8, marginTop: 8, borderTop: wt }, children: L.map((U) => /* @__PURE__ */ e(at.Fragment, { children: Wt(U, y, v, { showLabel: !0, size: "sm" }) }, U.key)) }) : null;
|
|
6557
6571
|
}, ai = (y, v) => {
|
|
6558
6572
|
const L = Mt(y);
|
|
6559
|
-
return L.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: L.map((U) => /* @__PURE__ */ e(
|
|
6573
|
+
return L.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: L.map((U) => /* @__PURE__ */ e(at.Fragment, { children: Wt(U, y, v, { showLabel: !1 }) }, U.key)) }) : null;
|
|
6560
6574
|
}, nr = (y, v) => {
|
|
6561
|
-
const { col: L, key: U } = y, te = ft.get(U) ?? 0, ae = $r(te),
|
|
6575
|
+
const { col: L, key: U } = y, te = ft.get(U) ?? 0, ae = $r(te), ce = ae && te === Jt, ye = (Fe == null ? void 0 : Fe.key) === U ? Fe.direction : null, be = m && !L.disableMenu ? /* @__PURE__ */ e(
|
|
6562
6576
|
xl,
|
|
6563
6577
|
{
|
|
6564
6578
|
active: !!ye || ae,
|
|
@@ -6584,7 +6598,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6584
6598
|
overflow: "hidden"
|
|
6585
6599
|
},
|
|
6586
6600
|
children: [
|
|
6587
|
-
L.icon && /* @__PURE__ */ e(
|
|
6601
|
+
L.icon && /* @__PURE__ */ e(z, { name: L.icon, size: "sm", style: { flexShrink: 0 } }),
|
|
6588
6602
|
/* @__PURE__ */ e("span", { style: It, children: L.title })
|
|
6589
6603
|
]
|
|
6590
6604
|
}
|
|
@@ -6606,7 +6620,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6606
6620
|
left: ae ? _r(te) : void 0,
|
|
6607
6621
|
zIndex: ae ? 3 : 2,
|
|
6608
6622
|
backgroundColor: pt,
|
|
6609
|
-
boxShadow:
|
|
6623
|
+
boxShadow: ce ? kn : void 0
|
|
6610
6624
|
},
|
|
6611
6625
|
children: /* @__PURE__ */ e(
|
|
6612
6626
|
"div",
|
|
@@ -6660,7 +6674,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6660
6674
|
},
|
|
6661
6675
|
onClick: (v) => v.stopPropagation(),
|
|
6662
6676
|
children: /* @__PURE__ */ e(
|
|
6663
|
-
|
|
6677
|
+
st,
|
|
6664
6678
|
{
|
|
6665
6679
|
size: "sm",
|
|
6666
6680
|
variant: qr ? "indeterminate" : "select",
|
|
@@ -6699,7 +6713,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6699
6713
|
},
|
|
6700
6714
|
onClick: (te) => te.stopPropagation(),
|
|
6701
6715
|
children: /* @__PURE__ */ e(
|
|
6702
|
-
|
|
6716
|
+
st,
|
|
6703
6717
|
{
|
|
6704
6718
|
size: "sm",
|
|
6705
6719
|
checked: tt.has(U),
|
|
@@ -6823,7 +6837,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6823
6837
|
flexShrink: 0
|
|
6824
6838
|
},
|
|
6825
6839
|
children: /* @__PURE__ */ e(
|
|
6826
|
-
|
|
6840
|
+
st,
|
|
6827
6841
|
{
|
|
6828
6842
|
size: "sm",
|
|
6829
6843
|
checked: tt.has(L),
|
|
@@ -6856,7 +6870,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6856
6870
|
children: [
|
|
6857
6871
|
lr(y, v),
|
|
6858
6872
|
/* @__PURE__ */ e(
|
|
6859
|
-
|
|
6873
|
+
z,
|
|
6860
6874
|
{
|
|
6861
6875
|
name: U ? "ChevronUp" : "ChevronDown",
|
|
6862
6876
|
size: "sm",
|
|
@@ -6905,7 +6919,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6905
6919
|
children: [
|
|
6906
6920
|
Xt(y, v) ? /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
6907
6921
|
/* @__PURE__ */ e(
|
|
6908
|
-
|
|
6922
|
+
st,
|
|
6909
6923
|
{
|
|
6910
6924
|
size: "sm",
|
|
6911
6925
|
checked: tt.has(L),
|
|
@@ -6926,7 +6940,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6926
6940
|
);
|
|
6927
6941
|
})
|
|
6928
6942
|
}
|
|
6929
|
-
), pi = l && ue && Se !== void 0, Kr = c === "fixed" && !l && (ue ? Se !== void 0 : !0), yi = Kr && !ue,
|
|
6943
|
+
), pi = l && ue && Se !== void 0, Kr = c === "fixed" && !l && (ue ? Se !== void 0 : !0), yi = Kr && !ue, zt = C && C.length > 0 ? C.map((y, v) => /* @__PURE__ */ e(Ne, { children: y.cells.map((L, U) => /* @__PURE__ */ e(
|
|
6930
6944
|
Me,
|
|
6931
6945
|
{
|
|
6932
6946
|
colSpan: L.colSpan,
|
|
@@ -6936,14 +6950,14 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6936
6950
|
},
|
|
6937
6951
|
`tl-foot-${v}-${U}`
|
|
6938
6952
|
)) }, `tl-foot-${v}`)) : null, bi = /* @__PURE__ */ d(
|
|
6939
|
-
|
|
6953
|
+
Vt,
|
|
6940
6954
|
{
|
|
6941
6955
|
className: "sa-table-layout",
|
|
6942
6956
|
fullWidth: !0,
|
|
6943
6957
|
size: i,
|
|
6944
6958
|
resizable: pi,
|
|
6945
6959
|
style: Kr ? { tableLayout: "fixed" } : void 0,
|
|
6946
|
-
onWidthsChange:
|
|
6960
|
+
onWidthsChange: Be ? ie : void 0,
|
|
6947
6961
|
children: [
|
|
6948
6962
|
yi && /* @__PURE__ */ d("colgroup", { children: [
|
|
6949
6963
|
Z && /* @__PURE__ */ e("col", { style: { width: Dt } }),
|
|
@@ -6953,7 +6967,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6953
6967
|
/* @__PURE__ */ e(Rn, { ref: Ae, children: Ue ? /* @__PURE__ */ d(re, { children: [
|
|
6954
6968
|
/* @__PURE__ */ d(Ne, { children: [
|
|
6955
6969
|
Z && Qr({ rowSpan: 2 }),
|
|
6956
|
-
|
|
6970
|
+
ot.map(
|
|
6957
6971
|
(y) => y.isGroup ? /* @__PURE__ */ e(
|
|
6958
6972
|
ht,
|
|
6959
6973
|
{
|
|
@@ -6987,8 +7001,8 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6987
7001
|
}
|
|
6988
7002
|
)
|
|
6989
7003
|
] }),
|
|
6990
|
-
/* @__PURE__ */ e(Ne, { children:
|
|
6991
|
-
(y) => y.isGroup ? y.leaves.map((v) => nr(v, { top:
|
|
7004
|
+
/* @__PURE__ */ e(Ne, { children: ot.flatMap(
|
|
7005
|
+
(y) => y.isGroup ? y.leaves.map((v) => nr(v, { top: ct })) : []
|
|
6992
7006
|
) })
|
|
6993
7007
|
] }) : /* @__PURE__ */ d(Ne, { children: [
|
|
6994
7008
|
Z && Qr(),
|
|
@@ -7016,11 +7030,11 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7016
7030
|
v,
|
|
7017
7031
|
v > 0 ? G[v - 1] : void 0
|
|
7018
7032
|
), te = Z && tt.has(et(y, v)) ? br : Ot(o == null ? void 0 : o(y, v));
|
|
7019
|
-
return /* @__PURE__ */ d(
|
|
7033
|
+
return /* @__PURE__ */ d(at.Fragment, { children: [
|
|
7020
7034
|
L != null && L !== !1 && /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Me, { colSpan: rr, style: { backgroundColor: pt }, children: L }) }),
|
|
7021
7035
|
/* @__PURE__ */ d(Ne, { children: [
|
|
7022
7036
|
Z && ui(y, v, te),
|
|
7023
|
-
ke.map(({ col: ae, key:
|
|
7037
|
+
ke.map(({ col: ae, key: ce }, ye) => {
|
|
7024
7038
|
var tn;
|
|
7025
7039
|
const be = (tn = ae.cellProps) == null ? void 0 : tn.call(ae, y, v, G);
|
|
7026
7040
|
if (be != null && be.hidden) return null;
|
|
@@ -7054,7 +7068,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7054
7068
|
}
|
|
7055
7069
|
) : Je
|
|
7056
7070
|
},
|
|
7057
|
-
`tl-cell-${v}-${
|
|
7071
|
+
`tl-cell-${v}-${ce}`
|
|
7058
7072
|
);
|
|
7059
7073
|
}),
|
|
7060
7074
|
$ && /* @__PURE__ */ e(
|
|
@@ -7077,10 +7091,10 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7077
7091
|
}),
|
|
7078
7092
|
A != null && /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Me, { colSpan: rr, children: A }) })
|
|
7079
7093
|
] }) }),
|
|
7080
|
-
|
|
7094
|
+
zt && /* @__PURE__ */ e(Si, { className: F ? "sa-tl-sticky-foot" : void 0, children: zt })
|
|
7081
7095
|
]
|
|
7082
7096
|
}
|
|
7083
|
-
), cr =
|
|
7097
|
+
), cr = V ? G.findIndex((y, v) => et(y, v) === V.rowKey) : -1, sr = cr >= 0 ? G[cr] : null;
|
|
7084
7098
|
return /* @__PURE__ */ d(re, { children: [
|
|
7085
7099
|
/* @__PURE__ */ e(
|
|
7086
7100
|
f,
|
|
@@ -7093,15 +7107,15 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7093
7107
|
},
|
|
7094
7108
|
children: ne ? /* @__PURE__ */ d(re, { children: [
|
|
7095
7109
|
gi,
|
|
7096
|
-
|
|
7110
|
+
zt && !R && G.length > 0 && /* @__PURE__ */ e(f, { style: { borderTop: wt }, children: /* @__PURE__ */ e(Vt, { fullWidth: !0, size: i, className: "sa-table-layout", children: /* @__PURE__ */ e(wr, { children: zt }) }) })
|
|
7097
7111
|
] }) : bi
|
|
7098
7112
|
}
|
|
7099
7113
|
),
|
|
7100
|
-
|
|
7114
|
+
V && sr && /* @__PURE__ */ e(
|
|
7101
7115
|
"div",
|
|
7102
7116
|
{
|
|
7103
7117
|
className: "sa-tl-kebab-menu",
|
|
7104
|
-
style: { top:
|
|
7118
|
+
style: { top: V.top, right: V.right },
|
|
7105
7119
|
onClick: (y) => y.stopPropagation(),
|
|
7106
7120
|
children: Mt(sr).map((y) => /* @__PURE__ */ e("div", { style: { padding: "2px 4px" }, children: Wt(y, sr, cr, { showLabel: !0, size: "sm" }) }, y.key))
|
|
7107
7121
|
}
|
|
@@ -7116,7 +7130,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7116
7130
|
paramKeys: l,
|
|
7117
7131
|
scopeId: c,
|
|
7118
7132
|
storage: s = Pn
|
|
7119
|
-
} = t, { searchParams: a, setSearchParams: u, searchQueries: m } = $e(), p = a.toString(), g = c ? Et.tableSort(c) : void 0, b =
|
|
7133
|
+
} = t, { searchParams: a, setSearchParams: u, searchQueries: m } = $e(), p = a.toString(), g = c ? Et.tableSort(c) : void 0, b = le(!1);
|
|
7120
7134
|
J(() => {
|
|
7121
7135
|
if (b.current || (b.current = !0, !g) || a.has(r) || a.has(n))
|
|
7122
7136
|
return;
|
|
@@ -7166,7 +7180,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7166
7180
|
color: t.color || "gray-700",
|
|
7167
7181
|
children: t.children
|
|
7168
7182
|
}
|
|
7169
|
-
),
|
|
7183
|
+
), it = (t) => /* @__PURE__ */ e(D, { color: "red-600", fontSize: "sm", children: t.message }), Sl = ({
|
|
7170
7184
|
size: t = "md",
|
|
7171
7185
|
direction: r = "vertical",
|
|
7172
7186
|
requiredTitle: n = "(Required)",
|
|
@@ -7215,7 +7229,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7215
7229
|
arrowPosition: (u = i.tooltip) == null ? void 0 : u.arrowPosition,
|
|
7216
7230
|
...i.tooltip,
|
|
7217
7231
|
children: /* @__PURE__ */ e(
|
|
7218
|
-
|
|
7232
|
+
z,
|
|
7219
7233
|
{
|
|
7220
7234
|
name: "InfoCircle",
|
|
7221
7235
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -7245,7 +7259,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7245
7259
|
fullWidth: !0
|
|
7246
7260
|
}
|
|
7247
7261
|
),
|
|
7248
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
7262
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage }),
|
|
7249
7263
|
i.inputProps.extended && i.inputProps.extended
|
|
7250
7264
|
] })
|
|
7251
7265
|
]
|
|
@@ -7300,7 +7314,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7300
7314
|
arrowPosition: (u = i.tooltip) == null ? void 0 : u.arrowPosition,
|
|
7301
7315
|
...i.tooltip,
|
|
7302
7316
|
children: /* @__PURE__ */ e(
|
|
7303
|
-
|
|
7317
|
+
z,
|
|
7304
7318
|
{
|
|
7305
7319
|
name: "InfoCircle",
|
|
7306
7320
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -7337,7 +7351,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7337
7351
|
)
|
|
7338
7352
|
}
|
|
7339
7353
|
),
|
|
7340
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
7354
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage }),
|
|
7341
7355
|
i.inputProps.extended && i.inputProps.extended
|
|
7342
7356
|
] })
|
|
7343
7357
|
]
|
|
@@ -7345,7 +7359,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7345
7359
|
);
|
|
7346
7360
|
}, El = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-border-danger)" : "var(--sa-border-subtle)", Ll = (t) => {
|
|
7347
7361
|
var s;
|
|
7348
|
-
const [r, n] =
|
|
7362
|
+
const [r, n] = T(!1), o = (a) => {
|
|
7349
7363
|
a.preventDefault(), a.stopPropagation();
|
|
7350
7364
|
}, i = (a) => {
|
|
7351
7365
|
a.preventDefault(), a.stopPropagation(), a.dataTransfer && t.handleOnFileChange(a.dataTransfer.files.item(0));
|
|
@@ -7374,7 +7388,7 @@ const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7374
7388
|
},
|
|
7375
7389
|
children: [
|
|
7376
7390
|
/* @__PURE__ */ e(
|
|
7377
|
-
|
|
7391
|
+
z,
|
|
7378
7392
|
{
|
|
7379
7393
|
name: "Upload",
|
|
7380
7394
|
size: "lg",
|
|
@@ -7492,7 +7506,7 @@ const Wl = "sa-admin", Qe = (t) => `var(--${Wl}-${t})`, fs = {
|
|
|
7492
7506
|
o.font = r;
|
|
7493
7507
|
const i = o.measureText(t).width;
|
|
7494
7508
|
return Number(Math.ceil(i));
|
|
7495
|
-
},
|
|
7509
|
+
}, zl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Bl = /--+/, Al = /-$/;
|
|
7496
7510
|
function ps(t, r) {
|
|
7497
7511
|
return JSON.stringify(t) !== JSON.stringify(r);
|
|
7498
7512
|
}
|
|
@@ -7538,9 +7552,9 @@ const xs = (t) => {
|
|
|
7538
7552
|
"Tab"
|
|
7539
7553
|
];
|
|
7540
7554
|
(t.ctrlKey || t.metaKey) && t.key === "v" || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
7541
|
-
}, ws = (t) =>
|
|
7555
|
+
}, ws = (t) => zl.test(t);
|
|
7542
7556
|
function Ds(t) {
|
|
7543
|
-
return !(
|
|
7557
|
+
return !(Bl.test(t) || Al.test(t));
|
|
7544
7558
|
}
|
|
7545
7559
|
const ks = (t) => {
|
|
7546
7560
|
const r = [
|
|
@@ -7605,7 +7619,7 @@ const Ol = (t) => {
|
|
|
7605
7619
|
children: [
|
|
7606
7620
|
/* @__PURE__ */ d(de, { direction: "row", align: "center", gap: "sm", style: { flex: 1, minWidth: 0 }, children: [
|
|
7607
7621
|
/* @__PURE__ */ e(
|
|
7608
|
-
|
|
7622
|
+
z,
|
|
7609
7623
|
{
|
|
7610
7624
|
name: "DocumentFilled",
|
|
7611
7625
|
size: "lg",
|
|
@@ -7632,11 +7646,11 @@ const Ol = (t) => {
|
|
|
7632
7646
|
),
|
|
7633
7647
|
t.defaultFile ? (t.defaultFile.size || t.defaultFile.date) && /* @__PURE__ */ d(de, { direction: "row", gap: "xs", align: "center", children: [
|
|
7634
7648
|
t.defaultFile.size && /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", children: t.defaultFile.size }),
|
|
7635
|
-
t.defaultFile.size && t.defaultFile.date && /* @__PURE__ */ e(
|
|
7649
|
+
t.defaultFile.size && t.defaultFile.date && /* @__PURE__ */ e(z, { name: "Dot", size: "xs" }),
|
|
7636
7650
|
t.defaultFile.date && /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: t.defaultFile.date })
|
|
7637
7651
|
] }) : /* @__PURE__ */ d(de, { direction: "row", gap: "xs", align: "center", children: [
|
|
7638
7652
|
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", children: Rl(((n = t.fileSelected) == null ? void 0 : n.size.toString()) || "100000") }),
|
|
7639
|
-
/* @__PURE__ */ e(
|
|
7653
|
+
/* @__PURE__ */ e(z, { name: "Dot", size: "xs" }),
|
|
7640
7654
|
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: Ml(/* @__PURE__ */ new Date()) })
|
|
7641
7655
|
] })
|
|
7642
7656
|
] })
|
|
@@ -7651,7 +7665,7 @@ const Ol = (t) => {
|
|
|
7651
7665
|
onClick: (o) => {
|
|
7652
7666
|
o.stopPropagation(), t.handleOnDeleteFile();
|
|
7653
7667
|
},
|
|
7654
|
-
iconLeft: /* @__PURE__ */ e(
|
|
7668
|
+
iconLeft: /* @__PURE__ */ e(z, { name: "Trash1" })
|
|
7655
7669
|
}
|
|
7656
7670
|
)
|
|
7657
7671
|
]
|
|
@@ -7663,7 +7677,7 @@ const Ol = (t) => {
|
|
|
7663
7677
|
...n
|
|
7664
7678
|
}) => {
|
|
7665
7679
|
var g;
|
|
7666
|
-
const o =
|
|
7680
|
+
const o = le(null), i = () => {
|
|
7667
7681
|
if (n.defaultFile) {
|
|
7668
7682
|
window.open(n.defaultFile.url);
|
|
7669
7683
|
return;
|
|
@@ -7753,7 +7767,7 @@ const Ol = (t) => {
|
|
|
7753
7767
|
p,
|
|
7754
7768
|
u
|
|
7755
7769
|
] });
|
|
7756
|
-
},
|
|
7770
|
+
}, Tl = ({
|
|
7757
7771
|
size: t = "md",
|
|
7758
7772
|
direction: r = "vertical",
|
|
7759
7773
|
requiredTitle: n = "(Required)",
|
|
@@ -7802,7 +7816,7 @@ const Ol = (t) => {
|
|
|
7802
7816
|
arrowPosition: (u = i.tooltip) == null ? void 0 : u.arrowPosition,
|
|
7803
7817
|
...i.tooltip,
|
|
7804
7818
|
children: /* @__PURE__ */ e(
|
|
7805
|
-
|
|
7819
|
+
z,
|
|
7806
7820
|
{
|
|
7807
7821
|
name: "InfoCircle",
|
|
7808
7822
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -7829,12 +7843,12 @@ const Ol = (t) => {
|
|
|
7829
7843
|
status: i.errorMessage ? "error" : "default"
|
|
7830
7844
|
}
|
|
7831
7845
|
),
|
|
7832
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
7846
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage })
|
|
7833
7847
|
] })
|
|
7834
7848
|
]
|
|
7835
7849
|
}
|
|
7836
7850
|
);
|
|
7837
|
-
},
|
|
7851
|
+
}, Vl = ({
|
|
7838
7852
|
size: t = "md",
|
|
7839
7853
|
direction: r = "vertical",
|
|
7840
7854
|
requiredTitle: n = "(Required)",
|
|
@@ -7884,7 +7898,7 @@ const Ol = (t) => {
|
|
|
7884
7898
|
arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
|
|
7885
7899
|
...l.tooltip,
|
|
7886
7900
|
children: /* @__PURE__ */ e(
|
|
7887
|
-
|
|
7901
|
+
z,
|
|
7888
7902
|
{
|
|
7889
7903
|
name: "InfoCircle",
|
|
7890
7904
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -7925,7 +7939,7 @@ const Ol = (t) => {
|
|
|
7925
7939
|
...l.badgeContainerProps,
|
|
7926
7940
|
children: [
|
|
7927
7941
|
/* @__PURE__ */ e(
|
|
7928
|
-
|
|
7942
|
+
st,
|
|
7929
7943
|
{
|
|
7930
7944
|
name: g.name,
|
|
7931
7945
|
value: g.id,
|
|
@@ -7939,7 +7953,7 @@ const Ol = (t) => {
|
|
|
7939
7953
|
]
|
|
7940
7954
|
}
|
|
7941
7955
|
) : /* @__PURE__ */ e(
|
|
7942
|
-
|
|
7956
|
+
st,
|
|
7943
7957
|
{
|
|
7944
7958
|
name: g.name,
|
|
7945
7959
|
value: g.id,
|
|
@@ -7953,7 +7967,7 @@ const Ol = (t) => {
|
|
|
7953
7967
|
)
|
|
7954
7968
|
}
|
|
7955
7969
|
),
|
|
7956
|
-
!c && l.errorMessage && /* @__PURE__ */ e(
|
|
7970
|
+
!c && l.errorMessage && /* @__PURE__ */ e(it, { message: l.errorMessage })
|
|
7957
7971
|
]
|
|
7958
7972
|
}
|
|
7959
7973
|
);
|
|
@@ -8031,7 +8045,7 @@ const Ol = (t) => {
|
|
|
8031
8045
|
)
|
|
8032
8046
|
}
|
|
8033
8047
|
),
|
|
8034
|
-
o.errorMessage && /* @__PURE__ */ e(
|
|
8048
|
+
o.errorMessage && /* @__PURE__ */ e(it, { message: o.errorMessage })
|
|
8035
8049
|
]
|
|
8036
8050
|
}
|
|
8037
8051
|
);
|
|
@@ -8084,7 +8098,7 @@ const Ol = (t) => {
|
|
|
8084
8098
|
arrowPosition: (u = i.tooltip) == null ? void 0 : u.arrowPosition,
|
|
8085
8099
|
...i.tooltip,
|
|
8086
8100
|
children: /* @__PURE__ */ e(
|
|
8087
|
-
|
|
8101
|
+
z,
|
|
8088
8102
|
{
|
|
8089
8103
|
name: "InfoCircle",
|
|
8090
8104
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -8113,7 +8127,7 @@ const Ol = (t) => {
|
|
|
8113
8127
|
status: i.errorMessage ? "error" : "default"
|
|
8114
8128
|
}
|
|
8115
8129
|
),
|
|
8116
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
8130
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage })
|
|
8117
8131
|
] })
|
|
8118
8132
|
]
|
|
8119
8133
|
}
|
|
@@ -8168,7 +8182,7 @@ const Ol = (t) => {
|
|
|
8168
8182
|
arrowPosition: (u = l.tooltip) == null ? void 0 : u.arrowPosition,
|
|
8169
8183
|
...l.tooltip,
|
|
8170
8184
|
children: /* @__PURE__ */ e(
|
|
8171
|
-
|
|
8185
|
+
z,
|
|
8172
8186
|
{
|
|
8173
8187
|
name: "InfoCircle",
|
|
8174
8188
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -8196,7 +8210,7 @@ const Ol = (t) => {
|
|
|
8196
8210
|
description: l.description
|
|
8197
8211
|
}
|
|
8198
8212
|
),
|
|
8199
|
-
l.errorMessage && /* @__PURE__ */ e(
|
|
8213
|
+
l.errorMessage && /* @__PURE__ */ e(it, { message: l.errorMessage })
|
|
8200
8214
|
]
|
|
8201
8215
|
}
|
|
8202
8216
|
);
|
|
@@ -8209,7 +8223,7 @@ const Ol = (t) => {
|
|
|
8209
8223
|
var a, u, m, p, g, b;
|
|
8210
8224
|
if (!c) return;
|
|
8211
8225
|
const s = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (u = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.red) == null ? void 0 : u[600] : t === "secondary-primary" ? (p = (m = o == null ? void 0 : o.computed) == null ? void 0 : m.blue) == null ? void 0 : p[700] : (b = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.gray) == null ? void 0 : b[50];
|
|
8212
|
-
return /* @__PURE__ */ e(
|
|
8226
|
+
return /* @__PURE__ */ e(z, { name: c, size: r, style: { color: s } });
|
|
8213
8227
|
}, l = () => {
|
|
8214
8228
|
var s, a, u, m;
|
|
8215
8229
|
if (t !== "secondary-danger" && t !== "secondary-primary")
|
|
@@ -8302,7 +8316,7 @@ const Ol = (t) => {
|
|
|
8302
8316
|
arrowPosition: (u = i.tooltip) == null ? void 0 : u.arrowPosition,
|
|
8303
8317
|
...i.tooltip,
|
|
8304
8318
|
children: /* @__PURE__ */ e(
|
|
8305
|
-
|
|
8319
|
+
z,
|
|
8306
8320
|
{
|
|
8307
8321
|
name: "InfoCircle",
|
|
8308
8322
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -8339,7 +8353,7 @@ const Ol = (t) => {
|
|
|
8339
8353
|
)
|
|
8340
8354
|
}
|
|
8341
8355
|
),
|
|
8342
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
8356
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage })
|
|
8343
8357
|
] })
|
|
8344
8358
|
]
|
|
8345
8359
|
}
|
|
@@ -8394,18 +8408,18 @@ const Fn = {
|
|
|
8394
8408
|
maxFileSize: a = 2,
|
|
8395
8409
|
onError: u
|
|
8396
8410
|
}, m) => {
|
|
8397
|
-
const p = Le("md"), [g, b] =
|
|
8411
|
+
const p = Le("md"), [g, b] = T(!1), [k, x] = T(null), [M, S] = T(!1), [A, C] = T({ x: 0, y: 0 }), [F, I] = T(1), [R, W] = T(null);
|
|
8398
8412
|
J(() => {
|
|
8399
8413
|
r === null && i(null);
|
|
8400
8414
|
}, [r]);
|
|
8401
8415
|
const E = q(
|
|
8402
|
-
(
|
|
8416
|
+
(V, j) => {
|
|
8403
8417
|
W(j);
|
|
8404
8418
|
},
|
|
8405
8419
|
[]
|
|
8406
|
-
), Z = (
|
|
8420
|
+
), Z = (V) => {
|
|
8407
8421
|
var ve;
|
|
8408
|
-
const j = (ve =
|
|
8422
|
+
const j = (ve = V.target.files) == null ? void 0 : ve[0];
|
|
8409
8423
|
if (!j) return;
|
|
8410
8424
|
const oe = new FileReader();
|
|
8411
8425
|
oe.onload = () => {
|
|
@@ -8414,24 +8428,24 @@ const Fn = {
|
|
|
8414
8428
|
}, Q = async () => {
|
|
8415
8429
|
if (!(!k || !R))
|
|
8416
8430
|
try {
|
|
8417
|
-
const
|
|
8418
|
-
if (a &&
|
|
8431
|
+
const V = await Gl(k, R);
|
|
8432
|
+
if (a && V.size > a * 1024 * 1024) {
|
|
8419
8433
|
u == null || u(`Ukuran file maksimal ${a}MB`);
|
|
8420
8434
|
return;
|
|
8421
8435
|
}
|
|
8422
|
-
t == null || t(
|
|
8423
|
-
const j = URL.createObjectURL(
|
|
8424
|
-
i(j,
|
|
8436
|
+
t == null || t(V);
|
|
8437
|
+
const j = URL.createObjectURL(V);
|
|
8438
|
+
i(j, V), S(!1);
|
|
8425
8439
|
} catch {
|
|
8426
8440
|
u == null || u("Gagal memproses gambar");
|
|
8427
8441
|
}
|
|
8428
|
-
}, P =
|
|
8442
|
+
}, P = le(null), K = () => {
|
|
8429
8443
|
P.current && P.current.click();
|
|
8430
8444
|
};
|
|
8431
|
-
|
|
8445
|
+
zi(m, () => ({
|
|
8432
8446
|
openFileDialog: () => {
|
|
8433
|
-
var
|
|
8434
|
-
(
|
|
8447
|
+
var V;
|
|
8448
|
+
(V = P.current) == null || V.click();
|
|
8435
8449
|
}
|
|
8436
8450
|
}));
|
|
8437
8451
|
const N = parseInt(l, 10), Y = Fn[c];
|
|
@@ -8479,7 +8493,7 @@ const Fn = {
|
|
|
8479
8493
|
justify: "center",
|
|
8480
8494
|
padding: "spacing-4",
|
|
8481
8495
|
children: /* @__PURE__ */ e(
|
|
8482
|
-
|
|
8496
|
+
z,
|
|
8483
8497
|
{
|
|
8484
8498
|
name: "Image",
|
|
8485
8499
|
style: {
|
|
@@ -8521,7 +8535,7 @@ const Fn = {
|
|
|
8521
8535
|
),
|
|
8522
8536
|
/* @__PURE__ */ d(f, { display: "flex", align: "center", gap: "spacing-2", direction: "row", children: [
|
|
8523
8537
|
/* @__PURE__ */ e(
|
|
8524
|
-
|
|
8538
|
+
z,
|
|
8525
8539
|
{
|
|
8526
8540
|
name: "Edit3",
|
|
8527
8541
|
style: { color: "var(--sa-background-primary, #ffffff)" }
|
|
@@ -8569,7 +8583,7 @@ const Fn = {
|
|
|
8569
8583
|
)
|
|
8570
8584
|
}
|
|
8571
8585
|
),
|
|
8572
|
-
M &&
|
|
8586
|
+
M && Bi.createPortal(
|
|
8573
8587
|
/* @__PURE__ */ e(
|
|
8574
8588
|
"div",
|
|
8575
8589
|
{
|
|
@@ -8595,7 +8609,7 @@ const Fn = {
|
|
|
8595
8609
|
display: "flex",
|
|
8596
8610
|
flexDirection: "column"
|
|
8597
8611
|
},
|
|
8598
|
-
onClick: (
|
|
8612
|
+
onClick: (V) => V.stopPropagation(),
|
|
8599
8613
|
children: [
|
|
8600
8614
|
/* @__PURE__ */ e(
|
|
8601
8615
|
"div",
|
|
@@ -8700,7 +8714,7 @@ const Fn = {
|
|
|
8700
8714
|
arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
|
|
8701
8715
|
...l.tooltip,
|
|
8702
8716
|
children: /* @__PURE__ */ e(
|
|
8703
|
-
|
|
8717
|
+
z,
|
|
8704
8718
|
{
|
|
8705
8719
|
name: "InfoCircle",
|
|
8706
8720
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -8721,7 +8735,7 @@ const Fn = {
|
|
|
8721
8735
|
),
|
|
8722
8736
|
/* @__PURE__ */ d(de, { direction: "column", gap: "xs", children: [
|
|
8723
8737
|
/* @__PURE__ */ e(ql, { ...l.inputProps }),
|
|
8724
|
-
!c && l.errorMessage && /* @__PURE__ */ e(
|
|
8738
|
+
!c && l.errorMessage && /* @__PURE__ */ e(it, { message: l.errorMessage })
|
|
8725
8739
|
] })
|
|
8726
8740
|
]
|
|
8727
8741
|
}
|
|
@@ -8775,7 +8789,7 @@ const Fn = {
|
|
|
8775
8789
|
arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
|
|
8776
8790
|
...i.tooltip,
|
|
8777
8791
|
children: /* @__PURE__ */ e(
|
|
8778
|
-
|
|
8792
|
+
z,
|
|
8779
8793
|
{
|
|
8780
8794
|
name: "InfoCircle",
|
|
8781
8795
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -8807,7 +8821,7 @@ const Fn = {
|
|
|
8807
8821
|
disabled: l = !1
|
|
8808
8822
|
}) => {
|
|
8809
8823
|
var m;
|
|
8810
|
-
const [c, s] =
|
|
8824
|
+
const [c, s] = T([]);
|
|
8811
8825
|
J(() => {
|
|
8812
8826
|
t && s([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
|
|
8813
8827
|
}, [t]);
|
|
@@ -8838,8 +8852,8 @@ const Fn = {
|
|
|
8838
8852
|
}, Es = {
|
|
8839
8853
|
InputText: Sl,
|
|
8840
8854
|
InputDropdown: Fl,
|
|
8841
|
-
InputSingleFile:
|
|
8842
|
-
CheckBoxOptions:
|
|
8855
|
+
InputSingleFile: Tl,
|
|
8856
|
+
CheckBoxOptions: Vl,
|
|
8843
8857
|
RadioOptions: Nl,
|
|
8844
8858
|
InputTextArea: $l,
|
|
8845
8859
|
ToggleForm: jl,
|
|
@@ -8849,7 +8863,7 @@ const Fn = {
|
|
|
8849
8863
|
InputImgFile: Ul,
|
|
8850
8864
|
Custom: Jl
|
|
8851
8865
|
}, Ql = ({ customBottom: t }) => {
|
|
8852
|
-
const [r, n] =
|
|
8866
|
+
const [r, n] = T(!1), o = () => {
|
|
8853
8867
|
window.scrollY > window.screenY ? n(!0) : n(!1);
|
|
8854
8868
|
}, i = () => {
|
|
8855
8869
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
@@ -8884,7 +8898,7 @@ const Fn = {
|
|
|
8884
8898
|
onClick: i,
|
|
8885
8899
|
type: "button",
|
|
8886
8900
|
iconLeft: /* @__PURE__ */ e(
|
|
8887
|
-
|
|
8901
|
+
z,
|
|
8888
8902
|
{
|
|
8889
8903
|
width: 16,
|
|
8890
8904
|
size: "xs",
|
|
@@ -8900,8 +8914,8 @@ const Fn = {
|
|
|
8900
8914
|
)
|
|
8901
8915
|
}
|
|
8902
8916
|
);
|
|
8903
|
-
},
|
|
8904
|
-
.${
|
|
8917
|
+
}, Ve = "sa-sidepanel-item", En = "sa-sidepanel-item-styles", Yl = "inset 3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)", Xl = "inset -3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)", Kl = `
|
|
8918
|
+
.${Ve} {
|
|
8905
8919
|
display: block;
|
|
8906
8920
|
box-sizing: border-box;
|
|
8907
8921
|
width: 100%;
|
|
@@ -8916,38 +8930,38 @@ const Fn = {
|
|
|
8916
8930
|
outline: none;
|
|
8917
8931
|
transition: background-color 140ms ease, box-shadow 140ms ease;
|
|
8918
8932
|
}
|
|
8919
|
-
.${
|
|
8933
|
+
.${Ve}[data-divider="true"] {
|
|
8920
8934
|
border-bottom: 1px solid var(--sa-border-subtle, #0b120e24);
|
|
8921
8935
|
}
|
|
8922
8936
|
/* The first row also gets a top line so the list is bounded on its own,
|
|
8923
8937
|
without relying on a wrapping container's border. Adjacent rows still
|
|
8924
8938
|
share a single 1px line (only border-bottom), never a doubled 2px one. */
|
|
8925
|
-
.${
|
|
8939
|
+
.${Ve}[data-divider="true"]:first-child {
|
|
8926
8940
|
border-top: 1px solid var(--sa-border-subtle, #0b120e24);
|
|
8927
8941
|
}
|
|
8928
|
-
.${
|
|
8942
|
+
.${Ve}:hover {
|
|
8929
8943
|
background: var(--sa-background-neutral, #f0f1f2);
|
|
8930
8944
|
}
|
|
8931
|
-
.${
|
|
8932
|
-
.${
|
|
8945
|
+
.${Ve}:focus-visible,
|
|
8946
|
+
.${Ve}[data-active="true"] {
|
|
8933
8947
|
background: var(--sa-background-brand-subtlest, #e6edf6);
|
|
8934
8948
|
}
|
|
8935
|
-
.${
|
|
8949
|
+
.${Ve}:focus-visible {
|
|
8936
8950
|
background: var(--sa-background-neutral, #f0f1f2);
|
|
8937
8951
|
}
|
|
8938
8952
|
/* Accent bar — sign of the offset picks the edge it hugs. */
|
|
8939
|
-
.${
|
|
8940
|
-
.${
|
|
8953
|
+
.${Ve}[data-accent="left"]:focus-visible,
|
|
8954
|
+
.${Ve}[data-accent="left"][data-active="true"] {
|
|
8941
8955
|
box-shadow: ${Yl};
|
|
8942
8956
|
}
|
|
8943
|
-
.${
|
|
8944
|
-
.${
|
|
8957
|
+
.${Ve}[data-accent="right"]:focus-visible,
|
|
8958
|
+
.${Ve}[data-accent="right"][data-active="true"] {
|
|
8945
8959
|
box-shadow: ${Xl};
|
|
8946
8960
|
}
|
|
8947
|
-
.${
|
|
8961
|
+
.${Ve}[data-active="true"]:hover {
|
|
8948
8962
|
background: var(--sa-background-brand-subtlest, #e6edf6);
|
|
8949
8963
|
}
|
|
8950
|
-
.${
|
|
8964
|
+
.${Ve}:disabled {
|
|
8951
8965
|
cursor: not-allowed;
|
|
8952
8966
|
opacity: 0.55;
|
|
8953
8967
|
}
|
|
@@ -8975,7 +8989,7 @@ const Ls = ({
|
|
|
8975
8989
|
"button",
|
|
8976
8990
|
{
|
|
8977
8991
|
type: "button",
|
|
8978
|
-
className: [
|
|
8992
|
+
className: [Ve, m].filter(Boolean).join(" "),
|
|
8979
8993
|
"data-active": t ? "true" : "false",
|
|
8980
8994
|
"data-accent": r,
|
|
8981
8995
|
"data-divider": a ? "true" : "false",
|
|
@@ -9063,10 +9077,10 @@ const Ls = ({
|
|
|
9063
9077
|
wrapperProps: A,
|
|
9064
9078
|
contentProps: C
|
|
9065
9079
|
}) => {
|
|
9066
|
-
const F = Le("md"), I = n !== void 0, [R, W] =
|
|
9080
|
+
const F = Le("md"), I = n !== void 0, [R, W] = T(o), E = I ? n : R, Z = () => {
|
|
9067
9081
|
const oe = !E;
|
|
9068
9082
|
I || W(oe), i == null || i(oe);
|
|
9069
|
-
}, Q = c === "left", P = typeof s == "number" ? `${s}px` : s, K = a !== void 0 ? typeof a == "number" ? `${a}px` : a : `calc(100vh - ${P})`, N = g ?? { collapse: "Collapse panel", expand: "Expand panel" }, Y = m === "center" ? { top: "50%", transform: "translateY(-50%)" } : m === "bottom" ? { bottom: p } : { top: p }, ne = E ? Q ? "ChevronRight" : "ChevronLeft" : Q ? "ChevronLeft" : "ChevronRight", $ = M !== void 0 && (S === "mobile" ? !F : S),
|
|
9083
|
+
}, Q = c === "left", P = typeof s == "number" ? `${s}px` : s, K = a !== void 0 ? typeof a == "number" ? `${a}px` : a : `calc(100vh - ${P})`, N = g ?? { collapse: "Collapse panel", expand: "Expand panel" }, Y = m === "center" ? { top: "50%", transform: "translateY(-50%)" } : m === "bottom" ? { bottom: p } : { top: p }, ne = E ? Q ? "ChevronRight" : "ChevronLeft" : Q ? "ChevronLeft" : "ChevronRight", $ = M !== void 0 && (S === "mobile" ? !F : S), V = $ ? {
|
|
9070
9084
|
position: "absolute",
|
|
9071
9085
|
top: 0,
|
|
9072
9086
|
bottom: 0,
|
|
@@ -9092,7 +9106,7 @@ const Ls = ({
|
|
|
9092
9106
|
f,
|
|
9093
9107
|
{
|
|
9094
9108
|
className: x,
|
|
9095
|
-
style:
|
|
9109
|
+
style: V,
|
|
9096
9110
|
children: [
|
|
9097
9111
|
/* @__PURE__ */ e(
|
|
9098
9112
|
f,
|
|
@@ -9160,7 +9174,7 @@ const Ls = ({
|
|
|
9160
9174
|
// boxShadow: "-2px 0 6px rgba(0, 0, 0, 0.04)",
|
|
9161
9175
|
}
|
|
9162
9176
|
},
|
|
9163
|
-
children: /* @__PURE__ */ e(
|
|
9177
|
+
children: /* @__PURE__ */ e(z, { name: ne, size: "sm" })
|
|
9164
9178
|
}
|
|
9165
9179
|
)
|
|
9166
9180
|
]
|
|
@@ -9254,14 +9268,14 @@ const Ls = ({
|
|
|
9254
9268
|
]
|
|
9255
9269
|
}
|
|
9256
9270
|
);
|
|
9257
|
-
}, Wn = "--sa-floating-footer-height",
|
|
9271
|
+
}, Wn = "--sa-floating-footer-height", zs = ({
|
|
9258
9272
|
children: t,
|
|
9259
9273
|
withScrollToTopButton: r = !1,
|
|
9260
9274
|
scrollToTopButtonProps: n,
|
|
9261
9275
|
containerProps: o
|
|
9262
9276
|
}) => {
|
|
9263
|
-
const i =
|
|
9264
|
-
return
|
|
9277
|
+
const i = le(null);
|
|
9278
|
+
return rt(() => {
|
|
9265
9279
|
const l = document.documentElement, c = () => {
|
|
9266
9280
|
var u;
|
|
9267
9281
|
const a = ((u = i.current) == null ? void 0 : u.getBoundingClientRect().height) ?? 0;
|
|
@@ -9305,7 +9319,7 @@ const Ls = ({
|
|
|
9305
9319
|
]
|
|
9306
9320
|
}
|
|
9307
9321
|
) });
|
|
9308
|
-
},
|
|
9322
|
+
}, Bs = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
|
|
9309
9323
|
Or,
|
|
9310
9324
|
{
|
|
9311
9325
|
of: t,
|
|
@@ -9313,7 +9327,7 @@ const Ls = ({
|
|
|
9313
9327
|
}
|
|
9314
9328
|
) }), nc = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ d(f, { display: "flex", direction: "column", gap: "sm", children: [
|
|
9315
9329
|
n ? /* @__PURE__ */ d(f, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
|
|
9316
|
-
/* @__PURE__ */ e(
|
|
9330
|
+
/* @__PURE__ */ e(z, { name: n, color: "subtle" }),
|
|
9317
9331
|
/* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t })
|
|
9318
9332
|
] }) : /* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t }),
|
|
9319
9333
|
typeof r == "string" ? /* @__PURE__ */ e(D, { variant: "sub-h3", children: r }) : r
|
|
@@ -10774,9 +10788,9 @@ const Hs = (t) => {
|
|
|
10774
10788
|
}
|
|
10775
10789
|
},
|
|
10776
10790
|
children: [
|
|
10777
|
-
/* @__PURE__ */ e(
|
|
10791
|
+
/* @__PURE__ */ e(zn, { ...t.dialogTitleProps, children: typeof t.title == "string" ? /* @__PURE__ */ e(D, { fontSize: "lg", fontWeight: "medium", children: t.title }) : t.title }),
|
|
10778
10792
|
/* @__PURE__ */ e(Er, { children: typeof t.description == "string" ? /* @__PURE__ */ e(D, { fontSize: "md", lineHeight: "leading-6", color: "brand", children: t.description }) : t.description }),
|
|
10779
|
-
/* @__PURE__ */ e(
|
|
10793
|
+
/* @__PURE__ */ e(Bn, { children: /* @__PURE__ */ e(
|
|
10780
10794
|
f,
|
|
10781
10795
|
{
|
|
10782
10796
|
display: "flex",
|
|
@@ -10822,7 +10836,7 @@ const Hs = (t) => {
|
|
|
10822
10836
|
},
|
|
10823
10837
|
t.key
|
|
10824
10838
|
);
|
|
10825
|
-
},
|
|
10839
|
+
}, Ts = Xe(
|
|
10826
10840
|
({
|
|
10827
10841
|
children: t,
|
|
10828
10842
|
height: r,
|
|
@@ -10842,7 +10856,7 @@ const Hs = (t) => {
|
|
|
10842
10856
|
footerProps: x = { borderTop: !0 },
|
|
10843
10857
|
variantTag: M = "info"
|
|
10844
10858
|
}) => {
|
|
10845
|
-
const S =
|
|
10859
|
+
const S = le(null), [A, C] = T("100vh");
|
|
10846
10860
|
J(() => {
|
|
10847
10861
|
const W = () => {
|
|
10848
10862
|
if (S.current) {
|
|
@@ -10907,7 +10921,7 @@ const Hs = (t) => {
|
|
|
10907
10921
|
}
|
|
10908
10922
|
);
|
|
10909
10923
|
}
|
|
10910
|
-
),
|
|
10924
|
+
), Vs = at.memo(
|
|
10911
10925
|
({ value: t, options: r = [], onChange: n, multiple: o }) => {
|
|
10912
10926
|
const i = (t == null ? void 0 : t.map((s) => s.value)) || [], l = (r == null ? void 0 : r.filter((s) => i.includes(s.value))) || [], c = (s) => {
|
|
10913
10927
|
const a = [...l];
|
|
@@ -10929,14 +10943,14 @@ function Hr(t) {
|
|
|
10929
10943
|
return null;
|
|
10930
10944
|
}
|
|
10931
10945
|
Hr.displayName = "LayoutDialog.Header";
|
|
10932
|
-
function
|
|
10946
|
+
function Tr(t) {
|
|
10933
10947
|
return null;
|
|
10934
10948
|
}
|
|
10935
|
-
|
|
10936
|
-
function
|
|
10949
|
+
Tr.displayName = "LayoutDialog.Body";
|
|
10950
|
+
function Vr(t) {
|
|
10937
10951
|
return null;
|
|
10938
10952
|
}
|
|
10939
|
-
|
|
10953
|
+
Vr.displayName = "LayoutDialog.Aside";
|
|
10940
10954
|
function Nr(t) {
|
|
10941
10955
|
return null;
|
|
10942
10956
|
}
|
|
@@ -10967,12 +10981,12 @@ const Re = {
|
|
|
10967
10981
|
{
|
|
10968
10982
|
mode: "modal",
|
|
10969
10983
|
label: "Modal",
|
|
10970
|
-
icon: /* @__PURE__ */ e(
|
|
10984
|
+
icon: /* @__PURE__ */ e(z, { name: "Newscreen", size: "sm" })
|
|
10971
10985
|
},
|
|
10972
10986
|
{
|
|
10973
10987
|
mode: "fullscreen",
|
|
10974
10988
|
label: "Fullscreen",
|
|
10975
|
-
icon: /* @__PURE__ */ e(
|
|
10989
|
+
icon: /* @__PURE__ */ e(z, { name: "Fullscreen", size: "sm" })
|
|
10976
10990
|
}
|
|
10977
10991
|
];
|
|
10978
10992
|
function ac({ value: t, onChange: r }) {
|
|
@@ -11022,8 +11036,8 @@ function uc(t) {
|
|
|
11022
11036
|
}
|
|
11023
11037
|
function Ht(t, r) {
|
|
11024
11038
|
let n = null;
|
|
11025
|
-
return
|
|
11026
|
-
|
|
11039
|
+
return at.Children.forEach(t, (o) => {
|
|
11040
|
+
at.isValidElement(o) && o.type === r && (n = o.props.children ?? null);
|
|
11027
11041
|
}), n;
|
|
11028
11042
|
}
|
|
11029
11043
|
function hc(t) {
|
|
@@ -11041,12 +11055,12 @@ function hc(t) {
|
|
|
11041
11055
|
disableBackdropClose: p = !1,
|
|
11042
11056
|
lockBodyScroll: g = !0,
|
|
11043
11057
|
children: b
|
|
11044
|
-
} = t, [k, x] =
|
|
11058
|
+
} = t, [k, x] = T(i), M = o ?? k, A = Le("md") ? M : "fullscreen", C = q(
|
|
11045
11059
|
(K) => {
|
|
11046
11060
|
o === void 0 && x(K), l == null || l(K);
|
|
11047
11061
|
},
|
|
11048
11062
|
[o, l]
|
|
11049
|
-
), F =
|
|
11063
|
+
), F = le(null);
|
|
11050
11064
|
J(() => {
|
|
11051
11065
|
if (!(!r || !g))
|
|
11052
11066
|
return F.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
|
|
@@ -11063,10 +11077,10 @@ function hc(t) {
|
|
|
11063
11077
|
() => Ht(b, Hr),
|
|
11064
11078
|
[b]
|
|
11065
11079
|
), R = ge(
|
|
11066
|
-
() => Ht(b,
|
|
11080
|
+
() => Ht(b, Tr),
|
|
11067
11081
|
[b]
|
|
11068
11082
|
), W = ge(
|
|
11069
|
-
() => Ht(b,
|
|
11083
|
+
() => Ht(b, Vr),
|
|
11070
11084
|
[b]
|
|
11071
11085
|
), E = ge(
|
|
11072
11086
|
() => Ht(b, Nr),
|
|
@@ -11084,7 +11098,7 @@ function hc(t) {
|
|
|
11084
11098
|
}, P = () => {
|
|
11085
11099
|
p || n();
|
|
11086
11100
|
};
|
|
11087
|
-
return typeof document > "u" ? null :
|
|
11101
|
+
return typeof document > "u" ? null : zr(
|
|
11088
11102
|
/* @__PURE__ */ d(
|
|
11089
11103
|
"div",
|
|
11090
11104
|
{
|
|
@@ -11113,7 +11127,7 @@ function hc(t) {
|
|
|
11113
11127
|
className: Re["lyd-close-btn"],
|
|
11114
11128
|
onClick: n,
|
|
11115
11129
|
"aria-label": "Close dialog",
|
|
11116
|
-
children: /* @__PURE__ */ e(
|
|
11130
|
+
children: /* @__PURE__ */ e(z, { name: "Cross", size: "md" })
|
|
11117
11131
|
}
|
|
11118
11132
|
)
|
|
11119
11133
|
] })
|
|
@@ -11132,8 +11146,8 @@ function hc(t) {
|
|
|
11132
11146
|
}
|
|
11133
11147
|
const Ut = hc;
|
|
11134
11148
|
Ut.Header = Hr;
|
|
11135
|
-
Ut.Body =
|
|
11136
|
-
Ut.Aside =
|
|
11149
|
+
Ut.Body = Tr;
|
|
11150
|
+
Ut.Aside = Vr;
|
|
11137
11151
|
Ut.Footer = Nr;
|
|
11138
11152
|
function Ns({ url: t, filename: r, onClose: n }) {
|
|
11139
11153
|
return J(() => {
|
|
@@ -11234,7 +11248,7 @@ function Ns({ url: t, filename: r, onClose: n }) {
|
|
|
11234
11248
|
);
|
|
11235
11249
|
}
|
|
11236
11250
|
const $s = (t) => {
|
|
11237
|
-
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, { useSearchParams: o } =
|
|
11251
|
+
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, { useSearchParams: o } = nt(), [i, l] = o(), c = Pt(i.toString());
|
|
11238
11252
|
return {
|
|
11239
11253
|
activeTab: c[n] ? parseInt(c[n]) : r,
|
|
11240
11254
|
handleTabChange: (u) => {
|
|
@@ -11251,7 +11265,7 @@ function js({
|
|
|
11251
11265
|
menuConfig: r,
|
|
11252
11266
|
formatTitle: n
|
|
11253
11267
|
}) {
|
|
11254
|
-
const { useLocation: o } =
|
|
11268
|
+
const { useLocation: o } = nt(), i = o();
|
|
11255
11269
|
J(() => {
|
|
11256
11270
|
let l = null, c = null;
|
|
11257
11271
|
for (const u of r) {
|
|
@@ -11268,7 +11282,7 @@ function js({
|
|
|
11268
11282
|
}, [i.pathname]);
|
|
11269
11283
|
}
|
|
11270
11284
|
const _s = () => {
|
|
11271
|
-
const { useSearchParams: t, useParams: r, useLocation: n } =
|
|
11285
|
+
const { useSearchParams: t, useParams: r, useLocation: n } = nt(), [o, i] = t(), l = Pt(o.toString()), c = r(), s = n(), a = c.id;
|
|
11272
11286
|
return {
|
|
11273
11287
|
// query params
|
|
11274
11288
|
setSearchParams: i,
|
|
@@ -11329,10 +11343,10 @@ export {
|
|
|
11329
11343
|
Wn as FLOATING_FOOTER_HEIGHT_VAR,
|
|
11330
11344
|
ts as FilterBar,
|
|
11331
11345
|
So as FilterDrawer,
|
|
11332
|
-
|
|
11346
|
+
zs as FloatingFooter,
|
|
11333
11347
|
Is as ForbiddenPage,
|
|
11334
11348
|
Es as Form,
|
|
11335
|
-
|
|
11349
|
+
Ts as FullSection,
|
|
11336
11350
|
_c as HeaderLeftSlot,
|
|
11337
11351
|
Pi as HeaderLeftSlotOutlet,
|
|
11338
11352
|
_i as HeaderLeftSlotProvider,
|
|
@@ -11341,12 +11355,12 @@ export {
|
|
|
11341
11355
|
Hl as InputFile,
|
|
11342
11356
|
ql as InputImage,
|
|
11343
11357
|
Ut as LayoutDialog,
|
|
11344
|
-
|
|
11345
|
-
|
|
11358
|
+
Vr as LayoutDialogAside,
|
|
11359
|
+
Tr as LayoutDialogBody,
|
|
11346
11360
|
Nr as LayoutDialogFooter,
|
|
11347
11361
|
Hr as LayoutDialogHeader,
|
|
11348
11362
|
Uc as ModuleSwitcher,
|
|
11349
|
-
|
|
11363
|
+
Ji as ModuleSwitcherModal,
|
|
11350
11364
|
Rs as NotFoundPage,
|
|
11351
11365
|
Qc as PageLayout,
|
|
11352
11366
|
Gt as Pressable,
|
|
@@ -11355,7 +11369,7 @@ export {
|
|
|
11355
11369
|
Yc as Section,
|
|
11356
11370
|
_n as SectionFooter,
|
|
11357
11371
|
jn as SectionHeader,
|
|
11358
|
-
|
|
11372
|
+
Vs as SelectButton,
|
|
11359
11373
|
Os as ServerErrorPage,
|
|
11360
11374
|
Ms as SidePanel,
|
|
11361
11375
|
Ls as SidePanelItem,
|
|
@@ -11364,7 +11378,7 @@ export {
|
|
|
11364
11378
|
Gi as SidebarGroupSlotOutlet,
|
|
11365
11379
|
Zi as SidebarGroupSlotProvider,
|
|
11366
11380
|
ji as SidebarHeaderSlot,
|
|
11367
|
-
|
|
11381
|
+
Ti as SidebarProvider,
|
|
11368
11382
|
Ni as StarasiaRouterProvider,
|
|
11369
11383
|
ul as TableFooter,
|
|
11370
11384
|
al as TableHeader,
|
|
@@ -11373,7 +11387,7 @@ export {
|
|
|
11373
11387
|
sl as TableWrapper,
|
|
11374
11388
|
Fs as ToggleStatus,
|
|
11375
11389
|
Ye as Typography,
|
|
11376
|
-
|
|
11390
|
+
Bs as VerticalField,
|
|
11377
11391
|
Zc as clearModuleSelection,
|
|
11378
11392
|
ss as createInitialFromUserName,
|
|
11379
11393
|
fs as cssVars,
|
|
@@ -11419,8 +11433,8 @@ export {
|
|
|
11419
11433
|
$n as useModuleSelection,
|
|
11420
11434
|
$e as useRouteInfo,
|
|
11421
11435
|
_s as useRouteParams,
|
|
11422
|
-
|
|
11423
|
-
|
|
11436
|
+
nt as useRouterAdapter,
|
|
11437
|
+
Vi as useSidebar,
|
|
11424
11438
|
Hi as useSidebarBadges,
|
|
11425
11439
|
$s as useTabState,
|
|
11426
11440
|
cs as useTableSortApiParams
|