react-luminus-components 1.2.40 → 1.2.42
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/components/common/PhotoLightbox/PhotoLightbox.d.ts +2 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +59 -59
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +487 -486
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -6,8 +6,9 @@ type Props = {
|
|
|
6
6
|
photos: Array<PhotoLibraryItemModel>;
|
|
7
7
|
defaultIndex: number;
|
|
8
8
|
uploadPhotosText?: string;
|
|
9
|
+
noPhotosText?: string;
|
|
9
10
|
onUploadPhotos?: (files: File[]) => void;
|
|
10
11
|
photoActions?: PhotoAction[];
|
|
11
12
|
};
|
|
12
|
-
declare const PhotoLightbox: ({ show, onClose, photos, defaultIndex, uploadPhotosText, onUploadPhotos, photoActions, }: Props) => import("react").JSX.Element
|
|
13
|
+
declare const PhotoLightbox: ({ show, onClose, photos, defaultIndex, uploadPhotosText, noPhotosText, onUploadPhotos, photoActions, }: Props) => import("react").JSX.Element;
|
|
13
14
|
export default PhotoLightbox;
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-BkFSaMQy.cjs"),u=require("react");require("react-hook-form");const w=require("./usePermissions-yA39pMjm.cjs"),C=require("./SimpleTooltip-C_iRq-Q0.cjs"),M="_side-menu-item_6vbwa_1",B="_disabled_6vbwa_5",k="_nav-button_6vbwa_9",S="_child_6vbwa_17",P="_text_6vbwa_21",f="_icon_6vbwa_28",g="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",y="_expanded_6vbwa_51",T="_children-container_6vbwa_57",$="_visible_6vbwa_65",H="_children_6vbwa_57",o={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:M,disabled:B,"nav-button":"_nav-button_6vbwa_9",navButton:k,child:S,text:P,icon:f,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:g,collapsed:I,expanded:y,"children-container":"_children-container_6vbwa_57",childrenContainer:T,visible:$,children:H},L=({item:e,menuExpanded:t,children:i})=>e.tooltip&&!t?s.jsxRuntimeExports.jsx(C.SimpleTooltip,{text:e.tooltip,placement:"right",children:i}):i,N=({item:e,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l})=>{var v,_;const{LinkComponent:c}=u.useContext(s.LuminusComponentsContext),[p,x]=u.useState(!1),[d]=l.split("?"),h=e.linkTo===d||((v=e.children)==null?void 0:v.some(n=>n.linkTo===d));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:t},{active:p||h},{open:i&&e.children},{[o.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(L,{item:e,menuExpanded:t,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",o.navButton),onClick:()=>a(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(c,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",o.children),children:(_=e.children)==null?void 0:_.map(n=>s.jsxRuntimeExports.jsx(c,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},q="_side-menu_n1hvm_1",F="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",j={"side-menu":"_side-menu_n1hvm_1",sideMenu:q,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:F,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:e,mainItems:t,secondaryItems:i,expanded:a,setExpanded:l,currentPath:c})=>{const[p,x]=u.useState(-1),{checkUserHasPermissions:d}=w.usePermissions(),h=u.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[]),disabled:n.disabled||m.disabled}))}}),[t,d]),v=u.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[])}))}}),[i,d]),_=n=>{x(n===p?-1:n)};return u.useEffect(()=>{a||x(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",j.sideMenu,{[j.expand]:a},{expand:a}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",j.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:j.sideMenuContent,children:[h.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",j.divider)}),v.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title))]})]})},D="_top-bar_1lk80_1",G="_top-bar-brand_1lk80_14",R={"top-bar":"_top-bar_1lk80_1",topBar:D,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:G},J=({appName:e,leftOffset:t,centerContent:i,rightContent:a})=>{const{LinkComponent:l}=u.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",R.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[s.jsxRuntimeExports.jsx(l,{to:"/",className:s.classNames("luminus-top-bar-brand",R.topBarBrand),children:e}),i&&s.jsxRuntimeExports.jsx("div",{children:i}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:a??null})]})},O="_side-content-bar_17kwd_1",Q={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:O},b=({width:e,children:t})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",Q.sideContentBar),style:{width:`${e}px`},children:t}),E=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),V=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",l?"p-0":"p-3",c),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?`${a}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-BkFSaMQy.cjs"),u=require("react");require("react-hook-form");const w=require("./usePermissions-yA39pMjm.cjs"),C=require("./SimpleTooltip-C_iRq-Q0.cjs"),M="_side-menu-item_6vbwa_1",B="_disabled_6vbwa_5",k="_nav-button_6vbwa_9",S="_child_6vbwa_17",P="_text_6vbwa_21",f="_icon_6vbwa_28",g="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",y="_expanded_6vbwa_51",T="_children-container_6vbwa_57",$="_visible_6vbwa_65",H="_children_6vbwa_57",o={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:M,disabled:B,"nav-button":"_nav-button_6vbwa_9",navButton:k,child:S,text:P,icon:f,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:g,collapsed:I,expanded:y,"children-container":"_children-container_6vbwa_57",childrenContainer:T,visible:$,children:H},L=({item:e,menuExpanded:t,children:i})=>e.tooltip&&!t?s.jsxRuntimeExports.jsx(C.SimpleTooltip,{text:e.tooltip,placement:"right",children:i}):i,N=({item:e,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l})=>{var v,_;const{LinkComponent:c}=u.useContext(s.LuminusComponentsContext),[p,x]=u.useState(!1),[d]=l.split("?"),h=e.linkTo===d||((v=e.children)==null?void 0:v.some(n=>n.linkTo===d));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:t},{active:p||h},{open:i&&e.children},{[o.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(L,{item:e,menuExpanded:t,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",o.navButton),onClick:()=>a(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(c,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",o.children),children:(_=e.children)==null?void 0:_.map(n=>s.jsxRuntimeExports.jsx(c,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},q="_side-menu_n1hvm_1",F="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",j={"side-menu":"_side-menu_n1hvm_1",sideMenu:q,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:F,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:e,mainItems:t,secondaryItems:i,expanded:a,setExpanded:l,currentPath:c})=>{const[p,x]=u.useState(-1),{checkUserHasPermissions:d}=w.usePermissions(),h=u.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[]),disabled:n.disabled||m.disabled}))}}),[t,d]),v=u.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[])}))}}),[i,d]),_=n=>{x(n===p?-1:n)};return u.useEffect(()=>{a||x(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",j.sideMenu,{[j.expand]:a},{expand:a}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",j.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:j.sideMenuContent,children:[h.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",j.divider)}),v.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title))]})]})},D="_top-bar_1lk80_1",G="_top-bar-brand_1lk80_14",R={"top-bar":"_top-bar_1lk80_1",topBar:D,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:G},J=({appName:e,leftOffset:t,centerContent:i,rightContent:a})=>{const{LinkComponent:l}=u.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",R.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[s.jsxRuntimeExports.jsx(l,{to:"/",className:s.classNames("luminus-top-bar-brand",R.topBarBrand),children:e}),i&&s.jsxRuntimeExports.jsx("div",{children:i}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:a??null})]})},O="_side-content-bar_17kwd_1",Q={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:O},b=({width:e,children:t})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",Q.sideContentBar),style:{width:`${e}px`},children:t}),E=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),V=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",l?"p-0":"p-3",c),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?`${a}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]}),X="_full-screen-container_1rm4r_1",Y={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:X},Z=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",l?"p-0":"p-3",c,Y.fullScreenContainer),style:{width:i?`calc(100% - ${a}px)`:"100%"},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]});exports.FullScreenContainer=Z;exports.MainContainer=V;exports.SideContentBar=b;exports.SideMenu=z;exports.TopBar=J;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { N as
|
|
2
|
-
import { useContext as
|
|
1
|
+
import { N as B, j as e, b as o, W as I, X as P } from "./NoInputContainer-LdJeEMWI.js";
|
|
2
|
+
import { useContext as C, useState as M, useMemo as j, useEffect as g } from "react";
|
|
3
3
|
import "react-hook-form";
|
|
4
4
|
import { u as y } from "./usePermissions-CHfDy8Yx.js";
|
|
5
5
|
import { S } from "./SimpleTooltip-mxX4RNUy.js";
|
|
6
|
-
const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6vbwa_9", L = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", R = "_collapse-icon_6vbwa_34", A = "_collapsed_6vbwa_44", K = "_expanded_6vbwa_51", U = "_children-container_6vbwa_57",
|
|
6
|
+
const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6vbwa_9", L = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", R = "_collapse-icon_6vbwa_34", A = "_collapsed_6vbwa_44", K = "_expanded_6vbwa_51", U = "_children-container_6vbwa_57", X = "_visible_6vbwa_65", q = "_children_6vbwa_57", i = {
|
|
7
7
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
8
8
|
sideMenuItem: T,
|
|
9
9
|
disabled: $,
|
|
@@ -18,114 +18,114 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
18
18
|
expanded: K,
|
|
19
19
|
"children-container": "_children-container_6vbwa_57",
|
|
20
20
|
childrenContainer: U,
|
|
21
|
-
visible:
|
|
22
|
-
children:
|
|
23
|
-
},
|
|
24
|
-
var b,
|
|
25
|
-
const { LinkComponent: c } = B
|
|
26
|
-
return /* @__PURE__ */ e.jsxs("li", { className:
|
|
27
|
-
[
|
|
28
|
-
}, { active: p || x }, { open: a && n.children }, { [
|
|
29
|
-
/* @__PURE__ */ e.jsx(
|
|
30
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
31
|
-
t && /* @__PURE__ */ e.jsx("div", { className:
|
|
32
|
-
t && /* @__PURE__ */ e.jsx("div", { className:
|
|
33
|
-
[
|
|
21
|
+
visible: X,
|
|
22
|
+
children: q
|
|
23
|
+
}, z = ({ item: n, menuExpanded: t, children: a }) => n.tooltip && !t ? /* @__PURE__ */ e.jsx(S, { text: n.tooltip, placement: "right", children: a }) : a, w = ({ item: n, menuExpanded: t, collapsed: a, onCollapse: r, currentPath: d }) => {
|
|
24
|
+
var b, v;
|
|
25
|
+
const { LinkComponent: c } = C(B), [p, u] = M(!1), [_] = d.split("?"), x = n.linkTo === _ || ((b = n.children) == null ? void 0 : b.some((s) => s.linkTo === _));
|
|
26
|
+
return /* @__PURE__ */ e.jsxs("li", { className: o("luminus-side-menu-item", i.sideMenuItem, {
|
|
27
|
+
[i.expanded]: t
|
|
28
|
+
}, { active: p || x }, { open: a && n.children }, { [i.disabled]: n.disabled || n.notPermitted }, { disabled: n.disabled || n.notPermitted }), onMouseEnter: () => u(!0), onMouseLeave: () => u(!1), children: [
|
|
29
|
+
/* @__PURE__ */ e.jsx(z, { item: n, menuExpanded: t, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: o("nav-link", i.navButton), onClick: () => r(), children: [
|
|
30
|
+
/* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
|
|
31
|
+
t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title }),
|
|
32
|
+
t && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", i.collapseIcon, {
|
|
33
|
+
[i.collapsed]: a
|
|
34
34
|
}), children: /* @__PURE__ */ e.jsx(I, {}) })
|
|
35
|
-
] }) }) : /* @__PURE__ */ e.jsxs(c, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className:
|
|
36
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
37
|
-
t && /* @__PURE__ */ e.jsx("div", { className:
|
|
35
|
+
] }) }) : /* @__PURE__ */ e.jsxs(c, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: o("nav-link", i.navButton), children: [
|
|
36
|
+
/* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
|
|
37
|
+
t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title })
|
|
38
38
|
] }) }),
|
|
39
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
40
|
-
[
|
|
41
|
-
}), children: /* @__PURE__ */ e.jsx("div", { className:
|
|
39
|
+
/* @__PURE__ */ e.jsx("div", { className: o("children-container", i.childrenContainer, {
|
|
40
|
+
[i.visible]: a
|
|
41
|
+
}), children: /* @__PURE__ */ e.jsx("div", { className: o("shadow rounded children", i.children), children: (v = n.children) == null ? void 0 : v.map((s) => /* @__PURE__ */ e.jsx(c, { to: s.disabled || s.notPermitted ? "/" : s.linkTo ?? "/", className: o("nav-link child rounded", i.navButton, i.child, { [i.disabled]: s.disabled || s.notPermitted }, { disabled: s.disabled || s.notPermitted }), children: /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: s.title }) }, s.linkTo)) }) })
|
|
42
42
|
] });
|
|
43
|
-
},
|
|
43
|
+
}, D = "_side-menu_n1hvm_1", G = "_sidebar-header_n1hvm_13", J = "_side-menu-content_n1hvm_18", Q = "_expand_n1hvm_22", V = "_divider_n1hvm_26", h = {
|
|
44
44
|
"side-menu": "_side-menu_n1hvm_1",
|
|
45
|
-
sideMenu:
|
|
45
|
+
sideMenu: D,
|
|
46
46
|
"sidebar-header": "_sidebar-header_n1hvm_13",
|
|
47
|
-
sidebarHeader:
|
|
47
|
+
sidebarHeader: G,
|
|
48
48
|
"side-menu-content": "_side-menu-content_n1hvm_18",
|
|
49
|
-
sideMenuContent:
|
|
50
|
-
expand:
|
|
51
|
-
divider:
|
|
52
|
-
}, re = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded:
|
|
49
|
+
sideMenuContent: J,
|
|
50
|
+
expand: Q,
|
|
51
|
+
divider: V
|
|
52
|
+
}, re = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded: d, currentPath: c }) => {
|
|
53
53
|
const [p, u] = M(-1), { checkUserHasPermissions: _ } = y(), x = j(() => t.map((s) => {
|
|
54
|
-
var
|
|
54
|
+
var l;
|
|
55
55
|
return {
|
|
56
56
|
...s,
|
|
57
57
|
notPermitted: !_(s.permissions ?? []),
|
|
58
|
-
children: (
|
|
58
|
+
children: (l = s.children) == null ? void 0 : l.map((m) => ({
|
|
59
59
|
...m,
|
|
60
60
|
notPermitted: !_(m.permissions ?? []),
|
|
61
61
|
disabled: s.disabled || m.disabled
|
|
62
62
|
}))
|
|
63
63
|
};
|
|
64
64
|
}), [t, _]), b = j(() => a.map((s) => {
|
|
65
|
-
var
|
|
65
|
+
var l;
|
|
66
66
|
return {
|
|
67
67
|
...s,
|
|
68
68
|
notPermitted: !_(s.permissions ?? []),
|
|
69
|
-
children: (
|
|
69
|
+
children: (l = s.children) == null ? void 0 : l.map((m) => ({
|
|
70
70
|
...m,
|
|
71
71
|
notPermitted: !_(m.permissions ?? [])
|
|
72
72
|
}))
|
|
73
73
|
};
|
|
74
|
-
}), [a, _]),
|
|
74
|
+
}), [a, _]), v = (s) => {
|
|
75
75
|
u(s === p ? -1 : s);
|
|
76
76
|
};
|
|
77
77
|
return g(() => {
|
|
78
78
|
r || u(-1);
|
|
79
|
-
}, [r]), /* @__PURE__ */ e.jsxs("section", { className:
|
|
80
|
-
[
|
|
81
|
-
}, { expand: r }), onMouseEnter: () =>
|
|
82
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
83
|
-
/* @__PURE__ */ e.jsxs("ul", { className:
|
|
84
|
-
x.map((s,
|
|
85
|
-
/* @__PURE__ */ e.jsx("hr", { className:
|
|
86
|
-
b.map((s,
|
|
79
|
+
}, [r]), /* @__PURE__ */ e.jsxs("section", { className: o("luminus-side-menu shadow", h.sideMenu, {
|
|
80
|
+
[h.expand]: r
|
|
81
|
+
}, { expand: r }), onMouseEnter: () => d(!0), onMouseLeave: () => d(!1), children: [
|
|
82
|
+
/* @__PURE__ */ e.jsx("div", { className: o("sidebar-header", h.sidebarHeader), children: n }),
|
|
83
|
+
/* @__PURE__ */ e.jsxs("ul", { className: h.sideMenuContent, children: [
|
|
84
|
+
x.map((s, l) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: l === p, onCollapse: () => v(l), currentPath: c }, s.title)),
|
|
85
|
+
/* @__PURE__ */ e.jsx("hr", { className: o("divider", h.divider) }),
|
|
86
|
+
b.map((s, l) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: l === p, onCollapse: () => v(l), currentPath: c }, s.title))
|
|
87
87
|
] })
|
|
88
88
|
] });
|
|
89
|
-
},
|
|
89
|
+
}, Y = "_top-bar_1lk80_1", Z = "_top-bar-brand_1lk80_14", N = {
|
|
90
90
|
"top-bar": "_top-bar_1lk80_1",
|
|
91
|
-
topBar:
|
|
91
|
+
topBar: Y,
|
|
92
92
|
"top-bar-brand": "_top-bar-brand_1lk80_14",
|
|
93
|
-
topBarBrand:
|
|
94
|
-
},
|
|
95
|
-
const { LinkComponent:
|
|
96
|
-
return /* @__PURE__ */ e.jsxs("nav", { className:
|
|
93
|
+
topBarBrand: Z
|
|
94
|
+
}, le = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {
|
|
95
|
+
const { LinkComponent: d } = C(B);
|
|
96
|
+
return /* @__PURE__ */ e.jsxs("nav", { className: o("luminus-top-bar shadow", N.topBar), style: {
|
|
97
97
|
width: t ? `calc(100% - ${t}px)` : void 0,
|
|
98
98
|
left: t ? `${t}px` : void 0
|
|
99
99
|
}, children: [
|
|
100
|
-
/* @__PURE__ */ e.jsx(
|
|
100
|
+
/* @__PURE__ */ e.jsx(d, { to: "/", className: o("luminus-top-bar-brand", N.topBarBrand), children: n }),
|
|
101
101
|
a && /* @__PURE__ */ e.jsx("div", { children: a }),
|
|
102
102
|
/* @__PURE__ */ e.jsx("div", { className: "d-flex justify-content-end align-items-center gap-2", children: r ?? null })
|
|
103
103
|
] });
|
|
104
|
-
},
|
|
104
|
+
}, O = "_side-content-bar_17kwd_1", W = {
|
|
105
105
|
"side-content-bar": "_side-content-bar_17kwd_1",
|
|
106
|
-
sideContentBar:
|
|
107
|
-
}, k = ({ width: n, children: t }) => /* @__PURE__ */ e.jsx("section", { className:
|
|
106
|
+
sideContentBar: O
|
|
107
|
+
}, k = ({ width: n, children: t }) => /* @__PURE__ */ e.jsx("section", { className: o("luminus-side-content-bar shadow", W.sideContentBar), style: {
|
|
108
108
|
width: `${n}px`
|
|
109
|
-
}, children: t }), f = ({ title: n }) => /* @__PURE__ */ e.jsx("div", { className: "mb-3", children: typeof n == "string" ? /* @__PURE__ */ e.jsx(P, { variant: "h3", children: n }) : n }),
|
|
109
|
+
}, children: t }), f = ({ title: n }) => /* @__PURE__ */ e.jsx("div", { className: "mb-3", children: typeof n == "string" ? /* @__PURE__ */ e.jsx(P, { variant: "h3", children: n }) : n }), de = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding: d, className: c }) => /* @__PURE__ */ e.jsxs("div", { className: o("container-fluid", d ? "p-0" : "p-3", c), children: [
|
|
110
110
|
/* @__PURE__ */ e.jsxs("div", { style: { paddingRight: a ? `${r}px` : void 0 }, children: [
|
|
111
111
|
n ? /* @__PURE__ */ e.jsx(f, { title: n }) : null,
|
|
112
112
|
t
|
|
113
113
|
] }),
|
|
114
|
-
a && /* @__PURE__ */ e.jsx(k, { width:
|
|
114
|
+
a && /* @__PURE__ */ e.jsx(k, { width: r, children: a })
|
|
115
115
|
] }), ee = "_full-screen-container_1rm4r_1", ne = {
|
|
116
116
|
"full-screen-container": "_full-screen-container_1rm4r_1",
|
|
117
117
|
fullScreenContainer: ee
|
|
118
|
-
}, ce = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding:
|
|
119
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
118
|
+
}, ce = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding: d, className: c }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
119
|
+
/* @__PURE__ */ e.jsxs("div", { className: o("overflow-hidden luminus-full-screen-container", d ? "p-0" : "p-3", c, ne.fullScreenContainer), style: { width: a ? `calc(100% - ${r}px)` : "100%" }, children: [
|
|
120
120
|
n ? /* @__PURE__ */ e.jsx(f, { title: n }) : null,
|
|
121
121
|
t
|
|
122
122
|
] }),
|
|
123
|
-
a && /* @__PURE__ */ e.jsx(k, { width:
|
|
123
|
+
a && /* @__PURE__ */ e.jsx(k, { width: r, children: a })
|
|
124
124
|
] });
|
|
125
125
|
export {
|
|
126
126
|
ce as FullScreenContainer,
|
|
127
|
-
|
|
127
|
+
de as MainContainer,
|
|
128
128
|
k as SideContentBar,
|
|
129
129
|
re as SideMenu,
|
|
130
|
-
|
|
130
|
+
le as TopBar
|
|
131
131
|
};
|