react-luminus-components 1.3.205 → 1.3.207
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 +61 -61
- package/dist/{Loading-74l0p5M0.cjs → Loading-DagdrJCq.cjs} +1 -1
- package/dist/{Loading-CTiNUYCJ.js → Loading-JUsRX9kB.js} +1 -1
- package/dist/{ShortcutLinksContext-DjWgKFrF.js → ShortcutLinksContext-D5EF_fp9.js} +7985 -7833
- package/dist/ShortcutLinksContext-DeePM3HF.cjs +279 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +47 -47
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +20 -20
- package/dist/layout/SideContentBar/SideContentBar.d.ts +3 -2
- package/dist/layout/SideMenu/SideMenu.d.ts +2 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +93 -90
- package/dist/main.cjs.js +36 -36
- package/dist/main.es.js +24 -24
- package/dist/{searchUtils-Dn39KADP.js → searchUtils-Cdh2yY-o.js} +1 -1
- package/dist/{searchUtils-D1Q5ffaA.cjs → searchUtils-DAoQu554.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/useClickOutside-BmlXg38T.js +14 -0
- package/dist/useClickOutside-D0505nsm.cjs +1 -0
- package/dist/{useGetApiData-BiGeqiNF.cjs → useGetApiData-D-AsBqMJ.cjs} +1 -1
- package/dist/{useGetApiData-Dng3v-c1.js → useGetApiData-DZ5S90WY.js} +6 -6
- package/dist/{usePermissions-DpJaM3Pd.cjs → usePermissions-BQuSQHym.cjs} +1 -1
- package/dist/{usePermissions-DH1EcMcR.js → usePermissions-CZniQNTq.js} +1 -1
- package/dist/{useRenderDraggableInPortal-DhdgZl3K.js → useRenderDraggableInPortal-C9Qmlq8B.js} +4 -4
- package/dist/{useRenderDraggableInPortal-DIQFNh3P.cjs → useRenderDraggableInPortal-QO101Q7g.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +11 -11
- package/package.json +3 -2
- package/dist/ShortcutLinksContext-D6SOjqrB.cjs +0 -279
- package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +0 -4
- package/dist/layout/MainContainer/MainContainer.d.ts +0 -4
- package/dist/useWindowSize-CE6DJWzn.cjs +0 -1
- package/dist/useWindowSize-OLYtjFv_.js +0 -20
package/dist/layout.es.js
CHANGED
|
@@ -1,141 +1,144 @@
|
|
|
1
|
-
import { j as e, c as i, aa as
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Link as
|
|
1
|
+
import { j as e, c as i, aa as B, aG as T, af as R, bo as S, bp as $ } from "./ShortcutLinksContext-D5EF_fp9.js";
|
|
2
|
+
import { b8 as ye, bq as ge } from "./ShortcutLinksContext-D5EF_fp9.js";
|
|
3
|
+
import { useState as w, useRef as I, useMemo as C, useEffect as A } from "react";
|
|
4
|
+
import { Link as q } 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 {
|
|
9
|
+
import { u as L } from "./useClickOutside-BmlXg38T.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import { u as
|
|
12
|
-
const
|
|
11
|
+
import { u as F } from "./usePermissions-CZniQNTq.js";
|
|
12
|
+
const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1o1uo_10", D = "_child_1o1uo_18", G = "_text_1o1uo_23", U = "_icon_1o1uo_30", W = "_collapse-icon_1o1uo_36", E = "_collapsed_1o1uo_46", J = "_collapse-icon-mini_1o1uo_49", Q = "_expanded_1o1uo_80", V = "_children-container_1o1uo_86", X = "_visible_1o1uo_94", Y = "_children_1o1uo_86", Z = "_mobile_1o1uo_106", s = {
|
|
13
13
|
"side-menu-item": "_side-menu-item_1o1uo_1",
|
|
14
|
-
sideMenuItem:
|
|
15
|
-
disabled:
|
|
14
|
+
sideMenuItem: K,
|
|
15
|
+
disabled: O,
|
|
16
16
|
"nav-button": "_nav-button_1o1uo_10",
|
|
17
|
-
navButton:
|
|
18
|
-
child:
|
|
19
|
-
text:
|
|
17
|
+
navButton: z,
|
|
18
|
+
child: D,
|
|
19
|
+
text: G,
|
|
20
20
|
icon: U,
|
|
21
21
|
"collapse-icon": "_collapse-icon_1o1uo_36",
|
|
22
22
|
collapseIcon: W,
|
|
23
23
|
collapsed: E,
|
|
24
24
|
"collapse-icon-mini": "_collapse-icon-mini_1o1uo_49",
|
|
25
|
-
collapseIconMini:
|
|
26
|
-
expanded:
|
|
25
|
+
collapseIconMini: J,
|
|
26
|
+
expanded: Q,
|
|
27
27
|
"children-container": "_children-container_1o1uo_86",
|
|
28
|
-
childrenContainer:
|
|
29
|
-
visible:
|
|
30
|
-
children:
|
|
31
|
-
mobile:
|
|
32
|
-
},
|
|
33
|
-
var
|
|
34
|
-
const [
|
|
35
|
-
return
|
|
28
|
+
childrenContainer: V,
|
|
29
|
+
visible: X,
|
|
30
|
+
children: Y,
|
|
31
|
+
mobile: Z
|
|
32
|
+
}, H = ({ item: n, menuExpanded: l, useTooltips: a, children: c }) => n.tooltip && !l && a ? /* @__PURE__ */ e.jsx(T, { text: n.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ e.jsx("div", { children: c }) }) : c, k = ({ item: n, menuExpanded: l, collapsed: a, onCollapse: c, currentPath: p, useHover: d, useTooltips: b, isMobile: f }) => {
|
|
33
|
+
var y, g, M, N;
|
|
34
|
+
const [_, v] = w(!1), [h] = p.split("?"), j = n.linkTo === h || ((y = n.children) == null ? void 0 : y.some((o) => o.linkTo === h)), u = I(null);
|
|
35
|
+
return L([u], () => a && c()), /* @__PURE__ */ e.jsxs("li", { ref: u, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: f }, {
|
|
36
36
|
[s.expanded]: l
|
|
37
|
-
}, { active:
|
|
38
|
-
[s.disabled]:
|
|
37
|
+
}, { active: _ || j }, { open: a && n.children }, {
|
|
38
|
+
[s.disabled]: n.disabled || n.notPermitted || ((g = n.children) == null ? void 0 : g.every((o) => o.notPermitted || o.disabled))
|
|
39
39
|
}, {
|
|
40
|
-
disabled:
|
|
41
|
-
}), onMouseEnter: () =>
|
|
42
|
-
/* @__PURE__ */ e.jsx(
|
|
43
|
-
|
|
40
|
+
disabled: n.disabled || n.notPermitted || ((M = n.children) == null ? void 0 : M.every((o) => o.notPermitted || o.disabled))
|
|
41
|
+
}), onMouseEnter: () => v(!0), onMouseLeave: () => v(!1), children: [
|
|
42
|
+
/* @__PURE__ */ e.jsx(H, { item: n, menuExpanded: l, useTooltips: b, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: i("nav-link", s.navButton), onClick: () => {
|
|
43
|
+
c();
|
|
44
44
|
}, children: [
|
|
45
|
-
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children:
|
|
46
|
-
!
|
|
45
|
+
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
46
|
+
!d && !l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
|
|
47
47
|
[s.collapsed]: a
|
|
48
|
-
}), children: /* @__PURE__ */ e.jsx(
|
|
49
|
-
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children:
|
|
48
|
+
}), children: /* @__PURE__ */ e.jsx(B, {}) }),
|
|
49
|
+
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title }),
|
|
50
50
|
l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
51
51
|
[s.collapsed]: a
|
|
52
|
-
}), children: /* @__PURE__ */ e.jsx(
|
|
53
|
-
] }) }) : /* @__PURE__ */ e.jsxs(
|
|
54
|
-
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children:
|
|
55
|
-
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children:
|
|
52
|
+
}), children: /* @__PURE__ */ e.jsx(B, {}) })
|
|
53
|
+
] }) }) : /* @__PURE__ */ e.jsxs(q, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
|
|
54
|
+
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
55
|
+
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
|
|
56
56
|
] }) }),
|
|
57
57
|
/* @__PURE__ */ e.jsx("div", { className: i("children-container", s.childrenContainer, {
|
|
58
58
|
[s.visible]: a
|
|
59
|
-
}), children: /* @__PURE__ */ e.jsx("div", { className: i("shadow rounded children", s.children), children: (
|
|
59
|
+
}), children: /* @__PURE__ */ e.jsx("div", { className: i("shadow rounded children", s.children), children: (N = n.children) == null ? void 0 : N.map((o) => /* @__PURE__ */ e.jsx(q, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, { [s.disabled]: o.disabled || o.notPermitted }, { disabled: o.disabled || o.notPermitted }), onClick: c, children: /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: o.title }) }, o.linkTo)) }) })
|
|
60
60
|
] });
|
|
61
|
-
},
|
|
61
|
+
}, ee = "_side-menu_1q9oh_1", ne = "_sidebar-header_1q9oh_15", oe = "_side-menu-content_1q9oh_22", se = "_expand_1q9oh_27", ie = "_only-logo_1q9oh_31", le = "_mobile_1q9oh_34", te = "_divider_1q9oh_49", m = {
|
|
62
62
|
"side-menu": "_side-menu_1q9oh_1",
|
|
63
|
-
sideMenu:
|
|
63
|
+
sideMenu: ee,
|
|
64
64
|
"sidebar-header": "_sidebar-header_1q9oh_15",
|
|
65
|
-
sidebarHeader:
|
|
65
|
+
sidebarHeader: ne,
|
|
66
66
|
"side-menu-content": "_side-menu-content_1q9oh_22",
|
|
67
|
-
sideMenuContent:
|
|
68
|
-
expand:
|
|
67
|
+
sideMenuContent: oe,
|
|
68
|
+
expand: se,
|
|
69
69
|
"only-logo": "_only-logo_1q9oh_31",
|
|
70
|
-
onlyLogo:
|
|
71
|
-
mobile:
|
|
72
|
-
divider:
|
|
73
|
-
},
|
|
74
|
-
const [
|
|
75
|
-
var
|
|
70
|
+
onlyLogo: ie,
|
|
71
|
+
mobile: le,
|
|
72
|
+
divider: te
|
|
73
|
+
}, je = ({ headerItem: n, searchItem: l, shortcutsItem: a, mainItems: c, secondaryItems: p, expanded: d, setExpanded: b, currentPath: f, useHover: _, useTooltips: v }) => {
|
|
74
|
+
const [h, j] = w(-1), { checkUserHasPermissions: u } = F(), y = C(() => c.map((t) => {
|
|
75
|
+
var r;
|
|
76
76
|
return {
|
|
77
|
-
...
|
|
78
|
-
notPermitted: !
|
|
79
|
-
children: (
|
|
77
|
+
...t,
|
|
78
|
+
notPermitted: !u(t.permissions ?? [], "any"),
|
|
79
|
+
children: (r = t.children) == null ? void 0 : r.map((x) => ({
|
|
80
80
|
...x,
|
|
81
|
-
notPermitted: !
|
|
82
|
-
disabled:
|
|
81
|
+
notPermitted: !u(x.permissions ?? [], "any"),
|
|
82
|
+
disabled: t.disabled || x.disabled
|
|
83
83
|
}))
|
|
84
84
|
};
|
|
85
|
-
}), [
|
|
86
|
-
var
|
|
85
|
+
}), [c, u]), g = C(() => p.map((t) => {
|
|
86
|
+
var r;
|
|
87
87
|
return {
|
|
88
|
-
...
|
|
89
|
-
notPermitted: !
|
|
90
|
-
children: (
|
|
88
|
+
...t,
|
|
89
|
+
notPermitted: !u(t.permissions ?? [], "any"),
|
|
90
|
+
children: (r = t.children) == null ? void 0 : r.map((x) => ({
|
|
91
91
|
...x,
|
|
92
|
-
notPermitted: !
|
|
92
|
+
notPermitted: !u(x.permissions ?? [], "any")
|
|
93
93
|
}))
|
|
94
94
|
};
|
|
95
|
-
}), [
|
|
96
|
-
|
|
95
|
+
}), [p, u]), M = (t) => {
|
|
96
|
+
j(t === h ? -1 : t);
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, [
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const { isMobile:
|
|
104
|
-
return /* @__PURE__ */ e.jsxs("section", { ref:
|
|
105
|
-
[m.expand]:
|
|
106
|
-
}, { expand:
|
|
98
|
+
A(() => {
|
|
99
|
+
d || j(-1);
|
|
100
|
+
}, [d]);
|
|
101
|
+
const N = I(null);
|
|
102
|
+
L([N], () => b(!1));
|
|
103
|
+
const { isMobile: o } = R();
|
|
104
|
+
return /* @__PURE__ */ e.jsxs("section", { ref: N, className: i("luminus-side-menu shadow", m.sideMenu, { [m.mobile]: o }, {
|
|
105
|
+
[m.expand]: d
|
|
106
|
+
}, { expand: d }), onMouseEnter: () => _ && b(!0), onMouseLeave: () => _ && b(!1), children: [
|
|
107
107
|
/* @__PURE__ */ e.jsx("div", { className: i("sidebar-header", m.sidebarHeader, {
|
|
108
|
-
[m.onlyLogo]:
|
|
109
|
-
}), role:
|
|
110
|
-
/* @__PURE__ */ e.jsx(
|
|
111
|
-
|
|
112
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
113
|
-
|
|
108
|
+
[m.onlyLogo]: _
|
|
109
|
+
}), role: _ ? void 0 : "button", onClick: _ ? void 0 : () => b(!d), children: _ ? n : d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
110
|
+
/* @__PURE__ */ e.jsx(S, {}),
|
|
111
|
+
n
|
|
112
|
+
] }) : /* @__PURE__ */ e.jsx($, {}) }),
|
|
113
|
+
d && (l || a) ? /* @__PURE__ */ e.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
|
|
114
|
+
a && d ? a : null,
|
|
115
|
+
l && d ? l : null
|
|
116
|
+
] }) : null,
|
|
114
117
|
/* @__PURE__ */ e.jsxs("ul", { className: m.sideMenuContent, children: [
|
|
115
|
-
y.map((
|
|
118
|
+
y.map((t, r) => /* @__PURE__ */ e.jsx(k, { item: t, menuExpanded: d, collapsed: r === h, onCollapse: () => M(r), currentPath: f, useHover: _, useTooltips: v, isMobile: o }, t.title)),
|
|
116
119
|
/* @__PURE__ */ e.jsx("hr", { className: i("divider", m.divider) }),
|
|
117
|
-
|
|
120
|
+
g.map((t, r) => /* @__PURE__ */ e.jsx(k, { item: t, menuExpanded: d, collapsed: r === h, onCollapse: () => M(r), currentPath: f, useHover: _, useTooltips: v, isMobile: o }, t.title))
|
|
118
121
|
] })
|
|
119
122
|
] });
|
|
120
|
-
},
|
|
123
|
+
}, ae = "_top-bar_lnmq0_1", de = "_top-bar-brand_lnmq0_12", P = {
|
|
121
124
|
"top-bar": "_top-bar_lnmq0_1",
|
|
122
|
-
topBar:
|
|
125
|
+
topBar: ae,
|
|
123
126
|
"top-bar-brand": "_top-bar-brand_lnmq0_12",
|
|
124
|
-
topBarBrand:
|
|
125
|
-
},
|
|
127
|
+
topBarBrand: de
|
|
128
|
+
}, Me = ({ appName: n, leftOffset: l, leftContent: a, centerContent: c, rightContent: p }) => /* @__PURE__ */ e.jsx("nav", { className: i("luminus-top-bar shadow", P.topBar), style: {
|
|
126
129
|
width: l ? `calc(100% - ${l}px)` : void 0,
|
|
127
130
|
left: l ? `${l}px` : void 0
|
|
128
131
|
}, children: /* @__PURE__ */ e.jsxs("div", { className: "w-100 row g-0", children: [
|
|
129
|
-
/* @__PURE__ */ e.
|
|
130
|
-
/* @__PURE__ */ e.jsx(
|
|
132
|
+
/* @__PURE__ */ e.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
|
|
133
|
+
/* @__PURE__ */ e.jsx(q, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
|
|
131
134
|
a
|
|
132
|
-
] })
|
|
133
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-4
|
|
134
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-4
|
|
135
|
+
] }),
|
|
136
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
|
|
137
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: p ?? null })
|
|
135
138
|
] }) });
|
|
136
139
|
export {
|
|
137
140
|
ye as PageContainer,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
ge as SideContentBar,
|
|
142
|
+
je as SideMenu,
|
|
143
|
+
Me as TopBar
|
|
141
144
|
};
|