rc-lib-ui 1.2.18 → 1.2.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.js
CHANGED
|
@@ -4,8 +4,8 @@ import { useTheme as wi } from "@mui/material/styles";
|
|
|
4
4
|
import R, { useState as B, useCallback as P, useRef as K, useEffect as Q, forwardRef as _, useMemo as li, Fragment as bi, useImperativeHandle as vi } from "react";
|
|
5
5
|
import Si from "@mui/icons-material/ChevronLeft";
|
|
6
6
|
import Ci from "@mui/icons-material/ChevronRight";
|
|
7
|
-
import { U as Li, s as
|
|
8
|
-
import { ExpandLess as
|
|
7
|
+
import { U as Li, s as yi } from "./index-B7GqTJat.js";
|
|
8
|
+
import { ExpandLess as Ii, ExpandMore as Wi } from "@mui/icons-material";
|
|
9
9
|
import { T as Hi } from "./Tooltips-Q_C8jHNF.js";
|
|
10
10
|
import { NavLink as ki } from "react-router-dom";
|
|
11
11
|
import G from "classnames";
|
|
@@ -79,7 +79,7 @@ const Di = p("main")(() => ({
|
|
|
79
79
|
return Q(() => {
|
|
80
80
|
if (!i && o.current) {
|
|
81
81
|
const r = o.current, c = setTimeout(() => {
|
|
82
|
-
r != null && r.offsetWidth && (r == null ? void 0 : r.scrollWidth) > (r == null ? void 0 : r.offsetWidth) && t(l), clearTimeout(c);
|
|
82
|
+
r != null && r.offsetWidth && (r == null ? void 0 : r.scrollWidth) > (r == null ? void 0 : r.offsetWidth) && typeof l == "string" && t(l), clearTimeout(c);
|
|
83
83
|
}, 200);
|
|
84
84
|
}
|
|
85
85
|
}, [l, i]), a ? !i && /* @__PURE__ */ d(di, { children: l, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ d(zi, { ref: o, tooltipText: n, title: l, sx: e });
|
|
@@ -170,7 +170,7 @@ const Di = p("main")(() => ({
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
})), q = ({ isIcon: i }) => ({ paddingRight: 1.2, ...!i && { paddingLeft: 1.2 } }), Fi = _(({ styleList: i = "variant1", isRight: a, columnMenu: l, isWrapText: e = !1, listMenu: n, isOpen: t, sx: o, className: r }, c) => {
|
|
173
|
-
const { minWidthColumn: x } = l, [
|
|
173
|
+
const { minWidthColumn: x } = l, [y, v] = B(""), I = li(() => n.map(({ action: W, icon: g, title: z, sx: H = {}, onClick: S, children: m, to: k }, h) => {
|
|
174
174
|
const D = `${h}`, w = (s) => {
|
|
175
175
|
v(D), S && S(s);
|
|
176
176
|
};
|
|
@@ -207,7 +207,7 @@ const Di = p("main")(() => ({
|
|
|
207
207
|
),
|
|
208
208
|
t && /* @__PURE__ */ f(A, { children: [
|
|
209
209
|
W,
|
|
210
|
-
s.is ? /* @__PURE__ */ d(
|
|
210
|
+
s.is ? /* @__PURE__ */ d(Ii, {}) : /* @__PURE__ */ d(Wi, {})
|
|
211
211
|
] })
|
|
212
212
|
]
|
|
213
213
|
}
|
|
@@ -223,9 +223,9 @@ const Di = p("main")(() => ({
|
|
|
223
223
|
isOpen: !0,
|
|
224
224
|
onClick: b,
|
|
225
225
|
isWrapText: e,
|
|
226
|
-
...C ? { to: C, component: ni } : { to: "", className: G({ "Mui-selected":
|
|
226
|
+
...C ? { to: C, component: ni } : { to: "", className: G({ "Mui-selected": y === L }) },
|
|
227
227
|
children: [
|
|
228
|
-
T && /* @__PURE__ */ d(X, { icon: T, sx: { ...x, marginLeft: "
|
|
228
|
+
T && /* @__PURE__ */ d(X, { icon: T, sx: { ...x, marginLeft: "8px !important" } }),
|
|
229
229
|
/* @__PURE__ */ d(
|
|
230
230
|
E,
|
|
231
231
|
{
|
|
@@ -247,7 +247,7 @@ const Di = p("main")(() => ({
|
|
|
247
247
|
isOpen: t,
|
|
248
248
|
onClick: w,
|
|
249
249
|
isWrapText: e,
|
|
250
|
-
...k ? { to: k, component: ni } : { to: "", className: G({ "Mui-selected":
|
|
250
|
+
...k ? { to: k, component: ni } : { to: "", className: G({ "Mui-selected": y === D }) },
|
|
251
251
|
sx: { ...q({ isIcon: g }) },
|
|
252
252
|
children: [
|
|
253
253
|
g && /* @__PURE__ */ d(X, { icon: g, sx: x }),
|
|
@@ -263,7 +263,7 @@ const Di = p("main")(() => ({
|
|
|
263
263
|
]
|
|
264
264
|
}
|
|
265
265
|
) }, h);
|
|
266
|
-
}), [n, t,
|
|
266
|
+
}), [n, t, y, a, q]);
|
|
267
267
|
return /* @__PURE__ */ d(
|
|
268
268
|
Oi,
|
|
269
269
|
{
|
|
@@ -271,7 +271,7 @@ const Di = p("main")(() => ({
|
|
|
271
271
|
styleList: i,
|
|
272
272
|
sx: o,
|
|
273
273
|
className: r,
|
|
274
|
-
children:
|
|
274
|
+
children: I
|
|
275
275
|
}
|
|
276
276
|
);
|
|
277
277
|
}), ji = R.memo(Fi), Ai = p(J, {
|
|
@@ -380,9 +380,9 @@ const Di = p("main")(() => ({
|
|
|
380
380
|
})), ei = (i) => {
|
|
381
381
|
const { clientWidth: a, offsetWidth: l } = i;
|
|
382
382
|
return l - a;
|
|
383
|
-
}, Ei = _(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: x },
|
|
383
|
+
}, Ei = _(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: x }, y) => {
|
|
384
384
|
var O, $, F, L;
|
|
385
|
-
const v = wi(),
|
|
385
|
+
const v = wi(), I = (r == null ? void 0 : r.position) === "right", W = !1, g = !0;
|
|
386
386
|
//!!statuses?.isScrollIndentation
|
|
387
387
|
const z = (n == null ? void 0 : n.isHeaderDefault) === void 0 ? !0 : n == null ? void 0 : n.isHeaderDefault, H = (n == null ? void 0 : n.isHeader) === void 0 ? !0 : n == null ? void 0 : n.isHeader, S = (n == null ? void 0 : n.isMenu) === void 0 ? !0 : n == null ? void 0 : n.isMenu, m = (r == null ? void 0 : r.initWidth) || 250, k = li(() => r != null && r.minWidthColumn && Object.keys(r == null ? void 0 : r.minWidthColumn).length ? r == null ? void 0 : r.minWidthColumn : {
|
|
388
388
|
width: `calc(${v.spacing(7)} + 1px)`,
|
|
@@ -393,7 +393,7 @@ const Di = p("main")(() => ({
|
|
|
393
393
|
isOpen: !!(n != null && n.isDefaultOpen),
|
|
394
394
|
widthCloseColumn: 0,
|
|
395
395
|
widthScroll: 0
|
|
396
|
-
}), w =
|
|
396
|
+
}), w = yi(h, D), s = K(null);
|
|
397
397
|
Q(() => {
|
|
398
398
|
if (s.current) {
|
|
399
399
|
const b = ei(s.current);
|
|
@@ -418,14 +418,14 @@ const Di = p("main")(() => ({
|
|
|
418
418
|
handleMenuClose: T,
|
|
419
419
|
handleMenuToggle: N
|
|
420
420
|
};
|
|
421
|
-
return vi(
|
|
421
|
+
return vi(y, () => C), /* @__PURE__ */ f(J, { className: G("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...x }, children: [
|
|
422
422
|
H ? z ? /* @__PURE__ */ d(
|
|
423
423
|
_i,
|
|
424
424
|
{
|
|
425
425
|
initWidth: m,
|
|
426
426
|
isOpen: h.isOpen,
|
|
427
427
|
bgColor: (O = t == null ? void 0 : t.MuiHeader) == null ? void 0 : O.bgColor,
|
|
428
|
-
isRight:
|
|
428
|
+
isRight: I,
|
|
429
429
|
isHeaderResize: n == null ? void 0 : n.isHeaderResize,
|
|
430
430
|
sx: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.sx,
|
|
431
431
|
className: o == null ? void 0 : o.header,
|
|
@@ -438,7 +438,7 @@ const Di = p("main")(() => ({
|
|
|
438
438
|
{
|
|
439
439
|
variant: "permanent",
|
|
440
440
|
open: h.isOpen,
|
|
441
|
-
isRight:
|
|
441
|
+
isRight: I,
|
|
442
442
|
isWrapText: W,
|
|
443
443
|
columnMenu: { initWidth: m, minWidthColumn: k },
|
|
444
444
|
styleList: c,
|
|
@@ -456,7 +456,7 @@ const Di = p("main")(() => ({
|
|
|
456
456
|
ji,
|
|
457
457
|
{
|
|
458
458
|
ref: s,
|
|
459
|
-
isRight:
|
|
459
|
+
isRight: I,
|
|
460
460
|
columnMenu: {
|
|
461
461
|
initWidth: m,
|
|
462
462
|
minWidthColumn: Ti(k, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
|