@copart/ops-tool-kit 1.5.32 → 1.5.33-alpha.1

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.
@@ -33,7 +33,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
33
33
  var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
34
34
 
35
35
  const name$e = "@copart/ops-tool-kit";
36
- const version$3 = "1.5.32";
36
+ const version$3 = "1.5.33-alpha.1";
37
37
  const main = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -7145,7 +7145,8 @@ function () {
7145
7145
  return fetcher.get("".concat(endpoint, "?").concat(query), {
7146
7146
  headers: {
7147
7147
  collection: 'yards',
7148
- serviceName: 'opsportal'
7148
+ serviceName: 'opsportal',
7149
+ Authorization: "bearer ".concat(storage$1.accessToken)
7149
7150
  }
7150
7151
  });
7151
7152
 
@@ -39205,6 +39206,26 @@ function filterOutNotificationForOtherApps(notifications) {
39205
39206
  })(notifications);
39206
39207
  }
39207
39208
 
39209
+ function filterOutDuplicateNotificationsForMiphone(notifications) {
39210
+ var miphoneNotificationPresent = false;
39211
+ var filtered = [];
39212
+
39213
+ for (var i = notifications.length - 1; i >= 0; i--) {
39214
+ var current = notifications[i];
39215
+
39216
+ if (current.news_source === 'Miphone') {
39217
+ if (!miphoneNotificationPresent) {
39218
+ filtered.push(current);
39219
+ miphoneNotificationPresent = true;
39220
+ }
39221
+ } else {
39222
+ filtered.push(current);
39223
+ }
39224
+ }
39225
+
39226
+ return filtered.reverse();
39227
+ }
39228
+
39208
39229
  var caseInsensitiveIncludes = function caseInsensitiveIncludes(val) {
39209
39230
  return function (arr) {
39210
39231
  try {
@@ -39246,7 +39267,7 @@ function filterOutNotificationByAudience(notifications) {
39246
39267
  }
39247
39268
  function filterNotifications(notifications) {
39248
39269
  try {
39249
- return compose(filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
39270
+ return compose(filterOutDuplicateNotificationsForMiphone, filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
39250
39271
  } catch (err) {
39251
39272
  console.error(err);
39252
39273
  return notifications;
@@ -43478,8 +43499,17 @@ function useFirebase(firebaseConfig) {
43478
43499
  React.useEffect(function () {
43479
43500
  connect(firebaseConfig);
43480
43501
  attachHandlers(setNotifications);
43502
+
43503
+ var onStorageChanged = function onStorageChanged() {
43504
+ refetchNotifications();
43505
+ };
43506
+
43507
+ window.addEventListener('localStorageChanged', onStorageChanged);
43508
+ window.addEventListener('sessionStorageChanged', onStorageChanged);
43481
43509
  return function () {
43482
43510
  firebase.off();
43511
+ window.removeEventListener('localStorageChanged', onStorageChanged);
43512
+ window.removeEventListener('sessionStorageChanged', onStorageChanged);
43483
43513
  };
43484
43514
  }, []);
43485
43515
  React.useEffect(function () {
@@ -43745,6 +43775,16 @@ var AppFrame = function AppFrame(props) {
43745
43775
  setAppBarMounted: setAppBarMounted
43746
43776
  });
43747
43777
 
43778
+ var onSettingsSaved = function onSettingsSaved() {
43779
+ var handler = props.onSettingsSaved || function () {
43780
+ return location.reload();
43781
+ };
43782
+
43783
+ var event = new Event('localStorageChanged');
43784
+ window.dispatchEvent(event);
43785
+ handler();
43786
+ };
43787
+
43748
43788
  return React__default["default"].createElement("div", {
43749
43789
  className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
43750
43790
  style: props.handleScrolling ? SCROLL : NO_SCROLL
@@ -43756,9 +43796,7 @@ var AppFrame = function AppFrame(props) {
43756
43796
  searchBarProps: props.searchBarProps,
43757
43797
  history: props.history,
43758
43798
  setAppBarMounted: setAppBarMounted,
43759
- onSettingsSaved: props.onSettingsSaved || function () {
43760
- return location.reload();
43761
- },
43799
+ onSettingsSaved: onSettingsSaved,
43762
43800
  showTitle: props.showTitle || true,
43763
43801
  title: props.appTitle
43764
43802
  })), React__default["default"].createElement(Breadcrumbs, {