@copart/ops-tool-kit 1.5.32 → 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.
- package/dist/ops-tool-kit.js +49 -6
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -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.
|
|
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
|
};
|
|
@@ -7145,7 +7150,8 @@ function () {
|
|
|
7145
7150
|
return fetcher.get("".concat(endpoint, "?").concat(query), {
|
|
7146
7151
|
headers: {
|
|
7147
7152
|
collection: 'yards',
|
|
7148
|
-
serviceName: 'opsportal'
|
|
7153
|
+
serviceName: 'opsportal',
|
|
7154
|
+
Authorization: "bearer ".concat(storage$1.accessToken)
|
|
7149
7155
|
}
|
|
7150
7156
|
});
|
|
7151
7157
|
|
|
@@ -39205,6 +39211,26 @@ function filterOutNotificationForOtherApps(notifications) {
|
|
|
39205
39211
|
})(notifications);
|
|
39206
39212
|
}
|
|
39207
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
|
+
|
|
39208
39234
|
var caseInsensitiveIncludes = function caseInsensitiveIncludes(val) {
|
|
39209
39235
|
return function (arr) {
|
|
39210
39236
|
try {
|
|
@@ -39246,7 +39272,7 @@ function filterOutNotificationByAudience(notifications) {
|
|
|
39246
39272
|
}
|
|
39247
39273
|
function filterNotifications(notifications) {
|
|
39248
39274
|
try {
|
|
39249
|
-
return compose(filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
|
|
39275
|
+
return compose(filterOutDuplicateNotificationsForMiphone, filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
|
|
39250
39276
|
} catch (err) {
|
|
39251
39277
|
console.error(err);
|
|
39252
39278
|
return notifications;
|
|
@@ -43478,8 +43504,17 @@ function useFirebase(firebaseConfig) {
|
|
|
43478
43504
|
React.useEffect(function () {
|
|
43479
43505
|
connect(firebaseConfig);
|
|
43480
43506
|
attachHandlers(setNotifications);
|
|
43507
|
+
|
|
43508
|
+
var onStorageChanged = function onStorageChanged() {
|
|
43509
|
+
refetchNotifications();
|
|
43510
|
+
};
|
|
43511
|
+
|
|
43512
|
+
window.addEventListener('localStorageChanged', onStorageChanged);
|
|
43513
|
+
window.addEventListener('sessionStorageChanged', onStorageChanged);
|
|
43481
43514
|
return function () {
|
|
43482
43515
|
firebase.off();
|
|
43516
|
+
window.removeEventListener('localStorageChanged', onStorageChanged);
|
|
43517
|
+
window.removeEventListener('sessionStorageChanged', onStorageChanged);
|
|
43483
43518
|
};
|
|
43484
43519
|
}, []);
|
|
43485
43520
|
React.useEffect(function () {
|
|
@@ -43745,6 +43780,16 @@ var AppFrame = function AppFrame(props) {
|
|
|
43745
43780
|
setAppBarMounted: setAppBarMounted
|
|
43746
43781
|
});
|
|
43747
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
|
+
|
|
43748
43793
|
return React__default["default"].createElement("div", {
|
|
43749
43794
|
className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
|
|
43750
43795
|
style: props.handleScrolling ? SCROLL : NO_SCROLL
|
|
@@ -43756,9 +43801,7 @@ var AppFrame = function AppFrame(props) {
|
|
|
43756
43801
|
searchBarProps: props.searchBarProps,
|
|
43757
43802
|
history: props.history,
|
|
43758
43803
|
setAppBarMounted: setAppBarMounted,
|
|
43759
|
-
onSettingsSaved:
|
|
43760
|
-
return location.reload();
|
|
43761
|
-
},
|
|
43804
|
+
onSettingsSaved: onSettingsSaved,
|
|
43762
43805
|
showTitle: props.showTitle || true,
|
|
43763
43806
|
title: props.appTitle
|
|
43764
43807
|
})), React__default["default"].createElement(Breadcrumbs, {
|