@archbase/admin 4.0.44 → 4.0.45
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/ArchbaseAdminTabContainer.d.ts +8 -1
- package/dist/archbase-admin-4.0.45.tgz +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1271 -1269
- package/package.json +7 -7
- package/dist/archbase-admin-4.0.44.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as r, jsxs as R, Fragment as Pe } from "react/jsx-runtime";
|
|
2
2
|
import * as GA from "react";
|
|
3
|
-
import
|
|
3
|
+
import xe, { useState as ge, useRef as _, useEffect as oe, useMemo as ce, useContext as ve, useCallback as S, createContext as Ne, memo as BA, Fragment as UA, useLayoutEffect as kr, useImperativeHandle as xr, startTransition as nA, useReducer as Ir, useSyncExternalStore as Tr } from "react";
|
|
4
4
|
import { useArchbaseSecurityManager as Er } from "@archbase/security";
|
|
5
5
|
import { useUncontrolled as aA, useMediaQuery as PA, useHotkeys as Rr, useDisclosure as Pr, useFocusTrap as Lr, useForceUpdate as Mr } from "@mantine/hooks";
|
|
6
6
|
import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as De, Group as Le, Tooltip as Me, Button as Dr, ScrollArea as ze, Badge as pA, Center as Je, Image as Nr, useMantineTheme as me, px as fe, Burger as zr, Box as B, Avatar as iA, Text as Te, Stack as J, Skeleton as pe, Paper as Or, NavLink as LA, Kbd as HA, UnstyledButton as cA, Collapse as $r, TextInput as YA, Indicator as Qr, Transition as Kr, Divider as dA, AppShell as Be, Drawer as qA } from "@mantine/core";
|
|
7
7
|
import { IconSun as jA, IconMoonStars as XA, IconTerminal as Fr, IconSearch as _e, IconAlertCircle as Vr, IconDots as JA, IconChevronRight as gA, IconChevronDown as Gr, IconX as _A, IconChevronLeft as Br, IconHome2 as Ur, IconDashboard as Hr, IconUsers as Yr, IconListSearch as WA, IconUserPlus as qr, IconNews as jr, IconFilePlus as Xr, IconSettings as Jr } from "@tabler/icons-react";
|
|
8
|
-
import { useArchbaseAppContext as bA, getI18nextInstance as
|
|
8
|
+
import { useArchbaseAppContext as bA, getI18nextInstance as ne, useArchbaseTranslation as mA, archbaseI18next as Re, useArchbaseValidator as _r, ARCHBASE_IOC_API_TYPE as Wr } from "@archbase/core";
|
|
9
9
|
import { BRFlag as He, USFlag as ZA, ESFlag as uA, VEFlag as Zr, UYFlag as et, SVFlag as At, PYFlag as rt, PEFlag as tt, PAFlag as ot, NIFlag as nt, MXFlag as st, HNFlag as lt, GTFlag as at, ECFlag as it, DOFlag as ct, CUFlag as dt, CRFlag as ut, COFlag as ht, CLFlag as ft, BOFlag as pt, ARFlag as gt } from "mantine-flagpack";
|
|
10
10
|
import { spotlight as bt, Spotlight as Ue } from "@mantine/spotlight";
|
|
11
11
|
import { useNavigate as qe, useLocation as je, matchPath as MA } from "react-router";
|
|
12
12
|
import { useLocation as Xe, useOutlet as mt, matchPath as yt, Route as Ke, Routes as er, useParams as Ar, useNavigationType as vt, UNSAFE_LocationContext as Ct, useSearchParams as rr, useNavigate as wt } from "react-router-dom";
|
|
13
13
|
import { useMediaQuery as St } from "usehooks-ts";
|
|
14
14
|
import { useArchbaseNavigateParams as kt, useArchbaseVisible as xt, ArchbaseNotifications as It, ArchbaseAvatarEdit as Tt, ArchbaseEdit as sA } from "@archbase/components";
|
|
15
|
-
import { SubMenu as Et, MenuItem as DA, menuClasses as
|
|
15
|
+
import { SubMenu as Et, MenuItem as DA, menuClasses as te, Sidebar as tr, Menu as or, sidebarClasses as nr } from "react-pro-sidebar";
|
|
16
16
|
import { createPortal as Rt } from "react-dom";
|
|
17
17
|
import Pt from "@rehooks/component-size";
|
|
18
18
|
import { ArchbaseAdvancedTabs as Lt } from "@archbase/layout";
|
|
@@ -21,7 +21,7 @@ import { persist as Dt } from "zustand/middleware";
|
|
|
21
21
|
import { useArchbaseStore as Nt, useArchbaseRemoteServiceApi as zt, useArchbaseRemoteDataSource as Ot } from "@archbase/data";
|
|
22
22
|
import { ArchbaseFormModalTemplate as $t } from "@archbase/template";
|
|
23
23
|
import { createStore as Qt } from "zustand/vanilla";
|
|
24
|
-
const rA =
|
|
24
|
+
const rA = xe.createContext({}), Kt = ({
|
|
25
25
|
navigationData: A,
|
|
26
26
|
user: t,
|
|
27
27
|
owner: o,
|
|
@@ -30,114 +30,114 @@ const rA = Se.createContext({}), Kt = ({
|
|
|
30
30
|
children: s,
|
|
31
31
|
enableSecurity: a,
|
|
32
32
|
securityOptions: l,
|
|
33
|
-
onNavigationDataChange:
|
|
34
|
-
initialSidebarCollapsed:
|
|
33
|
+
onNavigationDataChange: i,
|
|
34
|
+
initialSidebarCollapsed: h
|
|
35
35
|
}) => {
|
|
36
|
-
const [
|
|
37
|
-
value:
|
|
36
|
+
const [c, d] = ge(h), [u, p] = ge(!1), [C, b] = ge(() => a === !0), [m, g] = ge(null), f = _(!1), [I, T] = aA({
|
|
37
|
+
value: i !== void 0 ? A : void 0,
|
|
38
38
|
defaultValue: a ? [] : A,
|
|
39
39
|
finalValue: [],
|
|
40
|
-
onChange:
|
|
40
|
+
onChange: i
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
const { securityManager:
|
|
42
|
+
oe(() => {
|
|
43
|
+
}, [I, a]);
|
|
44
|
+
const { securityManager: L } = Er({
|
|
45
45
|
resourceName: l?.navigationResourceName ? l.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
46
46
|
resourceDescription: l?.navigationResourceDescription ? l.navigationResourceDescription : "archbase:Navegação",
|
|
47
47
|
enableSecurity: a
|
|
48
48
|
});
|
|
49
|
-
return
|
|
49
|
+
return oe(() => {
|
|
50
50
|
f.current = !1;
|
|
51
|
-
}, [t?.id]),
|
|
51
|
+
}, [t?.id]), oe(() => {
|
|
52
52
|
if (!a) {
|
|
53
|
-
|
|
53
|
+
b(!1);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
if (f.current)
|
|
57
57
|
return;
|
|
58
58
|
A.filter((P) => P.showInSidebar).forEach((P) => {
|
|
59
|
-
|
|
59
|
+
L.registerAction(P.label, P.label), P?.links?.forEach((v) => L.registerAction(`${P.label} -> ${v.label}`, `${P.label} -> ${v.label}`));
|
|
60
60
|
});
|
|
61
|
-
const
|
|
61
|
+
const F = () => {
|
|
62
62
|
f.current = !0;
|
|
63
|
-
const P = A.map((
|
|
64
|
-
...
|
|
65
|
-
disabled: !
|
|
66
|
-
links:
|
|
67
|
-
const E =
|
|
63
|
+
const P = A.map((v) => ({
|
|
64
|
+
...v,
|
|
65
|
+
disabled: !L.hasPermission(v.label),
|
|
66
|
+
links: v.links && v.links.map((K) => {
|
|
67
|
+
const E = L.hasPermission(`${v.label} -> ${K.label}`);
|
|
68
68
|
return {
|
|
69
|
-
...
|
|
69
|
+
...K,
|
|
70
70
|
disabled: !E
|
|
71
71
|
};
|
|
72
72
|
})
|
|
73
73
|
}));
|
|
74
|
-
|
|
75
|
-
}, U = !
|
|
76
|
-
if (
|
|
74
|
+
T(P), b(!1), g(null);
|
|
75
|
+
}, U = !L.isLoading() && !L.isError();
|
|
76
|
+
if (L.isError()) {
|
|
77
77
|
f.current = !0;
|
|
78
|
-
const P =
|
|
79
|
-
g(P),
|
|
78
|
+
const P = L.getError() || "Erro ao carregar permissões de navegação";
|
|
79
|
+
g(P), b(!1), T(A);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
if (U) {
|
|
83
|
-
|
|
83
|
+
F();
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
clearInterval(
|
|
91
|
-
const P =
|
|
92
|
-
g(P),
|
|
86
|
+
b(!0), g(null);
|
|
87
|
+
let O = !1;
|
|
88
|
+
const D = setInterval(() => {
|
|
89
|
+
if (!O && L.isError()) {
|
|
90
|
+
clearInterval(D), f.current = !0;
|
|
91
|
+
const P = L.getError() || "Erro ao carregar permissões de navegação";
|
|
92
|
+
g(P), b(!1), T(A);
|
|
93
93
|
}
|
|
94
|
-
}, 100),
|
|
95
|
-
|
|
94
|
+
}, 100), Q = setTimeout(() => {
|
|
95
|
+
O || (clearInterval(D), b((P) => P && (f.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), T(A), !1)));
|
|
96
96
|
}, 3e3);
|
|
97
|
-
return
|
|
98
|
-
|
|
97
|
+
return L.apply(() => {
|
|
98
|
+
O || (clearInterval(D), clearTimeout(Q), F());
|
|
99
99
|
}), () => {
|
|
100
|
-
|
|
100
|
+
O = !0, clearInterval(D), clearTimeout(Q);
|
|
101
101
|
};
|
|
102
|
-
}, [t?.id, a, A,
|
|
102
|
+
}, [t?.id, a, A, L, T]), /* @__PURE__ */ r(
|
|
103
103
|
rA.Provider,
|
|
104
104
|
{
|
|
105
105
|
value: {
|
|
106
|
-
navigationData:
|
|
107
|
-
setNavigationData:
|
|
106
|
+
navigationData: I,
|
|
107
|
+
setNavigationData: T,
|
|
108
108
|
user: t,
|
|
109
109
|
owner: o,
|
|
110
110
|
company: e,
|
|
111
111
|
navigationRootLink: n,
|
|
112
|
-
collapsed:
|
|
113
|
-
setCollapsed:
|
|
114
|
-
hidden:
|
|
112
|
+
collapsed: c,
|
|
113
|
+
setCollapsed: d,
|
|
114
|
+
hidden: u,
|
|
115
115
|
setHidden: p,
|
|
116
|
-
onNavigationDataChange:
|
|
117
|
-
isLoadingPermissions:
|
|
116
|
+
onNavigationDataChange: i,
|
|
117
|
+
isLoadingPermissions: C,
|
|
118
118
|
permissionsError: m
|
|
119
119
|
},
|
|
120
120
|
children: s
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
123
|
}, Rn = ({ children: A }) => /* @__PURE__ */ r(Ye, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: A }), Ft = () => {
|
|
124
|
-
const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
n(
|
|
124
|
+
const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(ne().language);
|
|
125
|
+
oe(() => {
|
|
126
|
+
const i = (h) => {
|
|
127
|
+
n(h);
|
|
128
128
|
};
|
|
129
|
-
return
|
|
130
|
-
|
|
129
|
+
return ne().on("languageChanged", i), () => {
|
|
130
|
+
ne().off("languageChanged", i);
|
|
131
131
|
};
|
|
132
132
|
}, []);
|
|
133
|
-
const s = (
|
|
134
|
-
if (!
|
|
133
|
+
const s = (i) => {
|
|
134
|
+
if (!i)
|
|
135
135
|
return /* @__PURE__ */ r(He, { size: 24 });
|
|
136
|
-
if (
|
|
136
|
+
if (i === "en" || i === "en-US")
|
|
137
137
|
return /* @__PURE__ */ r(ZA, { size: 24 });
|
|
138
|
-
if (
|
|
138
|
+
if (i === "pt-BR")
|
|
139
139
|
return /* @__PURE__ */ r(He, { size: 24 });
|
|
140
|
-
if (
|
|
140
|
+
if (i.includes("es"))
|
|
141
141
|
switch (navigator.language || navigator.languages[0]) {
|
|
142
142
|
case "es":
|
|
143
143
|
case "es-ES":
|
|
@@ -184,20 +184,20 @@ const rA = Se.createContext({}), Kt = ({
|
|
|
184
184
|
return /* @__PURE__ */ r(He, { size: 24 });
|
|
185
185
|
}, a = () => {
|
|
186
186
|
if (A.languages)
|
|
187
|
-
return A.languages.filter((
|
|
187
|
+
return A.languages.filter((i) => i).map((i) => /* @__PURE__ */ r(
|
|
188
188
|
ie.Item,
|
|
189
189
|
{
|
|
190
|
-
onClick: () => l(
|
|
191
|
-
leftSection: s(
|
|
192
|
-
children:
|
|
190
|
+
onClick: () => l(i.lang),
|
|
191
|
+
leftSection: s(i.lang),
|
|
192
|
+
children: i.name
|
|
193
193
|
},
|
|
194
|
-
|
|
194
|
+
i.name
|
|
195
195
|
));
|
|
196
|
-
}, l = (
|
|
197
|
-
|
|
196
|
+
}, l = (i) => {
|
|
197
|
+
ne().changeLanguage(i);
|
|
198
198
|
};
|
|
199
199
|
return /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
200
|
-
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { variant: "transparent", color: o ? "white" : "blue", title:
|
|
200
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { variant: "transparent", color: o ? "white" : "blue", title: ne().t("toggleLanguage"), children: s(e) }) }),
|
|
201
201
|
/* @__PURE__ */ r(ie.Dropdown, { children: a() })
|
|
202
202
|
] });
|
|
203
203
|
}, Vt = () => {
|
|
@@ -226,7 +226,7 @@ const rA = Se.createContext({}), Kt = ({
|
|
|
226
226
|
variant: "transparent",
|
|
227
227
|
fw: 400,
|
|
228
228
|
gap: 4,
|
|
229
|
-
title:
|
|
229
|
+
title: ne().t("archbase:toggleLanguage"),
|
|
230
230
|
children: [
|
|
231
231
|
n(e.language),
|
|
232
232
|
`${A.languages.find((l) => l.lang === e.language)?.name ?? "Português"}`
|
|
@@ -249,7 +249,7 @@ const rA = Se.createContext({}), Kt = ({
|
|
|
249
249
|
variant: "transparent",
|
|
250
250
|
color: l ? t : o,
|
|
251
251
|
onClick: () => a(),
|
|
252
|
-
title:
|
|
252
|
+
title: ne().t("archbase:toggleColorScheme"),
|
|
253
253
|
children: l ? /* @__PURE__ */ r(jA, { size: "1.5rem" }) : /* @__PURE__ */ r(XA, { size: "1.5rem" })
|
|
254
254
|
}
|
|
255
255
|
);
|
|
@@ -259,55 +259,55 @@ function Ut({ category: A, label: t, color: o, description: e, image: n, onClick
|
|
|
259
259
|
Ue.Action,
|
|
260
260
|
{
|
|
261
261
|
onClick: s,
|
|
262
|
-
label: `${
|
|
263
|
-
description: e ?
|
|
264
|
-
leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Nr, { src: n, alt:
|
|
265
|
-
rightSection: A ? /* @__PURE__ */ r(pA, { color: o, size: "sm", children:
|
|
262
|
+
label: `${ne().t(t || "")}`,
|
|
263
|
+
description: e ? ne().t(e) : void 0,
|
|
264
|
+
leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Nr, { src: n, alt: ne().t(t || ""), width: 24, height: 24 }) }) : void 0,
|
|
265
|
+
rightSection: A ? /* @__PURE__ */ r(pA, { color: o, size: "sm", children: ne().t(A) }) : void 0
|
|
266
266
|
},
|
|
267
267
|
t
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
270
|
const Ht = ({ navigationData: A, color: t }) => {
|
|
271
271
|
const [o, e] = ge(""), n = qe(), { t: s } = mA(), a = ce(() => {
|
|
272
|
-
const
|
|
273
|
-
return A.forEach((
|
|
274
|
-
|
|
275
|
-
!
|
|
276
|
-
id:
|
|
277
|
-
category:
|
|
278
|
-
color:
|
|
279
|
-
label:
|
|
280
|
-
link:
|
|
272
|
+
const i = new Array();
|
|
273
|
+
return A.forEach((h) => {
|
|
274
|
+
h.links ? h.links.forEach((c) => {
|
|
275
|
+
!c.disabled && c.showInSidebar && i.push({
|
|
276
|
+
id: c.label,
|
|
277
|
+
category: c.category ? c.category.toUpperCase() : "",
|
|
278
|
+
color: c.color,
|
|
279
|
+
label: c.label,
|
|
280
|
+
link: c.link,
|
|
281
281
|
onClick: () => {
|
|
282
|
-
|
|
282
|
+
c.link && n(c.link);
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
|
-
}) : !
|
|
286
|
-
id:
|
|
285
|
+
}) : !h.disabled && h.showInSidebar && i.push({
|
|
286
|
+
id: h.label,
|
|
287
287
|
onClick: () => {
|
|
288
|
-
|
|
288
|
+
h.link && n(h.link);
|
|
289
289
|
},
|
|
290
|
-
category:
|
|
291
|
-
color:
|
|
292
|
-
label:
|
|
293
|
-
link:
|
|
290
|
+
category: h.category ? h.category.toUpperCase() : "",
|
|
291
|
+
color: h.color,
|
|
292
|
+
label: h.label,
|
|
293
|
+
link: h.link
|
|
294
294
|
});
|
|
295
|
-
}),
|
|
296
|
-
}, [A, n]), l = a.filter((
|
|
297
|
-
const
|
|
298
|
-
return
|
|
299
|
-
}).map((
|
|
295
|
+
}), i;
|
|
296
|
+
}, [A, n]), l = a.filter((i) => {
|
|
297
|
+
const h = `${s(i.label || "")}`;
|
|
298
|
+
return h && h.toLowerCase().includes(o.toLowerCase().trim());
|
|
299
|
+
}).map((i) => /* @__PURE__ */ r(Ut, { ...i }, i.id));
|
|
300
300
|
return /* @__PURE__ */ r(Pe, { children: a && a.length > 0 ? /* @__PURE__ */ R(Pe, { children: [
|
|
301
301
|
/* @__PURE__ */ r(Me, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r(Dr, { color: t, leftSection: /* @__PURE__ */ r(Fr, { size: "24px" }), onClick: () => bt.open() }) }),
|
|
302
302
|
/* @__PURE__ */ R(
|
|
303
303
|
Ue.Root,
|
|
304
304
|
{
|
|
305
305
|
shortcut: ["mod + M", "/"],
|
|
306
|
-
onQueryChange: (
|
|
306
|
+
onQueryChange: (i) => e(i),
|
|
307
307
|
query: o,
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ r(Ue.Search, { placeholder: `${s("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ r(_e, { size: "1.2rem" }) }),
|
|
310
|
-
/* @__PURE__ */ r(ze.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Ue.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Ue.Empty, { children:
|
|
310
|
+
/* @__PURE__ */ r(ze.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Ue.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Ue.Empty, { children: ne().t("archbase:Nenhum resultado...") }) }) })
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
)
|
|
@@ -321,37 +321,37 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
321
321
|
userMenuItemsAfterToggleColorScheme: s,
|
|
322
322
|
showMenuItemsBeforeToggleColorScheme: a = !0,
|
|
323
323
|
userMenuItemsBeforeToggleColorScheme: l,
|
|
324
|
-
hideAutoHeaderActionsOnUserMenu:
|
|
325
|
-
showHeaderActions:
|
|
326
|
-
showHeaderToggleColorScheme:
|
|
327
|
-
hideAutoHeaderActionsOnUserMenuBreakPoint:
|
|
328
|
-
withDividerAfterUserMenuToggleColorScheme:
|
|
324
|
+
hideAutoHeaderActionsOnUserMenu: i = !0,
|
|
325
|
+
showHeaderActions: h = !0,
|
|
326
|
+
showHeaderToggleColorScheme: c = !0,
|
|
327
|
+
hideAutoHeaderActionsOnUserMenuBreakPoint: d,
|
|
328
|
+
withDividerAfterUserMenuToggleColorScheme: u = !0,
|
|
329
329
|
user: p,
|
|
330
|
-
navigationData:
|
|
331
|
-
logo:
|
|
330
|
+
navigationData: C = [],
|
|
331
|
+
logo: b,
|
|
332
332
|
headerActions: m,
|
|
333
333
|
styleLogo: g,
|
|
334
334
|
showLanguageSelector: f = !1,
|
|
335
|
-
sideBarHiddenBreakPoint:
|
|
336
|
-
headerLeftContent:
|
|
337
|
-
toggleColorScheme:
|
|
338
|
-
logoLeftSection:
|
|
339
|
-
logoRightSection:
|
|
335
|
+
sideBarHiddenBreakPoint: I,
|
|
336
|
+
headerLeftContent: T,
|
|
337
|
+
toggleColorScheme: L,
|
|
338
|
+
logoLeftSection: X,
|
|
339
|
+
logoRightSection: F,
|
|
340
340
|
showBurger: U = !0,
|
|
341
|
-
showCommands:
|
|
342
|
-
sunColor:
|
|
343
|
-
moonColor:
|
|
344
|
-
styles:
|
|
341
|
+
showCommands: M = !0,
|
|
342
|
+
sunColor: O,
|
|
343
|
+
moonColor: D,
|
|
344
|
+
styles: Q
|
|
345
345
|
}) => {
|
|
346
|
-
const P = me(), { colorScheme:
|
|
347
|
-
`(max-width: ${
|
|
348
|
-
),
|
|
349
|
-
`(max-width: ${
|
|
346
|
+
const P = me(), { colorScheme: v, toggleColorScheme: K } = de(), E = ve(rA), W = PA(
|
|
347
|
+
`(max-width: ${I ? fe(I) : P.breakpoints.md})`
|
|
348
|
+
), G = PA(
|
|
349
|
+
`(max-width: ${d ? fe(d) : P.breakpoints.md})`
|
|
350
350
|
);
|
|
351
|
-
let
|
|
352
|
-
return
|
|
351
|
+
let x = !1, V = !1;
|
|
352
|
+
return i && (h = !G, c = !G, t = G, o = G, a = G, u = G, f && (V = !G, x = G)), /* @__PURE__ */ R(Pe, { children: [
|
|
353
353
|
/* @__PURE__ */ R(Ye, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
354
|
-
|
|
354
|
+
X,
|
|
355
355
|
/* @__PURE__ */ r(
|
|
356
356
|
"img",
|
|
357
357
|
{
|
|
@@ -360,10 +360,10 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
360
360
|
...g
|
|
361
361
|
},
|
|
362
362
|
alt: "logo",
|
|
363
|
-
src:
|
|
363
|
+
src: b
|
|
364
364
|
}
|
|
365
365
|
),
|
|
366
|
-
|
|
366
|
+
F
|
|
367
367
|
] }),
|
|
368
368
|
U && /* @__PURE__ */ r(
|
|
369
369
|
zr,
|
|
@@ -376,13 +376,13 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
376
376
|
display: W ? "" : "none"
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */ r("div", { children:
|
|
380
|
-
/* @__PURE__ */ r(B, { style: { flex: 1 }, children:
|
|
379
|
+
/* @__PURE__ */ r("div", { children: M && /* @__PURE__ */ r(Ht, { navigationData: C }) }),
|
|
380
|
+
/* @__PURE__ */ r(B, { style: { flex: 1 }, children: T }),
|
|
381
381
|
/* @__PURE__ */ R(Bt, { children: [
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
/* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles:
|
|
382
|
+
h && m,
|
|
383
|
+
c && /* @__PURE__ */ r(Gt, { toggleColorScheme: L, sunColor: O, moonColor: D }),
|
|
384
|
+
V && /* @__PURE__ */ r(Ft, {}),
|
|
385
|
+
/* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: Q?.menu, children: [
|
|
386
386
|
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ R("div", { children: [
|
|
387
387
|
/* @__PURE__ */ r(
|
|
388
388
|
iA,
|
|
@@ -417,26 +417,26 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
417
417
|
] }) }),
|
|
418
418
|
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
419
419
|
A,
|
|
420
|
-
o && /* @__PURE__ */ r(ie.Label, { children: `${
|
|
420
|
+
o && /* @__PURE__ */ r(ie.Label, { children: `${ne().t("archbase:Opções")}` }),
|
|
421
421
|
a && l,
|
|
422
422
|
t && /* @__PURE__ */ r(
|
|
423
423
|
ie.Item,
|
|
424
424
|
{
|
|
425
|
-
leftSection:
|
|
426
|
-
onClick:
|
|
427
|
-
children: `${
|
|
425
|
+
leftSection: v === "dark" ? /* @__PURE__ */ r(jA, { size: e }) : /* @__PURE__ */ r(XA, { size: e }),
|
|
426
|
+
onClick: L || K,
|
|
427
|
+
children: `${ne().t("archbase:toggleColorScheme")}`
|
|
428
428
|
}
|
|
429
429
|
),
|
|
430
|
-
|
|
431
|
-
|
|
430
|
+
x && /* @__PURE__ */ r(Vt, {}),
|
|
431
|
+
u && /* @__PURE__ */ r(ie.Divider, {}),
|
|
432
432
|
n && s
|
|
433
433
|
] })
|
|
434
434
|
] })
|
|
435
435
|
] })
|
|
436
436
|
] });
|
|
437
437
|
};
|
|
438
|
-
function NA(A, t, o, e, n, s, a, l,
|
|
439
|
-
const
|
|
438
|
+
function NA(A, t, o, e, n, s, a, l, i, h) {
|
|
439
|
+
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
440
|
if (e.links) {
|
|
441
441
|
if (!(e.disabled && e.hideDisabledItem))
|
|
442
442
|
return /* @__PURE__ */ r(Me, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
|
|
@@ -444,26 +444,26 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
444
444
|
{
|
|
445
445
|
rootStyles: {
|
|
446
446
|
fontSize: "16px",
|
|
447
|
-
[`.${
|
|
447
|
+
[`.${te.button}`]: {
|
|
448
448
|
"&:hover": {
|
|
449
|
-
[`.${
|
|
449
|
+
[`.${te.icon}`]: {
|
|
450
450
|
color: "white"
|
|
451
451
|
},
|
|
452
|
-
[`.${
|
|
452
|
+
[`.${te.label}`]: {
|
|
453
453
|
color: "white"
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
},
|
|
457
|
-
[`.${
|
|
458
|
-
width: t &&
|
|
457
|
+
[`.${te.subMenuContent}`]: {
|
|
458
|
+
width: t && h
|
|
459
459
|
},
|
|
460
|
-
[`.${
|
|
460
|
+
[`.${te.disabled}`]: {
|
|
461
461
|
opacity: p,
|
|
462
|
-
[`.${
|
|
463
|
-
color:
|
|
462
|
+
[`.${te.icon}`]: {
|
|
463
|
+
color: u + " !important"
|
|
464
464
|
},
|
|
465
|
-
[`.${
|
|
466
|
-
color:
|
|
465
|
+
[`.${te.label}`]: {
|
|
466
|
+
color: u + " !important"
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
},
|
|
@@ -472,47 +472,47 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
472
472
|
defaultOpen: !e.disabled,
|
|
473
473
|
label: t ? "" : Re.t(e.label),
|
|
474
474
|
disabled: e.disabled,
|
|
475
|
-
children: e.links && e.links.filter((
|
|
475
|
+
children: e.links && e.links.filter((C) => C.showInSidebar === !0 && (!C.disabled || !C.hideDisabledItem)).map((C, b) => /* @__PURE__ */ r(
|
|
476
476
|
DA,
|
|
477
477
|
{
|
|
478
|
-
onClick: () => o(
|
|
478
|
+
onClick: () => o(C),
|
|
479
479
|
rootStyles: {
|
|
480
|
-
[`.${
|
|
481
|
-
background:
|
|
482
|
-
color: l &&
|
|
480
|
+
[`.${te.icon}`]: {
|
|
481
|
+
background: c,
|
|
482
|
+
color: l && C.link === a ? "white" : d
|
|
483
483
|
},
|
|
484
|
-
[`.${
|
|
485
|
-
color: l &&
|
|
484
|
+
[`.${te.label}`]: {
|
|
485
|
+
color: l && C.link === a ? "white" : i
|
|
486
486
|
},
|
|
487
|
-
[`.${
|
|
487
|
+
[`.${te.button}`]: {
|
|
488
488
|
paddingLeft: "40px !important",
|
|
489
489
|
"&:hover": {
|
|
490
|
-
[`.${
|
|
490
|
+
[`.${te.icon}`]: {
|
|
491
491
|
color: "white"
|
|
492
492
|
},
|
|
493
|
-
[`.${
|
|
493
|
+
[`.${te.label}`]: {
|
|
494
494
|
color: "white"
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
},
|
|
498
|
-
[`.${
|
|
498
|
+
[`.${te.disabled}`]: {
|
|
499
499
|
opacity: p,
|
|
500
|
-
[`.${
|
|
501
|
-
background: (
|
|
502
|
-
color:
|
|
500
|
+
[`.${te.icon}`]: {
|
|
501
|
+
background: (c || "") + " !important",
|
|
502
|
+
color: u + " !important"
|
|
503
503
|
},
|
|
504
|
-
[`.${
|
|
505
|
-
color:
|
|
504
|
+
[`.${te.label}`]: {
|
|
505
|
+
color: u + " !important"
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
},
|
|
509
|
-
id:
|
|
510
|
-
icon:
|
|
511
|
-
disabled: typeof
|
|
512
|
-
active: l &&
|
|
513
|
-
children: Re.t(
|
|
509
|
+
id: C.label,
|
|
510
|
+
icon: C.icon,
|
|
511
|
+
disabled: typeof C.disabled == "function" ? C.disabled() : C.disabled,
|
|
512
|
+
active: l && C.link === a,
|
|
513
|
+
children: Re.t(C.label)
|
|
514
514
|
},
|
|
515
|
-
|
|
515
|
+
b
|
|
516
516
|
))
|
|
517
517
|
},
|
|
518
518
|
n
|
|
@@ -523,31 +523,31 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
523
523
|
{
|
|
524
524
|
rootStyles: {
|
|
525
525
|
fontSize: "16px",
|
|
526
|
-
[`.${
|
|
526
|
+
[`.${te.button}`]: {
|
|
527
527
|
"&:hover": {
|
|
528
|
-
[`.${
|
|
528
|
+
[`.${te.icon}`]: {
|
|
529
529
|
color: "white"
|
|
530
530
|
},
|
|
531
|
-
[`.${
|
|
531
|
+
[`.${te.label}`]: {
|
|
532
532
|
color: "white"
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
|
-
[`.${
|
|
537
|
-
background:
|
|
538
|
-
color: l && e.link === a ? "white" : i
|
|
539
|
-
},
|
|
540
|
-
[`.${re.label}`]: {
|
|
536
|
+
[`.${te.icon}`]: {
|
|
537
|
+
background: c,
|
|
541
538
|
color: l && e.link === a ? "white" : d
|
|
542
539
|
},
|
|
543
|
-
[`.${
|
|
540
|
+
[`.${te.label}`]: {
|
|
541
|
+
color: l && e.link === a ? "white" : i
|
|
542
|
+
},
|
|
543
|
+
[`.${te.disabled}`]: {
|
|
544
544
|
opacity: p,
|
|
545
|
-
[`.${
|
|
546
|
-
background: (
|
|
547
|
-
color:
|
|
545
|
+
[`.${te.icon}`]: {
|
|
546
|
+
background: (c || "") + " !important",
|
|
547
|
+
color: u + " !important"
|
|
548
548
|
},
|
|
549
|
-
[`.${
|
|
550
|
-
color:
|
|
549
|
+
[`.${te.label}`]: {
|
|
550
|
+
color: u + " !important"
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
},
|
|
@@ -597,20 +597,20 @@ const qt = (A) => ({
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
}), jt = (A, t, o, e, n, s, a, l,
|
|
601
|
-
const
|
|
600
|
+
}), jt = (A, t, o, e, n, s, a, l, i, h, c) => {
|
|
601
|
+
const d = qt(), u = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" }, C = a ? A === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
|
|
602
602
|
return {
|
|
603
603
|
root: {
|
|
604
604
|
fontSize: "14px",
|
|
605
605
|
fontWeight: 400,
|
|
606
|
-
backgroundColor:
|
|
606
|
+
backgroundColor: i,
|
|
607
607
|
color: t.white
|
|
608
608
|
},
|
|
609
609
|
icon: {
|
|
610
|
-
background:
|
|
611
|
-
color:
|
|
612
|
-
[`&.${
|
|
613
|
-
color:
|
|
610
|
+
background: C,
|
|
611
|
+
color: c,
|
|
612
|
+
[`&.${te.disabled}`]: {
|
|
613
|
+
color: d[A].menu.disabled.color
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
616
|
SubMenuExpandIcon: {
|
|
@@ -621,29 +621,29 @@ const qt = (A) => ({
|
|
|
621
621
|
backgroundColor: A === "dark" ? t.colors.dark[8] : t.colors[t.primaryColor][0]
|
|
622
622
|
}),
|
|
623
623
|
button: {
|
|
624
|
-
[`&.${
|
|
625
|
-
color:
|
|
624
|
+
[`&.${te.disabled}`]: {
|
|
625
|
+
color: d[A].menu.disabled.color
|
|
626
626
|
},
|
|
627
627
|
"&:hover": {
|
|
628
628
|
backgroundColor: t.colors[t.primaryColor][6],
|
|
629
629
|
color: t.white
|
|
630
630
|
},
|
|
631
|
-
[`&.${
|
|
631
|
+
[`&.${te.active}`]: {
|
|
632
632
|
backgroundColor: t.colors[t.primaryColor][6]
|
|
633
633
|
},
|
|
634
634
|
height: l,
|
|
635
|
-
...
|
|
635
|
+
...u
|
|
636
636
|
},
|
|
637
|
-
label: ({ open:
|
|
638
|
-
fontWeight:
|
|
639
|
-
color:
|
|
637
|
+
label: ({ open: b }) => ({
|
|
638
|
+
fontWeight: b ? 600 : void 0,
|
|
639
|
+
color: h,
|
|
640
640
|
"&:hover": {
|
|
641
641
|
color: t.white
|
|
642
642
|
}
|
|
643
643
|
})
|
|
644
644
|
};
|
|
645
645
|
};
|
|
646
|
-
function Xt(A, t, o, e, n, s, a, l,
|
|
646
|
+
function Xt(A, t, o, e, n, s, a, l, i, h, c) {
|
|
647
647
|
return /* @__PURE__ */ R(
|
|
648
648
|
tr,
|
|
649
649
|
{
|
|
@@ -651,7 +651,7 @@ function Xt(A, t, o, e, n, s, a, l, d, c, u) {
|
|
|
651
651
|
rootStyles: {
|
|
652
652
|
[`.${nr.container}`]: {
|
|
653
653
|
position: "absolute",
|
|
654
|
-
background:
|
|
654
|
+
background: c,
|
|
655
655
|
overflowX: "hidden",
|
|
656
656
|
overflowY: "hidden",
|
|
657
657
|
left: 0,
|
|
@@ -663,9 +663,9 @@ function Xt(A, t, o, e, n, s, a, l, d, c, u) {
|
|
|
663
663
|
width: `${fe(o)}px`,
|
|
664
664
|
collapsedWidth: `${fe(e)}px`,
|
|
665
665
|
children: [
|
|
666
|
-
|
|
667
|
-
/* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(or, { rootStyles: { background:
|
|
668
|
-
|
|
666
|
+
i && /* @__PURE__ */ r(Pe, { children: i }),
|
|
667
|
+
/* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(or, { rootStyles: { background: c }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(Pe, { children: s }) }) }),
|
|
668
|
+
h && /* @__PURE__ */ r(Pe, { children: h })
|
|
669
669
|
]
|
|
670
670
|
}
|
|
671
671
|
);
|
|
@@ -747,7 +747,7 @@ function Jt({
|
|
|
747
747
|
height: o,
|
|
748
748
|
backgroundColor: a
|
|
749
749
|
},
|
|
750
|
-
children: Array.from({ length: A }).map((l,
|
|
750
|
+
children: Array.from({ length: A }).map((l, i) => /* @__PURE__ */ R(J, { gap: 4, align: "center", children: [
|
|
751
751
|
/* @__PURE__ */ r(
|
|
752
752
|
pe,
|
|
753
753
|
{
|
|
@@ -765,7 +765,7 @@ function Jt({
|
|
|
765
765
|
radius: "xl"
|
|
766
766
|
}
|
|
767
767
|
)
|
|
768
|
-
] },
|
|
768
|
+
] }, i))
|
|
769
769
|
}
|
|
770
770
|
);
|
|
771
771
|
}
|
|
@@ -789,52 +789,52 @@ function _t({
|
|
|
789
789
|
selectedGroupColor: s,
|
|
790
790
|
groupColor: a,
|
|
791
791
|
backgroundGroupColor: l,
|
|
792
|
-
isHidden:
|
|
793
|
-
sideBarFooterHeight:
|
|
794
|
-
sideBarFooterContent:
|
|
795
|
-
groupLabelDarkColor:
|
|
796
|
-
groupLabelLightColor:
|
|
792
|
+
isHidden: i = !1,
|
|
793
|
+
sideBarFooterHeight: h,
|
|
794
|
+
sideBarFooterContent: c,
|
|
795
|
+
groupLabelDarkColor: d,
|
|
796
|
+
groupLabelLightColor: u,
|
|
797
797
|
collapsed: p,
|
|
798
|
-
onMenuItemClick:
|
|
799
|
-
onClickActionIcon:
|
|
798
|
+
onMenuItemClick: C,
|
|
799
|
+
onClickActionIcon: b,
|
|
800
800
|
withBorder: m = !1,
|
|
801
801
|
showGroupLabels: g = !0,
|
|
802
802
|
theme: f,
|
|
803
|
-
sidebarRef:
|
|
804
|
-
defaultGroupIcon:
|
|
805
|
-
selectedGroupName:
|
|
806
|
-
sideBarHeaderContent:
|
|
807
|
-
iconsWithBackground:
|
|
803
|
+
sidebarRef: I,
|
|
804
|
+
defaultGroupIcon: T,
|
|
805
|
+
selectedGroupName: L,
|
|
806
|
+
sideBarHeaderContent: X,
|
|
807
|
+
iconsWithBackground: F = !1,
|
|
808
808
|
menuItemHeight: U = 40,
|
|
809
|
-
highlightActiveMenuItem:
|
|
810
|
-
backgroundDarkColor:
|
|
811
|
-
backgroundLightColor:
|
|
812
|
-
textDarkColor:
|
|
809
|
+
highlightActiveMenuItem: M = !0,
|
|
810
|
+
backgroundDarkColor: O,
|
|
811
|
+
backgroundLightColor: D,
|
|
812
|
+
textDarkColor: Q,
|
|
813
813
|
textLightColor: P,
|
|
814
|
-
iconDarkColor:
|
|
815
|
-
iconLightColor:
|
|
814
|
+
iconDarkColor: v,
|
|
815
|
+
iconLightColor: K,
|
|
816
816
|
collapsedSubmenuWidth: E,
|
|
817
817
|
isLoading: W = !1,
|
|
818
|
-
loadingError:
|
|
819
|
-
loadingComponent:
|
|
820
|
-
errorComponent:
|
|
821
|
-
skeletonItemCount:
|
|
822
|
-
skeletonGroupCount:
|
|
818
|
+
loadingError: G,
|
|
819
|
+
loadingComponent: x,
|
|
820
|
+
errorComponent: V,
|
|
821
|
+
skeletonItemCount: se = 8,
|
|
822
|
+
skeletonGroupCount: Ce = 3
|
|
823
823
|
}) {
|
|
824
|
-
const [
|
|
825
|
-
const
|
|
824
|
+
const [le, be] = ge(""), we = bA(), Se = je(), { colorScheme: w } = de(), k = w === "dark" ? O ?? f.colors.dark[7] : D ?? f.white, N = s || (w === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), y = w === "dark" ? Q ?? "var(--mantine-color-text)" : P ?? "var(--mantine-color-text)", H = w === "dark" ? v ?? f.colors[f.primaryColor][0] : K ?? f.colors[f.primaryColor][7], Y = ce(() => {
|
|
825
|
+
const re = /* @__PURE__ */ new Set();
|
|
826
826
|
return A.forEach((q) => {
|
|
827
827
|
if (q.showInSidebar && (!q.disabled || !q.hideDisabledItem)) {
|
|
828
828
|
let ye = !1;
|
|
829
829
|
q.group || (q.group = {
|
|
830
|
-
icon:
|
|
830
|
+
icon: T || /* @__PURE__ */ r(JA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
831
831
|
label: "Default",
|
|
832
832
|
name: "Default",
|
|
833
833
|
hint: "Default",
|
|
834
834
|
indexOrder: 0
|
|
835
|
-
}),
|
|
836
|
-
|
|
837
|
-
}), ye ||
|
|
835
|
+
}), re.forEach(($) => {
|
|
836
|
+
$.name === q.group.name && (ye = !0);
|
|
837
|
+
}), ye || re.add({
|
|
838
838
|
name: q.group.name,
|
|
839
839
|
indexOrder: q.group.indexOrder,
|
|
840
840
|
component: /* @__PURE__ */ r(
|
|
@@ -858,10 +858,10 @@ function _t({
|
|
|
858
858
|
De,
|
|
859
859
|
{
|
|
860
860
|
size: "48px",
|
|
861
|
-
variant: q.group.name ===
|
|
862
|
-
color: q.group.name ===
|
|
861
|
+
variant: q.group.name === le ? "filled" : l ? "subtle" : "light",
|
|
862
|
+
color: q.group.name === le ? N : a,
|
|
863
863
|
onClick: () => {
|
|
864
|
-
be((
|
|
864
|
+
be(($) => (b && b($, q.group.name), q.group.name === $ && !i ? "" : q.group.name));
|
|
865
865
|
},
|
|
866
866
|
children: q.group.icon
|
|
867
867
|
}
|
|
@@ -870,7 +870,7 @@ function _t({
|
|
|
870
870
|
Te,
|
|
871
871
|
{
|
|
872
872
|
size: "xs",
|
|
873
|
-
c:
|
|
873
|
+
c: w === "dark" ? d || f.colors[f.primaryColor][2] : u || f.colors[f.primaryColor][2],
|
|
874
874
|
children: q.group.label
|
|
875
875
|
}
|
|
876
876
|
) : !1
|
|
@@ -882,59 +882,59 @@ function _t({
|
|
|
882
882
|
)
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
|
-
}),
|
|
886
|
-
const ye = A.filter((
|
|
887
|
-
q.links = ye.map((
|
|
888
|
-
}), [...
|
|
889
|
-
}, [A,
|
|
890
|
-
|
|
885
|
+
}), re.forEach((q) => {
|
|
886
|
+
const ye = A.filter(($) => $.showInSidebar === !0 && (!$.disabled || !$.hideDisabledItem) && $.group && $.group.name === q.name);
|
|
887
|
+
q.links = ye.map(($, ue) => NA(f, p, C, $, ue, F, Se.pathname, M, y, E));
|
|
888
|
+
}), [...re].sort((q, ye) => q.indexOrder - ye.indexOrder);
|
|
889
|
+
}, [A, le, w, p, we.selectedCompany, M, Se]), z = jt(
|
|
890
|
+
w,
|
|
891
891
|
f,
|
|
892
892
|
p,
|
|
893
893
|
35,
|
|
894
894
|
Number(fe(n)),
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
Y.length > 1,
|
|
896
|
+
F,
|
|
897
897
|
U,
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
),
|
|
902
|
-
|
|
898
|
+
k,
|
|
899
|
+
y,
|
|
900
|
+
H
|
|
901
|
+
), j = p || le === "" ? "0px" : `calc(${o} - ${t})`, Z = l || (w === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), ke = S(() => {
|
|
902
|
+
L && Y.map((re) => re.name).includes(L) ? be(L) : Y.length > 1 && be("Default");
|
|
903
903
|
}, []);
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
}, []),
|
|
907
|
-
p ? be("") :
|
|
904
|
+
oe(() => {
|
|
905
|
+
ke();
|
|
906
|
+
}, []), oe(() => {
|
|
907
|
+
p ? be("") : le === "" && ke();
|
|
908
908
|
}, [p]);
|
|
909
|
-
const
|
|
909
|
+
const ee = () => G ? V || /* @__PURE__ */ r(
|
|
910
910
|
OA,
|
|
911
911
|
{
|
|
912
|
-
message:
|
|
913
|
-
backgroundColor:
|
|
912
|
+
message: G,
|
|
913
|
+
backgroundColor: k
|
|
914
914
|
}
|
|
915
|
-
) : W ?
|
|
915
|
+
) : W ? x || /* @__PURE__ */ r(
|
|
916
916
|
zA,
|
|
917
917
|
{
|
|
918
|
-
itemCount:
|
|
918
|
+
itemCount: se,
|
|
919
919
|
collapsed: p,
|
|
920
|
-
backgroundColor:
|
|
920
|
+
backgroundColor: k
|
|
921
921
|
}
|
|
922
|
-
) :
|
|
922
|
+
) : le !== "" ? /* @__PURE__ */ r(
|
|
923
923
|
tr,
|
|
924
924
|
{
|
|
925
|
-
ref:
|
|
925
|
+
ref: I,
|
|
926
926
|
rootStyles: {
|
|
927
927
|
[`.${nr.container}`]: {
|
|
928
|
-
background:
|
|
928
|
+
background: k,
|
|
929
929
|
overflowX: "hidden",
|
|
930
930
|
overflowY: "hidden",
|
|
931
931
|
left: 0,
|
|
932
932
|
height: `${fe(e)}px`
|
|
933
933
|
}
|
|
934
934
|
},
|
|
935
|
-
style: { borderColor:
|
|
935
|
+
style: { borderColor: w === "dark" ? "#000" : "#efefef" },
|
|
936
936
|
collapsed: p,
|
|
937
|
-
width: `${fe(
|
|
937
|
+
width: `${fe(j)}`,
|
|
938
938
|
collapsedWidth: "0px",
|
|
939
939
|
children: /* @__PURE__ */ r(
|
|
940
940
|
ze,
|
|
@@ -943,20 +943,20 @@ function _t({
|
|
|
943
943
|
overflowY: "auto",
|
|
944
944
|
overflowX: "hidden",
|
|
945
945
|
height: "100%",
|
|
946
|
-
width:
|
|
946
|
+
width: j
|
|
947
947
|
},
|
|
948
|
-
children: /* @__PURE__ */ r(or, { rootStyles: { background:
|
|
948
|
+
children: /* @__PURE__ */ r(or, { rootStyles: { background: k }, menuItemStyles: z, closeOnClick: !0, children: Y.find((re) => re.name === le)?.links || null })
|
|
949
949
|
}
|
|
950
950
|
)
|
|
951
951
|
}
|
|
952
|
-
) : null, Ie = () => W &&
|
|
952
|
+
) : null, Ie = () => W && Y.length === 0 ? /* @__PURE__ */ r(
|
|
953
953
|
Jt,
|
|
954
954
|
{
|
|
955
|
-
groupCount:
|
|
955
|
+
groupCount: Ce,
|
|
956
956
|
width: t,
|
|
957
957
|
height: e
|
|
958
958
|
}
|
|
959
|
-
) :
|
|
959
|
+
) : Y.length !== 0 ? /* @__PURE__ */ r(
|
|
960
960
|
J,
|
|
961
961
|
{
|
|
962
962
|
gap: "4px",
|
|
@@ -964,45 +964,45 @@ function _t({
|
|
|
964
964
|
height: e,
|
|
965
965
|
width: t,
|
|
966
966
|
padding: "4px",
|
|
967
|
-
backgroundColor:
|
|
967
|
+
backgroundColor: Z
|
|
968
968
|
},
|
|
969
|
-
children:
|
|
969
|
+
children: Y.map((re) => /* @__PURE__ */ r(xe.Fragment, { children: re.component }, re.name))
|
|
970
970
|
}
|
|
971
|
-
) : null,
|
|
971
|
+
) : null, Ae = () => G ? V || /* @__PURE__ */ r(
|
|
972
972
|
OA,
|
|
973
973
|
{
|
|
974
|
-
message:
|
|
975
|
-
backgroundColor:
|
|
974
|
+
message: G,
|
|
975
|
+
backgroundColor: k
|
|
976
976
|
}
|
|
977
|
-
) : W ?
|
|
977
|
+
) : W ? x || /* @__PURE__ */ r(
|
|
978
978
|
zA,
|
|
979
979
|
{
|
|
980
|
-
itemCount:
|
|
980
|
+
itemCount: se,
|
|
981
981
|
collapsed: p,
|
|
982
|
-
backgroundColor:
|
|
982
|
+
backgroundColor: k
|
|
983
983
|
}
|
|
984
984
|
) : A.map(
|
|
985
|
-
(
|
|
985
|
+
(re, Ee) => NA(f, p, C, re, Ee, F, Se.pathname, M, y, E)
|
|
986
986
|
);
|
|
987
|
-
return /* @__PURE__ */ r(Pe, { children:
|
|
988
|
-
|
|
987
|
+
return /* @__PURE__ */ r(Pe, { children: Y.length == 1 ? Xt(
|
|
988
|
+
I,
|
|
989
989
|
p,
|
|
990
990
|
o,
|
|
991
991
|
n,
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
992
|
+
z,
|
|
993
|
+
Ae(),
|
|
994
|
+
i,
|
|
995
995
|
e,
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
996
|
+
X,
|
|
997
|
+
c,
|
|
998
|
+
k
|
|
999
999
|
) : /* @__PURE__ */ R(Ye, { direction: "column", w: p ? n : o, children: [
|
|
1000
|
-
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children:
|
|
1000
|
+
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: X }),
|
|
1001
1001
|
/* @__PURE__ */ R(Or, { withBorder: m, h: e, w: "100%", display: "flex", children: [
|
|
1002
1002
|
Ie(),
|
|
1003
|
-
|
|
1003
|
+
ee()
|
|
1004
1004
|
] }),
|
|
1005
|
-
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children:
|
|
1005
|
+
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: c })
|
|
1006
1006
|
] }) });
|
|
1007
1007
|
}
|
|
1008
1008
|
const yA = Ne(null);
|
|
@@ -1024,12 +1024,12 @@ function CA({
|
|
|
1024
1024
|
onCollapsedChange: s,
|
|
1025
1025
|
defaultActiveGroup: a = "",
|
|
1026
1026
|
activeGroup: l,
|
|
1027
|
-
onActiveGroupChange:
|
|
1028
|
-
showKeyboardShortcuts:
|
|
1029
|
-
highlightActiveItem:
|
|
1030
|
-
onMenuItemClick:
|
|
1027
|
+
onActiveGroupChange: i,
|
|
1028
|
+
showKeyboardShortcuts: h = !1,
|
|
1029
|
+
highlightActiveItem: c = !0,
|
|
1030
|
+
onMenuItemClick: d
|
|
1031
1031
|
}) {
|
|
1032
|
-
const
|
|
1032
|
+
const u = je(), p = qe(), [C, b] = aA({
|
|
1033
1033
|
value: n,
|
|
1034
1034
|
defaultValue: e,
|
|
1035
1035
|
finalValue: !1,
|
|
@@ -1038,84 +1038,84 @@ function CA({
|
|
|
1038
1038
|
value: l,
|
|
1039
1039
|
defaultValue: a,
|
|
1040
1040
|
finalValue: "",
|
|
1041
|
-
onChange:
|
|
1042
|
-
}), [f,
|
|
1043
|
-
const
|
|
1044
|
-
return t.forEach((
|
|
1045
|
-
|
|
1046
|
-
}),
|
|
1047
|
-
}),
|
|
1048
|
-
|
|
1049
|
-
}, [
|
|
1050
|
-
|
|
1051
|
-
const E = new Set(
|
|
1052
|
-
return E.has(
|
|
1041
|
+
onChange: i
|
|
1042
|
+
}), [f, I] = ge(""), [T, L] = ge(() => {
|
|
1043
|
+
const v = /* @__PURE__ */ new Set();
|
|
1044
|
+
return t.forEach((K, E) => {
|
|
1045
|
+
K.initiallyOpened && K.links && K.links.length > 0 && v.add(`group-${E}`);
|
|
1046
|
+
}), v;
|
|
1047
|
+
}), X = u.pathname, F = S(() => {
|
|
1048
|
+
b(!C);
|
|
1049
|
+
}, [C, b]), U = S((v) => {
|
|
1050
|
+
L((K) => {
|
|
1051
|
+
const E = new Set(K);
|
|
1052
|
+
return E.has(v) ? E.delete(v) : E.add(v), E;
|
|
1053
1053
|
});
|
|
1054
|
-
}, []),
|
|
1055
|
-
|
|
1056
|
-
const E = new Set(
|
|
1057
|
-
return E.add(
|
|
1054
|
+
}, []), M = S((v) => {
|
|
1055
|
+
L((K) => {
|
|
1056
|
+
const E = new Set(K);
|
|
1057
|
+
return E.add(v), E;
|
|
1058
1058
|
});
|
|
1059
|
-
}, []),
|
|
1060
|
-
|
|
1061
|
-
const E = new Set(
|
|
1062
|
-
return E.delete(
|
|
1059
|
+
}, []), O = S((v) => {
|
|
1060
|
+
L((K) => {
|
|
1061
|
+
const E = new Set(K);
|
|
1062
|
+
return E.delete(v), E;
|
|
1063
1063
|
});
|
|
1064
|
-
}, []),
|
|
1064
|
+
}, []), D = ce(() => {
|
|
1065
1065
|
if (!f.trim())
|
|
1066
1066
|
return t;
|
|
1067
|
-
const
|
|
1068
|
-
const
|
|
1069
|
-
return (
|
|
1070
|
-
...
|
|
1071
|
-
links:
|
|
1067
|
+
const v = f.toLowerCase().trim(), K = (E) => E.reduce((W, G) => {
|
|
1068
|
+
const x = G.label.toLowerCase().includes(v), V = G.links ? K(G.links) : [];
|
|
1069
|
+
return (x || V.length > 0) && W.push({
|
|
1070
|
+
...G,
|
|
1071
|
+
links: V.length > 0 ? V : G.links,
|
|
1072
1072
|
// Expandir automaticamente quando há match em subitens
|
|
1073
|
-
initiallyOpened:
|
|
1073
|
+
initiallyOpened: V.length > 0 || x
|
|
1074
1074
|
}), W;
|
|
1075
1075
|
}, []);
|
|
1076
|
-
return
|
|
1077
|
-
}, [t, f]),
|
|
1078
|
-
(
|
|
1079
|
-
|
|
1076
|
+
return K(t);
|
|
1077
|
+
}, [t, f]), Q = S(
|
|
1078
|
+
(v) => {
|
|
1079
|
+
d && d(v), v.link && (v.routeParams ? p(v.link, { state: v.routeParams }) : p(v.link)), v.redirect && p(v.redirect);
|
|
1080
1080
|
},
|
|
1081
|
-
[p,
|
|
1081
|
+
[p, d]
|
|
1082
1082
|
), P = ce(
|
|
1083
1083
|
() => ({
|
|
1084
|
-
collapsed:
|
|
1085
|
-
setCollapsed:
|
|
1086
|
-
toggleCollapsed:
|
|
1084
|
+
collapsed: C,
|
|
1085
|
+
setCollapsed: b,
|
|
1086
|
+
toggleCollapsed: F,
|
|
1087
1087
|
activeGroup: m,
|
|
1088
1088
|
setActiveGroup: g,
|
|
1089
|
-
activeItemPath:
|
|
1090
|
-
navigateToItem:
|
|
1089
|
+
activeItemPath: X,
|
|
1090
|
+
navigateToItem: Q,
|
|
1091
1091
|
searchQuery: f,
|
|
1092
|
-
setSearchQuery:
|
|
1093
|
-
filteredItems:
|
|
1094
|
-
expandedGroups:
|
|
1092
|
+
setSearchQuery: I,
|
|
1093
|
+
filteredItems: D,
|
|
1094
|
+
expandedGroups: T,
|
|
1095
1095
|
toggleGroup: U,
|
|
1096
|
-
expandGroup:
|
|
1097
|
-
collapseGroup:
|
|
1096
|
+
expandGroup: M,
|
|
1097
|
+
collapseGroup: O,
|
|
1098
1098
|
variant: o,
|
|
1099
|
-
showKeyboardShortcuts:
|
|
1100
|
-
highlightActiveItem:
|
|
1099
|
+
showKeyboardShortcuts: h,
|
|
1100
|
+
highlightActiveItem: c
|
|
1101
1101
|
}),
|
|
1102
1102
|
[
|
|
1103
|
-
b,
|
|
1104
1103
|
C,
|
|
1105
|
-
|
|
1104
|
+
b,
|
|
1105
|
+
F,
|
|
1106
1106
|
m,
|
|
1107
1107
|
g,
|
|
1108
|
-
|
|
1109
|
-
|
|
1108
|
+
X,
|
|
1109
|
+
Q,
|
|
1110
1110
|
f,
|
|
1111
|
-
|
|
1112
|
-
|
|
1111
|
+
D,
|
|
1112
|
+
T,
|
|
1113
1113
|
U,
|
|
1114
|
+
M,
|
|
1114
1115
|
O,
|
|
1115
|
-
$,
|
|
1116
1116
|
o,
|
|
1117
|
-
|
|
1118
|
-
|
|
1117
|
+
h,
|
|
1118
|
+
c
|
|
1119
1119
|
]
|
|
1120
1120
|
);
|
|
1121
1121
|
return /* @__PURE__ */ r(yA.Provider, { value: P, children: A });
|
|
@@ -1124,13 +1124,13 @@ function wA({
|
|
|
1124
1124
|
navigationData: A,
|
|
1125
1125
|
onMenuItemClick: t
|
|
1126
1126
|
}) {
|
|
1127
|
-
const o = je(), e = qe(), n = o.pathname, s =
|
|
1128
|
-
(
|
|
1129
|
-
for (const
|
|
1130
|
-
if (
|
|
1131
|
-
return
|
|
1132
|
-
if (
|
|
1133
|
-
const p = s(
|
|
1127
|
+
const o = je(), e = qe(), n = o.pathname, s = S(
|
|
1128
|
+
(d) => {
|
|
1129
|
+
for (const u of d) {
|
|
1130
|
+
if (u.link === n)
|
|
1131
|
+
return u;
|
|
1132
|
+
if (u.links) {
|
|
1133
|
+
const p = s(u.links);
|
|
1134
1134
|
if (p)
|
|
1135
1135
|
return p;
|
|
1136
1136
|
}
|
|
@@ -1138,90 +1138,90 @@ function wA({
|
|
|
1138
1138
|
return null;
|
|
1139
1139
|
},
|
|
1140
1140
|
[n]
|
|
1141
|
-
), a = ce(() => s(A), [s, A]), l =
|
|
1142
|
-
(
|
|
1141
|
+
), a = ce(() => s(A), [s, A]), l = S(
|
|
1142
|
+
(d) => d.link === n,
|
|
1143
1143
|
[n]
|
|
1144
|
-
),
|
|
1145
|
-
(
|
|
1144
|
+
), i = S(
|
|
1145
|
+
(d) => d.link === n ? !0 : d.links ? d.links.some((u) => i(u)) : !1,
|
|
1146
1146
|
[n]
|
|
1147
|
-
),
|
|
1148
|
-
const
|
|
1149
|
-
for (const
|
|
1150
|
-
const m = [...
|
|
1151
|
-
if (
|
|
1152
|
-
return
|
|
1153
|
-
if (
|
|
1147
|
+
), h = ce(() => {
|
|
1148
|
+
const d = [], u = (p, C) => {
|
|
1149
|
+
for (const b of p) {
|
|
1150
|
+
const m = [...C, b];
|
|
1151
|
+
if (b.link === n)
|
|
1152
|
+
return d.push(...m), !0;
|
|
1153
|
+
if (b.links && u(b.links, m))
|
|
1154
1154
|
return !0;
|
|
1155
1155
|
}
|
|
1156
1156
|
return !1;
|
|
1157
1157
|
};
|
|
1158
|
-
return
|
|
1159
|
-
}, [A, n]),
|
|
1160
|
-
(
|
|
1161
|
-
(typeof
|
|
1158
|
+
return u(A, []), d;
|
|
1159
|
+
}, [A, n]), c = S(
|
|
1160
|
+
(d) => {
|
|
1161
|
+
(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
1162
|
},
|
|
1163
1163
|
[e, t]
|
|
1164
1164
|
);
|
|
1165
1165
|
return {
|
|
1166
1166
|
activeItem: a,
|
|
1167
1167
|
currentPath: n,
|
|
1168
|
-
navigateToItem:
|
|
1168
|
+
navigateToItem: c,
|
|
1169
1169
|
isItemActive: l,
|
|
1170
|
-
isItemOrChildActive:
|
|
1171
|
-
activeBreadcrumb:
|
|
1170
|
+
isItemOrChildActive: i,
|
|
1171
|
+
activeBreadcrumb: h
|
|
1172
1172
|
};
|
|
1173
1173
|
}
|
|
1174
1174
|
function Wt({
|
|
1175
1175
|
navigationData: A,
|
|
1176
1176
|
onSearch: t
|
|
1177
1177
|
}) {
|
|
1178
|
-
const [o, e] = ge(""), n =
|
|
1179
|
-
let
|
|
1180
|
-
return
|
|
1178
|
+
const [o, e] = ge(""), n = S((h) => h.reduce((c, d) => {
|
|
1179
|
+
let u = 1;
|
|
1180
|
+
return d.links && (u += n(d.links)), c + u;
|
|
1181
1181
|
}, 0), []), s = ce(() => {
|
|
1182
1182
|
if (!o.trim())
|
|
1183
1183
|
return A;
|
|
1184
|
-
const
|
|
1184
|
+
const h = o.toLowerCase().trim(), c = (d) => d.reduce((u, p) => {
|
|
1185
1185
|
if (!p.showInSidebar)
|
|
1186
|
-
return
|
|
1187
|
-
const
|
|
1188
|
-
return (
|
|
1186
|
+
return u;
|
|
1187
|
+
const C = p.label.toLowerCase().includes(h), b = p.links ? c(p.links) : [];
|
|
1188
|
+
return (C || b.length > 0) && u.push({
|
|
1189
1189
|
...p,
|
|
1190
|
-
links:
|
|
1190
|
+
links: b.length > 0 ? b : p.links,
|
|
1191
1191
|
// Expandir automaticamente grupos com match
|
|
1192
1192
|
initiallyOpened: !0
|
|
1193
|
-
}),
|
|
1193
|
+
}), u;
|
|
1194
1194
|
}, []);
|
|
1195
|
-
return
|
|
1196
|
-
}, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l =
|
|
1197
|
-
(
|
|
1198
|
-
if (e(
|
|
1199
|
-
const
|
|
1200
|
-
if (!
|
|
1201
|
-
t(
|
|
1195
|
+
return c(A);
|
|
1196
|
+
}, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = S(
|
|
1197
|
+
(h) => {
|
|
1198
|
+
if (e(h), t) {
|
|
1199
|
+
const c = h.toLowerCase().trim();
|
|
1200
|
+
if (!c)
|
|
1201
|
+
t(h, A);
|
|
1202
1202
|
else {
|
|
1203
|
-
const
|
|
1204
|
-
if (!
|
|
1203
|
+
const d = (u) => u.reduce((p, C) => {
|
|
1204
|
+
if (!C.showInSidebar)
|
|
1205
1205
|
return p;
|
|
1206
|
-
const
|
|
1207
|
-
return (
|
|
1208
|
-
...
|
|
1209
|
-
links: m.length > 0 ? m :
|
|
1206
|
+
const b = C.label.toLowerCase().includes(c), m = C.links ? d(C.links) : [];
|
|
1207
|
+
return (b || m.length > 0) && p.push({
|
|
1208
|
+
...C,
|
|
1209
|
+
links: m.length > 0 ? m : C.links,
|
|
1210
1210
|
initiallyOpened: !0
|
|
1211
1211
|
}), p;
|
|
1212
1212
|
}, []);
|
|
1213
|
-
t(
|
|
1213
|
+
t(h, d(A));
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
1216
|
},
|
|
1217
1217
|
[A, t]
|
|
1218
|
-
),
|
|
1218
|
+
), i = S(() => {
|
|
1219
1219
|
l("");
|
|
1220
1220
|
}, [l]);
|
|
1221
1221
|
return {
|
|
1222
1222
|
query: o,
|
|
1223
1223
|
setQuery: l,
|
|
1224
|
-
clearSearch:
|
|
1224
|
+
clearSearch: i,
|
|
1225
1225
|
filteredItems: s,
|
|
1226
1226
|
hasResults: s.length > 0,
|
|
1227
1227
|
isSearching: o.trim().length > 0,
|
|
@@ -1238,32 +1238,32 @@ function SA({
|
|
|
1238
1238
|
enabled: e = !0
|
|
1239
1239
|
}) {
|
|
1240
1240
|
const n = ce(() => {
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1241
|
+
const i = /* @__PURE__ */ new Map(), h = (c) => {
|
|
1242
|
+
c.forEach((d) => {
|
|
1243
|
+
const u = d;
|
|
1244
|
+
u.shortcut && i.set(u.shortcut, d), d.links && h(d.links);
|
|
1245
1245
|
});
|
|
1246
1246
|
};
|
|
1247
|
-
return
|
|
1248
|
-
}, [A]), s =
|
|
1249
|
-
(
|
|
1247
|
+
return h(A), i;
|
|
1248
|
+
}, [A]), s = S(
|
|
1249
|
+
(i) => !!i.shortcut,
|
|
1250
1250
|
[]
|
|
1251
|
-
), a =
|
|
1252
|
-
(
|
|
1251
|
+
), a = S(
|
|
1252
|
+
(i) => i.shortcut,
|
|
1253
1253
|
[]
|
|
1254
1254
|
), l = ce(() => {
|
|
1255
1255
|
if (!e)
|
|
1256
1256
|
return [];
|
|
1257
|
-
const
|
|
1258
|
-
return o &&
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
|
|
1257
|
+
const i = [];
|
|
1258
|
+
return o && i.push(["mod+b", o]), n.forEach((h, c) => {
|
|
1259
|
+
const d = Zt(c);
|
|
1260
|
+
i.push([
|
|
1261
|
+
d,
|
|
1262
1262
|
() => {
|
|
1263
|
-
(typeof
|
|
1263
|
+
(typeof h.disabled == "function" ? h.disabled() : h.disabled) || t(h);
|
|
1264
1264
|
}
|
|
1265
1265
|
]);
|
|
1266
|
-
}),
|
|
1266
|
+
}), i;
|
|
1267
1267
|
}, [e, n, t, o]);
|
|
1268
1268
|
return Rr(l), {
|
|
1269
1269
|
shortcuts: n,
|
|
@@ -1280,26 +1280,26 @@ function $e({
|
|
|
1280
1280
|
textColor: s,
|
|
1281
1281
|
iconColor: a,
|
|
1282
1282
|
hoverColor: l,
|
|
1283
|
-
itemHeight:
|
|
1284
|
-
itemBorderRadius:
|
|
1285
|
-
itemHorizontalGap:
|
|
1286
|
-
activeBackground:
|
|
1287
|
-
isActive:
|
|
1283
|
+
itemHeight: i = 40,
|
|
1284
|
+
itemBorderRadius: h = 0,
|
|
1285
|
+
itemHorizontalGap: c = 0,
|
|
1286
|
+
activeBackground: d,
|
|
1287
|
+
isActive: u
|
|
1288
1288
|
}) {
|
|
1289
|
-
const p = me(), { colorScheme:
|
|
1290
|
-
if (
|
|
1289
|
+
const p = me(), { colorScheme: C } = de(), b = A, [m, g] = ge(!1), f = s || "var(--mantine-color-text)", I = a || p.colors[p.primaryColor][6], T = l || p.colors[p.primaryColor][6], L = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], X = m ? e ? L : T : e ? T : "transparent", F = m || e ? p.white : f, U = m || e ? p.white : I, O = e && !m && !!d ? { background: d, backgroundColor: void 0 } : { background: void 0, backgroundColor: X }, D = typeof A.disabled == "function" ? A.disabled() : A.disabled;
|
|
1290
|
+
if (D && A.hideDisabledItem || !A.showInSidebar)
|
|
1291
1291
|
return null;
|
|
1292
|
-
const
|
|
1293
|
-
!
|
|
1294
|
-
}, [
|
|
1292
|
+
const Q = S(() => {
|
|
1293
|
+
!D && n && n(A);
|
|
1294
|
+
}, [D, n, A]), P = Re.t(A.label), v = () => b.badge ? /* @__PURE__ */ r(pA, { size: "xs", color: b.badgeColor || "blue", variant: "filled", children: b.badge }) : null, K = () => b.shortcut ? /* @__PURE__ */ r(HA, { size: "xs", style: { marginLeft: "auto" }, children: b.shortcut }) : null;
|
|
1295
1295
|
if (A.links && A.links.length > 0) {
|
|
1296
|
-
const E = A.links.filter((
|
|
1297
|
-
const
|
|
1298
|
-
return
|
|
1296
|
+
const E = A.links.filter((x) => {
|
|
1297
|
+
const V = typeof x.disabled == "function" ? x.disabled() : x.disabled;
|
|
1298
|
+
return x.showInSidebar && (!V || !x.hideDisabledItem);
|
|
1299
1299
|
});
|
|
1300
|
-
if (E.length === 0 &&
|
|
1300
|
+
if (E.length === 0 && D && A.hideDisabledItem)
|
|
1301
1301
|
return null;
|
|
1302
|
-
const W = (
|
|
1302
|
+
const W = (x) => u ? u(x) : e, G = (x) => x.some((V) => W(V) || (V.links ? G(V.links) : !1));
|
|
1303
1303
|
return o ? /* @__PURE__ */ R(
|
|
1304
1304
|
ie,
|
|
1305
1305
|
{
|
|
@@ -1323,7 +1323,7 @@ function $e({
|
|
|
1323
1323
|
B,
|
|
1324
1324
|
{
|
|
1325
1325
|
style: {
|
|
1326
|
-
color:
|
|
1326
|
+
color: I,
|
|
1327
1327
|
display: "flex",
|
|
1328
1328
|
alignItems: "center",
|
|
1329
1329
|
justifyContent: "center"
|
|
@@ -1337,7 +1337,7 @@ function $e({
|
|
|
1337
1337
|
size: "8px",
|
|
1338
1338
|
ta: "center",
|
|
1339
1339
|
style: {
|
|
1340
|
-
color:
|
|
1340
|
+
color: I,
|
|
1341
1341
|
lineHeight: 1,
|
|
1342
1342
|
maxWidth: 56,
|
|
1343
1343
|
overflow: "hidden",
|
|
@@ -1352,17 +1352,17 @@ function $e({
|
|
|
1352
1352
|
) }) }) }),
|
|
1353
1353
|
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
1354
1354
|
/* @__PURE__ */ r(ie.Label, { children: P }),
|
|
1355
|
-
E.map((
|
|
1356
|
-
const
|
|
1355
|
+
E.map((x, V) => {
|
|
1356
|
+
const se = typeof x.disabled == "function" ? x.disabled() : x.disabled;
|
|
1357
1357
|
return /* @__PURE__ */ r(
|
|
1358
1358
|
ie.Item,
|
|
1359
1359
|
{
|
|
1360
|
-
leftSection:
|
|
1361
|
-
disabled:
|
|
1362
|
-
onClick: () => n?.(
|
|
1363
|
-
children: Re.t(
|
|
1360
|
+
leftSection: x.icon,
|
|
1361
|
+
disabled: se,
|
|
1362
|
+
onClick: () => n?.(x),
|
|
1363
|
+
children: Re.t(x.label)
|
|
1364
1364
|
},
|
|
1365
|
-
|
|
1365
|
+
V
|
|
1366
1366
|
);
|
|
1367
1367
|
})
|
|
1368
1368
|
] })
|
|
@@ -1373,8 +1373,8 @@ function $e({
|
|
|
1373
1373
|
{
|
|
1374
1374
|
label: P,
|
|
1375
1375
|
leftSection: /* @__PURE__ */ r(B, { style: { color: U }, children: A.icon }),
|
|
1376
|
-
rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color:
|
|
1377
|
-
|
|
1376
|
+
rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: F }, children: [
|
|
1377
|
+
v(),
|
|
1378
1378
|
/* @__PURE__ */ r(
|
|
1379
1379
|
gA,
|
|
1380
1380
|
{
|
|
@@ -1386,46 +1386,46 @@ function $e({
|
|
|
1386
1386
|
)
|
|
1387
1387
|
] }),
|
|
1388
1388
|
childrenOffset: 28,
|
|
1389
|
-
defaultOpened: A.initiallyOpened || e ||
|
|
1390
|
-
disabled:
|
|
1389
|
+
defaultOpened: A.initiallyOpened || e || G(E),
|
|
1390
|
+
disabled: D,
|
|
1391
1391
|
onMouseEnter: () => g(!0),
|
|
1392
1392
|
onMouseLeave: () => g(!1),
|
|
1393
1393
|
style: {
|
|
1394
|
-
height:
|
|
1395
|
-
marginInline:
|
|
1396
|
-
width:
|
|
1397
|
-
|
|
1394
|
+
height: i,
|
|
1395
|
+
marginInline: c,
|
|
1396
|
+
width: c ? "auto" : void 0,
|
|
1397
|
+
...O,
|
|
1398
1398
|
transition: "background 150ms ease, background-color 150ms ease"
|
|
1399
1399
|
},
|
|
1400
1400
|
styles: {
|
|
1401
1401
|
root: {
|
|
1402
|
-
borderRadius:
|
|
1402
|
+
borderRadius: h
|
|
1403
1403
|
},
|
|
1404
1404
|
label: {
|
|
1405
|
-
color:
|
|
1405
|
+
color: F
|
|
1406
1406
|
},
|
|
1407
1407
|
children: {
|
|
1408
1408
|
paddingLeft: 0
|
|
1409
1409
|
}
|
|
1410
1410
|
},
|
|
1411
|
-
children: E.map((
|
|
1411
|
+
children: E.map((x, V) => /* @__PURE__ */ r(
|
|
1412
1412
|
$e,
|
|
1413
1413
|
{
|
|
1414
|
-
item:
|
|
1414
|
+
item: x,
|
|
1415
1415
|
depth: t + 1,
|
|
1416
1416
|
collapsed: o,
|
|
1417
|
-
active: W(
|
|
1417
|
+
active: W(x),
|
|
1418
1418
|
onClick: n,
|
|
1419
1419
|
textColor: s,
|
|
1420
1420
|
iconColor: a,
|
|
1421
1421
|
hoverColor: l,
|
|
1422
|
-
itemHeight:
|
|
1423
|
-
itemBorderRadius:
|
|
1424
|
-
itemHorizontalGap:
|
|
1425
|
-
activeBackground:
|
|
1426
|
-
isActive:
|
|
1422
|
+
itemHeight: i,
|
|
1423
|
+
itemBorderRadius: h,
|
|
1424
|
+
itemHorizontalGap: c,
|
|
1425
|
+
activeBackground: d,
|
|
1426
|
+
isActive: u
|
|
1427
1427
|
},
|
|
1428
|
-
|
|
1428
|
+
V
|
|
1429
1429
|
))
|
|
1430
1430
|
}
|
|
1431
1431
|
);
|
|
@@ -1433,43 +1433,43 @@ function $e({
|
|
|
1433
1433
|
return o ? /* @__PURE__ */ r(
|
|
1434
1434
|
Me,
|
|
1435
1435
|
{
|
|
1436
|
-
label:
|
|
1436
|
+
label: b.tooltip || P,
|
|
1437
1437
|
position: "right",
|
|
1438
1438
|
withArrow: !0,
|
|
1439
1439
|
children: /* @__PURE__ */ r(
|
|
1440
1440
|
Je,
|
|
1441
1441
|
{
|
|
1442
1442
|
style: {
|
|
1443
|
-
width:
|
|
1444
|
-
marginInline:
|
|
1445
|
-
borderRadius:
|
|
1446
|
-
cursor:
|
|
1447
|
-
opacity:
|
|
1443
|
+
width: c ? "auto" : "100%",
|
|
1444
|
+
marginInline: c,
|
|
1445
|
+
borderRadius: h,
|
|
1446
|
+
cursor: D ? "not-allowed" : "pointer",
|
|
1447
|
+
opacity: D ? 0.5 : 1,
|
|
1448
1448
|
// Gradiente (activeBackground) via shorthand; senão a cor sólida.
|
|
1449
|
-
...e &&
|
|
1449
|
+
...e && d ? { background: d } : { backgroundColor: e ? T : "transparent" },
|
|
1450
1450
|
transition: "background 150ms ease, background-color 150ms ease",
|
|
1451
1451
|
padding: "2px 0"
|
|
1452
1452
|
},
|
|
1453
|
-
onClick:
|
|
1453
|
+
onClick: Q,
|
|
1454
1454
|
onMouseEnter: (E) => {
|
|
1455
|
-
if (!
|
|
1456
|
-
if (e &&
|
|
1455
|
+
if (!D) {
|
|
1456
|
+
if (e && d)
|
|
1457
1457
|
return;
|
|
1458
|
-
E.currentTarget.style.backgroundColor = e ?
|
|
1458
|
+
E.currentTarget.style.backgroundColor = e ? L : T;
|
|
1459
1459
|
}
|
|
1460
1460
|
},
|
|
1461
1461
|
onMouseLeave: (E) => {
|
|
1462
|
-
e &&
|
|
1462
|
+
e && d || (E.currentTarget.style.backgroundColor = e ? T : "transparent");
|
|
1463
1463
|
},
|
|
1464
1464
|
children: /* @__PURE__ */ R(J, { gap: 1, align: "center", children: [
|
|
1465
|
-
/* @__PURE__ */ r(B, { style: { color: e ? p.white :
|
|
1465
|
+
/* @__PURE__ */ r(B, { style: { color: e ? p.white : I }, children: A.icon }),
|
|
1466
1466
|
/* @__PURE__ */ r(
|
|
1467
1467
|
Te,
|
|
1468
1468
|
{
|
|
1469
1469
|
size: "8px",
|
|
1470
1470
|
ta: "center",
|
|
1471
1471
|
style: {
|
|
1472
|
-
color: e ? p.white :
|
|
1472
|
+
color: e ? p.white : I,
|
|
1473
1473
|
lineHeight: 1,
|
|
1474
1474
|
maxWidth: 56,
|
|
1475
1475
|
overflow: "hidden",
|
|
@@ -1488,29 +1488,29 @@ function $e({
|
|
|
1488
1488
|
{
|
|
1489
1489
|
label: P,
|
|
1490
1490
|
leftSection: /* @__PURE__ */ r(B, { style: { color: U }, children: A.icon }),
|
|
1491
|
-
rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color:
|
|
1492
|
-
|
|
1493
|
-
|
|
1491
|
+
rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: F }, children: [
|
|
1492
|
+
v(),
|
|
1493
|
+
K()
|
|
1494
1494
|
] }),
|
|
1495
1495
|
active: e,
|
|
1496
|
-
disabled:
|
|
1497
|
-
onClick:
|
|
1496
|
+
disabled: D,
|
|
1497
|
+
onClick: Q,
|
|
1498
1498
|
onMouseEnter: () => g(!0),
|
|
1499
1499
|
onMouseLeave: () => g(!1),
|
|
1500
1500
|
style: {
|
|
1501
|
-
height:
|
|
1501
|
+
height: i,
|
|
1502
1502
|
paddingLeft: t > 0 ? t * 16 + 12 : void 0,
|
|
1503
|
-
marginInline:
|
|
1504
|
-
width:
|
|
1505
|
-
|
|
1503
|
+
marginInline: c,
|
|
1504
|
+
width: c ? "auto" : void 0,
|
|
1505
|
+
...O,
|
|
1506
1506
|
transition: "background 150ms ease, background-color 150ms ease"
|
|
1507
1507
|
},
|
|
1508
1508
|
styles: {
|
|
1509
1509
|
root: {
|
|
1510
|
-
borderRadius:
|
|
1510
|
+
borderRadius: h
|
|
1511
1511
|
},
|
|
1512
1512
|
label: {
|
|
1513
|
-
color:
|
|
1513
|
+
color: F
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
@@ -1525,9 +1525,9 @@ function eo({
|
|
|
1525
1525
|
onExpandedChange: s,
|
|
1526
1526
|
groupId: a
|
|
1527
1527
|
}) {
|
|
1528
|
-
const l = me(), { colorScheme:
|
|
1529
|
-
|
|
1530
|
-
}, [
|
|
1528
|
+
const l = me(), { colorScheme: i } = de(), [h, c] = ge(e), d = n !== void 0, u = d ? n : h, p = S(() => {
|
|
1529
|
+
d ? s?.(!u) : c((f) => !f);
|
|
1530
|
+
}, [d, u, s]), C = i === "dark" ? l.colors.dark[6] : l.colors.gray[1], b = i === "dark" ? l.colors.dark[5] : l.colors.gray[2], m = i === "dark" ? l.colors.gray[4] : l.colors.gray[7], g = i === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
|
|
1531
1531
|
return /* @__PURE__ */ R(B, { children: [
|
|
1532
1532
|
/* @__PURE__ */ r(
|
|
1533
1533
|
cA,
|
|
@@ -1537,13 +1537,13 @@ function eo({
|
|
|
1537
1537
|
p: "xs",
|
|
1538
1538
|
style: {
|
|
1539
1539
|
borderRadius: l.radius.sm,
|
|
1540
|
-
backgroundColor:
|
|
1540
|
+
backgroundColor: C,
|
|
1541
1541
|
transition: "background-color 150ms ease"
|
|
1542
1542
|
},
|
|
1543
1543
|
styles: {
|
|
1544
1544
|
root: {
|
|
1545
1545
|
"&:hover": {
|
|
1546
|
-
backgroundColor:
|
|
1546
|
+
backgroundColor: b
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
},
|
|
@@ -1558,7 +1558,7 @@ function eo({
|
|
|
1558
1558
|
size: 16,
|
|
1559
1559
|
color: m,
|
|
1560
1560
|
style: {
|
|
1561
|
-
transform:
|
|
1561
|
+
transform: u ? "rotate(180deg)" : "rotate(0deg)",
|
|
1562
1562
|
transition: "transform 200ms ease"
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
@@ -1566,7 +1566,7 @@ function eo({
|
|
|
1566
1566
|
] })
|
|
1567
1567
|
}
|
|
1568
1568
|
),
|
|
1569
|
-
/* @__PURE__ */ r($r, { expanded:
|
|
1569
|
+
/* @__PURE__ */ r($r, { expanded: u, children: /* @__PURE__ */ r(B, { mt: 4, children: o }) })
|
|
1570
1570
|
] });
|
|
1571
1571
|
}
|
|
1572
1572
|
function Mn({
|
|
@@ -1599,7 +1599,7 @@ function Ao({
|
|
|
1599
1599
|
activeColor: n,
|
|
1600
1600
|
inactiveColor: s
|
|
1601
1601
|
}) {
|
|
1602
|
-
const a = me(), { colorScheme: l } = de(),
|
|
1602
|
+
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
1603
|
J,
|
|
1604
1604
|
{
|
|
1605
1605
|
gap: 2,
|
|
@@ -1612,7 +1612,7 @@ function Ao({
|
|
|
1612
1612
|
{
|
|
1613
1613
|
size: 48,
|
|
1614
1614
|
variant: t ? "filled" : "subtle",
|
|
1615
|
-
color: t ? n ??
|
|
1615
|
+
color: t ? n ?? i : s ?? h,
|
|
1616
1616
|
onClick: o,
|
|
1617
1617
|
style: {
|
|
1618
1618
|
transition: "all 150ms ease"
|
|
@@ -1624,7 +1624,7 @@ function Ao({
|
|
|
1624
1624
|
Te,
|
|
1625
1625
|
{
|
|
1626
1626
|
size: "xs",
|
|
1627
|
-
c
|
|
1627
|
+
c,
|
|
1628
1628
|
style: {
|
|
1629
1629
|
maxWidth: 70,
|
|
1630
1630
|
overflow: "hidden",
|
|
@@ -1646,14 +1646,14 @@ function Dn({
|
|
|
1646
1646
|
onClear: e,
|
|
1647
1647
|
collapsed: n = !1
|
|
1648
1648
|
}) {
|
|
1649
|
-
const s = me(), { colorScheme: a } = de(), l =
|
|
1650
|
-
(
|
|
1651
|
-
o?.(
|
|
1649
|
+
const s = me(), { colorScheme: a } = de(), l = S(
|
|
1650
|
+
(c) => {
|
|
1651
|
+
o?.(c.currentTarget.value);
|
|
1652
1652
|
},
|
|
1653
1653
|
[o]
|
|
1654
|
-
),
|
|
1654
|
+
), i = S(() => {
|
|
1655
1655
|
o?.(""), e?.();
|
|
1656
|
-
}, [o, e]),
|
|
1656
|
+
}, [o, e]), h = t && t.length > 0;
|
|
1657
1657
|
return n ? /* @__PURE__ */ r(
|
|
1658
1658
|
De,
|
|
1659
1659
|
{
|
|
@@ -1667,12 +1667,12 @@ function Dn({
|
|
|
1667
1667
|
{
|
|
1668
1668
|
placeholder: A,
|
|
1669
1669
|
leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
|
|
1670
|
-
rightSection:
|
|
1670
|
+
rightSection: h ? /* @__PURE__ */ r(
|
|
1671
1671
|
De,
|
|
1672
1672
|
{
|
|
1673
1673
|
variant: "subtle",
|
|
1674
1674
|
size: "sm",
|
|
1675
|
-
onClick:
|
|
1675
|
+
onClick: i,
|
|
1676
1676
|
style: { cursor: "pointer" },
|
|
1677
1677
|
children: /* @__PURE__ */ r(_A, { size: 14 })
|
|
1678
1678
|
}
|
|
@@ -1695,13 +1695,13 @@ function Nn({
|
|
|
1695
1695
|
onClick: e,
|
|
1696
1696
|
collapsed: n = !1
|
|
1697
1697
|
}) {
|
|
1698
|
-
const s = me(), { colorScheme: a } = de(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1],
|
|
1698
|
+
const s = me(), { colorScheme: a } = de(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], i = () => {
|
|
1699
1699
|
if (typeof o == "string")
|
|
1700
1700
|
return /* @__PURE__ */ r(iA, { src: o, radius: "xl", size: n ? "sm" : "md" });
|
|
1701
1701
|
if (o)
|
|
1702
1702
|
return o;
|
|
1703
|
-
const
|
|
1704
|
-
return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children:
|
|
1703
|
+
const h = A ? A.split(" ").map((c) => c[0]).slice(0, 2).join("").toUpperCase() : "?";
|
|
1704
|
+
return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: h });
|
|
1705
1705
|
};
|
|
1706
1706
|
return n ? /* @__PURE__ */ r(Me, { label: A || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
|
|
1707
1707
|
cA,
|
|
@@ -1722,7 +1722,7 @@ function Nn({
|
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
1724
|
},
|
|
1725
|
-
children:
|
|
1725
|
+
children: i()
|
|
1726
1726
|
}
|
|
1727
1727
|
) }) : /* @__PURE__ */ r(
|
|
1728
1728
|
cA,
|
|
@@ -1742,7 +1742,7 @@ function Nn({
|
|
|
1742
1742
|
}
|
|
1743
1743
|
},
|
|
1744
1744
|
children: /* @__PURE__ */ R(Le, { wrap: "nowrap", children: [
|
|
1745
|
-
|
|
1745
|
+
i(),
|
|
1746
1746
|
/* @__PURE__ */ R(B, { style: { flex: 1, overflow: "hidden" }, children: [
|
|
1747
1747
|
A && /* @__PURE__ */ r(
|
|
1748
1748
|
Te,
|
|
@@ -1816,41 +1816,41 @@ function kA({
|
|
|
1816
1816
|
showGroups: n = !0,
|
|
1817
1817
|
groupCount: s = 2
|
|
1818
1818
|
}) {
|
|
1819
|
-
const a = me(), { colorScheme: l } = de(),
|
|
1819
|
+
const a = me(), { colorScheme: l } = de(), i = o || (l === "dark" ? a.colors.dark[7] : a.white);
|
|
1820
1820
|
if (t)
|
|
1821
|
-
return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor:
|
|
1822
|
-
const
|
|
1823
|
-
const
|
|
1821
|
+
return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: A }).map((d, u) => /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }, u)) });
|
|
1822
|
+
const h = (d, u = !1) => Array.from({ length: d }).map((p, C) => {
|
|
1823
|
+
const b = 60 + Math.random() * 30;
|
|
1824
1824
|
return /* @__PURE__ */ R(
|
|
1825
1825
|
Le,
|
|
1826
1826
|
{
|
|
1827
1827
|
gap: "sm",
|
|
1828
1828
|
p: "xs",
|
|
1829
1829
|
style: {
|
|
1830
|
-
paddingLeft:
|
|
1830
|
+
paddingLeft: u ? 24 : void 0,
|
|
1831
1831
|
height: e
|
|
1832
1832
|
},
|
|
1833
1833
|
children: [
|
|
1834
1834
|
/* @__PURE__ */ r(pe, { circle: !0, height: 24, width: 24 }),
|
|
1835
|
-
/* @__PURE__ */ r(pe, { height: 14, width: `${
|
|
1835
|
+
/* @__PURE__ */ r(pe, { height: 14, width: `${b}%`, radius: "sm" })
|
|
1836
1836
|
]
|
|
1837
1837
|
},
|
|
1838
|
-
|
|
1838
|
+
C
|
|
1839
1839
|
);
|
|
1840
1840
|
});
|
|
1841
1841
|
if (!n)
|
|
1842
|
-
return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor:
|
|
1843
|
-
const
|
|
1844
|
-
return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor:
|
|
1842
|
+
return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor: i }, children: h(A) });
|
|
1843
|
+
const c = Math.ceil(A / s);
|
|
1844
|
+
return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: s }).map((d, u) => /* @__PURE__ */ R(B, { children: [
|
|
1845
1845
|
/* @__PURE__ */ R(Le, { gap: "sm", p: "xs", children: [
|
|
1846
1846
|
/* @__PURE__ */ r(pe, { circle: !0, height: 20, width: 20 }),
|
|
1847
1847
|
/* @__PURE__ */ r(pe, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
|
|
1848
1848
|
] }),
|
|
1849
|
-
/* @__PURE__ */ r(J, { gap: 2, mt: 4, children:
|
|
1850
|
-
|
|
1849
|
+
/* @__PURE__ */ r(J, { gap: 2, mt: 4, children: h(
|
|
1850
|
+
u === s - 1 ? A - u * c : c,
|
|
1851
1851
|
!0
|
|
1852
1852
|
) })
|
|
1853
|
-
] },
|
|
1853
|
+
] }, u)) });
|
|
1854
1854
|
}
|
|
1855
1855
|
function ro({
|
|
1856
1856
|
groupCount: A = 4,
|
|
@@ -1940,147 +1940,147 @@ function to({
|
|
|
1940
1940
|
searchPlaceholder: s = "Buscar...",
|
|
1941
1941
|
onSearch: a,
|
|
1942
1942
|
header: l,
|
|
1943
|
-
footer:
|
|
1944
|
-
footerHeight:
|
|
1945
|
-
isLoading:
|
|
1946
|
-
loadingError:
|
|
1947
|
-
loadingComponent:
|
|
1943
|
+
footer: i,
|
|
1944
|
+
footerHeight: h,
|
|
1945
|
+
isLoading: c = !1,
|
|
1946
|
+
loadingError: d,
|
|
1947
|
+
loadingComponent: u,
|
|
1948
1948
|
errorComponent: p,
|
|
1949
|
-
skeletonItemCount:
|
|
1950
|
-
backgroundDarkColor:
|
|
1949
|
+
skeletonItemCount: C = 8,
|
|
1950
|
+
backgroundDarkColor: b,
|
|
1951
1951
|
backgroundLightColor: m,
|
|
1952
1952
|
backgroundImage: g,
|
|
1953
1953
|
textDarkColor: f,
|
|
1954
|
-
textLightColor:
|
|
1955
|
-
iconDarkColor:
|
|
1956
|
-
iconLightColor:
|
|
1957
|
-
activeColor:
|
|
1958
|
-
withBorder:
|
|
1954
|
+
textLightColor: I,
|
|
1955
|
+
iconDarkColor: T,
|
|
1956
|
+
iconLightColor: L,
|
|
1957
|
+
activeColor: X,
|
|
1958
|
+
withBorder: F = !0,
|
|
1959
1959
|
withShadow: U = !1,
|
|
1960
|
-
highlightActiveItem:
|
|
1961
|
-
onMenuItemClick:
|
|
1962
|
-
itemBorderRadius:
|
|
1963
|
-
itemHorizontalGap:
|
|
1960
|
+
highlightActiveItem: M = !0,
|
|
1961
|
+
onMenuItemClick: O,
|
|
1962
|
+
itemBorderRadius: D,
|
|
1963
|
+
itemHorizontalGap: Q,
|
|
1964
1964
|
itemActiveBackground: P
|
|
1965
1965
|
}) {
|
|
1966
|
-
const
|
|
1966
|
+
const v = me(), { colorScheme: K } = de(), { collapsed: E, toggleCollapsed: W } = vA(), G = K === "dark" ? b ?? v.colors.dark[7] : m ?? v.white, x = K === "dark" ? f ?? v.colors.gray[3] : I ?? v.colors.gray[7], V = K === "dark" ? T ?? v.colors[v.primaryColor][4] : L ?? v.colors[v.primaryColor][6], se = X ? v.colors[X]?.[6] ?? v.colors[v.primaryColor][6] : v.colors[v.primaryColor][6], Ce = g ? { background: g } : { backgroundColor: G }, le = g ? "transparent" : G, {
|
|
1967
1967
|
query: be,
|
|
1968
|
-
setQuery:
|
|
1969
|
-
filteredItems:
|
|
1970
|
-
isSearching:
|
|
1971
|
-
clearSearch:
|
|
1968
|
+
setQuery: we,
|
|
1969
|
+
filteredItems: Se,
|
|
1970
|
+
isSearching: w,
|
|
1971
|
+
clearSearch: k
|
|
1972
1972
|
} = Wt({
|
|
1973
1973
|
navigationData: A,
|
|
1974
1974
|
onSearch: a
|
|
1975
|
-
}), { navigateToItem:
|
|
1975
|
+
}), { navigateToItem: N, isItemActive: y, isItemOrChildActive: H } = wA({
|
|
1976
1976
|
navigationData: A,
|
|
1977
|
-
onMenuItemClick:
|
|
1978
|
-
}),
|
|
1979
|
-
(
|
|
1980
|
-
[
|
|
1981
|
-
),
|
|
1982
|
-
itemBorderRadius:
|
|
1983
|
-
itemHorizontalGap:
|
|
1977
|
+
onMenuItemClick: O
|
|
1978
|
+
}), Y = S(
|
|
1979
|
+
(ee) => !!M && y(ee),
|
|
1980
|
+
[M, y]
|
|
1981
|
+
), z = {
|
|
1982
|
+
itemBorderRadius: D,
|
|
1983
|
+
itemHorizontalGap: Q,
|
|
1984
1984
|
activeBackground: P,
|
|
1985
|
-
isActive:
|
|
1985
|
+
isActive: Y
|
|
1986
1986
|
};
|
|
1987
1987
|
SA({
|
|
1988
1988
|
navigationData: A,
|
|
1989
|
-
navigateToItem:
|
|
1989
|
+
navigateToItem: N,
|
|
1990
1990
|
onToggleSidebar: W,
|
|
1991
1991
|
enabled: !0
|
|
1992
1992
|
});
|
|
1993
|
-
const
|
|
1994
|
-
const
|
|
1995
|
-
return
|
|
1996
|
-
if (!(!
|
|
1997
|
-
if (
|
|
1998
|
-
const Ee =
|
|
1999
|
-
Ee.push(
|
|
1993
|
+
const j = E ? o : t, Z = ce(() => {
|
|
1994
|
+
const ee = /* @__PURE__ */ new Map(), Ie = [];
|
|
1995
|
+
return Se.forEach((Ae) => {
|
|
1996
|
+
if (!(!Ae.showInSidebar || (typeof Ae.disabled == "function" ? Ae.disabled() : Ae.disabled) && Ae.hideDisabledItem))
|
|
1997
|
+
if (Ae.category) {
|
|
1998
|
+
const Ee = ee.get(Ae.category) || [];
|
|
1999
|
+
Ee.push(Ae), ee.set(Ae.category, Ee);
|
|
2000
2000
|
} else
|
|
2001
|
-
Ie.push(
|
|
2002
|
-
}), { groups:
|
|
2003
|
-
}, [
|
|
2004
|
-
if (
|
|
2005
|
-
return p || /* @__PURE__ */ r(xA, { message:
|
|
2006
|
-
if (
|
|
2007
|
-
return
|
|
2001
|
+
Ie.push(Ae);
|
|
2002
|
+
}), { groups: ee, ungrouped: Ie };
|
|
2003
|
+
}, [Se]), ke = () => {
|
|
2004
|
+
if (d)
|
|
2005
|
+
return p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: G });
|
|
2006
|
+
if (c)
|
|
2007
|
+
return u || /* @__PURE__ */ r(
|
|
2008
2008
|
kA,
|
|
2009
2009
|
{
|
|
2010
|
-
itemCount:
|
|
2010
|
+
itemCount: C,
|
|
2011
2011
|
collapsed: E,
|
|
2012
|
-
backgroundColor:
|
|
2012
|
+
backgroundColor: G,
|
|
2013
2013
|
showGroups: !E
|
|
2014
2014
|
}
|
|
2015
2015
|
);
|
|
2016
|
-
const
|
|
2016
|
+
const ee = () => Z.ungrouped.map((Ae, re) => /* @__PURE__ */ r(
|
|
2017
2017
|
$e,
|
|
2018
2018
|
{
|
|
2019
|
-
item:
|
|
2019
|
+
item: Ae,
|
|
2020
2020
|
collapsed: E,
|
|
2021
|
-
active:
|
|
2022
|
-
onClick:
|
|
2023
|
-
textColor:
|
|
2024
|
-
iconColor:
|
|
2025
|
-
hoverColor:
|
|
2026
|
-
...
|
|
2021
|
+
active: M && y(Ae),
|
|
2022
|
+
onClick: N,
|
|
2023
|
+
textColor: x,
|
|
2024
|
+
iconColor: V,
|
|
2025
|
+
hoverColor: se,
|
|
2026
|
+
...z
|
|
2027
2027
|
},
|
|
2028
|
-
`item-${
|
|
2029
|
-
)), Ie = () => Array.from(
|
|
2028
|
+
`item-${re}`
|
|
2029
|
+
)), Ie = () => Array.from(Z.groups.entries()).map(([re, Ee], q) => /* @__PURE__ */ r(
|
|
2030
2030
|
eo,
|
|
2031
2031
|
{
|
|
2032
|
-
label:
|
|
2032
|
+
label: re,
|
|
2033
2033
|
groupId: `group-${q}`,
|
|
2034
2034
|
defaultExpanded: !0,
|
|
2035
|
-
children: Ee.map((ye,
|
|
2035
|
+
children: Ee.map((ye, $) => /* @__PURE__ */ r(
|
|
2036
2036
|
$e,
|
|
2037
2037
|
{
|
|
2038
2038
|
item: ye,
|
|
2039
2039
|
collapsed: E,
|
|
2040
|
-
active:
|
|
2041
|
-
onClick:
|
|
2042
|
-
textColor:
|
|
2043
|
-
iconColor:
|
|
2044
|
-
hoverColor:
|
|
2045
|
-
...
|
|
2040
|
+
active: M && y(ye),
|
|
2041
|
+
onClick: N,
|
|
2042
|
+
textColor: x,
|
|
2043
|
+
iconColor: V,
|
|
2044
|
+
hoverColor: se,
|
|
2045
|
+
...z
|
|
2046
2046
|
},
|
|
2047
|
-
`group-${q}-item-${
|
|
2047
|
+
`group-${q}-item-${$}`
|
|
2048
2048
|
))
|
|
2049
2049
|
},
|
|
2050
2050
|
`group-${q}`
|
|
2051
2051
|
));
|
|
2052
2052
|
return E ? /* @__PURE__ */ R(J, { gap: 4, children: [
|
|
2053
|
-
|
|
2053
|
+
Z.ungrouped.map((Ae, re) => /* @__PURE__ */ r(
|
|
2054
2054
|
$e,
|
|
2055
2055
|
{
|
|
2056
|
-
item:
|
|
2056
|
+
item: Ae,
|
|
2057
2057
|
collapsed: !0,
|
|
2058
|
-
active:
|
|
2059
|
-
onClick:
|
|
2060
|
-
textColor:
|
|
2061
|
-
iconColor:
|
|
2062
|
-
hoverColor:
|
|
2063
|
-
...
|
|
2058
|
+
active: M && y(Ae),
|
|
2059
|
+
onClick: N,
|
|
2060
|
+
textColor: x,
|
|
2061
|
+
iconColor: V,
|
|
2062
|
+
hoverColor: se,
|
|
2063
|
+
...z
|
|
2064
2064
|
},
|
|
2065
|
-
`item-${
|
|
2065
|
+
`item-${re}`
|
|
2066
2066
|
)),
|
|
2067
|
-
Array.from(
|
|
2067
|
+
Array.from(Z.groups.values()).flat().map((Ae, re) => /* @__PURE__ */ r(
|
|
2068
2068
|
$e,
|
|
2069
2069
|
{
|
|
2070
|
-
item:
|
|
2070
|
+
item: Ae,
|
|
2071
2071
|
collapsed: !0,
|
|
2072
|
-
active:
|
|
2073
|
-
onClick:
|
|
2074
|
-
textColor:
|
|
2075
|
-
iconColor:
|
|
2076
|
-
hoverColor:
|
|
2077
|
-
...
|
|
2072
|
+
active: M && y(Ae),
|
|
2073
|
+
onClick: N,
|
|
2074
|
+
textColor: x,
|
|
2075
|
+
iconColor: V,
|
|
2076
|
+
hoverColor: se,
|
|
2077
|
+
...z
|
|
2078
2078
|
},
|
|
2079
|
-
`grouped-item-${
|
|
2079
|
+
`grouped-item-${re}`
|
|
2080
2080
|
))
|
|
2081
2081
|
] }) : /* @__PURE__ */ R(J, { gap: "xs", children: [
|
|
2082
|
-
|
|
2083
|
-
|
|
2082
|
+
Z.ungrouped.length > 0 && /* @__PURE__ */ r(J, { gap: 2, children: ee() }),
|
|
2083
|
+
Z.groups.size > 0 && Z.ungrouped.length > 0 && /* @__PURE__ */ r(dA, { my: "xs" }),
|
|
2084
2084
|
Ie()
|
|
2085
2085
|
] });
|
|
2086
2086
|
};
|
|
@@ -2091,21 +2091,21 @@ function to({
|
|
|
2091
2091
|
transition: "slide-right",
|
|
2092
2092
|
duration: 200,
|
|
2093
2093
|
timingFunction: "ease",
|
|
2094
|
-
children: (
|
|
2094
|
+
children: (ee) => /* @__PURE__ */ R(
|
|
2095
2095
|
B,
|
|
2096
2096
|
{
|
|
2097
2097
|
style: {
|
|
2098
|
-
...
|
|
2099
|
-
width: fe(
|
|
2098
|
+
...ee,
|
|
2099
|
+
width: fe(j),
|
|
2100
2100
|
height: typeof e == "number" ? fe(e) : e,
|
|
2101
2101
|
minHeight: typeof e == "number" ? fe(e) : e,
|
|
2102
|
-
...
|
|
2102
|
+
...Ce,
|
|
2103
2103
|
display: "flex",
|
|
2104
2104
|
flexDirection: "column",
|
|
2105
2105
|
overflow: "hidden",
|
|
2106
2106
|
transition: "width 200ms ease",
|
|
2107
|
-
borderRight:
|
|
2108
|
-
boxShadow: U ?
|
|
2107
|
+
borderRight: F ? `1px solid ${K === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0,
|
|
2108
|
+
boxShadow: U ? v.shadows.sm : void 0
|
|
2109
2109
|
},
|
|
2110
2110
|
children: [
|
|
2111
2111
|
l && /* @__PURE__ */ r(B, { style: { flexShrink: 0 }, children: l }),
|
|
@@ -2114,16 +2114,16 @@ function to({
|
|
|
2114
2114
|
{
|
|
2115
2115
|
placeholder: s,
|
|
2116
2116
|
leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
|
|
2117
|
-
rightSection:
|
|
2117
|
+
rightSection: w ? /* @__PURE__ */ r(
|
|
2118
2118
|
_A,
|
|
2119
2119
|
{
|
|
2120
2120
|
size: 16,
|
|
2121
2121
|
style: { cursor: "pointer" },
|
|
2122
|
-
onClick:
|
|
2122
|
+
onClick: k
|
|
2123
2123
|
}
|
|
2124
2124
|
) : null,
|
|
2125
2125
|
value: be,
|
|
2126
|
-
onChange: (Ie) =>
|
|
2126
|
+
onChange: (Ie) => we(Ie.currentTarget.value),
|
|
2127
2127
|
size: "sm"
|
|
2128
2128
|
}
|
|
2129
2129
|
) }),
|
|
@@ -2134,19 +2134,19 @@ function to({
|
|
|
2134
2134
|
scrollbarSize: 6,
|
|
2135
2135
|
type: "hover",
|
|
2136
2136
|
offsetScrollbars: !0,
|
|
2137
|
-
children: /* @__PURE__ */ r(B, { p: "xs", children:
|
|
2137
|
+
children: /* @__PURE__ */ r(B, { p: "xs", children: ke() })
|
|
2138
2138
|
}
|
|
2139
2139
|
),
|
|
2140
|
-
|
|
2140
|
+
i && /* @__PURE__ */ r(
|
|
2141
2141
|
B,
|
|
2142
2142
|
{
|
|
2143
2143
|
style: {
|
|
2144
2144
|
flexShrink: 0,
|
|
2145
|
-
height:
|
|
2146
|
-
backgroundColor:
|
|
2147
|
-
borderTop:
|
|
2145
|
+
height: h,
|
|
2146
|
+
backgroundColor: le,
|
|
2147
|
+
borderTop: F ? `1px solid ${K === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0
|
|
2148
2148
|
},
|
|
2149
|
-
children:
|
|
2149
|
+
children: i
|
|
2150
2150
|
}
|
|
2151
2151
|
)
|
|
2152
2152
|
]
|
|
@@ -2193,11 +2193,11 @@ function no({
|
|
|
2193
2193
|
return null;
|
|
2194
2194
|
const l = Re.t(A.label);
|
|
2195
2195
|
if (A.links && A.links.length > 0) {
|
|
2196
|
-
const
|
|
2197
|
-
const
|
|
2198
|
-
return
|
|
2196
|
+
const i = A.links.filter((h) => {
|
|
2197
|
+
const c = typeof h.disabled == "function" ? h.disabled() : h.disabled;
|
|
2198
|
+
return h.showInSidebar && (!c || !h.hideDisabledItem);
|
|
2199
2199
|
});
|
|
2200
|
-
return
|
|
2200
|
+
return i.length === 0 ? null : /* @__PURE__ */ R(
|
|
2201
2201
|
ie,
|
|
2202
2202
|
{
|
|
2203
2203
|
position: "right-start",
|
|
@@ -2240,17 +2240,17 @@ function no({
|
|
|
2240
2240
|
] }) }) }),
|
|
2241
2241
|
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
2242
2242
|
/* @__PURE__ */ r(ie.Label, { children: l }),
|
|
2243
|
-
|
|
2244
|
-
const
|
|
2243
|
+
i.map((h, c) => {
|
|
2244
|
+
const d = typeof h.disabled == "function" ? h.disabled() : h.disabled;
|
|
2245
2245
|
return /* @__PURE__ */ r(
|
|
2246
2246
|
ie.Item,
|
|
2247
2247
|
{
|
|
2248
|
-
leftSection:
|
|
2249
|
-
disabled:
|
|
2250
|
-
onClick: () => o(
|
|
2251
|
-
children: Re.t(
|
|
2248
|
+
leftSection: h.icon,
|
|
2249
|
+
disabled: d,
|
|
2250
|
+
onClick: () => o(h),
|
|
2251
|
+
children: Re.t(h.label)
|
|
2252
2252
|
},
|
|
2253
|
-
|
|
2253
|
+
c
|
|
2254
2254
|
);
|
|
2255
2255
|
})
|
|
2256
2256
|
] })
|
|
@@ -2300,59 +2300,59 @@ function so({
|
|
|
2300
2300
|
footerHeight: s,
|
|
2301
2301
|
isLoading: a = !1,
|
|
2302
2302
|
loadingError: l,
|
|
2303
|
-
loadingComponent:
|
|
2304
|
-
errorComponent:
|
|
2305
|
-
skeletonItemCount:
|
|
2306
|
-
backgroundDarkColor:
|
|
2307
|
-
backgroundLightColor:
|
|
2303
|
+
loadingComponent: i,
|
|
2304
|
+
errorComponent: h,
|
|
2305
|
+
skeletonItemCount: c = 8,
|
|
2306
|
+
backgroundDarkColor: d,
|
|
2307
|
+
backgroundLightColor: u,
|
|
2308
2308
|
iconDarkColor: p,
|
|
2309
|
-
iconLightColor:
|
|
2310
|
-
activeColor:
|
|
2309
|
+
iconLightColor: C,
|
|
2310
|
+
activeColor: b,
|
|
2311
2311
|
withBorder: m = !0,
|
|
2312
2312
|
withShadow: g = !1,
|
|
2313
2313
|
highlightActiveItem: f = !0,
|
|
2314
|
-
onMenuItemClick:
|
|
2314
|
+
onMenuItemClick: I
|
|
2315
2315
|
}) {
|
|
2316
|
-
const
|
|
2316
|
+
const T = me(), { colorScheme: L } = de(), { toggleCollapsed: X } = vA(), F = L === "dark" ? d ?? T.colors.dark[7] : u ?? T.white, U = L === "dark" ? p ?? T.colors[T.primaryColor][4] : C ?? T.colors[T.primaryColor][6], M = b ?? T.primaryColor, { navigateToItem: O, isItemActive: D, isItemOrChildActive: Q } = wA({
|
|
2317
2317
|
navigationData: A,
|
|
2318
|
-
onMenuItemClick:
|
|
2318
|
+
onMenuItemClick: I
|
|
2319
2319
|
});
|
|
2320
2320
|
SA({
|
|
2321
2321
|
navigationData: A,
|
|
2322
|
-
navigateToItem:
|
|
2323
|
-
onToggleSidebar:
|
|
2322
|
+
navigateToItem: O,
|
|
2323
|
+
onToggleSidebar: X,
|
|
2324
2324
|
enabled: !0
|
|
2325
2325
|
});
|
|
2326
|
-
const P = A.filter((E) => !(!E.showInSidebar || (typeof E.disabled == "function" ? E.disabled() : E.disabled) && E.hideDisabledItem)),
|
|
2326
|
+
const P = A.filter((E) => !(!E.showInSidebar || (typeof E.disabled == "function" ? E.disabled() : E.disabled) && E.hideDisabledItem)), v = () => l ? h || /* @__PURE__ */ r(xA, { message: l, backgroundColor: F }) : a ? i || /* @__PURE__ */ r(
|
|
2327
2327
|
kA,
|
|
2328
2328
|
{
|
|
2329
|
-
itemCount:
|
|
2329
|
+
itemCount: c,
|
|
2330
2330
|
collapsed: !0,
|
|
2331
|
-
backgroundColor:
|
|
2331
|
+
backgroundColor: F
|
|
2332
2332
|
}
|
|
2333
2333
|
) : /* @__PURE__ */ r(J, { gap: 8, align: "center", children: P.map((E, W) => /* @__PURE__ */ r(
|
|
2334
2334
|
no,
|
|
2335
2335
|
{
|
|
2336
2336
|
item: E,
|
|
2337
|
-
active: f && (
|
|
2338
|
-
onClick:
|
|
2337
|
+
active: f && (D(E) || Q(E)),
|
|
2338
|
+
onClick: O,
|
|
2339
2339
|
iconColor: U,
|
|
2340
|
-
activeColor:
|
|
2340
|
+
activeColor: M
|
|
2341
2341
|
},
|
|
2342
2342
|
W
|
|
2343
|
-
)) }),
|
|
2343
|
+
)) }), K = L === "dark" ? T.colors.dark[5] : T.colors.gray[2];
|
|
2344
2344
|
return /* @__PURE__ */ R(
|
|
2345
2345
|
B,
|
|
2346
2346
|
{
|
|
2347
2347
|
style: {
|
|
2348
2348
|
width: fe(t),
|
|
2349
2349
|
height: fe(o),
|
|
2350
|
-
backgroundColor:
|
|
2350
|
+
backgroundColor: F,
|
|
2351
2351
|
display: "flex",
|
|
2352
2352
|
flexDirection: "column",
|
|
2353
2353
|
overflow: "hidden",
|
|
2354
|
-
boxShadow: g ?
|
|
2355
|
-
borderRight: m ? `1px solid ${
|
|
2354
|
+
boxShadow: g ? T.shadows.sm : void 0,
|
|
2355
|
+
borderRight: m ? `1px solid ${K}` : void 0
|
|
2356
2356
|
},
|
|
2357
2357
|
children: [
|
|
2358
2358
|
e && /* @__PURE__ */ r(
|
|
@@ -2362,7 +2362,7 @@ function so({
|
|
|
2362
2362
|
flexShrink: 0,
|
|
2363
2363
|
display: "flex",
|
|
2364
2364
|
justifyContent: "center",
|
|
2365
|
-
padding:
|
|
2365
|
+
padding: T.spacing.xs
|
|
2366
2366
|
},
|
|
2367
2367
|
children: e
|
|
2368
2368
|
}
|
|
@@ -2374,7 +2374,7 @@ function so({
|
|
|
2374
2374
|
style: { flex: 1 },
|
|
2375
2375
|
scrollbarSize: 4,
|
|
2376
2376
|
type: "hover",
|
|
2377
|
-
children: /* @__PURE__ */ r(B, { p: "xs", children:
|
|
2377
|
+
children: /* @__PURE__ */ r(B, { p: "xs", children: v() })
|
|
2378
2378
|
}
|
|
2379
2379
|
),
|
|
2380
2380
|
n && /* @__PURE__ */ R(Pe, { children: [
|
|
@@ -2387,7 +2387,7 @@ function so({
|
|
|
2387
2387
|
height: s,
|
|
2388
2388
|
display: "flex",
|
|
2389
2389
|
justifyContent: "center",
|
|
2390
|
-
padding:
|
|
2390
|
+
padding: T.spacing.xs
|
|
2391
2391
|
},
|
|
2392
2392
|
children: n
|
|
2393
2393
|
}
|
|
@@ -2431,59 +2431,59 @@ function ao({
|
|
|
2431
2431
|
defaultGroupIcon: s,
|
|
2432
2432
|
showGroupLabels: a = !0,
|
|
2433
2433
|
header: l,
|
|
2434
|
-
footer:
|
|
2435
|
-
footerHeight:
|
|
2436
|
-
isLoading:
|
|
2437
|
-
loadingError:
|
|
2438
|
-
loadingComponent:
|
|
2434
|
+
footer: i,
|
|
2435
|
+
footerHeight: h,
|
|
2436
|
+
isLoading: c = !1,
|
|
2437
|
+
loadingError: d,
|
|
2438
|
+
loadingComponent: u,
|
|
2439
2439
|
errorComponent: p,
|
|
2440
|
-
skeletonItemCount:
|
|
2441
|
-
skeletonGroupCount:
|
|
2440
|
+
skeletonItemCount: C = 8,
|
|
2441
|
+
skeletonGroupCount: b = 3,
|
|
2442
2442
|
backgroundDarkColor: m,
|
|
2443
2443
|
backgroundLightColor: g,
|
|
2444
2444
|
backgroundImage: f,
|
|
2445
|
-
textDarkColor:
|
|
2446
|
-
textLightColor:
|
|
2447
|
-
iconDarkColor:
|
|
2448
|
-
iconLightColor:
|
|
2449
|
-
activeColor:
|
|
2445
|
+
textDarkColor: I,
|
|
2446
|
+
textLightColor: T,
|
|
2447
|
+
iconDarkColor: L,
|
|
2448
|
+
iconLightColor: X,
|
|
2449
|
+
activeColor: F,
|
|
2450
2450
|
groupBackgroundColor: U,
|
|
2451
|
-
selectedGroupColor:
|
|
2452
|
-
groupColor:
|
|
2453
|
-
groupLabelDarkColor:
|
|
2454
|
-
groupLabelLightColor:
|
|
2451
|
+
selectedGroupColor: M,
|
|
2452
|
+
groupColor: O,
|
|
2453
|
+
groupLabelDarkColor: D,
|
|
2454
|
+
groupLabelLightColor: Q,
|
|
2455
2455
|
withBorder: P = !1,
|
|
2456
|
-
highlightActiveItem:
|
|
2457
|
-
onMenuItemClick:
|
|
2456
|
+
highlightActiveItem: v = !0,
|
|
2457
|
+
onMenuItemClick: K,
|
|
2458
2458
|
itemBorderRadius: E,
|
|
2459
2459
|
itemHorizontalGap: W,
|
|
2460
|
-
itemActiveBackground:
|
|
2460
|
+
itemActiveBackground: G
|
|
2461
2461
|
}) {
|
|
2462
|
-
const
|
|
2463
|
-
collapsed:
|
|
2464
|
-
toggleCollapsed:
|
|
2465
|
-
activeGroup:
|
|
2462
|
+
const x = me(), { colorScheme: V } = de(), {
|
|
2463
|
+
collapsed: se,
|
|
2464
|
+
toggleCollapsed: Ce,
|
|
2465
|
+
activeGroup: le,
|
|
2466
2466
|
setActiveGroup: be
|
|
2467
|
-
} = vA(),
|
|
2467
|
+
} = vA(), we = V === "dark" ? m ?? x.colors.dark[7] : g ?? x.white, Se = f ? { background: f } : { backgroundColor: we }, w = f ? "transparent" : we, k = V === "dark" ? I ?? x.colors.gray[3] : T ?? x.colors.gray[7], N = V === "dark" ? L ?? x.colors[x.primaryColor][4] : X ?? x.colors[x.primaryColor][6], y = F ? x.colors[F]?.[6] ?? x.colors[x.primaryColor][6] : x.colors[x.primaryColor][6], H = U || (V === "dark" ? x.colors[x.primaryColor][6] : x.colors[x.primaryColor][7]), Y = M || (V === "dark" ? x.colors[x.primaryColor][8] : x.colors[x.primaryColor][0]), { navigateToItem: z, isItemActive: j } = wA({
|
|
2468
2468
|
navigationData: A,
|
|
2469
|
-
onMenuItemClick:
|
|
2470
|
-
}),
|
|
2471
|
-
(
|
|
2472
|
-
[
|
|
2473
|
-
),
|
|
2469
|
+
onMenuItemClick: K
|
|
2470
|
+
}), Z = S(
|
|
2471
|
+
($) => !!v && j($),
|
|
2472
|
+
[v, j]
|
|
2473
|
+
), ke = {
|
|
2474
2474
|
itemBorderRadius: E,
|
|
2475
2475
|
itemHorizontalGap: W,
|
|
2476
|
-
activeBackground:
|
|
2477
|
-
isActive:
|
|
2476
|
+
activeBackground: G,
|
|
2477
|
+
isActive: Z
|
|
2478
2478
|
};
|
|
2479
2479
|
SA({
|
|
2480
2480
|
navigationData: A,
|
|
2481
|
-
navigateToItem:
|
|
2482
|
-
onToggleSidebar:
|
|
2481
|
+
navigateToItem: z,
|
|
2482
|
+
onToggleSidebar: Ce,
|
|
2483
2483
|
enabled: !0
|
|
2484
2484
|
});
|
|
2485
|
-
const
|
|
2486
|
-
const
|
|
2485
|
+
const ee = ce(() => {
|
|
2486
|
+
const $ = /* @__PURE__ */ new Map();
|
|
2487
2487
|
return A.forEach((ue) => {
|
|
2488
2488
|
if (!ue.showInSidebar || (typeof ue.disabled == "function" ? ue.disabled() : ue.disabled) && ue.hideDisabledItem)
|
|
2489
2489
|
return;
|
|
@@ -2493,26 +2493,26 @@ function ao({
|
|
|
2493
2493
|
name: "Default",
|
|
2494
2494
|
hint: "Default",
|
|
2495
2495
|
indexOrder: 0
|
|
2496
|
-
}, Ve =
|
|
2497
|
-
Ve ? Ve.items.push(ue) :
|
|
2496
|
+
}, Ve = $.get(Fe.name);
|
|
2497
|
+
Ve ? Ve.items.push(ue) : $.set(Fe.name, {
|
|
2498
2498
|
group: Fe,
|
|
2499
2499
|
items: [ue]
|
|
2500
2500
|
});
|
|
2501
|
-
}), Array.from(
|
|
2501
|
+
}), Array.from($.values()).sort((ue, Qe) => ue.group.indexOrder - Qe.group.indexOrder);
|
|
2502
2502
|
}, [A, s]);
|
|
2503
|
-
|
|
2504
|
-
!
|
|
2505
|
-
}, [
|
|
2506
|
-
const Ie = ce(() =>
|
|
2507
|
-
|
|
2508
|
-
}, [
|
|
2503
|
+
oe(() => {
|
|
2504
|
+
!le && ee.length > 0 && be(ee[0].group.name);
|
|
2505
|
+
}, [le, ee, be]);
|
|
2506
|
+
const Ie = ce(() => ee.find((ue) => ue.group.name === le)?.items ?? [], [ee, le]), Ae = S(($) => {
|
|
2507
|
+
se ? (Ce(), be($)) : le === $ ? Ce() : be($);
|
|
2508
|
+
}, [se, le, Ce, be]), re = se ? 0 : Number(fe(t)) - Number(fe(n)), Ee = () => c && ee.length === 0 ? /* @__PURE__ */ r(
|
|
2509
2509
|
ro,
|
|
2510
2510
|
{
|
|
2511
|
-
groupCount:
|
|
2511
|
+
groupCount: b,
|
|
2512
2512
|
width: n,
|
|
2513
|
-
backgroundColor:
|
|
2513
|
+
backgroundColor: H
|
|
2514
2514
|
}
|
|
2515
|
-
) :
|
|
2515
|
+
) : ee.length <= 1 ? null : /* @__PURE__ */ r(
|
|
2516
2516
|
J,
|
|
2517
2517
|
{
|
|
2518
2518
|
gap: 4,
|
|
@@ -2521,45 +2521,45 @@ function ao({
|
|
|
2521
2521
|
style: {
|
|
2522
2522
|
width: n,
|
|
2523
2523
|
height: "100%",
|
|
2524
|
-
backgroundColor:
|
|
2524
|
+
backgroundColor: H,
|
|
2525
2525
|
flexShrink: 0
|
|
2526
2526
|
},
|
|
2527
|
-
children:
|
|
2527
|
+
children: ee.map(($) => /* @__PURE__ */ r(
|
|
2528
2528
|
Ao,
|
|
2529
2529
|
{
|
|
2530
|
-
group:
|
|
2531
|
-
active:
|
|
2532
|
-
onClick: () =>
|
|
2530
|
+
group: $.group,
|
|
2531
|
+
active: $.group.name === le,
|
|
2532
|
+
onClick: () => Ae($.group.name),
|
|
2533
2533
|
showLabel: a,
|
|
2534
|
-
activeColor:
|
|
2535
|
-
inactiveColor:
|
|
2534
|
+
activeColor: Y,
|
|
2535
|
+
inactiveColor: O
|
|
2536
2536
|
},
|
|
2537
|
-
|
|
2537
|
+
$.group.name
|
|
2538
2538
|
))
|
|
2539
2539
|
}
|
|
2540
|
-
), q = () =>
|
|
2540
|
+
), q = () => d ? p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: we }) : c ? u || /* @__PURE__ */ r(
|
|
2541
2541
|
kA,
|
|
2542
2542
|
{
|
|
2543
|
-
itemCount:
|
|
2543
|
+
itemCount: C,
|
|
2544
2544
|
collapsed: !1,
|
|
2545
|
-
backgroundColor:
|
|
2545
|
+
backgroundColor: we,
|
|
2546
2546
|
showGroups: !1
|
|
2547
2547
|
}
|
|
2548
|
-
) : /* @__PURE__ */ r(J, { gap: 2, children: Ie.map((
|
|
2548
|
+
) : /* @__PURE__ */ r(J, { gap: 2, children: Ie.map(($, ue) => /* @__PURE__ */ r(
|
|
2549
2549
|
$e,
|
|
2550
2550
|
{
|
|
2551
|
-
item:
|
|
2551
|
+
item: $,
|
|
2552
2552
|
collapsed: !1,
|
|
2553
|
-
active:
|
|
2554
|
-
onClick:
|
|
2555
|
-
textColor:
|
|
2556
|
-
iconColor:
|
|
2557
|
-
hoverColor:
|
|
2558
|
-
...
|
|
2553
|
+
active: v && j($),
|
|
2554
|
+
onClick: z,
|
|
2555
|
+
textColor: k,
|
|
2556
|
+
iconColor: N,
|
|
2557
|
+
hoverColor: y,
|
|
2558
|
+
...ke
|
|
2559
2559
|
},
|
|
2560
2560
|
ue
|
|
2561
|
-
)) }), ye =
|
|
2562
|
-
return
|
|
2561
|
+
)) }), ye = V === "dark" ? x.colors.dark[5] : x.colors.gray[2];
|
|
2562
|
+
return ee.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: se ? o : t, h: "100%", style: Se, children: [
|
|
2563
2563
|
l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2564
2564
|
/* @__PURE__ */ r(
|
|
2565
2565
|
B,
|
|
@@ -2567,30 +2567,30 @@ function ao({
|
|
|
2567
2567
|
style: {
|
|
2568
2568
|
flex: 1,
|
|
2569
2569
|
width: "100%",
|
|
2570
|
-
backgroundColor:
|
|
2570
|
+
backgroundColor: w,
|
|
2571
2571
|
display: "flex",
|
|
2572
2572
|
flexDirection: "column",
|
|
2573
2573
|
overflow: "hidden",
|
|
2574
2574
|
borderRight: P ? `1px solid ${ye}` : void 0
|
|
2575
2575
|
},
|
|
2576
|
-
children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children:
|
|
2576
|
+
children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: se ? /* @__PURE__ */ r(J, { gap: 8, align: "center", children: A.filter(($) => $.showInSidebar ? !((typeof $.disabled == "function" ? $.disabled() : $.disabled) && $.hideDisabledItem) : !1).map(($, ue) => /* @__PURE__ */ r(
|
|
2577
2577
|
$e,
|
|
2578
2578
|
{
|
|
2579
|
-
item:
|
|
2579
|
+
item: $,
|
|
2580
2580
|
collapsed: !0,
|
|
2581
|
-
active:
|
|
2582
|
-
onClick:
|
|
2583
|
-
textColor:
|
|
2584
|
-
iconColor:
|
|
2585
|
-
hoverColor:
|
|
2586
|
-
...
|
|
2581
|
+
active: v && j($),
|
|
2582
|
+
onClick: z,
|
|
2583
|
+
textColor: k,
|
|
2584
|
+
iconColor: N,
|
|
2585
|
+
hoverColor: y,
|
|
2586
|
+
...ke
|
|
2587
2587
|
},
|
|
2588
2588
|
ue
|
|
2589
2589
|
)) }) : q() }) })
|
|
2590
2590
|
}
|
|
2591
2591
|
),
|
|
2592
|
-
|
|
2593
|
-
] }) : /* @__PURE__ */ R(Ye, { direction: "column", w:
|
|
2592
|
+
i && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: w, flexShrink: 0 }, children: i })
|
|
2593
|
+
] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: se ? n : t, h: "100%", style: Se, children: [
|
|
2594
2594
|
l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2595
2595
|
/* @__PURE__ */ R(
|
|
2596
2596
|
B,
|
|
@@ -2608,20 +2608,20 @@ function ao({
|
|
|
2608
2608
|
B,
|
|
2609
2609
|
{
|
|
2610
2610
|
style: {
|
|
2611
|
-
width:
|
|
2611
|
+
width: se ? 0 : re,
|
|
2612
2612
|
height: "100%",
|
|
2613
|
-
backgroundColor:
|
|
2613
|
+
backgroundColor: w,
|
|
2614
2614
|
overflow: "hidden",
|
|
2615
2615
|
transition: "width 200ms ease",
|
|
2616
|
-
borderLeft:
|
|
2616
|
+
borderLeft: ee.length > 1 ? `1px solid ${V === "dark" ? x.colors.dark[5] : x.colors.gray[2]}` : void 0
|
|
2617
2617
|
},
|
|
2618
|
-
children: !
|
|
2618
|
+
children: !se && le && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: q() }) })
|
|
2619
2619
|
}
|
|
2620
2620
|
)
|
|
2621
2621
|
]
|
|
2622
2622
|
}
|
|
2623
2623
|
),
|
|
2624
|
-
|
|
2624
|
+
i && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: w, flexShrink: 0 }, children: i })
|
|
2625
2625
|
] });
|
|
2626
2626
|
}
|
|
2627
2627
|
function io(A) {
|
|
@@ -2633,9 +2633,9 @@ function io(A) {
|
|
|
2633
2633
|
activeGroup: s,
|
|
2634
2634
|
defaultActiveGroup: a,
|
|
2635
2635
|
onActiveGroupChange: l,
|
|
2636
|
-
showKeyboardShortcuts:
|
|
2637
|
-
highlightActiveItem:
|
|
2638
|
-
onMenuItemClick:
|
|
2636
|
+
showKeyboardShortcuts: i,
|
|
2637
|
+
highlightActiveItem: h,
|
|
2638
|
+
onMenuItemClick: c
|
|
2639
2639
|
} = A;
|
|
2640
2640
|
return /* @__PURE__ */ r(
|
|
2641
2641
|
CA,
|
|
@@ -2648,9 +2648,9 @@ function io(A) {
|
|
|
2648
2648
|
activeGroup: s,
|
|
2649
2649
|
defaultActiveGroup: a,
|
|
2650
2650
|
onActiveGroupChange: l,
|
|
2651
|
-
showKeyboardShortcuts:
|
|
2652
|
-
highlightActiveItem:
|
|
2653
|
-
onMenuItemClick:
|
|
2651
|
+
showKeyboardShortcuts: i,
|
|
2652
|
+
highlightActiveItem: h,
|
|
2653
|
+
onMenuItemClick: c,
|
|
2654
2654
|
children: /* @__PURE__ */ r(ao, { ...A })
|
|
2655
2655
|
}
|
|
2656
2656
|
);
|
|
@@ -2700,8 +2700,8 @@ function lA(A) {
|
|
|
2700
2700
|
}
|
|
2701
2701
|
var ir = Ne({ active: !1, refresh: () => {
|
|
2702
2702
|
}, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), uo = BA(function(A) {
|
|
2703
|
-
let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A,
|
|
2704
|
-
return r(ir.Provider, { value:
|
|
2703
|
+
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
|
+
return r(ir.Provider, { value: i, children: t });
|
|
2705
2705
|
}), ho = uo, cr = GA.Activity, fo = cr ?? GA.Fragment, po = !!cr, dr = "keepalive-cache-div";
|
|
2706
2706
|
function ur(A) {
|
|
2707
2707
|
return A ? Array.from(A.children) : [];
|
|
@@ -2725,37 +2725,37 @@ function go(A, t, o) {
|
|
|
2725
2725
|
return o ? QA(o, A) : t ? !QA(t, A) : !0;
|
|
2726
2726
|
}
|
|
2727
2727
|
var bo = BA(function(A) {
|
|
2728
|
-
let { errorElement: t = UA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active:
|
|
2729
|
-
|
|
2728
|
+
let { errorElement: t = UA, 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: C } = A, b = _(!1);
|
|
2729
|
+
b.current = b.current || i;
|
|
2730
2730
|
let m = ce(() => {
|
|
2731
2731
|
let g = document.createElement("div");
|
|
2732
|
-
return ar(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count",
|
|
2733
|
-
}, [
|
|
2734
|
-
return
|
|
2735
|
-
let g = go(n, s, a), f =
|
|
2732
|
+
return ar(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", h.toString()), g.className = dr + (o ? ` ${o}` : ""), g;
|
|
2733
|
+
}, [h, o]);
|
|
2734
|
+
return oe(() => {
|
|
2735
|
+
let g = go(n, s, a), f = C.current;
|
|
2736
2736
|
if (!f) {
|
|
2737
2737
|
console.warn("keepalive: cache container not found");
|
|
2738
2738
|
return;
|
|
2739
2739
|
}
|
|
2740
|
-
if (
|
|
2740
|
+
if (d)
|
|
2741
2741
|
(async () => {
|
|
2742
|
-
if (
|
|
2743
|
-
let
|
|
2744
|
-
if (await $A(p - 40), fA(
|
|
2742
|
+
if (i) {
|
|
2743
|
+
let I = FA(f, n);
|
|
2744
|
+
if (await $A(p - 40), fA(I), f.contains(m))
|
|
2745
2745
|
return;
|
|
2746
2746
|
KA(f, m);
|
|
2747
2747
|
} else
|
|
2748
|
-
g || (await $A(p),
|
|
2748
|
+
g || (await $A(p), c(n));
|
|
2749
2749
|
})();
|
|
2750
|
-
else if (
|
|
2751
|
-
let
|
|
2752
|
-
let
|
|
2753
|
-
fA(
|
|
2750
|
+
else if (i) {
|
|
2751
|
+
let I = () => {
|
|
2752
|
+
let T = FA(f, n);
|
|
2753
|
+
fA(T), !f.contains(m) && KA(f, m);
|
|
2754
2754
|
};
|
|
2755
|
-
|
|
2755
|
+
u && document.startViewTransition ? document.startViewTransition(I) : I();
|
|
2756
2756
|
} else
|
|
2757
|
-
g ||
|
|
2758
|
-
}, [
|
|
2757
|
+
g || c(n);
|
|
2758
|
+
}, [i, C, n, s, a]), b.current ? Rt(r(t, { children: po && l ? R(fo, { mode: i ? "visible" : "hidden", children: [" ", e] }) : e }), m, n) : null;
|
|
2759
2759
|
}, (A, t) => A.active === t.active && A.renderCount === t.renderCount && A.children === t.children && A.exclude === t.exclude && A.include === t.include), mo = bo, yo = (A) => {
|
|
2760
2760
|
typeof nA < "u" && We(nA) ? nA(A) : A();
|
|
2761
2761
|
}, vo = yo;
|
|
@@ -2763,62 +2763,62 @@ function hr() {
|
|
|
2763
2763
|
return _(null);
|
|
2764
2764
|
}
|
|
2765
2765
|
function Co(A) {
|
|
2766
|
-
let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName:
|
|
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: C, maxAliveTime: b = 0, enableActivity: m = !1 } = A, g = a || _(null), [f, I] = ge([]);
|
|
2767
2767
|
kr(() => {
|
|
2768
2768
|
IA(t) || vo(() => {
|
|
2769
|
-
|
|
2770
|
-
let
|
|
2771
|
-
if (
|
|
2772
|
-
return
|
|
2773
|
-
if (
|
|
2774
|
-
let
|
|
2775
|
-
if (We(s) && s(t),
|
|
2776
|
-
let P =
|
|
2777
|
-
if (hA(
|
|
2778
|
-
let
|
|
2779
|
-
|
|
2769
|
+
I((M) => {
|
|
2770
|
+
let O = Date.now();
|
|
2771
|
+
if (M.find((D) => D.cacheKey === t))
|
|
2772
|
+
return M.map((D) => {
|
|
2773
|
+
if (D.cacheKey === t) {
|
|
2774
|
+
let Q = !1;
|
|
2775
|
+
if (We(s) && s(t), b) {
|
|
2776
|
+
let P = D.lastActiveTime;
|
|
2777
|
+
if (hA(b)) {
|
|
2778
|
+
let v = b.find((K) => lr(K.match) ? K.match.test(t) : K.match === t);
|
|
2779
|
+
v && (Q = v && P + v.expire * 1e3 < O);
|
|
2780
2780
|
} else
|
|
2781
|
-
|
|
2781
|
+
Q = P + b * 1e3 < O;
|
|
2782
2782
|
}
|
|
2783
|
-
return { ...
|
|
2783
|
+
return { ...D, ele: p, lastActiveTime: O, renderCount: Q ? D.renderCount + 1 : D.renderCount };
|
|
2784
2784
|
}
|
|
2785
|
-
return
|
|
2785
|
+
return D;
|
|
2786
2786
|
});
|
|
2787
|
-
if (We(s) && s(t),
|
|
2788
|
-
let
|
|
2789
|
-
|
|
2787
|
+
if (We(s) && s(t), M.length > o) {
|
|
2788
|
+
let D = M.reduce((Q, P) => Q.lastActiveTime < P.lastActiveTime ? Q : P);
|
|
2789
|
+
M.splice(M.indexOf(D), 1);
|
|
2790
2790
|
}
|
|
2791
|
-
return [...
|
|
2791
|
+
return [...M, { cacheKey: t, lastActiveTime: O, ele: p, renderCount: 0 }];
|
|
2792
2792
|
});
|
|
2793
2793
|
});
|
|
2794
2794
|
}, [t, p]);
|
|
2795
|
-
let
|
|
2796
|
-
|
|
2797
|
-
let
|
|
2798
|
-
return
|
|
2795
|
+
let T = S((M) => {
|
|
2796
|
+
I((O) => {
|
|
2797
|
+
let D = M || t;
|
|
2798
|
+
return O.map((Q) => Q.cacheKey === D ? { ...Q, renderCount: Q.renderCount + 1 } : Q);
|
|
2799
2799
|
});
|
|
2800
|
-
}, [
|
|
2801
|
-
let
|
|
2802
|
-
return new Promise((
|
|
2800
|
+
}, [I, t]), L = S((M) => {
|
|
2801
|
+
let O = M || t, D = hA(O) ? O : [O];
|
|
2802
|
+
return new Promise((Q) => {
|
|
2803
2803
|
lA(() => {
|
|
2804
|
-
|
|
2804
|
+
I((P) => [...P.filter((v) => !D.includes(v.cacheKey))]), Q();
|
|
2805
2805
|
});
|
|
2806
2806
|
});
|
|
2807
|
-
}, [
|
|
2807
|
+
}, [I, t]), X = S(() => new Promise((M) => {
|
|
2808
2808
|
lA(() => {
|
|
2809
|
-
|
|
2809
|
+
I([]), M();
|
|
2810
2810
|
});
|
|
2811
|
-
}), [
|
|
2812
|
-
let
|
|
2813
|
-
return new Promise((
|
|
2811
|
+
}), [I]), F = S((M) => {
|
|
2812
|
+
let O = M || t;
|
|
2813
|
+
return new Promise((D) => {
|
|
2814
2814
|
lA(() => {
|
|
2815
|
-
|
|
2815
|
+
I((Q) => [...Q.filter((P) => P.cacheKey === O)]), D();
|
|
2816
2816
|
});
|
|
2817
2817
|
});
|
|
2818
|
-
}, [t,
|
|
2819
|
-
return xr(
|
|
2820
|
-
let { cacheKey:
|
|
2821
|
-
return r(ho, { active: t ===
|
|
2818
|
+
}, [t, I]), U = S(() => f, [f]);
|
|
2819
|
+
return xr(C, () => ({ refresh: T, destroy: L, destroyAll: X, destroyOther: F, getCacheNodes: U })), R(UA, { children: [r("div", { ref: g, className: i, style: { height: "100%" } }), f.map((M) => {
|
|
2820
|
+
let { cacheKey: O, ele: D, renderCount: Q } = M;
|
|
2821
|
+
return r(ho, { active: t === O, refresh: T, destroy: L, destroyAll: X, destroyOther: F, getCacheNodes: U, children: r(mo, { destroy: L, include: n, exclude: e, transition: c, viewTransition: d, duration: u, renderCount: Q, containerDivRef: g, errorElement: h, active: t === O, cacheNodeClassName: l, cacheKey: O, enableActivity: m, children: D }) }, `${O}-${Q}`);
|
|
2822
2822
|
})] });
|
|
2823
2823
|
}
|
|
2824
2824
|
var wo = Co, So = () => ve(ir), fr = So;
|
|
@@ -2838,7 +2838,7 @@ function ko(A, t, o = !1, e) {
|
|
|
2838
2838
|
}, [n, ...t]);
|
|
2839
2839
|
}
|
|
2840
2840
|
var xo = ko, Io = (A, t, o = !1) => {
|
|
2841
|
-
xo(A, t, o,
|
|
2841
|
+
xo(A, t, o, oe);
|
|
2842
2842
|
}, To = Io;
|
|
2843
2843
|
const pr = Ne({
|
|
2844
2844
|
isVisible: !0,
|
|
@@ -2872,28 +2872,28 @@ const pr = Ne({
|
|
|
2872
2872
|
}, gr = Ne(null), eA = (A) => null, Po = (A) => A.includes(":"), Lo = (A, t) => Po(A) ? t : A, Mo = ({ children: A }) => {
|
|
2873
2873
|
const { active: t } = fr(), o = Ar(), e = Xe(), n = vt(), s = _(o), [a, l] = ge(o);
|
|
2874
2874
|
s.current = o;
|
|
2875
|
-
const
|
|
2876
|
-
t && (
|
|
2877
|
-
const
|
|
2878
|
-
() => t ? { location: e, navigationType: n } :
|
|
2875
|
+
const i = _({ location: e, navigationType: n });
|
|
2876
|
+
t && (i.current = { location: e, navigationType: n });
|
|
2877
|
+
const h = ce(
|
|
2878
|
+
() => t ? { location: e, navigationType: n } : i.current,
|
|
2879
2879
|
[t, e, n]
|
|
2880
|
-
), [
|
|
2880
|
+
), [c, d] = ge(0), u = _(t);
|
|
2881
2881
|
To(() => {
|
|
2882
2882
|
l(s.current), requestAnimationFrame(() => {
|
|
2883
2883
|
window.dispatchEvent(new Event("resize"));
|
|
2884
2884
|
});
|
|
2885
|
-
}, []),
|
|
2886
|
-
t && (l(s.current),
|
|
2885
|
+
}, []), oe(() => {
|
|
2886
|
+
t && (l(s.current), u.current || d((C) => C + 1)), u.current = t;
|
|
2887
2887
|
}, [t]);
|
|
2888
2888
|
const p = ce(
|
|
2889
|
-
() => ({ isVisible: t, wasRestored:
|
|
2890
|
-
[t,
|
|
2889
|
+
() => ({ isVisible: t, wasRestored: c > 0, restoreCount: c }),
|
|
2890
|
+
[t, c]
|
|
2891
2891
|
);
|
|
2892
|
-
return /* @__PURE__ */ r(Ct.Provider, { value:
|
|
2893
|
-
}, Do = "__nokeep__:", br =
|
|
2892
|
+
return /* @__PURE__ */ r(Ct.Provider, { value: h, children: /* @__PURE__ */ r(pr.Provider, { value: p, children: /* @__PURE__ */ r(TA.Provider, { value: { params: a }, children: A }) }) });
|
|
2893
|
+
}, Do = "__nokeep__:", br = xe.memo(({ keepAlivePaths: A, maxKeepAliveTabs: t, aliveRef: o }) => {
|
|
2894
2894
|
const e = Xe(), n = mt(), s = ce(() => {
|
|
2895
2895
|
const l = A.find(
|
|
2896
|
-
(
|
|
2896
|
+
(i) => yt({ path: i, end: !0 }, e.pathname)
|
|
2897
2897
|
);
|
|
2898
2898
|
return l ? Lo(l, e.pathname) : Do + e.pathname;
|
|
2899
2899
|
}, [A, e.pathname]), a = ce(() => [/^__nokeep__:/], []);
|
|
@@ -2910,40 +2910,40 @@ const pr = Ne({
|
|
|
2910
2910
|
});
|
|
2911
2911
|
br.displayName = "KeepAliveLayout";
|
|
2912
2912
|
const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
2913
|
-
const e = hr(), s = ve(gr) || e, a = _(null), l = _(""), { keepAlivePaths:
|
|
2914
|
-
const p =
|
|
2915
|
-
if (
|
|
2916
|
-
const
|
|
2917
|
-
return `${
|
|
2913
|
+
const e = hr(), s = ve(gr) || e, a = _(null), l = _(""), { keepAlivePaths: i, routeElements: h } = ce(() => {
|
|
2914
|
+
const p = xe.Children.toArray(A), C = p.map((f) => {
|
|
2915
|
+
if (xe.isValidElement(f)) {
|
|
2916
|
+
const I = f.props?.path || "", T = f.type === eA;
|
|
2917
|
+
return `${I}:${T}`;
|
|
2918
2918
|
}
|
|
2919
2919
|
return "";
|
|
2920
2920
|
}).join("|");
|
|
2921
|
-
if (a.current && l.current ===
|
|
2921
|
+
if (a.current && l.current === C)
|
|
2922
2922
|
return a.current;
|
|
2923
|
-
l.current =
|
|
2924
|
-
const
|
|
2923
|
+
l.current = C;
|
|
2924
|
+
const b = [], m = [];
|
|
2925
2925
|
p.forEach((f) => {
|
|
2926
|
-
if (
|
|
2926
|
+
if (xe.isValidElement(f))
|
|
2927
2927
|
if (f.type === eA) {
|
|
2928
|
-
const
|
|
2929
|
-
|
|
2930
|
-
const
|
|
2928
|
+
const I = f.props;
|
|
2929
|
+
I.path && b.push(I.path);
|
|
2930
|
+
const T = I.component, L = typeof T == "function" ? xe.createElement(T) : T;
|
|
2931
2931
|
m.push(
|
|
2932
2932
|
/* @__PURE__ */ r(
|
|
2933
2933
|
Ke,
|
|
2934
2934
|
{
|
|
2935
|
-
path:
|
|
2936
|
-
element: /* @__PURE__ */ r(Mo, { children:
|
|
2935
|
+
path: I.path,
|
|
2936
|
+
element: /* @__PURE__ */ r(Mo, { children: L })
|
|
2937
2937
|
},
|
|
2938
|
-
|
|
2938
|
+
I.path || f.key
|
|
2939
2939
|
)
|
|
2940
2940
|
);
|
|
2941
2941
|
} else
|
|
2942
2942
|
m.push(f);
|
|
2943
2943
|
});
|
|
2944
|
-
const g = { keepAlivePaths:
|
|
2944
|
+
const g = { keepAlivePaths: b, routeElements: m };
|
|
2945
2945
|
return a.current = g, g;
|
|
2946
|
-
}, [A]),
|
|
2946
|
+
}, [A]), c = ve(Ze), d = ce(() => ({
|
|
2947
2947
|
requestUnregister: (p) => {
|
|
2948
2948
|
s.current?.destroy(p);
|
|
2949
2949
|
},
|
|
@@ -2957,15 +2957,15 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2957
2957
|
s.current?.destroyOther(p);
|
|
2958
2958
|
},
|
|
2959
2959
|
getCacheNodes: () => s.current?.getCacheNodes() || []
|
|
2960
|
-
}), [s]),
|
|
2960
|
+
}), [s]), u = /* @__PURE__ */ r(er, { ...o, children: /* @__PURE__ */ r(Ke, { element: /* @__PURE__ */ r(
|
|
2961
2961
|
br,
|
|
2962
2962
|
{
|
|
2963
|
-
keepAlivePaths:
|
|
2963
|
+
keepAlivePaths: i,
|
|
2964
2964
|
maxKeepAliveTabs: t,
|
|
2965
2965
|
aliveRef: s
|
|
2966
2966
|
}
|
|
2967
|
-
), children:
|
|
2968
|
-
return
|
|
2967
|
+
), children: h }) });
|
|
2968
|
+
return c ? u : /* @__PURE__ */ r(Ze.Provider, { value: d, children: u });
|
|
2969
2969
|
}, mr = Ne({
|
|
2970
2970
|
start: () => {
|
|
2971
2971
|
},
|
|
@@ -2974,13 +2974,13 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2974
2974
|
isNavigating: !1
|
|
2975
2975
|
}), yr = () => ve(mr), zo = 150;
|
|
2976
2976
|
function Oo({ children: A }) {
|
|
2977
|
-
const [t, o] = ge(!1), e = _(null), n = _(0), s =
|
|
2977
|
+
const [t, o] = ge(!1), e = _(null), n = _(0), s = S(() => {
|
|
2978
2978
|
e.current && clearTimeout(e.current), n.current = Date.now(), o(!0);
|
|
2979
|
-
}, []), a =
|
|
2980
|
-
const l = Date.now() - n.current,
|
|
2979
|
+
}, []), a = S(() => {
|
|
2980
|
+
const l = Date.now() - n.current, i = Math.max(0, zo - l);
|
|
2981
2981
|
e.current = setTimeout(() => {
|
|
2982
2982
|
o(!1);
|
|
2983
|
-
},
|
|
2983
|
+
}, i);
|
|
2984
2984
|
}, []);
|
|
2985
2985
|
return /* @__PURE__ */ R(mr.Provider, { value: { start: s, done: a, isNavigating: t }, children: [
|
|
2986
2986
|
/* @__PURE__ */ r("div", { className: "archbase-nav-progress", "data-active": t, children: /* @__PURE__ */ r("div", { className: "archbase-nav-progress-bar" }) }),
|
|
@@ -3020,59 +3020,59 @@ function Qo({
|
|
|
3020
3020
|
sideBarHiddenBreakPoint: s,
|
|
3021
3021
|
sideBarFooterHeight: a,
|
|
3022
3022
|
sideBarFooterContent: l,
|
|
3023
|
-
onCollapsedSideBar:
|
|
3024
|
-
onHiddenSidebar:
|
|
3025
|
-
sidebarSelectedGroupName:
|
|
3026
|
-
sidebarDefaultGroupIcon:
|
|
3027
|
-
sideBarHeaderHeight:
|
|
3023
|
+
onCollapsedSideBar: i,
|
|
3024
|
+
onHiddenSidebar: h,
|
|
3025
|
+
sidebarSelectedGroupName: c,
|
|
3026
|
+
sidebarDefaultGroupIcon: d,
|
|
3027
|
+
sideBarHeaderHeight: u,
|
|
3028
3028
|
sideBarHeaderContent: p,
|
|
3029
|
-
selectedGroupColor:
|
|
3030
|
-
groupColor:
|
|
3029
|
+
selectedGroupColor: C = "#132441",
|
|
3030
|
+
groupColor: b = "white",
|
|
3031
3031
|
backgroundGroupColor: m = "#132441",
|
|
3032
3032
|
groupLabelDarkColor: g = "white",
|
|
3033
3033
|
groupLabelLightColor: f = "white",
|
|
3034
|
-
headerColor:
|
|
3035
|
-
footerHeight:
|
|
3036
|
-
iconsWithBackground:
|
|
3037
|
-
menuItemHeight:
|
|
3038
|
-
showSideBar:
|
|
3034
|
+
headerColor: I,
|
|
3035
|
+
footerHeight: T,
|
|
3036
|
+
iconsWithBackground: L,
|
|
3037
|
+
menuItemHeight: X,
|
|
3038
|
+
showSideBar: F = !0,
|
|
3039
3039
|
showHeader: U = !0,
|
|
3040
|
-
headerStyle:
|
|
3041
|
-
highlightActiveMenuItem:
|
|
3042
|
-
customRenderSidebar:
|
|
3043
|
-
showCollapsedButton:
|
|
3040
|
+
headerStyle: M = {},
|
|
3041
|
+
highlightActiveMenuItem: O = !0,
|
|
3042
|
+
customRenderSidebar: D,
|
|
3043
|
+
showCollapsedButton: Q = !0,
|
|
3044
3044
|
sideBarBackgroundDarkColor: P,
|
|
3045
|
-
sideBarBackgroundLightColor:
|
|
3046
|
-
sideBarTextDarkColor:
|
|
3045
|
+
sideBarBackgroundLightColor: v,
|
|
3046
|
+
sideBarTextDarkColor: K,
|
|
3047
3047
|
sideBarTextLightColor: E,
|
|
3048
3048
|
sideBarIconDarkColor: W,
|
|
3049
|
-
sideBarIconLightColor:
|
|
3050
|
-
sideBarBackgroundImage:
|
|
3051
|
-
mainBackground:
|
|
3052
|
-
sideBarItemBorderRadius:
|
|
3053
|
-
sideBarItemHorizontalGap:
|
|
3054
|
-
sideBarItemActiveBackground:
|
|
3049
|
+
sideBarIconLightColor: G,
|
|
3050
|
+
sideBarBackgroundImage: x,
|
|
3051
|
+
mainBackground: V,
|
|
3052
|
+
sideBarItemBorderRadius: se,
|
|
3053
|
+
sideBarItemHorizontalGap: Ce,
|
|
3054
|
+
sideBarItemActiveBackground: le,
|
|
3055
3055
|
sideBarCollapsedSubmenuWidth: be,
|
|
3056
|
-
sidebarActiveColor:
|
|
3057
|
-
maxKeepAliveTabs:
|
|
3058
|
-
sidebarVariant:
|
|
3059
|
-
sidebarShowSearch:
|
|
3056
|
+
sidebarActiveColor: we,
|
|
3057
|
+
maxKeepAliveTabs: Se = 10,
|
|
3058
|
+
sidebarVariant: w = "legacy",
|
|
3059
|
+
sidebarShowSearch: k = !1
|
|
3060
3060
|
}) {
|
|
3061
|
-
const
|
|
3062
|
-
`(max-width: ${s ? fe(s) :
|
|
3063
|
-
),
|
|
3064
|
-
ae.link && (ae.routeParams ?
|
|
3065
|
-
},
|
|
3066
|
-
ae == he &&
|
|
3061
|
+
const N = me(), y = ve(rA), { colorScheme: H } = de(), Y = kt(), [z, j] = xt(), Z = St(
|
|
3062
|
+
`(max-width: ${s ? fe(s) : N.breakpoints.md})`
|
|
3063
|
+
), ke = (ae) => {
|
|
3064
|
+
ae.link && (ae.routeParams ? Y(ae.link, {}, ae.routeParams) : Y(ae.link));
|
|
3065
|
+
}, ee = (ae, he) => {
|
|
3066
|
+
ae == he && y.collapsed && y.setCollapsed(!1), y.setCollapsed(ae == he);
|
|
3067
3067
|
}, Ie = () => {
|
|
3068
3068
|
let ae = 0, he = 0;
|
|
3069
|
-
return
|
|
3070
|
-
},
|
|
3069
|
+
return u && (ae = Number(fe(u))), a && (he = Number(fe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + he}px)`;
|
|
3070
|
+
}, Ae = () => {
|
|
3071
3071
|
let ae = 0, he = 0;
|
|
3072
|
-
return
|
|
3073
|
-
},
|
|
3072
|
+
return u && (ae = Number(fe(u))), a && (he = Number(fe(a))), `calc(100vh - 28px - ${ae + he}px)`;
|
|
3073
|
+
}, re = ce(() => {
|
|
3074
3074
|
const ae = [];
|
|
3075
|
-
return
|
|
3075
|
+
return y.navigationData.forEach((he, Ge) => {
|
|
3076
3076
|
he.links ? he.links.forEach((Oe, RA) => {
|
|
3077
3077
|
Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${RA}`)) : ae.push(
|
|
3078
3078
|
/* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${RA}`)
|
|
@@ -3083,103 +3083,103 @@ function Qo({
|
|
|
3083
3083
|
/* @__PURE__ */ r(eA, { path: he.link, component: he.component }, `${he.link}_${Ge}`)
|
|
3084
3084
|
);
|
|
3085
3085
|
}), ae;
|
|
3086
|
-
}, [
|
|
3087
|
-
|
|
3088
|
-
}, [
|
|
3089
|
-
|
|
3090
|
-
}, [
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
}, [
|
|
3094
|
-
|
|
3095
|
-
}, [
|
|
3096
|
-
const ye =
|
|
3086
|
+
}, [y.navigationData, y.collapsed]), Ee = S(() => {
|
|
3087
|
+
y.setCollapsed(!y.collapsed);
|
|
3088
|
+
}, [y.setCollapsed, y.collapsed]), q = S(() => {
|
|
3089
|
+
y.setHidden(!y.hidden);
|
|
3090
|
+
}, [y.setHidden, y.hidden]);
|
|
3091
|
+
oe(() => {
|
|
3092
|
+
h && h(y.hidden);
|
|
3093
|
+
}, [y.hidden, q]), oe(() => {
|
|
3094
|
+
i && i(y.collapsed);
|
|
3095
|
+
}, [y.collapsed, i]);
|
|
3096
|
+
const ye = w === "minimal" || y.collapsed ? n : e, $ = (ae, he = !1) => D ? D({ width: e, height: ae, isHidden: Z }) : w === "legacy" ? /* @__PURE__ */ r(
|
|
3097
3097
|
_t,
|
|
3098
3098
|
{
|
|
3099
|
-
navigationData:
|
|
3099
|
+
navigationData: y.navigationData,
|
|
3100
3100
|
sidebarHeight: ae,
|
|
3101
3101
|
sidebarGroupWidth: n,
|
|
3102
3102
|
sidebarCollapsedWidth: n,
|
|
3103
|
-
selectedGroupColor:
|
|
3104
|
-
groupColor:
|
|
3103
|
+
selectedGroupColor: C,
|
|
3104
|
+
groupColor: b,
|
|
3105
3105
|
backgroundGroupColor: m,
|
|
3106
3106
|
groupLabelDarkColor: g,
|
|
3107
3107
|
groupLabelLightColor: f,
|
|
3108
3108
|
showGroupLabels: !1,
|
|
3109
|
-
collapsed: he ? !1 :
|
|
3109
|
+
collapsed: he ? !1 : y.collapsed,
|
|
3110
3110
|
sidebarWidth: e,
|
|
3111
|
-
isHidden:
|
|
3112
|
-
onMenuItemClick:
|
|
3113
|
-
onClickActionIcon:
|
|
3111
|
+
isHidden: Z,
|
|
3112
|
+
onMenuItemClick: ke,
|
|
3113
|
+
onClickActionIcon: ee,
|
|
3114
3114
|
sideBarFooterHeight: a,
|
|
3115
3115
|
sideBarFooterContent: l,
|
|
3116
3116
|
sideBarHeaderContent: p,
|
|
3117
|
-
theme:
|
|
3118
|
-
sidebarRef:
|
|
3119
|
-
defaultGroupIcon:
|
|
3120
|
-
selectedGroupName:
|
|
3121
|
-
iconsWithBackground:
|
|
3122
|
-
menuItemHeight:
|
|
3123
|
-
highlightActiveMenuItem:
|
|
3117
|
+
theme: N,
|
|
3118
|
+
sidebarRef: z,
|
|
3119
|
+
defaultGroupIcon: d,
|
|
3120
|
+
selectedGroupName: c,
|
|
3121
|
+
iconsWithBackground: L,
|
|
3122
|
+
menuItemHeight: X,
|
|
3123
|
+
highlightActiveMenuItem: O,
|
|
3124
3124
|
backgroundDarkColor: P,
|
|
3125
|
-
backgroundLightColor:
|
|
3126
|
-
textDarkColor:
|
|
3125
|
+
backgroundLightColor: v,
|
|
3126
|
+
textDarkColor: K,
|
|
3127
3127
|
textLightColor: E,
|
|
3128
3128
|
iconDarkColor: W,
|
|
3129
|
-
iconLightColor:
|
|
3129
|
+
iconLightColor: G,
|
|
3130
3130
|
collapsedSubmenuWidth: be,
|
|
3131
|
-
isLoading:
|
|
3132
|
-
loadingError:
|
|
3131
|
+
isLoading: y.isLoadingPermissions,
|
|
3132
|
+
loadingError: y.permissionsError
|
|
3133
3133
|
}
|
|
3134
3134
|
) : /* @__PURE__ */ r(
|
|
3135
3135
|
co,
|
|
3136
3136
|
{
|
|
3137
|
-
navigationData:
|
|
3138
|
-
variant:
|
|
3137
|
+
navigationData: y.navigationData,
|
|
3138
|
+
variant: w,
|
|
3139
3139
|
width: ye,
|
|
3140
3140
|
collapsedWidth: n,
|
|
3141
3141
|
height: ae,
|
|
3142
3142
|
groupColumnWidth: n,
|
|
3143
|
-
collapsed: he ? !1 :
|
|
3144
|
-
onCollapsedChange: (Ge) =>
|
|
3145
|
-
activeGroup:
|
|
3143
|
+
collapsed: he ? !1 : y.collapsed,
|
|
3144
|
+
onCollapsedChange: (Ge) => y.setCollapsed(Ge),
|
|
3145
|
+
activeGroup: c,
|
|
3146
3146
|
onActiveGroupChange: (Ge) => {
|
|
3147
3147
|
},
|
|
3148
|
-
defaultGroupIcon:
|
|
3148
|
+
defaultGroupIcon: d,
|
|
3149
3149
|
showGroupLabels: !1,
|
|
3150
|
-
onMenuItemClick:
|
|
3151
|
-
showSearch:
|
|
3150
|
+
onMenuItemClick: ke,
|
|
3151
|
+
showSearch: k,
|
|
3152
3152
|
header: p,
|
|
3153
3153
|
footer: l,
|
|
3154
3154
|
footerHeight: a,
|
|
3155
|
-
isLoading:
|
|
3156
|
-
loadingError:
|
|
3157
|
-
theme:
|
|
3158
|
-
highlightActiveItem:
|
|
3155
|
+
isLoading: y.isLoadingPermissions,
|
|
3156
|
+
loadingError: y.permissionsError,
|
|
3157
|
+
theme: N,
|
|
3158
|
+
highlightActiveItem: O,
|
|
3159
3159
|
backgroundDarkColor: P,
|
|
3160
|
-
backgroundLightColor:
|
|
3161
|
-
backgroundImage:
|
|
3162
|
-
textDarkColor:
|
|
3160
|
+
backgroundLightColor: v,
|
|
3161
|
+
backgroundImage: x,
|
|
3162
|
+
textDarkColor: K,
|
|
3163
3163
|
textLightColor: E,
|
|
3164
3164
|
iconDarkColor: W,
|
|
3165
|
-
iconLightColor:
|
|
3165
|
+
iconLightColor: G,
|
|
3166
3166
|
groupBackgroundColor: m,
|
|
3167
|
-
selectedGroupColor:
|
|
3168
|
-
groupColor:
|
|
3167
|
+
selectedGroupColor: C,
|
|
3168
|
+
groupColor: b,
|
|
3169
3169
|
groupLabelDarkColor: g,
|
|
3170
3170
|
groupLabelLightColor: f,
|
|
3171
|
-
activeColor:
|
|
3172
|
-
itemBorderRadius:
|
|
3173
|
-
itemHorizontalGap:
|
|
3174
|
-
itemActiveBackground:
|
|
3171
|
+
activeColor: we,
|
|
3172
|
+
itemBorderRadius: se,
|
|
3173
|
+
itemHorizontalGap: Ce,
|
|
3174
|
+
itemActiveBackground: le,
|
|
3175
3175
|
withBorder: !1,
|
|
3176
|
-
sidebarRef:
|
|
3176
|
+
sidebarRef: z
|
|
3177
3177
|
}
|
|
3178
|
-
), ue =
|
|
3178
|
+
), ue = H === "dark" ? P ?? N.colors.dark[7] : v ?? N.white, Qe = w === "legacy", Fe = Qe ? void 0 : {
|
|
3179
3179
|
width: { base: ye },
|
|
3180
3180
|
breakpoint: "sm",
|
|
3181
|
-
collapsed: { mobile:
|
|
3182
|
-
}, Ve =
|
|
3181
|
+
collapsed: { mobile: Z || !F, desktop: Z || !F }
|
|
3182
|
+
}, Ve = V ?? (H === "dark" ? N.colors.dark[8] : N.colors.gray[0]), wr = Qe ? {
|
|
3183
3183
|
main: {
|
|
3184
3184
|
background: Ve,
|
|
3185
3185
|
overflow: "hidden"
|
|
@@ -3190,15 +3190,15 @@ function Qo({
|
|
|
3190
3190
|
overflow: "hidden"
|
|
3191
3191
|
},
|
|
3192
3192
|
navbar: {
|
|
3193
|
-
background:
|
|
3193
|
+
background: x ?? ue,
|
|
3194
3194
|
border: "none"
|
|
3195
3195
|
}
|
|
3196
3196
|
}, Sr = Qe ? {
|
|
3197
3197
|
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
|
|
3198
|
-
width: `calc(100vw - var(--app-shell-padding) - calc(${
|
|
3198
|
+
width: `calc(100vw - var(--app-shell-padding) - calc(${Z ? "0px" : ye} + 1rem))`,
|
|
3199
3199
|
marginTop: "0.5rem",
|
|
3200
|
-
marginLeft: `calc(${
|
|
3201
|
-
border: `1px solid ${
|
|
3200
|
+
marginLeft: `calc(${Z ? "0px" : ye} + 0.5rem)`,
|
|
3201
|
+
border: `1px solid ${H === "dark" ? N.colors.dark[4] : "#e4e9ef"}`,
|
|
3202
3202
|
borderRadius: "4px",
|
|
3203
3203
|
overflow: "hidden"
|
|
3204
3204
|
} : {
|
|
@@ -3207,7 +3207,7 @@ function Qo({
|
|
|
3207
3207
|
marginTop: "0.5rem",
|
|
3208
3208
|
marginLeft: "0.5rem",
|
|
3209
3209
|
marginRight: "0.5rem",
|
|
3210
|
-
border: `1px solid ${
|
|
3210
|
+
border: `1px solid ${H === "dark" ? N.colors.dark[4] : "#e4e9ef"}`,
|
|
3211
3211
|
borderRadius: "4px",
|
|
3212
3212
|
overflow: "hidden"
|
|
3213
3213
|
};
|
|
@@ -3216,49 +3216,49 @@ function Qo({
|
|
|
3216
3216
|
{
|
|
3217
3217
|
header: { height: "60px", collapsed: !U },
|
|
3218
3218
|
navbar: Fe,
|
|
3219
|
-
footer: { height:
|
|
3219
|
+
footer: { height: T || "0px" },
|
|
3220
3220
|
styles: wr,
|
|
3221
3221
|
children: [
|
|
3222
3222
|
/* @__PURE__ */ r(
|
|
3223
3223
|
Be.Header,
|
|
3224
3224
|
{
|
|
3225
3225
|
p: "xs",
|
|
3226
|
-
color:
|
|
3226
|
+
color: I,
|
|
3227
3227
|
display: "flex",
|
|
3228
3228
|
style: {
|
|
3229
3229
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
3230
3230
|
alignItems: "center",
|
|
3231
3231
|
borderBottom: "none",
|
|
3232
|
-
...
|
|
3232
|
+
...M
|
|
3233
3233
|
},
|
|
3234
3234
|
children: t
|
|
3235
3235
|
}
|
|
3236
3236
|
),
|
|
3237
|
-
!
|
|
3237
|
+
!Z && F && /* @__PURE__ */ r(Be.Navbar, { children: $(Ie(), !1) }),
|
|
3238
3238
|
/* @__PURE__ */ R(Be.Main, { children: [
|
|
3239
|
-
!
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3239
|
+
!Z && Q && $o(
|
|
3240
|
+
H,
|
|
3241
|
+
N,
|
|
3242
|
+
y,
|
|
3243
3243
|
e,
|
|
3244
3244
|
n,
|
|
3245
3245
|
Ee
|
|
3246
3246
|
),
|
|
3247
3247
|
/* @__PURE__ */ r(Ro, { children: /* @__PURE__ */ R("div", { style: Sr, children: [
|
|
3248
3248
|
A,
|
|
3249
|
-
/* @__PURE__ */ r(Ko, { maxKeepAliveTabs:
|
|
3249
|
+
/* @__PURE__ */ r(Ko, { maxKeepAliveTabs: Se, routes: re })
|
|
3250
3250
|
] }) }),
|
|
3251
|
-
|
|
3251
|
+
F && /* @__PURE__ */ r(
|
|
3252
3252
|
qA,
|
|
3253
3253
|
{
|
|
3254
|
-
opened:
|
|
3254
|
+
opened: y.hidden || !1,
|
|
3255
3255
|
onClose: q,
|
|
3256
3256
|
size: e,
|
|
3257
3257
|
padding: 0,
|
|
3258
3258
|
styles: {
|
|
3259
3259
|
header: { minHeight: "10px" }
|
|
3260
3260
|
},
|
|
3261
|
-
children:
|
|
3261
|
+
children: $(Ae(), !0)
|
|
3262
3262
|
}
|
|
3263
3263
|
)
|
|
3264
3264
|
] }),
|
|
@@ -3287,52 +3287,52 @@ function Gn({
|
|
|
3287
3287
|
footer: s,
|
|
3288
3288
|
owner: a,
|
|
3289
3289
|
company: l,
|
|
3290
|
-
sideBarWidth:
|
|
3291
|
-
sideBarCollapsedWidth:
|
|
3292
|
-
sideBarHiddenBreakPoint:
|
|
3293
|
-
sideBarFooterHeight:
|
|
3294
|
-
sideBarFooterContent:
|
|
3290
|
+
sideBarWidth: i,
|
|
3291
|
+
sideBarCollapsedWidth: h,
|
|
3292
|
+
sideBarHiddenBreakPoint: c,
|
|
3293
|
+
sideBarFooterHeight: d,
|
|
3294
|
+
sideBarFooterContent: u,
|
|
3295
3295
|
onCollapsedSideBar: p,
|
|
3296
|
-
onHiddenSidebar:
|
|
3297
|
-
sidebarDefaultGroupIcon:
|
|
3296
|
+
onHiddenSidebar: C,
|
|
3297
|
+
sidebarDefaultGroupIcon: b,
|
|
3298
3298
|
sidebarSelectedGroupName: m,
|
|
3299
3299
|
sideBarHeaderHeight: g,
|
|
3300
3300
|
sideBarHeaderContent: f,
|
|
3301
|
-
selectedGroupColor:
|
|
3302
|
-
groupColor:
|
|
3303
|
-
backgroundGroupColor:
|
|
3304
|
-
groupLabelDarkColor:
|
|
3305
|
-
groupLabelLightColor:
|
|
3301
|
+
selectedGroupColor: I = "#132441",
|
|
3302
|
+
groupColor: T = "white",
|
|
3303
|
+
backgroundGroupColor: L = "#132441",
|
|
3304
|
+
groupLabelDarkColor: X = "white",
|
|
3305
|
+
groupLabelLightColor: F = "white",
|
|
3306
3306
|
headerColor: U,
|
|
3307
|
-
footerHeight:
|
|
3308
|
-
iconsWithBackground:
|
|
3309
|
-
menuItemHeight:
|
|
3310
|
-
showSideBar:
|
|
3307
|
+
footerHeight: M,
|
|
3308
|
+
iconsWithBackground: O,
|
|
3309
|
+
menuItemHeight: D,
|
|
3310
|
+
showSideBar: Q,
|
|
3311
3311
|
showHeader: P,
|
|
3312
|
-
headerStyle:
|
|
3313
|
-
highlightActiveMenuItem:
|
|
3312
|
+
headerStyle: v,
|
|
3313
|
+
highlightActiveMenuItem: K,
|
|
3314
3314
|
enableSecurity: E = !1,
|
|
3315
3315
|
securityOptions: W,
|
|
3316
|
-
customRenderSidebar:
|
|
3317
|
-
onNavigationDataChange:
|
|
3318
|
-
showCollapsedButton:
|
|
3319
|
-
initialSidebarCollapsed:
|
|
3320
|
-
sideBarBackgroundDarkColor:
|
|
3321
|
-
sideBarBackgroundLightColor:
|
|
3316
|
+
customRenderSidebar: G,
|
|
3317
|
+
onNavigationDataChange: x,
|
|
3318
|
+
showCollapsedButton: V,
|
|
3319
|
+
initialSidebarCollapsed: se = !1,
|
|
3320
|
+
sideBarBackgroundDarkColor: Ce,
|
|
3321
|
+
sideBarBackgroundLightColor: le,
|
|
3322
3322
|
sideBarTextDarkColor: be,
|
|
3323
|
-
sideBarTextLightColor:
|
|
3324
|
-
sideBarIconDarkColor:
|
|
3325
|
-
sideBarIconLightColor:
|
|
3326
|
-
sideBarBackgroundImage:
|
|
3327
|
-
mainBackground:
|
|
3328
|
-
sideBarItemBorderRadius:
|
|
3329
|
-
sideBarItemHorizontalGap:
|
|
3330
|
-
sideBarItemActiveBackground:
|
|
3331
|
-
sideBarCollapsedSubmenuWidth:
|
|
3332
|
-
sidebarActiveColor:
|
|
3333
|
-
maxKeepAliveTabs:
|
|
3334
|
-
sidebarVariant:
|
|
3335
|
-
sidebarShowSearch:
|
|
3323
|
+
sideBarTextLightColor: we,
|
|
3324
|
+
sideBarIconDarkColor: Se,
|
|
3325
|
+
sideBarIconLightColor: w,
|
|
3326
|
+
sideBarBackgroundImage: k,
|
|
3327
|
+
mainBackground: N,
|
|
3328
|
+
sideBarItemBorderRadius: y,
|
|
3329
|
+
sideBarItemHorizontalGap: H,
|
|
3330
|
+
sideBarItemActiveBackground: Y,
|
|
3331
|
+
sideBarCollapsedSubmenuWidth: z,
|
|
3332
|
+
sidebarActiveColor: j,
|
|
3333
|
+
maxKeepAliveTabs: Z = 10,
|
|
3334
|
+
sidebarVariant: ke = "legacy",
|
|
3335
|
+
sidebarShowSearch: ee = !1
|
|
3336
3336
|
}) {
|
|
3337
3337
|
return /* @__PURE__ */ r(
|
|
3338
3338
|
Kt,
|
|
@@ -3344,8 +3344,8 @@ function Gn({
|
|
|
3344
3344
|
company: l,
|
|
3345
3345
|
enableSecurity: E,
|
|
3346
3346
|
securityOptions: W,
|
|
3347
|
-
onNavigationDataChange:
|
|
3348
|
-
initialSidebarCollapsed:
|
|
3347
|
+
onNavigationDataChange: x,
|
|
3348
|
+
initialSidebarCollapsed: se,
|
|
3349
3349
|
children: /* @__PURE__ */ r(
|
|
3350
3350
|
Qo,
|
|
3351
3351
|
{
|
|
@@ -3355,49 +3355,49 @@ function Gn({
|
|
|
3355
3355
|
footer: s,
|
|
3356
3356
|
owner: a,
|
|
3357
3357
|
company: l,
|
|
3358
|
-
sideBarWidth:
|
|
3359
|
-
sideBarCollapsedWidth:
|
|
3360
|
-
sideBarHiddenBreakPoint:
|
|
3358
|
+
sideBarWidth: i,
|
|
3359
|
+
sideBarCollapsedWidth: h,
|
|
3360
|
+
sideBarHiddenBreakPoint: c,
|
|
3361
3361
|
sideBarHeaderHeight: g,
|
|
3362
3362
|
sideBarHeaderContent: f,
|
|
3363
|
-
sideBarFooterHeight:
|
|
3364
|
-
sideBarFooterContent:
|
|
3365
|
-
selectedGroupColor:
|
|
3366
|
-
groupColor:
|
|
3367
|
-
backgroundGroupColor:
|
|
3368
|
-
groupLabelDarkColor:
|
|
3369
|
-
groupLabelLightColor:
|
|
3363
|
+
sideBarFooterHeight: d,
|
|
3364
|
+
sideBarFooterContent: u,
|
|
3365
|
+
selectedGroupColor: I,
|
|
3366
|
+
groupColor: T,
|
|
3367
|
+
backgroundGroupColor: L,
|
|
3368
|
+
groupLabelDarkColor: X,
|
|
3369
|
+
groupLabelLightColor: F,
|
|
3370
3370
|
onCollapsedSideBar: p,
|
|
3371
|
-
onHiddenSidebar:
|
|
3372
|
-
sidebarDefaultGroupIcon:
|
|
3371
|
+
onHiddenSidebar: C,
|
|
3372
|
+
sidebarDefaultGroupIcon: b,
|
|
3373
3373
|
sidebarSelectedGroupName: m,
|
|
3374
3374
|
headerColor: U,
|
|
3375
|
-
footerHeight:
|
|
3376
|
-
iconsWithBackground:
|
|
3377
|
-
menuItemHeight:
|
|
3378
|
-
showSideBar:
|
|
3375
|
+
footerHeight: M,
|
|
3376
|
+
iconsWithBackground: O,
|
|
3377
|
+
menuItemHeight: D,
|
|
3378
|
+
showSideBar: Q,
|
|
3379
3379
|
showHeader: P,
|
|
3380
|
-
headerStyle:
|
|
3381
|
-
highlightActiveMenuItem:
|
|
3380
|
+
headerStyle: v,
|
|
3381
|
+
highlightActiveMenuItem: K,
|
|
3382
3382
|
enableSecurity: E,
|
|
3383
|
-
customRenderSidebar:
|
|
3384
|
-
showCollapsedButton:
|
|
3385
|
-
sideBarBackgroundDarkColor:
|
|
3386
|
-
sideBarBackgroundLightColor:
|
|
3383
|
+
customRenderSidebar: G,
|
|
3384
|
+
showCollapsedButton: V,
|
|
3385
|
+
sideBarBackgroundDarkColor: Ce,
|
|
3386
|
+
sideBarBackgroundLightColor: le,
|
|
3387
3387
|
sideBarTextDarkColor: be,
|
|
3388
|
-
sideBarTextLightColor:
|
|
3389
|
-
sideBarIconDarkColor:
|
|
3390
|
-
sideBarIconLightColor:
|
|
3391
|
-
sideBarBackgroundImage:
|
|
3392
|
-
mainBackground:
|
|
3393
|
-
sideBarItemBorderRadius:
|
|
3394
|
-
sideBarItemHorizontalGap:
|
|
3395
|
-
sideBarItemActiveBackground:
|
|
3396
|
-
sideBarCollapsedSubmenuWidth:
|
|
3397
|
-
sidebarActiveColor:
|
|
3398
|
-
maxKeepAliveTabs:
|
|
3399
|
-
sidebarVariant:
|
|
3400
|
-
sidebarShowSearch:
|
|
3388
|
+
sideBarTextLightColor: we,
|
|
3389
|
+
sideBarIconDarkColor: Se,
|
|
3390
|
+
sideBarIconLightColor: w,
|
|
3391
|
+
sideBarBackgroundImage: k,
|
|
3392
|
+
mainBackground: N,
|
|
3393
|
+
sideBarItemBorderRadius: y,
|
|
3394
|
+
sideBarItemHorizontalGap: H,
|
|
3395
|
+
sideBarItemActiveBackground: Y,
|
|
3396
|
+
sideBarCollapsedSubmenuWidth: z,
|
|
3397
|
+
sidebarActiveColor: j,
|
|
3398
|
+
maxKeepAliveTabs: Z,
|
|
3399
|
+
sidebarVariant: ke,
|
|
3400
|
+
sidebarShowSearch: ee,
|
|
3401
3401
|
children: e
|
|
3402
3402
|
}
|
|
3403
3403
|
)
|
|
@@ -3427,7 +3427,7 @@ const vr = Ne({
|
|
|
3427
3427
|
return s;
|
|
3428
3428
|
}
|
|
3429
3429
|
}, [e, n] = Ir(o, t);
|
|
3430
|
-
return
|
|
3430
|
+
return xe.useEffect(() => {
|
|
3431
3431
|
let s = null;
|
|
3432
3432
|
return e.userCloseLinkRequest && !e.linkClosed && (s = setTimeout(() => {
|
|
3433
3433
|
n({ type: "CLOSE_ALLOWED", link: e.userCloseLinkRequest });
|
|
@@ -3441,10 +3441,10 @@ const vr = Ne({
|
|
|
3441
3441
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
3442
3442
|
return A;
|
|
3443
3443
|
}, Un = (A, t) => {
|
|
3444
|
-
const o = Cr(), { state: e, dispatch: n } = o, s =
|
|
3445
|
-
n({ type: "CLOSE_ALLOWED", link: A, payload:
|
|
3444
|
+
const o = Cr(), { state: e, dispatch: n } = o, s = S((i) => {
|
|
3445
|
+
n({ type: "CLOSE_ALLOWED", link: A, payload: i });
|
|
3446
3446
|
}, [n, A]), a = _(t);
|
|
3447
|
-
a.current = t,
|
|
3447
|
+
a.current = t, oe(() => {
|
|
3448
3448
|
e && e.userCloseLinkRequest && e.userCloseLinkRequest === A && a.current();
|
|
3449
3449
|
}, [e, A]);
|
|
3450
3450
|
const l = e.isClosing && e.userCloseLinkRequest === A;
|
|
@@ -3510,202 +3510,204 @@ function Hn({
|
|
|
3510
3510
|
onChangeOpenedTabs: t,
|
|
3511
3511
|
onChangeActiveTabId: o,
|
|
3512
3512
|
activeTabId: e,
|
|
3513
|
-
openedTabs: n = []
|
|
3513
|
+
openedTabs: n = [],
|
|
3514
|
+
colors: s
|
|
3514
3515
|
}) {
|
|
3515
|
-
const [
|
|
3516
|
-
Pt(
|
|
3517
|
-
const
|
|
3518
|
-
|
|
3519
|
-
O.current = t,
|
|
3516
|
+
const [a, l] = xe.useTransition(), i = qe(), { colorScheme: h } = de(), [c, d] = ge(n), [u, p] = ge(e), C = _(void 0), b = je(), m = _([]);
|
|
3517
|
+
Pt(m);
|
|
3518
|
+
const g = Cr(), { state: f, dispatch: I } = g, T = ve(rA), L = Eo(), { start: X, done: F } = yr(), U = AA((w) => w.clearSnapshot), M = AA((w) => w.removeTab), O = _(t), D = _(o);
|
|
3519
|
+
oe(() => {
|
|
3520
|
+
O.current = t, D.current = o;
|
|
3520
3521
|
});
|
|
3521
|
-
const
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
}, [
|
|
3525
|
-
const
|
|
3526
|
-
|
|
3527
|
-
const
|
|
3528
|
-
let
|
|
3529
|
-
!
|
|
3530
|
-
const
|
|
3531
|
-
let
|
|
3532
|
-
if (
|
|
3533
|
-
const
|
|
3534
|
-
|
|
3522
|
+
const Q = _(u);
|
|
3523
|
+
oe(() => {
|
|
3524
|
+
C.current = Q.current, Q.current = u;
|
|
3525
|
+
}, [u]);
|
|
3526
|
+
const P = _(!1), v = S((w, k) => {
|
|
3527
|
+
X(), L ? L.destroy(w) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), U(w), M(w);
|
|
3528
|
+
const N = c.findIndex((j) => j.path === w);
|
|
3529
|
+
let y = k?.redirectUrl;
|
|
3530
|
+
!y && N >= 0 && (y = c[N].redirect);
|
|
3531
|
+
const H = c.filter((j) => j.id !== w);
|
|
3532
|
+
let Y = null;
|
|
3533
|
+
if (C.current && C.current !== w) {
|
|
3534
|
+
const j = H.find((Z) => Z.id === C.current);
|
|
3535
|
+
j && (Y = j.id);
|
|
3535
3536
|
}
|
|
3536
|
-
if (!
|
|
3537
|
-
let
|
|
3538
|
-
|
|
3537
|
+
if (!Y) {
|
|
3538
|
+
let j = -1;
|
|
3539
|
+
H.forEach((Z, ke) => Z.id === u && (j = ke)), H.length > 0 && H[j] ? Y = H[j].id : H.length > 0 && (Y = H[H.length - 1].id);
|
|
3539
3540
|
}
|
|
3540
|
-
const
|
|
3541
|
-
...
|
|
3542
|
-
active:
|
|
3541
|
+
const z = H.map((j) => ({
|
|
3542
|
+
...j,
|
|
3543
|
+
active: Y === j.id
|
|
3543
3544
|
}));
|
|
3544
|
-
if (
|
|
3545
|
-
|
|
3545
|
+
if (d(z), Y && Y != null)
|
|
3546
|
+
p(Y), i(y || Y);
|
|
3546
3547
|
else {
|
|
3547
|
-
if (
|
|
3548
|
+
if (p(void 0), !T.navigationRootLink) {
|
|
3548
3549
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3549
3550
|
return;
|
|
3550
3551
|
}
|
|
3551
|
-
|
|
3552
|
+
i(T.navigationRootLink);
|
|
3552
3553
|
}
|
|
3553
|
-
|
|
3554
|
-
}, [c,
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
}, [
|
|
3558
|
-
const
|
|
3559
|
-
const
|
|
3554
|
+
I({ type: "DONE", link: "" }), F();
|
|
3555
|
+
}, [c, u, i, T.navigationRootLink, I, L, X, F, U, M]);
|
|
3556
|
+
oe(() => {
|
|
3557
|
+
f?.linkClosed && v(f?.linkClosed, f?.payload);
|
|
3558
|
+
}, [f?.linkClosed, f?.payload, v]);
|
|
3559
|
+
const K = (w) => {
|
|
3560
|
+
const k = {
|
|
3560
3561
|
item: void 0,
|
|
3561
3562
|
title: void 0,
|
|
3562
|
-
link:
|
|
3563
|
+
link: w,
|
|
3563
3564
|
redirect: void 0,
|
|
3564
3565
|
customTitle: void 0
|
|
3565
3566
|
};
|
|
3566
|
-
return A.forEach((
|
|
3567
|
-
if (
|
|
3568
|
-
|
|
3569
|
-
MA({ path:
|
|
3567
|
+
return A.forEach((N) => {
|
|
3568
|
+
if (N.links)
|
|
3569
|
+
N.links.forEach((y) => {
|
|
3570
|
+
MA({ path: y.link || "" }, location.pathname) && (k.item = y, k.title = `${ne().t(y.label)}`, k.redirect = y.redirect, k.customTitle = y.customTitle);
|
|
3570
3571
|
});
|
|
3571
|
-
else if (
|
|
3572
|
-
const
|
|
3573
|
-
|
|
3572
|
+
else if (N.link && !k.item) {
|
|
3573
|
+
const y = MA({ path: N.link }, location.pathname);
|
|
3574
|
+
y && (y.params && Object.keys(y.params).length > 0 ? k.title = `${y.params[Object.keys(y.params)[0]]}` : k.title = `${ne().t(N.label)}`, k.item = N, k.redirect = N.redirect, k.customTitle = N.customTitle);
|
|
3574
3575
|
}
|
|
3575
|
-
}),
|
|
3576
|
+
}), k.customTitle && (k.customTitle = k.customTitle.replace("$title", k.title)), k;
|
|
3576
3577
|
};
|
|
3577
|
-
|
|
3578
|
-
|
|
3578
|
+
oe(() => {
|
|
3579
|
+
d(n), P.current = !0;
|
|
3579
3580
|
}, [JSON.stringify(n)]);
|
|
3580
|
-
const
|
|
3581
|
-
|
|
3582
|
-
if (
|
|
3583
|
-
|
|
3581
|
+
const E = _(c), W = _(u);
|
|
3582
|
+
oe(() => {
|
|
3583
|
+
if (P.current) {
|
|
3584
|
+
P.current = !1, E.current = c, W.current = u;
|
|
3584
3585
|
return;
|
|
3585
3586
|
}
|
|
3586
|
-
const
|
|
3587
|
-
if (
|
|
3588
|
-
const
|
|
3589
|
-
O.current?.(c),
|
|
3587
|
+
const w = JSON.stringify(E.current) !== JSON.stringify(c), k = W.current !== u;
|
|
3588
|
+
if (w || k) {
|
|
3589
|
+
const N = setTimeout(() => {
|
|
3590
|
+
O.current?.(c), D.current?.(u);
|
|
3590
3591
|
}, 0);
|
|
3591
|
-
return
|
|
3592
|
+
return E.current = c, W.current = u, () => clearTimeout(N);
|
|
3592
3593
|
}
|
|
3593
|
-
}, [c,
|
|
3594
|
-
const
|
|
3595
|
-
|
|
3596
|
-
if (
|
|
3594
|
+
}, [c, u]);
|
|
3595
|
+
const G = _("");
|
|
3596
|
+
oe(() => {
|
|
3597
|
+
if (G.current === b.pathname)
|
|
3597
3598
|
return;
|
|
3598
|
-
|
|
3599
|
-
const
|
|
3600
|
-
if (
|
|
3601
|
-
const
|
|
3602
|
-
if (
|
|
3603
|
-
if (c[
|
|
3604
|
-
const
|
|
3605
|
-
|
|
3599
|
+
G.current = b.pathname;
|
|
3600
|
+
const w = K(b.pathname);
|
|
3601
|
+
if (w && w.item) {
|
|
3602
|
+
const k = c.findIndex((N) => N.path === w.link);
|
|
3603
|
+
if (k !== -1) {
|
|
3604
|
+
if (c[k].title !== w.title) {
|
|
3605
|
+
const N = [...c];
|
|
3606
|
+
N[k] = { ...N[k], title: w.title }, d(N);
|
|
3606
3607
|
}
|
|
3607
|
-
|
|
3608
|
+
p(c[k].id);
|
|
3608
3609
|
} else {
|
|
3609
|
-
const
|
|
3610
|
-
id: `${
|
|
3611
|
-
title: `${
|
|
3612
|
-
path: `${
|
|
3610
|
+
const N = {
|
|
3611
|
+
id: `${w.link}`,
|
|
3612
|
+
title: `${w.title}`,
|
|
3613
|
+
path: `${w.link}`,
|
|
3613
3614
|
active: !0,
|
|
3614
|
-
content:
|
|
3615
|
-
iconClass:
|
|
3615
|
+
content: w.item.component,
|
|
3616
|
+
iconClass: w.item.icon,
|
|
3616
3617
|
closeButton: !0,
|
|
3617
|
-
redirect:
|
|
3618
|
-
customTitle:
|
|
3619
|
-
},
|
|
3620
|
-
|
|
3618
|
+
redirect: w.redirect,
|
|
3619
|
+
customTitle: w.customTitle
|
|
3620
|
+
}, y = [...c.map((H) => ({ ...H, active: !1 })), N];
|
|
3621
|
+
d(y), p(N.id);
|
|
3621
3622
|
}
|
|
3622
3623
|
}
|
|
3623
3624
|
}, [b.pathname]);
|
|
3624
|
-
const
|
|
3625
|
-
const
|
|
3626
|
-
|
|
3627
|
-
|
|
3625
|
+
const x = (w) => {
|
|
3626
|
+
const k = c.filter((N) => N.id === w);
|
|
3627
|
+
k && k.length > 0 && b.pathname !== k[0].path && (X(), i(k[0].path)), l(() => {
|
|
3628
|
+
p(w), F();
|
|
3628
3629
|
});
|
|
3629
|
-
},
|
|
3630
|
+
}, V = (w) => {
|
|
3630
3631
|
try {
|
|
3631
|
-
|
|
3632
|
-
} catch (
|
|
3633
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
3632
|
+
X(), I({ type: "USER_CLOSE_REQUEST", link: w });
|
|
3633
|
+
} catch (k) {
|
|
3634
|
+
console.error("[TabContainer] Dispatch failed:", k), F();
|
|
3634
3635
|
}
|
|
3635
|
-
},
|
|
3636
|
-
if (
|
|
3637
|
-
|
|
3638
|
-
}),
|
|
3636
|
+
}, se = S(() => {
|
|
3637
|
+
if (L?.destroyAll(), c.forEach((w) => {
|
|
3638
|
+
U(w.id), M(w.id);
|
|
3639
|
+
}), d([]), p(void 0), !T.navigationRootLink) {
|
|
3639
3640
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3640
3641
|
return;
|
|
3641
3642
|
}
|
|
3642
|
-
|
|
3643
|
-
}, [
|
|
3644
|
-
const
|
|
3645
|
-
if (
|
|
3643
|
+
i(T.navigationRootLink);
|
|
3644
|
+
}, [i, T.navigationRootLink, L, c, U, M]), Ce = S((w) => {
|
|
3645
|
+
const k = c.findIndex((z) => z.id === w);
|
|
3646
|
+
if (k <= 0)
|
|
3646
3647
|
return;
|
|
3647
|
-
c.slice(0,
|
|
3648
|
-
|
|
3648
|
+
c.slice(0, k).forEach((z) => {
|
|
3649
|
+
L?.destroy(z.path), U(z.id), M(z.id);
|
|
3649
3650
|
});
|
|
3650
|
-
const
|
|
3651
|
-
...
|
|
3652
|
-
active:
|
|
3651
|
+
const y = c.slice(k), H = y.find((z) => z.id === u)?.id || y[0]?.id, Y = y.map((z) => ({
|
|
3652
|
+
...z,
|
|
3653
|
+
active: z.id === H
|
|
3653
3654
|
}));
|
|
3654
|
-
if (
|
|
3655
|
-
|
|
3656
|
-
const
|
|
3657
|
-
|
|
3655
|
+
if (d(Y), H) {
|
|
3656
|
+
p(H);
|
|
3657
|
+
const z = Y.find((j) => j.id === H);
|
|
3658
|
+
z && b.pathname !== z.path && i(z.path);
|
|
3658
3659
|
}
|
|
3659
|
-
}, [c,
|
|
3660
|
-
const
|
|
3661
|
-
if (
|
|
3660
|
+
}, [c, u, i, b.pathname, L, U, M]), le = S((w) => {
|
|
3661
|
+
const k = c.findIndex((z) => z.id === w);
|
|
3662
|
+
if (k === -1 || k >= c.length - 1)
|
|
3662
3663
|
return;
|
|
3663
|
-
c.slice(
|
|
3664
|
-
|
|
3664
|
+
c.slice(k + 1).forEach((z) => {
|
|
3665
|
+
L?.destroy(z.path), U(z.id), M(z.id);
|
|
3665
3666
|
});
|
|
3666
|
-
const
|
|
3667
|
-
...
|
|
3668
|
-
active:
|
|
3667
|
+
const y = c.slice(0, k + 1), H = y.find((z) => z.id === u)?.id || y[y.length - 1]?.id, Y = y.map((z) => ({
|
|
3668
|
+
...z,
|
|
3669
|
+
active: z.id === H
|
|
3669
3670
|
}));
|
|
3670
|
-
if (
|
|
3671
|
-
|
|
3672
|
-
const
|
|
3673
|
-
|
|
3671
|
+
if (d(Y), H) {
|
|
3672
|
+
p(H);
|
|
3673
|
+
const z = Y.find((j) => j.id === H);
|
|
3674
|
+
z && b.pathname !== z.path && i(z.path);
|
|
3674
3675
|
}
|
|
3675
|
-
}, [c,
|
|
3676
|
-
const
|
|
3677
|
-
if (!
|
|
3676
|
+
}, [c, u, i, b.pathname, L, U, M]), be = S((w) => {
|
|
3677
|
+
const k = c.find((y) => y.id === w);
|
|
3678
|
+
if (!k)
|
|
3678
3679
|
return;
|
|
3679
|
-
|
|
3680
|
-
|
|
3680
|
+
L?.destroyOther(k.path), c.forEach((y) => {
|
|
3681
|
+
y.id !== w && (U(y.id), M(y.id));
|
|
3681
3682
|
});
|
|
3682
|
-
const
|
|
3683
|
-
|
|
3684
|
-
}, [c,
|
|
3685
|
-
return /* @__PURE__ */ r("div", { ref:
|
|
3683
|
+
const N = [{ ...k, active: !0 }];
|
|
3684
|
+
d(N), p(w), b.pathname !== k.path && i(k.path);
|
|
3685
|
+
}, [c, i, b.pathname, L, U, M]), we = f?.isClosing ? f?.userCloseLinkRequest : void 0;
|
|
3686
|
+
return /* @__PURE__ */ r("div", { ref: m, children: /* @__PURE__ */ r(
|
|
3686
3687
|
Lt,
|
|
3687
3688
|
{
|
|
3688
3689
|
buttonCloseOnlyActiveTab: !0,
|
|
3689
|
-
onClick: (
|
|
3690
|
-
onTabClose: (
|
|
3691
|
-
onTabChange: (
|
|
3692
|
-
onCloseAllTabs:
|
|
3693
|
-
onCloseLeftTabs:
|
|
3694
|
-
onCloseRightTabs:
|
|
3695
|
-
onCloseOtherTabs:
|
|
3696
|
-
currentTabs: ((
|
|
3697
|
-
key:
|
|
3698
|
-
favicon:
|
|
3699
|
-
title:
|
|
3700
|
-
customTitle:
|
|
3701
|
-
closing:
|
|
3690
|
+
onClick: (w) => x(w),
|
|
3691
|
+
onTabClose: (w) => V(w),
|
|
3692
|
+
onTabChange: (w) => null,
|
|
3693
|
+
onCloseAllTabs: se,
|
|
3694
|
+
onCloseLeftTabs: Ce,
|
|
3695
|
+
onCloseRightTabs: le,
|
|
3696
|
+
onCloseOtherTabs: be,
|
|
3697
|
+
currentTabs: ((w) => w.map((k) => ({
|
|
3698
|
+
key: k.id,
|
|
3699
|
+
favicon: k.iconClass,
|
|
3700
|
+
title: k.title,
|
|
3701
|
+
customTitle: k.customTitle,
|
|
3702
|
+
closing: we === k.id
|
|
3702
3703
|
})))(c),
|
|
3703
|
-
activeTab:
|
|
3704
|
-
|
|
3704
|
+
activeTab: u,
|
|
3705
|
+
colors: s,
|
|
3706
|
+
dark: h === "dark"
|
|
3705
3707
|
}
|
|
3706
3708
|
) });
|
|
3707
3709
|
}
|
|
3708
|
-
const Fo = () =>
|
|
3710
|
+
const Fo = () => xe.createElement("div", null, "Home View"), Vo = () => xe.createElement("div", null, "Pedido Form"), Go = () => xe.createElement("div", null, "Pedido View"), Bo = () => xe.createElement("div", null, "Pessoa Form"), Uo = () => xe.createElement("div", null, "Pessoa View"), Ho = {
|
|
3709
3711
|
label: "Dashboard",
|
|
3710
3712
|
icon: /* @__PURE__ */ r(Hr, {}),
|
|
3711
3713
|
link: "/dashboard",
|
|
@@ -3788,20 +3790,20 @@ const Fo = () => Se.createElement("div", null, "Home View"), Vo = () => Se.creat
|
|
|
3788
3790
|
Zo
|
|
3789
3791
|
];
|
|
3790
3792
|
function qn({ children: A, title: t = "", size: o = "440px", drawerKey: e, styles: n }) {
|
|
3791
|
-
const [s, { open: a, close: l }] = Pr(!1), [
|
|
3792
|
-
return
|
|
3793
|
-
|
|
3794
|
-
}, [
|
|
3793
|
+
const [s, { open: a, close: l }] = Pr(!1), [i] = rr(), h = wt(), c = Xe();
|
|
3794
|
+
return oe(() => {
|
|
3795
|
+
i.get("drawer") === e && a();
|
|
3796
|
+
}, [i]), /* @__PURE__ */ r(
|
|
3795
3797
|
qA,
|
|
3796
3798
|
{
|
|
3797
3799
|
position: "right",
|
|
3798
3800
|
opened: s,
|
|
3799
3801
|
onClose: () => {
|
|
3800
3802
|
l();
|
|
3801
|
-
const
|
|
3802
|
-
|
|
3803
|
-
pathname:
|
|
3804
|
-
search:
|
|
3803
|
+
const u = new URLSearchParams(i);
|
|
3804
|
+
u.delete("drawer"), h({
|
|
3805
|
+
pathname: c.pathname,
|
|
3806
|
+
search: u.toString()
|
|
3805
3807
|
});
|
|
3806
3808
|
},
|
|
3807
3809
|
title: t,
|
|
@@ -3823,7 +3825,7 @@ function en(A) {
|
|
|
3823
3825
|
}
|
|
3824
3826
|
function jn({ drawerKey: A }) {
|
|
3825
3827
|
const { openDrawer: t } = en(A);
|
|
3826
|
-
return
|
|
3828
|
+
return oe(() => {
|
|
3827
3829
|
t();
|
|
3828
3830
|
}, []), null;
|
|
3829
3831
|
}
|
|
@@ -3837,11 +3839,11 @@ const An = {
|
|
|
3837
3839
|
avatarMaxOutputSizePx: 512
|
|
3838
3840
|
};
|
|
3839
3841
|
function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n }) {
|
|
3840
|
-
const s = Lr(), a = Mr(), l = _r(),
|
|
3842
|
+
const s = Lr(), a = Mr(), l = _r(), i = Nt(`myProfile${o}Store`), h = zt(Wr.User), c = { ...An, ...n ?? {} }, { dataSource: d, isLoading: u, error: p, isError: C, clearError: b } = Ot({
|
|
3841
3843
|
name: `dsUser${o}`,
|
|
3842
|
-
label: `${
|
|
3843
|
-
service:
|
|
3844
|
-
store:
|
|
3844
|
+
label: `${ne().t("archbase:My Profile")}`,
|
|
3845
|
+
service: h,
|
|
3846
|
+
store: i,
|
|
3845
3847
|
pageSize: 50,
|
|
3846
3848
|
loadOnStart: !0,
|
|
3847
3849
|
validator: l,
|
|
@@ -3852,24 +3854,24 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3852
3854
|
onDestroy: (g) => {
|
|
3853
3855
|
},
|
|
3854
3856
|
onError: (g, f) => {
|
|
3855
|
-
const
|
|
3856
|
-
It.showError(
|
|
3857
|
+
const I = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
|
|
3858
|
+
It.showError(ne().t("archbase:WARNING"), I, f);
|
|
3857
3859
|
}
|
|
3858
3860
|
});
|
|
3859
|
-
|
|
3860
|
-
A &&
|
|
3861
|
-
}, [
|
|
3861
|
+
oe(() => {
|
|
3862
|
+
A && d && d.isBrowsing() && d.edit();
|
|
3863
|
+
}, [d, A]);
|
|
3862
3864
|
const m = (g) => {
|
|
3863
3865
|
g && (console.log(g), e(g.name, g.avatar));
|
|
3864
3866
|
};
|
|
3865
3867
|
return /* @__PURE__ */ r(
|
|
3866
3868
|
$t,
|
|
3867
3869
|
{
|
|
3868
|
-
title:
|
|
3870
|
+
title: ne().t("archbase:My Profile"),
|
|
3869
3871
|
size: 800,
|
|
3870
3872
|
height: "500px",
|
|
3871
3873
|
opened: A,
|
|
3872
|
-
dataSource:
|
|
3874
|
+
dataSource: d,
|
|
3873
3875
|
onClickOk: t,
|
|
3874
3876
|
onClickCancel: t,
|
|
3875
3877
|
onAfterSave: m,
|
|
@@ -3877,41 +3879,41 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3877
3879
|
/* @__PURE__ */ r(J, { align: "center", children: /* @__PURE__ */ r(
|
|
3878
3880
|
Tt,
|
|
3879
3881
|
{
|
|
3880
|
-
dataSource:
|
|
3882
|
+
dataSource: d,
|
|
3881
3883
|
dataField: "avatar",
|
|
3882
3884
|
width: 200,
|
|
3883
3885
|
height: 200,
|
|
3884
|
-
maxSizeKB:
|
|
3885
|
-
imageQuality:
|
|
3886
|
-
maxOutputSizePx:
|
|
3886
|
+
maxSizeKB: c.avatarMaxSizeKB,
|
|
3887
|
+
imageQuality: c.avatarImageQuality,
|
|
3888
|
+
maxOutputSizePx: c.avatarMaxOutputSizePx
|
|
3887
3889
|
}
|
|
3888
3890
|
) }),
|
|
3889
3891
|
/* @__PURE__ */ r(
|
|
3890
3892
|
sA,
|
|
3891
3893
|
{
|
|
3892
|
-
label: `${
|
|
3893
|
-
placeholder: `${
|
|
3894
|
-
dataSource:
|
|
3894
|
+
label: `${ne().t("archbase:Nome completo")}`,
|
|
3895
|
+
placeholder: `${ne().t("archbase:Informe o nome completo do usuário")}`,
|
|
3896
|
+
dataSource: d,
|
|
3895
3897
|
dataField: "name",
|
|
3896
3898
|
required: !0
|
|
3897
3899
|
}
|
|
3898
3900
|
),
|
|
3899
|
-
|
|
3901
|
+
c.showNickname && /* @__PURE__ */ r(
|
|
3900
3902
|
sA,
|
|
3901
3903
|
{
|
|
3902
|
-
label: `${
|
|
3903
|
-
placeholder: `${
|
|
3904
|
-
dataSource:
|
|
3904
|
+
label: `${ne().t("archbase:Apelido")}`,
|
|
3905
|
+
placeholder: `${ne().t("archbase:Apelido")}`,
|
|
3906
|
+
dataSource: d,
|
|
3905
3907
|
dataField: "nickname",
|
|
3906
|
-
required:
|
|
3908
|
+
required: c.requiredNickname
|
|
3907
3909
|
}
|
|
3908
3910
|
),
|
|
3909
3911
|
/* @__PURE__ */ r(
|
|
3910
3912
|
sA,
|
|
3911
3913
|
{
|
|
3912
|
-
label: `${
|
|
3913
|
-
placeholder: `${
|
|
3914
|
-
dataSource:
|
|
3914
|
+
label: `${ne().t("archbase:Descrição do usuário")}`,
|
|
3915
|
+
placeholder: `${ne().t("archbase:Informe a descrição do usuário")}`,
|
|
3916
|
+
dataSource: d,
|
|
3915
3917
|
dataField: "description",
|
|
3916
3918
|
required: !0
|
|
3917
3919
|
}
|
|
@@ -4027,7 +4029,7 @@ const Jn = sr((A) => ({
|
|
|
4027
4029
|
const s = o(A);
|
|
4028
4030
|
n.current = rn(s);
|
|
4029
4031
|
}
|
|
4030
|
-
return
|
|
4032
|
+
return oe(() => () => {
|
|
4031
4033
|
if (n.current) {
|
|
4032
4034
|
const s = n.current.getState();
|
|
4033
4035
|
e(A, s.serialize());
|
|
@@ -4057,7 +4059,7 @@ function oA(A, t) {
|
|
|
4057
4059
|
});
|
|
4058
4060
|
const n = e.current.value, [s, a] = ge(n), l = Tr(
|
|
4059
4061
|
// subscribe
|
|
4060
|
-
(
|
|
4062
|
+
(c) => o ? o.subscribe(c) : () => {
|
|
4061
4063
|
},
|
|
4062
4064
|
// getSnapshot
|
|
4063
4065
|
() => {
|
|
@@ -4067,15 +4069,15 @@ function oA(A, t) {
|
|
|
4067
4069
|
// getServerSnapshot
|
|
4068
4070
|
() => {
|
|
4069
4071
|
}
|
|
4070
|
-
),
|
|
4072
|
+
), i = o ? l !== void 0 ? l : n : s, h = S((c) => {
|
|
4071
4073
|
if (!o) {
|
|
4072
|
-
a(
|
|
4074
|
+
a(c);
|
|
4073
4075
|
return;
|
|
4074
4076
|
}
|
|
4075
|
-
const
|
|
4076
|
-
o.getState().setCustomState(A,
|
|
4077
|
+
const d = o.getState().customState[A] ?? n, u = typeof c == "function" ? c(d) : c;
|
|
4078
|
+
o.getState().setCustomState(A, u);
|
|
4077
4079
|
}, [o, A, n]);
|
|
4078
|
-
return [
|
|
4080
|
+
return [i, h];
|
|
4079
4081
|
}
|
|
4080
4082
|
function Zn(A, t) {
|
|
4081
4083
|
return oA(A, t);
|
|
@@ -4096,36 +4098,36 @@ function es(A, t) {
|
|
|
4096
4098
|
const o = { ...on, ...t }, [e, n] = oA(
|
|
4097
4099
|
`grid_${A}`,
|
|
4098
4100
|
o
|
|
4099
|
-
), s =
|
|
4100
|
-
n((
|
|
4101
|
-
}, [n]), a =
|
|
4102
|
-
n((
|
|
4103
|
-
...
|
|
4104
|
-
selectedRowIds:
|
|
4101
|
+
), s = S((f) => {
|
|
4102
|
+
n((I) => ({ ...I, ...f }));
|
|
4103
|
+
}, [n]), a = S((f) => s({ page: f }), [s]), l = S((f) => s({ pageSize: f, page: 0 }), [s]), i = S((f) => s({ sortModel: f }), [s]), h = S((f) => s({ filterModel: f, page: 0 }), [s]), c = S((f) => s({ selectedRowIds: f }), [s]), d = S((f) => {
|
|
4104
|
+
n((I) => ({
|
|
4105
|
+
...I,
|
|
4106
|
+
selectedRowIds: I.selectedRowIds.includes(f) ? I.selectedRowIds.filter((T) => T !== f) : [...I.selectedRowIds, f]
|
|
4105
4107
|
}));
|
|
4106
|
-
}, [n]),
|
|
4107
|
-
n((
|
|
4108
|
-
...
|
|
4109
|
-
expandedRowIds:
|
|
4108
|
+
}, [n]), u = S((f) => s({ selectedRowIds: f }), [s]), p = S(() => s({ selectedRowIds: [] }), [s]), C = S((f) => {
|
|
4109
|
+
n((I) => ({
|
|
4110
|
+
...I,
|
|
4111
|
+
expandedRowIds: I.expandedRowIds.includes(f) ? I.expandedRowIds.filter((T) => T !== f) : [...I.expandedRowIds, f]
|
|
4110
4112
|
}));
|
|
4111
|
-
}, [n]),
|
|
4113
|
+
}, [n]), b = S(() => n(o), [n, o]), m = S((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), g = S((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
|
|
4112
4114
|
return {
|
|
4113
4115
|
/** Estado completo do grid */
|
|
4114
4116
|
state: e,
|
|
4115
4117
|
/** Atualizar multiplos campos */
|
|
4116
4118
|
update: s,
|
|
4117
4119
|
/** Resetar para estado inicial */
|
|
4118
|
-
reset:
|
|
4120
|
+
reset: b,
|
|
4119
4121
|
// Paginacao
|
|
4120
4122
|
setPage: a,
|
|
4121
4123
|
setPageSize: l,
|
|
4122
4124
|
// Ordenacao e Filtros
|
|
4123
|
-
setSortModel:
|
|
4124
|
-
setFilterModel:
|
|
4125
|
+
setSortModel: i,
|
|
4126
|
+
setFilterModel: h,
|
|
4125
4127
|
// Selecao
|
|
4126
|
-
setSelectedRowIds:
|
|
4127
|
-
toggleRowSelection:
|
|
4128
|
-
selectAllRows:
|
|
4128
|
+
setSelectedRowIds: c,
|
|
4129
|
+
toggleRowSelection: d,
|
|
4130
|
+
selectAllRows: u,
|
|
4129
4131
|
clearSelection: p,
|
|
4130
4132
|
isRowSelected: m,
|
|
4131
4133
|
/** Quantidade de linhas selecionadas */
|
|
@@ -4133,7 +4135,7 @@ function es(A, t) {
|
|
|
4133
4135
|
/** Se tem alguma linha selecionada */
|
|
4134
4136
|
hasSelection: e.selectedRowIds.length > 0,
|
|
4135
4137
|
// Expansao (master-detail)
|
|
4136
|
-
toggleRowExpansion:
|
|
4138
|
+
toggleRowExpansion: C,
|
|
4137
4139
|
isRowExpanded: g
|
|
4138
4140
|
};
|
|
4139
4141
|
}
|
|
@@ -4146,58 +4148,58 @@ function As(A, t = []) {
|
|
|
4146
4148
|
const [o, e] = oA(
|
|
4147
4149
|
`tree_${A}`,
|
|
4148
4150
|
{ ...VA, expandedNodeIds: t }
|
|
4149
|
-
), n =
|
|
4151
|
+
), n = S((m) => {
|
|
4150
4152
|
e((g) => ({
|
|
4151
4153
|
...g,
|
|
4152
4154
|
expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds.filter((f) => f !== m) : [...g.expandedNodeIds, m]
|
|
4153
4155
|
}));
|
|
4154
|
-
}, [e]), s =
|
|
4156
|
+
}, [e]), s = S((m) => {
|
|
4155
4157
|
e((g) => ({
|
|
4156
4158
|
...g,
|
|
4157
4159
|
expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds : [...g.expandedNodeIds, m]
|
|
4158
4160
|
}));
|
|
4159
|
-
}, [e]), a =
|
|
4161
|
+
}, [e]), a = S((m) => {
|
|
4160
4162
|
e((g) => ({
|
|
4161
4163
|
...g,
|
|
4162
4164
|
expandedNodeIds: g.expandedNodeIds.filter((f) => f !== m)
|
|
4163
4165
|
}));
|
|
4164
|
-
}, [e]), l =
|
|
4166
|
+
}, [e]), l = S((m) => {
|
|
4165
4167
|
e((g) => ({ ...g, expandedNodeIds: m }));
|
|
4166
|
-
}, [e]),
|
|
4168
|
+
}, [e]), i = S(() => {
|
|
4167
4169
|
e((m) => ({ ...m, expandedNodeIds: [] }));
|
|
4168
|
-
}, [e]),
|
|
4170
|
+
}, [e]), h = S((m) => {
|
|
4169
4171
|
e((g) => ({ ...g, selectedNodeIds: m }));
|
|
4170
|
-
}, [e]),
|
|
4172
|
+
}, [e]), c = S((m) => {
|
|
4171
4173
|
e((g) => ({
|
|
4172
4174
|
...g,
|
|
4173
4175
|
selectedNodeIds: g.selectedNodeIds.includes(m) ? g.selectedNodeIds.filter((f) => f !== m) : [...g.selectedNodeIds, m]
|
|
4174
4176
|
}));
|
|
4175
|
-
}, [e]),
|
|
4177
|
+
}, [e]), d = S(() => {
|
|
4176
4178
|
e((m) => ({ ...m, selectedNodeIds: [] }));
|
|
4177
|
-
}, [e]),
|
|
4179
|
+
}, [e]), u = S((m) => {
|
|
4178
4180
|
e((g) => ({ ...g, focusedNodeId: m }));
|
|
4179
|
-
}, [e]), p =
|
|
4181
|
+
}, [e]), p = S((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), C = S((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), b = S(() => {
|
|
4180
4182
|
e({ ...VA, expandedNodeIds: t });
|
|
4181
4183
|
}, [e, t]);
|
|
4182
4184
|
return {
|
|
4183
4185
|
state: o,
|
|
4184
|
-
reset:
|
|
4186
|
+
reset: b,
|
|
4185
4187
|
// Expansao
|
|
4186
4188
|
toggleExpanded: n,
|
|
4187
4189
|
expand: s,
|
|
4188
4190
|
collapse: a,
|
|
4189
4191
|
expandAll: l,
|
|
4190
|
-
collapseAll:
|
|
4192
|
+
collapseAll: i,
|
|
4191
4193
|
isExpanded: p,
|
|
4192
4194
|
// Selecao
|
|
4193
|
-
setSelected:
|
|
4194
|
-
toggleSelected:
|
|
4195
|
-
clearSelection:
|
|
4196
|
-
isSelected:
|
|
4195
|
+
setSelected: h,
|
|
4196
|
+
toggleSelected: c,
|
|
4197
|
+
clearSelection: d,
|
|
4198
|
+
isSelected: C,
|
|
4197
4199
|
selectedCount: o.selectedNodeIds.length,
|
|
4198
4200
|
hasSelection: o.selectedNodeIds.length > 0,
|
|
4199
4201
|
// Foco
|
|
4200
|
-
setFocused:
|
|
4202
|
+
setFocused: u,
|
|
4201
4203
|
focusedNodeId: o.focusedNodeId
|
|
4202
4204
|
};
|
|
4203
4205
|
}
|
|
@@ -4205,14 +4207,14 @@ function rs(A, t = [], o = !0) {
|
|
|
4205
4207
|
const [e, n] = oA(
|
|
4206
4208
|
`accordion_${A}`,
|
|
4207
4209
|
t
|
|
4208
|
-
), s =
|
|
4209
|
-
n((
|
|
4210
|
-
}, [n, o]), a =
|
|
4211
|
-
n((
|
|
4212
|
-
}, [n, o]), l =
|
|
4213
|
-
n((
|
|
4214
|
-
}, [n]),
|
|
4215
|
-
n(
|
|
4210
|
+
), s = S((d) => {
|
|
4211
|
+
n((u) => u.includes(d) ? u.filter((p) => p !== d) : o ? [...u, d] : [d]);
|
|
4212
|
+
}, [n, o]), a = S((d) => {
|
|
4213
|
+
n((u) => u.includes(d) ? u : o ? [...u, d] : [d]);
|
|
4214
|
+
}, [n, o]), l = S((d) => {
|
|
4215
|
+
n((u) => u.filter((p) => p !== d));
|
|
4216
|
+
}, [n]), i = S(() => n([]), [n]), h = S((d) => e.includes(d), [e]), c = S((d) => {
|
|
4217
|
+
n(d === null ? [] : typeof d == "string" ? [d] : d);
|
|
4216
4218
|
}, [n]);
|
|
4217
4219
|
return {
|
|
4218
4220
|
/** IDs dos paineis expandidos */
|
|
@@ -4220,24 +4222,24 @@ function rs(A, t = [], o = !0) {
|
|
|
4220
4222
|
/** Para usar direto no Accordion.value */
|
|
4221
4223
|
value: o ? e : e[0] ?? null,
|
|
4222
4224
|
/** Setar expandidos (compativel com Mantine Accordion.onChange) */
|
|
4223
|
-
setExpanded:
|
|
4225
|
+
setExpanded: c,
|
|
4224
4226
|
toggle: s,
|
|
4225
4227
|
expand: a,
|
|
4226
4228
|
collapse: l,
|
|
4227
|
-
collapseAll:
|
|
4228
|
-
isExpanded:
|
|
4229
|
+
collapseAll: i,
|
|
4230
|
+
isExpanded: h
|
|
4229
4231
|
};
|
|
4230
4232
|
}
|
|
4231
4233
|
function ts(A, t = {}) {
|
|
4232
4234
|
const { debounceMs: o = 100 } = t, e = EA();
|
|
4233
|
-
|
|
4235
|
+
oe(() => {
|
|
4234
4236
|
if (!e || !A.current)
|
|
4235
4237
|
return;
|
|
4236
4238
|
const n = e.getState().scrollY;
|
|
4237
4239
|
n > 0 && requestAnimationFrame(() => {
|
|
4238
4240
|
A.current && (A.current.scrollTop = n);
|
|
4239
4241
|
});
|
|
4240
|
-
}, []),
|
|
4242
|
+
}, []), oe(() => {
|
|
4241
4243
|
if (!e || !A.current)
|
|
4242
4244
|
return;
|
|
4243
4245
|
const n = A.current;
|
|
@@ -4254,7 +4256,7 @@ function ts(A, t = {}) {
|
|
|
4254
4256
|
}
|
|
4255
4257
|
function os(A) {
|
|
4256
4258
|
const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s = _(n), a = _(!0);
|
|
4257
|
-
return
|
|
4259
|
+
return oe(() => {
|
|
4258
4260
|
if (a.current) {
|
|
4259
4261
|
a.current = !1, s.current = n;
|
|
4260
4262
|
return;
|
|
@@ -4263,19 +4265,19 @@ function os(A) {
|
|
|
4263
4265
|
}, [n, A]), n;
|
|
4264
4266
|
}
|
|
4265
4267
|
function ns(A) {
|
|
4266
|
-
const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = _(!1), s = _(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current,
|
|
4267
|
-
t ? (
|
|
4268
|
-
}, [t, o, e]),
|
|
4268
|
+
const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = _(!1), s = _(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, i = S((d) => {
|
|
4269
|
+
t ? (d !== void 0 && t.getState().setCustomState(e, d), t.getState().setCustomState(o, !0)) : (d !== void 0 && (s.current = d), n.current = !0);
|
|
4270
|
+
}, [t, o, e]), h = S(() => {
|
|
4269
4271
|
t ? t.getState().setCustomState(o, !1) : n.current = !1;
|
|
4270
|
-
}, [t, o]),
|
|
4272
|
+
}, [t, o]), c = S(() => {
|
|
4271
4273
|
t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(e)) : (n.current = !1, s.current = null);
|
|
4272
4274
|
}, [t, o, e]);
|
|
4273
4275
|
return {
|
|
4274
4276
|
isOpen: a,
|
|
4275
4277
|
data: l,
|
|
4276
|
-
open:
|
|
4277
|
-
close:
|
|
4278
|
-
closeAndClear:
|
|
4278
|
+
open: i,
|
|
4279
|
+
close: h,
|
|
4280
|
+
closeAndClear: c
|
|
4279
4281
|
};
|
|
4280
4282
|
}
|
|
4281
4283
|
const ss = ({
|