react-luminus-components 1.3.151 → 1.3.152
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/README.md +349 -349
- package/dist/.vite/manifest.json +52 -68
- package/dist/{Loading-DiC4Np7v.js → Loading-D012N8ha.js} +1 -1
- package/dist/Loading-TbgEJLF_.cjs +1 -0
- package/dist/{nivo-bar.es-B2GqU-tV.js → ResponsiveContextDropdown-C9WqbqI0.js} +4970 -4970
- package/dist/{nivo-bar.es-C8-VCzr1.cjs → ResponsiveContextDropdown-ep8LBIy7.cjs} +45 -45
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +40 -40
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +17 -17
- package/dist/layout/index.d.ts +0 -2
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +102 -114
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +2961 -2962
- package/dist/{searchUtils-BhpLdWdC.js → searchUtils-Bd-Jy9zp.js} +1 -1
- package/dist/searchUtils-CqU0wzK3.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useClipboard-BoSxUeRj.cjs +1 -0
- package/dist/{useClipboard-DegAIBUd.js → useClipboard-ClHiiBOP.js} +1 -1
- package/dist/useGetApiData-B2Ap2urp.cjs +1 -0
- package/dist/{useGetApiData-CTK8sM2X.js → useGetApiData-DvRb2p5u.js} +6 -6
- package/dist/usePermissions-CE2IinZO.js +20 -0
- package/dist/usePermissions-LOq-NC5k.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +17 -17
- package/dist/variables.scss +165 -165
- package/package.json +116 -116
- package/dist/FullScreenContainer-Ahxfk-Xk.js +0 -23
- package/dist/FullScreenContainer-BWYwSExf.cjs +0 -1
- package/dist/Loading-C-Dsxusq.cjs +0 -1
- package/dist/searchUtils-BSGjuykO.cjs +0 -1
- package/dist/useClipboard-D6esVLqf.cjs +0 -1
- package/dist/useGetApiData-D4Xo7Loy.cjs +0 -1
- package/dist/usePermissions-BKn9Opdd.js +0 -20
- package/dist/usePermissions-DMDGiPC1.cjs +0 -1
package/dist/layout.es.js
CHANGED
|
@@ -1,149 +1,137 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Link as
|
|
1
|
+
import { j as o, c as i, ac as g, ax as L, bb as T, bc as R } from "./ResponsiveContextDropdown-C9WqbqI0.js";
|
|
2
|
+
import { b0 as Ne, bd as ye } from "./ResponsiveContextDropdown-C9WqbqI0.js";
|
|
3
|
+
import { useState as I, useRef as z, useMemo as k, useEffect as S } from "react";
|
|
4
|
+
import { Link as f } 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
|
-
import { a as
|
|
10
|
-
import { u as
|
|
11
|
-
|
|
12
|
-
const D = "_side-menu-item_1o1uo_1", U = "_disabled_1o1uo_6", q = "_nav-button_1o1uo_10", E = "_child_1o1uo_18", G = "_text_1o1uo_23", J = "_icon_1o1uo_30", Q = "_collapse-icon_1o1uo_36", V = "_collapsed_1o1uo_46", W = "_collapse-icon-mini_1o1uo_49", X = "_expanded_1o1uo_80", Y = "_children-container_1o1uo_86", Z = "_visible_1o1uo_94", ee = "_children_1o1uo_86", oe = "_mobile_1o1uo_106", s = {
|
|
9
|
+
import { a as w, u as $ } from "./useWindowSize-OLYtjFv_.js";
|
|
10
|
+
import { u as A } from "./usePermissions-CE2IinZO.js";
|
|
11
|
+
const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1o1uo_10", D = "_child_1o1uo_18", U = "_text_1o1uo_23", W = "_icon_1o1uo_30", q = "_collapse-icon_1o1uo_36", E = "_collapsed_1o1uo_46", G = "_collapse-icon-mini_1o1uo_49", J = "_expanded_1o1uo_80", Q = "_children-container_1o1uo_86", V = "_visible_1o1uo_94", X = "_children_1o1uo_86", Y = "_mobile_1o1uo_106", s = {
|
|
13
12
|
"side-menu-item": "_side-menu-item_1o1uo_1",
|
|
14
|
-
sideMenuItem:
|
|
15
|
-
disabled:
|
|
13
|
+
sideMenuItem: F,
|
|
14
|
+
disabled: K,
|
|
16
15
|
"nav-button": "_nav-button_1o1uo_10",
|
|
17
|
-
navButton:
|
|
18
|
-
child:
|
|
19
|
-
text:
|
|
20
|
-
icon:
|
|
16
|
+
navButton: O,
|
|
17
|
+
child: D,
|
|
18
|
+
text: U,
|
|
19
|
+
icon: W,
|
|
21
20
|
"collapse-icon": "_collapse-icon_1o1uo_36",
|
|
22
|
-
collapseIcon:
|
|
23
|
-
collapsed:
|
|
21
|
+
collapseIcon: q,
|
|
22
|
+
collapsed: E,
|
|
24
23
|
"collapse-icon-mini": "_collapse-icon-mini_1o1uo_49",
|
|
25
|
-
collapseIconMini:
|
|
26
|
-
expanded:
|
|
24
|
+
collapseIconMini: G,
|
|
25
|
+
expanded: J,
|
|
27
26
|
"children-container": "_children-container_1o1uo_86",
|
|
28
|
-
childrenContainer:
|
|
29
|
-
visible:
|
|
30
|
-
children:
|
|
31
|
-
mobile:
|
|
32
|
-
},
|
|
33
|
-
var
|
|
34
|
-
const [
|
|
35
|
-
return
|
|
27
|
+
childrenContainer: Q,
|
|
28
|
+
visible: V,
|
|
29
|
+
children: X,
|
|
30
|
+
mobile: Y
|
|
31
|
+
}, Z = ({ item: n, menuExpanded: t, useTooltips: l, children: a }) => n.tooltip && !t && l ? /* @__PURE__ */ o.jsx(L, { text: n.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ o.jsx("div", { children: a }) }) : a, C = ({ item: n, menuExpanded: t, collapsed: l, onCollapse: a, currentPath: c, useHover: m, useTooltips: M, isMobile: r }) => {
|
|
32
|
+
var B, v, j, x;
|
|
33
|
+
const [N, p] = I(!1), [b] = c.split("?"), _ = n.linkTo === b || ((B = n.children) == null ? void 0 : B.some((e) => e.linkTo === b)), y = z(null);
|
|
34
|
+
return w([y], () => l && a()), /* @__PURE__ */ o.jsxs("li", { ref: y, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: r }, {
|
|
36
35
|
[s.expanded]: t
|
|
37
|
-
}, { active:
|
|
38
|
-
[s.disabled]: n.disabled || n.notPermitted || ((
|
|
36
|
+
}, { active: N || _ }, { open: l && n.children }, {
|
|
37
|
+
[s.disabled]: n.disabled || n.notPermitted || ((v = n.children) == null ? void 0 : v.every((e) => e.notPermitted || e.disabled))
|
|
39
38
|
}, {
|
|
40
|
-
disabled: n.disabled || n.notPermitted || ((
|
|
41
|
-
}), onMouseEnter: () =>
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
39
|
+
disabled: n.disabled || n.notPermitted || ((j = n.children) == null ? void 0 : j.every((e) => e.notPermitted || e.disabled))
|
|
40
|
+
}), onMouseEnter: () => p(!0), onMouseLeave: () => p(!1), children: [
|
|
41
|
+
/* @__PURE__ */ o.jsx(Z, { item: n, menuExpanded: t, useTooltips: M, children: n.children ? /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs("button", { type: "button", className: i("nav-link", s.navButton), onClick: () => {
|
|
42
|
+
a();
|
|
44
43
|
}, children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
!
|
|
47
|
-
[s.collapsed]:
|
|
48
|
-
}), children: /* @__PURE__ */
|
|
49
|
-
t && /* @__PURE__ */
|
|
50
|
-
t && /* @__PURE__ */
|
|
51
|
-
[s.collapsed]:
|
|
52
|
-
}), children: /* @__PURE__ */
|
|
53
|
-
] }) }) : /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
t && /* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ o.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
45
|
+
!m && !t && /* @__PURE__ */ o.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
|
|
46
|
+
[s.collapsed]: l
|
|
47
|
+
}), children: /* @__PURE__ */ o.jsx(g, {}) }),
|
|
48
|
+
t && /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title }),
|
|
49
|
+
t && /* @__PURE__ */ o.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
50
|
+
[s.collapsed]: l
|
|
51
|
+
}), children: /* @__PURE__ */ o.jsx(g, {}) })
|
|
52
|
+
] }) }) : /* @__PURE__ */ o.jsxs(f, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
|
|
53
|
+
/* @__PURE__ */ o.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
54
|
+
t && /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
|
|
56
55
|
] }) }),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
[s.visible]:
|
|
59
|
-
}), children: /* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ o.jsx("div", { className: i("children-container", s.childrenContainer, {
|
|
57
|
+
[s.visible]: l
|
|
58
|
+
}), children: /* @__PURE__ */ o.jsx("div", { className: i("shadow rounded children", s.children), children: (x = n.children) == null ? void 0 : x.map((e) => /* @__PURE__ */ o.jsx(f, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, { [s.disabled]: e.disabled || e.notPermitted }, { disabled: e.disabled || e.notPermitted }), onClick: a, children: /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title }) }, e.linkTo)) }) })
|
|
60
59
|
] });
|
|
61
|
-
},
|
|
60
|
+
}, H = "_side-menu_15z3o_1", ee = "_sidebar-header_15z3o_13", oe = "_side-menu-content_15z3o_20", ne = "_expand_15z3o_24", se = "_only-logo_15z3o_28", ie = "_mobile_15z3o_31", te = "_divider_15z3o_45", u = {
|
|
62
61
|
"side-menu": "_side-menu_15z3o_1",
|
|
63
|
-
sideMenu:
|
|
62
|
+
sideMenu: H,
|
|
64
63
|
"sidebar-header": "_sidebar-header_15z3o_13",
|
|
65
|
-
sidebarHeader:
|
|
64
|
+
sidebarHeader: ee,
|
|
66
65
|
"side-menu-content": "_side-menu-content_15z3o_20",
|
|
67
|
-
sideMenuContent:
|
|
68
|
-
expand:
|
|
66
|
+
sideMenuContent: oe,
|
|
67
|
+
expand: ne,
|
|
69
68
|
"only-logo": "_only-logo_15z3o_28",
|
|
70
|
-
onlyLogo:
|
|
71
|
-
mobile:
|
|
72
|
-
divider:
|
|
73
|
-
},
|
|
74
|
-
const [
|
|
75
|
-
var
|
|
69
|
+
onlyLogo: se,
|
|
70
|
+
mobile: ie,
|
|
71
|
+
divider: te
|
|
72
|
+
}, he = ({ headerItem: n, searchItem: t, mainItems: l, secondaryItems: a, expanded: c, setExpanded: m, currentPath: M, useHover: r, useTooltips: N }) => {
|
|
73
|
+
const [p, b] = I(-1), { checkUserHasPermissions: _ } = A(), y = k(() => l.map((e) => {
|
|
74
|
+
var d;
|
|
76
75
|
return {
|
|
77
|
-
...
|
|
78
|
-
notPermitted: !
|
|
79
|
-
children: (
|
|
80
|
-
...
|
|
81
|
-
notPermitted: !
|
|
82
|
-
disabled:
|
|
76
|
+
...e,
|
|
77
|
+
notPermitted: !_(e.permissions ?? [], "any"),
|
|
78
|
+
children: (d = e.children) == null ? void 0 : d.map((h) => ({
|
|
79
|
+
...h,
|
|
80
|
+
notPermitted: !_(h.permissions ?? [], "any"),
|
|
81
|
+
disabled: e.disabled || h.disabled
|
|
83
82
|
}))
|
|
84
83
|
};
|
|
85
|
-
}), [
|
|
86
|
-
var
|
|
84
|
+
}), [l, _]), B = k(() => a.map((e) => {
|
|
85
|
+
var d;
|
|
87
86
|
return {
|
|
88
|
-
...
|
|
89
|
-
notPermitted: !
|
|
90
|
-
children: (
|
|
91
|
-
...
|
|
92
|
-
notPermitted: !
|
|
87
|
+
...e,
|
|
88
|
+
notPermitted: !_(e.permissions ?? [], "any"),
|
|
89
|
+
children: (d = e.children) == null ? void 0 : d.map((h) => ({
|
|
90
|
+
...h,
|
|
91
|
+
notPermitted: !_(h.permissions ?? [], "any")
|
|
93
92
|
}))
|
|
94
93
|
};
|
|
95
|
-
}), [
|
|
96
|
-
|
|
94
|
+
}), [a, _]), v = (e) => {
|
|
95
|
+
b(e === p ? -1 : e);
|
|
97
96
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, [
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const { isMobile:
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
[
|
|
106
|
-
}, { expand:
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
[
|
|
109
|
-
}), role:
|
|
110
|
-
/* @__PURE__ */
|
|
97
|
+
S(() => {
|
|
98
|
+
c || b(-1);
|
|
99
|
+
}, [c]);
|
|
100
|
+
const j = z(null);
|
|
101
|
+
w([j], () => m(!1));
|
|
102
|
+
const { isMobile: x } = $();
|
|
103
|
+
return /* @__PURE__ */ o.jsxs("section", { ref: j, className: i("luminus-side-menu shadow", u.sideMenu, { [u.mobile]: x }, {
|
|
104
|
+
[u.expand]: c
|
|
105
|
+
}, { expand: c }), onMouseEnter: () => r && m(!0), onMouseLeave: () => r && m(!1), children: [
|
|
106
|
+
/* @__PURE__ */ o.jsx("div", { className: i("sidebar-header", u.sidebarHeader, {
|
|
107
|
+
[u.onlyLogo]: r
|
|
108
|
+
}), role: r ? void 0 : "button", onClick: r ? void 0 : () => m(!c), children: r ? n : c ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
109
|
+
/* @__PURE__ */ o.jsx(T, {}),
|
|
111
110
|
n
|
|
112
|
-
] }) : /* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
t ? /* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
|
|
111
|
+
] }) : /* @__PURE__ */ o.jsx(R, {}) }),
|
|
112
|
+
/* @__PURE__ */ o.jsxs("ul", { className: u.sideMenuContent, children: [
|
|
113
|
+
t ? /* @__PURE__ */ o.jsx("div", { className: "p-3", children: t }) : null,
|
|
114
|
+
y.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title)),
|
|
115
|
+
/* @__PURE__ */ o.jsx("hr", { className: i("divider", u.divider) }),
|
|
116
|
+
B.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title))
|
|
118
117
|
] })
|
|
119
118
|
] });
|
|
120
|
-
},
|
|
119
|
+
}, le = "_top-bar_1usoa_1", ae = "_top-bar-brand_1usoa_13", P = {
|
|
121
120
|
"top-bar": "_top-bar_1usoa_1",
|
|
122
|
-
topBar:
|
|
121
|
+
topBar: le,
|
|
123
122
|
"top-bar-brand": "_top-bar-brand_1usoa_13",
|
|
124
|
-
topBarBrand:
|
|
125
|
-
},
|
|
123
|
+
topBarBrand: ae
|
|
124
|
+
}, ve = ({ appName: n, leftOffset: t, centerContent: l, rightContent: a }) => /* @__PURE__ */ o.jsxs("nav", { className: i("luminus-top-bar shadow gap-1 gap-lg-3", P.topBar), style: {
|
|
126
125
|
width: t ? `calc(100% - ${t}px)` : void 0,
|
|
127
126
|
left: t ? `${t}px` : void 0
|
|
128
127
|
}, children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
] })
|
|
133
|
-
const { addHelmet: d, removeHelmet: p } = H($);
|
|
134
|
-
return z(() => (u ? d(u) : typeof n == "string" && n && d(n), () => p()), [u, d, p, n]), /* @__PURE__ */ e.jsxs("div", { className: i("container-fluid", r ? "p-0" : "p-3", _), children: [
|
|
135
|
-
/* @__PURE__ */ e.jsxs("div", { style: { paddingRight: a ? `${l}px` : void 0 }, children: [
|
|
136
|
-
n ? /* @__PURE__ */ e.jsx(F, { title: n }) : null,
|
|
137
|
-
t
|
|
138
|
-
] }),
|
|
139
|
-
a && /* @__PURE__ */ e.jsx(A, { width: l, children: a })
|
|
140
|
-
] });
|
|
141
|
-
};
|
|
128
|
+
/* @__PURE__ */ o.jsx(f, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
|
|
129
|
+
l && /* @__PURE__ */ o.jsx("div", { children: l }),
|
|
130
|
+
/* @__PURE__ */ o.jsx("div", { className: "d-flex justify-content-end align-items-center", children: a ?? null })
|
|
131
|
+
] });
|
|
142
132
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
Ne as SideMenu,
|
|
148
|
-
fe as TopBar
|
|
133
|
+
Ne as PageContainer,
|
|
134
|
+
ye as SideContentBar,
|
|
135
|
+
he as SideMenu,
|
|
136
|
+
ve as TopBar
|
|
149
137
|
};
|