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