react-luminus-components 1.3.268 → 1.4.1
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 +38 -38
- package/dist/{FormDisabledProvider-CV7PmyzE.js → FormDisabledProvider-BobE6FGX.js} +1 -1
- package/dist/FormDisabledProvider-Cj68wfmh.cjs +1 -0
- package/dist/contexts/confirm/ConfirmContext.d.ts +2 -6
- package/dist/contexts/delegation/DelegationContext.d.ts +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +314 -314
- package/dist/hooks/useConfirm/useConfirm.d.ts +2 -6
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +15 -15
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +19 -19
- package/dist/main.cjs.js +20 -20
- package/dist/main.es.js +1529 -1529
- package/dist/nivo-bar.es-B8f_eSBX.js +26489 -0
- package/dist/nivo-bar.es-DQVaIWpI.cjs +279 -0
- package/dist/useGetApiData-DMdP47nw.js +59 -0
- package/dist/useGetApiData-zgPS7F8Q.cjs +1 -0
- package/dist/useLocalStorageState-BFc8Gc8H.cjs +1 -0
- package/dist/{useRenderDraggableInPortal-DmwANWh2.cjs → useRenderDraggableInPortal-QPCaw-E_.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +20 -20
- package/package.json +1 -1
- package/dist/FormDisabledProvider-VKAEqT1f.cjs +0 -1
- package/dist/main.es-J04ddZWL.js +0 -128001
- package/dist/main.es-QKc0obgT.cjs +0 -1542
- package/dist/useGetApiData-CMAZ436V.js +0 -57
- package/dist/useGetApiData-lE3ggr95.cjs +0 -1
- package/dist/useLocalStorageState-DXUUXO06.cjs +0 -1
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
declare const useConfirm: () => {
|
|
2
|
-
confirm: (t: string,
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}>) => Promise<unknown>;
|
|
2
|
+
confirm: (t: string, sm?: boolean) => Promise<unknown>;
|
|
5
3
|
onConfirm: () => void;
|
|
6
4
|
onCancel: () => void;
|
|
7
5
|
show: boolean;
|
|
8
6
|
text: string;
|
|
9
|
-
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}> | null;
|
|
7
|
+
textSm: boolean | undefined;
|
|
12
8
|
};
|
|
13
9
|
export default useConfirm;
|
|
@@ -4,7 +4,7 @@ import { GenericAbortSignal } from 'axios';
|
|
|
4
4
|
declare const useGetApiData: <T>(uri: string, { loadOnInit, enabled, silent, nullStateBeforeLoad, nullStateOnFail, customApiUrl, customBearerToken, dataTransformer, }?: UseGetApiDataOptions<T>) => {
|
|
5
5
|
data: T | null;
|
|
6
6
|
setData: import('react').Dispatch<import('react').SetStateAction<T | null>>;
|
|
7
|
-
reloadData: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<
|
|
7
|
+
reloadData: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<T | null>;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
};
|
|
10
10
|
export default useGetApiData;
|
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("./nivo-bar.es-DQVaIWpI.cjs"),k=require("./useGetApiData-zgPS7F8Q.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 x=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 B(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(x(n))})()},[u,r]),s}const G=(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},L=(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:y}=e.useAuth(),[b,g]=c.useState(null),m=c.useCallback(async(d,A)=>{if(!y()||u===!1)return;!s&&D(`loadData-${r}-${A}`),a&&g(null);const q=p.get(r,{signal:d}).then(P=>h?h(P.data):P.data).finally(()=>!s&&w(`loadData-${r}-${A}`));g(G(q,i??!1,S??!1))},[y,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.usePermissions=e.usePermissions;exports.usePrompt=e.usePrompt;exports.useWindowSize=e.useWindowSize;exports.useZodSchemaTypes=e.useZodSchemaTypes;exports.useGetApiData=k.useGetApiData;exports.useLocalStorageState=T.useLocalStorageState;exports.useEmployeePhotoPath=f.useEmployeePhotoPath;exports.useRenderDraggableInPortal=f.useRenderDraggableInPortal;exports.useSearchQuery=f.useSearchQuery;exports.useSearchQueryState=f.useSearchQueryState;exports.useGetApiDataBound=L;exports.useGetDataBound=B;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { aj as S, al as A, b2 as
|
|
2
|
-
import {
|
|
3
|
-
import { u as ne } from "./useGetApiData-
|
|
4
|
-
import { useState as x, useEffect as C, useContext as
|
|
1
|
+
import { aj as S, al as A, b2 as P } from "./nivo-bar.es-B8f_eSBX.js";
|
|
2
|
+
import { bJ as V, aL as Z, bL as q, ai as H, bK as M, aV as X, am as Y, bl as _, ah as ee, aC as te, bn as se } from "./nivo-bar.es-B8f_eSBX.js";
|
|
3
|
+
import { u as ne } from "./useGetApiData-DMdP47nw.js";
|
|
4
|
+
import { useState as x, useEffect as C, useContext as T, useRef as U, useCallback as $ } from "react";
|
|
5
5
|
import { u as re } from "./useLocalStorageState-Bt99kkCr.js";
|
|
6
6
|
import { c as le, u as ce, a as ie, b as fe } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
7
7
|
import "react-router-dom";
|
|
@@ -10,7 +10,7 @@ import "react-hook-form";
|
|
|
10
10
|
import "react-flexmonster";
|
|
11
11
|
import "@azure/msal-browser";
|
|
12
12
|
import "@azure/msal-react";
|
|
13
|
-
const
|
|
13
|
+
const B = (n) => {
|
|
14
14
|
let e = "pending", a;
|
|
15
15
|
const t = n.then((s) => {
|
|
16
16
|
e = "success", a = s;
|
|
@@ -39,11 +39,11 @@ function j(n, e) {
|
|
|
39
39
|
return C(() => {
|
|
40
40
|
(async () => {
|
|
41
41
|
const o = a.get(n).then((r) => r.data);
|
|
42
|
-
s(
|
|
42
|
+
s(B(o));
|
|
43
43
|
})();
|
|
44
44
|
}, [a, n]), t;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const E = (n, e, a) => {
|
|
47
47
|
let t = "pending", s;
|
|
48
48
|
const l = n.then((o) => {
|
|
49
49
|
t = "success", s = o;
|
|
@@ -71,20 +71,20 @@ const B = (n, e, a) => {
|
|
|
71
71
|
enabled: !0,
|
|
72
72
|
nullStateBeforeLoad: !0,
|
|
73
73
|
nullStateOnFail: !1
|
|
74
|
-
},
|
|
74
|
+
}, z = (n, { loadOnInit: e = u.loadOnInit, enabled: a = u.enabled, silent: t = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: l = u.nullStateOnFail, customApiUrl: o, customBearerToken: r, dataTransformer: i, errorBoundaryOn404: f } = u) => {
|
|
75
75
|
const p = S({
|
|
76
76
|
silent: t,
|
|
77
77
|
customToken: r,
|
|
78
78
|
differentBaseUrl: o,
|
|
79
79
|
noToastOnStatus: f ? [404] : void 0
|
|
80
|
-
}), { startLoading: h, stopLoading: g } =
|
|
80
|
+
}), { startLoading: h, stopLoading: g } = T(A), k = U(0), { isAuthenticated: w } = P(), [L, d] = x(null), m = $(async (c, b) => {
|
|
81
81
|
if (!w() || a === !1)
|
|
82
82
|
return;
|
|
83
83
|
!t && h(`loadData-${n}-${b}`), s && d(null);
|
|
84
84
|
const y = p.get(n, {
|
|
85
85
|
signal: c
|
|
86
86
|
}).then((D) => i ? i(D.data) : D.data).finally(() => !t && g(`loadData-${n}-${b}`));
|
|
87
|
-
d(
|
|
87
|
+
d(E(y, l ?? !1, f ?? !1));
|
|
88
88
|
}, [
|
|
89
89
|
w,
|
|
90
90
|
a,
|
|
@@ -105,19 +105,19 @@ const B = (n, e, a) => {
|
|
|
105
105
|
return m(c.signal, ++k.current), () => {
|
|
106
106
|
c.abort();
|
|
107
107
|
};
|
|
108
|
-
}, [m, e]), { data:
|
|
108
|
+
}, [m, e]), { data: L, setData: d, reloadData: m };
|
|
109
109
|
};
|
|
110
110
|
export {
|
|
111
111
|
V as cancelToken,
|
|
112
|
-
|
|
112
|
+
P as useAuth,
|
|
113
113
|
S as useAxios,
|
|
114
114
|
Z as useClickOutside,
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
q as useClipboard,
|
|
116
|
+
H as useConfirm,
|
|
117
117
|
le as useEmployeePhotoPath,
|
|
118
118
|
M as useFormControlType,
|
|
119
119
|
ne as useGetApiData,
|
|
120
|
-
|
|
120
|
+
z as useGetApiDataBound,
|
|
121
121
|
j as useGetDataBound,
|
|
122
122
|
X as useKeyPress,
|
|
123
123
|
re as useLocalStorageState,
|
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("./nivo-bar.es-DQVaIWpI.cjs"),x=require("react"),g=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const k="_side-menu-item_o72rm_1",P="_disabled_o72rm_6",f="_hidden_o72rm_10",w="_nav-button_o72rm_13",I="_child_o72rm_21",S="_text_o72rm_26",L="_icon_o72rm_36",T="_collapse-icon_o72rm_42",O="_collapsed_o72rm_52",$="_collapse-icon-mini_o72rm_55",A="_expanded_o72rm_86",K="_children-container_o72rm_92",D="_visible_o72rm_100",F="_children_o72rm_92",z="_mobile_o72rm_112",n={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:k,disabled:P,hidden:f,"nav-button":"_nav-button_o72rm_13",navButton:w,child:I,text:S,icon:L,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:T,collapsed:O,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:$,expanded:A,"children-container":"_children-container_o72rm_92",childrenContainer:K,visible:D,children:F,mobile:z},U=({item:s,menuExpanded:i,useTooltips:l,children:c})=>s.tooltip&&!i&&l?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,B=({item:s,menuExpanded:i,collapsed:l,onCollapse:c,currentPath:_,useHover:r,useTooltips:p,isMobile:E,disableMode:a})=>{var q,y,v,N;const[M,b]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((q=s.children)==null?void 0:q.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>l&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:E},{[n.expanded]:i},{active:M||R},{open:l&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((y=s.children)==null?void 0:y.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e.jsxRuntimeExports.jsx(U,{item:s,menuExpanded:i,useTooltips:p,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",n.navButton),onClick:()=>{c()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),!r&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",n.collapseIcon,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(g.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",n.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",n.childrenContainer,{[n.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(N=s.children)==null?void 0:N.map(o=>e.jsxRuntimeExports.jsx(g.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:e.classNames("nav-link child rounded",n.navButton,n.child,{[a==="disable"?n.disabled:n.hidden]:o.disabled||o.notPermitted},{[a==="disable"?"disabled":"hidden"]:o.disabled||o.notPermitted}),onClick:c,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},W="_side-menu_1q9oh_1",G="_sidebar-header_1q9oh_15",J="_side-menu-content_1q9oh_22",Q="_expand_1q9oh_27",V="_only-logo_1q9oh_31",X="_mobile_1q9oh_34",Y="_divider_1q9oh_49",u={"side-menu":"_side-menu_1q9oh_1",sideMenu:W,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:G,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:J,expand:Q,"only-logo":"_only-logo_1q9oh_31",onlyLogo:V,mobile:X,divider:Y},Z=({headerItem:s,searchItem:i,shortcutsItem:l,mainItems:c,secondaryItems:_,expanded:r,setExpanded:p,currentPath:E,useHover:a,useTooltips:M,disableMode:b="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=e.usePermissions(),q=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any"),disabled:t.disabled||h.disabled}))}}),[c,m]),y=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any")}))}}),[_,m]),v=t=>{R(t===j?-1:t)};x.useEffect(()=>{r||R(-1)},[r]);const N=x.useRef(null);e.useClickOutside([N],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:r},{expand:r}),onMouseEnter:()=>a&&p(!0),onMouseLeave:()=>a&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:a}),role:a?void 0:"button",onClick:a?void 0:()=>p(!r),children:a?s:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),r&&(i||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&r?l:null,i&&r?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:u.sideMenuContent,children:[q.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),y.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title))]})]})},H="_top-bar_lnmq0_1",ee="_top-bar-brand_lnmq0_12",C={"top-bar":"_top-bar_lnmq0_1",topBar:H,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ee},se=({appName:s,leftOffset:i,leftContent:l,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",C.topBar),style:{width:i?`calc(100% - ${i}px)`:void 0,left:i?`${i}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(g.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:c??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=Z;exports.TopBar=se;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { aL as I, j as e, c as i, $ as
|
|
2
|
-
import { aq as fe,
|
|
1
|
+
import { aL as I, j as e, c as i, $ as C, aA as $, bl as R, aC as S, bx as A, by as z } from "./nivo-bar.es-B8f_eSBX.js";
|
|
2
|
+
import { aq as fe, bz as ge } from "./nivo-bar.es-B8f_eSBX.js";
|
|
3
3
|
import { useState as L, useRef as T, useMemo as k, useEffect as F } 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
|
-
const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6",
|
|
10
|
+
const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm_10", U = "_nav-button_o72rm_13", W = "_child_o72rm_21", E = "_text_o72rm_26", G = "_icon_o72rm_36", J = "_collapse-icon_o72rm_42", Q = "_collapsed_o72rm_52", V = "_collapse-icon-mini_o72rm_55", X = "_expanded_o72rm_86", Y = "_children-container_o72rm_92", Z = "_visible_o72rm_100", H = "_children_o72rm_92", ee = "_mobile_o72rm_112", s = {
|
|
11
11
|
"side-menu-item": "_side-menu-item_o72rm_1",
|
|
12
12
|
sideMenuItem: K,
|
|
13
13
|
disabled: O,
|
|
14
|
-
hidden:
|
|
14
|
+
hidden: D,
|
|
15
15
|
"nav-button": "_nav-button_o72rm_13",
|
|
16
16
|
navButton: U,
|
|
17
17
|
child: W,
|
|
@@ -29,12 +29,12 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
29
29
|
children: H,
|
|
30
30
|
mobile: ee
|
|
31
31
|
}, ne = ({ item: n, menuExpanded: l, useTooltips: a, children: c }) => n.tooltip && !l && a ? /* @__PURE__ */ e.jsx($, { text: n.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ e.jsx("div", { children: c }) }) : c, P = ({ item: n, menuExpanded: l, collapsed: a, onCollapse: c, currentPath: h, useHover: d, useTooltips: p, isMobile: y, disableMode: r }) => {
|
|
32
|
-
var
|
|
33
|
-
const [f, v] = L(!1), [b] = h.split("?"), j = n.linkTo === b || ((
|
|
32
|
+
var g, q, N, M;
|
|
33
|
+
const [f, v] = L(!1), [b] = h.split("?"), j = n.linkTo === b || ((g = n.children) == null ? void 0 : g.some((o) => o.linkTo === b)), m = T(null);
|
|
34
34
|
return I([m], () => a && c()), /* @__PURE__ */ e.jsxs("li", { ref: m, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: y }, {
|
|
35
35
|
[s.expanded]: l
|
|
36
36
|
}, { active: f || j }, { open: a && n.children }, {
|
|
37
|
-
[r === "disable" ? s.disabled : s.hidden]: n.disabled || n.notPermitted || ((
|
|
37
|
+
[r === "disable" ? s.disabled : s.hidden]: n.disabled || n.notPermitted || ((q = n.children) == null ? void 0 : q.every((o) => o.notPermitted || o.disabled))
|
|
38
38
|
}, {
|
|
39
39
|
[r === "disable" ? "disabled" : "hidden"]: n.disabled || n.notPermitted || ((N = n.children) == null ? void 0 : N.every((o) => o.notPermitted || o.disabled))
|
|
40
40
|
}), onMouseEnter: () => v(!0), onMouseLeave: () => v(!1), children: [
|
|
@@ -44,18 +44,18 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
44
44
|
/* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
45
45
|
!d && !l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
|
|
46
46
|
[s.collapsed]: a
|
|
47
|
-
}), children: /* @__PURE__ */ e.jsx(
|
|
47
|
+
}), children: /* @__PURE__ */ e.jsx(C, {}) }),
|
|
48
48
|
l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title }),
|
|
49
49
|
l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
50
50
|
[s.collapsed]: a
|
|
51
|
-
}), children: /* @__PURE__ */ e.jsx(
|
|
52
|
-
] }) }) : /* @__PURE__ */ e.jsxs(
|
|
51
|
+
}), children: /* @__PURE__ */ e.jsx(C, {}) })
|
|
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: (M = n.children) == null ? void 0 : M.map((o) => /* @__PURE__ */ e.jsx(
|
|
58
|
+
}), children: /* @__PURE__ */ e.jsx("div", { className: i("shadow rounded children", s.children), children: (M = n.children) == null ? void 0 : M.map((o) => /* @__PURE__ */ e.jsx(B, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, {
|
|
59
59
|
[r === "disable" ? s.disabled : s.hidden]: o.disabled || o.notPermitted
|
|
60
60
|
}, {
|
|
61
61
|
[r === "disable" ? "disabled" : "hidden"]: o.disabled || o.notPermitted
|
|
@@ -74,7 +74,7 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
74
74
|
mobile: ae,
|
|
75
75
|
divider: de
|
|
76
76
|
}, je = ({ headerItem: n, searchItem: l, shortcutsItem: a, mainItems: c, secondaryItems: h, expanded: d, setExpanded: p, currentPath: y, useHover: r, useTooltips: f, disableMode: v = "disable" }) => {
|
|
77
|
-
const [b, j] = L(-1), { checkUserHasPermissions: m } = R(),
|
|
77
|
+
const [b, j] = L(-1), { checkUserHasPermissions: m } = R(), g = k(() => c.map((t) => {
|
|
78
78
|
var _;
|
|
79
79
|
return {
|
|
80
80
|
...t,
|
|
@@ -85,7 +85,7 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
85
85
|
disabled: t.disabled || x.disabled
|
|
86
86
|
}))
|
|
87
87
|
};
|
|
88
|
-
}), [c, m]),
|
|
88
|
+
}), [c, m]), q = k(() => h.map((t) => {
|
|
89
89
|
var _;
|
|
90
90
|
return {
|
|
91
91
|
...t,
|
|
@@ -112,15 +112,15 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
112
112
|
}), role: r ? void 0 : "button", onClick: r ? void 0 : () => p(!d), children: r ? n : d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
113
113
|
/* @__PURE__ */ e.jsx(A, {}),
|
|
114
114
|
n
|
|
115
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
115
|
+
] }) : /* @__PURE__ */ e.jsx(z, {}) }),
|
|
116
116
|
d && (l || a) ? /* @__PURE__ */ e.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
|
|
117
117
|
a && d ? a : null,
|
|
118
118
|
l && d ? l : null
|
|
119
119
|
] }) : null,
|
|
120
120
|
/* @__PURE__ */ e.jsxs("ul", { className: u.sideMenuContent, children: [
|
|
121
|
-
|
|
121
|
+
g.map((t, _) => /* @__PURE__ */ e.jsx(P, { item: t, menuExpanded: d, collapsed: _ === b, onCollapse: () => N(_), currentPath: y, useHover: r, useTooltips: f, isMobile: o, disableMode: v }, t.title)),
|
|
122
122
|
/* @__PURE__ */ e.jsx("hr", { className: i("divider", u.divider) }),
|
|
123
|
-
|
|
123
|
+
q.map((t, _) => /* @__PURE__ */ e.jsx(P, { item: t, menuExpanded: d, collapsed: _ === b, onCollapse: () => N(_), currentPath: y, useHover: r, useTooltips: f, isMobile: o, disableMode: v }, t.title))
|
|
124
124
|
] })
|
|
125
125
|
] });
|
|
126
126
|
}, re = "_top-bar_lnmq0_1", ce = "_top-bar-brand_lnmq0_12", w = {
|
|
@@ -133,7 +133,7 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
133
133
|
left: l ? `${l}px` : void 0
|
|
134
134
|
}, children: /* @__PURE__ */ e.jsxs("div", { className: "w-100 row g-0", children: [
|
|
135
135
|
/* @__PURE__ */ e.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
|
|
136
|
-
/* @__PURE__ */ e.jsx(
|
|
136
|
+
/* @__PURE__ */ e.jsx(B, { to: "/", className: i("luminus-top-bar-brand", w.topBarBrand), children: n }),
|
|
137
137
|
a
|
|
138
138
|
] }),
|
|
139
139
|
/* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
|
|
@@ -141,7 +141,7 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", z = "_hidden_o72rm
|
|
|
141
141
|
] }) });
|
|
142
142
|
export {
|
|
143
143
|
fe as PageContainer,
|
|
144
|
-
|
|
144
|
+
ge as SideContentBar,
|
|
145
145
|
je as SideMenu,
|
|
146
146
|
Ne as TopBar
|
|
147
147
|
};
|