react-luminus-components 1.4.48 → 1.4.49

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/layout.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import { aP as I, j as e, c as i, Y as C, aA as A, bo as R, aC as S, by as $, bz as z } from "./nivo-bar.es-DRPYhamY.js";
2
- import { aq as fe, bA as ge } from "./nivo-bar.es-DRPYhamY.js";
3
- import { useState as L, useRef as T, useMemo as P, useEffect as F } from "react";
4
- import { Link as B } from "react-router-dom";
1
+ import { ad as I, j as e, c as i, Y as C, ay as R, bd as S, a2 as $, by as A, bz as z } from "./ShortcutLinksContext-CvGOQ1rG.js";
2
+ import { bb as fe, bA as ge } from "./ShortcutLinksContext-CvGOQ1rG.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";
5
5
  import "react-hook-form";
6
6
  import "react-flexmonster";
7
7
  import "@azure/msal-browser";
@@ -28,17 +28,17 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
28
28
  visible: Z,
29
29
  children: H,
30
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, k = ({ item: n, menuExpanded: l, collapsed: a, onCollapse: c, currentPath: h, useHover: d, useTooltips: p, isMobile: y, disableMode: r }) => {
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);
31
+ }, ne = ({ item: n, menuExpanded: l, useTooltips: a, children: c }) => n.tooltip && !l && a ? /* @__PURE__ */ e.jsx(R, { 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: b, useHover: d, useTooltips: h, isMobile: y, disableMode: r }) => {
32
+ var g, B, N, M;
33
+ const [f, v] = L(!1), [p] = b.split("?"), j = n.linkTo === p || ((g = n.children) == null ? void 0 : g.some((o) => o.linkTo === p)), 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 || ((q = n.children) == null ? void 0 : q.every((o) => o.notPermitted || o.disabled))
37
+ [r === "disable" ? s.disabled : s.hidden]: n.disabled || n.notPermitted || ((B = n.children) == null ? void 0 : B.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: [
41
- /* @__PURE__ */ e.jsx(ne, { item: n, menuExpanded: l, useTooltips: p, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: i("nav-link", s.navButton), onClick: () => {
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: () => {
42
42
  c();
43
43
  }, children: [
44
44
  /* @__PURE__ */ e.jsx("div", { className: i("icon", s.icon), children: n.icon }),
@@ -49,13 +49,13 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
49
49
  l && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
50
50
  [s.collapsed]: a
51
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: [
52
+ ] }) }) : /* @__PURE__ */ e.jsxs(q, { 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(B, { to: o.disabled || o.notPermitted ? "/" : o.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, {
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
59
  [r === "disable" ? s.disabled : s.hidden]: o.disabled || o.notPermitted
60
60
  }, {
61
61
  [r === "disable" ? "disabled" : "hidden"]: o.disabled || o.notPermitted
@@ -73,8 +73,8 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
73
73
  onlyLogo: te,
74
74
  mobile: ae,
75
75
  divider: de
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(), g = P(() => c.map((t) => {
76
+ }, je = ({ headerItem: n, searchItem: l, shortcutsItem: a, mainItems: c, secondaryItems: b, expanded: d, setExpanded: h, currentPath: y, useHover: r, useTooltips: f, disableMode: v = "disable" }) => {
77
+ const [p, j] = L(-1), { checkUserHasPermissions: m } = S(), 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", D = "_hidden_o72rm
85
85
  disabled: t.disabled || x.disabled
86
86
  }))
87
87
  };
88
- }), [c, m]), q = P(() => h.map((t) => {
88
+ }), [c, m]), B = k(() => b.map((t) => {
89
89
  var _;
90
90
  return {
91
91
  ...t,
@@ -95,22 +95,22 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
95
95
  notPermitted: !m(x.permissions ?? [], "any")
96
96
  }))
97
97
  };
98
- }), [h, m]), N = (t) => {
99
- j(t === b ? -1 : t);
98
+ }), [b, m]), N = (t) => {
99
+ j(t === p ? -1 : t);
100
100
  };
101
101
  F(() => {
102
102
  d || j(-1);
103
103
  }, [d]);
104
104
  const M = T(null);
105
- I([M], () => p(!1));
106
- const { isMobile: o } = S();
105
+ I([M], () => h(!1));
106
+ const { isMobile: o } = $();
107
107
  return /* @__PURE__ */ e.jsxs("section", { ref: M, className: i("luminus-side-menu shadow", u.sideMenu, { [u.mobile]: o }, {
108
108
  [u.expand]: d
109
- }, { expand: d }), onMouseEnter: () => r && p(!0), onMouseLeave: () => r && p(!1), children: [
109
+ }, { expand: d }), onMouseEnter: () => r && h(!0), onMouseLeave: () => r && h(!1), children: [
110
110
  /* @__PURE__ */ e.jsx("div", { className: i("sidebar-header", u.sidebarHeader, {
111
111
  [u.onlyLogo]: r
112
- }), role: r ? void 0 : "button", onClick: r ? void 0 : () => p(!d), children: r ? n : d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
113
- /* @__PURE__ */ e.jsx($, {}),
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(A, {}),
114
114
  n
115
115
  ] }) : /* @__PURE__ */ e.jsx(z, {}) }),
116
116
  d && (l || a) ? /* @__PURE__ */ e.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
@@ -118,9 +118,9 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
118
118
  l && d ? l : null
119
119
  ] }) : null,
120
120
  /* @__PURE__ */ e.jsxs("ul", { className: u.sideMenuContent, children: [
121
- g.map((t, _) => /* @__PURE__ */ e.jsx(k, { item: t, menuExpanded: d, collapsed: _ === b, onCollapse: () => N(_), currentPath: y, useHover: r, useTooltips: f, isMobile: o, disableMode: v }, t.title)),
121
+ g.map((t, _) => /* @__PURE__ */ e.jsx(P, { item: t, menuExpanded: d, collapsed: _ === p, 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
- q.map((t, _) => /* @__PURE__ */ e.jsx(k, { item: t, menuExpanded: d, collapsed: _ === b, onCollapse: () => N(_), currentPath: y, useHover: r, useTooltips: f, isMobile: o, disableMode: v }, t.title))
123
+ B.map((t, _) => /* @__PURE__ */ e.jsx(P, { item: t, menuExpanded: d, collapsed: _ === p, 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 = {
@@ -128,16 +128,16 @@ const K = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm
128
128
  topBar: re,
129
129
  "top-bar-brand": "_top-bar-brand_lnmq0_12",
130
130
  topBarBrand: ce
131
- }, Ne = ({ appName: n, leftOffset: l, leftContent: a, centerContent: c, rightContent: h }) => /* @__PURE__ */ e.jsx("nav", { className: i("luminus-top-bar shadow", w.topBar), style: {
131
+ }, Ne = ({ appName: n, leftOffset: l, leftContent: a, centerContent: c, rightContent: b }) => /* @__PURE__ */ e.jsx("nav", { className: i("luminus-top-bar shadow", w.topBar), style: {
132
132
  width: l ? `calc(100% - ${l}px)` : void 0,
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(B, { to: "/", className: i("luminus-top-bar-brand", w.topBarBrand), children: n }),
136
+ /* @__PURE__ */ e.jsx(q, { 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 }),
140
- /* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: h ?? null })
140
+ /* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: b ?? null })
141
141
  ] }) });
142
142
  export {
143
143
  fe as PageContainer,