rc-lib-ui 1.1.19 → 1.1.20
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/Dashboard/Dashboard.d.ts +1 -1
- package/dist/dashboard.js +139 -138
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ export interface DashboardProps extends Pick<ListMenuProps, 'listMenu' | 'styleL
|
|
|
19
19
|
itemsProps?: {
|
|
20
20
|
MuiHeader?: Pick<MuiHeaderProps, 'sx' | 'bgColor' | 'AfterComponent'>;
|
|
21
21
|
};
|
|
22
|
-
classes?: Partial<Record<'listMenu' | 'header', string>>;
|
|
22
|
+
classes?: Partial<Record<'listMenu' | 'header' | 'dashboard' | 'main', string>>;
|
|
23
23
|
}
|
|
24
24
|
export declare const Dashboard: React.MemoExoticComponent<React.ForwardRefExoticComponent<DashboardProps & React.RefAttributes<DashboardControlProps>>>;
|
|
25
25
|
export {};
|
package/dist/dashboard.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { styled as
|
|
6
|
-
import { useTheme as
|
|
7
|
-
import I, { useState as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { ExpandLess as
|
|
11
|
-
import { T as
|
|
12
|
-
import { NavLink as
|
|
13
|
-
|
|
1
|
+
var ci = Object.defineProperty;
|
|
2
|
+
var hi = (i, o, n) => o in i ? ci(i, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[o] = n;
|
|
3
|
+
var j = (i, o, n) => hi(i, typeof o != "symbol" ? o + "" : o, n);
|
|
4
|
+
import { jsx as a, jsxs as h, Fragment as M } from "react/jsx-runtime";
|
|
5
|
+
import { styled as s, ListItemButton as pi, Typography as ei, ListItemIcon as fi, List as di, ListItem as A, Collapse as si, Box as _, AppBar as gi, Container as xi, Toolbar as ui, Drawer as mi, Divider as Q, IconButton as wi } from "@mui/material";
|
|
6
|
+
import { useTheme as bi } from "@mui/material/styles";
|
|
7
|
+
import I, { useState as $, useRef as X, useEffect as Y, forwardRef as B, useMemo as E, Fragment as Ci, useImperativeHandle as vi } from "react";
|
|
8
|
+
import Si from "@mui/icons-material/ChevronLeft";
|
|
9
|
+
import Li from "@mui/icons-material/ChevronRight";
|
|
10
|
+
import { ExpandLess as Wi, ExpandMore as yi } from "@mui/icons-material";
|
|
11
|
+
import { T as Hi } from "./Tooltips-BD7KqgrA.js";
|
|
12
|
+
import { NavLink as Ii } from "react-router-dom";
|
|
13
|
+
import U from "classnames";
|
|
14
|
+
class Ti {
|
|
14
15
|
constructor() {
|
|
15
|
-
|
|
16
|
+
j(this, "getColorPalette", (o, n) => {
|
|
16
17
|
if (n.startsWith("#"))
|
|
17
18
|
return n;
|
|
18
|
-
const { palette: e } = o, { mode: r } = e,
|
|
19
|
-
return
|
|
19
|
+
const { palette: e } = o, { mode: r } = e, l = e[n];
|
|
20
|
+
return l ? l[r] : "primary";
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
class
|
|
24
|
+
class ai {
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
function
|
|
26
|
+
j(ai, "colors", new Ti());
|
|
27
|
+
function Di(i, o) {
|
|
27
28
|
return (n) => o((e) => ({ ...e, ...n }));
|
|
28
29
|
}
|
|
29
|
-
const ki =
|
|
30
|
+
const ki = s("main")(() => ({
|
|
30
31
|
display: "flex",
|
|
31
32
|
flexDirection: "column",
|
|
32
33
|
flexGrow: 1
|
|
33
|
-
})), Mi =
|
|
34
|
+
})), Mi = s("div")(({ theme: i }) => ({
|
|
34
35
|
display: "flex",
|
|
35
36
|
alignItems: "center",
|
|
36
37
|
justifyContent: "center",
|
|
@@ -47,24 +48,24 @@ const ki = f("main")(() => ({
|
|
|
47
48
|
easing: i.transitions.easing.sharp,
|
|
48
49
|
duration: i.transitions.duration.enteringScreen
|
|
49
50
|
})
|
|
50
|
-
})),
|
|
51
|
+
})), Z = (i) => typeof i == "number" ? i + "px" : i, li = (i, o = {}) => {
|
|
51
52
|
const { newProp: n = "marginLeft", positionCorrect: e = "- 0px" } = o;
|
|
52
53
|
let r = {};
|
|
53
|
-
for (const [
|
|
54
|
-
if (typeof
|
|
55
|
-
const t =
|
|
56
|
-
r[
|
|
54
|
+
for (const [l, d] of Object.entries(i))
|
|
55
|
+
if (typeof d == "object" && "width" in d) {
|
|
56
|
+
const t = Z(d == null ? void 0 : d.width);
|
|
57
|
+
r[l] = { [n]: `calc(${t} ${e})` };
|
|
57
58
|
} else {
|
|
58
|
-
const t =
|
|
59
|
+
const t = Z(d);
|
|
59
60
|
r[n] = `calc(${t} ${e})`;
|
|
60
61
|
}
|
|
61
62
|
return r;
|
|
62
63
|
}, $i = ({ render: i }) => {
|
|
63
|
-
const [o, n] =
|
|
64
|
+
const [o, n] = $(!1);
|
|
64
65
|
return i({ is: o, setStatus: n, handleToggle: () => {
|
|
65
66
|
n((r) => !r);
|
|
66
67
|
} });
|
|
67
|
-
}, Bi =
|
|
68
|
+
}, Bi = s(pi, {
|
|
68
69
|
shouldForwardProp: (i) => !["minHeight"].includes(i)
|
|
69
70
|
})(({ minHeight: i }) => ({
|
|
70
71
|
minHeight: i,
|
|
@@ -72,41 +73,41 @@ const ki = f("main")(() => ({
|
|
|
72
73
|
paddingLeft: 0,
|
|
73
74
|
transition: "height .1s ease-in-out",
|
|
74
75
|
overflow: "hidden"
|
|
75
|
-
})),
|
|
76
|
-
const r = X(null), [
|
|
76
|
+
})), k = { minHeight: 48, height: 0 }, G = ({ sx: i = {}, isWrapText: o, isOpen: n, ...e }) => {
|
|
77
|
+
const r = X(null), [l, d] = $(k);
|
|
77
78
|
return Y(() => {
|
|
78
79
|
if (o && (r != null && r.current)) {
|
|
79
80
|
const { scrollHeight: t, clientHeight: c } = r == null ? void 0 : r.current;
|
|
80
|
-
n ? (!
|
|
81
|
+
n ? (!l.height && d((f) => ({ ...f, height: c })), t !== c && d({ ...k, height: t + c })) : d({ ...k, height: k.minHeight });
|
|
81
82
|
}
|
|
82
|
-
}, [n]), /* @__PURE__ */
|
|
83
|
+
}, [n]), /* @__PURE__ */ a(
|
|
83
84
|
Bi,
|
|
84
85
|
{
|
|
85
|
-
minHeight:
|
|
86
|
+
minHeight: l.minHeight,
|
|
86
87
|
ref: r,
|
|
87
88
|
sx: i,
|
|
88
89
|
...e
|
|
89
90
|
}
|
|
90
91
|
);
|
|
91
|
-
},
|
|
92
|
-
const [r,
|
|
92
|
+
}, Ri = ({ unmount: i, isWrapText: o, title: n, sx: e = {} }) => {
|
|
93
|
+
const [r, l] = $(""), d = X(null);
|
|
93
94
|
return Y(() => {
|
|
94
|
-
if (!i &&
|
|
95
|
-
const t =
|
|
96
|
-
t != null && t.offsetWidth && (t == null ? void 0 : t.scrollWidth) > (t == null ? void 0 : t.offsetWidth) &&
|
|
95
|
+
if (!i && d.current) {
|
|
96
|
+
const t = d.current, c = setTimeout(() => {
|
|
97
|
+
t != null && t.offsetWidth && (t == null ? void 0 : t.scrollWidth) > (t == null ? void 0 : t.offsetWidth) && l(n), clearTimeout(c);
|
|
97
98
|
}, 200);
|
|
98
99
|
}
|
|
99
|
-
}, [n, i]), o ? !i && /* @__PURE__ */
|
|
100
|
-
}, V = I.memo(
|
|
101
|
-
|
|
100
|
+
}, [n, i]), o ? !i && /* @__PURE__ */ a(ei, { children: n, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ a(zi, { ref: d, tooltipText: r, title: n, sx: e });
|
|
101
|
+
}, V = I.memo(Ri), zi = B(({ tooltipText: i, title: o, sx: n }, e) => /* @__PURE__ */ a(Hi, { variant: "default", title: i, children: /* @__PURE__ */ a(ei, { ref: e, children: o, noWrap: !0, sx: n }) })), Oi = B(({ className: i = "", ...o }, n) => /* @__PURE__ */ a(
|
|
102
|
+
Ii,
|
|
102
103
|
{
|
|
103
104
|
ref: n,
|
|
104
105
|
className: ({ isActive: e }) => e ? i + " Mui-selected" : i,
|
|
105
106
|
end: !0,
|
|
106
107
|
...o
|
|
107
108
|
}
|
|
108
|
-
)),
|
|
109
|
-
|
|
109
|
+
)), ii = I.memo(Oi), P = ({ icon: i, sx: o }) => /* @__PURE__ */ a(
|
|
110
|
+
fi,
|
|
110
111
|
{
|
|
111
112
|
sx: {
|
|
112
113
|
minWidth: 40,
|
|
@@ -120,7 +121,7 @@ const ki = f("main")(() => ({
|
|
|
120
121
|
},
|
|
121
122
|
children: i
|
|
122
123
|
}
|
|
123
|
-
),
|
|
124
|
+
), Fi = s(di, {
|
|
124
125
|
shouldForwardProp: (i) => !["styleList", "isScrollIndentation"].includes(i)
|
|
125
126
|
})(({ theme: i, styleList: o = "variant1" }) => ({
|
|
126
127
|
display: "flex",
|
|
@@ -166,95 +167,95 @@ const ki = f("main")(() => ({
|
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
})),
|
|
170
|
-
const { minWidthColumn: c } = o,
|
|
170
|
+
})), Ni = B(({ styleList: i = "variant1", columnMenu: o, isWrapText: n = !1, listMenu: e, isOpen: r, sx: l, className: d }, t) => {
|
|
171
|
+
const { minWidthColumn: c } = o, f = E(() => li(c, { newProp: "marginLeft" }), [c]), R = E(() => e.map(({ action: m, icon: S, title: L, sx: T = {}, onClick: W, children: w, to: z }, g) => w && Array.isArray(w) ? /* @__PURE__ */ a(Ci, { children: /* @__PURE__ */ a(
|
|
171
172
|
$i,
|
|
172
173
|
{
|
|
173
|
-
render: (b) => /* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
174
|
+
render: (b) => /* @__PURE__ */ h(M, { children: [
|
|
175
|
+
/* @__PURE__ */ h(A, { disablePadding: !0, sx: T, children: [
|
|
176
|
+
/* @__PURE__ */ a(
|
|
176
177
|
P,
|
|
177
178
|
{
|
|
178
179
|
icon: S,
|
|
179
180
|
sx: c
|
|
180
181
|
}
|
|
181
182
|
),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ h(
|
|
183
184
|
G,
|
|
184
185
|
{
|
|
185
186
|
isOpen: r,
|
|
186
187
|
isWrapText: n,
|
|
187
|
-
onClick: (
|
|
188
|
-
b.handleToggle(), typeof W == "function" && W(
|
|
188
|
+
onClick: (p) => {
|
|
189
|
+
b.handleToggle(), typeof W == "function" && W(p);
|
|
189
190
|
},
|
|
190
191
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ a(
|
|
192
193
|
V,
|
|
193
194
|
{
|
|
194
195
|
unmount: !r,
|
|
195
196
|
title: L,
|
|
196
|
-
sx: { flexGrow: 1, ...
|
|
197
|
+
sx: { flexGrow: 1, ...f },
|
|
197
198
|
isWrapText: n
|
|
198
199
|
}
|
|
199
200
|
),
|
|
200
|
-
r && /* @__PURE__ */
|
|
201
|
-
|
|
202
|
-
b.is ? /* @__PURE__ */
|
|
201
|
+
r && /* @__PURE__ */ h(M, { children: [
|
|
202
|
+
m,
|
|
203
|
+
b.is ? /* @__PURE__ */ a(Wi, {}) : /* @__PURE__ */ a(yi, {})
|
|
203
204
|
] })
|
|
204
205
|
]
|
|
205
206
|
}
|
|
206
207
|
)
|
|
207
208
|
] }),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ a(si, { in: b.is && r, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ a(di, { disablePadding: !0, children: w.map(({ action: p, icon: C, title: x, to: u, sx: O = {}, onClick: F }, D) => /* @__PURE__ */ a(A, { disablePadding: !0, sx: O, children: /* @__PURE__ */ h(
|
|
209
210
|
G,
|
|
210
211
|
{
|
|
211
212
|
to: u,
|
|
212
|
-
component:
|
|
213
|
+
component: ii,
|
|
213
214
|
sx: ({ spacing: y }) => ({ ...!C && { paddingLeft: y(2) } }),
|
|
214
215
|
isOpen: !0,
|
|
215
216
|
onClick: F,
|
|
216
217
|
isWrapText: n,
|
|
217
218
|
children: [
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ a(
|
|
219
220
|
P,
|
|
220
221
|
{
|
|
221
222
|
icon: C,
|
|
222
223
|
sx: c
|
|
223
224
|
}
|
|
224
225
|
),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ a(
|
|
226
227
|
V,
|
|
227
228
|
{
|
|
228
|
-
sx: () => ({ ...C &&
|
|
229
|
+
sx: () => ({ ...C && f }),
|
|
229
230
|
unmount: !r,
|
|
230
231
|
title: x,
|
|
231
232
|
isWrapText: n
|
|
232
233
|
}
|
|
233
234
|
),
|
|
234
|
-
r &&
|
|
235
|
+
r && p
|
|
235
236
|
]
|
|
236
237
|
}
|
|
237
|
-
) }, `${g}-${
|
|
238
|
+
) }, `${g}-${D}`)) }) })
|
|
238
239
|
] })
|
|
239
240
|
}
|
|
240
|
-
) }, g) : /* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
r &&
|
|
241
|
+
) }, g) : /* @__PURE__ */ h(A, { disablePadding: !0, sx: T, children: [
|
|
242
|
+
/* @__PURE__ */ a(P, { icon: S, sx: c }),
|
|
243
|
+
/* @__PURE__ */ h(G, { component: ii, to: z, isOpen: r, onClick: W, isWrapText: n, children: [
|
|
244
|
+
/* @__PURE__ */ a(V, { sx: f, unmount: !r, title: L, isWrapText: n }),
|
|
245
|
+
r && m
|
|
245
246
|
] })
|
|
246
|
-
] }, g)), [e, r,
|
|
247
|
-
return /* @__PURE__ */
|
|
248
|
-
|
|
247
|
+
] }, g)), [e, r, f]);
|
|
248
|
+
return /* @__PURE__ */ a(
|
|
249
|
+
Fi,
|
|
249
250
|
{
|
|
250
251
|
ref: t,
|
|
251
252
|
styleList: i,
|
|
252
|
-
sx:
|
|
253
|
-
className:
|
|
253
|
+
sx: l,
|
|
254
|
+
className: d,
|
|
254
255
|
children: R
|
|
255
256
|
}
|
|
256
257
|
);
|
|
257
|
-
}), ji = I.memo(
|
|
258
|
+
}), ji = I.memo(Ni), Ai = s(_, {
|
|
258
259
|
target: "MuiFooter-root",
|
|
259
260
|
shouldForwardProp: (i) => ![""].includes(i)
|
|
260
261
|
})(({}) => ({
|
|
@@ -263,21 +264,21 @@ const ki = f("main")(() => ({
|
|
|
263
264
|
// bottom: 0,
|
|
264
265
|
// right: 0,
|
|
265
266
|
minHeight: 48
|
|
266
|
-
})),
|
|
267
|
+
})), Gi = ({
|
|
267
268
|
initWidth: i,
|
|
268
269
|
isOpen: o,
|
|
269
270
|
children: n,
|
|
270
271
|
isRight: e,
|
|
271
272
|
isHeaderResize: r = !0,
|
|
272
|
-
bgColor:
|
|
273
|
-
className:
|
|
273
|
+
bgColor: l,
|
|
274
|
+
className: d,
|
|
274
275
|
AfterComponent: t,
|
|
275
276
|
sx: c
|
|
276
|
-
}) => /* @__PURE__ */
|
|
277
|
-
|
|
277
|
+
}) => /* @__PURE__ */ h(
|
|
278
|
+
Pi,
|
|
278
279
|
{
|
|
279
|
-
className:
|
|
280
|
-
bgColor:
|
|
280
|
+
className: d,
|
|
281
|
+
bgColor: l,
|
|
281
282
|
isRight: e,
|
|
282
283
|
position: "fixed",
|
|
283
284
|
initWidth: i,
|
|
@@ -285,14 +286,14 @@ const ki = f("main")(() => ({
|
|
|
285
286
|
isHeaderResize: r,
|
|
286
287
|
sx: c,
|
|
287
288
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ a(xi, { maxWidth: "xl", children: /* @__PURE__ */ a(ui, { sx: { flexGrow: 1 }, disableGutters: !0, children: n }) }),
|
|
289
290
|
t && t
|
|
290
291
|
]
|
|
291
292
|
}
|
|
292
|
-
),
|
|
293
|
+
), Vi = I.memo(Gi), Pi = s(gi, {
|
|
293
294
|
shouldForwardProp: (i) => !["isOpen", "isRight", "initWidth", "bgColor", "isHeaderResize"].includes(i)
|
|
294
|
-
})(({ theme: i, isOpen: o, isRight: n, initWidth: e = 250, bgColor: r = "primary", isHeaderResize:
|
|
295
|
-
backgroundColor:
|
|
295
|
+
})(({ theme: i, isOpen: o, isRight: n, initWidth: e = 250, bgColor: r = "primary", isHeaderResize: l }) => ({
|
|
296
|
+
backgroundColor: ai.colors.getColorPalette(i, r),
|
|
296
297
|
zIndex: i.zIndex.drawer + 1,
|
|
297
298
|
color: "info.main",
|
|
298
299
|
transition: i.transitions.create(["width", "margin"], {
|
|
@@ -302,13 +303,13 @@ const ki = f("main")(() => ({
|
|
|
302
303
|
...o && {
|
|
303
304
|
...n ? { marginRight: e } : { marginLeft: e },
|
|
304
305
|
width: `calc(100% - ${e}px)`,
|
|
305
|
-
...!
|
|
306
|
+
...!l && { width: "100%", zIndex: 3, margin: 0 },
|
|
306
307
|
transition: i.transitions.create(["width", "margin"], {
|
|
307
308
|
easing: i.transitions.easing.sharp,
|
|
308
309
|
duration: i.transitions.duration.enteringScreen
|
|
309
310
|
})
|
|
310
311
|
}
|
|
311
|
-
})),
|
|
312
|
+
})), ri = (i, o, n = !0) => ({
|
|
312
313
|
width: o,
|
|
313
314
|
...n && {
|
|
314
315
|
transition: i.transitions.create("width", {
|
|
@@ -317,7 +318,7 @@ const ki = f("main")(() => ({
|
|
|
317
318
|
})
|
|
318
319
|
},
|
|
319
320
|
overflow: "hidden"
|
|
320
|
-
}),
|
|
321
|
+
}), ni = (i, o, n = !0) => ({
|
|
321
322
|
...n && {
|
|
322
323
|
transition: i.transitions.create("width", {
|
|
323
324
|
easing: i.transitions.easing.sharp,
|
|
@@ -330,13 +331,13 @@ const ki = f("main")(() => ({
|
|
|
330
331
|
// [theme.breakpoints.up('sm')]: {
|
|
331
332
|
// width: `calc(${theme.spacing(8)} + 1px)`,
|
|
332
333
|
// },
|
|
333
|
-
}),
|
|
334
|
+
}), _i = s(mi, {
|
|
334
335
|
shouldForwardProp: (i) => !["open", "isWrapText", "columnMenu", "isRight", "styleList"].includes(i)
|
|
335
336
|
})(
|
|
336
337
|
({ theme: i, open: o, isRight: n, columnMenu: e }) => {
|
|
337
|
-
const r = n ? "Left" : "Right",
|
|
338
|
+
const r = n ? "Left" : "Right", l = e.initWidth, d = e.minWidthColumn;
|
|
338
339
|
return {
|
|
339
|
-
width:
|
|
340
|
+
width: l,
|
|
340
341
|
position: "relative",
|
|
341
342
|
zIndex: 0,
|
|
342
343
|
flexShrink: 0,
|
|
@@ -344,44 +345,44 @@ const ki = f("main")(() => ({
|
|
|
344
345
|
boxSizing: "border-box",
|
|
345
346
|
[`border${r}`]: `1px solid ${i.palette.divider}`,
|
|
346
347
|
...n ? { order: 1 } : { order: 0 },
|
|
347
|
-
...o ?
|
|
348
|
+
...o ? ri(i, l) : ni(i, d),
|
|
348
349
|
"& .MuiDrawer-paper": {
|
|
349
350
|
position: "static",
|
|
350
351
|
// при isWrapText - при открытии меню текст сжатый и значки смешаются поэтому ставим условие
|
|
351
|
-
...o ?
|
|
352
|
+
...o ? ri(i, l) : ni(i, d)
|
|
352
353
|
// ...(open ? openedMixin(theme, initWidth) : closedMixin(theme, isWrapText ? { width: initWidth } : minWidth))
|
|
353
354
|
}
|
|
354
355
|
};
|
|
355
356
|
}
|
|
356
|
-
),
|
|
357
|
+
), oi = s("div")(({ theme: i }) => ({
|
|
357
358
|
display: "flex",
|
|
358
359
|
padding: i.spacing(0, 1),
|
|
359
360
|
...i.mixins.toolbar
|
|
360
|
-
})),
|
|
361
|
+
})), ti = (i) => {
|
|
361
362
|
const { clientWidth: o, offsetWidth: n } = i;
|
|
362
363
|
return n - o;
|
|
363
|
-
},
|
|
364
|
+
}, Ei = B(({ Footer: i, listMenu: o, children: n, HeaderContent: e, statuses: r, itemsProps: l, classes: d, columnMenu: t, styleList: c, sx: f }, R) => {
|
|
364
365
|
var q, J, K;
|
|
365
|
-
const
|
|
366
|
+
const m = bi(), S = (t == null ? void 0 : t.position) === "right", L = !1, T = !0;
|
|
366
367
|
//!!statuses?.isScrollIndentation
|
|
367
|
-
const W = (r == null ? void 0 : r.isHeaderDefault) === void 0 ? !0 : r == null ? void 0 : r.isHeaderDefault,
|
|
368
|
-
width: `calc(${
|
|
369
|
-
[
|
|
370
|
-
width: `calc(${
|
|
368
|
+
const W = (r == null ? void 0 : r.isHeaderDefault) === void 0 ? !0 : r == null ? void 0 : r.isHeaderDefault, w = (r == null ? void 0 : r.isHeader) === void 0 ? !0 : r == null ? void 0 : r.isHeader, z = (r == null ? void 0 : r.isMenu) === void 0 ? !0 : r == null ? void 0 : r.isMenu, g = (t == null ? void 0 : t.initWidth) || 250, b = E(() => t != null && t.minWidthColumn && Object.keys(t == null ? void 0 : t.minWidthColumn).length ? t == null ? void 0 : t.minWidthColumn : {
|
|
369
|
+
width: `calc(${m.spacing(7)} + 1px)`,
|
|
370
|
+
[m.breakpoints.up("sm")]: {
|
|
371
|
+
width: `calc(${m.spacing(8)} + 1px)`
|
|
371
372
|
}
|
|
372
|
-
}, [t == null ? void 0 : t.minWidthColumn]), [
|
|
373
|
+
}, [t == null ? void 0 : t.minWidthColumn]), [p, C] = $({
|
|
373
374
|
isOpen: !!(r != null && r.isDefaultOpen),
|
|
374
375
|
widthCloseColumn: 0,
|
|
375
376
|
widthScroll: 0
|
|
376
|
-
}), x =
|
|
377
|
+
}), x = Di(p, C), u = X(null);
|
|
377
378
|
Y(() => {
|
|
378
379
|
if (u.current) {
|
|
379
|
-
const H =
|
|
380
|
+
const H = ti(u.current);
|
|
380
381
|
let v = !1;
|
|
381
382
|
H > 0 && (v = !0), x({ widthScroll: v ? H + 1 : 0 }), window.onresize = function() {
|
|
382
383
|
if (u.current) {
|
|
383
|
-
const
|
|
384
|
-
v && !
|
|
384
|
+
const N = ti(u.current);
|
|
385
|
+
v && !N && (v = !1, x({ widthScroll: 0 })), !v && N && (v = !0, x({ widthScroll: N + 1 }));
|
|
385
386
|
}
|
|
386
387
|
};
|
|
387
388
|
}
|
|
@@ -390,80 +391,80 @@ const ki = f("main")(() => ({
|
|
|
390
391
|
x({ isOpen: !0 });
|
|
391
392
|
}, F = () => {
|
|
392
393
|
x({ isOpen: !1 });
|
|
393
|
-
},
|
|
394
|
+
}, D = () => {
|
|
394
395
|
C((H) => ({ ...H, isOpen: !H.isOpen }));
|
|
395
396
|
}, y = {
|
|
396
|
-
isOpen:
|
|
397
|
+
isOpen: p.isOpen,
|
|
397
398
|
handleMenuOpen: O,
|
|
398
399
|
handleMenuClose: F,
|
|
399
|
-
handleMenuToggle:
|
|
400
|
+
handleMenuToggle: D
|
|
400
401
|
};
|
|
401
|
-
return
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
return vi(R, () => y), /* @__PURE__ */ h(_, { className: U("Dashboard", d == null ? void 0 : d.dashboard), sx: { display: "flex", height: "inherit" }, children: [
|
|
403
|
+
w ? W ? /* @__PURE__ */ a(
|
|
404
|
+
Vi,
|
|
404
405
|
{
|
|
405
406
|
initWidth: g,
|
|
406
|
-
isOpen:
|
|
407
|
-
bgColor: (q =
|
|
407
|
+
isOpen: p.isOpen,
|
|
408
|
+
bgColor: (q = l == null ? void 0 : l.MuiHeader) == null ? void 0 : q.bgColor,
|
|
408
409
|
isRight: S,
|
|
409
410
|
isHeaderResize: r == null ? void 0 : r.isHeaderResize,
|
|
410
|
-
sx: (J =
|
|
411
|
-
className:
|
|
412
|
-
AfterComponent: (K =
|
|
411
|
+
sx: (J = l == null ? void 0 : l.MuiHeader) == null ? void 0 : J.sx,
|
|
412
|
+
className: d == null ? void 0 : d.header,
|
|
413
|
+
AfterComponent: (K = l == null ? void 0 : l.MuiHeader) == null ? void 0 : K.AfterComponent,
|
|
413
414
|
children: typeof e == "function" ? e(y) : e
|
|
414
415
|
}
|
|
415
416
|
) : typeof e == "function" ? e(y) : e : null,
|
|
416
|
-
z && /* @__PURE__ */
|
|
417
|
-
|
|
417
|
+
z && /* @__PURE__ */ h(
|
|
418
|
+
_i,
|
|
418
419
|
{
|
|
419
420
|
variant: "permanent",
|
|
420
|
-
open:
|
|
421
|
+
open: p.isOpen,
|
|
421
422
|
isRight: S,
|
|
422
423
|
isWrapText: L,
|
|
423
424
|
columnMenu: { initWidth: g, minWidthColumn: b },
|
|
424
425
|
styleList: c,
|
|
425
426
|
children: [
|
|
426
|
-
(r == null ? void 0 : r.isMenuHeader) !== !1 && /* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
427
|
+
(r == null ? void 0 : r.isMenuHeader) !== !1 && /* @__PURE__ */ h(M, { children: [
|
|
428
|
+
/* @__PURE__ */ a(oi, {}),
|
|
429
|
+
/* @__PURE__ */ a(Q, {})
|
|
429
430
|
] }),
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ a(_, { className: "MuiListWrap", sx: {
|
|
431
432
|
display: "flex",
|
|
432
433
|
flexDirection: "column",
|
|
433
434
|
flexGrow: 1,
|
|
434
435
|
overflow: "hidden"
|
|
435
|
-
}, children: /* @__PURE__ */
|
|
436
|
+
}, children: /* @__PURE__ */ a(
|
|
436
437
|
ji,
|
|
437
438
|
{
|
|
438
439
|
ref: u,
|
|
439
440
|
columnMenu: {
|
|
440
441
|
initWidth: g,
|
|
441
|
-
minWidthColumn:
|
|
442
|
+
minWidthColumn: li(b, { newProp: "width", positionCorrect: `- ${p.widthScroll}px` })
|
|
442
443
|
},
|
|
443
444
|
listMenu: o,
|
|
444
|
-
isOpen:
|
|
445
|
+
isOpen: p.isOpen,
|
|
445
446
|
sx: {
|
|
446
|
-
...
|
|
447
|
+
...f
|
|
447
448
|
},
|
|
448
|
-
className:
|
|
449
|
+
className: d == null ? void 0 : d.listMenu,
|
|
449
450
|
isWrapText: L,
|
|
450
451
|
styleList: c
|
|
451
452
|
}
|
|
452
453
|
) }),
|
|
453
|
-
(r == null ? void 0 : r.isButtonCenterMenu) !== !1 && /* @__PURE__ */
|
|
454
|
-
i && /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
454
|
+
(r == null ? void 0 : r.isButtonCenterMenu) !== !1 && /* @__PURE__ */ a(Mi, { children: /* @__PURE__ */ a(wi, { onClick: D, sx: { pointerEvents: "auto" }, children: p.isOpen ? /* @__PURE__ */ a(Li, {}) : /* @__PURE__ */ a(Si, {}) }) }),
|
|
455
|
+
i && /* @__PURE__ */ a(M, { children: /* @__PURE__ */ h(Ai, { children: [
|
|
456
|
+
/* @__PURE__ */ a(Q, {}),
|
|
456
457
|
i
|
|
457
458
|
] }) })
|
|
458
459
|
]
|
|
459
460
|
}
|
|
460
461
|
),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
|
|
462
|
+
/* @__PURE__ */ h(ki, { className: U("Dashboard-main", d == null ? void 0 : d.main), children: [
|
|
463
|
+
w && /* @__PURE__ */ a(oi, {}),
|
|
463
464
|
n
|
|
464
465
|
] })
|
|
465
466
|
] });
|
|
466
|
-
}),
|
|
467
|
+
}), or = I.memo(Ei);
|
|
467
468
|
export {
|
|
468
|
-
|
|
469
|
+
or as Dashboard
|
|
469
470
|
};
|