akeyless-client-commons 1.0.229 → 1.1.2
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/components/index.css.map +1 -1
- package/dist/components/index.js +6 -278
- package/dist/components/index.mjs +6 -278
- package/dist/helpers/index.d.mts +2 -34
- package/dist/helpers/index.d.ts +2 -34
- package/dist/helpers/index.js +0 -295
- package/dist/helpers/index.mjs +1 -292
- package/dist/hooks/index.d.mts +1 -5
- package/dist/hooks/index.d.ts +1 -5
- package/dist/hooks/index.js +1 -374
- package/dist/hooks/index.mjs +1 -370
- package/package.json +2 -4
package/dist/hooks/index.d.mts
CHANGED
|
@@ -35,8 +35,4 @@ declare function useSafeEffect(callback: () => void, dependencies: any[], error_
|
|
|
35
35
|
declare const useDeepCompareMemo: <T>(factory: () => T, dependencies: any[]) => T;
|
|
36
36
|
declare function useDeepCompareEffect(effect: EffectCallback, dependencies: any[]): void;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
socketConnected: boolean;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export { useDeepCompareEffect, useDeepCompareMemo, useDocumentTitle, useSafeEffect, useSetUserCountry, useSnapshotBulk, useSocketSubscription };
|
|
38
|
+
export { useDeepCompareEffect, useDeepCompareMemo, useDocumentTitle, useSafeEffect, useSetUserCountry, useSnapshotBulk };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -35,8 +35,4 @@ declare function useSafeEffect(callback: () => void, dependencies: any[], error_
|
|
|
35
35
|
declare const useDeepCompareMemo: <T>(factory: () => T, dependencies: any[]) => T;
|
|
36
36
|
declare function useDeepCompareEffect(effect: EffectCallback, dependencies: any[]): void;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
socketConnected: boolean;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export { useDeepCompareEffect, useDeepCompareMemo, useDocumentTitle, useSafeEffect, useSetUserCountry, useSnapshotBulk, useSocketSubscription };
|
|
38
|
+
export { useDeepCompareEffect, useDeepCompareMemo, useDocumentTitle, useSafeEffect, useSetUserCountry, useSnapshotBulk };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function _array_like_to_array(arr, len) {
|
|
3
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
-
return arr2;
|
|
6
|
-
}
|
|
7
|
-
function _array_with_holes(arr) {
|
|
8
|
-
if (Array.isArray(arr)) return arr;
|
|
9
|
-
}
|
|
10
2
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
11
3
|
try {
|
|
12
4
|
var info = gen[key](arg);
|
|
@@ -36,25 +28,6 @@ function _async_to_generator(fn) {
|
|
|
36
28
|
});
|
|
37
29
|
};
|
|
38
30
|
}
|
|
39
|
-
function _class_call_check(instance, Constructor) {
|
|
40
|
-
if (!(instance instanceof Constructor)) {
|
|
41
|
-
throw new TypeError("Cannot call a class as a function");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function _defineProperties(target, props) {
|
|
45
|
-
for(var i = 0; i < props.length; i++){
|
|
46
|
-
var descriptor = props[i];
|
|
47
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
48
|
-
descriptor.configurable = true;
|
|
49
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
50
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
54
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
55
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
56
|
-
return Constructor;
|
|
57
|
-
}
|
|
58
31
|
function _define_property(obj, key, value) {
|
|
59
32
|
if (key in obj) {
|
|
60
33
|
Object.defineProperty(obj, key, {
|
|
@@ -68,33 +41,6 @@ function _define_property(obj, key, value) {
|
|
|
68
41
|
}
|
|
69
42
|
return obj;
|
|
70
43
|
}
|
|
71
|
-
function _iterable_to_array_limit(arr, i) {
|
|
72
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
73
|
-
if (_i == null) return;
|
|
74
|
-
var _arr = [];
|
|
75
|
-
var _n = true;
|
|
76
|
-
var _d = false;
|
|
77
|
-
var _s, _e;
|
|
78
|
-
try {
|
|
79
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
80
|
-
_arr.push(_s.value);
|
|
81
|
-
if (i && _arr.length === i) break;
|
|
82
|
-
}
|
|
83
|
-
} catch (err) {
|
|
84
|
-
_d = true;
|
|
85
|
-
_e = err;
|
|
86
|
-
} finally{
|
|
87
|
-
try {
|
|
88
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
89
|
-
} finally{
|
|
90
|
-
if (_d) throw _e;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return _arr;
|
|
94
|
-
}
|
|
95
|
-
function _non_iterable_rest() {
|
|
96
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
97
|
-
}
|
|
98
44
|
function _object_spread(target) {
|
|
99
45
|
for(var i = 1; i < arguments.length; i++){
|
|
100
46
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -134,21 +80,10 @@ function _object_spread_props(target, source) {
|
|
|
134
80
|
}
|
|
135
81
|
return target;
|
|
136
82
|
}
|
|
137
|
-
function _sliced_to_array(arr, i) {
|
|
138
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
139
|
-
}
|
|
140
83
|
function _type_of(obj) {
|
|
141
84
|
"@swc/helpers - typeof";
|
|
142
85
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
143
86
|
}
|
|
144
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
145
|
-
if (!o) return;
|
|
146
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
147
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
148
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
149
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
150
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
151
|
-
}
|
|
152
87
|
function _ts_generator(thisArg, body) {
|
|
153
88
|
var f, y, t, g, _ = {
|
|
154
89
|
label: 0,
|
|
@@ -322,9 +257,6 @@ __export(index_exports, {
|
|
|
322
257
|
},
|
|
323
258
|
useSnapshotBulk: function() {
|
|
324
259
|
return useSnapshotBulk;
|
|
325
|
-
},
|
|
326
|
-
useSocketSubscription: function() {
|
|
327
|
-
return useSocketSubscription;
|
|
328
260
|
}
|
|
329
261
|
});
|
|
330
262
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -581,278 +513,6 @@ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
|
581
513
|
var notificationsDomain = isLocal ? "http://localhost:9006/api/notifications" : baseDomain + "/notifications";
|
|
582
514
|
var callCenterGeoDomain = isLocal ? "http://localhost:9007/api/call-center/geo" : baseDomain + "/call-center/geo";
|
|
583
515
|
var callCenterEventsDomain = isLocal ? "http://localhost:9008/api/call-center/events" : baseDomain + "/call-center/events";
|
|
584
|
-
// src/helpers/socket.ts
|
|
585
|
-
var import_socket = require("socket.io-client");
|
|
586
|
-
var SocketService = /*#__PURE__*/ function() {
|
|
587
|
-
"use strict";
|
|
588
|
-
function _SocketService() {
|
|
589
|
-
_class_call_check(this, _SocketService);
|
|
590
|
-
this.socket = null;
|
|
591
|
-
this.connectCallbacks = [];
|
|
592
|
-
this.disconnectCallbacks = [];
|
|
593
|
-
this.initSocket();
|
|
594
|
-
}
|
|
595
|
-
_create_class(_SocketService, [
|
|
596
|
-
{
|
|
597
|
-
/// Initialize the socket connection
|
|
598
|
-
key: "initSocket",
|
|
599
|
-
value: function initSocket() {
|
|
600
|
-
var _this = this;
|
|
601
|
-
if (!this.socket) {
|
|
602
|
-
var SOCKET_SERVER_URL = "http://localhost:9009";
|
|
603
|
-
var SOCKET_PATH = "/api/data-socket/connect";
|
|
604
|
-
this.socket = (0, import_socket.io)(SOCKET_SERVER_URL, {
|
|
605
|
-
path: SOCKET_PATH,
|
|
606
|
-
transports: [
|
|
607
|
-
"websocket"
|
|
608
|
-
]
|
|
609
|
-
});
|
|
610
|
-
this.socket.on("connect", function() {
|
|
611
|
-
var _this_socket;
|
|
612
|
-
console.log("Socket connected:", (_this_socket = _this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.id);
|
|
613
|
-
_this.connectCallbacks.forEach(function(cb) {
|
|
614
|
-
return cb();
|
|
615
|
-
});
|
|
616
|
-
});
|
|
617
|
-
this.socket.on("disconnect", function(reason) {
|
|
618
|
-
console.log("Socket disconnected:", reason);
|
|
619
|
-
_this.disconnectCallbacks.forEach(function(cb) {
|
|
620
|
-
return cb();
|
|
621
|
-
});
|
|
622
|
-
});
|
|
623
|
-
this.socket.on("connect_error", function(error) {
|
|
624
|
-
console.error("Socket connection error:", error);
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
/// get socket instance
|
|
631
|
-
key: "getSocketInstance",
|
|
632
|
-
value: function getSocketInstance() {
|
|
633
|
-
if (!this.socket) {
|
|
634
|
-
this.initSocket();
|
|
635
|
-
}
|
|
636
|
-
if (!this.socket) {
|
|
637
|
-
throw new Error("Socket not initialized");
|
|
638
|
-
}
|
|
639
|
-
if (!this.socket.connected) {
|
|
640
|
-
this.socket.connect();
|
|
641
|
-
}
|
|
642
|
-
return this.socket;
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
{
|
|
646
|
-
/// subscribe to collections
|
|
647
|
-
key: "subscribeToCollections",
|
|
648
|
-
value: function subscribeToCollections(config) {
|
|
649
|
-
var s = this.getSocketInstance();
|
|
650
|
-
var collectionsNames = config.map(function(c) {
|
|
651
|
-
return c.collectionName;
|
|
652
|
-
});
|
|
653
|
-
var eventHandlers = [];
|
|
654
|
-
config.forEach(function(configuration) {
|
|
655
|
-
var collectionName = configuration.collectionName, onAdd = configuration.onAdd, onFirstTime = configuration.onFirstTime, onModify = configuration.onModify, onRemove = configuration.onRemove, extraParsers = configuration.extraParsers, conditions = configuration.conditions, orderBy2 = configuration.orderBy;
|
|
656
|
-
s.on("initial:".concat(collectionName), onFirstTime);
|
|
657
|
-
eventHandlers.push({
|
|
658
|
-
eventName: "initial:".concat(collectionName),
|
|
659
|
-
handler: onFirstTime
|
|
660
|
-
});
|
|
661
|
-
s.on("add:".concat(collectionName), onAdd);
|
|
662
|
-
eventHandlers.push({
|
|
663
|
-
eventName: "add:".concat(collectionName),
|
|
664
|
-
handler: onAdd
|
|
665
|
-
});
|
|
666
|
-
s.on("update:".concat(collectionName), onModify);
|
|
667
|
-
eventHandlers.push({
|
|
668
|
-
eventName: "update:".concat(collectionName),
|
|
669
|
-
handler: onModify
|
|
670
|
-
});
|
|
671
|
-
s.on("delete:".concat(collectionName), onRemove);
|
|
672
|
-
eventHandlers.push({
|
|
673
|
-
eventName: "delete:".concat(collectionName),
|
|
674
|
-
handler: onRemove
|
|
675
|
-
});
|
|
676
|
-
extraParsers === null || extraParsers === void 0 ? void 0 : extraParsers.forEach(function(parsers) {
|
|
677
|
-
var extraOnAdd = parsers.onAdd, extraOnFirstTime = parsers.onFirstTime, extraOnModify = parsers.onModify, extraOnRemove = parsers.onRemove;
|
|
678
|
-
s.on("initial:".concat(collectionName), extraOnFirstTime);
|
|
679
|
-
eventHandlers.push({
|
|
680
|
-
eventName: "initial:".concat(collectionName),
|
|
681
|
-
handler: extraOnFirstTime
|
|
682
|
-
});
|
|
683
|
-
s.on("add:".concat(collectionName), extraOnAdd);
|
|
684
|
-
eventHandlers.push({
|
|
685
|
-
eventName: "add:".concat(collectionName),
|
|
686
|
-
handler: extraOnAdd
|
|
687
|
-
});
|
|
688
|
-
s.on("update:".concat(collectionName), extraOnModify);
|
|
689
|
-
eventHandlers.push({
|
|
690
|
-
eventName: "update:".concat(collectionName),
|
|
691
|
-
handler: extraOnModify
|
|
692
|
-
});
|
|
693
|
-
s.on("delete:".concat(collectionName), extraOnRemove);
|
|
694
|
-
eventHandlers.push({
|
|
695
|
-
eventName: "delete:".concat(collectionName),
|
|
696
|
-
handler: extraOnRemove
|
|
697
|
-
});
|
|
698
|
-
});
|
|
699
|
-
});
|
|
700
|
-
s.emit("subscribe_collections", collectionsNames, function(callback) {
|
|
701
|
-
if (callback.success) {
|
|
702
|
-
console.log("Successfully subscribed to: ".concat(collectionsNames.join(", ")));
|
|
703
|
-
} else {
|
|
704
|
-
console.error("Failed to subscribe to ".concat(config.join(", "), ": ").concat(callback.message));
|
|
705
|
-
}
|
|
706
|
-
});
|
|
707
|
-
return function() {
|
|
708
|
-
console.log("Cleaning up subscriptions for: ".concat(collectionsNames.join(", ")));
|
|
709
|
-
s.emit("unsubscribe_collections", collectionsNames);
|
|
710
|
-
eventHandlers.forEach(function(eh) {
|
|
711
|
-
s.off(eh.eventName, eh.handler);
|
|
712
|
-
});
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
/// set data
|
|
718
|
-
key: "setData",
|
|
719
|
-
value: function setData(payload) {
|
|
720
|
-
var s = this.getSocketInstance();
|
|
721
|
-
return new Promise(function(resolve, reject) {
|
|
722
|
-
s.emit("set_data", payload, function(callback) {
|
|
723
|
-
if (callback.success) {
|
|
724
|
-
console.log("Data saved successfully:", payload);
|
|
725
|
-
console.log("ack", callback);
|
|
726
|
-
resolve(callback);
|
|
727
|
-
} else {
|
|
728
|
-
reject(new Error(callback.message || "Save operation failed"));
|
|
729
|
-
}
|
|
730
|
-
});
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
/// get data
|
|
736
|
-
key: "getCollectionData",
|
|
737
|
-
value: function getCollectionData(payload) {
|
|
738
|
-
var s = this.getSocketInstance();
|
|
739
|
-
s.emit("get_data", {
|
|
740
|
-
collection_name: payload.collection_name
|
|
741
|
-
}, function(socketCallback) {
|
|
742
|
-
if (socketCallback.success && socketCallback.data) {
|
|
743
|
-
payload.callback(socketCallback.data);
|
|
744
|
-
} else {
|
|
745
|
-
payload.callback(payload.defaultValue);
|
|
746
|
-
}
|
|
747
|
-
});
|
|
748
|
-
}
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
key: "getDocumentData",
|
|
752
|
-
value: function getDocumentData(payload) {
|
|
753
|
-
var s = this.getSocketInstance();
|
|
754
|
-
s.emit("get_data", {
|
|
755
|
-
collection_name: payload.collection_name,
|
|
756
|
-
key: payload.key
|
|
757
|
-
}, function(socketCallback) {
|
|
758
|
-
if (socketCallback.success && socketCallback.data) {
|
|
759
|
-
payload.callback(socketCallback.data);
|
|
760
|
-
} else {
|
|
761
|
-
payload.callback(payload.defaultValue);
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
/// delete data
|
|
768
|
-
key: "deleteData",
|
|
769
|
-
value: function deleteData(payload) {
|
|
770
|
-
var s = this.getSocketInstance();
|
|
771
|
-
return new Promise(function(resolve, reject) {
|
|
772
|
-
s.emit("delete_data", payload, function(callback) {
|
|
773
|
-
if (callback.success) {
|
|
774
|
-
console.log("Data deleted successfully:", payload);
|
|
775
|
-
console.log("delete ack", callback);
|
|
776
|
-
resolve(callback);
|
|
777
|
-
} else {
|
|
778
|
-
reject(new Error(callback.message || "Delete operation failed"));
|
|
779
|
-
}
|
|
780
|
-
});
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
key: "clearAllRedisData",
|
|
786
|
-
value: function clearAllRedisData() {
|
|
787
|
-
var s = this.getSocketInstance();
|
|
788
|
-
return new Promise(function(resolve, reject) {
|
|
789
|
-
s.emit("clear_all_redis_data", function(ack) {
|
|
790
|
-
if (ack.success) {
|
|
791
|
-
resolve(ack);
|
|
792
|
-
} else {
|
|
793
|
-
reject(new Error(ack.message || "Clear all Redis data operation failed"));
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
/// connection management methods
|
|
801
|
-
key: "onConnect",
|
|
802
|
-
value: function onConnect(callback) {
|
|
803
|
-
var _this_socket;
|
|
804
|
-
this.connectCallbacks.push(callback);
|
|
805
|
-
if ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) {
|
|
806
|
-
callback();
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
key: "offConnect",
|
|
812
|
-
value: function offConnect(callback) {
|
|
813
|
-
this.connectCallbacks = this.connectCallbacks.filter(function(cb) {
|
|
814
|
-
return cb !== callback;
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
key: "onDisconnect",
|
|
820
|
-
value: function onDisconnect(callback) {
|
|
821
|
-
this.disconnectCallbacks.push(callback);
|
|
822
|
-
if (this.socket && !this.socket.connected) {
|
|
823
|
-
callback();
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
key: "offDisconnect",
|
|
829
|
-
value: function offDisconnect(callback) {
|
|
830
|
-
this.disconnectCallbacks = this.disconnectCallbacks.filter(function(cb) {
|
|
831
|
-
return cb !== callback;
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
key: "isConnected",
|
|
837
|
-
value: function isConnected() {
|
|
838
|
-
var _this_socket;
|
|
839
|
-
return ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) || false;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
], [
|
|
843
|
-
{
|
|
844
|
-
key: "getInstance",
|
|
845
|
-
value: function getInstance() {
|
|
846
|
-
if (!_SocketService.instance) {
|
|
847
|
-
_SocketService.instance = new _SocketService();
|
|
848
|
-
}
|
|
849
|
-
return _SocketService.instance;
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
]);
|
|
853
|
-
return _SocketService;
|
|
854
|
-
}();
|
|
855
|
-
var socketServiceInstance = SocketService.getInstance();
|
|
856
516
|
// src/hooks/react.ts
|
|
857
517
|
var import_lodash2 = require("lodash");
|
|
858
518
|
var import_react2 = require("react");
|
|
@@ -977,38 +637,6 @@ var useSetUserCountry = function(setUserCountry, changLang) {
|
|
|
977
637
|
};
|
|
978
638
|
// src/hooks/WebWorker.ts
|
|
979
639
|
var import_react5 = require("react");
|
|
980
|
-
// src/hooks/socket.ts
|
|
981
|
-
var import_react6 = require("react");
|
|
982
|
-
var useSocketSubscription = function(config) {
|
|
983
|
-
var _ref = _sliced_to_array((0, import_react6.useState)(socketServiceInstance.isConnected()), 2), socketConnected = _ref[0], setSocketConnected = _ref[1];
|
|
984
|
-
(0, import_react6.useEffect)(function() {
|
|
985
|
-
var cleanupSubscriptions;
|
|
986
|
-
if (socketConnected) {
|
|
987
|
-
cleanupSubscriptions = socketServiceInstance.subscribeToCollections(config);
|
|
988
|
-
}
|
|
989
|
-
var uiOnConnect = function() {
|
|
990
|
-
setSocketConnected(true);
|
|
991
|
-
};
|
|
992
|
-
var uiOnDisconnect = function() {
|
|
993
|
-
cleanupSubscriptions === null || cleanupSubscriptions === void 0 ? void 0 : cleanupSubscriptions();
|
|
994
|
-
setSocketConnected(false);
|
|
995
|
-
};
|
|
996
|
-
socketServiceInstance.onConnect(uiOnConnect);
|
|
997
|
-
socketServiceInstance.onDisconnect(uiOnDisconnect);
|
|
998
|
-
setSocketConnected(socketServiceInstance.isConnected());
|
|
999
|
-
return function() {
|
|
1000
|
-
console.log("cleanupSubscriptions");
|
|
1001
|
-
cleanupSubscriptions === null || cleanupSubscriptions === void 0 ? void 0 : cleanupSubscriptions();
|
|
1002
|
-
socketServiceInstance.offConnect(uiOnConnect);
|
|
1003
|
-
socketServiceInstance.offDisconnect(uiOnDisconnect);
|
|
1004
|
-
};
|
|
1005
|
-
}, [
|
|
1006
|
-
socketConnected
|
|
1007
|
-
]);
|
|
1008
|
-
return {
|
|
1009
|
-
socketConnected: socketConnected
|
|
1010
|
-
};
|
|
1011
|
-
};
|
|
1012
640
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1013
641
|
0 && (module.exports = {
|
|
1014
642
|
useDeepCompareEffect: useDeepCompareEffect,
|
|
@@ -1016,7 +644,6 @@ var useSocketSubscription = function(config) {
|
|
|
1016
644
|
useDocumentTitle: useDocumentTitle,
|
|
1017
645
|
useSafeEffect: useSafeEffect,
|
|
1018
646
|
useSetUserCountry: useSetUserCountry,
|
|
1019
|
-
useSnapshotBulk: useSnapshotBulk
|
|
1020
|
-
useSocketSubscription: useSocketSubscription
|
|
647
|
+
useSnapshotBulk: useSnapshotBulk
|
|
1021
648
|
});
|
|
1022
649
|
//# sourceMappingURL=index.js.map
|