rc-lib-ui 1.2.12 → 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 +7 -3
package/dist/NetworkAndSocket/Socket/components/hooks/useNetworkStatus/useNetworkStatus.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { UseNetworkStatusConfig } from './useNetworkStatus.types';
|
|
3
|
-
export declare function setStateDecorator<T, D>(state: T, setState: Dispatch<SetStateAction<D>>): (payload: Partial<typeof state>) => void;
|
|
4
2
|
export declare const useNetworkStatus: ({ watch, timeout, checkInterval, ...props }: UseNetworkStatusConfig) => {
|
|
5
3
|
checkConnection: () => Promise<void>;
|
|
6
4
|
isOnline: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const a = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
2
|
+
function r(t) {
|
|
3
|
+
return a.test(t);
|
|
4
|
+
}
|
|
5
|
+
function u() {
|
|
6
|
+
var t = URL.createObjectURL(new Blob()), e = t.toString();
|
|
7
|
+
return URL.revokeObjectURL(t), e.split(/[:\/]/g).pop().toLowerCase();
|
|
8
|
+
}
|
|
9
|
+
u.valid = r;
|
|
10
|
+
export {
|
|
11
|
+
u
|
|
12
|
+
};
|
package/dist/control-cards.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as R from "react";
|
|
2
2
|
import y, { createContext as $n, useContext as hn, useCallback as S, useState as de, useEffect as V, useRef as $, forwardRef as _, createElement as le, cloneElement as zn, useMemo as mn, Component as Wn, useLayoutEffect as jn, memo as gn, isValidElement as Vn } from "react";
|
|
3
|
-
import { u as vn
|
|
4
|
-
import { c as
|
|
3
|
+
import { u as vn } from "./browser-DJTk47DY.js";
|
|
4
|
+
import { c as Hn } from "./react-CLnE01WS.js";
|
|
5
5
|
import { keyframes as fe } from "@mui/material/styles";
|
|
6
6
|
import { jsx as c, jsxs as w, Fragment as H } from "react/jsx-runtime";
|
|
7
|
-
import { Box as M, styled as P, Card as xn, Typography as j, Button as yn, LinearProgress as
|
|
7
|
+
import { Box as M, styled as P, Card as xn, Typography as j, Button as yn, LinearProgress as Fn, Alert as ce, IconButton as me, keyframes as re, DialogTitle as Se, Divider as we, DialogContent as F, alpha as qn, DialogActions as je, Portal as Bn, Dialog as Xn } from "@mui/material";
|
|
8
8
|
import Ve from "classnames";
|
|
9
|
-
import { createPortal as
|
|
10
|
-
import { Save as
|
|
9
|
+
import { createPortal as Un } from "react-dom";
|
|
10
|
+
import { Save as Yn, Close as ge, Delete as Gn, InfoOutlined as Kn, VerifiedUser as Zn, CheckCircle as bn, TaskAlt as Qn } from "@mui/icons-material";
|
|
11
|
+
import { C as Jn } from "./index-80JSxasr.js";
|
|
11
12
|
import './control-cards.css';const En = $n(void 0), et = () => {
|
|
12
13
|
const e = hn(En);
|
|
13
14
|
if (!e)
|
|
14
15
|
throw new Error("useInteractiveMessage must be used within an InteractiveMessageProvider");
|
|
15
16
|
return e;
|
|
16
|
-
}, kn = {}, nt = JSON.parse(JSON.stringify(kn)), Z =
|
|
17
|
+
}, kn = {}, nt = JSON.parse(JSON.stringify(kn)), Z = Hn(() => kn), Xe = {
|
|
17
18
|
resetState: () => Z.setState(nt),
|
|
18
19
|
setItems: ({ sectionDel: e, items: n, delPackID: r }) => Z.setState((o) => {
|
|
19
20
|
Array.isArray(o[e]) || (o[e] = []);
|
|
@@ -79,7 +80,7 @@ function ot(e) {
|
|
|
79
80
|
}, [e]), f = S((d) => n.includes(d), [n]);
|
|
80
81
|
return { selectedIds: n, selectionMode: o, handleSelect: i, handleDeselect: a, clearSelection: s, selectAll: l, checkSelected: f };
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
+
const Ur = ({ list: e, keyAction: n, setMessage: r, onExpire: o, durationDelete: t = 5e3, timeoutSuccess: i = 2e3 }) => {
|
|
83
84
|
const { showDeleteModal: a, showAlert: s, showAlertDeleteCountdown: l } = et(), f = ot(e), d = it({ sectionDel: n });
|
|
84
85
|
return {
|
|
85
86
|
onDelete: S(() => {
|
|
@@ -238,7 +239,7 @@ const Xr = ({ list: e, keyAction: n, setMessage: r, onExpire: o, durationDelete:
|
|
|
238
239
|
animation: n ? `${r} 1.5s ease-in forwards` : "none",
|
|
239
240
|
opacity: n ? 0.8 : 1
|
|
240
241
|
};
|
|
241
|
-
},
|
|
242
|
+
}, Yr = {
|
|
242
243
|
getGradient: at,
|
|
243
244
|
getNoise: st,
|
|
244
245
|
getPulseBorder: ct,
|
|
@@ -323,7 +324,7 @@ const Xr = ({ list: e, keyAction: n, setMessage: r, onExpire: o, durationDelete:
|
|
|
323
324
|
children: o
|
|
324
325
|
}
|
|
325
326
|
);
|
|
326
|
-
},
|
|
327
|
+
}, Gr = y.memo(ft);
|
|
327
328
|
function Cn(e) {
|
|
328
329
|
var n, r, o = "";
|
|
329
330
|
if (typeof e == "string" || typeof e == "number") o += e;
|
|
@@ -1336,7 +1337,7 @@ var $t = /* @__PURE__ */ gn(An), zt = /* @__PURE__ */ he({
|
|
|
1336
1337
|
});
|
|
1337
1338
|
return y.createElement(Dn.Provider, {
|
|
1338
1339
|
value: i
|
|
1339
|
-
}, l, s ?
|
|
1340
|
+
}, l, s ? Un(v, s) : v);
|
|
1340
1341
|
}, wn(n, [{
|
|
1341
1342
|
key: "maxSnack",
|
|
1342
1343
|
get: function() {
|
|
@@ -1396,7 +1397,7 @@ const Xt = P(M, {
|
|
|
1396
1397
|
yn,
|
|
1397
1398
|
{
|
|
1398
1399
|
variant: "outlined",
|
|
1399
|
-
startIcon: /* @__PURE__ */ c(
|
|
1400
|
+
startIcon: /* @__PURE__ */ c(Yn, {}),
|
|
1400
1401
|
onClick: n,
|
|
1401
1402
|
children: "Отмена"
|
|
1402
1403
|
}
|
|
@@ -1404,7 +1405,7 @@ const Xt = P(M, {
|
|
|
1404
1405
|
] })
|
|
1405
1406
|
] }),
|
|
1406
1407
|
/* @__PURE__ */ c(M, { children: /* @__PURE__ */ c(
|
|
1407
|
-
|
|
1408
|
+
Fn,
|
|
1408
1409
|
{
|
|
1409
1410
|
variant: "determinate",
|
|
1410
1411
|
value: r,
|
|
@@ -1413,7 +1414,7 @@ const Xt = P(M, {
|
|
|
1413
1414
|
return {
|
|
1414
1415
|
mt: 1,
|
|
1415
1416
|
height: 4,
|
|
1416
|
-
backgroundColor:
|
|
1417
|
+
backgroundColor: Jn.hexBrightness((i = t.palette.primary) == null ? void 0 : i.light, 1.5),
|
|
1417
1418
|
"& .MuiLinearProgress-bar": {
|
|
1418
1419
|
backgroundColor: "profile1.main"
|
|
1419
1420
|
}
|
|
@@ -1690,7 +1691,7 @@ const Ie = P("div")({
|
|
|
1690
1691
|
onClick: e.onConfirm,
|
|
1691
1692
|
variant: "contained",
|
|
1692
1693
|
color: "error",
|
|
1693
|
-
startIcon: /* @__PURE__ */ c(
|
|
1694
|
+
startIcon: /* @__PURE__ */ c(Gn, {}),
|
|
1694
1695
|
children: "Удалить"
|
|
1695
1696
|
}
|
|
1696
1697
|
)
|
|
@@ -1704,10 +1705,10 @@ const Ie = P("div")({
|
|
|
1704
1705
|
}
|
|
1705
1706
|
}, sr = y.memo(ar), cr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
|
|
1706
1707
|
/* @__PURE__ */ w(De, { color: e.severity || "info", children: [
|
|
1707
|
-
/* @__PURE__ */ c(
|
|
1708
|
+
/* @__PURE__ */ c(Kn, { color: e.severity, sx: { marginRight: 1 } }),
|
|
1708
1709
|
e.title || `Информация ${e.severity}`
|
|
1709
1710
|
] }),
|
|
1710
|
-
/* @__PURE__ */ c(we, { sx: (n) => ({ borderColor:
|
|
1711
|
+
/* @__PURE__ */ c(we, { sx: (n) => ({ borderColor: qn(n.palette[e.severity || "info"].main, 0.6) }) }),
|
|
1711
1712
|
/* @__PURE__ */ c(F, { sx: { paddingX: 1 }, children: e.message }),
|
|
1712
1713
|
/* @__PURE__ */ c(Ie, { sx: { justifyContent: "end", pt: 1 }, children: /* @__PURE__ */ c(
|
|
1713
1714
|
A,
|
|
@@ -1727,7 +1728,7 @@ const Ie = P("div")({
|
|
|
1727
1728
|
}
|
|
1728
1729
|
}, ur = y.memo(lr), dr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
|
|
1729
1730
|
/* @__PURE__ */ c(Se, { sx: { p: 2.5, fontWeight: 600 }, children: /* @__PURE__ */ w(M, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
1730
|
-
/* @__PURE__ */ c(
|
|
1731
|
+
/* @__PURE__ */ c(Zn, { color: "success" }),
|
|
1731
1732
|
/* @__PURE__ */ c("span", { children: e.title })
|
|
1732
1733
|
] }) }),
|
|
1733
1734
|
/* @__PURE__ */ c(we, {}),
|
|
@@ -1799,7 +1800,7 @@ const Ie = P("div")({
|
|
|
1799
1800
|
textAlign: "center"
|
|
1800
1801
|
})), br = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
|
|
1801
1802
|
/* @__PURE__ */ w(yr, { children: [
|
|
1802
|
-
/* @__PURE__ */ c(
|
|
1803
|
+
/* @__PURE__ */ c(Qn, { sx: { fontSize: 64, mb: 2 } }),
|
|
1803
1804
|
/* @__PURE__ */ c(j, { variant: "h4", gutterBottom: !0, children: e.title }),
|
|
1804
1805
|
/* @__PURE__ */ c(j, { variant: "body1", children: e.message })
|
|
1805
1806
|
] }),
|
|
@@ -2144,8 +2145,8 @@ const Nr = R.memo(_n), pn = {
|
|
|
2144
2145
|
};
|
|
2145
2146
|
return /* @__PURE__ */ w(En.Provider, { value: x, children: [
|
|
2146
2147
|
e,
|
|
2147
|
-
n.filter((u) => ["modal", "fullModal"].includes(u.view)).map((u, v) => /* @__PURE__ */ c(
|
|
2148
|
-
|
|
2148
|
+
n.filter((u) => ["modal", "fullModal"].includes(u.view)).map((u, v) => /* @__PURE__ */ c(Bn, { children: /* @__PURE__ */ w(
|
|
2149
|
+
Xn,
|
|
2149
2150
|
{
|
|
2150
2151
|
open: !u.isExiting,
|
|
2151
2152
|
...u.view == "fullModal" && { fullWidth: !0, fullScreen: !0 },
|
|
@@ -2169,7 +2170,7 @@ const Nr = R.memo(_n), pn = {
|
|
|
2169
2170
|
}
|
|
2170
2171
|
) }, u.id))
|
|
2171
2172
|
] });
|
|
2172
|
-
},
|
|
2173
|
+
}, Kr = (e) => /* @__PURE__ */ c(
|
|
2173
2174
|
Bt,
|
|
2174
2175
|
{
|
|
2175
2176
|
maxSnack: 4,
|
|
@@ -2226,10 +2227,10 @@ const Nr = R.memo(_n), pn = {
|
|
|
2226
2227
|
};
|
|
2227
2228
|
};
|
|
2228
2229
|
export {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2230
|
+
Gr as CardDetectionPress,
|
|
2231
|
+
Kr as InteractiveMessageProvider,
|
|
2232
|
+
Yr as animationDelete,
|
|
2233
|
+
Ur as useControlCards,
|
|
2233
2234
|
et as useInteractiveMessage,
|
|
2234
2235
|
dt as useLongPress,
|
|
2235
2236
|
ot as useSelected
|