react-luminus-components 1.4.54 → 1.4.56

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-BrUuHr_r.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-DTVPEbpS.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 P="_side-menu-item_o72rm_1",f="_disabled_o72rm_6",w="_hidden_o72rm_10",T="_nav-button_o72rm_13",q="_child_o72rm_21",S="_text_o72rm_26",I="_icon_o72rm_36",L="_collapse-icon_o72rm_42",O="_collapsed_o72rm_52",A="_collapse-icon-mini_o72rm_55",$="_expanded_o72rm_86",D="_children-container_o72rm_92",K="_visible_o72rm_100",F="_children_o72rm_92",z="_mobile_o72rm_112",n={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:P,disabled:f,hidden:w,"nav-button":"_nav-button_o72rm_13",navButton:T,child:q,text:S,icon:I,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:L,collapsed:O,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:A,expanded:$,"children-container":"_children-container_o72rm_92",childrenContainer:D,visible:K,children:F,mobile:z},G=({item:s,menuExpanded:i,useTooltips:r,children:c})=>s.tooltip&&!i&&r?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,C=({item:s,menuExpanded:i,collapsed:r,onCollapse:c,currentPath:_,useHover:l,useTooltips:p,isMobile:k,disableMode:a})=>{var N,v,E,y;const[M,h]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((N=s.children)==null?void 0:N.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>r&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:k},{[n.expanded]:i},{active:M||R},{open:r&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((E=s.children)==null?void 0:E.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[e.jsxRuntimeExports.jsx(G,{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}),!l&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:r}),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]:r}),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]:r}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(y=s.children)==null?void 0:y.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))})})]})},H="_side-menu_12rky_1",U="_sidebar-header_12rky_15",W="_side-menu-content_12rky_22",J="_no-top-margin_12rky_28",Q="_expand_12rky_34",V="_only-logo_12rky_38",X="_mobile_12rky_41",Y="_divider_12rky_56",u={"side-menu":"_side-menu_12rky_1",sideMenu:H,"sidebar-header":"_sidebar-header_12rky_15",sidebarHeader:U,"side-menu-content":"_side-menu-content_12rky_22",sideMenuContent:W,"no-top-margin":"_no-top-margin_12rky_28",noTopMargin:J,expand:Q,"only-logo":"_only-logo_12rky_38",onlyLogo:V,mobile:X,divider:Y},Z=14,ee=({headerItem:s,searchItem:i,shortcutsItem:r,mainItems:c,secondaryItems:_,expanded:l,setExpanded:p,currentPath:k,useHover:a,useTooltips:M,disableMode:h="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=e.usePermissions(),N=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(b=>({...b,notPermitted:!m(b.permissions??[],"any"),disabled:t.disabled||b.disabled}))}}),[c,m]),v=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(b=>({...b,notPermitted:!m(b.permissions??[],"any")}))}}),[_,m]),E=t=>{R(t===j?-1:t)};x.useEffect(()=>{l||R(-1)},[l]);const y=x.useRef(null);e.useClickOutside([y],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:y,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:l},{expand:l}),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(!l),children:a?s:l?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),l&&(i||r)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[r&&l?r:null,i&&l?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:e.classNames(u.sideMenuContent,{[u.noTopMargin]:[...N,...v].length>Z}),children:[N.map((t,d)=>e.jsxRuntimeExports.jsx(C,{item:t,menuExpanded:l,collapsed:d===j,onCollapse:()=>E(d),currentPath:k,useHover:a,useTooltips:M,isMobile:o,disableMode:h},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),v.map((t,d)=>e.jsxRuntimeExports.jsx(C,{item:t,menuExpanded:l,collapsed:d===j,onCollapse:()=>E(d),currentPath:k,useHover:a,useTooltips:M,isMobile:o,disableMode:h},t.title))]})]})},se="_top-bar_lnmq0_1",ne="_top-bar-brand_lnmq0_12",B={"top-bar":"_top-bar_lnmq0_1",topBar:se,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ne},oe=({appName:s,leftOffset:i,leftContent:r,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",B.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",B.topBarBrand),children:s}),r]}),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=ee;exports.TopBar=oe;
package/dist/layout.es.js CHANGED
@@ -1,80 +1,82 @@
1
- import { aM as I, j as e, c as i, Y as C, aA as A, bp as R, aC as S, bz as $, bA as z } from "./nivo-bar.es-1IiaCqKm.js";
2
- import { aq as fe, bB as Be } from "./nivo-bar.es-1IiaCqKm.js";
3
- import { useState as L, useRef as T, useMemo as k, useEffect as F } from "react";
4
- import { Link as q } from "react-router-dom";
1
+ import { bt as T, j as n, c as i, Y as C, ao as S, ba as A, a2 as $, bz as q, bA as O } from "./ShortcutLinksContext-D-3_1QWF.js";
2
+ import { b8 as Bn, bB as Cn } from "./ShortcutLinksContext-D-3_1QWF.js";
3
+ import { useState as L, useRef as R, useMemo as P, useEffect as z } 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
9
  import "react-dom";
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", Y = "_text_o72rm_26", E = "_icon_o72rm_36", G = "_collapse-icon_o72rm_42", J = "_collapsed_o72rm_52", Q = "_collapse-icon-mini_o72rm_55", V = "_expanded_o72rm_86", X = "_children-container_o72rm_92", Z = "_visible_o72rm_100", H = "_children_o72rm_92", ee = "_mobile_o72rm_112", s = {
10
+ const D = "_side-menu-item_o72rm_1", F = "_disabled_o72rm_6", K = "_hidden_o72rm_10", E = "_nav-button_o72rm_13", G = "_child_o72rm_21", H = "_text_o72rm_26", U = "_icon_o72rm_36", W = "_collapse-icon_o72rm_42", Y = "_collapsed_o72rm_52", J = "_collapse-icon-mini_o72rm_55", Q = "_expanded_o72rm_86", V = "_children-container_o72rm_92", X = "_visible_o72rm_100", Z = "_children_o72rm_92", nn = "_mobile_o72rm_112", s = {
11
11
  "side-menu-item": "_side-menu-item_o72rm_1",
12
- sideMenuItem: K,
13
- disabled: O,
14
- hidden: D,
12
+ sideMenuItem: D,
13
+ disabled: F,
14
+ hidden: K,
15
15
  "nav-button": "_nav-button_o72rm_13",
16
- navButton: U,
17
- child: W,
18
- text: Y,
19
- icon: E,
16
+ navButton: E,
17
+ child: G,
18
+ text: H,
19
+ icon: U,
20
20
  "collapse-icon": "_collapse-icon_o72rm_42",
21
- collapseIcon: G,
22
- collapsed: J,
21
+ collapseIcon: W,
22
+ collapsed: Y,
23
23
  "collapse-icon-mini": "_collapse-icon-mini_o72rm_55",
24
- collapseIconMini: Q,
25
- expanded: V,
24
+ collapseIconMini: J,
25
+ expanded: Q,
26
26
  "children-container": "_children-container_o72rm_92",
27
- childrenContainer: X,
28
- visible: Z,
29
- children: H,
30
- mobile: ee
31
- }, ne = ({ item: n, menuExpanded: l, useTooltips: a, children: c }) => n.tooltip && !l && a ? /* @__PURE__ */ e.jsx(A, { 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: p, useHover: d, useTooltips: h, isMobile: y, disableMode: r }) => {
32
- var B, g, N, M;
33
- const [f, v] = L(!1), [b] = p.split("?"), j = n.linkTo === b || ((B = n.children) == null ? void 0 : B.some((o) => o.linkTo === b)), m = T(null);
34
- return I([m], () => a && c()), /* @__PURE__ */ e.jsxs("li", { ref: m, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: y }, {
27
+ childrenContainer: V,
28
+ visible: X,
29
+ children: Z,
30
+ mobile: nn
31
+ }, en = ({ item: e, menuExpanded: l, useTooltips: r, children: c }) => e.tooltip && !l && r ? /* @__PURE__ */ n.jsx(S, { text: e.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ n.jsx("div", { children: c }) }) : c, w = ({ item: e, menuExpanded: l, collapsed: r, onCollapse: c, currentPath: u, useHover: a, useTooltips: b, isMobile: g, disableMode: d }) => {
32
+ var y, k, N, M;
33
+ const [f, v] = L(!1), [h] = u.split("?"), j = e.linkTo === h || ((y = e.children) == null ? void 0 : y.some((o) => o.linkTo === h)), m = R(null);
34
+ return T([m], () => r && c()), /* @__PURE__ */ n.jsxs("li", { ref: m, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: g }, {
35
35
  [s.expanded]: l
36
- }, { active: f || j }, { open: a && n.children }, {
37
- [r === "disable" ? s.disabled : s.hidden]: n.disabled || n.notPermitted || ((g = n.children) == null ? void 0 : g.every((o) => o.notPermitted || o.disabled))
36
+ }, { active: f || j }, { open: r && e.children }, {
37
+ [d === "disable" ? s.disabled : s.hidden]: e.disabled || e.notPermitted || ((k = e.children) == null ? void 0 : k.every((o) => o.notPermitted || o.disabled))
38
38
  }, {
39
- [r === "disable" ? "disabled" : "hidden"]: n.disabled || n.notPermitted || ((N = n.children) == null ? void 0 : N.every((o) => o.notPermitted || o.disabled))
39
+ [d === "disable" ? "disabled" : "hidden"]: e.disabled || e.notPermitted || ((N = e.children) == null ? void 0 : N.every((o) => o.notPermitted || o.disabled))
40
40
  }), onMouseEnter: () => v(!0), onMouseLeave: () => v(!1), children: [
41
- /* @__PURE__ */ e.jsx(ne, { item: n, menuExpanded: l, useTooltips: h, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: i("nav-link", s.navButton), onClick: () => {
41
+ /* @__PURE__ */ n.jsx(en, { item: e, menuExpanded: l, useTooltips: b, children: e.children ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("button", { type: "button", className: i("nav-link", s.navButton), onClick: () => {
42
42
  c();
43
43
  }, children: [
44
- /* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
45
- !d && !l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
46
- [s.collapsed]: a
47
- }), children: /* @__PURE__ */ e.jsx(C, {}) }),
48
- l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title }),
49
- l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
50
- [s.collapsed]: a
51
- }), children: /* @__PURE__ */ e.jsx(C, {}) })
52
- ] }) }) : /* @__PURE__ */ e.jsxs(q, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
53
- /* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
54
- l && /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
44
+ /* @__PURE__ */ n.jsx("div", { className: i("icon", s.icon), children: e.icon }),
45
+ !a && !l && /* @__PURE__ */ n.jsx("div", { className: i("collapse-icon-mini rounded", s.collapseIconMini, {
46
+ [s.collapsed]: r
47
+ }), children: /* @__PURE__ */ n.jsx(C, {}) }),
48
+ l && /* @__PURE__ */ n.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title }),
49
+ l && /* @__PURE__ */ n.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
50
+ [s.collapsed]: r
51
+ }), children: /* @__PURE__ */ n.jsx(C, {}) })
52
+ ] }) }) : /* @__PURE__ */ n.jsxs(B, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
53
+ /* @__PURE__ */ n.jsx("div", { className: i("icon", s.icon), children: e.icon }),
54
+ l && /* @__PURE__ */ n.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title })
55
55
  ] }) }),
56
- /* @__PURE__ */ e.jsx("div", { className: i("children-container", s.childrenContainer, {
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(q, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, {
59
- [r === "disable" ? s.disabled : s.hidden]: o.disabled || o.notPermitted
56
+ /* @__PURE__ */ n.jsx("div", { className: i("children-container", s.childrenContainer, {
57
+ [s.visible]: r
58
+ }), children: /* @__PURE__ */ n.jsx("div", { className: i("shadow rounded children", s.children), children: (M = e.children) == null ? void 0 : M.map((o) => /* @__PURE__ */ n.jsx(B, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, {
59
+ [d === "disable" ? s.disabled : s.hidden]: o.disabled || o.notPermitted
60
60
  }, {
61
- [r === "disable" ? "disabled" : "hidden"]: o.disabled || o.notPermitted
62
- }), onClick: c, children: /* @__PURE__ */ e.jsx("div", { className: i("text", s.text, "text-nowrap"), children: o.title }) }, o.linkTo)) }) })
61
+ [d === "disable" ? "disabled" : "hidden"]: o.disabled || o.notPermitted
62
+ }), onClick: c, children: /* @__PURE__ */ n.jsx("div", { className: i("text", s.text, "text-nowrap"), children: o.title }) }, o.linkTo)) }) })
63
63
  ] });
64
- }, se = "_side-menu_1q9oh_1", oe = "_sidebar-header_1q9oh_15", ie = "_side-menu-content_1q9oh_22", le = "_expand_1q9oh_27", te = "_only-logo_1q9oh_31", ae = "_mobile_1q9oh_34", de = "_divider_1q9oh_49", u = {
65
- "side-menu": "_side-menu_1q9oh_1",
66
- sideMenu: se,
67
- "sidebar-header": "_sidebar-header_1q9oh_15",
68
- sidebarHeader: oe,
69
- "side-menu-content": "_side-menu-content_1q9oh_22",
70
- sideMenuContent: ie,
71
- expand: le,
72
- "only-logo": "_only-logo_1q9oh_31",
73
- onlyLogo: te,
74
- mobile: ae,
75
- divider: de
76
- }, je = ({ headerItem: n, searchItem: l, shortcutsItem: a, mainItems: c, secondaryItems: p, expanded: d, setExpanded: h, currentPath: y, useHover: r, useTooltips: f, disableMode: v = "disable" }) => {
77
- const [b, j] = L(-1), { checkUserHasPermissions: m } = R(), B = k(() => c.map((t) => {
64
+ }, sn = "_side-menu_12rky_1", on = "_sidebar-header_12rky_15", ln = "_side-menu-content_12rky_22", tn = "_no-top-margin_12rky_28", rn = "_expand_12rky_34", an = "_only-logo_12rky_38", dn = "_mobile_12rky_41", cn = "_divider_12rky_56", p = {
65
+ "side-menu": "_side-menu_12rky_1",
66
+ sideMenu: sn,
67
+ "sidebar-header": "_sidebar-header_12rky_15",
68
+ sidebarHeader: on,
69
+ "side-menu-content": "_side-menu-content_12rky_22",
70
+ sideMenuContent: ln,
71
+ "no-top-margin": "_no-top-margin_12rky_28",
72
+ noTopMargin: tn,
73
+ expand: rn,
74
+ "only-logo": "_only-logo_12rky_38",
75
+ onlyLogo: an,
76
+ mobile: dn,
77
+ divider: cn
78
+ }, _n = 14, Nn = ({ headerItem: e, searchItem: l, shortcutsItem: r, mainItems: c, secondaryItems: u, expanded: a, setExpanded: b, currentPath: g, useHover: d, useTooltips: f, disableMode: v = "disable" }) => {
79
+ const [h, j] = L(-1), { checkUserHasPermissions: m } = A(), y = P(() => c.map((t) => {
78
80
  var _;
79
81
  return {
80
82
  ...t,
@@ -85,7 +87,7 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
85
87
  disabled: t.disabled || x.disabled
86
88
  }))
87
89
  };
88
- }), [c, m]), g = k(() => p.map((t) => {
90
+ }), [c, m]), k = P(() => u.map((t) => {
89
91
  var _;
90
92
  return {
91
93
  ...t,
@@ -95,53 +97,55 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
95
97
  notPermitted: !m(x.permissions ?? [], "any")
96
98
  }))
97
99
  };
98
- }), [p, m]), N = (t) => {
99
- j(t === b ? -1 : t);
100
+ }), [u, m]), N = (t) => {
101
+ j(t === h ? -1 : t);
100
102
  };
101
- F(() => {
102
- d || j(-1);
103
- }, [d]);
104
- const M = T(null);
105
- I([M], () => h(!1));
106
- const { isMobile: o } = S();
107
- return /* @__PURE__ */ e.jsxs("section", { ref: M, className: i("luminus-side-menu shadow", u.sideMenu, { [u.mobile]: o }, {
108
- [u.expand]: d
109
- }, { expand: d }), onMouseEnter: () => r && h(!0), onMouseLeave: () => r && h(!1), children: [
110
- /* @__PURE__ */ e.jsx("div", { className: i("sidebar-header", u.sidebarHeader, {
111
- [u.onlyLogo]: r
112
- }), role: r ? void 0 : "button", onClick: r ? void 0 : () => h(!d), children: r ? n : d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
113
- /* @__PURE__ */ e.jsx($, {}),
114
- n
115
- ] }) : /* @__PURE__ */ e.jsx(z, {}) }),
116
- d && (l || a) ? /* @__PURE__ */ e.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
117
- a && d ? a : null,
118
- l && d ? l : null
103
+ z(() => {
104
+ a || j(-1);
105
+ }, [a]);
106
+ const M = R(null);
107
+ T([M], () => b(!1));
108
+ const { isMobile: o } = $();
109
+ return /* @__PURE__ */ n.jsxs("section", { ref: M, className: i("luminus-side-menu shadow", p.sideMenu, { [p.mobile]: o }, {
110
+ [p.expand]: a
111
+ }, { expand: a }), onMouseEnter: () => d && b(!0), onMouseLeave: () => d && b(!1), children: [
112
+ /* @__PURE__ */ n.jsx("div", { className: i("sidebar-header", p.sidebarHeader, {
113
+ [p.onlyLogo]: d
114
+ }), role: d ? void 0 : "button", onClick: d ? void 0 : () => b(!a), children: d ? e : a ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
115
+ /* @__PURE__ */ n.jsx(q, {}),
116
+ e
117
+ ] }) : /* @__PURE__ */ n.jsx(O, {}) }),
118
+ a && (l || r) ? /* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
119
+ r && a ? r : null,
120
+ l && a ? l : null
119
121
  ] }) : null,
120
- /* @__PURE__ */ e.jsxs("ul", { className: u.sideMenuContent, children: [
121
- B.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
- /* @__PURE__ */ e.jsx("hr", { className: i("divider", u.divider) }),
123
- 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
+ /* @__PURE__ */ n.jsxs("ul", { className: i(p.sideMenuContent, {
123
+ [p.noTopMargin]: [...y, ...k].length > _n
124
+ }), children: [
125
+ y.map((t, _) => /* @__PURE__ */ n.jsx(w, { item: t, menuExpanded: a, collapsed: _ === h, onCollapse: () => N(_), currentPath: g, useHover: d, useTooltips: f, isMobile: o, disableMode: v }, t.title)),
126
+ /* @__PURE__ */ n.jsx("hr", { className: i("divider", p.divider) }),
127
+ k.map((t, _) => /* @__PURE__ */ n.jsx(w, { item: t, menuExpanded: a, collapsed: _ === h, onCollapse: () => N(_), currentPath: g, useHover: d, useTooltips: f, isMobile: o, disableMode: v }, t.title))
124
128
  ] })
125
129
  ] });
126
- }, re = "_top-bar_lnmq0_1", ce = "_top-bar-brand_lnmq0_12", w = {
130
+ }, mn = "_top-bar_lnmq0_1", pn = "_top-bar-brand_lnmq0_12", I = {
127
131
  "top-bar": "_top-bar_lnmq0_1",
128
- topBar: re,
132
+ topBar: mn,
129
133
  "top-bar-brand": "_top-bar-brand_lnmq0_12",
130
- topBarBrand: ce
131
- }, Ne = ({ appName: n, leftOffset: l, leftContent: a, centerContent: c, rightContent: p }) => /* @__PURE__ */ e.jsx("nav", { className: i("luminus-top-bar shadow", w.topBar), style: {
134
+ topBarBrand: pn
135
+ }, Mn = ({ appName: e, leftOffset: l, leftContent: r, centerContent: c, rightContent: u }) => /* @__PURE__ */ n.jsx("nav", { className: i("luminus-top-bar shadow", I.topBar), style: {
132
136
  width: l ? `calc(100% - ${l}px)` : void 0,
133
137
  left: l ? `${l}px` : void 0
134
- }, children: /* @__PURE__ */ e.jsxs("div", { className: "w-100 row g-0", children: [
135
- /* @__PURE__ */ e.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
136
- /* @__PURE__ */ e.jsx(q, { to: "/", className: i("luminus-top-bar-brand", w.topBarBrand), children: n }),
137
- a
138
+ }, children: /* @__PURE__ */ n.jsxs("div", { className: "w-100 row g-0", children: [
139
+ /* @__PURE__ */ n.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
140
+ /* @__PURE__ */ n.jsx(B, { to: "/", className: i("luminus-top-bar-brand", I.topBarBrand), children: e }),
141
+ r
138
142
  ] }),
139
- /* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
140
- /* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: p ?? null })
143
+ /* @__PURE__ */ n.jsx("div", { className: "col-4 d-flex align-items-center", children: c ?? null }),
144
+ /* @__PURE__ */ n.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: u ?? null })
141
145
  ] }) });
142
146
  export {
143
- fe as PageContainer,
144
- Be as SideContentBar,
145
- je as SideMenu,
146
- Ne as TopBar
147
+ Bn as PageContainer,
148
+ Cn as SideContentBar,
149
+ Nn as SideMenu,
150
+ Mn as TopBar
147
151
  };