react-luminus-components 1.5.24 → 1.5.26
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 +26 -26
- package/dist/{FormDisabledProvider-BJ_XUA85.cjs → FormDisabledProvider-CnseYc1t.cjs} +1 -1
- package/dist/{FormDisabledProvider-CCk5YUQ1.js → FormDisabledProvider-DruCyt_C.js} +5 -5
- package/dist/{ShortcutLinksContext-CVJd0L8d.js → ShortcutLinksContext-DF8__Rbl.js} +247 -254
- package/dist/{ShortcutLinksContext-Ce9suS4R.cjs → ShortcutLinksContext-Dm_GlAxE.cjs} +40 -40
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +21 -21
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout/SideMenu/SideMenu.d.ts +3 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +124 -114
- package/dist/main.cjs.js +14 -14
- package/dist/main.es.js +2789 -2797
- package/dist/style.css +1 -1
- package/dist/{useLocalStorageState-C8BsBRul.cjs → useLocalStorageState--zK59AHw.cjs} +1 -1
- package/dist/{useLocalStorageState-CyfdUiRG.js → useLocalStorageState-bgBQaJ6D.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +11 -11
- package/package.json +1 -1
package/dist/layout.es.js
CHANGED
|
@@ -1,154 +1,164 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Link as
|
|
1
|
+
import { bB as T, bv as R, j as n, c as l, Y as I, ao as q, ba as O, a2 as D, bC as F } from "./ShortcutLinksContext-DF8__Rbl.js";
|
|
2
|
+
import { b8 as Ln, bD as Tn } from "./ShortcutLinksContext-DF8__Rbl.js";
|
|
3
|
+
import { useState as S, useRef as Z, useMemo as y, useEffect as G } from "react";
|
|
4
|
+
import { Link as k } 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
|
-
|
|
10
|
+
function z(e) {
|
|
11
|
+
return T({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z" }, child: [] }] })(e);
|
|
12
|
+
}
|
|
13
|
+
function E(e) {
|
|
14
|
+
return T({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M56.88,31.93A12,12,0,1,0,39.12,48.07L60,71A76,76,0,0,0,35.46,84.51a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.9,228c.47,0,.94,0,1.41-.05A20,20,0,0,0,171.87,220a97.47,97.47,0,0,0,9.54-15.46l17.72,19.49a12,12,0,1,0,17.76-16.14Zm98.49,169.88L54.08,100.52C62,95,70.31,92.12,78.91,91.83l84.51,93A62,62,0,0,1,155.37,201.81Zm82.78-95-39,39.11a12,12,0,1,1-17-16.95l36.19-36.3-55-55L130.59,70.5a12,12,0,0,1-17-16.94l35.57-35.69a20,20,0,0,1,28.3,0l60.69,60.68A20,20,0,0,1,238.15,106.83Z" }, child: [] }] })(e);
|
|
15
|
+
}
|
|
16
|
+
const H = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", U = "_hidden_o72rm_10", W = "_nav-button_o72rm_13", Y = "_child_o72rm_21", J = "_text_o72rm_26", Q = "_icon_o72rm_36", V = "_collapse-icon_o72rm_42", X = "_collapsed_o72rm_52", nn = "_collapse-icon-mini_o72rm_55", en = "_expanded_o72rm_86", sn = "_children-container_o72rm_92", on = "_visible_o72rm_100", ln = "_children_o72rm_92", tn = "_mobile_o72rm_112", i = {
|
|
11
17
|
"side-menu-item": "_side-menu-item_o72rm_1",
|
|
12
|
-
sideMenuItem:
|
|
18
|
+
sideMenuItem: H,
|
|
13
19
|
disabled: K,
|
|
14
|
-
hidden:
|
|
20
|
+
hidden: U,
|
|
15
21
|
"nav-button": "_nav-button_o72rm_13",
|
|
16
|
-
navButton:
|
|
17
|
-
child:
|
|
18
|
-
text:
|
|
19
|
-
icon:
|
|
22
|
+
navButton: W,
|
|
23
|
+
child: Y,
|
|
24
|
+
text: J,
|
|
25
|
+
icon: Q,
|
|
20
26
|
"collapse-icon": "_collapse-icon_o72rm_42",
|
|
21
|
-
collapseIcon:
|
|
22
|
-
collapsed:
|
|
27
|
+
collapseIcon: V,
|
|
28
|
+
collapsed: X,
|
|
23
29
|
"collapse-icon-mini": "_collapse-icon-mini_o72rm_55",
|
|
24
|
-
collapseIconMini:
|
|
25
|
-
expanded:
|
|
30
|
+
collapseIconMini: nn,
|
|
31
|
+
expanded: en,
|
|
26
32
|
"children-container": "_children-container_o72rm_92",
|
|
27
|
-
childrenContainer:
|
|
28
|
-
visible:
|
|
29
|
-
children:
|
|
30
|
-
mobile:
|
|
31
|
-
},
|
|
32
|
-
var j,
|
|
33
|
-
const [
|
|
34
|
-
return
|
|
35
|
-
[
|
|
36
|
-
}, { active:
|
|
37
|
-
[c === "disable" ?
|
|
33
|
+
childrenContainer: sn,
|
|
34
|
+
visible: on,
|
|
35
|
+
children: ln,
|
|
36
|
+
mobile: tn
|
|
37
|
+
}, an = ({ item: e, menuExpanded: t, useTooltips: r, children: _ }) => e.tooltip && !t && r ? /* @__PURE__ */ n.jsx(q, { text: e.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ n.jsx("div", { children: _ }) }) : _, A = ({ item: e, menuExpanded: t, collapsed: r, onCollapse: _, currentPath: p, useHover: d, useTooltips: x, isMobile: N, disableMode: c }) => {
|
|
38
|
+
var j, m, g, M;
|
|
39
|
+
const [P, b] = S(!1), [f] = p.split("?"), B = e.linkTo === f || ((j = e.children) == null ? void 0 : j.some((o) => o.linkTo === f)), v = Z(null);
|
|
40
|
+
return R([v], () => r && _()), /* @__PURE__ */ n.jsxs("li", { ref: v, className: l("luminus-side-menu-item", i.sideMenuItem, { [i.mobile]: N }, {
|
|
41
|
+
[i.expanded]: t
|
|
42
|
+
}, { active: P || B }, { open: r && e.children }, {
|
|
43
|
+
[c === "disable" ? i.disabled : i.hidden]: e.disabled || e.notPermitted || ((m = e.children) == null ? void 0 : m.every((o) => o.notPermitted || o.disabled))
|
|
38
44
|
}, {
|
|
39
|
-
[c === "disable" ? "disabled" : "hidden"]:
|
|
45
|
+
[c === "disable" ? "disabled" : "hidden"]: e.disabled || e.notPermitted || ((g = e.children) == null ? void 0 : g.every((o) => o.notPermitted || o.disabled))
|
|
40
46
|
}), onMouseEnter: () => b(!0), onMouseLeave: () => b(!1), children: [
|
|
41
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ n.jsx(an, { item: e, menuExpanded: t, useTooltips: x, children: e.children ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("button", { type: "button", className: l("nav-link", i.navButton), onClick: () => {
|
|
42
48
|
_();
|
|
43
49
|
}, children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
!d && !t && /* @__PURE__ */
|
|
46
|
-
[
|
|
47
|
-
}), children: /* @__PURE__ */
|
|
48
|
-
t && /* @__PURE__ */
|
|
49
|
-
t && /* @__PURE__ */
|
|
50
|
-
[
|
|
51
|
-
}), children: /* @__PURE__ */
|
|
52
|
-
] }) }) : /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
t && /* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ n.jsx("div", { className: l("icon", i.icon), children: e.icon }),
|
|
51
|
+
!d && !t && /* @__PURE__ */ n.jsx("div", { className: l("collapse-icon-mini rounded", i.collapseIconMini, {
|
|
52
|
+
[i.collapsed]: r
|
|
53
|
+
}), children: /* @__PURE__ */ n.jsx(I, {}) }),
|
|
54
|
+
t && /* @__PURE__ */ n.jsx("div", { className: l("text", i.text, "text-nowrap"), children: e.title }),
|
|
55
|
+
t && /* @__PURE__ */ n.jsx("div", { className: l("collapse-icon", i.collapseIcon, {
|
|
56
|
+
[i.collapsed]: r
|
|
57
|
+
}), children: /* @__PURE__ */ n.jsx(I, {}) })
|
|
58
|
+
] }) }) : /* @__PURE__ */ n.jsxs(k, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: l("nav-link", i.navButton), children: [
|
|
59
|
+
/* @__PURE__ */ n.jsx("div", { className: l("icon", i.icon), children: e.icon }),
|
|
60
|
+
t && /* @__PURE__ */ n.jsx("div", { className: l("text", i.text, "text-nowrap"), children: e.title })
|
|
55
61
|
] }) }),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
[
|
|
58
|
-
}), children: /* @__PURE__ */
|
|
59
|
-
[c === "disable" ?
|
|
62
|
+
/* @__PURE__ */ n.jsx("div", { className: l("children-container", i.childrenContainer, {
|
|
63
|
+
[i.visible]: r
|
|
64
|
+
}), children: /* @__PURE__ */ n.jsx("div", { className: l("shadow rounded children", i.children), children: (M = e.children) == null ? void 0 : M.map((o) => /* @__PURE__ */ n.jsx(k, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: l("nav-link child rounded", i.navButton, i.child, {
|
|
65
|
+
[c === "disable" ? i.disabled : i.hidden]: o.disabled || o.notPermitted
|
|
60
66
|
}, {
|
|
61
|
-
[c === "disable" ? "disabled" : "hidden"]:
|
|
62
|
-
}), onClick: _, children: /* @__PURE__ */
|
|
67
|
+
[c === "disable" ? "disabled" : "hidden"]: o.disabled || o.notPermitted
|
|
68
|
+
}), onClick: _, children: /* @__PURE__ */ n.jsx("div", { className: l("text", i.text, "text-nowrap"), children: o.title }) }, o.linkTo)) }) })
|
|
63
69
|
] });
|
|
64
|
-
},
|
|
65
|
-
"side-menu": "_side-
|
|
66
|
-
sideMenu:
|
|
67
|
-
"sidebar-header": "_sidebar-
|
|
68
|
-
sidebarHeader:
|
|
69
|
-
"side-menu-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
}, rn = "_side-menu_140bh_1", dn = "_sidebar-header_140bh_15", cn = "_side-menu-pin_140bh_22", _n = "_side-menu-content_140bh_27", mn = "_no-top-margin_140bh_33", un = "_expand_140bh_39", hn = "_only-logo_140bh_43", bn = "_mobile_140bh_46", pn = "_divider_140bh_61", h = {
|
|
71
|
+
"side-menu": "_side-menu_140bh_1",
|
|
72
|
+
sideMenu: rn,
|
|
73
|
+
"sidebar-header": "_sidebar-header_140bh_15",
|
|
74
|
+
sidebarHeader: dn,
|
|
75
|
+
"side-menu-pin": "_side-menu-pin_140bh_22",
|
|
76
|
+
sideMenuPin: cn,
|
|
77
|
+
"side-menu-content": "_side-menu-content_140bh_27",
|
|
78
|
+
sideMenuContent: _n,
|
|
79
|
+
"no-top-margin": "_no-top-margin_140bh_33",
|
|
80
|
+
noTopMargin: mn,
|
|
81
|
+
expand: un,
|
|
82
|
+
"only-logo": "_only-logo_140bh_43",
|
|
83
|
+
onlyLogo: hn,
|
|
84
|
+
mobile: bn,
|
|
85
|
+
divider: pn
|
|
86
|
+
}, xn = 14, kn = ({ headerItem: e, searchItem: t, shortcutsItem: r, mainItems: _, secondaryItems: p, expanded: d, setExpanded: x, currentPath: N, useHover: c, useTooltips: P, disableMode: b = "disable", sideMenuPinned: f, toggleSideMenuPinned: B }) => {
|
|
87
|
+
const [v, j] = S(-1), { checkUserHasPermissions: m } = O(), g = y(() => _.map((s) => {
|
|
88
|
+
var a;
|
|
81
89
|
return {
|
|
82
|
-
...
|
|
83
|
-
notPermitted: !m(
|
|
84
|
-
children: (
|
|
85
|
-
...
|
|
86
|
-
notPermitted: !m(
|
|
87
|
-
disabled:
|
|
90
|
+
...s,
|
|
91
|
+
notPermitted: !m(s.permissions ?? [], "any"),
|
|
92
|
+
children: (a = s.children) == null ? void 0 : a.map((u) => ({
|
|
93
|
+
...u,
|
|
94
|
+
notPermitted: !m(u.permissions ?? [], "any"),
|
|
95
|
+
disabled: s.disabled || u.disabled
|
|
88
96
|
}))
|
|
89
97
|
};
|
|
90
|
-
}), [_, m]),
|
|
91
|
-
var
|
|
98
|
+
}), [_, m]), M = y(() => p.map((s) => {
|
|
99
|
+
var a;
|
|
92
100
|
return {
|
|
93
|
-
...
|
|
94
|
-
notPermitted: !m(
|
|
95
|
-
children: (
|
|
96
|
-
...
|
|
97
|
-
notPermitted: !m(
|
|
101
|
+
...s,
|
|
102
|
+
notPermitted: !m(s.permissions ?? [], "any"),
|
|
103
|
+
children: (a = s.children) == null ? void 0 : a.map((u) => ({
|
|
104
|
+
...u,
|
|
105
|
+
notPermitted: !m(u.permissions ?? [], "any")
|
|
98
106
|
}))
|
|
99
107
|
};
|
|
100
|
-
}), [
|
|
101
|
-
|
|
108
|
+
}), [p, m]), o = (s) => {
|
|
109
|
+
j(s === v ? -1 : s);
|
|
102
110
|
};
|
|
103
|
-
|
|
104
|
-
d ||
|
|
111
|
+
G(() => {
|
|
112
|
+
d || j(-1);
|
|
105
113
|
}, [d]);
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
var
|
|
110
|
-
return b === "hide" ? !
|
|
111
|
-
}), [
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
[
|
|
114
|
+
const w = Z(null);
|
|
115
|
+
R([w], () => x(!1));
|
|
116
|
+
const $ = y(() => [...g, ...M].filter((s) => {
|
|
117
|
+
var a;
|
|
118
|
+
return b === "hide" ? !s.disabled && !s.notPermitted && (((a = s.children) == null ? void 0 : a.filter((u) => !u.disabled && !u.notPermitted)) ?? []).length > 0 : !0;
|
|
119
|
+
}), [g, M, b]), { isMobile: C } = D();
|
|
120
|
+
return /* @__PURE__ */ n.jsxs("section", { ref: w, className: l("luminus-side-menu shadow", h.sideMenu, { [h.mobile]: C }, {
|
|
121
|
+
[h.expand]: d
|
|
114
122
|
}, { expand: d }), onMouseEnter: () => c && x(!0), onMouseLeave: () => c && x(!1), children: [
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
[
|
|
117
|
-
}), role: c ? void 0 : "button", onClick: c ? void 0 : () => x(!d), children: c ?
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
/* @__PURE__ */ n.jsx("div", { className: l("sidebar-header", h.sidebarHeader, {
|
|
124
|
+
[h.onlyLogo]: c
|
|
125
|
+
}), role: c ? void 0 : "button", onClick: c ? void 0 : () => x(!d), children: c ? e : d ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
126
|
+
/* @__PURE__ */ n.jsx("div", { role: "button", onClick: (s) => {
|
|
127
|
+
s.stopPropagation(), B();
|
|
128
|
+
}, className: h.sideMenuPin, children: f ? /* @__PURE__ */ n.jsx(E, {}) : /* @__PURE__ */ n.jsx(z, {}) }),
|
|
129
|
+
e
|
|
130
|
+
] }) : /* @__PURE__ */ n.jsx(F, {}) }),
|
|
131
|
+
d && (t || r) ? /* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
|
|
132
|
+
r && d ? r : null,
|
|
123
133
|
t && d ? t : null
|
|
124
134
|
] }) : null,
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
[
|
|
135
|
+
/* @__PURE__ */ n.jsxs("ul", { className: l(h.sideMenuContent, {
|
|
136
|
+
[h.noTopMargin]: $.length > xn
|
|
127
137
|
}), children: [
|
|
128
|
-
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
138
|
+
g.map((s, a) => /* @__PURE__ */ n.jsx(A, { item: s, menuExpanded: d, collapsed: a === v, onCollapse: () => o(a), currentPath: N, useHover: c, useTooltips: P, isMobile: C, disableMode: b }, s.title)),
|
|
139
|
+
/* @__PURE__ */ n.jsx("hr", { className: l("divider", h.divider) }),
|
|
140
|
+
M.map((s, a) => /* @__PURE__ */ n.jsx(A, { item: s, menuExpanded: d, collapsed: a === v, onCollapse: () => o(a), currentPath: N, useHover: c, useTooltips: P, isMobile: C, disableMode: b }, s.title))
|
|
131
141
|
] })
|
|
132
142
|
] });
|
|
133
|
-
},
|
|
143
|
+
}, vn = "_top-bar_lnmq0_1", jn = "_top-bar-brand_lnmq0_12", L = {
|
|
134
144
|
"top-bar": "_top-bar_lnmq0_1",
|
|
135
|
-
topBar:
|
|
145
|
+
topBar: vn,
|
|
136
146
|
"top-bar-brand": "_top-bar-brand_lnmq0_12",
|
|
137
|
-
topBarBrand:
|
|
138
|
-
},
|
|
147
|
+
topBarBrand: jn
|
|
148
|
+
}, wn = ({ appName: e, leftOffset: t, leftContent: r, centerContent: _, rightContent: p }) => /* @__PURE__ */ n.jsx("nav", { className: l("luminus-top-bar shadow", L.topBar), style: {
|
|
139
149
|
width: t ? `calc(100% - ${t}px)` : void 0,
|
|
140
150
|
left: t ? `${t}px` : void 0
|
|
141
|
-
}, children: /* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
|
|
151
|
+
}, children: /* @__PURE__ */ n.jsxs("div", { className: "w-100 row g-0", children: [
|
|
152
|
+
/* @__PURE__ */ n.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
|
|
153
|
+
/* @__PURE__ */ n.jsx(k, { to: "/", className: l("luminus-top-bar-brand", L.topBarBrand), children: e }),
|
|
154
|
+
r
|
|
145
155
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ n.jsx("div", { className: "col-4 d-flex align-items-center", children: _ ?? null }),
|
|
157
|
+
/* @__PURE__ */ n.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: p ?? null })
|
|
148
158
|
] }) });
|
|
149
159
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
160
|
+
Ln as PageContainer,
|
|
161
|
+
Tn as SideContentBar,
|
|
162
|
+
kn as SideMenu,
|
|
163
|
+
wn as TopBar
|
|
154
164
|
};
|