@starasia/admin 6.6.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/InputFile/index.d.ts +4 -12
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +979 -1013
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Box as f } from "@starasia/box";
|
|
|
5
5
|
export * from "@starasia/box";
|
|
6
6
|
import { Breadcrumb as ir, BreadcrumbItem as kt, BreadcrumbLink as nr } from "@starasia/breadcrumb";
|
|
7
7
|
export * from "@starasia/breadcrumb";
|
|
8
|
-
import { Button as
|
|
8
|
+
import { Button as T } from "@starasia/button";
|
|
9
9
|
export * from "@starasia/button";
|
|
10
10
|
export * from "@starasia/card";
|
|
11
11
|
import { StarasiaDate as or } from "@starasia/date";
|
|
@@ -35,7 +35,7 @@ export * from "@starasia/textarea";
|
|
|
35
35
|
import { useTheme as fr, ThemeProvider as Ft, useColor as gr } from "@starasia/theme";
|
|
36
36
|
export * from "@starasia/theme";
|
|
37
37
|
export * from "@starasia/toast";
|
|
38
|
-
import { Toggle as
|
|
38
|
+
import { Toggle as Ut } from "@starasia/toggle";
|
|
39
39
|
export * from "@starasia/toggle";
|
|
40
40
|
import { Tooltip as me } from "@starasia/tooltip";
|
|
41
41
|
export * from "@starasia/tooltip";
|
|
@@ -43,22 +43,22 @@ import { Checkbox as ct } from "@starasia/checkbox";
|
|
|
43
43
|
export * from "@starasia/checkbox";
|
|
44
44
|
import { Radio as mr } from "@starasia/radio";
|
|
45
45
|
export * from "@starasia/radio";
|
|
46
|
-
import { Text as
|
|
46
|
+
import { Text as v } from "@starasia/text";
|
|
47
47
|
export * from "@starasia/text";
|
|
48
|
-
import { Icon as
|
|
48
|
+
import { Icon as b } from "@starasia/icon";
|
|
49
49
|
export * from "@starasia/icon";
|
|
50
|
-
import { Flex as
|
|
50
|
+
import { Flex as $ } from "@starasia/flex";
|
|
51
51
|
export * from "@starasia/flex";
|
|
52
52
|
export * from "@starasia/progress";
|
|
53
53
|
export * from "@starasia/stepper";
|
|
54
54
|
export * from "@starasia/accordion";
|
|
55
55
|
export * from "@starasia/story-record";
|
|
56
|
-
import { Skeleton as
|
|
56
|
+
import { Skeleton as ze } from "@starasia/skeleton";
|
|
57
57
|
export * from "@starasia/skeleton";
|
|
58
58
|
export * from "@starasia/progress-stepper";
|
|
59
|
-
import { jsx as e, Fragment as
|
|
60
|
-
import
|
|
61
|
-
import { useSearchParams as Ye, useNavigate as mt, useLocation as Ve, Outlet as Et, Link as
|
|
59
|
+
import { jsx as e, Fragment as U, jsxs as u } from "react/jsx-runtime";
|
|
60
|
+
import Ue, { createContext as Qe, useState as k, useContext as We, useCallback as ve, useMemo as he, memo as ce, useEffect as Z, useRef as ie, useLayoutEffect as at, isValidElement as st, forwardRef as qt, Children as yr, useImperativeHandle as pr } from "react";
|
|
61
|
+
import { useSearchParams as Ye, useNavigate as mt, useLocation as Ve, Outlet as Et, Link as qe, useParams as Jt } from "react-router";
|
|
62
62
|
import xr, { createPortal as Pt } from "react-dom";
|
|
63
63
|
import Cr from "react-easy-crop";
|
|
64
64
|
const vr = {
|
|
@@ -69,7 +69,7 @@ const vr = {
|
|
|
69
69
|
userData: null,
|
|
70
70
|
setUserData: () => {
|
|
71
71
|
}
|
|
72
|
-
}, Qt = Qe(vr), Yt = () => We(Qt),
|
|
72
|
+
}, Qt = Qe(vr), Yt = () => We(Qt), Dr = (t) => {
|
|
73
73
|
const [r, i] = k(
|
|
74
74
|
(t == null ? void 0 : t.initialUserData) || null
|
|
75
75
|
);
|
|
@@ -85,7 +85,7 @@ const vr = {
|
|
|
85
85
|
},
|
|
86
86
|
clearBadge: () => {
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), br = ({ children: t }) => {
|
|
89
89
|
const [r, i] = k({}), o = ve(
|
|
90
90
|
(a) => {
|
|
91
91
|
i(
|
|
@@ -107,11 +107,11 @@ const vr = {
|
|
|
107
107
|
const d = { ...h };
|
|
108
108
|
return delete d[a], d;
|
|
109
109
|
});
|
|
110
|
-
}, []),
|
|
110
|
+
}, []), s = he(
|
|
111
111
|
() => ({ badges: r, setBadge: n, setBadges: o, clearBadge: l }),
|
|
112
112
|
[r, n, o, l]
|
|
113
113
|
);
|
|
114
|
-
return /* @__PURE__ */ e(Xt.Provider, { value:
|
|
114
|
+
return /* @__PURE__ */ e(Xt.Provider, { value: s, children: t });
|
|
115
115
|
}, wr = () => We(Xt), rt = (t, r) => {
|
|
116
116
|
const i = r !== void 0 ? r : t;
|
|
117
117
|
return i == null ? null : typeof i == "string" || typeof i == "number" ? { value: i } : i;
|
|
@@ -122,9 +122,9 @@ const vr = {
|
|
|
122
122
|
logo: o,
|
|
123
123
|
appName: n = "Workspace",
|
|
124
124
|
initialUserData: l,
|
|
125
|
-
theme:
|
|
125
|
+
theme: s
|
|
126
126
|
}) => {
|
|
127
|
-
const a =
|
|
127
|
+
const a = Dr({ initialUserData: l }), { theme: h } = fr();
|
|
128
128
|
return /* @__PURE__ */ e(
|
|
129
129
|
Qt.Provider,
|
|
130
130
|
{
|
|
@@ -136,10 +136,10 @@ const vr = {
|
|
|
136
136
|
setUserData: a.setUserData,
|
|
137
137
|
menuBottom: i
|
|
138
138
|
},
|
|
139
|
-
children: /* @__PURE__ */ e(
|
|
139
|
+
children: /* @__PURE__ */ e(br, { children: s ? /* @__PURE__ */ e(Ft, { value: s, children: t }) : h ? /* @__PURE__ */ e(Ft, { value: h, children: t }) : t })
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
|
-
},
|
|
142
|
+
}, zn = ce(kr);
|
|
143
143
|
function Sr({
|
|
144
144
|
collapsed: t = !1,
|
|
145
145
|
children: r
|
|
@@ -179,7 +179,7 @@ function Sr({
|
|
|
179
179
|
}
|
|
180
180
|
const yt = Qe(null);
|
|
181
181
|
function Fr({ children: t }) {
|
|
182
|
-
const [r, i] = k(null), [o, n] = k(null), [l,
|
|
182
|
+
const [r, i] = k(null), [o, n] = k(null), [l, s] = k(null), [a, h] = k(0), d = ve(() => (h((g) => g + 1), () => h((g) => g - 1)), []);
|
|
183
183
|
return /* @__PURE__ */ e(
|
|
184
184
|
yt.Provider,
|
|
185
185
|
{
|
|
@@ -189,7 +189,7 @@ function Fr({ children: t }) {
|
|
|
189
189
|
replaceNode: l,
|
|
190
190
|
setPrependNode: i,
|
|
191
191
|
setAppendNode: n,
|
|
192
|
-
setReplaceNode:
|
|
192
|
+
setReplaceNode: s,
|
|
193
193
|
replaceCount: a,
|
|
194
194
|
registerReplace: d
|
|
195
195
|
},
|
|
@@ -199,18 +199,18 @@ function Fr({ children: t }) {
|
|
|
199
199
|
}
|
|
200
200
|
function Er({ children: t }) {
|
|
201
201
|
const r = We(yt);
|
|
202
|
-
return r ? /* @__PURE__ */
|
|
202
|
+
return r ? /* @__PURE__ */ u(U, { children: [
|
|
203
203
|
/* @__PURE__ */ e("div", { ref: r.setPrependNode, style: { display: "contents" } }),
|
|
204
204
|
r.replaceCount > 0 ? /* @__PURE__ */ e("div", { ref: r.setReplaceNode, style: { display: "contents" } }) : t,
|
|
205
205
|
/* @__PURE__ */ e("div", { ref: r.setAppendNode, style: { display: "contents" } })
|
|
206
|
-
] }) : /* @__PURE__ */ e(
|
|
206
|
+
] }) : /* @__PURE__ */ e(U, { children: t });
|
|
207
207
|
}
|
|
208
208
|
function Rn({
|
|
209
209
|
children: t,
|
|
210
210
|
mode: r = "append"
|
|
211
211
|
}) {
|
|
212
212
|
const i = We(yt);
|
|
213
|
-
if (
|
|
213
|
+
if (Z(() => {
|
|
214
214
|
if (!(r !== "replace" || !i))
|
|
215
215
|
return i.registerReplace();
|
|
216
216
|
}, [r, i]), !i)
|
|
@@ -224,12 +224,12 @@ const pt = Qe(null);
|
|
|
224
224
|
function Mr({ children: t }) {
|
|
225
225
|
const [r, i] = k({}), [o, n] = k({}), l = ve((h, d) => {
|
|
226
226
|
i((g) => g[h] === d ? g : { ...g, [h]: d });
|
|
227
|
-
}, []),
|
|
227
|
+
}, []), s = ve((h) => (n((d) => ({ ...d, [h]: (d[h] ?? 0) + 1 })), () => n((d) => ({
|
|
228
228
|
...d,
|
|
229
229
|
[h]: Math.max(0, (d[h] ?? 0) - 1)
|
|
230
230
|
}))), []), a = he(
|
|
231
|
-
() => ({ outletNodes: r, setOutletNode: l, slotCounts: o, registerSlot:
|
|
232
|
-
[r, l, o,
|
|
231
|
+
() => ({ outletNodes: r, setOutletNode: l, slotCounts: o, registerSlot: s }),
|
|
232
|
+
[r, l, o, s]
|
|
233
233
|
);
|
|
234
234
|
return /* @__PURE__ */ e(pt.Provider, { value: a, children: t });
|
|
235
235
|
}
|
|
@@ -237,18 +237,18 @@ function Lr({ slotKey: t, fallback: r }) {
|
|
|
237
237
|
const i = We(pt), o = i ? (i.slotCounts[t] ?? 0) > 0 : !1, n = ie(i == null ? void 0 : i.setOutletNode);
|
|
238
238
|
n.current = i == null ? void 0 : i.setOutletNode;
|
|
239
239
|
const l = ve(
|
|
240
|
-
(
|
|
240
|
+
(s) => {
|
|
241
241
|
var a;
|
|
242
|
-
return (a = n.current) == null ? void 0 : a.call(n, t,
|
|
242
|
+
return (a = n.current) == null ? void 0 : a.call(n, t, s);
|
|
243
243
|
},
|
|
244
244
|
[t]
|
|
245
245
|
// slotKey is a stable string from group config
|
|
246
246
|
);
|
|
247
|
-
return /* @__PURE__ */ e(
|
|
247
|
+
return /* @__PURE__ */ e(U, { children: o ? /* @__PURE__ */ e("div", { ref: l, style: { display: "contents" } }) : r });
|
|
248
248
|
}
|
|
249
249
|
function Vn({ slotKey: t, children: r }) {
|
|
250
250
|
const i = We(pt), o = ie(i == null ? void 0 : i.registerSlot);
|
|
251
|
-
if (o.current = i == null ? void 0 : i.registerSlot,
|
|
251
|
+
if (o.current = i == null ? void 0 : i.registerSlot, Z(() => {
|
|
252
252
|
var l;
|
|
253
253
|
return (l = o.current) == null ? void 0 : l.call(o, t);
|
|
254
254
|
}, [t]), !i)
|
|
@@ -269,14 +269,14 @@ function Mt() {
|
|
|
269
269
|
function Kt(t) {
|
|
270
270
|
typeof window > "u" || (t === null ? window.localStorage.removeItem(Je) : window.localStorage.setItem(Je, String(t)), window.dispatchEvent(new CustomEvent(dt, { detail: t })));
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Nn() {
|
|
273
273
|
Kt(null);
|
|
274
274
|
}
|
|
275
275
|
function er() {
|
|
276
276
|
const [t, r] = k(
|
|
277
277
|
() => Mt()
|
|
278
278
|
);
|
|
279
|
-
return
|
|
279
|
+
return Z(() => {
|
|
280
280
|
const o = () => {
|
|
281
281
|
r(Mt());
|
|
282
282
|
}, n = (l) => {
|
|
@@ -290,7 +290,7 @@ function er() {
|
|
|
290
290
|
} };
|
|
291
291
|
}
|
|
292
292
|
let Ze = 0, ke = !1, Lt = /* @__PURE__ */ new Set();
|
|
293
|
-
const Wt = () => /* @__PURE__ */
|
|
293
|
+
const Wt = () => /* @__PURE__ */ u(
|
|
294
294
|
"svg",
|
|
295
295
|
{
|
|
296
296
|
width: "100%",
|
|
@@ -324,14 +324,14 @@ const Wt = () => /* @__PURE__ */ s(
|
|
|
324
324
|
cursor: "pointer",
|
|
325
325
|
textAlign: "left"
|
|
326
326
|
};
|
|
327
|
-
function
|
|
327
|
+
function Tn({
|
|
328
328
|
children: t,
|
|
329
329
|
headerLeftSlot: r,
|
|
330
330
|
profile: i,
|
|
331
331
|
isLoadingProfile: o,
|
|
332
332
|
onLogout: n,
|
|
333
333
|
isLoggingOut: l,
|
|
334
|
-
loadingComponent:
|
|
334
|
+
loadingComponent: s,
|
|
335
335
|
sidebarHeaderContent: a,
|
|
336
336
|
headerActions: h,
|
|
337
337
|
profileRole: d,
|
|
@@ -340,20 +340,20 @@ function Nn({
|
|
|
340
340
|
logoutButton: y
|
|
341
341
|
}) {
|
|
342
342
|
var Ee, _e;
|
|
343
|
-
const [
|
|
343
|
+
const [D] = Ye(), E = D.get("embed") === "true", x = Yt(), { badges: z } = wr(), j = mt(), N = Ve(), M = !ne("md"), [ae, J] = k(!1), [I, P] = k(!1), [oe, le] = k(!1), [G, Q] = k(!1), [K, se] = k(
|
|
344
344
|
() => new Set(Lt)
|
|
345
345
|
), [ee, X] = k(null), { selectedGroupId: R, setSelectedGroupId: V } = er();
|
|
346
|
-
|
|
346
|
+
Z(() => {
|
|
347
347
|
Lt = K;
|
|
348
348
|
}, [K]);
|
|
349
349
|
const te = ie(null), fe = ie(null);
|
|
350
|
-
|
|
350
|
+
Z(() => {
|
|
351
351
|
const p = te.current;
|
|
352
352
|
if (!p) return;
|
|
353
|
-
const
|
|
353
|
+
const F = () => {
|
|
354
354
|
ke || (Ze = p.scrollTop);
|
|
355
355
|
};
|
|
356
|
-
return p.addEventListener("scroll",
|
|
356
|
+
return p.addEventListener("scroll", F), () => p.removeEventListener("scroll", F);
|
|
357
357
|
}, []);
|
|
358
358
|
const ge = () => {
|
|
359
359
|
const p = te.current;
|
|
@@ -368,127 +368,127 @@ function Nn({
|
|
|
368
368
|
}, 300);
|
|
369
369
|
return () => clearTimeout(p);
|
|
370
370
|
}, []), at(() => {
|
|
371
|
-
|
|
372
|
-
var
|
|
373
|
-
const p = (
|
|
371
|
+
x.menus.length > 0 && (Ze > 0 ? ge() : requestAnimationFrame(() => {
|
|
372
|
+
var F;
|
|
373
|
+
const p = (F = te.current) == null ? void 0 : F.querySelector(
|
|
374
374
|
"[data-menu-active='true']"
|
|
375
375
|
);
|
|
376
376
|
p && p.scrollIntoView({ block: "center", behavior: "instant" });
|
|
377
377
|
}));
|
|
378
|
-
}, [
|
|
378
|
+
}, [x.menus]), Z(() => {
|
|
379
379
|
ke = !0, ge();
|
|
380
|
-
const p = setTimeout(ge, 0),
|
|
380
|
+
const p = setTimeout(ge, 0), F = setTimeout(ge, 50), L = setTimeout(ge, 100), C = setTimeout(ge, 200), S = setTimeout(() => {
|
|
381
381
|
ke = !1;
|
|
382
382
|
}, 300);
|
|
383
383
|
return () => {
|
|
384
|
-
clearTimeout(p), clearTimeout(
|
|
384
|
+
clearTimeout(p), clearTimeout(F), clearTimeout(L), clearTimeout(C), clearTimeout(S);
|
|
385
385
|
};
|
|
386
|
-
}, [
|
|
386
|
+
}, [N.pathname]), Z(() => {
|
|
387
387
|
fe.current && (fe.current.scrollTop = 0);
|
|
388
|
-
}, [
|
|
388
|
+
}, [N.pathname]), Z(() => {
|
|
389
389
|
M && le(!1);
|
|
390
|
-
}, [
|
|
390
|
+
}, [N.pathname, M]), Z(() => {
|
|
391
391
|
M && P(!0);
|
|
392
392
|
}, [M]);
|
|
393
393
|
const Be = () => {
|
|
394
394
|
J(!0);
|
|
395
|
-
},
|
|
395
|
+
}, Ne = () => {
|
|
396
396
|
J(!1);
|
|
397
397
|
}, et = () => {
|
|
398
398
|
J(!1), n();
|
|
399
|
-
},
|
|
400
|
-
const
|
|
401
|
-
return p.children &&
|
|
399
|
+
}, Te = (p) => {
|
|
400
|
+
const F = [p.to];
|
|
401
|
+
return p.children && F.push(...p.children.map((L) => L.to)), F;
|
|
402
402
|
}, Ae = [
|
|
403
|
-
...
|
|
404
|
-
...((Ee =
|
|
403
|
+
...x.menus.flatMap((p) => p.items.flatMap(Te)),
|
|
404
|
+
...((Ee = x.menuBottom) == null ? void 0 : Ee.flatMap(Te)) ?? []
|
|
405
405
|
], de = (p) => {
|
|
406
|
-
if (!
|
|
407
|
-
const
|
|
408
|
-
return p ===
|
|
406
|
+
if (!N.pathname.startsWith(p)) return !1;
|
|
407
|
+
const F = Ae.filter((L) => N.pathname.startsWith(L)).sort((L, C) => C.length - L.length)[0];
|
|
408
|
+
return p === F;
|
|
409
409
|
};
|
|
410
|
-
|
|
411
|
-
var
|
|
410
|
+
Z(() => {
|
|
411
|
+
var F;
|
|
412
412
|
const p = (L) => {
|
|
413
|
-
var
|
|
414
|
-
(
|
|
415
|
-
const w = new Set(
|
|
413
|
+
var C;
|
|
414
|
+
(C = L.children) != null && C.some((S) => N.pathname.startsWith(S.to)) && se((S) => {
|
|
415
|
+
const w = new Set(S);
|
|
416
416
|
return w.add(L.id), w;
|
|
417
417
|
});
|
|
418
418
|
};
|
|
419
|
-
|
|
419
|
+
x.menus.forEach((L) => {
|
|
420
420
|
L.items.forEach(p);
|
|
421
|
-
}), (
|
|
422
|
-
}, [
|
|
421
|
+
}), (F = x.menuBottom) == null || F.forEach(p);
|
|
422
|
+
}, [N.pathname, x.menus, x.menuBottom]);
|
|
423
423
|
const Oe = (p) => {
|
|
424
|
-
se((
|
|
425
|
-
const L = new Set(
|
|
424
|
+
se((F) => {
|
|
425
|
+
const L = new Set(F);
|
|
426
426
|
return L.has(p) ? L.delete(p) : L.add(p), L;
|
|
427
427
|
});
|
|
428
428
|
};
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}, [
|
|
432
|
-
const
|
|
429
|
+
Z(() => {
|
|
430
|
+
x.menus.length !== 0 && R !== null && !x.menus.some((p) => p.id === R) && V(null);
|
|
431
|
+
}, [x.menus, R, V]);
|
|
432
|
+
const Ie = he(() => {
|
|
433
433
|
if (R !== null)
|
|
434
|
-
return
|
|
434
|
+
return x.menus.filter(
|
|
435
435
|
(L) => L.id === R || L.parentGroupId === R
|
|
436
436
|
);
|
|
437
|
-
const p =
|
|
438
|
-
return
|
|
437
|
+
const p = x.menus.filter((L) => L.parentGroupId === void 0), F = x.menus.filter((L) => L.parentGroupId !== void 0).flatMap((L) => L.items);
|
|
438
|
+
return F.length === 0 ? p : [
|
|
439
439
|
...p,
|
|
440
|
-
{ id: 18, name: "Pengaturan", items:
|
|
440
|
+
{ id: 18, name: "Pengaturan", items: F, parentGroupId: void 0 }
|
|
441
441
|
];
|
|
442
|
-
}, [
|
|
443
|
-
if (
|
|
442
|
+
}, [x.menus, R]);
|
|
443
|
+
if (E)
|
|
444
444
|
return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: t || /* @__PURE__ */ e(Et, {}) });
|
|
445
445
|
const Fe = (p) => {
|
|
446
|
-
const
|
|
447
|
-
return /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
446
|
+
const F = p.children && p.children.length > 0, L = K.has(p.id), C = F ? p.children.some((B) => de(B.to)) : de(p.to), S = rt(p.badge, z[p.id]), w = !!S && I && !M;
|
|
447
|
+
return /* @__PURE__ */ u("div", { "data-menu-active": C || void 0, children: [
|
|
448
|
+
/* @__PURE__ */ u(
|
|
449
449
|
"button",
|
|
450
450
|
{
|
|
451
451
|
onClick: (B) => {
|
|
452
|
-
if (
|
|
453
|
-
if (
|
|
454
|
-
const
|
|
452
|
+
if (F)
|
|
453
|
+
if (I && !M) {
|
|
454
|
+
const H = B.currentTarget.getBoundingClientRect();
|
|
455
455
|
X({
|
|
456
456
|
item: p,
|
|
457
|
-
top:
|
|
458
|
-
left:
|
|
457
|
+
top: H.top,
|
|
458
|
+
left: H.right + 8
|
|
459
459
|
});
|
|
460
460
|
} else
|
|
461
461
|
Oe(p.id);
|
|
462
462
|
else
|
|
463
|
-
|
|
463
|
+
j(p.to);
|
|
464
464
|
},
|
|
465
465
|
style: {
|
|
466
466
|
width: "100%",
|
|
467
467
|
display: "flex",
|
|
468
468
|
alignItems: "center",
|
|
469
|
-
justifyContent:
|
|
469
|
+
justifyContent: I && !M ? "center" : void 0,
|
|
470
470
|
gap: "0.5rem",
|
|
471
|
-
paddingLeft:
|
|
472
|
-
paddingRight:
|
|
471
|
+
paddingLeft: I && !M ? "0" : "0.5rem",
|
|
472
|
+
paddingRight: I && !M ? "0" : "0.5rem",
|
|
473
473
|
paddingTop: "0.25rem",
|
|
474
474
|
paddingBottom: "0.25rem",
|
|
475
475
|
height: "2rem",
|
|
476
|
-
borderRadius:
|
|
476
|
+
borderRadius: C ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
|
|
477
477
|
textAlign: "left",
|
|
478
|
-
border:
|
|
479
|
-
backgroundColor:
|
|
478
|
+
border: C ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent",
|
|
479
|
+
backgroundColor: C ? "var(--sa-background-primary, #ffffff)" : "transparent",
|
|
480
480
|
color: "var(--sa-text-primary, #292a2e)",
|
|
481
481
|
cursor: "pointer"
|
|
482
482
|
},
|
|
483
|
-
title:
|
|
483
|
+
title: I && !M ? p.title : void 0,
|
|
484
484
|
onMouseEnter: (B) => {
|
|
485
|
-
|
|
485
|
+
C || (B.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
|
|
486
486
|
},
|
|
487
487
|
onMouseLeave: (B) => {
|
|
488
|
-
|
|
488
|
+
C || (B.currentTarget.style.backgroundColor = "transparent");
|
|
489
489
|
},
|
|
490
490
|
children: [
|
|
491
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ u(
|
|
492
492
|
"span",
|
|
493
493
|
{
|
|
494
494
|
style: {
|
|
@@ -497,7 +497,7 @@ function Nn({
|
|
|
497
497
|
flexShrink: 0
|
|
498
498
|
},
|
|
499
499
|
children: [
|
|
500
|
-
/* @__PURE__ */ e(
|
|
500
|
+
/* @__PURE__ */ e(b, { name: p.icon, size: "sm", style: { flexShrink: 0 } }),
|
|
501
501
|
w && /* @__PURE__ */ e(
|
|
502
502
|
"span",
|
|
503
503
|
{
|
|
@@ -517,7 +517,7 @@ function Nn({
|
|
|
517
517
|
]
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
|
-
(!
|
|
520
|
+
(!I || M) && /* @__PURE__ */ u(U, { children: [
|
|
521
521
|
/* @__PURE__ */ e(
|
|
522
522
|
"span",
|
|
523
523
|
{
|
|
@@ -534,16 +534,16 @@ function Nn({
|
|
|
534
534
|
children: p.title
|
|
535
535
|
}
|
|
536
536
|
),
|
|
537
|
-
|
|
537
|
+
S && /* @__PURE__ */ e(
|
|
538
538
|
Le,
|
|
539
539
|
{
|
|
540
|
-
text: String(
|
|
541
|
-
variant:
|
|
540
|
+
text: String(S.value),
|
|
541
|
+
variant: S.variant ?? "info",
|
|
542
542
|
size: "xs",
|
|
543
543
|
border: !0
|
|
544
544
|
}
|
|
545
545
|
),
|
|
546
|
-
|
|
546
|
+
F && /* @__PURE__ */ e(
|
|
547
547
|
"svg",
|
|
548
548
|
{
|
|
549
549
|
style: {
|
|
@@ -571,11 +571,11 @@ function Nn({
|
|
|
571
571
|
]
|
|
572
572
|
}
|
|
573
573
|
),
|
|
574
|
-
|
|
574
|
+
F && (!I || M) && (() => {
|
|
575
575
|
const B = p.children.findIndex(
|
|
576
|
-
(
|
|
576
|
+
(H) => de(H.to)
|
|
577
577
|
);
|
|
578
|
-
return /* @__PURE__ */
|
|
578
|
+
return /* @__PURE__ */ u(
|
|
579
579
|
"div",
|
|
580
580
|
{
|
|
581
581
|
style: {
|
|
@@ -621,15 +621,15 @@ function Nn({
|
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
),
|
|
624
|
-
p.children.map((
|
|
624
|
+
p.children.map((H) => {
|
|
625
625
|
const ue = rt(
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
H.badge,
|
|
627
|
+
z[H.id]
|
|
628
628
|
);
|
|
629
|
-
return /* @__PURE__ */
|
|
629
|
+
return /* @__PURE__ */ u(
|
|
630
630
|
"button",
|
|
631
631
|
{
|
|
632
|
-
onClick: () =>
|
|
632
|
+
onClick: () => j(H.to),
|
|
633
633
|
style: {
|
|
634
634
|
width: "100%",
|
|
635
635
|
display: "flex",
|
|
@@ -640,24 +640,24 @@ function Nn({
|
|
|
640
640
|
paddingTop: "0.25rem",
|
|
641
641
|
paddingBottom: "0.25rem",
|
|
642
642
|
height: "2rem",
|
|
643
|
-
borderRadius: de(
|
|
643
|
+
borderRadius: de(H.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
|
|
644
644
|
textAlign: "left",
|
|
645
|
-
backgroundColor: de(
|
|
646
|
-
color: de(
|
|
645
|
+
backgroundColor: de(H.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
|
|
646
|
+
color: de(H.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
|
|
647
647
|
cursor: "pointer",
|
|
648
|
-
border: de(
|
|
648
|
+
border: de(H.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
|
|
649
649
|
},
|
|
650
650
|
onMouseEnter: (xe) => {
|
|
651
|
-
de(
|
|
651
|
+
de(H.to) || (xe.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
|
|
652
652
|
},
|
|
653
653
|
onMouseLeave: (xe) => {
|
|
654
|
-
de(
|
|
654
|
+
de(H.to) || (xe.currentTarget.style.backgroundColor = "transparent");
|
|
655
655
|
},
|
|
656
656
|
children: [
|
|
657
657
|
/* @__PURE__ */ e(
|
|
658
|
-
|
|
658
|
+
b,
|
|
659
659
|
{
|
|
660
|
-
name:
|
|
660
|
+
name: H.icon,
|
|
661
661
|
size: "sm",
|
|
662
662
|
style: { flexShrink: 0 }
|
|
663
663
|
}
|
|
@@ -674,7 +674,7 @@ function Nn({
|
|
|
674
674
|
overflow: "hidden",
|
|
675
675
|
textOverflow: "ellipsis"
|
|
676
676
|
},
|
|
677
|
-
children:
|
|
677
|
+
children: H.title
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
680
|
ue && /* @__PURE__ */ e(
|
|
@@ -688,7 +688,7 @@ function Nn({
|
|
|
688
688
|
)
|
|
689
689
|
]
|
|
690
690
|
},
|
|
691
|
-
|
|
691
|
+
H.id
|
|
692
692
|
);
|
|
693
693
|
})
|
|
694
694
|
]
|
|
@@ -697,8 +697,8 @@ function Nn({
|
|
|
697
697
|
})()
|
|
698
698
|
] }, p.id);
|
|
699
699
|
};
|
|
700
|
-
return /* @__PURE__ */ e(Mr, { children: /* @__PURE__ */
|
|
701
|
-
/* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ e(Mr, { children: /* @__PURE__ */ u(Fr, { children: [
|
|
701
|
+
/* @__PURE__ */ u(
|
|
702
702
|
"div",
|
|
703
703
|
{
|
|
704
704
|
style: {
|
|
@@ -706,7 +706,7 @@ function Nn({
|
|
|
706
706
|
height: "100vh",
|
|
707
707
|
// backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
708
708
|
position: "relative",
|
|
709
|
-
"--app-sidebar-width": M ? "0px" :
|
|
709
|
+
"--app-sidebar-width": M ? "0px" : I ? "4.375rem" : "16.375rem",
|
|
710
710
|
"--app-footer-zindex": M && oe ? "40" : "999"
|
|
711
711
|
},
|
|
712
712
|
children: [
|
|
@@ -725,11 +725,11 @@ function Nn({
|
|
|
725
725
|
onClick: () => le(!1)
|
|
726
726
|
}
|
|
727
727
|
),
|
|
728
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ u(
|
|
729
729
|
"aside",
|
|
730
730
|
{
|
|
731
731
|
style: {
|
|
732
|
-
width: M ? "16.375rem" :
|
|
732
|
+
width: M ? "16.375rem" : I ? "4.375rem" : "16.375rem",
|
|
733
733
|
position: M ? "fixed" : "relative",
|
|
734
734
|
...M && {
|
|
735
735
|
inset: 0,
|
|
@@ -760,9 +760,9 @@ function Nn({
|
|
|
760
760
|
position: "relative"
|
|
761
761
|
},
|
|
762
762
|
children: (() => {
|
|
763
|
-
const p = !M &&
|
|
764
|
-
return /* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
763
|
+
const p = !M && I && !oe, F = p && G;
|
|
764
|
+
return /* @__PURE__ */ u(U, { children: [
|
|
765
|
+
/* @__PURE__ */ u(
|
|
766
766
|
"div",
|
|
767
767
|
{
|
|
768
768
|
style: {
|
|
@@ -772,14 +772,14 @@ function Nn({
|
|
|
772
772
|
flex: p ? 1 : void 0,
|
|
773
773
|
justifyContent: p ? "center" : void 0,
|
|
774
774
|
transition: "opacity 0.2s",
|
|
775
|
-
opacity:
|
|
776
|
-
pointerEvents:
|
|
775
|
+
opacity: F ? 0 : 1,
|
|
776
|
+
pointerEvents: F ? "none" : "auto"
|
|
777
777
|
},
|
|
778
778
|
children: [
|
|
779
779
|
/* @__PURE__ */ e(
|
|
780
780
|
"img",
|
|
781
781
|
{
|
|
782
|
-
src:
|
|
782
|
+
src: x.logo,
|
|
783
783
|
alt: "Logo",
|
|
784
784
|
style: {
|
|
785
785
|
width: "2rem",
|
|
@@ -788,7 +788,7 @@ function Nn({
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
),
|
|
791
|
-
(!
|
|
791
|
+
(!I || oe) && /* @__PURE__ */ e(
|
|
792
792
|
"span",
|
|
793
793
|
{
|
|
794
794
|
style: {
|
|
@@ -797,13 +797,13 @@ function Nn({
|
|
|
797
797
|
whiteSpace: "nowrap",
|
|
798
798
|
transition: "opacity 0.3s"
|
|
799
799
|
},
|
|
800
|
-
children:
|
|
800
|
+
children: x.appName
|
|
801
801
|
}
|
|
802
802
|
)
|
|
803
803
|
]
|
|
804
804
|
}
|
|
805
805
|
),
|
|
806
|
-
!M && !
|
|
806
|
+
!M && !I && /* @__PURE__ */ e(
|
|
807
807
|
"button",
|
|
808
808
|
{
|
|
809
809
|
type: "button",
|
|
@@ -847,8 +847,8 @@ function Nn({
|
|
|
847
847
|
borderRadius: "var(--sa-radii-sm, 0.375rem)",
|
|
848
848
|
color: "var(--sa-text-primary, #292a2e)",
|
|
849
849
|
cursor: "pointer",
|
|
850
|
-
opacity:
|
|
851
|
-
pointerEvents:
|
|
850
|
+
opacity: F ? 1 : 0,
|
|
851
|
+
pointerEvents: F ? "auto" : "none",
|
|
852
852
|
transition: "opacity 0.2s"
|
|
853
853
|
},
|
|
854
854
|
children: /* @__PURE__ */ e(
|
|
@@ -904,7 +904,7 @@ function Nn({
|
|
|
904
904
|
a && /* @__PURE__ */ e(
|
|
905
905
|
Sr,
|
|
906
906
|
{
|
|
907
|
-
collapsed: M ? !1 :
|
|
907
|
+
collapsed: M ? !1 : I,
|
|
908
908
|
children: a
|
|
909
909
|
}
|
|
910
910
|
),
|
|
@@ -918,8 +918,8 @@ function Nn({
|
|
|
918
918
|
paddingTop: "1rem",
|
|
919
919
|
paddingBottom: "1rem"
|
|
920
920
|
},
|
|
921
|
-
children:
|
|
922
|
-
!
|
|
921
|
+
children: Ie.map((p) => /* @__PURE__ */ u("div", { style: { marginBottom: "1rem" }, children: [
|
|
922
|
+
!I || M ? p.name && /* @__PURE__ */ e(
|
|
923
923
|
"div",
|
|
924
924
|
{
|
|
925
925
|
style: {
|
|
@@ -966,13 +966,13 @@ function Nn({
|
|
|
966
966
|
Lr,
|
|
967
967
|
{
|
|
968
968
|
slotKey: p.slotKey,
|
|
969
|
-
fallback: p.items.map((
|
|
969
|
+
fallback: p.items.map((F) => Fe(F))
|
|
970
970
|
}
|
|
971
|
-
) : p.items.map((
|
|
971
|
+
) : p.items.map((F) => Fe(F)) })
|
|
972
972
|
] }, p.id))
|
|
973
973
|
}
|
|
974
974
|
),
|
|
975
|
-
|
|
975
|
+
x.menuBottom && x.menuBottom.length > 0 && /* @__PURE__ */ e(
|
|
976
976
|
"div",
|
|
977
977
|
{
|
|
978
978
|
style: {
|
|
@@ -987,14 +987,14 @@ function Nn({
|
|
|
987
987
|
gap: "var(--sa-spacing-xs, 0.25rem)",
|
|
988
988
|
flexShrink: 0
|
|
989
989
|
},
|
|
990
|
-
children:
|
|
990
|
+
children: x.menuBottom.map((p) => Fe(p))
|
|
991
991
|
}
|
|
992
992
|
)
|
|
993
993
|
]
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ u("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
|
|
997
|
+
/* @__PURE__ */ u(
|
|
998
998
|
"header",
|
|
999
999
|
{
|
|
1000
1000
|
style: {
|
|
@@ -1009,7 +1009,7 @@ function Nn({
|
|
|
1009
1009
|
flexShrink: 0
|
|
1010
1010
|
},
|
|
1011
1011
|
children: [
|
|
1012
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: "1rem" }, children: [
|
|
1013
1013
|
M && /* @__PURE__ */ e(
|
|
1014
1014
|
"button",
|
|
1015
1015
|
{
|
|
@@ -1044,10 +1044,10 @@ function Nn({
|
|
|
1044
1044
|
),
|
|
1045
1045
|
/* @__PURE__ */ e(Er, { children: r })
|
|
1046
1046
|
] }),
|
|
1047
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
1048
1048
|
h,
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
/* @__PURE__ */ e(Ge, { children: /* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ u(jt, { position: "bottom-right", children: [
|
|
1050
|
+
/* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ u(
|
|
1051
1051
|
"div",
|
|
1052
1052
|
{
|
|
1053
1053
|
style: {
|
|
@@ -1057,7 +1057,7 @@ function Nn({
|
|
|
1057
1057
|
cursor: "pointer"
|
|
1058
1058
|
},
|
|
1059
1059
|
children: [
|
|
1060
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ u("div", { style: { textAlign: "right", maxWidth: "12.5rem" }, children: [
|
|
1061
1061
|
/* @__PURE__ */ e(
|
|
1062
1062
|
"p",
|
|
1063
1063
|
{
|
|
@@ -1109,7 +1109,7 @@ function Nn({
|
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
1111
1111
|
/* @__PURE__ */ e(
|
|
1112
|
-
|
|
1112
|
+
b,
|
|
1113
1113
|
{
|
|
1114
1114
|
name: "ChevronDown",
|
|
1115
1115
|
size: "sm",
|
|
@@ -1119,7 +1119,7 @@ function Nn({
|
|
|
1119
1119
|
]
|
|
1120
1120
|
}
|
|
1121
1121
|
) }),
|
|
1122
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ u(
|
|
1123
1123
|
Zt,
|
|
1124
1124
|
{
|
|
1125
1125
|
style: {
|
|
@@ -1130,7 +1130,7 @@ function Nn({
|
|
|
1130
1130
|
marginTop: "16px"
|
|
1131
1131
|
},
|
|
1132
1132
|
children: [
|
|
1133
|
-
/* @__PURE__ */ e(cr, { children: /* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ e(cr, { children: /* @__PURE__ */ u(
|
|
1134
1134
|
"div",
|
|
1135
1135
|
{
|
|
1136
1136
|
style: {
|
|
@@ -1210,8 +1210,8 @@ function Nn({
|
|
|
1210
1210
|
]
|
|
1211
1211
|
}
|
|
1212
1212
|
) }),
|
|
1213
|
-
(g && g.length > 0 || m) && /* @__PURE__ */
|
|
1214
|
-
g == null ? void 0 : g.map((p,
|
|
1213
|
+
(g && g.length > 0 || m) && /* @__PURE__ */ u($t, { children: [
|
|
1214
|
+
g == null ? void 0 : g.map((p, F) => /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ u(
|
|
1215
1215
|
"button",
|
|
1216
1216
|
{
|
|
1217
1217
|
type: "button",
|
|
@@ -1224,14 +1224,14 @@ function Nn({
|
|
|
1224
1224
|
L.currentTarget.style.backgroundColor = "transparent";
|
|
1225
1225
|
},
|
|
1226
1226
|
children: [
|
|
1227
|
-
/* @__PURE__ */ e(
|
|
1227
|
+
/* @__PURE__ */ e(b, { name: p.icon, size: "md" }),
|
|
1228
1228
|
/* @__PURE__ */ e("span", { children: p.label })
|
|
1229
1229
|
]
|
|
1230
1230
|
}
|
|
1231
|
-
) }, `${p.label}-${
|
|
1231
|
+
) }, `${p.label}-${F}`)),
|
|
1232
1232
|
m
|
|
1233
1233
|
] }),
|
|
1234
|
-
y ?? /* @__PURE__ */ e(ar, { children: /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */
|
|
1234
|
+
y ?? /* @__PURE__ */ e(ar, { children: /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ u(
|
|
1235
1235
|
"button",
|
|
1236
1236
|
{
|
|
1237
1237
|
type: "button",
|
|
@@ -1249,7 +1249,7 @@ function Nn({
|
|
|
1249
1249
|
},
|
|
1250
1250
|
children: [
|
|
1251
1251
|
/* @__PURE__ */ e(
|
|
1252
|
-
|
|
1252
|
+
b,
|
|
1253
1253
|
{
|
|
1254
1254
|
name: "Logout",
|
|
1255
1255
|
size: "md",
|
|
@@ -1285,7 +1285,7 @@ function Nn({
|
|
|
1285
1285
|
]
|
|
1286
1286
|
}
|
|
1287
1287
|
),
|
|
1288
|
-
l &&
|
|
1288
|
+
l && s && /* @__PURE__ */ e(
|
|
1289
1289
|
"div",
|
|
1290
1290
|
{
|
|
1291
1291
|
style: {
|
|
@@ -1297,18 +1297,18 @@ function Nn({
|
|
|
1297
1297
|
justifyContent: "center",
|
|
1298
1298
|
zIndex: 9999
|
|
1299
1299
|
},
|
|
1300
|
-
children:
|
|
1300
|
+
children: s
|
|
1301
1301
|
}
|
|
1302
1302
|
),
|
|
1303
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ u(ut, { isShow: ae, onHide: Ne, children: [
|
|
1304
1304
|
/* @__PURE__ */ e(Ot, { children: "Confirmation Logout" }),
|
|
1305
1305
|
/* @__PURE__ */ e(ht, { children: "Are you sure you want to end the session and exit the page?" }),
|
|
1306
|
-
/* @__PURE__ */ e(_t, { children: /* @__PURE__ */ e(f, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */
|
|
1307
|
-
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
|
|
1308
|
-
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
|
|
1306
|
+
/* @__PURE__ */ e(_t, { children: /* @__PURE__ */ e(f, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ u($, { direction: "row", gap: "sm", align: "center", children: [
|
|
1307
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(T, { secondary: !0, onClick: Ne, children: "Cancel" }) }),
|
|
1308
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(T, { primary: !0, onClick: et, children: "Yes, Sure" }) })
|
|
1309
1309
|
] }) }) })
|
|
1310
1310
|
] }),
|
|
1311
|
-
ee && /* @__PURE__ */
|
|
1311
|
+
ee && /* @__PURE__ */ u(U, { children: [
|
|
1312
1312
|
/* @__PURE__ */ e(
|
|
1313
1313
|
"div",
|
|
1314
1314
|
{
|
|
@@ -1321,7 +1321,7 @@ function Nn({
|
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
1323
|
),
|
|
1324
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ u(
|
|
1325
1325
|
"div",
|
|
1326
1326
|
{
|
|
1327
1327
|
role: "dialog",
|
|
@@ -1358,15 +1358,15 @@ function Nn({
|
|
|
1358
1358
|
}
|
|
1359
1359
|
),
|
|
1360
1360
|
(_e = ee.item.children) == null ? void 0 : _e.map((p) => {
|
|
1361
|
-
const
|
|
1361
|
+
const F = de(p.to), L = rt(
|
|
1362
1362
|
p.badge,
|
|
1363
|
-
|
|
1363
|
+
z[p.id]
|
|
1364
1364
|
);
|
|
1365
|
-
return /* @__PURE__ */
|
|
1365
|
+
return /* @__PURE__ */ u(
|
|
1366
1366
|
"button",
|
|
1367
1367
|
{
|
|
1368
1368
|
onClick: () => {
|
|
1369
|
-
|
|
1369
|
+
j(p.to), X(null);
|
|
1370
1370
|
},
|
|
1371
1371
|
style: {
|
|
1372
1372
|
width: "100%",
|
|
@@ -1376,22 +1376,22 @@ function Nn({
|
|
|
1376
1376
|
padding: "0.5rem 0.75rem",
|
|
1377
1377
|
borderRadius: "var(--sa-radii-md, 0.5rem)",
|
|
1378
1378
|
textAlign: "left",
|
|
1379
|
-
backgroundColor:
|
|
1380
|
-
color:
|
|
1379
|
+
backgroundColor: F ? "var(--sa-color-gray-100, #f8f8f8)" : "transparent",
|
|
1380
|
+
color: F ? "var(--sa-text-primary, #292a2e)" : "var(--sa-color-gray-800, #505258)",
|
|
1381
1381
|
border: "1px solid transparent",
|
|
1382
1382
|
cursor: "pointer",
|
|
1383
1383
|
fontSize: "0.875rem",
|
|
1384
1384
|
fontWeight: 500
|
|
1385
1385
|
},
|
|
1386
|
-
onMouseEnter: (
|
|
1387
|
-
|
|
1386
|
+
onMouseEnter: (C) => {
|
|
1387
|
+
F || (C.currentTarget.style.backgroundColor = "var(--sa-color-gray-100, #f8f8f8)");
|
|
1388
1388
|
},
|
|
1389
|
-
onMouseLeave: (
|
|
1390
|
-
|
|
1389
|
+
onMouseLeave: (C) => {
|
|
1390
|
+
F || (C.currentTarget.style.backgroundColor = "transparent");
|
|
1391
1391
|
},
|
|
1392
1392
|
children: [
|
|
1393
1393
|
p.icon && /* @__PURE__ */ e(
|
|
1394
|
-
|
|
1394
|
+
b,
|
|
1395
1395
|
{
|
|
1396
1396
|
name: p.icon,
|
|
1397
1397
|
size: "sm",
|
|
@@ -1438,8 +1438,8 @@ const Wr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1438
1438
|
hoverTextColor: n,
|
|
1439
1439
|
hoverIconColor: l
|
|
1440
1440
|
}) => {
|
|
1441
|
-
const [
|
|
1442
|
-
return /* @__PURE__ */
|
|
1441
|
+
const [s, a] = k(!1);
|
|
1442
|
+
return /* @__PURE__ */ u(
|
|
1443
1443
|
f,
|
|
1444
1444
|
{
|
|
1445
1445
|
direction: "row",
|
|
@@ -1450,22 +1450,22 @@ const Wr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1450
1450
|
style: { cursor: "pointer" },
|
|
1451
1451
|
children: [
|
|
1452
1452
|
/* @__PURE__ */ e(
|
|
1453
|
-
|
|
1453
|
+
b,
|
|
1454
1454
|
{
|
|
1455
1455
|
name: r || "ChevronLeft",
|
|
1456
1456
|
size: "xs",
|
|
1457
1457
|
style: {
|
|
1458
|
-
color:
|
|
1458
|
+
color: s ? l ?? "var(--sa-text-subtle, #8c8f97)" : o ?? "var(--sa-text-subtle, #8c8f97)",
|
|
1459
1459
|
transition: "color 0.15s ease"
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
),
|
|
1463
1463
|
/* @__PURE__ */ e(
|
|
1464
|
-
|
|
1464
|
+
v,
|
|
1465
1465
|
{
|
|
1466
1466
|
variant: "sub-h3",
|
|
1467
1467
|
style: {
|
|
1468
|
-
color:
|
|
1468
|
+
color: s ? n ?? "var(--sa-text-primary, #292a2e)" : i ?? "var(--sa-text-subtle, #8c8f97)",
|
|
1469
1469
|
transition: "color 0.15s ease"
|
|
1470
1470
|
},
|
|
1471
1471
|
children: t || "Back"
|
|
@@ -1481,25 +1481,25 @@ const Wr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1481
1481
|
iconColor: o,
|
|
1482
1482
|
hoverIconColor: n
|
|
1483
1483
|
}) => {
|
|
1484
|
-
const [l,
|
|
1485
|
-
|
|
1484
|
+
const [l, s] = k(!1), a = o ?? "var(--sa-text-subtle, #8c8f97)", h = n ?? "var(--sa-text-subtle, #8c8f97)", d = t.length > 1 ? t[0] : void 0, g = !!(d != null && d.to || d != null && d.onClick), m = /* @__PURE__ */ e(
|
|
1485
|
+
b,
|
|
1486
1486
|
{
|
|
1487
1487
|
name: i || "ChevronLeft",
|
|
1488
1488
|
size: "xs",
|
|
1489
|
-
onMouseEnter: g ? () =>
|
|
1490
|
-
onMouseLeave: g ? () =>
|
|
1489
|
+
onMouseEnter: g ? () => s(!0) : void 0,
|
|
1490
|
+
onMouseLeave: g ? () => s(!1) : void 0,
|
|
1491
1491
|
style: {
|
|
1492
1492
|
color: g && l ? h : a,
|
|
1493
1493
|
transition: "color 0.15s ease",
|
|
1494
1494
|
cursor: g ? "pointer" : void 0
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
), y = d != null && d.to ? /* @__PURE__ */ e(
|
|
1498
|
-
return /* @__PURE__ */
|
|
1497
|
+
), y = d != null && d.to ? /* @__PURE__ */ e(qe, { to: d.to, replace: !0, style: { textDecoration: "none" }, children: m }) : d != null && d.onClick ? /* @__PURE__ */ e(Xe, { onClick: d.onClick, children: m }) : m;
|
|
1498
|
+
return /* @__PURE__ */ u(f, { direction: "row", gap: "xs", align: "center", children: [
|
|
1499
1499
|
y,
|
|
1500
|
-
/* @__PURE__ */ e(ir, { separator: r, size: "md", children: t.map((
|
|
1501
|
-
const
|
|
1502
|
-
return
|
|
1500
|
+
/* @__PURE__ */ e(ir, { separator: r, size: "md", children: t.map((D, E) => {
|
|
1501
|
+
const x = E === t.length - 1;
|
|
1502
|
+
return D.to && !x ? /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ e(qe, { to: D.to, children: D.label }) }, E) : /* @__PURE__ */ e(kt, { currentPage: x, children: /* @__PURE__ */ e(nr, { onClick: x ? void 0 : D.onClick, children: D.label }) }, E);
|
|
1503
1503
|
}) })
|
|
1504
1504
|
] });
|
|
1505
1505
|
}, On = (t) => {
|
|
@@ -1513,7 +1513,7 @@ const Wr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1513
1513
|
iconColor: l.iconColor,
|
|
1514
1514
|
hoverIconColor: l.hoverIconColor
|
|
1515
1515
|
}
|
|
1516
|
-
) : n ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
|
|
1516
|
+
) : n ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(qe, { to: n, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(At, { ...l }) }) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Xe, { onClick: o, children: /* @__PURE__ */ e(At, { ...l }) }) });
|
|
1517
1517
|
}, it = [
|
|
1518
1518
|
// brand (blue)
|
|
1519
1519
|
{
|
|
@@ -1558,7 +1558,7 @@ const Wr = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
|
1558
1558
|
activeShadow: "rgba(255, 117, 143, 0.25)"
|
|
1559
1559
|
}
|
|
1560
1560
|
];
|
|
1561
|
-
function
|
|
1561
|
+
function It(t, r, i) {
|
|
1562
1562
|
return {
|
|
1563
1563
|
display: "flex",
|
|
1564
1564
|
alignItems: "center",
|
|
@@ -1574,7 +1574,7 @@ function Ht(t, r, i) {
|
|
|
1574
1574
|
transition: "box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease, border-color 0.15s ease"
|
|
1575
1575
|
};
|
|
1576
1576
|
}
|
|
1577
|
-
const
|
|
1577
|
+
const Ht = {
|
|
1578
1578
|
fontSize: "11px",
|
|
1579
1579
|
fontWeight: 500,
|
|
1580
1580
|
textAlign: "center",
|
|
@@ -1583,7 +1583,7 @@ const zt = {
|
|
|
1583
1583
|
color: "var(--sa-background-primary, #ffffff)",
|
|
1584
1584
|
lineHeight: "1.3",
|
|
1585
1585
|
maxWidth: "80px"
|
|
1586
|
-
},
|
|
1586
|
+
}, zt = {
|
|
1587
1587
|
display: "flex",
|
|
1588
1588
|
flexDirection: "column",
|
|
1589
1589
|
alignItems: "center",
|
|
@@ -1600,7 +1600,7 @@ function Ar({
|
|
|
1600
1600
|
selectedGroupId: o,
|
|
1601
1601
|
onSelect: n
|
|
1602
1602
|
}) {
|
|
1603
|
-
const [l,
|
|
1603
|
+
const [l, s] = k(void 0), a = (d) => {
|
|
1604
1604
|
n(d), r();
|
|
1605
1605
|
}, h = it[0];
|
|
1606
1606
|
return /* @__PURE__ */ e(
|
|
@@ -1614,7 +1614,7 @@ function Ar({
|
|
|
1614
1614
|
boxShadow: "none",
|
|
1615
1615
|
border: "none"
|
|
1616
1616
|
},
|
|
1617
|
-
children: /* @__PURE__ */ e(ht, { children: /* @__PURE__ */
|
|
1617
|
+
children: /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ u(
|
|
1618
1618
|
"div",
|
|
1619
1619
|
{
|
|
1620
1620
|
style: {
|
|
@@ -1623,32 +1623,32 @@ function Ar({
|
|
|
1623
1623
|
gap: "16px"
|
|
1624
1624
|
},
|
|
1625
1625
|
children: [
|
|
1626
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ u(
|
|
1627
1627
|
"button",
|
|
1628
1628
|
{
|
|
1629
1629
|
onClick: () => a(null),
|
|
1630
|
-
onMouseEnter: () =>
|
|
1631
|
-
onMouseLeave: () =>
|
|
1632
|
-
style:
|
|
1630
|
+
onMouseEnter: () => s("all"),
|
|
1631
|
+
onMouseLeave: () => s(void 0),
|
|
1632
|
+
style: zt,
|
|
1633
1633
|
children: [
|
|
1634
|
-
/* @__PURE__ */ e("div", { style:
|
|
1635
|
-
/* @__PURE__ */ e("span", { style:
|
|
1634
|
+
/* @__PURE__ */ e("div", { style: It(o === null, l === "all", h), children: /* @__PURE__ */ e("div", { style: { color: h.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(b, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1635
|
+
/* @__PURE__ */ e("span", { style: Ht, children: "Semua" })
|
|
1636
1636
|
]
|
|
1637
1637
|
}
|
|
1638
1638
|
),
|
|
1639
1639
|
i.map((d, g) => {
|
|
1640
|
-
var
|
|
1641
|
-
const m = o === d.id, y = l === d.id,
|
|
1642
|
-
return /* @__PURE__ */
|
|
1640
|
+
var x;
|
|
1641
|
+
const m = o === d.id, y = l === d.id, D = ((x = d.items[0]) == null ? void 0 : x.icon) ?? "Grid", E = it[(g + 1) % it.length];
|
|
1642
|
+
return /* @__PURE__ */ u(
|
|
1643
1643
|
"button",
|
|
1644
1644
|
{
|
|
1645
1645
|
onClick: () => a(d.id),
|
|
1646
|
-
onMouseEnter: () =>
|
|
1647
|
-
onMouseLeave: () =>
|
|
1648
|
-
style:
|
|
1646
|
+
onMouseEnter: () => s(d.id),
|
|
1647
|
+
onMouseLeave: () => s(void 0),
|
|
1648
|
+
style: zt,
|
|
1649
1649
|
children: [
|
|
1650
|
-
/* @__PURE__ */ e("div", { style:
|
|
1651
|
-
/* @__PURE__ */ e("span", { style:
|
|
1650
|
+
/* @__PURE__ */ e("div", { style: It(m, y, E), children: /* @__PURE__ */ e("div", { style: { color: E.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(b, { name: D, size: "lg", style: { width: 32, height: 32 } }) }) }),
|
|
1651
|
+
/* @__PURE__ */ e("span", { style: Ht, children: d.name })
|
|
1652
1652
|
]
|
|
1653
1653
|
},
|
|
1654
1654
|
d.id
|
|
@@ -1664,16 +1664,16 @@ function _n({
|
|
|
1664
1664
|
onSelect: t,
|
|
1665
1665
|
"aria-label": r = "Pilih module"
|
|
1666
1666
|
} = {}) {
|
|
1667
|
-
const i = Yt(), o = mt(), { selectedGroupId: n, setSelectedGroupId: l } = er(), [
|
|
1667
|
+
const i = Yt(), o = mt(), { selectedGroupId: n, setSelectedGroupId: l } = er(), [s, a] = k(!1), h = (d) => {
|
|
1668
1668
|
var g;
|
|
1669
1669
|
if (l(d), d !== null) {
|
|
1670
|
-
const m = i.menus.find((
|
|
1670
|
+
const m = i.menus.find((D) => D.id === d), y = (g = m == null ? void 0 : m.items[0]) == null ? void 0 : g.to;
|
|
1671
1671
|
y && o(y);
|
|
1672
1672
|
}
|
|
1673
1673
|
t == null || t(d);
|
|
1674
1674
|
};
|
|
1675
|
-
return /* @__PURE__ */
|
|
1676
|
-
/* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ u(U, { children: [
|
|
1676
|
+
/* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
|
|
1677
1677
|
/* @__PURE__ */ e(
|
|
1678
1678
|
"button",
|
|
1679
1679
|
{
|
|
@@ -1697,7 +1697,7 @@ function _n({
|
|
|
1697
1697
|
onMouseLeave: (d) => {
|
|
1698
1698
|
d.currentTarget.style.backgroundColor = "transparent";
|
|
1699
1699
|
},
|
|
1700
|
-
children: /* @__PURE__ */ e(
|
|
1700
|
+
children: /* @__PURE__ */ e(b, { name: "GridApplication", size: "sm" })
|
|
1701
1701
|
}
|
|
1702
1702
|
),
|
|
1703
1703
|
n !== null && /* @__PURE__ */ e(
|
|
@@ -1719,7 +1719,7 @@ function _n({
|
|
|
1719
1719
|
/* @__PURE__ */ e(
|
|
1720
1720
|
Ar,
|
|
1721
1721
|
{
|
|
1722
|
-
isShow:
|
|
1722
|
+
isShow: s,
|
|
1723
1723
|
onHide: () => a(!1),
|
|
1724
1724
|
menus: i.menus.filter((d) => d.parentGroupId === void 0),
|
|
1725
1725
|
selectedGroupId: n,
|
|
@@ -1728,7 +1728,7 @@ function _n({
|
|
|
1728
1728
|
)
|
|
1729
1729
|
] });
|
|
1730
1730
|
}
|
|
1731
|
-
const
|
|
1731
|
+
const Ir = (t, r) => {
|
|
1732
1732
|
const i = [];
|
|
1733
1733
|
if (r === 0)
|
|
1734
1734
|
return i.push(t), i;
|
|
@@ -1737,7 +1737,7 @@ const Hr = (t, r) => {
|
|
|
1737
1737
|
i.push(n);
|
|
1738
1738
|
}
|
|
1739
1739
|
return i;
|
|
1740
|
-
},
|
|
1740
|
+
}, Hr = ce(
|
|
1741
1741
|
({
|
|
1742
1742
|
value: t,
|
|
1743
1743
|
label: r,
|
|
@@ -1746,7 +1746,7 @@ const Hr = (t, r) => {
|
|
|
1746
1746
|
lastIndex: n,
|
|
1747
1747
|
labelAlign: l = "top"
|
|
1748
1748
|
}) => {
|
|
1749
|
-
const
|
|
1749
|
+
const s = he(
|
|
1750
1750
|
() => ({
|
|
1751
1751
|
padding: 0,
|
|
1752
1752
|
paddingBottom: n ? 0 : 12,
|
|
@@ -1762,15 +1762,15 @@ const Hr = (t, r) => {
|
|
|
1762
1762
|
verticalAlign: l
|
|
1763
1763
|
}),
|
|
1764
1764
|
[n, l]
|
|
1765
|
-
), h = () => typeof r == "string" ? /* @__PURE__ */ e(
|
|
1766
|
-
return /* @__PURE__ */
|
|
1767
|
-
/* @__PURE__ */ e(Se, { style:
|
|
1765
|
+
), h = () => typeof r == "string" ? /* @__PURE__ */ e(v, { fontWeight: "medium", color: "text-muted", children: r }) : r, d = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(v, { color: "text", fontWeight: "medium", children: t }) : t, g = () => typeof i == "string" || typeof i == "number" ? /* @__PURE__ */ e(v, { fontWeight: "medium", color: "text-muted", children: i }) : i;
|
|
1766
|
+
return /* @__PURE__ */ u(Re, { children: [
|
|
1767
|
+
/* @__PURE__ */ e(Se, { style: s, width: o, children: h() }),
|
|
1768
1768
|
i ? /* @__PURE__ */ e(Se, { style: a, width: 24, children: g() }) : null,
|
|
1769
|
-
/* @__PURE__ */ e(Se, { style:
|
|
1769
|
+
/* @__PURE__ */ e(Se, { style: s, children: d() })
|
|
1770
1770
|
] });
|
|
1771
1771
|
}
|
|
1772
|
-
),
|
|
1773
|
-
|
|
1772
|
+
), zr = ce(({ fields: t, separator: r, labelWidth: i }) => /* @__PURE__ */ e(Gt, { children: t.map((o, n) => /* @__PURE__ */ e(
|
|
1773
|
+
Hr,
|
|
1774
1774
|
{
|
|
1775
1775
|
separator: r,
|
|
1776
1776
|
labelWidth: i,
|
|
@@ -1787,10 +1787,10 @@ const Hr = (t, r) => {
|
|
|
1787
1787
|
labelWidth: n = 150,
|
|
1788
1788
|
bordered: l = !1
|
|
1789
1789
|
}) => {
|
|
1790
|
-
const
|
|
1791
|
-
() =>
|
|
1790
|
+
const s = he(
|
|
1791
|
+
() => Ir(o, t),
|
|
1792
1792
|
[o, t]
|
|
1793
|
-
), a =
|
|
1793
|
+
), a = s.length > 2, h = () => {
|
|
1794
1794
|
switch (r) {
|
|
1795
1795
|
case 1:
|
|
1796
1796
|
return "width-full";
|
|
@@ -1817,14 +1817,14 @@ const Hr = (t, r) => {
|
|
|
1817
1817
|
borderWidth: l ? "border" : void 0,
|
|
1818
1818
|
borderStyle: l ? "border-solid" : void 0,
|
|
1819
1819
|
borderColor: l ? "border-subtle" : void 0,
|
|
1820
|
-
children:
|
|
1820
|
+
children: s.map((d, g) => /* @__PURE__ */ e(
|
|
1821
1821
|
f,
|
|
1822
1822
|
{
|
|
1823
1823
|
flex: a ? void 0 : "1",
|
|
1824
1824
|
width: a ? h() : void 0,
|
|
1825
1825
|
marginBottom: a ? "lg" : void 0,
|
|
1826
1826
|
children: /* @__PURE__ */ e(
|
|
1827
|
-
|
|
1827
|
+
zr,
|
|
1828
1828
|
{
|
|
1829
1829
|
labelWidth: n,
|
|
1830
1830
|
fields: d,
|
|
@@ -1838,8 +1838,8 @@ const Hr = (t, r) => {
|
|
|
1838
1838
|
);
|
|
1839
1839
|
}
|
|
1840
1840
|
), Rr = ({ backButton: t }) => {
|
|
1841
|
-
const [r, i] = k(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", n = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)",
|
|
1842
|
-
return /* @__PURE__ */
|
|
1841
|
+
const [r, i] = k(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", n = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
|
|
1842
|
+
return /* @__PURE__ */ u(
|
|
1843
1843
|
f,
|
|
1844
1844
|
{
|
|
1845
1845
|
direction: "row",
|
|
@@ -1850,7 +1850,7 @@ const Hr = (t, r) => {
|
|
|
1850
1850
|
style: { cursor: "pointer" },
|
|
1851
1851
|
children: [
|
|
1852
1852
|
/* @__PURE__ */ e(
|
|
1853
|
-
|
|
1853
|
+
b,
|
|
1854
1854
|
{
|
|
1855
1855
|
name: (t == null ? void 0 : t.iconName) || "ChevronLeft",
|
|
1856
1856
|
size: "xs",
|
|
@@ -1861,11 +1861,11 @@ const Hr = (t, r) => {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
),
|
|
1863
1863
|
/* @__PURE__ */ e(
|
|
1864
|
-
|
|
1864
|
+
v,
|
|
1865
1865
|
{
|
|
1866
1866
|
variant: "sub-h3",
|
|
1867
1867
|
style: {
|
|
1868
|
-
color: r ?
|
|
1868
|
+
color: r ? s : n,
|
|
1869
1869
|
textDecoration: r ? "underline" : "none",
|
|
1870
1870
|
transition: "color 0.15s ease"
|
|
1871
1871
|
},
|
|
@@ -1882,42 +1882,42 @@ const Hr = (t, r) => {
|
|
|
1882
1882
|
children: o,
|
|
1883
1883
|
header: n = !0,
|
|
1884
1884
|
action: l,
|
|
1885
|
-
titleTagProps:
|
|
1885
|
+
titleTagProps: s,
|
|
1886
1886
|
containerProps: a,
|
|
1887
1887
|
headerProps: h
|
|
1888
1888
|
}) => {
|
|
1889
|
-
const d = ne("lg"), g = mt(), m = Ve(), y = t == null ? void 0 : t.show,
|
|
1889
|
+
const d = ne("lg"), g = mt(), m = Ve(), y = t == null ? void 0 : t.show, D = () => {
|
|
1890
1890
|
if (typeof (t == null ? void 0 : t.onClick) == "function") {
|
|
1891
1891
|
t.onClick();
|
|
1892
1892
|
return;
|
|
1893
1893
|
}
|
|
1894
1894
|
g(-1, { replace: !0 });
|
|
1895
|
-
},
|
|
1896
|
-
({ title:
|
|
1897
|
-
|
|
1895
|
+
}, E = () => l ? st(l) ? l : /* @__PURE__ */ e(f, { direction: "row", gap: "lg", children: l.map(
|
|
1896
|
+
({ title: N, icon: q, buttonProps: M, onClick: ae }, J) => !N && !q ? null : /* @__PURE__ */ e(
|
|
1897
|
+
T,
|
|
1898
1898
|
{
|
|
1899
1899
|
fullWidth: !d,
|
|
1900
|
-
iconLeft:
|
|
1900
|
+
iconLeft: q ? /* @__PURE__ */ e(b, { name: q, size: "md" }) : void 0,
|
|
1901
1901
|
onClick: ae,
|
|
1902
1902
|
...M,
|
|
1903
|
-
children:
|
|
1903
|
+
children: N
|
|
1904
1904
|
},
|
|
1905
1905
|
`action-${J}`
|
|
1906
1906
|
)
|
|
1907
|
-
) }) : null,
|
|
1908
|
-
const
|
|
1907
|
+
) }) : null, x = () => {
|
|
1908
|
+
const N = /* @__PURE__ */ e(Rr, { backButton: t });
|
|
1909
1909
|
return t != null && t.navigateTo ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
|
|
1910
|
-
|
|
1910
|
+
qe,
|
|
1911
1911
|
{
|
|
1912
1912
|
to: t.navigateTo,
|
|
1913
1913
|
replace: !0,
|
|
1914
1914
|
style: { textDecoration: "none" },
|
|
1915
|
-
children:
|
|
1915
|
+
children: N
|
|
1916
1916
|
}
|
|
1917
|
-
) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Xe, { onClick:
|
|
1918
|
-
},
|
|
1919
|
-
const
|
|
1920
|
-
return !
|
|
1917
|
+
) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Xe, { onClick: D, children: N }) });
|
|
1918
|
+
}, z = () => {
|
|
1919
|
+
const N = !!r, q = st(l) ? !0 : Array.isArray(l) && l.length > 0;
|
|
1920
|
+
return !N && !q && !y ? null : /* @__PURE__ */ u(
|
|
1921
1921
|
f,
|
|
1922
1922
|
{
|
|
1923
1923
|
gap: "xs",
|
|
@@ -1925,8 +1925,8 @@ const Hr = (t, r) => {
|
|
|
1925
1925
|
paddingInline: h == null ? void 0 : h.paddingInline,
|
|
1926
1926
|
...h,
|
|
1927
1927
|
children: [
|
|
1928
|
-
y &&
|
|
1929
|
-
(
|
|
1928
|
+
y && x(),
|
|
1929
|
+
(N || q) && /* @__PURE__ */ u(
|
|
1930
1930
|
f,
|
|
1931
1931
|
{
|
|
1932
1932
|
direction: d ? "row" : "column",
|
|
@@ -1934,19 +1934,19 @@ const Hr = (t, r) => {
|
|
|
1934
1934
|
justify: "space-between",
|
|
1935
1935
|
align: "center",
|
|
1936
1936
|
children: [
|
|
1937
|
-
|
|
1938
|
-
/* @__PURE__ */ e(
|
|
1939
|
-
i && /* @__PURE__ */ e(Le, { border: !0, size: "lg", text: i, ...
|
|
1937
|
+
N ? typeof r == "string" ? /* @__PURE__ */ u(f, { direction: "row", gap: "lg", align: "center", children: [
|
|
1938
|
+
/* @__PURE__ */ e(v, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: r }),
|
|
1939
|
+
i && /* @__PURE__ */ e(Le, { border: !0, size: "lg", text: i, ...s })
|
|
1940
1940
|
] }) : r : null,
|
|
1941
|
-
|
|
1941
|
+
E()
|
|
1942
1942
|
]
|
|
1943
1943
|
}
|
|
1944
1944
|
)
|
|
1945
1945
|
]
|
|
1946
1946
|
}
|
|
1947
1947
|
);
|
|
1948
|
-
},
|
|
1949
|
-
return /* @__PURE__ */
|
|
1948
|
+
}, j = () => o;
|
|
1949
|
+
return /* @__PURE__ */ u(
|
|
1950
1950
|
f,
|
|
1951
1951
|
{
|
|
1952
1952
|
gap: "md",
|
|
@@ -1958,28 +1958,28 @@ const Hr = (t, r) => {
|
|
|
1958
1958
|
animation: "pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"
|
|
1959
1959
|
},
|
|
1960
1960
|
children: [
|
|
1961
|
-
n &&
|
|
1962
|
-
|
|
1961
|
+
n && z(),
|
|
1962
|
+
j()
|
|
1963
1963
|
]
|
|
1964
1964
|
},
|
|
1965
1965
|
m.pathname
|
|
1966
1966
|
);
|
|
1967
|
-
}, Zn = ce(Vr),
|
|
1967
|
+
}, Zn = ce(Vr), Nr = {
|
|
1968
1968
|
icon: "Cross",
|
|
1969
1969
|
title: ""
|
|
1970
|
-
},
|
|
1970
|
+
}, Tr = "calc(100vw - 16px)", Rt = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${Tr})`, Or = qt(
|
|
1971
1971
|
({
|
|
1972
1972
|
onHide: t,
|
|
1973
1973
|
show: r,
|
|
1974
1974
|
withBlur: i = !1,
|
|
1975
1975
|
style: o,
|
|
1976
1976
|
children: n,
|
|
1977
|
-
closeButton: l =
|
|
1978
|
-
width:
|
|
1977
|
+
closeButton: l = Nr,
|
|
1978
|
+
width: s,
|
|
1979
1979
|
minWidth: a = "357px",
|
|
1980
1980
|
maxWidth: h = "357px"
|
|
1981
1981
|
}, d) => {
|
|
1982
|
-
const g = Rt(
|
|
1982
|
+
const g = Rt(s ?? a), m = Rt(s ?? h);
|
|
1983
1983
|
return /* @__PURE__ */ e(
|
|
1984
1984
|
lr,
|
|
1985
1985
|
{
|
|
@@ -1993,8 +1993,8 @@ const Hr = (t, r) => {
|
|
|
1993
1993
|
maxWidth: m,
|
|
1994
1994
|
...o
|
|
1995
1995
|
},
|
|
1996
|
-
children: /* @__PURE__ */
|
|
1997
|
-
l ? /* @__PURE__ */
|
|
1996
|
+
children: /* @__PURE__ */ u(f, { padding: "lg", children: [
|
|
1997
|
+
l ? /* @__PURE__ */ u(
|
|
1998
1998
|
f,
|
|
1999
1999
|
{
|
|
2000
2000
|
direction: "row",
|
|
@@ -2005,7 +2005,7 @@ const Hr = (t, r) => {
|
|
|
2005
2005
|
cursor: "pointer",
|
|
2006
2006
|
children: [
|
|
2007
2007
|
/* @__PURE__ */ e(
|
|
2008
|
-
|
|
2008
|
+
b,
|
|
2009
2009
|
{
|
|
2010
2010
|
name: l.icon,
|
|
2011
2011
|
size: "md",
|
|
@@ -2013,7 +2013,7 @@ const Hr = (t, r) => {
|
|
|
2013
2013
|
cursor: "pointer"
|
|
2014
2014
|
}
|
|
2015
2015
|
),
|
|
2016
|
-
l.title ? /* @__PURE__ */ e(
|
|
2016
|
+
l.title ? /* @__PURE__ */ e(v, { fontFamily: "Poppins", fontSize: "md", color: "text-muted", children: l.title }) : null
|
|
2017
2017
|
]
|
|
2018
2018
|
}
|
|
2019
2019
|
) : null,
|
|
@@ -2074,17 +2074,17 @@ const Hr = (t, r) => {
|
|
|
2074
2074
|
action: o,
|
|
2075
2075
|
header: n,
|
|
2076
2076
|
footer: l,
|
|
2077
|
-
actionContainer:
|
|
2077
|
+
actionContainer: s,
|
|
2078
2078
|
containerProps: a,
|
|
2079
2079
|
bodyProps: h,
|
|
2080
2080
|
headerProps: d = { borderBottom: !0 },
|
|
2081
2081
|
footerProps: g = { borderTop: !0 },
|
|
2082
2082
|
variantTag: m = "info"
|
|
2083
2083
|
}) => {
|
|
2084
|
-
const y = ne("lg"),
|
|
2085
|
-
/* @__PURE__ */ e(
|
|
2084
|
+
const y = ne("lg"), D = () => i ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
2085
|
+
/* @__PURE__ */ e(v, { fontWeight: "medium", children: r }),
|
|
2086
2086
|
/* @__PURE__ */ e(Le, { border: !0, text: i, variant: m })
|
|
2087
|
-
] }) : /* @__PURE__ */ e(
|
|
2087
|
+
] }) : /* @__PURE__ */ e(v, { fontWeight: "medium", children: r }), E = () => n || /* @__PURE__ */ u(
|
|
2088
2088
|
f,
|
|
2089
2089
|
{
|
|
2090
2090
|
direction: "row",
|
|
@@ -2092,19 +2092,19 @@ const Hr = (t, r) => {
|
|
|
2092
2092
|
align: "flex-start",
|
|
2093
2093
|
gap: "md",
|
|
2094
2094
|
children: [
|
|
2095
|
-
/* @__PURE__ */ e(f, { children: r ?
|
|
2095
|
+
/* @__PURE__ */ e(f, { children: r ? D() : null }),
|
|
2096
2096
|
/* @__PURE__ */ e(
|
|
2097
2097
|
f,
|
|
2098
2098
|
{
|
|
2099
2099
|
style: y ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
|
|
2100
|
-
...
|
|
2100
|
+
...s,
|
|
2101
2101
|
children: o ?? null
|
|
2102
2102
|
}
|
|
2103
2103
|
)
|
|
2104
2104
|
]
|
|
2105
2105
|
}
|
|
2106
|
-
),
|
|
2107
|
-
return /* @__PURE__ */
|
|
2106
|
+
), x = !!(n || r || o);
|
|
2107
|
+
return /* @__PURE__ */ u(
|
|
2108
2108
|
f,
|
|
2109
2109
|
{
|
|
2110
2110
|
bg: "white",
|
|
@@ -2119,7 +2119,7 @@ const Hr = (t, r) => {
|
|
|
2119
2119
|
...(a == null ? void 0 : a.style) ?? {}
|
|
2120
2120
|
},
|
|
2121
2121
|
children: [
|
|
2122
|
-
n !== null &&
|
|
2122
|
+
n !== null && x ? /* @__PURE__ */ e(tr, { ...d, children: E() }) : null,
|
|
2123
2123
|
/* @__PURE__ */ e(_r, { ...h, children: t }),
|
|
2124
2124
|
l ? /* @__PURE__ */ e(rr, { ...g, children: l }) : null
|
|
2125
2125
|
]
|
|
@@ -2155,7 +2155,7 @@ const Hr = (t, r) => {
|
|
|
2155
2155
|
triggerStyle: o,
|
|
2156
2156
|
containerStyle: n,
|
|
2157
2157
|
position: l = "bottom-right",
|
|
2158
|
-
buttonProps:
|
|
2158
|
+
buttonProps: s,
|
|
2159
2159
|
iconProps: a,
|
|
2160
2160
|
variant: h = "default"
|
|
2161
2161
|
}) => {
|
|
@@ -2167,10 +2167,10 @@ const Hr = (t, r) => {
|
|
|
2167
2167
|
}),
|
|
2168
2168
|
[n]
|
|
2169
2169
|
);
|
|
2170
|
-
return /* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */ e(Ge, { style: o, children: /* @__PURE__ */ e(
|
|
2172
|
-
/* @__PURE__ */ e(Zt, { style: d, children: r.map((g, m) => h === "outline-button" ? /* @__PURE__ */ e($t, { children: /* @__PURE__ */
|
|
2173
|
-
|
|
2170
|
+
return /* @__PURE__ */ u(jt, { position: l, style: i, children: [
|
|
2171
|
+
/* @__PURE__ */ e(Ge, { style: o, children: /* @__PURE__ */ e(T, { size: "sm", secondary: !0, ...s, children: /* @__PURE__ */ e(b, { name: t, ...a }) }) }),
|
|
2172
|
+
/* @__PURE__ */ e(Zt, { style: d, children: r.map((g, m) => h === "outline-button" ? /* @__PURE__ */ e($t, { children: /* @__PURE__ */ u(
|
|
2173
|
+
T,
|
|
2174
2174
|
{
|
|
2175
2175
|
size: "sm",
|
|
2176
2176
|
secondary: !0,
|
|
@@ -2178,26 +2178,26 @@ const Hr = (t, r) => {
|
|
|
2178
2178
|
onClick: g.onClick,
|
|
2179
2179
|
...g.buttonProps,
|
|
2180
2180
|
children: [
|
|
2181
|
-
/* @__PURE__ */ e(
|
|
2182
|
-
/* @__PURE__ */ e(
|
|
2181
|
+
/* @__PURE__ */ e(b, { name: g.icon, size: "md", ...g.iconProps }),
|
|
2182
|
+
/* @__PURE__ */ e(v, { fontSize: "sm", color: "text", ...g.textProps, children: g.label })
|
|
2183
2183
|
]
|
|
2184
2184
|
}
|
|
2185
|
-
) }, g.id || m) : /* @__PURE__ */
|
|
2185
|
+
) }, g.id || m) : /* @__PURE__ */ u(
|
|
2186
2186
|
$r,
|
|
2187
2187
|
{
|
|
2188
2188
|
onClick: g.onClick,
|
|
2189
2189
|
...g.buttonProps,
|
|
2190
2190
|
children: [
|
|
2191
|
-
/* @__PURE__ */ e(
|
|
2192
|
-
/* @__PURE__ */ e(
|
|
2191
|
+
/* @__PURE__ */ e(b, { name: g.icon, size: "md", ...g.iconProps }),
|
|
2192
|
+
/* @__PURE__ */ e(v, { fontSize: "sm", color: "text", ...g.textProps, children: g.label })
|
|
2193
2193
|
]
|
|
2194
2194
|
},
|
|
2195
2195
|
g.id || m
|
|
2196
2196
|
)) })
|
|
2197
2197
|
] });
|
|
2198
|
-
}, Gn = ce(Gr),
|
|
2199
|
-
H1:
|
|
2200
|
-
H2:
|
|
2198
|
+
}, Gn = ce(Gr), Ur = (t) => /* @__PURE__ */ e(v, { variant: "h1", children: t.children, ...t.props }), qr = (t) => /* @__PURE__ */ e(v, { variant: "h2", children: t.children, ...t.props }), Jr = (t) => /* @__PURE__ */ e(v, { variant: "h3", children: t.children, ...t.props }), Pr = (t) => /* @__PURE__ */ e(v, { variant: "h4", children: t.children, ...t.props }), Qr = (t) => /* @__PURE__ */ e(v, { variant: "h5", children: t.children, ...t.props }), Yr = (t) => /* @__PURE__ */ e(v, { variant: "h6", children: t.children, ...t.props }), Xr = (t) => /* @__PURE__ */ e(v, { variant: "sub-h1", children: t.children, ...t.props }), Kr = (t) => /* @__PURE__ */ e(v, { variant: "sub-h2", children: t.children, ...t.props }), ei = (t) => /* @__PURE__ */ e(v, { variant: "sub-h3", children: t.children, ...t.props }), ti = (t) => /* @__PURE__ */ e(v, { variant: "body-1", children: t.children, ...t.props }), ri = (t) => /* @__PURE__ */ e(v, { variant: "body-2", children: t.children, ...t.props }), ii = (t) => /* @__PURE__ */ e(v, { variant: "body-3", children: t.children, ...t.props }), pe = {
|
|
2199
|
+
H1: Ur,
|
|
2200
|
+
H2: qr,
|
|
2201
2201
|
H3: Jr,
|
|
2202
2202
|
H4: Pr,
|
|
2203
2203
|
H5: Qr,
|
|
@@ -2233,7 +2233,7 @@ const Hr = (t, r) => {
|
|
|
2233
2233
|
withSearchParam: o = !0,
|
|
2234
2234
|
setSearchParams: n,
|
|
2235
2235
|
searchQueries: l,
|
|
2236
|
-
dropdownSearchKey:
|
|
2236
|
+
dropdownSearchKey: s,
|
|
2237
2237
|
filterKey: a = "filter",
|
|
2238
2238
|
pageKey: h = "page"
|
|
2239
2239
|
}) => {
|
|
@@ -2268,16 +2268,16 @@ const Hr = (t, r) => {
|
|
|
2268
2268
|
...l[a] && typeof l[a] == "string" ? JSON.parse(l[a]) : void 0,
|
|
2269
2269
|
[r]: d
|
|
2270
2270
|
}, y = { ...l };
|
|
2271
|
-
|
|
2272
|
-
const
|
|
2271
|
+
s && typeof s == "string" && delete y[s], delete y[h];
|
|
2272
|
+
const D = {
|
|
2273
2273
|
...y,
|
|
2274
2274
|
[a]: JSON.stringify(m)
|
|
2275
|
-
},
|
|
2276
|
-
|
|
2275
|
+
}, E = new URLSearchParams(l).toString(), x = new URLSearchParams(
|
|
2276
|
+
D
|
|
2277
2277
|
).toString();
|
|
2278
|
-
if (
|
|
2278
|
+
if (E === x)
|
|
2279
2279
|
return;
|
|
2280
|
-
n(
|
|
2280
|
+
n(D);
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
2283
2283
|
}, nt = ({
|
|
@@ -2286,24 +2286,24 @@ const Hr = (t, r) => {
|
|
|
2286
2286
|
searchParams: i,
|
|
2287
2287
|
get: o
|
|
2288
2288
|
}) => {
|
|
2289
|
-
const n = i.get(r) || void 0, l = n && typeof n == "string" ? JSON.parse(n) : void 0,
|
|
2290
|
-
return o === "label" &&
|
|
2291
|
-
},
|
|
2289
|
+
const n = i.get(r) || void 0, l = n && typeof n == "string" ? JSON.parse(n) : void 0, s = l ? l[t] : void 0;
|
|
2290
|
+
return o === "label" && s ? JSON.parse(s)[0].label : o === "value" && s ? JSON.parse(s)[0].value : s;
|
|
2291
|
+
}, Un = ({
|
|
2292
2292
|
name: t,
|
|
2293
2293
|
filterKey: r = "filter",
|
|
2294
2294
|
searchParams: i,
|
|
2295
2295
|
get: o
|
|
2296
2296
|
}) => {
|
|
2297
|
-
const n = i.get(r) || void 0, l = n && typeof n == "string" ? JSON.parse(n) : void 0,
|
|
2298
|
-
return o === "label" &&
|
|
2299
|
-
},
|
|
2297
|
+
const n = i.get(r) || void 0, l = n && typeof n == "string" ? JSON.parse(n) : void 0, s = l ? l[t] : void 0;
|
|
2298
|
+
return o === "label" && s ? JSON.parse(s).map((a) => a.label) : o === "value" && s ? JSON.parse(s).map((a) => a.value) : o === "array" && s ? JSON.parse(s) : s;
|
|
2299
|
+
}, qn = ({
|
|
2300
2300
|
name: t,
|
|
2301
2301
|
filterKey: r = "filter",
|
|
2302
2302
|
searchParams: i,
|
|
2303
2303
|
get: o
|
|
2304
2304
|
}) => {
|
|
2305
|
-
const n = i.get(r) || void 0, l = n && typeof n == "string" ? JSON.parse(n) : void 0,
|
|
2306
|
-
return o === "id" &&
|
|
2305
|
+
const n = i.get(r) || void 0, l = n && typeof n == "string" ? JSON.parse(n) : void 0, s = l ? l[t] : void 0;
|
|
2306
|
+
return o === "id" && s ? JSON.parse(s).id : o === "label" && s ? JSON.parse(s).label : o === "value" && s ? JSON.parse(s).value : s;
|
|
2307
2307
|
}, di = (t, r, i) => {
|
|
2308
2308
|
const o = r.get(i || "filter") || void 0, n = o && typeof o == "string" ? JSON.parse(o) : void 0;
|
|
2309
2309
|
return n ? n[t] : void 0;
|
|
@@ -2329,8 +2329,8 @@ const Hr = (t, r) => {
|
|
|
2329
2329
|
perPageKey: i = "perPage",
|
|
2330
2330
|
pageKey: o = "page"
|
|
2331
2331
|
}) => {
|
|
2332
|
-
const n = t.get(r) || void 0, l = t.get(i) || void 0,
|
|
2333
|
-
return !!n || !!l || !!
|
|
2332
|
+
const n = t.get(r) || void 0, l = t.get(i) || void 0, s = t.get(o) || void 0;
|
|
2333
|
+
return !!n || !!l || !!s;
|
|
2334
2334
|
}, ui = ({
|
|
2335
2335
|
isOpen: t,
|
|
2336
2336
|
onClose: r,
|
|
@@ -2338,32 +2338,32 @@ const Hr = (t, r) => {
|
|
|
2338
2338
|
pageKey: o,
|
|
2339
2339
|
filters: n
|
|
2340
2340
|
}) => {
|
|
2341
|
-
const { searchParams: l, setSearchParams:
|
|
2342
|
-
l.delete(i || "filter"),
|
|
2343
|
-
}, m = (y,
|
|
2341
|
+
const { searchParams: l, setSearchParams: s, searchQueries: a } = xt(), [h, d] = k({}), g = () => {
|
|
2342
|
+
l.delete(i || "filter"), s(l);
|
|
2343
|
+
}, m = (y, D) => {
|
|
2344
2344
|
switch (y.type) {
|
|
2345
2345
|
case "radio": {
|
|
2346
|
-
const { show:
|
|
2347
|
-
return
|
|
2346
|
+
const { show: E = !0 } = y;
|
|
2347
|
+
return E && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) }, D);
|
|
2348
2348
|
}
|
|
2349
2349
|
case "dropdown": {
|
|
2350
|
-
const { show:
|
|
2351
|
-
return
|
|
2350
|
+
const { show: E = !0 } = y;
|
|
2351
|
+
return E && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) }, D);
|
|
2352
2352
|
}
|
|
2353
2353
|
case "date-range":
|
|
2354
|
-
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) },
|
|
2354
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) }, D);
|
|
2355
2355
|
case "date":
|
|
2356
|
-
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) },
|
|
2356
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) }, D);
|
|
2357
2357
|
case "dropdown-multiple": {
|
|
2358
|
-
const { show:
|
|
2359
|
-
return
|
|
2358
|
+
const { show: E = !0 } = y;
|
|
2359
|
+
return E && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: y.title }) }, D);
|
|
2360
2360
|
}
|
|
2361
2361
|
default:
|
|
2362
2362
|
return null;
|
|
2363
2363
|
}
|
|
2364
2364
|
};
|
|
2365
|
-
return /* @__PURE__ */ e(Or, { onHide: r, show: t || !1, children: /* @__PURE__ */
|
|
2366
|
-
/* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ e(Or, { onHide: r, show: t || !1, children: /* @__PURE__ */ u(f, { direction: "column", gap: "md", children: [
|
|
2366
|
+
/* @__PURE__ */ u($, { direction: "row", justify: "space-between", align: "center", children: [
|
|
2367
2367
|
/* @__PURE__ */ e(f, { children: "Filter" }),
|
|
2368
2368
|
/* @__PURE__ */ e(
|
|
2369
2369
|
f,
|
|
@@ -2374,7 +2374,7 @@ const Hr = (t, r) => {
|
|
|
2374
2374
|
}
|
|
2375
2375
|
)
|
|
2376
2376
|
] }),
|
|
2377
|
-
n == null ? void 0 : n.map((y,
|
|
2377
|
+
n == null ? void 0 : n.map((y, D) => m(y, D))
|
|
2378
2378
|
] }) });
|
|
2379
2379
|
}, hi = ({
|
|
2380
2380
|
searchKey: t = "q",
|
|
@@ -2383,20 +2383,20 @@ const Hr = (t, r) => {
|
|
|
2383
2383
|
searchHighlightPlaceholder: o,
|
|
2384
2384
|
extendedFilter: n,
|
|
2385
2385
|
showSearchFilter: l = !0,
|
|
2386
|
-
showStatusFilter:
|
|
2386
|
+
showStatusFilter: s = !0,
|
|
2387
2387
|
filterKey: a = "filter",
|
|
2388
2388
|
pageKey: h = "page",
|
|
2389
2389
|
customWidthSearch: d,
|
|
2390
2390
|
handleOnReset: g,
|
|
2391
2391
|
filterConfigs: m,
|
|
2392
2392
|
buttonToggleProps: y,
|
|
2393
|
-
position:
|
|
2394
|
-
titleSearchLabel:
|
|
2395
|
-
withTitleLabels:
|
|
2393
|
+
position: D = "right",
|
|
2394
|
+
titleSearchLabel: E = "Work Order",
|
|
2395
|
+
withTitleLabels: x = !1
|
|
2396
2396
|
}) => {
|
|
2397
|
-
const
|
|
2397
|
+
const j = (y == null ? void 0 : y.isShowLabel) ?? !0, [N, q] = k(!1), [M, ae] = k(0), J = () => {
|
|
2398
2398
|
ae((V) => V + 1);
|
|
2399
|
-
}, { searchParams:
|
|
2399
|
+
}, { searchParams: I, setSearchParams: P, getQueryParam: oe } = xt(), le = Pe(I.toString()), G = di(t, I, a) || "", [Q, K] = k(G), se = oe(a), X = !!(se && !(() => {
|
|
2400
2400
|
if (se)
|
|
2401
2401
|
try {
|
|
2402
2402
|
const V = JSON.parse(se);
|
|
@@ -2406,9 +2406,9 @@ const Hr = (t, r) => {
|
|
|
2406
2406
|
}
|
|
2407
2407
|
return !1;
|
|
2408
2408
|
})()), R = ne("md");
|
|
2409
|
-
return
|
|
2409
|
+
return Z(() => {
|
|
2410
2410
|
K(G);
|
|
2411
|
-
}, [G]),
|
|
2411
|
+
}, [G]), Z(() => {
|
|
2412
2412
|
if (Q === G)
|
|
2413
2413
|
return;
|
|
2414
2414
|
const V = window.setTimeout(() => {
|
|
@@ -2433,28 +2433,28 @@ const Hr = (t, r) => {
|
|
|
2433
2433
|
P,
|
|
2434
2434
|
a,
|
|
2435
2435
|
h
|
|
2436
|
-
]), /* @__PURE__ */
|
|
2437
|
-
|
|
2436
|
+
]), /* @__PURE__ */ u(
|
|
2437
|
+
$,
|
|
2438
2438
|
{
|
|
2439
2439
|
gap: "md",
|
|
2440
2440
|
style: {
|
|
2441
|
-
flexDirection: R &&
|
|
2441
|
+
flexDirection: R && D === "left" ? "row" : R && D === "right" ? "row-reverse" : "column"
|
|
2442
2442
|
},
|
|
2443
2443
|
align: "flex-end",
|
|
2444
2444
|
children: [
|
|
2445
2445
|
X && /* @__PURE__ */ e(f, { justify: "flex-end", children: /* @__PURE__ */ e(
|
|
2446
|
-
|
|
2446
|
+
T,
|
|
2447
2447
|
{
|
|
2448
2448
|
onClick: () => {
|
|
2449
|
-
const V = new URLSearchParams(
|
|
2449
|
+
const V = new URLSearchParams(I);
|
|
2450
2450
|
V.delete(a), P(V), K(""), J(), g && g();
|
|
2451
2451
|
},
|
|
2452
2452
|
variant: "outline",
|
|
2453
2453
|
tone: "neutral",
|
|
2454
|
-
children: /* @__PURE__ */ e(
|
|
2454
|
+
children: /* @__PURE__ */ e(v, { color: "error", fontWeight: "semibold", children: "Reset" })
|
|
2455
2455
|
}
|
|
2456
2456
|
) }),
|
|
2457
|
-
n == null ? void 0 : n.map(({ minWidth: V, content: te, title: fe, onClickContainer: ge }, Be) => /* @__PURE__ */
|
|
2457
|
+
n == null ? void 0 : n.map(({ minWidth: V, content: te, title: fe, onClickContainer: ge }, Be) => /* @__PURE__ */ u(
|
|
2458
2458
|
f,
|
|
2459
2459
|
{
|
|
2460
2460
|
gap: "sm",
|
|
@@ -2470,12 +2470,12 @@ const Hr = (t, r) => {
|
|
|
2470
2470
|
`extended-filter-${Be}-${M}`
|
|
2471
2471
|
)),
|
|
2472
2472
|
!!(m != null && m.length) && /* @__PURE__ */ e(
|
|
2473
|
-
|
|
2473
|
+
T,
|
|
2474
2474
|
{
|
|
2475
2475
|
primary: X,
|
|
2476
2476
|
secondary: !X,
|
|
2477
2477
|
iconLeft: /* @__PURE__ */ e(
|
|
2478
|
-
|
|
2478
|
+
b,
|
|
2479
2479
|
{
|
|
2480
2480
|
size: "sm",
|
|
2481
2481
|
name: (y == null ? void 0 : y.icon) || "FilterHorizontal",
|
|
@@ -2485,11 +2485,11 @@ const Hr = (t, r) => {
|
|
|
2485
2485
|
}
|
|
2486
2486
|
),
|
|
2487
2487
|
fullWidth: !R,
|
|
2488
|
-
onClick: () =>
|
|
2489
|
-
children:
|
|
2488
|
+
onClick: () => q(!0),
|
|
2489
|
+
children: j ? "Filter" : void 0
|
|
2490
2490
|
}
|
|
2491
2491
|
),
|
|
2492
|
-
|
|
2492
|
+
s && /* @__PURE__ */ u(
|
|
2493
2493
|
f,
|
|
2494
2494
|
{
|
|
2495
2495
|
gap: "sm",
|
|
@@ -2497,7 +2497,7 @@ const Hr = (t, r) => {
|
|
|
2497
2497
|
minWidth: "126px"
|
|
2498
2498
|
},
|
|
2499
2499
|
children: [
|
|
2500
|
-
|
|
2500
|
+
x && /* @__PURE__ */ e(pe.SubH3, { children: "Status" }),
|
|
2501
2501
|
/* @__PURE__ */ e(
|
|
2502
2502
|
ft,
|
|
2503
2503
|
{
|
|
@@ -2514,20 +2514,20 @@ const Hr = (t, r) => {
|
|
|
2514
2514
|
defaultValue: nt({
|
|
2515
2515
|
get: "value",
|
|
2516
2516
|
name: r,
|
|
2517
|
-
searchParams:
|
|
2517
|
+
searchParams: I,
|
|
2518
2518
|
filterKey: a
|
|
2519
2519
|
}) ? [
|
|
2520
2520
|
{
|
|
2521
2521
|
label: nt({
|
|
2522
2522
|
get: "value",
|
|
2523
2523
|
name: r,
|
|
2524
|
-
searchParams:
|
|
2524
|
+
searchParams: I,
|
|
2525
2525
|
filterKey: a
|
|
2526
2526
|
}) === "active" ? "Active" : "InActive",
|
|
2527
2527
|
value: nt({
|
|
2528
2528
|
get: "value",
|
|
2529
2529
|
name: r,
|
|
2530
|
-
searchParams:
|
|
2530
|
+
searchParams: I,
|
|
2531
2531
|
filterKey: a
|
|
2532
2532
|
})
|
|
2533
2533
|
}
|
|
@@ -2540,14 +2540,14 @@ const Hr = (t, r) => {
|
|
|
2540
2540
|
setSearchParams: P,
|
|
2541
2541
|
filterKey: a
|
|
2542
2542
|
}),
|
|
2543
|
-
placeholder:
|
|
2543
|
+
placeholder: x ? "All" : "All Status"
|
|
2544
2544
|
},
|
|
2545
2545
|
M
|
|
2546
2546
|
)
|
|
2547
2547
|
]
|
|
2548
2548
|
}
|
|
2549
2549
|
),
|
|
2550
|
-
l && /* @__PURE__ */
|
|
2550
|
+
l && /* @__PURE__ */ u(
|
|
2551
2551
|
f,
|
|
2552
2552
|
{
|
|
2553
2553
|
gap: "sm",
|
|
@@ -2555,15 +2555,15 @@ const Hr = (t, r) => {
|
|
|
2555
2555
|
width: d && R ? d : R ? "310px" : ""
|
|
2556
2556
|
},
|
|
2557
2557
|
children: [
|
|
2558
|
-
|
|
2558
|
+
x && /* @__PURE__ */ u(pe.SubH3, { children: [
|
|
2559
2559
|
"Search for ",
|
|
2560
|
-
|
|
2560
|
+
E
|
|
2561
2561
|
] }),
|
|
2562
2562
|
/* @__PURE__ */ e(
|
|
2563
2563
|
gt,
|
|
2564
2564
|
{
|
|
2565
2565
|
placeholder: i,
|
|
2566
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2566
|
+
leftIcon: /* @__PURE__ */ e(b, { name: "Search", width: 20, height: 20 }),
|
|
2567
2567
|
onChange: (V) => K(V.target.value),
|
|
2568
2568
|
value: Q,
|
|
2569
2569
|
fullWidth: !0
|
|
@@ -2576,8 +2576,8 @@ const Hr = (t, r) => {
|
|
|
2576
2576
|
/* @__PURE__ */ e(
|
|
2577
2577
|
ui,
|
|
2578
2578
|
{
|
|
2579
|
-
isOpen:
|
|
2580
|
-
onClose: () =>
|
|
2579
|
+
isOpen: N,
|
|
2580
|
+
onClose: () => q(!1),
|
|
2581
2581
|
filterKey: a,
|
|
2582
2582
|
filters: m,
|
|
2583
2583
|
pageKey: h
|
|
@@ -2588,15 +2588,15 @@ const Hr = (t, r) => {
|
|
|
2588
2588
|
);
|
|
2589
2589
|
}, fi = ({ children: t, borderRadius: r, height: i }) => {
|
|
2590
2590
|
const o = ie(null), [n, l] = k("100vh");
|
|
2591
|
-
return
|
|
2591
|
+
return Z(() => {
|
|
2592
2592
|
if (i) return;
|
|
2593
|
-
const
|
|
2593
|
+
const s = () => {
|
|
2594
2594
|
if (o.current) {
|
|
2595
2595
|
const a = o.current.getBoundingClientRect().top;
|
|
2596
2596
|
l(`calc(100vh - ${a}px)`);
|
|
2597
2597
|
}
|
|
2598
2598
|
};
|
|
2599
|
-
return
|
|
2599
|
+
return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
2600
2600
|
}, [i]), /* @__PURE__ */ e(
|
|
2601
2601
|
f,
|
|
2602
2602
|
{
|
|
@@ -2622,7 +2622,7 @@ const Hr = (t, r) => {
|
|
|
2622
2622
|
advanceFilter: n,
|
|
2623
2623
|
showFilter: l = !0
|
|
2624
2624
|
}) => {
|
|
2625
|
-
const
|
|
2625
|
+
const s = ne("md"), a = l ? /* @__PURE__ */ e(hi, { ...n }) : null;
|
|
2626
2626
|
return /* @__PURE__ */ e(
|
|
2627
2627
|
f,
|
|
2628
2628
|
{
|
|
@@ -2639,37 +2639,37 @@ const Hr = (t, r) => {
|
|
|
2639
2639
|
flexShrink: 0,
|
|
2640
2640
|
position: "relative",
|
|
2641
2641
|
zIndex: 10,
|
|
2642
|
-
flexDirection:
|
|
2642
|
+
flexDirection: s ? "row" : "column-reverse",
|
|
2643
2643
|
gap: "16px"
|
|
2644
2644
|
},
|
|
2645
|
-
children: o ? o({ filter: a }) : /* @__PURE__ */
|
|
2646
|
-
/* @__PURE__ */
|
|
2645
|
+
children: o ? o({ filter: a }) : /* @__PURE__ */ u(U, { children: [
|
|
2646
|
+
/* @__PURE__ */ u(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0 }, children: [
|
|
2647
2647
|
a,
|
|
2648
2648
|
i
|
|
2649
2649
|
] }),
|
|
2650
|
-
/* @__PURE__ */
|
|
2650
|
+
/* @__PURE__ */ u(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flexShrink: 0 }, children: [
|
|
2651
2651
|
r,
|
|
2652
2652
|
t ? st(t) ? t : /* @__PURE__ */ e(
|
|
2653
2653
|
f,
|
|
2654
2654
|
{
|
|
2655
2655
|
style: {
|
|
2656
2656
|
display: "flex",
|
|
2657
|
-
flexDirection:
|
|
2657
|
+
flexDirection: s ? "row" : "column",
|
|
2658
2658
|
gap: "8px",
|
|
2659
|
-
width:
|
|
2659
|
+
width: s ? "auto" : "100%",
|
|
2660
2660
|
textWrap: "nowrap"
|
|
2661
2661
|
},
|
|
2662
2662
|
children: t.map(
|
|
2663
|
-
({ title: d, icon: g, buttonProps: m, onClick: y },
|
|
2664
|
-
|
|
2663
|
+
({ title: d, icon: g, buttonProps: m, onClick: y }, D) => !d && !g ? null : /* @__PURE__ */ e(
|
|
2664
|
+
T,
|
|
2665
2665
|
{
|
|
2666
|
-
fullWidth: !
|
|
2667
|
-
iconLeft: g ? /* @__PURE__ */ e(
|
|
2666
|
+
fullWidth: !s,
|
|
2667
|
+
iconLeft: g ? /* @__PURE__ */ e(b, { name: g }) : void 0,
|
|
2668
2668
|
onClick: y,
|
|
2669
2669
|
...m,
|
|
2670
2670
|
children: d
|
|
2671
2671
|
},
|
|
2672
|
-
`action-${
|
|
2672
|
+
`action-${D}`
|
|
2673
2673
|
)
|
|
2674
2674
|
)
|
|
2675
2675
|
}
|
|
@@ -2682,7 +2682,7 @@ const Hr = (t, r) => {
|
|
|
2682
2682
|
totalData: t,
|
|
2683
2683
|
withMarginBottom: r = !0,
|
|
2684
2684
|
withMarginTop: i = !0
|
|
2685
|
-
}) => /* @__PURE__ */
|
|
2685
|
+
}) => /* @__PURE__ */ u(
|
|
2686
2686
|
f,
|
|
2687
2687
|
{
|
|
2688
2688
|
style: {
|
|
@@ -2694,7 +2694,7 @@ const Hr = (t, r) => {
|
|
|
2694
2694
|
marginTop: i ? "16px" : void 0
|
|
2695
2695
|
},
|
|
2696
2696
|
children: [
|
|
2697
|
-
/* @__PURE__ */
|
|
2697
|
+
/* @__PURE__ */ u(
|
|
2698
2698
|
pe.Body1,
|
|
2699
2699
|
{
|
|
2700
2700
|
props: {
|
|
@@ -2717,15 +2717,15 @@ const Hr = (t, r) => {
|
|
|
2717
2717
|
showPagination: n = !0,
|
|
2718
2718
|
totalData: l
|
|
2719
2719
|
}) => {
|
|
2720
|
-
const { searchQueries:
|
|
2721
|
-
a({ ...
|
|
2722
|
-
}, m = (
|
|
2720
|
+
const { searchQueries: s, setSearchParams: a, searchParams: h } = xt(), d = h.get(i), g = (E) => {
|
|
2721
|
+
a({ ...s, [r]: String(E) });
|
|
2722
|
+
}, m = (E) => {
|
|
2723
2723
|
a({
|
|
2724
|
-
...
|
|
2725
|
-
[i]:
|
|
2724
|
+
...s,
|
|
2725
|
+
[i]: E,
|
|
2726
2726
|
[r]: "1"
|
|
2727
2727
|
});
|
|
2728
|
-
}, y = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1),
|
|
2728
|
+
}, y = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), D = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
|
|
2729
2729
|
return /* @__PURE__ */ e(
|
|
2730
2730
|
f,
|
|
2731
2731
|
{
|
|
@@ -2742,9 +2742,9 @@ const Hr = (t, r) => {
|
|
|
2742
2742
|
borderTop: "1px solid var(--sa-border-subtle, #0b120e24)",
|
|
2743
2743
|
flexShrink: 0
|
|
2744
2744
|
},
|
|
2745
|
-
children: n ? /* @__PURE__ */
|
|
2746
|
-
/* @__PURE__ */
|
|
2747
|
-
/* @__PURE__ */ e(
|
|
2745
|
+
children: n ? /* @__PURE__ */ u(U, { children: [
|
|
2746
|
+
/* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center", textWrap: "nowrap" }, children: [
|
|
2747
|
+
/* @__PURE__ */ e(v, { children: "Rows Per Page: " }),
|
|
2748
2748
|
/* @__PURE__ */ e(
|
|
2749
2749
|
ft,
|
|
2750
2750
|
{
|
|
@@ -2755,14 +2755,14 @@ const Hr = (t, r) => {
|
|
|
2755
2755
|
{ label: "50", value: "50" },
|
|
2756
2756
|
{ label: "100", value: "100" }
|
|
2757
2757
|
],
|
|
2758
|
-
onChange: (
|
|
2759
|
-
m(
|
|
2758
|
+
onChange: (E) => {
|
|
2759
|
+
m(E[0].value);
|
|
2760
2760
|
},
|
|
2761
2761
|
value: d ? [{ label: `${d} per row`, value: d }] : [{ label: `${o} per row`, value: `${o}` }],
|
|
2762
2762
|
defaultValue: d ? [{ label: `${d} per row`, value: d }] : [{ label: `${o} per row`, value: `${o}` }]
|
|
2763
2763
|
}
|
|
2764
2764
|
),
|
|
2765
|
-
/* @__PURE__ */ e(
|
|
2765
|
+
/* @__PURE__ */ e(v, { children: `${y}-${D} of ${(t == null ? void 0 : t.totalData) || 0}` })
|
|
2766
2766
|
] }),
|
|
2767
2767
|
/* @__PURE__ */ e(
|
|
2768
2768
|
sr,
|
|
@@ -2783,32 +2783,32 @@ const Hr = (t, r) => {
|
|
|
2783
2783
|
}
|
|
2784
2784
|
);
|
|
2785
2785
|
}, pi = ({ filter: t, columnTitle: r }) => {
|
|
2786
|
-
const [i, o] = k(!1), n = ie(null), l = ie(null),
|
|
2787
|
-
(
|
|
2786
|
+
const [i, o] = k(!1), n = ie(null), l = ie(null), s = ie(null), [a, h] = k(""), [d, g] = k({ top: 0, left: 0 }), m = t.selectedValues, y = he(() => a ? t.options.filter(
|
|
2787
|
+
(x) => x.label.toLowerCase().includes(a.toLowerCase())
|
|
2788
2788
|
) : t.options, [t.options, a]);
|
|
2789
|
-
|
|
2789
|
+
Z(() => {
|
|
2790
2790
|
if (i && l.current) {
|
|
2791
|
-
const
|
|
2792
|
-
top:
|
|
2791
|
+
const x = l.current.getBoundingClientRect(), z = 280, j = {
|
|
2792
|
+
top: x.bottom + 8
|
|
2793
2793
|
};
|
|
2794
|
-
t.position === "left" ||
|
|
2794
|
+
t.position === "left" || x.left + z > window.innerWidth ? j.right = window.innerWidth - x.right : j.left = x.left, g(j);
|
|
2795
2795
|
}
|
|
2796
|
-
}, [i, t.position]),
|
|
2797
|
-
i &&
|
|
2798
|
-
var
|
|
2799
|
-
return (
|
|
2796
|
+
}, [i, t.position]), Z(() => {
|
|
2797
|
+
i && s.current ? setTimeout(() => {
|
|
2798
|
+
var x;
|
|
2799
|
+
return (x = s.current) == null ? void 0 : x.focus();
|
|
2800
2800
|
}, 50) : h("");
|
|
2801
|
-
}, [i]),
|
|
2802
|
-
const
|
|
2803
|
-
n.current && !n.current.contains(
|
|
2801
|
+
}, [i]), Z(() => {
|
|
2802
|
+
const x = (z) => {
|
|
2803
|
+
n.current && !n.current.contains(z.target) && l.current && !l.current.contains(z.target) && o(!1);
|
|
2804
2804
|
};
|
|
2805
|
-
return i && document.addEventListener("mousedown",
|
|
2805
|
+
return i && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
2806
2806
|
}, [i]);
|
|
2807
|
-
const
|
|
2808
|
-
const
|
|
2809
|
-
t.onFilterChange(
|
|
2810
|
-
},
|
|
2811
|
-
return /* @__PURE__ */
|
|
2807
|
+
const D = (x) => {
|
|
2808
|
+
const z = m.includes(x) ? m.filter((j) => j !== x) : [...m, x];
|
|
2809
|
+
t.onFilterChange(z);
|
|
2810
|
+
}, E = () => t.onFilterChange([]);
|
|
2811
|
+
return /* @__PURE__ */ u(f, { style: { position: "relative" }, children: [
|
|
2812
2812
|
/* @__PURE__ */ e(
|
|
2813
2813
|
f,
|
|
2814
2814
|
{
|
|
@@ -2819,12 +2819,12 @@ const Hr = (t, r) => {
|
|
|
2819
2819
|
alignItems: "center",
|
|
2820
2820
|
cursor: "pointer"
|
|
2821
2821
|
},
|
|
2822
|
-
onClick: (
|
|
2823
|
-
var
|
|
2824
|
-
|
|
2822
|
+
onClick: (x) => {
|
|
2823
|
+
var z;
|
|
2824
|
+
x.stopPropagation(), i || (z = t.onOpen) == null || z.call(t), o((j) => !j);
|
|
2825
2825
|
},
|
|
2826
2826
|
children: /* @__PURE__ */ e(
|
|
2827
|
-
|
|
2827
|
+
b,
|
|
2828
2828
|
{
|
|
2829
2829
|
name: i ? "ChevronUp" : "ChevronDown",
|
|
2830
2830
|
size: "sm",
|
|
@@ -2835,7 +2835,7 @@ const Hr = (t, r) => {
|
|
|
2835
2835
|
)
|
|
2836
2836
|
}
|
|
2837
2837
|
),
|
|
2838
|
-
i && /* @__PURE__ */
|
|
2838
|
+
i && /* @__PURE__ */ u(
|
|
2839
2839
|
f,
|
|
2840
2840
|
{
|
|
2841
2841
|
ref: n,
|
|
@@ -2854,7 +2854,7 @@ const Hr = (t, r) => {
|
|
|
2854
2854
|
border: "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
2855
2855
|
},
|
|
2856
2856
|
children: [
|
|
2857
|
-
/* @__PURE__ */
|
|
2857
|
+
/* @__PURE__ */ u(
|
|
2858
2858
|
f,
|
|
2859
2859
|
{
|
|
2860
2860
|
style: {
|
|
@@ -2869,18 +2869,18 @@ const Hr = (t, r) => {
|
|
|
2869
2869
|
borderBottom: "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
2870
2870
|
},
|
|
2871
2871
|
children: [
|
|
2872
|
-
/* @__PURE__ */
|
|
2872
|
+
/* @__PURE__ */ u(v, { fontSize: "sm", fontWeight: "semibold", color: "gray-700", children: [
|
|
2873
2873
|
"Filter ",
|
|
2874
2874
|
r
|
|
2875
2875
|
] }),
|
|
2876
2876
|
m.length > 0 && /* @__PURE__ */ e(f, { style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
|
|
2877
|
-
|
|
2877
|
+
v,
|
|
2878
2878
|
{
|
|
2879
2879
|
fontSize: "xs",
|
|
2880
2880
|
color: "primary",
|
|
2881
2881
|
fontWeight: "semibold",
|
|
2882
|
-
onClick: (
|
|
2883
|
-
|
|
2882
|
+
onClick: (x) => {
|
|
2883
|
+
x.stopPropagation(), E();
|
|
2884
2884
|
},
|
|
2885
2885
|
children: "CLEAR"
|
|
2886
2886
|
}
|
|
@@ -2900,11 +2900,11 @@ const Hr = (t, r) => {
|
|
|
2900
2900
|
children: /* @__PURE__ */ e(
|
|
2901
2901
|
gt,
|
|
2902
2902
|
{
|
|
2903
|
-
ref:
|
|
2903
|
+
ref: s,
|
|
2904
2904
|
placeholder: `Search ${r.toLowerCase()}...`,
|
|
2905
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2905
|
+
leftIcon: /* @__PURE__ */ e(b, { name: "Search", size: "sm" }),
|
|
2906
2906
|
value: a,
|
|
2907
|
-
onChange: (
|
|
2907
|
+
onChange: (x) => h(x.target.value),
|
|
2908
2908
|
style: { fontSize: "14px" }
|
|
2909
2909
|
}
|
|
2910
2910
|
)
|
|
@@ -2920,7 +2920,7 @@ const Hr = (t, r) => {
|
|
|
2920
2920
|
paddingLeft: "8px",
|
|
2921
2921
|
paddingRight: "8px"
|
|
2922
2922
|
},
|
|
2923
|
-
children: t.isLoadingOptions ? /* @__PURE__ */
|
|
2923
|
+
children: t.isLoadingOptions ? /* @__PURE__ */ u(
|
|
2924
2924
|
f,
|
|
2925
2925
|
{
|
|
2926
2926
|
style: {
|
|
@@ -2933,7 +2933,7 @@ const Hr = (t, r) => {
|
|
|
2933
2933
|
},
|
|
2934
2934
|
children: [
|
|
2935
2935
|
/* @__PURE__ */ e(
|
|
2936
|
-
|
|
2936
|
+
b,
|
|
2937
2937
|
{
|
|
2938
2938
|
name: "Loading",
|
|
2939
2939
|
size: "lg",
|
|
@@ -2944,7 +2944,7 @@ const Hr = (t, r) => {
|
|
|
2944
2944
|
}
|
|
2945
2945
|
),
|
|
2946
2946
|
/* @__PURE__ */ e(
|
|
2947
|
-
|
|
2947
|
+
v,
|
|
2948
2948
|
{
|
|
2949
2949
|
fontSize: "sm",
|
|
2950
2950
|
color: "gray-500",
|
|
@@ -2954,7 +2954,7 @@ const Hr = (t, r) => {
|
|
|
2954
2954
|
)
|
|
2955
2955
|
]
|
|
2956
2956
|
}
|
|
2957
|
-
) : y.length > 0 ? /* @__PURE__ */ e(f, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: y.map((
|
|
2957
|
+
) : y.length > 0 ? /* @__PURE__ */ e(f, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: y.map((x) => /* @__PURE__ */ u(
|
|
2958
2958
|
f,
|
|
2959
2959
|
{
|
|
2960
2960
|
style: {
|
|
@@ -2969,39 +2969,39 @@ const Hr = (t, r) => {
|
|
|
2969
2969
|
cursor: "pointer",
|
|
2970
2970
|
borderRadius: "8px",
|
|
2971
2971
|
transition: "all 0.2s ease",
|
|
2972
|
-
backgroundColor: m.includes(
|
|
2972
|
+
backgroundColor: m.includes(x.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
|
|
2973
2973
|
},
|
|
2974
|
-
onClick: (
|
|
2975
|
-
|
|
2974
|
+
onClick: (z) => {
|
|
2975
|
+
z.stopPropagation(), D(x.value);
|
|
2976
2976
|
},
|
|
2977
|
-
onMouseEnter: (
|
|
2978
|
-
m.includes(
|
|
2977
|
+
onMouseEnter: (z) => {
|
|
2978
|
+
m.includes(x.value) || (z.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), z.currentTarget.style.transform = "translateX(2px)";
|
|
2979
2979
|
},
|
|
2980
|
-
onMouseLeave: (
|
|
2981
|
-
|
|
2980
|
+
onMouseLeave: (z) => {
|
|
2981
|
+
z.currentTarget.style.backgroundColor = m.includes(x.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", z.currentTarget.style.transform = "translateX(0)";
|
|
2982
2982
|
},
|
|
2983
2983
|
children: [
|
|
2984
2984
|
/* @__PURE__ */ e(
|
|
2985
2985
|
ct,
|
|
2986
2986
|
{
|
|
2987
|
-
checked: m.includes(
|
|
2987
|
+
checked: m.includes(x.value),
|
|
2988
2988
|
onChange: () => {
|
|
2989
2989
|
}
|
|
2990
2990
|
}
|
|
2991
2991
|
),
|
|
2992
2992
|
/* @__PURE__ */ e(
|
|
2993
|
-
|
|
2993
|
+
v,
|
|
2994
2994
|
{
|
|
2995
2995
|
fontSize: "sm",
|
|
2996
|
-
fontWeight: m.includes(
|
|
2997
|
-
color: m.includes(
|
|
2998
|
-
children:
|
|
2996
|
+
fontWeight: m.includes(x.value) ? "medium" : "normal",
|
|
2997
|
+
color: m.includes(x.value) ? "primary" : "gray-700",
|
|
2998
|
+
children: x.label
|
|
2999
2999
|
}
|
|
3000
3000
|
)
|
|
3001
3001
|
]
|
|
3002
3002
|
},
|
|
3003
|
-
|
|
3004
|
-
)) }) : /* @__PURE__ */
|
|
3003
|
+
x.value
|
|
3004
|
+
)) }) : /* @__PURE__ */ u(
|
|
3005
3005
|
f,
|
|
3006
3006
|
{
|
|
3007
3007
|
style: {
|
|
@@ -3014,7 +3014,7 @@ const Hr = (t, r) => {
|
|
|
3014
3014
|
},
|
|
3015
3015
|
children: [
|
|
3016
3016
|
/* @__PURE__ */ e(
|
|
3017
|
-
|
|
3017
|
+
b,
|
|
3018
3018
|
{
|
|
3019
3019
|
name: "Search",
|
|
3020
3020
|
size: "lg",
|
|
@@ -3022,7 +3022,7 @@ const Hr = (t, r) => {
|
|
|
3022
3022
|
}
|
|
3023
3023
|
),
|
|
3024
3024
|
/* @__PURE__ */ e(
|
|
3025
|
-
|
|
3025
|
+
v,
|
|
3026
3026
|
{
|
|
3027
3027
|
fontSize: "sm",
|
|
3028
3028
|
color: "gray-500",
|
|
@@ -3047,7 +3047,7 @@ const Hr = (t, r) => {
|
|
|
3047
3047
|
backgroundColor: "var(--sa-color-brand-50, #e6edf6)",
|
|
3048
3048
|
marginTop: "auto"
|
|
3049
3049
|
},
|
|
3050
|
-
children: /* @__PURE__ */
|
|
3050
|
+
children: /* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "4px" }, children: [
|
|
3051
3051
|
/* @__PURE__ */ e(
|
|
3052
3052
|
f,
|
|
3053
3053
|
{
|
|
@@ -3062,7 +3062,7 @@ const Hr = (t, r) => {
|
|
|
3062
3062
|
children: m.length
|
|
3063
3063
|
}
|
|
3064
3064
|
),
|
|
3065
|
-
/* @__PURE__ */
|
|
3065
|
+
/* @__PURE__ */ u(v, { fontSize: "xs", color: "primary", fontWeight: "medium", children: [
|
|
3066
3066
|
"item",
|
|
3067
3067
|
m.length > 1 ? "s" : "",
|
|
3068
3068
|
" selected"
|
|
@@ -3078,7 +3078,7 @@ const Hr = (t, r) => {
|
|
|
3078
3078
|
direction: t
|
|
3079
3079
|
}) => {
|
|
3080
3080
|
const r = "var(--sa-text-primary, #292a2e)", i = "var(--sa-text-subtle, #8c8f97)";
|
|
3081
|
-
return /* @__PURE__ */
|
|
3081
|
+
return /* @__PURE__ */ u(
|
|
3082
3082
|
"span",
|
|
3083
3083
|
{
|
|
3084
3084
|
style: {
|
|
@@ -3114,7 +3114,7 @@ const Hr = (t, r) => {
|
|
|
3114
3114
|
]
|
|
3115
3115
|
}
|
|
3116
3116
|
);
|
|
3117
|
-
}, Ci = ({ frozen: t }) => /* @__PURE__ */
|
|
3117
|
+
}, Ci = ({ frozen: t }) => /* @__PURE__ */ u(
|
|
3118
3118
|
"svg",
|
|
3119
3119
|
{
|
|
3120
3120
|
width: "11",
|
|
@@ -3130,99 +3130,99 @@ const Hr = (t, r) => {
|
|
|
3130
3130
|
/* @__PURE__ */ e("path", { d: t ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
3131
3131
|
]
|
|
3132
3132
|
}
|
|
3133
|
-
), ot = "var(--sa-background-primary, #ffffff)",
|
|
3133
|
+
), ot = "var(--sa-background-primary, #ffffff)", Nt = "var(--sa-background-primary-inverse, #f8f8f8)", vi = ({
|
|
3134
3134
|
columns: t,
|
|
3135
3135
|
records: r,
|
|
3136
3136
|
handleDetail: i,
|
|
3137
3137
|
handleUpdate: o,
|
|
3138
3138
|
handleDelete: n,
|
|
3139
3139
|
isLoading: l,
|
|
3140
|
-
visibleHandleDelete:
|
|
3140
|
+
visibleHandleDelete: s,
|
|
3141
3141
|
visibleHandleUpdate: a,
|
|
3142
3142
|
visibleHandleDetail: h,
|
|
3143
3143
|
showHeadBorder: d = !1,
|
|
3144
3144
|
scrollParentRef: g,
|
|
3145
3145
|
frozenCount: m = 0,
|
|
3146
3146
|
onFrozenCountChange: y,
|
|
3147
|
-
customActions:
|
|
3148
|
-
actionsOrder:
|
|
3149
|
-
customEmptyState:
|
|
3150
|
-
enableColumnResize:
|
|
3151
|
-
defaultColumnWidths:
|
|
3152
|
-
onColumnWidthsChange:
|
|
3153
|
-
defaultMinColumnWidth:
|
|
3147
|
+
customActions: D,
|
|
3148
|
+
actionsOrder: E = ["detail", "update", "delete", "custom"],
|
|
3149
|
+
customEmptyState: x,
|
|
3150
|
+
enableColumnResize: z = !1,
|
|
3151
|
+
defaultColumnWidths: j,
|
|
3152
|
+
onColumnWidthsChange: N,
|
|
3153
|
+
defaultMinColumnWidth: q = 60,
|
|
3154
3154
|
sort: M,
|
|
3155
3155
|
defaultSort: ae,
|
|
3156
3156
|
onSortChange: J,
|
|
3157
|
-
showActionDivider:
|
|
3157
|
+
showActionDivider: I = !1
|
|
3158
3158
|
}) => {
|
|
3159
3159
|
const P = M !== void 0, [oe, le] = k(
|
|
3160
3160
|
ae ?? null
|
|
3161
|
-
), G = P ? M ?? null : oe, Q = (
|
|
3162
|
-
if (
|
|
3163
|
-
if (typeof
|
|
3164
|
-
}, K = (
|
|
3165
|
-
const
|
|
3166
|
-
if (!
|
|
3161
|
+
), G = P ? M ?? null : oe, Q = (C) => {
|
|
3162
|
+
if (C.sortKey) return C.sortKey;
|
|
3163
|
+
if (typeof C.accessor == "string") return C.accessor;
|
|
3164
|
+
}, K = (C) => {
|
|
3165
|
+
const S = Q(C);
|
|
3166
|
+
if (!S) return;
|
|
3167
3167
|
let w;
|
|
3168
|
-
!G || G.key !==
|
|
3169
|
-
}, ee = [i, o, n].filter((
|
|
3170
|
-
if (!
|
|
3171
|
-
if (typeof
|
|
3172
|
-
if (typeof
|
|
3173
|
-
}, [et,
|
|
3174
|
-
|
|
3168
|
+
!G || G.key !== S ? w = { key: S, direction: "asc" } : G.direction === "asc" ? w = { key: S, direction: "desc" } : w = null, P || le(w), J == null || J(w);
|
|
3169
|
+
}, ee = [i, o, n].filter((C) => C !== void 0).length, X = !!D, R = !!i || !!o || !!n || X, V = "var(--sa-border-subtle, #0b120e24)", te = `1px solid ${V}`, fe = `inset 1px 0 0 ${V}`, ge = `inset -1px 0 0 ${V}`, Be = ee === 3 ? X ? "178px" : "140px" : ee === 2 ? X ? "140px" : "102px" : ee === 1 ? X ? "112px" : "74px" : X ? "74px" : "", Ne = (C, S) => {
|
|
3170
|
+
if (!S) return C;
|
|
3171
|
+
if (typeof S == "function") return S(C);
|
|
3172
|
+
if (typeof S == "string") return C[S];
|
|
3173
|
+
}, [et, Te] = k(!1);
|
|
3174
|
+
Z(() => {
|
|
3175
3175
|
if (!(g != null && g.current)) return;
|
|
3176
|
-
const
|
|
3177
|
-
|
|
3176
|
+
const C = g.current;
|
|
3177
|
+
Te(C.scrollHeight > C.clientHeight);
|
|
3178
3178
|
}, [r, g]);
|
|
3179
|
-
const Ae = ie(null), [de, Oe] = k([]), [
|
|
3180
|
-
() =>
|
|
3179
|
+
const Ae = ie(null), [de, Oe] = k([]), [Ie, Fe] = k(
|
|
3180
|
+
() => j ?? {}
|
|
3181
3181
|
), Ee = ie(null);
|
|
3182
3182
|
at(() => {
|
|
3183
3183
|
if (!m || !Ae.current) {
|
|
3184
3184
|
Oe([]);
|
|
3185
3185
|
return;
|
|
3186
3186
|
}
|
|
3187
|
-
const
|
|
3187
|
+
const C = Array.from(
|
|
3188
3188
|
Ae.current.querySelectorAll("thead tr th")
|
|
3189
|
-
),
|
|
3189
|
+
), S = [];
|
|
3190
3190
|
let w = 0;
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
}), Oe(
|
|
3194
|
-
}, [m, t, r,
|
|
3195
|
-
const _e = (
|
|
3196
|
-
y && y(
|
|
3197
|
-
}, p = (
|
|
3198
|
-
const w =
|
|
3191
|
+
C.forEach((B, H) => {
|
|
3192
|
+
S[H] = w, H < m && (w += B.offsetWidth);
|
|
3193
|
+
}), Oe(S);
|
|
3194
|
+
}, [m, t, r, Ie]);
|
|
3195
|
+
const _e = (C) => {
|
|
3196
|
+
y && y(C < m ? C : C + 1);
|
|
3197
|
+
}, p = (C, S) => {
|
|
3198
|
+
const w = Ie[C];
|
|
3199
3199
|
if (w !== void 0) {
|
|
3200
3200
|
const B = `${w}px`;
|
|
3201
3201
|
return { width: B, minWidth: B, maxWidth: B };
|
|
3202
3202
|
}
|
|
3203
|
-
return
|
|
3204
|
-
},
|
|
3205
|
-
|
|
3206
|
-
const w =
|
|
3203
|
+
return S ? { width: S } : {};
|
|
3204
|
+
}, F = (C) => z && (C.resizable ?? !0), L = (C, S) => {
|
|
3205
|
+
C.preventDefault(), C.stopPropagation();
|
|
3206
|
+
const w = C.currentTarget.closest("th");
|
|
3207
3207
|
if (!w) return;
|
|
3208
3208
|
const B = Math.round(w.getBoundingClientRect().width);
|
|
3209
|
-
Ee.current = { colIndex:
|
|
3210
|
-
const
|
|
3209
|
+
Ee.current = { colIndex: S, startX: C.clientX, startWidth: B };
|
|
3210
|
+
const H = document.body.style.userSelect, ue = document.body.style.cursor;
|
|
3211
3211
|
document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
|
|
3212
|
-
const xe = (
|
|
3212
|
+
const xe = (De) => {
|
|
3213
3213
|
var Me;
|
|
3214
3214
|
const Ce = Ee.current;
|
|
3215
3215
|
if (!Ce) return;
|
|
3216
|
-
const je = ((Me = t[Ce.colIndex]) == null ? void 0 : Me.minWidth) ??
|
|
3216
|
+
const je = ((Me = t[Ce.colIndex]) == null ? void 0 : Me.minWidth) ?? q, He = Math.max(je, Ce.startWidth + (De.clientX - Ce.startX));
|
|
3217
3217
|
Fe(
|
|
3218
|
-
(tt) => tt[Ce.colIndex] ===
|
|
3218
|
+
(tt) => tt[Ce.colIndex] === He ? tt : { ...tt, [Ce.colIndex]: He }
|
|
3219
3219
|
);
|
|
3220
3220
|
}, we = () => {
|
|
3221
|
-
document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", we), document.body.style.userSelect =
|
|
3221
|
+
document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", we), document.body.style.userSelect = H, document.body.style.cursor = ue, Ee.current = null, N && Fe((De) => (N(De), De));
|
|
3222
3222
|
};
|
|
3223
3223
|
document.addEventListener("mousemove", xe), document.addEventListener("mouseup", we);
|
|
3224
3224
|
};
|
|
3225
|
-
return /* @__PURE__ */ e("div", { ref: Ae, children: /* @__PURE__ */
|
|
3225
|
+
return /* @__PURE__ */ e("div", { ref: Ae, children: /* @__PURE__ */ u(Gt, { fullWidth: !0, children: [
|
|
3226
3226
|
/* @__PURE__ */ e(
|
|
3227
3227
|
dr,
|
|
3228
3228
|
{
|
|
@@ -3230,11 +3230,11 @@ const Hr = (t, r) => {
|
|
|
3230
3230
|
height: "40px",
|
|
3231
3231
|
whiteSpace: "nowrap"
|
|
3232
3232
|
},
|
|
3233
|
-
children: /* @__PURE__ */
|
|
3234
|
-
t.map((
|
|
3235
|
-
var je,
|
|
3236
|
-
const w = m > 0 &&
|
|
3237
|
-
return /* @__PURE__ */
|
|
3233
|
+
children: /* @__PURE__ */ u(Re, { children: [
|
|
3234
|
+
t.map((C, S) => {
|
|
3235
|
+
var je, He;
|
|
3236
|
+
const w = m > 0 && S < m, B = de[S] ?? 0, H = F(C), xe = S === t.length - 1 && R && I, we = Q(C), De = !!C.sortable && !!we, Ce = De && (G == null ? void 0 : G.key) === we ? G.direction : null;
|
|
3237
|
+
return /* @__PURE__ */ u(
|
|
3238
3238
|
St,
|
|
3239
3239
|
{
|
|
3240
3240
|
style: {
|
|
@@ -3242,16 +3242,16 @@ const Hr = (t, r) => {
|
|
|
3242
3242
|
top: 0,
|
|
3243
3243
|
left: w ? B : void 0,
|
|
3244
3244
|
zIndex: w ? 4 : 2,
|
|
3245
|
-
paddingLeft:
|
|
3245
|
+
paddingLeft: S === 0 ? "12px" : "",
|
|
3246
3246
|
borderRight: d && !xe && !w ? te : void 0,
|
|
3247
3247
|
borderBottom: d ? te : void 0,
|
|
3248
3248
|
boxShadow: d && w ? ge : void 0,
|
|
3249
3249
|
backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
|
|
3250
|
-
textAlign:
|
|
3251
|
-
...p(
|
|
3250
|
+
textAlign: C.textAlign === "text-right" ? "right" : C.textAlign === "text-center" ? "center" : "left",
|
|
3251
|
+
...p(S, C.width)
|
|
3252
3252
|
},
|
|
3253
3253
|
children: [
|
|
3254
|
-
/* @__PURE__ */
|
|
3254
|
+
/* @__PURE__ */ u(
|
|
3255
3255
|
"div",
|
|
3256
3256
|
{
|
|
3257
3257
|
style: {
|
|
@@ -3262,11 +3262,11 @@ const Hr = (t, r) => {
|
|
|
3262
3262
|
minWidth: 0
|
|
3263
3263
|
},
|
|
3264
3264
|
children: [
|
|
3265
|
-
|
|
3265
|
+
De ? /* @__PURE__ */ u(
|
|
3266
3266
|
"button",
|
|
3267
3267
|
{
|
|
3268
3268
|
type: "button",
|
|
3269
|
-
onClick: () => K(
|
|
3269
|
+
onClick: () => K(C),
|
|
3270
3270
|
title: Ce === "asc" ? "Sorted ascending — click to sort descending" : Ce === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
|
|
3271
3271
|
style: {
|
|
3272
3272
|
flex: 1,
|
|
@@ -3281,7 +3281,7 @@ const Hr = (t, r) => {
|
|
|
3281
3281
|
font: "inherit",
|
|
3282
3282
|
color: "inherit",
|
|
3283
3283
|
cursor: "pointer",
|
|
3284
|
-
textAlign:
|
|
3284
|
+
textAlign: C.textAlign === "text-right" ? "right" : C.textAlign === "text-center" ? "center" : "left"
|
|
3285
3285
|
},
|
|
3286
3286
|
children: [
|
|
3287
3287
|
/* @__PURE__ */ e(
|
|
@@ -3294,7 +3294,7 @@ const Hr = (t, r) => {
|
|
|
3294
3294
|
textOverflow: "ellipsis",
|
|
3295
3295
|
whiteSpace: "nowrap"
|
|
3296
3296
|
},
|
|
3297
|
-
children:
|
|
3297
|
+
children: C.title || ((je = C.accessor) == null ? void 0 : je.toString())
|
|
3298
3298
|
}
|
|
3299
3299
|
),
|
|
3300
3300
|
/* @__PURE__ */ e(xi, { direction: Ce })
|
|
@@ -3310,20 +3310,20 @@ const Hr = (t, r) => {
|
|
|
3310
3310
|
textOverflow: "ellipsis",
|
|
3311
3311
|
whiteSpace: "nowrap"
|
|
3312
3312
|
},
|
|
3313
|
-
children:
|
|
3313
|
+
children: C.title || ((He = C.accessor) == null ? void 0 : He.toString())
|
|
3314
3314
|
}
|
|
3315
3315
|
),
|
|
3316
|
-
|
|
3316
|
+
C.filter && /* @__PURE__ */ e(
|
|
3317
3317
|
pi,
|
|
3318
3318
|
{
|
|
3319
|
-
filter:
|
|
3320
|
-
columnTitle:
|
|
3319
|
+
filter: C.filter,
|
|
3320
|
+
columnTitle: C.title
|
|
3321
3321
|
}
|
|
3322
3322
|
),
|
|
3323
3323
|
y && /* @__PURE__ */ e(
|
|
3324
3324
|
"button",
|
|
3325
3325
|
{
|
|
3326
|
-
onClick: () => _e(
|
|
3326
|
+
onClick: () => _e(S),
|
|
3327
3327
|
title: w ? "Unfreeze column" : "Freeze column",
|
|
3328
3328
|
style: {
|
|
3329
3329
|
background: "none",
|
|
@@ -3343,10 +3343,10 @@ const Hr = (t, r) => {
|
|
|
3343
3343
|
]
|
|
3344
3344
|
}
|
|
3345
3345
|
),
|
|
3346
|
-
|
|
3346
|
+
H && /* @__PURE__ */ e(
|
|
3347
3347
|
"div",
|
|
3348
3348
|
{
|
|
3349
|
-
onMouseDown: (Me) => L(Me,
|
|
3349
|
+
onMouseDown: (Me) => L(Me, S),
|
|
3350
3350
|
onClick: (Me) => Me.stopPropagation(),
|
|
3351
3351
|
role: "separator",
|
|
3352
3352
|
"aria-orientation": "vertical",
|
|
@@ -3366,7 +3366,7 @@ const Hr = (t, r) => {
|
|
|
3366
3366
|
)
|
|
3367
3367
|
]
|
|
3368
3368
|
},
|
|
3369
|
-
`table-head-${
|
|
3369
|
+
`table-head-${S}`
|
|
3370
3370
|
);
|
|
3371
3371
|
}),
|
|
3372
3372
|
R ? /* @__PURE__ */ e(
|
|
@@ -3379,42 +3379,42 @@ const Hr = (t, r) => {
|
|
|
3379
3379
|
right: 0,
|
|
3380
3380
|
zIndex: 3,
|
|
3381
3381
|
borderBottom: d ? te : void 0,
|
|
3382
|
-
boxShadow: d &&
|
|
3382
|
+
boxShadow: d && I ? fe : void 0
|
|
3383
3383
|
}
|
|
3384
3384
|
}
|
|
3385
3385
|
) : null
|
|
3386
3386
|
] })
|
|
3387
3387
|
}
|
|
3388
3388
|
),
|
|
3389
|
-
/* @__PURE__ */ e(ur, { children: l ? /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(Se, { colSpan: t.length + 1, children: /* @__PURE__ */
|
|
3390
|
-
/* @__PURE__ */ e(
|
|
3391
|
-
/* @__PURE__ */ e(
|
|
3392
|
-
/* @__PURE__ */ e(
|
|
3393
|
-
/* @__PURE__ */ e(
|
|
3394
|
-
/* @__PURE__ */ e(
|
|
3395
|
-
] }) }) }) : !(r != null && r.length) &&
|
|
3389
|
+
/* @__PURE__ */ e(ur, { children: l ? /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(Se, { colSpan: t.length + 1, children: /* @__PURE__ */ u(f, { style: { gap: "16px" }, children: [
|
|
3390
|
+
/* @__PURE__ */ e(ze, { variant: "list" }),
|
|
3391
|
+
/* @__PURE__ */ e(ze, { variant: "list" }),
|
|
3392
|
+
/* @__PURE__ */ e(ze, { variant: "list" }),
|
|
3393
|
+
/* @__PURE__ */ e(ze, { variant: "list" }),
|
|
3394
|
+
/* @__PURE__ */ e(ze, { variant: "list" })
|
|
3395
|
+
] }) }) }) : !(r != null && r.length) && x ? /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(Se, { colSpan: t.length + 1, children: x }) }) : r == null ? void 0 : r.map((C, S) => /* @__PURE__ */ u(
|
|
3396
3396
|
Re,
|
|
3397
3397
|
{
|
|
3398
3398
|
style: {
|
|
3399
3399
|
transition: "background-color 0.3s ease",
|
|
3400
3400
|
padding: 0,
|
|
3401
|
-
borderBottom:
|
|
3401
|
+
borderBottom: S === r.length - 1 && et ? void 0 : "1px solid var(--sa-border-subtle, #0b120e24)"
|
|
3402
3402
|
},
|
|
3403
3403
|
onMouseEnter: (w) => {
|
|
3404
3404
|
const B = w.currentTarget;
|
|
3405
|
-
B.style.backgroundColor =
|
|
3406
|
-
|
|
3405
|
+
B.style.backgroundColor = Nt, Array.from(B.querySelectorAll("td")).forEach((H) => {
|
|
3406
|
+
H.style.position === "sticky" && (H.style.backgroundColor = Nt);
|
|
3407
3407
|
});
|
|
3408
3408
|
},
|
|
3409
3409
|
onMouseLeave: (w) => {
|
|
3410
3410
|
const B = w.currentTarget;
|
|
3411
|
-
B.style.backgroundColor = "", Array.from(B.querySelectorAll("td")).forEach((
|
|
3412
|
-
|
|
3411
|
+
B.style.backgroundColor = "", Array.from(B.querySelectorAll("td")).forEach((H) => {
|
|
3412
|
+
H.style.position === "sticky" && (H.style.backgroundColor = ot);
|
|
3413
3413
|
});
|
|
3414
3414
|
},
|
|
3415
3415
|
children: [
|
|
3416
3416
|
t.map((w, B) => {
|
|
3417
|
-
const
|
|
3417
|
+
const H = w.render ? w.render(C, S, r) : Ne(C, w.accessor), ue = m > 0 && B < m, xe = de[B] ?? 0, we = Ie[B] !== void 0, De = ue && B === m - 1;
|
|
3418
3418
|
return /* @__PURE__ */ e(
|
|
3419
3419
|
Se,
|
|
3420
3420
|
{
|
|
@@ -3429,12 +3429,12 @@ const Hr = (t, r) => {
|
|
|
3429
3429
|
overflow: we ? "hidden" : void 0,
|
|
3430
3430
|
borderLeft: w.showBorderLeft ? te : void 0,
|
|
3431
3431
|
borderRight: w.showBorderRight ? te : void 0,
|
|
3432
|
-
boxShadow:
|
|
3432
|
+
boxShadow: De ? ge : void 0,
|
|
3433
3433
|
textAlign: w.textAlign === "text-right" ? "right" : w.textAlign === "text-center" ? "center" : "left",
|
|
3434
3434
|
...p(B, w.width)
|
|
3435
3435
|
},
|
|
3436
|
-
children: typeof
|
|
3437
|
-
|
|
3436
|
+
children: typeof H == "string" ? /* @__PURE__ */ e(
|
|
3437
|
+
v,
|
|
3438
3438
|
{
|
|
3439
3439
|
style: {
|
|
3440
3440
|
whiteSpace: "nowrap",
|
|
@@ -3442,11 +3442,11 @@ const Hr = (t, r) => {
|
|
|
3442
3442
|
textOverflow: "ellipsis",
|
|
3443
3443
|
textAlign: w.textAlign === "text-right" ? "right" : w.textAlign === "text-center" ? "center" : "left"
|
|
3444
3444
|
},
|
|
3445
|
-
children:
|
|
3445
|
+
children: H
|
|
3446
3446
|
}
|
|
3447
|
-
) :
|
|
3447
|
+
) : H
|
|
3448
3448
|
},
|
|
3449
|
-
`row-${
|
|
3449
|
+
`row-${S}-col-${B}`
|
|
3450
3450
|
);
|
|
3451
3451
|
}),
|
|
3452
3452
|
R ? /* @__PURE__ */ e(Se, { style: {
|
|
@@ -3455,57 +3455,57 @@ const Hr = (t, r) => {
|
|
|
3455
3455
|
right: 0,
|
|
3456
3456
|
zIndex: 1,
|
|
3457
3457
|
backgroundColor: ot,
|
|
3458
|
-
boxShadow:
|
|
3458
|
+
boxShadow: I ? fe : void 0,
|
|
3459
3459
|
transition: "background-color 0.3s ease"
|
|
3460
|
-
}, children: /* @__PURE__ */ e(
|
|
3461
|
-
const B =
|
|
3462
|
-
return w === "detail" && i && (h == null ? void 0 : h(
|
|
3463
|
-
|
|
3460
|
+
}, children: /* @__PURE__ */ e($, { direction: "row", align: "center", justify: "center", gap: "sm", children: E.map((w) => {
|
|
3461
|
+
const B = S === r.length - 1 ? "top" : "bottom";
|
|
3462
|
+
return w === "detail" && i && (h == null ? void 0 : h(C)) !== !1 ? /* @__PURE__ */ e(me, { label: "Detail", position: B, children: /* @__PURE__ */ e(
|
|
3463
|
+
T,
|
|
3464
3464
|
{
|
|
3465
3465
|
size: "xs",
|
|
3466
3466
|
variant: "outline",
|
|
3467
3467
|
tone: "neutral",
|
|
3468
|
-
onClick: () => i(
|
|
3469
|
-
iconLeft: /* @__PURE__ */ e(
|
|
3468
|
+
onClick: () => i(C.id, C),
|
|
3469
|
+
iconLeft: /* @__PURE__ */ e(b, { name: "DocumentClean", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
3470
3470
|
}
|
|
3471
|
-
) }, "detail") : w === "update" && o && (a == null ? void 0 : a(
|
|
3472
|
-
|
|
3471
|
+
) }, "detail") : w === "update" && o && (a == null ? void 0 : a(C)) !== !1 ? /* @__PURE__ */ e(me, { label: "Update", position: B, children: /* @__PURE__ */ e(
|
|
3472
|
+
T,
|
|
3473
3473
|
{
|
|
3474
3474
|
size: "xs",
|
|
3475
3475
|
variant: "outline",
|
|
3476
3476
|
tone: "neutral",
|
|
3477
|
-
onClick: () => o(
|
|
3478
|
-
iconLeft: /* @__PURE__ */ e(
|
|
3477
|
+
onClick: () => o(C),
|
|
3478
|
+
iconLeft: /* @__PURE__ */ e(b, { name: "Edit1", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
|
|
3479
3479
|
}
|
|
3480
|
-
) }, "update") : w === "delete" && n && (
|
|
3481
|
-
|
|
3480
|
+
) }, "update") : w === "delete" && n && (s == null ? void 0 : s(C)) !== !1 ? /* @__PURE__ */ e(me, { label: "Delete", position: B, children: /* @__PURE__ */ e(
|
|
3481
|
+
T,
|
|
3482
3482
|
{
|
|
3483
3483
|
size: "xs",
|
|
3484
3484
|
variant: "outline",
|
|
3485
3485
|
tone: "neutral",
|
|
3486
|
-
onClick: () => n(
|
|
3487
|
-
iconLeft: /* @__PURE__ */ e(
|
|
3486
|
+
onClick: () => n(C.id, C),
|
|
3487
|
+
iconLeft: /* @__PURE__ */ e(b, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
|
|
3488
3488
|
}
|
|
3489
|
-
) }, "delete") : w === "custom" ? /* @__PURE__ */ e(
|
|
3489
|
+
) }, "delete") : w === "custom" ? /* @__PURE__ */ e(Ue.Fragment, { children: D == null ? void 0 : D(C) }, "custom") : null;
|
|
3490
3490
|
}) }) }) : null
|
|
3491
3491
|
]
|
|
3492
3492
|
},
|
|
3493
|
-
`${
|
|
3493
|
+
`${C}${S}`
|
|
3494
3494
|
)) })
|
|
3495
3495
|
] }) });
|
|
3496
|
-
},
|
|
3496
|
+
}, Di = ({
|
|
3497
3497
|
wrapperProps: t,
|
|
3498
3498
|
dataTableProps: r,
|
|
3499
3499
|
headerProps: i,
|
|
3500
3500
|
footerProps: o
|
|
3501
3501
|
}) => {
|
|
3502
3502
|
var m;
|
|
3503
|
-
const n = ie(null), [l,
|
|
3503
|
+
const n = ie(null), [l, s] = k(
|
|
3504
3504
|
(r == null ? void 0 : r.defaultFrozenCount) ?? 0
|
|
3505
3505
|
), a = (i == null ? void 0 : i.show) ?? !0, h = ie(null), d = (m = r == null ? void 0 : r.pagination) == null ? void 0 : m.totalData;
|
|
3506
3506
|
typeof d == "number" && (h.current = d);
|
|
3507
3507
|
const g = (o == null ? void 0 : o.showFooter) ?? (d === void 0 ? h.current !== 0 : d !== 0);
|
|
3508
|
-
return /* @__PURE__ */
|
|
3508
|
+
return /* @__PURE__ */ u(fi, { ...t, children: [
|
|
3509
3509
|
a && /* @__PURE__ */ e(gi, { ...i }),
|
|
3510
3510
|
/* @__PURE__ */ e(
|
|
3511
3511
|
f,
|
|
@@ -3522,7 +3522,7 @@ const Hr = (t, r) => {
|
|
|
3522
3522
|
...r,
|
|
3523
3523
|
scrollParentRef: n,
|
|
3524
3524
|
frozenCount: r != null && r.enableFreezeColumns ? l : 0,
|
|
3525
|
-
onFrozenCountChange: r != null && r.enableFreezeColumns ?
|
|
3525
|
+
onFrozenCountChange: r != null && r.enableFreezeColumns ? s : void 0
|
|
3526
3526
|
}
|
|
3527
3527
|
) : null
|
|
3528
3528
|
}
|
|
@@ -3540,12 +3540,12 @@ const Hr = (t, r) => {
|
|
|
3540
3540
|
)
|
|
3541
3541
|
] });
|
|
3542
3542
|
};
|
|
3543
|
-
function
|
|
3543
|
+
function bi(t) {
|
|
3544
3544
|
return ce(
|
|
3545
3545
|
t
|
|
3546
3546
|
);
|
|
3547
3547
|
}
|
|
3548
|
-
const Yn = Di
|
|
3548
|
+
const Yn = bi(Di), Ct = ({
|
|
3549
3549
|
of: t,
|
|
3550
3550
|
render: r
|
|
3551
3551
|
}) => yr.toArray(t == null ? void 0 : t.map((i, o, n) => r(i, o, n))), O = ({
|
|
@@ -3554,8 +3554,8 @@ const Yn = Di(bi), Ct = ({
|
|
|
3554
3554
|
children: i,
|
|
3555
3555
|
loading: o,
|
|
3556
3556
|
isLoading: n
|
|
3557
|
-
}) => /* @__PURE__ */ e(
|
|
3558
|
-
|
|
3557
|
+
}) => /* @__PURE__ */ e(U, { children: n ? o : t ? i : r }), _ = (t) => /* @__PURE__ */ e(
|
|
3558
|
+
v,
|
|
3559
3559
|
{
|
|
3560
3560
|
...t,
|
|
3561
3561
|
fontFamily: "Poppins",
|
|
@@ -3564,7 +3564,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3564
3564
|
color: t.color || "gray-700",
|
|
3565
3565
|
children: t.children
|
|
3566
3566
|
}
|
|
3567
|
-
),
|
|
3567
|
+
), be = (t) => /* @__PURE__ */ e(v, { color: "red-600", fontSize: "sm", children: t.message }), wi = ({
|
|
3568
3568
|
size: t = "md",
|
|
3569
3569
|
direction: r = "vertical",
|
|
3570
3570
|
requiredTitle: i = "(Required)",
|
|
@@ -3572,8 +3572,8 @@ const Yn = Di(bi), Ct = ({
|
|
|
3572
3572
|
...n
|
|
3573
3573
|
}) => {
|
|
3574
3574
|
var a, h, d;
|
|
3575
|
-
const l = n.hideMessageError || !1,
|
|
3576
|
-
return /* @__PURE__ */
|
|
3575
|
+
const l = n.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
3576
|
+
return /* @__PURE__ */ u(
|
|
3577
3577
|
f,
|
|
3578
3578
|
{
|
|
3579
3579
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -3584,28 +3584,28 @@ const Yn = Di(bi), Ct = ({
|
|
|
3584
3584
|
O,
|
|
3585
3585
|
{
|
|
3586
3586
|
condition: !!n.inputProps.required,
|
|
3587
|
-
fallback: /* @__PURE__ */
|
|
3587
|
+
fallback: /* @__PURE__ */ u(
|
|
3588
3588
|
f,
|
|
3589
3589
|
{
|
|
3590
3590
|
direction: "column",
|
|
3591
|
-
customMaxWidth:
|
|
3591
|
+
customMaxWidth: s,
|
|
3592
3592
|
fullWidth: o,
|
|
3593
3593
|
children: [
|
|
3594
|
-
/* @__PURE__ */ e(
|
|
3595
|
-
/* @__PURE__ */ e(
|
|
3594
|
+
/* @__PURE__ */ e(_, { children: n.title }),
|
|
3595
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description })
|
|
3596
3596
|
]
|
|
3597
3597
|
}
|
|
3598
3598
|
),
|
|
3599
|
-
children: /* @__PURE__ */
|
|
3599
|
+
children: /* @__PURE__ */ u(
|
|
3600
3600
|
f,
|
|
3601
3601
|
{
|
|
3602
3602
|
direction: "column",
|
|
3603
|
-
customMaxWidth:
|
|
3603
|
+
customMaxWidth: s,
|
|
3604
3604
|
fullWidth: o,
|
|
3605
3605
|
children: [
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */ e(
|
|
3608
|
-
/* @__PURE__ */ e(
|
|
3606
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
3607
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: n.title }),
|
|
3608
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
3609
3609
|
/* @__PURE__ */ e(O, { condition: !!((a = n.tooltip) != null && a.label), children: /* @__PURE__ */ e(
|
|
3610
3610
|
me,
|
|
3611
3611
|
{
|
|
@@ -3613,7 +3613,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3613
3613
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
3614
3614
|
...n.tooltip,
|
|
3615
3615
|
children: /* @__PURE__ */ e(
|
|
3616
|
-
|
|
3616
|
+
b,
|
|
3617
3617
|
{
|
|
3618
3618
|
name: "InfoCircle",
|
|
3619
3619
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -3626,13 +3626,13 @@ const Yn = Di(bi), Ct = ({
|
|
|
3626
3626
|
}
|
|
3627
3627
|
) })
|
|
3628
3628
|
] }),
|
|
3629
|
-
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(
|
|
3629
|
+
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description }) })
|
|
3630
3630
|
]
|
|
3631
3631
|
}
|
|
3632
3632
|
)
|
|
3633
3633
|
}
|
|
3634
3634
|
),
|
|
3635
|
-
/* @__PURE__ */
|
|
3635
|
+
/* @__PURE__ */ u(f, { gap: "xs", fullWidth: n.inputProps.fullWidth || !1, children: [
|
|
3636
3636
|
/* @__PURE__ */ e(
|
|
3637
3637
|
gt,
|
|
3638
3638
|
{
|
|
@@ -3643,7 +3643,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3643
3643
|
fullWidth: !0
|
|
3644
3644
|
}
|
|
3645
3645
|
),
|
|
3646
|
-
!l && n.errorMessage && /* @__PURE__ */ e(
|
|
3646
|
+
!l && n.errorMessage && /* @__PURE__ */ e(be, { message: n.errorMessage }),
|
|
3647
3647
|
n.inputProps.extended && n.inputProps.extended
|
|
3648
3648
|
] })
|
|
3649
3649
|
]
|
|
@@ -3657,8 +3657,8 @@ const Yn = Di(bi), Ct = ({
|
|
|
3657
3657
|
...n
|
|
3658
3658
|
}) => {
|
|
3659
3659
|
var a, h, d;
|
|
3660
|
-
const l = n.hideMessageError || !1,
|
|
3661
|
-
return /* @__PURE__ */
|
|
3660
|
+
const l = n.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
3661
|
+
return /* @__PURE__ */ u(
|
|
3662
3662
|
f,
|
|
3663
3663
|
{
|
|
3664
3664
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -3669,28 +3669,28 @@ const Yn = Di(bi), Ct = ({
|
|
|
3669
3669
|
O,
|
|
3670
3670
|
{
|
|
3671
3671
|
condition: !!n.inputProps.required,
|
|
3672
|
-
fallback: /* @__PURE__ */
|
|
3672
|
+
fallback: /* @__PURE__ */ u(
|
|
3673
3673
|
f,
|
|
3674
3674
|
{
|
|
3675
3675
|
direction: "column",
|
|
3676
|
-
customMaxWidth:
|
|
3676
|
+
customMaxWidth: s,
|
|
3677
3677
|
fullWidth: o,
|
|
3678
3678
|
children: [
|
|
3679
|
-
/* @__PURE__ */ e(
|
|
3680
|
-
/* @__PURE__ */ e(
|
|
3679
|
+
/* @__PURE__ */ e(_, { children: n.title }),
|
|
3680
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description })
|
|
3681
3681
|
]
|
|
3682
3682
|
}
|
|
3683
3683
|
),
|
|
3684
|
-
children: /* @__PURE__ */
|
|
3684
|
+
children: /* @__PURE__ */ u(
|
|
3685
3685
|
f,
|
|
3686
3686
|
{
|
|
3687
3687
|
direction: "column",
|
|
3688
|
-
customMaxWidth:
|
|
3688
|
+
customMaxWidth: s,
|
|
3689
3689
|
fullWidth: o,
|
|
3690
3690
|
children: [
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */ e(
|
|
3693
|
-
/* @__PURE__ */ e(
|
|
3691
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
3692
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: n.title }),
|
|
3693
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
3694
3694
|
/* @__PURE__ */ e(O, { condition: !!((a = n.tooltip) != null && a.label), children: /* @__PURE__ */ e(
|
|
3695
3695
|
me,
|
|
3696
3696
|
{
|
|
@@ -3698,7 +3698,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3698
3698
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
3699
3699
|
...n.tooltip,
|
|
3700
3700
|
children: /* @__PURE__ */ e(
|
|
3701
|
-
|
|
3701
|
+
b,
|
|
3702
3702
|
{
|
|
3703
3703
|
name: "InfoCircle",
|
|
3704
3704
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -3711,13 +3711,13 @@ const Yn = Di(bi), Ct = ({
|
|
|
3711
3711
|
}
|
|
3712
3712
|
) })
|
|
3713
3713
|
] }),
|
|
3714
|
-
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(
|
|
3714
|
+
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description }) })
|
|
3715
3715
|
]
|
|
3716
3716
|
}
|
|
3717
3717
|
)
|
|
3718
3718
|
}
|
|
3719
3719
|
),
|
|
3720
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ u(f, { gap: "xs", fullWidth: n.inputProps.fullWidth || !1, children: [
|
|
3721
3721
|
/* @__PURE__ */ e(
|
|
3722
3722
|
f,
|
|
3723
3723
|
{
|
|
@@ -3734,7 +3734,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3734
3734
|
)
|
|
3735
3735
|
}
|
|
3736
3736
|
),
|
|
3737
|
-
!l && n.errorMessage && /* @__PURE__ */ e(
|
|
3737
|
+
!l && n.errorMessage && /* @__PURE__ */ e(be, { message: n.errorMessage }),
|
|
3738
3738
|
n.inputProps.extended && n.inputProps.extended
|
|
3739
3739
|
] })
|
|
3740
3740
|
]
|
|
@@ -3748,10 +3748,10 @@ const Yn = Di(bi), Ct = ({
|
|
|
3748
3748
|
h.preventDefault(), h.stopPropagation(), h.dataTransfer && t.handleOnFileChange(h.dataTransfer.files.item(0));
|
|
3749
3749
|
}, l = (h) => {
|
|
3750
3750
|
h.preventDefault(), i(!0);
|
|
3751
|
-
},
|
|
3751
|
+
}, s = (h) => {
|
|
3752
3752
|
h.preventDefault(), i(!1);
|
|
3753
3753
|
};
|
|
3754
|
-
return /* @__PURE__ */
|
|
3754
|
+
return /* @__PURE__ */ u(
|
|
3755
3755
|
f,
|
|
3756
3756
|
{
|
|
3757
3757
|
width: "width-full",
|
|
@@ -3763,7 +3763,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3763
3763
|
onDragOver: o,
|
|
3764
3764
|
onDrop: n,
|
|
3765
3765
|
onDragEnter: l,
|
|
3766
|
-
onDragLeave:
|
|
3766
|
+
onDragLeave: s,
|
|
3767
3767
|
paddingBlock: "md",
|
|
3768
3768
|
borderRadius: "rounded-md",
|
|
3769
3769
|
style: {
|
|
@@ -3771,7 +3771,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3771
3771
|
},
|
|
3772
3772
|
children: [
|
|
3773
3773
|
/* @__PURE__ */ e(
|
|
3774
|
-
|
|
3774
|
+
b,
|
|
3775
3775
|
{
|
|
3776
3776
|
name: "Upload",
|
|
3777
3777
|
size: "lg",
|
|
@@ -3781,10 +3781,10 @@ const Yn = Di(bi), Ct = ({
|
|
|
3781
3781
|
}
|
|
3782
3782
|
}
|
|
3783
3783
|
),
|
|
3784
|
-
/* @__PURE__ */
|
|
3785
|
-
/* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ u($, { direction: "column", gap: "xs", children: [
|
|
3785
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", children: [
|
|
3786
3786
|
/* @__PURE__ */ e(
|
|
3787
|
-
|
|
3787
|
+
v,
|
|
3788
3788
|
{
|
|
3789
3789
|
fontWeight: "medium",
|
|
3790
3790
|
color: "gray-500",
|
|
@@ -3794,7 +3794,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3794
3794
|
}
|
|
3795
3795
|
),
|
|
3796
3796
|
/* @__PURE__ */ e(
|
|
3797
|
-
|
|
3797
|
+
v,
|
|
3798
3798
|
{
|
|
3799
3799
|
fontWeight: "medium",
|
|
3800
3800
|
style: { textWrap: "nowrap" },
|
|
@@ -3803,7 +3803,7 @@ const Yn = Di(bi), Ct = ({
|
|
|
3803
3803
|
}
|
|
3804
3804
|
)
|
|
3805
3805
|
] }),
|
|
3806
|
-
/* @__PURE__ */ e(
|
|
3806
|
+
/* @__PURE__ */ e(v, { fontSize: "sm", color: "gray-500", children: (a = t.fileSupports) == null ? void 0 : a.map((h) => h.toLocaleUpperCase()).join(", ") })
|
|
3807
3807
|
] })
|
|
3808
3808
|
]
|
|
3809
3809
|
}
|
|
@@ -3975,13 +3975,13 @@ function Ai(t) {
|
|
|
3975
3975
|
throw new Error("Invalid size format");
|
|
3976
3976
|
return n >= 1e6 ? `${(n / 1e6).toFixed(2)}MB` : n >= 1e3 ? `${(n / 1e3).toFixed(2)}KB` : `${n}B`;
|
|
3977
3977
|
}
|
|
3978
|
-
function
|
|
3978
|
+
function Ii(t) {
|
|
3979
3979
|
const r = t.split("/");
|
|
3980
3980
|
return r[r.length - 1];
|
|
3981
3981
|
}
|
|
3982
|
-
const
|
|
3982
|
+
const Hi = (t) => {
|
|
3983
3983
|
var r, i;
|
|
3984
|
-
return /* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ u(
|
|
3985
3985
|
f,
|
|
3986
3986
|
{
|
|
3987
3987
|
width: "width-full",
|
|
@@ -4000,46 +4000,46 @@ const zi = (t) => {
|
|
|
4000
4000
|
cursor: "pointer"
|
|
4001
4001
|
},
|
|
4002
4002
|
children: [
|
|
4003
|
-
/* @__PURE__ */
|
|
4003
|
+
/* @__PURE__ */ u($, { direction: "row", align: "center", gap: "sm", children: [
|
|
4004
4004
|
/* @__PURE__ */ e(
|
|
4005
|
-
|
|
4005
|
+
b,
|
|
4006
4006
|
{
|
|
4007
4007
|
name: "DocumentFilled",
|
|
4008
4008
|
size: "lg",
|
|
4009
4009
|
style: {
|
|
4010
4010
|
color: "var(--sa-icon-brand)",
|
|
4011
4011
|
width: 30,
|
|
4012
|
-
height: 30
|
|
4013
|
-
flexShrink: 0
|
|
4012
|
+
height: 30
|
|
4014
4013
|
}
|
|
4015
4014
|
}
|
|
4016
4015
|
),
|
|
4017
|
-
/* @__PURE__ */
|
|
4016
|
+
/* @__PURE__ */ u($, { direction: "column", children: [
|
|
4018
4017
|
/* @__PURE__ */ e(
|
|
4019
|
-
|
|
4018
|
+
v,
|
|
4020
4019
|
{
|
|
4021
4020
|
fontWeight: "bold",
|
|
4022
4021
|
style: {
|
|
4022
|
+
maxWidth: "200px",
|
|
4023
4023
|
textOverflow: "ellipsis",
|
|
4024
4024
|
whiteSpace: "nowrap",
|
|
4025
4025
|
overflow: "hidden"
|
|
4026
4026
|
},
|
|
4027
|
-
children: t.defaultFile ?
|
|
4027
|
+
children: t.defaultFile ? Ii(t.defaultFile.url) : (r = t.fileSelected) == null ? void 0 : r.name
|
|
4028
4028
|
}
|
|
4029
4029
|
),
|
|
4030
|
-
t.defaultFile ? (t.defaultFile.size || t.defaultFile.date) && /* @__PURE__ */
|
|
4031
|
-
t.defaultFile.size && /* @__PURE__ */ e(
|
|
4032
|
-
t.defaultFile.size && t.defaultFile.date && /* @__PURE__ */ e(
|
|
4033
|
-
t.defaultFile.date && /* @__PURE__ */ e(
|
|
4034
|
-
] }) : /* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */ e(
|
|
4036
|
-
/* @__PURE__ */ e(
|
|
4037
|
-
/* @__PURE__ */ e(
|
|
4030
|
+
t.defaultFile ? (t.defaultFile.size || t.defaultFile.date) && /* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4031
|
+
t.defaultFile.size && /* @__PURE__ */ e(v, { fontSize: "sm", fontWeight: "medium", children: t.defaultFile.size }),
|
|
4032
|
+
t.defaultFile.size && t.defaultFile.date && /* @__PURE__ */ e(b, { name: "Dot", size: "xs" }),
|
|
4033
|
+
t.defaultFile.date && /* @__PURE__ */ e(v, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: t.defaultFile.date })
|
|
4034
|
+
] }) : /* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4035
|
+
/* @__PURE__ */ e(v, { fontSize: "sm", fontWeight: "medium", children: Ai(((i = t.fileSelected) == null ? void 0 : i.size.toString()) || "100000") }),
|
|
4036
|
+
/* @__PURE__ */ e(b, { name: "Dot", size: "xs" }),
|
|
4037
|
+
/* @__PURE__ */ e(v, { fontSize: "sm", fontWeight: "medium", style: { textWrap: "nowrap" }, children: Ei(/* @__PURE__ */ new Date()) })
|
|
4038
4038
|
] })
|
|
4039
4039
|
] })
|
|
4040
4040
|
] }),
|
|
4041
4041
|
/* @__PURE__ */ e(
|
|
4042
|
-
|
|
4042
|
+
T,
|
|
4043
4043
|
{
|
|
4044
4044
|
size: "xs",
|
|
4045
4045
|
variant: "tertiary",
|
|
@@ -4048,106 +4048,72 @@ const zi = (t) => {
|
|
|
4048
4048
|
onClick: (o) => {
|
|
4049
4049
|
o.stopPropagation(), t.handleOnDeleteFile();
|
|
4050
4050
|
},
|
|
4051
|
-
iconLeft: /* @__PURE__ */ e(
|
|
4051
|
+
iconLeft: /* @__PURE__ */ e(b, { name: "Trash1" })
|
|
4052
4052
|
}
|
|
4053
4053
|
)
|
|
4054
4054
|
]
|
|
4055
4055
|
}
|
|
4056
4056
|
);
|
|
4057
|
-
},
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
var y;
|
|
4063
|
-
const o = ie(null), n = () => {
|
|
4064
|
-
if (i.defaultFile) {
|
|
4065
|
-
window.open(i.defaultFile.url);
|
|
4057
|
+
}, zi = ({ status: t = "default", ...r }) => {
|
|
4058
|
+
var l;
|
|
4059
|
+
const i = ie(null), o = () => {
|
|
4060
|
+
if (r.defaultFile) {
|
|
4061
|
+
window.open(r.defaultFile.url);
|
|
4066
4062
|
return;
|
|
4067
4063
|
}
|
|
4068
|
-
|
|
4069
|
-
},
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
}
|
|
4122
|
-
),
|
|
4123
|
-
!i.fileSelected && !i.defaultFile && /* @__PURE__ */ e(
|
|
4124
|
-
Fi,
|
|
4125
|
-
{
|
|
4126
|
-
fileSupports: i.fileSupportOption,
|
|
4127
|
-
isDesktop: l,
|
|
4128
|
-
errorMessage: u ? i.errorText || i.errorMessage || " " : void 0,
|
|
4129
|
-
status: u ? "error" : "default",
|
|
4130
|
-
handleOnClick: n,
|
|
4131
|
-
handleOnFileChange: i.handleOnChangeFile
|
|
4132
|
-
}
|
|
4133
|
-
)
|
|
4134
|
-
]
|
|
4135
|
-
}
|
|
4136
|
-
);
|
|
4137
|
-
return r === "outside-left" ? /* @__PURE__ */ s(_, { direction: "row", align: "flex-start", gap: "sm", fullWidth: !0, children: [
|
|
4138
|
-
/* @__PURE__ */ s(_, { direction: "column", gap: "xs", style: { width: "40%", minWidth: "120px", paddingTop: "10px" }, children: [
|
|
4139
|
-
a,
|
|
4140
|
-
h
|
|
4141
|
-
] }),
|
|
4142
|
-
/* @__PURE__ */ s(_, { direction: "column", gap: "sm", style: { flex: 1, minWidth: 0 }, children: [
|
|
4143
|
-
m,
|
|
4144
|
-
d
|
|
4145
|
-
] })
|
|
4146
|
-
] }) : /* @__PURE__ */ s(_, { direction: "column", gap: "sm", fullWidth: !0, children: [
|
|
4147
|
-
a,
|
|
4148
|
-
h,
|
|
4149
|
-
m,
|
|
4150
|
-
d
|
|
4064
|
+
i.current && i.current.click();
|
|
4065
|
+
}, n = ne("md");
|
|
4066
|
+
return /* @__PURE__ */ u(U, { children: [
|
|
4067
|
+
/* @__PURE__ */ e(
|
|
4068
|
+
"input",
|
|
4069
|
+
{
|
|
4070
|
+
type: "file",
|
|
4071
|
+
style: { display: "none" },
|
|
4072
|
+
ref: i,
|
|
4073
|
+
onChange: (s) => {
|
|
4074
|
+
var a;
|
|
4075
|
+
return r.handleOnChangeFile(((a = s.target.files) == null ? void 0 : a.item(0)) || null);
|
|
4076
|
+
},
|
|
4077
|
+
accept: (l = r.fileSupportOption) == null ? void 0 : l.map((s) => "." + (s == null ? void 0 : s.toLowerCase())).join(", ")
|
|
4078
|
+
}
|
|
4079
|
+
),
|
|
4080
|
+
/* @__PURE__ */ u(
|
|
4081
|
+
f,
|
|
4082
|
+
{
|
|
4083
|
+
fullWidth: !0,
|
|
4084
|
+
style: { minHeight: "69px" },
|
|
4085
|
+
borderRadius: "rounded-md",
|
|
4086
|
+
display: "flex",
|
|
4087
|
+
justify: "center",
|
|
4088
|
+
align: "center",
|
|
4089
|
+
cursor: "pointer",
|
|
4090
|
+
gap: "md",
|
|
4091
|
+
...r.containerProps,
|
|
4092
|
+
children: [
|
|
4093
|
+
(r.fileSelected || r.defaultFile) && /* @__PURE__ */ e(
|
|
4094
|
+
Hi,
|
|
4095
|
+
{
|
|
4096
|
+
fileSelected: r.fileSelected,
|
|
4097
|
+
defaultFile: r.defaultFile,
|
|
4098
|
+
handleOnDeleteFile: r.handleOnDeleteFile,
|
|
4099
|
+
handleOnClickFile: o
|
|
4100
|
+
}
|
|
4101
|
+
),
|
|
4102
|
+
!r.fileSelected && !r.defaultFile && /* @__PURE__ */ e(
|
|
4103
|
+
Fi,
|
|
4104
|
+
{
|
|
4105
|
+
fileSupports: r.fileSupportOption,
|
|
4106
|
+
isDesktop: n,
|
|
4107
|
+
errorMessage: r.errorMessage,
|
|
4108
|
+
status: t,
|
|
4109
|
+
handleOnClick: o,
|
|
4110
|
+
handleOnFileChange: r.handleOnChangeFile
|
|
4111
|
+
}
|
|
4112
|
+
)
|
|
4113
|
+
]
|
|
4114
|
+
}
|
|
4115
|
+
),
|
|
4116
|
+
typeof r.errorMessage == "string" && r.errorMessage && /* @__PURE__ */ e(v, { color: "error", fontSize: "xs", children: r.errorMessage })
|
|
4151
4117
|
] });
|
|
4152
4118
|
}, Ri = ({
|
|
4153
4119
|
size: t = "md",
|
|
@@ -4157,8 +4123,8 @@ const zi = (t) => {
|
|
|
4157
4123
|
...n
|
|
4158
4124
|
}) => {
|
|
4159
4125
|
var a, h, d;
|
|
4160
|
-
const l = n.hideMessageError || !1,
|
|
4161
|
-
return /* @__PURE__ */
|
|
4126
|
+
const l = n.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
4127
|
+
return /* @__PURE__ */ u(
|
|
4162
4128
|
f,
|
|
4163
4129
|
{
|
|
4164
4130
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -4169,28 +4135,28 @@ const zi = (t) => {
|
|
|
4169
4135
|
O,
|
|
4170
4136
|
{
|
|
4171
4137
|
condition: !!n.inputProps.required,
|
|
4172
|
-
fallback: /* @__PURE__ */
|
|
4138
|
+
fallback: /* @__PURE__ */ u(
|
|
4173
4139
|
f,
|
|
4174
4140
|
{
|
|
4175
4141
|
direction: "column",
|
|
4176
|
-
customMaxWidth:
|
|
4142
|
+
customMaxWidth: s,
|
|
4177
4143
|
fullWidth: o,
|
|
4178
4144
|
children: [
|
|
4179
|
-
/* @__PURE__ */ e(
|
|
4180
|
-
/* @__PURE__ */ e(
|
|
4145
|
+
/* @__PURE__ */ e(_, { children: n.title }),
|
|
4146
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description })
|
|
4181
4147
|
]
|
|
4182
4148
|
}
|
|
4183
4149
|
),
|
|
4184
|
-
children: /* @__PURE__ */
|
|
4150
|
+
children: /* @__PURE__ */ u(
|
|
4185
4151
|
f,
|
|
4186
4152
|
{
|
|
4187
4153
|
direction: "column",
|
|
4188
|
-
customMaxWidth:
|
|
4154
|
+
customMaxWidth: s,
|
|
4189
4155
|
fullWidth: o,
|
|
4190
4156
|
children: [
|
|
4191
|
-
/* @__PURE__ */
|
|
4192
|
-
/* @__PURE__ */ e(
|
|
4193
|
-
/* @__PURE__ */ e(
|
|
4157
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4158
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: n.title }),
|
|
4159
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
4194
4160
|
/* @__PURE__ */ e(O, { condition: !!((a = n.tooltip) != null && a.label), children: /* @__PURE__ */ e(
|
|
4195
4161
|
me,
|
|
4196
4162
|
{
|
|
@@ -4198,7 +4164,7 @@ const zi = (t) => {
|
|
|
4198
4164
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
4199
4165
|
...n.tooltip,
|
|
4200
4166
|
children: /* @__PURE__ */ e(
|
|
4201
|
-
|
|
4167
|
+
b,
|
|
4202
4168
|
{
|
|
4203
4169
|
name: "InfoCircle",
|
|
4204
4170
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -4211,21 +4177,21 @@ const zi = (t) => {
|
|
|
4211
4177
|
}
|
|
4212
4178
|
) })
|
|
4213
4179
|
] }),
|
|
4214
|
-
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(
|
|
4180
|
+
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description }) })
|
|
4215
4181
|
]
|
|
4216
4182
|
}
|
|
4217
4183
|
)
|
|
4218
4184
|
}
|
|
4219
4185
|
),
|
|
4220
|
-
/* @__PURE__ */
|
|
4186
|
+
/* @__PURE__ */ u($, { direction: "column", gap: "xs", children: [
|
|
4221
4187
|
/* @__PURE__ */ e(
|
|
4222
|
-
|
|
4188
|
+
zi,
|
|
4223
4189
|
{
|
|
4224
4190
|
...n.inputProps,
|
|
4225
4191
|
status: n.errorMessage ? "error" : "default"
|
|
4226
4192
|
}
|
|
4227
4193
|
),
|
|
4228
|
-
!l && n.errorMessage && /* @__PURE__ */ e(
|
|
4194
|
+
!l && n.errorMessage && /* @__PURE__ */ e(be, { message: n.errorMessage })
|
|
4229
4195
|
] })
|
|
4230
4196
|
]
|
|
4231
4197
|
}
|
|
@@ -4239,8 +4205,8 @@ const zi = (t) => {
|
|
|
4239
4205
|
...l
|
|
4240
4206
|
}) => {
|
|
4241
4207
|
var h, d, g, m;
|
|
4242
|
-
const
|
|
4243
|
-
return /* @__PURE__ */
|
|
4208
|
+
const s = l.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
4209
|
+
return /* @__PURE__ */ u(
|
|
4244
4210
|
f,
|
|
4245
4211
|
{
|
|
4246
4212
|
gap: r === "horizontal" || r === "horizontal-inline" ? "spacing-96" : "sm",
|
|
@@ -4251,28 +4217,28 @@ const zi = (t) => {
|
|
|
4251
4217
|
O,
|
|
4252
4218
|
{
|
|
4253
4219
|
condition: !!n,
|
|
4254
|
-
fallback: /* @__PURE__ */
|
|
4220
|
+
fallback: /* @__PURE__ */ u(
|
|
4255
4221
|
f,
|
|
4256
4222
|
{
|
|
4257
4223
|
direction: "column",
|
|
4258
4224
|
customMaxWidth: a,
|
|
4259
4225
|
fullWidth: o,
|
|
4260
4226
|
children: [
|
|
4261
|
-
/* @__PURE__ */ e(
|
|
4227
|
+
/* @__PURE__ */ e(_, { children: l.title }),
|
|
4262
4228
|
/* @__PURE__ */ e(pe.Body3, { props: { color: "gray-500" }, children: l.description })
|
|
4263
4229
|
]
|
|
4264
4230
|
}
|
|
4265
4231
|
),
|
|
4266
|
-
children: /* @__PURE__ */
|
|
4232
|
+
children: /* @__PURE__ */ u(
|
|
4267
4233
|
f,
|
|
4268
4234
|
{
|
|
4269
4235
|
direction: "column",
|
|
4270
4236
|
customMaxWidth: a,
|
|
4271
4237
|
fullWidth: o,
|
|
4272
4238
|
children: [
|
|
4273
|
-
/* @__PURE__ */
|
|
4274
|
-
/* @__PURE__ */ e(
|
|
4275
|
-
/* @__PURE__ */ e(
|
|
4239
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4240
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: l.title }),
|
|
4241
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
4276
4242
|
/* @__PURE__ */ e(O, { condition: !!((h = l.tooltip) != null && h.label), children: /* @__PURE__ */ e(
|
|
4277
4243
|
me,
|
|
4278
4244
|
{
|
|
@@ -4280,7 +4246,7 @@ const zi = (t) => {
|
|
|
4280
4246
|
arrowPosition: (g = l.tooltip) == null ? void 0 : g.arrowPosition,
|
|
4281
4247
|
...l.tooltip,
|
|
4282
4248
|
children: /* @__PURE__ */ e(
|
|
4283
|
-
|
|
4249
|
+
b,
|
|
4284
4250
|
{
|
|
4285
4251
|
name: "InfoCircle",
|
|
4286
4252
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -4293,7 +4259,7 @@ const zi = (t) => {
|
|
|
4293
4259
|
}
|
|
4294
4260
|
) })
|
|
4295
4261
|
] }),
|
|
4296
|
-
/* @__PURE__ */ e(O, { condition: !!l.description, children: /* @__PURE__ */ e(
|
|
4262
|
+
/* @__PURE__ */ e(O, { condition: !!l.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: l.description }) })
|
|
4297
4263
|
]
|
|
4298
4264
|
}
|
|
4299
4265
|
)
|
|
@@ -4312,7 +4278,7 @@ const zi = (t) => {
|
|
|
4312
4278
|
...y,
|
|
4313
4279
|
isChecked: l.checkBoxesAreChecked.includes(y.id)
|
|
4314
4280
|
})),
|
|
4315
|
-
render: (y) => y.renderBadge ? /* @__PURE__ */
|
|
4281
|
+
render: (y) => y.renderBadge ? /* @__PURE__ */ u(
|
|
4316
4282
|
f,
|
|
4317
4283
|
{
|
|
4318
4284
|
direction: "row",
|
|
@@ -4326,7 +4292,7 @@ const zi = (t) => {
|
|
|
4326
4292
|
name: y.name,
|
|
4327
4293
|
value: y.id,
|
|
4328
4294
|
checked: y.isChecked,
|
|
4329
|
-
onChange: (
|
|
4295
|
+
onChange: (D) => l.onChecked(D.target.value, y),
|
|
4330
4296
|
label: y.name,
|
|
4331
4297
|
description: y.description
|
|
4332
4298
|
}
|
|
@@ -4340,7 +4306,7 @@ const zi = (t) => {
|
|
|
4340
4306
|
name: y.name,
|
|
4341
4307
|
value: y.id,
|
|
4342
4308
|
checked: y.isChecked,
|
|
4343
|
-
onChange: (
|
|
4309
|
+
onChange: (D) => l.onChecked(D.target.value, y),
|
|
4344
4310
|
label: y.name,
|
|
4345
4311
|
description: y.description
|
|
4346
4312
|
}
|
|
@@ -4349,11 +4315,11 @@ const zi = (t) => {
|
|
|
4349
4315
|
)
|
|
4350
4316
|
}
|
|
4351
4317
|
),
|
|
4352
|
-
!
|
|
4318
|
+
!s && l.errorMessage && /* @__PURE__ */ e(be, { message: l.errorMessage })
|
|
4353
4319
|
]
|
|
4354
4320
|
}
|
|
4355
4321
|
);
|
|
4356
|
-
},
|
|
4322
|
+
}, Ni = ({
|
|
4357
4323
|
position: t = "vertical",
|
|
4358
4324
|
size: r = "md",
|
|
4359
4325
|
fullWidth: i = !1,
|
|
@@ -4361,21 +4327,21 @@ const zi = (t) => {
|
|
|
4361
4327
|
}) => {
|
|
4362
4328
|
var l;
|
|
4363
4329
|
const n = t === "horizontal-inline" || t === "horizontal-block" ? r === "sm" ? 342 : r === "lg" ? 400 : 342 : void 0;
|
|
4364
|
-
return /* @__PURE__ */
|
|
4330
|
+
return /* @__PURE__ */ u(
|
|
4365
4331
|
f,
|
|
4366
4332
|
{
|
|
4367
4333
|
gap: t === "horizontal-inline" || t === "horizontal-block" ? "spacing-96" : "sm",
|
|
4368
4334
|
direction: t === "horizontal-inline" || t === "horizontal-block" ? "row" : "column",
|
|
4369
4335
|
children: [
|
|
4370
|
-
/* @__PURE__ */ e(O, { condition: !!o.description || !!o.title, children: /* @__PURE__ */
|
|
4336
|
+
/* @__PURE__ */ e(O, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ u(
|
|
4371
4337
|
f,
|
|
4372
4338
|
{
|
|
4373
4339
|
direction: "column",
|
|
4374
4340
|
customMaxWidth: n,
|
|
4375
4341
|
fullWidth: i,
|
|
4376
4342
|
children: [
|
|
4377
|
-
o.title && /* @__PURE__ */ e(
|
|
4378
|
-
/* @__PURE__ */ e(O, { condition: !!o.description, children: /* @__PURE__ */ e(
|
|
4343
|
+
o.title && /* @__PURE__ */ e(_, { children: o.title }),
|
|
4344
|
+
/* @__PURE__ */ e(O, { condition: !!o.description, children: /* @__PURE__ */ e(v, { color: "gray-500", children: o.description }) })
|
|
4379
4345
|
]
|
|
4380
4346
|
}
|
|
4381
4347
|
) }),
|
|
@@ -4389,18 +4355,18 @@ const zi = (t) => {
|
|
|
4389
4355
|
children: /* @__PURE__ */ e(
|
|
4390
4356
|
Ct,
|
|
4391
4357
|
{
|
|
4392
|
-
of: (l = o.radioList) == null ? void 0 : l.map((
|
|
4393
|
-
...
|
|
4394
|
-
isChecked: o.radioIsChecked ===
|
|
4358
|
+
of: (l = o.radioList) == null ? void 0 : l.map((s) => ({
|
|
4359
|
+
...s,
|
|
4360
|
+
isChecked: o.radioIsChecked === s.id
|
|
4395
4361
|
})),
|
|
4396
|
-
render: ({ value:
|
|
4362
|
+
render: ({ value: s, id: a, isChecked: h, subInput: d, label: g, description: m }) => /* @__PURE__ */ u(f, { gap: "xs", customMaxWidth: n, children: [
|
|
4397
4363
|
/* @__PURE__ */ e(
|
|
4398
4364
|
mr,
|
|
4399
4365
|
{
|
|
4400
|
-
id: `${a.toString()}-${
|
|
4366
|
+
id: `${a.toString()}-${s}`,
|
|
4401
4367
|
name: o.groupName || g,
|
|
4402
4368
|
label: g,
|
|
4403
|
-
value:
|
|
4369
|
+
value: s,
|
|
4404
4370
|
checked: h,
|
|
4405
4371
|
onChange: (y) => o.onChecked({
|
|
4406
4372
|
id: a,
|
|
@@ -4412,7 +4378,7 @@ const zi = (t) => {
|
|
|
4412
4378
|
a
|
|
4413
4379
|
),
|
|
4414
4380
|
m && /* @__PURE__ */ e(
|
|
4415
|
-
|
|
4381
|
+
v,
|
|
4416
4382
|
{
|
|
4417
4383
|
color: "gray-500",
|
|
4418
4384
|
style: {
|
|
@@ -4427,11 +4393,11 @@ const zi = (t) => {
|
|
|
4427
4393
|
)
|
|
4428
4394
|
}
|
|
4429
4395
|
),
|
|
4430
|
-
o.errorMessage && /* @__PURE__ */ e(
|
|
4396
|
+
o.errorMessage && /* @__PURE__ */ e(be, { message: o.errorMessage })
|
|
4431
4397
|
]
|
|
4432
4398
|
}
|
|
4433
4399
|
);
|
|
4434
|
-
},
|
|
4400
|
+
}, Ti = ({
|
|
4435
4401
|
size: t = "md",
|
|
4436
4402
|
direction: r = "vertical",
|
|
4437
4403
|
requiredTitle: i = "(Required)",
|
|
@@ -4439,8 +4405,8 @@ const zi = (t) => {
|
|
|
4439
4405
|
...n
|
|
4440
4406
|
}) => {
|
|
4441
4407
|
var a, h, d;
|
|
4442
|
-
const l = n.hideMessageError || !1,
|
|
4443
|
-
return /* @__PURE__ */
|
|
4408
|
+
const l = n.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
4409
|
+
return /* @__PURE__ */ u(
|
|
4444
4410
|
f,
|
|
4445
4411
|
{
|
|
4446
4412
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -4451,28 +4417,28 @@ const zi = (t) => {
|
|
|
4451
4417
|
O,
|
|
4452
4418
|
{
|
|
4453
4419
|
condition: !!n.inputProps.required,
|
|
4454
|
-
fallback: /* @__PURE__ */
|
|
4420
|
+
fallback: /* @__PURE__ */ u(
|
|
4455
4421
|
f,
|
|
4456
4422
|
{
|
|
4457
4423
|
direction: "column",
|
|
4458
|
-
customMaxWidth:
|
|
4424
|
+
customMaxWidth: s,
|
|
4459
4425
|
fullWidth: o,
|
|
4460
4426
|
children: [
|
|
4461
|
-
/* @__PURE__ */ e(
|
|
4462
|
-
/* @__PURE__ */ e(
|
|
4427
|
+
/* @__PURE__ */ e(_, { children: n.title }),
|
|
4428
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description })
|
|
4463
4429
|
]
|
|
4464
4430
|
}
|
|
4465
4431
|
),
|
|
4466
|
-
children: /* @__PURE__ */
|
|
4432
|
+
children: /* @__PURE__ */ u(
|
|
4467
4433
|
f,
|
|
4468
4434
|
{
|
|
4469
4435
|
direction: "column",
|
|
4470
|
-
customMaxWidth:
|
|
4436
|
+
customMaxWidth: s,
|
|
4471
4437
|
fullWidth: o,
|
|
4472
4438
|
children: [
|
|
4473
|
-
/* @__PURE__ */
|
|
4474
|
-
/* @__PURE__ */ e(
|
|
4475
|
-
/* @__PURE__ */ e(
|
|
4439
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4440
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: n.title }),
|
|
4441
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
4476
4442
|
/* @__PURE__ */ e(O, { condition: !!((a = n.tooltip) != null && a.label), children: /* @__PURE__ */ e(
|
|
4477
4443
|
me,
|
|
4478
4444
|
{
|
|
@@ -4480,7 +4446,7 @@ const zi = (t) => {
|
|
|
4480
4446
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
4481
4447
|
...n.tooltip,
|
|
4482
4448
|
children: /* @__PURE__ */ e(
|
|
4483
|
-
|
|
4449
|
+
b,
|
|
4484
4450
|
{
|
|
4485
4451
|
name: "InfoCircle",
|
|
4486
4452
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -4493,13 +4459,13 @@ const zi = (t) => {
|
|
|
4493
4459
|
}
|
|
4494
4460
|
) })
|
|
4495
4461
|
] }),
|
|
4496
|
-
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(
|
|
4462
|
+
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description }) })
|
|
4497
4463
|
]
|
|
4498
4464
|
}
|
|
4499
4465
|
)
|
|
4500
4466
|
}
|
|
4501
4467
|
),
|
|
4502
|
-
/* @__PURE__ */
|
|
4468
|
+
/* @__PURE__ */ u($, { direction: "column", gap: "xs", children: [
|
|
4503
4469
|
/* @__PURE__ */ e(
|
|
4504
4470
|
hr,
|
|
4505
4471
|
{
|
|
@@ -4509,7 +4475,7 @@ const zi = (t) => {
|
|
|
4509
4475
|
status: n.errorMessage ? "error" : "default"
|
|
4510
4476
|
}
|
|
4511
4477
|
),
|
|
4512
|
-
!l && n.errorMessage && /* @__PURE__ */ e(
|
|
4478
|
+
!l && n.errorMessage && /* @__PURE__ */ e(be, { message: n.errorMessage })
|
|
4513
4479
|
] })
|
|
4514
4480
|
]
|
|
4515
4481
|
}
|
|
@@ -4523,8 +4489,8 @@ const zi = (t) => {
|
|
|
4523
4489
|
...l
|
|
4524
4490
|
}) => {
|
|
4525
4491
|
var a, h, d;
|
|
4526
|
-
const
|
|
4527
|
-
return /* @__PURE__ */
|
|
4492
|
+
const s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
4493
|
+
return /* @__PURE__ */ u(
|
|
4528
4494
|
f,
|
|
4529
4495
|
{
|
|
4530
4496
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -4535,28 +4501,28 @@ const zi = (t) => {
|
|
|
4535
4501
|
O,
|
|
4536
4502
|
{
|
|
4537
4503
|
condition: o,
|
|
4538
|
-
fallback: /* @__PURE__ */
|
|
4504
|
+
fallback: /* @__PURE__ */ u(
|
|
4539
4505
|
f,
|
|
4540
4506
|
{
|
|
4541
4507
|
direction: "column",
|
|
4542
|
-
customMaxWidth:
|
|
4508
|
+
customMaxWidth: s,
|
|
4543
4509
|
fullWidth: n,
|
|
4544
4510
|
children: [
|
|
4545
|
-
/* @__PURE__ */ e(
|
|
4546
|
-
/* @__PURE__ */ e(
|
|
4511
|
+
/* @__PURE__ */ e(_, { children: l.title }),
|
|
4512
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: l.titleDescription })
|
|
4547
4513
|
]
|
|
4548
4514
|
}
|
|
4549
4515
|
),
|
|
4550
|
-
children: /* @__PURE__ */
|
|
4516
|
+
children: /* @__PURE__ */ u(
|
|
4551
4517
|
f,
|
|
4552
4518
|
{
|
|
4553
4519
|
direction: "column",
|
|
4554
|
-
customMaxWidth:
|
|
4520
|
+
customMaxWidth: s,
|
|
4555
4521
|
fullWidth: n,
|
|
4556
4522
|
children: [
|
|
4557
|
-
/* @__PURE__ */
|
|
4558
|
-
/* @__PURE__ */ e(
|
|
4559
|
-
/* @__PURE__ */ e(
|
|
4523
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4524
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: l.title }),
|
|
4525
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
4560
4526
|
/* @__PURE__ */ e(O, { condition: !!((a = l.tooltip) != null && a.label), children: /* @__PURE__ */ e(
|
|
4561
4527
|
me,
|
|
4562
4528
|
{
|
|
@@ -4564,7 +4530,7 @@ const zi = (t) => {
|
|
|
4564
4530
|
arrowPosition: (d = l.tooltip) == null ? void 0 : d.arrowPosition,
|
|
4565
4531
|
...l.tooltip,
|
|
4566
4532
|
children: /* @__PURE__ */ e(
|
|
4567
|
-
|
|
4533
|
+
b,
|
|
4568
4534
|
{
|
|
4569
4535
|
name: "InfoCircle",
|
|
4570
4536
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -4577,14 +4543,14 @@ const zi = (t) => {
|
|
|
4577
4543
|
}
|
|
4578
4544
|
) })
|
|
4579
4545
|
] }),
|
|
4580
|
-
/* @__PURE__ */ e(O, { condition: !!l.titleDescription, children: /* @__PURE__ */ e(
|
|
4546
|
+
/* @__PURE__ */ e(O, { condition: !!l.titleDescription, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: l.titleDescription }) })
|
|
4581
4547
|
]
|
|
4582
4548
|
}
|
|
4583
4549
|
)
|
|
4584
4550
|
}
|
|
4585
4551
|
),
|
|
4586
4552
|
/* @__PURE__ */ e(
|
|
4587
|
-
|
|
4553
|
+
Ut,
|
|
4588
4554
|
{
|
|
4589
4555
|
checked: l.checked,
|
|
4590
4556
|
onChange: l.onChange,
|
|
@@ -4592,7 +4558,7 @@ const zi = (t) => {
|
|
|
4592
4558
|
description: l.description
|
|
4593
4559
|
}
|
|
4594
4560
|
),
|
|
4595
|
-
l.errorMessage && /* @__PURE__ */ e(
|
|
4561
|
+
l.errorMessage && /* @__PURE__ */ e(be, { message: l.errorMessage })
|
|
4596
4562
|
]
|
|
4597
4563
|
}
|
|
4598
4564
|
);
|
|
@@ -4601,32 +4567,32 @@ const zi = (t) => {
|
|
|
4601
4567
|
size: r = "md",
|
|
4602
4568
|
...i
|
|
4603
4569
|
}) => {
|
|
4604
|
-
const o = gr(), n = (
|
|
4605
|
-
var h, d, g, m, y,
|
|
4606
|
-
if (!
|
|
4607
|
-
const a = i.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (d = (h = o == null ? void 0 : o.computed) == null ? void 0 : h.red) == null ? void 0 : d[600] : t === "secondary-primary" ? (m = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.blue) == null ? void 0 : m[700] : (
|
|
4608
|
-
return /* @__PURE__ */ e(
|
|
4570
|
+
const o = gr(), n = (s) => {
|
|
4571
|
+
var h, d, g, m, y, D;
|
|
4572
|
+
if (!s) return;
|
|
4573
|
+
const a = i.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (d = (h = o == null ? void 0 : o.computed) == null ? void 0 : h.red) == null ? void 0 : d[600] : t === "secondary-primary" ? (m = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.blue) == null ? void 0 : m[700] : (D = (y = o == null ? void 0 : o.computed) == null ? void 0 : y.gray) == null ? void 0 : D[50];
|
|
4574
|
+
return /* @__PURE__ */ e(b, { name: s, size: r, style: { color: a } });
|
|
4609
4575
|
}, l = () => {
|
|
4610
4576
|
var a, h, d, g;
|
|
4611
4577
|
if (t !== "secondary-danger" && t !== "secondary-primary")
|
|
4612
4578
|
return i.title;
|
|
4613
|
-
const
|
|
4579
|
+
const s = {
|
|
4614
4580
|
color: i.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (h = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.red) == null ? void 0 : h[600] : (g = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.blue) == null ? void 0 : g[700]
|
|
4615
4581
|
};
|
|
4616
4582
|
switch (r) {
|
|
4617
4583
|
case "xs":
|
|
4618
|
-
return /* @__PURE__ */ e(pe.Body2, { props: { style:
|
|
4584
|
+
return /* @__PURE__ */ e(pe.Body2, { props: { style: s }, children: i.title });
|
|
4619
4585
|
case "sm":
|
|
4620
4586
|
case "md":
|
|
4621
|
-
return /* @__PURE__ */ e(pe.SubH3, { props: { style:
|
|
4587
|
+
return /* @__PURE__ */ e(pe.SubH3, { props: { style: s }, children: i.title });
|
|
4622
4588
|
case "lg":
|
|
4623
|
-
return /* @__PURE__ */ e(pe.SubH2, { props: { style:
|
|
4589
|
+
return /* @__PURE__ */ e(pe.SubH2, { props: { style: s }, children: i.title });
|
|
4624
4590
|
default:
|
|
4625
4591
|
return i.title;
|
|
4626
4592
|
}
|
|
4627
4593
|
};
|
|
4628
4594
|
return /* @__PURE__ */ e(
|
|
4629
|
-
|
|
4595
|
+
T,
|
|
4630
4596
|
{
|
|
4631
4597
|
fullWidth: !0,
|
|
4632
4598
|
disabled: i.disabled,
|
|
@@ -4657,8 +4623,8 @@ const zi = (t) => {
|
|
|
4657
4623
|
...n
|
|
4658
4624
|
}) => {
|
|
4659
4625
|
var a, h, d;
|
|
4660
|
-
const l = n.hideMessageError || !1,
|
|
4661
|
-
return /* @__PURE__ */
|
|
4626
|
+
const l = n.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
4627
|
+
return /* @__PURE__ */ u(
|
|
4662
4628
|
f,
|
|
4663
4629
|
{
|
|
4664
4630
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -4669,28 +4635,28 @@ const zi = (t) => {
|
|
|
4669
4635
|
O,
|
|
4670
4636
|
{
|
|
4671
4637
|
condition: !!n.inputProps.required,
|
|
4672
|
-
fallback: /* @__PURE__ */
|
|
4638
|
+
fallback: /* @__PURE__ */ u(
|
|
4673
4639
|
f,
|
|
4674
4640
|
{
|
|
4675
4641
|
direction: "column",
|
|
4676
|
-
customMaxWidth:
|
|
4642
|
+
customMaxWidth: s,
|
|
4677
4643
|
fullWidth: o,
|
|
4678
4644
|
children: [
|
|
4679
|
-
/* @__PURE__ */ e(
|
|
4680
|
-
/* @__PURE__ */ e(
|
|
4645
|
+
/* @__PURE__ */ e(_, { children: n.title }),
|
|
4646
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description })
|
|
4681
4647
|
]
|
|
4682
4648
|
}
|
|
4683
4649
|
),
|
|
4684
|
-
children: /* @__PURE__ */
|
|
4650
|
+
children: /* @__PURE__ */ u(
|
|
4685
4651
|
f,
|
|
4686
4652
|
{
|
|
4687
4653
|
direction: "column",
|
|
4688
|
-
customMaxWidth:
|
|
4654
|
+
customMaxWidth: s,
|
|
4689
4655
|
fullWidth: o,
|
|
4690
4656
|
children: [
|
|
4691
|
-
/* @__PURE__ */
|
|
4692
|
-
/* @__PURE__ */ e(
|
|
4693
|
-
/* @__PURE__ */ e(
|
|
4657
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
4658
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: n.title }),
|
|
4659
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
4694
4660
|
/* @__PURE__ */ e(O, { condition: !!((a = n.tooltip) != null && a.label), children: /* @__PURE__ */ e(
|
|
4695
4661
|
me,
|
|
4696
4662
|
{
|
|
@@ -4698,7 +4664,7 @@ const zi = (t) => {
|
|
|
4698
4664
|
arrowPosition: (d = n.tooltip) == null ? void 0 : d.arrowPosition,
|
|
4699
4665
|
...n.tooltip,
|
|
4700
4666
|
children: /* @__PURE__ */ e(
|
|
4701
|
-
|
|
4667
|
+
b,
|
|
4702
4668
|
{
|
|
4703
4669
|
name: "InfoCircle",
|
|
4704
4670
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -4711,13 +4677,13 @@ const zi = (t) => {
|
|
|
4711
4677
|
}
|
|
4712
4678
|
) })
|
|
4713
4679
|
] }),
|
|
4714
|
-
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(
|
|
4680
|
+
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description }) })
|
|
4715
4681
|
]
|
|
4716
4682
|
}
|
|
4717
4683
|
)
|
|
4718
4684
|
}
|
|
4719
4685
|
),
|
|
4720
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ u($, { direction: "column", gap: "xs", children: [
|
|
4721
4687
|
/* @__PURE__ */ e(
|
|
4722
4688
|
f,
|
|
4723
4689
|
{
|
|
@@ -4734,7 +4700,7 @@ const zi = (t) => {
|
|
|
4734
4700
|
)
|
|
4735
4701
|
}
|
|
4736
4702
|
),
|
|
4737
|
-
!l && n.errorMessage && /* @__PURE__ */ e(
|
|
4703
|
+
!l && n.errorMessage && /* @__PURE__ */ e(be, { message: n.errorMessage })
|
|
4738
4704
|
] })
|
|
4739
4705
|
]
|
|
4740
4706
|
}
|
|
@@ -4742,8 +4708,8 @@ const zi = (t) => {
|
|
|
4742
4708
|
};
|
|
4743
4709
|
async function $i(t, r) {
|
|
4744
4710
|
const i = new Image();
|
|
4745
|
-
i.src = t, await new Promise((l,
|
|
4746
|
-
i.onload = l, i.onerror =
|
|
4711
|
+
i.src = t, await new Promise((l, s) => {
|
|
4712
|
+
i.onload = l, i.onerror = s;
|
|
4747
4713
|
});
|
|
4748
4714
|
const o = document.createElement("canvas");
|
|
4749
4715
|
o.width = r.width, o.height = r.height;
|
|
@@ -4759,15 +4725,15 @@ async function $i(t, r) {
|
|
|
4759
4725
|
0,
|
|
4760
4726
|
r.width,
|
|
4761
4727
|
r.height
|
|
4762
|
-
), new Promise((l,
|
|
4728
|
+
), new Promise((l, s) => {
|
|
4763
4729
|
o.toBlob((a) => {
|
|
4764
|
-
if (!a) return
|
|
4730
|
+
if (!a) return s("Canvas is empty");
|
|
4765
4731
|
const h = new File([a], "cropped.png", { type: "image/png" });
|
|
4766
4732
|
l(h);
|
|
4767
4733
|
}, "image/png");
|
|
4768
4734
|
});
|
|
4769
4735
|
}
|
|
4770
|
-
const
|
|
4736
|
+
const Tt = {
|
|
4771
4737
|
"1:1": 1,
|
|
4772
4738
|
"4:3": 4 / 3,
|
|
4773
4739
|
"16:9": 16 / 9,
|
|
@@ -4776,7 +4742,7 @@ const Nt = {
|
|
|
4776
4742
|
"2:3": 2 / 3,
|
|
4777
4743
|
"3:2": 3 / 2,
|
|
4778
4744
|
"32:9": 32 / 9
|
|
4779
|
-
}, Gi =
|
|
4745
|
+
}, Gi = qt(
|
|
4780
4746
|
({
|
|
4781
4747
|
handleUpload: t,
|
|
4782
4748
|
urlImage: r,
|
|
@@ -4784,18 +4750,18 @@ const Nt = {
|
|
|
4784
4750
|
croppedImage: o,
|
|
4785
4751
|
setCroppedImage: n,
|
|
4786
4752
|
size: l = "96",
|
|
4787
|
-
aspect:
|
|
4753
|
+
aspect: s = "1:1",
|
|
4788
4754
|
containerProps: a,
|
|
4789
4755
|
maxFileSize: h = 2,
|
|
4790
4756
|
onError: d
|
|
4791
4757
|
}, g) => {
|
|
4792
|
-
const m = ne("md"), [y,
|
|
4793
|
-
|
|
4758
|
+
const m = ne("md"), [y, D] = k(!1), [E, x] = k(null), [z, j] = k(!1), [N, q] = k({ x: 0, y: 0 }), [M, ae] = k(1), [J, I] = k(null);
|
|
4759
|
+
Z(() => {
|
|
4794
4760
|
r === null && n(null);
|
|
4795
4761
|
}, [r]);
|
|
4796
4762
|
const P = ve(
|
|
4797
4763
|
(R, V) => {
|
|
4798
|
-
|
|
4764
|
+
I(V);
|
|
4799
4765
|
},
|
|
4800
4766
|
[]
|
|
4801
4767
|
), oe = (R) => {
|
|
@@ -4804,19 +4770,19 @@ const Nt = {
|
|
|
4804
4770
|
if (!V) return;
|
|
4805
4771
|
const te = new FileReader();
|
|
4806
4772
|
te.onload = () => {
|
|
4807
|
-
|
|
4773
|
+
x(te.result), j(!0);
|
|
4808
4774
|
}, te.readAsDataURL(V);
|
|
4809
4775
|
}, le = async () => {
|
|
4810
|
-
if (!(!
|
|
4776
|
+
if (!(!E || !J))
|
|
4811
4777
|
try {
|
|
4812
|
-
const R = await $i(
|
|
4778
|
+
const R = await $i(E, J);
|
|
4813
4779
|
if (h && R.size > h * 1024 * 1024) {
|
|
4814
4780
|
d == null || d(`Ukuran file maksimal ${h}MB`);
|
|
4815
4781
|
return;
|
|
4816
4782
|
}
|
|
4817
4783
|
t == null || t(R);
|
|
4818
4784
|
const V = URL.createObjectURL(R);
|
|
4819
|
-
n(V, R),
|
|
4785
|
+
n(V, R), j(!1);
|
|
4820
4786
|
} catch {
|
|
4821
4787
|
d == null || d("Gagal memproses gambar");
|
|
4822
4788
|
}
|
|
@@ -4829,9 +4795,9 @@ const Nt = {
|
|
|
4829
4795
|
(R = G.current) == null || R.click();
|
|
4830
4796
|
}
|
|
4831
4797
|
}));
|
|
4832
|
-
const K = parseInt(l, 10), se =
|
|
4798
|
+
const K = parseInt(l, 10), se = Tt[s];
|
|
4833
4799
|
let ee, X;
|
|
4834
|
-
return se >= 1 ? (X = K, ee = K * se) : (ee = K, X = K / se), /* @__PURE__ */
|
|
4800
|
+
return se >= 1 ? (X = K, ee = K * se) : (ee = K, X = K / se), /* @__PURE__ */ u(
|
|
4835
4801
|
f,
|
|
4836
4802
|
{
|
|
4837
4803
|
display: "flex",
|
|
@@ -4850,8 +4816,8 @@ const Nt = {
|
|
|
4850
4816
|
aspectRatio: se,
|
|
4851
4817
|
flexShrink: 0
|
|
4852
4818
|
},
|
|
4853
|
-
onMouseEnter: () =>
|
|
4854
|
-
onMouseLeave: () =>
|
|
4819
|
+
onMouseEnter: () => D(!0),
|
|
4820
|
+
onMouseLeave: () => D(!1),
|
|
4855
4821
|
children: [
|
|
4856
4822
|
o || r ? /* @__PURE__ */ e(
|
|
4857
4823
|
"img",
|
|
@@ -4873,7 +4839,7 @@ const Nt = {
|
|
|
4873
4839
|
justify: "center",
|
|
4874
4840
|
padding: "spacing-4",
|
|
4875
4841
|
children: /* @__PURE__ */ e(
|
|
4876
|
-
|
|
4842
|
+
b,
|
|
4877
4843
|
{
|
|
4878
4844
|
name: "Image",
|
|
4879
4845
|
style: {
|
|
@@ -4885,7 +4851,7 @@ const Nt = {
|
|
|
4885
4851
|
)
|
|
4886
4852
|
}
|
|
4887
4853
|
),
|
|
4888
|
-
/* @__PURE__ */
|
|
4854
|
+
/* @__PURE__ */ u(
|
|
4889
4855
|
f,
|
|
4890
4856
|
{
|
|
4891
4857
|
position: "absolute",
|
|
@@ -4912,16 +4878,16 @@ const Nt = {
|
|
|
4912
4878
|
style: { display: "none" }
|
|
4913
4879
|
}
|
|
4914
4880
|
),
|
|
4915
|
-
/* @__PURE__ */
|
|
4881
|
+
/* @__PURE__ */ u(f, { display: "flex", align: "center", gap: "spacing-2", direction: "row", children: [
|
|
4916
4882
|
/* @__PURE__ */ e(
|
|
4917
|
-
|
|
4883
|
+
b,
|
|
4918
4884
|
{
|
|
4919
4885
|
name: "Edit3",
|
|
4920
4886
|
style: { color: "var(--sa-background-primary, #ffffff)" }
|
|
4921
4887
|
}
|
|
4922
4888
|
),
|
|
4923
4889
|
/* @__PURE__ */ e(O, { condition: l.toNumber() > 80, children: /* @__PURE__ */ e(
|
|
4924
|
-
|
|
4890
|
+
v,
|
|
4925
4891
|
{
|
|
4926
4892
|
color: "gray-50",
|
|
4927
4893
|
fontSize: l.toNumber() > 80 ? "sm" : "md",
|
|
@@ -4960,7 +4926,7 @@ const Nt = {
|
|
|
4960
4926
|
)
|
|
4961
4927
|
}
|
|
4962
4928
|
),
|
|
4963
|
-
|
|
4929
|
+
z && xr.createPortal(
|
|
4964
4930
|
/* @__PURE__ */ e(
|
|
4965
4931
|
"div",
|
|
4966
4932
|
{
|
|
@@ -4973,8 +4939,8 @@ const Nt = {
|
|
|
4973
4939
|
justifyContent: "center",
|
|
4974
4940
|
backgroundColor: "rgba(0,0,0,0.6)"
|
|
4975
4941
|
},
|
|
4976
|
-
onClick: () =>
|
|
4977
|
-
children: /* @__PURE__ */
|
|
4942
|
+
onClick: () => j(!1),
|
|
4943
|
+
children: /* @__PURE__ */ u(
|
|
4978
4944
|
"div",
|
|
4979
4945
|
{
|
|
4980
4946
|
style: {
|
|
@@ -4982,7 +4948,7 @@ const Nt = {
|
|
|
4982
4948
|
borderRadius: "var(--sa-radii-md)",
|
|
4983
4949
|
boxShadow: "0 20px 60px rgba(0,0,0,0.3)",
|
|
4984
4950
|
overflow: "hidden",
|
|
4985
|
-
width: m ?
|
|
4951
|
+
width: m ? s === "1:1" ? "min(90vw, 480px)" : `min(90vw, ${ee * 2}px)` : "calc(100vw - 2rem)",
|
|
4986
4952
|
display: "flex",
|
|
4987
4953
|
flexDirection: "column"
|
|
4988
4954
|
},
|
|
@@ -4997,14 +4963,14 @@ const Nt = {
|
|
|
4997
4963
|
height: "20rem",
|
|
4998
4964
|
backgroundColor: "var(--sa-color-gray-100)"
|
|
4999
4965
|
},
|
|
5000
|
-
children:
|
|
4966
|
+
children: E && /* @__PURE__ */ e(
|
|
5001
4967
|
Cr,
|
|
5002
4968
|
{
|
|
5003
|
-
image:
|
|
5004
|
-
crop:
|
|
4969
|
+
image: E,
|
|
4970
|
+
crop: N,
|
|
5005
4971
|
zoom: M,
|
|
5006
|
-
aspect:
|
|
5007
|
-
onCropChange:
|
|
4972
|
+
aspect: s ? Tt[s] : void 0,
|
|
4973
|
+
onCropChange: q,
|
|
5008
4974
|
onZoomChange: ae,
|
|
5009
4975
|
onCropComplete: P,
|
|
5010
4976
|
objectFit: "contain",
|
|
@@ -5014,7 +4980,7 @@ const Nt = {
|
|
|
5014
4980
|
)
|
|
5015
4981
|
}
|
|
5016
4982
|
),
|
|
5017
|
-
/* @__PURE__ */
|
|
4983
|
+
/* @__PURE__ */ u(
|
|
5018
4984
|
"div",
|
|
5019
4985
|
{
|
|
5020
4986
|
style: {
|
|
@@ -5025,8 +4991,8 @@ const Nt = {
|
|
|
5025
4991
|
borderTop: "1px solid var(--sa-border-subtle)"
|
|
5026
4992
|
},
|
|
5027
4993
|
children: [
|
|
5028
|
-
/* @__PURE__ */ e(
|
|
5029
|
-
/* @__PURE__ */ e(
|
|
4994
|
+
/* @__PURE__ */ e(T, { size: "sm", secondary: !0, onClick: () => j(!1), children: "Cancel" }),
|
|
4995
|
+
/* @__PURE__ */ e(T, { size: "sm", primary: !0, onClick: le, children: "Crop" })
|
|
5030
4996
|
]
|
|
5031
4997
|
}
|
|
5032
4998
|
)
|
|
@@ -5041,7 +5007,7 @@ const Nt = {
|
|
|
5041
5007
|
}
|
|
5042
5008
|
);
|
|
5043
5009
|
}
|
|
5044
|
-
),
|
|
5010
|
+
), Ui = ({
|
|
5045
5011
|
size: t = "md",
|
|
5046
5012
|
direction: r = "vertical",
|
|
5047
5013
|
requiredTitle: i = "(Required)",
|
|
@@ -5050,8 +5016,8 @@ const Nt = {
|
|
|
5050
5016
|
...l
|
|
5051
5017
|
}) => {
|
|
5052
5018
|
var h, d, g;
|
|
5053
|
-
const
|
|
5054
|
-
return /* @__PURE__ */
|
|
5019
|
+
const s = l.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
5020
|
+
return /* @__PURE__ */ u(
|
|
5055
5021
|
f,
|
|
5056
5022
|
{
|
|
5057
5023
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -5062,28 +5028,28 @@ const Nt = {
|
|
|
5062
5028
|
O,
|
|
5063
5029
|
{
|
|
5064
5030
|
condition: !!n,
|
|
5065
|
-
fallback: /* @__PURE__ */
|
|
5031
|
+
fallback: /* @__PURE__ */ u(
|
|
5066
5032
|
f,
|
|
5067
5033
|
{
|
|
5068
5034
|
direction: "column",
|
|
5069
5035
|
customMaxWidth: a,
|
|
5070
5036
|
fullWidth: o,
|
|
5071
5037
|
children: [
|
|
5072
|
-
/* @__PURE__ */ e(
|
|
5073
|
-
/* @__PURE__ */ e(
|
|
5038
|
+
/* @__PURE__ */ e(_, { children: l.title }),
|
|
5039
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: l.description })
|
|
5074
5040
|
]
|
|
5075
5041
|
}
|
|
5076
5042
|
),
|
|
5077
|
-
children: /* @__PURE__ */
|
|
5043
|
+
children: /* @__PURE__ */ u(
|
|
5078
5044
|
f,
|
|
5079
5045
|
{
|
|
5080
5046
|
direction: "column",
|
|
5081
5047
|
customMaxWidth: a,
|
|
5082
5048
|
fullWidth: o,
|
|
5083
5049
|
children: [
|
|
5084
|
-
/* @__PURE__ */
|
|
5085
|
-
/* @__PURE__ */ e(
|
|
5086
|
-
/* @__PURE__ */ e(
|
|
5050
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
5051
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: l.title }),
|
|
5052
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
5087
5053
|
/* @__PURE__ */ e(O, { condition: !!((h = l.tooltip) != null && h.label), children: /* @__PURE__ */ e(
|
|
5088
5054
|
me,
|
|
5089
5055
|
{
|
|
@@ -5091,7 +5057,7 @@ const Nt = {
|
|
|
5091
5057
|
arrowPosition: (g = l.tooltip) == null ? void 0 : g.arrowPosition,
|
|
5092
5058
|
...l.tooltip,
|
|
5093
5059
|
children: /* @__PURE__ */ e(
|
|
5094
|
-
|
|
5060
|
+
b,
|
|
5095
5061
|
{
|
|
5096
5062
|
name: "InfoCircle",
|
|
5097
5063
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -5104,29 +5070,29 @@ const Nt = {
|
|
|
5104
5070
|
}
|
|
5105
5071
|
) })
|
|
5106
5072
|
] }),
|
|
5107
|
-
/* @__PURE__ */ e(O, { condition: !!l.description, children: /* @__PURE__ */ e(
|
|
5073
|
+
/* @__PURE__ */ e(O, { condition: !!l.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: l.description }) })
|
|
5108
5074
|
]
|
|
5109
5075
|
}
|
|
5110
5076
|
)
|
|
5111
5077
|
}
|
|
5112
5078
|
),
|
|
5113
|
-
/* @__PURE__ */
|
|
5079
|
+
/* @__PURE__ */ u($, { direction: "column", gap: "xs", children: [
|
|
5114
5080
|
/* @__PURE__ */ e(Gi, { ...l.inputProps }),
|
|
5115
|
-
!
|
|
5081
|
+
!s && l.errorMessage && /* @__PURE__ */ e(be, { message: l.errorMessage })
|
|
5116
5082
|
] })
|
|
5117
5083
|
]
|
|
5118
5084
|
}
|
|
5119
5085
|
);
|
|
5120
|
-
},
|
|
5086
|
+
}, qi = ({
|
|
5121
5087
|
size: t = "md",
|
|
5122
5088
|
direction: r = "vertical",
|
|
5123
5089
|
requiredTitle: i = "(Required)",
|
|
5124
5090
|
fullWidth: o = !1,
|
|
5125
5091
|
...n
|
|
5126
5092
|
}) => {
|
|
5127
|
-
var
|
|
5093
|
+
var s, a, h;
|
|
5128
5094
|
const l = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
|
|
5129
|
-
return /* @__PURE__ */
|
|
5095
|
+
return /* @__PURE__ */ u(
|
|
5130
5096
|
f,
|
|
5131
5097
|
{
|
|
5132
5098
|
gap: r === "horizontal" ? "spacing-96" : "sm",
|
|
@@ -5137,36 +5103,36 @@ const Nt = {
|
|
|
5137
5103
|
O,
|
|
5138
5104
|
{
|
|
5139
5105
|
condition: !!n.inputProps.required,
|
|
5140
|
-
fallback: /* @__PURE__ */
|
|
5106
|
+
fallback: /* @__PURE__ */ u(
|
|
5141
5107
|
f,
|
|
5142
5108
|
{
|
|
5143
5109
|
direction: "column",
|
|
5144
5110
|
customMaxWidth: l,
|
|
5145
5111
|
fullWidth: o,
|
|
5146
5112
|
children: [
|
|
5147
|
-
/* @__PURE__ */ e(
|
|
5148
|
-
/* @__PURE__ */ e(
|
|
5113
|
+
/* @__PURE__ */ e(_, { children: n.title }),
|
|
5114
|
+
/* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description })
|
|
5149
5115
|
]
|
|
5150
5116
|
}
|
|
5151
5117
|
),
|
|
5152
|
-
children: /* @__PURE__ */
|
|
5118
|
+
children: /* @__PURE__ */ u(
|
|
5153
5119
|
f,
|
|
5154
5120
|
{
|
|
5155
5121
|
direction: "column",
|
|
5156
5122
|
customMaxWidth: l,
|
|
5157
5123
|
fullWidth: o,
|
|
5158
5124
|
children: [
|
|
5159
|
-
/* @__PURE__ */
|
|
5160
|
-
/* @__PURE__ */ e(
|
|
5161
|
-
/* @__PURE__ */ e(
|
|
5162
|
-
/* @__PURE__ */ e(O, { condition: !!((
|
|
5125
|
+
/* @__PURE__ */ u($, { direction: "row", gap: "xs", align: "center", children: [
|
|
5126
|
+
/* @__PURE__ */ e(_, { fontSize: t, children: n.title }),
|
|
5127
|
+
/* @__PURE__ */ e(_, { color: "error", fontSize: t, children: i }),
|
|
5128
|
+
/* @__PURE__ */ e(O, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ e(
|
|
5163
5129
|
me,
|
|
5164
5130
|
{
|
|
5165
5131
|
label: (a = n.tooltip) == null ? void 0 : a.label,
|
|
5166
5132
|
arrowPosition: (h = n.tooltip) == null ? void 0 : h.arrowPosition,
|
|
5167
5133
|
...n.tooltip,
|
|
5168
5134
|
children: /* @__PURE__ */ e(
|
|
5169
|
-
|
|
5135
|
+
b,
|
|
5170
5136
|
{
|
|
5171
5137
|
name: "InfoCircle",
|
|
5172
5138
|
size: t === "lg" ? "sm" : "xs",
|
|
@@ -5179,7 +5145,7 @@ const Nt = {
|
|
|
5179
5145
|
}
|
|
5180
5146
|
) })
|
|
5181
5147
|
] }),
|
|
5182
|
-
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(
|
|
5148
|
+
/* @__PURE__ */ e(O, { condition: !!n.description, children: /* @__PURE__ */ e(v, { fontSize: t, color: "gray-500", children: n.description }) })
|
|
5183
5149
|
]
|
|
5184
5150
|
}
|
|
5185
5151
|
)
|
|
@@ -5198,11 +5164,11 @@ const Nt = {
|
|
|
5198
5164
|
disabled: l = !1
|
|
5199
5165
|
}) => {
|
|
5200
5166
|
var g;
|
|
5201
|
-
const [
|
|
5202
|
-
|
|
5167
|
+
const [s, a] = k([]);
|
|
5168
|
+
Z(() => {
|
|
5203
5169
|
t && a([...t.map((m) => ({ id: m.id, isActive: m.isActive }))]);
|
|
5204
5170
|
}, [t]);
|
|
5205
|
-
const h = (g =
|
|
5171
|
+
const h = (g = s.find((m) => m.id === r)) == null ? void 0 : g.isActive, d = ve(() => {
|
|
5206
5172
|
a(
|
|
5207
5173
|
(m) => m.map((y) => y.id === r ? { ...y, isActive: !y.isActive } : y)
|
|
5208
5174
|
), i && i(!h);
|
|
@@ -5216,7 +5182,7 @@ const Nt = {
|
|
|
5216
5182
|
width: o
|
|
5217
5183
|
},
|
|
5218
5184
|
children: n && /* @__PURE__ */ e(
|
|
5219
|
-
|
|
5185
|
+
Ut,
|
|
5220
5186
|
{
|
|
5221
5187
|
disabled: l,
|
|
5222
5188
|
checked: h,
|
|
@@ -5231,21 +5197,21 @@ const Nt = {
|
|
|
5231
5197
|
InputDropdown: ki,
|
|
5232
5198
|
InputSingleFile: Ri,
|
|
5233
5199
|
CheckBoxOptions: Vi,
|
|
5234
|
-
RadioOptions:
|
|
5235
|
-
InputTextArea:
|
|
5200
|
+
RadioOptions: Ni,
|
|
5201
|
+
InputTextArea: Ti,
|
|
5236
5202
|
ToggleForm: Oi,
|
|
5237
5203
|
ActionButton: _i,
|
|
5238
5204
|
FormTitle: ji,
|
|
5239
5205
|
InputDate: Zi,
|
|
5240
|
-
InputImgFile:
|
|
5241
|
-
Custom:
|
|
5206
|
+
InputImgFile: Ui,
|
|
5207
|
+
Custom: qi
|
|
5242
5208
|
}, Ji = ({ customBottom: t }) => {
|
|
5243
5209
|
const [r, i] = k(!1), o = () => {
|
|
5244
5210
|
window.scrollY > window.screenY ? i(!0) : i(!1);
|
|
5245
5211
|
}, n = () => {
|
|
5246
5212
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
5247
5213
|
};
|
|
5248
|
-
return
|
|
5214
|
+
return Z(() => (window.addEventListener("scroll", o), () => {
|
|
5249
5215
|
window.removeEventListener("scroll", o);
|
|
5250
5216
|
}), []), /* @__PURE__ */ e(
|
|
5251
5217
|
f,
|
|
@@ -5266,14 +5232,14 @@ const Nt = {
|
|
|
5266
5232
|
transition: "transform 0.2s ease-in-out"
|
|
5267
5233
|
},
|
|
5268
5234
|
children: /* @__PURE__ */ e(
|
|
5269
|
-
|
|
5235
|
+
T,
|
|
5270
5236
|
{
|
|
5271
5237
|
secondary: !0,
|
|
5272
5238
|
size: "xs",
|
|
5273
5239
|
onClick: n,
|
|
5274
5240
|
type: "button",
|
|
5275
5241
|
iconLeft: /* @__PURE__ */ e(
|
|
5276
|
-
|
|
5242
|
+
b,
|
|
5277
5243
|
{
|
|
5278
5244
|
width: 16,
|
|
5279
5245
|
size: "xs",
|
|
@@ -5291,7 +5257,7 @@ const Nt = {
|
|
|
5291
5257
|
);
|
|
5292
5258
|
}, Co = ({ pageLayout: t, children: r, wrapperProps: i, containerProps: o }) => {
|
|
5293
5259
|
const n = ne("md"), l = (o == null ? void 0 : o.customWidth) ?? 264;
|
|
5294
|
-
return /* @__PURE__ */
|
|
5260
|
+
return /* @__PURE__ */ u(
|
|
5295
5261
|
f,
|
|
5296
5262
|
{
|
|
5297
5263
|
display: "block",
|
|
@@ -5333,7 +5299,7 @@ const Nt = {
|
|
|
5333
5299
|
withScrollToTopButton: r = !1,
|
|
5334
5300
|
scrollToTopButtonProps: i,
|
|
5335
5301
|
containerProps: o
|
|
5336
|
-
}) => /* @__PURE__ */ e(f, { position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 999)" }, children: /* @__PURE__ */
|
|
5302
|
+
}) => /* @__PURE__ */ e(f, { position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 999)" }, children: /* @__PURE__ */ u(
|
|
5337
5303
|
f,
|
|
5338
5304
|
{
|
|
5339
5305
|
position: "fixed",
|
|
@@ -5364,24 +5330,24 @@ const Nt = {
|
|
|
5364
5330
|
t
|
|
5365
5331
|
]
|
|
5366
5332
|
}
|
|
5367
|
-
) }),
|
|
5333
|
+
) }), Do = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
|
|
5368
5334
|
Ct,
|
|
5369
5335
|
{
|
|
5370
5336
|
of: t,
|
|
5371
5337
|
render: (r, i) => /* @__PURE__ */ e(Pi, { ...r }, i)
|
|
5372
5338
|
}
|
|
5373
|
-
) }), Pi = ({ title: t, value: r, icon: i }) => /* @__PURE__ */
|
|
5374
|
-
i ? /* @__PURE__ */
|
|
5375
|
-
/* @__PURE__ */ e(
|
|
5376
|
-
/* @__PURE__ */ e(
|
|
5377
|
-
] }) : /* @__PURE__ */ e(
|
|
5378
|
-
typeof r == "string" ? /* @__PURE__ */ e(
|
|
5339
|
+
) }), Pi = ({ title: t, value: r, icon: i }) => /* @__PURE__ */ u(f, { display: "flex", direction: "column", gap: "sm", children: [
|
|
5340
|
+
i ? /* @__PURE__ */ u(f, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
|
|
5341
|
+
/* @__PURE__ */ e(b, { name: i, color: "subtle" }),
|
|
5342
|
+
/* @__PURE__ */ e(v, { color: "gray-500", variant: "sub-h3", children: t })
|
|
5343
|
+
] }) : /* @__PURE__ */ e(v, { color: "gray-500", variant: "sub-h3", children: t }),
|
|
5344
|
+
typeof r == "string" ? /* @__PURE__ */ e(v, { variant: "sub-h3", children: r }) : r
|
|
5379
5345
|
] }), Y = {
|
|
5380
5346
|
silhouette: "#A7B0AC",
|
|
5381
5347
|
accent: "#78867F"
|
|
5382
5348
|
};
|
|
5383
5349
|
function Qi({ width: t, height: r }) {
|
|
5384
|
-
return /* @__PURE__ */ e(
|
|
5350
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
5385
5351
|
"svg",
|
|
5386
5352
|
{
|
|
5387
5353
|
width: t || "100",
|
|
@@ -5523,14 +5489,14 @@ function Qi({ width: t, height: r }) {
|
|
|
5523
5489
|
}
|
|
5524
5490
|
) });
|
|
5525
5491
|
}
|
|
5526
|
-
const
|
|
5492
|
+
const bo = ({
|
|
5527
5493
|
title: t = "create",
|
|
5528
5494
|
children: r,
|
|
5529
5495
|
onClickAction: i,
|
|
5530
5496
|
variant: o = "primary",
|
|
5531
5497
|
variantTitle: n,
|
|
5532
5498
|
leftIcon: l,
|
|
5533
|
-
showButton:
|
|
5499
|
+
showButton: s = !0,
|
|
5534
5500
|
customHeight: a,
|
|
5535
5501
|
childrenButton: h,
|
|
5536
5502
|
customIcon: d
|
|
@@ -5538,10 +5504,10 @@ const Do = ({
|
|
|
5538
5504
|
const g = () => {
|
|
5539
5505
|
switch (o) {
|
|
5540
5506
|
case "primary":
|
|
5541
|
-
return /* @__PURE__ */ e(
|
|
5507
|
+
return /* @__PURE__ */ e(U, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: i, children: h || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: i, children: h || t }) });
|
|
5542
5508
|
case "secondary":
|
|
5543
|
-
return /* @__PURE__ */ e(
|
|
5544
|
-
|
|
5509
|
+
return /* @__PURE__ */ e(U, { children: l ? /* @__PURE__ */ e(T, { secondary: !0, iconLeft: l, onClick: i, children: n ? /* @__PURE__ */ e(
|
|
5510
|
+
v,
|
|
5545
5511
|
{
|
|
5546
5512
|
fontFamily: "Poppins",
|
|
5547
5513
|
fontSize: "md",
|
|
@@ -5549,14 +5515,14 @@ const Do = ({
|
|
|
5549
5515
|
style: { color: "var(--sa-background-success, #28ac6e)" },
|
|
5550
5516
|
children: h || t
|
|
5551
5517
|
}
|
|
5552
|
-
) : t }) : /* @__PURE__ */ e(
|
|
5518
|
+
) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: i, children: h || t }) });
|
|
5553
5519
|
case "success":
|
|
5554
|
-
return /* @__PURE__ */ e(
|
|
5520
|
+
return /* @__PURE__ */ e(U, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: i, children: h || t }) : /* @__PURE__ */ e(T, { success: !0, onClick: i, children: h || t }) });
|
|
5555
5521
|
default:
|
|
5556
|
-
return /* @__PURE__ */ e(
|
|
5522
|
+
return /* @__PURE__ */ e(U, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: i, children: h || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: i, children: h || t }) });
|
|
5557
5523
|
}
|
|
5558
5524
|
};
|
|
5559
|
-
return /* @__PURE__ */
|
|
5525
|
+
return /* @__PURE__ */ u(
|
|
5560
5526
|
f,
|
|
5561
5527
|
{
|
|
5562
5528
|
height: "height-full",
|
|
@@ -5580,7 +5546,7 @@ const Do = ({
|
|
|
5580
5546
|
},
|
|
5581
5547
|
y
|
|
5582
5548
|
)) }),
|
|
5583
|
-
|
|
5549
|
+
s ? g() : null
|
|
5584
5550
|
]
|
|
5585
5551
|
}
|
|
5586
5552
|
);
|
|
@@ -5595,7 +5561,7 @@ const Do = ({
|
|
|
5595
5561
|
cFFFFFF: "#FFFFFF"
|
|
5596
5562
|
};
|
|
5597
5563
|
function Yi({ width: t, height: r }) {
|
|
5598
|
-
return /* @__PURE__ */ e(
|
|
5564
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
5599
5565
|
"svg",
|
|
5600
5566
|
{
|
|
5601
5567
|
width: t,
|
|
@@ -5799,7 +5765,7 @@ function Yi({ width: t, height: r }) {
|
|
|
5799
5765
|
}
|
|
5800
5766
|
function wo({ onClick: t }) {
|
|
5801
5767
|
const r = ne("md");
|
|
5802
|
-
return /* @__PURE__ */
|
|
5768
|
+
return /* @__PURE__ */ u(
|
|
5803
5769
|
f,
|
|
5804
5770
|
{
|
|
5805
5771
|
height: "height-screen",
|
|
@@ -5811,7 +5777,7 @@ function wo({ onClick: t }) {
|
|
|
5811
5777
|
children: [
|
|
5812
5778
|
/* @__PURE__ */ e(Yi, { width: r ? 600 : 300 }),
|
|
5813
5779
|
/* @__PURE__ */ e(
|
|
5814
|
-
|
|
5780
|
+
v,
|
|
5815
5781
|
{
|
|
5816
5782
|
fontWeight: "bold",
|
|
5817
5783
|
fontSize: r ? "3xl" : "2xl",
|
|
@@ -5820,7 +5786,7 @@ function wo({ onClick: t }) {
|
|
|
5820
5786
|
}
|
|
5821
5787
|
),
|
|
5822
5788
|
/* @__PURE__ */ e(
|
|
5823
|
-
|
|
5789
|
+
v,
|
|
5824
5790
|
{
|
|
5825
5791
|
fontWeight: "semibold",
|
|
5826
5792
|
fontSize: r ? "lg" : "md",
|
|
@@ -5828,7 +5794,7 @@ function wo({ onClick: t }) {
|
|
|
5828
5794
|
children: "Sorry, we couldn't find the page you are looking for"
|
|
5829
5795
|
}
|
|
5830
5796
|
),
|
|
5831
|
-
t && /* @__PURE__ */ e(
|
|
5797
|
+
t && /* @__PURE__ */ e(T, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
5832
5798
|
]
|
|
5833
5799
|
}
|
|
5834
5800
|
);
|
|
@@ -5855,7 +5821,7 @@ const A = {
|
|
|
5855
5821
|
cFFFFFF: "#FFFFFF"
|
|
5856
5822
|
};
|
|
5857
5823
|
function Xi({ width: t, height: r }) {
|
|
5858
|
-
return /* @__PURE__ */ e(
|
|
5824
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
5859
5825
|
"svg",
|
|
5860
5826
|
{
|
|
5861
5827
|
width: t,
|
|
@@ -5875,7 +5841,7 @@ function Xi({ width: t, height: r }) {
|
|
|
5875
5841
|
fillOpacity: "0.6"
|
|
5876
5842
|
}
|
|
5877
5843
|
),
|
|
5878
|
-
/* @__PURE__ */
|
|
5844
|
+
/* @__PURE__ */ u("g", { clipPath: "url(#clip0_2949_9690)", children: [
|
|
5879
5845
|
/* @__PURE__ */ e(
|
|
5880
5846
|
"path",
|
|
5881
5847
|
{
|
|
@@ -5972,7 +5938,7 @@ function Xi({ width: t, height: r }) {
|
|
|
5972
5938
|
)
|
|
5973
5939
|
}
|
|
5974
5940
|
),
|
|
5975
|
-
/* @__PURE__ */
|
|
5941
|
+
/* @__PURE__ */ u("g", { mask: "url(#mask0_2949_9690)", children: [
|
|
5976
5942
|
/* @__PURE__ */ e(
|
|
5977
5943
|
"path",
|
|
5978
5944
|
{
|
|
@@ -6071,7 +6037,7 @@ function Xi({ width: t, height: r }) {
|
|
|
6071
6037
|
}
|
|
6072
6038
|
function ko({ onClick: t }) {
|
|
6073
6039
|
const r = ne("md");
|
|
6074
|
-
return /* @__PURE__ */
|
|
6040
|
+
return /* @__PURE__ */ u(
|
|
6075
6041
|
f,
|
|
6076
6042
|
{
|
|
6077
6043
|
height: "height-screen",
|
|
@@ -6082,8 +6048,8 @@ function ko({ onClick: t }) {
|
|
|
6082
6048
|
gap: "md",
|
|
6083
6049
|
children: [
|
|
6084
6050
|
/* @__PURE__ */ e(Xi, { width: r ? 600 : 300 }),
|
|
6085
|
-
/* @__PURE__ */ e(
|
|
6086
|
-
t && /* @__PURE__ */ e(
|
|
6051
|
+
/* @__PURE__ */ e(v, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
|
|
6052
|
+
t && /* @__PURE__ */ e(T, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
6087
6053
|
]
|
|
6088
6054
|
}
|
|
6089
6055
|
);
|
|
@@ -6106,7 +6072,7 @@ const c = {
|
|
|
6106
6072
|
cFFFFFF: "#FFFFFF"
|
|
6107
6073
|
};
|
|
6108
6074
|
function Ki({ width: t, height: r }) {
|
|
6109
|
-
return /* @__PURE__ */ e(
|
|
6075
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ u(
|
|
6110
6076
|
"svg",
|
|
6111
6077
|
{
|
|
6112
6078
|
width: t,
|
|
@@ -6779,7 +6745,7 @@ function Ki({ width: t, height: r }) {
|
|
|
6779
6745
|
}
|
|
6780
6746
|
function So({ onClick: t }) {
|
|
6781
6747
|
const r = ne("md");
|
|
6782
|
-
return /* @__PURE__ */
|
|
6748
|
+
return /* @__PURE__ */ u(
|
|
6783
6749
|
f,
|
|
6784
6750
|
{
|
|
6785
6751
|
height: "height-screen",
|
|
@@ -6792,7 +6758,7 @@ function So({ onClick: t }) {
|
|
|
6792
6758
|
children: [
|
|
6793
6759
|
/* @__PURE__ */ e(Ki, { width: r ? 600 : 300 }),
|
|
6794
6760
|
/* @__PURE__ */ e(
|
|
6795
|
-
|
|
6761
|
+
v,
|
|
6796
6762
|
{
|
|
6797
6763
|
fontWeight: "bold",
|
|
6798
6764
|
fontSize: r ? "3xl" : "2xl",
|
|
@@ -6801,7 +6767,7 @@ function So({ onClick: t }) {
|
|
|
6801
6767
|
}
|
|
6802
6768
|
),
|
|
6803
6769
|
/* @__PURE__ */ e(
|
|
6804
|
-
|
|
6770
|
+
v,
|
|
6805
6771
|
{
|
|
6806
6772
|
fontWeight: "semibold",
|
|
6807
6773
|
fontSize: r ? "lg" : "md",
|
|
@@ -6809,15 +6775,15 @@ function So({ onClick: t }) {
|
|
|
6809
6775
|
children: "we are trying to fix the problem"
|
|
6810
6776
|
}
|
|
6811
6777
|
),
|
|
6812
|
-
t && /* @__PURE__ */ e(
|
|
6778
|
+
t && /* @__PURE__ */ e(T, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
|
|
6813
6779
|
]
|
|
6814
6780
|
}
|
|
6815
6781
|
);
|
|
6816
6782
|
}
|
|
6817
6783
|
const Fo = (t) => {
|
|
6818
|
-
var i, o, n, l,
|
|
6784
|
+
var i, o, n, l, s;
|
|
6819
6785
|
const r = ne("md");
|
|
6820
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ u(
|
|
6821
6787
|
ut,
|
|
6822
6788
|
{
|
|
6823
6789
|
isShow: t.isShow,
|
|
@@ -6830,8 +6796,8 @@ const Fo = (t) => {
|
|
|
6830
6796
|
}
|
|
6831
6797
|
},
|
|
6832
6798
|
children: [
|
|
6833
|
-
/* @__PURE__ */ e(Ot, { ...t.dialogTitleProps, children: typeof t.title == "string" ? /* @__PURE__ */ e(
|
|
6834
|
-
/* @__PURE__ */ e(ht, { children: typeof t.description == "string" ? /* @__PURE__ */ e(
|
|
6799
|
+
/* @__PURE__ */ e(Ot, { ...t.dialogTitleProps, children: typeof t.title == "string" ? /* @__PURE__ */ e(v, { fontSize: "lg", fontWeight: "medium", children: t.title }) : t.title }),
|
|
6800
|
+
/* @__PURE__ */ e(ht, { children: typeof t.description == "string" ? /* @__PURE__ */ e(v, { fontSize: "md", lineHeight: "leading-6", color: "tertiary", children: t.description }) : t.description }),
|
|
6835
6801
|
/* @__PURE__ */ e(_t, { children: /* @__PURE__ */ e(
|
|
6836
6802
|
f,
|
|
6837
6803
|
{
|
|
@@ -6839,16 +6805,16 @@ const Fo = (t) => {
|
|
|
6839
6805
|
direction: ((i = t.containerConfirmBtnProps) == null ? void 0 : i.direction) || "row",
|
|
6840
6806
|
justify: ((o = t.containerConfirmBtnProps) == null ? void 0 : o.justify) || "flex-end",
|
|
6841
6807
|
...t.containerConfirmBtnProps,
|
|
6842
|
-
children: /* @__PURE__ */
|
|
6808
|
+
children: /* @__PURE__ */ u(
|
|
6843
6809
|
f,
|
|
6844
6810
|
{
|
|
6845
6811
|
display: "flex",
|
|
6846
6812
|
direction: ((n = t.wrapperConfirmBtnProps) == null ? void 0 : n.direction) || "row",
|
|
6847
6813
|
justify: ((l = t.wrapperConfirmBtnProps) == null ? void 0 : l.justify) || "flex-end",
|
|
6848
|
-
gap: ((
|
|
6814
|
+
gap: ((s = t.wrapperConfirmBtnProps) == null ? void 0 : s.gap) || "sm",
|
|
6849
6815
|
...t.wrapperConfirmBtnProps,
|
|
6850
6816
|
children: [
|
|
6851
|
-
t.onCancel && /* @__PURE__ */ e(
|
|
6817
|
+
t.onCancel && /* @__PURE__ */ e(T, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
|
|
6852
6818
|
/* @__PURE__ */ e(
|
|
6853
6819
|
f,
|
|
6854
6820
|
{
|
|
@@ -6857,7 +6823,7 @@ const Fo = (t) => {
|
|
|
6857
6823
|
textWrap: "nowrap"
|
|
6858
6824
|
},
|
|
6859
6825
|
children: /* @__PURE__ */ e(
|
|
6860
|
-
|
|
6826
|
+
T,
|
|
6861
6827
|
{
|
|
6862
6828
|
...t.buttonConfirmProps,
|
|
6863
6829
|
onClick: t.onConfirm,
|
|
@@ -6885,32 +6851,32 @@ const Fo = (t) => {
|
|
|
6885
6851
|
customHeight: o,
|
|
6886
6852
|
paddingInline: n = "spacing-0",
|
|
6887
6853
|
paddingBlock: l = "spacing-0",
|
|
6888
|
-
header:
|
|
6854
|
+
header: s,
|
|
6889
6855
|
footer: a,
|
|
6890
6856
|
title: h,
|
|
6891
6857
|
titleTag: d,
|
|
6892
6858
|
action: g,
|
|
6893
6859
|
actionContainer: m,
|
|
6894
6860
|
containerProps: y,
|
|
6895
|
-
bodyProps:
|
|
6896
|
-
headerProps:
|
|
6897
|
-
footerProps:
|
|
6898
|
-
variantTag:
|
|
6861
|
+
bodyProps: D,
|
|
6862
|
+
headerProps: E = { borderBottom: !0 },
|
|
6863
|
+
footerProps: x = { borderTop: !0 },
|
|
6864
|
+
variantTag: z = "info"
|
|
6899
6865
|
}) => {
|
|
6900
|
-
const
|
|
6901
|
-
|
|
6902
|
-
const
|
|
6903
|
-
if (
|
|
6904
|
-
const P =
|
|
6905
|
-
|
|
6866
|
+
const j = ie(null), [N, q] = k("100vh");
|
|
6867
|
+
Z(() => {
|
|
6868
|
+
const I = () => {
|
|
6869
|
+
if (j.current) {
|
|
6870
|
+
const P = j.current.getBoundingClientRect().top;
|
|
6871
|
+
q(`calc(100vh - ${P}px)`);
|
|
6906
6872
|
}
|
|
6907
6873
|
};
|
|
6908
|
-
return
|
|
6874
|
+
return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
6909
6875
|
}, []);
|
|
6910
|
-
const M = () => d ? /* @__PURE__ */
|
|
6911
|
-
/* @__PURE__ */ e(
|
|
6912
|
-
/* @__PURE__ */ e(Le, { border: !0, text: d, variant:
|
|
6913
|
-
] }) : /* @__PURE__ */ e(
|
|
6876
|
+
const M = () => d ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
|
|
6877
|
+
/* @__PURE__ */ e(v, { fontWeight: "medium", children: h }),
|
|
6878
|
+
/* @__PURE__ */ e(Le, { border: !0, text: d, variant: z })
|
|
6879
|
+
] }) : /* @__PURE__ */ e(v, { fontWeight: "medium", children: h }), ae = () => s || /* @__PURE__ */ u(
|
|
6914
6880
|
f,
|
|
6915
6881
|
{
|
|
6916
6882
|
direction: "row",
|
|
@@ -6922,11 +6888,11 @@ const Fo = (t) => {
|
|
|
6922
6888
|
/* @__PURE__ */ e(f, { ...m, children: g ?? null })
|
|
6923
6889
|
]
|
|
6924
6890
|
}
|
|
6925
|
-
), J = !!(
|
|
6926
|
-
return /* @__PURE__ */
|
|
6891
|
+
), J = !!(s || h || g);
|
|
6892
|
+
return /* @__PURE__ */ u(
|
|
6927
6893
|
f,
|
|
6928
6894
|
{
|
|
6929
|
-
ref:
|
|
6895
|
+
ref: j,
|
|
6930
6896
|
height: r,
|
|
6931
6897
|
customMinHeight: i,
|
|
6932
6898
|
customHeight: o,
|
|
@@ -6938,41 +6904,41 @@ const Fo = (t) => {
|
|
|
6938
6904
|
style: {
|
|
6939
6905
|
backgroundColor: "var(--sa-background-primary, #ffffff)",
|
|
6940
6906
|
display: "flex",
|
|
6941
|
-
minHeight:
|
|
6907
|
+
minHeight: N,
|
|
6942
6908
|
...(y == null ? void 0 : y.style) ?? {}
|
|
6943
6909
|
},
|
|
6944
6910
|
children: [
|
|
6945
|
-
|
|
6911
|
+
s !== null && J ? /* @__PURE__ */ e(tr, { ...E, children: ae() }) : null,
|
|
6946
6912
|
/* @__PURE__ */ e(
|
|
6947
6913
|
f,
|
|
6948
6914
|
{
|
|
6949
6915
|
padding: "spacing-0",
|
|
6950
|
-
...
|
|
6916
|
+
...D,
|
|
6951
6917
|
style: {
|
|
6952
6918
|
flex: 1,
|
|
6953
6919
|
overflow: "auto",
|
|
6954
|
-
...(
|
|
6920
|
+
...(D == null ? void 0 : D.style) ?? {}
|
|
6955
6921
|
},
|
|
6956
6922
|
children: t
|
|
6957
6923
|
}
|
|
6958
6924
|
),
|
|
6959
|
-
a ? /* @__PURE__ */ e(rr, { ...
|
|
6925
|
+
a ? /* @__PURE__ */ e(rr, { ...x, children: a }) : null
|
|
6960
6926
|
]
|
|
6961
6927
|
}
|
|
6962
6928
|
);
|
|
6963
6929
|
}
|
|
6964
|
-
), Mo =
|
|
6930
|
+
), Mo = Ue.memo(
|
|
6965
6931
|
({ value: t, options: r = [], onChange: i, multiple: o }) => {
|
|
6966
|
-
const n = (t == null ? void 0 : t.map((a) => a.value)) || [], l = (r == null ? void 0 : r.filter((a) => n.includes(a.value))) || [],
|
|
6932
|
+
const n = (t == null ? void 0 : t.map((a) => a.value)) || [], l = (r == null ? void 0 : r.filter((a) => n.includes(a.value))) || [], s = (a) => {
|
|
6967
6933
|
const h = [...l];
|
|
6968
6934
|
let d = [];
|
|
6969
6935
|
o ? d = n.includes(a.value) ? h.filter((g) => g.value !== a.value) : [...h, a] : d = [a], i == null || i(d);
|
|
6970
6936
|
};
|
|
6971
6937
|
return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((a, h) => /* @__PURE__ */ e(
|
|
6972
|
-
|
|
6938
|
+
T,
|
|
6973
6939
|
{
|
|
6974
6940
|
...n.includes(a.value) ? { primary: !0 } : { secondary: !0 },
|
|
6975
|
-
onClick: () =>
|
|
6941
|
+
onClick: () => s(a),
|
|
6976
6942
|
children: a.label
|
|
6977
6943
|
},
|
|
6978
6944
|
h
|
|
@@ -6983,14 +6949,14 @@ function vt(t) {
|
|
|
6983
6949
|
return null;
|
|
6984
6950
|
}
|
|
6985
6951
|
vt.displayName = "LayoutDialog.Header";
|
|
6986
|
-
function
|
|
6952
|
+
function Dt(t) {
|
|
6987
6953
|
return null;
|
|
6988
6954
|
}
|
|
6989
|
-
|
|
6990
|
-
function
|
|
6955
|
+
Dt.displayName = "LayoutDialog.Body";
|
|
6956
|
+
function bt(t) {
|
|
6991
6957
|
return null;
|
|
6992
6958
|
}
|
|
6993
|
-
|
|
6959
|
+
bt.displayName = "LayoutDialog.Aside";
|
|
6994
6960
|
function wt(t) {
|
|
6995
6961
|
return null;
|
|
6996
6962
|
}
|
|
@@ -7021,12 +6987,12 @@ const re = {
|
|
|
7021
6987
|
{
|
|
7022
6988
|
mode: "modal",
|
|
7023
6989
|
label: "Modal",
|
|
7024
|
-
icon: /* @__PURE__ */ e(
|
|
6990
|
+
icon: /* @__PURE__ */ e(b, { name: "Newscreen", size: "sm" })
|
|
7025
6991
|
},
|
|
7026
6992
|
{
|
|
7027
6993
|
mode: "fullscreen",
|
|
7028
6994
|
label: "Fullscreen",
|
|
7029
|
-
icon: /* @__PURE__ */ e(
|
|
6995
|
+
icon: /* @__PURE__ */ e(b, { name: "Fullscreen", size: "sm" })
|
|
7030
6996
|
}
|
|
7031
6997
|
];
|
|
7032
6998
|
function tn({ value: t, onChange: r }) {
|
|
@@ -7045,7 +7011,7 @@ function tn({ value: t, onChange: r }) {
|
|
|
7045
7011
|
)) });
|
|
7046
7012
|
}
|
|
7047
7013
|
function rn() {
|
|
7048
|
-
return /* @__PURE__ */
|
|
7014
|
+
return /* @__PURE__ */ u(
|
|
7049
7015
|
"svg",
|
|
7050
7016
|
{
|
|
7051
7017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7076,8 +7042,8 @@ function nn(t) {
|
|
|
7076
7042
|
}
|
|
7077
7043
|
function $e(t, r) {
|
|
7078
7044
|
let i = null;
|
|
7079
|
-
return
|
|
7080
|
-
|
|
7045
|
+
return Ue.Children.forEach(t, (o) => {
|
|
7046
|
+
Ue.isValidElement(o) && o.type === r && (i = o.props.children ?? null);
|
|
7081
7047
|
}), i;
|
|
7082
7048
|
}
|
|
7083
7049
|
function on(t) {
|
|
@@ -7087,26 +7053,26 @@ function on(t) {
|
|
|
7087
7053
|
viewMode: o,
|
|
7088
7054
|
defaultViewMode: n = "modal",
|
|
7089
7055
|
onViewModeChange: l,
|
|
7090
|
-
showViewModeToggle:
|
|
7056
|
+
showViewModeToggle: s = !0,
|
|
7091
7057
|
showCloseButton: a = !0,
|
|
7092
7058
|
size: h,
|
|
7093
7059
|
asideWidth: d,
|
|
7094
7060
|
disableEscapeClose: g = !1,
|
|
7095
7061
|
disableBackdropClose: m = !1,
|
|
7096
7062
|
lockBodyScroll: y = !0,
|
|
7097
|
-
children:
|
|
7098
|
-
} = t, [
|
|
7063
|
+
children: D
|
|
7064
|
+
} = t, [E, x] = k(n), z = o ?? E, N = ne("md") ? z : "fullscreen", q = ve(
|
|
7099
7065
|
(Q) => {
|
|
7100
|
-
o === void 0 &&
|
|
7066
|
+
o === void 0 && x(Q), l == null || l(Q);
|
|
7101
7067
|
},
|
|
7102
7068
|
[o, l]
|
|
7103
7069
|
), M = ie(null);
|
|
7104
|
-
|
|
7070
|
+
Z(() => {
|
|
7105
7071
|
if (!(!r || !y))
|
|
7106
7072
|
return M.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
|
|
7107
7073
|
document.body.style.overflow = M.current ?? "";
|
|
7108
7074
|
};
|
|
7109
|
-
}, [r, y]),
|
|
7075
|
+
}, [r, y]), Z(() => {
|
|
7110
7076
|
if (!r || g) return;
|
|
7111
7077
|
const Q = (K) => {
|
|
7112
7078
|
K.key === "Escape" && i();
|
|
@@ -7114,31 +7080,31 @@ function on(t) {
|
|
|
7114
7080
|
return window.addEventListener("keydown", Q), () => window.removeEventListener("keydown", Q);
|
|
7115
7081
|
}, [r, g, i]);
|
|
7116
7082
|
const ae = he(
|
|
7117
|
-
() => $e(
|
|
7118
|
-
[
|
|
7083
|
+
() => $e(D, vt),
|
|
7084
|
+
[D]
|
|
7119
7085
|
), J = he(
|
|
7120
|
-
() => $e(
|
|
7121
|
-
[
|
|
7122
|
-
),
|
|
7123
|
-
() => $e(
|
|
7124
|
-
[
|
|
7086
|
+
() => $e(D, Dt),
|
|
7087
|
+
[D]
|
|
7088
|
+
), I = he(
|
|
7089
|
+
() => $e(D, bt),
|
|
7090
|
+
[D]
|
|
7125
7091
|
), P = he(
|
|
7126
|
-
() => $e(
|
|
7127
|
-
[
|
|
7092
|
+
() => $e(D, wt),
|
|
7093
|
+
[D]
|
|
7128
7094
|
);
|
|
7129
7095
|
if (!r) return null;
|
|
7130
7096
|
const oe = [
|
|
7131
7097
|
re["lyd-panel"],
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7098
|
+
N === "modal" && re["lyd-modal"],
|
|
7099
|
+
N === "fullscreen" && re["lyd-fullscreen"],
|
|
7100
|
+
N === "sidebar" && re["lyd-sidebar"]
|
|
7135
7101
|
].filter(Boolean).join(" "), le = {
|
|
7136
7102
|
"--lyd-max-w": nn(h),
|
|
7137
7103
|
...d !== void 0 && { "--lyd-aside-w": d }
|
|
7138
7104
|
}, G = () => {
|
|
7139
7105
|
m || i();
|
|
7140
7106
|
};
|
|
7141
|
-
return /* @__PURE__ */
|
|
7107
|
+
return /* @__PURE__ */ u(
|
|
7142
7108
|
"div",
|
|
7143
7109
|
{
|
|
7144
7110
|
className: re["lyd-root"],
|
|
@@ -7154,11 +7120,11 @@ function on(t) {
|
|
|
7154
7120
|
"aria-hidden": "true"
|
|
7155
7121
|
}
|
|
7156
7122
|
),
|
|
7157
|
-
/* @__PURE__ */
|
|
7158
|
-
/* @__PURE__ */
|
|
7123
|
+
/* @__PURE__ */ u("div", { className: oe, children: [
|
|
7124
|
+
/* @__PURE__ */ u("div", { className: re["lyd-header"], children: [
|
|
7159
7125
|
/* @__PURE__ */ e("div", { className: re["lyd-header-content"], children: ae }),
|
|
7160
|
-
/* @__PURE__ */
|
|
7161
|
-
|
|
7126
|
+
/* @__PURE__ */ u("div", { className: re["lyd-header-actions"], children: [
|
|
7127
|
+
s && /* @__PURE__ */ e(tn, { value: z, onChange: q }),
|
|
7162
7128
|
a && /* @__PURE__ */ e(
|
|
7163
7129
|
"button",
|
|
7164
7130
|
{
|
|
@@ -7166,14 +7132,14 @@ function on(t) {
|
|
|
7166
7132
|
className: re["lyd-close-btn"],
|
|
7167
7133
|
onClick: i,
|
|
7168
7134
|
"aria-label": "Close dialog",
|
|
7169
|
-
children: /* @__PURE__ */ e(
|
|
7135
|
+
children: /* @__PURE__ */ e(b, { name: "Cross", size: "md" })
|
|
7170
7136
|
}
|
|
7171
7137
|
)
|
|
7172
7138
|
] })
|
|
7173
7139
|
] }),
|
|
7174
|
-
/* @__PURE__ */
|
|
7140
|
+
/* @__PURE__ */ u("div", { className: re["lyd-main"], children: [
|
|
7175
7141
|
/* @__PURE__ */ e("div", { className: re["lyd-body"], children: J }),
|
|
7176
|
-
|
|
7142
|
+
I && /* @__PURE__ */ e("aside", { className: re["lyd-aside"], children: I })
|
|
7177
7143
|
] }),
|
|
7178
7144
|
P && /* @__PURE__ */ e("div", { className: re["lyd-footer"], children: P })
|
|
7179
7145
|
] })
|
|
@@ -7183,16 +7149,16 @@ function on(t) {
|
|
|
7183
7149
|
}
|
|
7184
7150
|
const Ke = on;
|
|
7185
7151
|
Ke.Header = vt;
|
|
7186
|
-
Ke.Body =
|
|
7187
|
-
Ke.Aside =
|
|
7152
|
+
Ke.Body = Dt;
|
|
7153
|
+
Ke.Aside = bt;
|
|
7188
7154
|
Ke.Footer = wt;
|
|
7189
7155
|
function Lo({ url: t, filename: r, onClose: i }) {
|
|
7190
|
-
return
|
|
7156
|
+
return Z(() => {
|
|
7191
7157
|
const o = (n) => {
|
|
7192
7158
|
n.key === "Escape" && i();
|
|
7193
7159
|
};
|
|
7194
7160
|
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
7195
|
-
}, [i]), /* @__PURE__ */
|
|
7161
|
+
}, [i]), /* @__PURE__ */ u(
|
|
7196
7162
|
"div",
|
|
7197
7163
|
{
|
|
7198
7164
|
onClick: i,
|
|
@@ -7208,7 +7174,7 @@ function Lo({ url: t, filename: r, onClose: i }) {
|
|
|
7208
7174
|
gap: "12px"
|
|
7209
7175
|
},
|
|
7210
7176
|
children: [
|
|
7211
|
-
/* @__PURE__ */
|
|
7177
|
+
/* @__PURE__ */ u(
|
|
7212
7178
|
"div",
|
|
7213
7179
|
{
|
|
7214
7180
|
onClick: (o) => o.stopPropagation(),
|
|
@@ -7303,7 +7269,7 @@ function Bo({
|
|
|
7303
7269
|
formatTitle: i
|
|
7304
7270
|
}) {
|
|
7305
7271
|
const o = Ve();
|
|
7306
|
-
|
|
7272
|
+
Z(() => {
|
|
7307
7273
|
let n = null, l = null;
|
|
7308
7274
|
for (const h of r) {
|
|
7309
7275
|
const d = h.items.find((g) => g.to ? g.to === "/" ? o.pathname === "/" : !!(g.to === o.pathname || o.pathname.startsWith(g.to + "/")) : !1);
|
|
@@ -7312,10 +7278,10 @@ function Bo({
|
|
|
7312
7278
|
break;
|
|
7313
7279
|
}
|
|
7314
7280
|
}
|
|
7315
|
-
const
|
|
7316
|
-
n != null && n.title &&
|
|
7281
|
+
const s = [];
|
|
7282
|
+
n != null && n.title && s.push(n.title), l != null && l.name && s.push(l.name.toTitleCase());
|
|
7317
7283
|
const a = (h, d) => h.length > 0 ? `${h.join(" - ")} | ${d}` : d;
|
|
7318
|
-
document.title = (i || a)(
|
|
7284
|
+
document.title = (i || a)(s, t);
|
|
7319
7285
|
}, [o.pathname]);
|
|
7320
7286
|
}
|
|
7321
7287
|
const Ao = () => {
|
|
@@ -7337,26 +7303,26 @@ const Ao = () => {
|
|
|
7337
7303
|
hasId: !!l
|
|
7338
7304
|
};
|
|
7339
7305
|
};
|
|
7340
|
-
function
|
|
7306
|
+
function Io(t) {
|
|
7341
7307
|
var o, n;
|
|
7342
7308
|
const r = t.decodedAccessToken;
|
|
7343
7309
|
return he(() => {
|
|
7344
7310
|
var h, d;
|
|
7345
|
-
const l = ((d = (h = r == null ? void 0 : r.access) == null ? void 0 : h.role) == null ? void 0 : d.code) ?? "",
|
|
7311
|
+
const l = ((d = (h = r == null ? void 0 : r.access) == null ? void 0 : h.role) == null ? void 0 : d.code) ?? "", s = Object.keys(t.role).reduce(
|
|
7346
7312
|
(g, m) => {
|
|
7347
|
-
const y = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (
|
|
7313
|
+
const y = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (D) => D.replace("_", "").toUpperCase())}`;
|
|
7348
7314
|
return { ...g, [y]: !1 };
|
|
7349
7315
|
},
|
|
7350
7316
|
{}
|
|
7351
7317
|
);
|
|
7352
7318
|
return {
|
|
7353
7319
|
...Object.keys(t.role).reduce((g, m) => {
|
|
7354
|
-
const y = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (
|
|
7320
|
+
const y = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (D) => D.replace("_", "").toUpperCase())}`;
|
|
7355
7321
|
return {
|
|
7356
7322
|
...g,
|
|
7357
7323
|
[y]: l === t.role[m]
|
|
7358
7324
|
};
|
|
7359
|
-
},
|
|
7325
|
+
}, s),
|
|
7360
7326
|
hasRole: (g) => l === t.role[g],
|
|
7361
7327
|
getRoleKey: () => l
|
|
7362
7328
|
};
|
|
@@ -7365,10 +7331,10 @@ function Ho(t) {
|
|
|
7365
7331
|
export {
|
|
7366
7332
|
Gn as ActionMenu,
|
|
7367
7333
|
hi as AdvanceFilterBar,
|
|
7368
|
-
|
|
7334
|
+
zn as App,
|
|
7369
7335
|
kr as AppComponent,
|
|
7370
7336
|
Qt as AppContext,
|
|
7371
|
-
|
|
7337
|
+
Tn as AppLayout,
|
|
7372
7338
|
Co as AsideBar,
|
|
7373
7339
|
On as BackButton,
|
|
7374
7340
|
pi as ColumnFilterDropdown,
|
|
@@ -7376,7 +7342,7 @@ export {
|
|
|
7376
7342
|
vi as DataTable,
|
|
7377
7343
|
O as DecisionWrapper,
|
|
7378
7344
|
Ct as EachUtils,
|
|
7379
|
-
|
|
7345
|
+
bo as EmptyStatePage,
|
|
7380
7346
|
ui as FilterDrawer,
|
|
7381
7347
|
vo as FloatingFooter,
|
|
7382
7348
|
ko as ForbiddenPage,
|
|
@@ -7387,11 +7353,11 @@ export {
|
|
|
7387
7353
|
Fr as HeaderLeftSlotProvider,
|
|
7388
7354
|
jn as HorizontalField,
|
|
7389
7355
|
Lo as ImagePreview,
|
|
7390
|
-
|
|
7356
|
+
zi as InputFile,
|
|
7391
7357
|
Gi as InputImage,
|
|
7392
7358
|
Ke as LayoutDialog,
|
|
7393
|
-
|
|
7394
|
-
|
|
7359
|
+
bt as LayoutDialogAside,
|
|
7360
|
+
Dt as LayoutDialogBody,
|
|
7395
7361
|
wt as LayoutDialogFooter,
|
|
7396
7362
|
vt as LayoutDialogHeader,
|
|
7397
7363
|
_n as ModuleSwitcher,
|
|
@@ -7406,7 +7372,7 @@ export {
|
|
|
7406
7372
|
tr as SectionHeader,
|
|
7407
7373
|
Mo as SelectButton,
|
|
7408
7374
|
So as ServerErrorPage,
|
|
7409
|
-
|
|
7375
|
+
br as SidebarBadgesProvider,
|
|
7410
7376
|
Vn as SidebarGroupSlot,
|
|
7411
7377
|
Lr as SidebarGroupSlotOutlet,
|
|
7412
7378
|
Mr as SidebarGroupSlotProvider,
|
|
@@ -7417,8 +7383,8 @@ export {
|
|
|
7417
7383
|
fi as TableWrapper,
|
|
7418
7384
|
po as ToggleStatus,
|
|
7419
7385
|
pe as Typography,
|
|
7420
|
-
|
|
7421
|
-
|
|
7386
|
+
Do as VerticalField,
|
|
7387
|
+
Nn as clearModuleSelection,
|
|
7422
7388
|
Xn as createInitialFromUserName,
|
|
7423
7389
|
io as cssVars,
|
|
7424
7390
|
lo as formHasChanged,
|
|
@@ -7428,8 +7394,8 @@ export {
|
|
|
7428
7394
|
Pn as getDateFilterValue,
|
|
7429
7395
|
Jn as getDateRangeFilterValue,
|
|
7430
7396
|
to as getInitials,
|
|
7431
|
-
|
|
7432
|
-
|
|
7397
|
+
Un as getValueDropdownMultipleFilter,
|
|
7398
|
+
qn as getValueRadioFilter,
|
|
7433
7399
|
di as getValueSearch,
|
|
7434
7400
|
nt as getValuesFilter,
|
|
7435
7401
|
Vt as handleChangeFilter,
|
|
@@ -7452,8 +7418,8 @@ export {
|
|
|
7452
7418
|
rt as resolveSidebarBadge,
|
|
7453
7419
|
oo as textWidth,
|
|
7454
7420
|
Yt as useApp,
|
|
7455
|
-
|
|
7456
|
-
|
|
7421
|
+
Dr as useAppState,
|
|
7422
|
+
Io as useAuthRole,
|
|
7457
7423
|
Bo as useDynamicTitle,
|
|
7458
7424
|
er as useModuleSelection,
|
|
7459
7425
|
xt as useRouteInfo,
|