@archbase/admin 4.0.43 → 4.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as R, Fragment as Pe } from "react/jsx-runtime";
|
|
2
2
|
import * as GA from "react";
|
|
3
|
-
import
|
|
3
|
+
import Se, { useState as ge, useRef as _, useEffect as te, useMemo as ce, useContext as ve, useCallback as w, createContext as Ne, memo as BA, Fragment as UA, useLayoutEffect as kr, useImperativeHandle as xr, startTransition as nA, useReducer as Ir, useSyncExternalStore as Tr } from "react";
|
|
4
4
|
import { useArchbaseSecurityManager as Er } from "@archbase/security";
|
|
5
|
-
import { useUncontrolled as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { IconSun as jA, IconMoonStars as XA, IconTerminal as Fr, IconSearch as
|
|
8
|
-
import { useArchbaseAppContext as
|
|
9
|
-
import { BRFlag as
|
|
10
|
-
import { spotlight as bt, Spotlight as
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import { useLocation as
|
|
5
|
+
import { useUncontrolled as aA, useMediaQuery as PA, useHotkeys as Rr, useDisclosure as Pr, useFocusTrap as Lr, useForceUpdate as Mr } from "@mantine/hooks";
|
|
6
|
+
import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as De, Group as Le, Tooltip as Me, Button as Dr, ScrollArea as ze, Badge as pA, Center as Je, Image as Nr, useMantineTheme as me, px as fe, Burger as zr, Box as B, Avatar as iA, Text as Te, Stack as J, Skeleton as pe, Paper as Or, NavLink as LA, Kbd as HA, UnstyledButton as cA, Collapse as $r, TextInput as YA, Indicator as Qr, Transition as Kr, Divider as dA, AppShell as Be, Drawer as qA } from "@mantine/core";
|
|
7
|
+
import { IconSun as jA, IconMoonStars as XA, IconTerminal as Fr, IconSearch as _e, IconAlertCircle as Vr, IconDots as JA, IconChevronRight as gA, IconChevronDown as Gr, IconX as _A, IconChevronLeft as Br, IconHome2 as Ur, IconDashboard as Hr, IconUsers as Yr, IconListSearch as WA, IconUserPlus as qr, IconNews as jr, IconFilePlus as Xr, IconSettings as Jr } from "@tabler/icons-react";
|
|
8
|
+
import { useArchbaseAppContext as bA, getI18nextInstance as oe, useArchbaseTranslation as mA, archbaseI18next as Re, useArchbaseValidator as _r, ARCHBASE_IOC_API_TYPE as Wr } from "@archbase/core";
|
|
9
|
+
import { BRFlag as He, USFlag as ZA, ESFlag as uA, VEFlag as Zr, UYFlag as et, SVFlag as At, PYFlag as rt, PEFlag as tt, PAFlag as ot, NIFlag as nt, MXFlag as st, HNFlag as lt, GTFlag as at, ECFlag as it, DOFlag as ct, CUFlag as dt, CRFlag as ut, COFlag as ht, CLFlag as ft, BOFlag as pt, ARFlag as gt } from "mantine-flagpack";
|
|
10
|
+
import { spotlight as bt, Spotlight as Ue } from "@mantine/spotlight";
|
|
11
|
+
import { useNavigate as qe, useLocation as je, matchPath as MA } from "react-router";
|
|
12
|
+
import { useLocation as Xe, useOutlet as mt, matchPath as yt, Route as Ke, Routes as er, useParams as Ar, useNavigationType as vt, UNSAFE_LocationContext as Ct, useSearchParams as rr, useNavigate as wt } from "react-router-dom";
|
|
13
13
|
import { useMediaQuery as St } from "usehooks-ts";
|
|
14
|
-
import { useArchbaseNavigateParams as kt, useArchbaseVisible as xt, ArchbaseNotifications as It, ArchbaseAvatarEdit as Tt, ArchbaseEdit as
|
|
14
|
+
import { useArchbaseNavigateParams as kt, useArchbaseVisible as xt, ArchbaseNotifications as It, ArchbaseAvatarEdit as Tt, ArchbaseEdit as sA } from "@archbase/components";
|
|
15
15
|
import { SubMenu as Et, MenuItem as DA, menuClasses as re, Sidebar as tr, Menu as or, sidebarClasses as nr } from "react-pro-sidebar";
|
|
16
16
|
import { createPortal as Rt } from "react-dom";
|
|
17
17
|
import Pt from "@rehooks/component-size";
|
|
@@ -21,7 +21,7 @@ import { persist as Dt } from "zustand/middleware";
|
|
|
21
21
|
import { useArchbaseStore as Nt, useArchbaseRemoteServiceApi as zt, useArchbaseRemoteDataSource as Ot } from "@archbase/data";
|
|
22
22
|
import { ArchbaseFormModalTemplate as $t } from "@archbase/template";
|
|
23
23
|
import { createStore as Qt } from "zustand/vanilla";
|
|
24
|
-
const
|
|
24
|
+
const rA = Se.createContext({}), Kt = ({
|
|
25
25
|
navigationData: A,
|
|
26
26
|
user: t,
|
|
27
27
|
owner: o,
|
|
@@ -33,14 +33,14 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
33
33
|
onNavigationDataChange: d,
|
|
34
34
|
initialSidebarCollapsed: c
|
|
35
35
|
}) => {
|
|
36
|
-
const [u, i] =
|
|
36
|
+
const [u, i] = ge(c), [h, p] = ge(!1), [b, C] = ge(() => a === !0), [m, g] = ge(null), f = _(!1), [S, k] = aA({
|
|
37
37
|
value: d !== void 0 ? A : void 0,
|
|
38
38
|
defaultValue: a ? [] : A,
|
|
39
39
|
finalValue: [],
|
|
40
40
|
onChange: d
|
|
41
41
|
});
|
|
42
42
|
te(() => {
|
|
43
|
-
}, [
|
|
43
|
+
}, [S, a]);
|
|
44
44
|
const { securityManager: D } = Er({
|
|
45
45
|
resourceName: l?.navigationResourceName ? l.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
46
46
|
resourceDescription: l?.navigationResourceDescription ? l.navigationResourceDescription : "archbase:Navegação",
|
|
@@ -55,56 +55,56 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
55
55
|
}
|
|
56
56
|
if (f.current)
|
|
57
57
|
return;
|
|
58
|
-
A.filter((
|
|
59
|
-
D.registerAction(
|
|
58
|
+
A.filter((P) => P.showInSidebar).forEach((P) => {
|
|
59
|
+
D.registerAction(P.label, P.label), P?.links?.forEach((y) => D.registerAction(`${P.label} -> ${y.label}`, `${P.label} -> ${y.label}`));
|
|
60
60
|
});
|
|
61
|
-
const
|
|
61
|
+
const z = () => {
|
|
62
62
|
f.current = !0;
|
|
63
|
-
const
|
|
64
|
-
...
|
|
65
|
-
disabled: !D.hasPermission(
|
|
66
|
-
links:
|
|
67
|
-
const
|
|
63
|
+
const P = A.map((y) => ({
|
|
64
|
+
...y,
|
|
65
|
+
disabled: !D.hasPermission(y.label),
|
|
66
|
+
links: y.links && y.links.map((V) => {
|
|
67
|
+
const E = D.hasPermission(`${y.label} -> ${V.label}`);
|
|
68
68
|
return {
|
|
69
|
-
...
|
|
70
|
-
disabled: !
|
|
69
|
+
...V,
|
|
70
|
+
disabled: !E
|
|
71
71
|
};
|
|
72
72
|
})
|
|
73
73
|
}));
|
|
74
|
-
|
|
74
|
+
k(P), C(!1), g(null);
|
|
75
75
|
}, U = !D.isLoading() && !D.isError();
|
|
76
76
|
if (D.isError()) {
|
|
77
77
|
f.current = !0;
|
|
78
|
-
const
|
|
79
|
-
g(
|
|
78
|
+
const P = D.getError() || "Erro ao carregar permissões de navegação";
|
|
79
|
+
g(P), C(!1), k(A);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
if (U) {
|
|
83
|
-
|
|
83
|
+
z();
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
C(!0), g(null);
|
|
87
|
-
let
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
clearInterval(
|
|
91
|
-
const
|
|
92
|
-
g(
|
|
87
|
+
let $ = !1;
|
|
88
|
+
const M = setInterval(() => {
|
|
89
|
+
if (!$ && D.isError()) {
|
|
90
|
+
clearInterval(M), f.current = !0;
|
|
91
|
+
const P = D.getError() || "Erro ao carregar permissões de navegação";
|
|
92
|
+
g(P), C(!1), k(A);
|
|
93
93
|
}
|
|
94
|
-
}, 100),
|
|
95
|
-
|
|
94
|
+
}, 100), F = setTimeout(() => {
|
|
95
|
+
$ || (clearInterval(M), C((P) => P && (f.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), k(A), !1)));
|
|
96
96
|
}, 3e3);
|
|
97
97
|
return D.apply(() => {
|
|
98
|
-
|
|
98
|
+
$ || (clearInterval(M), clearTimeout(F), z());
|
|
99
99
|
}), () => {
|
|
100
|
-
|
|
100
|
+
$ = !0, clearInterval(M), clearTimeout(F);
|
|
101
101
|
};
|
|
102
|
-
}, [t?.id, a, A, D,
|
|
103
|
-
|
|
102
|
+
}, [t?.id, a, A, D, k]), /* @__PURE__ */ r(
|
|
103
|
+
rA.Provider,
|
|
104
104
|
{
|
|
105
105
|
value: {
|
|
106
|
-
navigationData:
|
|
107
|
-
setNavigationData:
|
|
106
|
+
navigationData: S,
|
|
107
|
+
setNavigationData: k,
|
|
108
108
|
user: t,
|
|
109
109
|
owner: o,
|
|
110
110
|
company: e,
|
|
@@ -120,8 +120,8 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
120
120
|
children: s
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
|
-
}, Rn = ({ children: A }) => /* @__PURE__ */ r(
|
|
124
|
-
const A =
|
|
123
|
+
}, Rn = ({ children: A }) => /* @__PURE__ */ r(Ye, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: A }), Ft = () => {
|
|
124
|
+
const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(oe().language);
|
|
125
125
|
te(() => {
|
|
126
126
|
const d = (c) => {
|
|
127
127
|
n(c);
|
|
@@ -132,16 +132,16 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
132
132
|
}, []);
|
|
133
133
|
const s = (d) => {
|
|
134
134
|
if (!d)
|
|
135
|
-
return /* @__PURE__ */ r(
|
|
135
|
+
return /* @__PURE__ */ r(He, { size: 24 });
|
|
136
136
|
if (d === "en" || d === "en-US")
|
|
137
137
|
return /* @__PURE__ */ r(ZA, { size: 24 });
|
|
138
138
|
if (d === "pt-BR")
|
|
139
|
-
return /* @__PURE__ */ r(
|
|
139
|
+
return /* @__PURE__ */ r(He, { size: 24 });
|
|
140
140
|
if (d.includes("es"))
|
|
141
141
|
switch (navigator.language || navigator.languages[0]) {
|
|
142
142
|
case "es":
|
|
143
143
|
case "es-ES":
|
|
144
|
-
return /* @__PURE__ */ r(
|
|
144
|
+
return /* @__PURE__ */ r(uA, { size: 24 });
|
|
145
145
|
case "es-AR":
|
|
146
146
|
return /* @__PURE__ */ r(gt, { size: 24 });
|
|
147
147
|
case "es-BO":
|
|
@@ -179,13 +179,13 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
179
179
|
case "es-VE":
|
|
180
180
|
return /* @__PURE__ */ r(Zr, { size: 24 });
|
|
181
181
|
default:
|
|
182
|
-
return /* @__PURE__ */ r(
|
|
182
|
+
return /* @__PURE__ */ r(uA, { size: 24 });
|
|
183
183
|
}
|
|
184
|
-
return /* @__PURE__ */ r(
|
|
184
|
+
return /* @__PURE__ */ r(He, { size: 24 });
|
|
185
185
|
}, a = () => {
|
|
186
186
|
if (A.languages)
|
|
187
187
|
return A.languages.filter((d) => d).map((d) => /* @__PURE__ */ r(
|
|
188
|
-
|
|
188
|
+
ie.Item,
|
|
189
189
|
{
|
|
190
190
|
onClick: () => l(d.lang),
|
|
191
191
|
leftSection: s(d.lang),
|
|
@@ -196,15 +196,15 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
196
196
|
}, l = (d) => {
|
|
197
197
|
oe().changeLanguage(d);
|
|
198
198
|
};
|
|
199
|
-
return /* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */ r(
|
|
201
|
-
/* @__PURE__ */ r(
|
|
199
|
+
return /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
200
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { variant: "transparent", color: o ? "white" : "blue", title: oe().t("toggleLanguage"), children: s(e) }) }),
|
|
201
|
+
/* @__PURE__ */ r(ie.Dropdown, { children: a() })
|
|
202
202
|
] });
|
|
203
203
|
}, Vt = () => {
|
|
204
|
-
const A =
|
|
204
|
+
const A = bA(), { colorScheme: t } = de(), { t: o, i18n: e } = mA(), n = (l) => l === "en" ? /* @__PURE__ */ r(ZA, { size: 24 }) : l === "pt-BR" ? /* @__PURE__ */ r(He, { size: 24 }) : l === "es" ? /* @__PURE__ */ r(uA, { size: 24 }) : /* @__PURE__ */ r(He, { size: 24 }), s = () => {
|
|
205
205
|
if (A.languages)
|
|
206
206
|
return A.languages.filter((l) => l).map((l) => /* @__PURE__ */ r(
|
|
207
|
-
|
|
207
|
+
ie.Item,
|
|
208
208
|
{
|
|
209
209
|
onClick: () => a(l.lang),
|
|
210
210
|
leftSection: n(l.lang),
|
|
@@ -215,9 +215,9 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
215
215
|
}, a = (l) => {
|
|
216
216
|
e.changeLanguage(l);
|
|
217
217
|
};
|
|
218
|
-
return /* @__PURE__ */
|
|
219
|
-
/* @__PURE__ */ r(
|
|
220
|
-
|
|
218
|
+
return /* @__PURE__ */ R(ie, { children: [
|
|
219
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ R(
|
|
220
|
+
Le,
|
|
221
221
|
{
|
|
222
222
|
w: "100%",
|
|
223
223
|
justify: "flex-start",
|
|
@@ -233,18 +233,18 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
233
233
|
]
|
|
234
234
|
}
|
|
235
235
|
) }),
|
|
236
|
-
/* @__PURE__ */ r(
|
|
236
|
+
/* @__PURE__ */ r(ie.Dropdown, { children: s() })
|
|
237
237
|
] });
|
|
238
238
|
}, Gt = ({
|
|
239
239
|
toggleColorScheme: A,
|
|
240
240
|
sunColor: t = "white",
|
|
241
241
|
moonColor: o = "blue"
|
|
242
242
|
}) => {
|
|
243
|
-
const { t: e } =
|
|
243
|
+
const { t: e } = mA(), { colorScheme: n, toggleColorScheme: s } = de(), a = () => {
|
|
244
244
|
A ? A() : s();
|
|
245
245
|
}, l = n === "dark";
|
|
246
246
|
return /* @__PURE__ */ r(
|
|
247
|
-
|
|
247
|
+
De,
|
|
248
248
|
{
|
|
249
249
|
variant: "transparent",
|
|
250
250
|
color: l ? t : o,
|
|
@@ -253,22 +253,22 @@ const AA = ke.createContext({}), Kt = ({
|
|
|
253
253
|
children: l ? /* @__PURE__ */ r(jA, { size: "1.5rem" }) : /* @__PURE__ */ r(XA, { size: "1.5rem" })
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
|
-
}, Bt = (A) => /* @__PURE__ */ r(
|
|
256
|
+
}, Bt = (A) => /* @__PURE__ */ r(Le, { gap: "sm", children: A.children });
|
|
257
257
|
function Ut({ category: A, label: t, color: o, description: e, image: n, onClick: s }) {
|
|
258
258
|
return /* @__PURE__ */ r(
|
|
259
|
-
|
|
259
|
+
Ue.Action,
|
|
260
260
|
{
|
|
261
261
|
onClick: s,
|
|
262
262
|
label: `${oe().t(t || "")}`,
|
|
263
263
|
description: e ? oe().t(e) : void 0,
|
|
264
|
-
leftSection: n ? /* @__PURE__ */ r(
|
|
265
|
-
rightSection: A ? /* @__PURE__ */ r(
|
|
264
|
+
leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Nr, { src: n, alt: oe().t(t || ""), width: 24, height: 24 }) }) : void 0,
|
|
265
|
+
rightSection: A ? /* @__PURE__ */ r(pA, { color: o, size: "sm", children: oe().t(A) }) : void 0
|
|
266
266
|
},
|
|
267
267
|
t
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
270
|
const Ht = ({ navigationData: A, color: t }) => {
|
|
271
|
-
const [o, e] =
|
|
271
|
+
const [o, e] = ge(""), n = qe(), { t: s } = mA(), a = ce(() => {
|
|
272
272
|
const d = new Array();
|
|
273
273
|
return A.forEach((c) => {
|
|
274
274
|
c.links ? c.links.forEach((u) => {
|
|
@@ -297,17 +297,17 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
297
297
|
const c = `${s(d.label || "")}`;
|
|
298
298
|
return c && c.toLowerCase().includes(o.toLowerCase().trim());
|
|
299
299
|
}).map((d) => /* @__PURE__ */ r(Ut, { ...d }, d.id));
|
|
300
|
-
return /* @__PURE__ */ r(
|
|
301
|
-
/* @__PURE__ */ r(
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
|
|
300
|
+
return /* @__PURE__ */ r(Pe, { children: a && a.length > 0 ? /* @__PURE__ */ R(Pe, { children: [
|
|
301
|
+
/* @__PURE__ */ r(Me, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r(Dr, { color: t, leftSection: /* @__PURE__ */ r(Fr, { size: "24px" }), onClick: () => bt.open() }) }),
|
|
302
|
+
/* @__PURE__ */ R(
|
|
303
|
+
Ue.Root,
|
|
304
304
|
{
|
|
305
305
|
shortcut: ["mod + M", "/"],
|
|
306
306
|
onQueryChange: (d) => e(d),
|
|
307
307
|
query: o,
|
|
308
308
|
children: [
|
|
309
|
-
/* @__PURE__ */ r(
|
|
310
|
-
/* @__PURE__ */ r(
|
|
309
|
+
/* @__PURE__ */ r(Ue.Search, { placeholder: `${s("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ r(_e, { size: "1.2rem" }) }),
|
|
310
|
+
/* @__PURE__ */ r(ze.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Ue.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Ue.Empty, { children: oe().t("archbase:Nenhum resultado...") }) }) })
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
)
|
|
@@ -332,26 +332,26 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
332
332
|
headerActions: m,
|
|
333
333
|
styleLogo: g,
|
|
334
334
|
showLanguageSelector: f = !1,
|
|
335
|
-
sideBarHiddenBreakPoint:
|
|
336
|
-
headerLeftContent:
|
|
335
|
+
sideBarHiddenBreakPoint: S,
|
|
336
|
+
headerLeftContent: k,
|
|
337
337
|
toggleColorScheme: D,
|
|
338
|
-
logoLeftSection:
|
|
339
|
-
logoRightSection:
|
|
338
|
+
logoLeftSection: j,
|
|
339
|
+
logoRightSection: z,
|
|
340
340
|
showBurger: U = !0,
|
|
341
|
-
showCommands:
|
|
342
|
-
sunColor:
|
|
343
|
-
moonColor:
|
|
344
|
-
styles:
|
|
341
|
+
showCommands: O = !0,
|
|
342
|
+
sunColor: $,
|
|
343
|
+
moonColor: M,
|
|
344
|
+
styles: F
|
|
345
345
|
}) => {
|
|
346
|
-
const
|
|
347
|
-
`(max-width: ${
|
|
348
|
-
),
|
|
349
|
-
`(max-width: ${i ? fe(i) :
|
|
346
|
+
const P = me(), { colorScheme: y, toggleColorScheme: V } = de(), E = ve(rA), W = PA(
|
|
347
|
+
`(max-width: ${S ? fe(S) : P.breakpoints.md})`
|
|
348
|
+
), H = PA(
|
|
349
|
+
`(max-width: ${i ? fe(i) : P.breakpoints.md})`
|
|
350
350
|
);
|
|
351
|
-
let
|
|
352
|
-
return d && (c = !
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
|
|
351
|
+
let I = !1, G = !1;
|
|
352
|
+
return d && (c = !H, u = !H, t = H, o = H, a = H, h = H, f && (G = !H, I = H)), /* @__PURE__ */ R(Pe, { children: [
|
|
353
|
+
/* @__PURE__ */ R(Ye, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
354
|
+
j,
|
|
355
355
|
/* @__PURE__ */ r(
|
|
356
356
|
"img",
|
|
357
357
|
{
|
|
@@ -363,29 +363,29 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
363
363
|
src: C
|
|
364
364
|
}
|
|
365
365
|
),
|
|
366
|
-
|
|
366
|
+
z
|
|
367
367
|
] }),
|
|
368
368
|
U && /* @__PURE__ */ r(
|
|
369
369
|
zr,
|
|
370
370
|
{
|
|
371
|
-
opened:
|
|
372
|
-
onClick: () =>
|
|
371
|
+
opened: E.hidden ? E.hidden : !1,
|
|
372
|
+
onClick: () => E.setHidden(!E.hidden),
|
|
373
373
|
size: "sm",
|
|
374
|
-
color:
|
|
374
|
+
color: P.colors.gray[7],
|
|
375
375
|
mx: { base: "xs", xs: "lg", sm: "xl" },
|
|
376
|
-
display:
|
|
376
|
+
display: W ? "" : "none"
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */ r("div", { children:
|
|
380
|
-
/* @__PURE__ */ r(
|
|
381
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ r("div", { children: O && /* @__PURE__ */ r(Ht, { navigationData: b }) }),
|
|
380
|
+
/* @__PURE__ */ r(B, { style: { flex: 1 }, children: k }),
|
|
381
|
+
/* @__PURE__ */ R(Bt, { children: [
|
|
382
382
|
c && m,
|
|
383
|
-
u && /* @__PURE__ */ r(Gt, { toggleColorScheme: D, sunColor:
|
|
384
|
-
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */ r(
|
|
383
|
+
u && /* @__PURE__ */ r(Gt, { toggleColorScheme: D, sunColor: $, moonColor: M }),
|
|
384
|
+
G && /* @__PURE__ */ r(Ft, {}),
|
|
385
|
+
/* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: F?.menu, children: [
|
|
386
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ R("div", { children: [
|
|
387
387
|
/* @__PURE__ */ r(
|
|
388
|
-
|
|
388
|
+
iA,
|
|
389
389
|
{
|
|
390
390
|
style: { cursor: "pointer" },
|
|
391
391
|
radius: "xl",
|
|
@@ -411,24 +411,24 @@ const Ht = ({ navigationData: A, color: t }) => {
|
|
|
411
411
|
borderRadius: 50,
|
|
412
412
|
backgroundColor: "green"
|
|
413
413
|
},
|
|
414
|
-
children: /* @__PURE__ */ r(
|
|
414
|
+
children: /* @__PURE__ */ r(Te, { size: "xs", c: "white", children: "A" })
|
|
415
415
|
}
|
|
416
416
|
) : null
|
|
417
417
|
] }) }),
|
|
418
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
419
419
|
A,
|
|
420
|
-
o && /* @__PURE__ */ r(
|
|
420
|
+
o && /* @__PURE__ */ r(ie.Label, { children: `${oe().t("archbase:Opções")}` }),
|
|
421
421
|
a && l,
|
|
422
422
|
t && /* @__PURE__ */ r(
|
|
423
|
-
|
|
423
|
+
ie.Item,
|
|
424
424
|
{
|
|
425
|
-
leftSection:
|
|
426
|
-
onClick: D ||
|
|
425
|
+
leftSection: y === "dark" ? /* @__PURE__ */ r(jA, { size: e }) : /* @__PURE__ */ r(XA, { size: e }),
|
|
426
|
+
onClick: D || V,
|
|
427
427
|
children: `${oe().t("archbase:toggleColorScheme")}`
|
|
428
428
|
}
|
|
429
429
|
),
|
|
430
|
-
|
|
431
|
-
h && /* @__PURE__ */ r(
|
|
430
|
+
I && /* @__PURE__ */ r(Vt, {}),
|
|
431
|
+
h && /* @__PURE__ */ r(ie.Divider, {}),
|
|
432
432
|
n && s
|
|
433
433
|
] })
|
|
434
434
|
] })
|
|
@@ -439,7 +439,7 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
439
439
|
const u = s ? A.colorScheme === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][7] : void 0, i = s ? (A.colorScheme === "dark", A.colors[A.primaryColor][0]) : void 0, h = A.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", p = "0.5";
|
|
440
440
|
if (e.links) {
|
|
441
441
|
if (!(e.disabled && e.hideDisabledItem))
|
|
442
|
-
return /* @__PURE__ */ r(
|
|
442
|
+
return /* @__PURE__ */ r(Me, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
|
|
443
443
|
Et,
|
|
444
444
|
{
|
|
445
445
|
rootStyles: {
|
|
@@ -470,7 +470,7 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
470
470
|
id: e.label,
|
|
471
471
|
icon: e.icon,
|
|
472
472
|
defaultOpen: !e.disabled,
|
|
473
|
-
label: t ? "" :
|
|
473
|
+
label: t ? "" : Re.t(e.label),
|
|
474
474
|
disabled: e.disabled,
|
|
475
475
|
children: e.links && e.links.filter((b) => b.showInSidebar === !0 && (!b.disabled || !b.hideDisabledItem)).map((b, C) => /* @__PURE__ */ r(
|
|
476
476
|
DA,
|
|
@@ -510,7 +510,7 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
510
510
|
icon: b.icon,
|
|
511
511
|
disabled: typeof b.disabled == "function" ? b.disabled() : b.disabled,
|
|
512
512
|
active: l && b.link === a,
|
|
513
|
-
children:
|
|
513
|
+
children: Re.t(b.label)
|
|
514
514
|
},
|
|
515
515
|
C
|
|
516
516
|
))
|
|
@@ -518,7 +518,7 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
518
518
|
n
|
|
519
519
|
) });
|
|
520
520
|
} else if (e.showInSidebar && (!e.disabled || !e.hideDisabledItem))
|
|
521
|
-
return /* @__PURE__ */ r(
|
|
521
|
+
return /* @__PURE__ */ r(Me, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
|
|
522
522
|
DA,
|
|
523
523
|
{
|
|
524
524
|
rootStyles: {
|
|
@@ -556,7 +556,7 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
|
|
|
556
556
|
onClick: () => o(e),
|
|
557
557
|
icon: e.icon,
|
|
558
558
|
active: l && e.link === a,
|
|
559
|
-
children: t ? "" :
|
|
559
|
+
children: t ? "" : Re.t(e.label)
|
|
560
560
|
},
|
|
561
561
|
n
|
|
562
562
|
) });
|
|
@@ -644,7 +644,7 @@ const qt = (A) => ({
|
|
|
644
644
|
};
|
|
645
645
|
};
|
|
646
646
|
function Xt(A, t, o, e, n, s, a, l, d, c, u) {
|
|
647
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ R(
|
|
648
648
|
tr,
|
|
649
649
|
{
|
|
650
650
|
ref: A,
|
|
@@ -663,9 +663,9 @@ function Xt(A, t, o, e, n, s, a, l, d, c, u) {
|
|
|
663
663
|
width: `${fe(o)}px`,
|
|
664
664
|
collapsedWidth: `${fe(e)}px`,
|
|
665
665
|
children: [
|
|
666
|
-
d && /* @__PURE__ */ r(
|
|
667
|
-
/* @__PURE__ */ r(
|
|
668
|
-
c && /* @__PURE__ */ r(
|
|
666
|
+
d && /* @__PURE__ */ r(Pe, { children: d }),
|
|
667
|
+
/* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(or, { rootStyles: { background: u }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(Pe, { children: s }) }) }),
|
|
668
|
+
c && /* @__PURE__ */ r(Pe, { children: c })
|
|
669
669
|
]
|
|
670
670
|
}
|
|
671
671
|
);
|
|
@@ -675,9 +675,9 @@ function zA({
|
|
|
675
675
|
collapsed: t = !1,
|
|
676
676
|
backgroundColor: o
|
|
677
677
|
}) {
|
|
678
|
-
const e =
|
|
678
|
+
const e = me(), { colorScheme: n } = de(), s = o ?? (n === "dark" ? e.colors.dark[7] : e.white);
|
|
679
679
|
return t ? /* @__PURE__ */ r(
|
|
680
|
-
|
|
680
|
+
J,
|
|
681
681
|
{
|
|
682
682
|
gap: "sm",
|
|
683
683
|
p: "xs",
|
|
@@ -698,7 +698,7 @@ function zA({
|
|
|
698
698
|
))
|
|
699
699
|
}
|
|
700
700
|
) : /* @__PURE__ */ r(
|
|
701
|
-
|
|
701
|
+
J,
|
|
702
702
|
{
|
|
703
703
|
gap: "xs",
|
|
704
704
|
p: "md",
|
|
@@ -708,7 +708,7 @@ function zA({
|
|
|
708
708
|
width: "100%",
|
|
709
709
|
height: "100%"
|
|
710
710
|
},
|
|
711
|
-
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */
|
|
711
|
+
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(Le, { gap: "sm", wrap: "nowrap", children: [
|
|
712
712
|
/* @__PURE__ */ r(
|
|
713
713
|
pe,
|
|
714
714
|
{
|
|
@@ -735,9 +735,9 @@ function Jt({
|
|
|
735
735
|
height: o = "100%",
|
|
736
736
|
backgroundColor: e
|
|
737
737
|
}) {
|
|
738
|
-
const n =
|
|
738
|
+
const n = me(), { colorScheme: s } = de(), a = e ?? (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,7 +747,7 @@ function Jt({
|
|
|
747
747
|
height: o,
|
|
748
748
|
backgroundColor: a
|
|
749
749
|
},
|
|
750
|
-
children: Array.from({ length: A }).map((l, d) => /* @__PURE__ */
|
|
750
|
+
children: Array.from({ length: A }).map((l, d) => /* @__PURE__ */ R(J, { gap: 4, align: "center", children: [
|
|
751
751
|
/* @__PURE__ */ r(
|
|
752
752
|
pe,
|
|
753
753
|
{
|
|
@@ -774,10 +774,10 @@ function OA({
|
|
|
774
774
|
backgroundColor: t,
|
|
775
775
|
children: o
|
|
776
776
|
}) {
|
|
777
|
-
const e =
|
|
778
|
-
return o ? /* @__PURE__ */ r(
|
|
777
|
+
const e = me(), { colorScheme: n } = de(), s = t ?? (n === "dark" ? e.colors.dark[7] : e.white), a = n === "dark" ? e.colors.red[4] : e.colors.red[6];
|
|
778
|
+
return o ? /* @__PURE__ */ r(Pe, { children: o }) : /* @__PURE__ */ r(Je, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(J, { align: "center", gap: "xs", children: [
|
|
779
779
|
/* @__PURE__ */ r(Vr, { size: 32, color: a }),
|
|
780
|
-
/* @__PURE__ */ r(
|
|
780
|
+
/* @__PURE__ */ r(Te, { size: "sm", c: a, ta: "center", children: A })
|
|
781
781
|
] }) });
|
|
782
782
|
}
|
|
783
783
|
function _t({
|
|
@@ -800,51 +800,51 @@ function _t({
|
|
|
800
800
|
withBorder: m = !1,
|
|
801
801
|
showGroupLabels: g = !0,
|
|
802
802
|
theme: f,
|
|
803
|
-
sidebarRef:
|
|
804
|
-
defaultGroupIcon:
|
|
803
|
+
sidebarRef: S,
|
|
804
|
+
defaultGroupIcon: k,
|
|
805
805
|
selectedGroupName: D,
|
|
806
|
-
sideBarHeaderContent:
|
|
807
|
-
iconsWithBackground:
|
|
806
|
+
sideBarHeaderContent: j,
|
|
807
|
+
iconsWithBackground: z = !1,
|
|
808
808
|
menuItemHeight: U = 40,
|
|
809
|
-
highlightActiveMenuItem:
|
|
810
|
-
backgroundDarkColor:
|
|
811
|
-
backgroundLightColor:
|
|
812
|
-
textDarkColor:
|
|
813
|
-
textLightColor:
|
|
814
|
-
iconDarkColor:
|
|
815
|
-
iconLightColor:
|
|
816
|
-
collapsedSubmenuWidth:
|
|
817
|
-
isLoading:
|
|
818
|
-
loadingError:
|
|
819
|
-
loadingComponent:
|
|
820
|
-
errorComponent:
|
|
821
|
-
skeletonItemCount:
|
|
822
|
-
skeletonGroupCount:
|
|
809
|
+
highlightActiveMenuItem: O = !0,
|
|
810
|
+
backgroundDarkColor: $,
|
|
811
|
+
backgroundLightColor: M,
|
|
812
|
+
textDarkColor: F,
|
|
813
|
+
textLightColor: P,
|
|
814
|
+
iconDarkColor: y,
|
|
815
|
+
iconLightColor: V,
|
|
816
|
+
collapsedSubmenuWidth: E,
|
|
817
|
+
isLoading: W = !1,
|
|
818
|
+
loadingError: H,
|
|
819
|
+
loadingComponent: I,
|
|
820
|
+
errorComponent: G,
|
|
821
|
+
skeletonItemCount: ne = 8,
|
|
822
|
+
skeletonGroupCount: we = 3
|
|
823
823
|
}) {
|
|
824
|
-
const [
|
|
825
|
-
const
|
|
826
|
-
return A.forEach((
|
|
827
|
-
if (
|
|
828
|
-
let
|
|
829
|
-
|
|
830
|
-
icon:
|
|
824
|
+
const [se, be] = ge(""), ke = bA(), T = je(), { colorScheme: v } = de(), Q = v === "dark" ? $ ?? f.colors.dark[7] : M ?? f.white, L = s || (v === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), x = v === "dark" ? F ?? "var(--mantine-color-text)" : P ?? "var(--mantine-color-text)", X = v === "dark" ? y ?? f.colors[f.primaryColor][0] : V ?? f.colors[f.primaryColor][7], N = ce(() => {
|
|
825
|
+
const Ae = /* @__PURE__ */ new Set();
|
|
826
|
+
return A.forEach((q) => {
|
|
827
|
+
if (q.showInSidebar && (!q.disabled || !q.hideDisabledItem)) {
|
|
828
|
+
let ye = !1;
|
|
829
|
+
q.group || (q.group = {
|
|
830
|
+
icon: k || /* @__PURE__ */ r(JA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
831
831
|
label: "Default",
|
|
832
832
|
name: "Default",
|
|
833
833
|
hint: "Default",
|
|
834
834
|
indexOrder: 0
|
|
835
|
-
}),
|
|
836
|
-
|
|
837
|
-
}),
|
|
838
|
-
name:
|
|
839
|
-
indexOrder:
|
|
835
|
+
}), Ae.forEach((K) => {
|
|
836
|
+
K.name === q.group.name && (ye = !0);
|
|
837
|
+
}), ye || Ae.add({
|
|
838
|
+
name: q.group.name,
|
|
839
|
+
indexOrder: q.group.indexOrder,
|
|
840
840
|
component: /* @__PURE__ */ r(
|
|
841
|
-
|
|
841
|
+
Me,
|
|
842
842
|
{
|
|
843
|
-
content:
|
|
844
|
-
label:
|
|
843
|
+
content: q.group.hint,
|
|
844
|
+
label: q.group.label,
|
|
845
845
|
disabled: g,
|
|
846
|
-
children: /* @__PURE__ */
|
|
847
|
-
|
|
846
|
+
children: /* @__PURE__ */ R(
|
|
847
|
+
J,
|
|
848
848
|
{
|
|
849
849
|
gap: "2px",
|
|
850
850
|
style: {
|
|
@@ -855,74 +855,74 @@ function _t({
|
|
|
855
855
|
},
|
|
856
856
|
children: [
|
|
857
857
|
/* @__PURE__ */ r(
|
|
858
|
-
|
|
858
|
+
De,
|
|
859
859
|
{
|
|
860
860
|
size: "48px",
|
|
861
|
-
variant:
|
|
862
|
-
color:
|
|
861
|
+
variant: q.group.name === se ? "filled" : l ? "subtle" : "light",
|
|
862
|
+
color: q.group.name === se ? L : a,
|
|
863
863
|
onClick: () => {
|
|
864
|
-
|
|
864
|
+
be((K) => (C && C(K, q.group.name), q.group.name === K && !d ? "" : q.group.name));
|
|
865
865
|
},
|
|
866
|
-
children:
|
|
866
|
+
children: q.group.icon
|
|
867
867
|
}
|
|
868
868
|
),
|
|
869
869
|
g ? /* @__PURE__ */ r(
|
|
870
|
-
|
|
870
|
+
Te,
|
|
871
871
|
{
|
|
872
872
|
size: "xs",
|
|
873
|
-
c:
|
|
874
|
-
children:
|
|
873
|
+
c: v === "dark" ? i || f.colors[f.primaryColor][2] : h || f.colors[f.primaryColor][2],
|
|
874
|
+
children: q.group.label
|
|
875
875
|
}
|
|
876
876
|
) : !1
|
|
877
877
|
]
|
|
878
878
|
}
|
|
879
879
|
)
|
|
880
880
|
},
|
|
881
|
-
|
|
881
|
+
q.group.name
|
|
882
882
|
)
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
|
-
}),
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
}), [...
|
|
889
|
-
}, [A,
|
|
890
|
-
|
|
885
|
+
}), Ae.forEach((q) => {
|
|
886
|
+
const ye = A.filter((K) => K.showInSidebar === !0 && (!K.disabled || !K.hideDisabledItem) && K.group && K.group.name === q.name);
|
|
887
|
+
q.links = ye.map((K, ue) => NA(f, p, b, K, ue, z, T.pathname, O, x, E));
|
|
888
|
+
}), [...Ae].sort((q, ye) => q.indexOrder - ye.indexOrder);
|
|
889
|
+
}, [A, se, v, p, ke.selectedCompany, O, T]), Y = jt(
|
|
890
|
+
v,
|
|
891
891
|
f,
|
|
892
892
|
p,
|
|
893
893
|
35,
|
|
894
894
|
Number(fe(n)),
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
N.length > 1,
|
|
896
|
+
z,
|
|
897
897
|
U,
|
|
898
898
|
Q,
|
|
899
899
|
x,
|
|
900
|
-
|
|
901
|
-
),
|
|
902
|
-
D &&
|
|
900
|
+
X
|
|
901
|
+
), Ce = p || se === "" ? "0px" : `calc(${o} - ${t})`, le = l || (v === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), xe = w(() => {
|
|
902
|
+
D && N.map((Ae) => Ae.name).includes(D) ? be(D) : N.length > 1 && be("Default");
|
|
903
903
|
}, []);
|
|
904
904
|
te(() => {
|
|
905
|
-
|
|
905
|
+
xe();
|
|
906
906
|
}, []), te(() => {
|
|
907
|
-
p ?
|
|
907
|
+
p ? be("") : se === "" && xe();
|
|
908
908
|
}, [p]);
|
|
909
|
-
const
|
|
909
|
+
const Z = () => H ? G || /* @__PURE__ */ r(
|
|
910
910
|
OA,
|
|
911
911
|
{
|
|
912
|
-
message:
|
|
912
|
+
message: H,
|
|
913
913
|
backgroundColor: Q
|
|
914
914
|
}
|
|
915
|
-
) :
|
|
915
|
+
) : W ? I || /* @__PURE__ */ r(
|
|
916
916
|
zA,
|
|
917
917
|
{
|
|
918
|
-
itemCount:
|
|
918
|
+
itemCount: ne,
|
|
919
919
|
collapsed: p,
|
|
920
920
|
backgroundColor: Q
|
|
921
921
|
}
|
|
922
|
-
) :
|
|
922
|
+
) : se !== "" ? /* @__PURE__ */ r(
|
|
923
923
|
tr,
|
|
924
924
|
{
|
|
925
|
-
ref:
|
|
925
|
+
ref: S,
|
|
926
926
|
rootStyles: {
|
|
927
927
|
[`.${nr.container}`]: {
|
|
928
928
|
background: Q,
|
|
@@ -932,90 +932,90 @@ function _t({
|
|
|
932
932
|
height: `${fe(e)}px`
|
|
933
933
|
}
|
|
934
934
|
},
|
|
935
|
-
style: { borderColor:
|
|
935
|
+
style: { borderColor: v === "dark" ? "#000" : "#efefef" },
|
|
936
936
|
collapsed: p,
|
|
937
|
-
width: `${fe(
|
|
937
|
+
width: `${fe(Ce)}`,
|
|
938
938
|
collapsedWidth: "0px",
|
|
939
939
|
children: /* @__PURE__ */ r(
|
|
940
|
-
|
|
940
|
+
ze,
|
|
941
941
|
{
|
|
942
942
|
style: {
|
|
943
943
|
overflowY: "auto",
|
|
944
944
|
overflowX: "hidden",
|
|
945
945
|
height: "100%",
|
|
946
|
-
width:
|
|
946
|
+
width: Ce
|
|
947
947
|
},
|
|
948
|
-
children: /* @__PURE__ */ r(or, { rootStyles: { background: Q }, menuItemStyles:
|
|
948
|
+
children: /* @__PURE__ */ r(or, { rootStyles: { background: Q }, menuItemStyles: Y, closeOnClick: !0, children: N.find((Ae) => Ae.name === se)?.links || null })
|
|
949
949
|
}
|
|
950
950
|
)
|
|
951
951
|
}
|
|
952
|
-
) : null,
|
|
952
|
+
) : null, Ie = () => W && N.length === 0 ? /* @__PURE__ */ r(
|
|
953
953
|
Jt,
|
|
954
954
|
{
|
|
955
|
-
groupCount:
|
|
955
|
+
groupCount: we,
|
|
956
956
|
width: t,
|
|
957
957
|
height: e
|
|
958
958
|
}
|
|
959
|
-
) :
|
|
960
|
-
|
|
959
|
+
) : N.length !== 0 ? /* @__PURE__ */ r(
|
|
960
|
+
J,
|
|
961
961
|
{
|
|
962
962
|
gap: "4px",
|
|
963
963
|
style: {
|
|
964
964
|
height: e,
|
|
965
965
|
width: t,
|
|
966
966
|
padding: "4px",
|
|
967
|
-
backgroundColor:
|
|
967
|
+
backgroundColor: le
|
|
968
968
|
},
|
|
969
|
-
children:
|
|
969
|
+
children: N.map((Ae) => /* @__PURE__ */ r(Se.Fragment, { children: Ae.component }, Ae.name))
|
|
970
970
|
}
|
|
971
|
-
) : null,
|
|
971
|
+
) : null, ee = () => H ? G || /* @__PURE__ */ r(
|
|
972
972
|
OA,
|
|
973
973
|
{
|
|
974
|
-
message:
|
|
974
|
+
message: H,
|
|
975
975
|
backgroundColor: Q
|
|
976
976
|
}
|
|
977
|
-
) :
|
|
977
|
+
) : W ? I || /* @__PURE__ */ r(
|
|
978
978
|
zA,
|
|
979
979
|
{
|
|
980
|
-
itemCount:
|
|
980
|
+
itemCount: ne,
|
|
981
981
|
collapsed: p,
|
|
982
982
|
backgroundColor: Q
|
|
983
983
|
}
|
|
984
984
|
) : A.map(
|
|
985
|
-
(
|
|
985
|
+
(Ae, Ee) => NA(f, p, b, Ae, Ee, z, T.pathname, O, x, E)
|
|
986
986
|
);
|
|
987
|
-
return /* @__PURE__ */ r(
|
|
988
|
-
|
|
987
|
+
return /* @__PURE__ */ r(Pe, { children: N.length == 1 ? Xt(
|
|
988
|
+
S,
|
|
989
989
|
p,
|
|
990
990
|
o,
|
|
991
991
|
n,
|
|
992
|
-
|
|
993
|
-
|
|
992
|
+
Y,
|
|
993
|
+
ee(),
|
|
994
994
|
d,
|
|
995
995
|
e,
|
|
996
|
-
|
|
996
|
+
j,
|
|
997
997
|
u,
|
|
998
998
|
Q
|
|
999
|
-
) : /* @__PURE__ */
|
|
1000
|
-
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children:
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
|
|
1003
|
-
|
|
999
|
+
) : /* @__PURE__ */ R(Ye, { direction: "column", w: p ? n : o, children: [
|
|
1000
|
+
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: j }),
|
|
1001
|
+
/* @__PURE__ */ R(Or, { withBorder: m, h: e, w: "100%", display: "flex", children: [
|
|
1002
|
+
Ie(),
|
|
1003
|
+
Z()
|
|
1004
1004
|
] }),
|
|
1005
1005
|
/* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: u })
|
|
1006
1006
|
] }) });
|
|
1007
1007
|
}
|
|
1008
|
-
const
|
|
1009
|
-
function
|
|
1010
|
-
const A =
|
|
1008
|
+
const yA = Ne(null);
|
|
1009
|
+
function vA() {
|
|
1010
|
+
const A = ve(yA);
|
|
1011
1011
|
if (!A)
|
|
1012
1012
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
1013
1013
|
return A;
|
|
1014
1014
|
}
|
|
1015
1015
|
function Ln() {
|
|
1016
|
-
return
|
|
1016
|
+
return ve(yA);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function CA({
|
|
1019
1019
|
children: A,
|
|
1020
1020
|
navigationData: t,
|
|
1021
1021
|
variant: o = "standard",
|
|
@@ -1029,72 +1029,72 @@ function vA({
|
|
|
1029
1029
|
highlightActiveItem: u = !0,
|
|
1030
1030
|
onMenuItemClick: i
|
|
1031
1031
|
}) {
|
|
1032
|
-
const h =
|
|
1032
|
+
const h = je(), p = qe(), [b, C] = aA({
|
|
1033
1033
|
value: n,
|
|
1034
1034
|
defaultValue: e,
|
|
1035
1035
|
finalValue: !1,
|
|
1036
1036
|
onChange: s
|
|
1037
|
-
}), [m, g] =
|
|
1037
|
+
}), [m, g] = aA({
|
|
1038
1038
|
value: l,
|
|
1039
1039
|
defaultValue: a,
|
|
1040
1040
|
finalValue: "",
|
|
1041
1041
|
onChange: d
|
|
1042
|
-
}), [f,
|
|
1043
|
-
const
|
|
1044
|
-
return t.forEach((
|
|
1045
|
-
|
|
1046
|
-
}),
|
|
1047
|
-
}),
|
|
1042
|
+
}), [f, S] = ge(""), [k, D] = ge(() => {
|
|
1043
|
+
const y = /* @__PURE__ */ new Set();
|
|
1044
|
+
return t.forEach((V, E) => {
|
|
1045
|
+
V.initiallyOpened && V.links && V.links.length > 0 && y.add(`group-${E}`);
|
|
1046
|
+
}), y;
|
|
1047
|
+
}), j = h.pathname, z = w(() => {
|
|
1048
1048
|
C(!b);
|
|
1049
|
-
}, [b, C]), U =
|
|
1050
|
-
D((
|
|
1051
|
-
const
|
|
1052
|
-
return
|
|
1049
|
+
}, [b, C]), U = w((y) => {
|
|
1050
|
+
D((V) => {
|
|
1051
|
+
const E = new Set(V);
|
|
1052
|
+
return E.has(y) ? E.delete(y) : E.add(y), E;
|
|
1053
1053
|
});
|
|
1054
|
-
}, []),
|
|
1055
|
-
D((
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1054
|
+
}, []), O = w((y) => {
|
|
1055
|
+
D((V) => {
|
|
1056
|
+
const E = new Set(V);
|
|
1057
|
+
return E.add(y), E;
|
|
1058
1058
|
});
|
|
1059
|
-
}, []),
|
|
1060
|
-
D((
|
|
1061
|
-
const
|
|
1062
|
-
return
|
|
1059
|
+
}, []), $ = w((y) => {
|
|
1060
|
+
D((V) => {
|
|
1061
|
+
const E = new Set(V);
|
|
1062
|
+
return E.delete(y), E;
|
|
1063
1063
|
});
|
|
1064
|
-
}, []),
|
|
1064
|
+
}, []), M = ce(() => {
|
|
1065
1065
|
if (!f.trim())
|
|
1066
1066
|
return t;
|
|
1067
|
-
const
|
|
1068
|
-
const
|
|
1069
|
-
return (
|
|
1070
|
-
...
|
|
1071
|
-
links:
|
|
1067
|
+
const y = f.toLowerCase().trim(), V = (E) => E.reduce((W, H) => {
|
|
1068
|
+
const I = H.label.toLowerCase().includes(y), G = H.links ? V(H.links) : [];
|
|
1069
|
+
return (I || G.length > 0) && W.push({
|
|
1070
|
+
...H,
|
|
1071
|
+
links: G.length > 0 ? G : H.links,
|
|
1072
1072
|
// Expandir automaticamente quando há match em subitens
|
|
1073
|
-
initiallyOpened:
|
|
1074
|
-
}),
|
|
1073
|
+
initiallyOpened: G.length > 0 || I
|
|
1074
|
+
}), W;
|
|
1075
1075
|
}, []);
|
|
1076
|
-
return
|
|
1077
|
-
}, [t, f]),
|
|
1078
|
-
(
|
|
1079
|
-
i && i(
|
|
1076
|
+
return V(t);
|
|
1077
|
+
}, [t, f]), F = w(
|
|
1078
|
+
(y) => {
|
|
1079
|
+
i && i(y), y.link && (y.routeParams ? p(y.link, { state: y.routeParams }) : p(y.link)), y.redirect && p(y.redirect);
|
|
1080
1080
|
},
|
|
1081
1081
|
[p, i]
|
|
1082
|
-
),
|
|
1082
|
+
), P = ce(
|
|
1083
1083
|
() => ({
|
|
1084
1084
|
collapsed: b,
|
|
1085
1085
|
setCollapsed: C,
|
|
1086
|
-
toggleCollapsed:
|
|
1086
|
+
toggleCollapsed: z,
|
|
1087
1087
|
activeGroup: m,
|
|
1088
1088
|
setActiveGroup: g,
|
|
1089
|
-
activeItemPath:
|
|
1090
|
-
navigateToItem:
|
|
1089
|
+
activeItemPath: j,
|
|
1090
|
+
navigateToItem: F,
|
|
1091
1091
|
searchQuery: f,
|
|
1092
|
-
setSearchQuery:
|
|
1093
|
-
filteredItems:
|
|
1094
|
-
expandedGroups:
|
|
1092
|
+
setSearchQuery: S,
|
|
1093
|
+
filteredItems: M,
|
|
1094
|
+
expandedGroups: k,
|
|
1095
1095
|
toggleGroup: U,
|
|
1096
|
-
expandGroup:
|
|
1097
|
-
collapseGroup:
|
|
1096
|
+
expandGroup: O,
|
|
1097
|
+
collapseGroup: $,
|
|
1098
1098
|
variant: o,
|
|
1099
1099
|
showKeyboardShortcuts: c,
|
|
1100
1100
|
highlightActiveItem: u
|
|
@@ -1102,29 +1102,29 @@ function vA({
|
|
|
1102
1102
|
[
|
|
1103
1103
|
b,
|
|
1104
1104
|
C,
|
|
1105
|
-
|
|
1105
|
+
z,
|
|
1106
1106
|
m,
|
|
1107
1107
|
g,
|
|
1108
|
-
|
|
1109
|
-
|
|
1108
|
+
j,
|
|
1109
|
+
F,
|
|
1110
1110
|
f,
|
|
1111
|
-
|
|
1112
|
-
|
|
1111
|
+
M,
|
|
1112
|
+
k,
|
|
1113
1113
|
U,
|
|
1114
|
+
O,
|
|
1114
1115
|
$,
|
|
1115
|
-
P,
|
|
1116
1116
|
o,
|
|
1117
1117
|
c,
|
|
1118
1118
|
u
|
|
1119
1119
|
]
|
|
1120
1120
|
);
|
|
1121
|
-
return /* @__PURE__ */ r(
|
|
1121
|
+
return /* @__PURE__ */ r(yA.Provider, { value: P, children: A });
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function wA({
|
|
1124
1124
|
navigationData: A,
|
|
1125
1125
|
onMenuItemClick: t
|
|
1126
1126
|
}) {
|
|
1127
|
-
const o =
|
|
1127
|
+
const o = je(), e = qe(), n = o.pathname, s = w(
|
|
1128
1128
|
(i) => {
|
|
1129
1129
|
for (const h of i) {
|
|
1130
1130
|
if (h.link === n)
|
|
@@ -1138,13 +1138,13 @@ function CA({
|
|
|
1138
1138
|
return null;
|
|
1139
1139
|
},
|
|
1140
1140
|
[n]
|
|
1141
|
-
), a =
|
|
1141
|
+
), a = ce(() => s(A), [s, A]), l = w(
|
|
1142
1142
|
(i) => i.link === n,
|
|
1143
1143
|
[n]
|
|
1144
|
-
), d =
|
|
1144
|
+
), d = w(
|
|
1145
1145
|
(i) => i.link === n ? !0 : i.links ? i.links.some((h) => d(h)) : !1,
|
|
1146
1146
|
[n]
|
|
1147
|
-
), c =
|
|
1147
|
+
), c = ce(() => {
|
|
1148
1148
|
const i = [], h = (p, b) => {
|
|
1149
1149
|
for (const C of p) {
|
|
1150
1150
|
const m = [...b, C];
|
|
@@ -1156,7 +1156,7 @@ function CA({
|
|
|
1156
1156
|
return !1;
|
|
1157
1157
|
};
|
|
1158
1158
|
return h(A, []), i;
|
|
1159
|
-
}, [A, n]), u =
|
|
1159
|
+
}, [A, n]), u = w(
|
|
1160
1160
|
(i) => {
|
|
1161
1161
|
(typeof i.disabled == "function" ? i.disabled() : i.disabled) || (t && t(i), i.link && (i.routeParams ? e(i.link, { state: i.routeParams }) : e(i.link)), i.redirect && e(i.redirect));
|
|
1162
1162
|
},
|
|
@@ -1175,10 +1175,10 @@ function Wt({
|
|
|
1175
1175
|
navigationData: A,
|
|
1176
1176
|
onSearch: t
|
|
1177
1177
|
}) {
|
|
1178
|
-
const [o, e] =
|
|
1178
|
+
const [o, e] = ge(""), n = w((c) => c.reduce((u, i) => {
|
|
1179
1179
|
let h = 1;
|
|
1180
1180
|
return i.links && (h += n(i.links)), u + h;
|
|
1181
|
-
}, 0), []), s =
|
|
1181
|
+
}, 0), []), s = ce(() => {
|
|
1182
1182
|
if (!o.trim())
|
|
1183
1183
|
return A;
|
|
1184
1184
|
const c = o.toLowerCase().trim(), u = (i) => i.reduce((h, p) => {
|
|
@@ -1193,7 +1193,7 @@ function Wt({
|
|
|
1193
1193
|
}), h;
|
|
1194
1194
|
}, []);
|
|
1195
1195
|
return u(A);
|
|
1196
|
-
}, [A, o]), a =
|
|
1196
|
+
}, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = w(
|
|
1197
1197
|
(c) => {
|
|
1198
1198
|
if (e(c), t) {
|
|
1199
1199
|
const u = c.toLowerCase().trim();
|
|
@@ -1215,7 +1215,7 @@ function Wt({
|
|
|
1215
1215
|
}
|
|
1216
1216
|
},
|
|
1217
1217
|
[A, t]
|
|
1218
|
-
), d =
|
|
1218
|
+
), d = w(() => {
|
|
1219
1219
|
l("");
|
|
1220
1220
|
}, [l]);
|
|
1221
1221
|
return {
|
|
@@ -1231,13 +1231,13 @@ function Wt({
|
|
|
1231
1231
|
function Zt(A) {
|
|
1232
1232
|
return A.toLowerCase().replace("ctrl+", "mod+").replace("cmd+", "mod+").replace("control+", "mod+");
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function SA({
|
|
1235
1235
|
navigationData: A,
|
|
1236
1236
|
navigateToItem: t,
|
|
1237
1237
|
onToggleSidebar: o,
|
|
1238
1238
|
enabled: e = !0
|
|
1239
1239
|
}) {
|
|
1240
|
-
const n =
|
|
1240
|
+
const n = ce(() => {
|
|
1241
1241
|
const d = /* @__PURE__ */ new Map(), c = (u) => {
|
|
1242
1242
|
u.forEach((i) => {
|
|
1243
1243
|
const h = i;
|
|
@@ -1245,13 +1245,13 @@ function wA({
|
|
|
1245
1245
|
});
|
|
1246
1246
|
};
|
|
1247
1247
|
return c(A), d;
|
|
1248
|
-
}, [A]), s =
|
|
1248
|
+
}, [A]), s = w(
|
|
1249
1249
|
(d) => !!d.shortcut,
|
|
1250
1250
|
[]
|
|
1251
|
-
), a =
|
|
1251
|
+
), a = w(
|
|
1252
1252
|
(d) => d.shortcut,
|
|
1253
1253
|
[]
|
|
1254
|
-
), l =
|
|
1254
|
+
), l = ce(() => {
|
|
1255
1255
|
if (!e)
|
|
1256
1256
|
return [];
|
|
1257
1257
|
const d = [];
|
|
@@ -1283,21 +1283,25 @@ function $e({
|
|
|
1283
1283
|
itemHeight: d = 40,
|
|
1284
1284
|
itemBorderRadius: c = 0,
|
|
1285
1285
|
itemHorizontalGap: u = 0,
|
|
1286
|
-
activeBackground: i
|
|
1286
|
+
activeBackground: i,
|
|
1287
|
+
isActive: h
|
|
1287
1288
|
}) {
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1289
|
+
const p = me(), { colorScheme: b } = de(), C = A, [m, g] = ge(!1), f = s || "var(--mantine-color-text)", S = a || p.colors[p.primaryColor][6], k = l || p.colors[p.primaryColor][6], D = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], j = m ? e ? D : k : e ? k : "transparent", z = m || e ? p.white : f, U = m || e ? p.white : S, $ = e && !m && !!i ? { background: i, backgroundColor: void 0 } : { background: void 0, backgroundColor: j }, M = typeof A.disabled == "function" ? A.disabled() : A.disabled;
|
|
1290
|
+
if (M && A.hideDisabledItem || !A.showInSidebar)
|
|
1290
1291
|
return null;
|
|
1291
|
-
const
|
|
1292
|
-
!
|
|
1293
|
-
}, [
|
|
1292
|
+
const F = w(() => {
|
|
1293
|
+
!M && n && n(A);
|
|
1294
|
+
}, [M, n, A]), P = Re.t(A.label), y = () => C.badge ? /* @__PURE__ */ r(pA, { size: "xs", color: C.badgeColor || "blue", variant: "filled", children: C.badge }) : null, V = () => C.shortcut ? /* @__PURE__ */ r(HA, { size: "xs", style: { marginLeft: "auto" }, children: C.shortcut }) : null;
|
|
1294
1295
|
if (A.links && A.links.length > 0) {
|
|
1295
|
-
const
|
|
1296
|
-
const
|
|
1297
|
-
return
|
|
1296
|
+
const E = A.links.filter((I) => {
|
|
1297
|
+
const G = typeof I.disabled == "function" ? I.disabled() : I.disabled;
|
|
1298
|
+
return I.showInSidebar && (!G || !I.hideDisabledItem);
|
|
1298
1299
|
});
|
|
1299
|
-
|
|
1300
|
-
|
|
1300
|
+
if (E.length === 0 && M && A.hideDisabledItem)
|
|
1301
|
+
return null;
|
|
1302
|
+
const W = (I) => h ? h(I) : e, H = (I) => I.some((G) => W(G) || (G.links ? H(G.links) : !1));
|
|
1303
|
+
return o ? /* @__PURE__ */ R(
|
|
1304
|
+
ie,
|
|
1301
1305
|
{
|
|
1302
1306
|
position: "right-start",
|
|
1303
1307
|
withArrow: !0,
|
|
@@ -1306,8 +1310,8 @@ function $e({
|
|
|
1306
1310
|
openDelay: 100,
|
|
1307
1311
|
closeDelay: 200,
|
|
1308
1312
|
children: [
|
|
1309
|
-
/* @__PURE__ */ r(
|
|
1310
|
-
|
|
1313
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Je, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(Me, { label: P, position: "right", withArrow: !0, children: /* @__PURE__ */ R(
|
|
1314
|
+
J,
|
|
1311
1315
|
{
|
|
1312
1316
|
gap: 1,
|
|
1313
1317
|
align: "center",
|
|
@@ -1316,10 +1320,10 @@ function $e({
|
|
|
1316
1320
|
},
|
|
1317
1321
|
children: [
|
|
1318
1322
|
/* @__PURE__ */ r(
|
|
1319
|
-
|
|
1323
|
+
B,
|
|
1320
1324
|
{
|
|
1321
1325
|
style: {
|
|
1322
|
-
color:
|
|
1326
|
+
color: S,
|
|
1323
1327
|
display: "flex",
|
|
1324
1328
|
alignItems: "center",
|
|
1325
1329
|
justifyContent: "center"
|
|
@@ -1328,37 +1332,37 @@ function $e({
|
|
|
1328
1332
|
}
|
|
1329
1333
|
),
|
|
1330
1334
|
/* @__PURE__ */ r(
|
|
1331
|
-
|
|
1335
|
+
Te,
|
|
1332
1336
|
{
|
|
1333
1337
|
size: "8px",
|
|
1334
1338
|
ta: "center",
|
|
1335
1339
|
style: {
|
|
1336
|
-
color:
|
|
1340
|
+
color: S,
|
|
1337
1341
|
lineHeight: 1,
|
|
1338
1342
|
maxWidth: 56,
|
|
1339
1343
|
overflow: "hidden",
|
|
1340
1344
|
textOverflow: "ellipsis",
|
|
1341
1345
|
whiteSpace: "nowrap"
|
|
1342
1346
|
},
|
|
1343
|
-
children:
|
|
1347
|
+
children: P
|
|
1344
1348
|
}
|
|
1345
1349
|
)
|
|
1346
1350
|
]
|
|
1347
1351
|
}
|
|
1348
1352
|
) }) }) }),
|
|
1349
|
-
/* @__PURE__ */
|
|
1350
|
-
/* @__PURE__ */ r(
|
|
1351
|
-
|
|
1352
|
-
const
|
|
1353
|
+
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
1354
|
+
/* @__PURE__ */ r(ie.Label, { children: P }),
|
|
1355
|
+
E.map((I, G) => {
|
|
1356
|
+
const ne = typeof I.disabled == "function" ? I.disabled() : I.disabled;
|
|
1353
1357
|
return /* @__PURE__ */ r(
|
|
1354
|
-
|
|
1358
|
+
ie.Item,
|
|
1355
1359
|
{
|
|
1356
|
-
leftSection:
|
|
1357
|
-
disabled:
|
|
1358
|
-
onClick: () => n?.(
|
|
1359
|
-
children:
|
|
1360
|
+
leftSection: I.icon,
|
|
1361
|
+
disabled: ne,
|
|
1362
|
+
onClick: () => n?.(I),
|
|
1363
|
+
children: Re.t(I.label)
|
|
1360
1364
|
},
|
|
1361
|
-
|
|
1365
|
+
G
|
|
1362
1366
|
);
|
|
1363
1367
|
})
|
|
1364
1368
|
] })
|
|
@@ -1367,12 +1371,12 @@ function $e({
|
|
|
1367
1371
|
) : /* @__PURE__ */ r(
|
|
1368
1372
|
LA,
|
|
1369
1373
|
{
|
|
1370
|
-
label:
|
|
1371
|
-
leftSection: /* @__PURE__ */ r(
|
|
1372
|
-
rightSection: /* @__PURE__ */
|
|
1373
|
-
|
|
1374
|
+
label: P,
|
|
1375
|
+
leftSection: /* @__PURE__ */ r(B, { style: { color: U }, children: A.icon }),
|
|
1376
|
+
rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: z }, children: [
|
|
1377
|
+
y(),
|
|
1374
1378
|
/* @__PURE__ */ r(
|
|
1375
|
-
|
|
1379
|
+
gA,
|
|
1376
1380
|
{
|
|
1377
1381
|
size: 14,
|
|
1378
1382
|
style: {
|
|
@@ -1382,10 +1386,10 @@ function $e({
|
|
|
1382
1386
|
)
|
|
1383
1387
|
] }),
|
|
1384
1388
|
childrenOffset: 28,
|
|
1385
|
-
defaultOpened: A.initiallyOpened || e,
|
|
1386
|
-
disabled:
|
|
1387
|
-
onMouseEnter: () =>
|
|
1388
|
-
onMouseLeave: () =>
|
|
1389
|
+
defaultOpened: A.initiallyOpened || e || H(E),
|
|
1390
|
+
disabled: M,
|
|
1391
|
+
onMouseEnter: () => g(!0),
|
|
1392
|
+
onMouseLeave: () => g(!1),
|
|
1389
1393
|
style: {
|
|
1390
1394
|
height: d,
|
|
1391
1395
|
marginInline: u,
|
|
@@ -1398,19 +1402,19 @@ function $e({
|
|
|
1398
1402
|
borderRadius: c
|
|
1399
1403
|
},
|
|
1400
1404
|
label: {
|
|
1401
|
-
color:
|
|
1405
|
+
color: z
|
|
1402
1406
|
},
|
|
1403
1407
|
children: {
|
|
1404
1408
|
paddingLeft: 0
|
|
1405
1409
|
}
|
|
1406
1410
|
},
|
|
1407
|
-
children:
|
|
1411
|
+
children: E.map((I, G) => /* @__PURE__ */ r(
|
|
1408
1412
|
$e,
|
|
1409
1413
|
{
|
|
1410
|
-
item:
|
|
1414
|
+
item: I,
|
|
1411
1415
|
depth: t + 1,
|
|
1412
1416
|
collapsed: o,
|
|
1413
|
-
active:
|
|
1417
|
+
active: W(I),
|
|
1414
1418
|
onClick: n,
|
|
1415
1419
|
textColor: s,
|
|
1416
1420
|
iconColor: a,
|
|
@@ -1418,60 +1422,61 @@ function $e({
|
|
|
1418
1422
|
itemHeight: d,
|
|
1419
1423
|
itemBorderRadius: c,
|
|
1420
1424
|
itemHorizontalGap: u,
|
|
1421
|
-
activeBackground: i
|
|
1425
|
+
activeBackground: i,
|
|
1426
|
+
isActive: h
|
|
1422
1427
|
},
|
|
1423
|
-
|
|
1428
|
+
G
|
|
1424
1429
|
))
|
|
1425
1430
|
}
|
|
1426
1431
|
);
|
|
1427
1432
|
}
|
|
1428
1433
|
return o ? /* @__PURE__ */ r(
|
|
1429
|
-
|
|
1434
|
+
Me,
|
|
1430
1435
|
{
|
|
1431
|
-
label:
|
|
1436
|
+
label: C.tooltip || P,
|
|
1432
1437
|
position: "right",
|
|
1433
1438
|
withArrow: !0,
|
|
1434
1439
|
children: /* @__PURE__ */ r(
|
|
1435
|
-
|
|
1440
|
+
Je,
|
|
1436
1441
|
{
|
|
1437
1442
|
style: {
|
|
1438
1443
|
width: u ? "auto" : "100%",
|
|
1439
1444
|
marginInline: u,
|
|
1440
1445
|
borderRadius: c,
|
|
1441
|
-
cursor:
|
|
1442
|
-
opacity:
|
|
1446
|
+
cursor: M ? "not-allowed" : "pointer",
|
|
1447
|
+
opacity: M ? 0.5 : 1,
|
|
1443
1448
|
// Gradiente (activeBackground) via shorthand; senão a cor sólida.
|
|
1444
|
-
...e && i ? { background: i } : { backgroundColor: e ?
|
|
1449
|
+
...e && i ? { background: i } : { backgroundColor: e ? k : "transparent" },
|
|
1445
1450
|
transition: "background 150ms ease, background-color 150ms ease",
|
|
1446
1451
|
padding: "2px 0"
|
|
1447
1452
|
},
|
|
1448
|
-
onClick:
|
|
1449
|
-
onMouseEnter: (
|
|
1450
|
-
if (!
|
|
1453
|
+
onClick: F,
|
|
1454
|
+
onMouseEnter: (E) => {
|
|
1455
|
+
if (!M) {
|
|
1451
1456
|
if (e && i)
|
|
1452
1457
|
return;
|
|
1453
|
-
|
|
1458
|
+
E.currentTarget.style.backgroundColor = e ? D : k;
|
|
1454
1459
|
}
|
|
1455
1460
|
},
|
|
1456
|
-
onMouseLeave: (
|
|
1457
|
-
e && i || (
|
|
1461
|
+
onMouseLeave: (E) => {
|
|
1462
|
+
e && i || (E.currentTarget.style.backgroundColor = e ? k : "transparent");
|
|
1458
1463
|
},
|
|
1459
|
-
children: /* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */ r(
|
|
1464
|
+
children: /* @__PURE__ */ R(J, { gap: 1, align: "center", children: [
|
|
1465
|
+
/* @__PURE__ */ r(B, { style: { color: e ? p.white : S }, children: A.icon }),
|
|
1461
1466
|
/* @__PURE__ */ r(
|
|
1462
|
-
|
|
1467
|
+
Te,
|
|
1463
1468
|
{
|
|
1464
1469
|
size: "8px",
|
|
1465
1470
|
ta: "center",
|
|
1466
1471
|
style: {
|
|
1467
|
-
color: e ?
|
|
1472
|
+
color: e ? p.white : S,
|
|
1468
1473
|
lineHeight: 1,
|
|
1469
1474
|
maxWidth: 56,
|
|
1470
1475
|
overflow: "hidden",
|
|
1471
1476
|
textOverflow: "ellipsis",
|
|
1472
1477
|
whiteSpace: "nowrap"
|
|
1473
1478
|
},
|
|
1474
|
-
children:
|
|
1479
|
+
children: P
|
|
1475
1480
|
}
|
|
1476
1481
|
)
|
|
1477
1482
|
] })
|
|
@@ -1481,17 +1486,17 @@ function $e({
|
|
|
1481
1486
|
) : /* @__PURE__ */ r(
|
|
1482
1487
|
LA,
|
|
1483
1488
|
{
|
|
1484
|
-
label:
|
|
1485
|
-
leftSection: /* @__PURE__ */ r(
|
|
1486
|
-
rightSection: /* @__PURE__ */
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
+
label: P,
|
|
1490
|
+
leftSection: /* @__PURE__ */ r(B, { style: { color: U }, children: A.icon }),
|
|
1491
|
+
rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: z }, children: [
|
|
1492
|
+
y(),
|
|
1493
|
+
V()
|
|
1489
1494
|
] }),
|
|
1490
1495
|
active: e,
|
|
1491
|
-
disabled:
|
|
1492
|
-
onClick:
|
|
1493
|
-
onMouseEnter: () =>
|
|
1494
|
-
onMouseLeave: () =>
|
|
1496
|
+
disabled: M,
|
|
1497
|
+
onClick: F,
|
|
1498
|
+
onMouseEnter: () => g(!0),
|
|
1499
|
+
onMouseLeave: () => g(!1),
|
|
1495
1500
|
style: {
|
|
1496
1501
|
height: d,
|
|
1497
1502
|
paddingLeft: t > 0 ? t * 16 + 12 : void 0,
|
|
@@ -1505,7 +1510,7 @@ function $e({
|
|
|
1505
1510
|
borderRadius: c
|
|
1506
1511
|
},
|
|
1507
1512
|
label: {
|
|
1508
|
-
color:
|
|
1513
|
+
color: z
|
|
1509
1514
|
}
|
|
1510
1515
|
}
|
|
1511
1516
|
}
|
|
@@ -1520,12 +1525,12 @@ function eo({
|
|
|
1520
1525
|
onExpandedChange: s,
|
|
1521
1526
|
groupId: a
|
|
1522
1527
|
}) {
|
|
1523
|
-
const l =
|
|
1528
|
+
const l = me(), { colorScheme: d } = de(), [c, u] = ge(e), i = n !== void 0, h = i ? n : c, p = w(() => {
|
|
1524
1529
|
i ? s?.(!h) : u((f) => !f);
|
|
1525
1530
|
}, [i, h, s]), b = d === "dark" ? l.colors.dark[6] : l.colors.gray[1], C = 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];
|
|
1526
|
-
return /* @__PURE__ */
|
|
1531
|
+
return /* @__PURE__ */ R(B, { children: [
|
|
1527
1532
|
/* @__PURE__ */ r(
|
|
1528
|
-
|
|
1533
|
+
cA,
|
|
1529
1534
|
{
|
|
1530
1535
|
onClick: p,
|
|
1531
1536
|
w: "100%",
|
|
@@ -1542,10 +1547,10 @@ function eo({
|
|
|
1542
1547
|
}
|
|
1543
1548
|
}
|
|
1544
1549
|
},
|
|
1545
|
-
children: /* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
t && /* @__PURE__ */ r(
|
|
1548
|
-
/* @__PURE__ */ r(
|
|
1550
|
+
children: /* @__PURE__ */ R(Le, { justify: "space-between", wrap: "nowrap", children: [
|
|
1551
|
+
/* @__PURE__ */ R(Le, { gap: "xs", wrap: "nowrap", children: [
|
|
1552
|
+
t && /* @__PURE__ */ r(B, { style: { color: g }, children: t }),
|
|
1553
|
+
/* @__PURE__ */ r(Te, { size: "sm", fw: 600, c: m, children: Re.t(A) })
|
|
1549
1554
|
] }),
|
|
1550
1555
|
/* @__PURE__ */ r(
|
|
1551
1556
|
Gr,
|
|
@@ -1561,17 +1566,17 @@ function eo({
|
|
|
1561
1566
|
] })
|
|
1562
1567
|
}
|
|
1563
1568
|
),
|
|
1564
|
-
/* @__PURE__ */ r($r, { expanded: h, children: /* @__PURE__ */ r(
|
|
1569
|
+
/* @__PURE__ */ r($r, { expanded: h, children: /* @__PURE__ */ r(B, { mt: 4, children: o }) })
|
|
1565
1570
|
] });
|
|
1566
1571
|
}
|
|
1567
1572
|
function Mn({
|
|
1568
1573
|
label: A,
|
|
1569
1574
|
children: t
|
|
1570
1575
|
}) {
|
|
1571
|
-
const o =
|
|
1572
|
-
return /* @__PURE__ */
|
|
1576
|
+
const o = me(), { colorScheme: e } = de(), n = e === "dark" ? o.colors.gray[5] : o.colors.gray[6];
|
|
1577
|
+
return /* @__PURE__ */ R(B, { children: [
|
|
1573
1578
|
/* @__PURE__ */ r(
|
|
1574
|
-
|
|
1579
|
+
Te,
|
|
1575
1580
|
{
|
|
1576
1581
|
size: "xs",
|
|
1577
1582
|
fw: 700,
|
|
@@ -1580,7 +1585,7 @@ function Mn({
|
|
|
1580
1585
|
px: "sm",
|
|
1581
1586
|
py: "xs",
|
|
1582
1587
|
style: { letterSpacing: "0.5px" },
|
|
1583
|
-
children:
|
|
1588
|
+
children: Re.t(A)
|
|
1584
1589
|
}
|
|
1585
1590
|
),
|
|
1586
1591
|
t
|
|
@@ -1594,8 +1599,8 @@ function Ao({
|
|
|
1594
1599
|
activeColor: n,
|
|
1595
1600
|
inactiveColor: s
|
|
1596
1601
|
}) {
|
|
1597
|
-
const a =
|
|
1598
|
-
|
|
1602
|
+
const a = me(), { colorScheme: l } = de(), d = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], c = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], u = a.colors[a.primaryColor][2], p = /* @__PURE__ */ R(
|
|
1603
|
+
J,
|
|
1599
1604
|
{
|
|
1600
1605
|
gap: 2,
|
|
1601
1606
|
align: "center",
|
|
@@ -1603,7 +1608,7 @@ function Ao({
|
|
|
1603
1608
|
style: { textAlign: "center" },
|
|
1604
1609
|
children: [
|
|
1605
1610
|
/* @__PURE__ */ r(
|
|
1606
|
-
|
|
1611
|
+
De,
|
|
1607
1612
|
{
|
|
1608
1613
|
size: 48,
|
|
1609
1614
|
variant: t ? "filled" : "subtle",
|
|
@@ -1616,7 +1621,7 @@ function Ao({
|
|
|
1616
1621
|
}
|
|
1617
1622
|
),
|
|
1618
1623
|
e && /* @__PURE__ */ r(
|
|
1619
|
-
|
|
1624
|
+
Te,
|
|
1620
1625
|
{
|
|
1621
1626
|
size: "xs",
|
|
1622
1627
|
c: u,
|
|
@@ -1632,7 +1637,7 @@ function Ao({
|
|
|
1632
1637
|
]
|
|
1633
1638
|
}
|
|
1634
1639
|
);
|
|
1635
|
-
return e ? p : /* @__PURE__ */ r(
|
|
1640
|
+
return e ? p : /* @__PURE__ */ r(Me, { label: A.hint || A.label, position: "right", withArrow: !0, children: p });
|
|
1636
1641
|
}
|
|
1637
1642
|
function Dn({
|
|
1638
1643
|
placeholder: A = "Buscar...",
|
|
@@ -1641,29 +1646,29 @@ function Dn({
|
|
|
1641
1646
|
onClear: e,
|
|
1642
1647
|
collapsed: n = !1
|
|
1643
1648
|
}) {
|
|
1644
|
-
const s =
|
|
1649
|
+
const s = me(), { colorScheme: a } = de(), l = w(
|
|
1645
1650
|
(u) => {
|
|
1646
1651
|
o?.(u.currentTarget.value);
|
|
1647
1652
|
},
|
|
1648
1653
|
[o]
|
|
1649
|
-
), d =
|
|
1654
|
+
), d = w(() => {
|
|
1650
1655
|
o?.(""), e?.();
|
|
1651
1656
|
}, [o, e]), c = t && t.length > 0;
|
|
1652
1657
|
return n ? /* @__PURE__ */ r(
|
|
1653
|
-
|
|
1658
|
+
De,
|
|
1654
1659
|
{
|
|
1655
1660
|
variant: "subtle",
|
|
1656
1661
|
size: "lg",
|
|
1657
1662
|
color: a === "dark" ? "gray" : "dark",
|
|
1658
|
-
children: /* @__PURE__ */ r(
|
|
1663
|
+
children: /* @__PURE__ */ r(_e, { size: 18 })
|
|
1659
1664
|
}
|
|
1660
1665
|
) : /* @__PURE__ */ r(
|
|
1661
1666
|
YA,
|
|
1662
1667
|
{
|
|
1663
1668
|
placeholder: A,
|
|
1664
|
-
leftSection: /* @__PURE__ */ r(
|
|
1669
|
+
leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
|
|
1665
1670
|
rightSection: c ? /* @__PURE__ */ r(
|
|
1666
|
-
|
|
1671
|
+
De,
|
|
1667
1672
|
{
|
|
1668
1673
|
variant: "subtle",
|
|
1669
1674
|
size: "sm",
|
|
@@ -1690,16 +1695,16 @@ function Nn({
|
|
|
1690
1695
|
onClick: e,
|
|
1691
1696
|
collapsed: n = !1
|
|
1692
1697
|
}) {
|
|
1693
|
-
const s =
|
|
1698
|
+
const s = me(), { colorScheme: a } = de(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], d = () => {
|
|
1694
1699
|
if (typeof o == "string")
|
|
1695
|
-
return /* @__PURE__ */ r(
|
|
1700
|
+
return /* @__PURE__ */ r(iA, { src: o, radius: "xl", size: n ? "sm" : "md" });
|
|
1696
1701
|
if (o)
|
|
1697
1702
|
return o;
|
|
1698
1703
|
const c = A ? A.split(" ").map((u) => u[0]).slice(0, 2).join("").toUpperCase() : "?";
|
|
1699
|
-
return /* @__PURE__ */ r(
|
|
1704
|
+
return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: c });
|
|
1700
1705
|
};
|
|
1701
|
-
return n ? /* @__PURE__ */ r(
|
|
1702
|
-
|
|
1706
|
+
return n ? /* @__PURE__ */ r(Me, { label: A || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
|
|
1707
|
+
cA,
|
|
1703
1708
|
{
|
|
1704
1709
|
onClick: e,
|
|
1705
1710
|
p: "xs",
|
|
@@ -1720,7 +1725,7 @@ function Nn({
|
|
|
1720
1725
|
children: d()
|
|
1721
1726
|
}
|
|
1722
1727
|
) }) : /* @__PURE__ */ r(
|
|
1723
|
-
|
|
1728
|
+
cA,
|
|
1724
1729
|
{
|
|
1725
1730
|
onClick: e,
|
|
1726
1731
|
p: "sm",
|
|
@@ -1736,11 +1741,11 @@ function Nn({
|
|
|
1736
1741
|
}
|
|
1737
1742
|
}
|
|
1738
1743
|
},
|
|
1739
|
-
children: /* @__PURE__ */
|
|
1744
|
+
children: /* @__PURE__ */ R(Le, { wrap: "nowrap", children: [
|
|
1740
1745
|
d(),
|
|
1741
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ R(B, { style: { flex: 1, overflow: "hidden" }, children: [
|
|
1742
1747
|
A && /* @__PURE__ */ r(
|
|
1743
|
-
|
|
1748
|
+
Te,
|
|
1744
1749
|
{
|
|
1745
1750
|
size: "sm",
|
|
1746
1751
|
fw: 500,
|
|
@@ -1753,7 +1758,7 @@ function Nn({
|
|
|
1753
1758
|
}
|
|
1754
1759
|
),
|
|
1755
1760
|
t && /* @__PURE__ */ r(
|
|
1756
|
-
|
|
1761
|
+
Te,
|
|
1757
1762
|
{
|
|
1758
1763
|
size: "xs",
|
|
1759
1764
|
c: "dimmed",
|
|
@@ -1767,7 +1772,7 @@ function Nn({
|
|
|
1767
1772
|
)
|
|
1768
1773
|
] }),
|
|
1769
1774
|
e && /* @__PURE__ */ r(
|
|
1770
|
-
|
|
1775
|
+
gA,
|
|
1771
1776
|
{
|
|
1772
1777
|
size: 16,
|
|
1773
1778
|
color: a === "dark" ? s.colors.gray[5] : s.colors.gray[6]
|
|
@@ -1783,7 +1788,7 @@ function zn({
|
|
|
1783
1788
|
size: o = "xs"
|
|
1784
1789
|
}) {
|
|
1785
1790
|
const e = typeof A == "number" && A > 99 ? "99+" : A;
|
|
1786
|
-
return /* @__PURE__ */ r(
|
|
1791
|
+
return /* @__PURE__ */ r(pA, { size: o, color: t, variant: "filled", children: e });
|
|
1787
1792
|
}
|
|
1788
1793
|
function On({
|
|
1789
1794
|
children: A,
|
|
@@ -1803,7 +1808,7 @@ function On({
|
|
|
1803
1808
|
}
|
|
1804
1809
|
);
|
|
1805
1810
|
}
|
|
1806
|
-
function
|
|
1811
|
+
function kA({
|
|
1807
1812
|
itemCount: A = 8,
|
|
1808
1813
|
collapsed: t = !1,
|
|
1809
1814
|
backgroundColor: o,
|
|
@@ -1811,13 +1816,13 @@ function SA({
|
|
|
1811
1816
|
showGroups: n = !0,
|
|
1812
1817
|
groupCount: s = 2
|
|
1813
1818
|
}) {
|
|
1814
|
-
const a =
|
|
1819
|
+
const a = me(), { colorScheme: l } = de(), d = o || (l === "dark" ? a.colors.dark[7] : a.white);
|
|
1815
1820
|
if (t)
|
|
1816
|
-
return /* @__PURE__ */ r(
|
|
1821
|
+
return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: A }).map((i, h) => /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }, h)) });
|
|
1817
1822
|
const c = (i, h = !1) => Array.from({ length: i }).map((p, b) => {
|
|
1818
1823
|
const C = 60 + Math.random() * 30;
|
|
1819
|
-
return /* @__PURE__ */
|
|
1820
|
-
|
|
1824
|
+
return /* @__PURE__ */ R(
|
|
1825
|
+
Le,
|
|
1821
1826
|
{
|
|
1822
1827
|
gap: "sm",
|
|
1823
1828
|
p: "xs",
|
|
@@ -1834,14 +1839,14 @@ function SA({
|
|
|
1834
1839
|
);
|
|
1835
1840
|
});
|
|
1836
1841
|
if (!n)
|
|
1837
|
-
return /* @__PURE__ */ r(
|
|
1842
|
+
return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor: d }, children: c(A) });
|
|
1838
1843
|
const u = Math.ceil(A / s);
|
|
1839
|
-
return /* @__PURE__ */ r(
|
|
1840
|
-
/* @__PURE__ */
|
|
1844
|
+
return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: s }).map((i, h) => /* @__PURE__ */ R(B, { children: [
|
|
1845
|
+
/* @__PURE__ */ R(Le, { gap: "sm", p: "xs", children: [
|
|
1841
1846
|
/* @__PURE__ */ r(pe, { circle: !0, height: 20, width: 20 }),
|
|
1842
1847
|
/* @__PURE__ */ r(pe, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
|
|
1843
1848
|
] }),
|
|
1844
|
-
/* @__PURE__ */ r(
|
|
1849
|
+
/* @__PURE__ */ r(J, { gap: 2, mt: 4, children: c(
|
|
1845
1850
|
h === s - 1 ? A - h * u : u,
|
|
1846
1851
|
!0
|
|
1847
1852
|
) })
|
|
@@ -1852,9 +1857,9 @@ function ro({
|
|
|
1852
1857
|
width: t = 80,
|
|
1853
1858
|
backgroundColor: o
|
|
1854
1859
|
}) {
|
|
1855
|
-
const e =
|
|
1860
|
+
const e = me(), { colorScheme: n } = de(), s = o || (n === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][6]);
|
|
1856
1861
|
return /* @__PURE__ */ r(
|
|
1857
|
-
|
|
1862
|
+
J,
|
|
1858
1863
|
{
|
|
1859
1864
|
gap: "sm",
|
|
1860
1865
|
p: "xs",
|
|
@@ -1864,7 +1869,7 @@ function ro({
|
|
|
1864
1869
|
backgroundColor: s,
|
|
1865
1870
|
height: "100%"
|
|
1866
1871
|
},
|
|
1867
|
-
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */
|
|
1872
|
+
children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(J, { gap: 4, align: "center", children: [
|
|
1868
1873
|
/* @__PURE__ */ r(pe, { circle: !0, height: 48, width: 48 }),
|
|
1869
1874
|
/* @__PURE__ */ r(pe, { height: 10, width: 40, radius: "sm" })
|
|
1870
1875
|
] }, l))
|
|
@@ -1874,9 +1879,9 @@ function ro({
|
|
|
1874
1879
|
function $n({
|
|
1875
1880
|
collapsed: A = !1
|
|
1876
1881
|
}) {
|
|
1877
|
-
return A ? /* @__PURE__ */ r(
|
|
1882
|
+
return A ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "md", children: [
|
|
1878
1883
|
/* @__PURE__ */ r(pe, { circle: !0, height: 40, width: 40 }),
|
|
1879
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ R(J, { gap: 4, style: { flex: 1 }, children: [
|
|
1880
1885
|
/* @__PURE__ */ r(pe, { height: 14, width: "70%", radius: "sm" }),
|
|
1881
1886
|
/* @__PURE__ */ r(pe, { height: 10, width: "50%", radius: "sm" })
|
|
1882
1887
|
] })
|
|
@@ -1885,21 +1890,21 @@ function $n({
|
|
|
1885
1890
|
function Qn({
|
|
1886
1891
|
collapsed: A = !1
|
|
1887
1892
|
}) {
|
|
1888
|
-
return A ? /* @__PURE__ */ r(
|
|
1893
|
+
return A ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(pe, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "sm", children: [
|
|
1889
1894
|
/* @__PURE__ */ r(pe, { circle: !0, height: 36, width: 36 }),
|
|
1890
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ R(J, { gap: 4, style: { flex: 1 }, children: [
|
|
1891
1896
|
/* @__PURE__ */ r(pe, { height: 12, width: "60%", radius: "sm" }),
|
|
1892
1897
|
/* @__PURE__ */ r(pe, { height: 10, width: "80%", radius: "sm" })
|
|
1893
1898
|
] })
|
|
1894
1899
|
] });
|
|
1895
1900
|
}
|
|
1896
|
-
function
|
|
1901
|
+
function xA({
|
|
1897
1902
|
message: A,
|
|
1898
1903
|
backgroundColor: t
|
|
1899
1904
|
}) {
|
|
1900
|
-
const o =
|
|
1905
|
+
const o = me(), { colorScheme: e } = de(), n = t || (e === "dark" ? o.colors.dark[7] : o.white), s = e === "dark" ? o.colors.red[4] : o.colors.red[6];
|
|
1901
1906
|
return /* @__PURE__ */ r(
|
|
1902
|
-
|
|
1907
|
+
B,
|
|
1903
1908
|
{
|
|
1904
1909
|
p: "md",
|
|
1905
1910
|
style: {
|
|
@@ -1910,7 +1915,7 @@ function kA({
|
|
|
1910
1915
|
height: "100%"
|
|
1911
1916
|
},
|
|
1912
1917
|
children: /* @__PURE__ */ r(
|
|
1913
|
-
|
|
1918
|
+
B,
|
|
1914
1919
|
{
|
|
1915
1920
|
p: "md",
|
|
1916
1921
|
style: {
|
|
@@ -1946,129 +1951,137 @@ function to({
|
|
|
1946
1951
|
backgroundLightColor: m,
|
|
1947
1952
|
backgroundImage: g,
|
|
1948
1953
|
textDarkColor: f,
|
|
1949
|
-
textLightColor:
|
|
1950
|
-
iconDarkColor:
|
|
1954
|
+
textLightColor: S,
|
|
1955
|
+
iconDarkColor: k,
|
|
1951
1956
|
iconLightColor: D,
|
|
1952
|
-
activeColor:
|
|
1953
|
-
withBorder:
|
|
1957
|
+
activeColor: j,
|
|
1958
|
+
withBorder: z = !0,
|
|
1954
1959
|
withShadow: U = !1,
|
|
1955
|
-
highlightActiveItem:
|
|
1956
|
-
onMenuItemClick:
|
|
1957
|
-
itemBorderRadius:
|
|
1958
|
-
itemHorizontalGap:
|
|
1959
|
-
itemActiveBackground:
|
|
1960
|
+
highlightActiveItem: O = !0,
|
|
1961
|
+
onMenuItemClick: $,
|
|
1962
|
+
itemBorderRadius: M,
|
|
1963
|
+
itemHorizontalGap: F,
|
|
1964
|
+
itemActiveBackground: P
|
|
1960
1965
|
}) {
|
|
1961
|
-
const
|
|
1962
|
-
query:
|
|
1963
|
-
setQuery:
|
|
1964
|
-
filteredItems:
|
|
1965
|
-
isSearching:
|
|
1966
|
-
clearSearch:
|
|
1966
|
+
const y = me(), { colorScheme: V } = de(), { collapsed: E, toggleCollapsed: W } = vA(), H = V === "dark" ? C ?? y.colors.dark[7] : m ?? y.white, I = V === "dark" ? f ?? y.colors.gray[3] : S ?? y.colors.gray[7], G = V === "dark" ? k ?? y.colors[y.primaryColor][4] : D ?? y.colors[y.primaryColor][6], ne = j ? y.colors[j]?.[6] ?? y.colors[y.primaryColor][6] : y.colors[y.primaryColor][6], we = g ? { background: g } : { backgroundColor: H }, se = g ? "transparent" : H, {
|
|
1967
|
+
query: be,
|
|
1968
|
+
setQuery: ke,
|
|
1969
|
+
filteredItems: T,
|
|
1970
|
+
isSearching: v,
|
|
1971
|
+
clearSearch: Q
|
|
1967
1972
|
} = Wt({
|
|
1968
1973
|
navigationData: A,
|
|
1969
1974
|
onSearch: a
|
|
1970
|
-
}), { navigateToItem:
|
|
1975
|
+
}), { navigateToItem: L, isItemActive: x, isItemOrChildActive: X } = wA({
|
|
1971
1976
|
navigationData: A,
|
|
1972
|
-
onMenuItemClick:
|
|
1973
|
-
})
|
|
1974
|
-
|
|
1977
|
+
onMenuItemClick: $
|
|
1978
|
+
}), N = w(
|
|
1979
|
+
(Z) => !!O && x(Z),
|
|
1980
|
+
[O, x]
|
|
1981
|
+
), Y = {
|
|
1982
|
+
itemBorderRadius: M,
|
|
1983
|
+
itemHorizontalGap: F,
|
|
1984
|
+
activeBackground: P,
|
|
1985
|
+
isActive: N
|
|
1986
|
+
};
|
|
1987
|
+
SA({
|
|
1975
1988
|
navigationData: A,
|
|
1976
|
-
navigateToItem:
|
|
1977
|
-
onToggleSidebar:
|
|
1989
|
+
navigateToItem: L,
|
|
1990
|
+
onToggleSidebar: W,
|
|
1978
1991
|
enabled: !0
|
|
1979
1992
|
});
|
|
1980
|
-
const
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
1983
|
-
if (!(!
|
|
1984
|
-
if (
|
|
1985
|
-
const
|
|
1986
|
-
|
|
1993
|
+
const Ce = E ? o : t, le = ce(() => {
|
|
1994
|
+
const Z = /* @__PURE__ */ new Map(), Ie = [];
|
|
1995
|
+
return T.forEach((ee) => {
|
|
1996
|
+
if (!(!ee.showInSidebar || (typeof ee.disabled == "function" ? ee.disabled() : ee.disabled) && ee.hideDisabledItem))
|
|
1997
|
+
if (ee.category) {
|
|
1998
|
+
const Ee = Z.get(ee.category) || [];
|
|
1999
|
+
Ee.push(ee), Z.set(ee.category, Ee);
|
|
1987
2000
|
} else
|
|
1988
|
-
|
|
1989
|
-
}), { groups:
|
|
1990
|
-
}, [
|
|
2001
|
+
Ie.push(ee);
|
|
2002
|
+
}), { groups: Z, ungrouped: Ie };
|
|
2003
|
+
}, [T]), xe = () => {
|
|
1991
2004
|
if (i)
|
|
1992
|
-
return p || /* @__PURE__ */ r(
|
|
2005
|
+
return p || /* @__PURE__ */ r(xA, { message: i, backgroundColor: H });
|
|
1993
2006
|
if (u)
|
|
1994
2007
|
return h || /* @__PURE__ */ r(
|
|
1995
|
-
|
|
2008
|
+
kA,
|
|
1996
2009
|
{
|
|
1997
2010
|
itemCount: b,
|
|
1998
|
-
collapsed:
|
|
1999
|
-
backgroundColor:
|
|
2000
|
-
showGroups: !
|
|
2011
|
+
collapsed: E,
|
|
2012
|
+
backgroundColor: H,
|
|
2013
|
+
showGroups: !E
|
|
2001
2014
|
}
|
|
2002
2015
|
);
|
|
2003
|
-
const
|
|
2016
|
+
const Z = () => le.ungrouped.map((ee, Ae) => /* @__PURE__ */ r(
|
|
2004
2017
|
$e,
|
|
2005
2018
|
{
|
|
2006
|
-
item:
|
|
2007
|
-
collapsed:
|
|
2008
|
-
active:
|
|
2009
|
-
onClick:
|
|
2010
|
-
textColor:
|
|
2011
|
-
iconColor:
|
|
2012
|
-
hoverColor:
|
|
2013
|
-
...
|
|
2019
|
+
item: ee,
|
|
2020
|
+
collapsed: E,
|
|
2021
|
+
active: O && x(ee),
|
|
2022
|
+
onClick: L,
|
|
2023
|
+
textColor: I,
|
|
2024
|
+
iconColor: G,
|
|
2025
|
+
hoverColor: ne,
|
|
2026
|
+
...Y
|
|
2014
2027
|
},
|
|
2015
|
-
`item-${
|
|
2016
|
-
)),
|
|
2028
|
+
`item-${Ae}`
|
|
2029
|
+
)), Ie = () => Array.from(le.groups.entries()).map(([Ae, Ee], q) => /* @__PURE__ */ r(
|
|
2017
2030
|
eo,
|
|
2018
2031
|
{
|
|
2019
|
-
label:
|
|
2020
|
-
groupId: `group-${
|
|
2032
|
+
label: Ae,
|
|
2033
|
+
groupId: `group-${q}`,
|
|
2021
2034
|
defaultExpanded: !0,
|
|
2022
|
-
children:
|
|
2035
|
+
children: Ee.map((ye, K) => /* @__PURE__ */ r(
|
|
2023
2036
|
$e,
|
|
2024
2037
|
{
|
|
2025
|
-
item:
|
|
2026
|
-
collapsed:
|
|
2027
|
-
active:
|
|
2028
|
-
onClick:
|
|
2029
|
-
textColor:
|
|
2030
|
-
iconColor:
|
|
2031
|
-
hoverColor:
|
|
2032
|
-
...
|
|
2038
|
+
item: ye,
|
|
2039
|
+
collapsed: E,
|
|
2040
|
+
active: O && x(ye),
|
|
2041
|
+
onClick: L,
|
|
2042
|
+
textColor: I,
|
|
2043
|
+
iconColor: G,
|
|
2044
|
+
hoverColor: ne,
|
|
2045
|
+
...Y
|
|
2033
2046
|
},
|
|
2034
|
-
`group-${
|
|
2047
|
+
`group-${q}-item-${K}`
|
|
2035
2048
|
))
|
|
2036
2049
|
},
|
|
2037
|
-
`group-${
|
|
2050
|
+
`group-${q}`
|
|
2038
2051
|
));
|
|
2039
|
-
return
|
|
2040
|
-
|
|
2052
|
+
return E ? /* @__PURE__ */ R(J, { gap: 4, children: [
|
|
2053
|
+
le.ungrouped.map((ee, Ae) => /* @__PURE__ */ r(
|
|
2041
2054
|
$e,
|
|
2042
2055
|
{
|
|
2043
|
-
item:
|
|
2056
|
+
item: ee,
|
|
2044
2057
|
collapsed: !0,
|
|
2045
|
-
active:
|
|
2046
|
-
onClick:
|
|
2047
|
-
textColor:
|
|
2048
|
-
iconColor:
|
|
2049
|
-
hoverColor:
|
|
2050
|
-
...
|
|
2058
|
+
active: O && x(ee),
|
|
2059
|
+
onClick: L,
|
|
2060
|
+
textColor: I,
|
|
2061
|
+
iconColor: G,
|
|
2062
|
+
hoverColor: ne,
|
|
2063
|
+
...Y
|
|
2051
2064
|
},
|
|
2052
|
-
`item-${
|
|
2065
|
+
`item-${Ae}`
|
|
2053
2066
|
)),
|
|
2054
|
-
Array.from(
|
|
2067
|
+
Array.from(le.groups.values()).flat().map((ee, Ae) => /* @__PURE__ */ r(
|
|
2055
2068
|
$e,
|
|
2056
2069
|
{
|
|
2057
|
-
item:
|
|
2070
|
+
item: ee,
|
|
2058
2071
|
collapsed: !0,
|
|
2059
|
-
active:
|
|
2060
|
-
onClick:
|
|
2061
|
-
textColor:
|
|
2062
|
-
iconColor:
|
|
2063
|
-
hoverColor:
|
|
2064
|
-
...
|
|
2072
|
+
active: O && x(ee),
|
|
2073
|
+
onClick: L,
|
|
2074
|
+
textColor: I,
|
|
2075
|
+
iconColor: G,
|
|
2076
|
+
hoverColor: ne,
|
|
2077
|
+
...Y
|
|
2065
2078
|
},
|
|
2066
|
-
`grouped-item-${
|
|
2079
|
+
`grouped-item-${Ae}`
|
|
2067
2080
|
))
|
|
2068
|
-
] }) : /* @__PURE__ */
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2081
|
+
] }) : /* @__PURE__ */ R(J, { gap: "xs", children: [
|
|
2082
|
+
le.ungrouped.length > 0 && /* @__PURE__ */ r(J, { gap: 2, children: Z() }),
|
|
2083
|
+
le.groups.size > 0 && le.ungrouped.length > 0 && /* @__PURE__ */ r(dA, { my: "xs" }),
|
|
2084
|
+
Ie()
|
|
2072
2085
|
] });
|
|
2073
2086
|
};
|
|
2074
2087
|
return /* @__PURE__ */ r(
|
|
@@ -2078,60 +2091,60 @@ function to({
|
|
|
2078
2091
|
transition: "slide-right",
|
|
2079
2092
|
duration: 200,
|
|
2080
2093
|
timingFunction: "ease",
|
|
2081
|
-
children: (
|
|
2082
|
-
|
|
2094
|
+
children: (Z) => /* @__PURE__ */ R(
|
|
2095
|
+
B,
|
|
2083
2096
|
{
|
|
2084
2097
|
style: {
|
|
2085
|
-
...
|
|
2086
|
-
width: fe(
|
|
2098
|
+
...Z,
|
|
2099
|
+
width: fe(Ce),
|
|
2087
2100
|
height: typeof e == "number" ? fe(e) : e,
|
|
2088
2101
|
minHeight: typeof e == "number" ? fe(e) : e,
|
|
2089
|
-
...
|
|
2102
|
+
...we,
|
|
2090
2103
|
display: "flex",
|
|
2091
2104
|
flexDirection: "column",
|
|
2092
2105
|
overflow: "hidden",
|
|
2093
2106
|
transition: "width 200ms ease",
|
|
2094
|
-
borderRight:
|
|
2095
|
-
boxShadow: U ?
|
|
2107
|
+
borderRight: z ? `1px solid ${V === "dark" ? y.colors.dark[5] : y.colors.gray[2]}` : void 0,
|
|
2108
|
+
boxShadow: U ? y.shadows.sm : void 0
|
|
2096
2109
|
},
|
|
2097
2110
|
children: [
|
|
2098
|
-
l && /* @__PURE__ */ r(
|
|
2099
|
-
n && !
|
|
2111
|
+
l && /* @__PURE__ */ r(B, { style: { flexShrink: 0 }, children: l }),
|
|
2112
|
+
n && !E && /* @__PURE__ */ r(B, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
|
|
2100
2113
|
YA,
|
|
2101
2114
|
{
|
|
2102
2115
|
placeholder: s,
|
|
2103
|
-
leftSection: /* @__PURE__ */ r(
|
|
2104
|
-
rightSection:
|
|
2116
|
+
leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
|
|
2117
|
+
rightSection: v ? /* @__PURE__ */ r(
|
|
2105
2118
|
_A,
|
|
2106
2119
|
{
|
|
2107
2120
|
size: 16,
|
|
2108
2121
|
style: { cursor: "pointer" },
|
|
2109
|
-
onClick:
|
|
2122
|
+
onClick: Q
|
|
2110
2123
|
}
|
|
2111
2124
|
) : null,
|
|
2112
|
-
value:
|
|
2113
|
-
onChange: (
|
|
2125
|
+
value: be,
|
|
2126
|
+
onChange: (Ie) => ke(Ie.currentTarget.value),
|
|
2114
2127
|
size: "sm"
|
|
2115
2128
|
}
|
|
2116
2129
|
) }),
|
|
2117
2130
|
/* @__PURE__ */ r(
|
|
2118
|
-
|
|
2131
|
+
ze,
|
|
2119
2132
|
{
|
|
2120
2133
|
style: { flex: 1 },
|
|
2121
2134
|
scrollbarSize: 6,
|
|
2122
2135
|
type: "hover",
|
|
2123
2136
|
offsetScrollbars: !0,
|
|
2124
|
-
children: /* @__PURE__ */ r(
|
|
2137
|
+
children: /* @__PURE__ */ r(B, { p: "xs", children: xe() })
|
|
2125
2138
|
}
|
|
2126
2139
|
),
|
|
2127
2140
|
d && /* @__PURE__ */ r(
|
|
2128
|
-
|
|
2141
|
+
B,
|
|
2129
2142
|
{
|
|
2130
2143
|
style: {
|
|
2131
2144
|
flexShrink: 0,
|
|
2132
2145
|
height: c,
|
|
2133
|
-
backgroundColor:
|
|
2134
|
-
borderTop:
|
|
2146
|
+
backgroundColor: se,
|
|
2147
|
+
borderTop: z ? `1px solid ${V === "dark" ? y.colors.dark[5] : y.colors.gray[2]}` : void 0
|
|
2135
2148
|
},
|
|
2136
2149
|
children: d
|
|
2137
2150
|
}
|
|
@@ -2153,7 +2166,7 @@ function oo(A) {
|
|
|
2153
2166
|
onMenuItemClick: l
|
|
2154
2167
|
} = A;
|
|
2155
2168
|
return /* @__PURE__ */ r(
|
|
2156
|
-
|
|
2169
|
+
CA,
|
|
2157
2170
|
{
|
|
2158
2171
|
navigationData: t,
|
|
2159
2172
|
variant: "standard",
|
|
@@ -2174,18 +2187,18 @@ function no({
|
|
|
2174
2187
|
iconColor: e,
|
|
2175
2188
|
activeColor: n
|
|
2176
2189
|
}) {
|
|
2177
|
-
|
|
2178
|
-
const { colorScheme: s } =
|
|
2190
|
+
me();
|
|
2191
|
+
const { colorScheme: s } = de(), a = typeof A.disabled == "function" ? A.disabled() : A.disabled;
|
|
2179
2192
|
if (a && A.hideDisabledItem || !A.showInSidebar)
|
|
2180
2193
|
return null;
|
|
2181
|
-
const l =
|
|
2194
|
+
const l = Re.t(A.label);
|
|
2182
2195
|
if (A.links && A.links.length > 0) {
|
|
2183
2196
|
const d = A.links.filter((c) => {
|
|
2184
2197
|
const u = typeof c.disabled == "function" ? c.disabled() : c.disabled;
|
|
2185
2198
|
return c.showInSidebar && (!u || !c.hideDisabledItem);
|
|
2186
2199
|
});
|
|
2187
|
-
return d.length === 0 ? null : /* @__PURE__ */
|
|
2188
|
-
|
|
2200
|
+
return d.length === 0 ? null : /* @__PURE__ */ R(
|
|
2201
|
+
ie,
|
|
2189
2202
|
{
|
|
2190
2203
|
position: "right-start",
|
|
2191
2204
|
withArrow: !0,
|
|
@@ -2194,9 +2207,9 @@ function no({
|
|
|
2194
2207
|
openDelay: 100,
|
|
2195
2208
|
closeDelay: 200,
|
|
2196
2209
|
children: [
|
|
2197
|
-
/* @__PURE__ */ r(
|
|
2210
|
+
/* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Me, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(J, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2198
2211
|
/* @__PURE__ */ r(
|
|
2199
|
-
|
|
2212
|
+
De,
|
|
2200
2213
|
{
|
|
2201
2214
|
size: "xl",
|
|
2202
2215
|
variant: t ? "filled" : "subtle",
|
|
@@ -2205,11 +2218,11 @@ function no({
|
|
|
2205
2218
|
style: {
|
|
2206
2219
|
opacity: a ? 0.5 : 1
|
|
2207
2220
|
},
|
|
2208
|
-
children: /* @__PURE__ */ r(
|
|
2221
|
+
children: /* @__PURE__ */ r(B, { style: { color: t ? "white" : e }, children: A.icon })
|
|
2209
2222
|
}
|
|
2210
2223
|
),
|
|
2211
2224
|
/* @__PURE__ */ r(
|
|
2212
|
-
|
|
2225
|
+
Te,
|
|
2213
2226
|
{
|
|
2214
2227
|
size: "8px",
|
|
2215
2228
|
ta: "center",
|
|
@@ -2225,17 +2238,17 @@ function no({
|
|
|
2225
2238
|
}
|
|
2226
2239
|
)
|
|
2227
2240
|
] }) }) }),
|
|
2228
|
-
/* @__PURE__ */
|
|
2229
|
-
/* @__PURE__ */ r(
|
|
2241
|
+
/* @__PURE__ */ R(ie.Dropdown, { children: [
|
|
2242
|
+
/* @__PURE__ */ r(ie.Label, { children: l }),
|
|
2230
2243
|
d.map((c, u) => {
|
|
2231
2244
|
const i = typeof c.disabled == "function" ? c.disabled() : c.disabled;
|
|
2232
2245
|
return /* @__PURE__ */ r(
|
|
2233
|
-
|
|
2246
|
+
ie.Item,
|
|
2234
2247
|
{
|
|
2235
2248
|
leftSection: c.icon,
|
|
2236
2249
|
disabled: i,
|
|
2237
2250
|
onClick: () => o(c),
|
|
2238
|
-
children:
|
|
2251
|
+
children: Re.t(c.label)
|
|
2239
2252
|
},
|
|
2240
2253
|
u
|
|
2241
2254
|
);
|
|
@@ -2245,9 +2258,9 @@ function no({
|
|
|
2245
2258
|
}
|
|
2246
2259
|
);
|
|
2247
2260
|
}
|
|
2248
|
-
return /* @__PURE__ */ r(
|
|
2261
|
+
return /* @__PURE__ */ r(Me, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(J, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
|
|
2249
2262
|
/* @__PURE__ */ r(
|
|
2250
|
-
|
|
2263
|
+
De,
|
|
2251
2264
|
{
|
|
2252
2265
|
size: "xl",
|
|
2253
2266
|
variant: t ? "filled" : "subtle",
|
|
@@ -2257,11 +2270,11 @@ function no({
|
|
|
2257
2270
|
style: {
|
|
2258
2271
|
opacity: a ? 0.5 : 1
|
|
2259
2272
|
},
|
|
2260
|
-
children: /* @__PURE__ */ r(
|
|
2273
|
+
children: /* @__PURE__ */ r(B, { style: { color: t ? "white" : e }, children: A.icon })
|
|
2261
2274
|
}
|
|
2262
2275
|
),
|
|
2263
2276
|
/* @__PURE__ */ r(
|
|
2264
|
-
|
|
2277
|
+
Te,
|
|
2265
2278
|
{
|
|
2266
2279
|
size: "8px",
|
|
2267
2280
|
ta: "center",
|
|
@@ -2298,83 +2311,83 @@ function so({
|
|
|
2298
2311
|
withBorder: m = !0,
|
|
2299
2312
|
withShadow: g = !1,
|
|
2300
2313
|
highlightActiveItem: f = !0,
|
|
2301
|
-
onMenuItemClick:
|
|
2314
|
+
onMenuItemClick: S
|
|
2302
2315
|
}) {
|
|
2303
|
-
const
|
|
2316
|
+
const k = me(), { colorScheme: D } = de(), { toggleCollapsed: j } = vA(), z = D === "dark" ? i ?? k.colors.dark[7] : h ?? k.white, U = D === "dark" ? p ?? k.colors[k.primaryColor][4] : b ?? k.colors[k.primaryColor][6], O = C ?? k.primaryColor, { navigateToItem: $, isItemActive: M, isItemOrChildActive: F } = wA({
|
|
2304
2317
|
navigationData: A,
|
|
2305
|
-
onMenuItemClick:
|
|
2318
|
+
onMenuItemClick: S
|
|
2306
2319
|
});
|
|
2307
|
-
|
|
2320
|
+
SA({
|
|
2308
2321
|
navigationData: A,
|
|
2309
|
-
navigateToItem:
|
|
2310
|
-
onToggleSidebar:
|
|
2322
|
+
navigateToItem: $,
|
|
2323
|
+
onToggleSidebar: j,
|
|
2311
2324
|
enabled: !0
|
|
2312
2325
|
});
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2326
|
+
const P = A.filter((E) => !(!E.showInSidebar || (typeof E.disabled == "function" ? E.disabled() : E.disabled) && E.hideDisabledItem)), y = () => l ? c || /* @__PURE__ */ r(xA, { message: l, backgroundColor: z }) : a ? d || /* @__PURE__ */ r(
|
|
2327
|
+
kA,
|
|
2315
2328
|
{
|
|
2316
2329
|
itemCount: u,
|
|
2317
2330
|
collapsed: !0,
|
|
2318
|
-
backgroundColor:
|
|
2331
|
+
backgroundColor: z
|
|
2319
2332
|
}
|
|
2320
|
-
) : /* @__PURE__ */ r(
|
|
2333
|
+
) : /* @__PURE__ */ r(J, { gap: 8, align: "center", children: P.map((E, W) => /* @__PURE__ */ r(
|
|
2321
2334
|
no,
|
|
2322
2335
|
{
|
|
2323
|
-
item:
|
|
2324
|
-
active: f && (
|
|
2325
|
-
onClick:
|
|
2336
|
+
item: E,
|
|
2337
|
+
active: f && (M(E) || F(E)),
|
|
2338
|
+
onClick: $,
|
|
2326
2339
|
iconColor: U,
|
|
2327
|
-
activeColor:
|
|
2340
|
+
activeColor: O
|
|
2328
2341
|
},
|
|
2329
|
-
|
|
2330
|
-
)) }),
|
|
2331
|
-
return /* @__PURE__ */
|
|
2332
|
-
|
|
2342
|
+
W
|
|
2343
|
+
)) }), V = D === "dark" ? k.colors.dark[5] : k.colors.gray[2];
|
|
2344
|
+
return /* @__PURE__ */ R(
|
|
2345
|
+
B,
|
|
2333
2346
|
{
|
|
2334
2347
|
style: {
|
|
2335
2348
|
width: fe(t),
|
|
2336
2349
|
height: fe(o),
|
|
2337
|
-
backgroundColor:
|
|
2350
|
+
backgroundColor: z,
|
|
2338
2351
|
display: "flex",
|
|
2339
2352
|
flexDirection: "column",
|
|
2340
2353
|
overflow: "hidden",
|
|
2341
|
-
boxShadow: g ?
|
|
2342
|
-
borderRight: m ? `1px solid ${
|
|
2354
|
+
boxShadow: g ? k.shadows.sm : void 0,
|
|
2355
|
+
borderRight: m ? `1px solid ${V}` : void 0
|
|
2343
2356
|
},
|
|
2344
2357
|
children: [
|
|
2345
2358
|
e && /* @__PURE__ */ r(
|
|
2346
|
-
|
|
2359
|
+
B,
|
|
2347
2360
|
{
|
|
2348
2361
|
style: {
|
|
2349
2362
|
flexShrink: 0,
|
|
2350
2363
|
display: "flex",
|
|
2351
2364
|
justifyContent: "center",
|
|
2352
|
-
padding:
|
|
2365
|
+
padding: k.spacing.xs
|
|
2353
2366
|
},
|
|
2354
2367
|
children: e
|
|
2355
2368
|
}
|
|
2356
2369
|
),
|
|
2357
|
-
e && /* @__PURE__ */ r(
|
|
2370
|
+
e && /* @__PURE__ */ r(dA, {}),
|
|
2358
2371
|
/* @__PURE__ */ r(
|
|
2359
|
-
|
|
2372
|
+
ze,
|
|
2360
2373
|
{
|
|
2361
2374
|
style: { flex: 1 },
|
|
2362
2375
|
scrollbarSize: 4,
|
|
2363
2376
|
type: "hover",
|
|
2364
|
-
children: /* @__PURE__ */ r(
|
|
2377
|
+
children: /* @__PURE__ */ r(B, { p: "xs", children: y() })
|
|
2365
2378
|
}
|
|
2366
2379
|
),
|
|
2367
|
-
n && /* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */ r(
|
|
2380
|
+
n && /* @__PURE__ */ R(Pe, { children: [
|
|
2381
|
+
/* @__PURE__ */ r(dA, {}),
|
|
2369
2382
|
/* @__PURE__ */ r(
|
|
2370
|
-
|
|
2383
|
+
B,
|
|
2371
2384
|
{
|
|
2372
2385
|
style: {
|
|
2373
2386
|
flexShrink: 0,
|
|
2374
2387
|
height: s,
|
|
2375
2388
|
display: "flex",
|
|
2376
2389
|
justifyContent: "center",
|
|
2377
|
-
padding:
|
|
2390
|
+
padding: k.spacing.xs
|
|
2378
2391
|
},
|
|
2379
2392
|
children: n
|
|
2380
2393
|
}
|
|
@@ -2395,7 +2408,7 @@ function lo(A) {
|
|
|
2395
2408
|
onMenuItemClick: l
|
|
2396
2409
|
} = A;
|
|
2397
2410
|
return /* @__PURE__ */ r(
|
|
2398
|
-
|
|
2411
|
+
CA,
|
|
2399
2412
|
{
|
|
2400
2413
|
navigationData: t,
|
|
2401
2414
|
variant: "minimal",
|
|
@@ -2429,70 +2442,78 @@ function ao({
|
|
|
2429
2442
|
backgroundDarkColor: m,
|
|
2430
2443
|
backgroundLightColor: g,
|
|
2431
2444
|
backgroundImage: f,
|
|
2432
|
-
textDarkColor:
|
|
2433
|
-
textLightColor:
|
|
2445
|
+
textDarkColor: S,
|
|
2446
|
+
textLightColor: k,
|
|
2434
2447
|
iconDarkColor: D,
|
|
2435
|
-
iconLightColor:
|
|
2436
|
-
activeColor:
|
|
2448
|
+
iconLightColor: j,
|
|
2449
|
+
activeColor: z,
|
|
2437
2450
|
groupBackgroundColor: U,
|
|
2438
|
-
selectedGroupColor:
|
|
2439
|
-
groupColor:
|
|
2440
|
-
groupLabelDarkColor:
|
|
2441
|
-
groupLabelLightColor:
|
|
2442
|
-
withBorder:
|
|
2443
|
-
highlightActiveItem:
|
|
2444
|
-
onMenuItemClick:
|
|
2445
|
-
itemBorderRadius:
|
|
2446
|
-
itemHorizontalGap:
|
|
2447
|
-
itemActiveBackground:
|
|
2451
|
+
selectedGroupColor: O,
|
|
2452
|
+
groupColor: $,
|
|
2453
|
+
groupLabelDarkColor: M,
|
|
2454
|
+
groupLabelLightColor: F,
|
|
2455
|
+
withBorder: P = !1,
|
|
2456
|
+
highlightActiveItem: y = !0,
|
|
2457
|
+
onMenuItemClick: V,
|
|
2458
|
+
itemBorderRadius: E,
|
|
2459
|
+
itemHorizontalGap: W,
|
|
2460
|
+
itemActiveBackground: H
|
|
2448
2461
|
}) {
|
|
2449
|
-
const
|
|
2450
|
-
collapsed:
|
|
2451
|
-
toggleCollapsed:
|
|
2452
|
-
activeGroup:
|
|
2453
|
-
setActiveGroup:
|
|
2454
|
-
} =
|
|
2462
|
+
const I = me(), { colorScheme: G } = de(), {
|
|
2463
|
+
collapsed: ne,
|
|
2464
|
+
toggleCollapsed: we,
|
|
2465
|
+
activeGroup: se,
|
|
2466
|
+
setActiveGroup: be
|
|
2467
|
+
} = vA(), ke = G === "dark" ? m ?? I.colors.dark[7] : g ?? I.white, T = f ? { background: f } : { backgroundColor: ke }, v = f ? "transparent" : ke, Q = G === "dark" ? S ?? I.colors.gray[3] : k ?? I.colors.gray[7], L = G === "dark" ? D ?? I.colors[I.primaryColor][4] : j ?? I.colors[I.primaryColor][6], x = z ? I.colors[z]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], X = U || (G === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), N = O || (G === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: Y, isItemActive: Ce } = wA({
|
|
2455
2468
|
navigationData: A,
|
|
2456
|
-
onMenuItemClick:
|
|
2457
|
-
})
|
|
2458
|
-
|
|
2469
|
+
onMenuItemClick: V
|
|
2470
|
+
}), le = w(
|
|
2471
|
+
(K) => !!y && Ce(K),
|
|
2472
|
+
[y, Ce]
|
|
2473
|
+
), xe = {
|
|
2474
|
+
itemBorderRadius: E,
|
|
2475
|
+
itemHorizontalGap: W,
|
|
2476
|
+
activeBackground: H,
|
|
2477
|
+
isActive: le
|
|
2478
|
+
};
|
|
2479
|
+
SA({
|
|
2459
2480
|
navigationData: A,
|
|
2460
|
-
navigateToItem:
|
|
2461
|
-
onToggleSidebar:
|
|
2481
|
+
navigateToItem: Y,
|
|
2482
|
+
onToggleSidebar: we,
|
|
2462
2483
|
enabled: !0
|
|
2463
2484
|
});
|
|
2464
|
-
const
|
|
2465
|
-
const
|
|
2466
|
-
return A.forEach((
|
|
2467
|
-
if (!
|
|
2485
|
+
const Z = ce(() => {
|
|
2486
|
+
const K = /* @__PURE__ */ new Map();
|
|
2487
|
+
return A.forEach((ue) => {
|
|
2488
|
+
if (!ue.showInSidebar || (typeof ue.disabled == "function" ? ue.disabled() : ue.disabled) && ue.hideDisabledItem)
|
|
2468
2489
|
return;
|
|
2469
|
-
const
|
|
2490
|
+
const Fe = ue.group ?? {
|
|
2470
2491
|
icon: s ?? /* @__PURE__ */ r(JA, { size: "2.2rem", stroke: 1 }),
|
|
2471
2492
|
label: "Default",
|
|
2472
2493
|
name: "Default",
|
|
2473
2494
|
hint: "Default",
|
|
2474
2495
|
indexOrder: 0
|
|
2475
|
-
},
|
|
2476
|
-
|
|
2477
|
-
group:
|
|
2478
|
-
items: [
|
|
2496
|
+
}, Ve = K.get(Fe.name);
|
|
2497
|
+
Ve ? Ve.items.push(ue) : K.set(Fe.name, {
|
|
2498
|
+
group: Fe,
|
|
2499
|
+
items: [ue]
|
|
2479
2500
|
});
|
|
2480
|
-
}), Array.from(
|
|
2501
|
+
}), Array.from(K.values()).sort((ue, Qe) => ue.group.indexOrder - Qe.group.indexOrder);
|
|
2481
2502
|
}, [A, s]);
|
|
2482
2503
|
te(() => {
|
|
2483
|
-
!
|
|
2484
|
-
}, [
|
|
2485
|
-
const
|
|
2486
|
-
|
|
2487
|
-
}, [
|
|
2504
|
+
!se && Z.length > 0 && be(Z[0].group.name);
|
|
2505
|
+
}, [se, Z, be]);
|
|
2506
|
+
const Ie = ce(() => Z.find((ue) => ue.group.name === se)?.items ?? [], [Z, se]), ee = w((K) => {
|
|
2507
|
+
ne ? (we(), be(K)) : se === K ? we() : be(K);
|
|
2508
|
+
}, [ne, se, we, be]), Ae = ne ? 0 : Number(fe(t)) - Number(fe(n)), Ee = () => u && Z.length === 0 ? /* @__PURE__ */ r(
|
|
2488
2509
|
ro,
|
|
2489
2510
|
{
|
|
2490
2511
|
groupCount: C,
|
|
2491
2512
|
width: n,
|
|
2492
|
-
backgroundColor:
|
|
2513
|
+
backgroundColor: X
|
|
2493
2514
|
}
|
|
2494
|
-
) :
|
|
2495
|
-
|
|
2515
|
+
) : Z.length <= 1 ? null : /* @__PURE__ */ r(
|
|
2516
|
+
J,
|
|
2496
2517
|
{
|
|
2497
2518
|
gap: 4,
|
|
2498
2519
|
p: 4,
|
|
@@ -2500,107 +2521,107 @@ function ao({
|
|
|
2500
2521
|
style: {
|
|
2501
2522
|
width: n,
|
|
2502
2523
|
height: "100%",
|
|
2503
|
-
backgroundColor:
|
|
2524
|
+
backgroundColor: X,
|
|
2504
2525
|
flexShrink: 0
|
|
2505
2526
|
},
|
|
2506
|
-
children:
|
|
2527
|
+
children: Z.map((K) => /* @__PURE__ */ r(
|
|
2507
2528
|
Ao,
|
|
2508
2529
|
{
|
|
2509
|
-
group:
|
|
2510
|
-
active:
|
|
2511
|
-
onClick: () =>
|
|
2530
|
+
group: K.group,
|
|
2531
|
+
active: K.group.name === se,
|
|
2532
|
+
onClick: () => ee(K.group.name),
|
|
2512
2533
|
showLabel: a,
|
|
2513
|
-
activeColor:
|
|
2514
|
-
inactiveColor:
|
|
2534
|
+
activeColor: N,
|
|
2535
|
+
inactiveColor: $
|
|
2515
2536
|
},
|
|
2516
|
-
|
|
2537
|
+
K.group.name
|
|
2517
2538
|
))
|
|
2518
2539
|
}
|
|
2519
|
-
),
|
|
2520
|
-
|
|
2540
|
+
), q = () => i ? p || /* @__PURE__ */ r(xA, { message: i, backgroundColor: ke }) : u ? h || /* @__PURE__ */ r(
|
|
2541
|
+
kA,
|
|
2521
2542
|
{
|
|
2522
2543
|
itemCount: b,
|
|
2523
2544
|
collapsed: !1,
|
|
2524
|
-
backgroundColor:
|
|
2545
|
+
backgroundColor: ke,
|
|
2525
2546
|
showGroups: !1
|
|
2526
2547
|
}
|
|
2527
|
-
) : /* @__PURE__ */ r(
|
|
2548
|
+
) : /* @__PURE__ */ r(J, { gap: 2, children: Ie.map((K, ue) => /* @__PURE__ */ r(
|
|
2528
2549
|
$e,
|
|
2529
2550
|
{
|
|
2530
|
-
item:
|
|
2551
|
+
item: K,
|
|
2531
2552
|
collapsed: !1,
|
|
2532
|
-
active:
|
|
2533
|
-
onClick:
|
|
2553
|
+
active: y && Ce(K),
|
|
2554
|
+
onClick: Y,
|
|
2534
2555
|
textColor: Q,
|
|
2535
|
-
iconColor:
|
|
2556
|
+
iconColor: L,
|
|
2536
2557
|
hoverColor: x,
|
|
2537
|
-
...
|
|
2558
|
+
...xe
|
|
2538
2559
|
},
|
|
2539
|
-
|
|
2540
|
-
)) }),
|
|
2541
|
-
return
|
|
2542
|
-
l && /* @__PURE__ */ r(
|
|
2560
|
+
ue
|
|
2561
|
+
)) }), ye = G === "dark" ? I.colors.dark[5] : I.colors.gray[2];
|
|
2562
|
+
return Z.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: ne ? o : t, h: "100%", style: T, children: [
|
|
2563
|
+
l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2543
2564
|
/* @__PURE__ */ r(
|
|
2544
|
-
|
|
2565
|
+
B,
|
|
2545
2566
|
{
|
|
2546
2567
|
style: {
|
|
2547
2568
|
flex: 1,
|
|
2548
2569
|
width: "100%",
|
|
2549
|
-
backgroundColor:
|
|
2570
|
+
backgroundColor: v,
|
|
2550
2571
|
display: "flex",
|
|
2551
2572
|
flexDirection: "column",
|
|
2552
2573
|
overflow: "hidden",
|
|
2553
|
-
borderRight:
|
|
2574
|
+
borderRight: P ? `1px solid ${ye}` : void 0
|
|
2554
2575
|
},
|
|
2555
|
-
children: /* @__PURE__ */ r(
|
|
2576
|
+
children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: ne ? /* @__PURE__ */ r(J, { gap: 8, align: "center", children: A.filter((K) => K.showInSidebar ? !((typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem) : !1).map((K, ue) => /* @__PURE__ */ r(
|
|
2556
2577
|
$e,
|
|
2557
2578
|
{
|
|
2558
|
-
item:
|
|
2579
|
+
item: K,
|
|
2559
2580
|
collapsed: !0,
|
|
2560
|
-
active:
|
|
2561
|
-
onClick:
|
|
2581
|
+
active: y && Ce(K),
|
|
2582
|
+
onClick: Y,
|
|
2562
2583
|
textColor: Q,
|
|
2563
|
-
iconColor:
|
|
2584
|
+
iconColor: L,
|
|
2564
2585
|
hoverColor: x,
|
|
2565
|
-
...
|
|
2586
|
+
...xe
|
|
2566
2587
|
},
|
|
2567
|
-
|
|
2568
|
-
)) }) :
|
|
2588
|
+
ue
|
|
2589
|
+
)) }) : q() }) })
|
|
2569
2590
|
}
|
|
2570
2591
|
),
|
|
2571
|
-
d && /* @__PURE__ */ r(
|
|
2572
|
-
] }) : /* @__PURE__ */
|
|
2573
|
-
l && /* @__PURE__ */ r(
|
|
2574
|
-
/* @__PURE__ */
|
|
2575
|
-
|
|
2592
|
+
d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: v, flexShrink: 0 }, children: d })
|
|
2593
|
+
] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: ne ? n : t, h: "100%", style: T, children: [
|
|
2594
|
+
l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
|
|
2595
|
+
/* @__PURE__ */ R(
|
|
2596
|
+
B,
|
|
2576
2597
|
{
|
|
2577
2598
|
style: {
|
|
2578
2599
|
flex: 1,
|
|
2579
2600
|
width: "100%",
|
|
2580
2601
|
display: "flex",
|
|
2581
2602
|
overflow: "hidden",
|
|
2582
|
-
borderRight:
|
|
2603
|
+
borderRight: P ? `1px solid ${ye}` : void 0
|
|
2583
2604
|
},
|
|
2584
2605
|
children: [
|
|
2585
|
-
|
|
2606
|
+
Ee(),
|
|
2586
2607
|
/* @__PURE__ */ r(
|
|
2587
|
-
|
|
2608
|
+
B,
|
|
2588
2609
|
{
|
|
2589
2610
|
style: {
|
|
2590
|
-
width:
|
|
2611
|
+
width: ne ? 0 : Ae,
|
|
2591
2612
|
height: "100%",
|
|
2592
|
-
backgroundColor:
|
|
2613
|
+
backgroundColor: v,
|
|
2593
2614
|
overflow: "hidden",
|
|
2594
2615
|
transition: "width 200ms ease",
|
|
2595
|
-
borderLeft:
|
|
2616
|
+
borderLeft: Z.length > 1 ? `1px solid ${G === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
|
|
2596
2617
|
},
|
|
2597
|
-
children: !
|
|
2618
|
+
children: !ne && se && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: q() }) })
|
|
2598
2619
|
}
|
|
2599
2620
|
)
|
|
2600
2621
|
]
|
|
2601
2622
|
}
|
|
2602
2623
|
),
|
|
2603
|
-
d && /* @__PURE__ */ r(
|
|
2624
|
+
d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: v, flexShrink: 0 }, children: d })
|
|
2604
2625
|
] });
|
|
2605
2626
|
}
|
|
2606
2627
|
function io(A) {
|
|
@@ -2617,7 +2638,7 @@ function io(A) {
|
|
|
2617
2638
|
onMenuItemClick: u
|
|
2618
2639
|
} = A;
|
|
2619
2640
|
return /* @__PURE__ */ r(
|
|
2620
|
-
|
|
2641
|
+
CA,
|
|
2621
2642
|
{
|
|
2622
2643
|
navigationData: t,
|
|
2623
2644
|
variant: "rail",
|
|
@@ -2648,16 +2669,16 @@ function co({
|
|
|
2648
2669
|
return /* @__PURE__ */ r(oo, { ...t });
|
|
2649
2670
|
}
|
|
2650
2671
|
}
|
|
2651
|
-
function
|
|
2672
|
+
function IA(A) {
|
|
2652
2673
|
return A == null;
|
|
2653
2674
|
}
|
|
2654
2675
|
function lr(A) {
|
|
2655
2676
|
return Object.prototype.toString.call(A) === "[object RegExp]";
|
|
2656
2677
|
}
|
|
2657
|
-
function
|
|
2678
|
+
function hA(A) {
|
|
2658
2679
|
return Array.isArray(A);
|
|
2659
2680
|
}
|
|
2660
|
-
function
|
|
2681
|
+
function We(A) {
|
|
2661
2682
|
return typeof A == "function";
|
|
2662
2683
|
}
|
|
2663
2684
|
function ar(A) {
|
|
@@ -2667,32 +2688,32 @@ function $A(A = 100) {
|
|
|
2667
2688
|
let t;
|
|
2668
2689
|
return new Promise((o, e) => {
|
|
2669
2690
|
t = setTimeout(() => {
|
|
2670
|
-
o(),
|
|
2691
|
+
o(), IA(t) || clearTimeout(t);
|
|
2671
2692
|
}, A);
|
|
2672
2693
|
});
|
|
2673
2694
|
}
|
|
2674
2695
|
function QA(A, t) {
|
|
2675
|
-
return (
|
|
2696
|
+
return (hA(A) ? A : IA(A) ? [] : [A]).some((o) => lr(o) ? o.test(t) : t === o);
|
|
2676
2697
|
}
|
|
2677
|
-
function
|
|
2698
|
+
function lA(A) {
|
|
2678
2699
|
setTimeout(A, 0);
|
|
2679
2700
|
}
|
|
2680
|
-
var ir =
|
|
2701
|
+
var ir = Ne({ active: !1, refresh: () => {
|
|
2681
2702
|
}, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), uo = BA(function(A) {
|
|
2682
|
-
let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A, d =
|
|
2703
|
+
let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A, d = ce(() => ({ active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, e, n, s, a, l]);
|
|
2683
2704
|
return r(ir.Provider, { value: d, children: t });
|
|
2684
2705
|
}), ho = uo, cr = GA.Activity, fo = cr ?? GA.Fragment, po = !!cr, dr = "keepalive-cache-div";
|
|
2685
2706
|
function ur(A) {
|
|
2686
2707
|
return A ? Array.from(A.children) : [];
|
|
2687
2708
|
}
|
|
2688
|
-
function
|
|
2709
|
+
function fA(A) {
|
|
2689
2710
|
A.forEach((t) => {
|
|
2690
2711
|
t.classList.contains(dr) && t.remove();
|
|
2691
2712
|
});
|
|
2692
2713
|
}
|
|
2693
2714
|
function KA(A, t) {
|
|
2694
2715
|
let o = ur(A);
|
|
2695
|
-
|
|
2716
|
+
fA(o), A.appendChild(t), t.classList.remove("inactive"), t.classList.add("active");
|
|
2696
2717
|
}
|
|
2697
2718
|
function FA(A, t) {
|
|
2698
2719
|
let o = ur(A).filter((e) => e.classList.contains("active") && e.getAttribute("data-cache-key") !== t);
|
|
@@ -2704,9 +2725,9 @@ function go(A, t, o) {
|
|
|
2704
2725
|
return o ? QA(o, A) : t ? !QA(t, A) : !0;
|
|
2705
2726
|
}
|
|
2706
2727
|
var bo = BA(function(A) {
|
|
2707
|
-
let { errorElement: t = UA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: d, renderCount: c, destroy: u, transition: i, viewTransition: h, duration: p, containerDivRef: b } = A, C =
|
|
2728
|
+
let { errorElement: t = UA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: d, renderCount: c, destroy: u, transition: i, viewTransition: h, duration: p, containerDivRef: b } = A, C = _(!1);
|
|
2708
2729
|
C.current = C.current || d;
|
|
2709
|
-
let m =
|
|
2730
|
+
let m = ce(() => {
|
|
2710
2731
|
let g = document.createElement("div");
|
|
2711
2732
|
return ar(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", c.toString()), g.className = dr + (o ? ` ${o}` : ""), g;
|
|
2712
2733
|
}, [c, o]);
|
|
@@ -2719,90 +2740,90 @@ var bo = BA(function(A) {
|
|
|
2719
2740
|
if (i)
|
|
2720
2741
|
(async () => {
|
|
2721
2742
|
if (d) {
|
|
2722
|
-
let
|
|
2723
|
-
if (await $A(p - 40),
|
|
2743
|
+
let S = FA(f, n);
|
|
2744
|
+
if (await $A(p - 40), fA(S), f.contains(m))
|
|
2724
2745
|
return;
|
|
2725
2746
|
KA(f, m);
|
|
2726
2747
|
} else
|
|
2727
2748
|
g || (await $A(p), u(n));
|
|
2728
2749
|
})();
|
|
2729
2750
|
else if (d) {
|
|
2730
|
-
let
|
|
2731
|
-
let
|
|
2732
|
-
|
|
2751
|
+
let S = () => {
|
|
2752
|
+
let k = FA(f, n);
|
|
2753
|
+
fA(k), !f.contains(m) && KA(f, m);
|
|
2733
2754
|
};
|
|
2734
|
-
h && document.startViewTransition ? document.startViewTransition(
|
|
2755
|
+
h && document.startViewTransition ? document.startViewTransition(S) : S();
|
|
2735
2756
|
} else
|
|
2736
2757
|
g || u(n);
|
|
2737
|
-
}, [d, b, n, s, a]), C.current ? Rt(r(t, { children: po && l ?
|
|
2758
|
+
}, [d, b, n, s, a]), C.current ? Rt(r(t, { children: po && l ? R(fo, { mode: d ? "visible" : "hidden", children: [" ", e] }) : e }), m, n) : null;
|
|
2738
2759
|
}, (A, t) => A.active === t.active && A.renderCount === t.renderCount && A.children === t.children && A.exclude === t.exclude && A.include === t.include), mo = bo, yo = (A) => {
|
|
2739
|
-
typeof
|
|
2760
|
+
typeof nA < "u" && We(nA) ? nA(A) : A();
|
|
2740
2761
|
}, vo = yo;
|
|
2741
2762
|
function hr() {
|
|
2742
|
-
return
|
|
2763
|
+
return _(null);
|
|
2743
2764
|
}
|
|
2744
2765
|
function Co(A) {
|
|
2745
|
-
let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: c, transition: u = !1, viewTransition: i = !1, duration: h = 200, children: p, aliveRef: b, maxAliveTime: C = 0, enableActivity: m = !1 } = A, g = a ||
|
|
2766
|
+
let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: c, transition: u = !1, viewTransition: i = !1, duration: h = 200, children: p, aliveRef: b, maxAliveTime: C = 0, enableActivity: m = !1 } = A, g = a || _(null), [f, S] = ge([]);
|
|
2746
2767
|
kr(() => {
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
let
|
|
2750
|
-
if (
|
|
2751
|
-
return
|
|
2752
|
-
if (
|
|
2753
|
-
let
|
|
2754
|
-
if (
|
|
2755
|
-
let
|
|
2756
|
-
if (
|
|
2757
|
-
let
|
|
2758
|
-
|
|
2768
|
+
IA(t) || vo(() => {
|
|
2769
|
+
S((O) => {
|
|
2770
|
+
let $ = Date.now();
|
|
2771
|
+
if (O.find((M) => M.cacheKey === t))
|
|
2772
|
+
return O.map((M) => {
|
|
2773
|
+
if (M.cacheKey === t) {
|
|
2774
|
+
let F = !1;
|
|
2775
|
+
if (We(s) && s(t), C) {
|
|
2776
|
+
let P = M.lastActiveTime;
|
|
2777
|
+
if (hA(C)) {
|
|
2778
|
+
let y = C.find((V) => lr(V.match) ? V.match.test(t) : V.match === t);
|
|
2779
|
+
y && (F = y && P + y.expire * 1e3 < $);
|
|
2759
2780
|
} else
|
|
2760
|
-
|
|
2781
|
+
F = P + C * 1e3 < $;
|
|
2761
2782
|
}
|
|
2762
|
-
return { ...
|
|
2783
|
+
return { ...M, ele: p, lastActiveTime: $, renderCount: F ? M.renderCount + 1 : M.renderCount };
|
|
2763
2784
|
}
|
|
2764
|
-
return
|
|
2785
|
+
return M;
|
|
2765
2786
|
});
|
|
2766
|
-
if (
|
|
2767
|
-
let
|
|
2768
|
-
|
|
2787
|
+
if (We(s) && s(t), O.length > o) {
|
|
2788
|
+
let M = O.reduce((F, P) => F.lastActiveTime < P.lastActiveTime ? F : P);
|
|
2789
|
+
O.splice(O.indexOf(M), 1);
|
|
2769
2790
|
}
|
|
2770
|
-
return [
|
|
2791
|
+
return [...O, { cacheKey: t, lastActiveTime: $, ele: p, renderCount: 0 }];
|
|
2771
2792
|
});
|
|
2772
2793
|
});
|
|
2773
2794
|
}, [t, p]);
|
|
2774
|
-
let
|
|
2775
|
-
|
|
2776
|
-
let
|
|
2777
|
-
return
|
|
2795
|
+
let k = w((O) => {
|
|
2796
|
+
S(($) => {
|
|
2797
|
+
let M = O || t;
|
|
2798
|
+
return $.map((F) => F.cacheKey === M ? { ...F, renderCount: F.renderCount + 1 } : F);
|
|
2778
2799
|
});
|
|
2779
|
-
}, [
|
|
2780
|
-
let
|
|
2781
|
-
return new Promise((
|
|
2782
|
-
|
|
2783
|
-
|
|
2800
|
+
}, [S, t]), D = w((O) => {
|
|
2801
|
+
let $ = O || t, M = hA($) ? $ : [$];
|
|
2802
|
+
return new Promise((F) => {
|
|
2803
|
+
lA(() => {
|
|
2804
|
+
S((P) => [...P.filter((y) => !M.includes(y.cacheKey))]), F();
|
|
2784
2805
|
});
|
|
2785
2806
|
});
|
|
2786
|
-
}, [
|
|
2787
|
-
|
|
2788
|
-
|
|
2807
|
+
}, [S, t]), j = w(() => new Promise((O) => {
|
|
2808
|
+
lA(() => {
|
|
2809
|
+
S([]), O();
|
|
2789
2810
|
});
|
|
2790
|
-
}), [
|
|
2791
|
-
let
|
|
2792
|
-
return new Promise((
|
|
2793
|
-
|
|
2794
|
-
|
|
2811
|
+
}), [S]), z = w((O) => {
|
|
2812
|
+
let $ = O || t;
|
|
2813
|
+
return new Promise((M) => {
|
|
2814
|
+
lA(() => {
|
|
2815
|
+
S((F) => [...F.filter((P) => P.cacheKey === $)]), M();
|
|
2795
2816
|
});
|
|
2796
2817
|
});
|
|
2797
|
-
}, [t,
|
|
2798
|
-
return xr(b, () => ({ refresh:
|
|
2799
|
-
let { cacheKey:
|
|
2800
|
-
return r(ho, { active: t ===
|
|
2818
|
+
}, [t, S]), U = w(() => f, [f]);
|
|
2819
|
+
return xr(b, () => ({ refresh: k, destroy: D, destroyAll: j, destroyOther: z, getCacheNodes: U })), R(UA, { children: [r("div", { ref: g, className: d, style: { height: "100%" } }), f.map((O) => {
|
|
2820
|
+
let { cacheKey: $, ele: M, renderCount: F } = O;
|
|
2821
|
+
return r(ho, { active: t === $, refresh: k, destroy: D, destroyAll: j, destroyOther: z, getCacheNodes: U, children: r(mo, { destroy: D, include: n, exclude: e, transition: u, viewTransition: i, duration: h, renderCount: F, containerDivRef: g, errorElement: c, active: t === $, cacheNodeClassName: l, cacheKey: $, enableActivity: m, children: M }) }, `${$}-${F}`);
|
|
2801
2822
|
})] });
|
|
2802
2823
|
}
|
|
2803
|
-
var wo = Co, So = () =>
|
|
2824
|
+
var wo = Co, So = () => ve(ir), fr = So;
|
|
2804
2825
|
function ko(A, t, o = !1, e) {
|
|
2805
|
-
let { active: n } = fr(), s =
|
|
2826
|
+
let { active: n } = fr(), s = _(!1);
|
|
2806
2827
|
e(() => {
|
|
2807
2828
|
if (!n)
|
|
2808
2829
|
return;
|
|
@@ -2812,27 +2833,27 @@ function ko(A, t, o = !1, e) {
|
|
|
2812
2833
|
}
|
|
2813
2834
|
let a = A();
|
|
2814
2835
|
return () => {
|
|
2815
|
-
|
|
2836
|
+
We(a) && a();
|
|
2816
2837
|
};
|
|
2817
2838
|
}, [n, ...t]);
|
|
2818
2839
|
}
|
|
2819
2840
|
var xo = ko, Io = (A, t, o = !1) => {
|
|
2820
2841
|
xo(A, t, o, te);
|
|
2821
2842
|
}, To = Io;
|
|
2822
|
-
const pr =
|
|
2843
|
+
const pr = Ne({
|
|
2823
2844
|
isVisible: !0,
|
|
2824
2845
|
wasRestored: !1,
|
|
2825
2846
|
restoreCount: 0
|
|
2826
|
-
}), Kn = () =>
|
|
2827
|
-
const A = Ar(), o =
|
|
2828
|
-
return
|
|
2847
|
+
}), Kn = () => ve(pr), TA = Ne({ params: {} }), Fn = () => ve(TA).params, Vn = () => {
|
|
2848
|
+
const A = Ar(), o = ve(TA).params;
|
|
2849
|
+
return ce(() => {
|
|
2829
2850
|
if (!A)
|
|
2830
2851
|
return !1;
|
|
2831
2852
|
const n = Object.keys(A);
|
|
2832
2853
|
return n.length === 0 ? !1 : n.some((s) => A[s] !== void 0);
|
|
2833
2854
|
}, [A]) ? A : o;
|
|
2834
|
-
},
|
|
2835
|
-
const t = hr(), o =
|
|
2855
|
+
}, Ze = Ne(null), Eo = () => ve(Ze), Ro = ({ children: A }) => {
|
|
2856
|
+
const t = hr(), o = ce(() => ({
|
|
2836
2857
|
requestUnregister: (e) => {
|
|
2837
2858
|
t.current?.destroy(e);
|
|
2838
2859
|
},
|
|
@@ -2847,16 +2868,16 @@ const pr = De({
|
|
|
2847
2868
|
},
|
|
2848
2869
|
getCacheNodes: () => t.current?.getCacheNodes() || []
|
|
2849
2870
|
}), [t]);
|
|
2850
|
-
return /* @__PURE__ */ r(
|
|
2851
|
-
}, gr =
|
|
2852
|
-
const { active: t } = fr(), o = Ar(), e =
|
|
2871
|
+
return /* @__PURE__ */ r(Ze.Provider, { value: o, children: /* @__PURE__ */ r(gr.Provider, { value: t, children: A }) });
|
|
2872
|
+
}, gr = Ne(null), eA = (A) => null, Po = (A) => A.includes(":"), Lo = (A, t) => Po(A) ? t : A, Mo = ({ children: A }) => {
|
|
2873
|
+
const { active: t } = fr(), o = Ar(), e = Xe(), n = vt(), s = _(o), [a, l] = ge(o);
|
|
2853
2874
|
s.current = o;
|
|
2854
|
-
const d =
|
|
2875
|
+
const d = _({ location: e, navigationType: n });
|
|
2855
2876
|
t && (d.current = { location: e, navigationType: n });
|
|
2856
|
-
const c =
|
|
2877
|
+
const c = ce(
|
|
2857
2878
|
() => t ? { location: e, navigationType: n } : d.current,
|
|
2858
2879
|
[t, e, n]
|
|
2859
|
-
), [u, i] =
|
|
2880
|
+
), [u, i] = ge(0), h = _(t);
|
|
2860
2881
|
To(() => {
|
|
2861
2882
|
l(s.current), requestAnimationFrame(() => {
|
|
2862
2883
|
window.dispatchEvent(new Event("resize"));
|
|
@@ -2864,18 +2885,18 @@ const pr = De({
|
|
|
2864
2885
|
}, []), te(() => {
|
|
2865
2886
|
t && (l(s.current), h.current || i((b) => b + 1)), h.current = t;
|
|
2866
2887
|
}, [t]);
|
|
2867
|
-
const p =
|
|
2888
|
+
const p = ce(
|
|
2868
2889
|
() => ({ isVisible: t, wasRestored: u > 0, restoreCount: u }),
|
|
2869
2890
|
[t, u]
|
|
2870
2891
|
);
|
|
2871
|
-
return /* @__PURE__ */ r(Ct.Provider, { value: c, children: /* @__PURE__ */ r(pr.Provider, { value: p, children: /* @__PURE__ */ r(
|
|
2872
|
-
}, Do = "__nokeep__:", br =
|
|
2873
|
-
const e =
|
|
2892
|
+
return /* @__PURE__ */ r(Ct.Provider, { value: c, children: /* @__PURE__ */ r(pr.Provider, { value: p, children: /* @__PURE__ */ r(TA.Provider, { value: { params: a }, children: A }) }) });
|
|
2893
|
+
}, Do = "__nokeep__:", br = Se.memo(({ keepAlivePaths: A, maxKeepAliveTabs: t, aliveRef: o }) => {
|
|
2894
|
+
const e = Xe(), n = mt(), s = ce(() => {
|
|
2874
2895
|
const l = A.find(
|
|
2875
2896
|
(d) => yt({ path: d, end: !0 }, e.pathname)
|
|
2876
2897
|
);
|
|
2877
2898
|
return l ? Lo(l, e.pathname) : Do + e.pathname;
|
|
2878
|
-
}, [A, e.pathname]), a =
|
|
2899
|
+
}, [A, e.pathname]), a = ce(() => [/^__nokeep__:/], []);
|
|
2879
2900
|
return /* @__PURE__ */ r(
|
|
2880
2901
|
wo,
|
|
2881
2902
|
{
|
|
@@ -2889,11 +2910,11 @@ const pr = De({
|
|
|
2889
2910
|
});
|
|
2890
2911
|
br.displayName = "KeepAliveLayout";
|
|
2891
2912
|
const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
2892
|
-
const e = hr(), s =
|
|
2893
|
-
const p =
|
|
2894
|
-
if (
|
|
2895
|
-
const
|
|
2896
|
-
return `${
|
|
2913
|
+
const e = hr(), s = ve(gr) || e, a = _(null), l = _(""), { keepAlivePaths: d, routeElements: c } = ce(() => {
|
|
2914
|
+
const p = Se.Children.toArray(A), b = p.map((f) => {
|
|
2915
|
+
if (Se.isValidElement(f)) {
|
|
2916
|
+
const S = f.props?.path || "", k = f.type === eA;
|
|
2917
|
+
return `${S}:${k}`;
|
|
2897
2918
|
}
|
|
2898
2919
|
return "";
|
|
2899
2920
|
}).join("|");
|
|
@@ -2902,19 +2923,19 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2902
2923
|
l.current = b;
|
|
2903
2924
|
const C = [], m = [];
|
|
2904
2925
|
p.forEach((f) => {
|
|
2905
|
-
if (
|
|
2906
|
-
if (f.type ===
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2909
|
-
const
|
|
2926
|
+
if (Se.isValidElement(f))
|
|
2927
|
+
if (f.type === eA) {
|
|
2928
|
+
const S = f.props;
|
|
2929
|
+
S.path && C.push(S.path);
|
|
2930
|
+
const k = S.component, D = typeof k == "function" ? Se.createElement(k) : k;
|
|
2910
2931
|
m.push(
|
|
2911
2932
|
/* @__PURE__ */ r(
|
|
2912
2933
|
Ke,
|
|
2913
2934
|
{
|
|
2914
|
-
path:
|
|
2935
|
+
path: S.path,
|
|
2915
2936
|
element: /* @__PURE__ */ r(Mo, { children: D })
|
|
2916
2937
|
},
|
|
2917
|
-
|
|
2938
|
+
S.path || f.key
|
|
2918
2939
|
)
|
|
2919
2940
|
);
|
|
2920
2941
|
} else
|
|
@@ -2922,7 +2943,7 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2922
2943
|
});
|
|
2923
2944
|
const g = { keepAlivePaths: C, routeElements: m };
|
|
2924
2945
|
return a.current = g, g;
|
|
2925
|
-
}, [A]), u =
|
|
2946
|
+
}, [A]), u = ve(Ze), i = ce(() => ({
|
|
2926
2947
|
requestUnregister: (p) => {
|
|
2927
2948
|
s.current?.destroy(p);
|
|
2928
2949
|
},
|
|
@@ -2944,24 +2965,24 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
|
|
|
2944
2965
|
aliveRef: s
|
|
2945
2966
|
}
|
|
2946
2967
|
), children: c }) });
|
|
2947
|
-
return u ? h : /* @__PURE__ */ r(
|
|
2948
|
-
}, mr =
|
|
2968
|
+
return u ? h : /* @__PURE__ */ r(Ze.Provider, { value: i, children: h });
|
|
2969
|
+
}, mr = Ne({
|
|
2949
2970
|
start: () => {
|
|
2950
2971
|
},
|
|
2951
2972
|
done: () => {
|
|
2952
2973
|
},
|
|
2953
2974
|
isNavigating: !1
|
|
2954
|
-
}), yr = () =>
|
|
2975
|
+
}), yr = () => ve(mr), zo = 150;
|
|
2955
2976
|
function Oo({ children: A }) {
|
|
2956
|
-
const [t, o] =
|
|
2977
|
+
const [t, o] = ge(!1), e = _(null), n = _(0), s = w(() => {
|
|
2957
2978
|
e.current && clearTimeout(e.current), n.current = Date.now(), o(!0);
|
|
2958
|
-
}, []), a =
|
|
2979
|
+
}, []), a = w(() => {
|
|
2959
2980
|
const l = Date.now() - n.current, d = Math.max(0, zo - l);
|
|
2960
2981
|
e.current = setTimeout(() => {
|
|
2961
2982
|
o(!1);
|
|
2962
2983
|
}, d);
|
|
2963
2984
|
}, []);
|
|
2964
|
-
return /* @__PURE__ */
|
|
2985
|
+
return /* @__PURE__ */ R(mr.Provider, { value: { start: s, done: a, isNavigating: t }, children: [
|
|
2965
2986
|
/* @__PURE__ */ r("div", { className: "archbase-nav-progress", "data-active": t, children: /* @__PURE__ */ r("div", { className: "archbase-nav-progress-bar" }) }),
|
|
2966
2987
|
A
|
|
2967
2988
|
] });
|
|
@@ -2977,14 +2998,14 @@ function $o(A, t, o, e, n, s) {
|
|
|
2977
2998
|
zIndex: "101"
|
|
2978
2999
|
},
|
|
2979
3000
|
children: /* @__PURE__ */ r(
|
|
2980
|
-
|
|
3001
|
+
De,
|
|
2981
3002
|
{
|
|
2982
3003
|
bg: t.colors[t.primaryColor][4],
|
|
2983
3004
|
color: t.colors[t.primaryColor][6],
|
|
2984
3005
|
variant: "filled",
|
|
2985
3006
|
radius: "xl",
|
|
2986
3007
|
onClick: s,
|
|
2987
|
-
children: o.collapsed ? /* @__PURE__ */ r(
|
|
3008
|
+
children: o.collapsed ? /* @__PURE__ */ r(gA, {}) : /* @__PURE__ */ r(Br, {})
|
|
2988
3009
|
}
|
|
2989
3010
|
)
|
|
2990
3011
|
}
|
|
@@ -3010,73 +3031,73 @@ function Qo({
|
|
|
3010
3031
|
backgroundGroupColor: m = "#132441",
|
|
3011
3032
|
groupLabelDarkColor: g = "white",
|
|
3012
3033
|
groupLabelLightColor: f = "white",
|
|
3013
|
-
headerColor:
|
|
3014
|
-
footerHeight:
|
|
3034
|
+
headerColor: S,
|
|
3035
|
+
footerHeight: k,
|
|
3015
3036
|
iconsWithBackground: D,
|
|
3016
|
-
menuItemHeight:
|
|
3017
|
-
showSideBar:
|
|
3037
|
+
menuItemHeight: j,
|
|
3038
|
+
showSideBar: z = !0,
|
|
3018
3039
|
showHeader: U = !0,
|
|
3019
|
-
headerStyle:
|
|
3020
|
-
highlightActiveMenuItem:
|
|
3021
|
-
customRenderSidebar:
|
|
3022
|
-
showCollapsedButton:
|
|
3023
|
-
sideBarBackgroundDarkColor:
|
|
3024
|
-
sideBarBackgroundLightColor:
|
|
3025
|
-
sideBarTextDarkColor:
|
|
3026
|
-
sideBarTextLightColor:
|
|
3027
|
-
sideBarIconDarkColor:
|
|
3028
|
-
sideBarIconLightColor:
|
|
3029
|
-
sideBarBackgroundImage:
|
|
3030
|
-
mainBackground:
|
|
3031
|
-
sideBarItemBorderRadius:
|
|
3032
|
-
sideBarItemHorizontalGap:
|
|
3033
|
-
sideBarItemActiveBackground:
|
|
3034
|
-
sideBarCollapsedSubmenuWidth:
|
|
3035
|
-
sidebarActiveColor:
|
|
3040
|
+
headerStyle: O = {},
|
|
3041
|
+
highlightActiveMenuItem: $ = !0,
|
|
3042
|
+
customRenderSidebar: M,
|
|
3043
|
+
showCollapsedButton: F = !0,
|
|
3044
|
+
sideBarBackgroundDarkColor: P,
|
|
3045
|
+
sideBarBackgroundLightColor: y,
|
|
3046
|
+
sideBarTextDarkColor: V,
|
|
3047
|
+
sideBarTextLightColor: E,
|
|
3048
|
+
sideBarIconDarkColor: W,
|
|
3049
|
+
sideBarIconLightColor: H,
|
|
3050
|
+
sideBarBackgroundImage: I,
|
|
3051
|
+
mainBackground: G,
|
|
3052
|
+
sideBarItemBorderRadius: ne,
|
|
3053
|
+
sideBarItemHorizontalGap: we,
|
|
3054
|
+
sideBarItemActiveBackground: se,
|
|
3055
|
+
sideBarCollapsedSubmenuWidth: be,
|
|
3056
|
+
sidebarActiveColor: ke,
|
|
3036
3057
|
maxKeepAliveTabs: T = 10,
|
|
3037
|
-
sidebarVariant:
|
|
3058
|
+
sidebarVariant: v = "legacy",
|
|
3038
3059
|
sidebarShowSearch: Q = !1
|
|
3039
3060
|
}) {
|
|
3040
|
-
const
|
|
3041
|
-
`(max-width: ${s ? fe(s) :
|
|
3042
|
-
),
|
|
3043
|
-
|
|
3044
|
-
},
|
|
3045
|
-
|
|
3046
|
-
},
|
|
3047
|
-
let
|
|
3048
|
-
return h && (
|
|
3049
|
-
},
|
|
3050
|
-
let
|
|
3051
|
-
return h && (
|
|
3052
|
-
},
|
|
3053
|
-
const
|
|
3054
|
-
return x.navigationData.forEach((he,
|
|
3061
|
+
const L = me(), x = ve(rA), { colorScheme: X } = de(), N = kt(), [Y, Ce] = xt(), le = St(
|
|
3062
|
+
`(max-width: ${s ? fe(s) : L.breakpoints.md})`
|
|
3063
|
+
), xe = (ae) => {
|
|
3064
|
+
ae.link && (ae.routeParams ? N(ae.link, {}, ae.routeParams) : N(ae.link));
|
|
3065
|
+
}, Z = (ae, he) => {
|
|
3066
|
+
ae == he && x.collapsed && x.setCollapsed(!1), x.setCollapsed(ae == he);
|
|
3067
|
+
}, Ie = () => {
|
|
3068
|
+
let ae = 0, he = 0;
|
|
3069
|
+
return h && (ae = Number(fe(h))), a && (he = Number(fe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + he}px)`;
|
|
3070
|
+
}, ee = () => {
|
|
3071
|
+
let ae = 0, he = 0;
|
|
3072
|
+
return h && (ae = Number(fe(h))), a && (he = Number(fe(a))), `calc(100vh - 28px - ${ae + he}px)`;
|
|
3073
|
+
}, Ae = ce(() => {
|
|
3074
|
+
const ae = [];
|
|
3075
|
+
return x.navigationData.forEach((he, Ge) => {
|
|
3055
3076
|
he.links ? he.links.forEach((Oe, RA) => {
|
|
3056
|
-
Oe.keepAlive === !1 ?
|
|
3057
|
-
/* @__PURE__ */ r(
|
|
3077
|
+
Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${RA}`)) : ae.push(
|
|
3078
|
+
/* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${RA}`)
|
|
3058
3079
|
);
|
|
3059
|
-
}) : he.keepAlive === !1 ?
|
|
3060
|
-
/* @__PURE__ */ r(Ke, { path: he.link, element: he.component }, `${he.link}_${
|
|
3061
|
-
) :
|
|
3062
|
-
/* @__PURE__ */ r(
|
|
3080
|
+
}) : he.keepAlive === !1 ? ae.push(
|
|
3081
|
+
/* @__PURE__ */ r(Ke, { path: he.link, element: he.component }, `${he.link}_${Ge}`)
|
|
3082
|
+
) : ae.push(
|
|
3083
|
+
/* @__PURE__ */ r(eA, { path: he.link, component: he.component }, `${he.link}_${Ge}`)
|
|
3063
3084
|
);
|
|
3064
|
-
}),
|
|
3065
|
-
}, [x.navigationData, x.collapsed]),
|
|
3085
|
+
}), ae;
|
|
3086
|
+
}, [x.navigationData, x.collapsed]), Ee = w(() => {
|
|
3066
3087
|
x.setCollapsed(!x.collapsed);
|
|
3067
|
-
}, [x.setCollapsed, x.collapsed]),
|
|
3088
|
+
}, [x.setCollapsed, x.collapsed]), q = w(() => {
|
|
3068
3089
|
x.setHidden(!x.hidden);
|
|
3069
3090
|
}, [x.setHidden, x.hidden]);
|
|
3070
3091
|
te(() => {
|
|
3071
3092
|
c && c(x.hidden);
|
|
3072
|
-
}, [x.hidden,
|
|
3093
|
+
}, [x.hidden, q]), te(() => {
|
|
3073
3094
|
d && d(x.collapsed);
|
|
3074
3095
|
}, [x.collapsed, d]);
|
|
3075
|
-
const
|
|
3096
|
+
const ye = v === "minimal" || x.collapsed ? n : e, K = (ae, he = !1) => M ? M({ width: e, height: ae, isHidden: le }) : v === "legacy" ? /* @__PURE__ */ r(
|
|
3076
3097
|
_t,
|
|
3077
3098
|
{
|
|
3078
3099
|
navigationData: x.navigationData,
|
|
3079
|
-
sidebarHeight:
|
|
3100
|
+
sidebarHeight: ae,
|
|
3080
3101
|
sidebarGroupWidth: n,
|
|
3081
3102
|
sidebarCollapsedWidth: n,
|
|
3082
3103
|
selectedGroupColor: b,
|
|
@@ -3087,26 +3108,26 @@ function Qo({
|
|
|
3087
3108
|
showGroupLabels: !1,
|
|
3088
3109
|
collapsed: he ? !1 : x.collapsed,
|
|
3089
3110
|
sidebarWidth: e,
|
|
3090
|
-
isHidden:
|
|
3091
|
-
onMenuItemClick:
|
|
3092
|
-
onClickActionIcon:
|
|
3111
|
+
isHidden: le,
|
|
3112
|
+
onMenuItemClick: xe,
|
|
3113
|
+
onClickActionIcon: Z,
|
|
3093
3114
|
sideBarFooterHeight: a,
|
|
3094
3115
|
sideBarFooterContent: l,
|
|
3095
3116
|
sideBarHeaderContent: p,
|
|
3096
|
-
theme:
|
|
3097
|
-
sidebarRef:
|
|
3117
|
+
theme: L,
|
|
3118
|
+
sidebarRef: Y,
|
|
3098
3119
|
defaultGroupIcon: i,
|
|
3099
3120
|
selectedGroupName: u,
|
|
3100
3121
|
iconsWithBackground: D,
|
|
3101
|
-
menuItemHeight:
|
|
3102
|
-
highlightActiveMenuItem:
|
|
3103
|
-
backgroundDarkColor:
|
|
3104
|
-
backgroundLightColor:
|
|
3105
|
-
textDarkColor:
|
|
3106
|
-
textLightColor:
|
|
3107
|
-
iconDarkColor:
|
|
3108
|
-
iconLightColor:
|
|
3109
|
-
collapsedSubmenuWidth:
|
|
3122
|
+
menuItemHeight: j,
|
|
3123
|
+
highlightActiveMenuItem: $,
|
|
3124
|
+
backgroundDarkColor: P,
|
|
3125
|
+
backgroundLightColor: y,
|
|
3126
|
+
textDarkColor: V,
|
|
3127
|
+
textLightColor: E,
|
|
3128
|
+
iconDarkColor: W,
|
|
3129
|
+
iconLightColor: H,
|
|
3130
|
+
collapsedSubmenuWidth: be,
|
|
3110
3131
|
isLoading: x.isLoadingPermissions,
|
|
3111
3132
|
loadingError: x.permissionsError
|
|
3112
3133
|
}
|
|
@@ -3114,70 +3135,70 @@ function Qo({
|
|
|
3114
3135
|
co,
|
|
3115
3136
|
{
|
|
3116
3137
|
navigationData: x.navigationData,
|
|
3117
|
-
variant:
|
|
3118
|
-
width:
|
|
3138
|
+
variant: v,
|
|
3139
|
+
width: ye,
|
|
3119
3140
|
collapsedWidth: n,
|
|
3120
|
-
height:
|
|
3141
|
+
height: ae,
|
|
3121
3142
|
groupColumnWidth: n,
|
|
3122
3143
|
collapsed: he ? !1 : x.collapsed,
|
|
3123
|
-
onCollapsedChange: (
|
|
3144
|
+
onCollapsedChange: (Ge) => x.setCollapsed(Ge),
|
|
3124
3145
|
activeGroup: u,
|
|
3125
|
-
onActiveGroupChange: (
|
|
3146
|
+
onActiveGroupChange: (Ge) => {
|
|
3126
3147
|
},
|
|
3127
3148
|
defaultGroupIcon: i,
|
|
3128
3149
|
showGroupLabels: !1,
|
|
3129
|
-
onMenuItemClick:
|
|
3150
|
+
onMenuItemClick: xe,
|
|
3130
3151
|
showSearch: Q,
|
|
3131
3152
|
header: p,
|
|
3132
3153
|
footer: l,
|
|
3133
3154
|
footerHeight: a,
|
|
3134
3155
|
isLoading: x.isLoadingPermissions,
|
|
3135
3156
|
loadingError: x.permissionsError,
|
|
3136
|
-
theme:
|
|
3137
|
-
highlightActiveItem:
|
|
3138
|
-
backgroundDarkColor:
|
|
3139
|
-
backgroundLightColor:
|
|
3140
|
-
backgroundImage:
|
|
3141
|
-
textDarkColor:
|
|
3142
|
-
textLightColor:
|
|
3143
|
-
iconDarkColor:
|
|
3144
|
-
iconLightColor:
|
|
3157
|
+
theme: L,
|
|
3158
|
+
highlightActiveItem: $,
|
|
3159
|
+
backgroundDarkColor: P,
|
|
3160
|
+
backgroundLightColor: y,
|
|
3161
|
+
backgroundImage: I,
|
|
3162
|
+
textDarkColor: V,
|
|
3163
|
+
textLightColor: E,
|
|
3164
|
+
iconDarkColor: W,
|
|
3165
|
+
iconLightColor: H,
|
|
3145
3166
|
groupBackgroundColor: m,
|
|
3146
3167
|
selectedGroupColor: b,
|
|
3147
3168
|
groupColor: C,
|
|
3148
3169
|
groupLabelDarkColor: g,
|
|
3149
3170
|
groupLabelLightColor: f,
|
|
3150
|
-
activeColor:
|
|
3151
|
-
itemBorderRadius:
|
|
3152
|
-
itemHorizontalGap:
|
|
3153
|
-
itemActiveBackground:
|
|
3171
|
+
activeColor: ke,
|
|
3172
|
+
itemBorderRadius: ne,
|
|
3173
|
+
itemHorizontalGap: we,
|
|
3174
|
+
itemActiveBackground: se,
|
|
3154
3175
|
withBorder: !1,
|
|
3155
|
-
sidebarRef:
|
|
3176
|
+
sidebarRef: Y
|
|
3156
3177
|
}
|
|
3157
|
-
),
|
|
3158
|
-
width: { base:
|
|
3178
|
+
), ue = X === "dark" ? P ?? L.colors.dark[7] : y ?? L.white, Qe = v === "legacy", Fe = Qe ? void 0 : {
|
|
3179
|
+
width: { base: ye },
|
|
3159
3180
|
breakpoint: "sm",
|
|
3160
|
-
collapsed: { mobile:
|
|
3161
|
-
},
|
|
3181
|
+
collapsed: { mobile: le || !z, desktop: le || !z }
|
|
3182
|
+
}, Ve = G ?? (X === "dark" ? L.colors.dark[8] : L.colors.gray[0]), wr = Qe ? {
|
|
3162
3183
|
main: {
|
|
3163
|
-
background:
|
|
3184
|
+
background: Ve,
|
|
3164
3185
|
overflow: "hidden"
|
|
3165
3186
|
}
|
|
3166
3187
|
} : {
|
|
3167
3188
|
main: {
|
|
3168
|
-
background:
|
|
3189
|
+
background: Ve,
|
|
3169
3190
|
overflow: "hidden"
|
|
3170
3191
|
},
|
|
3171
3192
|
navbar: {
|
|
3172
|
-
background:
|
|
3193
|
+
background: I ?? ue,
|
|
3173
3194
|
border: "none"
|
|
3174
3195
|
}
|
|
3175
|
-
}, Sr =
|
|
3196
|
+
}, Sr = Qe ? {
|
|
3176
3197
|
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
|
|
3177
|
-
width: `calc(100vw - var(--app-shell-padding) - calc(${
|
|
3198
|
+
width: `calc(100vw - var(--app-shell-padding) - calc(${le ? "0px" : ye} + 1rem))`,
|
|
3178
3199
|
marginTop: "0.5rem",
|
|
3179
|
-
marginLeft: `calc(${
|
|
3180
|
-
border: `1px solid ${
|
|
3200
|
+
marginLeft: `calc(${le ? "0px" : ye} + 0.5rem)`,
|
|
3201
|
+
border: `1px solid ${X === "dark" ? L.colors.dark[4] : "#e4e9ef"}`,
|
|
3181
3202
|
borderRadius: "4px",
|
|
3182
3203
|
overflow: "hidden"
|
|
3183
3204
|
} : {
|
|
@@ -3186,62 +3207,62 @@ function Qo({
|
|
|
3186
3207
|
marginTop: "0.5rem",
|
|
3187
3208
|
marginLeft: "0.5rem",
|
|
3188
3209
|
marginRight: "0.5rem",
|
|
3189
|
-
border: `1px solid ${
|
|
3210
|
+
border: `1px solid ${X === "dark" ? L.colors.dark[4] : "#e4e9ef"}`,
|
|
3190
3211
|
borderRadius: "4px",
|
|
3191
3212
|
overflow: "hidden"
|
|
3192
3213
|
};
|
|
3193
|
-
return /* @__PURE__ */ r(Oo, { children: /* @__PURE__ */
|
|
3194
|
-
|
|
3214
|
+
return /* @__PURE__ */ r(Oo, { children: /* @__PURE__ */ R(
|
|
3215
|
+
Be,
|
|
3195
3216
|
{
|
|
3196
3217
|
header: { height: "60px", collapsed: !U },
|
|
3197
|
-
navbar:
|
|
3198
|
-
footer: { height:
|
|
3218
|
+
navbar: Fe,
|
|
3219
|
+
footer: { height: k || "0px" },
|
|
3199
3220
|
styles: wr,
|
|
3200
3221
|
children: [
|
|
3201
3222
|
/* @__PURE__ */ r(
|
|
3202
|
-
|
|
3223
|
+
Be.Header,
|
|
3203
3224
|
{
|
|
3204
3225
|
p: "xs",
|
|
3205
|
-
color:
|
|
3226
|
+
color: S,
|
|
3206
3227
|
display: "flex",
|
|
3207
3228
|
style: {
|
|
3208
3229
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
3209
3230
|
alignItems: "center",
|
|
3210
3231
|
borderBottom: "none",
|
|
3211
|
-
|
|
3232
|
+
...O
|
|
3212
3233
|
},
|
|
3213
3234
|
children: t
|
|
3214
3235
|
}
|
|
3215
3236
|
),
|
|
3216
|
-
!
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
!
|
|
3219
|
-
|
|
3220
|
-
|
|
3237
|
+
!le && z && /* @__PURE__ */ r(Be.Navbar, { children: K(Ie(), !1) }),
|
|
3238
|
+
/* @__PURE__ */ R(Be.Main, { children: [
|
|
3239
|
+
!le && F && $o(
|
|
3240
|
+
X,
|
|
3241
|
+
L,
|
|
3221
3242
|
x,
|
|
3222
3243
|
e,
|
|
3223
3244
|
n,
|
|
3224
|
-
|
|
3245
|
+
Ee
|
|
3225
3246
|
),
|
|
3226
|
-
/* @__PURE__ */ r(Ro, { children: /* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ r(Ro, { children: /* @__PURE__ */ R("div", { style: Sr, children: [
|
|
3227
3248
|
A,
|
|
3228
|
-
/* @__PURE__ */ r(Ko, { maxKeepAliveTabs: T, routes:
|
|
3249
|
+
/* @__PURE__ */ r(Ko, { maxKeepAliveTabs: T, routes: Ae })
|
|
3229
3250
|
] }) }),
|
|
3230
|
-
|
|
3251
|
+
z && /* @__PURE__ */ r(
|
|
3231
3252
|
qA,
|
|
3232
3253
|
{
|
|
3233
3254
|
opened: x.hidden || !1,
|
|
3234
|
-
onClose:
|
|
3255
|
+
onClose: q,
|
|
3235
3256
|
size: e,
|
|
3236
3257
|
padding: 0,
|
|
3237
3258
|
styles: {
|
|
3238
3259
|
header: { minHeight: "10px" }
|
|
3239
3260
|
},
|
|
3240
|
-
children:
|
|
3261
|
+
children: K(ee(), !0)
|
|
3241
3262
|
}
|
|
3242
3263
|
)
|
|
3243
3264
|
] }),
|
|
3244
|
-
/* @__PURE__ */ r(
|
|
3265
|
+
/* @__PURE__ */ r(Be.Footer, { children: o })
|
|
3245
3266
|
]
|
|
3246
3267
|
}
|
|
3247
3268
|
) });
|
|
@@ -3253,7 +3274,7 @@ function Ko({ maxKeepAliveTabs: A, routes: t }) {
|
|
|
3253
3274
|
height: "calc(100% - 48px)",
|
|
3254
3275
|
opacity: o ? 0.6 : 1,
|
|
3255
3276
|
transition: "opacity 0.15s ease-out"
|
|
3256
|
-
}, children: /* @__PURE__ */
|
|
3277
|
+
}, children: /* @__PURE__ */ R(No, { maxKeepAliveTabs: A, children: [
|
|
3257
3278
|
...t
|
|
3258
3279
|
] }) });
|
|
3259
3280
|
}
|
|
@@ -3277,41 +3298,41 @@ function Gn({
|
|
|
3277
3298
|
sidebarSelectedGroupName: m,
|
|
3278
3299
|
sideBarHeaderHeight: g,
|
|
3279
3300
|
sideBarHeaderContent: f,
|
|
3280
|
-
selectedGroupColor:
|
|
3281
|
-
groupColor:
|
|
3301
|
+
selectedGroupColor: S = "#132441",
|
|
3302
|
+
groupColor: k = "white",
|
|
3282
3303
|
backgroundGroupColor: D = "#132441",
|
|
3283
|
-
groupLabelDarkColor:
|
|
3284
|
-
groupLabelLightColor:
|
|
3304
|
+
groupLabelDarkColor: j = "white",
|
|
3305
|
+
groupLabelLightColor: z = "white",
|
|
3285
3306
|
headerColor: U,
|
|
3286
|
-
footerHeight:
|
|
3287
|
-
iconsWithBackground:
|
|
3288
|
-
menuItemHeight:
|
|
3289
|
-
showSideBar:
|
|
3290
|
-
showHeader:
|
|
3291
|
-
headerStyle:
|
|
3292
|
-
highlightActiveMenuItem:
|
|
3293
|
-
enableSecurity:
|
|
3294
|
-
securityOptions:
|
|
3295
|
-
customRenderSidebar:
|
|
3296
|
-
onNavigationDataChange:
|
|
3297
|
-
showCollapsedButton:
|
|
3298
|
-
initialSidebarCollapsed:
|
|
3299
|
-
sideBarBackgroundDarkColor:
|
|
3300
|
-
sideBarBackgroundLightColor:
|
|
3301
|
-
sideBarTextDarkColor:
|
|
3302
|
-
sideBarTextLightColor:
|
|
3307
|
+
footerHeight: O,
|
|
3308
|
+
iconsWithBackground: $,
|
|
3309
|
+
menuItemHeight: M,
|
|
3310
|
+
showSideBar: F,
|
|
3311
|
+
showHeader: P,
|
|
3312
|
+
headerStyle: y,
|
|
3313
|
+
highlightActiveMenuItem: V,
|
|
3314
|
+
enableSecurity: E = !1,
|
|
3315
|
+
securityOptions: W,
|
|
3316
|
+
customRenderSidebar: H,
|
|
3317
|
+
onNavigationDataChange: I,
|
|
3318
|
+
showCollapsedButton: G,
|
|
3319
|
+
initialSidebarCollapsed: ne = !1,
|
|
3320
|
+
sideBarBackgroundDarkColor: we,
|
|
3321
|
+
sideBarBackgroundLightColor: se,
|
|
3322
|
+
sideBarTextDarkColor: be,
|
|
3323
|
+
sideBarTextLightColor: ke,
|
|
3303
3324
|
sideBarIconDarkColor: T,
|
|
3304
|
-
sideBarIconLightColor:
|
|
3325
|
+
sideBarIconLightColor: v,
|
|
3305
3326
|
sideBarBackgroundImage: Q,
|
|
3306
|
-
mainBackground:
|
|
3327
|
+
mainBackground: L,
|
|
3307
3328
|
sideBarItemBorderRadius: x,
|
|
3308
|
-
sideBarItemHorizontalGap:
|
|
3309
|
-
sideBarItemActiveBackground:
|
|
3310
|
-
sideBarCollapsedSubmenuWidth:
|
|
3311
|
-
sidebarActiveColor:
|
|
3312
|
-
maxKeepAliveTabs:
|
|
3313
|
-
sidebarVariant:
|
|
3314
|
-
sidebarShowSearch:
|
|
3329
|
+
sideBarItemHorizontalGap: X,
|
|
3330
|
+
sideBarItemActiveBackground: N,
|
|
3331
|
+
sideBarCollapsedSubmenuWidth: Y,
|
|
3332
|
+
sidebarActiveColor: Ce,
|
|
3333
|
+
maxKeepAliveTabs: le = 10,
|
|
3334
|
+
sidebarVariant: xe = "legacy",
|
|
3335
|
+
sidebarShowSearch: Z = !1
|
|
3315
3336
|
}) {
|
|
3316
3337
|
return /* @__PURE__ */ r(
|
|
3317
3338
|
Kt,
|
|
@@ -3321,10 +3342,10 @@ function Gn({
|
|
|
3321
3342
|
user: o,
|
|
3322
3343
|
owner: a,
|
|
3323
3344
|
company: l,
|
|
3324
|
-
enableSecurity:
|
|
3325
|
-
securityOptions:
|
|
3326
|
-
onNavigationDataChange:
|
|
3327
|
-
initialSidebarCollapsed:
|
|
3345
|
+
enableSecurity: E,
|
|
3346
|
+
securityOptions: W,
|
|
3347
|
+
onNavigationDataChange: I,
|
|
3348
|
+
initialSidebarCollapsed: ne,
|
|
3328
3349
|
children: /* @__PURE__ */ r(
|
|
3329
3350
|
Qo,
|
|
3330
3351
|
{
|
|
@@ -3341,49 +3362,49 @@ function Gn({
|
|
|
3341
3362
|
sideBarHeaderContent: f,
|
|
3342
3363
|
sideBarFooterHeight: i,
|
|
3343
3364
|
sideBarFooterContent: h,
|
|
3344
|
-
selectedGroupColor:
|
|
3345
|
-
groupColor:
|
|
3365
|
+
selectedGroupColor: S,
|
|
3366
|
+
groupColor: k,
|
|
3346
3367
|
backgroundGroupColor: D,
|
|
3347
|
-
groupLabelDarkColor:
|
|
3348
|
-
groupLabelLightColor:
|
|
3368
|
+
groupLabelDarkColor: j,
|
|
3369
|
+
groupLabelLightColor: z,
|
|
3349
3370
|
onCollapsedSideBar: p,
|
|
3350
3371
|
onHiddenSidebar: b,
|
|
3351
3372
|
sidebarDefaultGroupIcon: C,
|
|
3352
3373
|
sidebarSelectedGroupName: m,
|
|
3353
3374
|
headerColor: U,
|
|
3354
|
-
footerHeight:
|
|
3355
|
-
iconsWithBackground:
|
|
3356
|
-
menuItemHeight:
|
|
3357
|
-
showSideBar:
|
|
3358
|
-
showHeader:
|
|
3359
|
-
headerStyle:
|
|
3360
|
-
highlightActiveMenuItem:
|
|
3361
|
-
enableSecurity:
|
|
3362
|
-
customRenderSidebar:
|
|
3363
|
-
showCollapsedButton:
|
|
3364
|
-
sideBarBackgroundDarkColor:
|
|
3365
|
-
sideBarBackgroundLightColor:
|
|
3366
|
-
sideBarTextDarkColor:
|
|
3367
|
-
sideBarTextLightColor:
|
|
3375
|
+
footerHeight: O,
|
|
3376
|
+
iconsWithBackground: $,
|
|
3377
|
+
menuItemHeight: M,
|
|
3378
|
+
showSideBar: F,
|
|
3379
|
+
showHeader: P,
|
|
3380
|
+
headerStyle: y,
|
|
3381
|
+
highlightActiveMenuItem: V,
|
|
3382
|
+
enableSecurity: E,
|
|
3383
|
+
customRenderSidebar: H,
|
|
3384
|
+
showCollapsedButton: G,
|
|
3385
|
+
sideBarBackgroundDarkColor: we,
|
|
3386
|
+
sideBarBackgroundLightColor: se,
|
|
3387
|
+
sideBarTextDarkColor: be,
|
|
3388
|
+
sideBarTextLightColor: ke,
|
|
3368
3389
|
sideBarIconDarkColor: T,
|
|
3369
|
-
sideBarIconLightColor:
|
|
3390
|
+
sideBarIconLightColor: v,
|
|
3370
3391
|
sideBarBackgroundImage: Q,
|
|
3371
|
-
mainBackground:
|
|
3392
|
+
mainBackground: L,
|
|
3372
3393
|
sideBarItemBorderRadius: x,
|
|
3373
|
-
sideBarItemHorizontalGap:
|
|
3374
|
-
sideBarItemActiveBackground:
|
|
3375
|
-
sideBarCollapsedSubmenuWidth:
|
|
3376
|
-
sidebarActiveColor:
|
|
3377
|
-
maxKeepAliveTabs:
|
|
3378
|
-
sidebarVariant:
|
|
3379
|
-
sidebarShowSearch:
|
|
3394
|
+
sideBarItemHorizontalGap: X,
|
|
3395
|
+
sideBarItemActiveBackground: N,
|
|
3396
|
+
sideBarCollapsedSubmenuWidth: Y,
|
|
3397
|
+
sidebarActiveColor: Ce,
|
|
3398
|
+
maxKeepAliveTabs: le,
|
|
3399
|
+
sidebarVariant: xe,
|
|
3400
|
+
sidebarShowSearch: Z,
|
|
3380
3401
|
children: e
|
|
3381
3402
|
}
|
|
3382
3403
|
)
|
|
3383
3404
|
}
|
|
3384
3405
|
);
|
|
3385
3406
|
}
|
|
3386
|
-
const vr =
|
|
3407
|
+
const vr = Ne({
|
|
3387
3408
|
state: { userCloseLinkRequest: "", linkClosed: "", isClosing: !1 },
|
|
3388
3409
|
dispatch: (A) => null
|
|
3389
3410
|
}), Bn = ({ children: A }) => {
|
|
@@ -3406,7 +3427,7 @@ const vr = De({
|
|
|
3406
3427
|
return s;
|
|
3407
3428
|
}
|
|
3408
3429
|
}, [e, n] = Ir(o, t);
|
|
3409
|
-
return
|
|
3430
|
+
return Se.useEffect(() => {
|
|
3410
3431
|
let s = null;
|
|
3411
3432
|
return e.userCloseLinkRequest && !e.linkClosed && (s = setTimeout(() => {
|
|
3412
3433
|
n({ type: "CLOSE_ALLOWED", link: e.userCloseLinkRequest });
|
|
@@ -3415,20 +3436,20 @@ const vr = De({
|
|
|
3415
3436
|
};
|
|
3416
3437
|
}, [e.userCloseLinkRequest, e.linkClosed, n]), /* @__PURE__ */ r(vr.Provider, { value: { state: e, dispatch: n }, children: A });
|
|
3417
3438
|
}, Cr = () => {
|
|
3418
|
-
const A =
|
|
3439
|
+
const A = ve(vr);
|
|
3419
3440
|
if (!A)
|
|
3420
3441
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
3421
3442
|
return A;
|
|
3422
3443
|
}, Un = (A, t) => {
|
|
3423
|
-
const o = Cr(), { state: e, dispatch: n } = o, s =
|
|
3444
|
+
const o = Cr(), { state: e, dispatch: n } = o, s = w((d) => {
|
|
3424
3445
|
n({ type: "CLOSE_ALLOWED", link: A, payload: d });
|
|
3425
|
-
}, [n, A]), a =
|
|
3446
|
+
}, [n, A]), a = _(t);
|
|
3426
3447
|
a.current = t, te(() => {
|
|
3427
3448
|
e && e.userCloseLinkRequest && e.userCloseLinkRequest === A && a.current();
|
|
3428
3449
|
}, [e, A]);
|
|
3429
3450
|
const l = e.isClosing && e.userCloseLinkRequest === A;
|
|
3430
3451
|
return { closeAllowed: s, isClosing: l };
|
|
3431
|
-
},
|
|
3452
|
+
}, AA = sr()(
|
|
3432
3453
|
Dt(
|
|
3433
3454
|
(A, t) => ({
|
|
3434
3455
|
openTabs: [],
|
|
@@ -3491,51 +3512,51 @@ function Hn({
|
|
|
3491
3512
|
activeTabId: e,
|
|
3492
3513
|
openedTabs: n = []
|
|
3493
3514
|
}) {
|
|
3494
|
-
const [s, a] =
|
|
3515
|
+
const [s, a] = Se.useTransition(), l = qe(), { colorScheme: d } = de(), [c, u] = ge(n), [i, h] = ge(e), p = _(void 0), b = je(), C = _([]);
|
|
3495
3516
|
Pt(C);
|
|
3496
|
-
const m = Cr(), { state: g, dispatch: f } = m,
|
|
3517
|
+
const m = Cr(), { state: g, dispatch: f } = m, S = ve(rA), k = Eo(), { start: D, done: j } = yr(), z = AA((T) => T.clearSnapshot), U = AA((T) => T.removeTab), O = _(t), $ = _(o);
|
|
3497
3518
|
te(() => {
|
|
3498
|
-
|
|
3519
|
+
O.current = t, $.current = o;
|
|
3499
3520
|
});
|
|
3500
|
-
const
|
|
3521
|
+
const M = _(i);
|
|
3501
3522
|
te(() => {
|
|
3502
|
-
p.current =
|
|
3523
|
+
p.current = M.current, M.current = i;
|
|
3503
3524
|
}, [i]);
|
|
3504
|
-
const
|
|
3505
|
-
D(),
|
|
3506
|
-
const Q = c.findIndex((
|
|
3507
|
-
let
|
|
3508
|
-
!
|
|
3509
|
-
const x = c.filter((
|
|
3510
|
-
let
|
|
3525
|
+
const F = _(!1), P = w((T, v) => {
|
|
3526
|
+
D(), k ? k.destroy(T) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), z(T), U(T);
|
|
3527
|
+
const Q = c.findIndex((Y) => Y.path === T);
|
|
3528
|
+
let L = v?.redirectUrl;
|
|
3529
|
+
!L && Q >= 0 && (L = c[Q].redirect);
|
|
3530
|
+
const x = c.filter((Y) => Y.id !== T);
|
|
3531
|
+
let X = null;
|
|
3511
3532
|
if (p.current && p.current !== T) {
|
|
3512
|
-
const
|
|
3513
|
-
|
|
3533
|
+
const Y = x.find((Ce) => Ce.id === p.current);
|
|
3534
|
+
Y && (X = Y.id);
|
|
3514
3535
|
}
|
|
3515
|
-
if (!
|
|
3516
|
-
let
|
|
3517
|
-
x.forEach((
|
|
3536
|
+
if (!X) {
|
|
3537
|
+
let Y = -1;
|
|
3538
|
+
x.forEach((Ce, le) => Ce.id === i && (Y = le)), x.length > 0 && x[Y] ? X = x[Y].id : x.length > 0 && (X = x[x.length - 1].id);
|
|
3518
3539
|
}
|
|
3519
|
-
const
|
|
3520
|
-
...
|
|
3521
|
-
active:
|
|
3540
|
+
const N = x.map((Y) => ({
|
|
3541
|
+
...Y,
|
|
3542
|
+
active: X === Y.id
|
|
3522
3543
|
}));
|
|
3523
|
-
if (u(
|
|
3524
|
-
h(
|
|
3544
|
+
if (u(N), X && X != null)
|
|
3545
|
+
h(X), l(L || X);
|
|
3525
3546
|
else {
|
|
3526
|
-
if (h(void 0), !
|
|
3547
|
+
if (h(void 0), !S.navigationRootLink) {
|
|
3527
3548
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3528
3549
|
return;
|
|
3529
3550
|
}
|
|
3530
|
-
l(
|
|
3551
|
+
l(S.navigationRootLink);
|
|
3531
3552
|
}
|
|
3532
|
-
f({ type: "DONE", link: "" }),
|
|
3533
|
-
}, [c, i, l,
|
|
3553
|
+
f({ type: "DONE", link: "" }), j();
|
|
3554
|
+
}, [c, i, l, S.navigationRootLink, f, k, D, j, z, U]);
|
|
3534
3555
|
te(() => {
|
|
3535
|
-
g?.linkClosed &&
|
|
3536
|
-
}, [g?.linkClosed, g?.payload,
|
|
3537
|
-
const
|
|
3538
|
-
const
|
|
3556
|
+
g?.linkClosed && P(g?.linkClosed, g?.payload);
|
|
3557
|
+
}, [g?.linkClosed, g?.payload, P]);
|
|
3558
|
+
const y = (T) => {
|
|
3559
|
+
const v = {
|
|
3539
3560
|
item: void 0,
|
|
3540
3561
|
title: void 0,
|
|
3541
3562
|
link: T,
|
|
@@ -3544,46 +3565,46 @@ function Hn({
|
|
|
3544
3565
|
};
|
|
3545
3566
|
return A.forEach((Q) => {
|
|
3546
3567
|
if (Q.links)
|
|
3547
|
-
Q.links.forEach((
|
|
3548
|
-
MA({ path:
|
|
3568
|
+
Q.links.forEach((L) => {
|
|
3569
|
+
MA({ path: L.link || "" }, location.pathname) && (v.item = L, v.title = `${oe().t(L.label)}`, v.redirect = L.redirect, v.customTitle = L.customTitle);
|
|
3549
3570
|
});
|
|
3550
|
-
else if (Q.link && !
|
|
3551
|
-
const
|
|
3552
|
-
|
|
3571
|
+
else if (Q.link && !v.item) {
|
|
3572
|
+
const L = MA({ path: Q.link }, location.pathname);
|
|
3573
|
+
L && (L.params && Object.keys(L.params).length > 0 ? v.title = `${L.params[Object.keys(L.params)[0]]}` : v.title = `${oe().t(Q.label)}`, v.item = Q, v.redirect = Q.redirect, v.customTitle = Q.customTitle);
|
|
3553
3574
|
}
|
|
3554
|
-
}),
|
|
3575
|
+
}), v.customTitle && (v.customTitle = v.customTitle.replace("$title", v.title)), v;
|
|
3555
3576
|
};
|
|
3556
3577
|
te(() => {
|
|
3557
|
-
u(n),
|
|
3578
|
+
u(n), F.current = !0;
|
|
3558
3579
|
}, [JSON.stringify(n)]);
|
|
3559
|
-
const
|
|
3580
|
+
const V = _(c), E = _(i);
|
|
3560
3581
|
te(() => {
|
|
3561
|
-
if (
|
|
3562
|
-
|
|
3582
|
+
if (F.current) {
|
|
3583
|
+
F.current = !1, V.current = c, E.current = i;
|
|
3563
3584
|
return;
|
|
3564
3585
|
}
|
|
3565
|
-
const T = JSON.stringify(
|
|
3566
|
-
if (T ||
|
|
3586
|
+
const T = JSON.stringify(V.current) !== JSON.stringify(c), v = E.current !== i;
|
|
3587
|
+
if (T || v) {
|
|
3567
3588
|
const Q = setTimeout(() => {
|
|
3568
|
-
|
|
3589
|
+
O.current?.(c), $.current?.(i);
|
|
3569
3590
|
}, 0);
|
|
3570
|
-
return
|
|
3591
|
+
return V.current = c, E.current = i, () => clearTimeout(Q);
|
|
3571
3592
|
}
|
|
3572
3593
|
}, [c, i]);
|
|
3573
|
-
const
|
|
3594
|
+
const W = _("");
|
|
3574
3595
|
te(() => {
|
|
3575
|
-
if (
|
|
3596
|
+
if (W.current === b.pathname)
|
|
3576
3597
|
return;
|
|
3577
|
-
|
|
3578
|
-
const T =
|
|
3598
|
+
W.current = b.pathname;
|
|
3599
|
+
const T = y(b.pathname);
|
|
3579
3600
|
if (T && T.item) {
|
|
3580
|
-
const
|
|
3581
|
-
if (
|
|
3582
|
-
if (c[
|
|
3601
|
+
const v = c.findIndex((Q) => Q.path === T.link);
|
|
3602
|
+
if (v !== -1) {
|
|
3603
|
+
if (c[v].title !== T.title) {
|
|
3583
3604
|
const Q = [...c];
|
|
3584
|
-
Q[
|
|
3605
|
+
Q[v] = { ...Q[v], title: T.title }, u(Q);
|
|
3585
3606
|
}
|
|
3586
|
-
h(c[
|
|
3607
|
+
h(c[v].id);
|
|
3587
3608
|
} else {
|
|
3588
3609
|
const Q = {
|
|
3589
3610
|
id: `${T.link}`,
|
|
@@ -3595,96 +3616,96 @@ function Hn({
|
|
|
3595
3616
|
closeButton: !0,
|
|
3596
3617
|
redirect: T.redirect,
|
|
3597
3618
|
customTitle: T.customTitle
|
|
3598
|
-
},
|
|
3599
|
-
u(
|
|
3619
|
+
}, L = [...c.map((x) => ({ ...x, active: !1 })), Q];
|
|
3620
|
+
u(L), h(Q.id);
|
|
3600
3621
|
}
|
|
3601
3622
|
}
|
|
3602
3623
|
}, [b.pathname]);
|
|
3603
|
-
const
|
|
3604
|
-
const
|
|
3605
|
-
|
|
3606
|
-
h(T),
|
|
3624
|
+
const H = (T) => {
|
|
3625
|
+
const v = c.filter((Q) => Q.id === T);
|
|
3626
|
+
v && v.length > 0 && b.pathname !== v[0].path && (D(), l(v[0].path)), a(() => {
|
|
3627
|
+
h(T), j();
|
|
3607
3628
|
});
|
|
3608
|
-
},
|
|
3629
|
+
}, I = (T) => {
|
|
3609
3630
|
try {
|
|
3610
3631
|
D(), f({ type: "USER_CLOSE_REQUEST", link: T });
|
|
3611
|
-
} catch (
|
|
3612
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
3632
|
+
} catch (v) {
|
|
3633
|
+
console.error("[TabContainer] Dispatch failed:", v), j();
|
|
3613
3634
|
}
|
|
3614
|
-
},
|
|
3615
|
-
if (
|
|
3616
|
-
|
|
3617
|
-
}), u([]), h(void 0), !
|
|
3635
|
+
}, G = w(() => {
|
|
3636
|
+
if (k?.destroyAll(), c.forEach((T) => {
|
|
3637
|
+
z(T.id), U(T.id);
|
|
3638
|
+
}), u([]), h(void 0), !S.navigationRootLink) {
|
|
3618
3639
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
3619
3640
|
return;
|
|
3620
3641
|
}
|
|
3621
|
-
l(
|
|
3622
|
-
}, [l,
|
|
3623
|
-
const
|
|
3624
|
-
if (
|
|
3642
|
+
l(S.navigationRootLink);
|
|
3643
|
+
}, [l, S.navigationRootLink, k, c, z, U]), ne = w((T) => {
|
|
3644
|
+
const v = c.findIndex((N) => N.id === T);
|
|
3645
|
+
if (v <= 0)
|
|
3625
3646
|
return;
|
|
3626
|
-
c.slice(0,
|
|
3627
|
-
|
|
3647
|
+
c.slice(0, v).forEach((N) => {
|
|
3648
|
+
k?.destroy(N.path), z(N.id), U(N.id);
|
|
3628
3649
|
});
|
|
3629
|
-
const
|
|
3630
|
-
...
|
|
3631
|
-
active:
|
|
3650
|
+
const L = c.slice(v), x = L.find((N) => N.id === i)?.id || L[0]?.id, X = L.map((N) => ({
|
|
3651
|
+
...N,
|
|
3652
|
+
active: N.id === x
|
|
3632
3653
|
}));
|
|
3633
|
-
if (u(
|
|
3654
|
+
if (u(X), x) {
|
|
3634
3655
|
h(x);
|
|
3635
|
-
const
|
|
3636
|
-
|
|
3656
|
+
const N = X.find((Y) => Y.id === x);
|
|
3657
|
+
N && b.pathname !== N.path && l(N.path);
|
|
3637
3658
|
}
|
|
3638
|
-
}, [c, i, l, b.pathname,
|
|
3639
|
-
const
|
|
3640
|
-
if (
|
|
3659
|
+
}, [c, i, l, b.pathname, k, z, U]), we = w((T) => {
|
|
3660
|
+
const v = c.findIndex((N) => N.id === T);
|
|
3661
|
+
if (v === -1 || v >= c.length - 1)
|
|
3641
3662
|
return;
|
|
3642
|
-
c.slice(
|
|
3643
|
-
|
|
3663
|
+
c.slice(v + 1).forEach((N) => {
|
|
3664
|
+
k?.destroy(N.path), z(N.id), U(N.id);
|
|
3644
3665
|
});
|
|
3645
|
-
const
|
|
3646
|
-
...
|
|
3647
|
-
active:
|
|
3666
|
+
const L = c.slice(0, v + 1), x = L.find((N) => N.id === i)?.id || L[L.length - 1]?.id, X = L.map((N) => ({
|
|
3667
|
+
...N,
|
|
3668
|
+
active: N.id === x
|
|
3648
3669
|
}));
|
|
3649
|
-
if (u(
|
|
3670
|
+
if (u(X), x) {
|
|
3650
3671
|
h(x);
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3672
|
+
const N = X.find((Y) => Y.id === x);
|
|
3673
|
+
N && b.pathname !== N.path && l(N.path);
|
|
3653
3674
|
}
|
|
3654
|
-
}, [c, i, l, b.pathname,
|
|
3655
|
-
const
|
|
3656
|
-
if (!
|
|
3675
|
+
}, [c, i, l, b.pathname, k, z, U]), se = w((T) => {
|
|
3676
|
+
const v = c.find((L) => L.id === T);
|
|
3677
|
+
if (!v)
|
|
3657
3678
|
return;
|
|
3658
|
-
|
|
3659
|
-
|
|
3679
|
+
k?.destroyOther(v.path), c.forEach((L) => {
|
|
3680
|
+
L.id !== T && (z(L.id), U(L.id));
|
|
3660
3681
|
});
|
|
3661
|
-
const Q = [{ ...
|
|
3662
|
-
u(Q), h(T), b.pathname !==
|
|
3663
|
-
}, [c, l, b.pathname,
|
|
3682
|
+
const Q = [{ ...v, active: !0 }];
|
|
3683
|
+
u(Q), h(T), b.pathname !== v.path && l(v.path);
|
|
3684
|
+
}, [c, l, b.pathname, k, z, U]), be = g?.isClosing ? g?.userCloseLinkRequest : void 0;
|
|
3664
3685
|
return /* @__PURE__ */ r("div", { ref: C, children: /* @__PURE__ */ r(
|
|
3665
3686
|
Lt,
|
|
3666
3687
|
{
|
|
3667
3688
|
buttonCloseOnlyActiveTab: !0,
|
|
3668
|
-
onClick: (T) =>
|
|
3669
|
-
onTabClose: (T) =>
|
|
3689
|
+
onClick: (T) => H(T),
|
|
3690
|
+
onTabClose: (T) => I(T),
|
|
3670
3691
|
onTabChange: (T) => null,
|
|
3671
|
-
onCloseAllTabs:
|
|
3672
|
-
onCloseLeftTabs:
|
|
3673
|
-
onCloseRightTabs:
|
|
3674
|
-
onCloseOtherTabs:
|
|
3675
|
-
currentTabs: ((T) => T.map((
|
|
3676
|
-
key:
|
|
3677
|
-
favicon:
|
|
3678
|
-
title:
|
|
3679
|
-
customTitle:
|
|
3680
|
-
closing:
|
|
3692
|
+
onCloseAllTabs: G,
|
|
3693
|
+
onCloseLeftTabs: ne,
|
|
3694
|
+
onCloseRightTabs: we,
|
|
3695
|
+
onCloseOtherTabs: se,
|
|
3696
|
+
currentTabs: ((T) => T.map((v) => ({
|
|
3697
|
+
key: v.id,
|
|
3698
|
+
favicon: v.iconClass,
|
|
3699
|
+
title: v.title,
|
|
3700
|
+
customTitle: v.customTitle,
|
|
3701
|
+
closing: be === v.id
|
|
3681
3702
|
})))(c),
|
|
3682
3703
|
activeTab: i,
|
|
3683
3704
|
dark: d === "dark"
|
|
3684
3705
|
}
|
|
3685
3706
|
) });
|
|
3686
3707
|
}
|
|
3687
|
-
const Fo = () =>
|
|
3708
|
+
const Fo = () => Se.createElement("div", null, "Home View"), Vo = () => Se.createElement("div", null, "Pedido Form"), Go = () => Se.createElement("div", null, "Pedido View"), Bo = () => Se.createElement("div", null, "Pessoa Form"), Uo = () => Se.createElement("div", null, "Pessoa View"), Ho = {
|
|
3688
3709
|
label: "Dashboard",
|
|
3689
3710
|
icon: /* @__PURE__ */ r(Hr, {}),
|
|
3690
3711
|
link: "/dashboard",
|
|
@@ -3767,7 +3788,7 @@ const Fo = () => ke.createElement("div", null, "Home View"), Vo = () => ke.creat
|
|
|
3767
3788
|
Zo
|
|
3768
3789
|
];
|
|
3769
3790
|
function qn({ children: A, title: t = "", size: o = "440px", drawerKey: e, styles: n }) {
|
|
3770
|
-
const [s, { open: a, close: l }] = Pr(!1), [d] = rr(), c = wt(), u =
|
|
3791
|
+
const [s, { open: a, close: l }] = Pr(!1), [d] = rr(), c = wt(), u = Xe();
|
|
3771
3792
|
return te(() => {
|
|
3772
3793
|
d.get("drawer") === e && a();
|
|
3773
3794
|
}, [d]), /* @__PURE__ */ r(
|
|
@@ -3791,7 +3812,7 @@ function qn({ children: A, title: t = "", size: o = "440px", drawerKey: e, style
|
|
|
3791
3812
|
);
|
|
3792
3813
|
}
|
|
3793
3814
|
function en(A) {
|
|
3794
|
-
const t =
|
|
3815
|
+
const t = qe(), o = je(), [e] = rr();
|
|
3795
3816
|
return { openDrawer: () => {
|
|
3796
3817
|
const s = new URLSearchParams(e);
|
|
3797
3818
|
s.set("drawer", A), t({
|
|
@@ -3831,8 +3852,8 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3831
3852
|
onDestroy: (g) => {
|
|
3832
3853
|
},
|
|
3833
3854
|
onError: (g, f) => {
|
|
3834
|
-
const
|
|
3835
|
-
It.showError(oe().t("archbase:WARNING"),
|
|
3855
|
+
const S = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
|
|
3856
|
+
It.showError(oe().t("archbase:WARNING"), S, f);
|
|
3836
3857
|
}
|
|
3837
3858
|
});
|
|
3838
3859
|
te(() => {
|
|
@@ -3852,8 +3873,8 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3852
3873
|
onClickOk: t,
|
|
3853
3874
|
onClickCancel: t,
|
|
3854
3875
|
onAfterSave: m,
|
|
3855
|
-
children: /* @__PURE__ */ r(
|
|
3856
|
-
/* @__PURE__ */ r(
|
|
3876
|
+
children: /* @__PURE__ */ r(ze, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ R(J, { children: [
|
|
3877
|
+
/* @__PURE__ */ r(J, { align: "center", children: /* @__PURE__ */ r(
|
|
3857
3878
|
Tt,
|
|
3858
3879
|
{
|
|
3859
3880
|
dataSource: i,
|
|
@@ -3866,7 +3887,7 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3866
3887
|
}
|
|
3867
3888
|
) }),
|
|
3868
3889
|
/* @__PURE__ */ r(
|
|
3869
|
-
|
|
3890
|
+
sA,
|
|
3870
3891
|
{
|
|
3871
3892
|
label: `${oe().t("archbase:Nome completo")}`,
|
|
3872
3893
|
placeholder: `${oe().t("archbase:Informe o nome completo do usuário")}`,
|
|
@@ -3876,7 +3897,7 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3876
3897
|
}
|
|
3877
3898
|
),
|
|
3878
3899
|
u.showNickname && /* @__PURE__ */ r(
|
|
3879
|
-
|
|
3900
|
+
sA,
|
|
3880
3901
|
{
|
|
3881
3902
|
label: `${oe().t("archbase:Apelido")}`,
|
|
3882
3903
|
placeholder: `${oe().t("archbase:Apelido")}`,
|
|
@@ -3886,7 +3907,7 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
|
|
|
3886
3907
|
}
|
|
3887
3908
|
),
|
|
3888
3909
|
/* @__PURE__ */ r(
|
|
3889
|
-
|
|
3910
|
+
sA,
|
|
3890
3911
|
{
|
|
3891
3912
|
label: `${oe().t("archbase:Descrição do usuário")}`,
|
|
3892
3913
|
placeholder: `${oe().t("archbase:Informe a descrição do usuário")}`,
|
|
@@ -3997,11 +4018,11 @@ const Jn = sr((A) => ({
|
|
|
3997
4018
|
filters: e.filters
|
|
3998
4019
|
};
|
|
3999
4020
|
}
|
|
4000
|
-
})),
|
|
4021
|
+
})), tA = Ne(null), tn = ({
|
|
4001
4022
|
tabId: A,
|
|
4002
4023
|
children: t
|
|
4003
4024
|
}) => {
|
|
4004
|
-
const { getSnapshot: o, saveSnapshot: e } =
|
|
4025
|
+
const { getSnapshot: o, saveSnapshot: e } = AA(), n = _(void 0);
|
|
4005
4026
|
if (!n.current) {
|
|
4006
4027
|
const s = o(A);
|
|
4007
4028
|
n.current = rn(s);
|
|
@@ -4011,30 +4032,30 @@ const Jn = sr((A) => ({
|
|
|
4011
4032
|
const s = n.current.getState();
|
|
4012
4033
|
e(A, s.serialize());
|
|
4013
4034
|
}
|
|
4014
|
-
}, [A, e]), /* @__PURE__ */ r(
|
|
4035
|
+
}, [A, e]), /* @__PURE__ */ r(tA.Provider, { value: n.current ?? null, children: t });
|
|
4015
4036
|
};
|
|
4016
4037
|
function _n(A) {
|
|
4017
|
-
const t =
|
|
4038
|
+
const t = ve(tA);
|
|
4018
4039
|
if (!t)
|
|
4019
4040
|
throw new Error("useTabStore must be used within TabStoreProvider");
|
|
4020
4041
|
return Mt(t, A);
|
|
4021
4042
|
}
|
|
4022
4043
|
function Wn() {
|
|
4023
|
-
const A =
|
|
4044
|
+
const A = ve(tA);
|
|
4024
4045
|
if (!A)
|
|
4025
4046
|
throw new Error("useTabStoreApi must be used within TabStoreProvider");
|
|
4026
4047
|
return A;
|
|
4027
4048
|
}
|
|
4028
|
-
function
|
|
4029
|
-
return
|
|
4049
|
+
function EA() {
|
|
4050
|
+
return ve(tA);
|
|
4030
4051
|
}
|
|
4031
|
-
function
|
|
4032
|
-
const o =
|
|
4052
|
+
function oA(A, t) {
|
|
4053
|
+
const o = EA(), e = _({ resolved: !1, value: void 0 });
|
|
4033
4054
|
e.current.resolved || (e.current = {
|
|
4034
4055
|
resolved: !0,
|
|
4035
4056
|
value: typeof t == "function" ? t() : t
|
|
4036
4057
|
});
|
|
4037
|
-
const n = e.current.value, [s, a] =
|
|
4058
|
+
const n = e.current.value, [s, a] = ge(n), l = Tr(
|
|
4038
4059
|
// subscribe
|
|
4039
4060
|
(u) => o ? o.subscribe(u) : () => {
|
|
4040
4061
|
},
|
|
@@ -4046,7 +4067,7 @@ function tA(A, t) {
|
|
|
4046
4067
|
// getServerSnapshot
|
|
4047
4068
|
() => {
|
|
4048
4069
|
}
|
|
4049
|
-
), d = o ? l !== void 0 ? l : n : s, c =
|
|
4070
|
+
), d = o ? l !== void 0 ? l : n : s, c = w((u) => {
|
|
4050
4071
|
if (!o) {
|
|
4051
4072
|
a(u);
|
|
4052
4073
|
return;
|
|
@@ -4057,7 +4078,7 @@ function tA(A, t) {
|
|
|
4057
4078
|
return [d, c];
|
|
4058
4079
|
}
|
|
4059
4080
|
function Zn(A, t) {
|
|
4060
|
-
return
|
|
4081
|
+
return oA(A, t);
|
|
4061
4082
|
}
|
|
4062
4083
|
const on = {
|
|
4063
4084
|
page: 0,
|
|
@@ -4072,22 +4093,22 @@ const on = {
|
|
|
4072
4093
|
scrollPosition: { top: 0, left: 0 }
|
|
4073
4094
|
};
|
|
4074
4095
|
function es(A, t) {
|
|
4075
|
-
const o = { ...on, ...t }, [e, n] =
|
|
4096
|
+
const o = { ...on, ...t }, [e, n] = oA(
|
|
4076
4097
|
`grid_${A}`,
|
|
4077
4098
|
o
|
|
4078
|
-
), s =
|
|
4079
|
-
n((
|
|
4080
|
-
}, [n]), a =
|
|
4081
|
-
n((
|
|
4082
|
-
...
|
|
4083
|
-
selectedRowIds:
|
|
4099
|
+
), s = w((f) => {
|
|
4100
|
+
n((S) => ({ ...S, ...f }));
|
|
4101
|
+
}, [n]), a = w((f) => s({ page: f }), [s]), l = w((f) => s({ pageSize: f, page: 0 }), [s]), d = w((f) => s({ sortModel: f }), [s]), c = w((f) => s({ filterModel: f, page: 0 }), [s]), u = w((f) => s({ selectedRowIds: f }), [s]), i = w((f) => {
|
|
4102
|
+
n((S) => ({
|
|
4103
|
+
...S,
|
|
4104
|
+
selectedRowIds: S.selectedRowIds.includes(f) ? S.selectedRowIds.filter((k) => k !== f) : [...S.selectedRowIds, f]
|
|
4084
4105
|
}));
|
|
4085
|
-
}, [n]), h =
|
|
4086
|
-
n((
|
|
4087
|
-
...
|
|
4088
|
-
expandedRowIds:
|
|
4106
|
+
}, [n]), h = w((f) => s({ selectedRowIds: f }), [s]), p = w(() => s({ selectedRowIds: [] }), [s]), b = w((f) => {
|
|
4107
|
+
n((S) => ({
|
|
4108
|
+
...S,
|
|
4109
|
+
expandedRowIds: S.expandedRowIds.includes(f) ? S.expandedRowIds.filter((k) => k !== f) : [...S.expandedRowIds, f]
|
|
4089
4110
|
}));
|
|
4090
|
-
}, [n]), C =
|
|
4111
|
+
}, [n]), C = w(() => n(o), [n, o]), m = w((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), g = w((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
|
|
4091
4112
|
return {
|
|
4092
4113
|
/** Estado completo do grid */
|
|
4093
4114
|
state: e,
|
|
@@ -4122,40 +4143,40 @@ const VA = {
|
|
|
4122
4143
|
focusedNodeId: null
|
|
4123
4144
|
};
|
|
4124
4145
|
function As(A, t = []) {
|
|
4125
|
-
const [o, e] =
|
|
4146
|
+
const [o, e] = oA(
|
|
4126
4147
|
`tree_${A}`,
|
|
4127
4148
|
{ ...VA, expandedNodeIds: t }
|
|
4128
|
-
), n =
|
|
4149
|
+
), n = w((m) => {
|
|
4129
4150
|
e((g) => ({
|
|
4130
4151
|
...g,
|
|
4131
4152
|
expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds.filter((f) => f !== m) : [...g.expandedNodeIds, m]
|
|
4132
4153
|
}));
|
|
4133
|
-
}, [e]), s =
|
|
4154
|
+
}, [e]), s = w((m) => {
|
|
4134
4155
|
e((g) => ({
|
|
4135
4156
|
...g,
|
|
4136
4157
|
expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds : [...g.expandedNodeIds, m]
|
|
4137
4158
|
}));
|
|
4138
|
-
}, [e]), a =
|
|
4159
|
+
}, [e]), a = w((m) => {
|
|
4139
4160
|
e((g) => ({
|
|
4140
4161
|
...g,
|
|
4141
4162
|
expandedNodeIds: g.expandedNodeIds.filter((f) => f !== m)
|
|
4142
4163
|
}));
|
|
4143
|
-
}, [e]), l =
|
|
4164
|
+
}, [e]), l = w((m) => {
|
|
4144
4165
|
e((g) => ({ ...g, expandedNodeIds: m }));
|
|
4145
|
-
}, [e]), d =
|
|
4166
|
+
}, [e]), d = w(() => {
|
|
4146
4167
|
e((m) => ({ ...m, expandedNodeIds: [] }));
|
|
4147
|
-
}, [e]), c =
|
|
4168
|
+
}, [e]), c = w((m) => {
|
|
4148
4169
|
e((g) => ({ ...g, selectedNodeIds: m }));
|
|
4149
|
-
}, [e]), u =
|
|
4170
|
+
}, [e]), u = w((m) => {
|
|
4150
4171
|
e((g) => ({
|
|
4151
4172
|
...g,
|
|
4152
4173
|
selectedNodeIds: g.selectedNodeIds.includes(m) ? g.selectedNodeIds.filter((f) => f !== m) : [...g.selectedNodeIds, m]
|
|
4153
4174
|
}));
|
|
4154
|
-
}, [e]), i =
|
|
4175
|
+
}, [e]), i = w(() => {
|
|
4155
4176
|
e((m) => ({ ...m, selectedNodeIds: [] }));
|
|
4156
|
-
}, [e]), h =
|
|
4177
|
+
}, [e]), h = w((m) => {
|
|
4157
4178
|
e((g) => ({ ...g, focusedNodeId: m }));
|
|
4158
|
-
}, [e]), p =
|
|
4179
|
+
}, [e]), p = w((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), b = w((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), C = w(() => {
|
|
4159
4180
|
e({ ...VA, expandedNodeIds: t });
|
|
4160
4181
|
}, [e, t]);
|
|
4161
4182
|
return {
|
|
@@ -4181,16 +4202,16 @@ function As(A, t = []) {
|
|
|
4181
4202
|
};
|
|
4182
4203
|
}
|
|
4183
4204
|
function rs(A, t = [], o = !0) {
|
|
4184
|
-
const [e, n] =
|
|
4205
|
+
const [e, n] = oA(
|
|
4185
4206
|
`accordion_${A}`,
|
|
4186
4207
|
t
|
|
4187
|
-
), s =
|
|
4208
|
+
), s = w((i) => {
|
|
4188
4209
|
n((h) => h.includes(i) ? h.filter((p) => p !== i) : o ? [...h, i] : [i]);
|
|
4189
|
-
}, [n, o]), a =
|
|
4210
|
+
}, [n, o]), a = w((i) => {
|
|
4190
4211
|
n((h) => h.includes(i) ? h : o ? [...h, i] : [i]);
|
|
4191
|
-
}, [n, o]), l =
|
|
4212
|
+
}, [n, o]), l = w((i) => {
|
|
4192
4213
|
n((h) => h.filter((p) => p !== i));
|
|
4193
|
-
}, [n]), d =
|
|
4214
|
+
}, [n]), d = w(() => n([]), [n]), c = w((i) => e.includes(i), [e]), u = w((i) => {
|
|
4194
4215
|
n(i === null ? [] : typeof i == "string" ? [i] : i);
|
|
4195
4216
|
}, [n]);
|
|
4196
4217
|
return {
|
|
@@ -4208,7 +4229,7 @@ function rs(A, t = [], o = !0) {
|
|
|
4208
4229
|
};
|
|
4209
4230
|
}
|
|
4210
4231
|
function ts(A, t = {}) {
|
|
4211
|
-
const { debounceMs: o = 100 } = t, e =
|
|
4232
|
+
const { debounceMs: o = 100 } = t, e = EA();
|
|
4212
4233
|
te(() => {
|
|
4213
4234
|
if (!e || !A.current)
|
|
4214
4235
|
return;
|
|
@@ -4232,7 +4253,7 @@ function ts(A, t = {}) {
|
|
|
4232
4253
|
}, [e, A, o]);
|
|
4233
4254
|
}
|
|
4234
4255
|
function os(A) {
|
|
4235
|
-
const t =
|
|
4256
|
+
const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s = _(n), a = _(!0);
|
|
4236
4257
|
return te(() => {
|
|
4237
4258
|
if (a.current) {
|
|
4238
4259
|
a.current = !1, s.current = n;
|
|
@@ -4242,11 +4263,11 @@ function os(A) {
|
|
|
4242
4263
|
}, [n, A]), n;
|
|
4243
4264
|
}
|
|
4244
4265
|
function ns(A) {
|
|
4245
|
-
const t =
|
|
4266
|
+
const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = _(!1), s = _(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, d = w((i) => {
|
|
4246
4267
|
t ? (i !== void 0 && t.getState().setCustomState(e, i), t.getState().setCustomState(o, !0)) : (i !== void 0 && (s.current = i), n.current = !0);
|
|
4247
|
-
}, [t, o, e]), c =
|
|
4268
|
+
}, [t, o, e]), c = w(() => {
|
|
4248
4269
|
t ? t.getState().setCustomState(o, !1) : n.current = !1;
|
|
4249
|
-
}, [t, o]), u =
|
|
4270
|
+
}, [t, o]), u = w(() => {
|
|
4250
4271
|
t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(e)) : (n.current = !1, s.current = null);
|
|
4251
4272
|
}, [t, o, e]);
|
|
4252
4273
|
return {
|
|
@@ -4262,14 +4283,14 @@ const ss = ({
|
|
|
4262
4283
|
fallback: t,
|
|
4263
4284
|
getTabId: o = (e, n) => e + n
|
|
4264
4285
|
}) => {
|
|
4265
|
-
const e =
|
|
4266
|
-
return /* @__PURE__ */ r(tn, { tabId: n, children: /* @__PURE__ */
|
|
4286
|
+
const e = Xe(), n = o(e.pathname, e.search);
|
|
4287
|
+
return /* @__PURE__ */ r(tn, { tabId: n, children: /* @__PURE__ */ R(er, { children: [
|
|
4267
4288
|
A.map(({ path: s, element: a }) => /* @__PURE__ */ r(Ke, { path: s, element: a }, s)),
|
|
4268
|
-
t && /* @__PURE__ */ r(Ke, { path: "*", element: /* @__PURE__ */ r(
|
|
4289
|
+
t && /* @__PURE__ */ r(Ke, { path: "*", element: /* @__PURE__ */ r(Pe, { children: t }) })
|
|
4269
4290
|
] }) }, n);
|
|
4270
4291
|
};
|
|
4271
4292
|
export {
|
|
4272
|
-
|
|
4293
|
+
rA as ArchbaseAdminLayoutContext,
|
|
4273
4294
|
Rn as ArchbaseAdminLayoutFooter,
|
|
4274
4295
|
Pn as ArchbaseAdminLayoutHeader,
|
|
4275
4296
|
Kt as ArchbaseAdminLayoutProvider,
|
|
@@ -4282,7 +4303,7 @@ export {
|
|
|
4282
4303
|
qn as ArchbaseDrawerContent,
|
|
4283
4304
|
jn as ArchbaseDrawerTrigger,
|
|
4284
4305
|
Bt as ArchbaseHeaderNavAction,
|
|
4285
|
-
|
|
4306
|
+
eA as ArchbaseKeepAliveRoute,
|
|
4286
4307
|
co as ArchbaseMantineSidebar,
|
|
4287
4308
|
Xn as ArchbaseMyProfileModal,
|
|
4288
4309
|
vr as ArchbaseNavigationContext,
|
|
@@ -4290,9 +4311,9 @@ export {
|
|
|
4290
4311
|
ss as ArchbaseStatefulRoutes,
|
|
4291
4312
|
Ht as CommandPaletteButton,
|
|
4292
4313
|
Ro as KeepAliveCacheProvider,
|
|
4293
|
-
|
|
4314
|
+
xA as MantineSidebarErrorMessage,
|
|
4294
4315
|
ro as MantineSidebarGroupsSkeleton,
|
|
4295
|
-
|
|
4316
|
+
kA as MantineSidebarMenuSkeleton,
|
|
4296
4317
|
lo as MinimalSidebar,
|
|
4297
4318
|
Oo as NavigationProgressProvider,
|
|
4298
4319
|
io as RailSidebar,
|
|
@@ -4305,7 +4326,7 @@ export {
|
|
|
4305
4326
|
On as SidebarIndicator,
|
|
4306
4327
|
$e as SidebarItem,
|
|
4307
4328
|
zA as SidebarMenuSkeleton,
|
|
4308
|
-
|
|
4329
|
+
CA as SidebarProvider,
|
|
4309
4330
|
Dn as SidebarSearch,
|
|
4310
4331
|
Mn as SidebarSection,
|
|
4311
4332
|
Nn as SidebarUserProfile,
|
|
@@ -4325,7 +4346,7 @@ export {
|
|
|
4325
4346
|
Un as useArchbaseNavigationListener,
|
|
4326
4347
|
Fn as useArchbaseRouteParams,
|
|
4327
4348
|
ts as useArchbaseScrollRestore,
|
|
4328
|
-
|
|
4349
|
+
oA as useArchbaseState,
|
|
4329
4350
|
Zn as useArchbaseStateNamed,
|
|
4330
4351
|
os as useArchbaseTabActive,
|
|
4331
4352
|
As as useArchbaseTreeState,
|
|
@@ -4333,13 +4354,13 @@ export {
|
|
|
4333
4354
|
Kn as useKeepAliveVisibility,
|
|
4334
4355
|
yr as useNavigationProgress,
|
|
4335
4356
|
Vn as useParams,
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4357
|
+
vA as useSidebar,
|
|
4358
|
+
SA as useSidebarKeyboard,
|
|
4359
|
+
wA as useSidebarNavigation,
|
|
4339
4360
|
Ln as useSidebarOptional,
|
|
4340
4361
|
Wt as useSidebarSearch,
|
|
4341
|
-
|
|
4362
|
+
AA as useTabRegistryStore,
|
|
4342
4363
|
_n as useTabStore,
|
|
4343
4364
|
Wn as useTabStoreApi,
|
|
4344
|
-
|
|
4365
|
+
EA as useTabStoreOptional
|
|
4345
4366
|
};
|