@copart/ops-tool-kit 1.12.13-alpha.2 → 1.12.13
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/ops-tool-kit.js +28 -24
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
- package/changelog.md +0 -54
package/dist/ops-tool-kit.js
CHANGED
|
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
47
47
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
48
48
|
|
|
49
49
|
const name$1 = "@copart/ops-tool-kit";
|
|
50
|
-
const version$3 = "1.12.13
|
|
50
|
+
const version$3 = "1.12.13";
|
|
51
51
|
const main$1 = "dist/ops-tool-kit.js";
|
|
52
52
|
const style = "dist/ops-tool-kit.css";
|
|
53
53
|
const files = [
|
|
@@ -30245,6 +30245,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
30245
30245
|
var socketRetryCountRef = React.useRef(0);
|
|
30246
30246
|
var socketClientRef = React.useRef(null);
|
|
30247
30247
|
var reconnectingRef = React.useRef(false);
|
|
30248
|
+
var heartbeatStopRef = React.useRef(null);
|
|
30248
30249
|
var _useState15 = React.useState(null),
|
|
30249
30250
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
30250
30251
|
pingInterval = _useState16[0],
|
|
@@ -30413,6 +30414,9 @@ var AppBar = function AppBar(_ref) {
|
|
|
30413
30414
|
handleUserStatusUpdate(availableStatus);
|
|
30414
30415
|
};
|
|
30415
30416
|
var handleSystemOfflineStayOffline = function handleSystemOfflineStayOffline() {
|
|
30417
|
+
var _heartbeatStopRef$cur;
|
|
30418
|
+
(_heartbeatStopRef$cur = heartbeatStopRef.current) === null || _heartbeatStopRef$cur === void 0 ? void 0 : _heartbeatStopRef$cur.call(heartbeatStopRef);
|
|
30419
|
+
heartbeatStopRef.current = null;
|
|
30416
30420
|
var offlineStatus = getOfflineStatusFromAvailable(availableStatuses);
|
|
30417
30421
|
handleUserStatusUpdate(offlineStatus);
|
|
30418
30422
|
};
|
|
@@ -30502,25 +30506,23 @@ var AppBar = function AppBar(_ref) {
|
|
|
30502
30506
|
if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login') && tileConfigAccess) {
|
|
30503
30507
|
if (notificationsSource.includes('Nchan')) {
|
|
30504
30508
|
fetchG2Notifications(updateNotifications, updateAllNotificationsList);
|
|
30505
|
-
|
|
30506
|
-
|
|
30507
|
-
|
|
30508
|
-
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
reconnectingRef.current = false;
|
|
30512
|
-
}
|
|
30513
|
-
});
|
|
30514
|
-
if (client) {
|
|
30515
|
-
socketClientRef.current = client;
|
|
30516
|
-
var pingIntervalInSec = coreAppConfig.nchanPingIntervalInSec || 30;
|
|
30517
|
-
setPingInterval(setInterval(function () {
|
|
30518
|
-
if (client.readyState === WebSocket.OPEN) {
|
|
30519
|
-
client.send('_ping_');
|
|
30520
|
-
}
|
|
30521
|
-
}, pingIntervalInSec * 1000));
|
|
30522
|
-
setSocketClient(client);
|
|
30509
|
+
var client = startWebSocketConnection(updateNotifications, updateAllNotificationsList, _reConnectSocket, updateUserStatusFromWebSocket, {
|
|
30510
|
+
onOpen: function onOpen() {
|
|
30511
|
+
reconnectingRef.current = false;
|
|
30512
|
+
},
|
|
30513
|
+
onClose: function onClose() {
|
|
30514
|
+
reconnectingRef.current = false;
|
|
30523
30515
|
}
|
|
30516
|
+
});
|
|
30517
|
+
if (client) {
|
|
30518
|
+
socketClientRef.current = client;
|
|
30519
|
+
var pingIntervalInSec = coreAppConfig.nchanPingIntervalInSec || 30;
|
|
30520
|
+
setPingInterval(setInterval(function () {
|
|
30521
|
+
if (client.readyState === WebSocket.OPEN) {
|
|
30522
|
+
client.send('_ping_');
|
|
30523
|
+
}
|
|
30524
|
+
}, pingIntervalInSec * 1000));
|
|
30525
|
+
setSocketClient(client);
|
|
30524
30526
|
}
|
|
30525
30527
|
}
|
|
30526
30528
|
var loadUserStatus = /*#__PURE__*/function () {
|
|
@@ -30598,11 +30600,11 @@ var AppBar = function AppBar(_ref) {
|
|
|
30598
30600
|
_context5.p = 10;
|
|
30599
30601
|
_t7 = _context5.v;
|
|
30600
30602
|
console.error('Failed to load user status:', _t7);
|
|
30601
|
-
if (
|
|
30602
|
-
|
|
30603
|
-
} else {
|
|
30604
|
-
|
|
30605
|
-
}
|
|
30603
|
+
// if (error.message && error.message.includes('available statuses')) {
|
|
30604
|
+
// showError('Failed to fetch available statuses.')
|
|
30605
|
+
// } else {
|
|
30606
|
+
// showError('Failed to fetch user status.')
|
|
30607
|
+
// }
|
|
30606
30608
|
case 11:
|
|
30607
30609
|
return _context5.a(2);
|
|
30608
30610
|
}
|
|
@@ -30684,7 +30686,9 @@ var AppBar = function AppBar(_ref) {
|
|
|
30684
30686
|
userInteractionIntervalMs: userInteractionIntervalMs,
|
|
30685
30687
|
userKey: userKey
|
|
30686
30688
|
});
|
|
30689
|
+
heartbeatStopRef.current = stopCoordinator;
|
|
30687
30690
|
return function () {
|
|
30691
|
+
heartbeatStopRef.current = null;
|
|
30688
30692
|
interactionEvents.forEach(function (event) {
|
|
30689
30693
|
document.removeEventListener(event, updateLastInteractionTime);
|
|
30690
30694
|
});
|