react-luminus-components 1.5.32 → 1.5.34
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 +30 -30
- package/dist/{FormDisabledProvider-BOj1vV8O.js → FormDisabledProvider-BtMzHh7e.js} +1 -1
- package/dist/FormDisabledProvider-D3_uZkaG.cjs +1 -0
- package/dist/{nivo-bar.es-C7fnWh-z.js → ShortcutLinksContext-CXaPhocV.js} +6658 -6657
- package/dist/{nivo-bar.es-CUXYGl94.cjs → ShortcutLinksContext-DL1kqHiR.cjs} +8 -8
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +32 -32
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +56 -56
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +12 -12
- package/dist/main.cjs.js +50 -50
- package/dist/main.es.js +8594 -8597
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +1 -5
- package/dist/style.css +1 -1
- package/dist/{useLocalStorageState-BmOV1B-Z.js → useLocalStorageState-CoNYw5tD.js} +13 -13
- package/dist/useLocalStorageState-DJIRaF9a.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 +123 -123
- package/dist/FormDisabledProvider--znl1VtF.cjs +0 -1
- package/dist/useLocalStorageState-1WnbW9bB.cjs +0 -1
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-DL1kqHiR.cjs"),_=require("react"),B=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");function L(s){return e.GenIcon({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z"},child:[]}]})(s)}function I(s){return e.GenIcon({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07L60,71A76,76,0,0,0,35.46,84.51a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.9,228c.47,0,.94,0,1.41-.05A20,20,0,0,0,171.87,220a97.47,97.47,0,0,0,9.54-15.46l17.72,19.49a12,12,0,1,0,17.76-16.14Zm98.49,169.88L54.08,100.52C62,95,70.31,92.12,78.91,91.83l84.51,93A62,62,0,0,1,155.37,201.81Zm82.78-95-39,39.11a12,12,0,1,1-17-16.95l36.19-36.3-55-55L130.59,70.5a12,12,0,0,1-17-16.94l35.57-35.69a20,20,0,0,1,28.3,0l60.69,60.68A20,20,0,0,1,238.15,106.83Z"},child:[]}]})(s)}const A="_side-menu-item_o72rm_1",S="_disabled_o72rm_6",T="_hidden_o72rm_10",q="_nav-button_o72rm_13",O="_child_o72rm_21",Z="_text_o72rm_26",$="_icon_o72rm_36",G="_collapse-icon_o72rm_42",D="_collapsed_o72rm_52",F="_collapse-icon-mini_o72rm_55",K="_expanded_o72rm_86",z="_children-container_o72rm_92",H="_visible_o72rm_100",U="_children_o72rm_92",W="_mobile_o72rm_112",t={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:A,disabled:S,hidden:T,"nav-button":"_nav-button_o72rm_13",navButton:q,child:O,text:Z,icon:$,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:G,collapsed:D,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:F,expanded:K,"children-container":"_children-container_o72rm_92",childrenContainer:z,visible:H,children:U,mobile:W},J=({item:s,menuExpanded:o,useTooltips:r,children:d})=>s.tooltip&&!o&&r?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:d})}):d,f=({item:s,menuExpanded:o,collapsed:r,onCollapse:d,currentPath:h,useHover:a,useTooltips:b,isMobile:E,disableMode:c})=>{var R,m,v,N;const[g,p]=_.useState(!1),[M]=h.split("?"),P=s.linkTo===M||((R=s.children)==null?void 0:R.some(i=>i.linkTo===M)),j=_.useRef(null);return e.useClickOutside([j],()=>r&&d()),e.jsxRuntimeExports.jsxs("li",{ref:j,className:e.classNames("luminus-side-menu-item",t.sideMenuItem,{[t.mobile]:E},{[t.expanded]:o},{active:g||P},{open:r&&s.children},{[c==="disable"?t.disabled:t.hidden]:s.disabled||s.notPermitted||((m=s.children)==null?void 0:m.every(i=>i.notPermitted||i.disabled))},{[c==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(i=>i.notPermitted||i.disabled))}),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e.jsxRuntimeExports.jsx(J,{item:s,menuExpanded:o,useTooltips:b,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",t.navButton),onClick:()=>{d()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",t.icon),children:s.icon}),!a&&!o&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",t.collapseIconMini,{[t.collapsed]:r}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),o&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",t.text,"text-nowrap"),children:s.title}),o&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",t.collapseIcon,{[t.collapsed]:r}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(B.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",t.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",t.icon),children:s.icon}),o&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",t.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",t.childrenContainer,{[t.visible]:r}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",t.children),children:(N=s.children)==null?void 0:N.map(i=>e.jsxRuntimeExports.jsx(B.Link,{to:i.disabled||i.notPermitted?"/":i.linkTo??"/",className:e.classNames("nav-link child rounded",t.navButton,t.child,{[c==="disable"?t.disabled:t.hidden]:i.disabled||i.notPermitted},{[c==="disable"?"disabled":"hidden"]:i.disabled||i.notPermitted}),onClick:d,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",t.text,"text-nowrap"),children:i.title})},i.linkTo))})})]})},Q="_side-menu_140bh_1",V="_sidebar-header_140bh_15",X="_side-menu-pin_140bh_22",Y="_side-menu-content_140bh_27",ee="_no-top-margin_140bh_33",se="_expand_140bh_39",ne="_only-logo_140bh_43",te="_mobile_140bh_46",ie="_divider_140bh_61",x={"side-menu":"_side-menu_140bh_1",sideMenu:Q,"sidebar-header":"_sidebar-header_140bh_15",sidebarHeader:V,"side-menu-pin":"_side-menu-pin_140bh_22",sideMenuPin:X,"side-menu-content":"_side-menu-content_140bh_27",sideMenuContent:Y,"no-top-margin":"_no-top-margin_140bh_33",noTopMargin:ee,expand:se,"only-logo":"_only-logo_140bh_43",onlyLogo:ne,mobile:te,divider:ie},oe=14,le=({headerItem:s,searchItem:o,shortcutsItem:r,mainItems:d,secondaryItems:h,expanded:a,setExpanded:b,currentPath:E,useHover:c,useTooltips:g,disableMode:p="disable",sideMenuPinned:M,toggleSideMenuPinned:P})=>{const[j,R]=_.useState(-1),{checkUserHasPermissions:m}=e.usePermissions(),v=_.useMemo(()=>d.map(n=>{var l;return{...n,notPermitted:!m(n.permissions??[],"any"),children:(l=n.children)==null?void 0:l.map(u=>({...u,notPermitted:!m(u.permissions??[],"any"),disabled:n.disabled||u.disabled}))}}),[d,m]),N=_.useMemo(()=>h.map(n=>{var l;return{...n,notPermitted:!m(n.permissions??[],"any"),children:(l=n.children)==null?void 0:l.map(u=>({...u,notPermitted:!m(u.permissions??[],"any")}))}}),[h,m]),i=n=>{R(n===j?-1:n)};_.useEffect(()=>{a||R(-1)},[a]);const y=_.useRef(null);e.useClickOutside([y],()=>b(!1));const w=_.useMemo(()=>[...v,...N].filter(n=>{var l;return p==="hide"?!n.disabled&&!n.notPermitted&&(((l=n.children)==null?void 0:l.filter(u=>!u.disabled&&!u.notPermitted))??[]).length>0:!0}),[v,N,p]),{isMobile:C}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:y,className:e.classNames("luminus-side-menu shadow",x.sideMenu,{[x.mobile]:C},{[x.expand]:a},{expand:a}),onMouseEnter:()=>c&&b(!0),onMouseLeave:()=>c&&b(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",x.sidebarHeader,{[x.onlyLogo]:c}),role:c?void 0:"button",onClick:c?void 0:()=>b(!a),children:c?s:a?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{role:"button",onClick:n=>{n.stopPropagation(),P()},className:x.sideMenuPin,children:M?e.jsxRuntimeExports.jsx(I,{}):e.jsxRuntimeExports.jsx(L,{})}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),a&&(o||r)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[r&&a?r:null,o&&a?o:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:e.classNames(x.sideMenuContent,{[x.noTopMargin]:w.length>oe}),children:[v.map((n,l)=>e.jsxRuntimeExports.jsx(f,{item:n,menuExpanded:a,collapsed:l===j,onCollapse:()=>i(l),currentPath:E,useHover:c,useTooltips:g,isMobile:C,disableMode:p},n.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",x.divider)}),N.map((n,l)=>e.jsxRuntimeExports.jsx(f,{item:n,menuExpanded:a,collapsed:l===j,onCollapse:()=>i(l),currentPath:E,useHover:c,useTooltips:g,isMobile:C,disableMode:p},n.title))]})]})},re="_top-bar_lnmq0_1",ae="_top-bar-brand_lnmq0_12",k={"top-bar":"_top-bar_lnmq0_1",topBar:re,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ae},ce=({appName:s,leftOffset:o,leftContent:r,centerContent:d,rightContent:h})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",k.topBar),style:{width:o?`calc(100% - ${o}px)`:void 0,left:o?`${o}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(B.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",k.topBarBrand),children:s}),r]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:d??null}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:h??null})]})});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=le;exports.TopBar=ce;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bB as T,
|
|
2
|
-
import {
|
|
3
|
-
import { useState as S, useRef as
|
|
1
|
+
import { bB as T, bv as R, j as n, c as l, Y as I, ao as q, ba as O, a2 as D, bC as F } from "./ShortcutLinksContext-CXaPhocV.js";
|
|
2
|
+
import { b8 as Ln, bD as Tn } from "./ShortcutLinksContext-CXaPhocV.js";
|
|
3
|
+
import { useState as S, useRef as Z, useMemo as y, useEffect as G } from "react";
|
|
4
4
|
import { Link as k } from "react-router-dom";
|
|
5
5
|
import "react-hook-form";
|
|
6
6
|
import "react-flexmonster";
|
|
@@ -34,9 +34,9 @@ const H = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", U = "_hidden_o72rm
|
|
|
34
34
|
visible: on,
|
|
35
35
|
children: ln,
|
|
36
36
|
mobile: tn
|
|
37
|
-
}, an = ({ item: e, menuExpanded: t, useTooltips: r, children: _ }) => e.tooltip && !t && r ? /* @__PURE__ */ n.jsx(
|
|
37
|
+
}, an = ({ item: e, menuExpanded: t, useTooltips: r, children: _ }) => e.tooltip && !t && r ? /* @__PURE__ */ n.jsx(q, { text: e.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ n.jsx("div", { children: _ }) }) : _, A = ({ item: e, menuExpanded: t, collapsed: r, onCollapse: _, currentPath: p, useHover: d, useTooltips: x, isMobile: N, disableMode: c }) => {
|
|
38
38
|
var j, m, g, M;
|
|
39
|
-
const [P, b] = S(!1), [f] = p.split("?"), B = e.linkTo === f || ((j = e.children) == null ? void 0 : j.some((o) => o.linkTo === f)), v =
|
|
39
|
+
const [P, b] = S(!1), [f] = p.split("?"), B = e.linkTo === f || ((j = e.children) == null ? void 0 : j.some((o) => o.linkTo === f)), v = Z(null);
|
|
40
40
|
return R([v], () => r && _()), /* @__PURE__ */ n.jsxs("li", { ref: v, className: l("luminus-side-menu-item", i.sideMenuItem, { [i.mobile]: N }, {
|
|
41
41
|
[i.expanded]: t
|
|
42
42
|
}, { active: P || B }, { open: r && e.children }, {
|
|
@@ -50,11 +50,11 @@ const H = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", U = "_hidden_o72rm
|
|
|
50
50
|
/* @__PURE__ */ n.jsx("div", { className: l("icon", i.icon), children: e.icon }),
|
|
51
51
|
!d && !t && /* @__PURE__ */ n.jsx("div", { className: l("collapse-icon-mini rounded", i.collapseIconMini, {
|
|
52
52
|
[i.collapsed]: r
|
|
53
|
-
}), children: /* @__PURE__ */ n.jsx(
|
|
53
|
+
}), children: /* @__PURE__ */ n.jsx(I, {}) }),
|
|
54
54
|
t && /* @__PURE__ */ n.jsx("div", { className: l("text", i.text, "text-nowrap"), children: e.title }),
|
|
55
55
|
t && /* @__PURE__ */ n.jsx("div", { className: l("collapse-icon", i.collapseIcon, {
|
|
56
56
|
[i.collapsed]: r
|
|
57
|
-
}), children: /* @__PURE__ */ n.jsx(
|
|
57
|
+
}), children: /* @__PURE__ */ n.jsx(I, {}) })
|
|
58
58
|
] }) }) : /* @__PURE__ */ n.jsxs(k, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: l("nav-link", i.navButton), children: [
|
|
59
59
|
/* @__PURE__ */ n.jsx("div", { className: l("icon", i.icon), children: e.icon }),
|
|
60
60
|
t && /* @__PURE__ */ n.jsx("div", { className: l("text", i.text, "text-nowrap"), children: e.title })
|
|
@@ -111,9 +111,9 @@ const H = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", U = "_hidden_o72rm
|
|
|
111
111
|
G(() => {
|
|
112
112
|
d || j(-1);
|
|
113
113
|
}, [d]);
|
|
114
|
-
const w =
|
|
114
|
+
const w = Z(null);
|
|
115
115
|
R([w], () => x(!1));
|
|
116
|
-
const
|
|
116
|
+
const $ = y(() => [...g, ...M].filter((s) => {
|
|
117
117
|
var a;
|
|
118
118
|
return b === "hide" ? !s.disabled && !s.notPermitted && (((a = s.children) == null ? void 0 : a.filter((u) => !u.disabled && !u.notPermitted)) ?? []).length > 0 : !0;
|
|
119
119
|
}), [g, M, b]), { isMobile: C } = D();
|
|
@@ -133,11 +133,11 @@ const H = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", U = "_hidden_o72rm
|
|
|
133
133
|
t && d ? t : null
|
|
134
134
|
] }) : null,
|
|
135
135
|
/* @__PURE__ */ n.jsxs("ul", { className: l(h.sideMenuContent, {
|
|
136
|
-
[h.noTopMargin]:
|
|
136
|
+
[h.noTopMargin]: $.length > xn
|
|
137
137
|
}), children: [
|
|
138
|
-
g.map((s, a) => /* @__PURE__ */ n.jsx(
|
|
138
|
+
g.map((s, a) => /* @__PURE__ */ n.jsx(A, { item: s, menuExpanded: d, collapsed: a === v, onCollapse: () => o(a), currentPath: N, useHover: c, useTooltips: P, isMobile: C, disableMode: b }, s.title)),
|
|
139
139
|
/* @__PURE__ */ n.jsx("hr", { className: l("divider", h.divider) }),
|
|
140
|
-
M.map((s, a) => /* @__PURE__ */ n.jsx(
|
|
140
|
+
M.map((s, a) => /* @__PURE__ */ n.jsx(A, { item: s, menuExpanded: d, collapsed: a === v, onCollapse: () => o(a), currentPath: N, useHover: c, useTooltips: P, isMobile: C, disableMode: b }, s.title))
|
|
141
141
|
] })
|
|
142
142
|
] });
|
|
143
143
|
}, vn = "_top-bar_lnmq0_1", jn = "_top-bar-brand_lnmq0_12", L = {
|