@copart/ops-tool-kit 1.5.33 → 1.5.34

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.33";
36
+ const version$3 = "1.5.34";
37
37
  const main = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -2911,6 +2911,10 @@ var createOpsStorage = function createOpsStorage() {
2911
2911
  return getLocalItem('dashboard', 'twilioEnabled') || false;
2912
2912
  },
2913
2913
 
2914
+ get clickToDialEnabledStatus() {
2915
+ return getLocalItem('c2dEnabled') || false;
2916
+ },
2917
+
2914
2918
  get callCapsuleEnabledStatus() {
2915
2919
  return getLocalItem('dashboard', 'isCallCapsuleEnabled') || false;
2916
2920
  },
@@ -2944,6 +2948,7 @@ var createOpsStorage = function createOpsStorage() {
2944
2948
  },
2945
2949
  logout: function logout() {
2946
2950
  clearStorage();
2951
+ localStorage.removeItem('c2dEnabled');
2947
2952
  window.location.assign('/logout');
2948
2953
  }
2949
2954
  };
@@ -39206,6 +39211,26 @@ function filterOutNotificationForOtherApps(notifications) {
39206
39211
  })(notifications);
39207
39212
  }
39208
39213
 
39214
+ function filterOutDuplicateNotificationsForMiphone(notifications) {
39215
+ var miphoneNotification = null;
39216
+ var filtered = filter$1(function (notification) {
39217
+ if (notification.news_source === 'Miphone') {
39218
+ if (!miphoneNotification || Date.parse(miphoneNotification.lastUpdatedAt) < Date.parse(notification.lastUpdatedAt)) {
39219
+ if (miphoneNotification) {
39220
+ addNotificationToViewedList(miphoneNotification);
39221
+ }
39222
+
39223
+ miphoneNotification = notification;
39224
+ } else {
39225
+ addNotificationToViewedList(notification);
39226
+ }
39227
+ } else {
39228
+ return true;
39229
+ }
39230
+ })(notifications);
39231
+ return [].concat(_toConsumableArray(filtered), [miphoneNotification]);
39232
+ }
39233
+
39209
39234
  var caseInsensitiveIncludes = function caseInsensitiveIncludes(val) {
39210
39235
  return function (arr) {
39211
39236
  try {
@@ -39247,7 +39272,7 @@ function filterOutNotificationByAudience(notifications) {
39247
39272
  }
39248
39273
  function filterNotifications(notifications) {
39249
39274
  try {
39250
- return compose(filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
39275
+ return compose(filterOutDuplicateNotificationsForMiphone, filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
39251
39276
  } catch (err) {
39252
39277
  console.error(err);
39253
39278
  return notifications;
@@ -43479,8 +43504,17 @@ function useFirebase(firebaseConfig) {
43479
43504
  React.useEffect(function () {
43480
43505
  connect(firebaseConfig);
43481
43506
  attachHandlers(setNotifications);
43507
+
43508
+ var onStorageChanged = function onStorageChanged() {
43509
+ refetchNotifications();
43510
+ };
43511
+
43512
+ window.addEventListener('localStorageChanged', onStorageChanged);
43513
+ window.addEventListener('sessionStorageChanged', onStorageChanged);
43482
43514
  return function () {
43483
43515
  firebase.off();
43516
+ window.removeEventListener('localStorageChanged', onStorageChanged);
43517
+ window.removeEventListener('sessionStorageChanged', onStorageChanged);
43484
43518
  };
43485
43519
  }, []);
43486
43520
  React.useEffect(function () {
@@ -43746,6 +43780,16 @@ var AppFrame = function AppFrame(props) {
43746
43780
  setAppBarMounted: setAppBarMounted
43747
43781
  });
43748
43782
 
43783
+ var onSettingsSaved = function onSettingsSaved() {
43784
+ var handler = props.onSettingsSaved || function () {
43785
+ return location.reload();
43786
+ };
43787
+
43788
+ var event = new Event('localStorageChanged');
43789
+ window.dispatchEvent(event);
43790
+ handler();
43791
+ };
43792
+
43749
43793
  return React__default["default"].createElement("div", {
43750
43794
  className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
43751
43795
  style: props.handleScrolling ? SCROLL : NO_SCROLL
@@ -43757,9 +43801,7 @@ var AppFrame = function AppFrame(props) {
43757
43801
  searchBarProps: props.searchBarProps,
43758
43802
  history: props.history,
43759
43803
  setAppBarMounted: setAppBarMounted,
43760
- onSettingsSaved: props.onSettingsSaved || function () {
43761
- return location.reload();
43762
- },
43804
+ onSettingsSaved: onSettingsSaved,
43763
43805
  showTitle: props.showTitle || true,
43764
43806
  title: props.appTitle
43765
43807
  })), React__default["default"].createElement(Breadcrumbs, {