react-luminus-components 2.0.3-beta.r19-18 → 2.0.4-table
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 +46 -52
- package/dist/FormDisabledProvider-1MOB6N34.cjs +1 -0
- package/dist/FormDisabledProvider-CHZ2m_zJ.js +40 -0
- package/dist/ShortcutLinksContext-DEirK-v9.js +39884 -0
- package/dist/ShortcutLinksContext-DLi4B8z5.cjs +334 -0
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +3 -6
- package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +1 -4
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +1 -6
- package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +1 -1
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +3 -6
- package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +1 -3
- package/dist/components/Flexmonster/Flexmonster.d.ts +1 -1
- package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +1 -1
- package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +1 -1
- package/dist/components/HookForm/MiniDetailWrapper/MiniDetailWrapper.d.ts +1 -1
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +17 -4
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +38 -7
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +38 -8
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +38 -8
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +3 -3
- package/dist/components/NotifCenter/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +1 -1
- package/dist/components/NotifCenter/Actions/types/NotificationHistoryTableModel.d.ts +5 -0
- package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +1 -1
- package/dist/components/ResponsiveContextDropdown/hooks/useReponsiveContextDropdownHelpers.d.ts +2 -2
- package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +1 -1
- package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +2 -2
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -1
- package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +1 -1
- package/dist/components/common/ColumnResizer/ColumnResizer.d.ts +1 -1
- package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +1 -1
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +3 -7
- package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +1 -3
- package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +2 -2
- package/dist/components/common/PermissionsSubstitute/Detail/hooks/useSubstDetailForm.d.ts +1 -8
- package/dist/components/common/QrCode/QrCode.d.ts +1 -1
- package/dist/components/common/RouteLink/RouteLink.d.ts +1 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +1 -1
- package/dist/components/common/StrictModeDroppable/StrictModeDroppable.d.ts +5 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +941 -542
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useAxios/useAxios.d.ts +2 -5
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
- package/dist/hooks/useGetApiDataBound/useGetApiDataBound.d.ts +0 -3
- package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +2 -4
- package/dist/hooks/useScrollSave/useScrollSave.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +136 -206
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +142 -278
- package/dist/localStorageUtils-89Gfn6XS.cjs +1 -0
- package/dist/{localStorageUtils-CZ4HDRzi.js → localStorageUtils-DdeuyghB.js} +8 -18
- package/dist/main.cjs.js +183 -21
- package/dist/main.es.js +11492 -11359
- package/dist/models/prop-types/InputContainerProps.d.ts +12 -4
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +1 -1
- package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +2 -4
- package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +1 -1
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/useLocalStorageState-B-CRodSS.cjs +1 -0
- package/dist/useLocalStorageState-BPYqQMTu.js +78 -0
- package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +78 -0
- package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/route/apiPathUtils.d.ts +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +159 -133
- package/dist/variables.scss +165 -165
- package/package.json +123 -128
- package/dist/FormDisabledProvider-Bi6oyt5U.js +0 -51
- package/dist/FormDisabledProvider-D5KzXgMJ.cjs +0 -1
- package/dist/components/common/HomeDashboard/comps/HomeDashboardWidget/HomeDashboardWidget.d.ts +0 -15
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/PhotoPreviews.d.ts +0 -15
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/PhotoPreview.d.ts +0 -14
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/PreviewShadow/PreviewShadow.d.ts +0 -5
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/index.d.ts +0 -1
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/index.d.ts +0 -1
- package/dist/components/common/PhotoLightbox/comps/index.d.ts +0 -1
- package/dist/hooks/useIsFormDirty/useIsFormDirty.d.ts +0 -7
- package/dist/localStorageUtils-CkZslzIU.cjs +0 -1
- package/dist/models/bntTable/IBnfTableDefColumn.d.ts +0 -40
- package/dist/models/ui/notifications/NotificationHistoryTableModel.d.ts +0 -6
- package/dist/nivo-bar-BQGSJTnK.js +0 -41890
- package/dist/nivo-bar-DcaMZ1K9.cjs +0 -326
- package/dist/useIsFormDirty-BQU8CwxF.cjs +0 -1
- package/dist/useIsFormDirty-uSOXZ5g6.js +0 -123
- package/dist/useLocalStorageState-Ccq9rFKj.js +0 -95
- package/dist/useLocalStorageState-aCjv2MC6.cjs +0 -1
package/dist/layout.es.js
CHANGED
|
@@ -1,290 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Link as ee } from "react-router";
|
|
1
|
+
import { bw as L, j as e, c as l, Y as w, ao as $, ba as q, a2 as A, bC as O, bD as D } from "./ShortcutLinksContext-DEirK-v9.js";
|
|
2
|
+
import { b8 as Pe, bE as Be } from "./ShortcutLinksContext-DEirK-v9.js";
|
|
3
|
+
import { useState as R, useRef as S, useMemo as B, useEffect as E } from "react";
|
|
4
|
+
import { Link as C } from "react-router-dom";
|
|
6
5
|
import "react-hook-form";
|
|
7
6
|
import "react-flexmonster";
|
|
8
7
|
import "@azure/msal-browser";
|
|
9
8
|
import "@azure/msal-react";
|
|
10
|
-
import "@tanstack/react-query";
|
|
11
9
|
import "react-dom";
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
10
|
+
const F = "_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: F,
|
|
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))
|
|
62
38
|
}, {
|
|
63
|
-
[
|
|
64
|
-
},
|
|
65
|
-
|
|
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();
|
|
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
|
+
_();
|
|
75
43
|
}, children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
!
|
|
78
|
-
[
|
|
79
|
-
}), children: /* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
[
|
|
83
|
-
}), children: /* @__PURE__ */
|
|
84
|
-
] }) }) : /* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
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 })
|
|
87
55
|
] }) }),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
[
|
|
90
|
-
}), children: /* @__PURE__ */
|
|
91
|
-
[
|
|
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
|
|
92
60
|
}, {
|
|
93
|
-
[
|
|
94
|
-
}), onClick:
|
|
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)) }) })
|
|
95
63
|
] });
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
};
|
|
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
|
+
E(() => {
|
|
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
|
+
] })
|
|
132
|
+
] });
|
|
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
|
+
] }) });
|
|
285
149
|
export {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
150
|
+
Pe as PageContainer,
|
|
151
|
+
Be as SideContentBar,
|
|
152
|
+
Ne as SideMenu,
|
|
153
|
+
ge as TopBar
|
|
290
154
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("react-router-dom"),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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generatePath as u } from "react-router";
|
|
1
|
+
import { generatePath as u } from "react-router-dom";
|
|
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;
|
|
@@ -17,26 +17,16 @@ const l = (r, t, o = !0) => Object.keys(r).reduce((e, n) => {
|
|
|
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",
|
|
22
|
-
mode: "
|
|
23
|
-
},
|
|
24
|
-
key: "
|
|
25
|
-
|
|
26
|
-
}, {
|
|
27
|
-
key: "user",
|
|
28
|
-
mode: "exact"
|
|
29
|
-
}, {
|
|
30
|
-
key: "user-delegation",
|
|
31
|
-
mode: "exact"
|
|
32
|
-
}], d = (r = !0) => {
|
|
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) => {
|
|
33
26
|
const t = {};
|
|
34
27
|
for (let o = 0; o < localStorage.length; o++) {
|
|
35
28
|
const e = localStorage.key(o);
|
|
36
|
-
if (e && !(r && s.some(({
|
|
37
|
-
key: n,
|
|
38
|
-
mode: c
|
|
39
|
-
}) => c === "includes" ? e.includes(n) : e === n)))
|
|
29
|
+
if (e && !(r && s.some(({ key: n, mode: c }) => c === "includes" ? e.includes(n) : e === n)))
|
|
40
30
|
try {
|
|
41
31
|
t[e] = JSON.parse(localStorage.getItem(e));
|
|
42
32
|
} catch {
|