@archbase/admin 3.0.4 → 3.0.5
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/ArchbaseAdminLayout.context.d.ts +4 -0
- package/dist/ArchbaseAdvancedSidebar.d.ts +12 -0
- package/dist/ArchbaseAliveAbleRoutes.d.ts +64 -3
- package/dist/SidebarMenuSkeleton.d.ts +41 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1272 -1054
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,181 +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 P, Fragment as iA } from "react/jsx-runtime";
|
|
2
|
+
import AA, { useState as _, useRef as rA, useEffect as U, useMemo as dA, useContext as cA, useCallback as sA, createContext as yA, useLayoutEffect as bA, useReducer as ce } from "react";
|
|
3
|
+
import { useArchbaseSecurityManager as de } from "@archbase/security";
|
|
4
|
+
import { useUncontrolled as ue, useMediaQuery as VA, useDisclosure as he, useFocusTrap as pe, useForceUpdate as ge } from "@mantine/hooks";
|
|
5
|
+
import { Flex as DA, useMantineColorScheme as nA, Menu as j, ActionIcon as EA, Group as OA, Tooltip as wA, Button as fe, Badge as be, Center as XA, Image as me, useMantineTheme as vA, px as Z, Burger as Ce, Box as ve, Avatar as ke, Text as QA, ScrollArea as zA, Stack as lA, Paper as we, AppShell as pA, Drawer as JA, Skeleton as mA } from "@mantine/core";
|
|
6
|
+
import { IconSun as jA, IconMoonStars as WA, IconTerminal as xe, IconSearch as ye, IconDots as Ee, IconChevronRight as Se, IconChevronLeft as Re, IconHome2 as Le, IconDashboard as Te, IconUsers as Ie, IconListSearch as ZA, IconUserPlus as Pe, IconNews as De, IconFilePlus as Oe, IconSettings as Qe, IconAlertCircle as ze } from "@tabler/icons-react";
|
|
7
|
+
import { useArchbaseAppContext as MA, getI18nextInstance as I, useArchbaseTranslation as NA, archbaseI18next as gA, useArchbaseValidator as Me, ARCHBASE_IOC_API_TYPE as Ne } from "@archbase/core";
|
|
8
|
+
import { BRFlag as CA, USFlag as _A, ESFlag as IA, VEFlag as $e, UYFlag as Ue, SVFlag as Fe, PYFlag as qe, PEFlag as Be, PAFlag as Ve, NIFlag as He, MXFlag as Ge, HNFlag as Ke, GTFlag as Ye, ECFlag as Xe, DOFlag as Je, CUFlag as je, CRFlag as We, COFlag as Ze, CLFlag as _e, BOFlag as Ar, ARFlag as er } from "mantine-flagpack";
|
|
9
|
+
import { spotlight as rr, Spotlight as fA } from "@mantine/spotlight";
|
|
10
|
+
import { useNavigate as $A, useLocation as UA, matchPath as HA } from "react-router";
|
|
11
|
+
import { Routes as Ae, useParams as or, useLocation as FA, matchPath as nr, Route as PA, useSearchParams as ee, useNavigate as tr } from "react-router-dom";
|
|
12
|
+
import { useMediaQuery as ar } from "usehooks-ts";
|
|
13
|
+
import { useArchbaseNavigateParams as sr, useArchbaseVisible as ir, ArchbaseNotifications as lr, ArchbaseAvatarEdit as cr, ArchbaseEdit as TA } from "@archbase/components";
|
|
14
|
+
import { SubMenu as dr, MenuItem as GA, menuClasses as L, Sidebar as re, Menu as oe, sidebarClasses as ne } from "react-pro-sidebar";
|
|
15
|
+
import ur from "@rehooks/component-size";
|
|
16
|
+
import { ArchbaseAdvancedTabs as hr } from "@archbase/layout";
|
|
17
|
+
import { useArchbaseStore as pr, useArchbaseRemoteServiceApi as gr, useArchbaseRemoteDataSource as fr } from "@archbase/data";
|
|
18
|
+
import { ArchbaseFormModalTemplate as br } from "@archbase/template";
|
|
19
|
+
import { create as mr } from "zustand";
|
|
20
|
+
const SA = AA.createContext({}), Cr = ({
|
|
21
21
|
navigationData: e,
|
|
22
|
-
user:
|
|
23
|
-
owner:
|
|
24
|
-
company:
|
|
25
|
-
navigationRootLink:
|
|
26
|
-
children:
|
|
27
|
-
enableSecurity:
|
|
28
|
-
securityOptions:
|
|
29
|
-
onNavigationDataChange:
|
|
30
|
-
initialSidebarCollapsed:
|
|
22
|
+
user: o,
|
|
23
|
+
owner: c,
|
|
24
|
+
company: r,
|
|
25
|
+
navigationRootLink: s,
|
|
26
|
+
children: l,
|
|
27
|
+
enableSecurity: i,
|
|
28
|
+
securityOptions: t,
|
|
29
|
+
onNavigationDataChange: d,
|
|
30
|
+
initialSidebarCollapsed: n
|
|
31
31
|
}) => {
|
|
32
|
-
const [p, f] =
|
|
33
|
-
value:
|
|
34
|
-
defaultValue:
|
|
32
|
+
const [p, C] = _(n), [w, m] = _(!1), [h, f] = _(i === !0), [k, x] = _(null), g = rA(!1), [Q, O] = ue({
|
|
33
|
+
value: d !== void 0 ? e : void 0,
|
|
34
|
+
defaultValue: i ? [] : e,
|
|
35
35
|
finalValue: [],
|
|
36
|
-
onChange:
|
|
36
|
+
onChange: d
|
|
37
37
|
});
|
|
38
38
|
U(() => {
|
|
39
|
-
}, [
|
|
40
|
-
const { securityManager:
|
|
41
|
-
resourceName:
|
|
42
|
-
resourceDescription:
|
|
43
|
-
enableSecurity:
|
|
39
|
+
}, [Q, i]);
|
|
40
|
+
const { securityManager: S } = de({
|
|
41
|
+
resourceName: t?.navigationResourceName ? t.navigationResourceName : "ArchbaseAdvancedSidebar",
|
|
42
|
+
resourceDescription: t?.navigationResourceDescription ? t.navigationResourceDescription : "archbase:Navegação",
|
|
43
|
+
enableSecurity: i
|
|
44
44
|
});
|
|
45
45
|
return U(() => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
g.current = !1;
|
|
47
|
+
}, [o?.id]), U(() => {
|
|
48
|
+
if (!i) {
|
|
49
|
+
f(!1);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (g.current)
|
|
53
|
+
return;
|
|
54
|
+
e.filter((R) => R.showInSidebar).forEach((R) => {
|
|
55
|
+
S.registerAction(R.label, R.label), R?.links?.forEach((M) => S.registerAction(`${R.label} -> ${M.label}`, `${R.label} -> ${M.label}`));
|
|
56
|
+
});
|
|
57
|
+
const H = () => {
|
|
58
|
+
g.current = !0;
|
|
59
|
+
const R = e.map((M) => ({
|
|
60
|
+
...M,
|
|
61
|
+
disabled: !S.hasPermission(M.label),
|
|
62
|
+
links: M.links && M.links.map((W) => {
|
|
63
|
+
const q = S.hasPermission(`${M.label} -> ${W.label}`);
|
|
54
64
|
return {
|
|
55
|
-
...
|
|
56
|
-
disabled: !
|
|
65
|
+
...W,
|
|
66
|
+
disabled: !q
|
|
57
67
|
};
|
|
58
68
|
})
|
|
59
69
|
}));
|
|
60
|
-
|
|
61
|
-
}));
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
O(R), f(!1), x(null);
|
|
71
|
+
}, oA = !S.isLoading() && !S.isError();
|
|
72
|
+
if (S.isError()) {
|
|
73
|
+
g.current = !0;
|
|
74
|
+
const R = S.getError() || "Erro ao carregar permissões de navegação";
|
|
75
|
+
x(R), f(!1), O(e);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (oA) {
|
|
79
|
+
H();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
f(!0), x(null);
|
|
83
|
+
let F = !1;
|
|
84
|
+
const $ = setInterval(() => {
|
|
85
|
+
if (!F && S.isError()) {
|
|
86
|
+
clearInterval($), g.current = !0;
|
|
87
|
+
const R = S.getError() || "Erro ao carregar permissões de navegação";
|
|
88
|
+
x(R), f(!1), O(e);
|
|
89
|
+
}
|
|
90
|
+
}, 100), eA = setTimeout(() => {
|
|
91
|
+
F || (clearInterval($), f((R) => R && (g.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), O(e), !1)));
|
|
92
|
+
}, 3e3);
|
|
93
|
+
return S.apply(() => {
|
|
94
|
+
F || (clearInterval($), clearTimeout(eA), H());
|
|
95
|
+
}), () => {
|
|
96
|
+
F = !0, clearInterval($), clearTimeout(eA);
|
|
97
|
+
};
|
|
98
|
+
}, [o?.id, i, e, S, O]), /* @__PURE__ */ A(
|
|
99
|
+
SA.Provider,
|
|
64
100
|
{
|
|
65
101
|
value: {
|
|
66
|
-
navigationData:
|
|
67
|
-
setNavigationData:
|
|
68
|
-
user:
|
|
69
|
-
owner:
|
|
70
|
-
company:
|
|
71
|
-
navigationRootLink:
|
|
102
|
+
navigationData: Q,
|
|
103
|
+
setNavigationData: O,
|
|
104
|
+
user: o,
|
|
105
|
+
owner: c,
|
|
106
|
+
company: r,
|
|
107
|
+
navigationRootLink: s,
|
|
72
108
|
collapsed: p,
|
|
73
|
-
setCollapsed:
|
|
74
|
-
hidden:
|
|
75
|
-
setHidden:
|
|
76
|
-
onNavigationDataChange:
|
|
109
|
+
setCollapsed: C,
|
|
110
|
+
hidden: w,
|
|
111
|
+
setHidden: m,
|
|
112
|
+
onNavigationDataChange: d,
|
|
113
|
+
isLoadingPermissions: h,
|
|
114
|
+
permissionsError: k
|
|
77
115
|
},
|
|
78
|
-
children:
|
|
116
|
+
children: l
|
|
79
117
|
}
|
|
80
118
|
);
|
|
81
|
-
},
|
|
82
|
-
const e =
|
|
119
|
+
}, Co = ({ children: e }) => /* @__PURE__ */ A(DA, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), vr = () => {
|
|
120
|
+
const e = MA(), { colorScheme: o } = nA(), c = o === "dark", [r, s] = _(I().language);
|
|
83
121
|
U(() => {
|
|
84
|
-
const
|
|
85
|
-
|
|
122
|
+
const d = (n) => {
|
|
123
|
+
s(n);
|
|
86
124
|
};
|
|
87
|
-
return
|
|
88
|
-
|
|
125
|
+
return I().on("languageChanged", d), () => {
|
|
126
|
+
I().off("languageChanged", d);
|
|
89
127
|
};
|
|
90
128
|
}, []);
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
93
|
-
return /* @__PURE__ */ A(
|
|
94
|
-
if (
|
|
95
|
-
return /* @__PURE__ */ A(
|
|
96
|
-
if (
|
|
97
|
-
return /* @__PURE__ */ A(
|
|
98
|
-
if (
|
|
129
|
+
const l = (d) => {
|
|
130
|
+
if (!d)
|
|
131
|
+
return /* @__PURE__ */ A(CA, { size: 24 });
|
|
132
|
+
if (d === "en" || d === "en-US")
|
|
133
|
+
return /* @__PURE__ */ A(_A, { size: 24 });
|
|
134
|
+
if (d === "pt-BR")
|
|
135
|
+
return /* @__PURE__ */ A(CA, { size: 24 });
|
|
136
|
+
if (d.includes("es"))
|
|
99
137
|
switch (navigator.language || navigator.languages[0]) {
|
|
100
138
|
case "es":
|
|
101
139
|
case "es-ES":
|
|
102
|
-
return /* @__PURE__ */ A(
|
|
140
|
+
return /* @__PURE__ */ A(IA, { size: 24 });
|
|
103
141
|
case "es-AR":
|
|
104
|
-
return /* @__PURE__ */ A(
|
|
142
|
+
return /* @__PURE__ */ A(er, { size: 24 });
|
|
105
143
|
case "es-BO":
|
|
106
|
-
return /* @__PURE__ */ A(
|
|
144
|
+
return /* @__PURE__ */ A(Ar, { size: 24 });
|
|
107
145
|
case "es-CL":
|
|
108
|
-
return /* @__PURE__ */ A(
|
|
146
|
+
return /* @__PURE__ */ A(_e, { size: 24 });
|
|
109
147
|
case "es-CO":
|
|
110
|
-
return /* @__PURE__ */ A(
|
|
148
|
+
return /* @__PURE__ */ A(Ze, { size: 24 });
|
|
111
149
|
case "es-CR":
|
|
112
|
-
return /* @__PURE__ */ A(
|
|
150
|
+
return /* @__PURE__ */ A(We, { size: 24 });
|
|
113
151
|
case "es-CU":
|
|
114
|
-
return /* @__PURE__ */ A(
|
|
152
|
+
return /* @__PURE__ */ A(je, { size: 24 });
|
|
115
153
|
case "es-DO":
|
|
116
|
-
return /* @__PURE__ */ A(
|
|
154
|
+
return /* @__PURE__ */ A(Je, { size: 24 });
|
|
117
155
|
case "es-EC":
|
|
118
|
-
return /* @__PURE__ */ A(
|
|
156
|
+
return /* @__PURE__ */ A(Xe, { size: 24 });
|
|
119
157
|
case "es-GT":
|
|
120
|
-
return /* @__PURE__ */ A(
|
|
158
|
+
return /* @__PURE__ */ A(Ye, { size: 24 });
|
|
121
159
|
case "es-HN":
|
|
122
|
-
return /* @__PURE__ */ A(
|
|
160
|
+
return /* @__PURE__ */ A(Ke, { size: 24 });
|
|
123
161
|
case "es-MX":
|
|
124
|
-
return /* @__PURE__ */ A(
|
|
162
|
+
return /* @__PURE__ */ A(Ge, { size: 24 });
|
|
125
163
|
case "es-NI":
|
|
126
|
-
return /* @__PURE__ */ A(
|
|
164
|
+
return /* @__PURE__ */ A(He, { size: 24 });
|
|
127
165
|
case "es-PA":
|
|
128
|
-
return /* @__PURE__ */ A(
|
|
166
|
+
return /* @__PURE__ */ A(Ve, { size: 24 });
|
|
129
167
|
case "es-PE":
|
|
130
|
-
return /* @__PURE__ */ A(
|
|
168
|
+
return /* @__PURE__ */ A(Be, { size: 24 });
|
|
131
169
|
case "es-PY":
|
|
132
|
-
return /* @__PURE__ */ A(
|
|
170
|
+
return /* @__PURE__ */ A(qe, { size: 24 });
|
|
133
171
|
case "es-SV":
|
|
134
|
-
return /* @__PURE__ */ A(
|
|
172
|
+
return /* @__PURE__ */ A(Fe, { size: 24 });
|
|
135
173
|
case "es-UY":
|
|
136
|
-
return /* @__PURE__ */ A(
|
|
174
|
+
return /* @__PURE__ */ A(Ue, { size: 24 });
|
|
137
175
|
case "es-VE":
|
|
138
|
-
return /* @__PURE__ */ A(
|
|
176
|
+
return /* @__PURE__ */ A($e, { size: 24 });
|
|
139
177
|
default:
|
|
140
|
-
return /* @__PURE__ */ A(
|
|
178
|
+
return /* @__PURE__ */ A(IA, { size: 24 });
|
|
141
179
|
}
|
|
142
|
-
return /* @__PURE__ */ A(
|
|
143
|
-
},
|
|
180
|
+
return /* @__PURE__ */ A(CA, { size: 24 });
|
|
181
|
+
}, i = () => {
|
|
144
182
|
if (e.languages)
|
|
145
|
-
return e.languages.filter((
|
|
146
|
-
|
|
183
|
+
return e.languages.filter((d) => d).map((d) => /* @__PURE__ */ A(
|
|
184
|
+
j.Item,
|
|
147
185
|
{
|
|
148
|
-
onClick: () =>
|
|
149
|
-
leftSection:
|
|
150
|
-
children:
|
|
186
|
+
onClick: () => t(d.lang),
|
|
187
|
+
leftSection: l(d.lang),
|
|
188
|
+
children: d.name
|
|
151
189
|
},
|
|
152
|
-
|
|
190
|
+
d.name
|
|
153
191
|
));
|
|
154
|
-
},
|
|
155
|
-
|
|
192
|
+
}, t = (d) => {
|
|
193
|
+
I().changeLanguage(d);
|
|
156
194
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ A(
|
|
159
|
-
/* @__PURE__ */ A(
|
|
195
|
+
return /* @__PURE__ */ P(j, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
196
|
+
/* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ A(EA, { variant: "transparent", color: c ? "white" : "blue", title: I().t("toggleLanguage"), children: l(r) }) }),
|
|
197
|
+
/* @__PURE__ */ A(j.Dropdown, { children: i() })
|
|
160
198
|
] });
|
|
161
|
-
},
|
|
162
|
-
const e =
|
|
199
|
+
}, kr = () => {
|
|
200
|
+
const e = MA(), { colorScheme: o } = nA(), { t: c, i18n: r } = NA(), s = (t) => t === "en" ? /* @__PURE__ */ A(_A, { size: 24 }) : t === "pt-BR" ? /* @__PURE__ */ A(CA, { size: 24 }) : t === "es" ? /* @__PURE__ */ A(IA, { size: 24 }) : /* @__PURE__ */ A(CA, { size: 24 }), l = () => {
|
|
163
201
|
if (e.languages)
|
|
164
|
-
return e.languages.filter((
|
|
165
|
-
|
|
202
|
+
return e.languages.filter((t) => t).map((t) => /* @__PURE__ */ A(
|
|
203
|
+
j.Item,
|
|
166
204
|
{
|
|
167
|
-
onClick: () =>
|
|
168
|
-
leftSection:
|
|
169
|
-
children:
|
|
205
|
+
onClick: () => i(t.lang),
|
|
206
|
+
leftSection: s(t.lang),
|
|
207
|
+
children: t.name
|
|
170
208
|
},
|
|
171
|
-
|
|
209
|
+
t.name
|
|
172
210
|
));
|
|
173
|
-
},
|
|
174
|
-
|
|
211
|
+
}, i = (t) => {
|
|
212
|
+
r.changeLanguage(t);
|
|
175
213
|
};
|
|
176
|
-
return /* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */ A(
|
|
178
|
-
|
|
214
|
+
return /* @__PURE__ */ P(j, { children: [
|
|
215
|
+
/* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ P(
|
|
216
|
+
OA,
|
|
179
217
|
{
|
|
180
218
|
w: "100%",
|
|
181
219
|
justify: "flex-start",
|
|
@@ -184,175 +222,175 @@ const wA = j.createContext({}), po = ({
|
|
|
184
222
|
variant: "transparent",
|
|
185
223
|
fw: 400,
|
|
186
224
|
gap: 4,
|
|
187
|
-
title:
|
|
225
|
+
title: I().t("archbase:toggleLanguage"),
|
|
188
226
|
children: [
|
|
189
|
-
|
|
190
|
-
`${e.languages.find((
|
|
227
|
+
s(r.language),
|
|
228
|
+
`${e.languages.find((t) => t.lang === r.language)?.name ?? "Português"}`
|
|
191
229
|
]
|
|
192
230
|
}
|
|
193
231
|
) }),
|
|
194
|
-
/* @__PURE__ */ A(
|
|
232
|
+
/* @__PURE__ */ A(j.Dropdown, { children: l() })
|
|
195
233
|
] });
|
|
196
|
-
},
|
|
234
|
+
}, wr = ({
|
|
197
235
|
toggleColorScheme: e,
|
|
198
|
-
sunColor:
|
|
199
|
-
moonColor:
|
|
236
|
+
sunColor: o = "white",
|
|
237
|
+
moonColor: c = "blue"
|
|
200
238
|
}) => {
|
|
201
|
-
const { t:
|
|
202
|
-
e ? e() :
|
|
203
|
-
},
|
|
239
|
+
const { t: r } = NA(), { colorScheme: s, toggleColorScheme: l } = nA(), i = () => {
|
|
240
|
+
e ? e() : l();
|
|
241
|
+
}, t = s === "dark";
|
|
204
242
|
return /* @__PURE__ */ A(
|
|
205
|
-
|
|
243
|
+
EA,
|
|
206
244
|
{
|
|
207
245
|
variant: "transparent",
|
|
208
|
-
color:
|
|
209
|
-
onClick: () =>
|
|
210
|
-
title:
|
|
211
|
-
children:
|
|
246
|
+
color: t ? o : c,
|
|
247
|
+
onClick: () => i(),
|
|
248
|
+
title: I().t("archbase:toggleColorScheme"),
|
|
249
|
+
children: t ? /* @__PURE__ */ A(jA, { size: "1.5rem" }) : /* @__PURE__ */ A(WA, { size: "1.5rem" })
|
|
212
250
|
}
|
|
213
251
|
);
|
|
214
|
-
},
|
|
215
|
-
function
|
|
252
|
+
}, xr = (e) => /* @__PURE__ */ A(OA, { gap: "sm", children: e.children });
|
|
253
|
+
function yr({ category: e, label: o, color: c, description: r, image: s, onClick: l }) {
|
|
216
254
|
return /* @__PURE__ */ A(
|
|
217
|
-
|
|
255
|
+
fA.Action,
|
|
218
256
|
{
|
|
219
|
-
onClick:
|
|
220
|
-
label: `${
|
|
221
|
-
description:
|
|
222
|
-
leftSection:
|
|
223
|
-
rightSection: e ? /* @__PURE__ */ A(
|
|
257
|
+
onClick: l,
|
|
258
|
+
label: `${I().t(o || "")}`,
|
|
259
|
+
description: r ? I().t(r) : void 0,
|
|
260
|
+
leftSection: s ? /* @__PURE__ */ A(XA, { children: /* @__PURE__ */ A(me, { src: s, alt: I().t(o || ""), width: 24, height: 24 }) }) : void 0,
|
|
261
|
+
rightSection: e ? /* @__PURE__ */ A(be, { color: c, size: "sm", children: I().t(e) }) : void 0
|
|
224
262
|
},
|
|
225
|
-
|
|
263
|
+
o
|
|
226
264
|
);
|
|
227
265
|
}
|
|
228
|
-
const
|
|
229
|
-
const [
|
|
230
|
-
const
|
|
231
|
-
return e.forEach((
|
|
232
|
-
|
|
233
|
-
!p.disabled && p.showInSidebar &&
|
|
266
|
+
const Er = ({ navigationData: e, color: o }) => {
|
|
267
|
+
const [c, r] = _(""), s = $A(), { t: l } = NA(), i = dA(() => {
|
|
268
|
+
const d = new Array();
|
|
269
|
+
return e.forEach((n) => {
|
|
270
|
+
n.links ? n.links.forEach((p) => {
|
|
271
|
+
!p.disabled && p.showInSidebar && d.push({
|
|
234
272
|
id: p.label,
|
|
235
273
|
category: p.category ? p.category.toUpperCase() : "",
|
|
236
274
|
color: p.color,
|
|
237
275
|
label: p.label,
|
|
238
276
|
link: p.link,
|
|
239
277
|
onClick: () => {
|
|
240
|
-
p.link &&
|
|
278
|
+
p.link && s(p.link);
|
|
241
279
|
}
|
|
242
280
|
});
|
|
243
|
-
}) : !
|
|
244
|
-
id:
|
|
281
|
+
}) : !n.disabled && n.showInSidebar && d.push({
|
|
282
|
+
id: n.label,
|
|
245
283
|
onClick: () => {
|
|
246
|
-
|
|
284
|
+
n.link && s(n.link);
|
|
247
285
|
},
|
|
248
|
-
category:
|
|
249
|
-
color:
|
|
250
|
-
label:
|
|
251
|
-
link:
|
|
286
|
+
category: n.category ? n.category.toUpperCase() : "",
|
|
287
|
+
color: n.color,
|
|
288
|
+
label: n.label,
|
|
289
|
+
link: n.link
|
|
252
290
|
});
|
|
253
|
-
}),
|
|
254
|
-
}, [e,
|
|
255
|
-
const
|
|
256
|
-
return
|
|
257
|
-
}).map((
|
|
258
|
-
return /* @__PURE__ */ A(
|
|
259
|
-
/* @__PURE__ */ A(
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
|
|
291
|
+
}), d;
|
|
292
|
+
}, [e, s]), t = i.filter((d) => {
|
|
293
|
+
const n = `${l(d.label || "")}`;
|
|
294
|
+
return n && n.toLowerCase().includes(c.toLowerCase().trim());
|
|
295
|
+
}).map((d) => /* @__PURE__ */ A(yr, { ...d }, d.id));
|
|
296
|
+
return /* @__PURE__ */ A(iA, { children: i && i.length > 0 ? /* @__PURE__ */ P(iA, { children: [
|
|
297
|
+
/* @__PURE__ */ A(wA, { withinPortal: !0, withArrow: !0, label: `${l("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ A(fe, { color: o, leftSection: /* @__PURE__ */ A(xe, { size: "24px" }), onClick: () => rr.open() }) }),
|
|
298
|
+
/* @__PURE__ */ P(
|
|
299
|
+
fA.Root,
|
|
262
300
|
{
|
|
263
301
|
shortcut: ["mod + M", "/"],
|
|
264
|
-
onQueryChange: (
|
|
265
|
-
query:
|
|
302
|
+
onQueryChange: (d) => r(d),
|
|
303
|
+
query: c,
|
|
266
304
|
children: [
|
|
267
|
-
/* @__PURE__ */ A(
|
|
268
|
-
/* @__PURE__ */ A(
|
|
305
|
+
/* @__PURE__ */ A(fA.Search, { placeholder: `${l("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ A(ye, { size: "1.2rem" }) }),
|
|
306
|
+
/* @__PURE__ */ A(fA.ActionsList, { children: t.length > 0 ? t : /* @__PURE__ */ A(fA.Empty, { children: I().t("archbase:Nenhum resultado...") }) })
|
|
269
307
|
]
|
|
270
308
|
}
|
|
271
309
|
)
|
|
272
310
|
] }) : null });
|
|
273
|
-
},
|
|
311
|
+
}, Sr = "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", vo = ({
|
|
274
312
|
userMenuItems: e,
|
|
275
|
-
showUserMenuToggleColorScheme:
|
|
276
|
-
showUserMenuOptionsLabel:
|
|
277
|
-
userMenuToggleColorSchemeIconSize:
|
|
278
|
-
showMenuItemsAfterToggleColorScheme:
|
|
279
|
-
userMenuItemsAfterToggleColorScheme:
|
|
280
|
-
showMenuItemsBeforeToggleColorScheme:
|
|
281
|
-
userMenuItemsBeforeToggleColorScheme:
|
|
282
|
-
hideAutoHeaderActionsOnUserMenu:
|
|
283
|
-
showHeaderActions:
|
|
313
|
+
showUserMenuToggleColorScheme: o = !0,
|
|
314
|
+
showUserMenuOptionsLabel: c = !0,
|
|
315
|
+
userMenuToggleColorSchemeIconSize: r = 14,
|
|
316
|
+
showMenuItemsAfterToggleColorScheme: s = !0,
|
|
317
|
+
userMenuItemsAfterToggleColorScheme: l,
|
|
318
|
+
showMenuItemsBeforeToggleColorScheme: i = !0,
|
|
319
|
+
userMenuItemsBeforeToggleColorScheme: t,
|
|
320
|
+
hideAutoHeaderActionsOnUserMenu: d = !0,
|
|
321
|
+
showHeaderActions: n = !0,
|
|
284
322
|
showHeaderToggleColorScheme: p = !0,
|
|
285
|
-
hideAutoHeaderActionsOnUserMenuBreakPoint:
|
|
286
|
-
withDividerAfterUserMenuToggleColorScheme:
|
|
287
|
-
user:
|
|
288
|
-
navigationData:
|
|
289
|
-
logo:
|
|
290
|
-
headerActions:
|
|
291
|
-
styleLogo:
|
|
292
|
-
showLanguageSelector:
|
|
293
|
-
sideBarHiddenBreakPoint:
|
|
294
|
-
headerLeftContent:
|
|
295
|
-
toggleColorScheme:
|
|
296
|
-
logoLeftSection:
|
|
297
|
-
logoRightSection:
|
|
323
|
+
hideAutoHeaderActionsOnUserMenuBreakPoint: C,
|
|
324
|
+
withDividerAfterUserMenuToggleColorScheme: w = !0,
|
|
325
|
+
user: m,
|
|
326
|
+
navigationData: h = [],
|
|
327
|
+
logo: f,
|
|
328
|
+
headerActions: k,
|
|
329
|
+
styleLogo: x,
|
|
330
|
+
showLanguageSelector: g = !1,
|
|
331
|
+
sideBarHiddenBreakPoint: Q,
|
|
332
|
+
headerLeftContent: O,
|
|
333
|
+
toggleColorScheme: S,
|
|
334
|
+
logoLeftSection: V,
|
|
335
|
+
logoRightSection: H,
|
|
298
336
|
showBurger: oA = !0,
|
|
299
|
-
showCommands:
|
|
300
|
-
sunColor:
|
|
301
|
-
moonColor:
|
|
302
|
-
styles:
|
|
337
|
+
showCommands: J = !0,
|
|
338
|
+
sunColor: F,
|
|
339
|
+
moonColor: $,
|
|
340
|
+
styles: eA
|
|
303
341
|
}) => {
|
|
304
|
-
const
|
|
305
|
-
`(max-width: ${
|
|
306
|
-
), N =
|
|
307
|
-
`(max-width: ${
|
|
342
|
+
const R = vA(), { colorScheme: M, toggleColorScheme: W } = nA(), q = cA(SA), G = VA(
|
|
343
|
+
`(max-width: ${Q ? Z(Q) : R.breakpoints.md})`
|
|
344
|
+
), N = VA(
|
|
345
|
+
`(max-width: ${C ? Z(C) : R.breakpoints.md})`
|
|
308
346
|
);
|
|
309
|
-
let
|
|
310
|
-
return
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
|
|
347
|
+
let b = !1, u = !1;
|
|
348
|
+
return d && (n = !N, p = !N, o = N, c = N, i = N, w = N, g && (u = !N, b = N)), /* @__PURE__ */ P(iA, { children: [
|
|
349
|
+
/* @__PURE__ */ P(DA, { style: { width: 300, height: 50 }, align: "center", children: [
|
|
350
|
+
V,
|
|
313
351
|
/* @__PURE__ */ A(
|
|
314
352
|
"img",
|
|
315
353
|
{
|
|
316
354
|
style: {
|
|
317
355
|
height: 50,
|
|
318
|
-
...
|
|
356
|
+
...x
|
|
319
357
|
},
|
|
320
358
|
alt: "logo",
|
|
321
|
-
src:
|
|
359
|
+
src: f
|
|
322
360
|
}
|
|
323
361
|
),
|
|
324
|
-
|
|
362
|
+
H
|
|
325
363
|
] }),
|
|
326
364
|
oA && /* @__PURE__ */ A(
|
|
327
|
-
|
|
365
|
+
Ce,
|
|
328
366
|
{
|
|
329
367
|
opened: q.hidden ? q.hidden : !1,
|
|
330
368
|
onClick: () => q.setHidden(!q.hidden),
|
|
331
369
|
size: "sm",
|
|
332
|
-
color:
|
|
370
|
+
color: R.colors.gray[7],
|
|
333
371
|
mx: { base: "xs", xs: "lg", sm: "xl" },
|
|
334
|
-
display:
|
|
372
|
+
display: G ? "" : "none"
|
|
335
373
|
}
|
|
336
374
|
),
|
|
337
|
-
/* @__PURE__ */ A("div", { children:
|
|
338
|
-
/* @__PURE__ */ A(
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
|
|
341
|
-
p && /* @__PURE__ */ A(
|
|
342
|
-
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */ A(
|
|
375
|
+
/* @__PURE__ */ A("div", { children: J && /* @__PURE__ */ A(Er, { navigationData: h }) }),
|
|
376
|
+
/* @__PURE__ */ A(ve, { style: { flex: 1 }, children: O }),
|
|
377
|
+
/* @__PURE__ */ P(xr, { children: [
|
|
378
|
+
n && k,
|
|
379
|
+
p && /* @__PURE__ */ A(wr, { toggleColorScheme: S, sunColor: F, moonColor: $ }),
|
|
380
|
+
u && /* @__PURE__ */ A(vr, {}),
|
|
381
|
+
/* @__PURE__ */ P(j, { shadow: "md", width: 200, position: "bottom-end", styles: eA?.menu, children: [
|
|
382
|
+
/* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ P("div", { children: [
|
|
345
383
|
/* @__PURE__ */ A(
|
|
346
|
-
|
|
384
|
+
ke,
|
|
347
385
|
{
|
|
348
386
|
style: { cursor: "pointer" },
|
|
349
387
|
radius: "xl",
|
|
350
388
|
ml: 8,
|
|
351
|
-
src:
|
|
352
|
-
alt:
|
|
389
|
+
src: m ? m.photo : Sr,
|
|
390
|
+
alt: m ? m.displayName : ""
|
|
353
391
|
}
|
|
354
392
|
),
|
|
355
|
-
|
|
393
|
+
m && m.isAdmin ? /* @__PURE__ */ A(
|
|
356
394
|
"div",
|
|
357
395
|
{
|
|
358
396
|
style: {
|
|
@@ -369,158 +407,158 @@ const ko = ({ navigationData: e, color: n }) => {
|
|
|
369
407
|
borderRadius: 50,
|
|
370
408
|
backgroundColor: "green"
|
|
371
409
|
},
|
|
372
|
-
children: /* @__PURE__ */ A(
|
|
410
|
+
children: /* @__PURE__ */ A(QA, { size: "xs", c: "white", children: "A" })
|
|
373
411
|
}
|
|
374
412
|
) : null
|
|
375
413
|
] }) }),
|
|
376
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ P(j.Dropdown, { children: [
|
|
377
415
|
e,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
416
|
+
c && /* @__PURE__ */ A(j.Label, { children: `${I().t("archbase:Opções")}` }),
|
|
417
|
+
i && t,
|
|
418
|
+
o && /* @__PURE__ */ A(
|
|
419
|
+
j.Item,
|
|
382
420
|
{
|
|
383
|
-
leftSection:
|
|
384
|
-
onClick:
|
|
385
|
-
children: `${
|
|
421
|
+
leftSection: M === "dark" ? /* @__PURE__ */ A(jA, { size: r }) : /* @__PURE__ */ A(WA, { size: r }),
|
|
422
|
+
onClick: S || W,
|
|
423
|
+
children: `${I().t("archbase:toggleColorScheme")}`
|
|
386
424
|
}
|
|
387
425
|
),
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
426
|
+
b && /* @__PURE__ */ A(kr, {}),
|
|
427
|
+
w && /* @__PURE__ */ A(j.Divider, {}),
|
|
428
|
+
s && l
|
|
391
429
|
] })
|
|
392
430
|
] })
|
|
393
431
|
] })
|
|
394
432
|
] });
|
|
395
433
|
};
|
|
396
|
-
function
|
|
397
|
-
const p =
|
|
398
|
-
if (
|
|
399
|
-
if (!(
|
|
400
|
-
return /* @__PURE__ */ A(
|
|
401
|
-
|
|
434
|
+
function KA(e, o, c, r, s, l, i, t, d, n) {
|
|
435
|
+
const p = l ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, C = l ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, w = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", m = "0.5";
|
|
436
|
+
if (r.links) {
|
|
437
|
+
if (!(r.disabled && r.hideDisabledItem))
|
|
438
|
+
return /* @__PURE__ */ A(wA, { disabled: !o, label: gA.t(r.label), children: /* @__PURE__ */ A(
|
|
439
|
+
dr,
|
|
402
440
|
{
|
|
403
441
|
rootStyles: {
|
|
404
442
|
fontSize: "16px",
|
|
405
|
-
[`.${
|
|
443
|
+
[`.${L.button}`]: {
|
|
406
444
|
"&:hover": {
|
|
407
|
-
[`.${
|
|
445
|
+
[`.${L.icon}`]: {
|
|
408
446
|
color: "white"
|
|
409
447
|
},
|
|
410
|
-
[`.${
|
|
448
|
+
[`.${L.label}`]: {
|
|
411
449
|
color: "white"
|
|
412
450
|
}
|
|
413
451
|
}
|
|
414
452
|
},
|
|
415
|
-
[`.${
|
|
416
|
-
width:
|
|
453
|
+
[`.${L.subMenuContent}`]: {
|
|
454
|
+
width: o && n
|
|
417
455
|
},
|
|
418
|
-
[`.${
|
|
419
|
-
opacity:
|
|
420
|
-
[`.${
|
|
421
|
-
color:
|
|
456
|
+
[`.${L.disabled}`]: {
|
|
457
|
+
opacity: m,
|
|
458
|
+
[`.${L.icon}`]: {
|
|
459
|
+
color: w + " !important"
|
|
422
460
|
},
|
|
423
|
-
[`.${
|
|
424
|
-
color:
|
|
461
|
+
[`.${L.label}`]: {
|
|
462
|
+
color: w + " !important"
|
|
425
463
|
}
|
|
426
464
|
}
|
|
427
465
|
},
|
|
428
|
-
id:
|
|
429
|
-
icon:
|
|
430
|
-
defaultOpen: !
|
|
431
|
-
label:
|
|
432
|
-
disabled:
|
|
433
|
-
children:
|
|
434
|
-
|
|
466
|
+
id: r.label,
|
|
467
|
+
icon: r.icon,
|
|
468
|
+
defaultOpen: !r.disabled,
|
|
469
|
+
label: o ? "" : gA.t(r.label),
|
|
470
|
+
disabled: r.disabled,
|
|
471
|
+
children: r.links && r.links.filter((h) => h.showInSidebar === !0 && (!h.disabled || !h.hideDisabledItem)).map((h, f) => /* @__PURE__ */ A(
|
|
472
|
+
GA,
|
|
435
473
|
{
|
|
436
|
-
onClick: () =>
|
|
474
|
+
onClick: () => c(h),
|
|
437
475
|
rootStyles: {
|
|
438
|
-
[`.${
|
|
476
|
+
[`.${L.icon}`]: {
|
|
439
477
|
background: p,
|
|
440
|
-
color:
|
|
478
|
+
color: t && h.link === i ? "white" : C
|
|
441
479
|
},
|
|
442
|
-
[`.${
|
|
443
|
-
color:
|
|
480
|
+
[`.${L.label}`]: {
|
|
481
|
+
color: t && h.link === i ? "white" : d
|
|
444
482
|
},
|
|
445
|
-
[`.${
|
|
483
|
+
[`.${L.button}`]: {
|
|
446
484
|
paddingLeft: "40px !important",
|
|
447
485
|
"&:hover": {
|
|
448
|
-
[`.${
|
|
486
|
+
[`.${L.icon}`]: {
|
|
449
487
|
color: "white"
|
|
450
488
|
},
|
|
451
|
-
[`.${
|
|
489
|
+
[`.${L.label}`]: {
|
|
452
490
|
color: "white"
|
|
453
491
|
}
|
|
454
492
|
}
|
|
455
493
|
},
|
|
456
|
-
[`.${
|
|
457
|
-
opacity:
|
|
458
|
-
[`.${
|
|
494
|
+
[`.${L.disabled}`]: {
|
|
495
|
+
opacity: m,
|
|
496
|
+
[`.${L.icon}`]: {
|
|
459
497
|
background: (p || "") + " !important",
|
|
460
|
-
color:
|
|
498
|
+
color: w + " !important"
|
|
461
499
|
},
|
|
462
|
-
[`.${
|
|
463
|
-
color:
|
|
500
|
+
[`.${L.label}`]: {
|
|
501
|
+
color: w + " !important"
|
|
464
502
|
}
|
|
465
503
|
}
|
|
466
504
|
},
|
|
467
|
-
id:
|
|
468
|
-
icon:
|
|
469
|
-
disabled: typeof
|
|
470
|
-
active:
|
|
471
|
-
children:
|
|
505
|
+
id: h.label,
|
|
506
|
+
icon: h.icon,
|
|
507
|
+
disabled: typeof h.disabled == "function" ? h.disabled() : h.disabled,
|
|
508
|
+
active: t && h.link === i,
|
|
509
|
+
children: gA.t(h.label)
|
|
472
510
|
},
|
|
473
|
-
|
|
511
|
+
f
|
|
474
512
|
))
|
|
475
513
|
},
|
|
476
|
-
|
|
514
|
+
s
|
|
477
515
|
) });
|
|
478
|
-
} else if (
|
|
479
|
-
return /* @__PURE__ */ A(
|
|
480
|
-
|
|
516
|
+
} else if (r.showInSidebar && (!r.disabled || !r.hideDisabledItem))
|
|
517
|
+
return /* @__PURE__ */ A(wA, { disabled: !o, label: gA.t(r.label), children: /* @__PURE__ */ A(
|
|
518
|
+
GA,
|
|
481
519
|
{
|
|
482
520
|
rootStyles: {
|
|
483
521
|
fontSize: "16px",
|
|
484
|
-
[`.${
|
|
522
|
+
[`.${L.button}`]: {
|
|
485
523
|
"&:hover": {
|
|
486
|
-
[`.${
|
|
524
|
+
[`.${L.icon}`]: {
|
|
487
525
|
color: "white"
|
|
488
526
|
},
|
|
489
|
-
[`.${
|
|
527
|
+
[`.${L.label}`]: {
|
|
490
528
|
color: "white"
|
|
491
529
|
}
|
|
492
530
|
}
|
|
493
531
|
},
|
|
494
|
-
[`.${
|
|
532
|
+
[`.${L.icon}`]: {
|
|
495
533
|
background: p,
|
|
496
|
-
color:
|
|
534
|
+
color: t && r.link === i ? "white" : C
|
|
497
535
|
},
|
|
498
|
-
[`.${
|
|
499
|
-
color:
|
|
536
|
+
[`.${L.label}`]: {
|
|
537
|
+
color: t && r.link === i ? "white" : d
|
|
500
538
|
},
|
|
501
|
-
[`.${
|
|
502
|
-
opacity:
|
|
503
|
-
[`.${
|
|
539
|
+
[`.${L.disabled}`]: {
|
|
540
|
+
opacity: m,
|
|
541
|
+
[`.${L.icon}`]: {
|
|
504
542
|
background: (p || "") + " !important",
|
|
505
|
-
color:
|
|
543
|
+
color: w + " !important"
|
|
506
544
|
},
|
|
507
|
-
[`.${
|
|
508
|
-
color:
|
|
545
|
+
[`.${L.label}`]: {
|
|
546
|
+
color: w + " !important"
|
|
509
547
|
}
|
|
510
548
|
}
|
|
511
549
|
},
|
|
512
|
-
id:
|
|
513
|
-
disabled: typeof
|
|
514
|
-
onClick: () =>
|
|
515
|
-
icon:
|
|
516
|
-
active:
|
|
517
|
-
children:
|
|
550
|
+
id: r.label,
|
|
551
|
+
disabled: typeof r.disabled == "function" ? r.disabled() : r.disabled,
|
|
552
|
+
onClick: () => c(r),
|
|
553
|
+
icon: r.icon,
|
|
554
|
+
active: t && r.link === i,
|
|
555
|
+
children: o ? "" : gA.t(r.label)
|
|
518
556
|
},
|
|
519
|
-
|
|
557
|
+
s
|
|
520
558
|
) });
|
|
521
559
|
return null;
|
|
522
560
|
}
|
|
523
|
-
const
|
|
561
|
+
const Rr = (e) => ({
|
|
524
562
|
light: {
|
|
525
563
|
sidebar: {
|
|
526
564
|
backgroundColor: "#ffffff",
|
|
@@ -555,138 +593,140 @@ const wo = (e) => ({
|
|
|
555
593
|
}
|
|
556
594
|
}
|
|
557
595
|
}
|
|
558
|
-
}),
|
|
559
|
-
const
|
|
596
|
+
}), Lr = (e, o, c, r, s, l, i, t, d, n, p) => {
|
|
597
|
+
const C = Rr(), w = l ? {} : { padding: c ? `0 ${(s - r) / 2}px` : "0 20px" }, m = l ? {} : { display: "none" }, h = i ? e === "dark" ? o.colors[o.primaryColor][8] : o.colors[o.primaryColor][0] : void 0;
|
|
560
598
|
return {
|
|
561
599
|
root: {
|
|
562
600
|
fontSize: "14px",
|
|
563
601
|
fontWeight: 400,
|
|
564
|
-
backgroundColor:
|
|
565
|
-
color:
|
|
602
|
+
backgroundColor: d,
|
|
603
|
+
color: o.white
|
|
566
604
|
},
|
|
567
605
|
icon: {
|
|
568
|
-
background:
|
|
606
|
+
background: h,
|
|
569
607
|
color: p,
|
|
570
|
-
[`&.${
|
|
571
|
-
color:
|
|
608
|
+
[`&.${L.disabled}`]: {
|
|
609
|
+
color: C[e].menu.disabled.color
|
|
572
610
|
}
|
|
573
611
|
},
|
|
574
612
|
SubMenuExpandIcon: {
|
|
575
613
|
color: "#b6b7b9",
|
|
576
|
-
...
|
|
614
|
+
...m
|
|
577
615
|
},
|
|
578
616
|
subMenuContent: () => ({
|
|
579
|
-
backgroundColor: e === "dark" ?
|
|
617
|
+
backgroundColor: e === "dark" ? o.colors.dark[8] : o.colors[o.primaryColor][0]
|
|
580
618
|
}),
|
|
581
619
|
button: {
|
|
582
|
-
[`&.${
|
|
583
|
-
color:
|
|
620
|
+
[`&.${L.disabled}`]: {
|
|
621
|
+
color: C[e].menu.disabled.color
|
|
584
622
|
},
|
|
585
623
|
"&:hover": {
|
|
586
|
-
backgroundColor:
|
|
587
|
-
color:
|
|
624
|
+
backgroundColor: o.colors[o.primaryColor][6],
|
|
625
|
+
color: o.white
|
|
588
626
|
},
|
|
589
|
-
[`&.${
|
|
590
|
-
backgroundColor:
|
|
627
|
+
[`&.${L.active}`]: {
|
|
628
|
+
backgroundColor: o.colors[o.primaryColor][6]
|
|
591
629
|
},
|
|
592
|
-
height:
|
|
593
|
-
...
|
|
630
|
+
height: t,
|
|
631
|
+
...w
|
|
594
632
|
},
|
|
595
|
-
label: ({ open:
|
|
596
|
-
fontWeight:
|
|
597
|
-
color:
|
|
633
|
+
label: ({ open: f }) => ({
|
|
634
|
+
fontWeight: f ? 600 : void 0,
|
|
635
|
+
color: n,
|
|
598
636
|
"&:hover": {
|
|
599
|
-
color:
|
|
637
|
+
color: o.white
|
|
600
638
|
}
|
|
601
639
|
})
|
|
602
640
|
};
|
|
603
641
|
};
|
|
604
|
-
function
|
|
605
|
-
return /* @__PURE__ */
|
|
606
|
-
|
|
642
|
+
function Tr(e, o, c, r, s, l, i, t, d, n, p) {
|
|
643
|
+
return /* @__PURE__ */ P(
|
|
644
|
+
re,
|
|
607
645
|
{
|
|
608
646
|
ref: e,
|
|
609
647
|
rootStyles: {
|
|
610
|
-
[`.${
|
|
648
|
+
[`.${ne.container}`]: {
|
|
611
649
|
position: "absolute",
|
|
612
650
|
background: p,
|
|
613
651
|
overflowX: "hidden",
|
|
614
652
|
overflowY: "hidden",
|
|
615
653
|
left: 0,
|
|
616
654
|
right: 0,
|
|
617
|
-
height:
|
|
655
|
+
height: i ? "calc(100vh - 28px)" : `${Z(t)}px`
|
|
618
656
|
}
|
|
619
657
|
},
|
|
620
|
-
collapsed:
|
|
621
|
-
width: `${
|
|
622
|
-
collapsedWidth: `${
|
|
658
|
+
collapsed: o,
|
|
659
|
+
width: `${Z(c)}px`,
|
|
660
|
+
collapsedWidth: `${Z(r)}px`,
|
|
623
661
|
children: [
|
|
624
|
-
|
|
625
|
-
/* @__PURE__ */ A(
|
|
626
|
-
|
|
662
|
+
d && /* @__PURE__ */ A(iA, { children: d }),
|
|
663
|
+
/* @__PURE__ */ A(zA, { style: { overflowY: "auto", overflowX: "hidden", height: t }, children: /* @__PURE__ */ A(oe, { rootStyles: { background: p }, menuItemStyles: s, closeOnClick: !0, children: l && /* @__PURE__ */ A(iA, { children: l }) }) }),
|
|
664
|
+
n && /* @__PURE__ */ A(iA, { children: n })
|
|
627
665
|
]
|
|
628
666
|
}
|
|
629
667
|
);
|
|
630
668
|
}
|
|
631
|
-
function
|
|
669
|
+
function YA({
|
|
632
670
|
navigationData: e,
|
|
633
|
-
sidebarGroupWidth:
|
|
634
|
-
sidebarWidth:
|
|
635
|
-
sidebarHeight:
|
|
636
|
-
sidebarCollapsedWidth:
|
|
637
|
-
selectedGroupColor:
|
|
638
|
-
groupColor:
|
|
639
|
-
backgroundGroupColor:
|
|
640
|
-
isHidden:
|
|
641
|
-
sideBarFooterHeight:
|
|
671
|
+
sidebarGroupWidth: o = "80px",
|
|
672
|
+
sidebarWidth: c = "360px",
|
|
673
|
+
sidebarHeight: r = "calc(100vh - var(--app-shell-header-offset, 0px))",
|
|
674
|
+
sidebarCollapsedWidth: s = "60px",
|
|
675
|
+
selectedGroupColor: l,
|
|
676
|
+
groupColor: i,
|
|
677
|
+
backgroundGroupColor: t,
|
|
678
|
+
isHidden: d = !1,
|
|
679
|
+
sideBarFooterHeight: n,
|
|
642
680
|
sideBarFooterContent: p,
|
|
643
|
-
groupLabelDarkColor:
|
|
644
|
-
groupLabelLightColor:
|
|
645
|
-
collapsed:
|
|
646
|
-
onMenuItemClick:
|
|
647
|
-
onClickActionIcon:
|
|
648
|
-
withBorder:
|
|
649
|
-
showGroupLabels:
|
|
650
|
-
theme:
|
|
651
|
-
sidebarRef:
|
|
652
|
-
defaultGroupIcon:
|
|
653
|
-
selectedGroupName:
|
|
654
|
-
sideBarHeaderContent:
|
|
655
|
-
iconsWithBackground:
|
|
681
|
+
groupLabelDarkColor: C,
|
|
682
|
+
groupLabelLightColor: w,
|
|
683
|
+
collapsed: m,
|
|
684
|
+
onMenuItemClick: h,
|
|
685
|
+
onClickActionIcon: f,
|
|
686
|
+
withBorder: k = !1,
|
|
687
|
+
showGroupLabels: x = !0,
|
|
688
|
+
theme: g,
|
|
689
|
+
sidebarRef: Q,
|
|
690
|
+
defaultGroupIcon: O,
|
|
691
|
+
selectedGroupName: S,
|
|
692
|
+
sideBarHeaderContent: V,
|
|
693
|
+
iconsWithBackground: H = !1,
|
|
656
694
|
menuItemHeight: oA = 40,
|
|
657
|
-
highlightActiveMenuItem:
|
|
658
|
-
backgroundDarkColor:
|
|
659
|
-
backgroundLightColor:
|
|
660
|
-
textDarkColor:
|
|
661
|
-
textLightColor:
|
|
662
|
-
iconDarkColor:
|
|
663
|
-
iconLightColor:
|
|
695
|
+
highlightActiveMenuItem: J = !0,
|
|
696
|
+
backgroundDarkColor: F,
|
|
697
|
+
backgroundLightColor: $,
|
|
698
|
+
textDarkColor: eA,
|
|
699
|
+
textLightColor: R,
|
|
700
|
+
iconDarkColor: M,
|
|
701
|
+
iconLightColor: W,
|
|
664
702
|
collapsedSubmenuWidth: q
|
|
703
|
+
// Props de skeleton desativadas temporariamente - funcionalidade não está funcionando corretamente
|
|
704
|
+
// isLoading, loadingError, loadingComponent, errorComponent, skeletonItemCount, skeletonGroupCount
|
|
665
705
|
}) {
|
|
666
|
-
const [
|
|
667
|
-
const
|
|
668
|
-
return e.forEach((
|
|
669
|
-
if (
|
|
670
|
-
let
|
|
671
|
-
|
|
672
|
-
icon:
|
|
706
|
+
const [G, N] = _(""), b = MA(), u = UA(), { colorScheme: a } = nA(), y = a === "dark" ? F ?? g.colors.dark[7] : $ ?? g.white, D = l || (a === "dark" ? g.colors[g.primaryColor][8] : g.colors[g.primaryColor][0]), E = a === "dark" ? eA ?? "var(--mantine-color-text)" : R ?? "var(--mantine-color-text)", B = a === "dark" ? M ?? g.colors[g.primaryColor][0] : W ?? g.colors[g.primaryColor][7], z = dA(() => {
|
|
707
|
+
const Y = /* @__PURE__ */ new Set();
|
|
708
|
+
return e.forEach((v) => {
|
|
709
|
+
if (v.showInSidebar && (!v.disabled || !v.hideDisabledItem)) {
|
|
710
|
+
let T = !1;
|
|
711
|
+
v.group || (v.group = {
|
|
712
|
+
icon: O || /* @__PURE__ */ A(Ee, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
|
|
673
713
|
label: "Default",
|
|
674
714
|
name: "Default",
|
|
675
715
|
hint: "Default",
|
|
676
716
|
indexOrder: 0
|
|
677
|
-
}),
|
|
678
|
-
|
|
679
|
-
}),
|
|
680
|
-
name:
|
|
681
|
-
indexOrder:
|
|
717
|
+
}), Y.forEach((X) => {
|
|
718
|
+
X.name === v.group.name && (T = !0);
|
|
719
|
+
}), T || Y.add({
|
|
720
|
+
name: v.group.name,
|
|
721
|
+
indexOrder: v.group.indexOrder,
|
|
682
722
|
component: /* @__PURE__ */ A(
|
|
683
|
-
|
|
723
|
+
wA,
|
|
684
724
|
{
|
|
685
|
-
content:
|
|
686
|
-
label:
|
|
687
|
-
disabled:
|
|
688
|
-
children: /* @__PURE__ */
|
|
689
|
-
|
|
725
|
+
content: v.group.hint,
|
|
726
|
+
label: v.group.label,
|
|
727
|
+
disabled: x,
|
|
728
|
+
children: /* @__PURE__ */ P(
|
|
729
|
+
lA,
|
|
690
730
|
{
|
|
691
731
|
gap: "2px",
|
|
692
732
|
style: {
|
|
@@ -697,898 +737,1069 @@ function FA({
|
|
|
697
737
|
},
|
|
698
738
|
children: [
|
|
699
739
|
/* @__PURE__ */ A(
|
|
700
|
-
|
|
740
|
+
EA,
|
|
701
741
|
{
|
|
702
742
|
size: "48px",
|
|
703
|
-
variant:
|
|
704
|
-
color:
|
|
743
|
+
variant: v.group.name === G ? "filled" : t ? "subtle" : "light",
|
|
744
|
+
color: v.group.name === G ? D : i,
|
|
705
745
|
onClick: () => {
|
|
706
|
-
N((
|
|
746
|
+
N((X) => (f && f(X, v.group.name), v.group.name === X && !d ? "" : v.group.name));
|
|
707
747
|
},
|
|
708
|
-
children:
|
|
748
|
+
children: v.group.icon
|
|
709
749
|
}
|
|
710
750
|
),
|
|
711
|
-
|
|
712
|
-
|
|
751
|
+
x ? /* @__PURE__ */ A(
|
|
752
|
+
QA,
|
|
713
753
|
{
|
|
714
754
|
size: "xs",
|
|
715
|
-
c:
|
|
716
|
-
children:
|
|
755
|
+
c: a === "dark" ? C || g.colors[g.primaryColor][2] : w || g.colors[g.primaryColor][2],
|
|
756
|
+
children: v.group.label
|
|
717
757
|
}
|
|
718
758
|
) : !1
|
|
719
759
|
]
|
|
720
760
|
}
|
|
721
761
|
)
|
|
722
762
|
},
|
|
723
|
-
|
|
763
|
+
v.group.name
|
|
724
764
|
)
|
|
725
765
|
});
|
|
726
766
|
}
|
|
727
|
-
}),
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
}), [...
|
|
731
|
-
}, [e,
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
767
|
+
}), Y.forEach((v) => {
|
|
768
|
+
const T = e.filter((X) => X.showInSidebar === !0 && (!X.disabled || !X.hideDisabledItem) && X.group && X.group.name === v.name);
|
|
769
|
+
v.links = T.map((X, aA) => KA(g, m, h, X, aA, H, u.pathname, J, E, q));
|
|
770
|
+
}), [...Y].sort((v, T) => v.indexOrder - T.indexOrder);
|
|
771
|
+
}, [e, G, a, m, b.selectedCompany, J, u]), K = Lr(
|
|
772
|
+
a,
|
|
773
|
+
g,
|
|
774
|
+
m,
|
|
735
775
|
35,
|
|
736
|
-
Number(
|
|
737
|
-
|
|
738
|
-
|
|
776
|
+
Number(Z(s)),
|
|
777
|
+
z.length > 1,
|
|
778
|
+
H,
|
|
739
779
|
oA,
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
),
|
|
744
|
-
|
|
780
|
+
y,
|
|
781
|
+
E,
|
|
782
|
+
B
|
|
783
|
+
), tA = m || G === "" ? "0px" : `calc(${c} - ${o})`, kA = t || (a === "dark" ? g.colors[g.primaryColor][6] : g.colors[g.primaryColor][7]), uA = sA(() => {
|
|
784
|
+
S && z.map((Y) => Y.name).includes(S) ? N(S) : z.length > 1 && N("Default");
|
|
745
785
|
}, []);
|
|
746
|
-
|
|
747
|
-
|
|
786
|
+
U(() => {
|
|
787
|
+
uA();
|
|
748
788
|
}, []), U(() => {
|
|
749
|
-
|
|
750
|
-
}, [
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
) : /* @__PURE__ */ I(LA, { direction: "column", w: s ? h : d, children: [
|
|
763
|
-
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: K }),
|
|
764
|
-
/* @__PURE__ */ I(Ce, { withBorder: x, h: o, w: "100%", display: "flex", children: [
|
|
765
|
-
Q.length !== 0 && /* @__PURE__ */ A(
|
|
766
|
-
vA,
|
|
767
|
-
{
|
|
768
|
-
gap: "4px",
|
|
769
|
-
style: {
|
|
770
|
-
height: o,
|
|
771
|
-
width: n,
|
|
772
|
-
padding: "4px",
|
|
773
|
-
backgroundColor: fA
|
|
774
|
-
},
|
|
775
|
-
children: Q.map((B) => /* @__PURE__ */ A(j.Fragment, { children: B.component }, B.name))
|
|
789
|
+
m ? N("") : G === "" && uA();
|
|
790
|
+
}, [m]);
|
|
791
|
+
const RA = () => G !== "" ? /* @__PURE__ */ A(
|
|
792
|
+
re,
|
|
793
|
+
{
|
|
794
|
+
ref: Q,
|
|
795
|
+
rootStyles: {
|
|
796
|
+
[`.${ne.container}`]: {
|
|
797
|
+
background: y,
|
|
798
|
+
overflowX: "hidden",
|
|
799
|
+
overflowY: "hidden",
|
|
800
|
+
left: 0,
|
|
801
|
+
height: `${Z(r)}px`
|
|
776
802
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
803
|
+
},
|
|
804
|
+
style: { borderColor: a === "dark" ? "#000" : "#efefef" },
|
|
805
|
+
collapsed: m,
|
|
806
|
+
width: `${Z(tA)}`,
|
|
807
|
+
collapsedWidth: "0px",
|
|
808
|
+
children: /* @__PURE__ */ A(
|
|
809
|
+
zA,
|
|
780
810
|
{
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
overflowY: "hidden",
|
|
787
|
-
left: 0,
|
|
788
|
-
height: `${X(o)}px`
|
|
789
|
-
}
|
|
811
|
+
style: {
|
|
812
|
+
overflowY: "auto",
|
|
813
|
+
overflowX: "hidden",
|
|
814
|
+
height: "100%",
|
|
815
|
+
width: tA
|
|
790
816
|
},
|
|
791
|
-
|
|
792
|
-
collapsed: s,
|
|
793
|
-
width: `${X(rA)}`,
|
|
794
|
-
collapsedWidth: "0px",
|
|
795
|
-
children: /* @__PURE__ */ A(
|
|
796
|
-
TA,
|
|
797
|
-
{
|
|
798
|
-
style: {
|
|
799
|
-
overflowY: "auto",
|
|
800
|
-
overflowX: "hidden",
|
|
801
|
-
height: "100%",
|
|
802
|
-
width: rA
|
|
803
|
-
},
|
|
804
|
-
children: /* @__PURE__ */ A(_A, { rootStyles: { background: k }, menuItemStyles: M, closeOnClick: !0, children: Q.find((B) => B.name === $)?.links || null })
|
|
805
|
-
}
|
|
806
|
-
)
|
|
817
|
+
children: /* @__PURE__ */ A(oe, { rootStyles: { background: y }, menuItemStyles: K, closeOnClick: !0, children: z.find((Y) => Y.name === G)?.links || null })
|
|
807
818
|
}
|
|
808
819
|
)
|
|
820
|
+
}
|
|
821
|
+
) : null, LA = () => z.length !== 0 ? /* @__PURE__ */ A(
|
|
822
|
+
lA,
|
|
823
|
+
{
|
|
824
|
+
gap: "4px",
|
|
825
|
+
style: {
|
|
826
|
+
height: r,
|
|
827
|
+
width: o,
|
|
828
|
+
padding: "4px",
|
|
829
|
+
backgroundColor: kA
|
|
830
|
+
},
|
|
831
|
+
children: z.map((Y) => /* @__PURE__ */ A(AA.Fragment, { children: Y.component }, Y.name))
|
|
832
|
+
}
|
|
833
|
+
) : null;
|
|
834
|
+
return /* @__PURE__ */ A(iA, { children: z.length == 1 ? Tr(
|
|
835
|
+
Q,
|
|
836
|
+
m,
|
|
837
|
+
c,
|
|
838
|
+
s,
|
|
839
|
+
K,
|
|
840
|
+
e.map((Y, hA) => KA(g, m, h, Y, hA, H, u.pathname, J, E, q)),
|
|
841
|
+
d,
|
|
842
|
+
r,
|
|
843
|
+
V,
|
|
844
|
+
p,
|
|
845
|
+
y
|
|
846
|
+
) : /* @__PURE__ */ P(DA, { direction: "column", w: m ? s : c, children: [
|
|
847
|
+
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: V }),
|
|
848
|
+
/* @__PURE__ */ P(we, { withBorder: k, h: r, w: "100%", display: "flex", children: [
|
|
849
|
+
LA(),
|
|
850
|
+
RA()
|
|
809
851
|
] }),
|
|
810
852
|
/* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: p })
|
|
811
853
|
] }) });
|
|
812
854
|
}
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
855
|
+
const te = yA({
|
|
856
|
+
isVisible: !0
|
|
857
|
+
}), ko = () => cA(te), qA = yA({ params: {} }), wo = () => cA(qA).params, xo = () => {
|
|
858
|
+
const e = or(), c = cA(qA).params;
|
|
859
|
+
return dA(() => {
|
|
860
|
+
if (!e)
|
|
861
|
+
return !1;
|
|
862
|
+
const s = Object.keys(e);
|
|
863
|
+
return s.length === 0 ? !1 : s.some((l) => e[l] !== void 0);
|
|
864
|
+
}, [e]) ? e : c;
|
|
865
|
+
}, ae = yA(null), se = () => cA(ae), xA = (e) => null, Ir = (e) => e.includes(":"), Pr = (e, o) => Ir(e) ? o : e, Dr = ({ children: e, ...o }) => {
|
|
866
|
+
const [c, r] = _(/* @__PURE__ */ new Map()), [s, l] = _(/* @__PURE__ */ new Set()), i = (h, f, k) => {
|
|
867
|
+
if (!h || typeof h != "string") {
|
|
868
|
+
console.error("[ArchbaseAliveAbleRoutes] Invalid cacheKey for component registration:", h);
|
|
817
869
|
return;
|
|
818
870
|
}
|
|
819
|
-
if (
|
|
820
|
-
console.warn("[ArchbaseAliveAbleRoutes] Attempting to register undefined component for
|
|
871
|
+
if (f === void 0) {
|
|
872
|
+
console.warn("[ArchbaseAliveAbleRoutes] Attempting to register undefined component for cacheKey:", h);
|
|
821
873
|
return;
|
|
822
874
|
}
|
|
823
|
-
|
|
824
|
-
if (
|
|
825
|
-
return
|
|
826
|
-
const
|
|
827
|
-
return
|
|
875
|
+
r((x) => {
|
|
876
|
+
if (x.has(h))
|
|
877
|
+
return x;
|
|
878
|
+
const g = new Map(x);
|
|
879
|
+
return g.set(h, { element: f, params: k }), g;
|
|
880
|
+
});
|
|
881
|
+
}, t = (h, f) => {
|
|
882
|
+
r((k) => {
|
|
883
|
+
const x = k.get(h);
|
|
884
|
+
if (!x || !(JSON.stringify(x.params) !== JSON.stringify(f)))
|
|
885
|
+
return k;
|
|
886
|
+
const Q = new Map(k);
|
|
887
|
+
return Q.set(h, { ...x, params: f }), Q;
|
|
828
888
|
});
|
|
829
|
-
},
|
|
830
|
-
if (!
|
|
831
|
-
console.error("[ArchbaseAliveAbleRoutes] Cannot unregister: invalid
|
|
889
|
+
}, d = (h) => {
|
|
890
|
+
if (!h) {
|
|
891
|
+
console.error("[ArchbaseAliveAbleRoutes] Cannot unregister: invalid cacheKey");
|
|
832
892
|
return;
|
|
833
893
|
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
const
|
|
837
|
-
return
|
|
838
|
-
}),
|
|
839
|
-
const
|
|
840
|
-
return
|
|
894
|
+
r((f) => {
|
|
895
|
+
f.has(h) || console.warn("[ArchbaseAliveAbleRoutes] Attempting to unregister non-existent cacheKey:", h);
|
|
896
|
+
const k = new Map(f);
|
|
897
|
+
return k.delete(h), k;
|
|
898
|
+
}), l((f) => {
|
|
899
|
+
const k = new Set(f);
|
|
900
|
+
return k.delete(h), k;
|
|
841
901
|
});
|
|
842
|
-
},
|
|
843
|
-
|
|
844
|
-
const
|
|
845
|
-
return
|
|
902
|
+
}, n = (h) => {
|
|
903
|
+
l((f) => {
|
|
904
|
+
const k = new Set(f);
|
|
905
|
+
return k.add(h), k;
|
|
846
906
|
});
|
|
847
|
-
},
|
|
848
|
-
cache:
|
|
849
|
-
requestedUnregister:
|
|
850
|
-
register:
|
|
851
|
-
unregister:
|
|
852
|
-
|
|
907
|
+
}, p = AA.Children.toArray(e), C = p.filter((h) => AA.isValidElement(h) ? h.type === xA : !1), w = p.filter((h) => AA.isValidElement(h) ? h.type !== xA : !1), m = {
|
|
908
|
+
cache: c,
|
|
909
|
+
requestedUnregister: s,
|
|
910
|
+
register: i,
|
|
911
|
+
unregister: d,
|
|
912
|
+
updateParams: t,
|
|
913
|
+
requestUnregister: n
|
|
853
914
|
};
|
|
854
|
-
return /* @__PURE__ */
|
|
855
|
-
|
|
856
|
-
/* @__PURE__ */ A(
|
|
915
|
+
return /* @__PURE__ */ P(ae.Provider, { value: m, children: [
|
|
916
|
+
C.map((h) => /* @__PURE__ */ A(Or, { ...h.props, routesProps: o }, h.key)),
|
|
917
|
+
/* @__PURE__ */ A(Ae, { ...o, children: w })
|
|
857
918
|
] });
|
|
858
|
-
},
|
|
859
|
-
const
|
|
860
|
-
if (!
|
|
919
|
+
}, Or = ({ component: e, routesProps: o, ...c }) => {
|
|
920
|
+
const r = se();
|
|
921
|
+
if (!r)
|
|
861
922
|
throw new Error("DisplayRoute must be used within ArchbaseAliveAbleRoutes provider");
|
|
862
|
-
const { cache:
|
|
863
|
-
|
|
864
|
-
if (
|
|
865
|
-
const
|
|
866
|
-
|
|
923
|
+
const { cache: s, requestedUnregister: l, register: i, unregister: t, updateParams: d } = r, [n, p] = _(!1), [C, w] = _({}), m = rA(null), h = FA(), f = dA(() => c.path ? Pr(c.path, h.pathname) : null, [c.path, h.pathname]), k = dA(() => c.path ? nr({ path: c.path, end: !0 }, h.pathname)?.params || {} : {}, [c.path, h.pathname]), x = rA(/* @__PURE__ */ new Set());
|
|
924
|
+
bA(() => {
|
|
925
|
+
if (n && e && f && !x.current.has(f)) {
|
|
926
|
+
const S = typeof e == "function" ? AA.createElement(e) : e;
|
|
927
|
+
i(f, S, k), x.current.add(f);
|
|
867
928
|
}
|
|
868
|
-
}, [
|
|
869
|
-
|
|
870
|
-
}, [
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
929
|
+
}, [n, e, f, i, k]), bA(() => {
|
|
930
|
+
n && f && x.current.has(f) && (d(f, k), w(k));
|
|
931
|
+
}, [n, f, k, d]), bA(() => {
|
|
932
|
+
f && l.has(f) && (t(f), x.current.delete(f));
|
|
933
|
+
}, [f, l, t]);
|
|
934
|
+
const g = f ? s.get(f) : null, Q = dA(() => n ? k : g ? g.params : C, [n, k, g, C]), O = rA(n);
|
|
935
|
+
return U(() => {
|
|
936
|
+
const S = O.current;
|
|
937
|
+
if (O.current = n, n && !S && m.current) {
|
|
938
|
+
const V = setTimeout(() => {
|
|
939
|
+
window.dispatchEvent(new Event("resize")), m.current?.dispatchEvent(
|
|
940
|
+
new CustomEvent("keepalive:visible", { bubbles: !0 })
|
|
941
|
+
);
|
|
942
|
+
}, 50);
|
|
943
|
+
return () => clearTimeout(V);
|
|
944
|
+
}
|
|
945
|
+
}, [n]), /* @__PURE__ */ P(iA, { children: [
|
|
946
|
+
g && /* @__PURE__ */ A(te.Provider, { value: { isVisible: n }, children: /* @__PURE__ */ A(qA.Provider, { value: { params: Q }, children: /* @__PURE__ */ A(
|
|
874
947
|
"div",
|
|
875
948
|
{
|
|
876
|
-
ref:
|
|
949
|
+
ref: m,
|
|
877
950
|
style: {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
951
|
+
// Usa visibility + position ao invés de display:none
|
|
952
|
+
// para manter dimensões e permitir que ResizeObserver funcione
|
|
953
|
+
position: n ? "relative" : "absolute",
|
|
954
|
+
visibility: n ? "visible" : "hidden",
|
|
955
|
+
pointerEvents: n ? "auto" : "none",
|
|
956
|
+
width: "100%",
|
|
957
|
+
height: "100%",
|
|
958
|
+
top: n ? void 0 : 0,
|
|
959
|
+
left: n ? void 0 : 0,
|
|
960
|
+
zIndex: n ? 1 : -1,
|
|
961
|
+
overflow: n ? "auto" : "hidden"
|
|
881
962
|
},
|
|
882
|
-
children:
|
|
963
|
+
children: g.element
|
|
883
964
|
}
|
|
884
|
-
),
|
|
885
|
-
/* @__PURE__ */ A(
|
|
965
|
+
) }) }),
|
|
966
|
+
/* @__PURE__ */ A(Ae, { ...o, children: /* @__PURE__ */ A(
|
|
967
|
+
PA,
|
|
968
|
+
{
|
|
969
|
+
...c,
|
|
970
|
+
element: /* @__PURE__ */ A(
|
|
971
|
+
Qr,
|
|
972
|
+
{
|
|
973
|
+
onRouteMatchChange: p,
|
|
974
|
+
onParamsChange: w
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
}
|
|
978
|
+
) })
|
|
886
979
|
] });
|
|
887
|
-
},
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
980
|
+
}, Qr = ({ onRouteMatchChange: e, onParamsChange: o }) => {
|
|
981
|
+
const c = FA();
|
|
982
|
+
return bA(() => (e(!0), () => {
|
|
983
|
+
e(!1);
|
|
984
|
+
}), [e]), bA(() => {
|
|
985
|
+
}, [c.pathname, o]), null;
|
|
986
|
+
};
|
|
987
|
+
function zr(e, o, c, r, s, l) {
|
|
891
988
|
return /* @__PURE__ */ A(
|
|
892
989
|
"div",
|
|
893
990
|
{
|
|
894
991
|
style: {
|
|
895
992
|
position: "absolute",
|
|
896
|
-
left:
|
|
993
|
+
left: c.collapsed ? `calc(${s} - 14px)` : `calc(${r} - 14px)`,
|
|
897
994
|
top: "calc(100vh / 2)",
|
|
898
995
|
zIndex: "101"
|
|
899
996
|
},
|
|
900
997
|
children: /* @__PURE__ */ A(
|
|
901
|
-
|
|
998
|
+
EA,
|
|
902
999
|
{
|
|
903
|
-
bg:
|
|
904
|
-
color:
|
|
1000
|
+
bg: o.colors[o.primaryColor][4],
|
|
1001
|
+
color: o.colors[o.primaryColor][6],
|
|
905
1002
|
variant: "filled",
|
|
906
1003
|
radius: "xl",
|
|
907
|
-
onClick:
|
|
908
|
-
children:
|
|
1004
|
+
onClick: l,
|
|
1005
|
+
children: c.collapsed ? /* @__PURE__ */ A(Se, {}) : /* @__PURE__ */ A(Re, {})
|
|
909
1006
|
}
|
|
910
1007
|
)
|
|
911
1008
|
}
|
|
912
1009
|
);
|
|
913
1010
|
}
|
|
914
|
-
function
|
|
1011
|
+
function Mr({
|
|
915
1012
|
children: e,
|
|
916
|
-
header:
|
|
917
|
-
footer:
|
|
918
|
-
sideBarWidth:
|
|
919
|
-
sideBarCollapsedWidth:
|
|
920
|
-
sideBarHiddenBreakPoint:
|
|
921
|
-
sideBarFooterHeight:
|
|
922
|
-
sideBarFooterContent:
|
|
923
|
-
onCollapsedSideBar:
|
|
924
|
-
onHiddenSidebar:
|
|
1013
|
+
header: o,
|
|
1014
|
+
footer: c,
|
|
1015
|
+
sideBarWidth: r = "360px",
|
|
1016
|
+
sideBarCollapsedWidth: s = "74px",
|
|
1017
|
+
sideBarHiddenBreakPoint: l,
|
|
1018
|
+
sideBarFooterHeight: i,
|
|
1019
|
+
sideBarFooterContent: t,
|
|
1020
|
+
onCollapsedSideBar: d,
|
|
1021
|
+
onHiddenSidebar: n,
|
|
925
1022
|
sidebarSelectedGroupName: p,
|
|
926
|
-
sidebarDefaultGroupIcon:
|
|
927
|
-
sideBarHeaderHeight:
|
|
928
|
-
sideBarHeaderContent:
|
|
929
|
-
selectedGroupColor:
|
|
930
|
-
groupColor:
|
|
931
|
-
backgroundGroupColor:
|
|
932
|
-
groupLabelDarkColor:
|
|
933
|
-
groupLabelLightColor:
|
|
934
|
-
headerColor:
|
|
935
|
-
footerHeight:
|
|
936
|
-
iconsWithBackground:
|
|
937
|
-
menuItemHeight:
|
|
938
|
-
showSideBar:
|
|
1023
|
+
sidebarDefaultGroupIcon: C,
|
|
1024
|
+
sideBarHeaderHeight: w,
|
|
1025
|
+
sideBarHeaderContent: m,
|
|
1026
|
+
selectedGroupColor: h = "#132441",
|
|
1027
|
+
groupColor: f = "white",
|
|
1028
|
+
backgroundGroupColor: k = "#132441",
|
|
1029
|
+
groupLabelDarkColor: x = "white",
|
|
1030
|
+
groupLabelLightColor: g = "white",
|
|
1031
|
+
headerColor: Q,
|
|
1032
|
+
footerHeight: O,
|
|
1033
|
+
iconsWithBackground: S,
|
|
1034
|
+
menuItemHeight: V,
|
|
1035
|
+
showSideBar: H = !0,
|
|
939
1036
|
showHeader: oA = !0,
|
|
940
|
-
headerStyle:
|
|
941
|
-
highlightActiveMenuItem:
|
|
942
|
-
customRenderSidebar:
|
|
943
|
-
showCollapsedButton:
|
|
944
|
-
sideBarBackgroundDarkColor:
|
|
945
|
-
sideBarBackgroundLightColor:
|
|
946
|
-
sideBarTextDarkColor:
|
|
1037
|
+
headerStyle: J = {},
|
|
1038
|
+
highlightActiveMenuItem: F = !0,
|
|
1039
|
+
customRenderSidebar: $,
|
|
1040
|
+
showCollapsedButton: eA = !0,
|
|
1041
|
+
sideBarBackgroundDarkColor: R,
|
|
1042
|
+
sideBarBackgroundLightColor: M,
|
|
1043
|
+
sideBarTextDarkColor: W,
|
|
947
1044
|
sideBarTextLightColor: q,
|
|
948
|
-
sideBarIconDarkColor:
|
|
1045
|
+
sideBarIconDarkColor: G,
|
|
949
1046
|
sideBarIconLightColor: N,
|
|
950
|
-
sideBarCollapsedSubmenuWidth:
|
|
1047
|
+
sideBarCollapsedSubmenuWidth: b
|
|
951
1048
|
}) {
|
|
952
|
-
const
|
|
953
|
-
`(max-width: ${
|
|
954
|
-
),
|
|
955
|
-
|
|
956
|
-
},
|
|
957
|
-
|
|
958
|
-
},
|
|
959
|
-
let
|
|
960
|
-
return
|
|
961
|
-
},
|
|
962
|
-
let
|
|
963
|
-
return
|
|
964
|
-
},
|
|
965
|
-
const
|
|
966
|
-
return
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
/* @__PURE__ */ A(
|
|
970
|
-
) :
|
|
971
|
-
}) :
|
|
972
|
-
/* @__PURE__ */ A(
|
|
973
|
-
) :
|
|
974
|
-
/* @__PURE__ */ A(
|
|
1049
|
+
const u = vA(), a = cA(SA), { colorScheme: y } = nA(), D = sr(), [E, B] = ir(), z = ar(
|
|
1050
|
+
`(max-width: ${l ? Z(l) : u.breakpoints.md})`
|
|
1051
|
+
), K = (v) => {
|
|
1052
|
+
v.link && (v.routeParams ? D(v.link, {}, v.routeParams) : D(v.link));
|
|
1053
|
+
}, tA = (v, T) => {
|
|
1054
|
+
v == T && a.collapsed && a.setCollapsed(!1), a.setCollapsed(v == T);
|
|
1055
|
+
}, kA = () => {
|
|
1056
|
+
let v = 0, T = 0;
|
|
1057
|
+
return w && (v = Number(Z(w))), i && (T = Number(Z(i))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${v + T}px)`;
|
|
1058
|
+
}, uA = () => {
|
|
1059
|
+
let v = 0, T = 0;
|
|
1060
|
+
return w && (v = Number(Z(w))), i && (T = Number(Z(i))), `calc(100vh - 28px - ${v + T}px)`;
|
|
1061
|
+
}, RA = dA(() => {
|
|
1062
|
+
const v = [];
|
|
1063
|
+
return a.navigationData.forEach((T, X) => {
|
|
1064
|
+
T.links ? T.links.forEach((aA, BA) => {
|
|
1065
|
+
aA.keepAlive ? v.push(
|
|
1066
|
+
/* @__PURE__ */ A(xA, { path: aA.link, component: aA.component }, `${aA.link}_${BA}`)
|
|
1067
|
+
) : v.push(/* @__PURE__ */ A(PA, { path: aA.link, element: aA.component }, `${aA.link}_${BA}`));
|
|
1068
|
+
}) : T.keepAlive ? v.push(
|
|
1069
|
+
/* @__PURE__ */ A(xA, { path: T.link, component: T.component }, `${T.link}_${X}`)
|
|
1070
|
+
) : v.push(
|
|
1071
|
+
/* @__PURE__ */ A(PA, { path: T.link, element: T.component }, `${T.link}_${X}`)
|
|
975
1072
|
);
|
|
976
|
-
}),
|
|
977
|
-
}, [
|
|
978
|
-
|
|
979
|
-
}, [
|
|
980
|
-
|
|
981
|
-
}, [
|
|
1073
|
+
}), v;
|
|
1074
|
+
}, [a.navigationData, a.collapsed]), LA = sA(() => {
|
|
1075
|
+
a.setCollapsed(!a.collapsed);
|
|
1076
|
+
}, [a.setCollapsed, a.collapsed]), Y = sA(() => {
|
|
1077
|
+
a.setHidden(!a.hidden);
|
|
1078
|
+
}, [a.setHidden, a.hidden]);
|
|
982
1079
|
U(() => {
|
|
983
|
-
|
|
984
|
-
}, [
|
|
985
|
-
|
|
986
|
-
}, [
|
|
987
|
-
const
|
|
988
|
-
return /* @__PURE__ */
|
|
989
|
-
|
|
1080
|
+
n && n(a.hidden);
|
|
1081
|
+
}, [a.hidden, Y]), U(() => {
|
|
1082
|
+
d && d(a.collapsed);
|
|
1083
|
+
}, [a.collapsed, d]);
|
|
1084
|
+
const hA = a.collapsed ? s : r;
|
|
1085
|
+
return /* @__PURE__ */ P(
|
|
1086
|
+
pA,
|
|
990
1087
|
{
|
|
991
1088
|
header: { height: "60px", collapsed: !oA },
|
|
992
|
-
footer: { height:
|
|
1089
|
+
footer: { height: O || "0px" },
|
|
993
1090
|
styles: {
|
|
994
1091
|
main: {
|
|
995
|
-
background:
|
|
1092
|
+
background: y === "dark" ? u.colors.dark[8] : u.colors.gray[0],
|
|
996
1093
|
overflow: "hidden"
|
|
997
1094
|
}
|
|
998
1095
|
},
|
|
999
1096
|
children: [
|
|
1000
1097
|
/* @__PURE__ */ A(
|
|
1001
|
-
|
|
1098
|
+
pA.Header,
|
|
1002
1099
|
{
|
|
1003
1100
|
p: "xs",
|
|
1004
|
-
color:
|
|
1101
|
+
color: Q,
|
|
1005
1102
|
display: "flex",
|
|
1006
1103
|
style: {
|
|
1007
1104
|
backgroundColor: "var(--mantine-primary-color-8)",
|
|
1008
1105
|
alignItems: "center",
|
|
1009
1106
|
borderBottom: "none",
|
|
1010
|
-
...
|
|
1107
|
+
...J
|
|
1011
1108
|
},
|
|
1012
|
-
children:
|
|
1109
|
+
children: o
|
|
1013
1110
|
}
|
|
1014
1111
|
),
|
|
1015
|
-
/* @__PURE__ */ A(
|
|
1016
|
-
|
|
1112
|
+
/* @__PURE__ */ A(pA.Navbar, { children: !z && H ? $ ? $({ width: r, height: kA(), isHidden: z }) : /* @__PURE__ */ A(
|
|
1113
|
+
YA,
|
|
1017
1114
|
{
|
|
1018
|
-
navigationData:
|
|
1019
|
-
sidebarHeight:
|
|
1020
|
-
sidebarGroupWidth:
|
|
1021
|
-
sidebarCollapsedWidth:
|
|
1022
|
-
selectedGroupColor:
|
|
1023
|
-
groupColor:
|
|
1024
|
-
backgroundGroupColor:
|
|
1025
|
-
groupLabelDarkColor:
|
|
1026
|
-
groupLabelLightColor:
|
|
1115
|
+
navigationData: a.navigationData,
|
|
1116
|
+
sidebarHeight: kA(),
|
|
1117
|
+
sidebarGroupWidth: s,
|
|
1118
|
+
sidebarCollapsedWidth: s,
|
|
1119
|
+
selectedGroupColor: h,
|
|
1120
|
+
groupColor: f,
|
|
1121
|
+
backgroundGroupColor: k,
|
|
1122
|
+
groupLabelDarkColor: x,
|
|
1123
|
+
groupLabelLightColor: g,
|
|
1027
1124
|
showGroupLabels: !1,
|
|
1028
|
-
collapsed:
|
|
1029
|
-
sidebarWidth:
|
|
1030
|
-
isHidden:
|
|
1031
|
-
onMenuItemClick:
|
|
1032
|
-
onClickActionIcon:
|
|
1033
|
-
sideBarFooterHeight:
|
|
1034
|
-
sideBarFooterContent:
|
|
1035
|
-
sideBarHeaderContent:
|
|
1036
|
-
theme:
|
|
1037
|
-
sidebarRef:
|
|
1038
|
-
defaultGroupIcon:
|
|
1125
|
+
collapsed: a.collapsed,
|
|
1126
|
+
sidebarWidth: r,
|
|
1127
|
+
isHidden: z,
|
|
1128
|
+
onMenuItemClick: K,
|
|
1129
|
+
onClickActionIcon: tA,
|
|
1130
|
+
sideBarFooterHeight: i,
|
|
1131
|
+
sideBarFooterContent: t,
|
|
1132
|
+
sideBarHeaderContent: m,
|
|
1133
|
+
theme: u,
|
|
1134
|
+
sidebarRef: E,
|
|
1135
|
+
defaultGroupIcon: C,
|
|
1039
1136
|
selectedGroupName: p,
|
|
1040
|
-
iconsWithBackground:
|
|
1041
|
-
menuItemHeight:
|
|
1042
|
-
highlightActiveMenuItem:
|
|
1043
|
-
backgroundDarkColor:
|
|
1044
|
-
backgroundLightColor:
|
|
1045
|
-
textDarkColor:
|
|
1137
|
+
iconsWithBackground: S,
|
|
1138
|
+
menuItemHeight: V,
|
|
1139
|
+
highlightActiveMenuItem: F,
|
|
1140
|
+
backgroundDarkColor: R,
|
|
1141
|
+
backgroundLightColor: M,
|
|
1142
|
+
textDarkColor: W,
|
|
1046
1143
|
textLightColor: q,
|
|
1047
|
-
iconDarkColor:
|
|
1144
|
+
iconDarkColor: G,
|
|
1048
1145
|
iconLightColor: N,
|
|
1049
|
-
collapsedSubmenuWidth:
|
|
1146
|
+
collapsedSubmenuWidth: b,
|
|
1147
|
+
isLoading: a.isLoadingPermissions,
|
|
1148
|
+
loadingError: a.permissionsError
|
|
1050
1149
|
}
|
|
1051
1150
|
) : void 0 }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
!
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1151
|
+
/* @__PURE__ */ P(pA.Main, { bg: y === "dark" ? u.colors.dark[8] : u.colors.gray[0], children: [
|
|
1152
|
+
!z && eA && zr(
|
|
1153
|
+
y,
|
|
1154
|
+
u,
|
|
1155
|
+
a,
|
|
1156
|
+
r,
|
|
1157
|
+
s,
|
|
1158
|
+
LA
|
|
1060
1159
|
),
|
|
1061
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ P(
|
|
1062
1161
|
"div",
|
|
1063
1162
|
{
|
|
1064
1163
|
style: {
|
|
1065
1164
|
height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
|
|
1066
|
-
width: `calc(100vw - var(--app-shell-padding) - calc(${
|
|
1165
|
+
width: `calc(100vw - var(--app-shell-padding) - calc(${z ? "0px" : hA} + 1rem))`,
|
|
1067
1166
|
marginTop: "0.5rem",
|
|
1068
|
-
marginLeft: `calc(${
|
|
1069
|
-
border: `1px solid ${
|
|
1167
|
+
marginLeft: `calc(${z ? "0px" : hA} + 0.5rem)`,
|
|
1168
|
+
border: `1px solid ${y === "dark" ? u.colors.dark[4] : "#e4e9ef"}`,
|
|
1070
1169
|
borderRadius: "4px",
|
|
1071
1170
|
overflow: "none"
|
|
1072
1171
|
},
|
|
1073
1172
|
children: [
|
|
1074
1173
|
e,
|
|
1075
|
-
/* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */
|
|
1076
|
-
...
|
|
1174
|
+
/* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */ P(Dr, { children: [
|
|
1175
|
+
...RA
|
|
1077
1176
|
] }) })
|
|
1078
1177
|
]
|
|
1079
1178
|
}
|
|
1080
1179
|
),
|
|
1081
|
-
|
|
1082
|
-
|
|
1180
|
+
H && /* @__PURE__ */ A(
|
|
1181
|
+
JA,
|
|
1083
1182
|
{
|
|
1084
|
-
opened:
|
|
1085
|
-
onClose:
|
|
1086
|
-
size:
|
|
1183
|
+
opened: a.hidden || !1,
|
|
1184
|
+
onClose: Y,
|
|
1185
|
+
size: r,
|
|
1087
1186
|
padding: 0,
|
|
1088
1187
|
styles: {
|
|
1089
1188
|
header: { minHeight: "10px" }
|
|
1090
1189
|
},
|
|
1091
|
-
children:
|
|
1092
|
-
|
|
1190
|
+
children: $ ? $({ width: r, height: uA(), isHidden: z }) : /* @__PURE__ */ A(
|
|
1191
|
+
YA,
|
|
1093
1192
|
{
|
|
1094
|
-
navigationData:
|
|
1095
|
-
sidebarWidth:
|
|
1096
|
-
sidebarHeight:
|
|
1097
|
-
sidebarCollapsedWidth:
|
|
1098
|
-
sidebarGroupWidth:
|
|
1099
|
-
selectedGroupColor:
|
|
1100
|
-
groupColor:
|
|
1101
|
-
backgroundGroupColor:
|
|
1102
|
-
groupLabelDarkColor:
|
|
1103
|
-
groupLabelLightColor:
|
|
1193
|
+
navigationData: a.navigationData,
|
|
1194
|
+
sidebarWidth: r,
|
|
1195
|
+
sidebarHeight: uA(),
|
|
1196
|
+
sidebarCollapsedWidth: s,
|
|
1197
|
+
sidebarGroupWidth: s,
|
|
1198
|
+
selectedGroupColor: h,
|
|
1199
|
+
groupColor: f,
|
|
1200
|
+
backgroundGroupColor: k,
|
|
1201
|
+
groupLabelDarkColor: x,
|
|
1202
|
+
groupLabelLightColor: g,
|
|
1104
1203
|
showGroupLabels: !1,
|
|
1105
|
-
isHidden:
|
|
1106
|
-
onMenuItemClick:
|
|
1107
|
-
onClickActionIcon:
|
|
1108
|
-
theme:
|
|
1109
|
-
sidebarRef:
|
|
1110
|
-
defaultGroupIcon:
|
|
1204
|
+
isHidden: z,
|
|
1205
|
+
onMenuItemClick: K,
|
|
1206
|
+
onClickActionIcon: tA,
|
|
1207
|
+
theme: u,
|
|
1208
|
+
sidebarRef: E,
|
|
1209
|
+
defaultGroupIcon: C,
|
|
1111
1210
|
selectedGroupName: p,
|
|
1112
|
-
iconsWithBackground:
|
|
1113
|
-
menuItemHeight:
|
|
1114
|
-
sideBarHeaderContent:
|
|
1115
|
-
sideBarFooterContent:
|
|
1116
|
-
sideBarFooterHeight:
|
|
1117
|
-
highlightActiveMenuItem:
|
|
1118
|
-
backgroundDarkColor:
|
|
1119
|
-
backgroundLightColor:
|
|
1120
|
-
textDarkColor:
|
|
1211
|
+
iconsWithBackground: S,
|
|
1212
|
+
menuItemHeight: V,
|
|
1213
|
+
sideBarHeaderContent: m,
|
|
1214
|
+
sideBarFooterContent: t,
|
|
1215
|
+
sideBarFooterHeight: i,
|
|
1216
|
+
highlightActiveMenuItem: F,
|
|
1217
|
+
backgroundDarkColor: R,
|
|
1218
|
+
backgroundLightColor: M,
|
|
1219
|
+
textDarkColor: W,
|
|
1121
1220
|
textLightColor: q,
|
|
1122
|
-
iconDarkColor:
|
|
1221
|
+
iconDarkColor: G,
|
|
1123
1222
|
iconLightColor: N,
|
|
1124
|
-
collapsedSubmenuWidth:
|
|
1223
|
+
collapsedSubmenuWidth: b,
|
|
1224
|
+
isLoading: a.isLoadingPermissions,
|
|
1225
|
+
loadingError: a.permissionsError
|
|
1125
1226
|
}
|
|
1126
1227
|
)
|
|
1127
1228
|
}
|
|
1128
1229
|
)
|
|
1129
1230
|
] }),
|
|
1130
|
-
/* @__PURE__ */ A(
|
|
1231
|
+
/* @__PURE__ */ A(pA.Footer, { children: c })
|
|
1131
1232
|
]
|
|
1132
1233
|
}
|
|
1133
1234
|
);
|
|
1134
1235
|
}
|
|
1135
|
-
function
|
|
1236
|
+
function yo({
|
|
1136
1237
|
navigationRootLink: e = "/",
|
|
1137
|
-
navigationData:
|
|
1138
|
-
user:
|
|
1139
|
-
children:
|
|
1140
|
-
header:
|
|
1141
|
-
footer:
|
|
1142
|
-
owner:
|
|
1143
|
-
company:
|
|
1144
|
-
sideBarWidth:
|
|
1145
|
-
sideBarCollapsedWidth:
|
|
1238
|
+
navigationData: o,
|
|
1239
|
+
user: c,
|
|
1240
|
+
children: r,
|
|
1241
|
+
header: s,
|
|
1242
|
+
footer: l,
|
|
1243
|
+
owner: i,
|
|
1244
|
+
company: t,
|
|
1245
|
+
sideBarWidth: d,
|
|
1246
|
+
sideBarCollapsedWidth: n,
|
|
1146
1247
|
sideBarHiddenBreakPoint: p,
|
|
1147
|
-
sideBarFooterHeight:
|
|
1148
|
-
sideBarFooterContent:
|
|
1149
|
-
onCollapsedSideBar:
|
|
1150
|
-
onHiddenSidebar:
|
|
1151
|
-
sidebarDefaultGroupIcon:
|
|
1152
|
-
sidebarSelectedGroupName:
|
|
1153
|
-
sideBarHeaderHeight:
|
|
1154
|
-
sideBarHeaderContent:
|
|
1155
|
-
selectedGroupColor:
|
|
1156
|
-
groupColor:
|
|
1157
|
-
backgroundGroupColor:
|
|
1158
|
-
groupLabelDarkColor:
|
|
1159
|
-
groupLabelLightColor:
|
|
1248
|
+
sideBarFooterHeight: C,
|
|
1249
|
+
sideBarFooterContent: w,
|
|
1250
|
+
onCollapsedSideBar: m,
|
|
1251
|
+
onHiddenSidebar: h,
|
|
1252
|
+
sidebarDefaultGroupIcon: f,
|
|
1253
|
+
sidebarSelectedGroupName: k,
|
|
1254
|
+
sideBarHeaderHeight: x,
|
|
1255
|
+
sideBarHeaderContent: g,
|
|
1256
|
+
selectedGroupColor: Q = "#132441",
|
|
1257
|
+
groupColor: O = "white",
|
|
1258
|
+
backgroundGroupColor: S = "#132441",
|
|
1259
|
+
groupLabelDarkColor: V = "white",
|
|
1260
|
+
groupLabelLightColor: H = "white",
|
|
1160
1261
|
headerColor: oA,
|
|
1161
|
-
footerHeight:
|
|
1162
|
-
iconsWithBackground:
|
|
1163
|
-
menuItemHeight:
|
|
1164
|
-
showSideBar:
|
|
1165
|
-
showHeader:
|
|
1166
|
-
headerStyle:
|
|
1167
|
-
highlightActiveMenuItem:
|
|
1262
|
+
footerHeight: J,
|
|
1263
|
+
iconsWithBackground: F,
|
|
1264
|
+
menuItemHeight: $,
|
|
1265
|
+
showSideBar: eA,
|
|
1266
|
+
showHeader: R,
|
|
1267
|
+
headerStyle: M,
|
|
1268
|
+
highlightActiveMenuItem: W,
|
|
1168
1269
|
enableSecurity: q = !1,
|
|
1169
|
-
securityOptions:
|
|
1270
|
+
securityOptions: G,
|
|
1170
1271
|
customRenderSidebar: N,
|
|
1171
|
-
onNavigationDataChange:
|
|
1172
|
-
showCollapsedButton:
|
|
1173
|
-
initialSidebarCollapsed:
|
|
1174
|
-
sideBarBackgroundDarkColor:
|
|
1175
|
-
sideBarBackgroundLightColor:
|
|
1176
|
-
sideBarTextDarkColor:
|
|
1177
|
-
sideBarTextLightColor:
|
|
1178
|
-
sideBarIconDarkColor:
|
|
1179
|
-
sideBarIconLightColor:
|
|
1180
|
-
sideBarCollapsedSubmenuWidth:
|
|
1272
|
+
onNavigationDataChange: b,
|
|
1273
|
+
showCollapsedButton: u,
|
|
1274
|
+
initialSidebarCollapsed: a = !1,
|
|
1275
|
+
sideBarBackgroundDarkColor: y,
|
|
1276
|
+
sideBarBackgroundLightColor: D,
|
|
1277
|
+
sideBarTextDarkColor: E,
|
|
1278
|
+
sideBarTextLightColor: B,
|
|
1279
|
+
sideBarIconDarkColor: z,
|
|
1280
|
+
sideBarIconLightColor: K,
|
|
1281
|
+
sideBarCollapsedSubmenuWidth: tA
|
|
1181
1282
|
}) {
|
|
1182
1283
|
return /* @__PURE__ */ A(
|
|
1183
|
-
|
|
1284
|
+
Cr,
|
|
1184
1285
|
{
|
|
1185
|
-
navigationData:
|
|
1286
|
+
navigationData: o,
|
|
1186
1287
|
navigationRootLink: e,
|
|
1187
|
-
user:
|
|
1188
|
-
owner:
|
|
1189
|
-
company:
|
|
1288
|
+
user: c,
|
|
1289
|
+
owner: i,
|
|
1290
|
+
company: t,
|
|
1190
1291
|
enableSecurity: q,
|
|
1191
|
-
securityOptions:
|
|
1192
|
-
onNavigationDataChange:
|
|
1193
|
-
initialSidebarCollapsed:
|
|
1292
|
+
securityOptions: G,
|
|
1293
|
+
onNavigationDataChange: b,
|
|
1294
|
+
initialSidebarCollapsed: a,
|
|
1194
1295
|
children: /* @__PURE__ */ A(
|
|
1195
|
-
|
|
1296
|
+
Mr,
|
|
1196
1297
|
{
|
|
1197
1298
|
navigationRootLink: e,
|
|
1198
|
-
user:
|
|
1199
|
-
header:
|
|
1200
|
-
footer:
|
|
1201
|
-
owner:
|
|
1202
|
-
company:
|
|
1203
|
-
sideBarWidth:
|
|
1204
|
-
sideBarCollapsedWidth:
|
|
1299
|
+
user: c,
|
|
1300
|
+
header: s,
|
|
1301
|
+
footer: l,
|
|
1302
|
+
owner: i,
|
|
1303
|
+
company: t,
|
|
1304
|
+
sideBarWidth: d,
|
|
1305
|
+
sideBarCollapsedWidth: n,
|
|
1205
1306
|
sideBarHiddenBreakPoint: p,
|
|
1206
|
-
sideBarHeaderHeight:
|
|
1207
|
-
sideBarHeaderContent:
|
|
1208
|
-
sideBarFooterHeight:
|
|
1209
|
-
sideBarFooterContent:
|
|
1210
|
-
selectedGroupColor:
|
|
1211
|
-
groupColor:
|
|
1212
|
-
backgroundGroupColor:
|
|
1213
|
-
groupLabelDarkColor:
|
|
1214
|
-
groupLabelLightColor:
|
|
1215
|
-
onCollapsedSideBar:
|
|
1216
|
-
onHiddenSidebar:
|
|
1217
|
-
sidebarDefaultGroupIcon:
|
|
1218
|
-
sidebarSelectedGroupName:
|
|
1307
|
+
sideBarHeaderHeight: x,
|
|
1308
|
+
sideBarHeaderContent: g,
|
|
1309
|
+
sideBarFooterHeight: C,
|
|
1310
|
+
sideBarFooterContent: w,
|
|
1311
|
+
selectedGroupColor: Q,
|
|
1312
|
+
groupColor: O,
|
|
1313
|
+
backgroundGroupColor: S,
|
|
1314
|
+
groupLabelDarkColor: V,
|
|
1315
|
+
groupLabelLightColor: H,
|
|
1316
|
+
onCollapsedSideBar: m,
|
|
1317
|
+
onHiddenSidebar: h,
|
|
1318
|
+
sidebarDefaultGroupIcon: f,
|
|
1319
|
+
sidebarSelectedGroupName: k,
|
|
1219
1320
|
headerColor: oA,
|
|
1220
|
-
footerHeight:
|
|
1221
|
-
iconsWithBackground:
|
|
1222
|
-
menuItemHeight:
|
|
1223
|
-
showSideBar:
|
|
1224
|
-
showHeader:
|
|
1225
|
-
headerStyle:
|
|
1226
|
-
highlightActiveMenuItem:
|
|
1321
|
+
footerHeight: J,
|
|
1322
|
+
iconsWithBackground: F,
|
|
1323
|
+
menuItemHeight: $,
|
|
1324
|
+
showSideBar: eA,
|
|
1325
|
+
showHeader: R,
|
|
1326
|
+
headerStyle: M,
|
|
1327
|
+
highlightActiveMenuItem: W,
|
|
1227
1328
|
enableSecurity: q,
|
|
1228
1329
|
customRenderSidebar: N,
|
|
1229
|
-
showCollapsedButton:
|
|
1230
|
-
sideBarBackgroundDarkColor:
|
|
1231
|
-
sideBarBackgroundLightColor:
|
|
1232
|
-
sideBarTextDarkColor:
|
|
1233
|
-
sideBarTextLightColor:
|
|
1234
|
-
sideBarIconDarkColor:
|
|
1235
|
-
sideBarIconLightColor:
|
|
1236
|
-
sideBarCollapsedSubmenuWidth:
|
|
1237
|
-
children:
|
|
1330
|
+
showCollapsedButton: u,
|
|
1331
|
+
sideBarBackgroundDarkColor: y,
|
|
1332
|
+
sideBarBackgroundLightColor: D,
|
|
1333
|
+
sideBarTextDarkColor: E,
|
|
1334
|
+
sideBarTextLightColor: B,
|
|
1335
|
+
sideBarIconDarkColor: z,
|
|
1336
|
+
sideBarIconLightColor: K,
|
|
1337
|
+
sideBarCollapsedSubmenuWidth: tA,
|
|
1338
|
+
children: r
|
|
1238
1339
|
}
|
|
1239
1340
|
)
|
|
1240
1341
|
}
|
|
1241
1342
|
);
|
|
1242
1343
|
}
|
|
1243
|
-
const
|
|
1344
|
+
const ie = yA({
|
|
1244
1345
|
state: { userCloseLinkRequest: "", linkClosed: "", isClosing: !1 },
|
|
1245
1346
|
dispatch: (e) => null
|
|
1246
|
-
}),
|
|
1247
|
-
const
|
|
1347
|
+
}), Eo = ({ children: e }) => {
|
|
1348
|
+
const o = {
|
|
1248
1349
|
userCloseLinkRequest: "",
|
|
1249
1350
|
linkClosed: "",
|
|
1250
1351
|
isClosing: !1
|
|
1251
|
-
},
|
|
1252
|
-
switch (
|
|
1352
|
+
}, c = (l, i) => {
|
|
1353
|
+
switch (i.type) {
|
|
1253
1354
|
case "USER_CLOSE_REQUEST":
|
|
1254
|
-
return console.log(`[Navigation Reducer] USER_CLOSE_REQUEST link: ${
|
|
1355
|
+
return console.log(`[Navigation Reducer] USER_CLOSE_REQUEST link: ${i.link}`), { ...l, userCloseLinkRequest: i.link, isClosing: !0 };
|
|
1255
1356
|
case "CLOSE_ALLOWED":
|
|
1256
|
-
return console.log(`[Navigation Reducer] CLOSE_ALLOWED link: ${
|
|
1357
|
+
return console.log(`[Navigation Reducer] CLOSE_ALLOWED link: ${i.link}`), { ...l, linkClosed: i.link, userCloseLinkRequest: "", isClosing: !1, payload: i.payload };
|
|
1257
1358
|
case "DONE":
|
|
1258
|
-
return console.log(`[Navigation Reducer] DONE link: ${
|
|
1359
|
+
return console.log(`[Navigation Reducer] DONE link: ${i.link}`), { ...l, linkClosed: i.link, isClosing: !1 };
|
|
1259
1360
|
case "CLEAR_PAYLOAD":
|
|
1260
|
-
const
|
|
1261
|
-
return delete
|
|
1361
|
+
const t = { ...l };
|
|
1362
|
+
return delete t.payload, t;
|
|
1262
1363
|
default:
|
|
1263
|
-
return
|
|
1364
|
+
return l;
|
|
1264
1365
|
}
|
|
1265
|
-
}, [
|
|
1266
|
-
return
|
|
1267
|
-
let
|
|
1268
|
-
return
|
|
1269
|
-
console.log(`[NavigationProvider] No response received, auto-closing: ${
|
|
1366
|
+
}, [r, s] = ce(c, o);
|
|
1367
|
+
return AA.useEffect(() => {
|
|
1368
|
+
let l = null;
|
|
1369
|
+
return r.userCloseLinkRequest && !r.linkClosed && (console.log(`[NavigationProvider] Waiting for close response for: ${r.userCloseLinkRequest}`), l = setTimeout(() => {
|
|
1370
|
+
console.log(`[NavigationProvider] No response received, auto-closing: ${r.userCloseLinkRequest}`), s({ type: "CLOSE_ALLOWED", link: r.userCloseLinkRequest });
|
|
1270
1371
|
}, 100)), () => {
|
|
1271
|
-
|
|
1372
|
+
l && clearTimeout(l);
|
|
1272
1373
|
};
|
|
1273
|
-
}, [
|
|
1274
|
-
},
|
|
1275
|
-
const e =
|
|
1374
|
+
}, [r.userCloseLinkRequest, r.linkClosed, s]), /* @__PURE__ */ A(ie.Provider, { value: { state: r, dispatch: s }, children: e });
|
|
1375
|
+
}, le = () => {
|
|
1376
|
+
const e = cA(ie);
|
|
1276
1377
|
if (!e)
|
|
1277
1378
|
throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
|
|
1278
1379
|
return e;
|
|
1279
|
-
},
|
|
1280
|
-
const
|
|
1281
|
-
console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`),
|
|
1282
|
-
}, [
|
|
1283
|
-
|
|
1284
|
-
console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${
|
|
1285
|
-
}, [
|
|
1286
|
-
const
|
|
1287
|
-
return { closeAllowed:
|
|
1380
|
+
}, So = (e, o) => {
|
|
1381
|
+
const c = le(), { state: r, dispatch: s } = c, l = sA((d) => {
|
|
1382
|
+
console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`), s({ type: "CLOSE_ALLOWED", link: e, payload: d });
|
|
1383
|
+
}, [s, e]), i = rA(o);
|
|
1384
|
+
i.current = o, U(() => {
|
|
1385
|
+
console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${r?.userCloseLinkRequest}, id: ${e}`), r && r.userCloseLinkRequest && r.userCloseLinkRequest === e && (console.log(`[useArchbaseNavigationListener] Calling onUserCloseRequest for: ${e}`), i.current());
|
|
1386
|
+
}, [r, e]);
|
|
1387
|
+
const t = r.isClosing && r.userCloseLinkRequest === e;
|
|
1388
|
+
return { closeAllowed: l, isClosing: t };
|
|
1288
1389
|
};
|
|
1289
|
-
function
|
|
1390
|
+
function Ro({
|
|
1290
1391
|
navigationData: e,
|
|
1291
|
-
onChangeOpenedTabs:
|
|
1292
|
-
onChangeActiveTabId:
|
|
1293
|
-
activeTabId:
|
|
1294
|
-
openedTabs:
|
|
1392
|
+
onChangeOpenedTabs: o,
|
|
1393
|
+
onChangeActiveTabId: c,
|
|
1394
|
+
activeTabId: r,
|
|
1395
|
+
openedTabs: s = []
|
|
1295
1396
|
}) {
|
|
1296
|
-
const [
|
|
1297
|
-
|
|
1298
|
-
const
|
|
1397
|
+
const [l, i] = AA.useTransition(), t = $A(), { colorScheme: d } = nA(), [n, p] = _(s), [C, w] = _(r), m = UA(), h = rA([]);
|
|
1398
|
+
ur(h);
|
|
1399
|
+
const f = le(), { state: k, dispatch: x } = f, g = cA(SA), Q = se(), O = rA(o), S = rA(c);
|
|
1299
1400
|
U(() => {
|
|
1300
|
-
|
|
1401
|
+
O.current = o, S.current = c;
|
|
1301
1402
|
});
|
|
1302
|
-
const
|
|
1303
|
-
console.log(`[TabContainer] handleOnClose called for: ${
|
|
1304
|
-
const
|
|
1305
|
-
let
|
|
1306
|
-
!
|
|
1307
|
-
const
|
|
1308
|
-
let
|
|
1309
|
-
|
|
1310
|
-
let
|
|
1311
|
-
|
|
1312
|
-
const
|
|
1313
|
-
...
|
|
1314
|
-
active:
|
|
1403
|
+
const V = rA(!1), H = sA((b, u) => {
|
|
1404
|
+
console.log(`[TabContainer] handleOnClose called for: ${b}`), Q ? Q.requestUnregister(b) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
|
|
1405
|
+
const a = n.findIndex((K) => K.path === b);
|
|
1406
|
+
let y = u?.redirectUrl;
|
|
1407
|
+
!y && a >= 0 && (y = n[a].redirect);
|
|
1408
|
+
const D = n.filter((K) => K.id !== b);
|
|
1409
|
+
let E = -1;
|
|
1410
|
+
D.forEach((K, tA) => K.id === C && (E = tA));
|
|
1411
|
+
let B = null;
|
|
1412
|
+
D.length > 0 && D[E] ? B = D[E].id : D.length > 0 ? B = D[D.length - 1].id : B = null;
|
|
1413
|
+
const z = D.map((K) => ({
|
|
1414
|
+
...K,
|
|
1415
|
+
active: B === K.id
|
|
1315
1416
|
}));
|
|
1316
|
-
if (p(
|
|
1317
|
-
|
|
1417
|
+
if (p(z), B && B != null)
|
|
1418
|
+
w(B), t(y || B);
|
|
1318
1419
|
else {
|
|
1319
|
-
if (
|
|
1420
|
+
if (w(void 0), !g.navigationRootLink) {
|
|
1320
1421
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
1321
1422
|
return;
|
|
1322
1423
|
}
|
|
1323
|
-
|
|
1424
|
+
t(g.navigationRootLink);
|
|
1324
1425
|
}
|
|
1325
|
-
|
|
1326
|
-
}, [
|
|
1426
|
+
x({ type: "DONE", link: "" });
|
|
1427
|
+
}, [n, C, t, g.navigationRootLink, x, Q]);
|
|
1327
1428
|
U(() => {
|
|
1328
|
-
|
|
1329
|
-
}, [
|
|
1330
|
-
const oA = (
|
|
1331
|
-
const
|
|
1429
|
+
k?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${k?.linkClosed}`), H(k?.linkClosed, k?.payload));
|
|
1430
|
+
}, [k?.linkClosed, k?.payload, H]);
|
|
1431
|
+
const oA = (b) => {
|
|
1432
|
+
const u = {
|
|
1332
1433
|
item: void 0,
|
|
1333
1434
|
title: void 0,
|
|
1334
|
-
link:
|
|
1435
|
+
link: b,
|
|
1335
1436
|
redirect: void 0,
|
|
1336
1437
|
customTitle: void 0
|
|
1337
1438
|
};
|
|
1338
|
-
return e.forEach((
|
|
1339
|
-
if (
|
|
1340
|
-
|
|
1341
|
-
|
|
1439
|
+
return e.forEach((a) => {
|
|
1440
|
+
if (a.links)
|
|
1441
|
+
a.links.forEach((y) => {
|
|
1442
|
+
HA({ path: y.link || "" }, location.pathname) && (u.item = y, u.title = `${I().t(y.label)}`, u.redirect = y.redirect, u.customTitle = y.customTitle);
|
|
1342
1443
|
});
|
|
1343
|
-
else if (
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1444
|
+
else if (a.link && !u.item) {
|
|
1445
|
+
const y = HA({ path: a.link }, location.pathname);
|
|
1446
|
+
y && (y.params && Object.keys(y.params).length > 0 ? u.title = `${y.params[Object.keys(y.params)[0]]}` : u.title = `${I().t(a.label)}`, u.item = a, u.redirect = a.redirect, u.customTitle = a.customTitle);
|
|
1346
1447
|
}
|
|
1347
|
-
}),
|
|
1448
|
+
}), u.customTitle && (u.customTitle = u.customTitle.replace("$title", u.title)), u;
|
|
1348
1449
|
};
|
|
1349
1450
|
U(() => {
|
|
1350
|
-
p(
|
|
1351
|
-
}, [JSON.stringify(
|
|
1352
|
-
const
|
|
1451
|
+
p(s), V.current = !0;
|
|
1452
|
+
}, [JSON.stringify(s)]);
|
|
1453
|
+
const J = rA(n), F = rA(C);
|
|
1353
1454
|
U(() => {
|
|
1354
|
-
if (
|
|
1355
|
-
|
|
1455
|
+
if (V.current) {
|
|
1456
|
+
V.current = !1, J.current = n, F.current = C;
|
|
1356
1457
|
return;
|
|
1357
1458
|
}
|
|
1358
|
-
const
|
|
1359
|
-
if (
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1459
|
+
const b = JSON.stringify(J.current) !== JSON.stringify(n), u = F.current !== C;
|
|
1460
|
+
if (b || u) {
|
|
1461
|
+
const a = setTimeout(() => {
|
|
1462
|
+
O.current?.(n), S.current?.(C);
|
|
1362
1463
|
}, 0);
|
|
1363
|
-
return
|
|
1464
|
+
return J.current = n, F.current = C, () => clearTimeout(a);
|
|
1364
1465
|
}
|
|
1365
|
-
}, [
|
|
1366
|
-
const
|
|
1466
|
+
}, [n, C]);
|
|
1467
|
+
const $ = rA(m.pathname);
|
|
1367
1468
|
U(() => {
|
|
1368
|
-
if (
|
|
1469
|
+
if ($.current === m.pathname)
|
|
1369
1470
|
return;
|
|
1370
|
-
|
|
1371
|
-
const
|
|
1372
|
-
if (
|
|
1373
|
-
const
|
|
1374
|
-
if (
|
|
1375
|
-
if (
|
|
1376
|
-
const
|
|
1377
|
-
|
|
1471
|
+
$.current = m.pathname;
|
|
1472
|
+
const b = oA(m.pathname);
|
|
1473
|
+
if (b && b.item) {
|
|
1474
|
+
const u = n.findIndex((a) => a.path === b.link);
|
|
1475
|
+
if (u !== -1) {
|
|
1476
|
+
if (n[u].title !== b.title) {
|
|
1477
|
+
const a = [...n];
|
|
1478
|
+
a[u] = { ...a[u], title: b.title }, p(a);
|
|
1378
1479
|
}
|
|
1379
|
-
|
|
1480
|
+
w(n[u].id);
|
|
1380
1481
|
} else {
|
|
1381
|
-
const
|
|
1382
|
-
id: `${
|
|
1383
|
-
title: `${
|
|
1384
|
-
path: `${
|
|
1482
|
+
const a = {
|
|
1483
|
+
id: `${b.link}`,
|
|
1484
|
+
title: `${b.title}`,
|
|
1485
|
+
path: `${b.link}`,
|
|
1385
1486
|
active: !0,
|
|
1386
|
-
content:
|
|
1387
|
-
iconClass:
|
|
1487
|
+
content: b.item.component,
|
|
1488
|
+
iconClass: b.item.icon,
|
|
1388
1489
|
closeButton: !0,
|
|
1389
|
-
redirect:
|
|
1390
|
-
customTitle:
|
|
1391
|
-
},
|
|
1392
|
-
p(
|
|
1490
|
+
redirect: b.redirect,
|
|
1491
|
+
customTitle: b.customTitle
|
|
1492
|
+
}, y = [...n.map((D) => ({ ...D, active: !1 })), a];
|
|
1493
|
+
p(y), w(a.id);
|
|
1393
1494
|
}
|
|
1394
1495
|
}
|
|
1395
|
-
}, [
|
|
1396
|
-
const
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
|
|
1496
|
+
}, [m.pathname]);
|
|
1497
|
+
const eA = (b) => {
|
|
1498
|
+
const u = n.filter((a) => a.id === b);
|
|
1499
|
+
u && u.length > 0 && m.pathname !== u[0].path && t(u[0].path), i(() => {
|
|
1500
|
+
w(b);
|
|
1400
1501
|
});
|
|
1401
|
-
},
|
|
1402
|
-
console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${
|
|
1502
|
+
}, R = (b) => {
|
|
1503
|
+
console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${b}`);
|
|
1403
1504
|
try {
|
|
1404
|
-
|
|
1405
|
-
} catch (
|
|
1406
|
-
console.error("[TabContainer] Dispatch failed:",
|
|
1505
|
+
x({ type: "USER_CLOSE_REQUEST", link: b });
|
|
1506
|
+
} catch (u) {
|
|
1507
|
+
console.error("[TabContainer] Dispatch failed:", u);
|
|
1407
1508
|
}
|
|
1408
|
-
},
|
|
1409
|
-
if (p([]),
|
|
1509
|
+
}, M = sA(() => {
|
|
1510
|
+
if (p([]), w(void 0), !g.navigationRootLink) {
|
|
1410
1511
|
console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
|
|
1411
1512
|
return;
|
|
1412
1513
|
}
|
|
1413
|
-
|
|
1414
|
-
}, [
|
|
1415
|
-
const
|
|
1416
|
-
if (
|
|
1514
|
+
t(g.navigationRootLink);
|
|
1515
|
+
}, [t, g.navigationRootLink]), W = sA((b) => {
|
|
1516
|
+
const u = n.findIndex((E) => E.id === b);
|
|
1517
|
+
if (u <= 0)
|
|
1417
1518
|
return;
|
|
1418
|
-
const
|
|
1419
|
-
...
|
|
1420
|
-
active:
|
|
1519
|
+
const a = n.slice(u), y = a.find((E) => E.id === C)?.id || a[0]?.id, D = a.map((E) => ({
|
|
1520
|
+
...E,
|
|
1521
|
+
active: E.id === y
|
|
1421
1522
|
}));
|
|
1422
|
-
if (p(
|
|
1423
|
-
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1523
|
+
if (p(D), y) {
|
|
1524
|
+
w(y);
|
|
1525
|
+
const E = D.find((B) => B.id === y);
|
|
1526
|
+
E && m.pathname !== E.path && t(E.path);
|
|
1426
1527
|
}
|
|
1427
|
-
}, [
|
|
1428
|
-
const
|
|
1429
|
-
if (
|
|
1528
|
+
}, [n, C, t, m.pathname]), q = sA((b) => {
|
|
1529
|
+
const u = n.findIndex((E) => E.id === b);
|
|
1530
|
+
if (u === -1 || u >= n.length - 1)
|
|
1430
1531
|
return;
|
|
1431
|
-
const
|
|
1432
|
-
...
|
|
1433
|
-
active:
|
|
1532
|
+
const a = n.slice(0, u + 1), y = a.find((E) => E.id === C)?.id || a[a.length - 1]?.id, D = a.map((E) => ({
|
|
1533
|
+
...E,
|
|
1534
|
+
active: E.id === y
|
|
1434
1535
|
}));
|
|
1435
|
-
if (p(
|
|
1436
|
-
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1536
|
+
if (p(D), y) {
|
|
1537
|
+
w(y);
|
|
1538
|
+
const E = D.find((B) => B.id === y);
|
|
1539
|
+
E && m.pathname !== E.path && t(E.path);
|
|
1439
1540
|
}
|
|
1440
|
-
}, [
|
|
1441
|
-
const
|
|
1442
|
-
if (!
|
|
1541
|
+
}, [n, C, t, m.pathname]), G = sA((b) => {
|
|
1542
|
+
const u = n.find((y) => y.id === b);
|
|
1543
|
+
if (!u)
|
|
1443
1544
|
return;
|
|
1444
|
-
const
|
|
1445
|
-
p(
|
|
1446
|
-
}, [
|
|
1447
|
-
return /* @__PURE__ */ A("div", { ref:
|
|
1448
|
-
|
|
1545
|
+
const a = [{ ...u, active: !0 }];
|
|
1546
|
+
p(a), w(b), m.pathname !== u.path && t(u.path);
|
|
1547
|
+
}, [n, t, m.pathname]);
|
|
1548
|
+
return /* @__PURE__ */ A("div", { ref: h, children: /* @__PURE__ */ A(
|
|
1549
|
+
hr,
|
|
1449
1550
|
{
|
|
1450
1551
|
buttonCloseOnlyActiveTab: !0,
|
|
1451
|
-
onClick: (
|
|
1452
|
-
onTabClose: (
|
|
1453
|
-
onTabChange: (
|
|
1454
|
-
onCloseAllTabs:
|
|
1455
|
-
onCloseLeftTabs:
|
|
1552
|
+
onClick: (b) => eA(b),
|
|
1553
|
+
onTabClose: (b) => R(b),
|
|
1554
|
+
onTabChange: (b) => null,
|
|
1555
|
+
onCloseAllTabs: M,
|
|
1556
|
+
onCloseLeftTabs: W,
|
|
1456
1557
|
onCloseRightTabs: q,
|
|
1457
|
-
onCloseOtherTabs:
|
|
1458
|
-
currentTabs: ((
|
|
1459
|
-
key:
|
|
1460
|
-
favicon:
|
|
1461
|
-
title:
|
|
1462
|
-
customTitle:
|
|
1463
|
-
})))(
|
|
1464
|
-
activeTab:
|
|
1465
|
-
dark:
|
|
1558
|
+
onCloseOtherTabs: G,
|
|
1559
|
+
currentTabs: ((b) => b.map((u) => ({
|
|
1560
|
+
key: u.id,
|
|
1561
|
+
favicon: u.iconClass,
|
|
1562
|
+
title: u.title,
|
|
1563
|
+
customTitle: u.customTitle
|
|
1564
|
+
})))(n),
|
|
1565
|
+
activeTab: C,
|
|
1566
|
+
dark: d === "dark"
|
|
1466
1567
|
}
|
|
1467
1568
|
) });
|
|
1468
1569
|
}
|
|
1469
|
-
const
|
|
1570
|
+
const Nr = () => AA.createElement("div", null, "Home View"), $r = () => AA.createElement("div", null, "Pedido Form"), Ur = () => AA.createElement("div", null, "Pedido View"), Fr = () => AA.createElement("div", null, "Pessoa Form"), qr = () => AA.createElement("div", null, "Pessoa View"), Br = {
|
|
1470
1571
|
label: "Dashboard",
|
|
1471
|
-
icon: /* @__PURE__ */ A(
|
|
1572
|
+
icon: /* @__PURE__ */ A(Te, {}),
|
|
1472
1573
|
link: "/dashboard",
|
|
1473
1574
|
category: "DASHBOARD",
|
|
1474
1575
|
color: "teal",
|
|
1475
1576
|
component: /* @__PURE__ */ A("div", {}),
|
|
1476
1577
|
showInSidebar: !0
|
|
1477
|
-
},
|
|
1578
|
+
}, Vr = {
|
|
1478
1579
|
label: "Home",
|
|
1479
|
-
icon: /* @__PURE__ */ A(
|
|
1580
|
+
icon: /* @__PURE__ */ A(Le, {}),
|
|
1480
1581
|
link: "/home",
|
|
1481
1582
|
category: "HOME",
|
|
1482
1583
|
color: "teal",
|
|
1483
|
-
component: /* @__PURE__ */ A(
|
|
1584
|
+
component: /* @__PURE__ */ A(Nr, {}),
|
|
1484
1585
|
showInSidebar: !0,
|
|
1485
1586
|
keepAlive: !0
|
|
1486
|
-
},
|
|
1587
|
+
}, Hr = {
|
|
1487
1588
|
label: "Consulta lista pessoas",
|
|
1488
1589
|
link: "/pessoa/consulta",
|
|
1489
|
-
icon: /* @__PURE__ */ A(
|
|
1590
|
+
icon: /* @__PURE__ */ A(ZA, {}),
|
|
1490
1591
|
category: "PESSOAS",
|
|
1491
1592
|
color: "pink",
|
|
1492
|
-
component: /* @__PURE__ */ A(
|
|
1593
|
+
component: /* @__PURE__ */ A(qr, {}),
|
|
1493
1594
|
showInSidebar: !0,
|
|
1494
1595
|
keepAlive: !0
|
|
1495
|
-
},
|
|
1596
|
+
}, Gr = {
|
|
1496
1597
|
label: "Nova pessoa",
|
|
1497
1598
|
link: "/pessoa/nova",
|
|
1498
|
-
icon: /* @__PURE__ */ A(
|
|
1599
|
+
icon: /* @__PURE__ */ A(Pe, {}),
|
|
1499
1600
|
category: "PESSOAS",
|
|
1500
1601
|
color: "pink",
|
|
1501
|
-
component: /* @__PURE__ */ A(
|
|
1602
|
+
component: /* @__PURE__ */ A(Fr, {}),
|
|
1502
1603
|
showInSidebar: !0,
|
|
1503
1604
|
keepAlive: !0
|
|
1504
|
-
},
|
|
1605
|
+
}, Kr = {
|
|
1505
1606
|
label: "Pessoas",
|
|
1506
|
-
icon: /* @__PURE__ */ A(
|
|
1507
|
-
links: [
|
|
1607
|
+
icon: /* @__PURE__ */ A(Ie, {}),
|
|
1608
|
+
links: [Hr, Gr],
|
|
1508
1609
|
category: "PESSOAS",
|
|
1509
1610
|
color: "pink",
|
|
1510
1611
|
showInSidebar: !0
|
|
1511
|
-
},
|
|
1612
|
+
}, Yr = {
|
|
1512
1613
|
label: "Consulta lista pedidos",
|
|
1513
1614
|
link: "/pedido/consulta",
|
|
1514
|
-
icon: /* @__PURE__ */ A(
|
|
1615
|
+
icon: /* @__PURE__ */ A(ZA, {}),
|
|
1515
1616
|
category: "PEDIDOS",
|
|
1516
1617
|
color: "yellow",
|
|
1517
|
-
component: /* @__PURE__ */ A(
|
|
1618
|
+
component: /* @__PURE__ */ A(Ur, {}),
|
|
1518
1619
|
showInSidebar: !0,
|
|
1519
1620
|
keepAlive: !0
|
|
1520
|
-
},
|
|
1621
|
+
}, Xr = {
|
|
1521
1622
|
label: "Novo pedido",
|
|
1522
1623
|
link: "/pedido/novo",
|
|
1523
|
-
icon: /* @__PURE__ */ A(
|
|
1624
|
+
icon: /* @__PURE__ */ A(Oe, {}),
|
|
1524
1625
|
category: "PEDIDOS",
|
|
1525
1626
|
color: "yellow",
|
|
1526
|
-
component: /* @__PURE__ */ A(
|
|
1627
|
+
component: /* @__PURE__ */ A($r, {}),
|
|
1527
1628
|
showInSidebar: !0,
|
|
1528
1629
|
keepAlive: !0
|
|
1529
|
-
},
|
|
1630
|
+
}, Jr = {
|
|
1530
1631
|
label: "Pedidos",
|
|
1531
|
-
icon: /* @__PURE__ */ A(
|
|
1532
|
-
links: [
|
|
1632
|
+
icon: /* @__PURE__ */ A(De, {}),
|
|
1633
|
+
links: [Yr, Xr],
|
|
1533
1634
|
category: "PEDIDOS",
|
|
1534
1635
|
color: "yellow",
|
|
1535
1636
|
showInSidebar: !0
|
|
1536
|
-
},
|
|
1637
|
+
}, jr = {
|
|
1537
1638
|
label: "Configurações",
|
|
1538
1639
|
link: "/config",
|
|
1539
|
-
icon: /* @__PURE__ */ A(
|
|
1640
|
+
icon: /* @__PURE__ */ A(Qe, {}),
|
|
1540
1641
|
category: "CONFIGURAÇÕES",
|
|
1541
1642
|
color: "lime",
|
|
1542
1643
|
component: /* @__PURE__ */ A("div", {}),
|
|
1543
1644
|
showInSidebar: !0
|
|
1544
|
-
},
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1645
|
+
}, Lo = [
|
|
1646
|
+
Vr,
|
|
1647
|
+
Br,
|
|
1648
|
+
Kr,
|
|
1649
|
+
Jr,
|
|
1650
|
+
jr
|
|
1550
1651
|
];
|
|
1551
|
-
function
|
|
1552
|
-
|
|
1652
|
+
function To({
|
|
1653
|
+
itemCount: e = 8,
|
|
1654
|
+
collapsed: o = !1,
|
|
1655
|
+
backgroundColor: c
|
|
1656
|
+
}) {
|
|
1657
|
+
const r = vA(), { colorScheme: s } = nA(), l = c ?? (s === "dark" ? r.colors.dark[7] : r.white);
|
|
1658
|
+
return o ? /* @__PURE__ */ A(
|
|
1659
|
+
lA,
|
|
1660
|
+
{
|
|
1661
|
+
gap: "sm",
|
|
1662
|
+
p: "xs",
|
|
1663
|
+
align: "center",
|
|
1664
|
+
style: {
|
|
1665
|
+
backgroundColor: l,
|
|
1666
|
+
width: "100%",
|
|
1667
|
+
height: "100%"
|
|
1668
|
+
},
|
|
1669
|
+
children: Array.from({ length: e }).map((i, t) => /* @__PURE__ */ A(
|
|
1670
|
+
mA,
|
|
1671
|
+
{
|
|
1672
|
+
height: 32,
|
|
1673
|
+
width: 32,
|
|
1674
|
+
radius: "sm"
|
|
1675
|
+
},
|
|
1676
|
+
t
|
|
1677
|
+
))
|
|
1678
|
+
}
|
|
1679
|
+
) : /* @__PURE__ */ A(
|
|
1680
|
+
lA,
|
|
1681
|
+
{
|
|
1682
|
+
gap: "xs",
|
|
1683
|
+
p: "md",
|
|
1684
|
+
style: {
|
|
1685
|
+
backgroundColor: l,
|
|
1686
|
+
flex: 1,
|
|
1687
|
+
width: "100%",
|
|
1688
|
+
height: "100%"
|
|
1689
|
+
},
|
|
1690
|
+
children: Array.from({ length: e }).map((i, t) => /* @__PURE__ */ P(OA, { gap: "sm", wrap: "nowrap", children: [
|
|
1691
|
+
/* @__PURE__ */ A(
|
|
1692
|
+
mA,
|
|
1693
|
+
{
|
|
1694
|
+
height: 24,
|
|
1695
|
+
width: 24,
|
|
1696
|
+
radius: "sm"
|
|
1697
|
+
}
|
|
1698
|
+
),
|
|
1699
|
+
/* @__PURE__ */ A(
|
|
1700
|
+
mA,
|
|
1701
|
+
{
|
|
1702
|
+
height: 18,
|
|
1703
|
+
radius: "xl",
|
|
1704
|
+
style: { flex: 1 }
|
|
1705
|
+
}
|
|
1706
|
+
)
|
|
1707
|
+
] }, t))
|
|
1708
|
+
}
|
|
1709
|
+
);
|
|
1710
|
+
}
|
|
1711
|
+
function Io({
|
|
1712
|
+
groupCount: e = 3,
|
|
1713
|
+
width: o = "80px",
|
|
1714
|
+
height: c = "100%",
|
|
1715
|
+
backgroundColor: r
|
|
1716
|
+
}) {
|
|
1717
|
+
const s = vA(), { colorScheme: l } = nA(), i = r ?? (l === "dark" ? s.colors[s.primaryColor][6] : s.colors[s.primaryColor][7]);
|
|
1718
|
+
return /* @__PURE__ */ A(
|
|
1719
|
+
lA,
|
|
1720
|
+
{
|
|
1721
|
+
gap: "md",
|
|
1722
|
+
p: "xs",
|
|
1723
|
+
align: "center",
|
|
1724
|
+
style: {
|
|
1725
|
+
width: o,
|
|
1726
|
+
height: c,
|
|
1727
|
+
backgroundColor: i
|
|
1728
|
+
},
|
|
1729
|
+
children: Array.from({ length: e }).map((t, d) => /* @__PURE__ */ P(lA, { gap: 4, align: "center", children: [
|
|
1730
|
+
/* @__PURE__ */ A(
|
|
1731
|
+
mA,
|
|
1732
|
+
{
|
|
1733
|
+
height: 48,
|
|
1734
|
+
width: 48,
|
|
1735
|
+
radius: "md",
|
|
1736
|
+
circle: !1
|
|
1737
|
+
}
|
|
1738
|
+
),
|
|
1739
|
+
/* @__PURE__ */ A(
|
|
1740
|
+
mA,
|
|
1741
|
+
{
|
|
1742
|
+
height: 10,
|
|
1743
|
+
width: 40,
|
|
1744
|
+
radius: "xl"
|
|
1745
|
+
}
|
|
1746
|
+
)
|
|
1747
|
+
] }, d))
|
|
1748
|
+
}
|
|
1749
|
+
);
|
|
1750
|
+
}
|
|
1751
|
+
function Po({
|
|
1752
|
+
message: e,
|
|
1753
|
+
backgroundColor: o,
|
|
1754
|
+
children: c
|
|
1755
|
+
}) {
|
|
1756
|
+
const r = vA(), { colorScheme: s } = nA(), l = o ?? (s === "dark" ? r.colors.dark[7] : r.white), i = s === "dark" ? r.colors.red[4] : r.colors.red[6];
|
|
1757
|
+
return c ? /* @__PURE__ */ A(iA, { children: c }) : /* @__PURE__ */ A(XA, { p: "md", style: { backgroundColor: l, flex: 1, height: "100%" }, children: /* @__PURE__ */ P(lA, { align: "center", gap: "xs", children: [
|
|
1758
|
+
/* @__PURE__ */ A(ze, { size: 32, color: i }),
|
|
1759
|
+
/* @__PURE__ */ A(QA, { size: "sm", c: i, ta: "center", children: e })
|
|
1760
|
+
] }) });
|
|
1761
|
+
}
|
|
1762
|
+
function Do({ children: e, title: o = "", size: c = "440px", drawerKey: r, styles: s }) {
|
|
1763
|
+
const [l, { open: i, close: t }] = he(!1), [d] = ee(), n = tr(), p = FA();
|
|
1553
1764
|
return U(() => {
|
|
1554
|
-
|
|
1555
|
-
}, [
|
|
1556
|
-
|
|
1765
|
+
d.get("drawer") === r && i();
|
|
1766
|
+
}, [d]), /* @__PURE__ */ A(
|
|
1767
|
+
JA,
|
|
1557
1768
|
{
|
|
1558
1769
|
position: "right",
|
|
1559
|
-
opened:
|
|
1770
|
+
opened: l,
|
|
1560
1771
|
onClose: () => {
|
|
1561
|
-
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1772
|
+
t();
|
|
1773
|
+
const w = new URLSearchParams(d);
|
|
1774
|
+
w.delete("drawer"), n({
|
|
1564
1775
|
pathname: p.pathname,
|
|
1565
|
-
search:
|
|
1776
|
+
search: w.toString()
|
|
1566
1777
|
});
|
|
1567
1778
|
},
|
|
1568
|
-
title:
|
|
1569
|
-
size:
|
|
1570
|
-
styles:
|
|
1779
|
+
title: o,
|
|
1780
|
+
size: c,
|
|
1781
|
+
styles: s,
|
|
1571
1782
|
children: e
|
|
1572
1783
|
}
|
|
1573
1784
|
);
|
|
1574
1785
|
}
|
|
1575
|
-
function
|
|
1576
|
-
const
|
|
1786
|
+
function Wr(e) {
|
|
1787
|
+
const o = $A(), c = UA(), [r] = ee();
|
|
1577
1788
|
return { openDrawer: () => {
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1580
|
-
pathname:
|
|
1581
|
-
search:
|
|
1789
|
+
const l = new URLSearchParams(r);
|
|
1790
|
+
l.set("drawer", e), o({
|
|
1791
|
+
pathname: c.pathname,
|
|
1792
|
+
search: l.toString()
|
|
1582
1793
|
});
|
|
1583
1794
|
} };
|
|
1584
1795
|
}
|
|
1585
|
-
function
|
|
1586
|
-
const { openDrawer:
|
|
1796
|
+
function Oo({ drawerKey: e }) {
|
|
1797
|
+
const { openDrawer: o } = Wr(e);
|
|
1587
1798
|
return U(() => {
|
|
1588
|
-
|
|
1799
|
+
o();
|
|
1589
1800
|
}, []), null;
|
|
1590
1801
|
}
|
|
1591
|
-
const
|
|
1802
|
+
const Zr = {
|
|
1592
1803
|
// Campos de identificação
|
|
1593
1804
|
showNickname: !0,
|
|
1594
1805
|
// Configurações de campos obrigatórios
|
|
@@ -1596,47 +1807,47 @@ const Go = {
|
|
|
1596
1807
|
avatarMaxSizeKB: 2e3,
|
|
1597
1808
|
avatarImageQuality: 1
|
|
1598
1809
|
};
|
|
1599
|
-
function
|
|
1600
|
-
const
|
|
1601
|
-
name: `dsUser${
|
|
1602
|
-
label: `${
|
|
1603
|
-
service:
|
|
1604
|
-
store:
|
|
1810
|
+
function Qo({ opened: e, handleClose: o, userId: c, updateUser: r, options: s }) {
|
|
1811
|
+
const l = pe(), i = ge(), t = Me(), d = pr(`myProfile${c}Store`), n = gr(Ne.User), p = { ...Zr, ...s ?? {} }, { dataSource: C, isLoading: w, error: m, isError: h, clearError: f } = fr({
|
|
1812
|
+
name: `dsUser${c}`,
|
|
1813
|
+
label: `${I().t("archbase:My Profile")}`,
|
|
1814
|
+
service: n,
|
|
1815
|
+
store: d,
|
|
1605
1816
|
pageSize: 50,
|
|
1606
1817
|
loadOnStart: !0,
|
|
1607
|
-
validator:
|
|
1608
|
-
id:
|
|
1609
|
-
onLoadComplete: (
|
|
1610
|
-
|
|
1818
|
+
validator: t,
|
|
1819
|
+
id: c,
|
|
1820
|
+
onLoadComplete: (x) => {
|
|
1821
|
+
x.isBrowsing() && x.edit(), i();
|
|
1611
1822
|
},
|
|
1612
|
-
onDestroy: (
|
|
1823
|
+
onDestroy: (x) => {
|
|
1613
1824
|
},
|
|
1614
|
-
onError: (
|
|
1615
|
-
|
|
1825
|
+
onError: (x, g) => {
|
|
1826
|
+
lr.showError(I().t("archbase:WARNING"), x, g);
|
|
1616
1827
|
}
|
|
1617
1828
|
});
|
|
1618
1829
|
U(() => {
|
|
1619
|
-
e &&
|
|
1620
|
-
}, [
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1830
|
+
e && C && C.isBrowsing() && C.edit();
|
|
1831
|
+
}, [C, e]);
|
|
1832
|
+
const k = (x) => {
|
|
1833
|
+
x && (console.log(x), r(x.name, x.avatar));
|
|
1623
1834
|
};
|
|
1624
1835
|
return /* @__PURE__ */ A(
|
|
1625
|
-
|
|
1836
|
+
br,
|
|
1626
1837
|
{
|
|
1627
|
-
title:
|
|
1838
|
+
title: I().t("archbase:My Profile"),
|
|
1628
1839
|
size: 800,
|
|
1629
1840
|
height: "500px",
|
|
1630
1841
|
opened: e,
|
|
1631
|
-
dataSource:
|
|
1632
|
-
onClickOk:
|
|
1633
|
-
onClickCancel:
|
|
1634
|
-
onAfterSave:
|
|
1635
|
-
children: /* @__PURE__ */ A(
|
|
1636
|
-
/* @__PURE__ */ A(
|
|
1637
|
-
|
|
1842
|
+
dataSource: C,
|
|
1843
|
+
onClickOk: o,
|
|
1844
|
+
onClickCancel: o,
|
|
1845
|
+
onAfterSave: k,
|
|
1846
|
+
children: /* @__PURE__ */ A(zA, { style: { height: "440px" }, ref: l, children: /* @__PURE__ */ P(lA, { children: [
|
|
1847
|
+
/* @__PURE__ */ A(lA, { align: "center", children: /* @__PURE__ */ A(
|
|
1848
|
+
cr,
|
|
1638
1849
|
{
|
|
1639
|
-
dataSource:
|
|
1850
|
+
dataSource: C,
|
|
1640
1851
|
dataField: "avatar",
|
|
1641
1852
|
width: 200,
|
|
1642
1853
|
height: 200,
|
|
@@ -1645,31 +1856,31 @@ function mn({ opened: e, handleClose: n, userId: d, updateUser: o, options: h })
|
|
|
1645
1856
|
}
|
|
1646
1857
|
) }),
|
|
1647
1858
|
/* @__PURE__ */ A(
|
|
1648
|
-
|
|
1859
|
+
TA,
|
|
1649
1860
|
{
|
|
1650
|
-
label: `${
|
|
1651
|
-
placeholder: `${
|
|
1652
|
-
dataSource:
|
|
1861
|
+
label: `${I().t("archbase:Nome completo")}`,
|
|
1862
|
+
placeholder: `${I().t("archbase:Informe o nome completo do usuário")}`,
|
|
1863
|
+
dataSource: C,
|
|
1653
1864
|
dataField: "name",
|
|
1654
1865
|
required: !0
|
|
1655
1866
|
}
|
|
1656
1867
|
),
|
|
1657
1868
|
p.showNickname && /* @__PURE__ */ A(
|
|
1658
|
-
|
|
1869
|
+
TA,
|
|
1659
1870
|
{
|
|
1660
|
-
label: `${
|
|
1661
|
-
placeholder: `${
|
|
1662
|
-
dataSource:
|
|
1871
|
+
label: `${I().t("archbase:Apelido")}`,
|
|
1872
|
+
placeholder: `${I().t("archbase:Apelido")}`,
|
|
1873
|
+
dataSource: C,
|
|
1663
1874
|
dataField: "nickname",
|
|
1664
1875
|
required: p.requiredNickname
|
|
1665
1876
|
}
|
|
1666
1877
|
),
|
|
1667
1878
|
/* @__PURE__ */ A(
|
|
1668
|
-
|
|
1879
|
+
TA,
|
|
1669
1880
|
{
|
|
1670
|
-
label: `${
|
|
1671
|
-
placeholder: `${
|
|
1672
|
-
dataSource:
|
|
1881
|
+
label: `${I().t("archbase:Descrição do usuário")}`,
|
|
1882
|
+
placeholder: `${I().t("archbase:Informe a descrição do usuário")}`,
|
|
1883
|
+
dataSource: C,
|
|
1673
1884
|
dataField: "description",
|
|
1674
1885
|
required: !0
|
|
1675
1886
|
}
|
|
@@ -1678,39 +1889,46 @@ function mn({ opened: e, handleClose: n, userId: d, updateUser: o, options: h })
|
|
|
1678
1889
|
}
|
|
1679
1890
|
);
|
|
1680
1891
|
}
|
|
1681
|
-
const
|
|
1892
|
+
const zo = mr((e) => ({
|
|
1682
1893
|
nameStore: "ADMIN_STORE",
|
|
1683
1894
|
openedTabs: [],
|
|
1684
1895
|
activeTabId: void 0,
|
|
1685
1896
|
collapsed: !1,
|
|
1686
|
-
setOpenedTabs: (
|
|
1687
|
-
setActiveTabId: (
|
|
1688
|
-
setCollapsed: (
|
|
1897
|
+
setOpenedTabs: (o) => e({ openedTabs: o }),
|
|
1898
|
+
setActiveTabId: (o) => e({ activeTabId: o }),
|
|
1899
|
+
setCollapsed: (o) => e({ collapsed: o })
|
|
1689
1900
|
}));
|
|
1690
1901
|
export {
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1902
|
+
SA as ArchbaseAdminLayoutContext,
|
|
1903
|
+
Co as ArchbaseAdminLayoutFooter,
|
|
1904
|
+
vo as ArchbaseAdminLayoutHeader,
|
|
1905
|
+
Cr as ArchbaseAdminLayoutProvider,
|
|
1906
|
+
yo as ArchbaseAdminMainLayout,
|
|
1907
|
+
Ro as ArchbaseAdminTabContainer,
|
|
1908
|
+
YA as ArchbaseAdvancedSidebar,
|
|
1909
|
+
Dr as ArchbaseAliveAbleRoutes,
|
|
1910
|
+
vr as ArchbaseChangeLanguageAction,
|
|
1911
|
+
wr as ArchbaseColorSchemeAction,
|
|
1912
|
+
Do as ArchbaseDrawerContent,
|
|
1913
|
+
Oo as ArchbaseDrawerTrigger,
|
|
1914
|
+
xr as ArchbaseHeaderNavAction,
|
|
1915
|
+
xA as ArchbaseKeepAliveRoute,
|
|
1916
|
+
Qo as ArchbaseMyProfileModal,
|
|
1917
|
+
ie as ArchbaseNavigationContext,
|
|
1918
|
+
Eo as ArchbaseNavigationProvider,
|
|
1919
|
+
Er as CommandPaletteButton,
|
|
1920
|
+
Po as SidebarErrorMessage,
|
|
1921
|
+
Io as SidebarGroupsSkeleton,
|
|
1922
|
+
To as SidebarMenuSkeleton,
|
|
1923
|
+
Sr as defaultAvatar,
|
|
1924
|
+
Zr as defaultMyProfileModalOptions,
|
|
1925
|
+
Lo as navigationDataSample,
|
|
1926
|
+
zo as useArchbaseAdminStore,
|
|
1927
|
+
Wr as useArchbaseDrawer,
|
|
1928
|
+
le as useArchbaseNavigationContext,
|
|
1929
|
+
So as useArchbaseNavigationListener,
|
|
1930
|
+
wo as useArchbaseRouteParams,
|
|
1931
|
+
se as useKeepAliveCache,
|
|
1932
|
+
ko as useKeepAliveVisibility,
|
|
1933
|
+
xo as useParams
|
|
1716
1934
|
};
|