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