rc-lib-ui 1.2.16-beta.2 → 1.2.16-beta.3
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/control-cards.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{index-80JSxasr.js → index-DjJlkTF6.js} +38 -30
- package/dist/socket.js +37 -36
- package/package.json +2 -2
package/dist/control-cards.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Box as M, styled as P, Card as xn, Typography as j, Button as yn, Linea
|
|
|
8
8
|
import Ve from "classnames";
|
|
9
9
|
import { createPortal as Un } from "react-dom";
|
|
10
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-
|
|
11
|
+
import { C as Jn } from "./index-DjJlkTF6.js";
|
|
12
12
|
import './control-cards.css';const En = $n(void 0), et = () => {
|
|
13
13
|
const e = hn(En);
|
|
14
14
|
if (!e)
|
package/dist/hooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as h, useRef as m, useEffect as P, useCallback as r } from "react";
|
|
2
|
-
import { T as w } from "./index-
|
|
2
|
+
import { T as w } from "./index-DjJlkTF6.js";
|
|
3
3
|
import { s as f } from "./index-B7GqTJat.js";
|
|
4
4
|
const p = (s = { timerShowPanel: 5e3 }) => {
|
|
5
5
|
const [t, a] = h({
|
|
@@ -1414,7 +1414,7 @@ const resolveConfig = (t) => {
|
|
|
1414
1414
|
return;
|
|
1415
1415
|
const S = AxiosHeaders$1.from(
|
|
1416
1416
|
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1417
|
-
),
|
|
1417
|
+
), T = {
|
|
1418
1418
|
data: !i || i === "text" || i === "json" ? f.responseText : f.response,
|
|
1419
1419
|
status: f.status,
|
|
1420
1420
|
statusText: f.statusText,
|
|
@@ -1426,7 +1426,7 @@ const resolveConfig = (t) => {
|
|
|
1426
1426
|
e(R), p();
|
|
1427
1427
|
}, function(R) {
|
|
1428
1428
|
r(R), p();
|
|
1429
|
-
},
|
|
1429
|
+
}, T), f = null;
|
|
1430
1430
|
}
|
|
1431
1431
|
"onloadend" in f ? f.onloadend = w : f.onreadystatechange = function() {
|
|
1432
1432
|
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
@@ -1436,15 +1436,15 @@ const resolveConfig = (t) => {
|
|
|
1436
1436
|
r(new AxiosError("Network Error", AxiosError.ERR_NETWORK, t, f)), f = null;
|
|
1437
1437
|
}, f.ontimeout = function() {
|
|
1438
1438
|
let S = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
1439
|
-
const
|
|
1439
|
+
const T = n.transitional || transitionalDefaults;
|
|
1440
1440
|
n.timeoutErrorMessage && (S = n.timeoutErrorMessage), r(new AxiosError(
|
|
1441
1441
|
S,
|
|
1442
|
-
|
|
1442
|
+
T.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
1443
1443
|
t,
|
|
1444
1444
|
f
|
|
1445
1445
|
)), f = null;
|
|
1446
|
-
}, o === void 0 && s.setContentType(null), "setRequestHeader" in f && utils$1.forEach(s.toJSON(), function(S,
|
|
1447
|
-
f.setRequestHeader(
|
|
1446
|
+
}, o === void 0 && s.setContentType(null), "setRequestHeader" in f && utils$1.forEach(s.toJSON(), function(S, T) {
|
|
1447
|
+
f.setRequestHeader(T, S);
|
|
1448
1448
|
}), utils$1.isUndefined(n.withCredentials) || (f.withCredentials = !!n.withCredentials), i && i !== "json" && (f.responseType = n.responseType), l && ([g, m] = progressEventReducer(l, !0), f.addEventListener("progress", g)), a && f.upload && ([d, b] = progressEventReducer(a), f.upload.addEventListener("progress", d), f.upload.addEventListener("loadend", b)), (n.cancelToken || n.signal) && (u = (S) => {
|
|
1449
1449
|
f && (r(!S || S.type ? new CanceledError(null, t, f) : S), f.abort(), f = null);
|
|
1450
1450
|
}, n.cancelToken && n.cancelToken.subscribe(u), n.signal && (n.signal.aborted ? u() : n.signal.addEventListener("abort", u)));
|
|
@@ -1623,8 +1623,8 @@ const getBodyLength = async (t) => {
|
|
|
1623
1623
|
credentials: v ? g : void 0
|
|
1624
1624
|
});
|
|
1625
1625
|
let S = await fetch(p);
|
|
1626
|
-
const
|
|
1627
|
-
if (supportsResponseStream && (a ||
|
|
1626
|
+
const T = supportsResponseStream && (u === "stream" || u === "response");
|
|
1627
|
+
if (supportsResponseStream && (a || T && f)) {
|
|
1628
1628
|
const D = {};
|
|
1629
1629
|
["status", "statusText", "headers"].forEach((_) => {
|
|
1630
1630
|
D[_] = S[_];
|
|
@@ -1642,7 +1642,7 @@ const getBodyLength = async (t) => {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
u = u || "text";
|
|
1644
1644
|
let R = await resolvers[utils$1.findKey(resolvers, u) || "text"](S, t);
|
|
1645
|
-
return !
|
|
1645
|
+
return !T && f && f(), await new Promise((D, C) => {
|
|
1646
1646
|
settle(D, C, {
|
|
1647
1647
|
data: R,
|
|
1648
1648
|
headers: AxiosHeaders$1.from(S.headers),
|
|
@@ -2287,7 +2287,7 @@ c(E, "keyCookie", "AuthCookie"), c(E, "cookieOptions", {}), c(E, "registerReques
|
|
|
2287
2287
|
s = { ...s, statusCode: f, data: w, res: m }, f === 200 && p && (E.saveToken(p), s.data = { ...s.data, token: p }), r(s);
|
|
2288
2288
|
},
|
|
2289
2289
|
(m) => {
|
|
2290
|
-
const p = E.errorsHandler.handleError(m), { url: f, status: w, headers: v, error: S, ...
|
|
2290
|
+
const p = E.errorsHandler.handleError(m), { url: f, status: w, headers: v, error: S, ...T } = m, R = typeof S == "string" ? Utils.isJSON(S.trim()) : !1, D = {
|
|
2291
2291
|
headers: v,
|
|
2292
2292
|
status: w,
|
|
2293
2293
|
message: ""
|
|
@@ -2306,7 +2306,7 @@ c(E, "keyCookie", "AuthCookie"), c(E, "cookieOptions", {}), c(E, "registerReques
|
|
|
2306
2306
|
const m = b.status, p = b == null ? void 0 : b.data;
|
|
2307
2307
|
s = { ...s, statusCode: m, data: p, res: b }, r(s);
|
|
2308
2308
|
}).catch((b) => {
|
|
2309
|
-
const m = E.errorsHandler.handleError(b), { code: p, config: f, status: w, message: v, response: S, stack:
|
|
2309
|
+
const m = E.errorsHandler.handleError(b), { code: p, config: f, status: w, message: v, response: S, stack: T } = b, R = {
|
|
2310
2310
|
code: p,
|
|
2311
2311
|
config: f,
|
|
2312
2312
|
status: w || l,
|
|
@@ -2314,7 +2314,7 @@ c(E, "keyCookie", "AuthCookie"), c(E, "cookieOptions", {}), c(E, "registerReques
|
|
|
2314
2314
|
headers: S == null ? void 0 : S.headers,
|
|
2315
2315
|
statusText: S == null ? void 0 : S.statusText,
|
|
2316
2316
|
data: S == null ? void 0 : S.data,
|
|
2317
|
-
stack:
|
|
2317
|
+
stack: T
|
|
2318
2318
|
};
|
|
2319
2319
|
n({ ...d, ...m, errExt: R });
|
|
2320
2320
|
});
|
|
@@ -2443,21 +2443,21 @@ class EventSubscribers {
|
|
|
2443
2443
|
});
|
|
2444
2444
|
}
|
|
2445
2445
|
}
|
|
2446
|
-
const y = class
|
|
2446
|
+
const y = class A {
|
|
2447
2447
|
static setState(e) {
|
|
2448
|
-
|
|
2448
|
+
A.state = { ...A.state, ...e };
|
|
2449
2449
|
}
|
|
2450
2450
|
static getState() {
|
|
2451
|
-
return
|
|
2451
|
+
return A.state;
|
|
2452
2452
|
}
|
|
2453
2453
|
static getIsNetwork() {
|
|
2454
|
-
return
|
|
2454
|
+
return A.state.isNetworkStatus;
|
|
2455
2455
|
}
|
|
2456
2456
|
static request({ keyAction: e, request: r }) {
|
|
2457
2457
|
const { url: n, ...o } = r;
|
|
2458
2458
|
return new Promise((s, i) => {
|
|
2459
|
-
|
|
2460
|
-
const a =
|
|
2459
|
+
A.getIsInit() || A.init();
|
|
2460
|
+
const a = A.getIsNetwork(), l = {
|
|
2461
2461
|
url: n,
|
|
2462
2462
|
keyAction: e,
|
|
2463
2463
|
isErr: !a,
|
|
@@ -2466,7 +2466,7 @@ const y = class T {
|
|
|
2466
2466
|
statusCode: a ? 0 : 520,
|
|
2467
2467
|
isReload: !1
|
|
2468
2468
|
};
|
|
2469
|
-
if (
|
|
2469
|
+
if (A.events.publish("fetch", l), a) {
|
|
2470
2470
|
apiRequest.requestInServer(n, o).then((u) => {
|
|
2471
2471
|
const d = {
|
|
2472
2472
|
isReq: !1,
|
|
@@ -2476,7 +2476,7 @@ const y = class T {
|
|
|
2476
2476
|
msg: "",
|
|
2477
2477
|
...u
|
|
2478
2478
|
};
|
|
2479
|
-
|
|
2479
|
+
A.events.publish("fetch", d), s(d);
|
|
2480
2480
|
}).catch((u) => {
|
|
2481
2481
|
const d = {
|
|
2482
2482
|
//TODO: Проверить. dataErr не верно возвращает
|
|
@@ -2485,11 +2485,11 @@ const y = class T {
|
|
|
2485
2485
|
keyAction: e,
|
|
2486
2486
|
...u
|
|
2487
2487
|
};
|
|
2488
|
-
|
|
2488
|
+
A.events.publish("fetch", d), i(d);
|
|
2489
2489
|
});
|
|
2490
2490
|
return;
|
|
2491
2491
|
}
|
|
2492
|
-
|
|
2492
|
+
A.events.publish("fetch", l), i(l);
|
|
2493
2493
|
});
|
|
2494
2494
|
}
|
|
2495
2495
|
};
|
|
@@ -2527,7 +2527,7 @@ c(Numbers, "getOnlyTheStringNumbers", (t) => t.split("").filter((e) => !Number.i
|
|
|
2527
2527
|
}), c(Numbers, "randomMinMax", (t, e) => Math.floor(Math.random() * (e - t + 1)) + t);
|
|
2528
2528
|
class NetworkStatusTracker {
|
|
2529
2529
|
constructor(e = []) {
|
|
2530
|
-
c(this, "networkInfo"), c(this, "listUrls", []), c(this, "state", {
|
|
2530
|
+
c(this, "networkInfo"), c(this, "configInit"), c(this, "listUrls", []), c(this, "state", {
|
|
2531
2531
|
isActiveEvents: !1,
|
|
2532
2532
|
isMonitoring: !1,
|
|
2533
2533
|
checkIntervalId: null,
|
|
@@ -2574,10 +2574,15 @@ class NetworkStatusTracker {
|
|
|
2574
2574
|
this.controllersEvents = { ...this.controllersEvents, ...e };
|
|
2575
2575
|
}
|
|
2576
2576
|
async initialize(e, r) {
|
|
2577
|
-
if (!this.state.isInitialized)
|
|
2577
|
+
if (this.configInit = r, !this.state.isInitialized)
|
|
2578
2578
|
try {
|
|
2579
|
-
|
|
2580
|
-
|
|
2579
|
+
if (this.listUrls.length > 0)
|
|
2580
|
+
await this.requestByUrls(e, r);
|
|
2581
|
+
else {
|
|
2582
|
+
const n = typeof navigator < "u" ? navigator.onLine : !1;
|
|
2583
|
+
this.updateState(n, e);
|
|
2584
|
+
}
|
|
2585
|
+
this.setState({ isInitialized: !0 });
|
|
2581
2586
|
} catch (n) {
|
|
2582
2587
|
console.error("NetworkStatusTracker initialization error:", n), this.updateState(!1, e), this.setState({ isInitialized: !0 });
|
|
2583
2588
|
}
|
|
@@ -2597,10 +2602,13 @@ class NetworkStatusTracker {
|
|
|
2597
2602
|
const u = this.getConnection();
|
|
2598
2603
|
u && u != null && u.addEventListener ? u.addEventListener(
|
|
2599
2604
|
"change",
|
|
2600
|
-
(d) => {
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2605
|
+
async (d) => {
|
|
2606
|
+
if (this.listUrls.length > 0)
|
|
2607
|
+
await this.requestByUrls(e, this.configInit);
|
|
2608
|
+
else {
|
|
2609
|
+
const g = navigator.onLine;
|
|
2610
|
+
this.updateState(g, e);
|
|
2611
|
+
}
|
|
2604
2612
|
},
|
|
2605
2613
|
{ signal: (s = l.change) == null ? void 0 : s.signal }
|
|
2606
2614
|
) : (window.addEventListener(
|
package/dist/socket.js
CHANGED
|
@@ -2,12 +2,12 @@ import './socket.css';var z = Object.defineProperty;
|
|
|
2
2
|
var F = (n, e, t) => e in n ? z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var r = (n, e, t) => F(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { jsx as D } from "react/jsx-runtime";
|
|
5
|
-
import N, { useState as B, useRef as x, useCallback as
|
|
5
|
+
import N, { useState as B, useRef as x, useCallback as E, useEffect as I } from "react";
|
|
6
6
|
import { c as U } from "./react-CLnE01WS.js";
|
|
7
7
|
import { styled as M, Collapse as G } from "@mui/material";
|
|
8
8
|
import L from "classnames";
|
|
9
9
|
import { u as W } from "./browser-DJTk47DY.js";
|
|
10
|
-
import { N as $ } from "./index-
|
|
10
|
+
import { N as $ } from "./index-DjJlkTF6.js";
|
|
11
11
|
const T = {
|
|
12
12
|
statusConnect: "disconnect",
|
|
13
13
|
isOfflineSocket: !1,
|
|
@@ -20,22 +20,22 @@ const T = {
|
|
|
20
20
|
isSelectOffline: !1
|
|
21
21
|
//Для того что бы 2й раз окно не показывать
|
|
22
22
|
}
|
|
23
|
-
},
|
|
24
|
-
resetState: () => g.setState(
|
|
23
|
+
}, K = JSON.parse(JSON.stringify(T)), g = U(() => T), R = {
|
|
24
|
+
resetState: () => g.setState(K),
|
|
25
25
|
setStatusConnectSocket: ({ statusConnect: n }) => g.setState({ statusConnect: n }),
|
|
26
26
|
setStatusIsReConnectSocket: ({ isReConnectSocket: n }) => g.setState({ isReConnectSocket: n }),
|
|
27
27
|
setStatusReady: ({ isReadySocket: n }) => g.setState({ isReadySocket: n }),
|
|
28
28
|
setIsOfflineSocket: ({ isOfflineSocket: n }) => g.setState({ isOfflineSocket: n }),
|
|
29
29
|
setInfoNoConnectServer: (n) => g.setState((e) => ({ infoNoConnectServer: { ...e.infoNoConnectServer, ...n } })),
|
|
30
30
|
setIsDisableConnectSocket: ({ isDisableConnectSocket: n }) => g.setState({ isDisableConnectSocket: n })
|
|
31
|
-
},
|
|
31
|
+
}, k = {
|
|
32
32
|
getStatusConnectSocket: (n) => n.statusConnect,
|
|
33
33
|
getStatusIsReConnectSocket: (n) => n.isReConnectSocket,
|
|
34
34
|
getStatusReady: (n) => n.isReadySocket,
|
|
35
35
|
getIsOfflineSocket: (n) => n.isOfflineSocket,
|
|
36
36
|
getInfoNoConnectServer: (n) => n.infoNoConnectServer,
|
|
37
37
|
getIsDisableConnectSocket: (n) => n.isDisableConnectSocket
|
|
38
|
-
},
|
|
38
|
+
}, b = (n) => g(n), Q = M("span")({
|
|
39
39
|
backgroundColor: "rgba(0,0,0,0.3)",
|
|
40
40
|
color: "#fff",
|
|
41
41
|
display: "flex",
|
|
@@ -43,7 +43,7 @@ const T = {
|
|
|
43
43
|
padding: "1px 10px",
|
|
44
44
|
borderRadius: "3px 3px 3px 3px"
|
|
45
45
|
}), P = M(
|
|
46
|
-
({ children: n, ...e }) => /* @__PURE__ */ D(G, { ...e, unmountOnExit: !0, children: /* @__PURE__ */ D(
|
|
46
|
+
({ children: n, ...e }) => /* @__PURE__ */ D(G, { ...e, unmountOnExit: !0, children: /* @__PURE__ */ D(Q, { children: n }) })
|
|
47
47
|
)(({ theme: n }) => ({
|
|
48
48
|
fontSize: 10,
|
|
49
49
|
position: "absolute",
|
|
@@ -60,12 +60,12 @@ const T = {
|
|
|
60
60
|
color: "#151616",
|
|
61
61
|
letterSpacing: 1
|
|
62
62
|
}
|
|
63
|
-
})),
|
|
63
|
+
})), V = "_connect-server-anim_1lp7f_1", X = "_loading-stripes_1lp7f_1", Y = {
|
|
64
64
|
"connect-server-anim": "_connect-server-anim_1lp7f_1",
|
|
65
|
-
connectServerAnim:
|
|
65
|
+
connectServerAnim: V,
|
|
66
66
|
"loading-stripes": "_loading-stripes_1lp7f_1",
|
|
67
|
-
loadingStripes:
|
|
68
|
-
},
|
|
67
|
+
loadingStripes: X
|
|
68
|
+
}, Z = M(P, {
|
|
69
69
|
shouldForwardProp: (n) => ![""].includes(n)
|
|
70
70
|
})(({ theme: n }) => ({
|
|
71
71
|
top: "100%",
|
|
@@ -75,20 +75,20 @@ const T = {
|
|
|
75
75
|
"& span": {
|
|
76
76
|
height: "100%"
|
|
77
77
|
}
|
|
78
|
-
})),
|
|
79
|
-
const o = k
|
|
78
|
+
})), j = ({ text: n = "Происходит подключение к серверу", className: e, ...t }) => {
|
|
79
|
+
const o = b(k.getStatusConnectSocket), i = b(k.getStatusIsReConnectSocket);
|
|
80
80
|
return /* @__PURE__ */ D(
|
|
81
|
-
|
|
81
|
+
Z,
|
|
82
82
|
{
|
|
83
83
|
in: o === "pending" || i,
|
|
84
84
|
collapsedSize: "1px",
|
|
85
|
-
className: L(
|
|
85
|
+
className: L(Y["connect-server-anim"], e),
|
|
86
86
|
unmountOnExit: !0,
|
|
87
87
|
...t,
|
|
88
88
|
children: n
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
|
-
}, _ = N.memo(
|
|
91
|
+
}, _ = N.memo(j);
|
|
92
92
|
class ee {
|
|
93
93
|
constructor() {
|
|
94
94
|
r(this, "defaultProps", {
|
|
@@ -331,7 +331,8 @@ const s = class s {
|
|
|
331
331
|
s.wsApi.getIsInitWS() && (console.log("CONNECT WS"), s.setState({ isDisconnect: !1 }), s.wsApi.connect());
|
|
332
332
|
}
|
|
333
333
|
static disconnect() {
|
|
334
|
-
|
|
334
|
+
var e;
|
|
335
|
+
s.state.isDisconnect || (s.setState({ isDisconnect: !0 }), console.log("DISCONNECT WS"), s.wsApi.disconnect(), s.resetState(), s.events.resetSubscribers(), (e = this.networkTicker) == null || e.destroy());
|
|
335
336
|
}
|
|
336
337
|
static send(e, t) {
|
|
337
338
|
const { action: o, ...i } = e, c = i != null && i.request_id ? i.request_id : W(), a = Date.now();
|
|
@@ -374,9 +375,9 @@ const s = class s {
|
|
|
374
375
|
const l = (p) => {
|
|
375
376
|
d(), i(p);
|
|
376
377
|
}, h = (p) => {
|
|
377
|
-
var
|
|
378
|
+
var A;
|
|
378
379
|
const O = this.wsApi.findDataRequestByAction(c);
|
|
379
|
-
!O || ((
|
|
380
|
+
!O || ((A = p == null ? void 0 : p.request) == null ? void 0 : A.requestAction) !== O.requestAction || (d(), o({ ...p }));
|
|
380
381
|
}, S = () => {
|
|
381
382
|
d(), i(new DOMException("Aborted", "AbortError"));
|
|
382
383
|
}, d = () => {
|
|
@@ -403,7 +404,7 @@ r(s, "state", {
|
|
|
403
404
|
//не используеться
|
|
404
405
|
}), r(s, "options", {
|
|
405
406
|
isReConnectNetworkOnline: !1,
|
|
406
|
-
listUrlsCheckConnectNetwork: ["https://
|
|
407
|
+
listUrlsCheckConnectNetwork: ["https://www.google.com/favicon.ico"]
|
|
407
408
|
}), r(s, "wsApi", new te()), r(s, "delay", new ee()), r(s, "networkTicker", null), r(s, "events", new H(["timeOffReConnect", "reConnect", "network"])), r(s, "saveID", {
|
|
408
409
|
idReConnect: null,
|
|
409
410
|
checkConnect: null
|
|
@@ -433,8 +434,8 @@ r(s, "setNetworkStatus", (e) => {
|
|
|
433
434
|
}), r(s, "init", (e) => {
|
|
434
435
|
const { WsOptions: t, SocketApiOptions: o } = s.splitOptions(e);
|
|
435
436
|
s.networkTicker = new $(o.listUrlsCheckConnectNetwork ?? []), s.networkTicker.startEvents((i) => {
|
|
436
|
-
s.setNetworkStatus(i)
|
|
437
|
-
}),
|
|
437
|
+
s.setNetworkStatus(i);
|
|
438
|
+
}), s.setOptions(o), s.wsApi.init(t), s.wsApi.events.subscribe("status", (i) => {
|
|
438
439
|
s.setState({ isOfflineSocket: i !== "ready" });
|
|
439
440
|
});
|
|
440
441
|
}), /*------------------------------------------------------------------------------------------------------*/
|
|
@@ -476,10 +477,10 @@ const se = (n, e = {}) => {
|
|
|
476
477
|
isLoading: !1,
|
|
477
478
|
isError: !1,
|
|
478
479
|
isSuccess: !1
|
|
479
|
-
}), u = k
|
|
480
|
+
}), u = b(k.getStatusReady), v = b(k.getStatusConnectSocket), l = x(null), h = x(e);
|
|
480
481
|
h.current = e;
|
|
481
|
-
const S =
|
|
482
|
-
var w, p, O,
|
|
482
|
+
const S = E(async () => {
|
|
483
|
+
var w, p, O, A;
|
|
483
484
|
if (o) return;
|
|
484
485
|
a((y) => ({
|
|
485
486
|
...y,
|
|
@@ -507,7 +508,7 @@ const se = (n, e = {}) => {
|
|
|
507
508
|
error: q,
|
|
508
509
|
isError: !0,
|
|
509
510
|
isLoading: !1
|
|
510
|
-
})), (
|
|
511
|
+
})), (A = (O = h.current).onError) == null || A.call(O, q);
|
|
511
512
|
}
|
|
512
513
|
}, [o, t, n, i]);
|
|
513
514
|
I(() => (!o && u && S(), () => {
|
|
@@ -521,10 +522,10 @@ const se = (n, e = {}) => {
|
|
|
521
522
|
error: "Потеряно соединение с сервером"
|
|
522
523
|
}));
|
|
523
524
|
}, [u, v]);
|
|
524
|
-
const d =
|
|
525
|
+
const d = E(() => {
|
|
525
526
|
var f;
|
|
526
527
|
return (f = l.current) == null || f.abort(), S();
|
|
527
|
-
}, [S]), m =
|
|
528
|
+
}, [S]), m = E(() => {
|
|
528
529
|
var f;
|
|
529
530
|
(f = l.current) == null || f.abort(), a((w) => ({ ...w, isLoading: !1 }));
|
|
530
531
|
}, []);
|
|
@@ -534,7 +535,7 @@ const se = (n, e = {}) => {
|
|
|
534
535
|
abort: m
|
|
535
536
|
};
|
|
536
537
|
}, ge = (n, e) => se(n, e), ne = (n) => {
|
|
537
|
-
const { isNetwork: e, typeNetwork: t } = n, { isModal: o } = k
|
|
538
|
+
const { isNetwork: e, typeNetwork: t } = n, { isModal: o } = b(k.getInfoNoConnectServer), i = b(k.getStatusIsReConnectSocket), c = b(k.getIsDisableConnectSocket), a = b(k.getStatusConnectSocket), [u, v] = B({
|
|
538
539
|
isNetwork: !1,
|
|
539
540
|
typeNetwork: ""
|
|
540
541
|
});
|
|
@@ -575,7 +576,7 @@ const se = (n, e = {}) => {
|
|
|
575
576
|
padding: "1px 10px"
|
|
576
577
|
}
|
|
577
578
|
})), re = ({ children: n, className: e, isNetwork: t, ...o }) => {
|
|
578
|
-
const i = k
|
|
579
|
+
const i = b(k.getIsOfflineSocket), c = b(k.getIsDisableConnectSocket), a = i || !t, u = "Оффлайн";
|
|
579
580
|
return /* @__PURE__ */ D(
|
|
580
581
|
ie,
|
|
581
582
|
{
|
|
@@ -586,16 +587,16 @@ const se = (n, e = {}) => {
|
|
|
586
587
|
}
|
|
587
588
|
);
|
|
588
589
|
}, ce = N.memo(re), ae = ({ children: n }) => {
|
|
589
|
-
const e =
|
|
590
|
+
const e = E(() => {
|
|
590
591
|
R.setInfoNoConnectServer({ isModal: !1, isSelectOffline: !1 });
|
|
591
592
|
}, []);
|
|
592
593
|
return n({ reConnect: e });
|
|
593
594
|
}, le = N.memo(ae), ue = ({ children: n }) => {
|
|
594
|
-
const e =
|
|
595
|
+
const e = E(() => {
|
|
595
596
|
R.setInfoNoConnectServer({ isModal: !1, isSelectOffline: !0 }), R.setIsDisableConnectSocket({ isDisableConnectSocket: !0 });
|
|
596
597
|
}, []);
|
|
597
598
|
return n({ offlineActive: e });
|
|
598
|
-
}, Se = N.memo(ue),
|
|
599
|
+
}, Se = N.memo(ue), ke = {
|
|
599
600
|
ConnectDetection: _,
|
|
600
601
|
OfflineDetection: ce,
|
|
601
602
|
Buttons: {
|
|
@@ -605,12 +606,12 @@ const se = (n, e = {}) => {
|
|
|
605
606
|
Initialization: oe
|
|
606
607
|
};
|
|
607
608
|
export {
|
|
608
|
-
|
|
609
|
+
ke as Socket,
|
|
609
610
|
C as SocketApi,
|
|
610
611
|
ge as createRequestSocketApi,
|
|
611
612
|
R as socketActions,
|
|
612
|
-
|
|
613
|
+
k as socketSelectors,
|
|
613
614
|
g as socketStore,
|
|
614
615
|
se as useRequestSocketApi,
|
|
615
|
-
|
|
616
|
+
b as useSocketSelector
|
|
616
617
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rc-lib-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.16-beta.
|
|
4
|
+
"version": "1.2.16-beta.3",
|
|
5
5
|
"author": "SinGlEBW",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"build:dev": "node buildEditVersion.js"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"dev-classes": "^1.5.
|
|
62
|
+
"dev-classes": "^1.5.3",
|
|
63
63
|
"notistack": "^3.0.2",
|
|
64
64
|
"react-transition-group": "^4.4.5",
|
|
65
65
|
"uuid4": "^2.0.3",
|