@archbase/admin 3.0.9 → 3.0.10
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/ArchbaseAdminMainLayout.d.ts +23 -1
- package/dist/ArchbaseAdvancedSidebar.d.ts +21 -0
- package/dist/archbase-admin-3.0.10.tgz +0 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2779 -1213
- package/dist/sidebar/ArchbaseMantineSidebar.d.ts +43 -0
- package/dist/sidebar/components/SidebarBadge.d.ts +16 -0
- package/dist/sidebar/components/SidebarGroup.d.ts +15 -0
- package/dist/sidebar/components/SidebarGroupIcon.d.ts +6 -0
- package/dist/sidebar/components/SidebarItem.d.ts +6 -0
- package/dist/sidebar/components/SidebarSearch.d.ts +6 -0
- package/dist/sidebar/components/SidebarSkeleton.d.ts +45 -0
- package/dist/sidebar/components/SidebarUserProfile.d.ts +6 -0
- package/dist/sidebar/components/index.d.ts +8 -0
- package/dist/sidebar/context/SidebarContext.d.ts +16 -0
- package/dist/sidebar/context/index.d.ts +1 -0
- package/dist/sidebar/hooks/index.d.ts +6 -0
- package/dist/sidebar/hooks/useSidebarKeyboard.d.ts +20 -0
- package/dist/sidebar/hooks/useSidebarNavigation.d.ts +24 -0
- package/dist/sidebar/hooks/useSidebarSearch.d.ts +26 -0
- package/dist/sidebar/index.d.ts +13 -0
- package/dist/sidebar/types.d.ts +303 -0
- package/dist/sidebar/variants/MinimalSidebar.d.ts +13 -0
- package/dist/sidebar/variants/RailSidebar.d.ts +13 -0
- package/dist/sidebar/variants/StandardSidebar.d.ts +12 -0
- package/dist/sidebar/variants/index.d.ts +3 -0
- package/package.json +7 -7
- package/dist/archbase-admin-3.0.9.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,219 +1,219 @@
|
|
|
1
|
-
import { jsx as A, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useArchbaseSecurityManager as
|
|
4
|
-
import { useUncontrolled as
|
|
5
|
-
import { Flex as
|
|
6
|
-
import { IconSun as
|
|
7
|
-
import { useArchbaseAppContext as
|
|
8
|
-
import { BRFlag as
|
|
9
|
-
import { spotlight as
|
|
10
|
-
import { useNavigate as
|
|
11
|
-
import { Routes as
|
|
12
|
-
import { useMediaQuery as
|
|
13
|
-
import { useArchbaseNavigateParams as
|
|
14
|
-
import { SubMenu as
|
|
15
|
-
import
|
|
16
|
-
import { ArchbaseAdvancedTabs as
|
|
17
|
-
import { useArchbaseStore as
|
|
18
|
-
import { ArchbaseFormModalTemplate as
|
|
19
|
-
import { create as
|
|
20
|
-
const
|
|
1
|
+
import { jsx as A, jsxs as R, Fragment as yA } from "react/jsx-runtime";
|
|
2
|
+
import gA, { useState as uA, useRef as mA, useEffect as iA, useMemo as cA, useContext as xA, useCallback as H, createContext as NA, useLayoutEffect as OA, useReducer as Ne } from "react";
|
|
3
|
+
import { useArchbaseSecurityManager as Ge } from "@archbase/security";
|
|
4
|
+
import { useUncontrolled as KA, useMediaQuery as ue, useHotkeys as Ue, useDisclosure as Be, useFocusTrap as Fe, useForceUpdate as He } from "@mantine/hooks";
|
|
5
|
+
import { Flex as QA, useMantineColorScheme as oA, Menu as AA, ActionIcon as EA, Group as wA, Tooltip as vA, Button as qe, Badge as _A, Center as FA, Image as Ve, useMantineTheme as hA, px as pA, Burger as Ye, Box as U, Avatar as jA, Text as LA, ScrollArea as TA, Stack as Z, Skeleton as aA, Paper as Ke, NavLink as he, Kbd as Ce, UnstyledButton as XA, Collapse as je, TextInput as ke, Indicator as Xe, Transition as Je, Divider as JA, AppShell as PA, Drawer as ye } from "@mantine/core";
|
|
6
|
+
import { IconSun as we, IconMoonStars as ve, IconTerminal as We, IconSearch as HA, IconAlertCircle as Ze, IconDots as xe, IconChevronRight as Ae, IconChevronDown as _e, IconX as Se, IconChevronLeft as Ar, IconHome2 as er, IconDashboard as rr, IconUsers as or, IconListSearch as Ie, IconUserPlus as nr, IconNews as tr, IconFilePlus as sr, IconSettings as lr } from "@tabler/icons-react";
|
|
7
|
+
import { useArchbaseAppContext as ee, getI18nextInstance as W, useArchbaseTranslation as re, archbaseI18next as IA, useArchbaseValidator as ir, ARCHBASE_IOC_API_TYPE as ar } from "@archbase/core";
|
|
8
|
+
import { BRFlag as $A, USFlag as Ee, ESFlag as WA, VEFlag as cr, UYFlag as dr, SVFlag as ur, PYFlag as hr, PEFlag as fr, PAFlag as pr, NIFlag as gr, MXFlag as br, HNFlag as mr, GTFlag as Cr, ECFlag as kr, DOFlag as yr, CUFlag as wr, CRFlag as vr, COFlag as xr, CLFlag as Sr, BOFlag as Ir, ARFlag as Er } from "mantine-flagpack";
|
|
9
|
+
import { spotlight as Rr, Spotlight as MA } from "@mantine/spotlight";
|
|
10
|
+
import { useNavigate as GA, useLocation as UA, matchPath as fe } from "react-router";
|
|
11
|
+
import { Routes as Re, useParams as Lr, useLocation as oe, matchPath as Dr, Route as ZA, useSearchParams as Le, useNavigate as Tr } from "react-router-dom";
|
|
12
|
+
import { useMediaQuery as zr } from "usehooks-ts";
|
|
13
|
+
import { useArchbaseNavigateParams as Pr, useArchbaseVisible as Mr, ArchbaseNotifications as Or, ArchbaseAvatarEdit as $r, ArchbaseEdit as YA } from "@archbase/components";
|
|
14
|
+
import { SubMenu as Qr, MenuItem as pe, menuClasses as X, Sidebar as De, Menu as Te, sidebarClasses as ze } from "react-pro-sidebar";
|
|
15
|
+
import Nr from "@rehooks/component-size";
|
|
16
|
+
import { ArchbaseAdvancedTabs as Gr } from "@archbase/layout";
|
|
17
|
+
import { useArchbaseStore as Ur, useArchbaseRemoteServiceApi as Br, useArchbaseRemoteDataSource as Fr } from "@archbase/data";
|
|
18
|
+
import { ArchbaseFormModalTemplate as Hr } from "@archbase/template";
|
|
19
|
+
import { create as qr } from "zustand";
|
|
20
|
+
const VA = gA.createContext({}), Vr = ({
|
|
21
21
|
navigationData: e,
|
|
22
|
-
user:
|
|
23
|
-
owner:
|
|
24
|
-
company:
|
|
25
|
-
navigationRootLink:
|
|
26
|
-
children:
|
|
22
|
+
user: r,
|
|
23
|
+
owner: t,
|
|
24
|
+
company: o,
|
|
25
|
+
navigationRootLink: s,
|
|
26
|
+
children: i,
|
|
27
27
|
enableSecurity: a,
|
|
28
28
|
securityOptions: n,
|
|
29
|
-
onNavigationDataChange:
|
|
30
|
-
initialSidebarCollapsed:
|
|
29
|
+
onNavigationDataChange: c,
|
|
30
|
+
initialSidebarCollapsed: l
|
|
31
31
|
}) => {
|
|
32
|
-
const [
|
|
33
|
-
value:
|
|
32
|
+
const [u, d] = uA(l), [h, f] = uA(!1), [y, w] = uA(() => a === !0), [m, p] = uA(null), g = mA(!1), [S, v] = KA({
|
|
33
|
+
value: c !== void 0 ? e : void 0,
|
|
34
34
|
defaultValue: a ? [] : e,
|
|
35
35
|
finalValue: [],
|
|
36
|
-
onChange:
|
|
36
|
+
onChange: c
|
|
37
37
|
});
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
const { securityManager:
|
|
38
|
+
iA(() => {
|
|
39
|
+
}, [S, a]);
|
|
40
|
+
const { securityManager: C } = Ge({
|
|
41
41
|
resourceName: n?.navigationResourceName ? n.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
42
42
|
resourceDescription: n?.navigationResourceDescription ? n.navigationResourceDescription : "archbase:Navegação",
|
|
43
43
|
enableSecurity: a
|
|
44
44
|
});
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
}, [
|
|
45
|
+
return iA(() => {
|
|
46
|
+
g.current = !1;
|
|
47
|
+
}, [r?.id]), iA(() => {
|
|
48
48
|
if (!a) {
|
|
49
|
-
|
|
49
|
+
w(!1);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
if (
|
|
52
|
+
if (g.current)
|
|
53
53
|
return;
|
|
54
|
-
e.filter((
|
|
55
|
-
|
|
54
|
+
e.filter((Q) => Q.showInSidebar).forEach((Q) => {
|
|
55
|
+
C.registerAction(Q.label, Q.label), Q?.links?.forEach((T) => C.registerAction(`${Q.label} -> ${T.label}`, `${Q.label} -> ${T.label}`));
|
|
56
56
|
});
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
...
|
|
61
|
-
disabled: !
|
|
62
|
-
links:
|
|
63
|
-
const
|
|
57
|
+
const N = () => {
|
|
58
|
+
g.current = !0;
|
|
59
|
+
const Q = e.map((T) => ({
|
|
60
|
+
...T,
|
|
61
|
+
disabled: !C.hasPermission(T.label),
|
|
62
|
+
links: T.links && T.links.map((x) => {
|
|
63
|
+
const I = C.hasPermission(`${T.label} -> ${x.label}`);
|
|
64
64
|
return {
|
|
65
|
-
...
|
|
66
|
-
disabled: !
|
|
65
|
+
...x,
|
|
66
|
+
disabled: !I
|
|
67
67
|
};
|
|
68
68
|
})
|
|
69
69
|
}));
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
70
|
+
v(Q), w(!1), p(null);
|
|
71
|
+
}, j = !C.isLoading() && !C.isError();
|
|
72
|
+
if (C.isError()) {
|
|
73
|
+
g.current = !0;
|
|
74
|
+
const Q = C.getError() || "Erro ao carregar permissões de navegação";
|
|
75
|
+
p(Q), w(!1), v(e);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
79
|
-
|
|
78
|
+
if (j) {
|
|
79
|
+
N();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
if (!
|
|
86
|
-
clearInterval(
|
|
87
|
-
const
|
|
88
|
-
|
|
82
|
+
w(!0), p(null);
|
|
83
|
+
let D = !1;
|
|
84
|
+
const M = setInterval(() => {
|
|
85
|
+
if (!D && C.isError()) {
|
|
86
|
+
clearInterval(M), g.current = !0;
|
|
87
|
+
const Q = C.getError() || "Erro ao carregar permissões de navegação";
|
|
88
|
+
p(Q), w(!1), v(e);
|
|
89
89
|
}
|
|
90
|
-
}, 100),
|
|
91
|
-
|
|
90
|
+
}, 100), F = setTimeout(() => {
|
|
91
|
+
D || (clearInterval(M), w((Q) => Q && (g.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), v(e), !1)));
|
|
92
92
|
}, 3e3);
|
|
93
|
-
return
|
|
94
|
-
|
|
93
|
+
return C.apply(() => {
|
|
94
|
+
D || (clearInterval(M), clearTimeout(F), N());
|
|
95
95
|
}), () => {
|
|
96
|
-
|
|
96
|
+
D = !0, clearInterval(M), clearTimeout(F);
|
|
97
97
|
};
|
|
98
|
-
}, [
|
|
99
|
-
|
|
98
|
+
}, [r?.id, a, e, C, v]), /* @__PURE__ */ A(
|
|
99
|
+
VA.Provider,
|
|
100
100
|
{
|
|
101
101
|
value: {
|
|
102
|
-
navigationData:
|
|
103
|
-
setNavigationData:
|
|
104
|
-
user:
|
|
105
|
-
owner:
|
|
106
|
-
company:
|
|
107
|
-
navigationRootLink:
|
|
108
|
-
collapsed:
|
|
109
|
-
setCollapsed:
|
|
110
|
-
hidden:
|
|
111
|
-
setHidden:
|
|
112
|
-
onNavigationDataChange:
|
|
102
|
+
navigationData: S,
|
|
103
|
+
setNavigationData: v,
|
|
104
|
+
user: r,
|
|
105
|
+
owner: t,
|
|
106
|
+
company: o,
|
|
107
|
+
navigationRootLink: s,
|
|
108
|
+
collapsed: u,
|
|
109
|
+
setCollapsed: d,
|
|
110
|
+
hidden: h,
|
|
111
|
+
setHidden: f,
|
|
112
|
+
onNavigationDataChange: c,
|
|
113
113
|
isLoadingPermissions: y,
|
|
114
|
-
permissionsError:
|
|
114
|
+
permissionsError: m
|
|
115
115
|
},
|
|
116
|
-
children:
|
|
116
|
+
children: i
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
},
|
|
120
|
-
const e =
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
119
|
+
}, sn = ({ children: e }) => /* @__PURE__ */ A(QA, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), Yr = () => {
|
|
120
|
+
const e = ee(), { colorScheme: r } = oA(), t = r === "dark", [o, s] = uA(W().language);
|
|
121
|
+
iA(() => {
|
|
122
|
+
const c = (l) => {
|
|
123
|
+
s(l);
|
|
124
124
|
};
|
|
125
|
-
return
|
|
126
|
-
|
|
125
|
+
return W().on("languageChanged", c), () => {
|
|
126
|
+
W().off("languageChanged", c);
|
|
127
127
|
};
|
|
128
128
|
}, []);
|
|
129
|
-
const
|
|
130
|
-
if (!
|
|
131
|
-
return /* @__PURE__ */ A(
|
|
132
|
-
if (
|
|
133
|
-
return /* @__PURE__ */ A(
|
|
134
|
-
if (
|
|
135
|
-
return /* @__PURE__ */ A(
|
|
136
|
-
if (
|
|
129
|
+
const i = (c) => {
|
|
130
|
+
if (!c)
|
|
131
|
+
return /* @__PURE__ */ A($A, { size: 24 });
|
|
132
|
+
if (c === "en" || c === "en-US")
|
|
133
|
+
return /* @__PURE__ */ A(Ee, { size: 24 });
|
|
134
|
+
if (c === "pt-BR")
|
|
135
|
+
return /* @__PURE__ */ A($A, { size: 24 });
|
|
136
|
+
if (c.includes("es"))
|
|
137
137
|
switch (navigator.language || navigator.languages[0]) {
|
|
138
138
|
case "es":
|
|
139
139
|
case "es-ES":
|
|
140
|
-
return /* @__PURE__ */ A(
|
|
140
|
+
return /* @__PURE__ */ A(WA, { size: 24 });
|
|
141
141
|
case "es-AR":
|
|
142
|
-
return /* @__PURE__ */ A(
|
|
142
|
+
return /* @__PURE__ */ A(Er, { size: 24 });
|
|
143
143
|
case "es-BO":
|
|
144
|
-
return /* @__PURE__ */ A(
|
|
144
|
+
return /* @__PURE__ */ A(Ir, { size: 24 });
|
|
145
145
|
case "es-CL":
|
|
146
|
-
return /* @__PURE__ */ A(
|
|
146
|
+
return /* @__PURE__ */ A(Sr, { size: 24 });
|
|
147
147
|
case "es-CO":
|
|
148
|
-
return /* @__PURE__ */ A(
|
|
148
|
+
return /* @__PURE__ */ A(xr, { size: 24 });
|
|
149
149
|
case "es-CR":
|
|
150
|
-
return /* @__PURE__ */ A(
|
|
150
|
+
return /* @__PURE__ */ A(vr, { size: 24 });
|
|
151
151
|
case "es-CU":
|
|
152
|
-
return /* @__PURE__ */ A(
|
|
152
|
+
return /* @__PURE__ */ A(wr, { size: 24 });
|
|
153
153
|
case "es-DO":
|
|
154
|
-
return /* @__PURE__ */ A(
|
|
154
|
+
return /* @__PURE__ */ A(yr, { size: 24 });
|
|
155
155
|
case "es-EC":
|
|
156
|
-
return /* @__PURE__ */ A(
|
|
156
|
+
return /* @__PURE__ */ A(kr, { size: 24 });
|
|
157
157
|
case "es-GT":
|
|
158
|
-
return /* @__PURE__ */ A(
|
|
158
|
+
return /* @__PURE__ */ A(Cr, { size: 24 });
|
|
159
159
|
case "es-HN":
|
|
160
|
-
return /* @__PURE__ */ A(
|
|
160
|
+
return /* @__PURE__ */ A(mr, { size: 24 });
|
|
161
161
|
case "es-MX":
|
|
162
|
-
return /* @__PURE__ */ A(
|
|
162
|
+
return /* @__PURE__ */ A(br, { size: 24 });
|
|
163
163
|
case "es-NI":
|
|
164
|
-
return /* @__PURE__ */ A(
|
|
164
|
+
return /* @__PURE__ */ A(gr, { size: 24 });
|
|
165
165
|
case "es-PA":
|
|
166
|
-
return /* @__PURE__ */ A(
|
|
166
|
+
return /* @__PURE__ */ A(pr, { size: 24 });
|
|
167
167
|
case "es-PE":
|
|
168
|
-
return /* @__PURE__ */ A(
|
|
168
|
+
return /* @__PURE__ */ A(fr, { size: 24 });
|
|
169
169
|
case "es-PY":
|
|
170
|
-
return /* @__PURE__ */ A(
|
|
170
|
+
return /* @__PURE__ */ A(hr, { size: 24 });
|
|
171
171
|
case "es-SV":
|
|
172
|
-
return /* @__PURE__ */ A(
|
|
172
|
+
return /* @__PURE__ */ A(ur, { size: 24 });
|
|
173
173
|
case "es-UY":
|
|
174
|
-
return /* @__PURE__ */ A(
|
|
174
|
+
return /* @__PURE__ */ A(dr, { size: 24 });
|
|
175
175
|
case "es-VE":
|
|
176
|
-
return /* @__PURE__ */ A(
|
|
176
|
+
return /* @__PURE__ */ A(cr, { size: 24 });
|
|
177
177
|
default:
|
|
178
|
-
return /* @__PURE__ */ A(
|
|
178
|
+
return /* @__PURE__ */ A(WA, { size: 24 });
|
|
179
179
|
}
|
|
180
|
-
return /* @__PURE__ */ A(
|
|
180
|
+
return /* @__PURE__ */ A($A, { size: 24 });
|
|
181
181
|
}, a = () => {
|
|
182
182
|
if (e.languages)
|
|
183
|
-
return e.languages.filter((
|
|
184
|
-
|
|
183
|
+
return e.languages.filter((c) => c).map((c) => /* @__PURE__ */ A(
|
|
184
|
+
AA.Item,
|
|
185
185
|
{
|
|
186
|
-
onClick: () => n(
|
|
187
|
-
leftSection:
|
|
188
|
-
children:
|
|
186
|
+
onClick: () => n(c.lang),
|
|
187
|
+
leftSection: i(c.lang),
|
|
188
|
+
children: c.name
|
|
189
189
|
},
|
|
190
|
-
|
|
190
|
+
c.name
|
|
191
191
|
));
|
|
192
|
-
}, n = (
|
|
193
|
-
|
|
192
|
+
}, n = (c) => {
|
|
193
|
+
W().changeLanguage(c);
|
|
194
194
|
};
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */ A(
|
|
197
|
-
/* @__PURE__ */ A(
|
|
195
|
+
return /* @__PURE__ */ R(AA, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
196
|
+
/* @__PURE__ */ A(AA.Target, { children: /* @__PURE__ */ A(EA, { variant: "transparent", color: t ? "white" : "blue", title: W().t("toggleLanguage"), children: i(o) }) }),
|
|
197
|
+
/* @__PURE__ */ A(AA.Dropdown, { children: a() })
|
|
198
198
|
] });
|
|
199
|
-
},
|
|
200
|
-
const e =
|
|
199
|
+
}, Kr = () => {
|
|
200
|
+
const e = ee(), { colorScheme: r } = oA(), { t, i18n: o } = re(), s = (n) => n === "en" ? /* @__PURE__ */ A(Ee, { size: 24 }) : n === "pt-BR" ? /* @__PURE__ */ A($A, { size: 24 }) : n === "es" ? /* @__PURE__ */ A(WA, { size: 24 }) : /* @__PURE__ */ A($A, { size: 24 }), i = () => {
|
|
201
201
|
if (e.languages)
|
|
202
202
|
return e.languages.filter((n) => n).map((n) => /* @__PURE__ */ A(
|
|
203
|
-
|
|
203
|
+
AA.Item,
|
|
204
204
|
{
|
|
205
205
|
onClick: () => a(n.lang),
|
|
206
|
-
leftSection:
|
|
206
|
+
leftSection: s(n.lang),
|
|
207
207
|
children: n.name
|
|
208
208
|
},
|
|
209
209
|
n.name
|
|
210
210
|
));
|
|
211
211
|
}, a = (n) => {
|
|
212
|
-
|
|
212
|
+
o.changeLanguage(n);
|
|
213
213
|
};
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */ A(
|
|
216
|
-
|
|
214
|
+
return /* @__PURE__ */ R(AA, { children: [
|
|
215
|
+
/* @__PURE__ */ A(AA.Target, { children: /* @__PURE__ */ R(
|
|
216
|
+
wA,
|
|
217
217
|
{
|
|
218
218
|
w: "100%",
|
|
219
219
|
justify: "flex-start",
|
|
@@ -222,175 +222,175 @@ const OA = AA.createContext({}), Rr = ({
|
|
|
222
222
|
variant: "transparent",
|
|
223
223
|
fw: 400,
|
|
224
224
|
gap: 4,
|
|
225
|
-
title:
|
|
225
|
+
title: W().t("archbase:toggleLanguage"),
|
|
226
226
|
children: [
|
|
227
|
-
|
|
228
|
-
`${e.languages.find((n) => n.lang ===
|
|
227
|
+
s(o.language),
|
|
228
|
+
`${e.languages.find((n) => n.lang === o.language)?.name ?? "Português"}`
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
231
|
) }),
|
|
232
|
-
/* @__PURE__ */ A(
|
|
232
|
+
/* @__PURE__ */ A(AA.Dropdown, { children: i() })
|
|
233
233
|
] });
|
|
234
|
-
},
|
|
234
|
+
}, jr = ({
|
|
235
235
|
toggleColorScheme: e,
|
|
236
|
-
sunColor:
|
|
237
|
-
moonColor:
|
|
236
|
+
sunColor: r = "white",
|
|
237
|
+
moonColor: t = "blue"
|
|
238
238
|
}) => {
|
|
239
|
-
const { t:
|
|
240
|
-
e ? e() :
|
|
241
|
-
}, n =
|
|
239
|
+
const { t: o } = re(), { colorScheme: s, toggleColorScheme: i } = oA(), a = () => {
|
|
240
|
+
e ? e() : i();
|
|
241
|
+
}, n = s === "dark";
|
|
242
242
|
return /* @__PURE__ */ A(
|
|
243
|
-
|
|
243
|
+
EA,
|
|
244
244
|
{
|
|
245
245
|
variant: "transparent",
|
|
246
|
-
color: n ?
|
|
246
|
+
color: n ? r : t,
|
|
247
247
|
onClick: () => a(),
|
|
248
|
-
title:
|
|
249
|
-
children: n ? /* @__PURE__ */ A(
|
|
248
|
+
title: W().t("archbase:toggleColorScheme"),
|
|
249
|
+
children: n ? /* @__PURE__ */ A(we, { size: "1.5rem" }) : /* @__PURE__ */ A(ve, { size: "1.5rem" })
|
|
250
250
|
}
|
|
251
251
|
);
|
|
252
|
-
},
|
|
253
|
-
function
|
|
252
|
+
}, Xr = (e) => /* @__PURE__ */ A(wA, { gap: "sm", children: e.children });
|
|
253
|
+
function Jr({ category: e, label: r, color: t, description: o, image: s, onClick: i }) {
|
|
254
254
|
return /* @__PURE__ */ A(
|
|
255
|
-
|
|
255
|
+
MA.Action,
|
|
256
256
|
{
|
|
257
|
-
onClick:
|
|
258
|
-
label: `${
|
|
259
|
-
description:
|
|
260
|
-
leftSection:
|
|
261
|
-
rightSection: e ? /* @__PURE__ */ A(
|
|
257
|
+
onClick: i,
|
|
258
|
+
label: `${W().t(r || "")}`,
|
|
259
|
+
description: o ? W().t(o) : void 0,
|
|
260
|
+
leftSection: s ? /* @__PURE__ */ A(FA, { children: /* @__PURE__ */ A(Ve, { src: s, alt: W().t(r || ""), width: 24, height: 24 }) }) : void 0,
|
|
261
|
+
rightSection: e ? /* @__PURE__ */ A(_A, { color: t, size: "sm", children: W().t(e) }) : void 0
|
|
262
262
|
},
|
|
263
|
-
|
|
263
|
+
r
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
|
-
const
|
|
267
|
-
const [
|
|
268
|
-
const
|
|
269
|
-
return e.forEach((
|
|
270
|
-
|
|
271
|
-
!
|
|
272
|
-
id:
|
|
273
|
-
category:
|
|
274
|
-
color:
|
|
275
|
-
label:
|
|
276
|
-
link:
|
|
266
|
+
const Wr = ({ navigationData: e, color: r }) => {
|
|
267
|
+
const [t, o] = uA(""), s = GA(), { t: i } = re(), a = cA(() => {
|
|
268
|
+
const c = new Array();
|
|
269
|
+
return e.forEach((l) => {
|
|
270
|
+
l.links ? l.links.forEach((u) => {
|
|
271
|
+
!u.disabled && u.showInSidebar && c.push({
|
|
272
|
+
id: u.label,
|
|
273
|
+
category: u.category ? u.category.toUpperCase() : "",
|
|
274
|
+
color: u.color,
|
|
275
|
+
label: u.label,
|
|
276
|
+
link: u.link,
|
|
277
277
|
onClick: () => {
|
|
278
|
-
|
|
278
|
+
u.link && s(u.link);
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
|
-
}) : !
|
|
282
|
-
id:
|
|
281
|
+
}) : !l.disabled && l.showInSidebar && c.push({
|
|
282
|
+
id: l.label,
|
|
283
283
|
onClick: () => {
|
|
284
|
-
|
|
284
|
+
l.link && s(l.link);
|
|
285
285
|
},
|
|
286
|
-
category:
|
|
287
|
-
color:
|
|
288
|
-
label:
|
|
289
|
-
link:
|
|
286
|
+
category: l.category ? l.category.toUpperCase() : "",
|
|
287
|
+
color: l.color,
|
|
288
|
+
label: l.label,
|
|
289
|
+
link: l.link
|
|
290
290
|
});
|
|
291
|
-
}),
|
|
292
|
-
}, [e,
|
|
293
|
-
const
|
|
294
|
-
return
|
|
295
|
-
}).map((
|
|
296
|
-
return /* @__PURE__ */ A(
|
|
297
|
-
/* @__PURE__ */ A(
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
291
|
+
}), c;
|
|
292
|
+
}, [e, s]), n = a.filter((c) => {
|
|
293
|
+
const l = `${i(c.label || "")}`;
|
|
294
|
+
return l && l.toLowerCase().includes(t.toLowerCase().trim());
|
|
295
|
+
}).map((c) => /* @__PURE__ */ A(Jr, { ...c }, c.id));
|
|
296
|
+
return /* @__PURE__ */ A(yA, { children: a && a.length > 0 ? /* @__PURE__ */ R(yA, { children: [
|
|
297
|
+
/* @__PURE__ */ A(vA, { withinPortal: !0, withArrow: !0, label: `${i("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ A(qe, { color: r, leftSection: /* @__PURE__ */ A(We, { size: "24px" }), onClick: () => Rr.open() }) }),
|
|
298
|
+
/* @__PURE__ */ R(
|
|
299
|
+
MA.Root,
|
|
300
300
|
{
|
|
301
301
|
shortcut: ["mod + M", "/"],
|
|
302
|
-
onQueryChange: (
|
|
303
|
-
query:
|
|
302
|
+
onQueryChange: (c) => o(c),
|
|
303
|
+
query: t,
|
|
304
304
|
children: [
|
|
305
|
-
/* @__PURE__ */ A(
|
|
306
|
-
/* @__PURE__ */ A(
|
|
305
|
+
/* @__PURE__ */ A(MA.Search, { placeholder: `${i("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ A(HA, { size: "1.2rem" }) }),
|
|
306
|
+
/* @__PURE__ */ A(MA.ActionsList, { children: n.length > 0 ? n : /* @__PURE__ */ A(MA.Empty, { children: W().t("archbase:Nenhum resultado...") }) })
|
|
307
307
|
]
|
|
308
308
|
}
|
|
309
309
|
)
|
|
310
310
|
] }) : null });
|
|
311
|
-
},
|
|
311
|
+
}, Zr = "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", ln = ({
|
|
312
312
|
userMenuItems: e,
|
|
313
|
-
showUserMenuToggleColorScheme:
|
|
314
|
-
showUserMenuOptionsLabel:
|
|
315
|
-
userMenuToggleColorSchemeIconSize:
|
|
316
|
-
showMenuItemsAfterToggleColorScheme:
|
|
317
|
-
userMenuItemsAfterToggleColorScheme:
|
|
313
|
+
showUserMenuToggleColorScheme: r = !0,
|
|
314
|
+
showUserMenuOptionsLabel: t = !0,
|
|
315
|
+
userMenuToggleColorSchemeIconSize: o = 14,
|
|
316
|
+
showMenuItemsAfterToggleColorScheme: s = !0,
|
|
317
|
+
userMenuItemsAfterToggleColorScheme: i,
|
|
318
318
|
showMenuItemsBeforeToggleColorScheme: a = !0,
|
|
319
319
|
userMenuItemsBeforeToggleColorScheme: n,
|
|
320
|
-
hideAutoHeaderActionsOnUserMenu:
|
|
321
|
-
showHeaderActions:
|
|
322
|
-
showHeaderToggleColorScheme:
|
|
323
|
-
hideAutoHeaderActionsOnUserMenuBreakPoint:
|
|
324
|
-
withDividerAfterUserMenuToggleColorScheme:
|
|
325
|
-
user:
|
|
320
|
+
hideAutoHeaderActionsOnUserMenu: c = !0,
|
|
321
|
+
showHeaderActions: l = !0,
|
|
322
|
+
showHeaderToggleColorScheme: u = !0,
|
|
323
|
+
hideAutoHeaderActionsOnUserMenuBreakPoint: d,
|
|
324
|
+
withDividerAfterUserMenuToggleColorScheme: h = !0,
|
|
325
|
+
user: f,
|
|
326
326
|
navigationData: y = [],
|
|
327
|
-
logo:
|
|
328
|
-
headerActions:
|
|
329
|
-
styleLogo:
|
|
330
|
-
showLanguageSelector:
|
|
331
|
-
sideBarHiddenBreakPoint:
|
|
332
|
-
headerLeftContent:
|
|
333
|
-
toggleColorScheme:
|
|
334
|
-
logoLeftSection:
|
|
335
|
-
logoRightSection:
|
|
336
|
-
showBurger:
|
|
327
|
+
logo: w,
|
|
328
|
+
headerActions: m,
|
|
329
|
+
styleLogo: p,
|
|
330
|
+
showLanguageSelector: g = !1,
|
|
331
|
+
sideBarHiddenBreakPoint: S,
|
|
332
|
+
headerLeftContent: v,
|
|
333
|
+
toggleColorScheme: C,
|
|
334
|
+
logoLeftSection: P,
|
|
335
|
+
logoRightSection: N,
|
|
336
|
+
showBurger: j = !0,
|
|
337
337
|
showCommands: J = !0,
|
|
338
|
-
sunColor:
|
|
339
|
-
moonColor:
|
|
340
|
-
styles:
|
|
338
|
+
sunColor: D,
|
|
339
|
+
moonColor: M,
|
|
340
|
+
styles: F
|
|
341
341
|
}) => {
|
|
342
|
-
const
|
|
343
|
-
`(max-width: ${
|
|
344
|
-
),
|
|
345
|
-
`(max-width: ${
|
|
342
|
+
const Q = hA(), { colorScheme: T, toggleColorScheme: x } = oA(), I = xA(VA), Y = ue(
|
|
343
|
+
`(max-width: ${S ? pA(S) : Q.breakpoints.md})`
|
|
344
|
+
), q = ue(
|
|
345
|
+
`(max-width: ${d ? pA(d) : Q.breakpoints.md})`
|
|
346
346
|
);
|
|
347
|
-
let
|
|
348
|
-
return
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
|
|
347
|
+
let k = !1, b = !1;
|
|
348
|
+
return c && (l = !q, u = !q, r = q, t = q, a = q, h = q, g && (b = !q, k = q)), /* @__PURE__ */ R(yA, { children: [
|
|
349
|
+
/* @__PURE__ */ R(QA, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
350
|
+
P,
|
|
351
351
|
/* @__PURE__ */ A(
|
|
352
352
|
"img",
|
|
353
353
|
{
|
|
354
354
|
style: {
|
|
355
355
|
height: 50,
|
|
356
|
-
...
|
|
356
|
+
...p
|
|
357
357
|
},
|
|
358
358
|
alt: "logo",
|
|
359
|
-
src:
|
|
359
|
+
src: w
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
|
-
|
|
362
|
+
N
|
|
363
363
|
] }),
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
j && /* @__PURE__ */ A(
|
|
365
|
+
Ye,
|
|
366
366
|
{
|
|
367
|
-
opened:
|
|
368
|
-
onClick: () =>
|
|
367
|
+
opened: I.hidden ? I.hidden : !1,
|
|
368
|
+
onClick: () => I.setHidden(!I.hidden),
|
|
369
369
|
size: "sm",
|
|
370
|
-
color:
|
|
370
|
+
color: Q.colors.gray[7],
|
|
371
371
|
mx: { base: "xs", xs: "lg", sm: "xl" },
|
|
372
|
-
display:
|
|
372
|
+
display: Y ? "" : "none"
|
|
373
373
|
}
|
|
374
374
|
),
|
|
375
|
-
/* @__PURE__ */ A("div", { children: J && /* @__PURE__ */ A(
|
|
376
|
-
/* @__PURE__ */ A(
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */ A(
|
|
375
|
+
/* @__PURE__ */ A("div", { children: J && /* @__PURE__ */ A(Wr, { navigationData: y }) }),
|
|
376
|
+
/* @__PURE__ */ A(U, { style: { flex: 1 }, children: v }),
|
|
377
|
+
/* @__PURE__ */ R(Xr, { children: [
|
|
378
|
+
l && m,
|
|
379
|
+
u && /* @__PURE__ */ A(jr, { toggleColorScheme: C, sunColor: D, moonColor: M }),
|
|
380
|
+
b && /* @__PURE__ */ A(Yr, {}),
|
|
381
|
+
/* @__PURE__ */ R(AA, { shadow: "md", width: 200, position: "bottom-end", styles: F?.menu, children: [
|
|
382
|
+
/* @__PURE__ */ A(AA.Target, { children: /* @__PURE__ */ R("div", { children: [
|
|
383
383
|
/* @__PURE__ */ A(
|
|
384
|
-
|
|
384
|
+
jA,
|
|
385
385
|
{
|
|
386
386
|
style: { cursor: "pointer" },
|
|
387
387
|
radius: "xl",
|
|
388
388
|
ml: 8,
|
|
389
|
-
src:
|
|
390
|
-
alt:
|
|
389
|
+
src: f ? f.photo : Zr,
|
|
390
|
+
alt: f ? f.displayName : ""
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
|
-
|
|
393
|
+
f && f.isAdmin ? /* @__PURE__ */ A(
|
|
394
394
|
"div",
|
|
395
395
|
{
|
|
396
396
|
style: {
|
|
@@ -407,98 +407,98 @@ const Or = ({ navigationData: e, color: o }) => {
|
|
|
407
407
|
borderRadius: 50,
|
|
408
408
|
backgroundColor: "green"
|
|
409
409
|
},
|
|
410
|
-
children: /* @__PURE__ */ A(
|
|
410
|
+
children: /* @__PURE__ */ A(LA, { size: "xs", c: "white", children: "A" })
|
|
411
411
|
}
|
|
412
412
|
) : null
|
|
413
413
|
] }) }),
|
|
414
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ R(AA.Dropdown, { children: [
|
|
415
415
|
e,
|
|
416
|
-
|
|
416
|
+
t && /* @__PURE__ */ A(AA.Label, { children: `${W().t("archbase:Opções")}` }),
|
|
417
417
|
a && n,
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
r && /* @__PURE__ */ A(
|
|
419
|
+
AA.Item,
|
|
420
420
|
{
|
|
421
|
-
leftSection:
|
|
422
|
-
onClick:
|
|
423
|
-
children: `${
|
|
421
|
+
leftSection: T === "dark" ? /* @__PURE__ */ A(we, { size: o }) : /* @__PURE__ */ A(ve, { size: o }),
|
|
422
|
+
onClick: C || x,
|
|
423
|
+
children: `${W().t("archbase:toggleColorScheme")}`
|
|
424
424
|
}
|
|
425
425
|
),
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
426
|
+
k && /* @__PURE__ */ A(Kr, {}),
|
|
427
|
+
h && /* @__PURE__ */ A(AA.Divider, {}),
|
|
428
|
+
s && i
|
|
429
429
|
] })
|
|
430
430
|
] })
|
|
431
431
|
] })
|
|
432
432
|
] });
|
|
433
433
|
};
|
|
434
|
-
function
|
|
435
|
-
const
|
|
436
|
-
if (
|
|
437
|
-
if (!(
|
|
438
|
-
return /* @__PURE__ */ A(
|
|
439
|
-
|
|
434
|
+
function ge(e, r, t, o, s, i, a, n, c, l) {
|
|
435
|
+
const u = i ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, d = i ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, h = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", f = "0.5";
|
|
436
|
+
if (o.links) {
|
|
437
|
+
if (!(o.disabled && o.hideDisabledItem))
|
|
438
|
+
return /* @__PURE__ */ A(vA, { disabled: !r, label: IA.t(o.label), children: /* @__PURE__ */ A(
|
|
439
|
+
Qr,
|
|
440
440
|
{
|
|
441
441
|
rootStyles: {
|
|
442
442
|
fontSize: "16px",
|
|
443
|
-
[`.${
|
|
443
|
+
[`.${X.button}`]: {
|
|
444
444
|
"&:hover": {
|
|
445
|
-
[`.${
|
|
445
|
+
[`.${X.icon}`]: {
|
|
446
446
|
color: "white"
|
|
447
447
|
},
|
|
448
|
-
[`.${
|
|
448
|
+
[`.${X.label}`]: {
|
|
449
449
|
color: "white"
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
},
|
|
453
|
-
[`.${
|
|
454
|
-
width:
|
|
453
|
+
[`.${X.subMenuContent}`]: {
|
|
454
|
+
width: r && l
|
|
455
455
|
},
|
|
456
|
-
[`.${
|
|
457
|
-
opacity:
|
|
458
|
-
[`.${
|
|
459
|
-
color:
|
|
456
|
+
[`.${X.disabled}`]: {
|
|
457
|
+
opacity: f,
|
|
458
|
+
[`.${X.icon}`]: {
|
|
459
|
+
color: h + " !important"
|
|
460
460
|
},
|
|
461
|
-
[`.${
|
|
462
|
-
color:
|
|
461
|
+
[`.${X.label}`]: {
|
|
462
|
+
color: h + " !important"
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
},
|
|
466
|
-
id:
|
|
467
|
-
icon:
|
|
468
|
-
defaultOpen: !
|
|
469
|
-
label:
|
|
470
|
-
disabled:
|
|
471
|
-
children:
|
|
472
|
-
|
|
466
|
+
id: o.label,
|
|
467
|
+
icon: o.icon,
|
|
468
|
+
defaultOpen: !o.disabled,
|
|
469
|
+
label: r ? "" : IA.t(o.label),
|
|
470
|
+
disabled: o.disabled,
|
|
471
|
+
children: o.links && o.links.filter((y) => y.showInSidebar === !0 && (!y.disabled || !y.hideDisabledItem)).map((y, w) => /* @__PURE__ */ A(
|
|
472
|
+
pe,
|
|
473
473
|
{
|
|
474
|
-
onClick: () =>
|
|
474
|
+
onClick: () => t(y),
|
|
475
475
|
rootStyles: {
|
|
476
|
-
[`.${
|
|
477
|
-
background:
|
|
478
|
-
color: n && y.link === a ? "white" :
|
|
476
|
+
[`.${X.icon}`]: {
|
|
477
|
+
background: u,
|
|
478
|
+
color: n && y.link === a ? "white" : d
|
|
479
479
|
},
|
|
480
|
-
[`.${
|
|
481
|
-
color: n && y.link === a ? "white" :
|
|
480
|
+
[`.${X.label}`]: {
|
|
481
|
+
color: n && y.link === a ? "white" : c
|
|
482
482
|
},
|
|
483
|
-
[`.${
|
|
483
|
+
[`.${X.button}`]: {
|
|
484
484
|
paddingLeft: "40px !important",
|
|
485
485
|
"&:hover": {
|
|
486
|
-
[`.${
|
|
486
|
+
[`.${X.icon}`]: {
|
|
487
487
|
color: "white"
|
|
488
488
|
},
|
|
489
|
-
[`.${
|
|
489
|
+
[`.${X.label}`]: {
|
|
490
490
|
color: "white"
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
},
|
|
494
|
-
[`.${
|
|
495
|
-
opacity:
|
|
496
|
-
[`.${
|
|
497
|
-
background: (
|
|
498
|
-
color:
|
|
494
|
+
[`.${X.disabled}`]: {
|
|
495
|
+
opacity: f,
|
|
496
|
+
[`.${X.icon}`]: {
|
|
497
|
+
background: (u || "") + " !important",
|
|
498
|
+
color: h + " !important"
|
|
499
499
|
},
|
|
500
|
-
[`.${
|
|
501
|
-
color:
|
|
500
|
+
[`.${X.label}`]: {
|
|
501
|
+
color: h + " !important"
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
},
|
|
@@ -506,59 +506,59 @@ function WA(e, o, c, r, t, d, a, n, u, i) {
|
|
|
506
506
|
icon: y.icon,
|
|
507
507
|
disabled: typeof y.disabled == "function" ? y.disabled() : y.disabled,
|
|
508
508
|
active: n && y.link === a,
|
|
509
|
-
children:
|
|
509
|
+
children: IA.t(y.label)
|
|
510
510
|
},
|
|
511
|
-
|
|
511
|
+
w
|
|
512
512
|
))
|
|
513
513
|
},
|
|
514
|
-
|
|
514
|
+
s
|
|
515
515
|
) });
|
|
516
|
-
} else if (
|
|
517
|
-
return /* @__PURE__ */ A(
|
|
518
|
-
|
|
516
|
+
} else if (o.showInSidebar && (!o.disabled || !o.hideDisabledItem))
|
|
517
|
+
return /* @__PURE__ */ A(vA, { disabled: !r, label: IA.t(o.label), children: /* @__PURE__ */ A(
|
|
518
|
+
pe,
|
|
519
519
|
{
|
|
520
520
|
rootStyles: {
|
|
521
521
|
fontSize: "16px",
|
|
522
|
-
[`.${
|
|
522
|
+
[`.${X.button}`]: {
|
|
523
523
|
"&:hover": {
|
|
524
|
-
[`.${
|
|
524
|
+
[`.${X.icon}`]: {
|
|
525
525
|
color: "white"
|
|
526
526
|
},
|
|
527
|
-
[`.${
|
|
527
|
+
[`.${X.label}`]: {
|
|
528
528
|
color: "white"
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
},
|
|
532
|
-
[`.${
|
|
533
|
-
background:
|
|
534
|
-
color: n &&
|
|
532
|
+
[`.${X.icon}`]: {
|
|
533
|
+
background: u,
|
|
534
|
+
color: n && o.link === a ? "white" : d
|
|
535
535
|
},
|
|
536
|
-
[`.${
|
|
537
|
-
color: n &&
|
|
536
|
+
[`.${X.label}`]: {
|
|
537
|
+
color: n && o.link === a ? "white" : c
|
|
538
538
|
},
|
|
539
|
-
[`.${
|
|
540
|
-
opacity:
|
|
541
|
-
[`.${
|
|
542
|
-
background: (
|
|
543
|
-
color:
|
|
539
|
+
[`.${X.disabled}`]: {
|
|
540
|
+
opacity: f,
|
|
541
|
+
[`.${X.icon}`]: {
|
|
542
|
+
background: (u || "") + " !important",
|
|
543
|
+
color: h + " !important"
|
|
544
544
|
},
|
|
545
|
-
[`.${
|
|
546
|
-
color:
|
|
545
|
+
[`.${X.label}`]: {
|
|
546
|
+
color: h + " !important"
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
},
|
|
550
|
-
id:
|
|
551
|
-
disabled: typeof
|
|
552
|
-
onClick: () =>
|
|
553
|
-
icon:
|
|
554
|
-
active: n &&
|
|
555
|
-
children:
|
|
550
|
+
id: o.label,
|
|
551
|
+
disabled: typeof o.disabled == "function" ? o.disabled() : o.disabled,
|
|
552
|
+
onClick: () => t(o),
|
|
553
|
+
icon: o.icon,
|
|
554
|
+
active: n && o.link === a,
|
|
555
|
+
children: r ? "" : IA.t(o.label)
|
|
556
556
|
},
|
|
557
|
-
|
|
557
|
+
s
|
|
558
558
|
) });
|
|
559
559
|
return null;
|
|
560
560
|
}
|
|
561
|
-
const
|
|
561
|
+
const _r = (e) => ({
|
|
562
562
|
light: {
|
|
563
563
|
sidebar: {
|
|
564
564
|
backgroundColor: "#ffffff",
|
|
@@ -593,98 +593,98 @@ const Qr = (e) => ({
|
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
}),
|
|
597
|
-
const
|
|
596
|
+
}), Ao = (e, r, t, o, s, i, a, n, c, l, u) => {
|
|
597
|
+
const d = _r(), h = i ? {} : { padding: t ? `0 ${(s - o) / 2}px` : "0 20px" }, f = i ? {} : { display: "none" }, y = a ? e === "dark" ? r.colors[r.primaryColor][8] : r.colors[r.primaryColor][0] : void 0;
|
|
598
598
|
return {
|
|
599
599
|
root: {
|
|
600
600
|
fontSize: "14px",
|
|
601
601
|
fontWeight: 400,
|
|
602
|
-
backgroundColor:
|
|
603
|
-
color:
|
|
602
|
+
backgroundColor: c,
|
|
603
|
+
color: r.white
|
|
604
604
|
},
|
|
605
605
|
icon: {
|
|
606
606
|
background: y,
|
|
607
|
-
color:
|
|
608
|
-
[`&.${
|
|
609
|
-
color:
|
|
607
|
+
color: u,
|
|
608
|
+
[`&.${X.disabled}`]: {
|
|
609
|
+
color: d[e].menu.disabled.color
|
|
610
610
|
}
|
|
611
611
|
},
|
|
612
612
|
SubMenuExpandIcon: {
|
|
613
613
|
color: "#b6b7b9",
|
|
614
|
-
...
|
|
614
|
+
...f
|
|
615
615
|
},
|
|
616
616
|
subMenuContent: () => ({
|
|
617
|
-
backgroundColor: e === "dark" ?
|
|
617
|
+
backgroundColor: e === "dark" ? r.colors.dark[8] : r.colors[r.primaryColor][0]
|
|
618
618
|
}),
|
|
619
619
|
button: {
|
|
620
|
-
[`&.${
|
|
621
|
-
color:
|
|
620
|
+
[`&.${X.disabled}`]: {
|
|
621
|
+
color: d[e].menu.disabled.color
|
|
622
622
|
},
|
|
623
623
|
"&:hover": {
|
|
624
|
-
backgroundColor:
|
|
625
|
-
color:
|
|
624
|
+
backgroundColor: r.colors[r.primaryColor][6],
|
|
625
|
+
color: r.white
|
|
626
626
|
},
|
|
627
|
-
[`&.${
|
|
628
|
-
backgroundColor:
|
|
627
|
+
[`&.${X.active}`]: {
|
|
628
|
+
backgroundColor: r.colors[r.primaryColor][6]
|
|
629
629
|
},
|
|
630
630
|
height: n,
|
|
631
|
-
...
|
|
631
|
+
...h
|
|
632
632
|
},
|
|
633
|
-
label: ({ open:
|
|
634
|
-
fontWeight:
|
|
635
|
-
color:
|
|
633
|
+
label: ({ open: w }) => ({
|
|
634
|
+
fontWeight: w ? 600 : void 0,
|
|
635
|
+
color: l,
|
|
636
636
|
"&:hover": {
|
|
637
|
-
color:
|
|
637
|
+
color: r.white
|
|
638
638
|
}
|
|
639
639
|
})
|
|
640
640
|
};
|
|
641
641
|
};
|
|
642
|
-
function
|
|
643
|
-
return /* @__PURE__ */
|
|
644
|
-
|
|
642
|
+
function eo(e, r, t, o, s, i, a, n, c, l, u) {
|
|
643
|
+
return /* @__PURE__ */ R(
|
|
644
|
+
De,
|
|
645
645
|
{
|
|
646
646
|
ref: e,
|
|
647
647
|
rootStyles: {
|
|
648
|
-
[`.${
|
|
648
|
+
[`.${ze.container}`]: {
|
|
649
649
|
position: "absolute",
|
|
650
|
-
background:
|
|
650
|
+
background: u,
|
|
651
651
|
overflowX: "hidden",
|
|
652
652
|
overflowY: "hidden",
|
|
653
653
|
left: 0,
|
|
654
654
|
right: 0,
|
|
655
|
-
height: a ? "calc(100vh - 28px)" : `${
|
|
655
|
+
height: a ? "calc(100vh - 28px)" : `${pA(n)}px`
|
|
656
656
|
}
|
|
657
657
|
},
|
|
658
|
-
collapsed:
|
|
659
|
-
width: `${
|
|
660
|
-
collapsedWidth: `${
|
|
658
|
+
collapsed: r,
|
|
659
|
+
width: `${pA(t)}px`,
|
|
660
|
+
collapsedWidth: `${pA(o)}px`,
|
|
661
661
|
children: [
|
|
662
|
-
|
|
663
|
-
/* @__PURE__ */ A(
|
|
664
|
-
|
|
662
|
+
c && /* @__PURE__ */ A(yA, { children: c }),
|
|
663
|
+
/* @__PURE__ */ A(TA, { style: { overflowY: "auto", overflowX: "hidden", height: n }, children: /* @__PURE__ */ A(Te, { rootStyles: { background: u }, menuItemStyles: s, closeOnClick: !0, children: i && /* @__PURE__ */ A(yA, { children: i }) }) }),
|
|
664
|
+
l && /* @__PURE__ */ A(yA, { children: l })
|
|
665
665
|
]
|
|
666
666
|
}
|
|
667
667
|
);
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function be({
|
|
670
670
|
itemCount: e = 8,
|
|
671
|
-
collapsed:
|
|
672
|
-
backgroundColor:
|
|
671
|
+
collapsed: r = !1,
|
|
672
|
+
backgroundColor: t
|
|
673
673
|
}) {
|
|
674
|
-
const
|
|
675
|
-
return
|
|
676
|
-
|
|
674
|
+
const o = hA(), { colorScheme: s } = oA(), i = t ?? (s === "dark" ? o.colors.dark[7] : o.white);
|
|
675
|
+
return r ? /* @__PURE__ */ A(
|
|
676
|
+
Z,
|
|
677
677
|
{
|
|
678
678
|
gap: "sm",
|
|
679
679
|
p: "xs",
|
|
680
680
|
align: "center",
|
|
681
681
|
style: {
|
|
682
|
-
backgroundColor:
|
|
682
|
+
backgroundColor: i,
|
|
683
683
|
width: "100%",
|
|
684
684
|
height: "100%"
|
|
685
685
|
},
|
|
686
686
|
children: Array.from({ length: e }).map((a, n) => /* @__PURE__ */ A(
|
|
687
|
-
|
|
687
|
+
aA,
|
|
688
688
|
{
|
|
689
689
|
height: 32,
|
|
690
690
|
width: 32,
|
|
@@ -694,19 +694,19 @@ function ZA({
|
|
|
694
694
|
))
|
|
695
695
|
}
|
|
696
696
|
) : /* @__PURE__ */ A(
|
|
697
|
-
|
|
697
|
+
Z,
|
|
698
698
|
{
|
|
699
699
|
gap: "xs",
|
|
700
700
|
p: "md",
|
|
701
701
|
style: {
|
|
702
|
-
backgroundColor:
|
|
702
|
+
backgroundColor: i,
|
|
703
703
|
flex: 1,
|
|
704
704
|
width: "100%",
|
|
705
705
|
height: "100%"
|
|
706
706
|
},
|
|
707
|
-
children: Array.from({ length: e }).map((a, n) => /* @__PURE__ */
|
|
707
|
+
children: Array.from({ length: e }).map((a, n) => /* @__PURE__ */ R(wA, { gap: "sm", wrap: "nowrap", children: [
|
|
708
708
|
/* @__PURE__ */ A(
|
|
709
|
-
|
|
709
|
+
aA,
|
|
710
710
|
{
|
|
711
711
|
height: 24,
|
|
712
712
|
width: 24,
|
|
@@ -714,7 +714,7 @@ function ZA({
|
|
|
714
714
|
}
|
|
715
715
|
),
|
|
716
716
|
/* @__PURE__ */ A(
|
|
717
|
-
|
|
717
|
+
aA,
|
|
718
718
|
{
|
|
719
719
|
height: 18,
|
|
720
720
|
radius: "xl",
|
|
@@ -725,27 +725,27 @@ function ZA({
|
|
|
725
725
|
}
|
|
726
726
|
);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function ro({
|
|
729
729
|
groupCount: e = 3,
|
|
730
|
-
width:
|
|
731
|
-
height:
|
|
732
|
-
backgroundColor:
|
|
730
|
+
width: r = "80px",
|
|
731
|
+
height: t = "100%",
|
|
732
|
+
backgroundColor: o
|
|
733
733
|
}) {
|
|
734
|
-
const
|
|
734
|
+
const s = hA(), { colorScheme: i } = oA(), a = o ?? (i === "dark" ? s.colors.dark[6] : s.colors.gray[2]);
|
|
735
735
|
return /* @__PURE__ */ A(
|
|
736
|
-
|
|
736
|
+
Z,
|
|
737
737
|
{
|
|
738
738
|
gap: "md",
|
|
739
739
|
p: "xs",
|
|
740
740
|
align: "center",
|
|
741
741
|
style: {
|
|
742
|
-
width:
|
|
743
|
-
height:
|
|
742
|
+
width: r,
|
|
743
|
+
height: t,
|
|
744
744
|
backgroundColor: a
|
|
745
745
|
},
|
|
746
|
-
children: Array.from({ length: e }).map((n,
|
|
746
|
+
children: Array.from({ length: e }).map((n, c) => /* @__PURE__ */ R(Z, { gap: 4, align: "center", children: [
|
|
747
747
|
/* @__PURE__ */ A(
|
|
748
|
-
|
|
748
|
+
aA,
|
|
749
749
|
{
|
|
750
750
|
height: 48,
|
|
751
751
|
width: 48,
|
|
@@ -754,93 +754,93 @@ function Nr({
|
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
756
|
/* @__PURE__ */ A(
|
|
757
|
-
|
|
757
|
+
aA,
|
|
758
758
|
{
|
|
759
759
|
height: 10,
|
|
760
760
|
width: 40,
|
|
761
761
|
radius: "xl"
|
|
762
762
|
}
|
|
763
763
|
)
|
|
764
|
-
] },
|
|
764
|
+
] }, c))
|
|
765
765
|
}
|
|
766
766
|
);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function me({
|
|
769
769
|
message: e,
|
|
770
|
-
backgroundColor:
|
|
771
|
-
children:
|
|
770
|
+
backgroundColor: r,
|
|
771
|
+
children: t
|
|
772
772
|
}) {
|
|
773
|
-
const
|
|
774
|
-
return
|
|
775
|
-
/* @__PURE__ */ A(
|
|
776
|
-
/* @__PURE__ */ A(
|
|
773
|
+
const o = hA(), { colorScheme: s } = oA(), i = r ?? (s === "dark" ? o.colors.dark[7] : o.white), a = s === "dark" ? o.colors.red[4] : o.colors.red[6];
|
|
774
|
+
return t ? /* @__PURE__ */ A(yA, { children: t }) : /* @__PURE__ */ A(FA, { p: "md", style: { backgroundColor: i, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(Z, { align: "center", gap: "xs", children: [
|
|
775
|
+
/* @__PURE__ */ A(Ze, { size: 32, color: a }),
|
|
776
|
+
/* @__PURE__ */ A(LA, { size: "sm", c: a, ta: "center", children: e })
|
|
777
777
|
] }) });
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function oo({
|
|
780
780
|
navigationData: e,
|
|
781
|
-
sidebarGroupWidth:
|
|
782
|
-
sidebarWidth:
|
|
783
|
-
sidebarHeight:
|
|
784
|
-
sidebarCollapsedWidth:
|
|
785
|
-
selectedGroupColor:
|
|
781
|
+
sidebarGroupWidth: r = "80px",
|
|
782
|
+
sidebarWidth: t = "360px",
|
|
783
|
+
sidebarHeight: o = "calc(100vh - var(--app-shell-header-offset, 0px))",
|
|
784
|
+
sidebarCollapsedWidth: s = "60px",
|
|
785
|
+
selectedGroupColor: i,
|
|
786
786
|
groupColor: a,
|
|
787
787
|
backgroundGroupColor: n,
|
|
788
|
-
isHidden:
|
|
789
|
-
sideBarFooterHeight:
|
|
790
|
-
sideBarFooterContent:
|
|
791
|
-
groupLabelDarkColor:
|
|
792
|
-
groupLabelLightColor:
|
|
793
|
-
collapsed:
|
|
788
|
+
isHidden: c = !1,
|
|
789
|
+
sideBarFooterHeight: l,
|
|
790
|
+
sideBarFooterContent: u,
|
|
791
|
+
groupLabelDarkColor: d,
|
|
792
|
+
groupLabelLightColor: h,
|
|
793
|
+
collapsed: f,
|
|
794
794
|
onMenuItemClick: y,
|
|
795
|
-
onClickActionIcon:
|
|
796
|
-
withBorder:
|
|
797
|
-
showGroupLabels:
|
|
798
|
-
theme:
|
|
799
|
-
sidebarRef:
|
|
800
|
-
defaultGroupIcon:
|
|
801
|
-
selectedGroupName:
|
|
802
|
-
sideBarHeaderContent:
|
|
803
|
-
iconsWithBackground:
|
|
804
|
-
menuItemHeight:
|
|
795
|
+
onClickActionIcon: w,
|
|
796
|
+
withBorder: m = !1,
|
|
797
|
+
showGroupLabels: p = !0,
|
|
798
|
+
theme: g,
|
|
799
|
+
sidebarRef: S,
|
|
800
|
+
defaultGroupIcon: v,
|
|
801
|
+
selectedGroupName: C,
|
|
802
|
+
sideBarHeaderContent: P,
|
|
803
|
+
iconsWithBackground: N = !1,
|
|
804
|
+
menuItemHeight: j = 40,
|
|
805
805
|
highlightActiveMenuItem: J = !0,
|
|
806
|
-
backgroundDarkColor:
|
|
807
|
-
backgroundLightColor:
|
|
808
|
-
textDarkColor:
|
|
809
|
-
textLightColor:
|
|
810
|
-
iconDarkColor:
|
|
811
|
-
iconLightColor:
|
|
812
|
-
collapsedSubmenuWidth:
|
|
813
|
-
isLoading:
|
|
814
|
-
loadingError:
|
|
815
|
-
loadingComponent:
|
|
816
|
-
errorComponent:
|
|
817
|
-
skeletonItemCount:
|
|
818
|
-
skeletonGroupCount:
|
|
806
|
+
backgroundDarkColor: D,
|
|
807
|
+
backgroundLightColor: M,
|
|
808
|
+
textDarkColor: F,
|
|
809
|
+
textLightColor: Q,
|
|
810
|
+
iconDarkColor: T,
|
|
811
|
+
iconLightColor: x,
|
|
812
|
+
collapsedSubmenuWidth: I,
|
|
813
|
+
isLoading: Y = !1,
|
|
814
|
+
loadingError: q,
|
|
815
|
+
loadingComponent: k,
|
|
816
|
+
errorComponent: b,
|
|
817
|
+
skeletonItemCount: E = 8,
|
|
818
|
+
skeletonGroupCount: O = 3
|
|
819
819
|
}) {
|
|
820
|
-
const [
|
|
821
|
-
const
|
|
822
|
-
return e.forEach((
|
|
823
|
-
if (
|
|
824
|
-
let
|
|
825
|
-
|
|
826
|
-
icon:
|
|
820
|
+
const [G, L] = uA(""), z = ee(), fA = UA(), { colorScheme: B } = oA(), tA = B === "dark" ? D ?? g.colors.dark[7] : M ?? g.white, eA = i || (B === "dark" ? g.colors[g.primaryColor][8] : g.colors[g.primaryColor][0]), sA = B === "dark" ? F ?? "var(--mantine-color-text)" : Q ?? "var(--mantine-color-text)", K = B === "dark" ? T ?? g.colors[g.primaryColor][0] : x ?? g.colors[g.primaryColor][7], rA = cA(() => {
|
|
821
|
+
const dA = /* @__PURE__ */ new Set();
|
|
822
|
+
return e.forEach(($) => {
|
|
823
|
+
if ($.showInSidebar && (!$.disabled || !$.hideDisabledItem)) {
|
|
824
|
+
let bA = !1;
|
|
825
|
+
$.group || ($.group = {
|
|
826
|
+
icon: v || /* @__PURE__ */ A(xe, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
827
827
|
label: "Default",
|
|
828
828
|
name: "Default",
|
|
829
829
|
hint: "Default",
|
|
830
830
|
indexOrder: 0
|
|
831
|
-
}),
|
|
832
|
-
|
|
833
|
-
}),
|
|
834
|
-
name:
|
|
835
|
-
indexOrder:
|
|
831
|
+
}), dA.forEach((lA) => {
|
|
832
|
+
lA.name === $.group.name && (bA = !0);
|
|
833
|
+
}), bA || dA.add({
|
|
834
|
+
name: $.group.name,
|
|
835
|
+
indexOrder: $.group.indexOrder,
|
|
836
836
|
component: /* @__PURE__ */ A(
|
|
837
|
-
|
|
837
|
+
vA,
|
|
838
838
|
{
|
|
839
|
-
content:
|
|
840
|
-
label:
|
|
841
|
-
disabled:
|
|
842
|
-
children: /* @__PURE__ */
|
|
843
|
-
|
|
839
|
+
content: $.group.hint,
|
|
840
|
+
label: $.group.label,
|
|
841
|
+
disabled: p,
|
|
842
|
+
children: /* @__PURE__ */ R(
|
|
843
|
+
Z,
|
|
844
844
|
{
|
|
845
845
|
gap: "2px",
|
|
846
846
|
style: {
|
|
@@ -851,434 +851,2048 @@ function Ae({
|
|
|
851
851
|
},
|
|
852
852
|
children: [
|
|
853
853
|
/* @__PURE__ */ A(
|
|
854
|
-
|
|
854
|
+
EA,
|
|
855
855
|
{
|
|
856
856
|
size: "48px",
|
|
857
|
-
variant:
|
|
858
|
-
color:
|
|
857
|
+
variant: $.group.name === G ? "filled" : n ? "subtle" : "light",
|
|
858
|
+
color: $.group.name === G ? eA : a,
|
|
859
859
|
onClick: () => {
|
|
860
|
-
|
|
860
|
+
L((lA) => (w && w(lA, $.group.name), $.group.name === lA && !c ? "" : $.group.name));
|
|
861
861
|
},
|
|
862
|
-
children:
|
|
862
|
+
children: $.group.icon
|
|
863
863
|
}
|
|
864
864
|
),
|
|
865
|
-
|
|
866
|
-
|
|
865
|
+
p ? /* @__PURE__ */ A(
|
|
866
|
+
LA,
|
|
867
867
|
{
|
|
868
868
|
size: "xs",
|
|
869
|
-
c:
|
|
870
|
-
children:
|
|
869
|
+
c: B === "dark" ? d || g.colors[g.primaryColor][2] : h || g.colors[g.primaryColor][2],
|
|
870
|
+
children: $.group.label
|
|
871
871
|
}
|
|
872
872
|
) : !1
|
|
873
873
|
]
|
|
874
874
|
}
|
|
875
875
|
)
|
|
876
876
|
},
|
|
877
|
-
|
|
877
|
+
$.group.name
|
|
878
878
|
)
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
}),
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
}), [...
|
|
885
|
-
}, [e,
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
881
|
+
}), dA.forEach(($) => {
|
|
882
|
+
const bA = e.filter((lA) => lA.showInSidebar === !0 && (!lA.disabled || !lA.hideDisabledItem) && lA.group && lA.group.name === $.name);
|
|
883
|
+
$.links = bA.map((lA, BA) => ge(g, f, y, lA, BA, N, fA.pathname, J, sA, I));
|
|
884
|
+
}), [...dA].sort(($, bA) => $.indexOrder - bA.indexOrder);
|
|
885
|
+
}, [e, G, B, f, z.selectedCompany, J, fA]), CA = Ao(
|
|
886
|
+
B,
|
|
887
|
+
g,
|
|
888
|
+
f,
|
|
889
889
|
35,
|
|
890
|
-
Number(
|
|
891
|
-
|
|
892
|
-
|
|
890
|
+
Number(pA(s)),
|
|
891
|
+
rA.length > 1,
|
|
892
|
+
N,
|
|
893
|
+
j,
|
|
893
894
|
tA,
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
k && aA.map((Y) => Y.name).includes(k) ? S(k) : aA.length > 1 && S("Default");
|
|
895
|
+
sA,
|
|
896
|
+
K
|
|
897
|
+
), kA = f || G === "" ? "0px" : `calc(${t} - ${r})`, SA = n || (B === "dark" ? g.colors[g.primaryColor][6] : g.colors[g.primaryColor][7]), V = H(() => {
|
|
898
|
+
C && rA.map((dA) => dA.name).includes(C) ? L(C) : rA.length > 1 && L("Default");
|
|
899
899
|
}, []);
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}, []),
|
|
903
|
-
|
|
904
|
-
}, [
|
|
905
|
-
const
|
|
906
|
-
|
|
900
|
+
iA(() => {
|
|
901
|
+
V();
|
|
902
|
+
}, []), iA(() => {
|
|
903
|
+
f ? L("") : G === "" && V();
|
|
904
|
+
}, [f]);
|
|
905
|
+
const nA = () => q ? b || /* @__PURE__ */ A(
|
|
906
|
+
me,
|
|
907
907
|
{
|
|
908
|
-
message:
|
|
909
|
-
backgroundColor:
|
|
908
|
+
message: q,
|
|
909
|
+
backgroundColor: tA
|
|
910
910
|
}
|
|
911
|
-
) :
|
|
912
|
-
|
|
911
|
+
) : Y ? k || /* @__PURE__ */ A(
|
|
912
|
+
be,
|
|
913
913
|
{
|
|
914
|
-
itemCount:
|
|
915
|
-
collapsed:
|
|
916
|
-
backgroundColor:
|
|
914
|
+
itemCount: E,
|
|
915
|
+
collapsed: f,
|
|
916
|
+
backgroundColor: tA
|
|
917
917
|
}
|
|
918
|
-
) :
|
|
919
|
-
|
|
918
|
+
) : G !== "" ? /* @__PURE__ */ A(
|
|
919
|
+
De,
|
|
920
920
|
{
|
|
921
|
-
ref:
|
|
921
|
+
ref: S,
|
|
922
922
|
rootStyles: {
|
|
923
|
-
[`.${
|
|
924
|
-
background:
|
|
923
|
+
[`.${ze.container}`]: {
|
|
924
|
+
background: tA,
|
|
925
925
|
overflowX: "hidden",
|
|
926
926
|
overflowY: "hidden",
|
|
927
927
|
left: 0,
|
|
928
|
-
height: `${
|
|
928
|
+
height: `${pA(o)}px`
|
|
929
929
|
}
|
|
930
930
|
},
|
|
931
|
-
style: { borderColor:
|
|
932
|
-
collapsed:
|
|
933
|
-
width: `${
|
|
931
|
+
style: { borderColor: B === "dark" ? "#000" : "#efefef" },
|
|
932
|
+
collapsed: f,
|
|
933
|
+
width: `${pA(kA)}`,
|
|
934
934
|
collapsedWidth: "0px",
|
|
935
935
|
children: /* @__PURE__ */ A(
|
|
936
|
-
|
|
936
|
+
TA,
|
|
937
937
|
{
|
|
938
938
|
style: {
|
|
939
939
|
overflowY: "auto",
|
|
940
940
|
overflowX: "hidden",
|
|
941
941
|
height: "100%",
|
|
942
|
-
width:
|
|
942
|
+
width: kA
|
|
943
943
|
},
|
|
944
|
-
children: /* @__PURE__ */ A(
|
|
944
|
+
children: /* @__PURE__ */ A(Te, { rootStyles: { background: tA }, menuItemStyles: CA, closeOnClick: !0, children: rA.find((dA) => dA.name === G)?.links || null })
|
|
945
945
|
}
|
|
946
946
|
)
|
|
947
947
|
}
|
|
948
|
-
) : null,
|
|
949
|
-
|
|
948
|
+
) : null, zA = () => Y && rA.length === 0 ? /* @__PURE__ */ A(
|
|
949
|
+
ro,
|
|
950
950
|
{
|
|
951
|
-
groupCount:
|
|
952
|
-
width:
|
|
953
|
-
height:
|
|
951
|
+
groupCount: O,
|
|
952
|
+
width: r,
|
|
953
|
+
height: o
|
|
954
954
|
}
|
|
955
|
-
) :
|
|
956
|
-
|
|
955
|
+
) : rA.length !== 0 ? /* @__PURE__ */ A(
|
|
956
|
+
Z,
|
|
957
957
|
{
|
|
958
958
|
gap: "4px",
|
|
959
959
|
style: {
|
|
960
|
-
height:
|
|
961
|
-
width:
|
|
960
|
+
height: o,
|
|
961
|
+
width: r,
|
|
962
962
|
padding: "4px",
|
|
963
|
-
backgroundColor:
|
|
963
|
+
backgroundColor: SA
|
|
964
964
|
},
|
|
965
|
-
children:
|
|
965
|
+
children: rA.map((dA) => /* @__PURE__ */ A(gA.Fragment, { children: dA.component }, dA.name))
|
|
966
966
|
}
|
|
967
|
-
) : null,
|
|
968
|
-
|
|
967
|
+
) : null, RA = () => q ? b || /* @__PURE__ */ A(
|
|
968
|
+
me,
|
|
969
969
|
{
|
|
970
|
-
message:
|
|
971
|
-
backgroundColor:
|
|
970
|
+
message: q,
|
|
971
|
+
backgroundColor: tA
|
|
972
972
|
}
|
|
973
|
-
) :
|
|
974
|
-
|
|
973
|
+
) : Y ? k || /* @__PURE__ */ A(
|
|
974
|
+
be,
|
|
975
975
|
{
|
|
976
|
-
itemCount:
|
|
977
|
-
collapsed:
|
|
978
|
-
backgroundColor:
|
|
976
|
+
itemCount: E,
|
|
977
|
+
collapsed: f,
|
|
978
|
+
backgroundColor: tA
|
|
979
979
|
}
|
|
980
980
|
) : e.map(
|
|
981
|
-
(
|
|
981
|
+
(dA, _) => ge(g, f, y, dA, _, N, fA.pathname, J, sA, I)
|
|
982
982
|
);
|
|
983
|
-
return /* @__PURE__ */ A(
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
c,
|
|
983
|
+
return /* @__PURE__ */ A(yA, { children: rA.length == 1 ? eo(
|
|
984
|
+
S,
|
|
985
|
+
f,
|
|
987
986
|
t,
|
|
988
|
-
SA,
|
|
989
|
-
iA(),
|
|
990
|
-
u,
|
|
991
|
-
r,
|
|
992
|
-
R,
|
|
993
987
|
s,
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
988
|
+
CA,
|
|
989
|
+
RA(),
|
|
990
|
+
c,
|
|
991
|
+
o,
|
|
992
|
+
P,
|
|
993
|
+
u,
|
|
994
|
+
tA
|
|
995
|
+
) : /* @__PURE__ */ R(QA, { direction: "column", w: f ? s : t, children: [
|
|
996
|
+
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: P }),
|
|
997
|
+
/* @__PURE__ */ R(Ke, { withBorder: m, h: o, w: "100%", display: "flex", children: [
|
|
998
|
+
zA(),
|
|
999
|
+
nA()
|
|
1000
1000
|
] }),
|
|
1001
|
-
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children:
|
|
1001
|
+
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: u })
|
|
1002
1002
|
] }) });
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1004
|
+
const ne = NA(null);
|
|
1005
|
+
function te() {
|
|
1006
|
+
const e = xA(ne);
|
|
1007
|
+
if (!e)
|
|
1008
|
+
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
1009
|
+
return e;
|
|
1010
|
+
}
|
|
1011
|
+
function an() {
|
|
1012
|
+
return xA(ne);
|
|
1013
|
+
}
|
|
1014
|
+
function se({
|
|
1015
|
+
children: e,
|
|
1016
|
+
navigationData: r,
|
|
1017
|
+
variant: t = "standard",
|
|
1018
|
+
defaultCollapsed: o = !1,
|
|
1019
|
+
collapsed: s,
|
|
1020
|
+
onCollapsedChange: i,
|
|
1021
|
+
defaultActiveGroup: a = "",
|
|
1022
|
+
activeGroup: n,
|
|
1023
|
+
onActiveGroupChange: c,
|
|
1024
|
+
showKeyboardShortcuts: l = !1,
|
|
1025
|
+
highlightActiveItem: u = !0,
|
|
1026
|
+
onMenuItemClick: d
|
|
1027
|
+
}) {
|
|
1028
|
+
const h = UA(), f = GA(), [y, w] = KA({
|
|
1029
|
+
value: s,
|
|
1030
|
+
defaultValue: o,
|
|
1031
|
+
finalValue: !1,
|
|
1032
|
+
onChange: i
|
|
1033
|
+
}), [m, p] = KA({
|
|
1034
|
+
value: n,
|
|
1035
|
+
defaultValue: a,
|
|
1036
|
+
finalValue: "",
|
|
1037
|
+
onChange: c
|
|
1038
|
+
}), [g, S] = uA(""), [v, C] = uA(() => {
|
|
1039
|
+
const T = /* @__PURE__ */ new Set();
|
|
1040
|
+
return r.forEach((x, I) => {
|
|
1041
|
+
x.initiallyOpened && x.links && x.links.length > 0 && T.add(`group-${I}`);
|
|
1042
|
+
}), T;
|
|
1043
|
+
}), P = h.pathname, N = H(() => {
|
|
1044
|
+
w(!y);
|
|
1045
|
+
}, [y, w]), j = H((T) => {
|
|
1046
|
+
C((x) => {
|
|
1047
|
+
const I = new Set(x);
|
|
1048
|
+
return I.has(T) ? I.delete(T) : I.add(T), I;
|
|
1049
|
+
});
|
|
1050
|
+
}, []), J = H((T) => {
|
|
1051
|
+
C((x) => {
|
|
1052
|
+
const I = new Set(x);
|
|
1053
|
+
return I.add(T), I;
|
|
1054
|
+
});
|
|
1055
|
+
}, []), D = H((T) => {
|
|
1056
|
+
C((x) => {
|
|
1057
|
+
const I = new Set(x);
|
|
1058
|
+
return I.delete(T), I;
|
|
1059
|
+
});
|
|
1060
|
+
}, []), M = cA(() => {
|
|
1061
|
+
if (!g.trim())
|
|
1062
|
+
return r;
|
|
1063
|
+
const T = g.toLowerCase().trim(), x = (I) => I.reduce((Y, q) => {
|
|
1064
|
+
const k = q.label.toLowerCase().includes(T), b = q.links ? x(q.links) : [];
|
|
1065
|
+
return (k || b.length > 0) && Y.push({
|
|
1066
|
+
...q,
|
|
1067
|
+
links: b.length > 0 ? b : q.links,
|
|
1068
|
+
// Expandir automaticamente quando há match em subitens
|
|
1069
|
+
initiallyOpened: b.length > 0 || k
|
|
1070
|
+
}), Y;
|
|
1071
|
+
}, []);
|
|
1072
|
+
return x(r);
|
|
1073
|
+
}, [r, g]), F = H(
|
|
1074
|
+
(T) => {
|
|
1075
|
+
d && d(T), T.link && (T.routeParams ? f(T.link, { state: T.routeParams }) : f(T.link)), T.redirect && f(T.redirect);
|
|
1076
|
+
},
|
|
1077
|
+
[f, d]
|
|
1078
|
+
), Q = cA(
|
|
1079
|
+
() => ({
|
|
1080
|
+
collapsed: y,
|
|
1081
|
+
setCollapsed: w,
|
|
1082
|
+
toggleCollapsed: N,
|
|
1083
|
+
activeGroup: m,
|
|
1084
|
+
setActiveGroup: p,
|
|
1085
|
+
activeItemPath: P,
|
|
1086
|
+
navigateToItem: F,
|
|
1087
|
+
searchQuery: g,
|
|
1088
|
+
setSearchQuery: S,
|
|
1089
|
+
filteredItems: M,
|
|
1090
|
+
expandedGroups: v,
|
|
1091
|
+
toggleGroup: j,
|
|
1092
|
+
expandGroup: J,
|
|
1093
|
+
collapseGroup: D,
|
|
1094
|
+
variant: t,
|
|
1095
|
+
showKeyboardShortcuts: l,
|
|
1096
|
+
highlightActiveItem: u
|
|
1097
|
+
}),
|
|
1098
|
+
[
|
|
1099
|
+
y,
|
|
1100
|
+
w,
|
|
1101
|
+
N,
|
|
1102
|
+
m,
|
|
1103
|
+
p,
|
|
1104
|
+
P,
|
|
1105
|
+
F,
|
|
1106
|
+
g,
|
|
1107
|
+
M,
|
|
1108
|
+
v,
|
|
1109
|
+
j,
|
|
1110
|
+
J,
|
|
1111
|
+
D,
|
|
1112
|
+
t,
|
|
1113
|
+
l,
|
|
1114
|
+
u
|
|
1115
|
+
]
|
|
1116
|
+
);
|
|
1117
|
+
return /* @__PURE__ */ A(ne.Provider, { value: Q, children: e });
|
|
1118
|
+
}
|
|
1119
|
+
function le({
|
|
1120
|
+
navigationData: e,
|
|
1121
|
+
onMenuItemClick: r
|
|
1122
|
+
}) {
|
|
1123
|
+
const t = UA(), o = GA(), s = t.pathname, i = H(
|
|
1124
|
+
(d) => {
|
|
1125
|
+
for (const h of d) {
|
|
1126
|
+
if (h.link === s)
|
|
1127
|
+
return h;
|
|
1128
|
+
if (h.links) {
|
|
1129
|
+
const f = i(h.links);
|
|
1130
|
+
if (f)
|
|
1131
|
+
return f;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return null;
|
|
1135
|
+
},
|
|
1136
|
+
[s]
|
|
1137
|
+
), a = cA(() => i(e), [i, e]), n = H(
|
|
1138
|
+
(d) => d.link === s,
|
|
1139
|
+
[s]
|
|
1140
|
+
), c = H(
|
|
1141
|
+
(d) => d.link === s ? !0 : d.links ? d.links.some((h) => c(h)) : !1,
|
|
1142
|
+
[s]
|
|
1143
|
+
), l = cA(() => {
|
|
1144
|
+
const d = [], h = (f, y) => {
|
|
1145
|
+
for (const w of f) {
|
|
1146
|
+
const m = [...y, w];
|
|
1147
|
+
if (w.link === s)
|
|
1148
|
+
return d.push(...m), !0;
|
|
1149
|
+
if (w.links && h(w.links, m))
|
|
1150
|
+
return !0;
|
|
1151
|
+
}
|
|
1152
|
+
return !1;
|
|
1153
|
+
};
|
|
1154
|
+
return h(e, []), d;
|
|
1155
|
+
}, [e, s]), u = H(
|
|
1156
|
+
(d) => {
|
|
1157
|
+
(typeof d.disabled == "function" ? d.disabled() : d.disabled) || (r && r(d), d.link && (d.routeParams ? o(d.link, { state: d.routeParams }) : o(d.link)), d.redirect && o(d.redirect));
|
|
1158
|
+
},
|
|
1159
|
+
[o, r]
|
|
1160
|
+
);
|
|
1161
|
+
return {
|
|
1162
|
+
activeItem: a,
|
|
1163
|
+
currentPath: s,
|
|
1164
|
+
navigateToItem: u,
|
|
1165
|
+
isItemActive: n,
|
|
1166
|
+
isItemOrChildActive: c,
|
|
1167
|
+
activeBreadcrumb: l
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
function no({
|
|
1171
|
+
navigationData: e,
|
|
1172
|
+
onSearch: r
|
|
1173
|
+
}) {
|
|
1174
|
+
const [t, o] = uA(""), s = H((l) => l.reduce((u, d) => {
|
|
1175
|
+
let h = 1;
|
|
1176
|
+
return d.links && (h += s(d.links)), u + h;
|
|
1177
|
+
}, 0), []), i = cA(() => {
|
|
1178
|
+
if (!t.trim())
|
|
1179
|
+
return e;
|
|
1180
|
+
const l = t.toLowerCase().trim(), u = (d) => d.reduce((h, f) => {
|
|
1181
|
+
if (!f.showInSidebar)
|
|
1182
|
+
return h;
|
|
1183
|
+
const y = f.label.toLowerCase().includes(l), w = f.links ? u(f.links) : [];
|
|
1184
|
+
return (y || w.length > 0) && h.push({
|
|
1185
|
+
...f,
|
|
1186
|
+
links: w.length > 0 ? w : f.links,
|
|
1187
|
+
// Expandir automaticamente grupos com match
|
|
1188
|
+
initiallyOpened: !0
|
|
1189
|
+
}), h;
|
|
1190
|
+
}, []);
|
|
1191
|
+
return u(e);
|
|
1192
|
+
}, [e, t]), a = cA(() => t.trim() ? s(i) : s(e), [t, e, i, s]), n = H(
|
|
1193
|
+
(l) => {
|
|
1194
|
+
if (o(l), r) {
|
|
1195
|
+
const u = l.toLowerCase().trim();
|
|
1196
|
+
if (!u)
|
|
1197
|
+
r(l, e);
|
|
1198
|
+
else {
|
|
1199
|
+
const d = (h) => h.reduce((f, y) => {
|
|
1200
|
+
if (!y.showInSidebar)
|
|
1201
|
+
return f;
|
|
1202
|
+
const w = y.label.toLowerCase().includes(u), m = y.links ? d(y.links) : [];
|
|
1203
|
+
return (w || m.length > 0) && f.push({
|
|
1204
|
+
...y,
|
|
1205
|
+
links: m.length > 0 ? m : y.links,
|
|
1206
|
+
initiallyOpened: !0
|
|
1207
|
+
}), f;
|
|
1208
|
+
}, []);
|
|
1209
|
+
r(l, d(e));
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
[e, r]
|
|
1214
|
+
), c = H(() => {
|
|
1215
|
+
n("");
|
|
1216
|
+
}, [n]);
|
|
1217
|
+
return {
|
|
1218
|
+
query: t,
|
|
1219
|
+
setQuery: n,
|
|
1220
|
+
clearSearch: c,
|
|
1221
|
+
filteredItems: i,
|
|
1222
|
+
hasResults: i.length > 0,
|
|
1223
|
+
isSearching: t.trim().length > 0,
|
|
1224
|
+
totalResults: a
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
function to(e) {
|
|
1228
|
+
return e.toLowerCase().replace("ctrl+", "mod+").replace("cmd+", "mod+").replace("control+", "mod+");
|
|
1229
|
+
}
|
|
1230
|
+
function ie({
|
|
1231
|
+
navigationData: e,
|
|
1232
|
+
navigateToItem: r,
|
|
1233
|
+
onToggleSidebar: t,
|
|
1234
|
+
enabled: o = !0
|
|
1235
|
+
}) {
|
|
1236
|
+
const s = cA(() => {
|
|
1237
|
+
const c = /* @__PURE__ */ new Map(), l = (u) => {
|
|
1238
|
+
u.forEach((d) => {
|
|
1239
|
+
const h = d;
|
|
1240
|
+
h.shortcut && c.set(h.shortcut, d), d.links && l(d.links);
|
|
1241
|
+
});
|
|
1242
|
+
};
|
|
1243
|
+
return l(e), c;
|
|
1244
|
+
}, [e]), i = H(
|
|
1245
|
+
(c) => !!c.shortcut,
|
|
1246
|
+
[]
|
|
1247
|
+
), a = H(
|
|
1248
|
+
(c) => c.shortcut,
|
|
1249
|
+
[]
|
|
1250
|
+
), n = cA(() => {
|
|
1251
|
+
if (!o)
|
|
1252
|
+
return [];
|
|
1253
|
+
const c = [];
|
|
1254
|
+
return t && c.push(["mod+b", t]), s.forEach((l, u) => {
|
|
1255
|
+
const d = to(u);
|
|
1256
|
+
c.push([
|
|
1257
|
+
d,
|
|
1258
|
+
() => {
|
|
1259
|
+
(typeof l.disabled == "function" ? l.disabled() : l.disabled) || r(l);
|
|
1260
|
+
}
|
|
1261
|
+
]);
|
|
1262
|
+
}), c;
|
|
1263
|
+
}, [o, s, r, t]);
|
|
1264
|
+
return Ue(n), {
|
|
1265
|
+
shortcuts: s,
|
|
1266
|
+
hasShortcut: i,
|
|
1267
|
+
getShortcut: a
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
function DA({
|
|
1271
|
+
item: e,
|
|
1272
|
+
depth: r = 0,
|
|
1273
|
+
collapsed: t = !1,
|
|
1274
|
+
active: o = !1,
|
|
1275
|
+
onClick: s,
|
|
1276
|
+
textColor: i,
|
|
1277
|
+
iconColor: a,
|
|
1278
|
+
hoverColor: n,
|
|
1279
|
+
itemHeight: c = 40
|
|
1280
|
+
}) {
|
|
1281
|
+
const l = hA(), { colorScheme: u } = oA(), d = e, [h, f] = uA(!1), y = i || "var(--mantine-color-text)", w = a || l.colors[l.primaryColor][6], m = n || l.colors[l.primaryColor][6], p = n ? `color-mix(in srgb, ${n} 80%, black)` : l.colors[l.primaryColor][8], g = h ? o ? p : m : o ? m : "transparent", S = h || o ? l.white : y, v = h || o ? l.white : w, C = typeof e.disabled == "function" ? e.disabled() : e.disabled;
|
|
1282
|
+
if (C && e.hideDisabledItem || !e.showInSidebar)
|
|
1283
|
+
return null;
|
|
1284
|
+
const P = H(() => {
|
|
1285
|
+
!C && s && s(e);
|
|
1286
|
+
}, [C, s, e]), N = IA.t(e.label), j = () => d.badge ? /* @__PURE__ */ A(_A, { size: "xs", color: d.badgeColor || "blue", variant: "filled", children: d.badge }) : null, J = () => d.shortcut ? /* @__PURE__ */ A(Ce, { size: "xs", style: { marginLeft: "auto" }, children: d.shortcut }) : null;
|
|
1287
|
+
if (e.links && e.links.length > 0) {
|
|
1288
|
+
const D = e.links.filter((M) => {
|
|
1289
|
+
const F = typeof M.disabled == "function" ? M.disabled() : M.disabled;
|
|
1290
|
+
return M.showInSidebar && (!F || !M.hideDisabledItem);
|
|
1291
|
+
});
|
|
1292
|
+
return D.length === 0 && C && e.hideDisabledItem ? null : t ? /* @__PURE__ */ R(
|
|
1293
|
+
AA,
|
|
1294
|
+
{
|
|
1295
|
+
position: "right-start",
|
|
1296
|
+
withArrow: !0,
|
|
1297
|
+
shadow: "md",
|
|
1298
|
+
trigger: "hover",
|
|
1299
|
+
openDelay: 100,
|
|
1300
|
+
closeDelay: 200,
|
|
1301
|
+
children: [
|
|
1302
|
+
/* @__PURE__ */ A(AA.Target, { children: /* @__PURE__ */ A(FA, { style: { width: "100%", padding: "8px 0" }, children: /* @__PURE__ */ A(vA, { label: N, position: "right", withArrow: !0, children: /* @__PURE__ */ A(
|
|
1303
|
+
U,
|
|
1304
|
+
{
|
|
1305
|
+
style: {
|
|
1306
|
+
color: w,
|
|
1307
|
+
cursor: "pointer",
|
|
1308
|
+
display: "flex",
|
|
1309
|
+
alignItems: "center",
|
|
1310
|
+
justifyContent: "center"
|
|
1311
|
+
},
|
|
1312
|
+
children: e.icon
|
|
1313
|
+
}
|
|
1314
|
+
) }) }) }),
|
|
1315
|
+
/* @__PURE__ */ R(AA.Dropdown, { children: [
|
|
1316
|
+
/* @__PURE__ */ A(AA.Label, { children: N }),
|
|
1317
|
+
D.map((M, F) => {
|
|
1318
|
+
const Q = typeof M.disabled == "function" ? M.disabled() : M.disabled;
|
|
1319
|
+
return /* @__PURE__ */ A(
|
|
1320
|
+
AA.Item,
|
|
1321
|
+
{
|
|
1322
|
+
leftSection: M.icon,
|
|
1323
|
+
disabled: Q,
|
|
1324
|
+
onClick: () => s?.(M),
|
|
1325
|
+
children: IA.t(M.label)
|
|
1326
|
+
},
|
|
1327
|
+
F
|
|
1328
|
+
);
|
|
1329
|
+
})
|
|
1330
|
+
] })
|
|
1331
|
+
]
|
|
1332
|
+
}
|
|
1333
|
+
) : /* @__PURE__ */ A(
|
|
1334
|
+
he,
|
|
1335
|
+
{
|
|
1336
|
+
label: N,
|
|
1337
|
+
leftSection: /* @__PURE__ */ A(U, { style: { color: v }, children: e.icon }),
|
|
1338
|
+
rightSection: /* @__PURE__ */ R(U, { style: { display: "flex", alignItems: "center", gap: 4, color: S }, children: [
|
|
1339
|
+
j(),
|
|
1340
|
+
/* @__PURE__ */ A(
|
|
1341
|
+
Ae,
|
|
1342
|
+
{
|
|
1343
|
+
size: 14,
|
|
1344
|
+
style: {
|
|
1345
|
+
transition: "transform 200ms ease"
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1349
|
+
] }),
|
|
1350
|
+
childrenOffset: 28,
|
|
1351
|
+
defaultOpened: e.initiallyOpened || o,
|
|
1352
|
+
disabled: C,
|
|
1353
|
+
onMouseEnter: () => f(!0),
|
|
1354
|
+
onMouseLeave: () => f(!1),
|
|
1355
|
+
style: {
|
|
1356
|
+
height: c,
|
|
1357
|
+
backgroundColor: g,
|
|
1358
|
+
transition: "background-color 150ms ease"
|
|
1359
|
+
},
|
|
1360
|
+
styles: {
|
|
1361
|
+
root: {
|
|
1362
|
+
borderRadius: 0
|
|
1363
|
+
},
|
|
1364
|
+
label: {
|
|
1365
|
+
color: S
|
|
1366
|
+
},
|
|
1367
|
+
children: {
|
|
1368
|
+
paddingLeft: 0
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
children: D.map((M, F) => /* @__PURE__ */ A(
|
|
1372
|
+
DA,
|
|
1373
|
+
{
|
|
1374
|
+
item: M,
|
|
1375
|
+
depth: r + 1,
|
|
1376
|
+
collapsed: t,
|
|
1377
|
+
active: o,
|
|
1378
|
+
onClick: s,
|
|
1379
|
+
textColor: i,
|
|
1380
|
+
iconColor: a,
|
|
1381
|
+
hoverColor: n,
|
|
1382
|
+
itemHeight: c
|
|
1383
|
+
},
|
|
1384
|
+
F
|
|
1385
|
+
))
|
|
1386
|
+
}
|
|
1387
|
+
);
|
|
1388
|
+
}
|
|
1389
|
+
return t ? /* @__PURE__ */ A(
|
|
1390
|
+
vA,
|
|
1391
|
+
{
|
|
1392
|
+
label: d.tooltip || N,
|
|
1393
|
+
position: "right",
|
|
1394
|
+
withArrow: !0,
|
|
1395
|
+
children: /* @__PURE__ */ A(
|
|
1396
|
+
FA,
|
|
1397
|
+
{
|
|
1398
|
+
style: {
|
|
1399
|
+
width: "100%",
|
|
1400
|
+
height: c,
|
|
1401
|
+
cursor: C ? "not-allowed" : "pointer",
|
|
1402
|
+
opacity: C ? 0.5 : 1,
|
|
1403
|
+
backgroundColor: o ? m : "transparent",
|
|
1404
|
+
transition: "background-color 150ms ease"
|
|
1405
|
+
},
|
|
1406
|
+
onClick: P,
|
|
1407
|
+
onMouseEnter: (D) => {
|
|
1408
|
+
C || (D.currentTarget.style.backgroundColor = o ? p : m);
|
|
1409
|
+
},
|
|
1410
|
+
onMouseLeave: (D) => {
|
|
1411
|
+
D.currentTarget.style.backgroundColor = o ? m : "transparent";
|
|
1412
|
+
},
|
|
1413
|
+
children: /* @__PURE__ */ A(U, { style: { color: o ? l.white : w }, children: e.icon })
|
|
1414
|
+
}
|
|
1415
|
+
)
|
|
1416
|
+
}
|
|
1417
|
+
) : /* @__PURE__ */ A(
|
|
1418
|
+
he,
|
|
1419
|
+
{
|
|
1420
|
+
label: N,
|
|
1421
|
+
leftSection: /* @__PURE__ */ A(U, { style: { color: v }, children: e.icon }),
|
|
1422
|
+
rightSection: /* @__PURE__ */ R(U, { style: { display: "flex", alignItems: "center", gap: 4, color: S }, children: [
|
|
1423
|
+
j(),
|
|
1424
|
+
J()
|
|
1425
|
+
] }),
|
|
1426
|
+
active: o,
|
|
1427
|
+
disabled: C,
|
|
1428
|
+
onClick: P,
|
|
1429
|
+
onMouseEnter: () => f(!0),
|
|
1430
|
+
onMouseLeave: () => f(!1),
|
|
1431
|
+
style: {
|
|
1432
|
+
height: c,
|
|
1433
|
+
paddingLeft: r > 0 ? r * 16 + 12 : void 0,
|
|
1434
|
+
backgroundColor: g,
|
|
1435
|
+
transition: "background-color 150ms ease"
|
|
1436
|
+
},
|
|
1437
|
+
styles: {
|
|
1438
|
+
root: {
|
|
1439
|
+
borderRadius: 0
|
|
1440
|
+
},
|
|
1441
|
+
label: {
|
|
1442
|
+
color: S
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
);
|
|
1447
|
+
}
|
|
1448
|
+
function so({
|
|
1449
|
+
label: e,
|
|
1450
|
+
icon: r,
|
|
1451
|
+
children: t,
|
|
1452
|
+
defaultExpanded: o = !0,
|
|
1453
|
+
expanded: s,
|
|
1454
|
+
onExpandedChange: i,
|
|
1455
|
+
groupId: a
|
|
1456
|
+
}) {
|
|
1457
|
+
const n = hA(), { colorScheme: c } = oA(), [l, u] = uA(o), d = s !== void 0, h = d ? s : l, f = H(() => {
|
|
1458
|
+
d ? i?.(!h) : u((g) => !g);
|
|
1459
|
+
}, [d, h, i]), y = c === "dark" ? n.colors.dark[6] : n.colors.gray[1], w = c === "dark" ? n.colors.dark[5] : n.colors.gray[2], m = c === "dark" ? n.colors.gray[4] : n.colors.gray[7], p = c === "dark" ? n.colors[n.primaryColor][4] : n.colors[n.primaryColor][6];
|
|
1460
|
+
return /* @__PURE__ */ R(U, { children: [
|
|
1461
|
+
/* @__PURE__ */ A(
|
|
1462
|
+
XA,
|
|
1463
|
+
{
|
|
1464
|
+
onClick: f,
|
|
1465
|
+
w: "100%",
|
|
1466
|
+
p: "xs",
|
|
1467
|
+
style: {
|
|
1468
|
+
borderRadius: n.radius.sm,
|
|
1469
|
+
backgroundColor: y,
|
|
1470
|
+
transition: "background-color 150ms ease"
|
|
1471
|
+
},
|
|
1472
|
+
styles: {
|
|
1473
|
+
root: {
|
|
1474
|
+
"&:hover": {
|
|
1475
|
+
backgroundColor: w
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
children: /* @__PURE__ */ R(wA, { justify: "space-between", wrap: "nowrap", children: [
|
|
1480
|
+
/* @__PURE__ */ R(wA, { gap: "xs", wrap: "nowrap", children: [
|
|
1481
|
+
r && /* @__PURE__ */ A(U, { style: { color: p }, children: r }),
|
|
1482
|
+
/* @__PURE__ */ A(LA, { size: "sm", fw: 600, c: m, children: e })
|
|
1483
|
+
] }),
|
|
1484
|
+
/* @__PURE__ */ A(
|
|
1485
|
+
_e,
|
|
1486
|
+
{
|
|
1487
|
+
size: 16,
|
|
1488
|
+
color: m,
|
|
1489
|
+
style: {
|
|
1490
|
+
transform: h ? "rotate(180deg)" : "rotate(0deg)",
|
|
1491
|
+
transition: "transform 200ms ease"
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
)
|
|
1495
|
+
] })
|
|
1496
|
+
}
|
|
1497
|
+
),
|
|
1498
|
+
/* @__PURE__ */ A(je, { in: h, children: /* @__PURE__ */ A(U, { mt: 4, children: t }) })
|
|
1499
|
+
] });
|
|
1500
|
+
}
|
|
1501
|
+
function cn({
|
|
1502
|
+
label: e,
|
|
1503
|
+
children: r
|
|
1504
|
+
}) {
|
|
1505
|
+
const t = hA(), { colorScheme: o } = oA(), s = o === "dark" ? t.colors.gray[5] : t.colors.gray[6];
|
|
1506
|
+
return /* @__PURE__ */ R(U, { children: [
|
|
1507
|
+
/* @__PURE__ */ A(
|
|
1508
|
+
LA,
|
|
1509
|
+
{
|
|
1510
|
+
size: "xs",
|
|
1511
|
+
fw: 700,
|
|
1512
|
+
c: s,
|
|
1513
|
+
tt: "uppercase",
|
|
1514
|
+
px: "sm",
|
|
1515
|
+
py: "xs",
|
|
1516
|
+
style: { letterSpacing: "0.5px" },
|
|
1517
|
+
children: e
|
|
1518
|
+
}
|
|
1519
|
+
),
|
|
1520
|
+
r
|
|
1521
|
+
] });
|
|
1522
|
+
}
|
|
1523
|
+
function lo({
|
|
1524
|
+
group: e,
|
|
1525
|
+
active: r = !1,
|
|
1526
|
+
onClick: t,
|
|
1527
|
+
showLabel: o = !0,
|
|
1528
|
+
activeColor: s,
|
|
1529
|
+
inactiveColor: i
|
|
1530
|
+
}) {
|
|
1531
|
+
const a = hA(), { colorScheme: n } = oA(), c = n === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], l = n === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], u = a.colors[a.primaryColor][2], f = /* @__PURE__ */ R(
|
|
1532
|
+
Z,
|
|
1533
|
+
{
|
|
1534
|
+
gap: 2,
|
|
1535
|
+
align: "center",
|
|
1536
|
+
justify: "center",
|
|
1537
|
+
style: { textAlign: "center" },
|
|
1538
|
+
children: [
|
|
1539
|
+
/* @__PURE__ */ A(
|
|
1540
|
+
EA,
|
|
1541
|
+
{
|
|
1542
|
+
size: 48,
|
|
1543
|
+
variant: r ? "filled" : "subtle",
|
|
1544
|
+
color: r ? s ?? c : i ?? l,
|
|
1545
|
+
onClick: t,
|
|
1546
|
+
style: {
|
|
1547
|
+
transition: "all 150ms ease"
|
|
1548
|
+
},
|
|
1549
|
+
children: e.icon
|
|
1550
|
+
}
|
|
1551
|
+
),
|
|
1552
|
+
o && /* @__PURE__ */ A(
|
|
1553
|
+
LA,
|
|
1554
|
+
{
|
|
1555
|
+
size: "xs",
|
|
1556
|
+
c: u,
|
|
1557
|
+
style: {
|
|
1558
|
+
maxWidth: 70,
|
|
1559
|
+
overflow: "hidden",
|
|
1560
|
+
textOverflow: "ellipsis",
|
|
1561
|
+
whiteSpace: "nowrap"
|
|
1562
|
+
},
|
|
1563
|
+
children: e.label
|
|
1564
|
+
}
|
|
1565
|
+
)
|
|
1566
|
+
]
|
|
1567
|
+
}
|
|
1568
|
+
);
|
|
1569
|
+
return o ? f : /* @__PURE__ */ A(vA, { label: e.hint || e.label, position: "right", withArrow: !0, children: f });
|
|
1570
|
+
}
|
|
1571
|
+
function dn({
|
|
1572
|
+
placeholder: e = "Buscar...",
|
|
1573
|
+
value: r,
|
|
1574
|
+
onChange: t,
|
|
1575
|
+
onClear: o,
|
|
1576
|
+
collapsed: s = !1
|
|
1577
|
+
}) {
|
|
1578
|
+
const i = hA(), { colorScheme: a } = oA(), n = H(
|
|
1579
|
+
(u) => {
|
|
1580
|
+
t?.(u.currentTarget.value);
|
|
1581
|
+
},
|
|
1582
|
+
[t]
|
|
1583
|
+
), c = H(() => {
|
|
1584
|
+
t?.(""), o?.();
|
|
1585
|
+
}, [t, o]), l = r && r.length > 0;
|
|
1586
|
+
return s ? /* @__PURE__ */ A(
|
|
1587
|
+
EA,
|
|
1588
|
+
{
|
|
1589
|
+
variant: "subtle",
|
|
1590
|
+
size: "lg",
|
|
1591
|
+
color: a === "dark" ? "gray" : "dark",
|
|
1592
|
+
children: /* @__PURE__ */ A(HA, { size: 18 })
|
|
1593
|
+
}
|
|
1594
|
+
) : /* @__PURE__ */ A(
|
|
1595
|
+
ke,
|
|
1596
|
+
{
|
|
1597
|
+
placeholder: e,
|
|
1598
|
+
leftSection: /* @__PURE__ */ A(HA, { size: 16 }),
|
|
1599
|
+
rightSection: l ? /* @__PURE__ */ A(
|
|
1600
|
+
EA,
|
|
1601
|
+
{
|
|
1602
|
+
variant: "subtle",
|
|
1603
|
+
size: "sm",
|
|
1604
|
+
onClick: c,
|
|
1605
|
+
style: { cursor: "pointer" },
|
|
1606
|
+
children: /* @__PURE__ */ A(Se, { size: 14 })
|
|
1607
|
+
}
|
|
1608
|
+
) : /* @__PURE__ */ A(Ce, { size: "xs", style: { marginRight: 4 }, children: "/" }),
|
|
1609
|
+
value: r,
|
|
1610
|
+
onChange: n,
|
|
1611
|
+
size: "sm",
|
|
1612
|
+
styles: {
|
|
1613
|
+
input: {
|
|
1614
|
+
backgroundColor: a === "dark" ? i.colors.dark[6] : i.colors.gray[0]
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
function un({
|
|
1621
|
+
name: e,
|
|
1622
|
+
email: r,
|
|
1623
|
+
avatar: t,
|
|
1624
|
+
onClick: o,
|
|
1625
|
+
collapsed: s = !1
|
|
1626
|
+
}) {
|
|
1627
|
+
const i = hA(), { colorScheme: a } = oA(), n = a === "dark" ? i.colors.dark[5] : i.colors.gray[1], c = () => {
|
|
1628
|
+
if (typeof t == "string")
|
|
1629
|
+
return /* @__PURE__ */ A(jA, { src: t, radius: "xl", size: s ? "sm" : "md" });
|
|
1630
|
+
if (t)
|
|
1631
|
+
return t;
|
|
1632
|
+
const l = e ? e.split(" ").map((u) => u[0]).slice(0, 2).join("").toUpperCase() : "?";
|
|
1633
|
+
return /* @__PURE__ */ A(jA, { radius: "xl", size: s ? "sm" : "md", color: i.primaryColor, children: l });
|
|
1634
|
+
};
|
|
1635
|
+
return s ? /* @__PURE__ */ A(vA, { label: e || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ A(
|
|
1636
|
+
XA,
|
|
1637
|
+
{
|
|
1638
|
+
onClick: o,
|
|
1639
|
+
p: "xs",
|
|
1640
|
+
style: {
|
|
1641
|
+
borderRadius: i.radius.sm,
|
|
1642
|
+
display: "flex",
|
|
1643
|
+
justifyContent: "center",
|
|
1644
|
+
width: "100%",
|
|
1645
|
+
transition: "background-color 150ms ease"
|
|
1646
|
+
},
|
|
1647
|
+
styles: {
|
|
1648
|
+
root: {
|
|
1649
|
+
"&:hover": {
|
|
1650
|
+
backgroundColor: n
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
children: c()
|
|
1655
|
+
}
|
|
1656
|
+
) }) : /* @__PURE__ */ A(
|
|
1657
|
+
XA,
|
|
1658
|
+
{
|
|
1659
|
+
onClick: o,
|
|
1660
|
+
p: "sm",
|
|
1661
|
+
style: {
|
|
1662
|
+
borderRadius: i.radius.sm,
|
|
1663
|
+
width: "100%",
|
|
1664
|
+
transition: "background-color 150ms ease"
|
|
1665
|
+
},
|
|
1666
|
+
styles: {
|
|
1667
|
+
root: {
|
|
1668
|
+
"&:hover": {
|
|
1669
|
+
backgroundColor: n
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
children: /* @__PURE__ */ R(wA, { wrap: "nowrap", children: [
|
|
1674
|
+
c(),
|
|
1675
|
+
/* @__PURE__ */ R(U, { style: { flex: 1, overflow: "hidden" }, children: [
|
|
1676
|
+
e && /* @__PURE__ */ A(
|
|
1677
|
+
LA,
|
|
1678
|
+
{
|
|
1679
|
+
size: "sm",
|
|
1680
|
+
fw: 500,
|
|
1681
|
+
style: {
|
|
1682
|
+
overflow: "hidden",
|
|
1683
|
+
textOverflow: "ellipsis",
|
|
1684
|
+
whiteSpace: "nowrap"
|
|
1685
|
+
},
|
|
1686
|
+
children: e
|
|
1687
|
+
}
|
|
1688
|
+
),
|
|
1689
|
+
r && /* @__PURE__ */ A(
|
|
1690
|
+
LA,
|
|
1691
|
+
{
|
|
1692
|
+
size: "xs",
|
|
1693
|
+
c: "dimmed",
|
|
1694
|
+
style: {
|
|
1695
|
+
overflow: "hidden",
|
|
1696
|
+
textOverflow: "ellipsis",
|
|
1697
|
+
whiteSpace: "nowrap"
|
|
1698
|
+
},
|
|
1699
|
+
children: r
|
|
1700
|
+
}
|
|
1701
|
+
)
|
|
1702
|
+
] }),
|
|
1703
|
+
o && /* @__PURE__ */ A(
|
|
1704
|
+
Ae,
|
|
1705
|
+
{
|
|
1706
|
+
size: 16,
|
|
1707
|
+
color: a === "dark" ? i.colors.gray[5] : i.colors.gray[6]
|
|
1708
|
+
}
|
|
1709
|
+
)
|
|
1710
|
+
] })
|
|
1711
|
+
}
|
|
1712
|
+
);
|
|
1713
|
+
}
|
|
1714
|
+
function hn({
|
|
1715
|
+
value: e,
|
|
1716
|
+
color: r = "red",
|
|
1717
|
+
size: t = "xs"
|
|
1718
|
+
}) {
|
|
1719
|
+
const o = typeof e == "number" && e > 99 ? "99+" : e;
|
|
1720
|
+
return /* @__PURE__ */ A(_A, { size: t, color: r, variant: "filled", children: o });
|
|
1721
|
+
}
|
|
1722
|
+
function fn({
|
|
1723
|
+
children: e,
|
|
1724
|
+
show: r = !0,
|
|
1725
|
+
color: t = "red",
|
|
1726
|
+
processing: o = !1
|
|
1727
|
+
}) {
|
|
1728
|
+
return /* @__PURE__ */ A(
|
|
1729
|
+
Xe,
|
|
1730
|
+
{
|
|
1731
|
+
disabled: !r,
|
|
1732
|
+
color: t,
|
|
1733
|
+
processing: o,
|
|
1734
|
+
size: 8,
|
|
1735
|
+
offset: 4,
|
|
1736
|
+
children: e
|
|
1737
|
+
}
|
|
1738
|
+
);
|
|
1739
|
+
}
|
|
1740
|
+
function ae({
|
|
1741
|
+
itemCount: e = 8,
|
|
1742
|
+
collapsed: r = !1,
|
|
1743
|
+
backgroundColor: t,
|
|
1744
|
+
itemHeight: o = 40,
|
|
1745
|
+
showGroups: s = !0,
|
|
1746
|
+
groupCount: i = 2
|
|
1747
|
+
}) {
|
|
1748
|
+
const a = hA(), { colorScheme: n } = oA(), c = t || (n === "dark" ? a.colors.dark[7] : a.white);
|
|
1749
|
+
if (r)
|
|
1750
|
+
return /* @__PURE__ */ A(Z, { gap: "sm", p: "xs", style: { backgroundColor: c }, children: Array.from({ length: e }).map((d, h) => /* @__PURE__ */ A(aA, { circle: !0, height: 32, width: 32 }, h)) });
|
|
1751
|
+
const l = (d, h = !1) => Array.from({ length: d }).map((f, y) => {
|
|
1752
|
+
const w = 60 + Math.random() * 30;
|
|
1753
|
+
return /* @__PURE__ */ R(
|
|
1754
|
+
wA,
|
|
1755
|
+
{
|
|
1756
|
+
gap: "sm",
|
|
1757
|
+
p: "xs",
|
|
1758
|
+
style: {
|
|
1759
|
+
paddingLeft: h ? 24 : void 0,
|
|
1760
|
+
height: o
|
|
1761
|
+
},
|
|
1762
|
+
children: [
|
|
1763
|
+
/* @__PURE__ */ A(aA, { circle: !0, height: 24, width: 24 }),
|
|
1764
|
+
/* @__PURE__ */ A(aA, { height: 14, width: `${w}%`, radius: "sm" })
|
|
1765
|
+
]
|
|
1766
|
+
},
|
|
1767
|
+
y
|
|
1768
|
+
);
|
|
1769
|
+
});
|
|
1770
|
+
if (!s)
|
|
1771
|
+
return /* @__PURE__ */ A(Z, { gap: 2, p: "xs", style: { backgroundColor: c }, children: l(e) });
|
|
1772
|
+
const u = Math.ceil(e / i);
|
|
1773
|
+
return /* @__PURE__ */ A(Z, { gap: "md", p: "xs", style: { backgroundColor: c }, children: Array.from({ length: i }).map((d, h) => /* @__PURE__ */ R(U, { children: [
|
|
1774
|
+
/* @__PURE__ */ R(wA, { gap: "sm", p: "xs", children: [
|
|
1775
|
+
/* @__PURE__ */ A(aA, { circle: !0, height: 20, width: 20 }),
|
|
1776
|
+
/* @__PURE__ */ A(aA, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
|
|
1777
|
+
] }),
|
|
1778
|
+
/* @__PURE__ */ A(Z, { gap: 2, mt: 4, children: l(
|
|
1779
|
+
h === i - 1 ? e - h * u : u,
|
|
1780
|
+
!0
|
|
1781
|
+
) })
|
|
1782
|
+
] }, h)) });
|
|
1783
|
+
}
|
|
1784
|
+
function io({
|
|
1785
|
+
groupCount: e = 4,
|
|
1786
|
+
width: r = 80,
|
|
1787
|
+
backgroundColor: t
|
|
1788
|
+
}) {
|
|
1789
|
+
const o = hA(), { colorScheme: s } = oA(), i = t || (s === "dark" ? o.colors[o.primaryColor][8] : o.colors[o.primaryColor][6]);
|
|
1790
|
+
return /* @__PURE__ */ A(
|
|
1791
|
+
Z,
|
|
1792
|
+
{
|
|
1793
|
+
gap: "sm",
|
|
1794
|
+
p: "xs",
|
|
1795
|
+
align: "center",
|
|
1796
|
+
style: {
|
|
1797
|
+
width: r,
|
|
1798
|
+
backgroundColor: i,
|
|
1799
|
+
height: "100%"
|
|
1800
|
+
},
|
|
1801
|
+
children: Array.from({ length: e }).map((a, n) => /* @__PURE__ */ R(Z, { gap: 4, align: "center", children: [
|
|
1802
|
+
/* @__PURE__ */ A(aA, { circle: !0, height: 48, width: 48 }),
|
|
1803
|
+
/* @__PURE__ */ A(aA, { height: 10, width: 40, radius: "sm" })
|
|
1804
|
+
] }, n))
|
|
1805
|
+
}
|
|
1806
|
+
);
|
|
1807
|
+
}
|
|
1808
|
+
function pn({
|
|
1809
|
+
collapsed: e = !1
|
|
1810
|
+
}) {
|
|
1811
|
+
return e ? /* @__PURE__ */ A(U, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ A(aA, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ R(wA, { gap: "sm", p: "md", children: [
|
|
1812
|
+
/* @__PURE__ */ A(aA, { circle: !0, height: 40, width: 40 }),
|
|
1813
|
+
/* @__PURE__ */ R(Z, { gap: 4, style: { flex: 1 }, children: [
|
|
1814
|
+
/* @__PURE__ */ A(aA, { height: 14, width: "70%", radius: "sm" }),
|
|
1815
|
+
/* @__PURE__ */ A(aA, { height: 10, width: "50%", radius: "sm" })
|
|
1816
|
+
] })
|
|
1817
|
+
] });
|
|
1818
|
+
}
|
|
1819
|
+
function gn({
|
|
1820
|
+
collapsed: e = !1
|
|
1821
|
+
}) {
|
|
1822
|
+
return e ? /* @__PURE__ */ A(U, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ A(aA, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ R(wA, { gap: "sm", p: "sm", children: [
|
|
1823
|
+
/* @__PURE__ */ A(aA, { circle: !0, height: 36, width: 36 }),
|
|
1824
|
+
/* @__PURE__ */ R(Z, { gap: 4, style: { flex: 1 }, children: [
|
|
1825
|
+
/* @__PURE__ */ A(aA, { height: 12, width: "60%", radius: "sm" }),
|
|
1826
|
+
/* @__PURE__ */ A(aA, { height: 10, width: "80%", radius: "sm" })
|
|
1827
|
+
] })
|
|
1828
|
+
] });
|
|
1829
|
+
}
|
|
1830
|
+
function ce({
|
|
1831
|
+
message: e,
|
|
1832
|
+
backgroundColor: r
|
|
1833
|
+
}) {
|
|
1834
|
+
const t = hA(), { colorScheme: o } = oA(), s = r || (o === "dark" ? t.colors.dark[7] : t.white), i = o === "dark" ? t.colors.red[4] : t.colors.red[6];
|
|
1835
|
+
return /* @__PURE__ */ A(
|
|
1836
|
+
U,
|
|
1837
|
+
{
|
|
1838
|
+
p: "md",
|
|
1839
|
+
style: {
|
|
1840
|
+
backgroundColor: s,
|
|
1841
|
+
display: "flex",
|
|
1842
|
+
alignItems: "center",
|
|
1843
|
+
justifyContent: "center",
|
|
1844
|
+
height: "100%"
|
|
1845
|
+
},
|
|
1846
|
+
children: /* @__PURE__ */ A(
|
|
1847
|
+
U,
|
|
1848
|
+
{
|
|
1849
|
+
p: "md",
|
|
1850
|
+
style: {
|
|
1851
|
+
backgroundColor: o === "dark" ? t.colors.dark[6] : t.colors.red[0],
|
|
1852
|
+
borderRadius: t.radius.md,
|
|
1853
|
+
textAlign: "center",
|
|
1854
|
+
color: i,
|
|
1855
|
+
fontSize: t.fontSizes.sm
|
|
1856
|
+
},
|
|
1857
|
+
children: e
|
|
1858
|
+
}
|
|
1859
|
+
)
|
|
1860
|
+
}
|
|
1861
|
+
);
|
|
1862
|
+
}
|
|
1863
|
+
function ao({
|
|
1864
|
+
navigationData: e,
|
|
1865
|
+
width: r = 280,
|
|
1866
|
+
collapsedWidth: t = 60,
|
|
1867
|
+
height: o = "100%",
|
|
1868
|
+
showSearch: s = !1,
|
|
1869
|
+
searchPlaceholder: i = "Buscar...",
|
|
1870
|
+
onSearch: a,
|
|
1871
|
+
header: n,
|
|
1872
|
+
footer: c,
|
|
1873
|
+
footerHeight: l,
|
|
1874
|
+
isLoading: u = !1,
|
|
1875
|
+
loadingError: d,
|
|
1876
|
+
loadingComponent: h,
|
|
1877
|
+
errorComponent: f,
|
|
1878
|
+
skeletonItemCount: y = 8,
|
|
1879
|
+
backgroundDarkColor: w,
|
|
1880
|
+
backgroundLightColor: m,
|
|
1881
|
+
textDarkColor: p,
|
|
1882
|
+
textLightColor: g,
|
|
1883
|
+
iconDarkColor: S,
|
|
1884
|
+
iconLightColor: v,
|
|
1885
|
+
activeColor: C,
|
|
1886
|
+
withBorder: P = !0,
|
|
1887
|
+
withShadow: N = !1,
|
|
1888
|
+
highlightActiveItem: j = !0,
|
|
1889
|
+
onMenuItemClick: J
|
|
1890
|
+
}) {
|
|
1891
|
+
const D = hA(), { colorScheme: M } = oA(), { collapsed: F, toggleCollapsed: Q } = te(), T = M === "dark" ? w ?? D.colors.dark[7] : m ?? D.white, x = M === "dark" ? p ?? D.colors.gray[3] : g ?? D.colors.gray[7], I = M === "dark" ? S ?? D.colors[D.primaryColor][4] : v ?? D.colors[D.primaryColor][6], Y = C ? D.colors[C]?.[6] ?? D.colors[D.primaryColor][6] : D.colors[D.primaryColor][6], {
|
|
1892
|
+
query: q,
|
|
1893
|
+
setQuery: k,
|
|
1894
|
+
filteredItems: b,
|
|
1895
|
+
isSearching: E,
|
|
1896
|
+
clearSearch: O
|
|
1897
|
+
} = no({
|
|
1898
|
+
navigationData: e,
|
|
1899
|
+
onSearch: a
|
|
1900
|
+
}), { navigateToItem: G, isItemActive: L, isItemOrChildActive: z } = le({
|
|
1901
|
+
navigationData: e,
|
|
1902
|
+
onMenuItemClick: J
|
|
1903
|
+
});
|
|
1904
|
+
ie({
|
|
1905
|
+
navigationData: e,
|
|
1906
|
+
navigateToItem: G,
|
|
1907
|
+
onToggleSidebar: Q,
|
|
1908
|
+
enabled: !0
|
|
1909
|
+
});
|
|
1910
|
+
const fA = F ? t : r, B = cA(() => {
|
|
1911
|
+
const eA = /* @__PURE__ */ new Map(), sA = [];
|
|
1912
|
+
return b.forEach((K) => {
|
|
1913
|
+
if (!(!K.showInSidebar || (typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem))
|
|
1914
|
+
if (K.category) {
|
|
1915
|
+
const CA = eA.get(K.category) || [];
|
|
1916
|
+
CA.push(K), eA.set(K.category, CA);
|
|
1917
|
+
} else
|
|
1918
|
+
sA.push(K);
|
|
1919
|
+
}), { groups: eA, ungrouped: sA };
|
|
1920
|
+
}, [b]), tA = () => {
|
|
1921
|
+
if (d)
|
|
1922
|
+
return f || /* @__PURE__ */ A(ce, { message: d, backgroundColor: T });
|
|
1923
|
+
if (u)
|
|
1924
|
+
return h || /* @__PURE__ */ A(
|
|
1925
|
+
ae,
|
|
1926
|
+
{
|
|
1927
|
+
itemCount: y,
|
|
1928
|
+
collapsed: F,
|
|
1929
|
+
backgroundColor: T,
|
|
1930
|
+
showGroups: !F
|
|
1931
|
+
}
|
|
1932
|
+
);
|
|
1933
|
+
const eA = () => B.ungrouped.map((K, rA) => /* @__PURE__ */ A(
|
|
1934
|
+
DA,
|
|
1935
|
+
{
|
|
1936
|
+
item: K,
|
|
1937
|
+
collapsed: F,
|
|
1938
|
+
active: j && L(K),
|
|
1939
|
+
onClick: G,
|
|
1940
|
+
textColor: x,
|
|
1941
|
+
iconColor: I,
|
|
1942
|
+
hoverColor: Y
|
|
1943
|
+
},
|
|
1944
|
+
`item-${rA}`
|
|
1945
|
+
)), sA = () => Array.from(B.groups.entries()).map(([rA, CA], kA) => /* @__PURE__ */ A(
|
|
1946
|
+
so,
|
|
1947
|
+
{
|
|
1948
|
+
label: rA,
|
|
1949
|
+
groupId: `group-${kA}`,
|
|
1950
|
+
defaultExpanded: !0,
|
|
1951
|
+
children: CA.map((SA, V) => /* @__PURE__ */ A(
|
|
1952
|
+
DA,
|
|
1953
|
+
{
|
|
1954
|
+
item: SA,
|
|
1955
|
+
collapsed: F,
|
|
1956
|
+
active: j && L(SA),
|
|
1957
|
+
onClick: G,
|
|
1958
|
+
textColor: x,
|
|
1959
|
+
iconColor: I
|
|
1960
|
+
},
|
|
1961
|
+
`group-${kA}-item-${V}`
|
|
1962
|
+
))
|
|
1963
|
+
},
|
|
1964
|
+
`group-${kA}`
|
|
1965
|
+
));
|
|
1966
|
+
return F ? /* @__PURE__ */ R(Z, { gap: 2, children: [
|
|
1967
|
+
B.ungrouped.map((K, rA) => /* @__PURE__ */ A(
|
|
1968
|
+
DA,
|
|
1969
|
+
{
|
|
1970
|
+
item: K,
|
|
1971
|
+
collapsed: !0,
|
|
1972
|
+
active: j && L(K),
|
|
1973
|
+
onClick: G,
|
|
1974
|
+
textColor: x,
|
|
1975
|
+
iconColor: I
|
|
1976
|
+
},
|
|
1977
|
+
`item-${rA}`
|
|
1978
|
+
)),
|
|
1979
|
+
Array.from(B.groups.values()).flat().map((K, rA) => /* @__PURE__ */ A(
|
|
1980
|
+
DA,
|
|
1981
|
+
{
|
|
1982
|
+
item: K,
|
|
1983
|
+
collapsed: !0,
|
|
1984
|
+
active: j && L(K),
|
|
1985
|
+
onClick: G,
|
|
1986
|
+
textColor: x,
|
|
1987
|
+
iconColor: I
|
|
1988
|
+
},
|
|
1989
|
+
`grouped-item-${rA}`
|
|
1990
|
+
))
|
|
1991
|
+
] }) : /* @__PURE__ */ R(Z, { gap: "xs", children: [
|
|
1992
|
+
B.ungrouped.length > 0 && /* @__PURE__ */ A(Z, { gap: 2, children: eA() }),
|
|
1993
|
+
B.groups.size > 0 && B.ungrouped.length > 0 && /* @__PURE__ */ A(JA, { my: "xs" }),
|
|
1994
|
+
sA()
|
|
1995
|
+
] });
|
|
1996
|
+
};
|
|
1997
|
+
return /* @__PURE__ */ A(
|
|
1998
|
+
Je,
|
|
1999
|
+
{
|
|
2000
|
+
mounted: !0,
|
|
2001
|
+
transition: "slide-right",
|
|
2002
|
+
duration: 200,
|
|
2003
|
+
timingFunction: "ease",
|
|
2004
|
+
children: (eA) => /* @__PURE__ */ R(
|
|
2005
|
+
U,
|
|
2006
|
+
{
|
|
2007
|
+
style: {
|
|
2008
|
+
...eA,
|
|
2009
|
+
width: pA(fA),
|
|
2010
|
+
height: pA(o),
|
|
2011
|
+
backgroundColor: T,
|
|
2012
|
+
display: "flex",
|
|
2013
|
+
flexDirection: "column",
|
|
2014
|
+
overflow: "hidden",
|
|
2015
|
+
transition: "width 200ms ease",
|
|
2016
|
+
borderRight: P ? `1px solid ${M === "dark" ? D.colors.dark[5] : D.colors.gray[2]}` : void 0,
|
|
2017
|
+
boxShadow: N ? D.shadows.sm : void 0
|
|
2018
|
+
},
|
|
2019
|
+
children: [
|
|
2020
|
+
n && /* @__PURE__ */ A(U, { style: { flexShrink: 0 }, children: n }),
|
|
2021
|
+
s && !F && /* @__PURE__ */ A(U, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ A(
|
|
2022
|
+
ke,
|
|
2023
|
+
{
|
|
2024
|
+
placeholder: i,
|
|
2025
|
+
leftSection: /* @__PURE__ */ A(HA, { size: 16 }),
|
|
2026
|
+
rightSection: E ? /* @__PURE__ */ A(
|
|
2027
|
+
Se,
|
|
2028
|
+
{
|
|
2029
|
+
size: 16,
|
|
2030
|
+
style: { cursor: "pointer" },
|
|
2031
|
+
onClick: O
|
|
2032
|
+
}
|
|
2033
|
+
) : null,
|
|
2034
|
+
value: q,
|
|
2035
|
+
onChange: (sA) => k(sA.currentTarget.value),
|
|
2036
|
+
size: "sm"
|
|
2037
|
+
}
|
|
2038
|
+
) }),
|
|
2039
|
+
/* @__PURE__ */ A(
|
|
2040
|
+
TA,
|
|
2041
|
+
{
|
|
2042
|
+
style: { flex: 1 },
|
|
2043
|
+
scrollbarSize: 6,
|
|
2044
|
+
type: "hover",
|
|
2045
|
+
children: /* @__PURE__ */ A(U, { p: "xs", children: tA() })
|
|
2046
|
+
}
|
|
2047
|
+
),
|
|
2048
|
+
c && /* @__PURE__ */ A(
|
|
2049
|
+
U,
|
|
2050
|
+
{
|
|
2051
|
+
style: {
|
|
2052
|
+
flexShrink: 0,
|
|
2053
|
+
height: l,
|
|
2054
|
+
backgroundColor: T,
|
|
2055
|
+
borderTop: P ? `1px solid ${M === "dark" ? D.colors.dark[5] : D.colors.gray[2]}` : void 0
|
|
2056
|
+
},
|
|
2057
|
+
children: c
|
|
2058
|
+
}
|
|
2059
|
+
)
|
|
2060
|
+
]
|
|
2061
|
+
}
|
|
2062
|
+
)
|
|
2063
|
+
}
|
|
2064
|
+
);
|
|
2065
|
+
}
|
|
2066
|
+
function co(e) {
|
|
2067
|
+
const {
|
|
2068
|
+
navigationData: r,
|
|
2069
|
+
collapsed: t,
|
|
2070
|
+
defaultCollapsed: o,
|
|
2071
|
+
onCollapsedChange: s,
|
|
2072
|
+
showKeyboardShortcuts: i,
|
|
2073
|
+
highlightActiveItem: a,
|
|
2074
|
+
onMenuItemClick: n
|
|
2075
|
+
} = e;
|
|
2076
|
+
return /* @__PURE__ */ A(
|
|
2077
|
+
se,
|
|
2078
|
+
{
|
|
2079
|
+
navigationData: r,
|
|
2080
|
+
variant: "standard",
|
|
2081
|
+
collapsed: t,
|
|
2082
|
+
defaultCollapsed: o,
|
|
2083
|
+
onCollapsedChange: s,
|
|
2084
|
+
showKeyboardShortcuts: i,
|
|
2085
|
+
highlightActiveItem: a,
|
|
2086
|
+
onMenuItemClick: n,
|
|
2087
|
+
children: /* @__PURE__ */ A(ao, { ...e })
|
|
2088
|
+
}
|
|
2089
|
+
);
|
|
2090
|
+
}
|
|
2091
|
+
function uo({
|
|
2092
|
+
item: e,
|
|
2093
|
+
active: r,
|
|
2094
|
+
onClick: t,
|
|
2095
|
+
iconColor: o,
|
|
2096
|
+
activeColor: s
|
|
2097
|
+
}) {
|
|
2098
|
+
hA();
|
|
2099
|
+
const { colorScheme: i } = oA(), a = typeof e.disabled == "function" ? e.disabled() : e.disabled;
|
|
2100
|
+
if (a && e.hideDisabledItem || !e.showInSidebar)
|
|
2101
|
+
return null;
|
|
2102
|
+
const n = IA.t(e.label);
|
|
2103
|
+
if (e.links && e.links.length > 0) {
|
|
2104
|
+
const c = e.links.filter((l) => {
|
|
2105
|
+
const u = typeof l.disabled == "function" ? l.disabled() : l.disabled;
|
|
2106
|
+
return l.showInSidebar && (!u || !l.hideDisabledItem);
|
|
2107
|
+
});
|
|
2108
|
+
return c.length === 0 ? null : /* @__PURE__ */ R(
|
|
2109
|
+
AA,
|
|
2110
|
+
{
|
|
2111
|
+
position: "right-start",
|
|
2112
|
+
withArrow: !0,
|
|
2113
|
+
shadow: "md",
|
|
2114
|
+
trigger: "hover",
|
|
2115
|
+
openDelay: 100,
|
|
2116
|
+
closeDelay: 200,
|
|
2117
|
+
children: [
|
|
2118
|
+
/* @__PURE__ */ A(AA.Target, { children: /* @__PURE__ */ A(vA, { label: n, position: "right", withArrow: !0, children: /* @__PURE__ */ A(
|
|
2119
|
+
EA,
|
|
2120
|
+
{
|
|
2121
|
+
size: "xl",
|
|
2122
|
+
variant: r ? "filled" : "subtle",
|
|
2123
|
+
color: r ? s : void 0,
|
|
2124
|
+
disabled: a,
|
|
2125
|
+
style: {
|
|
2126
|
+
opacity: a ? 0.5 : 1
|
|
2127
|
+
},
|
|
2128
|
+
children: /* @__PURE__ */ A(U, { style: { color: r ? "white" : o }, children: e.icon })
|
|
2129
|
+
}
|
|
2130
|
+
) }) }),
|
|
2131
|
+
/* @__PURE__ */ R(AA.Dropdown, { children: [
|
|
2132
|
+
/* @__PURE__ */ A(AA.Label, { children: n }),
|
|
2133
|
+
c.map((l, u) => {
|
|
2134
|
+
const d = typeof l.disabled == "function" ? l.disabled() : l.disabled;
|
|
2135
|
+
return /* @__PURE__ */ A(
|
|
2136
|
+
AA.Item,
|
|
2137
|
+
{
|
|
2138
|
+
leftSection: l.icon,
|
|
2139
|
+
disabled: d,
|
|
2140
|
+
onClick: () => t(l),
|
|
2141
|
+
children: IA.t(l.label)
|
|
2142
|
+
},
|
|
2143
|
+
u
|
|
2144
|
+
);
|
|
2145
|
+
})
|
|
2146
|
+
] })
|
|
2147
|
+
]
|
|
2148
|
+
}
|
|
2149
|
+
);
|
|
2150
|
+
}
|
|
2151
|
+
return /* @__PURE__ */ A(vA, { label: n, position: "right", withArrow: !0, children: /* @__PURE__ */ A(
|
|
2152
|
+
EA,
|
|
2153
|
+
{
|
|
2154
|
+
size: "xl",
|
|
2155
|
+
variant: r ? "filled" : "subtle",
|
|
2156
|
+
color: r ? s : void 0,
|
|
2157
|
+
disabled: a,
|
|
2158
|
+
onClick: () => t(e),
|
|
2159
|
+
style: {
|
|
2160
|
+
opacity: a ? 0.5 : 1
|
|
2161
|
+
},
|
|
2162
|
+
children: /* @__PURE__ */ A(U, { style: { color: r ? "white" : o }, children: e.icon })
|
|
2163
|
+
}
|
|
2164
|
+
) });
|
|
2165
|
+
}
|
|
2166
|
+
function ho({
|
|
2167
|
+
navigationData: e,
|
|
2168
|
+
width: r = 60,
|
|
2169
|
+
height: t = "100%",
|
|
2170
|
+
header: o,
|
|
2171
|
+
footer: s,
|
|
2172
|
+
footerHeight: i,
|
|
2173
|
+
isLoading: a = !1,
|
|
2174
|
+
loadingError: n,
|
|
2175
|
+
loadingComponent: c,
|
|
2176
|
+
errorComponent: l,
|
|
2177
|
+
skeletonItemCount: u = 8,
|
|
2178
|
+
backgroundDarkColor: d,
|
|
2179
|
+
backgroundLightColor: h,
|
|
2180
|
+
iconDarkColor: f,
|
|
2181
|
+
iconLightColor: y,
|
|
2182
|
+
activeColor: w,
|
|
2183
|
+
withBorder: m = !0,
|
|
2184
|
+
withShadow: p = !1,
|
|
2185
|
+
highlightActiveItem: g = !0,
|
|
2186
|
+
onMenuItemClick: S
|
|
2187
|
+
}) {
|
|
2188
|
+
const v = hA(), { colorScheme: C } = oA(), { toggleCollapsed: P } = te(), N = C === "dark" ? d ?? v.colors.dark[7] : h ?? v.white, j = C === "dark" ? f ?? v.colors[v.primaryColor][4] : y ?? v.colors[v.primaryColor][6], J = w ?? v.primaryColor, { navigateToItem: D, isItemActive: M, isItemOrChildActive: F } = le({
|
|
2189
|
+
navigationData: e,
|
|
2190
|
+
onMenuItemClick: S
|
|
2191
|
+
});
|
|
2192
|
+
ie({
|
|
2193
|
+
navigationData: e,
|
|
2194
|
+
navigateToItem: D,
|
|
2195
|
+
onToggleSidebar: P,
|
|
2196
|
+
enabled: !0
|
|
2197
|
+
});
|
|
2198
|
+
const Q = e.filter((I) => !(!I.showInSidebar || (typeof I.disabled == "function" ? I.disabled() : I.disabled) && I.hideDisabledItem)), T = () => n ? l || /* @__PURE__ */ A(ce, { message: n, backgroundColor: N }) : a ? c || /* @__PURE__ */ A(
|
|
2199
|
+
ae,
|
|
2200
|
+
{
|
|
2201
|
+
itemCount: u,
|
|
2202
|
+
collapsed: !0,
|
|
2203
|
+
backgroundColor: N
|
|
2204
|
+
}
|
|
2205
|
+
) : /* @__PURE__ */ A(Z, { gap: "xs", align: "center", children: Q.map((I, Y) => /* @__PURE__ */ A(
|
|
2206
|
+
uo,
|
|
2207
|
+
{
|
|
2208
|
+
item: I,
|
|
2209
|
+
active: g && (M(I) || F(I)),
|
|
2210
|
+
onClick: D,
|
|
2211
|
+
iconColor: j,
|
|
2212
|
+
activeColor: J
|
|
2213
|
+
},
|
|
2214
|
+
Y
|
|
2215
|
+
)) }), x = C === "dark" ? v.colors.dark[5] : v.colors.gray[2];
|
|
2216
|
+
return /* @__PURE__ */ R(
|
|
2217
|
+
U,
|
|
2218
|
+
{
|
|
2219
|
+
style: {
|
|
2220
|
+
width: pA(r),
|
|
2221
|
+
height: pA(t),
|
|
2222
|
+
backgroundColor: N,
|
|
2223
|
+
display: "flex",
|
|
2224
|
+
flexDirection: "column",
|
|
2225
|
+
overflow: "hidden",
|
|
2226
|
+
boxShadow: p ? v.shadows.sm : void 0,
|
|
2227
|
+
borderRight: m ? `1px solid ${x}` : void 0
|
|
2228
|
+
},
|
|
2229
|
+
children: [
|
|
2230
|
+
o && /* @__PURE__ */ A(
|
|
2231
|
+
U,
|
|
2232
|
+
{
|
|
2233
|
+
style: {
|
|
2234
|
+
flexShrink: 0,
|
|
2235
|
+
display: "flex",
|
|
2236
|
+
justifyContent: "center",
|
|
2237
|
+
padding: v.spacing.xs
|
|
2238
|
+
},
|
|
2239
|
+
children: o
|
|
2240
|
+
}
|
|
2241
|
+
),
|
|
2242
|
+
o && /* @__PURE__ */ A(JA, {}),
|
|
2243
|
+
/* @__PURE__ */ A(
|
|
2244
|
+
TA,
|
|
2245
|
+
{
|
|
2246
|
+
style: { flex: 1 },
|
|
2247
|
+
scrollbarSize: 4,
|
|
2248
|
+
type: "hover",
|
|
2249
|
+
children: /* @__PURE__ */ A(U, { p: "xs", children: T() })
|
|
2250
|
+
}
|
|
2251
|
+
),
|
|
2252
|
+
s && /* @__PURE__ */ R(yA, { children: [
|
|
2253
|
+
/* @__PURE__ */ A(JA, {}),
|
|
2254
|
+
/* @__PURE__ */ A(
|
|
2255
|
+
U,
|
|
2256
|
+
{
|
|
2257
|
+
style: {
|
|
2258
|
+
flexShrink: 0,
|
|
2259
|
+
height: i,
|
|
2260
|
+
display: "flex",
|
|
2261
|
+
justifyContent: "center",
|
|
2262
|
+
padding: v.spacing.xs
|
|
2263
|
+
},
|
|
2264
|
+
children: s
|
|
2265
|
+
}
|
|
2266
|
+
)
|
|
2267
|
+
] })
|
|
2268
|
+
]
|
|
2269
|
+
}
|
|
2270
|
+
);
|
|
2271
|
+
}
|
|
2272
|
+
function fo(e) {
|
|
2273
|
+
const {
|
|
2274
|
+
navigationData: r,
|
|
2275
|
+
collapsed: t,
|
|
2276
|
+
defaultCollapsed: o,
|
|
2277
|
+
onCollapsedChange: s,
|
|
2278
|
+
showKeyboardShortcuts: i,
|
|
2279
|
+
highlightActiveItem: a,
|
|
2280
|
+
onMenuItemClick: n
|
|
2281
|
+
} = e;
|
|
2282
|
+
return /* @__PURE__ */ A(
|
|
2283
|
+
se,
|
|
2284
|
+
{
|
|
2285
|
+
navigationData: r,
|
|
2286
|
+
variant: "minimal",
|
|
2287
|
+
collapsed: t,
|
|
2288
|
+
defaultCollapsed: o,
|
|
2289
|
+
onCollapsedChange: s,
|
|
2290
|
+
showKeyboardShortcuts: i,
|
|
2291
|
+
highlightActiveItem: a,
|
|
2292
|
+
onMenuItemClick: n,
|
|
2293
|
+
children: /* @__PURE__ */ A(ho, { ...e })
|
|
2294
|
+
}
|
|
2295
|
+
);
|
|
2296
|
+
}
|
|
2297
|
+
function po({
|
|
2298
|
+
navigationData: e,
|
|
2299
|
+
width: r = 360,
|
|
2300
|
+
collapsedWidth: t = 60,
|
|
2301
|
+
height: o = "100%",
|
|
2302
|
+
groupColumnWidth: s = 80,
|
|
2303
|
+
defaultGroupIcon: i,
|
|
2304
|
+
showGroupLabels: a = !0,
|
|
2305
|
+
header: n,
|
|
2306
|
+
footer: c,
|
|
2307
|
+
footerHeight: l,
|
|
2308
|
+
isLoading: u = !1,
|
|
2309
|
+
loadingError: d,
|
|
2310
|
+
loadingComponent: h,
|
|
2311
|
+
errorComponent: f,
|
|
2312
|
+
skeletonItemCount: y = 8,
|
|
2313
|
+
skeletonGroupCount: w = 3,
|
|
2314
|
+
backgroundDarkColor: m,
|
|
2315
|
+
backgroundLightColor: p,
|
|
2316
|
+
textDarkColor: g,
|
|
2317
|
+
textLightColor: S,
|
|
2318
|
+
iconDarkColor: v,
|
|
2319
|
+
iconLightColor: C,
|
|
2320
|
+
activeColor: P,
|
|
2321
|
+
groupBackgroundColor: N,
|
|
2322
|
+
selectedGroupColor: j,
|
|
2323
|
+
groupColor: J,
|
|
2324
|
+
groupLabelDarkColor: D,
|
|
2325
|
+
groupLabelLightColor: M,
|
|
2326
|
+
withBorder: F = !1,
|
|
2327
|
+
highlightActiveItem: Q = !0,
|
|
2328
|
+
onMenuItemClick: T
|
|
2329
|
+
}) {
|
|
2330
|
+
const x = hA(), { colorScheme: I } = oA(), {
|
|
2331
|
+
collapsed: Y,
|
|
2332
|
+
toggleCollapsed: q,
|
|
2333
|
+
activeGroup: k,
|
|
2334
|
+
setActiveGroup: b
|
|
2335
|
+
} = te(), E = I === "dark" ? m ?? x.colors.dark[7] : p ?? x.white, O = I === "dark" ? g ?? x.colors.gray[3] : S ?? x.colors.gray[7], G = I === "dark" ? v ?? x.colors[x.primaryColor][4] : C ?? x.colors[x.primaryColor][6], L = P ? x.colors[P]?.[6] ?? x.colors[x.primaryColor][6] : x.colors[x.primaryColor][6], z = N || (I === "dark" ? x.colors[x.primaryColor][6] : x.colors[x.primaryColor][7]), fA = j || (I === "dark" ? x.colors[x.primaryColor][8] : x.colors[x.primaryColor][0]), { navigateToItem: B, isItemActive: tA } = le({
|
|
2336
|
+
navigationData: e,
|
|
2337
|
+
onMenuItemClick: T
|
|
2338
|
+
});
|
|
2339
|
+
ie({
|
|
2340
|
+
navigationData: e,
|
|
2341
|
+
navigateToItem: B,
|
|
2342
|
+
onToggleSidebar: q,
|
|
2343
|
+
enabled: !0
|
|
2344
|
+
});
|
|
2345
|
+
const eA = cA(() => {
|
|
2346
|
+
const V = /* @__PURE__ */ new Map();
|
|
2347
|
+
return e.forEach((nA) => {
|
|
2348
|
+
if (!nA.showInSidebar || (typeof nA.disabled == "function" ? nA.disabled() : nA.disabled) && nA.hideDisabledItem)
|
|
2349
|
+
return;
|
|
2350
|
+
const RA = nA.group ?? {
|
|
2351
|
+
icon: i ?? /* @__PURE__ */ A(xe, { size: "2.2rem", stroke: 1 }),
|
|
2352
|
+
label: "Default",
|
|
2353
|
+
name: "Default",
|
|
2354
|
+
hint: "Default",
|
|
2355
|
+
indexOrder: 0
|
|
2356
|
+
}, dA = V.get(RA.name);
|
|
2357
|
+
dA ? dA.items.push(nA) : V.set(RA.name, {
|
|
2358
|
+
group: RA,
|
|
2359
|
+
items: [nA]
|
|
2360
|
+
});
|
|
2361
|
+
}), Array.from(V.values()).sort((nA, zA) => nA.group.indexOrder - zA.group.indexOrder);
|
|
2362
|
+
}, [e, i]);
|
|
2363
|
+
iA(() => {
|
|
2364
|
+
!k && eA.length > 0 && b(eA[0].group.name);
|
|
2365
|
+
}, [k, eA, b]);
|
|
2366
|
+
const sA = cA(() => eA.find((nA) => nA.group.name === k)?.items ?? [], [eA, k]), K = H((V) => {
|
|
2367
|
+
Y ? (q(), b(V)) : k === V ? q() : b(V);
|
|
2368
|
+
}, [Y, k, q, b]), rA = Y ? 0 : Number(pA(r)) - Number(pA(s)), CA = () => u && eA.length === 0 ? /* @__PURE__ */ A(
|
|
2369
|
+
io,
|
|
2370
|
+
{
|
|
2371
|
+
groupCount: w,
|
|
2372
|
+
width: s,
|
|
2373
|
+
backgroundColor: z
|
|
2374
|
+
}
|
|
2375
|
+
) : eA.length <= 1 ? null : /* @__PURE__ */ A(
|
|
2376
|
+
Z,
|
|
2377
|
+
{
|
|
2378
|
+
gap: 4,
|
|
2379
|
+
p: 4,
|
|
2380
|
+
align: "center",
|
|
2381
|
+
style: {
|
|
2382
|
+
width: s,
|
|
2383
|
+
height: "100%",
|
|
2384
|
+
backgroundColor: z,
|
|
2385
|
+
flexShrink: 0
|
|
2386
|
+
},
|
|
2387
|
+
children: eA.map((V) => /* @__PURE__ */ A(
|
|
2388
|
+
lo,
|
|
2389
|
+
{
|
|
2390
|
+
group: V.group,
|
|
2391
|
+
active: V.group.name === k,
|
|
2392
|
+
onClick: () => K(V.group.name),
|
|
2393
|
+
showLabel: a,
|
|
2394
|
+
activeColor: fA,
|
|
2395
|
+
inactiveColor: J
|
|
2396
|
+
},
|
|
2397
|
+
V.group.name
|
|
2398
|
+
))
|
|
2399
|
+
}
|
|
2400
|
+
), kA = () => d ? f || /* @__PURE__ */ A(ce, { message: d, backgroundColor: E }) : u ? h || /* @__PURE__ */ A(
|
|
2401
|
+
ae,
|
|
2402
|
+
{
|
|
2403
|
+
itemCount: y,
|
|
2404
|
+
collapsed: !1,
|
|
2405
|
+
backgroundColor: E,
|
|
2406
|
+
showGroups: !1
|
|
2407
|
+
}
|
|
2408
|
+
) : /* @__PURE__ */ A(Z, { gap: 2, children: sA.map((V, nA) => /* @__PURE__ */ A(
|
|
2409
|
+
DA,
|
|
2410
|
+
{
|
|
2411
|
+
item: V,
|
|
2412
|
+
collapsed: !1,
|
|
2413
|
+
active: Q && tA(V),
|
|
2414
|
+
onClick: B,
|
|
2415
|
+
textColor: O,
|
|
2416
|
+
iconColor: G,
|
|
2417
|
+
hoverColor: L
|
|
2418
|
+
},
|
|
2419
|
+
nA
|
|
2420
|
+
)) }), SA = I === "dark" ? x.colors.dark[5] : x.colors.gray[2];
|
|
2421
|
+
return eA.length <= 1 ? /* @__PURE__ */ R(QA, { direction: "column", w: Y ? t : r, h: "100%", style: { backgroundColor: E }, children: [
|
|
2422
|
+
n && /* @__PURE__ */ A(U, { style: { width: "100%", flexShrink: 0 }, children: n }),
|
|
2423
|
+
/* @__PURE__ */ A(
|
|
2424
|
+
U,
|
|
2425
|
+
{
|
|
2426
|
+
style: {
|
|
2427
|
+
flex: 1,
|
|
2428
|
+
width: "100%",
|
|
2429
|
+
backgroundColor: E,
|
|
2430
|
+
display: "flex",
|
|
2431
|
+
flexDirection: "column",
|
|
2432
|
+
overflow: "hidden",
|
|
2433
|
+
borderRight: F ? `1px solid ${SA}` : void 0
|
|
2434
|
+
},
|
|
2435
|
+
children: /* @__PURE__ */ A(TA, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ A(U, { p: "xs", children: Y ? /* @__PURE__ */ A(Z, { gap: "xs", align: "center", children: e.filter((V) => V.showInSidebar ? !((typeof V.disabled == "function" ? V.disabled() : V.disabled) && V.hideDisabledItem) : !1).map((V, nA) => /* @__PURE__ */ A(
|
|
2436
|
+
DA,
|
|
2437
|
+
{
|
|
2438
|
+
item: V,
|
|
2439
|
+
collapsed: !0,
|
|
2440
|
+
active: Q && tA(V),
|
|
2441
|
+
onClick: B,
|
|
2442
|
+
textColor: O,
|
|
2443
|
+
iconColor: G,
|
|
2444
|
+
hoverColor: L
|
|
2445
|
+
},
|
|
2446
|
+
nA
|
|
2447
|
+
)) }) : kA() }) })
|
|
2448
|
+
}
|
|
2449
|
+
),
|
|
2450
|
+
c && /* @__PURE__ */ A(U, { style: { width: "100%", backgroundColor: E, flexShrink: 0 }, children: c })
|
|
2451
|
+
] }) : /* @__PURE__ */ R(QA, { direction: "column", w: Y ? s : r, h: "100%", style: { backgroundColor: E }, children: [
|
|
2452
|
+
n && /* @__PURE__ */ A(U, { style: { width: "100%", flexShrink: 0 }, children: n }),
|
|
2453
|
+
/* @__PURE__ */ R(
|
|
2454
|
+
U,
|
|
2455
|
+
{
|
|
2456
|
+
style: {
|
|
2457
|
+
flex: 1,
|
|
2458
|
+
width: "100%",
|
|
2459
|
+
display: "flex",
|
|
2460
|
+
overflow: "hidden",
|
|
2461
|
+
borderRight: F ? `1px solid ${SA}` : void 0
|
|
2462
|
+
},
|
|
2463
|
+
children: [
|
|
2464
|
+
CA(),
|
|
2465
|
+
/* @__PURE__ */ A(
|
|
2466
|
+
U,
|
|
2467
|
+
{
|
|
2468
|
+
style: {
|
|
2469
|
+
width: Y ? 0 : rA,
|
|
2470
|
+
height: "100%",
|
|
2471
|
+
backgroundColor: E,
|
|
2472
|
+
overflow: "hidden",
|
|
2473
|
+
transition: "width 200ms ease",
|
|
2474
|
+
borderLeft: eA.length > 1 ? `1px solid ${I === "dark" ? x.colors.dark[5] : x.colors.gray[2]}` : void 0
|
|
2475
|
+
},
|
|
2476
|
+
children: !Y && k && /* @__PURE__ */ A(TA, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ A(U, { p: "xs", children: kA() }) })
|
|
2477
|
+
}
|
|
2478
|
+
)
|
|
2479
|
+
]
|
|
2480
|
+
}
|
|
2481
|
+
),
|
|
2482
|
+
c && /* @__PURE__ */ A(U, { style: { width: "100%", backgroundColor: E, flexShrink: 0 }, children: c })
|
|
2483
|
+
] });
|
|
2484
|
+
}
|
|
2485
|
+
function go(e) {
|
|
2486
|
+
const {
|
|
2487
|
+
navigationData: r,
|
|
2488
|
+
collapsed: t,
|
|
2489
|
+
defaultCollapsed: o,
|
|
2490
|
+
onCollapsedChange: s,
|
|
2491
|
+
activeGroup: i,
|
|
2492
|
+
defaultActiveGroup: a,
|
|
2493
|
+
onActiveGroupChange: n,
|
|
2494
|
+
showKeyboardShortcuts: c,
|
|
2495
|
+
highlightActiveItem: l,
|
|
2496
|
+
onMenuItemClick: u
|
|
2497
|
+
} = e;
|
|
2498
|
+
return /* @__PURE__ */ A(
|
|
2499
|
+
se,
|
|
2500
|
+
{
|
|
2501
|
+
navigationData: r,
|
|
2502
|
+
variant: "rail",
|
|
2503
|
+
collapsed: t,
|
|
2504
|
+
defaultCollapsed: o,
|
|
2505
|
+
onCollapsedChange: s,
|
|
2506
|
+
activeGroup: i,
|
|
2507
|
+
defaultActiveGroup: a,
|
|
2508
|
+
onActiveGroupChange: n,
|
|
2509
|
+
showKeyboardShortcuts: c,
|
|
2510
|
+
highlightActiveItem: l,
|
|
2511
|
+
onMenuItemClick: u,
|
|
2512
|
+
children: /* @__PURE__ */ A(po, { ...e })
|
|
2513
|
+
}
|
|
2514
|
+
);
|
|
2515
|
+
}
|
|
2516
|
+
function bo({
|
|
2517
|
+
variant: e = "standard",
|
|
2518
|
+
...r
|
|
2519
|
+
}) {
|
|
2520
|
+
switch (e) {
|
|
2521
|
+
case "minimal":
|
|
2522
|
+
return /* @__PURE__ */ A(fo, { ...r });
|
|
2523
|
+
case "rail":
|
|
2524
|
+
return /* @__PURE__ */ A(go, { ...r });
|
|
2525
|
+
case "standard":
|
|
2526
|
+
default:
|
|
2527
|
+
return /* @__PURE__ */ A(co, { ...r });
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
const Pe = NA({
|
|
1005
2531
|
isVisible: !0
|
|
1006
|
-
}),
|
|
1007
|
-
const e =
|
|
1008
|
-
return
|
|
2532
|
+
}), bn = () => xA(Pe), de = NA({ params: {} }), mn = () => xA(de).params, Cn = () => {
|
|
2533
|
+
const e = Lr(), t = xA(de).params;
|
|
2534
|
+
return cA(() => {
|
|
1009
2535
|
if (!e)
|
|
1010
2536
|
return !1;
|
|
1011
|
-
const
|
|
1012
|
-
return
|
|
1013
|
-
}, [e]) ? e :
|
|
1014
|
-
},
|
|
1015
|
-
const [
|
|
1016
|
-
let
|
|
1017
|
-
return
|
|
1018
|
-
|
|
1019
|
-
}),
|
|
1020
|
-
}, []),
|
|
1021
|
-
if (!
|
|
1022
|
-
console.error("[ArchbaseAliveAbleRoutes] Invalid cacheKey for component registration:",
|
|
2537
|
+
const s = Object.keys(e);
|
|
2538
|
+
return s.length === 0 ? !1 : s.some((i) => e[i] !== void 0);
|
|
2539
|
+
}, [e]) ? e : t;
|
|
2540
|
+
}, Me = NA(null), Oe = () => xA(Me), qA = (e) => null, mo = (e) => e.includes(":"), Co = (e, r) => mo(e) ? r : e, ko = ({ children: e, maxKeepAliveTabs: r = 10, ...t }) => {
|
|
2541
|
+
const [o, s] = uA(/* @__PURE__ */ new Map()), [i, a] = uA(/* @__PURE__ */ new Set()), n = H((p, g) => {
|
|
2542
|
+
let S = null, v = 1 / 0;
|
|
2543
|
+
return p.forEach((C, P) => {
|
|
2544
|
+
P !== g && C.lastAccessedAt < v && (v = C.lastAccessedAt, S = P);
|
|
2545
|
+
}), S;
|
|
2546
|
+
}, []), c = H((p, g, S) => {
|
|
2547
|
+
if (!p || typeof p != "string") {
|
|
2548
|
+
console.error("[ArchbaseAliveAbleRoutes] Invalid cacheKey for component registration:", p);
|
|
1023
2549
|
return;
|
|
1024
2550
|
}
|
|
1025
|
-
if (
|
|
1026
|
-
console.warn("[ArchbaseAliveAbleRoutes] Attempting to register undefined component for cacheKey:",
|
|
2551
|
+
if (g === void 0) {
|
|
2552
|
+
console.warn("[ArchbaseAliveAbleRoutes] Attempting to register undefined component for cacheKey:", p);
|
|
1027
2553
|
return;
|
|
1028
2554
|
}
|
|
1029
|
-
|
|
1030
|
-
if (
|
|
1031
|
-
const
|
|
1032
|
-
return
|
|
2555
|
+
s((v) => {
|
|
2556
|
+
if (v.has(p)) {
|
|
2557
|
+
const P = new Map(v), N = v.get(p);
|
|
2558
|
+
return P.set(p, { ...N, lastAccessedAt: Date.now() }), P;
|
|
1033
2559
|
}
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
const
|
|
1037
|
-
|
|
2560
|
+
const C = new Map(v);
|
|
2561
|
+
if (C.size >= r) {
|
|
2562
|
+
const P = n(C, p);
|
|
2563
|
+
P && (C.delete(P), console.log(`[ArchbaseAliveAbleRoutes] LRU eviction: removed "${P}" (cache size: ${C.size}/${r})`));
|
|
1038
2564
|
}
|
|
1039
|
-
return
|
|
1040
|
-
element:
|
|
1041
|
-
params:
|
|
2565
|
+
return C.set(p, {
|
|
2566
|
+
element: g,
|
|
2567
|
+
params: S,
|
|
1042
2568
|
lastAccessedAt: Date.now()
|
|
1043
|
-
}),
|
|
2569
|
+
}), C;
|
|
1044
2570
|
});
|
|
1045
|
-
}, [
|
|
1046
|
-
|
|
1047
|
-
const
|
|
1048
|
-
if (!
|
|
1049
|
-
return
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
return
|
|
1053
|
-
const
|
|
1054
|
-
return
|
|
2571
|
+
}, [r, n]), l = H((p) => {
|
|
2572
|
+
s((g) => {
|
|
2573
|
+
const S = g.get(p);
|
|
2574
|
+
if (!S)
|
|
2575
|
+
return g;
|
|
2576
|
+
const v = Date.now();
|
|
2577
|
+
if (v - S.lastAccessedAt < 1e3)
|
|
2578
|
+
return g;
|
|
2579
|
+
const C = new Map(g);
|
|
2580
|
+
return C.set(p, { ...S, lastAccessedAt: v }), C;
|
|
1055
2581
|
});
|
|
1056
|
-
}, []),
|
|
1057
|
-
|
|
1058
|
-
const
|
|
1059
|
-
if (!
|
|
1060
|
-
return
|
|
1061
|
-
const
|
|
1062
|
-
return
|
|
2582
|
+
}, []), u = H((p, g) => {
|
|
2583
|
+
s((S) => {
|
|
2584
|
+
const v = S.get(p);
|
|
2585
|
+
if (!v || !(JSON.stringify(v.params) !== JSON.stringify(g)))
|
|
2586
|
+
return S;
|
|
2587
|
+
const P = new Map(S);
|
|
2588
|
+
return P.set(p, { ...v, params: g, lastAccessedAt: Date.now() }), P;
|
|
1063
2589
|
});
|
|
1064
|
-
}, []),
|
|
1065
|
-
if (!
|
|
2590
|
+
}, []), d = H((p) => {
|
|
2591
|
+
if (!p) {
|
|
1066
2592
|
console.error("[ArchbaseAliveAbleRoutes] Cannot unregister: invalid cacheKey");
|
|
1067
2593
|
return;
|
|
1068
2594
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
const
|
|
1072
|
-
return
|
|
1073
|
-
}), a((
|
|
1074
|
-
const
|
|
1075
|
-
return
|
|
2595
|
+
s((g) => {
|
|
2596
|
+
g.has(p) || console.warn("[ArchbaseAliveAbleRoutes] Attempting to unregister non-existent cacheKey:", p);
|
|
2597
|
+
const S = new Map(g);
|
|
2598
|
+
return S.delete(p), S;
|
|
2599
|
+
}), a((g) => {
|
|
2600
|
+
const S = new Set(g);
|
|
2601
|
+
return S.delete(p), S;
|
|
1076
2602
|
});
|
|
1077
|
-
}, []),
|
|
1078
|
-
a((
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
2603
|
+
}, []), h = H((p) => {
|
|
2604
|
+
a((g) => {
|
|
2605
|
+
const S = new Set(g);
|
|
2606
|
+
return S.add(p), S;
|
|
1081
2607
|
});
|
|
1082
|
-
}, []),
|
|
1083
|
-
cache:
|
|
1084
|
-
requestedUnregister:
|
|
1085
|
-
register:
|
|
1086
|
-
unregister:
|
|
1087
|
-
updateParams:
|
|
1088
|
-
requestUnregister:
|
|
1089
|
-
touchAccess:
|
|
1090
|
-
maxKeepAliveTabs:
|
|
1091
|
-
}), [
|
|
1092
|
-
return /* @__PURE__ */
|
|
1093
|
-
y.map((
|
|
1094
|
-
/* @__PURE__ */ A(
|
|
2608
|
+
}, []), f = gA.Children.toArray(e), y = f.filter((p) => gA.isValidElement(p) ? p.type === qA : !1), w = f.filter((p) => gA.isValidElement(p) ? p.type !== qA : !1), m = cA(() => ({
|
|
2609
|
+
cache: o,
|
|
2610
|
+
requestedUnregister: i,
|
|
2611
|
+
register: c,
|
|
2612
|
+
unregister: d,
|
|
2613
|
+
updateParams: u,
|
|
2614
|
+
requestUnregister: h,
|
|
2615
|
+
touchAccess: l,
|
|
2616
|
+
maxKeepAliveTabs: r
|
|
2617
|
+
}), [o, i, c, d, u, h, l, r]);
|
|
2618
|
+
return /* @__PURE__ */ R(Me.Provider, { value: m, children: [
|
|
2619
|
+
y.map((p) => /* @__PURE__ */ A(yo, { ...p.props, routesProps: t }, p.key)),
|
|
2620
|
+
/* @__PURE__ */ A(Re, { ...t, children: w })
|
|
1095
2621
|
] });
|
|
1096
|
-
},
|
|
1097
|
-
const
|
|
1098
|
-
if (!
|
|
2622
|
+
}, yo = ({ component: e, routesProps: r, ...t }) => {
|
|
2623
|
+
const o = Oe();
|
|
2624
|
+
if (!o)
|
|
1099
2625
|
throw new Error("DisplayRoute must be used within ArchbaseAliveAbleRoutes provider");
|
|
1100
|
-
const { cache:
|
|
1101
|
-
|
|
1102
|
-
if (
|
|
1103
|
-
const
|
|
1104
|
-
a(
|
|
2626
|
+
const { cache: s, requestedUnregister: i, register: a, unregister: n, updateParams: c, touchAccess: l } = o, [u, d] = uA(!1), [h, f] = uA({}), y = mA(null), w = oe(), m = cA(() => t.path ? Co(t.path, w.pathname) : null, [t.path, w.pathname]), p = cA(() => t.path ? Dr({ path: t.path, end: !0 }, w.pathname)?.params || {} : {}, [t.path, w.pathname]), g = mA(/* @__PURE__ */ new Set());
|
|
2627
|
+
OA(() => {
|
|
2628
|
+
if (u && e && m && !g.current.has(m)) {
|
|
2629
|
+
const P = typeof e == "function" ? gA.createElement(e) : e;
|
|
2630
|
+
a(m, P, p), g.current.add(m);
|
|
1105
2631
|
}
|
|
1106
|
-
}, [
|
|
1107
|
-
|
|
1108
|
-
}, [
|
|
1109
|
-
|
|
1110
|
-
}, [
|
|
1111
|
-
|
|
1112
|
-
}, [
|
|
1113
|
-
const
|
|
1114
|
-
return
|
|
1115
|
-
const
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
2632
|
+
}, [u, e, m, a, p]), OA(() => {
|
|
2633
|
+
u && m && g.current.has(m) && (c(m, p), f(p));
|
|
2634
|
+
}, [u, m, p, c]), iA(() => {
|
|
2635
|
+
u && m && s.has(m) && l(m);
|
|
2636
|
+
}, [u, m, l, s]), OA(() => {
|
|
2637
|
+
m && i.has(m) && (n(m), g.current.delete(m));
|
|
2638
|
+
}, [m, i, n]);
|
|
2639
|
+
const S = m ? s.get(m) : null, v = cA(() => u ? p : S ? S.params : h, [u, p, S, h]), C = mA(u);
|
|
2640
|
+
return iA(() => {
|
|
2641
|
+
const P = C.current;
|
|
2642
|
+
if (C.current = u, u && !P && y.current) {
|
|
2643
|
+
const N = setTimeout(() => {
|
|
1118
2644
|
window.dispatchEvent(new Event("resize")), y.current?.dispatchEvent(
|
|
1119
2645
|
new CustomEvent("keepalive:visible", { bubbles: !0 })
|
|
1120
2646
|
);
|
|
1121
2647
|
}, 50);
|
|
1122
|
-
return () => clearTimeout(
|
|
2648
|
+
return () => clearTimeout(N);
|
|
1123
2649
|
}
|
|
1124
|
-
}, [
|
|
1125
|
-
|
|
2650
|
+
}, [u]), /* @__PURE__ */ R(yA, { children: [
|
|
2651
|
+
S && /* @__PURE__ */ A(Pe.Provider, { value: { isVisible: u }, children: /* @__PURE__ */ A(de.Provider, { value: { params: v }, children: /* @__PURE__ */ A(
|
|
1126
2652
|
"div",
|
|
1127
2653
|
{
|
|
1128
2654
|
ref: y,
|
|
1129
2655
|
style: {
|
|
1130
2656
|
// Usa visibility + position ao invés de display:none
|
|
1131
2657
|
// para manter dimensões e permitir que ResizeObserver funcione
|
|
1132
|
-
position:
|
|
1133
|
-
visibility:
|
|
1134
|
-
pointerEvents:
|
|
2658
|
+
position: u ? "relative" : "absolute",
|
|
2659
|
+
visibility: u ? "visible" : "hidden",
|
|
2660
|
+
pointerEvents: u ? "auto" : "none",
|
|
1135
2661
|
width: "100%",
|
|
1136
2662
|
height: "100%",
|
|
1137
|
-
top:
|
|
1138
|
-
left:
|
|
1139
|
-
zIndex:
|
|
1140
|
-
overflow:
|
|
2663
|
+
top: u ? void 0 : 0,
|
|
2664
|
+
left: u ? void 0 : 0,
|
|
2665
|
+
zIndex: u ? 1 : -1,
|
|
2666
|
+
overflow: u ? "auto" : "hidden"
|
|
1141
2667
|
},
|
|
1142
|
-
children:
|
|
2668
|
+
children: S.element
|
|
1143
2669
|
}
|
|
1144
2670
|
) }) }),
|
|
1145
|
-
/* @__PURE__ */ A(
|
|
1146
|
-
|
|
2671
|
+
/* @__PURE__ */ A(Re, { ...r, children: /* @__PURE__ */ A(
|
|
2672
|
+
ZA,
|
|
1147
2673
|
{
|
|
1148
|
-
...
|
|
2674
|
+
...t,
|
|
1149
2675
|
element: /* @__PURE__ */ A(
|
|
1150
|
-
|
|
2676
|
+
wo,
|
|
1151
2677
|
{
|
|
1152
|
-
onRouteMatchChange:
|
|
1153
|
-
onParamsChange:
|
|
2678
|
+
onRouteMatchChange: d,
|
|
2679
|
+
onParamsChange: f
|
|
1154
2680
|
}
|
|
1155
2681
|
)
|
|
1156
2682
|
}
|
|
1157
2683
|
) })
|
|
1158
2684
|
] });
|
|
1159
|
-
},
|
|
1160
|
-
const
|
|
1161
|
-
return
|
|
2685
|
+
}, wo = ({ onRouteMatchChange: e, onParamsChange: r }) => {
|
|
2686
|
+
const t = oe();
|
|
2687
|
+
return OA(() => (e(!0), () => {
|
|
1162
2688
|
e(!1);
|
|
1163
|
-
}), [e]),
|
|
1164
|
-
}, [
|
|
2689
|
+
}), [e]), OA(() => {
|
|
2690
|
+
}, [t.pathname, r]), null;
|
|
1165
2691
|
};
|
|
1166
|
-
function
|
|
2692
|
+
function vo(e, r, t, o, s, i) {
|
|
1167
2693
|
return /* @__PURE__ */ A(
|
|
1168
2694
|
"div",
|
|
1169
2695
|
{
|
|
1170
2696
|
style: {
|
|
1171
2697
|
position: "absolute",
|
|
1172
|
-
left:
|
|
2698
|
+
left: t.collapsed ? `calc(${s} - 14px)` : `calc(${o} - 14px)`,
|
|
1173
2699
|
top: "calc(100vh / 2)",
|
|
1174
2700
|
zIndex: "101"
|
|
1175
2701
|
},
|
|
1176
2702
|
children: /* @__PURE__ */ A(
|
|
1177
|
-
|
|
2703
|
+
EA,
|
|
1178
2704
|
{
|
|
1179
|
-
bg:
|
|
1180
|
-
color:
|
|
2705
|
+
bg: r.colors[r.primaryColor][4],
|
|
2706
|
+
color: r.colors[r.primaryColor][6],
|
|
1181
2707
|
variant: "filled",
|
|
1182
2708
|
radius: "xl",
|
|
1183
|
-
onClick:
|
|
1184
|
-
children:
|
|
2709
|
+
onClick: i,
|
|
2710
|
+
children: t.collapsed ? /* @__PURE__ */ A(Ae, {}) : /* @__PURE__ */ A(Ar, {})
|
|
1185
2711
|
}
|
|
1186
2712
|
)
|
|
1187
2713
|
}
|
|
1188
2714
|
);
|
|
1189
2715
|
}
|
|
1190
|
-
function
|
|
2716
|
+
function xo({
|
|
1191
2717
|
children: e,
|
|
1192
|
-
header:
|
|
1193
|
-
footer:
|
|
1194
|
-
sideBarWidth:
|
|
1195
|
-
sideBarCollapsedWidth:
|
|
1196
|
-
sideBarHiddenBreakPoint:
|
|
2718
|
+
header: r,
|
|
2719
|
+
footer: t,
|
|
2720
|
+
sideBarWidth: o = "360px",
|
|
2721
|
+
sideBarCollapsedWidth: s = "74px",
|
|
2722
|
+
sideBarHiddenBreakPoint: i,
|
|
1197
2723
|
sideBarFooterHeight: a,
|
|
1198
2724
|
sideBarFooterContent: n,
|
|
1199
|
-
onCollapsedSideBar:
|
|
1200
|
-
onHiddenSidebar:
|
|
1201
|
-
sidebarSelectedGroupName:
|
|
1202
|
-
sidebarDefaultGroupIcon:
|
|
1203
|
-
sideBarHeaderHeight:
|
|
1204
|
-
sideBarHeaderContent:
|
|
2725
|
+
onCollapsedSideBar: c,
|
|
2726
|
+
onHiddenSidebar: l,
|
|
2727
|
+
sidebarSelectedGroupName: u,
|
|
2728
|
+
sidebarDefaultGroupIcon: d,
|
|
2729
|
+
sideBarHeaderHeight: h,
|
|
2730
|
+
sideBarHeaderContent: f,
|
|
1205
2731
|
selectedGroupColor: y = "#132441",
|
|
1206
|
-
groupColor:
|
|
1207
|
-
backgroundGroupColor:
|
|
1208
|
-
groupLabelDarkColor:
|
|
1209
|
-
groupLabelLightColor:
|
|
1210
|
-
headerColor:
|
|
1211
|
-
footerHeight:
|
|
1212
|
-
iconsWithBackground:
|
|
1213
|
-
menuItemHeight:
|
|
1214
|
-
showSideBar:
|
|
1215
|
-
showHeader:
|
|
2732
|
+
groupColor: w = "white",
|
|
2733
|
+
backgroundGroupColor: m = "#132441",
|
|
2734
|
+
groupLabelDarkColor: p = "white",
|
|
2735
|
+
groupLabelLightColor: g = "white",
|
|
2736
|
+
headerColor: S,
|
|
2737
|
+
footerHeight: v,
|
|
2738
|
+
iconsWithBackground: C,
|
|
2739
|
+
menuItemHeight: P,
|
|
2740
|
+
showSideBar: N = !0,
|
|
2741
|
+
showHeader: j = !0,
|
|
1216
2742
|
headerStyle: J = {},
|
|
1217
|
-
highlightActiveMenuItem:
|
|
1218
|
-
customRenderSidebar:
|
|
1219
|
-
showCollapsedButton:
|
|
1220
|
-
sideBarBackgroundDarkColor:
|
|
1221
|
-
sideBarBackgroundLightColor:
|
|
1222
|
-
sideBarTextDarkColor:
|
|
1223
|
-
sideBarTextLightColor:
|
|
1224
|
-
sideBarIconDarkColor:
|
|
1225
|
-
sideBarIconLightColor:
|
|
1226
|
-
sideBarCollapsedSubmenuWidth:
|
|
1227
|
-
|
|
2743
|
+
highlightActiveMenuItem: D = !0,
|
|
2744
|
+
customRenderSidebar: M,
|
|
2745
|
+
showCollapsedButton: F = !0,
|
|
2746
|
+
sideBarBackgroundDarkColor: Q,
|
|
2747
|
+
sideBarBackgroundLightColor: T,
|
|
2748
|
+
sideBarTextDarkColor: x,
|
|
2749
|
+
sideBarTextLightColor: I,
|
|
2750
|
+
sideBarIconDarkColor: Y,
|
|
2751
|
+
sideBarIconLightColor: q,
|
|
2752
|
+
sideBarCollapsedSubmenuWidth: k,
|
|
2753
|
+
sidebarActiveColor: b,
|
|
2754
|
+
maxKeepAliveTabs: E = 10,
|
|
2755
|
+
sidebarVariant: O = "legacy",
|
|
2756
|
+
sidebarShowSearch: G = !1
|
|
1228
2757
|
}) {
|
|
1229
|
-
const
|
|
1230
|
-
`(max-width: ${
|
|
1231
|
-
), K = (
|
|
1232
|
-
|
|
1233
|
-
},
|
|
1234
|
-
|
|
1235
|
-
},
|
|
1236
|
-
let
|
|
1237
|
-
return
|
|
1238
|
-
},
|
|
1239
|
-
|
|
1240
|
-
return
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
/* @__PURE__ */ A(TA, { path: N.link, component: N.component }, `${N.link}_${LA}`)
|
|
1250
|
-
) : Q.push(
|
|
1251
|
-
/* @__PURE__ */ A(MA, { path: N.link, element: N.component }, `${N.link}_${LA}`)
|
|
2758
|
+
const L = hA(), z = xA(VA), { colorScheme: fA } = oA(), B = Pr(), [tA, eA] = Mr(), sA = zr(
|
|
2759
|
+
`(max-width: ${i ? pA(i) : L.breakpoints.md})`
|
|
2760
|
+
), K = (_) => {
|
|
2761
|
+
_.link && (_.routeParams ? B(_.link, {}, _.routeParams) : B(_.link));
|
|
2762
|
+
}, rA = (_, $) => {
|
|
2763
|
+
_ == $ && z.collapsed && z.setCollapsed(!1), z.setCollapsed(_ == $);
|
|
2764
|
+
}, CA = () => "100%", kA = () => {
|
|
2765
|
+
let _ = 0, $ = 0;
|
|
2766
|
+
return h && (_ = Number(pA(h))), a && ($ = Number(pA(a))), `calc(100vh - 28px - ${_ + $}px)`;
|
|
2767
|
+
}, SA = cA(() => {
|
|
2768
|
+
const _ = [];
|
|
2769
|
+
return z.navigationData.forEach(($, bA) => {
|
|
2770
|
+
$.links ? $.links.forEach((lA, BA) => {
|
|
2771
|
+
lA.keepAlive ? _.push(
|
|
2772
|
+
/* @__PURE__ */ A(qA, { path: lA.link, component: lA.component }, `${lA.link}_${BA}`)
|
|
2773
|
+
) : _.push(/* @__PURE__ */ A(ZA, { path: lA.link, element: lA.component }, `${lA.link}_${BA}`));
|
|
2774
|
+
}) : $.keepAlive ? _.push(
|
|
2775
|
+
/* @__PURE__ */ A(qA, { path: $.link, component: $.component }, `${$.link}_${bA}`)
|
|
2776
|
+
) : _.push(
|
|
2777
|
+
/* @__PURE__ */ A(ZA, { path: $.link, element: $.component }, `${$.link}_${bA}`)
|
|
1252
2778
|
);
|
|
1253
|
-
}),
|
|
1254
|
-
}, [
|
|
1255
|
-
|
|
1256
|
-
}, [
|
|
1257
|
-
|
|
1258
|
-
}, [
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
}, [
|
|
1262
|
-
|
|
1263
|
-
}, [
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1266
|
-
|
|
2779
|
+
}), _;
|
|
2780
|
+
}, [z.navigationData, z.collapsed]), V = H(() => {
|
|
2781
|
+
z.setCollapsed(!z.collapsed);
|
|
2782
|
+
}, [z.setCollapsed, z.collapsed]), nA = H(() => {
|
|
2783
|
+
z.setHidden(!z.hidden);
|
|
2784
|
+
}, [z.setHidden, z.hidden]);
|
|
2785
|
+
iA(() => {
|
|
2786
|
+
l && l(z.hidden);
|
|
2787
|
+
}, [z.hidden, nA]), iA(() => {
|
|
2788
|
+
c && c(z.collapsed);
|
|
2789
|
+
}, [z.collapsed, c]);
|
|
2790
|
+
const zA = z.collapsed ? s : o, RA = (_, $ = !1) => M ? M({ width: o, height: _, isHidden: sA }) : O === "legacy" ? /* @__PURE__ */ A(
|
|
2791
|
+
oo,
|
|
2792
|
+
{
|
|
2793
|
+
navigationData: z.navigationData,
|
|
2794
|
+
sidebarHeight: _,
|
|
2795
|
+
sidebarGroupWidth: s,
|
|
2796
|
+
sidebarCollapsedWidth: s,
|
|
2797
|
+
selectedGroupColor: y,
|
|
2798
|
+
groupColor: w,
|
|
2799
|
+
backgroundGroupColor: m,
|
|
2800
|
+
groupLabelDarkColor: p,
|
|
2801
|
+
groupLabelLightColor: g,
|
|
2802
|
+
showGroupLabels: !1,
|
|
2803
|
+
collapsed: $ ? !1 : z.collapsed,
|
|
2804
|
+
sidebarWidth: o,
|
|
2805
|
+
isHidden: sA,
|
|
2806
|
+
onMenuItemClick: K,
|
|
2807
|
+
onClickActionIcon: rA,
|
|
2808
|
+
sideBarFooterHeight: a,
|
|
2809
|
+
sideBarFooterContent: n,
|
|
2810
|
+
sideBarHeaderContent: f,
|
|
2811
|
+
theme: L,
|
|
2812
|
+
sidebarRef: tA,
|
|
2813
|
+
defaultGroupIcon: d,
|
|
2814
|
+
selectedGroupName: u,
|
|
2815
|
+
iconsWithBackground: C,
|
|
2816
|
+
menuItemHeight: P,
|
|
2817
|
+
highlightActiveMenuItem: D,
|
|
2818
|
+
backgroundDarkColor: Q,
|
|
2819
|
+
backgroundLightColor: T,
|
|
2820
|
+
textDarkColor: x,
|
|
2821
|
+
textLightColor: I,
|
|
2822
|
+
iconDarkColor: Y,
|
|
2823
|
+
iconLightColor: q,
|
|
2824
|
+
collapsedSubmenuWidth: k,
|
|
2825
|
+
isLoading: z.isLoadingPermissions,
|
|
2826
|
+
loadingError: z.permissionsError
|
|
2827
|
+
}
|
|
2828
|
+
) : /* @__PURE__ */ A(
|
|
2829
|
+
bo,
|
|
1267
2830
|
{
|
|
1268
|
-
|
|
1269
|
-
|
|
2831
|
+
navigationData: z.navigationData,
|
|
2832
|
+
variant: O,
|
|
2833
|
+
width: o,
|
|
2834
|
+
collapsedWidth: s,
|
|
2835
|
+
height: _,
|
|
2836
|
+
groupColumnWidth: s,
|
|
2837
|
+
collapsed: $ ? !1 : z.collapsed,
|
|
2838
|
+
onCollapsedChange: (bA) => z.setCollapsed(bA),
|
|
2839
|
+
activeGroup: u,
|
|
2840
|
+
onActiveGroupChange: (bA) => {
|
|
2841
|
+
},
|
|
2842
|
+
defaultGroupIcon: d,
|
|
2843
|
+
showGroupLabels: !1,
|
|
2844
|
+
onMenuItemClick: K,
|
|
2845
|
+
showSearch: G,
|
|
2846
|
+
header: f,
|
|
2847
|
+
footer: n,
|
|
2848
|
+
footerHeight: a,
|
|
2849
|
+
isLoading: z.isLoadingPermissions,
|
|
2850
|
+
loadingError: z.permissionsError,
|
|
2851
|
+
theme: L,
|
|
2852
|
+
highlightActiveItem: D,
|
|
2853
|
+
backgroundDarkColor: Q,
|
|
2854
|
+
backgroundLightColor: T,
|
|
2855
|
+
textDarkColor: x,
|
|
2856
|
+
textLightColor: I,
|
|
2857
|
+
iconDarkColor: Y,
|
|
2858
|
+
iconLightColor: q,
|
|
2859
|
+
groupBackgroundColor: m,
|
|
2860
|
+
selectedGroupColor: y,
|
|
2861
|
+
groupColor: w,
|
|
2862
|
+
groupLabelDarkColor: p,
|
|
2863
|
+
groupLabelLightColor: g,
|
|
2864
|
+
activeColor: b,
|
|
2865
|
+
withBorder: !1,
|
|
2866
|
+
sidebarRef: tA
|
|
2867
|
+
}
|
|
2868
|
+
), dA = fA === "dark" ? Q ?? L.colors.dark[7] : T ?? L.white;
|
|
2869
|
+
return /* @__PURE__ */ R(
|
|
2870
|
+
PA,
|
|
2871
|
+
{
|
|
2872
|
+
header: { height: "60px", collapsed: !j },
|
|
2873
|
+
navbar: {
|
|
2874
|
+
width: zA,
|
|
2875
|
+
breakpoint: 0,
|
|
2876
|
+
// nunca colapsar automaticamente
|
|
2877
|
+
collapsed: { mobile: sA, desktop: !N }
|
|
2878
|
+
},
|
|
2879
|
+
footer: { height: v || "0px" },
|
|
1270
2880
|
styles: {
|
|
1271
2881
|
main: {
|
|
1272
|
-
background:
|
|
2882
|
+
background: fA === "dark" ? L.colors.dark[8] : L.colors.gray[0],
|
|
1273
2883
|
overflow: "hidden"
|
|
2884
|
+
},
|
|
2885
|
+
navbar: {
|
|
2886
|
+
background: dA,
|
|
2887
|
+
borderRight: "none"
|
|
1274
2888
|
}
|
|
1275
2889
|
},
|
|
1276
2890
|
children: [
|
|
1277
2891
|
/* @__PURE__ */ A(
|
|
1278
|
-
|
|
2892
|
+
PA.Header,
|
|
1279
2893
|
{
|
|
1280
2894
|
p: "xs",
|
|
1281
|
-
color:
|
|
2895
|
+
color: S,
|
|
1282
2896
|
display: "flex",
|
|
1283
2897
|
style: {
|
|
1284
2898
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
@@ -1286,592 +2900,521 @@ function Gr({
|
|
|
1286
2900
|
borderBottom: "none",
|
|
1287
2901
|
...J
|
|
1288
2902
|
},
|
|
1289
|
-
children:
|
|
2903
|
+
children: r
|
|
1290
2904
|
}
|
|
1291
2905
|
),
|
|
1292
|
-
/* @__PURE__ */ A(
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
sidebarHeight: fA(),
|
|
1297
|
-
sidebarGroupWidth: t,
|
|
1298
|
-
sidebarCollapsedWidth: t,
|
|
1299
|
-
selectedGroupColor: y,
|
|
1300
|
-
groupColor: I,
|
|
1301
|
-
backgroundGroupColor: x,
|
|
1302
|
-
groupLabelDarkColor: l,
|
|
1303
|
-
groupLabelLightColor: h,
|
|
1304
|
-
showGroupLabels: !1,
|
|
1305
|
-
collapsed: p.collapsed,
|
|
1306
|
-
sidebarWidth: r,
|
|
1307
|
-
isHidden: D,
|
|
1308
|
-
onMenuItemClick: K,
|
|
1309
|
-
onClickActionIcon: pA,
|
|
1310
|
-
sideBarFooterHeight: a,
|
|
1311
|
-
sideBarFooterContent: n,
|
|
1312
|
-
sideBarHeaderContent: b,
|
|
1313
|
-
theme: m,
|
|
1314
|
-
sidebarRef: q,
|
|
1315
|
-
defaultGroupIcon: C,
|
|
1316
|
-
selectedGroupName: s,
|
|
1317
|
-
iconsWithBackground: k,
|
|
1318
|
-
menuItemHeight: R,
|
|
1319
|
-
highlightActiveMenuItem: H,
|
|
1320
|
-
backgroundDarkColor: T,
|
|
1321
|
-
backgroundLightColor: U,
|
|
1322
|
-
textDarkColor: W,
|
|
1323
|
-
textLightColor: G,
|
|
1324
|
-
iconDarkColor: rA,
|
|
1325
|
-
iconLightColor: F,
|
|
1326
|
-
collapsedSubmenuWidth: g,
|
|
1327
|
-
isLoading: p.isLoadingPermissions,
|
|
1328
|
-
loadingError: p.permissionsError
|
|
1329
|
-
}
|
|
1330
|
-
) : void 0 }),
|
|
1331
|
-
/* @__PURE__ */ z(mA.Main, { bg: L === "dark" ? m.colors.dark[8] : m.colors.gray[0], children: [
|
|
1332
|
-
!D && eA && Hr(
|
|
2906
|
+
/* @__PURE__ */ A(PA.Navbar, { children: !sA && N ? RA(CA(), !1) : void 0 }),
|
|
2907
|
+
/* @__PURE__ */ R(PA.Main, { bg: fA === "dark" ? L.colors.dark[8] : L.colors.gray[0], children: [
|
|
2908
|
+
!sA && F && vo(
|
|
2909
|
+
fA,
|
|
1333
2910
|
L,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
SA
|
|
2911
|
+
z,
|
|
2912
|
+
o,
|
|
2913
|
+
s,
|
|
2914
|
+
V
|
|
1339
2915
|
),
|
|
1340
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ R(
|
|
1341
2917
|
"div",
|
|
1342
2918
|
{
|
|
1343
2919
|
style: {
|
|
1344
|
-
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) -
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
marginLeft: `calc(${D ? "0px" : RA} + 0.5rem)`,
|
|
1348
|
-
border: `1px solid ${L === "dark" ? m.colors.dark[4] : "#e4e9ef"}`,
|
|
2920
|
+
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - 1rem)",
|
|
2921
|
+
margin: "0.5rem",
|
|
2922
|
+
border: `1px solid ${fA === "dark" ? L.colors.dark[4] : "#e4e9ef"}`,
|
|
1349
2923
|
borderRadius: "4px",
|
|
1350
|
-
overflow: "
|
|
2924
|
+
overflow: "hidden"
|
|
1351
2925
|
},
|
|
1352
2926
|
children: [
|
|
1353
2927
|
e,
|
|
1354
|
-
/* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */
|
|
1355
|
-
...
|
|
2928
|
+
/* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */ R(ko, { maxKeepAliveTabs: E, children: [
|
|
2929
|
+
...SA
|
|
1356
2930
|
] }) })
|
|
1357
2931
|
]
|
|
1358
2932
|
}
|
|
1359
2933
|
),
|
|
1360
|
-
|
|
1361
|
-
|
|
2934
|
+
N && /* @__PURE__ */ A(
|
|
2935
|
+
ye,
|
|
1362
2936
|
{
|
|
1363
|
-
opened:
|
|
1364
|
-
onClose:
|
|
1365
|
-
size:
|
|
2937
|
+
opened: z.hidden || !1,
|
|
2938
|
+
onClose: nA,
|
|
2939
|
+
size: o,
|
|
1366
2940
|
padding: 0,
|
|
1367
2941
|
styles: {
|
|
1368
2942
|
header: { minHeight: "10px" }
|
|
1369
2943
|
},
|
|
1370
|
-
children:
|
|
1371
|
-
Ae,
|
|
1372
|
-
{
|
|
1373
|
-
navigationData: p.navigationData,
|
|
1374
|
-
sidebarWidth: r,
|
|
1375
|
-
sidebarHeight: EA(),
|
|
1376
|
-
sidebarCollapsedWidth: t,
|
|
1377
|
-
sidebarGroupWidth: t,
|
|
1378
|
-
selectedGroupColor: y,
|
|
1379
|
-
groupColor: I,
|
|
1380
|
-
backgroundGroupColor: x,
|
|
1381
|
-
groupLabelDarkColor: l,
|
|
1382
|
-
groupLabelLightColor: h,
|
|
1383
|
-
showGroupLabels: !1,
|
|
1384
|
-
isHidden: D,
|
|
1385
|
-
onMenuItemClick: K,
|
|
1386
|
-
onClickActionIcon: pA,
|
|
1387
|
-
theme: m,
|
|
1388
|
-
sidebarRef: q,
|
|
1389
|
-
defaultGroupIcon: C,
|
|
1390
|
-
selectedGroupName: s,
|
|
1391
|
-
iconsWithBackground: k,
|
|
1392
|
-
menuItemHeight: R,
|
|
1393
|
-
sideBarHeaderContent: b,
|
|
1394
|
-
sideBarFooterContent: n,
|
|
1395
|
-
sideBarFooterHeight: a,
|
|
1396
|
-
highlightActiveMenuItem: H,
|
|
1397
|
-
backgroundDarkColor: T,
|
|
1398
|
-
backgroundLightColor: U,
|
|
1399
|
-
textDarkColor: W,
|
|
1400
|
-
textLightColor: G,
|
|
1401
|
-
iconDarkColor: rA,
|
|
1402
|
-
iconLightColor: F,
|
|
1403
|
-
collapsedSubmenuWidth: g,
|
|
1404
|
-
isLoading: p.isLoadingPermissions,
|
|
1405
|
-
loadingError: p.permissionsError
|
|
1406
|
-
}
|
|
1407
|
-
)
|
|
2944
|
+
children: RA(kA(), !0)
|
|
1408
2945
|
}
|
|
1409
2946
|
)
|
|
1410
2947
|
] }),
|
|
1411
|
-
/* @__PURE__ */ A(
|
|
2948
|
+
/* @__PURE__ */ A(PA.Footer, { children: t })
|
|
1412
2949
|
]
|
|
1413
2950
|
}
|
|
1414
2951
|
);
|
|
1415
2952
|
}
|
|
1416
|
-
function
|
|
2953
|
+
function kn({
|
|
1417
2954
|
navigationRootLink: e = "/",
|
|
1418
|
-
navigationData:
|
|
1419
|
-
user:
|
|
1420
|
-
children:
|
|
1421
|
-
header:
|
|
1422
|
-
footer:
|
|
2955
|
+
navigationData: r,
|
|
2956
|
+
user: t,
|
|
2957
|
+
children: o,
|
|
2958
|
+
header: s,
|
|
2959
|
+
footer: i,
|
|
1423
2960
|
owner: a,
|
|
1424
2961
|
company: n,
|
|
1425
|
-
sideBarWidth:
|
|
1426
|
-
sideBarCollapsedWidth:
|
|
1427
|
-
sideBarHiddenBreakPoint:
|
|
1428
|
-
sideBarFooterHeight:
|
|
1429
|
-
sideBarFooterContent:
|
|
1430
|
-
onCollapsedSideBar:
|
|
2962
|
+
sideBarWidth: c,
|
|
2963
|
+
sideBarCollapsedWidth: l,
|
|
2964
|
+
sideBarHiddenBreakPoint: u,
|
|
2965
|
+
sideBarFooterHeight: d,
|
|
2966
|
+
sideBarFooterContent: h,
|
|
2967
|
+
onCollapsedSideBar: f,
|
|
1431
2968
|
onHiddenSidebar: y,
|
|
1432
|
-
sidebarDefaultGroupIcon:
|
|
1433
|
-
sidebarSelectedGroupName:
|
|
1434
|
-
sideBarHeaderHeight:
|
|
1435
|
-
sideBarHeaderContent:
|
|
1436
|
-
selectedGroupColor:
|
|
1437
|
-
groupColor:
|
|
1438
|
-
backgroundGroupColor:
|
|
1439
|
-
groupLabelDarkColor:
|
|
1440
|
-
groupLabelLightColor:
|
|
1441
|
-
headerColor:
|
|
2969
|
+
sidebarDefaultGroupIcon: w,
|
|
2970
|
+
sidebarSelectedGroupName: m,
|
|
2971
|
+
sideBarHeaderHeight: p,
|
|
2972
|
+
sideBarHeaderContent: g,
|
|
2973
|
+
selectedGroupColor: S = "#132441",
|
|
2974
|
+
groupColor: v = "white",
|
|
2975
|
+
backgroundGroupColor: C = "#132441",
|
|
2976
|
+
groupLabelDarkColor: P = "white",
|
|
2977
|
+
groupLabelLightColor: N = "white",
|
|
2978
|
+
headerColor: j,
|
|
1442
2979
|
footerHeight: J,
|
|
1443
|
-
iconsWithBackground:
|
|
1444
|
-
menuItemHeight:
|
|
1445
|
-
showSideBar:
|
|
1446
|
-
showHeader:
|
|
1447
|
-
headerStyle:
|
|
1448
|
-
highlightActiveMenuItem:
|
|
1449
|
-
enableSecurity:
|
|
1450
|
-
securityOptions:
|
|
1451
|
-
customRenderSidebar:
|
|
1452
|
-
onNavigationDataChange:
|
|
1453
|
-
showCollapsedButton:
|
|
1454
|
-
initialSidebarCollapsed:
|
|
1455
|
-
sideBarBackgroundDarkColor:
|
|
1456
|
-
sideBarBackgroundLightColor:
|
|
1457
|
-
sideBarTextDarkColor:
|
|
1458
|
-
sideBarTextLightColor:
|
|
1459
|
-
sideBarIconDarkColor:
|
|
1460
|
-
sideBarIconLightColor:
|
|
1461
|
-
sideBarCollapsedSubmenuWidth:
|
|
1462
|
-
|
|
2980
|
+
iconsWithBackground: D,
|
|
2981
|
+
menuItemHeight: M,
|
|
2982
|
+
showSideBar: F,
|
|
2983
|
+
showHeader: Q,
|
|
2984
|
+
headerStyle: T,
|
|
2985
|
+
highlightActiveMenuItem: x,
|
|
2986
|
+
enableSecurity: I = !1,
|
|
2987
|
+
securityOptions: Y,
|
|
2988
|
+
customRenderSidebar: q,
|
|
2989
|
+
onNavigationDataChange: k,
|
|
2990
|
+
showCollapsedButton: b,
|
|
2991
|
+
initialSidebarCollapsed: E = !1,
|
|
2992
|
+
sideBarBackgroundDarkColor: O,
|
|
2993
|
+
sideBarBackgroundLightColor: G,
|
|
2994
|
+
sideBarTextDarkColor: L,
|
|
2995
|
+
sideBarTextLightColor: z,
|
|
2996
|
+
sideBarIconDarkColor: fA,
|
|
2997
|
+
sideBarIconLightColor: B,
|
|
2998
|
+
sideBarCollapsedSubmenuWidth: tA,
|
|
2999
|
+
sidebarActiveColor: eA,
|
|
3000
|
+
maxKeepAliveTabs: sA = 10,
|
|
3001
|
+
sidebarVariant: K = "legacy",
|
|
3002
|
+
sidebarShowSearch: rA = !1
|
|
1463
3003
|
}) {
|
|
1464
3004
|
return /* @__PURE__ */ A(
|
|
1465
|
-
|
|
3005
|
+
Vr,
|
|
1466
3006
|
{
|
|
1467
|
-
navigationData:
|
|
3007
|
+
navigationData: r,
|
|
1468
3008
|
navigationRootLink: e,
|
|
1469
|
-
user:
|
|
3009
|
+
user: t,
|
|
1470
3010
|
owner: a,
|
|
1471
3011
|
company: n,
|
|
1472
|
-
enableSecurity:
|
|
1473
|
-
securityOptions:
|
|
1474
|
-
onNavigationDataChange:
|
|
1475
|
-
initialSidebarCollapsed:
|
|
3012
|
+
enableSecurity: I,
|
|
3013
|
+
securityOptions: Y,
|
|
3014
|
+
onNavigationDataChange: k,
|
|
3015
|
+
initialSidebarCollapsed: E,
|
|
1476
3016
|
children: /* @__PURE__ */ A(
|
|
1477
|
-
|
|
3017
|
+
xo,
|
|
1478
3018
|
{
|
|
1479
3019
|
navigationRootLink: e,
|
|
1480
|
-
user:
|
|
1481
|
-
header:
|
|
1482
|
-
footer:
|
|
3020
|
+
user: t,
|
|
3021
|
+
header: s,
|
|
3022
|
+
footer: i,
|
|
1483
3023
|
owner: a,
|
|
1484
3024
|
company: n,
|
|
1485
|
-
sideBarWidth:
|
|
1486
|
-
sideBarCollapsedWidth:
|
|
1487
|
-
sideBarHiddenBreakPoint:
|
|
1488
|
-
sideBarHeaderHeight:
|
|
1489
|
-
sideBarHeaderContent:
|
|
1490
|
-
sideBarFooterHeight:
|
|
1491
|
-
sideBarFooterContent:
|
|
1492
|
-
selectedGroupColor:
|
|
1493
|
-
groupColor:
|
|
1494
|
-
backgroundGroupColor:
|
|
1495
|
-
groupLabelDarkColor:
|
|
1496
|
-
groupLabelLightColor:
|
|
1497
|
-
onCollapsedSideBar:
|
|
3025
|
+
sideBarWidth: c,
|
|
3026
|
+
sideBarCollapsedWidth: l,
|
|
3027
|
+
sideBarHiddenBreakPoint: u,
|
|
3028
|
+
sideBarHeaderHeight: p,
|
|
3029
|
+
sideBarHeaderContent: g,
|
|
3030
|
+
sideBarFooterHeight: d,
|
|
3031
|
+
sideBarFooterContent: h,
|
|
3032
|
+
selectedGroupColor: S,
|
|
3033
|
+
groupColor: v,
|
|
3034
|
+
backgroundGroupColor: C,
|
|
3035
|
+
groupLabelDarkColor: P,
|
|
3036
|
+
groupLabelLightColor: N,
|
|
3037
|
+
onCollapsedSideBar: f,
|
|
1498
3038
|
onHiddenSidebar: y,
|
|
1499
|
-
sidebarDefaultGroupIcon:
|
|
1500
|
-
sidebarSelectedGroupName:
|
|
1501
|
-
headerColor:
|
|
3039
|
+
sidebarDefaultGroupIcon: w,
|
|
3040
|
+
sidebarSelectedGroupName: m,
|
|
3041
|
+
headerColor: j,
|
|
1502
3042
|
footerHeight: J,
|
|
1503
|
-
iconsWithBackground:
|
|
1504
|
-
menuItemHeight:
|
|
1505
|
-
showSideBar:
|
|
1506
|
-
showHeader:
|
|
1507
|
-
headerStyle:
|
|
1508
|
-
highlightActiveMenuItem:
|
|
1509
|
-
enableSecurity:
|
|
1510
|
-
customRenderSidebar:
|
|
1511
|
-
showCollapsedButton:
|
|
1512
|
-
sideBarBackgroundDarkColor:
|
|
1513
|
-
sideBarBackgroundLightColor:
|
|
1514
|
-
sideBarTextDarkColor:
|
|
1515
|
-
sideBarTextLightColor:
|
|
1516
|
-
sideBarIconDarkColor:
|
|
1517
|
-
sideBarIconLightColor:
|
|
1518
|
-
sideBarCollapsedSubmenuWidth:
|
|
1519
|
-
|
|
1520
|
-
|
|
3043
|
+
iconsWithBackground: D,
|
|
3044
|
+
menuItemHeight: M,
|
|
3045
|
+
showSideBar: F,
|
|
3046
|
+
showHeader: Q,
|
|
3047
|
+
headerStyle: T,
|
|
3048
|
+
highlightActiveMenuItem: x,
|
|
3049
|
+
enableSecurity: I,
|
|
3050
|
+
customRenderSidebar: q,
|
|
3051
|
+
showCollapsedButton: b,
|
|
3052
|
+
sideBarBackgroundDarkColor: O,
|
|
3053
|
+
sideBarBackgroundLightColor: G,
|
|
3054
|
+
sideBarTextDarkColor: L,
|
|
3055
|
+
sideBarTextLightColor: z,
|
|
3056
|
+
sideBarIconDarkColor: fA,
|
|
3057
|
+
sideBarIconLightColor: B,
|
|
3058
|
+
sideBarCollapsedSubmenuWidth: tA,
|
|
3059
|
+
sidebarActiveColor: eA,
|
|
3060
|
+
maxKeepAliveTabs: sA,
|
|
3061
|
+
sidebarVariant: K,
|
|
3062
|
+
sidebarShowSearch: rA,
|
|
3063
|
+
children: o
|
|
1521
3064
|
}
|
|
1522
3065
|
)
|
|
1523
3066
|
}
|
|
1524
3067
|
);
|
|
1525
3068
|
}
|
|
1526
|
-
const
|
|
3069
|
+
const $e = NA({
|
|
1527
3070
|
state: { userCloseLinkRequest: "", linkClosed: "", isClosing: !1 },
|
|
1528
3071
|
dispatch: (e) => null
|
|
1529
|
-
}),
|
|
1530
|
-
const
|
|
3072
|
+
}), yn = ({ children: e }) => {
|
|
3073
|
+
const r = {
|
|
1531
3074
|
userCloseLinkRequest: "",
|
|
1532
3075
|
linkClosed: "",
|
|
1533
3076
|
isClosing: !1
|
|
1534
|
-
},
|
|
3077
|
+
}, t = (i, a) => {
|
|
1535
3078
|
switch (a.type) {
|
|
1536
3079
|
case "USER_CLOSE_REQUEST":
|
|
1537
|
-
return console.log(`[Navigation Reducer] USER_CLOSE_REQUEST link: ${a.link}`), { ...
|
|
3080
|
+
return console.log(`[Navigation Reducer] USER_CLOSE_REQUEST link: ${a.link}`), { ...i, userCloseLinkRequest: a.link, isClosing: !0 };
|
|
1538
3081
|
case "CLOSE_ALLOWED":
|
|
1539
|
-
return console.log(`[Navigation Reducer] CLOSE_ALLOWED link: ${a.link}`), { ...
|
|
3082
|
+
return console.log(`[Navigation Reducer] CLOSE_ALLOWED link: ${a.link}`), { ...i, linkClosed: a.link, userCloseLinkRequest: "", isClosing: !1, payload: a.payload };
|
|
1540
3083
|
case "DONE":
|
|
1541
|
-
return console.log(`[Navigation Reducer] DONE link: ${a.link}`), { ...
|
|
3084
|
+
return console.log(`[Navigation Reducer] DONE link: ${a.link}`), { ...i, linkClosed: a.link, isClosing: !1 };
|
|
1542
3085
|
case "CLEAR_PAYLOAD":
|
|
1543
|
-
const n = { ...
|
|
3086
|
+
const n = { ...i };
|
|
1544
3087
|
return delete n.payload, n;
|
|
1545
3088
|
default:
|
|
1546
|
-
return
|
|
3089
|
+
return i;
|
|
1547
3090
|
}
|
|
1548
|
-
}, [
|
|
1549
|
-
return
|
|
1550
|
-
let
|
|
1551
|
-
return
|
|
1552
|
-
console.log(`[NavigationProvider] No response received, auto-closing: ${
|
|
3091
|
+
}, [o, s] = Ne(t, r);
|
|
3092
|
+
return gA.useEffect(() => {
|
|
3093
|
+
let i = null;
|
|
3094
|
+
return o.userCloseLinkRequest && !o.linkClosed && (console.log(`[NavigationProvider] Waiting for close response for: ${o.userCloseLinkRequest}`), i = setTimeout(() => {
|
|
3095
|
+
console.log(`[NavigationProvider] No response received, auto-closing: ${o.userCloseLinkRequest}`), s({ type: "CLOSE_ALLOWED", link: o.userCloseLinkRequest });
|
|
1553
3096
|
}, 100)), () => {
|
|
1554
|
-
|
|
3097
|
+
i && clearTimeout(i);
|
|
1555
3098
|
};
|
|
1556
|
-
}, [
|
|
1557
|
-
},
|
|
1558
|
-
const e =
|
|
3099
|
+
}, [o.userCloseLinkRequest, o.linkClosed, s]), /* @__PURE__ */ A($e.Provider, { value: { state: o, dispatch: s }, children: e });
|
|
3100
|
+
}, Qe = () => {
|
|
3101
|
+
const e = xA($e);
|
|
1559
3102
|
if (!e)
|
|
1560
3103
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
1561
3104
|
return e;
|
|
1562
|
-
},
|
|
1563
|
-
const
|
|
1564
|
-
console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`),
|
|
1565
|
-
}, [
|
|
1566
|
-
a.current =
|
|
1567
|
-
console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${
|
|
1568
|
-
}, [
|
|
1569
|
-
const n =
|
|
1570
|
-
return { closeAllowed:
|
|
3105
|
+
}, wn = (e, r) => {
|
|
3106
|
+
const t = Qe(), { state: o, dispatch: s } = t, i = H((c) => {
|
|
3107
|
+
console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`), s({ type: "CLOSE_ALLOWED", link: e, payload: c });
|
|
3108
|
+
}, [s, e]), a = mA(r);
|
|
3109
|
+
a.current = r, iA(() => {
|
|
3110
|
+
console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${o?.userCloseLinkRequest}, id: ${e}`), o && o.userCloseLinkRequest && o.userCloseLinkRequest === e && (console.log(`[useArchbaseNavigationListener] Calling onUserCloseRequest for: ${e}`), a.current());
|
|
3111
|
+
}, [o, e]);
|
|
3112
|
+
const n = o.isClosing && o.userCloseLinkRequest === e;
|
|
3113
|
+
return { closeAllowed: i, isClosing: n };
|
|
1571
3114
|
};
|
|
1572
|
-
function
|
|
3115
|
+
function vn({
|
|
1573
3116
|
navigationData: e,
|
|
1574
|
-
onChangeOpenedTabs:
|
|
1575
|
-
onChangeActiveTabId:
|
|
1576
|
-
activeTabId:
|
|
1577
|
-
openedTabs:
|
|
3117
|
+
onChangeOpenedTabs: r,
|
|
3118
|
+
onChangeActiveTabId: t,
|
|
3119
|
+
activeTabId: o,
|
|
3120
|
+
openedTabs: s = []
|
|
1578
3121
|
}) {
|
|
1579
|
-
const [
|
|
1580
|
-
|
|
1581
|
-
const
|
|
1582
|
-
|
|
1583
|
-
|
|
3122
|
+
const [i, a] = gA.useTransition(), n = GA(), { colorScheme: c } = oA(), [l, u] = uA(s), [d, h] = uA(o), f = UA(), y = mA([]);
|
|
3123
|
+
Nr(y);
|
|
3124
|
+
const w = Qe(), { state: m, dispatch: p } = w, g = xA(VA), S = Oe(), v = mA(r), C = mA(t);
|
|
3125
|
+
iA(() => {
|
|
3126
|
+
v.current = r, C.current = t;
|
|
1584
3127
|
});
|
|
1585
|
-
const
|
|
1586
|
-
console.log(`[TabContainer] handleOnClose called for: ${
|
|
1587
|
-
const
|
|
1588
|
-
let
|
|
1589
|
-
!
|
|
1590
|
-
const
|
|
1591
|
-
let
|
|
1592
|
-
|
|
1593
|
-
let
|
|
1594
|
-
|
|
1595
|
-
const
|
|
1596
|
-
...
|
|
1597
|
-
active:
|
|
3128
|
+
const P = mA(!1), N = H((k, b) => {
|
|
3129
|
+
console.log(`[TabContainer] handleOnClose called for: ${k}`), S ? S.requestUnregister(k) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
|
|
3130
|
+
const E = l.findIndex((B) => B.path === k);
|
|
3131
|
+
let O = b?.redirectUrl;
|
|
3132
|
+
!O && E >= 0 && (O = l[E].redirect);
|
|
3133
|
+
const G = l.filter((B) => B.id !== k);
|
|
3134
|
+
let L = -1;
|
|
3135
|
+
G.forEach((B, tA) => B.id === d && (L = tA));
|
|
3136
|
+
let z = null;
|
|
3137
|
+
G.length > 0 && G[L] ? z = G[L].id : G.length > 0 ? z = G[G.length - 1].id : z = null;
|
|
3138
|
+
const fA = G.map((B) => ({
|
|
3139
|
+
...B,
|
|
3140
|
+
active: z === B.id
|
|
1598
3141
|
}));
|
|
1599
|
-
if (
|
|
1600
|
-
|
|
3142
|
+
if (u(fA), z && z != null)
|
|
3143
|
+
h(z), n(O || z);
|
|
1601
3144
|
else {
|
|
1602
|
-
if (
|
|
3145
|
+
if (h(void 0), !g.navigationRootLink) {
|
|
1603
3146
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
1604
3147
|
return;
|
|
1605
3148
|
}
|
|
1606
|
-
n(
|
|
3149
|
+
n(g.navigationRootLink);
|
|
1607
3150
|
}
|
|
1608
|
-
|
|
1609
|
-
}, [
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
}, [
|
|
1613
|
-
const
|
|
1614
|
-
const
|
|
3151
|
+
p({ type: "DONE", link: "" });
|
|
3152
|
+
}, [l, d, n, g.navigationRootLink, p, S]);
|
|
3153
|
+
iA(() => {
|
|
3154
|
+
m?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${m?.linkClosed}`), N(m?.linkClosed, m?.payload));
|
|
3155
|
+
}, [m?.linkClosed, m?.payload, N]);
|
|
3156
|
+
const j = (k) => {
|
|
3157
|
+
const b = {
|
|
1615
3158
|
item: void 0,
|
|
1616
3159
|
title: void 0,
|
|
1617
|
-
link:
|
|
3160
|
+
link: k,
|
|
1618
3161
|
redirect: void 0,
|
|
1619
3162
|
customTitle: void 0
|
|
1620
3163
|
};
|
|
1621
|
-
return e.forEach((
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1624
|
-
|
|
3164
|
+
return e.forEach((E) => {
|
|
3165
|
+
if (E.links)
|
|
3166
|
+
E.links.forEach((O) => {
|
|
3167
|
+
fe({ path: O.link || "" }, location.pathname) && (b.item = O, b.title = `${W().t(O.label)}`, b.redirect = O.redirect, b.customTitle = O.customTitle);
|
|
1625
3168
|
});
|
|
1626
|
-
else if (
|
|
1627
|
-
const
|
|
1628
|
-
|
|
3169
|
+
else if (E.link && !b.item) {
|
|
3170
|
+
const O = fe({ path: E.link }, location.pathname);
|
|
3171
|
+
O && (O.params && Object.keys(O.params).length > 0 ? b.title = `${O.params[Object.keys(O.params)[0]]}` : b.title = `${W().t(E.label)}`, b.item = E, b.redirect = E.redirect, b.customTitle = E.customTitle);
|
|
1629
3172
|
}
|
|
1630
|
-
}),
|
|
3173
|
+
}), b.customTitle && (b.customTitle = b.customTitle.replace("$title", b.title)), b;
|
|
1631
3174
|
};
|
|
1632
|
-
|
|
1633
|
-
s
|
|
1634
|
-
}, [JSON.stringify(
|
|
1635
|
-
const J =
|
|
1636
|
-
|
|
1637
|
-
if (
|
|
1638
|
-
|
|
3175
|
+
iA(() => {
|
|
3176
|
+
u(s), P.current = !0;
|
|
3177
|
+
}, [JSON.stringify(s)]);
|
|
3178
|
+
const J = mA(l), D = mA(d);
|
|
3179
|
+
iA(() => {
|
|
3180
|
+
if (P.current) {
|
|
3181
|
+
P.current = !1, J.current = l, D.current = d;
|
|
1639
3182
|
return;
|
|
1640
3183
|
}
|
|
1641
|
-
const
|
|
1642
|
-
if (
|
|
1643
|
-
const
|
|
1644
|
-
|
|
3184
|
+
const k = JSON.stringify(J.current) !== JSON.stringify(l), b = D.current !== d;
|
|
3185
|
+
if (k || b) {
|
|
3186
|
+
const E = setTimeout(() => {
|
|
3187
|
+
v.current?.(l), C.current?.(d);
|
|
1645
3188
|
}, 0);
|
|
1646
|
-
return J.current =
|
|
3189
|
+
return J.current = l, D.current = d, () => clearTimeout(E);
|
|
1647
3190
|
}
|
|
1648
|
-
}, [
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1651
|
-
if (
|
|
3191
|
+
}, [l, d]);
|
|
3192
|
+
const M = mA("");
|
|
3193
|
+
iA(() => {
|
|
3194
|
+
if (M.current === f.pathname)
|
|
1652
3195
|
return;
|
|
1653
|
-
|
|
1654
|
-
const
|
|
1655
|
-
if (
|
|
1656
|
-
const
|
|
1657
|
-
if (
|
|
1658
|
-
if (
|
|
1659
|
-
const
|
|
1660
|
-
|
|
3196
|
+
M.current = f.pathname;
|
|
3197
|
+
const k = j(f.pathname);
|
|
3198
|
+
if (k && k.item) {
|
|
3199
|
+
const b = l.findIndex((E) => E.path === k.link);
|
|
3200
|
+
if (b !== -1) {
|
|
3201
|
+
if (l[b].title !== k.title) {
|
|
3202
|
+
const E = [...l];
|
|
3203
|
+
E[b] = { ...E[b], title: k.title }, u(E);
|
|
1661
3204
|
}
|
|
1662
|
-
|
|
3205
|
+
h(l[b].id);
|
|
1663
3206
|
} else {
|
|
1664
|
-
const
|
|
1665
|
-
id: `${
|
|
1666
|
-
title: `${
|
|
1667
|
-
path: `${
|
|
3207
|
+
const E = {
|
|
3208
|
+
id: `${k.link}`,
|
|
3209
|
+
title: `${k.title}`,
|
|
3210
|
+
path: `${k.link}`,
|
|
1668
3211
|
active: !0,
|
|
1669
|
-
content:
|
|
1670
|
-
iconClass:
|
|
3212
|
+
content: k.item.component,
|
|
3213
|
+
iconClass: k.item.icon,
|
|
1671
3214
|
closeButton: !0,
|
|
1672
|
-
redirect:
|
|
1673
|
-
customTitle:
|
|
1674
|
-
},
|
|
1675
|
-
|
|
3215
|
+
redirect: k.redirect,
|
|
3216
|
+
customTitle: k.customTitle
|
|
3217
|
+
}, O = [...l.map((G) => ({ ...G, active: !1 })), E];
|
|
3218
|
+
u(O), h(E.id);
|
|
1676
3219
|
}
|
|
1677
3220
|
}
|
|
1678
|
-
}, [
|
|
1679
|
-
const
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1682
|
-
|
|
3221
|
+
}, [f.pathname]);
|
|
3222
|
+
const F = (k) => {
|
|
3223
|
+
const b = l.filter((E) => E.id === k);
|
|
3224
|
+
b && b.length > 0 && f.pathname !== b[0].path && n(b[0].path), a(() => {
|
|
3225
|
+
h(k);
|
|
1683
3226
|
});
|
|
1684
|
-
},
|
|
1685
|
-
console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${
|
|
3227
|
+
}, Q = (k) => {
|
|
3228
|
+
console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${k}`);
|
|
1686
3229
|
try {
|
|
1687
|
-
|
|
1688
|
-
} catch (
|
|
1689
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
3230
|
+
p({ type: "USER_CLOSE_REQUEST", link: k });
|
|
3231
|
+
} catch (b) {
|
|
3232
|
+
console.error("[TabContainer] Dispatch failed:", b);
|
|
1690
3233
|
}
|
|
1691
|
-
},
|
|
1692
|
-
if (
|
|
3234
|
+
}, T = H(() => {
|
|
3235
|
+
if (u([]), h(void 0), !g.navigationRootLink) {
|
|
1693
3236
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
1694
3237
|
return;
|
|
1695
3238
|
}
|
|
1696
|
-
n(
|
|
1697
|
-
}, [n,
|
|
1698
|
-
const
|
|
1699
|
-
if (
|
|
3239
|
+
n(g.navigationRootLink);
|
|
3240
|
+
}, [n, g.navigationRootLink]), x = H((k) => {
|
|
3241
|
+
const b = l.findIndex((L) => L.id === k);
|
|
3242
|
+
if (b <= 0)
|
|
1700
3243
|
return;
|
|
1701
|
-
const
|
|
1702
|
-
...
|
|
1703
|
-
active:
|
|
3244
|
+
const E = l.slice(b), O = E.find((L) => L.id === d)?.id || E[0]?.id, G = E.map((L) => ({
|
|
3245
|
+
...L,
|
|
3246
|
+
active: L.id === O
|
|
1704
3247
|
}));
|
|
1705
|
-
if (
|
|
1706
|
-
|
|
1707
|
-
const
|
|
1708
|
-
|
|
3248
|
+
if (u(G), O) {
|
|
3249
|
+
h(O);
|
|
3250
|
+
const L = G.find((z) => z.id === O);
|
|
3251
|
+
L && f.pathname !== L.path && n(L.path);
|
|
1709
3252
|
}
|
|
1710
|
-
}, [
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
3253
|
+
}, [l, d, n, f.pathname]), I = H((k) => {
|
|
3254
|
+
const b = l.findIndex((L) => L.id === k);
|
|
3255
|
+
if (b === -1 || b >= l.length - 1)
|
|
1713
3256
|
return;
|
|
1714
|
-
const
|
|
1715
|
-
...
|
|
1716
|
-
active:
|
|
3257
|
+
const E = l.slice(0, b + 1), O = E.find((L) => L.id === d)?.id || E[E.length - 1]?.id, G = E.map((L) => ({
|
|
3258
|
+
...L,
|
|
3259
|
+
active: L.id === O
|
|
1717
3260
|
}));
|
|
1718
|
-
if (
|
|
1719
|
-
|
|
1720
|
-
const
|
|
1721
|
-
|
|
3261
|
+
if (u(G), O) {
|
|
3262
|
+
h(O);
|
|
3263
|
+
const L = G.find((z) => z.id === O);
|
|
3264
|
+
L && f.pathname !== L.path && n(L.path);
|
|
1722
3265
|
}
|
|
1723
|
-
}, [
|
|
1724
|
-
const
|
|
1725
|
-
if (!
|
|
3266
|
+
}, [l, d, n, f.pathname]), Y = H((k) => {
|
|
3267
|
+
const b = l.find((O) => O.id === k);
|
|
3268
|
+
if (!b)
|
|
1726
3269
|
return;
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
}, [
|
|
3270
|
+
const E = [{ ...b, active: !0 }];
|
|
3271
|
+
u(E), h(k), f.pathname !== b.path && n(b.path);
|
|
3272
|
+
}, [l, n, f.pathname]);
|
|
1730
3273
|
return /* @__PURE__ */ A("div", { ref: y, children: /* @__PURE__ */ A(
|
|
1731
|
-
|
|
3274
|
+
Gr,
|
|
1732
3275
|
{
|
|
1733
3276
|
buttonCloseOnlyActiveTab: !0,
|
|
1734
|
-
onClick: (
|
|
1735
|
-
onTabClose: (
|
|
1736
|
-
onTabChange: (
|
|
1737
|
-
onCloseAllTabs:
|
|
1738
|
-
onCloseLeftTabs:
|
|
1739
|
-
onCloseRightTabs:
|
|
1740
|
-
onCloseOtherTabs:
|
|
1741
|
-
currentTabs: ((
|
|
1742
|
-
key:
|
|
1743
|
-
favicon:
|
|
1744
|
-
title:
|
|
1745
|
-
customTitle:
|
|
1746
|
-
})))(
|
|
1747
|
-
activeTab:
|
|
1748
|
-
dark:
|
|
3277
|
+
onClick: (k) => F(k),
|
|
3278
|
+
onTabClose: (k) => Q(k),
|
|
3279
|
+
onTabChange: (k) => null,
|
|
3280
|
+
onCloseAllTabs: T,
|
|
3281
|
+
onCloseLeftTabs: x,
|
|
3282
|
+
onCloseRightTabs: I,
|
|
3283
|
+
onCloseOtherTabs: Y,
|
|
3284
|
+
currentTabs: ((k) => k.map((b) => ({
|
|
3285
|
+
key: b.id,
|
|
3286
|
+
favicon: b.iconClass,
|
|
3287
|
+
title: b.title,
|
|
3288
|
+
customTitle: b.customTitle
|
|
3289
|
+
})))(l),
|
|
3290
|
+
activeTab: d,
|
|
3291
|
+
dark: c === "dark"
|
|
1749
3292
|
}
|
|
1750
3293
|
) });
|
|
1751
3294
|
}
|
|
1752
|
-
const
|
|
3295
|
+
const So = () => gA.createElement("div", null, "Home View"), Io = () => gA.createElement("div", null, "Pedido Form"), Eo = () => gA.createElement("div", null, "Pedido View"), Ro = () => gA.createElement("div", null, "Pessoa Form"), Lo = () => gA.createElement("div", null, "Pessoa View"), Do = {
|
|
1753
3296
|
label: "Dashboard",
|
|
1754
|
-
icon: /* @__PURE__ */ A(
|
|
3297
|
+
icon: /* @__PURE__ */ A(rr, {}),
|
|
1755
3298
|
link: "/dashboard",
|
|
1756
3299
|
category: "DASHBOARD",
|
|
1757
3300
|
color: "teal",
|
|
1758
3301
|
component: /* @__PURE__ */ A("div", {}),
|
|
1759
3302
|
showInSidebar: !0
|
|
1760
|
-
},
|
|
3303
|
+
}, To = {
|
|
1761
3304
|
label: "Home",
|
|
1762
|
-
icon: /* @__PURE__ */ A(
|
|
3305
|
+
icon: /* @__PURE__ */ A(er, {}),
|
|
1763
3306
|
link: "/home",
|
|
1764
3307
|
category: "HOME",
|
|
1765
3308
|
color: "teal",
|
|
1766
|
-
component: /* @__PURE__ */ A(
|
|
3309
|
+
component: /* @__PURE__ */ A(So, {}),
|
|
1767
3310
|
showInSidebar: !0,
|
|
1768
3311
|
keepAlive: !0
|
|
1769
|
-
},
|
|
3312
|
+
}, zo = {
|
|
1770
3313
|
label: "Consulta lista pessoas",
|
|
1771
3314
|
link: "/pessoa/consulta",
|
|
1772
|
-
icon: /* @__PURE__ */ A(
|
|
3315
|
+
icon: /* @__PURE__ */ A(Ie, {}),
|
|
1773
3316
|
category: "PESSOAS",
|
|
1774
3317
|
color: "pink",
|
|
1775
|
-
component: /* @__PURE__ */ A(
|
|
3318
|
+
component: /* @__PURE__ */ A(Lo, {}),
|
|
1776
3319
|
showInSidebar: !0,
|
|
1777
3320
|
keepAlive: !0
|
|
1778
|
-
},
|
|
3321
|
+
}, Po = {
|
|
1779
3322
|
label: "Nova pessoa",
|
|
1780
3323
|
link: "/pessoa/nova",
|
|
1781
|
-
icon: /* @__PURE__ */ A(
|
|
3324
|
+
icon: /* @__PURE__ */ A(nr, {}),
|
|
1782
3325
|
category: "PESSOAS",
|
|
1783
3326
|
color: "pink",
|
|
1784
|
-
component: /* @__PURE__ */ A(
|
|
3327
|
+
component: /* @__PURE__ */ A(Ro, {}),
|
|
1785
3328
|
showInSidebar: !0,
|
|
1786
3329
|
keepAlive: !0
|
|
1787
|
-
},
|
|
3330
|
+
}, Mo = {
|
|
1788
3331
|
label: "Pessoas",
|
|
1789
|
-
icon: /* @__PURE__ */ A(
|
|
1790
|
-
links: [
|
|
3332
|
+
icon: /* @__PURE__ */ A(or, {}),
|
|
3333
|
+
links: [zo, Po],
|
|
1791
3334
|
category: "PESSOAS",
|
|
1792
3335
|
color: "pink",
|
|
1793
3336
|
showInSidebar: !0
|
|
1794
|
-
},
|
|
3337
|
+
}, Oo = {
|
|
1795
3338
|
label: "Consulta lista pedidos",
|
|
1796
3339
|
link: "/pedido/consulta",
|
|
1797
|
-
icon: /* @__PURE__ */ A(
|
|
3340
|
+
icon: /* @__PURE__ */ A(Ie, {}),
|
|
1798
3341
|
category: "PEDIDOS",
|
|
1799
3342
|
color: "yellow",
|
|
1800
|
-
component: /* @__PURE__ */ A(
|
|
3343
|
+
component: /* @__PURE__ */ A(Eo, {}),
|
|
1801
3344
|
showInSidebar: !0,
|
|
1802
3345
|
keepAlive: !0
|
|
1803
|
-
},
|
|
3346
|
+
}, $o = {
|
|
1804
3347
|
label: "Novo pedido",
|
|
1805
3348
|
link: "/pedido/novo",
|
|
1806
|
-
icon: /* @__PURE__ */ A(
|
|
3349
|
+
icon: /* @__PURE__ */ A(sr, {}),
|
|
1807
3350
|
category: "PEDIDOS",
|
|
1808
3351
|
color: "yellow",
|
|
1809
|
-
component: /* @__PURE__ */ A(
|
|
3352
|
+
component: /* @__PURE__ */ A(Io, {}),
|
|
1810
3353
|
showInSidebar: !0,
|
|
1811
3354
|
keepAlive: !0
|
|
1812
|
-
},
|
|
3355
|
+
}, Qo = {
|
|
1813
3356
|
label: "Pedidos",
|
|
1814
|
-
icon: /* @__PURE__ */ A(
|
|
1815
|
-
links: [
|
|
3357
|
+
icon: /* @__PURE__ */ A(tr, {}),
|
|
3358
|
+
links: [Oo, $o],
|
|
1816
3359
|
category: "PEDIDOS",
|
|
1817
3360
|
color: "yellow",
|
|
1818
3361
|
showInSidebar: !0
|
|
1819
|
-
},
|
|
3362
|
+
}, No = {
|
|
1820
3363
|
label: "Configurações",
|
|
1821
3364
|
link: "/config",
|
|
1822
|
-
icon: /* @__PURE__ */ A(
|
|
3365
|
+
icon: /* @__PURE__ */ A(lr, {}),
|
|
1823
3366
|
category: "CONFIGURAÇÕES",
|
|
1824
3367
|
color: "lime",
|
|
1825
3368
|
component: /* @__PURE__ */ A("div", {}),
|
|
1826
3369
|
showInSidebar: !0
|
|
1827
|
-
},
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
3370
|
+
}, xn = [
|
|
3371
|
+
To,
|
|
3372
|
+
Do,
|
|
3373
|
+
Mo,
|
|
3374
|
+
Qo,
|
|
3375
|
+
No
|
|
1833
3376
|
];
|
|
1834
|
-
function
|
|
1835
|
-
const [
|
|
1836
|
-
return
|
|
1837
|
-
|
|
1838
|
-
}, [
|
|
1839
|
-
|
|
3377
|
+
function Sn({ children: e, title: r = "", size: t = "440px", drawerKey: o, styles: s }) {
|
|
3378
|
+
const [i, { open: a, close: n }] = Be(!1), [c] = Le(), l = Tr(), u = oe();
|
|
3379
|
+
return iA(() => {
|
|
3380
|
+
c.get("drawer") === o && a();
|
|
3381
|
+
}, [c]), /* @__PURE__ */ A(
|
|
3382
|
+
ye,
|
|
1840
3383
|
{
|
|
1841
3384
|
position: "right",
|
|
1842
|
-
opened:
|
|
3385
|
+
opened: i,
|
|
1843
3386
|
onClose: () => {
|
|
1844
3387
|
n();
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1847
|
-
pathname:
|
|
1848
|
-
search:
|
|
3388
|
+
const h = new URLSearchParams(c);
|
|
3389
|
+
h.delete("drawer"), l({
|
|
3390
|
+
pathname: u.pathname,
|
|
3391
|
+
search: h.toString()
|
|
1849
3392
|
});
|
|
1850
3393
|
},
|
|
1851
|
-
title:
|
|
1852
|
-
size:
|
|
1853
|
-
styles:
|
|
3394
|
+
title: r,
|
|
3395
|
+
size: t,
|
|
3396
|
+
styles: s,
|
|
1854
3397
|
children: e
|
|
1855
3398
|
}
|
|
1856
3399
|
);
|
|
1857
3400
|
}
|
|
1858
|
-
function
|
|
1859
|
-
const
|
|
3401
|
+
function Go(e) {
|
|
3402
|
+
const r = GA(), t = UA(), [o] = Le();
|
|
1860
3403
|
return { openDrawer: () => {
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1863
|
-
pathname:
|
|
1864
|
-
search:
|
|
3404
|
+
const i = new URLSearchParams(o);
|
|
3405
|
+
i.set("drawer", e), r({
|
|
3406
|
+
pathname: t.pathname,
|
|
3407
|
+
search: i.toString()
|
|
1865
3408
|
});
|
|
1866
3409
|
} };
|
|
1867
3410
|
}
|
|
1868
|
-
function
|
|
1869
|
-
const { openDrawer:
|
|
1870
|
-
return
|
|
1871
|
-
|
|
3411
|
+
function In({ drawerKey: e }) {
|
|
3412
|
+
const { openDrawer: r } = Go(e);
|
|
3413
|
+
return iA(() => {
|
|
3414
|
+
r();
|
|
1872
3415
|
}, []), null;
|
|
1873
3416
|
}
|
|
1874
|
-
const
|
|
3417
|
+
const Uo = {
|
|
1875
3418
|
// Campos de identificação
|
|
1876
3419
|
showNickname: !0,
|
|
1877
3420
|
// Configurações de campos obrigatórios
|
|
@@ -1879,80 +3422,80 @@ const so = {
|
|
|
1879
3422
|
avatarMaxSizeKB: 2e3,
|
|
1880
3423
|
avatarImageQuality: 1
|
|
1881
3424
|
};
|
|
1882
|
-
function
|
|
1883
|
-
const
|
|
1884
|
-
name: `dsUser${
|
|
1885
|
-
label: `${
|
|
1886
|
-
service:
|
|
1887
|
-
store:
|
|
3425
|
+
function En({ opened: e, handleClose: r, userId: t, updateUser: o, options: s }) {
|
|
3426
|
+
const i = Fe(), a = He(), n = ir(), c = Ur(`myProfile${t}Store`), l = Br(ar.User), u = { ...Uo, ...s ?? {} }, { dataSource: d, isLoading: h, error: f, isError: y, clearError: w } = Fr({
|
|
3427
|
+
name: `dsUser${t}`,
|
|
3428
|
+
label: `${W().t("archbase:My Profile")}`,
|
|
3429
|
+
service: l,
|
|
3430
|
+
store: c,
|
|
1888
3431
|
pageSize: 50,
|
|
1889
3432
|
loadOnStart: !0,
|
|
1890
3433
|
validator: n,
|
|
1891
|
-
id:
|
|
1892
|
-
onLoadComplete: (
|
|
1893
|
-
|
|
3434
|
+
id: t,
|
|
3435
|
+
onLoadComplete: (p) => {
|
|
3436
|
+
p.isBrowsing() && p.edit(), a();
|
|
1894
3437
|
},
|
|
1895
|
-
onDestroy: (
|
|
3438
|
+
onDestroy: (p) => {
|
|
1896
3439
|
},
|
|
1897
|
-
onError: (
|
|
1898
|
-
|
|
3440
|
+
onError: (p, g) => {
|
|
3441
|
+
Or.showError(W().t("archbase:WARNING"), p, g);
|
|
1899
3442
|
}
|
|
1900
3443
|
});
|
|
1901
|
-
|
|
1902
|
-
e &&
|
|
1903
|
-
}, [
|
|
1904
|
-
const
|
|
1905
|
-
|
|
3444
|
+
iA(() => {
|
|
3445
|
+
e && d && d.isBrowsing() && d.edit();
|
|
3446
|
+
}, [d, e]);
|
|
3447
|
+
const m = (p) => {
|
|
3448
|
+
p && (console.log(p), o(p.name, p.avatar));
|
|
1906
3449
|
};
|
|
1907
3450
|
return /* @__PURE__ */ A(
|
|
1908
|
-
|
|
3451
|
+
Hr,
|
|
1909
3452
|
{
|
|
1910
|
-
title:
|
|
3453
|
+
title: W().t("archbase:My Profile"),
|
|
1911
3454
|
size: 800,
|
|
1912
3455
|
height: "500px",
|
|
1913
3456
|
opened: e,
|
|
1914
|
-
dataSource:
|
|
1915
|
-
onClickOk:
|
|
1916
|
-
onClickCancel:
|
|
1917
|
-
onAfterSave:
|
|
1918
|
-
children: /* @__PURE__ */ A(
|
|
1919
|
-
/* @__PURE__ */ A(
|
|
1920
|
-
|
|
3457
|
+
dataSource: d,
|
|
3458
|
+
onClickOk: r,
|
|
3459
|
+
onClickCancel: r,
|
|
3460
|
+
onAfterSave: m,
|
|
3461
|
+
children: /* @__PURE__ */ A(TA, { style: { height: "440px" }, ref: i, children: /* @__PURE__ */ R(Z, { children: [
|
|
3462
|
+
/* @__PURE__ */ A(Z, { align: "center", children: /* @__PURE__ */ A(
|
|
3463
|
+
$r,
|
|
1921
3464
|
{
|
|
1922
|
-
dataSource:
|
|
3465
|
+
dataSource: d,
|
|
1923
3466
|
dataField: "avatar",
|
|
1924
3467
|
width: 200,
|
|
1925
3468
|
height: 200,
|
|
1926
|
-
maxSizeKB:
|
|
1927
|
-
imageQuality:
|
|
3469
|
+
maxSizeKB: u.avatarMaxSizeKB,
|
|
3470
|
+
imageQuality: u.avatarImageQuality
|
|
1928
3471
|
}
|
|
1929
3472
|
) }),
|
|
1930
3473
|
/* @__PURE__ */ A(
|
|
1931
|
-
|
|
3474
|
+
YA,
|
|
1932
3475
|
{
|
|
1933
|
-
label: `${
|
|
1934
|
-
placeholder: `${
|
|
1935
|
-
dataSource:
|
|
3476
|
+
label: `${W().t("archbase:Nome completo")}`,
|
|
3477
|
+
placeholder: `${W().t("archbase:Informe o nome completo do usuário")}`,
|
|
3478
|
+
dataSource: d,
|
|
1936
3479
|
dataField: "name",
|
|
1937
3480
|
required: !0
|
|
1938
3481
|
}
|
|
1939
3482
|
),
|
|
1940
|
-
|
|
1941
|
-
|
|
3483
|
+
u.showNickname && /* @__PURE__ */ A(
|
|
3484
|
+
YA,
|
|
1942
3485
|
{
|
|
1943
|
-
label: `${
|
|
1944
|
-
placeholder: `${
|
|
1945
|
-
dataSource:
|
|
3486
|
+
label: `${W().t("archbase:Apelido")}`,
|
|
3487
|
+
placeholder: `${W().t("archbase:Apelido")}`,
|
|
3488
|
+
dataSource: d,
|
|
1946
3489
|
dataField: "nickname",
|
|
1947
|
-
required:
|
|
3490
|
+
required: u.requiredNickname
|
|
1948
3491
|
}
|
|
1949
3492
|
),
|
|
1950
3493
|
/* @__PURE__ */ A(
|
|
1951
|
-
|
|
3494
|
+
YA,
|
|
1952
3495
|
{
|
|
1953
|
-
label: `${
|
|
1954
|
-
placeholder: `${
|
|
1955
|
-
dataSource:
|
|
3496
|
+
label: `${W().t("archbase:Descrição do usuário")}`,
|
|
3497
|
+
placeholder: `${W().t("archbase:Informe a descrição do usuário")}`,
|
|
3498
|
+
dataSource: d,
|
|
1956
3499
|
dataField: "description",
|
|
1957
3500
|
required: !0
|
|
1958
3501
|
}
|
|
@@ -1961,46 +3504,69 @@ function Fo({ opened: e, handleClose: o, userId: c, updateUser: r, options: t })
|
|
|
1961
3504
|
}
|
|
1962
3505
|
);
|
|
1963
3506
|
}
|
|
1964
|
-
const
|
|
3507
|
+
const Rn = qr((e) => ({
|
|
1965
3508
|
nameStore: "ADMIN_STORE",
|
|
1966
3509
|
openedTabs: [],
|
|
1967
3510
|
activeTabId: void 0,
|
|
1968
3511
|
collapsed: !1,
|
|
1969
|
-
setOpenedTabs: (
|
|
1970
|
-
setActiveTabId: (
|
|
1971
|
-
setCollapsed: (
|
|
3512
|
+
setOpenedTabs: (r) => e({ openedTabs: r }),
|
|
3513
|
+
setActiveTabId: (r) => e({ activeTabId: r }),
|
|
3514
|
+
setCollapsed: (r) => e({ collapsed: r })
|
|
1972
3515
|
}));
|
|
1973
3516
|
export {
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
3517
|
+
VA as ArchbaseAdminLayoutContext,
|
|
3518
|
+
sn as ArchbaseAdminLayoutFooter,
|
|
3519
|
+
ln as ArchbaseAdminLayoutHeader,
|
|
3520
|
+
Vr as ArchbaseAdminLayoutProvider,
|
|
3521
|
+
kn as ArchbaseAdminMainLayout,
|
|
3522
|
+
vn as ArchbaseAdminTabContainer,
|
|
3523
|
+
oo as ArchbaseAdvancedSidebar,
|
|
3524
|
+
ko as ArchbaseAliveAbleRoutes,
|
|
3525
|
+
Yr as ArchbaseChangeLanguageAction,
|
|
3526
|
+
jr as ArchbaseColorSchemeAction,
|
|
3527
|
+
Sn as ArchbaseDrawerContent,
|
|
3528
|
+
In as ArchbaseDrawerTrigger,
|
|
3529
|
+
Xr as ArchbaseHeaderNavAction,
|
|
3530
|
+
qA as ArchbaseKeepAliveRoute,
|
|
3531
|
+
bo as ArchbaseMantineSidebar,
|
|
3532
|
+
En as ArchbaseMyProfileModal,
|
|
3533
|
+
$e as ArchbaseNavigationContext,
|
|
3534
|
+
yn as ArchbaseNavigationProvider,
|
|
3535
|
+
Wr as CommandPaletteButton,
|
|
3536
|
+
ce as MantineSidebarErrorMessage,
|
|
3537
|
+
io as MantineSidebarGroupsSkeleton,
|
|
3538
|
+
ae as MantineSidebarMenuSkeleton,
|
|
3539
|
+
fo as MinimalSidebar,
|
|
3540
|
+
go as RailSidebar,
|
|
3541
|
+
hn as SidebarBadge,
|
|
3542
|
+
me as SidebarErrorMessage,
|
|
3543
|
+
so as SidebarGroup,
|
|
3544
|
+
lo as SidebarGroupIcon,
|
|
3545
|
+
ro as SidebarGroupsSkeleton,
|
|
3546
|
+
pn as SidebarHeaderSkeleton,
|
|
3547
|
+
fn as SidebarIndicator,
|
|
3548
|
+
DA as SidebarItem,
|
|
3549
|
+
be as SidebarMenuSkeleton,
|
|
3550
|
+
se as SidebarProvider,
|
|
3551
|
+
dn as SidebarSearch,
|
|
3552
|
+
cn as SidebarSection,
|
|
3553
|
+
un as SidebarUserProfile,
|
|
3554
|
+
gn as SidebarUserProfileSkeleton,
|
|
3555
|
+
co as StandardSidebar,
|
|
3556
|
+
Zr as defaultAvatar,
|
|
3557
|
+
Uo as defaultMyProfileModalOptions,
|
|
3558
|
+
xn as navigationDataSample,
|
|
3559
|
+
Rn as useArchbaseAdminStore,
|
|
3560
|
+
Go as useArchbaseDrawer,
|
|
3561
|
+
Qe as useArchbaseNavigationContext,
|
|
3562
|
+
wn as useArchbaseNavigationListener,
|
|
3563
|
+
mn as useArchbaseRouteParams,
|
|
3564
|
+
Oe as useKeepAliveCache,
|
|
3565
|
+
bn as useKeepAliveVisibility,
|
|
3566
|
+
Cn as useParams,
|
|
3567
|
+
te as useSidebar,
|
|
3568
|
+
ie as useSidebarKeyboard,
|
|
3569
|
+
le as useSidebarNavigation,
|
|
3570
|
+
an as useSidebarOptional,
|
|
3571
|
+
no as useSidebarSearch
|
|
2006
3572
|
};
|