react-luminus-components 1.3.225 → 1.3.227
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 +53 -76
- package/dist/{Loading-Cbtkg0c9.js → Loading-BJ_lZlKK.js} +1 -1
- package/dist/Loading-DlpVQq65.cjs +1 -0
- package/dist/ShortcutLinksContext-e3A66ljP.cjs +279 -0
- package/dist/{nivo-bar.es-C-IDqcMg.js → ShortcutLinksContext-hUsPOX8t.js} +12109 -11525
- package/dist/components/Documents/components/DocumentsMobile/DocumentsMobile.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsMobile/comps/DocumentsMobileItem/DocumentsMobileItem.d.ts +7 -0
- package/dist/components/Documents/components/DocumentsMobile/comps/index.d.ts +1 -0
- package/dist/components/Documents/utils/documentsUtils.d.ts +1 -0
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +2 -0
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +2 -0
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +36 -36
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +46 -47
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +30 -31
- package/dist/main.cjs.js +57 -57
- package/dist/main.es.js +6965 -7486
- package/dist/models/prop-types/InputContainerProps.d.ts +1 -0
- package/dist/models/texts/DocumentsTexts.d.ts +3 -0
- package/dist/numberUtils-BY7ziQF8.cjs +1 -0
- package/dist/numberUtils-Bwf8nio8.js +7 -0
- package/dist/style.css +1 -1
- package/dist/{useGetApiData-Cyny2rj4.js → useGetApiData-B7pV8Vq3.js} +7 -7
- package/dist/useGetApiData-DK6aVy8x.cjs +1 -0
- package/dist/usePermissions-Bjiuw_on.cjs +1 -0
- package/dist/usePermissions-C_l9BKHx.js +21 -0
- package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +78 -0
- package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +36 -36
- package/dist/variables.scss +165 -165
- package/package.json +120 -120
- package/dist/Loading-Bv65yWpV.cjs +0 -1
- package/dist/nivo-bar.es-BXN_qG9T.cjs +0 -279
- package/dist/searchUtils-CBAvWWCQ.js +0 -14
- package/dist/searchUtils-D0GHdkU6.cjs +0 -1
- package/dist/useClickOutside-BmlXg38T.js +0 -14
- package/dist/useClickOutside-D0505nsm.cjs +0 -1
- package/dist/useGetApiData-BQ9P7kC8.cjs +0 -1
- package/dist/usePermissions-CDAW5R44.cjs +0 -1
- package/dist/usePermissions-CIgm7FL-.js +0 -21
- package/dist/useRenderDraggableInPortal-0XfgSOcM.cjs +0 -1
- package/dist/useRenderDraggableInPortal-B5LatuVt.js +0 -99
package/dist/hooks.es.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { bC as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import { u as me } from "./useLocalStorageState-Bt99kkCr.js";
|
|
1
|
+
import { aj as S, aW as P, aA as B } from "./ShortcutLinksContext-hUsPOX8t.js";
|
|
2
|
+
import { bz as Y, ag as Z, bC as q, aY as H, bB as J, as as M, aX as V, bb as _, a6 as ee, bA as te } from "./ShortcutLinksContext-hUsPOX8t.js";
|
|
3
|
+
import { u as ae } from "./usePermissions-C_l9BKHx.js";
|
|
4
|
+
import { u as re } from "./useGetApiData-B7pV8Vq3.js";
|
|
5
|
+
import { useState as x, useEffect as C, useContext as L, useRef as T, useCallback as U } from "react";
|
|
6
|
+
import { u as ue } from "./useLocalStorageState-Bt99kkCr.js";
|
|
7
|
+
import { c as le, u as ie, a as fe, b as de } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
9
8
|
import "react-router-dom";
|
|
10
9
|
import "react-dom";
|
|
11
10
|
import "react-hook-form";
|
|
12
11
|
import "react-flexmonster";
|
|
13
12
|
import "@azure/msal-browser";
|
|
14
13
|
import "@azure/msal-react";
|
|
15
|
-
const
|
|
14
|
+
const $ = (o) => {
|
|
16
15
|
let e = "pending", a;
|
|
17
|
-
const t =
|
|
16
|
+
const t = o.then((s) => {
|
|
18
17
|
e = "success", a = s;
|
|
19
18
|
}, (s) => {
|
|
20
19
|
e = "error", a = s;
|
|
@@ -32,26 +31,26 @@ const B = (r) => {
|
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
|
-
function
|
|
34
|
+
function j(o, e) {
|
|
36
35
|
const a = S({
|
|
37
36
|
silent: !0,
|
|
38
37
|
differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
|
|
39
38
|
customToken: e == null ? void 0 : e.customToken
|
|
40
|
-
}), [t, s] =
|
|
39
|
+
}), [t, s] = x(null);
|
|
41
40
|
return C(() => {
|
|
42
41
|
(async () => {
|
|
43
|
-
const
|
|
44
|
-
s(
|
|
42
|
+
const r = a.get(o).then((n) => n.data);
|
|
43
|
+
s($(r));
|
|
45
44
|
})();
|
|
46
|
-
}, [a,
|
|
45
|
+
}, [a, o]), t;
|
|
47
46
|
}
|
|
48
|
-
const E = (
|
|
47
|
+
const E = (o, e, a) => {
|
|
49
48
|
let t = "pending", s;
|
|
50
|
-
const c =
|
|
51
|
-
t = "success", s =
|
|
52
|
-
}, (
|
|
53
|
-
const n =
|
|
54
|
-
(n == null ? void 0 : n.status) === 404 && a ? (t = "error-404", s =
|
|
49
|
+
const c = o.then((r) => {
|
|
50
|
+
t = "success", s = r;
|
|
51
|
+
}, (r) => {
|
|
52
|
+
const n = r == null ? void 0 : r.response;
|
|
53
|
+
(n == null ? void 0 : n.status) === 404 && a ? (t = "error-404", s = r) : (t = "error", s = r);
|
|
55
54
|
});
|
|
56
55
|
return () => {
|
|
57
56
|
switch (t) {
|
|
@@ -73,26 +72,26 @@ const E = (r, e, a) => {
|
|
|
73
72
|
enabled: !0,
|
|
74
73
|
nullStateBeforeLoad: !0,
|
|
75
74
|
nullStateOnFail: !1
|
|
76
|
-
}, K = (
|
|
75
|
+
}, K = (o, { loadOnInit: e = u.loadOnInit, enabled: a = u.enabled, silent: t = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: c = u.nullStateOnFail, customApiUrl: r, customBearerToken: n, dataTransformer: i, errorBoundaryOn404: f } = u) => {
|
|
77
76
|
const p = S({
|
|
78
77
|
silent: t,
|
|
79
78
|
customToken: n,
|
|
80
|
-
differentBaseUrl:
|
|
79
|
+
differentBaseUrl: r,
|
|
81
80
|
noToastOnStatus: f ? [404] : void 0
|
|
82
|
-
}), { startLoading: h, stopLoading: g } =
|
|
81
|
+
}), { startLoading: h, stopLoading: g } = L(P), k = T(0), { isAuthenticated: w } = B(), [A, d] = x(null), m = U(async (l, b) => {
|
|
83
82
|
if (!w() || a === !1)
|
|
84
83
|
return;
|
|
85
|
-
!t && h(`loadData-${
|
|
86
|
-
const
|
|
84
|
+
!t && h(`loadData-${o}-${b}`), s && d(null);
|
|
85
|
+
const y = p.get(o, {
|
|
87
86
|
signal: l
|
|
88
|
-
}).then((
|
|
89
|
-
d(E(
|
|
87
|
+
}).then((D) => i ? i(D.data) : D.data).finally(() => !t && g(`loadData-${o}-${b}`));
|
|
88
|
+
d(E(y, c ?? !1, f ?? !1));
|
|
90
89
|
}, [
|
|
91
90
|
w,
|
|
92
91
|
a,
|
|
93
92
|
t,
|
|
94
93
|
h,
|
|
95
|
-
|
|
94
|
+
o,
|
|
96
95
|
s,
|
|
97
96
|
p,
|
|
98
97
|
i,
|
|
@@ -107,28 +106,28 @@ const E = (r, e, a) => {
|
|
|
107
106
|
return m(l.signal, ++k.current), () => {
|
|
108
107
|
l.abort();
|
|
109
108
|
};
|
|
110
|
-
}, [m, e]), { data:
|
|
109
|
+
}, [m, e]), { data: A, setData: d, reloadData: m };
|
|
111
110
|
};
|
|
112
111
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
Y as cancelToken,
|
|
113
|
+
B as useAuth,
|
|
115
114
|
S as useAxios,
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
Z as useClickOutside,
|
|
116
|
+
q as useClipboard,
|
|
118
117
|
H as useConfirm,
|
|
119
|
-
|
|
118
|
+
le as useEmployeePhotoPath,
|
|
120
119
|
J as useFormControlType,
|
|
121
|
-
|
|
120
|
+
re as useGetApiData,
|
|
122
121
|
K as useGetApiDataBound,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
j as useGetDataBound,
|
|
123
|
+
M as useKeyPress,
|
|
124
|
+
ue as useLocalStorageState,
|
|
125
|
+
V as useNotifications,
|
|
126
|
+
ae as usePermissions,
|
|
127
|
+
_ as usePrompt,
|
|
128
|
+
ie as useRenderDraggableInPortal,
|
|
129
|
+
fe as useSearchQuery,
|
|
130
|
+
de as useSearchQueryState,
|
|
131
|
+
ee as useWindowSize,
|
|
132
|
+
te as useZodSchemaTypes
|
|
134
133
|
};
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-e3A66ljP.cjs"),x=require("react"),y=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const k=require("./usePermissions-Bjiuw_on.cjs"),B="_side-menu-item_1o1uo_1",P="_disabled_1o1uo_6",f="_nav-button_1o1uo_10",w="_child_1o1uo_18",S="_text_1o1uo_23",I="_icon_1o1uo_30",L="_collapse-icon_1o1uo_36",T="_collapsed_1o1uo_46",O="_collapse-icon-mini_1o1uo_49",$="_expanded_1o1uo_80",A="_children-container_1o1uo_86",K="_visible_1o1uo_94",D="_children_1o1uo_86",F="_mobile_1o1uo_106",o={"side-menu-item":"_side-menu-item_1o1uo_1",sideMenuItem:B,disabled:P,"nav-button":"_nav-button_1o1uo_10",navButton:f,child:w,text:S,icon:I,"collapse-icon":"_collapse-icon_1o1uo_36",collapseIcon:L,collapsed:T,"collapse-icon-mini":"_collapse-icon-mini_1o1uo_49",collapseIconMini:O,expanded:$,"children-container":"_children-container_1o1uo_86",childrenContainer:A,visible:K,children:D,mobile:F},z=({item:s,menuExpanded:t,useTooltips:l,children:r})=>s.tooltip&&!t&&l?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:r})}):r,g=({item:s,menuExpanded:t,collapsed:l,onCollapse:r,currentPath:_,useHover:a,useTooltips:p,isMobile:E})=>{var M,q,v,N;const[d,h]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((M=s.children)==null?void 0:M.some(n=>n.linkTo===j)),u=x.useRef(null);return e.useClickOutside([u],()=>l&&r()),e.jsxRuntimeExports.jsxs("li",{ref:u,className:e.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.mobile]:E},{[o.expanded]:t},{active:d||R},{open:l&&s.children},{[o.disabled]:s.disabled||s.notPermitted||((q=s.children)==null?void 0:q.every(n=>n.notPermitted||n.disabled))},{disabled:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(n=>n.notPermitted||n.disabled))}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[e.jsxRuntimeExports.jsx(z,{item:s,menuExpanded:t,useTooltips:p,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",o.navButton),onClick:()=>{r()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:s.icon}),!a&&!t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",o.collapseIconMini,{[o.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(y.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",o.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:s.icon}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",o.childrenContainer,{[o.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",o.children),children:(N=s.children)==null?void 0:N.map(n=>e.jsxRuntimeExports.jsx(y.Link,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:e.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),onClick:r,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},U="_side-menu_1q9oh_1",W="_sidebar-header_1q9oh_15",G="_side-menu-content_1q9oh_22",J="_expand_1q9oh_27",Q="_only-logo_1q9oh_31",V="_mobile_1q9oh_34",X="_divider_1q9oh_49",m={"side-menu":"_side-menu_1q9oh_1",sideMenu:U,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:W,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:G,expand:J,"only-logo":"_only-logo_1q9oh_31",onlyLogo:Q,mobile:V,divider:X},Y=({headerItem:s,searchItem:t,shortcutsItem:l,mainItems:r,secondaryItems:_,expanded:a,setExpanded:p,currentPath:E,useHover:d,useTooltips:h})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:u}=k.usePermissions(),M=x.useMemo(()=>r.map(i=>{var c;return{...i,notPermitted:!u(i.permissions??[],"any"),children:(c=i.children)==null?void 0:c.map(b=>({...b,notPermitted:!u(b.permissions??[],"any"),disabled:i.disabled||b.disabled}))}}),[r,u]),q=x.useMemo(()=>_.map(i=>{var c;return{...i,notPermitted:!u(i.permissions??[],"any"),children:(c=i.children)==null?void 0:c.map(b=>({...b,notPermitted:!u(b.permissions??[],"any")}))}}),[_,u]),v=i=>{R(i===j?-1:i)};x.useEffect(()=>{a||R(-1)},[a]);const N=x.useRef(null);e.useClickOutside([N],()=>p(!1));const{isMobile:n}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",m.sideMenu,{[m.mobile]:n},{[m.expand]:a},{expand:a}),onMouseEnter:()=>d&&p(!0),onMouseLeave:()=>d&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",m.sidebarHeader,{[m.onlyLogo]:d}),role:d?void 0:"button",onClick:d?void 0:()=>p(!a),children:d?s:a?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),a&&(t||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&a?l:null,t&&a?t:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:m.sideMenuContent,children:[M.map((i,c)=>e.jsxRuntimeExports.jsx(g,{item:i,menuExpanded:a,collapsed:c===j,onCollapse:()=>v(c),currentPath:E,useHover:d,useTooltips:h,isMobile:n},i.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",m.divider)}),q.map((i,c)=>e.jsxRuntimeExports.jsx(g,{item:i,menuExpanded:a,collapsed:c===j,onCollapse:()=>v(c),currentPath:E,useHover:d,useTooltips:h,isMobile:n},i.title))]})]})},Z="_top-bar_lnmq0_1",H="_top-bar-brand_lnmq0_12",C={"top-bar":"_top-bar_lnmq0_1",topBar:Z,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:H},ee=({appName:s,leftOffset:t,leftContent:l,centerContent:r,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",C.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 row g-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[e.jsxRuntimeExports.jsx(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:s}),l]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:r??null}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:_??null})]})});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Y;exports.TopBar=ee;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { j as e, c as i,
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Link as
|
|
1
|
+
import { ag as w, j as e, c as i, $ as q, ax as T, a6 as $, bn as R, bo as S } from "./ShortcutLinksContext-hUsPOX8t.js";
|
|
2
|
+
import { b7 as fe, bp as ye } from "./ShortcutLinksContext-hUsPOX8t.js";
|
|
3
|
+
import { useState as I, useRef as L, useMemo as C, useEffect as A } 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 { u as L } from "./useClickOutside-BmlXg38T.js";
|
|
10
9
|
import "react-dom";
|
|
11
|
-
import { u as F } from "./usePermissions-
|
|
12
|
-
const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1o1uo_10", D = "_child_1o1uo_18",
|
|
10
|
+
import { u as F } from "./usePermissions-C_l9BKHx.js";
|
|
11
|
+
const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1o1uo_10", D = "_child_1o1uo_18", U = "_text_1o1uo_23", W = "_icon_1o1uo_30", E = "_collapse-icon_1o1uo_36", G = "_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
12
|
"side-menu-item": "_side-menu-item_1o1uo_1",
|
|
14
13
|
sideMenuItem: K,
|
|
15
14
|
disabled: O,
|
|
16
15
|
"nav-button": "_nav-button_1o1uo_10",
|
|
17
16
|
navButton: z,
|
|
18
17
|
child: D,
|
|
19
|
-
text:
|
|
20
|
-
icon:
|
|
18
|
+
text: U,
|
|
19
|
+
icon: W,
|
|
21
20
|
"collapse-icon": "_collapse-icon_1o1uo_36",
|
|
22
|
-
collapseIcon:
|
|
23
|
-
collapsed:
|
|
21
|
+
collapseIcon: E,
|
|
22
|
+
collapsed: G,
|
|
24
23
|
"collapse-icon-mini": "_collapse-icon-mini_1o1uo_49",
|
|
25
24
|
collapseIconMini: J,
|
|
26
25
|
expanded: Q,
|
|
@@ -31,8 +30,8 @@ const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1
|
|
|
31
30
|
mobile: Z
|
|
32
31
|
}, 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
32
|
var y, g, M, N;
|
|
34
|
-
const [_, v] =
|
|
35
|
-
return
|
|
33
|
+
const [_, v] = I(!1), [h] = p.split("?"), j = n.linkTo === h || ((y = n.children) == null ? void 0 : y.some((o) => o.linkTo === h)), u = L(null);
|
|
34
|
+
return w([u], () => a && c()), /* @__PURE__ */ e.jsxs("li", { ref: u, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: f }, {
|
|
36
35
|
[s.expanded]: l
|
|
37
36
|
}, { active: _ || j }, { open: a && n.children }, {
|
|
38
37
|
[s.disabled]: n.disabled || n.notPermitted || ((g = n.children) == null ? void 0 : g.every((o) => o.notPermitted || o.disabled))
|
|
@@ -45,18 +44,18 @@ const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1
|
|
|
45
44
|
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
46
45
|
!d && !l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
|
|
47
46
|
[s.collapsed]: a
|
|
48
|
-
}), children: /* @__PURE__ */ e.jsx(
|
|
47
|
+
}), children: /* @__PURE__ */ e.jsx(q, {}) }),
|
|
49
48
|
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title }),
|
|
50
49
|
l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
51
50
|
[s.collapsed]: a
|
|
52
|
-
}), children: /* @__PURE__ */ e.jsx(
|
|
53
|
-
] }) }) : /* @__PURE__ */ e.jsxs(
|
|
51
|
+
}), children: /* @__PURE__ */ e.jsx(q, {}) })
|
|
52
|
+
] }) }) : /* @__PURE__ */ e.jsxs(B, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
|
|
54
53
|
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
55
54
|
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
|
|
56
55
|
] }) }),
|
|
57
56
|
/* @__PURE__ */ e.jsx("div", { className: i("children-container", s.childrenContainer, {
|
|
58
57
|
[s.visible]: a
|
|
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(
|
|
58
|
+
}), 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(B, { 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
59
|
] });
|
|
61
60
|
}, 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
61
|
"side-menu": "_side-menu_1q9oh_1",
|
|
@@ -70,8 +69,8 @@ const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1
|
|
|
70
69
|
onlyLogo: ie,
|
|
71
70
|
mobile: le,
|
|
72
71
|
divider: te
|
|
73
|
-
},
|
|
74
|
-
const [h, j] =
|
|
72
|
+
}, ve = ({ headerItem: n, searchItem: l, shortcutsItem: a, mainItems: c, secondaryItems: p, expanded: d, setExpanded: b, currentPath: f, useHover: _, useTooltips: v }) => {
|
|
73
|
+
const [h, j] = I(-1), { checkUserHasPermissions: u } = F(), y = C(() => c.map((t) => {
|
|
75
74
|
var r;
|
|
76
75
|
return {
|
|
77
76
|
...t,
|
|
@@ -98,18 +97,18 @@ const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1
|
|
|
98
97
|
A(() => {
|
|
99
98
|
d || j(-1);
|
|
100
99
|
}, [d]);
|
|
101
|
-
const N =
|
|
102
|
-
|
|
103
|
-
const { isMobile: o } =
|
|
100
|
+
const N = L(null);
|
|
101
|
+
w([N], () => b(!1));
|
|
102
|
+
const { isMobile: o } = $();
|
|
104
103
|
return /* @__PURE__ */ e.jsxs("section", { ref: N, className: i("luminus-side-menu shadow", m.sideMenu, { [m.mobile]: o }, {
|
|
105
104
|
[m.expand]: d
|
|
106
105
|
}, { expand: d }), onMouseEnter: () => _ && b(!0), onMouseLeave: () => _ && b(!1), children: [
|
|
107
106
|
/* @__PURE__ */ e.jsx("div", { className: i("sidebar-header", m.sidebarHeader, {
|
|
108
107
|
[m.onlyLogo]: _
|
|
109
108
|
}), role: _ ? void 0 : "button", onClick: _ ? void 0 : () => b(!d), children: _ ? n : d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
110
|
-
/* @__PURE__ */ e.jsx(
|
|
109
|
+
/* @__PURE__ */ e.jsx(R, {}),
|
|
111
110
|
n
|
|
112
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
111
|
+
] }) : /* @__PURE__ */ e.jsx(S, {}) }),
|
|
113
112
|
d && (l || a) ? /* @__PURE__ */ e.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
|
|
114
113
|
a && d ? a : null,
|
|
115
114
|
l && d ? l : null
|
|
@@ -120,25 +119,25 @@ const K = "_side-menu-item_1o1uo_1", O = "_disabled_1o1uo_6", z = "_nav-button_1
|
|
|
120
119
|
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))
|
|
121
120
|
] })
|
|
122
121
|
] });
|
|
123
|
-
}, ae = "_top-bar_lnmq0_1", de = "_top-bar-brand_lnmq0_12",
|
|
122
|
+
}, ae = "_top-bar_lnmq0_1", de = "_top-bar-brand_lnmq0_12", P = {
|
|
124
123
|
"top-bar": "_top-bar_lnmq0_1",
|
|
125
124
|
topBar: ae,
|
|
126
125
|
"top-bar-brand": "_top-bar-brand_lnmq0_12",
|
|
127
126
|
topBarBrand: de
|
|
128
|
-
},
|
|
127
|
+
}, je = ({ appName: n, leftOffset: l, leftContent: a, centerContent: c, rightContent: p }) => /* @__PURE__ */ e.jsx("nav", { className: i("luminus-top-bar shadow", P.topBar), style: {
|
|
129
128
|
width: l ? `calc(100% - ${l}px)` : void 0,
|
|
130
129
|
left: l ? `${l}px` : void 0
|
|
131
130
|
}, children: /* @__PURE__ */ e.jsxs("div", { className: "w-100 row g-0", children: [
|
|
132
131
|
/* @__PURE__ */ e.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
|
|
133
|
-
/* @__PURE__ */ e.jsx(
|
|
132
|
+
/* @__PURE__ */ e.jsx(B, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
|
|
134
133
|
a
|
|
135
134
|
] }),
|
|
136
135
|
/* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
|
|
137
136
|
/* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: p ?? null })
|
|
138
137
|
] }) });
|
|
139
138
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
fe as PageContainer,
|
|
140
|
+
ye as SideContentBar,
|
|
141
|
+
ve as SideMenu,
|
|
142
|
+
je as TopBar
|
|
144
143
|
};
|