@archbase/admin 3.0.16 → 3.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1077 -1068
- package/package.json +20 -20
- package/dist/archbase-admin-3.0.16.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as A, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as A, jsxs as E, Fragment as vA } from "react/jsx-runtime";
|
|
2
|
+
import mA, { useState as fA, useRef as bA, useEffect as aA, useMemo as uA, useContext as IA, useCallback as U, createContext as HA, useLayoutEffect as GA, useReducer as He } from "react";
|
|
3
3
|
import { useArchbaseSecurityManager as Fe } from "@archbase/security";
|
|
4
4
|
import { useUncontrolled as JA, useMediaQuery as ge, useHotkeys as qe, useDisclosure as Ve, useFocusTrap as Ye, useForceUpdate as Ke } from "@mantine/hooks";
|
|
5
|
-
import { Flex as BA, useMantineColorScheme as
|
|
6
|
-
import { IconSun as Ie, IconMoonStars as Ee, IconTerminal as er, IconSearch as YA, IconAlertCircle as rr, IconDots as Re, IconChevronRight as oe, IconChevronDown as or, IconX as Le, IconChevronLeft as nr, IconHome2 as tr, IconDashboard as sr, IconUsers as lr, IconListSearch as
|
|
7
|
-
import { useArchbaseAppContext as ne, getI18nextInstance as
|
|
8
|
-
import { BRFlag as UA, USFlag as
|
|
5
|
+
import { Flex as BA, useMantineColorScheme as sA, Menu as nA, ActionIcon as LA, Group as xA, Tooltip as SA, Button as je, ScrollArea as zA, Badge as re, Center as VA, Image as Xe, useMantineTheme as pA, px as cA, Burger as Je, Box as N, Avatar as WA, Text as kA, Stack as j, Skeleton as dA, Paper as We, NavLink as be, Kbd as ve, UnstyledButton as ZA, Collapse as Ze, TextInput as xe, Indicator as _e, Transition as Ar, Divider as _A, AppShell as QA, Drawer as Se } from "@mantine/core";
|
|
6
|
+
import { IconSun as Ie, IconMoonStars as Ee, IconTerminal as er, IconSearch as YA, IconAlertCircle as rr, IconDots as Re, IconChevronRight as oe, IconChevronDown as or, IconX as Le, IconChevronLeft as nr, IconHome2 as tr, IconDashboard as sr, IconUsers as lr, IconListSearch as Te, IconUserPlus as ir, IconNews as ar, IconFilePlus as cr, IconSettings as dr } from "@tabler/icons-react";
|
|
7
|
+
import { useArchbaseAppContext as ne, getI18nextInstance as eA, useArchbaseTranslation as te, archbaseI18next as wA, useArchbaseValidator as ur, ARCHBASE_IOC_API_TYPE as hr } from "@archbase/core";
|
|
8
|
+
import { BRFlag as UA, USFlag as De, ESFlag as Ae, VEFlag as fr, UYFlag as pr, SVFlag as gr, PYFlag as br, PEFlag as mr, PAFlag as kr, NIFlag as Cr, MXFlag as yr, HNFlag as wr, GTFlag as vr, ECFlag as xr, DOFlag as Sr, CUFlag as Ir, CRFlag as Er, COFlag as Rr, CLFlag as Lr, BOFlag as Tr, ARFlag as Dr } from "mantine-flagpack";
|
|
9
9
|
import { spotlight as zr, Spotlight as NA } from "@mantine/spotlight";
|
|
10
10
|
import { useNavigate as FA, useLocation as qA, matchPath as me } from "react-router";
|
|
11
11
|
import { Routes as ze, useParams as Pr, useLocation as se, matchPath as Mr, Route as ee, useSearchParams as Pe, useNavigate as Or } from "react-router-dom";
|
|
12
12
|
import { useMediaQuery as $r } from "usehooks-ts";
|
|
13
13
|
import { useArchbaseNavigateParams as Qr, useArchbaseVisible as Nr, ArchbaseNotifications as Gr, ArchbaseAvatarEdit as Ur, ArchbaseEdit as XA } from "@archbase/components";
|
|
14
|
-
import { SubMenu as Br, MenuItem as
|
|
14
|
+
import { SubMenu as Br, MenuItem as ke, menuClasses as _, Sidebar as Me, Menu as Oe, sidebarClasses as $e } from "react-pro-sidebar";
|
|
15
15
|
import Hr from "@rehooks/component-size";
|
|
16
16
|
import { ArchbaseAdvancedTabs as Fr } from "@archbase/layout";
|
|
17
17
|
import { useArchbaseStore as qr, useArchbaseRemoteServiceApi as Vr, useArchbaseRemoteDataSource as Yr } from "@archbase/data";
|
|
18
18
|
import { ArchbaseFormModalTemplate as Kr } from "@archbase/template";
|
|
19
19
|
import { create as jr } from "zustand";
|
|
20
|
-
const jA =
|
|
20
|
+
const jA = mA.createContext({}), Xr = ({
|
|
21
21
|
navigationData: e,
|
|
22
22
|
user: o,
|
|
23
23
|
owner: s,
|
|
@@ -29,77 +29,77 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
29
29
|
onNavigationDataChange: c,
|
|
30
30
|
initialSidebarCollapsed: l
|
|
31
31
|
}) => {
|
|
32
|
-
const [u, d] =
|
|
32
|
+
const [u, d] = fA(l), [h, p] = fA(!1), [b, k] = fA(() => i === !0), [y, f] = fA(null), g = bA(!1), [w, v] = JA({
|
|
33
33
|
value: c !== void 0 ? e : void 0,
|
|
34
34
|
defaultValue: i ? [] : e,
|
|
35
35
|
finalValue: [],
|
|
36
36
|
onChange: c
|
|
37
37
|
});
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
const { securityManager:
|
|
38
|
+
aA(() => {
|
|
39
|
+
}, [w, i]);
|
|
40
|
+
const { securityManager: m } = Fe({
|
|
41
41
|
resourceName: n?.navigationResourceName ? n.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
42
42
|
resourceDescription: n?.navigationResourceDescription ? n.navigationResourceDescription : "archbase:Navegação",
|
|
43
43
|
enableSecurity: i
|
|
44
44
|
});
|
|
45
|
-
return
|
|
45
|
+
return aA(() => {
|
|
46
46
|
g.current = !1;
|
|
47
|
-
}, [o?.id]),
|
|
47
|
+
}, [o?.id]), aA(() => {
|
|
48
48
|
if (!i) {
|
|
49
|
-
|
|
49
|
+
k(!1);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
if (g.current)
|
|
53
53
|
return;
|
|
54
54
|
e.filter((Q) => Q.showInSidebar).forEach((Q) => {
|
|
55
|
-
|
|
55
|
+
m.registerAction(Q.label, Q.label), Q?.links?.forEach((D) => m.registerAction(`${Q.label} -> ${D.label}`, `${Q.label} -> ${D.label}`));
|
|
56
56
|
});
|
|
57
57
|
const $ = () => {
|
|
58
58
|
g.current = !0;
|
|
59
|
-
const Q = e.map((
|
|
60
|
-
...
|
|
61
|
-
disabled: !
|
|
62
|
-
links:
|
|
63
|
-
const
|
|
59
|
+
const Q = e.map((D) => ({
|
|
60
|
+
...D,
|
|
61
|
+
disabled: !m.hasPermission(D.label),
|
|
62
|
+
links: D.links && D.links.map((I) => {
|
|
63
|
+
const T = m.hasPermission(`${D.label} -> ${I.label}`);
|
|
64
64
|
return {
|
|
65
|
-
...
|
|
66
|
-
disabled: !
|
|
65
|
+
...I,
|
|
66
|
+
disabled: !T
|
|
67
67
|
};
|
|
68
68
|
})
|
|
69
69
|
}));
|
|
70
|
-
v(Q),
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
70
|
+
v(Q), k(!1), f(null);
|
|
71
|
+
}, V = !m.isLoading() && !m.isError();
|
|
72
|
+
if (m.isError()) {
|
|
73
73
|
g.current = !0;
|
|
74
|
-
const Q =
|
|
75
|
-
f(Q),
|
|
74
|
+
const Q = m.getError() || "Erro ao carregar permissões de navegação";
|
|
75
|
+
f(Q), k(!1), v(e);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
78
|
+
if (V) {
|
|
79
79
|
$();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
let
|
|
82
|
+
k(!0), f(null);
|
|
83
|
+
let z = !1;
|
|
84
84
|
const O = setInterval(() => {
|
|
85
|
-
if (!
|
|
85
|
+
if (!z && m.isError()) {
|
|
86
86
|
clearInterval(O), g.current = !0;
|
|
87
|
-
const Q =
|
|
88
|
-
f(Q),
|
|
87
|
+
const Q = m.getError() || "Erro ao carregar permissões de navegação";
|
|
88
|
+
f(Q), k(!1), v(e);
|
|
89
89
|
}
|
|
90
|
-
}, 100),
|
|
91
|
-
|
|
90
|
+
}, 100), G = setTimeout(() => {
|
|
91
|
+
z || (clearInterval(O), k((Q) => Q && (g.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), v(e), !1)));
|
|
92
92
|
}, 3e3);
|
|
93
|
-
return
|
|
94
|
-
|
|
93
|
+
return m.apply(() => {
|
|
94
|
+
z || (clearInterval(O), clearTimeout(G), $());
|
|
95
95
|
}), () => {
|
|
96
|
-
|
|
96
|
+
z = !0, clearInterval(O), clearTimeout(G);
|
|
97
97
|
};
|
|
98
|
-
}, [o?.id, i, e,
|
|
98
|
+
}, [o?.id, i, e, m, v]), /* @__PURE__ */ A(
|
|
99
99
|
jA.Provider,
|
|
100
100
|
{
|
|
101
101
|
value: {
|
|
102
|
-
navigationData:
|
|
102
|
+
navigationData: w,
|
|
103
103
|
setNavigationData: v,
|
|
104
104
|
user: o,
|
|
105
105
|
owner: s,
|
|
@@ -110,27 +110,27 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
110
110
|
hidden: h,
|
|
111
111
|
setHidden: p,
|
|
112
112
|
onNavigationDataChange: c,
|
|
113
|
-
isLoadingPermissions:
|
|
114
|
-
permissionsError:
|
|
113
|
+
isLoadingPermissions: b,
|
|
114
|
+
permissionsError: y
|
|
115
115
|
},
|
|
116
116
|
children: a
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
}, dn = ({ children: e }) => /* @__PURE__ */ A(BA, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), Jr = () => {
|
|
120
|
-
const e = ne(), { colorScheme: o } =
|
|
121
|
-
|
|
120
|
+
const e = ne(), { colorScheme: o } = sA(), s = o === "dark", [r, t] = fA(eA().language);
|
|
121
|
+
aA(() => {
|
|
122
122
|
const c = (l) => {
|
|
123
123
|
t(l);
|
|
124
124
|
};
|
|
125
|
-
return
|
|
126
|
-
|
|
125
|
+
return eA().on("languageChanged", c), () => {
|
|
126
|
+
eA().off("languageChanged", c);
|
|
127
127
|
};
|
|
128
128
|
}, []);
|
|
129
129
|
const a = (c) => {
|
|
130
130
|
if (!c)
|
|
131
131
|
return /* @__PURE__ */ A(UA, { size: 24 });
|
|
132
132
|
if (c === "en" || c === "en-US")
|
|
133
|
-
return /* @__PURE__ */ A(
|
|
133
|
+
return /* @__PURE__ */ A(De, { size: 24 });
|
|
134
134
|
if (c === "pt-BR")
|
|
135
135
|
return /* @__PURE__ */ A(UA, { size: 24 });
|
|
136
136
|
if (c.includes("es"))
|
|
@@ -139,9 +139,9 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
139
139
|
case "es-ES":
|
|
140
140
|
return /* @__PURE__ */ A(Ae, { size: 24 });
|
|
141
141
|
case "es-AR":
|
|
142
|
-
return /* @__PURE__ */ A(Tr, { size: 24 });
|
|
143
|
-
case "es-BO":
|
|
144
142
|
return /* @__PURE__ */ A(Dr, { size: 24 });
|
|
143
|
+
case "es-BO":
|
|
144
|
+
return /* @__PURE__ */ A(Tr, { size: 24 });
|
|
145
145
|
case "es-CL":
|
|
146
146
|
return /* @__PURE__ */ A(Lr, { size: 24 });
|
|
147
147
|
case "es-CO":
|
|
@@ -161,9 +161,9 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
161
161
|
case "es-MX":
|
|
162
162
|
return /* @__PURE__ */ A(yr, { size: 24 });
|
|
163
163
|
case "es-NI":
|
|
164
|
-
return /* @__PURE__ */ A(kr, { size: 24 });
|
|
165
|
-
case "es-PA":
|
|
166
164
|
return /* @__PURE__ */ A(Cr, { size: 24 });
|
|
165
|
+
case "es-PA":
|
|
166
|
+
return /* @__PURE__ */ A(kr, { size: 24 });
|
|
167
167
|
case "es-PE":
|
|
168
168
|
return /* @__PURE__ */ A(mr, { size: 24 });
|
|
169
169
|
case "es-PY":
|
|
@@ -171,9 +171,9 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
171
171
|
case "es-SV":
|
|
172
172
|
return /* @__PURE__ */ A(gr, { size: 24 });
|
|
173
173
|
case "es-UY":
|
|
174
|
-
return /* @__PURE__ */ A(fr, { size: 24 });
|
|
175
|
-
case "es-VE":
|
|
176
174
|
return /* @__PURE__ */ A(pr, { size: 24 });
|
|
175
|
+
case "es-VE":
|
|
176
|
+
return /* @__PURE__ */ A(fr, { size: 24 });
|
|
177
177
|
default:
|
|
178
178
|
return /* @__PURE__ */ A(Ae, { size: 24 });
|
|
179
179
|
}
|
|
@@ -181,7 +181,7 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
181
181
|
}, i = () => {
|
|
182
182
|
if (e.languages)
|
|
183
183
|
return e.languages.filter((c) => c).map((c) => /* @__PURE__ */ A(
|
|
184
|
-
|
|
184
|
+
nA.Item,
|
|
185
185
|
{
|
|
186
186
|
onClick: () => n(c.lang),
|
|
187
187
|
leftSection: a(c.lang),
|
|
@@ -190,17 +190,17 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
190
190
|
c.name
|
|
191
191
|
));
|
|
192
192
|
}, n = (c) => {
|
|
193
|
-
|
|
193
|
+
eA().changeLanguage(c);
|
|
194
194
|
};
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */ A(
|
|
197
|
-
/* @__PURE__ */ A(
|
|
195
|
+
return /* @__PURE__ */ E(nA, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
196
|
+
/* @__PURE__ */ A(nA.Target, { children: /* @__PURE__ */ A(LA, { variant: "transparent", color: s ? "white" : "blue", title: eA().t("toggleLanguage"), children: a(r) }) }),
|
|
197
|
+
/* @__PURE__ */ A(nA.Dropdown, { children: i() })
|
|
198
198
|
] });
|
|
199
199
|
}, Wr = () => {
|
|
200
|
-
const e = ne(), { colorScheme: o } =
|
|
200
|
+
const e = ne(), { colorScheme: o } = sA(), { t: s, i18n: r } = te(), t = (n) => n === "en" ? /* @__PURE__ */ A(De, { size: 24 }) : n === "pt-BR" ? /* @__PURE__ */ A(UA, { size: 24 }) : n === "es" ? /* @__PURE__ */ A(Ae, { size: 24 }) : /* @__PURE__ */ A(UA, { size: 24 }), a = () => {
|
|
201
201
|
if (e.languages)
|
|
202
202
|
return e.languages.filter((n) => n).map((n) => /* @__PURE__ */ A(
|
|
203
|
-
|
|
203
|
+
nA.Item,
|
|
204
204
|
{
|
|
205
205
|
onClick: () => i(n.lang),
|
|
206
206
|
leftSection: t(n.lang),
|
|
@@ -211,8 +211,8 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
211
211
|
}, i = (n) => {
|
|
212
212
|
r.changeLanguage(n);
|
|
213
213
|
};
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */ A(
|
|
214
|
+
return /* @__PURE__ */ E(nA, { children: [
|
|
215
|
+
/* @__PURE__ */ A(nA.Target, { children: /* @__PURE__ */ E(
|
|
216
216
|
xA,
|
|
217
217
|
{
|
|
218
218
|
w: "100%",
|
|
@@ -222,21 +222,21 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
222
222
|
variant: "transparent",
|
|
223
223
|
fw: 400,
|
|
224
224
|
gap: 4,
|
|
225
|
-
title:
|
|
225
|
+
title: eA().t("archbase:toggleLanguage"),
|
|
226
226
|
children: [
|
|
227
227
|
t(r.language),
|
|
228
228
|
`${e.languages.find((n) => n.lang === r.language)?.name ?? "Português"}`
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
231
|
) }),
|
|
232
|
-
/* @__PURE__ */ A(
|
|
232
|
+
/* @__PURE__ */ A(nA.Dropdown, { children: a() })
|
|
233
233
|
] });
|
|
234
234
|
}, Zr = ({
|
|
235
235
|
toggleColorScheme: e,
|
|
236
236
|
sunColor: o = "white",
|
|
237
237
|
moonColor: s = "blue"
|
|
238
238
|
}) => {
|
|
239
|
-
const { t: r } = te(), { colorScheme: t, toggleColorScheme: a } =
|
|
239
|
+
const { t: r } = te(), { colorScheme: t, toggleColorScheme: a } = sA(), i = () => {
|
|
240
240
|
e ? e() : a();
|
|
241
241
|
}, n = t === "dark";
|
|
242
242
|
return /* @__PURE__ */ A(
|
|
@@ -245,7 +245,7 @@ const jA = bA.createContext({}), Xr = ({
|
|
|
245
245
|
variant: "transparent",
|
|
246
246
|
color: n ? o : s,
|
|
247
247
|
onClick: () => i(),
|
|
248
|
-
title:
|
|
248
|
+
title: eA().t("archbase:toggleColorScheme"),
|
|
249
249
|
children: n ? /* @__PURE__ */ A(Ie, { size: "1.5rem" }) : /* @__PURE__ */ A(Ee, { size: "1.5rem" })
|
|
250
250
|
}
|
|
251
251
|
);
|
|
@@ -255,16 +255,16 @@ function Ao({ category: e, label: o, color: s, description: r, image: t, onClick
|
|
|
255
255
|
NA.Action,
|
|
256
256
|
{
|
|
257
257
|
onClick: a,
|
|
258
|
-
label: `${
|
|
259
|
-
description: r ?
|
|
260
|
-
leftSection: t ? /* @__PURE__ */ A(VA, { children: /* @__PURE__ */ A(Xe, { src: t, alt:
|
|
261
|
-
rightSection: e ? /* @__PURE__ */ A(re, { color: s, size: "sm", children:
|
|
258
|
+
label: `${eA().t(o || "")}`,
|
|
259
|
+
description: r ? eA().t(r) : void 0,
|
|
260
|
+
leftSection: t ? /* @__PURE__ */ A(VA, { children: /* @__PURE__ */ A(Xe, { src: t, alt: eA().t(o || ""), width: 24, height: 24 }) }) : void 0,
|
|
261
|
+
rightSection: e ? /* @__PURE__ */ A(re, { color: s, size: "sm", children: eA().t(e) }) : void 0
|
|
262
262
|
},
|
|
263
263
|
o
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
const eo = ({ navigationData: e, color: o }) => {
|
|
267
|
-
const [s, r] =
|
|
267
|
+
const [s, r] = fA(""), t = FA(), { t: a } = te(), i = uA(() => {
|
|
268
268
|
const c = new Array();
|
|
269
269
|
return e.forEach((l) => {
|
|
270
270
|
l.links ? l.links.forEach((u) => {
|
|
@@ -293,9 +293,9 @@ const eo = ({ navigationData: e, color: o }) => {
|
|
|
293
293
|
const l = `${a(c.label || "")}`;
|
|
294
294
|
return l && l.toLowerCase().includes(s.toLowerCase().trim());
|
|
295
295
|
}).map((c) => /* @__PURE__ */ A(Ao, { ...c }, c.id));
|
|
296
|
-
return /* @__PURE__ */ A(vA, { children: i && i.length > 0 ? /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ A(vA, { children: i && i.length > 0 ? /* @__PURE__ */ E(vA, { children: [
|
|
297
297
|
/* @__PURE__ */ A(SA, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ A(je, { color: o, leftSection: /* @__PURE__ */ A(er, { size: "24px" }), onClick: () => zr.open() }) }),
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ E(
|
|
299
299
|
NA.Root,
|
|
300
300
|
{
|
|
301
301
|
shortcut: ["mod + M", "/"],
|
|
@@ -303,7 +303,7 @@ const eo = ({ navigationData: e, color: o }) => {
|
|
|
303
303
|
query: s,
|
|
304
304
|
children: [
|
|
305
305
|
/* @__PURE__ */ A(NA.Search, { placeholder: `${a("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ A(YA, { size: "1.2rem" }) }),
|
|
306
|
-
/* @__PURE__ */ A(zA.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ A(NA.ActionsList, { children: n.length > 0 ? n : /* @__PURE__ */ A(NA.Empty, { children:
|
|
306
|
+
/* @__PURE__ */ A(zA.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ A(NA.ActionsList, { children: n.length > 0 ? n : /* @__PURE__ */ A(NA.Empty, { children: eA().t("archbase:Nenhum resultado...") }) }) })
|
|
307
307
|
]
|
|
308
308
|
}
|
|
309
309
|
)
|
|
@@ -323,31 +323,31 @@ const eo = ({ navigationData: e, color: o }) => {
|
|
|
323
323
|
hideAutoHeaderActionsOnUserMenuBreakPoint: d,
|
|
324
324
|
withDividerAfterUserMenuToggleColorScheme: h = !0,
|
|
325
325
|
user: p,
|
|
326
|
-
navigationData:
|
|
327
|
-
logo:
|
|
328
|
-
headerActions:
|
|
326
|
+
navigationData: b = [],
|
|
327
|
+
logo: k,
|
|
328
|
+
headerActions: y,
|
|
329
329
|
styleLogo: f,
|
|
330
330
|
showLanguageSelector: g = !1,
|
|
331
|
-
sideBarHiddenBreakPoint:
|
|
331
|
+
sideBarHiddenBreakPoint: w,
|
|
332
332
|
headerLeftContent: v,
|
|
333
|
-
toggleColorScheme:
|
|
334
|
-
logoLeftSection:
|
|
333
|
+
toggleColorScheme: m,
|
|
334
|
+
logoLeftSection: M,
|
|
335
335
|
logoRightSection: $,
|
|
336
|
-
showBurger:
|
|
337
|
-
showCommands:
|
|
338
|
-
sunColor:
|
|
336
|
+
showBurger: V = !0,
|
|
337
|
+
showCommands: rA = !0,
|
|
338
|
+
sunColor: z,
|
|
339
339
|
moonColor: O,
|
|
340
|
-
styles:
|
|
340
|
+
styles: G
|
|
341
341
|
}) => {
|
|
342
|
-
const Q =
|
|
343
|
-
`(max-width: ${
|
|
344
|
-
),
|
|
345
|
-
`(max-width: ${d ?
|
|
342
|
+
const Q = pA(), { colorScheme: D, toggleColorScheme: I } = sA(), T = IA(jA), Y = ge(
|
|
343
|
+
`(max-width: ${w ? cA(w) : Q.breakpoints.md})`
|
|
344
|
+
), B = ge(
|
|
345
|
+
`(max-width: ${d ? cA(d) : Q.breakpoints.md})`
|
|
346
346
|
);
|
|
347
|
-
let
|
|
348
|
-
return c && (l = !
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
|
|
347
|
+
let X = !1, W = !1;
|
|
348
|
+
return c && (l = !B, u = !B, o = B, s = B, i = B, h = B, g && (W = !B, X = B)), /* @__PURE__ */ E(vA, { children: [
|
|
349
|
+
/* @__PURE__ */ E(BA, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
350
|
+
M,
|
|
351
351
|
/* @__PURE__ */ A(
|
|
352
352
|
"img",
|
|
353
353
|
{
|
|
@@ -356,30 +356,30 @@ const eo = ({ navigationData: e, color: o }) => {
|
|
|
356
356
|
...f
|
|
357
357
|
},
|
|
358
358
|
alt: "logo",
|
|
359
|
-
src:
|
|
359
|
+
src: k
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
362
|
$
|
|
363
363
|
] }),
|
|
364
|
-
|
|
364
|
+
V && /* @__PURE__ */ A(
|
|
365
365
|
Je,
|
|
366
366
|
{
|
|
367
|
-
opened:
|
|
368
|
-
onClick: () =>
|
|
367
|
+
opened: T.hidden ? T.hidden : !1,
|
|
368
|
+
onClick: () => T.setHidden(!T.hidden),
|
|
369
369
|
size: "sm",
|
|
370
370
|
color: Q.colors.gray[7],
|
|
371
371
|
mx: { base: "xs", xs: "lg", sm: "xl" },
|
|
372
|
-
display:
|
|
372
|
+
display: Y ? "" : "none"
|
|
373
373
|
}
|
|
374
374
|
),
|
|
375
|
-
/* @__PURE__ */ A("div", { children:
|
|
376
|
-
/* @__PURE__ */ A(
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
l &&
|
|
379
|
-
u && /* @__PURE__ */ A(Zr, { toggleColorScheme:
|
|
380
|
-
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */ A(
|
|
375
|
+
/* @__PURE__ */ A("div", { children: rA && /* @__PURE__ */ A(eo, { navigationData: b }) }),
|
|
376
|
+
/* @__PURE__ */ A(N, { style: { flex: 1 }, children: v }),
|
|
377
|
+
/* @__PURE__ */ E(_r, { children: [
|
|
378
|
+
l && y,
|
|
379
|
+
u && /* @__PURE__ */ A(Zr, { toggleColorScheme: m, sunColor: z, moonColor: O }),
|
|
380
|
+
W && /* @__PURE__ */ A(Jr, {}),
|
|
381
|
+
/* @__PURE__ */ E(nA, { shadow: "md", width: 200, position: "bottom-end", styles: G?.menu, children: [
|
|
382
|
+
/* @__PURE__ */ A(nA.Target, { children: /* @__PURE__ */ E("div", { children: [
|
|
383
383
|
/* @__PURE__ */ A(
|
|
384
384
|
WA,
|
|
385
385
|
{
|
|
@@ -407,31 +407,31 @@ const eo = ({ navigationData: e, color: o }) => {
|
|
|
407
407
|
borderRadius: 50,
|
|
408
408
|
backgroundColor: "green"
|
|
409
409
|
},
|
|
410
|
-
children: /* @__PURE__ */ A(
|
|
410
|
+
children: /* @__PURE__ */ A(kA, { size: "xs", c: "white", children: "A" })
|
|
411
411
|
}
|
|
412
412
|
) : null
|
|
413
413
|
] }) }),
|
|
414
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ E(nA.Dropdown, { children: [
|
|
415
415
|
e,
|
|
416
|
-
s && /* @__PURE__ */ A(
|
|
416
|
+
s && /* @__PURE__ */ A(nA.Label, { children: `${eA().t("archbase:Opções")}` }),
|
|
417
417
|
i && n,
|
|
418
418
|
o && /* @__PURE__ */ A(
|
|
419
|
-
|
|
419
|
+
nA.Item,
|
|
420
420
|
{
|
|
421
|
-
leftSection:
|
|
422
|
-
onClick:
|
|
423
|
-
children: `${
|
|
421
|
+
leftSection: D === "dark" ? /* @__PURE__ */ A(Ie, { size: r }) : /* @__PURE__ */ A(Ee, { size: r }),
|
|
422
|
+
onClick: m || I,
|
|
423
|
+
children: `${eA().t("archbase:toggleColorScheme")}`
|
|
424
424
|
}
|
|
425
425
|
),
|
|
426
|
-
|
|
427
|
-
h && /* @__PURE__ */ A(
|
|
426
|
+
X && /* @__PURE__ */ A(Wr, {}),
|
|
427
|
+
h && /* @__PURE__ */ A(nA.Divider, {}),
|
|
428
428
|
t && a
|
|
429
429
|
] })
|
|
430
430
|
] })
|
|
431
431
|
] })
|
|
432
432
|
] });
|
|
433
433
|
};
|
|
434
|
-
function
|
|
434
|
+
function Ce(e, o, s, r, t, a, i, n, c, l) {
|
|
435
435
|
const u = a ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, d = a ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, h = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", p = "0.5";
|
|
436
436
|
if (r.links) {
|
|
437
437
|
if (!(r.disabled && r.hideDisabledItem))
|
|
@@ -440,25 +440,25 @@ function ke(e, o, s, r, t, a, i, n, c, l) {
|
|
|
440
440
|
{
|
|
441
441
|
rootStyles: {
|
|
442
442
|
fontSize: "16px",
|
|
443
|
-
[`.${
|
|
443
|
+
[`.${_.button}`]: {
|
|
444
444
|
"&:hover": {
|
|
445
|
-
[`.${
|
|
445
|
+
[`.${_.icon}`]: {
|
|
446
446
|
color: "white"
|
|
447
447
|
},
|
|
448
|
-
[`.${
|
|
448
|
+
[`.${_.label}`]: {
|
|
449
449
|
color: "white"
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
},
|
|
453
|
-
[`.${
|
|
453
|
+
[`.${_.subMenuContent}`]: {
|
|
454
454
|
width: o && l
|
|
455
455
|
},
|
|
456
|
-
[`.${
|
|
456
|
+
[`.${_.disabled}`]: {
|
|
457
457
|
opacity: p,
|
|
458
|
-
[`.${
|
|
458
|
+
[`.${_.icon}`]: {
|
|
459
459
|
color: h + " !important"
|
|
460
460
|
},
|
|
461
|
-
[`.${
|
|
461
|
+
[`.${_.label}`]: {
|
|
462
462
|
color: h + " !important"
|
|
463
463
|
}
|
|
464
464
|
}
|
|
@@ -468,81 +468,81 @@ function ke(e, o, s, r, t, a, i, n, c, l) {
|
|
|
468
468
|
defaultOpen: !r.disabled,
|
|
469
469
|
label: o ? "" : wA.t(r.label),
|
|
470
470
|
disabled: r.disabled,
|
|
471
|
-
children: r.links && r.links.filter((
|
|
472
|
-
|
|
471
|
+
children: r.links && r.links.filter((b) => b.showInSidebar === !0 && (!b.disabled || !b.hideDisabledItem)).map((b, k) => /* @__PURE__ */ A(
|
|
472
|
+
ke,
|
|
473
473
|
{
|
|
474
|
-
onClick: () => s(
|
|
474
|
+
onClick: () => s(b),
|
|
475
475
|
rootStyles: {
|
|
476
|
-
[`.${
|
|
476
|
+
[`.${_.icon}`]: {
|
|
477
477
|
background: u,
|
|
478
|
-
color: n &&
|
|
478
|
+
color: n && b.link === i ? "white" : d
|
|
479
479
|
},
|
|
480
|
-
[`.${
|
|
481
|
-
color: n &&
|
|
480
|
+
[`.${_.label}`]: {
|
|
481
|
+
color: n && b.link === i ? "white" : c
|
|
482
482
|
},
|
|
483
|
-
[`.${
|
|
483
|
+
[`.${_.button}`]: {
|
|
484
484
|
paddingLeft: "40px !important",
|
|
485
485
|
"&:hover": {
|
|
486
|
-
[`.${
|
|
486
|
+
[`.${_.icon}`]: {
|
|
487
487
|
color: "white"
|
|
488
488
|
},
|
|
489
|
-
[`.${
|
|
489
|
+
[`.${_.label}`]: {
|
|
490
490
|
color: "white"
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
},
|
|
494
|
-
[`.${
|
|
494
|
+
[`.${_.disabled}`]: {
|
|
495
495
|
opacity: p,
|
|
496
|
-
[`.${
|
|
496
|
+
[`.${_.icon}`]: {
|
|
497
497
|
background: (u || "") + " !important",
|
|
498
498
|
color: h + " !important"
|
|
499
499
|
},
|
|
500
|
-
[`.${
|
|
500
|
+
[`.${_.label}`]: {
|
|
501
501
|
color: h + " !important"
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
},
|
|
505
|
-
id:
|
|
506
|
-
icon:
|
|
507
|
-
disabled: typeof
|
|
508
|
-
active: n &&
|
|
509
|
-
children: wA.t(
|
|
505
|
+
id: b.label,
|
|
506
|
+
icon: b.icon,
|
|
507
|
+
disabled: typeof b.disabled == "function" ? b.disabled() : b.disabled,
|
|
508
|
+
active: n && b.link === i,
|
|
509
|
+
children: wA.t(b.label)
|
|
510
510
|
},
|
|
511
|
-
|
|
511
|
+
k
|
|
512
512
|
))
|
|
513
513
|
},
|
|
514
514
|
t
|
|
515
515
|
) });
|
|
516
516
|
} else if (r.showInSidebar && (!r.disabled || !r.hideDisabledItem))
|
|
517
517
|
return /* @__PURE__ */ A(SA, { disabled: !o, label: wA.t(r.label), children: /* @__PURE__ */ A(
|
|
518
|
-
|
|
518
|
+
ke,
|
|
519
519
|
{
|
|
520
520
|
rootStyles: {
|
|
521
521
|
fontSize: "16px",
|
|
522
|
-
[`.${
|
|
522
|
+
[`.${_.button}`]: {
|
|
523
523
|
"&:hover": {
|
|
524
|
-
[`.${
|
|
524
|
+
[`.${_.icon}`]: {
|
|
525
525
|
color: "white"
|
|
526
526
|
},
|
|
527
|
-
[`.${
|
|
527
|
+
[`.${_.label}`]: {
|
|
528
528
|
color: "white"
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
},
|
|
532
|
-
[`.${
|
|
532
|
+
[`.${_.icon}`]: {
|
|
533
533
|
background: u,
|
|
534
534
|
color: n && r.link === i ? "white" : d
|
|
535
535
|
},
|
|
536
|
-
[`.${
|
|
536
|
+
[`.${_.label}`]: {
|
|
537
537
|
color: n && r.link === i ? "white" : c
|
|
538
538
|
},
|
|
539
|
-
[`.${
|
|
539
|
+
[`.${_.disabled}`]: {
|
|
540
540
|
opacity: p,
|
|
541
|
-
[`.${
|
|
541
|
+
[`.${_.icon}`]: {
|
|
542
542
|
background: (u || "") + " !important",
|
|
543
543
|
color: h + " !important"
|
|
544
544
|
},
|
|
545
|
-
[`.${
|
|
545
|
+
[`.${_.label}`]: {
|
|
546
546
|
color: h + " !important"
|
|
547
547
|
}
|
|
548
548
|
}
|
|
@@ -594,7 +594,7 @@ const oo = (e) => ({
|
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
}), no = (e, o, s, r, t, a, i, n, c, l, u) => {
|
|
597
|
-
const d = oo(), h = a ? {} : { padding: s ? `0 ${(t - r) / 2}px` : "0 20px" }, p = a ? {} : { display: "none" },
|
|
597
|
+
const d = oo(), h = a ? {} : { padding: s ? `0 ${(t - r) / 2}px` : "0 20px" }, p = a ? {} : { display: "none" }, b = i ? e === "dark" ? o.colors[o.primaryColor][8] : o.colors[o.primaryColor][0] : void 0;
|
|
598
598
|
return {
|
|
599
599
|
root: {
|
|
600
600
|
fontSize: "14px",
|
|
@@ -603,9 +603,9 @@ const oo = (e) => ({
|
|
|
603
603
|
color: o.white
|
|
604
604
|
},
|
|
605
605
|
icon: {
|
|
606
|
-
background:
|
|
606
|
+
background: b,
|
|
607
607
|
color: u,
|
|
608
|
-
[`&.${
|
|
608
|
+
[`&.${_.disabled}`]: {
|
|
609
609
|
color: d[e].menu.disabled.color
|
|
610
610
|
}
|
|
611
611
|
},
|
|
@@ -617,21 +617,21 @@ const oo = (e) => ({
|
|
|
617
617
|
backgroundColor: e === "dark" ? o.colors.dark[8] : o.colors[o.primaryColor][0]
|
|
618
618
|
}),
|
|
619
619
|
button: {
|
|
620
|
-
[`&.${
|
|
620
|
+
[`&.${_.disabled}`]: {
|
|
621
621
|
color: d[e].menu.disabled.color
|
|
622
622
|
},
|
|
623
623
|
"&:hover": {
|
|
624
624
|
backgroundColor: o.colors[o.primaryColor][6],
|
|
625
625
|
color: o.white
|
|
626
626
|
},
|
|
627
|
-
[`&.${
|
|
627
|
+
[`&.${_.active}`]: {
|
|
628
628
|
backgroundColor: o.colors[o.primaryColor][6]
|
|
629
629
|
},
|
|
630
630
|
height: n,
|
|
631
631
|
...h
|
|
632
632
|
},
|
|
633
|
-
label: ({ open:
|
|
634
|
-
fontWeight:
|
|
633
|
+
label: ({ open: k }) => ({
|
|
634
|
+
fontWeight: k ? 600 : void 0,
|
|
635
635
|
color: l,
|
|
636
636
|
"&:hover": {
|
|
637
637
|
color: o.white
|
|
@@ -640,7 +640,7 @@ const oo = (e) => ({
|
|
|
640
640
|
};
|
|
641
641
|
};
|
|
642
642
|
function to(e, o, s, r, t, a, i, n, c, l, u) {
|
|
643
|
-
return /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ E(
|
|
644
644
|
Me,
|
|
645
645
|
{
|
|
646
646
|
ref: e,
|
|
@@ -652,12 +652,12 @@ function to(e, o, s, r, t, a, i, n, c, l, u) {
|
|
|
652
652
|
overflowY: "hidden",
|
|
653
653
|
left: 0,
|
|
654
654
|
right: 0,
|
|
655
|
-
height: i ? "calc(100vh - 28px)" : `${
|
|
655
|
+
height: i ? "calc(100vh - 28px)" : `${cA(n)}px`
|
|
656
656
|
}
|
|
657
657
|
},
|
|
658
658
|
collapsed: o,
|
|
659
|
-
width: `${
|
|
660
|
-
collapsedWidth: `${
|
|
659
|
+
width: `${cA(s)}px`,
|
|
660
|
+
collapsedWidth: `${cA(r)}px`,
|
|
661
661
|
children: [
|
|
662
662
|
c && /* @__PURE__ */ A(vA, { children: c }),
|
|
663
663
|
/* @__PURE__ */ A(zA, { style: { overflowY: "auto", overflowX: "hidden", height: n }, children: /* @__PURE__ */ A(Oe, { rootStyles: { background: u }, menuItemStyles: t, closeOnClick: !0, children: a && /* @__PURE__ */ A(vA, { children: a }) }) }),
|
|
@@ -671,9 +671,9 @@ function ye({
|
|
|
671
671
|
collapsed: o = !1,
|
|
672
672
|
backgroundColor: s
|
|
673
673
|
}) {
|
|
674
|
-
const r =
|
|
674
|
+
const r = pA(), { colorScheme: t } = sA(), a = s ?? (t === "dark" ? r.colors.dark[7] : r.white);
|
|
675
675
|
return o ? /* @__PURE__ */ A(
|
|
676
|
-
|
|
676
|
+
j,
|
|
677
677
|
{
|
|
678
678
|
gap: "sm",
|
|
679
679
|
p: "xs",
|
|
@@ -684,7 +684,7 @@ function ye({
|
|
|
684
684
|
height: "100%"
|
|
685
685
|
},
|
|
686
686
|
children: Array.from({ length: e }).map((i, n) => /* @__PURE__ */ A(
|
|
687
|
-
|
|
687
|
+
dA,
|
|
688
688
|
{
|
|
689
689
|
height: 32,
|
|
690
690
|
width: 32,
|
|
@@ -694,7 +694,7 @@ function ye({
|
|
|
694
694
|
))
|
|
695
695
|
}
|
|
696
696
|
) : /* @__PURE__ */ A(
|
|
697
|
-
|
|
697
|
+
j,
|
|
698
698
|
{
|
|
699
699
|
gap: "xs",
|
|
700
700
|
p: "md",
|
|
@@ -704,9 +704,9 @@ function ye({
|
|
|
704
704
|
width: "100%",
|
|
705
705
|
height: "100%"
|
|
706
706
|
},
|
|
707
|
-
children: Array.from({ length: e }).map((i, n) => /* @__PURE__ */
|
|
707
|
+
children: Array.from({ length: e }).map((i, n) => /* @__PURE__ */ E(xA, { gap: "sm", wrap: "nowrap", children: [
|
|
708
708
|
/* @__PURE__ */ A(
|
|
709
|
-
|
|
709
|
+
dA,
|
|
710
710
|
{
|
|
711
711
|
height: 24,
|
|
712
712
|
width: 24,
|
|
@@ -714,7 +714,7 @@ function ye({
|
|
|
714
714
|
}
|
|
715
715
|
),
|
|
716
716
|
/* @__PURE__ */ A(
|
|
717
|
-
|
|
717
|
+
dA,
|
|
718
718
|
{
|
|
719
719
|
height: 18,
|
|
720
720
|
radius: "xl",
|
|
@@ -731,9 +731,9 @@ function so({
|
|
|
731
731
|
height: s = "100%",
|
|
732
732
|
backgroundColor: r
|
|
733
733
|
}) {
|
|
734
|
-
const t =
|
|
734
|
+
const t = pA(), { colorScheme: a } = sA(), i = r ?? (a === "dark" ? t.colors.dark[6] : t.colors.gray[2]);
|
|
735
735
|
return /* @__PURE__ */ A(
|
|
736
|
-
|
|
736
|
+
j,
|
|
737
737
|
{
|
|
738
738
|
gap: "md",
|
|
739
739
|
p: "xs",
|
|
@@ -743,9 +743,9 @@ function so({
|
|
|
743
743
|
height: s,
|
|
744
744
|
backgroundColor: i
|
|
745
745
|
},
|
|
746
|
-
children: Array.from({ length: e }).map((n, c) => /* @__PURE__ */
|
|
746
|
+
children: Array.from({ length: e }).map((n, c) => /* @__PURE__ */ E(j, { gap: 4, align: "center", children: [
|
|
747
747
|
/* @__PURE__ */ A(
|
|
748
|
-
|
|
748
|
+
dA,
|
|
749
749
|
{
|
|
750
750
|
height: 48,
|
|
751
751
|
width: 48,
|
|
@@ -754,7 +754,7 @@ function so({
|
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
756
|
/* @__PURE__ */ A(
|
|
757
|
-
|
|
757
|
+
dA,
|
|
758
758
|
{
|
|
759
759
|
height: 10,
|
|
760
760
|
width: 40,
|
|
@@ -770,10 +770,10 @@ function we({
|
|
|
770
770
|
backgroundColor: o,
|
|
771
771
|
children: s
|
|
772
772
|
}) {
|
|
773
|
-
const r =
|
|
774
|
-
return s ? /* @__PURE__ */ A(vA, { children: s }) : /* @__PURE__ */ A(VA, { p: "md", style: { backgroundColor: a, flex: 1, height: "100%" }, children: /* @__PURE__ */
|
|
773
|
+
const r = pA(), { colorScheme: t } = sA(), a = o ?? (t === "dark" ? r.colors.dark[7] : r.white), i = t === "dark" ? r.colors.red[4] : r.colors.red[6];
|
|
774
|
+
return s ? /* @__PURE__ */ A(vA, { children: s }) : /* @__PURE__ */ A(VA, { p: "md", style: { backgroundColor: a, flex: 1, height: "100%" }, children: /* @__PURE__ */ E(j, { align: "center", gap: "xs", children: [
|
|
775
775
|
/* @__PURE__ */ A(rr, { size: 32, color: i }),
|
|
776
|
-
/* @__PURE__ */ A(
|
|
776
|
+
/* @__PURE__ */ A(kA, { size: "sm", c: i, ta: "center", children: e })
|
|
777
777
|
] }) });
|
|
778
778
|
}
|
|
779
779
|
function lo({
|
|
@@ -791,56 +791,56 @@ function lo({
|
|
|
791
791
|
groupLabelDarkColor: d,
|
|
792
792
|
groupLabelLightColor: h,
|
|
793
793
|
collapsed: p,
|
|
794
|
-
onMenuItemClick:
|
|
795
|
-
onClickActionIcon:
|
|
796
|
-
withBorder:
|
|
794
|
+
onMenuItemClick: b,
|
|
795
|
+
onClickActionIcon: k,
|
|
796
|
+
withBorder: y = !1,
|
|
797
797
|
showGroupLabels: f = !0,
|
|
798
798
|
theme: g,
|
|
799
|
-
sidebarRef:
|
|
799
|
+
sidebarRef: w,
|
|
800
800
|
defaultGroupIcon: v,
|
|
801
|
-
selectedGroupName:
|
|
802
|
-
sideBarHeaderContent:
|
|
801
|
+
selectedGroupName: m,
|
|
802
|
+
sideBarHeaderContent: M,
|
|
803
803
|
iconsWithBackground: $ = !1,
|
|
804
|
-
menuItemHeight:
|
|
805
|
-
highlightActiveMenuItem:
|
|
806
|
-
backgroundDarkColor:
|
|
804
|
+
menuItemHeight: V = 40,
|
|
805
|
+
highlightActiveMenuItem: rA = !0,
|
|
806
|
+
backgroundDarkColor: z,
|
|
807
807
|
backgroundLightColor: O,
|
|
808
|
-
textDarkColor:
|
|
808
|
+
textDarkColor: G,
|
|
809
809
|
textLightColor: Q,
|
|
810
|
-
iconDarkColor:
|
|
811
|
-
iconLightColor:
|
|
812
|
-
collapsedSubmenuWidth:
|
|
813
|
-
isLoading:
|
|
814
|
-
loadingError:
|
|
815
|
-
loadingComponent:
|
|
816
|
-
errorComponent:
|
|
817
|
-
skeletonItemCount:
|
|
818
|
-
skeletonGroupCount:
|
|
810
|
+
iconDarkColor: D,
|
|
811
|
+
iconLightColor: I,
|
|
812
|
+
collapsedSubmenuWidth: T,
|
|
813
|
+
isLoading: Y = !1,
|
|
814
|
+
loadingError: B,
|
|
815
|
+
loadingComponent: X,
|
|
816
|
+
errorComponent: W,
|
|
817
|
+
skeletonItemCount: x = 8,
|
|
818
|
+
skeletonGroupCount: C = 3
|
|
819
819
|
}) {
|
|
820
|
-
const [
|
|
820
|
+
const [R, S] = fA(""), L = ne(), P = qA(), { colorScheme: H } = sA(), F = H === "dark" ? z ?? g.colors.dark[7] : O ?? g.white, J = a || (H === "dark" ? g.colors[g.primaryColor][8] : g.colors[g.primaryColor][0]), oA = H === "dark" ? G ?? "var(--mantine-color-text)" : Q ?? "var(--mantine-color-text)", K = H === "dark" ? D ?? g.colors[g.primaryColor][0] : I ?? g.colors[g.primaryColor][7], tA = uA(() => {
|
|
821
821
|
const hA = /* @__PURE__ */ new Set();
|
|
822
|
-
return e.forEach((
|
|
823
|
-
if (
|
|
824
|
-
let
|
|
825
|
-
|
|
822
|
+
return e.forEach((AA) => {
|
|
823
|
+
if (AA.showInSidebar && (!AA.disabled || !AA.hideDisabledItem)) {
|
|
824
|
+
let DA = !1;
|
|
825
|
+
AA.group || (AA.group = {
|
|
826
826
|
icon: v || /* @__PURE__ */ A(Re, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
827
827
|
label: "Default",
|
|
828
828
|
name: "Default",
|
|
829
829
|
hint: "Default",
|
|
830
830
|
indexOrder: 0
|
|
831
831
|
}), hA.forEach((gA) => {
|
|
832
|
-
gA.name ===
|
|
833
|
-
}),
|
|
834
|
-
name:
|
|
835
|
-
indexOrder:
|
|
832
|
+
gA.name === AA.group.name && (DA = !0);
|
|
833
|
+
}), DA || hA.add({
|
|
834
|
+
name: AA.group.name,
|
|
835
|
+
indexOrder: AA.group.indexOrder,
|
|
836
836
|
component: /* @__PURE__ */ A(
|
|
837
837
|
SA,
|
|
838
838
|
{
|
|
839
|
-
content:
|
|
840
|
-
label:
|
|
839
|
+
content: AA.group.hint,
|
|
840
|
+
label: AA.group.label,
|
|
841
841
|
disabled: f,
|
|
842
|
-
children: /* @__PURE__ */
|
|
843
|
-
|
|
842
|
+
children: /* @__PURE__ */ E(
|
|
843
|
+
j,
|
|
844
844
|
{
|
|
845
845
|
gap: "2px",
|
|
846
846
|
style: {
|
|
@@ -854,83 +854,83 @@ function lo({
|
|
|
854
854
|
LA,
|
|
855
855
|
{
|
|
856
856
|
size: "48px",
|
|
857
|
-
variant:
|
|
858
|
-
color:
|
|
857
|
+
variant: AA.group.name === R ? "filled" : n ? "subtle" : "light",
|
|
858
|
+
color: AA.group.name === R ? J : i,
|
|
859
859
|
onClick: () => {
|
|
860
|
-
|
|
860
|
+
S((gA) => (k && k(gA, AA.group.name), AA.group.name === gA && !c ? "" : AA.group.name));
|
|
861
861
|
},
|
|
862
|
-
children:
|
|
862
|
+
children: AA.group.icon
|
|
863
863
|
}
|
|
864
864
|
),
|
|
865
865
|
f ? /* @__PURE__ */ A(
|
|
866
|
-
|
|
866
|
+
kA,
|
|
867
867
|
{
|
|
868
868
|
size: "xs",
|
|
869
|
-
c:
|
|
870
|
-
children:
|
|
869
|
+
c: H === "dark" ? d || g.colors[g.primaryColor][2] : h || g.colors[g.primaryColor][2],
|
|
870
|
+
children: AA.group.label
|
|
871
871
|
}
|
|
872
872
|
) : !1
|
|
873
873
|
]
|
|
874
874
|
}
|
|
875
875
|
)
|
|
876
876
|
},
|
|
877
|
-
|
|
877
|
+
AA.group.name
|
|
878
878
|
)
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
}), hA.forEach((
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
}), [...hA].sort((
|
|
885
|
-
}, [e,
|
|
886
|
-
|
|
881
|
+
}), hA.forEach((AA) => {
|
|
882
|
+
const DA = e.filter((gA) => gA.showInSidebar === !0 && (!gA.disabled || !gA.hideDisabledItem) && gA.group && gA.group.name === AA.name);
|
|
883
|
+
AA.links = DA.map((gA, Z) => Ce(g, p, b, gA, Z, $, P.pathname, rA, oA, T));
|
|
884
|
+
}), [...hA].sort((AA, DA) => AA.indexOrder - DA.indexOrder);
|
|
885
|
+
}, [e, R, H, p, L.selectedCompany, rA, P]), CA = no(
|
|
886
|
+
H,
|
|
887
887
|
g,
|
|
888
888
|
p,
|
|
889
889
|
35,
|
|
890
|
-
Number(
|
|
891
|
-
|
|
890
|
+
Number(cA(t)),
|
|
891
|
+
tA.length > 1,
|
|
892
892
|
$,
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
), yA = p ||
|
|
898
|
-
|
|
893
|
+
V,
|
|
894
|
+
F,
|
|
895
|
+
oA,
|
|
896
|
+
K
|
|
897
|
+
), yA = p || R === "" ? "0px" : `calc(${s} - ${o})`, EA = n || (H === "dark" ? g.colors[g.primaryColor][6] : g.colors[g.primaryColor][7]), q = U(() => {
|
|
898
|
+
m && tA.map((hA) => hA.name).includes(m) ? S(m) : tA.length > 1 && S("Default");
|
|
899
899
|
}, []);
|
|
900
|
-
|
|
900
|
+
aA(() => {
|
|
901
901
|
q();
|
|
902
|
-
}, []),
|
|
903
|
-
p ?
|
|
902
|
+
}, []), aA(() => {
|
|
903
|
+
p ? S("") : R === "" && q();
|
|
904
904
|
}, [p]);
|
|
905
|
-
const
|
|
905
|
+
const lA = () => B ? W || /* @__PURE__ */ A(
|
|
906
906
|
we,
|
|
907
907
|
{
|
|
908
|
-
message:
|
|
909
|
-
backgroundColor:
|
|
908
|
+
message: B,
|
|
909
|
+
backgroundColor: F
|
|
910
910
|
}
|
|
911
|
-
) :
|
|
911
|
+
) : Y ? X || /* @__PURE__ */ A(
|
|
912
912
|
ye,
|
|
913
913
|
{
|
|
914
|
-
itemCount:
|
|
914
|
+
itemCount: x,
|
|
915
915
|
collapsed: p,
|
|
916
|
-
backgroundColor:
|
|
916
|
+
backgroundColor: F
|
|
917
917
|
}
|
|
918
|
-
) :
|
|
918
|
+
) : R !== "" ? /* @__PURE__ */ A(
|
|
919
919
|
Me,
|
|
920
920
|
{
|
|
921
|
-
ref:
|
|
921
|
+
ref: w,
|
|
922
922
|
rootStyles: {
|
|
923
923
|
[`.${$e.container}`]: {
|
|
924
|
-
background:
|
|
924
|
+
background: F,
|
|
925
925
|
overflowX: "hidden",
|
|
926
926
|
overflowY: "hidden",
|
|
927
927
|
left: 0,
|
|
928
|
-
height: `${
|
|
928
|
+
height: `${cA(r)}px`
|
|
929
929
|
}
|
|
930
930
|
},
|
|
931
|
-
style: { borderColor:
|
|
931
|
+
style: { borderColor: H === "dark" ? "#000" : "#efefef" },
|
|
932
932
|
collapsed: p,
|
|
933
|
-
width: `${
|
|
933
|
+
width: `${cA(yA)}`,
|
|
934
934
|
collapsedWidth: "0px",
|
|
935
935
|
children: /* @__PURE__ */ A(
|
|
936
936
|
zA,
|
|
@@ -941,19 +941,19 @@ function lo({
|
|
|
941
941
|
height: "100%",
|
|
942
942
|
width: yA
|
|
943
943
|
},
|
|
944
|
-
children: /* @__PURE__ */ A(Oe, { rootStyles: { background:
|
|
944
|
+
children: /* @__PURE__ */ A(Oe, { rootStyles: { background: F }, menuItemStyles: CA, closeOnClick: !0, children: tA.find((hA) => hA.name === R)?.links || null })
|
|
945
945
|
}
|
|
946
946
|
)
|
|
947
947
|
}
|
|
948
|
-
) : null, RA = () =>
|
|
948
|
+
) : null, RA = () => Y && tA.length === 0 ? /* @__PURE__ */ A(
|
|
949
949
|
so,
|
|
950
950
|
{
|
|
951
|
-
groupCount:
|
|
951
|
+
groupCount: C,
|
|
952
952
|
width: o,
|
|
953
953
|
height: r
|
|
954
954
|
}
|
|
955
|
-
) :
|
|
956
|
-
|
|
955
|
+
) : tA.length !== 0 ? /* @__PURE__ */ A(
|
|
956
|
+
j,
|
|
957
957
|
{
|
|
958
958
|
gap: "4px",
|
|
959
959
|
style: {
|
|
@@ -962,41 +962,41 @@ function lo({
|
|
|
962
962
|
padding: "4px",
|
|
963
963
|
backgroundColor: EA
|
|
964
964
|
},
|
|
965
|
-
children:
|
|
965
|
+
children: tA.map((hA) => /* @__PURE__ */ A(mA.Fragment, { children: hA.component }, hA.name))
|
|
966
966
|
}
|
|
967
|
-
) : null,
|
|
967
|
+
) : null, TA = () => B ? W || /* @__PURE__ */ A(
|
|
968
968
|
we,
|
|
969
969
|
{
|
|
970
|
-
message:
|
|
971
|
-
backgroundColor:
|
|
970
|
+
message: B,
|
|
971
|
+
backgroundColor: F
|
|
972
972
|
}
|
|
973
|
-
) :
|
|
973
|
+
) : Y ? X || /* @__PURE__ */ A(
|
|
974
974
|
ye,
|
|
975
975
|
{
|
|
976
|
-
itemCount:
|
|
976
|
+
itemCount: x,
|
|
977
977
|
collapsed: p,
|
|
978
|
-
backgroundColor:
|
|
978
|
+
backgroundColor: F
|
|
979
979
|
}
|
|
980
980
|
) : e.map(
|
|
981
|
-
(hA, OA) =>
|
|
981
|
+
(hA, OA) => Ce(g, p, b, hA, OA, $, P.pathname, rA, oA, T)
|
|
982
982
|
);
|
|
983
|
-
return /* @__PURE__ */ A(vA, { children:
|
|
984
|
-
|
|
983
|
+
return /* @__PURE__ */ A(vA, { children: tA.length == 1 ? to(
|
|
984
|
+
w,
|
|
985
985
|
p,
|
|
986
986
|
s,
|
|
987
987
|
t,
|
|
988
|
-
|
|
989
|
-
|
|
988
|
+
CA,
|
|
989
|
+
TA(),
|
|
990
990
|
c,
|
|
991
991
|
r,
|
|
992
|
-
|
|
992
|
+
M,
|
|
993
993
|
u,
|
|
994
|
-
|
|
995
|
-
) : /* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children:
|
|
997
|
-
/* @__PURE__ */
|
|
994
|
+
F
|
|
995
|
+
) : /* @__PURE__ */ E(BA, { direction: "column", w: p ? t : s, children: [
|
|
996
|
+
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: M }),
|
|
997
|
+
/* @__PURE__ */ E(We, { withBorder: y, h: r, w: "100%", display: "flex", children: [
|
|
998
998
|
RA(),
|
|
999
|
-
|
|
999
|
+
lA()
|
|
1000
1000
|
] }),
|
|
1001
1001
|
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: u })
|
|
1002
1002
|
] }) });
|
|
@@ -1025,90 +1025,90 @@ function ae({
|
|
|
1025
1025
|
highlightActiveItem: u = !0,
|
|
1026
1026
|
onMenuItemClick: d
|
|
1027
1027
|
}) {
|
|
1028
|
-
const h = qA(), p = FA(), [
|
|
1028
|
+
const h = qA(), p = FA(), [b, k] = JA({
|
|
1029
1029
|
value: t,
|
|
1030
1030
|
defaultValue: r,
|
|
1031
1031
|
finalValue: !1,
|
|
1032
1032
|
onChange: a
|
|
1033
|
-
}), [
|
|
1033
|
+
}), [y, f] = JA({
|
|
1034
1034
|
value: n,
|
|
1035
1035
|
defaultValue: i,
|
|
1036
1036
|
finalValue: "",
|
|
1037
1037
|
onChange: c
|
|
1038
|
-
}), [g,
|
|
1039
|
-
const
|
|
1040
|
-
return o.forEach((
|
|
1041
|
-
|
|
1042
|
-
}),
|
|
1043
|
-
}),
|
|
1044
|
-
|
|
1045
|
-
}, [
|
|
1046
|
-
|
|
1047
|
-
const
|
|
1048
|
-
return
|
|
1038
|
+
}), [g, w] = fA(""), [v, m] = fA(() => {
|
|
1039
|
+
const D = /* @__PURE__ */ new Set();
|
|
1040
|
+
return o.forEach((I, T) => {
|
|
1041
|
+
I.initiallyOpened && I.links && I.links.length > 0 && D.add(`group-${T}`);
|
|
1042
|
+
}), D;
|
|
1043
|
+
}), M = h.pathname, $ = U(() => {
|
|
1044
|
+
k(!b);
|
|
1045
|
+
}, [b, k]), V = U((D) => {
|
|
1046
|
+
m((I) => {
|
|
1047
|
+
const T = new Set(I);
|
|
1048
|
+
return T.has(D) ? T.delete(D) : T.add(D), T;
|
|
1049
1049
|
});
|
|
1050
|
-
}, []),
|
|
1051
|
-
|
|
1052
|
-
const
|
|
1053
|
-
return
|
|
1050
|
+
}, []), rA = U((D) => {
|
|
1051
|
+
m((I) => {
|
|
1052
|
+
const T = new Set(I);
|
|
1053
|
+
return T.add(D), T;
|
|
1054
1054
|
});
|
|
1055
|
-
}, []),
|
|
1056
|
-
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1055
|
+
}, []), z = U((D) => {
|
|
1056
|
+
m((I) => {
|
|
1057
|
+
const T = new Set(I);
|
|
1058
|
+
return T.delete(D), T;
|
|
1059
1059
|
});
|
|
1060
1060
|
}, []), O = uA(() => {
|
|
1061
1061
|
if (!g.trim())
|
|
1062
1062
|
return o;
|
|
1063
|
-
const
|
|
1064
|
-
const
|
|
1065
|
-
return (
|
|
1066
|
-
...
|
|
1067
|
-
links:
|
|
1063
|
+
const D = g.toLowerCase().trim(), I = (T) => T.reduce((Y, B) => {
|
|
1064
|
+
const X = B.label.toLowerCase().includes(D), W = B.links ? I(B.links) : [];
|
|
1065
|
+
return (X || W.length > 0) && Y.push({
|
|
1066
|
+
...B,
|
|
1067
|
+
links: W.length > 0 ? W : B.links,
|
|
1068
1068
|
// Expandir automaticamente quando há match em subitens
|
|
1069
|
-
initiallyOpened:
|
|
1070
|
-
}),
|
|
1069
|
+
initiallyOpened: W.length > 0 || X
|
|
1070
|
+
}), Y;
|
|
1071
1071
|
}, []);
|
|
1072
|
-
return
|
|
1073
|
-
}, [o, g]),
|
|
1074
|
-
(
|
|
1075
|
-
d && d(
|
|
1072
|
+
return I(o);
|
|
1073
|
+
}, [o, g]), G = U(
|
|
1074
|
+
(D) => {
|
|
1075
|
+
d && d(D), D.link && (D.routeParams ? p(D.link, { state: D.routeParams }) : p(D.link)), D.redirect && p(D.redirect);
|
|
1076
1076
|
},
|
|
1077
1077
|
[p, d]
|
|
1078
1078
|
), Q = uA(
|
|
1079
1079
|
() => ({
|
|
1080
|
-
collapsed:
|
|
1081
|
-
setCollapsed:
|
|
1080
|
+
collapsed: b,
|
|
1081
|
+
setCollapsed: k,
|
|
1082
1082
|
toggleCollapsed: $,
|
|
1083
|
-
activeGroup:
|
|
1083
|
+
activeGroup: y,
|
|
1084
1084
|
setActiveGroup: f,
|
|
1085
|
-
activeItemPath:
|
|
1086
|
-
navigateToItem:
|
|
1085
|
+
activeItemPath: M,
|
|
1086
|
+
navigateToItem: G,
|
|
1087
1087
|
searchQuery: g,
|
|
1088
|
-
setSearchQuery:
|
|
1088
|
+
setSearchQuery: w,
|
|
1089
1089
|
filteredItems: O,
|
|
1090
1090
|
expandedGroups: v,
|
|
1091
|
-
toggleGroup:
|
|
1092
|
-
expandGroup:
|
|
1093
|
-
collapseGroup:
|
|
1091
|
+
toggleGroup: V,
|
|
1092
|
+
expandGroup: rA,
|
|
1093
|
+
collapseGroup: z,
|
|
1094
1094
|
variant: s,
|
|
1095
1095
|
showKeyboardShortcuts: l,
|
|
1096
1096
|
highlightActiveItem: u
|
|
1097
1097
|
}),
|
|
1098
1098
|
[
|
|
1099
|
-
|
|
1100
|
-
|
|
1099
|
+
b,
|
|
1100
|
+
k,
|
|
1101
1101
|
$,
|
|
1102
|
-
|
|
1102
|
+
y,
|
|
1103
1103
|
f,
|
|
1104
|
-
|
|
1105
|
-
|
|
1104
|
+
M,
|
|
1105
|
+
G,
|
|
1106
1106
|
g,
|
|
1107
1107
|
O,
|
|
1108
1108
|
v,
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1109
|
+
V,
|
|
1110
|
+
rA,
|
|
1111
|
+
z,
|
|
1112
1112
|
s,
|
|
1113
1113
|
l,
|
|
1114
1114
|
u
|
|
@@ -1120,7 +1120,7 @@ function ce({
|
|
|
1120
1120
|
navigationData: e,
|
|
1121
1121
|
onMenuItemClick: o
|
|
1122
1122
|
}) {
|
|
1123
|
-
const s = qA(), r = FA(), t = s.pathname, a =
|
|
1123
|
+
const s = qA(), r = FA(), t = s.pathname, a = U(
|
|
1124
1124
|
(d) => {
|
|
1125
1125
|
for (const h of d) {
|
|
1126
1126
|
if (h.link === t)
|
|
@@ -1134,25 +1134,25 @@ function ce({
|
|
|
1134
1134
|
return null;
|
|
1135
1135
|
},
|
|
1136
1136
|
[t]
|
|
1137
|
-
), i = uA(() => a(e), [a, e]), n =
|
|
1137
|
+
), i = uA(() => a(e), [a, e]), n = U(
|
|
1138
1138
|
(d) => d.link === t,
|
|
1139
1139
|
[t]
|
|
1140
|
-
), c =
|
|
1140
|
+
), c = U(
|
|
1141
1141
|
(d) => d.link === t ? !0 : d.links ? d.links.some((h) => c(h)) : !1,
|
|
1142
1142
|
[t]
|
|
1143
1143
|
), l = uA(() => {
|
|
1144
|
-
const d = [], h = (p,
|
|
1145
|
-
for (const
|
|
1146
|
-
const
|
|
1147
|
-
if (
|
|
1148
|
-
return d.push(...
|
|
1149
|
-
if (
|
|
1144
|
+
const d = [], h = (p, b) => {
|
|
1145
|
+
for (const k of p) {
|
|
1146
|
+
const y = [...b, k];
|
|
1147
|
+
if (k.link === t)
|
|
1148
|
+
return d.push(...y), !0;
|
|
1149
|
+
if (k.links && h(k.links, y))
|
|
1150
1150
|
return !0;
|
|
1151
1151
|
}
|
|
1152
1152
|
return !1;
|
|
1153
1153
|
};
|
|
1154
1154
|
return h(e, []), d;
|
|
1155
|
-
}, [e, t]), u =
|
|
1155
|
+
}, [e, t]), u = U(
|
|
1156
1156
|
(d) => {
|
|
1157
1157
|
(typeof d.disabled == "function" ? d.disabled() : d.disabled) || (o && o(d), d.link && (d.routeParams ? r(d.link, { state: d.routeParams }) : r(d.link)), d.redirect && r(d.redirect));
|
|
1158
1158
|
},
|
|
@@ -1171,7 +1171,7 @@ function io({
|
|
|
1171
1171
|
navigationData: e,
|
|
1172
1172
|
onSearch: o
|
|
1173
1173
|
}) {
|
|
1174
|
-
const [s, r] =
|
|
1174
|
+
const [s, r] = fA(""), t = U((l) => l.reduce((u, d) => {
|
|
1175
1175
|
let h = 1;
|
|
1176
1176
|
return d.links && (h += t(d.links)), u + h;
|
|
1177
1177
|
}, 0), []), a = uA(() => {
|
|
@@ -1180,29 +1180,29 @@ function io({
|
|
|
1180
1180
|
const l = s.toLowerCase().trim(), u = (d) => d.reduce((h, p) => {
|
|
1181
1181
|
if (!p.showInSidebar)
|
|
1182
1182
|
return h;
|
|
1183
|
-
const
|
|
1184
|
-
return (
|
|
1183
|
+
const b = p.label.toLowerCase().includes(l), k = p.links ? u(p.links) : [];
|
|
1184
|
+
return (b || k.length > 0) && h.push({
|
|
1185
1185
|
...p,
|
|
1186
|
-
links:
|
|
1186
|
+
links: k.length > 0 ? k : p.links,
|
|
1187
1187
|
// Expandir automaticamente grupos com match
|
|
1188
1188
|
initiallyOpened: !0
|
|
1189
1189
|
}), h;
|
|
1190
1190
|
}, []);
|
|
1191
1191
|
return u(e);
|
|
1192
|
-
}, [e, s]), i = uA(() => s.trim() ? t(a) : t(e), [s, e, a, t]), n =
|
|
1192
|
+
}, [e, s]), i = uA(() => s.trim() ? t(a) : t(e), [s, e, a, t]), n = U(
|
|
1193
1193
|
(l) => {
|
|
1194
1194
|
if (r(l), o) {
|
|
1195
1195
|
const u = l.toLowerCase().trim();
|
|
1196
1196
|
if (!u)
|
|
1197
1197
|
o(l, e);
|
|
1198
1198
|
else {
|
|
1199
|
-
const d = (h) => h.reduce((p,
|
|
1200
|
-
if (!
|
|
1199
|
+
const d = (h) => h.reduce((p, b) => {
|
|
1200
|
+
if (!b.showInSidebar)
|
|
1201
1201
|
return p;
|
|
1202
|
-
const
|
|
1203
|
-
return (
|
|
1204
|
-
...
|
|
1205
|
-
links:
|
|
1202
|
+
const k = b.label.toLowerCase().includes(u), y = b.links ? d(b.links) : [];
|
|
1203
|
+
return (k || y.length > 0) && p.push({
|
|
1204
|
+
...b,
|
|
1205
|
+
links: y.length > 0 ? y : b.links,
|
|
1206
1206
|
initiallyOpened: !0
|
|
1207
1207
|
}), p;
|
|
1208
1208
|
}, []);
|
|
@@ -1211,7 +1211,7 @@ function io({
|
|
|
1211
1211
|
}
|
|
1212
1212
|
},
|
|
1213
1213
|
[e, o]
|
|
1214
|
-
), c =
|
|
1214
|
+
), c = U(() => {
|
|
1215
1215
|
n("");
|
|
1216
1216
|
}, [n]);
|
|
1217
1217
|
return {
|
|
@@ -1241,10 +1241,10 @@ function de({
|
|
|
1241
1241
|
});
|
|
1242
1242
|
};
|
|
1243
1243
|
return l(e), c;
|
|
1244
|
-
}, [e]), a =
|
|
1244
|
+
}, [e]), a = U(
|
|
1245
1245
|
(c) => !!c.shortcut,
|
|
1246
1246
|
[]
|
|
1247
|
-
), i =
|
|
1247
|
+
), i = U(
|
|
1248
1248
|
(c) => c.shortcut,
|
|
1249
1249
|
[]
|
|
1250
1250
|
), n = uA(() => {
|
|
@@ -1278,19 +1278,19 @@ function MA({
|
|
|
1278
1278
|
hoverColor: n,
|
|
1279
1279
|
itemHeight: c = 40
|
|
1280
1280
|
}) {
|
|
1281
|
-
const l =
|
|
1282
|
-
if (
|
|
1281
|
+
const l = pA(), { colorScheme: u } = sA(), d = e, [h, p] = fA(!1), b = a || "var(--mantine-color-text)", k = i || l.colors[l.primaryColor][6], y = n || l.colors[l.primaryColor][6], f = n ? `color-mix(in srgb, ${n} 80%, black)` : l.colors[l.primaryColor][8], g = h ? r ? f : y : r ? y : "transparent", w = h || r ? l.white : b, v = h || r ? l.white : k, m = typeof e.disabled == "function" ? e.disabled() : e.disabled;
|
|
1282
|
+
if (m && e.hideDisabledItem || !e.showInSidebar)
|
|
1283
1283
|
return null;
|
|
1284
|
-
const
|
|
1285
|
-
!
|
|
1286
|
-
}, [
|
|
1284
|
+
const M = U(() => {
|
|
1285
|
+
!m && t && t(e);
|
|
1286
|
+
}, [m, t, e]), $ = wA.t(e.label), V = () => d.badge ? /* @__PURE__ */ A(re, { size: "xs", color: d.badgeColor || "blue", variant: "filled", children: d.badge }) : null, rA = () => d.shortcut ? /* @__PURE__ */ A(ve, { size: "xs", style: { marginLeft: "auto" }, children: d.shortcut }) : null;
|
|
1287
1287
|
if (e.links && e.links.length > 0) {
|
|
1288
|
-
const
|
|
1289
|
-
const
|
|
1290
|
-
return O.showInSidebar && (!
|
|
1288
|
+
const z = e.links.filter((O) => {
|
|
1289
|
+
const G = typeof O.disabled == "function" ? O.disabled() : O.disabled;
|
|
1290
|
+
return O.showInSidebar && (!G || !O.hideDisabledItem);
|
|
1291
1291
|
});
|
|
1292
|
-
return
|
|
1293
|
-
|
|
1292
|
+
return z.length === 0 && m && e.hideDisabledItem ? null : s ? /* @__PURE__ */ E(
|
|
1293
|
+
nA,
|
|
1294
1294
|
{
|
|
1295
1295
|
position: "right-start",
|
|
1296
1296
|
withArrow: !0,
|
|
@@ -1299,8 +1299,8 @@ function MA({
|
|
|
1299
1299
|
openDelay: 100,
|
|
1300
1300
|
closeDelay: 200,
|
|
1301
1301
|
children: [
|
|
1302
|
-
/* @__PURE__ */ A(
|
|
1303
|
-
|
|
1302
|
+
/* @__PURE__ */ A(nA.Target, { children: /* @__PURE__ */ A(VA, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ A(SA, { label: $, position: "right", withArrow: !0, children: /* @__PURE__ */ E(
|
|
1303
|
+
j,
|
|
1304
1304
|
{
|
|
1305
1305
|
gap: 1,
|
|
1306
1306
|
align: "center",
|
|
@@ -1309,10 +1309,10 @@ function MA({
|
|
|
1309
1309
|
},
|
|
1310
1310
|
children: [
|
|
1311
1311
|
/* @__PURE__ */ A(
|
|
1312
|
-
|
|
1312
|
+
N,
|
|
1313
1313
|
{
|
|
1314
1314
|
style: {
|
|
1315
|
-
color:
|
|
1315
|
+
color: k,
|
|
1316
1316
|
display: "flex",
|
|
1317
1317
|
alignItems: "center",
|
|
1318
1318
|
justifyContent: "center"
|
|
@@ -1321,12 +1321,12 @@ function MA({
|
|
|
1321
1321
|
}
|
|
1322
1322
|
),
|
|
1323
1323
|
/* @__PURE__ */ A(
|
|
1324
|
-
|
|
1324
|
+
kA,
|
|
1325
1325
|
{
|
|
1326
1326
|
size: "8px",
|
|
1327
1327
|
ta: "center",
|
|
1328
1328
|
style: {
|
|
1329
|
-
color:
|
|
1329
|
+
color: k,
|
|
1330
1330
|
lineHeight: 1,
|
|
1331
1331
|
maxWidth: 56,
|
|
1332
1332
|
overflow: "hidden",
|
|
@@ -1339,19 +1339,19 @@ function MA({
|
|
|
1339
1339
|
]
|
|
1340
1340
|
}
|
|
1341
1341
|
) }) }) }),
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */ A(
|
|
1344
|
-
|
|
1342
|
+
/* @__PURE__ */ E(nA.Dropdown, { children: [
|
|
1343
|
+
/* @__PURE__ */ A(nA.Label, { children: $ }),
|
|
1344
|
+
z.map((O, G) => {
|
|
1345
1345
|
const Q = typeof O.disabled == "function" ? O.disabled() : O.disabled;
|
|
1346
1346
|
return /* @__PURE__ */ A(
|
|
1347
|
-
|
|
1347
|
+
nA.Item,
|
|
1348
1348
|
{
|
|
1349
1349
|
leftSection: O.icon,
|
|
1350
1350
|
disabled: Q,
|
|
1351
1351
|
onClick: () => t?.(O),
|
|
1352
1352
|
children: wA.t(O.label)
|
|
1353
1353
|
},
|
|
1354
|
-
|
|
1354
|
+
G
|
|
1355
1355
|
);
|
|
1356
1356
|
})
|
|
1357
1357
|
] })
|
|
@@ -1361,9 +1361,9 @@ function MA({
|
|
|
1361
1361
|
be,
|
|
1362
1362
|
{
|
|
1363
1363
|
label: $,
|
|
1364
|
-
leftSection: /* @__PURE__ */ A(
|
|
1365
|
-
rightSection: /* @__PURE__ */
|
|
1366
|
-
|
|
1364
|
+
leftSection: /* @__PURE__ */ A(N, { style: { color: v }, children: e.icon }),
|
|
1365
|
+
rightSection: /* @__PURE__ */ E(N, { style: { display: "flex", alignItems: "center", gap: 4, color: w }, children: [
|
|
1366
|
+
V(),
|
|
1367
1367
|
/* @__PURE__ */ A(
|
|
1368
1368
|
oe,
|
|
1369
1369
|
{
|
|
@@ -1376,7 +1376,7 @@ function MA({
|
|
|
1376
1376
|
] }),
|
|
1377
1377
|
childrenOffset: 28,
|
|
1378
1378
|
defaultOpened: e.initiallyOpened || r,
|
|
1379
|
-
disabled:
|
|
1379
|
+
disabled: m,
|
|
1380
1380
|
onMouseEnter: () => p(!0),
|
|
1381
1381
|
onMouseLeave: () => p(!1),
|
|
1382
1382
|
style: {
|
|
@@ -1389,13 +1389,13 @@ function MA({
|
|
|
1389
1389
|
borderRadius: 0
|
|
1390
1390
|
},
|
|
1391
1391
|
label: {
|
|
1392
|
-
color:
|
|
1392
|
+
color: w
|
|
1393
1393
|
},
|
|
1394
1394
|
children: {
|
|
1395
1395
|
paddingLeft: 0
|
|
1396
1396
|
}
|
|
1397
1397
|
},
|
|
1398
|
-
children:
|
|
1398
|
+
children: z.map((O, G) => /* @__PURE__ */ A(
|
|
1399
1399
|
MA,
|
|
1400
1400
|
{
|
|
1401
1401
|
item: O,
|
|
@@ -1408,7 +1408,7 @@ function MA({
|
|
|
1408
1408
|
hoverColor: n,
|
|
1409
1409
|
itemHeight: c
|
|
1410
1410
|
},
|
|
1411
|
-
|
|
1411
|
+
G
|
|
1412
1412
|
))
|
|
1413
1413
|
}
|
|
1414
1414
|
);
|
|
@@ -1424,28 +1424,28 @@ function MA({
|
|
|
1424
1424
|
{
|
|
1425
1425
|
style: {
|
|
1426
1426
|
width: "100%",
|
|
1427
|
-
cursor:
|
|
1428
|
-
opacity:
|
|
1429
|
-
backgroundColor: r ?
|
|
1427
|
+
cursor: m ? "not-allowed" : "pointer",
|
|
1428
|
+
opacity: m ? 0.5 : 1,
|
|
1429
|
+
backgroundColor: r ? y : "transparent",
|
|
1430
1430
|
transition: "background-color 150ms ease",
|
|
1431
1431
|
padding: "2px 0"
|
|
1432
1432
|
},
|
|
1433
|
-
onClick:
|
|
1434
|
-
onMouseEnter: (
|
|
1435
|
-
|
|
1433
|
+
onClick: M,
|
|
1434
|
+
onMouseEnter: (z) => {
|
|
1435
|
+
m || (z.currentTarget.style.backgroundColor = r ? f : y);
|
|
1436
1436
|
},
|
|
1437
|
-
onMouseLeave: (
|
|
1438
|
-
|
|
1437
|
+
onMouseLeave: (z) => {
|
|
1438
|
+
z.currentTarget.style.backgroundColor = r ? y : "transparent";
|
|
1439
1439
|
},
|
|
1440
|
-
children: /* @__PURE__ */
|
|
1441
|
-
/* @__PURE__ */ A(
|
|
1440
|
+
children: /* @__PURE__ */ E(j, { gap: 1, align: "center", children: [
|
|
1441
|
+
/* @__PURE__ */ A(N, { style: { color: r ? l.white : k }, children: e.icon }),
|
|
1442
1442
|
/* @__PURE__ */ A(
|
|
1443
|
-
|
|
1443
|
+
kA,
|
|
1444
1444
|
{
|
|
1445
1445
|
size: "8px",
|
|
1446
1446
|
ta: "center",
|
|
1447
1447
|
style: {
|
|
1448
|
-
color: r ? l.white :
|
|
1448
|
+
color: r ? l.white : k,
|
|
1449
1449
|
lineHeight: 1,
|
|
1450
1450
|
maxWidth: 56,
|
|
1451
1451
|
overflow: "hidden",
|
|
@@ -1463,14 +1463,14 @@ function MA({
|
|
|
1463
1463
|
be,
|
|
1464
1464
|
{
|
|
1465
1465
|
label: $,
|
|
1466
|
-
leftSection: /* @__PURE__ */ A(
|
|
1467
|
-
rightSection: /* @__PURE__ */
|
|
1468
|
-
|
|
1469
|
-
|
|
1466
|
+
leftSection: /* @__PURE__ */ A(N, { style: { color: v }, children: e.icon }),
|
|
1467
|
+
rightSection: /* @__PURE__ */ E(N, { style: { display: "flex", alignItems: "center", gap: 4, color: w }, children: [
|
|
1468
|
+
V(),
|
|
1469
|
+
rA()
|
|
1470
1470
|
] }),
|
|
1471
1471
|
active: r,
|
|
1472
|
-
disabled:
|
|
1473
|
-
onClick:
|
|
1472
|
+
disabled: m,
|
|
1473
|
+
onClick: M,
|
|
1474
1474
|
onMouseEnter: () => p(!0),
|
|
1475
1475
|
onMouseLeave: () => p(!1),
|
|
1476
1476
|
style: {
|
|
@@ -1484,7 +1484,7 @@ function MA({
|
|
|
1484
1484
|
borderRadius: 0
|
|
1485
1485
|
},
|
|
1486
1486
|
label: {
|
|
1487
|
-
color:
|
|
1487
|
+
color: w
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
@@ -1499,10 +1499,10 @@ function co({
|
|
|
1499
1499
|
onExpandedChange: a,
|
|
1500
1500
|
groupId: i
|
|
1501
1501
|
}) {
|
|
1502
|
-
const n =
|
|
1502
|
+
const n = pA(), { colorScheme: c } = sA(), [l, u] = fA(r), d = t !== void 0, h = d ? t : l, p = U(() => {
|
|
1503
1503
|
d ? a?.(!h) : u((g) => !g);
|
|
1504
|
-
}, [d, h, a]),
|
|
1505
|
-
return /* @__PURE__ */
|
|
1504
|
+
}, [d, h, a]), b = c === "dark" ? n.colors.dark[6] : n.colors.gray[1], k = c === "dark" ? n.colors.dark[5] : n.colors.gray[2], y = c === "dark" ? n.colors.gray[4] : n.colors.gray[7], f = c === "dark" ? n.colors[n.primaryColor][4] : n.colors[n.primaryColor][6];
|
|
1505
|
+
return /* @__PURE__ */ E(N, { children: [
|
|
1506
1506
|
/* @__PURE__ */ A(
|
|
1507
1507
|
ZA,
|
|
1508
1508
|
{
|
|
@@ -1511,26 +1511,26 @@ function co({
|
|
|
1511
1511
|
p: "xs",
|
|
1512
1512
|
style: {
|
|
1513
1513
|
borderRadius: n.radius.sm,
|
|
1514
|
-
backgroundColor:
|
|
1514
|
+
backgroundColor: b,
|
|
1515
1515
|
transition: "background-color 150ms ease"
|
|
1516
1516
|
},
|
|
1517
1517
|
styles: {
|
|
1518
1518
|
root: {
|
|
1519
1519
|
"&:hover": {
|
|
1520
|
-
backgroundColor:
|
|
1520
|
+
backgroundColor: k
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
1523
|
},
|
|
1524
|
-
children: /* @__PURE__ */
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
o && /* @__PURE__ */ A(
|
|
1527
|
-
/* @__PURE__ */ A(
|
|
1524
|
+
children: /* @__PURE__ */ E(xA, { justify: "space-between", wrap: "nowrap", children: [
|
|
1525
|
+
/* @__PURE__ */ E(xA, { gap: "xs", wrap: "nowrap", children: [
|
|
1526
|
+
o && /* @__PURE__ */ A(N, { style: { color: f }, children: o }),
|
|
1527
|
+
/* @__PURE__ */ A(kA, { size: "sm", fw: 600, c: y, children: wA.t(e) })
|
|
1528
1528
|
] }),
|
|
1529
1529
|
/* @__PURE__ */ A(
|
|
1530
1530
|
or,
|
|
1531
1531
|
{
|
|
1532
1532
|
size: 16,
|
|
1533
|
-
color:
|
|
1533
|
+
color: y,
|
|
1534
1534
|
style: {
|
|
1535
1535
|
transform: h ? "rotate(180deg)" : "rotate(0deg)",
|
|
1536
1536
|
transition: "transform 200ms ease"
|
|
@@ -1540,17 +1540,17 @@ function co({
|
|
|
1540
1540
|
] })
|
|
1541
1541
|
}
|
|
1542
1542
|
),
|
|
1543
|
-
/* @__PURE__ */ A(Ze, { in: h, children: /* @__PURE__ */ A(
|
|
1543
|
+
/* @__PURE__ */ A(Ze, { in: h, children: /* @__PURE__ */ A(N, { mt: 4, children: s }) })
|
|
1544
1544
|
] });
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function fn({
|
|
1547
1547
|
label: e,
|
|
1548
1548
|
children: o
|
|
1549
1549
|
}) {
|
|
1550
|
-
const s =
|
|
1551
|
-
return /* @__PURE__ */
|
|
1550
|
+
const s = pA(), { colorScheme: r } = sA(), t = r === "dark" ? s.colors.gray[5] : s.colors.gray[6];
|
|
1551
|
+
return /* @__PURE__ */ E(N, { children: [
|
|
1552
1552
|
/* @__PURE__ */ A(
|
|
1553
|
-
|
|
1553
|
+
kA,
|
|
1554
1554
|
{
|
|
1555
1555
|
size: "xs",
|
|
1556
1556
|
fw: 700,
|
|
@@ -1573,8 +1573,8 @@ function uo({
|
|
|
1573
1573
|
activeColor: t,
|
|
1574
1574
|
inactiveColor: a
|
|
1575
1575
|
}) {
|
|
1576
|
-
const i =
|
|
1577
|
-
|
|
1576
|
+
const i = pA(), { colorScheme: n } = sA(), c = n === "dark" ? i.colors[i.primaryColor][8] : i.colors[i.primaryColor][0], l = n === "dark" ? i.colors[i.primaryColor][6] : i.colors[i.primaryColor][7], u = i.colors[i.primaryColor][2], p = /* @__PURE__ */ E(
|
|
1577
|
+
j,
|
|
1578
1578
|
{
|
|
1579
1579
|
gap: 2,
|
|
1580
1580
|
align: "center",
|
|
@@ -1595,7 +1595,7 @@ function uo({
|
|
|
1595
1595
|
}
|
|
1596
1596
|
),
|
|
1597
1597
|
r && /* @__PURE__ */ A(
|
|
1598
|
-
|
|
1598
|
+
kA,
|
|
1599
1599
|
{
|
|
1600
1600
|
size: "xs",
|
|
1601
1601
|
c: u,
|
|
@@ -1613,19 +1613,19 @@ function uo({
|
|
|
1613
1613
|
);
|
|
1614
1614
|
return r ? p : /* @__PURE__ */ A(SA, { label: e.hint || e.label, position: "right", withArrow: !0, children: p });
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function pn({
|
|
1617
1617
|
placeholder: e = "Buscar...",
|
|
1618
1618
|
value: o,
|
|
1619
1619
|
onChange: s,
|
|
1620
1620
|
onClear: r,
|
|
1621
1621
|
collapsed: t = !1
|
|
1622
1622
|
}) {
|
|
1623
|
-
const a =
|
|
1623
|
+
const a = pA(), { colorScheme: i } = sA(), n = U(
|
|
1624
1624
|
(u) => {
|
|
1625
1625
|
s?.(u.currentTarget.value);
|
|
1626
1626
|
},
|
|
1627
1627
|
[s]
|
|
1628
|
-
), c =
|
|
1628
|
+
), c = U(() => {
|
|
1629
1629
|
s?.(""), r?.();
|
|
1630
1630
|
}, [s, r]), l = o && o.length > 0;
|
|
1631
1631
|
return t ? /* @__PURE__ */ A(
|
|
@@ -1669,7 +1669,7 @@ function gn({
|
|
|
1669
1669
|
onClick: r,
|
|
1670
1670
|
collapsed: t = !1
|
|
1671
1671
|
}) {
|
|
1672
|
-
const a =
|
|
1672
|
+
const a = pA(), { colorScheme: i } = sA(), n = i === "dark" ? a.colors.dark[5] : a.colors.gray[1], c = () => {
|
|
1673
1673
|
if (typeof s == "string")
|
|
1674
1674
|
return /* @__PURE__ */ A(WA, { src: s, radius: "xl", size: t ? "sm" : "md" });
|
|
1675
1675
|
if (s)
|
|
@@ -1715,11 +1715,11 @@ function gn({
|
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
1717
|
},
|
|
1718
|
-
children: /* @__PURE__ */
|
|
1718
|
+
children: /* @__PURE__ */ E(xA, { wrap: "nowrap", children: [
|
|
1719
1719
|
c(),
|
|
1720
|
-
/* @__PURE__ */
|
|
1720
|
+
/* @__PURE__ */ E(N, { style: { flex: 1, overflow: "hidden" }, children: [
|
|
1721
1721
|
e && /* @__PURE__ */ A(
|
|
1722
|
-
|
|
1722
|
+
kA,
|
|
1723
1723
|
{
|
|
1724
1724
|
size: "sm",
|
|
1725
1725
|
fw: 500,
|
|
@@ -1732,7 +1732,7 @@ function gn({
|
|
|
1732
1732
|
}
|
|
1733
1733
|
),
|
|
1734
1734
|
o && /* @__PURE__ */ A(
|
|
1735
|
-
|
|
1735
|
+
kA,
|
|
1736
1736
|
{
|
|
1737
1737
|
size: "xs",
|
|
1738
1738
|
c: "dimmed",
|
|
@@ -1790,12 +1790,12 @@ function ue({
|
|
|
1790
1790
|
showGroups: t = !0,
|
|
1791
1791
|
groupCount: a = 2
|
|
1792
1792
|
}) {
|
|
1793
|
-
const i =
|
|
1793
|
+
const i = pA(), { colorScheme: n } = sA(), c = s || (n === "dark" ? i.colors.dark[7] : i.white);
|
|
1794
1794
|
if (o)
|
|
1795
|
-
return /* @__PURE__ */ A(
|
|
1796
|
-
const l = (d, h = !1) => Array.from({ length: d }).map((p,
|
|
1797
|
-
const
|
|
1798
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ A(j, { gap: "sm", p: "xs", style: { backgroundColor: c }, children: Array.from({ length: e }).map((d, h) => /* @__PURE__ */ A(dA, { circle: !0, height: 32, width: 32 }, h)) });
|
|
1796
|
+
const l = (d, h = !1) => Array.from({ length: d }).map((p, b) => {
|
|
1797
|
+
const k = 60 + Math.random() * 30;
|
|
1798
|
+
return /* @__PURE__ */ E(
|
|
1799
1799
|
xA,
|
|
1800
1800
|
{
|
|
1801
1801
|
gap: "sm",
|
|
@@ -1805,22 +1805,22 @@ function ue({
|
|
|
1805
1805
|
height: r
|
|
1806
1806
|
},
|
|
1807
1807
|
children: [
|
|
1808
|
-
/* @__PURE__ */ A(
|
|
1809
|
-
/* @__PURE__ */ A(
|
|
1808
|
+
/* @__PURE__ */ A(dA, { circle: !0, height: 24, width: 24 }),
|
|
1809
|
+
/* @__PURE__ */ A(dA, { height: 14, width: `${k}%`, radius: "sm" })
|
|
1810
1810
|
]
|
|
1811
1811
|
},
|
|
1812
|
-
|
|
1812
|
+
b
|
|
1813
1813
|
);
|
|
1814
1814
|
});
|
|
1815
1815
|
if (!t)
|
|
1816
|
-
return /* @__PURE__ */ A(
|
|
1816
|
+
return /* @__PURE__ */ A(j, { gap: 2, p: "xs", style: { backgroundColor: c }, children: l(e) });
|
|
1817
1817
|
const u = Math.ceil(e / a);
|
|
1818
|
-
return /* @__PURE__ */ A(
|
|
1819
|
-
/* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */ A(
|
|
1821
|
-
/* @__PURE__ */ A(
|
|
1818
|
+
return /* @__PURE__ */ A(j, { gap: "md", p: "xs", style: { backgroundColor: c }, children: Array.from({ length: a }).map((d, h) => /* @__PURE__ */ E(N, { children: [
|
|
1819
|
+
/* @__PURE__ */ E(xA, { gap: "sm", p: "xs", children: [
|
|
1820
|
+
/* @__PURE__ */ A(dA, { circle: !0, height: 20, width: 20 }),
|
|
1821
|
+
/* @__PURE__ */ A(dA, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
|
|
1822
1822
|
] }),
|
|
1823
|
-
/* @__PURE__ */ A(
|
|
1823
|
+
/* @__PURE__ */ A(j, { gap: 2, mt: 4, children: l(
|
|
1824
1824
|
h === a - 1 ? e - h * u : u,
|
|
1825
1825
|
!0
|
|
1826
1826
|
) })
|
|
@@ -1831,9 +1831,9 @@ function ho({
|
|
|
1831
1831
|
width: o = 80,
|
|
1832
1832
|
backgroundColor: s
|
|
1833
1833
|
}) {
|
|
1834
|
-
const r =
|
|
1834
|
+
const r = pA(), { colorScheme: t } = sA(), a = s || (t === "dark" ? r.colors[r.primaryColor][8] : r.colors[r.primaryColor][6]);
|
|
1835
1835
|
return /* @__PURE__ */ A(
|
|
1836
|
-
|
|
1836
|
+
j,
|
|
1837
1837
|
{
|
|
1838
1838
|
gap: "sm",
|
|
1839
1839
|
p: "xs",
|
|
@@ -1843,32 +1843,32 @@ function ho({
|
|
|
1843
1843
|
backgroundColor: a,
|
|
1844
1844
|
height: "100%"
|
|
1845
1845
|
},
|
|
1846
|
-
children: Array.from({ length: e }).map((i, n) => /* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */ A(
|
|
1848
|
-
/* @__PURE__ */ A(
|
|
1846
|
+
children: Array.from({ length: e }).map((i, n) => /* @__PURE__ */ E(j, { gap: 4, align: "center", children: [
|
|
1847
|
+
/* @__PURE__ */ A(dA, { circle: !0, height: 48, width: 48 }),
|
|
1848
|
+
/* @__PURE__ */ A(dA, { height: 10, width: 40, radius: "sm" })
|
|
1849
1849
|
] }, n))
|
|
1850
1850
|
}
|
|
1851
1851
|
);
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function kn({
|
|
1854
1854
|
collapsed: e = !1
|
|
1855
1855
|
}) {
|
|
1856
|
-
return e ? /* @__PURE__ */ A(
|
|
1857
|
-
/* @__PURE__ */ A(
|
|
1858
|
-
/* @__PURE__ */
|
|
1859
|
-
/* @__PURE__ */ A(
|
|
1860
|
-
/* @__PURE__ */ A(
|
|
1856
|
+
return e ? /* @__PURE__ */ A(N, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ A(dA, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ E(xA, { gap: "sm", p: "md", children: [
|
|
1857
|
+
/* @__PURE__ */ A(dA, { circle: !0, height: 40, width: 40 }),
|
|
1858
|
+
/* @__PURE__ */ E(j, { gap: 4, style: { flex: 1 }, children: [
|
|
1859
|
+
/* @__PURE__ */ A(dA, { height: 14, width: "70%", radius: "sm" }),
|
|
1860
|
+
/* @__PURE__ */ A(dA, { height: 10, width: "50%", radius: "sm" })
|
|
1861
1861
|
] })
|
|
1862
1862
|
] });
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1864
|
+
function Cn({
|
|
1865
1865
|
collapsed: e = !1
|
|
1866
1866
|
}) {
|
|
1867
|
-
return e ? /* @__PURE__ */ A(
|
|
1868
|
-
/* @__PURE__ */ A(
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
/* @__PURE__ */ A(
|
|
1871
|
-
/* @__PURE__ */ A(
|
|
1867
|
+
return e ? /* @__PURE__ */ A(N, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ A(dA, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ E(xA, { gap: "sm", p: "sm", children: [
|
|
1868
|
+
/* @__PURE__ */ A(dA, { circle: !0, height: 36, width: 36 }),
|
|
1869
|
+
/* @__PURE__ */ E(j, { gap: 4, style: { flex: 1 }, children: [
|
|
1870
|
+
/* @__PURE__ */ A(dA, { height: 12, width: "60%", radius: "sm" }),
|
|
1871
|
+
/* @__PURE__ */ A(dA, { height: 10, width: "80%", radius: "sm" })
|
|
1872
1872
|
] })
|
|
1873
1873
|
] });
|
|
1874
1874
|
}
|
|
@@ -1876,9 +1876,9 @@ function he({
|
|
|
1876
1876
|
message: e,
|
|
1877
1877
|
backgroundColor: o
|
|
1878
1878
|
}) {
|
|
1879
|
-
const s =
|
|
1879
|
+
const s = pA(), { colorScheme: r } = sA(), t = o || (r === "dark" ? s.colors.dark[7] : s.white), a = r === "dark" ? s.colors.red[4] : s.colors.red[6];
|
|
1880
1880
|
return /* @__PURE__ */ A(
|
|
1881
|
-
|
|
1881
|
+
N,
|
|
1882
1882
|
{
|
|
1883
1883
|
p: "md",
|
|
1884
1884
|
style: {
|
|
@@ -1889,7 +1889,7 @@ function he({
|
|
|
1889
1889
|
height: "100%"
|
|
1890
1890
|
},
|
|
1891
1891
|
children: /* @__PURE__ */ A(
|
|
1892
|
-
|
|
1892
|
+
N,
|
|
1893
1893
|
{
|
|
1894
1894
|
p: "md",
|
|
1895
1895
|
style: {
|
|
@@ -1905,7 +1905,7 @@ function he({
|
|
|
1905
1905
|
}
|
|
1906
1906
|
);
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function fo({
|
|
1909
1909
|
navigationData: e,
|
|
1910
1910
|
width: o = 280,
|
|
1911
1911
|
collapsedWidth: s = 60,
|
|
@@ -1920,123 +1920,123 @@ function po({
|
|
|
1920
1920
|
loadingError: d,
|
|
1921
1921
|
loadingComponent: h,
|
|
1922
1922
|
errorComponent: p,
|
|
1923
|
-
skeletonItemCount:
|
|
1924
|
-
backgroundDarkColor:
|
|
1925
|
-
backgroundLightColor:
|
|
1923
|
+
skeletonItemCount: b = 8,
|
|
1924
|
+
backgroundDarkColor: k,
|
|
1925
|
+
backgroundLightColor: y,
|
|
1926
1926
|
textDarkColor: f,
|
|
1927
1927
|
textLightColor: g,
|
|
1928
|
-
iconDarkColor:
|
|
1928
|
+
iconDarkColor: w,
|
|
1929
1929
|
iconLightColor: v,
|
|
1930
|
-
activeColor:
|
|
1931
|
-
withBorder:
|
|
1930
|
+
activeColor: m,
|
|
1931
|
+
withBorder: M = !0,
|
|
1932
1932
|
withShadow: $ = !1,
|
|
1933
|
-
highlightActiveItem:
|
|
1934
|
-
onMenuItemClick:
|
|
1933
|
+
highlightActiveItem: V = !0,
|
|
1934
|
+
onMenuItemClick: rA
|
|
1935
1935
|
}) {
|
|
1936
|
-
const
|
|
1937
|
-
query:
|
|
1938
|
-
setQuery:
|
|
1939
|
-
filteredItems:
|
|
1940
|
-
isSearching:
|
|
1941
|
-
clearSearch:
|
|
1936
|
+
const z = pA(), { colorScheme: O } = sA(), { collapsed: G, toggleCollapsed: Q } = ie(), D = O === "dark" ? k ?? z.colors.dark[7] : y ?? z.white, I = O === "dark" ? f ?? z.colors.gray[3] : g ?? z.colors.gray[7], T = O === "dark" ? w ?? z.colors[z.primaryColor][4] : v ?? z.colors[z.primaryColor][6], Y = m ? z.colors[m]?.[6] ?? z.colors[z.primaryColor][6] : z.colors[z.primaryColor][6], {
|
|
1937
|
+
query: B,
|
|
1938
|
+
setQuery: X,
|
|
1939
|
+
filteredItems: W,
|
|
1940
|
+
isSearching: x,
|
|
1941
|
+
clearSearch: C
|
|
1942
1942
|
} = io({
|
|
1943
1943
|
navigationData: e,
|
|
1944
1944
|
onSearch: i
|
|
1945
|
-
}), { navigateToItem:
|
|
1945
|
+
}), { navigateToItem: R, isItemActive: S, isItemOrChildActive: L } = ce({
|
|
1946
1946
|
navigationData: e,
|
|
1947
|
-
onMenuItemClick:
|
|
1947
|
+
onMenuItemClick: rA
|
|
1948
1948
|
});
|
|
1949
1949
|
de({
|
|
1950
1950
|
navigationData: e,
|
|
1951
|
-
navigateToItem:
|
|
1951
|
+
navigateToItem: R,
|
|
1952
1952
|
onToggleSidebar: Q,
|
|
1953
1953
|
enabled: !0
|
|
1954
1954
|
});
|
|
1955
|
-
const
|
|
1956
|
-
const
|
|
1957
|
-
return
|
|
1958
|
-
if (!(!
|
|
1959
|
-
if (
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1955
|
+
const P = G ? s : o, H = uA(() => {
|
|
1956
|
+
const J = /* @__PURE__ */ new Map(), oA = [];
|
|
1957
|
+
return W.forEach((K) => {
|
|
1958
|
+
if (!(!K.showInSidebar || (typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem))
|
|
1959
|
+
if (K.category) {
|
|
1960
|
+
const CA = J.get(K.category) || [];
|
|
1961
|
+
CA.push(K), J.set(K.category, CA);
|
|
1962
1962
|
} else
|
|
1963
|
-
|
|
1964
|
-
}), { groups:
|
|
1965
|
-
}, [
|
|
1963
|
+
oA.push(K);
|
|
1964
|
+
}), { groups: J, ungrouped: oA };
|
|
1965
|
+
}, [W]), F = () => {
|
|
1966
1966
|
if (d)
|
|
1967
|
-
return p || /* @__PURE__ */ A(he, { message: d, backgroundColor:
|
|
1967
|
+
return p || /* @__PURE__ */ A(he, { message: d, backgroundColor: D });
|
|
1968
1968
|
if (u)
|
|
1969
1969
|
return h || /* @__PURE__ */ A(
|
|
1970
1970
|
ue,
|
|
1971
1971
|
{
|
|
1972
|
-
itemCount:
|
|
1973
|
-
collapsed:
|
|
1974
|
-
backgroundColor:
|
|
1975
|
-
showGroups: !
|
|
1972
|
+
itemCount: b,
|
|
1973
|
+
collapsed: G,
|
|
1974
|
+
backgroundColor: D,
|
|
1975
|
+
showGroups: !G
|
|
1976
1976
|
}
|
|
1977
1977
|
);
|
|
1978
|
-
const
|
|
1978
|
+
const J = () => H.ungrouped.map((K, tA) => /* @__PURE__ */ A(
|
|
1979
1979
|
MA,
|
|
1980
1980
|
{
|
|
1981
|
-
item:
|
|
1982
|
-
collapsed:
|
|
1983
|
-
active:
|
|
1984
|
-
onClick:
|
|
1985
|
-
textColor:
|
|
1986
|
-
iconColor:
|
|
1987
|
-
hoverColor:
|
|
1981
|
+
item: K,
|
|
1982
|
+
collapsed: G,
|
|
1983
|
+
active: V && S(K),
|
|
1984
|
+
onClick: R,
|
|
1985
|
+
textColor: I,
|
|
1986
|
+
iconColor: T,
|
|
1987
|
+
hoverColor: Y
|
|
1988
1988
|
},
|
|
1989
|
-
`item-${
|
|
1990
|
-
)),
|
|
1989
|
+
`item-${tA}`
|
|
1990
|
+
)), oA = () => Array.from(H.groups.entries()).map(([tA, CA], yA) => /* @__PURE__ */ A(
|
|
1991
1991
|
co,
|
|
1992
1992
|
{
|
|
1993
|
-
label:
|
|
1993
|
+
label: tA,
|
|
1994
1994
|
groupId: `group-${yA}`,
|
|
1995
1995
|
defaultExpanded: !0,
|
|
1996
|
-
children:
|
|
1996
|
+
children: CA.map((EA, q) => /* @__PURE__ */ A(
|
|
1997
1997
|
MA,
|
|
1998
1998
|
{
|
|
1999
1999
|
item: EA,
|
|
2000
|
-
collapsed:
|
|
2001
|
-
active:
|
|
2002
|
-
onClick:
|
|
2003
|
-
textColor:
|
|
2004
|
-
iconColor:
|
|
2000
|
+
collapsed: G,
|
|
2001
|
+
active: V && S(EA),
|
|
2002
|
+
onClick: R,
|
|
2003
|
+
textColor: I,
|
|
2004
|
+
iconColor: T
|
|
2005
2005
|
},
|
|
2006
2006
|
`group-${yA}-item-${q}`
|
|
2007
2007
|
))
|
|
2008
2008
|
},
|
|
2009
2009
|
`group-${yA}`
|
|
2010
2010
|
));
|
|
2011
|
-
return
|
|
2012
|
-
|
|
2011
|
+
return G ? /* @__PURE__ */ E(j, { gap: 4, children: [
|
|
2012
|
+
H.ungrouped.map((K, tA) => /* @__PURE__ */ A(
|
|
2013
2013
|
MA,
|
|
2014
2014
|
{
|
|
2015
|
-
item:
|
|
2015
|
+
item: K,
|
|
2016
2016
|
collapsed: !0,
|
|
2017
|
-
active:
|
|
2018
|
-
onClick:
|
|
2019
|
-
textColor:
|
|
2020
|
-
iconColor:
|
|
2017
|
+
active: V && S(K),
|
|
2018
|
+
onClick: R,
|
|
2019
|
+
textColor: I,
|
|
2020
|
+
iconColor: T
|
|
2021
2021
|
},
|
|
2022
|
-
`item-${
|
|
2022
|
+
`item-${tA}`
|
|
2023
2023
|
)),
|
|
2024
|
-
Array.from(
|
|
2024
|
+
Array.from(H.groups.values()).flat().map((K, tA) => /* @__PURE__ */ A(
|
|
2025
2025
|
MA,
|
|
2026
2026
|
{
|
|
2027
|
-
item:
|
|
2027
|
+
item: K,
|
|
2028
2028
|
collapsed: !0,
|
|
2029
|
-
active:
|
|
2030
|
-
onClick:
|
|
2031
|
-
textColor:
|
|
2032
|
-
iconColor:
|
|
2029
|
+
active: V && S(K),
|
|
2030
|
+
onClick: R,
|
|
2031
|
+
textColor: I,
|
|
2032
|
+
iconColor: T
|
|
2033
2033
|
},
|
|
2034
|
-
`grouped-item-${
|
|
2034
|
+
`grouped-item-${tA}`
|
|
2035
2035
|
))
|
|
2036
|
-
] }) : /* @__PURE__ */
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2036
|
+
] }) : /* @__PURE__ */ E(j, { gap: "xs", children: [
|
|
2037
|
+
H.ungrouped.length > 0 && /* @__PURE__ */ A(j, { gap: 2, children: J() }),
|
|
2038
|
+
H.groups.size > 0 && H.ungrouped.length > 0 && /* @__PURE__ */ A(_A, { my: "xs" }),
|
|
2039
|
+
oA()
|
|
2040
2040
|
] });
|
|
2041
2041
|
};
|
|
2042
2042
|
return /* @__PURE__ */ A(
|
|
@@ -2046,39 +2046,39 @@ function po({
|
|
|
2046
2046
|
transition: "slide-right",
|
|
2047
2047
|
duration: 200,
|
|
2048
2048
|
timingFunction: "ease",
|
|
2049
|
-
children: (
|
|
2050
|
-
|
|
2049
|
+
children: (J) => /* @__PURE__ */ E(
|
|
2050
|
+
N,
|
|
2051
2051
|
{
|
|
2052
2052
|
style: {
|
|
2053
|
-
...
|
|
2054
|
-
width:
|
|
2055
|
-
height: typeof r == "number" ?
|
|
2056
|
-
minHeight: typeof r == "number" ?
|
|
2057
|
-
backgroundColor:
|
|
2053
|
+
...J,
|
|
2054
|
+
width: cA(P),
|
|
2055
|
+
height: typeof r == "number" ? cA(r) : r,
|
|
2056
|
+
minHeight: typeof r == "number" ? cA(r) : r,
|
|
2057
|
+
backgroundColor: D,
|
|
2058
2058
|
display: "flex",
|
|
2059
2059
|
flexDirection: "column",
|
|
2060
2060
|
overflow: "hidden",
|
|
2061
2061
|
transition: "width 200ms ease",
|
|
2062
|
-
borderRight:
|
|
2063
|
-
boxShadow: $ ?
|
|
2062
|
+
borderRight: M ? `1px solid ${O === "dark" ? z.colors.dark[5] : z.colors.gray[2]}` : void 0,
|
|
2063
|
+
boxShadow: $ ? z.shadows.sm : void 0
|
|
2064
2064
|
},
|
|
2065
2065
|
children: [
|
|
2066
|
-
n && /* @__PURE__ */ A(
|
|
2067
|
-
t && !
|
|
2066
|
+
n && /* @__PURE__ */ A(N, { style: { flexShrink: 0 }, children: n }),
|
|
2067
|
+
t && !G && /* @__PURE__ */ A(N, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ A(
|
|
2068
2068
|
xe,
|
|
2069
2069
|
{
|
|
2070
2070
|
placeholder: a,
|
|
2071
2071
|
leftSection: /* @__PURE__ */ A(YA, { size: 16 }),
|
|
2072
|
-
rightSection:
|
|
2072
|
+
rightSection: x ? /* @__PURE__ */ A(
|
|
2073
2073
|
Le,
|
|
2074
2074
|
{
|
|
2075
2075
|
size: 16,
|
|
2076
2076
|
style: { cursor: "pointer" },
|
|
2077
|
-
onClick:
|
|
2077
|
+
onClick: C
|
|
2078
2078
|
}
|
|
2079
2079
|
) : null,
|
|
2080
|
-
value:
|
|
2081
|
-
onChange: (
|
|
2080
|
+
value: B,
|
|
2081
|
+
onChange: (oA) => X(oA.currentTarget.value),
|
|
2082
2082
|
size: "sm"
|
|
2083
2083
|
}
|
|
2084
2084
|
) }),
|
|
@@ -2089,17 +2089,17 @@ function po({
|
|
|
2089
2089
|
scrollbarSize: 6,
|
|
2090
2090
|
type: "hover",
|
|
2091
2091
|
offsetScrollbars: !0,
|
|
2092
|
-
children: /* @__PURE__ */ A(
|
|
2092
|
+
children: /* @__PURE__ */ A(N, { p: "xs", children: F() })
|
|
2093
2093
|
}
|
|
2094
2094
|
),
|
|
2095
2095
|
c && /* @__PURE__ */ A(
|
|
2096
|
-
|
|
2096
|
+
N,
|
|
2097
2097
|
{
|
|
2098
2098
|
style: {
|
|
2099
2099
|
flexShrink: 0,
|
|
2100
2100
|
height: l,
|
|
2101
|
-
backgroundColor:
|
|
2102
|
-
borderTop:
|
|
2101
|
+
backgroundColor: D,
|
|
2102
|
+
borderTop: M ? `1px solid ${O === "dark" ? z.colors.dark[5] : z.colors.gray[2]}` : void 0
|
|
2103
2103
|
},
|
|
2104
2104
|
children: c
|
|
2105
2105
|
}
|
|
@@ -2110,7 +2110,7 @@ function po({
|
|
|
2110
2110
|
}
|
|
2111
2111
|
);
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function po(e) {
|
|
2114
2114
|
const {
|
|
2115
2115
|
navigationData: o,
|
|
2116
2116
|
collapsed: s,
|
|
@@ -2131,7 +2131,7 @@ function fo(e) {
|
|
|
2131
2131
|
showKeyboardShortcuts: a,
|
|
2132
2132
|
highlightActiveItem: i,
|
|
2133
2133
|
onMenuItemClick: n,
|
|
2134
|
-
children: /* @__PURE__ */ A(
|
|
2134
|
+
children: /* @__PURE__ */ A(fo, { ...e })
|
|
2135
2135
|
}
|
|
2136
2136
|
);
|
|
2137
2137
|
}
|
|
@@ -2142,8 +2142,8 @@ function go({
|
|
|
2142
2142
|
iconColor: r,
|
|
2143
2143
|
activeColor: t
|
|
2144
2144
|
}) {
|
|
2145
|
-
|
|
2146
|
-
const { colorScheme: a } =
|
|
2145
|
+
pA();
|
|
2146
|
+
const { colorScheme: a } = sA(), i = typeof e.disabled == "function" ? e.disabled() : e.disabled;
|
|
2147
2147
|
if (i && e.hideDisabledItem || !e.showInSidebar)
|
|
2148
2148
|
return null;
|
|
2149
2149
|
const n = wA.t(e.label);
|
|
@@ -2152,8 +2152,8 @@ function go({
|
|
|
2152
2152
|
const u = typeof l.disabled == "function" ? l.disabled() : l.disabled;
|
|
2153
2153
|
return l.showInSidebar && (!u || !l.hideDisabledItem);
|
|
2154
2154
|
});
|
|
2155
|
-
return c.length === 0 ? null : /* @__PURE__ */
|
|
2156
|
-
|
|
2155
|
+
return c.length === 0 ? null : /* @__PURE__ */ E(
|
|
2156
|
+
nA,
|
|
2157
2157
|
{
|
|
2158
2158
|
position: "right-start",
|
|
2159
2159
|
withArrow: !0,
|
|
@@ -2162,7 +2162,7 @@ function go({
|
|
|
2162
2162
|
openDelay: 100,
|
|
2163
2163
|
closeDelay: 200,
|
|
2164
2164
|
children: [
|
|
2165
|
-
/* @__PURE__ */ A(
|
|
2165
|
+
/* @__PURE__ */ A(nA.Target, { children: /* @__PURE__ */ A(SA, { label: n, position: "right", withArrow: !0, children: /* @__PURE__ */ E(j, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2166
2166
|
/* @__PURE__ */ A(
|
|
2167
2167
|
LA,
|
|
2168
2168
|
{
|
|
@@ -2173,11 +2173,11 @@ function go({
|
|
|
2173
2173
|
style: {
|
|
2174
2174
|
opacity: i ? 0.5 : 1
|
|
2175
2175
|
},
|
|
2176
|
-
children: /* @__PURE__ */ A(
|
|
2176
|
+
children: /* @__PURE__ */ A(N, { style: { color: o ? "white" : r }, children: e.icon })
|
|
2177
2177
|
}
|
|
2178
2178
|
),
|
|
2179
2179
|
/* @__PURE__ */ A(
|
|
2180
|
-
|
|
2180
|
+
kA,
|
|
2181
2181
|
{
|
|
2182
2182
|
size: "8px",
|
|
2183
2183
|
ta: "center",
|
|
@@ -2193,12 +2193,12 @@ function go({
|
|
|
2193
2193
|
}
|
|
2194
2194
|
)
|
|
2195
2195
|
] }) }) }),
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */ A(
|
|
2196
|
+
/* @__PURE__ */ E(nA.Dropdown, { children: [
|
|
2197
|
+
/* @__PURE__ */ A(nA.Label, { children: n }),
|
|
2198
2198
|
c.map((l, u) => {
|
|
2199
2199
|
const d = typeof l.disabled == "function" ? l.disabled() : l.disabled;
|
|
2200
2200
|
return /* @__PURE__ */ A(
|
|
2201
|
-
|
|
2201
|
+
nA.Item,
|
|
2202
2202
|
{
|
|
2203
2203
|
leftSection: l.icon,
|
|
2204
2204
|
disabled: d,
|
|
@@ -2213,7 +2213,7 @@ function go({
|
|
|
2213
2213
|
}
|
|
2214
2214
|
);
|
|
2215
2215
|
}
|
|
2216
|
-
return /* @__PURE__ */ A(SA, { label: n, position: "right", withArrow: !0, children: /* @__PURE__ */
|
|
2216
|
+
return /* @__PURE__ */ A(SA, { label: n, position: "right", withArrow: !0, children: /* @__PURE__ */ E(j, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2217
2217
|
/* @__PURE__ */ A(
|
|
2218
2218
|
LA,
|
|
2219
2219
|
{
|
|
@@ -2225,11 +2225,11 @@ function go({
|
|
|
2225
2225
|
style: {
|
|
2226
2226
|
opacity: i ? 0.5 : 1
|
|
2227
2227
|
},
|
|
2228
|
-
children: /* @__PURE__ */ A(
|
|
2228
|
+
children: /* @__PURE__ */ A(N, { style: { color: o ? "white" : r }, children: e.icon })
|
|
2229
2229
|
}
|
|
2230
2230
|
),
|
|
2231
2231
|
/* @__PURE__ */ A(
|
|
2232
|
-
|
|
2232
|
+
kA,
|
|
2233
2233
|
{
|
|
2234
2234
|
size: "8px",
|
|
2235
2235
|
ta: "center",
|
|
@@ -2261,57 +2261,57 @@ function bo({
|
|
|
2261
2261
|
backgroundDarkColor: d,
|
|
2262
2262
|
backgroundLightColor: h,
|
|
2263
2263
|
iconDarkColor: p,
|
|
2264
|
-
iconLightColor:
|
|
2265
|
-
activeColor:
|
|
2266
|
-
withBorder:
|
|
2264
|
+
iconLightColor: b,
|
|
2265
|
+
activeColor: k,
|
|
2266
|
+
withBorder: y = !0,
|
|
2267
2267
|
withShadow: f = !1,
|
|
2268
2268
|
highlightActiveItem: g = !0,
|
|
2269
|
-
onMenuItemClick:
|
|
2269
|
+
onMenuItemClick: w
|
|
2270
2270
|
}) {
|
|
2271
|
-
const v =
|
|
2271
|
+
const v = pA(), { colorScheme: m } = sA(), { toggleCollapsed: M } = ie(), $ = m === "dark" ? d ?? v.colors.dark[7] : h ?? v.white, V = m === "dark" ? p ?? v.colors[v.primaryColor][4] : b ?? v.colors[v.primaryColor][6], rA = k ?? v.primaryColor, { navigateToItem: z, isItemActive: O, isItemOrChildActive: G } = ce({
|
|
2272
2272
|
navigationData: e,
|
|
2273
|
-
onMenuItemClick:
|
|
2273
|
+
onMenuItemClick: w
|
|
2274
2274
|
});
|
|
2275
2275
|
de({
|
|
2276
2276
|
navigationData: e,
|
|
2277
|
-
navigateToItem:
|
|
2278
|
-
onToggleSidebar:
|
|
2277
|
+
navigateToItem: z,
|
|
2278
|
+
onToggleSidebar: M,
|
|
2279
2279
|
enabled: !0
|
|
2280
2280
|
});
|
|
2281
|
-
const Q = e.filter((
|
|
2281
|
+
const Q = e.filter((T) => !(!T.showInSidebar || (typeof T.disabled == "function" ? T.disabled() : T.disabled) && T.hideDisabledItem)), D = () => n ? l || /* @__PURE__ */ A(he, { message: n, backgroundColor: $ }) : i ? c || /* @__PURE__ */ A(
|
|
2282
2282
|
ue,
|
|
2283
2283
|
{
|
|
2284
2284
|
itemCount: u,
|
|
2285
2285
|
collapsed: !0,
|
|
2286
2286
|
backgroundColor: $
|
|
2287
2287
|
}
|
|
2288
|
-
) : /* @__PURE__ */ A(
|
|
2288
|
+
) : /* @__PURE__ */ A(j, { gap: 8, align: "center", children: Q.map((T, Y) => /* @__PURE__ */ A(
|
|
2289
2289
|
go,
|
|
2290
2290
|
{
|
|
2291
|
-
item:
|
|
2292
|
-
active: g && (O(
|
|
2293
|
-
onClick:
|
|
2294
|
-
iconColor:
|
|
2295
|
-
activeColor:
|
|
2291
|
+
item: T,
|
|
2292
|
+
active: g && (O(T) || G(T)),
|
|
2293
|
+
onClick: z,
|
|
2294
|
+
iconColor: V,
|
|
2295
|
+
activeColor: rA
|
|
2296
2296
|
},
|
|
2297
|
-
|
|
2298
|
-
)) }),
|
|
2299
|
-
return /* @__PURE__ */
|
|
2300
|
-
|
|
2297
|
+
Y
|
|
2298
|
+
)) }), I = m === "dark" ? v.colors.dark[5] : v.colors.gray[2];
|
|
2299
|
+
return /* @__PURE__ */ E(
|
|
2300
|
+
N,
|
|
2301
2301
|
{
|
|
2302
2302
|
style: {
|
|
2303
|
-
width:
|
|
2304
|
-
height:
|
|
2303
|
+
width: cA(o),
|
|
2304
|
+
height: cA(s),
|
|
2305
2305
|
backgroundColor: $,
|
|
2306
2306
|
display: "flex",
|
|
2307
2307
|
flexDirection: "column",
|
|
2308
2308
|
overflow: "hidden",
|
|
2309
2309
|
boxShadow: f ? v.shadows.sm : void 0,
|
|
2310
|
-
borderRight:
|
|
2310
|
+
borderRight: y ? `1px solid ${I}` : void 0
|
|
2311
2311
|
},
|
|
2312
2312
|
children: [
|
|
2313
2313
|
r && /* @__PURE__ */ A(
|
|
2314
|
-
|
|
2314
|
+
N,
|
|
2315
2315
|
{
|
|
2316
2316
|
style: {
|
|
2317
2317
|
flexShrink: 0,
|
|
@@ -2329,13 +2329,13 @@ function bo({
|
|
|
2329
2329
|
style: { flex: 1 },
|
|
2330
2330
|
scrollbarSize: 4,
|
|
2331
2331
|
type: "hover",
|
|
2332
|
-
children: /* @__PURE__ */ A(
|
|
2332
|
+
children: /* @__PURE__ */ A(N, { p: "xs", children: D() })
|
|
2333
2333
|
}
|
|
2334
2334
|
),
|
|
2335
|
-
t && /* @__PURE__ */
|
|
2335
|
+
t && /* @__PURE__ */ E(vA, { children: [
|
|
2336
2336
|
/* @__PURE__ */ A(_A, {}),
|
|
2337
2337
|
/* @__PURE__ */ A(
|
|
2338
|
-
|
|
2338
|
+
N,
|
|
2339
2339
|
{
|
|
2340
2340
|
style: {
|
|
2341
2341
|
flexShrink: 0,
|
|
@@ -2377,7 +2377,7 @@ function mo(e) {
|
|
|
2377
2377
|
}
|
|
2378
2378
|
);
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2380
|
+
function ko({
|
|
2381
2381
|
navigationData: e,
|
|
2382
2382
|
width: o = 360,
|
|
2383
2383
|
collapsedWidth: s = 60,
|
|
@@ -2392,71 +2392,71 @@ function Co({
|
|
|
2392
2392
|
loadingError: d,
|
|
2393
2393
|
loadingComponent: h,
|
|
2394
2394
|
errorComponent: p,
|
|
2395
|
-
skeletonItemCount:
|
|
2396
|
-
skeletonGroupCount:
|
|
2397
|
-
backgroundDarkColor:
|
|
2395
|
+
skeletonItemCount: b = 8,
|
|
2396
|
+
skeletonGroupCount: k = 3,
|
|
2397
|
+
backgroundDarkColor: y,
|
|
2398
2398
|
backgroundLightColor: f,
|
|
2399
2399
|
textDarkColor: g,
|
|
2400
|
-
textLightColor:
|
|
2400
|
+
textLightColor: w,
|
|
2401
2401
|
iconDarkColor: v,
|
|
2402
|
-
iconLightColor:
|
|
2403
|
-
activeColor:
|
|
2402
|
+
iconLightColor: m,
|
|
2403
|
+
activeColor: M,
|
|
2404
2404
|
groupBackgroundColor: $,
|
|
2405
|
-
selectedGroupColor:
|
|
2406
|
-
groupColor:
|
|
2407
|
-
groupLabelDarkColor:
|
|
2405
|
+
selectedGroupColor: V,
|
|
2406
|
+
groupColor: rA,
|
|
2407
|
+
groupLabelDarkColor: z,
|
|
2408
2408
|
groupLabelLightColor: O,
|
|
2409
|
-
withBorder:
|
|
2409
|
+
withBorder: G = !1,
|
|
2410
2410
|
highlightActiveItem: Q = !0,
|
|
2411
|
-
onMenuItemClick:
|
|
2411
|
+
onMenuItemClick: D
|
|
2412
2412
|
}) {
|
|
2413
|
-
const
|
|
2414
|
-
collapsed:
|
|
2415
|
-
toggleCollapsed:
|
|
2416
|
-
activeGroup:
|
|
2417
|
-
setActiveGroup:
|
|
2418
|
-
} = ie(),
|
|
2413
|
+
const I = pA(), { colorScheme: T } = sA(), {
|
|
2414
|
+
collapsed: Y,
|
|
2415
|
+
toggleCollapsed: B,
|
|
2416
|
+
activeGroup: X,
|
|
2417
|
+
setActiveGroup: W
|
|
2418
|
+
} = ie(), x = T === "dark" ? y ?? I.colors.dark[7] : f ?? I.white, C = T === "dark" ? g ?? I.colors.gray[3] : w ?? I.colors.gray[7], R = T === "dark" ? v ?? I.colors[I.primaryColor][4] : m ?? I.colors[I.primaryColor][6], S = M ? I.colors[M]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], L = $ || (T === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), P = V || (T === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: H, isItemActive: F } = ce({
|
|
2419
2419
|
navigationData: e,
|
|
2420
|
-
onMenuItemClick:
|
|
2420
|
+
onMenuItemClick: D
|
|
2421
2421
|
});
|
|
2422
2422
|
de({
|
|
2423
2423
|
navigationData: e,
|
|
2424
|
-
navigateToItem:
|
|
2425
|
-
onToggleSidebar:
|
|
2424
|
+
navigateToItem: H,
|
|
2425
|
+
onToggleSidebar: B,
|
|
2426
2426
|
enabled: !0
|
|
2427
2427
|
});
|
|
2428
|
-
const
|
|
2428
|
+
const J = uA(() => {
|
|
2429
2429
|
const q = /* @__PURE__ */ new Map();
|
|
2430
|
-
return e.forEach((
|
|
2431
|
-
if (!
|
|
2430
|
+
return e.forEach((lA) => {
|
|
2431
|
+
if (!lA.showInSidebar || (typeof lA.disabled == "function" ? lA.disabled() : lA.disabled) && lA.hideDisabledItem)
|
|
2432
2432
|
return;
|
|
2433
|
-
const
|
|
2433
|
+
const TA = lA.group ?? {
|
|
2434
2434
|
icon: a ?? /* @__PURE__ */ A(Re, { size: "2.2rem", stroke: 1 }),
|
|
2435
2435
|
label: "Default",
|
|
2436
2436
|
name: "Default",
|
|
2437
2437
|
hint: "Default",
|
|
2438
2438
|
indexOrder: 0
|
|
2439
|
-
}, hA = q.get(
|
|
2440
|
-
hA ? hA.items.push(
|
|
2441
|
-
group:
|
|
2442
|
-
items: [
|
|
2439
|
+
}, hA = q.get(TA.name);
|
|
2440
|
+
hA ? hA.items.push(lA) : q.set(TA.name, {
|
|
2441
|
+
group: TA,
|
|
2442
|
+
items: [lA]
|
|
2443
2443
|
});
|
|
2444
|
-
}), Array.from(q.values()).sort((
|
|
2444
|
+
}), Array.from(q.values()).sort((lA, RA) => lA.group.indexOrder - RA.group.indexOrder);
|
|
2445
2445
|
}, [e, a]);
|
|
2446
|
-
|
|
2447
|
-
!
|
|
2448
|
-
}, [
|
|
2449
|
-
const
|
|
2450
|
-
|
|
2451
|
-
}, [
|
|
2446
|
+
aA(() => {
|
|
2447
|
+
!X && J.length > 0 && W(J[0].group.name);
|
|
2448
|
+
}, [X, J, W]);
|
|
2449
|
+
const oA = uA(() => J.find((lA) => lA.group.name === X)?.items ?? [], [J, X]), K = U((q) => {
|
|
2450
|
+
Y ? (B(), W(q)) : X === q ? B() : W(q);
|
|
2451
|
+
}, [Y, X, B, W]), tA = Y ? 0 : Number(cA(o)) - Number(cA(t)), CA = () => u && J.length === 0 ? /* @__PURE__ */ A(
|
|
2452
2452
|
ho,
|
|
2453
2453
|
{
|
|
2454
|
-
groupCount:
|
|
2454
|
+
groupCount: k,
|
|
2455
2455
|
width: t,
|
|
2456
|
-
backgroundColor:
|
|
2456
|
+
backgroundColor: L
|
|
2457
2457
|
}
|
|
2458
|
-
) :
|
|
2459
|
-
|
|
2458
|
+
) : J.length <= 1 ? null : /* @__PURE__ */ A(
|
|
2459
|
+
j,
|
|
2460
2460
|
{
|
|
2461
2461
|
gap: 4,
|
|
2462
2462
|
p: 4,
|
|
@@ -2464,108 +2464,108 @@ function Co({
|
|
|
2464
2464
|
style: {
|
|
2465
2465
|
width: t,
|
|
2466
2466
|
height: "100%",
|
|
2467
|
-
backgroundColor:
|
|
2467
|
+
backgroundColor: L,
|
|
2468
2468
|
flexShrink: 0
|
|
2469
2469
|
},
|
|
2470
|
-
children:
|
|
2470
|
+
children: J.map((q) => /* @__PURE__ */ A(
|
|
2471
2471
|
uo,
|
|
2472
2472
|
{
|
|
2473
2473
|
group: q.group,
|
|
2474
|
-
active: q.group.name ===
|
|
2475
|
-
onClick: () =>
|
|
2474
|
+
active: q.group.name === X,
|
|
2475
|
+
onClick: () => K(q.group.name),
|
|
2476
2476
|
showLabel: i,
|
|
2477
|
-
activeColor:
|
|
2478
|
-
inactiveColor:
|
|
2477
|
+
activeColor: P,
|
|
2478
|
+
inactiveColor: rA
|
|
2479
2479
|
},
|
|
2480
2480
|
q.group.name
|
|
2481
2481
|
))
|
|
2482
2482
|
}
|
|
2483
|
-
), yA = () => d ? p || /* @__PURE__ */ A(he, { message: d, backgroundColor:
|
|
2483
|
+
), yA = () => d ? p || /* @__PURE__ */ A(he, { message: d, backgroundColor: x }) : u ? h || /* @__PURE__ */ A(
|
|
2484
2484
|
ue,
|
|
2485
2485
|
{
|
|
2486
|
-
itemCount:
|
|
2486
|
+
itemCount: b,
|
|
2487
2487
|
collapsed: !1,
|
|
2488
|
-
backgroundColor:
|
|
2488
|
+
backgroundColor: x,
|
|
2489
2489
|
showGroups: !1
|
|
2490
2490
|
}
|
|
2491
|
-
) : /* @__PURE__ */ A(
|
|
2491
|
+
) : /* @__PURE__ */ A(j, { gap: 2, children: oA.map((q, lA) => /* @__PURE__ */ A(
|
|
2492
2492
|
MA,
|
|
2493
2493
|
{
|
|
2494
2494
|
item: q,
|
|
2495
2495
|
collapsed: !1,
|
|
2496
|
-
active: Q &&
|
|
2497
|
-
onClick:
|
|
2498
|
-
textColor:
|
|
2499
|
-
iconColor:
|
|
2500
|
-
hoverColor:
|
|
2496
|
+
active: Q && F(q),
|
|
2497
|
+
onClick: H,
|
|
2498
|
+
textColor: C,
|
|
2499
|
+
iconColor: R,
|
|
2500
|
+
hoverColor: S
|
|
2501
2501
|
},
|
|
2502
|
-
|
|
2503
|
-
)) }), EA =
|
|
2504
|
-
return
|
|
2505
|
-
n && /* @__PURE__ */ A(
|
|
2502
|
+
lA
|
|
2503
|
+
)) }), EA = T === "dark" ? I.colors.dark[5] : I.colors.gray[2];
|
|
2504
|
+
return J.length <= 1 ? /* @__PURE__ */ E(BA, { direction: "column", w: Y ? s : o, h: "100%", style: { backgroundColor: x }, children: [
|
|
2505
|
+
n && /* @__PURE__ */ A(N, { style: { width: "100%", flexShrink: 0 }, children: n }),
|
|
2506
2506
|
/* @__PURE__ */ A(
|
|
2507
|
-
|
|
2507
|
+
N,
|
|
2508
2508
|
{
|
|
2509
2509
|
style: {
|
|
2510
2510
|
flex: 1,
|
|
2511
2511
|
width: "100%",
|
|
2512
|
-
backgroundColor:
|
|
2512
|
+
backgroundColor: x,
|
|
2513
2513
|
display: "flex",
|
|
2514
2514
|
flexDirection: "column",
|
|
2515
2515
|
overflow: "hidden",
|
|
2516
|
-
borderRight:
|
|
2516
|
+
borderRight: G ? `1px solid ${EA}` : void 0
|
|
2517
2517
|
},
|
|
2518
|
-
children: /* @__PURE__ */ A(zA, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ A(
|
|
2518
|
+
children: /* @__PURE__ */ A(zA, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ A(N, { p: "xs", children: Y ? /* @__PURE__ */ A(j, { gap: 8, align: "center", children: e.filter((q) => q.showInSidebar ? !((typeof q.disabled == "function" ? q.disabled() : q.disabled) && q.hideDisabledItem) : !1).map((q, lA) => /* @__PURE__ */ A(
|
|
2519
2519
|
MA,
|
|
2520
2520
|
{
|
|
2521
2521
|
item: q,
|
|
2522
2522
|
collapsed: !0,
|
|
2523
|
-
active: Q &&
|
|
2524
|
-
onClick:
|
|
2525
|
-
textColor:
|
|
2526
|
-
iconColor:
|
|
2527
|
-
hoverColor:
|
|
2523
|
+
active: Q && F(q),
|
|
2524
|
+
onClick: H,
|
|
2525
|
+
textColor: C,
|
|
2526
|
+
iconColor: R,
|
|
2527
|
+
hoverColor: S
|
|
2528
2528
|
},
|
|
2529
|
-
|
|
2529
|
+
lA
|
|
2530
2530
|
)) }) : yA() }) })
|
|
2531
2531
|
}
|
|
2532
2532
|
),
|
|
2533
|
-
c && /* @__PURE__ */ A(
|
|
2534
|
-
] }) : /* @__PURE__ */
|
|
2535
|
-
n && /* @__PURE__ */ A(
|
|
2536
|
-
/* @__PURE__ */
|
|
2537
|
-
|
|
2533
|
+
c && /* @__PURE__ */ A(N, { style: { width: "100%", backgroundColor: x, flexShrink: 0 }, children: c })
|
|
2534
|
+
] }) : /* @__PURE__ */ E(BA, { direction: "column", w: Y ? t : o, h: "100%", style: { backgroundColor: x }, children: [
|
|
2535
|
+
n && /* @__PURE__ */ A(N, { style: { width: "100%", flexShrink: 0 }, children: n }),
|
|
2536
|
+
/* @__PURE__ */ E(
|
|
2537
|
+
N,
|
|
2538
2538
|
{
|
|
2539
2539
|
style: {
|
|
2540
2540
|
flex: 1,
|
|
2541
2541
|
width: "100%",
|
|
2542
2542
|
display: "flex",
|
|
2543
2543
|
overflow: "hidden",
|
|
2544
|
-
borderRight:
|
|
2544
|
+
borderRight: G ? `1px solid ${EA}` : void 0
|
|
2545
2545
|
},
|
|
2546
2546
|
children: [
|
|
2547
|
-
|
|
2547
|
+
CA(),
|
|
2548
2548
|
/* @__PURE__ */ A(
|
|
2549
|
-
|
|
2549
|
+
N,
|
|
2550
2550
|
{
|
|
2551
2551
|
style: {
|
|
2552
|
-
width:
|
|
2552
|
+
width: Y ? 0 : tA,
|
|
2553
2553
|
height: "100%",
|
|
2554
|
-
backgroundColor:
|
|
2554
|
+
backgroundColor: x,
|
|
2555
2555
|
overflow: "hidden",
|
|
2556
2556
|
transition: "width 200ms ease",
|
|
2557
|
-
borderLeft:
|
|
2557
|
+
borderLeft: J.length > 1 ? `1px solid ${T === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
|
|
2558
2558
|
},
|
|
2559
|
-
children: !
|
|
2559
|
+
children: !Y && X && /* @__PURE__ */ A(zA, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ A(N, { p: "xs", children: yA() }) })
|
|
2560
2560
|
}
|
|
2561
2561
|
)
|
|
2562
2562
|
]
|
|
2563
2563
|
}
|
|
2564
2564
|
),
|
|
2565
|
-
c && /* @__PURE__ */ A(
|
|
2565
|
+
c && /* @__PURE__ */ A(N, { style: { width: "100%", backgroundColor: x, flexShrink: 0 }, children: c })
|
|
2566
2566
|
] });
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2568
|
+
function Co(e) {
|
|
2569
2569
|
const {
|
|
2570
2570
|
navigationData: o,
|
|
2571
2571
|
collapsed: s,
|
|
@@ -2592,7 +2592,7 @@ function ko(e) {
|
|
|
2592
2592
|
showKeyboardShortcuts: c,
|
|
2593
2593
|
highlightActiveItem: l,
|
|
2594
2594
|
onMenuItemClick: u,
|
|
2595
|
-
children: /* @__PURE__ */ A(
|
|
2595
|
+
children: /* @__PURE__ */ A(ko, { ...e })
|
|
2596
2596
|
}
|
|
2597
2597
|
);
|
|
2598
2598
|
}
|
|
@@ -2604,16 +2604,16 @@ function yo({
|
|
|
2604
2604
|
case "minimal":
|
|
2605
2605
|
return /* @__PURE__ */ A(mo, { ...o });
|
|
2606
2606
|
case "rail":
|
|
2607
|
-
return /* @__PURE__ */ A(
|
|
2607
|
+
return /* @__PURE__ */ A(Co, { ...o });
|
|
2608
2608
|
case "standard":
|
|
2609
2609
|
default:
|
|
2610
|
-
return /* @__PURE__ */ A(
|
|
2610
|
+
return /* @__PURE__ */ A(po, { ...o });
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
2613
|
const Qe = HA({
|
|
2614
2614
|
isVisible: !0
|
|
2615
|
-
}), yn = () => IA(Qe),
|
|
2616
|
-
const e = Pr(), s = IA(
|
|
2615
|
+
}), yn = () => IA(Qe), fe = HA({ params: {} }), wn = () => IA(fe).params, vn = () => {
|
|
2616
|
+
const e = Pr(), s = IA(fe).params;
|
|
2617
2617
|
return uA(() => {
|
|
2618
2618
|
if (!e)
|
|
2619
2619
|
return !1;
|
|
@@ -2621,12 +2621,12 @@ const Qe = HA({
|
|
|
2621
2621
|
return t.length === 0 ? !1 : t.some((a) => e[a] !== void 0);
|
|
2622
2622
|
}, [e]) ? e : s;
|
|
2623
2623
|
}, Ne = HA(null), Ge = () => IA(Ne), KA = (e) => null, wo = (e) => e.includes(":"), vo = (e, o) => wo(e) ? o : e, xo = ({ children: e, maxKeepAliveTabs: o = 10, ...s }) => {
|
|
2624
|
-
const [r, t] =
|
|
2625
|
-
let
|
|
2626
|
-
return f.forEach((
|
|
2627
|
-
|
|
2628
|
-
}),
|
|
2629
|
-
}, []), c =
|
|
2624
|
+
const [r, t] = fA(/* @__PURE__ */ new Map()), [a, i] = fA(/* @__PURE__ */ new Set()), n = U((f, g) => {
|
|
2625
|
+
let w = null, v = 1 / 0;
|
|
2626
|
+
return f.forEach((m, M) => {
|
|
2627
|
+
M !== g && m.lastAccessedAt < v && (v = m.lastAccessedAt, w = M);
|
|
2628
|
+
}), w;
|
|
2629
|
+
}, []), c = U((f, g, w) => {
|
|
2630
2630
|
if (!f || typeof f != "string") {
|
|
2631
2631
|
console.error("[ArchbaseAliveAbleRoutes] Invalid cacheKey for component registration:", f);
|
|
2632
2632
|
return;
|
|
@@ -2637,58 +2637,58 @@ const Qe = HA({
|
|
|
2637
2637
|
}
|
|
2638
2638
|
t((v) => {
|
|
2639
2639
|
if (v.has(f)) {
|
|
2640
|
-
const
|
|
2641
|
-
return
|
|
2640
|
+
const M = new Map(v), $ = v.get(f);
|
|
2641
|
+
return M.set(f, { ...$, lastAccessedAt: Date.now() }), M;
|
|
2642
2642
|
}
|
|
2643
|
-
const
|
|
2644
|
-
if (
|
|
2645
|
-
const
|
|
2646
|
-
|
|
2643
|
+
const m = new Map(v);
|
|
2644
|
+
if (m.size >= o) {
|
|
2645
|
+
const M = n(m, f);
|
|
2646
|
+
M && (m.delete(M), console.log(`[ArchbaseAliveAbleRoutes] LRU eviction: removed "${M}" (cache size: ${m.size}/${o})`));
|
|
2647
2647
|
}
|
|
2648
|
-
return
|
|
2648
|
+
return m.set(f, {
|
|
2649
2649
|
element: g,
|
|
2650
|
-
params:
|
|
2650
|
+
params: w,
|
|
2651
2651
|
lastAccessedAt: Date.now()
|
|
2652
|
-
}),
|
|
2652
|
+
}), m;
|
|
2653
2653
|
});
|
|
2654
|
-
}, [o, n]), l =
|
|
2654
|
+
}, [o, n]), l = U((f) => {
|
|
2655
2655
|
t((g) => {
|
|
2656
|
-
const
|
|
2657
|
-
if (!
|
|
2656
|
+
const w = g.get(f);
|
|
2657
|
+
if (!w)
|
|
2658
2658
|
return g;
|
|
2659
2659
|
const v = Date.now();
|
|
2660
|
-
if (v -
|
|
2660
|
+
if (v - w.lastAccessedAt < 1e3)
|
|
2661
2661
|
return g;
|
|
2662
|
-
const
|
|
2663
|
-
return
|
|
2662
|
+
const m = new Map(g);
|
|
2663
|
+
return m.set(f, { ...w, lastAccessedAt: v }), m;
|
|
2664
2664
|
});
|
|
2665
|
-
}, []), u =
|
|
2666
|
-
t((
|
|
2667
|
-
const v =
|
|
2665
|
+
}, []), u = U((f, g) => {
|
|
2666
|
+
t((w) => {
|
|
2667
|
+
const v = w.get(f);
|
|
2668
2668
|
if (!v || !(JSON.stringify(v.params) !== JSON.stringify(g)))
|
|
2669
|
-
return
|
|
2670
|
-
const
|
|
2671
|
-
return
|
|
2669
|
+
return w;
|
|
2670
|
+
const M = new Map(w);
|
|
2671
|
+
return M.set(f, { ...v, params: g, lastAccessedAt: Date.now() }), M;
|
|
2672
2672
|
});
|
|
2673
|
-
}, []), d =
|
|
2673
|
+
}, []), d = U((f) => {
|
|
2674
2674
|
if (!f) {
|
|
2675
2675
|
console.error("[ArchbaseAliveAbleRoutes] Cannot unregister: invalid cacheKey");
|
|
2676
2676
|
return;
|
|
2677
2677
|
}
|
|
2678
2678
|
t((g) => {
|
|
2679
2679
|
g.has(f) || console.warn("[ArchbaseAliveAbleRoutes] Attempting to unregister non-existent cacheKey:", f);
|
|
2680
|
-
const
|
|
2681
|
-
return
|
|
2680
|
+
const w = new Map(g);
|
|
2681
|
+
return w.delete(f), w;
|
|
2682
2682
|
}), i((g) => {
|
|
2683
|
-
const
|
|
2684
|
-
return
|
|
2683
|
+
const w = new Set(g);
|
|
2684
|
+
return w.delete(f), w;
|
|
2685
2685
|
});
|
|
2686
|
-
}, []), h =
|
|
2686
|
+
}, []), h = U((f) => {
|
|
2687
2687
|
i((g) => {
|
|
2688
|
-
const
|
|
2689
|
-
return
|
|
2688
|
+
const w = new Set(g);
|
|
2689
|
+
return w.add(f), w;
|
|
2690
2690
|
});
|
|
2691
|
-
}, []), p =
|
|
2691
|
+
}, []), p = mA.Children.toArray(e), b = p.filter((f) => mA.isValidElement(f) ? f.type === KA : !1), k = p.filter((f) => mA.isValidElement(f) ? f.type !== KA : !1), y = uA(() => ({
|
|
2692
2692
|
cache: r,
|
|
2693
2693
|
requestedUnregister: a,
|
|
2694
2694
|
register: c,
|
|
@@ -2698,43 +2698,43 @@ const Qe = HA({
|
|
|
2698
2698
|
touchAccess: l,
|
|
2699
2699
|
maxKeepAliveTabs: o
|
|
2700
2700
|
}), [r, a, c, d, u, h, l, o]);
|
|
2701
|
-
return /* @__PURE__ */
|
|
2702
|
-
|
|
2703
|
-
/* @__PURE__ */ A(ze, { ...s, children:
|
|
2701
|
+
return /* @__PURE__ */ E(Ne.Provider, { value: y, children: [
|
|
2702
|
+
b.map((f) => /* @__PURE__ */ A(So, { ...f.props, routesProps: s }, f.key)),
|
|
2703
|
+
/* @__PURE__ */ A(ze, { ...s, children: k })
|
|
2704
2704
|
] });
|
|
2705
2705
|
}, So = ({ component: e, routesProps: o, ...s }) => {
|
|
2706
2706
|
const r = Ge();
|
|
2707
2707
|
if (!r)
|
|
2708
2708
|
throw new Error("DisplayRoute must be used within ArchbaseAliveAbleRoutes provider");
|
|
2709
|
-
const { cache: t, requestedUnregister: a, register: i, unregister: n, updateParams: c, touchAccess: l } = r, [u, d] =
|
|
2709
|
+
const { cache: t, requestedUnregister: a, register: i, unregister: n, updateParams: c, touchAccess: l } = r, [u, d] = fA(!1), [h, p] = fA({}), b = bA(null), k = se(), y = uA(() => s.path ? vo(s.path, k.pathname) : null, [s.path, k.pathname]), f = uA(() => s.path ? Mr({ path: s.path, end: !0 }, k.pathname)?.params || {} : {}, [s.path, k.pathname]), g = bA(/* @__PURE__ */ new Set());
|
|
2710
2710
|
GA(() => {
|
|
2711
|
-
if (u && e &&
|
|
2712
|
-
const
|
|
2713
|
-
i(
|
|
2714
|
-
}
|
|
2715
|
-
}, [u, e,
|
|
2716
|
-
u &&
|
|
2717
|
-
}, [u,
|
|
2718
|
-
u &&
|
|
2719
|
-
}, [u,
|
|
2720
|
-
|
|
2721
|
-
}, [
|
|
2722
|
-
const
|
|
2723
|
-
return
|
|
2724
|
-
const
|
|
2725
|
-
if (
|
|
2711
|
+
if (u && e && y && !g.current.has(y)) {
|
|
2712
|
+
const M = typeof e == "function" ? mA.createElement(e) : e;
|
|
2713
|
+
i(y, M, f), g.current.add(y);
|
|
2714
|
+
}
|
|
2715
|
+
}, [u, e, y, i, f]), GA(() => {
|
|
2716
|
+
u && y && g.current.has(y) && (c(y, f), p(f));
|
|
2717
|
+
}, [u, y, f, c]), aA(() => {
|
|
2718
|
+
u && y && t.has(y) && l(y);
|
|
2719
|
+
}, [u, y, l, t]), GA(() => {
|
|
2720
|
+
y && a.has(y) && (n(y), g.current.delete(y));
|
|
2721
|
+
}, [y, a, n]);
|
|
2722
|
+
const w = y ? t.get(y) : null, v = uA(() => u ? f : w ? w.params : h, [u, f, w, h]), m = bA(u);
|
|
2723
|
+
return aA(() => {
|
|
2724
|
+
const M = m.current;
|
|
2725
|
+
if (m.current = u, u && !M && b.current) {
|
|
2726
2726
|
const $ = setTimeout(() => {
|
|
2727
|
-
window.dispatchEvent(new Event("resize")),
|
|
2727
|
+
window.dispatchEvent(new Event("resize")), b.current?.dispatchEvent(
|
|
2728
2728
|
new CustomEvent("keepalive:visible", { bubbles: !0 })
|
|
2729
2729
|
);
|
|
2730
2730
|
}, 50);
|
|
2731
2731
|
return () => clearTimeout($);
|
|
2732
2732
|
}
|
|
2733
|
-
}, [u]), /* @__PURE__ */
|
|
2734
|
-
|
|
2733
|
+
}, [u]), /* @__PURE__ */ E(vA, { children: [
|
|
2734
|
+
w && /* @__PURE__ */ A(Qe.Provider, { value: { isVisible: u }, children: /* @__PURE__ */ A(fe.Provider, { value: { params: v }, children: /* @__PURE__ */ A(
|
|
2735
2735
|
"div",
|
|
2736
2736
|
{
|
|
2737
|
-
ref:
|
|
2737
|
+
ref: b,
|
|
2738
2738
|
style: {
|
|
2739
2739
|
// Usa visibility + position ao invés de display:none
|
|
2740
2740
|
// para manter dimensões e permitir que ResizeObserver funcione
|
|
@@ -2748,7 +2748,7 @@ const Qe = HA({
|
|
|
2748
2748
|
zIndex: u ? 1 : -1,
|
|
2749
2749
|
overflow: u ? "auto" : "hidden"
|
|
2750
2750
|
},
|
|
2751
|
-
children:
|
|
2751
|
+
children: w.element
|
|
2752
2752
|
}
|
|
2753
2753
|
) }) }),
|
|
2754
2754
|
/* @__PURE__ */ A(ze, { ...o, children: /* @__PURE__ */ A(
|
|
@@ -2811,158 +2811,158 @@ function Ro({
|
|
|
2811
2811
|
sidebarDefaultGroupIcon: d,
|
|
2812
2812
|
sideBarHeaderHeight: h,
|
|
2813
2813
|
sideBarHeaderContent: p,
|
|
2814
|
-
selectedGroupColor:
|
|
2815
|
-
groupColor:
|
|
2816
|
-
backgroundGroupColor:
|
|
2814
|
+
selectedGroupColor: b = "#132441",
|
|
2815
|
+
groupColor: k = "white",
|
|
2816
|
+
backgroundGroupColor: y = "#132441",
|
|
2817
2817
|
groupLabelDarkColor: f = "white",
|
|
2818
2818
|
groupLabelLightColor: g = "white",
|
|
2819
|
-
headerColor:
|
|
2819
|
+
headerColor: w,
|
|
2820
2820
|
footerHeight: v,
|
|
2821
|
-
iconsWithBackground:
|
|
2822
|
-
menuItemHeight:
|
|
2821
|
+
iconsWithBackground: m,
|
|
2822
|
+
menuItemHeight: M,
|
|
2823
2823
|
showSideBar: $ = !0,
|
|
2824
|
-
showHeader:
|
|
2825
|
-
headerStyle:
|
|
2826
|
-
highlightActiveMenuItem:
|
|
2824
|
+
showHeader: V = !0,
|
|
2825
|
+
headerStyle: rA = {},
|
|
2826
|
+
highlightActiveMenuItem: z = !0,
|
|
2827
2827
|
customRenderSidebar: O,
|
|
2828
|
-
showCollapsedButton:
|
|
2828
|
+
showCollapsedButton: G = !0,
|
|
2829
2829
|
sideBarBackgroundDarkColor: Q,
|
|
2830
|
-
sideBarBackgroundLightColor:
|
|
2831
|
-
sideBarTextDarkColor:
|
|
2832
|
-
sideBarTextLightColor:
|
|
2833
|
-
sideBarIconDarkColor:
|
|
2834
|
-
sideBarIconLightColor:
|
|
2835
|
-
sideBarCollapsedSubmenuWidth:
|
|
2836
|
-
sidebarActiveColor:
|
|
2837
|
-
maxKeepAliveTabs:
|
|
2838
|
-
sidebarVariant:
|
|
2839
|
-
sidebarShowSearch:
|
|
2830
|
+
sideBarBackgroundLightColor: D,
|
|
2831
|
+
sideBarTextDarkColor: I,
|
|
2832
|
+
sideBarTextLightColor: T,
|
|
2833
|
+
sideBarIconDarkColor: Y,
|
|
2834
|
+
sideBarIconLightColor: B,
|
|
2835
|
+
sideBarCollapsedSubmenuWidth: X,
|
|
2836
|
+
sidebarActiveColor: W,
|
|
2837
|
+
maxKeepAliveTabs: x = 10,
|
|
2838
|
+
sidebarVariant: C = "legacy",
|
|
2839
|
+
sidebarShowSearch: R = !1
|
|
2840
2840
|
}) {
|
|
2841
|
-
const
|
|
2842
|
-
`(max-width: ${a ?
|
|
2843
|
-
),
|
|
2844
|
-
|
|
2845
|
-
},
|
|
2846
|
-
|
|
2847
|
-
},
|
|
2848
|
-
let
|
|
2849
|
-
return h && (
|
|
2841
|
+
const S = pA(), L = IA(jA), { colorScheme: P } = sA(), H = Qr(), [F, J] = Nr(), oA = $r(
|
|
2842
|
+
`(max-width: ${a ? cA(a) : S.breakpoints.md})`
|
|
2843
|
+
), K = (Z) => {
|
|
2844
|
+
Z.link && (Z.routeParams ? H(Z.link, {}, Z.routeParams) : H(Z.link));
|
|
2845
|
+
}, tA = (Z, iA) => {
|
|
2846
|
+
Z == iA && L.collapsed && L.setCollapsed(!1), L.setCollapsed(Z == iA);
|
|
2847
|
+
}, CA = () => {
|
|
2848
|
+
let Z = 0, iA = 0;
|
|
2849
|
+
return h && (Z = Number(cA(h))), i && (iA = Number(cA(i))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${Z + iA}px)`;
|
|
2850
2850
|
}, yA = () => {
|
|
2851
|
-
let
|
|
2852
|
-
return h && (
|
|
2851
|
+
let Z = 0, iA = 0;
|
|
2852
|
+
return h && (Z = Number(cA(h))), i && (iA = Number(cA(i))), `calc(100vh - 28px - ${Z + iA}px)`;
|
|
2853
2853
|
}, EA = uA(() => {
|
|
2854
|
-
const
|
|
2855
|
-
return
|
|
2856
|
-
|
|
2857
|
-
PA.keepAlive ?
|
|
2858
|
-
/* @__PURE__ */ A(KA, { path: PA.link, component: PA.component }, `${PA.link}_${
|
|
2859
|
-
) :
|
|
2860
|
-
}) :
|
|
2861
|
-
/* @__PURE__ */ A(KA, { path:
|
|
2862
|
-
) :
|
|
2863
|
-
/* @__PURE__ */ A(ee, { path:
|
|
2854
|
+
const Z = [];
|
|
2855
|
+
return L.navigationData.forEach((iA, $A) => {
|
|
2856
|
+
iA.links ? iA.links.forEach((PA, pe) => {
|
|
2857
|
+
PA.keepAlive ? Z.push(
|
|
2858
|
+
/* @__PURE__ */ A(KA, { path: PA.link, component: PA.component }, `${PA.link}_${pe}`)
|
|
2859
|
+
) : Z.push(/* @__PURE__ */ A(ee, { path: PA.link, element: PA.component }, `${PA.link}_${pe}`));
|
|
2860
|
+
}) : iA.keepAlive ? Z.push(
|
|
2861
|
+
/* @__PURE__ */ A(KA, { path: iA.link, component: iA.component }, `${iA.link}_${$A}`)
|
|
2862
|
+
) : Z.push(
|
|
2863
|
+
/* @__PURE__ */ A(ee, { path: iA.link, element: iA.component }, `${iA.link}_${$A}`)
|
|
2864
2864
|
);
|
|
2865
|
-
}),
|
|
2866
|
-
}, [
|
|
2867
|
-
|
|
2868
|
-
}, [
|
|
2869
|
-
|
|
2870
|
-
}, [
|
|
2871
|
-
|
|
2872
|
-
l && l(
|
|
2873
|
-
}, [
|
|
2874
|
-
c && c(
|
|
2875
|
-
}, [
|
|
2876
|
-
const RA =
|
|
2865
|
+
}), Z;
|
|
2866
|
+
}, [L.navigationData, L.collapsed]), q = U(() => {
|
|
2867
|
+
L.setCollapsed(!L.collapsed);
|
|
2868
|
+
}, [L.setCollapsed, L.collapsed]), lA = U(() => {
|
|
2869
|
+
L.setHidden(!L.hidden);
|
|
2870
|
+
}, [L.setHidden, L.hidden]);
|
|
2871
|
+
aA(() => {
|
|
2872
|
+
l && l(L.hidden);
|
|
2873
|
+
}, [L.hidden, lA]), aA(() => {
|
|
2874
|
+
c && c(L.collapsed);
|
|
2875
|
+
}, [L.collapsed, c]);
|
|
2876
|
+
const RA = C === "minimal" || L.collapsed ? t : r, TA = (Z, iA = !1) => O ? O({ width: r, height: Z, isHidden: oA }) : C === "legacy" ? /* @__PURE__ */ A(
|
|
2877
2877
|
lo,
|
|
2878
2878
|
{
|
|
2879
|
-
navigationData:
|
|
2880
|
-
sidebarHeight:
|
|
2879
|
+
navigationData: L.navigationData,
|
|
2880
|
+
sidebarHeight: Z,
|
|
2881
2881
|
sidebarGroupWidth: t,
|
|
2882
2882
|
sidebarCollapsedWidth: t,
|
|
2883
|
-
selectedGroupColor:
|
|
2884
|
-
groupColor:
|
|
2885
|
-
backgroundGroupColor:
|
|
2883
|
+
selectedGroupColor: b,
|
|
2884
|
+
groupColor: k,
|
|
2885
|
+
backgroundGroupColor: y,
|
|
2886
2886
|
groupLabelDarkColor: f,
|
|
2887
2887
|
groupLabelLightColor: g,
|
|
2888
2888
|
showGroupLabels: !1,
|
|
2889
|
-
collapsed:
|
|
2889
|
+
collapsed: iA ? !1 : L.collapsed,
|
|
2890
2890
|
sidebarWidth: r,
|
|
2891
|
-
isHidden:
|
|
2892
|
-
onMenuItemClick:
|
|
2893
|
-
onClickActionIcon:
|
|
2891
|
+
isHidden: oA,
|
|
2892
|
+
onMenuItemClick: K,
|
|
2893
|
+
onClickActionIcon: tA,
|
|
2894
2894
|
sideBarFooterHeight: i,
|
|
2895
2895
|
sideBarFooterContent: n,
|
|
2896
2896
|
sideBarHeaderContent: p,
|
|
2897
|
-
theme:
|
|
2898
|
-
sidebarRef:
|
|
2897
|
+
theme: S,
|
|
2898
|
+
sidebarRef: F,
|
|
2899
2899
|
defaultGroupIcon: d,
|
|
2900
2900
|
selectedGroupName: u,
|
|
2901
|
-
iconsWithBackground:
|
|
2902
|
-
menuItemHeight:
|
|
2903
|
-
highlightActiveMenuItem:
|
|
2901
|
+
iconsWithBackground: m,
|
|
2902
|
+
menuItemHeight: M,
|
|
2903
|
+
highlightActiveMenuItem: z,
|
|
2904
2904
|
backgroundDarkColor: Q,
|
|
2905
|
-
backgroundLightColor:
|
|
2906
|
-
textDarkColor:
|
|
2907
|
-
textLightColor:
|
|
2908
|
-
iconDarkColor:
|
|
2909
|
-
iconLightColor:
|
|
2910
|
-
collapsedSubmenuWidth:
|
|
2911
|
-
isLoading:
|
|
2912
|
-
loadingError:
|
|
2905
|
+
backgroundLightColor: D,
|
|
2906
|
+
textDarkColor: I,
|
|
2907
|
+
textLightColor: T,
|
|
2908
|
+
iconDarkColor: Y,
|
|
2909
|
+
iconLightColor: B,
|
|
2910
|
+
collapsedSubmenuWidth: X,
|
|
2911
|
+
isLoading: L.isLoadingPermissions,
|
|
2912
|
+
loadingError: L.permissionsError
|
|
2913
2913
|
}
|
|
2914
2914
|
) : /* @__PURE__ */ A(
|
|
2915
2915
|
yo,
|
|
2916
2916
|
{
|
|
2917
|
-
navigationData:
|
|
2918
|
-
variant:
|
|
2917
|
+
navigationData: L.navigationData,
|
|
2918
|
+
variant: C,
|
|
2919
2919
|
width: RA,
|
|
2920
2920
|
collapsedWidth: t,
|
|
2921
|
-
height:
|
|
2921
|
+
height: Z,
|
|
2922
2922
|
groupColumnWidth: t,
|
|
2923
|
-
collapsed:
|
|
2924
|
-
onCollapsedChange: ($A) =>
|
|
2923
|
+
collapsed: iA ? !1 : L.collapsed,
|
|
2924
|
+
onCollapsedChange: ($A) => L.setCollapsed($A),
|
|
2925
2925
|
activeGroup: u,
|
|
2926
2926
|
onActiveGroupChange: ($A) => {
|
|
2927
2927
|
},
|
|
2928
2928
|
defaultGroupIcon: d,
|
|
2929
2929
|
showGroupLabels: !1,
|
|
2930
|
-
onMenuItemClick:
|
|
2931
|
-
showSearch:
|
|
2930
|
+
onMenuItemClick: K,
|
|
2931
|
+
showSearch: R,
|
|
2932
2932
|
header: p,
|
|
2933
2933
|
footer: n,
|
|
2934
2934
|
footerHeight: i,
|
|
2935
|
-
isLoading:
|
|
2936
|
-
loadingError:
|
|
2937
|
-
theme:
|
|
2938
|
-
highlightActiveItem:
|
|
2935
|
+
isLoading: L.isLoadingPermissions,
|
|
2936
|
+
loadingError: L.permissionsError,
|
|
2937
|
+
theme: S,
|
|
2938
|
+
highlightActiveItem: z,
|
|
2939
2939
|
backgroundDarkColor: Q,
|
|
2940
|
-
backgroundLightColor:
|
|
2941
|
-
textDarkColor:
|
|
2942
|
-
textLightColor:
|
|
2943
|
-
iconDarkColor:
|
|
2944
|
-
iconLightColor:
|
|
2945
|
-
groupBackgroundColor:
|
|
2946
|
-
selectedGroupColor:
|
|
2947
|
-
groupColor:
|
|
2940
|
+
backgroundLightColor: D,
|
|
2941
|
+
textDarkColor: I,
|
|
2942
|
+
textLightColor: T,
|
|
2943
|
+
iconDarkColor: Y,
|
|
2944
|
+
iconLightColor: B,
|
|
2945
|
+
groupBackgroundColor: y,
|
|
2946
|
+
selectedGroupColor: b,
|
|
2947
|
+
groupColor: k,
|
|
2948
2948
|
groupLabelDarkColor: f,
|
|
2949
2949
|
groupLabelLightColor: g,
|
|
2950
|
-
activeColor:
|
|
2950
|
+
activeColor: W,
|
|
2951
2951
|
withBorder: !1,
|
|
2952
|
-
sidebarRef:
|
|
2952
|
+
sidebarRef: F
|
|
2953
2953
|
}
|
|
2954
|
-
), hA =
|
|
2954
|
+
), hA = P === "dark" ? Q ?? S.colors.dark[7] : D ?? S.white, OA = C === "legacy", AA = OA ? void 0 : {
|
|
2955
2955
|
width: { base: RA },
|
|
2956
2956
|
breakpoint: "sm",
|
|
2957
|
-
collapsed: { mobile:
|
|
2958
|
-
},
|
|
2957
|
+
collapsed: { mobile: oA || !$, desktop: !$ }
|
|
2958
|
+
}, DA = OA ? {
|
|
2959
2959
|
main: {
|
|
2960
|
-
background:
|
|
2960
|
+
background: P === "dark" ? S.colors.dark[8] : S.colors.gray[0],
|
|
2961
2961
|
overflow: "hidden"
|
|
2962
2962
|
}
|
|
2963
2963
|
} : {
|
|
2964
2964
|
main: {
|
|
2965
|
-
background:
|
|
2965
|
+
background: P === "dark" ? S.colors.dark[8] : S.colors.gray[0],
|
|
2966
2966
|
overflow: "hidden"
|
|
2967
2967
|
},
|
|
2968
2968
|
navbar: {
|
|
@@ -2971,10 +2971,10 @@ function Ro({
|
|
|
2971
2971
|
}
|
|
2972
2972
|
}, gA = OA ? {
|
|
2973
2973
|
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
|
|
2974
|
-
width: `calc(100vw - var(--app-shell-padding) - calc(${
|
|
2974
|
+
width: `calc(100vw - var(--app-shell-padding) - calc(${oA ? "0px" : RA} + 1rem))`,
|
|
2975
2975
|
marginTop: "0.5rem",
|
|
2976
|
-
marginLeft: `calc(${
|
|
2977
|
-
border: `1px solid ${
|
|
2976
|
+
marginLeft: `calc(${oA ? "0px" : RA} + 0.5rem)`,
|
|
2977
|
+
border: `1px solid ${P === "dark" ? S.colors.dark[4] : "#e4e9ef"}`,
|
|
2978
2978
|
borderRadius: "4px",
|
|
2979
2979
|
overflow: "hidden"
|
|
2980
2980
|
} : {
|
|
@@ -2983,60 +2983,60 @@ function Ro({
|
|
|
2983
2983
|
marginTop: "0.5rem",
|
|
2984
2984
|
marginLeft: "0.5rem",
|
|
2985
2985
|
marginRight: "0.5rem",
|
|
2986
|
-
border: `1px solid ${
|
|
2986
|
+
border: `1px solid ${P === "dark" ? S.colors.dark[4] : "#e4e9ef"}`,
|
|
2987
2987
|
borderRadius: "4px",
|
|
2988
2988
|
overflow: "hidden"
|
|
2989
2989
|
};
|
|
2990
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ E(
|
|
2991
2991
|
QA,
|
|
2992
2992
|
{
|
|
2993
|
-
header: { height: "60px", collapsed: !
|
|
2994
|
-
navbar:
|
|
2993
|
+
header: { height: "60px", collapsed: !V },
|
|
2994
|
+
navbar: AA,
|
|
2995
2995
|
footer: { height: v || "0px" },
|
|
2996
|
-
styles:
|
|
2996
|
+
styles: DA,
|
|
2997
2997
|
children: [
|
|
2998
2998
|
/* @__PURE__ */ A(
|
|
2999
2999
|
QA.Header,
|
|
3000
3000
|
{
|
|
3001
3001
|
p: "xs",
|
|
3002
|
-
color:
|
|
3002
|
+
color: w,
|
|
3003
3003
|
display: "flex",
|
|
3004
3004
|
style: {
|
|
3005
3005
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
3006
3006
|
alignItems: "center",
|
|
3007
3007
|
borderBottom: "none",
|
|
3008
|
-
...
|
|
3008
|
+
...rA
|
|
3009
3009
|
},
|
|
3010
3010
|
children: o
|
|
3011
3011
|
}
|
|
3012
3012
|
),
|
|
3013
|
-
/* @__PURE__ */ A(QA.Navbar, { children: !
|
|
3014
|
-
/* @__PURE__ */
|
|
3015
|
-
!
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3013
|
+
/* @__PURE__ */ A(QA.Navbar, { children: !oA && $ ? TA(CA(), !1) : void 0 }),
|
|
3014
|
+
/* @__PURE__ */ E(QA.Main, { bg: P === "dark" ? S.colors.dark[8] : S.colors.gray[0], children: [
|
|
3015
|
+
!oA && G && Eo(
|
|
3016
|
+
P,
|
|
3017
|
+
S,
|
|
3018
|
+
L,
|
|
3019
3019
|
r,
|
|
3020
3020
|
t,
|
|
3021
3021
|
q
|
|
3022
3022
|
),
|
|
3023
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ E("div", { style: gA, children: [
|
|
3024
3024
|
e,
|
|
3025
|
-
/* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */
|
|
3025
|
+
/* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */ E(xo, { maxKeepAliveTabs: x, children: [
|
|
3026
3026
|
...EA
|
|
3027
3027
|
] }) })
|
|
3028
3028
|
] }),
|
|
3029
3029
|
$ && /* @__PURE__ */ A(
|
|
3030
3030
|
Se,
|
|
3031
3031
|
{
|
|
3032
|
-
opened:
|
|
3033
|
-
onClose:
|
|
3032
|
+
opened: L.hidden || !1,
|
|
3033
|
+
onClose: lA,
|
|
3034
3034
|
size: r,
|
|
3035
3035
|
padding: 0,
|
|
3036
3036
|
styles: {
|
|
3037
3037
|
header: { minHeight: "10px" }
|
|
3038
3038
|
},
|
|
3039
|
-
children:
|
|
3039
|
+
children: TA(yA(), !0)
|
|
3040
3040
|
}
|
|
3041
3041
|
)
|
|
3042
3042
|
] }),
|
|
@@ -3060,41 +3060,41 @@ function xn({
|
|
|
3060
3060
|
sideBarFooterHeight: d,
|
|
3061
3061
|
sideBarFooterContent: h,
|
|
3062
3062
|
onCollapsedSideBar: p,
|
|
3063
|
-
onHiddenSidebar:
|
|
3064
|
-
sidebarDefaultGroupIcon:
|
|
3065
|
-
sidebarSelectedGroupName:
|
|
3063
|
+
onHiddenSidebar: b,
|
|
3064
|
+
sidebarDefaultGroupIcon: k,
|
|
3065
|
+
sidebarSelectedGroupName: y,
|
|
3066
3066
|
sideBarHeaderHeight: f,
|
|
3067
3067
|
sideBarHeaderContent: g,
|
|
3068
|
-
selectedGroupColor:
|
|
3068
|
+
selectedGroupColor: w = "#132441",
|
|
3069
3069
|
groupColor: v = "white",
|
|
3070
|
-
backgroundGroupColor:
|
|
3071
|
-
groupLabelDarkColor:
|
|
3070
|
+
backgroundGroupColor: m = "#132441",
|
|
3071
|
+
groupLabelDarkColor: M = "white",
|
|
3072
3072
|
groupLabelLightColor: $ = "white",
|
|
3073
|
-
headerColor:
|
|
3074
|
-
footerHeight:
|
|
3075
|
-
iconsWithBackground:
|
|
3073
|
+
headerColor: V,
|
|
3074
|
+
footerHeight: rA,
|
|
3075
|
+
iconsWithBackground: z,
|
|
3076
3076
|
menuItemHeight: O,
|
|
3077
|
-
showSideBar:
|
|
3077
|
+
showSideBar: G,
|
|
3078
3078
|
showHeader: Q,
|
|
3079
|
-
headerStyle:
|
|
3080
|
-
highlightActiveMenuItem:
|
|
3081
|
-
enableSecurity:
|
|
3082
|
-
securityOptions:
|
|
3083
|
-
customRenderSidebar:
|
|
3084
|
-
onNavigationDataChange:
|
|
3085
|
-
showCollapsedButton:
|
|
3086
|
-
initialSidebarCollapsed:
|
|
3087
|
-
sideBarBackgroundDarkColor:
|
|
3088
|
-
sideBarBackgroundLightColor:
|
|
3089
|
-
sideBarTextDarkColor:
|
|
3090
|
-
sideBarTextLightColor:
|
|
3091
|
-
sideBarIconDarkColor:
|
|
3092
|
-
sideBarIconLightColor:
|
|
3093
|
-
sideBarCollapsedSubmenuWidth:
|
|
3094
|
-
sidebarActiveColor:
|
|
3095
|
-
maxKeepAliveTabs:
|
|
3096
|
-
sidebarVariant:
|
|
3097
|
-
sidebarShowSearch:
|
|
3079
|
+
headerStyle: D,
|
|
3080
|
+
highlightActiveMenuItem: I,
|
|
3081
|
+
enableSecurity: T = !1,
|
|
3082
|
+
securityOptions: Y,
|
|
3083
|
+
customRenderSidebar: B,
|
|
3084
|
+
onNavigationDataChange: X,
|
|
3085
|
+
showCollapsedButton: W,
|
|
3086
|
+
initialSidebarCollapsed: x = !1,
|
|
3087
|
+
sideBarBackgroundDarkColor: C,
|
|
3088
|
+
sideBarBackgroundLightColor: R,
|
|
3089
|
+
sideBarTextDarkColor: S,
|
|
3090
|
+
sideBarTextLightColor: L,
|
|
3091
|
+
sideBarIconDarkColor: P,
|
|
3092
|
+
sideBarIconLightColor: H,
|
|
3093
|
+
sideBarCollapsedSubmenuWidth: F,
|
|
3094
|
+
sidebarActiveColor: J,
|
|
3095
|
+
maxKeepAliveTabs: oA = 10,
|
|
3096
|
+
sidebarVariant: K = "legacy",
|
|
3097
|
+
sidebarShowSearch: tA = !1
|
|
3098
3098
|
}) {
|
|
3099
3099
|
return /* @__PURE__ */ A(
|
|
3100
3100
|
Xr,
|
|
@@ -3104,10 +3104,10 @@ function xn({
|
|
|
3104
3104
|
user: s,
|
|
3105
3105
|
owner: i,
|
|
3106
3106
|
company: n,
|
|
3107
|
-
enableSecurity:
|
|
3108
|
-
securityOptions:
|
|
3109
|
-
onNavigationDataChange:
|
|
3110
|
-
initialSidebarCollapsed:
|
|
3107
|
+
enableSecurity: T,
|
|
3108
|
+
securityOptions: Y,
|
|
3109
|
+
onNavigationDataChange: X,
|
|
3110
|
+
initialSidebarCollapsed: x,
|
|
3111
3111
|
children: /* @__PURE__ */ A(
|
|
3112
3112
|
Ro,
|
|
3113
3113
|
{
|
|
@@ -3124,37 +3124,37 @@ function xn({
|
|
|
3124
3124
|
sideBarHeaderContent: g,
|
|
3125
3125
|
sideBarFooterHeight: d,
|
|
3126
3126
|
sideBarFooterContent: h,
|
|
3127
|
-
selectedGroupColor:
|
|
3127
|
+
selectedGroupColor: w,
|
|
3128
3128
|
groupColor: v,
|
|
3129
|
-
backgroundGroupColor:
|
|
3130
|
-
groupLabelDarkColor:
|
|
3129
|
+
backgroundGroupColor: m,
|
|
3130
|
+
groupLabelDarkColor: M,
|
|
3131
3131
|
groupLabelLightColor: $,
|
|
3132
3132
|
onCollapsedSideBar: p,
|
|
3133
|
-
onHiddenSidebar:
|
|
3134
|
-
sidebarDefaultGroupIcon:
|
|
3135
|
-
sidebarSelectedGroupName:
|
|
3136
|
-
headerColor:
|
|
3137
|
-
footerHeight:
|
|
3138
|
-
iconsWithBackground:
|
|
3133
|
+
onHiddenSidebar: b,
|
|
3134
|
+
sidebarDefaultGroupIcon: k,
|
|
3135
|
+
sidebarSelectedGroupName: y,
|
|
3136
|
+
headerColor: V,
|
|
3137
|
+
footerHeight: rA,
|
|
3138
|
+
iconsWithBackground: z,
|
|
3139
3139
|
menuItemHeight: O,
|
|
3140
|
-
showSideBar:
|
|
3140
|
+
showSideBar: G,
|
|
3141
3141
|
showHeader: Q,
|
|
3142
|
-
headerStyle:
|
|
3143
|
-
highlightActiveMenuItem:
|
|
3144
|
-
enableSecurity:
|
|
3145
|
-
customRenderSidebar:
|
|
3146
|
-
showCollapsedButton:
|
|
3147
|
-
sideBarBackgroundDarkColor:
|
|
3148
|
-
sideBarBackgroundLightColor:
|
|
3149
|
-
sideBarTextDarkColor:
|
|
3150
|
-
sideBarTextLightColor:
|
|
3151
|
-
sideBarIconDarkColor:
|
|
3152
|
-
sideBarIconLightColor:
|
|
3153
|
-
sideBarCollapsedSubmenuWidth:
|
|
3154
|
-
sidebarActiveColor:
|
|
3155
|
-
maxKeepAliveTabs:
|
|
3156
|
-
sidebarVariant:
|
|
3157
|
-
sidebarShowSearch:
|
|
3142
|
+
headerStyle: D,
|
|
3143
|
+
highlightActiveMenuItem: I,
|
|
3144
|
+
enableSecurity: T,
|
|
3145
|
+
customRenderSidebar: B,
|
|
3146
|
+
showCollapsedButton: W,
|
|
3147
|
+
sideBarBackgroundDarkColor: C,
|
|
3148
|
+
sideBarBackgroundLightColor: R,
|
|
3149
|
+
sideBarTextDarkColor: S,
|
|
3150
|
+
sideBarTextLightColor: L,
|
|
3151
|
+
sideBarIconDarkColor: P,
|
|
3152
|
+
sideBarIconLightColor: H,
|
|
3153
|
+
sideBarCollapsedSubmenuWidth: F,
|
|
3154
|
+
sidebarActiveColor: J,
|
|
3155
|
+
maxKeepAliveTabs: oA,
|
|
3156
|
+
sidebarVariant: K,
|
|
3157
|
+
sidebarShowSearch: tA,
|
|
3158
3158
|
children: r
|
|
3159
3159
|
}
|
|
3160
3160
|
)
|
|
@@ -3184,7 +3184,7 @@ const Ue = HA({
|
|
|
3184
3184
|
return a;
|
|
3185
3185
|
}
|
|
3186
3186
|
}, [r, t] = He(s, o);
|
|
3187
|
-
return
|
|
3187
|
+
return mA.useEffect(() => {
|
|
3188
3188
|
let a = null;
|
|
3189
3189
|
return r.userCloseLinkRequest && !r.linkClosed && (console.log(`[NavigationProvider] Waiting for close response for: ${r.userCloseLinkRequest}`), a = setTimeout(() => {
|
|
3190
3190
|
console.log(`[NavigationProvider] No response received, auto-closing: ${r.userCloseLinkRequest}`), t({ type: "CLOSE_ALLOWED", link: r.userCloseLinkRequest });
|
|
@@ -3198,10 +3198,10 @@ const Ue = HA({
|
|
|
3198
3198
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
3199
3199
|
return e;
|
|
3200
3200
|
}, In = (e, o) => {
|
|
3201
|
-
const s = Be(), { state: r, dispatch: t } = s, a =
|
|
3201
|
+
const s = Be(), { state: r, dispatch: t } = s, a = U((c) => {
|
|
3202
3202
|
console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`), t({ type: "CLOSE_ALLOWED", link: e, payload: c });
|
|
3203
|
-
}, [t, e]), i =
|
|
3204
|
-
i.current = o,
|
|
3203
|
+
}, [t, e]), i = bA(o);
|
|
3204
|
+
i.current = o, aA(() => {
|
|
3205
3205
|
console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${r?.userCloseLinkRequest}, id: ${e}`), r && r.userCloseLinkRequest && r.userCloseLinkRequest === e && (console.log(`[useArchbaseNavigationListener] Calling onUserCloseRequest for: ${e}`), i.current());
|
|
3206
3206
|
}, [r, e]);
|
|
3207
3207
|
const n = r.isClosing && r.userCloseLinkRequest === e;
|
|
@@ -3214,180 +3214,189 @@ function En({
|
|
|
3214
3214
|
activeTabId: r,
|
|
3215
3215
|
openedTabs: t = []
|
|
3216
3216
|
}) {
|
|
3217
|
-
const [a, i] =
|
|
3218
|
-
Hr(
|
|
3219
|
-
const
|
|
3220
|
-
|
|
3221
|
-
|
|
3217
|
+
const [a, i] = mA.useTransition(), n = FA(), { colorScheme: c } = sA(), [l, u] = fA(t), [d, h] = fA(r), p = bA(void 0), b = qA(), k = bA([]);
|
|
3218
|
+
Hr(k);
|
|
3219
|
+
const y = Be(), { state: f, dispatch: g } = y, w = IA(jA), v = Ge(), m = bA(o), M = bA(s);
|
|
3220
|
+
aA(() => {
|
|
3221
|
+
m.current = o, M.current = s;
|
|
3222
3222
|
});
|
|
3223
|
-
const
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3223
|
+
const $ = bA(d);
|
|
3224
|
+
aA(() => {
|
|
3225
|
+
p.current = $.current, $.current = d;
|
|
3226
|
+
}, [d]);
|
|
3227
|
+
const V = bA(!1), rA = U((x, C) => {
|
|
3228
|
+
console.log(`[TabContainer] handleOnClose called for: ${x}`), v ? v.requestUnregister(x) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
|
|
3229
|
+
const R = l.findIndex((F) => F.path === x);
|
|
3230
|
+
let S = C?.redirectUrl;
|
|
3231
|
+
!S && R >= 0 && (S = l[R].redirect);
|
|
3232
|
+
const L = l.filter((F) => F.id !== x);
|
|
3233
|
+
let P = null;
|
|
3234
|
+
if (p.current && p.current !== x) {
|
|
3235
|
+
const F = L.find((J) => J.id === p.current);
|
|
3236
|
+
F && (P = F.id);
|
|
3237
|
+
}
|
|
3238
|
+
if (!P) {
|
|
3239
|
+
let F = -1;
|
|
3240
|
+
L.forEach((J, oA) => J.id === d && (F = oA)), L.length > 0 && L[F] ? P = L[F].id : L.length > 0 && (P = L[L.length - 1].id);
|
|
3241
|
+
}
|
|
3242
|
+
const H = L.map((F) => ({
|
|
3243
|
+
...F,
|
|
3244
|
+
active: P === F.id
|
|
3236
3245
|
}));
|
|
3237
|
-
if (u(
|
|
3238
|
-
h(
|
|
3246
|
+
if (u(H), P && P != null)
|
|
3247
|
+
h(P), n(S || P);
|
|
3239
3248
|
else {
|
|
3240
|
-
if (h(void 0), !
|
|
3249
|
+
if (h(void 0), !w.navigationRootLink) {
|
|
3241
3250
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3242
3251
|
return;
|
|
3243
3252
|
}
|
|
3244
|
-
n(
|
|
3245
|
-
}
|
|
3246
|
-
|
|
3247
|
-
}, [l, d, n,
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
}, [
|
|
3251
|
-
const
|
|
3252
|
-
const
|
|
3253
|
+
n(w.navigationRootLink);
|
|
3254
|
+
}
|
|
3255
|
+
g({ type: "DONE", link: "" });
|
|
3256
|
+
}, [l, d, n, w.navigationRootLink, g, v]);
|
|
3257
|
+
aA(() => {
|
|
3258
|
+
f?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${f?.linkClosed}`), rA(f?.linkClosed, f?.payload));
|
|
3259
|
+
}, [f?.linkClosed, f?.payload, rA]);
|
|
3260
|
+
const z = (x) => {
|
|
3261
|
+
const C = {
|
|
3253
3262
|
item: void 0,
|
|
3254
3263
|
title: void 0,
|
|
3255
|
-
link:
|
|
3264
|
+
link: x,
|
|
3256
3265
|
redirect: void 0,
|
|
3257
3266
|
customTitle: void 0
|
|
3258
3267
|
};
|
|
3259
|
-
return e.forEach((
|
|
3260
|
-
if (
|
|
3261
|
-
|
|
3262
|
-
me({ path:
|
|
3268
|
+
return e.forEach((R) => {
|
|
3269
|
+
if (R.links)
|
|
3270
|
+
R.links.forEach((S) => {
|
|
3271
|
+
me({ path: S.link || "" }, location.pathname) && (C.item = S, C.title = `${eA().t(S.label)}`, C.redirect = S.redirect, C.customTitle = S.customTitle);
|
|
3263
3272
|
});
|
|
3264
|
-
else if (
|
|
3265
|
-
const
|
|
3266
|
-
|
|
3273
|
+
else if (R.link && !C.item) {
|
|
3274
|
+
const S = me({ path: R.link }, location.pathname);
|
|
3275
|
+
S && (S.params && Object.keys(S.params).length > 0 ? C.title = `${S.params[Object.keys(S.params)[0]]}` : C.title = `${eA().t(R.label)}`, C.item = R, C.redirect = R.redirect, C.customTitle = R.customTitle);
|
|
3267
3276
|
}
|
|
3268
|
-
}),
|
|
3277
|
+
}), C.customTitle && (C.customTitle = C.customTitle.replace("$title", C.title)), C;
|
|
3269
3278
|
};
|
|
3270
|
-
|
|
3271
|
-
u(t),
|
|
3279
|
+
aA(() => {
|
|
3280
|
+
u(t), V.current = !0;
|
|
3272
3281
|
}, [JSON.stringify(t)]);
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3275
|
-
if (
|
|
3276
|
-
|
|
3282
|
+
const O = bA(l), G = bA(d);
|
|
3283
|
+
aA(() => {
|
|
3284
|
+
if (V.current) {
|
|
3285
|
+
V.current = !1, O.current = l, G.current = d;
|
|
3277
3286
|
return;
|
|
3278
3287
|
}
|
|
3279
|
-
const
|
|
3280
|
-
if (
|
|
3281
|
-
const
|
|
3282
|
-
|
|
3288
|
+
const x = JSON.stringify(O.current) !== JSON.stringify(l), C = G.current !== d;
|
|
3289
|
+
if (x || C) {
|
|
3290
|
+
const R = setTimeout(() => {
|
|
3291
|
+
m.current?.(l), M.current?.(d);
|
|
3283
3292
|
}, 0);
|
|
3284
|
-
return
|
|
3293
|
+
return O.current = l, G.current = d, () => clearTimeout(R);
|
|
3285
3294
|
}
|
|
3286
3295
|
}, [l, d]);
|
|
3287
|
-
const
|
|
3288
|
-
|
|
3289
|
-
if (
|
|
3296
|
+
const Q = bA("");
|
|
3297
|
+
aA(() => {
|
|
3298
|
+
if (Q.current === b.pathname)
|
|
3290
3299
|
return;
|
|
3291
|
-
|
|
3292
|
-
const
|
|
3293
|
-
if (
|
|
3294
|
-
const
|
|
3295
|
-
if (
|
|
3296
|
-
if (l[
|
|
3297
|
-
const
|
|
3298
|
-
|
|
3300
|
+
Q.current = b.pathname;
|
|
3301
|
+
const x = z(b.pathname);
|
|
3302
|
+
if (x && x.item) {
|
|
3303
|
+
const C = l.findIndex((R) => R.path === x.link);
|
|
3304
|
+
if (C !== -1) {
|
|
3305
|
+
if (l[C].title !== x.title) {
|
|
3306
|
+
const R = [...l];
|
|
3307
|
+
R[C] = { ...R[C], title: x.title }, u(R);
|
|
3299
3308
|
}
|
|
3300
|
-
h(l[
|
|
3309
|
+
h(l[C].id);
|
|
3301
3310
|
} else {
|
|
3302
|
-
const
|
|
3303
|
-
id: `${
|
|
3304
|
-
title: `${
|
|
3305
|
-
path: `${
|
|
3311
|
+
const R = {
|
|
3312
|
+
id: `${x.link}`,
|
|
3313
|
+
title: `${x.title}`,
|
|
3314
|
+
path: `${x.link}`,
|
|
3306
3315
|
active: !0,
|
|
3307
|
-
content:
|
|
3308
|
-
iconClass:
|
|
3316
|
+
content: x.item.component,
|
|
3317
|
+
iconClass: x.item.icon,
|
|
3309
3318
|
closeButton: !0,
|
|
3310
|
-
redirect:
|
|
3311
|
-
customTitle:
|
|
3312
|
-
},
|
|
3313
|
-
u(
|
|
3319
|
+
redirect: x.redirect,
|
|
3320
|
+
customTitle: x.customTitle
|
|
3321
|
+
}, S = [...l.map((L) => ({ ...L, active: !1 })), R];
|
|
3322
|
+
u(S), h(R.id);
|
|
3314
3323
|
}
|
|
3315
3324
|
}
|
|
3316
|
-
}, [
|
|
3317
|
-
const
|
|
3318
|
-
const
|
|
3319
|
-
|
|
3320
|
-
h(
|
|
3325
|
+
}, [b.pathname]);
|
|
3326
|
+
const D = (x) => {
|
|
3327
|
+
const C = l.filter((R) => R.id === x);
|
|
3328
|
+
C && C.length > 0 && b.pathname !== C[0].path && n(C[0].path), i(() => {
|
|
3329
|
+
h(x);
|
|
3321
3330
|
});
|
|
3322
|
-
},
|
|
3323
|
-
console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${
|
|
3331
|
+
}, I = (x) => {
|
|
3332
|
+
console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${x}`);
|
|
3324
3333
|
try {
|
|
3325
|
-
|
|
3326
|
-
} catch (
|
|
3327
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
3334
|
+
g({ type: "USER_CLOSE_REQUEST", link: x });
|
|
3335
|
+
} catch (C) {
|
|
3336
|
+
console.error("[TabContainer] Dispatch failed:", C);
|
|
3328
3337
|
}
|
|
3329
|
-
}, T =
|
|
3330
|
-
if (u([]), h(void 0), !
|
|
3338
|
+
}, T = U(() => {
|
|
3339
|
+
if (u([]), h(void 0), !w.navigationRootLink) {
|
|
3331
3340
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3332
3341
|
return;
|
|
3333
3342
|
}
|
|
3334
|
-
n(
|
|
3335
|
-
}, [n,
|
|
3336
|
-
const
|
|
3337
|
-
if (
|
|
3343
|
+
n(w.navigationRootLink);
|
|
3344
|
+
}, [n, w.navigationRootLink]), Y = U((x) => {
|
|
3345
|
+
const C = l.findIndex((P) => P.id === x);
|
|
3346
|
+
if (C <= 0)
|
|
3338
3347
|
return;
|
|
3339
|
-
const
|
|
3340
|
-
...
|
|
3341
|
-
active:
|
|
3348
|
+
const R = l.slice(C), S = R.find((P) => P.id === d)?.id || R[0]?.id, L = R.map((P) => ({
|
|
3349
|
+
...P,
|
|
3350
|
+
active: P.id === S
|
|
3342
3351
|
}));
|
|
3343
|
-
if (u(
|
|
3344
|
-
h(
|
|
3345
|
-
const
|
|
3346
|
-
|
|
3347
|
-
}
|
|
3348
|
-
}, [l, d, n,
|
|
3349
|
-
const
|
|
3350
|
-
if (
|
|
3352
|
+
if (u(L), S) {
|
|
3353
|
+
h(S);
|
|
3354
|
+
const P = L.find((H) => H.id === S);
|
|
3355
|
+
P && b.pathname !== P.path && n(P.path);
|
|
3356
|
+
}
|
|
3357
|
+
}, [l, d, n, b.pathname]), B = U((x) => {
|
|
3358
|
+
const C = l.findIndex((P) => P.id === x);
|
|
3359
|
+
if (C === -1 || C >= l.length - 1)
|
|
3351
3360
|
return;
|
|
3352
|
-
const
|
|
3353
|
-
...
|
|
3354
|
-
active:
|
|
3361
|
+
const R = l.slice(0, C + 1), S = R.find((P) => P.id === d)?.id || R[R.length - 1]?.id, L = R.map((P) => ({
|
|
3362
|
+
...P,
|
|
3363
|
+
active: P.id === S
|
|
3355
3364
|
}));
|
|
3356
|
-
if (u(
|
|
3357
|
-
h(
|
|
3358
|
-
const
|
|
3359
|
-
|
|
3360
|
-
}
|
|
3361
|
-
}, [l, d, n,
|
|
3362
|
-
const
|
|
3363
|
-
if (!
|
|
3365
|
+
if (u(L), S) {
|
|
3366
|
+
h(S);
|
|
3367
|
+
const P = L.find((H) => H.id === S);
|
|
3368
|
+
P && b.pathname !== P.path && n(P.path);
|
|
3369
|
+
}
|
|
3370
|
+
}, [l, d, n, b.pathname]), X = U((x) => {
|
|
3371
|
+
const C = l.find((S) => S.id === x);
|
|
3372
|
+
if (!C)
|
|
3364
3373
|
return;
|
|
3365
|
-
const
|
|
3366
|
-
u(
|
|
3367
|
-
}, [l, n,
|
|
3368
|
-
return /* @__PURE__ */ A("div", { ref:
|
|
3374
|
+
const R = [{ ...C, active: !0 }];
|
|
3375
|
+
u(R), h(x), b.pathname !== C.path && n(C.path);
|
|
3376
|
+
}, [l, n, b.pathname]);
|
|
3377
|
+
return /* @__PURE__ */ A("div", { ref: k, children: /* @__PURE__ */ A(
|
|
3369
3378
|
Fr,
|
|
3370
3379
|
{
|
|
3371
3380
|
buttonCloseOnlyActiveTab: !0,
|
|
3372
|
-
onClick: (
|
|
3373
|
-
onTabClose: (
|
|
3374
|
-
onTabChange: (
|
|
3381
|
+
onClick: (x) => D(x),
|
|
3382
|
+
onTabClose: (x) => I(x),
|
|
3383
|
+
onTabChange: (x) => null,
|
|
3375
3384
|
onCloseAllTabs: T,
|
|
3376
|
-
onCloseLeftTabs:
|
|
3377
|
-
onCloseRightTabs:
|
|
3378
|
-
onCloseOtherTabs:
|
|
3379
|
-
currentTabs: ((
|
|
3380
|
-
key:
|
|
3381
|
-
favicon:
|
|
3382
|
-
title:
|
|
3383
|
-
customTitle:
|
|
3385
|
+
onCloseLeftTabs: Y,
|
|
3386
|
+
onCloseRightTabs: B,
|
|
3387
|
+
onCloseOtherTabs: X,
|
|
3388
|
+
currentTabs: ((x) => x.map((C) => ({
|
|
3389
|
+
key: C.id,
|
|
3390
|
+
favicon: C.iconClass,
|
|
3391
|
+
title: C.title,
|
|
3392
|
+
customTitle: C.customTitle
|
|
3384
3393
|
})))(l),
|
|
3385
3394
|
activeTab: d,
|
|
3386
3395
|
dark: c === "dark"
|
|
3387
3396
|
}
|
|
3388
3397
|
) });
|
|
3389
3398
|
}
|
|
3390
|
-
const Lo = () =>
|
|
3399
|
+
const Lo = () => mA.createElement("div", null, "Home View"), To = () => mA.createElement("div", null, "Pedido Form"), Do = () => mA.createElement("div", null, "Pedido View"), zo = () => mA.createElement("div", null, "Pessoa Form"), Po = () => mA.createElement("div", null, "Pessoa View"), Mo = {
|
|
3391
3400
|
label: "Dashboard",
|
|
3392
3401
|
icon: /* @__PURE__ */ A(sr, {}),
|
|
3393
3402
|
link: "/dashboard",
|
|
@@ -3407,7 +3416,7 @@ const Lo = () => bA.createElement("div", null, "Home View"), Do = () => bA.creat
|
|
|
3407
3416
|
}, $o = {
|
|
3408
3417
|
label: "Consulta lista pessoas",
|
|
3409
3418
|
link: "/pessoa/consulta",
|
|
3410
|
-
icon: /* @__PURE__ */ A(
|
|
3419
|
+
icon: /* @__PURE__ */ A(Te, {}),
|
|
3411
3420
|
category: "PESSOAS",
|
|
3412
3421
|
color: "pink",
|
|
3413
3422
|
component: /* @__PURE__ */ A(Po, {}),
|
|
@@ -3432,10 +3441,10 @@ const Lo = () => bA.createElement("div", null, "Home View"), Do = () => bA.creat
|
|
|
3432
3441
|
}, Go = {
|
|
3433
3442
|
label: "Consulta lista pedidos",
|
|
3434
3443
|
link: "/pedido/consulta",
|
|
3435
|
-
icon: /* @__PURE__ */ A(
|
|
3444
|
+
icon: /* @__PURE__ */ A(Te, {}),
|
|
3436
3445
|
category: "PEDIDOS",
|
|
3437
3446
|
color: "yellow",
|
|
3438
|
-
component: /* @__PURE__ */ A(
|
|
3447
|
+
component: /* @__PURE__ */ A(Do, {}),
|
|
3439
3448
|
showInSidebar: !0,
|
|
3440
3449
|
keepAlive: !0
|
|
3441
3450
|
}, Uo = {
|
|
@@ -3444,7 +3453,7 @@ const Lo = () => bA.createElement("div", null, "Home View"), Do = () => bA.creat
|
|
|
3444
3453
|
icon: /* @__PURE__ */ A(cr, {}),
|
|
3445
3454
|
category: "PEDIDOS",
|
|
3446
3455
|
color: "yellow",
|
|
3447
|
-
component: /* @__PURE__ */ A(
|
|
3456
|
+
component: /* @__PURE__ */ A(To, {}),
|
|
3448
3457
|
showInSidebar: !0,
|
|
3449
3458
|
keepAlive: !0
|
|
3450
3459
|
}, Bo = {
|
|
@@ -3471,7 +3480,7 @@ const Lo = () => bA.createElement("div", null, "Home View"), Do = () => bA.creat
|
|
|
3471
3480
|
];
|
|
3472
3481
|
function Ln({ children: e, title: o = "", size: s = "440px", drawerKey: r, styles: t }) {
|
|
3473
3482
|
const [a, { open: i, close: n }] = Ve(!1), [c] = Pe(), l = Or(), u = se();
|
|
3474
|
-
return
|
|
3483
|
+
return aA(() => {
|
|
3475
3484
|
c.get("drawer") === r && i();
|
|
3476
3485
|
}, [c]), /* @__PURE__ */ A(
|
|
3477
3486
|
Se,
|
|
@@ -3503,9 +3512,9 @@ function Fo(e) {
|
|
|
3503
3512
|
});
|
|
3504
3513
|
} };
|
|
3505
3514
|
}
|
|
3506
|
-
function
|
|
3515
|
+
function Tn({ drawerKey: e }) {
|
|
3507
3516
|
const { openDrawer: o } = Fo(e);
|
|
3508
|
-
return
|
|
3517
|
+
return aA(() => {
|
|
3509
3518
|
o();
|
|
3510
3519
|
}, []), null;
|
|
3511
3520
|
}
|
|
@@ -3517,10 +3526,10 @@ const qo = {
|
|
|
3517
3526
|
avatarMaxSizeKB: 2e3,
|
|
3518
3527
|
avatarImageQuality: 1
|
|
3519
3528
|
};
|
|
3520
|
-
function
|
|
3521
|
-
const a = Ye(), i = Ke(), n = ur(), c = qr(`myProfile${s}Store`), l = Vr(hr.User), u = { ...qo, ...t ?? {} }, { dataSource: d, isLoading: h, error: p, isError:
|
|
3529
|
+
function Dn({ opened: e, handleClose: o, userId: s, updateUser: r, options: t }) {
|
|
3530
|
+
const a = Ye(), i = Ke(), n = ur(), c = qr(`myProfile${s}Store`), l = Vr(hr.User), u = { ...qo, ...t ?? {} }, { dataSource: d, isLoading: h, error: p, isError: b, clearError: k } = Yr({
|
|
3522
3531
|
name: `dsUser${s}`,
|
|
3523
|
-
label: `${
|
|
3532
|
+
label: `${eA().t("archbase:My Profile")}`,
|
|
3524
3533
|
service: l,
|
|
3525
3534
|
store: c,
|
|
3526
3535
|
pageSize: 50,
|
|
@@ -3533,28 +3542,28 @@ function Tn({ opened: e, handleClose: o, userId: s, updateUser: r, options: t })
|
|
|
3533
3542
|
onDestroy: (f) => {
|
|
3534
3543
|
},
|
|
3535
3544
|
onError: (f, g) => {
|
|
3536
|
-
Gr.showError(
|
|
3545
|
+
Gr.showError(eA().t("archbase:WARNING"), f, g);
|
|
3537
3546
|
}
|
|
3538
3547
|
});
|
|
3539
|
-
|
|
3548
|
+
aA(() => {
|
|
3540
3549
|
e && d && d.isBrowsing() && d.edit();
|
|
3541
3550
|
}, [d, e]);
|
|
3542
|
-
const
|
|
3551
|
+
const y = (f) => {
|
|
3543
3552
|
f && (console.log(f), r(f.name, f.avatar));
|
|
3544
3553
|
};
|
|
3545
3554
|
return /* @__PURE__ */ A(
|
|
3546
3555
|
Kr,
|
|
3547
3556
|
{
|
|
3548
|
-
title:
|
|
3557
|
+
title: eA().t("archbase:My Profile"),
|
|
3549
3558
|
size: 800,
|
|
3550
3559
|
height: "500px",
|
|
3551
3560
|
opened: e,
|
|
3552
3561
|
dataSource: d,
|
|
3553
3562
|
onClickOk: o,
|
|
3554
3563
|
onClickCancel: o,
|
|
3555
|
-
onAfterSave:
|
|
3556
|
-
children: /* @__PURE__ */ A(zA, { style: { height: "440px" }, ref: a, children: /* @__PURE__ */
|
|
3557
|
-
/* @__PURE__ */ A(
|
|
3564
|
+
onAfterSave: y,
|
|
3565
|
+
children: /* @__PURE__ */ A(zA, { style: { height: "440px" }, ref: a, children: /* @__PURE__ */ E(j, { children: [
|
|
3566
|
+
/* @__PURE__ */ A(j, { align: "center", children: /* @__PURE__ */ A(
|
|
3558
3567
|
Ur,
|
|
3559
3568
|
{
|
|
3560
3569
|
dataSource: d,
|
|
@@ -3568,8 +3577,8 @@ function Tn({ opened: e, handleClose: o, userId: s, updateUser: r, options: t })
|
|
|
3568
3577
|
/* @__PURE__ */ A(
|
|
3569
3578
|
XA,
|
|
3570
3579
|
{
|
|
3571
|
-
label: `${
|
|
3572
|
-
placeholder: `${
|
|
3580
|
+
label: `${eA().t("archbase:Nome completo")}`,
|
|
3581
|
+
placeholder: `${eA().t("archbase:Informe o nome completo do usuário")}`,
|
|
3573
3582
|
dataSource: d,
|
|
3574
3583
|
dataField: "name",
|
|
3575
3584
|
required: !0
|
|
@@ -3578,8 +3587,8 @@ function Tn({ opened: e, handleClose: o, userId: s, updateUser: r, options: t })
|
|
|
3578
3587
|
u.showNickname && /* @__PURE__ */ A(
|
|
3579
3588
|
XA,
|
|
3580
3589
|
{
|
|
3581
|
-
label: `${
|
|
3582
|
-
placeholder: `${
|
|
3590
|
+
label: `${eA().t("archbase:Apelido")}`,
|
|
3591
|
+
placeholder: `${eA().t("archbase:Apelido")}`,
|
|
3583
3592
|
dataSource: d,
|
|
3584
3593
|
dataField: "nickname",
|
|
3585
3594
|
required: u.requiredNickname
|
|
@@ -3588,8 +3597,8 @@ function Tn({ opened: e, handleClose: o, userId: s, updateUser: r, options: t })
|
|
|
3588
3597
|
/* @__PURE__ */ A(
|
|
3589
3598
|
XA,
|
|
3590
3599
|
{
|
|
3591
|
-
label: `${
|
|
3592
|
-
placeholder: `${
|
|
3600
|
+
label: `${eA().t("archbase:Descrição do usuário")}`,
|
|
3601
|
+
placeholder: `${eA().t("archbase:Informe a descrição do usuário")}`,
|
|
3593
3602
|
dataSource: d,
|
|
3594
3603
|
dataField: "description",
|
|
3595
3604
|
required: !0
|
|
@@ -3620,11 +3629,11 @@ export {
|
|
|
3620
3629
|
Jr as ArchbaseChangeLanguageAction,
|
|
3621
3630
|
Zr as ArchbaseColorSchemeAction,
|
|
3622
3631
|
Ln as ArchbaseDrawerContent,
|
|
3623
|
-
|
|
3632
|
+
Tn as ArchbaseDrawerTrigger,
|
|
3624
3633
|
_r as ArchbaseHeaderNavAction,
|
|
3625
3634
|
KA as ArchbaseKeepAliveRoute,
|
|
3626
3635
|
yo as ArchbaseMantineSidebar,
|
|
3627
|
-
|
|
3636
|
+
Dn as ArchbaseMyProfileModal,
|
|
3628
3637
|
Ue as ArchbaseNavigationContext,
|
|
3629
3638
|
Sn as ArchbaseNavigationProvider,
|
|
3630
3639
|
eo as CommandPaletteButton,
|
|
@@ -3632,22 +3641,22 @@ export {
|
|
|
3632
3641
|
ho as MantineSidebarGroupsSkeleton,
|
|
3633
3642
|
ue as MantineSidebarMenuSkeleton,
|
|
3634
3643
|
mo as MinimalSidebar,
|
|
3635
|
-
|
|
3644
|
+
Co as RailSidebar,
|
|
3636
3645
|
bn as SidebarBadge,
|
|
3637
3646
|
we as SidebarErrorMessage,
|
|
3638
3647
|
co as SidebarGroup,
|
|
3639
3648
|
uo as SidebarGroupIcon,
|
|
3640
3649
|
so as SidebarGroupsSkeleton,
|
|
3641
|
-
|
|
3650
|
+
kn as SidebarHeaderSkeleton,
|
|
3642
3651
|
mn as SidebarIndicator,
|
|
3643
3652
|
MA as SidebarItem,
|
|
3644
3653
|
ye as SidebarMenuSkeleton,
|
|
3645
3654
|
ae as SidebarProvider,
|
|
3646
|
-
|
|
3647
|
-
|
|
3655
|
+
pn as SidebarSearch,
|
|
3656
|
+
fn as SidebarSection,
|
|
3648
3657
|
gn as SidebarUserProfile,
|
|
3649
|
-
|
|
3650
|
-
|
|
3658
|
+
Cn as SidebarUserProfileSkeleton,
|
|
3659
|
+
po as StandardSidebar,
|
|
3651
3660
|
ro as defaultAvatar,
|
|
3652
3661
|
qo as defaultMyProfileModalOptions,
|
|
3653
3662
|
Rn as navigationDataSample,
|