@starasia/admin 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +0 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +396 -485
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/dist/components/AuthLayout/index.d.ts +0 -8
package/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Badges as Ee } 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 { Button as
|
|
6
|
+
import { Button as H } from "@starasia/button";
|
|
7
7
|
export * from "@starasia/button";
|
|
8
8
|
export * from "@starasia/card";
|
|
9
9
|
import { StarasiaDate as Ut } from "@starasia/date";
|
|
@@ -30,16 +30,16 @@ export * from "@starasia/table";
|
|
|
30
30
|
export * from "@starasia/tabs";
|
|
31
31
|
import { Textarea as Xt } from "@starasia/textarea";
|
|
32
32
|
export * from "@starasia/textarea";
|
|
33
|
-
import { useTheme as Kt, ThemeProvider as yt,
|
|
33
|
+
import { useTheme as Kt, ThemeProvider as yt, useColor as er } from "@starasia/theme";
|
|
34
34
|
export * from "@starasia/theme";
|
|
35
35
|
export * from "@starasia/toast";
|
|
36
|
-
import { Toggle as
|
|
36
|
+
import { Toggle as Ht } from "@starasia/toggle";
|
|
37
37
|
export * from "@starasia/toggle";
|
|
38
38
|
import { Tooltip as ue } from "@starasia/tooltip";
|
|
39
39
|
export * from "@starasia/tooltip";
|
|
40
40
|
import { Checkbox as rt } from "@starasia/checkbox";
|
|
41
41
|
export * from "@starasia/checkbox";
|
|
42
|
-
import { Radio as
|
|
42
|
+
import { Radio as tr } from "@starasia/radio";
|
|
43
43
|
export * from "@starasia/radio";
|
|
44
44
|
import { Text as C } from "@starasia/text";
|
|
45
45
|
export * from "@starasia/text";
|
|
@@ -51,15 +51,15 @@ export * from "@starasia/progress";
|
|
|
51
51
|
export * from "@starasia/stepper";
|
|
52
52
|
export * from "@starasia/accordion";
|
|
53
53
|
export * from "@starasia/story-record";
|
|
54
|
-
import { Skeleton as
|
|
54
|
+
import { Skeleton as Re } from "@starasia/skeleton";
|
|
55
55
|
export * from "@starasia/skeleton";
|
|
56
56
|
export * from "@starasia/progress-stepper";
|
|
57
57
|
import { jsx as e, Fragment as G, jsxs as d } from "react/jsx-runtime";
|
|
58
|
-
import
|
|
58
|
+
import Rt, { createContext as st, useState as M, useContext as Je, useCallback as Me, useMemo as De, memo as te, useEffect as _, useRef as le, useLayoutEffect as it, isValidElement as nt, forwardRef as It, Children as rr, useImperativeHandle as ir } from "react";
|
|
59
59
|
import { useSearchParams as Qe, useNavigate as dt, useLocation as Ve, Outlet as pt, Link as Vt, useParams as zt } from "react-router";
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
const
|
|
60
|
+
import nr, { createPortal as lr } from "react-dom";
|
|
61
|
+
import or from "react-easy-crop";
|
|
62
|
+
const cr = {
|
|
63
63
|
menus: [],
|
|
64
64
|
menuBottom: void 0,
|
|
65
65
|
logo: "",
|
|
@@ -67,7 +67,7 @@ const ar = {
|
|
|
67
67
|
userData: null,
|
|
68
68
|
setUserData: () => {
|
|
69
69
|
}
|
|
70
|
-
}, Tt = st(
|
|
70
|
+
}, Tt = st(cr), Ot = () => Je(Tt), ar = (t) => {
|
|
71
71
|
const [r, n] = M(
|
|
72
72
|
(t == null ? void 0 : t.initialUserData) || null
|
|
73
73
|
);
|
|
@@ -83,7 +83,7 @@ const ar = {
|
|
|
83
83
|
},
|
|
84
84
|
clearBadge: () => {
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), sr = ({ children: t }) => {
|
|
87
87
|
const [r, n] = M({}), l = Me(
|
|
88
88
|
(a) => {
|
|
89
89
|
n(
|
|
@@ -110,10 +110,10 @@ const ar = {
|
|
|
110
110
|
[r, i, l, o]
|
|
111
111
|
);
|
|
112
112
|
return /* @__PURE__ */ e(Nt.Provider, { value: s, children: t });
|
|
113
|
-
},
|
|
113
|
+
}, dr = () => Je(Nt), Xe = (t, r) => {
|
|
114
114
|
const n = r !== void 0 ? r : t;
|
|
115
115
|
return n == null ? null : typeof n == "string" || typeof n == "number" ? { value: n } : n;
|
|
116
|
-
},
|
|
116
|
+
}, hr = ({
|
|
117
117
|
router: t,
|
|
118
118
|
menus: r = [],
|
|
119
119
|
menuBottom: n,
|
|
@@ -122,7 +122,7 @@ const ar = {
|
|
|
122
122
|
initialUserData: o,
|
|
123
123
|
theme: s
|
|
124
124
|
}) => {
|
|
125
|
-
const a =
|
|
125
|
+
const a = ar({ initialUserData: o }), { theme: h } = Kt();
|
|
126
126
|
return /* @__PURE__ */ e(
|
|
127
127
|
Tt.Provider,
|
|
128
128
|
{
|
|
@@ -134,11 +134,11 @@ const ar = {
|
|
|
134
134
|
setUserData: a.setUserData,
|
|
135
135
|
menuBottom: n
|
|
136
136
|
},
|
|
137
|
-
children: /* @__PURE__ */ e(
|
|
137
|
+
children: /* @__PURE__ */ e(sr, { children: s ? /* @__PURE__ */ e(yt, { value: s, children: t }) : h ? /* @__PURE__ */ e(yt, { value: h, children: t }) : t })
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
|
-
},
|
|
141
|
-
function
|
|
140
|
+
}, fn = te(hr);
|
|
141
|
+
function ur({
|
|
142
142
|
collapsed: t = !1,
|
|
143
143
|
children: r
|
|
144
144
|
}) {
|
|
@@ -176,7 +176,7 @@ function fr({
|
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
178
|
const ht = st(null);
|
|
179
|
-
function
|
|
179
|
+
function fr({ children: t }) {
|
|
180
180
|
const [r, n] = M(null), [l, i] = M(null), [o, s] = M(null), [a, h] = M(0), u = Me(() => (h((g) => g + 1), () => h((g) => g - 1)), []);
|
|
181
181
|
return /* @__PURE__ */ e(
|
|
182
182
|
ht.Provider,
|
|
@@ -195,7 +195,7 @@ function gr({ children: t }) {
|
|
|
195
195
|
}
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function gr({ children: t }) {
|
|
199
199
|
const r = Je(ht);
|
|
200
200
|
return r ? /* @__PURE__ */ d(G, { children: [
|
|
201
201
|
/* @__PURE__ */ e("div", { ref: r.setPrependNode, style: { display: "contents" } }),
|
|
@@ -203,7 +203,7 @@ function mr({ children: t }) {
|
|
|
203
203
|
/* @__PURE__ */ e("div", { ref: r.setAppendNode, style: { display: "contents" } })
|
|
204
204
|
] }) : /* @__PURE__ */ e(G, { children: t });
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function gn({
|
|
207
207
|
children: t,
|
|
208
208
|
mode: r = "append"
|
|
209
209
|
}) {
|
|
@@ -216,7 +216,7 @@ function mn({
|
|
|
216
216
|
"[HeaderLeftSlot] used outside AppLayout — content not rendered"
|
|
217
217
|
), null;
|
|
218
218
|
const l = r === "prepend" ? n.prependNode : r === "replace" ? n.replaceNode : n.appendNode;
|
|
219
|
-
return l ?
|
|
219
|
+
return l ? lr(t, l) : null;
|
|
220
220
|
}
|
|
221
221
|
const _e = "moduleSwitcherGroupId", lt = "sa-module-switcher-change";
|
|
222
222
|
function xt() {
|
|
@@ -226,13 +226,13 @@ function xt() {
|
|
|
226
226
|
const r = Number(t);
|
|
227
227
|
return Number.isFinite(r) ? r : null;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function Zt(t) {
|
|
230
230
|
typeof window > "u" || (t === null ? window.localStorage.removeItem(_e) : window.localStorage.setItem(_e, String(t)), window.dispatchEvent(new CustomEvent(lt, { detail: t })));
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
|
|
232
|
+
function mn() {
|
|
233
|
+
Zt(null);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function jt() {
|
|
236
236
|
const [t, r] = M(
|
|
237
237
|
() => xt()
|
|
238
238
|
);
|
|
@@ -246,10 +246,10 @@ function Zt() {
|
|
|
246
246
|
window.removeEventListener(lt, l), window.removeEventListener("storage", i);
|
|
247
247
|
};
|
|
248
248
|
}, []), { selectedGroupId: t, setSelectedGroupId: (l) => {
|
|
249
|
-
|
|
249
|
+
Zt(l), r(l);
|
|
250
250
|
} };
|
|
251
251
|
}
|
|
252
|
-
let
|
|
252
|
+
let je = 0, be = !1;
|
|
253
253
|
const Ct = () => /* @__PURE__ */ d(
|
|
254
254
|
"svg",
|
|
255
255
|
{
|
|
@@ -284,7 +284,7 @@ const Ct = () => /* @__PURE__ */ d(
|
|
|
284
284
|
cursor: "pointer",
|
|
285
285
|
textAlign: "left"
|
|
286
286
|
};
|
|
287
|
-
function
|
|
287
|
+
function yn({
|
|
288
288
|
children: t,
|
|
289
289
|
headerLeftSlot: r,
|
|
290
290
|
profile: n,
|
|
@@ -300,18 +300,18 @@ function pn({
|
|
|
300
300
|
logoutButton: p
|
|
301
301
|
}) {
|
|
302
302
|
var ke, Ne;
|
|
303
|
-
const [v] = Qe(), A = v.get("embed") === "true", D = Ot(), { badges: T } =
|
|
303
|
+
const [v] = Qe(), A = v.get("embed") === "true", D = Ot(), { badges: T } = dr(), Z = dt(), j = Ve(), L = !ee("md"), [fe, P] = M(!1), [I, K] = M(!1), [oe, ce] = M(!1), [U, ae] = M(!1), [se, re] = M(/* @__PURE__ */ new Set()), [Y, J] = M(null), { selectedGroupId: V, setSelectedGroupId: z } = jt(), X = le(null), de = le(null);
|
|
304
304
|
_(() => {
|
|
305
305
|
const y = X.current;
|
|
306
306
|
if (!y) return;
|
|
307
307
|
const S = () => {
|
|
308
|
-
be || (
|
|
308
|
+
be || (je = y.scrollTop);
|
|
309
309
|
};
|
|
310
310
|
return y.addEventListener("scroll", S), () => y.removeEventListener("scroll", S);
|
|
311
311
|
}, []);
|
|
312
312
|
const he = () => {
|
|
313
313
|
const y = X.current;
|
|
314
|
-
y &&
|
|
314
|
+
y && je > 0 && (be = !0, y.scrollTop = je, requestAnimationFrame(() => {
|
|
315
315
|
be = !1;
|
|
316
316
|
}));
|
|
317
317
|
};
|
|
@@ -322,7 +322,7 @@ function pn({
|
|
|
322
322
|
}, 300);
|
|
323
323
|
return () => clearTimeout(y);
|
|
324
324
|
}, []), it(() => {
|
|
325
|
-
D.menus.length > 0 && (
|
|
325
|
+
D.menus.length > 0 && (je > 0 ? he() : requestAnimationFrame(() => {
|
|
326
326
|
var S;
|
|
327
327
|
const y = (S = X.current) == null ? void 0 : S.querySelector(
|
|
328
328
|
"[data-menu-active='true']"
|
|
@@ -337,11 +337,11 @@ function pn({
|
|
|
337
337
|
return () => {
|
|
338
338
|
clearTimeout(y), clearTimeout(S), clearTimeout(F), clearTimeout(x), clearTimeout(w);
|
|
339
339
|
};
|
|
340
|
-
}, [
|
|
340
|
+
}, [j.pathname]), _(() => {
|
|
341
341
|
de.current && (de.current.scrollTop = 0);
|
|
342
|
-
}, [
|
|
342
|
+
}, [j.pathname]), _(() => {
|
|
343
343
|
L && ce(!1);
|
|
344
|
-
}, [
|
|
344
|
+
}, [j.pathname, L]), _(() => {
|
|
345
345
|
L && K(!0);
|
|
346
346
|
}, [L]);
|
|
347
347
|
const Le = () => {
|
|
@@ -357,15 +357,15 @@ function pn({
|
|
|
357
357
|
...D.menus.flatMap((y) => y.items.flatMap(Te)),
|
|
358
358
|
...((ke = D.menuBottom) == null ? void 0 : ke.flatMap(Te)) ?? []
|
|
359
359
|
], ie = (y) => {
|
|
360
|
-
if (!
|
|
361
|
-
const S = We.filter((F) =>
|
|
360
|
+
if (!j.pathname.startsWith(y)) return !1;
|
|
361
|
+
const S = We.filter((F) => j.pathname.startsWith(F)).sort((F, x) => x.length - F.length)[0];
|
|
362
362
|
return y === S;
|
|
363
363
|
};
|
|
364
364
|
_(() => {
|
|
365
365
|
var S;
|
|
366
366
|
const y = (F) => {
|
|
367
367
|
var x;
|
|
368
|
-
(x = F.children) != null && x.some((w) =>
|
|
368
|
+
(x = F.children) != null && x.some((w) => j.pathname.startsWith(w.to)) && re((w) => {
|
|
369
369
|
const b = new Set(w);
|
|
370
370
|
return b.add(F.id), b;
|
|
371
371
|
});
|
|
@@ -373,7 +373,7 @@ function pn({
|
|
|
373
373
|
D.menus.forEach((F) => {
|
|
374
374
|
F.items.forEach(y);
|
|
375
375
|
}), (S = D.menuBottom) == null || S.forEach(y);
|
|
376
|
-
}, [
|
|
376
|
+
}, [j.pathname, D.menus, D.menuBottom]);
|
|
377
377
|
const Oe = (y) => {
|
|
378
378
|
re((S) => {
|
|
379
379
|
const F = new Set(S);
|
|
@@ -405,16 +405,16 @@ function pn({
|
|
|
405
405
|
onClick: (W) => {
|
|
406
406
|
if (S)
|
|
407
407
|
if (I && !L) {
|
|
408
|
-
const
|
|
408
|
+
const R = W.currentTarget.getBoundingClientRect();
|
|
409
409
|
J({
|
|
410
410
|
item: y,
|
|
411
|
-
top:
|
|
412
|
-
left:
|
|
411
|
+
top: R.top,
|
|
412
|
+
left: R.right + 8
|
|
413
413
|
});
|
|
414
414
|
} else
|
|
415
415
|
Oe(y.id);
|
|
416
416
|
else
|
|
417
|
-
|
|
417
|
+
Z(y.to);
|
|
418
418
|
},
|
|
419
419
|
style: {
|
|
420
420
|
width: "100%",
|
|
@@ -527,7 +527,7 @@ function pn({
|
|
|
527
527
|
),
|
|
528
528
|
S && (!I || L) && (() => {
|
|
529
529
|
const W = y.children.findIndex(
|
|
530
|
-
(
|
|
530
|
+
(R) => ie(R.to)
|
|
531
531
|
);
|
|
532
532
|
return /* @__PURE__ */ d(
|
|
533
533
|
"div",
|
|
@@ -575,15 +575,15 @@ function pn({
|
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
),
|
|
578
|
-
y.children.map((
|
|
578
|
+
y.children.map((R) => {
|
|
579
579
|
const ne = Xe(
|
|
580
|
-
|
|
581
|
-
T[
|
|
580
|
+
R.badge,
|
|
581
|
+
T[R.id]
|
|
582
582
|
);
|
|
583
583
|
return /* @__PURE__ */ d(
|
|
584
584
|
"button",
|
|
585
585
|
{
|
|
586
|
-
onClick: () =>
|
|
586
|
+
onClick: () => Z(R.to),
|
|
587
587
|
style: {
|
|
588
588
|
width: "100%",
|
|
589
589
|
display: "flex",
|
|
@@ -594,24 +594,24 @@ function pn({
|
|
|
594
594
|
paddingTop: "0.25rem",
|
|
595
595
|
paddingBottom: "0.25rem",
|
|
596
596
|
height: "2rem",
|
|
597
|
-
borderRadius: ie(
|
|
597
|
+
borderRadius: ie(R.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
|
|
598
598
|
textAlign: "left",
|
|
599
|
-
backgroundColor: ie(
|
|
600
|
-
color: ie(
|
|
599
|
+
backgroundColor: ie(R.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
|
|
600
|
+
color: ie(R.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
|
|
601
601
|
cursor: "pointer",
|
|
602
|
-
border: ie(
|
|
602
|
+
border: ie(R.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
|
|
603
603
|
},
|
|
604
604
|
onMouseEnter: (ye) => {
|
|
605
|
-
ie(
|
|
605
|
+
ie(R.to) || (ye.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
|
|
606
606
|
},
|
|
607
607
|
onMouseLeave: (ye) => {
|
|
608
|
-
ie(
|
|
608
|
+
ie(R.to) || (ye.currentTarget.style.backgroundColor = "transparent");
|
|
609
609
|
},
|
|
610
610
|
children: [
|
|
611
611
|
/* @__PURE__ */ e(
|
|
612
612
|
k,
|
|
613
613
|
{
|
|
614
|
-
name:
|
|
614
|
+
name: R.icon,
|
|
615
615
|
size: "sm",
|
|
616
616
|
style: { flexShrink: 0 }
|
|
617
617
|
}
|
|
@@ -628,7 +628,7 @@ function pn({
|
|
|
628
628
|
overflow: "hidden",
|
|
629
629
|
textOverflow: "ellipsis"
|
|
630
630
|
},
|
|
631
|
-
children:
|
|
631
|
+
children: R.title
|
|
632
632
|
}
|
|
633
633
|
),
|
|
634
634
|
ne && /* @__PURE__ */ e(
|
|
@@ -642,7 +642,7 @@ function pn({
|
|
|
642
642
|
)
|
|
643
643
|
]
|
|
644
644
|
},
|
|
645
|
-
|
|
645
|
+
R.id
|
|
646
646
|
);
|
|
647
647
|
})
|
|
648
648
|
]
|
|
@@ -651,7 +651,7 @@ function pn({
|
|
|
651
651
|
})()
|
|
652
652
|
] }, y.id);
|
|
653
653
|
};
|
|
654
|
-
return /* @__PURE__ */ d(
|
|
654
|
+
return /* @__PURE__ */ d(fr, { children: [
|
|
655
655
|
/* @__PURE__ */ d(
|
|
656
656
|
"div",
|
|
657
657
|
{
|
|
@@ -856,7 +856,7 @@ function pn({
|
|
|
856
856
|
}
|
|
857
857
|
),
|
|
858
858
|
a && /* @__PURE__ */ e(
|
|
859
|
-
|
|
859
|
+
ur,
|
|
860
860
|
{
|
|
861
861
|
collapsed: L ? !1 : I,
|
|
862
862
|
children: a
|
|
@@ -990,7 +990,7 @@ function pn({
|
|
|
990
990
|
)
|
|
991
991
|
}
|
|
992
992
|
),
|
|
993
|
-
/* @__PURE__ */ e(
|
|
993
|
+
/* @__PURE__ */ e(gr, { children: r })
|
|
994
994
|
] }),
|
|
995
995
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
996
996
|
h,
|
|
@@ -1252,8 +1252,8 @@ function pn({
|
|
|
1252
1252
|
/* @__PURE__ */ e(Fe, { children: "Confirmation Logout" }),
|
|
1253
1253
|
/* @__PURE__ */ e(qe, { children: "Are you sure you want to end the session and exit the page?" }),
|
|
1254
1254
|
/* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(f, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d($, { direction: "row", gap: "sm", align: "center", children: [
|
|
1255
|
-
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
|
|
1256
|
-
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
|
|
1255
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(H, { secondary: !0, onClick: ze, children: "Cancel" }) }),
|
|
1256
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(H, { primary: !0, onClick: Pe, children: "Yes, Sure" }) })
|
|
1257
1257
|
] }) }) })
|
|
1258
1258
|
] }),
|
|
1259
1259
|
Y && /* @__PURE__ */ d(G, { children: [
|
|
@@ -1314,7 +1314,7 @@ function pn({
|
|
|
1314
1314
|
"button",
|
|
1315
1315
|
{
|
|
1316
1316
|
onClick: () => {
|
|
1317
|
-
|
|
1317
|
+
Z(y.to), J(null);
|
|
1318
1318
|
},
|
|
1319
1319
|
style: {
|
|
1320
1320
|
width: "100%",
|
|
@@ -1367,7 +1367,7 @@ function pn({
|
|
|
1367
1367
|
] })
|
|
1368
1368
|
] });
|
|
1369
1369
|
}
|
|
1370
|
-
const
|
|
1370
|
+
const mr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
1371
1371
|
f,
|
|
1372
1372
|
{
|
|
1373
1373
|
role: "button",
|
|
@@ -1378,7 +1378,7 @@ const yr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1378
1378
|
...r,
|
|
1379
1379
|
children: t
|
|
1380
1380
|
}
|
|
1381
|
-
), ut = te(
|
|
1381
|
+
), ut = te(mr), vt = ({
|
|
1382
1382
|
title: t,
|
|
1383
1383
|
iconName: r,
|
|
1384
1384
|
textColor: n,
|
|
@@ -1423,7 +1423,7 @@ const yr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1423
1423
|
]
|
|
1424
1424
|
}
|
|
1425
1425
|
);
|
|
1426
|
-
},
|
|
1426
|
+
}, pn = (t) => {
|
|
1427
1427
|
const { onClick: r, navigateTo: n, ...l } = t;
|
|
1428
1428
|
return n ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Vt, { to: n, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(vt, { ...l }) }) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(ut, { onClick: r, children: /* @__PURE__ */ e(vt, { ...l }) }) });
|
|
1429
1429
|
}, Ke = [
|
|
@@ -1505,7 +1505,7 @@ const wt = {
|
|
|
1505
1505
|
cursor: "pointer",
|
|
1506
1506
|
padding: 0
|
|
1507
1507
|
};
|
|
1508
|
-
function
|
|
1508
|
+
function yr({
|
|
1509
1509
|
isShow: t,
|
|
1510
1510
|
onHide: r,
|
|
1511
1511
|
menus: n,
|
|
@@ -1572,11 +1572,11 @@ function pr({
|
|
|
1572
1572
|
}
|
|
1573
1573
|
);
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function xn({
|
|
1576
1576
|
onSelect: t,
|
|
1577
1577
|
"aria-label": r = "Pilih module"
|
|
1578
1578
|
} = {}) {
|
|
1579
|
-
const n = Ot(), l = dt(), { selectedGroupId: i, setSelectedGroupId: o } =
|
|
1579
|
+
const n = Ot(), l = dt(), { selectedGroupId: i, setSelectedGroupId: o } = jt(), [s, a] = M(!1), h = (u) => {
|
|
1580
1580
|
var g;
|
|
1581
1581
|
if (o(u), u !== null) {
|
|
1582
1582
|
const m = n.menus.find((v) => v.id === u), p = (g = m == null ? void 0 : m.items[0]) == null ? void 0 : g.to;
|
|
@@ -1629,7 +1629,7 @@ function Cn({
|
|
|
1629
1629
|
)
|
|
1630
1630
|
] }),
|
|
1631
1631
|
/* @__PURE__ */ e(
|
|
1632
|
-
|
|
1632
|
+
yr,
|
|
1633
1633
|
{
|
|
1634
1634
|
isShow: s,
|
|
1635
1635
|
onHide: () => a(!1),
|
|
@@ -1640,95 +1640,7 @@ function Cn({
|
|
|
1640
1640
|
)
|
|
1641
1641
|
] });
|
|
1642
1642
|
}
|
|
1643
|
-
const
|
|
1644
|
-
({ children: t, coverImage: r, logo: n }) => {
|
|
1645
|
-
const l = ee("md"), i = er();
|
|
1646
|
-
return /* @__PURE__ */ d(
|
|
1647
|
-
f,
|
|
1648
|
-
{
|
|
1649
|
-
direction: l ? "row" : "column",
|
|
1650
|
-
width: "width-screen",
|
|
1651
|
-
height: "height-screen",
|
|
1652
|
-
children: [
|
|
1653
|
-
/* @__PURE__ */ e(
|
|
1654
|
-
f,
|
|
1655
|
-
{
|
|
1656
|
-
direction: "row",
|
|
1657
|
-
padding: "spacing-12",
|
|
1658
|
-
justify: l ? "flex-start" : "center",
|
|
1659
|
-
style: {
|
|
1660
|
-
width: "100%",
|
|
1661
|
-
maxWidth: "50vw",
|
|
1662
|
-
...r && {
|
|
1663
|
-
backgroundImage: `url(${r})`,
|
|
1664
|
-
backgroundSize: "cover",
|
|
1665
|
-
backgroundPosition: "center",
|
|
1666
|
-
backgroundRepeat: "no-repeat"
|
|
1667
|
-
},
|
|
1668
|
-
...l ? {} : {
|
|
1669
|
-
maxWidth: "100%",
|
|
1670
|
-
width: "100%",
|
|
1671
|
-
minHeight: "100vh"
|
|
1672
|
-
}
|
|
1673
|
-
},
|
|
1674
|
-
children: /* @__PURE__ */ d(
|
|
1675
|
-
f,
|
|
1676
|
-
{
|
|
1677
|
-
style: { backgroundColor: "var(--sa-background-primary, #ffffff)" },
|
|
1678
|
-
width: "width-fit ",
|
|
1679
|
-
height: "height-10",
|
|
1680
|
-
paddingInline: "sm",
|
|
1681
|
-
display: "flex",
|
|
1682
|
-
justify: "center",
|
|
1683
|
-
align: "center",
|
|
1684
|
-
children: [
|
|
1685
|
-
n && /* @__PURE__ */ e("img", { width: 150, src: n, alt: "logo" }),
|
|
1686
|
-
" "
|
|
1687
|
-
]
|
|
1688
|
-
}
|
|
1689
|
-
)
|
|
1690
|
-
}
|
|
1691
|
-
),
|
|
1692
|
-
/* @__PURE__ */ e(
|
|
1693
|
-
f,
|
|
1694
|
-
{
|
|
1695
|
-
display: "flex",
|
|
1696
|
-
flex: "1",
|
|
1697
|
-
style: {
|
|
1698
|
-
backgroundColor: "var(--sa-background-neutral, #f0f1f2)",
|
|
1699
|
-
position: "fixed",
|
|
1700
|
-
zIndex: 10,
|
|
1701
|
-
...l ? {
|
|
1702
|
-
right: 0,
|
|
1703
|
-
minHeight: "100vh",
|
|
1704
|
-
width: "calc(50vw + 6.125rem)",
|
|
1705
|
-
borderTopLeftRadius: i == null ? void 0 : i["2xl"],
|
|
1706
|
-
borderBottomLeftRadius: i == null ? void 0 : i["2xl"]
|
|
1707
|
-
} : {
|
|
1708
|
-
bottom: 0,
|
|
1709
|
-
left: 0,
|
|
1710
|
-
right: 0,
|
|
1711
|
-
minHeight: 300,
|
|
1712
|
-
borderTopRightRadius: i == null ? void 0 : i["2xl"],
|
|
1713
|
-
borderTopLeftRadius: i == null ? void 0 : i["2xl"]
|
|
1714
|
-
}
|
|
1715
|
-
},
|
|
1716
|
-
children: /* @__PURE__ */ e(
|
|
1717
|
-
f,
|
|
1718
|
-
{
|
|
1719
|
-
direction: "column",
|
|
1720
|
-
padding: "spacing-6",
|
|
1721
|
-
style: { maxWidth: "414px", margin: "auto" },
|
|
1722
|
-
children: t
|
|
1723
|
-
}
|
|
1724
|
-
)
|
|
1725
|
-
}
|
|
1726
|
-
)
|
|
1727
|
-
]
|
|
1728
|
-
}
|
|
1729
|
-
);
|
|
1730
|
-
}
|
|
1731
|
-
), xr = (t, r) => {
|
|
1643
|
+
const pr = (t, r) => {
|
|
1732
1644
|
const n = [];
|
|
1733
1645
|
if (r === 0)
|
|
1734
1646
|
return n.push(t), n;
|
|
@@ -1737,7 +1649,7 @@ const Dn = te(
|
|
|
1737
1649
|
n.push(i);
|
|
1738
1650
|
}
|
|
1739
1651
|
return n;
|
|
1740
|
-
},
|
|
1652
|
+
}, xr = te(
|
|
1741
1653
|
({
|
|
1742
1654
|
value: t,
|
|
1743
1655
|
label: r,
|
|
@@ -1769,8 +1681,8 @@ const Dn = te(
|
|
|
1769
1681
|
/* @__PURE__ */ e(we, { style: s, children: u() })
|
|
1770
1682
|
] });
|
|
1771
1683
|
}
|
|
1772
|
-
),
|
|
1773
|
-
|
|
1684
|
+
), Cr = te(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(At, { children: t.map((l, i) => /* @__PURE__ */ e(
|
|
1685
|
+
xr,
|
|
1774
1686
|
{
|
|
1775
1687
|
separator: r,
|
|
1776
1688
|
labelWidth: n,
|
|
@@ -1778,7 +1690,7 @@ const Dn = te(
|
|
|
1778
1690
|
...l
|
|
1779
1691
|
},
|
|
1780
1692
|
`field-group-field-${i}`
|
|
1781
|
-
)) })),
|
|
1693
|
+
)) })), Cn = te(
|
|
1782
1694
|
({
|
|
1783
1695
|
maxRow: t = 0,
|
|
1784
1696
|
maxColumn: r = 2,
|
|
@@ -1788,7 +1700,7 @@ const Dn = te(
|
|
|
1788
1700
|
bordered: o = !1
|
|
1789
1701
|
}) => {
|
|
1790
1702
|
const s = De(
|
|
1791
|
-
() =>
|
|
1703
|
+
() => pr(l, t),
|
|
1792
1704
|
[l, t]
|
|
1793
1705
|
), a = s.length > 2, h = () => {
|
|
1794
1706
|
switch (r) {
|
|
@@ -1824,7 +1736,7 @@ const Dn = te(
|
|
|
1824
1736
|
width: a ? h() : void 0,
|
|
1825
1737
|
marginBottom: a ? "lg" : void 0,
|
|
1826
1738
|
children: /* @__PURE__ */ e(
|
|
1827
|
-
|
|
1739
|
+
Cr,
|
|
1828
1740
|
{
|
|
1829
1741
|
labelWidth: i,
|
|
1830
1742
|
fields: u,
|
|
@@ -1837,7 +1749,7 @@ const Dn = te(
|
|
|
1837
1749
|
}
|
|
1838
1750
|
);
|
|
1839
1751
|
}
|
|
1840
|
-
),
|
|
1752
|
+
), Dn = ({
|
|
1841
1753
|
title: t,
|
|
1842
1754
|
content: r,
|
|
1843
1755
|
onHide: n,
|
|
@@ -1860,24 +1772,24 @@ const Dn = te(
|
|
|
1860
1772
|
}, h = () => {
|
|
1861
1773
|
switch (s) {
|
|
1862
1774
|
case "info":
|
|
1863
|
-
return /* @__PURE__ */ e(
|
|
1775
|
+
return /* @__PURE__ */ e(H, { primary: !0, onClick: l, children: o });
|
|
1864
1776
|
case "danger":
|
|
1865
|
-
return /* @__PURE__ */ e(
|
|
1777
|
+
return /* @__PURE__ */ e(H, { danger: !0, onClick: l, children: o });
|
|
1866
1778
|
case "success":
|
|
1867
|
-
return /* @__PURE__ */ e(
|
|
1779
|
+
return /* @__PURE__ */ e(H, { success: !0, onClick: l, children: o });
|
|
1868
1780
|
default:
|
|
1869
|
-
return /* @__PURE__ */ e(
|
|
1781
|
+
return /* @__PURE__ */ e(H, { primary: !0, onClick: l, children: o });
|
|
1870
1782
|
}
|
|
1871
1783
|
};
|
|
1872
1784
|
return /* @__PURE__ */ d(Ue, { isShow: i, onHide: n, children: [
|
|
1873
1785
|
a(),
|
|
1874
1786
|
/* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(C, { children: r }) }),
|
|
1875
1787
|
/* @__PURE__ */ e(ot, { children: /* @__PURE__ */ d(f, { justify: "flex-end", direction: "row", gap: "sm", children: [
|
|
1876
|
-
/* @__PURE__ */ e(
|
|
1788
|
+
/* @__PURE__ */ e(H, { secondary: !0, onClick: n, children: "Cancel" }),
|
|
1877
1789
|
h()
|
|
1878
1790
|
] }) })
|
|
1879
1791
|
] });
|
|
1880
|
-
},
|
|
1792
|
+
}, Dr = ({ backButton: t }) => {
|
|
1881
1793
|
const [r, n] = M(!1), l = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", o = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
|
|
1882
1794
|
return /* @__PURE__ */ d(
|
|
1883
1795
|
f,
|
|
@@ -1915,7 +1827,7 @@ const Dn = te(
|
|
|
1915
1827
|
]
|
|
1916
1828
|
}
|
|
1917
1829
|
);
|
|
1918
|
-
},
|
|
1830
|
+
}, vr = ({
|
|
1919
1831
|
backButton: t,
|
|
1920
1832
|
title: r,
|
|
1921
1833
|
titleTag: n,
|
|
@@ -1933,31 +1845,31 @@ const Dn = te(
|
|
|
1933
1845
|
}
|
|
1934
1846
|
g(-1, { replace: !0 });
|
|
1935
1847
|
}, A = () => o ? nt(o) ? o : /* @__PURE__ */ e(f, { direction: "row", gap: "lg", children: o.map(
|
|
1936
|
-
({ title:
|
|
1937
|
-
|
|
1848
|
+
({ title: j, icon: Q, buttonProps: L, onClick: fe }, P) => !j && !Q ? null : /* @__PURE__ */ e(
|
|
1849
|
+
H,
|
|
1938
1850
|
{
|
|
1939
1851
|
fullWidth: !u,
|
|
1940
1852
|
iconLeft: Q ? /* @__PURE__ */ e(k, { name: Q, size: "md" }) : void 0,
|
|
1941
1853
|
onClick: fe,
|
|
1942
1854
|
...L,
|
|
1943
|
-
children:
|
|
1855
|
+
children: j
|
|
1944
1856
|
},
|
|
1945
1857
|
`action-${P}`
|
|
1946
1858
|
)
|
|
1947
1859
|
) }) : null, D = () => {
|
|
1948
|
-
const
|
|
1860
|
+
const j = /* @__PURE__ */ e(Dr, { backButton: t });
|
|
1949
1861
|
return t != null && t.navigateTo ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
|
|
1950
1862
|
Vt,
|
|
1951
1863
|
{
|
|
1952
1864
|
to: t.navigateTo,
|
|
1953
1865
|
replace: !0,
|
|
1954
1866
|
style: { textDecoration: "none" },
|
|
1955
|
-
children:
|
|
1867
|
+
children: j
|
|
1956
1868
|
}
|
|
1957
|
-
) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(ut, { onClick: v, children:
|
|
1869
|
+
) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(ut, { onClick: v, children: j }) });
|
|
1958
1870
|
}, T = () => {
|
|
1959
|
-
const
|
|
1960
|
-
return !
|
|
1871
|
+
const j = !!r, Q = nt(o) ? !0 : Array.isArray(o) && o.length > 0;
|
|
1872
|
+
return !j && !Q && !p ? null : /* @__PURE__ */ d(
|
|
1961
1873
|
f,
|
|
1962
1874
|
{
|
|
1963
1875
|
gap: "xs",
|
|
@@ -1966,7 +1878,7 @@ const Dn = te(
|
|
|
1966
1878
|
...h,
|
|
1967
1879
|
children: [
|
|
1968
1880
|
p && D(),
|
|
1969
|
-
(
|
|
1881
|
+
(j || Q) && /* @__PURE__ */ d(
|
|
1970
1882
|
f,
|
|
1971
1883
|
{
|
|
1972
1884
|
direction: u ? "row" : "column",
|
|
@@ -1974,7 +1886,7 @@ const Dn = te(
|
|
|
1974
1886
|
justify: "space-between",
|
|
1975
1887
|
align: "center",
|
|
1976
1888
|
children: [
|
|
1977
|
-
|
|
1889
|
+
j ? typeof r == "string" ? /* @__PURE__ */ d(f, { direction: "row", gap: "lg", align: "center", children: [
|
|
1978
1890
|
/* @__PURE__ */ e(C, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: r }),
|
|
1979
1891
|
n && /* @__PURE__ */ e(Ee, { border: !0, size: "lg", text: n, ...s })
|
|
1980
1892
|
] }) : r : null,
|
|
@@ -1985,7 +1897,7 @@ const Dn = te(
|
|
|
1985
1897
|
]
|
|
1986
1898
|
}
|
|
1987
1899
|
);
|
|
1988
|
-
},
|
|
1900
|
+
}, Z = () => l;
|
|
1989
1901
|
return /* @__PURE__ */ d(
|
|
1990
1902
|
f,
|
|
1991
1903
|
{
|
|
@@ -1999,22 +1911,22 @@ const Dn = te(
|
|
|
1999
1911
|
},
|
|
2000
1912
|
children: [
|
|
2001
1913
|
i && T(),
|
|
2002
|
-
|
|
1914
|
+
Z()
|
|
2003
1915
|
]
|
|
2004
1916
|
},
|
|
2005
1917
|
m.pathname
|
|
2006
1918
|
);
|
|
2007
|
-
},
|
|
1919
|
+
}, vn = te(vr), br = {
|
|
2008
1920
|
icon: "Cross",
|
|
2009
1921
|
title: ""
|
|
2010
|
-
},
|
|
1922
|
+
}, wr = "calc(100vw - 16px)", St = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${wr})`, kr = It(
|
|
2011
1923
|
({
|
|
2012
1924
|
onHide: t,
|
|
2013
1925
|
show: r,
|
|
2014
1926
|
withBlur: n = !1,
|
|
2015
1927
|
style: l,
|
|
2016
1928
|
children: i,
|
|
2017
|
-
closeButton: o =
|
|
1929
|
+
closeButton: o = br,
|
|
2018
1930
|
width: s,
|
|
2019
1931
|
minWidth: a = "357px",
|
|
2020
1932
|
maxWidth: h = "357px"
|
|
@@ -2094,7 +2006,7 @@ const Dn = te(
|
|
|
2094
2006
|
}
|
|
2095
2007
|
);
|
|
2096
2008
|
}
|
|
2097
|
-
),
|
|
2009
|
+
), Sr = te(
|
|
2098
2010
|
({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
2099
2011
|
f,
|
|
2100
2012
|
{
|
|
@@ -2106,7 +2018,7 @@ const Dn = te(
|
|
|
2106
2018
|
children: t
|
|
2107
2019
|
}
|
|
2108
2020
|
)
|
|
2109
|
-
),
|
|
2021
|
+
), bn = te(
|
|
2110
2022
|
({
|
|
2111
2023
|
children: t,
|
|
2112
2024
|
title: r,
|
|
@@ -2160,13 +2072,13 @@ const Dn = te(
|
|
|
2160
2072
|
},
|
|
2161
2073
|
children: [
|
|
2162
2074
|
i !== null && D ? /* @__PURE__ */ e($t, { ...u, children: A() }) : null,
|
|
2163
|
-
/* @__PURE__ */ e(
|
|
2075
|
+
/* @__PURE__ */ e(Sr, { ...h, children: t }),
|
|
2164
2076
|
o ? /* @__PURE__ */ e(_t, { ...g, children: o }) : null
|
|
2165
2077
|
]
|
|
2166
2078
|
}
|
|
2167
2079
|
);
|
|
2168
2080
|
}
|
|
2169
|
-
),
|
|
2081
|
+
), Fr = "var(--sa-color-secondary-50, #e6e9fb)", Er = ({ children: t, onClick: r }) => {
|
|
2170
2082
|
const [n, l] = M("");
|
|
2171
2083
|
return /* @__PURE__ */ e(
|
|
2172
2084
|
ut,
|
|
@@ -2181,14 +2093,14 @@ const Dn = te(
|
|
|
2181
2093
|
gap: "spacing-1",
|
|
2182
2094
|
cursor: "pointer",
|
|
2183
2095
|
onClick: r,
|
|
2184
|
-
onMouseEnter: () => l(
|
|
2096
|
+
onMouseEnter: () => l(Fr),
|
|
2185
2097
|
borderRadius: "rounded-md",
|
|
2186
2098
|
onMouseLeave: () => l(""),
|
|
2187
2099
|
style: { backgroundColor: n },
|
|
2188
2100
|
children: t
|
|
2189
2101
|
}
|
|
2190
2102
|
);
|
|
2191
|
-
},
|
|
2103
|
+
}, Mr = te(Er), Lr = ({
|
|
2192
2104
|
icon: t,
|
|
2193
2105
|
items: r = [],
|
|
2194
2106
|
style: n,
|
|
@@ -2208,9 +2120,9 @@ const Dn = te(
|
|
|
2208
2120
|
[i]
|
|
2209
2121
|
);
|
|
2210
2122
|
return /* @__PURE__ */ d(Lt, { position: o, style: n, children: [
|
|
2211
|
-
/* @__PURE__ */ e($e, { style: l, children: /* @__PURE__ */ e(
|
|
2123
|
+
/* @__PURE__ */ e($e, { style: l, children: /* @__PURE__ */ e(H, { size: "sm", secondary: !0, ...s, children: /* @__PURE__ */ e(k, { name: t, ...a }) }) }),
|
|
2212
2124
|
/* @__PURE__ */ e(Wt, { style: u, children: r.map((g, m) => h === "outline-button" ? /* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ d(
|
|
2213
|
-
|
|
2125
|
+
H,
|
|
2214
2126
|
{
|
|
2215
2127
|
size: "sm",
|
|
2216
2128
|
secondary: !0,
|
|
@@ -2223,7 +2135,7 @@ const Dn = te(
|
|
|
2223
2135
|
]
|
|
2224
2136
|
}
|
|
2225
2137
|
) }, g.id || m) : /* @__PURE__ */ d(
|
|
2226
|
-
|
|
2138
|
+
Mr,
|
|
2227
2139
|
{
|
|
2228
2140
|
onClick: g.onClick,
|
|
2229
2141
|
...g.buttonProps,
|
|
@@ -2235,18 +2147,18 @@ const Dn = te(
|
|
|
2235
2147
|
g.id || m
|
|
2236
2148
|
)) })
|
|
2237
2149
|
] });
|
|
2238
|
-
},
|
|
2239
|
-
H1:
|
|
2240
|
-
H2:
|
|
2241
|
-
H3:
|
|
2150
|
+
}, wn = te(Lr), Wr = (t) => /* @__PURE__ */ e(C, { variant: "h1", children: t.children, ...t.props }), Br = (t) => /* @__PURE__ */ e(C, { variant: "h2", children: t.children, ...t.props }), Ar = (t) => /* @__PURE__ */ e(C, { variant: "h3", children: t.children, ...t.props }), Hr = (t) => /* @__PURE__ */ e(C, { variant: "h4", children: t.children, ...t.props }), Rr = (t) => /* @__PURE__ */ e(C, { variant: "h5", children: t.children, ...t.props }), Ir = (t) => /* @__PURE__ */ e(C, { variant: "h6", children: t.children, ...t.props }), Vr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h1", children: t.children, ...t.props }), zr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h2", children: t.children, ...t.props }), Tr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h3", children: t.children, ...t.props }), Or = (t) => /* @__PURE__ */ e(C, { variant: "body-1", children: t.children, ...t.props }), Nr = (t) => /* @__PURE__ */ e(C, { variant: "body-2", children: t.children, ...t.props }), Zr = (t) => /* @__PURE__ */ e(C, { variant: "body-3", children: t.children, ...t.props }), me = {
|
|
2151
|
+
H1: Wr,
|
|
2152
|
+
H2: Br,
|
|
2153
|
+
H3: Ar,
|
|
2242
2154
|
H4: Hr,
|
|
2243
|
-
H5:
|
|
2244
|
-
H6:
|
|
2245
|
-
SubH1:
|
|
2246
|
-
SubH2:
|
|
2247
|
-
SubH3:
|
|
2248
|
-
Body1:
|
|
2249
|
-
Body2:
|
|
2155
|
+
H5: Rr,
|
|
2156
|
+
H6: Ir,
|
|
2157
|
+
SubH1: Vr,
|
|
2158
|
+
SubH2: zr,
|
|
2159
|
+
SubH3: Tr,
|
|
2160
|
+
Body1: Or,
|
|
2161
|
+
Body2: Nr,
|
|
2250
2162
|
Body3: Zr
|
|
2251
2163
|
}, ft = () => {
|
|
2252
2164
|
const [t, r] = Qe(), n = Ge(t.toString()), l = zt(), i = Ve(), o = l.id;
|
|
@@ -2266,7 +2178,7 @@ const Dn = te(
|
|
|
2266
2178
|
id: o,
|
|
2267
2179
|
hasId: !!o
|
|
2268
2180
|
};
|
|
2269
|
-
},
|
|
2181
|
+
}, jr = (t) => JSON.stringify(t), $r = (t) => JSON.stringify(t), _r = (t) => JSON.stringify(t), Ur = (t) => JSON.stringify(t), qr = (t) => t, Gr = (t) => JSON.stringify(t), Ft = ({
|
|
2270
2182
|
value: t,
|
|
2271
2183
|
name: r,
|
|
2272
2184
|
type: n,
|
|
@@ -2281,23 +2193,23 @@ const Dn = te(
|
|
|
2281
2193
|
let u;
|
|
2282
2194
|
switch (n) {
|
|
2283
2195
|
case "search":
|
|
2284
|
-
u =
|
|
2196
|
+
u = qr(t);
|
|
2285
2197
|
break;
|
|
2286
2198
|
case "dropdown":
|
|
2287
2199
|
case "dropdown-multiple":
|
|
2288
|
-
u =
|
|
2200
|
+
u = jr(t);
|
|
2289
2201
|
break;
|
|
2290
2202
|
case "radio":
|
|
2291
|
-
u =
|
|
2203
|
+
u = $r(t);
|
|
2292
2204
|
break;
|
|
2293
2205
|
case "date-range":
|
|
2294
|
-
u =
|
|
2206
|
+
u = _r(t);
|
|
2295
2207
|
break;
|
|
2296
2208
|
case "advanced-date-range":
|
|
2297
|
-
u =
|
|
2209
|
+
u = Gr(t);
|
|
2298
2210
|
break;
|
|
2299
2211
|
case "date":
|
|
2300
|
-
u =
|
|
2212
|
+
u = Ur(t);
|
|
2301
2213
|
break;
|
|
2302
2214
|
default:
|
|
2303
2215
|
u = t;
|
|
@@ -2328,7 +2240,7 @@ const Dn = te(
|
|
|
2328
2240
|
}) => {
|
|
2329
2241
|
const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
|
|
2330
2242
|
return l === "label" && s ? JSON.parse(s)[0].label : l === "value" && s ? JSON.parse(s)[0].value : s;
|
|
2331
|
-
},
|
|
2243
|
+
}, kn = ({
|
|
2332
2244
|
name: t,
|
|
2333
2245
|
filterKey: r = "filter",
|
|
2334
2246
|
searchParams: n,
|
|
@@ -2336,7 +2248,7 @@ const Dn = te(
|
|
|
2336
2248
|
}) => {
|
|
2337
2249
|
const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
|
|
2338
2250
|
return l === "label" && s ? JSON.parse(s).map((a) => a.label) : l === "value" && s ? JSON.parse(s).map((a) => a.value) : l === "array" && s ? JSON.parse(s) : s;
|
|
2339
|
-
},
|
|
2251
|
+
}, Sn = ({
|
|
2340
2252
|
name: t,
|
|
2341
2253
|
filterKey: r = "filter",
|
|
2342
2254
|
searchParams: n,
|
|
@@ -2344,10 +2256,10 @@ const Dn = te(
|
|
|
2344
2256
|
}) => {
|
|
2345
2257
|
const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
|
|
2346
2258
|
return l === "id" && s ? JSON.parse(s).id : l === "label" && s ? JSON.parse(s).label : l === "value" && s ? JSON.parse(s).value : s;
|
|
2347
|
-
},
|
|
2259
|
+
}, Jr = (t, r, n) => {
|
|
2348
2260
|
const l = r.get(n || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0;
|
|
2349
2261
|
return i ? i[t] : void 0;
|
|
2350
|
-
},
|
|
2262
|
+
}, Fn = ({
|
|
2351
2263
|
name: t,
|
|
2352
2264
|
filterKey: r = "filter",
|
|
2353
2265
|
searchParams: n
|
|
@@ -2357,21 +2269,21 @@ const Dn = te(
|
|
|
2357
2269
|
start: o ? JSON.parse(o).from : void 0,
|
|
2358
2270
|
end: o ? JSON.parse(o).to : void 0
|
|
2359
2271
|
};
|
|
2360
|
-
},
|
|
2272
|
+
}, En = ({
|
|
2361
2273
|
name: t,
|
|
2362
2274
|
filterKey: r = "filter",
|
|
2363
2275
|
searchParams: n
|
|
2364
2276
|
}) => {
|
|
2365
2277
|
const l = n.get(r || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0, o = i ? i[t] : void 0;
|
|
2366
2278
|
return o ? JSON.parse(o) : void 0;
|
|
2367
|
-
},
|
|
2279
|
+
}, Mn = (t, {
|
|
2368
2280
|
filterKey: r = "filter",
|
|
2369
2281
|
perPageKey: n = "perPage",
|
|
2370
2282
|
pageKey: l = "page"
|
|
2371
2283
|
}) => {
|
|
2372
2284
|
const i = t.get(r) || void 0, o = t.get(n) || void 0, s = t.get(l) || void 0;
|
|
2373
2285
|
return !!i || !!o || !!s;
|
|
2374
|
-
},
|
|
2286
|
+
}, Qr = ({
|
|
2375
2287
|
isOpen: t,
|
|
2376
2288
|
onClose: r,
|
|
2377
2289
|
filterKey: n,
|
|
@@ -2402,7 +2314,7 @@ const Dn = te(
|
|
|
2402
2314
|
return null;
|
|
2403
2315
|
}
|
|
2404
2316
|
};
|
|
2405
|
-
return /* @__PURE__ */ e(
|
|
2317
|
+
return /* @__PURE__ */ e(kr, { onHide: r, show: t || !1, children: /* @__PURE__ */ d(f, { direction: "column", gap: "md", children: [
|
|
2406
2318
|
/* @__PURE__ */ d($, { direction: "row", justify: "space-between", align: "center", children: [
|
|
2407
2319
|
/* @__PURE__ */ e(f, { children: "Filter" }),
|
|
2408
2320
|
/* @__PURE__ */ e(
|
|
@@ -2416,7 +2328,7 @@ const Dn = te(
|
|
|
2416
2328
|
] }),
|
|
2417
2329
|
i == null ? void 0 : i.map((p, v) => m(p, v))
|
|
2418
2330
|
] }) });
|
|
2419
|
-
},
|
|
2331
|
+
}, Pr = ({
|
|
2420
2332
|
searchKey: t = "q",
|
|
2421
2333
|
statusKey: r = "status",
|
|
2422
2334
|
searchPlaceholder: n = "Search",
|
|
@@ -2434,9 +2346,9 @@ const Dn = te(
|
|
|
2434
2346
|
titleSearchLabel: A = "Work Order",
|
|
2435
2347
|
withTitleLabels: D = !1
|
|
2436
2348
|
}) => {
|
|
2437
|
-
const
|
|
2349
|
+
const Z = (p == null ? void 0 : p.isShowLabel) ?? !0, [j, Q] = M(!1), [L, fe] = M(0), P = () => {
|
|
2438
2350
|
fe((z) => z + 1);
|
|
2439
|
-
}, { searchParams: I, setSearchParams: K, getQueryParam: oe } = ft(), ce = Ge(I.toString()), U =
|
|
2351
|
+
}, { searchParams: I, setSearchParams: K, getQueryParam: oe } = ft(), ce = Ge(I.toString()), U = Jr(t, I, a) || "", [ae, se] = M(U), re = oe(a), J = !!(re && !(() => {
|
|
2440
2352
|
if (re)
|
|
2441
2353
|
try {
|
|
2442
2354
|
const z = JSON.parse(re);
|
|
@@ -2483,7 +2395,7 @@ const Dn = te(
|
|
|
2483
2395
|
align: "flex-end",
|
|
2484
2396
|
children: [
|
|
2485
2397
|
J && /* @__PURE__ */ e(f, { justify: "flex-end", children: /* @__PURE__ */ e(
|
|
2486
|
-
|
|
2398
|
+
H,
|
|
2487
2399
|
{
|
|
2488
2400
|
onClick: () => {
|
|
2489
2401
|
const z = new URLSearchParams(I);
|
|
@@ -2510,7 +2422,7 @@ const Dn = te(
|
|
|
2510
2422
|
`extended-filter-${Le}-${L}`
|
|
2511
2423
|
)),
|
|
2512
2424
|
!!(m != null && m.length) && /* @__PURE__ */ e(
|
|
2513
|
-
|
|
2425
|
+
H,
|
|
2514
2426
|
{
|
|
2515
2427
|
primary: J,
|
|
2516
2428
|
secondary: !J,
|
|
@@ -2526,7 +2438,7 @@ const Dn = te(
|
|
|
2526
2438
|
),
|
|
2527
2439
|
fullWidth: !V,
|
|
2528
2440
|
onClick: () => Q(!0),
|
|
2529
|
-
children:
|
|
2441
|
+
children: Z ? "Filter" : void 0
|
|
2530
2442
|
}
|
|
2531
2443
|
),
|
|
2532
2444
|
s && /* @__PURE__ */ d(
|
|
@@ -2614,9 +2526,9 @@ const Dn = te(
|
|
|
2614
2526
|
}
|
|
2615
2527
|
),
|
|
2616
2528
|
/* @__PURE__ */ e(
|
|
2617
|
-
|
|
2529
|
+
Qr,
|
|
2618
2530
|
{
|
|
2619
|
-
isOpen:
|
|
2531
|
+
isOpen: j,
|
|
2620
2532
|
onClose: () => Q(!1),
|
|
2621
2533
|
filterKey: a,
|
|
2622
2534
|
filters: m,
|
|
@@ -2626,7 +2538,7 @@ const Dn = te(
|
|
|
2626
2538
|
]
|
|
2627
2539
|
}
|
|
2628
2540
|
);
|
|
2629
|
-
},
|
|
2541
|
+
}, Yr = ({ children: t, borderRadius: r, height: n }) => {
|
|
2630
2542
|
const l = le(null), [i, o] = M("100vh");
|
|
2631
2543
|
return _(() => {
|
|
2632
2544
|
if (n) return;
|
|
@@ -2654,7 +2566,7 @@ const Dn = te(
|
|
|
2654
2566
|
children: t
|
|
2655
2567
|
}
|
|
2656
2568
|
);
|
|
2657
|
-
},
|
|
2569
|
+
}, Xr = ({
|
|
2658
2570
|
action: t,
|
|
2659
2571
|
rightContent: r,
|
|
2660
2572
|
leftContent: n,
|
|
@@ -2662,7 +2574,7 @@ const Dn = te(
|
|
|
2662
2574
|
advanceFilter: i,
|
|
2663
2575
|
showFilter: o = !0
|
|
2664
2576
|
}) => {
|
|
2665
|
-
const s = ee("md"), a = o ? /* @__PURE__ */ e(
|
|
2577
|
+
const s = ee("md"), a = o ? /* @__PURE__ */ e(Pr, { ...i }) : null;
|
|
2666
2578
|
return /* @__PURE__ */ e(
|
|
2667
2579
|
f,
|
|
2668
2580
|
{
|
|
@@ -2701,7 +2613,7 @@ const Dn = te(
|
|
|
2701
2613
|
},
|
|
2702
2614
|
children: t.map(
|
|
2703
2615
|
({ title: u, icon: g, buttonProps: m, onClick: p }, v) => !u && !g ? null : /* @__PURE__ */ e(
|
|
2704
|
-
|
|
2616
|
+
H,
|
|
2705
2617
|
{
|
|
2706
2618
|
fullWidth: !s,
|
|
2707
2619
|
iconLeft: g ? /* @__PURE__ */ e(k, { name: g }) : void 0,
|
|
@@ -2718,7 +2630,7 @@ const Dn = te(
|
|
|
2718
2630
|
] })
|
|
2719
2631
|
}
|
|
2720
2632
|
);
|
|
2721
|
-
},
|
|
2633
|
+
}, Kr = ({
|
|
2722
2634
|
totalData: t,
|
|
2723
2635
|
withMarginBottom: r = !0,
|
|
2724
2636
|
withMarginTop: n = !0
|
|
@@ -2749,7 +2661,7 @@ const Dn = te(
|
|
|
2749
2661
|
/* @__PURE__ */ e(me.Body1, { children: t || 0 })
|
|
2750
2662
|
]
|
|
2751
2663
|
}
|
|
2752
|
-
),
|
|
2664
|
+
), ei = ({
|
|
2753
2665
|
pagination: t,
|
|
2754
2666
|
pageKey: r = "page",
|
|
2755
2667
|
perPageKey: n = "perPage",
|
|
@@ -2813,7 +2725,7 @@ const Dn = te(
|
|
|
2813
2725
|
}
|
|
2814
2726
|
)
|
|
2815
2727
|
] }) : /* @__PURE__ */ e(
|
|
2816
|
-
|
|
2728
|
+
Kr,
|
|
2817
2729
|
{
|
|
2818
2730
|
totalData: o,
|
|
2819
2731
|
withMarginBottom: !1,
|
|
@@ -2822,16 +2734,16 @@ const Dn = te(
|
|
|
2822
2734
|
)
|
|
2823
2735
|
}
|
|
2824
2736
|
);
|
|
2825
|
-
},
|
|
2737
|
+
}, ti = ({ filter: t, columnTitle: r }) => {
|
|
2826
2738
|
const [n, l] = M(!1), i = le(null), o = le(null), s = le(null), [a, h] = M(""), [u, g] = M({ top: 0, left: 0 }), m = t.selectedValues, p = De(() => a ? t.options.filter(
|
|
2827
2739
|
(D) => D.label.toLowerCase().includes(a.toLowerCase())
|
|
2828
2740
|
) : t.options, [t.options, a]);
|
|
2829
2741
|
_(() => {
|
|
2830
2742
|
if (n && o.current) {
|
|
2831
|
-
const D = o.current.getBoundingClientRect(), T = 280,
|
|
2743
|
+
const D = o.current.getBoundingClientRect(), T = 280, Z = {
|
|
2832
2744
|
top: D.bottom + 8
|
|
2833
2745
|
};
|
|
2834
|
-
t.position === "left" || D.left + T > window.innerWidth ?
|
|
2746
|
+
t.position === "left" || D.left + T > window.innerWidth ? Z.right = window.innerWidth - D.right : Z.left = D.left, g(Z);
|
|
2835
2747
|
}
|
|
2836
2748
|
}, [n, t.position]), _(() => {
|
|
2837
2749
|
n && s.current ? setTimeout(() => {
|
|
@@ -2845,7 +2757,7 @@ const Dn = te(
|
|
|
2845
2757
|
return n && document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
2846
2758
|
}, [n]);
|
|
2847
2759
|
const v = (D) => {
|
|
2848
|
-
const T = m.includes(D) ? m.filter((
|
|
2760
|
+
const T = m.includes(D) ? m.filter((Z) => Z !== D) : [...m, D];
|
|
2849
2761
|
t.onFilterChange(T);
|
|
2850
2762
|
}, A = () => t.onFilterChange([]);
|
|
2851
2763
|
return /* @__PURE__ */ d(f, { style: { position: "relative" }, children: [
|
|
@@ -2861,7 +2773,7 @@ const Dn = te(
|
|
|
2861
2773
|
},
|
|
2862
2774
|
onClick: (D) => {
|
|
2863
2775
|
var T;
|
|
2864
|
-
D.stopPropagation(), n || (T = t.onOpen) == null || T.call(t), l((
|
|
2776
|
+
D.stopPropagation(), n || (T = t.onOpen) == null || T.call(t), l((Z) => !Z);
|
|
2865
2777
|
},
|
|
2866
2778
|
children: /* @__PURE__ */ e(
|
|
2867
2779
|
k,
|
|
@@ -3114,7 +3026,7 @@ const Dn = te(
|
|
|
3114
3026
|
}
|
|
3115
3027
|
)
|
|
3116
3028
|
] });
|
|
3117
|
-
},
|
|
3029
|
+
}, ri = ({
|
|
3118
3030
|
direction: t
|
|
3119
3031
|
}) => {
|
|
3120
3032
|
const r = "var(--sa-text-primary, #292a2e)", n = "var(--sa-text-subtle, #8c8f97)";
|
|
@@ -3154,7 +3066,7 @@ const Dn = te(
|
|
|
3154
3066
|
]
|
|
3155
3067
|
}
|
|
3156
3068
|
);
|
|
3157
|
-
},
|
|
3069
|
+
}, ii = ({ frozen: t }) => /* @__PURE__ */ d(
|
|
3158
3070
|
"svg",
|
|
3159
3071
|
{
|
|
3160
3072
|
width: "11",
|
|
@@ -3170,7 +3082,7 @@ const Dn = te(
|
|
|
3170
3082
|
/* @__PURE__ */ e("path", { d: t ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
3171
3083
|
]
|
|
3172
3084
|
}
|
|
3173
|
-
), tt = "var(--sa-background-primary, #ffffff)", Et = "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
3085
|
+
), tt = "var(--sa-background-primary, #ffffff)", Et = "var(--sa-background-primary-inverse, #f8f8f8)", ni = ({
|
|
3174
3086
|
columns: t,
|
|
3175
3087
|
records: r,
|
|
3176
3088
|
handleDetail: n,
|
|
@@ -3188,8 +3100,8 @@ const Dn = te(
|
|
|
3188
3100
|
actionsOrder: A = ["detail", "update", "delete", "custom"],
|
|
3189
3101
|
customEmptyState: D,
|
|
3190
3102
|
enableColumnResize: T = !1,
|
|
3191
|
-
defaultColumnWidths:
|
|
3192
|
-
onColumnWidthsChange:
|
|
3103
|
+
defaultColumnWidths: Z,
|
|
3104
|
+
onColumnWidthsChange: j,
|
|
3193
3105
|
defaultMinColumnWidth: Q = 60,
|
|
3194
3106
|
sort: L,
|
|
3195
3107
|
defaultSort: fe,
|
|
@@ -3217,7 +3129,7 @@ const Dn = te(
|
|
|
3217
3129
|
Te(x.scrollHeight > x.clientHeight);
|
|
3218
3130
|
}, [r, g]);
|
|
3219
3131
|
const We = le(null), [ie, Oe] = M([]), [Be, Ae] = M(
|
|
3220
|
-
() =>
|
|
3132
|
+
() => Z ?? {}
|
|
3221
3133
|
), ke = le(null);
|
|
3222
3134
|
it(() => {
|
|
3223
3135
|
if (!m || !We.current) {
|
|
@@ -3228,8 +3140,8 @@ const Dn = te(
|
|
|
3228
3140
|
We.current.querySelectorAll("thead tr th")
|
|
3229
3141
|
), w = [];
|
|
3230
3142
|
let b = 0;
|
|
3231
|
-
x.forEach((W,
|
|
3232
|
-
w[
|
|
3143
|
+
x.forEach((W, R) => {
|
|
3144
|
+
w[R] = b, R < m && (b += W.offsetWidth);
|
|
3233
3145
|
}), Oe(w);
|
|
3234
3146
|
}, [m, t, r, Be]);
|
|
3235
3147
|
const Ne = (x) => {
|
|
@@ -3247,18 +3159,18 @@ const Dn = te(
|
|
|
3247
3159
|
if (!b) return;
|
|
3248
3160
|
const W = Math.round(b.getBoundingClientRect().width);
|
|
3249
3161
|
ke.current = { colIndex: w, startX: x.clientX, startWidth: W };
|
|
3250
|
-
const
|
|
3162
|
+
const R = document.body.style.userSelect, ne = document.body.style.cursor;
|
|
3251
3163
|
document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
|
|
3252
3164
|
const ye = (xe) => {
|
|
3253
3165
|
var Se;
|
|
3254
3166
|
const pe = ke.current;
|
|
3255
3167
|
if (!pe) return;
|
|
3256
|
-
const
|
|
3168
|
+
const Ze = ((Se = t[pe.colIndex]) == null ? void 0 : Se.minWidth) ?? Q, He = Math.max(Ze, pe.startWidth + (xe.clientX - pe.startX));
|
|
3257
3169
|
Ae(
|
|
3258
|
-
(Ye) => Ye[pe.colIndex] ===
|
|
3170
|
+
(Ye) => Ye[pe.colIndex] === He ? Ye : { ...Ye, [pe.colIndex]: He }
|
|
3259
3171
|
);
|
|
3260
3172
|
}, ve = () => {
|
|
3261
|
-
document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", ve), document.body.style.userSelect =
|
|
3173
|
+
document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", ve), document.body.style.userSelect = R, document.body.style.cursor = ne, ke.current = null, j && Ae((xe) => (j(xe), xe));
|
|
3262
3174
|
};
|
|
3263
3175
|
document.addEventListener("mousemove", ye), document.addEventListener("mouseup", ve);
|
|
3264
3176
|
};
|
|
@@ -3272,8 +3184,8 @@ const Dn = te(
|
|
|
3272
3184
|
},
|
|
3273
3185
|
children: /* @__PURE__ */ d(Ie, { children: [
|
|
3274
3186
|
t.map((x, w) => {
|
|
3275
|
-
var
|
|
3276
|
-
const b = m > 0 && w < m, W = ie[w] ?? 0,
|
|
3187
|
+
var Ze, He;
|
|
3188
|
+
const b = m > 0 && w < m, W = ie[w] ?? 0, R = S(x), ye = w === t.length - 1 && V && I, ve = ae(x), xe = !!x.sortable && !!ve, pe = xe && (U == null ? void 0 : U.key) === ve ? U.direction : null;
|
|
3277
3189
|
return /* @__PURE__ */ d(
|
|
3278
3190
|
mt,
|
|
3279
3191
|
{
|
|
@@ -3334,10 +3246,10 @@ const Dn = te(
|
|
|
3334
3246
|
textOverflow: "ellipsis",
|
|
3335
3247
|
whiteSpace: "nowrap"
|
|
3336
3248
|
},
|
|
3337
|
-
children: x.title || ((
|
|
3249
|
+
children: x.title || ((Ze = x.accessor) == null ? void 0 : Ze.toString())
|
|
3338
3250
|
}
|
|
3339
3251
|
),
|
|
3340
|
-
/* @__PURE__ */ e(
|
|
3252
|
+
/* @__PURE__ */ e(ri, { direction: pe })
|
|
3341
3253
|
]
|
|
3342
3254
|
}
|
|
3343
3255
|
) : /* @__PURE__ */ e(
|
|
@@ -3350,11 +3262,11 @@ const Dn = te(
|
|
|
3350
3262
|
textOverflow: "ellipsis",
|
|
3351
3263
|
whiteSpace: "nowrap"
|
|
3352
3264
|
},
|
|
3353
|
-
children: x.title || ((
|
|
3265
|
+
children: x.title || ((He = x.accessor) == null ? void 0 : He.toString())
|
|
3354
3266
|
}
|
|
3355
3267
|
),
|
|
3356
3268
|
x.filter && /* @__PURE__ */ e(
|
|
3357
|
-
|
|
3269
|
+
ti,
|
|
3358
3270
|
{
|
|
3359
3271
|
filter: x.filter,
|
|
3360
3272
|
columnTitle: x.title
|
|
@@ -3377,13 +3289,13 @@ const Dn = te(
|
|
|
3377
3289
|
opacity: b ? 1 : 0.45,
|
|
3378
3290
|
transition: "opacity 0.15s"
|
|
3379
3291
|
},
|
|
3380
|
-
children: /* @__PURE__ */ e(
|
|
3292
|
+
children: /* @__PURE__ */ e(ii, { frozen: b })
|
|
3381
3293
|
}
|
|
3382
3294
|
)
|
|
3383
3295
|
]
|
|
3384
3296
|
}
|
|
3385
3297
|
),
|
|
3386
|
-
|
|
3298
|
+
R && /* @__PURE__ */ e(
|
|
3387
3299
|
"div",
|
|
3388
3300
|
{
|
|
3389
3301
|
onMouseDown: (Se) => F(Se, w),
|
|
@@ -3427,11 +3339,11 @@ const Dn = te(
|
|
|
3427
3339
|
}
|
|
3428
3340
|
),
|
|
3429
3341
|
/* @__PURE__ */ e(Yt, { children: o ? /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: /* @__PURE__ */ d(f, { style: { gap: "16px" }, children: [
|
|
3430
|
-
/* @__PURE__ */ e(
|
|
3431
|
-
/* @__PURE__ */ e(
|
|
3432
|
-
/* @__PURE__ */ e(
|
|
3433
|
-
/* @__PURE__ */ e(
|
|
3434
|
-
/* @__PURE__ */ e(
|
|
3342
|
+
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
3343
|
+
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
3344
|
+
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
3345
|
+
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
3346
|
+
/* @__PURE__ */ e(Re, { variant: "list" })
|
|
3435
3347
|
] }) }) }) : !(r != null && r.length) && D ? /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: D }) }) : r == null ? void 0 : r.map((x, w) => /* @__PURE__ */ d(
|
|
3436
3348
|
Ie,
|
|
3437
3349
|
{
|
|
@@ -3442,19 +3354,19 @@ const Dn = te(
|
|
|
3442
3354
|
},
|
|
3443
3355
|
onMouseEnter: (b) => {
|
|
3444
3356
|
const W = b.currentTarget;
|
|
3445
|
-
W.style.backgroundColor = Et, Array.from(W.querySelectorAll("td")).forEach((
|
|
3446
|
-
|
|
3357
|
+
W.style.backgroundColor = Et, Array.from(W.querySelectorAll("td")).forEach((R) => {
|
|
3358
|
+
R.style.position === "sticky" && (R.style.backgroundColor = Et);
|
|
3447
3359
|
});
|
|
3448
3360
|
},
|
|
3449
3361
|
onMouseLeave: (b) => {
|
|
3450
3362
|
const W = b.currentTarget;
|
|
3451
|
-
W.style.backgroundColor = "", Array.from(W.querySelectorAll("td")).forEach((
|
|
3452
|
-
|
|
3363
|
+
W.style.backgroundColor = "", Array.from(W.querySelectorAll("td")).forEach((R) => {
|
|
3364
|
+
R.style.position === "sticky" && (R.style.backgroundColor = tt);
|
|
3453
3365
|
});
|
|
3454
3366
|
},
|
|
3455
3367
|
children: [
|
|
3456
3368
|
t.map((b, W) => {
|
|
3457
|
-
const
|
|
3369
|
+
const R = b.render ? b.render(x, w, r) : ze(x, b.accessor), ne = m > 0 && W < m, ye = ie[W] ?? 0, ve = Be[W] !== void 0, xe = ne && W === m - 1;
|
|
3458
3370
|
return /* @__PURE__ */ e(
|
|
3459
3371
|
we,
|
|
3460
3372
|
{
|
|
@@ -3473,7 +3385,7 @@ const Dn = te(
|
|
|
3473
3385
|
textAlign: b.textAlign === "text-right" ? "right" : b.textAlign === "text-center" ? "center" : "left",
|
|
3474
3386
|
...y(W, b.width)
|
|
3475
3387
|
},
|
|
3476
|
-
children: typeof
|
|
3388
|
+
children: typeof R == "string" ? /* @__PURE__ */ e(
|
|
3477
3389
|
C,
|
|
3478
3390
|
{
|
|
3479
3391
|
style: {
|
|
@@ -3482,9 +3394,9 @@ const Dn = te(
|
|
|
3482
3394
|
textOverflow: "ellipsis",
|
|
3483
3395
|
textAlign: b.textAlign === "text-right" ? "right" : b.textAlign === "text-center" ? "center" : "left"
|
|
3484
3396
|
},
|
|
3485
|
-
children:
|
|
3397
|
+
children: R
|
|
3486
3398
|
}
|
|
3487
|
-
) :
|
|
3399
|
+
) : R
|
|
3488
3400
|
},
|
|
3489
3401
|
`row-${w}-col-${W}`
|
|
3490
3402
|
);
|
|
@@ -3500,7 +3412,7 @@ const Dn = te(
|
|
|
3500
3412
|
}, children: /* @__PURE__ */ e($, { direction: "row", align: "center", justify: "center", gap: "sm", children: A.map((b) => {
|
|
3501
3413
|
const W = w === r.length - 1 ? "top" : "bottom";
|
|
3502
3414
|
return b === "detail" && n && (h == null ? void 0 : h(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Detail", position: W, children: /* @__PURE__ */ e(
|
|
3503
|
-
|
|
3415
|
+
H,
|
|
3504
3416
|
{
|
|
3505
3417
|
size: "xs",
|
|
3506
3418
|
variant: "outline",
|
|
@@ -3509,7 +3421,7 @@ const Dn = te(
|
|
|
3509
3421
|
iconLeft: /* @__PURE__ */ e(k, { name: "DocumentClean", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
3510
3422
|
}
|
|
3511
3423
|
) }, "detail") : b === "update" && l && (a == null ? void 0 : a(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Update", position: W, children: /* @__PURE__ */ e(
|
|
3512
|
-
|
|
3424
|
+
H,
|
|
3513
3425
|
{
|
|
3514
3426
|
size: "xs",
|
|
3515
3427
|
variant: "outline",
|
|
@@ -3518,7 +3430,7 @@ const Dn = te(
|
|
|
3518
3430
|
iconLeft: /* @__PURE__ */ e(k, { name: "Edit1", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
3519
3431
|
}
|
|
3520
3432
|
) }, "update") : b === "delete" && i && (s == null ? void 0 : s(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Delete", position: W, children: /* @__PURE__ */ e(
|
|
3521
|
-
|
|
3433
|
+
H,
|
|
3522
3434
|
{
|
|
3523
3435
|
size: "xs",
|
|
3524
3436
|
variant: "outline",
|
|
@@ -3526,14 +3438,14 @@ const Dn = te(
|
|
|
3526
3438
|
onClick: () => i(x.id, x),
|
|
3527
3439
|
iconLeft: /* @__PURE__ */ e(k, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
|
|
3528
3440
|
}
|
|
3529
|
-
) }, "delete") : b === "custom" ? /* @__PURE__ */ e(
|
|
3441
|
+
) }, "delete") : b === "custom" ? /* @__PURE__ */ e(Rt.Fragment, { children: v == null ? void 0 : v(x) }, "custom") : null;
|
|
3530
3442
|
}) }) }) : null
|
|
3531
3443
|
]
|
|
3532
3444
|
},
|
|
3533
3445
|
`${x}${w}`
|
|
3534
3446
|
)) })
|
|
3535
3447
|
] }) });
|
|
3536
|
-
},
|
|
3448
|
+
}, li = ({
|
|
3537
3449
|
wrapperProps: t,
|
|
3538
3450
|
dataTableProps: r,
|
|
3539
3451
|
headerProps: n,
|
|
@@ -3545,8 +3457,8 @@ const Dn = te(
|
|
|
3545
3457
|
), a = (n == null ? void 0 : n.show) ?? !0, h = le(null), u = (m = r == null ? void 0 : r.pagination) == null ? void 0 : m.totalData;
|
|
3546
3458
|
typeof u == "number" && (h.current = u);
|
|
3547
3459
|
const g = (l == null ? void 0 : l.showFooter) ?? (u === void 0 ? h.current !== 0 : u !== 0);
|
|
3548
|
-
return /* @__PURE__ */ d(
|
|
3549
|
-
a && /* @__PURE__ */ e(
|
|
3460
|
+
return /* @__PURE__ */ d(Yr, { ...t, children: [
|
|
3461
|
+
a && /* @__PURE__ */ e(Xr, { ...n }),
|
|
3550
3462
|
/* @__PURE__ */ e(
|
|
3551
3463
|
f,
|
|
3552
3464
|
{
|
|
@@ -3557,7 +3469,7 @@ const Dn = te(
|
|
|
3557
3469
|
overflowX: "auto"
|
|
3558
3470
|
},
|
|
3559
3471
|
children: r ? /* @__PURE__ */ e(
|
|
3560
|
-
|
|
3472
|
+
ni,
|
|
3561
3473
|
{
|
|
3562
3474
|
...r,
|
|
3563
3475
|
scrollParentRef: i,
|
|
@@ -3568,7 +3480,7 @@ const Dn = te(
|
|
|
3568
3480
|
}
|
|
3569
3481
|
),
|
|
3570
3482
|
g && /* @__PURE__ */ e(
|
|
3571
|
-
|
|
3483
|
+
ei,
|
|
3572
3484
|
{
|
|
3573
3485
|
pagination: r == null ? void 0 : r.pagination,
|
|
3574
3486
|
pageKey: r == null ? void 0 : r.pageKey,
|
|
@@ -3580,15 +3492,15 @@ const Dn = te(
|
|
|
3580
3492
|
)
|
|
3581
3493
|
] });
|
|
3582
3494
|
};
|
|
3583
|
-
function
|
|
3495
|
+
function oi(t) {
|
|
3584
3496
|
return te(
|
|
3585
3497
|
t
|
|
3586
3498
|
);
|
|
3587
3499
|
}
|
|
3588
|
-
const
|
|
3500
|
+
const Ln = oi(li), gt = ({
|
|
3589
3501
|
of: t,
|
|
3590
3502
|
render: r
|
|
3591
|
-
}) =>
|
|
3503
|
+
}) => rr.toArray(t == null ? void 0 : t.map((n, l, i) => r(n, l, i))), O = ({
|
|
3592
3504
|
condition: t,
|
|
3593
3505
|
fallback: r,
|
|
3594
3506
|
children: n,
|
|
@@ -3604,7 +3516,7 @@ const Bn = ci(oi), gt = ({
|
|
|
3604
3516
|
color: t.color || "gray-700",
|
|
3605
3517
|
children: t.children
|
|
3606
3518
|
}
|
|
3607
|
-
), Ce = (t) => /* @__PURE__ */ e(C, { color: "red-600", fontSize: "sm", children: t.message }),
|
|
3519
|
+
), Ce = (t) => /* @__PURE__ */ e(C, { color: "red-600", fontSize: "sm", children: t.message }), ci = ({
|
|
3608
3520
|
size: t = "md",
|
|
3609
3521
|
direction: r = "vertical",
|
|
3610
3522
|
requiredTitle: n = "(Required)",
|
|
@@ -3689,7 +3601,7 @@ const Bn = ci(oi), gt = ({
|
|
|
3689
3601
|
]
|
|
3690
3602
|
}
|
|
3691
3603
|
);
|
|
3692
|
-
},
|
|
3604
|
+
}, ai = ({
|
|
3693
3605
|
size: t = "md",
|
|
3694
3606
|
direction: r = "vertical",
|
|
3695
3607
|
requiredTitle: n = "(Required)",
|
|
@@ -3780,7 +3692,7 @@ const Bn = ci(oi), gt = ({
|
|
|
3780
3692
|
]
|
|
3781
3693
|
}
|
|
3782
3694
|
);
|
|
3783
|
-
},
|
|
3695
|
+
}, si = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-text-error, #a4133c)" : "var(--sa-text-disable, #181a198f)", di = (t) => {
|
|
3784
3696
|
var a;
|
|
3785
3697
|
const [r, n] = M(!1), l = (h) => {
|
|
3786
3698
|
h.preventDefault(), h.stopPropagation();
|
|
@@ -3807,7 +3719,7 @@ const Bn = ci(oi), gt = ({
|
|
|
3807
3719
|
paddingBlock: "md",
|
|
3808
3720
|
borderRadius: "rounded-md",
|
|
3809
3721
|
style: {
|
|
3810
|
-
border: r ? "1px solid var(--sa-text-info, #0073ab)" : `1px solid ${
|
|
3722
|
+
border: r ? "1px solid var(--sa-text-info, #0073ab)" : `1px solid ${si(t.errorMessage, t.status)}`
|
|
3811
3723
|
},
|
|
3812
3724
|
children: [
|
|
3813
3725
|
/* @__PURE__ */ e(
|
|
@@ -3849,17 +3761,17 @@ const Bn = ci(oi), gt = ({
|
|
|
3849
3761
|
}
|
|
3850
3762
|
);
|
|
3851
3763
|
};
|
|
3852
|
-
function
|
|
3764
|
+
function Wn(t) {
|
|
3853
3765
|
return t.split(" ").map((r) => r[0]).join("").slice(0, 2).toUpperCase();
|
|
3854
3766
|
}
|
|
3855
|
-
const
|
|
3767
|
+
const hi = (t) => {
|
|
3856
3768
|
const r = {
|
|
3857
3769
|
day: "2-digit",
|
|
3858
3770
|
month: "short",
|
|
3859
3771
|
year: "numeric"
|
|
3860
3772
|
};
|
|
3861
3773
|
return t.toLocaleDateString("id-ID", r);
|
|
3862
|
-
},
|
|
3774
|
+
}, Bn = (t) => {
|
|
3863
3775
|
const r = {
|
|
3864
3776
|
Jan: 0,
|
|
3865
3777
|
Feb: 1,
|
|
@@ -3879,7 +3791,7 @@ const ui = (t) => {
|
|
|
3879
3791
|
const l = parseInt(n[0], 10), i = r[n[1]], o = parseInt(n[2], 10);
|
|
3880
3792
|
return isNaN(l) || isNaN(i) || isNaN(o) ? null : new Date(o, i, l);
|
|
3881
3793
|
};
|
|
3882
|
-
function
|
|
3794
|
+
function An(t, r = !0) {
|
|
3883
3795
|
if (!t)
|
|
3884
3796
|
return "Rp 0";
|
|
3885
3797
|
const n = typeof t == "number" ? t.toString() : t;
|
|
@@ -3894,19 +3806,19 @@ String.prototype.toTitleCase = function() {
|
|
|
3894
3806
|
String.prototype.toNumber = function() {
|
|
3895
3807
|
return Number(this);
|
|
3896
3808
|
};
|
|
3897
|
-
const
|
|
3809
|
+
const Hn = (t) => {
|
|
3898
3810
|
const r = t.split(" ");
|
|
3899
3811
|
let n = r[0].charAt(0);
|
|
3900
3812
|
return r.length > 1 && (n += "" + r[1].charAt(0)), n.toUpperCase();
|
|
3901
3813
|
};
|
|
3902
|
-
function
|
|
3814
|
+
function Rn(t) {
|
|
3903
3815
|
const r = typeof t == "string" ? new Date(t) : t;
|
|
3904
3816
|
if (isNaN(r.getTime()))
|
|
3905
3817
|
throw new Error("Invalid date format");
|
|
3906
3818
|
const n = r.getFullYear(), l = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
|
|
3907
3819
|
return `${n}-${l}-${i}`;
|
|
3908
3820
|
}
|
|
3909
|
-
const
|
|
3821
|
+
const ui = "sa-admin", ge = (t) => `var(--${ui}-${t})`, In = {
|
|
3910
3822
|
base: {
|
|
3911
3823
|
borderColor: ge("base-border-color"),
|
|
3912
3824
|
textColor: ge("base-text-color"),
|
|
@@ -3924,22 +3836,22 @@ const fi = "sa-admin", ge = (t) => `var(--${fi}-${t})`, zn = {
|
|
|
3924
3836
|
collapseWidth: ge("sidebar-collapse-width"),
|
|
3925
3837
|
collapseV2Width: ge("sidebar-v2-collapse-width")
|
|
3926
3838
|
}
|
|
3927
|
-
},
|
|
3839
|
+
}, Vn = 24 * 60 * 60 * 1e3, zn = (t) => {
|
|
3928
3840
|
const r = "14px poppins", l = document.createElement("canvas").getContext("2d");
|
|
3929
3841
|
l.font = r;
|
|
3930
3842
|
const i = l.measureText(t).width;
|
|
3931
3843
|
return Number(Math.ceil(i));
|
|
3932
|
-
},
|
|
3933
|
-
function
|
|
3844
|
+
}, fi = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, gi = /--+/, mi = /-$/;
|
|
3845
|
+
function Tn(t, r) {
|
|
3934
3846
|
return JSON.stringify(t) !== JSON.stringify(r);
|
|
3935
3847
|
}
|
|
3936
|
-
function
|
|
3848
|
+
function On(t) {
|
|
3937
3849
|
return /^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t);
|
|
3938
3850
|
}
|
|
3939
|
-
function
|
|
3851
|
+
function Nn(t) {
|
|
3940
3852
|
return /^[A-Za-z\s]+$/.test(t);
|
|
3941
3853
|
}
|
|
3942
|
-
const
|
|
3854
|
+
const Zn = (t) => {
|
|
3943
3855
|
const r = /^[0-9]$/, n = [
|
|
3944
3856
|
"ArrowLeft",
|
|
3945
3857
|
"ArrowRight",
|
|
@@ -3951,7 +3863,7 @@ const $n = (t) => {
|
|
|
3951
3863
|
"Tab"
|
|
3952
3864
|
];
|
|
3953
3865
|
(t.ctrlKey || t.metaKey) && (t.key === "a" || t.key === "c" || t.key === "v") || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
3954
|
-
},
|
|
3866
|
+
}, jn = (t) => {
|
|
3955
3867
|
const r = /^[0-9]$/, n = [
|
|
3956
3868
|
"ArrowLeft",
|
|
3957
3869
|
"ArrowRight",
|
|
@@ -3963,7 +3875,7 @@ const $n = (t) => {
|
|
|
3963
3875
|
"Tab"
|
|
3964
3876
|
];
|
|
3965
3877
|
(t.ctrlKey || t.metaKey) && t.key === "v" || r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
3966
|
-
},
|
|
3878
|
+
}, $n = (t) => {
|
|
3967
3879
|
const r = /^[0-9.]$/, n = [
|
|
3968
3880
|
"ArrowLeft",
|
|
3969
3881
|
"ArrowRight",
|
|
@@ -3975,11 +3887,11 @@ const $n = (t) => {
|
|
|
3975
3887
|
"Tab"
|
|
3976
3888
|
];
|
|
3977
3889
|
(t.ctrlKey || t.metaKey) && t.key === "v" || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
3978
|
-
},
|
|
3979
|
-
function
|
|
3980
|
-
return !(
|
|
3890
|
+
}, _n = (t) => fi.test(t);
|
|
3891
|
+
function Un(t) {
|
|
3892
|
+
return !(gi.test(t) || mi.test(t));
|
|
3981
3893
|
}
|
|
3982
|
-
const
|
|
3894
|
+
const qn = (t) => {
|
|
3983
3895
|
const r = [
|
|
3984
3896
|
"ArrowLeft",
|
|
3985
3897
|
"ArrowRight",
|
|
@@ -3996,7 +3908,7 @@ const Jn = (t) => {
|
|
|
3996
3908
|
return;
|
|
3997
3909
|
const n = t.currentTarget.value;
|
|
3998
3910
|
/^[0-9]$/.test(t.key) || t.key === "." && !n.includes(".") || t.key === "-" && n.length === 0 && !n.includes("-") || r.includes(t.key) || t.preventDefault();
|
|
3999
|
-
},
|
|
3911
|
+
}, Gn = (t) => {
|
|
4000
3912
|
const r = document.getElementById(t);
|
|
4001
3913
|
if (r) {
|
|
4002
3914
|
const n = r.getBoundingClientRect(), l = window.scrollY + n.top - 80;
|
|
@@ -4006,7 +3918,7 @@ const Jn = (t) => {
|
|
|
4006
3918
|
});
|
|
4007
3919
|
}
|
|
4008
3920
|
};
|
|
4009
|
-
function
|
|
3921
|
+
function yi(t) {
|
|
4010
3922
|
const r = t.toLowerCase();
|
|
4011
3923
|
if (["kb", "mb", "gb"].find((o) => r.endsWith(o)))
|
|
4012
3924
|
return t;
|
|
@@ -4015,11 +3927,11 @@ function pi(t) {
|
|
|
4015
3927
|
throw new Error("Invalid size format");
|
|
4016
3928
|
return i >= 1e6 ? `${(i / 1e6).toFixed(2)}MB` : i >= 1e3 ? `${(i / 1e3).toFixed(2)}KB` : `${i}B`;
|
|
4017
3929
|
}
|
|
4018
|
-
function
|
|
3930
|
+
function pi(t) {
|
|
4019
3931
|
const r = t.split("/");
|
|
4020
3932
|
return r[r.length - 1];
|
|
4021
3933
|
}
|
|
4022
|
-
const
|
|
3934
|
+
const xi = (t) => {
|
|
4023
3935
|
var r, n;
|
|
4024
3936
|
return /* @__PURE__ */ d(
|
|
4025
3937
|
f,
|
|
@@ -4064,11 +3976,11 @@ const Ci = (t) => {
|
|
|
4064
3976
|
whiteSpace: "nowrap",
|
|
4065
3977
|
overflow: "hidden"
|
|
4066
3978
|
},
|
|
4067
|
-
children:
|
|
3979
|
+
children: pi(t.defaultUrl || "") || ((r = t.fileSelected) == null ? void 0 : r.name)
|
|
4068
3980
|
}
|
|
4069
3981
|
),
|
|
4070
3982
|
!t.defaultUrl && /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4071
|
-
/* @__PURE__ */ e(C, { fontSize: "sm", fontWeight: "medium", children: `${
|
|
3983
|
+
/* @__PURE__ */ e(C, { fontSize: "sm", fontWeight: "medium", children: `${yi(
|
|
4072
3984
|
((n = t.fileSelected) == null ? void 0 : n.size.toString()) || "100000"
|
|
4073
3985
|
)}` }),
|
|
4074
3986
|
/* @__PURE__ */ e(k, { name: "Dot", size: "xs" }),
|
|
@@ -4080,14 +3992,14 @@ const Ci = (t) => {
|
|
|
4080
3992
|
style: {
|
|
4081
3993
|
textWrap: "nowrap"
|
|
4082
3994
|
},
|
|
4083
|
-
children: t.fileDate ? t.fileDate :
|
|
3995
|
+
children: t.fileDate ? t.fileDate : hi(/* @__PURE__ */ new Date())
|
|
4084
3996
|
}
|
|
4085
3997
|
)
|
|
4086
3998
|
] })
|
|
4087
3999
|
] })
|
|
4088
4000
|
] }),
|
|
4089
4001
|
/* @__PURE__ */ e(
|
|
4090
|
-
|
|
4002
|
+
H,
|
|
4091
4003
|
{
|
|
4092
4004
|
size: "xs",
|
|
4093
4005
|
secondary: !0,
|
|
@@ -4109,7 +4021,7 @@ const Ci = (t) => {
|
|
|
4109
4021
|
]
|
|
4110
4022
|
}
|
|
4111
4023
|
);
|
|
4112
|
-
},
|
|
4024
|
+
}, Ci = ({ status: t = "default", ...r }) => {
|
|
4113
4025
|
var o;
|
|
4114
4026
|
const n = le(null), l = () => {
|
|
4115
4027
|
if (r.defaultUrl) {
|
|
@@ -4146,7 +4058,7 @@ const Ci = (t) => {
|
|
|
4146
4058
|
...r.containerProps,
|
|
4147
4059
|
children: [
|
|
4148
4060
|
(r.fileSelected || r.defaultUrl) && /* @__PURE__ */ e(
|
|
4149
|
-
|
|
4061
|
+
xi,
|
|
4150
4062
|
{
|
|
4151
4063
|
fileSelected: r.fileSelected,
|
|
4152
4064
|
fileDate: r.fileDate,
|
|
@@ -4156,7 +4068,7 @@ const Ci = (t) => {
|
|
|
4156
4068
|
}
|
|
4157
4069
|
),
|
|
4158
4070
|
!r.fileSelected && !r.defaultUrl && /* @__PURE__ */ e(
|
|
4159
|
-
|
|
4071
|
+
di,
|
|
4160
4072
|
{
|
|
4161
4073
|
fileSupports: r.fileSupportOption,
|
|
4162
4074
|
isDesktop: i,
|
|
@@ -4171,7 +4083,7 @@ const Ci = (t) => {
|
|
|
4171
4083
|
),
|
|
4172
4084
|
typeof r.errorMessage == "string" && r.errorMessage && /* @__PURE__ */ e(C, { color: "error", fontSize: "xs", children: r.errorMessage })
|
|
4173
4085
|
] });
|
|
4174
|
-
},
|
|
4086
|
+
}, Di = ({
|
|
4175
4087
|
size: t = "md",
|
|
4176
4088
|
direction: r = "vertical",
|
|
4177
4089
|
requiredTitle: n = "(Required)",
|
|
@@ -4241,7 +4153,7 @@ const Ci = (t) => {
|
|
|
4241
4153
|
),
|
|
4242
4154
|
/* @__PURE__ */ d($, { gap: "xs", children: [
|
|
4243
4155
|
/* @__PURE__ */ e(
|
|
4244
|
-
|
|
4156
|
+
Ci,
|
|
4245
4157
|
{
|
|
4246
4158
|
...i.inputProps,
|
|
4247
4159
|
status: i.errorMessage ? "error" : "default"
|
|
@@ -4252,7 +4164,7 @@ const Ci = (t) => {
|
|
|
4252
4164
|
]
|
|
4253
4165
|
}
|
|
4254
4166
|
);
|
|
4255
|
-
},
|
|
4167
|
+
}, vi = ({
|
|
4256
4168
|
size: t = "md",
|
|
4257
4169
|
direction: r = "vertical",
|
|
4258
4170
|
requiredTitle: n = "(Required)",
|
|
@@ -4375,7 +4287,7 @@ const Ci = (t) => {
|
|
|
4375
4287
|
]
|
|
4376
4288
|
}
|
|
4377
4289
|
);
|
|
4378
|
-
},
|
|
4290
|
+
}, bi = ({
|
|
4379
4291
|
position: t = "vertical",
|
|
4380
4292
|
size: r = "md",
|
|
4381
4293
|
fullWidth: n = !1,
|
|
@@ -4417,7 +4329,7 @@ const Ci = (t) => {
|
|
|
4417
4329
|
})),
|
|
4418
4330
|
render: ({ value: s, id: a, isChecked: h, subInput: u, label: g, description: m }) => /* @__PURE__ */ d(f, { gap: "xs", customMaxWidth: i, children: [
|
|
4419
4331
|
/* @__PURE__ */ e(
|
|
4420
|
-
|
|
4332
|
+
tr,
|
|
4421
4333
|
{
|
|
4422
4334
|
id: `${a.toString()}-${s}`,
|
|
4423
4335
|
name: l.groupName || g,
|
|
@@ -4453,7 +4365,7 @@ const Ci = (t) => {
|
|
|
4453
4365
|
]
|
|
4454
4366
|
}
|
|
4455
4367
|
);
|
|
4456
|
-
},
|
|
4368
|
+
}, wi = ({
|
|
4457
4369
|
size: t = "md",
|
|
4458
4370
|
direction: r = "vertical",
|
|
4459
4371
|
requiredTitle: n = "(Required)",
|
|
@@ -4536,7 +4448,7 @@ const Ci = (t) => {
|
|
|
4536
4448
|
]
|
|
4537
4449
|
}
|
|
4538
4450
|
);
|
|
4539
|
-
},
|
|
4451
|
+
}, ki = ({
|
|
4540
4452
|
size: t = "md",
|
|
4541
4453
|
direction: r = "vertical",
|
|
4542
4454
|
requiredTitle: n = "(Required)",
|
|
@@ -4606,7 +4518,7 @@ const Ci = (t) => {
|
|
|
4606
4518
|
}
|
|
4607
4519
|
),
|
|
4608
4520
|
/* @__PURE__ */ e(
|
|
4609
|
-
|
|
4521
|
+
Ht,
|
|
4610
4522
|
{
|
|
4611
4523
|
checked: o.checked,
|
|
4612
4524
|
onChange: o.onChange,
|
|
@@ -4618,12 +4530,12 @@ const Ci = (t) => {
|
|
|
4618
4530
|
]
|
|
4619
4531
|
}
|
|
4620
4532
|
);
|
|
4621
|
-
},
|
|
4533
|
+
}, Si = ({
|
|
4622
4534
|
variant: t = "primary",
|
|
4623
4535
|
size: r = "md",
|
|
4624
4536
|
...n
|
|
4625
4537
|
}) => {
|
|
4626
|
-
const l =
|
|
4538
|
+
const l = er(), i = (s) => {
|
|
4627
4539
|
var h, u, g, m, p, v;
|
|
4628
4540
|
if (!s) return;
|
|
4629
4541
|
const a = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (u = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : u[600] : t === "secondary-primary" ? (m = (g = l == null ? void 0 : l.computed) == null ? void 0 : g.blue) == null ? void 0 : m[700] : (v = (p = l == null ? void 0 : l.computed) == null ? void 0 : p.gray) == null ? void 0 : v[50];
|
|
@@ -4648,7 +4560,7 @@ const Ci = (t) => {
|
|
|
4648
4560
|
}
|
|
4649
4561
|
};
|
|
4650
4562
|
return /* @__PURE__ */ e(
|
|
4651
|
-
|
|
4563
|
+
H,
|
|
4652
4564
|
{
|
|
4653
4565
|
fullWidth: !0,
|
|
4654
4566
|
disabled: n.disabled,
|
|
@@ -4663,7 +4575,7 @@ const Ci = (t) => {
|
|
|
4663
4575
|
children: o()
|
|
4664
4576
|
}
|
|
4665
4577
|
);
|
|
4666
|
-
},
|
|
4578
|
+
}, Fi = (t) => /* @__PURE__ */ e(
|
|
4667
4579
|
me.H5,
|
|
4668
4580
|
{
|
|
4669
4581
|
props: {
|
|
@@ -4671,7 +4583,7 @@ const Ci = (t) => {
|
|
|
4671
4583
|
},
|
|
4672
4584
|
children: t.title
|
|
4673
4585
|
}
|
|
4674
|
-
),
|
|
4586
|
+
), Ei = ({
|
|
4675
4587
|
size: t = "md",
|
|
4676
4588
|
direction: r = "vertical",
|
|
4677
4589
|
requiredTitle: n = "(Required)",
|
|
@@ -4762,7 +4674,7 @@ const Ci = (t) => {
|
|
|
4762
4674
|
}
|
|
4763
4675
|
);
|
|
4764
4676
|
};
|
|
4765
|
-
async function
|
|
4677
|
+
async function Mi(t, r) {
|
|
4766
4678
|
const n = new Image();
|
|
4767
4679
|
n.src = t, await new Promise((o, s) => {
|
|
4768
4680
|
n.onload = o, n.onerror = s;
|
|
@@ -4798,7 +4710,7 @@ const Mt = {
|
|
|
4798
4710
|
"2:3": 2 / 3,
|
|
4799
4711
|
"3:2": 3 / 2,
|
|
4800
4712
|
"32:9": 32 / 9
|
|
4801
|
-
},
|
|
4713
|
+
}, Li = It(
|
|
4802
4714
|
({
|
|
4803
4715
|
handleUpload: t,
|
|
4804
4716
|
urlImage: r,
|
|
@@ -4811,7 +4723,7 @@ const Mt = {
|
|
|
4811
4723
|
maxFileSize: h = 2,
|
|
4812
4724
|
onError: u
|
|
4813
4725
|
}, g) => {
|
|
4814
|
-
const m = ee("md"), [p, v] = M(!1), [A, D] = M(null), [T,
|
|
4726
|
+
const m = ee("md"), [p, v] = M(!1), [A, D] = M(null), [T, Z] = M(!1), [j, Q] = M({ x: 0, y: 0 }), [L, fe] = M(1), [P, I] = M(null);
|
|
4815
4727
|
_(() => {
|
|
4816
4728
|
r === null && i(null);
|
|
4817
4729
|
}, [r]);
|
|
@@ -4826,26 +4738,26 @@ const Mt = {
|
|
|
4826
4738
|
if (!z) return;
|
|
4827
4739
|
const X = new FileReader();
|
|
4828
4740
|
X.onload = () => {
|
|
4829
|
-
D(X.result),
|
|
4741
|
+
D(X.result), Z(!0);
|
|
4830
4742
|
}, X.readAsDataURL(z);
|
|
4831
4743
|
}, ce = async () => {
|
|
4832
4744
|
if (!(!A || !P))
|
|
4833
4745
|
try {
|
|
4834
|
-
const V = await
|
|
4746
|
+
const V = await Mi(A, P);
|
|
4835
4747
|
if (h && V.size > h * 1024 * 1024) {
|
|
4836
4748
|
u == null || u(`Ukuran file maksimal ${h}MB`);
|
|
4837
4749
|
return;
|
|
4838
4750
|
}
|
|
4839
4751
|
t == null || t(V);
|
|
4840
4752
|
const z = URL.createObjectURL(V);
|
|
4841
|
-
i(z, V),
|
|
4753
|
+
i(z, V), Z(!1);
|
|
4842
4754
|
} catch {
|
|
4843
4755
|
u == null || u("Gagal memproses gambar");
|
|
4844
4756
|
}
|
|
4845
4757
|
}, U = le(null), ae = () => {
|
|
4846
4758
|
U.current && U.current.click();
|
|
4847
4759
|
};
|
|
4848
|
-
|
|
4760
|
+
ir(g, () => ({
|
|
4849
4761
|
openFileDialog: () => {
|
|
4850
4762
|
var V;
|
|
4851
4763
|
(V = U.current) == null || V.click();
|
|
@@ -4982,7 +4894,7 @@ const Mt = {
|
|
|
4982
4894
|
)
|
|
4983
4895
|
}
|
|
4984
4896
|
),
|
|
4985
|
-
T &&
|
|
4897
|
+
T && nr.createPortal(
|
|
4986
4898
|
/* @__PURE__ */ e(
|
|
4987
4899
|
"div",
|
|
4988
4900
|
{
|
|
@@ -4995,7 +4907,7 @@ const Mt = {
|
|
|
4995
4907
|
justifyContent: "center",
|
|
4996
4908
|
backgroundColor: "rgba(0,0,0,0.6)"
|
|
4997
4909
|
},
|
|
4998
|
-
onClick: () =>
|
|
4910
|
+
onClick: () => Z(!1),
|
|
4999
4911
|
children: /* @__PURE__ */ d(
|
|
5000
4912
|
"div",
|
|
5001
4913
|
{
|
|
@@ -5020,10 +4932,10 @@ const Mt = {
|
|
|
5020
4932
|
backgroundColor: "var(--sa-color-gray-100)"
|
|
5021
4933
|
},
|
|
5022
4934
|
children: A && /* @__PURE__ */ e(
|
|
5023
|
-
|
|
4935
|
+
or,
|
|
5024
4936
|
{
|
|
5025
4937
|
image: A,
|
|
5026
|
-
crop:
|
|
4938
|
+
crop: j,
|
|
5027
4939
|
zoom: L,
|
|
5028
4940
|
aspect: s ? Mt[s] : void 0,
|
|
5029
4941
|
onCropChange: Q,
|
|
@@ -5047,8 +4959,8 @@ const Mt = {
|
|
|
5047
4959
|
borderTop: "1px solid var(--sa-border-subtle)"
|
|
5048
4960
|
},
|
|
5049
4961
|
children: [
|
|
5050
|
-
/* @__PURE__ */ e(
|
|
5051
|
-
/* @__PURE__ */ e(
|
|
4962
|
+
/* @__PURE__ */ e(H, { size: "sm", secondary: !0, onClick: () => Z(!1), children: "Cancel" }),
|
|
4963
|
+
/* @__PURE__ */ e(H, { size: "sm", primary: !0, onClick: ce, children: "Crop" })
|
|
5052
4964
|
]
|
|
5053
4965
|
}
|
|
5054
4966
|
)
|
|
@@ -5063,7 +4975,7 @@ const Mt = {
|
|
|
5063
4975
|
}
|
|
5064
4976
|
);
|
|
5065
4977
|
}
|
|
5066
|
-
),
|
|
4978
|
+
), Wi = ({
|
|
5067
4979
|
size: t = "md",
|
|
5068
4980
|
direction: r = "vertical",
|
|
5069
4981
|
requiredTitle: n = "(Required)",
|
|
@@ -5133,13 +5045,13 @@ const Mt = {
|
|
|
5133
5045
|
}
|
|
5134
5046
|
),
|
|
5135
5047
|
/* @__PURE__ */ d($, { gap: "xs", children: [
|
|
5136
|
-
/* @__PURE__ */ e(
|
|
5048
|
+
/* @__PURE__ */ e(Li, { ...o.inputProps }),
|
|
5137
5049
|
!s && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
|
|
5138
5050
|
] })
|
|
5139
5051
|
]
|
|
5140
5052
|
}
|
|
5141
5053
|
);
|
|
5142
|
-
},
|
|
5054
|
+
}, Bi = ({
|
|
5143
5055
|
size: t = "md",
|
|
5144
5056
|
direction: r = "vertical",
|
|
5145
5057
|
requiredTitle: n = "(Required)",
|
|
@@ -5211,7 +5123,7 @@ const Mt = {
|
|
|
5211
5123
|
]
|
|
5212
5124
|
}
|
|
5213
5125
|
);
|
|
5214
|
-
},
|
|
5126
|
+
}, Jn = ({
|
|
5215
5127
|
items: t,
|
|
5216
5128
|
id: r,
|
|
5217
5129
|
handleOnUpdate: n,
|
|
@@ -5238,7 +5150,7 @@ const Mt = {
|
|
|
5238
5150
|
width: l
|
|
5239
5151
|
},
|
|
5240
5152
|
children: i && /* @__PURE__ */ e(
|
|
5241
|
-
|
|
5153
|
+
Ht,
|
|
5242
5154
|
{
|
|
5243
5155
|
disabled: o,
|
|
5244
5156
|
checked: h,
|
|
@@ -5248,20 +5160,20 @@ const Mt = {
|
|
|
5248
5160
|
)
|
|
5249
5161
|
}
|
|
5250
5162
|
);
|
|
5251
|
-
},
|
|
5252
|
-
InputText:
|
|
5253
|
-
InputDropdown:
|
|
5254
|
-
InputSingleFile:
|
|
5255
|
-
CheckBoxOptions:
|
|
5256
|
-
RadioOptions:
|
|
5257
|
-
InputTextArea:
|
|
5258
|
-
ToggleForm:
|
|
5259
|
-
ActionButton:
|
|
5260
|
-
FormTitle:
|
|
5261
|
-
InputDate:
|
|
5262
|
-
InputImgFile:
|
|
5263
|
-
Custom:
|
|
5264
|
-
},
|
|
5163
|
+
}, Qn = {
|
|
5164
|
+
InputText: ci,
|
|
5165
|
+
InputDropdown: ai,
|
|
5166
|
+
InputSingleFile: Di,
|
|
5167
|
+
CheckBoxOptions: vi,
|
|
5168
|
+
RadioOptions: bi,
|
|
5169
|
+
InputTextArea: wi,
|
|
5170
|
+
ToggleForm: ki,
|
|
5171
|
+
ActionButton: Si,
|
|
5172
|
+
FormTitle: Fi,
|
|
5173
|
+
InputDate: Ei,
|
|
5174
|
+
InputImgFile: Wi,
|
|
5175
|
+
Custom: Bi
|
|
5176
|
+
}, Ai = ({ customBottom: t }) => {
|
|
5265
5177
|
const [r, n] = M(!1), l = () => {
|
|
5266
5178
|
window.scrollY > window.screenY ? n(!0) : n(!1);
|
|
5267
5179
|
}, i = () => {
|
|
@@ -5288,7 +5200,7 @@ const Mt = {
|
|
|
5288
5200
|
transition: "transform 0.2s ease-in-out"
|
|
5289
5201
|
},
|
|
5290
5202
|
children: /* @__PURE__ */ e(
|
|
5291
|
-
|
|
5203
|
+
H,
|
|
5292
5204
|
{
|
|
5293
5205
|
secondary: !0,
|
|
5294
5206
|
size: "xs",
|
|
@@ -5311,7 +5223,7 @@ const Mt = {
|
|
|
5311
5223
|
)
|
|
5312
5224
|
}
|
|
5313
5225
|
);
|
|
5314
|
-
},
|
|
5226
|
+
}, Pn = ({ pageLayout: t, children: r, wrapperProps: n, containerProps: l }) => {
|
|
5315
5227
|
const i = ee("md"), o = (l == null ? void 0 : l.customWidth) ?? 264;
|
|
5316
5228
|
return /* @__PURE__ */ d(
|
|
5317
5229
|
f,
|
|
@@ -5350,7 +5262,7 @@ const Mt = {
|
|
|
5350
5262
|
]
|
|
5351
5263
|
}
|
|
5352
5264
|
);
|
|
5353
|
-
},
|
|
5265
|
+
}, Yn = ({
|
|
5354
5266
|
children: t,
|
|
5355
5267
|
withScrollToTopButton: r = !1,
|
|
5356
5268
|
scrollToTopButtonProps: n,
|
|
@@ -5377,7 +5289,7 @@ const Mt = {
|
|
|
5377
5289
|
borderWidth: "border-t",
|
|
5378
5290
|
children: [
|
|
5379
5291
|
r && /* @__PURE__ */ e(
|
|
5380
|
-
|
|
5292
|
+
Ai,
|
|
5381
5293
|
{
|
|
5382
5294
|
...n,
|
|
5383
5295
|
customBottom: (n == null ? void 0 : n.customBottom) || "5.7rem"
|
|
@@ -5386,7 +5298,7 @@ const Mt = {
|
|
|
5386
5298
|
t
|
|
5387
5299
|
]
|
|
5388
5300
|
}
|
|
5389
|
-
) }),
|
|
5301
|
+
) }), Xn = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
|
|
5390
5302
|
gt,
|
|
5391
5303
|
{
|
|
5392
5304
|
of: t,
|
|
@@ -5402,7 +5314,7 @@ const Mt = {
|
|
|
5402
5314
|
silhouette: "#A7B0AC",
|
|
5403
5315
|
accent: "#78867F"
|
|
5404
5316
|
};
|
|
5405
|
-
function
|
|
5317
|
+
function Ri({ width: t, height: r }) {
|
|
5406
5318
|
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
|
|
5407
5319
|
"svg",
|
|
5408
5320
|
{
|
|
@@ -5545,7 +5457,7 @@ function Ii({ width: t, height: r }) {
|
|
|
5545
5457
|
}
|
|
5546
5458
|
) });
|
|
5547
5459
|
}
|
|
5548
|
-
const
|
|
5460
|
+
const Kn = ({
|
|
5549
5461
|
title: t = "create",
|
|
5550
5462
|
children: r,
|
|
5551
5463
|
onClickAction: n,
|
|
@@ -5560,9 +5472,9 @@ const tl = ({
|
|
|
5560
5472
|
const g = () => {
|
|
5561
5473
|
switch (l) {
|
|
5562
5474
|
case "primary":
|
|
5563
|
-
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(
|
|
5475
|
+
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(H, { primary: !0, onClick: n, children: h || t }) });
|
|
5564
5476
|
case "secondary":
|
|
5565
|
-
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(
|
|
5477
|
+
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { secondary: !0, iconLeft: o, onClick: n, children: i ? /* @__PURE__ */ e(
|
|
5566
5478
|
C,
|
|
5567
5479
|
{
|
|
5568
5480
|
fontFamily: "Poppins",
|
|
@@ -5571,11 +5483,11 @@ const tl = ({
|
|
|
5571
5483
|
style: { color: "var(--sa-background-success, #28ac6e)" },
|
|
5572
5484
|
children: h || t
|
|
5573
5485
|
}
|
|
5574
|
-
) : t }) : /* @__PURE__ */ e(
|
|
5486
|
+
) : t }) : /* @__PURE__ */ e(H, { secondary: !0, onClick: n, children: h || t }) });
|
|
5575
5487
|
case "success":
|
|
5576
|
-
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(
|
|
5488
|
+
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { success: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(H, { success: !0, onClick: n, children: h || t }) });
|
|
5577
5489
|
default:
|
|
5578
|
-
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(
|
|
5490
|
+
return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(H, { primary: !0, onClick: n, children: h || t }) });
|
|
5579
5491
|
}
|
|
5580
5492
|
};
|
|
5581
5493
|
return /* @__PURE__ */ d(
|
|
@@ -5590,7 +5502,7 @@ const tl = ({
|
|
|
5590
5502
|
marginBlock: "auto",
|
|
5591
5503
|
customHeight: a,
|
|
5592
5504
|
children: [
|
|
5593
|
-
u || /* @__PURE__ */ e(
|
|
5505
|
+
u || /* @__PURE__ */ e(Ri, {}),
|
|
5594
5506
|
/* @__PURE__ */ e(f, { children: r.map((m, p) => /* @__PURE__ */ e(
|
|
5595
5507
|
me.Body1,
|
|
5596
5508
|
{
|
|
@@ -5616,7 +5528,7 @@ const tl = ({
|
|
|
5616
5528
|
c000000: "#000000",
|
|
5617
5529
|
cFFFFFF: "#FFFFFF"
|
|
5618
5530
|
};
|
|
5619
|
-
function
|
|
5531
|
+
function Ii({ width: t, height: r }) {
|
|
5620
5532
|
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
|
|
5621
5533
|
"svg",
|
|
5622
5534
|
{
|
|
@@ -5819,7 +5731,7 @@ function Vi({ width: t, height: r }) {
|
|
|
5819
5731
|
}
|
|
5820
5732
|
) });
|
|
5821
5733
|
}
|
|
5822
|
-
function
|
|
5734
|
+
function el({ onClick: t }) {
|
|
5823
5735
|
const r = ee("md");
|
|
5824
5736
|
return /* @__PURE__ */ d(
|
|
5825
5737
|
f,
|
|
@@ -5831,7 +5743,7 @@ function rl({ onClick: t }) {
|
|
|
5831
5743
|
justify: "center",
|
|
5832
5744
|
gap: "md",
|
|
5833
5745
|
children: [
|
|
5834
|
-
/* @__PURE__ */ e(
|
|
5746
|
+
/* @__PURE__ */ e(Ii, { width: r ? 600 : 300 }),
|
|
5835
5747
|
/* @__PURE__ */ e(
|
|
5836
5748
|
C,
|
|
5837
5749
|
{
|
|
@@ -5850,7 +5762,7 @@ function rl({ onClick: t }) {
|
|
|
5850
5762
|
children: "Sorry, we couldn't find the page you are looking for"
|
|
5851
5763
|
}
|
|
5852
5764
|
),
|
|
5853
|
-
t && /* @__PURE__ */ e(
|
|
5765
|
+
t && /* @__PURE__ */ e(H, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
5854
5766
|
]
|
|
5855
5767
|
}
|
|
5856
5768
|
);
|
|
@@ -5876,7 +5788,7 @@ const B = {
|
|
|
5876
5788
|
cF4F4F4: "#F4F4F4",
|
|
5877
5789
|
cFFFFFF: "#FFFFFF"
|
|
5878
5790
|
};
|
|
5879
|
-
function
|
|
5791
|
+
function Vi({ width: t, height: r }) {
|
|
5880
5792
|
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
|
|
5881
5793
|
"svg",
|
|
5882
5794
|
{
|
|
@@ -6091,7 +6003,7 @@ function zi({ width: t, height: r }) {
|
|
|
6091
6003
|
}
|
|
6092
6004
|
) });
|
|
6093
6005
|
}
|
|
6094
|
-
function
|
|
6006
|
+
function tl({ onClick: t }) {
|
|
6095
6007
|
const r = ee("md");
|
|
6096
6008
|
return /* @__PURE__ */ d(
|
|
6097
6009
|
f,
|
|
@@ -6103,9 +6015,9 @@ function il({ onClick: t }) {
|
|
|
6103
6015
|
justify: "center",
|
|
6104
6016
|
gap: "md",
|
|
6105
6017
|
children: [
|
|
6106
|
-
/* @__PURE__ */ e(
|
|
6018
|
+
/* @__PURE__ */ e(Vi, { width: r ? 600 : 300 }),
|
|
6107
6019
|
/* @__PURE__ */ e(C, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
|
|
6108
|
-
t && /* @__PURE__ */ e(
|
|
6020
|
+
t && /* @__PURE__ */ e(H, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
6109
6021
|
]
|
|
6110
6022
|
}
|
|
6111
6023
|
);
|
|
@@ -6127,7 +6039,7 @@ const c = {
|
|
|
6127
6039
|
cFFE18B: "#FFE18B",
|
|
6128
6040
|
cFFFFFF: "#FFFFFF"
|
|
6129
6041
|
};
|
|
6130
|
-
function
|
|
6042
|
+
function zi({ width: t, height: r }) {
|
|
6131
6043
|
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
|
|
6132
6044
|
"svg",
|
|
6133
6045
|
{
|
|
@@ -6799,7 +6711,7 @@ function Ti({ width: t, height: r }) {
|
|
|
6799
6711
|
}
|
|
6800
6712
|
) });
|
|
6801
6713
|
}
|
|
6802
|
-
function
|
|
6714
|
+
function rl({ onClick: t }) {
|
|
6803
6715
|
const r = ee("md");
|
|
6804
6716
|
return /* @__PURE__ */ d(
|
|
6805
6717
|
f,
|
|
@@ -6812,7 +6724,7 @@ function nl({ onClick: t }) {
|
|
|
6812
6724
|
gap: "md",
|
|
6813
6725
|
overflow: "overflow-hidden",
|
|
6814
6726
|
children: [
|
|
6815
|
-
/* @__PURE__ */ e(
|
|
6727
|
+
/* @__PURE__ */ e(zi, { width: r ? 600 : 300 }),
|
|
6816
6728
|
/* @__PURE__ */ e(
|
|
6817
6729
|
C,
|
|
6818
6730
|
{
|
|
@@ -6831,12 +6743,12 @@ function nl({ onClick: t }) {
|
|
|
6831
6743
|
children: "we are trying to fix the problem"
|
|
6832
6744
|
}
|
|
6833
6745
|
),
|
|
6834
|
-
t && /* @__PURE__ */ e(
|
|
6746
|
+
t && /* @__PURE__ */ e(H, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
6835
6747
|
]
|
|
6836
6748
|
}
|
|
6837
6749
|
);
|
|
6838
6750
|
}
|
|
6839
|
-
const
|
|
6751
|
+
const il = (t) => {
|
|
6840
6752
|
var n, l, i, o, s;
|
|
6841
6753
|
const r = ee("md");
|
|
6842
6754
|
return /* @__PURE__ */ d(
|
|
@@ -6870,7 +6782,7 @@ const ll = (t) => {
|
|
|
6870
6782
|
gap: ((s = t.wrapperConfirmBtnProps) == null ? void 0 : s.gap) || "sm",
|
|
6871
6783
|
...t.wrapperConfirmBtnProps,
|
|
6872
6784
|
children: [
|
|
6873
|
-
t.onCancel && /* @__PURE__ */ e(
|
|
6785
|
+
t.onCancel && /* @__PURE__ */ e(H, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
|
|
6874
6786
|
/* @__PURE__ */ e(
|
|
6875
6787
|
f,
|
|
6876
6788
|
{
|
|
@@ -6879,7 +6791,7 @@ const ll = (t) => {
|
|
|
6879
6791
|
textWrap: "nowrap"
|
|
6880
6792
|
},
|
|
6881
6793
|
children: /* @__PURE__ */ e(
|
|
6882
|
-
|
|
6794
|
+
H,
|
|
6883
6795
|
{
|
|
6884
6796
|
...t.buttonConfirmProps,
|
|
6885
6797
|
onClick: t.onConfirm,
|
|
@@ -6899,7 +6811,7 @@ const ll = (t) => {
|
|
|
6899
6811
|
},
|
|
6900
6812
|
t.key
|
|
6901
6813
|
);
|
|
6902
|
-
},
|
|
6814
|
+
}, nl = te(
|
|
6903
6815
|
({
|
|
6904
6816
|
children: t,
|
|
6905
6817
|
height: r,
|
|
@@ -6919,11 +6831,11 @@ const ll = (t) => {
|
|
|
6919
6831
|
footerProps: D = { borderTop: !0 },
|
|
6920
6832
|
variantTag: T = "info"
|
|
6921
6833
|
}) => {
|
|
6922
|
-
const
|
|
6834
|
+
const Z = le(null), [j, Q] = M("100vh");
|
|
6923
6835
|
_(() => {
|
|
6924
6836
|
const I = () => {
|
|
6925
|
-
if (
|
|
6926
|
-
const K =
|
|
6837
|
+
if (Z.current) {
|
|
6838
|
+
const K = Z.current.getBoundingClientRect().top;
|
|
6927
6839
|
Q(`calc(100vh - ${K}px)`);
|
|
6928
6840
|
}
|
|
6929
6841
|
};
|
|
@@ -6948,7 +6860,7 @@ const ll = (t) => {
|
|
|
6948
6860
|
return /* @__PURE__ */ d(
|
|
6949
6861
|
f,
|
|
6950
6862
|
{
|
|
6951
|
-
ref:
|
|
6863
|
+
ref: Z,
|
|
6952
6864
|
height: r,
|
|
6953
6865
|
customMinHeight: n,
|
|
6954
6866
|
customHeight: l,
|
|
@@ -6960,7 +6872,7 @@ const ll = (t) => {
|
|
|
6960
6872
|
style: {
|
|
6961
6873
|
backgroundColor: "var(--sa-background-primary, #ffffff)",
|
|
6962
6874
|
display: "flex",
|
|
6963
|
-
minHeight:
|
|
6875
|
+
minHeight: j,
|
|
6964
6876
|
...(p == null ? void 0 : p.style) ?? {}
|
|
6965
6877
|
},
|
|
6966
6878
|
children: [
|
|
@@ -6983,7 +6895,7 @@ const ll = (t) => {
|
|
|
6983
6895
|
}
|
|
6984
6896
|
);
|
|
6985
6897
|
}
|
|
6986
|
-
),
|
|
6898
|
+
), ll = Rt.memo(
|
|
6987
6899
|
({ value: t, options: r = [], onChange: n, multiple: l }) => {
|
|
6988
6900
|
const i = (t == null ? void 0 : t.map((a) => a.value)) || [], o = (r == null ? void 0 : r.filter((a) => i.includes(a.value))) || [], s = (a) => {
|
|
6989
6901
|
const h = [...o];
|
|
@@ -6991,7 +6903,7 @@ const ll = (t) => {
|
|
|
6991
6903
|
l ? u = i.includes(a.value) ? h.filter((g) => g.value !== a.value) : [...h, a] : u = [a], n == null || n(u);
|
|
6992
6904
|
};
|
|
6993
6905
|
return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((a, h) => /* @__PURE__ */ e(
|
|
6994
|
-
|
|
6906
|
+
H,
|
|
6995
6907
|
{
|
|
6996
6908
|
...i.includes(a.value) ? { primary: !0 } : { secondary: !0 },
|
|
6997
6909
|
onClick: () => s(a),
|
|
@@ -7000,7 +6912,7 @@ const ll = (t) => {
|
|
|
7000
6912
|
h
|
|
7001
6913
|
)) });
|
|
7002
6914
|
}
|
|
7003
|
-
),
|
|
6915
|
+
), ol = (t) => {
|
|
7004
6916
|
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [l, i] = Qe(), o = Ge(l.toString());
|
|
7005
6917
|
return {
|
|
7006
6918
|
activeTab: o[n] ? parseInt(o[n]) : r,
|
|
@@ -7013,7 +6925,7 @@ const ll = (t) => {
|
|
|
7013
6925
|
searchQueries: o
|
|
7014
6926
|
};
|
|
7015
6927
|
};
|
|
7016
|
-
function
|
|
6928
|
+
function cl({
|
|
7017
6929
|
appName: t,
|
|
7018
6930
|
menuConfig: r,
|
|
7019
6931
|
formatTitle: n
|
|
@@ -7034,7 +6946,7 @@ function sl({
|
|
|
7034
6946
|
document.title = (n || a)(s, t);
|
|
7035
6947
|
}, [l.pathname]);
|
|
7036
6948
|
}
|
|
7037
|
-
const
|
|
6949
|
+
const al = () => {
|
|
7038
6950
|
const [t, r] = Qe(), n = Ge(t.toString()), l = zt(), i = Ve(), o = l.id;
|
|
7039
6951
|
return {
|
|
7040
6952
|
// query params
|
|
@@ -7053,7 +6965,7 @@ const dl = () => {
|
|
|
7053
6965
|
hasId: !!o
|
|
7054
6966
|
};
|
|
7055
6967
|
};
|
|
7056
|
-
function
|
|
6968
|
+
function sl(t) {
|
|
7057
6969
|
var l, i;
|
|
7058
6970
|
const r = t.decodedAccessToken;
|
|
7059
6971
|
return De(() => {
|
|
@@ -7079,94 +6991,93 @@ function hl(t) {
|
|
|
7079
6991
|
}, [(i = (l = r == null ? void 0 : r.access) == null ? void 0 : l.role) == null ? void 0 : i.code, t]);
|
|
7080
6992
|
}
|
|
7081
6993
|
export {
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
6994
|
+
wn as ActionMenu,
|
|
6995
|
+
Pr as AdvanceFilterBar,
|
|
6996
|
+
fn as App,
|
|
6997
|
+
hr as AppComponent,
|
|
7086
6998
|
Tt as AppContext,
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
li as DataTable,
|
|
6999
|
+
yn as AppLayout,
|
|
7000
|
+
Pn as AsideBar,
|
|
7001
|
+
pn as BackButton,
|
|
7002
|
+
ti as ColumnFilterDropdown,
|
|
7003
|
+
il as ConfirmationDialog,
|
|
7004
|
+
ni as DataTable,
|
|
7094
7005
|
O as DecisionWrapper,
|
|
7095
7006
|
gt as EachUtils,
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7007
|
+
Kn as EmptyStatePage,
|
|
7008
|
+
Qr as FilterDrawer,
|
|
7009
|
+
Yn as FloatingFooter,
|
|
7010
|
+
tl as ForbiddenPage,
|
|
7011
|
+
Qn as Form,
|
|
7012
|
+
nl as FullSection,
|
|
7013
|
+
gn as HeaderLeftSlot,
|
|
7014
|
+
gr as HeaderLeftSlotOutlet,
|
|
7015
|
+
fr as HeaderLeftSlotProvider,
|
|
7016
|
+
Cn as HorizontalField,
|
|
7017
|
+
Ci as InputFile,
|
|
7018
|
+
Li as InputImage,
|
|
7019
|
+
Dn as ModalDialog,
|
|
7020
|
+
xn as ModuleSwitcher,
|
|
7021
|
+
yr as ModuleSwitcherModal,
|
|
7022
|
+
el as NotFoundPage,
|
|
7023
|
+
vn as PageLayout,
|
|
7113
7024
|
ut as Pressable,
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7025
|
+
kr as RightDrawer,
|
|
7026
|
+
Ai as ScrollToTopButton,
|
|
7027
|
+
bn as Section,
|
|
7117
7028
|
_t as SectionFooter,
|
|
7118
7029
|
$t as SectionHeader,
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7030
|
+
ll as SelectButton,
|
|
7031
|
+
rl as ServerErrorPage,
|
|
7032
|
+
sr as SidebarBadgesProvider,
|
|
7033
|
+
ur as SidebarHeaderSlot,
|
|
7034
|
+
ei as TableFooter,
|
|
7035
|
+
Xr as TableHeader,
|
|
7036
|
+
Ln as TableSection,
|
|
7037
|
+
Yr as TableWrapper,
|
|
7038
|
+
Jn as ToggleStatus,
|
|
7128
7039
|
me as Typography,
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7040
|
+
Xn as VerticalField,
|
|
7041
|
+
mn as clearModuleSelection,
|
|
7042
|
+
Wn as createInitialFromUserName,
|
|
7043
|
+
In as cssVars,
|
|
7044
|
+
Tn as formHasChanged,
|
|
7045
|
+
Rn as formatDate,
|
|
7046
|
+
hi as formatDateToIndonesian,
|
|
7047
|
+
An as formatRupiah,
|
|
7048
|
+
En as getDateFilterValue,
|
|
7049
|
+
Fn as getDateRangeFilterValue,
|
|
7050
|
+
Hn as getInitials,
|
|
7051
|
+
kn as getValueDropdownMultipleFilter,
|
|
7052
|
+
Sn as getValueRadioFilter,
|
|
7053
|
+
Jr as getValueSearch,
|
|
7143
7054
|
et as getValuesFilter,
|
|
7144
7055
|
Ft as handleChangeFilter,
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7056
|
+
Gn as handleOnScroll,
|
|
7057
|
+
_n as isEmail,
|
|
7058
|
+
Mn as isFilterActive,
|
|
7059
|
+
Nn as isOnlyLettersAndSpaces,
|
|
7060
|
+
On as isPhoneNumber,
|
|
7061
|
+
Un as isSlug,
|
|
7062
|
+
Vn as oneDayInMs,
|
|
7063
|
+
Bn as parseIndonesianDateToDate,
|
|
7064
|
+
qn as preventNonCoordinateInput,
|
|
7065
|
+
$n as preventNonNumberAndDecimalInput,
|
|
7066
|
+
Zn as preventNonNumberInput,
|
|
7067
|
+
jn as preventNumberInput,
|
|
7068
|
+
_r as resolveDateRangeValueToString,
|
|
7069
|
+
Ur as resolveDateValueToString,
|
|
7070
|
+
jr as resolveDropdownValueToString,
|
|
7071
|
+
$r as resolveRadioValueToString,
|
|
7161
7072
|
Xe as resolveSidebarBadge,
|
|
7162
|
-
|
|
7073
|
+
zn as textWidth,
|
|
7163
7074
|
Ot as useApp,
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7075
|
+
ar as useAppState,
|
|
7076
|
+
sl as useAuthRole,
|
|
7077
|
+
cl as useDynamicTitle,
|
|
7078
|
+
jt as useModuleSelection,
|
|
7168
7079
|
ft as useRouteInfo,
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7080
|
+
al as useRouteParams,
|
|
7081
|
+
dr as useSidebarBadges,
|
|
7082
|
+
ol as useTabState
|
|
7172
7083
|
};
|