@archbase/admin 4.12.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as r, jsxs as R, Fragment as Pe } from "react/jsx-runtime";
|
|
2
2
|
import * as HA from "react";
|
|
3
|
-
import xe, { useState as ge, useRef as
|
|
4
|
-
import { useArchbaseSecurityManager as
|
|
5
|
-
import { useUncontrolled as aA, useMediaQuery as
|
|
6
|
-
import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as
|
|
3
|
+
import xe, { useState as ge, useRef as Ae, useEffect as oe, useMemo as ce, useContext as ye, useCallback as w, createContext as Ne, memo as YA, Fragment as qA, useLayoutEffect as Er, useImperativeHandle as Rr, startTransition as nA, useReducer as Pr, useSyncExternalStore as Lr } from "react";
|
|
4
|
+
import { useArchbaseSecurityManager as Dr } from "@archbase/security";
|
|
5
|
+
import { useUncontrolled as aA, useMediaQuery as MA, useHotkeys as Mr, useDisclosure as Nr, useFocusTrap as zr, useForceUpdate as Or } from "@mantine/hooks";
|
|
6
|
+
import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as Me, Group as Le, Tooltip as De, Button as $r, ScrollArea as ze, Badge as fA, Center as Je, Image as Qr, useMantineTheme as me, px as pe, Burger as Kr, Box as q, Avatar as iA, Text as Te, Stack as W, Skeleton as fe, Paper as Fr, NavLink as NA, Kbd as jA, UnstyledButton as cA, Collapse as Vr, TextInput as XA, Indicator as Gr, Transition as Br, Divider as dA, AppShell as Be, Drawer as JA } from "@mantine/core";
|
|
7
7
|
import { IconSun as _A, IconMoonStars as WA, IconTerminal as Ur, IconSearch as _e, IconAlertCircle as Hr, IconDots as ZA, IconChevronRight as gA, IconChevronDown as Yr, IconX as er, IconChevronLeft as qr, IconHome2 as jr, IconDashboard as Xr, IconUsers as Jr, IconListSearch as Ar, IconUserPlus as _r, IconNews as Wr, IconFilePlus as Zr, IconSettings as et } from "@tabler/icons-react";
|
|
8
8
|
import { useArchbaseAppContext as bA, getI18nextInstance as ne, useArchbaseTranslation as mA, archbaseI18next as Re, useArchbaseValidator as At, ARCHBASE_IOC_API_TYPE as rt } from "@archbase/core";
|
|
9
|
-
import { BRFlag as He, USFlag as rr, ESFlag as uA, VEFlag as tt, UYFlag as ot, SVFlag as nt, PYFlag as st, PEFlag as lt, PAFlag as at, NIFlag as it, MXFlag as ct, HNFlag as dt, GTFlag as ut, ECFlag as ht, DOFlag as
|
|
9
|
+
import { BRFlag as He, USFlag as rr, ESFlag as uA, VEFlag as tt, UYFlag as ot, SVFlag as nt, PYFlag as st, PEFlag as lt, PAFlag as at, NIFlag as it, MXFlag as ct, HNFlag as dt, GTFlag as ut, ECFlag as ht, DOFlag as pt, CUFlag as ft, CRFlag as gt, COFlag as bt, CLFlag as mt, BOFlag as yt, ARFlag as vt } from "mantine-flagpack";
|
|
10
10
|
import { spotlight as Ct, Spotlight as Ue } from "@mantine/spotlight";
|
|
11
11
|
import { useNavigate as qe, useLocation as je, matchPath as zA } from "react-router";
|
|
12
12
|
import { useLocation as Xe, useOutlet as wt, matchPath as St, Route as Ke, Routes as tr, useParams as or, useNavigationType as kt, UNSAFE_LocationContext as xt, useSearchParams as nr, useNavigate as It } from "react-router-dom";
|
|
13
13
|
import { useMediaQuery as Tt } from "usehooks-ts";
|
|
14
14
|
import { useArchbaseNavigateParams as Et, useArchbaseVisible as Rt, ArchbaseNotifications as Pt, ArchbaseAvatarEdit as Lt, ArchbaseEdit as sA } from "@archbase/components";
|
|
15
|
-
import { SubMenu as
|
|
16
|
-
import { createPortal as
|
|
15
|
+
import { SubMenu as Dt, MenuItem as OA, menuClasses as te, Sidebar as sr, Menu as lr, sidebarClasses as ar } from "react-pro-sidebar";
|
|
16
|
+
import { createPortal as Mt } from "react-dom";
|
|
17
17
|
import Nt from "@rehooks/component-size";
|
|
18
18
|
import { ArchbaseAdvancedTabs as zt } from "@archbase/layout";
|
|
19
19
|
import { create as ir, useStore as Ot } from "zustand";
|
|
@@ -31,96 +31,110 @@ const rA = xe.createContext({}), Bt = ({
|
|
|
31
31
|
enableSecurity: a,
|
|
32
32
|
securityOptions: l,
|
|
33
33
|
onNavigationDataChange: i,
|
|
34
|
-
initialSidebarCollapsed: h
|
|
34
|
+
initialSidebarCollapsed: h,
|
|
35
|
+
securityFailMode: c = "closed"
|
|
35
36
|
}) => {
|
|
36
|
-
const [
|
|
37
|
+
const [d, u] = ge(h), [p, y] = ge(!1), [m, g] = ge(() => a === !0), [b, f] = ge(null), x = Ae(!1), [E, M] = aA({
|
|
37
38
|
value: i !== void 0 ? A : void 0,
|
|
38
39
|
defaultValue: a ? [] : A,
|
|
39
40
|
finalValue: [],
|
|
40
41
|
onChange: i
|
|
41
42
|
});
|
|
42
43
|
oe(() => {
|
|
43
|
-
}, [
|
|
44
|
-
const { securityManager:
|
|
44
|
+
}, [E, a]);
|
|
45
|
+
const { securityManager: V } = Dr({
|
|
45
46
|
resourceName: l?.navigationResourceName ? l.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
46
47
|
resourceDescription: l?.navigationResourceDescription ? l.navigationResourceDescription : "archbase:Navegação",
|
|
47
48
|
enableSecurity: a
|
|
48
49
|
});
|
|
49
50
|
return oe(() => {
|
|
50
|
-
|
|
51
|
+
x.current = !1;
|
|
51
52
|
}, [t?.id]), oe(() => {
|
|
52
53
|
if (!a) {
|
|
53
|
-
|
|
54
|
+
g(!1);
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
|
-
if (
|
|
57
|
+
if (x.current)
|
|
57
58
|
return;
|
|
58
|
-
A.filter((
|
|
59
|
-
|
|
59
|
+
A.filter((L) => L.showInSidebar).forEach((L) => {
|
|
60
|
+
V.registerAction(L.label, L.label), L?.links?.forEach((C) => V.registerAction(`${L.label} -> ${C.label}`, `${L.label} -> ${C.label}`));
|
|
60
61
|
});
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
const Y = () => {
|
|
63
|
+
if (c === "open") {
|
|
64
|
+
M(A);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
M(
|
|
68
|
+
A.map((L) => ({
|
|
69
|
+
...L,
|
|
70
|
+
disabled: !0,
|
|
71
|
+
links: L.links && L.links.map((C) => ({ ...C, disabled: !0 }))
|
|
72
|
+
}))
|
|
73
|
+
);
|
|
74
|
+
}, P = () => {
|
|
75
|
+
x.current = !0;
|
|
76
|
+
const L = A.map((C) => ({
|
|
77
|
+
...C,
|
|
78
|
+
disabled: !V.hasPermission(C.label),
|
|
79
|
+
links: C.links && C.links.map((_) => {
|
|
80
|
+
const H = V.hasPermission(`${C.label} -> ${_.label}`);
|
|
68
81
|
return {
|
|
69
|
-
...
|
|
70
|
-
disabled: !
|
|
82
|
+
..._,
|
|
83
|
+
disabled: !H
|
|
71
84
|
};
|
|
72
85
|
})
|
|
73
86
|
}));
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
87
|
+
M(L), g(!1), f(null);
|
|
88
|
+
}, F = !V.isLoading() && !V.isError();
|
|
89
|
+
if (V.isError()) {
|
|
90
|
+
x.current = !0;
|
|
91
|
+
const L = V.getError() || "Erro ao carregar permissões de navegação";
|
|
92
|
+
f(L), g(!1), Y();
|
|
80
93
|
return;
|
|
81
94
|
}
|
|
82
|
-
if (
|
|
83
|
-
|
|
95
|
+
if (F) {
|
|
96
|
+
P();
|
|
84
97
|
return;
|
|
85
98
|
}
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
const
|
|
89
|
-
if (!
|
|
90
|
-
clearInterval(
|
|
91
|
-
const
|
|
92
|
-
|
|
99
|
+
g(!0), f(null);
|
|
100
|
+
let Q = !1;
|
|
101
|
+
const O = setInterval(() => {
|
|
102
|
+
if (!Q && V.isError()) {
|
|
103
|
+
clearInterval(O), x.current = !0;
|
|
104
|
+
const L = V.getError() || "Erro ao carregar permissões de navegação";
|
|
105
|
+
f(L), g(!1), Y();
|
|
93
106
|
}
|
|
94
|
-
}, 100),
|
|
95
|
-
|
|
107
|
+
}, 100), v = setTimeout(() => {
|
|
108
|
+
Q || (clearInterval(O), console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - aguardando a resposta com o menu fechado"), Y(), g(!1));
|
|
96
109
|
}, 3e3);
|
|
97
|
-
return
|
|
98
|
-
|
|
110
|
+
return V.apply(() => {
|
|
111
|
+
Q || (clearInterval(O), clearTimeout(v), P());
|
|
112
|
+
}).catch(() => {
|
|
99
113
|
}), () => {
|
|
100
|
-
|
|
114
|
+
Q = !0, clearInterval(O), clearTimeout(v);
|
|
101
115
|
};
|
|
102
|
-
}, [t?.id, a, A,
|
|
116
|
+
}, [t?.id, a, A, V, M, c]), /* @__PURE__ */ r(
|
|
103
117
|
rA.Provider,
|
|
104
118
|
{
|
|
105
119
|
value: {
|
|
106
|
-
navigationData:
|
|
107
|
-
setNavigationData:
|
|
120
|
+
navigationData: E,
|
|
121
|
+
setNavigationData: M,
|
|
108
122
|
user: t,
|
|
109
123
|
owner: o,
|
|
110
124
|
company: e,
|
|
111
125
|
navigationRootLink: n,
|
|
112
|
-
collapsed:
|
|
113
|
-
setCollapsed:
|
|
114
|
-
hidden:
|
|
115
|
-
setHidden:
|
|
126
|
+
collapsed: d,
|
|
127
|
+
setCollapsed: u,
|
|
128
|
+
hidden: p,
|
|
129
|
+
setHidden: y,
|
|
116
130
|
onNavigationDataChange: i,
|
|
117
|
-
isLoadingPermissions:
|
|
118
|
-
permissionsError:
|
|
131
|
+
isLoadingPermissions: m,
|
|
132
|
+
permissionsError: b
|
|
119
133
|
},
|
|
120
134
|
children: s
|
|
121
135
|
}
|
|
122
136
|
);
|
|
123
|
-
},
|
|
137
|
+
}, Mn = ({ children: A }) => /* @__PURE__ */ r(Ye, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: A }), Ut = () => {
|
|
124
138
|
const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(ne().language);
|
|
125
139
|
oe(() => {
|
|
126
140
|
const i = (h) => {
|
|
@@ -153,9 +167,9 @@ const rA = xe.createContext({}), Bt = ({
|
|
|
153
167
|
case "es-CR":
|
|
154
168
|
return /* @__PURE__ */ r(gt, { size: 24 });
|
|
155
169
|
case "es-CU":
|
|
156
|
-
return /* @__PURE__ */ r(pt, { size: 24 });
|
|
157
|
-
case "es-DO":
|
|
158
170
|
return /* @__PURE__ */ r(ft, { size: 24 });
|
|
171
|
+
case "es-DO":
|
|
172
|
+
return /* @__PURE__ */ r(pt, { size: 24 });
|
|
159
173
|
case "es-EC":
|
|
160
174
|
return /* @__PURE__ */ r(ht, { size: 24 });
|
|
161
175
|
case "es-GT":
|
|
@@ -197,7 +211,7 @@ const rA = xe.createContext({}), Bt = ({
|
|
|
197
211
|
ne().changeLanguage(i);
|
|
198
212
|
};
|
|
199
213
|
return /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
200
|
-
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(
|
|
214
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Me, { variant: "transparent", color: o ? "white" : "blue", title: ne().t("toggleLanguage"), children: s(e) }) }),
|
|
201
215
|
/* @__PURE__ */ r(ie.Dropdown, { children: a() })
|
|
202
216
|
] });
|
|
203
217
|
}, Ht = () => {
|
|
@@ -244,7 +258,7 @@ const rA = xe.createContext({}), Bt = ({
|
|
|
244
258
|
A ? A() : s();
|
|
245
259
|
}, l = n === "dark";
|
|
246
260
|
return /* @__PURE__ */ r(
|
|
247
|
-
|
|
261
|
+
Me,
|
|
248
262
|
{
|
|
249
263
|
variant: "transparent",
|
|
250
264
|
color: l ? t : o,
|
|
@@ -262,7 +276,7 @@ function jt({ category: A, label: t, color: o, description: e, image: n, onClick
|
|
|
262
276
|
label: `${ne().t(t || "")}`,
|
|
263
277
|
description: e ? ne().t(e) : void 0,
|
|
264
278
|
leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Qr, { src: n, alt: ne().t(t || ""), width: 24, height: 24 }) }) : void 0,
|
|
265
|
-
rightSection: A ? /* @__PURE__ */ r(
|
|
279
|
+
rightSection: A ? /* @__PURE__ */ r(fA, { color: o, size: "sm", children: ne().t(A) }) : void 0
|
|
266
280
|
},
|
|
267
281
|
t
|
|
268
282
|
);
|
|
@@ -298,7 +312,7 @@ const Xt = ({ navigationData: A, color: t }) => {
|
|
|
298
312
|
return h && h.toLowerCase().includes(o.toLowerCase().trim());
|
|
299
313
|
}).map((i) => /* @__PURE__ */ r(jt, { ...i }, i.id));
|
|
300
314
|
return /* @__PURE__ */ r(Pe, { children: a && a.length > 0 ? /* @__PURE__ */ R(Pe, { children: [
|
|
301
|
-
/* @__PURE__ */ r(
|
|
315
|
+
/* @__PURE__ */ r(De, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r($r, { color: t, leftSection: /* @__PURE__ */ r(Ur, { size: "24px" }), onClick: () => Ct.open() }) }),
|
|
302
316
|
/* @__PURE__ */ R(
|
|
303
317
|
Ue.Root,
|
|
304
318
|
{
|
|
@@ -327,62 +341,62 @@ const Xt = ({ navigationData: A, color: t }) => {
|
|
|
327
341
|
hideAutoHeaderActionsOnUserMenuBreakPoint: d,
|
|
328
342
|
withDividerAfterUserMenuToggleColorScheme: u = !0,
|
|
329
343
|
user: p,
|
|
330
|
-
navigationData:
|
|
331
|
-
logo:
|
|
332
|
-
headerActions:
|
|
333
|
-
styleLogo:
|
|
344
|
+
navigationData: y = [],
|
|
345
|
+
logo: m,
|
|
346
|
+
headerActions: g,
|
|
347
|
+
styleLogo: b,
|
|
334
348
|
showLanguageSelector: f = !1,
|
|
335
349
|
sideBarHiddenBreakPoint: x,
|
|
336
|
-
headerLeftContent:
|
|
337
|
-
toggleColorScheme:
|
|
338
|
-
logoLeftSection:
|
|
339
|
-
logoRightSection:
|
|
350
|
+
headerLeftContent: E,
|
|
351
|
+
toggleColorScheme: M,
|
|
352
|
+
logoLeftSection: V,
|
|
353
|
+
logoRightSection: U,
|
|
340
354
|
showBurger: Y = !0,
|
|
341
|
-
showCommands:
|
|
342
|
-
sunColor:
|
|
343
|
-
moonColor:
|
|
344
|
-
styles:
|
|
355
|
+
showCommands: P = !0,
|
|
356
|
+
sunColor: F,
|
|
357
|
+
moonColor: z,
|
|
358
|
+
styles: Q
|
|
345
359
|
}) => {
|
|
346
|
-
const
|
|
347
|
-
`(max-width: ${x ?
|
|
348
|
-
),
|
|
349
|
-
`(max-width: ${d ?
|
|
360
|
+
const O = me(), { colorScheme: v, toggleColorScheme: L } = de(), C = ye(rA), _ = MA(
|
|
361
|
+
`(max-width: ${x ? pe(x) : O.breakpoints.md})`
|
|
362
|
+
), H = MA(
|
|
363
|
+
`(max-width: ${d ? pe(d) : O.breakpoints.md})`
|
|
350
364
|
);
|
|
351
|
-
let
|
|
352
|
-
return i && (h = !
|
|
365
|
+
let I = !1, G = !1;
|
|
366
|
+
return i && (h = !H, c = !H, t = H, o = H, a = H, u = H, f && (G = !H, I = H)), /* @__PURE__ */ R(Pe, { children: [
|
|
353
367
|
/* @__PURE__ */ R(Ye, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
354
|
-
|
|
368
|
+
V,
|
|
355
369
|
/* @__PURE__ */ r(
|
|
356
370
|
"img",
|
|
357
371
|
{
|
|
358
372
|
style: {
|
|
359
373
|
height: 50,
|
|
360
|
-
...
|
|
374
|
+
...b
|
|
361
375
|
},
|
|
362
376
|
alt: "logo",
|
|
363
|
-
src:
|
|
377
|
+
src: m
|
|
364
378
|
}
|
|
365
379
|
),
|
|
366
|
-
|
|
380
|
+
U
|
|
367
381
|
] }),
|
|
368
382
|
Y && /* @__PURE__ */ r(
|
|
369
383
|
Kr,
|
|
370
384
|
{
|
|
371
|
-
opened:
|
|
372
|
-
onClick: () =>
|
|
385
|
+
opened: C.hidden ? C.hidden : !1,
|
|
386
|
+
onClick: () => C.setHidden(!C.hidden),
|
|
373
387
|
size: "sm",
|
|
374
|
-
color:
|
|
388
|
+
color: O.colors.gray[7],
|
|
375
389
|
mx: { base: "xs", xs: "lg", sm: "xl" },
|
|
376
|
-
display:
|
|
390
|
+
display: _ ? "" : "none"
|
|
377
391
|
}
|
|
378
392
|
),
|
|
379
|
-
/* @__PURE__ */ r("div", { children:
|
|
380
|
-
/* @__PURE__ */ r(
|
|
393
|
+
/* @__PURE__ */ r("div", { children: P && /* @__PURE__ */ r(Xt, { navigationData: y }) }),
|
|
394
|
+
/* @__PURE__ */ r(q, { style: { flex: 1 }, children: E }),
|
|
381
395
|
/* @__PURE__ */ R(qt, { children: [
|
|
382
|
-
h &&
|
|
383
|
-
c && /* @__PURE__ */ r(Yt, { toggleColorScheme:
|
|
396
|
+
h && g,
|
|
397
|
+
c && /* @__PURE__ */ r(Yt, { toggleColorScheme: M, sunColor: F, moonColor: z }),
|
|
384
398
|
G && /* @__PURE__ */ r(Ut, {}),
|
|
385
|
-
/* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles:
|
|
399
|
+
/* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: Q?.menu, children: [
|
|
386
400
|
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ R("div", { children: [
|
|
387
401
|
/* @__PURE__ */ r(
|
|
388
402
|
iA,
|
|
@@ -422,12 +436,12 @@ const Xt = ({ navigationData: A, color: t }) => {
|
|
|
422
436
|
t && /* @__PURE__ */ r(
|
|
423
437
|
ie.Item,
|
|
424
438
|
{
|
|
425
|
-
leftSection:
|
|
426
|
-
onClick:
|
|
439
|
+
leftSection: v === "dark" ? /* @__PURE__ */ r(_A, { size: e }) : /* @__PURE__ */ r(WA, { size: e }),
|
|
440
|
+
onClick: M || L,
|
|
427
441
|
children: `${ne().t("archbase:toggleColorScheme")}`
|
|
428
442
|
}
|
|
429
443
|
),
|
|
430
|
-
|
|
444
|
+
I && /* @__PURE__ */ r(Ht, {}),
|
|
431
445
|
u && /* @__PURE__ */ r(ie.Divider, {}),
|
|
432
446
|
n && s
|
|
433
447
|
] })
|
|
@@ -439,8 +453,8 @@ function $A(A, t, o, e, n, s, a, l, i, h) {
|
|
|
439
453
|
const c = s ? A.colorScheme === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][7] : void 0, d = s ? (A.colorScheme === "dark", A.colors[A.primaryColor][0]) : void 0, u = A.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", p = "0.5";
|
|
440
454
|
if (e.links) {
|
|
441
455
|
if (!(e.disabled && e.hideDisabledItem))
|
|
442
|
-
return /* @__PURE__ */ r(
|
|
443
|
-
|
|
456
|
+
return /* @__PURE__ */ r(De, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
|
|
457
|
+
Dt,
|
|
444
458
|
{
|
|
445
459
|
rootStyles: {
|
|
446
460
|
fontSize: "16px",
|
|
@@ -472,17 +486,17 @@ function $A(A, t, o, e, n, s, a, l, i, h) {
|
|
|
472
486
|
defaultOpen: !e.disabled,
|
|
473
487
|
label: t ? "" : Re.t(e.label),
|
|
474
488
|
disabled: e.disabled,
|
|
475
|
-
children: e.links && e.links.filter((
|
|
489
|
+
children: e.links && e.links.filter((y) => y.showInSidebar === !0 && (!y.disabled || !y.hideDisabledItem)).map((y, m) => /* @__PURE__ */ r(
|
|
476
490
|
OA,
|
|
477
491
|
{
|
|
478
|
-
onClick: () => o(
|
|
492
|
+
onClick: () => o(y),
|
|
479
493
|
rootStyles: {
|
|
480
494
|
[`.${te.icon}`]: {
|
|
481
495
|
background: c,
|
|
482
|
-
color: l &&
|
|
496
|
+
color: l && y.link === a ? "white" : d
|
|
483
497
|
},
|
|
484
498
|
[`.${te.label}`]: {
|
|
485
|
-
color: l &&
|
|
499
|
+
color: l && y.link === a ? "white" : i
|
|
486
500
|
},
|
|
487
501
|
[`.${te.button}`]: {
|
|
488
502
|
paddingLeft: "40px !important",
|
|
@@ -506,19 +520,19 @@ function $A(A, t, o, e, n, s, a, l, i, h) {
|
|
|
506
520
|
}
|
|
507
521
|
}
|
|
508
522
|
},
|
|
509
|
-
id:
|
|
510
|
-
icon:
|
|
511
|
-
disabled: typeof
|
|
512
|
-
active: l &&
|
|
513
|
-
children: Re.t(
|
|
523
|
+
id: y.label,
|
|
524
|
+
icon: y.icon,
|
|
525
|
+
disabled: typeof y.disabled == "function" ? y.disabled() : y.disabled,
|
|
526
|
+
active: l && y.link === a,
|
|
527
|
+
children: Re.t(y.label)
|
|
514
528
|
},
|
|
515
|
-
|
|
529
|
+
m
|
|
516
530
|
))
|
|
517
531
|
},
|
|
518
532
|
n
|
|
519
533
|
) });
|
|
520
534
|
} else if (e.showInSidebar && (!e.disabled || !e.hideDisabledItem))
|
|
521
|
-
return /* @__PURE__ */ r(
|
|
535
|
+
return /* @__PURE__ */ r(De, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
|
|
522
536
|
OA,
|
|
523
537
|
{
|
|
524
538
|
rootStyles: {
|
|
@@ -598,7 +612,7 @@ const _t = (A) => ({
|
|
|
598
612
|
}
|
|
599
613
|
}
|
|
600
614
|
}), Wt = (A, t, o, e, n, s, a, l, i, h, c) => {
|
|
601
|
-
const d = _t(), u = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" },
|
|
615
|
+
const d = _t(), u = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" }, y = a ? A === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
|
|
602
616
|
return {
|
|
603
617
|
root: {
|
|
604
618
|
fontSize: "14px",
|
|
@@ -607,7 +621,7 @@ const _t = (A) => ({
|
|
|
607
621
|
color: t.white
|
|
608
622
|
},
|
|
609
623
|
icon: {
|
|
610
|
-
background:
|
|
624
|
+
background: y,
|
|
611
625
|
color: c,
|
|
612
626
|
[`&.${te.disabled}`]: {
|
|
613
627
|
color: d[A].menu.disabled.color
|
|
@@ -634,8 +648,8 @@ const _t = (A) => ({
|
|
|
634
648
|
height: l,
|
|
635
649
|
...u
|
|
636
650
|
},
|
|
637
|
-
label: ({ open:
|
|
638
|
-
fontWeight:
|
|
651
|
+
label: ({ open: m }) => ({
|
|
652
|
+
fontWeight: m ? 600 : void 0,
|
|
639
653
|
color: h,
|
|
640
654
|
"&:hover": {
|
|
641
655
|
color: t.white
|
|
@@ -656,12 +670,12 @@ function Zt(A, t, o, e, n, s, a, l, i, h, c) {
|
|
|
656
670
|
overflowY: "hidden",
|
|
657
671
|
left: 0,
|
|
658
672
|
right: 0,
|
|
659
|
-
height: a ? "calc(100vh - 28px)" : `${
|
|
673
|
+
height: a ? "calc(100vh - 28px)" : `${pe(l)}px`
|
|
660
674
|
}
|
|
661
675
|
},
|
|
662
676
|
collapsed: t,
|
|
663
|
-
width: `${
|
|
664
|
-
collapsedWidth: `${
|
|
677
|
+
width: `${pe(o)}px`,
|
|
678
|
+
collapsedWidth: `${pe(e)}px`,
|
|
665
679
|
children: [
|
|
666
680
|
i && /* @__PURE__ */ r(Pe, { children: i }),
|
|
667
681
|
/* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(lr, { rootStyles: { background: c }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(Pe, { children: s }) }) }),
|
|
@@ -677,7 +691,7 @@ function QA({
|
|
|
677
691
|
}) {
|
|
678
692
|
const e = me(), { colorScheme: n } = de(), s = o ?? (n === "dark" ? e.colors.dark[7] : e.white);
|
|
679
693
|
return t ? /* @__PURE__ */ r(
|
|
680
|
-
|
|
694
|
+
W,
|
|
681
695
|
{
|
|
682
696
|
gap: "sm",
|
|
683
697
|
p: "xs",
|
|
@@ -688,7 +702,7 @@ function QA({
|
|
|
688
702
|
height: "100%"
|
|
689
703
|
},
|
|
690
704
|
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ r(
|
|
691
|
-
|
|
705
|
+
fe,
|
|
692
706
|
{
|
|
693
707
|
height: 32,
|
|
694
708
|
width: 32,
|
|
@@ -698,7 +712,7 @@ function QA({
|
|
|
698
712
|
))
|
|
699
713
|
}
|
|
700
714
|
) : /* @__PURE__ */ r(
|
|
701
|
-
|
|
715
|
+
W,
|
|
702
716
|
{
|
|
703
717
|
gap: "xs",
|
|
704
718
|
p: "md",
|
|
@@ -710,7 +724,7 @@ function QA({
|
|
|
710
724
|
},
|
|
711
725
|
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(Le, { gap: "sm", wrap: "nowrap", children: [
|
|
712
726
|
/* @__PURE__ */ r(
|
|
713
|
-
|
|
727
|
+
fe,
|
|
714
728
|
{
|
|
715
729
|
height: 24,
|
|
716
730
|
width: 24,
|
|
@@ -718,7 +732,7 @@ function QA({
|
|
|
718
732
|
}
|
|
719
733
|
),
|
|
720
734
|
/* @__PURE__ */ r(
|
|
721
|
-
|
|
735
|
+
fe,
|
|
722
736
|
{
|
|
723
737
|
height: 18,
|
|
724
738
|
radius: "xl",
|
|
@@ -737,7 +751,7 @@ function eo({
|
|
|
737
751
|
}) {
|
|
738
752
|
const n = me(), { colorScheme: s } = de(), a = e ?? (s === "dark" ? n.colors.dark[6] : n.colors.gray[2]);
|
|
739
753
|
return /* @__PURE__ */ r(
|
|
740
|
-
|
|
754
|
+
W,
|
|
741
755
|
{
|
|
742
756
|
gap: "md",
|
|
743
757
|
p: "xs",
|
|
@@ -747,9 +761,9 @@ function eo({
|
|
|
747
761
|
height: o,
|
|
748
762
|
backgroundColor: a
|
|
749
763
|
},
|
|
750
|
-
children: Array.from({ length: A }).map((l, i) => /* @__PURE__ */ R(
|
|
764
|
+
children: Array.from({ length: A }).map((l, i) => /* @__PURE__ */ R(W, { gap: 4, align: "center", children: [
|
|
751
765
|
/* @__PURE__ */ r(
|
|
752
|
-
|
|
766
|
+
fe,
|
|
753
767
|
{
|
|
754
768
|
height: 48,
|
|
755
769
|
width: 48,
|
|
@@ -758,7 +772,7 @@ function eo({
|
|
|
758
772
|
}
|
|
759
773
|
),
|
|
760
774
|
/* @__PURE__ */ r(
|
|
761
|
-
|
|
775
|
+
fe,
|
|
762
776
|
{
|
|
763
777
|
height: 10,
|
|
764
778
|
width: 40,
|
|
@@ -775,7 +789,7 @@ function KA({
|
|
|
775
789
|
children: o
|
|
776
790
|
}) {
|
|
777
791
|
const e = me(), { colorScheme: n } = de(), s = t ?? (n === "dark" ? e.colors.dark[7] : e.white), a = n === "dark" ? e.colors.red[4] : e.colors.red[6];
|
|
778
|
-
return o ? /* @__PURE__ */ r(Pe, { children: o }) : /* @__PURE__ */ r(Je, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(
|
|
792
|
+
return o ? /* @__PURE__ */ r(Pe, { children: o }) : /* @__PURE__ */ r(Je, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(W, { align: "center", gap: "xs", children: [
|
|
779
793
|
/* @__PURE__ */ r(Hr, { size: 32, color: a }),
|
|
780
794
|
/* @__PURE__ */ r(Te, { size: "sm", c: a, ta: "center", children: A })
|
|
781
795
|
] }) });
|
|
@@ -795,56 +809,56 @@ function Ao({
|
|
|
795
809
|
groupLabelDarkColor: d,
|
|
796
810
|
groupLabelLightColor: u,
|
|
797
811
|
collapsed: p,
|
|
798
|
-
onMenuItemClick:
|
|
799
|
-
onClickActionIcon:
|
|
800
|
-
withBorder:
|
|
801
|
-
showGroupLabels:
|
|
812
|
+
onMenuItemClick: y,
|
|
813
|
+
onClickActionIcon: m,
|
|
814
|
+
withBorder: g = !1,
|
|
815
|
+
showGroupLabels: b = !0,
|
|
802
816
|
theme: f,
|
|
803
817
|
sidebarRef: x,
|
|
804
|
-
defaultGroupIcon:
|
|
805
|
-
selectedGroupName:
|
|
806
|
-
sideBarHeaderContent:
|
|
807
|
-
iconsWithBackground:
|
|
818
|
+
defaultGroupIcon: E,
|
|
819
|
+
selectedGroupName: M,
|
|
820
|
+
sideBarHeaderContent: V,
|
|
821
|
+
iconsWithBackground: U = !1,
|
|
808
822
|
menuItemHeight: Y = 40,
|
|
809
|
-
highlightActiveMenuItem:
|
|
810
|
-
backgroundDarkColor:
|
|
811
|
-
backgroundLightColor:
|
|
812
|
-
textDarkColor:
|
|
813
|
-
textLightColor:
|
|
814
|
-
iconDarkColor:
|
|
815
|
-
iconLightColor:
|
|
816
|
-
collapsedSubmenuWidth:
|
|
817
|
-
isLoading:
|
|
818
|
-
loadingError:
|
|
819
|
-
loadingComponent:
|
|
823
|
+
highlightActiveMenuItem: P = !0,
|
|
824
|
+
backgroundDarkColor: F,
|
|
825
|
+
backgroundLightColor: z,
|
|
826
|
+
textDarkColor: Q,
|
|
827
|
+
textLightColor: O,
|
|
828
|
+
iconDarkColor: v,
|
|
829
|
+
iconLightColor: L,
|
|
830
|
+
collapsedSubmenuWidth: C,
|
|
831
|
+
isLoading: _ = !1,
|
|
832
|
+
loadingError: H,
|
|
833
|
+
loadingComponent: I,
|
|
820
834
|
errorComponent: G,
|
|
821
|
-
skeletonItemCount:
|
|
835
|
+
skeletonItemCount: re = 8,
|
|
822
836
|
skeletonGroupCount: Ce = 3
|
|
823
837
|
}) {
|
|
824
|
-
const [se, be] = ge(""), we = bA(), Se = je(), { colorScheme:
|
|
825
|
-
const
|
|
826
|
-
return A.forEach((
|
|
827
|
-
if (
|
|
838
|
+
const [se, be] = ge(""), we = bA(), Se = je(), { colorScheme: S } = de(), k = S === "dark" ? F ?? f.colors.dark[7] : z ?? f.white, $ = s || (S === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), D = S === "dark" ? Q ?? "var(--mantine-color-text)" : O ?? "var(--mantine-color-text)", B = S === "dark" ? v ?? f.colors[f.primaryColor][0] : L ?? f.colors[f.primaryColor][7], T = ce(() => {
|
|
839
|
+
const ee = /* @__PURE__ */ new Set();
|
|
840
|
+
return A.forEach((J) => {
|
|
841
|
+
if (J.showInSidebar && (!J.disabled || !J.hideDisabledItem)) {
|
|
828
842
|
let ke = !1;
|
|
829
|
-
|
|
830
|
-
icon:
|
|
843
|
+
J.group || (J.group = {
|
|
844
|
+
icon: E || /* @__PURE__ */ r(ZA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
831
845
|
label: "Default",
|
|
832
846
|
name: "Default",
|
|
833
847
|
hint: "Default",
|
|
834
848
|
indexOrder: 0
|
|
835
|
-
}),
|
|
836
|
-
|
|
837
|
-
}), ke ||
|
|
838
|
-
name:
|
|
839
|
-
indexOrder:
|
|
849
|
+
}), ee.forEach((K) => {
|
|
850
|
+
K.name === J.group.name && (ke = !0);
|
|
851
|
+
}), ke || ee.add({
|
|
852
|
+
name: J.group.name,
|
|
853
|
+
indexOrder: J.group.indexOrder,
|
|
840
854
|
component: /* @__PURE__ */ r(
|
|
841
|
-
|
|
855
|
+
De,
|
|
842
856
|
{
|
|
843
|
-
content:
|
|
844
|
-
label:
|
|
845
|
-
disabled:
|
|
857
|
+
content: J.group.hint,
|
|
858
|
+
label: J.group.label,
|
|
859
|
+
disabled: b,
|
|
846
860
|
children: /* @__PURE__ */ R(
|
|
847
|
-
|
|
861
|
+
W,
|
|
848
862
|
{
|
|
849
863
|
gap: "2px",
|
|
850
864
|
style: {
|
|
@@ -855,69 +869,69 @@ function Ao({
|
|
|
855
869
|
},
|
|
856
870
|
children: [
|
|
857
871
|
/* @__PURE__ */ r(
|
|
858
|
-
|
|
872
|
+
Me,
|
|
859
873
|
{
|
|
860
874
|
size: "48px",
|
|
861
|
-
variant:
|
|
862
|
-
color:
|
|
875
|
+
variant: J.group.name === se ? "filled" : l ? "subtle" : "light",
|
|
876
|
+
color: J.group.name === se ? $ : a,
|
|
863
877
|
onClick: () => {
|
|
864
|
-
be((
|
|
878
|
+
be((K) => (m && m(K, J.group.name), J.group.name === K && !i ? "" : J.group.name));
|
|
865
879
|
},
|
|
866
|
-
children:
|
|
880
|
+
children: J.group.icon
|
|
867
881
|
}
|
|
868
882
|
),
|
|
869
|
-
|
|
883
|
+
b ? /* @__PURE__ */ r(
|
|
870
884
|
Te,
|
|
871
885
|
{
|
|
872
886
|
size: "xs",
|
|
873
|
-
c:
|
|
874
|
-
children:
|
|
887
|
+
c: S === "dark" ? d || f.colors[f.primaryColor][2] : u || f.colors[f.primaryColor][2],
|
|
888
|
+
children: J.group.label
|
|
875
889
|
}
|
|
876
890
|
) : !1
|
|
877
891
|
]
|
|
878
892
|
}
|
|
879
893
|
)
|
|
880
894
|
},
|
|
881
|
-
|
|
895
|
+
J.group.name
|
|
882
896
|
)
|
|
883
897
|
});
|
|
884
898
|
}
|
|
885
|
-
}),
|
|
886
|
-
const ke = A.filter((
|
|
887
|
-
|
|
888
|
-
}), [...
|
|
889
|
-
}, [A, se,
|
|
890
|
-
|
|
899
|
+
}), ee.forEach((J) => {
|
|
900
|
+
const ke = A.filter((K) => K.showInSidebar === !0 && (!K.disabled || !K.hideDisabledItem) && K.group && K.group.name === J.name);
|
|
901
|
+
J.links = ke.map((K, le) => $A(f, p, y, K, le, U, Se.pathname, P, D, C));
|
|
902
|
+
}), [...ee].sort((J, ke) => J.indexOrder - ke.indexOrder);
|
|
903
|
+
}, [A, se, S, p, we.selectedCompany, P, Se]), N = Wt(
|
|
904
|
+
S,
|
|
891
905
|
f,
|
|
892
906
|
p,
|
|
893
907
|
35,
|
|
894
|
-
Number(
|
|
895
|
-
|
|
896
|
-
|
|
908
|
+
Number(pe(n)),
|
|
909
|
+
T.length > 1,
|
|
910
|
+
U,
|
|
897
911
|
Y,
|
|
898
|
-
|
|
899
|
-
|
|
912
|
+
k,
|
|
913
|
+
D,
|
|
900
914
|
B
|
|
901
|
-
),
|
|
902
|
-
|
|
915
|
+
), X = p || se === "" ? "0px" : `calc(${o} - ${t})`, he = l || (S === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), Ie = w(() => {
|
|
916
|
+
M && T.map((ee) => ee.name).includes(M) ? be(M) : T.length > 1 && be("Default");
|
|
903
917
|
}, []);
|
|
904
918
|
oe(() => {
|
|
905
919
|
Ie();
|
|
906
920
|
}, []), oe(() => {
|
|
907
921
|
p ? be("") : se === "" && Ie();
|
|
908
922
|
}, [p]);
|
|
909
|
-
const
|
|
923
|
+
const j = () => H ? G || /* @__PURE__ */ r(
|
|
910
924
|
KA,
|
|
911
925
|
{
|
|
912
|
-
message:
|
|
913
|
-
backgroundColor:
|
|
926
|
+
message: H,
|
|
927
|
+
backgroundColor: k
|
|
914
928
|
}
|
|
915
|
-
) :
|
|
929
|
+
) : _ ? I || /* @__PURE__ */ r(
|
|
916
930
|
QA,
|
|
917
931
|
{
|
|
918
|
-
itemCount:
|
|
932
|
+
itemCount: re,
|
|
919
933
|
collapsed: p,
|
|
920
|
-
backgroundColor:
|
|
934
|
+
backgroundColor: k
|
|
921
935
|
}
|
|
922
936
|
) : se !== "" ? /* @__PURE__ */ r(
|
|
923
937
|
sr,
|
|
@@ -925,16 +939,16 @@ function Ao({
|
|
|
925
939
|
ref: x,
|
|
926
940
|
rootStyles: {
|
|
927
941
|
[`.${ar.container}`]: {
|
|
928
|
-
background:
|
|
942
|
+
background: k,
|
|
929
943
|
overflowX: "hidden",
|
|
930
944
|
overflowY: "hidden",
|
|
931
945
|
left: 0,
|
|
932
|
-
height: `${
|
|
946
|
+
height: `${pe(e)}px`
|
|
933
947
|
}
|
|
934
948
|
},
|
|
935
|
-
style: { borderColor:
|
|
949
|
+
style: { borderColor: S === "dark" ? "#000" : "#efefef" },
|
|
936
950
|
collapsed: p,
|
|
937
|
-
width: `${
|
|
951
|
+
width: `${pe(X)}`,
|
|
938
952
|
collapsedWidth: "0px",
|
|
939
953
|
children: /* @__PURE__ */ r(
|
|
940
954
|
ze,
|
|
@@ -943,21 +957,21 @@ function Ao({
|
|
|
943
957
|
overflowY: "auto",
|
|
944
958
|
overflowX: "hidden",
|
|
945
959
|
height: "100%",
|
|
946
|
-
width:
|
|
960
|
+
width: X
|
|
947
961
|
},
|
|
948
|
-
children: /* @__PURE__ */ r(lr, { rootStyles: { background:
|
|
962
|
+
children: /* @__PURE__ */ r(lr, { rootStyles: { background: k }, menuItemStyles: N, closeOnClick: !0, children: T.find((ee) => ee.name === se)?.links || null })
|
|
949
963
|
}
|
|
950
964
|
)
|
|
951
965
|
}
|
|
952
|
-
) : null, ve = () =>
|
|
966
|
+
) : null, ve = () => _ && T.length === 0 ? /* @__PURE__ */ r(
|
|
953
967
|
eo,
|
|
954
968
|
{
|
|
955
969
|
groupCount: Ce,
|
|
956
970
|
width: t,
|
|
957
971
|
height: e
|
|
958
972
|
}
|
|
959
|
-
) :
|
|
960
|
-
|
|
973
|
+
) : T.length !== 0 ? /* @__PURE__ */ r(
|
|
974
|
+
W,
|
|
961
975
|
{
|
|
962
976
|
gap: "4px",
|
|
963
977
|
style: {
|
|
@@ -966,41 +980,41 @@ function Ao({
|
|
|
966
980
|
padding: "4px",
|
|
967
981
|
backgroundColor: he
|
|
968
982
|
},
|
|
969
|
-
children:
|
|
983
|
+
children: T.map((ee) => /* @__PURE__ */ r(xe.Fragment, { children: ee.component }, ee.name))
|
|
970
984
|
}
|
|
971
|
-
) : null,
|
|
985
|
+
) : null, Z = () => H ? G || /* @__PURE__ */ r(
|
|
972
986
|
KA,
|
|
973
987
|
{
|
|
974
|
-
message:
|
|
975
|
-
backgroundColor:
|
|
988
|
+
message: H,
|
|
989
|
+
backgroundColor: k
|
|
976
990
|
}
|
|
977
|
-
) :
|
|
991
|
+
) : _ ? I || /* @__PURE__ */ r(
|
|
978
992
|
QA,
|
|
979
993
|
{
|
|
980
|
-
itemCount:
|
|
994
|
+
itemCount: re,
|
|
981
995
|
collapsed: p,
|
|
982
|
-
backgroundColor:
|
|
996
|
+
backgroundColor: k
|
|
983
997
|
}
|
|
984
998
|
) : A.map(
|
|
985
|
-
(
|
|
999
|
+
(ee, Ee) => $A(f, p, y, ee, Ee, U, Se.pathname, P, D, C)
|
|
986
1000
|
);
|
|
987
|
-
return /* @__PURE__ */ r(Pe, { children:
|
|
1001
|
+
return /* @__PURE__ */ r(Pe, { children: T.length == 1 ? Zt(
|
|
988
1002
|
x,
|
|
989
1003
|
p,
|
|
990
1004
|
o,
|
|
991
1005
|
n,
|
|
992
|
-
|
|
993
|
-
|
|
1006
|
+
N,
|
|
1007
|
+
Z(),
|
|
994
1008
|
i,
|
|
995
1009
|
e,
|
|
996
|
-
|
|
1010
|
+
V,
|
|
997
1011
|
c,
|
|
998
|
-
|
|
1012
|
+
k
|
|
999
1013
|
) : /* @__PURE__ */ R(Ye, { direction: "column", w: p ? n : o, children: [
|
|
1000
|
-
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children:
|
|
1001
|
-
/* @__PURE__ */ R(Fr, { withBorder:
|
|
1014
|
+
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: V }),
|
|
1015
|
+
/* @__PURE__ */ R(Fr, { withBorder: g, h: e, w: "100%", display: "flex", children: [
|
|
1002
1016
|
ve(),
|
|
1003
|
-
|
|
1017
|
+
j()
|
|
1004
1018
|
] }),
|
|
1005
1019
|
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: c })
|
|
1006
1020
|
] }) });
|
|
@@ -1029,102 +1043,102 @@ function CA({
|
|
|
1029
1043
|
highlightActiveItem: c = !0,
|
|
1030
1044
|
onMenuItemClick: d
|
|
1031
1045
|
}) {
|
|
1032
|
-
const u = je(), p = qe(), [
|
|
1046
|
+
const u = je(), p = qe(), [y, m] = aA({
|
|
1033
1047
|
value: n,
|
|
1034
1048
|
defaultValue: e,
|
|
1035
1049
|
finalValue: !1,
|
|
1036
1050
|
onChange: s
|
|
1037
|
-
}), [
|
|
1051
|
+
}), [g, b] = aA({
|
|
1038
1052
|
value: l,
|
|
1039
1053
|
defaultValue: a,
|
|
1040
1054
|
finalValue: "",
|
|
1041
1055
|
onChange: i
|
|
1042
|
-
}), [f, x] = ge(""), [
|
|
1043
|
-
const
|
|
1044
|
-
return t.forEach((
|
|
1045
|
-
|
|
1046
|
-
}),
|
|
1047
|
-
}),
|
|
1048
|
-
|
|
1049
|
-
}, [
|
|
1050
|
-
|
|
1051
|
-
const
|
|
1052
|
-
return
|
|
1056
|
+
}), [f, x] = ge(""), [E, M] = ge(() => {
|
|
1057
|
+
const v = /* @__PURE__ */ new Set();
|
|
1058
|
+
return t.forEach((L, C) => {
|
|
1059
|
+
L.initiallyOpened && L.links && L.links.length > 0 && v.add(`group-${C}`);
|
|
1060
|
+
}), v;
|
|
1061
|
+
}), V = u.pathname, U = w(() => {
|
|
1062
|
+
m(!y);
|
|
1063
|
+
}, [y, m]), Y = w((v) => {
|
|
1064
|
+
M((L) => {
|
|
1065
|
+
const C = new Set(L);
|
|
1066
|
+
return C.has(v) ? C.delete(v) : C.add(v), C;
|
|
1053
1067
|
});
|
|
1054
|
-
}, []),
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1068
|
+
}, []), P = w((v) => {
|
|
1069
|
+
M((L) => {
|
|
1070
|
+
const C = new Set(L);
|
|
1071
|
+
return C.add(v), C;
|
|
1058
1072
|
});
|
|
1059
|
-
}, []),
|
|
1060
|
-
|
|
1061
|
-
const
|
|
1062
|
-
return
|
|
1073
|
+
}, []), F = w((v) => {
|
|
1074
|
+
M((L) => {
|
|
1075
|
+
const C = new Set(L);
|
|
1076
|
+
return C.delete(v), C;
|
|
1063
1077
|
});
|
|
1064
|
-
}, []),
|
|
1078
|
+
}, []), z = ce(() => {
|
|
1065
1079
|
if (!f.trim())
|
|
1066
1080
|
return t;
|
|
1067
|
-
const
|
|
1068
|
-
const
|
|
1069
|
-
return (
|
|
1070
|
-
...
|
|
1071
|
-
links: G.length > 0 ? G :
|
|
1081
|
+
const v = f.toLowerCase().trim(), L = (C) => C.reduce((_, H) => {
|
|
1082
|
+
const I = H.label.toLowerCase().includes(v), G = H.links ? L(H.links) : [];
|
|
1083
|
+
return (I || G.length > 0) && _.push({
|
|
1084
|
+
...H,
|
|
1085
|
+
links: G.length > 0 ? G : H.links,
|
|
1072
1086
|
// Expandir automaticamente quando há match em subitens
|
|
1073
|
-
initiallyOpened: G.length > 0 ||
|
|
1074
|
-
}),
|
|
1087
|
+
initiallyOpened: G.length > 0 || I
|
|
1088
|
+
}), _;
|
|
1075
1089
|
}, []);
|
|
1076
|
-
return
|
|
1077
|
-
}, [t, f]),
|
|
1078
|
-
(
|
|
1079
|
-
d && d(
|
|
1090
|
+
return L(t);
|
|
1091
|
+
}, [t, f]), Q = w(
|
|
1092
|
+
(v) => {
|
|
1093
|
+
d && d(v), v.link && (v.routeParams ? p(v.link, { state: v.routeParams }) : p(v.link)), v.redirect && p(v.redirect);
|
|
1080
1094
|
},
|
|
1081
1095
|
[p, d]
|
|
1082
|
-
),
|
|
1096
|
+
), O = ce(
|
|
1083
1097
|
() => ({
|
|
1084
|
-
collapsed:
|
|
1085
|
-
setCollapsed:
|
|
1086
|
-
toggleCollapsed:
|
|
1087
|
-
activeGroup:
|
|
1088
|
-
setActiveGroup:
|
|
1089
|
-
activeItemPath:
|
|
1090
|
-
navigateToItem:
|
|
1098
|
+
collapsed: y,
|
|
1099
|
+
setCollapsed: m,
|
|
1100
|
+
toggleCollapsed: U,
|
|
1101
|
+
activeGroup: g,
|
|
1102
|
+
setActiveGroup: b,
|
|
1103
|
+
activeItemPath: V,
|
|
1104
|
+
navigateToItem: Q,
|
|
1091
1105
|
searchQuery: f,
|
|
1092
1106
|
setSearchQuery: x,
|
|
1093
|
-
filteredItems:
|
|
1094
|
-
expandedGroups:
|
|
1107
|
+
filteredItems: z,
|
|
1108
|
+
expandedGroups: E,
|
|
1095
1109
|
toggleGroup: Y,
|
|
1096
|
-
expandGroup:
|
|
1097
|
-
collapseGroup:
|
|
1110
|
+
expandGroup: P,
|
|
1111
|
+
collapseGroup: F,
|
|
1098
1112
|
variant: o,
|
|
1099
1113
|
showKeyboardShortcuts: h,
|
|
1100
1114
|
highlightActiveItem: c
|
|
1101
1115
|
}),
|
|
1102
1116
|
[
|
|
1103
|
-
|
|
1104
|
-
b,
|
|
1105
|
-
V,
|
|
1117
|
+
y,
|
|
1106
1118
|
m,
|
|
1119
|
+
U,
|
|
1107
1120
|
g,
|
|
1108
|
-
|
|
1109
|
-
|
|
1121
|
+
b,
|
|
1122
|
+
V,
|
|
1123
|
+
Q,
|
|
1110
1124
|
f,
|
|
1111
|
-
|
|
1112
|
-
|
|
1125
|
+
z,
|
|
1126
|
+
E,
|
|
1113
1127
|
Y,
|
|
1114
|
-
|
|
1115
|
-
|
|
1128
|
+
P,
|
|
1129
|
+
F,
|
|
1116
1130
|
o,
|
|
1117
1131
|
h,
|
|
1118
1132
|
c
|
|
1119
1133
|
]
|
|
1120
1134
|
);
|
|
1121
|
-
return /* @__PURE__ */ r(yA.Provider, { value:
|
|
1135
|
+
return /* @__PURE__ */ r(yA.Provider, { value: O, children: A });
|
|
1122
1136
|
}
|
|
1123
1137
|
function wA({
|
|
1124
1138
|
navigationData: A,
|
|
1125
1139
|
onMenuItemClick: t
|
|
1126
1140
|
}) {
|
|
1127
|
-
const o = je(), e = qe(), n = o.pathname, s =
|
|
1141
|
+
const o = je(), e = qe(), n = o.pathname, s = w(
|
|
1128
1142
|
(d) => {
|
|
1129
1143
|
for (const u of d) {
|
|
1130
1144
|
if (u.link === n)
|
|
@@ -1138,25 +1152,25 @@ function wA({
|
|
|
1138
1152
|
return null;
|
|
1139
1153
|
},
|
|
1140
1154
|
[n]
|
|
1141
|
-
), a = ce(() => s(A), [s, A]), l =
|
|
1155
|
+
), a = ce(() => s(A), [s, A]), l = w(
|
|
1142
1156
|
(d) => d.link === n,
|
|
1143
1157
|
[n]
|
|
1144
|
-
), i =
|
|
1158
|
+
), i = w(
|
|
1145
1159
|
(d) => d.link === n ? !0 : d.links ? d.links.some((u) => i(u)) : !1,
|
|
1146
1160
|
[n]
|
|
1147
1161
|
), h = ce(() => {
|
|
1148
|
-
const d = [], u = (p,
|
|
1149
|
-
for (const
|
|
1150
|
-
const
|
|
1151
|
-
if (
|
|
1152
|
-
return d.push(...
|
|
1153
|
-
if (
|
|
1162
|
+
const d = [], u = (p, y) => {
|
|
1163
|
+
for (const m of p) {
|
|
1164
|
+
const g = [...y, m];
|
|
1165
|
+
if (m.link === n)
|
|
1166
|
+
return d.push(...g), !0;
|
|
1167
|
+
if (m.links && u(m.links, g))
|
|
1154
1168
|
return !0;
|
|
1155
1169
|
}
|
|
1156
1170
|
return !1;
|
|
1157
1171
|
};
|
|
1158
1172
|
return u(A, []), d;
|
|
1159
|
-
}, [A, n]), c =
|
|
1173
|
+
}, [A, n]), c = w(
|
|
1160
1174
|
(d) => {
|
|
1161
1175
|
(typeof d.disabled == "function" ? d.disabled() : d.disabled) || (t && t(d), d.link && (d.routeParams ? e(d.link, { state: d.routeParams }) : e(d.link)), d.redirect && e(d.redirect));
|
|
1162
1176
|
},
|
|
@@ -1175,7 +1189,7 @@ function ro({
|
|
|
1175
1189
|
navigationData: A,
|
|
1176
1190
|
onSearch: t
|
|
1177
1191
|
}) {
|
|
1178
|
-
const [o, e] = ge(""), n =
|
|
1192
|
+
const [o, e] = ge(""), n = w((h) => h.reduce((c, d) => {
|
|
1179
1193
|
let u = 1;
|
|
1180
1194
|
return d.links && (u += n(d.links)), c + u;
|
|
1181
1195
|
}, 0), []), s = ce(() => {
|
|
@@ -1184,29 +1198,29 @@ function ro({
|
|
|
1184
1198
|
const h = o.toLowerCase().trim(), c = (d) => d.reduce((u, p) => {
|
|
1185
1199
|
if (!p.showInSidebar)
|
|
1186
1200
|
return u;
|
|
1187
|
-
const
|
|
1188
|
-
return (
|
|
1201
|
+
const y = p.label.toLowerCase().includes(h), m = p.links ? c(p.links) : [];
|
|
1202
|
+
return (y || m.length > 0) && u.push({
|
|
1189
1203
|
...p,
|
|
1190
|
-
links:
|
|
1204
|
+
links: m.length > 0 ? m : p.links,
|
|
1191
1205
|
// Expandir automaticamente grupos com match
|
|
1192
1206
|
initiallyOpened: !0
|
|
1193
1207
|
}), u;
|
|
1194
1208
|
}, []);
|
|
1195
1209
|
return c(A);
|
|
1196
|
-
}, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l =
|
|
1210
|
+
}, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = w(
|
|
1197
1211
|
(h) => {
|
|
1198
1212
|
if (e(h), t) {
|
|
1199
1213
|
const c = h.toLowerCase().trim();
|
|
1200
1214
|
if (!c)
|
|
1201
1215
|
t(h, A);
|
|
1202
1216
|
else {
|
|
1203
|
-
const d = (u) => u.reduce((p,
|
|
1204
|
-
if (!
|
|
1217
|
+
const d = (u) => u.reduce((p, y) => {
|
|
1218
|
+
if (!y.showInSidebar)
|
|
1205
1219
|
return p;
|
|
1206
|
-
const
|
|
1207
|
-
return (
|
|
1208
|
-
...
|
|
1209
|
-
links:
|
|
1220
|
+
const m = y.label.toLowerCase().includes(c), g = y.links ? d(y.links) : [];
|
|
1221
|
+
return (m || g.length > 0) && p.push({
|
|
1222
|
+
...y,
|
|
1223
|
+
links: g.length > 0 ? g : y.links,
|
|
1210
1224
|
initiallyOpened: !0
|
|
1211
1225
|
}), p;
|
|
1212
1226
|
}, []);
|
|
@@ -1215,7 +1229,7 @@ function ro({
|
|
|
1215
1229
|
}
|
|
1216
1230
|
},
|
|
1217
1231
|
[A, t]
|
|
1218
|
-
), i =
|
|
1232
|
+
), i = w(() => {
|
|
1219
1233
|
l("");
|
|
1220
1234
|
}, [l]);
|
|
1221
1235
|
return {
|
|
@@ -1245,10 +1259,10 @@ function SA({
|
|
|
1245
1259
|
});
|
|
1246
1260
|
};
|
|
1247
1261
|
return h(A), i;
|
|
1248
|
-
}, [A]), s =
|
|
1262
|
+
}, [A]), s = w(
|
|
1249
1263
|
(i) => !!i.shortcut,
|
|
1250
1264
|
[]
|
|
1251
|
-
), a =
|
|
1265
|
+
), a = w(
|
|
1252
1266
|
(i) => i.shortcut,
|
|
1253
1267
|
[]
|
|
1254
1268
|
), l = ce(() => {
|
|
@@ -1265,7 +1279,7 @@ function SA({
|
|
|
1265
1279
|
]);
|
|
1266
1280
|
}), i;
|
|
1267
1281
|
}, [e, n, t, o]);
|
|
1268
|
-
return
|
|
1282
|
+
return Mr(l), {
|
|
1269
1283
|
shortcuts: n,
|
|
1270
1284
|
hasShortcut: s,
|
|
1271
1285
|
getShortcut: a
|
|
@@ -1286,20 +1300,20 @@ function $e({
|
|
|
1286
1300
|
activeBackground: d,
|
|
1287
1301
|
isActive: u
|
|
1288
1302
|
}) {
|
|
1289
|
-
const p = me(), { colorScheme:
|
|
1290
|
-
if (
|
|
1303
|
+
const p = me(), { colorScheme: y } = de(), m = A, [g, b] = ge(!1), f = s || "var(--mantine-color-text)", x = a || p.colors[p.primaryColor][6], E = l || p.colors[p.primaryColor][6], M = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], V = g ? e ? M : E : e ? E : "transparent", U = g || e ? p.white : f, Y = g || e ? p.white : x, F = e && !g && !!d ? { background: d, backgroundColor: void 0 } : { background: void 0, backgroundColor: V }, z = typeof A.disabled == "function" ? A.disabled() : A.disabled;
|
|
1304
|
+
if (z && A.hideDisabledItem || !A.showInSidebar)
|
|
1291
1305
|
return null;
|
|
1292
|
-
const
|
|
1293
|
-
!
|
|
1294
|
-
}, [
|
|
1306
|
+
const Q = w(() => {
|
|
1307
|
+
!z && n && n(A);
|
|
1308
|
+
}, [z, n, A]), O = Re.t(A.label), v = () => m.badge ? /* @__PURE__ */ r(fA, { size: "xs", color: m.badgeColor || "blue", variant: "filled", children: m.badge }) : null, L = () => m.shortcut ? /* @__PURE__ */ r(jA, { size: "xs", style: { marginLeft: "auto" }, children: m.shortcut }) : null;
|
|
1295
1309
|
if (A.links && A.links.length > 0) {
|
|
1296
|
-
const
|
|
1297
|
-
const G = typeof
|
|
1298
|
-
return
|
|
1310
|
+
const C = A.links.filter((I) => {
|
|
1311
|
+
const G = typeof I.disabled == "function" ? I.disabled() : I.disabled;
|
|
1312
|
+
return I.showInSidebar && (!G || !I.hideDisabledItem);
|
|
1299
1313
|
});
|
|
1300
|
-
if (
|
|
1314
|
+
if (C.length === 0 && z && A.hideDisabledItem)
|
|
1301
1315
|
return null;
|
|
1302
|
-
const
|
|
1316
|
+
const _ = (I) => u ? u(I) : e, H = (I) => I.some((G) => _(G) || (G.links ? H(G.links) : !1));
|
|
1303
1317
|
return o ? /* @__PURE__ */ R(
|
|
1304
1318
|
ie,
|
|
1305
1319
|
{
|
|
@@ -1310,8 +1324,8 @@ function $e({
|
|
|
1310
1324
|
openDelay: 100,
|
|
1311
1325
|
closeDelay: 200,
|
|
1312
1326
|
children: [
|
|
1313
|
-
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Je, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(
|
|
1314
|
-
|
|
1327
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Je, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(De, { label: O, position: "right", withArrow: !0, children: /* @__PURE__ */ R(
|
|
1328
|
+
W,
|
|
1315
1329
|
{
|
|
1316
1330
|
gap: 1,
|
|
1317
1331
|
align: "center",
|
|
@@ -1320,7 +1334,7 @@ function $e({
|
|
|
1320
1334
|
},
|
|
1321
1335
|
children: [
|
|
1322
1336
|
/* @__PURE__ */ r(
|
|
1323
|
-
|
|
1337
|
+
q,
|
|
1324
1338
|
{
|
|
1325
1339
|
style: {
|
|
1326
1340
|
color: x,
|
|
@@ -1344,23 +1358,23 @@ function $e({
|
|
|
1344
1358
|
textOverflow: "ellipsis",
|
|
1345
1359
|
whiteSpace: "nowrap"
|
|
1346
1360
|
},
|
|
1347
|
-
children:
|
|
1361
|
+
children: O
|
|
1348
1362
|
}
|
|
1349
1363
|
)
|
|
1350
1364
|
]
|
|
1351
1365
|
}
|
|
1352
1366
|
) }) }) }),
|
|
1353
1367
|
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
1354
|
-
/* @__PURE__ */ r(ie.Label, { children:
|
|
1355
|
-
|
|
1356
|
-
const
|
|
1368
|
+
/* @__PURE__ */ r(ie.Label, { children: O }),
|
|
1369
|
+
C.map((I, G) => {
|
|
1370
|
+
const re = typeof I.disabled == "function" ? I.disabled() : I.disabled;
|
|
1357
1371
|
return /* @__PURE__ */ r(
|
|
1358
1372
|
ie.Item,
|
|
1359
1373
|
{
|
|
1360
|
-
leftSection:
|
|
1361
|
-
disabled:
|
|
1362
|
-
onClick: () => n?.(
|
|
1363
|
-
children: Re.t(
|
|
1374
|
+
leftSection: I.icon,
|
|
1375
|
+
disabled: re,
|
|
1376
|
+
onClick: () => n?.(I),
|
|
1377
|
+
children: Re.t(I.label)
|
|
1364
1378
|
},
|
|
1365
1379
|
G
|
|
1366
1380
|
);
|
|
@@ -1371,10 +1385,10 @@ function $e({
|
|
|
1371
1385
|
) : /* @__PURE__ */ r(
|
|
1372
1386
|
NA,
|
|
1373
1387
|
{
|
|
1374
|
-
label:
|
|
1375
|
-
leftSection: /* @__PURE__ */ r(
|
|
1376
|
-
rightSection: /* @__PURE__ */ R(
|
|
1377
|
-
|
|
1388
|
+
label: O,
|
|
1389
|
+
leftSection: /* @__PURE__ */ r(q, { style: { color: Y }, children: A.icon }),
|
|
1390
|
+
rightSection: /* @__PURE__ */ R(q, { style: { display: "flex", alignItems: "center", gap: 4, color: U }, children: [
|
|
1391
|
+
v(),
|
|
1378
1392
|
/* @__PURE__ */ r(
|
|
1379
1393
|
gA,
|
|
1380
1394
|
{
|
|
@@ -1386,15 +1400,15 @@ function $e({
|
|
|
1386
1400
|
)
|
|
1387
1401
|
] }),
|
|
1388
1402
|
childrenOffset: 28,
|
|
1389
|
-
defaultOpened: A.initiallyOpened || e ||
|
|
1390
|
-
disabled:
|
|
1391
|
-
onMouseEnter: () =>
|
|
1392
|
-
onMouseLeave: () =>
|
|
1403
|
+
defaultOpened: A.initiallyOpened || e || H(C),
|
|
1404
|
+
disabled: z,
|
|
1405
|
+
onMouseEnter: () => b(!0),
|
|
1406
|
+
onMouseLeave: () => b(!1),
|
|
1393
1407
|
style: {
|
|
1394
1408
|
height: i,
|
|
1395
1409
|
marginInline: c,
|
|
1396
1410
|
width: c ? "auto" : void 0,
|
|
1397
|
-
...
|
|
1411
|
+
...F,
|
|
1398
1412
|
transition: "background 150ms ease, background-color 150ms ease"
|
|
1399
1413
|
},
|
|
1400
1414
|
styles: {
|
|
@@ -1402,19 +1416,19 @@ function $e({
|
|
|
1402
1416
|
borderRadius: h
|
|
1403
1417
|
},
|
|
1404
1418
|
label: {
|
|
1405
|
-
color:
|
|
1419
|
+
color: U
|
|
1406
1420
|
},
|
|
1407
1421
|
children: {
|
|
1408
1422
|
paddingLeft: 0
|
|
1409
1423
|
}
|
|
1410
1424
|
},
|
|
1411
|
-
children:
|
|
1425
|
+
children: C.map((I, G) => /* @__PURE__ */ r(
|
|
1412
1426
|
$e,
|
|
1413
1427
|
{
|
|
1414
|
-
item:
|
|
1428
|
+
item: I,
|
|
1415
1429
|
depth: t + 1,
|
|
1416
1430
|
collapsed: o,
|
|
1417
|
-
active:
|
|
1431
|
+
active: _(I),
|
|
1418
1432
|
onClick: n,
|
|
1419
1433
|
textColor: s,
|
|
1420
1434
|
iconColor: a,
|
|
@@ -1431,9 +1445,9 @@ function $e({
|
|
|
1431
1445
|
);
|
|
1432
1446
|
}
|
|
1433
1447
|
return o ? /* @__PURE__ */ r(
|
|
1434
|
-
|
|
1448
|
+
De,
|
|
1435
1449
|
{
|
|
1436
|
-
label:
|
|
1450
|
+
label: m.tooltip || O,
|
|
1437
1451
|
position: "right",
|
|
1438
1452
|
withArrow: !0,
|
|
1439
1453
|
children: /* @__PURE__ */ r(
|
|
@@ -1443,26 +1457,26 @@ function $e({
|
|
|
1443
1457
|
width: c ? "auto" : "100%",
|
|
1444
1458
|
marginInline: c,
|
|
1445
1459
|
borderRadius: h,
|
|
1446
|
-
cursor:
|
|
1447
|
-
opacity:
|
|
1460
|
+
cursor: z ? "not-allowed" : "pointer",
|
|
1461
|
+
opacity: z ? 0.5 : 1,
|
|
1448
1462
|
// Gradiente (activeBackground) via shorthand; senão a cor sólida.
|
|
1449
|
-
...e && d ? { background: d } : { backgroundColor: e ?
|
|
1463
|
+
...e && d ? { background: d } : { backgroundColor: e ? E : "transparent" },
|
|
1450
1464
|
transition: "background 150ms ease, background-color 150ms ease",
|
|
1451
1465
|
padding: "2px 0"
|
|
1452
1466
|
},
|
|
1453
|
-
onClick:
|
|
1454
|
-
onMouseEnter: (
|
|
1455
|
-
if (!
|
|
1467
|
+
onClick: Q,
|
|
1468
|
+
onMouseEnter: (C) => {
|
|
1469
|
+
if (!z) {
|
|
1456
1470
|
if (e && d)
|
|
1457
1471
|
return;
|
|
1458
|
-
|
|
1472
|
+
C.currentTarget.style.backgroundColor = e ? M : E;
|
|
1459
1473
|
}
|
|
1460
1474
|
},
|
|
1461
|
-
onMouseLeave: (
|
|
1462
|
-
e && d || (
|
|
1475
|
+
onMouseLeave: (C) => {
|
|
1476
|
+
e && d || (C.currentTarget.style.backgroundColor = e ? E : "transparent");
|
|
1463
1477
|
},
|
|
1464
|
-
children: /* @__PURE__ */ R(
|
|
1465
|
-
/* @__PURE__ */ r(
|
|
1478
|
+
children: /* @__PURE__ */ R(W, { gap: 1, align: "center", children: [
|
|
1479
|
+
/* @__PURE__ */ r(q, { style: { color: e ? p.white : x }, children: A.icon }),
|
|
1466
1480
|
/* @__PURE__ */ r(
|
|
1467
1481
|
Te,
|
|
1468
1482
|
{
|
|
@@ -1476,7 +1490,7 @@ function $e({
|
|
|
1476
1490
|
textOverflow: "ellipsis",
|
|
1477
1491
|
whiteSpace: "nowrap"
|
|
1478
1492
|
},
|
|
1479
|
-
children:
|
|
1493
|
+
children: O
|
|
1480
1494
|
}
|
|
1481
1495
|
)
|
|
1482
1496
|
] })
|
|
@@ -1486,23 +1500,23 @@ function $e({
|
|
|
1486
1500
|
) : /* @__PURE__ */ r(
|
|
1487
1501
|
NA,
|
|
1488
1502
|
{
|
|
1489
|
-
label:
|
|
1490
|
-
leftSection: /* @__PURE__ */ r(
|
|
1491
|
-
rightSection: /* @__PURE__ */ R(
|
|
1492
|
-
|
|
1493
|
-
|
|
1503
|
+
label: O,
|
|
1504
|
+
leftSection: /* @__PURE__ */ r(q, { style: { color: Y }, children: A.icon }),
|
|
1505
|
+
rightSection: /* @__PURE__ */ R(q, { style: { display: "flex", alignItems: "center", gap: 4, color: U }, children: [
|
|
1506
|
+
v(),
|
|
1507
|
+
L()
|
|
1494
1508
|
] }),
|
|
1495
1509
|
active: e,
|
|
1496
|
-
disabled:
|
|
1497
|
-
onClick:
|
|
1498
|
-
onMouseEnter: () =>
|
|
1499
|
-
onMouseLeave: () =>
|
|
1510
|
+
disabled: z,
|
|
1511
|
+
onClick: Q,
|
|
1512
|
+
onMouseEnter: () => b(!0),
|
|
1513
|
+
onMouseLeave: () => b(!1),
|
|
1500
1514
|
style: {
|
|
1501
1515
|
height: i,
|
|
1502
1516
|
paddingLeft: t > 0 ? t * 16 + 12 : void 0,
|
|
1503
1517
|
marginInline: c,
|
|
1504
1518
|
width: c ? "auto" : void 0,
|
|
1505
|
-
...
|
|
1519
|
+
...F,
|
|
1506
1520
|
transition: "background 150ms ease, background-color 150ms ease"
|
|
1507
1521
|
},
|
|
1508
1522
|
styles: {
|
|
@@ -1510,7 +1524,7 @@ function $e({
|
|
|
1510
1524
|
borderRadius: h
|
|
1511
1525
|
},
|
|
1512
1526
|
label: {
|
|
1513
|
-
color:
|
|
1527
|
+
color: U
|
|
1514
1528
|
}
|
|
1515
1529
|
}
|
|
1516
1530
|
}
|
|
@@ -1525,10 +1539,10 @@ function oo({
|
|
|
1525
1539
|
onExpandedChange: s,
|
|
1526
1540
|
groupId: a
|
|
1527
1541
|
}) {
|
|
1528
|
-
const l = me(), { colorScheme: i } = de(), [h, c] = ge(e), d = n !== void 0, u = d ? n : h, p =
|
|
1542
|
+
const l = me(), { colorScheme: i } = de(), [h, c] = ge(e), d = n !== void 0, u = d ? n : h, p = w(() => {
|
|
1529
1543
|
d ? s?.(!u) : c((f) => !f);
|
|
1530
|
-
}, [d, u, s]),
|
|
1531
|
-
return /* @__PURE__ */ R(
|
|
1544
|
+
}, [d, u, s]), y = i === "dark" ? l.colors.dark[6] : l.colors.gray[1], m = i === "dark" ? l.colors.dark[5] : l.colors.gray[2], g = i === "dark" ? l.colors.gray[4] : l.colors.gray[7], b = i === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
|
|
1545
|
+
return /* @__PURE__ */ R(q, { children: [
|
|
1532
1546
|
/* @__PURE__ */ r(
|
|
1533
1547
|
cA,
|
|
1534
1548
|
{
|
|
@@ -1537,26 +1551,26 @@ function oo({
|
|
|
1537
1551
|
p: "xs",
|
|
1538
1552
|
style: {
|
|
1539
1553
|
borderRadius: l.radius.sm,
|
|
1540
|
-
backgroundColor:
|
|
1554
|
+
backgroundColor: y,
|
|
1541
1555
|
transition: "background-color 150ms ease"
|
|
1542
1556
|
},
|
|
1543
1557
|
styles: {
|
|
1544
1558
|
root: {
|
|
1545
1559
|
"&:hover": {
|
|
1546
|
-
backgroundColor:
|
|
1560
|
+
backgroundColor: m
|
|
1547
1561
|
}
|
|
1548
1562
|
}
|
|
1549
1563
|
},
|
|
1550
1564
|
children: /* @__PURE__ */ R(Le, { justify: "space-between", wrap: "nowrap", children: [
|
|
1551
1565
|
/* @__PURE__ */ R(Le, { gap: "xs", wrap: "nowrap", children: [
|
|
1552
|
-
t && /* @__PURE__ */ r(
|
|
1553
|
-
/* @__PURE__ */ r(Te, { size: "sm", fw: 600, c:
|
|
1566
|
+
t && /* @__PURE__ */ r(q, { style: { color: b }, children: t }),
|
|
1567
|
+
/* @__PURE__ */ r(Te, { size: "sm", fw: 600, c: g, children: Re.t(A) })
|
|
1554
1568
|
] }),
|
|
1555
1569
|
/* @__PURE__ */ r(
|
|
1556
1570
|
Yr,
|
|
1557
1571
|
{
|
|
1558
1572
|
size: 16,
|
|
1559
|
-
color:
|
|
1573
|
+
color: g,
|
|
1560
1574
|
style: {
|
|
1561
1575
|
transform: u ? "rotate(180deg)" : "rotate(0deg)",
|
|
1562
1576
|
transition: "transform 200ms ease"
|
|
@@ -1566,7 +1580,7 @@ function oo({
|
|
|
1566
1580
|
] })
|
|
1567
1581
|
}
|
|
1568
1582
|
),
|
|
1569
|
-
/* @__PURE__ */ r(Vr, { expanded: u, children: /* @__PURE__ */ r(
|
|
1583
|
+
/* @__PURE__ */ r(Vr, { expanded: u, children: /* @__PURE__ */ r(q, { mt: 4, children: o }) })
|
|
1570
1584
|
] });
|
|
1571
1585
|
}
|
|
1572
1586
|
function On({
|
|
@@ -1574,7 +1588,7 @@ function On({
|
|
|
1574
1588
|
children: t
|
|
1575
1589
|
}) {
|
|
1576
1590
|
const o = me(), { colorScheme: e } = de(), n = e === "dark" ? o.colors.gray[5] : o.colors.gray[6];
|
|
1577
|
-
return /* @__PURE__ */ R(
|
|
1591
|
+
return /* @__PURE__ */ R(q, { children: [
|
|
1578
1592
|
/* @__PURE__ */ r(
|
|
1579
1593
|
Te,
|
|
1580
1594
|
{
|
|
@@ -1600,7 +1614,7 @@ function no({
|
|
|
1600
1614
|
inactiveColor: s
|
|
1601
1615
|
}) {
|
|
1602
1616
|
const a = me(), { colorScheme: l } = de(), i = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], h = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], c = a.colors[a.primaryColor][2], p = /* @__PURE__ */ R(
|
|
1603
|
-
|
|
1617
|
+
W,
|
|
1604
1618
|
{
|
|
1605
1619
|
gap: 2,
|
|
1606
1620
|
align: "center",
|
|
@@ -1608,7 +1622,7 @@ function no({
|
|
|
1608
1622
|
style: { textAlign: "center" },
|
|
1609
1623
|
children: [
|
|
1610
1624
|
/* @__PURE__ */ r(
|
|
1611
|
-
|
|
1625
|
+
Me,
|
|
1612
1626
|
{
|
|
1613
1627
|
size: 48,
|
|
1614
1628
|
variant: t ? "filled" : "subtle",
|
|
@@ -1637,7 +1651,7 @@ function no({
|
|
|
1637
1651
|
]
|
|
1638
1652
|
}
|
|
1639
1653
|
);
|
|
1640
|
-
return e ? p : /* @__PURE__ */ r(
|
|
1654
|
+
return e ? p : /* @__PURE__ */ r(De, { label: A.hint || A.label, position: "right", withArrow: !0, children: p });
|
|
1641
1655
|
}
|
|
1642
1656
|
function $n({
|
|
1643
1657
|
placeholder: A = "Buscar...",
|
|
@@ -1646,16 +1660,16 @@ function $n({
|
|
|
1646
1660
|
onClear: e,
|
|
1647
1661
|
collapsed: n = !1
|
|
1648
1662
|
}) {
|
|
1649
|
-
const s = me(), { colorScheme: a } = de(), l =
|
|
1663
|
+
const s = me(), { colorScheme: a } = de(), l = w(
|
|
1650
1664
|
(c) => {
|
|
1651
1665
|
o?.(c.currentTarget.value);
|
|
1652
1666
|
},
|
|
1653
1667
|
[o]
|
|
1654
|
-
), i =
|
|
1668
|
+
), i = w(() => {
|
|
1655
1669
|
o?.(""), e?.();
|
|
1656
1670
|
}, [o, e]), h = t && t.length > 0;
|
|
1657
1671
|
return n ? /* @__PURE__ */ r(
|
|
1658
|
-
|
|
1672
|
+
Me,
|
|
1659
1673
|
{
|
|
1660
1674
|
variant: "subtle",
|
|
1661
1675
|
size: "lg",
|
|
@@ -1668,7 +1682,7 @@ function $n({
|
|
|
1668
1682
|
placeholder: A,
|
|
1669
1683
|
leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
|
|
1670
1684
|
rightSection: h ? /* @__PURE__ */ r(
|
|
1671
|
-
|
|
1685
|
+
Me,
|
|
1672
1686
|
{
|
|
1673
1687
|
variant: "subtle",
|
|
1674
1688
|
size: "sm",
|
|
@@ -1703,7 +1717,7 @@ function Qn({
|
|
|
1703
1717
|
const h = A ? A.split(" ").map((c) => c[0]).slice(0, 2).join("").toUpperCase() : "?";
|
|
1704
1718
|
return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: h });
|
|
1705
1719
|
};
|
|
1706
|
-
return n ? /* @__PURE__ */ r(
|
|
1720
|
+
return n ? /* @__PURE__ */ r(De, { label: A || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
|
|
1707
1721
|
cA,
|
|
1708
1722
|
{
|
|
1709
1723
|
onClick: e,
|
|
@@ -1743,7 +1757,7 @@ function Qn({
|
|
|
1743
1757
|
},
|
|
1744
1758
|
children: /* @__PURE__ */ R(Le, { wrap: "nowrap", children: [
|
|
1745
1759
|
i(),
|
|
1746
|
-
/* @__PURE__ */ R(
|
|
1760
|
+
/* @__PURE__ */ R(q, { style: { flex: 1, overflow: "hidden" }, children: [
|
|
1747
1761
|
A && /* @__PURE__ */ r(
|
|
1748
1762
|
Te,
|
|
1749
1763
|
{
|
|
@@ -1788,7 +1802,7 @@ function Kn({
|
|
|
1788
1802
|
size: o = "xs"
|
|
1789
1803
|
}) {
|
|
1790
1804
|
const e = typeof A == "number" && A > 99 ? "99+" : A;
|
|
1791
|
-
return /* @__PURE__ */ r(
|
|
1805
|
+
return /* @__PURE__ */ r(fA, { size: o, color: t, variant: "filled", children: e });
|
|
1792
1806
|
}
|
|
1793
1807
|
function Fn({
|
|
1794
1808
|
children: A,
|
|
@@ -1818,9 +1832,9 @@ function kA({
|
|
|
1818
1832
|
}) {
|
|
1819
1833
|
const a = me(), { colorScheme: l } = de(), i = o || (l === "dark" ? a.colors.dark[7] : a.white);
|
|
1820
1834
|
if (t)
|
|
1821
|
-
return /* @__PURE__ */ r(
|
|
1822
|
-
const h = (d, u = !1) => Array.from({ length: d }).map((p,
|
|
1823
|
-
const
|
|
1835
|
+
return /* @__PURE__ */ r(W, { gap: "sm", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: A }).map((d, u) => /* @__PURE__ */ r(fe, { circle: !0, height: 32, width: 32 }, u)) });
|
|
1836
|
+
const h = (d, u = !1) => Array.from({ length: d }).map((p, y) => {
|
|
1837
|
+
const m = 60 + Math.random() * 30;
|
|
1824
1838
|
return /* @__PURE__ */ R(
|
|
1825
1839
|
Le,
|
|
1826
1840
|
{
|
|
@@ -1831,22 +1845,22 @@ function kA({
|
|
|
1831
1845
|
height: e
|
|
1832
1846
|
},
|
|
1833
1847
|
children: [
|
|
1834
|
-
/* @__PURE__ */ r(
|
|
1835
|
-
/* @__PURE__ */ r(
|
|
1848
|
+
/* @__PURE__ */ r(fe, { circle: !0, height: 24, width: 24 }),
|
|
1849
|
+
/* @__PURE__ */ r(fe, { height: 14, width: `${m}%`, radius: "sm" })
|
|
1836
1850
|
]
|
|
1837
1851
|
},
|
|
1838
|
-
|
|
1852
|
+
y
|
|
1839
1853
|
);
|
|
1840
1854
|
});
|
|
1841
1855
|
if (!n)
|
|
1842
|
-
return /* @__PURE__ */ r(
|
|
1856
|
+
return /* @__PURE__ */ r(W, { gap: 2, p: "xs", style: { backgroundColor: i }, children: h(A) });
|
|
1843
1857
|
const c = Math.ceil(A / s);
|
|
1844
|
-
return /* @__PURE__ */ r(
|
|
1858
|
+
return /* @__PURE__ */ r(W, { gap: "md", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: s }).map((d, u) => /* @__PURE__ */ R(q, { children: [
|
|
1845
1859
|
/* @__PURE__ */ R(Le, { gap: "sm", p: "xs", children: [
|
|
1846
|
-
/* @__PURE__ */ r(
|
|
1847
|
-
/* @__PURE__ */ r(
|
|
1860
|
+
/* @__PURE__ */ r(fe, { circle: !0, height: 20, width: 20 }),
|
|
1861
|
+
/* @__PURE__ */ r(fe, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
|
|
1848
1862
|
] }),
|
|
1849
|
-
/* @__PURE__ */ r(
|
|
1863
|
+
/* @__PURE__ */ r(W, { gap: 2, mt: 4, children: h(
|
|
1850
1864
|
u === s - 1 ? A - u * c : c,
|
|
1851
1865
|
!0
|
|
1852
1866
|
) })
|
|
@@ -1859,7 +1873,7 @@ function so({
|
|
|
1859
1873
|
}) {
|
|
1860
1874
|
const e = me(), { colorScheme: n } = de(), s = o || (n === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][6]);
|
|
1861
1875
|
return /* @__PURE__ */ r(
|
|
1862
|
-
|
|
1876
|
+
W,
|
|
1863
1877
|
{
|
|
1864
1878
|
gap: "sm",
|
|
1865
1879
|
p: "xs",
|
|
@@ -1869,9 +1883,9 @@ function so({
|
|
|
1869
1883
|
backgroundColor: s,
|
|
1870
1884
|
height: "100%"
|
|
1871
1885
|
},
|
|
1872
|
-
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(
|
|
1873
|
-
/* @__PURE__ */ r(
|
|
1874
|
-
/* @__PURE__ */ r(
|
|
1886
|
+
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(W, { gap: 4, align: "center", children: [
|
|
1887
|
+
/* @__PURE__ */ r(fe, { circle: !0, height: 48, width: 48 }),
|
|
1888
|
+
/* @__PURE__ */ r(fe, { height: 10, width: 40, radius: "sm" })
|
|
1875
1889
|
] }, l))
|
|
1876
1890
|
}
|
|
1877
1891
|
);
|
|
@@ -1879,22 +1893,22 @@ function so({
|
|
|
1879
1893
|
function Vn({
|
|
1880
1894
|
collapsed: A = !1
|
|
1881
1895
|
}) {
|
|
1882
|
-
return A ? /* @__PURE__ */ r(
|
|
1883
|
-
/* @__PURE__ */ r(
|
|
1884
|
-
/* @__PURE__ */ R(
|
|
1885
|
-
/* @__PURE__ */ r(
|
|
1886
|
-
/* @__PURE__ */ r(
|
|
1896
|
+
return A ? /* @__PURE__ */ r(q, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(fe, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "md", children: [
|
|
1897
|
+
/* @__PURE__ */ r(fe, { circle: !0, height: 40, width: 40 }),
|
|
1898
|
+
/* @__PURE__ */ R(W, { gap: 4, style: { flex: 1 }, children: [
|
|
1899
|
+
/* @__PURE__ */ r(fe, { height: 14, width: "70%", radius: "sm" }),
|
|
1900
|
+
/* @__PURE__ */ r(fe, { height: 10, width: "50%", radius: "sm" })
|
|
1887
1901
|
] })
|
|
1888
1902
|
] });
|
|
1889
1903
|
}
|
|
1890
1904
|
function Gn({
|
|
1891
1905
|
collapsed: A = !1
|
|
1892
1906
|
}) {
|
|
1893
|
-
return A ? /* @__PURE__ */ r(
|
|
1894
|
-
/* @__PURE__ */ r(
|
|
1895
|
-
/* @__PURE__ */ R(
|
|
1896
|
-
/* @__PURE__ */ r(
|
|
1897
|
-
/* @__PURE__ */ r(
|
|
1907
|
+
return A ? /* @__PURE__ */ r(q, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(fe, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "sm", children: [
|
|
1908
|
+
/* @__PURE__ */ r(fe, { circle: !0, height: 36, width: 36 }),
|
|
1909
|
+
/* @__PURE__ */ R(W, { gap: 4, style: { flex: 1 }, children: [
|
|
1910
|
+
/* @__PURE__ */ r(fe, { height: 12, width: "60%", radius: "sm" }),
|
|
1911
|
+
/* @__PURE__ */ r(fe, { height: 10, width: "80%", radius: "sm" })
|
|
1898
1912
|
] })
|
|
1899
1913
|
] });
|
|
1900
1914
|
}
|
|
@@ -1904,7 +1918,7 @@ function xA({
|
|
|
1904
1918
|
}) {
|
|
1905
1919
|
const o = me(), { colorScheme: e } = de(), n = t || (e === "dark" ? o.colors.dark[7] : o.white), s = e === "dark" ? o.colors.red[4] : o.colors.red[6];
|
|
1906
1920
|
return /* @__PURE__ */ r(
|
|
1907
|
-
|
|
1921
|
+
q,
|
|
1908
1922
|
{
|
|
1909
1923
|
p: "md",
|
|
1910
1924
|
style: {
|
|
@@ -1915,7 +1929,7 @@ function xA({
|
|
|
1915
1929
|
height: "100%"
|
|
1916
1930
|
},
|
|
1917
1931
|
children: /* @__PURE__ */ r(
|
|
1918
|
-
|
|
1932
|
+
q,
|
|
1919
1933
|
{
|
|
1920
1934
|
p: "md",
|
|
1921
1935
|
style: {
|
|
@@ -1946,140 +1960,140 @@ function lo({
|
|
|
1946
1960
|
loadingError: d,
|
|
1947
1961
|
loadingComponent: u,
|
|
1948
1962
|
errorComponent: p,
|
|
1949
|
-
skeletonItemCount:
|
|
1950
|
-
backgroundDarkColor:
|
|
1951
|
-
backgroundLightColor:
|
|
1952
|
-
backgroundImage:
|
|
1963
|
+
skeletonItemCount: y = 8,
|
|
1964
|
+
backgroundDarkColor: m,
|
|
1965
|
+
backgroundLightColor: g,
|
|
1966
|
+
backgroundImage: b,
|
|
1953
1967
|
textDarkColor: f,
|
|
1954
1968
|
textLightColor: x,
|
|
1955
|
-
iconDarkColor:
|
|
1956
|
-
iconLightColor:
|
|
1957
|
-
activeColor:
|
|
1958
|
-
withBorder:
|
|
1969
|
+
iconDarkColor: E,
|
|
1970
|
+
iconLightColor: M,
|
|
1971
|
+
activeColor: V,
|
|
1972
|
+
withBorder: U = !0,
|
|
1959
1973
|
withShadow: Y = !1,
|
|
1960
|
-
highlightActiveItem:
|
|
1961
|
-
onMenuItemClick:
|
|
1962
|
-
itemBorderRadius:
|
|
1963
|
-
itemHorizontalGap:
|
|
1964
|
-
itemActiveBackground:
|
|
1974
|
+
highlightActiveItem: P = !0,
|
|
1975
|
+
onMenuItemClick: F,
|
|
1976
|
+
itemBorderRadius: z,
|
|
1977
|
+
itemHorizontalGap: Q,
|
|
1978
|
+
itemActiveBackground: O
|
|
1965
1979
|
}) {
|
|
1966
|
-
const
|
|
1980
|
+
const v = me(), { colorScheme: L } = de(), { collapsed: C, toggleCollapsed: _ } = vA(), H = L === "dark" ? m ?? v.colors.dark[7] : g ?? v.white, I = L === "dark" ? f ?? v.colors.gray[3] : x ?? v.colors.gray[7], G = L === "dark" ? E ?? v.colors[v.primaryColor][4] : M ?? v.colors[v.primaryColor][6], re = V ? v.colors[V]?.[6] ?? v.colors[v.primaryColor][6] : v.colors[v.primaryColor][6], Ce = b ? { background: b } : { backgroundColor: H }, se = b ? "transparent" : H, {
|
|
1967
1981
|
query: be,
|
|
1968
1982
|
setQuery: we,
|
|
1969
1983
|
filteredItems: Se,
|
|
1970
|
-
isSearching:
|
|
1971
|
-
clearSearch:
|
|
1984
|
+
isSearching: S,
|
|
1985
|
+
clearSearch: k
|
|
1972
1986
|
} = ro({
|
|
1973
1987
|
navigationData: A,
|
|
1974
1988
|
onSearch: a
|
|
1975
|
-
}), { navigateToItem: $, isItemActive:
|
|
1989
|
+
}), { navigateToItem: $, isItemActive: D, isItemOrChildActive: B } = wA({
|
|
1976
1990
|
navigationData: A,
|
|
1977
|
-
onMenuItemClick:
|
|
1978
|
-
}),
|
|
1979
|
-
(
|
|
1980
|
-
[
|
|
1981
|
-
),
|
|
1982
|
-
itemBorderRadius:
|
|
1983
|
-
itemHorizontalGap:
|
|
1984
|
-
activeBackground:
|
|
1985
|
-
isActive:
|
|
1991
|
+
onMenuItemClick: F
|
|
1992
|
+
}), T = w(
|
|
1993
|
+
(j) => !!P && D(j),
|
|
1994
|
+
[P, D]
|
|
1995
|
+
), N = {
|
|
1996
|
+
itemBorderRadius: z,
|
|
1997
|
+
itemHorizontalGap: Q,
|
|
1998
|
+
activeBackground: O,
|
|
1999
|
+
isActive: T
|
|
1986
2000
|
};
|
|
1987
2001
|
SA({
|
|
1988
2002
|
navigationData: A,
|
|
1989
2003
|
navigateToItem: $,
|
|
1990
|
-
onToggleSidebar:
|
|
2004
|
+
onToggleSidebar: _,
|
|
1991
2005
|
enabled: !0
|
|
1992
2006
|
});
|
|
1993
|
-
const
|
|
1994
|
-
const
|
|
1995
|
-
return Se.forEach((
|
|
1996
|
-
if (!(!
|
|
1997
|
-
if (
|
|
1998
|
-
const Ee =
|
|
1999
|
-
Ee.push(
|
|
2007
|
+
const X = C ? o : t, he = ce(() => {
|
|
2008
|
+
const j = /* @__PURE__ */ new Map(), ve = [];
|
|
2009
|
+
return Se.forEach((Z) => {
|
|
2010
|
+
if (!(!Z.showInSidebar || (typeof Z.disabled == "function" ? Z.disabled() : Z.disabled) && Z.hideDisabledItem))
|
|
2011
|
+
if (Z.category) {
|
|
2012
|
+
const Ee = j.get(Z.category) || [];
|
|
2013
|
+
Ee.push(Z), j.set(Z.category, Ee);
|
|
2000
2014
|
} else
|
|
2001
|
-
ve.push(
|
|
2002
|
-
}), { groups:
|
|
2015
|
+
ve.push(Z);
|
|
2016
|
+
}), { groups: j, ungrouped: ve };
|
|
2003
2017
|
}, [Se]), Ie = () => {
|
|
2004
2018
|
if (d)
|
|
2005
|
-
return p || /* @__PURE__ */ r(xA, { message: d, backgroundColor:
|
|
2019
|
+
return p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: H });
|
|
2006
2020
|
if (c)
|
|
2007
2021
|
return u || /* @__PURE__ */ r(
|
|
2008
2022
|
kA,
|
|
2009
2023
|
{
|
|
2010
|
-
itemCount:
|
|
2011
|
-
collapsed:
|
|
2012
|
-
backgroundColor:
|
|
2013
|
-
showGroups: !
|
|
2024
|
+
itemCount: y,
|
|
2025
|
+
collapsed: C,
|
|
2026
|
+
backgroundColor: H,
|
|
2027
|
+
showGroups: !C
|
|
2014
2028
|
}
|
|
2015
2029
|
);
|
|
2016
|
-
const
|
|
2030
|
+
const j = () => he.ungrouped.map((Z, ee) => /* @__PURE__ */ r(
|
|
2017
2031
|
$e,
|
|
2018
2032
|
{
|
|
2019
|
-
item:
|
|
2020
|
-
collapsed:
|
|
2021
|
-
active:
|
|
2033
|
+
item: Z,
|
|
2034
|
+
collapsed: C,
|
|
2035
|
+
active: P && D(Z),
|
|
2022
2036
|
onClick: $,
|
|
2023
|
-
textColor:
|
|
2037
|
+
textColor: I,
|
|
2024
2038
|
iconColor: G,
|
|
2025
|
-
hoverColor:
|
|
2026
|
-
...
|
|
2039
|
+
hoverColor: re,
|
|
2040
|
+
...N
|
|
2027
2041
|
},
|
|
2028
|
-
`item-${
|
|
2029
|
-
)), ve = () => Array.from(he.groups.entries()).map(([
|
|
2042
|
+
`item-${ee}`
|
|
2043
|
+
)), ve = () => Array.from(he.groups.entries()).map(([ee, Ee], J) => /* @__PURE__ */ r(
|
|
2030
2044
|
oo,
|
|
2031
2045
|
{
|
|
2032
|
-
label:
|
|
2033
|
-
groupId: `group-${
|
|
2046
|
+
label: ee,
|
|
2047
|
+
groupId: `group-${J}`,
|
|
2034
2048
|
defaultExpanded: !0,
|
|
2035
|
-
children: Ee.map((ke,
|
|
2049
|
+
children: Ee.map((ke, K) => /* @__PURE__ */ r(
|
|
2036
2050
|
$e,
|
|
2037
2051
|
{
|
|
2038
2052
|
item: ke,
|
|
2039
|
-
collapsed:
|
|
2040
|
-
active:
|
|
2053
|
+
collapsed: C,
|
|
2054
|
+
active: P && D(ke),
|
|
2041
2055
|
onClick: $,
|
|
2042
|
-
textColor:
|
|
2056
|
+
textColor: I,
|
|
2043
2057
|
iconColor: G,
|
|
2044
|
-
hoverColor:
|
|
2045
|
-
...
|
|
2058
|
+
hoverColor: re,
|
|
2059
|
+
...N
|
|
2046
2060
|
},
|
|
2047
|
-
`group-${
|
|
2061
|
+
`group-${J}-item-${K}`
|
|
2048
2062
|
))
|
|
2049
2063
|
},
|
|
2050
|
-
`group-${
|
|
2064
|
+
`group-${J}`
|
|
2051
2065
|
));
|
|
2052
|
-
return
|
|
2053
|
-
he.ungrouped.map((
|
|
2066
|
+
return C ? /* @__PURE__ */ R(W, { gap: 4, children: [
|
|
2067
|
+
he.ungrouped.map((Z, ee) => /* @__PURE__ */ r(
|
|
2054
2068
|
$e,
|
|
2055
2069
|
{
|
|
2056
|
-
item:
|
|
2070
|
+
item: Z,
|
|
2057
2071
|
collapsed: !0,
|
|
2058
|
-
active:
|
|
2072
|
+
active: P && D(Z),
|
|
2059
2073
|
onClick: $,
|
|
2060
|
-
textColor:
|
|
2074
|
+
textColor: I,
|
|
2061
2075
|
iconColor: G,
|
|
2062
|
-
hoverColor:
|
|
2063
|
-
...
|
|
2076
|
+
hoverColor: re,
|
|
2077
|
+
...N
|
|
2064
2078
|
},
|
|
2065
|
-
`item-${
|
|
2079
|
+
`item-${ee}`
|
|
2066
2080
|
)),
|
|
2067
|
-
Array.from(he.groups.values()).flat().map((
|
|
2081
|
+
Array.from(he.groups.values()).flat().map((Z, ee) => /* @__PURE__ */ r(
|
|
2068
2082
|
$e,
|
|
2069
2083
|
{
|
|
2070
|
-
item:
|
|
2084
|
+
item: Z,
|
|
2071
2085
|
collapsed: !0,
|
|
2072
|
-
active:
|
|
2086
|
+
active: P && D(Z),
|
|
2073
2087
|
onClick: $,
|
|
2074
|
-
textColor:
|
|
2088
|
+
textColor: I,
|
|
2075
2089
|
iconColor: G,
|
|
2076
|
-
hoverColor:
|
|
2077
|
-
...
|
|
2090
|
+
hoverColor: re,
|
|
2091
|
+
...N
|
|
2078
2092
|
},
|
|
2079
|
-
`grouped-item-${
|
|
2093
|
+
`grouped-item-${ee}`
|
|
2080
2094
|
))
|
|
2081
|
-
] }) : /* @__PURE__ */ R(
|
|
2082
|
-
he.ungrouped.length > 0 && /* @__PURE__ */ r(
|
|
2095
|
+
] }) : /* @__PURE__ */ R(W, { gap: "xs", children: [
|
|
2096
|
+
he.ungrouped.length > 0 && /* @__PURE__ */ r(W, { gap: 2, children: j() }),
|
|
2083
2097
|
he.groups.size > 0 && he.ungrouped.length > 0 && /* @__PURE__ */ r(dA, { my: "xs" }),
|
|
2084
2098
|
ve()
|
|
2085
2099
|
] });
|
|
@@ -2091,35 +2105,35 @@ function lo({
|
|
|
2091
2105
|
transition: "slide-right",
|
|
2092
2106
|
duration: 200,
|
|
2093
2107
|
timingFunction: "ease",
|
|
2094
|
-
children: (
|
|
2095
|
-
|
|
2108
|
+
children: (j) => /* @__PURE__ */ R(
|
|
2109
|
+
q,
|
|
2096
2110
|
{
|
|
2097
2111
|
style: {
|
|
2098
|
-
...
|
|
2099
|
-
width:
|
|
2100
|
-
height: typeof e == "number" ?
|
|
2101
|
-
minHeight: typeof e == "number" ?
|
|
2112
|
+
...j,
|
|
2113
|
+
width: pe(X),
|
|
2114
|
+
height: typeof e == "number" ? pe(e) : e,
|
|
2115
|
+
minHeight: typeof e == "number" ? pe(e) : e,
|
|
2102
2116
|
...Ce,
|
|
2103
2117
|
display: "flex",
|
|
2104
2118
|
flexDirection: "column",
|
|
2105
2119
|
overflow: "hidden",
|
|
2106
2120
|
transition: "width 200ms ease",
|
|
2107
|
-
borderRight:
|
|
2108
|
-
boxShadow: Y ?
|
|
2121
|
+
borderRight: U ? `1px solid ${L === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0,
|
|
2122
|
+
boxShadow: Y ? v.shadows.sm : void 0
|
|
2109
2123
|
},
|
|
2110
2124
|
children: [
|
|
2111
|
-
l && /* @__PURE__ */ r(
|
|
2112
|
-
n && !
|
|
2125
|
+
l && /* @__PURE__ */ r(q, { style: { flexShrink: 0 }, children: l }),
|
|
2126
|
+
n && !C && /* @__PURE__ */ r(q, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
|
|
2113
2127
|
XA,
|
|
2114
2128
|
{
|
|
2115
2129
|
placeholder: s,
|
|
2116
2130
|
leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
|
|
2117
|
-
rightSection:
|
|
2131
|
+
rightSection: S ? /* @__PURE__ */ r(
|
|
2118
2132
|
er,
|
|
2119
2133
|
{
|
|
2120
2134
|
size: 16,
|
|
2121
2135
|
style: { cursor: "pointer" },
|
|
2122
|
-
onClick:
|
|
2136
|
+
onClick: k
|
|
2123
2137
|
}
|
|
2124
2138
|
) : null,
|
|
2125
2139
|
value: be,
|
|
@@ -2134,17 +2148,17 @@ function lo({
|
|
|
2134
2148
|
scrollbarSize: 6,
|
|
2135
2149
|
type: "hover",
|
|
2136
2150
|
offsetScrollbars: !0,
|
|
2137
|
-
children: /* @__PURE__ */ r(
|
|
2151
|
+
children: /* @__PURE__ */ r(q, { p: "xs", children: Ie() })
|
|
2138
2152
|
}
|
|
2139
2153
|
),
|
|
2140
2154
|
i && /* @__PURE__ */ r(
|
|
2141
|
-
|
|
2155
|
+
q,
|
|
2142
2156
|
{
|
|
2143
2157
|
style: {
|
|
2144
2158
|
flexShrink: 0,
|
|
2145
2159
|
height: h,
|
|
2146
2160
|
backgroundColor: se,
|
|
2147
|
-
borderTop:
|
|
2161
|
+
borderTop: U ? `1px solid ${L === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0
|
|
2148
2162
|
},
|
|
2149
2163
|
children: i
|
|
2150
2164
|
}
|
|
@@ -2207,9 +2221,9 @@ function io({
|
|
|
2207
2221
|
openDelay: 100,
|
|
2208
2222
|
closeDelay: 200,
|
|
2209
2223
|
children: [
|
|
2210
|
-
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(
|
|
2224
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(W, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2211
2225
|
/* @__PURE__ */ r(
|
|
2212
|
-
|
|
2226
|
+
Me,
|
|
2213
2227
|
{
|
|
2214
2228
|
size: "xl",
|
|
2215
2229
|
variant: t ? "filled" : "subtle",
|
|
@@ -2218,7 +2232,7 @@ function io({
|
|
|
2218
2232
|
style: {
|
|
2219
2233
|
opacity: a ? 0.5 : 1
|
|
2220
2234
|
},
|
|
2221
|
-
children: /* @__PURE__ */ r(
|
|
2235
|
+
children: /* @__PURE__ */ r(q, { style: { color: t ? "white" : e }, children: A.icon })
|
|
2222
2236
|
}
|
|
2223
2237
|
),
|
|
2224
2238
|
/* @__PURE__ */ r(
|
|
@@ -2258,9 +2272,9 @@ function io({
|
|
|
2258
2272
|
}
|
|
2259
2273
|
);
|
|
2260
2274
|
}
|
|
2261
|
-
return /* @__PURE__ */ r(
|
|
2275
|
+
return /* @__PURE__ */ r(De, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(W, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2262
2276
|
/* @__PURE__ */ r(
|
|
2263
|
-
|
|
2277
|
+
Me,
|
|
2264
2278
|
{
|
|
2265
2279
|
size: "xl",
|
|
2266
2280
|
variant: t ? "filled" : "subtle",
|
|
@@ -2270,7 +2284,7 @@ function io({
|
|
|
2270
2284
|
style: {
|
|
2271
2285
|
opacity: a ? 0.5 : 1
|
|
2272
2286
|
},
|
|
2273
|
-
children: /* @__PURE__ */ r(
|
|
2287
|
+
children: /* @__PURE__ */ r(q, { style: { color: t ? "white" : e }, children: A.icon })
|
|
2274
2288
|
}
|
|
2275
2289
|
),
|
|
2276
2290
|
/* @__PURE__ */ r(
|
|
@@ -2306,63 +2320,63 @@ function co({
|
|
|
2306
2320
|
backgroundDarkColor: d,
|
|
2307
2321
|
backgroundLightColor: u,
|
|
2308
2322
|
iconDarkColor: p,
|
|
2309
|
-
iconLightColor:
|
|
2310
|
-
activeColor:
|
|
2311
|
-
withBorder:
|
|
2312
|
-
withShadow:
|
|
2323
|
+
iconLightColor: y,
|
|
2324
|
+
activeColor: m,
|
|
2325
|
+
withBorder: g = !0,
|
|
2326
|
+
withShadow: b = !1,
|
|
2313
2327
|
highlightActiveItem: f = !0,
|
|
2314
2328
|
onMenuItemClick: x
|
|
2315
2329
|
}) {
|
|
2316
|
-
const
|
|
2330
|
+
const E = me(), { colorScheme: M } = de(), { toggleCollapsed: V } = vA(), U = M === "dark" ? d ?? E.colors.dark[7] : u ?? E.white, Y = M === "dark" ? p ?? E.colors[E.primaryColor][4] : y ?? E.colors[E.primaryColor][6], P = m ?? E.primaryColor, { navigateToItem: F, isItemActive: z, isItemOrChildActive: Q } = wA({
|
|
2317
2331
|
navigationData: A,
|
|
2318
2332
|
onMenuItemClick: x
|
|
2319
2333
|
});
|
|
2320
2334
|
SA({
|
|
2321
2335
|
navigationData: A,
|
|
2322
|
-
navigateToItem:
|
|
2323
|
-
onToggleSidebar:
|
|
2336
|
+
navigateToItem: F,
|
|
2337
|
+
onToggleSidebar: V,
|
|
2324
2338
|
enabled: !0
|
|
2325
2339
|
});
|
|
2326
|
-
const
|
|
2340
|
+
const O = A.filter((C) => !(!C.showInSidebar || (typeof C.disabled == "function" ? C.disabled() : C.disabled) && C.hideDisabledItem)), v = () => l ? h || /* @__PURE__ */ r(xA, { message: l, backgroundColor: U }) : a ? i || /* @__PURE__ */ r(
|
|
2327
2341
|
kA,
|
|
2328
2342
|
{
|
|
2329
2343
|
itemCount: c,
|
|
2330
2344
|
collapsed: !0,
|
|
2331
|
-
backgroundColor:
|
|
2345
|
+
backgroundColor: U
|
|
2332
2346
|
}
|
|
2333
|
-
) : /* @__PURE__ */ r(
|
|
2347
|
+
) : /* @__PURE__ */ r(W, { gap: 8, align: "center", children: O.map((C, _) => /* @__PURE__ */ r(
|
|
2334
2348
|
io,
|
|
2335
2349
|
{
|
|
2336
|
-
item:
|
|
2337
|
-
active: f && (
|
|
2338
|
-
onClick:
|
|
2350
|
+
item: C,
|
|
2351
|
+
active: f && (z(C) || Q(C)),
|
|
2352
|
+
onClick: F,
|
|
2339
2353
|
iconColor: Y,
|
|
2340
|
-
activeColor:
|
|
2354
|
+
activeColor: P
|
|
2341
2355
|
},
|
|
2342
|
-
|
|
2343
|
-
)) }),
|
|
2356
|
+
_
|
|
2357
|
+
)) }), L = M === "dark" ? E.colors.dark[5] : E.colors.gray[2];
|
|
2344
2358
|
return /* @__PURE__ */ R(
|
|
2345
|
-
|
|
2359
|
+
q,
|
|
2346
2360
|
{
|
|
2347
2361
|
style: {
|
|
2348
|
-
width:
|
|
2349
|
-
height:
|
|
2350
|
-
backgroundColor:
|
|
2362
|
+
width: pe(t),
|
|
2363
|
+
height: pe(o),
|
|
2364
|
+
backgroundColor: U,
|
|
2351
2365
|
display: "flex",
|
|
2352
2366
|
flexDirection: "column",
|
|
2353
2367
|
overflow: "hidden",
|
|
2354
|
-
boxShadow:
|
|
2355
|
-
borderRight:
|
|
2368
|
+
boxShadow: b ? E.shadows.sm : void 0,
|
|
2369
|
+
borderRight: g ? `1px solid ${L}` : void 0
|
|
2356
2370
|
},
|
|
2357
2371
|
children: [
|
|
2358
2372
|
e && /* @__PURE__ */ r(
|
|
2359
|
-
|
|
2373
|
+
q,
|
|
2360
2374
|
{
|
|
2361
2375
|
style: {
|
|
2362
2376
|
flexShrink: 0,
|
|
2363
2377
|
display: "flex",
|
|
2364
2378
|
justifyContent: "center",
|
|
2365
|
-
padding:
|
|
2379
|
+
padding: E.spacing.xs
|
|
2366
2380
|
},
|
|
2367
2381
|
children: e
|
|
2368
2382
|
}
|
|
@@ -2374,20 +2388,20 @@ function co({
|
|
|
2374
2388
|
style: { flex: 1 },
|
|
2375
2389
|
scrollbarSize: 4,
|
|
2376
2390
|
type: "hover",
|
|
2377
|
-
children: /* @__PURE__ */ r(
|
|
2391
|
+
children: /* @__PURE__ */ r(q, { p: "xs", children: v() })
|
|
2378
2392
|
}
|
|
2379
2393
|
),
|
|
2380
2394
|
n && /* @__PURE__ */ R(Pe, { children: [
|
|
2381
2395
|
/* @__PURE__ */ r(dA, {}),
|
|
2382
2396
|
/* @__PURE__ */ r(
|
|
2383
|
-
|
|
2397
|
+
q,
|
|
2384
2398
|
{
|
|
2385
2399
|
style: {
|
|
2386
2400
|
flexShrink: 0,
|
|
2387
2401
|
height: s,
|
|
2388
2402
|
display: "flex",
|
|
2389
2403
|
justifyContent: "center",
|
|
2390
|
-
padding:
|
|
2404
|
+
padding: E.spacing.xs
|
|
2391
2405
|
},
|
|
2392
2406
|
children: n
|
|
2393
2407
|
}
|
|
@@ -2437,53 +2451,53 @@ function ho({
|
|
|
2437
2451
|
loadingError: d,
|
|
2438
2452
|
loadingComponent: u,
|
|
2439
2453
|
errorComponent: p,
|
|
2440
|
-
skeletonItemCount:
|
|
2441
|
-
skeletonGroupCount:
|
|
2442
|
-
backgroundDarkColor:
|
|
2443
|
-
backgroundLightColor:
|
|
2454
|
+
skeletonItemCount: y = 8,
|
|
2455
|
+
skeletonGroupCount: m = 3,
|
|
2456
|
+
backgroundDarkColor: g,
|
|
2457
|
+
backgroundLightColor: b,
|
|
2444
2458
|
backgroundImage: f,
|
|
2445
2459
|
textDarkColor: x,
|
|
2446
|
-
textLightColor:
|
|
2447
|
-
iconDarkColor:
|
|
2448
|
-
iconLightColor:
|
|
2449
|
-
activeColor:
|
|
2460
|
+
textLightColor: E,
|
|
2461
|
+
iconDarkColor: M,
|
|
2462
|
+
iconLightColor: V,
|
|
2463
|
+
activeColor: U,
|
|
2450
2464
|
groupBackgroundColor: Y,
|
|
2451
|
-
selectedGroupColor:
|
|
2452
|
-
groupColor:
|
|
2453
|
-
groupLabelDarkColor:
|
|
2454
|
-
groupLabelLightColor:
|
|
2455
|
-
withBorder:
|
|
2456
|
-
highlightActiveItem:
|
|
2457
|
-
onMenuItemClick:
|
|
2458
|
-
itemBorderRadius:
|
|
2459
|
-
itemHorizontalGap:
|
|
2460
|
-
itemActiveBackground:
|
|
2465
|
+
selectedGroupColor: P,
|
|
2466
|
+
groupColor: F,
|
|
2467
|
+
groupLabelDarkColor: z,
|
|
2468
|
+
groupLabelLightColor: Q,
|
|
2469
|
+
withBorder: O = !1,
|
|
2470
|
+
highlightActiveItem: v = !0,
|
|
2471
|
+
onMenuItemClick: L,
|
|
2472
|
+
itemBorderRadius: C,
|
|
2473
|
+
itemHorizontalGap: _,
|
|
2474
|
+
itemActiveBackground: H
|
|
2461
2475
|
}) {
|
|
2462
|
-
const
|
|
2463
|
-
collapsed:
|
|
2476
|
+
const I = me(), { colorScheme: G } = de(), {
|
|
2477
|
+
collapsed: re,
|
|
2464
2478
|
toggleCollapsed: Ce,
|
|
2465
2479
|
activeGroup: se,
|
|
2466
2480
|
setActiveGroup: be
|
|
2467
|
-
} = vA(), we = G === "dark" ?
|
|
2481
|
+
} = vA(), we = G === "dark" ? g ?? I.colors.dark[7] : b ?? I.white, Se = f ? { background: f } : { backgroundColor: we }, S = f ? "transparent" : we, k = G === "dark" ? x ?? I.colors.gray[3] : E ?? I.colors.gray[7], $ = G === "dark" ? M ?? I.colors[I.primaryColor][4] : V ?? I.colors[I.primaryColor][6], D = U ? I.colors[U]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], B = Y || (G === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), T = P || (G === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: N, isItemActive: X } = wA({
|
|
2468
2482
|
navigationData: A,
|
|
2469
|
-
onMenuItemClick:
|
|
2470
|
-
}), he =
|
|
2471
|
-
(
|
|
2472
|
-
[
|
|
2483
|
+
onMenuItemClick: L
|
|
2484
|
+
}), he = w(
|
|
2485
|
+
(K) => !!v && X(K),
|
|
2486
|
+
[v, X]
|
|
2473
2487
|
), Ie = {
|
|
2474
|
-
itemBorderRadius:
|
|
2475
|
-
itemHorizontalGap:
|
|
2476
|
-
activeBackground:
|
|
2488
|
+
itemBorderRadius: C,
|
|
2489
|
+
itemHorizontalGap: _,
|
|
2490
|
+
activeBackground: H,
|
|
2477
2491
|
isActive: he
|
|
2478
2492
|
};
|
|
2479
2493
|
SA({
|
|
2480
2494
|
navigationData: A,
|
|
2481
|
-
navigateToItem:
|
|
2495
|
+
navigateToItem: N,
|
|
2482
2496
|
onToggleSidebar: Ce,
|
|
2483
2497
|
enabled: !0
|
|
2484
2498
|
});
|
|
2485
|
-
const
|
|
2486
|
-
const
|
|
2499
|
+
const j = ce(() => {
|
|
2500
|
+
const K = /* @__PURE__ */ new Map();
|
|
2487
2501
|
return A.forEach((le) => {
|
|
2488
2502
|
if (!le.showInSidebar || (typeof le.disabled == "function" ? le.disabled() : le.disabled) && le.hideDisabledItem)
|
|
2489
2503
|
return;
|
|
@@ -2493,27 +2507,27 @@ function ho({
|
|
|
2493
2507
|
name: "Default",
|
|
2494
2508
|
hint: "Default",
|
|
2495
2509
|
indexOrder: 0
|
|
2496
|
-
}, Qe =
|
|
2497
|
-
Qe ? Qe.items.push(le) :
|
|
2510
|
+
}, Qe = K.get(Ve.name);
|
|
2511
|
+
Qe ? Qe.items.push(le) : K.set(Ve.name, {
|
|
2498
2512
|
group: Ve,
|
|
2499
2513
|
items: [le]
|
|
2500
2514
|
});
|
|
2501
|
-
}), Array.from(
|
|
2515
|
+
}), Array.from(K.values()).sort((le, Fe) => le.group.indexOrder - Fe.group.indexOrder);
|
|
2502
2516
|
}, [A, s]);
|
|
2503
2517
|
oe(() => {
|
|
2504
|
-
!se &&
|
|
2505
|
-
}, [se,
|
|
2506
|
-
const ve = ce(() =>
|
|
2507
|
-
|
|
2508
|
-
}, [
|
|
2518
|
+
!se && j.length > 0 && be(j[0].group.name);
|
|
2519
|
+
}, [se, j, be]);
|
|
2520
|
+
const ve = ce(() => j.find((le) => le.group.name === se)?.items ?? [], [j, se]), Z = w((K) => {
|
|
2521
|
+
re ? (Ce(), be(K)) : se === K ? Ce() : be(K);
|
|
2522
|
+
}, [re, se, Ce, be]), ee = re ? 0 : Number(pe(t)) - Number(pe(n)), Ee = () => c && j.length === 0 ? /* @__PURE__ */ r(
|
|
2509
2523
|
so,
|
|
2510
2524
|
{
|
|
2511
|
-
groupCount:
|
|
2525
|
+
groupCount: m,
|
|
2512
2526
|
width: n,
|
|
2513
2527
|
backgroundColor: B
|
|
2514
2528
|
}
|
|
2515
|
-
) :
|
|
2516
|
-
|
|
2529
|
+
) : j.length <= 1 ? null : /* @__PURE__ */ r(
|
|
2530
|
+
W,
|
|
2517
2531
|
{
|
|
2518
2532
|
gap: 4,
|
|
2519
2533
|
p: 4,
|
|
@@ -2524,107 +2538,107 @@ function ho({
|
|
|
2524
2538
|
backgroundColor: B,
|
|
2525
2539
|
flexShrink: 0
|
|
2526
2540
|
},
|
|
2527
|
-
children:
|
|
2541
|
+
children: j.map((K) => /* @__PURE__ */ r(
|
|
2528
2542
|
no,
|
|
2529
2543
|
{
|
|
2530
|
-
group:
|
|
2531
|
-
active:
|
|
2532
|
-
onClick: () =>
|
|
2544
|
+
group: K.group,
|
|
2545
|
+
active: K.group.name === se,
|
|
2546
|
+
onClick: () => Z(K.group.name),
|
|
2533
2547
|
showLabel: a,
|
|
2534
|
-
activeColor:
|
|
2535
|
-
inactiveColor:
|
|
2548
|
+
activeColor: T,
|
|
2549
|
+
inactiveColor: F
|
|
2536
2550
|
},
|
|
2537
|
-
|
|
2551
|
+
K.group.name
|
|
2538
2552
|
))
|
|
2539
2553
|
}
|
|
2540
|
-
),
|
|
2554
|
+
), J = () => d ? p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: we }) : c ? u || /* @__PURE__ */ r(
|
|
2541
2555
|
kA,
|
|
2542
2556
|
{
|
|
2543
|
-
itemCount:
|
|
2557
|
+
itemCount: y,
|
|
2544
2558
|
collapsed: !1,
|
|
2545
2559
|
backgroundColor: we,
|
|
2546
2560
|
showGroups: !1
|
|
2547
2561
|
}
|
|
2548
|
-
) : /* @__PURE__ */ r(
|
|
2562
|
+
) : /* @__PURE__ */ r(W, { gap: 2, children: ve.map((K, le) => /* @__PURE__ */ r(
|
|
2549
2563
|
$e,
|
|
2550
2564
|
{
|
|
2551
|
-
item:
|
|
2565
|
+
item: K,
|
|
2552
2566
|
collapsed: !1,
|
|
2553
|
-
active:
|
|
2554
|
-
onClick:
|
|
2555
|
-
textColor:
|
|
2567
|
+
active: v && X(K),
|
|
2568
|
+
onClick: N,
|
|
2569
|
+
textColor: k,
|
|
2556
2570
|
iconColor: $,
|
|
2557
|
-
hoverColor:
|
|
2571
|
+
hoverColor: D,
|
|
2558
2572
|
...Ie
|
|
2559
2573
|
},
|
|
2560
2574
|
le
|
|
2561
|
-
)) }), ke = G === "dark" ?
|
|
2562
|
-
return
|
|
2563
|
-
l && /* @__PURE__ */ r(
|
|
2575
|
+
)) }), ke = G === "dark" ? I.colors.dark[5] : I.colors.gray[2];
|
|
2576
|
+
return j.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: re ? o : t, h: "100%", style: Se, children: [
|
|
2577
|
+
l && /* @__PURE__ */ r(q, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2564
2578
|
/* @__PURE__ */ r(
|
|
2565
|
-
|
|
2579
|
+
q,
|
|
2566
2580
|
{
|
|
2567
2581
|
style: {
|
|
2568
2582
|
flex: 1,
|
|
2569
2583
|
width: "100%",
|
|
2570
|
-
backgroundColor:
|
|
2584
|
+
backgroundColor: S,
|
|
2571
2585
|
display: "flex",
|
|
2572
2586
|
flexDirection: "column",
|
|
2573
2587
|
overflow: "hidden",
|
|
2574
|
-
borderRight:
|
|
2588
|
+
borderRight: O ? `1px solid ${ke}` : void 0
|
|
2575
2589
|
},
|
|
2576
|
-
children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(
|
|
2590
|
+
children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(q, { p: "xs", children: re ? /* @__PURE__ */ r(W, { gap: 8, align: "center", children: A.filter((K) => K.showInSidebar ? !((typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem) : !1).map((K, le) => /* @__PURE__ */ r(
|
|
2577
2591
|
$e,
|
|
2578
2592
|
{
|
|
2579
|
-
item:
|
|
2593
|
+
item: K,
|
|
2580
2594
|
collapsed: !0,
|
|
2581
|
-
active:
|
|
2582
|
-
onClick:
|
|
2583
|
-
textColor:
|
|
2595
|
+
active: v && X(K),
|
|
2596
|
+
onClick: N,
|
|
2597
|
+
textColor: k,
|
|
2584
2598
|
iconColor: $,
|
|
2585
|
-
hoverColor:
|
|
2599
|
+
hoverColor: D,
|
|
2586
2600
|
...Ie
|
|
2587
2601
|
},
|
|
2588
2602
|
le
|
|
2589
|
-
)) }) :
|
|
2603
|
+
)) }) : J() }) })
|
|
2590
2604
|
}
|
|
2591
2605
|
),
|
|
2592
|
-
i && /* @__PURE__ */ r(
|
|
2593
|
-
] }) : /* @__PURE__ */ R(Ye, { direction: "column", w:
|
|
2594
|
-
l && /* @__PURE__ */ r(
|
|
2606
|
+
i && /* @__PURE__ */ r(q, { style: { width: "100%", backgroundColor: S, flexShrink: 0 }, children: i })
|
|
2607
|
+
] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: re ? n : t, h: "100%", style: Se, children: [
|
|
2608
|
+
l && /* @__PURE__ */ r(q, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2595
2609
|
/* @__PURE__ */ R(
|
|
2596
|
-
|
|
2610
|
+
q,
|
|
2597
2611
|
{
|
|
2598
2612
|
style: {
|
|
2599
2613
|
flex: 1,
|
|
2600
2614
|
width: "100%",
|
|
2601
2615
|
display: "flex",
|
|
2602
2616
|
overflow: "hidden",
|
|
2603
|
-
borderRight:
|
|
2617
|
+
borderRight: O ? `1px solid ${ke}` : void 0
|
|
2604
2618
|
},
|
|
2605
2619
|
children: [
|
|
2606
2620
|
Ee(),
|
|
2607
2621
|
/* @__PURE__ */ r(
|
|
2608
|
-
|
|
2622
|
+
q,
|
|
2609
2623
|
{
|
|
2610
2624
|
style: {
|
|
2611
|
-
width:
|
|
2625
|
+
width: re ? 0 : ee,
|
|
2612
2626
|
height: "100%",
|
|
2613
|
-
backgroundColor:
|
|
2627
|
+
backgroundColor: S,
|
|
2614
2628
|
overflow: "hidden",
|
|
2615
2629
|
transition: "width 200ms ease",
|
|
2616
|
-
borderLeft:
|
|
2630
|
+
borderLeft: j.length > 1 ? `1px solid ${G === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
|
|
2617
2631
|
},
|
|
2618
|
-
children: !
|
|
2632
|
+
children: !re && se && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(q, { p: "xs", children: J() }) })
|
|
2619
2633
|
}
|
|
2620
2634
|
)
|
|
2621
2635
|
]
|
|
2622
2636
|
}
|
|
2623
2637
|
),
|
|
2624
|
-
i && /* @__PURE__ */ r(
|
|
2638
|
+
i && /* @__PURE__ */ r(q, { style: { width: "100%", backgroundColor: S, flexShrink: 0 }, children: i })
|
|
2625
2639
|
] });
|
|
2626
2640
|
}
|
|
2627
|
-
function
|
|
2641
|
+
function po(A) {
|
|
2628
2642
|
const {
|
|
2629
2643
|
navigationData: t,
|
|
2630
2644
|
collapsed: o,
|
|
@@ -2655,7 +2669,7 @@ function fo(A) {
|
|
|
2655
2669
|
}
|
|
2656
2670
|
);
|
|
2657
2671
|
}
|
|
2658
|
-
function
|
|
2672
|
+
function fo({
|
|
2659
2673
|
variant: A = "standard",
|
|
2660
2674
|
...t
|
|
2661
2675
|
}) {
|
|
@@ -2663,7 +2677,7 @@ function po({
|
|
|
2663
2677
|
case "minimal":
|
|
2664
2678
|
return /* @__PURE__ */ r(uo, { ...t });
|
|
2665
2679
|
case "rail":
|
|
2666
|
-
return /* @__PURE__ */ r(
|
|
2680
|
+
return /* @__PURE__ */ r(po, { ...t });
|
|
2667
2681
|
case "standard":
|
|
2668
2682
|
default:
|
|
2669
2683
|
return /* @__PURE__ */ r(ao, { ...t });
|
|
@@ -2702,21 +2716,21 @@ var ur = Ne({ active: !1, refresh: () => {
|
|
|
2702
2716
|
}, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), go = YA(function(A) {
|
|
2703
2717
|
let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A, i = ce(() => ({ active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, e, n, s, a, l]);
|
|
2704
2718
|
return r(ur.Provider, { value: i, children: t });
|
|
2705
|
-
}), bo = go, hr = HA.Activity, mo = hr ?? HA.Fragment, yo = !!hr,
|
|
2706
|
-
function
|
|
2719
|
+
}), bo = go, hr = HA.Activity, mo = hr ?? HA.Fragment, yo = !!hr, pr = "keepalive-cache-div";
|
|
2720
|
+
function fr(A) {
|
|
2707
2721
|
return A ? Array.from(A.children) : [];
|
|
2708
2722
|
}
|
|
2709
|
-
function
|
|
2723
|
+
function pA(A) {
|
|
2710
2724
|
A.forEach((t) => {
|
|
2711
|
-
t.classList.contains(
|
|
2725
|
+
t.classList.contains(pr) && t.remove();
|
|
2712
2726
|
});
|
|
2713
2727
|
}
|
|
2714
2728
|
function GA(A, t) {
|
|
2715
|
-
let o =
|
|
2716
|
-
|
|
2729
|
+
let o = fr(A);
|
|
2730
|
+
pA(o), A.appendChild(t), t.classList.remove("inactive"), t.classList.add("active");
|
|
2717
2731
|
}
|
|
2718
2732
|
function BA(A, t) {
|
|
2719
|
-
let o =
|
|
2733
|
+
let o = fr(A).filter((e) => e.classList.contains("active") && e.getAttribute("data-cache-key") !== t);
|
|
2720
2734
|
return o.forEach((e) => {
|
|
2721
2735
|
e.classList.remove("active"), e.classList.add("inactive");
|
|
2722
2736
|
}), o;
|
|
@@ -2725,14 +2739,14 @@ function vo(A, t, o) {
|
|
|
2725
2739
|
return o ? VA(o, A) : t ? !VA(t, A) : !0;
|
|
2726
2740
|
}
|
|
2727
2741
|
var Co = YA(function(A) {
|
|
2728
|
-
let { errorElement: t = qA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: i, renderCount: h, destroy: c, transition: d, viewTransition: u, duration: p, containerDivRef:
|
|
2729
|
-
|
|
2730
|
-
let
|
|
2731
|
-
let
|
|
2732
|
-
return dr(
|
|
2742
|
+
let { errorElement: t = qA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: i, renderCount: h, destroy: c, transition: d, viewTransition: u, duration: p, containerDivRef: y } = A, m = Ae(!1);
|
|
2743
|
+
m.current = m.current || i;
|
|
2744
|
+
let g = ce(() => {
|
|
2745
|
+
let b = document.createElement("div");
|
|
2746
|
+
return dr(b).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", h.toString()), b.className = pr + (o ? ` ${o}` : ""), b;
|
|
2733
2747
|
}, [h, o]);
|
|
2734
2748
|
return oe(() => {
|
|
2735
|
-
let
|
|
2749
|
+
let b = vo(n, s, a), f = y.current;
|
|
2736
2750
|
if (!f) {
|
|
2737
2751
|
console.warn("keepalive: cache container not found");
|
|
2738
2752
|
return;
|
|
@@ -2741,89 +2755,89 @@ var Co = YA(function(A) {
|
|
|
2741
2755
|
(async () => {
|
|
2742
2756
|
if (i) {
|
|
2743
2757
|
let x = BA(f, n);
|
|
2744
|
-
if (await FA(p - 40),
|
|
2758
|
+
if (await FA(p - 40), pA(x), f.contains(g))
|
|
2745
2759
|
return;
|
|
2746
|
-
GA(f,
|
|
2760
|
+
GA(f, g);
|
|
2747
2761
|
} else
|
|
2748
|
-
|
|
2762
|
+
b || (await FA(p), c(n));
|
|
2749
2763
|
})();
|
|
2750
2764
|
else if (i) {
|
|
2751
2765
|
let x = () => {
|
|
2752
|
-
let
|
|
2753
|
-
|
|
2766
|
+
let E = BA(f, n);
|
|
2767
|
+
pA(E), !f.contains(g) && GA(f, g);
|
|
2754
2768
|
};
|
|
2755
2769
|
u && document.startViewTransition ? document.startViewTransition(x) : x();
|
|
2756
2770
|
} else
|
|
2757
|
-
|
|
2758
|
-
}, [i,
|
|
2771
|
+
b || c(n);
|
|
2772
|
+
}, [i, y, n, s, a]), m.current ? Mt(r(t, { children: yo && l ? R(mo, { mode: i ? "visible" : "hidden", children: [" ", e] }) : e }), g, n) : null;
|
|
2759
2773
|
}, (A, t) => A.active === t.active && A.renderCount === t.renderCount && A.children === t.children && A.exclude === t.exclude && A.include === t.include), wo = Co, So = (A) => {
|
|
2760
2774
|
typeof nA < "u" && We(nA) ? nA(A) : A();
|
|
2761
2775
|
}, ko = So;
|
|
2762
2776
|
function gr() {
|
|
2763
|
-
return
|
|
2777
|
+
return Ae(null);
|
|
2764
2778
|
}
|
|
2765
2779
|
function xo(A) {
|
|
2766
|
-
let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: i = "keep-alive-render", errorElement: h, transition: c = !1, viewTransition: d = !1, duration: u = 200, children: p, aliveRef:
|
|
2780
|
+
let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: i = "keep-alive-render", errorElement: h, transition: c = !1, viewTransition: d = !1, duration: u = 200, children: p, aliveRef: y, maxAliveTime: m = 0, enableActivity: g = !1 } = A, b = a || Ae(null), [f, x] = ge([]);
|
|
2767
2781
|
Er(() => {
|
|
2768
2782
|
IA(t) || ko(() => {
|
|
2769
|
-
x((
|
|
2770
|
-
let
|
|
2771
|
-
if (
|
|
2772
|
-
return
|
|
2773
|
-
if (
|
|
2774
|
-
let
|
|
2775
|
-
if (We(s) && s(t),
|
|
2776
|
-
let
|
|
2777
|
-
if (hA(
|
|
2778
|
-
let
|
|
2779
|
-
|
|
2783
|
+
x((P) => {
|
|
2784
|
+
let F = Date.now();
|
|
2785
|
+
if (P.find((z) => z.cacheKey === t))
|
|
2786
|
+
return P.map((z) => {
|
|
2787
|
+
if (z.cacheKey === t) {
|
|
2788
|
+
let Q = !1;
|
|
2789
|
+
if (We(s) && s(t), m) {
|
|
2790
|
+
let O = z.lastActiveTime;
|
|
2791
|
+
if (hA(m)) {
|
|
2792
|
+
let v = m.find((L) => cr(L.match) ? L.match.test(t) : L.match === t);
|
|
2793
|
+
v && (Q = v && O + v.expire * 1e3 < F);
|
|
2780
2794
|
} else
|
|
2781
|
-
|
|
2795
|
+
Q = O + m * 1e3 < F;
|
|
2782
2796
|
}
|
|
2783
|
-
return { ...
|
|
2797
|
+
return { ...z, ele: p, lastActiveTime: F, renderCount: Q ? z.renderCount + 1 : z.renderCount };
|
|
2784
2798
|
}
|
|
2785
|
-
return
|
|
2799
|
+
return z;
|
|
2786
2800
|
});
|
|
2787
|
-
if (We(s) && s(t),
|
|
2788
|
-
let
|
|
2789
|
-
|
|
2801
|
+
if (We(s) && s(t), P.length > o) {
|
|
2802
|
+
let z = P.reduce((Q, O) => Q.lastActiveTime < O.lastActiveTime ? Q : O);
|
|
2803
|
+
P.splice(P.indexOf(z), 1);
|
|
2790
2804
|
}
|
|
2791
|
-
return [...
|
|
2805
|
+
return [...P, { cacheKey: t, lastActiveTime: F, ele: p, renderCount: 0 }];
|
|
2792
2806
|
});
|
|
2793
2807
|
});
|
|
2794
2808
|
}, [t, p]);
|
|
2795
|
-
let
|
|
2796
|
-
x((
|
|
2797
|
-
let
|
|
2798
|
-
return
|
|
2809
|
+
let E = w((P) => {
|
|
2810
|
+
x((F) => {
|
|
2811
|
+
let z = P || t;
|
|
2812
|
+
return F.map((Q) => Q.cacheKey === z ? { ...Q, renderCount: Q.renderCount + 1 } : Q);
|
|
2799
2813
|
});
|
|
2800
|
-
}, [x, t]),
|
|
2801
|
-
let
|
|
2802
|
-
return new Promise((
|
|
2814
|
+
}, [x, t]), M = w((P) => {
|
|
2815
|
+
let F = P || t, z = hA(F) ? F : [F];
|
|
2816
|
+
return new Promise((Q) => {
|
|
2803
2817
|
lA(() => {
|
|
2804
|
-
x((
|
|
2818
|
+
x((O) => [...O.filter((v) => !z.includes(v.cacheKey))]), Q();
|
|
2805
2819
|
});
|
|
2806
2820
|
});
|
|
2807
|
-
}, [x, t]),
|
|
2821
|
+
}, [x, t]), V = w(() => new Promise((P) => {
|
|
2808
2822
|
lA(() => {
|
|
2809
|
-
x([]),
|
|
2823
|
+
x([]), P();
|
|
2810
2824
|
});
|
|
2811
|
-
}), [x]),
|
|
2812
|
-
let
|
|
2813
|
-
return new Promise((
|
|
2825
|
+
}), [x]), U = w((P) => {
|
|
2826
|
+
let F = P || t;
|
|
2827
|
+
return new Promise((z) => {
|
|
2814
2828
|
lA(() => {
|
|
2815
|
-
x((
|
|
2829
|
+
x((Q) => [...Q.filter((O) => O.cacheKey === F)]), z();
|
|
2816
2830
|
});
|
|
2817
2831
|
});
|
|
2818
|
-
}, [t, x]), Y =
|
|
2819
|
-
return Rr(
|
|
2820
|
-
let { cacheKey:
|
|
2821
|
-
return r(bo, { active: t ===
|
|
2832
|
+
}, [t, x]), Y = w(() => f, [f]);
|
|
2833
|
+
return Rr(y, () => ({ refresh: E, destroy: M, destroyAll: V, destroyOther: U, getCacheNodes: Y })), R(qA, { children: [r("div", { ref: b, className: i, style: { height: "100%" } }), f.map((P) => {
|
|
2834
|
+
let { cacheKey: F, ele: z, renderCount: Q } = P;
|
|
2835
|
+
return r(bo, { active: t === F, refresh: E, destroy: M, destroyAll: V, destroyOther: U, getCacheNodes: Y, children: r(wo, { destroy: M, include: n, exclude: e, transition: c, viewTransition: d, duration: u, renderCount: Q, containerDivRef: b, errorElement: h, active: t === F, cacheNodeClassName: l, cacheKey: F, enableActivity: g, children: z }) }, `${F}-${Q}`);
|
|
2822
2836
|
})] });
|
|
2823
2837
|
}
|
|
2824
2838
|
var Io = xo, To = () => ye(ur), br = To;
|
|
2825
2839
|
function Eo(A, t, o = !1, e) {
|
|
2826
|
-
let { active: n } = br(), s =
|
|
2840
|
+
let { active: n } = br(), s = Ae(!1);
|
|
2827
2841
|
e(() => {
|
|
2828
2842
|
if (!n)
|
|
2829
2843
|
return;
|
|
@@ -2852,7 +2866,7 @@ const mr = Ne({
|
|
|
2852
2866
|
const n = Object.keys(A);
|
|
2853
2867
|
return n.length === 0 ? !1 : n.some((s) => A[s] !== void 0);
|
|
2854
2868
|
}, [A]) ? A : o;
|
|
2855
|
-
}, Ze = Ne(null),
|
|
2869
|
+
}, Ze = Ne(null), Do = () => ye(Ze), Mo = ({ children: A }) => {
|
|
2856
2870
|
const t = gr(), o = ce(() => ({
|
|
2857
2871
|
requestUnregister: (e) => {
|
|
2858
2872
|
t.current?.destroy(e);
|
|
@@ -2870,20 +2884,20 @@ const mr = Ne({
|
|
|
2870
2884
|
}), [t]);
|
|
2871
2885
|
return /* @__PURE__ */ r(Ze.Provider, { value: o, children: /* @__PURE__ */ r(yr.Provider, { value: t, children: A }) });
|
|
2872
2886
|
}, yr = Ne(null), eA = (A) => null, No = (A) => A.includes(":"), zo = (A, t) => No(A) ? t : A, Oo = ({ children: A }) => {
|
|
2873
|
-
const { active: t } = br(), o = or(), e = Xe(), n = kt(), s =
|
|
2887
|
+
const { active: t } = br(), o = or(), e = Xe(), n = kt(), s = Ae(o), [a, l] = ge(o);
|
|
2874
2888
|
s.current = o;
|
|
2875
|
-
const i =
|
|
2889
|
+
const i = Ae({ location: e, navigationType: n });
|
|
2876
2890
|
t && (i.current = { location: e, navigationType: n });
|
|
2877
2891
|
const h = ce(
|
|
2878
2892
|
() => t ? { location: e, navigationType: n } : i.current,
|
|
2879
2893
|
[t, e, n]
|
|
2880
|
-
), [c, d] = ge(0), u =
|
|
2894
|
+
), [c, d] = ge(0), u = Ae(t);
|
|
2881
2895
|
Lo(() => {
|
|
2882
2896
|
l(s.current), requestAnimationFrame(() => {
|
|
2883
2897
|
window.dispatchEvent(new Event("resize"));
|
|
2884
2898
|
});
|
|
2885
2899
|
}, []), oe(() => {
|
|
2886
|
-
t && (l(s.current), u.current || d((
|
|
2900
|
+
t && (l(s.current), u.current || d((y) => y + 1)), u.current = t;
|
|
2887
2901
|
}, [t]);
|
|
2888
2902
|
const p = ce(
|
|
2889
2903
|
() => ({ isVisible: t, wasRestored: c > 0, restoreCount: c }),
|
|
@@ -2910,39 +2924,39 @@ const mr = Ne({
|
|
|
2910
2924
|
});
|
|
2911
2925
|
vr.displayName = "KeepAliveLayout";
|
|
2912
2926
|
const Qo = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
2913
|
-
const e = gr(), s = ye(yr) || e, a =
|
|
2914
|
-
const p = xe.Children.toArray(A),
|
|
2927
|
+
const e = gr(), s = ye(yr) || e, a = Ae(null), l = Ae(""), { keepAlivePaths: i, routeElements: h } = ce(() => {
|
|
2928
|
+
const p = xe.Children.toArray(A), y = p.map((f) => {
|
|
2915
2929
|
if (xe.isValidElement(f)) {
|
|
2916
|
-
const x = f.props?.path || "",
|
|
2917
|
-
return `${x}:${
|
|
2930
|
+
const x = f.props?.path || "", E = f.type === eA;
|
|
2931
|
+
return `${x}:${E}`;
|
|
2918
2932
|
}
|
|
2919
2933
|
return "";
|
|
2920
2934
|
}).join("|");
|
|
2921
|
-
if (a.current && l.current ===
|
|
2935
|
+
if (a.current && l.current === y)
|
|
2922
2936
|
return a.current;
|
|
2923
|
-
l.current =
|
|
2924
|
-
const
|
|
2937
|
+
l.current = y;
|
|
2938
|
+
const m = [], g = [];
|
|
2925
2939
|
p.forEach((f) => {
|
|
2926
2940
|
if (xe.isValidElement(f))
|
|
2927
2941
|
if (f.type === eA) {
|
|
2928
2942
|
const x = f.props;
|
|
2929
|
-
x.path &&
|
|
2930
|
-
const
|
|
2931
|
-
|
|
2943
|
+
x.path && m.push(x.path);
|
|
2944
|
+
const E = x.component, M = typeof E == "function" ? xe.createElement(E) : E;
|
|
2945
|
+
g.push(
|
|
2932
2946
|
/* @__PURE__ */ r(
|
|
2933
2947
|
Ke,
|
|
2934
2948
|
{
|
|
2935
2949
|
path: x.path,
|
|
2936
|
-
element: /* @__PURE__ */ r(Oo, { children:
|
|
2950
|
+
element: /* @__PURE__ */ r(Oo, { children: M })
|
|
2937
2951
|
},
|
|
2938
2952
|
x.path || f.key
|
|
2939
2953
|
)
|
|
2940
2954
|
);
|
|
2941
2955
|
} else
|
|
2942
|
-
|
|
2956
|
+
g.push(f);
|
|
2943
2957
|
});
|
|
2944
|
-
const
|
|
2945
|
-
return a.current =
|
|
2958
|
+
const b = { keepAlivePaths: m, routeElements: g };
|
|
2959
|
+
return a.current = b, b;
|
|
2946
2960
|
}, [A]), c = ye(Ze), d = ce(() => ({
|
|
2947
2961
|
requestUnregister: (p) => {
|
|
2948
2962
|
s.current?.destroy(p);
|
|
@@ -2974,9 +2988,9 @@ const Qo = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2974
2988
|
isNavigating: !1
|
|
2975
2989
|
}), wr = () => ye(Cr), Ko = 150;
|
|
2976
2990
|
function Fo({ children: A }) {
|
|
2977
|
-
const [t, o] = ge(!1), e =
|
|
2991
|
+
const [t, o] = ge(!1), e = Ae(null), n = Ae(0), s = w(() => {
|
|
2978
2992
|
e.current && clearTimeout(e.current), n.current = Date.now(), o(!0);
|
|
2979
|
-
}, []), a =
|
|
2993
|
+
}, []), a = w(() => {
|
|
2980
2994
|
const l = Date.now() - n.current, i = Math.max(0, Ko - l);
|
|
2981
2995
|
e.current = setTimeout(() => {
|
|
2982
2996
|
o(!1);
|
|
@@ -2998,7 +3012,7 @@ function Vo(A, t, o, e, n, s) {
|
|
|
2998
3012
|
zIndex: "101"
|
|
2999
3013
|
},
|
|
3000
3014
|
children: /* @__PURE__ */ r(
|
|
3001
|
-
|
|
3015
|
+
Me,
|
|
3002
3016
|
{
|
|
3003
3017
|
bg: t.colors[t.primaryColor][4],
|
|
3004
3018
|
color: t.colors[t.primaryColor][6],
|
|
@@ -3026,58 +3040,58 @@ function Go({
|
|
|
3026
3040
|
sidebarDefaultGroupIcon: d,
|
|
3027
3041
|
sideBarHeaderHeight: u,
|
|
3028
3042
|
sideBarHeaderContent: p,
|
|
3029
|
-
selectedGroupColor:
|
|
3030
|
-
groupColor:
|
|
3031
|
-
backgroundGroupColor:
|
|
3032
|
-
groupLabelDarkColor:
|
|
3043
|
+
selectedGroupColor: y = "#132441",
|
|
3044
|
+
groupColor: m = "white",
|
|
3045
|
+
backgroundGroupColor: g = "#132441",
|
|
3046
|
+
groupLabelDarkColor: b = "white",
|
|
3033
3047
|
groupLabelLightColor: f = "white",
|
|
3034
3048
|
headerColor: x,
|
|
3035
|
-
footerHeight:
|
|
3036
|
-
iconsWithBackground:
|
|
3037
|
-
menuItemHeight:
|
|
3038
|
-
showSideBar:
|
|
3049
|
+
footerHeight: E,
|
|
3050
|
+
iconsWithBackground: M,
|
|
3051
|
+
menuItemHeight: V,
|
|
3052
|
+
showSideBar: U = !0,
|
|
3039
3053
|
showHeader: Y = !0,
|
|
3040
|
-
headerStyle:
|
|
3041
|
-
highlightActiveMenuItem:
|
|
3042
|
-
customRenderSidebar:
|
|
3043
|
-
showCollapsedButton:
|
|
3044
|
-
sideBarBackgroundDarkColor:
|
|
3045
|
-
sideBarBackgroundLightColor:
|
|
3046
|
-
sideBarTextDarkColor:
|
|
3047
|
-
sideBarTextLightColor:
|
|
3048
|
-
sideBarIconDarkColor:
|
|
3049
|
-
sideBarIconLightColor:
|
|
3050
|
-
sideBarBackgroundImage:
|
|
3054
|
+
headerStyle: P = {},
|
|
3055
|
+
highlightActiveMenuItem: F = !0,
|
|
3056
|
+
customRenderSidebar: z,
|
|
3057
|
+
showCollapsedButton: Q = !0,
|
|
3058
|
+
sideBarBackgroundDarkColor: O,
|
|
3059
|
+
sideBarBackgroundLightColor: v,
|
|
3060
|
+
sideBarTextDarkColor: L,
|
|
3061
|
+
sideBarTextLightColor: C,
|
|
3062
|
+
sideBarIconDarkColor: _,
|
|
3063
|
+
sideBarIconLightColor: H,
|
|
3064
|
+
sideBarBackgroundImage: I,
|
|
3051
3065
|
mainBackground: G,
|
|
3052
|
-
mainBorderRadius:
|
|
3066
|
+
mainBorderRadius: re,
|
|
3053
3067
|
mainBorderColor: Ce,
|
|
3054
3068
|
sideBarItemBorderRadius: se,
|
|
3055
3069
|
sideBarItemHorizontalGap: be,
|
|
3056
3070
|
sideBarItemActiveBackground: we,
|
|
3057
3071
|
sideBarCollapsedSubmenuWidth: Se,
|
|
3058
|
-
sidebarActiveColor:
|
|
3059
|
-
maxKeepAliveTabs:
|
|
3072
|
+
sidebarActiveColor: S,
|
|
3073
|
+
maxKeepAliveTabs: k = 10,
|
|
3060
3074
|
sidebarVariant: $ = "legacy",
|
|
3061
|
-
sidebarShowSearch:
|
|
3075
|
+
sidebarShowSearch: D = !1
|
|
3062
3076
|
}) {
|
|
3063
|
-
const B = me(),
|
|
3064
|
-
`(max-width: ${s ?
|
|
3077
|
+
const B = me(), T = ye(rA), { colorScheme: N } = de(), X = Et(), [he, Ie] = Rt(), j = Tt(
|
|
3078
|
+
`(max-width: ${s ? pe(s) : B.breakpoints.md})`
|
|
3065
3079
|
), ve = (ae) => {
|
|
3066
|
-
ae.link && (ae.routeParams ?
|
|
3067
|
-
},
|
|
3068
|
-
ae == ue &&
|
|
3069
|
-
},
|
|
3080
|
+
ae.link && (ae.routeParams ? X(ae.link, {}, ae.routeParams) : X(ae.link));
|
|
3081
|
+
}, Z = (ae, ue) => {
|
|
3082
|
+
ae == ue && T.collapsed && T.setCollapsed(!1), T.setCollapsed(ae == ue);
|
|
3083
|
+
}, ee = () => {
|
|
3070
3084
|
let ae = 0, ue = 0;
|
|
3071
|
-
return u && (ae = Number(
|
|
3085
|
+
return u && (ae = Number(pe(u))), a && (ue = Number(pe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + ue}px)`;
|
|
3072
3086
|
}, Ee = () => {
|
|
3073
3087
|
let ae = 0, ue = 0;
|
|
3074
|
-
return u && (ae = Number(
|
|
3075
|
-
},
|
|
3088
|
+
return u && (ae = Number(pe(u))), a && (ue = Number(pe(a))), `calc(100vh - 28px - ${ae + ue}px)`;
|
|
3089
|
+
}, J = ce(() => {
|
|
3076
3090
|
const ae = [];
|
|
3077
|
-
return
|
|
3078
|
-
ue.links ? ue.links.forEach((Oe,
|
|
3079
|
-
Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${
|
|
3080
|
-
/* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${
|
|
3091
|
+
return T.navigationData.forEach((ue, Ge) => {
|
|
3092
|
+
ue.links ? ue.links.forEach((Oe, DA) => {
|
|
3093
|
+
Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${DA}`)) : ae.push(
|
|
3094
|
+
/* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${DA}`)
|
|
3081
3095
|
);
|
|
3082
3096
|
}) : ue.keepAlive === !1 ? ae.push(
|
|
3083
3097
|
/* @__PURE__ */ r(Ke, { path: ue.link, element: ue.component }, `${ue.link}_${Ge}`)
|
|
@@ -3085,34 +3099,34 @@ function Go({
|
|
|
3085
3099
|
/* @__PURE__ */ r(eA, { path: ue.link, component: ue.component }, `${ue.link}_${Ge}`)
|
|
3086
3100
|
);
|
|
3087
3101
|
}), ae;
|
|
3088
|
-
}, [
|
|
3089
|
-
|
|
3090
|
-
}, [
|
|
3091
|
-
|
|
3092
|
-
}, [
|
|
3102
|
+
}, [T.navigationData, T.collapsed]), ke = w(() => {
|
|
3103
|
+
T.setCollapsed(!T.collapsed);
|
|
3104
|
+
}, [T.setCollapsed, T.collapsed]), K = w(() => {
|
|
3105
|
+
T.setHidden(!T.hidden);
|
|
3106
|
+
}, [T.setHidden, T.hidden]);
|
|
3093
3107
|
oe(() => {
|
|
3094
|
-
h && h(
|
|
3095
|
-
}, [
|
|
3096
|
-
i && i(
|
|
3097
|
-
}, [
|
|
3098
|
-
const le = $ === "minimal" ||
|
|
3108
|
+
h && h(T.hidden);
|
|
3109
|
+
}, [T.hidden, K]), oe(() => {
|
|
3110
|
+
i && i(T.collapsed);
|
|
3111
|
+
}, [T.collapsed, i]);
|
|
3112
|
+
const le = $ === "minimal" || T.collapsed ? n : e, Fe = (ae, ue = !1) => z ? z({ width: e, height: ae, isHidden: j }) : $ === "legacy" ? /* @__PURE__ */ r(
|
|
3099
3113
|
Ao,
|
|
3100
3114
|
{
|
|
3101
|
-
navigationData:
|
|
3115
|
+
navigationData: T.navigationData,
|
|
3102
3116
|
sidebarHeight: ae,
|
|
3103
3117
|
sidebarGroupWidth: n,
|
|
3104
3118
|
sidebarCollapsedWidth: n,
|
|
3105
|
-
selectedGroupColor:
|
|
3106
|
-
groupColor:
|
|
3107
|
-
backgroundGroupColor:
|
|
3108
|
-
groupLabelDarkColor:
|
|
3119
|
+
selectedGroupColor: y,
|
|
3120
|
+
groupColor: m,
|
|
3121
|
+
backgroundGroupColor: g,
|
|
3122
|
+
groupLabelDarkColor: b,
|
|
3109
3123
|
groupLabelLightColor: f,
|
|
3110
3124
|
showGroupLabels: !1,
|
|
3111
|
-
collapsed: ue ? !1 :
|
|
3125
|
+
collapsed: ue ? !1 : T.collapsed,
|
|
3112
3126
|
sidebarWidth: e,
|
|
3113
|
-
isHidden:
|
|
3127
|
+
isHidden: j,
|
|
3114
3128
|
onMenuItemClick: ve,
|
|
3115
|
-
onClickActionIcon:
|
|
3129
|
+
onClickActionIcon: Z,
|
|
3116
3130
|
sideBarFooterHeight: a,
|
|
3117
3131
|
sideBarFooterContent: l,
|
|
3118
3132
|
sideBarHeaderContent: p,
|
|
@@ -3120,68 +3134,68 @@ function Go({
|
|
|
3120
3134
|
sidebarRef: he,
|
|
3121
3135
|
defaultGroupIcon: d,
|
|
3122
3136
|
selectedGroupName: c,
|
|
3123
|
-
iconsWithBackground:
|
|
3124
|
-
menuItemHeight:
|
|
3125
|
-
highlightActiveMenuItem:
|
|
3126
|
-
backgroundDarkColor:
|
|
3127
|
-
backgroundLightColor:
|
|
3128
|
-
textDarkColor:
|
|
3129
|
-
textLightColor:
|
|
3130
|
-
iconDarkColor:
|
|
3131
|
-
iconLightColor:
|
|
3137
|
+
iconsWithBackground: M,
|
|
3138
|
+
menuItemHeight: V,
|
|
3139
|
+
highlightActiveMenuItem: F,
|
|
3140
|
+
backgroundDarkColor: O,
|
|
3141
|
+
backgroundLightColor: v,
|
|
3142
|
+
textDarkColor: L,
|
|
3143
|
+
textLightColor: C,
|
|
3144
|
+
iconDarkColor: _,
|
|
3145
|
+
iconLightColor: H,
|
|
3132
3146
|
collapsedSubmenuWidth: Se,
|
|
3133
|
-
isLoading:
|
|
3134
|
-
loadingError:
|
|
3147
|
+
isLoading: T.isLoadingPermissions,
|
|
3148
|
+
loadingError: T.permissionsError
|
|
3135
3149
|
}
|
|
3136
3150
|
) : /* @__PURE__ */ r(
|
|
3137
|
-
|
|
3151
|
+
fo,
|
|
3138
3152
|
{
|
|
3139
|
-
navigationData:
|
|
3153
|
+
navigationData: T.navigationData,
|
|
3140
3154
|
variant: $,
|
|
3141
3155
|
width: le,
|
|
3142
3156
|
collapsedWidth: n,
|
|
3143
3157
|
height: ae,
|
|
3144
3158
|
groupColumnWidth: n,
|
|
3145
|
-
collapsed: ue ? !1 :
|
|
3146
|
-
onCollapsedChange: (Ge) =>
|
|
3159
|
+
collapsed: ue ? !1 : T.collapsed,
|
|
3160
|
+
onCollapsedChange: (Ge) => T.setCollapsed(Ge),
|
|
3147
3161
|
activeGroup: c,
|
|
3148
3162
|
onActiveGroupChange: (Ge) => {
|
|
3149
3163
|
},
|
|
3150
3164
|
defaultGroupIcon: d,
|
|
3151
3165
|
showGroupLabels: !1,
|
|
3152
3166
|
onMenuItemClick: ve,
|
|
3153
|
-
showSearch:
|
|
3167
|
+
showSearch: D,
|
|
3154
3168
|
header: p,
|
|
3155
3169
|
footer: l,
|
|
3156
3170
|
footerHeight: a,
|
|
3157
|
-
isLoading:
|
|
3158
|
-
loadingError:
|
|
3171
|
+
isLoading: T.isLoadingPermissions,
|
|
3172
|
+
loadingError: T.permissionsError,
|
|
3159
3173
|
theme: B,
|
|
3160
|
-
highlightActiveItem:
|
|
3161
|
-
backgroundDarkColor:
|
|
3162
|
-
backgroundLightColor:
|
|
3163
|
-
backgroundImage:
|
|
3164
|
-
textDarkColor:
|
|
3165
|
-
textLightColor:
|
|
3166
|
-
iconDarkColor:
|
|
3167
|
-
iconLightColor:
|
|
3168
|
-
groupBackgroundColor:
|
|
3169
|
-
selectedGroupColor:
|
|
3170
|
-
groupColor:
|
|
3171
|
-
groupLabelDarkColor:
|
|
3174
|
+
highlightActiveItem: F,
|
|
3175
|
+
backgroundDarkColor: O,
|
|
3176
|
+
backgroundLightColor: v,
|
|
3177
|
+
backgroundImage: I,
|
|
3178
|
+
textDarkColor: L,
|
|
3179
|
+
textLightColor: C,
|
|
3180
|
+
iconDarkColor: _,
|
|
3181
|
+
iconLightColor: H,
|
|
3182
|
+
groupBackgroundColor: g,
|
|
3183
|
+
selectedGroupColor: y,
|
|
3184
|
+
groupColor: m,
|
|
3185
|
+
groupLabelDarkColor: b,
|
|
3172
3186
|
groupLabelLightColor: f,
|
|
3173
|
-
activeColor:
|
|
3187
|
+
activeColor: S,
|
|
3174
3188
|
itemBorderRadius: se,
|
|
3175
3189
|
itemHorizontalGap: be,
|
|
3176
3190
|
itemActiveBackground: we,
|
|
3177
3191
|
withBorder: !1,
|
|
3178
3192
|
sidebarRef: he
|
|
3179
3193
|
}
|
|
3180
|
-
), Ve =
|
|
3194
|
+
), Ve = N === "dark" ? O ?? B.colors.dark[7] : v ?? B.white, Qe = $ === "legacy", xr = Qe ? void 0 : {
|
|
3181
3195
|
width: { base: le },
|
|
3182
3196
|
breakpoint: "sm",
|
|
3183
|
-
collapsed: { mobile:
|
|
3184
|
-
}, RA = G ?? (
|
|
3197
|
+
collapsed: { mobile: j || !U, desktop: j || !U }
|
|
3198
|
+
}, RA = G ?? (N === "dark" ? B.colors.dark[8] : B.colors.gray[0]), Ir = Qe ? {
|
|
3185
3199
|
main: {
|
|
3186
3200
|
background: RA,
|
|
3187
3201
|
overflow: "hidden"
|
|
@@ -3192,14 +3206,14 @@ function Go({
|
|
|
3192
3206
|
overflow: "hidden"
|
|
3193
3207
|
},
|
|
3194
3208
|
navbar: {
|
|
3195
|
-
background:
|
|
3209
|
+
background: I ?? Ve,
|
|
3196
3210
|
border: "none"
|
|
3197
3211
|
}
|
|
3198
|
-
}, PA = typeof
|
|
3212
|
+
}, PA = typeof re == "number" ? `${re}px` : re ?? "4px", LA = Ce ?? (N === "dark" ? B.colors.dark[4] : "#e4e9ef"), Tr = Qe ? {
|
|
3199
3213
|
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
|
|
3200
|
-
width: `calc(100vw - var(--app-shell-padding) - calc(${
|
|
3214
|
+
width: `calc(100vw - var(--app-shell-padding) - calc(${j ? "0px" : le} + 1rem))`,
|
|
3201
3215
|
marginTop: "0.5rem",
|
|
3202
|
-
marginLeft: `calc(${
|
|
3216
|
+
marginLeft: `calc(${j ? "0px" : le} + 0.5rem)`,
|
|
3203
3217
|
border: `1px solid ${LA}`,
|
|
3204
3218
|
borderRadius: PA,
|
|
3205
3219
|
overflow: "hidden"
|
|
@@ -3218,7 +3232,7 @@ function Go({
|
|
|
3218
3232
|
{
|
|
3219
3233
|
header: { height: "60px", collapsed: !Y },
|
|
3220
3234
|
navbar: xr,
|
|
3221
|
-
footer: { height:
|
|
3235
|
+
footer: { height: E || "0px" },
|
|
3222
3236
|
styles: Ir,
|
|
3223
3237
|
children: [
|
|
3224
3238
|
/* @__PURE__ */ r(
|
|
@@ -3231,30 +3245,30 @@ function Go({
|
|
|
3231
3245
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
3232
3246
|
alignItems: "center",
|
|
3233
3247
|
borderBottom: "none",
|
|
3234
|
-
...
|
|
3248
|
+
...P
|
|
3235
3249
|
},
|
|
3236
3250
|
children: t
|
|
3237
3251
|
}
|
|
3238
3252
|
),
|
|
3239
|
-
!
|
|
3253
|
+
!j && U && /* @__PURE__ */ r(Be.Navbar, { children: Fe(ee(), !1) }),
|
|
3240
3254
|
/* @__PURE__ */ R(Be.Main, { children: [
|
|
3241
|
-
!
|
|
3242
|
-
|
|
3255
|
+
!j && Q && Vo(
|
|
3256
|
+
N,
|
|
3243
3257
|
B,
|
|
3244
|
-
|
|
3258
|
+
T,
|
|
3245
3259
|
e,
|
|
3246
3260
|
n,
|
|
3247
3261
|
ke
|
|
3248
3262
|
),
|
|
3249
|
-
/* @__PURE__ */ r(
|
|
3263
|
+
/* @__PURE__ */ r(Mo, { children: /* @__PURE__ */ R("div", { style: Tr, children: [
|
|
3250
3264
|
A,
|
|
3251
|
-
/* @__PURE__ */ r(Bo, { maxKeepAliveTabs:
|
|
3265
|
+
/* @__PURE__ */ r(Bo, { maxKeepAliveTabs: k, routes: J })
|
|
3252
3266
|
] }) }),
|
|
3253
|
-
|
|
3267
|
+
U && /* @__PURE__ */ r(
|
|
3254
3268
|
JA,
|
|
3255
3269
|
{
|
|
3256
|
-
opened:
|
|
3257
|
-
onClose:
|
|
3270
|
+
opened: T.hidden || !1,
|
|
3271
|
+
onClose: K,
|
|
3258
3272
|
size: e,
|
|
3259
3273
|
padding: 0,
|
|
3260
3274
|
styles: {
|
|
@@ -3295,48 +3309,49 @@ function Yn({
|
|
|
3295
3309
|
sideBarFooterHeight: d,
|
|
3296
3310
|
sideBarFooterContent: u,
|
|
3297
3311
|
onCollapsedSideBar: p,
|
|
3298
|
-
onHiddenSidebar:
|
|
3299
|
-
sidebarDefaultGroupIcon:
|
|
3300
|
-
sidebarSelectedGroupName:
|
|
3301
|
-
sideBarHeaderHeight:
|
|
3312
|
+
onHiddenSidebar: y,
|
|
3313
|
+
sidebarDefaultGroupIcon: m,
|
|
3314
|
+
sidebarSelectedGroupName: g,
|
|
3315
|
+
sideBarHeaderHeight: b,
|
|
3302
3316
|
sideBarHeaderContent: f,
|
|
3303
3317
|
selectedGroupColor: x = "#132441",
|
|
3304
|
-
groupColor:
|
|
3305
|
-
backgroundGroupColor:
|
|
3306
|
-
groupLabelDarkColor:
|
|
3307
|
-
groupLabelLightColor:
|
|
3318
|
+
groupColor: E = "white",
|
|
3319
|
+
backgroundGroupColor: M = "#132441",
|
|
3320
|
+
groupLabelDarkColor: V = "white",
|
|
3321
|
+
groupLabelLightColor: U = "white",
|
|
3308
3322
|
headerColor: Y,
|
|
3309
|
-
footerHeight:
|
|
3310
|
-
iconsWithBackground:
|
|
3311
|
-
menuItemHeight:
|
|
3312
|
-
showSideBar:
|
|
3313
|
-
showHeader:
|
|
3314
|
-
headerStyle:
|
|
3315
|
-
highlightActiveMenuItem:
|
|
3316
|
-
enableSecurity:
|
|
3317
|
-
securityOptions:
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3323
|
+
footerHeight: P,
|
|
3324
|
+
iconsWithBackground: F,
|
|
3325
|
+
menuItemHeight: z,
|
|
3326
|
+
showSideBar: Q,
|
|
3327
|
+
showHeader: O,
|
|
3328
|
+
headerStyle: v,
|
|
3329
|
+
highlightActiveMenuItem: L,
|
|
3330
|
+
enableSecurity: C = !1,
|
|
3331
|
+
securityOptions: _,
|
|
3332
|
+
securityFailMode: H,
|
|
3333
|
+
customRenderSidebar: I,
|
|
3334
|
+
onNavigationDataChange: G,
|
|
3335
|
+
showCollapsedButton: re,
|
|
3336
|
+
initialSidebarCollapsed: Ce = !1,
|
|
3337
|
+
sideBarBackgroundDarkColor: se,
|
|
3338
|
+
sideBarBackgroundLightColor: be,
|
|
3339
|
+
sideBarTextDarkColor: we,
|
|
3340
|
+
sideBarTextLightColor: Se,
|
|
3341
|
+
sideBarIconDarkColor: S,
|
|
3342
|
+
sideBarIconLightColor: k,
|
|
3343
|
+
sideBarBackgroundImage: $,
|
|
3344
|
+
mainBackground: D,
|
|
3345
|
+
mainBorderRadius: B,
|
|
3346
|
+
mainBorderColor: T,
|
|
3347
|
+
sideBarItemBorderRadius: N,
|
|
3348
|
+
sideBarItemHorizontalGap: X,
|
|
3349
|
+
sideBarItemActiveBackground: he,
|
|
3350
|
+
sideBarCollapsedSubmenuWidth: Ie,
|
|
3351
|
+
sidebarActiveColor: j,
|
|
3352
|
+
maxKeepAliveTabs: ve = 10,
|
|
3353
|
+
sidebarVariant: Z = "legacy",
|
|
3354
|
+
sidebarShowSearch: ee = !1
|
|
3340
3355
|
}) {
|
|
3341
3356
|
return /* @__PURE__ */ r(
|
|
3342
3357
|
Bt,
|
|
@@ -3346,10 +3361,11 @@ function Yn({
|
|
|
3346
3361
|
user: o,
|
|
3347
3362
|
owner: a,
|
|
3348
3363
|
company: l,
|
|
3349
|
-
enableSecurity:
|
|
3350
|
-
securityOptions:
|
|
3351
|
-
|
|
3352
|
-
|
|
3364
|
+
enableSecurity: C,
|
|
3365
|
+
securityOptions: _,
|
|
3366
|
+
securityFailMode: H,
|
|
3367
|
+
onNavigationDataChange: G,
|
|
3368
|
+
initialSidebarCollapsed: Ce,
|
|
3353
3369
|
children: /* @__PURE__ */ r(
|
|
3354
3370
|
Go,
|
|
3355
3371
|
{
|
|
@@ -3362,48 +3378,48 @@ function Yn({
|
|
|
3362
3378
|
sideBarWidth: i,
|
|
3363
3379
|
sideBarCollapsedWidth: h,
|
|
3364
3380
|
sideBarHiddenBreakPoint: c,
|
|
3365
|
-
sideBarHeaderHeight:
|
|
3381
|
+
sideBarHeaderHeight: b,
|
|
3366
3382
|
sideBarHeaderContent: f,
|
|
3367
3383
|
sideBarFooterHeight: d,
|
|
3368
3384
|
sideBarFooterContent: u,
|
|
3369
3385
|
selectedGroupColor: x,
|
|
3370
|
-
groupColor:
|
|
3371
|
-
backgroundGroupColor:
|
|
3372
|
-
groupLabelDarkColor:
|
|
3373
|
-
groupLabelLightColor:
|
|
3386
|
+
groupColor: E,
|
|
3387
|
+
backgroundGroupColor: M,
|
|
3388
|
+
groupLabelDarkColor: V,
|
|
3389
|
+
groupLabelLightColor: U,
|
|
3374
3390
|
onCollapsedSideBar: p,
|
|
3375
|
-
onHiddenSidebar:
|
|
3376
|
-
sidebarDefaultGroupIcon:
|
|
3377
|
-
sidebarSelectedGroupName:
|
|
3391
|
+
onHiddenSidebar: y,
|
|
3392
|
+
sidebarDefaultGroupIcon: m,
|
|
3393
|
+
sidebarSelectedGroupName: g,
|
|
3378
3394
|
headerColor: Y,
|
|
3379
|
-
footerHeight:
|
|
3380
|
-
iconsWithBackground:
|
|
3381
|
-
menuItemHeight:
|
|
3382
|
-
showSideBar:
|
|
3383
|
-
showHeader:
|
|
3384
|
-
headerStyle:
|
|
3385
|
-
highlightActiveMenuItem:
|
|
3386
|
-
enableSecurity:
|
|
3387
|
-
customRenderSidebar:
|
|
3388
|
-
showCollapsedButton:
|
|
3389
|
-
sideBarBackgroundDarkColor:
|
|
3390
|
-
sideBarBackgroundLightColor:
|
|
3391
|
-
sideBarTextDarkColor:
|
|
3392
|
-
sideBarTextLightColor:
|
|
3393
|
-
sideBarIconDarkColor:
|
|
3394
|
-
sideBarIconLightColor:
|
|
3395
|
-
sideBarBackgroundImage:
|
|
3396
|
-
mainBackground:
|
|
3397
|
-
mainBorderRadius:
|
|
3398
|
-
mainBorderColor:
|
|
3399
|
-
sideBarItemBorderRadius:
|
|
3400
|
-
sideBarItemHorizontalGap:
|
|
3401
|
-
sideBarItemActiveBackground:
|
|
3402
|
-
sideBarCollapsedSubmenuWidth:
|
|
3403
|
-
sidebarActiveColor:
|
|
3404
|
-
maxKeepAliveTabs:
|
|
3405
|
-
sidebarVariant:
|
|
3406
|
-
sidebarShowSearch:
|
|
3395
|
+
footerHeight: P,
|
|
3396
|
+
iconsWithBackground: F,
|
|
3397
|
+
menuItemHeight: z,
|
|
3398
|
+
showSideBar: Q,
|
|
3399
|
+
showHeader: O,
|
|
3400
|
+
headerStyle: v,
|
|
3401
|
+
highlightActiveMenuItem: L,
|
|
3402
|
+
enableSecurity: C,
|
|
3403
|
+
customRenderSidebar: I,
|
|
3404
|
+
showCollapsedButton: re,
|
|
3405
|
+
sideBarBackgroundDarkColor: se,
|
|
3406
|
+
sideBarBackgroundLightColor: be,
|
|
3407
|
+
sideBarTextDarkColor: we,
|
|
3408
|
+
sideBarTextLightColor: Se,
|
|
3409
|
+
sideBarIconDarkColor: S,
|
|
3410
|
+
sideBarIconLightColor: k,
|
|
3411
|
+
sideBarBackgroundImage: $,
|
|
3412
|
+
mainBackground: D,
|
|
3413
|
+
mainBorderRadius: B,
|
|
3414
|
+
mainBorderColor: T,
|
|
3415
|
+
sideBarItemBorderRadius: N,
|
|
3416
|
+
sideBarItemHorizontalGap: X,
|
|
3417
|
+
sideBarItemActiveBackground: he,
|
|
3418
|
+
sideBarCollapsedSubmenuWidth: Ie,
|
|
3419
|
+
sidebarActiveColor: j,
|
|
3420
|
+
maxKeepAliveTabs: ve,
|
|
3421
|
+
sidebarVariant: Z,
|
|
3422
|
+
sidebarShowSearch: ee,
|
|
3407
3423
|
children: e
|
|
3408
3424
|
}
|
|
3409
3425
|
)
|
|
@@ -3447,9 +3463,9 @@ const Sr = Ne({
|
|
|
3447
3463
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
3448
3464
|
return A;
|
|
3449
3465
|
}, jn = (A, t) => {
|
|
3450
|
-
const o = kr(), { state: e, dispatch: n } = o, s =
|
|
3466
|
+
const o = kr(), { state: e, dispatch: n } = o, s = w((i) => {
|
|
3451
3467
|
n({ type: "CLOSE_ALLOWED", link: A, payload: i });
|
|
3452
|
-
}, [n, A]), a =
|
|
3468
|
+
}, [n, A]), a = Ae(t);
|
|
3453
3469
|
a.current = t, oe(() => {
|
|
3454
3470
|
e && e.userCloseLinkRequest && e.userCloseLinkRequest === A && a.current();
|
|
3455
3471
|
}, [e, A]);
|
|
@@ -3519,193 +3535,193 @@ function Xn({
|
|
|
3519
3535
|
openedTabs: n = [],
|
|
3520
3536
|
colors: s
|
|
3521
3537
|
}) {
|
|
3522
|
-
const [a, l] = xe.useTransition(), i = qe(), { colorScheme: h } = de(), [c, d] = ge(n), [u, p] = ge(e),
|
|
3523
|
-
Nt(
|
|
3524
|
-
const
|
|
3538
|
+
const [a, l] = xe.useTransition(), i = qe(), { colorScheme: h } = de(), [c, d] = ge(n), [u, p] = ge(e), y = Ae(void 0), m = je(), g = Ae([]);
|
|
3539
|
+
Nt(g);
|
|
3540
|
+
const b = kr(), { state: f, dispatch: x } = b, E = ye(rA), M = Do(), { start: V, done: U } = wr(), Y = AA((S) => S.clearSnapshot), P = AA((S) => S.removeTab), F = Ae(t), z = Ae(o);
|
|
3525
3541
|
oe(() => {
|
|
3526
|
-
|
|
3542
|
+
F.current = t, z.current = o;
|
|
3527
3543
|
});
|
|
3528
|
-
const
|
|
3544
|
+
const Q = Ae(u);
|
|
3529
3545
|
oe(() => {
|
|
3530
|
-
|
|
3546
|
+
y.current = Q.current, Q.current = u;
|
|
3531
3547
|
}, [u]);
|
|
3532
|
-
const
|
|
3533
|
-
|
|
3534
|
-
const $ = c.findIndex((
|
|
3535
|
-
let
|
|
3536
|
-
!
|
|
3537
|
-
const B = c.filter((
|
|
3538
|
-
let
|
|
3539
|
-
if (
|
|
3540
|
-
const
|
|
3541
|
-
|
|
3548
|
+
const O = Ae(!1), v = w((S, k) => {
|
|
3549
|
+
V(), M ? M.destroy(S) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), Y(S), P(S);
|
|
3550
|
+
const $ = c.findIndex((X) => X.path === S);
|
|
3551
|
+
let D = k?.redirectUrl;
|
|
3552
|
+
!D && $ >= 0 && (D = c[$].redirect);
|
|
3553
|
+
const B = c.filter((X) => X.id !== S);
|
|
3554
|
+
let T = null;
|
|
3555
|
+
if (y.current && y.current !== S) {
|
|
3556
|
+
const X = B.find((he) => he.id === y.current);
|
|
3557
|
+
X && (T = X.id);
|
|
3542
3558
|
}
|
|
3543
|
-
if (!
|
|
3544
|
-
let
|
|
3545
|
-
B.forEach((he, Ie) => he.id === u && (
|
|
3559
|
+
if (!T) {
|
|
3560
|
+
let X = -1;
|
|
3561
|
+
B.forEach((he, Ie) => he.id === u && (X = Ie)), B.length > 0 && B[X] ? T = B[X].id : B.length > 0 && (T = B[B.length - 1].id);
|
|
3546
3562
|
}
|
|
3547
|
-
const
|
|
3548
|
-
...
|
|
3549
|
-
active:
|
|
3563
|
+
const N = B.map((X) => ({
|
|
3564
|
+
...X,
|
|
3565
|
+
active: T === X.id
|
|
3550
3566
|
}));
|
|
3551
|
-
if (d(
|
|
3552
|
-
p(
|
|
3567
|
+
if (d(N), T && T != null)
|
|
3568
|
+
p(T), i(D || T);
|
|
3553
3569
|
else {
|
|
3554
|
-
if (p(void 0), !
|
|
3570
|
+
if (p(void 0), !E.navigationRootLink) {
|
|
3555
3571
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3556
3572
|
return;
|
|
3557
3573
|
}
|
|
3558
|
-
i(
|
|
3574
|
+
i(E.navigationRootLink);
|
|
3559
3575
|
}
|
|
3560
|
-
x({ type: "DONE", link: "" }),
|
|
3561
|
-
}, [c, u, i,
|
|
3576
|
+
x({ type: "DONE", link: "" }), U();
|
|
3577
|
+
}, [c, u, i, E.navigationRootLink, x, M, V, U, Y, P]);
|
|
3562
3578
|
oe(() => {
|
|
3563
|
-
f?.linkClosed &&
|
|
3564
|
-
}, [f?.linkClosed, f?.payload,
|
|
3565
|
-
const
|
|
3566
|
-
const
|
|
3579
|
+
f?.linkClosed && v(f?.linkClosed, f?.payload);
|
|
3580
|
+
}, [f?.linkClosed, f?.payload, v]);
|
|
3581
|
+
const L = (S) => {
|
|
3582
|
+
const k = {
|
|
3567
3583
|
item: void 0,
|
|
3568
3584
|
title: void 0,
|
|
3569
|
-
link:
|
|
3585
|
+
link: S,
|
|
3570
3586
|
redirect: void 0,
|
|
3571
3587
|
customTitle: void 0
|
|
3572
3588
|
};
|
|
3573
3589
|
return A.forEach(($) => {
|
|
3574
3590
|
if ($.links)
|
|
3575
|
-
$.links.forEach((
|
|
3576
|
-
zA({ path:
|
|
3591
|
+
$.links.forEach((D) => {
|
|
3592
|
+
zA({ path: D.link || "" }, location.pathname) && (k.item = D, k.title = `${ne().t(D.label)}`, k.redirect = D.redirect, k.customTitle = D.customTitle);
|
|
3577
3593
|
});
|
|
3578
|
-
else if ($.link && !
|
|
3579
|
-
const
|
|
3580
|
-
|
|
3594
|
+
else if ($.link && !k.item) {
|
|
3595
|
+
const D = zA({ path: $.link }, location.pathname);
|
|
3596
|
+
D && (D.params && Object.keys(D.params).length > 0 ? k.title = `${D.params[Object.keys(D.params)[0]]}` : k.title = `${ne().t($.label)}`, k.item = $, k.redirect = $.redirect, k.customTitle = $.customTitle);
|
|
3581
3597
|
}
|
|
3582
|
-
}),
|
|
3598
|
+
}), k.customTitle && (k.customTitle = k.customTitle.replace("$title", k.title)), k;
|
|
3583
3599
|
};
|
|
3584
3600
|
oe(() => {
|
|
3585
|
-
d(n),
|
|
3601
|
+
d(n), O.current = !0;
|
|
3586
3602
|
}, [JSON.stringify(n)]);
|
|
3587
|
-
const
|
|
3603
|
+
const C = Ae(c), _ = Ae(u);
|
|
3588
3604
|
oe(() => {
|
|
3589
|
-
if (
|
|
3590
|
-
|
|
3605
|
+
if (O.current) {
|
|
3606
|
+
O.current = !1, C.current = c, _.current = u;
|
|
3591
3607
|
return;
|
|
3592
3608
|
}
|
|
3593
|
-
const
|
|
3594
|
-
if (
|
|
3609
|
+
const S = JSON.stringify(C.current) !== JSON.stringify(c), k = _.current !== u;
|
|
3610
|
+
if (S || k) {
|
|
3595
3611
|
const $ = setTimeout(() => {
|
|
3596
|
-
|
|
3612
|
+
F.current?.(c), z.current?.(u);
|
|
3597
3613
|
}, 0);
|
|
3598
|
-
return
|
|
3614
|
+
return C.current = c, _.current = u, () => clearTimeout($);
|
|
3599
3615
|
}
|
|
3600
3616
|
}, [c, u]);
|
|
3601
|
-
const
|
|
3617
|
+
const H = Ae("");
|
|
3602
3618
|
oe(() => {
|
|
3603
|
-
if (
|
|
3619
|
+
if (H.current === m.pathname)
|
|
3604
3620
|
return;
|
|
3605
|
-
|
|
3606
|
-
const
|
|
3607
|
-
if (
|
|
3608
|
-
const
|
|
3609
|
-
if (
|
|
3610
|
-
if (c[
|
|
3621
|
+
H.current = m.pathname;
|
|
3622
|
+
const S = L(m.pathname);
|
|
3623
|
+
if (S && S.item) {
|
|
3624
|
+
const k = c.findIndex(($) => $.path === S.link);
|
|
3625
|
+
if (k !== -1) {
|
|
3626
|
+
if (c[k].title !== S.title) {
|
|
3611
3627
|
const $ = [...c];
|
|
3612
|
-
$[
|
|
3628
|
+
$[k] = { ...$[k], title: S.title }, d($);
|
|
3613
3629
|
}
|
|
3614
|
-
p(c[
|
|
3630
|
+
p(c[k].id);
|
|
3615
3631
|
} else {
|
|
3616
3632
|
const $ = {
|
|
3617
|
-
id: `${
|
|
3618
|
-
title: `${
|
|
3619
|
-
path: `${
|
|
3633
|
+
id: `${S.link}`,
|
|
3634
|
+
title: `${S.title}`,
|
|
3635
|
+
path: `${S.link}`,
|
|
3620
3636
|
active: !0,
|
|
3621
|
-
content:
|
|
3622
|
-
iconClass:
|
|
3637
|
+
content: S.item.component,
|
|
3638
|
+
iconClass: S.item.icon,
|
|
3623
3639
|
closeButton: !0,
|
|
3624
|
-
redirect:
|
|
3625
|
-
customTitle:
|
|
3626
|
-
},
|
|
3627
|
-
d(
|
|
3640
|
+
redirect: S.redirect,
|
|
3641
|
+
customTitle: S.customTitle
|
|
3642
|
+
}, D = [...c.map((B) => ({ ...B, active: !1 })), $];
|
|
3643
|
+
d(D), p($.id);
|
|
3628
3644
|
}
|
|
3629
3645
|
}
|
|
3630
|
-
}, [
|
|
3631
|
-
const
|
|
3632
|
-
const
|
|
3633
|
-
|
|
3634
|
-
p(
|
|
3646
|
+
}, [m.pathname]);
|
|
3647
|
+
const I = (S) => {
|
|
3648
|
+
const k = c.filter(($) => $.id === S);
|
|
3649
|
+
k && k.length > 0 && m.pathname !== k[0].path && (V(), i(k[0].path)), l(() => {
|
|
3650
|
+
p(S), U();
|
|
3635
3651
|
});
|
|
3636
|
-
}, G = (
|
|
3652
|
+
}, G = (S) => {
|
|
3637
3653
|
try {
|
|
3638
|
-
|
|
3639
|
-
} catch (
|
|
3640
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
3654
|
+
V(), x({ type: "USER_CLOSE_REQUEST", link: S });
|
|
3655
|
+
} catch (k) {
|
|
3656
|
+
console.error("[TabContainer] Dispatch failed:", k), U();
|
|
3641
3657
|
}
|
|
3642
|
-
},
|
|
3643
|
-
if (
|
|
3644
|
-
Y(
|
|
3645
|
-
}), d([]), p(void 0), !
|
|
3658
|
+
}, re = w(() => {
|
|
3659
|
+
if (M?.destroyAll(), c.forEach((S) => {
|
|
3660
|
+
Y(S.id), P(S.id);
|
|
3661
|
+
}), d([]), p(void 0), !E.navigationRootLink) {
|
|
3646
3662
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3647
3663
|
return;
|
|
3648
3664
|
}
|
|
3649
|
-
i(
|
|
3650
|
-
}, [i,
|
|
3651
|
-
const
|
|
3652
|
-
if (
|
|
3665
|
+
i(E.navigationRootLink);
|
|
3666
|
+
}, [i, E.navigationRootLink, M, c, Y, P]), Ce = w((S) => {
|
|
3667
|
+
const k = c.findIndex((N) => N.id === S);
|
|
3668
|
+
if (k <= 0)
|
|
3653
3669
|
return;
|
|
3654
|
-
c.slice(0,
|
|
3655
|
-
|
|
3670
|
+
c.slice(0, k).forEach((N) => {
|
|
3671
|
+
M?.destroy(N.path), Y(N.id), P(N.id);
|
|
3656
3672
|
});
|
|
3657
|
-
const
|
|
3658
|
-
...
|
|
3659
|
-
active:
|
|
3673
|
+
const D = c.slice(k), B = D.find((N) => N.id === u)?.id || D[0]?.id, T = D.map((N) => ({
|
|
3674
|
+
...N,
|
|
3675
|
+
active: N.id === B
|
|
3660
3676
|
}));
|
|
3661
|
-
if (d(
|
|
3677
|
+
if (d(T), B) {
|
|
3662
3678
|
p(B);
|
|
3663
|
-
const
|
|
3664
|
-
|
|
3679
|
+
const N = T.find((X) => X.id === B);
|
|
3680
|
+
N && m.pathname !== N.path && i(N.path);
|
|
3665
3681
|
}
|
|
3666
|
-
}, [c, u, i,
|
|
3667
|
-
const
|
|
3668
|
-
if (
|
|
3682
|
+
}, [c, u, i, m.pathname, M, Y, P]), se = w((S) => {
|
|
3683
|
+
const k = c.findIndex((N) => N.id === S);
|
|
3684
|
+
if (k === -1 || k >= c.length - 1)
|
|
3669
3685
|
return;
|
|
3670
|
-
c.slice(
|
|
3671
|
-
|
|
3686
|
+
c.slice(k + 1).forEach((N) => {
|
|
3687
|
+
M?.destroy(N.path), Y(N.id), P(N.id);
|
|
3672
3688
|
});
|
|
3673
|
-
const
|
|
3674
|
-
...
|
|
3675
|
-
active:
|
|
3689
|
+
const D = c.slice(0, k + 1), B = D.find((N) => N.id === u)?.id || D[D.length - 1]?.id, T = D.map((N) => ({
|
|
3690
|
+
...N,
|
|
3691
|
+
active: N.id === B
|
|
3676
3692
|
}));
|
|
3677
|
-
if (d(
|
|
3693
|
+
if (d(T), B) {
|
|
3678
3694
|
p(B);
|
|
3679
|
-
const
|
|
3680
|
-
|
|
3695
|
+
const N = T.find((X) => X.id === B);
|
|
3696
|
+
N && m.pathname !== N.path && i(N.path);
|
|
3681
3697
|
}
|
|
3682
|
-
}, [c, u, i,
|
|
3683
|
-
const
|
|
3684
|
-
if (!
|
|
3698
|
+
}, [c, u, i, m.pathname, M, Y, P]), be = w((S) => {
|
|
3699
|
+
const k = c.find((D) => D.id === S);
|
|
3700
|
+
if (!k)
|
|
3685
3701
|
return;
|
|
3686
|
-
|
|
3687
|
-
|
|
3702
|
+
M?.destroyOther(k.path), c.forEach((D) => {
|
|
3703
|
+
D.id !== S && (Y(D.id), P(D.id));
|
|
3688
3704
|
});
|
|
3689
|
-
const $ = [{ ...
|
|
3690
|
-
d($), p(
|
|
3691
|
-
}, [c, i,
|
|
3692
|
-
return /* @__PURE__ */ r("div", { ref:
|
|
3705
|
+
const $ = [{ ...k, active: !0 }];
|
|
3706
|
+
d($), p(S), m.pathname !== k.path && i(k.path);
|
|
3707
|
+
}, [c, i, m.pathname, M, Y, P]), we = f?.isClosing ? f?.userCloseLinkRequest : void 0;
|
|
3708
|
+
return /* @__PURE__ */ r("div", { ref: g, children: /* @__PURE__ */ r(
|
|
3693
3709
|
zt,
|
|
3694
3710
|
{
|
|
3695
3711
|
buttonCloseOnlyActiveTab: !0,
|
|
3696
|
-
onClick: (
|
|
3697
|
-
onTabClose: (
|
|
3698
|
-
onTabChange: (
|
|
3699
|
-
onCloseAllTabs:
|
|
3712
|
+
onClick: (S) => I(S),
|
|
3713
|
+
onTabClose: (S) => G(S),
|
|
3714
|
+
onTabChange: (S) => null,
|
|
3715
|
+
onCloseAllTabs: re,
|
|
3700
3716
|
onCloseLeftTabs: Ce,
|
|
3701
3717
|
onCloseRightTabs: se,
|
|
3702
3718
|
onCloseOtherTabs: be,
|
|
3703
|
-
currentTabs: ((
|
|
3704
|
-
key:
|
|
3705
|
-
favicon:
|
|
3706
|
-
title:
|
|
3707
|
-
customTitle:
|
|
3708
|
-
closing: we ===
|
|
3719
|
+
currentTabs: ((S) => S.map((k) => ({
|
|
3720
|
+
key: k.id,
|
|
3721
|
+
favicon: k.iconClass,
|
|
3722
|
+
title: k.title,
|
|
3723
|
+
customTitle: k.customTitle,
|
|
3724
|
+
closing: we === k.id
|
|
3709
3725
|
})))(c),
|
|
3710
3726
|
activeTab: u,
|
|
3711
3727
|
colors: s,
|
|
@@ -3845,7 +3861,7 @@ const nn = {
|
|
|
3845
3861
|
avatarMaxOutputSizePx: 512
|
|
3846
3862
|
};
|
|
3847
3863
|
function Zn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n }) {
|
|
3848
|
-
const s = zr(), a = Or(), l = At(), i = Qt(`myProfile${o}Store`), h = Kt(rt.User), c = { ...nn, ...n ?? {} }, { dataSource: d, isLoading: u, error: p, isError:
|
|
3864
|
+
const s = zr(), a = Or(), l = At(), i = Qt(`myProfile${o}Store`), h = Kt(rt.User), c = { ...nn, ...n ?? {} }, { dataSource: d, isLoading: u, error: p, isError: y, clearError: m } = Ft({
|
|
3849
3865
|
name: `dsUser${o}`,
|
|
3850
3866
|
label: `${ne().t("archbase:My Profile")}`,
|
|
3851
3867
|
service: h,
|
|
@@ -3854,21 +3870,21 @@ function Zn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3854
3870
|
loadOnStart: !0,
|
|
3855
3871
|
validator: l,
|
|
3856
3872
|
id: o,
|
|
3857
|
-
onLoadComplete: (
|
|
3858
|
-
|
|
3873
|
+
onLoadComplete: (b) => {
|
|
3874
|
+
b.isBrowsing() && b.edit(), a();
|
|
3859
3875
|
},
|
|
3860
|
-
onDestroy: (
|
|
3876
|
+
onDestroy: (b) => {
|
|
3861
3877
|
},
|
|
3862
|
-
onError: (
|
|
3863
|
-
const x =
|
|
3878
|
+
onError: (b, f) => {
|
|
3879
|
+
const x = b instanceof Error ? b.message : typeof b == "string" ? b : JSON.stringify(b);
|
|
3864
3880
|
Pt.showError(ne().t("archbase:WARNING"), x, f);
|
|
3865
3881
|
}
|
|
3866
3882
|
});
|
|
3867
3883
|
oe(() => {
|
|
3868
3884
|
A && d && d.isBrowsing() && d.edit();
|
|
3869
3885
|
}, [d, A]);
|
|
3870
|
-
const
|
|
3871
|
-
|
|
3886
|
+
const g = (b) => {
|
|
3887
|
+
b && (console.log(b), e(b.name, b.avatar));
|
|
3872
3888
|
};
|
|
3873
3889
|
return /* @__PURE__ */ r(
|
|
3874
3890
|
Vt,
|
|
@@ -3880,9 +3896,9 @@ function Zn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3880
3896
|
dataSource: d,
|
|
3881
3897
|
onClickOk: t,
|
|
3882
3898
|
onClickCancel: t,
|
|
3883
|
-
onAfterSave:
|
|
3884
|
-
children: /* @__PURE__ */ r(ze, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ R(
|
|
3885
|
-
/* @__PURE__ */ r(
|
|
3899
|
+
onAfterSave: g,
|
|
3900
|
+
children: /* @__PURE__ */ r(ze, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ R(W, { children: [
|
|
3901
|
+
/* @__PURE__ */ r(W, { align: "center", children: /* @__PURE__ */ r(
|
|
3886
3902
|
Lt,
|
|
3887
3903
|
{
|
|
3888
3904
|
dataSource: d,
|
|
@@ -4030,7 +4046,7 @@ const es = ir((A) => ({
|
|
|
4030
4046
|
tabId: A,
|
|
4031
4047
|
children: t
|
|
4032
4048
|
}) => {
|
|
4033
|
-
const { getSnapshot: o, saveSnapshot: e } = AA(), n =
|
|
4049
|
+
const { getSnapshot: o, saveSnapshot: e } = AA(), n = Ae(void 0);
|
|
4034
4050
|
if (!n.current) {
|
|
4035
4051
|
const s = o(A);
|
|
4036
4052
|
n.current = sn(s);
|
|
@@ -4058,7 +4074,7 @@ function EA() {
|
|
|
4058
4074
|
return ye(tA);
|
|
4059
4075
|
}
|
|
4060
4076
|
function oA(A, t) {
|
|
4061
|
-
const o = EA(), e =
|
|
4077
|
+
const o = EA(), e = Ae({ resolved: !1, value: void 0 });
|
|
4062
4078
|
e.current.resolved || (e.current = {
|
|
4063
4079
|
resolved: !0,
|
|
4064
4080
|
value: typeof t == "function" ? t() : t
|
|
@@ -4075,7 +4091,7 @@ function oA(A, t) {
|
|
|
4075
4091
|
// getServerSnapshot
|
|
4076
4092
|
() => {
|
|
4077
4093
|
}
|
|
4078
|
-
), i = o ? l !== void 0 ? l : n : s, h =
|
|
4094
|
+
), i = o ? l !== void 0 ? l : n : s, h = w((c) => {
|
|
4079
4095
|
if (!o) {
|
|
4080
4096
|
a(c);
|
|
4081
4097
|
return;
|
|
@@ -4104,26 +4120,26 @@ function os(A, t) {
|
|
|
4104
4120
|
const o = { ...an, ...t }, [e, n] = oA(
|
|
4105
4121
|
`grid_${A}`,
|
|
4106
4122
|
o
|
|
4107
|
-
), s =
|
|
4123
|
+
), s = w((f) => {
|
|
4108
4124
|
n((x) => ({ ...x, ...f }));
|
|
4109
|
-
}, [n]), a =
|
|
4125
|
+
}, [n]), a = w((f) => s({ page: f }), [s]), l = w((f) => s({ pageSize: f, page: 0 }), [s]), i = w((f) => s({ sortModel: f }), [s]), h = w((f) => s({ filterModel: f, page: 0 }), [s]), c = w((f) => s({ selectedRowIds: f }), [s]), d = w((f) => {
|
|
4110
4126
|
n((x) => ({
|
|
4111
4127
|
...x,
|
|
4112
|
-
selectedRowIds: x.selectedRowIds.includes(f) ? x.selectedRowIds.filter((
|
|
4128
|
+
selectedRowIds: x.selectedRowIds.includes(f) ? x.selectedRowIds.filter((E) => E !== f) : [...x.selectedRowIds, f]
|
|
4113
4129
|
}));
|
|
4114
|
-
}, [n]), u =
|
|
4130
|
+
}, [n]), u = w((f) => s({ selectedRowIds: f }), [s]), p = w(() => s({ selectedRowIds: [] }), [s]), y = w((f) => {
|
|
4115
4131
|
n((x) => ({
|
|
4116
4132
|
...x,
|
|
4117
|
-
expandedRowIds: x.expandedRowIds.includes(f) ? x.expandedRowIds.filter((
|
|
4133
|
+
expandedRowIds: x.expandedRowIds.includes(f) ? x.expandedRowIds.filter((E) => E !== f) : [...x.expandedRowIds, f]
|
|
4118
4134
|
}));
|
|
4119
|
-
}, [n]),
|
|
4135
|
+
}, [n]), m = w(() => n(o), [n, o]), g = w((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), b = w((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
|
|
4120
4136
|
return {
|
|
4121
4137
|
/** Estado completo do grid */
|
|
4122
4138
|
state: e,
|
|
4123
4139
|
/** Atualizar multiplos campos */
|
|
4124
4140
|
update: s,
|
|
4125
4141
|
/** Resetar para estado inicial */
|
|
4126
|
-
reset:
|
|
4142
|
+
reset: m,
|
|
4127
4143
|
// Paginacao
|
|
4128
4144
|
setPage: a,
|
|
4129
4145
|
setPageSize: l,
|
|
@@ -4135,14 +4151,14 @@ function os(A, t) {
|
|
|
4135
4151
|
toggleRowSelection: d,
|
|
4136
4152
|
selectAllRows: u,
|
|
4137
4153
|
clearSelection: p,
|
|
4138
|
-
isRowSelected:
|
|
4154
|
+
isRowSelected: g,
|
|
4139
4155
|
/** Quantidade de linhas selecionadas */
|
|
4140
4156
|
selectedCount: e.selectedRowIds.length,
|
|
4141
4157
|
/** Se tem alguma linha selecionada */
|
|
4142
4158
|
hasSelection: e.selectedRowIds.length > 0,
|
|
4143
4159
|
// Expansao (master-detail)
|
|
4144
|
-
toggleRowExpansion:
|
|
4145
|
-
isRowExpanded:
|
|
4160
|
+
toggleRowExpansion: y,
|
|
4161
|
+
isRowExpanded: b
|
|
4146
4162
|
};
|
|
4147
4163
|
}
|
|
4148
4164
|
const UA = {
|
|
@@ -4154,42 +4170,42 @@ function ns(A, t = []) {
|
|
|
4154
4170
|
const [o, e] = oA(
|
|
4155
4171
|
`tree_${A}`,
|
|
4156
4172
|
{ ...UA, expandedNodeIds: t }
|
|
4157
|
-
), n =
|
|
4158
|
-
e((
|
|
4159
|
-
...
|
|
4160
|
-
expandedNodeIds:
|
|
4173
|
+
), n = w((g) => {
|
|
4174
|
+
e((b) => ({
|
|
4175
|
+
...b,
|
|
4176
|
+
expandedNodeIds: b.expandedNodeIds.includes(g) ? b.expandedNodeIds.filter((f) => f !== g) : [...b.expandedNodeIds, g]
|
|
4161
4177
|
}));
|
|
4162
|
-
}, [e]), s =
|
|
4163
|
-
e((
|
|
4164
|
-
...
|
|
4165
|
-
expandedNodeIds:
|
|
4178
|
+
}, [e]), s = w((g) => {
|
|
4179
|
+
e((b) => ({
|
|
4180
|
+
...b,
|
|
4181
|
+
expandedNodeIds: b.expandedNodeIds.includes(g) ? b.expandedNodeIds : [...b.expandedNodeIds, g]
|
|
4166
4182
|
}));
|
|
4167
|
-
}, [e]), a =
|
|
4168
|
-
e((
|
|
4169
|
-
...
|
|
4170
|
-
expandedNodeIds:
|
|
4183
|
+
}, [e]), a = w((g) => {
|
|
4184
|
+
e((b) => ({
|
|
4185
|
+
...b,
|
|
4186
|
+
expandedNodeIds: b.expandedNodeIds.filter((f) => f !== g)
|
|
4171
4187
|
}));
|
|
4172
|
-
}, [e]), l =
|
|
4173
|
-
e((
|
|
4174
|
-
}, [e]), i =
|
|
4175
|
-
e((
|
|
4176
|
-
}, [e]), h =
|
|
4177
|
-
e((
|
|
4178
|
-
}, [e]), c =
|
|
4179
|
-
e((
|
|
4180
|
-
...
|
|
4181
|
-
selectedNodeIds:
|
|
4188
|
+
}, [e]), l = w((g) => {
|
|
4189
|
+
e((b) => ({ ...b, expandedNodeIds: g }));
|
|
4190
|
+
}, [e]), i = w(() => {
|
|
4191
|
+
e((g) => ({ ...g, expandedNodeIds: [] }));
|
|
4192
|
+
}, [e]), h = w((g) => {
|
|
4193
|
+
e((b) => ({ ...b, selectedNodeIds: g }));
|
|
4194
|
+
}, [e]), c = w((g) => {
|
|
4195
|
+
e((b) => ({
|
|
4196
|
+
...b,
|
|
4197
|
+
selectedNodeIds: b.selectedNodeIds.includes(g) ? b.selectedNodeIds.filter((f) => f !== g) : [...b.selectedNodeIds, g]
|
|
4182
4198
|
}));
|
|
4183
|
-
}, [e]), d =
|
|
4184
|
-
e((
|
|
4185
|
-
}, [e]), u =
|
|
4186
|
-
e((
|
|
4187
|
-
}, [e]), p =
|
|
4199
|
+
}, [e]), d = w(() => {
|
|
4200
|
+
e((g) => ({ ...g, selectedNodeIds: [] }));
|
|
4201
|
+
}, [e]), u = w((g) => {
|
|
4202
|
+
e((b) => ({ ...b, focusedNodeId: g }));
|
|
4203
|
+
}, [e]), p = w((g) => o.expandedNodeIds.includes(g), [o.expandedNodeIds]), y = w((g) => o.selectedNodeIds.includes(g), [o.selectedNodeIds]), m = w(() => {
|
|
4188
4204
|
e({ ...UA, expandedNodeIds: t });
|
|
4189
4205
|
}, [e, t]);
|
|
4190
4206
|
return {
|
|
4191
4207
|
state: o,
|
|
4192
|
-
reset:
|
|
4208
|
+
reset: m,
|
|
4193
4209
|
// Expansao
|
|
4194
4210
|
toggleExpanded: n,
|
|
4195
4211
|
expand: s,
|
|
@@ -4201,7 +4217,7 @@ function ns(A, t = []) {
|
|
|
4201
4217
|
setSelected: h,
|
|
4202
4218
|
toggleSelected: c,
|
|
4203
4219
|
clearSelection: d,
|
|
4204
|
-
isSelected:
|
|
4220
|
+
isSelected: y,
|
|
4205
4221
|
selectedCount: o.selectedNodeIds.length,
|
|
4206
4222
|
hasSelection: o.selectedNodeIds.length > 0,
|
|
4207
4223
|
// Foco
|
|
@@ -4213,13 +4229,13 @@ function ss(A, t = [], o = !0) {
|
|
|
4213
4229
|
const [e, n] = oA(
|
|
4214
4230
|
`accordion_${A}`,
|
|
4215
4231
|
t
|
|
4216
|
-
), s =
|
|
4232
|
+
), s = w((d) => {
|
|
4217
4233
|
n((u) => u.includes(d) ? u.filter((p) => p !== d) : o ? [...u, d] : [d]);
|
|
4218
|
-
}, [n, o]), a =
|
|
4234
|
+
}, [n, o]), a = w((d) => {
|
|
4219
4235
|
n((u) => u.includes(d) ? u : o ? [...u, d] : [d]);
|
|
4220
|
-
}, [n, o]), l =
|
|
4236
|
+
}, [n, o]), l = w((d) => {
|
|
4221
4237
|
n((u) => u.filter((p) => p !== d));
|
|
4222
|
-
}, [n]), i =
|
|
4238
|
+
}, [n]), i = w(() => n([]), [n]), h = w((d) => e.includes(d), [e]), c = w((d) => {
|
|
4223
4239
|
n(d === null ? [] : typeof d == "string" ? [d] : d);
|
|
4224
4240
|
}, [n]);
|
|
4225
4241
|
return {
|
|
@@ -4261,7 +4277,7 @@ function ls(A, t = {}) {
|
|
|
4261
4277
|
}, [e, A, o]);
|
|
4262
4278
|
}
|
|
4263
4279
|
function as(A) {
|
|
4264
|
-
const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s =
|
|
4280
|
+
const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s = Ae(n), a = Ae(!0);
|
|
4265
4281
|
return oe(() => {
|
|
4266
4282
|
if (a.current) {
|
|
4267
4283
|
a.current = !1, s.current = n;
|
|
@@ -4271,11 +4287,11 @@ function as(A) {
|
|
|
4271
4287
|
}, [n, A]), n;
|
|
4272
4288
|
}
|
|
4273
4289
|
function is(A) {
|
|
4274
|
-
const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n =
|
|
4290
|
+
const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = Ae(!1), s = Ae(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, i = w((d) => {
|
|
4275
4291
|
t ? (d !== void 0 && t.getState().setCustomState(e, d), t.getState().setCustomState(o, !0)) : (d !== void 0 && (s.current = d), n.current = !0);
|
|
4276
|
-
}, [t, o, e]), h =
|
|
4292
|
+
}, [t, o, e]), h = w(() => {
|
|
4277
4293
|
t ? t.getState().setCustomState(o, !1) : n.current = !1;
|
|
4278
|
-
}, [t, o]), c =
|
|
4294
|
+
}, [t, o]), c = w(() => {
|
|
4279
4295
|
t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(e)) : (n.current = !1, s.current = null);
|
|
4280
4296
|
}, [t, o, e]);
|
|
4281
4297
|
return {
|
|
@@ -4299,7 +4315,7 @@ const cs = ({
|
|
|
4299
4315
|
};
|
|
4300
4316
|
export {
|
|
4301
4317
|
rA as ArchbaseAdminLayoutContext,
|
|
4302
|
-
|
|
4318
|
+
Mn as ArchbaseAdminLayoutFooter,
|
|
4303
4319
|
Nn as ArchbaseAdminLayoutHeader,
|
|
4304
4320
|
Bt as ArchbaseAdminLayoutProvider,
|
|
4305
4321
|
Yn as ArchbaseAdminMainLayout,
|
|
@@ -4312,19 +4328,19 @@ export {
|
|
|
4312
4328
|
Wn as ArchbaseDrawerTrigger,
|
|
4313
4329
|
qt as ArchbaseHeaderNavAction,
|
|
4314
4330
|
eA as ArchbaseKeepAliveRoute,
|
|
4315
|
-
|
|
4331
|
+
fo as ArchbaseMantineSidebar,
|
|
4316
4332
|
Zn as ArchbaseMyProfileModal,
|
|
4317
4333
|
Sr as ArchbaseNavigationContext,
|
|
4318
4334
|
qn as ArchbaseNavigationProvider,
|
|
4319
4335
|
cs as ArchbaseStatefulRoutes,
|
|
4320
4336
|
Xt as CommandPaletteButton,
|
|
4321
|
-
|
|
4337
|
+
Mo as KeepAliveCacheProvider,
|
|
4322
4338
|
xA as MantineSidebarErrorMessage,
|
|
4323
4339
|
so as MantineSidebarGroupsSkeleton,
|
|
4324
4340
|
kA as MantineSidebarMenuSkeleton,
|
|
4325
4341
|
uo as MinimalSidebar,
|
|
4326
4342
|
Fo as NavigationProgressProvider,
|
|
4327
|
-
|
|
4343
|
+
po as RailSidebar,
|
|
4328
4344
|
Kn as SidebarBadge,
|
|
4329
4345
|
KA as SidebarErrorMessage,
|
|
4330
4346
|
oo as SidebarGroup,
|
|
@@ -4358,7 +4374,7 @@ export {
|
|
|
4358
4374
|
ts as useArchbaseStateNamed,
|
|
4359
4375
|
as as useArchbaseTabActive,
|
|
4360
4376
|
ns as useArchbaseTreeState,
|
|
4361
|
-
|
|
4377
|
+
Do as useKeepAliveCache,
|
|
4362
4378
|
Bn as useKeepAliveVisibility,
|
|
4363
4379
|
wr as useNavigationProgress,
|
|
4364
4380
|
Hn as useParams,
|