@starasia/admin 12.9.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/index.cjs.js +5 -5
- package/dist/index.es.js +798 -778
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
export * from "@starasia/alert";
|
|
2
|
-
import { Badges as St, Badge as
|
|
2
|
+
import { Badges as St, Badge as xi } from "@starasia/badges";
|
|
3
3
|
export * from "@starasia/badges";
|
|
4
4
|
import { Box as f } from "@starasia/box";
|
|
5
5
|
export * from "@starasia/box";
|
|
6
|
-
import { Breadcrumb as
|
|
6
|
+
import { Breadcrumb as vi, BreadcrumbItem as rn, BreadcrumbLink as Ci } from "@starasia/breadcrumb";
|
|
7
7
|
export * from "@starasia/breadcrumb";
|
|
8
8
|
import { Button as _ } from "@starasia/button";
|
|
9
9
|
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
|
-
import { Drawer as
|
|
15
|
+
import { Drawer as An } from "@starasia/drawer";
|
|
16
16
|
export * from "@starasia/drawer";
|
|
17
17
|
import { Dropdown as _t } from "@starasia/dropdown";
|
|
18
18
|
export * from "@starasia/dropdown";
|
|
19
|
-
import { useMediaQuery as Le, useDebounce as
|
|
19
|
+
import { useMediaQuery as Le, useDebounce as wi } from "@starasia/hooks";
|
|
20
20
|
export * from "@starasia/hooks";
|
|
21
21
|
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
|
|
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
|
-
import { Textarea as
|
|
34
|
+
import { Textarea as Fi } from "@starasia/textarea";
|
|
35
35
|
export * from "@starasia/textarea";
|
|
36
|
-
import { useTheme as
|
|
36
|
+
import { useTheme as Ei, ThemeProvider as nn, useColor as Li } from "@starasia/theme";
|
|
37
37
|
export * from "@starasia/theme";
|
|
38
38
|
export * from "@starasia/toast";
|
|
39
39
|
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
|
-
import { Radio as
|
|
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";
|
|
@@ -59,10 +59,10 @@ 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
|
|
64
|
-
import
|
|
65
|
-
const
|
|
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
|
+
import Ai from "react-easy-crop";
|
|
65
|
+
const Ri = {
|
|
66
66
|
menus: [],
|
|
67
67
|
menuBottom: void 0,
|
|
68
68
|
logo: "",
|
|
@@ -70,15 +70,15 @@ const Ai = {
|
|
|
70
70
|
userData: null,
|
|
71
71
|
setUserData: () => {
|
|
72
72
|
}
|
|
73
|
-
},
|
|
74
|
-
const [r, n] =
|
|
73
|
+
}, In = bt(Ri), On = () => dt(In), Ii = (t) => {
|
|
74
|
+
const [r, n] = T(
|
|
75
75
|
(t == null ? void 0 : t.initialUserData) || null
|
|
76
76
|
);
|
|
77
77
|
return {
|
|
78
78
|
userData: r,
|
|
79
79
|
setUserData: n
|
|
80
80
|
};
|
|
81
|
-
},
|
|
81
|
+
}, Hn = bt({
|
|
82
82
|
badges: {},
|
|
83
83
|
setBadge: () => {
|
|
84
84
|
},
|
|
@@ -86,8 +86,8 @@ const Ai = {
|
|
|
86
86
|
},
|
|
87
87
|
clearBadge: () => {
|
|
88
88
|
}
|
|
89
|
-
}),
|
|
90
|
-
const [r, n] =
|
|
89
|
+
}), Oi = ({ children: t }) => {
|
|
90
|
+
const [r, n] = T({}), o = q(
|
|
91
91
|
(s) => {
|
|
92
92
|
n(
|
|
93
93
|
(a) => typeof s == "function" ? s(a) : s
|
|
@@ -112,11 +112,11 @@ const Ai = {
|
|
|
112
112
|
() => ({ badges: r, setBadge: i, setBadges: o, clearBadge: l }),
|
|
113
113
|
[r, i, o, l]
|
|
114
114
|
);
|
|
115
|
-
return /* @__PURE__ */ e(
|
|
116
|
-
},
|
|
115
|
+
return /* @__PURE__ */ e(Hn.Provider, { value: c, children: t });
|
|
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 Ai = {
|
|
|
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,18 +179,18 @@ const Ai = {
|
|
|
179
179
|
b
|
|
180
180
|
]
|
|
181
181
|
);
|
|
182
|
-
return /* @__PURE__ */ e(
|
|
183
|
-
}, Vi = () => dt(
|
|
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(Vn.Provider, { value: t, children: r }),
|
|
186
|
+
}) => /* @__PURE__ */ e(Vn.Provider, { value: t, children: r }), nt = () => {
|
|
187
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'."
|
|
191
191
|
);
|
|
192
192
|
return t;
|
|
193
|
-
},
|
|
193
|
+
}, $i = ({
|
|
194
194
|
router: t,
|
|
195
195
|
routerAdapter: r,
|
|
196
196
|
menus: n = [],
|
|
@@ -200,9 +200,9 @@ const Ai = {
|
|
|
200
200
|
initialUserData: c,
|
|
201
201
|
theme: s
|
|
202
202
|
}) => {
|
|
203
|
-
const a =
|
|
204
|
-
return /* @__PURE__ */ e(
|
|
205
|
-
|
|
203
|
+
const a = Ii({ initialUserData: c }), { theme: u } = Ei();
|
|
204
|
+
return /* @__PURE__ */ e(Ni, { adapter: r, children: /* @__PURE__ */ e(
|
|
205
|
+
In.Provider,
|
|
206
206
|
{
|
|
207
207
|
value: {
|
|
208
208
|
logo: i,
|
|
@@ -212,11 +212,11 @@ const Ai = {
|
|
|
212
212
|
setUserData: a.setUserData,
|
|
213
213
|
menuBottom: o
|
|
214
214
|
},
|
|
215
|
-
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
|
-
},
|
|
219
|
-
function
|
|
218
|
+
}, jc = Xe($i);
|
|
219
|
+
function ji({
|
|
220
220
|
collapsed: t = !1,
|
|
221
221
|
children: r
|
|
222
222
|
}) {
|
|
@@ -254,8 +254,8 @@ function $i({
|
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
256
|
const Br = bt(null);
|
|
257
|
-
function
|
|
258
|
-
const [r, n] =
|
|
257
|
+
function _i({ children: t }) {
|
|
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
|
{
|
|
@@ -273,7 +273,7 @@ function ji({ children: t }) {
|
|
|
273
273
|
}
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Pi({ children: t }) {
|
|
277
277
|
const r = dt(Br);
|
|
278
278
|
return r ? /* @__PURE__ */ d(re, { children: [
|
|
279
279
|
/* @__PURE__ */ e("div", { ref: r.setPrependNode, style: { display: "contents" } }),
|
|
@@ -281,7 +281,7 @@ function _i({ children: t }) {
|
|
|
281
281
|
/* @__PURE__ */ e("div", { ref: r.setAppendNode, style: { display: "contents" } })
|
|
282
282
|
] }) : /* @__PURE__ */ e(re, { children: t });
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function _c({
|
|
285
285
|
children: t,
|
|
286
286
|
mode: r = "append"
|
|
287
287
|
}) {
|
|
@@ -297,8 +297,8 @@ function $c({
|
|
|
297
297
|
return o ? zr(t, o) : null;
|
|
298
298
|
}
|
|
299
299
|
const Ar = bt(null);
|
|
300
|
-
function
|
|
301
|
-
const [r, n] =
|
|
300
|
+
function Zi({ children: t }) {
|
|
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,
|
|
@@ -309,8 +309,8 @@ function Pi({ children: t }) {
|
|
|
309
309
|
);
|
|
310
310
|
return /* @__PURE__ */ e(Ar.Provider, { value: s, children: t });
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
const n = dt(Ar), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i =
|
|
312
|
+
function Gi({ slotKey: t, fallback: r }) {
|
|
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) => {
|
|
@@ -322,8 +322,8 @@ function Zi({ slotKey: t, fallback: r }) {
|
|
|
322
322
|
);
|
|
323
323
|
return /* @__PURE__ */ e(re, { children: o ? /* @__PURE__ */ e("div", { ref: l, style: { display: "contents" } }) : r });
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
const n = dt(Ar), o =
|
|
325
|
+
function Pc({ slotKey: t, children: r }) {
|
|
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);
|
|
@@ -342,14 +342,14 @@ function on() {
|
|
|
342
342
|
const r = Number(t);
|
|
343
343
|
return Number.isFinite(r) ? r : null;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Nn(t) {
|
|
346
346
|
typeof window > "u" || (t === null ? window.localStorage.removeItem(Nt) : window.localStorage.setItem(Nt, String(t)), window.dispatchEvent(new CustomEvent(kr, { detail: t })));
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
|
|
348
|
+
function Zc() {
|
|
349
|
+
Nn(null);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
const [t, r] =
|
|
351
|
+
function $n() {
|
|
352
|
+
const [t, r] = T(
|
|
353
353
|
() => on()
|
|
354
354
|
);
|
|
355
355
|
return J(() => {
|
|
@@ -362,7 +362,7 @@ function Nn() {
|
|
|
362
362
|
window.removeEventListener(kr, o), window.removeEventListener("storage", i);
|
|
363
363
|
};
|
|
364
364
|
}, []), { selectedGroupId: t, setSelectedGroupId: (o) => {
|
|
365
|
-
|
|
365
|
+
Nn(o), r(o);
|
|
366
366
|
} };
|
|
367
367
|
}
|
|
368
368
|
let Bt = 0, ut = !1, ln = /* @__PURE__ */ new Set();
|
|
@@ -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",
|
|
@@ -400,7 +443,7 @@ const cn = () => /* @__PURE__ */ d(
|
|
|
400
443
|
cursor: "pointer",
|
|
401
444
|
textAlign: "left"
|
|
402
445
|
};
|
|
403
|
-
function
|
|
446
|
+
function Gc({
|
|
404
447
|
children: t,
|
|
405
448
|
headerLeftSlot: r,
|
|
406
449
|
profile: n,
|
|
@@ -416,18 +459,18 @@ function Pc({
|
|
|
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
|
-
} = Vi(), [ne, $] =
|
|
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;
|
|
@@ -442,13 +485,13 @@ function Pc({
|
|
|
442
485
|
ut = !1;
|
|
443
486
|
}));
|
|
444
487
|
};
|
|
445
|
-
|
|
488
|
+
rt(() => {
|
|
446
489
|
ut = !0, ze();
|
|
447
490
|
const w = setTimeout(() => {
|
|
448
491
|
ut = !1;
|
|
449
492
|
}, 300);
|
|
450
493
|
return () => clearTimeout(w);
|
|
451
|
-
}, []),
|
|
494
|
+
}, []), rt(() => {
|
|
452
495
|
C.menus.length > 0 && (Bt > 0 ? ze() : requestAnimationFrame(() => {
|
|
453
496
|
var B;
|
|
454
497
|
const w = (B = pe.current) == null ? void 0 : B.querySelector(
|
|
@@ -507,7 +550,7 @@ function Pc({
|
|
|
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
|
|
553
|
+
const ot = (w) => {
|
|
511
554
|
j((B) => {
|
|
512
555
|
const O = new Set(B);
|
|
513
556
|
return O.has(w) ? O.delete(w) : O.add(w), O;
|
|
@@ -530,7 +573,7 @@ function Pc({
|
|
|
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 B = w.children && w.children.length > 0, O =
|
|
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",
|
|
@@ -545,7 +588,7 @@ function Pc({
|
|
|
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
|
},
|
|
@@ -606,19 +649,10 @@ function Pc({
|
|
|
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(
|
|
@@ -749,21 +783,7 @@ function Pc({
|
|
|
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
|
{
|
|
@@ -784,7 +804,7 @@ function Pc({
|
|
|
784
804
|
})()
|
|
785
805
|
] }, w.id);
|
|
786
806
|
};
|
|
787
|
-
return /* @__PURE__ */ e(
|
|
807
|
+
return /* @__PURE__ */ e(Zi, { children: /* @__PURE__ */ d(_i, { children: [
|
|
788
808
|
/* @__PURE__ */ d(
|
|
789
809
|
"div",
|
|
790
810
|
{
|
|
@@ -989,7 +1009,7 @@ function Pc({
|
|
|
989
1009
|
}
|
|
990
1010
|
),
|
|
991
1011
|
s && /* @__PURE__ */ e(
|
|
992
|
-
|
|
1012
|
+
ji,
|
|
993
1013
|
{
|
|
994
1014
|
collapsed: E ? !1 : P,
|
|
995
1015
|
children: s
|
|
@@ -1050,7 +1070,7 @@ function Pc({
|
|
|
1050
1070
|
}
|
|
1051
1071
|
),
|
|
1052
1072
|
/* @__PURE__ */ e("div", { style: { paddingLeft: "1rem", paddingRight: "1rem", display: "flex", flexDirection: "column", gap: "var(--sa-spacing-xs, 0.25rem)" }, children: w.slotKey ? /* @__PURE__ */ e(
|
|
1053
|
-
|
|
1073
|
+
Gi,
|
|
1054
1074
|
{
|
|
1055
1075
|
slotKey: w.slotKey,
|
|
1056
1076
|
fallback: w.items.map((B) => Ue(B))
|
|
@@ -1129,7 +1149,7 @@ function Pc({
|
|
|
1129
1149
|
)
|
|
1130
1150
|
}
|
|
1131
1151
|
),
|
|
1132
|
-
/* @__PURE__ */ e(
|
|
1152
|
+
/* @__PURE__ */ e(Pi, { children: r })
|
|
1133
1153
|
] }),
|
|
1134
1154
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
1135
1155
|
a,
|
|
@@ -1217,7 +1237,7 @@ function Pc({
|
|
|
1217
1237
|
marginTop: "16px"
|
|
1218
1238
|
},
|
|
1219
1239
|
children: [
|
|
1220
|
-
/* @__PURE__ */ e(
|
|
1240
|
+
/* @__PURE__ */ e(Di, { children: /* @__PURE__ */ d(
|
|
1221
1241
|
"div",
|
|
1222
1242
|
{
|
|
1223
1243
|
style: {
|
|
@@ -1297,13 +1317,13 @@ function Pc({
|
|
|
1297
1317
|
]
|
|
1298
1318
|
}
|
|
1299
1319
|
) }),
|
|
1300
|
-
(m && m.length > 0 || p) && /* @__PURE__ */ d(
|
|
1320
|
+
(m && m.length > 0 || p) && /* @__PURE__ */ d(Te, { children: [
|
|
1301
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
|
},
|
|
@@ -1324,7 +1344,7 @@ function Pc({
|
|
|
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
|
},
|
|
@@ -1388,9 +1408,9 @@ function Pc({
|
|
|
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
|
] }) }) })
|
|
@@ -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
|
{
|
|
@@ -1564,14 +1584,14 @@ 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 } =
|
|
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(
|
|
1575
1595
|
z,
|
|
1576
1596
|
{
|
|
1577
1597
|
name: n || "ChevronLeft",
|
|
@@ -1587,15 +1607,15 @@ const Gt = Wr(
|
|
|
1587
1607
|
), b = m != null && m.to ? /* @__PURE__ */ e(l, { to: m.to, replace: !0, style: { textDecoration: "none" }, children: g }) : m != null && m.onClick ? /* @__PURE__ */ e(Gt, { onClick: m.onClick, children: g }) : g;
|
|
1588
1608
|
return /* @__PURE__ */ d(f, { direction: "row", gap: "xs", align: "center", children: [
|
|
1589
1609
|
b,
|
|
1590
|
-
/* @__PURE__ */ e(
|
|
1610
|
+
/* @__PURE__ */ e(vi, { separator: r, size: "md", children: t.map((k, x) => {
|
|
1591
1611
|
const M = x === t.length - 1;
|
|
1592
|
-
return k.to && !M ? /* @__PURE__ */ e(rn, { children: /* @__PURE__ */ e(l, { to: k.to, children: k.label }) }, x) : /* @__PURE__ */ e(rn, { currentPage: M, children: /* @__PURE__ */ e(
|
|
1612
|
+
return k.to && !M ? /* @__PURE__ */ e(rn, { children: /* @__PURE__ */ e(l, { to: k.to, children: k.label }) }, x) : /* @__PURE__ */ e(rn, { currentPage: M, children: /* @__PURE__ */ e(Ci, { onClick: M ? void 0 : k.onClick, children: k.label }) }, x);
|
|
1593
1613
|
}) })
|
|
1594
1614
|
] });
|
|
1595
|
-
},
|
|
1596
|
-
const { Link: r } =
|
|
1615
|
+
}, qc = (t) => {
|
|
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 qi({
|
|
|
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 qi({
|
|
|
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
|
|
@@ -1750,11 +1770,11 @@ function qi({
|
|
|
1750
1770
|
}
|
|
1751
1771
|
);
|
|
1752
1772
|
}
|
|
1753
|
-
function
|
|
1773
|
+
function Uc({
|
|
1754
1774
|
onSelect: t,
|
|
1755
1775
|
"aria-label": r = "Pilih module"
|
|
1756
1776
|
} = {}) {
|
|
1757
|
-
const n =
|
|
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;
|
|
@@ -1807,7 +1827,7 @@ function Gc({
|
|
|
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 Gc({
|
|
|
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 Ui = (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 Ui = (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,
|
|
@@ -1868,7 +1888,7 @@ const Ui = (t, r) => {
|
|
|
1868
1888
|
...o
|
|
1869
1889
|
},
|
|
1870
1890
|
`field-group-field-${i}`
|
|
1871
|
-
)) })),
|
|
1891
|
+
)) })), Jc = Xe(
|
|
1872
1892
|
({
|
|
1873
1893
|
maxRow: t = 0,
|
|
1874
1894
|
maxColumn: r = 2,
|
|
@@ -1878,7 +1898,7 @@ const Ui = (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 Ui = (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 Ui = (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
|
{
|
|
@@ -1966,7 +1986,7 @@ const Ui = (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 Ui = (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 Ui = (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
2021
|
iconLeft: ne ? /* @__PURE__ */ e(z, { name: ne, size: "md" }) : void 0,
|
|
2002
|
-
onClick:
|
|
2022
|
+
onClick: V,
|
|
2003
2023
|
...$,
|
|
2004
2024
|
children: Y
|
|
2005
2025
|
},
|
|
@@ -2019,7 +2039,7 @@ const Ui = (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,
|
|
@@ -2027,7 +2047,7 @@ const Ui = (t, r) => {
|
|
|
2027
2047
|
intent: oe ? "danger" : void 0,
|
|
2028
2048
|
disabled: $ == null ? void 0 : $.disabled,
|
|
2029
2049
|
startIcon: ne ? /* @__PURE__ */ e(z, { name: ne }) : void 0,
|
|
2030
|
-
onClick:
|
|
2050
|
+
onClick: V,
|
|
2031
2051
|
children: Y
|
|
2032
2052
|
},
|
|
2033
2053
|
`action-${j}`
|
|
@@ -2035,7 +2055,7 @@ const Ui = (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 Ui = (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,10 +2093,10 @@ const Ui = (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: [
|
|
@@ -2091,7 +2111,7 @@ const Ui = (t, r) => {
|
|
|
2091
2111
|
}
|
|
2092
2112
|
)
|
|
2093
2113
|
] }),
|
|
2094
|
-
o && /* @__PURE__ */ e(
|
|
2114
|
+
o && /* @__PURE__ */ e(xi, { border: !0, size: "lg", text: o, ...g })
|
|
2095
2115
|
] }) : r : null,
|
|
2096
2116
|
W()
|
|
2097
2117
|
]
|
|
@@ -2105,10 +2125,10 @@ const Ui = (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 Ui = (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,22 +2202,22 @@ const Ui = (t, r) => {
|
|
|
2182
2202
|
},
|
|
2183
2203
|
F.pathname
|
|
2184
2204
|
);
|
|
2185
|
-
},
|
|
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
2217
|
minWidth: s,
|
|
2198
2218
|
maxWidth: a
|
|
2199
2219
|
}, u) => /* @__PURE__ */ e(
|
|
2200
|
-
|
|
2220
|
+
An,
|
|
2201
2221
|
{
|
|
2202
2222
|
blur: n,
|
|
2203
2223
|
isShow: r,
|
|
@@ -2234,7 +2254,7 @@ const Ui = (t, r) => {
|
|
|
2234
2254
|
] })
|
|
2235
2255
|
}
|
|
2236
2256
|
)
|
|
2237
|
-
),
|
|
2257
|
+
), jn = Xe(
|
|
2238
2258
|
({ children: t, borderBottom: r = !0, padding: n = !0 }) => {
|
|
2239
2259
|
const o = Le("lg");
|
|
2240
2260
|
return /* @__PURE__ */ e(
|
|
@@ -2251,7 +2271,7 @@ const Ui = (t, r) => {
|
|
|
2251
2271
|
}
|
|
2252
2272
|
);
|
|
2253
2273
|
}
|
|
2254
|
-
),
|
|
2274
|
+
), _n = Xe(
|
|
2255
2275
|
({ children: t, borderTop: r = !0, padding: n = !0 }) => {
|
|
2256
2276
|
const o = Le("lg");
|
|
2257
2277
|
return /* @__PURE__ */ e(
|
|
@@ -2268,7 +2288,7 @@ const Ui = (t, r) => {
|
|
|
2268
2288
|
}
|
|
2269
2289
|
);
|
|
2270
2290
|
}
|
|
2271
|
-
),
|
|
2291
|
+
), no = Xe(
|
|
2272
2292
|
({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
2273
2293
|
f,
|
|
2274
2294
|
{
|
|
@@ -2281,7 +2301,7 @@ const Ui = (t, r) => {
|
|
|
2281
2301
|
children: t
|
|
2282
2302
|
}
|
|
2283
2303
|
)
|
|
2284
|
-
),
|
|
2304
|
+
), Yc = Xe(
|
|
2285
2305
|
({
|
|
2286
2306
|
children: t,
|
|
2287
2307
|
title: r,
|
|
@@ -2336,28 +2356,28 @@ const Ui = (t, r) => {
|
|
|
2336
2356
|
...(s == null ? void 0 : s.style) ?? {}
|
|
2337
2357
|
},
|
|
2338
2358
|
children: [
|
|
2339
|
-
i !== null && x ? /* @__PURE__ */ e(
|
|
2340
|
-
/* @__PURE__ */ e(
|
|
2341
|
-
l ? /* @__PURE__ */ e(
|
|
2359
|
+
i !== null && x ? /* @__PURE__ */ e(jn, { ...u, children: k() }) : null,
|
|
2360
|
+
/* @__PURE__ */ e(no, { ...a, children: t }),
|
|
2361
|
+
l ? /* @__PURE__ */ e(_n, { ...m, children: l }) : null
|
|
2342
2362
|
]
|
|
2343
2363
|
}
|
|
2344
2364
|
);
|
|
2345
2365
|
}
|
|
2346
|
-
),
|
|
2347
|
-
H1:
|
|
2348
|
-
H2:
|
|
2349
|
-
H3:
|
|
2350
|
-
H4:
|
|
2351
|
-
H5:
|
|
2352
|
-
H6:
|
|
2353
|
-
SubH1:
|
|
2354
|
-
SubH2:
|
|
2355
|
-
SubH3:
|
|
2356
|
-
Body1:
|
|
2357
|
-
Body2:
|
|
2358
|
-
Body3:
|
|
2366
|
+
), io = (t) => /* @__PURE__ */ e(D, { variant: "h1", children: t.children, ...t.props }), oo = (t) => /* @__PURE__ */ e(D, { variant: "h2", children: t.children, ...t.props }), lo = (t) => /* @__PURE__ */ e(D, { variant: "h3", children: t.children, ...t.props }), co = (t) => /* @__PURE__ */ e(D, { variant: "h4", children: t.children, ...t.props }), so = (t) => /* @__PURE__ */ e(D, { variant: "h5", children: t.children, ...t.props }), ao = (t) => /* @__PURE__ */ e(D, { variant: "h6", children: t.children, ...t.props }), uo = (t) => /* @__PURE__ */ e(D, { variant: "sub-h1", children: t.children, ...t.props }), ho = (t) => /* @__PURE__ */ e(D, { variant: "sub-h2", children: t.children, ...t.props }), fo = (t) => /* @__PURE__ */ e(D, { variant: "sub-h3", children: t.children, ...t.props }), mo = (t) => /* @__PURE__ */ e(D, { variant: "body-1", children: t.children, ...t.props }), go = (t) => /* @__PURE__ */ e(D, { variant: "body-2", children: t.children, ...t.props }), po = (t) => /* @__PURE__ */ e(D, { variant: "body-3", children: t.children, ...t.props }), Ye = {
|
|
2367
|
+
H1: io,
|
|
2368
|
+
H2: oo,
|
|
2369
|
+
H3: lo,
|
|
2370
|
+
H4: co,
|
|
2371
|
+
H5: so,
|
|
2372
|
+
H6: ao,
|
|
2373
|
+
SubH1: uo,
|
|
2374
|
+
SubH2: ho,
|
|
2375
|
+
SubH3: fo,
|
|
2376
|
+
Body1: mo,
|
|
2377
|
+
Body2: go,
|
|
2378
|
+
Body3: po
|
|
2359
2379
|
}, $e = () => {
|
|
2360
|
-
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;
|
|
2361
2381
|
return {
|
|
2362
2382
|
// query params
|
|
2363
2383
|
setSearchParams: i,
|
|
@@ -2374,7 +2394,7 @@ const Ui = (t, r) => {
|
|
|
2374
2394
|
id: a,
|
|
2375
2395
|
hasId: !!a
|
|
2376
2396
|
};
|
|
2377
|
-
},
|
|
2397
|
+
}, yo = (t) => JSON.stringify(t), bo = (t) => JSON.stringify(t), xo = (t) => JSON.stringify(t), vo = (t) => JSON.stringify(t), Co = (t) => t, wo = (t) => JSON.stringify(t), $t = ({
|
|
2378
2398
|
value: t,
|
|
2379
2399
|
name: r,
|
|
2380
2400
|
type: n,
|
|
@@ -2389,23 +2409,23 @@ const Ui = (t, r) => {
|
|
|
2389
2409
|
let u;
|
|
2390
2410
|
switch (n) {
|
|
2391
2411
|
case "search":
|
|
2392
|
-
u =
|
|
2412
|
+
u = Co(t);
|
|
2393
2413
|
break;
|
|
2394
2414
|
case "dropdown":
|
|
2395
2415
|
case "dropdown-multiple":
|
|
2396
|
-
u =
|
|
2416
|
+
u = yo(t);
|
|
2397
2417
|
break;
|
|
2398
2418
|
case "radio":
|
|
2399
|
-
u =
|
|
2419
|
+
u = bo(t);
|
|
2400
2420
|
break;
|
|
2401
2421
|
case "date-range":
|
|
2402
|
-
u =
|
|
2422
|
+
u = xo(t);
|
|
2403
2423
|
break;
|
|
2404
2424
|
case "advanced-date-range":
|
|
2405
|
-
u =
|
|
2425
|
+
u = wo(t);
|
|
2406
2426
|
break;
|
|
2407
2427
|
case "date":
|
|
2408
|
-
u =
|
|
2428
|
+
u = vo(t);
|
|
2409
2429
|
break;
|
|
2410
2430
|
default:
|
|
2411
2431
|
u = t;
|
|
@@ -2436,7 +2456,7 @@ const Ui = (t, r) => {
|
|
|
2436
2456
|
}) => {
|
|
2437
2457
|
const i = n.get(r) || void 0, l = i && typeof i == "string" ? JSON.parse(i) : void 0, c = l ? l[t] : void 0;
|
|
2438
2458
|
return o === "label" && c ? JSON.parse(c)[0].label : o === "value" && c ? JSON.parse(c)[0].value : c;
|
|
2439
|
-
},
|
|
2459
|
+
}, Do = ({
|
|
2440
2460
|
name: t,
|
|
2441
2461
|
filterKey: r = "filter",
|
|
2442
2462
|
searchParams: n,
|
|
@@ -2444,7 +2464,7 @@ const Ui = (t, r) => {
|
|
|
2444
2464
|
}) => {
|
|
2445
2465
|
const i = n.get(r) || void 0, l = i && typeof i == "string" ? JSON.parse(i) : void 0, c = l ? l[t] : void 0;
|
|
2446
2466
|
return o === "label" && c ? JSON.parse(c).map((s) => s.label) : o === "value" && c ? JSON.parse(c).map((s) => s.value) : o === "array" && c ? JSON.parse(c) : c;
|
|
2447
|
-
},
|
|
2467
|
+
}, Xc = ({
|
|
2448
2468
|
name: t,
|
|
2449
2469
|
filterKey: r = "filter",
|
|
2450
2470
|
searchParams: n,
|
|
@@ -2455,7 +2475,7 @@ const Ui = (t, r) => {
|
|
|
2455
2475
|
}, Rr = (t, r, n) => {
|
|
2456
2476
|
const o = r.get(n || "filter") || void 0, i = o && typeof o == "string" ? JSON.parse(o) : void 0;
|
|
2457
2477
|
return i ? i[t] : void 0;
|
|
2458
|
-
},
|
|
2478
|
+
}, Kc = ({
|
|
2459
2479
|
name: t,
|
|
2460
2480
|
filterKey: r = "filter",
|
|
2461
2481
|
searchParams: n
|
|
@@ -2465,28 +2485,28 @@ const Ui = (t, r) => {
|
|
|
2465
2485
|
start: l ? JSON.parse(l).from : void 0,
|
|
2466
2486
|
end: l ? JSON.parse(l).to : void 0
|
|
2467
2487
|
};
|
|
2468
|
-
},
|
|
2488
|
+
}, ko = ({
|
|
2469
2489
|
name: t,
|
|
2470
2490
|
filterKey: r = "filter",
|
|
2471
2491
|
searchParams: n
|
|
2472
2492
|
}) => {
|
|
2473
2493
|
const o = n.get(r || "filter") || void 0, i = o && typeof o == "string" ? JSON.parse(o) : void 0, l = i ? i[t] : void 0;
|
|
2474
2494
|
return l ? JSON.parse(l) : void 0;
|
|
2475
|
-
},
|
|
2495
|
+
}, es = (t, {
|
|
2476
2496
|
filterKey: r = "filter",
|
|
2477
2497
|
perPageKey: n = "perPage",
|
|
2478
2498
|
pageKey: o = "page"
|
|
2479
2499
|
}) => {
|
|
2480
2500
|
const i = t.get(r) || void 0, l = t.get(n) || void 0, c = t.get(o) || void 0;
|
|
2481
2501
|
return !!i || !!l || !!c;
|
|
2482
|
-
},
|
|
2502
|
+
}, So = ({
|
|
2483
2503
|
isOpen: t,
|
|
2484
2504
|
onClose: r,
|
|
2485
2505
|
filterKey: n,
|
|
2486
2506
|
pageKey: o,
|
|
2487
2507
|
filters: i
|
|
2488
2508
|
}) => {
|
|
2489
|
-
const { searchParams: l, setSearchParams: c, searchQueries: s } = $e(), [a, u] =
|
|
2509
|
+
const { searchParams: l, setSearchParams: c, searchQueries: s } = $e(), [a, u] = T({}), m = () => {
|
|
2490
2510
|
l.delete(n || "filter"), c(l);
|
|
2491
2511
|
}, p = (g, b) => {
|
|
2492
2512
|
switch (g.type) {
|
|
@@ -2510,7 +2530,7 @@ const Ui = (t, r) => {
|
|
|
2510
2530
|
return null;
|
|
2511
2531
|
}
|
|
2512
2532
|
};
|
|
2513
|
-
return /* @__PURE__ */ e(
|
|
2533
|
+
return /* @__PURE__ */ e(ro, { onHide: r, show: t || !1, children: /* @__PURE__ */ d(f, { direction: "column", gap: "md", children: [
|
|
2514
2534
|
/* @__PURE__ */ d(de, { direction: "row", justify: "space-between", align: "center", children: [
|
|
2515
2535
|
/* @__PURE__ */ e(f, { direction: "column", children: "Filter" }),
|
|
2516
2536
|
/* @__PURE__ */ e(
|
|
@@ -2525,7 +2545,7 @@ const Ui = (t, r) => {
|
|
|
2525
2545
|
] }),
|
|
2526
2546
|
i == null ? void 0 : i.map((g, b) => p(g, b))
|
|
2527
2547
|
] }) });
|
|
2528
|
-
},
|
|
2548
|
+
}, Fo = ({
|
|
2529
2549
|
searchKey: t = "q",
|
|
2530
2550
|
statusKey: r = "status",
|
|
2531
2551
|
searchPlaceholder: n = "Search",
|
|
@@ -2543,9 +2563,9 @@ const Ui = (t, r) => {
|
|
|
2543
2563
|
titleSearchLabel: k = "Work Order",
|
|
2544
2564
|
withTitleLabels: x = !1
|
|
2545
2565
|
}) => {
|
|
2546
|
-
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 = () => {
|
|
2547
2567
|
I((j) => j + 1);
|
|
2548
|
-
}, { 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 && !(() => {
|
|
2549
2569
|
if (Y)
|
|
2550
2570
|
try {
|
|
2551
2571
|
const j = JSON.parse(Y);
|
|
@@ -2554,7 +2574,7 @@ const Ui = (t, r) => {
|
|
|
2554
2574
|
console.error("Filter parameter is not a valid JSON:", j);
|
|
2555
2575
|
}
|
|
2556
2576
|
return !1;
|
|
2557
|
-
})()),
|
|
2577
|
+
})()), V = Le("md");
|
|
2558
2578
|
return J(() => {
|
|
2559
2579
|
N(P);
|
|
2560
2580
|
}, [P]), J(() => {
|
|
@@ -2587,7 +2607,7 @@ const Ui = (t, r) => {
|
|
|
2587
2607
|
{
|
|
2588
2608
|
gap: "md",
|
|
2589
2609
|
style: {
|
|
2590
|
-
flexDirection:
|
|
2610
|
+
flexDirection: V && b === "left" ? "row" : V && b === "right" ? "row-reverse" : "column"
|
|
2591
2611
|
},
|
|
2592
2612
|
align: "flex-end",
|
|
2593
2613
|
children: [
|
|
@@ -2634,7 +2654,7 @@ const Ui = (t, r) => {
|
|
|
2634
2654
|
}
|
|
2635
2655
|
}
|
|
2636
2656
|
),
|
|
2637
|
-
fullWidth: !
|
|
2657
|
+
fullWidth: !V,
|
|
2638
2658
|
onClick: () => C(!0),
|
|
2639
2659
|
children: S ? "Filter" : void 0
|
|
2640
2660
|
}
|
|
@@ -2704,7 +2724,7 @@ const Ui = (t, r) => {
|
|
|
2704
2724
|
direction: "column",
|
|
2705
2725
|
gap: "sm",
|
|
2706
2726
|
style: {
|
|
2707
|
-
width: u &&
|
|
2727
|
+
width: u && V ? u : V ? "310px" : ""
|
|
2708
2728
|
},
|
|
2709
2729
|
children: [
|
|
2710
2730
|
x && /* @__PURE__ */ d(Ye.SubH3, { children: [
|
|
@@ -2726,7 +2746,7 @@ const Ui = (t, r) => {
|
|
|
2726
2746
|
}
|
|
2727
2747
|
),
|
|
2728
2748
|
/* @__PURE__ */ e(
|
|
2729
|
-
|
|
2749
|
+
So,
|
|
2730
2750
|
{
|
|
2731
2751
|
isOpen: A,
|
|
2732
2752
|
onClose: () => C(!1),
|
|
@@ -2738,7 +2758,7 @@ const Ui = (t, r) => {
|
|
|
2738
2758
|
]
|
|
2739
2759
|
}
|
|
2740
2760
|
);
|
|
2741
|
-
},
|
|
2761
|
+
}, Eo = (t) => t === "checkbox-multiple" ? "dropdown-multiple" : t === "radio" ? "dropdown" : t === "date-compact" ? "date" : t;
|
|
2742
2762
|
function Ir({
|
|
2743
2763
|
configs: t,
|
|
2744
2764
|
filterKey: r = "filter",
|
|
@@ -2810,14 +2830,14 @@ function Ir({
|
|
|
2810
2830
|
case "dropdown-multiple":
|
|
2811
2831
|
case "checkbox-multiple":
|
|
2812
2832
|
case "radio":
|
|
2813
|
-
return
|
|
2833
|
+
return Do({
|
|
2814
2834
|
name: F.key,
|
|
2815
2835
|
get: "array",
|
|
2816
2836
|
searchParams: l,
|
|
2817
2837
|
filterKey: r
|
|
2818
2838
|
}) || [];
|
|
2819
2839
|
case "date": {
|
|
2820
|
-
const I =
|
|
2840
|
+
const I = ko({
|
|
2821
2841
|
name: F.key,
|
|
2822
2842
|
searchParams: l,
|
|
2823
2843
|
filterKey: r
|
|
@@ -2843,7 +2863,7 @@ function Ir({
|
|
|
2843
2863
|
$t({
|
|
2844
2864
|
value: I,
|
|
2845
2865
|
name: F.key,
|
|
2846
|
-
type:
|
|
2866
|
+
type: Eo(F.type),
|
|
2847
2867
|
searchQueries: s,
|
|
2848
2868
|
setSearchParams: c,
|
|
2849
2869
|
filterKey: r,
|
|
@@ -2874,7 +2894,7 @@ function Ir({
|
|
|
2874
2894
|
clearAll: A
|
|
2875
2895
|
};
|
|
2876
2896
|
}
|
|
2877
|
-
const
|
|
2897
|
+
const Pn = {
|
|
2878
2898
|
get(t) {
|
|
2879
2899
|
return ar.get(t) ?? null;
|
|
2880
2900
|
},
|
|
@@ -2896,7 +2916,7 @@ const _n = {
|
|
|
2896
2916
|
const i = t.hidden.filter((l) => n.has(l));
|
|
2897
2917
|
return { order: o, hidden: i };
|
|
2898
2918
|
};
|
|
2899
|
-
function
|
|
2919
|
+
function Lo({
|
|
2900
2920
|
columns: t,
|
|
2901
2921
|
scopeId: r,
|
|
2902
2922
|
storage: n,
|
|
@@ -2906,7 +2926,7 @@ function Fo({
|
|
|
2906
2926
|
const l = ge(
|
|
2907
2927
|
() => ({ order: t.map((W) => W.key), hidden: [] }),
|
|
2908
2928
|
[t]
|
|
2909
|
-
), 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(() => {
|
|
2910
2930
|
if (i && (i.order || i.hidden))
|
|
2911
2931
|
return s(i, t.map((W) => W.key));
|
|
2912
2932
|
if (c) {
|
|
@@ -2916,16 +2936,16 @@ function Fo({
|
|
|
2916
2936
|
return l;
|
|
2917
2937
|
}), m = t.map((W) => W.key).join("|");
|
|
2918
2938
|
J(() => u((W) => At(W, t)), [m]);
|
|
2919
|
-
const p =
|
|
2939
|
+
const p = le(a);
|
|
2920
2940
|
p.current = a;
|
|
2921
|
-
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);
|
|
2922
2942
|
J(() => {
|
|
2923
2943
|
if (g == null || b.current === g) return;
|
|
2924
2944
|
b.current = g;
|
|
2925
2945
|
const W = p.current, E = s(i, W.order);
|
|
2926
2946
|
E.order.join("|") === W.order.join("|") && E.hidden.join("|") === W.hidden.join("|") || (u(E), c && n.set(c, E));
|
|
2927
2947
|
}, [g, m]);
|
|
2928
|
-
const k =
|
|
2948
|
+
const k = le(!1);
|
|
2929
2949
|
J(() => {
|
|
2930
2950
|
k.current || (k.current = !0, o == null || o(a));
|
|
2931
2951
|
}, []);
|
|
@@ -2973,7 +2993,7 @@ function Fo({
|
|
|
2973
2993
|
applyState: I
|
|
2974
2994
|
};
|
|
2975
2995
|
}
|
|
2976
|
-
function
|
|
2996
|
+
function Mo({
|
|
2977
2997
|
scopeId: t,
|
|
2978
2998
|
storage: r,
|
|
2979
2999
|
snapshotKeys: n,
|
|
@@ -2981,7 +3001,7 @@ function Eo({
|
|
|
2981
3001
|
getColumns: i,
|
|
2982
3002
|
applyColumns: l
|
|
2983
3003
|
}) {
|
|
2984
|
-
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(
|
|
2985
3005
|
() => a ? r.get(a) || [] : []
|
|
2986
3006
|
), p = q(
|
|
2987
3007
|
(x) => {
|
|
@@ -3026,7 +3046,7 @@ function Eo({
|
|
|
3026
3046
|
applyView: k
|
|
3027
3047
|
};
|
|
3028
3048
|
}
|
|
3029
|
-
function
|
|
3049
|
+
function Wo(t, r) {
|
|
3030
3050
|
let n;
|
|
3031
3051
|
try {
|
|
3032
3052
|
n = JSON.parse(t);
|
|
@@ -3035,13 +3055,13 @@ function Lo(t, r) {
|
|
|
3035
3055
|
}
|
|
3036
3056
|
return !n || typeof n != "object" ? t : (delete n[r], Object.keys(n).length > 0 ? JSON.stringify(n) : void 0);
|
|
3037
3057
|
}
|
|
3038
|
-
function
|
|
3058
|
+
function mn(t, r, n) {
|
|
3039
3059
|
const o = t[r];
|
|
3040
3060
|
if (o == null) return;
|
|
3041
|
-
const i =
|
|
3061
|
+
const i = Wo(o, n);
|
|
3042
3062
|
i === void 0 ? delete t[r] : t[r] = i;
|
|
3043
3063
|
}
|
|
3044
|
-
function
|
|
3064
|
+
function zo({
|
|
3045
3065
|
scopeId: t,
|
|
3046
3066
|
storage: r,
|
|
3047
3067
|
snapshotKeys: n,
|
|
@@ -3050,7 +3070,7 @@ function Mo({
|
|
|
3050
3070
|
searchKey: l = "q",
|
|
3051
3071
|
persistSearch: c = !0
|
|
3052
3072
|
}) {
|
|
3053
|
-
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);
|
|
3054
3074
|
J(() => {
|
|
3055
3075
|
if (!a) {
|
|
3056
3076
|
u.current = a;
|
|
@@ -3064,7 +3084,7 @@ function Mo({
|
|
|
3064
3084
|
if (n.forEach((k) => {
|
|
3065
3085
|
const x = s.get(k);
|
|
3066
3086
|
x != null && (b[k] = x);
|
|
3067
|
-
}), c ||
|
|
3087
|
+
}), c || mn(b, i, l), Object.keys(b).length === 0) {
|
|
3068
3088
|
m.current && r.remove(a);
|
|
3069
3089
|
return;
|
|
3070
3090
|
}
|
|
@@ -3081,7 +3101,7 @@ function Mo({
|
|
|
3081
3101
|
const p = q(() => {
|
|
3082
3102
|
if (!a) return null;
|
|
3083
3103
|
const b = r.get(a);
|
|
3084
|
-
return !b || Object.keys(b).length === 0 || !c && (
|
|
3104
|
+
return !b || Object.keys(b).length === 0 || !c && (mn(b, i, l), Object.keys(b).length === 0) ? null : b;
|
|
3085
3105
|
}, [a, r, c, i, l]), g = q(() => {
|
|
3086
3106
|
a && r.remove(a);
|
|
3087
3107
|
}, [a, r]);
|
|
@@ -3091,14 +3111,14 @@ function Mo({
|
|
|
3091
3111
|
clear: g
|
|
3092
3112
|
};
|
|
3093
3113
|
}
|
|
3094
|
-
function
|
|
3114
|
+
function Bo({
|
|
3095
3115
|
scopeId: t,
|
|
3096
3116
|
storage: r,
|
|
3097
3117
|
perPageKey: n,
|
|
3098
3118
|
pageSizeOptions: o,
|
|
3099
3119
|
enabled: i = !0
|
|
3100
3120
|
}) {
|
|
3101
|
-
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);
|
|
3102
3122
|
J(() => {
|
|
3103
3123
|
if (!c) {
|
|
3104
3124
|
a.current = c;
|
|
@@ -3129,7 +3149,7 @@ function Wo({
|
|
|
3129
3149
|
};
|
|
3130
3150
|
}
|
|
3131
3151
|
let fr = {}, mr = !1, gr = null;
|
|
3132
|
-
const
|
|
3152
|
+
const Ao = (t, r) => {
|
|
3133
3153
|
Object.assign(fr, t), gr = r, !mr && (mr = !0, queueMicrotask(() => {
|
|
3134
3154
|
const n = fr, o = gr;
|
|
3135
3155
|
fr = {}, mr = !1, gr = null, !(!o || Object.keys(n).length === 0) && o((i) => {
|
|
@@ -3138,14 +3158,14 @@ const zo = (t, r) => {
|
|
|
3138
3158
|
});
|
|
3139
3159
|
}));
|
|
3140
3160
|
};
|
|
3141
|
-
function
|
|
3161
|
+
function Ro({
|
|
3142
3162
|
enabled: t,
|
|
3143
3163
|
snapshotKeys: r,
|
|
3144
3164
|
perPageKey: n,
|
|
3145
3165
|
readSnapshot: o,
|
|
3146
3166
|
readPerPage: i
|
|
3147
3167
|
}) {
|
|
3148
|
-
const { searchParams: l, setSearchParams: c, location: s } = $e(), a =
|
|
3168
|
+
const { searchParams: l, setSearchParams: c, location: s } = $e(), a = le(null);
|
|
3149
3169
|
J(() => {
|
|
3150
3170
|
if (!t || a.current === s.pathname) return;
|
|
3151
3171
|
a.current = s.pathname;
|
|
@@ -3158,10 +3178,10 @@ function Bo({
|
|
|
3158
3178
|
const m = o();
|
|
3159
3179
|
m && Object.assign(u, m);
|
|
3160
3180
|
}
|
|
3161
|
-
Object.keys(u).length !== 0 &&
|
|
3181
|
+
Object.keys(u).length !== 0 && Ao(u, c);
|
|
3162
3182
|
}, [s.pathname, t]);
|
|
3163
3183
|
}
|
|
3164
|
-
const
|
|
3184
|
+
const Io = ({
|
|
3165
3185
|
configs: t,
|
|
3166
3186
|
activeKeys: r,
|
|
3167
3187
|
onToggle: n,
|
|
@@ -3179,7 +3199,7 @@ const Ao = ({
|
|
|
3179
3199
|
}
|
|
3180
3200
|
) }),
|
|
3181
3201
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3182
|
-
|
|
3202
|
+
Te,
|
|
3183
3203
|
{
|
|
3184
3204
|
style: { minWidth: 260 },
|
|
3185
3205
|
title: /* @__PURE__ */ d(
|
|
@@ -3235,7 +3255,7 @@ const Ao = ({
|
|
|
3235
3255
|
"aria-label": "Filter actions"
|
|
3236
3256
|
}
|
|
3237
3257
|
) }),
|
|
3238
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(
|
|
3258
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(Te, { style: { width: 180 }, children: [
|
|
3239
3259
|
/* @__PURE__ */ e(
|
|
3240
3260
|
Pe,
|
|
3241
3261
|
{
|
|
@@ -3254,21 +3274,21 @@ const Ao = ({
|
|
|
3254
3274
|
}
|
|
3255
3275
|
)
|
|
3256
3276
|
] }) })
|
|
3257
|
-
] }),
|
|
3277
|
+
] }), Oo = (t) => {
|
|
3258
3278
|
const r = new Date(t);
|
|
3259
3279
|
return r.setHours(0, 0, 0, 0), r;
|
|
3260
|
-
},
|
|
3280
|
+
}, gn = (t, r, n) => {
|
|
3261
3281
|
const o = new Date(t);
|
|
3262
3282
|
return n === "day" ? o.setDate(o.getDate() + r) : n === "week" ? o.setDate(o.getDate() + r * 7) : n === "month" ? o.setMonth(o.getMonth() + r) : o.setFullYear(o.getFullYear() + r), o;
|
|
3263
|
-
},
|
|
3264
|
-
const r =
|
|
3283
|
+
}, Zn = (t) => {
|
|
3284
|
+
const r = Oo(/* @__PURE__ */ new Date());
|
|
3265
3285
|
if (t.direction === "this") {
|
|
3266
3286
|
const o = new Date(r), i = new Date(r);
|
|
3267
3287
|
return t.period === "week" ? (o.setDate(r.getDate() - r.getDay()), i.setDate(o.getDate() + 6)) : t.period === "month" ? (o.setDate(1), i.setMonth(i.getMonth() + 1, 0)) : t.period === "year" && (o.setMonth(0, 1), i.setMonth(11, 31)), { from: o, to: i };
|
|
3268
3288
|
}
|
|
3269
3289
|
const n = t.count ?? 1;
|
|
3270
|
-
return t.direction === "past" ? { from:
|
|
3271
|
-
},
|
|
3290
|
+
return t.direction === "past" ? { from: gn(r, -n, t.period), to: r } : { from: r, to: gn(r, n, t.period) };
|
|
3291
|
+
}, pn = 24, Gn = (t) => t.length > pn ? `${t.slice(0, pn)}...` : t, Tt = (t) => t.toLocaleDateString(void 0, {
|
|
3272
3292
|
day: "2-digit",
|
|
3273
3293
|
month: "short",
|
|
3274
3294
|
year: "numeric"
|
|
@@ -3282,7 +3302,7 @@ const Ao = ({
|
|
|
3282
3302
|
"is-relative-to-today": "Is relative to today",
|
|
3283
3303
|
"is-empty": "Is empty",
|
|
3284
3304
|
"is-not-empty": "Is not empty"
|
|
3285
|
-
},
|
|
3305
|
+
}, Ho = [
|
|
3286
3306
|
"is",
|
|
3287
3307
|
"is-before",
|
|
3288
3308
|
"is-after",
|
|
@@ -3296,8 +3316,8 @@ const Ao = ({
|
|
|
3296
3316
|
past: "Past",
|
|
3297
3317
|
next: "Next",
|
|
3298
3318
|
this: "This"
|
|
3299
|
-
},
|
|
3300
|
-
|
|
3319
|
+
}, To = ["day", "week", "month", "year"], Vo = ["past", "next", "this"], No = (t) => t.field.type === "date-compact" ? /* @__PURE__ */ e(
|
|
3320
|
+
_o,
|
|
3301
3321
|
{
|
|
3302
3322
|
field: t.field,
|
|
3303
3323
|
value: t.value,
|
|
@@ -3306,7 +3326,7 @@ const Ao = ({
|
|
|
3306
3326
|
onRemove: t.onRemove
|
|
3307
3327
|
}
|
|
3308
3328
|
) : /* @__PURE__ */ e(
|
|
3309
|
-
|
|
3329
|
+
$o,
|
|
3310
3330
|
{
|
|
3311
3331
|
field: t.field,
|
|
3312
3332
|
value: t.value,
|
|
@@ -3314,20 +3334,20 @@ const Ao = ({
|
|
|
3314
3334
|
onClear: t.onClear,
|
|
3315
3335
|
onRemove: t.onRemove
|
|
3316
3336
|
}
|
|
3317
|
-
),
|
|
3337
|
+
), $o = ({
|
|
3318
3338
|
field: t,
|
|
3319
3339
|
value: r,
|
|
3320
3340
|
onChange: n,
|
|
3321
3341
|
onClear: o,
|
|
3322
3342
|
onRemove: i
|
|
3323
3343
|
}) => {
|
|
3324
|
-
const l = r ?
|
|
3344
|
+
const l = r ? Tt(new Date(r)) : null, c = !!l, s = c ? /* @__PURE__ */ d(re, { children: [
|
|
3325
3345
|
/* @__PURE__ */ d("span", { style: { fontWeight: 500 }, children: [
|
|
3326
3346
|
t.label,
|
|
3327
3347
|
":"
|
|
3328
3348
|
] }),
|
|
3329
3349
|
" ",
|
|
3330
|
-
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children:
|
|
3350
|
+
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: Gn(l) })
|
|
3331
3351
|
] }) : t.label;
|
|
3332
3352
|
return /* @__PURE__ */ d(Oe, { position: "bottom-left", children: [
|
|
3333
3353
|
/* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
|
|
@@ -3342,7 +3362,7 @@ const Ao = ({
|
|
|
3342
3362
|
}
|
|
3343
3363
|
) }),
|
|
3344
3364
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3345
|
-
|
|
3365
|
+
Te,
|
|
3346
3366
|
{
|
|
3347
3367
|
style: { width: 260 },
|
|
3348
3368
|
title: /* @__PURE__ */ d(
|
|
@@ -3374,16 +3394,16 @@ const Ao = ({
|
|
|
3374
3394
|
}
|
|
3375
3395
|
) })
|
|
3376
3396
|
] });
|
|
3377
|
-
},
|
|
3397
|
+
}, jo = (t) => {
|
|
3378
3398
|
switch (t.op) {
|
|
3379
3399
|
case "is":
|
|
3380
3400
|
case "is-before":
|
|
3381
3401
|
case "is-after":
|
|
3382
3402
|
case "is-on-or-before":
|
|
3383
3403
|
case "is-on-or-after":
|
|
3384
|
-
return t.date ? `${jt[t.op]} ${
|
|
3404
|
+
return t.date ? `${jt[t.op]} ${Tt(new Date(t.date))}` : null;
|
|
3385
3405
|
case "is-between":
|
|
3386
|
-
return t.from && t.to ? `${
|
|
3406
|
+
return t.from && t.to ? `${Tt(new Date(t.from))} - ${Tt(new Date(t.to))}` : null;
|
|
3387
3407
|
case "is-relative-to-today": {
|
|
3388
3408
|
const r = t.relative;
|
|
3389
3409
|
if (!r) return null;
|
|
@@ -3397,20 +3417,20 @@ const Ao = ({
|
|
|
3397
3417
|
default:
|
|
3398
3418
|
return null;
|
|
3399
3419
|
}
|
|
3400
|
-
},
|
|
3420
|
+
}, _o = ({
|
|
3401
3421
|
field: t,
|
|
3402
3422
|
value: r,
|
|
3403
3423
|
onChange: n,
|
|
3404
3424
|
onClear: o,
|
|
3405
3425
|
onRemove: i
|
|
3406
3426
|
}) => {
|
|
3407
|
-
const l = t.ops && t.ops.length > 0 ? t.ops :
|
|
3427
|
+
const l = t.ops && t.ops.length > 0 ? t.ops : Ho, c = t.defaultOp && l.includes(t.defaultOp) ? t.defaultOp : l[0], s = (r == null ? void 0 : r.op) ?? c, a = r ? jo(r) : null, u = !!a, m = u ? /* @__PURE__ */ d(re, { children: [
|
|
3408
3428
|
/* @__PURE__ */ d("span", { style: { fontWeight: 500 }, children: [
|
|
3409
3429
|
t.label,
|
|
3410
3430
|
":"
|
|
3411
3431
|
] }),
|
|
3412
3432
|
" ",
|
|
3413
|
-
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children:
|
|
3433
|
+
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: Gn(a) })
|
|
3414
3434
|
] }) : t.label, p = (g) => {
|
|
3415
3435
|
if (g !== s) {
|
|
3416
3436
|
if (g === "is-empty" || g === "is-not-empty") {
|
|
@@ -3449,7 +3469,7 @@ const Ao = ({
|
|
|
3449
3469
|
) }),
|
|
3450
3470
|
/* @__PURE__ */ d(He, { children: [
|
|
3451
3471
|
/* @__PURE__ */ e(
|
|
3452
|
-
|
|
3472
|
+
Te,
|
|
3453
3473
|
{
|
|
3454
3474
|
style: { width: 320 },
|
|
3455
3475
|
title: /* @__PURE__ */ d(
|
|
@@ -3472,7 +3492,7 @@ const Ao = ({
|
|
|
3472
3492
|
style: { minWidth: 0 },
|
|
3473
3493
|
children: [
|
|
3474
3494
|
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "subtlest", children: t.label }),
|
|
3475
|
-
/* @__PURE__ */ e(
|
|
3495
|
+
/* @__PURE__ */ e(Po, { op: s, ops: l, onChange: p })
|
|
3476
3496
|
]
|
|
3477
3497
|
}
|
|
3478
3498
|
),
|
|
@@ -3480,13 +3500,13 @@ const Ao = ({
|
|
|
3480
3500
|
]
|
|
3481
3501
|
}
|
|
3482
3502
|
),
|
|
3483
|
-
children: /* @__PURE__ */ e(
|
|
3503
|
+
children: /* @__PURE__ */ e(Zo, { value: r, op: s, onChange: n })
|
|
3484
3504
|
}
|
|
3485
3505
|
),
|
|
3486
3506
|
s === "is-relative-to-today" && /* @__PURE__ */ e(Lr, { children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "Filter will update with the current date" }) })
|
|
3487
3507
|
] })
|
|
3488
3508
|
] });
|
|
3489
|
-
},
|
|
3509
|
+
}, Po = ({ op: t, ops: r, onChange: n }) => /* @__PURE__ */ d(Oe, { position: "bottom-left", children: [
|
|
3490
3510
|
/* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
|
|
3491
3511
|
_,
|
|
3492
3512
|
{
|
|
@@ -3497,7 +3517,7 @@ const Ao = ({
|
|
|
3497
3517
|
children: jt[t]
|
|
3498
3518
|
}
|
|
3499
3519
|
) }),
|
|
3500
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3520
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { width: 200 }, children: r.map((o) => /* @__PURE__ */ e(
|
|
3501
3521
|
Pe,
|
|
3502
3522
|
{
|
|
3503
3523
|
selected: t === o,
|
|
@@ -3507,7 +3527,7 @@ const Ao = ({
|
|
|
3507
3527
|
},
|
|
3508
3528
|
o
|
|
3509
3529
|
)) }) })
|
|
3510
|
-
] }),
|
|
3530
|
+
] }), Zo = ({ value: t, op: r, onChange: n }) => {
|
|
3511
3531
|
if (r === "is-empty" || r === "is-not-empty")
|
|
3512
3532
|
return /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No further input required." }) });
|
|
3513
3533
|
if (r === "is-between") {
|
|
@@ -3552,7 +3572,7 @@ const Ao = ({
|
|
|
3552
3572
|
);
|
|
3553
3573
|
}
|
|
3554
3574
|
return r === "is-relative-to-today" ? /* @__PURE__ */ e(
|
|
3555
|
-
|
|
3575
|
+
Go,
|
|
3556
3576
|
{
|
|
3557
3577
|
value: t == null ? void 0 : t.relative,
|
|
3558
3578
|
onChange: (o) => n({ op: r, relative: o })
|
|
@@ -3575,8 +3595,8 @@ const Ao = ({
|
|
|
3575
3595
|
},
|
|
3576
3596
|
"single"
|
|
3577
3597
|
);
|
|
3578
|
-
},
|
|
3579
|
-
const n = (t == null ? void 0 : t.direction) ?? "past", o = (t == null ? void 0 : t.count) ?? 1, i = (t == null ? void 0 : t.period) ?? "week", l = n !== "this", c =
|
|
3598
|
+
}, Go = ({ value: t, onChange: r }) => {
|
|
3599
|
+
const n = (t == null ? void 0 : t.direction) ?? "past", o = (t == null ? void 0 : t.count) ?? 1, i = (t == null ? void 0 : t.period) ?? "week", l = n !== "this", c = Zn({ direction: n, count: o, period: i });
|
|
3580
3600
|
return /* @__PURE__ */ d(f, { direction: "column", display: "flex", gap: "sm", children: [
|
|
3581
3601
|
/* @__PURE__ */ d(f, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
|
|
3582
3602
|
/* @__PURE__ */ d(Oe, { position: "bottom-left", children: [
|
|
@@ -3590,7 +3610,7 @@ const Ao = ({
|
|
|
3590
3610
|
children: Sr[n]
|
|
3591
3611
|
}
|
|
3592
3612
|
) }),
|
|
3593
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3613
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { width: 140 }, children: Vo.map((s) => /* @__PURE__ */ e(
|
|
3594
3614
|
Pe,
|
|
3595
3615
|
{
|
|
3596
3616
|
selected: n === s,
|
|
@@ -3633,7 +3653,7 @@ const Ao = ({
|
|
|
3633
3653
|
children: i
|
|
3634
3654
|
}
|
|
3635
3655
|
) }),
|
|
3636
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3656
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { style: { width: 140 }, children: To.map((s) => /* @__PURE__ */ e(
|
|
3637
3657
|
Pe,
|
|
3638
3658
|
{
|
|
3639
3659
|
selected: i === s,
|
|
@@ -3662,14 +3682,14 @@ const Ao = ({
|
|
|
3662
3682
|
"relative-preview"
|
|
3663
3683
|
)
|
|
3664
3684
|
] });
|
|
3665
|
-
},
|
|
3685
|
+
}, yn = 18, qo = (t) => t.length > yn ? `${t.slice(0, yn)}...` : t, Uo = ({
|
|
3666
3686
|
field: t,
|
|
3667
3687
|
value: r,
|
|
3668
3688
|
onChange: n,
|
|
3669
3689
|
onClear: o,
|
|
3670
3690
|
onRemove: i
|
|
3671
3691
|
}) => {
|
|
3672
|
-
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 = (() => {
|
|
3673
3693
|
if (p) return m;
|
|
3674
3694
|
const S = a.trim().toLowerCase();
|
|
3675
3695
|
return S ? m.filter((A) => A.label.toLowerCase().includes(S)) : m;
|
|
@@ -3690,7 +3710,7 @@ const Ao = ({
|
|
|
3690
3710
|
":"
|
|
3691
3711
|
] }),
|
|
3692
3712
|
" ",
|
|
3693
|
-
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: c === 1 ?
|
|
3713
|
+
/* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: c === 1 ? qo(r[0].label) : `${c} Selected` })
|
|
3694
3714
|
] });
|
|
3695
3715
|
return /* @__PURE__ */ d(Oe, { position: "bottom-left", children: [
|
|
3696
3716
|
/* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
|
|
@@ -3705,7 +3725,7 @@ const Ao = ({
|
|
|
3705
3725
|
}
|
|
3706
3726
|
) }),
|
|
3707
3727
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3708
|
-
|
|
3728
|
+
Te,
|
|
3709
3729
|
{
|
|
3710
3730
|
style: { width: 260 },
|
|
3711
3731
|
title: /* @__PURE__ */ d(
|
|
@@ -3765,8 +3785,8 @@ const Ao = ({
|
|
|
3765
3785
|
}
|
|
3766
3786
|
) })
|
|
3767
3787
|
] });
|
|
3768
|
-
},
|
|
3769
|
-
|
|
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(
|
|
3789
|
+
st,
|
|
3770
3790
|
{
|
|
3771
3791
|
size: "sm",
|
|
3772
3792
|
checked: t,
|
|
@@ -3775,7 +3795,7 @@ const Ao = ({
|
|
|
3775
3795
|
},
|
|
3776
3796
|
variant: r ? "indeterminate" : "select"
|
|
3777
3797
|
}
|
|
3778
|
-
) }),
|
|
3798
|
+
) }), Qo = ({
|
|
3779
3799
|
field: t,
|
|
3780
3800
|
value: r,
|
|
3781
3801
|
onChange: n,
|
|
@@ -3796,7 +3816,7 @@ const Ao = ({
|
|
|
3796
3816
|
":"
|
|
3797
3817
|
] }),
|
|
3798
3818
|
" ",
|
|
3799
|
-
/* @__PURE__ */ e(D, { as: "span", children: c === 1 ?
|
|
3819
|
+
/* @__PURE__ */ e(D, { as: "span", children: c === 1 ? Jo(r[0].label) : `${c} Selected` })
|
|
3800
3820
|
] });
|
|
3801
3821
|
return /* @__PURE__ */ d(Oe, { position: "bottom-left", children: [
|
|
3802
3822
|
/* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
|
|
@@ -3811,7 +3831,7 @@ const Ao = ({
|
|
|
3811
3831
|
}
|
|
3812
3832
|
) }),
|
|
3813
3833
|
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(
|
|
3814
|
-
|
|
3834
|
+
Te,
|
|
3815
3835
|
{
|
|
3816
3836
|
style: { width: 240 },
|
|
3817
3837
|
title: /* @__PURE__ */ d(
|
|
@@ -3836,7 +3856,7 @@ const Ao = ({
|
|
|
3836
3856
|
selected: s,
|
|
3837
3857
|
onClick: m,
|
|
3838
3858
|
startIcon: /* @__PURE__ */ e(
|
|
3839
|
-
|
|
3859
|
+
xn,
|
|
3840
3860
|
{
|
|
3841
3861
|
checked: s || a,
|
|
3842
3862
|
indeterminate: a
|
|
@@ -3851,7 +3871,7 @@ const Ao = ({
|
|
|
3851
3871
|
closeOnSelect: !1,
|
|
3852
3872
|
selected: l.has(g.value),
|
|
3853
3873
|
onClick: () => u(g),
|
|
3854
|
-
startIcon: /* @__PURE__ */ e(
|
|
3874
|
+
startIcon: /* @__PURE__ */ e(xn, { checked: l.has(g.value) }),
|
|
3855
3875
|
children: g.label
|
|
3856
3876
|
},
|
|
3857
3877
|
g.value
|
|
@@ -3860,7 +3880,7 @@ const Ao = ({
|
|
|
3860
3880
|
}
|
|
3861
3881
|
) })
|
|
3862
3882
|
] });
|
|
3863
|
-
},
|
|
3883
|
+
}, qn = ({
|
|
3864
3884
|
activeKeys: t,
|
|
3865
3885
|
configByKey: r,
|
|
3866
3886
|
getValue: n,
|
|
@@ -3872,7 +3892,7 @@ const Ao = ({
|
|
|
3872
3892
|
if (!s) return null;
|
|
3873
3893
|
const a = n(s), u = s.locked ? void 0 : () => l(c);
|
|
3874
3894
|
return s.type === "date" || s.type === "date-compact" ? /* @__PURE__ */ e(
|
|
3875
|
-
|
|
3895
|
+
No,
|
|
3876
3896
|
{
|
|
3877
3897
|
field: s,
|
|
3878
3898
|
value: a,
|
|
@@ -3882,7 +3902,7 @@ const Ao = ({
|
|
|
3882
3902
|
},
|
|
3883
3903
|
c
|
|
3884
3904
|
) : s.type === "checkbox-multiple" ? /* @__PURE__ */ e(
|
|
3885
|
-
|
|
3905
|
+
Qo,
|
|
3886
3906
|
{
|
|
3887
3907
|
field: s,
|
|
3888
3908
|
value: a || [],
|
|
@@ -3892,7 +3912,7 @@ const Ao = ({
|
|
|
3892
3912
|
},
|
|
3893
3913
|
c
|
|
3894
3914
|
) : /* @__PURE__ */ e(
|
|
3895
|
-
|
|
3915
|
+
Uo,
|
|
3896
3916
|
{
|
|
3897
3917
|
field: s,
|
|
3898
3918
|
value: a || [],
|
|
@@ -3902,7 +3922,7 @@ const Ao = ({
|
|
|
3902
3922
|
},
|
|
3903
3923
|
c
|
|
3904
3924
|
);
|
|
3905
|
-
}) }),
|
|
3925
|
+
}) }), vn = (t) => `${t} Rows`, Yo = ({
|
|
3906
3926
|
pagination: t,
|
|
3907
3927
|
pageKey: r = "page",
|
|
3908
3928
|
perPageKey: n = "perPage",
|
|
@@ -3934,15 +3954,15 @@ const Ao = ({
|
|
|
3934
3954
|
size: "sm",
|
|
3935
3955
|
iconRight: /* @__PURE__ */ e(z, { name: "ChevronSmallDown" }),
|
|
3936
3956
|
"aria-label": "Rows per page",
|
|
3937
|
-
children:
|
|
3957
|
+
children: vn(g)
|
|
3938
3958
|
}
|
|
3939
3959
|
) }),
|
|
3940
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
3960
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { children: o.map((A) => /* @__PURE__ */ e(
|
|
3941
3961
|
Pe,
|
|
3942
3962
|
{
|
|
3943
3963
|
selected: A === g,
|
|
3944
3964
|
onClick: () => k(String(A)),
|
|
3945
|
-
children:
|
|
3965
|
+
children: vn(A)
|
|
3946
3966
|
},
|
|
3947
3967
|
A
|
|
3948
3968
|
)) }) })
|
|
@@ -3973,7 +3993,7 @@ const Ao = ({
|
|
|
3973
3993
|
)
|
|
3974
3994
|
] });
|
|
3975
3995
|
};
|
|
3976
|
-
function
|
|
3996
|
+
function Xo(t, r, n = !0) {
|
|
3977
3997
|
J(() => {
|
|
3978
3998
|
if (!n) return;
|
|
3979
3999
|
const o = (i) => {
|
|
@@ -3985,7 +4005,7 @@ function Qo(t, r, n = !0) {
|
|
|
3985
4005
|
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
3986
4006
|
}, [t, r, n]);
|
|
3987
4007
|
}
|
|
3988
|
-
const
|
|
4008
|
+
const Ko = 240, Un = ({
|
|
3989
4009
|
searchKey: t = "q",
|
|
3990
4010
|
filterKey: r = "filter",
|
|
3991
4011
|
pageKey: n = "page",
|
|
@@ -3993,7 +4013,7 @@ const Yo = 240, qn = ({
|
|
|
3993
4013
|
shortcut: i = "/",
|
|
3994
4014
|
collapsible: l = !0
|
|
3995
4015
|
}) => {
|
|
3996
|
-
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);
|
|
3997
4017
|
J(() => {
|
|
3998
4018
|
x(u), u && p(!0);
|
|
3999
4019
|
}, [u]), J(() => {
|
|
@@ -4015,7 +4035,7 @@ const Yo = 240, qn = ({
|
|
|
4015
4035
|
return (R = S.current) == null ? void 0 : R.focus();
|
|
4016
4036
|
});
|
|
4017
4037
|
}, []);
|
|
4018
|
-
return
|
|
4038
|
+
return Xo(i, A), // No internal gap: the trigger and the animated input are never visible at
|
|
4019
4039
|
// the same time, so spacing to neighbours is handled by the parent cluster.
|
|
4020
4040
|
/* @__PURE__ */ d(f, { display: "flex", direction: "row", align: "center", gap: "spacing-0", children: [
|
|
4021
4041
|
g && /* @__PURE__ */ e(
|
|
@@ -4038,7 +4058,7 @@ const Yo = 240, qn = ({
|
|
|
4038
4058
|
},
|
|
4039
4059
|
style: {
|
|
4040
4060
|
position: "relative",
|
|
4041
|
-
width: m ?
|
|
4061
|
+
width: m ? Ko : 0,
|
|
4042
4062
|
overflow: "hidden",
|
|
4043
4063
|
transition: "width 220ms ease"
|
|
4044
4064
|
},
|
|
@@ -4091,14 +4111,14 @@ const Yo = 240, qn = ({
|
|
|
4091
4111
|
}
|
|
4092
4112
|
)
|
|
4093
4113
|
] });
|
|
4094
|
-
},
|
|
4114
|
+
}, Jn = ({
|
|
4095
4115
|
columns: t,
|
|
4096
4116
|
allVisible: r,
|
|
4097
4117
|
onToggle: n,
|
|
4098
4118
|
onReorder: o,
|
|
4099
4119
|
onSetAllHidden: i
|
|
4100
4120
|
}) => {
|
|
4101
|
-
const [l, c] =
|
|
4121
|
+
const [l, c] = T(null), [s, a] = T(null), u = () => {
|
|
4102
4122
|
l !== null && s !== null && l !== s && o(l, s), c(null), a(null);
|
|
4103
4123
|
}, m = (p, g) => {
|
|
4104
4124
|
const b = p + g;
|
|
@@ -4115,7 +4135,7 @@ const Yo = 240, qn = ({
|
|
|
4115
4135
|
"aria-label": "Customize columns"
|
|
4116
4136
|
}
|
|
4117
4137
|
) }),
|
|
4118
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(
|
|
4138
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ d(
|
|
4119
4139
|
f,
|
|
4120
4140
|
{
|
|
4121
4141
|
padding: "sm",
|
|
@@ -4223,13 +4243,13 @@ const Yo = 240, qn = ({
|
|
|
4223
4243
|
}
|
|
4224
4244
|
) }) })
|
|
4225
4245
|
] });
|
|
4226
|
-
},
|
|
4246
|
+
}, Qn = ({
|
|
4227
4247
|
views: t,
|
|
4228
4248
|
onApply: r,
|
|
4229
4249
|
onDelete: n,
|
|
4230
4250
|
onSave: o
|
|
4231
4251
|
}) => {
|
|
4232
|
-
const [i, l] =
|
|
4252
|
+
const [i, l] = T(""), c = () => {
|
|
4233
4253
|
const s = i.trim();
|
|
4234
4254
|
s && (o(s), l(""));
|
|
4235
4255
|
};
|
|
@@ -4251,7 +4271,7 @@ const Yo = 240, qn = ({
|
|
|
4251
4271
|
width: "260px"
|
|
4252
4272
|
},
|
|
4253
4273
|
children: [
|
|
4254
|
-
/* @__PURE__ */ e(
|
|
4274
|
+
/* @__PURE__ */ e(Te, { children: /* @__PURE__ */ d(f, { direction: "column", padding: "xs", gap: "sm", children: [
|
|
4255
4275
|
/* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Saved Views" }),
|
|
4256
4276
|
/* @__PURE__ */ e(
|
|
4257
4277
|
f,
|
|
@@ -4318,7 +4338,7 @@ const Yo = 240, qn = ({
|
|
|
4318
4338
|
}
|
|
4319
4339
|
)
|
|
4320
4340
|
] });
|
|
4321
|
-
},
|
|
4341
|
+
}, el = ({
|
|
4322
4342
|
isOpen: t,
|
|
4323
4343
|
onClose: r,
|
|
4324
4344
|
configs: n,
|
|
@@ -4333,7 +4353,7 @@ const Yo = 240, qn = ({
|
|
|
4333
4353
|
removeFilter: p
|
|
4334
4354
|
}) => {
|
|
4335
4355
|
const g = o.length;
|
|
4336
|
-
return /* @__PURE__ */ e(
|
|
4356
|
+
return /* @__PURE__ */ e(An, { position: "bottom", isShow: t, onHide: r, children: /* @__PURE__ */ d(
|
|
4337
4357
|
f,
|
|
4338
4358
|
{
|
|
4339
4359
|
direction: "column",
|
|
@@ -4395,7 +4415,7 @@ const Yo = 240, qn = ({
|
|
|
4395
4415
|
gap: "sm",
|
|
4396
4416
|
align: "center",
|
|
4397
4417
|
children: /* @__PURE__ */ e(
|
|
4398
|
-
|
|
4418
|
+
qn,
|
|
4399
4419
|
{
|
|
4400
4420
|
activeKeys: o,
|
|
4401
4421
|
configByKey: i,
|
|
@@ -4509,7 +4529,7 @@ const Yo = 240, qn = ({
|
|
|
4509
4529
|
]
|
|
4510
4530
|
}
|
|
4511
4531
|
) });
|
|
4512
|
-
},
|
|
4532
|
+
}, tl = (t) => `${t} Rows`, rl = ({
|
|
4513
4533
|
perPageKey: t,
|
|
4514
4534
|
pageKey: r,
|
|
4515
4535
|
pageSizeOptions: n,
|
|
@@ -4534,7 +4554,7 @@ const Yo = 240, qn = ({
|
|
|
4534
4554
|
"aria-label": "More options"
|
|
4535
4555
|
}
|
|
4536
4556
|
) }),
|
|
4537
|
-
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(
|
|
4557
|
+
/* @__PURE__ */ e(He, { children: /* @__PURE__ */ d(Te, { style: { minWidth: 200 }, children: [
|
|
4538
4558
|
/* @__PURE__ */ e(f, { paddingInline: "sm", paddingBlock: "xs", children: /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Rows per page" }) }),
|
|
4539
4559
|
n.map((p) => /* @__PURE__ */ e(
|
|
4540
4560
|
Pe,
|
|
@@ -4542,13 +4562,13 @@ const Yo = 240, qn = ({
|
|
|
4542
4562
|
selected: p === u,
|
|
4543
4563
|
endIcon: p === u ? /* @__PURE__ */ e(z, { name: "Check" }) : void 0,
|
|
4544
4564
|
onClick: () => m(String(p)),
|
|
4545
|
-
children:
|
|
4565
|
+
children: tl(p)
|
|
4546
4566
|
},
|
|
4547
4567
|
p
|
|
4548
4568
|
))
|
|
4549
4569
|
] }) })
|
|
4550
4570
|
] }) : null;
|
|
4551
|
-
},
|
|
4571
|
+
}, nl = (t) => {
|
|
4552
4572
|
var De;
|
|
4553
4573
|
const {
|
|
4554
4574
|
withPadding: r,
|
|
@@ -4583,13 +4603,13 @@ const Yo = 240, qn = ({
|
|
|
4583
4603
|
onReorder: Y,
|
|
4584
4604
|
onSetAllHidden: ne,
|
|
4585
4605
|
showSavedViews: $,
|
|
4586
|
-
savedViews:
|
|
4606
|
+
savedViews: V,
|
|
4587
4607
|
onApplyView: j,
|
|
4588
4608
|
onDeleteView: oe,
|
|
4589
4609
|
onSaveView: ve,
|
|
4590
4610
|
leadingActions: Ce
|
|
4591
|
-
} = t, [fe, pe] =
|
|
4592
|
-
ze({ ...we, [x]: String(
|
|
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) });
|
|
4593
4613
|
}, Fe = E || W && !!(C != null && C.totalPage), qe = () => {
|
|
4594
4614
|
p(), pe(!1);
|
|
4595
4615
|
};
|
|
@@ -4618,7 +4638,7 @@ const Yo = 240, qn = ({
|
|
|
4618
4638
|
overflow: "overflow-auto",
|
|
4619
4639
|
children: [
|
|
4620
4640
|
g && /* @__PURE__ */ e(
|
|
4621
|
-
|
|
4641
|
+
Un,
|
|
4622
4642
|
{
|
|
4623
4643
|
searchKey: b,
|
|
4624
4644
|
filterKey: k,
|
|
@@ -4651,16 +4671,16 @@ const Yo = 240, qn = ({
|
|
|
4651
4671
|
children: [
|
|
4652
4672
|
Ce,
|
|
4653
4673
|
$ && /* @__PURE__ */ e(
|
|
4654
|
-
|
|
4674
|
+
Qn,
|
|
4655
4675
|
{
|
|
4656
|
-
views:
|
|
4676
|
+
views: V,
|
|
4657
4677
|
onApply: j,
|
|
4658
4678
|
onDelete: oe,
|
|
4659
4679
|
onSave: ve
|
|
4660
4680
|
}
|
|
4661
4681
|
),
|
|
4662
4682
|
Q && /* @__PURE__ */ e(
|
|
4663
|
-
|
|
4683
|
+
Jn,
|
|
4664
4684
|
{
|
|
4665
4685
|
columns: P,
|
|
4666
4686
|
allVisible: K,
|
|
@@ -4670,7 +4690,7 @@ const Yo = 240, qn = ({
|
|
|
4670
4690
|
}
|
|
4671
4691
|
),
|
|
4672
4692
|
/* @__PURE__ */ e(
|
|
4673
|
-
|
|
4693
|
+
rl,
|
|
4674
4694
|
{
|
|
4675
4695
|
perPageKey: F,
|
|
4676
4696
|
pageKey: x,
|
|
@@ -4711,7 +4731,7 @@ const Yo = 240, qn = ({
|
|
|
4711
4731
|
}
|
|
4712
4732
|
),
|
|
4713
4733
|
/* @__PURE__ */ e(
|
|
4714
|
-
|
|
4734
|
+
el,
|
|
4715
4735
|
{
|
|
4716
4736
|
isOpen: fe,
|
|
4717
4737
|
onClose: () => pe(!1),
|
|
@@ -4730,7 +4750,7 @@ const Yo = 240, qn = ({
|
|
|
4730
4750
|
]
|
|
4731
4751
|
}
|
|
4732
4752
|
);
|
|
4733
|
-
},
|
|
4753
|
+
}, ts = ({
|
|
4734
4754
|
withPadding: t = !1,
|
|
4735
4755
|
filterConfigs: r = [],
|
|
4736
4756
|
filterKey: n = "filter",
|
|
@@ -4756,7 +4776,7 @@ const Yo = 240, qn = ({
|
|
|
4756
4776
|
savedViews: R,
|
|
4757
4777
|
persistLastState: W = !0,
|
|
4758
4778
|
persistSearch: E = !0,
|
|
4759
|
-
storage: Z =
|
|
4779
|
+
storage: Z = Pn,
|
|
4760
4780
|
onReset: Q,
|
|
4761
4781
|
leadingActions: P
|
|
4762
4782
|
}) => {
|
|
@@ -4765,7 +4785,7 @@ const Yo = 240, qn = ({
|
|
|
4765
4785
|
configByKey: Y,
|
|
4766
4786
|
hasActiveFilter: ne,
|
|
4767
4787
|
toggleFilter: $,
|
|
4768
|
-
removeFilter:
|
|
4788
|
+
removeFilter: V,
|
|
4769
4789
|
getValue: j,
|
|
4770
4790
|
setValue: oe,
|
|
4771
4791
|
clearValue: ve,
|
|
@@ -4776,20 +4796,20 @@ const Yo = 240, qn = ({
|
|
|
4776
4796
|
activeFilterKey: o,
|
|
4777
4797
|
pageKey: i,
|
|
4778
4798
|
searchKey: g
|
|
4779
|
-
}), fe =
|
|
4799
|
+
}), fe = Lo({
|
|
4780
4800
|
columns: A,
|
|
4781
4801
|
scopeId: K,
|
|
4782
4802
|
storage: Z,
|
|
4783
4803
|
onColumnsChange: C,
|
|
4784
4804
|
value: F
|
|
4785
|
-
}), pe =
|
|
4805
|
+
}), pe = Mo({
|
|
4786
4806
|
scopeId: K,
|
|
4787
4807
|
storage: Z,
|
|
4788
4808
|
snapshotKeys: [o, n, l],
|
|
4789
4809
|
pageKey: i,
|
|
4790
4810
|
getColumns: () => fe.state,
|
|
4791
4811
|
applyColumns: fe.applyState
|
|
4792
|
-
}), we =
|
|
4812
|
+
}), we = zo({
|
|
4793
4813
|
scopeId: K,
|
|
4794
4814
|
storage: Z,
|
|
4795
4815
|
snapshotKeys: [o, n, i],
|
|
@@ -4797,14 +4817,14 @@ const Yo = 240, qn = ({
|
|
|
4797
4817
|
filterKey: n,
|
|
4798
4818
|
searchKey: g,
|
|
4799
4819
|
persistSearch: E
|
|
4800
|
-
}), ze =
|
|
4820
|
+
}), ze = Bo({
|
|
4801
4821
|
scopeId: K,
|
|
4802
4822
|
storage: Z,
|
|
4803
4823
|
perPageKey: l,
|
|
4804
4824
|
pageSizeOptions: c,
|
|
4805
4825
|
enabled: W
|
|
4806
4826
|
});
|
|
4807
|
-
|
|
4827
|
+
Ro({
|
|
4808
4828
|
enabled: W && !!K,
|
|
4809
4829
|
snapshotKeys: [o, n, i],
|
|
4810
4830
|
perPageKey: l,
|
|
@@ -4814,7 +4834,7 @@ const Yo = 240, qn = ({
|
|
|
4814
4834
|
const je = s ?? c[0] ?? 25, Ze = !!(R != null && R.enabled) && pe.enabled, Ge = () => {
|
|
4815
4835
|
Ce(), we.clear(), Q == null || Q();
|
|
4816
4836
|
}, Fe = Le("md"), qe = p ? /* @__PURE__ */ e(
|
|
4817
|
-
|
|
4837
|
+
Un,
|
|
4818
4838
|
{
|
|
4819
4839
|
searchKey: g,
|
|
4820
4840
|
filterKey: n,
|
|
@@ -4850,7 +4870,7 @@ const Yo = 240, qn = ({
|
|
|
4850
4870
|
style: { flex: "1 1 0", minWidth: 0 },
|
|
4851
4871
|
children: [
|
|
4852
4872
|
/* @__PURE__ */ e(
|
|
4853
|
-
|
|
4873
|
+
Io,
|
|
4854
4874
|
{
|
|
4855
4875
|
configs: r,
|
|
4856
4876
|
activeKeys: N,
|
|
@@ -4871,14 +4891,14 @@ const Yo = 240, qn = ({
|
|
|
4871
4891
|
style: { flex: "1 1 0", minWidth: 0 },
|
|
4872
4892
|
children: [
|
|
4873
4893
|
/* @__PURE__ */ e(
|
|
4874
|
-
|
|
4894
|
+
qn,
|
|
4875
4895
|
{
|
|
4876
4896
|
activeKeys: N,
|
|
4877
4897
|
configByKey: Y,
|
|
4878
4898
|
getValue: j,
|
|
4879
4899
|
setValue: oe,
|
|
4880
4900
|
clearValue: ve,
|
|
4881
|
-
removeFilter:
|
|
4901
|
+
removeFilter: V
|
|
4882
4902
|
}
|
|
4883
4903
|
),
|
|
4884
4904
|
ne && /* @__PURE__ */ e(
|
|
@@ -4900,7 +4920,7 @@ const Yo = 240, qn = ({
|
|
|
4900
4920
|
/* @__PURE__ */ d(f, { direction: "row", display: "flex", align: "center", gap: "sm", children: [
|
|
4901
4921
|
P,
|
|
4902
4922
|
/* @__PURE__ */ e(
|
|
4903
|
-
|
|
4923
|
+
Yo,
|
|
4904
4924
|
{
|
|
4905
4925
|
pagination: S,
|
|
4906
4926
|
pageKey: i,
|
|
@@ -4914,7 +4934,7 @@ const Yo = 240, qn = ({
|
|
|
4914
4934
|
),
|
|
4915
4935
|
x === "right" && qe,
|
|
4916
4936
|
Ze && /* @__PURE__ */ e(
|
|
4917
|
-
|
|
4937
|
+
Qn,
|
|
4918
4938
|
{
|
|
4919
4939
|
views: pe.views,
|
|
4920
4940
|
onApply: pe.applyView,
|
|
@@ -4923,7 +4943,7 @@ const Yo = 240, qn = ({
|
|
|
4923
4943
|
}
|
|
4924
4944
|
),
|
|
4925
4945
|
A.length > 0 && /* @__PURE__ */ e(
|
|
4926
|
-
|
|
4946
|
+
Jn,
|
|
4927
4947
|
{
|
|
4928
4948
|
columns: fe.orderedColumns,
|
|
4929
4949
|
allVisible: fe.allVisible,
|
|
@@ -4936,7 +4956,7 @@ const Yo = 240, qn = ({
|
|
|
4936
4956
|
]
|
|
4937
4957
|
}
|
|
4938
4958
|
) : /* @__PURE__ */ e(
|
|
4939
|
-
|
|
4959
|
+
nl,
|
|
4940
4960
|
{
|
|
4941
4961
|
withPadding: t,
|
|
4942
4962
|
configs: r,
|
|
@@ -4944,7 +4964,7 @@ const Yo = 240, qn = ({
|
|
|
4944
4964
|
configByKey: Y,
|
|
4945
4965
|
hasActiveFilter: ne,
|
|
4946
4966
|
toggleFilter: $,
|
|
4947
|
-
removeFilter:
|
|
4967
|
+
removeFilter: V,
|
|
4948
4968
|
getValue: j,
|
|
4949
4969
|
setValue: oe,
|
|
4950
4970
|
clearValue: ve,
|
|
@@ -4977,22 +4997,22 @@ const Yo = 240, qn = ({
|
|
|
4977
4997
|
leadingActions: P
|
|
4978
4998
|
}
|
|
4979
4999
|
);
|
|
4980
|
-
},
|
|
5000
|
+
}, il = (t) => {
|
|
4981
5001
|
if (!Array.isArray(t) || t.length === 0) return;
|
|
4982
5002
|
const r = t[0];
|
|
4983
5003
|
return (r == null ? void 0 : r.value) != null ? String(r.value) : void 0;
|
|
4984
|
-
},
|
|
5004
|
+
}, ol = (t) => {
|
|
4985
5005
|
if (!Array.isArray(t) || t.length === 0) return;
|
|
4986
5006
|
const r = t.map((n) => (n == null ? void 0 : n.value) != null ? String(n.value) : null).filter((n) => n != null);
|
|
4987
5007
|
return r.length ? r : void 0;
|
|
4988
|
-
},
|
|
5008
|
+
}, ll = (t, r) => {
|
|
4989
5009
|
switch (t.type) {
|
|
4990
5010
|
case "dropdown":
|
|
4991
5011
|
case "radio":
|
|
4992
|
-
return
|
|
5012
|
+
return il(r);
|
|
4993
5013
|
case "dropdown-multiple":
|
|
4994
5014
|
case "checkbox-multiple":
|
|
4995
|
-
return
|
|
5015
|
+
return ol(r);
|
|
4996
5016
|
case "date":
|
|
4997
5017
|
return r instanceof Date ? r.toISOString() : void 0;
|
|
4998
5018
|
case "date-compact":
|
|
@@ -5000,11 +5020,11 @@ const Yo = 240, qn = ({
|
|
|
5000
5020
|
default:
|
|
5001
5021
|
return;
|
|
5002
5022
|
}
|
|
5003
|
-
},
|
|
5023
|
+
}, Cn = (t, r) => {
|
|
5004
5024
|
if (t == null || t === "") return r;
|
|
5005
5025
|
const n = Number(t);
|
|
5006
5026
|
return Number.isFinite(n) && n > 0 ? n : r;
|
|
5007
|
-
},
|
|
5027
|
+
}, rs = (t) => {
|
|
5008
5028
|
const {
|
|
5009
5029
|
filterConfigs: r,
|
|
5010
5030
|
filterKey: n = "filter",
|
|
@@ -5024,7 +5044,7 @@ const Yo = 240, qn = ({
|
|
|
5024
5044
|
searchKey: c
|
|
5025
5045
|
}), { searchParams: x } = $e(), M = x.toString();
|
|
5026
5046
|
return ge(() => {
|
|
5027
|
-
const A = {}, C = {}, F =
|
|
5047
|
+
const A = {}, C = {}, F = Cn(x.get(i), s), I = Cn(x.get(l), a);
|
|
5028
5048
|
A[(u == null ? void 0 : u.page) ?? "page"] = F, A[(u == null ? void 0 : u.perPage) ?? "perPage"] = I;
|
|
5029
5049
|
const R = Rr(c, x, n) || "";
|
|
5030
5050
|
R && (A[(u == null ? void 0 : u.search) ?? "search"] = R);
|
|
@@ -5034,7 +5054,7 @@ const Yo = 240, qn = ({
|
|
|
5034
5054
|
if (!Z) continue;
|
|
5035
5055
|
const Q = k(Z);
|
|
5036
5056
|
C[E] = Q;
|
|
5037
|
-
const P = m == null ? void 0 : m[E], K = P ? P(Q) :
|
|
5057
|
+
const P = m == null ? void 0 : m[E], K = P ? P(Q) : ll(Z, Q);
|
|
5038
5058
|
if (K == null || Array.isArray(K) && K.length === 0)
|
|
5039
5059
|
continue;
|
|
5040
5060
|
const N = (u == null ? void 0 : u[E]) ?? E;
|
|
@@ -5059,12 +5079,12 @@ const Yo = 240, qn = ({
|
|
|
5059
5079
|
m,
|
|
5060
5080
|
g
|
|
5061
5081
|
]);
|
|
5062
|
-
},
|
|
5082
|
+
}, cl = [
|
|
5063
5083
|
"dropdown",
|
|
5064
5084
|
"dropdown-multiple",
|
|
5065
5085
|
"checkbox-multiple",
|
|
5066
5086
|
"radio"
|
|
5067
|
-
],
|
|
5087
|
+
], ns = ({
|
|
5068
5088
|
filterConfigs: t,
|
|
5069
5089
|
filterKey: r,
|
|
5070
5090
|
activeFilterKey: n,
|
|
@@ -5092,7 +5112,7 @@ const Yo = 240, qn = ({
|
|
|
5092
5112
|
), b = q(
|
|
5093
5113
|
(S, A) => {
|
|
5094
5114
|
const C = l[S];
|
|
5095
|
-
if (!C || !
|
|
5115
|
+
if (!C || !cl.includes(C.type)) return;
|
|
5096
5116
|
const F = Array.isArray(A) ? A : [A];
|
|
5097
5117
|
if (F.length === 0) {
|
|
5098
5118
|
a(S);
|
|
@@ -5115,7 +5135,7 @@ const Yo = 240, qn = ({
|
|
|
5115
5135
|
[g]
|
|
5116
5136
|
), M = q((S) => a(S), [a]);
|
|
5117
5137
|
return { set: b, toggle: k, clear: M, clearAll: u, isActive: x, values: g, hasActiveFilter: m };
|
|
5118
|
-
},
|
|
5138
|
+
}, is = (t, r) => {
|
|
5119
5139
|
if (!t) return {};
|
|
5120
5140
|
const { fromKey: n, toKey: o, opKey: i } = r, l = {};
|
|
5121
5141
|
switch (t.op) {
|
|
@@ -5129,7 +5149,7 @@ const Yo = 240, qn = ({
|
|
|
5129
5149
|
return t.from && (l[n] = new Date(t.from).toISOString()), t.to && (l[o] = new Date(t.to).toISOString()), l;
|
|
5130
5150
|
case "is-relative-to-today": {
|
|
5131
5151
|
if (!t.relative) return l;
|
|
5132
|
-
const { from: c, to: s } =
|
|
5152
|
+
const { from: c, to: s } = Zn(t.relative);
|
|
5133
5153
|
return l[n] = c.toISOString(), l[o] = s.toISOString(), l;
|
|
5134
5154
|
}
|
|
5135
5155
|
case "is-empty":
|
|
@@ -5138,8 +5158,8 @@ const Yo = 240, qn = ({
|
|
|
5138
5158
|
default:
|
|
5139
5159
|
return l;
|
|
5140
5160
|
}
|
|
5141
|
-
},
|
|
5142
|
-
const o =
|
|
5161
|
+
}, sl = ({ children: t, borderRadius: r, height: n }) => {
|
|
5162
|
+
const o = le(null), [i, l] = T("100vh");
|
|
5143
5163
|
return J(() => {
|
|
5144
5164
|
if (n) return;
|
|
5145
5165
|
const c = () => {
|
|
@@ -5166,7 +5186,7 @@ const Yo = 240, qn = ({
|
|
|
5166
5186
|
children: t
|
|
5167
5187
|
}
|
|
5168
5188
|
);
|
|
5169
|
-
},
|
|
5189
|
+
}, al = ({
|
|
5170
5190
|
action: t,
|
|
5171
5191
|
rightContent: r,
|
|
5172
5192
|
leftContent: n,
|
|
@@ -5174,7 +5194,7 @@ const Yo = 240, qn = ({
|
|
|
5174
5194
|
advanceFilter: i,
|
|
5175
5195
|
showFilter: l = !0
|
|
5176
5196
|
}) => {
|
|
5177
|
-
const c = Le("md"), s = l ? /* @__PURE__ */ e(
|
|
5197
|
+
const c = Le("md"), s = l ? /* @__PURE__ */ e(Fo, { ...i }) : null;
|
|
5178
5198
|
return /* @__PURE__ */ e(
|
|
5179
5199
|
f,
|
|
5180
5200
|
{
|
|
@@ -5230,7 +5250,7 @@ const Yo = 240, qn = ({
|
|
|
5230
5250
|
] })
|
|
5231
5251
|
}
|
|
5232
5252
|
);
|
|
5233
|
-
},
|
|
5253
|
+
}, dl = ({
|
|
5234
5254
|
totalData: t,
|
|
5235
5255
|
withMarginBottom: r = !0,
|
|
5236
5256
|
withMarginTop: n = !0
|
|
@@ -5261,7 +5281,7 @@ const Yo = 240, qn = ({
|
|
|
5261
5281
|
/* @__PURE__ */ e(Ye.Body1, { children: t || 0 })
|
|
5262
5282
|
]
|
|
5263
5283
|
}
|
|
5264
|
-
),
|
|
5284
|
+
), ul = ({
|
|
5265
5285
|
pagination: t,
|
|
5266
5286
|
pageKey: r = "page",
|
|
5267
5287
|
perPageKey: n = "perPage",
|
|
@@ -5325,7 +5345,7 @@ const Yo = 240, qn = ({
|
|
|
5325
5345
|
}
|
|
5326
5346
|
)
|
|
5327
5347
|
] }) : /* @__PURE__ */ e(
|
|
5328
|
-
|
|
5348
|
+
dl,
|
|
5329
5349
|
{
|
|
5330
5350
|
totalData: l,
|
|
5331
5351
|
withMarginBottom: !1,
|
|
@@ -5334,8 +5354,8 @@ const Yo = 240, qn = ({
|
|
|
5334
5354
|
)
|
|
5335
5355
|
}
|
|
5336
5356
|
);
|
|
5337
|
-
},
|
|
5338
|
-
const [n, o] =
|
|
5357
|
+
}, hl = ({ filter: t, columnTitle: r }) => {
|
|
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(
|
|
5339
5359
|
(x) => x.label.toLowerCase().includes(s.toLowerCase())
|
|
5340
5360
|
) : t.options, [t.options, s]);
|
|
5341
5361
|
J(() => {
|
|
@@ -5536,7 +5556,7 @@ const Yo = 240, qn = ({
|
|
|
5536
5556
|
},
|
|
5537
5557
|
children: [
|
|
5538
5558
|
/* @__PURE__ */ e(
|
|
5539
|
-
|
|
5559
|
+
st,
|
|
5540
5560
|
{
|
|
5541
5561
|
checked: p.includes(x.value),
|
|
5542
5562
|
onChange: () => {
|
|
@@ -5630,7 +5650,7 @@ const Yo = 240, qn = ({
|
|
|
5630
5650
|
}
|
|
5631
5651
|
)
|
|
5632
5652
|
] });
|
|
5633
|
-
},
|
|
5653
|
+
}, fl = ({
|
|
5634
5654
|
direction: t
|
|
5635
5655
|
}) => {
|
|
5636
5656
|
const r = "var(--sa-text-primary, #292a2e)", n = "var(--sa-text-subtle, #8c8f97)";
|
|
@@ -5670,7 +5690,7 @@ const Yo = 240, qn = ({
|
|
|
5670
5690
|
]
|
|
5671
5691
|
}
|
|
5672
5692
|
);
|
|
5673
|
-
},
|
|
5693
|
+
}, ml = ({ frozen: t }) => /* @__PURE__ */ d(
|
|
5674
5694
|
"svg",
|
|
5675
5695
|
{
|
|
5676
5696
|
width: "11",
|
|
@@ -5686,7 +5706,7 @@ const Yo = 240, qn = ({
|
|
|
5686
5706
|
/* @__PURE__ */ e("path", { d: t ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
5687
5707
|
]
|
|
5688
5708
|
}
|
|
5689
|
-
), pr = "var(--sa-background-primary, #ffffff)",
|
|
5709
|
+
), pr = "var(--sa-background-primary, #ffffff)", wn = "var(--sa-background-primary-inverse, #f8f8f8)", gl = ({
|
|
5690
5710
|
columns: t,
|
|
5691
5711
|
records: r,
|
|
5692
5712
|
handleDetail: n,
|
|
@@ -5712,7 +5732,7 @@ const Yo = 240, qn = ({
|
|
|
5712
5732
|
onSortChange: R,
|
|
5713
5733
|
showActionDivider: W = !1
|
|
5714
5734
|
}) => {
|
|
5715
|
-
const E = F !== void 0, [Z, Q] =
|
|
5735
|
+
const E = F !== void 0, [Z, Q] = T(
|
|
5716
5736
|
I ?? null
|
|
5717
5737
|
), P = E ? F ?? null : Z, K = (H) => {
|
|
5718
5738
|
if (H.sortKey) return H.sortKey;
|
|
@@ -5722,20 +5742,20 @@ const Yo = 240, qn = ({
|
|
|
5722
5742
|
if (!w) return;
|
|
5723
5743
|
let B;
|
|
5724
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);
|
|
5725
|
-
}, ne = [n, o, i].filter((H) => H !== void 0).length, $ = !!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) => {
|
|
5726
5746
|
if (!w) return H;
|
|
5727
5747
|
if (typeof w == "function") return w(H);
|
|
5728
5748
|
if (typeof w == "string") return H[w];
|
|
5729
|
-
}, [we, ze] =
|
|
5749
|
+
}, [we, ze] = T(!1);
|
|
5730
5750
|
J(() => {
|
|
5731
5751
|
if (!(m != null && m.current)) return;
|
|
5732
5752
|
const H = m.current;
|
|
5733
5753
|
ze(H.scrollHeight > H.clientHeight);
|
|
5734
5754
|
}, [r, m]);
|
|
5735
|
-
const je =
|
|
5755
|
+
const je = le(null), [Ze, Ge] = T([]), [Fe, qe] = T(
|
|
5736
5756
|
() => S ?? {}
|
|
5737
|
-
), De =
|
|
5738
|
-
|
|
5757
|
+
), De = le(null);
|
|
5758
|
+
rt(() => {
|
|
5739
5759
|
if (!p || !je.current) {
|
|
5740
5760
|
Ge([]);
|
|
5741
5761
|
return;
|
|
@@ -5748,7 +5768,7 @@ const Yo = 240, qn = ({
|
|
|
5748
5768
|
w[G] = B, G < p && (B += O.offsetWidth);
|
|
5749
5769
|
}), Ge(w);
|
|
5750
5770
|
}, [p, t, r, Fe]);
|
|
5751
|
-
const
|
|
5771
|
+
const ot = (H) => {
|
|
5752
5772
|
g && g(H < p ? H : H + 1);
|
|
5753
5773
|
}, ke = (H, w) => {
|
|
5754
5774
|
const B = Fe[H];
|
|
@@ -5766,21 +5786,21 @@ const Yo = 240, qn = ({
|
|
|
5766
5786
|
const G = document.body.style.userSelect, ue = document.body.style.cursor;
|
|
5767
5787
|
document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
|
|
5768
5788
|
const Be = (ie) => {
|
|
5769
|
-
var
|
|
5789
|
+
var lt;
|
|
5770
5790
|
const xe = De.current;
|
|
5771
5791
|
if (!xe) return;
|
|
5772
|
-
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));
|
|
5773
5793
|
qe(
|
|
5774
|
-
(
|
|
5794
|
+
(ct) => ct[xe.colIndex] === Se ? ct : { ...ct, [xe.colIndex]: Se }
|
|
5775
5795
|
);
|
|
5776
5796
|
}, me = () => {
|
|
5777
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));
|
|
5778
5798
|
};
|
|
5779
5799
|
document.addEventListener("mousemove", Be), document.addEventListener("mouseup", me);
|
|
5780
5800
|
};
|
|
5781
|
-
return /* @__PURE__ */ e("div", { ref: je, children: /* @__PURE__ */ d(
|
|
5801
|
+
return /* @__PURE__ */ e("div", { ref: je, children: /* @__PURE__ */ d(Vt, { fullWidth: !0, children: [
|
|
5782
5802
|
/* @__PURE__ */ e(
|
|
5783
|
-
|
|
5803
|
+
Rn,
|
|
5784
5804
|
{
|
|
5785
5805
|
style: {
|
|
5786
5806
|
height: "40px",
|
|
@@ -5789,14 +5809,14 @@ const Yo = 240, qn = ({
|
|
|
5789
5809
|
children: /* @__PURE__ */ d(Ne, { children: [
|
|
5790
5810
|
t.map((H, w) => {
|
|
5791
5811
|
var Lt, mt;
|
|
5792
|
-
const B = p > 0 && w < p, O = Ze[w] ?? 0, G = Ue(H), Be = w === t.length - 1 &&
|
|
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(
|
|
5793
5813
|
z,
|
|
5794
5814
|
{
|
|
5795
5815
|
name: "InfoCircle",
|
|
5796
5816
|
size: "xs",
|
|
5797
5817
|
style: { flexShrink: 0, color: "var(--sa-icon-subtle, #8c8f97)", opacity: 0.75 }
|
|
5798
5818
|
}
|
|
5799
|
-
) : null,
|
|
5819
|
+
) : null, lt = /* @__PURE__ */ e("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: Ae }), ct = ie ? /* @__PURE__ */ d(
|
|
5800
5820
|
"button",
|
|
5801
5821
|
{
|
|
5802
5822
|
type: "button",
|
|
@@ -5818,13 +5838,13 @@ const Yo = 240, qn = ({
|
|
|
5818
5838
|
textAlign: H.textAlign === "text-right" ? "right" : H.textAlign === "text-center" ? "center" : "left"
|
|
5819
5839
|
},
|
|
5820
5840
|
children: [
|
|
5821
|
-
|
|
5841
|
+
lt,
|
|
5822
5842
|
Se,
|
|
5823
|
-
/* @__PURE__ */ e(
|
|
5843
|
+
/* @__PURE__ */ e(fl, { direction: xe })
|
|
5824
5844
|
]
|
|
5825
5845
|
}
|
|
5826
5846
|
) : /* @__PURE__ */ d("span", { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
5827
|
-
|
|
5847
|
+
lt,
|
|
5828
5848
|
Se
|
|
5829
5849
|
] });
|
|
5830
5850
|
return /* @__PURE__ */ d(
|
|
@@ -5855,9 +5875,9 @@ const Yo = 240, qn = ({
|
|
|
5855
5875
|
minWidth: 0
|
|
5856
5876
|
},
|
|
5857
5877
|
children: [
|
|
5858
|
-
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,
|
|
5859
5879
|
H.filter && /* @__PURE__ */ e(
|
|
5860
|
-
|
|
5880
|
+
hl,
|
|
5861
5881
|
{
|
|
5862
5882
|
filter: H.filter,
|
|
5863
5883
|
columnTitle: H.title
|
|
@@ -5866,7 +5886,7 @@ const Yo = 240, qn = ({
|
|
|
5866
5886
|
g && /* @__PURE__ */ e(
|
|
5867
5887
|
"button",
|
|
5868
5888
|
{
|
|
5869
|
-
onClick: () =>
|
|
5889
|
+
onClick: () => ot(w),
|
|
5870
5890
|
title: B ? "Unfreeze column" : "Freeze column",
|
|
5871
5891
|
style: {
|
|
5872
5892
|
background: "none",
|
|
@@ -5880,7 +5900,7 @@ const Yo = 240, qn = ({
|
|
|
5880
5900
|
opacity: B ? 1 : 0.45,
|
|
5881
5901
|
transition: "opacity 0.15s"
|
|
5882
5902
|
},
|
|
5883
|
-
children: /* @__PURE__ */ e(
|
|
5903
|
+
children: /* @__PURE__ */ e(ml, { frozen: B })
|
|
5884
5904
|
}
|
|
5885
5905
|
)
|
|
5886
5906
|
]
|
|
@@ -5912,7 +5932,7 @@ const Yo = 240, qn = ({
|
|
|
5912
5932
|
`table-head-${w}`
|
|
5913
5933
|
);
|
|
5914
5934
|
}),
|
|
5915
|
-
|
|
5935
|
+
V ? /* @__PURE__ */ e(
|
|
5916
5936
|
ht,
|
|
5917
5937
|
{
|
|
5918
5938
|
style: {
|
|
@@ -5945,8 +5965,8 @@ const Yo = 240, qn = ({
|
|
|
5945
5965
|
},
|
|
5946
5966
|
onMouseEnter: (B) => {
|
|
5947
5967
|
const O = B.currentTarget;
|
|
5948
|
-
O.style.backgroundColor =
|
|
5949
|
-
G.style.position === "sticky" && (G.style.backgroundColor =
|
|
5968
|
+
O.style.backgroundColor = wn, Array.from(O.querySelectorAll("td")).forEach((G) => {
|
|
5969
|
+
G.style.position === "sticky" && (G.style.backgroundColor = wn);
|
|
5950
5970
|
});
|
|
5951
5971
|
},
|
|
5952
5972
|
onMouseLeave: (B) => {
|
|
@@ -5992,7 +6012,7 @@ const Yo = 240, qn = ({
|
|
|
5992
6012
|
`row-${w}-col-${O}`
|
|
5993
6013
|
);
|
|
5994
6014
|
}),
|
|
5995
|
-
|
|
6015
|
+
V ? /* @__PURE__ */ e(Me, { style: {
|
|
5996
6016
|
width: fe,
|
|
5997
6017
|
position: "sticky",
|
|
5998
6018
|
right: 0,
|
|
@@ -6029,27 +6049,27 @@ const Yo = 240, qn = ({
|
|
|
6029
6049
|
onClick: () => i(H.id, H),
|
|
6030
6050
|
iconLeft: /* @__PURE__ */ e(z, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
|
|
6031
6051
|
}
|
|
6032
|
-
) }, "delete") : B === "custom" ? /* @__PURE__ */ e(
|
|
6052
|
+
) }, "delete") : B === "custom" ? /* @__PURE__ */ e(at.Fragment, { children: b == null ? void 0 : b(H) }, "custom") : null;
|
|
6033
6053
|
}) }) }) : null
|
|
6034
6054
|
]
|
|
6035
6055
|
},
|
|
6036
6056
|
`${H}${w}`
|
|
6037
6057
|
)) })
|
|
6038
6058
|
] }) });
|
|
6039
|
-
},
|
|
6059
|
+
}, pl = ({
|
|
6040
6060
|
wrapperProps: t,
|
|
6041
6061
|
dataTableProps: r,
|
|
6042
6062
|
headerProps: n,
|
|
6043
6063
|
footerProps: o
|
|
6044
6064
|
}) => {
|
|
6045
6065
|
var p;
|
|
6046
|
-
const i =
|
|
6066
|
+
const i = le(null), [l, c] = T(
|
|
6047
6067
|
(r == null ? void 0 : r.defaultFrozenCount) ?? 0
|
|
6048
|
-
), 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;
|
|
6049
6069
|
typeof u == "number" && (a.current = u);
|
|
6050
6070
|
const m = (o == null ? void 0 : o.showFooter) ?? (u === void 0 ? a.current !== 0 : u !== 0);
|
|
6051
|
-
return /* @__PURE__ */ d(
|
|
6052
|
-
s && /* @__PURE__ */ e(
|
|
6071
|
+
return /* @__PURE__ */ d(sl, { ...t, children: [
|
|
6072
|
+
s && /* @__PURE__ */ e(al, { ...n }),
|
|
6053
6073
|
/* @__PURE__ */ e(
|
|
6054
6074
|
f,
|
|
6055
6075
|
{
|
|
@@ -6061,7 +6081,7 @@ const Yo = 240, qn = ({
|
|
|
6061
6081
|
overflowX: "auto"
|
|
6062
6082
|
},
|
|
6063
6083
|
children: r ? /* @__PURE__ */ e(
|
|
6064
|
-
|
|
6084
|
+
gl,
|
|
6065
6085
|
{
|
|
6066
6086
|
...r,
|
|
6067
6087
|
scrollParentRef: i,
|
|
@@ -6072,7 +6092,7 @@ const Yo = 240, qn = ({
|
|
|
6072
6092
|
}
|
|
6073
6093
|
),
|
|
6074
6094
|
m && /* @__PURE__ */ e(
|
|
6075
|
-
|
|
6095
|
+
ul,
|
|
6076
6096
|
{
|
|
6077
6097
|
pagination: r == null ? void 0 : r.pagination,
|
|
6078
6098
|
pageKey: r == null ? void 0 : r.pageKey,
|
|
@@ -6084,12 +6104,12 @@ const Yo = 240, qn = ({
|
|
|
6084
6104
|
)
|
|
6085
6105
|
] });
|
|
6086
6106
|
};
|
|
6087
|
-
function
|
|
6107
|
+
function yl(t) {
|
|
6088
6108
|
return Xe(
|
|
6089
6109
|
t
|
|
6090
6110
|
);
|
|
6091
6111
|
}
|
|
6092
|
-
const
|
|
6112
|
+
const os = yl(pl), Dn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)", bl = ({
|
|
6093
6113
|
sortDir: t,
|
|
6094
6114
|
frozen: r
|
|
6095
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 }) => {
|
|
@@ -6124,7 +6144,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6124
6144
|
]
|
|
6125
6145
|
}
|
|
6126
6146
|
);
|
|
6127
|
-
},
|
|
6147
|
+
}, xl = ({
|
|
6128
6148
|
active: t,
|
|
6129
6149
|
canSort: r,
|
|
6130
6150
|
canHide: n,
|
|
@@ -6135,12 +6155,12 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6135
6155
|
onToggleFreeze: s,
|
|
6136
6156
|
onHide: a
|
|
6137
6157
|
}) => {
|
|
6138
|
-
const [u, m] =
|
|
6158
|
+
const [u, m] = T(!1), p = le(null), g = le(null), [b, k] = T(
|
|
6139
6159
|
{ top: 0, left: 0 }
|
|
6140
6160
|
);
|
|
6141
6161
|
J(() => {
|
|
6142
6162
|
if (u && p.current) {
|
|
6143
|
-
const M = p.current.getBoundingClientRect(), S = M.left +
|
|
6163
|
+
const M = p.current.getBoundingClientRect(), S = M.left + Dn > window.innerWidth;
|
|
6144
6164
|
k({
|
|
6145
6165
|
top: M.bottom + 6,
|
|
6146
6166
|
...S ? { right: window.innerWidth - M.right } : { left: M.left }
|
|
@@ -6181,7 +6201,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6181
6201
|
color: "var(--sa-text-subtle, #8c8f97)",
|
|
6182
6202
|
flexShrink: 0
|
|
6183
6203
|
},
|
|
6184
|
-
children: /* @__PURE__ */ e(
|
|
6204
|
+
children: /* @__PURE__ */ e(bl, { sortDir: o, frozen: i })
|
|
6185
6205
|
}
|
|
6186
6206
|
),
|
|
6187
6207
|
u && /* @__PURE__ */ d(
|
|
@@ -6193,7 +6213,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6193
6213
|
position: "fixed",
|
|
6194
6214
|
top: `${b.top}px`,
|
|
6195
6215
|
...b.left !== void 0 ? { left: `${b.left}px` } : { right: `${b.right}px` },
|
|
6196
|
-
minWidth:
|
|
6216
|
+
minWidth: Dn,
|
|
6197
6217
|
backgroundColor: "var(--sa-background-primary, #ffffff)",
|
|
6198
6218
|
border: yr,
|
|
6199
6219
|
borderRadius: "var(--sa-radii-sm, 6px)",
|
|
@@ -6247,15 +6267,15 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6247
6267
|
}
|
|
6248
6268
|
)
|
|
6249
6269
|
] });
|
|
6250
|
-
}, wt = "1px solid var(--sa-border-subtle, #0b120e24)",
|
|
6270
|
+
}, wt = "1px solid var(--sa-border-subtle, #0b120e24)", vl = "var(--sa-text-subtle, #8c8f97)", pt = "var(--sa-background-neutral, #f0f1f2)", kn = "2px 0 4px -2px rgba(0,0,0,0.15)", Dt = 40, br = "var(--sa-background-brand-subtlest)", It = {
|
|
6251
6271
|
display: "block",
|
|
6252
6272
|
overflow: "hidden",
|
|
6253
6273
|
textOverflow: "ellipsis",
|
|
6254
6274
|
whiteSpace: "nowrap"
|
|
6255
|
-
},
|
|
6256
|
-
if (typeof document > "u" || document.getElementById(
|
|
6275
|
+
}, Sn = "sa-table-layout-styles", Cl = () => {
|
|
6276
|
+
if (typeof document > "u" || document.getElementById(Sn)) return;
|
|
6257
6277
|
const t = document.createElement("style");
|
|
6258
|
-
t.id =
|
|
6278
|
+
t.id = Sn, t.textContent = `
|
|
6259
6279
|
.sa-table-layout tbody td {
|
|
6260
6280
|
transition: background-color 0.15s ease;
|
|
6261
6281
|
background-color: var(--sa-tl-bg, transparent);
|
|
@@ -6312,10 +6332,10 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6312
6332
|
box-shadow: 0 -2px 4px -2px rgba(0,0,0,0.15);
|
|
6313
6333
|
}
|
|
6314
6334
|
`, document.head.appendChild(t);
|
|
6315
|
-
}, kt = (t) => t === "right" ? "right" : t === "center" ? "center" : "left",
|
|
6335
|
+
}, kt = (t) => t === "right" ? "right" : t === "center" ? "center" : "left", wl = /^(#|rgb|hsl|var\()/, Ot = (t) => t ? wl.test(t) ? t : `var(--sa-background-${t})` : void 0, Dl = (t, r) => {
|
|
6316
6336
|
if (r)
|
|
6317
6337
|
return t[r];
|
|
6318
|
-
},
|
|
6338
|
+
}, kl = (t, r) => t == null && r == null ? 0 : t == null ? -1 : r == null ? 1 : typeof t == "number" && typeof r == "number" ? t - r : String(t).localeCompare(String(r)), ls = ({
|
|
6319
6339
|
columns: t,
|
|
6320
6340
|
data: r,
|
|
6321
6341
|
getRowKey: n,
|
|
@@ -6347,44 +6367,44 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6347
6367
|
onSelectionChange: K,
|
|
6348
6368
|
isRowSelectable: N
|
|
6349
6369
|
}) => {
|
|
6350
|
-
|
|
6351
|
-
const ne = !Le(M) && x !== "scroll", $ = !!(E != null && E.length), [
|
|
6370
|
+
Cl();
|
|
6371
|
+
const ne = !Le(M) && x !== "scroll", $ = !!(E != null && E.length), [V, j] = T(null);
|
|
6352
6372
|
J(() => {
|
|
6353
|
-
if (!
|
|
6373
|
+
if (!V) return;
|
|
6354
6374
|
const y = () => j(null), v = setTimeout(() => document.addEventListener("click", y), 0);
|
|
6355
6375
|
return () => {
|
|
6356
6376
|
clearTimeout(v), document.removeEventListener("click", y);
|
|
6357
6377
|
};
|
|
6358
|
-
}, [
|
|
6359
|
-
const [oe, ve] =
|
|
6378
|
+
}, [V]);
|
|
6379
|
+
const [oe, ve] = T(
|
|
6360
6380
|
() => /* @__PURE__ */ new Set()
|
|
6361
|
-
), Ce = a !== void 0, [fe, pe] =
|
|
6381
|
+
), Ce = a !== void 0, [fe, pe] = T({}), we = a ?? fe, ze = (y) => {
|
|
6362
6382
|
u == null || u(y), Ce || pe(y);
|
|
6363
|
-
}, je = p !== void 0, [Ze, Ge] =
|
|
6383
|
+
}, je = p !== void 0, [Ze, Ge] = T(
|
|
6364
6384
|
g ?? null
|
|
6365
6385
|
), Fe = je ? p ?? null : Ze, qe = !b, De = (y) => {
|
|
6366
6386
|
b == null || b(y), je || Ge(y);
|
|
6367
|
-
}, { headerGroups:
|
|
6387
|
+
}, { headerGroups: ot, leafColumns: ke, hasGroups: Ue } = ge(() => {
|
|
6368
6388
|
var ae;
|
|
6369
|
-
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) => {
|
|
6370
6390
|
var _e;
|
|
6371
|
-
if ((_e =
|
|
6372
|
-
const vt =
|
|
6373
|
-
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 };
|
|
6374
6394
|
}
|
|
6375
|
-
const be = { col:
|
|
6395
|
+
const be = { col: ce, key: v(ce, `${ye}`) };
|
|
6376
6396
|
return {
|
|
6377
|
-
col:
|
|
6397
|
+
col: ce,
|
|
6378
6398
|
key: be.key,
|
|
6379
6399
|
isGroup: !1,
|
|
6380
6400
|
leaves: y.has(be.key) ? [] : [be]
|
|
6381
6401
|
};
|
|
6382
|
-
}).filter((
|
|
6383
|
-
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);
|
|
6384
6404
|
if (!U && ((ae = we.order) != null && ae.length)) {
|
|
6385
|
-
const
|
|
6405
|
+
const ce = new Map(we.order.map((ye, be) => [ye, be]));
|
|
6386
6406
|
te = [...te].sort(
|
|
6387
|
-
(ye, be) => (
|
|
6407
|
+
(ye, be) => (ce.get(ye.key) ?? 1 / 0) - (ce.get(be.key) ?? 1 / 0)
|
|
6388
6408
|
);
|
|
6389
6409
|
}
|
|
6390
6410
|
return { headerGroups: L, leafColumns: te, hasGroups: U };
|
|
@@ -6400,18 +6420,18 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6400
6420
|
if (!y) return r;
|
|
6401
6421
|
const v = Fe.direction === "asc" ? 1 : -1;
|
|
6402
6422
|
return [...r].sort(
|
|
6403
|
-
(L, U) =>
|
|
6423
|
+
(L, U) => kl(B(y.col, L), B(y.col, U)) * v
|
|
6404
6424
|
);
|
|
6405
|
-
}, [r, qe, Fe, ke]), ue = !Ue && !H, Be = !!s && ue, [me, ie] =
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
}, [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(() => {
|
|
6409
6429
|
if (!ue || Se || !Ae.current) return;
|
|
6410
6430
|
const y = Ae.current.querySelectorAll("th.sa-tl-leaf");
|
|
6411
|
-
|
|
6431
|
+
lt(Array.from(y).map((v) => v.offsetWidth));
|
|
6412
6432
|
}, [Se, ue]);
|
|
6413
|
-
const [
|
|
6414
|
-
|
|
6433
|
+
const [ct, Lt] = T(0);
|
|
6434
|
+
rt(() => {
|
|
6415
6435
|
if (!Ue || !Ae.current) return;
|
|
6416
6436
|
const y = Ae.current.querySelector(":scope > tr");
|
|
6417
6437
|
y && Lt(y.offsetHeight);
|
|
@@ -6425,20 +6445,20 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6425
6445
|
let v = jr;
|
|
6426
6446
|
for (let L = 0; L < y; L++) v += Se[L] ?? 0;
|
|
6427
6447
|
return v;
|
|
6428
|
-
}, Qt =
|
|
6429
|
-
|
|
6448
|
+
}, Qt = le(null), [Xn, Kn] = T("100vh");
|
|
6449
|
+
rt(() => {
|
|
6430
6450
|
if (k !== void 0) return;
|
|
6431
6451
|
const y = () => {
|
|
6432
6452
|
if (Qt.current) {
|
|
6433
6453
|
const v = Qt.current.getBoundingClientRect().top;
|
|
6434
|
-
|
|
6454
|
+
Kn(
|
|
6435
6455
|
`calc(100vh - ${v}px - var(--sa-floating-footer-height, 0px) + 12px)`
|
|
6436
6456
|
);
|
|
6437
6457
|
}
|
|
6438
6458
|
};
|
|
6439
6459
|
return y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
|
|
6440
6460
|
}, [k]);
|
|
6441
|
-
const et = (y, v) => n ? n(y, v) : v, Yt = Q !== void 0, [Pr,
|
|
6461
|
+
const et = (y, v) => n ? n(y, v) : v, Yt = Q !== void 0, [Pr, ei] = T(
|
|
6442
6462
|
() => new Set(P ?? [])
|
|
6443
6463
|
), tt = ge(
|
|
6444
6464
|
() => Yt ? new Set(Q) : Pr,
|
|
@@ -6450,7 +6470,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6450
6470
|
);
|
|
6451
6471
|
}, [Z, !n]);
|
|
6452
6472
|
const Zr = (y) => {
|
|
6453
|
-
if (Yt ||
|
|
6473
|
+
if (Yt || ei(y), K) {
|
|
6454
6474
|
const v = G.filter((L, U) => y.has(et(L, U)));
|
|
6455
6475
|
K(Array.from(y), v);
|
|
6456
6476
|
}
|
|
@@ -6463,26 +6483,26 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6463
6483
|
).map(({ key: y }) => y) : [],
|
|
6464
6484
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6465
6485
|
[Z, G, N, n]
|
|
6466
|
-
), Gr = gt.filter((y) => tt.has(y)), er = gt.length > 0 && Gr.length === gt.length, qr = Gr.length > 0 && !er,
|
|
6486
|
+
), Gr = gt.filter((y) => tt.has(y)), er = gt.length > 0 && Gr.length === gt.length, qr = Gr.length > 0 && !er, ti = () => {
|
|
6467
6487
|
const y = new Set(tt);
|
|
6468
6488
|
er ? gt.forEach((v) => y.delete(v)) : gt.forEach((v) => y.add(v)), Zr(y);
|
|
6469
|
-
}, tr = (y, v, L) => y.render ? y.render(v, L, G) :
|
|
6489
|
+
}, tr = (y, v, L) => y.render ? y.render(v, L, G) : Dl(v, y.accessor), rr = ke.length + (Z ? 1 : 0) + ($ ? 1 : 0), Ur = ["80%", "55%", "70%", "45%", "90%", "60%"], ri = (y, v) => Ur[(y * 7 + v * 3) % Ur.length], ni = (y, v) => /* @__PURE__ */ e(Ke, { height: 14, width: ri(y, v), borderRadius: "rounded-sm" }), ii = Array.from({ length: W }, (y, v) => /* @__PURE__ */ d(Ne, { children: [
|
|
6470
6490
|
Z && /* @__PURE__ */ e(Me, { style: { width: Dt, padding: 0 }, children: /* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ke, { height: 14, width: 14, borderRadius: "rounded-sm" }) }) }),
|
|
6471
6491
|
ke.map(({ col: L, key: U }, te) => /* @__PURE__ */ e(
|
|
6472
6492
|
Me,
|
|
6473
6493
|
{
|
|
6474
6494
|
style: { textAlign: kt(L.align) },
|
|
6475
|
-
children:
|
|
6495
|
+
children: ni(v, te)
|
|
6476
6496
|
},
|
|
6477
6497
|
`sa-tl-sk-${v}-${U}`
|
|
6478
6498
|
)),
|
|
6479
6499
|
$ && /* @__PURE__ */ e(Me, { style: { width: 1, padding: 0, border: "none" } })
|
|
6480
|
-
] }, `sa-tl-sk-${v}`)),
|
|
6500
|
+
] }, `sa-tl-sk-${v}`)), oi = (y, v) => {
|
|
6481
6501
|
v || ze({
|
|
6482
6502
|
...we,
|
|
6483
6503
|
hidden: [...we.hidden ?? [], y]
|
|
6484
6504
|
});
|
|
6485
|
-
},
|
|
6505
|
+
}, li = (y) => ze({
|
|
6486
6506
|
...we,
|
|
6487
6507
|
frozenKey: we.frozenKey === y ? void 0 : y
|
|
6488
6508
|
}), Mt = (y) => (E ?? []).filter((v) => {
|
|
@@ -6501,10 +6521,10 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6501
6521
|
background: "linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"
|
|
6502
6522
|
}, Wt = (y, v, L, U) => {
|
|
6503
6523
|
var _e;
|
|
6504
|
-
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(
|
|
6505
6525
|
_,
|
|
6506
6526
|
{
|
|
6507
|
-
size:
|
|
6527
|
+
size: ce,
|
|
6508
6528
|
variant: y.variant ?? "tertiary",
|
|
6509
6529
|
tone: y.tone ?? "neutral",
|
|
6510
6530
|
disabled: te,
|
|
@@ -6514,24 +6534,24 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6514
6534
|
}
|
|
6515
6535
|
), be = y.tooltip;
|
|
6516
6536
|
return be ? /* @__PURE__ */ e(Ie, { label: be, position: "top-end", children: ye }) : ye;
|
|
6517
|
-
},
|
|
6537
|
+
}, ci = (y, v) => {
|
|
6518
6538
|
const L = Mt(y);
|
|
6519
6539
|
if (!L.length) return null;
|
|
6520
6540
|
if (L.length > 5) {
|
|
6521
|
-
const te = et(y, v), ae = (
|
|
6541
|
+
const te = et(y, v), ae = (V == null ? void 0 : V.rowKey) === te;
|
|
6522
6542
|
return /* @__PURE__ */ e(
|
|
6523
6543
|
"div",
|
|
6524
6544
|
{
|
|
6525
6545
|
className: "sa-tl-row-actions",
|
|
6526
6546
|
style: Jr,
|
|
6527
|
-
onClick: (
|
|
6547
|
+
onClick: (ce) => ce.stopPropagation(),
|
|
6528
6548
|
children: /* @__PURE__ */ e(Ie, { label: "Aksi lainnya", position: "top", children: /* @__PURE__ */ e(
|
|
6529
6549
|
_,
|
|
6530
6550
|
{
|
|
6531
6551
|
size: "xs",
|
|
6532
6552
|
variant: "tertiary",
|
|
6533
|
-
onClick: (
|
|
6534
|
-
const ye =
|
|
6553
|
+
onClick: (ce) => {
|
|
6554
|
+
const ye = ce.currentTarget.getBoundingClientRect();
|
|
6535
6555
|
j(ae ? null : {
|
|
6536
6556
|
rowKey: te,
|
|
6537
6557
|
top: ye.bottom + 4,
|
|
@@ -6544,16 +6564,16 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6544
6564
|
}
|
|
6545
6565
|
);
|
|
6546
6566
|
}
|
|
6547
|
-
return /* @__PURE__ */ e("div", { className: "sa-tl-row-actions", style: Jr, children: L.map((te) => /* @__PURE__ */ e(
|
|
6548
|
-
}, ci = (y, v) => {
|
|
6549
|
-
const L = Mt(y);
|
|
6550
|
-
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(st.Fragment, { children: Wt(U, y, v, { showLabel: !0, size: "sm" }) }, U.key)) }) : null;
|
|
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)) });
|
|
6551
6568
|
}, si = (y, v) => {
|
|
6552
6569
|
const L = Mt(y);
|
|
6553
|
-
return L.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap:
|
|
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;
|
|
6571
|
+
}, ai = (y, v) => {
|
|
6572
|
+
const L = Mt(y);
|
|
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;
|
|
6554
6574
|
}, nr = (y, v) => {
|
|
6555
|
-
const { col: L, key: U } = y, te = ft.get(U) ?? 0, ae = $r(te),
|
|
6556
|
-
|
|
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(
|
|
6576
|
+
xl,
|
|
6557
6577
|
{
|
|
6558
6578
|
active: !!ye || ae,
|
|
6559
6579
|
canSort: O(L),
|
|
@@ -6562,8 +6582,8 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6562
6582
|
frozen: ae,
|
|
6563
6583
|
onSort: (Ct) => De({ key: U, direction: Ct }),
|
|
6564
6584
|
onClearSort: () => De(null),
|
|
6565
|
-
onToggleFreeze: () =>
|
|
6566
|
-
onHide: () =>
|
|
6585
|
+
onToggleFreeze: () => li(U),
|
|
6586
|
+
onHide: () => oi(U, L.locked)
|
|
6567
6587
|
}
|
|
6568
6588
|
) : null, _e = L.align === "right", vt = L.align === "right" ? "flex-end" : L.align === "center" ? "center" : "flex-start", Je = /* @__PURE__ */ d(
|
|
6569
6589
|
"span",
|
|
@@ -6600,7 +6620,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6600
6620
|
left: ae ? _r(te) : void 0,
|
|
6601
6621
|
zIndex: ae ? 3 : 2,
|
|
6602
6622
|
backgroundColor: pt,
|
|
6603
|
-
boxShadow:
|
|
6623
|
+
boxShadow: ce ? kn : void 0
|
|
6604
6624
|
},
|
|
6605
6625
|
children: /* @__PURE__ */ e(
|
|
6606
6626
|
"div",
|
|
@@ -6623,7 +6643,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6623
6643
|
},
|
|
6624
6644
|
`th-${U}`
|
|
6625
6645
|
);
|
|
6626
|
-
},
|
|
6646
|
+
}, di = () => {
|
|
6627
6647
|
const y = [];
|
|
6628
6648
|
for (let v = 0; v < ke.length; ) {
|
|
6629
6649
|
const L = ke[v], U = L.col.headerColSpan ?? 1, te = Math.max(1, Math.min(U, ke.length - v));
|
|
@@ -6654,13 +6674,13 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6654
6674
|
},
|
|
6655
6675
|
onClick: (v) => v.stopPropagation(),
|
|
6656
6676
|
children: /* @__PURE__ */ e(
|
|
6657
|
-
|
|
6677
|
+
st,
|
|
6658
6678
|
{
|
|
6659
6679
|
size: "sm",
|
|
6660
6680
|
variant: qr ? "indeterminate" : "select",
|
|
6661
6681
|
checked: er || qr,
|
|
6662
6682
|
disabled: gt.length === 0,
|
|
6663
|
-
onChange:
|
|
6683
|
+
onChange: ti,
|
|
6664
6684
|
"aria-label": "Pilih semua baris di halaman ini"
|
|
6665
6685
|
}
|
|
6666
6686
|
)
|
|
@@ -6668,7 +6688,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6668
6688
|
)
|
|
6669
6689
|
},
|
|
6670
6690
|
"th-select"
|
|
6671
|
-
),
|
|
6691
|
+
), ui = (y, v, L) => {
|
|
6672
6692
|
const U = et(y, v);
|
|
6673
6693
|
return /* @__PURE__ */ e(
|
|
6674
6694
|
Me,
|
|
@@ -6693,7 +6713,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6693
6713
|
},
|
|
6694
6714
|
onClick: (te) => te.stopPropagation(),
|
|
6695
6715
|
children: /* @__PURE__ */ e(
|
|
6696
|
-
|
|
6716
|
+
st,
|
|
6697
6717
|
{
|
|
6698
6718
|
size: "sm",
|
|
6699
6719
|
checked: tt.has(U),
|
|
@@ -6706,10 +6726,10 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6706
6726
|
},
|
|
6707
6727
|
`tl-select-${v}`
|
|
6708
6728
|
);
|
|
6709
|
-
}, ir = ke.filter((y) => !y.col.hideOnMobile), or = ir.find((y) => y.col.primary) ?? ir[0],
|
|
6729
|
+
}, ir = ke.filter((y) => !y.col.hideOnMobile), or = ir.find((y) => y.col.primary) ?? ir[0], hi = ir.filter((y) => y !== or), fi = (y) => ve((v) => {
|
|
6710
6730
|
const L = new Set(v);
|
|
6711
6731
|
return L.has(y) ? L.delete(y) : L.add(y), L;
|
|
6712
|
-
}), Yr = (y, v) =>
|
|
6732
|
+
}), Yr = (y, v) => hi.map(({ col: L, key: U }) => {
|
|
6713
6733
|
const te = tr(L, y, v), ae = typeof te == "string" || typeof te == "number" ? /* @__PURE__ */ e(
|
|
6714
6734
|
D,
|
|
6715
6735
|
{
|
|
@@ -6748,7 +6768,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6748
6768
|
{
|
|
6749
6769
|
color: "subtle",
|
|
6750
6770
|
fontWeight: "medium",
|
|
6751
|
-
style: { color:
|
|
6771
|
+
style: { color: vl, flexShrink: 0 },
|
|
6752
6772
|
children: L.title
|
|
6753
6773
|
}
|
|
6754
6774
|
) : /* @__PURE__ */ e("div", { style: { flexShrink: 0 }, children: L.title }),
|
|
@@ -6760,7 +6780,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6760
6780
|
}), lr = (y, v) => {
|
|
6761
6781
|
const L = or ? tr(or.col, y, v) : null;
|
|
6762
6782
|
return typeof L == "string" || typeof L == "number" ? /* @__PURE__ */ e(D, { as: "span", style: It, children: L }) : /* @__PURE__ */ e("span", { style: It, children: L });
|
|
6763
|
-
},
|
|
6783
|
+
}, mi = /* @__PURE__ */ e(
|
|
6764
6784
|
f,
|
|
6765
6785
|
{
|
|
6766
6786
|
style: { display: "flex", flexDirection: "column", gap: 8, padding: 8 },
|
|
@@ -6797,7 +6817,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6797
6817
|
},
|
|
6798
6818
|
children: I == null ? void 0 : I.content
|
|
6799
6819
|
}
|
|
6800
|
-
),
|
|
6820
|
+
), gi = R ? mi : G.length === 0 ? Xr : x === "expand" ? /* @__PURE__ */ e(f, { style: { display: "flex", flexDirection: "column" }, children: G.map((y, v) => {
|
|
6801
6821
|
const L = et(y, v), U = oe.has(L), ae = Z && tt.has(L) ? br : Ot(o == null ? void 0 : o(y, v));
|
|
6802
6822
|
return /* @__PURE__ */ d(
|
|
6803
6823
|
"div",
|
|
@@ -6817,7 +6837,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6817
6837
|
flexShrink: 0
|
|
6818
6838
|
},
|
|
6819
6839
|
children: /* @__PURE__ */ e(
|
|
6820
|
-
|
|
6840
|
+
st,
|
|
6821
6841
|
{
|
|
6822
6842
|
size: "sm",
|
|
6823
6843
|
checked: tt.has(L),
|
|
@@ -6831,7 +6851,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6831
6851
|
"button",
|
|
6832
6852
|
{
|
|
6833
6853
|
type: "button",
|
|
6834
|
-
onClick: () =>
|
|
6854
|
+
onClick: () => fi(L),
|
|
6835
6855
|
style: {
|
|
6836
6856
|
flex: 1,
|
|
6837
6857
|
minWidth: 0,
|
|
@@ -6860,7 +6880,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6860
6880
|
]
|
|
6861
6881
|
}
|
|
6862
6882
|
),
|
|
6863
|
-
$ &&
|
|
6883
|
+
$ && ai(y, v)
|
|
6864
6884
|
] }),
|
|
6865
6885
|
U && /* @__PURE__ */ e(
|
|
6866
6886
|
"div",
|
|
@@ -6899,7 +6919,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6899
6919
|
children: [
|
|
6900
6920
|
Xt(y, v) ? /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
6901
6921
|
/* @__PURE__ */ e(
|
|
6902
|
-
|
|
6922
|
+
st,
|
|
6903
6923
|
{
|
|
6904
6924
|
size: "sm",
|
|
6905
6925
|
checked: tt.has(L),
|
|
@@ -6913,14 +6933,14 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6913
6933
|
lr(y, v)
|
|
6914
6934
|
),
|
|
6915
6935
|
Yr(y, v),
|
|
6916
|
-
$ &&
|
|
6936
|
+
$ && si(y, v)
|
|
6917
6937
|
]
|
|
6918
6938
|
},
|
|
6919
6939
|
L
|
|
6920
6940
|
);
|
|
6921
6941
|
})
|
|
6922
6942
|
}
|
|
6923
|
-
),
|
|
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(
|
|
6924
6944
|
Me,
|
|
6925
6945
|
{
|
|
6926
6946
|
colSpan: L.colSpan,
|
|
@@ -6929,25 +6949,25 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6929
6949
|
children: L.content
|
|
6930
6950
|
},
|
|
6931
6951
|
`tl-foot-${v}-${U}`
|
|
6932
|
-
)) }, `tl-foot-${v}`)) : null,
|
|
6933
|
-
|
|
6952
|
+
)) }, `tl-foot-${v}`)) : null, bi = /* @__PURE__ */ d(
|
|
6953
|
+
Vt,
|
|
6934
6954
|
{
|
|
6935
6955
|
className: "sa-table-layout",
|
|
6936
6956
|
fullWidth: !0,
|
|
6937
6957
|
size: i,
|
|
6938
|
-
resizable:
|
|
6958
|
+
resizable: pi,
|
|
6939
6959
|
style: Kr ? { tableLayout: "fixed" } : void 0,
|
|
6940
6960
|
onWidthsChange: Be ? ie : void 0,
|
|
6941
6961
|
children: [
|
|
6942
|
-
|
|
6962
|
+
yi && /* @__PURE__ */ d("colgroup", { children: [
|
|
6943
6963
|
Z && /* @__PURE__ */ e("col", { style: { width: Dt } }),
|
|
6944
6964
|
ke.map(({ col: y, key: v }, L) => /* @__PURE__ */ e("col", { style: { width: mt(y, L) } }, `col-${v}`)),
|
|
6945
6965
|
$ && /* @__PURE__ */ e("col", { style: { width: 1 } })
|
|
6946
6966
|
] }),
|
|
6947
|
-
/* @__PURE__ */ e(
|
|
6967
|
+
/* @__PURE__ */ e(Rn, { ref: Ae, children: Ue ? /* @__PURE__ */ d(re, { children: [
|
|
6948
6968
|
/* @__PURE__ */ d(Ne, { children: [
|
|
6949
6969
|
Z && Qr({ rowSpan: 2 }),
|
|
6950
|
-
|
|
6970
|
+
ot.map(
|
|
6951
6971
|
(y) => y.isGroup ? /* @__PURE__ */ e(
|
|
6952
6972
|
ht,
|
|
6953
6973
|
{
|
|
@@ -6981,12 +7001,12 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
6981
7001
|
}
|
|
6982
7002
|
)
|
|
6983
7003
|
] }),
|
|
6984
|
-
/* @__PURE__ */ e(Ne, { children:
|
|
6985
|
-
(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 })) : []
|
|
6986
7006
|
) })
|
|
6987
7007
|
] }) : /* @__PURE__ */ d(Ne, { children: [
|
|
6988
7008
|
Z && Qr(),
|
|
6989
|
-
|
|
7009
|
+
di(),
|
|
6990
7010
|
$ && /* @__PURE__ */ e(
|
|
6991
7011
|
ht,
|
|
6992
7012
|
{
|
|
@@ -7003,18 +7023,18 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7003
7023
|
}
|
|
7004
7024
|
)
|
|
7005
7025
|
] }) }),
|
|
7006
|
-
/* @__PURE__ */ e(wr, { children: R ?
|
|
7026
|
+
/* @__PURE__ */ e(wr, { children: R ? ii : G.length === 0 ? /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Me, { colSpan: rr, children: Xr }) }) : /* @__PURE__ */ d(re, { children: [
|
|
7007
7027
|
G.map((y, v) => {
|
|
7008
7028
|
const L = S == null ? void 0 : S(
|
|
7009
7029
|
y,
|
|
7010
7030
|
v,
|
|
7011
7031
|
v > 0 ? G[v - 1] : void 0
|
|
7012
7032
|
), te = Z && tt.has(et(y, v)) ? br : Ot(o == null ? void 0 : o(y, v));
|
|
7013
|
-
return /* @__PURE__ */ d(
|
|
7033
|
+
return /* @__PURE__ */ d(at.Fragment, { children: [
|
|
7014
7034
|
L != null && L !== !1 && /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Me, { colSpan: rr, style: { backgroundColor: pt }, children: L }) }),
|
|
7015
7035
|
/* @__PURE__ */ d(Ne, { children: [
|
|
7016
|
-
Z &&
|
|
7017
|
-
ke.map(({ col: ae, key:
|
|
7036
|
+
Z && ui(y, v, te),
|
|
7037
|
+
ke.map(({ col: ae, key: ce }, ye) => {
|
|
7018
7038
|
var tn;
|
|
7019
7039
|
const be = (tn = ae.cellProps) == null ? void 0 : tn.call(ae, y, v, G);
|
|
7020
7040
|
if (be != null && be.hidden) return null;
|
|
@@ -7032,7 +7052,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7032
7052
|
position: _e ? "sticky" : void 0,
|
|
7033
7053
|
left: _e ? _r(ye) : void 0,
|
|
7034
7054
|
zIndex: _e ? 1 : void 0,
|
|
7035
|
-
boxShadow: vt ?
|
|
7055
|
+
boxShadow: vt ? kn : void 0,
|
|
7036
7056
|
...en ? { "--sa-tl-bg": en } : {}
|
|
7037
7057
|
},
|
|
7038
7058
|
children: typeof Je == "string" ? /* @__PURE__ */ e(
|
|
@@ -7048,7 +7068,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7048
7068
|
}
|
|
7049
7069
|
) : Je
|
|
7050
7070
|
},
|
|
7051
|
-
`tl-cell-${v}-${
|
|
7071
|
+
`tl-cell-${v}-${ce}`
|
|
7052
7072
|
);
|
|
7053
7073
|
}),
|
|
7054
7074
|
$ && /* @__PURE__ */ e(
|
|
@@ -7063,7 +7083,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7063
7083
|
zIndex: 2,
|
|
7064
7084
|
border: "none"
|
|
7065
7085
|
},
|
|
7066
|
-
children:
|
|
7086
|
+
children: ci(y, v)
|
|
7067
7087
|
}
|
|
7068
7088
|
)
|
|
7069
7089
|
] })
|
|
@@ -7071,10 +7091,10 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7071
7091
|
}),
|
|
7072
7092
|
A != null && /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Me, { colSpan: rr, children: A }) })
|
|
7073
7093
|
] }) }),
|
|
7074
|
-
zt && /* @__PURE__ */ e(
|
|
7094
|
+
zt && /* @__PURE__ */ e(Si, { className: F ? "sa-tl-sticky-foot" : void 0, children: zt })
|
|
7075
7095
|
]
|
|
7076
7096
|
}
|
|
7077
|
-
), cr =
|
|
7097
|
+
), cr = V ? G.findIndex((y, v) => et(y, v) === V.rowKey) : -1, sr = cr >= 0 ? G[cr] : null;
|
|
7078
7098
|
return /* @__PURE__ */ d(re, { children: [
|
|
7079
7099
|
/* @__PURE__ */ e(
|
|
7080
7100
|
f,
|
|
@@ -7083,25 +7103,25 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7083
7103
|
fullWidth: !0,
|
|
7084
7104
|
style: {
|
|
7085
7105
|
overflow: "auto",
|
|
7086
|
-
height: k ??
|
|
7106
|
+
height: k ?? Xn
|
|
7087
7107
|
},
|
|
7088
7108
|
children: ne ? /* @__PURE__ */ d(re, { children: [
|
|
7089
|
-
|
|
7090
|
-
zt && !R && G.length > 0 && /* @__PURE__ */ e(f, { style: { borderTop: wt }, children: /* @__PURE__ */ e(
|
|
7091
|
-
] }) :
|
|
7109
|
+
gi,
|
|
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 }) }) })
|
|
7111
|
+
] }) : bi
|
|
7092
7112
|
}
|
|
7093
7113
|
),
|
|
7094
|
-
|
|
7114
|
+
V && sr && /* @__PURE__ */ e(
|
|
7095
7115
|
"div",
|
|
7096
7116
|
{
|
|
7097
7117
|
className: "sa-tl-kebab-menu",
|
|
7098
|
-
style: { top:
|
|
7118
|
+
style: { top: V.top, right: V.right },
|
|
7099
7119
|
onClick: (y) => y.stopPropagation(),
|
|
7100
7120
|
children: Mt(sr).map((y) => /* @__PURE__ */ e("div", { style: { padding: "2px 4px" }, children: Wt(y, sr, cr, { showLabel: !0, size: "sm" }) }, y.key))
|
|
7101
7121
|
}
|
|
7102
7122
|
)
|
|
7103
7123
|
] });
|
|
7104
|
-
}, xr = (t) => t === "asc" || t === "desc",
|
|
7124
|
+
}, xr = (t) => t === "asc" || t === "desc", cs = (t = {}) => {
|
|
7105
7125
|
const {
|
|
7106
7126
|
sortKeyParam: r = "sortBy",
|
|
7107
7127
|
sortOrderParam: n = "sortOrder",
|
|
@@ -7109,8 +7129,8 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7109
7129
|
defaultSort: i = null,
|
|
7110
7130
|
paramKeys: l,
|
|
7111
7131
|
scopeId: c,
|
|
7112
|
-
storage: s =
|
|
7113
|
-
} = t, { searchParams: a, setSearchParams: u, searchQueries: m } = $e(), p = a.toString(), g = c ? Et.tableSort(c) : void 0, b =
|
|
7132
|
+
storage: s = Pn
|
|
7133
|
+
} = t, { searchParams: a, setSearchParams: u, searchQueries: m } = $e(), p = a.toString(), g = c ? Et.tableSort(c) : void 0, b = le(!1);
|
|
7114
7134
|
J(() => {
|
|
7115
7135
|
if (b.current || (b.current = !0, !g) || a.has(r) || a.has(n))
|
|
7116
7136
|
return;
|
|
@@ -7144,7 +7164,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7144
7164
|
}, Or = ({
|
|
7145
7165
|
of: t,
|
|
7146
7166
|
render: r
|
|
7147
|
-
}) =>
|
|
7167
|
+
}) => Wi.toArray(t == null ? void 0 : t.map((n, o, i) => r(n, o, i))), se = ({
|
|
7148
7168
|
condition: t,
|
|
7149
7169
|
fallback: r,
|
|
7150
7170
|
children: n,
|
|
@@ -7160,7 +7180,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7160
7180
|
color: t.color || "gray-700",
|
|
7161
7181
|
children: t.children
|
|
7162
7182
|
}
|
|
7163
|
-
),
|
|
7183
|
+
), it = (t) => /* @__PURE__ */ e(D, { color: "red-600", fontSize: "sm", children: t.message }), Sl = ({
|
|
7164
7184
|
size: t = "md",
|
|
7165
7185
|
direction: r = "vertical",
|
|
7166
7186
|
requiredTitle: n = "(Required)",
|
|
@@ -7239,13 +7259,13 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7239
7259
|
fullWidth: !0
|
|
7240
7260
|
}
|
|
7241
7261
|
),
|
|
7242
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
7262
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage }),
|
|
7243
7263
|
i.inputProps.extended && i.inputProps.extended
|
|
7244
7264
|
] })
|
|
7245
7265
|
]
|
|
7246
7266
|
}
|
|
7247
7267
|
);
|
|
7248
|
-
},
|
|
7268
|
+
}, Fl = ({
|
|
7249
7269
|
size: t = "md",
|
|
7250
7270
|
direction: r = "vertical",
|
|
7251
7271
|
requiredTitle: n = "(Required)",
|
|
@@ -7331,15 +7351,15 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7331
7351
|
)
|
|
7332
7352
|
}
|
|
7333
7353
|
),
|
|
7334
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
7354
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage }),
|
|
7335
7355
|
i.inputProps.extended && i.inputProps.extended
|
|
7336
7356
|
] })
|
|
7337
7357
|
]
|
|
7338
7358
|
}
|
|
7339
7359
|
);
|
|
7340
|
-
},
|
|
7360
|
+
}, El = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-border-danger)" : "var(--sa-border-subtle)", Ll = (t) => {
|
|
7341
7361
|
var s;
|
|
7342
|
-
const [r, n] =
|
|
7362
|
+
const [r, n] = T(!1), o = (a) => {
|
|
7343
7363
|
a.preventDefault(), a.stopPropagation();
|
|
7344
7364
|
}, i = (a) => {
|
|
7345
7365
|
a.preventDefault(), a.stopPropagation(), a.dataTransfer && t.handleOnFileChange(a.dataTransfer.files.item(0));
|
|
@@ -7364,7 +7384,7 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7364
7384
|
paddingBlock: "md",
|
|
7365
7385
|
borderRadius: "rounded-md",
|
|
7366
7386
|
style: {
|
|
7367
|
-
border: r ? "1px solid var(--sa-border-info)" : `1px solid ${
|
|
7387
|
+
border: r ? "1px solid var(--sa-border-info)" : `1px solid ${El(t.errorMessage, t.status)}`
|
|
7368
7388
|
},
|
|
7369
7389
|
children: [
|
|
7370
7390
|
/* @__PURE__ */ e(
|
|
@@ -7406,17 +7426,17 @@ const ns = gl(ml), wn = 200, yr = "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
|
7406
7426
|
}
|
|
7407
7427
|
);
|
|
7408
7428
|
};
|
|
7409
|
-
function
|
|
7429
|
+
function ss(t) {
|
|
7410
7430
|
return t.split(" ").map((r) => r[0]).join("").slice(0, 2).toUpperCase();
|
|
7411
7431
|
}
|
|
7412
|
-
const
|
|
7432
|
+
const Ml = (t) => {
|
|
7413
7433
|
const r = {
|
|
7414
7434
|
day: "2-digit",
|
|
7415
7435
|
month: "short",
|
|
7416
7436
|
year: "numeric"
|
|
7417
7437
|
};
|
|
7418
7438
|
return t.toLocaleDateString("id-ID", r);
|
|
7419
|
-
},
|
|
7439
|
+
}, as = (t) => {
|
|
7420
7440
|
const r = {
|
|
7421
7441
|
Jan: 0,
|
|
7422
7442
|
Feb: 1,
|
|
@@ -7436,7 +7456,7 @@ const El = (t) => {
|
|
|
7436
7456
|
const o = parseInt(n[0], 10), i = r[n[1]], l = parseInt(n[2], 10);
|
|
7437
7457
|
return isNaN(o) || isNaN(i) || isNaN(l) ? null : new Date(l, i, o);
|
|
7438
7458
|
};
|
|
7439
|
-
function
|
|
7459
|
+
function ds(t, r = !0) {
|
|
7440
7460
|
if (!t)
|
|
7441
7461
|
return "Rp 0";
|
|
7442
7462
|
const n = typeof t == "number" ? t.toString() : t;
|
|
@@ -7451,19 +7471,19 @@ String.prototype.toTitleCase = function() {
|
|
|
7451
7471
|
String.prototype.toNumber = function() {
|
|
7452
7472
|
return Number(this);
|
|
7453
7473
|
};
|
|
7454
|
-
const
|
|
7474
|
+
const us = (t) => {
|
|
7455
7475
|
const r = t.split(" ");
|
|
7456
7476
|
let n = r[0].charAt(0);
|
|
7457
7477
|
return r.length > 1 && (n += "" + r[1].charAt(0)), n.toUpperCase();
|
|
7458
7478
|
};
|
|
7459
|
-
function
|
|
7479
|
+
function hs(t) {
|
|
7460
7480
|
const r = typeof t == "string" ? new Date(t) : t;
|
|
7461
7481
|
if (isNaN(r.getTime()))
|
|
7462
7482
|
throw new Error("Invalid date format");
|
|
7463
7483
|
const n = r.getFullYear(), o = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
|
|
7464
7484
|
return `${n}-${o}-${i}`;
|
|
7465
7485
|
}
|
|
7466
|
-
const
|
|
7486
|
+
const Wl = "sa-admin", Qe = (t) => `var(--${Wl}-${t})`, fs = {
|
|
7467
7487
|
base: {
|
|
7468
7488
|
borderColor: Qe("base-border-color"),
|
|
7469
7489
|
textColor: Qe("base-text-color"),
|
|
@@ -7481,22 +7501,22 @@ const Ll = "sa-admin", Qe = (t) => `var(--${Ll}-${t})`, us = {
|
|
|
7481
7501
|
collapseWidth: Qe("sidebar-collapse-width"),
|
|
7482
7502
|
collapseV2Width: Qe("sidebar-v2-collapse-width")
|
|
7483
7503
|
}
|
|
7484
|
-
},
|
|
7504
|
+
}, ms = 24 * 60 * 60 * 1e3, gs = (t) => {
|
|
7485
7505
|
const r = "14px poppins", o = document.createElement("canvas").getContext("2d");
|
|
7486
7506
|
o.font = r;
|
|
7487
7507
|
const i = o.measureText(t).width;
|
|
7488
7508
|
return Number(Math.ceil(i));
|
|
7489
|
-
},
|
|
7490
|
-
function
|
|
7509
|
+
}, zl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Bl = /--+/, Al = /-$/;
|
|
7510
|
+
function ps(t, r) {
|
|
7491
7511
|
return JSON.stringify(t) !== JSON.stringify(r);
|
|
7492
7512
|
}
|
|
7493
|
-
function
|
|
7513
|
+
function ys(t) {
|
|
7494
7514
|
return /^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t);
|
|
7495
7515
|
}
|
|
7496
|
-
function
|
|
7516
|
+
function bs(t) {
|
|
7497
7517
|
return /^[A-Za-z\s]+$/.test(t);
|
|
7498
7518
|
}
|
|
7499
|
-
const
|
|
7519
|
+
const xs = (t) => {
|
|
7500
7520
|
const r = /^[0-9]$/, n = [
|
|
7501
7521
|
"ArrowLeft",
|
|
7502
7522
|
"ArrowRight",
|
|
@@ -7508,7 +7528,7 @@ const ys = (t) => {
|
|
|
7508
7528
|
"Tab"
|
|
7509
7529
|
];
|
|
7510
7530
|
(t.ctrlKey || t.metaKey) && (t.key === "a" || t.key === "c" || t.key === "v") || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
7511
|
-
},
|
|
7531
|
+
}, vs = (t) => {
|
|
7512
7532
|
const r = /^[0-9]$/, n = [
|
|
7513
7533
|
"ArrowLeft",
|
|
7514
7534
|
"ArrowRight",
|
|
@@ -7520,7 +7540,7 @@ const ys = (t) => {
|
|
|
7520
7540
|
"Tab"
|
|
7521
7541
|
];
|
|
7522
7542
|
(t.ctrlKey || t.metaKey) && t.key === "v" || r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
7523
|
-
},
|
|
7543
|
+
}, Cs = (t) => {
|
|
7524
7544
|
const r = /^[0-9.]$/, n = [
|
|
7525
7545
|
"ArrowLeft",
|
|
7526
7546
|
"ArrowRight",
|
|
@@ -7532,11 +7552,11 @@ const ys = (t) => {
|
|
|
7532
7552
|
"Tab"
|
|
7533
7553
|
];
|
|
7534
7554
|
(t.ctrlKey || t.metaKey) && t.key === "v" || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
7535
|
-
},
|
|
7536
|
-
function
|
|
7537
|
-
return !(
|
|
7555
|
+
}, ws = (t) => zl.test(t);
|
|
7556
|
+
function Ds(t) {
|
|
7557
|
+
return !(Bl.test(t) || Al.test(t));
|
|
7538
7558
|
}
|
|
7539
|
-
const
|
|
7559
|
+
const ks = (t) => {
|
|
7540
7560
|
const r = [
|
|
7541
7561
|
"ArrowLeft",
|
|
7542
7562
|
"ArrowRight",
|
|
@@ -7553,7 +7573,7 @@ const ws = (t) => {
|
|
|
7553
7573
|
return;
|
|
7554
7574
|
const n = t.currentTarget.value;
|
|
7555
7575
|
/^[0-9]$/.test(t.key) || t.key === "." && !n.includes(".") || t.key === "-" && n.length === 0 && !n.includes("-") || r.includes(t.key) || t.preventDefault();
|
|
7556
|
-
},
|
|
7576
|
+
}, Ss = (t) => {
|
|
7557
7577
|
const r = document.getElementById(t);
|
|
7558
7578
|
if (r) {
|
|
7559
7579
|
const n = r.getBoundingClientRect(), o = window.scrollY + n.top - 80;
|
|
@@ -7563,7 +7583,7 @@ const ws = (t) => {
|
|
|
7563
7583
|
});
|
|
7564
7584
|
}
|
|
7565
7585
|
};
|
|
7566
|
-
function
|
|
7586
|
+
function Rl(t) {
|
|
7567
7587
|
const r = t.toLowerCase();
|
|
7568
7588
|
if (["kb", "mb", "gb"].find((l) => r.endsWith(l)))
|
|
7569
7589
|
return t;
|
|
@@ -7572,11 +7592,11 @@ function Bl(t) {
|
|
|
7572
7592
|
throw new Error("Invalid size format");
|
|
7573
7593
|
return i >= 1e6 ? `${(i / 1e6).toFixed(2)}MB` : i >= 1e3 ? `${(i / 1e3).toFixed(2)}KB` : `${i}B`;
|
|
7574
7594
|
}
|
|
7575
|
-
function
|
|
7595
|
+
function Il(t) {
|
|
7576
7596
|
const r = t.split("/");
|
|
7577
7597
|
return r[r.length - 1];
|
|
7578
7598
|
}
|
|
7579
|
-
const
|
|
7599
|
+
const Ol = (t) => {
|
|
7580
7600
|
var r, n;
|
|
7581
7601
|
return /* @__PURE__ */ d(
|
|
7582
7602
|
f,
|
|
@@ -7621,7 +7641,7 @@ const Rl = (t) => {
|
|
|
7621
7641
|
whiteSpace: "nowrap",
|
|
7622
7642
|
overflow: "hidden"
|
|
7623
7643
|
},
|
|
7624
|
-
children: t.defaultFile ?
|
|
7644
|
+
children: t.defaultFile ? Il(t.defaultFile.url) : (r = t.fileSelected) == null ? void 0 : r.name
|
|
7625
7645
|
}
|
|
7626
7646
|
),
|
|
7627
7647
|
t.defaultFile ? (t.defaultFile.size || t.defaultFile.date) && /* @__PURE__ */ d(de, { direction: "row", gap: "xs", align: "center", children: [
|
|
@@ -7629,9 +7649,9 @@ const Rl = (t) => {
|
|
|
7629
7649
|
t.defaultFile.size && t.defaultFile.date && /* @__PURE__ */ e(z, { name: "Dot", size: "xs" }),
|
|
7630
7650
|
t.defaultFile.date && /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: t.defaultFile.date })
|
|
7631
7651
|
] }) : /* @__PURE__ */ d(de, { direction: "row", gap: "xs", align: "center", children: [
|
|
7632
|
-
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", children:
|
|
7652
|
+
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", children: Rl(((n = t.fileSelected) == null ? void 0 : n.size.toString()) || "100000") }),
|
|
7633
7653
|
/* @__PURE__ */ e(z, { name: "Dot", size: "xs" }),
|
|
7634
|
-
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children:
|
|
7654
|
+
/* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: Ml(/* @__PURE__ */ new Date()) })
|
|
7635
7655
|
] })
|
|
7636
7656
|
] })
|
|
7637
7657
|
] }),
|
|
@@ -7651,13 +7671,13 @@ const Rl = (t) => {
|
|
|
7651
7671
|
]
|
|
7652
7672
|
}
|
|
7653
7673
|
);
|
|
7654
|
-
},
|
|
7674
|
+
}, Hl = ({
|
|
7655
7675
|
status: t = "default",
|
|
7656
7676
|
labelPosition: r = "outside-top",
|
|
7657
7677
|
...n
|
|
7658
7678
|
}) => {
|
|
7659
7679
|
var g;
|
|
7660
|
-
const o =
|
|
7680
|
+
const o = le(null), i = () => {
|
|
7661
7681
|
if (n.defaultFile) {
|
|
7662
7682
|
window.open(n.defaultFile.url);
|
|
7663
7683
|
return;
|
|
@@ -7710,7 +7730,7 @@ const Rl = (t) => {
|
|
|
7710
7730
|
children: [
|
|
7711
7731
|
m,
|
|
7712
7732
|
(n.fileSelected || n.defaultFile) && /* @__PURE__ */ e(
|
|
7713
|
-
|
|
7733
|
+
Ol,
|
|
7714
7734
|
{
|
|
7715
7735
|
fileSelected: n.fileSelected,
|
|
7716
7736
|
defaultFile: n.defaultFile,
|
|
@@ -7719,7 +7739,7 @@ const Rl = (t) => {
|
|
|
7719
7739
|
}
|
|
7720
7740
|
),
|
|
7721
7741
|
!n.fileSelected && !n.defaultFile && /* @__PURE__ */ e(
|
|
7722
|
-
|
|
7742
|
+
Ll,
|
|
7723
7743
|
{
|
|
7724
7744
|
fileSupports: n.fileSupportOption,
|
|
7725
7745
|
isDesktop: l,
|
|
@@ -7747,7 +7767,7 @@ const Rl = (t) => {
|
|
|
7747
7767
|
p,
|
|
7748
7768
|
u
|
|
7749
7769
|
] });
|
|
7750
|
-
},
|
|
7770
|
+
}, Tl = ({
|
|
7751
7771
|
size: t = "md",
|
|
7752
7772
|
direction: r = "vertical",
|
|
7753
7773
|
requiredTitle: n = "(Required)",
|
|
@@ -7817,18 +7837,18 @@ const Rl = (t) => {
|
|
|
7817
7837
|
),
|
|
7818
7838
|
/* @__PURE__ */ d(de, { direction: "column", gap: "xs", children: [
|
|
7819
7839
|
/* @__PURE__ */ e(
|
|
7820
|
-
|
|
7840
|
+
Hl,
|
|
7821
7841
|
{
|
|
7822
7842
|
...i.inputProps,
|
|
7823
7843
|
status: i.errorMessage ? "error" : "default"
|
|
7824
7844
|
}
|
|
7825
7845
|
),
|
|
7826
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
7846
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage })
|
|
7827
7847
|
] })
|
|
7828
7848
|
]
|
|
7829
7849
|
}
|
|
7830
7850
|
);
|
|
7831
|
-
},
|
|
7851
|
+
}, Vl = ({
|
|
7832
7852
|
size: t = "md",
|
|
7833
7853
|
direction: r = "vertical",
|
|
7834
7854
|
requiredTitle: n = "(Required)",
|
|
@@ -7919,7 +7939,7 @@ const Rl = (t) => {
|
|
|
7919
7939
|
...l.badgeContainerProps,
|
|
7920
7940
|
children: [
|
|
7921
7941
|
/* @__PURE__ */ e(
|
|
7922
|
-
|
|
7942
|
+
st,
|
|
7923
7943
|
{
|
|
7924
7944
|
name: g.name,
|
|
7925
7945
|
value: g.id,
|
|
@@ -7933,7 +7953,7 @@ const Rl = (t) => {
|
|
|
7933
7953
|
]
|
|
7934
7954
|
}
|
|
7935
7955
|
) : /* @__PURE__ */ e(
|
|
7936
|
-
|
|
7956
|
+
st,
|
|
7937
7957
|
{
|
|
7938
7958
|
name: g.name,
|
|
7939
7959
|
value: g.id,
|
|
@@ -7947,11 +7967,11 @@ const Rl = (t) => {
|
|
|
7947
7967
|
)
|
|
7948
7968
|
}
|
|
7949
7969
|
),
|
|
7950
|
-
!c && l.errorMessage && /* @__PURE__ */ e(
|
|
7970
|
+
!c && l.errorMessage && /* @__PURE__ */ e(it, { message: l.errorMessage })
|
|
7951
7971
|
]
|
|
7952
7972
|
}
|
|
7953
7973
|
);
|
|
7954
|
-
},
|
|
7974
|
+
}, Nl = ({
|
|
7955
7975
|
position: t = "vertical",
|
|
7956
7976
|
size: r = "md",
|
|
7957
7977
|
fullWidth: n = !1,
|
|
@@ -7993,7 +8013,7 @@ const Rl = (t) => {
|
|
|
7993
8013
|
})),
|
|
7994
8014
|
render: ({ value: c, id: s, isChecked: a, subInput: u, label: m, description: p }) => /* @__PURE__ */ d(f, { direction: "column", gap: "xs", customMaxWidth: i, children: [
|
|
7995
8015
|
/* @__PURE__ */ e(
|
|
7996
|
-
|
|
8016
|
+
Mi,
|
|
7997
8017
|
{
|
|
7998
8018
|
id: `${s.toString()}-${c}`,
|
|
7999
8019
|
name: o.groupName || m,
|
|
@@ -8025,11 +8045,11 @@ const Rl = (t) => {
|
|
|
8025
8045
|
)
|
|
8026
8046
|
}
|
|
8027
8047
|
),
|
|
8028
|
-
o.errorMessage && /* @__PURE__ */ e(
|
|
8048
|
+
o.errorMessage && /* @__PURE__ */ e(it, { message: o.errorMessage })
|
|
8029
8049
|
]
|
|
8030
8050
|
}
|
|
8031
8051
|
);
|
|
8032
|
-
},
|
|
8052
|
+
}, $l = ({
|
|
8033
8053
|
size: t = "md",
|
|
8034
8054
|
direction: r = "vertical",
|
|
8035
8055
|
requiredTitle: n = "(Required)",
|
|
@@ -8099,7 +8119,7 @@ const Rl = (t) => {
|
|
|
8099
8119
|
),
|
|
8100
8120
|
/* @__PURE__ */ d(de, { direction: "column", gap: "xs", children: [
|
|
8101
8121
|
/* @__PURE__ */ e(
|
|
8102
|
-
|
|
8122
|
+
Fi,
|
|
8103
8123
|
{
|
|
8104
8124
|
ref: i.inputRef,
|
|
8105
8125
|
size: t,
|
|
@@ -8107,12 +8127,12 @@ const Rl = (t) => {
|
|
|
8107
8127
|
status: i.errorMessage ? "error" : "default"
|
|
8108
8128
|
}
|
|
8109
8129
|
),
|
|
8110
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
8130
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage })
|
|
8111
8131
|
] })
|
|
8112
8132
|
]
|
|
8113
8133
|
}
|
|
8114
8134
|
);
|
|
8115
|
-
},
|
|
8135
|
+
}, jl = ({
|
|
8116
8136
|
size: t = "md",
|
|
8117
8137
|
direction: r = "vertical",
|
|
8118
8138
|
requiredTitle: n = "(Required)",
|
|
@@ -8190,16 +8210,16 @@ const Rl = (t) => {
|
|
|
8190
8210
|
description: l.description
|
|
8191
8211
|
}
|
|
8192
8212
|
),
|
|
8193
|
-
l.errorMessage && /* @__PURE__ */ e(
|
|
8213
|
+
l.errorMessage && /* @__PURE__ */ e(it, { message: l.errorMessage })
|
|
8194
8214
|
]
|
|
8195
8215
|
}
|
|
8196
8216
|
);
|
|
8197
|
-
},
|
|
8217
|
+
}, _l = ({
|
|
8198
8218
|
variant: t = "primary",
|
|
8199
8219
|
size: r = "md",
|
|
8200
8220
|
...n
|
|
8201
8221
|
}) => {
|
|
8202
|
-
const o =
|
|
8222
|
+
const o = Li(), i = (c) => {
|
|
8203
8223
|
var a, u, m, p, g, b;
|
|
8204
8224
|
if (!c) return;
|
|
8205
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];
|
|
@@ -8239,7 +8259,7 @@ const Rl = (t) => {
|
|
|
8239
8259
|
children: l()
|
|
8240
8260
|
}
|
|
8241
8261
|
);
|
|
8242
|
-
},
|
|
8262
|
+
}, Pl = (t) => /* @__PURE__ */ e(
|
|
8243
8263
|
Ye.H5,
|
|
8244
8264
|
{
|
|
8245
8265
|
props: {
|
|
@@ -8247,7 +8267,7 @@ const Rl = (t) => {
|
|
|
8247
8267
|
},
|
|
8248
8268
|
children: t.title
|
|
8249
8269
|
}
|
|
8250
|
-
),
|
|
8270
|
+
), Zl = ({
|
|
8251
8271
|
size: t = "md",
|
|
8252
8272
|
direction: r = "vertical",
|
|
8253
8273
|
requiredTitle: n = "(Required)",
|
|
@@ -8333,13 +8353,13 @@ const Rl = (t) => {
|
|
|
8333
8353
|
)
|
|
8334
8354
|
}
|
|
8335
8355
|
),
|
|
8336
|
-
!l && i.errorMessage && /* @__PURE__ */ e(
|
|
8356
|
+
!l && i.errorMessage && /* @__PURE__ */ e(it, { message: i.errorMessage })
|
|
8337
8357
|
] })
|
|
8338
8358
|
]
|
|
8339
8359
|
}
|
|
8340
8360
|
);
|
|
8341
8361
|
};
|
|
8342
|
-
async function
|
|
8362
|
+
async function Gl(t, r) {
|
|
8343
8363
|
const n = new Image();
|
|
8344
8364
|
n.src = t, await new Promise((l, c) => {
|
|
8345
8365
|
n.onload = l, n.onerror = c;
|
|
@@ -8366,7 +8386,7 @@ async function Pl(t, r) {
|
|
|
8366
8386
|
}, "image/png");
|
|
8367
8387
|
});
|
|
8368
8388
|
}
|
|
8369
|
-
const
|
|
8389
|
+
const Fn = {
|
|
8370
8390
|
"1:1": 1,
|
|
8371
8391
|
"4:3": 4 / 3,
|
|
8372
8392
|
"16:9": 16 / 9,
|
|
@@ -8375,7 +8395,7 @@ const Sn = {
|
|
|
8375
8395
|
"2:3": 2 / 3,
|
|
8376
8396
|
"3:2": 3 / 2,
|
|
8377
8397
|
"32:9": 32 / 9
|
|
8378
|
-
},
|
|
8398
|
+
}, ql = Wr(
|
|
8379
8399
|
({
|
|
8380
8400
|
handleUpload: t,
|
|
8381
8401
|
urlImage: r,
|
|
@@ -8388,18 +8408,18 @@ const Sn = {
|
|
|
8388
8408
|
maxFileSize: a = 2,
|
|
8389
8409
|
onError: u
|
|
8390
8410
|
}, m) => {
|
|
8391
|
-
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);
|
|
8392
8412
|
J(() => {
|
|
8393
8413
|
r === null && i(null);
|
|
8394
8414
|
}, [r]);
|
|
8395
8415
|
const E = q(
|
|
8396
|
-
(
|
|
8416
|
+
(V, j) => {
|
|
8397
8417
|
W(j);
|
|
8398
8418
|
},
|
|
8399
8419
|
[]
|
|
8400
|
-
), Z = (
|
|
8420
|
+
), Z = (V) => {
|
|
8401
8421
|
var ve;
|
|
8402
|
-
const j = (ve =
|
|
8422
|
+
const j = (ve = V.target.files) == null ? void 0 : ve[0];
|
|
8403
8423
|
if (!j) return;
|
|
8404
8424
|
const oe = new FileReader();
|
|
8405
8425
|
oe.onload = () => {
|
|
@@ -8408,27 +8428,27 @@ const Sn = {
|
|
|
8408
8428
|
}, Q = async () => {
|
|
8409
8429
|
if (!(!k || !R))
|
|
8410
8430
|
try {
|
|
8411
|
-
const
|
|
8412
|
-
if (a &&
|
|
8431
|
+
const V = await Gl(k, R);
|
|
8432
|
+
if (a && V.size > a * 1024 * 1024) {
|
|
8413
8433
|
u == null || u(`Ukuran file maksimal ${a}MB`);
|
|
8414
8434
|
return;
|
|
8415
8435
|
}
|
|
8416
|
-
t == null || t(
|
|
8417
|
-
const j = URL.createObjectURL(
|
|
8418
|
-
i(j,
|
|
8436
|
+
t == null || t(V);
|
|
8437
|
+
const j = URL.createObjectURL(V);
|
|
8438
|
+
i(j, V), S(!1);
|
|
8419
8439
|
} catch {
|
|
8420
8440
|
u == null || u("Gagal memproses gambar");
|
|
8421
8441
|
}
|
|
8422
|
-
}, P =
|
|
8442
|
+
}, P = le(null), K = () => {
|
|
8423
8443
|
P.current && P.current.click();
|
|
8424
8444
|
};
|
|
8425
|
-
|
|
8445
|
+
zi(m, () => ({
|
|
8426
8446
|
openFileDialog: () => {
|
|
8427
|
-
var
|
|
8428
|
-
(
|
|
8447
|
+
var V;
|
|
8448
|
+
(V = P.current) == null || V.click();
|
|
8429
8449
|
}
|
|
8430
8450
|
}));
|
|
8431
|
-
const N = parseInt(l, 10), Y =
|
|
8451
|
+
const N = parseInt(l, 10), Y = Fn[c];
|
|
8432
8452
|
let ne, $;
|
|
8433
8453
|
return Y >= 1 ? ($ = N, ne = N * Y) : (ne = N, $ = N / Y), /* @__PURE__ */ d(
|
|
8434
8454
|
f,
|
|
@@ -8563,7 +8583,7 @@ const Sn = {
|
|
|
8563
8583
|
)
|
|
8564
8584
|
}
|
|
8565
8585
|
),
|
|
8566
|
-
M &&
|
|
8586
|
+
M && Bi.createPortal(
|
|
8567
8587
|
/* @__PURE__ */ e(
|
|
8568
8588
|
"div",
|
|
8569
8589
|
{
|
|
@@ -8589,7 +8609,7 @@ const Sn = {
|
|
|
8589
8609
|
display: "flex",
|
|
8590
8610
|
flexDirection: "column"
|
|
8591
8611
|
},
|
|
8592
|
-
onClick: (
|
|
8612
|
+
onClick: (V) => V.stopPropagation(),
|
|
8593
8613
|
children: [
|
|
8594
8614
|
/* @__PURE__ */ e(
|
|
8595
8615
|
"div",
|
|
@@ -8601,12 +8621,12 @@ const Sn = {
|
|
|
8601
8621
|
backgroundColor: "var(--sa-color-gray-100)"
|
|
8602
8622
|
},
|
|
8603
8623
|
children: k && /* @__PURE__ */ e(
|
|
8604
|
-
|
|
8624
|
+
Ai,
|
|
8605
8625
|
{
|
|
8606
8626
|
image: k,
|
|
8607
8627
|
crop: A,
|
|
8608
8628
|
zoom: F,
|
|
8609
|
-
aspect: c ?
|
|
8629
|
+
aspect: c ? Fn[c] : void 0,
|
|
8610
8630
|
onCropChange: C,
|
|
8611
8631
|
onZoomChange: I,
|
|
8612
8632
|
onCropComplete: E,
|
|
@@ -8644,7 +8664,7 @@ const Sn = {
|
|
|
8644
8664
|
}
|
|
8645
8665
|
);
|
|
8646
8666
|
}
|
|
8647
|
-
),
|
|
8667
|
+
), Ul = ({
|
|
8648
8668
|
size: t = "md",
|
|
8649
8669
|
direction: r = "vertical",
|
|
8650
8670
|
requiredTitle: n = "(Required)",
|
|
@@ -8714,13 +8734,13 @@ const Sn = {
|
|
|
8714
8734
|
}
|
|
8715
8735
|
),
|
|
8716
8736
|
/* @__PURE__ */ d(de, { direction: "column", gap: "xs", children: [
|
|
8717
|
-
/* @__PURE__ */ e(
|
|
8718
|
-
!c && l.errorMessage && /* @__PURE__ */ e(
|
|
8737
|
+
/* @__PURE__ */ e(ql, { ...l.inputProps }),
|
|
8738
|
+
!c && l.errorMessage && /* @__PURE__ */ e(it, { message: l.errorMessage })
|
|
8719
8739
|
] })
|
|
8720
8740
|
]
|
|
8721
8741
|
}
|
|
8722
8742
|
);
|
|
8723
|
-
},
|
|
8743
|
+
}, Jl = ({
|
|
8724
8744
|
size: t = "md",
|
|
8725
8745
|
direction: r = "vertical",
|
|
8726
8746
|
requiredTitle: n = "(Required)",
|
|
@@ -8792,7 +8812,7 @@ const Sn = {
|
|
|
8792
8812
|
]
|
|
8793
8813
|
}
|
|
8794
8814
|
);
|
|
8795
|
-
},
|
|
8815
|
+
}, Fs = ({
|
|
8796
8816
|
items: t,
|
|
8797
8817
|
id: r,
|
|
8798
8818
|
handleOnUpdate: n,
|
|
@@ -8801,7 +8821,7 @@ const Sn = {
|
|
|
8801
8821
|
disabled: l = !1
|
|
8802
8822
|
}) => {
|
|
8803
8823
|
var m;
|
|
8804
|
-
const [c, s] =
|
|
8824
|
+
const [c, s] = T([]);
|
|
8805
8825
|
J(() => {
|
|
8806
8826
|
t && s([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
|
|
8807
8827
|
}, [t]);
|
|
@@ -8829,21 +8849,21 @@ const Sn = {
|
|
|
8829
8849
|
)
|
|
8830
8850
|
}
|
|
8831
8851
|
);
|
|
8832
|
-
},
|
|
8833
|
-
InputText:
|
|
8834
|
-
InputDropdown:
|
|
8835
|
-
InputSingleFile:
|
|
8836
|
-
CheckBoxOptions:
|
|
8837
|
-
RadioOptions:
|
|
8838
|
-
InputTextArea:
|
|
8839
|
-
ToggleForm:
|
|
8840
|
-
ActionButton:
|
|
8841
|
-
FormTitle:
|
|
8842
|
-
InputDate:
|
|
8843
|
-
InputImgFile:
|
|
8844
|
-
Custom:
|
|
8845
|
-
},
|
|
8846
|
-
const [r, n] =
|
|
8852
|
+
}, Es = {
|
|
8853
|
+
InputText: Sl,
|
|
8854
|
+
InputDropdown: Fl,
|
|
8855
|
+
InputSingleFile: Tl,
|
|
8856
|
+
CheckBoxOptions: Vl,
|
|
8857
|
+
RadioOptions: Nl,
|
|
8858
|
+
InputTextArea: $l,
|
|
8859
|
+
ToggleForm: jl,
|
|
8860
|
+
ActionButton: _l,
|
|
8861
|
+
FormTitle: Pl,
|
|
8862
|
+
InputDate: Zl,
|
|
8863
|
+
InputImgFile: Ul,
|
|
8864
|
+
Custom: Jl
|
|
8865
|
+
}, Ql = ({ customBottom: t }) => {
|
|
8866
|
+
const [r, n] = T(!1), o = () => {
|
|
8847
8867
|
window.scrollY > window.screenY ? n(!0) : n(!1);
|
|
8848
8868
|
}, i = () => {
|
|
8849
8869
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
@@ -8894,8 +8914,8 @@ const Sn = {
|
|
|
8894
8914
|
)
|
|
8895
8915
|
}
|
|
8896
8916
|
);
|
|
8897
|
-
},
|
|
8898
|
-
.${
|
|
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} {
|
|
8899
8919
|
display: block;
|
|
8900
8920
|
box-sizing: border-box;
|
|
8901
8921
|
width: 100%;
|
|
@@ -8910,48 +8930,48 @@ const Sn = {
|
|
|
8910
8930
|
outline: none;
|
|
8911
8931
|
transition: background-color 140ms ease, box-shadow 140ms ease;
|
|
8912
8932
|
}
|
|
8913
|
-
.${
|
|
8933
|
+
.${Ve}[data-divider="true"] {
|
|
8914
8934
|
border-bottom: 1px solid var(--sa-border-subtle, #0b120e24);
|
|
8915
8935
|
}
|
|
8916
8936
|
/* The first row also gets a top line so the list is bounded on its own,
|
|
8917
8937
|
without relying on a wrapping container's border. Adjacent rows still
|
|
8918
8938
|
share a single 1px line (only border-bottom), never a doubled 2px one. */
|
|
8919
|
-
.${
|
|
8939
|
+
.${Ve}[data-divider="true"]:first-child {
|
|
8920
8940
|
border-top: 1px solid var(--sa-border-subtle, #0b120e24);
|
|
8921
8941
|
}
|
|
8922
|
-
.${
|
|
8942
|
+
.${Ve}:hover {
|
|
8923
8943
|
background: var(--sa-background-neutral, #f0f1f2);
|
|
8924
8944
|
}
|
|
8925
|
-
.${
|
|
8926
|
-
.${
|
|
8945
|
+
.${Ve}:focus-visible,
|
|
8946
|
+
.${Ve}[data-active="true"] {
|
|
8927
8947
|
background: var(--sa-background-brand-subtlest, #e6edf6);
|
|
8928
8948
|
}
|
|
8929
|
-
.${
|
|
8949
|
+
.${Ve}:focus-visible {
|
|
8930
8950
|
background: var(--sa-background-neutral, #f0f1f2);
|
|
8931
8951
|
}
|
|
8932
8952
|
/* Accent bar — sign of the offset picks the edge it hugs. */
|
|
8933
|
-
.${
|
|
8934
|
-
.${
|
|
8935
|
-
box-shadow: ${
|
|
8953
|
+
.${Ve}[data-accent="left"]:focus-visible,
|
|
8954
|
+
.${Ve}[data-accent="left"][data-active="true"] {
|
|
8955
|
+
box-shadow: ${Yl};
|
|
8936
8956
|
}
|
|
8937
|
-
.${
|
|
8938
|
-
.${
|
|
8939
|
-
box-shadow: ${
|
|
8957
|
+
.${Ve}[data-accent="right"]:focus-visible,
|
|
8958
|
+
.${Ve}[data-accent="right"][data-active="true"] {
|
|
8959
|
+
box-shadow: ${Xl};
|
|
8940
8960
|
}
|
|
8941
|
-
.${
|
|
8961
|
+
.${Ve}[data-active="true"]:hover {
|
|
8942
8962
|
background: var(--sa-background-brand-subtlest, #e6edf6);
|
|
8943
8963
|
}
|
|
8944
|
-
.${
|
|
8964
|
+
.${Ve}:disabled {
|
|
8945
8965
|
cursor: not-allowed;
|
|
8946
8966
|
opacity: 0.55;
|
|
8947
8967
|
}
|
|
8948
8968
|
`;
|
|
8949
|
-
function
|
|
8950
|
-
if (typeof document > "u" || document.getElementById(
|
|
8969
|
+
function ec() {
|
|
8970
|
+
if (typeof document > "u" || document.getElementById(En)) return;
|
|
8951
8971
|
const t = document.createElement("style");
|
|
8952
|
-
t.id =
|
|
8972
|
+
t.id = En, t.textContent = Kl, document.head.appendChild(t);
|
|
8953
8973
|
}
|
|
8954
|
-
const
|
|
8974
|
+
const Ls = ({
|
|
8955
8975
|
active: t = !1,
|
|
8956
8976
|
accentSide: r = "left",
|
|
8957
8977
|
onClick: n,
|
|
@@ -8965,11 +8985,11 @@ const Fs = ({
|
|
|
8965
8985
|
className: m,
|
|
8966
8986
|
style: p,
|
|
8967
8987
|
"aria-label": g
|
|
8968
|
-
}) => (J(
|
|
8988
|
+
}) => (J(ec, []), /* @__PURE__ */ e(
|
|
8969
8989
|
"button",
|
|
8970
8990
|
{
|
|
8971
8991
|
type: "button",
|
|
8972
|
-
className: [
|
|
8992
|
+
className: [Ve, m].filter(Boolean).join(" "),
|
|
8973
8993
|
"data-active": t ? "true" : "false",
|
|
8974
8994
|
"data-accent": r,
|
|
8975
8995
|
"data-divider": a ? "true" : "false",
|
|
@@ -9035,7 +9055,7 @@ const Fs = ({
|
|
|
9035
9055
|
}
|
|
9036
9056
|
)
|
|
9037
9057
|
}
|
|
9038
|
-
)), vr = 18,
|
|
9058
|
+
)), vr = 18, tc = 40, Ln = "280ms cubic-bezier(0.4, 0, 0.2, 1)", Yn = "var(--sa-border-subtle, #0b120e24)", rc = `1px solid ${Yn}`, Mn = "var(--sa-background-white, #ffffff)", Ms = ({
|
|
9039
9059
|
children: t,
|
|
9040
9060
|
header: r,
|
|
9041
9061
|
collapsed: n,
|
|
@@ -9057,16 +9077,16 @@ const Fs = ({
|
|
|
9057
9077
|
wrapperProps: A,
|
|
9058
9078
|
contentProps: C
|
|
9059
9079
|
}) => {
|
|
9060
|
-
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 = () => {
|
|
9061
9081
|
const oe = !E;
|
|
9062
9082
|
I || W(oe), i == null || i(oe);
|
|
9063
|
-
}, 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 = $ ? {
|
|
9064
9084
|
position: "absolute",
|
|
9065
9085
|
top: 0,
|
|
9066
9086
|
bottom: 0,
|
|
9067
9087
|
width: l,
|
|
9068
9088
|
transform: `translateX(${E ? Q ? "-100%" : "100%" : "0"})`,
|
|
9069
|
-
transition: `transform ${
|
|
9089
|
+
transition: `transform ${Ln}`,
|
|
9070
9090
|
zIndex: 50,
|
|
9071
9091
|
...Q ? { left: 0 } : { right: 0 },
|
|
9072
9092
|
// boxShadow: isLeft
|
|
@@ -9080,13 +9100,13 @@ const Fs = ({
|
|
|
9080
9100
|
width: E ? 0 : l,
|
|
9081
9101
|
flexShrink: 0,
|
|
9082
9102
|
height: K,
|
|
9083
|
-
transition: `width ${
|
|
9103
|
+
transition: `width ${Ln}`,
|
|
9084
9104
|
...b
|
|
9085
9105
|
}, j = /* @__PURE__ */ d(
|
|
9086
9106
|
f,
|
|
9087
9107
|
{
|
|
9088
9108
|
className: x,
|
|
9089
|
-
style:
|
|
9109
|
+
style: V,
|
|
9090
9110
|
children: [
|
|
9091
9111
|
/* @__PURE__ */ e(
|
|
9092
9112
|
f,
|
|
@@ -9098,7 +9118,7 @@ const Fs = ({
|
|
|
9098
9118
|
overflow: "overflow-hidden",
|
|
9099
9119
|
borderStyle: E ? void 0 : Q ? "border-solid-r" : "border-solid-l",
|
|
9100
9120
|
borderWidth: E ? void 0 : Q ? "border-r" : "border-l",
|
|
9101
|
-
style: { backgroundColor:
|
|
9121
|
+
style: { backgroundColor: Mn, borderColor: Yn },
|
|
9102
9122
|
children: /* @__PURE__ */ d(
|
|
9103
9123
|
f,
|
|
9104
9124
|
{
|
|
@@ -9136,11 +9156,11 @@ const Fs = ({
|
|
|
9136
9156
|
"aria-expanded": !E,
|
|
9137
9157
|
"aria-pressed": E,
|
|
9138
9158
|
customWidth: vr,
|
|
9139
|
-
customHeight:
|
|
9159
|
+
customHeight: tc,
|
|
9140
9160
|
style: {
|
|
9141
9161
|
...Y,
|
|
9142
|
-
backgroundColor:
|
|
9143
|
-
border:
|
|
9162
|
+
backgroundColor: Mn,
|
|
9163
|
+
border: rc,
|
|
9144
9164
|
zIndex: 5,
|
|
9145
9165
|
...Q ? {
|
|
9146
9166
|
right: -vr,
|
|
@@ -9208,7 +9228,7 @@ const Fs = ({
|
|
|
9208
9228
|
]
|
|
9209
9229
|
}
|
|
9210
9230
|
);
|
|
9211
|
-
},
|
|
9231
|
+
}, Ws = ({ pageLayout: t, children: r, wrapperProps: n, containerProps: o }) => {
|
|
9212
9232
|
const i = Le("md"), l = (o == null ? void 0 : o.customWidth) ?? 264;
|
|
9213
9233
|
return /* @__PURE__ */ d(
|
|
9214
9234
|
f,
|
|
@@ -9248,23 +9268,23 @@ const Fs = ({
|
|
|
9248
9268
|
]
|
|
9249
9269
|
}
|
|
9250
9270
|
);
|
|
9251
|
-
},
|
|
9271
|
+
}, Wn = "--sa-floating-footer-height", zs = ({
|
|
9252
9272
|
children: t,
|
|
9253
9273
|
withScrollToTopButton: r = !1,
|
|
9254
9274
|
scrollToTopButtonProps: n,
|
|
9255
9275
|
containerProps: o
|
|
9256
9276
|
}) => {
|
|
9257
|
-
const i =
|
|
9258
|
-
return
|
|
9277
|
+
const i = le(null);
|
|
9278
|
+
return rt(() => {
|
|
9259
9279
|
const l = document.documentElement, c = () => {
|
|
9260
9280
|
var u;
|
|
9261
9281
|
const a = ((u = i.current) == null ? void 0 : u.getBoundingClientRect().height) ?? 0;
|
|
9262
|
-
l.style.setProperty(
|
|
9282
|
+
l.style.setProperty(Wn, `${a}px`);
|
|
9263
9283
|
};
|
|
9264
9284
|
c();
|
|
9265
9285
|
const s = new ResizeObserver(c);
|
|
9266
9286
|
return i.current && s.observe(i.current), () => {
|
|
9267
|
-
s.disconnect(), l.style.removeProperty(
|
|
9287
|
+
s.disconnect(), l.style.removeProperty(Wn);
|
|
9268
9288
|
};
|
|
9269
9289
|
}, []), /* @__PURE__ */ e(f, { direction: "column", position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 998)" }, children: /* @__PURE__ */ d(
|
|
9270
9290
|
f,
|
|
@@ -9289,7 +9309,7 @@ const Fs = ({
|
|
|
9289
9309
|
borderWidth: "border-t",
|
|
9290
9310
|
children: [
|
|
9291
9311
|
r && /* @__PURE__ */ e(
|
|
9292
|
-
|
|
9312
|
+
Ql,
|
|
9293
9313
|
{
|
|
9294
9314
|
...n,
|
|
9295
9315
|
customBottom: (n == null ? void 0 : n.customBottom) || "5.7rem"
|
|
@@ -9299,13 +9319,13 @@ const Fs = ({
|
|
|
9299
9319
|
]
|
|
9300
9320
|
}
|
|
9301
9321
|
) });
|
|
9302
|
-
},
|
|
9322
|
+
}, Bs = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
|
|
9303
9323
|
Or,
|
|
9304
9324
|
{
|
|
9305
9325
|
of: t,
|
|
9306
|
-
render: (r, n) => /* @__PURE__ */ e(
|
|
9326
|
+
render: (r, n) => /* @__PURE__ */ e(nc, { ...r }, n)
|
|
9307
9327
|
}
|
|
9308
|
-
) }),
|
|
9328
|
+
) }), nc = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ d(f, { display: "flex", direction: "column", gap: "sm", children: [
|
|
9309
9329
|
n ? /* @__PURE__ */ d(f, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
|
|
9310
9330
|
/* @__PURE__ */ e(z, { name: n, color: "subtle" }),
|
|
9311
9331
|
/* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t })
|
|
@@ -9315,7 +9335,7 @@ const Fs = ({
|
|
|
9315
9335
|
silhouette: "#A7B0AC",
|
|
9316
9336
|
accent: "#78867F"
|
|
9317
9337
|
};
|
|
9318
|
-
function
|
|
9338
|
+
function ic({ width: t, height: r }) {
|
|
9319
9339
|
return /* @__PURE__ */ e(re, { children: /* @__PURE__ */ d(
|
|
9320
9340
|
"svg",
|
|
9321
9341
|
{
|
|
@@ -9458,7 +9478,7 @@ function rc({ width: t, height: r }) {
|
|
|
9458
9478
|
}
|
|
9459
9479
|
) });
|
|
9460
9480
|
}
|
|
9461
|
-
const
|
|
9481
|
+
const As = ({
|
|
9462
9482
|
title: t = "create",
|
|
9463
9483
|
children: r,
|
|
9464
9484
|
onClickAction: n,
|
|
@@ -9503,7 +9523,7 @@ const zs = ({
|
|
|
9503
9523
|
marginBlock: "auto",
|
|
9504
9524
|
customHeight: s,
|
|
9505
9525
|
children: [
|
|
9506
|
-
u || /* @__PURE__ */ e(
|
|
9526
|
+
u || /* @__PURE__ */ e(ic, {}),
|
|
9507
9527
|
/* @__PURE__ */ e(f, { direction: "column", children: r.map((p, g) => /* @__PURE__ */ e(
|
|
9508
9528
|
Ye.Body1,
|
|
9509
9529
|
{
|
|
@@ -9529,7 +9549,7 @@ const zs = ({
|
|
|
9529
9549
|
c000000: "#000000",
|
|
9530
9550
|
cFFFFFF: "#FFFFFF"
|
|
9531
9551
|
};
|
|
9532
|
-
function
|
|
9552
|
+
function oc({ width: t, height: r }) {
|
|
9533
9553
|
return /* @__PURE__ */ e(re, { children: /* @__PURE__ */ d(
|
|
9534
9554
|
"svg",
|
|
9535
9555
|
{
|
|
@@ -9732,7 +9752,7 @@ function nc({ width: t, height: r }) {
|
|
|
9732
9752
|
}
|
|
9733
9753
|
) });
|
|
9734
9754
|
}
|
|
9735
|
-
function
|
|
9755
|
+
function Rs({ onClick: t }) {
|
|
9736
9756
|
const r = Le("md");
|
|
9737
9757
|
return /* @__PURE__ */ d(
|
|
9738
9758
|
f,
|
|
@@ -9745,7 +9765,7 @@ function Bs({ onClick: t }) {
|
|
|
9745
9765
|
justify: "center",
|
|
9746
9766
|
gap: "md",
|
|
9747
9767
|
children: [
|
|
9748
|
-
/* @__PURE__ */ e(
|
|
9768
|
+
/* @__PURE__ */ e(oc, { width: r ? 600 : 300 }),
|
|
9749
9769
|
/* @__PURE__ */ e(
|
|
9750
9770
|
D,
|
|
9751
9771
|
{
|
|
@@ -9790,7 +9810,7 @@ const ee = {
|
|
|
9790
9810
|
cF4F4F4: "#F4F4F4",
|
|
9791
9811
|
cFFFFFF: "#FFFFFF"
|
|
9792
9812
|
};
|
|
9793
|
-
function
|
|
9813
|
+
function lc({ width: t, height: r }) {
|
|
9794
9814
|
return /* @__PURE__ */ e(re, { children: /* @__PURE__ */ d(
|
|
9795
9815
|
"svg",
|
|
9796
9816
|
{
|
|
@@ -10005,7 +10025,7 @@ function ic({ width: t, height: r }) {
|
|
|
10005
10025
|
}
|
|
10006
10026
|
) });
|
|
10007
10027
|
}
|
|
10008
|
-
function
|
|
10028
|
+
function Is({ onClick: t }) {
|
|
10009
10029
|
const r = Le("md");
|
|
10010
10030
|
return /* @__PURE__ */ d(
|
|
10011
10031
|
f,
|
|
@@ -10018,7 +10038,7 @@ function As({ onClick: t }) {
|
|
|
10018
10038
|
justify: "center",
|
|
10019
10039
|
gap: "md",
|
|
10020
10040
|
children: [
|
|
10021
|
-
/* @__PURE__ */ e(
|
|
10041
|
+
/* @__PURE__ */ e(lc, { width: r ? 600 : 300 }),
|
|
10022
10042
|
/* @__PURE__ */ e(D, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
|
|
10023
10043
|
t && /* @__PURE__ */ e(_, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
10024
10044
|
]
|
|
@@ -10042,7 +10062,7 @@ const h = {
|
|
|
10042
10062
|
cFFE18B: "#FFE18B",
|
|
10043
10063
|
cFFFFFF: "#FFFFFF"
|
|
10044
10064
|
};
|
|
10045
|
-
function
|
|
10065
|
+
function cc({ width: t, height: r }) {
|
|
10046
10066
|
return /* @__PURE__ */ e(re, { children: /* @__PURE__ */ d(
|
|
10047
10067
|
"svg",
|
|
10048
10068
|
{
|
|
@@ -10714,7 +10734,7 @@ function oc({ width: t, height: r }) {
|
|
|
10714
10734
|
}
|
|
10715
10735
|
) });
|
|
10716
10736
|
}
|
|
10717
|
-
function
|
|
10737
|
+
function Os({ onClick: t }) {
|
|
10718
10738
|
const r = Le("md");
|
|
10719
10739
|
return /* @__PURE__ */ d(
|
|
10720
10740
|
f,
|
|
@@ -10728,7 +10748,7 @@ function Rs({ onClick: t }) {
|
|
|
10728
10748
|
gap: "md",
|
|
10729
10749
|
overflow: "overflow-hidden",
|
|
10730
10750
|
children: [
|
|
10731
|
-
/* @__PURE__ */ e(
|
|
10751
|
+
/* @__PURE__ */ e(cc, { width: r ? 600 : 300 }),
|
|
10732
10752
|
/* @__PURE__ */ e(
|
|
10733
10753
|
D,
|
|
10734
10754
|
{
|
|
@@ -10752,7 +10772,7 @@ function Rs({ onClick: t }) {
|
|
|
10752
10772
|
}
|
|
10753
10773
|
);
|
|
10754
10774
|
}
|
|
10755
|
-
const
|
|
10775
|
+
const Hs = (t) => {
|
|
10756
10776
|
var n, o, i, l, c;
|
|
10757
10777
|
const r = Le("md");
|
|
10758
10778
|
return /* @__PURE__ */ d(
|
|
@@ -10768,9 +10788,9 @@ const Is = (t) => {
|
|
|
10768
10788
|
}
|
|
10769
10789
|
},
|
|
10770
10790
|
children: [
|
|
10771
|
-
/* @__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 }),
|
|
10772
10792
|
/* @__PURE__ */ e(Er, { children: typeof t.description == "string" ? /* @__PURE__ */ e(D, { fontSize: "md", lineHeight: "leading-6", color: "brand", children: t.description }) : t.description }),
|
|
10773
|
-
/* @__PURE__ */ e(
|
|
10793
|
+
/* @__PURE__ */ e(Bn, { children: /* @__PURE__ */ e(
|
|
10774
10794
|
f,
|
|
10775
10795
|
{
|
|
10776
10796
|
display: "flex",
|
|
@@ -10816,7 +10836,7 @@ const Is = (t) => {
|
|
|
10816
10836
|
},
|
|
10817
10837
|
t.key
|
|
10818
10838
|
);
|
|
10819
|
-
},
|
|
10839
|
+
}, Ts = Xe(
|
|
10820
10840
|
({
|
|
10821
10841
|
children: t,
|
|
10822
10842
|
height: r,
|
|
@@ -10836,7 +10856,7 @@ const Is = (t) => {
|
|
|
10836
10856
|
footerProps: x = { borderTop: !0 },
|
|
10837
10857
|
variantTag: M = "info"
|
|
10838
10858
|
}) => {
|
|
10839
|
-
const S =
|
|
10859
|
+
const S = le(null), [A, C] = T("100vh");
|
|
10840
10860
|
J(() => {
|
|
10841
10861
|
const W = () => {
|
|
10842
10862
|
if (S.current) {
|
|
@@ -10881,7 +10901,7 @@ const Is = (t) => {
|
|
|
10881
10901
|
...(g == null ? void 0 : g.style) ?? {}
|
|
10882
10902
|
},
|
|
10883
10903
|
children: [
|
|
10884
|
-
c !== null && R ? /* @__PURE__ */ e(
|
|
10904
|
+
c !== null && R ? /* @__PURE__ */ e(jn, { ...k, children: I() }) : null,
|
|
10885
10905
|
/* @__PURE__ */ e(
|
|
10886
10906
|
f,
|
|
10887
10907
|
{
|
|
@@ -10896,12 +10916,12 @@ const Is = (t) => {
|
|
|
10896
10916
|
children: t
|
|
10897
10917
|
}
|
|
10898
10918
|
),
|
|
10899
|
-
s ? /* @__PURE__ */ e(
|
|
10919
|
+
s ? /* @__PURE__ */ e(_n, { ...x, children: s }) : null
|
|
10900
10920
|
]
|
|
10901
10921
|
}
|
|
10902
10922
|
);
|
|
10903
10923
|
}
|
|
10904
|
-
),
|
|
10924
|
+
), Vs = at.memo(
|
|
10905
10925
|
({ value: t, options: r = [], onChange: n, multiple: o }) => {
|
|
10906
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) => {
|
|
10907
10927
|
const a = [...l];
|
|
@@ -10923,14 +10943,14 @@ function Hr(t) {
|
|
|
10923
10943
|
return null;
|
|
10924
10944
|
}
|
|
10925
10945
|
Hr.displayName = "LayoutDialog.Header";
|
|
10926
|
-
function
|
|
10946
|
+
function Tr(t) {
|
|
10927
10947
|
return null;
|
|
10928
10948
|
}
|
|
10929
|
-
|
|
10930
|
-
function
|
|
10949
|
+
Tr.displayName = "LayoutDialog.Body";
|
|
10950
|
+
function Vr(t) {
|
|
10931
10951
|
return null;
|
|
10932
10952
|
}
|
|
10933
|
-
|
|
10953
|
+
Vr.displayName = "LayoutDialog.Aside";
|
|
10934
10954
|
function Nr(t) {
|
|
10935
10955
|
return null;
|
|
10936
10956
|
}
|
|
@@ -10952,11 +10972,11 @@ const Re = {
|
|
|
10952
10972
|
"lyd-vm-group": "_lyd-vm-group_1g78i_178",
|
|
10953
10973
|
"lyd-vm-btn": "_lyd-vm-btn_1g78i_186",
|
|
10954
10974
|
"lyd-close-btn": "_lyd-close-btn_1g78i_209"
|
|
10955
|
-
},
|
|
10975
|
+
}, sc = [
|
|
10956
10976
|
{
|
|
10957
10977
|
mode: "sidebar",
|
|
10958
10978
|
label: "Sidebar",
|
|
10959
|
-
icon: /* @__PURE__ */ e(
|
|
10979
|
+
icon: /* @__PURE__ */ e(dc, {})
|
|
10960
10980
|
},
|
|
10961
10981
|
{
|
|
10962
10982
|
mode: "modal",
|
|
@@ -10969,8 +10989,8 @@ const Re = {
|
|
|
10969
10989
|
icon: /* @__PURE__ */ e(z, { name: "Fullscreen", size: "sm" })
|
|
10970
10990
|
}
|
|
10971
10991
|
];
|
|
10972
|
-
function
|
|
10973
|
-
return /* @__PURE__ */ e("div", { className: Re["lyd-vm-group"], role: "group", "aria-label": "View mode", children:
|
|
10992
|
+
function ac({ value: t, onChange: r }) {
|
|
10993
|
+
return /* @__PURE__ */ e("div", { className: Re["lyd-vm-group"], role: "group", "aria-label": "View mode", children: sc.map((n) => /* @__PURE__ */ e(
|
|
10974
10994
|
"button",
|
|
10975
10995
|
{
|
|
10976
10996
|
type: "button",
|
|
@@ -10984,7 +11004,7 @@ function cc({ value: t, onChange: r }) {
|
|
|
10984
11004
|
n.mode
|
|
10985
11005
|
)) });
|
|
10986
11006
|
}
|
|
10987
|
-
function
|
|
11007
|
+
function dc() {
|
|
10988
11008
|
return /* @__PURE__ */ d(
|
|
10989
11009
|
"svg",
|
|
10990
11010
|
{
|
|
@@ -11011,16 +11031,16 @@ const Cr = {
|
|
|
11011
11031
|
xl: "1200px",
|
|
11012
11032
|
"2xl": "1440px"
|
|
11013
11033
|
};
|
|
11014
|
-
function
|
|
11034
|
+
function uc(t) {
|
|
11015
11035
|
return t ? t in Cr ? Cr[t] : t : Cr.xl;
|
|
11016
11036
|
}
|
|
11017
11037
|
function Ht(t, r) {
|
|
11018
11038
|
let n = null;
|
|
11019
|
-
return
|
|
11020
|
-
|
|
11039
|
+
return at.Children.forEach(t, (o) => {
|
|
11040
|
+
at.isValidElement(o) && o.type === r && (n = o.props.children ?? null);
|
|
11021
11041
|
}), n;
|
|
11022
11042
|
}
|
|
11023
|
-
function
|
|
11043
|
+
function hc(t) {
|
|
11024
11044
|
const {
|
|
11025
11045
|
isOpen: r,
|
|
11026
11046
|
onClose: n,
|
|
@@ -11035,12 +11055,12 @@ function dc(t) {
|
|
|
11035
11055
|
disableBackdropClose: p = !1,
|
|
11036
11056
|
lockBodyScroll: g = !0,
|
|
11037
11057
|
children: b
|
|
11038
|
-
} = t, [k, x] =
|
|
11058
|
+
} = t, [k, x] = T(i), M = o ?? k, A = Le("md") ? M : "fullscreen", C = q(
|
|
11039
11059
|
(K) => {
|
|
11040
11060
|
o === void 0 && x(K), l == null || l(K);
|
|
11041
11061
|
},
|
|
11042
11062
|
[o, l]
|
|
11043
|
-
), F =
|
|
11063
|
+
), F = le(null);
|
|
11044
11064
|
J(() => {
|
|
11045
11065
|
if (!(!r || !g))
|
|
11046
11066
|
return F.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
|
|
@@ -11057,10 +11077,10 @@ function dc(t) {
|
|
|
11057
11077
|
() => Ht(b, Hr),
|
|
11058
11078
|
[b]
|
|
11059
11079
|
), R = ge(
|
|
11060
|
-
() => Ht(b,
|
|
11080
|
+
() => Ht(b, Tr),
|
|
11061
11081
|
[b]
|
|
11062
11082
|
), W = ge(
|
|
11063
|
-
() => Ht(b,
|
|
11083
|
+
() => Ht(b, Vr),
|
|
11064
11084
|
[b]
|
|
11065
11085
|
), E = ge(
|
|
11066
11086
|
() => Ht(b, Nr),
|
|
@@ -11073,7 +11093,7 @@ function dc(t) {
|
|
|
11073
11093
|
A === "fullscreen" && Re["lyd-fullscreen"],
|
|
11074
11094
|
A === "sidebar" && Re["lyd-sidebar"]
|
|
11075
11095
|
].filter(Boolean).join(" "), Q = {
|
|
11076
|
-
"--lyd-max-w":
|
|
11096
|
+
"--lyd-max-w": uc(a),
|
|
11077
11097
|
...u !== void 0 && { "--lyd-aside-w": u }
|
|
11078
11098
|
}, P = () => {
|
|
11079
11099
|
p || n();
|
|
@@ -11099,7 +11119,7 @@ function dc(t) {
|
|
|
11099
11119
|
/* @__PURE__ */ d("div", { className: Re["lyd-header"], children: [
|
|
11100
11120
|
/* @__PURE__ */ e("div", { className: Re["lyd-header-content"], children: I }),
|
|
11101
11121
|
/* @__PURE__ */ d("div", { className: Re["lyd-header-actions"], children: [
|
|
11102
|
-
c && /* @__PURE__ */ e(
|
|
11122
|
+
c && /* @__PURE__ */ e(ac, { value: M, onChange: C }),
|
|
11103
11123
|
s && /* @__PURE__ */ e(
|
|
11104
11124
|
"button",
|
|
11105
11125
|
{
|
|
@@ -11124,12 +11144,12 @@ function dc(t) {
|
|
|
11124
11144
|
document.body
|
|
11125
11145
|
);
|
|
11126
11146
|
}
|
|
11127
|
-
const Ut =
|
|
11147
|
+
const Ut = hc;
|
|
11128
11148
|
Ut.Header = Hr;
|
|
11129
|
-
Ut.Body =
|
|
11130
|
-
Ut.Aside =
|
|
11149
|
+
Ut.Body = Tr;
|
|
11150
|
+
Ut.Aside = Vr;
|
|
11131
11151
|
Ut.Footer = Nr;
|
|
11132
|
-
function
|
|
11152
|
+
function Ns({ url: t, filename: r, onClose: n }) {
|
|
11133
11153
|
return J(() => {
|
|
11134
11154
|
const o = (i) => {
|
|
11135
11155
|
i.key === "Escape" && n();
|
|
@@ -11227,8 +11247,8 @@ function Vs({ url: t, filename: r, onClose: n }) {
|
|
|
11227
11247
|
}
|
|
11228
11248
|
);
|
|
11229
11249
|
}
|
|
11230
|
-
const
|
|
11231
|
-
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, { useSearchParams: o } =
|
|
11250
|
+
const $s = (t) => {
|
|
11251
|
+
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, { useSearchParams: o } = nt(), [i, l] = o(), c = Pt(i.toString());
|
|
11232
11252
|
return {
|
|
11233
11253
|
activeTab: c[n] ? parseInt(c[n]) : r,
|
|
11234
11254
|
handleTabChange: (u) => {
|
|
@@ -11240,12 +11260,12 @@ const Ts = (t) => {
|
|
|
11240
11260
|
searchQueries: c
|
|
11241
11261
|
};
|
|
11242
11262
|
};
|
|
11243
|
-
function
|
|
11263
|
+
function js({
|
|
11244
11264
|
appName: t,
|
|
11245
11265
|
menuConfig: r,
|
|
11246
11266
|
formatTitle: n
|
|
11247
11267
|
}) {
|
|
11248
|
-
const { useLocation: o } =
|
|
11268
|
+
const { useLocation: o } = nt(), i = o();
|
|
11249
11269
|
J(() => {
|
|
11250
11270
|
let l = null, c = null;
|
|
11251
11271
|
for (const u of r) {
|
|
@@ -11261,8 +11281,8 @@ function Ns({
|
|
|
11261
11281
|
document.title = (n || a)(s, t);
|
|
11262
11282
|
}, [i.pathname]);
|
|
11263
11283
|
}
|
|
11264
|
-
const
|
|
11265
|
-
const { useSearchParams: t, useParams: r, useLocation: n } =
|
|
11284
|
+
const _s = () => {
|
|
11285
|
+
const { useSearchParams: t, useParams: r, useLocation: n } = nt(), [o, i] = t(), l = Pt(o.toString()), c = r(), s = n(), a = c.id;
|
|
11266
11286
|
return {
|
|
11267
11287
|
// query params
|
|
11268
11288
|
setSearchParams: i,
|
|
@@ -11280,7 +11300,7 @@ const $s = () => {
|
|
|
11280
11300
|
hasId: !!a
|
|
11281
11301
|
};
|
|
11282
11302
|
};
|
|
11283
|
-
function
|
|
11303
|
+
function Ps(t) {
|
|
11284
11304
|
var o, i;
|
|
11285
11305
|
const r = t.decodedAccessToken;
|
|
11286
11306
|
return ge(() => {
|
|
@@ -11306,116 +11326,116 @@ function js(t) {
|
|
|
11306
11326
|
}, [(i = (o = r == null ? void 0 : r.access) == null ? void 0 : o.role) == null ? void 0 : i.code, t]);
|
|
11307
11327
|
}
|
|
11308
11328
|
export {
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11329
|
+
Fo as AdvanceFilterBar,
|
|
11330
|
+
jc as App,
|
|
11331
|
+
$i as AppComponent,
|
|
11332
|
+
In as AppContext,
|
|
11333
|
+
Gc as AppLayout,
|
|
11334
|
+
Ws as AsideBar,
|
|
11335
|
+
qc as BackButton,
|
|
11336
|
+
hl as ColumnFilterDropdown,
|
|
11337
|
+
xl as ColumnMenu,
|
|
11338
|
+
Hs as ConfirmationDialog,
|
|
11339
|
+
gl as DataTable,
|
|
11320
11340
|
se as DecisionWrapper,
|
|
11321
11341
|
Or as EachUtils,
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11342
|
+
As as EmptyStatePage,
|
|
11343
|
+
Wn as FLOATING_FOOTER_HEIGHT_VAR,
|
|
11344
|
+
ts as FilterBar,
|
|
11345
|
+
So as FilterDrawer,
|
|
11346
|
+
zs as FloatingFooter,
|
|
11347
|
+
Is as ForbiddenPage,
|
|
11348
|
+
Es as Form,
|
|
11349
|
+
Ts as FullSection,
|
|
11350
|
+
_c as HeaderLeftSlot,
|
|
11351
|
+
Pi as HeaderLeftSlotOutlet,
|
|
11352
|
+
_i as HeaderLeftSlotProvider,
|
|
11353
|
+
Jc as HorizontalField,
|
|
11354
|
+
Ns as ImagePreview,
|
|
11355
|
+
Hl as InputFile,
|
|
11356
|
+
ql as InputImage,
|
|
11337
11357
|
Ut as LayoutDialog,
|
|
11338
|
-
|
|
11339
|
-
|
|
11358
|
+
Vr as LayoutDialogAside,
|
|
11359
|
+
Tr as LayoutDialogBody,
|
|
11340
11360
|
Nr as LayoutDialogFooter,
|
|
11341
11361
|
Hr as LayoutDialogHeader,
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11362
|
+
Uc as ModuleSwitcher,
|
|
11363
|
+
Ji as ModuleSwitcherModal,
|
|
11364
|
+
Rs as NotFoundPage,
|
|
11365
|
+
Qc as PageLayout,
|
|
11346
11366
|
Gt as Pressable,
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11367
|
+
ro as RightDrawer,
|
|
11368
|
+
Ql as ScrollToTopButton,
|
|
11369
|
+
Yc as Section,
|
|
11370
|
+
_n as SectionFooter,
|
|
11371
|
+
jn as SectionHeader,
|
|
11372
|
+
Vs as SelectButton,
|
|
11373
|
+
Os as ServerErrorPage,
|
|
11374
|
+
Ms as SidePanel,
|
|
11375
|
+
Ls as SidePanelItem,
|
|
11376
|
+
Oi as SidebarBadgesProvider,
|
|
11377
|
+
Pc as SidebarGroupSlot,
|
|
11378
|
+
Gi as SidebarGroupSlotOutlet,
|
|
11379
|
+
Zi as SidebarGroupSlotProvider,
|
|
11380
|
+
ji as SidebarHeaderSlot,
|
|
11381
|
+
Ti as SidebarProvider,
|
|
11382
|
+
Ni as StarasiaRouterProvider,
|
|
11383
|
+
ul as TableFooter,
|
|
11384
|
+
al as TableHeader,
|
|
11385
|
+
ls as TableLayout,
|
|
11386
|
+
os as TableSection,
|
|
11387
|
+
sl as TableWrapper,
|
|
11388
|
+
Fs as ToggleStatus,
|
|
11369
11389
|
Ye as Typography,
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11390
|
+
Bs as VerticalField,
|
|
11391
|
+
Zc as clearModuleSelection,
|
|
11392
|
+
ss as createInitialFromUserName,
|
|
11393
|
+
fs as cssVars,
|
|
11394
|
+
is as expandDateCompact,
|
|
11395
|
+
ps as formHasChanged,
|
|
11396
|
+
hs as formatDate,
|
|
11397
|
+
Ml as formatDateToIndonesian,
|
|
11398
|
+
ds as formatRupiah,
|
|
11399
|
+
ko as getDateFilterValue,
|
|
11400
|
+
Kc as getDateRangeFilterValue,
|
|
11401
|
+
us as getInitials,
|
|
11402
|
+
Do as getValueDropdownMultipleFilter,
|
|
11403
|
+
Xc as getValueRadioFilter,
|
|
11384
11404
|
Rr as getValueSearch,
|
|
11385
11405
|
hr as getValuesFilter,
|
|
11386
11406
|
$t as handleChangeFilter,
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11407
|
+
Ss as handleOnScroll,
|
|
11408
|
+
ws as isEmail,
|
|
11409
|
+
es as isFilterActive,
|
|
11410
|
+
bs as isOnlyLettersAndSpaces,
|
|
11411
|
+
ys as isPhoneNumber,
|
|
11412
|
+
Ds as isSlug,
|
|
11413
|
+
Pn as localStorageAdapter,
|
|
11414
|
+
ms as oneDayInMs,
|
|
11415
|
+
as as parseIndonesianDateToDate,
|
|
11416
|
+
ks as preventNonCoordinateInput,
|
|
11417
|
+
Cs as preventNonNumberAndDecimalInput,
|
|
11418
|
+
xs as preventNonNumberInput,
|
|
11419
|
+
vs as preventNumberInput,
|
|
11420
|
+
xo as resolveDateRangeValueToString,
|
|
11421
|
+
vo as resolveDateValueToString,
|
|
11422
|
+
yo as resolveDropdownValueToString,
|
|
11423
|
+
bo as resolveRadioValueToString,
|
|
11404
11424
|
dr as resolveSidebarBadge,
|
|
11405
11425
|
Et as storageKeys,
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11426
|
+
gs as textWidth,
|
|
11427
|
+
On as useApp,
|
|
11428
|
+
Ii as useAppState,
|
|
11429
|
+
Ps as useAuthRole,
|
|
11430
|
+
js as useDynamicTitle,
|
|
11431
|
+
rs as useFilterBarApiParams,
|
|
11432
|
+
ns as useFilterBarControls,
|
|
11433
|
+
$n as useModuleSelection,
|
|
11414
11434
|
$e as useRouteInfo,
|
|
11415
|
-
|
|
11416
|
-
|
|
11435
|
+
_s as useRouteParams,
|
|
11436
|
+
nt as useRouterAdapter,
|
|
11417
11437
|
Vi as useSidebar,
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11438
|
+
Hi as useSidebarBadges,
|
|
11439
|
+
$s as useTabState,
|
|
11440
|
+
cs as useTableSortApiParams
|
|
11421
11441
|
};
|