rc-lib-ui 1.3.6 → 1.3.8

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.
@@ -1,3 +1,4 @@
1
+ import { NetworkStatusInfoTracker } from 'dev-classes';
1
2
  import { WsApiE_StatusConnect_OR } from './deps/WsApi';
2
3
  import { WsApi_Response } from './deps/WsApi/WsApi.types';
3
4
  export interface SocketApi_Options_P {
@@ -5,7 +6,9 @@ export interface SocketApi_Options_P {
5
6
  listUrlsCheckConnectNetwork?: string[];
6
7
  }
7
8
  type SocketApi_StateProps_OR = 'isDisconnect' | 'isActiveReConnect' | 'isOfflineSocket' | 'isGotWasFirstConnection' | 'isStartCheckNetwork';
8
- export type SocketApi_StateProps_P = Record<SocketApi_StateProps_OR, boolean>;
9
+ export type SocketApi_StateProps_P = Record<SocketApi_StateProps_OR, boolean> & {
10
+ infoNetwork: NetworkStatusInfoTracker;
11
+ };
9
12
  export type SocketApi_StatusConnect_OR = WsApiE_StatusConnect_OR;
10
13
  export type BasePayloadSocket = {
11
14
  action: string;
@@ -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-DjJlkTF6.js";
11
+ import { C as Jn } from "./index-DWH7tN5F.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 v, useRef as A, useEffect as l, useCallback as r } from "react";
2
- import { T as p } from "./index-DjJlkTF6.js";
2
+ import { T as p } from "./index-DWH7tN5F.js";
3
3
  import { s as h } from "./index-B7GqTJat.js";
4
4
  const b = ({ defaultIsActive: s = !0, timer: c = 5e3, onDeActive: n }) => {
5
5
  const [t, u] = v({
@@ -2231,7 +2231,7 @@ c(x, "events", (t, e, r, n = "") => new Promise((o, s) => {
2231
2231
  return !1;
2232
2232
  }
2233
2233
  return !0;
2234
- }), c(x, "filterItems", (t, e) => t.filter((r) => r.name.toLowerCase().includes(e.toLowerCase()))), c(x, "sortByOnline", (t) => {
2234
+ }), c(x, "filterItems", (t, e, r) => t.filter((n) => n[(r == null ? void 0 : r.filteKey) || "name"].toLowerCase().includes(e.toLowerCase()))), c(x, "sortByOnline", (t) => {
2235
2235
  const e = [], r = [];
2236
2236
  for (let s = 0; t.length > s; s++) {
2237
2237
  const i = t[s];
@@ -2565,7 +2565,7 @@ class NetworkStatusTracker {
2565
2565
  isNetwork: e,
2566
2566
  typeNetwork: this.getTypeNetwork(e)
2567
2567
  };
2568
- this.networkInfo = n, typeof r == "function" && r(n);
2568
+ typeof r == "function" && this.networkInfo.typeNetwork !== n.typeNetwork && r(n), this.networkInfo = n;
2569
2569
  }
2570
2570
  getControllersEvents() {
2571
2571
  return this.controllersEvents;
package/dist/socket.js CHANGED
@@ -7,7 +7,7 @@ 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-DjJlkTF6.js";
10
+ import { N as $ } from "./index-DWH7tN5F.js";
11
11
  const T = {
12
12
  statusConnect: "disconnect",
13
13
  isOfflineSocket: !1,
@@ -400,8 +400,12 @@ r(s, "state", {
400
400
  isActiveReConnect: !1,
401
401
  isOfflineSocket: !0,
402
402
  isGotWasFirstConnection: !1,
403
- isStartCheckNetwork: !1
403
+ isStartCheckNetwork: !1,
404
404
  //не используеться
405
+ infoNetwork: {
406
+ isNetwork: !1,
407
+ typeNetwork: ""
408
+ }
405
409
  }), r(s, "options", {
406
410
  isReConnectNetworkOnline: !1,
407
411
  listUrlsCheckConnectNetwork: []
@@ -434,7 +438,7 @@ r(s, "setNetworkStatus", (e) => {
434
438
  }), r(s, "init", (e) => {
435
439
  const { WsOptions: t, SocketApiOptions: n } = s.splitOptions(e);
436
440
  s.networkTicker = new $(n.listUrlsCheckConnectNetwork ?? []), s.networkTicker.startEvents((i) => {
437
- s.setNetworkStatus(i);
441
+ s.getState(), s.setNetworkStatus(i), s.setState({ infoNetwork: i });
438
442
  }), s.setOptions(n), s.wsApi.init(t), s.wsApi.events.subscribe("status", (i) => {
439
443
  s.setState({ isOfflineSocket: i !== "ready" });
440
444
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.3.6",
4
+ "version": "1.3.8",
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.5",
62
+ "dev-classes": "^1.5.7",
63
63
  "notistack": "^3.0.2",
64
64
  "react-transition-group": "^4.4.5",
65
65
  "uuid4": "^2.0.3",