@starasia/admin 1.4.5 → 1.4.6
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.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export * from "@starasia/alert";
|
|
2
|
-
import { Badges as
|
|
2
|
+
import { Badges as DA } from "@starasia/badges";
|
|
3
3
|
export * from "@starasia/badges";
|
|
4
|
-
import { Box as
|
|
4
|
+
import { Box as a } from "@starasia/box";
|
|
5
5
|
export * from "@starasia/box";
|
|
6
6
|
import { Button as O } from "@starasia/button";
|
|
7
7
|
export * from "@starasia/button";
|
|
8
8
|
export * from "@starasia/card";
|
|
9
9
|
import { StarasiaDate as ne } from "@starasia/date";
|
|
10
10
|
export * from "@starasia/date";
|
|
11
|
-
import { Dialog as
|
|
11
|
+
import { Dialog as IA, DialogTitle as dA, DialogBody as kA, DialogFooter as GA } from "@starasia/dialog";
|
|
12
12
|
export * from "@starasia/dialog";
|
|
13
|
-
import { Drawer as
|
|
13
|
+
import { Drawer as be } from "@starasia/drawer";
|
|
14
14
|
export * from "@starasia/drawer";
|
|
15
15
|
import { Dropdown as OA } from "@starasia/dropdown";
|
|
16
16
|
export * from "@starasia/dropdown";
|
|
@@ -20,17 +20,17 @@ import { searchParamsToObject as YA } from "@starasia/http";
|
|
|
20
20
|
export * from "@starasia/http";
|
|
21
21
|
import { Input as pA } from "@starasia/input";
|
|
22
22
|
export * from "@starasia/input";
|
|
23
|
-
import { Menu as ce, MenuButton as
|
|
23
|
+
import { Menu as ce, MenuButton as fA, MenuLists as ge, MenuHeading as Le, MenuBody as se, MenuFooter as Ge } from "@starasia/menu";
|
|
24
24
|
export * from "@starasia/menu";
|
|
25
|
-
import { Pagination as
|
|
25
|
+
import { Pagination as Oe } from "@starasia/pagination";
|
|
26
26
|
export * from "@starasia/pagination";
|
|
27
27
|
export * from "@starasia/storage";
|
|
28
|
-
import { Tr as hA, Td as BA, Table as ae, Thead as
|
|
28
|
+
import { Tr as hA, Td as BA, Table as ae, Thead as Ye, Th as VA, Tbody as pe } from "@starasia/table";
|
|
29
29
|
export * from "@starasia/table";
|
|
30
30
|
export * from "@starasia/tabs";
|
|
31
|
-
import { Textarea as
|
|
31
|
+
import { Textarea as je } from "@starasia/textarea";
|
|
32
32
|
export * from "@starasia/textarea";
|
|
33
|
-
import { useTheme as
|
|
33
|
+
import { useTheme as Fe, ThemeProvider as XA, useRadius as Ne, useColor as WA } from "@starasia/theme";
|
|
34
34
|
export * from "@starasia/theme";
|
|
35
35
|
export * from "@starasia/toast";
|
|
36
36
|
import { Toggle as Ce } from "@starasia/toggle";
|
|
@@ -39,7 +39,7 @@ import { Tooltip as rA } from "@starasia/tooltip";
|
|
|
39
39
|
export * from "@starasia/tooltip";
|
|
40
40
|
import { Checkbox as bA } from "@starasia/checkbox";
|
|
41
41
|
export * from "@starasia/checkbox";
|
|
42
|
-
import { Radio as
|
|
42
|
+
import { Radio as ze } from "@starasia/radio";
|
|
43
43
|
export * from "@starasia/radio";
|
|
44
44
|
import { Text as Q } from "@starasia/text";
|
|
45
45
|
export * from "@starasia/text";
|
|
@@ -54,11 +54,11 @@ export * from "@starasia/story-record";
|
|
|
54
54
|
import { Skeleton as sA } from "@starasia/skeleton";
|
|
55
55
|
export * from "@starasia/skeleton";
|
|
56
56
|
import { jsx as A, jsxs as g, Fragment as U } from "react/jsx-runtime";
|
|
57
|
-
import aA, { createContext as Be, useState as
|
|
57
|
+
import aA, { createContext as Be, useState as L, useContext as we, useCallback as uA, useMemo as cA, memo as _, useEffect as R, useRef as iA, useLayoutEffect as qA, isValidElement as de, forwardRef as RA, Children as Ke, useImperativeHandle as Ze } from "react";
|
|
58
58
|
import "@starasia/css/dist/style.css";
|
|
59
|
-
import { useSearchParams as jA, useNavigate as vA, useLocation as
|
|
60
|
-
import
|
|
61
|
-
const
|
|
59
|
+
import { useSearchParams as jA, useNavigate as vA, useLocation as EA, Outlet as $A, Link as He, useParams as Qe } from "react-router";
|
|
60
|
+
import Je from "react-easy-crop";
|
|
61
|
+
const qe = {
|
|
62
62
|
menus: [],
|
|
63
63
|
menuBottom: void 0,
|
|
64
64
|
logo: "",
|
|
@@ -66,8 +66,8 @@ const He = {
|
|
|
66
66
|
userData: null,
|
|
67
67
|
setUserData: () => {
|
|
68
68
|
}
|
|
69
|
-
}, he = Be(
|
|
70
|
-
const [i, t] =
|
|
69
|
+
}, he = Be(qe), ue = () => we(he), Te = (e) => {
|
|
70
|
+
const [i, t] = L(
|
|
71
71
|
(e == null ? void 0 : e.initialUserData) || null
|
|
72
72
|
);
|
|
73
73
|
return {
|
|
@@ -82,8 +82,8 @@ const He = {
|
|
|
82
82
|
},
|
|
83
83
|
clearBadge: () => {
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
86
|
-
const [i, t] =
|
|
85
|
+
}), Ue = ({ children: e }) => {
|
|
86
|
+
const [i, t] = L({}), o = uA(
|
|
87
87
|
(c) => {
|
|
88
88
|
t(
|
|
89
89
|
(s) => typeof c == "function" ? c(s) : c
|
|
@@ -92,27 +92,27 @@ const He = {
|
|
|
92
92
|
[]
|
|
93
93
|
), r = uA(
|
|
94
94
|
(c, s) => {
|
|
95
|
-
t((
|
|
96
|
-
const d = typeof s == "function" ? s(
|
|
97
|
-
return { ...
|
|
95
|
+
t((C) => {
|
|
96
|
+
const d = typeof s == "function" ? s(C[c]) : s;
|
|
97
|
+
return { ...C, [c]: d };
|
|
98
98
|
});
|
|
99
99
|
},
|
|
100
100
|
[]
|
|
101
101
|
), n = uA((c) => {
|
|
102
102
|
t((s) => {
|
|
103
103
|
if (!(c in s)) return s;
|
|
104
|
-
const
|
|
105
|
-
return delete
|
|
104
|
+
const C = { ...s };
|
|
105
|
+
return delete C[c], C;
|
|
106
106
|
});
|
|
107
107
|
}, []), l = cA(
|
|
108
108
|
() => ({ badges: i, setBadge: r, setBadges: o, clearBadge: n }),
|
|
109
109
|
[i, r, o, n]
|
|
110
110
|
);
|
|
111
111
|
return /* @__PURE__ */ A(De.Provider, { value: l, children: e });
|
|
112
|
-
},
|
|
112
|
+
}, We = () => we(De), _A = (e, i) => {
|
|
113
113
|
const t = i !== void 0 ? i : e;
|
|
114
114
|
return t == null ? null : typeof t == "string" || typeof t == "number" ? { value: t } : t;
|
|
115
|
-
},
|
|
115
|
+
}, Re = ({
|
|
116
116
|
router: e,
|
|
117
117
|
menus: i = [],
|
|
118
118
|
menuBottom: t,
|
|
@@ -121,7 +121,7 @@ const He = {
|
|
|
121
121
|
initialUserData: n,
|
|
122
122
|
theme: l
|
|
123
123
|
}) => {
|
|
124
|
-
const c =
|
|
124
|
+
const c = Te({ initialUserData: n }), { theme: s } = Fe();
|
|
125
125
|
return /* @__PURE__ */ A(
|
|
126
126
|
he.Provider,
|
|
127
127
|
{
|
|
@@ -133,11 +133,11 @@ const He = {
|
|
|
133
133
|
setUserData: c.setUserData,
|
|
134
134
|
menuBottom: t
|
|
135
135
|
},
|
|
136
|
-
children: /* @__PURE__ */ A(
|
|
136
|
+
children: /* @__PURE__ */ A(Ue, { children: l ? /* @__PURE__ */ A(XA, { value: l, children: e }) : s ? /* @__PURE__ */ A(XA, { value: s, children: e }) : e })
|
|
137
137
|
}
|
|
138
138
|
);
|
|
139
|
-
}, er = _(
|
|
140
|
-
function
|
|
139
|
+
}, er = _(Re);
|
|
140
|
+
function ve({
|
|
141
141
|
collapsed: e = !1,
|
|
142
142
|
children: i
|
|
143
143
|
}) {
|
|
@@ -182,14 +182,14 @@ function Ae() {
|
|
|
182
182
|
const i = Number(e);
|
|
183
183
|
return Number.isFinite(i) ? i : null;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Pe(e) {
|
|
186
186
|
typeof window > "u" || (e === null ? window.localStorage.removeItem(LA) : window.localStorage.setItem(LA, String(e)), window.dispatchEvent(new CustomEvent(TA, { detail: e })));
|
|
187
187
|
}
|
|
188
188
|
function Ie() {
|
|
189
|
-
const [e, i] =
|
|
189
|
+
const [e, i] = L(
|
|
190
190
|
() => Ae()
|
|
191
191
|
);
|
|
192
|
-
return
|
|
192
|
+
return R(() => {
|
|
193
193
|
const o = () => {
|
|
194
194
|
i(Ae());
|
|
195
195
|
}, r = (n) => {
|
|
@@ -199,10 +199,10 @@ function Ie() {
|
|
|
199
199
|
window.removeEventListener(TA, o), window.removeEventListener("storage", r);
|
|
200
200
|
};
|
|
201
201
|
}, []), { selectedGroupId: e, setSelectedGroupId: (o) => {
|
|
202
|
-
|
|
202
|
+
Pe(o), i(o);
|
|
203
203
|
} };
|
|
204
204
|
}
|
|
205
|
-
let
|
|
205
|
+
let yA = 0, CA = !1;
|
|
206
206
|
const ee = {
|
|
207
207
|
width: "100%",
|
|
208
208
|
display: "flex",
|
|
@@ -230,103 +230,103 @@ function ir({
|
|
|
230
230
|
loadingComponent: l,
|
|
231
231
|
sidebarHeaderContent: c,
|
|
232
232
|
headerActions: s,
|
|
233
|
-
profileRole:
|
|
233
|
+
profileRole: C,
|
|
234
234
|
profileMenuButtons: d,
|
|
235
235
|
profileMenuItems: w,
|
|
236
236
|
logoutButton: B
|
|
237
237
|
}) {
|
|
238
|
-
const [
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
238
|
+
const [D] = jA(), b = D.get("embed") === "true", h = ue(), { badges: F } = We(), N = vA(), Z = EA(), E = !X("md"), [I, W] = L(!1), [x, P] = L(!1), [$, K] = L(!1), [M, G] = L(/* @__PURE__ */ new Set()), { selectedGroupId: k, setSelectedGroupId: u } = Ie(), p = iA(null), q = iA(null);
|
|
239
|
+
R(() => {
|
|
240
|
+
const f = p.current;
|
|
241
|
+
if (!f) return;
|
|
242
242
|
const S = () => {
|
|
243
|
-
CA || (
|
|
243
|
+
CA || (yA = f.scrollTop);
|
|
244
244
|
};
|
|
245
|
-
return
|
|
245
|
+
return f.addEventListener("scroll", S), () => f.removeEventListener("scroll", S);
|
|
246
246
|
}, []);
|
|
247
|
-
const
|
|
248
|
-
const
|
|
249
|
-
|
|
247
|
+
const z = () => {
|
|
248
|
+
const f = p.current;
|
|
249
|
+
f && yA > 0 && (CA = !0, f.scrollTop = yA, requestAnimationFrame(() => {
|
|
250
250
|
CA = !1;
|
|
251
251
|
}));
|
|
252
252
|
};
|
|
253
253
|
qA(() => {
|
|
254
|
-
CA = !0,
|
|
255
|
-
const
|
|
254
|
+
CA = !0, z();
|
|
255
|
+
const f = setTimeout(() => {
|
|
256
256
|
CA = !1;
|
|
257
257
|
}, 300);
|
|
258
|
-
return () => clearTimeout(
|
|
258
|
+
return () => clearTimeout(f);
|
|
259
259
|
}, []), qA(() => {
|
|
260
|
-
h.menus.length > 0 && (
|
|
260
|
+
h.menus.length > 0 && (yA > 0 ? z() : requestAnimationFrame(() => {
|
|
261
261
|
var S;
|
|
262
|
-
const
|
|
262
|
+
const f = (S = p.current) == null ? void 0 : S.querySelector(
|
|
263
263
|
"[data-menu-active='true']"
|
|
264
264
|
);
|
|
265
|
-
|
|
265
|
+
f && f.scrollIntoView({ block: "center", behavior: "instant" });
|
|
266
266
|
}));
|
|
267
|
-
}, [h.menus]),
|
|
268
|
-
CA = !0,
|
|
269
|
-
const
|
|
267
|
+
}, [h.menus]), R(() => {
|
|
268
|
+
CA = !0, z();
|
|
269
|
+
const f = setTimeout(z, 0), S = setTimeout(z, 50), j = setTimeout(z, 100), AA = setTimeout(z, 200), oA = setTimeout(() => {
|
|
270
270
|
CA = !1;
|
|
271
271
|
}, 300);
|
|
272
272
|
return () => {
|
|
273
|
-
clearTimeout(
|
|
273
|
+
clearTimeout(f), clearTimeout(S), clearTimeout(j), clearTimeout(AA), clearTimeout(oA);
|
|
274
274
|
};
|
|
275
|
-
}, [
|
|
275
|
+
}, [Z.pathname]), R(() => {
|
|
276
276
|
q.current && (q.current.scrollTop = 0);
|
|
277
|
-
}, [
|
|
278
|
-
|
|
279
|
-
}, [
|
|
280
|
-
|
|
281
|
-
}, [
|
|
277
|
+
}, [Z.pathname]), R(() => {
|
|
278
|
+
E && K(!1);
|
|
279
|
+
}, [Z.pathname, E]), R(() => {
|
|
280
|
+
E && P(!0);
|
|
281
|
+
}, [E]);
|
|
282
282
|
const y = () => {
|
|
283
|
-
|
|
283
|
+
W(!0);
|
|
284
284
|
}, eA = () => {
|
|
285
|
-
|
|
285
|
+
W(!1);
|
|
286
286
|
}, tA = () => {
|
|
287
|
-
|
|
287
|
+
W(!1), r();
|
|
288
288
|
}, QA = h.menus.flatMap(
|
|
289
|
-
(
|
|
289
|
+
(f) => f.items.flatMap((S) => {
|
|
290
290
|
const j = [S.to];
|
|
291
291
|
return S.children && j.push(...S.children.map((AA) => AA.to)), j;
|
|
292
292
|
})
|
|
293
|
-
), lA = (
|
|
294
|
-
if (!
|
|
295
|
-
const S = QA.filter((j) =>
|
|
296
|
-
return
|
|
293
|
+
), lA = (f) => {
|
|
294
|
+
if (!Z.pathname.startsWith(f)) return !1;
|
|
295
|
+
const S = QA.filter((j) => Z.pathname.startsWith(j)).sort((j, AA) => AA.length - j.length)[0];
|
|
296
|
+
return f === S;
|
|
297
297
|
};
|
|
298
|
-
|
|
299
|
-
h.menus.forEach((
|
|
300
|
-
|
|
298
|
+
R(() => {
|
|
299
|
+
h.menus.forEach((f) => {
|
|
300
|
+
f.items.forEach((S) => {
|
|
301
301
|
var j;
|
|
302
|
-
(j = S.children) != null && j.some((AA) =>
|
|
302
|
+
(j = S.children) != null && j.some((AA) => Z.pathname.startsWith(AA.to)) && G((AA) => {
|
|
303
303
|
const oA = new Set(AA);
|
|
304
304
|
return oA.add(S.id), oA;
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
});
|
|
308
|
-
}, [
|
|
309
|
-
const
|
|
308
|
+
}, [Z.pathname, h.menus]);
|
|
309
|
+
const xe = (f) => {
|
|
310
310
|
G((S) => {
|
|
311
311
|
const j = new Set(S);
|
|
312
|
-
return j.has(
|
|
312
|
+
return j.has(f) ? j.delete(f) : j.add(f), j;
|
|
313
313
|
});
|
|
314
314
|
};
|
|
315
|
-
|
|
316
|
-
h.menus.length !== 0 &&
|
|
317
|
-
}, [h.menus,
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
315
|
+
R(() => {
|
|
316
|
+
h.menus.length !== 0 && k !== null && !h.menus.some((f) => f.id === k) && u(null);
|
|
317
|
+
}, [h.menus, k, u]);
|
|
318
|
+
const fe = cA(() => {
|
|
319
|
+
if (k !== null)
|
|
320
320
|
return h.menus.filter(
|
|
321
|
-
(j) => j.id ===
|
|
321
|
+
(j) => j.id === k || j.parentGroupId === k
|
|
322
322
|
);
|
|
323
|
-
const
|
|
324
|
-
return S.length === 0 ?
|
|
325
|
-
...
|
|
323
|
+
const f = h.menus.filter((j) => j.parentGroupId === void 0), S = h.menus.filter((j) => j.parentGroupId !== void 0).flatMap((j) => j.items);
|
|
324
|
+
return S.length === 0 ? f : [
|
|
325
|
+
...f,
|
|
326
326
|
{ id: 18, name: "Pengaturan", items: S, parentGroupId: void 0 }
|
|
327
327
|
];
|
|
328
|
-
}, [h.menus,
|
|
329
|
-
return
|
|
328
|
+
}, [h.menus, k]);
|
|
329
|
+
return b ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A($A, {}) }) : /* @__PURE__ */ g(U, { children: [
|
|
330
330
|
/* @__PURE__ */ g(
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
@@ -335,11 +335,11 @@ function ir({
|
|
|
335
335
|
height: "100vh",
|
|
336
336
|
// backgroundColor: "#f9fafb",
|
|
337
337
|
position: "relative",
|
|
338
|
-
"--app-sidebar-width":
|
|
339
|
-
"--app-footer-zindex":
|
|
338
|
+
"--app-sidebar-width": E ? "0px" : x ? "4rem" : "16rem",
|
|
339
|
+
"--app-footer-zindex": E && $ ? "40" : "999"
|
|
340
340
|
},
|
|
341
341
|
children: [
|
|
342
|
-
|
|
342
|
+
E && /* @__PURE__ */ A(
|
|
343
343
|
"div",
|
|
344
344
|
{
|
|
345
345
|
style: {
|
|
@@ -351,16 +351,16 @@ function ir({
|
|
|
351
351
|
pointerEvents: $ ? "auto" : "none",
|
|
352
352
|
transition: "opacity 0.3s"
|
|
353
353
|
},
|
|
354
|
-
onClick: () =>
|
|
354
|
+
onClick: () => K(!1)
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
357
|
/* @__PURE__ */ g(
|
|
358
358
|
"aside",
|
|
359
359
|
{
|
|
360
360
|
style: {
|
|
361
|
-
width:
|
|
362
|
-
position:
|
|
363
|
-
...
|
|
361
|
+
width: E ? "16rem" : x ? "4rem" : "16rem",
|
|
362
|
+
position: E ? "fixed" : "relative",
|
|
363
|
+
...E && {
|
|
364
364
|
inset: 0,
|
|
365
365
|
zIndex: 50,
|
|
366
366
|
transform: $ ? "translateX(0)" : "translateX(-100%)"
|
|
@@ -370,7 +370,7 @@ function ir({
|
|
|
370
370
|
display: "flex",
|
|
371
371
|
flexDirection: "column",
|
|
372
372
|
transition: "all 0.3s ease-in-out",
|
|
373
|
-
flexShrink:
|
|
373
|
+
flexShrink: E ? void 0 : 0
|
|
374
374
|
},
|
|
375
375
|
children: [
|
|
376
376
|
/* @__PURE__ */ g(
|
|
@@ -407,7 +407,7 @@ function ir({
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
),
|
|
410
|
-
(!
|
|
410
|
+
(!x || $) && /* @__PURE__ */ A(
|
|
411
411
|
"span",
|
|
412
412
|
{
|
|
413
413
|
style: {
|
|
@@ -422,10 +422,10 @@ function ir({
|
|
|
422
422
|
]
|
|
423
423
|
}
|
|
424
424
|
),
|
|
425
|
-
|
|
425
|
+
E && /* @__PURE__ */ A(
|
|
426
426
|
"button",
|
|
427
427
|
{
|
|
428
|
-
onClick: () =>
|
|
428
|
+
onClick: () => K(!1),
|
|
429
429
|
style: {
|
|
430
430
|
padding: "0.375rem",
|
|
431
431
|
borderRadius: "0.5rem",
|
|
@@ -458,10 +458,10 @@ function ir({
|
|
|
458
458
|
]
|
|
459
459
|
}
|
|
460
460
|
),
|
|
461
|
-
!
|
|
461
|
+
!E && /* @__PURE__ */ A(
|
|
462
462
|
"button",
|
|
463
463
|
{
|
|
464
|
-
onClick: () =>
|
|
464
|
+
onClick: () => P(!x),
|
|
465
465
|
style: {
|
|
466
466
|
position: "absolute",
|
|
467
467
|
top: "1.5rem",
|
|
@@ -491,7 +491,7 @@ function ir({
|
|
|
491
491
|
stroke: "currentColor",
|
|
492
492
|
viewBox: "0 0 24 24",
|
|
493
493
|
strokeWidth: "2",
|
|
494
|
-
children:
|
|
494
|
+
children: x ? (
|
|
495
495
|
// Icon when collapsed (closed) - sidebar with arrow right
|
|
496
496
|
/* @__PURE__ */ g(U, { children: [
|
|
497
497
|
/* @__PURE__ */ A(
|
|
@@ -537,9 +537,9 @@ function ir({
|
|
|
537
537
|
}
|
|
538
538
|
),
|
|
539
539
|
c && /* @__PURE__ */ A(
|
|
540
|
-
|
|
540
|
+
ve,
|
|
541
541
|
{
|
|
542
|
-
collapsed:
|
|
542
|
+
collapsed: E ? !1 : x,
|
|
543
543
|
children: c
|
|
544
544
|
}
|
|
545
545
|
),
|
|
@@ -553,8 +553,8 @@ function ir({
|
|
|
553
553
|
paddingTop: "0.5rem",
|
|
554
554
|
paddingBottom: "0.5rem"
|
|
555
555
|
},
|
|
556
|
-
children:
|
|
557
|
-
(!
|
|
556
|
+
children: fe.map((f) => /* @__PURE__ */ g("div", { style: { marginBottom: "1rem" }, children: [
|
|
557
|
+
(!x || E) && /* @__PURE__ */ A(
|
|
558
558
|
"div",
|
|
559
559
|
{
|
|
560
560
|
style: {
|
|
@@ -569,29 +569,29 @@ function ir({
|
|
|
569
569
|
letterSpacing: "0.05em",
|
|
570
570
|
transition: "opacity 0.3s"
|
|
571
571
|
},
|
|
572
|
-
children:
|
|
572
|
+
children: f.name
|
|
573
573
|
}
|
|
574
574
|
),
|
|
575
|
-
/* @__PURE__ */ A("div", { style: { paddingLeft: "0.5rem", paddingRight: "0.5rem", display: "flex", flexDirection: "column", gap: "var(--starasia-ui-spacing-xs)" }, children:
|
|
576
|
-
const j = S.children && S.children.length > 0, AA =
|
|
575
|
+
/* @__PURE__ */ A("div", { style: { paddingLeft: "0.5rem", paddingRight: "0.5rem", display: "flex", flexDirection: "column", gap: "var(--starasia-ui-spacing-xs)" }, children: f.items.map((S) => {
|
|
576
|
+
const j = S.children && S.children.length > 0, AA = M.has(S.id), oA = j ? S.children.some((V) => lA(V.to)) : lA(S.to), mA = _A(
|
|
577
577
|
S.badge,
|
|
578
|
-
|
|
579
|
-
),
|
|
578
|
+
F[S.id]
|
|
579
|
+
), Se = !!mA && x && !E;
|
|
580
580
|
return /* @__PURE__ */ g("div", { "data-menu-active": oA || void 0, children: [
|
|
581
581
|
/* @__PURE__ */ g(
|
|
582
582
|
"button",
|
|
583
583
|
{
|
|
584
584
|
onClick: () => {
|
|
585
|
-
j ?
|
|
585
|
+
j ? xe(S.id) : N(S.to);
|
|
586
586
|
},
|
|
587
587
|
style: {
|
|
588
588
|
width: "100%",
|
|
589
589
|
display: "flex",
|
|
590
590
|
alignItems: "center",
|
|
591
|
-
justifyContent:
|
|
591
|
+
justifyContent: x && !E ? "center" : void 0,
|
|
592
592
|
gap: "0.75rem",
|
|
593
|
-
paddingLeft:
|
|
594
|
-
paddingRight:
|
|
593
|
+
paddingLeft: x && !E ? "0" : "0.75rem",
|
|
594
|
+
paddingRight: x && !E ? "0" : "0.75rem",
|
|
595
595
|
paddingTop: "0.5rem",
|
|
596
596
|
paddingBottom: "0.5rem",
|
|
597
597
|
borderRadius: "var(--starasia-ui-radii-md)",
|
|
@@ -602,12 +602,12 @@ function ir({
|
|
|
602
602
|
// transition: "all 0.2s",
|
|
603
603
|
cursor: "pointer"
|
|
604
604
|
},
|
|
605
|
-
title:
|
|
606
|
-
onMouseEnter: (
|
|
607
|
-
oA || (
|
|
605
|
+
title: x && !E ? S.title : void 0,
|
|
606
|
+
onMouseEnter: (V) => {
|
|
607
|
+
oA || (V.currentTarget.style.backgroundColor = "#f3f4f6");
|
|
608
608
|
},
|
|
609
|
-
onMouseLeave: (
|
|
610
|
-
oA || (
|
|
609
|
+
onMouseLeave: (V) => {
|
|
610
|
+
oA || (V.currentTarget.style.backgroundColor = "transparent");
|
|
611
611
|
},
|
|
612
612
|
children: [
|
|
613
613
|
/* @__PURE__ */ g(
|
|
@@ -620,7 +620,7 @@ function ir({
|
|
|
620
620
|
},
|
|
621
621
|
children: [
|
|
622
622
|
/* @__PURE__ */ A(m, { name: S.icon, size: "sm", style: { flexShrink: 0 } }),
|
|
623
|
-
|
|
623
|
+
Se && /* @__PURE__ */ A(
|
|
624
624
|
"span",
|
|
625
625
|
{
|
|
626
626
|
"aria-hidden": "true",
|
|
@@ -639,7 +639,7 @@ function ir({
|
|
|
639
639
|
]
|
|
640
640
|
}
|
|
641
641
|
),
|
|
642
|
-
(!
|
|
642
|
+
(!x || E) && /* @__PURE__ */ g(U, { children: [
|
|
643
643
|
/* @__PURE__ */ A(
|
|
644
644
|
"span",
|
|
645
645
|
{
|
|
@@ -653,11 +653,11 @@ function ir({
|
|
|
653
653
|
children: S.title
|
|
654
654
|
}
|
|
655
655
|
),
|
|
656
|
-
|
|
657
|
-
|
|
656
|
+
mA && /* @__PURE__ */ A(
|
|
657
|
+
DA,
|
|
658
658
|
{
|
|
659
|
-
text: String(
|
|
660
|
-
variant:
|
|
659
|
+
text: String(mA.value),
|
|
660
|
+
variant: mA.variant ?? "info",
|
|
661
661
|
size: "xs",
|
|
662
662
|
border: !0
|
|
663
663
|
}
|
|
@@ -690,7 +690,7 @@ function ir({
|
|
|
690
690
|
]
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
|
-
j && (!
|
|
693
|
+
j && (!x || E) && /* @__PURE__ */ A(
|
|
694
694
|
"div",
|
|
695
695
|
{
|
|
696
696
|
style: {
|
|
@@ -703,15 +703,15 @@ function ir({
|
|
|
703
703
|
opacity: AA ? 1 : 0,
|
|
704
704
|
marginTop: AA ? "0.25rem" : "0px"
|
|
705
705
|
},
|
|
706
|
-
children: S.children.map((
|
|
706
|
+
children: S.children.map((V) => {
|
|
707
707
|
const NA = _A(
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
V.badge,
|
|
709
|
+
F[V.id]
|
|
710
710
|
);
|
|
711
711
|
return /* @__PURE__ */ g(
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
714
|
-
onClick: () =>
|
|
714
|
+
onClick: () => N(V.to),
|
|
715
715
|
style: {
|
|
716
716
|
width: "100%",
|
|
717
717
|
display: "flex",
|
|
@@ -723,23 +723,23 @@ function ir({
|
|
|
723
723
|
paddingBottom: "0.5rem",
|
|
724
724
|
borderRadius: "var(--starasia-ui-radii-md)",
|
|
725
725
|
textAlign: "left",
|
|
726
|
-
backgroundColor: lA(
|
|
727
|
-
color: lA(
|
|
726
|
+
backgroundColor: lA(V.to) ? "#FFFFFF" : "transparent",
|
|
727
|
+
color: lA(V.to) ? "#292A2E" : "#505258",
|
|
728
728
|
// transition: "all 0.2s",
|
|
729
729
|
cursor: "pointer",
|
|
730
|
-
border: lA(
|
|
730
|
+
border: lA(V.to) ? "1px solid rgba(11, 18, 14, 0.1412)" : "1px solid transparent"
|
|
731
731
|
},
|
|
732
732
|
onMouseEnter: (zA) => {
|
|
733
|
-
lA(
|
|
733
|
+
lA(V.to) || (zA.currentTarget.style.backgroundColor = "#f3f4f6");
|
|
734
734
|
},
|
|
735
735
|
onMouseLeave: (zA) => {
|
|
736
|
-
lA(
|
|
736
|
+
lA(V.to) || (zA.currentTarget.style.backgroundColor = "transparent");
|
|
737
737
|
},
|
|
738
738
|
children: [
|
|
739
739
|
/* @__PURE__ */ A(
|
|
740
740
|
m,
|
|
741
741
|
{
|
|
742
|
-
name:
|
|
742
|
+
name: V.icon,
|
|
743
743
|
size: "sm",
|
|
744
744
|
style: { flexShrink: 0 }
|
|
745
745
|
}
|
|
@@ -753,11 +753,11 @@ function ir({
|
|
|
753
753
|
whiteSpace: "nowrap",
|
|
754
754
|
flex: 1
|
|
755
755
|
},
|
|
756
|
-
children:
|
|
756
|
+
children: V.title
|
|
757
757
|
}
|
|
758
758
|
),
|
|
759
759
|
NA && /* @__PURE__ */ A(
|
|
760
|
-
|
|
760
|
+
DA,
|
|
761
761
|
{
|
|
762
762
|
text: String(NA.value),
|
|
763
763
|
variant: NA.variant ?? "info",
|
|
@@ -767,14 +767,14 @@ function ir({
|
|
|
767
767
|
)
|
|
768
768
|
]
|
|
769
769
|
},
|
|
770
|
-
|
|
770
|
+
V.id
|
|
771
771
|
);
|
|
772
772
|
})
|
|
773
773
|
}
|
|
774
774
|
)
|
|
775
775
|
] }, S.id);
|
|
776
776
|
}) })
|
|
777
|
-
] },
|
|
777
|
+
] }, f.id))
|
|
778
778
|
}
|
|
779
779
|
)
|
|
780
780
|
]
|
|
@@ -797,10 +797,10 @@ function ir({
|
|
|
797
797
|
},
|
|
798
798
|
children: [
|
|
799
799
|
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: "1rem" }, children: [
|
|
800
|
-
|
|
800
|
+
E && /* @__PURE__ */ A(
|
|
801
801
|
"button",
|
|
802
802
|
{
|
|
803
|
-
onClick: () =>
|
|
803
|
+
onClick: () => K(!0),
|
|
804
804
|
style: {
|
|
805
805
|
padding: "0.375rem",
|
|
806
806
|
borderRadius: "0.5rem",
|
|
@@ -834,7 +834,7 @@ function ir({
|
|
|
834
834
|
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
835
835
|
s,
|
|
836
836
|
/* @__PURE__ */ g(ce, { position: "bottom-right", children: [
|
|
837
|
-
/* @__PURE__ */ A(
|
|
837
|
+
/* @__PURE__ */ A(fA, { children: /* @__PURE__ */ g(
|
|
838
838
|
"div",
|
|
839
839
|
{
|
|
840
840
|
style: {
|
|
@@ -917,7 +917,7 @@ function ir({
|
|
|
917
917
|
marginTop: "16px"
|
|
918
918
|
},
|
|
919
919
|
children: [
|
|
920
|
-
/* @__PURE__ */ A(
|
|
920
|
+
/* @__PURE__ */ A(Le, { children: /* @__PURE__ */ g(
|
|
921
921
|
"div",
|
|
922
922
|
{
|
|
923
923
|
style: {
|
|
@@ -979,7 +979,7 @@ function ir({
|
|
|
979
979
|
children: (t == null ? void 0 : t.email) || "unknown"
|
|
980
980
|
}
|
|
981
981
|
),
|
|
982
|
-
|
|
982
|
+
C && /* @__PURE__ */ A(
|
|
983
983
|
"p",
|
|
984
984
|
{
|
|
985
985
|
style: {
|
|
@@ -991,18 +991,18 @@ function ir({
|
|
|
991
991
|
overflow: "hidden",
|
|
992
992
|
textOverflow: "ellipsis"
|
|
993
993
|
},
|
|
994
|
-
children:
|
|
994
|
+
children: C
|
|
995
995
|
}
|
|
996
996
|
)
|
|
997
997
|
]
|
|
998
998
|
}
|
|
999
999
|
) }),
|
|
1000
1000
|
(d && d.length > 0 || w) && /* @__PURE__ */ g(se, { children: [
|
|
1001
|
-
d == null ? void 0 : d.map((
|
|
1001
|
+
d == null ? void 0 : d.map((f, S) => /* @__PURE__ */ A(fA, { children: /* @__PURE__ */ g(
|
|
1002
1002
|
"button",
|
|
1003
1003
|
{
|
|
1004
1004
|
type: "button",
|
|
1005
|
-
onClick:
|
|
1005
|
+
onClick: f.onClick,
|
|
1006
1006
|
style: ee,
|
|
1007
1007
|
onMouseEnter: (j) => {
|
|
1008
1008
|
j.currentTarget.style.backgroundColor = "#f3f4f6";
|
|
@@ -1011,14 +1011,14 @@ function ir({
|
|
|
1011
1011
|
j.currentTarget.style.backgroundColor = "transparent";
|
|
1012
1012
|
},
|
|
1013
1013
|
children: [
|
|
1014
|
-
/* @__PURE__ */ A(m, { name:
|
|
1015
|
-
/* @__PURE__ */ A("span", { children:
|
|
1014
|
+
/* @__PURE__ */ A(m, { name: f.icon, size: "md" }),
|
|
1015
|
+
/* @__PURE__ */ A("span", { children: f.label })
|
|
1016
1016
|
]
|
|
1017
1017
|
}
|
|
1018
|
-
) }, `${
|
|
1018
|
+
) }, `${f.label}-${S}`)),
|
|
1019
1019
|
w
|
|
1020
1020
|
] }),
|
|
1021
|
-
B ?? /* @__PURE__ */ A(
|
|
1021
|
+
B ?? /* @__PURE__ */ A(Ge, { children: /* @__PURE__ */ A(fA, { children: /* @__PURE__ */ g(
|
|
1022
1022
|
"button",
|
|
1023
1023
|
{
|
|
1024
1024
|
type: "button",
|
|
@@ -1028,11 +1028,11 @@ function ir({
|
|
|
1028
1028
|
color: "var(--starasia-ui-utility-danger-default)",
|
|
1029
1029
|
fontWeight: 500
|
|
1030
1030
|
},
|
|
1031
|
-
onMouseEnter: (
|
|
1032
|
-
|
|
1031
|
+
onMouseEnter: (f) => {
|
|
1032
|
+
f.currentTarget.style.backgroundColor = "#fef2f2";
|
|
1033
1033
|
},
|
|
1034
|
-
onMouseLeave: (
|
|
1035
|
-
|
|
1034
|
+
onMouseLeave: (f) => {
|
|
1035
|
+
f.currentTarget.style.backgroundColor = "transparent";
|
|
1036
1036
|
},
|
|
1037
1037
|
children: [
|
|
1038
1038
|
/* @__PURE__ */ A(
|
|
@@ -1087,17 +1087,17 @@ function ir({
|
|
|
1087
1087
|
children: l
|
|
1088
1088
|
}
|
|
1089
1089
|
),
|
|
1090
|
-
/* @__PURE__ */ g(
|
|
1090
|
+
/* @__PURE__ */ g(IA, { isShow: I, onHide: eA, children: [
|
|
1091
1091
|
/* @__PURE__ */ A(dA, { children: "Confirmation Logout" }),
|
|
1092
|
-
/* @__PURE__ */ A(
|
|
1093
|
-
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ A(
|
|
1094
|
-
/* @__PURE__ */ A(
|
|
1095
|
-
/* @__PURE__ */ A(
|
|
1092
|
+
/* @__PURE__ */ A(kA, { children: "Are you sure you want to end the session and exit the page?" }),
|
|
1093
|
+
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ A(a, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ g(T, { direction: "row", gap: "sm", align: "center", children: [
|
|
1094
|
+
/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(O, { secondary: !0, onClick: eA, children: "Cancel" }) }),
|
|
1095
|
+
/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(O, { primary: !0, onClick: tA, children: "Yes, Sure" }) })
|
|
1096
1096
|
] }) }) })
|
|
1097
1097
|
] })
|
|
1098
1098
|
] });
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Ve({
|
|
1101
1101
|
isShow: e,
|
|
1102
1102
|
onHide: i,
|
|
1103
1103
|
menus: t,
|
|
@@ -1108,7 +1108,7 @@ function ve({
|
|
|
1108
1108
|
r(l), i();
|
|
1109
1109
|
};
|
|
1110
1110
|
return /* @__PURE__ */ A(
|
|
1111
|
-
|
|
1111
|
+
IA,
|
|
1112
1112
|
{
|
|
1113
1113
|
isShow: e,
|
|
1114
1114
|
onHide: i,
|
|
@@ -1118,7 +1118,7 @@ function ve({
|
|
|
1118
1118
|
boxShadow: "none",
|
|
1119
1119
|
border: "none"
|
|
1120
1120
|
},
|
|
1121
|
-
children: /* @__PURE__ */ A(
|
|
1121
|
+
children: /* @__PURE__ */ A(kA, { children: /* @__PURE__ */ g(
|
|
1122
1122
|
"div",
|
|
1123
1123
|
{
|
|
1124
1124
|
style: {
|
|
@@ -1180,8 +1180,8 @@ function ve({
|
|
|
1180
1180
|
}
|
|
1181
1181
|
),
|
|
1182
1182
|
t.map((l) => {
|
|
1183
|
-
var
|
|
1184
|
-
const c = o === l.id, s = ((
|
|
1183
|
+
var C;
|
|
1184
|
+
const c = o === l.id, s = ((C = l.items[0]) == null ? void 0 : C.icon) ?? "Grid";
|
|
1185
1185
|
return /* @__PURE__ */ g(
|
|
1186
1186
|
"button",
|
|
1187
1187
|
{
|
|
@@ -1246,13 +1246,13 @@ function tr({
|
|
|
1246
1246
|
onSelect: e,
|
|
1247
1247
|
"aria-label": i = "Pilih module"
|
|
1248
1248
|
} = {}) {
|
|
1249
|
-
const t = ue(), o = vA(), { selectedGroupId: r, setSelectedGroupId: n } = Ie(), [l, c] =
|
|
1249
|
+
const t = ue(), o = vA(), { selectedGroupId: r, setSelectedGroupId: n } = Ie(), [l, c] = L(!1), s = (C) => {
|
|
1250
1250
|
var d;
|
|
1251
|
-
if (n(
|
|
1252
|
-
const w = t.menus.find((
|
|
1251
|
+
if (n(C), C !== null) {
|
|
1252
|
+
const w = t.menus.find((D) => D.id === C), B = (d = w == null ? void 0 : w.items[0]) == null ? void 0 : d.to;
|
|
1253
1253
|
B && o(B);
|
|
1254
1254
|
}
|
|
1255
|
-
e == null || e(
|
|
1255
|
+
e == null || e(C);
|
|
1256
1256
|
};
|
|
1257
1257
|
return /* @__PURE__ */ g(U, { children: [
|
|
1258
1258
|
/* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
|
|
@@ -1273,11 +1273,11 @@ function tr({
|
|
|
1273
1273
|
cursor: "pointer"
|
|
1274
1274
|
},
|
|
1275
1275
|
"aria-label": i,
|
|
1276
|
-
onMouseEnter: (
|
|
1277
|
-
|
|
1276
|
+
onMouseEnter: (C) => {
|
|
1277
|
+
C.currentTarget.style.backgroundColor = "#f9fafb";
|
|
1278
1278
|
},
|
|
1279
|
-
onMouseLeave: (
|
|
1280
|
-
|
|
1279
|
+
onMouseLeave: (C) => {
|
|
1280
|
+
C.currentTarget.style.backgroundColor = "transparent";
|
|
1281
1281
|
},
|
|
1282
1282
|
children: /* @__PURE__ */ A(m, { name: "GridApplication", size: "sm" })
|
|
1283
1283
|
}
|
|
@@ -1299,11 +1299,11 @@ function tr({
|
|
|
1299
1299
|
)
|
|
1300
1300
|
] }),
|
|
1301
1301
|
/* @__PURE__ */ A(
|
|
1302
|
-
|
|
1302
|
+
Ve,
|
|
1303
1303
|
{
|
|
1304
1304
|
isShow: l,
|
|
1305
1305
|
onHide: () => c(!1),
|
|
1306
|
-
menus: t.menus.filter((
|
|
1306
|
+
menus: t.menus.filter((C) => C.parentGroupId === void 0),
|
|
1307
1307
|
selectedGroupId: r,
|
|
1308
1308
|
onSelect: s
|
|
1309
1309
|
}
|
|
@@ -1312,16 +1312,16 @@ function tr({
|
|
|
1312
1312
|
}
|
|
1313
1313
|
const rr = _(
|
|
1314
1314
|
({ children: e, coverImage: i, logo: t }) => {
|
|
1315
|
-
const o = X("md"), r =
|
|
1315
|
+
const o = X("md"), r = Ne();
|
|
1316
1316
|
return /* @__PURE__ */ g(
|
|
1317
|
-
|
|
1317
|
+
a,
|
|
1318
1318
|
{
|
|
1319
1319
|
direction: o ? "row" : "column",
|
|
1320
1320
|
width: "width-screen",
|
|
1321
1321
|
height: "height-screen",
|
|
1322
1322
|
children: [
|
|
1323
1323
|
/* @__PURE__ */ A(
|
|
1324
|
-
|
|
1324
|
+
a,
|
|
1325
1325
|
{
|
|
1326
1326
|
direction: "row",
|
|
1327
1327
|
padding: "spacing-12",
|
|
@@ -1342,7 +1342,7 @@ const rr = _(
|
|
|
1342
1342
|
}
|
|
1343
1343
|
},
|
|
1344
1344
|
children: /* @__PURE__ */ g(
|
|
1345
|
-
|
|
1345
|
+
a,
|
|
1346
1346
|
{
|
|
1347
1347
|
style: { backgroundColor: "#fff" },
|
|
1348
1348
|
width: "width-fit ",
|
|
@@ -1360,7 +1360,7 @@ const rr = _(
|
|
|
1360
1360
|
}
|
|
1361
1361
|
),
|
|
1362
1362
|
/* @__PURE__ */ A(
|
|
1363
|
-
|
|
1363
|
+
a,
|
|
1364
1364
|
{
|
|
1365
1365
|
display: "flex",
|
|
1366
1366
|
flex: "1",
|
|
@@ -1384,7 +1384,7 @@ const rr = _(
|
|
|
1384
1384
|
}
|
|
1385
1385
|
},
|
|
1386
1386
|
children: /* @__PURE__ */ A(
|
|
1387
|
-
|
|
1387
|
+
a,
|
|
1388
1388
|
{
|
|
1389
1389
|
direction: "column",
|
|
1390
1390
|
padding: "spacing-6",
|
|
@@ -1398,7 +1398,7 @@ const rr = _(
|
|
|
1398
1398
|
}
|
|
1399
1399
|
);
|
|
1400
1400
|
}
|
|
1401
|
-
),
|
|
1401
|
+
), Xe = (e, i) => {
|
|
1402
1402
|
const t = [];
|
|
1403
1403
|
if (i === 0)
|
|
1404
1404
|
return t.push(e), t;
|
|
@@ -1407,7 +1407,7 @@ const rr = _(
|
|
|
1407
1407
|
t.push(r);
|
|
1408
1408
|
}
|
|
1409
1409
|
return t;
|
|
1410
|
-
},
|
|
1410
|
+
}, $e = _(
|
|
1411
1411
|
({
|
|
1412
1412
|
value: e,
|
|
1413
1413
|
label: i,
|
|
@@ -1432,15 +1432,15 @@ const rr = _(
|
|
|
1432
1432
|
verticalAlign: n
|
|
1433
1433
|
}),
|
|
1434
1434
|
[r]
|
|
1435
|
-
), s = () => typeof i == "string" ? /* @__PURE__ */ A(Q, { fontWeight: "medium", color: "gray-500", children: i }) : i,
|
|
1435
|
+
), s = () => typeof i == "string" ? /* @__PURE__ */ A(Q, { fontWeight: "medium", color: "gray-500", children: i }) : i, C = () => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ A(Q, { color: "text", fontWeight: "medium", children: e }) : e;
|
|
1436
1436
|
return /* @__PURE__ */ g(hA, { children: [
|
|
1437
1437
|
/* @__PURE__ */ A(BA, { style: l, width: o, children: s() }),
|
|
1438
1438
|
t ? /* @__PURE__ */ A(BA, { style: c, width: 24, children: /* @__PURE__ */ A(Q, { fontWeight: "medium", color: "gray-500", children: ":" }) }) : null,
|
|
1439
|
-
/* @__PURE__ */ A(BA, { style: l, children:
|
|
1439
|
+
/* @__PURE__ */ A(BA, { style: l, children: C() })
|
|
1440
1440
|
] });
|
|
1441
1441
|
}
|
|
1442
|
-
),
|
|
1443
|
-
|
|
1442
|
+
), _e = _(({ fields: e, separator: i, labelWidth: t }) => /* @__PURE__ */ A(ae, { children: e.map((o, r) => /* @__PURE__ */ A(
|
|
1443
|
+
$e,
|
|
1444
1444
|
{
|
|
1445
1445
|
separator: i,
|
|
1446
1446
|
labelWidth: t,
|
|
@@ -1457,7 +1457,7 @@ const rr = _(
|
|
|
1457
1457
|
labelWidth: r = 150
|
|
1458
1458
|
}) => {
|
|
1459
1459
|
const n = cA(
|
|
1460
|
-
() =>
|
|
1460
|
+
() => Xe(o, e),
|
|
1461
1461
|
[o, e]
|
|
1462
1462
|
), l = n.length > 2, c = () => {
|
|
1463
1463
|
switch (i) {
|
|
@@ -1474,7 +1474,7 @@ const rr = _(
|
|
|
1474
1474
|
}
|
|
1475
1475
|
};
|
|
1476
1476
|
return /* @__PURE__ */ A(
|
|
1477
|
-
|
|
1477
|
+
a,
|
|
1478
1478
|
{
|
|
1479
1479
|
gap: l ? void 0 : "lg",
|
|
1480
1480
|
direction: "row",
|
|
@@ -1485,14 +1485,14 @@ const rr = _(
|
|
|
1485
1485
|
paddingRight: "xl",
|
|
1486
1486
|
paddingBottom: l ? "xs" : "lg",
|
|
1487
1487
|
bg: "accent-dark-tertiary",
|
|
1488
|
-
children: n.map((s,
|
|
1489
|
-
|
|
1488
|
+
children: n.map((s, C) => /* @__PURE__ */ A(
|
|
1489
|
+
a,
|
|
1490
1490
|
{
|
|
1491
1491
|
flex: l ? void 0 : "1",
|
|
1492
1492
|
width: l ? c() : void 0,
|
|
1493
1493
|
marginBottom: l ? "lg" : void 0,
|
|
1494
1494
|
children: /* @__PURE__ */ A(
|
|
1495
|
-
|
|
1495
|
+
_e,
|
|
1496
1496
|
{
|
|
1497
1497
|
labelWidth: r,
|
|
1498
1498
|
fields: s,
|
|
@@ -1500,7 +1500,7 @@ const rr = _(
|
|
|
1500
1500
|
}
|
|
1501
1501
|
)
|
|
1502
1502
|
},
|
|
1503
|
-
|
|
1503
|
+
C
|
|
1504
1504
|
))
|
|
1505
1505
|
}
|
|
1506
1506
|
);
|
|
@@ -1537,16 +1537,16 @@ const rr = _(
|
|
|
1537
1537
|
return /* @__PURE__ */ A(O, { primary: !0, onClick: o, children: n });
|
|
1538
1538
|
}
|
|
1539
1539
|
};
|
|
1540
|
-
return /* @__PURE__ */ g(
|
|
1540
|
+
return /* @__PURE__ */ g(IA, { isShow: r, onHide: t, children: [
|
|
1541
1541
|
c(),
|
|
1542
|
-
/* @__PURE__ */ A(
|
|
1543
|
-
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ g(
|
|
1542
|
+
/* @__PURE__ */ A(kA, { children: /* @__PURE__ */ A(Q, { children: i }) }),
|
|
1543
|
+
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ g(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
|
|
1544
1544
|
/* @__PURE__ */ A(O, { secondary: !0, onClick: t, children: "Cancel" }),
|
|
1545
1545
|
s()
|
|
1546
1546
|
] }) })
|
|
1547
1547
|
] });
|
|
1548
|
-
},
|
|
1549
|
-
|
|
1548
|
+
}, Ai = ({ children: e, ...i }) => /* @__PURE__ */ A(
|
|
1549
|
+
a,
|
|
1550
1550
|
{
|
|
1551
1551
|
role: "button",
|
|
1552
1552
|
cursor: "pointer",
|
|
@@ -1556,10 +1556,10 @@ const rr = _(
|
|
|
1556
1556
|
...i,
|
|
1557
1557
|
children: e
|
|
1558
1558
|
}
|
|
1559
|
-
), wA = _(
|
|
1560
|
-
const [i, t] =
|
|
1559
|
+
), wA = _(Ai), ei = ({ backButton: e }) => {
|
|
1560
|
+
const [i, t] = L(!1), o = (e == null ? void 0 : e.iconColor) ?? "var(--starasia-ui-color-gray-500)", r = (e == null ? void 0 : e.textColor) ?? "rgba(120, 134, 127, 1)", n = (e == null ? void 0 : e.hoverIconColor) ?? "var(--starasia-ui-color-gray-700)", l = (e == null ? void 0 : e.hoverTextColor) ?? "rgba(60, 67, 64, 1)";
|
|
1561
1561
|
return /* @__PURE__ */ g(
|
|
1562
|
-
|
|
1562
|
+
a,
|
|
1563
1563
|
{
|
|
1564
1564
|
direction: "row",
|
|
1565
1565
|
gap: "xs",
|
|
@@ -1594,7 +1594,7 @@ const rr = _(
|
|
|
1594
1594
|
]
|
|
1595
1595
|
}
|
|
1596
1596
|
);
|
|
1597
|
-
},
|
|
1597
|
+
}, ii = ({
|
|
1598
1598
|
backButton: e,
|
|
1599
1599
|
title: i,
|
|
1600
1600
|
titleTag: t,
|
|
@@ -1605,37 +1605,37 @@ const rr = _(
|
|
|
1605
1605
|
containerProps: c,
|
|
1606
1606
|
headerProps: s
|
|
1607
1607
|
}) => {
|
|
1608
|
-
const
|
|
1608
|
+
const C = X("lg"), d = vA(), w = EA(), B = e == null ? void 0 : e.show, D = () => {
|
|
1609
1609
|
if (typeof (e == null ? void 0 : e.onClick) == "function") {
|
|
1610
1610
|
e.onClick();
|
|
1611
1611
|
return;
|
|
1612
1612
|
}
|
|
1613
1613
|
d(-1, { replace: !0 });
|
|
1614
|
-
},
|
|
1615
|
-
({ title:
|
|
1614
|
+
}, b = () => n ? de(n) ? n : /* @__PURE__ */ A(a, { direction: "row", gap: "lg", children: n.map(
|
|
1615
|
+
({ title: Z, icon: v, buttonProps: E, onClick: I }, W) => !Z && !v ? null : /* @__PURE__ */ A(
|
|
1616
1616
|
O,
|
|
1617
1617
|
{
|
|
1618
|
-
fullWidth: !
|
|
1618
|
+
fullWidth: !C,
|
|
1619
1619
|
iconLeft: v ? /* @__PURE__ */ A(m, { name: v, size: "md" }) : void 0,
|
|
1620
1620
|
onClick: I,
|
|
1621
|
-
...
|
|
1622
|
-
children:
|
|
1621
|
+
...E,
|
|
1622
|
+
children: Z
|
|
1623
1623
|
},
|
|
1624
|
-
`action-${
|
|
1624
|
+
`action-${W}`
|
|
1625
1625
|
)
|
|
1626
1626
|
) }) : null, h = () => {
|
|
1627
|
-
const
|
|
1628
|
-
return e != null && e.navigateTo ? /* @__PURE__ */ A(
|
|
1629
|
-
|
|
1627
|
+
const Z = /* @__PURE__ */ A(ei, { backButton: e });
|
|
1628
|
+
return e != null && e.navigateTo ? /* @__PURE__ */ A(a, { direction: "row", children: /* @__PURE__ */ A(
|
|
1629
|
+
He,
|
|
1630
1630
|
{
|
|
1631
1631
|
to: e.navigateTo,
|
|
1632
1632
|
replace: !0,
|
|
1633
1633
|
style: { textDecoration: "none" },
|
|
1634
|
-
children:
|
|
1634
|
+
children: Z
|
|
1635
1635
|
}
|
|
1636
|
-
) }) : /* @__PURE__ */ A(
|
|
1637
|
-
},
|
|
1638
|
-
|
|
1636
|
+
) }) : /* @__PURE__ */ A(a, { direction: "row", children: /* @__PURE__ */ A(wA, { onClick: D, children: Z }) });
|
|
1637
|
+
}, F = () => /* @__PURE__ */ g(
|
|
1638
|
+
a,
|
|
1639
1639
|
{
|
|
1640
1640
|
gap: "xs",
|
|
1641
1641
|
paddingTop: s == null ? void 0 : s.paddingTop,
|
|
@@ -1644,26 +1644,26 @@ const rr = _(
|
|
|
1644
1644
|
children: [
|
|
1645
1645
|
B && h(),
|
|
1646
1646
|
/* @__PURE__ */ g(
|
|
1647
|
-
|
|
1647
|
+
a,
|
|
1648
1648
|
{
|
|
1649
|
-
direction:
|
|
1649
|
+
direction: C ? "row" : "column",
|
|
1650
1650
|
gap: "lg",
|
|
1651
1651
|
justify: "space-between",
|
|
1652
1652
|
align: "center",
|
|
1653
1653
|
children: [
|
|
1654
|
-
typeof i == "string" ? /* @__PURE__ */ g(
|
|
1654
|
+
typeof i == "string" ? /* @__PURE__ */ g(a, { direction: "row", gap: "lg", align: "center", children: [
|
|
1655
1655
|
/* @__PURE__ */ A(Q, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: i }),
|
|
1656
|
-
t && /* @__PURE__ */ A(
|
|
1656
|
+
t && /* @__PURE__ */ A(DA, { border: !0, size: "lg", text: t, ...l })
|
|
1657
1657
|
] }) : i,
|
|
1658
|
-
|
|
1658
|
+
b()
|
|
1659
1659
|
]
|
|
1660
1660
|
}
|
|
1661
1661
|
)
|
|
1662
1662
|
]
|
|
1663
1663
|
}
|
|
1664
|
-
),
|
|
1664
|
+
), N = () => o;
|
|
1665
1665
|
return /* @__PURE__ */ g(
|
|
1666
|
-
|
|
1666
|
+
a,
|
|
1667
1667
|
{
|
|
1668
1668
|
gap: "md",
|
|
1669
1669
|
variant: "main",
|
|
@@ -1674,13 +1674,13 @@ const rr = _(
|
|
|
1674
1674
|
animation: "pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"
|
|
1675
1675
|
},
|
|
1676
1676
|
children: [
|
|
1677
|
-
r &&
|
|
1678
|
-
|
|
1677
|
+
r && F(),
|
|
1678
|
+
N()
|
|
1679
1679
|
]
|
|
1680
1680
|
},
|
|
1681
1681
|
w.pathname
|
|
1682
1682
|
);
|
|
1683
|
-
}, lr = _(
|
|
1683
|
+
}, lr = _(ii), ti = {
|
|
1684
1684
|
icon: "Cross",
|
|
1685
1685
|
title: ""
|
|
1686
1686
|
}, FA = RA(
|
|
@@ -1691,9 +1691,9 @@ const rr = _(
|
|
|
1691
1691
|
style: o,
|
|
1692
1692
|
children: r,
|
|
1693
1693
|
paddingHorizontal: n = !0,
|
|
1694
|
-
closeButton: l =
|
|
1694
|
+
closeButton: l = ti
|
|
1695
1695
|
}, c) => /* @__PURE__ */ A(U, { children: /* @__PURE__ */ A(
|
|
1696
|
-
|
|
1696
|
+
be,
|
|
1697
1697
|
{
|
|
1698
1698
|
blur: !1,
|
|
1699
1699
|
isShow: i,
|
|
@@ -1711,9 +1711,9 @@ const rr = _(
|
|
|
1711
1711
|
// new style
|
|
1712
1712
|
...o
|
|
1713
1713
|
},
|
|
1714
|
-
children: /* @__PURE__ */ g(
|
|
1714
|
+
children: /* @__PURE__ */ g(a, { padding: "lg", children: [
|
|
1715
1715
|
l ? /* @__PURE__ */ g(
|
|
1716
|
-
|
|
1716
|
+
a,
|
|
1717
1717
|
{
|
|
1718
1718
|
direction: "row",
|
|
1719
1719
|
align: "center",
|
|
@@ -1749,13 +1749,12 @@ const rr = _(
|
|
|
1749
1749
|
] })
|
|
1750
1750
|
}
|
|
1751
1751
|
) })
|
|
1752
|
-
),
|
|
1752
|
+
), ke = _(
|
|
1753
1753
|
({ children: e, borderBottom: i = !0, padding: t = !0 }) => {
|
|
1754
1754
|
const o = X("lg");
|
|
1755
1755
|
return /* @__PURE__ */ A(
|
|
1756
|
-
|
|
1756
|
+
a,
|
|
1757
1757
|
{
|
|
1758
|
-
id: "asdasd",
|
|
1759
1758
|
padding: t ? "md" : "spacing-0",
|
|
1760
1759
|
paddingLeft: t ? o ? "lg" : "md" : "spacing-0",
|
|
1761
1760
|
paddingRight: t ? o ? "lg" : "md" : "spacing-0",
|
|
@@ -1766,26 +1765,11 @@ const rr = _(
|
|
|
1766
1765
|
}
|
|
1767
1766
|
);
|
|
1768
1767
|
}
|
|
1769
|
-
),
|
|
1770
|
-
({ children: e, ...i }) => {
|
|
1771
|
-
const t = X("lg");
|
|
1772
|
-
return /* @__PURE__ */ A(
|
|
1773
|
-
C,
|
|
1774
|
-
{
|
|
1775
|
-
padding: "md",
|
|
1776
|
-
paddingLeft: t ? "lg" : "md",
|
|
1777
|
-
paddingRight: t ? "lg" : "md",
|
|
1778
|
-
gap: "md",
|
|
1779
|
-
...i,
|
|
1780
|
-
children: e
|
|
1781
|
-
}
|
|
1782
|
-
);
|
|
1783
|
-
}
|
|
1784
|
-
), ri = _(
|
|
1768
|
+
), Ee = _(
|
|
1785
1769
|
({ children: e, borderTop: i = !0, padding: t = !0 }) => {
|
|
1786
1770
|
const o = X("lg");
|
|
1787
1771
|
return /* @__PURE__ */ A(
|
|
1788
|
-
|
|
1772
|
+
a,
|
|
1789
1773
|
{
|
|
1790
1774
|
padding: t ? "md" : "spacing-0",
|
|
1791
1775
|
paddingLeft: t ? o ? "lg" : "md" : "spacing-0",
|
|
@@ -1797,6 +1781,21 @@ const rr = _(
|
|
|
1797
1781
|
}
|
|
1798
1782
|
);
|
|
1799
1783
|
}
|
|
1784
|
+
), ri = _(
|
|
1785
|
+
({ children: e, ...i }) => {
|
|
1786
|
+
const t = X("lg");
|
|
1787
|
+
return /* @__PURE__ */ A(
|
|
1788
|
+
a,
|
|
1789
|
+
{
|
|
1790
|
+
padding: "md",
|
|
1791
|
+
paddingLeft: t ? "lg" : "md",
|
|
1792
|
+
paddingRight: t ? "lg" : "md",
|
|
1793
|
+
gap: "md",
|
|
1794
|
+
...i,
|
|
1795
|
+
children: e
|
|
1796
|
+
}
|
|
1797
|
+
);
|
|
1798
|
+
}
|
|
1800
1799
|
), cr = _(
|
|
1801
1800
|
({
|
|
1802
1801
|
children: e,
|
|
@@ -1808,16 +1807,16 @@ const rr = _(
|
|
|
1808
1807
|
actionContainer: l,
|
|
1809
1808
|
containerProps: c,
|
|
1810
1809
|
bodyProps: s,
|
|
1811
|
-
headerProps:
|
|
1810
|
+
headerProps: C = { borderBottom: !0 },
|
|
1812
1811
|
footerProps: d = { borderTop: !0 },
|
|
1813
1812
|
variantTag: w = "info"
|
|
1814
1813
|
}) => {
|
|
1815
|
-
const B = X("lg"),
|
|
1814
|
+
const B = X("lg"), D = () => t ? /* @__PURE__ */ g(a, { direction: "row", gap: "sm", align: "center", children: [
|
|
1816
1815
|
/* @__PURE__ */ A(Q, { fontWeight: "medium", children: i }),
|
|
1817
|
-
/* @__PURE__ */ A(
|
|
1816
|
+
/* @__PURE__ */ A(DA, { border: !0, text: t, variant: w })
|
|
1818
1817
|
] }) : /* @__PURE__ */ A(Q, { fontWeight: "medium", children: i });
|
|
1819
1818
|
return /* @__PURE__ */ g(
|
|
1820
|
-
|
|
1819
|
+
a,
|
|
1821
1820
|
{
|
|
1822
1821
|
bg: "white",
|
|
1823
1822
|
borderRadius: "rounded-xs",
|
|
@@ -1827,17 +1826,17 @@ const rr = _(
|
|
|
1827
1826
|
borderColor: "border-base",
|
|
1828
1827
|
...c,
|
|
1829
1828
|
children: [
|
|
1830
|
-
r !== null && !!(r || i || o) ? /* @__PURE__ */ A(
|
|
1831
|
-
|
|
1829
|
+
r !== null && !!(r || i || o) ? /* @__PURE__ */ A(ke, { ...C, children: r || /* @__PURE__ */ g(
|
|
1830
|
+
a,
|
|
1832
1831
|
{
|
|
1833
1832
|
direction: "row",
|
|
1834
1833
|
justify: "space-between",
|
|
1835
1834
|
align: "flex-start",
|
|
1836
1835
|
gap: "lg",
|
|
1837
1836
|
children: [
|
|
1838
|
-
/* @__PURE__ */ A(
|
|
1837
|
+
/* @__PURE__ */ A(a, { children: i ? D() : null }),
|
|
1839
1838
|
/* @__PURE__ */ A(
|
|
1840
|
-
|
|
1839
|
+
a,
|
|
1841
1840
|
{
|
|
1842
1841
|
style: B ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
|
|
1843
1842
|
...l,
|
|
@@ -1847,14 +1846,14 @@ const rr = _(
|
|
|
1847
1846
|
]
|
|
1848
1847
|
}
|
|
1849
1848
|
) }) : null,
|
|
1850
|
-
/* @__PURE__ */ A(
|
|
1851
|
-
n ? /* @__PURE__ */ A(
|
|
1849
|
+
/* @__PURE__ */ A(ri, { ...s, children: e }),
|
|
1850
|
+
n ? /* @__PURE__ */ A(Ee, { ...d, children: n }) : null
|
|
1852
1851
|
]
|
|
1853
1852
|
}
|
|
1854
1853
|
);
|
|
1855
1854
|
}
|
|
1856
1855
|
), oi = "#E6E9FB", ni = ({ children: e, onClick: i }) => {
|
|
1857
|
-
const [t, o] =
|
|
1856
|
+
const [t, o] = L("");
|
|
1858
1857
|
return /* @__PURE__ */ A(
|
|
1859
1858
|
wA,
|
|
1860
1859
|
{
|
|
@@ -1886,7 +1885,7 @@ const rr = _(
|
|
|
1886
1885
|
iconProps: c,
|
|
1887
1886
|
variant: s = "default"
|
|
1888
1887
|
}) => {
|
|
1889
|
-
const
|
|
1888
|
+
const C = cA(
|
|
1890
1889
|
() => ({
|
|
1891
1890
|
zIndex: 10,
|
|
1892
1891
|
width: "150px",
|
|
@@ -1895,8 +1894,8 @@ const rr = _(
|
|
|
1895
1894
|
[r]
|
|
1896
1895
|
);
|
|
1897
1896
|
return /* @__PURE__ */ g(ce, { position: n, style: t, children: [
|
|
1898
|
-
/* @__PURE__ */ A(
|
|
1899
|
-
/* @__PURE__ */ A(ge, { style:
|
|
1897
|
+
/* @__PURE__ */ A(fA, { style: o, children: /* @__PURE__ */ A(O, { size: "sm", secondary: !0, ...l, children: /* @__PURE__ */ A(m, { name: e, ...c }) }) }),
|
|
1898
|
+
/* @__PURE__ */ A(ge, { style: C, children: i.map((d, w) => s === "outline-button" ? /* @__PURE__ */ A(se, { children: /* @__PURE__ */ g(
|
|
1900
1899
|
O,
|
|
1901
1900
|
{
|
|
1902
1901
|
size: "sm",
|
|
@@ -1922,11 +1921,11 @@ const rr = _(
|
|
|
1922
1921
|
d.id || w
|
|
1923
1922
|
)) })
|
|
1924
1923
|
] });
|
|
1925
|
-
}, gr = _(ci),
|
|
1924
|
+
}, gr = _(ci), Me = aA.memo(({ text: e, onClose: i }) => {
|
|
1926
1925
|
var o, r;
|
|
1927
1926
|
const t = WA();
|
|
1928
1927
|
return /* @__PURE__ */ g(
|
|
1929
|
-
|
|
1928
|
+
a,
|
|
1930
1929
|
{
|
|
1931
1930
|
direction: "row",
|
|
1932
1931
|
bg: "blue-50",
|
|
@@ -1941,7 +1940,7 @@ const rr = _(
|
|
|
1941
1940
|
align: "center",
|
|
1942
1941
|
display: "flex",
|
|
1943
1942
|
children: [
|
|
1944
|
-
/* @__PURE__ */ A(
|
|
1943
|
+
/* @__PURE__ */ A(a, { paddingLeft: "sm", flex: "1", children: /* @__PURE__ */ A(Q, { children: e }) }),
|
|
1945
1944
|
/* @__PURE__ */ A(
|
|
1946
1945
|
wA,
|
|
1947
1946
|
{
|
|
@@ -1964,13 +1963,13 @@ const rr = _(
|
|
|
1964
1963
|
}
|
|
1965
1964
|
);
|
|
1966
1965
|
}), gi = aA.memo(({ items: e = [], onClose: i }) => /* @__PURE__ */ A(
|
|
1967
|
-
|
|
1966
|
+
a,
|
|
1968
1967
|
{
|
|
1969
1968
|
direction: "row",
|
|
1970
1969
|
gap: "sm",
|
|
1971
1970
|
flexWrap: "nowrap",
|
|
1972
1971
|
style: { minWidth: "max-content" },
|
|
1973
|
-
children: e == null ? void 0 : e.map((t, o) => t.valueText ? /* @__PURE__ */ A(
|
|
1972
|
+
children: e == null ? void 0 : e.map((t, o) => t.valueText ? /* @__PURE__ */ A(Me, { text: t.valueText, onClose: () => i == null ? void 0 : i(t) }, o) : null)
|
|
1974
1973
|
}
|
|
1975
1974
|
)), ie = (e) => JSON.stringify(e), si = (e) => {
|
|
1976
1975
|
const i = e;
|
|
@@ -1993,17 +1992,17 @@ const rr = _(
|
|
|
1993
1992
|
}
|
|
1994
1993
|
let t = new Date(e);
|
|
1995
1994
|
return t = typeof e != "object" ? void 0 : t, t;
|
|
1996
|
-
}, Ci = aA.memo(({ title: e, resetButton: i }) => /* @__PURE__ */ g(
|
|
1997
|
-
/* @__PURE__ */ A(
|
|
1998
|
-
/* @__PURE__ */ A(
|
|
1995
|
+
}, Ci = aA.memo(({ title: e, resetButton: i }) => /* @__PURE__ */ g(a, { direction: "row", justify: "space-between", marginBottom: "md", children: [
|
|
1996
|
+
/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(Q, { fontWeight: "bold", children: e }) }),
|
|
1997
|
+
/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(wA, { onClick: i == null ? void 0 : i.onClick, children: /* @__PURE__ */ A(Q, { fontWeight: "bold", color: "error", children: (i == null ? void 0 : i.label) || "Reset" }) }) })
|
|
1999
1998
|
] })), Bi = aA.memo(
|
|
2000
1999
|
({ value: e, options: i = [], onChange: t, multiple: o }) => {
|
|
2001
2000
|
const r = (e == null ? void 0 : e.map((c) => c.value)) || [], n = (i == null ? void 0 : i.filter((c) => r.includes(c.value))) || [], l = (c) => {
|
|
2002
2001
|
const s = [...n];
|
|
2003
|
-
let
|
|
2004
|
-
o ?
|
|
2002
|
+
let C = [];
|
|
2003
|
+
o ? C = r.includes(c.value) ? s.filter((d) => d.value !== c.value) : [...s, c] : C = [c], t == null || t(C);
|
|
2005
2004
|
};
|
|
2006
|
-
return /* @__PURE__ */ A(
|
|
2005
|
+
return /* @__PURE__ */ A(a, { direction: "row", gap: "sm", flexWrap: "wrap", children: i == null ? void 0 : i.map((c, s) => /* @__PURE__ */ A(
|
|
2007
2006
|
O,
|
|
2008
2007
|
{
|
|
2009
2008
|
...r.includes(c.value) ? { primary: !0 } : { secondary: !0 },
|
|
@@ -2013,7 +2012,7 @@ const rr = _(
|
|
|
2013
2012
|
s
|
|
2014
2013
|
)) });
|
|
2015
2014
|
}
|
|
2016
|
-
),
|
|
2015
|
+
), me = aA.memo(
|
|
2017
2016
|
RA(
|
|
2018
2017
|
({
|
|
2019
2018
|
label: e,
|
|
@@ -2025,22 +2024,22 @@ const rr = _(
|
|
|
2025
2024
|
relationLabel: l,
|
|
2026
2025
|
name: c,
|
|
2027
2026
|
multiple: s,
|
|
2028
|
-
searchable:
|
|
2027
|
+
searchable: C,
|
|
2029
2028
|
onSearch: d,
|
|
2030
2029
|
value: w,
|
|
2031
2030
|
dateFilter: B,
|
|
2032
|
-
enableInputDate:
|
|
2033
|
-
withSearchParam:
|
|
2031
|
+
enableInputDate: D,
|
|
2032
|
+
withSearchParam: b,
|
|
2034
2033
|
// disabled,
|
|
2035
2034
|
rangedDate: h,
|
|
2036
|
-
disabled:
|
|
2037
|
-
inputTextType:
|
|
2038
|
-
min:
|
|
2035
|
+
disabled: F,
|
|
2036
|
+
inputTextType: N = "text",
|
|
2037
|
+
min: Z,
|
|
2039
2038
|
max: v
|
|
2040
|
-
},
|
|
2039
|
+
}, E) => {
|
|
2041
2040
|
const I = r == null ? void 0 : r.length;
|
|
2042
|
-
let
|
|
2043
|
-
const
|
|
2041
|
+
let W;
|
|
2042
|
+
const x = () => {
|
|
2044
2043
|
switch (i) {
|
|
2045
2044
|
case "dropdown":
|
|
2046
2045
|
return /* @__PURE__ */ A(
|
|
@@ -2048,9 +2047,9 @@ const rr = _(
|
|
|
2048
2047
|
{
|
|
2049
2048
|
onSearch: d,
|
|
2050
2049
|
multiSelect: s,
|
|
2051
|
-
searchAble:
|
|
2050
|
+
searchAble: C,
|
|
2052
2051
|
placeholder: n,
|
|
2053
|
-
onChange: (
|
|
2052
|
+
onChange: (K) => o == null ? void 0 : o({ value: K, name: c, type: i }),
|
|
2054
2053
|
dropdownLists: t || [],
|
|
2055
2054
|
defaultValue: w || te()
|
|
2056
2055
|
}
|
|
@@ -2059,12 +2058,12 @@ const rr = _(
|
|
|
2059
2058
|
return /* @__PURE__ */ A(
|
|
2060
2059
|
ne,
|
|
2061
2060
|
{
|
|
2062
|
-
input:
|
|
2061
|
+
input: D,
|
|
2063
2062
|
filter: B,
|
|
2064
|
-
value: ai(w ||
|
|
2065
|
-
onChange: (
|
|
2063
|
+
value: ai(w || W, h),
|
|
2064
|
+
onChange: (K) => o == null ? void 0 : o({ value: K, name: c, type: i }),
|
|
2066
2065
|
rangedDate: h,
|
|
2067
|
-
ref:
|
|
2066
|
+
ref: E
|
|
2068
2067
|
}
|
|
2069
2068
|
);
|
|
2070
2069
|
case "select-button":
|
|
@@ -2073,7 +2072,7 @@ const rr = _(
|
|
|
2073
2072
|
{
|
|
2074
2073
|
multiple: s,
|
|
2075
2074
|
value: w || te(),
|
|
2076
|
-
onChange: (
|
|
2075
|
+
onChange: (K) => o == null ? void 0 : o({ value: K, name: c, type: i }),
|
|
2077
2076
|
options: t
|
|
2078
2077
|
}
|
|
2079
2078
|
);
|
|
@@ -2081,53 +2080,53 @@ const rr = _(
|
|
|
2081
2080
|
return /* @__PURE__ */ A(
|
|
2082
2081
|
pA,
|
|
2083
2082
|
{
|
|
2084
|
-
onChange: ({ target: { value:
|
|
2085
|
-
value: w ||
|
|
2083
|
+
onChange: ({ target: { value: K } }) => o == null ? void 0 : o({ value: K, name: c, type: i }),
|
|
2084
|
+
value: w || W,
|
|
2086
2085
|
placeholder: n,
|
|
2087
|
-
disabled:
|
|
2088
|
-
type:
|
|
2086
|
+
disabled: F,
|
|
2087
|
+
type: N,
|
|
2089
2088
|
name: c,
|
|
2090
|
-
...
|
|
2091
|
-
...(!
|
|
2092
|
-
minLength:
|
|
2089
|
+
...N === "number" && { min: Z, max: v },
|
|
2090
|
+
...(!N || N === "text") && {
|
|
2091
|
+
minLength: Z,
|
|
2093
2092
|
maxLength: v
|
|
2094
2093
|
}
|
|
2095
2094
|
}
|
|
2096
2095
|
);
|
|
2097
2096
|
case "checkbox":
|
|
2098
|
-
return /* @__PURE__ */ A(
|
|
2099
|
-
const
|
|
2097
|
+
return /* @__PURE__ */ A(a, { children: t == null ? void 0 : t.map((K) => {
|
|
2098
|
+
const M = Array.isArray(w) && w.includes(K.value);
|
|
2100
2099
|
return /* @__PURE__ */ A(
|
|
2101
2100
|
bA,
|
|
2102
2101
|
{
|
|
2103
|
-
label:
|
|
2104
|
-
checked:
|
|
2102
|
+
label: K.label,
|
|
2103
|
+
checked: M,
|
|
2105
2104
|
sizes: "sm",
|
|
2106
2105
|
onChange: (G) => {
|
|
2107
|
-
const
|
|
2106
|
+
const k = Array.isArray(w) ? w : [], u = G.target.checked ? [...k, K.value] : k.filter((p) => p !== K.value);
|
|
2108
2107
|
o == null || o({ value: u, name: c, type: i });
|
|
2109
2108
|
}
|
|
2110
2109
|
},
|
|
2111
|
-
|
|
2110
|
+
K.value
|
|
2112
2111
|
);
|
|
2113
2112
|
}) });
|
|
2114
2113
|
default:
|
|
2115
2114
|
return null;
|
|
2116
2115
|
}
|
|
2117
2116
|
};
|
|
2118
|
-
return I ? /* @__PURE__ */ A(
|
|
2119
|
-
|
|
2117
|
+
return I ? /* @__PURE__ */ A(a, { marginBottom: "lg", children: r == null ? void 0 : r.map((K, M) => /* @__PURE__ */ A(
|
|
2118
|
+
me,
|
|
2120
2119
|
{
|
|
2121
|
-
ref:
|
|
2120
|
+
ref: E,
|
|
2122
2121
|
onChange: o,
|
|
2123
|
-
...
|
|
2124
|
-
withSearchParam:
|
|
2122
|
+
...K,
|
|
2123
|
+
withSearchParam: b
|
|
2125
2124
|
},
|
|
2126
|
-
|
|
2127
|
-
)) }) : /* @__PURE__ */ g(
|
|
2125
|
+
M
|
|
2126
|
+
)) }) : /* @__PURE__ */ g(a, { marginBottom: "sm", children: [
|
|
2128
2127
|
l ? /* @__PURE__ */ A(Q, { color: "text-muted", marginBottom: "sm", fontWeight: "medium", children: l }) : null,
|
|
2129
2128
|
e ? /* @__PURE__ */ A(Q, { marginBottom: "sm", fontWeight: "medium", children: e }) : null,
|
|
2130
|
-
/* @__PURE__ */ A(
|
|
2129
|
+
/* @__PURE__ */ A(a, { children: x() })
|
|
2131
2130
|
] });
|
|
2132
2131
|
}
|
|
2133
2132
|
)
|
|
@@ -2141,9 +2140,9 @@ const rr = _(
|
|
|
2141
2140
|
onHide: n,
|
|
2142
2141
|
resetting: l
|
|
2143
2142
|
}) => {
|
|
2144
|
-
const [c, s] =
|
|
2143
|
+
const [c, s] = L(!1), C = iA(null), d = ({ value: B, name: D, type: b }) => {
|
|
2145
2144
|
if (o)
|
|
2146
|
-
switch (
|
|
2145
|
+
switch (b) {
|
|
2147
2146
|
case "date":
|
|
2148
2147
|
si(B);
|
|
2149
2148
|
break;
|
|
@@ -2157,7 +2156,7 @@ const rr = _(
|
|
|
2157
2156
|
}, w = () => {
|
|
2158
2157
|
s(!0), r == null || r(!0);
|
|
2159
2158
|
};
|
|
2160
|
-
return
|
|
2159
|
+
return R(() => {
|
|
2161
2160
|
(c || l) && (s(!1), r == null || r(!1));
|
|
2162
2161
|
}, [c, l]), /* @__PURE__ */ A(U, { children: /* @__PURE__ */ g(
|
|
2163
2162
|
FA,
|
|
@@ -2167,19 +2166,19 @@ const rr = _(
|
|
|
2167
2166
|
show: e || !1,
|
|
2168
2167
|
onHide: n || (() => {
|
|
2169
2168
|
}),
|
|
2170
|
-
ref:
|
|
2169
|
+
ref: C,
|
|
2171
2170
|
children: [
|
|
2172
2171
|
/* @__PURE__ */ A(Ci, { title: i, resetButton: { onClick: w } }),
|
|
2173
|
-
c || l ? null : /* @__PURE__ */ A(
|
|
2174
|
-
|
|
2172
|
+
c || l ? null : /* @__PURE__ */ A(a, { children: t == null ? void 0 : t.map((B, D) => /* @__PURE__ */ A(
|
|
2173
|
+
me,
|
|
2175
2174
|
{
|
|
2176
|
-
borderBottom:
|
|
2175
|
+
borderBottom: D !== t.length - 1,
|
|
2177
2176
|
onChange: d,
|
|
2178
2177
|
withSearchParam: o,
|
|
2179
2178
|
...B,
|
|
2180
|
-
ref:
|
|
2179
|
+
ref: C
|
|
2181
2180
|
},
|
|
2182
|
-
|
|
2181
|
+
D
|
|
2183
2182
|
)) })
|
|
2184
2183
|
]
|
|
2185
2184
|
}
|
|
@@ -2220,7 +2219,7 @@ const rr = _(
|
|
|
2220
2219
|
function sr(e) {
|
|
2221
2220
|
return e.split(" ").map((i) => i[0]).join("").slice(0, 2).toUpperCase();
|
|
2222
2221
|
}
|
|
2223
|
-
const
|
|
2222
|
+
const SA = (e) => {
|
|
2224
2223
|
const i = {
|
|
2225
2224
|
day: "2-digit",
|
|
2226
2225
|
month: "short",
|
|
@@ -2396,18 +2395,18 @@ const xr = (e) => {
|
|
|
2396
2395
|
}), t;
|
|
2397
2396
|
}, Sr = (e) => {
|
|
2398
2397
|
var v;
|
|
2399
|
-
const i = cA(() => ({ ...Ii, ...e }), [e]), [t, o] =
|
|
2398
|
+
const i = cA(() => ({ ...Ii, ...e }), [e]), [t, o] = L(!1), [r, n] = L(!1), [l] = L(void 0), c = () => n(!0), s = () => n(!1), C = r ? s : c, d = () => {
|
|
2400
2399
|
o(!0);
|
|
2401
|
-
}, w = (
|
|
2402
|
-
o(
|
|
2403
|
-
}, B = l ? ki(l) : void 0,
|
|
2404
|
-
var
|
|
2405
|
-
const I = UA(
|
|
2406
|
-
let
|
|
2407
|
-
const
|
|
2408
|
-
switch (
|
|
2409
|
-
const u = UA(
|
|
2410
|
-
u &&
|
|
2400
|
+
}, w = (E) => {
|
|
2401
|
+
o(E);
|
|
2402
|
+
}, B = l ? ki(l) : void 0, D = !!(B && ((v = Object.values(B)) == null ? void 0 : v.length) > 0), b = () => B ? Object.keys(B).map((E) => {
|
|
2403
|
+
var K, M, G;
|
|
2404
|
+
const I = UA(E, i.fields), W = [];
|
|
2405
|
+
let x = "";
|
|
2406
|
+
const P = (K = I == null ? void 0 : I.childrenKey) == null ? void 0 : K.length, $ = I == null ? void 0 : I.parentKey;
|
|
2407
|
+
switch (P && ((M = I == null ? void 0 : I.childrenKey) == null || M.forEach((k) => {
|
|
2408
|
+
const u = UA(k, i.fields);
|
|
2409
|
+
u && W.push({
|
|
2411
2410
|
name: u == null ? void 0 : u.name,
|
|
2412
2411
|
label: u == null ? void 0 : u.label,
|
|
2413
2412
|
value: B[u == null ? void 0 : u.name]
|
|
@@ -2415,63 +2414,63 @@ const xr = (e) => {
|
|
|
2415
2414
|
})), I == null ? void 0 : I.type) {
|
|
2416
2415
|
case "dropdown":
|
|
2417
2416
|
case "select-button":
|
|
2418
|
-
const
|
|
2419
|
-
|
|
2417
|
+
const k = B[E] && typeof B[E] != "string" ? B[E] : [], u = (k == null ? void 0 : k.length) > 0 ? (G = k.map((y) => y.label)) == null ? void 0 : G.join(",") : B[E];
|
|
2418
|
+
x = `${I == null ? void 0 : I.label}: ${u}`;
|
|
2420
2419
|
break;
|
|
2421
2420
|
case "checkbox":
|
|
2422
|
-
const q = (Array.isArray(B[
|
|
2421
|
+
const q = (Array.isArray(B[E]) ? B[E] : []).map(
|
|
2423
2422
|
(y) => {
|
|
2424
2423
|
var eA, tA;
|
|
2425
2424
|
return ((tA = (eA = I == null ? void 0 : I.options) == null ? void 0 : eA.find((QA) => QA.value === y)) == null ? void 0 : tA.label) || y;
|
|
2426
2425
|
}
|
|
2427
2426
|
).join(", ");
|
|
2428
|
-
|
|
2427
|
+
x = `${I == null ? void 0 : I.label}: ${q}`;
|
|
2429
2428
|
break;
|
|
2430
2429
|
case "date":
|
|
2431
2430
|
if (I.rangedDate) {
|
|
2432
|
-
const y = B[
|
|
2433
|
-
|
|
2431
|
+
const y = B[E], eA = (I == null ? void 0 : I.dateValueFormatText) === "indonesian" ? SA(new Date(y == null ? void 0 : y.from)) : y == null ? void 0 : y.from, tA = (I == null ? void 0 : I.dateValueFormatText) === "indonesian" ? SA(new Date(y == null ? void 0 : y.to)) : y == null ? void 0 : y.to;
|
|
2432
|
+
x = `${I == null ? void 0 : I.label}: ${eA || ""} ~ ${tA || ""}`;
|
|
2434
2433
|
break;
|
|
2435
2434
|
}
|
|
2436
|
-
const
|
|
2437
|
-
|
|
2435
|
+
const z = (I == null ? void 0 : I.dateValueFormatText) === "indonesian" ? SA(new Date(B[E])) : B[E];
|
|
2436
|
+
x = `${I == null ? void 0 : I.label}: ${z || ""}`;
|
|
2438
2437
|
break;
|
|
2439
2438
|
default:
|
|
2440
|
-
|
|
2439
|
+
x = `${I == null ? void 0 : I.label}: ${B[E]}`;
|
|
2441
2440
|
break;
|
|
2442
2441
|
}
|
|
2443
|
-
if (
|
|
2444
|
-
let
|
|
2442
|
+
if (P && W.length > 0) {
|
|
2443
|
+
let k = W.map((u) => {
|
|
2445
2444
|
var p, q;
|
|
2446
|
-
return u != null && u.value && typeof u.value != "string" ? (q = (p = u == null ? void 0 : u.value) == null ? void 0 : p.map((
|
|
2445
|
+
return u != null && u.value && typeof u.value != "string" ? (q = (p = u == null ? void 0 : u.value) == null ? void 0 : p.map((z) => z == null ? void 0 : z.label)) == null ? void 0 : q.join(",") : u.value;
|
|
2447
2446
|
});
|
|
2448
|
-
|
|
2447
|
+
k = k.filter(
|
|
2449
2448
|
(u) => typeof u < "u" && u !== "" && u !== null
|
|
2450
|
-
),
|
|
2449
|
+
), k && k.length > 0 && (x = `${x} ${I.relationLabelChip || "by"} ${k}`);
|
|
2451
2450
|
}
|
|
2452
|
-
return $ && (
|
|
2451
|
+
return $ && (x = ""), {
|
|
2453
2452
|
name: I == null ? void 0 : I.name,
|
|
2454
2453
|
label: I == null ? void 0 : I.label,
|
|
2455
|
-
value: B[
|
|
2456
|
-
valueText:
|
|
2457
|
-
children:
|
|
2454
|
+
value: B[E],
|
|
2455
|
+
valueText: x,
|
|
2456
|
+
children: W
|
|
2458
2457
|
};
|
|
2459
|
-
}) : [], h = (
|
|
2460
|
-
|
|
2461
|
-
},
|
|
2458
|
+
}) : [], h = (E) => {
|
|
2459
|
+
E != null && E.name && o(!0);
|
|
2460
|
+
}, F = b();
|
|
2462
2461
|
return {
|
|
2463
2462
|
value: B,
|
|
2464
2463
|
open: c,
|
|
2465
2464
|
close: s,
|
|
2466
|
-
toggle:
|
|
2465
|
+
toggle: C,
|
|
2467
2466
|
reset: d,
|
|
2468
|
-
chips:
|
|
2467
|
+
chips: F,
|
|
2469
2468
|
toggleConfig: {
|
|
2470
|
-
active:
|
|
2471
|
-
onClick:
|
|
2469
|
+
active: D,
|
|
2470
|
+
onClick: C
|
|
2472
2471
|
},
|
|
2473
2472
|
chipsConfig: {
|
|
2474
|
-
items:
|
|
2473
|
+
items: F,
|
|
2475
2474
|
onClose: h
|
|
2476
2475
|
},
|
|
2477
2476
|
config: {
|
|
@@ -2486,7 +2485,7 @@ const xr = (e) => {
|
|
|
2486
2485
|
Container: wi,
|
|
2487
2486
|
Toggle: di,
|
|
2488
2487
|
Chips: gi,
|
|
2489
|
-
Chip:
|
|
2488
|
+
Chip: Me
|
|
2490
2489
|
}, Ei = (e) => /* @__PURE__ */ A(Q, { variant: "h1", children: e.children, ...e.props }), Mi = (e) => /* @__PURE__ */ A(Q, { variant: "h2", children: e.children, ...e.props }), mi = (e) => /* @__PURE__ */ A(Q, { variant: "h3", children: e.children, ...e.props }), yi = (e) => /* @__PURE__ */ A(Q, { variant: "h4", children: e.children, ...e.props }), xi = (e) => /* @__PURE__ */ A(Q, { variant: "h5", children: e.children, ...e.props }), fi = (e) => /* @__PURE__ */ A(Q, { variant: "h6", children: e.children, ...e.props }), Si = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h1", children: e.children, ...e.props }), bi = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h2", children: e.children, ...e.props }), Li = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h3", children: e.children, ...e.props }), Gi = (e) => /* @__PURE__ */ A(Q, { variant: "body-1", children: e.children, ...e.props }), Oi = (e) => /* @__PURE__ */ A(Q, { variant: "body-2", children: e.children, ...e.props }), Yi = (e) => /* @__PURE__ */ A(Q, { variant: "body-3", children: e.children, ...e.props }), J = {
|
|
2491
2490
|
H1: Ei,
|
|
2492
2491
|
H2: Mi,
|
|
@@ -2501,7 +2500,7 @@ const xr = (e) => {
|
|
|
2501
2500
|
Body2: Oi,
|
|
2502
2501
|
Body3: Yi
|
|
2503
2502
|
}, PA = () => {
|
|
2504
|
-
const [e, i] = jA(), t = YA(e.toString()), o = Qe(), r =
|
|
2503
|
+
const [e, i] = jA(), t = YA(e.toString()), o = Qe(), r = EA(), n = o.id;
|
|
2505
2504
|
return {
|
|
2506
2505
|
// query params
|
|
2507
2506
|
setSearchParams: i,
|
|
@@ -2530,46 +2529,46 @@ const xr = (e) => {
|
|
|
2530
2529
|
pageKey: s = "page"
|
|
2531
2530
|
}) => {
|
|
2532
2531
|
if (o) {
|
|
2533
|
-
let
|
|
2532
|
+
let C;
|
|
2534
2533
|
switch (t) {
|
|
2535
2534
|
case "search":
|
|
2536
|
-
|
|
2535
|
+
C = zi(e);
|
|
2537
2536
|
break;
|
|
2538
2537
|
case "dropdown":
|
|
2539
2538
|
case "dropdown-multiple":
|
|
2540
|
-
|
|
2539
|
+
C = pi(e);
|
|
2541
2540
|
break;
|
|
2542
2541
|
case "radio":
|
|
2543
|
-
|
|
2542
|
+
C = ji(e);
|
|
2544
2543
|
break;
|
|
2545
2544
|
case "date-range":
|
|
2546
|
-
|
|
2545
|
+
C = Fi(e);
|
|
2547
2546
|
break;
|
|
2548
2547
|
case "advanced-date-range":
|
|
2549
|
-
|
|
2548
|
+
C = Ki(e);
|
|
2550
2549
|
break;
|
|
2551
2550
|
case "date":
|
|
2552
|
-
|
|
2551
|
+
C = Ni(e);
|
|
2553
2552
|
break;
|
|
2554
2553
|
default:
|
|
2555
|
-
|
|
2554
|
+
C = e;
|
|
2556
2555
|
break;
|
|
2557
2556
|
}
|
|
2558
|
-
if (typeof
|
|
2557
|
+
if (typeof C < "u") {
|
|
2559
2558
|
const w = {
|
|
2560
2559
|
...n[c] && typeof n[c] == "string" ? JSON.parse(n[c]) : void 0,
|
|
2561
|
-
[i]:
|
|
2560
|
+
[i]: C
|
|
2562
2561
|
}, B = { ...n };
|
|
2563
2562
|
l && typeof l == "string" && delete B[l], delete B[s];
|
|
2564
|
-
const
|
|
2563
|
+
const D = {
|
|
2565
2564
|
...B,
|
|
2566
2565
|
[c]: JSON.stringify(w)
|
|
2567
|
-
},
|
|
2568
|
-
|
|
2566
|
+
}, b = new URLSearchParams(n).toString(), h = new URLSearchParams(
|
|
2567
|
+
D
|
|
2569
2568
|
).toString();
|
|
2570
|
-
if (
|
|
2569
|
+
if (b === h)
|
|
2571
2570
|
return;
|
|
2572
|
-
r(
|
|
2571
|
+
r(D);
|
|
2573
2572
|
}
|
|
2574
2573
|
}
|
|
2575
2574
|
}, KA = ({
|
|
@@ -2630,35 +2629,35 @@ const xr = (e) => {
|
|
|
2630
2629
|
pageKey: o,
|
|
2631
2630
|
filters: r
|
|
2632
2631
|
}) => {
|
|
2633
|
-
const { searchParams: n, setSearchParams: l, searchQueries: c } = PA(), [s,
|
|
2632
|
+
const { searchParams: n, setSearchParams: l, searchQueries: c } = PA(), [s, C] = L({}), d = () => {
|
|
2634
2633
|
n.delete(t || "filter"), l(n);
|
|
2635
|
-
}, w = (B,
|
|
2634
|
+
}, w = (B, D) => {
|
|
2636
2635
|
switch (B.type) {
|
|
2637
2636
|
case "radio": {
|
|
2638
|
-
const { show:
|
|
2639
|
-
return
|
|
2637
|
+
const { show: b = !0 } = B;
|
|
2638
|
+
return b && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, D);
|
|
2640
2639
|
}
|
|
2641
2640
|
case "dropdown": {
|
|
2642
|
-
const { show:
|
|
2643
|
-
return
|
|
2641
|
+
const { show: b = !0 } = B;
|
|
2642
|
+
return b && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, D);
|
|
2644
2643
|
}
|
|
2645
2644
|
case "date-range":
|
|
2646
|
-
return /* @__PURE__ */ A(
|
|
2645
|
+
return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, D);
|
|
2647
2646
|
case "date":
|
|
2648
|
-
return /* @__PURE__ */ A(
|
|
2647
|
+
return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, D);
|
|
2649
2648
|
case "dropdown-multiple": {
|
|
2650
|
-
const { show:
|
|
2651
|
-
return
|
|
2649
|
+
const { show: b = !0 } = B;
|
|
2650
|
+
return b && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, D);
|
|
2652
2651
|
}
|
|
2653
2652
|
default:
|
|
2654
2653
|
return null;
|
|
2655
2654
|
}
|
|
2656
2655
|
};
|
|
2657
|
-
return /* @__PURE__ */ A(FA, { onHide: i, show: e || !1, children: /* @__PURE__ */ g(
|
|
2656
|
+
return /* @__PURE__ */ A(FA, { onHide: i, show: e || !1, children: /* @__PURE__ */ g(a, { direction: "column", gap: "md", children: [
|
|
2658
2657
|
/* @__PURE__ */ g(T, { direction: "row", justify: "space-between", align: "center", children: [
|
|
2659
|
-
/* @__PURE__ */ A(
|
|
2658
|
+
/* @__PURE__ */ A(a, { children: "Filter" }),
|
|
2660
2659
|
/* @__PURE__ */ A(
|
|
2661
|
-
|
|
2660
|
+
a,
|
|
2662
2661
|
{
|
|
2663
2662
|
style: { cursor: "pointer" },
|
|
2664
2663
|
onClick: d,
|
|
@@ -2666,7 +2665,7 @@ const xr = (e) => {
|
|
|
2666
2665
|
}
|
|
2667
2666
|
)
|
|
2668
2667
|
] }),
|
|
2669
|
-
r == null ? void 0 : r.map((B,
|
|
2668
|
+
r == null ? void 0 : r.map((B, D) => w(B, D))
|
|
2670
2669
|
] }) });
|
|
2671
2670
|
}, Ji = ({
|
|
2672
2671
|
searchKey: e = "q",
|
|
@@ -2678,17 +2677,17 @@ const xr = (e) => {
|
|
|
2678
2677
|
showStatusFilter: l = !0,
|
|
2679
2678
|
filterKey: c = "filter",
|
|
2680
2679
|
pageKey: s = "page",
|
|
2681
|
-
customWidthSearch:
|
|
2680
|
+
customWidthSearch: C,
|
|
2682
2681
|
handleOnReset: d,
|
|
2683
2682
|
filterConfigs: w,
|
|
2684
2683
|
buttonToggleProps: B,
|
|
2685
|
-
position:
|
|
2686
|
-
titleSearchLabel:
|
|
2684
|
+
position: D = "right",
|
|
2685
|
+
titleSearchLabel: b = "Work Order",
|
|
2687
2686
|
withTitleLabels: h = !1
|
|
2688
2687
|
}) => {
|
|
2689
|
-
const
|
|
2688
|
+
const N = (B == null ? void 0 : B.isShowLabel) ?? !0, [Z, v] = L(!1), [E, I] = L(0), W = () => {
|
|
2690
2689
|
I((y) => y + 1);
|
|
2691
|
-
}, { searchParams:
|
|
2690
|
+
}, { searchParams: x, setSearchParams: P, getQueryParam: $ } = PA(), K = YA(x.toString()), M = Zi(e, x, c) || "", [G, k] = L(M), u = $(c), q = !!(u && !(() => {
|
|
2692
2691
|
if (u)
|
|
2693
2692
|
try {
|
|
2694
2693
|
const y = JSON.parse(u);
|
|
@@ -2697,19 +2696,19 @@ const xr = (e) => {
|
|
|
2697
2696
|
console.error("Filter parameter is not a valid JSON:", y);
|
|
2698
2697
|
}
|
|
2699
2698
|
return !1;
|
|
2700
|
-
})()),
|
|
2701
|
-
return
|
|
2702
|
-
|
|
2703
|
-
}, [
|
|
2704
|
-
if (G ===
|
|
2699
|
+
})()), z = X("md");
|
|
2700
|
+
return R(() => {
|
|
2701
|
+
k(M);
|
|
2702
|
+
}, [M]), R(() => {
|
|
2703
|
+
if (G === M)
|
|
2705
2704
|
return;
|
|
2706
2705
|
const y = window.setTimeout(() => {
|
|
2707
2706
|
re({
|
|
2708
2707
|
value: G,
|
|
2709
2708
|
name: e,
|
|
2710
2709
|
type: "search",
|
|
2711
|
-
searchQueries:
|
|
2712
|
-
setSearchParams:
|
|
2710
|
+
searchQueries: K,
|
|
2711
|
+
setSearchParams: P,
|
|
2713
2712
|
filterKey: c,
|
|
2714
2713
|
pageKey: s
|
|
2715
2714
|
});
|
|
@@ -2719,10 +2718,10 @@ const xr = (e) => {
|
|
|
2719
2718
|
};
|
|
2720
2719
|
}, [
|
|
2721
2720
|
G,
|
|
2722
|
-
|
|
2721
|
+
M,
|
|
2723
2722
|
e,
|
|
2724
|
-
|
|
2725
|
-
|
|
2723
|
+
K,
|
|
2724
|
+
P,
|
|
2726
2725
|
c,
|
|
2727
2726
|
s
|
|
2728
2727
|
]), /* @__PURE__ */ g(
|
|
@@ -2730,23 +2729,23 @@ const xr = (e) => {
|
|
|
2730
2729
|
{
|
|
2731
2730
|
gap: "md",
|
|
2732
2731
|
style: {
|
|
2733
|
-
flexDirection:
|
|
2732
|
+
flexDirection: z && D === "left" ? "row" : z && D === "right" ? "row-reverse" : "column"
|
|
2734
2733
|
},
|
|
2735
2734
|
align: "flex-end",
|
|
2736
2735
|
children: [
|
|
2737
|
-
q && /* @__PURE__ */ A(
|
|
2736
|
+
q && /* @__PURE__ */ A(a, { justify: "flex-end", children: /* @__PURE__ */ A(
|
|
2738
2737
|
O,
|
|
2739
2738
|
{
|
|
2740
2739
|
onClick: () => {
|
|
2741
|
-
const y = new URLSearchParams(
|
|
2742
|
-
y.delete(c),
|
|
2740
|
+
const y = new URLSearchParams(x);
|
|
2741
|
+
y.delete(c), P(y), k(""), W(), d && d();
|
|
2743
2742
|
},
|
|
2744
2743
|
secondary: !0,
|
|
2745
2744
|
children: /* @__PURE__ */ A(Q, { color: "error", fontWeight: "semibold", children: "Reset" })
|
|
2746
2745
|
}
|
|
2747
2746
|
) }),
|
|
2748
2747
|
r == null ? void 0 : r.map(({ minWidth: y, content: eA, title: tA, onClickContainer: QA }, lA) => /* @__PURE__ */ g(
|
|
2749
|
-
|
|
2748
|
+
a,
|
|
2750
2749
|
{
|
|
2751
2750
|
gap: "sm",
|
|
2752
2751
|
onClick: QA,
|
|
@@ -2758,7 +2757,7 @@ const xr = (e) => {
|
|
|
2758
2757
|
eA
|
|
2759
2758
|
]
|
|
2760
2759
|
},
|
|
2761
|
-
`extended-filter-${lA}-${
|
|
2760
|
+
`extended-filter-${lA}-${E}`
|
|
2762
2761
|
)),
|
|
2763
2762
|
!!(w != null && w.length) && /* @__PURE__ */ A(
|
|
2764
2763
|
O,
|
|
@@ -2775,13 +2774,13 @@ const xr = (e) => {
|
|
|
2775
2774
|
}
|
|
2776
2775
|
}
|
|
2777
2776
|
),
|
|
2778
|
-
fullWidth: !
|
|
2777
|
+
fullWidth: !z,
|
|
2779
2778
|
onClick: () => v(!0),
|
|
2780
|
-
children:
|
|
2779
|
+
children: N ? "Filter" : void 0
|
|
2781
2780
|
}
|
|
2782
2781
|
),
|
|
2783
2782
|
l && /* @__PURE__ */ g(
|
|
2784
|
-
|
|
2783
|
+
a,
|
|
2785
2784
|
{
|
|
2786
2785
|
gap: "sm",
|
|
2787
2786
|
style: {
|
|
@@ -2805,20 +2804,20 @@ const xr = (e) => {
|
|
|
2805
2804
|
defaultValue: KA({
|
|
2806
2805
|
get: "value",
|
|
2807
2806
|
name: i,
|
|
2808
|
-
searchParams:
|
|
2807
|
+
searchParams: x,
|
|
2809
2808
|
filterKey: c
|
|
2810
2809
|
}) ? [
|
|
2811
2810
|
{
|
|
2812
2811
|
label: KA({
|
|
2813
2812
|
get: "value",
|
|
2814
2813
|
name: i,
|
|
2815
|
-
searchParams:
|
|
2814
|
+
searchParams: x,
|
|
2816
2815
|
filterKey: c
|
|
2817
2816
|
}) === "active" ? "Active" : "InActive",
|
|
2818
2817
|
value: KA({
|
|
2819
2818
|
get: "value",
|
|
2820
2819
|
name: i,
|
|
2821
|
-
searchParams:
|
|
2820
|
+
searchParams: x,
|
|
2822
2821
|
filterKey: c
|
|
2823
2822
|
})
|
|
2824
2823
|
}
|
|
@@ -2827,39 +2826,39 @@ const xr = (e) => {
|
|
|
2827
2826
|
value: y,
|
|
2828
2827
|
name: i,
|
|
2829
2828
|
type: "dropdown",
|
|
2830
|
-
searchQueries:
|
|
2831
|
-
setSearchParams:
|
|
2829
|
+
searchQueries: K,
|
|
2830
|
+
setSearchParams: P,
|
|
2832
2831
|
filterKey: c
|
|
2833
2832
|
}),
|
|
2834
2833
|
placeholder: h ? "All" : "All Status"
|
|
2835
2834
|
},
|
|
2836
|
-
|
|
2835
|
+
E
|
|
2837
2836
|
)
|
|
2838
2837
|
]
|
|
2839
2838
|
}
|
|
2840
2839
|
),
|
|
2841
2840
|
n && /* @__PURE__ */ g(
|
|
2842
|
-
|
|
2841
|
+
a,
|
|
2843
2842
|
{
|
|
2844
2843
|
gap: "sm",
|
|
2845
2844
|
style: {
|
|
2846
|
-
width:
|
|
2845
|
+
width: C && z ? C : z ? "310px" : ""
|
|
2847
2846
|
},
|
|
2848
2847
|
children: [
|
|
2849
2848
|
h && /* @__PURE__ */ g(J.SubH3, { children: [
|
|
2850
2849
|
"Search for ",
|
|
2851
|
-
|
|
2850
|
+
b
|
|
2852
2851
|
] }),
|
|
2853
2852
|
/* @__PURE__ */ A(
|
|
2854
2853
|
pA,
|
|
2855
2854
|
{
|
|
2856
2855
|
placeholder: t,
|
|
2857
2856
|
leftIcon: /* @__PURE__ */ A(m, { name: "Search", width: 20, height: 20 }),
|
|
2858
|
-
onChange: (y) =>
|
|
2857
|
+
onChange: (y) => k(y.target.value),
|
|
2859
2858
|
value: G,
|
|
2860
2859
|
fullWidth: !0
|
|
2861
2860
|
},
|
|
2862
|
-
|
|
2861
|
+
E + 1 + c
|
|
2863
2862
|
)
|
|
2864
2863
|
]
|
|
2865
2864
|
}
|
|
@@ -2867,7 +2866,7 @@ const xr = (e) => {
|
|
|
2867
2866
|
/* @__PURE__ */ A(
|
|
2868
2867
|
Hi,
|
|
2869
2868
|
{
|
|
2870
|
-
isOpen:
|
|
2869
|
+
isOpen: Z,
|
|
2871
2870
|
onClose: () => v(!1),
|
|
2872
2871
|
filterKey: c,
|
|
2873
2872
|
filters: w,
|
|
@@ -2878,17 +2877,17 @@ const xr = (e) => {
|
|
|
2878
2877
|
}
|
|
2879
2878
|
);
|
|
2880
2879
|
}, qi = ({ children: e, borderRadius: i }) => {
|
|
2881
|
-
const t = iA(null), [o, r] =
|
|
2882
|
-
return
|
|
2880
|
+
const t = iA(null), [o, r] = L("100vh");
|
|
2881
|
+
return R(() => {
|
|
2883
2882
|
const n = () => {
|
|
2884
2883
|
if (t.current) {
|
|
2885
2884
|
const l = t.current.getBoundingClientRect().top;
|
|
2886
|
-
r(`calc(100vh - ${l
|
|
2885
|
+
r(`calc(100vh - ${l}px)`);
|
|
2887
2886
|
}
|
|
2888
2887
|
};
|
|
2889
2888
|
return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
2890
2889
|
}, []), /* @__PURE__ */ A(
|
|
2891
|
-
|
|
2890
|
+
a,
|
|
2892
2891
|
{
|
|
2893
2892
|
ref: t,
|
|
2894
2893
|
fullWidth: !0,
|
|
@@ -2910,7 +2909,7 @@ const xr = (e) => {
|
|
|
2910
2909
|
showFilter: t = !0
|
|
2911
2910
|
}) => {
|
|
2912
2911
|
const o = X("md"), r = () => e ? de(e) ? e : /* @__PURE__ */ A(
|
|
2913
|
-
|
|
2912
|
+
a,
|
|
2914
2913
|
{
|
|
2915
2914
|
style: {
|
|
2916
2915
|
display: "flex",
|
|
@@ -2920,7 +2919,7 @@ const xr = (e) => {
|
|
|
2920
2919
|
textWrap: "nowrap"
|
|
2921
2920
|
},
|
|
2922
2921
|
children: e.map(
|
|
2923
|
-
({ title: n, icon: l, buttonProps: c, onClick: s },
|
|
2922
|
+
({ title: n, icon: l, buttonProps: c, onClick: s }, C) => !n && !l ? null : /* @__PURE__ */ A(
|
|
2924
2923
|
O,
|
|
2925
2924
|
{
|
|
2926
2925
|
fullWidth: !o,
|
|
@@ -2929,13 +2928,13 @@ const xr = (e) => {
|
|
|
2929
2928
|
...c,
|
|
2930
2929
|
children: n
|
|
2931
2930
|
},
|
|
2932
|
-
`action-${
|
|
2931
|
+
`action-${C}`
|
|
2933
2932
|
)
|
|
2934
2933
|
)
|
|
2935
2934
|
}
|
|
2936
2935
|
) : null;
|
|
2937
2936
|
return /* @__PURE__ */ g(
|
|
2938
|
-
|
|
2937
|
+
a,
|
|
2939
2938
|
{
|
|
2940
2939
|
style: {
|
|
2941
2940
|
display: "flex",
|
|
@@ -2955,7 +2954,7 @@ const xr = (e) => {
|
|
|
2955
2954
|
},
|
|
2956
2955
|
children: [
|
|
2957
2956
|
t && /* @__PURE__ */ A(Ji, { ...i }),
|
|
2958
|
-
/* @__PURE__ */ A(
|
|
2957
|
+
/* @__PURE__ */ A(a, { style: { display: "flex", gap: "8px", flexDirection: "row" } }),
|
|
2959
2958
|
r()
|
|
2960
2959
|
]
|
|
2961
2960
|
}
|
|
@@ -2965,7 +2964,7 @@ const xr = (e) => {
|
|
|
2965
2964
|
withMarginBottom: i = !0,
|
|
2966
2965
|
withMarginTop: t = !0
|
|
2967
2966
|
}) => /* @__PURE__ */ g(
|
|
2968
|
-
|
|
2967
|
+
a,
|
|
2969
2968
|
{
|
|
2970
2969
|
style: {
|
|
2971
2970
|
display: "flex",
|
|
@@ -2999,17 +2998,17 @@ const xr = (e) => {
|
|
|
2999
2998
|
showPagination: r = !0,
|
|
3000
2999
|
totalData: n
|
|
3001
3000
|
}) => {
|
|
3002
|
-
const { searchQueries: l, setSearchParams: c, searchParams: s } = PA(),
|
|
3003
|
-
c({ ...l, [i]: String(
|
|
3004
|
-
}, w = (
|
|
3001
|
+
const { searchQueries: l, setSearchParams: c, searchParams: s } = PA(), C = s.get(t), d = (b) => {
|
|
3002
|
+
c({ ...l, [i]: String(b) });
|
|
3003
|
+
}, w = (b) => {
|
|
3005
3004
|
c({
|
|
3006
3005
|
...l,
|
|
3007
|
-
[t]:
|
|
3006
|
+
[t]: b,
|
|
3008
3007
|
[i]: "1"
|
|
3009
3008
|
});
|
|
3010
|
-
}, B = (e == null ? void 0 : e.rangeStart) ?? (((e == null ? void 0 : e.currentPage) || 0) > 1 ? (((e == null ? void 0 : e.currentPage) || 0) - 1) * ((e == null ? void 0 : e.perPage) || 0) + 1 : 1),
|
|
3009
|
+
}, B = (e == null ? void 0 : e.rangeStart) ?? (((e == null ? void 0 : e.currentPage) || 0) > 1 ? (((e == null ? void 0 : e.currentPage) || 0) - 1) * ((e == null ? void 0 : e.perPage) || 0) + 1 : 1), D = (e == null ? void 0 : e.rangeEnd) ?? ((e == null ? void 0 : e.totalCurrentPage) !== (e == null ? void 0 : e.perPage) ? e == null ? void 0 : e.totalData : ((e == null ? void 0 : e.currentPage) || 1) * ((e == null ? void 0 : e.totalCurrentPage) || 0));
|
|
3011
3010
|
return /* @__PURE__ */ A(
|
|
3012
|
-
|
|
3011
|
+
a,
|
|
3013
3012
|
{
|
|
3014
3013
|
style: {
|
|
3015
3014
|
display: "flex",
|
|
@@ -3025,7 +3024,7 @@ const xr = (e) => {
|
|
|
3025
3024
|
flexShrink: 0
|
|
3026
3025
|
},
|
|
3027
3026
|
children: r ? /* @__PURE__ */ g(U, { children: [
|
|
3028
|
-
/* @__PURE__ */ g(
|
|
3027
|
+
/* @__PURE__ */ g(a, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center" }, children: [
|
|
3029
3028
|
/* @__PURE__ */ A(Q, { children: "Rows Per Page: " }),
|
|
3030
3029
|
/* @__PURE__ */ A(
|
|
3031
3030
|
OA,
|
|
@@ -3037,16 +3036,16 @@ const xr = (e) => {
|
|
|
3037
3036
|
{ label: "50", value: "50" },
|
|
3038
3037
|
{ label: "100", value: "100" }
|
|
3039
3038
|
],
|
|
3040
|
-
onChange: (
|
|
3041
|
-
w(
|
|
3039
|
+
onChange: (b) => {
|
|
3040
|
+
w(b[0].value);
|
|
3042
3041
|
},
|
|
3043
|
-
defaultValue:
|
|
3042
|
+
defaultValue: C ? [{ label: `${C} per row`, value: C }] : [{ label: `${o} per row`, value: `${o}` }]
|
|
3044
3043
|
}
|
|
3045
3044
|
),
|
|
3046
|
-
/* @__PURE__ */ A(Q, { children: `${B}-${
|
|
3045
|
+
/* @__PURE__ */ A(Q, { children: `${B}-${D} of ${(e == null ? void 0 : e.totalData) || 0}` })
|
|
3047
3046
|
] }),
|
|
3048
3047
|
/* @__PURE__ */ A(
|
|
3049
|
-
|
|
3048
|
+
Oe,
|
|
3050
3049
|
{
|
|
3051
3050
|
currentPage: e != null && e.currentPage ? Number(e == null ? void 0 : e.currentPage) : 1,
|
|
3052
3051
|
totalCount: e != null && e.totalPage ? Number(e == null ? void 0 : e.totalPage) : 1,
|
|
@@ -3064,34 +3063,34 @@ const xr = (e) => {
|
|
|
3064
3063
|
}
|
|
3065
3064
|
);
|
|
3066
3065
|
}, Ri = ({ filter: e, columnTitle: i }) => {
|
|
3067
|
-
const [t, o] =
|
|
3066
|
+
const [t, o] = L(!1), r = iA(null), n = iA(null), l = iA(null), [c, s] = L(""), [C, d] = L({ top: 0, left: 0 }), w = e.selectedValues, B = cA(() => c ? e.options.filter(
|
|
3068
3067
|
(h) => h.label.toLowerCase().includes(c.toLowerCase())
|
|
3069
3068
|
) : e.options, [e.options, c]);
|
|
3070
|
-
|
|
3069
|
+
R(() => {
|
|
3071
3070
|
if (t && n.current) {
|
|
3072
|
-
const h = n.current.getBoundingClientRect(),
|
|
3071
|
+
const h = n.current.getBoundingClientRect(), F = 280, N = {
|
|
3073
3072
|
top: h.bottom + 8
|
|
3074
3073
|
};
|
|
3075
|
-
e.position === "left" || h.left +
|
|
3074
|
+
e.position === "left" || h.left + F > window.innerWidth ? N.right = window.innerWidth - h.right : N.left = h.left, d(N);
|
|
3076
3075
|
}
|
|
3077
|
-
}, [t, e.position]),
|
|
3076
|
+
}, [t, e.position]), R(() => {
|
|
3078
3077
|
t && l.current ? setTimeout(() => {
|
|
3079
3078
|
var h;
|
|
3080
3079
|
return (h = l.current) == null ? void 0 : h.focus();
|
|
3081
3080
|
}, 50) : s("");
|
|
3082
|
-
}, [t]),
|
|
3083
|
-
const h = (
|
|
3084
|
-
r.current && !r.current.contains(
|
|
3081
|
+
}, [t]), R(() => {
|
|
3082
|
+
const h = (F) => {
|
|
3083
|
+
r.current && !r.current.contains(F.target) && n.current && !n.current.contains(F.target) && o(!1);
|
|
3085
3084
|
};
|
|
3086
3085
|
return t && document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
3087
3086
|
}, [t]);
|
|
3088
|
-
const
|
|
3089
|
-
const
|
|
3090
|
-
e.onFilterChange(
|
|
3091
|
-
},
|
|
3092
|
-
return /* @__PURE__ */ g(
|
|
3087
|
+
const D = (h) => {
|
|
3088
|
+
const F = w.includes(h) ? w.filter((N) => N !== h) : [...w, h];
|
|
3089
|
+
e.onFilterChange(F);
|
|
3090
|
+
}, b = () => e.onFilterChange([]);
|
|
3091
|
+
return /* @__PURE__ */ g(a, { style: { position: "relative" }, children: [
|
|
3093
3092
|
/* @__PURE__ */ A(
|
|
3094
|
-
|
|
3093
|
+
a,
|
|
3095
3094
|
{
|
|
3096
3095
|
ref: n,
|
|
3097
3096
|
style: {
|
|
@@ -3101,8 +3100,8 @@ const xr = (e) => {
|
|
|
3101
3100
|
cursor: "pointer"
|
|
3102
3101
|
},
|
|
3103
3102
|
onClick: (h) => {
|
|
3104
|
-
var
|
|
3105
|
-
h.stopPropagation(), t || (
|
|
3103
|
+
var F;
|
|
3104
|
+
h.stopPropagation(), t || (F = e.onOpen) == null || F.call(e), o((N) => !N);
|
|
3106
3105
|
},
|
|
3107
3106
|
children: /* @__PURE__ */ A(
|
|
3108
3107
|
m,
|
|
@@ -3117,13 +3116,13 @@ const xr = (e) => {
|
|
|
3117
3116
|
}
|
|
3118
3117
|
),
|
|
3119
3118
|
t && /* @__PURE__ */ g(
|
|
3120
|
-
|
|
3119
|
+
a,
|
|
3121
3120
|
{
|
|
3122
3121
|
ref: r,
|
|
3123
3122
|
style: {
|
|
3124
3123
|
position: "fixed",
|
|
3125
|
-
top: `${
|
|
3126
|
-
...
|
|
3124
|
+
top: `${C.top}px`,
|
|
3125
|
+
...C.left !== void 0 ? { left: `${C.left}px` } : { right: `${C.right}px` },
|
|
3127
3126
|
backgroundColor: "white",
|
|
3128
3127
|
borderRadius: "4px",
|
|
3129
3128
|
minWidth: "280px",
|
|
@@ -3136,7 +3135,7 @@ const xr = (e) => {
|
|
|
3136
3135
|
},
|
|
3137
3136
|
children: [
|
|
3138
3137
|
/* @__PURE__ */ g(
|
|
3139
|
-
|
|
3138
|
+
a,
|
|
3140
3139
|
{
|
|
3141
3140
|
style: {
|
|
3142
3141
|
display: "flex",
|
|
@@ -3154,14 +3153,14 @@ const xr = (e) => {
|
|
|
3154
3153
|
"Filter ",
|
|
3155
3154
|
i
|
|
3156
3155
|
] }),
|
|
3157
|
-
w.length > 0 && /* @__PURE__ */ A(
|
|
3156
|
+
w.length > 0 && /* @__PURE__ */ A(a, { style: { cursor: "pointer" }, children: /* @__PURE__ */ A(
|
|
3158
3157
|
Q,
|
|
3159
3158
|
{
|
|
3160
3159
|
fontSize: "xs",
|
|
3161
3160
|
color: "primary",
|
|
3162
3161
|
fontWeight: "semibold",
|
|
3163
3162
|
onClick: (h) => {
|
|
3164
|
-
h.stopPropagation(),
|
|
3163
|
+
h.stopPropagation(), b();
|
|
3165
3164
|
},
|
|
3166
3165
|
children: "CLEAR"
|
|
3167
3166
|
}
|
|
@@ -3170,7 +3169,7 @@ const xr = (e) => {
|
|
|
3170
3169
|
}
|
|
3171
3170
|
),
|
|
3172
3171
|
!e.hideSearch && /* @__PURE__ */ A(
|
|
3173
|
-
|
|
3172
|
+
a,
|
|
3174
3173
|
{
|
|
3175
3174
|
style: {
|
|
3176
3175
|
paddingLeft: "16px",
|
|
@@ -3192,7 +3191,7 @@ const xr = (e) => {
|
|
|
3192
3191
|
}
|
|
3193
3192
|
),
|
|
3194
3193
|
/* @__PURE__ */ A(
|
|
3195
|
-
|
|
3194
|
+
a,
|
|
3196
3195
|
{
|
|
3197
3196
|
className: "ts-filter-dropdown-options",
|
|
3198
3197
|
style: {
|
|
@@ -3202,7 +3201,7 @@ const xr = (e) => {
|
|
|
3202
3201
|
paddingRight: "8px"
|
|
3203
3202
|
},
|
|
3204
3203
|
children: e.isLoadingOptions ? /* @__PURE__ */ g(
|
|
3205
|
-
|
|
3204
|
+
a,
|
|
3206
3205
|
{
|
|
3207
3206
|
style: {
|
|
3208
3207
|
paddingTop: "40px",
|
|
@@ -3235,8 +3234,8 @@ const xr = (e) => {
|
|
|
3235
3234
|
)
|
|
3236
3235
|
]
|
|
3237
3236
|
}
|
|
3238
|
-
) : B.length > 0 ? /* @__PURE__ */ A(
|
|
3239
|
-
|
|
3237
|
+
) : B.length > 0 ? /* @__PURE__ */ A(a, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: B.map((h) => /* @__PURE__ */ g(
|
|
3238
|
+
a,
|
|
3240
3239
|
{
|
|
3241
3240
|
style: {
|
|
3242
3241
|
display: "flex",
|
|
@@ -3252,14 +3251,14 @@ const xr = (e) => {
|
|
|
3252
3251
|
transition: "all 0.2s ease",
|
|
3253
3252
|
backgroundColor: w.includes(h.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent"
|
|
3254
3253
|
},
|
|
3255
|
-
onClick: (
|
|
3256
|
-
|
|
3254
|
+
onClick: (F) => {
|
|
3255
|
+
F.stopPropagation(), D(h.value);
|
|
3257
3256
|
},
|
|
3258
|
-
onMouseEnter: (
|
|
3259
|
-
w.includes(h.value) || (
|
|
3257
|
+
onMouseEnter: (F) => {
|
|
3258
|
+
w.includes(h.value) || (F.currentTarget.style.backgroundColor = "rgb(var(--starasia-ui-raw-color-gray-50))"), F.currentTarget.style.transform = "translateX(2px)";
|
|
3260
3259
|
},
|
|
3261
|
-
onMouseLeave: (
|
|
3262
|
-
|
|
3260
|
+
onMouseLeave: (F) => {
|
|
3261
|
+
F.currentTarget.style.backgroundColor = w.includes(h.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent", F.currentTarget.style.transform = "translateX(0)";
|
|
3263
3262
|
},
|
|
3264
3263
|
children: [
|
|
3265
3264
|
/* @__PURE__ */ A(
|
|
@@ -3283,7 +3282,7 @@ const xr = (e) => {
|
|
|
3283
3282
|
},
|
|
3284
3283
|
h.value
|
|
3285
3284
|
)) }) : /* @__PURE__ */ g(
|
|
3286
|
-
|
|
3285
|
+
a,
|
|
3287
3286
|
{
|
|
3288
3287
|
style: {
|
|
3289
3288
|
paddingTop: "40px",
|
|
@@ -3317,7 +3316,7 @@ const xr = (e) => {
|
|
|
3317
3316
|
}
|
|
3318
3317
|
),
|
|
3319
3318
|
w.length > 0 && /* @__PURE__ */ A(
|
|
3320
|
-
|
|
3319
|
+
a,
|
|
3321
3320
|
{
|
|
3322
3321
|
style: {
|
|
3323
3322
|
paddingTop: "8px",
|
|
@@ -3328,9 +3327,9 @@ const xr = (e) => {
|
|
|
3328
3327
|
backgroundColor: "rgb(var(--starasia-ui-raw-color-blue-50))",
|
|
3329
3328
|
marginTop: "auto"
|
|
3330
3329
|
},
|
|
3331
|
-
children: /* @__PURE__ */ g(
|
|
3330
|
+
children: /* @__PURE__ */ g(a, { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "4px" }, children: [
|
|
3332
3331
|
/* @__PURE__ */ A(
|
|
3333
|
-
|
|
3332
|
+
a,
|
|
3334
3333
|
{
|
|
3335
3334
|
style: {
|
|
3336
3335
|
backgroundColor: "rgb(var(--starasia-ui-raw-color-primary))",
|
|
@@ -3371,7 +3370,7 @@ const xr = (e) => {
|
|
|
3371
3370
|
/* @__PURE__ */ A("path", { d: e ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
3372
3371
|
]
|
|
3373
3372
|
}
|
|
3374
|
-
),
|
|
3373
|
+
), xA = "var(--starasia-ui-table-bg-default, #ffffff)", ZA = "var(--starasia-ui-color-gray-100)", Pi = ({
|
|
3375
3374
|
columns: e,
|
|
3376
3375
|
records: i,
|
|
3377
3376
|
handleDetail: t,
|
|
@@ -3381,67 +3380,67 @@ const xr = (e) => {
|
|
|
3381
3380
|
visibleHandleDelete: l,
|
|
3382
3381
|
visibleHandleUpdate: c,
|
|
3383
3382
|
visibleHandleDetail: s,
|
|
3384
|
-
showHeadBorder:
|
|
3383
|
+
showHeadBorder: C = !0,
|
|
3385
3384
|
scrollParentRef: d,
|
|
3386
3385
|
frozenCount: w = 0,
|
|
3387
3386
|
onFrozenCountChange: B,
|
|
3388
|
-
customActions:
|
|
3389
|
-
actionsOrder:
|
|
3387
|
+
customActions: D,
|
|
3388
|
+
actionsOrder: b = ["detail", "update", "delete", "custom"],
|
|
3390
3389
|
customEmptyState: h
|
|
3391
3390
|
}) => {
|
|
3392
|
-
const
|
|
3393
|
-
if (!G) return
|
|
3394
|
-
if (typeof G == "function") return G(
|
|
3395
|
-
if (typeof G == "string") return
|
|
3396
|
-
}, [I,
|
|
3397
|
-
|
|
3391
|
+
const N = [t, o, r].filter((M) => M !== void 0).length, Z = !!D, v = N === 3 ? Z ? "178px" : "140px" : N === 2 ? Z ? "140px" : "102px" : N === 1 ? Z ? "112px" : "74px" : Z ? "74px" : "", E = (M, G) => {
|
|
3392
|
+
if (!G) return M;
|
|
3393
|
+
if (typeof G == "function") return G(M);
|
|
3394
|
+
if (typeof G == "string") return M[G];
|
|
3395
|
+
}, [I, W] = L(!1);
|
|
3396
|
+
R(() => {
|
|
3398
3397
|
if (!(d != null && d.current)) return;
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3398
|
+
const M = d.current;
|
|
3399
|
+
W(M.scrollHeight > M.clientHeight);
|
|
3401
3400
|
}, [i, d]);
|
|
3402
|
-
const
|
|
3401
|
+
const x = iA(null), [P, $] = L([]);
|
|
3403
3402
|
qA(() => {
|
|
3404
|
-
if (!w || !
|
|
3403
|
+
if (!w || !x.current) {
|
|
3405
3404
|
$([]);
|
|
3406
3405
|
return;
|
|
3407
3406
|
}
|
|
3408
|
-
const
|
|
3409
|
-
|
|
3407
|
+
const M = Array.from(
|
|
3408
|
+
x.current.querySelectorAll("thead tr th")
|
|
3410
3409
|
), G = [];
|
|
3411
|
-
let
|
|
3412
|
-
|
|
3413
|
-
G[p] =
|
|
3410
|
+
let k = 0;
|
|
3411
|
+
M.forEach((u, p) => {
|
|
3412
|
+
G[p] = k, p < w && (k += u.offsetWidth);
|
|
3414
3413
|
}), $(G);
|
|
3415
3414
|
}, [w, e, i]);
|
|
3416
|
-
const
|
|
3417
|
-
B && B(
|
|
3415
|
+
const K = (M) => {
|
|
3416
|
+
B && B(M < w ? M : M + 1);
|
|
3418
3417
|
};
|
|
3419
|
-
return /* @__PURE__ */ A("div", { ref:
|
|
3418
|
+
return /* @__PURE__ */ A("div", { ref: x, children: /* @__PURE__ */ g(ae, { fullWidth: !0, children: [
|
|
3420
3419
|
/* @__PURE__ */ A(
|
|
3421
|
-
|
|
3420
|
+
Ye,
|
|
3422
3421
|
{
|
|
3423
3422
|
style: {
|
|
3424
3423
|
height: "40px",
|
|
3425
3424
|
whiteSpace: "nowrap"
|
|
3426
3425
|
},
|
|
3427
3426
|
children: /* @__PURE__ */ g(hA, { children: [
|
|
3428
|
-
e.map((
|
|
3427
|
+
e.map((M, G) => {
|
|
3429
3428
|
var p;
|
|
3430
|
-
const
|
|
3429
|
+
const k = w > 0 && G < w, u = P[G] ?? 0;
|
|
3431
3430
|
return /* @__PURE__ */ A(
|
|
3432
3431
|
VA,
|
|
3433
3432
|
{
|
|
3434
3433
|
style: {
|
|
3435
3434
|
position: "sticky",
|
|
3436
3435
|
top: 0,
|
|
3437
|
-
left:
|
|
3438
|
-
zIndex:
|
|
3436
|
+
left: k ? u : void 0,
|
|
3437
|
+
zIndex: k ? 4 : 2,
|
|
3439
3438
|
paddingLeft: G === 0 ? "12px" : "",
|
|
3440
|
-
borderRight:
|
|
3441
|
-
borderBottom:
|
|
3442
|
-
width:
|
|
3439
|
+
borderRight: C ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
|
|
3440
|
+
borderBottom: C ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
|
|
3441
|
+
width: M.width,
|
|
3443
3442
|
backgroundColor: "var(--starasia-ui-table-bg-header)",
|
|
3444
|
-
textAlign:
|
|
3443
|
+
textAlign: M.textAlign === "text-right" ? "right" : M.textAlign === "text-center" ? "center" : "left"
|
|
3445
3444
|
},
|
|
3446
3445
|
children: /* @__PURE__ */ g(
|
|
3447
3446
|
"div",
|
|
@@ -3454,19 +3453,19 @@ const xr = (e) => {
|
|
|
3454
3453
|
minWidth: 0
|
|
3455
3454
|
},
|
|
3456
3455
|
children: [
|
|
3457
|
-
/* @__PURE__ */ A("span", { style: { flex: 1, minWidth: 0 }, children:
|
|
3458
|
-
|
|
3456
|
+
/* @__PURE__ */ A("span", { style: { flex: 1, minWidth: 0 }, children: M.title || ((p = M.accessor) == null ? void 0 : p.toString()) }),
|
|
3457
|
+
M.filter && /* @__PURE__ */ A(
|
|
3459
3458
|
Ri,
|
|
3460
3459
|
{
|
|
3461
|
-
filter:
|
|
3462
|
-
columnTitle:
|
|
3460
|
+
filter: M.filter,
|
|
3461
|
+
columnTitle: M.title
|
|
3463
3462
|
}
|
|
3464
3463
|
),
|
|
3465
3464
|
B && /* @__PURE__ */ A(
|
|
3466
3465
|
"button",
|
|
3467
3466
|
{
|
|
3468
|
-
onClick: () =>
|
|
3469
|
-
title:
|
|
3467
|
+
onClick: () => K(G),
|
|
3468
|
+
title: k ? "Unfreeze column" : "Freeze column",
|
|
3470
3469
|
style: {
|
|
3471
3470
|
background: "none",
|
|
3472
3471
|
border: "none",
|
|
@@ -3475,11 +3474,11 @@ const xr = (e) => {
|
|
|
3475
3474
|
display: "flex",
|
|
3476
3475
|
alignItems: "center",
|
|
3477
3476
|
flexShrink: 0,
|
|
3478
|
-
color:
|
|
3479
|
-
opacity:
|
|
3477
|
+
color: k ? "rgb(var(--starasia-ui-raw-color-primary-600, 37 99 235))" : "rgb(var(--starasia-ui-raw-color-gray-400, 156 163 175))",
|
|
3478
|
+
opacity: k ? 1 : 0.45,
|
|
3480
3479
|
transition: "opacity 0.15s"
|
|
3481
3480
|
},
|
|
3482
|
-
children: /* @__PURE__ */ A(vi, { frozen:
|
|
3481
|
+
children: /* @__PURE__ */ A(vi, { frozen: k })
|
|
3483
3482
|
}
|
|
3484
3483
|
)
|
|
3485
3484
|
]
|
|
@@ -3489,7 +3488,7 @@ const xr = (e) => {
|
|
|
3489
3488
|
`table-head-${G}`
|
|
3490
3489
|
);
|
|
3491
3490
|
}),
|
|
3492
|
-
t || o || r ||
|
|
3491
|
+
t || o || r || D ? /* @__PURE__ */ A(
|
|
3493
3492
|
VA,
|
|
3494
3493
|
{
|
|
3495
3494
|
style: {
|
|
@@ -3498,20 +3497,20 @@ const xr = (e) => {
|
|
|
3498
3497
|
top: 0,
|
|
3499
3498
|
right: 0,
|
|
3500
3499
|
zIndex: 3,
|
|
3501
|
-
borderBottom:
|
|
3500
|
+
borderBottom: C ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0
|
|
3502
3501
|
}
|
|
3503
3502
|
}
|
|
3504
3503
|
) : null
|
|
3505
3504
|
] })
|
|
3506
3505
|
}
|
|
3507
3506
|
),
|
|
3508
|
-
/* @__PURE__ */ A(
|
|
3507
|
+
/* @__PURE__ */ A(pe, { children: n ? /* @__PURE__ */ A(hA, { children: /* @__PURE__ */ A(BA, { colSpan: e.length + 1, children: /* @__PURE__ */ g(a, { style: { gap: "16px" }, children: [
|
|
3509
3508
|
/* @__PURE__ */ A(sA, { variant: "list" }),
|
|
3510
3509
|
/* @__PURE__ */ A(sA, { variant: "list" }),
|
|
3511
3510
|
/* @__PURE__ */ A(sA, { variant: "list" }),
|
|
3512
3511
|
/* @__PURE__ */ A(sA, { variant: "list" }),
|
|
3513
3512
|
/* @__PURE__ */ A(sA, { variant: "list" })
|
|
3514
|
-
] }) }) }) : !(i != null && i.length) && h ? /* @__PURE__ */ A(hA, { children: /* @__PURE__ */ A(BA, { colSpan: e.length + 1, children: h }) }) : i == null ? void 0 : i.map((
|
|
3513
|
+
] }) }) }) : !(i != null && i.length) && h ? /* @__PURE__ */ A(hA, { children: /* @__PURE__ */ A(BA, { colSpan: e.length + 1, children: h }) }) : i == null ? void 0 : i.map((M, G) => /* @__PURE__ */ g(
|
|
3515
3514
|
hA,
|
|
3516
3515
|
{
|
|
3517
3516
|
style: {
|
|
@@ -3519,38 +3518,38 @@ const xr = (e) => {
|
|
|
3519
3518
|
padding: 0,
|
|
3520
3519
|
borderBottom: G === i.length - 1 && I ? void 0 : "1px solid var(--starasia-ui-utility-fill-default)"
|
|
3521
3520
|
},
|
|
3522
|
-
onMouseOver: (
|
|
3523
|
-
const u =
|
|
3521
|
+
onMouseOver: (k) => {
|
|
3522
|
+
const u = k.currentTarget;
|
|
3524
3523
|
u.style.backgroundColor = ZA, u.style.position = "relative", u.style.zIndex = "2", w > 0 && Array.from(u.querySelectorAll("td")).slice(0, w).forEach((q) => {
|
|
3525
3524
|
q.style.backgroundColor = ZA;
|
|
3526
3525
|
});
|
|
3527
3526
|
const p = Array.from(u.querySelectorAll("td")).at(-1);
|
|
3528
3527
|
p && p.style.position === "sticky" && (p.style.backgroundColor = ZA);
|
|
3529
3528
|
},
|
|
3530
|
-
onMouseOut: (
|
|
3531
|
-
const u =
|
|
3529
|
+
onMouseOut: (k) => {
|
|
3530
|
+
const u = k.currentTarget;
|
|
3532
3531
|
u.style.backgroundColor = "", u.style.position = "", u.style.zIndex = "", w > 0 && Array.from(u.querySelectorAll("td")).slice(0, w).forEach((q) => {
|
|
3533
|
-
q.style.backgroundColor =
|
|
3532
|
+
q.style.backgroundColor = xA;
|
|
3534
3533
|
});
|
|
3535
3534
|
const p = Array.from(u.querySelectorAll("td")).at(-1);
|
|
3536
|
-
p && p.style.position === "sticky" && (p.style.backgroundColor =
|
|
3535
|
+
p && p.style.position === "sticky" && (p.style.backgroundColor = xA);
|
|
3537
3536
|
},
|
|
3538
3537
|
children: [
|
|
3539
|
-
e.map((
|
|
3540
|
-
const p =
|
|
3538
|
+
e.map((k, u) => {
|
|
3539
|
+
const p = k.render ? k.render(M, G, i) : E(M, k.accessor), q = w > 0 && u < w, z = P[u] ?? 0;
|
|
3541
3540
|
return /* @__PURE__ */ A(
|
|
3542
3541
|
BA,
|
|
3543
3542
|
{
|
|
3544
3543
|
style: {
|
|
3545
3544
|
position: q ? "sticky" : void 0,
|
|
3546
|
-
left: q ?
|
|
3545
|
+
left: q ? z : void 0,
|
|
3547
3546
|
zIndex: q ? 1 : void 0,
|
|
3548
|
-
backgroundColor: q ?
|
|
3547
|
+
backgroundColor: q ? xA : void 0,
|
|
3549
3548
|
paddingLeft: u === 0 ? "12px" : "",
|
|
3550
3549
|
whiteSpace: "nowrap",
|
|
3551
|
-
borderLeft:
|
|
3552
|
-
borderRight:
|
|
3553
|
-
textAlign:
|
|
3550
|
+
borderLeft: k.showBorderLeft ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
|
|
3551
|
+
borderRight: k.showBorderRight ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
|
|
3552
|
+
textAlign: k.textAlign === "text-right" ? "right" : k.textAlign === "text-center" ? "center" : "left"
|
|
3554
3553
|
},
|
|
3555
3554
|
children: typeof p == "string" ? /* @__PURE__ */ A(
|
|
3556
3555
|
Q,
|
|
@@ -3559,7 +3558,7 @@ const xr = (e) => {
|
|
|
3559
3558
|
whiteSpace: "nowrap",
|
|
3560
3559
|
overflow: "hidden",
|
|
3561
3560
|
textOverflow: "ellipsis",
|
|
3562
|
-
textAlign:
|
|
3561
|
+
textAlign: k.textAlign === "text-right" ? "right" : k.textAlign === "text-center" ? "center" : "left"
|
|
3563
3562
|
},
|
|
3564
3563
|
children: p
|
|
3565
3564
|
}
|
|
@@ -3568,43 +3567,43 @@ const xr = (e) => {
|
|
|
3568
3567
|
`row-${G}-col-${u}`
|
|
3569
3568
|
);
|
|
3570
3569
|
}),
|
|
3571
|
-
t || o || r ||
|
|
3570
|
+
t || o || r || D ? /* @__PURE__ */ A(BA, { style: {
|
|
3572
3571
|
width: v,
|
|
3573
3572
|
position: "sticky",
|
|
3574
3573
|
right: 0,
|
|
3575
3574
|
zIndex: 1,
|
|
3576
|
-
backgroundColor:
|
|
3577
|
-
}, children: /* @__PURE__ */ A(T, { direction: "row", align: "center", justify: "center", gap: "sm", children:
|
|
3575
|
+
backgroundColor: xA
|
|
3576
|
+
}, children: /* @__PURE__ */ A(T, { direction: "row", align: "center", justify: "center", gap: "sm", children: b.map((k) => {
|
|
3578
3577
|
const u = G === i.length - 1 ? "top" : "bottom";
|
|
3579
|
-
return
|
|
3578
|
+
return k === "detail" && t && (s == null ? void 0 : s(M)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Detail", position: u, children: /* @__PURE__ */ A(
|
|
3580
3579
|
O,
|
|
3581
3580
|
{
|
|
3582
3581
|
size: "xs",
|
|
3583
3582
|
secondary: !0,
|
|
3584
|
-
onClick: () => t(
|
|
3583
|
+
onClick: () => t(M.id, M),
|
|
3585
3584
|
iconLeft: /* @__PURE__ */ A(m, { name: "DocumentClean", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-gray-600))" } })
|
|
3586
3585
|
}
|
|
3587
|
-
) }, "detail") :
|
|
3586
|
+
) }, "detail") : k === "update" && o && (c == null ? void 0 : c(M)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Update", position: u, children: /* @__PURE__ */ A(
|
|
3588
3587
|
O,
|
|
3589
3588
|
{
|
|
3590
3589
|
size: "xs",
|
|
3591
3590
|
secondary: !0,
|
|
3592
|
-
onClick: () => o(
|
|
3591
|
+
onClick: () => o(M),
|
|
3593
3592
|
iconLeft: /* @__PURE__ */ A(m, { name: "Edit1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-gray-600))" } })
|
|
3594
3593
|
}
|
|
3595
|
-
) }, "update") :
|
|
3594
|
+
) }, "update") : k === "delete" && r && (l == null ? void 0 : l(M)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Delete", position: u, children: /* @__PURE__ */ A(
|
|
3596
3595
|
O,
|
|
3597
3596
|
{
|
|
3598
3597
|
size: "xs",
|
|
3599
3598
|
secondary: !0,
|
|
3600
|
-
onClick: () => r(
|
|
3599
|
+
onClick: () => r(M.id, M),
|
|
3601
3600
|
iconLeft: /* @__PURE__ */ A(m, { name: "Trash1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-red-600))" } })
|
|
3602
3601
|
}
|
|
3603
|
-
) }, "delete") :
|
|
3602
|
+
) }, "delete") : k === "custom" ? /* @__PURE__ */ A(aA.Fragment, { children: D == null ? void 0 : D(M) }, "custom") : null;
|
|
3604
3603
|
}) }) }) : null
|
|
3605
3604
|
]
|
|
3606
3605
|
},
|
|
3607
|
-
`${
|
|
3606
|
+
`${M}${G}`
|
|
3608
3607
|
)) })
|
|
3609
3608
|
] }) });
|
|
3610
3609
|
}, Vi = ({
|
|
@@ -3614,15 +3613,15 @@ const xr = (e) => {
|
|
|
3614
3613
|
footerProps: o
|
|
3615
3614
|
}) => {
|
|
3616
3615
|
var w;
|
|
3617
|
-
const r = iA(null), [n, l] =
|
|
3616
|
+
const r = iA(null), [n, l] = L(
|
|
3618
3617
|
(i == null ? void 0 : i.defaultFrozenCount) ?? 0
|
|
3619
|
-
), c = (t == null ? void 0 : t.show) ?? !0, s = iA(null),
|
|
3620
|
-
typeof
|
|
3621
|
-
const d = (o == null ? void 0 : o.showFooter) ?? (
|
|
3618
|
+
), c = (t == null ? void 0 : t.show) ?? !0, s = iA(null), C = (w = i == null ? void 0 : i.pagination) == null ? void 0 : w.totalData;
|
|
3619
|
+
typeof C == "number" && (s.current = C);
|
|
3620
|
+
const d = (o == null ? void 0 : o.showFooter) ?? (C === void 0 ? s.current !== 0 : C !== 0);
|
|
3622
3621
|
return /* @__PURE__ */ g(qi, { ...e, children: [
|
|
3623
3622
|
c && /* @__PURE__ */ A(Ti, { ...t }),
|
|
3624
3623
|
/* @__PURE__ */ A(
|
|
3625
|
-
|
|
3624
|
+
a,
|
|
3626
3625
|
{
|
|
3627
3626
|
ref: r,
|
|
3628
3627
|
style: {
|
|
@@ -3659,16 +3658,16 @@ function Xi(e) {
|
|
|
3659
3658
|
e
|
|
3660
3659
|
);
|
|
3661
3660
|
}
|
|
3662
|
-
const jr = Xi(Vi),
|
|
3661
|
+
const jr = Xi(Vi), MA = ({
|
|
3663
3662
|
of: e,
|
|
3664
3663
|
render: i
|
|
3665
|
-
}) =>
|
|
3664
|
+
}) => Ke.toArray(e == null ? void 0 : e.map((t, o, r) => i(t, o, r))), Y = ({
|
|
3666
3665
|
condition: e,
|
|
3667
3666
|
fallback: i,
|
|
3668
3667
|
children: t,
|
|
3669
3668
|
loading: o,
|
|
3670
3669
|
isLoading: r
|
|
3671
|
-
}) => /* @__PURE__ */ A(U, { children: r ? o : e ? t : i }),
|
|
3670
|
+
}) => /* @__PURE__ */ A(U, { children: r ? o : e ? t : i }), ye = ({
|
|
3672
3671
|
item: e,
|
|
3673
3672
|
handleSwitch: i,
|
|
3674
3673
|
handleToSelectOrg: t,
|
|
@@ -3679,7 +3678,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
3679
3678
|
}) => {
|
|
3680
3679
|
var c;
|
|
3681
3680
|
return /* @__PURE__ */ g(
|
|
3682
|
-
|
|
3681
|
+
a,
|
|
3683
3682
|
{
|
|
3684
3683
|
borderWidth: "border-b",
|
|
3685
3684
|
borderStyle: "border-solid-b",
|
|
@@ -3718,7 +3717,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
3718
3717
|
{
|
|
3719
3718
|
condition: !!e.role && !e.isTenant || r,
|
|
3720
3719
|
fallback: /* @__PURE__ */ A(J.Body1, { children: e.name }),
|
|
3721
|
-
children: /* @__PURE__ */ g(
|
|
3720
|
+
children: /* @__PURE__ */ g(a, { direction: "column", gap: "sm", children: [
|
|
3722
3721
|
/* @__PURE__ */ A(J.Body1, { children: e.name }),
|
|
3723
3722
|
/* @__PURE__ */ A(
|
|
3724
3723
|
J.Body3,
|
|
@@ -3732,7 +3731,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
3732
3731
|
] })
|
|
3733
3732
|
}
|
|
3734
3733
|
),
|
|
3735
|
-
/* @__PURE__ */ A(Y, { condition: e.isTenant && o, children: /* @__PURE__ */ A(
|
|
3734
|
+
/* @__PURE__ */ A(Y, { condition: e.isTenant && o, children: /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(m, { name: "ChevronRight", size: "md" }) }) })
|
|
3736
3735
|
]
|
|
3737
3736
|
}
|
|
3738
3737
|
);
|
|
@@ -3746,16 +3745,16 @@ const jr = Xi(Vi), EA = ({
|
|
|
3746
3745
|
showRole: l,
|
|
3747
3746
|
isOnOrgSelect: c,
|
|
3748
3747
|
setSelectedApp: s
|
|
3749
|
-
}) => r && e && e.length > 0 && /* @__PURE__ */ g(
|
|
3748
|
+
}) => r && e && e.length > 0 && /* @__PURE__ */ g(a, { marginTop: "lg", children: [
|
|
3750
3749
|
t && /* @__PURE__ */ A(J.H5, { children: t }),
|
|
3751
3750
|
/* @__PURE__ */ A(
|
|
3752
|
-
|
|
3751
|
+
MA,
|
|
3753
3752
|
{
|
|
3754
3753
|
of: e,
|
|
3755
|
-
render: (
|
|
3756
|
-
|
|
3754
|
+
render: (C) => /* @__PURE__ */ A(
|
|
3755
|
+
ye,
|
|
3757
3756
|
{
|
|
3758
|
-
item:
|
|
3757
|
+
item: C,
|
|
3759
3758
|
showIcon: n,
|
|
3760
3759
|
handleSwitch: i,
|
|
3761
3760
|
handleToSelectOrg: o,
|
|
@@ -3778,31 +3777,31 @@ const jr = Xi(Vi), EA = ({
|
|
|
3778
3777
|
setSelectedApp: s
|
|
3779
3778
|
}) => {
|
|
3780
3779
|
var d;
|
|
3781
|
-
const
|
|
3780
|
+
const C = le();
|
|
3782
3781
|
return /* @__PURE__ */ g(FA, { onHide: e, show: i, closeButton: !1, children: [
|
|
3783
3782
|
/* @__PURE__ */ g(
|
|
3784
3783
|
wA,
|
|
3785
3784
|
{
|
|
3786
3785
|
paddingBlock: "lg",
|
|
3787
|
-
onClick:
|
|
3786
|
+
onClick: C.show ? C.close : e,
|
|
3788
3787
|
display: "flex",
|
|
3789
3788
|
direction: "row",
|
|
3790
3789
|
children: [
|
|
3791
|
-
|
|
3790
|
+
C.show ? /* @__PURE__ */ A(m, { name: "ChevronLeft" }) : /* @__PURE__ */ A(m, { name: "Cross" }),
|
|
3792
3791
|
/* @__PURE__ */ A(
|
|
3793
3792
|
J.SubH3,
|
|
3794
3793
|
{
|
|
3795
3794
|
props: {
|
|
3796
3795
|
color: "gray-500"
|
|
3797
3796
|
},
|
|
3798
|
-
children:
|
|
3797
|
+
children: C.show && "Switch Apps"
|
|
3799
3798
|
}
|
|
3800
3799
|
)
|
|
3801
3800
|
]
|
|
3802
3801
|
}
|
|
3803
3802
|
),
|
|
3804
|
-
|
|
3805
|
-
/* @__PURE__ */ A(J.H4, { children: (d =
|
|
3803
|
+
C.show ? /* @__PURE__ */ g(U, { children: [
|
|
3804
|
+
/* @__PURE__ */ A(J.H4, { children: (d = C.data) == null ? void 0 : d.name }),
|
|
3806
3805
|
/* @__PURE__ */ A(
|
|
3807
3806
|
J.SubH3,
|
|
3808
3807
|
{
|
|
@@ -3817,7 +3816,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
3817
3816
|
{
|
|
3818
3817
|
condition: !!(o != null && o.length),
|
|
3819
3818
|
isLoading: c,
|
|
3820
|
-
loading: /* @__PURE__ */ g(
|
|
3819
|
+
loading: /* @__PURE__ */ g(a, { marginTop: "sm", gap: "md", children: [
|
|
3821
3820
|
/* @__PURE__ */ A(sA, { variant: "list" }),
|
|
3822
3821
|
/* @__PURE__ */ A(sA, { variant: "list" }),
|
|
3823
3822
|
/* @__PURE__ */ A(sA, { variant: "list" })
|
|
@@ -3831,13 +3830,13 @@ const jr = Xi(Vi), EA = ({
|
|
|
3831
3830
|
...w,
|
|
3832
3831
|
id: w.id,
|
|
3833
3832
|
isTenant: !0,
|
|
3834
|
-
applicationKey: ((B =
|
|
3833
|
+
applicationKey: ((B = C.data) == null ? void 0 : B.applicationKey) || ""
|
|
3835
3834
|
};
|
|
3836
3835
|
}),
|
|
3837
3836
|
handleSwitch: r,
|
|
3838
3837
|
showIcon: !1,
|
|
3839
3838
|
showRole: !0,
|
|
3840
|
-
isOnOrgSelect:
|
|
3839
|
+
isOnOrgSelect: C.show,
|
|
3841
3840
|
setSelectedApp: s
|
|
3842
3841
|
}
|
|
3843
3842
|
)
|
|
@@ -3867,7 +3866,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
3867
3866
|
dataApps: t == null ? void 0 : t.filter((w) => w.isTenant),
|
|
3868
3867
|
handleSwitch: r,
|
|
3869
3868
|
handleToSelectOrg: (w) => {
|
|
3870
|
-
|
|
3869
|
+
C.open(w), s(w.name), l && l(w);
|
|
3871
3870
|
},
|
|
3872
3871
|
setSelectedApp: s
|
|
3873
3872
|
}
|
|
@@ -3894,16 +3893,16 @@ const jr = Xi(Vi), EA = ({
|
|
|
3894
3893
|
showRole: l,
|
|
3895
3894
|
isOnOrgSelect: c,
|
|
3896
3895
|
setSelectedApp: s
|
|
3897
|
-
}) => r && e && (e == null ? void 0 : e.length) > 0 && /* @__PURE__ */ g(
|
|
3896
|
+
}) => r && e && (e == null ? void 0 : e.length) > 0 && /* @__PURE__ */ g(a, { marginTop: "lg", children: [
|
|
3898
3897
|
t && /* @__PURE__ */ A(J.H5, { children: t }),
|
|
3899
3898
|
/* @__PURE__ */ A(
|
|
3900
|
-
|
|
3899
|
+
MA,
|
|
3901
3900
|
{
|
|
3902
3901
|
of: e,
|
|
3903
|
-
render: (
|
|
3904
|
-
|
|
3902
|
+
render: (C) => /* @__PURE__ */ A(
|
|
3903
|
+
ye,
|
|
3905
3904
|
{
|
|
3906
|
-
item:
|
|
3905
|
+
item: C,
|
|
3907
3906
|
showIcon: n,
|
|
3908
3907
|
handleSwitch: i,
|
|
3909
3908
|
handleToSelectOrg: o,
|
|
@@ -3922,7 +3921,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
3922
3921
|
totalData: r,
|
|
3923
3922
|
setSelectedApp: n
|
|
3924
3923
|
}) => {
|
|
3925
|
-
var c, s,
|
|
3924
|
+
var c, s, C, d, w;
|
|
3926
3925
|
const l = le();
|
|
3927
3926
|
return /* @__PURE__ */ g(FA, { onHide: e, show: i, closeButton: !1, children: [
|
|
3928
3927
|
/* @__PURE__ */ g(
|
|
@@ -3960,17 +3959,17 @@ const jr = Xi(Vi), EA = ({
|
|
|
3960
3959
|
/* @__PURE__ */ A(
|
|
3961
3960
|
Y,
|
|
3962
3961
|
{
|
|
3963
|
-
condition: !!((
|
|
3962
|
+
condition: !!((C = (s = l.data) == null ? void 0 : s.organizations) != null && C.length),
|
|
3964
3963
|
children: /* @__PURE__ */ A(
|
|
3965
3964
|
JA,
|
|
3966
3965
|
{
|
|
3967
3966
|
dataApps: (w = (d = l.data) == null ? void 0 : d.organizations) == null ? void 0 : w.map((B) => {
|
|
3968
|
-
var
|
|
3967
|
+
var D;
|
|
3969
3968
|
return {
|
|
3970
3969
|
...B,
|
|
3971
3970
|
id: B.id,
|
|
3972
3971
|
isTenant: !0,
|
|
3973
|
-
applicationKey: ((
|
|
3972
|
+
applicationKey: ((D = l.data) == null ? void 0 : D.applicationKey) || ""
|
|
3974
3973
|
};
|
|
3975
3974
|
}),
|
|
3976
3975
|
handleSwitch: o,
|
|
@@ -4033,16 +4032,16 @@ const jr = Xi(Vi), EA = ({
|
|
|
4033
4032
|
variant: l = "single-api",
|
|
4034
4033
|
isLoading: c
|
|
4035
4034
|
}) => {
|
|
4036
|
-
const [s,
|
|
4035
|
+
const [s, C] = L(!1), [d, w] = L("");
|
|
4037
4036
|
return /* @__PURE__ */ g(U, { children: [
|
|
4038
4037
|
/* @__PURE__ */ g(
|
|
4039
|
-
|
|
4038
|
+
a,
|
|
4040
4039
|
{
|
|
4041
4040
|
cursor: "pointer",
|
|
4042
4041
|
direction: "row",
|
|
4043
4042
|
gap: "sm",
|
|
4044
4043
|
align: "center",
|
|
4045
|
-
onClick: () =>
|
|
4044
|
+
onClick: () => C((B) => !B),
|
|
4046
4045
|
style: {
|
|
4047
4046
|
position: "relative"
|
|
4048
4047
|
},
|
|
@@ -4064,7 +4063,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4064
4063
|
}
|
|
4065
4064
|
),
|
|
4066
4065
|
/* @__PURE__ */ A(
|
|
4067
|
-
|
|
4066
|
+
a,
|
|
4068
4067
|
{
|
|
4069
4068
|
style: {
|
|
4070
4069
|
position: "absolute",
|
|
@@ -4090,7 +4089,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4090
4089
|
$i,
|
|
4091
4090
|
{
|
|
4092
4091
|
show: s,
|
|
4093
|
-
onHide: () =>
|
|
4092
|
+
onHide: () => C((B) => !B),
|
|
4094
4093
|
dataApps: i,
|
|
4095
4094
|
totalData: e,
|
|
4096
4095
|
handleSwitch: o,
|
|
@@ -4104,7 +4103,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4104
4103
|
_i,
|
|
4105
4104
|
{
|
|
4106
4105
|
show: s,
|
|
4107
|
-
onHide: () =>
|
|
4106
|
+
onHide: () => C((B) => !B),
|
|
4108
4107
|
dataApps: i,
|
|
4109
4108
|
totalData: e,
|
|
4110
4109
|
handleSwitch: o,
|
|
@@ -4114,7 +4113,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4114
4113
|
}
|
|
4115
4114
|
),
|
|
4116
4115
|
c && /* @__PURE__ */ A(
|
|
4117
|
-
|
|
4116
|
+
a,
|
|
4118
4117
|
{
|
|
4119
4118
|
style: {
|
|
4120
4119
|
position: "fixed",
|
|
@@ -4129,7 +4128,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4129
4128
|
alignItems: "center"
|
|
4130
4129
|
},
|
|
4131
4130
|
children: /* @__PURE__ */ g(
|
|
4132
|
-
|
|
4131
|
+
a,
|
|
4133
4132
|
{
|
|
4134
4133
|
style: {
|
|
4135
4134
|
textAlign: "center"
|
|
@@ -4163,7 +4162,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4163
4162
|
}
|
|
4164
4163
|
)
|
|
4165
4164
|
] });
|
|
4166
|
-
},
|
|
4165
|
+
}, H = (e) => /* @__PURE__ */ A(
|
|
4167
4166
|
Q,
|
|
4168
4167
|
{
|
|
4169
4168
|
...e,
|
|
@@ -4180,10 +4179,10 @@ const jr = Xi(Vi), EA = ({
|
|
|
4180
4179
|
fullWidth: o = !1,
|
|
4181
4180
|
...r
|
|
4182
4181
|
}) => {
|
|
4183
|
-
var c, s,
|
|
4182
|
+
var c, s, C;
|
|
4184
4183
|
const n = r.hideMessageError || !1, l = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
4185
4184
|
return /* @__PURE__ */ g(
|
|
4186
|
-
|
|
4185
|
+
a,
|
|
4187
4186
|
{
|
|
4188
4187
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
4189
4188
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -4194,32 +4193,32 @@ const jr = Xi(Vi), EA = ({
|
|
|
4194
4193
|
{
|
|
4195
4194
|
condition: !!r.inputProps.required,
|
|
4196
4195
|
fallback: /* @__PURE__ */ g(
|
|
4197
|
-
|
|
4196
|
+
a,
|
|
4198
4197
|
{
|
|
4199
4198
|
direction: "column",
|
|
4200
4199
|
customMaxWidth: l,
|
|
4201
4200
|
fullWidth: o,
|
|
4202
4201
|
children: [
|
|
4203
|
-
/* @__PURE__ */ A(
|
|
4202
|
+
/* @__PURE__ */ A(H, { children: r.title }),
|
|
4204
4203
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: r.description })
|
|
4205
4204
|
]
|
|
4206
4205
|
}
|
|
4207
4206
|
),
|
|
4208
4207
|
children: /* @__PURE__ */ g(
|
|
4209
|
-
|
|
4208
|
+
a,
|
|
4210
4209
|
{
|
|
4211
4210
|
direction: "column",
|
|
4212
4211
|
customMaxWidth: l,
|
|
4213
4212
|
fullWidth: o,
|
|
4214
4213
|
children: [
|
|
4215
4214
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
4216
|
-
/* @__PURE__ */ A(
|
|
4217
|
-
/* @__PURE__ */ A(
|
|
4215
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: r.title }),
|
|
4216
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
4218
4217
|
/* @__PURE__ */ A(Y, { condition: !!((c = r.tooltip) != null && c.label), children: /* @__PURE__ */ A(
|
|
4219
4218
|
rA,
|
|
4220
4219
|
{
|
|
4221
4220
|
label: (s = r.tooltip) == null ? void 0 : s.label,
|
|
4222
|
-
arrowPosition: (
|
|
4221
|
+
arrowPosition: (C = r.tooltip) == null ? void 0 : C.arrowPosition,
|
|
4223
4222
|
...r.tooltip,
|
|
4224
4223
|
children: /* @__PURE__ */ A(
|
|
4225
4224
|
m,
|
|
@@ -4241,7 +4240,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4241
4240
|
)
|
|
4242
4241
|
}
|
|
4243
4242
|
),
|
|
4244
|
-
/* @__PURE__ */ g(
|
|
4243
|
+
/* @__PURE__ */ g(a, { gap: "xs", fullWidth: r.inputProps.fullWidth || !1, children: [
|
|
4245
4244
|
/* @__PURE__ */ A(
|
|
4246
4245
|
pA,
|
|
4247
4246
|
{
|
|
@@ -4265,10 +4264,10 @@ const jr = Xi(Vi), EA = ({
|
|
|
4265
4264
|
fullWidth: o = !1,
|
|
4266
4265
|
...r
|
|
4267
4266
|
}) => {
|
|
4268
|
-
var c, s,
|
|
4267
|
+
var c, s, C;
|
|
4269
4268
|
const n = r.hideMessageError || !1, l = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
4270
4269
|
return /* @__PURE__ */ g(
|
|
4271
|
-
|
|
4270
|
+
a,
|
|
4272
4271
|
{
|
|
4273
4272
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
4274
4273
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -4279,32 +4278,32 @@ const jr = Xi(Vi), EA = ({
|
|
|
4279
4278
|
{
|
|
4280
4279
|
condition: !!r.inputProps.required,
|
|
4281
4280
|
fallback: /* @__PURE__ */ g(
|
|
4282
|
-
|
|
4281
|
+
a,
|
|
4283
4282
|
{
|
|
4284
4283
|
direction: "column",
|
|
4285
4284
|
customMaxWidth: l,
|
|
4286
4285
|
fullWidth: o,
|
|
4287
4286
|
children: [
|
|
4288
|
-
/* @__PURE__ */ A(
|
|
4287
|
+
/* @__PURE__ */ A(H, { children: r.title }),
|
|
4289
4288
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: r.description })
|
|
4290
4289
|
]
|
|
4291
4290
|
}
|
|
4292
4291
|
),
|
|
4293
4292
|
children: /* @__PURE__ */ g(
|
|
4294
|
-
|
|
4293
|
+
a,
|
|
4295
4294
|
{
|
|
4296
4295
|
direction: "column",
|
|
4297
4296
|
customMaxWidth: l,
|
|
4298
4297
|
fullWidth: o,
|
|
4299
4298
|
children: [
|
|
4300
4299
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
4301
|
-
/* @__PURE__ */ A(
|
|
4302
|
-
/* @__PURE__ */ A(
|
|
4300
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: r.title }),
|
|
4301
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
4303
4302
|
/* @__PURE__ */ A(Y, { condition: !!((c = r.tooltip) != null && c.label), children: /* @__PURE__ */ A(
|
|
4304
4303
|
rA,
|
|
4305
4304
|
{
|
|
4306
4305
|
label: (s = r.tooltip) == null ? void 0 : s.label,
|
|
4307
|
-
arrowPosition: (
|
|
4306
|
+
arrowPosition: (C = r.tooltip) == null ? void 0 : C.arrowPosition,
|
|
4308
4307
|
...r.tooltip,
|
|
4309
4308
|
children: /* @__PURE__ */ A(
|
|
4310
4309
|
m,
|
|
@@ -4326,9 +4325,9 @@ const jr = Xi(Vi), EA = ({
|
|
|
4326
4325
|
)
|
|
4327
4326
|
}
|
|
4328
4327
|
),
|
|
4329
|
-
/* @__PURE__ */ g(
|
|
4328
|
+
/* @__PURE__ */ g(a, { gap: "xs", fullWidth: r.inputProps.fullWidth || !1, children: [
|
|
4330
4329
|
/* @__PURE__ */ A(
|
|
4331
|
-
|
|
4330
|
+
a,
|
|
4332
4331
|
{
|
|
4333
4332
|
style: {
|
|
4334
4333
|
width: r.inputProps.fullWidth ? "100%" : i === "horizontal" && r.customWidth ? r.customWidth : i === "horizontal" ? "343px" : ""
|
|
@@ -4351,7 +4350,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4351
4350
|
);
|
|
4352
4351
|
}, tt = (e, i) => typeof e == "string" && e || i === "error" ? "var(--starasia-ui-color-error)" : "var(--starasia-ui-text-disable)", rt = (e) => {
|
|
4353
4352
|
var c;
|
|
4354
|
-
const [i, t] =
|
|
4353
|
+
const [i, t] = L(!1), o = (s) => {
|
|
4355
4354
|
s.preventDefault(), s.stopPropagation();
|
|
4356
4355
|
}, r = (s) => {
|
|
4357
4356
|
s.preventDefault(), s.stopPropagation(), s.dataTransfer && e.handleOnFileChange(s.dataTransfer.files.item(0));
|
|
@@ -4361,7 +4360,7 @@ const jr = Xi(Vi), EA = ({
|
|
|
4361
4360
|
s.preventDefault(), t(!1);
|
|
4362
4361
|
};
|
|
4363
4362
|
return /* @__PURE__ */ g(
|
|
4364
|
-
|
|
4363
|
+
a,
|
|
4365
4364
|
{
|
|
4366
4365
|
width: "width-full",
|
|
4367
4366
|
paddingInline: "md",
|
|
@@ -4434,7 +4433,7 @@ function nt(e) {
|
|
|
4434
4433
|
const lt = (e) => {
|
|
4435
4434
|
var i, t;
|
|
4436
4435
|
return /* @__PURE__ */ g(
|
|
4437
|
-
|
|
4436
|
+
a,
|
|
4438
4437
|
{
|
|
4439
4438
|
width: "width-full",
|
|
4440
4439
|
paddingInline: "md",
|
|
@@ -4492,7 +4491,7 @@ const lt = (e) => {
|
|
|
4492
4491
|
style: {
|
|
4493
4492
|
textWrap: "nowrap"
|
|
4494
4493
|
},
|
|
4495
|
-
children: e.fileDate ? e.fileDate :
|
|
4494
|
+
children: e.fileDate ? e.fileDate : SA(/* @__PURE__ */ new Date())
|
|
4496
4495
|
}
|
|
4497
4496
|
)
|
|
4498
4497
|
] })
|
|
@@ -4545,7 +4544,7 @@ const lt = (e) => {
|
|
|
4545
4544
|
}
|
|
4546
4545
|
),
|
|
4547
4546
|
/* @__PURE__ */ g(
|
|
4548
|
-
|
|
4547
|
+
a,
|
|
4549
4548
|
{
|
|
4550
4549
|
fullWidth: !0,
|
|
4551
4550
|
style: { minHeight: "69px" },
|
|
@@ -4590,10 +4589,10 @@ const lt = (e) => {
|
|
|
4590
4589
|
fullWidth: o = !1,
|
|
4591
4590
|
...r
|
|
4592
4591
|
}) => {
|
|
4593
|
-
var c, s,
|
|
4592
|
+
var c, s, C;
|
|
4594
4593
|
const n = r.hideMessageError || !1, l = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
4595
4594
|
return /* @__PURE__ */ g(
|
|
4596
|
-
|
|
4595
|
+
a,
|
|
4597
4596
|
{
|
|
4598
4597
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
4599
4598
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -4604,32 +4603,32 @@ const lt = (e) => {
|
|
|
4604
4603
|
{
|
|
4605
4604
|
condition: !!r.inputProps.required,
|
|
4606
4605
|
fallback: /* @__PURE__ */ g(
|
|
4607
|
-
|
|
4606
|
+
a,
|
|
4608
4607
|
{
|
|
4609
4608
|
direction: "column",
|
|
4610
4609
|
customMaxWidth: l,
|
|
4611
4610
|
fullWidth: o,
|
|
4612
4611
|
children: [
|
|
4613
|
-
/* @__PURE__ */ A(
|
|
4612
|
+
/* @__PURE__ */ A(H, { children: r.title }),
|
|
4614
4613
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: r.description })
|
|
4615
4614
|
]
|
|
4616
4615
|
}
|
|
4617
4616
|
),
|
|
4618
4617
|
children: /* @__PURE__ */ g(
|
|
4619
|
-
|
|
4618
|
+
a,
|
|
4620
4619
|
{
|
|
4621
4620
|
direction: "column",
|
|
4622
4621
|
customMaxWidth: l,
|
|
4623
4622
|
fullWidth: o,
|
|
4624
4623
|
children: [
|
|
4625
4624
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
4626
|
-
/* @__PURE__ */ A(
|
|
4627
|
-
/* @__PURE__ */ A(
|
|
4625
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: r.title }),
|
|
4626
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
4628
4627
|
/* @__PURE__ */ A(Y, { condition: !!((c = r.tooltip) != null && c.label), children: /* @__PURE__ */ A(
|
|
4629
4628
|
rA,
|
|
4630
4629
|
{
|
|
4631
4630
|
label: (s = r.tooltip) == null ? void 0 : s.label,
|
|
4632
|
-
arrowPosition: (
|
|
4631
|
+
arrowPosition: (C = r.tooltip) == null ? void 0 : C.arrowPosition,
|
|
4633
4632
|
...r.tooltip,
|
|
4634
4633
|
children: /* @__PURE__ */ A(
|
|
4635
4634
|
m,
|
|
@@ -4672,10 +4671,10 @@ const lt = (e) => {
|
|
|
4672
4671
|
required: r = !1,
|
|
4673
4672
|
...n
|
|
4674
4673
|
}) => {
|
|
4675
|
-
var s,
|
|
4674
|
+
var s, C, d, w;
|
|
4676
4675
|
const l = n.hideMessageError || !1, c = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
4677
4676
|
return /* @__PURE__ */ g(
|
|
4678
|
-
|
|
4677
|
+
a,
|
|
4679
4678
|
{
|
|
4680
4679
|
gap: i === "horizontal" || i === "horizontal-inline" ? "spacing-96" : "sm",
|
|
4681
4680
|
direction: i === "horizontal" || i === "horizontal-inline" ? "row" : "column",
|
|
@@ -4686,31 +4685,31 @@ const lt = (e) => {
|
|
|
4686
4685
|
{
|
|
4687
4686
|
condition: !!r,
|
|
4688
4687
|
fallback: /* @__PURE__ */ g(
|
|
4689
|
-
|
|
4688
|
+
a,
|
|
4690
4689
|
{
|
|
4691
4690
|
direction: "column",
|
|
4692
4691
|
customMaxWidth: c,
|
|
4693
4692
|
fullWidth: o,
|
|
4694
4693
|
children: [
|
|
4695
|
-
/* @__PURE__ */ A(
|
|
4694
|
+
/* @__PURE__ */ A(H, { children: n.title }),
|
|
4696
4695
|
/* @__PURE__ */ A(J.Body3, { props: { color: "gray-500" }, children: n.description })
|
|
4697
4696
|
]
|
|
4698
4697
|
}
|
|
4699
4698
|
),
|
|
4700
4699
|
children: /* @__PURE__ */ g(
|
|
4701
|
-
|
|
4700
|
+
a,
|
|
4702
4701
|
{
|
|
4703
4702
|
direction: "column",
|
|
4704
4703
|
customMaxWidth: c,
|
|
4705
4704
|
fullWidth: o,
|
|
4706
4705
|
children: [
|
|
4707
4706
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
4708
|
-
/* @__PURE__ */ A(
|
|
4709
|
-
/* @__PURE__ */ A(
|
|
4707
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: n.title }),
|
|
4708
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
4710
4709
|
/* @__PURE__ */ A(Y, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ A(
|
|
4711
4710
|
rA,
|
|
4712
4711
|
{
|
|
4713
|
-
label: (
|
|
4712
|
+
label: (C = n.tooltip) == null ? void 0 : C.label,
|
|
4714
4713
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
4715
4714
|
...n.tooltip,
|
|
4716
4715
|
children: /* @__PURE__ */ A(
|
|
@@ -4734,20 +4733,20 @@ const lt = (e) => {
|
|
|
4734
4733
|
}
|
|
4735
4734
|
),
|
|
4736
4735
|
/* @__PURE__ */ A(
|
|
4737
|
-
|
|
4736
|
+
a,
|
|
4738
4737
|
{
|
|
4739
4738
|
gap: i === "horizontal-inline" ? "xl" : "md",
|
|
4740
4739
|
direction: i === "horizontal-inline" ? "row" : "column",
|
|
4741
4740
|
align: "flex-start",
|
|
4742
4741
|
children: /* @__PURE__ */ A(
|
|
4743
|
-
|
|
4742
|
+
MA,
|
|
4744
4743
|
{
|
|
4745
4744
|
of: (w = n.checkBoxesList) == null ? void 0 : w.map((B) => ({
|
|
4746
4745
|
...B,
|
|
4747
4746
|
isChecked: n.checkBoxesAreChecked.includes(B.id)
|
|
4748
4747
|
})),
|
|
4749
4748
|
render: (B) => B.renderBadge ? /* @__PURE__ */ g(
|
|
4750
|
-
|
|
4749
|
+
a,
|
|
4751
4750
|
{
|
|
4752
4751
|
direction: "row",
|
|
4753
4752
|
justify: "space-between",
|
|
@@ -4760,7 +4759,7 @@ const lt = (e) => {
|
|
|
4760
4759
|
name: B.name,
|
|
4761
4760
|
value: B.id,
|
|
4762
4761
|
checked: B.isChecked,
|
|
4763
|
-
onChange: (
|
|
4762
|
+
onChange: (D) => n.onChecked(D.target.value, B),
|
|
4764
4763
|
label: B.name,
|
|
4765
4764
|
description: B.description
|
|
4766
4765
|
}
|
|
@@ -4774,7 +4773,7 @@ const lt = (e) => {
|
|
|
4774
4773
|
name: B.name,
|
|
4775
4774
|
value: B.id,
|
|
4776
4775
|
checked: B.isChecked,
|
|
4777
|
-
onChange: (
|
|
4776
|
+
onChange: (D) => n.onChecked(D.target.value, B),
|
|
4778
4777
|
label: B.name,
|
|
4779
4778
|
description: B.description
|
|
4780
4779
|
}
|
|
@@ -4796,40 +4795,40 @@ const lt = (e) => {
|
|
|
4796
4795
|
var n;
|
|
4797
4796
|
const r = e === "horizontal-inline" || e === "horizontal-block" ? i === "sm" ? 342 : i === "lg" ? 400 : 342 : void 0;
|
|
4798
4797
|
return /* @__PURE__ */ g(
|
|
4799
|
-
|
|
4798
|
+
a,
|
|
4800
4799
|
{
|
|
4801
4800
|
gap: e === "horizontal-inline" || e === "horizontal-block" ? "spacing-96" : "sm",
|
|
4802
4801
|
direction: e === "horizontal-inline" || e === "horizontal-block" ? "row" : "column",
|
|
4803
4802
|
children: [
|
|
4804
4803
|
/* @__PURE__ */ A(Y, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ g(
|
|
4805
|
-
|
|
4804
|
+
a,
|
|
4806
4805
|
{
|
|
4807
4806
|
direction: "column",
|
|
4808
4807
|
customMaxWidth: r,
|
|
4809
4808
|
fullWidth: t,
|
|
4810
4809
|
children: [
|
|
4811
|
-
o.title && /* @__PURE__ */ A(
|
|
4810
|
+
o.title && /* @__PURE__ */ A(H, { children: o.title }),
|
|
4812
4811
|
/* @__PURE__ */ A(Y, { condition: !!o.description, children: /* @__PURE__ */ A(Q, { color: "gray-500", children: o.description }) })
|
|
4813
4812
|
]
|
|
4814
4813
|
}
|
|
4815
4814
|
) }),
|
|
4816
4815
|
/* @__PURE__ */ A(
|
|
4817
|
-
|
|
4816
|
+
a,
|
|
4818
4817
|
{
|
|
4819
4818
|
gap: "sm",
|
|
4820
4819
|
direction: e === "horizontal" || e === "horizontal-inline" ? "row" : "column",
|
|
4821
4820
|
align: "flex-start",
|
|
4822
4821
|
flexWrap: "wrap",
|
|
4823
4822
|
children: /* @__PURE__ */ A(
|
|
4824
|
-
|
|
4823
|
+
MA,
|
|
4825
4824
|
{
|
|
4826
4825
|
of: (n = o.radioList) == null ? void 0 : n.map((l) => ({
|
|
4827
4826
|
...l,
|
|
4828
4827
|
isChecked: o.radioIsChecked === l.id
|
|
4829
4828
|
})),
|
|
4830
|
-
render: ({ value: l, id: c, isChecked: s, subInput:
|
|
4829
|
+
render: ({ value: l, id: c, isChecked: s, subInput: C, label: d, description: w }) => /* @__PURE__ */ g(a, { gap: "xs", customMaxWidth: r, children: [
|
|
4831
4830
|
/* @__PURE__ */ A(
|
|
4832
|
-
|
|
4831
|
+
ze,
|
|
4833
4832
|
{
|
|
4834
4833
|
id: `${c.toString()}-${l}`,
|
|
4835
4834
|
name: o.groupName || d,
|
|
@@ -4855,7 +4854,7 @@ const lt = (e) => {
|
|
|
4855
4854
|
children: w
|
|
4856
4855
|
}
|
|
4857
4856
|
),
|
|
4858
|
-
|
|
4857
|
+
C
|
|
4859
4858
|
] })
|
|
4860
4859
|
}
|
|
4861
4860
|
)
|
|
@@ -4872,10 +4871,10 @@ const lt = (e) => {
|
|
|
4872
4871
|
fullWidth: o = !1,
|
|
4873
4872
|
...r
|
|
4874
4873
|
}) => {
|
|
4875
|
-
var c, s,
|
|
4874
|
+
var c, s, C;
|
|
4876
4875
|
const n = r.hideMessageError || !1, l = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
4877
4876
|
return /* @__PURE__ */ g(
|
|
4878
|
-
|
|
4877
|
+
a,
|
|
4879
4878
|
{
|
|
4880
4879
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
4881
4880
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -4886,32 +4885,32 @@ const lt = (e) => {
|
|
|
4886
4885
|
{
|
|
4887
4886
|
condition: !!r.inputProps.required,
|
|
4888
4887
|
fallback: /* @__PURE__ */ g(
|
|
4889
|
-
|
|
4888
|
+
a,
|
|
4890
4889
|
{
|
|
4891
4890
|
direction: "column",
|
|
4892
4891
|
customMaxWidth: l,
|
|
4893
4892
|
fullWidth: o,
|
|
4894
4893
|
children: [
|
|
4895
|
-
/* @__PURE__ */ A(
|
|
4894
|
+
/* @__PURE__ */ A(H, { children: r.title }),
|
|
4896
4895
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: r.description })
|
|
4897
4896
|
]
|
|
4898
4897
|
}
|
|
4899
4898
|
),
|
|
4900
4899
|
children: /* @__PURE__ */ g(
|
|
4901
|
-
|
|
4900
|
+
a,
|
|
4902
4901
|
{
|
|
4903
4902
|
direction: "column",
|
|
4904
4903
|
customMaxWidth: l,
|
|
4905
4904
|
fullWidth: o,
|
|
4906
4905
|
children: [
|
|
4907
4906
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
4908
|
-
/* @__PURE__ */ A(
|
|
4909
|
-
/* @__PURE__ */ A(
|
|
4907
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: r.title }),
|
|
4908
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
4910
4909
|
/* @__PURE__ */ A(Y, { condition: !!((c = r.tooltip) != null && c.label), children: /* @__PURE__ */ A(
|
|
4911
4910
|
rA,
|
|
4912
4911
|
{
|
|
4913
4912
|
label: (s = r.tooltip) == null ? void 0 : s.label,
|
|
4914
|
-
arrowPosition: (
|
|
4913
|
+
arrowPosition: (C = r.tooltip) == null ? void 0 : C.arrowPosition,
|
|
4915
4914
|
...r.tooltip,
|
|
4916
4915
|
children: /* @__PURE__ */ A(
|
|
4917
4916
|
m,
|
|
@@ -4935,7 +4934,7 @@ const lt = (e) => {
|
|
|
4935
4934
|
),
|
|
4936
4935
|
/* @__PURE__ */ g(T, { gap: "xs", children: [
|
|
4937
4936
|
/* @__PURE__ */ A(
|
|
4938
|
-
|
|
4937
|
+
je,
|
|
4939
4938
|
{
|
|
4940
4939
|
ref: r.inputRef,
|
|
4941
4940
|
size: e,
|
|
@@ -4956,10 +4955,10 @@ const lt = (e) => {
|
|
|
4956
4955
|
fullWidth: r = !1,
|
|
4957
4956
|
...n
|
|
4958
4957
|
}) => {
|
|
4959
|
-
var c, s,
|
|
4958
|
+
var c, s, C;
|
|
4960
4959
|
const l = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
4961
4960
|
return /* @__PURE__ */ g(
|
|
4962
|
-
|
|
4961
|
+
a,
|
|
4963
4962
|
{
|
|
4964
4963
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
4965
4964
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -4970,32 +4969,32 @@ const lt = (e) => {
|
|
|
4970
4969
|
{
|
|
4971
4970
|
condition: o,
|
|
4972
4971
|
fallback: /* @__PURE__ */ g(
|
|
4973
|
-
|
|
4972
|
+
a,
|
|
4974
4973
|
{
|
|
4975
4974
|
direction: "column",
|
|
4976
4975
|
customMaxWidth: l,
|
|
4977
4976
|
fullWidth: r,
|
|
4978
4977
|
children: [
|
|
4979
|
-
/* @__PURE__ */ A(
|
|
4978
|
+
/* @__PURE__ */ A(H, { children: n.title }),
|
|
4980
4979
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: n.titleDescription })
|
|
4981
4980
|
]
|
|
4982
4981
|
}
|
|
4983
4982
|
),
|
|
4984
4983
|
children: /* @__PURE__ */ g(
|
|
4985
|
-
|
|
4984
|
+
a,
|
|
4986
4985
|
{
|
|
4987
4986
|
direction: "column",
|
|
4988
4987
|
customMaxWidth: l,
|
|
4989
4988
|
fullWidth: r,
|
|
4990
4989
|
children: [
|
|
4991
4990
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
4992
|
-
/* @__PURE__ */ A(
|
|
4993
|
-
/* @__PURE__ */ A(
|
|
4991
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: n.title }),
|
|
4992
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
4994
4993
|
/* @__PURE__ */ A(Y, { condition: !!((c = n.tooltip) != null && c.label), children: /* @__PURE__ */ A(
|
|
4995
4994
|
rA,
|
|
4996
4995
|
{
|
|
4997
4996
|
label: (s = n.tooltip) == null ? void 0 : s.label,
|
|
4998
|
-
arrowPosition: (
|
|
4997
|
+
arrowPosition: (C = n.tooltip) == null ? void 0 : C.arrowPosition,
|
|
4999
4998
|
...n.tooltip,
|
|
5000
4999
|
children: /* @__PURE__ */ A(
|
|
5001
5000
|
m,
|
|
@@ -5036,16 +5035,16 @@ const lt = (e) => {
|
|
|
5036
5035
|
...t
|
|
5037
5036
|
}) => {
|
|
5038
5037
|
const o = WA(), r = (l) => {
|
|
5039
|
-
var s,
|
|
5038
|
+
var s, C, d, w, B, D;
|
|
5040
5039
|
if (!l) return;
|
|
5041
|
-
const c = t.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (
|
|
5040
|
+
const c = t.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (C = (s = o == null ? void 0 : o.computed) == null ? void 0 : s.red) == null ? void 0 : C[600] : e === "secondary-primary" ? (w = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.blue) == null ? void 0 : w[700] : (D = (B = o == null ? void 0 : o.computed) == null ? void 0 : B.gray) == null ? void 0 : D[50];
|
|
5042
5041
|
return /* @__PURE__ */ A(m, { name: l, size: i, style: { color: c } });
|
|
5043
5042
|
}, n = () => {
|
|
5044
|
-
var c, s,
|
|
5043
|
+
var c, s, C, d;
|
|
5045
5044
|
if (e !== "secondary-danger" && e !== "secondary-primary")
|
|
5046
5045
|
return t.title;
|
|
5047
5046
|
const l = {
|
|
5048
|
-
color: t.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary-danger" ? (s = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : s[600] : (d = (
|
|
5047
|
+
color: t.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary-danger" ? (s = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : s[600] : (d = (C = o == null ? void 0 : o.computed) == null ? void 0 : C.blue) == null ? void 0 : d[700]
|
|
5049
5048
|
};
|
|
5050
5049
|
switch (i) {
|
|
5051
5050
|
case "xs":
|
|
@@ -5090,10 +5089,10 @@ const lt = (e) => {
|
|
|
5090
5089
|
fullWidth: o = !1,
|
|
5091
5090
|
...r
|
|
5092
5091
|
}) => {
|
|
5093
|
-
var c, s,
|
|
5092
|
+
var c, s, C;
|
|
5094
5093
|
const n = r.hideMessageError || !1, l = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
5095
5094
|
return /* @__PURE__ */ g(
|
|
5096
|
-
|
|
5095
|
+
a,
|
|
5097
5096
|
{
|
|
5098
5097
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
5099
5098
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -5104,32 +5103,32 @@ const lt = (e) => {
|
|
|
5104
5103
|
{
|
|
5105
5104
|
condition: !!r.inputProps.required,
|
|
5106
5105
|
fallback: /* @__PURE__ */ g(
|
|
5107
|
-
|
|
5106
|
+
a,
|
|
5108
5107
|
{
|
|
5109
5108
|
direction: "column",
|
|
5110
5109
|
customMaxWidth: l,
|
|
5111
5110
|
fullWidth: o,
|
|
5112
5111
|
children: [
|
|
5113
|
-
/* @__PURE__ */ A(
|
|
5112
|
+
/* @__PURE__ */ A(H, { children: r.title }),
|
|
5114
5113
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: r.description })
|
|
5115
5114
|
]
|
|
5116
5115
|
}
|
|
5117
5116
|
),
|
|
5118
5117
|
children: /* @__PURE__ */ g(
|
|
5119
|
-
|
|
5118
|
+
a,
|
|
5120
5119
|
{
|
|
5121
5120
|
direction: "column",
|
|
5122
5121
|
customMaxWidth: l,
|
|
5123
5122
|
fullWidth: o,
|
|
5124
5123
|
children: [
|
|
5125
5124
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
5126
|
-
/* @__PURE__ */ A(
|
|
5127
|
-
/* @__PURE__ */ A(
|
|
5125
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: r.title }),
|
|
5126
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
5128
5127
|
/* @__PURE__ */ A(Y, { condition: !!((c = r.tooltip) != null && c.label), children: /* @__PURE__ */ A(
|
|
5129
5128
|
rA,
|
|
5130
5129
|
{
|
|
5131
5130
|
label: (s = r.tooltip) == null ? void 0 : s.label,
|
|
5132
|
-
arrowPosition: (
|
|
5131
|
+
arrowPosition: (C = r.tooltip) == null ? void 0 : C.arrowPosition,
|
|
5133
5132
|
...r.tooltip,
|
|
5134
5133
|
children: /* @__PURE__ */ A(
|
|
5135
5134
|
m,
|
|
@@ -5153,7 +5152,7 @@ const lt = (e) => {
|
|
|
5153
5152
|
),
|
|
5154
5153
|
/* @__PURE__ */ g(T, { gap: "xs", children: [
|
|
5155
5154
|
/* @__PURE__ */ A(
|
|
5156
|
-
|
|
5155
|
+
a,
|
|
5157
5156
|
{
|
|
5158
5157
|
style: {
|
|
5159
5158
|
width: i === "horizontal" && r.customWidth ? r.customWidth : i === "horizontal" ? "343px" : ""
|
|
@@ -5221,52 +5220,52 @@ const oe = {
|
|
|
5221
5220
|
aspect: l = "1:1",
|
|
5222
5221
|
containerProps: c,
|
|
5223
5222
|
maxFileSize: s = 2,
|
|
5224
|
-
onError:
|
|
5223
|
+
onError: C
|
|
5225
5224
|
}, d) => {
|
|
5226
|
-
const w = X("md"), [B,
|
|
5227
|
-
|
|
5225
|
+
const w = X("md"), [B, D] = L(!1), [b, h] = L(null), [F, N] = L(!1), [Z, v] = L({ x: 0, y: 0 }), [E, I] = L(1), [W, x] = L(null);
|
|
5226
|
+
R(() => {
|
|
5228
5227
|
i === null && r(null);
|
|
5229
5228
|
}, [i]);
|
|
5230
|
-
const
|
|
5231
|
-
(
|
|
5232
|
-
|
|
5229
|
+
const P = uA(
|
|
5230
|
+
(z, y) => {
|
|
5231
|
+
x(y);
|
|
5233
5232
|
},
|
|
5234
5233
|
[]
|
|
5235
|
-
), $ = (
|
|
5234
|
+
), $ = (z) => {
|
|
5236
5235
|
var tA;
|
|
5237
|
-
const y = (tA =
|
|
5236
|
+
const y = (tA = z.target.files) == null ? void 0 : tA[0];
|
|
5238
5237
|
if (!y) return;
|
|
5239
5238
|
const eA = new FileReader();
|
|
5240
5239
|
eA.onload = () => {
|
|
5241
|
-
h(eA.result),
|
|
5240
|
+
h(eA.result), N(!0);
|
|
5242
5241
|
}, eA.readAsDataURL(y);
|
|
5243
|
-
},
|
|
5244
|
-
if (!(!
|
|
5242
|
+
}, K = async () => {
|
|
5243
|
+
if (!(!b || !W))
|
|
5245
5244
|
try {
|
|
5246
|
-
const
|
|
5247
|
-
if (s &&
|
|
5248
|
-
|
|
5245
|
+
const z = await ht(b, W);
|
|
5246
|
+
if (s && z.size > s * 1024 * 1024) {
|
|
5247
|
+
C == null || C(`Ukuran file maksimal ${s}MB`);
|
|
5249
5248
|
return;
|
|
5250
5249
|
}
|
|
5251
|
-
e == null || e(
|
|
5252
|
-
const y = URL.createObjectURL(
|
|
5253
|
-
r(y,
|
|
5250
|
+
e == null || e(z);
|
|
5251
|
+
const y = URL.createObjectURL(z);
|
|
5252
|
+
r(y, z), N(!1);
|
|
5254
5253
|
} catch {
|
|
5255
|
-
|
|
5254
|
+
C == null || C("Gagal memproses gambar");
|
|
5256
5255
|
}
|
|
5257
|
-
},
|
|
5258
|
-
|
|
5256
|
+
}, M = iA(null), G = () => {
|
|
5257
|
+
M.current && M.current.click();
|
|
5259
5258
|
};
|
|
5260
|
-
|
|
5259
|
+
Ze(d, () => ({
|
|
5261
5260
|
openFileDialog: () => {
|
|
5262
|
-
var
|
|
5263
|
-
(
|
|
5261
|
+
var z;
|
|
5262
|
+
(z = M.current) == null || z.click();
|
|
5264
5263
|
}
|
|
5265
5264
|
}));
|
|
5266
|
-
const
|
|
5265
|
+
const k = parseInt(n, 10), u = oe[l];
|
|
5267
5266
|
let p, q;
|
|
5268
|
-
return u >= 1 ? (q =
|
|
5269
|
-
|
|
5267
|
+
return u >= 1 ? (q = k, p = k * u) : (p = k, q = k / u), /* @__PURE__ */ g(
|
|
5268
|
+
a,
|
|
5270
5269
|
{
|
|
5271
5270
|
display: "flex",
|
|
5272
5271
|
position: "relative",
|
|
@@ -5284,8 +5283,8 @@ const oe = {
|
|
|
5284
5283
|
aspectRatio: u,
|
|
5285
5284
|
flexShrink: 0
|
|
5286
5285
|
},
|
|
5287
|
-
onMouseEnter: () =>
|
|
5288
|
-
onMouseLeave: () =>
|
|
5286
|
+
onMouseEnter: () => D(!0),
|
|
5287
|
+
onMouseLeave: () => D(!1),
|
|
5289
5288
|
children: [
|
|
5290
5289
|
o || i ? /* @__PURE__ */ A(
|
|
5291
5290
|
"img",
|
|
@@ -5299,7 +5298,7 @@ const oe = {
|
|
|
5299
5298
|
}
|
|
5300
5299
|
}
|
|
5301
5300
|
) : /* @__PURE__ */ A(
|
|
5302
|
-
|
|
5301
|
+
a,
|
|
5303
5302
|
{
|
|
5304
5303
|
display: "flex",
|
|
5305
5304
|
direction: "column",
|
|
@@ -5320,7 +5319,7 @@ const oe = {
|
|
|
5320
5319
|
}
|
|
5321
5320
|
),
|
|
5322
5321
|
/* @__PURE__ */ g(
|
|
5323
|
-
|
|
5322
|
+
a,
|
|
5324
5323
|
{
|
|
5325
5324
|
position: "absolute",
|
|
5326
5325
|
display: "flex",
|
|
@@ -5338,7 +5337,7 @@ const oe = {
|
|
|
5338
5337
|
/* @__PURE__ */ A(
|
|
5339
5338
|
"input",
|
|
5340
5339
|
{
|
|
5341
|
-
ref:
|
|
5340
|
+
ref: M,
|
|
5342
5341
|
type: "file",
|
|
5343
5342
|
accept: "image/*",
|
|
5344
5343
|
onChange: $,
|
|
@@ -5346,7 +5345,7 @@ const oe = {
|
|
|
5346
5345
|
style: { display: "none" }
|
|
5347
5346
|
}
|
|
5348
5347
|
),
|
|
5349
|
-
/* @__PURE__ */ g(
|
|
5348
|
+
/* @__PURE__ */ g(a, { display: "flex", align: "center", gap: "spacing-2", direction: "row", children: [
|
|
5350
5349
|
/* @__PURE__ */ A(
|
|
5351
5350
|
m,
|
|
5352
5351
|
{
|
|
@@ -5368,7 +5367,7 @@ const oe = {
|
|
|
5368
5367
|
}
|
|
5369
5368
|
),
|
|
5370
5369
|
t && /* @__PURE__ */ A(
|
|
5371
|
-
|
|
5370
|
+
a,
|
|
5372
5371
|
{
|
|
5373
5372
|
position: "absolute",
|
|
5374
5373
|
display: "flex",
|
|
@@ -5380,7 +5379,7 @@ const oe = {
|
|
|
5380
5379
|
backgroundColor: "rgba(255, 255, 255, 0.7)"
|
|
5381
5380
|
},
|
|
5382
5381
|
children: /* @__PURE__ */ A(
|
|
5383
|
-
|
|
5382
|
+
a,
|
|
5384
5383
|
{
|
|
5385
5384
|
borderRadius: "rounded-full",
|
|
5386
5385
|
style: {
|
|
@@ -5395,16 +5394,16 @@ const oe = {
|
|
|
5395
5394
|
}
|
|
5396
5395
|
),
|
|
5397
5396
|
/* @__PURE__ */ g(
|
|
5398
|
-
|
|
5397
|
+
IA,
|
|
5399
5398
|
{
|
|
5400
|
-
isShow:
|
|
5401
|
-
onHide: () =>
|
|
5399
|
+
isShow: F,
|
|
5400
|
+
onHide: () => N(!1),
|
|
5402
5401
|
style: {
|
|
5403
5402
|
minWidth: w ? l === "1:1" ? "20rem" : p * 2 : "100%"
|
|
5404
5403
|
},
|
|
5405
5404
|
children: [
|
|
5406
|
-
/* @__PURE__ */ A(
|
|
5407
|
-
|
|
5405
|
+
/* @__PURE__ */ A(kA, { children: /* @__PURE__ */ A(
|
|
5406
|
+
a,
|
|
5408
5407
|
{
|
|
5409
5408
|
position: "relative",
|
|
5410
5409
|
style: {
|
|
@@ -5412,16 +5411,16 @@ const oe = {
|
|
|
5412
5411
|
height: "20rem",
|
|
5413
5412
|
backgroundColor: "gray-100"
|
|
5414
5413
|
},
|
|
5415
|
-
children:
|
|
5416
|
-
|
|
5414
|
+
children: b && /* @__PURE__ */ A(
|
|
5415
|
+
Je,
|
|
5417
5416
|
{
|
|
5418
|
-
image:
|
|
5419
|
-
crop:
|
|
5420
|
-
zoom:
|
|
5417
|
+
image: b,
|
|
5418
|
+
crop: Z,
|
|
5419
|
+
zoom: E,
|
|
5421
5420
|
aspect: l ? oe[l] : void 0,
|
|
5422
5421
|
onCropChange: v,
|
|
5423
5422
|
onZoomChange: I,
|
|
5424
|
-
onCropComplete:
|
|
5423
|
+
onCropComplete: P,
|
|
5425
5424
|
objectFit: "contain",
|
|
5426
5425
|
minZoom: 0.5,
|
|
5427
5426
|
restrictPosition: !1
|
|
@@ -5429,9 +5428,9 @@ const oe = {
|
|
|
5429
5428
|
)
|
|
5430
5429
|
}
|
|
5431
5430
|
) }),
|
|
5432
|
-
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ g(
|
|
5433
|
-
/* @__PURE__ */ A(O, { size: "xs", secondary: !0, onClick: () =>
|
|
5434
|
-
/* @__PURE__ */ A(O, { size: "xs", primary: !0, onClick:
|
|
5431
|
+
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ g(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
|
|
5432
|
+
/* @__PURE__ */ A(O, { size: "xs", secondary: !0, onClick: () => N(!1), children: "Cancel" }),
|
|
5433
|
+
/* @__PURE__ */ A(O, { size: "xs", primary: !0, onClick: K, children: "Crop" })
|
|
5435
5434
|
] }) })
|
|
5436
5435
|
]
|
|
5437
5436
|
}
|
|
@@ -5448,10 +5447,10 @@ const oe = {
|
|
|
5448
5447
|
required: r = !1,
|
|
5449
5448
|
...n
|
|
5450
5449
|
}) => {
|
|
5451
|
-
var s,
|
|
5450
|
+
var s, C, d;
|
|
5452
5451
|
const l = n.hideMessageError || !1, c = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
5453
5452
|
return /* @__PURE__ */ g(
|
|
5454
|
-
|
|
5453
|
+
a,
|
|
5455
5454
|
{
|
|
5456
5455
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
5457
5456
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -5462,31 +5461,31 @@ const oe = {
|
|
|
5462
5461
|
{
|
|
5463
5462
|
condition: !!r,
|
|
5464
5463
|
fallback: /* @__PURE__ */ g(
|
|
5465
|
-
|
|
5464
|
+
a,
|
|
5466
5465
|
{
|
|
5467
5466
|
direction: "column",
|
|
5468
5467
|
customMaxWidth: c,
|
|
5469
5468
|
fullWidth: o,
|
|
5470
5469
|
children: [
|
|
5471
|
-
/* @__PURE__ */ A(
|
|
5470
|
+
/* @__PURE__ */ A(H, { children: n.title }),
|
|
5472
5471
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: n.description })
|
|
5473
5472
|
]
|
|
5474
5473
|
}
|
|
5475
5474
|
),
|
|
5476
5475
|
children: /* @__PURE__ */ g(
|
|
5477
|
-
|
|
5476
|
+
a,
|
|
5478
5477
|
{
|
|
5479
5478
|
direction: "column",
|
|
5480
5479
|
customMaxWidth: c,
|
|
5481
5480
|
fullWidth: o,
|
|
5482
5481
|
children: [
|
|
5483
5482
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
5484
|
-
/* @__PURE__ */ A(
|
|
5485
|
-
/* @__PURE__ */ A(
|
|
5483
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: n.title }),
|
|
5484
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
5486
5485
|
/* @__PURE__ */ A(Y, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ A(
|
|
5487
5486
|
rA,
|
|
5488
5487
|
{
|
|
5489
|
-
label: (
|
|
5488
|
+
label: (C = n.tooltip) == null ? void 0 : C.label,
|
|
5490
5489
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
5491
5490
|
...n.tooltip,
|
|
5492
5491
|
children: /* @__PURE__ */ A(
|
|
@@ -5526,7 +5525,7 @@ const oe = {
|
|
|
5526
5525
|
var l, c, s;
|
|
5527
5526
|
const n = i === "horizontal" ? e === "sm" ? 342 : e === "lg" ? 400 : 342 : void 0;
|
|
5528
5527
|
return /* @__PURE__ */ g(
|
|
5529
|
-
|
|
5528
|
+
a,
|
|
5530
5529
|
{
|
|
5531
5530
|
gap: i === "horizontal" ? "spacing-96" : "sm",
|
|
5532
5531
|
direction: i === "horizontal" ? "row" : "column",
|
|
@@ -5537,27 +5536,27 @@ const oe = {
|
|
|
5537
5536
|
{
|
|
5538
5537
|
condition: !!r.inputProps.required,
|
|
5539
5538
|
fallback: /* @__PURE__ */ g(
|
|
5540
|
-
|
|
5539
|
+
a,
|
|
5541
5540
|
{
|
|
5542
5541
|
direction: "column",
|
|
5543
5542
|
customMaxWidth: n,
|
|
5544
5543
|
fullWidth: o,
|
|
5545
5544
|
children: [
|
|
5546
|
-
/* @__PURE__ */ A(
|
|
5545
|
+
/* @__PURE__ */ A(H, { children: r.title }),
|
|
5547
5546
|
/* @__PURE__ */ A(Q, { fontSize: e, color: "gray-500", children: r.description })
|
|
5548
5547
|
]
|
|
5549
5548
|
}
|
|
5550
5549
|
),
|
|
5551
5550
|
children: /* @__PURE__ */ g(
|
|
5552
|
-
|
|
5551
|
+
a,
|
|
5553
5552
|
{
|
|
5554
5553
|
direction: "column",
|
|
5555
5554
|
customMaxWidth: n,
|
|
5556
5555
|
fullWidth: o,
|
|
5557
5556
|
children: [
|
|
5558
5557
|
/* @__PURE__ */ g(T, { direction: "row", gap: "xs", align: "center", children: [
|
|
5559
|
-
/* @__PURE__ */ A(
|
|
5560
|
-
/* @__PURE__ */ A(
|
|
5558
|
+
/* @__PURE__ */ A(H, { fontSize: e, children: r.title }),
|
|
5559
|
+
/* @__PURE__ */ A(H, { color: "error", fontSize: e, children: t }),
|
|
5561
5560
|
/* @__PURE__ */ A(Y, { condition: !!((l = r.tooltip) != null && l.label), children: /* @__PURE__ */ A(
|
|
5562
5561
|
rA,
|
|
5563
5562
|
{
|
|
@@ -5597,17 +5596,17 @@ const oe = {
|
|
|
5597
5596
|
disabled: n = !1
|
|
5598
5597
|
}) => {
|
|
5599
5598
|
var d;
|
|
5600
|
-
const [l, c] =
|
|
5601
|
-
|
|
5599
|
+
const [l, c] = L([]);
|
|
5600
|
+
R(() => {
|
|
5602
5601
|
e && c([...e.map((w) => ({ id: w.id, isActive: w.isActive }))]);
|
|
5603
5602
|
}, [e]);
|
|
5604
|
-
const s = (d = l.find((w) => w.id === i)) == null ? void 0 : d.isActive,
|
|
5603
|
+
const s = (d = l.find((w) => w.id === i)) == null ? void 0 : d.isActive, C = uA(() => {
|
|
5605
5604
|
c(
|
|
5606
5605
|
(w) => w.map((B) => B.id === i ? { ...B, isActive: !B.isActive } : B)
|
|
5607
5606
|
), t && t(!s);
|
|
5608
5607
|
}, [i, t, s]);
|
|
5609
5608
|
return /* @__PURE__ */ A(
|
|
5610
|
-
|
|
5609
|
+
a,
|
|
5611
5610
|
{
|
|
5612
5611
|
direction: "row",
|
|
5613
5612
|
gap: "md",
|
|
@@ -5619,7 +5618,7 @@ const oe = {
|
|
|
5619
5618
|
{
|
|
5620
5619
|
disabled: n,
|
|
5621
5620
|
checked: s,
|
|
5622
|
-
onChange:
|
|
5621
|
+
onChange: C,
|
|
5623
5622
|
label: s ? "Active" : "Inactive"
|
|
5624
5623
|
}
|
|
5625
5624
|
)
|
|
@@ -5639,15 +5638,15 @@ const oe = {
|
|
|
5639
5638
|
InputImgFile: Dt,
|
|
5640
5639
|
Custom: It
|
|
5641
5640
|
}, kt = ({ customBottom: e }) => {
|
|
5642
|
-
const [i, t] =
|
|
5641
|
+
const [i, t] = L(!1), o = () => {
|
|
5643
5642
|
window.scrollY > window.screenY ? t(!0) : t(!1);
|
|
5644
5643
|
}, r = () => {
|
|
5645
5644
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
5646
5645
|
};
|
|
5647
|
-
return
|
|
5646
|
+
return R(() => (window.addEventListener("scroll", o), () => {
|
|
5648
5647
|
window.removeEventListener("scroll", o);
|
|
5649
5648
|
}), []), /* @__PURE__ */ A(
|
|
5650
|
-
|
|
5649
|
+
a,
|
|
5651
5650
|
{
|
|
5652
5651
|
style: {
|
|
5653
5652
|
position: "fixed",
|
|
@@ -5655,7 +5654,7 @@ const oe = {
|
|
|
5655
5654
|
right: 0
|
|
5656
5655
|
},
|
|
5657
5656
|
children: /* @__PURE__ */ A(
|
|
5658
|
-
|
|
5657
|
+
a,
|
|
5659
5658
|
{
|
|
5660
5659
|
position: "absolute",
|
|
5661
5660
|
style: {
|
|
@@ -5691,7 +5690,7 @@ const oe = {
|
|
|
5691
5690
|
}, Kr = ({ pageLayout: e, children: i }) => {
|
|
5692
5691
|
const t = X("lg");
|
|
5693
5692
|
return /* @__PURE__ */ g(
|
|
5694
|
-
|
|
5693
|
+
a,
|
|
5695
5694
|
{
|
|
5696
5695
|
display: "block",
|
|
5697
5696
|
direction: "row",
|
|
@@ -5703,7 +5702,7 @@ const oe = {
|
|
|
5703
5702
|
children: [
|
|
5704
5703
|
e,
|
|
5705
5704
|
/* @__PURE__ */ A(
|
|
5706
|
-
|
|
5705
|
+
a,
|
|
5707
5706
|
{
|
|
5708
5707
|
show: "desktop",
|
|
5709
5708
|
variant: "aside",
|
|
@@ -5732,8 +5731,8 @@ const oe = {
|
|
|
5732
5731
|
withScrollToTopButton: i = !1,
|
|
5733
5732
|
scrollToTopButtonProps: t,
|
|
5734
5733
|
containerProps: o
|
|
5735
|
-
}) => /* @__PURE__ */ A(
|
|
5736
|
-
|
|
5734
|
+
}) => /* @__PURE__ */ A(a, { position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 999)" }, children: /* @__PURE__ */ g(
|
|
5735
|
+
a,
|
|
5737
5736
|
{
|
|
5738
5737
|
position: "fixed",
|
|
5739
5738
|
bottom: "bottom-0",
|
|
@@ -5763,14 +5762,14 @@ const oe = {
|
|
|
5763
5762
|
e
|
|
5764
5763
|
]
|
|
5765
5764
|
}
|
|
5766
|
-
) }), Hr = ({ fields: e }) => /* @__PURE__ */ A(
|
|
5767
|
-
|
|
5765
|
+
) }), Hr = ({ fields: e }) => /* @__PURE__ */ A(a, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ A(
|
|
5766
|
+
MA,
|
|
5768
5767
|
{
|
|
5769
5768
|
of: e,
|
|
5770
5769
|
render: (i, t) => /* @__PURE__ */ A(Et, { ...i }, t)
|
|
5771
5770
|
}
|
|
5772
|
-
) }), Et = ({ title: e, value: i, icon: t }) => /* @__PURE__ */ g(
|
|
5773
|
-
t ? /* @__PURE__ */ g(
|
|
5771
|
+
) }), Et = ({ title: e, value: i, icon: t }) => /* @__PURE__ */ g(a, { display: "flex", direction: "column", gap: "sm", children: [
|
|
5772
|
+
t ? /* @__PURE__ */ g(a, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
|
|
5774
5773
|
/* @__PURE__ */ A(m, { name: t, color: "var(--starasia-ui-color-gray-300)" }),
|
|
5775
5774
|
/* @__PURE__ */ A(Q, { color: "gray-500", variant: "sub-h3", children: e })
|
|
5776
5775
|
] }) : /* @__PURE__ */ A(Q, { color: "gray-500", variant: "sub-h3", children: e }),
|
|
@@ -5929,7 +5928,7 @@ const Jr = ({
|
|
|
5929
5928
|
showButton: l = !0,
|
|
5930
5929
|
customHeight: c,
|
|
5931
5930
|
childrenButton: s,
|
|
5932
|
-
customIcon:
|
|
5931
|
+
customIcon: C
|
|
5933
5932
|
}) => {
|
|
5934
5933
|
const d = () => {
|
|
5935
5934
|
switch (o) {
|
|
@@ -5953,7 +5952,7 @@ const Jr = ({
|
|
|
5953
5952
|
}
|
|
5954
5953
|
};
|
|
5955
5954
|
return /* @__PURE__ */ g(
|
|
5956
|
-
|
|
5955
|
+
a,
|
|
5957
5956
|
{
|
|
5958
5957
|
height: "height-full",
|
|
5959
5958
|
display: "flex",
|
|
@@ -5964,8 +5963,8 @@ const Jr = ({
|
|
|
5964
5963
|
marginBlock: "auto",
|
|
5965
5964
|
customHeight: c,
|
|
5966
5965
|
children: [
|
|
5967
|
-
|
|
5968
|
-
/* @__PURE__ */ A(
|
|
5966
|
+
C || /* @__PURE__ */ A(Mt, {}),
|
|
5967
|
+
/* @__PURE__ */ A(a, { children: i.map((w, B) => /* @__PURE__ */ A(
|
|
5969
5968
|
J.Body1,
|
|
5970
5969
|
{
|
|
5971
5970
|
props: {
|
|
@@ -6187,7 +6186,7 @@ function mt({ width: e, height: i }) {
|
|
|
6187
6186
|
function qr({ onClick: e }) {
|
|
6188
6187
|
const i = X("md");
|
|
6189
6188
|
return /* @__PURE__ */ g(
|
|
6190
|
-
|
|
6189
|
+
a,
|
|
6191
6190
|
{
|
|
6192
6191
|
height: "height-screen",
|
|
6193
6192
|
fullWidth: !0,
|
|
@@ -6438,7 +6437,7 @@ function yt({ width: e, height: i }) {
|
|
|
6438
6437
|
function Tr({ onClick: e }) {
|
|
6439
6438
|
const i = X("md");
|
|
6440
6439
|
return /* @__PURE__ */ g(
|
|
6441
|
-
|
|
6440
|
+
a,
|
|
6442
6441
|
{
|
|
6443
6442
|
height: "height-screen",
|
|
6444
6443
|
fullWidth: !0,
|
|
@@ -7129,7 +7128,7 @@ function xt({ width: e, height: i }) {
|
|
|
7129
7128
|
function Ur({ onClick: e }) {
|
|
7130
7129
|
const i = X("md");
|
|
7131
7130
|
return /* @__PURE__ */ g(
|
|
7132
|
-
|
|
7131
|
+
a,
|
|
7133
7132
|
{
|
|
7134
7133
|
height: "height-screen",
|
|
7135
7134
|
fullWidth: !0,
|
|
@@ -7167,7 +7166,7 @@ const Wr = (e) => {
|
|
|
7167
7166
|
var t, o, r, n, l;
|
|
7168
7167
|
const i = X("md");
|
|
7169
7168
|
return /* @__PURE__ */ g(
|
|
7170
|
-
|
|
7169
|
+
IA,
|
|
7171
7170
|
{
|
|
7172
7171
|
isShow: e.isShow,
|
|
7173
7172
|
onHide: e.onHide,
|
|
@@ -7180,16 +7179,16 @@ const Wr = (e) => {
|
|
|
7180
7179
|
},
|
|
7181
7180
|
children: [
|
|
7182
7181
|
/* @__PURE__ */ A(dA, { ...e.dialogTitleProps, children: typeof e.title == "string" ? /* @__PURE__ */ A(Q, { fontSize: "lg", fontWeight: "medium", children: e.title }) : e.title }),
|
|
7183
|
-
/* @__PURE__ */ A(
|
|
7182
|
+
/* @__PURE__ */ A(kA, { children: typeof e.description == "string" ? /* @__PURE__ */ A(Q, { fontSize: "md", lineHeight: "leading-6", color: "tertiary", children: e.description }) : e.description }),
|
|
7184
7183
|
/* @__PURE__ */ A(GA, { children: /* @__PURE__ */ A(
|
|
7185
|
-
|
|
7184
|
+
a,
|
|
7186
7185
|
{
|
|
7187
7186
|
display: "flex",
|
|
7188
7187
|
direction: ((t = e.containerConfirmBtnProps) == null ? void 0 : t.direction) || "row",
|
|
7189
7188
|
justify: ((o = e.containerConfirmBtnProps) == null ? void 0 : o.justify) || "flex-end",
|
|
7190
7189
|
...e.containerConfirmBtnProps,
|
|
7191
7190
|
children: /* @__PURE__ */ g(
|
|
7192
|
-
|
|
7191
|
+
a,
|
|
7193
7192
|
{
|
|
7194
7193
|
display: "flex",
|
|
7195
7194
|
direction: ((r = e.wrapperConfirmBtnProps) == null ? void 0 : r.direction) || "row",
|
|
@@ -7199,7 +7198,7 @@ const Wr = (e) => {
|
|
|
7199
7198
|
children: [
|
|
7200
7199
|
e.onCancel && /* @__PURE__ */ A(O, { secondary: !0, onClick: e.onCancel, size: "md", fullWidth: !0, children: e.titleCancelBtn || "Cancel" }),
|
|
7201
7200
|
/* @__PURE__ */ A(
|
|
7202
|
-
|
|
7201
|
+
a,
|
|
7203
7202
|
{
|
|
7204
7203
|
fullWidth: !0,
|
|
7205
7204
|
style: {
|
|
@@ -7233,31 +7232,79 @@ const Wr = (e) => {
|
|
|
7233
7232
|
minHeight: t,
|
|
7234
7233
|
customHeight: o,
|
|
7235
7234
|
paddingInline: r = "spacing-0",
|
|
7236
|
-
paddingBlock: n = "spacing-0"
|
|
7235
|
+
paddingBlock: n = "spacing-0",
|
|
7236
|
+
header: l,
|
|
7237
|
+
footer: c,
|
|
7238
|
+
title: s,
|
|
7239
|
+
titleTag: C,
|
|
7240
|
+
action: d,
|
|
7241
|
+
actionContainer: w,
|
|
7242
|
+
containerProps: B,
|
|
7243
|
+
bodyProps: D,
|
|
7244
|
+
headerProps: b = { borderBottom: !0 },
|
|
7245
|
+
footerProps: h = { borderTop: !0 },
|
|
7246
|
+
variantTag: F = "info"
|
|
7237
7247
|
}) => {
|
|
7238
|
-
const
|
|
7239
|
-
|
|
7240
|
-
const
|
|
7241
|
-
if (
|
|
7242
|
-
const
|
|
7243
|
-
|
|
7248
|
+
const N = iA(null), [Z, v] = L("100vh");
|
|
7249
|
+
R(() => {
|
|
7250
|
+
const x = () => {
|
|
7251
|
+
if (N.current) {
|
|
7252
|
+
const P = N.current.getBoundingClientRect().top;
|
|
7253
|
+
v(`calc(100vh - ${P}px)`);
|
|
7244
7254
|
}
|
|
7245
7255
|
};
|
|
7246
|
-
return
|
|
7247
|
-
}, [])
|
|
7248
|
-
|
|
7256
|
+
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7257
|
+
}, []);
|
|
7258
|
+
const E = () => C ? /* @__PURE__ */ g(a, { direction: "row", gap: "sm", align: "center", children: [
|
|
7259
|
+
/* @__PURE__ */ A(Q, { fontWeight: "medium", children: s }),
|
|
7260
|
+
/* @__PURE__ */ A(DA, { border: !0, text: C, variant: F })
|
|
7261
|
+
] }) : /* @__PURE__ */ A(Q, { fontWeight: "medium", children: s }), I = () => l || /* @__PURE__ */ g(
|
|
7262
|
+
a,
|
|
7263
|
+
{
|
|
7264
|
+
direction: "row",
|
|
7265
|
+
justify: "space-between",
|
|
7266
|
+
align: "flex-start",
|
|
7267
|
+
gap: "lg",
|
|
7268
|
+
children: [
|
|
7269
|
+
/* @__PURE__ */ A(a, { children: s ? E() : null }),
|
|
7270
|
+
/* @__PURE__ */ A(a, { ...w, children: d ?? null })
|
|
7271
|
+
]
|
|
7272
|
+
}
|
|
7273
|
+
), W = !!(l || s || d);
|
|
7274
|
+
return /* @__PURE__ */ g(
|
|
7275
|
+
a,
|
|
7249
7276
|
{
|
|
7250
|
-
ref:
|
|
7277
|
+
ref: N,
|
|
7251
7278
|
height: i,
|
|
7252
7279
|
customMinHeight: t,
|
|
7253
7280
|
customHeight: o,
|
|
7254
7281
|
paddingBlock: n,
|
|
7255
7282
|
paddingInline: r,
|
|
7256
7283
|
bg: "white",
|
|
7284
|
+
direction: "column",
|
|
7285
|
+
...B,
|
|
7257
7286
|
style: {
|
|
7258
|
-
|
|
7287
|
+
display: "flex",
|
|
7288
|
+
minHeight: Z,
|
|
7289
|
+
...(B == null ? void 0 : B.style) ?? {}
|
|
7259
7290
|
},
|
|
7260
|
-
children:
|
|
7291
|
+
children: [
|
|
7292
|
+
l !== null && W ? /* @__PURE__ */ A(ke, { ...b, children: I() }) : null,
|
|
7293
|
+
/* @__PURE__ */ A(
|
|
7294
|
+
a,
|
|
7295
|
+
{
|
|
7296
|
+
padding: "spacing-0",
|
|
7297
|
+
...D,
|
|
7298
|
+
style: {
|
|
7299
|
+
flex: 1,
|
|
7300
|
+
overflow: "auto",
|
|
7301
|
+
...(D == null ? void 0 : D.style) ?? {}
|
|
7302
|
+
},
|
|
7303
|
+
children: e
|
|
7304
|
+
}
|
|
7305
|
+
),
|
|
7306
|
+
c ? /* @__PURE__ */ A(Ee, { ...h, children: c }) : null
|
|
7307
|
+
]
|
|
7261
7308
|
}
|
|
7262
7309
|
);
|
|
7263
7310
|
}
|
|
@@ -7279,24 +7326,24 @@ function Pr({
|
|
|
7279
7326
|
menuConfig: i,
|
|
7280
7327
|
formatTitle: t
|
|
7281
7328
|
}) {
|
|
7282
|
-
const o =
|
|
7283
|
-
|
|
7329
|
+
const o = EA();
|
|
7330
|
+
R(() => {
|
|
7284
7331
|
let r = null, n = null;
|
|
7285
7332
|
for (const s of i) {
|
|
7286
|
-
const
|
|
7287
|
-
if (
|
|
7288
|
-
r =
|
|
7333
|
+
const C = s.items.find((d) => d.to ? d.to === "/" ? o.pathname === "/" : !!(d.to === o.pathname || o.pathname.startsWith(d.to + "/")) : !1);
|
|
7334
|
+
if (C) {
|
|
7335
|
+
r = C, n = s;
|
|
7289
7336
|
break;
|
|
7290
7337
|
}
|
|
7291
7338
|
}
|
|
7292
7339
|
const l = [];
|
|
7293
7340
|
r != null && r.title && l.push(r.title), n != null && n.name && l.push(n.name.toTitleCase());
|
|
7294
|
-
const c = (s,
|
|
7341
|
+
const c = (s, C) => s.length > 0 ? `${s.join(" - ")} | ${C}` : C;
|
|
7295
7342
|
document.title = (t || c)(l, e);
|
|
7296
7343
|
}, [o.pathname]);
|
|
7297
7344
|
}
|
|
7298
7345
|
const Vr = () => {
|
|
7299
|
-
const [e, i] = jA(), t = YA(e.toString()), o = Qe(), r =
|
|
7346
|
+
const [e, i] = jA(), t = YA(e.toString()), o = Qe(), r = EA(), n = o.id;
|
|
7300
7347
|
return {
|
|
7301
7348
|
// query params
|
|
7302
7349
|
setSearchParams: i,
|
|
@@ -7318,17 +7365,17 @@ function Xr(e) {
|
|
|
7318
7365
|
var o, r;
|
|
7319
7366
|
const i = e.decodedAccessToken;
|
|
7320
7367
|
return cA(() => {
|
|
7321
|
-
var s,
|
|
7322
|
-
const n = ((
|
|
7368
|
+
var s, C;
|
|
7369
|
+
const n = ((C = (s = i == null ? void 0 : i.access) == null ? void 0 : s.role) == null ? void 0 : C.code) ?? "", l = Object.keys(e.role).reduce(
|
|
7323
7370
|
(d, w) => {
|
|
7324
|
-
const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (
|
|
7371
|
+
const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (D) => D.replace("_", "").toUpperCase())}`;
|
|
7325
7372
|
return { ...d, [B]: !1 };
|
|
7326
7373
|
},
|
|
7327
7374
|
{}
|
|
7328
7375
|
);
|
|
7329
7376
|
return {
|
|
7330
7377
|
...Object.keys(e.role).reduce((d, w) => {
|
|
7331
|
-
const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (
|
|
7378
|
+
const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (D) => D.replace("_", "").toUpperCase())}`;
|
|
7332
7379
|
return {
|
|
7333
7380
|
...d,
|
|
7334
7381
|
[B]: n === e.role[w]
|
|
@@ -7344,7 +7391,7 @@ export {
|
|
|
7344
7391
|
br as AdvanceFilter,
|
|
7345
7392
|
Ji as AdvanceFilterBar,
|
|
7346
7393
|
er as App,
|
|
7347
|
-
|
|
7394
|
+
Re as AppComponent,
|
|
7348
7395
|
he as AppContext,
|
|
7349
7396
|
ir as AppLayout,
|
|
7350
7397
|
Kr as AsideBar,
|
|
@@ -7353,7 +7400,7 @@ export {
|
|
|
7353
7400
|
Wr as ConfirmationDialog,
|
|
7354
7401
|
Pi as DataTable,
|
|
7355
7402
|
Y as DecisionWrapper,
|
|
7356
|
-
|
|
7403
|
+
MA as EachUtils,
|
|
7357
7404
|
Jr as EmptyStatePage,
|
|
7358
7405
|
Hi as FilterDrawer,
|
|
7359
7406
|
Zr as FloatingFooter,
|
|
@@ -7365,16 +7412,18 @@ export {
|
|
|
7365
7412
|
ut as InputImage,
|
|
7366
7413
|
nr as ModalDialog,
|
|
7367
7414
|
tr as ModuleSwitcher,
|
|
7368
|
-
|
|
7415
|
+
Ve as ModuleSwitcherModal,
|
|
7369
7416
|
qr as NotFoundPage,
|
|
7370
7417
|
lr as PageLayout,
|
|
7371
7418
|
wA as Pressable,
|
|
7372
7419
|
FA as RightDrawer,
|
|
7373
7420
|
kt as ScrollToTopButton,
|
|
7374
7421
|
cr as Section,
|
|
7422
|
+
Ee as SectionFooter,
|
|
7423
|
+
ke as SectionHeader,
|
|
7375
7424
|
Ur as ServerErrorPage,
|
|
7376
|
-
|
|
7377
|
-
|
|
7425
|
+
Ue as SidebarBadgesProvider,
|
|
7426
|
+
ve as SidebarHeaderSlot,
|
|
7378
7427
|
Fr as SwitchApps,
|
|
7379
7428
|
Wi as TableFooter,
|
|
7380
7429
|
Ti as TableHeader,
|
|
@@ -7387,7 +7436,7 @@ export {
|
|
|
7387
7436
|
dr as cssVars,
|
|
7388
7437
|
ur as formHasChanged,
|
|
7389
7438
|
wr as formatDate,
|
|
7390
|
-
|
|
7439
|
+
SA as formatDateToIndonesian,
|
|
7391
7440
|
Cr as formatRupiah,
|
|
7392
7441
|
Yr as getDateFilterValue,
|
|
7393
7442
|
Or as getDateRangeFilterValue,
|
|
@@ -7417,12 +7466,12 @@ export {
|
|
|
7417
7466
|
hr as textWidth,
|
|
7418
7467
|
Sr as useAdvanceFilter,
|
|
7419
7468
|
ue as useApp,
|
|
7420
|
-
|
|
7469
|
+
Te as useAppState,
|
|
7421
7470
|
Xr as useAuthRole,
|
|
7422
7471
|
Pr as useDynamicTitle,
|
|
7423
7472
|
Ie as useModuleSelection,
|
|
7424
7473
|
PA as useRouteInfo,
|
|
7425
7474
|
Vr as useRouteParams,
|
|
7426
|
-
|
|
7475
|
+
We as useSidebarBadges,
|
|
7427
7476
|
vr as useTabState
|
|
7428
7477
|
};
|