react-luminus-components 1.3.226 → 1.3.229
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 +36 -36
- package/dist/{Loading-C1axYZDI.js → Loading-BoCQC7SU.js} +1 -1
- package/dist/Loading-fWpRhgnS.cjs +1 -0
- package/dist/ShortcutLinksContext-BK-LAMmI.cjs +279 -0
- package/dist/{nivo-bar.es-DJ9CZTr8.js → ShortcutLinksContext-VwgvUlRx.js} +9160 -9154
- 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 +181 -172
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +31 -31
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +16 -16
- package/dist/main.cjs.js +47 -47
- package/dist/main.es.js +5842 -5842
- package/dist/models/prop-types/InputContainerProps.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/useGetApiData-B7vF0Kc7.cjs +1 -0
- package/dist/{useGetApiData-B6l1jJVd.js → useGetApiData-B8nOgQqn.js} +8 -8
- package/dist/{usePermissions-BrCHy7zQ.js → usePermissions-BBxDt93r.js} +1 -1
- package/dist/usePermissions-a_hFqfvK.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +20 -20
- package/dist/variables.scss +165 -165
- package/package.json +120 -120
- package/dist/Loading-ldurBCf0.cjs +0 -1
- package/dist/nivo-bar.es-bZrvOx-V.cjs +0 -279
- package/dist/useGetApiData-XcyHeE-W.cjs +0 -1
- package/dist/usePermissions-BejhAAEt.cjs +0 -1
package/dist/hooks.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-BK-LAMmI.cjs"),k=require("./usePermissions-a_hFqfvK.cjs"),x=require("./useGetApiData-B7vF0Kc7.cjs"),c=require("react"),T=require("./useLocalStorageState-BFc8Gc8H.cjs"),f=require("./useRenderDraggableInPortal-QPCaw-E_.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const L=r=>{let t="pending",u;const s=r.then(a=>{t="success",u=a},a=>{t="error",u=a});return()=>{switch(t){case"pending":throw s;case"success":return u;case"error":throw u;default:throw new Error("Unknown status")}}};function G(r,t){const u=e.useAxios({silent:!0,differentBaseUrl:t==null?void 0:t.customBaseUrl,customToken:t==null?void 0:t.customToken}),[s,a]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=u.get(r).then(o=>o.data);a(L(n))})()},[u,r]),s}const B=(r,t,u)=>{let s="pending",a;const i=r.then(n=>{s="success",a=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&u?(s="error-404",a=n):(s="error",a=n)});return()=>{switch(s){case"pending":throw i;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},l={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},E=(r,{loadOnInit:t=l.loadOnInit,enabled:u=l.enabled,silent:s=l.silent,nullStateBeforeLoad:a=l.nullStateBeforeLoad,nullStateOnFail:i=l.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=l)=>{const p=e.useAxios({silent:s,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:w}=c.useContext(e.LoadingContext),C=c.useRef(0),{isAuthenticated:P}=e.useAuth(),[b,g]=c.useState(null),m=c.useCallback(async(d,y)=>{if(!P()||u===!1)return;!s&&D(`loadData-${r}-${y}`),a&&g(null);const q=p.get(r,{signal:d}).then(A=>h?h(A.data):A.data).finally(()=>!s&&w(`loadData-${r}-${y}`));g(B(q,i??!1,S??!1))},[P,u,s,D,r,a,p,h,w,i,S]);return c.useEffect(()=>{if(t===!1)return;const d=new AbortController;return m(d.signal,++C.current),()=>{d.abort()}},[m,t]),{data:b,setData:g,reloadData:m}};exports.cancelToken=e.cancelToken;exports.useAuth=e.useAuth;exports.useAxios=e.useAxios;exports.useClickOutside=e.useClickOutside;exports.useClipboard=e.useClipboard;exports.useConfirm=e.useConfirm;exports.useFormControlType=e.useFormControlType;exports.useKeyPress=e.useKeyPress;exports.useNotifications=e.useNotifications;exports.usePrompt=e.usePrompt;exports.useWindowSize=e.useWindowSize;exports.useZodSchemaTypes=e.useZodSchemaTypes;exports.usePermissions=k.usePermissions;exports.useGetApiData=x.useGetApiData;exports.useLocalStorageState=T.useLocalStorageState;exports.useEmployeePhotoPath=f.useEmployeePhotoPath;exports.useRenderDraggableInPortal=f.useRenderDraggableInPortal;exports.useSearchQuery=f.useSearchQuery;exports.useSearchQueryState=f.useSearchQueryState;exports.useGetApiDataBound=E;exports.useGetDataBound=G;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { bz as
|
|
3
|
-
import { u as ae } from "./usePermissions-
|
|
4
|
-
import { u as re } from "./useGetApiData-
|
|
5
|
-
import { useState as x, useEffect as C, useContext as
|
|
1
|
+
import { aj as S, aW as P, aA as B } from "./ShortcutLinksContext-VwgvUlRx.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-VwgvUlRx.js";
|
|
3
|
+
import { u as ae } from "./usePermissions-BBxDt93r.js";
|
|
4
|
+
import { u as re } from "./useGetApiData-B8nOgQqn.js";
|
|
5
|
+
import { useState as x, useEffect as C, useContext as L, useRef as T, useCallback as U } from "react";
|
|
6
6
|
import { u as ue } from "./useLocalStorageState-Bt99kkCr.js";
|
|
7
|
-
import { c as
|
|
7
|
+
import { c as le, u as ie, a as fe, b as de } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
8
8
|
import "react-router-dom";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -31,7 +31,7 @@ const $ = (o) => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
function
|
|
34
|
+
function j(o, e) {
|
|
35
35
|
const a = S({
|
|
36
36
|
silent: !0,
|
|
37
37
|
differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
|
|
@@ -46,7 +46,7 @@ function Q(o, e) {
|
|
|
46
46
|
}
|
|
47
47
|
const E = (o, e, a) => {
|
|
48
48
|
let t = "pending", s;
|
|
49
|
-
const
|
|
49
|
+
const c = o.then((r) => {
|
|
50
50
|
t = "success", s = r;
|
|
51
51
|
}, (r) => {
|
|
52
52
|
const n = r == null ? void 0 : r.response;
|
|
@@ -55,7 +55,7 @@ const E = (o, e, a) => {
|
|
|
55
55
|
return () => {
|
|
56
56
|
switch (t) {
|
|
57
57
|
case "pending":
|
|
58
|
-
throw
|
|
58
|
+
throw c;
|
|
59
59
|
case "success":
|
|
60
60
|
return s;
|
|
61
61
|
case "error":
|
|
@@ -72,20 +72,20 @@ const E = (o, e, a) => {
|
|
|
72
72
|
enabled: !0,
|
|
73
73
|
nullStateBeforeLoad: !0,
|
|
74
74
|
nullStateOnFail: !1
|
|
75
|
-
},
|
|
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) => {
|
|
76
76
|
const p = S({
|
|
77
77
|
silent: t,
|
|
78
78
|
customToken: n,
|
|
79
79
|
differentBaseUrl: r,
|
|
80
80
|
noToastOnStatus: f ? [404] : void 0
|
|
81
|
-
}), { 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) => {
|
|
82
82
|
if (!w() || a === !1)
|
|
83
83
|
return;
|
|
84
|
-
!t && h(`loadData-${o}-${
|
|
84
|
+
!t && h(`loadData-${o}-${b}`), s && d(null);
|
|
85
85
|
const y = p.get(o, {
|
|
86
|
-
signal:
|
|
87
|
-
}).then((
|
|
88
|
-
d(E(y,
|
|
86
|
+
signal: l
|
|
87
|
+
}).then((D) => i ? i(D.data) : D.data).finally(() => !t && g(`loadData-${o}-${b}`));
|
|
88
|
+
d(E(y, c ?? !1, f ?? !1));
|
|
89
89
|
}, [
|
|
90
90
|
w,
|
|
91
91
|
a,
|
|
@@ -96,35 +96,35 @@ const E = (o, e, a) => {
|
|
|
96
96
|
p,
|
|
97
97
|
i,
|
|
98
98
|
g,
|
|
99
|
-
|
|
99
|
+
c,
|
|
100
100
|
f
|
|
101
101
|
]);
|
|
102
102
|
return C(() => {
|
|
103
103
|
if (e === !1)
|
|
104
104
|
return;
|
|
105
|
-
const
|
|
106
|
-
return m(
|
|
107
|
-
|
|
105
|
+
const l = new AbortController();
|
|
106
|
+
return m(l.signal, ++k.current), () => {
|
|
107
|
+
l.abort();
|
|
108
108
|
};
|
|
109
109
|
}, [m, e]), { data: A, setData: d, reloadData: m };
|
|
110
110
|
};
|
|
111
111
|
export {
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
Y as cancelToken,
|
|
113
|
+
B as useAuth,
|
|
114
114
|
S as useAxios,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
Z as useClickOutside,
|
|
116
|
+
q as useClipboard,
|
|
117
|
+
H as useConfirm,
|
|
118
|
+
le as useEmployeePhotoPath,
|
|
119
|
+
J as useFormControlType,
|
|
120
120
|
re as useGetApiData,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
K as useGetApiDataBound,
|
|
122
|
+
j as useGetDataBound,
|
|
123
|
+
M as useKeyPress,
|
|
124
124
|
ue as useLocalStorageState,
|
|
125
|
-
|
|
125
|
+
V as useNotifications,
|
|
126
126
|
ae as usePermissions,
|
|
127
|
-
|
|
127
|
+
_ as usePrompt,
|
|
128
128
|
ie as useRenderDraggableInPortal,
|
|
129
129
|
fe as useSearchQuery,
|
|
130
130
|
de as useSearchQueryState,
|
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-BK-LAMmI.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-a_hFqfvK.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,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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-VwgvUlRx.js";
|
|
2
|
+
import { b7 as fe, bp as ye } from "./ShortcutLinksContext-VwgvUlRx.js";
|
|
3
3
|
import { useState as I, useRef as L, useMemo as C, useEffect as A } from "react";
|
|
4
|
-
import { Link as
|
|
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
9
|
import "react-dom";
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
10
|
+
import { u as F } from "./usePermissions-BBxDt93r.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 = {
|
|
12
12
|
"side-menu-item": "_side-menu-item_1o1uo_1",
|
|
13
|
-
sideMenuItem:
|
|
14
|
-
disabled:
|
|
13
|
+
sideMenuItem: K,
|
|
14
|
+
disabled: O,
|
|
15
15
|
"nav-button": "_nav-button_1o1uo_10",
|
|
16
|
-
navButton:
|
|
16
|
+
navButton: z,
|
|
17
17
|
child: D,
|
|
18
18
|
text: U,
|
|
19
19
|
icon: W,
|
|
@@ -29,12 +29,12 @@ const z = "_side-menu-item_1o1uo_1", F = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
29
29
|
children: Y,
|
|
30
30
|
mobile: Z
|
|
31
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 }) => {
|
|
32
|
-
var y,
|
|
32
|
+
var y, g, M, N;
|
|
33
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
34
|
return w([u], () => a && c()), /* @__PURE__ */ e.jsxs("li", { ref: u, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: f }, {
|
|
35
35
|
[s.expanded]: l
|
|
36
36
|
}, { active: _ || j }, { open: a && n.children }, {
|
|
37
|
-
[s.disabled]: n.disabled || n.notPermitted || ((
|
|
37
|
+
[s.disabled]: n.disabled || n.notPermitted || ((g = n.children) == null ? void 0 : g.every((o) => o.notPermitted || o.disabled))
|
|
38
38
|
}, {
|
|
39
39
|
disabled: n.disabled || n.notPermitted || ((M = n.children) == null ? void 0 : M.every((o) => o.notPermitted || o.disabled))
|
|
40
40
|
}), onMouseEnter: () => v(!0), onMouseLeave: () => v(!1), children: [
|
|
@@ -49,13 +49,13 @@ const z = "_side-menu-item_1o1uo_1", F = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
49
49
|
l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
50
50
|
[s.collapsed]: a
|
|
51
51
|
}), children: /* @__PURE__ */ e.jsx(q, {}) })
|
|
52
|
-
] }) }) : /* @__PURE__ */ e.jsxs(
|
|
52
|
+
] }) }) : /* @__PURE__ */ e.jsxs(B, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
|
|
53
53
|
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
54
54
|
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
|
|
55
55
|
] }) }),
|
|
56
56
|
/* @__PURE__ */ e.jsx("div", { className: i("children-container", s.childrenContainer, {
|
|
57
57
|
[s.visible]: a
|
|
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(
|
|
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)) }) })
|
|
59
59
|
] });
|
|
60
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 = {
|
|
61
61
|
"side-menu": "_side-menu_1q9oh_1",
|
|
@@ -70,7 +70,7 @@ const z = "_side-menu-item_1o1uo_1", F = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
70
70
|
mobile: le,
|
|
71
71
|
divider: te
|
|
72
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 } =
|
|
73
|
+
const [h, j] = I(-1), { checkUserHasPermissions: u } = F(), y = C(() => c.map((t) => {
|
|
74
74
|
var r;
|
|
75
75
|
return {
|
|
76
76
|
...t,
|
|
@@ -81,7 +81,7 @@ const z = "_side-menu-item_1o1uo_1", F = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
81
81
|
disabled: t.disabled || x.disabled
|
|
82
82
|
}))
|
|
83
83
|
};
|
|
84
|
-
}), [c, u]),
|
|
84
|
+
}), [c, u]), g = C(() => p.map((t) => {
|
|
85
85
|
var r;
|
|
86
86
|
return {
|
|
87
87
|
...t,
|
|
@@ -116,7 +116,7 @@ const z = "_side-menu-item_1o1uo_1", F = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
116
116
|
/* @__PURE__ */ e.jsxs("ul", { className: m.sideMenuContent, children: [
|
|
117
117
|
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)),
|
|
118
118
|
/* @__PURE__ */ e.jsx("hr", { className: i("divider", m.divider) }),
|
|
119
|
-
|
|
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))
|
|
120
120
|
] })
|
|
121
121
|
] });
|
|
122
122
|
}, ae = "_top-bar_lnmq0_1", de = "_top-bar-brand_lnmq0_12", P = {
|
|
@@ -129,7 +129,7 @@ const z = "_side-menu-item_1o1uo_1", F = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
129
129
|
left: l ? `${l}px` : void 0
|
|
130
130
|
}, children: /* @__PURE__ */ e.jsxs("div", { className: "w-100 row g-0", children: [
|
|
131
131
|
/* @__PURE__ */ e.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
|
|
132
|
-
/* @__PURE__ */ e.jsx(
|
|
132
|
+
/* @__PURE__ */ e.jsx(B, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
|
|
133
133
|
a
|
|
134
134
|
] }),
|
|
135
135
|
/* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
|