@burdenoff/fe-libs 2026.602.1 → 2026.608.2
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/chrome/AutoBreadcrumbs.d.ts.map +1 -1
- package/dist/chrome/AutoBreadcrumbs.js +75 -42
- package/dist/shared/providers/shell/ShellUiProvider.d.ts +5 -1
- package/dist/shared/providers/shell/ShellUiProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ShellUiProvider.js +71 -54
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBreadcrumbs.d.ts","sourceRoot":"","sources":["../../src/chrome/AutoBreadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"AutoBreadcrumbs.d.ts","sourceRoot":"","sources":["../../src/chrome/AutoBreadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAYH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAE9D;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,QAElD;AAiBD,wBAAgB,eAAe,mDAsK9B"}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { useI18n as e } from "../shared/providers/shell/I18nProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useSafeShellUi as t } from "../shared/providers/shell/ShellUiProvider.js";
|
|
3
|
+
import { useEffect as n, useMemo as r, useState as i } from "react";
|
|
4
|
+
import { ChevronRight as a, Home as o, PanelTopClose as s, PanelTopOpen as c } from "lucide-react";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
import { useLocation as d, useNavigate as f } from "react-router-dom";
|
|
6
7
|
//#region src/chrome/AutoBreadcrumbs.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
|
|
8
|
+
var p = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, m = /* @__PURE__ */ new Map();
|
|
9
|
+
function h(e, t) {
|
|
10
|
+
m.set(e.toLowerCase(), t);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
12
|
+
function g(e) {
|
|
13
|
+
m.delete(e.toLowerCase());
|
|
13
14
|
}
|
|
14
15
|
typeof window < "u" && (window.__breadcrumbRegistry = {
|
|
15
|
-
register:
|
|
16
|
-
unregister:
|
|
16
|
+
register: h,
|
|
17
|
+
unregister: g
|
|
17
18
|
});
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
|
|
19
|
+
function _() {
|
|
20
|
+
let h = d(), g = f(), { t: _ } = e(), v = t(), [y, b] = i(0);
|
|
21
|
+
n(() => {
|
|
21
22
|
let e = setInterval(() => {
|
|
22
|
-
|
|
23
|
+
b((e) => e + 1);
|
|
23
24
|
}, 500);
|
|
24
25
|
return () => clearInterval(e);
|
|
25
26
|
}, []);
|
|
26
|
-
let
|
|
27
|
-
let e =
|
|
27
|
+
let x = r(() => {
|
|
28
|
+
let e = h.pathname;
|
|
28
29
|
if (e === "/") return [];
|
|
29
30
|
let t = e.split("/").filter(Boolean), n = "";
|
|
30
31
|
return t.map((e, r) => {
|
|
31
32
|
n += `/${e}`;
|
|
32
33
|
let i = r === t.length - 1, a;
|
|
33
|
-
if (
|
|
34
|
+
if (p.test(e)) a = m.get(e.toLowerCase()) || `${e.slice(0, 8)}...`;
|
|
34
35
|
else {
|
|
35
|
-
let t = e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), n =
|
|
36
|
+
let t = e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), n = _(`nav.${t}`);
|
|
36
37
|
a = n === `nav.${t}` ? e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ") : n;
|
|
37
38
|
}
|
|
38
39
|
return {
|
|
@@ -42,66 +43,98 @@ function m() {
|
|
|
42
43
|
};
|
|
43
44
|
});
|
|
44
45
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
h.pathname,
|
|
47
|
+
y,
|
|
48
|
+
_
|
|
48
49
|
]);
|
|
49
|
-
if (
|
|
50
|
-
let
|
|
51
|
-
let e =
|
|
50
|
+
if (x.length === 0) return null;
|
|
51
|
+
let S = (() => {
|
|
52
|
+
let e = _("nav.home");
|
|
52
53
|
return e === "nav.home" ? "Home" : e;
|
|
54
|
+
})(), C = !!v, w = v?.isBreadcrumbCollapsed ?? !1, T = (() => {
|
|
55
|
+
let e = _("nav.showBreadcrumb");
|
|
56
|
+
return e === "nav.showBreadcrumb" ? "Show breadcrumb" : e;
|
|
57
|
+
})(), E = (() => {
|
|
58
|
+
let e = _("nav.hideBreadcrumb");
|
|
59
|
+
return e === "nav.hideBreadcrumb" ? "Hide breadcrumb" : e;
|
|
53
60
|
})();
|
|
54
|
-
|
|
61
|
+
if (C && w) {
|
|
62
|
+
let e = x[x.length - 1]?.label ?? "";
|
|
63
|
+
return /* @__PURE__ */ l("div", {
|
|
64
|
+
className: "flex min-w-0 items-center border-b border-border-subtle bg-bg-surface px-2 py-0.5 sm:px-4",
|
|
65
|
+
children: /* @__PURE__ */ u("button", {
|
|
66
|
+
type: "button",
|
|
67
|
+
onClick: () => v?.setBreadcrumbCollapsed(!1),
|
|
68
|
+
className: "inline-flex min-w-0 items-center gap-1.5 rounded-md px-1.5 py-1 text-[12px] text-text-tertiary transition-colors duration-150 hover:bg-action-ghost-bg-hover hover:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
69
|
+
title: T,
|
|
70
|
+
"aria-label": T,
|
|
71
|
+
"data-testid": "breadcrumb-expand",
|
|
72
|
+
children: [/* @__PURE__ */ l(c, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ l("span", {
|
|
73
|
+
className: "truncate",
|
|
74
|
+
children: e
|
|
75
|
+
})]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return /* @__PURE__ */ u("nav", {
|
|
55
80
|
"aria-label": "Breadcrumb",
|
|
56
81
|
className: "mb-4 flex min-w-0 items-center border-b border-border-subtle bg-bg-surface px-4 py-2 text-[13px] font-medium sm:px-6",
|
|
57
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ u("ol", {
|
|
58
83
|
className: "flex min-w-0 flex-wrap items-center gap-0.5",
|
|
59
84
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ u("a", {
|
|
61
86
|
href: "/",
|
|
62
87
|
onClick: (e) => {
|
|
63
|
-
e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || (e.preventDefault(),
|
|
88
|
+
e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || (e.preventDefault(), g("/"));
|
|
64
89
|
},
|
|
65
90
|
className: "inline-flex items-center gap-1 rounded-md p-1.5 text-text-secondary transition-colors duration-150 hover:bg-action-ghost-bg-hover hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
66
|
-
"aria-label":
|
|
67
|
-
children: [/* @__PURE__ */ o
|
|
91
|
+
"aria-label": S,
|
|
92
|
+
children: [/* @__PURE__ */ l(o, { className: "size-3.5" }), /* @__PURE__ */ l("span", {
|
|
68
93
|
className: "sr-only sm:not-sr-only sm:inline",
|
|
69
|
-
children:
|
|
94
|
+
children: S
|
|
70
95
|
})]
|
|
71
96
|
}) }),
|
|
72
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ l("li", {
|
|
73
98
|
"aria-hidden": "true",
|
|
74
99
|
className: "flex items-center px-0.5",
|
|
75
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ l(a, {
|
|
76
101
|
className: "size-3.5 shrink-0 text-text-tertiary opacity-60",
|
|
77
102
|
strokeWidth: 2
|
|
78
103
|
})
|
|
79
104
|
}),
|
|
80
|
-
|
|
105
|
+
x.map((e) => /* @__PURE__ */ u("li", {
|
|
81
106
|
className: "flex min-w-0 items-center",
|
|
82
|
-
children: [e.isLast ? /* @__PURE__ */
|
|
107
|
+
children: [e.isLast ? /* @__PURE__ */ l("span", {
|
|
83
108
|
className: "inline-flex max-w-[220px] items-center truncate rounded-md px-1.5 py-0.5 font-semibold text-text-primary sm:max-w-[320px]",
|
|
84
109
|
"aria-current": "page",
|
|
85
110
|
children: e.label
|
|
86
|
-
}) : /* @__PURE__ */
|
|
111
|
+
}) : /* @__PURE__ */ l("a", {
|
|
87
112
|
href: e.path,
|
|
88
113
|
onClick: (t) => {
|
|
89
|
-
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(),
|
|
114
|
+
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(), g(e.path));
|
|
90
115
|
},
|
|
91
116
|
className: "inline-flex max-w-[140px] items-center truncate rounded-md px-1.5 py-0.5 text-text-secondary transition-colors duration-150 hover:bg-action-ghost-bg-hover hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong sm:max-w-[200px]",
|
|
92
117
|
children: e.label
|
|
93
|
-
}), !e.isLast && /* @__PURE__ */
|
|
118
|
+
}), !e.isLast && /* @__PURE__ */ l("span", {
|
|
94
119
|
"aria-hidden": "true",
|
|
95
120
|
className: "flex items-center px-0.5",
|
|
96
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ l(a, {
|
|
97
122
|
className: "size-3.5 shrink-0 text-text-tertiary opacity-60",
|
|
98
123
|
strokeWidth: 2
|
|
99
124
|
})
|
|
100
125
|
})]
|
|
101
126
|
}, e.path))
|
|
102
127
|
]
|
|
103
|
-
})
|
|
128
|
+
}), C && /* @__PURE__ */ l("button", {
|
|
129
|
+
type: "button",
|
|
130
|
+
onClick: () => v?.setBreadcrumbCollapsed(!0),
|
|
131
|
+
className: "ml-auto inline-flex shrink-0 items-center rounded-md p-1.5 text-text-tertiary transition-colors duration-150 hover:bg-action-ghost-bg-hover hover:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
132
|
+
title: E,
|
|
133
|
+
"aria-label": E,
|
|
134
|
+
"data-testid": "breadcrumb-collapse",
|
|
135
|
+
children: /* @__PURE__ */ l(s, { className: "size-3.5" })
|
|
136
|
+
})]
|
|
104
137
|
});
|
|
105
138
|
}
|
|
106
139
|
//#endregion
|
|
107
|
-
export {
|
|
140
|
+
export { _ as AutoBreadcrumbs, h as registerBreadcrumbName, g as unregisterBreadcrumbName };
|
|
@@ -15,6 +15,9 @@ export interface ShellUiContextValue {
|
|
|
15
15
|
setBreadcrumbs: (breadcrumbs: BreadcrumbItem[]) => void;
|
|
16
16
|
addBreadcrumb: (breadcrumb: BreadcrumbItem) => void;
|
|
17
17
|
clearBreadcrumbs: () => void;
|
|
18
|
+
isBreadcrumbCollapsed: boolean;
|
|
19
|
+
setBreadcrumbCollapsed: (collapsed: boolean) => void;
|
|
20
|
+
toggleBreadcrumbCollapsed: () => void;
|
|
18
21
|
headerVisible: boolean;
|
|
19
22
|
footerVisible: boolean;
|
|
20
23
|
sidebarVisible: boolean;
|
|
@@ -33,9 +36,10 @@ export interface ShellUiProviderProps {
|
|
|
33
36
|
defaultHeaderVisible?: boolean;
|
|
34
37
|
defaultFooterVisible?: boolean;
|
|
35
38
|
defaultSidebarVisible?: boolean;
|
|
39
|
+
defaultBreadcrumbCollapsed?: boolean;
|
|
36
40
|
storageKey?: string;
|
|
37
41
|
}
|
|
38
|
-
export declare function ShellUiProvider({ children, defaultSidebarCollapsed, defaultSidebarOpen, defaultHeaderVisible, defaultFooterVisible, defaultSidebarVisible, storageKey, }: ShellUiProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function ShellUiProvider({ children, defaultSidebarCollapsed, defaultSidebarOpen, defaultHeaderVisible, defaultFooterVisible, defaultSidebarVisible, defaultBreadcrumbCollapsed, storageKey, }: ShellUiProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
39
43
|
export declare function useShellUi(): ShellUiContextValue;
|
|
40
44
|
/**
|
|
41
45
|
* Same as `useShellUi` but returns `null` instead of throwing when the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellUiProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ShellUiProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,mBAAmB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACxD,aAAa,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ShellUiProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ShellUiProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,mBAAmB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACxD,aAAa,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAG7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACrD,yBAAyB,EAAE,MAAM,IAAI,CAAC;IAEtC,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAO9C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAE/C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,uBAA+B,EAC/B,kBAAyB,EACzB,oBAA2B,EAC3B,oBAA2B,EAC3B,qBAA4B,EAC5B,0BAAkC,EAClC,UAAiC,GAClC,EAAE,oBAAoB,2CAkJtB;AAED,wBAAgB,UAAU,wBAMzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,mBAAmB,GAAG,IAAI,CAE3D"}
|
|
@@ -2,78 +2,95 @@ import { createContext as e, use as t, useCallback as n, useMemo as r, useState
|
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
3
|
//#region src/shared/providers/shell/ShellUiProvider.tsx
|
|
4
4
|
var o = e(null);
|
|
5
|
-
function s({ children: e, defaultSidebarCollapsed: t = !1, defaultSidebarOpen: s = !0, defaultHeaderVisible: c = !0, defaultFooterVisible: l = !0, defaultSidebarVisible: u = !0,
|
|
6
|
-
let [
|
|
5
|
+
function s({ children: e, defaultSidebarCollapsed: t = !1, defaultSidebarOpen: s = !0, defaultHeaderVisible: c = !0, defaultFooterVisible: l = !0, defaultSidebarVisible: u = !0, defaultBreadcrumbCollapsed: d = !1, storageKey: f = "burdenoff-shell-ui" }) {
|
|
6
|
+
let [p, m] = i(() => {
|
|
7
7
|
if (typeof window > "u") return t;
|
|
8
|
-
let e = localStorage.getItem(`${
|
|
8
|
+
let e = localStorage.getItem(`${f}-sidebar-collapsed`);
|
|
9
9
|
return e ? e === "true" : t;
|
|
10
|
-
}), [
|
|
10
|
+
}), [h, g] = i(() => {
|
|
11
|
+
if (typeof window > "u") return d;
|
|
12
|
+
let e = localStorage.getItem(`${f}-breadcrumb-collapsed`);
|
|
13
|
+
return e ? e === "true" : d;
|
|
14
|
+
}), [_, v] = i(() => {
|
|
11
15
|
if (typeof window > "u") return s;
|
|
12
|
-
let e = localStorage.getItem(`${
|
|
16
|
+
let e = localStorage.getItem(`${f}-sidebar-open`);
|
|
13
17
|
return e ? e === "true" : s;
|
|
14
|
-
}), [
|
|
15
|
-
|
|
16
|
-
}, [
|
|
17
|
-
|
|
18
|
+
}), [y, b] = i(c), [x, S] = i(l), [C, w] = i(u), [T, E] = i([]), [D, O] = i(!1), k = n((e) => {
|
|
19
|
+
m(e), localStorage.setItem(`${f}-sidebar-collapsed`, String(e));
|
|
20
|
+
}, [f]), A = n(() => {
|
|
21
|
+
m((e) => {
|
|
18
22
|
let t = !e;
|
|
19
|
-
return localStorage.setItem(`${
|
|
23
|
+
return localStorage.setItem(`${f}-sidebar-collapsed`, String(t)), t;
|
|
20
24
|
});
|
|
21
|
-
}, [
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
+
}, [f]), j = n((e) => {
|
|
26
|
+
v(e), localStorage.setItem(`${f}-sidebar-open`, String(e));
|
|
27
|
+
}, [f]), M = n(() => {
|
|
28
|
+
v((e) => {
|
|
25
29
|
let t = !e;
|
|
26
|
-
return localStorage.setItem(`${
|
|
30
|
+
return localStorage.setItem(`${f}-sidebar-open`, String(t)), t;
|
|
27
31
|
});
|
|
28
|
-
}, [
|
|
29
|
-
|
|
30
|
-
}, []),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
32
|
+
}, [f]), N = n((e) => {
|
|
33
|
+
g(e), localStorage.setItem(`${f}-breadcrumb-collapsed`, String(e));
|
|
34
|
+
}, [f]), P = n(() => {
|
|
35
|
+
g((e) => {
|
|
36
|
+
let t = !e;
|
|
37
|
+
return localStorage.setItem(`${f}-breadcrumb-collapsed`, String(t)), t;
|
|
38
|
+
});
|
|
39
|
+
}, [f]), F = n((e) => {
|
|
40
|
+
E(e);
|
|
41
|
+
}, []), I = n((e) => {
|
|
42
|
+
E((t) => [...t, e]);
|
|
43
|
+
}, []), L = n(() => {
|
|
44
|
+
E([]);
|
|
45
|
+
}, []), R = r(() => ({
|
|
46
|
+
isSidebarCollapsed: p,
|
|
47
|
+
isSidebarOpen: _,
|
|
48
|
+
breadcrumbs: T,
|
|
49
|
+
setSidebarCollapsed: k,
|
|
50
|
+
toggleSidebarCollapsed: A,
|
|
51
|
+
setSidebarOpen: j,
|
|
52
|
+
toggleSidebarOpen: M,
|
|
53
|
+
setBreadcrumbs: F,
|
|
54
|
+
addBreadcrumb: I,
|
|
55
|
+
clearBreadcrumbs: L,
|
|
56
|
+
isBreadcrumbCollapsed: h,
|
|
57
|
+
setBreadcrumbCollapsed: N,
|
|
58
|
+
toggleBreadcrumbCollapsed: P,
|
|
59
|
+
headerVisible: y,
|
|
60
|
+
footerVisible: x,
|
|
61
|
+
sidebarVisible: C,
|
|
62
|
+
setHeaderVisible: b,
|
|
63
|
+
setFooterVisible: S,
|
|
64
|
+
setSidebarVisible: w,
|
|
65
|
+
pageAccessDenied: D,
|
|
66
|
+
setPageAccessDenied: O,
|
|
67
|
+
sidebarCollapsed: p,
|
|
68
|
+
toggleSidebar: A
|
|
55
69
|
}), [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
E,
|
|
60
|
-
D,
|
|
61
|
-
O,
|
|
70
|
+
p,
|
|
71
|
+
_,
|
|
72
|
+
T,
|
|
62
73
|
k,
|
|
63
74
|
A,
|
|
64
75
|
j,
|
|
65
76
|
M,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
F,
|
|
78
|
+
I,
|
|
79
|
+
L,
|
|
80
|
+
h,
|
|
81
|
+
N,
|
|
82
|
+
P,
|
|
70
83
|
y,
|
|
71
84
|
x,
|
|
85
|
+
C,
|
|
86
|
+
b,
|
|
87
|
+
S,
|
|
72
88
|
w,
|
|
73
|
-
|
|
89
|
+
D,
|
|
90
|
+
O
|
|
74
91
|
]);
|
|
75
92
|
return /* @__PURE__ */ a(o.Provider, {
|
|
76
|
-
value:
|
|
93
|
+
value: R,
|
|
77
94
|
children: e
|
|
78
95
|
});
|
|
79
96
|
}
|