@archbase/admin 4.0.25 → 4.0.26
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/archbase-admin-4.0.26.tgz +0 -0
- package/dist/index.js +1085 -1084
- package/package.json +7 -7
- package/dist/archbase-admin-4.0.25.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as E, Fragment as xe } from "react/jsx-runtime";
|
|
2
2
|
import * as QA from "react";
|
|
3
|
-
import
|
|
3
|
+
import Ce, { useState as fe, useRef as Ae, useEffect as re, useMemo as ie, useContext as be, useCallback as C, createContext as Pe, memo as KA, Fragment as FA, useLayoutEffect as mr, useImperativeHandle as yr, startTransition as AA, useReducer as vr, useSyncExternalStore as Cr } from "react";
|
|
4
4
|
import { useArchbaseSecurityManager as wr } from "@archbase/security";
|
|
5
5
|
import { useUncontrolled as oA, useMediaQuery as IA, useHotkeys as Sr, useDisclosure as kr, useFocusTrap as xr, useForceUpdate as Ir } from "@mantine/hooks";
|
|
6
|
-
import { Flex as Ve, useMantineColorScheme as
|
|
6
|
+
import { Flex as Ve, useMantineColorScheme as se, Menu as ne, ActionIcon as Re, Group as Ie, Tooltip as Te, Button as Tr, ScrollArea as De, Badge as dA, Center as Ue, Image as Er, useMantineTheme as ge, px as de, Burger as Rr, Box as B, Avatar as nA, Text as we, Stack as J, Skeleton as ue, Paper as Pr, NavLink as TA, Kbd as GA, UnstyledButton as sA, Collapse as Lr, TextInput as VA, Indicator as Mr, Transition as Dr, Divider as lA, AppShell as Ke, Drawer as BA } from "@mantine/core";
|
|
7
7
|
import { IconSun as HA, IconMoonStars as UA, IconTerminal as Nr, IconSearch as Ye, IconAlertCircle as zr, IconDots as YA, IconChevronRight as uA, IconChevronDown as Or, IconX as qA, IconChevronLeft as $r, IconHome2 as Qr, IconDashboard as Kr, IconUsers as Fr, IconListSearch as jA, IconUserPlus as Gr, IconNews as Vr, IconFilePlus as Br, IconSettings as Hr } from "@tabler/icons-react";
|
|
8
|
-
import { useArchbaseAppContext as hA, getI18nextInstance as
|
|
8
|
+
import { useArchbaseAppContext as hA, getI18nextInstance as oe, useArchbaseTranslation as pA, archbaseI18next as ke, useArchbaseValidator as Ur, ARCHBASE_IOC_API_TYPE as Yr } from "@archbase/core";
|
|
9
9
|
import { BRFlag as Ge, USFlag as XA, ESFlag as aA, VEFlag as qr, UYFlag as jr, SVFlag as Xr, PYFlag as Jr, PEFlag as _r, PAFlag as Wr, NIFlag as Zr, MXFlag as et, HNFlag as At, GTFlag as rt, ECFlag as tt, DOFlag as ot, CUFlag as nt, CRFlag as st, COFlag as lt, CLFlag as at, BOFlag as it, ARFlag as ct } from "mantine-flagpack";
|
|
10
10
|
import { spotlight as dt, Spotlight as Fe } from "@mantine/spotlight";
|
|
11
11
|
import { useNavigate as Be, useLocation as He, matchPath as EA } from "react-router";
|
|
12
12
|
import { useLocation as _e, useOutlet as ut, matchPath as ht, Route as $e, Routes as JA, useParams as _A, useSearchParams as WA, useNavigate as pt } from "react-router-dom";
|
|
13
13
|
import { useMediaQuery as ft } from "usehooks-ts";
|
|
14
14
|
import { useArchbaseNavigateParams as gt, useArchbaseVisible as bt, ArchbaseNotifications as mt, ArchbaseAvatarEdit as yt, ArchbaseEdit as rA } from "@archbase/components";
|
|
15
|
-
import { SubMenu as vt, MenuItem as RA, menuClasses as
|
|
15
|
+
import { SubMenu as vt, MenuItem as RA, menuClasses as ee, Sidebar as ZA, Menu as er, sidebarClasses as Ar } from "react-pro-sidebar";
|
|
16
16
|
import { createPortal as Ct } from "react-dom";
|
|
17
17
|
import wt from "@rehooks/component-size";
|
|
18
18
|
import { ArchbaseAdvancedTabs as St } from "@archbase/layout";
|
|
@@ -21,7 +21,7 @@ import { persist as xt } from "zustand/middleware";
|
|
|
21
21
|
import { useArchbaseStore as It, useArchbaseRemoteServiceApi as Tt, useArchbaseRemoteDataSource as Et } from "@archbase/data";
|
|
22
22
|
import { ArchbaseFormModalTemplate as Rt } from "@archbase/template";
|
|
23
23
|
import { createStore as Pt } from "zustand/vanilla";
|
|
24
|
-
const We =
|
|
24
|
+
const We = Ce.createContext({}), Lt = ({
|
|
25
25
|
navigationData: e,
|
|
26
26
|
user: t,
|
|
27
27
|
owner: o,
|
|
@@ -33,22 +33,22 @@ const We = ve.createContext({}), Lt = ({
|
|
|
33
33
|
onNavigationDataChange: d,
|
|
34
34
|
initialSidebarCollapsed: i
|
|
35
35
|
}) => {
|
|
36
|
-
const [u, c] =
|
|
36
|
+
const [u, c] = fe(i), [h, f] = fe(!1), [b, v] = fe(() => a === !0), [m, g] = fe(null), p = Ae(!1), [w, x] = oA({
|
|
37
37
|
value: d !== void 0 ? e : void 0,
|
|
38
38
|
defaultValue: a ? [] : e,
|
|
39
39
|
finalValue: [],
|
|
40
40
|
onChange: d
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
const { securityManager:
|
|
42
|
+
re(() => {
|
|
43
|
+
}, [w, a]);
|
|
44
|
+
const { securityManager: R } = wr({
|
|
45
45
|
resourceName: l?.navigationResourceName ? l.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
46
46
|
resourceDescription: l?.navigationResourceDescription ? l.navigationResourceDescription : "archbase:Navegação",
|
|
47
47
|
enableSecurity: a
|
|
48
48
|
});
|
|
49
|
-
return
|
|
49
|
+
return re(() => {
|
|
50
50
|
p.current = !1;
|
|
51
|
-
}, [t?.id]),
|
|
51
|
+
}, [t?.id]), re(() => {
|
|
52
52
|
if (!a) {
|
|
53
53
|
v(!1);
|
|
54
54
|
return;
|
|
@@ -56,54 +56,54 @@ const We = ve.createContext({}), Lt = ({
|
|
|
56
56
|
if (p.current)
|
|
57
57
|
return;
|
|
58
58
|
e.filter((z) => z.showInSidebar).forEach((z) => {
|
|
59
|
-
|
|
59
|
+
R.registerAction(z.label, z.label), z?.links?.forEach((P) => R.registerAction(`${z.label} -> ${P.label}`, `${z.label} -> ${P.label}`));
|
|
60
60
|
});
|
|
61
|
-
const
|
|
61
|
+
const O = () => {
|
|
62
62
|
p.current = !0;
|
|
63
|
-
const z = e.map((
|
|
64
|
-
...
|
|
65
|
-
disabled: !
|
|
66
|
-
links:
|
|
67
|
-
const
|
|
63
|
+
const z = e.map((P) => ({
|
|
64
|
+
...P,
|
|
65
|
+
disabled: !R.hasPermission(P.label),
|
|
66
|
+
links: P.links && P.links.map((I) => {
|
|
67
|
+
const L = R.hasPermission(`${P.label} -> ${I.label}`);
|
|
68
68
|
return {
|
|
69
69
|
...I,
|
|
70
|
-
disabled: !
|
|
70
|
+
disabled: !L
|
|
71
71
|
};
|
|
72
72
|
})
|
|
73
73
|
}));
|
|
74
|
-
x(z), v(!1),
|
|
75
|
-
}, G = !
|
|
76
|
-
if (
|
|
74
|
+
x(z), v(!1), g(null);
|
|
75
|
+
}, G = !R.isLoading() && !R.isError();
|
|
76
|
+
if (R.isError()) {
|
|
77
77
|
p.current = !0;
|
|
78
|
-
const z =
|
|
79
|
-
|
|
78
|
+
const z = R.getError() || "Erro ao carregar permissões de navegação";
|
|
79
|
+
g(z), v(!1), x(e);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
if (G) {
|
|
83
|
-
|
|
83
|
+
O();
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
v(!0),
|
|
87
|
-
let
|
|
86
|
+
v(!0), g(null);
|
|
87
|
+
let S = !1;
|
|
88
88
|
const T = setInterval(() => {
|
|
89
|
-
if (!
|
|
89
|
+
if (!S && R.isError()) {
|
|
90
90
|
clearInterval(T), p.current = !0;
|
|
91
|
-
const z =
|
|
92
|
-
|
|
91
|
+
const z = R.getError() || "Erro ao carregar permissões de navegação";
|
|
92
|
+
g(z), v(!1), x(e);
|
|
93
93
|
}
|
|
94
|
-
}, 100),
|
|
95
|
-
|
|
94
|
+
}, 100), D = setTimeout(() => {
|
|
95
|
+
S || (clearInterval(T), v((z) => z && (p.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), x(e), !1)));
|
|
96
96
|
}, 3e3);
|
|
97
|
-
return
|
|
98
|
-
|
|
97
|
+
return R.apply(() => {
|
|
98
|
+
S || (clearInterval(T), clearTimeout(D), O());
|
|
99
99
|
}), () => {
|
|
100
|
-
|
|
100
|
+
S = !0, clearInterval(T), clearTimeout(D);
|
|
101
101
|
};
|
|
102
|
-
}, [t?.id, a, e,
|
|
102
|
+
}, [t?.id, a, e, R, x]), /* @__PURE__ */ r(
|
|
103
103
|
We.Provider,
|
|
104
104
|
{
|
|
105
105
|
value: {
|
|
106
|
-
navigationData:
|
|
106
|
+
navigationData: w,
|
|
107
107
|
setNavigationData: x,
|
|
108
108
|
user: t,
|
|
109
109
|
owner: o,
|
|
@@ -114,20 +114,20 @@ const We = ve.createContext({}), Lt = ({
|
|
|
114
114
|
hidden: h,
|
|
115
115
|
setHidden: f,
|
|
116
116
|
onNavigationDataChange: d,
|
|
117
|
-
isLoadingPermissions:
|
|
118
|
-
permissionsError:
|
|
117
|
+
isLoadingPermissions: b,
|
|
118
|
+
permissionsError: m
|
|
119
119
|
},
|
|
120
120
|
children: s
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
123
|
}, vn = ({ children: e }) => /* @__PURE__ */ r(Ve, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), Mt = () => {
|
|
124
|
-
const e = hA(), { colorScheme: t } =
|
|
125
|
-
|
|
124
|
+
const e = hA(), { colorScheme: t } = se(), o = t === "dark", [A, n] = fe(oe().language);
|
|
125
|
+
re(() => {
|
|
126
126
|
const d = (i) => {
|
|
127
127
|
n(i);
|
|
128
128
|
};
|
|
129
|
-
return
|
|
130
|
-
|
|
129
|
+
return oe().on("languageChanged", d), () => {
|
|
130
|
+
oe().off("languageChanged", d);
|
|
131
131
|
};
|
|
132
132
|
}, []);
|
|
133
133
|
const s = (d) => {
|
|
@@ -185,7 +185,7 @@ const We = ve.createContext({}), Lt = ({
|
|
|
185
185
|
}, a = () => {
|
|
186
186
|
if (e.languages)
|
|
187
187
|
return e.languages.filter((d) => d).map((d) => /* @__PURE__ */ r(
|
|
188
|
-
|
|
188
|
+
ne.Item,
|
|
189
189
|
{
|
|
190
190
|
onClick: () => l(d.lang),
|
|
191
191
|
leftSection: s(d.lang),
|
|
@@ -194,17 +194,17 @@ const We = ve.createContext({}), Lt = ({
|
|
|
194
194
|
d.name
|
|
195
195
|
));
|
|
196
196
|
}, l = (d) => {
|
|
197
|
-
|
|
197
|
+
oe().changeLanguage(d);
|
|
198
198
|
};
|
|
199
|
-
return /* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */ r(
|
|
201
|
-
/* @__PURE__ */ r(
|
|
199
|
+
return /* @__PURE__ */ E(ne, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
200
|
+
/* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ r(Re, { variant: "transparent", color: o ? "white" : "blue", title: oe().t("toggleLanguage"), children: s(A) }) }),
|
|
201
|
+
/* @__PURE__ */ r(ne.Dropdown, { children: a() })
|
|
202
202
|
] });
|
|
203
203
|
}, Dt = () => {
|
|
204
|
-
const e = hA(), { colorScheme: t } =
|
|
204
|
+
const e = hA(), { colorScheme: t } = se(), { t: o, i18n: A } = pA(), n = (l) => l === "en" ? /* @__PURE__ */ r(XA, { size: 24 }) : l === "pt-BR" ? /* @__PURE__ */ r(Ge, { size: 24 }) : l === "es" ? /* @__PURE__ */ r(aA, { size: 24 }) : /* @__PURE__ */ r(Ge, { size: 24 }), s = () => {
|
|
205
205
|
if (e.languages)
|
|
206
206
|
return e.languages.filter((l) => l).map((l) => /* @__PURE__ */ r(
|
|
207
|
-
|
|
207
|
+
ne.Item,
|
|
208
208
|
{
|
|
209
209
|
onClick: () => a(l.lang),
|
|
210
210
|
leftSection: n(l.lang),
|
|
@@ -215,9 +215,9 @@ const We = ve.createContext({}), Lt = ({
|
|
|
215
215
|
}, a = (l) => {
|
|
216
216
|
A.changeLanguage(l);
|
|
217
217
|
};
|
|
218
|
-
return /* @__PURE__ */
|
|
219
|
-
/* @__PURE__ */ r(
|
|
220
|
-
|
|
218
|
+
return /* @__PURE__ */ E(ne, { children: [
|
|
219
|
+
/* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ E(
|
|
220
|
+
Ie,
|
|
221
221
|
{
|
|
222
222
|
w: "100%",
|
|
223
223
|
justify: "flex-start",
|
|
@@ -226,21 +226,21 @@ const We = ve.createContext({}), Lt = ({
|
|
|
226
226
|
variant: "transparent",
|
|
227
227
|
fw: 400,
|
|
228
228
|
gap: 4,
|
|
229
|
-
title:
|
|
229
|
+
title: oe().t("archbase:toggleLanguage"),
|
|
230
230
|
children: [
|
|
231
231
|
n(A.language),
|
|
232
232
|
`${e.languages.find((l) => l.lang === A.language)?.name ?? "Português"}`
|
|
233
233
|
]
|
|
234
234
|
}
|
|
235
235
|
) }),
|
|
236
|
-
/* @__PURE__ */ r(
|
|
236
|
+
/* @__PURE__ */ r(ne.Dropdown, { children: s() })
|
|
237
237
|
] });
|
|
238
238
|
}, Nt = ({
|
|
239
239
|
toggleColorScheme: e,
|
|
240
240
|
sunColor: t = "white",
|
|
241
241
|
moonColor: o = "blue"
|
|
242
242
|
}) => {
|
|
243
|
-
const { t: A } = pA(), { colorScheme: n, toggleColorScheme: s } =
|
|
243
|
+
const { t: A } = pA(), { colorScheme: n, toggleColorScheme: s } = se(), a = () => {
|
|
244
244
|
e ? e() : s();
|
|
245
245
|
}, l = n === "dark";
|
|
246
246
|
return /* @__PURE__ */ r(
|
|
@@ -249,26 +249,26 @@ const We = ve.createContext({}), Lt = ({
|
|
|
249
249
|
variant: "transparent",
|
|
250
250
|
color: l ? t : o,
|
|
251
251
|
onClick: () => a(),
|
|
252
|
-
title:
|
|
252
|
+
title: oe().t("archbase:toggleColorScheme"),
|
|
253
253
|
children: l ? /* @__PURE__ */ r(HA, { size: "1.5rem" }) : /* @__PURE__ */ r(UA, { size: "1.5rem" })
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
|
-
}, zt = (e) => /* @__PURE__ */ r(
|
|
256
|
+
}, zt = (e) => /* @__PURE__ */ r(Ie, { gap: "sm", children: e.children });
|
|
257
257
|
function Ot({ category: e, label: t, color: o, description: A, image: n, onClick: s }) {
|
|
258
258
|
return /* @__PURE__ */ r(
|
|
259
259
|
Fe.Action,
|
|
260
260
|
{
|
|
261
261
|
onClick: s,
|
|
262
|
-
label: `${
|
|
263
|
-
description: A ?
|
|
264
|
-
leftSection: n ? /* @__PURE__ */ r(Ue, { children: /* @__PURE__ */ r(Er, { src: n, alt:
|
|
265
|
-
rightSection: e ? /* @__PURE__ */ r(dA, { color: o, size: "sm", children:
|
|
262
|
+
label: `${oe().t(t || "")}`,
|
|
263
|
+
description: A ? oe().t(A) : void 0,
|
|
264
|
+
leftSection: n ? /* @__PURE__ */ r(Ue, { children: /* @__PURE__ */ r(Er, { src: n, alt: oe().t(t || ""), width: 24, height: 24 }) }) : void 0,
|
|
265
|
+
rightSection: e ? /* @__PURE__ */ r(dA, { color: o, size: "sm", children: oe().t(e) }) : void 0
|
|
266
266
|
},
|
|
267
267
|
t
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
270
|
const $t = ({ navigationData: e, color: t }) => {
|
|
271
|
-
const [o, A] =
|
|
271
|
+
const [o, A] = fe(""), n = Be(), { t: s } = pA(), a = ie(() => {
|
|
272
272
|
const d = new Array();
|
|
273
273
|
return e.forEach((i) => {
|
|
274
274
|
i.links ? i.links.forEach((u) => {
|
|
@@ -297,9 +297,9 @@ const $t = ({ navigationData: e, color: t }) => {
|
|
|
297
297
|
const i = `${s(d.label || "")}`;
|
|
298
298
|
return i && i.toLowerCase().includes(o.toLowerCase().trim());
|
|
299
299
|
}).map((d) => /* @__PURE__ */ r(Ot, { ...d }, d.id));
|
|
300
|
-
return /* @__PURE__ */ r(
|
|
301
|
-
/* @__PURE__ */ r(
|
|
302
|
-
/* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ r(xe, { children: a && a.length > 0 ? /* @__PURE__ */ E(xe, { children: [
|
|
301
|
+
/* @__PURE__ */ r(Te, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r(Tr, { color: t, leftSection: /* @__PURE__ */ r(Nr, { size: "24px" }), onClick: () => dt.open() }) }),
|
|
302
|
+
/* @__PURE__ */ E(
|
|
303
303
|
Fe.Root,
|
|
304
304
|
{
|
|
305
305
|
shortcut: ["mod + M", "/"],
|
|
@@ -307,7 +307,7 @@ const $t = ({ navigationData: e, color: t }) => {
|
|
|
307
307
|
query: o,
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ r(Fe.Search, { placeholder: `${s("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ r(Ye, { size: "1.2rem" }) }),
|
|
310
|
-
/* @__PURE__ */ r(De.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Fe.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Fe.Empty, { children:
|
|
310
|
+
/* @__PURE__ */ r(De.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Fe.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Fe.Empty, { children: oe().t("archbase:Nenhum resultado...") }) }) })
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
)
|
|
@@ -327,63 +327,63 @@ const $t = ({ navigationData: e, color: t }) => {
|
|
|
327
327
|
hideAutoHeaderActionsOnUserMenuBreakPoint: c,
|
|
328
328
|
withDividerAfterUserMenuToggleColorScheme: h = !0,
|
|
329
329
|
user: f,
|
|
330
|
-
navigationData:
|
|
330
|
+
navigationData: b = [],
|
|
331
331
|
logo: v,
|
|
332
|
-
headerActions:
|
|
333
|
-
styleLogo:
|
|
332
|
+
headerActions: m,
|
|
333
|
+
styleLogo: g,
|
|
334
334
|
showLanguageSelector: p = !1,
|
|
335
|
-
sideBarHiddenBreakPoint:
|
|
335
|
+
sideBarHiddenBreakPoint: w,
|
|
336
336
|
headerLeftContent: x,
|
|
337
|
-
toggleColorScheme:
|
|
337
|
+
toggleColorScheme: R,
|
|
338
338
|
logoLeftSection: Y,
|
|
339
|
-
logoRightSection:
|
|
339
|
+
logoRightSection: O,
|
|
340
340
|
showBurger: G = !0,
|
|
341
|
-
showCommands:
|
|
342
|
-
sunColor:
|
|
341
|
+
showCommands: F = !0,
|
|
342
|
+
sunColor: S,
|
|
343
343
|
moonColor: T,
|
|
344
|
-
styles:
|
|
344
|
+
styles: D
|
|
345
345
|
}) => {
|
|
346
|
-
const z =
|
|
347
|
-
`(max-width: ${
|
|
346
|
+
const z = ge(), { colorScheme: P, toggleColorScheme: I } = se(), L = be(We), j = IA(
|
|
347
|
+
`(max-width: ${w ? de(w) : z.breakpoints.md})`
|
|
348
348
|
), H = IA(
|
|
349
|
-
`(max-width: ${c ?
|
|
349
|
+
`(max-width: ${c ? de(c) : z.breakpoints.md})`
|
|
350
350
|
);
|
|
351
|
-
let
|
|
352
|
-
return d && (i = !H, u = !H, t = H, o = H, a = H, h = H, p && (
|
|
353
|
-
/* @__PURE__ */
|
|
351
|
+
let _ = !1, W = !1;
|
|
352
|
+
return d && (i = !H, u = !H, t = H, o = H, a = H, h = H, p && (W = !H, _ = H)), /* @__PURE__ */ E(xe, { children: [
|
|
353
|
+
/* @__PURE__ */ E(Ve, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
354
354
|
Y,
|
|
355
355
|
/* @__PURE__ */ r(
|
|
356
356
|
"img",
|
|
357
357
|
{
|
|
358
358
|
style: {
|
|
359
359
|
height: 50,
|
|
360
|
-
...
|
|
360
|
+
...g
|
|
361
361
|
},
|
|
362
362
|
alt: "logo",
|
|
363
363
|
src: v
|
|
364
364
|
}
|
|
365
365
|
),
|
|
366
|
-
|
|
366
|
+
O
|
|
367
367
|
] }),
|
|
368
368
|
G && /* @__PURE__ */ r(
|
|
369
369
|
Rr,
|
|
370
370
|
{
|
|
371
|
-
opened:
|
|
372
|
-
onClick: () =>
|
|
371
|
+
opened: L.hidden ? L.hidden : !1,
|
|
372
|
+
onClick: () => L.setHidden(!L.hidden),
|
|
373
373
|
size: "sm",
|
|
374
374
|
color: z.colors.gray[7],
|
|
375
375
|
mx: { base: "xs", xs: "lg", sm: "xl" },
|
|
376
|
-
display:
|
|
376
|
+
display: j ? "" : "none"
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */ r("div", { children:
|
|
379
|
+
/* @__PURE__ */ r("div", { children: F && /* @__PURE__ */ r($t, { navigationData: b }) }),
|
|
380
380
|
/* @__PURE__ */ r(B, { style: { flex: 1 }, children: x }),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
i &&
|
|
383
|
-
u && /* @__PURE__ */ r(Nt, { toggleColorScheme:
|
|
384
|
-
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */ r(
|
|
381
|
+
/* @__PURE__ */ E(zt, { children: [
|
|
382
|
+
i && m,
|
|
383
|
+
u && /* @__PURE__ */ r(Nt, { toggleColorScheme: R, sunColor: S, moonColor: T }),
|
|
384
|
+
W && /* @__PURE__ */ r(Mt, {}),
|
|
385
|
+
/* @__PURE__ */ E(ne, { shadow: "md", width: 200, position: "bottom-end", styles: D?.menu, children: [
|
|
386
|
+
/* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ E("div", { children: [
|
|
387
387
|
/* @__PURE__ */ r(
|
|
388
388
|
nA,
|
|
389
389
|
{
|
|
@@ -415,20 +415,20 @@ const $t = ({ navigationData: e, color: t }) => {
|
|
|
415
415
|
}
|
|
416
416
|
) : null
|
|
417
417
|
] }) }),
|
|
418
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ E(ne.Dropdown, { children: [
|
|
419
419
|
e,
|
|
420
|
-
o && /* @__PURE__ */ r(
|
|
420
|
+
o && /* @__PURE__ */ r(ne.Label, { children: `${oe().t("archbase:Opções")}` }),
|
|
421
421
|
a && l,
|
|
422
422
|
t && /* @__PURE__ */ r(
|
|
423
|
-
|
|
423
|
+
ne.Item,
|
|
424
424
|
{
|
|
425
|
-
leftSection:
|
|
426
|
-
onClick:
|
|
427
|
-
children: `${
|
|
425
|
+
leftSection: P === "dark" ? /* @__PURE__ */ r(HA, { size: A }) : /* @__PURE__ */ r(UA, { size: A }),
|
|
426
|
+
onClick: R || I,
|
|
427
|
+
children: `${oe().t("archbase:toggleColorScheme")}`
|
|
428
428
|
}
|
|
429
429
|
),
|
|
430
|
-
|
|
431
|
-
h && /* @__PURE__ */ r(
|
|
430
|
+
_ && /* @__PURE__ */ r(Dt, {}),
|
|
431
|
+
h && /* @__PURE__ */ r(ne.Divider, {}),
|
|
432
432
|
n && s
|
|
433
433
|
] })
|
|
434
434
|
] })
|
|
@@ -439,30 +439,30 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
|
|
|
439
439
|
const u = s ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, c = s ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, h = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", f = "0.5";
|
|
440
440
|
if (A.links) {
|
|
441
441
|
if (!(A.disabled && A.hideDisabledItem))
|
|
442
|
-
return /* @__PURE__ */ r(
|
|
442
|
+
return /* @__PURE__ */ r(Te, { disabled: !t, label: ke.t(A.label), children: /* @__PURE__ */ r(
|
|
443
443
|
vt,
|
|
444
444
|
{
|
|
445
445
|
rootStyles: {
|
|
446
446
|
fontSize: "16px",
|
|
447
|
-
[`.${
|
|
447
|
+
[`.${ee.button}`]: {
|
|
448
448
|
"&:hover": {
|
|
449
|
-
[`.${
|
|
449
|
+
[`.${ee.icon}`]: {
|
|
450
450
|
color: "white"
|
|
451
451
|
},
|
|
452
|
-
[`.${
|
|
452
|
+
[`.${ee.label}`]: {
|
|
453
453
|
color: "white"
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
},
|
|
457
|
-
[`.${
|
|
457
|
+
[`.${ee.subMenuContent}`]: {
|
|
458
458
|
width: t && i
|
|
459
459
|
},
|
|
460
|
-
[`.${
|
|
460
|
+
[`.${ee.disabled}`]: {
|
|
461
461
|
opacity: f,
|
|
462
|
-
[`.${
|
|
462
|
+
[`.${ee.icon}`]: {
|
|
463
463
|
color: h + " !important"
|
|
464
464
|
},
|
|
465
|
-
[`.${
|
|
465
|
+
[`.${ee.label}`]: {
|
|
466
466
|
color: h + " !important"
|
|
467
467
|
}
|
|
468
468
|
}
|
|
@@ -470,47 +470,47 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
|
|
|
470
470
|
id: A.label,
|
|
471
471
|
icon: A.icon,
|
|
472
472
|
defaultOpen: !A.disabled,
|
|
473
|
-
label: t ? "" :
|
|
473
|
+
label: t ? "" : ke.t(A.label),
|
|
474
474
|
disabled: A.disabled,
|
|
475
|
-
children: A.links && A.links.filter((
|
|
475
|
+
children: A.links && A.links.filter((b) => b.showInSidebar === !0 && (!b.disabled || !b.hideDisabledItem)).map((b, v) => /* @__PURE__ */ r(
|
|
476
476
|
RA,
|
|
477
477
|
{
|
|
478
|
-
onClick: () => o(
|
|
478
|
+
onClick: () => o(b),
|
|
479
479
|
rootStyles: {
|
|
480
|
-
[`.${
|
|
480
|
+
[`.${ee.icon}`]: {
|
|
481
481
|
background: u,
|
|
482
|
-
color: l &&
|
|
482
|
+
color: l && b.link === a ? "white" : c
|
|
483
483
|
},
|
|
484
|
-
[`.${
|
|
485
|
-
color: l &&
|
|
484
|
+
[`.${ee.label}`]: {
|
|
485
|
+
color: l && b.link === a ? "white" : d
|
|
486
486
|
},
|
|
487
|
-
[`.${
|
|
487
|
+
[`.${ee.button}`]: {
|
|
488
488
|
paddingLeft: "40px !important",
|
|
489
489
|
"&:hover": {
|
|
490
|
-
[`.${
|
|
490
|
+
[`.${ee.icon}`]: {
|
|
491
491
|
color: "white"
|
|
492
492
|
},
|
|
493
|
-
[`.${
|
|
493
|
+
[`.${ee.label}`]: {
|
|
494
494
|
color: "white"
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
},
|
|
498
|
-
[`.${
|
|
498
|
+
[`.${ee.disabled}`]: {
|
|
499
499
|
opacity: f,
|
|
500
|
-
[`.${
|
|
500
|
+
[`.${ee.icon}`]: {
|
|
501
501
|
background: (u || "") + " !important",
|
|
502
502
|
color: h + " !important"
|
|
503
503
|
},
|
|
504
|
-
[`.${
|
|
504
|
+
[`.${ee.label}`]: {
|
|
505
505
|
color: h + " !important"
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
},
|
|
509
|
-
id:
|
|
510
|
-
icon:
|
|
511
|
-
disabled: typeof
|
|
512
|
-
active: l &&
|
|
513
|
-
children:
|
|
509
|
+
id: b.label,
|
|
510
|
+
icon: b.icon,
|
|
511
|
+
disabled: typeof b.disabled == "function" ? b.disabled() : b.disabled,
|
|
512
|
+
active: l && b.link === a,
|
|
513
|
+
children: ke.t(b.label)
|
|
514
514
|
},
|
|
515
515
|
v
|
|
516
516
|
))
|
|
@@ -518,35 +518,35 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
|
|
|
518
518
|
n
|
|
519
519
|
) });
|
|
520
520
|
} else if (A.showInSidebar && (!A.disabled || !A.hideDisabledItem))
|
|
521
|
-
return /* @__PURE__ */ r(
|
|
521
|
+
return /* @__PURE__ */ r(Te, { disabled: !t, label: ke.t(A.label), children: /* @__PURE__ */ r(
|
|
522
522
|
RA,
|
|
523
523
|
{
|
|
524
524
|
rootStyles: {
|
|
525
525
|
fontSize: "16px",
|
|
526
|
-
[`.${
|
|
526
|
+
[`.${ee.button}`]: {
|
|
527
527
|
"&:hover": {
|
|
528
|
-
[`.${
|
|
528
|
+
[`.${ee.icon}`]: {
|
|
529
529
|
color: "white"
|
|
530
530
|
},
|
|
531
|
-
[`.${
|
|
531
|
+
[`.${ee.label}`]: {
|
|
532
532
|
color: "white"
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
|
-
[`.${
|
|
536
|
+
[`.${ee.icon}`]: {
|
|
537
537
|
background: u,
|
|
538
538
|
color: l && A.link === a ? "white" : c
|
|
539
539
|
},
|
|
540
|
-
[`.${
|
|
540
|
+
[`.${ee.label}`]: {
|
|
541
541
|
color: l && A.link === a ? "white" : d
|
|
542
542
|
},
|
|
543
|
-
[`.${
|
|
543
|
+
[`.${ee.disabled}`]: {
|
|
544
544
|
opacity: f,
|
|
545
|
-
[`.${
|
|
545
|
+
[`.${ee.icon}`]: {
|
|
546
546
|
background: (u || "") + " !important",
|
|
547
547
|
color: h + " !important"
|
|
548
548
|
},
|
|
549
|
-
[`.${
|
|
549
|
+
[`.${ee.label}`]: {
|
|
550
550
|
color: h + " !important"
|
|
551
551
|
}
|
|
552
552
|
}
|
|
@@ -556,7 +556,7 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
|
|
|
556
556
|
onClick: () => o(A),
|
|
557
557
|
icon: A.icon,
|
|
558
558
|
active: l && A.link === a,
|
|
559
|
-
children: t ? "" :
|
|
559
|
+
children: t ? "" : ke.t(A.label)
|
|
560
560
|
},
|
|
561
561
|
n
|
|
562
562
|
) });
|
|
@@ -598,7 +598,7 @@ const Kt = (e) => ({
|
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
}), Ft = (e, t, o, A, n, s, a, l, d, i, u) => {
|
|
601
|
-
const c = Kt(), h = s ? {} : { padding: o ? `0 ${(n - A) / 2}px` : "0 20px" }, f = s ? {} : { display: "none" },
|
|
601
|
+
const c = Kt(), h = s ? {} : { padding: o ? `0 ${(n - A) / 2}px` : "0 20px" }, f = s ? {} : { display: "none" }, b = a ? e === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
|
|
602
602
|
return {
|
|
603
603
|
root: {
|
|
604
604
|
fontSize: "14px",
|
|
@@ -607,9 +607,9 @@ const Kt = (e) => ({
|
|
|
607
607
|
color: t.white
|
|
608
608
|
},
|
|
609
609
|
icon: {
|
|
610
|
-
background:
|
|
610
|
+
background: b,
|
|
611
611
|
color: u,
|
|
612
|
-
[`&.${
|
|
612
|
+
[`&.${ee.disabled}`]: {
|
|
613
613
|
color: c[e].menu.disabled.color
|
|
614
614
|
}
|
|
615
615
|
},
|
|
@@ -621,14 +621,14 @@ const Kt = (e) => ({
|
|
|
621
621
|
backgroundColor: e === "dark" ? t.colors.dark[8] : t.colors[t.primaryColor][0]
|
|
622
622
|
}),
|
|
623
623
|
button: {
|
|
624
|
-
[`&.${
|
|
624
|
+
[`&.${ee.disabled}`]: {
|
|
625
625
|
color: c[e].menu.disabled.color
|
|
626
626
|
},
|
|
627
627
|
"&:hover": {
|
|
628
628
|
backgroundColor: t.colors[t.primaryColor][6],
|
|
629
629
|
color: t.white
|
|
630
630
|
},
|
|
631
|
-
[`&.${
|
|
631
|
+
[`&.${ee.active}`]: {
|
|
632
632
|
backgroundColor: t.colors[t.primaryColor][6]
|
|
633
633
|
},
|
|
634
634
|
height: l,
|
|
@@ -644,7 +644,7 @@ const Kt = (e) => ({
|
|
|
644
644
|
};
|
|
645
645
|
};
|
|
646
646
|
function Gt(e, t, o, A, n, s, a, l, d, i, u) {
|
|
647
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ E(
|
|
648
648
|
ZA,
|
|
649
649
|
{
|
|
650
650
|
ref: e,
|
|
@@ -656,16 +656,16 @@ function Gt(e, t, o, A, n, s, a, l, d, i, u) {
|
|
|
656
656
|
overflowY: "hidden",
|
|
657
657
|
left: 0,
|
|
658
658
|
right: 0,
|
|
659
|
-
height: a ? "calc(100vh - 28px)" : `${
|
|
659
|
+
height: a ? "calc(100vh - 28px)" : `${de(l)}px`
|
|
660
660
|
}
|
|
661
661
|
},
|
|
662
662
|
collapsed: t,
|
|
663
|
-
width: `${
|
|
664
|
-
collapsedWidth: `${
|
|
663
|
+
width: `${de(o)}px`,
|
|
664
|
+
collapsedWidth: `${de(A)}px`,
|
|
665
665
|
children: [
|
|
666
|
-
d && /* @__PURE__ */ r(
|
|
667
|
-
/* @__PURE__ */ r(De, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(er, { rootStyles: { background: u }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(
|
|
668
|
-
i && /* @__PURE__ */ r(
|
|
666
|
+
d && /* @__PURE__ */ r(xe, { children: d }),
|
|
667
|
+
/* @__PURE__ */ r(De, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(er, { rootStyles: { background: u }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(xe, { children: s }) }) }),
|
|
668
|
+
i && /* @__PURE__ */ r(xe, { children: i })
|
|
669
669
|
]
|
|
670
670
|
}
|
|
671
671
|
);
|
|
@@ -675,9 +675,9 @@ function LA({
|
|
|
675
675
|
collapsed: t = !1,
|
|
676
676
|
backgroundColor: o
|
|
677
677
|
}) {
|
|
678
|
-
const A =
|
|
678
|
+
const A = ge(), { colorScheme: n } = se(), s = o ?? (n === "dark" ? A.colors.dark[7] : A.white);
|
|
679
679
|
return t ? /* @__PURE__ */ r(
|
|
680
|
-
|
|
680
|
+
J,
|
|
681
681
|
{
|
|
682
682
|
gap: "sm",
|
|
683
683
|
p: "xs",
|
|
@@ -688,7 +688,7 @@ function LA({
|
|
|
688
688
|
height: "100%"
|
|
689
689
|
},
|
|
690
690
|
children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ r(
|
|
691
|
-
|
|
691
|
+
ue,
|
|
692
692
|
{
|
|
693
693
|
height: 32,
|
|
694
694
|
width: 32,
|
|
@@ -698,7 +698,7 @@ function LA({
|
|
|
698
698
|
))
|
|
699
699
|
}
|
|
700
700
|
) : /* @__PURE__ */ r(
|
|
701
|
-
|
|
701
|
+
J,
|
|
702
702
|
{
|
|
703
703
|
gap: "xs",
|
|
704
704
|
p: "md",
|
|
@@ -708,9 +708,9 @@ function LA({
|
|
|
708
708
|
width: "100%",
|
|
709
709
|
height: "100%"
|
|
710
710
|
},
|
|
711
|
-
children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */
|
|
711
|
+
children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ E(Ie, { gap: "sm", wrap: "nowrap", children: [
|
|
712
712
|
/* @__PURE__ */ r(
|
|
713
|
-
|
|
713
|
+
ue,
|
|
714
714
|
{
|
|
715
715
|
height: 24,
|
|
716
716
|
width: 24,
|
|
@@ -718,7 +718,7 @@ function LA({
|
|
|
718
718
|
}
|
|
719
719
|
),
|
|
720
720
|
/* @__PURE__ */ r(
|
|
721
|
-
|
|
721
|
+
ue,
|
|
722
722
|
{
|
|
723
723
|
height: 18,
|
|
724
724
|
radius: "xl",
|
|
@@ -735,9 +735,9 @@ function Vt({
|
|
|
735
735
|
height: o = "100%",
|
|
736
736
|
backgroundColor: A
|
|
737
737
|
}) {
|
|
738
|
-
const n =
|
|
738
|
+
const n = ge(), { colorScheme: s } = se(), a = A ?? (s === "dark" ? n.colors.dark[6] : n.colors.gray[2]);
|
|
739
739
|
return /* @__PURE__ */ r(
|
|
740
|
-
|
|
740
|
+
J,
|
|
741
741
|
{
|
|
742
742
|
gap: "md",
|
|
743
743
|
p: "xs",
|
|
@@ -747,9 +747,9 @@ function Vt({
|
|
|
747
747
|
height: o,
|
|
748
748
|
backgroundColor: a
|
|
749
749
|
},
|
|
750
|
-
children: Array.from({ length: e }).map((l, d) => /* @__PURE__ */
|
|
750
|
+
children: Array.from({ length: e }).map((l, d) => /* @__PURE__ */ E(J, { gap: 4, align: "center", children: [
|
|
751
751
|
/* @__PURE__ */ r(
|
|
752
|
-
|
|
752
|
+
ue,
|
|
753
753
|
{
|
|
754
754
|
height: 48,
|
|
755
755
|
width: 48,
|
|
@@ -758,7 +758,7 @@ function Vt({
|
|
|
758
758
|
}
|
|
759
759
|
),
|
|
760
760
|
/* @__PURE__ */ r(
|
|
761
|
-
|
|
761
|
+
ue,
|
|
762
762
|
{
|
|
763
763
|
height: 10,
|
|
764
764
|
width: 40,
|
|
@@ -774,8 +774,8 @@ function MA({
|
|
|
774
774
|
backgroundColor: t,
|
|
775
775
|
children: o
|
|
776
776
|
}) {
|
|
777
|
-
const A =
|
|
778
|
-
return o ? /* @__PURE__ */ r(
|
|
777
|
+
const A = ge(), { colorScheme: n } = se(), s = t ?? (n === "dark" ? A.colors.dark[7] : A.white), a = n === "dark" ? A.colors.red[4] : A.colors.red[6];
|
|
778
|
+
return o ? /* @__PURE__ */ r(xe, { children: o }) : /* @__PURE__ */ r(Ue, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ E(J, { align: "center", gap: "xs", children: [
|
|
779
779
|
/* @__PURE__ */ r(zr, { size: 32, color: a }),
|
|
780
780
|
/* @__PURE__ */ r(we, { size: "sm", c: a, ta: "center", children: e })
|
|
781
781
|
] }) });
|
|
@@ -795,56 +795,56 @@ function Bt({
|
|
|
795
795
|
groupLabelDarkColor: c,
|
|
796
796
|
groupLabelLightColor: h,
|
|
797
797
|
collapsed: f,
|
|
798
|
-
onMenuItemClick:
|
|
798
|
+
onMenuItemClick: b,
|
|
799
799
|
onClickActionIcon: v,
|
|
800
|
-
withBorder:
|
|
801
|
-
showGroupLabels:
|
|
800
|
+
withBorder: m = !1,
|
|
801
|
+
showGroupLabels: g = !0,
|
|
802
802
|
theme: p,
|
|
803
|
-
sidebarRef:
|
|
803
|
+
sidebarRef: w,
|
|
804
804
|
defaultGroupIcon: x,
|
|
805
|
-
selectedGroupName:
|
|
805
|
+
selectedGroupName: R,
|
|
806
806
|
sideBarHeaderContent: Y,
|
|
807
|
-
iconsWithBackground:
|
|
807
|
+
iconsWithBackground: O = !1,
|
|
808
808
|
menuItemHeight: G = 40,
|
|
809
|
-
highlightActiveMenuItem:
|
|
810
|
-
backgroundDarkColor:
|
|
809
|
+
highlightActiveMenuItem: F = !0,
|
|
810
|
+
backgroundDarkColor: S,
|
|
811
811
|
backgroundLightColor: T,
|
|
812
|
-
textDarkColor:
|
|
812
|
+
textDarkColor: D,
|
|
813
813
|
textLightColor: z,
|
|
814
|
-
iconDarkColor:
|
|
814
|
+
iconDarkColor: P,
|
|
815
815
|
iconLightColor: I,
|
|
816
|
-
collapsedSubmenuWidth:
|
|
817
|
-
isLoading:
|
|
816
|
+
collapsedSubmenuWidth: L,
|
|
817
|
+
isLoading: j = !1,
|
|
818
818
|
loadingError: H,
|
|
819
|
-
loadingComponent:
|
|
820
|
-
errorComponent:
|
|
821
|
-
skeletonItemCount:
|
|
822
|
-
skeletonGroupCount:
|
|
819
|
+
loadingComponent: _,
|
|
820
|
+
errorComponent: W,
|
|
821
|
+
skeletonItemCount: he = 8,
|
|
822
|
+
skeletonGroupCount: me = 3
|
|
823
823
|
}) {
|
|
824
|
-
const [
|
|
825
|
-
const
|
|
826
|
-
return e.forEach((
|
|
827
|
-
if (
|
|
824
|
+
const [le, q] = fe(""), V = hA(), k = He(), { colorScheme: y } = se(), $ = y === "dark" ? S ?? p.colors.dark[7] : T ?? p.white, M = s || (y === "dark" ? p.colors[p.primaryColor][8] : p.colors[p.primaryColor][0]), Q = y === "dark" ? D ?? "var(--mantine-color-text)" : z ?? "var(--mantine-color-text)", K = y === "dark" ? P ?? p.colors[p.primaryColor][0] : I ?? p.colors[p.primaryColor][7], N = ie(() => {
|
|
825
|
+
const pe = /* @__PURE__ */ new Set();
|
|
826
|
+
return e.forEach((te) => {
|
|
827
|
+
if (te.showInSidebar && (!te.disabled || !te.hideDisabledItem)) {
|
|
828
828
|
let Me = !1;
|
|
829
|
-
|
|
829
|
+
te.group || (te.group = {
|
|
830
830
|
icon: x || /* @__PURE__ */ r(YA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
831
831
|
label: "Default",
|
|
832
832
|
name: "Default",
|
|
833
833
|
hint: "Default",
|
|
834
834
|
indexOrder: 0
|
|
835
|
-
}),
|
|
836
|
-
|
|
837
|
-
}), Me ||
|
|
838
|
-
name:
|
|
839
|
-
indexOrder:
|
|
835
|
+
}), pe.forEach((ve) => {
|
|
836
|
+
ve.name === te.group.name && (Me = !0);
|
|
837
|
+
}), Me || pe.add({
|
|
838
|
+
name: te.group.name,
|
|
839
|
+
indexOrder: te.group.indexOrder,
|
|
840
840
|
component: /* @__PURE__ */ r(
|
|
841
|
-
|
|
841
|
+
Te,
|
|
842
842
|
{
|
|
843
|
-
content:
|
|
844
|
-
label:
|
|
845
|
-
disabled:
|
|
846
|
-
children: /* @__PURE__ */
|
|
847
|
-
|
|
843
|
+
content: te.group.hint,
|
|
844
|
+
label: te.group.label,
|
|
845
|
+
disabled: g,
|
|
846
|
+
children: /* @__PURE__ */ E(
|
|
847
|
+
J,
|
|
848
848
|
{
|
|
849
849
|
gap: "2px",
|
|
850
850
|
style: {
|
|
@@ -858,83 +858,83 @@ function Bt({
|
|
|
858
858
|
Re,
|
|
859
859
|
{
|
|
860
860
|
size: "48px",
|
|
861
|
-
variant:
|
|
862
|
-
color:
|
|
861
|
+
variant: te.group.name === le ? "filled" : l ? "subtle" : "light",
|
|
862
|
+
color: te.group.name === le ? M : a,
|
|
863
863
|
onClick: () => {
|
|
864
|
-
|
|
864
|
+
q((ve) => (v && v(ve, te.group.name), te.group.name === ve && !d ? "" : te.group.name));
|
|
865
865
|
},
|
|
866
|
-
children:
|
|
866
|
+
children: te.group.icon
|
|
867
867
|
}
|
|
868
868
|
),
|
|
869
|
-
|
|
869
|
+
g ? /* @__PURE__ */ r(
|
|
870
870
|
we,
|
|
871
871
|
{
|
|
872
872
|
size: "xs",
|
|
873
|
-
c:
|
|
874
|
-
children:
|
|
873
|
+
c: y === "dark" ? c || p.colors[p.primaryColor][2] : h || p.colors[p.primaryColor][2],
|
|
874
|
+
children: te.group.label
|
|
875
875
|
}
|
|
876
876
|
) : !1
|
|
877
877
|
]
|
|
878
878
|
}
|
|
879
879
|
)
|
|
880
880
|
},
|
|
881
|
-
|
|
881
|
+
te.group.name
|
|
882
882
|
)
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
|
-
}),
|
|
886
|
-
const Me = e.filter((
|
|
887
|
-
|
|
888
|
-
}), [...
|
|
889
|
-
}, [e,
|
|
890
|
-
|
|
885
|
+
}), pe.forEach((te) => {
|
|
886
|
+
const Me = e.filter((ve) => ve.showInSidebar === !0 && (!ve.disabled || !ve.hideDisabledItem) && ve.group && ve.group.name === te.name);
|
|
887
|
+
te.links = Me.map((ve, Z) => PA(p, f, b, ve, Z, O, k.pathname, F, Q, L));
|
|
888
|
+
}), [...pe].sort((te, Me) => te.indexOrder - Me.indexOrder);
|
|
889
|
+
}, [e, le, y, f, V.selectedCompany, F, k]), X = Ft(
|
|
890
|
+
y,
|
|
891
891
|
p,
|
|
892
892
|
f,
|
|
893
893
|
35,
|
|
894
|
-
Number(
|
|
895
|
-
|
|
896
|
-
$,
|
|
897
|
-
G,
|
|
894
|
+
Number(de(n)),
|
|
895
|
+
N.length > 1,
|
|
898
896
|
O,
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
897
|
+
G,
|
|
898
|
+
$,
|
|
899
|
+
Q,
|
|
900
|
+
K
|
|
901
|
+
), ye = f || le === "" ? "0px" : `calc(${o} - ${t})`, Se = l || (y === "dark" ? p.colors[p.primaryColor][6] : p.colors[p.primaryColor][7]), U = C(() => {
|
|
902
|
+
R && N.map((pe) => pe.name).includes(R) ? q(R) : N.length > 1 && q("Default");
|
|
903
903
|
}, []);
|
|
904
|
-
|
|
904
|
+
re(() => {
|
|
905
905
|
U();
|
|
906
|
-
}, []),
|
|
907
|
-
f ?
|
|
906
|
+
}, []), re(() => {
|
|
907
|
+
f ? q("") : le === "" && U();
|
|
908
908
|
}, [f]);
|
|
909
|
-
const
|
|
909
|
+
const ae = () => H ? W || /* @__PURE__ */ r(
|
|
910
910
|
MA,
|
|
911
911
|
{
|
|
912
912
|
message: H,
|
|
913
|
-
backgroundColor:
|
|
913
|
+
backgroundColor: $
|
|
914
914
|
}
|
|
915
|
-
) :
|
|
915
|
+
) : j ? _ || /* @__PURE__ */ r(
|
|
916
916
|
LA,
|
|
917
917
|
{
|
|
918
|
-
itemCount:
|
|
918
|
+
itemCount: he,
|
|
919
919
|
collapsed: f,
|
|
920
|
-
backgroundColor:
|
|
920
|
+
backgroundColor: $
|
|
921
921
|
}
|
|
922
|
-
) :
|
|
922
|
+
) : le !== "" ? /* @__PURE__ */ r(
|
|
923
923
|
ZA,
|
|
924
924
|
{
|
|
925
|
-
ref:
|
|
925
|
+
ref: w,
|
|
926
926
|
rootStyles: {
|
|
927
927
|
[`.${Ar.container}`]: {
|
|
928
|
-
background:
|
|
928
|
+
background: $,
|
|
929
929
|
overflowX: "hidden",
|
|
930
930
|
overflowY: "hidden",
|
|
931
931
|
left: 0,
|
|
932
|
-
height: `${
|
|
932
|
+
height: `${de(A)}px`
|
|
933
933
|
}
|
|
934
934
|
},
|
|
935
|
-
style: { borderColor:
|
|
935
|
+
style: { borderColor: y === "dark" ? "#000" : "#efefef" },
|
|
936
936
|
collapsed: f,
|
|
937
|
-
width: `${
|
|
937
|
+
width: `${de(ye)}`,
|
|
938
938
|
collapsedWidth: "0px",
|
|
939
939
|
children: /* @__PURE__ */ r(
|
|
940
940
|
De,
|
|
@@ -943,77 +943,77 @@ function Bt({
|
|
|
943
943
|
overflowY: "auto",
|
|
944
944
|
overflowX: "hidden",
|
|
945
945
|
height: "100%",
|
|
946
|
-
width:
|
|
946
|
+
width: ye
|
|
947
947
|
},
|
|
948
|
-
children: /* @__PURE__ */ r(er, { rootStyles: { background:
|
|
948
|
+
children: /* @__PURE__ */ r(er, { rootStyles: { background: $ }, menuItemStyles: X, closeOnClick: !0, children: N.find((pe) => pe.name === le)?.links || null })
|
|
949
949
|
}
|
|
950
950
|
)
|
|
951
951
|
}
|
|
952
|
-
) : null, Ee = () =>
|
|
952
|
+
) : null, Ee = () => j && N.length === 0 ? /* @__PURE__ */ r(
|
|
953
953
|
Vt,
|
|
954
954
|
{
|
|
955
|
-
groupCount:
|
|
955
|
+
groupCount: me,
|
|
956
956
|
width: t,
|
|
957
957
|
height: A
|
|
958
958
|
}
|
|
959
|
-
) :
|
|
960
|
-
|
|
959
|
+
) : N.length !== 0 ? /* @__PURE__ */ r(
|
|
960
|
+
J,
|
|
961
961
|
{
|
|
962
962
|
gap: "4px",
|
|
963
963
|
style: {
|
|
964
964
|
height: A,
|
|
965
965
|
width: t,
|
|
966
966
|
padding: "4px",
|
|
967
|
-
backgroundColor:
|
|
967
|
+
backgroundColor: Se
|
|
968
968
|
},
|
|
969
|
-
children:
|
|
969
|
+
children: N.map((pe) => /* @__PURE__ */ r(Ce.Fragment, { children: pe.component }, pe.name))
|
|
970
970
|
}
|
|
971
|
-
) : null, Le = () => H ?
|
|
971
|
+
) : null, Le = () => H ? W || /* @__PURE__ */ r(
|
|
972
972
|
MA,
|
|
973
973
|
{
|
|
974
974
|
message: H,
|
|
975
|
-
backgroundColor:
|
|
975
|
+
backgroundColor: $
|
|
976
976
|
}
|
|
977
|
-
) :
|
|
977
|
+
) : j ? _ || /* @__PURE__ */ r(
|
|
978
978
|
LA,
|
|
979
979
|
{
|
|
980
|
-
itemCount:
|
|
980
|
+
itemCount: he,
|
|
981
981
|
collapsed: f,
|
|
982
|
-
backgroundColor:
|
|
982
|
+
backgroundColor: $
|
|
983
983
|
}
|
|
984
984
|
) : e.map(
|
|
985
|
-
(
|
|
985
|
+
(pe, Oe) => PA(p, f, b, pe, Oe, O, k.pathname, F, Q, L)
|
|
986
986
|
);
|
|
987
|
-
return /* @__PURE__ */ r(
|
|
988
|
-
|
|
987
|
+
return /* @__PURE__ */ r(xe, { children: N.length == 1 ? Gt(
|
|
988
|
+
w,
|
|
989
989
|
f,
|
|
990
990
|
o,
|
|
991
991
|
n,
|
|
992
|
-
|
|
992
|
+
X,
|
|
993
993
|
Le(),
|
|
994
994
|
d,
|
|
995
995
|
A,
|
|
996
996
|
Y,
|
|
997
997
|
u,
|
|
998
|
-
|
|
999
|
-
) : /* @__PURE__ */
|
|
998
|
+
$
|
|
999
|
+
) : /* @__PURE__ */ E(Ve, { direction: "column", w: f ? n : o, children: [
|
|
1000
1000
|
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: Y }),
|
|
1001
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ E(Pr, { withBorder: m, h: A, w: "100%", display: "flex", children: [
|
|
1002
1002
|
Ee(),
|
|
1003
|
-
|
|
1003
|
+
ae()
|
|
1004
1004
|
] }),
|
|
1005
1005
|
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: u })
|
|
1006
1006
|
] }) });
|
|
1007
1007
|
}
|
|
1008
1008
|
const fA = Pe(null);
|
|
1009
1009
|
function gA() {
|
|
1010
|
-
const e =
|
|
1010
|
+
const e = be(fA);
|
|
1011
1011
|
if (!e)
|
|
1012
1012
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
1013
1013
|
return e;
|
|
1014
1014
|
}
|
|
1015
1015
|
function wn() {
|
|
1016
|
-
return
|
|
1016
|
+
return be(fA);
|
|
1017
1017
|
}
|
|
1018
1018
|
function bA({
|
|
1019
1019
|
children: e,
|
|
@@ -1029,90 +1029,90 @@ function bA({
|
|
|
1029
1029
|
highlightActiveItem: u = !0,
|
|
1030
1030
|
onMenuItemClick: c
|
|
1031
1031
|
}) {
|
|
1032
|
-
const h = He(), f = Be(), [
|
|
1032
|
+
const h = He(), f = Be(), [b, v] = oA({
|
|
1033
1033
|
value: n,
|
|
1034
1034
|
defaultValue: A,
|
|
1035
1035
|
finalValue: !1,
|
|
1036
1036
|
onChange: s
|
|
1037
|
-
}), [
|
|
1037
|
+
}), [m, g] = oA({
|
|
1038
1038
|
value: l,
|
|
1039
1039
|
defaultValue: a,
|
|
1040
1040
|
finalValue: "",
|
|
1041
1041
|
onChange: d
|
|
1042
|
-
}), [p,
|
|
1043
|
-
const
|
|
1044
|
-
return t.forEach((I,
|
|
1045
|
-
I.initiallyOpened && I.links && I.links.length > 0 &&
|
|
1046
|
-
}),
|
|
1047
|
-
}), Y = h.pathname,
|
|
1048
|
-
v(!
|
|
1049
|
-
}, [
|
|
1050
|
-
|
|
1051
|
-
const
|
|
1052
|
-
return
|
|
1042
|
+
}), [p, w] = fe(""), [x, R] = fe(() => {
|
|
1043
|
+
const P = /* @__PURE__ */ new Set();
|
|
1044
|
+
return t.forEach((I, L) => {
|
|
1045
|
+
I.initiallyOpened && I.links && I.links.length > 0 && P.add(`group-${L}`);
|
|
1046
|
+
}), P;
|
|
1047
|
+
}), Y = h.pathname, O = C(() => {
|
|
1048
|
+
v(!b);
|
|
1049
|
+
}, [b, v]), G = C((P) => {
|
|
1050
|
+
R((I) => {
|
|
1051
|
+
const L = new Set(I);
|
|
1052
|
+
return L.has(P) ? L.delete(P) : L.add(P), L;
|
|
1053
1053
|
});
|
|
1054
|
-
}, []),
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1054
|
+
}, []), F = C((P) => {
|
|
1055
|
+
R((I) => {
|
|
1056
|
+
const L = new Set(I);
|
|
1057
|
+
return L.add(P), L;
|
|
1058
1058
|
});
|
|
1059
|
-
}, []),
|
|
1060
|
-
|
|
1061
|
-
const
|
|
1062
|
-
return
|
|
1059
|
+
}, []), S = C((P) => {
|
|
1060
|
+
R((I) => {
|
|
1061
|
+
const L = new Set(I);
|
|
1062
|
+
return L.delete(P), L;
|
|
1063
1063
|
});
|
|
1064
|
-
}, []), T =
|
|
1064
|
+
}, []), T = ie(() => {
|
|
1065
1065
|
if (!p.trim())
|
|
1066
1066
|
return t;
|
|
1067
|
-
const
|
|
1068
|
-
const
|
|
1069
|
-
return (
|
|
1067
|
+
const P = p.toLowerCase().trim(), I = (L) => L.reduce((j, H) => {
|
|
1068
|
+
const _ = H.label.toLowerCase().includes(P), W = H.links ? I(H.links) : [];
|
|
1069
|
+
return (_ || W.length > 0) && j.push({
|
|
1070
1070
|
...H,
|
|
1071
|
-
links:
|
|
1071
|
+
links: W.length > 0 ? W : H.links,
|
|
1072
1072
|
// Expandir automaticamente quando há match em subitens
|
|
1073
|
-
initiallyOpened:
|
|
1074
|
-
}),
|
|
1073
|
+
initiallyOpened: W.length > 0 || _
|
|
1074
|
+
}), j;
|
|
1075
1075
|
}, []);
|
|
1076
1076
|
return I(t);
|
|
1077
|
-
}, [t, p]),
|
|
1078
|
-
(
|
|
1079
|
-
c && c(
|
|
1077
|
+
}, [t, p]), D = C(
|
|
1078
|
+
(P) => {
|
|
1079
|
+
c && c(P), P.link && (P.routeParams ? f(P.link, { state: P.routeParams }) : f(P.link)), P.redirect && f(P.redirect);
|
|
1080
1080
|
},
|
|
1081
1081
|
[f, c]
|
|
1082
|
-
), z =
|
|
1082
|
+
), z = ie(
|
|
1083
1083
|
() => ({
|
|
1084
|
-
collapsed:
|
|
1084
|
+
collapsed: b,
|
|
1085
1085
|
setCollapsed: v,
|
|
1086
|
-
toggleCollapsed:
|
|
1087
|
-
activeGroup:
|
|
1088
|
-
setActiveGroup:
|
|
1086
|
+
toggleCollapsed: O,
|
|
1087
|
+
activeGroup: m,
|
|
1088
|
+
setActiveGroup: g,
|
|
1089
1089
|
activeItemPath: Y,
|
|
1090
|
-
navigateToItem:
|
|
1090
|
+
navigateToItem: D,
|
|
1091
1091
|
searchQuery: p,
|
|
1092
|
-
setSearchQuery:
|
|
1092
|
+
setSearchQuery: w,
|
|
1093
1093
|
filteredItems: T,
|
|
1094
1094
|
expandedGroups: x,
|
|
1095
1095
|
toggleGroup: G,
|
|
1096
|
-
expandGroup:
|
|
1097
|
-
collapseGroup:
|
|
1096
|
+
expandGroup: F,
|
|
1097
|
+
collapseGroup: S,
|
|
1098
1098
|
variant: o,
|
|
1099
1099
|
showKeyboardShortcuts: i,
|
|
1100
1100
|
highlightActiveItem: u
|
|
1101
1101
|
}),
|
|
1102
1102
|
[
|
|
1103
|
-
m,
|
|
1104
|
-
v,
|
|
1105
|
-
$,
|
|
1106
|
-
y,
|
|
1107
1103
|
b,
|
|
1104
|
+
v,
|
|
1105
|
+
O,
|
|
1106
|
+
m,
|
|
1107
|
+
g,
|
|
1108
1108
|
Y,
|
|
1109
|
-
|
|
1109
|
+
D,
|
|
1110
1110
|
p,
|
|
1111
1111
|
T,
|
|
1112
1112
|
x,
|
|
1113
1113
|
G,
|
|
1114
|
-
|
|
1115
|
-
|
|
1114
|
+
F,
|
|
1115
|
+
S,
|
|
1116
1116
|
o,
|
|
1117
1117
|
i,
|
|
1118
1118
|
u
|
|
@@ -1124,7 +1124,7 @@ function mA({
|
|
|
1124
1124
|
navigationData: e,
|
|
1125
1125
|
onMenuItemClick: t
|
|
1126
1126
|
}) {
|
|
1127
|
-
const o = He(), A = Be(), n = o.pathname, s =
|
|
1127
|
+
const o = He(), A = Be(), n = o.pathname, s = C(
|
|
1128
1128
|
(c) => {
|
|
1129
1129
|
for (const h of c) {
|
|
1130
1130
|
if (h.link === n)
|
|
@@ -1138,25 +1138,25 @@ function mA({
|
|
|
1138
1138
|
return null;
|
|
1139
1139
|
},
|
|
1140
1140
|
[n]
|
|
1141
|
-
), a =
|
|
1141
|
+
), a = ie(() => s(e), [s, e]), l = C(
|
|
1142
1142
|
(c) => c.link === n,
|
|
1143
1143
|
[n]
|
|
1144
|
-
), d =
|
|
1144
|
+
), d = C(
|
|
1145
1145
|
(c) => c.link === n ? !0 : c.links ? c.links.some((h) => d(h)) : !1,
|
|
1146
1146
|
[n]
|
|
1147
|
-
), i =
|
|
1148
|
-
const c = [], h = (f,
|
|
1147
|
+
), i = ie(() => {
|
|
1148
|
+
const c = [], h = (f, b) => {
|
|
1149
1149
|
for (const v of f) {
|
|
1150
|
-
const
|
|
1150
|
+
const m = [...b, v];
|
|
1151
1151
|
if (v.link === n)
|
|
1152
|
-
return c.push(...
|
|
1153
|
-
if (v.links && h(v.links,
|
|
1152
|
+
return c.push(...m), !0;
|
|
1153
|
+
if (v.links && h(v.links, m))
|
|
1154
1154
|
return !0;
|
|
1155
1155
|
}
|
|
1156
1156
|
return !1;
|
|
1157
1157
|
};
|
|
1158
1158
|
return h(e, []), c;
|
|
1159
|
-
}, [e, n]), u =
|
|
1159
|
+
}, [e, n]), u = C(
|
|
1160
1160
|
(c) => {
|
|
1161
1161
|
(typeof c.disabled == "function" ? c.disabled() : c.disabled) || (t && t(c), c.link && (c.routeParams ? A(c.link, { state: c.routeParams }) : A(c.link)), c.redirect && A(c.redirect));
|
|
1162
1162
|
},
|
|
@@ -1175,17 +1175,17 @@ function Ht({
|
|
|
1175
1175
|
navigationData: e,
|
|
1176
1176
|
onSearch: t
|
|
1177
1177
|
}) {
|
|
1178
|
-
const [o, A] =
|
|
1178
|
+
const [o, A] = fe(""), n = C((i) => i.reduce((u, c) => {
|
|
1179
1179
|
let h = 1;
|
|
1180
1180
|
return c.links && (h += n(c.links)), u + h;
|
|
1181
|
-
}, 0), []), s =
|
|
1181
|
+
}, 0), []), s = ie(() => {
|
|
1182
1182
|
if (!o.trim())
|
|
1183
1183
|
return e;
|
|
1184
1184
|
const i = o.toLowerCase().trim(), u = (c) => c.reduce((h, f) => {
|
|
1185
1185
|
if (!f.showInSidebar)
|
|
1186
1186
|
return h;
|
|
1187
|
-
const
|
|
1188
|
-
return (
|
|
1187
|
+
const b = f.label.toLowerCase().includes(i), v = f.links ? u(f.links) : [];
|
|
1188
|
+
return (b || v.length > 0) && h.push({
|
|
1189
1189
|
...f,
|
|
1190
1190
|
links: v.length > 0 ? v : f.links,
|
|
1191
1191
|
// Expandir automaticamente grupos com match
|
|
@@ -1193,20 +1193,20 @@ function Ht({
|
|
|
1193
1193
|
}), h;
|
|
1194
1194
|
}, []);
|
|
1195
1195
|
return u(e);
|
|
1196
|
-
}, [e, o]), a =
|
|
1196
|
+
}, [e, o]), a = ie(() => o.trim() ? n(s) : n(e), [o, e, s, n]), l = C(
|
|
1197
1197
|
(i) => {
|
|
1198
1198
|
if (A(i), t) {
|
|
1199
1199
|
const u = i.toLowerCase().trim();
|
|
1200
1200
|
if (!u)
|
|
1201
1201
|
t(i, e);
|
|
1202
1202
|
else {
|
|
1203
|
-
const c = (h) => h.reduce((f,
|
|
1204
|
-
if (!
|
|
1203
|
+
const c = (h) => h.reduce((f, b) => {
|
|
1204
|
+
if (!b.showInSidebar)
|
|
1205
1205
|
return f;
|
|
1206
|
-
const v =
|
|
1207
|
-
return (v ||
|
|
1208
|
-
...
|
|
1209
|
-
links:
|
|
1206
|
+
const v = b.label.toLowerCase().includes(u), m = b.links ? c(b.links) : [];
|
|
1207
|
+
return (v || m.length > 0) && f.push({
|
|
1208
|
+
...b,
|
|
1209
|
+
links: m.length > 0 ? m : b.links,
|
|
1210
1210
|
initiallyOpened: !0
|
|
1211
1211
|
}), f;
|
|
1212
1212
|
}, []);
|
|
@@ -1215,7 +1215,7 @@ function Ht({
|
|
|
1215
1215
|
}
|
|
1216
1216
|
},
|
|
1217
1217
|
[e, t]
|
|
1218
|
-
), d =
|
|
1218
|
+
), d = C(() => {
|
|
1219
1219
|
l("");
|
|
1220
1220
|
}, [l]);
|
|
1221
1221
|
return {
|
|
@@ -1237,7 +1237,7 @@ function yA({
|
|
|
1237
1237
|
onToggleSidebar: o,
|
|
1238
1238
|
enabled: A = !0
|
|
1239
1239
|
}) {
|
|
1240
|
-
const n =
|
|
1240
|
+
const n = ie(() => {
|
|
1241
1241
|
const d = /* @__PURE__ */ new Map(), i = (u) => {
|
|
1242
1242
|
u.forEach((c) => {
|
|
1243
1243
|
const h = c;
|
|
@@ -1245,13 +1245,13 @@ function yA({
|
|
|
1245
1245
|
});
|
|
1246
1246
|
};
|
|
1247
1247
|
return i(e), d;
|
|
1248
|
-
}, [e]), s =
|
|
1248
|
+
}, [e]), s = C(
|
|
1249
1249
|
(d) => !!d.shortcut,
|
|
1250
1250
|
[]
|
|
1251
|
-
), a =
|
|
1251
|
+
), a = C(
|
|
1252
1252
|
(d) => d.shortcut,
|
|
1253
1253
|
[]
|
|
1254
|
-
), l =
|
|
1254
|
+
), l = ie(() => {
|
|
1255
1255
|
if (!A)
|
|
1256
1256
|
return [];
|
|
1257
1257
|
const d = [];
|
|
@@ -1282,19 +1282,19 @@ function ze({
|
|
|
1282
1282
|
hoverColor: l,
|
|
1283
1283
|
itemHeight: d = 40
|
|
1284
1284
|
}) {
|
|
1285
|
-
const i =
|
|
1286
|
-
if (
|
|
1285
|
+
const i = ge(), { colorScheme: u } = se(), c = e, [h, f] = fe(!1), b = s || "var(--mantine-color-text)", v = a || i.colors[i.primaryColor][6], m = l || i.colors[i.primaryColor][6], g = l ? `color-mix(in srgb, ${l} 80%, black)` : i.colors[i.primaryColor][8], p = h ? A ? g : m : A ? m : "transparent", w = h || A ? i.white : b, x = h || A ? i.white : v, R = typeof e.disabled == "function" ? e.disabled() : e.disabled;
|
|
1286
|
+
if (R && e.hideDisabledItem || !e.showInSidebar)
|
|
1287
1287
|
return null;
|
|
1288
|
-
const Y =
|
|
1289
|
-
!
|
|
1290
|
-
}, [
|
|
1288
|
+
const Y = C(() => {
|
|
1289
|
+
!R && n && n(e);
|
|
1290
|
+
}, [R, n, e]), O = ke.t(e.label), G = () => c.badge ? /* @__PURE__ */ r(dA, { size: "xs", color: c.badgeColor || "blue", variant: "filled", children: c.badge }) : null, F = () => c.shortcut ? /* @__PURE__ */ r(GA, { size: "xs", style: { marginLeft: "auto" }, children: c.shortcut }) : null;
|
|
1291
1291
|
if (e.links && e.links.length > 0) {
|
|
1292
|
-
const
|
|
1293
|
-
const
|
|
1294
|
-
return T.showInSidebar && (!
|
|
1292
|
+
const S = e.links.filter((T) => {
|
|
1293
|
+
const D = typeof T.disabled == "function" ? T.disabled() : T.disabled;
|
|
1294
|
+
return T.showInSidebar && (!D || !T.hideDisabledItem);
|
|
1295
1295
|
});
|
|
1296
|
-
return
|
|
1297
|
-
|
|
1296
|
+
return S.length === 0 && R && e.hideDisabledItem ? null : o ? /* @__PURE__ */ E(
|
|
1297
|
+
ne,
|
|
1298
1298
|
{
|
|
1299
1299
|
position: "right-start",
|
|
1300
1300
|
withArrow: !0,
|
|
@@ -1303,8 +1303,8 @@ function ze({
|
|
|
1303
1303
|
openDelay: 100,
|
|
1304
1304
|
closeDelay: 200,
|
|
1305
1305
|
children: [
|
|
1306
|
-
/* @__PURE__ */ r(
|
|
1307
|
-
|
|
1306
|
+
/* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ r(Ue, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(Te, { label: O, position: "right", withArrow: !0, children: /* @__PURE__ */ E(
|
|
1307
|
+
J,
|
|
1308
1308
|
{
|
|
1309
1309
|
gap: 1,
|
|
1310
1310
|
align: "center",
|
|
@@ -1337,25 +1337,25 @@ function ze({
|
|
|
1337
1337
|
textOverflow: "ellipsis",
|
|
1338
1338
|
whiteSpace: "nowrap"
|
|
1339
1339
|
},
|
|
1340
|
-
children:
|
|
1340
|
+
children: O
|
|
1341
1341
|
}
|
|
1342
1342
|
)
|
|
1343
1343
|
]
|
|
1344
1344
|
}
|
|
1345
1345
|
) }) }) }),
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */ r(
|
|
1348
|
-
|
|
1346
|
+
/* @__PURE__ */ E(ne.Dropdown, { children: [
|
|
1347
|
+
/* @__PURE__ */ r(ne.Label, { children: O }),
|
|
1348
|
+
S.map((T, D) => {
|
|
1349
1349
|
const z = typeof T.disabled == "function" ? T.disabled() : T.disabled;
|
|
1350
1350
|
return /* @__PURE__ */ r(
|
|
1351
|
-
|
|
1351
|
+
ne.Item,
|
|
1352
1352
|
{
|
|
1353
1353
|
leftSection: T.icon,
|
|
1354
1354
|
disabled: z,
|
|
1355
1355
|
onClick: () => n?.(T),
|
|
1356
|
-
children:
|
|
1356
|
+
children: ke.t(T.label)
|
|
1357
1357
|
},
|
|
1358
|
-
|
|
1358
|
+
D
|
|
1359
1359
|
);
|
|
1360
1360
|
})
|
|
1361
1361
|
] })
|
|
@@ -1364,9 +1364,9 @@ function ze({
|
|
|
1364
1364
|
) : /* @__PURE__ */ r(
|
|
1365
1365
|
TA,
|
|
1366
1366
|
{
|
|
1367
|
-
label:
|
|
1367
|
+
label: O,
|
|
1368
1368
|
leftSection: /* @__PURE__ */ r(B, { style: { color: x }, children: e.icon }),
|
|
1369
|
-
rightSection: /* @__PURE__ */
|
|
1369
|
+
rightSection: /* @__PURE__ */ E(B, { style: { display: "flex", alignItems: "center", gap: 4, color: w }, children: [
|
|
1370
1370
|
G(),
|
|
1371
1371
|
/* @__PURE__ */ r(
|
|
1372
1372
|
uA,
|
|
@@ -1380,7 +1380,7 @@ function ze({
|
|
|
1380
1380
|
] }),
|
|
1381
1381
|
childrenOffset: 28,
|
|
1382
1382
|
defaultOpened: e.initiallyOpened || A,
|
|
1383
|
-
disabled:
|
|
1383
|
+
disabled: R,
|
|
1384
1384
|
onMouseEnter: () => f(!0),
|
|
1385
1385
|
onMouseLeave: () => f(!1),
|
|
1386
1386
|
style: {
|
|
@@ -1393,13 +1393,13 @@ function ze({
|
|
|
1393
1393
|
borderRadius: 0
|
|
1394
1394
|
},
|
|
1395
1395
|
label: {
|
|
1396
|
-
color:
|
|
1396
|
+
color: w
|
|
1397
1397
|
},
|
|
1398
1398
|
children: {
|
|
1399
1399
|
paddingLeft: 0
|
|
1400
1400
|
}
|
|
1401
1401
|
},
|
|
1402
|
-
children:
|
|
1402
|
+
children: S.map((T, D) => /* @__PURE__ */ r(
|
|
1403
1403
|
ze,
|
|
1404
1404
|
{
|
|
1405
1405
|
item: T,
|
|
@@ -1412,15 +1412,15 @@ function ze({
|
|
|
1412
1412
|
hoverColor: l,
|
|
1413
1413
|
itemHeight: d
|
|
1414
1414
|
},
|
|
1415
|
-
|
|
1415
|
+
D
|
|
1416
1416
|
))
|
|
1417
1417
|
}
|
|
1418
1418
|
);
|
|
1419
1419
|
}
|
|
1420
1420
|
return o ? /* @__PURE__ */ r(
|
|
1421
|
-
|
|
1421
|
+
Te,
|
|
1422
1422
|
{
|
|
1423
|
-
label: c.tooltip ||
|
|
1423
|
+
label: c.tooltip || O,
|
|
1424
1424
|
position: "right",
|
|
1425
1425
|
withArrow: !0,
|
|
1426
1426
|
children: /* @__PURE__ */ r(
|
|
@@ -1428,20 +1428,20 @@ function ze({
|
|
|
1428
1428
|
{
|
|
1429
1429
|
style: {
|
|
1430
1430
|
width: "100%",
|
|
1431
|
-
cursor:
|
|
1432
|
-
opacity:
|
|
1433
|
-
backgroundColor: A ?
|
|
1431
|
+
cursor: R ? "not-allowed" : "pointer",
|
|
1432
|
+
opacity: R ? 0.5 : 1,
|
|
1433
|
+
backgroundColor: A ? m : "transparent",
|
|
1434
1434
|
transition: "background-color 150ms ease",
|
|
1435
1435
|
padding: "2px 0"
|
|
1436
1436
|
},
|
|
1437
1437
|
onClick: Y,
|
|
1438
|
-
onMouseEnter: (
|
|
1439
|
-
|
|
1438
|
+
onMouseEnter: (S) => {
|
|
1439
|
+
R || (S.currentTarget.style.backgroundColor = A ? g : m);
|
|
1440
1440
|
},
|
|
1441
|
-
onMouseLeave: (
|
|
1442
|
-
|
|
1441
|
+
onMouseLeave: (S) => {
|
|
1442
|
+
S.currentTarget.style.backgroundColor = A ? m : "transparent";
|
|
1443
1443
|
},
|
|
1444
|
-
children: /* @__PURE__ */
|
|
1444
|
+
children: /* @__PURE__ */ E(J, { gap: 1, align: "center", children: [
|
|
1445
1445
|
/* @__PURE__ */ r(B, { style: { color: A ? i.white : v }, children: e.icon }),
|
|
1446
1446
|
/* @__PURE__ */ r(
|
|
1447
1447
|
we,
|
|
@@ -1456,7 +1456,7 @@ function ze({
|
|
|
1456
1456
|
textOverflow: "ellipsis",
|
|
1457
1457
|
whiteSpace: "nowrap"
|
|
1458
1458
|
},
|
|
1459
|
-
children:
|
|
1459
|
+
children: O
|
|
1460
1460
|
}
|
|
1461
1461
|
)
|
|
1462
1462
|
] })
|
|
@@ -1466,14 +1466,14 @@ function ze({
|
|
|
1466
1466
|
) : /* @__PURE__ */ r(
|
|
1467
1467
|
TA,
|
|
1468
1468
|
{
|
|
1469
|
-
label:
|
|
1469
|
+
label: O,
|
|
1470
1470
|
leftSection: /* @__PURE__ */ r(B, { style: { color: x }, children: e.icon }),
|
|
1471
|
-
rightSection: /* @__PURE__ */
|
|
1471
|
+
rightSection: /* @__PURE__ */ E(B, { style: { display: "flex", alignItems: "center", gap: 4, color: w }, children: [
|
|
1472
1472
|
G(),
|
|
1473
|
-
|
|
1473
|
+
F()
|
|
1474
1474
|
] }),
|
|
1475
1475
|
active: A,
|
|
1476
|
-
disabled:
|
|
1476
|
+
disabled: R,
|
|
1477
1477
|
onClick: Y,
|
|
1478
1478
|
onMouseEnter: () => f(!0),
|
|
1479
1479
|
onMouseLeave: () => f(!1),
|
|
@@ -1488,7 +1488,7 @@ function ze({
|
|
|
1488
1488
|
borderRadius: 0
|
|
1489
1489
|
},
|
|
1490
1490
|
label: {
|
|
1491
|
-
color:
|
|
1491
|
+
color: w
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
@@ -1503,10 +1503,10 @@ function Yt({
|
|
|
1503
1503
|
onExpandedChange: s,
|
|
1504
1504
|
groupId: a
|
|
1505
1505
|
}) {
|
|
1506
|
-
const l =
|
|
1506
|
+
const l = ge(), { colorScheme: d } = se(), [i, u] = fe(A), c = n !== void 0, h = c ? n : i, f = C(() => {
|
|
1507
1507
|
c ? s?.(!h) : u((p) => !p);
|
|
1508
|
-
}, [c, h, s]),
|
|
1509
|
-
return /* @__PURE__ */
|
|
1508
|
+
}, [c, h, s]), b = d === "dark" ? l.colors.dark[6] : l.colors.gray[1], v = d === "dark" ? l.colors.dark[5] : l.colors.gray[2], m = d === "dark" ? l.colors.gray[4] : l.colors.gray[7], g = d === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
|
|
1509
|
+
return /* @__PURE__ */ E(B, { children: [
|
|
1510
1510
|
/* @__PURE__ */ r(
|
|
1511
1511
|
sA,
|
|
1512
1512
|
{
|
|
@@ -1515,7 +1515,7 @@ function Yt({
|
|
|
1515
1515
|
p: "xs",
|
|
1516
1516
|
style: {
|
|
1517
1517
|
borderRadius: l.radius.sm,
|
|
1518
|
-
backgroundColor:
|
|
1518
|
+
backgroundColor: b,
|
|
1519
1519
|
transition: "background-color 150ms ease"
|
|
1520
1520
|
},
|
|
1521
1521
|
styles: {
|
|
@@ -1525,16 +1525,16 @@ function Yt({
|
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
1527
|
},
|
|
1528
|
-
children: /* @__PURE__ */
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
t && /* @__PURE__ */ r(B, { style: { color:
|
|
1531
|
-
/* @__PURE__ */ r(we, { size: "sm", fw: 600, c:
|
|
1528
|
+
children: /* @__PURE__ */ E(Ie, { justify: "space-between", wrap: "nowrap", children: [
|
|
1529
|
+
/* @__PURE__ */ E(Ie, { gap: "xs", wrap: "nowrap", children: [
|
|
1530
|
+
t && /* @__PURE__ */ r(B, { style: { color: g }, children: t }),
|
|
1531
|
+
/* @__PURE__ */ r(we, { size: "sm", fw: 600, c: m, children: ke.t(e) })
|
|
1532
1532
|
] }),
|
|
1533
1533
|
/* @__PURE__ */ r(
|
|
1534
1534
|
Or,
|
|
1535
1535
|
{
|
|
1536
1536
|
size: 16,
|
|
1537
|
-
color:
|
|
1537
|
+
color: m,
|
|
1538
1538
|
style: {
|
|
1539
1539
|
transform: h ? "rotate(180deg)" : "rotate(0deg)",
|
|
1540
1540
|
transition: "transform 200ms ease"
|
|
@@ -1551,8 +1551,8 @@ function Sn({
|
|
|
1551
1551
|
label: e,
|
|
1552
1552
|
children: t
|
|
1553
1553
|
}) {
|
|
1554
|
-
const o =
|
|
1555
|
-
return /* @__PURE__ */
|
|
1554
|
+
const o = ge(), { colorScheme: A } = se(), n = A === "dark" ? o.colors.gray[5] : o.colors.gray[6];
|
|
1555
|
+
return /* @__PURE__ */ E(B, { children: [
|
|
1556
1556
|
/* @__PURE__ */ r(
|
|
1557
1557
|
we,
|
|
1558
1558
|
{
|
|
@@ -1563,7 +1563,7 @@ function Sn({
|
|
|
1563
1563
|
px: "sm",
|
|
1564
1564
|
py: "xs",
|
|
1565
1565
|
style: { letterSpacing: "0.5px" },
|
|
1566
|
-
children:
|
|
1566
|
+
children: ke.t(e)
|
|
1567
1567
|
}
|
|
1568
1568
|
),
|
|
1569
1569
|
t
|
|
@@ -1577,8 +1577,8 @@ function qt({
|
|
|
1577
1577
|
activeColor: n,
|
|
1578
1578
|
inactiveColor: s
|
|
1579
1579
|
}) {
|
|
1580
|
-
const a =
|
|
1581
|
-
|
|
1580
|
+
const a = ge(), { colorScheme: l } = se(), d = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], i = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], u = a.colors[a.primaryColor][2], f = /* @__PURE__ */ E(
|
|
1581
|
+
J,
|
|
1582
1582
|
{
|
|
1583
1583
|
gap: 2,
|
|
1584
1584
|
align: "center",
|
|
@@ -1615,7 +1615,7 @@ function qt({
|
|
|
1615
1615
|
]
|
|
1616
1616
|
}
|
|
1617
1617
|
);
|
|
1618
|
-
return A ? f : /* @__PURE__ */ r(
|
|
1618
|
+
return A ? f : /* @__PURE__ */ r(Te, { label: e.hint || e.label, position: "right", withArrow: !0, children: f });
|
|
1619
1619
|
}
|
|
1620
1620
|
function kn({
|
|
1621
1621
|
placeholder: e = "Buscar...",
|
|
@@ -1624,12 +1624,12 @@ function kn({
|
|
|
1624
1624
|
onClear: A,
|
|
1625
1625
|
collapsed: n = !1
|
|
1626
1626
|
}) {
|
|
1627
|
-
const s =
|
|
1627
|
+
const s = ge(), { colorScheme: a } = se(), l = C(
|
|
1628
1628
|
(u) => {
|
|
1629
1629
|
o?.(u.currentTarget.value);
|
|
1630
1630
|
},
|
|
1631
1631
|
[o]
|
|
1632
|
-
), d =
|
|
1632
|
+
), d = C(() => {
|
|
1633
1633
|
o?.(""), A?.();
|
|
1634
1634
|
}, [o, A]), i = t && t.length > 0;
|
|
1635
1635
|
return n ? /* @__PURE__ */ r(
|
|
@@ -1673,7 +1673,7 @@ function xn({
|
|
|
1673
1673
|
onClick: A,
|
|
1674
1674
|
collapsed: n = !1
|
|
1675
1675
|
}) {
|
|
1676
|
-
const s =
|
|
1676
|
+
const s = ge(), { colorScheme: a } = se(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], d = () => {
|
|
1677
1677
|
if (typeof o == "string")
|
|
1678
1678
|
return /* @__PURE__ */ r(nA, { src: o, radius: "xl", size: n ? "sm" : "md" });
|
|
1679
1679
|
if (o)
|
|
@@ -1681,7 +1681,7 @@ function xn({
|
|
|
1681
1681
|
const i = e ? e.split(" ").map((u) => u[0]).slice(0, 2).join("").toUpperCase() : "?";
|
|
1682
1682
|
return /* @__PURE__ */ r(nA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: i });
|
|
1683
1683
|
};
|
|
1684
|
-
return n ? /* @__PURE__ */ r(
|
|
1684
|
+
return n ? /* @__PURE__ */ r(Te, { label: e || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
|
|
1685
1685
|
sA,
|
|
1686
1686
|
{
|
|
1687
1687
|
onClick: A,
|
|
@@ -1719,9 +1719,9 @@ function xn({
|
|
|
1719
1719
|
}
|
|
1720
1720
|
}
|
|
1721
1721
|
},
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1722
|
+
children: /* @__PURE__ */ E(Ie, { wrap: "nowrap", children: [
|
|
1723
1723
|
d(),
|
|
1724
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ E(B, { style: { flex: 1, overflow: "hidden" }, children: [
|
|
1725
1725
|
e && /* @__PURE__ */ r(
|
|
1726
1726
|
we,
|
|
1727
1727
|
{
|
|
@@ -1794,13 +1794,13 @@ function vA({
|
|
|
1794
1794
|
showGroups: n = !0,
|
|
1795
1795
|
groupCount: s = 2
|
|
1796
1796
|
}) {
|
|
1797
|
-
const a =
|
|
1797
|
+
const a = ge(), { colorScheme: l } = se(), d = o || (l === "dark" ? a.colors.dark[7] : a.white);
|
|
1798
1798
|
if (t)
|
|
1799
|
-
return /* @__PURE__ */ r(
|
|
1800
|
-
const i = (c, h = !1) => Array.from({ length: c }).map((f,
|
|
1799
|
+
return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: e }).map((c, h) => /* @__PURE__ */ r(ue, { circle: !0, height: 32, width: 32 }, h)) });
|
|
1800
|
+
const i = (c, h = !1) => Array.from({ length: c }).map((f, b) => {
|
|
1801
1801
|
const v = 60 + Math.random() * 30;
|
|
1802
|
-
return /* @__PURE__ */
|
|
1803
|
-
|
|
1802
|
+
return /* @__PURE__ */ E(
|
|
1803
|
+
Ie,
|
|
1804
1804
|
{
|
|
1805
1805
|
gap: "sm",
|
|
1806
1806
|
p: "xs",
|
|
@@ -1809,22 +1809,22 @@ function vA({
|
|
|
1809
1809
|
height: A
|
|
1810
1810
|
},
|
|
1811
1811
|
children: [
|
|
1812
|
-
/* @__PURE__ */ r(
|
|
1813
|
-
/* @__PURE__ */ r(
|
|
1812
|
+
/* @__PURE__ */ r(ue, { circle: !0, height: 24, width: 24 }),
|
|
1813
|
+
/* @__PURE__ */ r(ue, { height: 14, width: `${v}%`, radius: "sm" })
|
|
1814
1814
|
]
|
|
1815
1815
|
},
|
|
1816
|
-
|
|
1816
|
+
b
|
|
1817
1817
|
);
|
|
1818
1818
|
});
|
|
1819
1819
|
if (!n)
|
|
1820
|
-
return /* @__PURE__ */ r(
|
|
1820
|
+
return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor: d }, children: i(e) });
|
|
1821
1821
|
const u = Math.ceil(e / s);
|
|
1822
|
-
return /* @__PURE__ */ r(
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */ r(
|
|
1825
|
-
/* @__PURE__ */ r(
|
|
1822
|
+
return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: s }).map((c, h) => /* @__PURE__ */ E(B, { children: [
|
|
1823
|
+
/* @__PURE__ */ E(Ie, { gap: "sm", p: "xs", children: [
|
|
1824
|
+
/* @__PURE__ */ r(ue, { circle: !0, height: 20, width: 20 }),
|
|
1825
|
+
/* @__PURE__ */ r(ue, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
|
|
1826
1826
|
] }),
|
|
1827
|
-
/* @__PURE__ */ r(
|
|
1827
|
+
/* @__PURE__ */ r(J, { gap: 2, mt: 4, children: i(
|
|
1828
1828
|
h === s - 1 ? e - h * u : u,
|
|
1829
1829
|
!0
|
|
1830
1830
|
) })
|
|
@@ -1835,9 +1835,9 @@ function jt({
|
|
|
1835
1835
|
width: t = 80,
|
|
1836
1836
|
backgroundColor: o
|
|
1837
1837
|
}) {
|
|
1838
|
-
const A =
|
|
1838
|
+
const A = ge(), { colorScheme: n } = se(), s = o || (n === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][6]);
|
|
1839
1839
|
return /* @__PURE__ */ r(
|
|
1840
|
-
|
|
1840
|
+
J,
|
|
1841
1841
|
{
|
|
1842
1842
|
gap: "sm",
|
|
1843
1843
|
p: "xs",
|
|
@@ -1847,9 +1847,9 @@ function jt({
|
|
|
1847
1847
|
backgroundColor: s,
|
|
1848
1848
|
height: "100%"
|
|
1849
1849
|
},
|
|
1850
|
-
children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */ r(
|
|
1852
|
-
/* @__PURE__ */ r(
|
|
1850
|
+
children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ E(J, { gap: 4, align: "center", children: [
|
|
1851
|
+
/* @__PURE__ */ r(ue, { circle: !0, height: 48, width: 48 }),
|
|
1852
|
+
/* @__PURE__ */ r(ue, { height: 10, width: 40, radius: "sm" })
|
|
1853
1853
|
] }, l))
|
|
1854
1854
|
}
|
|
1855
1855
|
);
|
|
@@ -1857,22 +1857,22 @@ function jt({
|
|
|
1857
1857
|
function En({
|
|
1858
1858
|
collapsed: e = !1
|
|
1859
1859
|
}) {
|
|
1860
|
-
return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(
|
|
1861
|
-
/* @__PURE__ */ r(
|
|
1862
|
-
/* @__PURE__ */
|
|
1863
|
-
/* @__PURE__ */ r(
|
|
1864
|
-
/* @__PURE__ */ r(
|
|
1860
|
+
return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(ue, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ E(Ie, { gap: "sm", p: "md", children: [
|
|
1861
|
+
/* @__PURE__ */ r(ue, { circle: !0, height: 40, width: 40 }),
|
|
1862
|
+
/* @__PURE__ */ E(J, { gap: 4, style: { flex: 1 }, children: [
|
|
1863
|
+
/* @__PURE__ */ r(ue, { height: 14, width: "70%", radius: "sm" }),
|
|
1864
|
+
/* @__PURE__ */ r(ue, { height: 10, width: "50%", radius: "sm" })
|
|
1865
1865
|
] })
|
|
1866
1866
|
] });
|
|
1867
1867
|
}
|
|
1868
1868
|
function Rn({
|
|
1869
1869
|
collapsed: e = !1
|
|
1870
1870
|
}) {
|
|
1871
|
-
return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(
|
|
1872
|
-
/* @__PURE__ */ r(
|
|
1873
|
-
/* @__PURE__ */
|
|
1874
|
-
/* @__PURE__ */ r(
|
|
1875
|
-
/* @__PURE__ */ r(
|
|
1871
|
+
return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(ue, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ E(Ie, { gap: "sm", p: "sm", children: [
|
|
1872
|
+
/* @__PURE__ */ r(ue, { circle: !0, height: 36, width: 36 }),
|
|
1873
|
+
/* @__PURE__ */ E(J, { gap: 4, style: { flex: 1 }, children: [
|
|
1874
|
+
/* @__PURE__ */ r(ue, { height: 12, width: "60%", radius: "sm" }),
|
|
1875
|
+
/* @__PURE__ */ r(ue, { height: 10, width: "80%", radius: "sm" })
|
|
1876
1876
|
] })
|
|
1877
1877
|
] });
|
|
1878
1878
|
}
|
|
@@ -1880,7 +1880,7 @@ function CA({
|
|
|
1880
1880
|
message: e,
|
|
1881
1881
|
backgroundColor: t
|
|
1882
1882
|
}) {
|
|
1883
|
-
const o =
|
|
1883
|
+
const o = ge(), { colorScheme: A } = se(), n = t || (A === "dark" ? o.colors.dark[7] : o.white), s = A === "dark" ? o.colors.red[4] : o.colors.red[6];
|
|
1884
1884
|
return /* @__PURE__ */ r(
|
|
1885
1885
|
B,
|
|
1886
1886
|
{
|
|
@@ -1924,123 +1924,123 @@ function Xt({
|
|
|
1924
1924
|
loadingError: c,
|
|
1925
1925
|
loadingComponent: h,
|
|
1926
1926
|
errorComponent: f,
|
|
1927
|
-
skeletonItemCount:
|
|
1927
|
+
skeletonItemCount: b = 8,
|
|
1928
1928
|
backgroundDarkColor: v,
|
|
1929
|
-
backgroundLightColor:
|
|
1930
|
-
textDarkColor:
|
|
1929
|
+
backgroundLightColor: m,
|
|
1930
|
+
textDarkColor: g,
|
|
1931
1931
|
textLightColor: p,
|
|
1932
|
-
iconDarkColor:
|
|
1932
|
+
iconDarkColor: w,
|
|
1933
1933
|
iconLightColor: x,
|
|
1934
|
-
activeColor:
|
|
1934
|
+
activeColor: R,
|
|
1935
1935
|
withBorder: Y = !0,
|
|
1936
|
-
withShadow:
|
|
1936
|
+
withShadow: O = !1,
|
|
1937
1937
|
highlightActiveItem: G = !0,
|
|
1938
|
-
onMenuItemClick:
|
|
1938
|
+
onMenuItemClick: F
|
|
1939
1939
|
}) {
|
|
1940
|
-
const
|
|
1940
|
+
const S = ge(), { colorScheme: T } = se(), { collapsed: D, toggleCollapsed: z } = gA(), P = T === "dark" ? v ?? S.colors.dark[7] : m ?? S.white, I = T === "dark" ? g ?? S.colors.gray[3] : p ?? S.colors.gray[7], L = T === "dark" ? w ?? S.colors[S.primaryColor][4] : x ?? S.colors[S.primaryColor][6], j = R ? S.colors[R]?.[6] ?? S.colors[S.primaryColor][6] : S.colors[S.primaryColor][6], {
|
|
1941
1941
|
query: H,
|
|
1942
|
-
setQuery:
|
|
1943
|
-
filteredItems:
|
|
1944
|
-
isSearching:
|
|
1945
|
-
clearSearch:
|
|
1942
|
+
setQuery: _,
|
|
1943
|
+
filteredItems: W,
|
|
1944
|
+
isSearching: he,
|
|
1945
|
+
clearSearch: me
|
|
1946
1946
|
} = Ht({
|
|
1947
1947
|
navigationData: e,
|
|
1948
1948
|
onSearch: a
|
|
1949
|
-
}), { navigateToItem:
|
|
1949
|
+
}), { navigateToItem: le, isItemActive: q, isItemOrChildActive: V } = mA({
|
|
1950
1950
|
navigationData: e,
|
|
1951
|
-
onMenuItemClick:
|
|
1951
|
+
onMenuItemClick: F
|
|
1952
1952
|
});
|
|
1953
1953
|
yA({
|
|
1954
1954
|
navigationData: e,
|
|
1955
|
-
navigateToItem:
|
|
1955
|
+
navigateToItem: le,
|
|
1956
1956
|
onToggleSidebar: z,
|
|
1957
1957
|
enabled: !0
|
|
1958
1958
|
});
|
|
1959
|
-
const
|
|
1960
|
-
const
|
|
1961
|
-
return
|
|
1962
|
-
if (!(!
|
|
1963
|
-
if (
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1959
|
+
const k = D ? o : t, y = ie(() => {
|
|
1960
|
+
const M = /* @__PURE__ */ new Map(), Q = [];
|
|
1961
|
+
return W.forEach((K) => {
|
|
1962
|
+
if (!(!K.showInSidebar || (typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem))
|
|
1963
|
+
if (K.category) {
|
|
1964
|
+
const X = M.get(K.category) || [];
|
|
1965
|
+
X.push(K), M.set(K.category, X);
|
|
1966
1966
|
} else
|
|
1967
|
-
|
|
1968
|
-
}), { groups:
|
|
1969
|
-
}, [
|
|
1967
|
+
Q.push(K);
|
|
1968
|
+
}), { groups: M, ungrouped: Q };
|
|
1969
|
+
}, [W]), $ = () => {
|
|
1970
1970
|
if (c)
|
|
1971
|
-
return f || /* @__PURE__ */ r(CA, { message: c, backgroundColor:
|
|
1971
|
+
return f || /* @__PURE__ */ r(CA, { message: c, backgroundColor: P });
|
|
1972
1972
|
if (u)
|
|
1973
1973
|
return h || /* @__PURE__ */ r(
|
|
1974
1974
|
vA,
|
|
1975
1975
|
{
|
|
1976
|
-
itemCount:
|
|
1977
|
-
collapsed:
|
|
1978
|
-
backgroundColor:
|
|
1979
|
-
showGroups: !
|
|
1976
|
+
itemCount: b,
|
|
1977
|
+
collapsed: D,
|
|
1978
|
+
backgroundColor: P,
|
|
1979
|
+
showGroups: !D
|
|
1980
1980
|
}
|
|
1981
1981
|
);
|
|
1982
|
-
const
|
|
1982
|
+
const M = () => y.ungrouped.map((K, N) => /* @__PURE__ */ r(
|
|
1983
1983
|
ze,
|
|
1984
1984
|
{
|
|
1985
|
-
item:
|
|
1986
|
-
collapsed:
|
|
1987
|
-
active: G &&
|
|
1988
|
-
onClick:
|
|
1985
|
+
item: K,
|
|
1986
|
+
collapsed: D,
|
|
1987
|
+
active: G && q(K),
|
|
1988
|
+
onClick: le,
|
|
1989
1989
|
textColor: I,
|
|
1990
|
-
iconColor:
|
|
1991
|
-
hoverColor:
|
|
1990
|
+
iconColor: L,
|
|
1991
|
+
hoverColor: j
|
|
1992
1992
|
},
|
|
1993
|
-
`item-${
|
|
1994
|
-
)),
|
|
1993
|
+
`item-${N}`
|
|
1994
|
+
)), Q = () => Array.from(y.groups.entries()).map(([N, X], ye) => /* @__PURE__ */ r(
|
|
1995
1995
|
Yt,
|
|
1996
1996
|
{
|
|
1997
|
-
label:
|
|
1998
|
-
groupId: `group-${
|
|
1997
|
+
label: N,
|
|
1998
|
+
groupId: `group-${ye}`,
|
|
1999
1999
|
defaultExpanded: !0,
|
|
2000
|
-
children:
|
|
2000
|
+
children: X.map((Se, U) => /* @__PURE__ */ r(
|
|
2001
2001
|
ze,
|
|
2002
2002
|
{
|
|
2003
|
-
item:
|
|
2004
|
-
collapsed:
|
|
2005
|
-
active: G &&
|
|
2006
|
-
onClick:
|
|
2003
|
+
item: Se,
|
|
2004
|
+
collapsed: D,
|
|
2005
|
+
active: G && q(Se),
|
|
2006
|
+
onClick: le,
|
|
2007
2007
|
textColor: I,
|
|
2008
|
-
iconColor:
|
|
2008
|
+
iconColor: L
|
|
2009
2009
|
},
|
|
2010
|
-
`group-${
|
|
2010
|
+
`group-${ye}-item-${U}`
|
|
2011
2011
|
))
|
|
2012
2012
|
},
|
|
2013
|
-
`group-${
|
|
2013
|
+
`group-${ye}`
|
|
2014
2014
|
));
|
|
2015
|
-
return
|
|
2016
|
-
|
|
2015
|
+
return D ? /* @__PURE__ */ E(J, { gap: 4, children: [
|
|
2016
|
+
y.ungrouped.map((K, N) => /* @__PURE__ */ r(
|
|
2017
2017
|
ze,
|
|
2018
2018
|
{
|
|
2019
|
-
item:
|
|
2019
|
+
item: K,
|
|
2020
2020
|
collapsed: !0,
|
|
2021
|
-
active: G &&
|
|
2022
|
-
onClick:
|
|
2021
|
+
active: G && q(K),
|
|
2022
|
+
onClick: le,
|
|
2023
2023
|
textColor: I,
|
|
2024
|
-
iconColor:
|
|
2024
|
+
iconColor: L
|
|
2025
2025
|
},
|
|
2026
|
-
`item-${
|
|
2026
|
+
`item-${N}`
|
|
2027
2027
|
)),
|
|
2028
|
-
Array.from(
|
|
2028
|
+
Array.from(y.groups.values()).flat().map((K, N) => /* @__PURE__ */ r(
|
|
2029
2029
|
ze,
|
|
2030
2030
|
{
|
|
2031
|
-
item:
|
|
2031
|
+
item: K,
|
|
2032
2032
|
collapsed: !0,
|
|
2033
|
-
active: G &&
|
|
2034
|
-
onClick:
|
|
2033
|
+
active: G && q(K),
|
|
2034
|
+
onClick: le,
|
|
2035
2035
|
textColor: I,
|
|
2036
|
-
iconColor:
|
|
2036
|
+
iconColor: L
|
|
2037
2037
|
},
|
|
2038
|
-
`grouped-item-${
|
|
2038
|
+
`grouped-item-${N}`
|
|
2039
2039
|
))
|
|
2040
|
-
] }) : /* @__PURE__ */
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2040
|
+
] }) : /* @__PURE__ */ E(J, { gap: "xs", children: [
|
|
2041
|
+
y.ungrouped.length > 0 && /* @__PURE__ */ r(J, { gap: 2, children: M() }),
|
|
2042
|
+
y.groups.size > 0 && y.ungrouped.length > 0 && /* @__PURE__ */ r(lA, { my: "xs" }),
|
|
2043
|
+
Q()
|
|
2044
2044
|
] });
|
|
2045
2045
|
};
|
|
2046
2046
|
return /* @__PURE__ */ r(
|
|
@@ -2050,39 +2050,39 @@ function Xt({
|
|
|
2050
2050
|
transition: "slide-right",
|
|
2051
2051
|
duration: 200,
|
|
2052
2052
|
timingFunction: "ease",
|
|
2053
|
-
children: (
|
|
2053
|
+
children: (M) => /* @__PURE__ */ E(
|
|
2054
2054
|
B,
|
|
2055
2055
|
{
|
|
2056
2056
|
style: {
|
|
2057
|
-
...
|
|
2058
|
-
width:
|
|
2059
|
-
height: typeof A == "number" ?
|
|
2060
|
-
minHeight: typeof A == "number" ?
|
|
2061
|
-
backgroundColor:
|
|
2057
|
+
...M,
|
|
2058
|
+
width: de(k),
|
|
2059
|
+
height: typeof A == "number" ? de(A) : A,
|
|
2060
|
+
minHeight: typeof A == "number" ? de(A) : A,
|
|
2061
|
+
backgroundColor: P,
|
|
2062
2062
|
display: "flex",
|
|
2063
2063
|
flexDirection: "column",
|
|
2064
2064
|
overflow: "hidden",
|
|
2065
2065
|
transition: "width 200ms ease",
|
|
2066
|
-
borderRight: Y ? `1px solid ${T === "dark" ?
|
|
2067
|
-
boxShadow:
|
|
2066
|
+
borderRight: Y ? `1px solid ${T === "dark" ? S.colors.dark[5] : S.colors.gray[2]}` : void 0,
|
|
2067
|
+
boxShadow: O ? S.shadows.sm : void 0
|
|
2068
2068
|
},
|
|
2069
2069
|
children: [
|
|
2070
2070
|
l && /* @__PURE__ */ r(B, { style: { flexShrink: 0 }, children: l }),
|
|
2071
|
-
n && !
|
|
2071
|
+
n && !D && /* @__PURE__ */ r(B, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
|
|
2072
2072
|
VA,
|
|
2073
2073
|
{
|
|
2074
2074
|
placeholder: s,
|
|
2075
2075
|
leftSection: /* @__PURE__ */ r(Ye, { size: 16 }),
|
|
2076
|
-
rightSection:
|
|
2076
|
+
rightSection: he ? /* @__PURE__ */ r(
|
|
2077
2077
|
qA,
|
|
2078
2078
|
{
|
|
2079
2079
|
size: 16,
|
|
2080
2080
|
style: { cursor: "pointer" },
|
|
2081
|
-
onClick:
|
|
2081
|
+
onClick: me
|
|
2082
2082
|
}
|
|
2083
2083
|
) : null,
|
|
2084
2084
|
value: H,
|
|
2085
|
-
onChange: (
|
|
2085
|
+
onChange: (Q) => _(Q.currentTarget.value),
|
|
2086
2086
|
size: "sm"
|
|
2087
2087
|
}
|
|
2088
2088
|
) }),
|
|
@@ -2093,7 +2093,7 @@ function Xt({
|
|
|
2093
2093
|
scrollbarSize: 6,
|
|
2094
2094
|
type: "hover",
|
|
2095
2095
|
offsetScrollbars: !0,
|
|
2096
|
-
children: /* @__PURE__ */ r(B, { p: "xs", children:
|
|
2096
|
+
children: /* @__PURE__ */ r(B, { p: "xs", children: $() })
|
|
2097
2097
|
}
|
|
2098
2098
|
),
|
|
2099
2099
|
d && /* @__PURE__ */ r(
|
|
@@ -2102,8 +2102,8 @@ function Xt({
|
|
|
2102
2102
|
style: {
|
|
2103
2103
|
flexShrink: 0,
|
|
2104
2104
|
height: i,
|
|
2105
|
-
backgroundColor:
|
|
2106
|
-
borderTop: Y ? `1px solid ${T === "dark" ?
|
|
2105
|
+
backgroundColor: P,
|
|
2106
|
+
borderTop: Y ? `1px solid ${T === "dark" ? S.colors.dark[5] : S.colors.gray[2]}` : void 0
|
|
2107
2107
|
},
|
|
2108
2108
|
children: d
|
|
2109
2109
|
}
|
|
@@ -2146,18 +2146,18 @@ function _t({
|
|
|
2146
2146
|
iconColor: A,
|
|
2147
2147
|
activeColor: n
|
|
2148
2148
|
}) {
|
|
2149
|
-
|
|
2150
|
-
const { colorScheme: s } =
|
|
2149
|
+
ge();
|
|
2150
|
+
const { colorScheme: s } = se(), a = typeof e.disabled == "function" ? e.disabled() : e.disabled;
|
|
2151
2151
|
if (a && e.hideDisabledItem || !e.showInSidebar)
|
|
2152
2152
|
return null;
|
|
2153
|
-
const l =
|
|
2153
|
+
const l = ke.t(e.label);
|
|
2154
2154
|
if (e.links && e.links.length > 0) {
|
|
2155
2155
|
const d = e.links.filter((i) => {
|
|
2156
2156
|
const u = typeof i.disabled == "function" ? i.disabled() : i.disabled;
|
|
2157
2157
|
return i.showInSidebar && (!u || !i.hideDisabledItem);
|
|
2158
2158
|
});
|
|
2159
|
-
return d.length === 0 ? null : /* @__PURE__ */
|
|
2160
|
-
|
|
2159
|
+
return d.length === 0 ? null : /* @__PURE__ */ E(
|
|
2160
|
+
ne,
|
|
2161
2161
|
{
|
|
2162
2162
|
position: "right-start",
|
|
2163
2163
|
withArrow: !0,
|
|
@@ -2166,7 +2166,7 @@ function _t({
|
|
|
2166
2166
|
openDelay: 100,
|
|
2167
2167
|
closeDelay: 200,
|
|
2168
2168
|
children: [
|
|
2169
|
-
/* @__PURE__ */ r(
|
|
2169
|
+
/* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ r(Te, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ E(J, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2170
2170
|
/* @__PURE__ */ r(
|
|
2171
2171
|
Re,
|
|
2172
2172
|
{
|
|
@@ -2197,17 +2197,17 @@ function _t({
|
|
|
2197
2197
|
}
|
|
2198
2198
|
)
|
|
2199
2199
|
] }) }) }),
|
|
2200
|
-
/* @__PURE__ */
|
|
2201
|
-
/* @__PURE__ */ r(
|
|
2200
|
+
/* @__PURE__ */ E(ne.Dropdown, { children: [
|
|
2201
|
+
/* @__PURE__ */ r(ne.Label, { children: l }),
|
|
2202
2202
|
d.map((i, u) => {
|
|
2203
2203
|
const c = typeof i.disabled == "function" ? i.disabled() : i.disabled;
|
|
2204
2204
|
return /* @__PURE__ */ r(
|
|
2205
|
-
|
|
2205
|
+
ne.Item,
|
|
2206
2206
|
{
|
|
2207
2207
|
leftSection: i.icon,
|
|
2208
2208
|
disabled: c,
|
|
2209
2209
|
onClick: () => o(i),
|
|
2210
|
-
children:
|
|
2210
|
+
children: ke.t(i.label)
|
|
2211
2211
|
},
|
|
2212
2212
|
u
|
|
2213
2213
|
);
|
|
@@ -2217,7 +2217,7 @@ function _t({
|
|
|
2217
2217
|
}
|
|
2218
2218
|
);
|
|
2219
2219
|
}
|
|
2220
|
-
return /* @__PURE__ */ r(
|
|
2220
|
+
return /* @__PURE__ */ r(Te, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ E(J, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2221
2221
|
/* @__PURE__ */ r(
|
|
2222
2222
|
Re,
|
|
2223
2223
|
{
|
|
@@ -2265,53 +2265,53 @@ function Wt({
|
|
|
2265
2265
|
backgroundDarkColor: c,
|
|
2266
2266
|
backgroundLightColor: h,
|
|
2267
2267
|
iconDarkColor: f,
|
|
2268
|
-
iconLightColor:
|
|
2268
|
+
iconLightColor: b,
|
|
2269
2269
|
activeColor: v,
|
|
2270
|
-
withBorder:
|
|
2271
|
-
withShadow:
|
|
2270
|
+
withBorder: m = !0,
|
|
2271
|
+
withShadow: g = !1,
|
|
2272
2272
|
highlightActiveItem: p = !0,
|
|
2273
|
-
onMenuItemClick:
|
|
2273
|
+
onMenuItemClick: w
|
|
2274
2274
|
}) {
|
|
2275
|
-
const x =
|
|
2275
|
+
const x = ge(), { colorScheme: R } = se(), { toggleCollapsed: Y } = gA(), O = R === "dark" ? c ?? x.colors.dark[7] : h ?? x.white, G = R === "dark" ? f ?? x.colors[x.primaryColor][4] : b ?? x.colors[x.primaryColor][6], F = v ?? x.primaryColor, { navigateToItem: S, isItemActive: T, isItemOrChildActive: D } = mA({
|
|
2276
2276
|
navigationData: e,
|
|
2277
|
-
onMenuItemClick:
|
|
2277
|
+
onMenuItemClick: w
|
|
2278
2278
|
});
|
|
2279
2279
|
yA({
|
|
2280
2280
|
navigationData: e,
|
|
2281
|
-
navigateToItem:
|
|
2281
|
+
navigateToItem: S,
|
|
2282
2282
|
onToggleSidebar: Y,
|
|
2283
2283
|
enabled: !0
|
|
2284
2284
|
});
|
|
2285
|
-
const z = e.filter((
|
|
2285
|
+
const z = e.filter((L) => !(!L.showInSidebar || (typeof L.disabled == "function" ? L.disabled() : L.disabled) && L.hideDisabledItem)), P = () => l ? i || /* @__PURE__ */ r(CA, { message: l, backgroundColor: O }) : a ? d || /* @__PURE__ */ r(
|
|
2286
2286
|
vA,
|
|
2287
2287
|
{
|
|
2288
2288
|
itemCount: u,
|
|
2289
2289
|
collapsed: !0,
|
|
2290
|
-
backgroundColor:
|
|
2290
|
+
backgroundColor: O
|
|
2291
2291
|
}
|
|
2292
|
-
) : /* @__PURE__ */ r(
|
|
2292
|
+
) : /* @__PURE__ */ r(J, { gap: 8, align: "center", children: z.map((L, j) => /* @__PURE__ */ r(
|
|
2293
2293
|
_t,
|
|
2294
2294
|
{
|
|
2295
|
-
item:
|
|
2296
|
-
active: p && (T(
|
|
2297
|
-
onClick:
|
|
2295
|
+
item: L,
|
|
2296
|
+
active: p && (T(L) || D(L)),
|
|
2297
|
+
onClick: S,
|
|
2298
2298
|
iconColor: G,
|
|
2299
|
-
activeColor:
|
|
2299
|
+
activeColor: F
|
|
2300
2300
|
},
|
|
2301
|
-
|
|
2302
|
-
)) }), I =
|
|
2303
|
-
return /* @__PURE__ */
|
|
2301
|
+
j
|
|
2302
|
+
)) }), I = R === "dark" ? x.colors.dark[5] : x.colors.gray[2];
|
|
2303
|
+
return /* @__PURE__ */ E(
|
|
2304
2304
|
B,
|
|
2305
2305
|
{
|
|
2306
2306
|
style: {
|
|
2307
|
-
width:
|
|
2308
|
-
height:
|
|
2309
|
-
backgroundColor:
|
|
2307
|
+
width: de(t),
|
|
2308
|
+
height: de(o),
|
|
2309
|
+
backgroundColor: O,
|
|
2310
2310
|
display: "flex",
|
|
2311
2311
|
flexDirection: "column",
|
|
2312
2312
|
overflow: "hidden",
|
|
2313
|
-
boxShadow:
|
|
2314
|
-
borderRight:
|
|
2313
|
+
boxShadow: g ? x.shadows.sm : void 0,
|
|
2314
|
+
borderRight: m ? `1px solid ${I}` : void 0
|
|
2315
2315
|
},
|
|
2316
2316
|
children: [
|
|
2317
2317
|
A && /* @__PURE__ */ r(
|
|
@@ -2333,10 +2333,10 @@ function Wt({
|
|
|
2333
2333
|
style: { flex: 1 },
|
|
2334
2334
|
scrollbarSize: 4,
|
|
2335
2335
|
type: "hover",
|
|
2336
|
-
children: /* @__PURE__ */ r(B, { p: "xs", children:
|
|
2336
|
+
children: /* @__PURE__ */ r(B, { p: "xs", children: P() })
|
|
2337
2337
|
}
|
|
2338
2338
|
),
|
|
2339
|
-
n && /* @__PURE__ */
|
|
2339
|
+
n && /* @__PURE__ */ E(xe, { children: [
|
|
2340
2340
|
/* @__PURE__ */ r(lA, {}),
|
|
2341
2341
|
/* @__PURE__ */ r(
|
|
2342
2342
|
B,
|
|
@@ -2396,71 +2396,71 @@ function eo({
|
|
|
2396
2396
|
loadingError: c,
|
|
2397
2397
|
loadingComponent: h,
|
|
2398
2398
|
errorComponent: f,
|
|
2399
|
-
skeletonItemCount:
|
|
2399
|
+
skeletonItemCount: b = 8,
|
|
2400
2400
|
skeletonGroupCount: v = 3,
|
|
2401
|
-
backgroundDarkColor:
|
|
2402
|
-
backgroundLightColor:
|
|
2401
|
+
backgroundDarkColor: m,
|
|
2402
|
+
backgroundLightColor: g,
|
|
2403
2403
|
textDarkColor: p,
|
|
2404
|
-
textLightColor:
|
|
2404
|
+
textLightColor: w,
|
|
2405
2405
|
iconDarkColor: x,
|
|
2406
|
-
iconLightColor:
|
|
2406
|
+
iconLightColor: R,
|
|
2407
2407
|
activeColor: Y,
|
|
2408
|
-
groupBackgroundColor:
|
|
2408
|
+
groupBackgroundColor: O,
|
|
2409
2409
|
selectedGroupColor: G,
|
|
2410
|
-
groupColor:
|
|
2411
|
-
groupLabelDarkColor:
|
|
2410
|
+
groupColor: F,
|
|
2411
|
+
groupLabelDarkColor: S,
|
|
2412
2412
|
groupLabelLightColor: T,
|
|
2413
|
-
withBorder:
|
|
2413
|
+
withBorder: D = !1,
|
|
2414
2414
|
highlightActiveItem: z = !0,
|
|
2415
|
-
onMenuItemClick:
|
|
2415
|
+
onMenuItemClick: P
|
|
2416
2416
|
}) {
|
|
2417
|
-
const I =
|
|
2418
|
-
collapsed:
|
|
2417
|
+
const I = ge(), { colorScheme: L } = se(), {
|
|
2418
|
+
collapsed: j,
|
|
2419
2419
|
toggleCollapsed: H,
|
|
2420
|
-
activeGroup:
|
|
2421
|
-
setActiveGroup:
|
|
2422
|
-
} = gA(),
|
|
2420
|
+
activeGroup: _,
|
|
2421
|
+
setActiveGroup: W
|
|
2422
|
+
} = gA(), he = L === "dark" ? m ?? I.colors.dark[7] : g ?? I.white, me = L === "dark" ? p ?? I.colors.gray[3] : w ?? I.colors.gray[7], le = L === "dark" ? x ?? I.colors[I.primaryColor][4] : R ?? I.colors[I.primaryColor][6], q = Y ? I.colors[Y]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], V = O || (L === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), k = G || (L === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: y, isItemActive: $ } = mA({
|
|
2423
2423
|
navigationData: e,
|
|
2424
|
-
onMenuItemClick:
|
|
2424
|
+
onMenuItemClick: P
|
|
2425
2425
|
});
|
|
2426
2426
|
yA({
|
|
2427
2427
|
navigationData: e,
|
|
2428
|
-
navigateToItem:
|
|
2428
|
+
navigateToItem: y,
|
|
2429
2429
|
onToggleSidebar: H,
|
|
2430
2430
|
enabled: !0
|
|
2431
2431
|
});
|
|
2432
|
-
const
|
|
2432
|
+
const M = ie(() => {
|
|
2433
2433
|
const U = /* @__PURE__ */ new Map();
|
|
2434
|
-
return e.forEach((
|
|
2435
|
-
if (!
|
|
2434
|
+
return e.forEach((ae) => {
|
|
2435
|
+
if (!ae.showInSidebar || (typeof ae.disabled == "function" ? ae.disabled() : ae.disabled) && ae.hideDisabledItem)
|
|
2436
2436
|
return;
|
|
2437
|
-
const Le =
|
|
2437
|
+
const Le = ae.group ?? {
|
|
2438
2438
|
icon: s ?? /* @__PURE__ */ r(YA, { size: "2.2rem", stroke: 1 }),
|
|
2439
2439
|
label: "Default",
|
|
2440
2440
|
name: "Default",
|
|
2441
2441
|
hint: "Default",
|
|
2442
2442
|
indexOrder: 0
|
|
2443
|
-
},
|
|
2444
|
-
|
|
2443
|
+
}, pe = U.get(Le.name);
|
|
2444
|
+
pe ? pe.items.push(ae) : U.set(Le.name, {
|
|
2445
2445
|
group: Le,
|
|
2446
|
-
items: [
|
|
2446
|
+
items: [ae]
|
|
2447
2447
|
});
|
|
2448
|
-
}), Array.from(U.values()).sort((
|
|
2448
|
+
}), Array.from(U.values()).sort((ae, Ee) => ae.group.indexOrder - Ee.group.indexOrder);
|
|
2449
2449
|
}, [e, s]);
|
|
2450
|
-
|
|
2451
|
-
!
|
|
2452
|
-
}, [
|
|
2453
|
-
const
|
|
2454
|
-
|
|
2455
|
-
}, [
|
|
2450
|
+
re(() => {
|
|
2451
|
+
!_ && M.length > 0 && W(M[0].group.name);
|
|
2452
|
+
}, [_, M, W]);
|
|
2453
|
+
const Q = ie(() => M.find((ae) => ae.group.name === _)?.items ?? [], [M, _]), K = C((U) => {
|
|
2454
|
+
j ? (H(), W(U)) : _ === U ? H() : W(U);
|
|
2455
|
+
}, [j, _, H, W]), N = j ? 0 : Number(de(t)) - Number(de(n)), X = () => u && M.length === 0 ? /* @__PURE__ */ r(
|
|
2456
2456
|
jt,
|
|
2457
2457
|
{
|
|
2458
2458
|
groupCount: v,
|
|
2459
2459
|
width: n,
|
|
2460
|
-
backgroundColor:
|
|
2460
|
+
backgroundColor: V
|
|
2461
2461
|
}
|
|
2462
|
-
) :
|
|
2463
|
-
|
|
2462
|
+
) : M.length <= 1 ? null : /* @__PURE__ */ r(
|
|
2463
|
+
J,
|
|
2464
2464
|
{
|
|
2465
2465
|
gap: 4,
|
|
2466
2466
|
p: 4,
|
|
@@ -2468,44 +2468,44 @@ function eo({
|
|
|
2468
2468
|
style: {
|
|
2469
2469
|
width: n,
|
|
2470
2470
|
height: "100%",
|
|
2471
|
-
backgroundColor:
|
|
2471
|
+
backgroundColor: V,
|
|
2472
2472
|
flexShrink: 0
|
|
2473
2473
|
},
|
|
2474
|
-
children:
|
|
2474
|
+
children: M.map((U) => /* @__PURE__ */ r(
|
|
2475
2475
|
qt,
|
|
2476
2476
|
{
|
|
2477
2477
|
group: U.group,
|
|
2478
|
-
active: U.group.name ===
|
|
2479
|
-
onClick: () =>
|
|
2478
|
+
active: U.group.name === _,
|
|
2479
|
+
onClick: () => K(U.group.name),
|
|
2480
2480
|
showLabel: a,
|
|
2481
|
-
activeColor:
|
|
2482
|
-
inactiveColor:
|
|
2481
|
+
activeColor: k,
|
|
2482
|
+
inactiveColor: F
|
|
2483
2483
|
},
|
|
2484
2484
|
U.group.name
|
|
2485
2485
|
))
|
|
2486
2486
|
}
|
|
2487
|
-
),
|
|
2487
|
+
), ye = () => c ? f || /* @__PURE__ */ r(CA, { message: c, backgroundColor: he }) : u ? h || /* @__PURE__ */ r(
|
|
2488
2488
|
vA,
|
|
2489
2489
|
{
|
|
2490
|
-
itemCount:
|
|
2490
|
+
itemCount: b,
|
|
2491
2491
|
collapsed: !1,
|
|
2492
|
-
backgroundColor:
|
|
2492
|
+
backgroundColor: he,
|
|
2493
2493
|
showGroups: !1
|
|
2494
2494
|
}
|
|
2495
|
-
) : /* @__PURE__ */ r(
|
|
2495
|
+
) : /* @__PURE__ */ r(J, { gap: 2, children: Q.map((U, ae) => /* @__PURE__ */ r(
|
|
2496
2496
|
ze,
|
|
2497
2497
|
{
|
|
2498
2498
|
item: U,
|
|
2499
2499
|
collapsed: !1,
|
|
2500
|
-
active: z &&
|
|
2501
|
-
onClick:
|
|
2502
|
-
textColor:
|
|
2503
|
-
iconColor:
|
|
2504
|
-
hoverColor:
|
|
2500
|
+
active: z && $(U),
|
|
2501
|
+
onClick: y,
|
|
2502
|
+
textColor: me,
|
|
2503
|
+
iconColor: le,
|
|
2504
|
+
hoverColor: q
|
|
2505
2505
|
},
|
|
2506
|
-
|
|
2507
|
-
)) }),
|
|
2508
|
-
return
|
|
2506
|
+
ae
|
|
2507
|
+
)) }), Se = L === "dark" ? I.colors.dark[5] : I.colors.gray[2];
|
|
2508
|
+
return M.length <= 1 ? /* @__PURE__ */ E(Ve, { direction: "column", w: j ? o : t, h: "100%", style: { backgroundColor: he }, children: [
|
|
2509
2509
|
l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2510
2510
|
/* @__PURE__ */ r(
|
|
2511
2511
|
B,
|
|
@@ -2513,31 +2513,31 @@ function eo({
|
|
|
2513
2513
|
style: {
|
|
2514
2514
|
flex: 1,
|
|
2515
2515
|
width: "100%",
|
|
2516
|
-
backgroundColor:
|
|
2516
|
+
backgroundColor: he,
|
|
2517
2517
|
display: "flex",
|
|
2518
2518
|
flexDirection: "column",
|
|
2519
2519
|
overflow: "hidden",
|
|
2520
|
-
borderRight:
|
|
2520
|
+
borderRight: D ? `1px solid ${Se}` : void 0
|
|
2521
2521
|
},
|
|
2522
|
-
children: /* @__PURE__ */ r(De, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children:
|
|
2522
|
+
children: /* @__PURE__ */ r(De, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: j ? /* @__PURE__ */ r(J, { gap: 8, align: "center", children: e.filter((U) => U.showInSidebar ? !((typeof U.disabled == "function" ? U.disabled() : U.disabled) && U.hideDisabledItem) : !1).map((U, ae) => /* @__PURE__ */ r(
|
|
2523
2523
|
ze,
|
|
2524
2524
|
{
|
|
2525
2525
|
item: U,
|
|
2526
2526
|
collapsed: !0,
|
|
2527
|
-
active: z &&
|
|
2528
|
-
onClick:
|
|
2529
|
-
textColor:
|
|
2530
|
-
iconColor:
|
|
2531
|
-
hoverColor:
|
|
2527
|
+
active: z && $(U),
|
|
2528
|
+
onClick: y,
|
|
2529
|
+
textColor: me,
|
|
2530
|
+
iconColor: le,
|
|
2531
|
+
hoverColor: q
|
|
2532
2532
|
},
|
|
2533
|
-
|
|
2534
|
-
)) }) :
|
|
2533
|
+
ae
|
|
2534
|
+
)) }) : ye() }) })
|
|
2535
2535
|
}
|
|
2536
2536
|
),
|
|
2537
|
-
d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor:
|
|
2538
|
-
] }) : /* @__PURE__ */
|
|
2537
|
+
d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: he, flexShrink: 0 }, children: d })
|
|
2538
|
+
] }) : /* @__PURE__ */ E(Ve, { direction: "column", w: j ? n : t, h: "100%", style: { backgroundColor: he }, children: [
|
|
2539
2539
|
l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2540
|
-
/* @__PURE__ */
|
|
2540
|
+
/* @__PURE__ */ E(
|
|
2541
2541
|
B,
|
|
2542
2542
|
{
|
|
2543
2543
|
style: {
|
|
@@ -2545,28 +2545,28 @@ function eo({
|
|
|
2545
2545
|
width: "100%",
|
|
2546
2546
|
display: "flex",
|
|
2547
2547
|
overflow: "hidden",
|
|
2548
|
-
borderRight:
|
|
2548
|
+
borderRight: D ? `1px solid ${Se}` : void 0
|
|
2549
2549
|
},
|
|
2550
2550
|
children: [
|
|
2551
|
-
|
|
2551
|
+
X(),
|
|
2552
2552
|
/* @__PURE__ */ r(
|
|
2553
2553
|
B,
|
|
2554
2554
|
{
|
|
2555
2555
|
style: {
|
|
2556
|
-
width:
|
|
2556
|
+
width: j ? 0 : N,
|
|
2557
2557
|
height: "100%",
|
|
2558
|
-
backgroundColor:
|
|
2558
|
+
backgroundColor: he,
|
|
2559
2559
|
overflow: "hidden",
|
|
2560
2560
|
transition: "width 200ms ease",
|
|
2561
|
-
borderLeft:
|
|
2561
|
+
borderLeft: M.length > 1 ? `1px solid ${L === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
|
|
2562
2562
|
},
|
|
2563
|
-
children: !
|
|
2563
|
+
children: !j && _ && /* @__PURE__ */ r(De, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: ye() }) })
|
|
2564
2564
|
}
|
|
2565
2565
|
)
|
|
2566
2566
|
]
|
|
2567
2567
|
}
|
|
2568
2568
|
),
|
|
2569
|
-
d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor:
|
|
2569
|
+
d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: he, flexShrink: 0 }, children: d })
|
|
2570
2570
|
] });
|
|
2571
2571
|
}
|
|
2572
2572
|
function Ao(e) {
|
|
@@ -2645,7 +2645,7 @@ function tA(e) {
|
|
|
2645
2645
|
}
|
|
2646
2646
|
var nr = Pe({ active: !1, refresh: () => {
|
|
2647
2647
|
}, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), to = KA(function(e) {
|
|
2648
|
-
let { children: t, active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = e, d =
|
|
2648
|
+
let { children: t, active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = e, d = ie(() => ({ active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, A, n, s, a, l]);
|
|
2649
2649
|
return r(nr.Provider, { value: d, children: t });
|
|
2650
2650
|
}), oo = to, sr = QA.Activity, no = sr ?? QA.Fragment, so = !!sr, lr = "keepalive-cache-div";
|
|
2651
2651
|
function ar(e) {
|
|
@@ -2670,14 +2670,14 @@ function lo(e, t, o) {
|
|
|
2670
2670
|
return o ? NA(o, e) : t ? !NA(t, e) : !0;
|
|
2671
2671
|
}
|
|
2672
2672
|
var ao = KA(function(e) {
|
|
2673
|
-
let { errorElement: t = FA, cacheNodeClassName: o, children: A, cacheKey: n, exclude: s, include: a, enableActivity: l } = e, { active: d, renderCount: i, destroy: u, transition: c, viewTransition: h, duration: f, containerDivRef:
|
|
2673
|
+
let { errorElement: t = FA, cacheNodeClassName: o, children: A, cacheKey: n, exclude: s, include: a, enableActivity: l } = e, { active: d, renderCount: i, destroy: u, transition: c, viewTransition: h, duration: f, containerDivRef: b } = e, v = Ae(!1);
|
|
2674
2674
|
v.current = v.current || d;
|
|
2675
|
-
let
|
|
2676
|
-
let
|
|
2677
|
-
return or(
|
|
2675
|
+
let m = ie(() => {
|
|
2676
|
+
let g = document.createElement("div");
|
|
2677
|
+
return or(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", i.toString()), g.className = lr + (o ? ` ${o}` : ""), g;
|
|
2678
2678
|
}, [i, o]);
|
|
2679
|
-
return
|
|
2680
|
-
let
|
|
2679
|
+
return re(() => {
|
|
2680
|
+
let g = lo(n, s, a), p = b.current;
|
|
2681
2681
|
if (!p) {
|
|
2682
2682
|
console.warn("keepalive: cache container not found");
|
|
2683
2683
|
return;
|
|
@@ -2685,90 +2685,90 @@ var ao = KA(function(e) {
|
|
|
2685
2685
|
if (c)
|
|
2686
2686
|
(async () => {
|
|
2687
2687
|
if (d) {
|
|
2688
|
-
let
|
|
2689
|
-
if (await DA(f - 40), cA(
|
|
2688
|
+
let w = OA(p, n);
|
|
2689
|
+
if (await DA(f - 40), cA(w), p.contains(m))
|
|
2690
2690
|
return;
|
|
2691
|
-
zA(p,
|
|
2691
|
+
zA(p, m);
|
|
2692
2692
|
} else
|
|
2693
|
-
|
|
2693
|
+
g || (await DA(f), u(n));
|
|
2694
2694
|
})();
|
|
2695
2695
|
else if (d) {
|
|
2696
|
-
let
|
|
2696
|
+
let w = () => {
|
|
2697
2697
|
let x = OA(p, n);
|
|
2698
|
-
cA(x), !p.contains(
|
|
2698
|
+
cA(x), !p.contains(m) && zA(p, m);
|
|
2699
2699
|
};
|
|
2700
|
-
h && document.startViewTransition ? document.startViewTransition(
|
|
2700
|
+
h && document.startViewTransition ? document.startViewTransition(w) : w();
|
|
2701
2701
|
} else
|
|
2702
|
-
|
|
2703
|
-
}, [d,
|
|
2702
|
+
g || u(n);
|
|
2703
|
+
}, [d, b, n, s, a]), v.current ? Ct(r(t, { children: so && l ? E(no, { mode: d ? "visible" : "hidden", children: [" ", A] }) : A }), m, n) : null;
|
|
2704
2704
|
}, (e, t) => e.active === t.active && e.renderCount === t.renderCount && e.children === t.children && e.exclude === t.exclude && e.include === t.include), io = ao, co = (e) => {
|
|
2705
2705
|
typeof AA < "u" && qe(AA) ? AA(e) : e();
|
|
2706
2706
|
}, uo = co;
|
|
2707
2707
|
function ir() {
|
|
2708
|
-
return
|
|
2708
|
+
return Ae(null);
|
|
2709
2709
|
}
|
|
2710
2710
|
function ho(e) {
|
|
2711
|
-
let { activeCacheKey: t, max: o = 10, exclude: A, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: i, transition: u = !1, viewTransition: c = !1, duration: h = 200, children: f, aliveRef:
|
|
2711
|
+
let { activeCacheKey: t, max: o = 10, exclude: A, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: i, transition: u = !1, viewTransition: c = !1, duration: h = 200, children: f, aliveRef: b, maxAliveTime: v = 0, enableActivity: m = !1 } = e, g = a || Ae(null), [p, w] = fe([]);
|
|
2712
2712
|
mr(() => {
|
|
2713
2713
|
wA(t) || uo(() => {
|
|
2714
|
-
|
|
2715
|
-
let
|
|
2716
|
-
if (
|
|
2717
|
-
return
|
|
2714
|
+
w((F) => {
|
|
2715
|
+
let S = Date.now();
|
|
2716
|
+
if (F.find((T) => T.cacheKey === t))
|
|
2717
|
+
return F.map((T) => {
|
|
2718
2718
|
if (T.cacheKey === t) {
|
|
2719
|
-
let
|
|
2719
|
+
let D = !1;
|
|
2720
2720
|
if (qe(s) && s(t), v) {
|
|
2721
2721
|
let z = T.lastActiveTime;
|
|
2722
2722
|
if (iA(v)) {
|
|
2723
|
-
let
|
|
2724
|
-
|
|
2723
|
+
let P = v.find((I) => tr(I.match) ? I.match.test(t) : I.match === t);
|
|
2724
|
+
P && (D = P && z + P.expire * 1e3 < S);
|
|
2725
2725
|
} else
|
|
2726
|
-
|
|
2726
|
+
D = z + v * 1e3 < S;
|
|
2727
2727
|
}
|
|
2728
|
-
return { ...T, ele: f, lastActiveTime:
|
|
2728
|
+
return { ...T, ele: f, lastActiveTime: S, renderCount: D ? T.renderCount + 1 : T.renderCount };
|
|
2729
2729
|
}
|
|
2730
2730
|
return T;
|
|
2731
2731
|
});
|
|
2732
|
-
if (qe(s) && s(t),
|
|
2733
|
-
let T =
|
|
2734
|
-
|
|
2732
|
+
if (qe(s) && s(t), F.length > o) {
|
|
2733
|
+
let T = F.reduce((D, z) => D.lastActiveTime < z.lastActiveTime ? D : z);
|
|
2734
|
+
F.splice(F.indexOf(T), 1);
|
|
2735
2735
|
}
|
|
2736
|
-
return [...
|
|
2736
|
+
return [...F, { cacheKey: t, lastActiveTime: S, ele: f, renderCount: 0 }];
|
|
2737
2737
|
});
|
|
2738
2738
|
});
|
|
2739
2739
|
}, [t, f]);
|
|
2740
|
-
let x =
|
|
2741
|
-
|
|
2742
|
-
let T =
|
|
2743
|
-
return
|
|
2740
|
+
let x = C((F) => {
|
|
2741
|
+
w((S) => {
|
|
2742
|
+
let T = F || t;
|
|
2743
|
+
return S.map((D) => D.cacheKey === T ? { ...D, renderCount: D.renderCount + 1 } : D);
|
|
2744
2744
|
});
|
|
2745
|
-
}, [
|
|
2746
|
-
let
|
|
2747
|
-
return new Promise((
|
|
2745
|
+
}, [w, t]), R = C((F) => {
|
|
2746
|
+
let S = F || t, T = iA(S) ? S : [S];
|
|
2747
|
+
return new Promise((D) => {
|
|
2748
2748
|
tA(() => {
|
|
2749
|
-
|
|
2749
|
+
w((z) => [...z.filter((P) => !T.includes(P.cacheKey))]), D();
|
|
2750
2750
|
});
|
|
2751
2751
|
});
|
|
2752
|
-
}, [
|
|
2752
|
+
}, [w, t]), Y = C(() => new Promise((F) => {
|
|
2753
2753
|
tA(() => {
|
|
2754
|
-
|
|
2754
|
+
w([]), F();
|
|
2755
2755
|
});
|
|
2756
|
-
}), [
|
|
2757
|
-
let
|
|
2756
|
+
}), [w]), O = C((F) => {
|
|
2757
|
+
let S = F || t;
|
|
2758
2758
|
return new Promise((T) => {
|
|
2759
2759
|
tA(() => {
|
|
2760
|
-
|
|
2760
|
+
w((D) => [...D.filter((z) => z.cacheKey === S)]), T();
|
|
2761
2761
|
});
|
|
2762
2762
|
});
|
|
2763
|
-
}, [t,
|
|
2764
|
-
return yr(
|
|
2765
|
-
let { cacheKey:
|
|
2766
|
-
return r(oo, { active: t ===
|
|
2763
|
+
}, [t, w]), G = C(() => p, [p]);
|
|
2764
|
+
return yr(b, () => ({ refresh: x, destroy: R, destroyAll: Y, destroyOther: O, getCacheNodes: G })), E(FA, { children: [r("div", { ref: g, className: d, style: { height: "100%" } }), p.map((F) => {
|
|
2765
|
+
let { cacheKey: S, ele: T, renderCount: D } = F;
|
|
2766
|
+
return r(oo, { active: t === S, refresh: x, destroy: R, destroyAll: Y, destroyOther: O, getCacheNodes: G, children: r(io, { destroy: R, include: n, exclude: A, transition: u, viewTransition: c, duration: h, renderCount: D, containerDivRef: g, errorElement: i, active: t === S, cacheNodeClassName: l, cacheKey: S, enableActivity: m, children: T }) }, `${S}-${D}`);
|
|
2767
2767
|
})] });
|
|
2768
2768
|
}
|
|
2769
|
-
var po = ho, fo = () =>
|
|
2769
|
+
var po = ho, fo = () => be(nr), cr = fo;
|
|
2770
2770
|
function go(e, t, o = !1, A) {
|
|
2771
|
-
let { active: n } = cr(), s =
|
|
2771
|
+
let { active: n } = cr(), s = Ae(!1);
|
|
2772
2772
|
A(() => {
|
|
2773
2773
|
if (!n)
|
|
2774
2774
|
return;
|
|
@@ -2783,20 +2783,20 @@ function go(e, t, o = !1, A) {
|
|
|
2783
2783
|
}, [n, ...t]);
|
|
2784
2784
|
}
|
|
2785
2785
|
var bo = go, mo = (e, t, o = !1) => {
|
|
2786
|
-
bo(e, t, o,
|
|
2786
|
+
bo(e, t, o, re);
|
|
2787
2787
|
}, yo = mo;
|
|
2788
2788
|
const dr = Pe({
|
|
2789
2789
|
isVisible: !0
|
|
2790
|
-
}), Pn = () =>
|
|
2791
|
-
const e = _A(), o =
|
|
2792
|
-
return
|
|
2790
|
+
}), Pn = () => be(dr), SA = Pe({ params: {} }), Ln = () => be(SA).params, Mn = () => {
|
|
2791
|
+
const e = _A(), o = be(SA).params;
|
|
2792
|
+
return ie(() => {
|
|
2793
2793
|
if (!e)
|
|
2794
2794
|
return !1;
|
|
2795
2795
|
const n = Object.keys(e);
|
|
2796
2796
|
return n.length === 0 ? !1 : n.some((s) => e[s] !== void 0);
|
|
2797
2797
|
}, [e]) ? e : o;
|
|
2798
|
-
}, je = Pe(null), vo = () =>
|
|
2799
|
-
const t = ir(), o =
|
|
2798
|
+
}, je = Pe(null), vo = () => be(je), Co = ({ children: e }) => {
|
|
2799
|
+
const t = ir(), o = ie(() => ({
|
|
2800
2800
|
requestUnregister: (A) => {
|
|
2801
2801
|
t.current?.destroy(A);
|
|
2802
2802
|
},
|
|
@@ -2813,21 +2813,21 @@ const dr = Pe({
|
|
|
2813
2813
|
}), [t]);
|
|
2814
2814
|
return /* @__PURE__ */ r(je.Provider, { value: o, children: /* @__PURE__ */ r(ur.Provider, { value: t, children: e }) });
|
|
2815
2815
|
}, ur = Pe(null), Xe = (e) => null, wo = (e) => e.includes(":"), So = (e, t) => wo(e) ? t : e, ko = ({ children: e }) => {
|
|
2816
|
-
const { active: t } = cr(), o = _A(), A =
|
|
2816
|
+
const { active: t } = cr(), o = _A(), A = Ae(o), [n, s] = fe(o);
|
|
2817
2817
|
return A.current = o, yo(() => {
|
|
2818
2818
|
s(A.current), requestAnimationFrame(() => {
|
|
2819
2819
|
window.dispatchEvent(new Event("resize"));
|
|
2820
2820
|
});
|
|
2821
|
-
}, []),
|
|
2821
|
+
}, []), re(() => {
|
|
2822
2822
|
t && s(A.current);
|
|
2823
2823
|
}, [t]), /* @__PURE__ */ r(dr.Provider, { value: { isVisible: t }, children: /* @__PURE__ */ r(SA.Provider, { value: { params: n }, children: e }) });
|
|
2824
|
-
}, xo = "__nokeep__:", hr =
|
|
2825
|
-
const A = _e(), n = ut(), s =
|
|
2824
|
+
}, xo = "__nokeep__:", hr = Ce.memo(({ keepAlivePaths: e, maxKeepAliveTabs: t, aliveRef: o }) => {
|
|
2825
|
+
const A = _e(), n = ut(), s = ie(() => {
|
|
2826
2826
|
const l = e.find(
|
|
2827
2827
|
(d) => ht({ path: d, end: !0 }, A.pathname)
|
|
2828
2828
|
);
|
|
2829
2829
|
return l ? So(l, A.pathname) : xo + A.pathname;
|
|
2830
|
-
}, [e, A.pathname]), a =
|
|
2830
|
+
}, [e, A.pathname]), a = ie(() => [/^__nokeep__:/], []);
|
|
2831
2831
|
return /* @__PURE__ */ r(
|
|
2832
2832
|
po,
|
|
2833
2833
|
{
|
|
@@ -2841,40 +2841,40 @@ const dr = Pe({
|
|
|
2841
2841
|
});
|
|
2842
2842
|
hr.displayName = "KeepAliveLayout";
|
|
2843
2843
|
const Io = ({ children: e, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
2844
|
-
const A = ir(), s =
|
|
2845
|
-
const f =
|
|
2846
|
-
if (
|
|
2847
|
-
const
|
|
2848
|
-
return `${
|
|
2844
|
+
const A = ir(), s = be(ur) || A, a = Ae(null), l = Ae(""), { keepAlivePaths: d, routeElements: i } = ie(() => {
|
|
2845
|
+
const f = Ce.Children.toArray(e), b = f.map((p) => {
|
|
2846
|
+
if (Ce.isValidElement(p)) {
|
|
2847
|
+
const w = p.props?.path || "", x = p.type === Xe;
|
|
2848
|
+
return `${w}:${x}`;
|
|
2849
2849
|
}
|
|
2850
2850
|
return "";
|
|
2851
2851
|
}).join("|");
|
|
2852
|
-
if (a.current && l.current ===
|
|
2852
|
+
if (a.current && l.current === b)
|
|
2853
2853
|
return a.current;
|
|
2854
|
-
l.current =
|
|
2855
|
-
const v = [],
|
|
2854
|
+
l.current = b;
|
|
2855
|
+
const v = [], m = [];
|
|
2856
2856
|
f.forEach((p) => {
|
|
2857
|
-
if (
|
|
2857
|
+
if (Ce.isValidElement(p))
|
|
2858
2858
|
if (p.type === Xe) {
|
|
2859
|
-
const
|
|
2860
|
-
|
|
2861
|
-
const x =
|
|
2862
|
-
|
|
2859
|
+
const w = p.props;
|
|
2860
|
+
w.path && v.push(w.path);
|
|
2861
|
+
const x = w.component, R = typeof x == "function" ? Ce.createElement(x) : x;
|
|
2862
|
+
m.push(
|
|
2863
2863
|
/* @__PURE__ */ r(
|
|
2864
2864
|
$e,
|
|
2865
2865
|
{
|
|
2866
|
-
path:
|
|
2867
|
-
element: /* @__PURE__ */ r(ko, { children:
|
|
2866
|
+
path: w.path,
|
|
2867
|
+
element: /* @__PURE__ */ r(ko, { children: R })
|
|
2868
2868
|
},
|
|
2869
|
-
|
|
2869
|
+
w.path || p.key
|
|
2870
2870
|
)
|
|
2871
2871
|
);
|
|
2872
2872
|
} else
|
|
2873
|
-
|
|
2873
|
+
m.push(p);
|
|
2874
2874
|
});
|
|
2875
|
-
const
|
|
2876
|
-
return a.current =
|
|
2877
|
-
}, [e]), u =
|
|
2875
|
+
const g = { keepAlivePaths: v, routeElements: m };
|
|
2876
|
+
return a.current = g, g;
|
|
2877
|
+
}, [e]), u = be(je), c = ie(() => ({
|
|
2878
2878
|
requestUnregister: (f) => {
|
|
2879
2879
|
s.current?.destroy(f);
|
|
2880
2880
|
},
|
|
@@ -2903,17 +2903,17 @@ const Io = ({ children: e, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2903
2903
|
done: () => {
|
|
2904
2904
|
},
|
|
2905
2905
|
isNavigating: !1
|
|
2906
|
-
}), fr = () =>
|
|
2906
|
+
}), fr = () => be(pr), To = 150;
|
|
2907
2907
|
function Eo({ children: e }) {
|
|
2908
|
-
const [t, o] =
|
|
2908
|
+
const [t, o] = fe(!1), A = Ae(null), n = Ae(0), s = C(() => {
|
|
2909
2909
|
A.current && clearTimeout(A.current), n.current = Date.now(), o(!0);
|
|
2910
|
-
}, []), a =
|
|
2910
|
+
}, []), a = C(() => {
|
|
2911
2911
|
const l = Date.now() - n.current, d = Math.max(0, To - l);
|
|
2912
2912
|
A.current = setTimeout(() => {
|
|
2913
2913
|
o(!1);
|
|
2914
2914
|
}, d);
|
|
2915
2915
|
}, []);
|
|
2916
|
-
return /* @__PURE__ */
|
|
2916
|
+
return /* @__PURE__ */ E(pr.Provider, { value: { start: s, done: a, isNavigating: t }, children: [
|
|
2917
2917
|
/* @__PURE__ */ r("div", { className: "archbase-nav-progress", "data-active": t, children: /* @__PURE__ */ r("div", { className: "archbase-nav-progress-bar" }) }),
|
|
2918
2918
|
e
|
|
2919
2919
|
] });
|
|
@@ -2957,170 +2957,170 @@ function Po({
|
|
|
2957
2957
|
sidebarDefaultGroupIcon: c,
|
|
2958
2958
|
sideBarHeaderHeight: h,
|
|
2959
2959
|
sideBarHeaderContent: f,
|
|
2960
|
-
selectedGroupColor:
|
|
2960
|
+
selectedGroupColor: b = "#132441",
|
|
2961
2961
|
groupColor: v = "white",
|
|
2962
|
-
backgroundGroupColor:
|
|
2963
|
-
groupLabelDarkColor:
|
|
2962
|
+
backgroundGroupColor: m = "#132441",
|
|
2963
|
+
groupLabelDarkColor: g = "white",
|
|
2964
2964
|
groupLabelLightColor: p = "white",
|
|
2965
|
-
headerColor:
|
|
2965
|
+
headerColor: w,
|
|
2966
2966
|
footerHeight: x,
|
|
2967
|
-
iconsWithBackground:
|
|
2967
|
+
iconsWithBackground: R,
|
|
2968
2968
|
menuItemHeight: Y,
|
|
2969
|
-
showSideBar:
|
|
2969
|
+
showSideBar: O = !0,
|
|
2970
2970
|
showHeader: G = !0,
|
|
2971
|
-
headerStyle:
|
|
2972
|
-
highlightActiveMenuItem:
|
|
2971
|
+
headerStyle: F = {},
|
|
2972
|
+
highlightActiveMenuItem: S = !0,
|
|
2973
2973
|
customRenderSidebar: T,
|
|
2974
|
-
showCollapsedButton:
|
|
2974
|
+
showCollapsedButton: D = !0,
|
|
2975
2975
|
sideBarBackgroundDarkColor: z,
|
|
2976
|
-
sideBarBackgroundLightColor:
|
|
2976
|
+
sideBarBackgroundLightColor: P,
|
|
2977
2977
|
sideBarTextDarkColor: I,
|
|
2978
|
-
sideBarTextLightColor:
|
|
2979
|
-
sideBarIconDarkColor:
|
|
2978
|
+
sideBarTextLightColor: L,
|
|
2979
|
+
sideBarIconDarkColor: j,
|
|
2980
2980
|
sideBarIconLightColor: H,
|
|
2981
|
-
sideBarCollapsedSubmenuWidth:
|
|
2982
|
-
sidebarActiveColor:
|
|
2983
|
-
maxKeepAliveTabs:
|
|
2984
|
-
sidebarVariant:
|
|
2985
|
-
sidebarShowSearch:
|
|
2981
|
+
sideBarCollapsedSubmenuWidth: _,
|
|
2982
|
+
sidebarActiveColor: W,
|
|
2983
|
+
maxKeepAliveTabs: he = 10,
|
|
2984
|
+
sidebarVariant: me = "legacy",
|
|
2985
|
+
sidebarShowSearch: le = !1
|
|
2986
2986
|
}) {
|
|
2987
|
-
const
|
|
2988
|
-
`(max-width: ${s ?
|
|
2989
|
-
),
|
|
2990
|
-
|
|
2991
|
-
},
|
|
2992
|
-
|
|
2993
|
-
},
|
|
2994
|
-
let
|
|
2995
|
-
return h && (
|
|
2996
|
-
},
|
|
2997
|
-
let
|
|
2998
|
-
return h && (
|
|
2999
|
-
},
|
|
3000
|
-
const
|
|
3001
|
-
return
|
|
3002
|
-
|
|
3003
|
-
Ne.keepAlive === !1 ?
|
|
2987
|
+
const q = ge(), V = be(We), { colorScheme: k } = se(), y = gt(), [$, M] = bt(), Q = ft(
|
|
2988
|
+
`(max-width: ${s ? de(s) : q.breakpoints.md})`
|
|
2989
|
+
), K = (Z) => {
|
|
2990
|
+
Z.link && (Z.routeParams ? y(Z.link, {}, Z.routeParams) : y(Z.link));
|
|
2991
|
+
}, N = (Z, ce) => {
|
|
2992
|
+
Z == ce && V.collapsed && V.setCollapsed(!1), V.setCollapsed(Z == ce);
|
|
2993
|
+
}, X = () => {
|
|
2994
|
+
let Z = 0, ce = 0;
|
|
2995
|
+
return h && (Z = Number(de(h))), a && (ce = Number(de(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${Z + ce}px)`;
|
|
2996
|
+
}, ye = () => {
|
|
2997
|
+
let Z = 0, ce = 0;
|
|
2998
|
+
return h && (Z = Number(de(h))), a && (ce = Number(de(a))), `calc(100vh - 28px - ${Z + ce}px)`;
|
|
2999
|
+
}, Se = ie(() => {
|
|
3000
|
+
const Z = [];
|
|
3001
|
+
return V.navigationData.forEach((ce, Qe) => {
|
|
3002
|
+
ce.links ? ce.links.forEach((Ne, xA) => {
|
|
3003
|
+
Ne.keepAlive === !1 ? Z.push(/* @__PURE__ */ r($e, { path: Ne.link, element: Ne.component }, `${Ne.link}_${xA}`)) : Z.push(
|
|
3004
3004
|
/* @__PURE__ */ r(Xe, { path: Ne.link, component: Ne.component }, `${Ne.link}_${xA}`)
|
|
3005
3005
|
);
|
|
3006
|
-
}) :
|
|
3007
|
-
/* @__PURE__ */ r($e, { path:
|
|
3008
|
-
) :
|
|
3009
|
-
/* @__PURE__ */ r(Xe, { path:
|
|
3006
|
+
}) : ce.keepAlive === !1 ? Z.push(
|
|
3007
|
+
/* @__PURE__ */ r($e, { path: ce.link, element: ce.component }, `${ce.link}_${Qe}`)
|
|
3008
|
+
) : Z.push(
|
|
3009
|
+
/* @__PURE__ */ r(Xe, { path: ce.link, component: ce.component }, `${ce.link}_${Qe}`)
|
|
3010
3010
|
);
|
|
3011
|
-
}),
|
|
3012
|
-
}, [
|
|
3013
|
-
|
|
3014
|
-
}, [
|
|
3015
|
-
|
|
3016
|
-
}, [
|
|
3017
|
-
|
|
3018
|
-
i && i(
|
|
3019
|
-
}, [
|
|
3020
|
-
d && d(
|
|
3021
|
-
}, [
|
|
3022
|
-
const Ee =
|
|
3011
|
+
}), Z;
|
|
3012
|
+
}, [V.navigationData, V.collapsed]), U = C(() => {
|
|
3013
|
+
V.setCollapsed(!V.collapsed);
|
|
3014
|
+
}, [V.setCollapsed, V.collapsed]), ae = C(() => {
|
|
3015
|
+
V.setHidden(!V.hidden);
|
|
3016
|
+
}, [V.setHidden, V.hidden]);
|
|
3017
|
+
re(() => {
|
|
3018
|
+
i && i(V.hidden);
|
|
3019
|
+
}, [V.hidden, ae]), re(() => {
|
|
3020
|
+
d && d(V.collapsed);
|
|
3021
|
+
}, [V.collapsed, d]);
|
|
3022
|
+
const Ee = me === "minimal" || V.collapsed ? n : A, Le = (Z, ce = !1) => T ? T({ width: A, height: Z, isHidden: Q }) : me === "legacy" ? /* @__PURE__ */ r(
|
|
3023
3023
|
Bt,
|
|
3024
3024
|
{
|
|
3025
|
-
navigationData:
|
|
3026
|
-
sidebarHeight:
|
|
3025
|
+
navigationData: V.navigationData,
|
|
3026
|
+
sidebarHeight: Z,
|
|
3027
3027
|
sidebarGroupWidth: n,
|
|
3028
3028
|
sidebarCollapsedWidth: n,
|
|
3029
|
-
selectedGroupColor:
|
|
3029
|
+
selectedGroupColor: b,
|
|
3030
3030
|
groupColor: v,
|
|
3031
|
-
backgroundGroupColor:
|
|
3032
|
-
groupLabelDarkColor:
|
|
3031
|
+
backgroundGroupColor: m,
|
|
3032
|
+
groupLabelDarkColor: g,
|
|
3033
3033
|
groupLabelLightColor: p,
|
|
3034
3034
|
showGroupLabels: !1,
|
|
3035
|
-
collapsed:
|
|
3035
|
+
collapsed: ce ? !1 : V.collapsed,
|
|
3036
3036
|
sidebarWidth: A,
|
|
3037
|
-
isHidden:
|
|
3038
|
-
onMenuItemClick:
|
|
3039
|
-
onClickActionIcon:
|
|
3037
|
+
isHidden: Q,
|
|
3038
|
+
onMenuItemClick: K,
|
|
3039
|
+
onClickActionIcon: N,
|
|
3040
3040
|
sideBarFooterHeight: a,
|
|
3041
3041
|
sideBarFooterContent: l,
|
|
3042
3042
|
sideBarHeaderContent: f,
|
|
3043
|
-
theme:
|
|
3044
|
-
sidebarRef:
|
|
3043
|
+
theme: q,
|
|
3044
|
+
sidebarRef: $,
|
|
3045
3045
|
defaultGroupIcon: c,
|
|
3046
3046
|
selectedGroupName: u,
|
|
3047
|
-
iconsWithBackground:
|
|
3047
|
+
iconsWithBackground: R,
|
|
3048
3048
|
menuItemHeight: Y,
|
|
3049
|
-
highlightActiveMenuItem:
|
|
3049
|
+
highlightActiveMenuItem: S,
|
|
3050
3050
|
backgroundDarkColor: z,
|
|
3051
|
-
backgroundLightColor:
|
|
3051
|
+
backgroundLightColor: P,
|
|
3052
3052
|
textDarkColor: I,
|
|
3053
|
-
textLightColor:
|
|
3054
|
-
iconDarkColor:
|
|
3053
|
+
textLightColor: L,
|
|
3054
|
+
iconDarkColor: j,
|
|
3055
3055
|
iconLightColor: H,
|
|
3056
|
-
collapsedSubmenuWidth:
|
|
3057
|
-
isLoading:
|
|
3058
|
-
loadingError:
|
|
3056
|
+
collapsedSubmenuWidth: _,
|
|
3057
|
+
isLoading: V.isLoadingPermissions,
|
|
3058
|
+
loadingError: V.permissionsError
|
|
3059
3059
|
}
|
|
3060
3060
|
) : /* @__PURE__ */ r(
|
|
3061
3061
|
ro,
|
|
3062
3062
|
{
|
|
3063
|
-
navigationData:
|
|
3064
|
-
variant:
|
|
3063
|
+
navigationData: V.navigationData,
|
|
3064
|
+
variant: me,
|
|
3065
3065
|
width: Ee,
|
|
3066
3066
|
collapsedWidth: n,
|
|
3067
|
-
height:
|
|
3067
|
+
height: Z,
|
|
3068
3068
|
groupColumnWidth: n,
|
|
3069
|
-
collapsed:
|
|
3070
|
-
onCollapsedChange: (Qe) =>
|
|
3069
|
+
collapsed: ce ? !1 : V.collapsed,
|
|
3070
|
+
onCollapsedChange: (Qe) => V.setCollapsed(Qe),
|
|
3071
3071
|
activeGroup: u,
|
|
3072
3072
|
onActiveGroupChange: (Qe) => {
|
|
3073
3073
|
},
|
|
3074
3074
|
defaultGroupIcon: c,
|
|
3075
3075
|
showGroupLabels: !1,
|
|
3076
|
-
onMenuItemClick:
|
|
3077
|
-
showSearch:
|
|
3076
|
+
onMenuItemClick: K,
|
|
3077
|
+
showSearch: le,
|
|
3078
3078
|
header: f,
|
|
3079
3079
|
footer: l,
|
|
3080
3080
|
footerHeight: a,
|
|
3081
|
-
isLoading:
|
|
3082
|
-
loadingError:
|
|
3083
|
-
theme:
|
|
3084
|
-
highlightActiveItem:
|
|
3081
|
+
isLoading: V.isLoadingPermissions,
|
|
3082
|
+
loadingError: V.permissionsError,
|
|
3083
|
+
theme: q,
|
|
3084
|
+
highlightActiveItem: S,
|
|
3085
3085
|
backgroundDarkColor: z,
|
|
3086
|
-
backgroundLightColor:
|
|
3086
|
+
backgroundLightColor: P,
|
|
3087
3087
|
textDarkColor: I,
|
|
3088
|
-
textLightColor:
|
|
3089
|
-
iconDarkColor:
|
|
3088
|
+
textLightColor: L,
|
|
3089
|
+
iconDarkColor: j,
|
|
3090
3090
|
iconLightColor: H,
|
|
3091
|
-
groupBackgroundColor:
|
|
3092
|
-
selectedGroupColor:
|
|
3091
|
+
groupBackgroundColor: m,
|
|
3092
|
+
selectedGroupColor: b,
|
|
3093
3093
|
groupColor: v,
|
|
3094
|
-
groupLabelDarkColor:
|
|
3094
|
+
groupLabelDarkColor: g,
|
|
3095
3095
|
groupLabelLightColor: p,
|
|
3096
|
-
activeColor:
|
|
3096
|
+
activeColor: W,
|
|
3097
3097
|
withBorder: !1,
|
|
3098
|
-
sidebarRef:
|
|
3098
|
+
sidebarRef: $
|
|
3099
3099
|
}
|
|
3100
|
-
),
|
|
3100
|
+
), pe = k === "dark" ? z ?? q.colors.dark[7] : P ?? q.white, Oe = me === "legacy", te = Oe ? void 0 : {
|
|
3101
3101
|
width: { base: Ee },
|
|
3102
3102
|
breakpoint: "sm",
|
|
3103
|
-
collapsed: { mobile:
|
|
3103
|
+
collapsed: { mobile: Q || !O, desktop: Q || !O }
|
|
3104
3104
|
}, Me = Oe ? {
|
|
3105
3105
|
main: {
|
|
3106
|
-
background:
|
|
3106
|
+
background: k === "dark" ? q.colors.dark[8] : q.colors.gray[0],
|
|
3107
3107
|
overflow: "hidden"
|
|
3108
3108
|
}
|
|
3109
3109
|
} : {
|
|
3110
3110
|
main: {
|
|
3111
|
-
background:
|
|
3111
|
+
background: k === "dark" ? q.colors.dark[8] : q.colors.gray[0],
|
|
3112
3112
|
overflow: "hidden"
|
|
3113
3113
|
},
|
|
3114
3114
|
navbar: {
|
|
3115
|
-
background:
|
|
3115
|
+
background: pe,
|
|
3116
3116
|
border: "none"
|
|
3117
3117
|
}
|
|
3118
|
-
},
|
|
3118
|
+
}, ve = Oe ? {
|
|
3119
3119
|
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
|
|
3120
|
-
width: `calc(100vw - var(--app-shell-padding) - calc(${
|
|
3120
|
+
width: `calc(100vw - var(--app-shell-padding) - calc(${Q ? "0px" : Ee} + 1rem))`,
|
|
3121
3121
|
marginTop: "0.5rem",
|
|
3122
|
-
marginLeft: `calc(${
|
|
3123
|
-
border: `1px solid ${
|
|
3122
|
+
marginLeft: `calc(${Q ? "0px" : Ee} + 0.5rem)`,
|
|
3123
|
+
border: `1px solid ${k === "dark" ? q.colors.dark[4] : "#e4e9ef"}`,
|
|
3124
3124
|
borderRadius: "4px",
|
|
3125
3125
|
overflow: "hidden"
|
|
3126
3126
|
} : {
|
|
@@ -3129,15 +3129,15 @@ function Po({
|
|
|
3129
3129
|
marginTop: "0.5rem",
|
|
3130
3130
|
marginLeft: "0.5rem",
|
|
3131
3131
|
marginRight: "0.5rem",
|
|
3132
|
-
border: `1px solid ${
|
|
3132
|
+
border: `1px solid ${k === "dark" ? q.colors.dark[4] : "#e4e9ef"}`,
|
|
3133
3133
|
borderRadius: "4px",
|
|
3134
3134
|
overflow: "hidden"
|
|
3135
3135
|
};
|
|
3136
|
-
return /* @__PURE__ */ r(Eo, { children: /* @__PURE__ */
|
|
3136
|
+
return /* @__PURE__ */ r(Eo, { children: /* @__PURE__ */ E(
|
|
3137
3137
|
Ke,
|
|
3138
3138
|
{
|
|
3139
3139
|
header: { height: "60px", collapsed: !G },
|
|
3140
|
-
navbar:
|
|
3140
|
+
navbar: te,
|
|
3141
3141
|
footer: { height: x || "0px" },
|
|
3142
3142
|
styles: Me,
|
|
3143
3143
|
children: [
|
|
@@ -3145,42 +3145,42 @@ function Po({
|
|
|
3145
3145
|
Ke.Header,
|
|
3146
3146
|
{
|
|
3147
3147
|
p: "xs",
|
|
3148
|
-
color:
|
|
3148
|
+
color: w,
|
|
3149
3149
|
display: "flex",
|
|
3150
3150
|
style: {
|
|
3151
3151
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
3152
3152
|
alignItems: "center",
|
|
3153
3153
|
borderBottom: "none",
|
|
3154
|
-
...
|
|
3154
|
+
...F
|
|
3155
3155
|
},
|
|
3156
3156
|
children: t
|
|
3157
3157
|
}
|
|
3158
3158
|
),
|
|
3159
|
-
!
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
!
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3159
|
+
!Q && O && /* @__PURE__ */ r(Ke.Navbar, { children: Le(X(), !1) }),
|
|
3160
|
+
/* @__PURE__ */ E(Ke.Main, { bg: k === "dark" ? q.colors.dark[8] : q.colors.gray[0], children: [
|
|
3161
|
+
!Q && D && Ro(
|
|
3162
|
+
k,
|
|
3163
|
+
q,
|
|
3164
|
+
V,
|
|
3165
3165
|
A,
|
|
3166
3166
|
n,
|
|
3167
3167
|
U
|
|
3168
3168
|
),
|
|
3169
|
-
/* @__PURE__ */ r(Co, { children: /* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ r(Co, { children: /* @__PURE__ */ E("div", { style: ve, children: [
|
|
3170
3170
|
e,
|
|
3171
|
-
/* @__PURE__ */ r(Lo, { maxKeepAliveTabs:
|
|
3171
|
+
/* @__PURE__ */ r(Lo, { maxKeepAliveTabs: he, routes: Se })
|
|
3172
3172
|
] }) }),
|
|
3173
|
-
|
|
3173
|
+
O && /* @__PURE__ */ r(
|
|
3174
3174
|
BA,
|
|
3175
3175
|
{
|
|
3176
|
-
opened:
|
|
3177
|
-
onClose:
|
|
3176
|
+
opened: V.hidden || !1,
|
|
3177
|
+
onClose: ae,
|
|
3178
3178
|
size: A,
|
|
3179
3179
|
padding: 0,
|
|
3180
3180
|
styles: {
|
|
3181
3181
|
header: { minHeight: "10px" }
|
|
3182
3182
|
},
|
|
3183
|
-
children: Le(
|
|
3183
|
+
children: Le(ye(), !0)
|
|
3184
3184
|
}
|
|
3185
3185
|
)
|
|
3186
3186
|
] }),
|
|
@@ -3196,7 +3196,7 @@ function Lo({ maxKeepAliveTabs: e, routes: t }) {
|
|
|
3196
3196
|
height: "calc(100% - 48px)",
|
|
3197
3197
|
opacity: o ? 0.6 : 1,
|
|
3198
3198
|
transition: "opacity 0.15s ease-out"
|
|
3199
|
-
}, children: /* @__PURE__ */
|
|
3199
|
+
}, children: /* @__PURE__ */ E(Io, { maxKeepAliveTabs: e, children: [
|
|
3200
3200
|
...t
|
|
3201
3201
|
] }) });
|
|
3202
3202
|
}
|
|
@@ -3215,41 +3215,41 @@ function Dn({
|
|
|
3215
3215
|
sideBarFooterHeight: c,
|
|
3216
3216
|
sideBarFooterContent: h,
|
|
3217
3217
|
onCollapsedSideBar: f,
|
|
3218
|
-
onHiddenSidebar:
|
|
3218
|
+
onHiddenSidebar: b,
|
|
3219
3219
|
sidebarDefaultGroupIcon: v,
|
|
3220
|
-
sidebarSelectedGroupName:
|
|
3221
|
-
sideBarHeaderHeight:
|
|
3220
|
+
sidebarSelectedGroupName: m,
|
|
3221
|
+
sideBarHeaderHeight: g,
|
|
3222
3222
|
sideBarHeaderContent: p,
|
|
3223
|
-
selectedGroupColor:
|
|
3223
|
+
selectedGroupColor: w = "#132441",
|
|
3224
3224
|
groupColor: x = "white",
|
|
3225
|
-
backgroundGroupColor:
|
|
3225
|
+
backgroundGroupColor: R = "#132441",
|
|
3226
3226
|
groupLabelDarkColor: Y = "white",
|
|
3227
|
-
groupLabelLightColor:
|
|
3227
|
+
groupLabelLightColor: O = "white",
|
|
3228
3228
|
headerColor: G,
|
|
3229
|
-
footerHeight:
|
|
3230
|
-
iconsWithBackground:
|
|
3229
|
+
footerHeight: F,
|
|
3230
|
+
iconsWithBackground: S,
|
|
3231
3231
|
menuItemHeight: T,
|
|
3232
|
-
showSideBar:
|
|
3232
|
+
showSideBar: D,
|
|
3233
3233
|
showHeader: z,
|
|
3234
|
-
headerStyle:
|
|
3234
|
+
headerStyle: P,
|
|
3235
3235
|
highlightActiveMenuItem: I,
|
|
3236
|
-
enableSecurity:
|
|
3237
|
-
securityOptions:
|
|
3236
|
+
enableSecurity: L = !1,
|
|
3237
|
+
securityOptions: j,
|
|
3238
3238
|
customRenderSidebar: H,
|
|
3239
|
-
onNavigationDataChange:
|
|
3240
|
-
showCollapsedButton:
|
|
3241
|
-
initialSidebarCollapsed:
|
|
3242
|
-
sideBarBackgroundDarkColor:
|
|
3243
|
-
sideBarBackgroundLightColor:
|
|
3244
|
-
sideBarTextDarkColor:
|
|
3245
|
-
sideBarTextLightColor:
|
|
3246
|
-
sideBarIconDarkColor:
|
|
3247
|
-
sideBarIconLightColor:
|
|
3248
|
-
sideBarCollapsedSubmenuWidth:
|
|
3249
|
-
sidebarActiveColor:
|
|
3250
|
-
maxKeepAliveTabs:
|
|
3251
|
-
sidebarVariant:
|
|
3252
|
-
sidebarShowSearch:
|
|
3239
|
+
onNavigationDataChange: _,
|
|
3240
|
+
showCollapsedButton: W,
|
|
3241
|
+
initialSidebarCollapsed: he = !1,
|
|
3242
|
+
sideBarBackgroundDarkColor: me,
|
|
3243
|
+
sideBarBackgroundLightColor: le,
|
|
3244
|
+
sideBarTextDarkColor: q,
|
|
3245
|
+
sideBarTextLightColor: V,
|
|
3246
|
+
sideBarIconDarkColor: k,
|
|
3247
|
+
sideBarIconLightColor: y,
|
|
3248
|
+
sideBarCollapsedSubmenuWidth: $,
|
|
3249
|
+
sidebarActiveColor: M,
|
|
3250
|
+
maxKeepAliveTabs: Q = 10,
|
|
3251
|
+
sidebarVariant: K = "legacy",
|
|
3252
|
+
sidebarShowSearch: N = !1
|
|
3253
3253
|
}) {
|
|
3254
3254
|
return /* @__PURE__ */ r(
|
|
3255
3255
|
Lt,
|
|
@@ -3259,10 +3259,10 @@ function Dn({
|
|
|
3259
3259
|
user: o,
|
|
3260
3260
|
owner: a,
|
|
3261
3261
|
company: l,
|
|
3262
|
-
enableSecurity:
|
|
3263
|
-
securityOptions:
|
|
3264
|
-
onNavigationDataChange:
|
|
3265
|
-
initialSidebarCollapsed:
|
|
3262
|
+
enableSecurity: L,
|
|
3263
|
+
securityOptions: j,
|
|
3264
|
+
onNavigationDataChange: _,
|
|
3265
|
+
initialSidebarCollapsed: he,
|
|
3266
3266
|
children: /* @__PURE__ */ r(
|
|
3267
3267
|
Po,
|
|
3268
3268
|
{
|
|
@@ -3275,41 +3275,41 @@ function Dn({
|
|
|
3275
3275
|
sideBarWidth: d,
|
|
3276
3276
|
sideBarCollapsedWidth: i,
|
|
3277
3277
|
sideBarHiddenBreakPoint: u,
|
|
3278
|
-
sideBarHeaderHeight:
|
|
3278
|
+
sideBarHeaderHeight: g,
|
|
3279
3279
|
sideBarHeaderContent: p,
|
|
3280
3280
|
sideBarFooterHeight: c,
|
|
3281
3281
|
sideBarFooterContent: h,
|
|
3282
|
-
selectedGroupColor:
|
|
3282
|
+
selectedGroupColor: w,
|
|
3283
3283
|
groupColor: x,
|
|
3284
|
-
backgroundGroupColor:
|
|
3284
|
+
backgroundGroupColor: R,
|
|
3285
3285
|
groupLabelDarkColor: Y,
|
|
3286
|
-
groupLabelLightColor:
|
|
3286
|
+
groupLabelLightColor: O,
|
|
3287
3287
|
onCollapsedSideBar: f,
|
|
3288
|
-
onHiddenSidebar:
|
|
3288
|
+
onHiddenSidebar: b,
|
|
3289
3289
|
sidebarDefaultGroupIcon: v,
|
|
3290
|
-
sidebarSelectedGroupName:
|
|
3290
|
+
sidebarSelectedGroupName: m,
|
|
3291
3291
|
headerColor: G,
|
|
3292
|
-
footerHeight:
|
|
3293
|
-
iconsWithBackground:
|
|
3292
|
+
footerHeight: F,
|
|
3293
|
+
iconsWithBackground: S,
|
|
3294
3294
|
menuItemHeight: T,
|
|
3295
|
-
showSideBar:
|
|
3295
|
+
showSideBar: D,
|
|
3296
3296
|
showHeader: z,
|
|
3297
|
-
headerStyle:
|
|
3297
|
+
headerStyle: P,
|
|
3298
3298
|
highlightActiveMenuItem: I,
|
|
3299
|
-
enableSecurity:
|
|
3299
|
+
enableSecurity: L,
|
|
3300
3300
|
customRenderSidebar: H,
|
|
3301
|
-
showCollapsedButton:
|
|
3302
|
-
sideBarBackgroundDarkColor:
|
|
3303
|
-
sideBarBackgroundLightColor:
|
|
3304
|
-
sideBarTextDarkColor:
|
|
3305
|
-
sideBarTextLightColor:
|
|
3306
|
-
sideBarIconDarkColor:
|
|
3307
|
-
sideBarIconLightColor:
|
|
3308
|
-
sideBarCollapsedSubmenuWidth:
|
|
3309
|
-
sidebarActiveColor:
|
|
3310
|
-
maxKeepAliveTabs:
|
|
3311
|
-
sidebarVariant:
|
|
3312
|
-
sidebarShowSearch:
|
|
3301
|
+
showCollapsedButton: W,
|
|
3302
|
+
sideBarBackgroundDarkColor: me,
|
|
3303
|
+
sideBarBackgroundLightColor: le,
|
|
3304
|
+
sideBarTextDarkColor: q,
|
|
3305
|
+
sideBarTextLightColor: V,
|
|
3306
|
+
sideBarIconDarkColor: k,
|
|
3307
|
+
sideBarIconLightColor: y,
|
|
3308
|
+
sideBarCollapsedSubmenuWidth: $,
|
|
3309
|
+
sidebarActiveColor: M,
|
|
3310
|
+
maxKeepAliveTabs: Q,
|
|
3311
|
+
sidebarVariant: K,
|
|
3312
|
+
sidebarShowSearch: N,
|
|
3313
3313
|
children: A
|
|
3314
3314
|
}
|
|
3315
3315
|
)
|
|
@@ -3339,24 +3339,24 @@ const gr = Pe({
|
|
|
3339
3339
|
return s;
|
|
3340
3340
|
}
|
|
3341
3341
|
}, [A, n] = vr(o, t);
|
|
3342
|
-
return
|
|
3342
|
+
return Ce.useEffect(() => {
|
|
3343
3343
|
let s = null;
|
|
3344
3344
|
return A.userCloseLinkRequest && !A.linkClosed && (s = setTimeout(() => {
|
|
3345
3345
|
n({ type: "CLOSE_ALLOWED", link: A.userCloseLinkRequest });
|
|
3346
|
-
},
|
|
3346
|
+
}, 0)), () => {
|
|
3347
3347
|
s && clearTimeout(s);
|
|
3348
3348
|
};
|
|
3349
3349
|
}, [A.userCloseLinkRequest, A.linkClosed, n]), /* @__PURE__ */ r(gr.Provider, { value: { state: A, dispatch: n }, children: e });
|
|
3350
3350
|
}, br = () => {
|
|
3351
|
-
const e =
|
|
3351
|
+
const e = be(gr);
|
|
3352
3352
|
if (!e)
|
|
3353
3353
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
3354
3354
|
return e;
|
|
3355
3355
|
}, zn = (e, t) => {
|
|
3356
|
-
const o = br(), { state: A, dispatch: n } = o, s =
|
|
3356
|
+
const o = br(), { state: A, dispatch: n } = o, s = C((d) => {
|
|
3357
3357
|
n({ type: "CLOSE_ALLOWED", link: e, payload: d });
|
|
3358
|
-
}, [n, e]), a =
|
|
3359
|
-
a.current = t,
|
|
3358
|
+
}, [n, e]), a = Ae(t);
|
|
3359
|
+
a.current = t, re(() => {
|
|
3360
3360
|
A && A.userCloseLinkRequest && A.userCloseLinkRequest === e && a.current();
|
|
3361
3361
|
}, [A, e]);
|
|
3362
3362
|
const l = A.isClosing && A.userCloseLinkRequest === e;
|
|
@@ -3424,199 +3424,200 @@ function On({
|
|
|
3424
3424
|
activeTabId: A,
|
|
3425
3425
|
openedTabs: n = []
|
|
3426
3426
|
}) {
|
|
3427
|
-
const [s, a] =
|
|
3427
|
+
const [s, a] = Ce.useTransition(), l = Be(), { colorScheme: d } = se(), [i, u] = fe(n), [c, h] = fe(A), f = Ae(void 0), b = He(), v = Ae([]);
|
|
3428
3428
|
wt(v);
|
|
3429
|
-
const
|
|
3430
|
-
|
|
3431
|
-
|
|
3429
|
+
const m = br(), { state: g, dispatch: p } = m, w = be(We), x = vo(), { start: R, done: Y } = fr(), O = Je((k) => k.clearSnapshot), G = Je((k) => k.removeTab), F = Ae(t), S = Ae(o);
|
|
3430
|
+
re(() => {
|
|
3431
|
+
F.current = t, S.current = o;
|
|
3432
3432
|
});
|
|
3433
|
-
const T =
|
|
3434
|
-
|
|
3433
|
+
const T = Ae(c);
|
|
3434
|
+
re(() => {
|
|
3435
3435
|
f.current = T.current, T.current = c;
|
|
3436
3436
|
}, [c]);
|
|
3437
|
-
const
|
|
3438
|
-
|
|
3439
|
-
const
|
|
3440
|
-
let
|
|
3441
|
-
!
|
|
3442
|
-
const Q = i.filter((
|
|
3443
|
-
let
|
|
3444
|
-
if (f.current && f.current !==
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3437
|
+
const D = Ae(!1), z = C((k, y) => {
|
|
3438
|
+
R(), x ? x.destroy(k) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), O(k), G(k);
|
|
3439
|
+
const $ = i.findIndex((X) => X.path === k);
|
|
3440
|
+
let M = y?.redirectUrl;
|
|
3441
|
+
!M && $ >= 0 && (M = i[$].redirect);
|
|
3442
|
+
const Q = i.filter((X) => X.id !== k);
|
|
3443
|
+
let K = null;
|
|
3444
|
+
if (f.current && f.current !== k) {
|
|
3445
|
+
const X = Q.find((ye) => ye.id === f.current);
|
|
3446
|
+
X && (K = X.id);
|
|
3447
3447
|
}
|
|
3448
|
-
if (!
|
|
3449
|
-
let
|
|
3450
|
-
Q.forEach((
|
|
3448
|
+
if (!K) {
|
|
3449
|
+
let X = -1;
|
|
3450
|
+
Q.forEach((ye, Se) => ye.id === c && (X = Se)), Q.length > 0 && Q[X] ? K = Q[X].id : Q.length > 0 && (K = Q[Q.length - 1].id);
|
|
3451
3451
|
}
|
|
3452
|
-
const
|
|
3453
|
-
...
|
|
3454
|
-
active:
|
|
3452
|
+
const N = Q.map((X) => ({
|
|
3453
|
+
...X,
|
|
3454
|
+
active: K === X.id
|
|
3455
3455
|
}));
|
|
3456
|
-
if (u(
|
|
3457
|
-
h(
|
|
3456
|
+
if (u(N), K && K != null)
|
|
3457
|
+
h(K), l(M || K);
|
|
3458
3458
|
else {
|
|
3459
|
-
if (h(void 0), !
|
|
3459
|
+
if (h(void 0), !w.navigationRootLink) {
|
|
3460
3460
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3461
3461
|
return;
|
|
3462
3462
|
}
|
|
3463
|
-
l(
|
|
3463
|
+
l(w.navigationRootLink);
|
|
3464
3464
|
}
|
|
3465
3465
|
p({ type: "DONE", link: "" }), Y();
|
|
3466
|
-
}, [i, c, l,
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
}, [
|
|
3470
|
-
const
|
|
3471
|
-
const
|
|
3466
|
+
}, [i, c, l, w.navigationRootLink, p, x, R, Y, O, G]);
|
|
3467
|
+
re(() => {
|
|
3468
|
+
g?.linkClosed && z(g?.linkClosed, g?.payload);
|
|
3469
|
+
}, [g?.linkClosed, g?.payload, z]);
|
|
3470
|
+
const P = (k) => {
|
|
3471
|
+
const y = {
|
|
3472
3472
|
item: void 0,
|
|
3473
3473
|
title: void 0,
|
|
3474
|
-
link:
|
|
3474
|
+
link: k,
|
|
3475
3475
|
redirect: void 0,
|
|
3476
3476
|
customTitle: void 0
|
|
3477
3477
|
};
|
|
3478
|
-
return e.forEach((
|
|
3479
|
-
if (
|
|
3480
|
-
|
|
3481
|
-
EA({ path:
|
|
3478
|
+
return e.forEach(($) => {
|
|
3479
|
+
if ($.links)
|
|
3480
|
+
$.links.forEach((M) => {
|
|
3481
|
+
EA({ path: M.link || "" }, location.pathname) && (y.item = M, y.title = `${oe().t(M.label)}`, y.redirect = M.redirect, y.customTitle = M.customTitle);
|
|
3482
3482
|
});
|
|
3483
|
-
else if (
|
|
3484
|
-
const
|
|
3485
|
-
|
|
3483
|
+
else if ($.link && !y.item) {
|
|
3484
|
+
const M = EA({ path: $.link }, location.pathname);
|
|
3485
|
+
M && (M.params && Object.keys(M.params).length > 0 ? y.title = `${M.params[Object.keys(M.params)[0]]}` : y.title = `${oe().t($.label)}`, y.item = $, y.redirect = $.redirect, y.customTitle = $.customTitle);
|
|
3486
3486
|
}
|
|
3487
|
-
}),
|
|
3487
|
+
}), y.customTitle && (y.customTitle = y.customTitle.replace("$title", y.title)), y;
|
|
3488
3488
|
};
|
|
3489
|
-
|
|
3490
|
-
u(n),
|
|
3489
|
+
re(() => {
|
|
3490
|
+
u(n), D.current = !0;
|
|
3491
3491
|
}, [JSON.stringify(n)]);
|
|
3492
|
-
const I =
|
|
3493
|
-
|
|
3494
|
-
if (
|
|
3495
|
-
|
|
3492
|
+
const I = Ae(i), L = Ae(c);
|
|
3493
|
+
re(() => {
|
|
3494
|
+
if (D.current) {
|
|
3495
|
+
D.current = !1, I.current = i, L.current = c;
|
|
3496
3496
|
return;
|
|
3497
3497
|
}
|
|
3498
|
-
const
|
|
3499
|
-
if (
|
|
3500
|
-
const
|
|
3501
|
-
|
|
3498
|
+
const k = JSON.stringify(I.current) !== JSON.stringify(i), y = L.current !== c;
|
|
3499
|
+
if (k || y) {
|
|
3500
|
+
const $ = setTimeout(() => {
|
|
3501
|
+
F.current?.(i), S.current?.(c);
|
|
3502
3502
|
}, 0);
|
|
3503
|
-
return I.current = i,
|
|
3503
|
+
return I.current = i, L.current = c, () => clearTimeout($);
|
|
3504
3504
|
}
|
|
3505
3505
|
}, [i, c]);
|
|
3506
|
-
const
|
|
3507
|
-
|
|
3508
|
-
if (
|
|
3506
|
+
const j = Ae("");
|
|
3507
|
+
re(() => {
|
|
3508
|
+
if (j.current === b.pathname)
|
|
3509
3509
|
return;
|
|
3510
|
-
|
|
3511
|
-
const
|
|
3512
|
-
if (
|
|
3513
|
-
const
|
|
3514
|
-
if (
|
|
3515
|
-
if (i[
|
|
3516
|
-
const
|
|
3517
|
-
|
|
3510
|
+
j.current = b.pathname;
|
|
3511
|
+
const k = P(b.pathname);
|
|
3512
|
+
if (k && k.item) {
|
|
3513
|
+
const y = i.findIndex(($) => $.path === k.link);
|
|
3514
|
+
if (y !== -1) {
|
|
3515
|
+
if (i[y].title !== k.title) {
|
|
3516
|
+
const $ = [...i];
|
|
3517
|
+
$[y] = { ...$[y], title: k.title }, u($);
|
|
3518
3518
|
}
|
|
3519
|
-
h(i[
|
|
3519
|
+
h(i[y].id);
|
|
3520
3520
|
} else {
|
|
3521
|
-
const
|
|
3522
|
-
id: `${
|
|
3523
|
-
title: `${
|
|
3524
|
-
path: `${
|
|
3521
|
+
const $ = {
|
|
3522
|
+
id: `${k.link}`,
|
|
3523
|
+
title: `${k.title}`,
|
|
3524
|
+
path: `${k.link}`,
|
|
3525
3525
|
active: !0,
|
|
3526
|
-
content:
|
|
3527
|
-
iconClass:
|
|
3526
|
+
content: k.item.component,
|
|
3527
|
+
iconClass: k.item.icon,
|
|
3528
3528
|
closeButton: !0,
|
|
3529
|
-
redirect:
|
|
3530
|
-
customTitle:
|
|
3531
|
-
},
|
|
3532
|
-
u(
|
|
3529
|
+
redirect: k.redirect,
|
|
3530
|
+
customTitle: k.customTitle
|
|
3531
|
+
}, M = [...i.map((Q) => ({ ...Q, active: !1 })), $];
|
|
3532
|
+
u(M), h($.id);
|
|
3533
3533
|
}
|
|
3534
3534
|
}
|
|
3535
|
-
}, [
|
|
3536
|
-
const H = (
|
|
3537
|
-
const
|
|
3538
|
-
|
|
3539
|
-
h(
|
|
3535
|
+
}, [b.pathname]);
|
|
3536
|
+
const H = (k) => {
|
|
3537
|
+
const y = i.filter(($) => $.id === k);
|
|
3538
|
+
y && y.length > 0 && b.pathname !== y[0].path && (R(), l(y[0].path)), a(() => {
|
|
3539
|
+
h(k), Y();
|
|
3540
3540
|
});
|
|
3541
|
-
},
|
|
3541
|
+
}, _ = (k) => {
|
|
3542
3542
|
try {
|
|
3543
|
-
p({ type: "USER_CLOSE_REQUEST", link:
|
|
3544
|
-
} catch (
|
|
3545
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
3543
|
+
R(), p({ type: "USER_CLOSE_REQUEST", link: k });
|
|
3544
|
+
} catch (y) {
|
|
3545
|
+
console.error("[TabContainer] Dispatch failed:", y), Y();
|
|
3546
3546
|
}
|
|
3547
|
-
},
|
|
3548
|
-
if (x?.destroyAll(), i.forEach((
|
|
3549
|
-
|
|
3550
|
-
}), u([]), h(void 0), !
|
|
3547
|
+
}, W = C(() => {
|
|
3548
|
+
if (x?.destroyAll(), i.forEach((k) => {
|
|
3549
|
+
O(k.id), G(k.id);
|
|
3550
|
+
}), u([]), h(void 0), !w.navigationRootLink) {
|
|
3551
3551
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3552
3552
|
return;
|
|
3553
3553
|
}
|
|
3554
|
-
l(
|
|
3555
|
-
}, [l,
|
|
3556
|
-
const
|
|
3557
|
-
if (
|
|
3554
|
+
l(w.navigationRootLink);
|
|
3555
|
+
}, [l, w.navigationRootLink, x, i, O, G]), he = C((k) => {
|
|
3556
|
+
const y = i.findIndex((N) => N.id === k);
|
|
3557
|
+
if (y <= 0)
|
|
3558
3558
|
return;
|
|
3559
|
-
i.slice(0,
|
|
3560
|
-
x?.destroy(
|
|
3559
|
+
i.slice(0, y).forEach((N) => {
|
|
3560
|
+
x?.destroy(N.path), O(N.id), G(N.id);
|
|
3561
3561
|
});
|
|
3562
|
-
const
|
|
3563
|
-
...
|
|
3564
|
-
active:
|
|
3562
|
+
const M = i.slice(y), Q = M.find((N) => N.id === c)?.id || M[0]?.id, K = M.map((N) => ({
|
|
3563
|
+
...N,
|
|
3564
|
+
active: N.id === Q
|
|
3565
3565
|
}));
|
|
3566
|
-
if (u(
|
|
3566
|
+
if (u(K), Q) {
|
|
3567
3567
|
h(Q);
|
|
3568
|
-
const
|
|
3569
|
-
|
|
3568
|
+
const N = K.find((X) => X.id === Q);
|
|
3569
|
+
N && b.pathname !== N.path && l(N.path);
|
|
3570
3570
|
}
|
|
3571
|
-
}, [i, c, l,
|
|
3572
|
-
const
|
|
3573
|
-
if (
|
|
3571
|
+
}, [i, c, l, b.pathname, x, O, G]), me = C((k) => {
|
|
3572
|
+
const y = i.findIndex((N) => N.id === k);
|
|
3573
|
+
if (y === -1 || y >= i.length - 1)
|
|
3574
3574
|
return;
|
|
3575
|
-
i.slice(
|
|
3576
|
-
x?.destroy(
|
|
3575
|
+
i.slice(y + 1).forEach((N) => {
|
|
3576
|
+
x?.destroy(N.path), O(N.id), G(N.id);
|
|
3577
3577
|
});
|
|
3578
|
-
const
|
|
3579
|
-
...
|
|
3580
|
-
active:
|
|
3578
|
+
const M = i.slice(0, y + 1), Q = M.find((N) => N.id === c)?.id || M[M.length - 1]?.id, K = M.map((N) => ({
|
|
3579
|
+
...N,
|
|
3580
|
+
active: N.id === Q
|
|
3581
3581
|
}));
|
|
3582
|
-
if (u(
|
|
3582
|
+
if (u(K), Q) {
|
|
3583
3583
|
h(Q);
|
|
3584
|
-
const
|
|
3585
|
-
|
|
3584
|
+
const N = K.find((X) => X.id === Q);
|
|
3585
|
+
N && b.pathname !== N.path && l(N.path);
|
|
3586
3586
|
}
|
|
3587
|
-
}, [i, c, l,
|
|
3588
|
-
const
|
|
3589
|
-
if (!
|
|
3587
|
+
}, [i, c, l, b.pathname, x, O, G]), le = C((k) => {
|
|
3588
|
+
const y = i.find((M) => M.id === k);
|
|
3589
|
+
if (!y)
|
|
3590
3590
|
return;
|
|
3591
|
-
x?.destroyOther(
|
|
3592
|
-
|
|
3591
|
+
x?.destroyOther(y.path), i.forEach((M) => {
|
|
3592
|
+
M.id !== k && (O(M.id), G(M.id));
|
|
3593
3593
|
});
|
|
3594
|
-
const
|
|
3595
|
-
u(
|
|
3596
|
-
}, [i, l,
|
|
3594
|
+
const $ = [{ ...y, active: !0 }];
|
|
3595
|
+
u($), h(k), b.pathname !== y.path && l(y.path);
|
|
3596
|
+
}, [i, l, b.pathname, x, O, G]), q = g?.isClosing ? g?.userCloseLinkRequest : void 0;
|
|
3597
3597
|
return /* @__PURE__ */ r("div", { ref: v, children: /* @__PURE__ */ r(
|
|
3598
3598
|
St,
|
|
3599
3599
|
{
|
|
3600
3600
|
buttonCloseOnlyActiveTab: !0,
|
|
3601
|
-
onClick: (
|
|
3602
|
-
onTabClose: (
|
|
3603
|
-
onTabChange: (
|
|
3604
|
-
onCloseAllTabs:
|
|
3605
|
-
onCloseLeftTabs:
|
|
3606
|
-
onCloseRightTabs:
|
|
3607
|
-
onCloseOtherTabs:
|
|
3608
|
-
currentTabs: ((
|
|
3609
|
-
key:
|
|
3610
|
-
favicon:
|
|
3611
|
-
title:
|
|
3612
|
-
customTitle:
|
|
3601
|
+
onClick: (k) => H(k),
|
|
3602
|
+
onTabClose: (k) => _(k),
|
|
3603
|
+
onTabChange: (k) => null,
|
|
3604
|
+
onCloseAllTabs: W,
|
|
3605
|
+
onCloseLeftTabs: he,
|
|
3606
|
+
onCloseRightTabs: me,
|
|
3607
|
+
onCloseOtherTabs: le,
|
|
3608
|
+
currentTabs: ((k) => k.map((y) => ({
|
|
3609
|
+
key: y.id,
|
|
3610
|
+
favicon: y.iconClass,
|
|
3611
|
+
title: y.title,
|
|
3612
|
+
customTitle: y.customTitle,
|
|
3613
|
+
closing: q === y.id
|
|
3613
3614
|
})))(i),
|
|
3614
3615
|
activeTab: c,
|
|
3615
3616
|
dark: d === "dark"
|
|
3616
3617
|
}
|
|
3617
3618
|
) });
|
|
3618
3619
|
}
|
|
3619
|
-
const Mo = () =>
|
|
3620
|
+
const Mo = () => Ce.createElement("div", null, "Home View"), Do = () => Ce.createElement("div", null, "Pedido Form"), No = () => Ce.createElement("div", null, "Pedido View"), zo = () => Ce.createElement("div", null, "Pessoa Form"), Oo = () => Ce.createElement("div", null, "Pessoa View"), $o = {
|
|
3620
3621
|
label: "Dashboard",
|
|
3621
3622
|
icon: /* @__PURE__ */ r(Kr, {}),
|
|
3622
3623
|
link: "/dashboard",
|
|
@@ -3700,7 +3701,7 @@ const Mo = () => ve.createElement("div", null, "Home View"), Do = () => ve.creat
|
|
|
3700
3701
|
];
|
|
3701
3702
|
function Qn({ children: e, title: t = "", size: o = "440px", drawerKey: A, styles: n }) {
|
|
3702
3703
|
const [s, { open: a, close: l }] = kr(!1), [d] = WA(), i = pt(), u = _e();
|
|
3703
|
-
return
|
|
3704
|
+
return re(() => {
|
|
3704
3705
|
d.get("drawer") === A && a();
|
|
3705
3706
|
}, [d]), /* @__PURE__ */ r(
|
|
3706
3707
|
BA,
|
|
@@ -3734,7 +3735,7 @@ function Yo(e) {
|
|
|
3734
3735
|
}
|
|
3735
3736
|
function Kn({ drawerKey: e }) {
|
|
3736
3737
|
const { openDrawer: t } = Yo(e);
|
|
3737
|
-
return
|
|
3738
|
+
return re(() => {
|
|
3738
3739
|
t();
|
|
3739
3740
|
}, []), null;
|
|
3740
3741
|
}
|
|
@@ -3747,44 +3748,44 @@ const qo = {
|
|
|
3747
3748
|
avatarImageQuality: 1
|
|
3748
3749
|
};
|
|
3749
3750
|
function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n }) {
|
|
3750
|
-
const s = xr(), a = Ir(), l = Ur(), d = It(`myProfile${o}Store`), i = Tt(Yr.User), u = { ...qo, ...n ?? {} }, { dataSource: c, isLoading: h, error: f, isError:
|
|
3751
|
+
const s = xr(), a = Ir(), l = Ur(), d = It(`myProfile${o}Store`), i = Tt(Yr.User), u = { ...qo, ...n ?? {} }, { dataSource: c, isLoading: h, error: f, isError: b, clearError: v } = Et({
|
|
3751
3752
|
name: `dsUser${o}`,
|
|
3752
|
-
label: `${
|
|
3753
|
+
label: `${oe().t("archbase:My Profile")}`,
|
|
3753
3754
|
service: i,
|
|
3754
3755
|
store: d,
|
|
3755
3756
|
pageSize: 50,
|
|
3756
3757
|
loadOnStart: !0,
|
|
3757
3758
|
validator: l,
|
|
3758
3759
|
id: o,
|
|
3759
|
-
onLoadComplete: (
|
|
3760
|
-
|
|
3760
|
+
onLoadComplete: (g) => {
|
|
3761
|
+
g.isBrowsing() && g.edit(), a();
|
|
3761
3762
|
},
|
|
3762
|
-
onDestroy: (
|
|
3763
|
+
onDestroy: (g) => {
|
|
3763
3764
|
},
|
|
3764
|
-
onError: (
|
|
3765
|
-
const
|
|
3766
|
-
mt.showError(
|
|
3765
|
+
onError: (g, p) => {
|
|
3766
|
+
const w = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
|
|
3767
|
+
mt.showError(oe().t("archbase:WARNING"), w, p);
|
|
3767
3768
|
}
|
|
3768
3769
|
});
|
|
3769
|
-
|
|
3770
|
+
re(() => {
|
|
3770
3771
|
e && c && c.isBrowsing() && c.edit();
|
|
3771
3772
|
}, [c, e]);
|
|
3772
|
-
const
|
|
3773
|
-
|
|
3773
|
+
const m = (g) => {
|
|
3774
|
+
g && (console.log(g), A(g.name, g.avatar));
|
|
3774
3775
|
};
|
|
3775
3776
|
return /* @__PURE__ */ r(
|
|
3776
3777
|
Rt,
|
|
3777
3778
|
{
|
|
3778
|
-
title:
|
|
3779
|
+
title: oe().t("archbase:My Profile"),
|
|
3779
3780
|
size: 800,
|
|
3780
3781
|
height: "500px",
|
|
3781
3782
|
opened: e,
|
|
3782
3783
|
dataSource: c,
|
|
3783
3784
|
onClickOk: t,
|
|
3784
3785
|
onClickCancel: t,
|
|
3785
|
-
onAfterSave:
|
|
3786
|
-
children: /* @__PURE__ */ r(De, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */
|
|
3787
|
-
/* @__PURE__ */ r(
|
|
3786
|
+
onAfterSave: m,
|
|
3787
|
+
children: /* @__PURE__ */ r(De, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ E(J, { children: [
|
|
3788
|
+
/* @__PURE__ */ r(J, { align: "center", children: /* @__PURE__ */ r(
|
|
3788
3789
|
yt,
|
|
3789
3790
|
{
|
|
3790
3791
|
dataSource: c,
|
|
@@ -3798,8 +3799,8 @@ function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n })
|
|
|
3798
3799
|
/* @__PURE__ */ r(
|
|
3799
3800
|
rA,
|
|
3800
3801
|
{
|
|
3801
|
-
label: `${
|
|
3802
|
-
placeholder: `${
|
|
3802
|
+
label: `${oe().t("archbase:Nome completo")}`,
|
|
3803
|
+
placeholder: `${oe().t("archbase:Informe o nome completo do usuário")}`,
|
|
3803
3804
|
dataSource: c,
|
|
3804
3805
|
dataField: "name",
|
|
3805
3806
|
required: !0
|
|
@@ -3808,8 +3809,8 @@ function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n })
|
|
|
3808
3809
|
u.showNickname && /* @__PURE__ */ r(
|
|
3809
3810
|
rA,
|
|
3810
3811
|
{
|
|
3811
|
-
label: `${
|
|
3812
|
-
placeholder: `${
|
|
3812
|
+
label: `${oe().t("archbase:Apelido")}`,
|
|
3813
|
+
placeholder: `${oe().t("archbase:Apelido")}`,
|
|
3813
3814
|
dataSource: c,
|
|
3814
3815
|
dataField: "nickname",
|
|
3815
3816
|
required: u.requiredNickname
|
|
@@ -3818,8 +3819,8 @@ function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n })
|
|
|
3818
3819
|
/* @__PURE__ */ r(
|
|
3819
3820
|
rA,
|
|
3820
3821
|
{
|
|
3821
|
-
label: `${
|
|
3822
|
-
placeholder: `${
|
|
3822
|
+
label: `${oe().t("archbase:Descrição do usuário")}`,
|
|
3823
|
+
placeholder: `${oe().t("archbase:Informe a descrição do usuário")}`,
|
|
3823
3824
|
dataSource: c,
|
|
3824
3825
|
dataField: "description",
|
|
3825
3826
|
required: !0
|
|
@@ -3931,12 +3932,12 @@ const Gn = rr((e) => ({
|
|
|
3931
3932
|
tabId: e,
|
|
3932
3933
|
children: t
|
|
3933
3934
|
}) => {
|
|
3934
|
-
const { getSnapshot: o, saveSnapshot: A } = Je(), n =
|
|
3935
|
+
const { getSnapshot: o, saveSnapshot: A } = Je(), n = Ae(void 0);
|
|
3935
3936
|
if (!n.current) {
|
|
3936
3937
|
const s = o(e);
|
|
3937
3938
|
n.current = jo(s);
|
|
3938
3939
|
}
|
|
3939
|
-
return
|
|
3940
|
+
return re(() => () => {
|
|
3940
3941
|
if (n.current) {
|
|
3941
3942
|
const s = n.current.getState();
|
|
3942
3943
|
A(e, s.serialize());
|
|
@@ -3944,27 +3945,27 @@ const Gn = rr((e) => ({
|
|
|
3944
3945
|
}, [e, A]), /* @__PURE__ */ r(Ze.Provider, { value: n.current ?? null, children: t });
|
|
3945
3946
|
};
|
|
3946
3947
|
function Vn(e) {
|
|
3947
|
-
const t =
|
|
3948
|
+
const t = be(Ze);
|
|
3948
3949
|
if (!t)
|
|
3949
3950
|
throw new Error("useTabStore must be used within TabStoreProvider");
|
|
3950
3951
|
return kt(t, e);
|
|
3951
3952
|
}
|
|
3952
3953
|
function Bn() {
|
|
3953
|
-
const e =
|
|
3954
|
+
const e = be(Ze);
|
|
3954
3955
|
if (!e)
|
|
3955
3956
|
throw new Error("useTabStoreApi must be used within TabStoreProvider");
|
|
3956
3957
|
return e;
|
|
3957
3958
|
}
|
|
3958
3959
|
function kA() {
|
|
3959
|
-
return
|
|
3960
|
+
return be(Ze);
|
|
3960
3961
|
}
|
|
3961
3962
|
function eA(e, t) {
|
|
3962
|
-
const o = kA(), A =
|
|
3963
|
+
const o = kA(), A = Ae({ resolved: !1, value: void 0 });
|
|
3963
3964
|
A.current.resolved || (A.current = {
|
|
3964
3965
|
resolved: !0,
|
|
3965
3966
|
value: typeof t == "function" ? t() : t
|
|
3966
3967
|
});
|
|
3967
|
-
const n = A.current.value, [s, a] =
|
|
3968
|
+
const n = A.current.value, [s, a] = fe(n), l = Cr(
|
|
3968
3969
|
// subscribe
|
|
3969
3970
|
(u) => o ? o.subscribe(u) : () => {
|
|
3970
3971
|
},
|
|
@@ -3976,7 +3977,7 @@ function eA(e, t) {
|
|
|
3976
3977
|
// getServerSnapshot
|
|
3977
3978
|
() => {
|
|
3978
3979
|
}
|
|
3979
|
-
), d = o ? l !== void 0 ? l : n : s, i =
|
|
3980
|
+
), d = o ? l !== void 0 ? l : n : s, i = C((u) => {
|
|
3980
3981
|
if (!o) {
|
|
3981
3982
|
a(u);
|
|
3982
3983
|
return;
|
|
@@ -4005,19 +4006,19 @@ function Un(e, t) {
|
|
|
4005
4006
|
const o = { ...Jo, ...t }, [A, n] = eA(
|
|
4006
4007
|
`grid_${e}`,
|
|
4007
4008
|
o
|
|
4008
|
-
), s =
|
|
4009
|
-
n((
|
|
4010
|
-
}, [n]), a =
|
|
4011
|
-
n((
|
|
4012
|
-
...
|
|
4013
|
-
selectedRowIds:
|
|
4009
|
+
), s = C((p) => {
|
|
4010
|
+
n((w) => ({ ...w, ...p }));
|
|
4011
|
+
}, [n]), a = C((p) => s({ page: p }), [s]), l = C((p) => s({ pageSize: p, page: 0 }), [s]), d = C((p) => s({ sortModel: p }), [s]), i = C((p) => s({ filterModel: p, page: 0 }), [s]), u = C((p) => s({ selectedRowIds: p }), [s]), c = C((p) => {
|
|
4012
|
+
n((w) => ({
|
|
4013
|
+
...w,
|
|
4014
|
+
selectedRowIds: w.selectedRowIds.includes(p) ? w.selectedRowIds.filter((x) => x !== p) : [...w.selectedRowIds, p]
|
|
4014
4015
|
}));
|
|
4015
|
-
}, [n]), h =
|
|
4016
|
-
n((
|
|
4017
|
-
...
|
|
4018
|
-
expandedRowIds:
|
|
4016
|
+
}, [n]), h = C((p) => s({ selectedRowIds: p }), [s]), f = C(() => s({ selectedRowIds: [] }), [s]), b = C((p) => {
|
|
4017
|
+
n((w) => ({
|
|
4018
|
+
...w,
|
|
4019
|
+
expandedRowIds: w.expandedRowIds.includes(p) ? w.expandedRowIds.filter((x) => x !== p) : [...w.expandedRowIds, p]
|
|
4019
4020
|
}));
|
|
4020
|
-
}, [n]), v =
|
|
4021
|
+
}, [n]), v = C(() => n(o), [n, o]), m = C((p) => A.selectedRowIds.includes(p), [A.selectedRowIds]), g = C((p) => A.expandedRowIds.includes(p), [A.expandedRowIds]);
|
|
4021
4022
|
return {
|
|
4022
4023
|
/** Estado completo do grid */
|
|
4023
4024
|
state: A,
|
|
@@ -4036,14 +4037,14 @@ function Un(e, t) {
|
|
|
4036
4037
|
toggleRowSelection: c,
|
|
4037
4038
|
selectAllRows: h,
|
|
4038
4039
|
clearSelection: f,
|
|
4039
|
-
isRowSelected:
|
|
4040
|
+
isRowSelected: m,
|
|
4040
4041
|
/** Quantidade de linhas selecionadas */
|
|
4041
4042
|
selectedCount: A.selectedRowIds.length,
|
|
4042
4043
|
/** Se tem alguma linha selecionada */
|
|
4043
4044
|
hasSelection: A.selectedRowIds.length > 0,
|
|
4044
4045
|
// Expansao (master-detail)
|
|
4045
|
-
toggleRowExpansion:
|
|
4046
|
-
isRowExpanded:
|
|
4046
|
+
toggleRowExpansion: b,
|
|
4047
|
+
isRowExpanded: g
|
|
4047
4048
|
};
|
|
4048
4049
|
}
|
|
4049
4050
|
const $A = {
|
|
@@ -4055,37 +4056,37 @@ function Yn(e, t = []) {
|
|
|
4055
4056
|
const [o, A] = eA(
|
|
4056
4057
|
`tree_${e}`,
|
|
4057
4058
|
{ ...$A, expandedNodeIds: t }
|
|
4058
|
-
), n =
|
|
4059
|
-
A((
|
|
4060
|
-
...
|
|
4061
|
-
expandedNodeIds:
|
|
4059
|
+
), n = C((m) => {
|
|
4060
|
+
A((g) => ({
|
|
4061
|
+
...g,
|
|
4062
|
+
expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds.filter((p) => p !== m) : [...g.expandedNodeIds, m]
|
|
4062
4063
|
}));
|
|
4063
|
-
}, [A]), s =
|
|
4064
|
-
A((
|
|
4065
|
-
...
|
|
4066
|
-
expandedNodeIds:
|
|
4064
|
+
}, [A]), s = C((m) => {
|
|
4065
|
+
A((g) => ({
|
|
4066
|
+
...g,
|
|
4067
|
+
expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds : [...g.expandedNodeIds, m]
|
|
4067
4068
|
}));
|
|
4068
|
-
}, [A]), a =
|
|
4069
|
-
A((
|
|
4070
|
-
...
|
|
4071
|
-
expandedNodeIds:
|
|
4069
|
+
}, [A]), a = C((m) => {
|
|
4070
|
+
A((g) => ({
|
|
4071
|
+
...g,
|
|
4072
|
+
expandedNodeIds: g.expandedNodeIds.filter((p) => p !== m)
|
|
4072
4073
|
}));
|
|
4073
|
-
}, [A]), l =
|
|
4074
|
-
A((
|
|
4075
|
-
}, [A]), d =
|
|
4076
|
-
A((
|
|
4077
|
-
}, [A]), i =
|
|
4078
|
-
A((
|
|
4079
|
-
}, [A]), u =
|
|
4080
|
-
A((
|
|
4081
|
-
...
|
|
4082
|
-
selectedNodeIds:
|
|
4074
|
+
}, [A]), l = C((m) => {
|
|
4075
|
+
A((g) => ({ ...g, expandedNodeIds: m }));
|
|
4076
|
+
}, [A]), d = C(() => {
|
|
4077
|
+
A((m) => ({ ...m, expandedNodeIds: [] }));
|
|
4078
|
+
}, [A]), i = C((m) => {
|
|
4079
|
+
A((g) => ({ ...g, selectedNodeIds: m }));
|
|
4080
|
+
}, [A]), u = C((m) => {
|
|
4081
|
+
A((g) => ({
|
|
4082
|
+
...g,
|
|
4083
|
+
selectedNodeIds: g.selectedNodeIds.includes(m) ? g.selectedNodeIds.filter((p) => p !== m) : [...g.selectedNodeIds, m]
|
|
4083
4084
|
}));
|
|
4084
|
-
}, [A]), c =
|
|
4085
|
-
A((
|
|
4086
|
-
}, [A]), h =
|
|
4087
|
-
A((
|
|
4088
|
-
}, [A]), f =
|
|
4085
|
+
}, [A]), c = C(() => {
|
|
4086
|
+
A((m) => ({ ...m, selectedNodeIds: [] }));
|
|
4087
|
+
}, [A]), h = C((m) => {
|
|
4088
|
+
A((g) => ({ ...g, focusedNodeId: m }));
|
|
4089
|
+
}, [A]), f = C((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), b = C((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), v = C(() => {
|
|
4089
4090
|
A({ ...$A, expandedNodeIds: t });
|
|
4090
4091
|
}, [A, t]);
|
|
4091
4092
|
return {
|
|
@@ -4102,7 +4103,7 @@ function Yn(e, t = []) {
|
|
|
4102
4103
|
setSelected: i,
|
|
4103
4104
|
toggleSelected: u,
|
|
4104
4105
|
clearSelection: c,
|
|
4105
|
-
isSelected:
|
|
4106
|
+
isSelected: b,
|
|
4106
4107
|
selectedCount: o.selectedNodeIds.length,
|
|
4107
4108
|
hasSelection: o.selectedNodeIds.length > 0,
|
|
4108
4109
|
// Foco
|
|
@@ -4114,13 +4115,13 @@ function qn(e, t = [], o = !0) {
|
|
|
4114
4115
|
const [A, n] = eA(
|
|
4115
4116
|
`accordion_${e}`,
|
|
4116
4117
|
t
|
|
4117
|
-
), s =
|
|
4118
|
+
), s = C((c) => {
|
|
4118
4119
|
n((h) => h.includes(c) ? h.filter((f) => f !== c) : o ? [...h, c] : [c]);
|
|
4119
|
-
}, [n, o]), a =
|
|
4120
|
+
}, [n, o]), a = C((c) => {
|
|
4120
4121
|
n((h) => h.includes(c) ? h : o ? [...h, c] : [c]);
|
|
4121
|
-
}, [n, o]), l =
|
|
4122
|
+
}, [n, o]), l = C((c) => {
|
|
4122
4123
|
n((h) => h.filter((f) => f !== c));
|
|
4123
|
-
}, [n]), d =
|
|
4124
|
+
}, [n]), d = C(() => n([]), [n]), i = C((c) => A.includes(c), [A]), u = C((c) => {
|
|
4124
4125
|
n(c === null ? [] : typeof c == "string" ? [c] : c);
|
|
4125
4126
|
}, [n]);
|
|
4126
4127
|
return {
|
|
@@ -4139,14 +4140,14 @@ function qn(e, t = [], o = !0) {
|
|
|
4139
4140
|
}
|
|
4140
4141
|
function jn(e, t = {}) {
|
|
4141
4142
|
const { debounceMs: o = 100 } = t, A = kA();
|
|
4142
|
-
|
|
4143
|
+
re(() => {
|
|
4143
4144
|
if (!A || !e.current)
|
|
4144
4145
|
return;
|
|
4145
4146
|
const n = A.getState().scrollY;
|
|
4146
4147
|
n > 0 && requestAnimationFrame(() => {
|
|
4147
4148
|
e.current && (e.current.scrollTop = n);
|
|
4148
4149
|
});
|
|
4149
|
-
}, []),
|
|
4150
|
+
}, []), re(() => {
|
|
4150
4151
|
if (!A || !e.current)
|
|
4151
4152
|
return;
|
|
4152
4153
|
const n = e.current;
|
|
@@ -4162,8 +4163,8 @@ function jn(e, t = {}) {
|
|
|
4162
4163
|
}, [A, e, o]);
|
|
4163
4164
|
}
|
|
4164
4165
|
function Xn(e) {
|
|
4165
|
-
const t = _e(), o = Je((l) => l.activeTabId), A = t.pathname + t.search, n = o === A, s =
|
|
4166
|
-
return
|
|
4166
|
+
const t = _e(), o = Je((l) => l.activeTabId), A = t.pathname + t.search, n = o === A, s = Ae(n), a = Ae(!0);
|
|
4167
|
+
return re(() => {
|
|
4167
4168
|
if (a.current) {
|
|
4168
4169
|
a.current = !1, s.current = n;
|
|
4169
4170
|
return;
|
|
@@ -4172,11 +4173,11 @@ function Xn(e) {
|
|
|
4172
4173
|
}, [n, e]), n;
|
|
4173
4174
|
}
|
|
4174
4175
|
function Jn(e) {
|
|
4175
|
-
const t = kA(), o = `drawer_${e}_open`, A = `drawer_${e}_data`, n =
|
|
4176
|
+
const t = kA(), o = `drawer_${e}_open`, A = `drawer_${e}_data`, n = Ae(!1), s = Ae(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[A] ?? null : s.current, d = C((c) => {
|
|
4176
4177
|
t ? (c !== void 0 && t.getState().setCustomState(A, c), t.getState().setCustomState(o, !0)) : (c !== void 0 && (s.current = c), n.current = !0);
|
|
4177
|
-
}, [t, o, A]), i =
|
|
4178
|
+
}, [t, o, A]), i = C(() => {
|
|
4178
4179
|
t ? t.getState().setCustomState(o, !1) : n.current = !1;
|
|
4179
|
-
}, [t, o]), u =
|
|
4180
|
+
}, [t, o]), u = C(() => {
|
|
4180
4181
|
t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(A)) : (n.current = !1, s.current = null);
|
|
4181
4182
|
}, [t, o, A]);
|
|
4182
4183
|
return {
|
|
@@ -4193,9 +4194,9 @@ const _n = ({
|
|
|
4193
4194
|
getTabId: o = (A, n) => A + n
|
|
4194
4195
|
}) => {
|
|
4195
4196
|
const A = _e(), n = o(A.pathname, A.search);
|
|
4196
|
-
return /* @__PURE__ */ r(Xo, { tabId: n, children: /* @__PURE__ */
|
|
4197
|
+
return /* @__PURE__ */ r(Xo, { tabId: n, children: /* @__PURE__ */ E(JA, { children: [
|
|
4197
4198
|
e.map(({ path: s, element: a }) => /* @__PURE__ */ r($e, { path: s, element: a }, s)),
|
|
4198
|
-
t && /* @__PURE__ */ r($e, { path: "*", element: /* @__PURE__ */ r(
|
|
4199
|
+
t && /* @__PURE__ */ r($e, { path: "*", element: /* @__PURE__ */ r(xe, { children: t }) })
|
|
4199
4200
|
] }) }, n);
|
|
4200
4201
|
};
|
|
4201
4202
|
export {
|