react-luminus-components 1.4.55 → 1.4.57
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/.vite/manifest.json +11 -11
- package/dist/{FormDisabledProvider-CbNzR9vC.js → FormDisabledProvider-6tUxmuDM.js} +1 -1
- package/dist/{ShortcutLinksContext-D-3_1QWF.js → ShortcutLinksContext-BnnVfkMM.js} +74 -74
- package/dist/contexts.es.js +22 -22
- package/dist/hooks.es.js +30 -30
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +101 -97
- package/dist/main.cjs.js +25 -25
- package/dist/main.es.js +2237 -2226
- package/dist/models/texts/ChartTexts.d.ts +4 -0
- package/dist/models/texts/ComponentsContextTexts.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/{useLocalStorageState-CSuGfUFh.js → useLocalStorageState-DtLtD3Dq.js} +1 -1
- package/dist/utils.es.js +13 -13
- package/package.json +1 -1
package/dist/layout.es.js
CHANGED
|
@@ -1,80 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useState as L, useRef as
|
|
4
|
-
import { Link as
|
|
1
|
+
import { bu as T, j as n, c as i, Y as C, ao as S, bb as A, a2 as $, bA as q, bB as O } from "./ShortcutLinksContext-BnnVfkMM.js";
|
|
2
|
+
import { b9 as Bn, bC as Cn } from "./ShortcutLinksContext-BnnVfkMM.js";
|
|
3
|
+
import { useState as L, useRef as R, useMemo as P, useEffect as D } from "react";
|
|
4
|
+
import { Link as B } from "react-router-dom";
|
|
5
5
|
import "react-hook-form";
|
|
6
6
|
import "react-flexmonster";
|
|
7
7
|
import "@azure/msal-browser";
|
|
8
8
|
import "@azure/msal-react";
|
|
9
9
|
import "react-dom";
|
|
10
|
-
const
|
|
10
|
+
const F = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", z = "_hidden_o72rm_10", E = "_nav-button_o72rm_13", G = "_child_o72rm_21", H = "_text_o72rm_26", U = "_icon_o72rm_36", W = "_collapse-icon_o72rm_42", Y = "_collapsed_o72rm_52", J = "_collapse-icon-mini_o72rm_55", Q = "_expanded_o72rm_86", V = "_children-container_o72rm_92", X = "_visible_o72rm_100", Z = "_children_o72rm_92", nn = "_mobile_o72rm_112", s = {
|
|
11
11
|
"side-menu-item": "_side-menu-item_o72rm_1",
|
|
12
|
-
sideMenuItem:
|
|
13
|
-
disabled:
|
|
14
|
-
hidden:
|
|
12
|
+
sideMenuItem: F,
|
|
13
|
+
disabled: K,
|
|
14
|
+
hidden: z,
|
|
15
15
|
"nav-button": "_nav-button_o72rm_13",
|
|
16
|
-
navButton:
|
|
17
|
-
child:
|
|
18
|
-
text:
|
|
19
|
-
icon:
|
|
16
|
+
navButton: E,
|
|
17
|
+
child: G,
|
|
18
|
+
text: H,
|
|
19
|
+
icon: U,
|
|
20
20
|
"collapse-icon": "_collapse-icon_o72rm_42",
|
|
21
|
-
collapseIcon:
|
|
22
|
-
collapsed:
|
|
21
|
+
collapseIcon: W,
|
|
22
|
+
collapsed: Y,
|
|
23
23
|
"collapse-icon-mini": "_collapse-icon-mini_o72rm_55",
|
|
24
|
-
collapseIconMini:
|
|
25
|
-
expanded:
|
|
24
|
+
collapseIconMini: J,
|
|
25
|
+
expanded: Q,
|
|
26
26
|
"children-container": "_children-container_o72rm_92",
|
|
27
|
-
childrenContainer:
|
|
28
|
-
visible:
|
|
29
|
-
children:
|
|
30
|
-
mobile:
|
|
31
|
-
},
|
|
32
|
-
var
|
|
33
|
-
const [f, v] = L(!1), [
|
|
34
|
-
return
|
|
27
|
+
childrenContainer: V,
|
|
28
|
+
visible: X,
|
|
29
|
+
children: Z,
|
|
30
|
+
mobile: nn
|
|
31
|
+
}, en = ({ item: e, menuExpanded: l, useTooltips: r, children: c }) => e.tooltip && !l && r ? /* @__PURE__ */ n.jsx(S, { text: e.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ n.jsx("div", { children: c }) }) : c, w = ({ item: e, menuExpanded: l, collapsed: r, onCollapse: c, currentPath: u, useHover: a, useTooltips: b, isMobile: g, disableMode: d }) => {
|
|
32
|
+
var y, k, N, M;
|
|
33
|
+
const [f, v] = L(!1), [h] = u.split("?"), j = e.linkTo === h || ((y = e.children) == null ? void 0 : y.some((o) => o.linkTo === h)), m = R(null);
|
|
34
|
+
return T([m], () => r && c()), /* @__PURE__ */ n.jsxs("li", { ref: m, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: g }, {
|
|
35
35
|
[s.expanded]: l
|
|
36
|
-
}, { active: f || j }, { open:
|
|
37
|
-
[
|
|
36
|
+
}, { active: f || j }, { open: r && e.children }, {
|
|
37
|
+
[d === "disable" ? s.disabled : s.hidden]: e.disabled || e.notPermitted || ((k = e.children) == null ? void 0 : k.every((o) => o.notPermitted || o.disabled))
|
|
38
38
|
}, {
|
|
39
|
-
[
|
|
39
|
+
[d === "disable" ? "disabled" : "hidden"]: e.disabled || e.notPermitted || ((N = e.children) == null ? void 0 : N.every((o) => o.notPermitted || o.disabled))
|
|
40
40
|
}), onMouseEnter: () => v(!0), onMouseLeave: () => v(!1), children: [
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ n.jsx(en, { item: e, menuExpanded: l, useTooltips: b, children: e.children ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("button", { type: "button", className: i("nav-link", s.navButton), onClick: () => {
|
|
42
42
|
c();
|
|
43
43
|
}, children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
!
|
|
46
|
-
[s.collapsed]:
|
|
47
|
-
}), children: /* @__PURE__ */
|
|
48
|
-
l && /* @__PURE__ */
|
|
49
|
-
l && /* @__PURE__ */
|
|
50
|
-
[s.collapsed]:
|
|
51
|
-
}), children: /* @__PURE__ */
|
|
52
|
-
] }) }) : /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
l && /* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ n.jsx("div", { className: i("icon", s.icon), children: e.icon }),
|
|
45
|
+
!a && !l && /* @__PURE__ */ n.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
|
|
46
|
+
[s.collapsed]: r
|
|
47
|
+
}), children: /* @__PURE__ */ n.jsx(C, {}) }),
|
|
48
|
+
l && /* @__PURE__ */ n.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title }),
|
|
49
|
+
l && /* @__PURE__ */ n.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
50
|
+
[s.collapsed]: r
|
|
51
|
+
}), children: /* @__PURE__ */ n.jsx(C, {}) })
|
|
52
|
+
] }) }) : /* @__PURE__ */ n.jsxs(B, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
|
|
53
|
+
/* @__PURE__ */ n.jsx("div", { className: i("icon", s.icon), children: e.icon }),
|
|
54
|
+
l && /* @__PURE__ */ n.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title })
|
|
55
55
|
] }) }),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
[s.visible]:
|
|
58
|
-
}), children: /* @__PURE__ */
|
|
59
|
-
[
|
|
56
|
+
/* @__PURE__ */ n.jsx("div", { className: i("children-container", s.childrenContainer, {
|
|
57
|
+
[s.visible]: r
|
|
58
|
+
}), children: /* @__PURE__ */ n.jsx("div", { className: i("shadow rounded children", s.children), children: (M = e.children) == null ? void 0 : M.map((o) => /* @__PURE__ */ n.jsx(B, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, {
|
|
59
|
+
[d === "disable" ? s.disabled : s.hidden]: o.disabled || o.notPermitted
|
|
60
60
|
}, {
|
|
61
|
-
[
|
|
62
|
-
}), onClick: c, children: /* @__PURE__ */
|
|
61
|
+
[d === "disable" ? "disabled" : "hidden"]: o.disabled || o.notPermitted
|
|
62
|
+
}), onClick: c, children: /* @__PURE__ */ n.jsx("div", { className: i("text", s.text, "text-nowrap"), children: o.title }) }, o.linkTo)) }) })
|
|
63
63
|
] });
|
|
64
|
-
},
|
|
65
|
-
"side-menu": "_side-
|
|
66
|
-
sideMenu:
|
|
67
|
-
"sidebar-header": "_sidebar-
|
|
68
|
-
sidebarHeader:
|
|
69
|
-
"side-menu-content": "_side-menu-
|
|
70
|
-
sideMenuContent:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
}, sn = "_side-menu_12rky_1", on = "_sidebar-header_12rky_15", ln = "_side-menu-content_12rky_22", tn = "_no-top-margin_12rky_28", rn = "_expand_12rky_34", an = "_only-logo_12rky_38", dn = "_mobile_12rky_41", cn = "_divider_12rky_56", p = {
|
|
65
|
+
"side-menu": "_side-menu_12rky_1",
|
|
66
|
+
sideMenu: sn,
|
|
67
|
+
"sidebar-header": "_sidebar-header_12rky_15",
|
|
68
|
+
sidebarHeader: on,
|
|
69
|
+
"side-menu-content": "_side-menu-content_12rky_22",
|
|
70
|
+
sideMenuContent: ln,
|
|
71
|
+
"no-top-margin": "_no-top-margin_12rky_28",
|
|
72
|
+
noTopMargin: tn,
|
|
73
|
+
expand: rn,
|
|
74
|
+
"only-logo": "_only-logo_12rky_38",
|
|
75
|
+
onlyLogo: an,
|
|
76
|
+
mobile: dn,
|
|
77
|
+
divider: cn
|
|
78
|
+
}, _n = 14, Nn = ({ headerItem: e, searchItem: l, shortcutsItem: r, mainItems: c, secondaryItems: u, expanded: a, setExpanded: b, currentPath: g, useHover: d, useTooltips: f, disableMode: v = "disable" }) => {
|
|
79
|
+
const [h, j] = L(-1), { checkUserHasPermissions: m } = A(), y = P(() => c.map((t) => {
|
|
78
80
|
var _;
|
|
79
81
|
return {
|
|
80
82
|
...t,
|
|
@@ -85,7 +87,7 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
|
|
|
85
87
|
disabled: t.disabled || x.disabled
|
|
86
88
|
}))
|
|
87
89
|
};
|
|
88
|
-
}), [c, m]),
|
|
90
|
+
}), [c, m]), k = P(() => u.map((t) => {
|
|
89
91
|
var _;
|
|
90
92
|
return {
|
|
91
93
|
...t,
|
|
@@ -95,53 +97,55 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
|
|
|
95
97
|
notPermitted: !m(x.permissions ?? [], "any")
|
|
96
98
|
}))
|
|
97
99
|
};
|
|
98
|
-
}), [
|
|
99
|
-
j(t ===
|
|
100
|
+
}), [u, m]), N = (t) => {
|
|
101
|
+
j(t === h ? -1 : t);
|
|
100
102
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, [
|
|
104
|
-
const M =
|
|
105
|
-
|
|
103
|
+
D(() => {
|
|
104
|
+
a || j(-1);
|
|
105
|
+
}, [a]);
|
|
106
|
+
const M = R(null);
|
|
107
|
+
T([M], () => b(!1));
|
|
106
108
|
const { isMobile: o } = $();
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
[
|
|
109
|
-
}, { expand:
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
[
|
|
112
|
-
}), role:
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
115
|
-
] }) : /* @__PURE__ */
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
l &&
|
|
109
|
+
return /* @__PURE__ */ n.jsxs("section", { ref: M, className: i("luminus-side-menu shadow", p.sideMenu, { [p.mobile]: o }, {
|
|
110
|
+
[p.expand]: a
|
|
111
|
+
}, { expand: a }), onMouseEnter: () => d && b(!0), onMouseLeave: () => d && b(!1), children: [
|
|
112
|
+
/* @__PURE__ */ n.jsx("div", { className: i("sidebar-header", p.sidebarHeader, {
|
|
113
|
+
[p.onlyLogo]: d
|
|
114
|
+
}), role: d ? void 0 : "button", onClick: d ? void 0 : () => b(!a), children: d ? e : a ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
115
|
+
/* @__PURE__ */ n.jsx(q, {}),
|
|
116
|
+
e
|
|
117
|
+
] }) : /* @__PURE__ */ n.jsx(O, {}) }),
|
|
118
|
+
a && (l || r) ? /* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
|
|
119
|
+
r && a ? r : null,
|
|
120
|
+
l && a ? l : null
|
|
119
121
|
] }) : null,
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
/* @__PURE__ */ n.jsxs("ul", { className: i(p.sideMenuContent, {
|
|
123
|
+
[p.noTopMargin]: [...y, ...k].length > _n
|
|
124
|
+
}), children: [
|
|
125
|
+
y.map((t, _) => /* @__PURE__ */ n.jsx(w, { item: t, menuExpanded: a, collapsed: _ === h, onCollapse: () => N(_), currentPath: g, useHover: d, useTooltips: f, isMobile: o, disableMode: v }, t.title)),
|
|
126
|
+
/* @__PURE__ */ n.jsx("hr", { className: i("divider", p.divider) }),
|
|
127
|
+
k.map((t, _) => /* @__PURE__ */ n.jsx(w, { item: t, menuExpanded: a, collapsed: _ === h, onCollapse: () => N(_), currentPath: g, useHover: d, useTooltips: f, isMobile: o, disableMode: v }, t.title))
|
|
124
128
|
] })
|
|
125
129
|
] });
|
|
126
|
-
},
|
|
130
|
+
}, mn = "_top-bar_lnmq0_1", pn = "_top-bar-brand_lnmq0_12", I = {
|
|
127
131
|
"top-bar": "_top-bar_lnmq0_1",
|
|
128
|
-
topBar:
|
|
132
|
+
topBar: mn,
|
|
129
133
|
"top-bar-brand": "_top-bar-brand_lnmq0_12",
|
|
130
|
-
topBarBrand:
|
|
131
|
-
},
|
|
134
|
+
topBarBrand: pn
|
|
135
|
+
}, Mn = ({ appName: e, leftOffset: l, leftContent: r, centerContent: c, rightContent: u }) => /* @__PURE__ */ n.jsx("nav", { className: i("luminus-top-bar shadow", I.topBar), style: {
|
|
132
136
|
width: l ? `calc(100% - ${l}px)` : void 0,
|
|
133
137
|
left: l ? `${l}px` : void 0
|
|
134
|
-
}, children: /* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
138
|
+
}, children: /* @__PURE__ */ n.jsxs("div", { className: "w-100 row g-0", children: [
|
|
139
|
+
/* @__PURE__ */ n.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
|
|
140
|
+
/* @__PURE__ */ n.jsx(B, { to: "/", className: i("luminus-top-bar-brand", I.topBarBrand), children: e }),
|
|
141
|
+
r
|
|
138
142
|
] }),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ n.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
|
|
144
|
+
/* @__PURE__ */ n.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: u ?? null })
|
|
141
145
|
] }) });
|
|
142
146
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
Bn as PageContainer,
|
|
148
|
+
Cn as SideContentBar,
|
|
149
|
+
Nn as SideMenu,
|
|
150
|
+
Mn as TopBar
|
|
147
151
|
};
|