@copart/ops-tool-kit 1.10.16 → 1.10.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 +63 -44
- 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.10.
|
|
36
|
+
const version$5 = "1.10.17";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -6494,7 +6494,8 @@ function () {
|
|
|
6494
6494
|
return _ref.apply(this, arguments);
|
|
6495
6495
|
};
|
|
6496
6496
|
}();
|
|
6497
|
-
|
|
6497
|
+
|
|
6498
|
+
var tileFilter = function tileFilter(tile) {
|
|
6498
6499
|
var _window$toolkitEnv;
|
|
6499
6500
|
|
|
6500
6501
|
var appName = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
@@ -6503,13 +6504,19 @@ var findAppData = function findAppData(tiles) {
|
|
|
6503
6504
|
appName = window.location.pathname;
|
|
6504
6505
|
}
|
|
6505
6506
|
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6507
|
+
if (tile.appName) {
|
|
6508
|
+
return tile.appName === 'embedded' ? tile.path === appName : tile.appName === appName;
|
|
6509
|
+
} else {
|
|
6510
|
+
return tile.path === "/".concat(appName);
|
|
6511
|
+
}
|
|
6512
|
+
};
|
|
6513
|
+
|
|
6514
|
+
var findAppData = function findAppData() {
|
|
6515
|
+
var tiles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
6516
|
+
var tileOverrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
6517
|
+
var matchingTiles = [];
|
|
6518
|
+
matchingTiles.concat(tileOverrides.filter(tileFilter));
|
|
6519
|
+
matchingTiles.concat(tiles.filter(tileFilter));
|
|
6513
6520
|
|
|
6514
6521
|
if (matchingTiles.length > 1) {
|
|
6515
6522
|
var currentLocation = window.location.pathname;
|
|
@@ -6541,7 +6548,7 @@ function () {
|
|
|
6541
6548
|
case 3:
|
|
6542
6549
|
config = _context2.sent;
|
|
6543
6550
|
storage.setLocalItem('opsportal-core:config', config);
|
|
6544
|
-
return _context2.abrupt("return", findAppData(config.tiles
|
|
6551
|
+
return _context2.abrupt("return", findAppData(config.tiles, config.tileOverrides));
|
|
6545
6552
|
|
|
6546
6553
|
case 6:
|
|
6547
6554
|
case "end":
|
|
@@ -6753,8 +6760,6 @@ exports.all = function () {
|
|
|
6753
6760
|
};
|
|
6754
6761
|
});
|
|
6755
6762
|
|
|
6756
|
-
// import { appFunctions } from './mock_appFunctions'
|
|
6757
|
-
|
|
6758
6763
|
var getDefaultYard = function getDefaultYard(country) {
|
|
6759
6764
|
var _window$toolkitEnv;
|
|
6760
6765
|
|
|
@@ -11204,32 +11209,42 @@ function () {
|
|
|
11204
11209
|
case 12:
|
|
11205
11210
|
scopeData = storage.getLocalItem('login', 'entity_auth_scope');
|
|
11206
11211
|
scopeList = typeof scopeData === 'string' ? scopeData === null || scopeData === void 0 ? void 0 : scopeData.split(',') : [];
|
|
11212
|
+
scopeList = scopeList.filter(function (scope) {
|
|
11213
|
+
return typeof scope === 'string' && scope.trim() !== '';
|
|
11214
|
+
});
|
|
11207
11215
|
filteredScopeList = [];
|
|
11208
11216
|
scopeList.forEach(function (scope) {
|
|
11209
|
-
var
|
|
11217
|
+
var _storage$getLocalItem3;
|
|
11210
11218
|
|
|
11211
11219
|
var scopeInfo = scope === null || scope === void 0 ? void 0 : scope.split('|');
|
|
11212
|
-
var
|
|
11213
|
-
var
|
|
11214
|
-
hierarchyList.forEach(function (hierarchy) {
|
|
11215
|
-
var details = getHierarchyDetails(hierarchies, Number(hierarchy));
|
|
11220
|
+
var appScopeEnv = (_storage$getLocalItem3 = storage.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem3 === void 0 ? void 0 : _storage$getLocalItem3.appScopeEnv;
|
|
11221
|
+
var isScopeForCurrentEnv = scopeInfo[0] && scopeInfo[0] === appScopeEnv;
|
|
11216
11222
|
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11223
|
+
if (isScopeForCurrentEnv) {
|
|
11224
|
+
var _scopeInfo$;
|
|
11225
|
+
|
|
11226
|
+
var hierarchyList = ((_scopeInfo$ = scopeInfo[3]) === null || _scopeInfo$ === void 0 ? void 0 : _scopeInfo$.split(':')) || [];
|
|
11227
|
+
var hierarchiesWithDetails = [];
|
|
11228
|
+
hierarchyList.forEach(function (hierarchy) {
|
|
11229
|
+
var details = getHierarchyDetails(hierarchies, Number(hierarchy));
|
|
11221
11230
|
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
scopeName: scopeInfo[1],
|
|
11226
|
-
hierarchies: hierarchiesWithDetails
|
|
11231
|
+
if (details) {
|
|
11232
|
+
hierarchiesWithDetails.push(details);
|
|
11233
|
+
}
|
|
11227
11234
|
});
|
|
11235
|
+
|
|
11236
|
+
if (hierarchiesWithDetails.length > 0) {
|
|
11237
|
+
filteredScopeList.push({
|
|
11238
|
+
appName: scopeInfo[1],
|
|
11239
|
+
scopeName: scopeInfo[2],
|
|
11240
|
+
hierarchies: hierarchiesWithDetails
|
|
11241
|
+
});
|
|
11242
|
+
}
|
|
11228
11243
|
}
|
|
11229
11244
|
});
|
|
11230
11245
|
return _context.abrupt("return", filteredScopeList);
|
|
11231
11246
|
|
|
11232
|
-
case
|
|
11247
|
+
case 18:
|
|
11233
11248
|
case "end":
|
|
11234
11249
|
return _context.stop();
|
|
11235
11250
|
}
|
|
@@ -42193,7 +42208,8 @@ var AppBar = function AppBar(_ref) {
|
|
|
42193
42208
|
showTitle = _ref.showTitle,
|
|
42194
42209
|
title = _ref.title,
|
|
42195
42210
|
pathname = _ref.pathname,
|
|
42196
|
-
ActionComponent = _ref.ActionComponent
|
|
42211
|
+
ActionComponent = _ref.ActionComponent,
|
|
42212
|
+
searchComponent = _ref.searchComponent;
|
|
42197
42213
|
SETTINGS_ITEMS[0].name = storage$1.userName; // Escape hatch for forceUpdate function
|
|
42198
42214
|
|
|
42199
42215
|
var _useReducer = React.useReducer(function (x) {
|
|
@@ -42228,7 +42244,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
42228
42244
|
showMihelpTooltip = _useState10[0],
|
|
42229
42245
|
setShowMihelpTooltip = _useState10[1];
|
|
42230
42246
|
|
|
42231
|
-
var tileData = findAppData(coreAppConfig.tiles
|
|
42247
|
+
var tileData = findAppData(coreAppConfig.tiles, coreAppConfig.tileOverrides) || {};
|
|
42232
42248
|
var mihelpAppPath = isCoreRoute && !window.location.pathname.includes('embedded') ? null : tileData.mihelpAppPath;
|
|
42233
42249
|
var isMihelpEnabled;
|
|
42234
42250
|
|
|
@@ -42443,7 +42459,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
42443
42459
|
var handleHelpClick = function handleHelpClick() {
|
|
42444
42460
|
var country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
42445
42461
|
var uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase()) : "".concat(coreAppConfig.mihelpUri, "?re=").concat(country.toLowerCase());
|
|
42446
|
-
window.open(uri,
|
|
42462
|
+
window.open(uri, '_blank');
|
|
42447
42463
|
};
|
|
42448
42464
|
|
|
42449
42465
|
var feedbackConfig = function feedbackConfig() {
|
|
@@ -42542,7 +42558,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
42542
42558
|
|
|
42543
42559
|
var newNotification = _objectSpread2({}, newNotifications[0]);
|
|
42544
42560
|
|
|
42545
|
-
var startTime = newNotification.timeZoneType ===
|
|
42561
|
+
var startTime = newNotification.timeZoneType === 'RPTZ' ? newNotification.startsAt : moment.utc(newNotification.startsAt).local().format('YYYY-MM-DD HH:mm:ss'); // const endTime = newNotification.timeZoneType === "RPTZ" && newNotification.endDateTimeZone !=='UTC' ? newNotification.endsAt : moment.utc(newNotification.endsAt).local().format("YYYY-MM-DD HH:mm:ss")
|
|
42546
42562
|
|
|
42547
42563
|
var currentDate = new Date();
|
|
42548
42564
|
|
|
@@ -42570,7 +42586,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
42570
42586
|
var _notification$newsTar;
|
|
42571
42587
|
|
|
42572
42588
|
if (notification === null || notification === void 0 ? void 0 : (_notification$newsTar = notification.newsTarget) === null || _notification$newsTar === void 0 ? void 0 : _notification$newsTar.audience_value) {
|
|
42573
|
-
var startTime = moment.utc(notification.startsAt).local().format(
|
|
42589
|
+
var startTime = moment.utc(notification.startsAt).local().format('YYYY-MM-DD HH:mm:ss');
|
|
42574
42590
|
var currentDate = new Date();
|
|
42575
42591
|
|
|
42576
42592
|
if (new Date(startTime) > currentDate) {
|
|
@@ -42698,12 +42714,15 @@ var AppBar = function AppBar(_ref) {
|
|
|
42698
42714
|
if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login') && tileConfigAccess) {
|
|
42699
42715
|
if (notificationsSource.includes('Nchan')) {
|
|
42700
42716
|
fetchG2Notifications(updateNotifications, updateAllNotificationsList);
|
|
42701
|
-
|
|
42702
|
-
|
|
42703
|
-
|
|
42704
|
-
|
|
42705
|
-
|
|
42706
|
-
|
|
42717
|
+
|
|
42718
|
+
if (!(window.navigator.userAgent.includes('Chrome') && window.location.href.includes('localhost'))) {
|
|
42719
|
+
var client = startWebSocketConnection(updateNotifications, updateAllNotificationsList, reConnectSocket);
|
|
42720
|
+
var pingIntervalInSec = coreAppConfig.nchanPingIntervalInSec || 30;
|
|
42721
|
+
setPingInterval(setInterval(function () {
|
|
42722
|
+
client.send('_ping_');
|
|
42723
|
+
}, pingIntervalInSec * 1000));
|
|
42724
|
+
setSocketClient(client);
|
|
42725
|
+
}
|
|
42707
42726
|
}
|
|
42708
42727
|
|
|
42709
42728
|
if (!firebaseInitialized && notificationsSource.includes('Firebase')) {
|
|
@@ -42787,6 +42806,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
42787
42806
|
onDismiss: dismissNotification,
|
|
42788
42807
|
ActionComponent: ActionComponent,
|
|
42789
42808
|
saveActionComponentState: saveActionComponentState,
|
|
42809
|
+
searchComponent: searchComponent,
|
|
42790
42810
|
mihelpAppPath: mihelpAppPath,
|
|
42791
42811
|
showMihelpDot: showMihelpDot,
|
|
42792
42812
|
setShowMihelpTooltip: setShowMihelpTooltip,
|
|
@@ -46635,7 +46655,7 @@ function ContextualHelp(_ref) {
|
|
|
46635
46655
|
setArticle = _useState2[1];
|
|
46636
46656
|
|
|
46637
46657
|
var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
|
|
46638
|
-
var tileData = findAppData(coreAppConfig.tiles
|
|
46658
|
+
var tileData = findAppData(coreAppConfig.tiles, coreAppConfig.tileOverrides) || {};
|
|
46639
46659
|
var mihelpAppPath = !isCoreRoute ? tileData.mihelpAppPath : null;
|
|
46640
46660
|
var isMihelpEnabled;
|
|
46641
46661
|
|
|
@@ -46727,13 +46747,12 @@ function ContextualHelp(_ref) {
|
|
|
46727
46747
|
}, React__default["default"].createElement("span", {
|
|
46728
46748
|
id: "helpSnippet1",
|
|
46729
46749
|
ref: snippetRef
|
|
46730
|
-
}, React__default["default"].createElement(coreComponents.
|
|
46731
|
-
name: "
|
|
46732
|
-
variant: "
|
|
46750
|
+
}, React__default["default"].createElement(coreComponents.IconV2, {
|
|
46751
|
+
name: "question-circle",
|
|
46752
|
+
variant: "solid",
|
|
46733
46753
|
style: {
|
|
46734
|
-
fontSize: '30px',
|
|
46735
46754
|
color: '#1d5ab9',
|
|
46736
|
-
|
|
46755
|
+
fontSize: '22px'
|
|
46737
46756
|
}
|
|
46738
46757
|
})), React__default["default"].createElement(H, {
|
|
46739
46758
|
anchorSelect: "#helpSnippet1",
|