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