@copart/ops-tool-kit 1.8.1-alpha.15 → 1.8.1-alpha.17
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 +21 -9
- 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__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
|
33
33
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$f = "@copart/ops-tool-kit";
|
|
36
|
-
const version$5 = "1.8.1-alpha.
|
|
36
|
+
const version$5 = "1.8.1-alpha.17";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -2762,16 +2762,16 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2762
2762
|
getSessionItem: getSessionItem,
|
|
2763
2763
|
setSessionItem: setSessionItem,
|
|
2764
2764
|
setItem: function setItem(key, value) {
|
|
2765
|
-
var _window;
|
|
2765
|
+
var _window$toolkitEnv;
|
|
2766
2766
|
|
|
2767
|
-
var APP_NAME = ((_window = window) === null || _window === void 0 ? void 0 : _window.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
|
|
2767
|
+
var APP_NAME = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
2768
2768
|
setLocalItem("".concat(APP_NAME, ":").concat(key), value);
|
|
2769
2769
|
return value;
|
|
2770
2770
|
},
|
|
2771
2771
|
getItem: function getItem(key) {
|
|
2772
|
-
var
|
|
2772
|
+
var _window$toolkitEnv2;
|
|
2773
2773
|
|
|
2774
|
-
var APP_NAME = ((
|
|
2774
|
+
var APP_NAME = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
2775
2775
|
var value = getLocalItem("".concat(APP_NAME, ":").concat(key));
|
|
2776
2776
|
return value;
|
|
2777
2777
|
},
|
|
@@ -2797,10 +2797,10 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2797
2797
|
},
|
|
2798
2798
|
|
|
2799
2799
|
get currentAppPermissions() {
|
|
2800
|
-
var
|
|
2800
|
+
var _window$toolkitEnv3, _window$toolkitEnv4;
|
|
2801
2801
|
|
|
2802
2802
|
var appTiles = storage$1.getLocalItem('opsportal-core:config').tiles || [];
|
|
2803
|
-
var appName = ((
|
|
2803
|
+
var appName = ((_window$toolkitEnv3 = window.toolkitEnv) === null || _window$toolkitEnv3 === void 0 ? void 0 : _window$toolkitEnv3.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
2804
2804
|
var appData = appTiles.find(function (tile) {
|
|
2805
2805
|
if (tile.appName) {
|
|
2806
2806
|
return tile.appName === appName;
|
|
@@ -2808,7 +2808,7 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2808
2808
|
return tile.path === "/".concat(appName);
|
|
2809
2809
|
}
|
|
2810
2810
|
});
|
|
2811
|
-
var appAuthName = appData ? appData.appAuthName : ((
|
|
2811
|
+
var appAuthName = appData ? appData.appAuthName : ((_window$toolkitEnv4 = window.toolkitEnv) === null || _window$toolkitEnv4 === void 0 ? void 0 : _window$toolkitEnv4.APP_AUTH_NAME) ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
2812
2812
|
return appAuthName ? storage$1.getLocalItem("".concat(appAuthName, ":permissions")) : [];
|
|
2813
2813
|
},
|
|
2814
2814
|
|
|
@@ -47813,10 +47813,21 @@ var AppBar = function AppBar(_ref) {
|
|
|
47813
47813
|
var notificationIds = newNotifications.map(function (notification) {
|
|
47814
47814
|
return notification.notificationId;
|
|
47815
47815
|
});
|
|
47816
|
+
var actionCompletedNotificationIds = [];
|
|
47816
47817
|
var filteredNotifications = notifications.filter(function (notification) {
|
|
47818
|
+
var _notification$action, _notification$action$;
|
|
47819
|
+
|
|
47820
|
+
if (notification === null || notification === void 0 ? void 0 : (_notification$action = notification.action) === null || _notification$action === void 0 ? void 0 : (_notification$action$ = _notification$action.componentState) === null || _notification$action$ === void 0 ? void 0 : _notification$action$.completed) {
|
|
47821
|
+
actionCompletedNotificationIds.push(notification.notificationId);
|
|
47822
|
+
return true;
|
|
47823
|
+
}
|
|
47824
|
+
|
|
47817
47825
|
return !notificationIds.includes(notification.notificationId);
|
|
47818
47826
|
});
|
|
47819
|
-
|
|
47827
|
+
var filterednewNotifications = newNotifications.filter(function (notification) {
|
|
47828
|
+
return !actionCompletedNotificationIds.includes(notification.notificationId);
|
|
47829
|
+
});
|
|
47830
|
+
return sortNotifications([].concat(_toConsumableArray(filterednewNotifications), _toConsumableArray(filteredNotifications)));
|
|
47820
47831
|
};
|
|
47821
47832
|
|
|
47822
47833
|
var dismissNotification = function dismissNotification(notification) {
|
|
@@ -47898,6 +47909,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
47898
47909
|
phoneStatus: '',
|
|
47899
47910
|
phoneStatusProcessing: false
|
|
47900
47911
|
} : _storage$chromePlugin;
|
|
47912
|
+
console.log("***notifications=", notifications);
|
|
47901
47913
|
return React__default["default"].createElement("div", null, React__default["default"].createElement(AppBar$1, {
|
|
47902
47914
|
moduleName: "OPS PORTAL",
|
|
47903
47915
|
isLoggedOn: storage$1.isAuthenticated,
|