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