@copart/ops-tool-kit 1.12.9 → 1.12.10
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 +26 -6
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
47
47
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
48
48
|
|
|
49
49
|
const name$r = "@copart/ops-tool-kit";
|
|
50
|
-
const version$8 = "1.12.
|
|
50
|
+
const version$8 = "1.12.10";
|
|
51
51
|
const main$1 = "dist/ops-tool-kit.js";
|
|
52
52
|
const style = "dist/ops-tool-kit.css";
|
|
53
53
|
const files = [
|
|
@@ -9412,6 +9412,28 @@ var isChrome = function isChrome() {
|
|
|
9412
9412
|
var isEdge = userAgent.indexOf('Edg/') > -1;
|
|
9413
9413
|
return isChromium && !isEdge;
|
|
9414
9414
|
};
|
|
9415
|
+
var isUserStatusHidden = function isUserStatusHidden() {
|
|
9416
|
+
var _window$toolkitEnv, _storage$coreConfig2, _storage$coreConfig3;
|
|
9417
|
+
var isCoreApp = (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
9418
|
+
if (isCoreApp) {
|
|
9419
|
+
var _storage$coreConfig;
|
|
9420
|
+
return ((_storage$coreConfig = storage$1.coreConfig) === null || _storage$coreConfig === void 0 ? void 0 : _storage$coreConfig.hideUserStatus) || false;
|
|
9421
|
+
}
|
|
9422
|
+
if ((_storage$coreConfig2 = storage$1.coreConfig) !== null && _storage$coreConfig2 !== void 0 && _storage$coreConfig2.checkUserStatusByApp) {
|
|
9423
|
+
var _window$toolkitEnv2;
|
|
9424
|
+
var appTiles = storage$1.getLocalItem('opsportal-core:config').tiles || [];
|
|
9425
|
+
var appName = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.APP_NAME ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
9426
|
+
var appData = appTiles.find(function (tile) {
|
|
9427
|
+
if (tile.appName) {
|
|
9428
|
+
return tile.appName === appName;
|
|
9429
|
+
} else {
|
|
9430
|
+
return tile.path === "/".concat(appName);
|
|
9431
|
+
}
|
|
9432
|
+
});
|
|
9433
|
+
return (appData === null || appData === void 0 ? void 0 : appData.showUserStatus) !== true;
|
|
9434
|
+
}
|
|
9435
|
+
return ((_storage$coreConfig3 = storage$1.coreConfig) === null || _storage$coreConfig3 === void 0 ? void 0 : _storage$coreConfig3.hideUserStatus) || false;
|
|
9436
|
+
};
|
|
9415
9437
|
|
|
9416
9438
|
var css_248z$q = ".utilities_ops-app-frame_ConfigFetcher_ConfigFetcher--ConfigFetcher {\r\n}\r\n\r\n.utilities_ops-app-frame_ConfigFetcher_ConfigFetcher--spinner {\r\n margin: 80px 0 40px;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_ConfigFetcher_ConfigFetcher--spinner * {\r\n width: 60px;\r\n height: 60px;\r\n}\r\n";
|
|
9417
9439
|
styleInject(css_248z$q);
|
|
@@ -21446,7 +21468,6 @@ var css_248z$l = ".utilities_ops-app-frame_AppBarComponent_Settings_ProfileDetai
|
|
|
21446
21468
|
styleInject(css_248z$l);
|
|
21447
21469
|
|
|
21448
21470
|
var ProfileDetails = function ProfileDetails(_ref) {
|
|
21449
|
-
var _storage$coreConfig;
|
|
21450
21471
|
var logout = _ref.logout,
|
|
21451
21472
|
_ref$availableStatuse = _ref.availableStatuses,
|
|
21452
21473
|
availableStatuses = _ref$availableStatuse === void 0 ? [] : _ref$availableStatuse,
|
|
@@ -21532,12 +21553,12 @@ var ProfileDetails = function ProfileDetails(_ref) {
|
|
|
21532
21553
|
}
|
|
21533
21554
|
}), /*#__PURE__*/React__default["default"].createElement("span", null, selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.text));
|
|
21534
21555
|
};
|
|
21535
|
-
var
|
|
21556
|
+
var userStatusHidden = isUserStatusHidden();
|
|
21536
21557
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21537
21558
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_ProfileDetails_ProfileDetails--profileDetails"
|
|
21538
21559
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21539
21560
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_ProfileDetails_ProfileDetails--details"
|
|
21540
|
-
}, /*#__PURE__*/React__default["default"].createElement("h3", null, storage$1.userName), /*#__PURE__*/React__default["default"].createElement("p", null, storage$1.userEmail), Array.isArray(enhancedStatuses) && enhancedStatuses.length > 0 && !
|
|
21561
|
+
}, /*#__PURE__*/React__default["default"].createElement("h3", null, storage$1.userName), /*#__PURE__*/React__default["default"].createElement("p", null, storage$1.userEmail), Array.isArray(enhancedStatuses) && enhancedStatuses.length > 0 && !userStatusHidden && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21541
21562
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_ProfileDetails_ProfileDetails--statusSelector"
|
|
21542
21563
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Select, {
|
|
21543
21564
|
id: "user-status-select",
|
|
@@ -36450,7 +36471,6 @@ var AppBar = function AppBar(_ref) {
|
|
|
36450
36471
|
tileConfigAccess = userHasAccess(currentTile);
|
|
36451
36472
|
}
|
|
36452
36473
|
if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login') && tileConfigAccess) {
|
|
36453
|
-
var _storage$coreConfig2;
|
|
36454
36474
|
if (notificationsSource.includes('Nchan')) {
|
|
36455
36475
|
fetchG2Notifications(updateNotifications, updateAllNotificationsList);
|
|
36456
36476
|
if (!(window.navigator.userAgent.includes('Chrome') && window.location.href.includes('localhost'))) {
|
|
@@ -36555,7 +36575,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
36555
36575
|
return _ref5.apply(this, arguments);
|
|
36556
36576
|
};
|
|
36557
36577
|
}();
|
|
36558
|
-
if (!(
|
|
36578
|
+
if (!isUserStatusHidden()) {
|
|
36559
36579
|
loadUserStatus();
|
|
36560
36580
|
}
|
|
36561
36581
|
}
|