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