@starasia/admin 3.2.9 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +543 -551
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -6,11 +6,11 @@ export * from "@starasia/box";
|
|
|
6
6
|
import { Button as R } from "@starasia/button";
|
|
7
7
|
export * from "@starasia/button";
|
|
8
8
|
export * from "@starasia/card";
|
|
9
|
-
import { StarasiaDate as
|
|
9
|
+
import { StarasiaDate as It } from "@starasia/date";
|
|
10
10
|
export * from "@starasia/date";
|
|
11
11
|
import { Dialog as Ve, DialogTitle as Se, DialogBody as Ie, DialogFooter as qe } from "@starasia/dialog";
|
|
12
12
|
export * from "@starasia/dialog";
|
|
13
|
-
import { Drawer as
|
|
13
|
+
import { Drawer as Tt } from "@starasia/drawer";
|
|
14
14
|
export * from "@starasia/drawer";
|
|
15
15
|
import { Dropdown as lt } from "@starasia/dropdown";
|
|
16
16
|
export * from "@starasia/dropdown";
|
|
@@ -20,26 +20,26 @@ import { searchParamsToObject as Je } from "@starasia/http";
|
|
|
20
20
|
export * from "@starasia/http";
|
|
21
21
|
import { Input as ot } from "@starasia/input";
|
|
22
22
|
export * from "@starasia/input";
|
|
23
|
-
import { Menu as
|
|
23
|
+
import { Menu as Dt, MenuButton as _e, MenuLists as bt, MenuHeading as Ot, MenuBody as vt, MenuFooter as Nt } from "@starasia/menu";
|
|
24
24
|
export * from "@starasia/menu";
|
|
25
|
-
import { Pagination as
|
|
25
|
+
import { Pagination as Zt } from "@starasia/pagination";
|
|
26
26
|
export * from "@starasia/pagination";
|
|
27
27
|
export * from "@starasia/storage";
|
|
28
|
-
import { Tr as He, Td as we, Table as
|
|
28
|
+
import { Tr as He, Td as we, Table as wt, Thead as jt, Th as dt, Tbody as $t } from "@starasia/table";
|
|
29
29
|
export * from "@starasia/table";
|
|
30
30
|
export * from "@starasia/tabs";
|
|
31
|
-
import { Textarea as
|
|
31
|
+
import { Textarea as Ut } from "@starasia/textarea";
|
|
32
32
|
export * from "@starasia/textarea";
|
|
33
|
-
import { useTheme as
|
|
33
|
+
import { useTheme as _t, ThemeProvider as ht, useRadius as Pt, useColor as qt } from "@starasia/theme";
|
|
34
34
|
export * from "@starasia/theme";
|
|
35
35
|
export * from "@starasia/toast";
|
|
36
|
-
import { Toggle as
|
|
36
|
+
import { Toggle as kt } 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 tt } from "@starasia/checkbox";
|
|
41
41
|
export * from "@starasia/checkbox";
|
|
42
|
-
import { Radio as
|
|
42
|
+
import { Radio as Jt } from "@starasia/radio";
|
|
43
43
|
export * from "@starasia/radio";
|
|
44
44
|
import { Text as C } from "@starasia/text";
|
|
45
45
|
export * from "@starasia/text";
|
|
@@ -53,11 +53,11 @@ export * from "@starasia/accordion";
|
|
|
53
53
|
export * from "@starasia/story-record";
|
|
54
54
|
import { Skeleton as Re } from "@starasia/skeleton";
|
|
55
55
|
export * from "@starasia/skeleton";
|
|
56
|
-
import { jsx as e, jsxs as d, Fragment as
|
|
57
|
-
import
|
|
58
|
-
import { useSearchParams as Ge, useNavigate as ct, useLocation as Te, Outlet as ut, Link as
|
|
59
|
-
import
|
|
60
|
-
const
|
|
56
|
+
import { jsx as e, jsxs as d, Fragment as X } from "react/jsx-runtime";
|
|
57
|
+
import Gt, { createContext as Ft, useState as B, useContext as St, useCallback as ze, useMemo as De, memo as te, useEffect as _, useRef as le, useLayoutEffect as rt, isValidElement as it, forwardRef as Et, Children as Qt, useImperativeHandle as Yt } from "react";
|
|
58
|
+
import { useSearchParams as Ge, useNavigate as ct, useLocation as Te, Outlet as ut, Link as Xt, useParams as Mt } from "react-router";
|
|
59
|
+
import Kt from "react-easy-crop";
|
|
60
|
+
const er = {
|
|
61
61
|
menus: [],
|
|
62
62
|
menuBottom: void 0,
|
|
63
63
|
logo: "",
|
|
@@ -65,7 +65,7 @@ const Kt = {
|
|
|
65
65
|
userData: null,
|
|
66
66
|
setUserData: () => {
|
|
67
67
|
}
|
|
68
|
-
},
|
|
68
|
+
}, Lt = Ft(er), Wt = () => St(Lt), tr = (t) => {
|
|
69
69
|
const [r, n] = B(
|
|
70
70
|
(t == null ? void 0 : t.initialUserData) || null
|
|
71
71
|
);
|
|
@@ -73,7 +73,7 @@ const Kt = {
|
|
|
73
73
|
userData: r,
|
|
74
74
|
setUserData: n
|
|
75
75
|
};
|
|
76
|
-
},
|
|
76
|
+
}, Bt = Ft({
|
|
77
77
|
badges: {},
|
|
78
78
|
setBadge: () => {
|
|
79
79
|
},
|
|
@@ -81,7 +81,7 @@ const Kt = {
|
|
|
81
81
|
},
|
|
82
82
|
clearBadge: () => {
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), rr = ({ children: t }) => {
|
|
85
85
|
const [r, n] = B({}), l = ze(
|
|
86
86
|
(s) => {
|
|
87
87
|
n(
|
|
@@ -107,11 +107,11 @@ const Kt = {
|
|
|
107
107
|
() => ({ badges: r, setBadge: i, setBadges: l, clearBadge: o }),
|
|
108
108
|
[r, i, l, o]
|
|
109
109
|
);
|
|
110
|
-
return /* @__PURE__ */ e(
|
|
111
|
-
},
|
|
110
|
+
return /* @__PURE__ */ e(Bt.Provider, { value: a, children: t });
|
|
111
|
+
}, ir = () => St(Bt), Xe = (t, r) => {
|
|
112
112
|
const n = r !== void 0 ? r : t;
|
|
113
113
|
return n == null ? null : typeof n == "string" || typeof n == "number" ? { value: n } : n;
|
|
114
|
-
},
|
|
114
|
+
}, nr = ({
|
|
115
115
|
router: t,
|
|
116
116
|
menus: r = [],
|
|
117
117
|
menuBottom: n,
|
|
@@ -120,9 +120,9 @@ const Kt = {
|
|
|
120
120
|
initialUserData: o,
|
|
121
121
|
theme: a
|
|
122
122
|
}) => {
|
|
123
|
-
const s =
|
|
123
|
+
const s = tr({ initialUserData: o }), { theme: h } = _t();
|
|
124
124
|
return /* @__PURE__ */ e(
|
|
125
|
-
|
|
125
|
+
Lt.Provider,
|
|
126
126
|
{
|
|
127
127
|
value: {
|
|
128
128
|
logo: l,
|
|
@@ -132,11 +132,11 @@ const Kt = {
|
|
|
132
132
|
setUserData: s.setUserData,
|
|
133
133
|
menuBottom: n
|
|
134
134
|
},
|
|
135
|
-
children: /* @__PURE__ */ e(
|
|
135
|
+
children: /* @__PURE__ */ e(rr, { children: a ? /* @__PURE__ */ e(ht, { value: a, children: t }) : h ? /* @__PURE__ */ e(ht, { value: h, children: t }) : t })
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
|
-
},
|
|
139
|
-
function
|
|
138
|
+
}, rn = te(nr);
|
|
139
|
+
function lr({
|
|
140
140
|
collapsed: t = !1,
|
|
141
141
|
children: r
|
|
142
142
|
}) {
|
|
@@ -181,13 +181,13 @@ function ft() {
|
|
|
181
181
|
const r = Number(t);
|
|
182
182
|
return Number.isFinite(r) ? r : null;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function At(t) {
|
|
185
185
|
typeof window > "u" || (t === null ? window.localStorage.removeItem(Pe) : window.localStorage.setItem(Pe, String(t)), window.dispatchEvent(new CustomEvent(nt, { detail: t })));
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
|
|
187
|
+
function nn() {
|
|
188
|
+
At(null);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Rt() {
|
|
191
191
|
const [t, r] = B(
|
|
192
192
|
() => ft()
|
|
193
193
|
);
|
|
@@ -201,7 +201,7 @@ function At() {
|
|
|
201
201
|
window.removeEventListener(nt, l), window.removeEventListener("storage", i);
|
|
202
202
|
};
|
|
203
203
|
}, []), { selectedGroupId: t, setSelectedGroupId: (l) => {
|
|
204
|
-
|
|
204
|
+
At(l), r(l);
|
|
205
205
|
} };
|
|
206
206
|
}
|
|
207
207
|
let Ue = 0, ve = !1;
|
|
@@ -239,7 +239,7 @@ const gt = () => /* @__PURE__ */ d(
|
|
|
239
239
|
cursor: "pointer",
|
|
240
240
|
textAlign: "left"
|
|
241
241
|
};
|
|
242
|
-
function
|
|
242
|
+
function ln({
|
|
243
243
|
children: t,
|
|
244
244
|
headerRight: r,
|
|
245
245
|
profile: n,
|
|
@@ -251,13 +251,13 @@ function rn({
|
|
|
251
251
|
headerActions: h,
|
|
252
252
|
profileRole: f,
|
|
253
253
|
profileMenuButtons: g,
|
|
254
|
-
profileMenuItems:
|
|
255
|
-
logoutButton:
|
|
254
|
+
profileMenuItems: p,
|
|
255
|
+
logoutButton: y
|
|
256
256
|
}) {
|
|
257
257
|
var ke, je;
|
|
258
|
-
const [b] = Ge(), H = b.get("embed") === "true", D =
|
|
258
|
+
const [b] = Ge(), H = b.get("embed") === "true", D = Wt(), { badges: I } = ir(), Z = ct(), j = Te(), M = !ee("md"), [fe, G] = B(!1), [z, K] = B(!1), [oe, ce] = B(!1), [U, ae] = B(!1), [se, re] = B(/* @__PURE__ */ new Set()), [Q, q] = B(null), { selectedGroupId: O, setSelectedGroupId: V } = Rt(), Y = le(null), de = le(null);
|
|
259
259
|
_(() => {
|
|
260
|
-
const m =
|
|
260
|
+
const m = Y.current;
|
|
261
261
|
if (!m) return;
|
|
262
262
|
const F = () => {
|
|
263
263
|
ve || (Ue = m.scrollTop);
|
|
@@ -265,7 +265,7 @@ function rn({
|
|
|
265
265
|
return m.addEventListener("scroll", F), () => m.removeEventListener("scroll", F);
|
|
266
266
|
}, []);
|
|
267
267
|
const he = () => {
|
|
268
|
-
const m =
|
|
268
|
+
const m = Y.current;
|
|
269
269
|
m && Ue > 0 && (ve = !0, m.scrollTop = Ue, requestAnimationFrame(() => {
|
|
270
270
|
ve = !1;
|
|
271
271
|
}));
|
|
@@ -279,7 +279,7 @@ function rn({
|
|
|
279
279
|
}, []), rt(() => {
|
|
280
280
|
D.menus.length > 0 && (Ue > 0 ? he() : requestAnimationFrame(() => {
|
|
281
281
|
var F;
|
|
282
|
-
const m = (F =
|
|
282
|
+
const m = (F = Y.current) == null ? void 0 : F.querySelector(
|
|
283
283
|
"[data-menu-active='true']"
|
|
284
284
|
);
|
|
285
285
|
m && m.scrollIntoView({ block: "center", behavior: "instant" });
|
|
@@ -300,11 +300,11 @@ function rn({
|
|
|
300
300
|
M && K(!0);
|
|
301
301
|
}, [M]);
|
|
302
302
|
const Me = () => {
|
|
303
|
-
|
|
303
|
+
G(!0);
|
|
304
304
|
}, Oe = () => {
|
|
305
|
-
|
|
305
|
+
G(!1);
|
|
306
306
|
}, Qe = () => {
|
|
307
|
-
|
|
307
|
+
G(!1), i();
|
|
308
308
|
}, Ne = (m) => {
|
|
309
309
|
const F = [m.to];
|
|
310
310
|
return m.children && F.push(...m.children.map((S) => S.to)), F;
|
|
@@ -426,7 +426,7 @@ function rn({
|
|
|
426
426
|
]
|
|
427
427
|
}
|
|
428
428
|
),
|
|
429
|
-
(!z || M) && /* @__PURE__ */ d(
|
|
429
|
+
(!z || M) && /* @__PURE__ */ d(X, { children: [
|
|
430
430
|
/* @__PURE__ */ e(
|
|
431
431
|
"span",
|
|
432
432
|
{
|
|
@@ -556,11 +556,11 @@ function rn({
|
|
|
556
556
|
cursor: "pointer",
|
|
557
557
|
border: ie(A.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
|
|
558
558
|
},
|
|
559
|
-
onMouseEnter: (
|
|
560
|
-
ie(A.to) || (
|
|
559
|
+
onMouseEnter: (pe) => {
|
|
560
|
+
ie(A.to) || (pe.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
|
|
561
561
|
},
|
|
562
|
-
onMouseLeave: (
|
|
563
|
-
ie(A.to) || (
|
|
562
|
+
onMouseLeave: (pe) => {
|
|
563
|
+
ie(A.to) || (pe.currentTarget.style.backgroundColor = "transparent");
|
|
564
564
|
},
|
|
565
565
|
children: [
|
|
566
566
|
/* @__PURE__ */ e(
|
|
@@ -606,7 +606,7 @@ function rn({
|
|
|
606
606
|
})()
|
|
607
607
|
] }, m.id);
|
|
608
608
|
};
|
|
609
|
-
return /* @__PURE__ */ d(
|
|
609
|
+
return /* @__PURE__ */ d(X, { children: [
|
|
610
610
|
/* @__PURE__ */ d(
|
|
611
611
|
"div",
|
|
612
612
|
{
|
|
@@ -670,7 +670,7 @@ function rn({
|
|
|
670
670
|
},
|
|
671
671
|
children: (() => {
|
|
672
672
|
const m = !M && z && !oe, F = m && U;
|
|
673
|
-
return /* @__PURE__ */ d(
|
|
673
|
+
return /* @__PURE__ */ d(X, { children: [
|
|
674
674
|
/* @__PURE__ */ d(
|
|
675
675
|
"div",
|
|
676
676
|
{
|
|
@@ -811,7 +811,7 @@ function rn({
|
|
|
811
811
|
}
|
|
812
812
|
),
|
|
813
813
|
s && /* @__PURE__ */ e(
|
|
814
|
-
|
|
814
|
+
lr,
|
|
815
815
|
{
|
|
816
816
|
collapsed: M ? !1 : z,
|
|
817
817
|
children: s
|
|
@@ -820,7 +820,7 @@ function rn({
|
|
|
820
820
|
/* @__PURE__ */ e(
|
|
821
821
|
"div",
|
|
822
822
|
{
|
|
823
|
-
ref:
|
|
823
|
+
ref: Y,
|
|
824
824
|
style: {
|
|
825
825
|
flex: 1,
|
|
826
826
|
overflowY: "auto",
|
|
@@ -949,7 +949,7 @@ function rn({
|
|
|
949
949
|
] }),
|
|
950
950
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
951
951
|
h,
|
|
952
|
-
/* @__PURE__ */ d(
|
|
952
|
+
/* @__PURE__ */ d(Dt, { position: "bottom-right", children: [
|
|
953
953
|
/* @__PURE__ */ e(_e, { children: /* @__PURE__ */ d(
|
|
954
954
|
"div",
|
|
955
955
|
{
|
|
@@ -1023,7 +1023,7 @@ function rn({
|
|
|
1023
1023
|
}
|
|
1024
1024
|
) }),
|
|
1025
1025
|
/* @__PURE__ */ d(
|
|
1026
|
-
|
|
1026
|
+
bt,
|
|
1027
1027
|
{
|
|
1028
1028
|
style: {
|
|
1029
1029
|
width: "280px",
|
|
@@ -1033,7 +1033,7 @@ function rn({
|
|
|
1033
1033
|
marginTop: "16px"
|
|
1034
1034
|
},
|
|
1035
1035
|
children: [
|
|
1036
|
-
/* @__PURE__ */ e(
|
|
1036
|
+
/* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ d(
|
|
1037
1037
|
"div",
|
|
1038
1038
|
{
|
|
1039
1039
|
style: {
|
|
@@ -1113,7 +1113,7 @@ function rn({
|
|
|
1113
1113
|
]
|
|
1114
1114
|
}
|
|
1115
1115
|
) }),
|
|
1116
|
-
(g && g.length > 0 ||
|
|
1116
|
+
(g && g.length > 0 || p) && /* @__PURE__ */ d(vt, { children: [
|
|
1117
1117
|
g == null ? void 0 : g.map((m, F) => /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ d(
|
|
1118
1118
|
"button",
|
|
1119
1119
|
{
|
|
@@ -1132,9 +1132,9 @@ function rn({
|
|
|
1132
1132
|
]
|
|
1133
1133
|
}
|
|
1134
1134
|
) }, `${m.label}-${F}`)),
|
|
1135
|
-
|
|
1135
|
+
p
|
|
1136
1136
|
] }),
|
|
1137
|
-
|
|
1137
|
+
y ?? /* @__PURE__ */ e(Nt, { children: /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ d(
|
|
1138
1138
|
"button",
|
|
1139
1139
|
{
|
|
1140
1140
|
type: "button",
|
|
@@ -1211,7 +1211,7 @@ function rn({
|
|
|
1211
1211
|
/* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(R, { primary: !0, onClick: Qe, children: "Yes, Sure" }) })
|
|
1212
1212
|
] }) }) })
|
|
1213
1213
|
] }),
|
|
1214
|
-
|
|
1214
|
+
Q && /* @__PURE__ */ d(X, { children: [
|
|
1215
1215
|
/* @__PURE__ */ e(
|
|
1216
1216
|
"div",
|
|
1217
1217
|
{
|
|
@@ -1228,11 +1228,11 @@ function rn({
|
|
|
1228
1228
|
"div",
|
|
1229
1229
|
{
|
|
1230
1230
|
role: "dialog",
|
|
1231
|
-
"aria-label":
|
|
1231
|
+
"aria-label": Q.item.title,
|
|
1232
1232
|
style: {
|
|
1233
1233
|
position: "fixed",
|
|
1234
|
-
top:
|
|
1235
|
-
left:
|
|
1234
|
+
top: Q.top,
|
|
1235
|
+
left: Q.left,
|
|
1236
1236
|
zIndex: 61,
|
|
1237
1237
|
minWidth: "13rem",
|
|
1238
1238
|
maxWidth: "16rem",
|
|
@@ -1257,10 +1257,10 @@ function rn({
|
|
|
1257
1257
|
textTransform: "uppercase",
|
|
1258
1258
|
letterSpacing: "0.05em"
|
|
1259
1259
|
},
|
|
1260
|
-
children:
|
|
1260
|
+
children: Q.item.title
|
|
1261
1261
|
}
|
|
1262
1262
|
),
|
|
1263
|
-
(je =
|
|
1263
|
+
(je = Q.item.children) == null ? void 0 : je.map((m) => {
|
|
1264
1264
|
const F = ie(m.to), S = Xe(
|
|
1265
1265
|
m.badge,
|
|
1266
1266
|
I[m.id]
|
|
@@ -1322,7 +1322,7 @@ function rn({
|
|
|
1322
1322
|
] })
|
|
1323
1323
|
] });
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function or({
|
|
1326
1326
|
isShow: t,
|
|
1327
1327
|
onHide: r,
|
|
1328
1328
|
menus: n,
|
|
@@ -1467,19 +1467,19 @@ function lr({
|
|
|
1467
1467
|
}
|
|
1468
1468
|
);
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function on({
|
|
1471
1471
|
onSelect: t,
|
|
1472
1472
|
"aria-label": r = "Pilih module"
|
|
1473
1473
|
} = {}) {
|
|
1474
|
-
const n =
|
|
1474
|
+
const n = Wt(), l = ct(), { selectedGroupId: i, setSelectedGroupId: o } = Rt(), [a, s] = B(!1), h = (f) => {
|
|
1475
1475
|
var g;
|
|
1476
1476
|
if (o(f), f !== null) {
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1477
|
+
const p = n.menus.find((b) => b.id === f), y = (g = p == null ? void 0 : p.items[0]) == null ? void 0 : g.to;
|
|
1478
|
+
y && l(y);
|
|
1479
1479
|
}
|
|
1480
1480
|
t == null || t(f);
|
|
1481
1481
|
};
|
|
1482
|
-
return /* @__PURE__ */ d(
|
|
1482
|
+
return /* @__PURE__ */ d(X, { children: [
|
|
1483
1483
|
/* @__PURE__ */ d("div", { style: { position: "relative" }, children: [
|
|
1484
1484
|
/* @__PURE__ */ e(
|
|
1485
1485
|
"button",
|
|
@@ -1524,7 +1524,7 @@ function nn({
|
|
|
1524
1524
|
)
|
|
1525
1525
|
] }),
|
|
1526
1526
|
/* @__PURE__ */ e(
|
|
1527
|
-
|
|
1527
|
+
or,
|
|
1528
1528
|
{
|
|
1529
1529
|
isShow: a,
|
|
1530
1530
|
onHide: () => s(!1),
|
|
@@ -1535,9 +1535,9 @@ function nn({
|
|
|
1535
1535
|
)
|
|
1536
1536
|
] });
|
|
1537
1537
|
}
|
|
1538
|
-
const
|
|
1538
|
+
const cn = te(
|
|
1539
1539
|
({ children: t, coverImage: r, logo: n }) => {
|
|
1540
|
-
const l = ee("md"), i =
|
|
1540
|
+
const l = ee("md"), i = Pt();
|
|
1541
1541
|
return /* @__PURE__ */ d(
|
|
1542
1542
|
u,
|
|
1543
1543
|
{
|
|
@@ -1623,7 +1623,7 @@ const ln = te(
|
|
|
1623
1623
|
}
|
|
1624
1624
|
);
|
|
1625
1625
|
}
|
|
1626
|
-
),
|
|
1626
|
+
), cr = (t, r) => {
|
|
1627
1627
|
const n = [];
|
|
1628
1628
|
if (r === 0)
|
|
1629
1629
|
return n.push(t), n;
|
|
@@ -1632,7 +1632,7 @@ const ln = te(
|
|
|
1632
1632
|
n.push(i);
|
|
1633
1633
|
}
|
|
1634
1634
|
return n;
|
|
1635
|
-
},
|
|
1635
|
+
}, ar = te(
|
|
1636
1636
|
({
|
|
1637
1637
|
value: t,
|
|
1638
1638
|
label: r,
|
|
@@ -1664,8 +1664,8 @@ const ln = te(
|
|
|
1664
1664
|
/* @__PURE__ */ e(we, { style: a, children: f() })
|
|
1665
1665
|
] });
|
|
1666
1666
|
}
|
|
1667
|
-
),
|
|
1668
|
-
|
|
1667
|
+
), sr = te(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(wt, { children: t.map((l, i) => /* @__PURE__ */ e(
|
|
1668
|
+
ar,
|
|
1669
1669
|
{
|
|
1670
1670
|
separator: r,
|
|
1671
1671
|
labelWidth: n,
|
|
@@ -1673,7 +1673,7 @@ const ln = te(
|
|
|
1673
1673
|
...l
|
|
1674
1674
|
},
|
|
1675
1675
|
`field-group-field-${i}`
|
|
1676
|
-
)) })),
|
|
1676
|
+
)) })), an = te(
|
|
1677
1677
|
({
|
|
1678
1678
|
maxRow: t = 0,
|
|
1679
1679
|
maxColumn: r = 2,
|
|
@@ -1683,7 +1683,7 @@ const ln = te(
|
|
|
1683
1683
|
bordered: o = !1
|
|
1684
1684
|
}) => {
|
|
1685
1685
|
const a = De(
|
|
1686
|
-
() =>
|
|
1686
|
+
() => cr(l, t),
|
|
1687
1687
|
[l, t]
|
|
1688
1688
|
), s = a.length > 2, h = () => {
|
|
1689
1689
|
switch (r) {
|
|
@@ -1719,7 +1719,7 @@ const ln = te(
|
|
|
1719
1719
|
width: s ? h() : void 0,
|
|
1720
1720
|
marginBottom: s ? "lg" : void 0,
|
|
1721
1721
|
children: /* @__PURE__ */ e(
|
|
1722
|
-
|
|
1722
|
+
sr,
|
|
1723
1723
|
{
|
|
1724
1724
|
labelWidth: i,
|
|
1725
1725
|
fields: f,
|
|
@@ -1732,7 +1732,7 @@ const ln = te(
|
|
|
1732
1732
|
}
|
|
1733
1733
|
);
|
|
1734
1734
|
}
|
|
1735
|
-
),
|
|
1735
|
+
), sn = ({
|
|
1736
1736
|
title: t,
|
|
1737
1737
|
content: r,
|
|
1738
1738
|
onHide: n,
|
|
@@ -1772,7 +1772,7 @@ const ln = te(
|
|
|
1772
1772
|
h()
|
|
1773
1773
|
] }) })
|
|
1774
1774
|
] });
|
|
1775
|
-
},
|
|
1775
|
+
}, dr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
1776
1776
|
u,
|
|
1777
1777
|
{
|
|
1778
1778
|
role: "button",
|
|
@@ -1783,7 +1783,7 @@ const ln = te(
|
|
|
1783
1783
|
...r,
|
|
1784
1784
|
children: t
|
|
1785
1785
|
}
|
|
1786
|
-
),
|
|
1786
|
+
), Ht = te(dr), hr = ({ backButton: t }) => {
|
|
1787
1787
|
const [r, n] = B(!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)", a = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
|
|
1788
1788
|
return /* @__PURE__ */ d(
|
|
1789
1789
|
u,
|
|
@@ -1821,7 +1821,7 @@ const ln = te(
|
|
|
1821
1821
|
]
|
|
1822
1822
|
}
|
|
1823
1823
|
);
|
|
1824
|
-
},
|
|
1824
|
+
}, ur = ({
|
|
1825
1825
|
backButton: t,
|
|
1826
1826
|
title: r,
|
|
1827
1827
|
titleTag: n,
|
|
@@ -1832,38 +1832,38 @@ const ln = te(
|
|
|
1832
1832
|
containerProps: s,
|
|
1833
1833
|
headerProps: h
|
|
1834
1834
|
}) => {
|
|
1835
|
-
const f = ee("lg"), g = ct(),
|
|
1835
|
+
const f = ee("lg"), g = ct(), p = Te(), y = t == null ? void 0 : t.show, b = () => {
|
|
1836
1836
|
if (typeof (t == null ? void 0 : t.onClick) == "function") {
|
|
1837
1837
|
t.onClick();
|
|
1838
1838
|
return;
|
|
1839
1839
|
}
|
|
1840
1840
|
g(-1, { replace: !0 });
|
|
1841
1841
|
}, H = () => o ? it(o) ? o : /* @__PURE__ */ e(u, { direction: "row", gap: "lg", children: o.map(
|
|
1842
|
-
({ title: j, icon:
|
|
1842
|
+
({ title: j, icon: J, buttonProps: M, onClick: fe }, G) => !j && !J ? null : /* @__PURE__ */ e(
|
|
1843
1843
|
R,
|
|
1844
1844
|
{
|
|
1845
1845
|
fullWidth: !f,
|
|
1846
|
-
iconLeft:
|
|
1846
|
+
iconLeft: J ? /* @__PURE__ */ e(k, { name: J, size: "md" }) : void 0,
|
|
1847
1847
|
onClick: fe,
|
|
1848
1848
|
...M,
|
|
1849
1849
|
children: j
|
|
1850
1850
|
},
|
|
1851
|
-
`action-${
|
|
1851
|
+
`action-${G}`
|
|
1852
1852
|
)
|
|
1853
1853
|
) }) : null, D = () => {
|
|
1854
|
-
const j = /* @__PURE__ */ e(
|
|
1854
|
+
const j = /* @__PURE__ */ e(hr, { backButton: t });
|
|
1855
1855
|
return t != null && t.navigateTo ? /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(
|
|
1856
|
-
|
|
1856
|
+
Xt,
|
|
1857
1857
|
{
|
|
1858
1858
|
to: t.navigateTo,
|
|
1859
1859
|
replace: !0,
|
|
1860
1860
|
style: { textDecoration: "none" },
|
|
1861
1861
|
children: j
|
|
1862
1862
|
}
|
|
1863
|
-
) }) : /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(
|
|
1863
|
+
) }) : /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(Ht, { onClick: b, children: j }) });
|
|
1864
1864
|
}, I = () => {
|
|
1865
|
-
const j = !!r,
|
|
1866
|
-
return !j && !
|
|
1865
|
+
const j = !!r, J = it(o) ? !0 : Array.isArray(o) && o.length > 0;
|
|
1866
|
+
return !j && !J && !y ? null : /* @__PURE__ */ d(
|
|
1867
1867
|
u,
|
|
1868
1868
|
{
|
|
1869
1869
|
gap: "xs",
|
|
@@ -1871,8 +1871,8 @@ const ln = te(
|
|
|
1871
1871
|
paddingInline: h == null ? void 0 : h.paddingInline,
|
|
1872
1872
|
...h,
|
|
1873
1873
|
children: [
|
|
1874
|
-
|
|
1875
|
-
(j ||
|
|
1874
|
+
y && D(),
|
|
1875
|
+
(j || J) && /* @__PURE__ */ d(
|
|
1876
1876
|
u,
|
|
1877
1877
|
{
|
|
1878
1878
|
direction: f ? "row" : "column",
|
|
@@ -1908,75 +1908,67 @@ const ln = te(
|
|
|
1908
1908
|
Z()
|
|
1909
1909
|
]
|
|
1910
1910
|
},
|
|
1911
|
-
|
|
1911
|
+
p.pathname
|
|
1912
1912
|
);
|
|
1913
|
-
},
|
|
1913
|
+
}, dn = te(ur), fr = {
|
|
1914
1914
|
icon: "Cross",
|
|
1915
1915
|
title: ""
|
|
1916
|
-
},
|
|
1916
|
+
}, gr = "calc(100vw - 16px)", pt = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${gr})`, mr = Et(
|
|
1917
1917
|
({
|
|
1918
1918
|
onHide: t,
|
|
1919
1919
|
show: r,
|
|
1920
1920
|
withBlur: n = !1,
|
|
1921
1921
|
style: l,
|
|
1922
1922
|
children: i,
|
|
1923
|
-
closeButton: o =
|
|
1923
|
+
closeButton: o = fr,
|
|
1924
1924
|
width: a,
|
|
1925
1925
|
minWidth: s = "357px",
|
|
1926
1926
|
maxWidth: h = "357px"
|
|
1927
|
-
}, f) =>
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
),
|
|
1960
|
-
/* @__PURE__ */ e(
|
|
1961
|
-
C,
|
|
1962
|
-
{
|
|
1963
|
-
fontFamily: "Poppins",
|
|
1964
|
-
fontSize: "md",
|
|
1965
|
-
style: {
|
|
1966
|
-
color: "var(--sa-text-subtle, #8c8f97)",
|
|
1927
|
+
}, f) => {
|
|
1928
|
+
const g = pt(a ?? s), p = pt(a ?? h);
|
|
1929
|
+
return /* @__PURE__ */ e(
|
|
1930
|
+
Tt,
|
|
1931
|
+
{
|
|
1932
|
+
blur: n,
|
|
1933
|
+
isShow: r,
|
|
1934
|
+
position: "right",
|
|
1935
|
+
onHide: t,
|
|
1936
|
+
ref: f,
|
|
1937
|
+
style: {
|
|
1938
|
+
minWidth: g,
|
|
1939
|
+
maxWidth: p,
|
|
1940
|
+
...l
|
|
1941
|
+
},
|
|
1942
|
+
children: /* @__PURE__ */ d(u, { padding: "lg", children: [
|
|
1943
|
+
o ? /* @__PURE__ */ d(
|
|
1944
|
+
u,
|
|
1945
|
+
{
|
|
1946
|
+
direction: "row",
|
|
1947
|
+
align: "center",
|
|
1948
|
+
gap: "sm",
|
|
1949
|
+
onClick: t,
|
|
1950
|
+
marginBottom: "lg",
|
|
1951
|
+
cursor: "pointer",
|
|
1952
|
+
children: [
|
|
1953
|
+
/* @__PURE__ */ e(
|
|
1954
|
+
k,
|
|
1955
|
+
{
|
|
1956
|
+
name: o.icon,
|
|
1957
|
+
size: "md",
|
|
1958
|
+
color: "subtle",
|
|
1967
1959
|
cursor: "pointer"
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
),
|
|
1960
|
+
}
|
|
1961
|
+
),
|
|
1962
|
+
o.title ? /* @__PURE__ */ e(C, { fontFamily: "Poppins", fontSize: "md", color: "text-muted", children: o.title }) : null
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
) : null,
|
|
1966
|
+
i
|
|
1967
|
+
] })
|
|
1968
|
+
}
|
|
1969
|
+
);
|
|
1970
|
+
}
|
|
1971
|
+
), zt = te(
|
|
1980
1972
|
({ children: t, borderBottom: r = !0, padding: n = !0 }) => {
|
|
1981
1973
|
const l = ee("lg");
|
|
1982
1974
|
return /* @__PURE__ */ e(
|
|
@@ -1992,7 +1984,7 @@ const ln = te(
|
|
|
1992
1984
|
}
|
|
1993
1985
|
);
|
|
1994
1986
|
}
|
|
1995
|
-
),
|
|
1987
|
+
), Vt = te(
|
|
1996
1988
|
({ children: t, borderTop: r = !0, padding: n = !0 }) => {
|
|
1997
1989
|
const l = ee("lg");
|
|
1998
1990
|
return /* @__PURE__ */ e(
|
|
@@ -2008,7 +2000,7 @@ const ln = te(
|
|
|
2008
2000
|
}
|
|
2009
2001
|
);
|
|
2010
2002
|
}
|
|
2011
|
-
),
|
|
2003
|
+
), pr = te(
|
|
2012
2004
|
({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
2013
2005
|
u,
|
|
2014
2006
|
{
|
|
@@ -2020,7 +2012,7 @@ const ln = te(
|
|
|
2020
2012
|
children: t
|
|
2021
2013
|
}
|
|
2022
2014
|
)
|
|
2023
|
-
),
|
|
2015
|
+
), hn = te(
|
|
2024
2016
|
({
|
|
2025
2017
|
children: t,
|
|
2026
2018
|
title: r,
|
|
@@ -2033,11 +2025,11 @@ const ln = te(
|
|
|
2033
2025
|
bodyProps: h,
|
|
2034
2026
|
headerProps: f = { borderBottom: !0 },
|
|
2035
2027
|
footerProps: g = { borderTop: !0 },
|
|
2036
|
-
variantTag:
|
|
2028
|
+
variantTag: p = "info"
|
|
2037
2029
|
}) => {
|
|
2038
|
-
const
|
|
2030
|
+
const y = ee("lg"), b = () => n ? /* @__PURE__ */ d(u, { direction: "row", gap: "sm", align: "center", children: [
|
|
2039
2031
|
/* @__PURE__ */ e(C, { fontWeight: "medium", children: r }),
|
|
2040
|
-
/* @__PURE__ */ e(Ee, { border: !0, text: n, variant:
|
|
2032
|
+
/* @__PURE__ */ e(Ee, { border: !0, text: n, variant: p })
|
|
2041
2033
|
] }) : /* @__PURE__ */ e(C, { fontWeight: "medium", children: r }), H = () => i || /* @__PURE__ */ d(
|
|
2042
2034
|
u,
|
|
2043
2035
|
{
|
|
@@ -2050,7 +2042,7 @@ const ln = te(
|
|
|
2050
2042
|
/* @__PURE__ */ e(
|
|
2051
2043
|
u,
|
|
2052
2044
|
{
|
|
2053
|
-
style:
|
|
2045
|
+
style: y ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
|
|
2054
2046
|
...a,
|
|
2055
2047
|
children: l ?? null
|
|
2056
2048
|
}
|
|
@@ -2073,17 +2065,17 @@ const ln = te(
|
|
|
2073
2065
|
...(s == null ? void 0 : s.style) ?? {}
|
|
2074
2066
|
},
|
|
2075
2067
|
children: [
|
|
2076
|
-
i !== null && D ? /* @__PURE__ */ e(
|
|
2077
|
-
/* @__PURE__ */ e(
|
|
2078
|
-
o ? /* @__PURE__ */ e(
|
|
2068
|
+
i !== null && D ? /* @__PURE__ */ e(zt, { ...f, children: H() }) : null,
|
|
2069
|
+
/* @__PURE__ */ e(pr, { ...h, children: t }),
|
|
2070
|
+
o ? /* @__PURE__ */ e(Vt, { ...g, children: o }) : null
|
|
2079
2071
|
]
|
|
2080
2072
|
}
|
|
2081
2073
|
);
|
|
2082
2074
|
}
|
|
2083
|
-
),
|
|
2075
|
+
), yr = "var(--sa-color-secondary-50, #e6e9fb)", xr = ({ children: t, onClick: r }) => {
|
|
2084
2076
|
const [n, l] = B("");
|
|
2085
2077
|
return /* @__PURE__ */ e(
|
|
2086
|
-
|
|
2078
|
+
Ht,
|
|
2087
2079
|
{
|
|
2088
2080
|
fullWidth: !0,
|
|
2089
2081
|
height: "height-8",
|
|
@@ -2095,14 +2087,14 @@ const ln = te(
|
|
|
2095
2087
|
gap: "spacing-1",
|
|
2096
2088
|
cursor: "pointer",
|
|
2097
2089
|
onClick: r,
|
|
2098
|
-
onMouseEnter: () => l(
|
|
2090
|
+
onMouseEnter: () => l(yr),
|
|
2099
2091
|
borderRadius: "rounded-md",
|
|
2100
2092
|
onMouseLeave: () => l(""),
|
|
2101
2093
|
style: { backgroundColor: n },
|
|
2102
2094
|
children: t
|
|
2103
2095
|
}
|
|
2104
2096
|
);
|
|
2105
|
-
},
|
|
2097
|
+
}, Cr = te(xr), Dr = ({
|
|
2106
2098
|
icon: t,
|
|
2107
2099
|
items: r = [],
|
|
2108
2100
|
style: n,
|
|
@@ -2121,9 +2113,9 @@ const ln = te(
|
|
|
2121
2113
|
}),
|
|
2122
2114
|
[i]
|
|
2123
2115
|
);
|
|
2124
|
-
return /* @__PURE__ */ d(
|
|
2116
|
+
return /* @__PURE__ */ d(Dt, { position: o, style: n, children: [
|
|
2125
2117
|
/* @__PURE__ */ e(_e, { style: l, children: /* @__PURE__ */ e(R, { size: "sm", secondary: !0, ...a, children: /* @__PURE__ */ e(k, { name: t, ...s }) }) }),
|
|
2126
|
-
/* @__PURE__ */ e(
|
|
2118
|
+
/* @__PURE__ */ e(bt, { style: f, children: r.map((g, p) => h === "outline-button" ? /* @__PURE__ */ e(vt, { children: /* @__PURE__ */ d(
|
|
2127
2119
|
R,
|
|
2128
2120
|
{
|
|
2129
2121
|
size: "sm",
|
|
@@ -2136,8 +2128,8 @@ const ln = te(
|
|
|
2136
2128
|
/* @__PURE__ */ e(C, { fontSize: "sm", color: "text", ...g.textProps, children: g.label })
|
|
2137
2129
|
]
|
|
2138
2130
|
}
|
|
2139
|
-
) }, g.id ||
|
|
2140
|
-
|
|
2131
|
+
) }, g.id || p) : /* @__PURE__ */ d(
|
|
2132
|
+
Cr,
|
|
2141
2133
|
{
|
|
2142
2134
|
onClick: g.onClick,
|
|
2143
2135
|
...g.buttonProps,
|
|
@@ -2146,30 +2138,30 @@ const ln = te(
|
|
|
2146
2138
|
/* @__PURE__ */ e(C, { fontSize: "sm", color: "text", ...g.textProps, children: g.label })
|
|
2147
2139
|
]
|
|
2148
2140
|
},
|
|
2149
|
-
g.id ||
|
|
2141
|
+
g.id || p
|
|
2150
2142
|
)) })
|
|
2151
2143
|
] });
|
|
2152
|
-
},
|
|
2153
|
-
H1:
|
|
2154
|
-
H2:
|
|
2155
|
-
H3:
|
|
2156
|
-
H4:
|
|
2157
|
-
H5:
|
|
2158
|
-
H6:
|
|
2159
|
-
SubH1:
|
|
2160
|
-
SubH2:
|
|
2161
|
-
SubH3:
|
|
2162
|
-
Body1:
|
|
2163
|
-
Body2:
|
|
2164
|
-
Body3:
|
|
2144
|
+
}, un = te(Dr), br = (t) => /* @__PURE__ */ e(C, { variant: "h1", children: t.children, ...t.props }), vr = (t) => /* @__PURE__ */ e(C, { variant: "h2", children: t.children, ...t.props }), wr = (t) => /* @__PURE__ */ e(C, { variant: "h3", children: t.children, ...t.props }), kr = (t) => /* @__PURE__ */ e(C, { variant: "h4", children: t.children, ...t.props }), Fr = (t) => /* @__PURE__ */ e(C, { variant: "h5", children: t.children, ...t.props }), Sr = (t) => /* @__PURE__ */ e(C, { variant: "h6", children: t.children, ...t.props }), Er = (t) => /* @__PURE__ */ e(C, { variant: "sub-h1", children: t.children, ...t.props }), Mr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h2", children: t.children, ...t.props }), Lr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h3", children: t.children, ...t.props }), Wr = (t) => /* @__PURE__ */ e(C, { variant: "body-1", children: t.children, ...t.props }), Br = (t) => /* @__PURE__ */ e(C, { variant: "body-2", children: t.children, ...t.props }), Ar = (t) => /* @__PURE__ */ e(C, { variant: "body-3", children: t.children, ...t.props }), me = {
|
|
2145
|
+
H1: br,
|
|
2146
|
+
H2: vr,
|
|
2147
|
+
H3: wr,
|
|
2148
|
+
H4: kr,
|
|
2149
|
+
H5: Fr,
|
|
2150
|
+
H6: Sr,
|
|
2151
|
+
SubH1: Er,
|
|
2152
|
+
SubH2: Mr,
|
|
2153
|
+
SubH3: Lr,
|
|
2154
|
+
Body1: Wr,
|
|
2155
|
+
Body2: Br,
|
|
2156
|
+
Body3: Ar
|
|
2165
2157
|
}, at = () => {
|
|
2166
|
-
const [t, r] = Ge(), n = Je(t.toString()), l =
|
|
2158
|
+
const [t, r] = Ge(), n = Je(t.toString()), l = Mt(), i = Te(), o = l.id;
|
|
2167
2159
|
return {
|
|
2168
2160
|
// query params
|
|
2169
2161
|
setSearchParams: r,
|
|
2170
2162
|
searchParams: t,
|
|
2171
2163
|
searchQueries: n,
|
|
2172
|
-
isHasQuery: (g,
|
|
2164
|
+
isHasQuery: (g, p) => t.has(g) && t.get(g) === p,
|
|
2173
2165
|
getQueryParam: (g) => t.get(g),
|
|
2174
2166
|
// route params
|
|
2175
2167
|
getRouteParam: (g) => l[g],
|
|
@@ -2180,7 +2172,7 @@ const ln = te(
|
|
|
2180
2172
|
id: o,
|
|
2181
2173
|
hasId: !!o
|
|
2182
2174
|
};
|
|
2183
|
-
},
|
|
2175
|
+
}, Rr = (t) => JSON.stringify(t), Hr = (t) => JSON.stringify(t), zr = (t) => JSON.stringify(t), Vr = (t) => JSON.stringify(t), Ir = (t) => t, Tr = (t) => JSON.stringify(t), yt = ({
|
|
2184
2176
|
value: t,
|
|
2185
2177
|
name: r,
|
|
2186
2178
|
type: n,
|
|
@@ -2195,37 +2187,37 @@ const ln = te(
|
|
|
2195
2187
|
let f;
|
|
2196
2188
|
switch (n) {
|
|
2197
2189
|
case "search":
|
|
2198
|
-
f =
|
|
2190
|
+
f = Ir(t);
|
|
2199
2191
|
break;
|
|
2200
2192
|
case "dropdown":
|
|
2201
2193
|
case "dropdown-multiple":
|
|
2202
|
-
f =
|
|
2194
|
+
f = Rr(t);
|
|
2203
2195
|
break;
|
|
2204
2196
|
case "radio":
|
|
2205
|
-
f =
|
|
2197
|
+
f = Hr(t);
|
|
2206
2198
|
break;
|
|
2207
2199
|
case "date-range":
|
|
2208
|
-
f =
|
|
2200
|
+
f = zr(t);
|
|
2209
2201
|
break;
|
|
2210
2202
|
case "advanced-date-range":
|
|
2211
|
-
f =
|
|
2203
|
+
f = Tr(t);
|
|
2212
2204
|
break;
|
|
2213
2205
|
case "date":
|
|
2214
|
-
f =
|
|
2206
|
+
f = Vr(t);
|
|
2215
2207
|
break;
|
|
2216
2208
|
default:
|
|
2217
2209
|
f = t;
|
|
2218
2210
|
break;
|
|
2219
2211
|
}
|
|
2220
2212
|
if (typeof f < "u") {
|
|
2221
|
-
const
|
|
2213
|
+
const p = {
|
|
2222
2214
|
...o[s] && typeof o[s] == "string" ? JSON.parse(o[s]) : void 0,
|
|
2223
2215
|
[r]: f
|
|
2224
|
-
},
|
|
2225
|
-
a && typeof a == "string" && delete
|
|
2216
|
+
}, y = { ...o };
|
|
2217
|
+
a && typeof a == "string" && delete y[a], delete y[h];
|
|
2226
2218
|
const b = {
|
|
2227
|
-
...
|
|
2228
|
-
[s]: JSON.stringify(
|
|
2219
|
+
...y,
|
|
2220
|
+
[s]: JSON.stringify(p)
|
|
2229
2221
|
}, H = new URLSearchParams(o).toString(), D = new URLSearchParams(
|
|
2230
2222
|
b
|
|
2231
2223
|
).toString();
|
|
@@ -2242,7 +2234,7 @@ const ln = te(
|
|
|
2242
2234
|
}) => {
|
|
2243
2235
|
const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, a = o ? o[t] : void 0;
|
|
2244
2236
|
return l === "label" && a ? JSON.parse(a)[0].label : l === "value" && a ? JSON.parse(a)[0].value : a;
|
|
2245
|
-
},
|
|
2237
|
+
}, fn = ({
|
|
2246
2238
|
name: t,
|
|
2247
2239
|
filterKey: r = "filter",
|
|
2248
2240
|
searchParams: n,
|
|
@@ -2250,7 +2242,7 @@ const ln = te(
|
|
|
2250
2242
|
}) => {
|
|
2251
2243
|
const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, a = o ? o[t] : void 0;
|
|
2252
2244
|
return l === "label" && a ? JSON.parse(a).map((s) => s.label) : l === "value" && a ? JSON.parse(a).map((s) => s.value) : l === "array" && a ? JSON.parse(a) : a;
|
|
2253
|
-
},
|
|
2245
|
+
}, gn = ({
|
|
2254
2246
|
name: t,
|
|
2255
2247
|
filterKey: r = "filter",
|
|
2256
2248
|
searchParams: n,
|
|
@@ -2258,10 +2250,10 @@ const ln = te(
|
|
|
2258
2250
|
}) => {
|
|
2259
2251
|
const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, a = o ? o[t] : void 0;
|
|
2260
2252
|
return l === "id" && a ? JSON.parse(a).id : l === "label" && a ? JSON.parse(a).label : l === "value" && a ? JSON.parse(a).value : a;
|
|
2261
|
-
},
|
|
2253
|
+
}, Or = (t, r, n) => {
|
|
2262
2254
|
const l = r.get(n || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0;
|
|
2263
2255
|
return i ? i[t] : void 0;
|
|
2264
|
-
},
|
|
2256
|
+
}, mn = ({
|
|
2265
2257
|
name: t,
|
|
2266
2258
|
filterKey: r = "filter",
|
|
2267
2259
|
searchParams: n
|
|
@@ -2271,21 +2263,21 @@ const ln = te(
|
|
|
2271
2263
|
start: o ? JSON.parse(o).from : void 0,
|
|
2272
2264
|
end: o ? JSON.parse(o).to : void 0
|
|
2273
2265
|
};
|
|
2274
|
-
},
|
|
2266
|
+
}, pn = ({
|
|
2275
2267
|
name: t,
|
|
2276
2268
|
filterKey: r = "filter",
|
|
2277
2269
|
searchParams: n
|
|
2278
2270
|
}) => {
|
|
2279
2271
|
const l = n.get(r || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0, o = i ? i[t] : void 0;
|
|
2280
2272
|
return o ? JSON.parse(o) : void 0;
|
|
2281
|
-
},
|
|
2273
|
+
}, yn = (t, {
|
|
2282
2274
|
filterKey: r = "filter",
|
|
2283
2275
|
perPageKey: n = "perPage",
|
|
2284
2276
|
pageKey: l = "page"
|
|
2285
2277
|
}) => {
|
|
2286
2278
|
const i = t.get(r) || void 0, o = t.get(n) || void 0, a = t.get(l) || void 0;
|
|
2287
2279
|
return !!i || !!o || !!a;
|
|
2288
|
-
},
|
|
2280
|
+
}, Nr = ({
|
|
2289
2281
|
isOpen: t,
|
|
2290
2282
|
onClose: r,
|
|
2291
2283
|
filterKey: n,
|
|
@@ -2294,29 +2286,29 @@ const ln = te(
|
|
|
2294
2286
|
}) => {
|
|
2295
2287
|
const { searchParams: o, setSearchParams: a, searchQueries: s } = at(), [h, f] = B({}), g = () => {
|
|
2296
2288
|
o.delete(n || "filter"), a(o);
|
|
2297
|
-
},
|
|
2298
|
-
switch (
|
|
2289
|
+
}, p = (y, b) => {
|
|
2290
|
+
switch (y.type) {
|
|
2299
2291
|
case "radio": {
|
|
2300
|
-
const { show: H = !0 } =
|
|
2301
|
-
return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children:
|
|
2292
|
+
const { show: H = !0 } = y;
|
|
2293
|
+
return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
|
|
2302
2294
|
}
|
|
2303
2295
|
case "dropdown": {
|
|
2304
|
-
const { show: H = !0 } =
|
|
2305
|
-
return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children:
|
|
2296
|
+
const { show: H = !0 } = y;
|
|
2297
|
+
return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
|
|
2306
2298
|
}
|
|
2307
2299
|
case "date-range":
|
|
2308
|
-
return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children:
|
|
2300
|
+
return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
|
|
2309
2301
|
case "date":
|
|
2310
|
-
return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children:
|
|
2302
|
+
return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
|
|
2311
2303
|
case "dropdown-multiple": {
|
|
2312
|
-
const { show: H = !0 } =
|
|
2313
|
-
return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children:
|
|
2304
|
+
const { show: H = !0 } = y;
|
|
2305
|
+
return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
|
|
2314
2306
|
}
|
|
2315
2307
|
default:
|
|
2316
2308
|
return null;
|
|
2317
2309
|
}
|
|
2318
2310
|
};
|
|
2319
|
-
return /* @__PURE__ */ e(
|
|
2311
|
+
return /* @__PURE__ */ e(mr, { onHide: r, show: t || !1, children: /* @__PURE__ */ d(u, { direction: "column", gap: "md", children: [
|
|
2320
2312
|
/* @__PURE__ */ d($, { direction: "row", justify: "space-between", align: "center", children: [
|
|
2321
2313
|
/* @__PURE__ */ e(u, { children: "Filter" }),
|
|
2322
2314
|
/* @__PURE__ */ e(
|
|
@@ -2328,9 +2320,9 @@ const ln = te(
|
|
|
2328
2320
|
}
|
|
2329
2321
|
)
|
|
2330
2322
|
] }),
|
|
2331
|
-
i == null ? void 0 : i.map((
|
|
2323
|
+
i == null ? void 0 : i.map((y, b) => p(y, b))
|
|
2332
2324
|
] }) });
|
|
2333
|
-
},
|
|
2325
|
+
}, Zr = ({
|
|
2334
2326
|
searchKey: t = "q",
|
|
2335
2327
|
statusKey: r = "status",
|
|
2336
2328
|
searchPlaceholder: n = "Search",
|
|
@@ -2342,15 +2334,15 @@ const ln = te(
|
|
|
2342
2334
|
pageKey: h = "page",
|
|
2343
2335
|
customWidthSearch: f,
|
|
2344
2336
|
handleOnReset: g,
|
|
2345
|
-
filterConfigs:
|
|
2346
|
-
buttonToggleProps:
|
|
2337
|
+
filterConfigs: p,
|
|
2338
|
+
buttonToggleProps: y,
|
|
2347
2339
|
position: b = "right",
|
|
2348
2340
|
titleSearchLabel: H = "Work Order",
|
|
2349
2341
|
withTitleLabels: D = !1
|
|
2350
2342
|
}) => {
|
|
2351
|
-
const Z = (
|
|
2343
|
+
const Z = (y == null ? void 0 : y.isShowLabel) ?? !0, [j, J] = B(!1), [M, fe] = B(0), G = () => {
|
|
2352
2344
|
fe((V) => V + 1);
|
|
2353
|
-
}, { searchParams: z, setSearchParams: K, getQueryParam: oe } = at(), ce = Je(z.toString()), U =
|
|
2345
|
+
}, { searchParams: z, setSearchParams: K, getQueryParam: oe } = at(), ce = Je(z.toString()), U = Or(t, z, s) || "", [ae, se] = B(U), re = oe(s), q = !!(re && !(() => {
|
|
2354
2346
|
if (re)
|
|
2355
2347
|
try {
|
|
2356
2348
|
const V = JSON.parse(re);
|
|
@@ -2401,13 +2393,13 @@ const ln = te(
|
|
|
2401
2393
|
{
|
|
2402
2394
|
onClick: () => {
|
|
2403
2395
|
const V = new URLSearchParams(z);
|
|
2404
|
-
V.delete(s), K(V), se(""),
|
|
2396
|
+
V.delete(s), K(V), se(""), G(), g && g();
|
|
2405
2397
|
},
|
|
2406
2398
|
secondary: !0,
|
|
2407
2399
|
children: /* @__PURE__ */ e(C, { color: "error", fontWeight: "semibold", children: "Reset" })
|
|
2408
2400
|
}
|
|
2409
2401
|
) }),
|
|
2410
|
-
i == null ? void 0 : i.map(({ minWidth: V, content:
|
|
2402
|
+
i == null ? void 0 : i.map(({ minWidth: V, content: Y, title: de, onClickContainer: he }, Me) => /* @__PURE__ */ d(
|
|
2411
2403
|
u,
|
|
2412
2404
|
{
|
|
2413
2405
|
gap: "sm",
|
|
@@ -2417,12 +2409,12 @@ const ln = te(
|
|
|
2417
2409
|
},
|
|
2418
2410
|
children: [
|
|
2419
2411
|
de && /* @__PURE__ */ e(me.SubH3, { children: de }),
|
|
2420
|
-
|
|
2412
|
+
Y
|
|
2421
2413
|
]
|
|
2422
2414
|
},
|
|
2423
2415
|
`extended-filter-${Me}-${M}`
|
|
2424
2416
|
)),
|
|
2425
|
-
!!(
|
|
2417
|
+
!!(p != null && p.length) && /* @__PURE__ */ e(
|
|
2426
2418
|
R,
|
|
2427
2419
|
{
|
|
2428
2420
|
primary: q,
|
|
@@ -2431,14 +2423,14 @@ const ln = te(
|
|
|
2431
2423
|
k,
|
|
2432
2424
|
{
|
|
2433
2425
|
size: "sm",
|
|
2434
|
-
name: (
|
|
2426
|
+
name: (y == null ? void 0 : y.icon) || "FilterHorizontal",
|
|
2435
2427
|
style: {
|
|
2436
2428
|
color: re ? "var(--sa-background-brand, #04254f)" : "var(--sa-text-primary, #292a2e)"
|
|
2437
2429
|
}
|
|
2438
2430
|
}
|
|
2439
2431
|
),
|
|
2440
2432
|
fullWidth: !O,
|
|
2441
|
-
onClick: () =>
|
|
2433
|
+
onClick: () => J(!0),
|
|
2442
2434
|
children: Z ? "Filter" : void 0
|
|
2443
2435
|
}
|
|
2444
2436
|
),
|
|
@@ -2527,19 +2519,19 @@ const ln = te(
|
|
|
2527
2519
|
}
|
|
2528
2520
|
),
|
|
2529
2521
|
/* @__PURE__ */ e(
|
|
2530
|
-
|
|
2522
|
+
Nr,
|
|
2531
2523
|
{
|
|
2532
2524
|
isOpen: j,
|
|
2533
|
-
onClose: () =>
|
|
2525
|
+
onClose: () => J(!1),
|
|
2534
2526
|
filterKey: s,
|
|
2535
|
-
filters:
|
|
2527
|
+
filters: p,
|
|
2536
2528
|
pageKey: h
|
|
2537
2529
|
}
|
|
2538
2530
|
)
|
|
2539
2531
|
]
|
|
2540
2532
|
}
|
|
2541
2533
|
);
|
|
2542
|
-
},
|
|
2534
|
+
}, jr = ({ children: t, borderRadius: r, height: n }) => {
|
|
2543
2535
|
const l = le(null), [i, o] = B("100vh");
|
|
2544
2536
|
return _(() => {
|
|
2545
2537
|
if (n) return;
|
|
@@ -2567,7 +2559,7 @@ const ln = te(
|
|
|
2567
2559
|
children: t
|
|
2568
2560
|
}
|
|
2569
2561
|
);
|
|
2570
|
-
},
|
|
2562
|
+
}, $r = ({
|
|
2571
2563
|
action: t,
|
|
2572
2564
|
advanceFilter: r,
|
|
2573
2565
|
showFilter: n = !0
|
|
@@ -2617,13 +2609,13 @@ const ln = te(
|
|
|
2617
2609
|
gap: "16px"
|
|
2618
2610
|
},
|
|
2619
2611
|
children: [
|
|
2620
|
-
n && /* @__PURE__ */ e(
|
|
2612
|
+
n && /* @__PURE__ */ e(Zr, { ...r }),
|
|
2621
2613
|
/* @__PURE__ */ e(u, { style: { display: "flex", gap: "8px", flexDirection: "row" } }),
|
|
2622
2614
|
i()
|
|
2623
2615
|
]
|
|
2624
2616
|
}
|
|
2625
2617
|
);
|
|
2626
|
-
},
|
|
2618
|
+
}, Ur = ({
|
|
2627
2619
|
totalData: t,
|
|
2628
2620
|
withMarginBottom: r = !0,
|
|
2629
2621
|
withMarginTop: n = !0
|
|
@@ -2654,7 +2646,7 @@ const ln = te(
|
|
|
2654
2646
|
/* @__PURE__ */ e(me.Body1, { children: t || 0 })
|
|
2655
2647
|
]
|
|
2656
2648
|
}
|
|
2657
|
-
),
|
|
2649
|
+
), _r = ({
|
|
2658
2650
|
pagination: t,
|
|
2659
2651
|
pageKey: r = "page",
|
|
2660
2652
|
perPageKey: n = "perPage",
|
|
@@ -2664,13 +2656,13 @@ const ln = te(
|
|
|
2664
2656
|
}) => {
|
|
2665
2657
|
const { searchQueries: a, setSearchParams: s, searchParams: h } = at(), f = h.get(n), g = (H) => {
|
|
2666
2658
|
s({ ...a, [r]: String(H) });
|
|
2667
|
-
},
|
|
2659
|
+
}, p = (H) => {
|
|
2668
2660
|
s({
|
|
2669
2661
|
...a,
|
|
2670
2662
|
[n]: H,
|
|
2671
2663
|
[r]: "1"
|
|
2672
2664
|
});
|
|
2673
|
-
},
|
|
2665
|
+
}, y = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), b = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
|
|
2674
2666
|
return /* @__PURE__ */ e(
|
|
2675
2667
|
u,
|
|
2676
2668
|
{
|
|
@@ -2687,7 +2679,7 @@ const ln = te(
|
|
|
2687
2679
|
borderTop: "1px solid var(--sa-border-subtle, #0b120e24)",
|
|
2688
2680
|
flexShrink: 0
|
|
2689
2681
|
},
|
|
2690
|
-
children: i ? /* @__PURE__ */ d(
|
|
2682
|
+
children: i ? /* @__PURE__ */ d(X, { children: [
|
|
2691
2683
|
/* @__PURE__ */ d(u, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center" }, children: [
|
|
2692
2684
|
/* @__PURE__ */ e(C, { children: "Rows Per Page: " }),
|
|
2693
2685
|
/* @__PURE__ */ e(
|
|
@@ -2701,15 +2693,15 @@ const ln = te(
|
|
|
2701
2693
|
{ label: "100", value: "100" }
|
|
2702
2694
|
],
|
|
2703
2695
|
onChange: (H) => {
|
|
2704
|
-
|
|
2696
|
+
p(H[0].value);
|
|
2705
2697
|
},
|
|
2706
2698
|
defaultValue: f ? [{ label: `${f} per row`, value: f }] : [{ label: `${l} per row`, value: `${l}` }]
|
|
2707
2699
|
}
|
|
2708
2700
|
),
|
|
2709
|
-
/* @__PURE__ */ e(C, { children: `${
|
|
2701
|
+
/* @__PURE__ */ e(C, { children: `${y}-${b} of ${(t == null ? void 0 : t.totalData) || 0}` })
|
|
2710
2702
|
] }),
|
|
2711
2703
|
/* @__PURE__ */ e(
|
|
2712
|
-
|
|
2704
|
+
Zt,
|
|
2713
2705
|
{
|
|
2714
2706
|
currentPage: t != null && t.currentPage ? Number(t == null ? void 0 : t.currentPage) : 1,
|
|
2715
2707
|
totalCount: t != null && t.totalPage ? Number(t == null ? void 0 : t.totalPage) : 1,
|
|
@@ -2717,7 +2709,7 @@ const ln = te(
|
|
|
2717
2709
|
}
|
|
2718
2710
|
)
|
|
2719
2711
|
] }) : /* @__PURE__ */ e(
|
|
2720
|
-
|
|
2712
|
+
Ur,
|
|
2721
2713
|
{
|
|
2722
2714
|
totalData: o,
|
|
2723
2715
|
withMarginBottom: !1,
|
|
@@ -2726,8 +2718,8 @@ const ln = te(
|
|
|
2726
2718
|
)
|
|
2727
2719
|
}
|
|
2728
2720
|
);
|
|
2729
|
-
},
|
|
2730
|
-
const [n, l] = B(!1), i = le(null), o = le(null), a = le(null), [s, h] = B(""), [f, g] = B({ top: 0, left: 0 }),
|
|
2721
|
+
}, Pr = ({ filter: t, columnTitle: r }) => {
|
|
2722
|
+
const [n, l] = B(!1), i = le(null), o = le(null), a = le(null), [s, h] = B(""), [f, g] = B({ top: 0, left: 0 }), p = t.selectedValues, y = De(() => s ? t.options.filter(
|
|
2731
2723
|
(D) => D.label.toLowerCase().includes(s.toLowerCase())
|
|
2732
2724
|
) : t.options, [t.options, s]);
|
|
2733
2725
|
_(() => {
|
|
@@ -2749,7 +2741,7 @@ const ln = te(
|
|
|
2749
2741
|
return n && document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
2750
2742
|
}, [n]);
|
|
2751
2743
|
const b = (D) => {
|
|
2752
|
-
const I =
|
|
2744
|
+
const I = p.includes(D) ? p.filter((Z) => Z !== D) : [...p, D];
|
|
2753
2745
|
t.onFilterChange(I);
|
|
2754
2746
|
}, H = () => t.onFilterChange([]);
|
|
2755
2747
|
return /* @__PURE__ */ d(u, { style: { position: "relative" }, children: [
|
|
@@ -2773,7 +2765,7 @@ const ln = te(
|
|
|
2773
2765
|
name: n ? "ChevronUp" : "ChevronDown",
|
|
2774
2766
|
size: "sm",
|
|
2775
2767
|
style: {
|
|
2776
|
-
color:
|
|
2768
|
+
color: p.length > 0 ? "var(--sa-color-brand-500, #1a4fa0)" : "var(--sa-text-subtle, #8c8f97)"
|
|
2777
2769
|
}
|
|
2778
2770
|
}
|
|
2779
2771
|
)
|
|
@@ -2817,7 +2809,7 @@ const ln = te(
|
|
|
2817
2809
|
"Filter ",
|
|
2818
2810
|
r
|
|
2819
2811
|
] }),
|
|
2820
|
-
|
|
2812
|
+
p.length > 0 && /* @__PURE__ */ e(u, { style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
|
|
2821
2813
|
C,
|
|
2822
2814
|
{
|
|
2823
2815
|
fontSize: "xs",
|
|
@@ -2898,7 +2890,7 @@ const ln = te(
|
|
|
2898
2890
|
)
|
|
2899
2891
|
]
|
|
2900
2892
|
}
|
|
2901
|
-
) :
|
|
2893
|
+
) : y.length > 0 ? /* @__PURE__ */ e(u, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: y.map((D) => /* @__PURE__ */ d(
|
|
2902
2894
|
u,
|
|
2903
2895
|
{
|
|
2904
2896
|
style: {
|
|
@@ -2913,22 +2905,22 @@ const ln = te(
|
|
|
2913
2905
|
cursor: "pointer",
|
|
2914
2906
|
borderRadius: "8px",
|
|
2915
2907
|
transition: "all 0.2s ease",
|
|
2916
|
-
backgroundColor:
|
|
2908
|
+
backgroundColor: p.includes(D.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
|
|
2917
2909
|
},
|
|
2918
2910
|
onClick: (I) => {
|
|
2919
2911
|
I.stopPropagation(), b(D.value);
|
|
2920
2912
|
},
|
|
2921
2913
|
onMouseEnter: (I) => {
|
|
2922
|
-
|
|
2914
|
+
p.includes(D.value) || (I.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), I.currentTarget.style.transform = "translateX(2px)";
|
|
2923
2915
|
},
|
|
2924
2916
|
onMouseLeave: (I) => {
|
|
2925
|
-
I.currentTarget.style.backgroundColor =
|
|
2917
|
+
I.currentTarget.style.backgroundColor = p.includes(D.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", I.currentTarget.style.transform = "translateX(0)";
|
|
2926
2918
|
},
|
|
2927
2919
|
children: [
|
|
2928
2920
|
/* @__PURE__ */ e(
|
|
2929
2921
|
tt,
|
|
2930
2922
|
{
|
|
2931
|
-
checked:
|
|
2923
|
+
checked: p.includes(D.value),
|
|
2932
2924
|
onChange: () => {
|
|
2933
2925
|
}
|
|
2934
2926
|
}
|
|
@@ -2937,8 +2929,8 @@ const ln = te(
|
|
|
2937
2929
|
C,
|
|
2938
2930
|
{
|
|
2939
2931
|
fontSize: "sm",
|
|
2940
|
-
fontWeight:
|
|
2941
|
-
color:
|
|
2932
|
+
fontWeight: p.includes(D.value) ? "medium" : "normal",
|
|
2933
|
+
color: p.includes(D.value) ? "primary" : "gray-700",
|
|
2942
2934
|
children: D.label
|
|
2943
2935
|
}
|
|
2944
2936
|
)
|
|
@@ -2979,7 +2971,7 @@ const ln = te(
|
|
|
2979
2971
|
)
|
|
2980
2972
|
}
|
|
2981
2973
|
),
|
|
2982
|
-
|
|
2974
|
+
p.length > 0 && /* @__PURE__ */ e(
|
|
2983
2975
|
u,
|
|
2984
2976
|
{
|
|
2985
2977
|
style: {
|
|
@@ -3003,12 +2995,12 @@ const ln = te(
|
|
|
3003
2995
|
fontWeight: 600,
|
|
3004
2996
|
color: "white"
|
|
3005
2997
|
},
|
|
3006
|
-
children:
|
|
2998
|
+
children: p.length
|
|
3007
2999
|
}
|
|
3008
3000
|
),
|
|
3009
3001
|
/* @__PURE__ */ d(C, { fontSize: "xs", color: "primary", fontWeight: "medium", children: [
|
|
3010
3002
|
"item",
|
|
3011
|
-
|
|
3003
|
+
p.length > 1 ? "s" : "",
|
|
3012
3004
|
" selected"
|
|
3013
3005
|
] })
|
|
3014
3006
|
] })
|
|
@@ -3018,7 +3010,7 @@ const ln = te(
|
|
|
3018
3010
|
}
|
|
3019
3011
|
)
|
|
3020
3012
|
] });
|
|
3021
|
-
},
|
|
3013
|
+
}, qr = ({
|
|
3022
3014
|
direction: t
|
|
3023
3015
|
}) => {
|
|
3024
3016
|
const r = "var(--sa-text-primary, #292a2e)", n = "var(--sa-text-subtle, #8c8f97)";
|
|
@@ -3058,7 +3050,7 @@ const ln = te(
|
|
|
3058
3050
|
]
|
|
3059
3051
|
}
|
|
3060
3052
|
);
|
|
3061
|
-
},
|
|
3053
|
+
}, Jr = ({ frozen: t }) => /* @__PURE__ */ d(
|
|
3062
3054
|
"svg",
|
|
3063
3055
|
{
|
|
3064
3056
|
width: "11",
|
|
@@ -3074,7 +3066,7 @@ const ln = te(
|
|
|
3074
3066
|
/* @__PURE__ */ e("path", { d: t ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
3075
3067
|
]
|
|
3076
3068
|
}
|
|
3077
|
-
), et = "var(--sa-background-primary, #ffffff)",
|
|
3069
|
+
), et = "var(--sa-background-primary, #ffffff)", xt = "var(--sa-background-primary-inverse, #f8f8f8)", Gr = ({
|
|
3078
3070
|
columns: t,
|
|
3079
3071
|
records: r,
|
|
3080
3072
|
handleDetail: n,
|
|
@@ -3086,18 +3078,18 @@ const ln = te(
|
|
|
3086
3078
|
visibleHandleDetail: h,
|
|
3087
3079
|
showHeadBorder: f = !1,
|
|
3088
3080
|
scrollParentRef: g,
|
|
3089
|
-
frozenCount:
|
|
3090
|
-
onFrozenCountChange:
|
|
3081
|
+
frozenCount: p = 0,
|
|
3082
|
+
onFrozenCountChange: y,
|
|
3091
3083
|
customActions: b,
|
|
3092
3084
|
actionsOrder: H = ["detail", "update", "delete", "custom"],
|
|
3093
3085
|
customEmptyState: D,
|
|
3094
3086
|
enableColumnResize: I = !1,
|
|
3095
3087
|
defaultColumnWidths: Z,
|
|
3096
3088
|
onColumnWidthsChange: j,
|
|
3097
|
-
defaultMinColumnWidth:
|
|
3089
|
+
defaultMinColumnWidth: J = 60,
|
|
3098
3090
|
sort: M,
|
|
3099
3091
|
defaultSort: fe,
|
|
3100
|
-
onSortChange:
|
|
3092
|
+
onSortChange: G,
|
|
3101
3093
|
showActionDivider: z = !1
|
|
3102
3094
|
}) => {
|
|
3103
3095
|
const K = M !== void 0, [oe, ce] = B(
|
|
@@ -3109,8 +3101,8 @@ const ln = te(
|
|
|
3109
3101
|
const w = ae(x);
|
|
3110
3102
|
if (!w) return;
|
|
3111
3103
|
let v;
|
|
3112
|
-
!U || U.key !== w ? v = { key: w, direction: "asc" } : U.direction === "asc" ? v = { key: w, direction: "desc" } : v = null, K || ce(v),
|
|
3113
|
-
},
|
|
3104
|
+
!U || U.key !== w ? v = { key: w, direction: "asc" } : U.direction === "asc" ? v = { key: w, direction: "desc" } : v = null, K || ce(v), G == null || G(v);
|
|
3105
|
+
}, Q = [n, l, i].filter((x) => x !== void 0).length, q = !!b, O = !!n || !!l || !!i || q, V = "var(--sa-border-subtle, #0b120e24)", Y = `1px solid ${V}`, de = `inset 1px 0 0 ${V}`, he = `inset -1px 0 0 ${V}`, Me = Q === 3 ? q ? "178px" : "140px" : Q === 2 ? q ? "140px" : "102px" : Q === 1 ? q ? "112px" : "74px" : q ? "74px" : "", Oe = (x, w) => {
|
|
3114
3106
|
if (!w) return x;
|
|
3115
3107
|
if (typeof w == "function") return w(x);
|
|
3116
3108
|
if (typeof w == "string") return x[w];
|
|
@@ -3124,7 +3116,7 @@ const ln = te(
|
|
|
3124
3116
|
() => Z ?? {}
|
|
3125
3117
|
), ke = le(null);
|
|
3126
3118
|
rt(() => {
|
|
3127
|
-
if (!
|
|
3119
|
+
if (!p || !Le.current) {
|
|
3128
3120
|
Ze([]);
|
|
3129
3121
|
return;
|
|
3130
3122
|
}
|
|
@@ -3133,11 +3125,11 @@ const ln = te(
|
|
|
3133
3125
|
), w = [];
|
|
3134
3126
|
let v = 0;
|
|
3135
3127
|
x.forEach((L, A) => {
|
|
3136
|
-
w[A] = v, A <
|
|
3128
|
+
w[A] = v, A < p && (v += L.offsetWidth);
|
|
3137
3129
|
}), Ze(w);
|
|
3138
|
-
}, [
|
|
3130
|
+
}, [p, t, r, We]);
|
|
3139
3131
|
const je = (x) => {
|
|
3140
|
-
|
|
3132
|
+
y && y(x < p ? x : x + 1);
|
|
3141
3133
|
}, m = (x, w) => {
|
|
3142
3134
|
const v = We[x];
|
|
3143
3135
|
if (v !== void 0) {
|
|
@@ -3153,22 +3145,22 @@ const ln = te(
|
|
|
3153
3145
|
ke.current = { colIndex: w, startX: x.clientX, startWidth: L };
|
|
3154
3146
|
const A = document.body.style.userSelect, ne = document.body.style.cursor;
|
|
3155
3147
|
document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
|
|
3156
|
-
const
|
|
3148
|
+
const pe = (xe) => {
|
|
3157
3149
|
var Fe;
|
|
3158
|
-
const
|
|
3159
|
-
if (!
|
|
3160
|
-
const $e = ((Fe = t[
|
|
3150
|
+
const ye = ke.current;
|
|
3151
|
+
if (!ye) return;
|
|
3152
|
+
const $e = ((Fe = t[ye.colIndex]) == null ? void 0 : Fe.minWidth) ?? J, Ae = Math.max($e, ye.startWidth + (xe.clientX - ye.startX));
|
|
3161
3153
|
Be(
|
|
3162
|
-
(Ye) => Ye[
|
|
3154
|
+
(Ye) => Ye[ye.colIndex] === Ae ? Ye : { ...Ye, [ye.colIndex]: Ae }
|
|
3163
3155
|
);
|
|
3164
3156
|
}, be = () => {
|
|
3165
|
-
document.removeEventListener("mousemove",
|
|
3157
|
+
document.removeEventListener("mousemove", pe), document.removeEventListener("mouseup", be), document.body.style.userSelect = A, document.body.style.cursor = ne, ke.current = null, j && Be((xe) => (j(xe), xe));
|
|
3166
3158
|
};
|
|
3167
|
-
document.addEventListener("mousemove",
|
|
3159
|
+
document.addEventListener("mousemove", pe), document.addEventListener("mouseup", be);
|
|
3168
3160
|
};
|
|
3169
|
-
return /* @__PURE__ */ e("div", { ref: Le, children: /* @__PURE__ */ d(
|
|
3161
|
+
return /* @__PURE__ */ e("div", { ref: Le, children: /* @__PURE__ */ d(wt, { fullWidth: !0, children: [
|
|
3170
3162
|
/* @__PURE__ */ e(
|
|
3171
|
-
|
|
3163
|
+
jt,
|
|
3172
3164
|
{
|
|
3173
3165
|
style: {
|
|
3174
3166
|
height: "40px",
|
|
@@ -3177,7 +3169,7 @@ const ln = te(
|
|
|
3177
3169
|
children: /* @__PURE__ */ d(He, { children: [
|
|
3178
3170
|
t.map((x, w) => {
|
|
3179
3171
|
var $e, Ae;
|
|
3180
|
-
const v =
|
|
3172
|
+
const v = p > 0 && w < p, L = ie[w] ?? 0, A = F(x), pe = w === t.length - 1 && O && z, be = ae(x), xe = !!x.sortable && !!be, ye = xe && (U == null ? void 0 : U.key) === be ? U.direction : null;
|
|
3181
3173
|
return /* @__PURE__ */ d(
|
|
3182
3174
|
dt,
|
|
3183
3175
|
{
|
|
@@ -3187,8 +3179,8 @@ const ln = te(
|
|
|
3187
3179
|
left: v ? L : void 0,
|
|
3188
3180
|
zIndex: v ? 4 : 2,
|
|
3189
3181
|
paddingLeft: w === 0 ? "12px" : "",
|
|
3190
|
-
borderRight: f && !
|
|
3191
|
-
borderBottom: f ?
|
|
3182
|
+
borderRight: f && !pe && !v ? Y : void 0,
|
|
3183
|
+
borderBottom: f ? Y : void 0,
|
|
3192
3184
|
boxShadow: f && v ? he : void 0,
|
|
3193
3185
|
backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
3194
3186
|
textAlign: x.textAlign === "text-right" ? "right" : x.textAlign === "text-center" ? "center" : "left",
|
|
@@ -3211,7 +3203,7 @@ const ln = te(
|
|
|
3211
3203
|
{
|
|
3212
3204
|
type: "button",
|
|
3213
3205
|
onClick: () => se(x),
|
|
3214
|
-
title:
|
|
3206
|
+
title: ye === "asc" ? "Sorted ascending — click to sort descending" : ye === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
|
|
3215
3207
|
style: {
|
|
3216
3208
|
flex: 1,
|
|
3217
3209
|
minWidth: 0,
|
|
@@ -3241,7 +3233,7 @@ const ln = te(
|
|
|
3241
3233
|
children: x.title || (($e = x.accessor) == null ? void 0 : $e.toString())
|
|
3242
3234
|
}
|
|
3243
3235
|
),
|
|
3244
|
-
/* @__PURE__ */ e(
|
|
3236
|
+
/* @__PURE__ */ e(qr, { direction: ye })
|
|
3245
3237
|
]
|
|
3246
3238
|
}
|
|
3247
3239
|
) : /* @__PURE__ */ e(
|
|
@@ -3258,13 +3250,13 @@ const ln = te(
|
|
|
3258
3250
|
}
|
|
3259
3251
|
),
|
|
3260
3252
|
x.filter && /* @__PURE__ */ e(
|
|
3261
|
-
|
|
3253
|
+
Pr,
|
|
3262
3254
|
{
|
|
3263
3255
|
filter: x.filter,
|
|
3264
3256
|
columnTitle: x.title
|
|
3265
3257
|
}
|
|
3266
3258
|
),
|
|
3267
|
-
|
|
3259
|
+
y && /* @__PURE__ */ e(
|
|
3268
3260
|
"button",
|
|
3269
3261
|
{
|
|
3270
3262
|
onClick: () => je(w),
|
|
@@ -3281,7 +3273,7 @@ const ln = te(
|
|
|
3281
3273
|
opacity: v ? 1 : 0.45,
|
|
3282
3274
|
transition: "opacity 0.15s"
|
|
3283
3275
|
},
|
|
3284
|
-
children: /* @__PURE__ */ e(
|
|
3276
|
+
children: /* @__PURE__ */ e(Jr, { frozen: v })
|
|
3285
3277
|
}
|
|
3286
3278
|
)
|
|
3287
3279
|
]
|
|
@@ -3322,7 +3314,7 @@ const ln = te(
|
|
|
3322
3314
|
top: 0,
|
|
3323
3315
|
right: 0,
|
|
3324
3316
|
zIndex: 3,
|
|
3325
|
-
borderBottom: f ?
|
|
3317
|
+
borderBottom: f ? Y : void 0,
|
|
3326
3318
|
boxShadow: f && z ? de : void 0
|
|
3327
3319
|
}
|
|
3328
3320
|
}
|
|
@@ -3330,7 +3322,7 @@ const ln = te(
|
|
|
3330
3322
|
] })
|
|
3331
3323
|
}
|
|
3332
3324
|
),
|
|
3333
|
-
/* @__PURE__ */ e(
|
|
3325
|
+
/* @__PURE__ */ e($t, { children: o ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: /* @__PURE__ */ d(u, { style: { gap: "16px" }, children: [
|
|
3334
3326
|
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
3335
3327
|
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
3336
3328
|
/* @__PURE__ */ e(Re, { variant: "list" }),
|
|
@@ -3346,8 +3338,8 @@ const ln = te(
|
|
|
3346
3338
|
},
|
|
3347
3339
|
onMouseEnter: (v) => {
|
|
3348
3340
|
const L = v.currentTarget;
|
|
3349
|
-
L.style.backgroundColor =
|
|
3350
|
-
A.style.position === "sticky" && (A.style.backgroundColor =
|
|
3341
|
+
L.style.backgroundColor = xt, Array.from(L.querySelectorAll("td")).forEach((A) => {
|
|
3342
|
+
A.style.position === "sticky" && (A.style.backgroundColor = xt);
|
|
3351
3343
|
});
|
|
3352
3344
|
},
|
|
3353
3345
|
onMouseLeave: (v) => {
|
|
@@ -3358,21 +3350,21 @@ const ln = te(
|
|
|
3358
3350
|
},
|
|
3359
3351
|
children: [
|
|
3360
3352
|
t.map((v, L) => {
|
|
3361
|
-
const A = v.render ? v.render(x, w, r) : Oe(x, v.accessor), ne =
|
|
3353
|
+
const A = v.render ? v.render(x, w, r) : Oe(x, v.accessor), ne = p > 0 && L < p, pe = ie[L] ?? 0, be = We[L] !== void 0, xe = ne && L === p - 1;
|
|
3362
3354
|
return /* @__PURE__ */ e(
|
|
3363
3355
|
we,
|
|
3364
3356
|
{
|
|
3365
3357
|
style: {
|
|
3366
3358
|
position: ne ? "sticky" : void 0,
|
|
3367
|
-
left: ne ?
|
|
3359
|
+
left: ne ? pe : void 0,
|
|
3368
3360
|
zIndex: ne ? 1 : void 0,
|
|
3369
3361
|
backgroundColor: ne ? et : void 0,
|
|
3370
3362
|
transition: ne ? "background-color 0.3s ease" : void 0,
|
|
3371
3363
|
paddingLeft: L === 0 ? "12px" : "",
|
|
3372
3364
|
whiteSpace: "nowrap",
|
|
3373
3365
|
overflow: be ? "hidden" : void 0,
|
|
3374
|
-
borderLeft: v.showBorderLeft ?
|
|
3375
|
-
borderRight: v.showBorderRight ?
|
|
3366
|
+
borderLeft: v.showBorderLeft ? Y : void 0,
|
|
3367
|
+
borderRight: v.showBorderRight ? Y : void 0,
|
|
3376
3368
|
boxShadow: xe ? he : void 0,
|
|
3377
3369
|
textAlign: v.textAlign === "text-right" ? "right" : v.textAlign === "text-center" ? "center" : "left",
|
|
3378
3370
|
...m(L, v.width)
|
|
@@ -3430,27 +3422,27 @@ const ln = te(
|
|
|
3430
3422
|
onClick: () => i(x.id, x),
|
|
3431
3423
|
iconLeft: /* @__PURE__ */ e(k, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
|
|
3432
3424
|
}
|
|
3433
|
-
) }, "delete") : v === "custom" ? /* @__PURE__ */ e(
|
|
3425
|
+
) }, "delete") : v === "custom" ? /* @__PURE__ */ e(Gt.Fragment, { children: b == null ? void 0 : b(x) }, "custom") : null;
|
|
3434
3426
|
}) }) }) : null
|
|
3435
3427
|
]
|
|
3436
3428
|
},
|
|
3437
3429
|
`${x}${w}`
|
|
3438
3430
|
)) })
|
|
3439
3431
|
] }) });
|
|
3440
|
-
},
|
|
3432
|
+
}, Qr = ({
|
|
3441
3433
|
wrapperProps: t,
|
|
3442
3434
|
dataTableProps: r,
|
|
3443
3435
|
headerProps: n,
|
|
3444
3436
|
footerProps: l
|
|
3445
3437
|
}) => {
|
|
3446
|
-
var
|
|
3438
|
+
var p;
|
|
3447
3439
|
const i = le(null), [o, a] = B(
|
|
3448
3440
|
(r == null ? void 0 : r.defaultFrozenCount) ?? 0
|
|
3449
|
-
), s = (n == null ? void 0 : n.show) ?? !0, h = le(null), f = (
|
|
3441
|
+
), s = (n == null ? void 0 : n.show) ?? !0, h = le(null), f = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
|
|
3450
3442
|
typeof f == "number" && (h.current = f);
|
|
3451
3443
|
const g = (l == null ? void 0 : l.showFooter) ?? (f === void 0 ? h.current !== 0 : f !== 0);
|
|
3452
|
-
return /* @__PURE__ */ d(
|
|
3453
|
-
s && /* @__PURE__ */ e(
|
|
3444
|
+
return /* @__PURE__ */ d(jr, { ...t, children: [
|
|
3445
|
+
s && /* @__PURE__ */ e($r, { ...n }),
|
|
3454
3446
|
/* @__PURE__ */ e(
|
|
3455
3447
|
u,
|
|
3456
3448
|
{
|
|
@@ -3461,7 +3453,7 @@ const ln = te(
|
|
|
3461
3453
|
overflowX: "auto"
|
|
3462
3454
|
},
|
|
3463
3455
|
children: r ? /* @__PURE__ */ e(
|
|
3464
|
-
|
|
3456
|
+
Gr,
|
|
3465
3457
|
{
|
|
3466
3458
|
...r,
|
|
3467
3459
|
scrollParentRef: i,
|
|
@@ -3472,7 +3464,7 @@ const ln = te(
|
|
|
3472
3464
|
}
|
|
3473
3465
|
),
|
|
3474
3466
|
g && /* @__PURE__ */ e(
|
|
3475
|
-
|
|
3467
|
+
_r,
|
|
3476
3468
|
{
|
|
3477
3469
|
pagination: r == null ? void 0 : r.pagination,
|
|
3478
3470
|
pageKey: r == null ? void 0 : r.pageKey,
|
|
@@ -3484,21 +3476,21 @@ const ln = te(
|
|
|
3484
3476
|
)
|
|
3485
3477
|
] });
|
|
3486
3478
|
};
|
|
3487
|
-
function
|
|
3479
|
+
function Yr(t) {
|
|
3488
3480
|
return te(
|
|
3489
3481
|
t
|
|
3490
3482
|
);
|
|
3491
3483
|
}
|
|
3492
|
-
const
|
|
3484
|
+
const xn = Yr(Qr), st = ({
|
|
3493
3485
|
of: t,
|
|
3494
3486
|
render: r
|
|
3495
|
-
}) =>
|
|
3487
|
+
}) => Qt.toArray(t == null ? void 0 : t.map((n, l, i) => r(n, l, i))), T = ({
|
|
3496
3488
|
condition: t,
|
|
3497
3489
|
fallback: r,
|
|
3498
3490
|
children: n,
|
|
3499
3491
|
loading: l,
|
|
3500
3492
|
isLoading: i
|
|
3501
|
-
}) => /* @__PURE__ */ e(
|
|
3493
|
+
}) => /* @__PURE__ */ e(X, { children: i ? l : t ? n : r }), N = (t) => /* @__PURE__ */ e(
|
|
3502
3494
|
C,
|
|
3503
3495
|
{
|
|
3504
3496
|
...t,
|
|
@@ -3508,7 +3500,7 @@ const yn = Gr(Jr), st = ({
|
|
|
3508
3500
|
color: t.color || "gray-700",
|
|
3509
3501
|
children: t.children
|
|
3510
3502
|
}
|
|
3511
|
-
), Ce = (t) => /* @__PURE__ */ e(C, { color: "red-600", fontSize: "sm", children: t.message }),
|
|
3503
|
+
), Ce = (t) => /* @__PURE__ */ e(C, { color: "red-600", fontSize: "sm", children: t.message }), Xr = ({
|
|
3512
3504
|
size: t = "md",
|
|
3513
3505
|
direction: r = "vertical",
|
|
3514
3506
|
requiredTitle: n = "(Required)",
|
|
@@ -3593,7 +3585,7 @@ const yn = Gr(Jr), st = ({
|
|
|
3593
3585
|
]
|
|
3594
3586
|
}
|
|
3595
3587
|
);
|
|
3596
|
-
},
|
|
3588
|
+
}, Kr = ({
|
|
3597
3589
|
size: t = "md",
|
|
3598
3590
|
direction: r = "vertical",
|
|
3599
3591
|
requiredTitle: n = "(Required)",
|
|
@@ -3684,7 +3676,7 @@ const yn = Gr(Jr), st = ({
|
|
|
3684
3676
|
]
|
|
3685
3677
|
}
|
|
3686
3678
|
);
|
|
3687
|
-
},
|
|
3679
|
+
}, ei = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-text-error, #a4133c)" : "var(--sa-text-disable, #181a198f)", ti = (t) => {
|
|
3688
3680
|
var s;
|
|
3689
3681
|
const [r, n] = B(!1), l = (h) => {
|
|
3690
3682
|
h.preventDefault(), h.stopPropagation();
|
|
@@ -3711,7 +3703,7 @@ const yn = Gr(Jr), st = ({
|
|
|
3711
3703
|
paddingBlock: "md",
|
|
3712
3704
|
borderRadius: "rounded-md",
|
|
3713
3705
|
style: {
|
|
3714
|
-
border: r ? "1px solid var(--sa-text-info, #0073ab)" : `1px solid ${
|
|
3706
|
+
border: r ? "1px solid var(--sa-text-info, #0073ab)" : `1px solid ${ei(t.errorMessage, t.status)}`
|
|
3715
3707
|
},
|
|
3716
3708
|
children: [
|
|
3717
3709
|
/* @__PURE__ */ e(
|
|
@@ -3753,17 +3745,17 @@ const yn = Gr(Jr), st = ({
|
|
|
3753
3745
|
}
|
|
3754
3746
|
);
|
|
3755
3747
|
};
|
|
3756
|
-
function
|
|
3748
|
+
function Cn(t) {
|
|
3757
3749
|
return t.split(" ").map((r) => r[0]).join("").slice(0, 2).toUpperCase();
|
|
3758
3750
|
}
|
|
3759
|
-
const
|
|
3751
|
+
const ri = (t) => {
|
|
3760
3752
|
const r = {
|
|
3761
3753
|
day: "2-digit",
|
|
3762
3754
|
month: "short",
|
|
3763
3755
|
year: "numeric"
|
|
3764
3756
|
};
|
|
3765
3757
|
return t.toLocaleDateString("id-ID", r);
|
|
3766
|
-
},
|
|
3758
|
+
}, Dn = (t) => {
|
|
3767
3759
|
const r = {
|
|
3768
3760
|
Jan: 0,
|
|
3769
3761
|
Feb: 1,
|
|
@@ -3783,7 +3775,7 @@ const ei = (t) => {
|
|
|
3783
3775
|
const l = parseInt(n[0], 10), i = r[n[1]], o = parseInt(n[2], 10);
|
|
3784
3776
|
return isNaN(l) || isNaN(i) || isNaN(o) ? null : new Date(o, i, l);
|
|
3785
3777
|
};
|
|
3786
|
-
function
|
|
3778
|
+
function bn(t, r = !0) {
|
|
3787
3779
|
if (!t)
|
|
3788
3780
|
return "Rp 0";
|
|
3789
3781
|
const n = typeof t == "number" ? t.toString() : t;
|
|
@@ -3798,19 +3790,19 @@ String.prototype.toTitleCase = function() {
|
|
|
3798
3790
|
String.prototype.toNumber = function() {
|
|
3799
3791
|
return Number(this);
|
|
3800
3792
|
};
|
|
3801
|
-
const
|
|
3793
|
+
const vn = (t) => {
|
|
3802
3794
|
const r = t.split(" ");
|
|
3803
3795
|
let n = r[0].charAt(0);
|
|
3804
3796
|
return r.length > 1 && (n += "" + r[1].charAt(0)), n.toUpperCase();
|
|
3805
3797
|
};
|
|
3806
|
-
function
|
|
3798
|
+
function wn(t) {
|
|
3807
3799
|
const r = typeof t == "string" ? new Date(t) : t;
|
|
3808
3800
|
if (isNaN(r.getTime()))
|
|
3809
3801
|
throw new Error("Invalid date format");
|
|
3810
3802
|
const n = r.getFullYear(), l = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
|
|
3811
3803
|
return `${n}-${l}-${i}`;
|
|
3812
3804
|
}
|
|
3813
|
-
const
|
|
3805
|
+
const ii = "sa-admin", ge = (t) => `var(--${ii}-${t})`, kn = {
|
|
3814
3806
|
base: {
|
|
3815
3807
|
borderColor: ge("base-border-color"),
|
|
3816
3808
|
textColor: ge("base-text-color"),
|
|
@@ -3828,22 +3820,22 @@ const ti = "sa-admin", ge = (t) => `var(--${ti}-${t})`, vn = {
|
|
|
3828
3820
|
collapseWidth: ge("sidebar-collapse-width"),
|
|
3829
3821
|
collapseV2Width: ge("sidebar-v2-collapse-width")
|
|
3830
3822
|
}
|
|
3831
|
-
},
|
|
3823
|
+
}, Fn = 24 * 60 * 60 * 1e3, Sn = (t) => {
|
|
3832
3824
|
const r = "14px poppins", l = document.createElement("canvas").getContext("2d");
|
|
3833
3825
|
l.font = r;
|
|
3834
3826
|
const i = l.measureText(t).width;
|
|
3835
3827
|
return Number(Math.ceil(i));
|
|
3836
|
-
},
|
|
3837
|
-
function
|
|
3828
|
+
}, ni = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, li = /--+/, oi = /-$/;
|
|
3829
|
+
function En(t, r) {
|
|
3838
3830
|
return JSON.stringify(t) !== JSON.stringify(r);
|
|
3839
3831
|
}
|
|
3840
|
-
function
|
|
3832
|
+
function Mn(t) {
|
|
3841
3833
|
return /^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t);
|
|
3842
3834
|
}
|
|
3843
|
-
function
|
|
3835
|
+
function Ln(t) {
|
|
3844
3836
|
return /^[A-Za-z\s]+$/.test(t);
|
|
3845
3837
|
}
|
|
3846
|
-
const
|
|
3838
|
+
const Wn = (t) => {
|
|
3847
3839
|
const r = /^[0-9]$/, n = [
|
|
3848
3840
|
"ArrowLeft",
|
|
3849
3841
|
"ArrowRight",
|
|
@@ -3855,7 +3847,7 @@ const Mn = (t) => {
|
|
|
3855
3847
|
"Tab"
|
|
3856
3848
|
];
|
|
3857
3849
|
(t.ctrlKey || t.metaKey) && (t.key === "a" || t.key === "c" || t.key === "v") || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
3858
|
-
},
|
|
3850
|
+
}, Bn = (t) => {
|
|
3859
3851
|
const r = /^[0-9]$/, n = [
|
|
3860
3852
|
"ArrowLeft",
|
|
3861
3853
|
"ArrowRight",
|
|
@@ -3867,7 +3859,7 @@ const Mn = (t) => {
|
|
|
3867
3859
|
"Tab"
|
|
3868
3860
|
];
|
|
3869
3861
|
(t.ctrlKey || t.metaKey) && t.key === "v" || r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
3870
|
-
},
|
|
3862
|
+
}, An = (t) => {
|
|
3871
3863
|
const r = /^[0-9.]$/, n = [
|
|
3872
3864
|
"ArrowLeft",
|
|
3873
3865
|
"ArrowRight",
|
|
@@ -3879,11 +3871,11 @@ const Mn = (t) => {
|
|
|
3879
3871
|
"Tab"
|
|
3880
3872
|
];
|
|
3881
3873
|
(t.ctrlKey || t.metaKey) && t.key === "v" || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
|
|
3882
|
-
},
|
|
3883
|
-
function
|
|
3884
|
-
return !(
|
|
3874
|
+
}, Rn = (t) => ni.test(t);
|
|
3875
|
+
function Hn(t) {
|
|
3876
|
+
return !(li.test(t) || oi.test(t));
|
|
3885
3877
|
}
|
|
3886
|
-
const
|
|
3878
|
+
const zn = (t) => {
|
|
3887
3879
|
const r = [
|
|
3888
3880
|
"ArrowLeft",
|
|
3889
3881
|
"ArrowRight",
|
|
@@ -3900,7 +3892,7 @@ const Rn = (t) => {
|
|
|
3900
3892
|
return;
|
|
3901
3893
|
const n = t.currentTarget.value;
|
|
3902
3894
|
/^[0-9]$/.test(t.key) || t.key === "." && !n.includes(".") || t.key === "-" && n.length === 0 && !n.includes("-") || r.includes(t.key) || t.preventDefault();
|
|
3903
|
-
},
|
|
3895
|
+
}, Vn = (t) => {
|
|
3904
3896
|
const r = document.getElementById(t);
|
|
3905
3897
|
if (r) {
|
|
3906
3898
|
const n = r.getBoundingClientRect(), l = window.scrollY + n.top - 80;
|
|
@@ -3910,7 +3902,7 @@ const Rn = (t) => {
|
|
|
3910
3902
|
});
|
|
3911
3903
|
}
|
|
3912
3904
|
};
|
|
3913
|
-
function
|
|
3905
|
+
function ci(t) {
|
|
3914
3906
|
const r = t.toLowerCase();
|
|
3915
3907
|
if (["kb", "mb", "gb"].find((o) => r.endsWith(o)))
|
|
3916
3908
|
return t;
|
|
@@ -3919,11 +3911,11 @@ function li(t) {
|
|
|
3919
3911
|
throw new Error("Invalid size format");
|
|
3920
3912
|
return i >= 1e6 ? `${(i / 1e6).toFixed(2)}MB` : i >= 1e3 ? `${(i / 1e3).toFixed(2)}KB` : `${i}B`;
|
|
3921
3913
|
}
|
|
3922
|
-
function
|
|
3914
|
+
function ai(t) {
|
|
3923
3915
|
const r = t.split("/");
|
|
3924
3916
|
return r[r.length - 1];
|
|
3925
3917
|
}
|
|
3926
|
-
const
|
|
3918
|
+
const si = (t) => {
|
|
3927
3919
|
var r, n;
|
|
3928
3920
|
return /* @__PURE__ */ d(
|
|
3929
3921
|
u,
|
|
@@ -3968,11 +3960,11 @@ const ci = (t) => {
|
|
|
3968
3960
|
whiteSpace: "nowrap",
|
|
3969
3961
|
overflow: "hidden"
|
|
3970
3962
|
},
|
|
3971
|
-
children:
|
|
3963
|
+
children: ai(t.defaultUrl || "") || ((r = t.fileSelected) == null ? void 0 : r.name)
|
|
3972
3964
|
}
|
|
3973
3965
|
),
|
|
3974
3966
|
!t.defaultUrl && /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
|
|
3975
|
-
/* @__PURE__ */ e(C, { fontSize: "sm", fontWeight: "medium", children: `${
|
|
3967
|
+
/* @__PURE__ */ e(C, { fontSize: "sm", fontWeight: "medium", children: `${ci(
|
|
3976
3968
|
((n = t.fileSelected) == null ? void 0 : n.size.toString()) || "100000"
|
|
3977
3969
|
)}` }),
|
|
3978
3970
|
/* @__PURE__ */ e(k, { name: "Dot", size: "xs" }),
|
|
@@ -3984,7 +3976,7 @@ const ci = (t) => {
|
|
|
3984
3976
|
style: {
|
|
3985
3977
|
textWrap: "nowrap"
|
|
3986
3978
|
},
|
|
3987
|
-
children: t.fileDate ? t.fileDate :
|
|
3979
|
+
children: t.fileDate ? t.fileDate : ri(/* @__PURE__ */ new Date())
|
|
3988
3980
|
}
|
|
3989
3981
|
)
|
|
3990
3982
|
] })
|
|
@@ -4013,7 +4005,7 @@ const ci = (t) => {
|
|
|
4013
4005
|
]
|
|
4014
4006
|
}
|
|
4015
4007
|
);
|
|
4016
|
-
},
|
|
4008
|
+
}, di = ({ status: t = "default", ...r }) => {
|
|
4017
4009
|
var o;
|
|
4018
4010
|
const n = le(null), l = () => {
|
|
4019
4011
|
if (r.defaultUrl) {
|
|
@@ -4022,7 +4014,7 @@ const ci = (t) => {
|
|
|
4022
4014
|
}
|
|
4023
4015
|
n.current && n.current.click();
|
|
4024
4016
|
}, i = ee("md");
|
|
4025
|
-
return /* @__PURE__ */ d(
|
|
4017
|
+
return /* @__PURE__ */ d(X, { children: [
|
|
4026
4018
|
/* @__PURE__ */ e(
|
|
4027
4019
|
"input",
|
|
4028
4020
|
{
|
|
@@ -4050,7 +4042,7 @@ const ci = (t) => {
|
|
|
4050
4042
|
...r.containerProps,
|
|
4051
4043
|
children: [
|
|
4052
4044
|
(r.fileSelected || r.defaultUrl) && /* @__PURE__ */ e(
|
|
4053
|
-
|
|
4045
|
+
si,
|
|
4054
4046
|
{
|
|
4055
4047
|
fileSelected: r.fileSelected,
|
|
4056
4048
|
fileDate: r.fileDate,
|
|
@@ -4060,7 +4052,7 @@ const ci = (t) => {
|
|
|
4060
4052
|
}
|
|
4061
4053
|
),
|
|
4062
4054
|
!r.fileSelected && !r.defaultUrl && /* @__PURE__ */ e(
|
|
4063
|
-
|
|
4055
|
+
ti,
|
|
4064
4056
|
{
|
|
4065
4057
|
fileSupports: r.fileSupportOption,
|
|
4066
4058
|
isDesktop: i,
|
|
@@ -4075,7 +4067,7 @@ const ci = (t) => {
|
|
|
4075
4067
|
),
|
|
4076
4068
|
typeof r.errorMessage == "string" && r.errorMessage && /* @__PURE__ */ e(C, { color: "error", fontSize: "xs", children: r.errorMessage })
|
|
4077
4069
|
] });
|
|
4078
|
-
},
|
|
4070
|
+
}, hi = ({
|
|
4079
4071
|
size: t = "md",
|
|
4080
4072
|
direction: r = "vertical",
|
|
4081
4073
|
requiredTitle: n = "(Required)",
|
|
@@ -4145,7 +4137,7 @@ const ci = (t) => {
|
|
|
4145
4137
|
),
|
|
4146
4138
|
/* @__PURE__ */ d($, { gap: "xs", children: [
|
|
4147
4139
|
/* @__PURE__ */ e(
|
|
4148
|
-
|
|
4140
|
+
di,
|
|
4149
4141
|
{
|
|
4150
4142
|
...i.inputProps,
|
|
4151
4143
|
status: i.errorMessage ? "error" : "default"
|
|
@@ -4156,7 +4148,7 @@ const ci = (t) => {
|
|
|
4156
4148
|
]
|
|
4157
4149
|
}
|
|
4158
4150
|
);
|
|
4159
|
-
},
|
|
4151
|
+
}, ui = ({
|
|
4160
4152
|
size: t = "md",
|
|
4161
4153
|
direction: r = "vertical",
|
|
4162
4154
|
requiredTitle: n = "(Required)",
|
|
@@ -4164,7 +4156,7 @@ const ci = (t) => {
|
|
|
4164
4156
|
required: i = !1,
|
|
4165
4157
|
...o
|
|
4166
4158
|
}) => {
|
|
4167
|
-
var h, f, g,
|
|
4159
|
+
var h, f, g, p;
|
|
4168
4160
|
const a = o.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
4169
4161
|
return /* @__PURE__ */ d(
|
|
4170
4162
|
u,
|
|
@@ -4234,11 +4226,11 @@ const ci = (t) => {
|
|
|
4234
4226
|
children: /* @__PURE__ */ e(
|
|
4235
4227
|
st,
|
|
4236
4228
|
{
|
|
4237
|
-
of: (
|
|
4238
|
-
...
|
|
4239
|
-
isChecked: o.checkBoxesAreChecked.includes(
|
|
4229
|
+
of: (p = o.checkBoxesList) == null ? void 0 : p.map((y) => ({
|
|
4230
|
+
...y,
|
|
4231
|
+
isChecked: o.checkBoxesAreChecked.includes(y.id)
|
|
4240
4232
|
})),
|
|
4241
|
-
render: (
|
|
4233
|
+
render: (y) => y.renderBadge ? /* @__PURE__ */ d(
|
|
4242
4234
|
u,
|
|
4243
4235
|
{
|
|
4244
4236
|
direction: "row",
|
|
@@ -4249,26 +4241,26 @@ const ci = (t) => {
|
|
|
4249
4241
|
/* @__PURE__ */ e(
|
|
4250
4242
|
tt,
|
|
4251
4243
|
{
|
|
4252
|
-
name:
|
|
4253
|
-
value:
|
|
4254
|
-
checked:
|
|
4255
|
-
onChange: (b) => o.onChecked(b.target.value,
|
|
4256
|
-
label:
|
|
4257
|
-
description:
|
|
4244
|
+
name: y.name,
|
|
4245
|
+
value: y.id,
|
|
4246
|
+
checked: y.isChecked,
|
|
4247
|
+
onChange: (b) => o.onChecked(b.target.value, y),
|
|
4248
|
+
label: y.name,
|
|
4249
|
+
description: y.description
|
|
4258
4250
|
}
|
|
4259
4251
|
),
|
|
4260
|
-
|
|
4252
|
+
y.renderBadge
|
|
4261
4253
|
]
|
|
4262
4254
|
}
|
|
4263
4255
|
) : /* @__PURE__ */ e(
|
|
4264
4256
|
tt,
|
|
4265
4257
|
{
|
|
4266
|
-
name:
|
|
4267
|
-
value:
|
|
4268
|
-
checked:
|
|
4269
|
-
onChange: (b) => o.onChecked(b.target.value,
|
|
4270
|
-
label:
|
|
4271
|
-
description:
|
|
4258
|
+
name: y.name,
|
|
4259
|
+
value: y.id,
|
|
4260
|
+
checked: y.isChecked,
|
|
4261
|
+
onChange: (b) => o.onChecked(b.target.value, y),
|
|
4262
|
+
label: y.name,
|
|
4263
|
+
description: y.description
|
|
4272
4264
|
}
|
|
4273
4265
|
)
|
|
4274
4266
|
}
|
|
@@ -4279,7 +4271,7 @@ const ci = (t) => {
|
|
|
4279
4271
|
]
|
|
4280
4272
|
}
|
|
4281
4273
|
);
|
|
4282
|
-
},
|
|
4274
|
+
}, fi = ({
|
|
4283
4275
|
position: t = "vertical",
|
|
4284
4276
|
size: r = "md",
|
|
4285
4277
|
fullWidth: n = !1,
|
|
@@ -4319,32 +4311,32 @@ const ci = (t) => {
|
|
|
4319
4311
|
...a,
|
|
4320
4312
|
isChecked: l.radioIsChecked === a.id
|
|
4321
4313
|
})),
|
|
4322
|
-
render: ({ value: a, id: s, isChecked: h, subInput: f, label: g, description:
|
|
4314
|
+
render: ({ value: a, id: s, isChecked: h, subInput: f, label: g, description: p }) => /* @__PURE__ */ d(u, { gap: "xs", customMaxWidth: i, children: [
|
|
4323
4315
|
/* @__PURE__ */ e(
|
|
4324
|
-
|
|
4316
|
+
Jt,
|
|
4325
4317
|
{
|
|
4326
4318
|
id: `${s.toString()}-${a}`,
|
|
4327
4319
|
name: l.groupName || g,
|
|
4328
4320
|
label: g,
|
|
4329
4321
|
value: a,
|
|
4330
4322
|
checked: h,
|
|
4331
|
-
onChange: (
|
|
4323
|
+
onChange: (y) => l.onChecked({
|
|
4332
4324
|
id: s,
|
|
4333
|
-
label:
|
|
4334
|
-
value:
|
|
4325
|
+
label: y.target.name,
|
|
4326
|
+
value: y.target.value
|
|
4335
4327
|
}),
|
|
4336
4328
|
disabled: l.disableAll
|
|
4337
4329
|
},
|
|
4338
4330
|
s
|
|
4339
4331
|
),
|
|
4340
|
-
|
|
4332
|
+
p && /* @__PURE__ */ e(
|
|
4341
4333
|
C,
|
|
4342
4334
|
{
|
|
4343
4335
|
color: "gray-500",
|
|
4344
4336
|
style: {
|
|
4345
4337
|
marginLeft: 28
|
|
4346
4338
|
},
|
|
4347
|
-
children:
|
|
4339
|
+
children: p
|
|
4348
4340
|
}
|
|
4349
4341
|
),
|
|
4350
4342
|
f
|
|
@@ -4357,7 +4349,7 @@ const ci = (t) => {
|
|
|
4357
4349
|
]
|
|
4358
4350
|
}
|
|
4359
4351
|
);
|
|
4360
|
-
},
|
|
4352
|
+
}, gi = ({
|
|
4361
4353
|
size: t = "md",
|
|
4362
4354
|
direction: r = "vertical",
|
|
4363
4355
|
requiredTitle: n = "(Required)",
|
|
@@ -4427,7 +4419,7 @@ const ci = (t) => {
|
|
|
4427
4419
|
),
|
|
4428
4420
|
/* @__PURE__ */ d($, { gap: "xs", children: [
|
|
4429
4421
|
/* @__PURE__ */ e(
|
|
4430
|
-
|
|
4422
|
+
Ut,
|
|
4431
4423
|
{
|
|
4432
4424
|
ref: i.inputRef,
|
|
4433
4425
|
size: t,
|
|
@@ -4440,7 +4432,7 @@ const ci = (t) => {
|
|
|
4440
4432
|
]
|
|
4441
4433
|
}
|
|
4442
4434
|
);
|
|
4443
|
-
},
|
|
4435
|
+
}, mi = ({
|
|
4444
4436
|
size: t = "md",
|
|
4445
4437
|
direction: r = "vertical",
|
|
4446
4438
|
requiredTitle: n = "(Required)",
|
|
@@ -4510,7 +4502,7 @@ const ci = (t) => {
|
|
|
4510
4502
|
}
|
|
4511
4503
|
),
|
|
4512
4504
|
/* @__PURE__ */ e(
|
|
4513
|
-
|
|
4505
|
+
kt,
|
|
4514
4506
|
{
|
|
4515
4507
|
checked: o.checked,
|
|
4516
4508
|
onChange: o.onChange,
|
|
@@ -4522,15 +4514,15 @@ const ci = (t) => {
|
|
|
4522
4514
|
]
|
|
4523
4515
|
}
|
|
4524
4516
|
);
|
|
4525
|
-
},
|
|
4517
|
+
}, pi = ({
|
|
4526
4518
|
variant: t = "primary",
|
|
4527
4519
|
size: r = "md",
|
|
4528
4520
|
...n
|
|
4529
4521
|
}) => {
|
|
4530
|
-
const l =
|
|
4531
|
-
var h, f, g,
|
|
4522
|
+
const l = qt(), i = (a) => {
|
|
4523
|
+
var h, f, g, p, y, b;
|
|
4532
4524
|
if (!a) return;
|
|
4533
|
-
const s = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (f = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : f[600] : t === "secondary-primary" ? (
|
|
4525
|
+
const s = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (f = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : f[600] : t === "secondary-primary" ? (p = (g = l == null ? void 0 : l.computed) == null ? void 0 : g.blue) == null ? void 0 : p[700] : (b = (y = l == null ? void 0 : l.computed) == null ? void 0 : y.gray) == null ? void 0 : b[50];
|
|
4534
4526
|
return /* @__PURE__ */ e(k, { name: a, size: r, style: { color: s } });
|
|
4535
4527
|
}, o = () => {
|
|
4536
4528
|
var s, h, f, g;
|
|
@@ -4567,7 +4559,7 @@ const ci = (t) => {
|
|
|
4567
4559
|
children: o()
|
|
4568
4560
|
}
|
|
4569
4561
|
);
|
|
4570
|
-
},
|
|
4562
|
+
}, yi = (t) => /* @__PURE__ */ e(
|
|
4571
4563
|
me.H5,
|
|
4572
4564
|
{
|
|
4573
4565
|
props: {
|
|
@@ -4575,7 +4567,7 @@ const ci = (t) => {
|
|
|
4575
4567
|
},
|
|
4576
4568
|
children: t.title
|
|
4577
4569
|
}
|
|
4578
|
-
),
|
|
4570
|
+
), xi = ({
|
|
4579
4571
|
size: t = "md",
|
|
4580
4572
|
direction: r = "vertical",
|
|
4581
4573
|
requiredTitle: n = "(Required)",
|
|
@@ -4651,7 +4643,7 @@ const ci = (t) => {
|
|
|
4651
4643
|
width: r === "horizontal" && i.customWidth ? i.customWidth : r === "horizontal" ? "343px" : ""
|
|
4652
4644
|
},
|
|
4653
4645
|
children: /* @__PURE__ */ e(
|
|
4654
|
-
|
|
4646
|
+
It,
|
|
4655
4647
|
{
|
|
4656
4648
|
size: t,
|
|
4657
4649
|
...i.inputProps,
|
|
@@ -4666,7 +4658,7 @@ const ci = (t) => {
|
|
|
4666
4658
|
}
|
|
4667
4659
|
);
|
|
4668
4660
|
};
|
|
4669
|
-
async function
|
|
4661
|
+
async function Ci(t, r) {
|
|
4670
4662
|
const n = new Image();
|
|
4671
4663
|
n.src = t, await new Promise((o, a) => {
|
|
4672
4664
|
n.onload = o, n.onerror = a;
|
|
@@ -4693,7 +4685,7 @@ async function pi(t, r) {
|
|
|
4693
4685
|
}, "image/png");
|
|
4694
4686
|
});
|
|
4695
4687
|
}
|
|
4696
|
-
const
|
|
4688
|
+
const Ct = {
|
|
4697
4689
|
"1:1": 1,
|
|
4698
4690
|
"4:3": 4 / 3,
|
|
4699
4691
|
"16:9": 16 / 9,
|
|
@@ -4702,7 +4694,7 @@ const xt = {
|
|
|
4702
4694
|
"2:3": 2 / 3,
|
|
4703
4695
|
"3:2": 3 / 2,
|
|
4704
4696
|
"32:9": 32 / 9
|
|
4705
|
-
},
|
|
4697
|
+
}, Di = Et(
|
|
4706
4698
|
({
|
|
4707
4699
|
handleUpload: t,
|
|
4708
4700
|
urlImage: r,
|
|
@@ -4715,7 +4707,7 @@ const xt = {
|
|
|
4715
4707
|
maxFileSize: h = 2,
|
|
4716
4708
|
onError: f
|
|
4717
4709
|
}, g) => {
|
|
4718
|
-
const
|
|
4710
|
+
const p = ee("md"), [y, b] = B(!1), [H, D] = B(null), [I, Z] = B(!1), [j, J] = B({ x: 0, y: 0 }), [M, fe] = B(1), [G, z] = B(null);
|
|
4719
4711
|
_(() => {
|
|
4720
4712
|
r === null && i(null);
|
|
4721
4713
|
}, [r]);
|
|
@@ -4728,14 +4720,14 @@ const xt = {
|
|
|
4728
4720
|
var de;
|
|
4729
4721
|
const V = (de = O.target.files) == null ? void 0 : de[0];
|
|
4730
4722
|
if (!V) return;
|
|
4731
|
-
const
|
|
4732
|
-
|
|
4733
|
-
D(
|
|
4734
|
-
},
|
|
4723
|
+
const Y = new FileReader();
|
|
4724
|
+
Y.onload = () => {
|
|
4725
|
+
D(Y.result), Z(!0);
|
|
4726
|
+
}, Y.readAsDataURL(V);
|
|
4735
4727
|
}, ce = async () => {
|
|
4736
|
-
if (!(!H || !
|
|
4728
|
+
if (!(!H || !G))
|
|
4737
4729
|
try {
|
|
4738
|
-
const O = await
|
|
4730
|
+
const O = await Ci(H, G);
|
|
4739
4731
|
if (h && O.size > h * 1024 * 1024) {
|
|
4740
4732
|
f == null || f(`Ukuran file maksimal ${h}MB`);
|
|
4741
4733
|
return;
|
|
@@ -4749,15 +4741,15 @@ const xt = {
|
|
|
4749
4741
|
}, U = le(null), ae = () => {
|
|
4750
4742
|
U.current && U.current.click();
|
|
4751
4743
|
};
|
|
4752
|
-
|
|
4744
|
+
Yt(g, () => ({
|
|
4753
4745
|
openFileDialog: () => {
|
|
4754
4746
|
var O;
|
|
4755
4747
|
(O = U.current) == null || O.click();
|
|
4756
4748
|
}
|
|
4757
4749
|
}));
|
|
4758
|
-
const se = parseInt(o, 10), re =
|
|
4759
|
-
let
|
|
4760
|
-
return re >= 1 ? (q = se,
|
|
4750
|
+
const se = parseInt(o, 10), re = Ct[a];
|
|
4751
|
+
let Q, q;
|
|
4752
|
+
return re >= 1 ? (q = se, Q = se * re) : (Q = se, q = se / re), /* @__PURE__ */ d(
|
|
4761
4753
|
u,
|
|
4762
4754
|
{
|
|
4763
4755
|
display: "flex",
|
|
@@ -4771,7 +4763,7 @@ const xt = {
|
|
|
4771
4763
|
align: "center",
|
|
4772
4764
|
justify: "center",
|
|
4773
4765
|
style: {
|
|
4774
|
-
width: s != null && s.fullWidth ? "100%" : `${
|
|
4766
|
+
width: s != null && s.fullWidth ? "100%" : `${Q}px`,
|
|
4775
4767
|
height: s != null && s.fullWidth ? "auto" : `${q}px`,
|
|
4776
4768
|
aspectRatio: re,
|
|
4777
4769
|
flexShrink: 0
|
|
@@ -4822,7 +4814,7 @@ const xt = {
|
|
|
4822
4814
|
style: {
|
|
4823
4815
|
inset: 0,
|
|
4824
4816
|
backgroundColor: "var(--sa-color-black-alpha-a30, #080f214a)",
|
|
4825
|
-
opacity:
|
|
4817
|
+
opacity: y ? 1 : 0,
|
|
4826
4818
|
transition: "opacity 0.3s ease-in-out"
|
|
4827
4819
|
},
|
|
4828
4820
|
onClick: ae,
|
|
@@ -4892,7 +4884,7 @@ const xt = {
|
|
|
4892
4884
|
isShow: I,
|
|
4893
4885
|
onHide: () => Z(!1),
|
|
4894
4886
|
style: {
|
|
4895
|
-
minWidth:
|
|
4887
|
+
minWidth: p ? a === "1:1" ? "20rem" : Q * 2 : "100%"
|
|
4896
4888
|
},
|
|
4897
4889
|
children: [
|
|
4898
4890
|
/* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(
|
|
@@ -4905,13 +4897,13 @@ const xt = {
|
|
|
4905
4897
|
backgroundColor: "gray-100"
|
|
4906
4898
|
},
|
|
4907
4899
|
children: H && /* @__PURE__ */ e(
|
|
4908
|
-
|
|
4900
|
+
Kt,
|
|
4909
4901
|
{
|
|
4910
4902
|
image: H,
|
|
4911
4903
|
crop: j,
|
|
4912
4904
|
zoom: M,
|
|
4913
|
-
aspect: a ?
|
|
4914
|
-
onCropChange:
|
|
4905
|
+
aspect: a ? Ct[a] : void 0,
|
|
4906
|
+
onCropChange: J,
|
|
4915
4907
|
onZoomChange: fe,
|
|
4916
4908
|
onCropComplete: K,
|
|
4917
4909
|
objectFit: "contain",
|
|
@@ -4932,7 +4924,7 @@ const xt = {
|
|
|
4932
4924
|
}
|
|
4933
4925
|
);
|
|
4934
4926
|
}
|
|
4935
|
-
),
|
|
4927
|
+
), bi = ({
|
|
4936
4928
|
size: t = "md",
|
|
4937
4929
|
direction: r = "vertical",
|
|
4938
4930
|
requiredTitle: n = "(Required)",
|
|
@@ -5002,13 +4994,13 @@ const xt = {
|
|
|
5002
4994
|
}
|
|
5003
4995
|
),
|
|
5004
4996
|
/* @__PURE__ */ d($, { gap: "xs", children: [
|
|
5005
|
-
/* @__PURE__ */ e(
|
|
4997
|
+
/* @__PURE__ */ e(Di, { ...o.inputProps }),
|
|
5006
4998
|
!a && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
|
|
5007
4999
|
] })
|
|
5008
5000
|
]
|
|
5009
5001
|
}
|
|
5010
5002
|
);
|
|
5011
|
-
},
|
|
5003
|
+
}, vi = ({
|
|
5012
5004
|
size: t = "md",
|
|
5013
5005
|
direction: r = "vertical",
|
|
5014
5006
|
requiredTitle: n = "(Required)",
|
|
@@ -5080,7 +5072,7 @@ const xt = {
|
|
|
5080
5072
|
]
|
|
5081
5073
|
}
|
|
5082
5074
|
);
|
|
5083
|
-
},
|
|
5075
|
+
}, In = ({
|
|
5084
5076
|
items: t,
|
|
5085
5077
|
id: r,
|
|
5086
5078
|
handleOnUpdate: n,
|
|
@@ -5091,11 +5083,11 @@ const xt = {
|
|
|
5091
5083
|
var g;
|
|
5092
5084
|
const [a, s] = B([]);
|
|
5093
5085
|
_(() => {
|
|
5094
|
-
t && s([...t.map((
|
|
5086
|
+
t && s([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
|
|
5095
5087
|
}, [t]);
|
|
5096
|
-
const h = (g = a.find((
|
|
5088
|
+
const h = (g = a.find((p) => p.id === r)) == null ? void 0 : g.isActive, f = ze(() => {
|
|
5097
5089
|
s(
|
|
5098
|
-
(
|
|
5090
|
+
(p) => p.map((y) => y.id === r ? { ...y, isActive: !y.isActive } : y)
|
|
5099
5091
|
), n && n(!h);
|
|
5100
5092
|
}, [r, n, h]);
|
|
5101
5093
|
return /* @__PURE__ */ e(
|
|
@@ -5107,7 +5099,7 @@ const xt = {
|
|
|
5107
5099
|
width: l
|
|
5108
5100
|
},
|
|
5109
5101
|
children: i && /* @__PURE__ */ e(
|
|
5110
|
-
|
|
5102
|
+
kt,
|
|
5111
5103
|
{
|
|
5112
5104
|
disabled: o,
|
|
5113
5105
|
checked: h,
|
|
@@ -5117,20 +5109,20 @@ const xt = {
|
|
|
5117
5109
|
)
|
|
5118
5110
|
}
|
|
5119
5111
|
);
|
|
5120
|
-
},
|
|
5121
|
-
InputText:
|
|
5122
|
-
InputDropdown:
|
|
5123
|
-
InputSingleFile:
|
|
5124
|
-
CheckBoxOptions:
|
|
5125
|
-
RadioOptions:
|
|
5126
|
-
InputTextArea:
|
|
5127
|
-
ToggleForm:
|
|
5128
|
-
ActionButton:
|
|
5129
|
-
FormTitle:
|
|
5130
|
-
InputDate:
|
|
5131
|
-
InputImgFile:
|
|
5132
|
-
Custom:
|
|
5133
|
-
},
|
|
5112
|
+
}, Tn = {
|
|
5113
|
+
InputText: Xr,
|
|
5114
|
+
InputDropdown: Kr,
|
|
5115
|
+
InputSingleFile: hi,
|
|
5116
|
+
CheckBoxOptions: ui,
|
|
5117
|
+
RadioOptions: fi,
|
|
5118
|
+
InputTextArea: gi,
|
|
5119
|
+
ToggleForm: mi,
|
|
5120
|
+
ActionButton: pi,
|
|
5121
|
+
FormTitle: yi,
|
|
5122
|
+
InputDate: xi,
|
|
5123
|
+
InputImgFile: bi,
|
|
5124
|
+
Custom: vi
|
|
5125
|
+
}, wi = ({ customBottom: t }) => {
|
|
5134
5126
|
const [r, n] = B(!1), l = () => {
|
|
5135
5127
|
window.scrollY > window.screenY ? n(!0) : n(!1);
|
|
5136
5128
|
}, i = () => {
|
|
@@ -5180,7 +5172,7 @@ const xt = {
|
|
|
5180
5172
|
)
|
|
5181
5173
|
}
|
|
5182
5174
|
);
|
|
5183
|
-
},
|
|
5175
|
+
}, On = ({ pageLayout: t, children: r }) => {
|
|
5184
5176
|
const n = ee("lg");
|
|
5185
5177
|
return /* @__PURE__ */ d(
|
|
5186
5178
|
u,
|
|
@@ -5219,7 +5211,7 @@ const xt = {
|
|
|
5219
5211
|
]
|
|
5220
5212
|
}
|
|
5221
5213
|
);
|
|
5222
|
-
},
|
|
5214
|
+
}, Nn = ({
|
|
5223
5215
|
children: t,
|
|
5224
5216
|
withScrollToTopButton: r = !1,
|
|
5225
5217
|
scrollToTopButtonProps: n,
|
|
@@ -5246,7 +5238,7 @@ const xt = {
|
|
|
5246
5238
|
borderWidth: "border-t",
|
|
5247
5239
|
children: [
|
|
5248
5240
|
r && /* @__PURE__ */ e(
|
|
5249
|
-
|
|
5241
|
+
wi,
|
|
5250
5242
|
{
|
|
5251
5243
|
...n,
|
|
5252
5244
|
customBottom: (n == null ? void 0 : n.customBottom) || "5.7rem"
|
|
@@ -5255,13 +5247,13 @@ const xt = {
|
|
|
5255
5247
|
t
|
|
5256
5248
|
]
|
|
5257
5249
|
}
|
|
5258
|
-
) }),
|
|
5250
|
+
) }), Zn = ({ fields: t }) => /* @__PURE__ */ e(u, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
|
|
5259
5251
|
st,
|
|
5260
5252
|
{
|
|
5261
5253
|
of: t,
|
|
5262
|
-
render: (r, n) => /* @__PURE__ */ e(
|
|
5254
|
+
render: (r, n) => /* @__PURE__ */ e(ki, { ...r }, n)
|
|
5263
5255
|
}
|
|
5264
|
-
) }),
|
|
5256
|
+
) }), ki = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ d(u, { display: "flex", direction: "column", gap: "sm", children: [
|
|
5265
5257
|
n ? /* @__PURE__ */ d(u, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
|
|
5266
5258
|
/* @__PURE__ */ e(k, { name: n, color: "subtle" }),
|
|
5267
5259
|
/* @__PURE__ */ e(C, { color: "gray-500", variant: "sub-h3", children: t })
|
|
@@ -5271,8 +5263,8 @@ const xt = {
|
|
|
5271
5263
|
silhouette: "#A7B0AC",
|
|
5272
5264
|
accent: "#78867F"
|
|
5273
5265
|
};
|
|
5274
|
-
function
|
|
5275
|
-
return /* @__PURE__ */ e(
|
|
5266
|
+
function Fi({ width: t, height: r }) {
|
|
5267
|
+
return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ d(
|
|
5276
5268
|
"svg",
|
|
5277
5269
|
{
|
|
5278
5270
|
width: t || "100",
|
|
@@ -5414,7 +5406,7 @@ function wi({ width: t, height: r }) {
|
|
|
5414
5406
|
}
|
|
5415
5407
|
) });
|
|
5416
5408
|
}
|
|
5417
|
-
const
|
|
5409
|
+
const jn = ({
|
|
5418
5410
|
title: t = "create",
|
|
5419
5411
|
children: r,
|
|
5420
5412
|
onClickAction: n,
|
|
@@ -5429,9 +5421,9 @@ const Nn = ({
|
|
|
5429
5421
|
const g = () => {
|
|
5430
5422
|
switch (l) {
|
|
5431
5423
|
case "primary":
|
|
5432
|
-
return /* @__PURE__ */ e(
|
|
5424
|
+
return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { primary: !0, onClick: n, children: h || t }) });
|
|
5433
5425
|
case "secondary":
|
|
5434
|
-
return /* @__PURE__ */ e(
|
|
5426
|
+
return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { secondary: !0, iconLeft: o, onClick: n, children: i ? /* @__PURE__ */ e(
|
|
5435
5427
|
C,
|
|
5436
5428
|
{
|
|
5437
5429
|
fontFamily: "Poppins",
|
|
@@ -5442,9 +5434,9 @@ const Nn = ({
|
|
|
5442
5434
|
}
|
|
5443
5435
|
) : t }) : /* @__PURE__ */ e(R, { secondary: !0, onClick: n, children: h || t }) });
|
|
5444
5436
|
case "success":
|
|
5445
|
-
return /* @__PURE__ */ e(
|
|
5437
|
+
return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { success: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { success: !0, onClick: n, children: h || t }) });
|
|
5446
5438
|
default:
|
|
5447
|
-
return /* @__PURE__ */ e(
|
|
5439
|
+
return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { primary: !0, onClick: n, children: h || t }) });
|
|
5448
5440
|
}
|
|
5449
5441
|
};
|
|
5450
5442
|
return /* @__PURE__ */ d(
|
|
@@ -5459,17 +5451,17 @@ const Nn = ({
|
|
|
5459
5451
|
marginBlock: "auto",
|
|
5460
5452
|
customHeight: s,
|
|
5461
5453
|
children: [
|
|
5462
|
-
f || /* @__PURE__ */ e(
|
|
5463
|
-
/* @__PURE__ */ e(u, { children: r.map((
|
|
5454
|
+
f || /* @__PURE__ */ e(Fi, {}),
|
|
5455
|
+
/* @__PURE__ */ e(u, { children: r.map((p, y) => /* @__PURE__ */ e(
|
|
5464
5456
|
me.Body1,
|
|
5465
5457
|
{
|
|
5466
5458
|
props: {
|
|
5467
5459
|
align: "center",
|
|
5468
5460
|
textAlign: "center"
|
|
5469
5461
|
},
|
|
5470
|
-
children:
|
|
5462
|
+
children: y > 2 ? null : p
|
|
5471
5463
|
},
|
|
5472
|
-
|
|
5464
|
+
y
|
|
5473
5465
|
)) }),
|
|
5474
5466
|
a ? g() : null
|
|
5475
5467
|
]
|
|
@@ -5485,8 +5477,8 @@ const Nn = ({
|
|
|
5485
5477
|
c000000: "#000000",
|
|
5486
5478
|
cFFFFFF: "#FFFFFF"
|
|
5487
5479
|
};
|
|
5488
|
-
function
|
|
5489
|
-
return /* @__PURE__ */ e(
|
|
5480
|
+
function Si({ width: t, height: r }) {
|
|
5481
|
+
return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ d(
|
|
5490
5482
|
"svg",
|
|
5491
5483
|
{
|
|
5492
5484
|
width: t,
|
|
@@ -5688,7 +5680,7 @@ function ki({ width: t, height: r }) {
|
|
|
5688
5680
|
}
|
|
5689
5681
|
) });
|
|
5690
5682
|
}
|
|
5691
|
-
function
|
|
5683
|
+
function $n({ onClick: t }) {
|
|
5692
5684
|
const r = ee("md");
|
|
5693
5685
|
return /* @__PURE__ */ d(
|
|
5694
5686
|
u,
|
|
@@ -5700,7 +5692,7 @@ function Zn({ onClick: t }) {
|
|
|
5700
5692
|
justify: "center",
|
|
5701
5693
|
gap: "md",
|
|
5702
5694
|
children: [
|
|
5703
|
-
/* @__PURE__ */ e(
|
|
5695
|
+
/* @__PURE__ */ e(Si, { width: r ? 600 : 300 }),
|
|
5704
5696
|
/* @__PURE__ */ e(
|
|
5705
5697
|
C,
|
|
5706
5698
|
{
|
|
@@ -5745,8 +5737,8 @@ const W = {
|
|
|
5745
5737
|
cF4F4F4: "#F4F4F4",
|
|
5746
5738
|
cFFFFFF: "#FFFFFF"
|
|
5747
5739
|
};
|
|
5748
|
-
function
|
|
5749
|
-
return /* @__PURE__ */ e(
|
|
5740
|
+
function Ei({ width: t, height: r }) {
|
|
5741
|
+
return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ d(
|
|
5750
5742
|
"svg",
|
|
5751
5743
|
{
|
|
5752
5744
|
width: t,
|
|
@@ -5960,7 +5952,7 @@ function Fi({ width: t, height: r }) {
|
|
|
5960
5952
|
}
|
|
5961
5953
|
) });
|
|
5962
5954
|
}
|
|
5963
|
-
function
|
|
5955
|
+
function Un({ onClick: t }) {
|
|
5964
5956
|
const r = ee("md");
|
|
5965
5957
|
return /* @__PURE__ */ d(
|
|
5966
5958
|
u,
|
|
@@ -5972,7 +5964,7 @@ function jn({ onClick: t }) {
|
|
|
5972
5964
|
justify: "center",
|
|
5973
5965
|
gap: "md",
|
|
5974
5966
|
children: [
|
|
5975
|
-
/* @__PURE__ */ e(
|
|
5967
|
+
/* @__PURE__ */ e(Ei, { width: r ? 600 : 300 }),
|
|
5976
5968
|
/* @__PURE__ */ e(C, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
|
|
5977
5969
|
t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
5978
5970
|
]
|
|
@@ -5996,8 +5988,8 @@ const c = {
|
|
|
5996
5988
|
cFFE18B: "#FFE18B",
|
|
5997
5989
|
cFFFFFF: "#FFFFFF"
|
|
5998
5990
|
};
|
|
5999
|
-
function
|
|
6000
|
-
return /* @__PURE__ */ e(
|
|
5991
|
+
function Mi({ width: t, height: r }) {
|
|
5992
|
+
return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ d(
|
|
6001
5993
|
"svg",
|
|
6002
5994
|
{
|
|
6003
5995
|
width: t,
|
|
@@ -6668,7 +6660,7 @@ function Si({ width: t, height: r }) {
|
|
|
6668
6660
|
}
|
|
6669
6661
|
) });
|
|
6670
6662
|
}
|
|
6671
|
-
function
|
|
6663
|
+
function _n({ onClick: t }) {
|
|
6672
6664
|
const r = ee("md");
|
|
6673
6665
|
return /* @__PURE__ */ d(
|
|
6674
6666
|
u,
|
|
@@ -6681,7 +6673,7 @@ function $n({ onClick: t }) {
|
|
|
6681
6673
|
gap: "md",
|
|
6682
6674
|
overflow: "overflow-hidden",
|
|
6683
6675
|
children: [
|
|
6684
|
-
/* @__PURE__ */ e(
|
|
6676
|
+
/* @__PURE__ */ e(Mi, { width: r ? 600 : 300 }),
|
|
6685
6677
|
/* @__PURE__ */ e(
|
|
6686
6678
|
C,
|
|
6687
6679
|
{
|
|
@@ -6705,7 +6697,7 @@ function $n({ onClick: t }) {
|
|
|
6705
6697
|
}
|
|
6706
6698
|
);
|
|
6707
6699
|
}
|
|
6708
|
-
const
|
|
6700
|
+
const Pn = (t) => {
|
|
6709
6701
|
var n, l, i, o, a;
|
|
6710
6702
|
const r = ee("md");
|
|
6711
6703
|
return /* @__PURE__ */ d(
|
|
@@ -6768,7 +6760,7 @@ const Un = (t) => {
|
|
|
6768
6760
|
},
|
|
6769
6761
|
t.key
|
|
6770
6762
|
);
|
|
6771
|
-
},
|
|
6763
|
+
}, qn = te(
|
|
6772
6764
|
({
|
|
6773
6765
|
children: t,
|
|
6774
6766
|
height: r,
|
|
@@ -6781,19 +6773,19 @@ const Un = (t) => {
|
|
|
6781
6773
|
title: h,
|
|
6782
6774
|
titleTag: f,
|
|
6783
6775
|
action: g,
|
|
6784
|
-
actionContainer:
|
|
6785
|
-
containerProps:
|
|
6776
|
+
actionContainer: p,
|
|
6777
|
+
containerProps: y,
|
|
6786
6778
|
bodyProps: b,
|
|
6787
6779
|
headerProps: H = { borderBottom: !0 },
|
|
6788
6780
|
footerProps: D = { borderTop: !0 },
|
|
6789
6781
|
variantTag: I = "info"
|
|
6790
6782
|
}) => {
|
|
6791
|
-
const Z = le(null), [j,
|
|
6783
|
+
const Z = le(null), [j, J] = B("100vh");
|
|
6792
6784
|
_(() => {
|
|
6793
6785
|
const z = () => {
|
|
6794
6786
|
if (Z.current) {
|
|
6795
6787
|
const K = Z.current.getBoundingClientRect().top;
|
|
6796
|
-
|
|
6788
|
+
J(`calc(100vh - ${K}px)`);
|
|
6797
6789
|
}
|
|
6798
6790
|
};
|
|
6799
6791
|
return z(), window.addEventListener("resize", z), () => window.removeEventListener("resize", z);
|
|
@@ -6810,10 +6802,10 @@ const Un = (t) => {
|
|
|
6810
6802
|
gap: "md",
|
|
6811
6803
|
children: [
|
|
6812
6804
|
/* @__PURE__ */ e(u, { children: h ? M() : null }),
|
|
6813
|
-
/* @__PURE__ */ e(u, { ...
|
|
6805
|
+
/* @__PURE__ */ e(u, { ...p, children: g ?? null })
|
|
6814
6806
|
]
|
|
6815
6807
|
}
|
|
6816
|
-
),
|
|
6808
|
+
), G = !!(a || h || g);
|
|
6817
6809
|
return /* @__PURE__ */ d(
|
|
6818
6810
|
u,
|
|
6819
6811
|
{
|
|
@@ -6825,15 +6817,15 @@ const Un = (t) => {
|
|
|
6825
6817
|
paddingInline: i,
|
|
6826
6818
|
bg: "white",
|
|
6827
6819
|
direction: "column",
|
|
6828
|
-
...
|
|
6820
|
+
...y,
|
|
6829
6821
|
style: {
|
|
6830
6822
|
backgroundColor: "var(--sa-background-primary, #ffffff)",
|
|
6831
6823
|
display: "flex",
|
|
6832
6824
|
minHeight: j,
|
|
6833
|
-
...(
|
|
6825
|
+
...(y == null ? void 0 : y.style) ?? {}
|
|
6834
6826
|
},
|
|
6835
6827
|
children: [
|
|
6836
|
-
a !== null &&
|
|
6828
|
+
a !== null && G ? /* @__PURE__ */ e(zt, { ...H, children: fe() }) : null,
|
|
6837
6829
|
/* @__PURE__ */ e(
|
|
6838
6830
|
u,
|
|
6839
6831
|
{
|
|
@@ -6847,12 +6839,12 @@ const Un = (t) => {
|
|
|
6847
6839
|
children: t
|
|
6848
6840
|
}
|
|
6849
6841
|
),
|
|
6850
|
-
s ? /* @__PURE__ */ e(
|
|
6842
|
+
s ? /* @__PURE__ */ e(Vt, { ...D, children: s }) : null
|
|
6851
6843
|
]
|
|
6852
6844
|
}
|
|
6853
6845
|
);
|
|
6854
6846
|
}
|
|
6855
|
-
),
|
|
6847
|
+
), Jn = (t) => {
|
|
6856
6848
|
const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [l, i] = Ge(), o = Je(l.toString());
|
|
6857
6849
|
return {
|
|
6858
6850
|
activeTab: o[n] ? parseInt(o[n]) : r,
|
|
@@ -6865,7 +6857,7 @@ const Un = (t) => {
|
|
|
6865
6857
|
searchQueries: o
|
|
6866
6858
|
};
|
|
6867
6859
|
};
|
|
6868
|
-
function
|
|
6860
|
+
function Gn({
|
|
6869
6861
|
appName: t,
|
|
6870
6862
|
menuConfig: r,
|
|
6871
6863
|
formatTitle: n
|
|
@@ -6886,14 +6878,14 @@ function qn({
|
|
|
6886
6878
|
document.title = (n || s)(a, t);
|
|
6887
6879
|
}, [l.pathname]);
|
|
6888
6880
|
}
|
|
6889
|
-
const
|
|
6890
|
-
const [t, r] = Ge(), n = Je(t.toString()), l =
|
|
6881
|
+
const Qn = () => {
|
|
6882
|
+
const [t, r] = Ge(), n = Je(t.toString()), l = Mt(), i = Te(), o = l.id;
|
|
6891
6883
|
return {
|
|
6892
6884
|
// query params
|
|
6893
6885
|
setSearchParams: r,
|
|
6894
6886
|
searchParams: t,
|
|
6895
6887
|
searchQueries: n,
|
|
6896
|
-
isHasQuery: (g,
|
|
6888
|
+
isHasQuery: (g, p) => t.has(g) && t.get(g) === p,
|
|
6897
6889
|
getQueryParam: (g) => t.get(g),
|
|
6898
6890
|
// route params
|
|
6899
6891
|
getRouteParam: (g) => l[g],
|
|
@@ -6905,24 +6897,24 @@ const Jn = () => {
|
|
|
6905
6897
|
hasId: !!o
|
|
6906
6898
|
};
|
|
6907
6899
|
};
|
|
6908
|
-
function
|
|
6900
|
+
function Yn(t) {
|
|
6909
6901
|
var l, i;
|
|
6910
6902
|
const r = t.decodedAccessToken;
|
|
6911
6903
|
return De(() => {
|
|
6912
6904
|
var h, f;
|
|
6913
6905
|
const o = ((f = (h = r == null ? void 0 : r.access) == null ? void 0 : h.role) == null ? void 0 : f.code) ?? "", a = Object.keys(t.role).reduce(
|
|
6914
|
-
(g,
|
|
6915
|
-
const
|
|
6916
|
-
return { ...g, [
|
|
6906
|
+
(g, p) => {
|
|
6907
|
+
const y = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (b) => b.replace("_", "").toUpperCase())}`;
|
|
6908
|
+
return { ...g, [y]: !1 };
|
|
6917
6909
|
},
|
|
6918
6910
|
{}
|
|
6919
6911
|
);
|
|
6920
6912
|
return {
|
|
6921
|
-
...Object.keys(t.role).reduce((g,
|
|
6922
|
-
const
|
|
6913
|
+
...Object.keys(t.role).reduce((g, p) => {
|
|
6914
|
+
const y = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (b) => b.replace("_", "").toUpperCase())}`;
|
|
6923
6915
|
return {
|
|
6924
6916
|
...g,
|
|
6925
|
-
[
|
|
6917
|
+
[y]: o === t.role[p]
|
|
6926
6918
|
};
|
|
6927
6919
|
}, a),
|
|
6928
6920
|
hasRole: (g) => o === t.role[g],
|
|
@@ -6931,89 +6923,89 @@ function Gn(t) {
|
|
|
6931
6923
|
}, [(i = (l = r == null ? void 0 : r.access) == null ? void 0 : l.role) == null ? void 0 : i.code, t]);
|
|
6932
6924
|
}
|
|
6933
6925
|
export {
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6926
|
+
un as ActionMenu,
|
|
6927
|
+
Zr as AdvanceFilterBar,
|
|
6928
|
+
rn as App,
|
|
6929
|
+
nr as AppComponent,
|
|
6930
|
+
Lt as AppContext,
|
|
6931
|
+
ln as AppLayout,
|
|
6932
|
+
On as AsideBar,
|
|
6933
|
+
cn as AuthLayout,
|
|
6934
|
+
Pr as ColumnFilterDropdown,
|
|
6935
|
+
Pn as ConfirmationDialog,
|
|
6936
|
+
Gr as DataTable,
|
|
6945
6937
|
T as DecisionWrapper,
|
|
6946
6938
|
st as EachUtils,
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6939
|
+
jn as EmptyStatePage,
|
|
6940
|
+
Nr as FilterDrawer,
|
|
6941
|
+
Nn as FloatingFooter,
|
|
6942
|
+
Un as ForbiddenPage,
|
|
6943
|
+
Tn as Form,
|
|
6944
|
+
qn as FullSection,
|
|
6945
|
+
an as HorizontalField,
|
|
6946
|
+
di as InputFile,
|
|
6947
|
+
Di as InputImage,
|
|
6948
|
+
sn as ModalDialog,
|
|
6949
|
+
on as ModuleSwitcher,
|
|
6950
|
+
or as ModuleSwitcherModal,
|
|
6951
|
+
$n as NotFoundPage,
|
|
6952
|
+
dn as PageLayout,
|
|
6953
|
+
Ht as Pressable,
|
|
6954
|
+
mr as RightDrawer,
|
|
6955
|
+
wi as ScrollToTopButton,
|
|
6956
|
+
hn as Section,
|
|
6957
|
+
Vt as SectionFooter,
|
|
6958
|
+
zt as SectionHeader,
|
|
6959
|
+
_n as ServerErrorPage,
|
|
6960
|
+
rr as SidebarBadgesProvider,
|
|
6961
|
+
lr as SidebarHeaderSlot,
|
|
6962
|
+
_r as TableFooter,
|
|
6963
|
+
$r as TableHeader,
|
|
6964
|
+
xn as TableSection,
|
|
6965
|
+
jr as TableWrapper,
|
|
6966
|
+
In as ToggleStatus,
|
|
6975
6967
|
me as Typography,
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6968
|
+
Zn as VerticalField,
|
|
6969
|
+
nn as clearModuleSelection,
|
|
6970
|
+
Cn as createInitialFromUserName,
|
|
6971
|
+
kn as cssVars,
|
|
6972
|
+
En as formHasChanged,
|
|
6973
|
+
wn as formatDate,
|
|
6974
|
+
ri as formatDateToIndonesian,
|
|
6975
|
+
bn as formatRupiah,
|
|
6976
|
+
pn as getDateFilterValue,
|
|
6977
|
+
mn as getDateRangeFilterValue,
|
|
6978
|
+
vn as getInitials,
|
|
6979
|
+
fn as getValueDropdownMultipleFilter,
|
|
6980
|
+
gn as getValueRadioFilter,
|
|
6981
|
+
Or as getValueSearch,
|
|
6990
6982
|
Ke as getValuesFilter,
|
|
6991
6983
|
yt as handleChangeFilter,
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
6984
|
+
Vn as handleOnScroll,
|
|
6985
|
+
Rn as isEmail,
|
|
6986
|
+
yn as isFilterActive,
|
|
6987
|
+
Ln as isOnlyLettersAndSpaces,
|
|
6988
|
+
Mn as isPhoneNumber,
|
|
6989
|
+
Hn as isSlug,
|
|
6990
|
+
Fn as oneDayInMs,
|
|
6991
|
+
Dn as parseIndonesianDateToDate,
|
|
6992
|
+
zn as preventNonCoordinateInput,
|
|
6993
|
+
An as preventNonNumberAndDecimalInput,
|
|
6994
|
+
Wn as preventNonNumberInput,
|
|
6995
|
+
Bn as preventNumberInput,
|
|
6996
|
+
zr as resolveDateRangeValueToString,
|
|
6997
|
+
Vr as resolveDateValueToString,
|
|
6998
|
+
Rr as resolveDropdownValueToString,
|
|
6999
|
+
Hr as resolveRadioValueToString,
|
|
7008
7000
|
Xe as resolveSidebarBadge,
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7001
|
+
Sn as textWidth,
|
|
7002
|
+
Wt as useApp,
|
|
7003
|
+
tr as useAppState,
|
|
7004
|
+
Yn as useAuthRole,
|
|
7005
|
+
Gn as useDynamicTitle,
|
|
7006
|
+
Rt as useModuleSelection,
|
|
7015
7007
|
at as useRouteInfo,
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7008
|
+
Qn as useRouteParams,
|
|
7009
|
+
ir as useSidebarBadges,
|
|
7010
|
+
Jn as useTabState
|
|
7019
7011
|
};
|