@copart/ops-tool-kit 1.12.18-alpha.1 → 1.12.18-alpha.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.
@@ -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.18-alpha.1";
50
+ const version$3 = "1.12.18-alpha.2";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -29246,13 +29246,19 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
29246
29246
  var batch = notificationBuffer;
29247
29247
  notificationBuffer = [];
29248
29248
  flushTimerId = null;
29249
- var activeBatch = batch.filter(function (n) {
29249
+ var seenIds = new Map();
29250
+ batch.forEach(function (n) {
29251
+ var id = (n === null || n === void 0 ? void 0 : n.notification_id) || (n === null || n === void 0 ? void 0 : n.notificationId);
29252
+ if (id) seenIds.set(id, n);
29253
+ });
29254
+ var deduplicatedBatch = seenIds.size > 0 ? Array.from(seenIds.values()) : batch;
29255
+ var activeBatch = deduplicatedBatch.filter(function (n) {
29250
29256
  return (n === null || n === void 0 ? void 0 : n.status) === 'A';
29251
29257
  });
29252
29258
  if (activeBatch.length > 0) {
29253
29259
  compose(updateNotifications, filterNotifications)(activeBatch);
29254
29260
  }
29255
- updateAllNotificationsList(batch);
29261
+ updateAllNotificationsList(deduplicatedBatch);
29256
29262
  }
29257
29263
  function scheduleFlush() {
29258
29264
  if (flushTimerId === null) {
@@ -29287,7 +29293,7 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
29287
29293
  return;
29288
29294
  }
29289
29295
 
29290
- // Handle notification messages: buffer and flush at interval
29296
+ // Buffer notifications deduplication happens at flush via notificationRegistry.
29291
29297
  var notification = Array.isArray(messageData) ? messageData : [messageData];
29292
29298
  if (notification.length > 0) {
29293
29299
  var _notificationBuffer;