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/dashboard.js CHANGED
@@ -1,37 +1,19 @@
1
- var hi = Object.defineProperty;
2
- var fi = (i, o, r) => o in i ? hi(i, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[o] = r;
3
- var j = (i, o, r) => fi(i, typeof o != "symbol" ? o + "" : o, r);
4
- import { jsx as a, jsxs as h, Fragment as k } from "react/jsx-runtime";
5
- import { styled as g, ListItemButton as pi, Typography as di, ListItemIcon as gi, List as ai, ListItem as A, Collapse as si, Box as E, AppBar as ui, Container as xi, Toolbar as wi, Drawer as mi, Divider as Z, IconButton as bi } from "@mui/material";
6
- import { useTheme as Ci } from "@mui/material/styles";
7
- import I, { useState as $, useRef as Y, useEffect as q, forwardRef as B, useMemo as X, Fragment as vi, useImperativeHandle as Si } from "react";
8
- import Li from "@mui/icons-material/ChevronLeft";
9
- import Wi from "@mui/icons-material/ChevronRight";
10
- import { ExpandLess as yi, ExpandMore as Hi } from "@mui/icons-material";
11
- import { T as Ii } from "./Tooltips-D4gQprYO.js";
12
- import { NavLink as Ti } from "react-router-dom";
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
- })), $i = g("div")(({ theme: i }) => ({
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
- })), ii = (i) => typeof i == "number" ? i + "px" : i, ci = (i, o = {}) => {
52
- const { newProp: r = "marginLeft", positionCorrect: e = "- 0px" } = o;
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, d] of Object.entries(i))
55
- if (typeof d == "object" && "width" in d) {
56
- const t = ii(d == null ? void 0 : d.width);
57
- n[l] = { [r]: `calc(${t} ${e})` };
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 t = ii(d);
60
- n[r] = `calc(${t} ${e})`;
41
+ const r = P(t);
42
+ n[o] = `calc(${r} ${a})`;
61
43
  }
62
44
  return n;
63
- }, Bi = ({ render: i }) => {
64
- const [o, r] = $(!1);
65
- return i({ is: o, setStatus: r, handleToggle: () => {
66
- r((n) => !n);
45
+ }, Mi = ({ render: i }) => {
46
+ const [d, o] = $(!1);
47
+ return i({ is: d, setStatus: o, handleToggle: () => {
48
+ o((n) => !n);
67
49
  } });
68
- }, Ri = g(pi, {
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 }, G = ({ sx: i = {}, isWrapText: o, isOpen: r, ...e }) => {
77
- const n = Y(null), [l, d] = $(D);
78
- return q(() => {
79
- if (o && (n != null && n.current)) {
80
- const { scrollHeight: t, clientHeight: c } = n == null ? void 0 : n.current;
81
- r ? (!l.height && d((p) => ({ ...p, height: c })), t !== c && d({ ...D, height: t + c })) : d({ ...D, height: D.minHeight });
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
- }, [r]), /* @__PURE__ */ a(
84
- Ri,
65
+ }, [o]), /* @__PURE__ */ e(
66
+ Di,
85
67
  {
86
68
  minHeight: l.minHeight,
87
69
  ref: n,
88
70
  sx: i,
89
- ...e
71
+ ...a
90
72
  }
91
73
  );
92
- }, zi = ({ unmount: i, isWrapText: o, title: r, sx: e = {} }) => {
93
- const [n, l] = $(""), d = Y(null);
94
- return q(() => {
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(r), clearTimeout(c);
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
- }, [r, i]), o ? !i && /* @__PURE__ */ a(di, { children: r, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ a(Oi, { ref: d, tooltipText: n, title: r, sx: e });
101
- }, _ = I.memo(zi), Oi = B(({ tooltipText: i, title: o, sx: r }, e) => /* @__PURE__ */ a(Ii, { variant: "default", title: i, children: /* @__PURE__ */ a(di, { ref: e, children: o, noWrap: !0, sx: r }) })), Fi = B(({ className: i = "", ...o }, r) => /* @__PURE__ */ a(
102
- Ti,
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: r,
105
- className: ({ isActive: e }) => e ? i + " Mui-selected" : i,
86
+ ref: o,
87
+ className: ({ isActive: a }) => a ? i + " Mui-selected" : i,
106
88
  end: !0,
107
- ...o
89
+ ...d
108
90
  }
109
- )), ni = I.memo(Fi), V = ({ icon: i, sx: o }) => /* @__PURE__ */ a(
110
- gi,
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
- ...o
102
+ ...d
121
103
  },
122
104
  children: i
123
105
  }
124
- ), Ni = g(ai, {
106
+ ), Ri = g(di, {
125
107
  shouldForwardProp: (i) => !["styleList", "isScrollIndentation"].includes(i)
126
- })(({ theme: i, styleList: o = "variant1" }) => ({
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: o === "variant1" ? "40px" : "53px",
136
+ minWidth: d === "variant1" ? "40px" : "53px",
155
137
  "& .MuiCollapse-root .MuiButtonBase-root": {
156
138
  marginLeft: i.spacing(1.5)
157
139
  },
158
- ...o === "variant1" && {},
159
- ...o === "variant2" && {
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
- })), ji = B(({ styleList: i = "variant1", columnMenu: o, isWrapText: r = !1, listMenu: e, isOpen: n, sx: l, className: d }, t) => {
171
- const { minWidthColumn: c } = o, p = X(() => ci(c, { newProp: "marginLeft" }), [c]), R = X(() => e.map(({ action: w, icon: S, title: L, sx: T = {}, onClick: W, children: m, to: z }, s) => m && Array.isArray(m) ? /* @__PURE__ */ a(vi, { children: /* @__PURE__ */ a(
172
- Bi,
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(A, { disablePadding: !0, sx: T, children: [
176
- /* @__PURE__ */ a(
177
- V,
157
+ /* @__PURE__ */ h(j, { disablePadding: !0, sx: T, children: [
158
+ /* @__PURE__ */ e(
159
+ _,
178
160
  {
179
- icon: S,
161
+ icon: C,
180
162
  sx: c
181
163
  }
182
164
  ),
183
165
  /* @__PURE__ */ h(
184
- G,
166
+ A,
185
167
  {
186
168
  isOpen: n,
187
- isWrapText: r,
169
+ isWrapText: o,
188
170
  onClick: (f) => {
189
171
  b.handleToggle(), typeof W == "function" && W(f);
190
172
  },
191
173
  children: [
192
- /* @__PURE__ */ a(
193
- _,
174
+ /* @__PURE__ */ e(
175
+ G,
194
176
  {
195
177
  unmount: !n,
196
178
  title: L,
197
179
  sx: { flexGrow: 1, ...p },
198
- isWrapText: r
180
+ isWrapText: o
199
181
  }
200
182
  ),
201
183
  n && /* @__PURE__ */ h(k, { children: [
202
- w,
203
- b.is ? /* @__PURE__ */ a(yi, {}) : /* @__PURE__ */ a(Hi, {})
184
+ m,
185
+ b.is ? /* @__PURE__ */ e(Li, {}) : /* @__PURE__ */ e(Wi, {})
204
186
  ] })
205
187
  ]
206
188
  }
207
189
  )
208
190
  ] }),
209
- /* @__PURE__ */ a(si, { in: b.is && n, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ a(ai, { disablePadding: !0, children: m.map(({ action: f, icon: C, title: u, to: x, sx: O = {}, onClick: F }, M) => /* @__PURE__ */ a(A, { disablePadding: !0, sx: O, children: /* @__PURE__ */ h(
210
- G,
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: x,
213
- component: ni,
214
- sx: ({ spacing: y }) => ({ ...!C && { paddingLeft: y(2) } }),
194
+ to: u,
195
+ component: ii,
196
+ sx: ({ spacing: y }) => ({ ...!v && { paddingLeft: y(2) } }),
215
197
  isOpen: !0,
216
198
  onClick: F,
217
- isWrapText: r,
199
+ isWrapText: o,
218
200
  children: [
219
- /* @__PURE__ */ a(
220
- V,
201
+ /* @__PURE__ */ e(
202
+ _,
221
203
  {
222
- icon: C,
204
+ icon: v,
223
205
  sx: c
224
206
  }
225
207
  ),
226
- /* @__PURE__ */ a(
227
- _,
208
+ /* @__PURE__ */ e(
209
+ G,
228
210
  {
229
- sx: () => ({ ...C && p }),
211
+ sx: () => ({ ...v && p }),
230
212
  unmount: !n,
231
- title: u,
232
- isWrapText: r
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(A, { disablePadding: !0, sx: T, children: [
242
- /* @__PURE__ */ a(V, { icon: S, sx: c }),
243
- /* @__PURE__ */ h(G, { component: ni, to: z, isOpen: n, onClick: W, isWrapText: r, children: [
244
- /* @__PURE__ */ a(_, { sx: p, unmount: !n, title: L, isWrapText: r }),
245
- n && w
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)), [e, n, p]);
248
- return /* @__PURE__ */ a(
249
- Ni,
229
+ ] }, s)), [a, n, p]);
230
+ return /* @__PURE__ */ e(
231
+ Ri,
250
232
  {
251
- ref: t,
233
+ ref: r,
252
234
  styleList: i,
253
235
  sx: l,
254
- className: d,
236
+ className: t,
255
237
  children: R
256
238
  }
257
239
  );
258
- }), Ai = I.memo(ji), Gi = g(E, {
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
- })), _i = ({
249
+ })), Ni = ({
268
250
  initWidth: i,
269
- isOpen: o,
270
- children: r,
271
- isRight: e,
251
+ isOpen: d,
252
+ children: o,
253
+ isRight: a,
272
254
  isHeaderResize: n = !0,
273
255
  bgColor: l,
274
- className: d,
275
- AfterComponent: t,
256
+ className: t,
257
+ AfterComponent: r,
276
258
  sx: c
277
259
  }) => /* @__PURE__ */ h(
278
- Ei,
260
+ Ai,
279
261
  {
280
- className: d,
262
+ className: t,
281
263
  bgColor: l,
282
- isRight: e,
264
+ isRight: a,
283
265
  position: "fixed",
284
266
  initWidth: i,
285
- isOpen: o,
267
+ isOpen: d,
286
268
  isHeaderResize: n,
287
269
  sx: c,
288
270
  children: [
289
- /* @__PURE__ */ a(xi, { maxWidth: "xl", children: /* @__PURE__ */ a(wi, { sx: { flexGrow: 1 }, disableGutters: !0, children: r }) }),
290
- t && t
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
- ), Vi = I.memo(_i), Ei = g(ui, {
275
+ ), ji = I.memo(Ni), Ai = g(fi, {
294
276
  shouldForwardProp: (i) => !["isOpen", "isRight", "initWidth", "bgColor", "isHeaderResize"].includes(i)
295
- })(({ theme: i, isOpen: o, isRight: r, initWidth: e = 250, bgColor: n = "primary", isHeaderResize: l }) => ({
296
- backgroundColor: li.colors.getColorPalette(i, n),
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
- ...o && {
304
- ...r ? { marginRight: e } : { marginLeft: e },
305
- width: `calc(100% - ${e}px)`,
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
- })), ri = (i, o, r = !0) => ({
313
- width: o,
314
- ...r && {
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
- }), oi = (i, o, r = !0) => ({
322
- ...r && {
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
- ...o
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
- }), Xi = g(mi, {
316
+ }), Gi = g(si, {
335
317
  shouldForwardProp: (i) => !["open", "isWrapText", "columnMenu", "isRight", "styleList"].includes(i)
336
318
  })(
337
- ({ theme: i, open: o, isRight: r, columnMenu: e }) => {
338
- const n = r ? "Left" : "Right", l = e.initWidth, d = e.minWidthColumn;
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
- ...r ? { order: 1 } : { order: 0 },
348
- ...o ? ri(i, l) : oi(i, d),
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
- ...o ? ri(i, l) : oi(i, d)
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
- ), ti = g("div")(({ theme: i }) => ({
339
+ ), oi = g("div")(({ theme: i }) => ({
358
340
  display: "flex",
359
341
  padding: i.spacing(0, 1),
360
342
  ...i.mixins.toolbar
361
- })), ei = (i) => {
362
- const { clientWidth: o, offsetWidth: r } = i;
363
- return r - o;
364
- }, Yi = B(({ Footer: i, listMenu: o, children: r, HeaderContent: e, statuses: n, itemsProps: l, classes: d, columnMenu: t, styleList: c, sx: p }, R) => {
365
- var J, K, Q, U;
366
- const w = Ci(), S = (t == null ? void 0 : t.position) === "right", L = !1, T = !0;
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, m = (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 = (t == null ? void 0 : t.initWidth) || 250, b = X(() => t != null && t.minWidthColumn && Object.keys(t == null ? void 0 : t.minWidthColumn).length ? t == null ? void 0 : t.minWidthColumn : {
369
- width: `calc(${w.spacing(7)} + 1px)`,
370
- [w.breakpoints.up("sm")]: {
371
- width: `calc(${w.spacing(8)} + 1px)`
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
- }, [t == null ? void 0 : t.minWidthColumn]), [f, C] = $({
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
- }), u = Di(f, C), x = Y(null);
378
- q(() => {
379
- if (x.current) {
380
- const H = ei(x.current);
381
- let v = !1;
382
- H > 0 && (v = !0), u({ widthScroll: v ? H + 1 : 0 }), window.onresize = function() {
383
- if (x.current) {
384
- const N = ei(x.current);
385
- v && !N && (v = !1, u({ widthScroll: 0 })), !v && N && (v = !0, u({ widthScroll: N + 1 }));
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
- u({ isOpen: !0 });
373
+ x({ isOpen: !0 });
392
374
  }, F = () => {
393
- u({ isOpen: !1 });
375
+ x({ isOpen: !1 });
394
376
  }, M = () => {
395
- C((H) => ({ ...H, isOpen: !H.isOpen }));
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 Si(R, () => y), /* @__PURE__ */ h(E, { className: P("Dashboard", d == null ? void 0 : d.dashboard), sx: { display: "flex", height: "inherit", ...p }, children: [
403
- m ? W ? /* @__PURE__ */ a(
404
- Vi,
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: (J = l == null ? void 0 : l.MuiHeader) == null ? void 0 : J.bgColor,
409
- isRight: S,
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: (K = l == null ? void 0 : l.MuiHeader) == null ? void 0 : K.sx,
412
- className: d == null ? void 0 : d.header,
413
- AfterComponent: (Q = l == null ? void 0 : l.MuiHeader) == null ? void 0 : Q.AfterComponent,
414
- children: typeof e == "function" ? e(y) : e
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 e == "function" ? e(y) : e : null,
398
+ ) : typeof a == "function" ? a(y) : a : null,
417
399
  z && /* @__PURE__ */ h(
418
- Xi,
400
+ Gi,
419
401
  {
420
402
  variant: "permanent",
421
403
  open: f.isOpen,
422
- isRight: S,
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__ */ a(ti, {}),
429
- /* @__PURE__ */ a(Z, {})
410
+ /* @__PURE__ */ e(oi, {}),
411
+ /* @__PURE__ */ e(Q, {})
430
412
  ] }),
431
- /* @__PURE__ */ a(E, { className: "MuiListWrap", sx: {
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__ */ a(
437
- Ai,
418
+ }, children: /* @__PURE__ */ e(
419
+ Oi,
438
420
  {
439
- ref: x,
421
+ ref: u,
440
422
  columnMenu: {
441
423
  initWidth: s,
442
- minWidthColumn: ci(b, { newProp: "width", positionCorrect: `- ${f.widthScroll}px` })
424
+ minWidthColumn: ai(b, { newProp: "width", positionCorrect: `- ${f.widthScroll}px` })
443
425
  },
444
- listMenu: o,
426
+ listMenu: d,
445
427
  isOpen: f.isOpen,
446
- sx: (U = l == null ? void 0 : l.MuiListMenu) == null ? void 0 : U.sx,
447
- className: d == null ? void 0 : d.listMenu,
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__ */ a($i, { children: /* @__PURE__ */ a(bi, { onClick: M, sx: { pointerEvents: "auto" }, children: f.isOpen ? /* @__PURE__ */ a(Wi, {}) : /* @__PURE__ */ a(Li, {}) }) }),
453
- i && /* @__PURE__ */ a(k, { children: /* @__PURE__ */ h(Gi, { children: [
454
- /* @__PURE__ */ a(Z, {}),
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(ki, { className: P("Dashboard-main", d == null ? void 0 : d.main), children: [
461
- m && /* @__PURE__ */ a(ti, {}),
462
- r
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
- }), en = I.memo(Yi);
447
+ }), nn = I.memo(_i);
466
448
  export {
467
- en as Dashboard
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 {};