@archbase/admin 3.0.0 → 3.0.3

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