react-luminus-components 2.0.3-table-e1072f3ac7ab089b3730d01d4f27df97ece501c0 → 2.0.5-beta.r19-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.
Files changed (95) hide show
  1. package/README.md +349 -349
  2. package/dist/.vite/manifest.json +52 -46
  3. package/dist/FormDisabledProvider-BGEKOIzq.cjs +1 -0
  4. package/dist/FormDisabledProvider-DLOuFqTN.js +51 -0
  5. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +6 -3
  6. package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +4 -1
  7. package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +6 -1
  8. package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +1 -1
  9. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +6 -3
  10. package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +3 -1
  11. package/dist/components/Flexmonster/Flexmonster.d.ts +1 -1
  12. package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +1 -1
  13. package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +1 -1
  14. package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
  15. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
  16. package/dist/components/HookForm/MiniDetailWrapper/MiniDetailWrapper.d.ts +1 -1
  17. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +4 -17
  18. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +7 -38
  19. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +8 -38
  20. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +8 -38
  21. package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +7 -7
  22. package/dist/components/NotifCenter/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +1 -1
  23. package/dist/components/NotifCenter/Actions/types/NotificationKindFullModel.d.ts +5 -0
  24. package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +1 -1
  25. package/dist/components/ResponsiveContextDropdown/hooks/useReponsiveContextDropdownHelpers.d.ts +2 -2
  26. package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +1 -1
  27. package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +2 -2
  28. package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -1
  29. package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +1 -1
  30. package/dist/components/common/ColumnResizer/ColumnResizer.d.ts +1 -1
  31. package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +1 -1
  32. package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +7 -3
  33. package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +3 -1
  34. package/dist/components/common/HomeDashboard/comps/HomeDashboardWidget/HomeDashboardWidget.d.ts +15 -0
  35. package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +2 -2
  36. package/dist/components/common/PermissionsSubstitute/Detail/hooks/useSubstDetailForm.d.ts +8 -1
  37. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/PhotoPreviews.d.ts +15 -0
  38. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/PhotoPreview.d.ts +14 -0
  39. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/PreviewShadow/PreviewShadow.d.ts +5 -0
  40. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/index.d.ts +1 -0
  41. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/index.d.ts +1 -0
  42. package/dist/components/common/PhotoLightbox/comps/index.d.ts +1 -0
  43. package/dist/components/common/QrCode/QrCode.d.ts +1 -1
  44. package/dist/components/common/RouteLink/RouteLink.d.ts +1 -1
  45. package/dist/components/common/SimplePicker/SimplePicker.d.ts +7 -2
  46. package/dist/components/common/index.d.ts +0 -1
  47. package/dist/contexts.cjs.js +1 -1
  48. package/dist/contexts.es.js +542 -941
  49. package/dist/hooks/index.d.ts +2 -0
  50. package/dist/hooks/useAxios/useAxios.d.ts +5 -2
  51. package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
  52. package/dist/hooks/useGetApiDataBound/useGetApiDataBound.d.ts +3 -0
  53. package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +4 -2
  54. package/dist/hooks/useIsFormDirty/useIsFormDirty.d.ts +7 -0
  55. package/dist/hooks/usePersistentState/usePersistentState.d.ts +2 -0
  56. package/dist/hooks/useScrollSave/useScrollSave.d.ts +1 -1
  57. package/dist/hooks.cjs.js +1 -1
  58. package/dist/hooks.es.js +204 -125
  59. package/dist/layout.cjs.js +1 -1
  60. package/dist/layout.es.js +278 -142
  61. package/dist/{localStorageUtils-NrZA2Syo.js → localStorageUtils-CZ4HDRzi.js} +19 -9
  62. package/dist/localStorageUtils-CkZslzIU.cjs +1 -0
  63. package/dist/main.cjs.js +22 -184
  64. package/dist/main.es.js +11326 -11435
  65. package/dist/models/bntTable/IBnfTableDefColumn.d.ts +40 -0
  66. package/dist/models/prop-types/InputContainerProps.d.ts +4 -12
  67. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +6 -1
  68. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +4 -2
  69. package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +1 -1
  70. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +1 -1
  71. package/dist/models/ui/notifications/NotificationHistoryTableModel.d.ts +6 -0
  72. package/dist/nivo-bar-BuQvk7Aq.cjs +326 -0
  73. package/dist/nivo-bar-W-IB9CF6.js +41891 -0
  74. package/dist/style.css +1 -1
  75. package/dist/useIsFormDirty-B4keXaXH.js +123 -0
  76. package/dist/useIsFormDirty-CNKHbm_I.cjs +1 -0
  77. package/dist/useLocalStorageState-CMAthsbd.js +95 -0
  78. package/dist/useLocalStorageState-f6nawg6B.cjs +1 -0
  79. package/dist/utils/index.d.ts +1 -0
  80. package/dist/utils/route/apiPathUtils.d.ts +1 -1
  81. package/dist/utils/storages/queryStorage.d.ts +3 -0
  82. package/dist/utils.cjs.js +1 -1
  83. package/dist/utils.es.js +128 -127
  84. package/dist/variables.scss +165 -165
  85. package/package.json +128 -123
  86. package/dist/FormDisabledProvider-BENIIq5o.cjs +0 -1
  87. package/dist/FormDisabledProvider-DN0NV09N.js +0 -40
  88. package/dist/ShortcutLinksContext-CVP_4yAx.js +0 -39866
  89. package/dist/ShortcutLinksContext-D_psima9.cjs +0 -334
  90. package/dist/components/common/StrictModeDroppable/StrictModeDroppable.d.ts +0 -5
  91. package/dist/localStorageUtils-CFey67IX.cjs +0 -1
  92. package/dist/useLocalStorageState-87deuPpL.js +0 -78
  93. package/dist/useLocalStorageState-BtFEXGD_.cjs +0 -1
  94. package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +0 -78
  95. package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +0 -1
package/dist/layout.es.js CHANGED
@@ -1,154 +1,290 @@
1
- import { bx as L, j as e, c as l, Y as w, ao as $, bb as q, a2 as A, bD as O, bE as D } from "./ShortcutLinksContext-CVP_4yAx.js";
2
- import { b9 as Pe, bF as Be } from "./ShortcutLinksContext-CVP_4yAx.js";
3
- import { useState as R, useRef as S, useMemo as B, useEffect as F } from "react";
4
- import { Link as C } from "react-router-dom";
1
+ import { jsxs as B, jsx as i, Fragment as ie } from "react/jsx-runtime";
2
+ import { aR as de, a as u, $ as le, c as te, aE as me, bv as pe, aG as ue, bG as fe, bH as _e } from "./nivo-bar-W-IB9CF6.js";
3
+ import { aC as ot, bI as it } from "./nivo-bar-W-IB9CF6.js";
4
+ import { useState as ae, useRef as re, useEffect as he } from "react";
5
+ import { Link as ee } from "react-router";
5
6
  import "react-hook-form";
6
7
  import "react-flexmonster";
7
8
  import "@azure/msal-browser";
8
9
  import "@azure/msal-react";
10
+ import "@tanstack/react-query";
9
11
  import "react-dom";
10
- const E = "_side-menu-item_o72rm_1", K = "_disabled_o72rm_6", z = "_hidden_o72rm_10", G = "_nav-button_o72rm_13", H = "_child_o72rm_21", U = "_text_o72rm_26", W = "_icon_o72rm_36", Y = "_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", ee = "_children_o72rm_92", ne = "_mobile_o72rm_112", s = {
11
- "side-menu-item": "_side-menu-item_o72rm_1",
12
- sideMenuItem: E,
13
- disabled: K,
14
- hidden: z,
15
- "nav-button": "_nav-button_o72rm_13",
16
- navButton: G,
17
- child: H,
18
- text: U,
19
- icon: W,
20
- "collapse-icon": "_collapse-icon_o72rm_42",
21
- collapseIcon: Y,
22
- collapsed: J,
23
- "collapse-icon-mini": "_collapse-icon-mini_o72rm_55",
24
- collapseIconMini: Q,
25
- expanded: V,
26
- "children-container": "_children-container_o72rm_92",
27
- childrenContainer: X,
28
- visible: Z,
29
- children: ee,
30
- mobile: ne
31
- }, se = ({ item: n, menuExpanded: t, useTooltips: a, children: _ }) => n.tooltip && !t && a ? /* @__PURE__ */ e.jsx($, { text: n.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ e.jsx("div", { children: _ }) }) : _, I = ({ item: n, menuExpanded: t, collapsed: a, onCollapse: _, currentPath: h, useHover: d, useTooltips: x, isMobile: M, disableMode: c }) => {
32
- var j, y, N, g;
33
- const [f, b] = R(!1), [v] = h.split("?"), k = n.linkTo === v || ((j = n.children) == null ? void 0 : j.some((i) => i.linkTo === v)), m = S(null);
34
- return L([m], () => a && _()), /* @__PURE__ */ e.jsxs("li", { ref: m, className: l("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: M }, {
35
- [s.expanded]: t
36
- }, { active: f || k }, { open: a && n.children }, {
37
- [c === "disable" ? s.disabled : s.hidden]: n.disabled || n.notPermitted || ((y = n.children) == null ? void 0 : y.every((i) => i.notPermitted || i.disabled))
12
+ const be = "_side-menu-item_o72rm_1", ve = "_disabled_o72rm_6", xe = "_hidden_o72rm_10", ye = "_nav-button_o72rm_13", Me = "_child_o72rm_21", Ne = "_text_o72rm_26", Ie = "_icon_o72rm_36", ke = "_collapse-icon_o72rm_42", ge = "_collapsed_o72rm_52", Ce = "_collapse-icon-mini_o72rm_55", Pe = "_expanded_o72rm_86", Be = "_children-container_o72rm_92", Te = "_visible_o72rm_100", we = "_children_o72rm_92", Se = "_mobile_o72rm_112", r = {
13
+ sideMenuItem: be,
14
+ disabled: ve,
15
+ hidden: xe,
16
+ navButton: ye,
17
+ child: Me,
18
+ text: Ne,
19
+ icon: Ie,
20
+ collapseIcon: ke,
21
+ collapsed: ge,
22
+ collapseIconMini: Ce,
23
+ expanded: Pe,
24
+ childrenContainer: Be,
25
+ visible: Te,
26
+ children: we,
27
+ mobile: Se
28
+ }, He = (s) => {
29
+ const e = te.c(6), {
30
+ item: m,
31
+ menuExpanded: h,
32
+ useTooltips: x,
33
+ children: N
34
+ } = s;
35
+ if (m.tooltip && !h && x) {
36
+ let I;
37
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (I = {
38
+ show: 1e3,
39
+ hide: 0
40
+ }, e[0] = I) : I = e[0];
41
+ let t;
42
+ e[1] !== N ? (t = /* @__PURE__ */ i("div", { children: N }), e[1] = N, e[2] = t) : t = e[2];
43
+ let d;
44
+ return e[3] !== m.tooltip || e[4] !== t ? (d = /* @__PURE__ */ i(me, { text: m.tooltip, placement: "top", delay: I, children: t }), e[3] = m.tooltip, e[4] = t, e[5] = d) : d = e[5], d;
45
+ }
46
+ return N;
47
+ }, se = ({
48
+ item: s,
49
+ menuExpanded: e,
50
+ collapsed: m,
51
+ onCollapse: h,
52
+ currentPath: x,
53
+ useHover: N,
54
+ useTooltips: I,
55
+ isMobile: t,
56
+ disableMode: d
57
+ }) => {
58
+ var c, y, p, v;
59
+ const [b, n] = ae(!1), [f] = x.split("?"), k = s.linkTo === f || ((c = s.children) == null ? void 0 : c.some((l) => l.linkTo === f)), a = re(null);
60
+ return de([a], () => m && h()), /* @__PURE__ */ B("li", { ref: a, className: u("luminus-side-menu-item", r.sideMenuItem, {
61
+ [r.mobile]: t
38
62
  }, {
39
- [c === "disable" ? "disabled" : "hidden"]: n.disabled || n.notPermitted || ((N = n.children) == null ? void 0 : N.every((i) => i.notPermitted || i.disabled))
40
- }), onMouseEnter: () => b(!0), onMouseLeave: () => b(!1), children: [
41
- /* @__PURE__ */ e.jsx(se, { item: n, menuExpanded: t, useTooltips: x, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: l("nav-link", s.navButton), onClick: () => {
42
- _();
63
+ [r.expanded]: e
64
+ }, {
65
+ active: b || k
66
+ }, {
67
+ open: m && s.children
68
+ }, {
69
+ [d === "disable" ? r.disabled : r.hidden]: s.disabled || s.notPermitted || ((y = s.children) == null ? void 0 : y.every((l) => l.notPermitted || l.disabled))
70
+ }, {
71
+ [d === "disable" ? "disabled" : "hidden"]: s.disabled || s.notPermitted || ((p = s.children) == null ? void 0 : p.every((l) => l.notPermitted || l.disabled))
72
+ }), onMouseEnter: () => n(!0), onMouseLeave: () => n(!1), children: [
73
+ /* @__PURE__ */ i(He, { item: s, menuExpanded: e, useTooltips: I, children: s.children ? /* @__PURE__ */ i(ie, { children: /* @__PURE__ */ B("button", { type: "button", className: u("nav-link", r.navButton), onClick: () => {
74
+ h();
43
75
  }, children: [
44
- /* @__PURE__ */ e.jsx("div", { className: l("icon", s.icon), children: n.icon }),
45
- !d && !t && /* @__PURE__ */ e.jsx("div", { className: l("collapse-icon-mini rounded", s.collapseIconMini, {
46
- [s.collapsed]: a
47
- }), children: /* @__PURE__ */ e.jsx(w, {}) }),
48
- t && /* @__PURE__ */ e.jsx("div", { className: l("text", s.text, "text-nowrap"), children: n.title }),
49
- t && /* @__PURE__ */ e.jsx("div", { className: l("collapse-icon", s.collapseIcon, {
50
- [s.collapsed]: a
51
- }), children: /* @__PURE__ */ e.jsx(w, {}) })
52
- ] }) }) : /* @__PURE__ */ e.jsxs(C, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: l("nav-link", s.navButton), children: [
53
- /* @__PURE__ */ e.jsx("div", { className: l("icon", s.icon), children: n.icon }),
54
- t && /* @__PURE__ */ e.jsx("div", { className: l("text", s.text, "text-nowrap"), children: n.title })
76
+ /* @__PURE__ */ i("div", { className: u("icon", r.icon), children: s.icon }),
77
+ !N && !e && /* @__PURE__ */ i("div", { className: u("collapse-icon-mini rounded", r.collapseIconMini, {
78
+ [r.collapsed]: m
79
+ }), children: /* @__PURE__ */ i(le, {}) }),
80
+ e && /* @__PURE__ */ i("div", { className: u("text", r.text, "text-nowrap"), children: s.title }),
81
+ e && /* @__PURE__ */ i("div", { className: u("collapse-icon", r.collapseIcon, {
82
+ [r.collapsed]: m
83
+ }), children: /* @__PURE__ */ i(le, {}) })
84
+ ] }) }) : /* @__PURE__ */ B(ee, { to: s.disabled || s.notPermitted ? "/" : s.linkTo ?? "/", className: u("nav-link", r.navButton), children: [
85
+ /* @__PURE__ */ i("div", { className: u("icon", r.icon), children: s.icon }),
86
+ e && /* @__PURE__ */ i("div", { className: u("text", r.text, "text-nowrap"), children: s.title })
55
87
  ] }) }),
56
- /* @__PURE__ */ e.jsx("div", { className: l("children-container", s.childrenContainer, {
57
- [s.visible]: a
58
- }), children: /* @__PURE__ */ e.jsx("div", { className: l("shadow rounded children", s.children), children: (g = n.children) == null ? void 0 : g.map((i) => /* @__PURE__ */ e.jsx(C, { to: i.disabled || i.notPermitted ? "/" : i.linkTo ?? "/", className: l("nav-link child rounded", s.navButton, s.child, {
59
- [c === "disable" ? s.disabled : s.hidden]: i.disabled || i.notPermitted
88
+ /* @__PURE__ */ i("div", { className: u("children-container", r.childrenContainer, {
89
+ [r.visible]: m
90
+ }), children: /* @__PURE__ */ i("div", { className: u("shadow rounded children", r.children), children: (v = s.children) == null ? void 0 : v.map((l) => /* @__PURE__ */ i(ee, { to: l.disabled || l.notPermitted ? "/" : l.linkTo ?? "/", className: u("nav-link child rounded", r.navButton, r.child, {
91
+ [d === "disable" ? r.disabled : r.hidden]: l.disabled || l.notPermitted
60
92
  }, {
61
- [c === "disable" ? "disabled" : "hidden"]: i.disabled || i.notPermitted
62
- }), onClick: _, children: /* @__PURE__ */ e.jsx("div", { className: l("text", s.text, "text-nowrap"), children: i.title }) }, i.linkTo)) }) })
63
- ] });
64
- }, oe = "_side-menu_12rky_1", ie = "_sidebar-header_12rky_15", le = "_side-menu-content_12rky_22", te = "_no-top-margin_12rky_28", re = "_expand_12rky_34", ae = "_only-logo_12rky_38", de = "_mobile_12rky_41", ce = "_divider_12rky_56", u = {
65
- "side-menu": "_side-menu_12rky_1",
66
- sideMenu: oe,
67
- "sidebar-header": "_sidebar-header_12rky_15",
68
- sidebarHeader: ie,
69
- "side-menu-content": "_side-menu-content_12rky_22",
70
- sideMenuContent: le,
71
- "no-top-margin": "_no-top-margin_12rky_28",
72
- noTopMargin: te,
73
- expand: re,
74
- "only-logo": "_only-logo_12rky_38",
75
- onlyLogo: ae,
76
- mobile: de,
77
- divider: ce
78
- }, _e = 14, Ne = ({ headerItem: n, searchItem: t, shortcutsItem: a, mainItems: _, secondaryItems: h, expanded: d, setExpanded: x, currentPath: M, useHover: c, useTooltips: f, disableMode: b = "disable" }) => {
79
- const [v, k] = R(-1), { checkUserHasPermissions: m } = q(), j = B(() => _.map((o) => {
80
- var r;
81
- return {
82
- ...o,
83
- notPermitted: !m(o.permissions ?? [], "any"),
84
- children: (r = o.children) == null ? void 0 : r.map((p) => ({
85
- ...p,
86
- notPermitted: !m(p.permissions ?? [], "any"),
87
- disabled: o.disabled || p.disabled
88
- }))
89
- };
90
- }), [_, m]), y = B(() => h.map((o) => {
91
- var r;
92
- return {
93
- ...o,
94
- notPermitted: !m(o.permissions ?? [], "any"),
95
- children: (r = o.children) == null ? void 0 : r.map((p) => ({
96
- ...p,
97
- notPermitted: !m(p.permissions ?? [], "any")
98
- }))
99
- };
100
- }), [h, m]), N = (o) => {
101
- k(o === v ? -1 : o);
102
- };
103
- F(() => {
104
- d || k(-1);
105
- }, [d]);
106
- const g = S(null);
107
- L([g], () => x(!1));
108
- const i = B(() => [...j, ...y].filter((o) => {
109
- var r;
110
- return b === "hide" ? !o.disabled && !o.notPermitted && (((r = o.children) == null ? void 0 : r.filter((p) => !p.disabled && !p.notPermitted)) ?? []).length > 0 : !0;
111
- }), [j, y, b]), { isMobile: P } = A();
112
- return /* @__PURE__ */ e.jsxs("section", { ref: g, className: l("luminus-side-menu shadow", u.sideMenu, { [u.mobile]: P }, {
113
- [u.expand]: d
114
- }, { expand: d }), onMouseEnter: () => c && x(!0), onMouseLeave: () => c && x(!1), children: [
115
- /* @__PURE__ */ e.jsx("div", { className: l("sidebar-header", u.sidebarHeader, {
116
- [u.onlyLogo]: c
117
- }), role: c ? void 0 : "button", onClick: c ? void 0 : () => x(!d), children: c ? n : d ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
118
- /* @__PURE__ */ e.jsx(O, {}),
119
- n
120
- ] }) : /* @__PURE__ */ e.jsx(D, {}) }),
121
- d && (t || a) ? /* @__PURE__ */ e.jsxs("div", { className: "mb-3 d-flex flex-column gap-3", children: [
122
- a && d ? a : null,
123
- t && d ? t : null
124
- ] }) : null,
125
- /* @__PURE__ */ e.jsxs("ul", { className: l(u.sideMenuContent, {
126
- [u.noTopMargin]: i.length > _e
127
- }), children: [
128
- j.map((o, r) => /* @__PURE__ */ e.jsx(I, { item: o, menuExpanded: d, collapsed: r === v, onCollapse: () => N(r), currentPath: M, useHover: c, useTooltips: f, isMobile: P, disableMode: b }, o.title)),
129
- /* @__PURE__ */ e.jsx("hr", { className: l("divider", u.divider) }),
130
- y.map((o, r) => /* @__PURE__ */ e.jsx(I, { item: o, menuExpanded: d, collapsed: r === v, onCollapse: () => N(r), currentPath: M, useHover: c, useTooltips: f, isMobile: P, disableMode: b }, o.title))
131
- ] })
93
+ [d === "disable" ? "disabled" : "hidden"]: l.disabled || l.notPermitted
94
+ }), onClick: h, children: /* @__PURE__ */ i("div", { className: u("text", r.text, "text-nowrap"), children: l.title }) }, l.linkTo)) }) })
132
95
  ] });
133
- }, me = "_top-bar_lnmq0_1", pe = "_top-bar-brand_lnmq0_12", T = {
134
- "top-bar": "_top-bar_lnmq0_1",
135
- topBar: me,
136
- "top-bar-brand": "_top-bar-brand_lnmq0_12",
137
- topBarBrand: pe
138
- }, ge = ({ appName: n, leftOffset: t, leftContent: a, centerContent: _, rightContent: h }) => /* @__PURE__ */ e.jsx("nav", { className: l("luminus-top-bar shadow", T.topBar), style: {
139
- width: t ? `calc(100% - ${t}px)` : void 0,
140
- left: t ? `${t}px` : void 0
141
- }, children: /* @__PURE__ */ e.jsxs("div", { className: "w-100 row g-0", children: [
142
- /* @__PURE__ */ e.jsxs("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
143
- /* @__PURE__ */ e.jsx(C, { to: "/", className: l("luminus-top-bar-brand", T.topBarBrand), children: n }),
144
- a
145
- ] }),
146
- /* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex align-items-center", children: _ ?? null }),
147
- /* @__PURE__ */ e.jsx("div", { className: "col-4 d-flex justify-content-end align-items-center", children: h ?? null })
148
- ] }) });
96
+ }, Re = "_side-menu_12rky_1", $e = "_sidebar-header_12rky_15", Le = "_side-menu-content_12rky_22", Oe = "_no-top-margin_12rky_28", Ee = "_expand_12rky_34", Ae = "_only-logo_12rky_38", je = "_mobile_12rky_41", Ge = "_divider_12rky_56", T = {
97
+ sideMenu: Re,
98
+ sidebarHeader: $e,
99
+ sideMenuContent: Le,
100
+ noTopMargin: Oe,
101
+ expand: Ee,
102
+ onlyLogo: Ae,
103
+ mobile: je,
104
+ divider: Ge
105
+ }, qe = 14, tt = (s) => {
106
+ const e = te.c(100), {
107
+ headerItem: m,
108
+ searchItem: h,
109
+ shortcutsItem: x,
110
+ mainItems: N,
111
+ secondaryItems: I,
112
+ expanded: t,
113
+ setExpanded: d,
114
+ currentPath: b,
115
+ useHover: n,
116
+ useTooltips: f,
117
+ disableMode: k
118
+ } = s, a = k === void 0 ? "disable" : k, [c, y] = ae(-1), {
119
+ checkUserHasPermissions: p
120
+ } = pe();
121
+ let v;
122
+ if (e[0] !== p || e[1] !== N) {
123
+ let o;
124
+ e[3] !== p ? (o = (_) => {
125
+ var g;
126
+ return {
127
+ ..._,
128
+ notPermitted: !p(_.permissions ?? [], "any"),
129
+ children: (g = _.children) == null ? void 0 : g.map((K) => ({
130
+ ...K,
131
+ notPermitted: !p(K.permissions ?? [], "any"),
132
+ disabled: _.disabled || K.disabled
133
+ }))
134
+ };
135
+ }, e[3] = p, e[4] = o) : o = e[4], v = N.map(o), e[0] = p, e[1] = N, e[2] = v;
136
+ } else
137
+ v = e[2];
138
+ const l = v;
139
+ let P;
140
+ if (e[5] !== p || e[6] !== I) {
141
+ let o;
142
+ e[8] !== p ? (o = (_) => {
143
+ var g;
144
+ return {
145
+ ..._,
146
+ notPermitted: !p(_.permissions ?? [], "any"),
147
+ children: (g = _.children) == null ? void 0 : g.map((K) => ({
148
+ ...K,
149
+ notPermitted: !p(K.permissions ?? [], "any")
150
+ }))
151
+ };
152
+ }, e[8] = p, e[9] = o) : o = e[9], P = I.map(o), e[5] = p, e[6] = I, e[7] = P;
153
+ } else
154
+ P = e[7];
155
+ const w = P;
156
+ let z;
157
+ e[10] !== c ? (z = (o) => {
158
+ y(o === c ? -1 : o);
159
+ }, e[10] = c, e[11] = z) : z = e[11];
160
+ const C = z;
161
+ let F, U;
162
+ e[12] !== t ? (F = () => {
163
+ t || y(-1);
164
+ }, U = [t], e[12] = t, e[13] = F, e[14] = U) : (F = e[13], U = e[14]), he(F, U);
165
+ const ne = re(null);
166
+ let W;
167
+ e[15] === Symbol.for("react.memo_cache_sentinel") ? (W = [ne], e[15] = W) : W = e[15];
168
+ let J;
169
+ e[16] !== d ? (J = () => d(!1), e[16] = d, e[17] = J) : J = e[17], de(W, J);
170
+ let Q;
171
+ e[18] !== a || e[19] !== l || e[20] !== w ? (Q = [...l, ...w].filter((o) => {
172
+ var _;
173
+ return a === "hide" ? !o.disabled && !o.notPermitted && (((_ = o.children) == null ? void 0 : _.filter(De)) ?? []).length > 0 : !0;
174
+ }), e[18] = a, e[19] = l, e[20] = w, e[21] = Q) : Q = e[21];
175
+ const ce = Q, {
176
+ isMobile: M
177
+ } = ue();
178
+ let S;
179
+ e[22] !== t || e[23] !== M ? (S = u("luminus-side-menu shadow", T.sideMenu, {
180
+ [T.mobile]: M
181
+ }, {
182
+ [T.expand]: t
183
+ }, {
184
+ expand: t
185
+ }), e[22] = t, e[23] = M, e[24] = S) : S = e[24];
186
+ let H, R;
187
+ e[25] !== d || e[26] !== n ? (H = () => n && d(!0), R = () => n && d(!1), e[25] = d, e[26] = n, e[27] = H, e[28] = R) : (H = e[27], R = e[28]);
188
+ let $;
189
+ e[29] !== n ? ($ = u("sidebar-header", T.sidebarHeader, {
190
+ [T.onlyLogo]: n
191
+ }), e[29] = n, e[30] = $) : $ = e[30];
192
+ const Y = n ? void 0 : "button";
193
+ let L;
194
+ e[31] !== t || e[32] !== d || e[33] !== n ? (L = n ? void 0 : () => d(!t), e[31] = t, e[32] = d, e[33] = n, e[34] = L) : L = e[34];
195
+ let O;
196
+ e[35] !== t || e[36] !== m || e[37] !== n ? (O = n ? m : t ? /* @__PURE__ */ B(ie, { children: [
197
+ /* @__PURE__ */ i(fe, {}),
198
+ m
199
+ ] }) : /* @__PURE__ */ i(_e, {}), e[35] = t, e[36] = m, e[37] = n, e[38] = O) : O = e[38];
200
+ let E;
201
+ e[39] !== $ || e[40] !== Y || e[41] !== L || e[42] !== O ? (E = /* @__PURE__ */ i("div", { className: $, role: Y, onClick: L, children: O }), e[39] = $, e[40] = Y, e[41] = L, e[42] = O, e[43] = E) : E = e[43];
202
+ let A;
203
+ e[44] !== t || e[45] !== h || e[46] !== x ? (A = t && (h || x) ? /* @__PURE__ */ B("div", { className: "mb-3 d-flex flex-column gap-3", children: [
204
+ x && t ? x : null,
205
+ h && t ? h : null
206
+ ] }) : null, e[44] = t, e[45] = h, e[46] = x, e[47] = A) : A = e[47];
207
+ const Z = ce.length > qe;
208
+ let j;
209
+ e[48] !== Z ? (j = u(T.sideMenuContent, {
210
+ [T.noTopMargin]: Z
211
+ }), e[48] = Z, e[49] = j) : j = e[49];
212
+ let G;
213
+ if (e[50] !== c || e[51] !== b || e[52] !== a || e[53] !== t || e[54] !== M || e[55] !== l || e[56] !== C || e[57] !== n || e[58] !== f) {
214
+ let o;
215
+ e[60] !== c || e[61] !== b || e[62] !== a || e[63] !== t || e[64] !== M || e[65] !== C || e[66] !== n || e[67] !== f ? (o = (_, g) => /* @__PURE__ */ i(se, { item: _, menuExpanded: t, collapsed: g === c, onCollapse: () => C(g), currentPath: b, useHover: n, useTooltips: f, isMobile: M, disableMode: a }, _.title), e[60] = c, e[61] = b, e[62] = a, e[63] = t, e[64] = M, e[65] = C, e[66] = n, e[67] = f, e[68] = o) : o = e[68], G = l.map(o), e[50] = c, e[51] = b, e[52] = a, e[53] = t, e[54] = M, e[55] = l, e[56] = C, e[57] = n, e[58] = f, e[59] = G;
216
+ } else
217
+ G = e[59];
218
+ let V;
219
+ e[69] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ i("hr", { className: u("divider", T.divider) }), e[69] = V) : V = e[69];
220
+ let q;
221
+ if (e[70] !== c || e[71] !== b || e[72] !== a || e[73] !== t || e[74] !== M || e[75] !== C || e[76] !== w || e[77] !== n || e[78] !== f) {
222
+ let o;
223
+ e[80] !== c || e[81] !== b || e[82] !== a || e[83] !== t || e[84] !== M || e[85] !== C || e[86] !== n || e[87] !== f ? (o = (_, g) => /* @__PURE__ */ i(se, { item: _, menuExpanded: t, collapsed: g === c, onCollapse: () => C(g), currentPath: b, useHover: n, useTooltips: f, isMobile: M, disableMode: a }, _.title), e[80] = c, e[81] = b, e[82] = a, e[83] = t, e[84] = M, e[85] = C, e[86] = n, e[87] = f, e[88] = o) : o = e[88], q = w.map(o), e[70] = c, e[71] = b, e[72] = a, e[73] = t, e[74] = M, e[75] = C, e[76] = w, e[77] = n, e[78] = f, e[79] = q;
224
+ } else
225
+ q = e[79];
226
+ let D;
227
+ e[89] !== j || e[90] !== G || e[91] !== q ? (D = /* @__PURE__ */ B("ul", { className: j, children: [
228
+ G,
229
+ V,
230
+ q
231
+ ] }), e[89] = j, e[90] = G, e[91] = q, e[92] = D) : D = e[92];
232
+ let X;
233
+ return e[93] !== S || e[94] !== H || e[95] !== R || e[96] !== E || e[97] !== A || e[98] !== D ? (X = /* @__PURE__ */ B("section", { ref: ne, className: S, onMouseEnter: H, onMouseLeave: R, children: [
234
+ E,
235
+ A,
236
+ D
237
+ ] }), e[93] = S, e[94] = H, e[95] = R, e[96] = E, e[97] = A, e[98] = D, e[99] = X) : X = e[99], X;
238
+ };
239
+ function De(s) {
240
+ return !s.disabled && !s.notPermitted;
241
+ }
242
+ const Ke = "_top-bar_lnmq0_1", ze = "_top-bar-brand_lnmq0_12", oe = {
243
+ topBar: Ke,
244
+ topBarBrand: ze
245
+ }, nt = (s) => {
246
+ const e = te.c(21), {
247
+ appName: m,
248
+ leftOffset: h,
249
+ leftContent: x,
250
+ centerContent: N,
251
+ rightContent: I
252
+ } = s;
253
+ let t;
254
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = u("luminus-top-bar shadow", oe.topBar), e[0] = t) : t = e[0];
255
+ const d = h ? `calc(100% - ${h}px)` : void 0, b = h ? `${h}px` : void 0;
256
+ let n;
257
+ e[1] !== d || e[2] !== b ? (n = {
258
+ width: d,
259
+ left: b
260
+ }, e[1] = d, e[2] = b, e[3] = n) : n = e[3];
261
+ let f;
262
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = u("luminus-top-bar-brand", oe.topBarBrand), e[4] = f) : f = e[4];
263
+ let k;
264
+ e[5] !== m ? (k = /* @__PURE__ */ i(ee, { to: "/", className: f, children: m }), e[5] = m, e[6] = k) : k = e[6];
265
+ let a;
266
+ e[7] !== x || e[8] !== k ? (a = /* @__PURE__ */ B("div", { className: "col-4 d-flex gap-3 align-items-center", children: [
267
+ k,
268
+ x
269
+ ] }), e[7] = x, e[8] = k, e[9] = a) : a = e[9];
270
+ const c = N ?? null;
271
+ let y;
272
+ e[10] !== c ? (y = /* @__PURE__ */ i("div", { className: "col-4 d-flex align-items-center", children: c }), e[10] = c, e[11] = y) : y = e[11];
273
+ const p = I ?? null;
274
+ let v;
275
+ e[12] !== p ? (v = /* @__PURE__ */ i("div", { className: "col-4 d-flex justify-content-end align-items-center", children: p }), e[12] = p, e[13] = v) : v = e[13];
276
+ let l;
277
+ e[14] !== v || e[15] !== a || e[16] !== y ? (l = /* @__PURE__ */ B("div", { className: "w-100 row g-0", children: [
278
+ a,
279
+ y,
280
+ v
281
+ ] }), e[14] = v, e[15] = a, e[16] = y, e[17] = l) : l = e[17];
282
+ let P;
283
+ return e[18] !== l || e[19] !== n ? (P = /* @__PURE__ */ i("nav", { className: t, style: n, children: l }), e[18] = l, e[19] = n, e[20] = P) : P = e[20], P;
284
+ };
149
285
  export {
150
- Pe as PageContainer,
151
- Be as SideContentBar,
152
- Ne as SideMenu,
153
- ge as TopBar
286
+ ot as PageContainer,
287
+ it as SideContentBar,
288
+ tt as SideMenu,
289
+ nt as TopBar
154
290
  };
@@ -1,4 +1,4 @@
1
- import { generatePath as u } from "react-router-dom";
1
+ import { generatePath as u } from "react-router";
2
2
  const S = (r, t, o) => {
3
3
  let e = r;
4
4
  return t !== void 0 && (e = Math.max(e, t)), o !== void 0 && (e = Math.min(e, o)), e;
@@ -13,20 +13,30 @@ function g(r, t) {
13
13
  }
14
14
  const l = (r, t, o = !0) => Object.keys(r).reduce((e, n) => {
15
15
  const c = r[n];
16
- return o && (c == null || c === "") || (e[n] = t(c, n)), e;
16
+ return o && c == null || (e[n] = t(c, n)), e;
17
17
  }, {}), f = (r, t) => {
18
18
  const o = t != null && t.query ? new URLSearchParams(l(t.query, (e) => (e == null ? void 0 : e.toString()) ?? "")) : null;
19
19
  return `${u(r, t != null && t.path ? l(t.path, (e) => (e == null ? void 0 : e.toString()) ?? null) : void 0)}${o && o.size > 0 ? `?${o.toString()}` : ""}`;
20
- }, s = [
21
- { key: "msal", mode: "includes" },
22
- { key: "token", mode: "exact" },
23
- { key: "user", mode: "exact" },
24
- { key: "user-delegation", mode: "exact" }
25
- ], d = (r = !0) => {
20
+ }, s = [{
21
+ key: "msal",
22
+ mode: "includes"
23
+ }, {
24
+ key: "token",
25
+ mode: "exact"
26
+ }, {
27
+ key: "user",
28
+ mode: "exact"
29
+ }, {
30
+ key: "user-delegation",
31
+ mode: "exact"
32
+ }], d = (r = !0) => {
26
33
  const t = {};
27
34
  for (let o = 0; o < localStorage.length; o++) {
28
35
  const e = localStorage.key(o);
29
- if (e && !(r && s.some(({ key: n, mode: c }) => c === "includes" ? e.includes(n) : e === n)))
36
+ if (e && !(r && s.some(({
37
+ key: n,
38
+ mode: c
39
+ }) => c === "includes" ? e.includes(n) : e === n)))
30
40
  try {
31
41
  t[e] = JSON.parse(localStorage.getItem(e));
32
42
  } catch {
@@ -0,0 +1 @@
1
+ "use strict";const i=require("react-router"),s=(r,t,o)=>{let e=r;return t!==void 0&&(e=Math.max(e,t)),o!==void 0&&(e=Math.min(e,o)),e};function u(r,t){r.setValue(t,null)}function S(r,t){t.forEach(o=>{u(r,o)})}const l=(r,t,o=!0)=>Object.keys(r).reduce((e,n)=>{const c=r[n];return o&&c==null||(e[n]=t(c,n)),e},{}),a=(r,t)=>{const o=t!=null&&t.query?new URLSearchParams(l(t.query,e=>(e==null?void 0:e.toString())??"")):null;return`${i.generatePath(r,t!=null&&t.path?l(t.path,e=>(e==null?void 0:e.toString())??null):void 0)}${o&&o.size>0?`?${o.toString()}`:""}`},g=[{key:"msal",mode:"includes"},{key:"token",mode:"exact"},{key:"user",mode:"exact"},{key:"user-delegation",mode:"exact"}],h=(r=!0)=>{const t={};for(let o=0;o<localStorage.length;o++){const e=localStorage.key(o);if(e&&!(r&&g.some(({key:n,mode:c})=>c==="includes"?e.includes(n):e===n)))try{t[e]=JSON.parse(localStorage.getItem(e))}catch{t[e]=localStorage.getItem(e)}}return t},f=r=>{try{const t=JSON.parse(r);if(typeof t!="object"||t===null)return!1;Object.entries(t).forEach(([o,e])=>{localStorage.setItem(o,JSON.stringify(e))})}catch{return!1}return localStorage.removeItem("BnfTable-SettingsMigration"),!0};exports.dumpLocalStorage=h;exports.generateApiPath=a;exports.hookFormSetNull=u;exports.hookFormSetNulls=S;exports.limitNumber=s;exports.restoreLocalStorage=f;