@copart/ops-tool-kit 1.13.0-beta.2 → 1.13.0-beta.20
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 +2357 -753
- package/dist/ops-tool-kit.js.map +1 -1
- package/iframe-webpack-facade.js +32 -0
- package/package.json +5 -3
package/dist/ops-tool-kit.js
CHANGED
|
@@ -6,6 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var ReactDOM = require('react-dom');
|
|
7
7
|
var frontEndUtils = require('@copart/front-end-utils');
|
|
8
8
|
var coreComponents = require('@copart/core-components');
|
|
9
|
+
var ReactRouterDOM = require('react-router-dom');
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
@@ -45,14 +46,16 @@ function _mergeNamespaces(n, m) {
|
|
|
45
46
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
46
47
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
47
48
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
49
|
+
var ReactRouterDOM__namespace = /*#__PURE__*/_interopNamespace(ReactRouterDOM);
|
|
48
50
|
|
|
49
51
|
const name$1 = "@copart/ops-tool-kit";
|
|
50
|
-
const version$3 = "1.13.0-beta.
|
|
52
|
+
const version$3 = "1.13.0-beta.20";
|
|
51
53
|
const main$1 = "dist/ops-tool-kit.js";
|
|
52
54
|
const style = "dist/ops-tool-kit.css";
|
|
53
55
|
const files = [
|
|
54
56
|
"dist",
|
|
55
|
-
"bin"
|
|
57
|
+
"bin",
|
|
58
|
+
"iframe-webpack-facade.js"
|
|
56
59
|
];
|
|
57
60
|
const bin = {
|
|
58
61
|
"generate-build-meta": "./bin/cli.js"
|
|
@@ -106,7 +109,8 @@ const devDependencies$1 = {
|
|
|
106
109
|
};
|
|
107
110
|
const peerDependencies = {
|
|
108
111
|
"@copart/core-components": "2.3.0-alpha.filters.6",
|
|
109
|
-
react: "*"
|
|
112
|
+
react: "*",
|
|
113
|
+
"react-router-dom": "^5.0.0 || ^6.0.0"
|
|
110
114
|
};
|
|
111
115
|
const dependencies$1 = {
|
|
112
116
|
"@reacting/purist": "0.1.0",
|
|
@@ -198,25 +202,6 @@ var setup = (function (_ref) {
|
|
|
198
202
|
warn: devLog('warn')
|
|
199
203
|
};
|
|
200
204
|
}();
|
|
201
|
-
global.setUpInstana = function () {
|
|
202
|
-
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
203
|
-
var isCoreApp = arguments.length > 1 ? arguments[1] : undefined;
|
|
204
|
-
//devOnly.log('Instana setting up.')
|
|
205
|
-
if (key && !(process.env.NODE_ENV !== "production") && isCoreApp) {
|
|
206
|
-
(function (i, s, o, g, r, a, m) {
|
|
207
|
-
i['InstanaEumObject'] = r;
|
|
208
|
-
i[r] = i[r] || function () {
|
|
209
|
-
(i[r].q = i[r].q || []).push(arguments);
|
|
210
|
-
}, i[r].l = 1 * new Date();
|
|
211
|
-
a = s.createElement(o), m = s.getElementsByTagName(o)[0];
|
|
212
|
-
a.async = 1;
|
|
213
|
-
a.src = g;
|
|
214
|
-
m.parentNode.insertBefore(a, m);
|
|
215
|
-
})(window, document, 'script', '//eum.instana.io/eum.min.js', 'ineum');
|
|
216
|
-
ineum('reportingUrl', 'https://eum-us-west-2.instana.io');
|
|
217
|
-
ineum('apiKey', key);
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
205
|
});
|
|
221
206
|
|
|
222
207
|
function styleInject(css, ref) {
|
|
@@ -307,6 +292,54 @@ function _createClass$2(e, r, t) {
|
|
|
307
292
|
writable: !1
|
|
308
293
|
}), e;
|
|
309
294
|
}
|
|
295
|
+
function _createForOfIteratorHelper(r, e) {
|
|
296
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
297
|
+
if (!t) {
|
|
298
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
299
|
+
t && (r = t);
|
|
300
|
+
var n = 0,
|
|
301
|
+
F = function () {};
|
|
302
|
+
return {
|
|
303
|
+
s: F,
|
|
304
|
+
n: function () {
|
|
305
|
+
return n >= r.length ? {
|
|
306
|
+
done: !0
|
|
307
|
+
} : {
|
|
308
|
+
done: !1,
|
|
309
|
+
value: r[n++]
|
|
310
|
+
};
|
|
311
|
+
},
|
|
312
|
+
e: function (r) {
|
|
313
|
+
throw r;
|
|
314
|
+
},
|
|
315
|
+
f: F
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
319
|
+
}
|
|
320
|
+
var o,
|
|
321
|
+
a = !0,
|
|
322
|
+
u = !1;
|
|
323
|
+
return {
|
|
324
|
+
s: function () {
|
|
325
|
+
t = t.call(r);
|
|
326
|
+
},
|
|
327
|
+
n: function () {
|
|
328
|
+
var r = t.next();
|
|
329
|
+
return a = r.done, r;
|
|
330
|
+
},
|
|
331
|
+
e: function (r) {
|
|
332
|
+
u = !0, o = r;
|
|
333
|
+
},
|
|
334
|
+
f: function () {
|
|
335
|
+
try {
|
|
336
|
+
a || null == t.return || t.return();
|
|
337
|
+
} finally {
|
|
338
|
+
if (u) throw o;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
}
|
|
310
343
|
function _defineProperty$2(e, r, t) {
|
|
311
344
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
312
345
|
value: t,
|
|
@@ -2447,6 +2480,21 @@ var stringify$1 = function stringify(target) {
|
|
|
2447
2480
|
return typeof target === 'string' ? target : JSON.stringify(target);
|
|
2448
2481
|
};
|
|
2449
2482
|
|
|
2483
|
+
var OPS_STORAGE_CHANGED = 'opsStorageChanged';
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* Fired on every toolkit storage mutation (set/remove/clear).
|
|
2487
|
+
* Shell can listen and forward STORAGE_CHANGED to embedded iframes.
|
|
2488
|
+
*
|
|
2489
|
+
* @param {{ scope: 'local'|'session', op: 'set'|'remove'|'clear', key?: string, path?: string, value?: * }} detail
|
|
2490
|
+
*/
|
|
2491
|
+
function notifyStorageChanged(detail) {
|
|
2492
|
+
if (typeof window === 'undefined') return;
|
|
2493
|
+
window.dispatchEvent(new CustomEvent(OPS_STORAGE_CHANGED, {
|
|
2494
|
+
detail: detail
|
|
2495
|
+
}));
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2450
2498
|
emitStorageEvents('local');
|
|
2451
2499
|
emitStorageEvents('session');
|
|
2452
2500
|
var getLocalItem$1 = function getLocalItem(key, path) {
|
|
@@ -2457,14 +2505,73 @@ var getSessionItem$1 = function getSessionItem(key, path) {
|
|
|
2457
2505
|
var data = parse$1(sessionStorage[key]) || {};
|
|
2458
2506
|
return path ? getValue$1(data, path) : data;
|
|
2459
2507
|
};
|
|
2460
|
-
|
|
2508
|
+
|
|
2509
|
+
/** Resolve path + notify flag. 3rd arg is path (string) or `{ notify: false }`. */
|
|
2510
|
+
var resolveWriteOptions = function resolveWriteOptions(pathOrOptions, maybeOptions) {
|
|
2511
|
+
if (typeof pathOrOptions === 'string') {
|
|
2512
|
+
return {
|
|
2513
|
+
path: pathOrOptions,
|
|
2514
|
+
notify: (maybeOptions === null || maybeOptions === void 0 ? void 0 : maybeOptions.notify) !== false
|
|
2515
|
+
};
|
|
2516
|
+
}
|
|
2517
|
+
var options = pathOrOptions && _typeof$1(pathOrOptions) === 'object' ? pathOrOptions : {};
|
|
2518
|
+
return {
|
|
2519
|
+
path: undefined,
|
|
2520
|
+
notify: options.notify !== false
|
|
2521
|
+
};
|
|
2522
|
+
};
|
|
2523
|
+
var setLocalItem$1 = function setLocalItem(key, value, pathOrOptions, maybeOptions) {
|
|
2524
|
+
var _resolveWriteOptions = resolveWriteOptions(pathOrOptions, maybeOptions),
|
|
2525
|
+
path = _resolveWriteOptions.path,
|
|
2526
|
+
notify = _resolveWriteOptions.notify;
|
|
2461
2527
|
if (value) {
|
|
2462
2528
|
localStorage[key] = stringify$1(path ? setValue(getLocalItem$1(key), path, value) : value);
|
|
2529
|
+
if (notify) {
|
|
2530
|
+
notifyStorageChanged({
|
|
2531
|
+
scope: 'local',
|
|
2532
|
+
op: 'set',
|
|
2533
|
+
key: key,
|
|
2534
|
+
path: path,
|
|
2535
|
+
value: value
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2463
2538
|
}
|
|
2464
2539
|
};
|
|
2465
|
-
var setSessionItem$1 = function setSessionItem(key, value,
|
|
2540
|
+
var setSessionItem$1 = function setSessionItem(key, value, pathOrOptions, maybeOptions) {
|
|
2541
|
+
var _resolveWriteOptions2 = resolveWriteOptions(pathOrOptions, maybeOptions),
|
|
2542
|
+
path = _resolveWriteOptions2.path,
|
|
2543
|
+
notify = _resolveWriteOptions2.notify;
|
|
2466
2544
|
if (value) {
|
|
2467
2545
|
sessionStorage[key] = stringify$1(path ? setValue(getSessionItem$1(key), path, value) : value);
|
|
2546
|
+
if (notify) {
|
|
2547
|
+
notifyStorageChanged({
|
|
2548
|
+
scope: 'session',
|
|
2549
|
+
op: 'set',
|
|
2550
|
+
key: key,
|
|
2551
|
+
path: path,
|
|
2552
|
+
value: value
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
};
|
|
2557
|
+
var removeLocalItem$1 = function removeLocalItem(key, options) {
|
|
2558
|
+
localStorage.removeItem(key);
|
|
2559
|
+
if ((options === null || options === void 0 ? void 0 : options.notify) !== false) {
|
|
2560
|
+
notifyStorageChanged({
|
|
2561
|
+
scope: 'local',
|
|
2562
|
+
op: 'remove',
|
|
2563
|
+
key: key
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
};
|
|
2567
|
+
var removeSessionItem$1 = function removeSessionItem(key, options) {
|
|
2568
|
+
sessionStorage.removeItem(key);
|
|
2569
|
+
if ((options === null || options === void 0 ? void 0 : options.notify) !== false) {
|
|
2570
|
+
notifyStorageChanged({
|
|
2571
|
+
scope: 'session',
|
|
2572
|
+
op: 'remove',
|
|
2573
|
+
key: key
|
|
2574
|
+
});
|
|
2468
2575
|
}
|
|
2469
2576
|
};
|
|
2470
2577
|
var getItemFromStorage = function getItemFromStorage(storage) {
|
|
@@ -2481,13 +2588,13 @@ var getItemFromStorage = function getItemFromStorage(storage) {
|
|
|
2481
2588
|
var resetRole = function resetRole() {
|
|
2482
2589
|
var newDashboard = getItemFromStorage(sessionStorage)('dashboard');
|
|
2483
2590
|
newDashboard.selectedRole = '';
|
|
2484
|
-
|
|
2591
|
+
setSessionItem$1('dashboard', newDashboard);
|
|
2485
2592
|
var newSettings = getItemFromStorage(localStorage)('settings');
|
|
2486
|
-
|
|
2593
|
+
setLocalItem$1('settings', newSettings);
|
|
2487
2594
|
};
|
|
2488
2595
|
var clearStorage$1 = function clearStorage() {
|
|
2489
|
-
|
|
2490
|
-
|
|
2596
|
+
removeLocalItem$1('login');
|
|
2597
|
+
removeLocalItem$1('twilio');
|
|
2491
2598
|
//Clear app permissions
|
|
2492
2599
|
var permissionsKeys = [];
|
|
2493
2600
|
for (var i = 0; i < localStorage.length; i++) {
|
|
@@ -2496,11 +2603,11 @@ var clearStorage$1 = function clearStorage() {
|
|
|
2496
2603
|
}
|
|
2497
2604
|
}
|
|
2498
2605
|
permissionsKeys.forEach(function (key) {
|
|
2499
|
-
return
|
|
2606
|
+
return removeLocalItem$1(key);
|
|
2500
2607
|
});
|
|
2501
2608
|
resetRole(); // TO DO: Revist role clear logic
|
|
2502
2609
|
// Clear Mihub related field. Need to revisit this
|
|
2503
|
-
|
|
2610
|
+
removeSessionItem$1('globalNavResponseObj');
|
|
2504
2611
|
};
|
|
2505
2612
|
var setAppContext$1 = function setAppContext() {
|
|
2506
2613
|
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -2534,8 +2641,10 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2534
2641
|
return {
|
|
2535
2642
|
getLocalItem: getLocalItem$1,
|
|
2536
2643
|
setLocalItem: setLocalItem$1,
|
|
2644
|
+
removeLocalItem: removeLocalItem$1,
|
|
2537
2645
|
getSessionItem: getSessionItem$1,
|
|
2538
2646
|
setSessionItem: setSessionItem$1,
|
|
2647
|
+
removeSessionItem: removeSessionItem$1,
|
|
2539
2648
|
setAppContext: setAppContext$1,
|
|
2540
2649
|
setItem: function setItem(key, value) {
|
|
2541
2650
|
var _window$toolkitEnv4;
|
|
@@ -2729,8 +2838,8 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2729
2838
|
},
|
|
2730
2839
|
logout: function logout() {
|
|
2731
2840
|
clearStorage$1();
|
|
2732
|
-
|
|
2733
|
-
|
|
2841
|
+
removeLocalItem$1('c2dEnabled');
|
|
2842
|
+
removeLocalItem$1('mihelpAgentConversations');
|
|
2734
2843
|
window.location.assign('/logout');
|
|
2735
2844
|
}
|
|
2736
2845
|
};
|
|
@@ -2767,17 +2876,19 @@ var withBreadcrumbs = function withBreadcrumbs(Comp) {
|
|
|
2767
2876
|
}(React__namespace.Component);
|
|
2768
2877
|
};
|
|
2769
2878
|
var Breadcrumbs = withBreadcrumbs(index$1.purist(function (props) {
|
|
2770
|
-
var _props$appTile, _props$
|
|
2879
|
+
var _props$appTile, _props$appTile3;
|
|
2771
2880
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
2772
2881
|
className: "utilities_ops-app-frame_Breadcrumbs_styles_Breadcrumbs--Breadcrumbs"
|
|
2773
2882
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
2774
2883
|
className: "utilities_ops-app-frame_Breadcrumbs_styles_Breadcrumbs--crumbs"
|
|
2775
2884
|
}, props !== null && props !== void 0 && (_props$appTile = props.appTile) !== null && _props$appTile !== void 0 && _props$appTile.title ? /*#__PURE__*/React__namespace.createElement("a", {
|
|
2776
2885
|
onClick: function onClick() {
|
|
2777
|
-
|
|
2886
|
+
var _props$appTile2;
|
|
2887
|
+
var isEmbedded = window.location.pathname.includes('embedded');
|
|
2888
|
+
props.history.push(isEmbedded && (_props$appTile2 = props.appTile) !== null && _props$appTile2 !== void 0 && _props$appTile2.path ? props.appTile.path : '/');
|
|
2778
2889
|
},
|
|
2779
2890
|
className: "utilities_ops-app-frame_Breadcrumbs_styles_Breadcrumbs--Crumb"
|
|
2780
|
-
}, props === null || props === void 0 ? void 0 : (_props$
|
|
2891
|
+
}, props === null || props === void 0 ? void 0 : (_props$appTile3 = props.appTile) === null || _props$appTile3 === void 0 ? void 0 : _props$appTile3.title) : null, props.breadcrumbs.crumbs.map(function (crumb, index) {
|
|
2781
2892
|
return /*#__PURE__*/React__namespace.createElement("a", {
|
|
2782
2893
|
onClick: function onClick() {
|
|
2783
2894
|
return props.history.push(crumb.to);
|
|
@@ -2860,10 +2971,10 @@ var BreadcrumbsProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
2860
2971
|
}(React__namespace.Component);
|
|
2861
2972
|
|
|
2862
2973
|
var _class;
|
|
2863
|
-
var _excluded$
|
|
2974
|
+
var _excluded$5 = ["breadcrumbs"];
|
|
2864
2975
|
var getCrumbProps = function getCrumbProps(props) {
|
|
2865
2976
|
props.breadcrumbs;
|
|
2866
|
-
var crumbProps = _objectWithoutProperties(props, _excluded$
|
|
2977
|
+
var crumbProps = _objectWithoutProperties(props, _excluded$5);
|
|
2867
2978
|
return crumbProps;
|
|
2868
2979
|
};
|
|
2869
2980
|
var Crumb$1 = withBreadcrumbs(_class = /*#__PURE__*/function (_React$Component) {
|
|
@@ -7088,38 +7199,6 @@ var values$1 = /*#__PURE__*/_curry1(function values(obj) {
|
|
|
7088
7199
|
});
|
|
7089
7200
|
var values$2 = values$1;
|
|
7090
7201
|
|
|
7091
|
-
/**
|
|
7092
|
-
* Makes an ascending comparator function out of a function that returns a value
|
|
7093
|
-
* that can be compared with `<` and `>`.
|
|
7094
|
-
*
|
|
7095
|
-
* @func
|
|
7096
|
-
* @memberOf R
|
|
7097
|
-
* @since v0.23.0
|
|
7098
|
-
* @category Function
|
|
7099
|
-
* @sig Ord b => (a -> b) -> a -> a -> Number
|
|
7100
|
-
* @param {Function} fn A function of arity one that returns a value that can be compared
|
|
7101
|
-
* @param {*} a The first item to be compared.
|
|
7102
|
-
* @param {*} b The second item to be compared.
|
|
7103
|
-
* @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0`
|
|
7104
|
-
* @see R.descend
|
|
7105
|
-
* @example
|
|
7106
|
-
*
|
|
7107
|
-
* const byAge = R.ascend(R.prop('age'));
|
|
7108
|
-
* const people = [
|
|
7109
|
-
* { name: 'Emma', age: 70 },
|
|
7110
|
-
* { name: 'Peter', age: 78 },
|
|
7111
|
-
* { name: 'Mikhail', age: 62 },
|
|
7112
|
-
* ];
|
|
7113
|
-
* const peopleByYoungestFirst = R.sort(byAge, people);
|
|
7114
|
-
* //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]
|
|
7115
|
-
*/
|
|
7116
|
-
var ascend = /*#__PURE__*/_curry3(function ascend(fn, a, b) {
|
|
7117
|
-
var aa = fn(a);
|
|
7118
|
-
var bb = fn(b);
|
|
7119
|
-
return aa < bb ? -1 : aa > bb ? 1 : 0;
|
|
7120
|
-
});
|
|
7121
|
-
var ascend$1 = ascend;
|
|
7122
|
-
|
|
7123
7202
|
/**
|
|
7124
7203
|
* Checks if the input value is `null` or `undefined`.
|
|
7125
7204
|
*
|
|
@@ -8908,51 +8987,6 @@ var sort = /*#__PURE__*/_curry2(function sort(comparator, list) {
|
|
|
8908
8987
|
});
|
|
8909
8988
|
var sort$1 = sort;
|
|
8910
8989
|
|
|
8911
|
-
/**
|
|
8912
|
-
* Sorts a list according to a list of comparators.
|
|
8913
|
-
*
|
|
8914
|
-
* @func
|
|
8915
|
-
* @memberOf R
|
|
8916
|
-
* @since v0.23.0
|
|
8917
|
-
* @category Relation
|
|
8918
|
-
* @sig [(a, a) -> Number] -> [a] -> [a]
|
|
8919
|
-
* @param {Array} functions A list of comparator functions.
|
|
8920
|
-
* @param {Array} list The list to sort.
|
|
8921
|
-
* @return {Array} A new list sorted according to the comarator functions.
|
|
8922
|
-
* @example
|
|
8923
|
-
*
|
|
8924
|
-
* const alice = {
|
|
8925
|
-
* name: 'alice',
|
|
8926
|
-
* age: 40
|
|
8927
|
-
* };
|
|
8928
|
-
* const bob = {
|
|
8929
|
-
* name: 'bob',
|
|
8930
|
-
* age: 30
|
|
8931
|
-
* };
|
|
8932
|
-
* const clara = {
|
|
8933
|
-
* name: 'clara',
|
|
8934
|
-
* age: 40
|
|
8935
|
-
* };
|
|
8936
|
-
* const people = [clara, bob, alice];
|
|
8937
|
-
* const ageNameSort = R.sortWith([
|
|
8938
|
-
* R.descend(R.prop('age')),
|
|
8939
|
-
* R.ascend(R.prop('name'))
|
|
8940
|
-
* ]);
|
|
8941
|
-
* ageNameSort(people); //=> [alice, clara, bob]
|
|
8942
|
-
*/
|
|
8943
|
-
var sortWith = /*#__PURE__*/_curry2(function sortWith(fns, list) {
|
|
8944
|
-
return Array.prototype.slice.call(list, 0).sort(function (a, b) {
|
|
8945
|
-
var result = 0;
|
|
8946
|
-
var i = 0;
|
|
8947
|
-
while (result === 0 && i < fns.length) {
|
|
8948
|
-
result = fns[i](a, b);
|
|
8949
|
-
i += 1;
|
|
8950
|
-
}
|
|
8951
|
-
return result;
|
|
8952
|
-
});
|
|
8953
|
-
});
|
|
8954
|
-
var sortWith$1 = sortWith;
|
|
8955
|
-
|
|
8956
8990
|
/**
|
|
8957
8991
|
* Checks if a list starts with the provided sublist.
|
|
8958
8992
|
*
|
|
@@ -9305,22 +9339,15 @@ var isChrome = function isChrome() {
|
|
|
9305
9339
|
};
|
|
9306
9340
|
var isUserStatusHidden = function isUserStatusHidden() {
|
|
9307
9341
|
var _window$toolkitEnv, _storage$coreConfig2, _storage$coreConfig3;
|
|
9308
|
-
var
|
|
9342
|
+
var isEmbeddedRoute = window.location.pathname.includes('embedded');
|
|
9343
|
+
var isCoreApp = isEmbeddedRoute ? false : (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
9309
9344
|
if (isCoreApp) {
|
|
9310
9345
|
var _storage$coreConfig;
|
|
9311
9346
|
return ((_storage$coreConfig = storage$2.coreConfig) === null || _storage$coreConfig === void 0 ? void 0 : _storage$coreConfig.hideUserStatus) || false;
|
|
9312
9347
|
}
|
|
9313
9348
|
if ((_storage$coreConfig2 = storage$2.coreConfig) !== null && _storage$coreConfig2 !== void 0 && _storage$coreConfig2.checkUserStatusByApp) {
|
|
9314
|
-
var
|
|
9315
|
-
var
|
|
9316
|
-
var appName = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.APP_NAME ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
9317
|
-
var appData = appTiles.find(function (tile) {
|
|
9318
|
-
if (tile.appName) {
|
|
9319
|
-
return tile.appName === appName;
|
|
9320
|
-
} else {
|
|
9321
|
-
return tile.path === "/".concat(appName);
|
|
9322
|
-
}
|
|
9323
|
-
});
|
|
9349
|
+
var coreAppConfig = storage$2.getLocalItem('opsportal-core:config') || {};
|
|
9350
|
+
var appData = findAppData(coreAppConfig.tiles || [], coreAppConfig.tileOverrides || []);
|
|
9324
9351
|
return (appData === null || appData === void 0 ? void 0 : appData.showUserStatus) !== true;
|
|
9325
9352
|
}
|
|
9326
9353
|
return ((_storage$coreConfig3 = storage$2.coreConfig) === null || _storage$coreConfig3 === void 0 ? void 0 : _storage$coreConfig3.hideUserStatus) || false;
|
|
@@ -9353,8 +9380,10 @@ var ConfigFetcher = /*#__PURE__*/function (_React$Component) {
|
|
|
9353
9380
|
_context.n = 1;
|
|
9354
9381
|
break;
|
|
9355
9382
|
}
|
|
9356
|
-
return _context.a(2, _this.setState({
|
|
9357
|
-
|
|
9383
|
+
return _context.a(2, _this.setState(function (state) {
|
|
9384
|
+
return {
|
|
9385
|
+
gotConfig: true
|
|
9386
|
+
};
|
|
9358
9387
|
}));
|
|
9359
9388
|
case 1:
|
|
9360
9389
|
configUri = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.CONFIG_URI ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
|
|
@@ -9370,11 +9399,10 @@ var ConfigFetcher = /*#__PURE__*/function (_React$Component) {
|
|
|
9370
9399
|
return _context.a(2);
|
|
9371
9400
|
case 3:
|
|
9372
9401
|
storage$2.setItem('config', config);
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
gotConfig: true
|
|
9402
|
+
_this.setState(function (state) {
|
|
9403
|
+
return {
|
|
9404
|
+
gotConfig: true
|
|
9405
|
+
};
|
|
9378
9406
|
});
|
|
9379
9407
|
case 4:
|
|
9380
9408
|
return _context.a(2);
|
|
@@ -21319,7 +21347,7 @@ FeedbackDialog.defaultProps = {
|
|
|
21319
21347
|
}
|
|
21320
21348
|
};
|
|
21321
21349
|
|
|
21322
|
-
var css_248z$m = ".utilities_ops-app-frame_AppBarComponent_AppBar--root {\r\n background-color: var(--blue);\r\n background-color: var(--blue);\r\n height: 48px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n white-space: nowrap;\r\n /* padding-top: env(safe-area-inset-top, 0px); */\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--leftItems {\r\n width: 100%;\r\n display: flex;\r\n justify-content: start;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarIcons {\r\n margin: 0 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogo {\r\n display: flex;\r\n align-items: center;\r\n flex-direction: column;\r\n margin-left: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogoNew {\r\n display: flex;\r\n margin: 3px 0 0 16px;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--moduleName {\r\n color: white;\r\n font-size: 11px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items {\r\n color: white;\r\n cursor: pointer;\r\n font-size: 18px;\r\n display: flex;\r\n justify-content: center;\r\n margin: 8px !important;\r\n position: relative;\r\n width: 25px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--logout {\r\n margin-right: 24px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items i {\r\n color: #fff;\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--lightBulbIcon i {\r\n color: #ffff00;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--language {\r\n width: auto;\r\n grid-gap: 4px;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n display: flex;\r\n font-size: 14px;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard {\r\n width: auto;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n background: #fff;\r\n color: #1D5AB9;\r\n font-weight: 600;\r\n border-radius: 4px;\r\n font-size: 14px;\r\n grid-gap: 8px;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n padding: 2px 8px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard span i {\r\n color: #1D5AB9;\r\n font-size: 16px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard .utilities_ops-app-frame_AppBarComponent_AppBar--yardNumber {\r\n font-size: 14px;\r\n font-weight: 400;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col {\r\n display: flex;\r\n color: white;\r\n font-size: 13px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col svg {\r\n color: white;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\r\n width: 6rem;\r\n margin-top: 0rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--text {\r\n margin-top: 0.6rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--iconText {\r\n margin-top: 0.4rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchBar,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--placeholderDiv {\r\n margin-top: -0.2rem;\r\n margin-left: 2rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarLeft > img.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\r\n display: inline;\r\n display: initial;\r\n}\r\n\r\n@font-face {\r\n font-family: 'Open Sans';\r\n font-style: italic;\r\n font-weight: 600;\r\n src: url(https://fonts.gstatic.com/s/opensans/v18/memnYaGs126MiZpBA-UFUKXGUdhmIqOjjg.woff2)\r\n format('woff2');\r\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--appTitle {\r\n color: #fff;\r\n font-family: 'Open Sans', sans-serif;\r\n font-weight: 600;\r\n font-style: italic;\r\n font-size: 14px;\r\n position: relative;\r\n left: 16px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--item {\r\n display: flex;\r\n color: white;\r\n font-size: 13px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon {\r\n /* margin-left: 10px;\r\n margin-right: 7px; */\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n background: #fff;\r\n color: #1D5AB9;\r\n font-weight: 600;\r\n border-radius: 4px;\r\n box-shadow: inset 0px -2px 0px rgba(0, 0, 0, 0.4), 0px 1.6px 3.6px 0px rgba(0, 0, 0, 0.13), 0px 0.3px 0.9px 0px rgba(0, 0, 0, 0.10);\r\n font-size: 14px;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin: 0 8px;\r\n padding: 6px 20px 7px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span {\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span i {\r\n font-size: 18px;\r\n color: #1D5AB9;\r\n}\r\n\r\n/* .searchIcon > div {\r\n margin-left: 7px;\r\n} */\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper i {\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper span {\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault {\r\n color: white;\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\r\n background-color: white;\r\n border-radius: 20px;\r\n margin: 5px;\r\n padding: 0px 10px;\r\n height: 25px;\r\n font-weight: bold;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--light {\r\n border: 1px solid #1d5ab9;\r\n justify-content: flex-start;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightDefault {\r\n color: black;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\r\n background-color: white;\r\n border-radius: 20px;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\r\n color: green;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable i {\r\n color: green;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline {\r\n color: red;\r\n margin: 5px 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline svg {\r\n margin-right: 5px;\r\n margin-left: 5px;\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--SpinnerWrapper {\r\n margin-left: 5px;\r\n display: inline-flex;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i {\r\n font-size: 16px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i {\r\n line-height: unset;\r\n font-size: 16px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable {\r\n color: green;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\r\n color: red;\r\n}\r\n\r\n/* .userMenu {\r\n margin-left: 10px !important;\r\n margin-right: 5px !important;\r\n} */\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\r\n margin: 8px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\r\n margin-left: 7px;\r\n font-size: 14px;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--feedback {\r\n margin: 0 !important;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--overflowItems {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button {\r\n cursor: pointer;\r\n position: relative;\r\n top: -2px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button i {\r\n color: #fff;\r\n font-size: 22px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpDot {\r\n background-color: #ef5350;\r\n border-radius: 50%;\r\n position: absolute;\r\n top: 3px;\r\n left: 13px;\r\n width: 10px;\r\n height: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip{\r\n position: absolute;\r\n background: #fff;\r\n padding: 8px;\r\n right: 30px;\r\n top: -2px;\r\n border-radius: 2px;\r\n font-weight: 400;\r\n font-size: 12px;\r\n cursor: auto;\r\n color: #000;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip::before{\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 100%;\r\n margin-top: -5px;\r\n border-width: 5px;\r\n border-style: solid;\r\n border-color: transparent transparent transparent #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip i{\r\n color: #000;\r\n font-size: 12px;\r\n margin-left: 5px;\r\n position: relative;\r\n top: 1px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer {\r\n position: absolute;\r\n display: flex;\r\n width: 100vw;\r\n bottom: 0;\r\n z-index: 10000;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\r\n position: absolute;\r\n bottom: 0;\r\n right: 0;\r\n height: 100%;\r\n width: 425px;\r\n max-width: 425px;\r\n background-color: white;\r\n border: 0px solid;\r\n padding: 20px 30px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide {\r\n background-color: rgba(0,0,0,.5);\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--st0{fill:#0075E6;}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--st1{fill:#6A819C;}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--st2{fill:#FFFFFF;}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n position: absolute;\r\n top: 2px;\r\n right: 510px;\r\n height: 38px;\r\n width: 38px;\r\n background-color: white;\r\n z-index: 11000;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--profile {\r\n padding: 5px 7px;\r\n background: #fff;\r\n border-radius: 50%;\r\n font-weight: 600;\r\n color: #1d5ab9;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchContainer {\r\n background: rgba(255, 255, 255, 0.40);\r\n backdrop-filter: blur(20px);\r\n position: absolute;\r\n top: 50px;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n z-index: 999;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper{\r\n position: absolute;\r\n z-index: 10000;\r\n height: 100vh;\r\n width: 100vw;\r\n background-color: rgba(0,0,0,.5);\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\r\n width: 425px;\r\n max-width: 425px;\r\n position: absolute;\r\n right: 0;\r\n /* height: calc(100vh - 100px); */\r\n /* padding: 15px; */\r\n background-color: white;\r\n overflow-y: auto;\r\n}\r\n\r\n@media only screen and (max-width: 1024px) {\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\r\n margin-right: 2px;\r\n }\r\n\r\n /* .searchIcon {\r\n margin-left: 5px;\r\n margin-right: 2px;\r\n }\r\n\r\n .searchIcon > div {\r\n margin-left: 2px;\r\n } */\r\n\r\n /* .userMenu {\r\n margin-left: 3px !important;\r\n margin-right: 3px !important;\r\n } */\r\n\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\r\n margin-left: 3px !important;\r\n margin-right: 3px !important;\r\n }\r\n\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\r\n margin-left: 2px;\r\n }\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--sideBarWrapper\r\n{\r\n position: absolute;\r\n z-index: 10000;\r\n height: 100vh;\r\n top: 100px;\r\n width: 100vw;\r\n background-color: rgba(0,0,0,.5);\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv\r\n{\r\n width: 425px;\r\n max-width: 425px;\r\n position: absolute;\r\n right: 0;\r\n /* height: calc(100vh - 100px); */\r\n background-color: white;\r\n overflow-y: auto;\r\n padding: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar {\r\n width: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-track {\r\n background: #f1f1f1;\r\n border-radius: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb {\r\n background-color: #888;\r\n border-radius: 10px;\r\n border: 3px solid #f1f1f1;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb:hover {\r\n background-color: #555;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeader{\r\n font-size: 24px;\r\n font-weight: 700;\r\n padding-bottom: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsWrapper{\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\r\n background-color: #ef5350;\r\n color: white;\r\n font-size: 12px;\r\n width: 1rem;\r\n border-radius: 50%;\r\n position: absolute;\r\n top: -5px;\r\n left: 11px;\r\n height: 1rem;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--twoChars {\r\n width: 1.1rem;\r\n height: 1.1rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--threeChars {\r\n width: 1.3rem;\r\n height: 1.3rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--notificationIconWrapper {\r\n cursor: pointer;\r\n margin-left: 12px;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 11px solid white;\r\n position: absolute;\r\n bottom: -13px;\r\n right: 5px;\r\n}\r\n\r\n/* .arrowTipContainer.ideaNoteArrow {\r\n right: 16px;\r\n} */\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpArrow {\r\n right: 3px;\r\n bottom: -10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--profileArrow {\r\n bottom: -12px;\r\n right: 8px;\r\n border-left: 7px solid transparent;\r\n border-right: 7px solid transparent;\r\n border-bottom: 10px solid white;\r\n}\r\n\r\n@media (max-width: 1366px) {\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\r\n width: 400px;\r\n max-width: 400px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\r\n width: 400px;\r\n max-width: 400px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\r\n width: 400px;\r\n max-width: 400px;\r\n}\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\r\n width: 85%;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\r\n left: 12px;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\r\n right: 5px;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\r\n width: 85% !important;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer iframe {\r\n width: 85% !important;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\r\n display: none;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\r\n width: 85%;\r\n }\r\n}";
|
|
21350
|
+
var css_248z$m = ".utilities_ops-app-frame_AppBarComponent_AppBar--root {\r\n background-color: var(--blue);\r\n background-color: var(--blue);\r\n height: 48px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n white-space: nowrap;\r\n /* padding-top: env(safe-area-inset-top, 0px); */\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--leftItems {\r\n width: 100%;\r\n display: flex;\r\n justify-content: start;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarIcons {\r\n margin: 0 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogo {\r\n display: flex;\r\n align-items: center;\r\n flex-direction: column;\r\n margin-left: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogoNew {\r\n display: flex;\r\n margin: 3px 0 0 16px;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--moduleName {\r\n color: white;\r\n font-size: 11px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items {\r\n color: white;\r\n cursor: pointer;\r\n font-size: 18px;\r\n display: flex;\r\n justify-content: center;\r\n margin: 8px !important;\r\n position: relative;\r\n width: 25px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--logout {\r\n margin-right: 24px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items i {\r\n color: #fff;\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--lightBulbIcon i {\r\n color: #ffff00;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--language {\r\n width: auto;\r\n grid-gap: 4px;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n display: flex;\r\n font-size: 14px;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard {\r\n width: auto;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n background: #fff;\r\n color: #1D5AB9;\r\n font-weight: 600;\r\n border-radius: 4px;\r\n font-size: 14px;\r\n grid-gap: 8px;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n padding: 2px 8px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard span i {\r\n color: #1D5AB9;\r\n font-size: 16px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard .utilities_ops-app-frame_AppBarComponent_AppBar--yardNumber {\r\n font-size: 14px;\r\n font-weight: 400;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col {\r\n display: flex;\r\n color: white;\r\n font-size: 13px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col svg {\r\n color: white;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\r\n width: 6rem;\r\n margin-top: 0rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--text {\r\n margin-top: 0.6rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--iconText {\r\n margin-top: 0.4rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchBar,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--placeholderDiv {\r\n margin-top: -0.2rem;\r\n margin-left: 2rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarLeft > img.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\r\n display: inline;\r\n display: initial;\r\n}\r\n\r\n@font-face {\r\n font-family: 'Open Sans';\r\n font-style: italic;\r\n font-weight: 600;\r\n src: url(https://fonts.gstatic.com/s/opensans/v18/memnYaGs126MiZpBA-UFUKXGUdhmIqOjjg.woff2)\r\n format('woff2');\r\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--appTitle {\r\n color: #fff;\r\n font-family: 'Open Sans', sans-serif;\r\n font-weight: 600;\r\n font-style: italic;\r\n font-size: 14px;\r\n position: relative;\r\n left: 16px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--item {\r\n display: flex;\r\n color: white;\r\n font-size: 13px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon {\r\n /* margin-left: 10px;\r\n margin-right: 7px; */\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n background: #fff;\r\n color: #1D5AB9;\r\n font-weight: 600;\r\n border-radius: 4px;\r\n box-shadow: inset 0px -2px 0px rgba(0, 0, 0, 0.4), 0px 1.6px 3.6px 0px rgba(0, 0, 0, 0.13), 0px 0.3px 0.9px 0px rgba(0, 0, 0, 0.10);\r\n font-size: 14px;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin: 0 8px;\r\n padding: 6px 20px 7px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span {\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span i {\r\n font-size: 18px;\r\n color: #1D5AB9;\r\n}\r\n\r\n/* .searchIcon > div {\r\n margin-left: 7px;\r\n} */\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper i {\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper span {\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault {\r\n color: white;\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\r\n background-color: white;\r\n border-radius: 20px;\r\n margin: 5px;\r\n padding: 0px 10px;\r\n height: 25px;\r\n font-weight: bold;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--light {\r\n border: 1px solid #1d5ab9;\r\n justify-content: flex-start;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightDefault {\r\n color: black;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\r\n background-color: white;\r\n border-radius: 20px;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\r\n color: green;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable i {\r\n color: green;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline {\r\n color: red;\r\n margin: 5px 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline svg {\r\n margin-right: 5px;\r\n margin-left: 5px;\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--SpinnerWrapper {\r\n margin-left: 5px;\r\n display: inline-flex;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i {\r\n font-size: 16px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i {\r\n line-height: unset;\r\n font-size: 16px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable {\r\n color: green;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\r\n color: red;\r\n}\r\n\r\n/* .userMenu {\r\n margin-left: 10px !important;\r\n margin-right: 5px !important;\r\n} */\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\r\n margin: 8px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\r\n margin-left: 7px;\r\n font-size: 14px;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--feedback {\r\n margin: 0 !important;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--overflowItems {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button {\r\n cursor: pointer;\r\n position: relative;\r\n top: -2px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button i {\r\n color: #fff;\r\n font-size: 22px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpDot {\r\n background-color: #ef5350;\r\n border-radius: 50%;\r\n position: absolute;\r\n top: 3px;\r\n left: 13px;\r\n width: 10px;\r\n height: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip{\r\n position: absolute;\r\n background: #fff;\r\n padding: 8px;\r\n right: 30px;\r\n top: -2px;\r\n border-radius: 2px;\r\n font-weight: 400;\r\n font-size: 12px;\r\n cursor: auto;\r\n color: #000;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip::before{\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 100%;\r\n margin-top: -5px;\r\n border-width: 5px;\r\n border-style: solid;\r\n border-color: transparent transparent transparent #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip i{\r\n color: #000;\r\n font-size: 12px;\r\n margin-left: 5px;\r\n position: relative;\r\n top: 1px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer {\r\n position: absolute;\r\n display: flex;\r\n width: 100vw;\r\n bottom: 0;\r\n z-index: 10000;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\r\n position: absolute;\r\n bottom: 0;\r\n right: 0;\r\n height: 100%;\r\n width: 425px;\r\n max-width: 425px;\r\n background-color: white;\r\n border: 0px solid;\r\n padding: 20px 30px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide {\r\n background-color: rgba(0,0,0,.5);\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--st0{fill:#0075E6;}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--st1{fill:#6A819C;}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--st2{fill:#FFFFFF;}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n position: absolute;\r\n top: 2px;\r\n right: 510px;\r\n height: 38px;\r\n width: 38px;\r\n background-color: white;\r\n z-index: 11000;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--profile {\r\n padding: 5px 7px;\r\n background: #fff;\r\n border-radius: 50%;\r\n font-weight: 600;\r\n color: #1d5ab9;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchContainer {\r\n background: rgba(255, 255, 255, 0.40);\r\n backdrop-filter: blur(20px);\r\n position: absolute;\r\n top: 50px;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n z-index: 999;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper{\r\n position: absolute;\r\n z-index: 10000;\r\n height: 100vh;\r\n width: 100vw;\r\n background-color: rgba(0,0,0,.5);\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\r\n width: 425px;\r\n max-width: 425px;\r\n position: absolute;\r\n right: 0;\r\n /* height: calc(100vh - 100px); */\r\n /* padding: 15px; */\r\n background-color: white;\r\n overflow-y: auto;\r\n}\r\n\r\n@media only screen and (max-width: 1024px) {\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\r\n margin-right: 2px;\r\n }\r\n\r\n /* .searchIcon {\r\n margin-left: 5px;\r\n margin-right: 2px;\r\n }\r\n\r\n .searchIcon > div {\r\n margin-left: 2px;\r\n } */\r\n\r\n /* .userMenu {\r\n margin-left: 3px !important;\r\n margin-right: 3px !important;\r\n } */\r\n\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\r\n margin-left: 3px !important;\r\n margin-right: 3px !important;\r\n }\r\n\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\r\n margin-left: 2px;\r\n }\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--sideBarWrapper\r\n{\r\n position: absolute;\r\n z-index: 10000;\r\n height: 100vh;\r\n top: 100px;\r\n width: 100vw;\r\n background-color: rgba(0,0,0,.5);\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv\r\n{\r\n width: 425px;\r\n max-width: 425px;\r\n position: absolute;\r\n right: 0;\r\n /* height: calc(100vh - 100px); */\r\n background-color: white;\r\n overflow-y: hidden;\r\n padding: 10px;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar {\r\n width: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-track {\r\n background: #f1f1f1;\r\n border-radius: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb {\r\n background-color: #888;\r\n border-radius: 10px;\r\n border: 3px solid #f1f1f1;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb:hover {\r\n background-color: #555;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeader{\r\n font-size: 24px;\r\n font-weight: 700;\r\n padding-bottom: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsWrapper{\r\n flex: 1;\r\n min-height: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\r\n background-color: #ef5350;\r\n color: white;\r\n font-size: 12px;\r\n width: 1rem;\r\n border-radius: 50%;\r\n position: absolute;\r\n top: -5px;\r\n left: 11px;\r\n height: 1rem;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--twoChars {\r\n width: 1.1rem;\r\n height: 1.1rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--threeChars {\r\n width: 1.3rem;\r\n height: 1.3rem;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--notificationIconWrapper {\r\n cursor: pointer;\r\n margin-left: 12px;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 11px solid white;\r\n position: absolute;\r\n bottom: -13px;\r\n right: 5px;\r\n}\r\n\r\n/* .arrowTipContainer.ideaNoteArrow {\r\n right: 16px;\r\n} */\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpArrow {\r\n right: 3px;\r\n bottom: -10px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--profileArrow {\r\n bottom: -12px;\r\n right: 8px;\r\n border-left: 7px solid transparent;\r\n border-right: 7px solid transparent;\r\n border-bottom: 10px solid white;\r\n}\r\n\r\n@media (max-width: 1366px) {\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\r\n width: 400px;\r\n max-width: 400px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\r\n width: 400px;\r\n max-width: 400px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\r\n width: 400px;\r\n max-width: 400px;\r\n}\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\r\n width: 85%;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\r\n left: 12px;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\r\n right: 5px;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\r\n width: 85% !important;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer iframe {\r\n width: 85% !important;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\r\n display: none;\r\n }\r\n .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\r\n width: 85%;\r\n }\r\n}";
|
|
21323
21351
|
styleInject(css_248z$m);
|
|
21324
21352
|
|
|
21325
21353
|
var LogOutMenu = function LogOutMenu(_ref) {
|
|
@@ -21546,7 +21574,7 @@ var MobileMenu = function MobileMenu(props) {
|
|
|
21546
21574
|
var css_248z$j = ".utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogo {\r\n max-width: 80px;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogoNew {\r\n max-width: 120px;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--logoLink {\r\n line-height: 0;\r\n}\r\n";
|
|
21547
21575
|
styleInject(css_248z$j);
|
|
21548
21576
|
|
|
21549
|
-
var _styleModuleImportMap$
|
|
21577
|
+
var _styleModuleImportMap$9 = {
|
|
21550
21578
|
"./CopartLogo.css": {
|
|
21551
21579
|
"CopartLogo": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogo",
|
|
21552
21580
|
"CopartLogoNew": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogoNew",
|
|
@@ -21562,7 +21590,7 @@ var CopartLogo = function CopartLogo() {
|
|
|
21562
21590
|
href: "/"
|
|
21563
21591
|
}, /*#__PURE__*/React__namespace.createElement("img", {
|
|
21564
21592
|
src: imageSrc,
|
|
21565
|
-
className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$
|
|
21593
|
+
className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$9, {
|
|
21566
21594
|
"handleMissingStyleName": "warn"
|
|
21567
21595
|
})
|
|
21568
21596
|
}));
|
|
@@ -21767,7 +21795,7 @@ var unEscapeChars = function unEscapeChars(str) {
|
|
|
21767
21795
|
var css_248z$i = ".utilities_ops-app-frame_Help_Help--backdrop {\r\n position: absolute;\r\n z-index: 10000;\r\n height: 100vh;\r\n top: 48px;\r\n width: 100vw;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--miHelpSideBar {\r\n width: 425px;\r\n max-width: 425px;\r\n position: absolute;\r\n right: 0;\r\n height: calc(100vh - 48px);\r\n padding: 15px;\r\n background-color: white;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n color: #323130;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--miHelpSideBar::-webkit-scrollbar {\r\n width: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--miHelpSideBar::-webkit-scrollbar-track {\r\n background: #f1f1f1;\r\n border-radius: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--miHelpSideBar::-webkit-scrollbar-thumb {\r\n background-color: #888;\r\n border-radius: 10px;\r\n border: 3px solid #f1f1f1;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--miHelpSideBar::-webkit-scrollbar-thumb:hover {\r\n background-color: #555;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--title {\r\n font-weight: 600;\r\n font-size: 28px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--header {\r\n margin-bottom: 10px;\r\n display: flex;\r\n justify-content: space-between;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--header .utilities_ops-app-frame_Help_Help--close,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--close {\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--header .utilities_ops-app-frame_Help_Help--close i,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--close i {\r\n font-size: 14px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--subHeader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--subHeaderTitle {\r\n font-weight: 600;\r\n font-size: 20px;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--subHeaderTitle .utilities_ops-app-frame_Help_Help--back {\r\n color: #1d5ab9;\r\n margin-right: 5px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--link {\r\n font-weight: 400;\r\n font-size: 14px;\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--link i {\r\n font-size: 10px;\r\n position: relative;\r\n top: -5px;\r\n left: 3px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper {\r\n margin-top: 20px;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper h3,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper h3 i {\r\n color: #1d5ab9;\r\n font-size: 10px;\r\n position: relative;\r\n top: -8px;\r\n cursor: pointer;\r\n left: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul {\r\n list-style: none;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul li,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul li {\r\n font-weight: 400;\r\n font-size: 14px;\r\n margin: 6px 0;\r\n display: flex;\r\n cursor: pointer;\r\n width: -webkit-fit-content;\r\n width: -moz-fit-content;\r\n width: fit-content;\r\n align-items: flex-start;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul li:hover,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul li:hover {\r\n color: #1d5ab9;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul li img,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul li img {\r\n width: 17px;\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper .utilities_ops-app-frame_Help_Help--viewMore {\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n font-weight: 400;\r\n font-size: 14px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchWrapper {\r\n width: 100%;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchWrapper span {\r\n position: absolute;\r\n width: 29px;\r\n height: 29px;\r\n background: #f3f2f1;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n bottom: 1.5px;\r\n right: 2px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--mihelpSearch {\r\n width: 100%;\r\n margin-top: 15px;\r\n padding: 0px 10px;\r\n height: 32px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n margin-top: 8px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper .utilities_ops-app-frame_Help_Help--searchResult {\r\n width: 100%;\r\n margin-top: 20px;\r\n border-bottom: 1px solid #dcdcdc;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper .utilities_ops-app-frame_Help_Help--searchResult p {\r\n margin-top: 13px;\r\n margin-bottom: 30px;\r\n text-overflow: ellipsis;\r\n width: 100%;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--spinnerWrapper {\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--spinnerWrapper svg {\r\n position: absolute;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--overFlowHidden {\r\n overflow: hidden;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--nonInteractive {\r\n opacity: 0.3;\r\n pointer-events: none;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitlewrapper {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeswrapper {\r\n color: #cbcbcb;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--like {\r\n margin-left: 10px;\r\n font-size: 10px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--like i {\r\n font-size: 14px;\r\n margin-right: 2px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle {\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle img {\r\n width: 18px;\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle span {\r\n font-weight: 600;\r\n font-size: 18px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle span:hover {\r\n color: #1d5ab9;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper {\r\n width: 100%;\r\n margin-top: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper h3 {\r\n font-weight: 300;\r\n font-size: 34px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper .utilities_ops-app-frame_Help_Help--faqsList {\r\n width: 100%;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper .utilities_ops-app-frame_Help_Help--category {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper .utilities_ops-app-frame_Help_Help--category h3 {\r\n color: #1d5ab9;\r\n font-weight: 600;\r\n font-size: 24px;\r\n margin-top: 18px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian {\r\n border-top: 1px solid #dcdcdc;\r\n padding-top: 13px;\r\n margin-top: 18px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian .utilities_ops-app-frame_Help_Help--question {\r\n font-weight: 400;\r\n font-size: 20px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian .utilities_ops-app-frame_Help_Help--question span {\r\n transition: all 0.2s ease-out;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian .utilities_ops-app-frame_Help_Help--answer {\r\n font-weight: 400;\r\n font-size: 14px;\r\n height: auto;\r\n max-height: 0;\r\n transition: max-height 0.2s ease-out;\r\n overflow: hidden;\r\n margin-top: 13px;\r\n white-space: normal;\r\n}\r\n\r\n/* .accordian .answer span {\r\n white-space: break-spaces;\r\n } */\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNote {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNote h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n margin-top: 13px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNote .utilities_ops-app-frame_Help_Help--releaseNoteContent {\r\n margin-top: 10px;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpArticle {\r\n width: 100%;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpArticle h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n margin-top: 13px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpArticle .utilities_ops-app-frame_Help_Help--helpArticleWrapper {\r\n margin-top: 10px;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--articleFooter {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-top: 30px;\r\n padding-bottom: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper {\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--likeTxt {\r\n font-weight: 600;\r\n font-size: 14px;\r\n margin-right: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--thanksText {\r\n color: rgb(45, 206, 137);\r\n font-weight: bold;\r\n font-size: 16px;\r\n margin-left: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper textarea {\r\n width: 300px;\r\n height: 100px;\r\n resize: none;\r\n display: block;\r\n margin-bottom: 11px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper h5 {\r\n font-size: 18px;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper span {\r\n background-color: rgb(29, 90, 185);\r\n color: #fff;\r\n padding: 6px 12px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n color: #2dce89;\r\n margin-right: 6px;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper svg {\r\n border: 1px solid #2dce89 !important;\r\n padding: 5px;\r\n height: 30px;\r\n width: 30px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper.utilities_ops-app-frame_Help_Help--active svg,\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper svg:hover {\r\n background-color: #2dce89;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper.utilities_ops-app-frame_Help_Help--active svg path,\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper svg:hover path {\r\n fill: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dislike {\r\n color: #f5365c !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dislike svg {\r\n border: 1px solid #f5365c !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dislike.utilities_ops-app-frame_Help_Help--active svg,\r\n.utilities_ops-app-frame_Help_Help--dislike svg:hover {\r\n background-color: #f5365c !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dateWrapper {\r\n font-style: italic;\r\n /* font-weight: 700; */\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dateWrapper b {\r\n font-weight: 700;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dateWrapper span {\r\n font-weight: 400;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper {\r\n width: 100%;\r\n border-top: 1px solid #edebe9;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper {\r\n width: 100%;\r\n border: 1px solid #dcdcdc;\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n margin-top: 50px;\r\n position: relative;\r\n text-align: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper.utilities_ops-app-frame_Help_Help--noFlex {\r\n display: block;\r\n text-align: left;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper h2 {\r\n font-size: 34px !important;\r\n margin-bottom: 6px !important;\r\n margin-top: 0 !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper p {\r\n font-size: 14px !important;\r\n margin-bottom: 3px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper p img {\r\n position: relative;\r\n top: 2px;\r\n margin-left: 2px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--submitBtn {\r\n background-color: #1d5ab9;\r\n color: #fff;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n font-size: 12px;\r\n cursor: pointer;\r\n margin-top: 7px;\r\n border-radius: 2px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--submitBtn.utilities_ops-app-frame_Help_Help--disable {\r\n pointer-events: none;\r\n cursor: default;\r\n background-color: #ccc;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--close {\r\n position: absolute;\r\n top: 0px;\r\n right: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper h3 {\r\n font-weight: 800 !important;\r\n font-size: 20px !important;\r\n line-height: 27px !important;\r\n color: #1d5ab9 !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--CategoryWrapper,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--questionWrapper {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--CategoryWrapper label,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--questionWrapper label {\r\n font-weight: 600;\r\n font-size: 14px;\r\n color: #000100;\r\n margin: 10px 0;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--questionWrapper textarea {\r\n resize: none;\r\n height: 125px;\r\n margin-bottom: 20px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--highlightRed {\r\n font-weight: 600;\r\n color: #f5365c;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--successMsg {\r\n color: #1d5ab9;\r\n font-size: 20px !important;\r\n margin-top: 12px;\r\n margin-bottom: 20px !important;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent {\r\n max-width: 700px;\r\n min-width: 600px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader {\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n background: #edebe9;\r\n padding: 10px 20px;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogBody {\r\n padding: 20px 20px 30px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader h3 {\r\n font-weight: 600;\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader span {\r\n font-weight: 600;\r\n font-size: 14px;\r\n -webkit-text-decoration-line: underline;\r\n text-decoration-line: underline;\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader span i {\r\n font-size: 10px;\r\n position: relative;\r\n top: -6px;\r\n right: -1px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive {\r\n padding: 22px;\r\n background-color: #1d5ab9;\r\n color: #fff;\r\n font-size: 32px !important;\r\n width: 100% !important;\r\n border-radius: 10px;\r\n align-items: center !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive:hover{\r\n color: #fff !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive img {\r\n width: 65px !important;\r\n margin-right: 25px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive .utilities_ops-app-frame_Help_Help--releaseTitle {\r\n flex: 1;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive .utilities_ops-app-frame_Help_Help--checkNow {\r\n font-weight: 700;\r\n font-size: 14px;\r\n align-self: end;\r\n}\r\n\r\n@media (max-width: 1366px) {\r\n .utilities_ops-app-frame_Help_Help--miHelpSideBar {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 767px) {\r\n .utilities_ops-app-frame_Help_Help--miHelpSideBar {\r\n width: 85%;\r\n }\r\n}\r\n";
|
|
21768
21796
|
styleInject(css_248z$i);
|
|
21769
21797
|
|
|
21770
|
-
var _styleModuleImportMap$
|
|
21798
|
+
var _styleModuleImportMap$8 = {
|
|
21771
21799
|
"../Help.css": {
|
|
21772
21800
|
"backdrop": "utilities_ops-app-frame_Help_Help--backdrop",
|
|
21773
21801
|
"miHelpSideBar": "utilities_ops-app-frame_Help_Help--miHelpSideBar",
|
|
@@ -21854,7 +21882,7 @@ var ArticleSection = function ArticleSection(_ref) {
|
|
|
21854
21882
|
onClick: function onClick() {
|
|
21855
21883
|
return clickhandler(viewMapper[articleDetails.type], article);
|
|
21856
21884
|
},
|
|
21857
|
-
className: _getClassName(highlightRelease ? 'releaseNoteActive' : '', _styleModuleImportMap$
|
|
21885
|
+
className: _getClassName(highlightRelease ? 'releaseNoteActive' : '', _styleModuleImportMap$8, {
|
|
21858
21886
|
"handleMissingStyleName": "warn"
|
|
21859
21887
|
})
|
|
21860
21888
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
@@ -21977,7 +22005,7 @@ styleInject(css_248z$f);
|
|
|
21977
22005
|
var css_248z$e = "/**\n * Colors\n */\n/**\n * Breakpoints & Media Queries\n */\n/**\n * SCSS Variables.\n *\n * Please use variables from this sheet to ensure consistency across the UI.\n * Don't add to this sheet unless you're pretty sure the value will be reused in many places.\n * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.\n */\n/**\n * Colors\n */\n/**\n * Fonts & basic variables.\n */\n/**\n * Grid System.\n * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/\n */\n/**\n * Dimensions.\n */\n/**\n * Shadows.\n */\n/**\n * Editor widths.\n */\n/**\n * Block & Editor UI.\n */\n/**\n * Block paddings.\n */\n/**\n * React Native specific.\n * These variables do not appear to be used anywhere else.\n */\n/**\n* Converts a hex value into the rgb equivalent.\n*\n* @param {string} hex - the hexadecimal value to convert\n* @return {string} comma separated rgb values\n*/\n/**\n * Breakpoint mixins\n */\n/**\n * Long content fade mixin\n *\n * Creates a fading overlay to signify that the content is longer\n * than the space allows.\n */\n/**\n * Focus styles.\n */\n/**\n * Applies editor left position to the selector passed as argument\n */\n/**\n * Styles that are reused verbatim in a few places\n */\n/**\n * Allows users to opt-out of animations via OS-level preferences.\n */\n/**\n * Reset default styles for JavaScript UI based pages.\n * This is a WP-admin agnostic reset\n */\n/**\n * Reset the WP Admin page styles for Gutenberg-like pages.\n */\n#start-resizable-editor-section {\n display: none;\n}\n\n.wp-block-audio figcaption {\n color: #555;\n font-size: 13px;\n text-align: center;\n}\n.is-dark-theme .wp-block-audio figcaption {\n color: rgba(255, 255, 255, 0.65);\n}\n\n.wp-block-code {\n font-family: Menlo, Consolas, monaco, monospace;\n color: #1e1e1e;\n padding: 0.8em 1em;\n border: 1px solid #ddd;\n border-radius: 4px;\n}\n\n.wp-block-embed figcaption {\n color: #555;\n font-size: 13px;\n text-align: center;\n}\n.is-dark-theme .wp-block-embed figcaption {\n color: rgba(255, 255, 255, 0.65);\n}\n\n.blocks-gallery-caption {\n color: #555;\n font-size: 13px;\n text-align: center;\n}\n.is-dark-theme .blocks-gallery-caption {\n color: rgba(255, 255, 255, 0.65);\n}\n\n.wp-block-image figcaption {\n color: #555;\n font-size: 13px;\n text-align: center;\n}\n.is-dark-theme .wp-block-image figcaption {\n color: rgba(255, 255, 255, 0.65);\n}\n\n.wp-block-pullquote {\n border-top: 4px solid currentColor;\n border-bottom: 4px solid currentColor;\n margin-bottom: 1.75em;\n color: currentColor;\n}\n.wp-block-pullquote cite,\n.wp-block-pullquote footer, .wp-block-pullquote__citation {\n color: currentColor;\n text-transform: uppercase;\n font-size: 0.8125em;\n font-style: normal;\n}\n\n.wp-block-quote {\n border-left: 0.25em solid currentColor;\n margin: 0 0 1.75em 0;\n padding-left: 1em;\n}\n.wp-block-quote cite,\n.wp-block-quote footer {\n color: currentColor;\n font-size: 0.8125em;\n position: relative;\n font-style: normal;\n}\n.wp-block-quote.has-text-align-right {\n border-left: none;\n border-right: 0.25em solid currentColor;\n padding-left: 0;\n padding-right: 1em;\n}\n.wp-block-quote.has-text-align-center {\n border: none;\n padding-left: 0;\n}\n.wp-block-quote.is-style-large, .wp-block-quote.is-large {\n border: none;\n}\n\n.wp-block-search .wp-block-search__label {\n font-weight: bold;\n}\n\n.wp-block-group.has-background {\n padding: 1.25em 2.375em;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.wp-block-separator {\n border: none;\n border-bottom: 2px solid currentColor;\n margin-left: auto;\n margin-right: auto;\n opacity: 0.4;\n}\n.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {\n width: 100px;\n}\n.wp-block-separator.has-background:not(.is-style-dots) {\n border-bottom: none;\n height: 1px;\n}\n.wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots) {\n height: 2px;\n}\n\n.wp-block-table thead {\n border-bottom: 3px solid;\n}\n.wp-block-table tfoot {\n border-top: 3px solid;\n}\n.wp-block-table td,\n.wp-block-table th {\n padding: 0.5em;\n border: 1px solid;\n word-break: normal;\n}\n.wp-block-table figcaption {\n color: #555;\n font-size: 13px;\n text-align: center;\n}\n.is-dark-theme .wp-block-table figcaption {\n color: rgba(255, 255, 255, 0.65);\n}\n\n.wp-block-video figcaption {\n color: #555;\n font-size: 13px;\n text-align: center;\n}\n.is-dark-theme .wp-block-video figcaption {\n color: rgba(255, 255, 255, 0.65);\n}\n\n.wp-block-template-part.has-background {\n padding: 1.25em 2.375em;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n#end-resizable-editor-section {\n display: none;\n}";
|
|
21978
22006
|
styleInject(css_248z$e);
|
|
21979
22007
|
|
|
21980
|
-
var _styleModuleImportMap$
|
|
22008
|
+
var _styleModuleImportMap$7 = {
|
|
21981
22009
|
"../wordpressStyles.css": {
|
|
21982
22010
|
"helpArticleContent": "utilities_ops-app-frame_Help_wordpressStyles--helpArticleContent",
|
|
21983
22011
|
"sr-only": "utilities_ops-app-frame_Help_wordpressStyles--sr-only",
|
|
@@ -22010,7 +22038,7 @@ function HelpArticleContent(_ref) {
|
|
|
22010
22038
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22011
22039
|
className: "utilities_ops-app-frame_Help_wordpressStyles--helpArticleContent"
|
|
22012
22040
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22013
|
-
className: "elementor-kit-38 " + _getClassName(showQuestionSection ? 'nonInteractive' : '', _styleModuleImportMap$
|
|
22041
|
+
className: "elementor-kit-38 " + _getClassName(showQuestionSection ? 'nonInteractive' : '', _styleModuleImportMap$7, {
|
|
22014
22042
|
"handleMissingStyleName": "warn"
|
|
22015
22043
|
})
|
|
22016
22044
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -22062,7 +22090,7 @@ var Dislike = function Dislike() {
|
|
|
22062
22090
|
}));
|
|
22063
22091
|
};
|
|
22064
22092
|
|
|
22065
|
-
var _styleModuleImportMap$
|
|
22093
|
+
var _styleModuleImportMap$6 = {
|
|
22066
22094
|
"../Help.css": {
|
|
22067
22095
|
"backdrop": "utilities_ops-app-frame_Help_Help--backdrop",
|
|
22068
22096
|
"miHelpSideBar": "utilities_ops-app-frame_Help_Help--miHelpSideBar",
|
|
@@ -22163,7 +22191,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22163
22191
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22164
22192
|
className: "utilities_ops-app-frame_Help_Help--helpArticle"
|
|
22165
22193
|
}, /*#__PURE__*/React__default["default"].createElement("h3", {
|
|
22166
|
-
className: _getClassName(showQuestionSection ? 'nonInteractive' : '', _styleModuleImportMap$
|
|
22194
|
+
className: _getClassName(showQuestionSection ? 'nonInteractive' : '', _styleModuleImportMap$6, {
|
|
22167
22195
|
"handleMissingStyleName": "warn"
|
|
22168
22196
|
})
|
|
22169
22197
|
}, currentArticle.title), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -22172,7 +22200,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22172
22200
|
article: currentArticle,
|
|
22173
22201
|
showQuestionSection: showQuestionSection
|
|
22174
22202
|
}, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22175
|
-
className: _getClassName("articleFooter ".concat(showQuestionSection ? 'nonInteractive' : ''), _styleModuleImportMap$
|
|
22203
|
+
className: _getClassName("articleFooter ".concat(showQuestionSection ? 'nonInteractive' : ''), _styleModuleImportMap$6, {
|
|
22176
22204
|
"handleMissingStyleName": "warn"
|
|
22177
22205
|
})
|
|
22178
22206
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -22180,7 +22208,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22180
22208
|
}, !currentArticle.showFeedback ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !currentArticle.showThanksText ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
22181
22209
|
className: "utilities_ops-app-frame_Help_Help--likeTxt"
|
|
22182
22210
|
}, "Was this useful?") : null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
22183
|
-
className: _getClassName("likebtnWrapper ".concat(currentArticle.liked ? 'active' : ''), _styleModuleImportMap$
|
|
22211
|
+
className: _getClassName("likebtnWrapper ".concat(currentArticle.liked ? 'active' : ''), _styleModuleImportMap$6, {
|
|
22184
22212
|
"handleMissingStyleName": "warn"
|
|
22185
22213
|
})
|
|
22186
22214
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -22188,7 +22216,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22188
22216
|
return likeHandler(currentArticle);
|
|
22189
22217
|
}
|
|
22190
22218
|
}, /*#__PURE__*/React__default["default"].createElement(Like, null)), /*#__PURE__*/React__default["default"].createElement("span", null, currentArticle.likes)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
22191
|
-
className: _getClassName("likebtnWrapper dislike ".concat(currentArticle.disliked ? 'active' : ''), _styleModuleImportMap$
|
|
22219
|
+
className: _getClassName("likebtnWrapper dislike ".concat(currentArticle.disliked ? 'active' : ''), _styleModuleImportMap$6, {
|
|
22192
22220
|
"handleMissingStyleName": "warn"
|
|
22193
22221
|
})
|
|
22194
22222
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -22216,7 +22244,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22216
22244
|
}, "Skip")))), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
22217
22245
|
className: "utilities_ops-app-frame_Help_Help--dateWrapper"
|
|
22218
22246
|
}, /*#__PURE__*/React__default["default"].createElement("b", null, "Last updated on:"), ' ', /*#__PURE__*/React__default["default"].createElement("span", null, currentArticle.updatedDate ? formatPublishDate(currentArticle.updatedDate) : null))), currentArticle.relatedHelpResources && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22219
|
-
className: _getClassName("relatedResourcesWrapper ".concat(showQuestionSection ? 'nonInteractive' : ''), _styleModuleImportMap$
|
|
22247
|
+
className: _getClassName("relatedResourcesWrapper ".concat(showQuestionSection ? 'nonInteractive' : ''), _styleModuleImportMap$6, {
|
|
22220
22248
|
"handleMissingStyleName": "warn"
|
|
22221
22249
|
})
|
|
22222
22250
|
}, /*#__PURE__*/React__default["default"].createElement("h3", null, "Related Help Resources"), /*#__PURE__*/React__default["default"].createElement("ul", null, currentArticle.relatedHelpResources.map(function (article) {
|
|
@@ -22229,7 +22257,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22229
22257
|
}), article.post_title);
|
|
22230
22258
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22231
22259
|
ref: questionSectionRef,
|
|
22232
|
-
className: _getClassName("submitQuestionWrapper ".concat(showQuestionSection && !showSuccessSection ? 'noFlex' : ''), _styleModuleImportMap$
|
|
22260
|
+
className: _getClassName("submitQuestionWrapper ".concat(showQuestionSection && !showSuccessSection ? 'noFlex' : ''), _styleModuleImportMap$6, {
|
|
22233
22261
|
"handleMissingStyleName": "warn"
|
|
22234
22262
|
})
|
|
22235
22263
|
}, !showQuestionSection ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("h2", null, "Got more questions?"), /*#__PURE__*/React__default["default"].createElement("p", null, "If these resources are not enough to satisfy your queries then"), /*#__PURE__*/React__default["default"].createElement("p", null, /*#__PURE__*/React__default["default"].createElement("b", null, "Feel free to submit your question here.")), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -22288,7 +22316,7 @@ var HelpArticle = function HelpArticle(_ref) {
|
|
|
22288
22316
|
}
|
|
22289
22317
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
22290
22318
|
onClick: questionSubmitHandler,
|
|
22291
|
-
className: _getClassName("submitBtn ".concat(!question.length || category === 'selectCategory' ? 'disable' : ''), _styleModuleImportMap$
|
|
22319
|
+
className: _getClassName("submitBtn ".concat(!question.length || category === 'selectCategory' ? 'disable' : ''), _styleModuleImportMap$6, {
|
|
22292
22320
|
"handleMissingStyleName": "warn"
|
|
22293
22321
|
})
|
|
22294
22322
|
}, "Submit")) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
@@ -22422,7 +22450,7 @@ var ReleaseNote = function ReleaseNote(_ref) {
|
|
|
22422
22450
|
})));
|
|
22423
22451
|
};
|
|
22424
22452
|
|
|
22425
|
-
var _styleModuleImportMap$
|
|
22453
|
+
var _styleModuleImportMap$5 = {
|
|
22426
22454
|
"./Help.css": {
|
|
22427
22455
|
"backdrop": "utilities_ops-app-frame_Help_Help--backdrop",
|
|
22428
22456
|
"miHelpSideBar": "utilities_ops-app-frame_Help_Help--miHelpSideBar",
|
|
@@ -23037,7 +23065,7 @@ var HelpSideBar = function HelpSideBar(_ref) {
|
|
|
23037
23065
|
height: "calc(100dvh - ".concat(notifications !== null && notifications !== void 0 && notifications.length ? sideBarTopValue : 48, "px)")
|
|
23038
23066
|
},
|
|
23039
23067
|
ref: mihelpRef,
|
|
23040
|
-
className: _getClassName("miHelpSideBar ".concat(!helpContent || isChrome() && overFlowHidden || !isChrome() && showQuestionSection ? 'overFlowHidden' : ''), _styleModuleImportMap$
|
|
23068
|
+
className: _getClassName("miHelpSideBar ".concat(!helpContent || isChrome() && overFlowHidden || !isChrome() && showQuestionSection ? 'overFlowHidden' : ''), _styleModuleImportMap$5, {
|
|
23041
23069
|
"handleMissingStyleName": "warn"
|
|
23042
23070
|
})
|
|
23043
23071
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -23079,7 +23107,7 @@ var HelpSideBar = function HelpSideBar(_ref) {
|
|
|
23079
23107
|
name: "open_in_new",
|
|
23080
23108
|
variant: "material"
|
|
23081
23109
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23082
|
-
className: _getClassName("searchWrapper ".concat(showQuestionSection ? 'nonInteractive' : ''), _styleModuleImportMap$
|
|
23110
|
+
className: _getClassName("searchWrapper ".concat(showQuestionSection ? 'nonInteractive' : ''), _styleModuleImportMap$5, {
|
|
23083
23111
|
"handleMissingStyleName": "warn"
|
|
23084
23112
|
})
|
|
23085
23113
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
@@ -23481,7 +23509,7 @@ var RoleSelector$2 = function RoleSelector(_ref) {
|
|
|
23481
23509
|
}));
|
|
23482
23510
|
};
|
|
23483
23511
|
|
|
23484
|
-
var _excluded$
|
|
23512
|
+
var _excluded$4 = ["selectedYard", "name", "handleChange", "yardOptions", "label"];
|
|
23485
23513
|
var getDescription = function getDescription(yardOptions) {
|
|
23486
23514
|
return function (code) {
|
|
23487
23515
|
return yardOptions[code].yard_number;
|
|
@@ -23497,7 +23525,7 @@ var YardNumberMenu$2 = function YardNumberMenu(_ref) {
|
|
|
23497
23525
|
handleChange = _ref.handleChange,
|
|
23498
23526
|
yardOptions = _ref.yardOptions,
|
|
23499
23527
|
label = _ref.label,
|
|
23500
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
23528
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
23501
23529
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23502
23530
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--col-1-1"
|
|
23503
23531
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, _extends$1({}, otherProps, {
|
|
@@ -24441,14 +24469,14 @@ var HierarchyMenu = function HierarchyMenu(props) {
|
|
|
24441
24469
|
});
|
|
24442
24470
|
};
|
|
24443
24471
|
|
|
24444
|
-
var _excluded$
|
|
24472
|
+
var _excluded$3 = ["value", "handleChange", "yardOptions", "label", "disabled"];
|
|
24445
24473
|
var YardNumberMenu$1 = function YardNumberMenu(_ref) {
|
|
24446
24474
|
var value = _ref.value,
|
|
24447
24475
|
handleChange = _ref.handleChange,
|
|
24448
24476
|
yardOptions = _ref.yardOptions;
|
|
24449
24477
|
_ref.label;
|
|
24450
24478
|
var disabled = _ref.disabled,
|
|
24451
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
24479
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
24452
24480
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24453
24481
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--col-1-1"
|
|
24454
24482
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, _extends$1({}, otherProps, {
|
|
@@ -25536,7 +25564,7 @@ var SettingsView = /*#__PURE__*/function (_React$Component) {
|
|
|
25536
25564
|
}]);
|
|
25537
25565
|
}(React__default["default"].Component);
|
|
25538
25566
|
|
|
25539
|
-
var css_248z$9 = ".utilities_ops-announcements_Banner--appBarContentBox {\r\n word-break: break-all;\r\n white-space: pre-wrap;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContent {\r\n padding: 10px 10px;\r\n font-size: 13px;\r\n width: 95%;\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 20px;\r\n gap: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBar {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n width: 90%;\r\n font-size: 12px;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBar b {\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\r\n color: white;\r\n width: 26px;\r\n min-height: 26px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n /* font-weight: 600; */\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n color: #201f1e;\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox * {\r\n display: inline;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox a {\r\n text-decoration: underline;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n width: 95%;\r\n /* font-weight: 600; */\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n padding: 5px 5px;\r\n min-height: 20px;\r\n padding: 4px 5px 3px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox b {\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox i {\r\n font-size: 20px !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n font-size: 12px;\r\n align-items: center;\r\n padding: 0px 10px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i {\r\n position: relative;\r\n right: -4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationCountContainer {\r\n width: 50px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer {\r\n display: flex;\r\n flex-direction: row;\r\n /* padding: 10px 10px; */\r\n grid-gap: 5px;\r\n gap: 5px;\r\n min-height: 40px;\r\n width: 100%;\r\n /* padding-top: env(safe-area-inset-top, 0px);\r\n position: sticky;\r\n top: 0; */\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar.utilities_ops-announcements_Banner--notificationContainer {\r\n padding: 8px 6px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox {\r\n color: white;\r\n width: 52px;\r\n min-height: 52px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationInfoBox {\r\n color: white;\r\n width: 20px;\r\n height: 20px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-right: 6px;\r\n}\r\n.utilities_ops-announcements_Banner--notificationBarBtn {\r\n width: 52px;\r\n min-height: 52px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn {\r\n width: auto;\r\n min-height: auto;\r\n align-items: flex-start;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer i {\r\n font-size: 22px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn i {\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\r\n flex-direction: column;\r\n /* padding: 10px 10px; */\r\n grid-gap: 0px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar i {\r\n font-size: 13px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 13px solid white;\r\n position: absolute;\r\n top: 51px;\r\n right: 50px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding-right: 10px;\r\n font-size: 12px;\r\n flex: 1 1 0%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 4px;\r\n gap: 4px;\r\n margin-top: 5px;\r\n max-width: 100%;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding-left: 10px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper b {\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--feedUrl {\r\n text-decoration: none !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--feedUrl i {\r\n font-size: 14px;\r\n cursor: pointer;\r\n color: #1d5ab9;\r\n left: 2px;\r\n position: relative;\r\n top: 2px;\r\n margin-right: 3px;\r\n}\r\n\r\n@media (max-width: 1760px) {\r\n .utilities_ops-announcements_Banner--notificationBarContent input {\r\n width: 331px !important;\r\n }\r\n}\r\n";
|
|
25567
|
+
var css_248z$9 = ".utilities_ops-announcements_Banner--appBarContentBox {\r\n word-break: break-word;\r\n word-wrap: anywhere;\r\n white-space: pre-wrap;\r\n font-weight: 600;\r\n max-width: 100%;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContent {\r\n padding: 10px 10px;\r\n font-size: 13px;\r\n width: 95%;\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 20px;\r\n gap: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBar {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n width: 90%;\r\n font-size: 12px;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBar b {\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\r\n color: white;\r\n width: 26px;\r\n min-height: 26px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n /* font-weight: 600; */\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n color: #201f1e;\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox * {\r\n display: inline;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox a {\r\n text-decoration: underline;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n width: 95%;\r\n /* font-weight: 600; */\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n padding: 5px 5px;\r\n min-height: 20px;\r\n padding: 4px 5px 3px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox b {\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox i {\r\n font-size: 20px !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n font-size: 12px;\r\n align-items: center;\r\n padding: 0px 10px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i {\r\n position: relative;\r\n right: -4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationCountContainer {\r\n width: 50px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer {\r\n display: flex;\r\n flex-direction: row;\r\n /* padding: 10px 10px; */\r\n grid-gap: 5px;\r\n gap: 5px;\r\n min-height: 40px;\r\n width: 100%;\r\n /* padding-top: env(safe-area-inset-top, 0px);\r\n position: sticky;\r\n top: 0; */\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar.utilities_ops-announcements_Banner--notificationContainer {\r\n padding: 8px 6px;\r\n min-width: 0;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox {\r\n color: white;\r\n width: 52px;\r\n min-height: 52px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationInfoBox {\r\n color: white;\r\n width: 20px;\r\n height: 20px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-right: 6px;\r\n}\r\n.utilities_ops-announcements_Banner--notificationBarBtn {\r\n width: 52px;\r\n min-height: 52px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn {\r\n width: auto;\r\n min-height: auto;\r\n align-items: flex-start;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBtnContainer i {\r\n font-size: 22px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn i {\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\r\n flex-direction: column;\r\n /* padding: 10px 10px; */\r\n grid-gap: 0px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar i {\r\n font-size: 13px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 13px solid white;\r\n position: absolute;\r\n top: 51px;\r\n right: 50px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding-right: 10px;\r\n font-size: 12px;\r\n flex: 1 1 0%;\r\n min-width: 0;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 4px;\r\n gap: 4px;\r\n margin-top: 5px;\r\n max-width: 100%;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBarNotificationMeta {\r\n display: flex;\r\n flex-wrap: wrap;\r\n min-width: 0;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding-left: 10px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper b {\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--feedUrl {\r\n text-decoration: none !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--feedUrl i {\r\n font-size: 14px;\r\n cursor: pointer;\r\n color: #1d5ab9;\r\n left: 2px;\r\n position: relative;\r\n top: 2px;\r\n margin-right: 3px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroup {\r\n border: 1px solid #e1dfdd;\r\n border-radius: 8px;\r\n padding: 12px;\r\n margin-bottom: 12px;\r\n background-color: #ffffff;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupHeader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-bottom: 10px;\r\n min-height: 28px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupHeaderWithBack {\r\n position: relative;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupHeaderTitle {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationBackBtn {\r\n position: absolute;\r\n left: 0;\r\n top: 50%;\r\n -webkit-transform: translateY(-50%);\r\n transform: translateY(-50%);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0;\r\n margin: 0;\r\n border: none;\r\n background: none;\r\n color: #3261bd;\r\n cursor: pointer;\r\n width: 28px;\r\n height: 28px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationBackBtn i {\r\n font-size: 18px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIcon {\r\n width: 20px;\r\n height: 20px;\r\n -o-object-fit: contain;\r\n object-fit: contain;\r\n -webkit-filter: invert(24%) sepia(100%) saturate(1350%) hue-rotate(201deg) brightness(96%) contrast(93%);\r\n filter: invert(24%) sepia(100%) saturate(1350%) hue-rotate(201deg) brightness(96%) contrast(93%);\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 4px;\r\n background-color: #deecf9;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupAppName {\r\n color: #3261bd;\r\n color: var(--Type-Copart-Neue-Rest, #3261bd);\r\n font-family: 'Segoe UI', SegoeUI, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, sans-serif;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 600;\r\n line-height: 20px;\r\n text-transform: uppercase;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationGroupList {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRow {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n padding: 8px 10px;\r\n border-radius: 4px;\r\n min-height: 36px;\r\n min-width: 0;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowIcon {\r\n color: white;\r\n width: 20px;\r\n height: 20px;\r\n min-width: 20px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-top: 1px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowContent {\r\n flex: 1;\r\n min-width: 0;\r\n font-size: 12px;\r\n font-weight: 600;\r\n color: #201f1e;\r\n line-height: 1.35;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowText {\r\n word-break: break-word;\r\n word-wrap: anywhere;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowText * {\r\n display: inline;\r\n word-wrap: inherit;\r\n word-break: inherit;\r\n white-space: inherit;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowMeta {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-end;\r\n grid-gap: 4px;\r\n gap: 4px;\r\n flex-shrink: 0;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowLink {\r\n text-decoration: none;\r\n line-height: 1;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowLink i {\r\n font-size: 16px;\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationRowTime {\r\n font-size: 11px;\r\n color: #605e5c;\r\n font-weight: 400;\r\n white-space: nowrap;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationViewAll {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n width: 100%;\r\n margin-top: 10px;\r\n padding: 0;\r\n border: none;\r\n background: none;\r\n color: #0f4cab;\r\n font-size: 13px;\r\n font-weight: 600;\r\n line-height: 1;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--sideNotificationViewAll i {\r\n display: inline-flex;\r\n align-items: center;\r\n font-size: 16px;\r\n line-height: 1;\r\n}\r\n\r\n@media (max-width: 1760px) {\r\n .utilities_ops-announcements_Banner--notificationBarContent input {\r\n width: 331px !important;\r\n }\r\n}\r\n";
|
|
25540
25568
|
styleInject(css_248z$9);
|
|
25541
25569
|
|
|
25542
25570
|
function getViewedNotifications() {
|
|
@@ -25563,15 +25591,39 @@ function addNotificationToViewedList(notification) {
|
|
|
25563
25591
|
}
|
|
25564
25592
|
}
|
|
25565
25593
|
|
|
25566
|
-
|
|
25567
|
-
|
|
25568
|
-
|
|
25569
|
-
|
|
25570
|
-
|
|
25594
|
+
// Removes entries whose endsAt has already passed.
|
|
25595
|
+
// endsAt is stored as a UTC string without Z (e.g. '2024-01-15 14:30:00'),
|
|
25596
|
+
// matching the end_date_ts_utc format used in generateQuery's Solr filter.
|
|
25597
|
+
// Any entry with endsAt < now will never be returned by the API again, so it
|
|
25598
|
+
// can be safely dropped.
|
|
25599
|
+
function pruneExpiredViewedNotifications() {
|
|
25600
|
+
try {
|
|
25601
|
+
var viewed = getViewedNotifications();
|
|
25602
|
+
if (!viewed || _typeof$1(viewed) !== 'object' || Array.isArray(viewed)) return;
|
|
25603
|
+
var entries = Object.entries(viewed);
|
|
25604
|
+
if (!entries.length) return;
|
|
25605
|
+
var now = new Date();
|
|
25606
|
+
var pruned = Object.fromEntries(entries.filter(function (_ref) {
|
|
25607
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
25608
|
+
entry = _ref2[1];
|
|
25609
|
+
if (!entry || !entry.endsAt) return false;
|
|
25610
|
+
var endsAt = new Date(String(entry.endsAt).replace(' ', 'T') + 'Z');
|
|
25611
|
+
return !isNaN(endsAt.getTime()) && endsAt > now;
|
|
25612
|
+
}));
|
|
25613
|
+
// Skip the write if nothing was pruned to avoid unnecessary localStorage I/O
|
|
25614
|
+
if (Object.keys(pruned).length === entries.length) return;
|
|
25615
|
+
localStorage.setItem('viewedNotifications', JSON.stringify(pruned));
|
|
25616
|
+
} catch (err) {
|
|
25617
|
+
console.error(err);
|
|
25618
|
+
}
|
|
25571
25619
|
}
|
|
25572
|
-
|
|
25573
|
-
|
|
25574
|
-
|
|
25620
|
+
|
|
25621
|
+
// Parses a UTC date string like '2024-01-15 14:30:00' (no Z suffix) into a Date object.
|
|
25622
|
+
// startsAt/endsAt come from the API with the T and Z stripped, so we restore them here.
|
|
25623
|
+
function parseAsUTCDate(dateStr) {
|
|
25624
|
+
if (!dateStr) return null;
|
|
25625
|
+
var d = new Date(String(dateStr).replace(' ', 'T') + 'Z');
|
|
25626
|
+
return isNaN(d.getTime()) ? null : d;
|
|
25575
25627
|
}
|
|
25576
25628
|
var getLocalEndTime = function getLocalEndTime(notification) {
|
|
25577
25629
|
var endsAt = notification.endsAt,
|
|
@@ -25582,76 +25634,93 @@ var getLocalEndTime = function getLocalEndTime(notification) {
|
|
|
25582
25634
|
if (isRecipientTimeZone && endDateTimeZone !== 'UTC') {
|
|
25583
25635
|
return endsAt;
|
|
25584
25636
|
}
|
|
25585
|
-
|
|
25637
|
+
var d = parseAsUTCDate(endsAt);
|
|
25638
|
+
if (!d) return null;
|
|
25639
|
+
var pad = function pad(n) {
|
|
25640
|
+
return String(n).padStart(2, '0');
|
|
25641
|
+
};
|
|
25642
|
+
return "".concat(d.getFullYear(), "-").concat(pad(d.getMonth() + 1), "-").concat(pad(d.getDate()), " ").concat(pad(d.getHours()), ":").concat(pad(d.getMinutes()), ":").concat(pad(d.getSeconds()));
|
|
25586
25643
|
};
|
|
25587
25644
|
function filterOutExpiredNotifications(notifications) {
|
|
25645
|
+
var now = new Date();
|
|
25588
25646
|
return filter$1(function (_ref) {
|
|
25589
25647
|
var startsAt = _ref.startsAt,
|
|
25590
25648
|
endsAt = _ref.endsAt,
|
|
25591
25649
|
timeZoneType = _ref.timeZoneType,
|
|
25592
25650
|
endDateTimeZone = _ref.endDateTimeZone;
|
|
25593
|
-
var
|
|
25651
|
+
var isRecipientTZ = timeZoneType === 'Recipient TimeZone' || timeZoneType === 'RPTZ';
|
|
25652
|
+
var startDate = isRecipientTZ ? new Date(String(startsAt).replace(' ', 'T')) : parseAsUTCDate(startsAt);
|
|
25594
25653
|
var localEndTime = getLocalEndTime({
|
|
25595
25654
|
endsAt: endsAt,
|
|
25596
25655
|
timeZoneType: timeZoneType,
|
|
25597
25656
|
endDateTimeZone: endDateTimeZone
|
|
25598
25657
|
});
|
|
25599
|
-
if (!localEndTime) return false;
|
|
25600
|
-
|
|
25658
|
+
if (!localEndTime || !startDate) return false;
|
|
25659
|
+
var endDate = new Date(String(localEndTime).replace(' ', 'T'));
|
|
25660
|
+
return startDate < now && now < endDate;
|
|
25601
25661
|
})(notifications);
|
|
25602
25662
|
}
|
|
25603
|
-
function filterOutNotificationForOtherApps(notifications) {
|
|
25604
|
-
var currentApp = window.location.pathname === '/' ? 'home' : window.location.pathname;
|
|
25605
|
-
var tilesConfig = storage$2.getLocalItem('opsportal-core:config').tiles || [];
|
|
25606
|
-
var tile = tilesConfig.find(function (item) {
|
|
25607
|
-
return item.path === currentApp || "".concat(item.path, "/") === currentApp || currentApp.startsWith(item.path);
|
|
25608
|
-
}) || {};
|
|
25609
|
-
return notifications.filter(function (notification) {
|
|
25610
|
-
var targetApps = pathOr$1(null, ['targetAudience', 'targetApplications'])(notification);
|
|
25611
|
-
var apps = pathOr$1([], [0, 'applications'])(targetApps);
|
|
25612
|
-
if (currentApp === 'home') {
|
|
25613
|
-
return targetApps === null || apps.includes("Ops Home");
|
|
25614
|
-
} else {
|
|
25615
|
-
return targetApps === null || apps.includes(tile.title || '');
|
|
25616
|
-
}
|
|
25617
|
-
});
|
|
25618
|
-
}
|
|
25619
|
-
function filterOutNotificationByAudience(notifications) {
|
|
25620
|
-
var userEmail = storage$2.userEmail;
|
|
25621
|
-
var yardNumber = storage$2.activeYardNumber;
|
|
25622
|
-
// const countryCodes = window.location.hostname.includes('.com') ? ["USA", "CAN"] : ["ARE", "OMN", "BHR", "IRL", "GBR"]
|
|
25623
|
-
return notifications.filter(function (notification) {
|
|
25624
|
-
// if (!countryCodes.includes(notification.countryCode)) return false
|
|
25625
|
-
var targets = pathOr$1([], ['targetAudience', 'targets'], notification);
|
|
25626
|
-
if (!targets.length) return true;
|
|
25627
|
-
return targets.some(function (target) {
|
|
25628
|
-
switch (target.type) {
|
|
25629
|
-
case 'users':
|
|
25630
|
-
var usersList = pathOr$1([], ['emails'])(target);
|
|
25631
|
-
return usersList.includes(userEmail);
|
|
25632
|
-
case 'groups':
|
|
25633
|
-
var groups = pathOr$1([], ['groups'])(target);
|
|
25634
|
-
return groups.some(function (group) {
|
|
25635
|
-
var users = pathOr$1([], ['users'])(group);
|
|
25636
|
-
return users.includes(userEmail) || users.includes('*');
|
|
25637
|
-
});
|
|
25638
|
-
case 'yards':
|
|
25639
|
-
var yards = pathOr$1([], ['yards'], target);
|
|
25640
|
-
return yards.includes(yardNumber);
|
|
25641
|
-
default:
|
|
25642
|
-
return false;
|
|
25643
|
-
}
|
|
25644
|
-
});
|
|
25645
|
-
});
|
|
25646
|
-
}
|
|
25647
|
-
function filterOutInActiveNotification(notifications) {
|
|
25648
|
-
return notifications.filter(function (notification) {
|
|
25649
|
-
return (notification === null || notification === void 0 ? void 0 : notification.status) === 'A';
|
|
25650
|
-
});
|
|
25651
|
-
}
|
|
25652
25663
|
function filterNotifications(notifications) {
|
|
25653
25664
|
try {
|
|
25654
|
-
|
|
25665
|
+
var coreAppConfig = storage$2.getLocalItem('opsportal-core:config') || {};
|
|
25666
|
+
var filterByTargets = coreAppConfig.filterNotificationsByTargets;
|
|
25667
|
+
// filterOutViewedNotifications
|
|
25668
|
+
var viewedNotifications = getViewedNotifications();
|
|
25669
|
+
// filterOutExpiredNotifications
|
|
25670
|
+
var now = new Date();
|
|
25671
|
+
// filterOutNotificationByAudience — only when filterNotificationsByTargets is true;
|
|
25672
|
+
// otherwise audience/app filtering is handled by channel_names in Solr query
|
|
25673
|
+
var userEmail = filterByTargets ? storage$2.userEmail : null;
|
|
25674
|
+
var yardNumber = filterByTargets ? storage$2.activeYardNumber : null;
|
|
25675
|
+
// filterOutNotificationForOtherApps
|
|
25676
|
+
var currentApp = filterByTargets ? window.location.pathname === '/' ? 'home' : window.location.pathname : null;
|
|
25677
|
+
var tile = filterByTargets ? (coreAppConfig.tiles || []).find(function (item) {
|
|
25678
|
+
return item.path === currentApp || "".concat(item.path, "/") === currentApp || currentApp.startsWith(item.path);
|
|
25679
|
+
}) || {} : null;
|
|
25680
|
+
return notifications.filter(function (notification) {
|
|
25681
|
+
// filterOutInActiveNotification
|
|
25682
|
+
if ((notification === null || notification === void 0 ? void 0 : notification.status) !== 'A') return false;
|
|
25683
|
+
|
|
25684
|
+
// filterOutViewedNotifications
|
|
25685
|
+
if (viewedNotifications[notification.notificationId]) return false;
|
|
25686
|
+
|
|
25687
|
+
// filterOutExpiredNotifications
|
|
25688
|
+
var startsAt = notification.startsAt,
|
|
25689
|
+
endsAt = notification.endsAt,
|
|
25690
|
+
timeZoneType = notification.timeZoneType,
|
|
25691
|
+
endDateTimeZone = notification.endDateTimeZone;
|
|
25692
|
+
var isRecipientTZ = timeZoneType === 'Recipient TimeZone' || timeZoneType === 'RPTZ';
|
|
25693
|
+
var startDate = isRecipientTZ ? new Date(String(startsAt).replace(' ', 'T')) : parseAsUTCDate(startsAt);
|
|
25694
|
+
var endDate = !endsAt ? null : isRecipientTZ && endDateTimeZone !== 'UTC' ? new Date(String(endsAt).replace(' ', 'T')) : parseAsUTCDate(endsAt);
|
|
25695
|
+
if (!endDate || !startDate || !(startDate < now && now < endDate)) return false;
|
|
25696
|
+
if (filterByTargets) {
|
|
25697
|
+
// filterOutNotificationForOtherApps
|
|
25698
|
+
var targetApps = pathOr$1(null, ['targetAudience', 'targetApplications'])(notification);
|
|
25699
|
+
var apps = pathOr$1([], [0, 'applications'])(targetApps);
|
|
25700
|
+
var appMatch = currentApp === 'home' ? targetApps === null || apps.includes('Ops Home') : targetApps === null || apps.includes(tile.title || '');
|
|
25701
|
+
if (!appMatch) return false;
|
|
25702
|
+
|
|
25703
|
+
// filterOutNotificationByAudience
|
|
25704
|
+
var targets = pathOr$1([], ['targetAudience', 'targets'], notification);
|
|
25705
|
+
if (!targets.length) return true;
|
|
25706
|
+
return targets.some(function (target) {
|
|
25707
|
+
switch (target.type) {
|
|
25708
|
+
case 'users':
|
|
25709
|
+
return pathOr$1([], ['emails'])(target).includes(userEmail);
|
|
25710
|
+
case 'groups':
|
|
25711
|
+
return pathOr$1([], ['groups'])(target).some(function (group) {
|
|
25712
|
+
var users = pathOr$1([], ['users'])(group);
|
|
25713
|
+
return users.includes(userEmail) || users.includes('*');
|
|
25714
|
+
});
|
|
25715
|
+
case 'yards':
|
|
25716
|
+
return pathOr$1([], ['yards'], target).includes(yardNumber);
|
|
25717
|
+
default:
|
|
25718
|
+
return false;
|
|
25719
|
+
}
|
|
25720
|
+
});
|
|
25721
|
+
}
|
|
25722
|
+
return true;
|
|
25723
|
+
});
|
|
25655
25724
|
} catch (err) {
|
|
25656
25725
|
console.error(err);
|
|
25657
25726
|
return notifications;
|
|
@@ -25665,24 +25734,71 @@ function getPriorityCode(category) {
|
|
|
25665
25734
|
information: 1
|
|
25666
25735
|
}[category.toLowerCase()];
|
|
25667
25736
|
}
|
|
25668
|
-
|
|
25669
|
-
|
|
25670
|
-
var
|
|
25671
|
-
|
|
25672
|
-
|
|
25673
|
-
|
|
25674
|
-
|
|
25675
|
-
|
|
25737
|
+
var MAX_NOTIFICATIONS_PER_APP_GROUP = 5;
|
|
25738
|
+
function getAppTileIcon(sourceApplication) {
|
|
25739
|
+
var _storage$getLocalItem;
|
|
25740
|
+
if (!sourceApplication) return null;
|
|
25741
|
+
var tiles = ((_storage$getLocalItem = storage$2.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.tiles) || [];
|
|
25742
|
+
var normalized = sourceApplication.trim().toLowerCase();
|
|
25743
|
+
var tile = tiles.find(function (t) {
|
|
25744
|
+
return (t.title || '').trim().toLowerCase() === normalized || (t.appName || '').trim().toLowerCase() === normalized;
|
|
25745
|
+
});
|
|
25746
|
+
return tile ? tile.faIconUrl || tile.iconUrl : null;
|
|
25747
|
+
}
|
|
25748
|
+
function groupNotificationsByApp(notifications) {
|
|
25749
|
+
var maxPerGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MAX_NOTIFICATIONS_PER_APP_GROUP;
|
|
25750
|
+
var groupMap = new Map();
|
|
25751
|
+
var groupOrder = [];
|
|
25752
|
+
notifications.forEach(function (notification) {
|
|
25753
|
+
var appName = notification.sourceApplication || 'Other';
|
|
25754
|
+
if (!groupMap.has(appName)) {
|
|
25755
|
+
groupMap.set(appName, []);
|
|
25756
|
+
groupOrder.push(appName);
|
|
25757
|
+
}
|
|
25758
|
+
groupMap.get(appName).push(notification);
|
|
25759
|
+
});
|
|
25760
|
+
groupOrder.sort(function (a, b) {
|
|
25761
|
+
return a.localeCompare(b, undefined, {
|
|
25762
|
+
sensitivity: 'base'
|
|
25676
25763
|
});
|
|
25677
25764
|
});
|
|
25678
|
-
|
|
25679
|
-
|
|
25765
|
+
return groupOrder.map(function (appName) {
|
|
25766
|
+
var all = groupMap.get(appName);
|
|
25767
|
+
return {
|
|
25768
|
+
appName: appName,
|
|
25769
|
+
totalCount: all.length,
|
|
25770
|
+
notifications: all.slice(0, maxPerGroup),
|
|
25771
|
+
hasMore: all.length > maxPerGroup
|
|
25772
|
+
};
|
|
25773
|
+
});
|
|
25774
|
+
}
|
|
25775
|
+
function getExpandedAppGroup(notifications, appName) {
|
|
25776
|
+
var appNotifications = notifications.filter(function (notification) {
|
|
25777
|
+
return (notification.sourceApplication || 'Other') === appName;
|
|
25680
25778
|
});
|
|
25779
|
+
return {
|
|
25780
|
+
appName: appName,
|
|
25781
|
+
totalCount: appNotifications.length,
|
|
25782
|
+
notifications: appNotifications,
|
|
25783
|
+
hasMore: false
|
|
25784
|
+
};
|
|
25785
|
+
}
|
|
25786
|
+
function sortNotifications(notifications) {
|
|
25681
25787
|
try {
|
|
25682
|
-
return
|
|
25788
|
+
return _toConsumableArray(notifications).map(function (n) {
|
|
25789
|
+
var isRecipientTZ = n.timeZoneType === 'Recipient TimeZone' || n.timeZoneType === 'RPTZ';
|
|
25790
|
+
var startDate = isRecipientTZ ? new Date(String(n.startsAt).replace(' ', 'T')) : parseAsUTCDate(n.startsAt);
|
|
25791
|
+
return _objectSpread2(_objectSpread2({}, n), {}, {
|
|
25792
|
+
_startTimestamp: startDate ? startDate.getTime() : 0,
|
|
25793
|
+
_priorityCode: getPriorityCode(n.categoryDescription)
|
|
25794
|
+
});
|
|
25795
|
+
}).sort(function (a, b) {
|
|
25796
|
+
var priorityDiff = (a._priorityCode != null ? a._priorityCode : 99) - (b._priorityCode != null ? b._priorityCode : 99);
|
|
25797
|
+
return priorityDiff !== 0 ? priorityDiff : b._startTimestamp - a._startTimestamp;
|
|
25798
|
+
});
|
|
25683
25799
|
} catch (err) {
|
|
25684
25800
|
console.error(err);
|
|
25685
|
-
return
|
|
25801
|
+
return _toConsumableArray(notifications);
|
|
25686
25802
|
}
|
|
25687
25803
|
}
|
|
25688
25804
|
startsWith$1('http://');
|
|
@@ -25714,9 +25830,10 @@ var getTimeDiff = function getTimeDiff(startsAt) {
|
|
|
25714
25830
|
}
|
|
25715
25831
|
return '';
|
|
25716
25832
|
};
|
|
25833
|
+
var SANITIZE_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>|<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi;
|
|
25717
25834
|
var SanitizeNotificationContent = function SanitizeNotificationContent(str) {
|
|
25718
|
-
|
|
25719
|
-
return str.replace(
|
|
25835
|
+
SANITIZE_REGEX.lastIndex = 0;
|
|
25836
|
+
return str.replace(SANITIZE_REGEX, '');
|
|
25720
25837
|
};
|
|
25721
25838
|
|
|
25722
25839
|
var useWindowSize = function useWindowSize() {
|
|
@@ -25748,7 +25865,7 @@ var useWindowSize = function useWindowSize() {
|
|
|
25748
25865
|
return windowSize;
|
|
25749
25866
|
};
|
|
25750
25867
|
|
|
25751
|
-
var _excluded$
|
|
25868
|
+
var _excluded$2 = ["count", "current", "showNavButtons", "onLeftButtonClick", "onRightButtonClick", "saveActionComponentState", "ActionComponent", "notificationsTopContainerRef", "mobileNotificationsTopContainerRef", "setNotificationHeightFlag"];
|
|
25752
25869
|
var alertBackgroundColorMapping = {
|
|
25753
25870
|
alert: '#fab9b9',
|
|
25754
25871
|
warning: '#f5f5cb',
|
|
@@ -25817,12 +25934,13 @@ var Banner = function Banner(props) {
|
|
|
25817
25934
|
notificationsTopContainerRef = props.notificationsTopContainerRef,
|
|
25818
25935
|
mobileNotificationsTopContainerRef = props.mobileNotificationsTopContainerRef,
|
|
25819
25936
|
setNotificationHeightFlag = props.setNotificationHeightFlag,
|
|
25820
|
-
notification = _objectWithoutProperties(props, _excluded$
|
|
25937
|
+
notification = _objectWithoutProperties(props, _excluded$2);
|
|
25821
25938
|
var dismissibleFlag = notification.dismissibleFlag,
|
|
25822
25939
|
onDismiss = notification.onDismiss,
|
|
25823
25940
|
startsAt = notification.startsAt,
|
|
25824
25941
|
timeZoneType = notification.timeZoneType,
|
|
25825
25942
|
showSideBar = notification.showSideBar,
|
|
25943
|
+
isGroupedSideBar = notification.isGroupedSideBar,
|
|
25826
25944
|
action = notification.action,
|
|
25827
25945
|
content = notification.content,
|
|
25828
25946
|
sourceApplication = notification.sourceApplication,
|
|
@@ -25933,28 +26051,73 @@ var Banner = function Banner(props) {
|
|
|
25933
26051
|
variant: "material"
|
|
25934
26052
|
}))));
|
|
25935
26053
|
};
|
|
25936
|
-
var
|
|
26054
|
+
var categoryKey = categoryDescription.toLowerCase();
|
|
26055
|
+
var categoryColor = alertInfoColorMapping[categoryKey];
|
|
26056
|
+
var categoryBackground = alertBackgroundColorMapping[categoryKey];
|
|
26057
|
+
var groupedSideNotificationRow = function groupedSideNotificationRow() {
|
|
25937
26058
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25938
|
-
className: "utilities_ops-announcements_Banner--
|
|
26059
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRow",
|
|
25939
26060
|
style: {
|
|
25940
|
-
backgroundColor:
|
|
26061
|
+
backgroundColor: categoryBackground
|
|
25941
26062
|
}
|
|
25942
26063
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25943
|
-
className: "utilities_ops-announcements_Banner--
|
|
26064
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRowIcon",
|
|
25944
26065
|
style: {
|
|
25945
|
-
|
|
26066
|
+
backgroundColor: categoryColor
|
|
25946
26067
|
}
|
|
26068
|
+
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
26069
|
+
name: alertToIconMapping[categoryKey],
|
|
26070
|
+
style: {
|
|
26071
|
+
fontSize: '11px'
|
|
26072
|
+
}
|
|
26073
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26074
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRowContent"
|
|
25947
26075
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26076
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRowText",
|
|
26077
|
+
dangerouslySetInnerHTML: {
|
|
26078
|
+
__html: SanitizeNotificationContent(content)
|
|
26079
|
+
}
|
|
26080
|
+
}), action && ActionComponent && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25948
26081
|
style: {
|
|
25949
|
-
|
|
26082
|
+
marginTop: '4px'
|
|
26083
|
+
}
|
|
26084
|
+
}, /*#__PURE__*/React__default["default"].createElement(ActionComponent, {
|
|
26085
|
+
notification: notification,
|
|
26086
|
+
saveActionComponentState: saveActionComponentState
|
|
26087
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26088
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRowMeta"
|
|
26089
|
+
}, (feedUrl || link) && /*#__PURE__*/React__default["default"].createElement("a", {
|
|
26090
|
+
href: feedUrl || link,
|
|
26091
|
+
target: "_blank",
|
|
26092
|
+
rel: "noopener noreferrer",
|
|
26093
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRowLink"
|
|
26094
|
+
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Icon, {
|
|
26095
|
+
name: "open_in_new",
|
|
26096
|
+
variant: "material"
|
|
26097
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26098
|
+
className: "utilities_ops-announcements_Banner--sideNotificationRowTime"
|
|
26099
|
+
}, timeDiff)));
|
|
26100
|
+
};
|
|
26101
|
+
var sideNotificationBar = function sideNotificationBar() {
|
|
26102
|
+
return isGroupedSideBar ? groupedSideNotificationRow() : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26103
|
+
className: "utilities_ops-announcements_Banner--notificationContainer utilities_ops-announcements_Banner--sideBar",
|
|
26104
|
+
style: {
|
|
26105
|
+
backgroundColor: categoryBackground
|
|
26106
|
+
}
|
|
26107
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26108
|
+
className: "utilities_ops-announcements_Banner--appBarContentWrapper",
|
|
26109
|
+
style: {
|
|
26110
|
+
borderLeft: "2px solid ".concat(categoryColor)
|
|
25950
26111
|
}
|
|
26112
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26113
|
+
className: "utilities_ops-announcements_Banner--sideBarNotificationMeta"
|
|
25951
26114
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25952
26115
|
className: "utilities_ops-announcements_Banner--sideNotificationInfoBox",
|
|
25953
26116
|
style: {
|
|
25954
|
-
backgroundColor:
|
|
26117
|
+
backgroundColor: categoryColor
|
|
25955
26118
|
}
|
|
25956
26119
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
25957
|
-
name: alertToIconMapping[
|
|
26120
|
+
name: alertToIconMapping[categoryKey],
|
|
25958
26121
|
style: {
|
|
25959
26122
|
fontSize: '12px'
|
|
25960
26123
|
}
|
|
@@ -26084,11 +26247,138 @@ var Banner = function Banner(props) {
|
|
|
26084
26247
|
return mainNotificationBar();
|
|
26085
26248
|
};
|
|
26086
26249
|
|
|
26250
|
+
var _styleModuleImportMap$4 = {
|
|
26251
|
+
"./Banner.css": {
|
|
26252
|
+
"appBarContentBox": "utilities_ops-announcements_Banner--appBarContentBox",
|
|
26253
|
+
"notificationBarContent": "utilities_ops-announcements_Banner--notificationBarContent",
|
|
26254
|
+
"tabNotificationInfoBar": "utilities_ops-announcements_Banner--tabNotificationInfoBar",
|
|
26255
|
+
"tabNotificationInfoBox": "utilities_ops-announcements_Banner--tabNotificationInfoBox",
|
|
26256
|
+
"notificationBarContentBox": "utilities_ops-announcements_Banner--notificationBarContentBox",
|
|
26257
|
+
"tabNotificationBarContentBox": "utilities_ops-announcements_Banner--tabNotificationBarContentBox",
|
|
26258
|
+
"notificationInfoBox": "utilities_ops-announcements_Banner--notificationInfoBox",
|
|
26259
|
+
"notificationBtnContainer": "utilities_ops-announcements_Banner--notificationBtnContainer",
|
|
26260
|
+
"notificationLeftBtn": "utilities_ops-announcements_Banner--notificationLeftBtn",
|
|
26261
|
+
"notificationCountContainer": "utilities_ops-announcements_Banner--notificationCountContainer",
|
|
26262
|
+
"notificationContainer": "utilities_ops-announcements_Banner--notificationContainer",
|
|
26263
|
+
"sideBar": "utilities_ops-announcements_Banner--sideBar",
|
|
26264
|
+
"sideNotificationInfoBox": "utilities_ops-announcements_Banner--sideNotificationInfoBox",
|
|
26265
|
+
"notificationBarBtn": "utilities_ops-announcements_Banner--notificationBarBtn",
|
|
26266
|
+
"tabNotificationBar": "utilities_ops-announcements_Banner--tabNotificationBar",
|
|
26267
|
+
"arrowTipContainer": "utilities_ops-announcements_Banner--arrowTipContainer",
|
|
26268
|
+
"appBarContentWrapper": "utilities_ops-announcements_Banner--appBarContentWrapper",
|
|
26269
|
+
"sideBarNotificationMeta": "utilities_ops-announcements_Banner--sideBarNotificationMeta",
|
|
26270
|
+
"feedUrl": "utilities_ops-announcements_Banner--feedUrl",
|
|
26271
|
+
"sideNotificationGroup": "utilities_ops-announcements_Banner--sideNotificationGroup",
|
|
26272
|
+
"sideNotificationGroupHeader": "utilities_ops-announcements_Banner--sideNotificationGroupHeader",
|
|
26273
|
+
"sideNotificationGroupHeaderWithBack": "utilities_ops-announcements_Banner--sideNotificationGroupHeaderWithBack",
|
|
26274
|
+
"sideNotificationGroupHeaderTitle": "utilities_ops-announcements_Banner--sideNotificationGroupHeaderTitle",
|
|
26275
|
+
"sideNotificationBackBtn": "utilities_ops-announcements_Banner--sideNotificationBackBtn",
|
|
26276
|
+
"sideNotificationGroupAppIcon": "utilities_ops-announcements_Banner--sideNotificationGroupAppIcon",
|
|
26277
|
+
"sideNotificationGroupAppIconPlaceholder": "utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder",
|
|
26278
|
+
"sideNotificationGroupAppName": "utilities_ops-announcements_Banner--sideNotificationGroupAppName",
|
|
26279
|
+
"sideNotificationGroupList": "utilities_ops-announcements_Banner--sideNotificationGroupList",
|
|
26280
|
+
"sideNotificationRow": "utilities_ops-announcements_Banner--sideNotificationRow",
|
|
26281
|
+
"sideNotificationRowIcon": "utilities_ops-announcements_Banner--sideNotificationRowIcon",
|
|
26282
|
+
"sideNotificationRowContent": "utilities_ops-announcements_Banner--sideNotificationRowContent",
|
|
26283
|
+
"sideNotificationRowText": "utilities_ops-announcements_Banner--sideNotificationRowText",
|
|
26284
|
+
"sideNotificationRowMeta": "utilities_ops-announcements_Banner--sideNotificationRowMeta",
|
|
26285
|
+
"sideNotificationRowLink": "utilities_ops-announcements_Banner--sideNotificationRowLink",
|
|
26286
|
+
"sideNotificationRowTime": "utilities_ops-announcements_Banner--sideNotificationRowTime",
|
|
26287
|
+
"sideNotificationViewAll": "utilities_ops-announcements_Banner--sideNotificationViewAll"
|
|
26288
|
+
}
|
|
26289
|
+
};
|
|
26290
|
+
var SideNotificationGroup = function SideNotificationGroup(_ref) {
|
|
26291
|
+
var appName = _ref.appName,
|
|
26292
|
+
totalCount = _ref.totalCount,
|
|
26293
|
+
notifications = _ref.notifications,
|
|
26294
|
+
hasMore = _ref.hasMore,
|
|
26295
|
+
showBackButton = _ref.showBackButton,
|
|
26296
|
+
onBack = _ref.onBack,
|
|
26297
|
+
onViewAll = _ref.onViewAll,
|
|
26298
|
+
_onDismiss = _ref.onDismiss,
|
|
26299
|
+
ActionComponent = _ref.ActionComponent,
|
|
26300
|
+
saveActionComponentState = _ref.saveActionComponentState;
|
|
26301
|
+
var appIconUrl = getAppTileIcon(appName);
|
|
26302
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26303
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroup"
|
|
26304
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26305
|
+
className: _getClassName("sideNotificationGroupHeader".concat(showBackButton ? ' sideNotificationGroupHeaderWithBack' : ''), _styleModuleImportMap$4, {
|
|
26306
|
+
"handleMissingStyleName": "warn"
|
|
26307
|
+
})
|
|
26308
|
+
}, showBackButton && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
26309
|
+
type: "button",
|
|
26310
|
+
className: "utilities_ops-announcements_Banner--sideNotificationBackBtn",
|
|
26311
|
+
onClick: onBack,
|
|
26312
|
+
"aria-label": "Back to all apps"
|
|
26313
|
+
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
26314
|
+
name: "angle-left"
|
|
26315
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26316
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupHeaderTitle"
|
|
26317
|
+
}, appIconUrl ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
26318
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppIcon",
|
|
26319
|
+
src: appIconUrl,
|
|
26320
|
+
alt: ""
|
|
26321
|
+
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26322
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder"
|
|
26323
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26324
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppName"
|
|
26325
|
+
}, appName, " (", totalCount, ")"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26326
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupList"
|
|
26327
|
+
}, notifications.map(function (notification) {
|
|
26328
|
+
return /*#__PURE__*/React__default["default"].createElement(Banner, _extends$1({
|
|
26329
|
+
key: notification.notificationId
|
|
26330
|
+
}, notification, {
|
|
26331
|
+
showSideBar: true,
|
|
26332
|
+
isGroupedSideBar: true,
|
|
26333
|
+
onDismiss: function onDismiss() {
|
|
26334
|
+
return _onDismiss(notification);
|
|
26335
|
+
},
|
|
26336
|
+
ActionComponent: ActionComponent,
|
|
26337
|
+
saveActionComponentState: saveActionComponentState
|
|
26338
|
+
}));
|
|
26339
|
+
})), hasMore && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
26340
|
+
type: "button",
|
|
26341
|
+
className: "utilities_ops-announcements_Banner--sideNotificationViewAll",
|
|
26342
|
+
onClick: onViewAll
|
|
26343
|
+
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Icon, {
|
|
26344
|
+
name: "open_in_new",
|
|
26345
|
+
variant: "material"
|
|
26346
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", null, "View all")));
|
|
26347
|
+
};
|
|
26348
|
+
|
|
26349
|
+
var ESTIMATED_ITEM_HEIGHT = 80;
|
|
26350
|
+
var ESTIMATED_GROUP_HEIGHT = 320;
|
|
26351
|
+
var OVERSCAN = 3;
|
|
26352
|
+
function buildOffsets(count, itemHeights) {
|
|
26353
|
+
var defaultHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ESTIMATED_ITEM_HEIGHT;
|
|
26354
|
+
var offsets = new Array(count + 1);
|
|
26355
|
+
offsets[0] = 0;
|
|
26356
|
+
for (var i = 0; i < count; i++) {
|
|
26357
|
+
offsets[i + 1] = offsets[i] + (itemHeights[i] || defaultHeight) + 12;
|
|
26358
|
+
}
|
|
26359
|
+
return offsets;
|
|
26360
|
+
}
|
|
26361
|
+
|
|
26362
|
+
// Binary search: find the last index whose offset is <= scrollTop
|
|
26363
|
+
function findStartIndex(offsets, scrollTop) {
|
|
26364
|
+
var lo = 0;
|
|
26365
|
+
var hi = offsets.length - 2;
|
|
26366
|
+
while (lo < hi) {
|
|
26367
|
+
var mid = lo + hi + 1 >> 1;
|
|
26368
|
+
if (offsets[mid] <= scrollTop) {
|
|
26369
|
+
lo = mid;
|
|
26370
|
+
} else {
|
|
26371
|
+
hi = mid - 1;
|
|
26372
|
+
}
|
|
26373
|
+
}
|
|
26374
|
+
return lo;
|
|
26375
|
+
}
|
|
26087
26376
|
var Notifications = function Notifications(_ref) {
|
|
26088
26377
|
var notifications = _ref.notifications,
|
|
26089
26378
|
_onDismiss = _ref.onDismiss;
|
|
26090
26379
|
_ref.children;
|
|
26091
26380
|
var showSideBar = _ref.showSideBar,
|
|
26381
|
+
sidebarOpen = _ref.sidebarOpen,
|
|
26092
26382
|
ActionComponent = _ref.ActionComponent,
|
|
26093
26383
|
saveActionComponentState = _ref.saveActionComponentState,
|
|
26094
26384
|
notificationsTopContainerRef = _ref.notificationsTopContainerRef,
|
|
@@ -26102,18 +26392,131 @@ var Notifications = function Notifications(_ref) {
|
|
|
26102
26392
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
26103
26393
|
last = _useState4[0],
|
|
26104
26394
|
setLast = _useState4[1];
|
|
26395
|
+
var _useState5 = React.useState(null),
|
|
26396
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
26397
|
+
expandedAppName = _useState6[0],
|
|
26398
|
+
setExpandedAppName = _useState6[1];
|
|
26399
|
+
var scrollRef = React.useRef(null);
|
|
26400
|
+
var itemHeightsRef = React.useRef({});
|
|
26401
|
+
var _useState7 = React.useState(0),
|
|
26402
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
26403
|
+
scrollTop = _useState8[0],
|
|
26404
|
+
setScrollTop = _useState8[1];
|
|
26105
26405
|
var onLeftButtonClick = function onLeftButtonClick() {
|
|
26106
26406
|
return i === 0 ? setI(last) : setI(i - 1);
|
|
26107
26407
|
};
|
|
26108
26408
|
var onRightButtonClick = function onRightButtonClick() {
|
|
26109
26409
|
return i === last ? setI(0) : setI(i + 1);
|
|
26110
26410
|
};
|
|
26411
|
+
var resetSidebarView = React.useCallback(function () {
|
|
26412
|
+
setExpandedAppName(null);
|
|
26413
|
+
itemHeightsRef.current = {};
|
|
26414
|
+
setScrollTop(0);
|
|
26415
|
+
if (scrollRef.current) {
|
|
26416
|
+
scrollRef.current.scrollTop = 0;
|
|
26417
|
+
}
|
|
26418
|
+
}, []);
|
|
26111
26419
|
React.useEffect(function () {
|
|
26112
26420
|
if (notifications.length && notifications.length - 1 < i) {
|
|
26113
26421
|
setI(notifications.length - 1);
|
|
26114
26422
|
}
|
|
26115
26423
|
setLast(notifications.length - 1);
|
|
26424
|
+
itemHeightsRef.current = {};
|
|
26425
|
+
if (expandedAppName) {
|
|
26426
|
+
var stillHasApp = notifications.some(function (n) {
|
|
26427
|
+
return (n.sourceApplication || 'Other') === expandedAppName;
|
|
26428
|
+
});
|
|
26429
|
+
if (!stillHasApp) {
|
|
26430
|
+
setExpandedAppName(null);
|
|
26431
|
+
}
|
|
26432
|
+
}
|
|
26116
26433
|
}, [notifications]);
|
|
26434
|
+
React.useEffect(function () {
|
|
26435
|
+
if (sidebarOpen === false) {
|
|
26436
|
+
resetSidebarView();
|
|
26437
|
+
}
|
|
26438
|
+
}, [sidebarOpen, resetSidebarView]);
|
|
26439
|
+
|
|
26440
|
+
// Virtualizer state for the sidebar list
|
|
26441
|
+
var _useState9 = React.useState(600),
|
|
26442
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
26443
|
+
viewportHeight = _useState0[0],
|
|
26444
|
+
setViewportHeight = _useState0[1];
|
|
26445
|
+
var rafPendingRef = React.useRef(false);
|
|
26446
|
+
var _useState1 = React.useState(0),
|
|
26447
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
26448
|
+
forceUpdate = _useState10[1];
|
|
26449
|
+
React.useEffect(function () {
|
|
26450
|
+
var el = scrollRef.current;
|
|
26451
|
+
if (!el) return;
|
|
26452
|
+
var handleScroll = function handleScroll() {
|
|
26453
|
+
return setScrollTop(el.scrollTop);
|
|
26454
|
+
};
|
|
26455
|
+
var ro = new ResizeObserver(function (entries) {
|
|
26456
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
26457
|
+
_step;
|
|
26458
|
+
try {
|
|
26459
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
26460
|
+
var entry = _step.value;
|
|
26461
|
+
setViewportHeight(entry.contentRect.height);
|
|
26462
|
+
}
|
|
26463
|
+
} catch (err) {
|
|
26464
|
+
_iterator.e(err);
|
|
26465
|
+
} finally {
|
|
26466
|
+
_iterator.f();
|
|
26467
|
+
}
|
|
26468
|
+
});
|
|
26469
|
+
el.addEventListener('scroll', handleScroll, {
|
|
26470
|
+
passive: true
|
|
26471
|
+
});
|
|
26472
|
+
ro.observe(el);
|
|
26473
|
+
return function () {
|
|
26474
|
+
el.removeEventListener('scroll', handleScroll);
|
|
26475
|
+
ro.disconnect();
|
|
26476
|
+
};
|
|
26477
|
+
}, [showSideBar]);
|
|
26478
|
+
|
|
26479
|
+
// Ref callback: measures rendered item height and triggers a rAF-batched re-render
|
|
26480
|
+
// when the measured height differs from the cached value.
|
|
26481
|
+
var measureItem = React.useCallback(function (index) {
|
|
26482
|
+
return function (node) {
|
|
26483
|
+
if (!node) return;
|
|
26484
|
+
var height = node.getBoundingClientRect().height;
|
|
26485
|
+
if (itemHeightsRef.current[index] === height) return;
|
|
26486
|
+
itemHeightsRef.current[index] = height;
|
|
26487
|
+
if (!rafPendingRef.current) {
|
|
26488
|
+
rafPendingRef.current = true;
|
|
26489
|
+
requestAnimationFrame(function () {
|
|
26490
|
+
rafPendingRef.current = false;
|
|
26491
|
+
forceUpdate(function (n) {
|
|
26492
|
+
return n + 1;
|
|
26493
|
+
});
|
|
26494
|
+
});
|
|
26495
|
+
}
|
|
26496
|
+
};
|
|
26497
|
+
}, []);
|
|
26498
|
+
var count = notifications.length;
|
|
26499
|
+
var notificationGroups = showSideBar ? expandedAppName ? [getExpandedAppGroup(notifications, expandedAppName)] : groupNotificationsByApp(notifications) : [];
|
|
26500
|
+
var handleViewAll = function handleViewAll(appName) {
|
|
26501
|
+
itemHeightsRef.current = {};
|
|
26502
|
+
setExpandedAppName(appName);
|
|
26503
|
+
setScrollTop(0);
|
|
26504
|
+
if (scrollRef.current) {
|
|
26505
|
+
scrollRef.current.scrollTop = 0;
|
|
26506
|
+
}
|
|
26507
|
+
};
|
|
26508
|
+
var handleBackToAllApps = function handleBackToAllApps() {
|
|
26509
|
+
resetSidebarView();
|
|
26510
|
+
};
|
|
26511
|
+
var virtualListCount = showSideBar ? notificationGroups.length : count;
|
|
26512
|
+
var estimatedHeight = showSideBar ? ESTIMATED_GROUP_HEIGHT : ESTIMATED_ITEM_HEIGHT;
|
|
26513
|
+
var offsets = buildOffsets(virtualListCount, itemHeightsRef.current, estimatedHeight);
|
|
26514
|
+
var totalHeight = offsets[virtualListCount];
|
|
26515
|
+
var rawStart = findStartIndex(offsets, scrollTop);
|
|
26516
|
+
var startIdx = Math.max(0, rawStart - OVERSCAN);
|
|
26517
|
+
var endRaw = rawStart;
|
|
26518
|
+
while (endRaw < virtualListCount && offsets[endRaw] < scrollTop + viewportHeight) endRaw++;
|
|
26519
|
+
var endIdx = Math.min(virtualListCount - 1, endRaw + OVERSCAN);
|
|
26117
26520
|
var notification = notifications[i];
|
|
26118
26521
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !isNil$2(notification) && !showSideBar ? /*#__PURE__*/React__default["default"].createElement(Banner, _extends$1({
|
|
26119
26522
|
current: i + 1,
|
|
@@ -26131,21 +26534,48 @@ var Notifications = function Notifications(_ref) {
|
|
|
26131
26534
|
notificationsTopContainerRef: notificationsTopContainerRef,
|
|
26132
26535
|
mobileNotificationsTopContainerRef: mobileNotificationsTopContainerRef,
|
|
26133
26536
|
setNotificationHeightFlag: setNotificationHeightFlag
|
|
26134
|
-
})) : null,
|
|
26135
|
-
|
|
26136
|
-
|
|
26137
|
-
|
|
26138
|
-
|
|
26139
|
-
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26537
|
+
})) : null, count > 0 && showSideBar ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26538
|
+
ref: scrollRef,
|
|
26539
|
+
style: {
|
|
26540
|
+
height: '100%',
|
|
26541
|
+
overflowY: 'auto',
|
|
26542
|
+
overflowX: 'hidden'
|
|
26543
|
+
}
|
|
26544
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26545
|
+
style: {
|
|
26546
|
+
height: totalHeight,
|
|
26547
|
+
position: 'relative',
|
|
26548
|
+
width: '100%'
|
|
26549
|
+
}
|
|
26550
|
+
}, Array.from({
|
|
26551
|
+
length: endIdx - startIdx + 1
|
|
26552
|
+
}, function (_, rel) {
|
|
26553
|
+
var index = startIdx + rel;
|
|
26554
|
+
var group = notificationGroups[index];
|
|
26555
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26556
|
+
key: group.appName,
|
|
26557
|
+
ref: measureItem(index),
|
|
26558
|
+
style: {
|
|
26559
|
+
position: 'absolute',
|
|
26560
|
+
top: offsets[index],
|
|
26561
|
+
left: 0,
|
|
26562
|
+
width: '100%'
|
|
26563
|
+
}
|
|
26564
|
+
}, /*#__PURE__*/React__default["default"].createElement(SideNotificationGroup, {
|
|
26565
|
+
appName: group.appName,
|
|
26566
|
+
totalCount: group.totalCount,
|
|
26567
|
+
notifications: group.notifications,
|
|
26568
|
+
hasMore: group.hasMore,
|
|
26569
|
+
showBackButton: Boolean(expandedAppName),
|
|
26570
|
+
onBack: handleBackToAllApps,
|
|
26571
|
+
onViewAll: function onViewAll() {
|
|
26572
|
+
return handleViewAll(group.appName);
|
|
26573
|
+
},
|
|
26574
|
+
onDismiss: _onDismiss,
|
|
26145
26575
|
ActionComponent: ActionComponent,
|
|
26146
26576
|
saveActionComponentState: saveActionComponentState
|
|
26147
26577
|
}));
|
|
26148
|
-
}) : null);
|
|
26578
|
+
}))) : null);
|
|
26149
26579
|
};
|
|
26150
26580
|
|
|
26151
26581
|
var capitalizeAndReplaceUnderscores = function capitalizeAndReplaceUnderscores(role) {
|
|
@@ -27177,6 +27607,7 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27177
27607
|
notifications: notifications || [],
|
|
27178
27608
|
onDismiss: onDismiss,
|
|
27179
27609
|
showSideBar: true,
|
|
27610
|
+
sidebarOpen: notificationsVisible,
|
|
27180
27611
|
ActionComponent: ActionComponent,
|
|
27181
27612
|
saveActionComponentState: saveActionComponentState
|
|
27182
27613
|
})))), showSearchContainer && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -28992,7 +29423,7 @@ var getCurrentApp = function getCurrentApp() {
|
|
|
28992
29423
|
};
|
|
28993
29424
|
var buildTargetingClause = function buildTargetingClause(yardNumber, email) {
|
|
28994
29425
|
var app = encodeURIComponent(getCurrentApp());
|
|
28995
|
-
var clauses = ["(
|
|
29426
|
+
var clauses = ["(channel_names:".concat(yardNumber, ")"), "(channel_names:\"".concat(email, "\")"), "(channel_names:\"".concat(app, "\")"), "(channel_names:\"".concat(yardNumber, "%7C").concat(app, "\")"), "(channel_names:\"".concat(email, "%7C").concat(app, "\")")];
|
|
28996
29427
|
return clauses.join(' OR ');
|
|
28997
29428
|
};
|
|
28998
29429
|
var generateQuery = function generateQuery(yardNumber, email) {
|
|
@@ -29001,7 +29432,7 @@ var generateQuery = function generateQuery(yardNumber, email) {
|
|
|
29001
29432
|
var startDateTsUTC = moment.utc(new Date()).add(1, 'days').format('YYYY-MM-DDTHH:mm:ss[Z]');
|
|
29002
29433
|
var EndDateTsUTC = moment.utc(new Date()).format('YYYY-MM-DDTHH:mm:ss[Z]');
|
|
29003
29434
|
var targetingClause = buildTargetingClause(yardNumber, email);
|
|
29004
|
-
return "fq=(".concat(targetingClause, ")&fq=((start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTsUTC, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]) OR (!start_date_timezone:\"UTC\" AND !end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTs, " TO *]) OR (!start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]))&fq=status:A&rows=
|
|
29435
|
+
return "fq=(".concat(targetingClause, ")&fq=((start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTsUTC, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]) OR (!start_date_timezone:\"UTC\" AND !end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTs, " TO *]) OR (!start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]))&fq=status:A&rows=1000&q=*:*");
|
|
29005
29436
|
};
|
|
29006
29437
|
var generateTargets = function generateTargets(notification) {
|
|
29007
29438
|
var targets = [];
|
|
@@ -29085,17 +29516,26 @@ function fetchG2Notifications(updateNotifications, updateAllNotificationsList) {
|
|
|
29085
29516
|
});
|
|
29086
29517
|
compose(updateNotifications, filterNotifications)(modifiedNotifications);
|
|
29087
29518
|
updateAllNotificationsList(modifiedNotifications, true);
|
|
29519
|
+
// Prune expired entries from viewedNotifications after the main logic
|
|
29520
|
+
// settles. Deferred so it never blocks the notifications render.
|
|
29521
|
+
setTimeout(pruneExpiredViewedNotifications, 0);
|
|
29088
29522
|
}).catch(function (e) {
|
|
29089
29523
|
console.log(e);
|
|
29090
29524
|
});
|
|
29091
29525
|
}
|
|
29092
29526
|
function startWebSocketConnection(updateNotifications, updateAllNotificationsList, reConnectSocket, updateUserStatus) {
|
|
29093
|
-
var _storage$getSessionIt, _storage$getSessionIt2;
|
|
29527
|
+
var _window$location$host, _storage$getSessionIt, _storage$getSessionIt2;
|
|
29094
29528
|
var callbacks = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
29529
|
+
if ((_window$location$host = window.location.hostname) !== null && _window$location$host !== void 0 && _window$location$host.includes('localhost')) {
|
|
29530
|
+
return;
|
|
29531
|
+
}
|
|
29095
29532
|
var onOpen = callbacks.onOpen,
|
|
29096
29533
|
onClose = callbacks.onClose;
|
|
29097
29534
|
var coreAppConfig = storage$2.getLocalItem('opsportal-core:config');
|
|
29098
|
-
var
|
|
29535
|
+
var currentApp = encodeURIComponent(getCurrentApp());
|
|
29536
|
+
var selectedYard = (_storage$getSessionIt = storage$2.getSessionItem('dashboard')) === null || _storage$getSessionIt === void 0 ? void 0 : _storage$getSessionIt.selectedYard;
|
|
29537
|
+
var userEmail = storage$2.userEmail;
|
|
29538
|
+
var webSocketURL = "".concat(coreAppConfig.webSocketURL, "/").concat(selectedYard, ",").concat(userEmail, ",").concat(currentApp, ",").concat(selectedYard, "|").concat(currentApp, ",").concat(userEmail, "|").concat(currentApp);
|
|
29099
29539
|
var domain = window.location.hostname.slice(window.location.hostname.indexOf('.copart'));
|
|
29100
29540
|
var selectedCountryA3code = (_storage$getSessionIt2 = storage$2.getSessionItem('dashboard')) === null || _storage$getSessionIt2 === void 0 ? void 0 : _storage$getSessionIt2.selectedCountryA3code;
|
|
29101
29541
|
var notificationCountry = selectedCountryA3code;
|
|
@@ -29122,13 +29562,19 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
|
|
|
29122
29562
|
var batch = notificationBuffer;
|
|
29123
29563
|
notificationBuffer = [];
|
|
29124
29564
|
flushTimerId = null;
|
|
29125
|
-
var
|
|
29565
|
+
var seenIds = new Map();
|
|
29566
|
+
batch.forEach(function (n) {
|
|
29567
|
+
var id = (n === null || n === void 0 ? void 0 : n.notification_id) || (n === null || n === void 0 ? void 0 : n.notificationId);
|
|
29568
|
+
if (id) seenIds.set(id, n);
|
|
29569
|
+
});
|
|
29570
|
+
var deduplicatedBatch = seenIds.size > 0 ? Array.from(seenIds.values()) : batch;
|
|
29571
|
+
var activeBatch = deduplicatedBatch.filter(function (n) {
|
|
29126
29572
|
return (n === null || n === void 0 ? void 0 : n.status) === 'A';
|
|
29127
29573
|
});
|
|
29128
29574
|
if (activeBatch.length > 0) {
|
|
29129
29575
|
compose(updateNotifications, filterNotifications)(activeBatch);
|
|
29130
29576
|
}
|
|
29131
|
-
updateAllNotificationsList(
|
|
29577
|
+
updateAllNotificationsList(deduplicatedBatch);
|
|
29132
29578
|
}
|
|
29133
29579
|
function scheduleFlush() {
|
|
29134
29580
|
if (flushTimerId === null) {
|
|
@@ -29163,7 +29609,7 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
|
|
|
29163
29609
|
return;
|
|
29164
29610
|
}
|
|
29165
29611
|
|
|
29166
|
-
//
|
|
29612
|
+
// Buffer notifications — deduplication happens at flush via notificationRegistry.
|
|
29167
29613
|
var notification = Array.isArray(messageData) ? messageData : [messageData];
|
|
29168
29614
|
if (notification.length > 0) {
|
|
29169
29615
|
var _notificationBuffer;
|
|
@@ -29499,6 +29945,8 @@ var startTabLeaderCoordinator = function startTabLeaderCoordinator(_ref) {
|
|
|
29499
29945
|
console.error('[TabLeaderCoordinator] BroadcastChannel creation failed:', error);
|
|
29500
29946
|
bc = null;
|
|
29501
29947
|
}
|
|
29948
|
+
var stopped = false;
|
|
29949
|
+
var pendingElectionTimeout = null;
|
|
29502
29950
|
var isLeader = false;
|
|
29503
29951
|
var renewTimer = null;
|
|
29504
29952
|
var heartbeatTimer = null;
|
|
@@ -29544,7 +29992,7 @@ var startTabLeaderCoordinator = function startTabLeaderCoordinator(_ref) {
|
|
|
29544
29992
|
});
|
|
29545
29993
|
};
|
|
29546
29994
|
var becomeLeader = function becomeLeader() {
|
|
29547
|
-
if (isLeader) return;
|
|
29995
|
+
if (isLeader || stopped) return;
|
|
29548
29996
|
isLeader = true;
|
|
29549
29997
|
if (bc) {
|
|
29550
29998
|
try {
|
|
@@ -29593,6 +30041,7 @@ var startTabLeaderCoordinator = function startTabLeaderCoordinator(_ref) {
|
|
|
29593
30041
|
renewTimer = heartbeatTimer = interactionCheckTimer = null;
|
|
29594
30042
|
};
|
|
29595
30043
|
var tryBecomeLeader = function tryBecomeLeader() {
|
|
30044
|
+
if (stopped) return;
|
|
29596
30045
|
var lock = readLock();
|
|
29597
30046
|
var expired = !lock || lock.expiresAt <= now();
|
|
29598
30047
|
if (expired) {
|
|
@@ -29636,10 +30085,15 @@ var startTabLeaderCoordinator = function startTabLeaderCoordinator(_ref) {
|
|
|
29636
30085
|
window.addEventListener('beforeunload', handleBeforeUnload);
|
|
29637
30086
|
window.addEventListener('pagehide', handleBeforeUnload);
|
|
29638
30087
|
electionTimer = setInterval(function () {
|
|
29639
|
-
setTimeout(tryBecomeLeader, Math.random() * JITTER_MS);
|
|
30088
|
+
pendingElectionTimeout = setTimeout(tryBecomeLeader, Math.random() * JITTER_MS);
|
|
29640
30089
|
}, ELECTION_INTERVAL_MS);
|
|
29641
30090
|
tryBecomeLeader();
|
|
29642
30091
|
return function () {
|
|
30092
|
+
stopped = true;
|
|
30093
|
+
if (pendingElectionTimeout) {
|
|
30094
|
+
clearTimeout(pendingElectionTimeout);
|
|
30095
|
+
pendingElectionTimeout = null;
|
|
30096
|
+
}
|
|
29643
30097
|
window.removeEventListener('storage', handleStorage);
|
|
29644
30098
|
window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
29645
30099
|
window.removeEventListener('pagehide', handleBeforeUnload);
|
|
@@ -30496,6 +30950,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
30496
30950
|
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
30497
30951
|
};
|
|
30498
30952
|
}, [socketClient]);
|
|
30953
|
+
var notificationsReloadPathKey = pathname === '/embedded' || pathname && pathname.startsWith('/embedded/') ? pathname : '__non_embedded__';
|
|
30499
30954
|
React.useEffect(function () {
|
|
30500
30955
|
setNotifications([]);
|
|
30501
30956
|
setListOfAllNotifications([]);
|
|
@@ -30640,7 +31095,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
30640
31095
|
}
|
|
30641
31096
|
}
|
|
30642
31097
|
}
|
|
30643
|
-
}, [selectedYard,
|
|
31098
|
+
}, [selectedYard, notificationsReloadPathKey]);
|
|
30644
31099
|
React.useEffect(function () {
|
|
30645
31100
|
var interval = setInterval(function () {
|
|
30646
31101
|
var allNotifications = listOfAllNotificationsRef.current;
|
|
@@ -30671,6 +31126,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
30671
31126
|
};
|
|
30672
31127
|
}, []);
|
|
30673
31128
|
React.useEffect(function () {
|
|
31129
|
+
if (coreAppConfig !== null && coreAppConfig !== void 0 && coreAppConfig.disableHeartbeat) return;
|
|
30674
31130
|
var heartBeatEnabledStatuses = ((coreAppConfig === null || coreAppConfig === void 0 ? void 0 : coreAppConfig.heartBeatEnabledStatuses) || ['available']).map(function (s) {
|
|
30675
31131
|
var _s$toLowerCase2;
|
|
30676
31132
|
return (s === null || s === void 0 ? void 0 : (_s$toLowerCase2 = s.toLowerCase) === null || _s$toLowerCase2 === void 0 ? void 0 : _s$toLowerCase2.call(s)) || '';
|
|
@@ -63556,6 +64012,125 @@ var formatNumber = function formatNumber(number) {
|
|
|
63556
64012
|
return sign * Math.abs(number) + unitlist[unit];
|
|
63557
64013
|
};
|
|
63558
64014
|
|
|
64015
|
+
/**
|
|
64016
|
+
* @typedef {number|string} NavCountValue
|
|
64017
|
+
* @typedef {{ count?: NavCountValue, status?: number }} NavCountEntryObject
|
|
64018
|
+
* @typedef {NavCountValue|NavCountEntryObject} NavCountEntry
|
|
64019
|
+
*/
|
|
64020
|
+
|
|
64021
|
+
/**
|
|
64022
|
+
* Normalize a nav count payload entry to { count, status }.
|
|
64023
|
+
* Accepts a plain number/string or { count, status } from iframe UPDATE_NAV_COUNTS.
|
|
64024
|
+
*
|
|
64025
|
+
* @param {NavCountEntry|null|undefined} entry
|
|
64026
|
+
* @returns {{ count: NavCountValue|undefined, status: number|undefined }}
|
|
64027
|
+
*/
|
|
64028
|
+
function normalizeNavCountEntry(entry) {
|
|
64029
|
+
if (entry == null) {
|
|
64030
|
+
return {
|
|
64031
|
+
count: undefined,
|
|
64032
|
+
status: undefined
|
|
64033
|
+
};
|
|
64034
|
+
}
|
|
64035
|
+
if (_typeof$1(entry) === 'object' && !Array.isArray(entry)) {
|
|
64036
|
+
return {
|
|
64037
|
+
count: entry.count,
|
|
64038
|
+
status: entry.status != null ? entry.status : undefined
|
|
64039
|
+
};
|
|
64040
|
+
}
|
|
64041
|
+
return {
|
|
64042
|
+
count: entry,
|
|
64043
|
+
status: undefined
|
|
64044
|
+
};
|
|
64045
|
+
}
|
|
64046
|
+
|
|
64047
|
+
/**
|
|
64048
|
+
* Resolve badge status from a count using getStatus (in-app) or countStatusThresholds (iframe shell).
|
|
64049
|
+
*
|
|
64050
|
+
* @param {number|string|null|undefined} count
|
|
64051
|
+
* @param {{ getStatus?: (n: number) => number, countStatusThresholds?: Array<{ above?: number, min?: number, status: number }> }} navItem
|
|
64052
|
+
* @returns {number|undefined}
|
|
64053
|
+
*/
|
|
64054
|
+
function resolveCountStatus(count) {
|
|
64055
|
+
var navItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
64056
|
+
if (count == null || count === '') return undefined;
|
|
64057
|
+
var num = Number(count);
|
|
64058
|
+
if (Number.isNaN(num)) return undefined;
|
|
64059
|
+
if (typeof navItem.getStatus === 'function') {
|
|
64060
|
+
return navItem.getStatus(num);
|
|
64061
|
+
}
|
|
64062
|
+
var thresholds = navItem.countStatusThresholds;
|
|
64063
|
+
if (!Array.isArray(thresholds) || thresholds.length === 0) return undefined;
|
|
64064
|
+
for (var i = 0; i < thresholds.length; i += 1) {
|
|
64065
|
+
var threshold = thresholds[i];
|
|
64066
|
+
if (!threshold || threshold.status == null) continue;
|
|
64067
|
+
if (threshold.above != null && num > threshold.above) return threshold.status;
|
|
64068
|
+
if (threshold.min != null && num >= threshold.min) return threshold.status;
|
|
64069
|
+
}
|
|
64070
|
+
return undefined;
|
|
64071
|
+
}
|
|
64072
|
+
|
|
64073
|
+
/**
|
|
64074
|
+
* Resolve count display value and badge status for NavigationBar.
|
|
64075
|
+
* Pre-resolved status from iframe payloads takes priority over local navItem rules.
|
|
64076
|
+
*
|
|
64077
|
+
* @param {NavCountEntry|null|undefined} entry
|
|
64078
|
+
* @param {{ getStatus?: (n: number) => number, countStatusThresholds?: Array<{ above?: number, min?: number, status: number }> }} navItem
|
|
64079
|
+
* @returns {{ count: number|undefined, status: number|undefined }}
|
|
64080
|
+
*/
|
|
64081
|
+
function resolveNavCountDisplay(entry) {
|
|
64082
|
+
var navItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
64083
|
+
var _normalizeNavCountEnt = normalizeNavCountEntry(entry),
|
|
64084
|
+
rawCount = _normalizeNavCountEnt.count,
|
|
64085
|
+
preResolvedStatus = _normalizeNavCountEnt.status;
|
|
64086
|
+
if (rawCount == null || rawCount === '') {
|
|
64087
|
+
return {
|
|
64088
|
+
count: undefined,
|
|
64089
|
+
status: undefined
|
|
64090
|
+
};
|
|
64091
|
+
}
|
|
64092
|
+
var num = Number(rawCount);
|
|
64093
|
+
if (Number.isNaN(num)) {
|
|
64094
|
+
return {
|
|
64095
|
+
count: undefined,
|
|
64096
|
+
status: undefined
|
|
64097
|
+
};
|
|
64098
|
+
}
|
|
64099
|
+
var status = preResolvedStatus;
|
|
64100
|
+
if (status == null) {
|
|
64101
|
+
status = resolveCountStatus(num, navItem);
|
|
64102
|
+
}
|
|
64103
|
+
return {
|
|
64104
|
+
count: num,
|
|
64105
|
+
status: status
|
|
64106
|
+
};
|
|
64107
|
+
}
|
|
64108
|
+
|
|
64109
|
+
/**
|
|
64110
|
+
* Build a nav count payload entry from a count and optional nav item getStatus callback.
|
|
64111
|
+
* Use inside iframe apps before posting UPDATE_NAV_COUNTS so arbitrary getStatus logic
|
|
64112
|
+
* runs in the app while only serializable data crosses postMessage.
|
|
64113
|
+
*
|
|
64114
|
+
* @param {NavCountValue|null|undefined} count
|
|
64115
|
+
* @param {{ getStatus?: (n: number) => number|null|undefined }} [navItem]
|
|
64116
|
+
* @returns {NavCountEntry|undefined}
|
|
64117
|
+
*/
|
|
64118
|
+
function buildNavCountEntry(count, navItem) {
|
|
64119
|
+
if (count == null || count === '') return undefined;
|
|
64120
|
+
var num = Number(count);
|
|
64121
|
+
if (Number.isNaN(num)) return undefined;
|
|
64122
|
+
if (typeof (navItem === null || navItem === void 0 ? void 0 : navItem.getStatus) === 'function') {
|
|
64123
|
+
var status = navItem.getStatus(num);
|
|
64124
|
+
if (status != null) {
|
|
64125
|
+
return {
|
|
64126
|
+
count: num,
|
|
64127
|
+
status: status
|
|
64128
|
+
};
|
|
64129
|
+
}
|
|
64130
|
+
}
|
|
64131
|
+
return num;
|
|
64132
|
+
}
|
|
64133
|
+
|
|
63559
64134
|
var css_248z$2 = ".utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer {\r\n display: flex;\r\n flex-direction: column;\r\n position: absolute;\r\n background: #3A4454;\r\n min-width: 50px;\r\n max-width: 50px;\r\n height: 100%;\r\n color: #ffffff;\r\n font-size: 14px;\r\n z-index: 101;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu {\r\n min-width: 70px;\r\n max-width: 70px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts {\r\n min-width: 100px;\r\n max-width: 100px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader {\r\n min-width: 0px;\r\n max-width: 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen {\r\n max-width: 500px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons{\r\n min-width: auto;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton{\r\n min-width: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu {\r\n flex: 1;\r\n overflow-y: auto;\r\n -ms-overflow-style: none;\r\n scrollbar-width: none;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu::-webkit-scrollbar { \r\n display: none;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n display: flex;\r\n width: 100%;\r\n padding: 6px 12px 6px 12px;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled {\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected {\r\n color: #323130;\r\n background-color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus {\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-left: auto;\r\n margin-right: 10px;\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px;\r\n text-align: right;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable:not(:hover) .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: auto;\r\n text-align: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px !important;\r\n text-align: right !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--expandedMenu {\r\n background-color: #73A6FF;\r\n transition: background-color 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n margin-left: auto;\r\n font-size: 12px;\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount {\r\n margin: 0 10px 0 auto;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n min-width: 20px;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\r\n font-size: 14px;\r\n /* width: 20px; */\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i{\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1NoHover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-right: 6px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 0px;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 0;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n margin-top: 2px;\r\n font-weight: 100;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 100%;\r\n margin: 2px 10px 0 10px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 100%;\r\n margin: 0 5px 0 0;\r\n font-weight: 600;\r\n margin-left: 0px;\r\n cursor: auto;\r\n cursor: initial;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n margin: 0;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n margin-right: 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n padding-left: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName > span {\r\n display: inline;\r\n display: initial;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-left: auto;\r\n margin-right: 10px;\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px;\r\n text-align: right;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable:not(:hover) .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: auto;\r\n text-align: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px !important;\r\n text-align: right !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n margin-left: auto;\r\n font-size: 12px;\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons i{\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel2 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n margin-right: 6px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 {\r\n display: flex;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n padding: 6px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--statusColor {\r\n position: absolute;\r\n width: 10px;\r\n height: 95%;\r\n left: -13px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem {\r\n width: 13px;\r\n margin-left: 1px;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:not(.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader):hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem {\r\n width: 100%;\r\n margin-left: 1px;\r\n transition-delay: 0.25s;\r\n}";
|
|
63560
64135
|
styleInject(css_248z$2);
|
|
63561
64136
|
|
|
@@ -63683,7 +64258,8 @@ var NavigationBar = function NavigationBar(_ref2) {
|
|
|
63683
64258
|
showNavIconInHeader = _ref2.showNavIconInHeader,
|
|
63684
64259
|
isNavBarOpen = _ref2.isNavBarOpen,
|
|
63685
64260
|
_ref2$showLevel3Navig = _ref2.showLevel3Navigation,
|
|
63686
|
-
showLevel3Navigation = _ref2$showLevel3Navig === void 0 ? false : _ref2$showLevel3Navig
|
|
64261
|
+
showLevel3Navigation = _ref2$showLevel3Navig === void 0 ? false : _ref2$showLevel3Navig,
|
|
64262
|
+
basePath = _ref2.basePath;
|
|
63687
64263
|
// const withCounts = getCounts && typeof getCounts === 'function'
|
|
63688
64264
|
var navigateFunction = navigateTo || (history === null || history === void 0 ? void 0 : history.push) || defaultRedirect;
|
|
63689
64265
|
var _useState = React.useState(null),
|
|
@@ -63765,7 +64341,8 @@ var NavigationBar = function NavigationBar(_ref2) {
|
|
|
63765
64341
|
countsRef: countsRef,
|
|
63766
64342
|
countAutoReloadDisabled: countAutoReloadDisabled,
|
|
63767
64343
|
onNavSectionToggle: onNavSectionToggle,
|
|
63768
|
-
showLevel3Navigation: showLevel3Navigation
|
|
64344
|
+
showLevel3Navigation: showLevel3Navigation,
|
|
64345
|
+
basePath: basePath
|
|
63769
64346
|
}) : null, isConfigValid === false ? /*#__PURE__*/React__default["default"].createElement("div", null, "Please check your navigation config") : null);
|
|
63770
64347
|
};
|
|
63771
64348
|
var NavigationMenu = function NavigationMenu(_ref3) {
|
|
@@ -63786,8 +64363,10 @@ var NavigationMenu = function NavigationMenu(_ref3) {
|
|
|
63786
64363
|
countAutoReloadDisabled = _ref3.countAutoReloadDisabled,
|
|
63787
64364
|
onNavSectionToggle = _ref3.onNavSectionToggle,
|
|
63788
64365
|
_ref3$showLevel3Navig = _ref3.showLevel3Navigation,
|
|
63789
|
-
showLevel3Navigation = _ref3$showLevel3Navig === void 0 ? false : _ref3$showLevel3Navig
|
|
63790
|
-
|
|
64366
|
+
showLevel3Navigation = _ref3$showLevel3Navig === void 0 ? false : _ref3$showLevel3Navig,
|
|
64367
|
+
basePath = _ref3.basePath;
|
|
64368
|
+
var rawUrl = window.location.pathname;
|
|
64369
|
+
var redirectUrl = basePath && rawUrl.startsWith(basePath) ? rawUrl.slice(basePath.length) || '/' : rawUrl;
|
|
63791
64370
|
var _useState11 = React.useState(null),
|
|
63792
64371
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
63793
64372
|
counts = _useState12[0],
|
|
@@ -63796,7 +64375,7 @@ var NavigationMenu = function NavigationMenu(_ref3) {
|
|
|
63796
64375
|
React.useEffect(function () {
|
|
63797
64376
|
if (redirectUrl != '/') {
|
|
63798
64377
|
var splitUrl = redirectUrl.split('/');
|
|
63799
|
-
if (!process.env.IS_CORE_APP) {
|
|
64378
|
+
if (!process.env.IS_CORE_APP && !basePath) {
|
|
63800
64379
|
splitUrl.shift();
|
|
63801
64380
|
}
|
|
63802
64381
|
// if (splitUrl.length - 1 === configDepth) {
|
|
@@ -64266,7 +64845,7 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
|
|
|
64266
64845
|
isHover: isHover,
|
|
64267
64846
|
showNavIconInHeader: showNavIconInHeader,
|
|
64268
64847
|
navItem: subItem,
|
|
64269
|
-
|
|
64848
|
+
countEntry: counts && counts[subItem.route],
|
|
64270
64849
|
countsLoading: countsLoading,
|
|
64271
64850
|
selected: selected,
|
|
64272
64851
|
navigateToItem: navigateToItem,
|
|
@@ -64281,7 +64860,7 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
|
|
|
64281
64860
|
};
|
|
64282
64861
|
var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref6) {
|
|
64283
64862
|
var navItem = _ref6.navItem,
|
|
64284
|
-
|
|
64863
|
+
countEntry = _ref6.countEntry,
|
|
64285
64864
|
countsLoading = _ref6.countsLoading,
|
|
64286
64865
|
isHover = _ref6.isHover,
|
|
64287
64866
|
showNavIconInHeader = _ref6.showNavIconInHeader,
|
|
@@ -64296,12 +64875,15 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref6) {
|
|
|
64296
64875
|
_ref6$showLevel3Navig = _ref6.showLevel3Navigation,
|
|
64297
64876
|
showLevel3Navigation = _ref6$showLevel3Navig === void 0 ? false : _ref6$showLevel3Navig;
|
|
64298
64877
|
var isHoverEnabled = showNavIconInHeader || isHover;
|
|
64299
|
-
var
|
|
64300
|
-
|
|
64301
|
-
|
|
64302
|
-
|
|
64303
|
-
|
|
64304
|
-
|
|
64878
|
+
var _resolveNavCountDispl = resolveNavCountDisplay(countEntry, navItem),
|
|
64879
|
+
count = _resolveNavCountDispl.count,
|
|
64880
|
+
status = _resolveNavCountDispl.status;
|
|
64881
|
+
var countText;
|
|
64882
|
+
if (count != null && count !== '') {
|
|
64883
|
+
countText = !isHoverEnabled ? formatNumber(count) : count;
|
|
64884
|
+
}
|
|
64885
|
+
var statusColor;
|
|
64886
|
+
if (status != null) statusColor = statusColors[status];
|
|
64305
64887
|
var position = (navItem === null || navItem === void 0 ? void 0 : navItem.statusColorPosition) || '';
|
|
64306
64888
|
var isDisabled = typeof navItem.disabled === 'function' ? navItem.disabled() : navItem.disabled;
|
|
64307
64889
|
|
|
@@ -64410,8 +64992,9 @@ if (!storage$2.activeYardNumber) {
|
|
|
64410
64992
|
} else if (!equals$1(dashboardLocalItem, {})) {
|
|
64411
64993
|
dashboardSessionItem = dashboardLocalItem;
|
|
64412
64994
|
}
|
|
64413
|
-
|
|
64414
|
-
|
|
64995
|
+
if (!equals$1(dashboardSessionItem, {})) {
|
|
64996
|
+
storage$2.setSessionItem('dashboard', dashboardSessionItem);
|
|
64997
|
+
}
|
|
64415
64998
|
}
|
|
64416
64999
|
var SCROLL = {
|
|
64417
65000
|
overflowY: 'scroll'
|
|
@@ -64588,7 +65171,8 @@ var AppFrame = function AppFrame(props) {
|
|
|
64588
65171
|
onNavSectionToggle: props.onNavSectionToggle,
|
|
64589
65172
|
showNavIconInHeader: props === null || props === void 0 ? void 0 : props.showNavIconInHeader,
|
|
64590
65173
|
isNavBarOpen: isNavBarOpen,
|
|
64591
|
-
showLevel3Navigation: props.showLevel3Navigation
|
|
65174
|
+
showLevel3Navigation: props.showLevel3Navigation,
|
|
65175
|
+
basePath: props.navBasePath
|
|
64592
65176
|
}) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
64593
65177
|
style: {
|
|
64594
65178
|
marginLeft: props.showNavigation && !(props !== null && props !== void 0 && props.showNavIconInHeader) ? navigationWidth : '0px',
|
|
@@ -64612,7 +65196,7 @@ AppFrame.defaultProps = {
|
|
|
64612
65196
|
navItems: []
|
|
64613
65197
|
};
|
|
64614
65198
|
|
|
64615
|
-
var _excluded = ["fromPhone", "toPhone", "appCode", "entityType", "lotAttributes"];
|
|
65199
|
+
var _excluded$1 = ["fromPhone", "toPhone", "appCode", "entityType", "lotAttributes"];
|
|
64616
65200
|
var logOutboundCalls = /*#__PURE__*/function () {
|
|
64617
65201
|
var _ref = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(data) {
|
|
64618
65202
|
var _storage$getLocalItem;
|
|
@@ -64648,7 +65232,7 @@ var CallLogger = React__default["default"].memo(function (_ref2) {
|
|
|
64648
65232
|
entityType = _ref2$entityType === void 0 ? '' : _ref2$entityType,
|
|
64649
65233
|
_ref2$lotAttributes = _ref2.lotAttributes,
|
|
64650
65234
|
lotAttributes = _ref2$lotAttributes === void 0 ? {} : _ref2$lotAttributes,
|
|
64651
|
-
props = _objectWithoutProperties(_ref2, _excluded);
|
|
65235
|
+
props = _objectWithoutProperties(_ref2, _excluded$1);
|
|
64652
65236
|
var _useState = React.useState({
|
|
64653
65237
|
error: null,
|
|
64654
65238
|
success: null
|
|
@@ -68073,7 +68657,20 @@ function ContextualHelp(_ref) {
|
|
|
68073
68657
|
})));
|
|
68074
68658
|
}
|
|
68075
68659
|
|
|
68660
|
+
var IFRAME_EVENTS = {
|
|
68661
|
+
UPDATE_URI: 'UPDATE_URI',
|
|
68662
|
+
UPDATE_CRUMBS: 'UPDATE_CRUMBS',
|
|
68663
|
+
SET_NAV_CONFIG: 'SET_NAV_CONFIG',
|
|
68664
|
+
UPDATE_NAV_COUNTS: 'UPDATE_NAV_COUNTS',
|
|
68665
|
+
REQUEST_NAV_COUNTS: 'REQUEST_NAV_COUNTS',
|
|
68666
|
+
NAV_COUNTS_RESPONSE: 'NAV_COUNTS_RESPONSE',
|
|
68667
|
+
SET_APP_ENV: 'SET_APP_ENV',
|
|
68668
|
+
STORAGE_CHANGED: 'STORAGE_CHANGED'
|
|
68669
|
+
};
|
|
68670
|
+
|
|
68671
|
+
var _excluded = ["signal"];
|
|
68076
68672
|
var pending = new Map();
|
|
68673
|
+
var STORAGE_REQUEST_TIMEOUT_MS = 5000;
|
|
68077
68674
|
function requestId() {
|
|
68078
68675
|
return "bridge-".concat(Date.now(), "-").concat(Math.random().toString(36).slice(2, 9));
|
|
68079
68676
|
}
|
|
@@ -68093,7 +68690,8 @@ function handleMessage(event) {
|
|
|
68093
68690
|
if (!id || !pending.has(id)) return;
|
|
68094
68691
|
var _pending$get = pending.get(id),
|
|
68095
68692
|
resolve = _pending$get.resolve,
|
|
68096
|
-
reject = _pending$get.reject
|
|
68693
|
+
reject = _pending$get.reject,
|
|
68694
|
+
pendingResponseType = _pending$get.responseType;
|
|
68097
68695
|
pending.delete(id);
|
|
68098
68696
|
switch (data.eventType) {
|
|
68099
68697
|
case 'FETCH_RESPONSE':
|
|
@@ -68107,6 +68705,25 @@ function handleMessage(event) {
|
|
|
68107
68705
|
} : eventProps.error;
|
|
68108
68706
|
reject(err);
|
|
68109
68707
|
} else {
|
|
68708
|
+
var _eventProps$result;
|
|
68709
|
+
var resultData = (_eventProps$result = eventProps.result) === null || _eventProps$result === void 0 ? void 0 : _eventProps$result.data;
|
|
68710
|
+
if (pendingResponseType === 'arraybuffer') {
|
|
68711
|
+
if (resultData instanceof ArrayBuffer) {
|
|
68712
|
+
console.log('[iframe-bridge/transport] FETCH_RESPONSE binary OK', {
|
|
68713
|
+
requestId: id,
|
|
68714
|
+
byteLength: resultData.byteLength
|
|
68715
|
+
});
|
|
68716
|
+
} else {
|
|
68717
|
+
// Shell returned non-binary for a request that expected arraybuffer.
|
|
68718
|
+
// This means Step 2 (shell) has not been deployed yet, or the shell
|
|
68719
|
+
// is not forwarding responseType to its own axios call.
|
|
68720
|
+
console.warn('[iframe-bridge/transport] FETCH_RESPONSE expected ArrayBuffer but got non-binary — shell may not support responseType yet', {
|
|
68721
|
+
requestId: id,
|
|
68722
|
+
actualType: _typeof$1(resultData),
|
|
68723
|
+
isNull: resultData == null
|
|
68724
|
+
});
|
|
68725
|
+
}
|
|
68726
|
+
}
|
|
68110
68727
|
resolve(eventProps.result);
|
|
68111
68728
|
}
|
|
68112
68729
|
break;
|
|
@@ -68125,23 +68742,85 @@ if (typeof window !== 'undefined') {
|
|
|
68125
68742
|
window.addEventListener('message', handleMessage, false);
|
|
68126
68743
|
}
|
|
68127
68744
|
function sendFetchRequest(payload) {
|
|
68745
|
+
var signal = payload.signal,
|
|
68746
|
+
restPayload = _objectWithoutProperties(payload, _excluded);
|
|
68128
68747
|
return new Promise(function (resolve, reject) {
|
|
68748
|
+
// Reject immediately if the signal is already aborted before we even send
|
|
68749
|
+
if (signal !== null && signal !== void 0 && signal.aborted) {
|
|
68750
|
+
console.log('[iframe-bridge/transport] FETCH_REQUEST aborted before send', {
|
|
68751
|
+
url: payload.url
|
|
68752
|
+
});
|
|
68753
|
+
reject(new DOMException('Request aborted', 'AbortError'));
|
|
68754
|
+
return;
|
|
68755
|
+
}
|
|
68129
68756
|
var id = requestId();
|
|
68757
|
+
// store responseType so the response handler can detect a binary/non-binary mismatch
|
|
68130
68758
|
pending.set(id, {
|
|
68131
68759
|
resolve: resolve,
|
|
68132
|
-
reject: reject
|
|
68760
|
+
reject: reject,
|
|
68761
|
+
responseType: payload.responseType
|
|
68133
68762
|
});
|
|
68134
|
-
|
|
68763
|
+
if (payload.responseType || payload.timeout != null || payload.withCredentials != null) {
|
|
68764
|
+
console.log('[iframe-bridge/transport] sending FETCH_REQUEST with extended options', {
|
|
68765
|
+
requestId: id,
|
|
68766
|
+
url: payload.url,
|
|
68767
|
+
responseType: payload.responseType,
|
|
68768
|
+
timeout: payload.timeout,
|
|
68769
|
+
withCredentials: payload.withCredentials
|
|
68770
|
+
});
|
|
68771
|
+
}
|
|
68772
|
+
|
|
68773
|
+
// signal cannot be transferred through postMessage — handle abort locally
|
|
68774
|
+
if (signal) {
|
|
68775
|
+
var onAbort = function onAbort() {
|
|
68776
|
+
if (pending.has(id)) {
|
|
68777
|
+
pending.delete(id);
|
|
68778
|
+
console.log('[iframe-bridge/transport] FETCH_REQUEST aborted mid-flight', {
|
|
68779
|
+
requestId: id,
|
|
68780
|
+
url: payload.url
|
|
68781
|
+
});
|
|
68782
|
+
// Notify the shell so it can cancel its own request if wired up
|
|
68783
|
+
post('CANCEL_REQUEST', {
|
|
68784
|
+
requestId: id
|
|
68785
|
+
});
|
|
68786
|
+
reject(new DOMException('Request aborted', 'AbortError'));
|
|
68787
|
+
}
|
|
68788
|
+
};
|
|
68789
|
+
signal.addEventListener('abort', onAbort, {
|
|
68790
|
+
once: true
|
|
68791
|
+
});
|
|
68792
|
+
}
|
|
68793
|
+
|
|
68794
|
+
// signal is intentionally excluded from the message — it's a non-serialisable DOM object
|
|
68795
|
+
post('FETCH_REQUEST', _objectSpread2(_objectSpread2({}, restPayload), {}, {
|
|
68135
68796
|
requestId: id
|
|
68136
68797
|
}));
|
|
68137
68798
|
});
|
|
68138
68799
|
}
|
|
68139
68800
|
function sendStorageGet(payload) {
|
|
68140
|
-
|
|
68801
|
+
var timeoutMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : STORAGE_REQUEST_TIMEOUT_MS;
|
|
68802
|
+
return new Promise(function (_resolve) {
|
|
68141
68803
|
var id = requestId();
|
|
68804
|
+
var timer = setTimeout(function () {
|
|
68805
|
+
if (pending.has(id)) {
|
|
68806
|
+
pending.delete(id);
|
|
68807
|
+
console.warn('[iframe-bridge/transport] STORAGE_GET timed out', {
|
|
68808
|
+
op: payload === null || payload === void 0 ? void 0 : payload.op,
|
|
68809
|
+
key: payload === null || payload === void 0 ? void 0 : payload.key,
|
|
68810
|
+
timeoutMs: timeoutMs
|
|
68811
|
+
});
|
|
68812
|
+
_resolve(undefined);
|
|
68813
|
+
}
|
|
68814
|
+
}, timeoutMs);
|
|
68142
68815
|
pending.set(id, {
|
|
68143
|
-
resolve: resolve
|
|
68144
|
-
|
|
68816
|
+
resolve: function resolve(result) {
|
|
68817
|
+
clearTimeout(timer);
|
|
68818
|
+
_resolve(result);
|
|
68819
|
+
},
|
|
68820
|
+
reject: function reject() {
|
|
68821
|
+
clearTimeout(timer);
|
|
68822
|
+
_resolve(undefined);
|
|
68823
|
+
}
|
|
68145
68824
|
});
|
|
68146
68825
|
post('STORAGE_GET', _objectSpread2(_objectSpread2({}, payload), {}, {
|
|
68147
68826
|
requestId: id
|
|
@@ -68149,11 +68828,29 @@ function sendStorageGet(payload) {
|
|
|
68149
68828
|
});
|
|
68150
68829
|
}
|
|
68151
68830
|
function sendStorageSet(payload) {
|
|
68152
|
-
|
|
68831
|
+
var timeoutMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : STORAGE_REQUEST_TIMEOUT_MS;
|
|
68832
|
+
return new Promise(function (_resolve2) {
|
|
68153
68833
|
var id = requestId();
|
|
68834
|
+
var timer = setTimeout(function () {
|
|
68835
|
+
if (pending.has(id)) {
|
|
68836
|
+
pending.delete(id);
|
|
68837
|
+
console.warn('[iframe-bridge/transport] STORAGE_SET timed out', {
|
|
68838
|
+
op: payload === null || payload === void 0 ? void 0 : payload.op,
|
|
68839
|
+
key: payload === null || payload === void 0 ? void 0 : payload.key,
|
|
68840
|
+
timeoutMs: timeoutMs
|
|
68841
|
+
});
|
|
68842
|
+
_resolve2(undefined);
|
|
68843
|
+
}
|
|
68844
|
+
}, timeoutMs);
|
|
68154
68845
|
pending.set(id, {
|
|
68155
|
-
resolve: resolve
|
|
68156
|
-
|
|
68846
|
+
resolve: function resolve(result) {
|
|
68847
|
+
clearTimeout(timer);
|
|
68848
|
+
_resolve2(result);
|
|
68849
|
+
},
|
|
68850
|
+
reject: function reject() {
|
|
68851
|
+
clearTimeout(timer);
|
|
68852
|
+
_resolve2(undefined);
|
|
68853
|
+
}
|
|
68157
68854
|
});
|
|
68158
68855
|
post('STORAGE_SET', _objectSpread2(_objectSpread2({}, payload), {}, {
|
|
68159
68856
|
requestId: id
|
|
@@ -68161,22 +68858,22 @@ function sendStorageSet(payload) {
|
|
|
68161
68858
|
});
|
|
68162
68859
|
}
|
|
68163
68860
|
function getInitData() {
|
|
68164
|
-
return new Promise(function (
|
|
68861
|
+
return new Promise(function (_resolve3) {
|
|
68165
68862
|
var id = requestId();
|
|
68166
68863
|
var timer = setTimeout(function () {
|
|
68167
68864
|
if (pending.has(id)) {
|
|
68168
68865
|
pending.delete(id);
|
|
68169
|
-
|
|
68866
|
+
_resolve3(null);
|
|
68170
68867
|
}
|
|
68171
68868
|
}, 5000);
|
|
68172
68869
|
pending.set(id, {
|
|
68173
68870
|
resolve: function resolve(result) {
|
|
68174
68871
|
clearTimeout(timer);
|
|
68175
|
-
|
|
68872
|
+
_resolve3(result);
|
|
68176
68873
|
},
|
|
68177
68874
|
reject: function reject() {
|
|
68178
68875
|
clearTimeout(timer);
|
|
68179
|
-
|
|
68876
|
+
_resolve3(null);
|
|
68180
68877
|
}
|
|
68181
68878
|
});
|
|
68182
68879
|
post('GET_INIT_DATA', {
|
|
@@ -68186,27 +68883,64 @@ function getInitData() {
|
|
|
68186
68883
|
}
|
|
68187
68884
|
function postUpdateUri(uri) {
|
|
68188
68885
|
var isPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
68189
|
-
post(
|
|
68886
|
+
post(IFRAME_EVENTS.UPDATE_URI, {
|
|
68190
68887
|
uri: uri,
|
|
68191
68888
|
isPath: isPath
|
|
68192
68889
|
});
|
|
68193
68890
|
}
|
|
68194
68891
|
function postUpdateCrumbs(crumbs) {
|
|
68195
|
-
post(
|
|
68892
|
+
post(IFRAME_EVENTS.UPDATE_CRUMBS, {
|
|
68196
68893
|
crumbs: crumbs
|
|
68197
68894
|
});
|
|
68198
68895
|
}
|
|
68199
68896
|
function postNavConfig(navItems) {
|
|
68200
|
-
post(
|
|
68897
|
+
post(IFRAME_EVENTS.SET_NAV_CONFIG, {
|
|
68201
68898
|
navItems: navItems
|
|
68202
68899
|
});
|
|
68203
68900
|
}
|
|
68901
|
+
|
|
68902
|
+
/**
|
|
68903
|
+
* Push nav badge counts to the shell.
|
|
68904
|
+
* @param {Record<string, Record<string, import('../utilities/navCountStatus').NavCountEntry>>} countsByMenu
|
|
68905
|
+
* Top-level menu route → sub-route counts. Each value may be:
|
|
68906
|
+
* - a plain number (count only, no badge color), or
|
|
68907
|
+
* - `{ count, status }` where status is pre-resolved in the iframe (1|2|3).
|
|
68908
|
+
* Example:
|
|
68909
|
+
* { tasks: { 'open-tasks': { count: 750, status: 2 } }, admin: { 'staged-users': 12 } }
|
|
68910
|
+
*/
|
|
68911
|
+
function postNavCounts(countsByMenu) {
|
|
68912
|
+
if (!countsByMenu || _typeof$1(countsByMenu) !== 'object') return;
|
|
68913
|
+
post(IFRAME_EVENTS.UPDATE_NAV_COUNTS, {
|
|
68914
|
+
countsByMenu: countsByMenu
|
|
68915
|
+
});
|
|
68916
|
+
}
|
|
68917
|
+
function postNavCountsResponse(requestId, countsByMenu) {
|
|
68918
|
+
post(IFRAME_EVENTS.NAV_COUNTS_RESPONSE, {
|
|
68919
|
+
requestId: requestId,
|
|
68920
|
+
countsByMenu: countsByMenu || {}
|
|
68921
|
+
});
|
|
68922
|
+
}
|
|
68204
68923
|
function postAppEnv(toolkitEnv, mihelpAgentProps) {
|
|
68205
|
-
post(
|
|
68924
|
+
post(IFRAME_EVENTS.SET_APP_ENV, {
|
|
68206
68925
|
toolkitEnv: toolkitEnv,
|
|
68207
68926
|
mihelpAgentProps: mihelpAgentProps
|
|
68208
68927
|
});
|
|
68209
68928
|
}
|
|
68929
|
+
function defaultToolkitEnv() {
|
|
68930
|
+
return {
|
|
68931
|
+
STACK: process.env.STACK,
|
|
68932
|
+
APP_NAME: process.env.APP_NAME,
|
|
68933
|
+
CORE_CONFIG_URI: process.env.CORE_CONFIG_URI,
|
|
68934
|
+
CONFIG_URI: process.env.CONFIG_URI
|
|
68935
|
+
};
|
|
68936
|
+
}
|
|
68937
|
+
var appEnvSent = false;
|
|
68938
|
+
function sendAppEnv(toolkitEnv) {
|
|
68939
|
+
var mihelpAgentProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
68940
|
+
if (appEnvSent) return;
|
|
68941
|
+
appEnvSent = true;
|
|
68942
|
+
postAppEnv(toolkitEnv || defaultToolkitEnv(), mihelpAgentProps);
|
|
68943
|
+
}
|
|
68210
68944
|
function addMessageListener(callback) {
|
|
68211
68945
|
var handler = function handler(event) {
|
|
68212
68946
|
var data = event.data;
|
|
@@ -68220,7 +68954,7 @@ function addMessageListener(callback) {
|
|
|
68220
68954
|
function extractUriFromFullPath(fullPath) {
|
|
68221
68955
|
try {
|
|
68222
68956
|
var url = new URL(fullPath);
|
|
68223
|
-
return url.pathname || '/';
|
|
68957
|
+
return "".concat(url.pathname || '/').concat(url.search || '').concat(url.hash || '');
|
|
68224
68958
|
} catch (_) {}
|
|
68225
68959
|
return null;
|
|
68226
68960
|
}
|
|
@@ -68250,6 +68984,450 @@ function getInitialUri() {
|
|
|
68250
68984
|
});
|
|
68251
68985
|
}
|
|
68252
68986
|
|
|
68987
|
+
var _appName = null;
|
|
68988
|
+
function setAppName(name) {
|
|
68989
|
+
_appName = name;
|
|
68990
|
+
}
|
|
68991
|
+
function getAppName() {
|
|
68992
|
+
var _window$toolkitEnv;
|
|
68993
|
+
if (_appName) return _appName;
|
|
68994
|
+
return (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.APP_NAME ? window.toolkitEnv.APP_NAME : typeof process !== 'undefined' && process.env && process.env.APP_NAME || 'test-app';
|
|
68995
|
+
}
|
|
68996
|
+
|
|
68997
|
+
/**
|
|
68998
|
+
* Resolve the portal auth name for an embedded app (used for permission storage keys).
|
|
68999
|
+
* Matches standalone toolkit: permissions are stored as `${appAuthName}:permissions`.
|
|
69000
|
+
*/
|
|
69001
|
+
function resolveAppAuthName(appName, getLocalItemFn) {
|
|
69002
|
+
var _window$toolkitEnv2, _process$env;
|
|
69003
|
+
if (!appName) return null;
|
|
69004
|
+
var portalConfig = typeof getLocalItemFn === 'function' ? getLocalItemFn('opsportal-core:config') : null;
|
|
69005
|
+
var appTiles = portalConfig && portalConfig.tiles || [];
|
|
69006
|
+
var appData = appTiles.find(function (tile) {
|
|
69007
|
+
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
69008
|
+
});
|
|
69009
|
+
if (appData !== null && appData !== void 0 && appData.appAuthName) return appData.appAuthName;
|
|
69010
|
+
if ((_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.APP_AUTH_NAME) return window.toolkitEnv.APP_AUTH_NAME;
|
|
69011
|
+
if (typeof process !== 'undefined' && (_process$env = process.env) !== null && _process$env !== void 0 && _process$env.APP_AUTH_NAME) {
|
|
69012
|
+
return process.env.APP_AUTH_NAME;
|
|
69013
|
+
}
|
|
69014
|
+
return null;
|
|
69015
|
+
}
|
|
69016
|
+
function getByPath(obj, path) {
|
|
69017
|
+
if (obj == null) return undefined;
|
|
69018
|
+
var parts = path.split('.');
|
|
69019
|
+
var value = obj;
|
|
69020
|
+
for (var i = 0; i < parts.length && value != null; i++) {
|
|
69021
|
+
value = value[parts[i]];
|
|
69022
|
+
}
|
|
69023
|
+
return value;
|
|
69024
|
+
}
|
|
69025
|
+
function setByPath(obj, path, value) {
|
|
69026
|
+
if (obj == null) obj = {};
|
|
69027
|
+
var parts = path.split('.');
|
|
69028
|
+
var current = obj;
|
|
69029
|
+
for (var i = 0; i < parts.length - 1; i++) {
|
|
69030
|
+
if (current[parts[i]] == null) current[parts[i]] = {};
|
|
69031
|
+
current = current[parts[i]];
|
|
69032
|
+
}
|
|
69033
|
+
current[parts[parts.length - 1]] = value;
|
|
69034
|
+
return obj;
|
|
69035
|
+
}
|
|
69036
|
+
var cache = {
|
|
69037
|
+
local: {},
|
|
69038
|
+
session: {}
|
|
69039
|
+
};
|
|
69040
|
+
function setInitCache(initData) {
|
|
69041
|
+
if (!initData) return;
|
|
69042
|
+
cache = _objectSpread2({
|
|
69043
|
+
local: {},
|
|
69044
|
+
session: {}
|
|
69045
|
+
}, initData);
|
|
69046
|
+
if (initData.login != null) cache.local.login = initData.login;
|
|
69047
|
+
if (initData.settings != null) cache.local.settings = initData.settings;
|
|
69048
|
+
if (initData.dashboard != null) cache.session.dashboard = initData.dashboard;
|
|
69049
|
+
// Shell sends config/coreAppPermissions under shorthand keys; map to canonical keys bridge getters expect
|
|
69050
|
+
if (initData.config != null && initData['opsportal-core:config'] == null) {
|
|
69051
|
+
cache.local['opsportal-core:config'] = initData.config;
|
|
69052
|
+
console.log('[iframe-bridge/storage] setInitCache mapped config -> opsportal-core:config');
|
|
69053
|
+
}
|
|
69054
|
+
if (initData.coreAppPermissions != null && initData['ops_portal:permissions'] == null) {
|
|
69055
|
+
cache.local['ops_portal:permissions'] = initData.coreAppPermissions;
|
|
69056
|
+
console.log('[iframe-bridge/storage] setInitCache mapped coreAppPermissions -> ops_portal:permissions', {
|
|
69057
|
+
count: Array.isArray(initData.coreAppPermissions) ? initData.coreAppPermissions.length : 'not-array'
|
|
69058
|
+
});
|
|
69059
|
+
}
|
|
69060
|
+
var appPermKeys = Object.keys(initData).filter(function (k) {
|
|
69061
|
+
return k.endsWith(':permissions') && k !== 'ops_portal:permissions';
|
|
69062
|
+
});
|
|
69063
|
+
appPermKeys.forEach(function (k) {
|
|
69064
|
+
cache.local[k] = initData[k];
|
|
69065
|
+
console.log('[iframe-bridge/storage] setInitCache mapped app permissions', {
|
|
69066
|
+
key: k,
|
|
69067
|
+
count: Array.isArray(initData[k]) ? initData[k].length : 'not-array'
|
|
69068
|
+
});
|
|
69069
|
+
});
|
|
69070
|
+
var appConfigKeys = Object.keys(initData).filter(function (k) {
|
|
69071
|
+
return k.endsWith(':config') && k !== 'opsportal-core:config';
|
|
69072
|
+
});
|
|
69073
|
+
appConfigKeys.forEach(function (k) {
|
|
69074
|
+
var _initData$k;
|
|
69075
|
+
cache.local[k] = initData[k];
|
|
69076
|
+
console.log('[iframe-bridge/storage] setInitCache mapped app config', {
|
|
69077
|
+
key: k,
|
|
69078
|
+
hasRunConfig: Boolean((_initData$k = initData[k]) === null || _initData$k === void 0 ? void 0 : _initData$k.runConfig)
|
|
69079
|
+
});
|
|
69080
|
+
});
|
|
69081
|
+
}
|
|
69082
|
+
function setExtraLocal(key, value) {
|
|
69083
|
+
cache.local[key] = value;
|
|
69084
|
+
}
|
|
69085
|
+
function getInitDataForBootstrap() {
|
|
69086
|
+
return getInitData();
|
|
69087
|
+
}
|
|
69088
|
+
function getLocalItem(key, path) {
|
|
69089
|
+
var value = cache.local[key] ?? cache[key];
|
|
69090
|
+
var out = path ? getByPath(value, path) : value;
|
|
69091
|
+
if (out !== undefined) return out;
|
|
69092
|
+
if (key === 'login') return cache.login;
|
|
69093
|
+
if (key === 'settings') return cache.settings;
|
|
69094
|
+
return undefined;
|
|
69095
|
+
}
|
|
69096
|
+
function setLocalItem(key, value, path) {
|
|
69097
|
+
sendStorageSet({
|
|
69098
|
+
op: 'setLocalItem',
|
|
69099
|
+
key: key,
|
|
69100
|
+
value: value,
|
|
69101
|
+
path: path
|
|
69102
|
+
});
|
|
69103
|
+
if (path) {
|
|
69104
|
+
var existing = cache.local[key] ?? cache[key] ?? {};
|
|
69105
|
+
cache.local[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
69106
|
+
} else {
|
|
69107
|
+
cache.local[key] = value;
|
|
69108
|
+
if (key === 'login') cache.login = value;
|
|
69109
|
+
if (key === 'settings') cache.settings = value;
|
|
69110
|
+
}
|
|
69111
|
+
}
|
|
69112
|
+
function getSessionItem(key, path) {
|
|
69113
|
+
var value = cache.session[key] ?? cache[key];
|
|
69114
|
+
var out = path ? getByPath(value, path) : value;
|
|
69115
|
+
if (out !== undefined) return out;
|
|
69116
|
+
if (key === 'dashboard') return cache.dashboard;
|
|
69117
|
+
return undefined;
|
|
69118
|
+
}
|
|
69119
|
+
function setSessionItem(key, value, path) {
|
|
69120
|
+
sendStorageSet({
|
|
69121
|
+
op: 'setSessionItem',
|
|
69122
|
+
key: key,
|
|
69123
|
+
value: value,
|
|
69124
|
+
path: path
|
|
69125
|
+
});
|
|
69126
|
+
if (path) {
|
|
69127
|
+
var existing = cache.session[key] ?? cache[key] ?? {};
|
|
69128
|
+
cache.session[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
69129
|
+
} else {
|
|
69130
|
+
cache.session[key] = value;
|
|
69131
|
+
if (key === 'dashboard') cache.dashboard = value;
|
|
69132
|
+
}
|
|
69133
|
+
}
|
|
69134
|
+
function removeLocalItem(key) {
|
|
69135
|
+
sendStorageSet({
|
|
69136
|
+
op: 'removeLocalItem',
|
|
69137
|
+
key: key
|
|
69138
|
+
});
|
|
69139
|
+
delete cache.local[key];
|
|
69140
|
+
if (key === 'login') delete cache.login;
|
|
69141
|
+
if (key === 'settings') delete cache.settings;
|
|
69142
|
+
}
|
|
69143
|
+
function removeSessionItem(key) {
|
|
69144
|
+
sendStorageSet({
|
|
69145
|
+
op: 'removeSessionItem',
|
|
69146
|
+
key: key
|
|
69147
|
+
});
|
|
69148
|
+
delete cache.session[key];
|
|
69149
|
+
if (key === 'dashboard') delete cache.dashboard;
|
|
69150
|
+
}
|
|
69151
|
+
function applyStorageChanged() {
|
|
69152
|
+
var eventProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
69153
|
+
var scope = eventProps.scope,
|
|
69154
|
+
op = eventProps.op,
|
|
69155
|
+
key = eventProps.key,
|
|
69156
|
+
path = eventProps.path,
|
|
69157
|
+
value = eventProps.value;
|
|
69158
|
+
if (op === 'remove') {
|
|
69159
|
+
if (scope === 'session') {
|
|
69160
|
+
removeSessionItemFromCache(key);
|
|
69161
|
+
} else {
|
|
69162
|
+
removeLocalItemFromCache(key);
|
|
69163
|
+
}
|
|
69164
|
+
return;
|
|
69165
|
+
}
|
|
69166
|
+
if (op === 'set' && key) {
|
|
69167
|
+
if (scope === 'session') {
|
|
69168
|
+
if (path) {
|
|
69169
|
+
var existing = cache.session[key] ?? {};
|
|
69170
|
+
cache.session[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
69171
|
+
} else {
|
|
69172
|
+
cache.session[key] = value;
|
|
69173
|
+
if (key === 'dashboard') cache.dashboard = value;
|
|
69174
|
+
}
|
|
69175
|
+
} else if (path) {
|
|
69176
|
+
var _existing = cache.local[key] ?? {};
|
|
69177
|
+
cache.local[key] = setByPath(_objectSpread2({}, _existing), path, value);
|
|
69178
|
+
} else {
|
|
69179
|
+
cache.local[key] = value;
|
|
69180
|
+
if (key === 'login') cache.login = value;
|
|
69181
|
+
if (key === 'settings') cache.settings = value;
|
|
69182
|
+
}
|
|
69183
|
+
}
|
|
69184
|
+
}
|
|
69185
|
+
function removeLocalItemFromCache(key) {
|
|
69186
|
+
delete cache.local[key];
|
|
69187
|
+
if (key === 'login') delete cache.login;
|
|
69188
|
+
if (key === 'settings') delete cache.settings;
|
|
69189
|
+
}
|
|
69190
|
+
function removeSessionItemFromCache(key) {
|
|
69191
|
+
delete cache.session[key];
|
|
69192
|
+
if (key === 'dashboard') delete cache.dashboard;
|
|
69193
|
+
}
|
|
69194
|
+
function getItem$1(key) {
|
|
69195
|
+
var APP_NAME = getAppName();
|
|
69196
|
+
var namespaced = "".concat(APP_NAME, ":").concat(key);
|
|
69197
|
+
return cache.local[namespaced] ?? cache[key];
|
|
69198
|
+
}
|
|
69199
|
+
function setItem(key, value) {
|
|
69200
|
+
var APP_NAME = getAppName();
|
|
69201
|
+
var namespaced = "".concat(APP_NAME, ":").concat(key);
|
|
69202
|
+
sendStorageSet({
|
|
69203
|
+
op: 'setLocalItem',
|
|
69204
|
+
key: namespaced,
|
|
69205
|
+
value: value
|
|
69206
|
+
});
|
|
69207
|
+
cache.local[namespaced] = value;
|
|
69208
|
+
cache[key] = value;
|
|
69209
|
+
return value;
|
|
69210
|
+
}
|
|
69211
|
+
function setAppContext() {
|
|
69212
|
+
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
69213
|
+
try {
|
|
69214
|
+
var _window$toolkitEnv3, _storage$getLocalItem, _window$toolkitEnv4;
|
|
69215
|
+
if (_typeof$1(context) !== 'object' || context === null || Array.isArray(context)) {
|
|
69216
|
+
context = {};
|
|
69217
|
+
}
|
|
69218
|
+
var isCoreApp = (_window$toolkitEnv3 = window.toolkitEnv) !== null && _window$toolkitEnv3 !== void 0 && _window$toolkitEnv3.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
69219
|
+
if (isCoreApp) {
|
|
69220
|
+
setSessionItem('opsportal-core:miHelpBotContext', context);
|
|
69221
|
+
return;
|
|
69222
|
+
}
|
|
69223
|
+
var appTiles = ((_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.tiles) || [];
|
|
69224
|
+
var appName = getAppName();
|
|
69225
|
+
var appData = appTiles.find(function (tile) {
|
|
69226
|
+
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
69227
|
+
});
|
|
69228
|
+
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv4 = window.toolkitEnv) !== null && _window$toolkitEnv4 !== void 0 && _window$toolkitEnv4.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
69229
|
+
if (!appAuthName) throw new Error('appAuthName not found');
|
|
69230
|
+
setSessionItem("".concat(appAuthName, ":miHelpBotContext"), context);
|
|
69231
|
+
} catch (e) {
|
|
69232
|
+
console.log('Error while setting context ', e);
|
|
69233
|
+
}
|
|
69234
|
+
}
|
|
69235
|
+
function clearStorage() {
|
|
69236
|
+
sendStorageSet({
|
|
69237
|
+
op: 'clear'
|
|
69238
|
+
});
|
|
69239
|
+
}
|
|
69240
|
+
var storage$1 = {
|
|
69241
|
+
getLocalItem: getLocalItem,
|
|
69242
|
+
setLocalItem: setLocalItem,
|
|
69243
|
+
removeLocalItem: removeLocalItem,
|
|
69244
|
+
getSessionItem: getSessionItem,
|
|
69245
|
+
setSessionItem: setSessionItem,
|
|
69246
|
+
removeSessionItem: removeSessionItem,
|
|
69247
|
+
getItem: getItem$1,
|
|
69248
|
+
setItem: setItem,
|
|
69249
|
+
setAppContext: setAppContext,
|
|
69250
|
+
get appContext() {
|
|
69251
|
+
try {
|
|
69252
|
+
var _window$toolkitEnv5, _storage$getLocalItem2, _window$toolkitEnv6;
|
|
69253
|
+
var isCoreApp = (_window$toolkitEnv5 = window.toolkitEnv) !== null && _window$toolkitEnv5 !== void 0 && _window$toolkitEnv5.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
69254
|
+
if (isCoreApp) {
|
|
69255
|
+
return getSessionItem('opsportal-core:miHelpBotContext');
|
|
69256
|
+
}
|
|
69257
|
+
var appTiles = ((_storage$getLocalItem2 = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.tiles) || [];
|
|
69258
|
+
var appName = getAppName();
|
|
69259
|
+
var appData = appTiles.find(function (tile) {
|
|
69260
|
+
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
69261
|
+
});
|
|
69262
|
+
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv6 = window.toolkitEnv) !== null && _window$toolkitEnv6 !== void 0 && _window$toolkitEnv6.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
69263
|
+
return appAuthName ? getSessionItem("".concat(appAuthName, ":miHelpBotContext")) : {};
|
|
69264
|
+
} catch (e) {
|
|
69265
|
+
console.log('App context error, ', e);
|
|
69266
|
+
return '';
|
|
69267
|
+
}
|
|
69268
|
+
},
|
|
69269
|
+
get config() {
|
|
69270
|
+
return getItem$1('config');
|
|
69271
|
+
},
|
|
69272
|
+
get coreConfig() {
|
|
69273
|
+
return getLocalItem('opsportal-core:config');
|
|
69274
|
+
},
|
|
69275
|
+
get permissions() {
|
|
69276
|
+
return getLocalItem('settings', 'permissions') || [];
|
|
69277
|
+
},
|
|
69278
|
+
get permissionIds() {
|
|
69279
|
+
return getLocalItem('settings', 'permissionIds') || [];
|
|
69280
|
+
},
|
|
69281
|
+
get allPermissionIds() {
|
|
69282
|
+
return getLocalItem('settings', 'allPermissionIds') || [];
|
|
69283
|
+
},
|
|
69284
|
+
get coreAppPermissions() {
|
|
69285
|
+
return getLocalItem('ops_portal:permissions') || [];
|
|
69286
|
+
},
|
|
69287
|
+
get currentAppPermissions() {
|
|
69288
|
+
var _storage$getLocalItem3, _window$toolkitEnv7;
|
|
69289
|
+
var appTiles = ((_storage$getLocalItem3 = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem3 === void 0 ? void 0 : _storage$getLocalItem3.tiles) || [];
|
|
69290
|
+
var appName = getAppName();
|
|
69291
|
+
var appData = appTiles.find(function (tile) {
|
|
69292
|
+
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
69293
|
+
});
|
|
69294
|
+
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv7 = window.toolkitEnv) !== null && _window$toolkitEnv7 !== void 0 && _window$toolkitEnv7.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
69295
|
+
return appAuthName ? storage$1.getLocalItem("".concat(appAuthName, ":permissions")) : [];
|
|
69296
|
+
},
|
|
69297
|
+
get appScopesAndFunctions() {
|
|
69298
|
+
return getLocalItem('appScopesAndFunctions') || [];
|
|
69299
|
+
},
|
|
69300
|
+
get userAppScopes() {
|
|
69301
|
+
return getLocalItem('login', 'userAppScopes') || [];
|
|
69302
|
+
},
|
|
69303
|
+
get userName() {
|
|
69304
|
+
return getLocalItem('login', 'userData.entity_name');
|
|
69305
|
+
},
|
|
69306
|
+
get userAvailability() {
|
|
69307
|
+
return getLocalItem('dashboard', 'userAvailability');
|
|
69308
|
+
},
|
|
69309
|
+
get userEmail() {
|
|
69310
|
+
return getLocalItem('login', 'userData.entity_mail');
|
|
69311
|
+
},
|
|
69312
|
+
get userCopartId() {
|
|
69313
|
+
return getLocalItem('login', 'userData.entity_employee_copart_id');
|
|
69314
|
+
},
|
|
69315
|
+
get userSamAccount() {
|
|
69316
|
+
return getLocalItem('login', 'userData.entity_sam_id');
|
|
69317
|
+
},
|
|
69318
|
+
get userCountry() {
|
|
69319
|
+
return getLocalItem('login', 'userData.entity_country');
|
|
69320
|
+
},
|
|
69321
|
+
get accessToken() {
|
|
69322
|
+
return getLocalItem('login', 'userData.access_token');
|
|
69323
|
+
},
|
|
69324
|
+
get refreshToken() {
|
|
69325
|
+
return getLocalItem('login', 'userData.refresh_token');
|
|
69326
|
+
},
|
|
69327
|
+
get isAuthenticated() {
|
|
69328
|
+
return getLocalItem('login', 'isAuthenticated');
|
|
69329
|
+
},
|
|
69330
|
+
get activeCountry() {
|
|
69331
|
+
var _getSessionItem;
|
|
69332
|
+
return (_getSessionItem = getSessionItem('dashboard')) === null || _getSessionItem === void 0 ? void 0 : _getSessionItem.selectedCountry;
|
|
69333
|
+
},
|
|
69334
|
+
get activeLanguage() {
|
|
69335
|
+
var _getSessionItem2;
|
|
69336
|
+
return ((_getSessionItem2 = getSessionItem('dashboard')) === null || _getSessionItem2 === void 0 ? void 0 : _getSessionItem2.language) || 'en';
|
|
69337
|
+
},
|
|
69338
|
+
get userSecurityLevel() {
|
|
69339
|
+
return Number(getSessionItem('securityLevel')) || 0;
|
|
69340
|
+
},
|
|
69341
|
+
get phoneNumber() {
|
|
69342
|
+
var _getLocalItem;
|
|
69343
|
+
return (_getLocalItem = getLocalItem('dashboard')) === null || _getLocalItem === void 0 ? void 0 : _getLocalItem.phoneNumber;
|
|
69344
|
+
},
|
|
69345
|
+
get userRole() {
|
|
69346
|
+
var _getLocalItem2;
|
|
69347
|
+
return ((_getLocalItem2 = getLocalItem('settings')) === null || _getLocalItem2 === void 0 ? void 0 : _getLocalItem2.selectedRole) || '';
|
|
69348
|
+
},
|
|
69349
|
+
get hasCasAccess() {
|
|
69350
|
+
var _getLocalItem3, _getLocalItem3$userDa;
|
|
69351
|
+
return (_getLocalItem3 = getLocalItem('login')) === null || _getLocalItem3 === void 0 ? void 0 : (_getLocalItem3$userDa = _getLocalItem3.userData) === null || _getLocalItem3$userDa === void 0 ? void 0 : _getLocalItem3$userDa.hasCasAccess;
|
|
69352
|
+
},
|
|
69353
|
+
get activeYardNumber() {
|
|
69354
|
+
var _getSessionItem3;
|
|
69355
|
+
return (_getSessionItem3 = getSessionItem('dashboard')) === null || _getSessionItem3 === void 0 ? void 0 : _getSessionItem3.selectedYard;
|
|
69356
|
+
},
|
|
69357
|
+
get lastSelectedYard() {
|
|
69358
|
+
var data = getLocalItem('lastSelectedYard');
|
|
69359
|
+
if (data && Object.entries(data).length) {
|
|
69360
|
+
return data;
|
|
69361
|
+
}
|
|
69362
|
+
},
|
|
69363
|
+
get homeYard() {
|
|
69364
|
+
var _getLocalItem4;
|
|
69365
|
+
var yardList = ((_getLocalItem4 = getLocalItem('login')) === null || _getLocalItem4 === void 0 ? void 0 : _getLocalItem4.yardList) || [];
|
|
69366
|
+
return yardList.find(function (yard) {
|
|
69367
|
+
return yard.isHomeYard === 'Y';
|
|
69368
|
+
});
|
|
69369
|
+
},
|
|
69370
|
+
get selectedHierarchy() {
|
|
69371
|
+
return storage$1.getLocalItem('settings', 'selectedHierarchy') || {};
|
|
69372
|
+
},
|
|
69373
|
+
get selectedHierarchyOption() {
|
|
69374
|
+
return storage$1.getLocalItem('settings', 'selectedHierarchyOption') || {};
|
|
69375
|
+
},
|
|
69376
|
+
get chromePluginData() {
|
|
69377
|
+
return storage$1.getLocalItem('chromePluginData') || {};
|
|
69378
|
+
},
|
|
69379
|
+
get twilioVoiceTask() {
|
|
69380
|
+
return getLocalItem('twilio', 'voiceTask') || {};
|
|
69381
|
+
},
|
|
69382
|
+
get twilioCallAnswered() {
|
|
69383
|
+
return getLocalItem('twilio', 'callAccepted') || false;
|
|
69384
|
+
},
|
|
69385
|
+
get twilioWrapup() {
|
|
69386
|
+
return getLocalItem('twilio', 'wrapUpCall') || false;
|
|
69387
|
+
},
|
|
69388
|
+
get twilioEnabledStatus() {
|
|
69389
|
+
return getLocalItem('dashboard', 'twilioEnabled') || false;
|
|
69390
|
+
},
|
|
69391
|
+
get clickToDialEnabledStatus() {
|
|
69392
|
+
return cache.local.c2dEnabled ? JSON.parse(cache.local.c2dEnabled) : false;
|
|
69393
|
+
},
|
|
69394
|
+
get callCapsuleEnabledStatus() {
|
|
69395
|
+
return getLocalItem('dashboard', 'isCallCapsuleEnabled') || false;
|
|
69396
|
+
},
|
|
69397
|
+
get flexLoaded() {
|
|
69398
|
+
return getLocalItem('twilio', 'flexLoaded') || false;
|
|
69399
|
+
},
|
|
69400
|
+
get workerProfileData() {
|
|
69401
|
+
return getLocalItem('twilio', 'workerProfileData') || {};
|
|
69402
|
+
},
|
|
69403
|
+
get twilioStatus() {
|
|
69404
|
+
return getLocalItem('twilio', 'status') || 'Offline';
|
|
69405
|
+
},
|
|
69406
|
+
get twilioUserStatus() {
|
|
69407
|
+
return getLocalItem('twilio', 'userStatus') || 'Offline';
|
|
69408
|
+
},
|
|
69409
|
+
get twilioCallSid() {
|
|
69410
|
+
return getLocalItem('twilio', 'callSid') || false;
|
|
69411
|
+
},
|
|
69412
|
+
get twilioWarning() {
|
|
69413
|
+
return getLocalItem('twilio', 'warning') || 'false';
|
|
69414
|
+
},
|
|
69415
|
+
clear: function clear() {
|
|
69416
|
+
return clearStorage();
|
|
69417
|
+
},
|
|
69418
|
+
logout: function logout() {
|
|
69419
|
+
clearStorage();
|
|
69420
|
+
window.location.assign('/logout');
|
|
69421
|
+
}
|
|
69422
|
+
};
|
|
69423
|
+
if (typeof window !== 'undefined') {
|
|
69424
|
+
addMessageListener(function (data) {
|
|
69425
|
+
if (data.eventType === IFRAME_EVENTS.STORAGE_CHANGED) {
|
|
69426
|
+
applyStorageChanged(data.eventProps);
|
|
69427
|
+
}
|
|
69428
|
+
});
|
|
69429
|
+
}
|
|
69430
|
+
|
|
68253
69431
|
var requestInterceptors = [];
|
|
68254
69432
|
var responseInterceptors = [];
|
|
68255
69433
|
function applyRequestInterceptors(config) {
|
|
@@ -68289,15 +69467,39 @@ function request(config) {
|
|
|
68289
69467
|
params = finalConfig.params,
|
|
68290
69468
|
data = finalConfig.data,
|
|
68291
69469
|
_finalConfig$headers = finalConfig.headers,
|
|
68292
|
-
headers = _finalConfig$headers === void 0 ? {} : _finalConfig$headers
|
|
69470
|
+
headers = _finalConfig$headers === void 0 ? {} : _finalConfig$headers,
|
|
69471
|
+
responseType = finalConfig.responseType,
|
|
69472
|
+
timeout = finalConfig.timeout,
|
|
69473
|
+
withCredentials = finalConfig.withCredentials,
|
|
69474
|
+
signal = finalConfig.signal;
|
|
69475
|
+
if (responseType || timeout != null || withCredentials != null || signal) {
|
|
69476
|
+
console.log('[iframe-bridge/fetcher] request with extended options', {
|
|
69477
|
+
url: url,
|
|
69478
|
+
responseType: responseType,
|
|
69479
|
+
timeout: timeout,
|
|
69480
|
+
withCredentials: withCredentials,
|
|
69481
|
+
hasSignal: Boolean(signal)
|
|
69482
|
+
});
|
|
69483
|
+
}
|
|
68293
69484
|
return sendFetchRequest({
|
|
68294
69485
|
method: (method || 'get').toLowerCase(),
|
|
68295
69486
|
url: url,
|
|
68296
69487
|
params: params,
|
|
68297
69488
|
data: data,
|
|
68298
|
-
headers: headers
|
|
69489
|
+
headers: headers,
|
|
69490
|
+
responseType: responseType,
|
|
69491
|
+
timeout: timeout,
|
|
69492
|
+
withCredentials: withCredentials,
|
|
69493
|
+
signal: signal
|
|
68299
69494
|
});
|
|
68300
69495
|
}).then(function (result) {
|
|
69496
|
+
if (result.data instanceof ArrayBuffer) {
|
|
69497
|
+
console.log('[iframe-bridge/fetcher] binary response received', {
|
|
69498
|
+
url: config.url,
|
|
69499
|
+
byteLength: result.data.byteLength,
|
|
69500
|
+
type: 'ArrayBuffer'
|
|
69501
|
+
});
|
|
69502
|
+
}
|
|
68301
69503
|
return applyResponseInterceptors({
|
|
68302
69504
|
data: result.data,
|
|
68303
69505
|
status: result.status,
|
|
@@ -68330,64 +69532,82 @@ function hydrateTiles() {
|
|
|
68330
69532
|
});
|
|
68331
69533
|
});
|
|
68332
69534
|
}
|
|
68333
|
-
|
|
68334
|
-
|
|
68335
|
-
|
|
68336
|
-
|
|
68337
|
-
|
|
68338
|
-
|
|
68339
|
-
|
|
68340
|
-
}
|
|
68341
|
-
|
|
68342
|
-
|
|
68343
|
-
|
|
68344
|
-
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
68345
|
-
method: 'post',
|
|
68346
|
-
url: url,
|
|
68347
|
-
data: data
|
|
68348
|
-
}));
|
|
68349
|
-
},
|
|
68350
|
-
put: function put(url, data) {
|
|
68351
|
-
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
68352
|
-
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
68353
|
-
method: 'put',
|
|
68354
|
-
url: url,
|
|
68355
|
-
data: data
|
|
68356
|
-
}));
|
|
68357
|
-
},
|
|
68358
|
-
delete: function _delete(url) {
|
|
68359
|
-
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
68360
|
-
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
68361
|
-
method: 'delete',
|
|
68362
|
-
url: url
|
|
68363
|
-
}));
|
|
69535
|
+
function fetcher(config) {
|
|
69536
|
+
return request(config);
|
|
69537
|
+
}
|
|
69538
|
+
fetcher.defaults = {
|
|
69539
|
+
headers: {
|
|
69540
|
+
common: {},
|
|
69541
|
+
get: {},
|
|
69542
|
+
post: {},
|
|
69543
|
+
put: {},
|
|
69544
|
+
patch: {},
|
|
69545
|
+
delete: {}
|
|
68364
69546
|
},
|
|
68365
|
-
|
|
68366
|
-
|
|
68367
|
-
|
|
68368
|
-
|
|
68369
|
-
|
|
68370
|
-
|
|
68371
|
-
|
|
68372
|
-
|
|
68373
|
-
|
|
68374
|
-
|
|
68375
|
-
|
|
68376
|
-
|
|
68377
|
-
|
|
68378
|
-
|
|
68379
|
-
|
|
68380
|
-
|
|
68381
|
-
|
|
68382
|
-
|
|
68383
|
-
|
|
68384
|
-
|
|
68385
|
-
|
|
68386
|
-
|
|
68387
|
-
|
|
68388
|
-
|
|
69547
|
+
baseURL: '',
|
|
69548
|
+
timeout: 0
|
|
69549
|
+
};
|
|
69550
|
+
fetcher.create = function (instanceConfig) {
|
|
69551
|
+
return fetcher;
|
|
69552
|
+
};
|
|
69553
|
+
fetcher.request = request;
|
|
69554
|
+
fetcher.get = function (url) {
|
|
69555
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
69556
|
+
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
69557
|
+
method: 'get',
|
|
69558
|
+
url: url
|
|
69559
|
+
}));
|
|
69560
|
+
};
|
|
69561
|
+
fetcher.post = function (url, data) {
|
|
69562
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
69563
|
+
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
69564
|
+
method: 'post',
|
|
69565
|
+
url: url,
|
|
69566
|
+
data: data
|
|
69567
|
+
}));
|
|
69568
|
+
};
|
|
69569
|
+
fetcher.put = function (url, data) {
|
|
69570
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
69571
|
+
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
69572
|
+
method: 'put',
|
|
69573
|
+
url: url,
|
|
69574
|
+
data: data
|
|
69575
|
+
}));
|
|
69576
|
+
};
|
|
69577
|
+
fetcher.delete = function (url) {
|
|
69578
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
69579
|
+
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
69580
|
+
method: 'delete',
|
|
69581
|
+
url: url
|
|
69582
|
+
}));
|
|
69583
|
+
};
|
|
69584
|
+
fetcher.patch = function (url, data) {
|
|
69585
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
69586
|
+
return request(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
69587
|
+
method: 'patch',
|
|
69588
|
+
url: url,
|
|
69589
|
+
data: data
|
|
69590
|
+
}));
|
|
69591
|
+
};
|
|
69592
|
+
fetcher.interceptors = {
|
|
69593
|
+
request: {
|
|
69594
|
+
use: function use(fulfilled, rejected) {
|
|
69595
|
+
requestInterceptors.push({
|
|
69596
|
+
fulfilled: fulfilled,
|
|
69597
|
+
rejected: rejected
|
|
69598
|
+
});
|
|
68389
69599
|
}
|
|
68390
69600
|
},
|
|
69601
|
+
response: {
|
|
69602
|
+
use: function use(fulfilled, rejected) {
|
|
69603
|
+
responseInterceptors.push({
|
|
69604
|
+
fulfilled: fulfilled,
|
|
69605
|
+
rejected: rejected
|
|
69606
|
+
});
|
|
69607
|
+
}
|
|
69608
|
+
}
|
|
69609
|
+
};
|
|
69610
|
+
Object.assign(fetcher, {
|
|
68391
69611
|
getConfig: function () {
|
|
68392
69612
|
var _getConfig = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(endpoint) {
|
|
68393
69613
|
var response, config;
|
|
@@ -68439,17 +69659,93 @@ var fetcher = {
|
|
|
68439
69659
|
}(),
|
|
68440
69660
|
getPermissions: function () {
|
|
68441
69661
|
var _getPermissions = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee3(appName, useAppScopes) {
|
|
68442
|
-
var response;
|
|
69662
|
+
var permissions, userAppScopes, allAppScopesAndFunctions, appEntry, _appEntry$scopes, appFunctionsMap, _config$endpoints, _response$data, _response$data$applic, config, endpoint, url, country, response, appDetails, _t;
|
|
68443
69663
|
return _regenerator().w(function (_context3) {
|
|
68444
|
-
while (1) switch (_context3.n) {
|
|
69664
|
+
while (1) switch (_context3.p = _context3.n) {
|
|
68445
69665
|
case 0:
|
|
68446
|
-
|
|
68447
|
-
|
|
68448
|
-
|
|
69666
|
+
console.log('[iframe-bridge/fetcher] getPermissions called', {
|
|
69667
|
+
appName: appName,
|
|
69668
|
+
useAppScopes: useAppScopes
|
|
69669
|
+
});
|
|
69670
|
+
_context3.p = 1;
|
|
69671
|
+
permissions = [];
|
|
69672
|
+
if (!useAppScopes) {
|
|
69673
|
+
_context3.n = 2;
|
|
69674
|
+
break;
|
|
69675
|
+
}
|
|
69676
|
+
userAppScopes = Array.isArray(storage$1.userAppScopes) ? storage$1.userAppScopes : [];
|
|
69677
|
+
allAppScopesAndFunctions = storage$1.appScopesAndFunctions;
|
|
69678
|
+
appEntry = Array.isArray(allAppScopesAndFunctions) ? allAppScopesAndFunctions.find(function (s) {
|
|
69679
|
+
return s.appName === appName;
|
|
69680
|
+
}) : null;
|
|
69681
|
+
console.log('[iframe-bridge/fetcher] getPermissions (useAppScopes)', {
|
|
69682
|
+
appEntryFound: Boolean(appEntry),
|
|
69683
|
+
userAppScopesCount: userAppScopes.length
|
|
69684
|
+
});
|
|
69685
|
+
if (appEntry) {
|
|
69686
|
+
appFunctionsMap = {};
|
|
69687
|
+
(_appEntry$scopes = appEntry.scopes) === null || _appEntry$scopes === void 0 ? void 0 : _appEntry$scopes.forEach(function (scope) {
|
|
69688
|
+
var userHasScope = userAppScopes.find(function (s) {
|
|
69689
|
+
return s.appName === appName && s.scopeName === scope.appscope;
|
|
69690
|
+
});
|
|
69691
|
+
if (userHasScope) {
|
|
69692
|
+
var _scope$applicationFun;
|
|
69693
|
+
(_scope$applicationFun = scope.applicationFunctions) === null || _scope$applicationFun === void 0 ? void 0 : _scope$applicationFun.forEach(function (fn) {
|
|
69694
|
+
if (!appFunctionsMap[fn]) {
|
|
69695
|
+
appFunctionsMap[fn] = {
|
|
69696
|
+
name: fn,
|
|
69697
|
+
description: fn,
|
|
69698
|
+
hierarchyDetails: userHasScope.hierarchies
|
|
69699
|
+
};
|
|
69700
|
+
}
|
|
69701
|
+
});
|
|
69702
|
+
}
|
|
69703
|
+
});
|
|
69704
|
+
permissions = Object.values(appFunctionsMap);
|
|
69705
|
+
}
|
|
69706
|
+
_context3.n = 4;
|
|
69707
|
+
break;
|
|
69708
|
+
case 2:
|
|
69709
|
+
config = storage$1.getLocalItem('opsportal-core:config') || storage$1.getLocalItem('config');
|
|
69710
|
+
endpoint = config === null || config === void 0 ? void 0 : (_config$endpoints = config.endpoints) === null || _config$endpoints === void 0 ? void 0 : _config$endpoints.g2AppPermissions;
|
|
69711
|
+
url = endpoint ? "".concat(endpoint).concat(appName) : "/api/permissions/".concat(appName);
|
|
69712
|
+
country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
69713
|
+
console.log('[iframe-bridge/fetcher] getPermissions fetching', {
|
|
69714
|
+
url: url,
|
|
69715
|
+
country: country
|
|
69716
|
+
});
|
|
69717
|
+
_context3.n = 3;
|
|
69718
|
+
return fetcher.get(url, {
|
|
69719
|
+
headers: {
|
|
69720
|
+
country: country,
|
|
69721
|
+
source: 'OPS_PORTAL'
|
|
69722
|
+
}
|
|
69723
|
+
});
|
|
69724
|
+
case 3:
|
|
68449
69725
|
response = _context3.v;
|
|
68450
|
-
|
|
69726
|
+
appDetails = (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$applic = _response$data.applications) === null || _response$data$applic === void 0 ? void 0 : _response$data$applic.find(function (app) {
|
|
69727
|
+
return app.name === appName;
|
|
69728
|
+
});
|
|
69729
|
+
if (appDetails) {
|
|
69730
|
+
permissions = appDetails.applicationFunctions;
|
|
69731
|
+
}
|
|
69732
|
+
case 4:
|
|
69733
|
+
console.log('[iframe-bridge/fetcher] getPermissions stored', {
|
|
69734
|
+
appName: appName,
|
|
69735
|
+
count: permissions.length
|
|
69736
|
+
});
|
|
69737
|
+
storage$1.setLocalItem("".concat(appName, ":permissions"), permissions);
|
|
69738
|
+
return _context3.a(2, permissions);
|
|
69739
|
+
case 5:
|
|
69740
|
+
_context3.p = 5;
|
|
69741
|
+
_t = _context3.v;
|
|
69742
|
+
console.warn('[iframe-bridge/fetcher] getPermissions failed', {
|
|
69743
|
+
appName: appName,
|
|
69744
|
+
error: (_t === null || _t === void 0 ? void 0 : _t.message) || _t
|
|
69745
|
+
});
|
|
69746
|
+
return _context3.a(2, []);
|
|
68451
69747
|
}
|
|
68452
|
-
}, _callee3);
|
|
69748
|
+
}, _callee3, null, [[1, 5]]);
|
|
68453
69749
|
}));
|
|
68454
69750
|
function getPermissions(_x2, _x3) {
|
|
68455
69751
|
return _getPermissions.apply(this, arguments);
|
|
@@ -68470,152 +69766,240 @@ var fetcher = {
|
|
|
68470
69766
|
}
|
|
68471
69767
|
return getCoreAppPermissions;
|
|
68472
69768
|
}(),
|
|
68473
|
-
|
|
68474
|
-
var
|
|
69769
|
+
getUserPreferences: function () {
|
|
69770
|
+
var _getUserPreferences = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee5() {
|
|
69771
|
+
var appName,
|
|
69772
|
+
_config$endpoints2,
|
|
69773
|
+
config,
|
|
69774
|
+
urlTemplate,
|
|
69775
|
+
url,
|
|
69776
|
+
country,
|
|
69777
|
+
response,
|
|
69778
|
+
_args5 = arguments,
|
|
69779
|
+
_t2;
|
|
68475
69780
|
return _regenerator().w(function (_context5) {
|
|
68476
|
-
while (1) switch (_context5.n) {
|
|
69781
|
+
while (1) switch (_context5.p = _context5.n) {
|
|
68477
69782
|
case 0:
|
|
68478
|
-
|
|
69783
|
+
appName = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : '';
|
|
69784
|
+
_context5.p = 1;
|
|
69785
|
+
config = storage$1.getLocalItem('opsportal-core:config');
|
|
69786
|
+
urlTemplate = config === null || config === void 0 ? void 0 : (_config$endpoints2 = config.endpoints) === null || _config$endpoints2 === void 0 ? void 0 : _config$endpoints2.userPreferences;
|
|
69787
|
+
if (urlTemplate) {
|
|
69788
|
+
_context5.n = 2;
|
|
69789
|
+
break;
|
|
69790
|
+
}
|
|
69791
|
+
return _context5.a(2, {});
|
|
69792
|
+
case 2:
|
|
69793
|
+
url = urlTemplate.replace(/\{appName\}/g, appName);
|
|
69794
|
+
country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
69795
|
+
_context5.n = 3;
|
|
69796
|
+
return fetcher.get(url, {
|
|
69797
|
+
headers: {
|
|
69798
|
+
country: country,
|
|
69799
|
+
source: 'OPS_PORTAL'
|
|
69800
|
+
}
|
|
69801
|
+
});
|
|
69802
|
+
case 3:
|
|
69803
|
+
response = _context5.v;
|
|
69804
|
+
return _context5.a(2, response.data);
|
|
69805
|
+
case 4:
|
|
69806
|
+
_context5.p = 4;
|
|
69807
|
+
_t2 = _context5.v;
|
|
69808
|
+
return _context5.a(2, Promise.reject(_t2));
|
|
68479
69809
|
}
|
|
68480
|
-
}, _callee5);
|
|
69810
|
+
}, _callee5, null, [[1, 4]]);
|
|
68481
69811
|
}));
|
|
68482
|
-
function
|
|
68483
|
-
return
|
|
69812
|
+
function getUserPreferences() {
|
|
69813
|
+
return _getUserPreferences.apply(this, arguments);
|
|
68484
69814
|
}
|
|
68485
|
-
return
|
|
69815
|
+
return getUserPreferences;
|
|
68486
69816
|
}(),
|
|
68487
|
-
|
|
68488
|
-
var
|
|
69817
|
+
setUserPreferences: function () {
|
|
69818
|
+
var _setUserPreferences = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
69819
|
+
var appName,
|
|
69820
|
+
data,
|
|
69821
|
+
_config$endpoints3,
|
|
69822
|
+
config,
|
|
69823
|
+
urlTemplate,
|
|
69824
|
+
url,
|
|
69825
|
+
country,
|
|
69826
|
+
response,
|
|
69827
|
+
_args6 = arguments,
|
|
69828
|
+
_t3;
|
|
68489
69829
|
return _regenerator().w(function (_context6) {
|
|
68490
|
-
while (1) switch (_context6.n) {
|
|
69830
|
+
while (1) switch (_context6.p = _context6.n) {
|
|
68491
69831
|
case 0:
|
|
68492
|
-
|
|
69832
|
+
appName = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : '';
|
|
69833
|
+
data = _args6.length > 1 ? _args6[1] : undefined;
|
|
69834
|
+
_context6.p = 1;
|
|
69835
|
+
config = storage$1.getLocalItem('opsportal-core:config');
|
|
69836
|
+
urlTemplate = config === null || config === void 0 ? void 0 : (_config$endpoints3 = config.endpoints) === null || _config$endpoints3 === void 0 ? void 0 : _config$endpoints3.userPreferences;
|
|
69837
|
+
if (urlTemplate) {
|
|
69838
|
+
_context6.n = 2;
|
|
69839
|
+
break;
|
|
69840
|
+
}
|
|
69841
|
+
return _context6.a(2, '');
|
|
69842
|
+
case 2:
|
|
69843
|
+
url = urlTemplate.replace(/\{appName\}/g, appName);
|
|
69844
|
+
country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
69845
|
+
_context6.n = 3;
|
|
69846
|
+
return fetcher.put(url, data, {
|
|
69847
|
+
headers: {
|
|
69848
|
+
country: country,
|
|
69849
|
+
source: 'OPS_PORTAL'
|
|
69850
|
+
}
|
|
69851
|
+
});
|
|
69852
|
+
case 3:
|
|
69853
|
+
response = _context6.v;
|
|
69854
|
+
return _context6.a(2, response.statusText);
|
|
69855
|
+
case 4:
|
|
69856
|
+
_context6.p = 4;
|
|
69857
|
+
_t3 = _context6.v;
|
|
69858
|
+
return _context6.a(2, Promise.reject(_t3));
|
|
68493
69859
|
}
|
|
68494
|
-
}, _callee6);
|
|
69860
|
+
}, _callee6, null, [[1, 4]]);
|
|
68495
69861
|
}));
|
|
68496
|
-
function
|
|
68497
|
-
return
|
|
69862
|
+
function setUserPreferences() {
|
|
69863
|
+
return _setUserPreferences.apply(this, arguments);
|
|
68498
69864
|
}
|
|
68499
|
-
return
|
|
69865
|
+
return setUserPreferences;
|
|
68500
69866
|
}(),
|
|
68501
|
-
|
|
68502
|
-
var
|
|
69867
|
+
getPrintersForYard: function () {
|
|
69868
|
+
var _getPrintersForYard = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee7(yardNumber) {
|
|
69869
|
+
var _config$endpoints4, config, url, response;
|
|
68503
69870
|
return _regenerator().w(function (_context7) {
|
|
68504
|
-
while (1) switch (_context7.n) {
|
|
69871
|
+
while (1) switch (_context7.p = _context7.n) {
|
|
68505
69872
|
case 0:
|
|
68506
|
-
|
|
69873
|
+
_context7.p = 0;
|
|
69874
|
+
config = storage$1.getLocalItem('opsportal-core:config');
|
|
69875
|
+
url = config === null || config === void 0 ? void 0 : (_config$endpoints4 = config.endpoints) === null || _config$endpoints4 === void 0 ? void 0 : _config$endpoints4.printersByYard;
|
|
69876
|
+
if (url) {
|
|
69877
|
+
_context7.n = 1;
|
|
69878
|
+
break;
|
|
69879
|
+
}
|
|
69880
|
+
return _context7.a(2, {});
|
|
69881
|
+
case 1:
|
|
69882
|
+
_context7.n = 2;
|
|
69883
|
+
return fetcher.get("".concat(url).concat(yardNumber));
|
|
69884
|
+
case 2:
|
|
69885
|
+
response = _context7.v;
|
|
69886
|
+
return _context7.a(2, response.data);
|
|
69887
|
+
case 3:
|
|
69888
|
+
_context7.p = 3;
|
|
69889
|
+
_context7.v;
|
|
69890
|
+
return _context7.a(2, {});
|
|
68507
69891
|
}
|
|
68508
|
-
}, _callee7);
|
|
69892
|
+
}, _callee7, null, [[0, 3]]);
|
|
68509
69893
|
}));
|
|
68510
|
-
function
|
|
68511
|
-
return
|
|
69894
|
+
function getPrintersForYard(_x4) {
|
|
69895
|
+
return _getPrintersForYard.apply(this, arguments);
|
|
68512
69896
|
}
|
|
68513
|
-
return
|
|
69897
|
+
return getPrintersForYard;
|
|
68514
69898
|
}(),
|
|
68515
|
-
|
|
68516
|
-
var
|
|
69899
|
+
login: function () {
|
|
69900
|
+
var _login = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee8() {
|
|
68517
69901
|
return _regenerator().w(function (_context8) {
|
|
68518
69902
|
while (1) switch (_context8.n) {
|
|
68519
69903
|
case 0:
|
|
68520
|
-
return _context8.a(2);
|
|
69904
|
+
return _context8.a(2, {});
|
|
68521
69905
|
}
|
|
68522
69906
|
}, _callee8);
|
|
68523
69907
|
}));
|
|
68524
|
-
function
|
|
68525
|
-
return
|
|
69908
|
+
function login() {
|
|
69909
|
+
return _login.apply(this, arguments);
|
|
68526
69910
|
}
|
|
68527
|
-
return
|
|
69911
|
+
return login;
|
|
68528
69912
|
}(),
|
|
68529
|
-
|
|
68530
|
-
var
|
|
69913
|
+
oktaLogin: function () {
|
|
69914
|
+
var _oktaLogin = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
68531
69915
|
return _regenerator().w(function (_context9) {
|
|
68532
69916
|
while (1) switch (_context9.n) {
|
|
68533
69917
|
case 0:
|
|
68534
|
-
return _context9.a(2);
|
|
69918
|
+
return _context9.a(2, {});
|
|
68535
69919
|
}
|
|
68536
69920
|
}, _callee9);
|
|
68537
69921
|
}));
|
|
68538
|
-
function
|
|
68539
|
-
return
|
|
69922
|
+
function oktaLogin() {
|
|
69923
|
+
return _oktaLogin.apply(this, arguments);
|
|
68540
69924
|
}
|
|
68541
|
-
return
|
|
69925
|
+
return oktaLogin;
|
|
68542
69926
|
}(),
|
|
68543
|
-
|
|
68544
|
-
var
|
|
69927
|
+
getYardNumbers: function () {
|
|
69928
|
+
var _getYardNumbers = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee0() {
|
|
68545
69929
|
return _regenerator().w(function (_context0) {
|
|
68546
69930
|
while (1) switch (_context0.n) {
|
|
68547
69931
|
case 0:
|
|
68548
|
-
return _context0.a(2);
|
|
69932
|
+
return _context0.a(2, []);
|
|
68549
69933
|
}
|
|
68550
69934
|
}, _callee0);
|
|
68551
69935
|
}));
|
|
68552
|
-
function
|
|
68553
|
-
return
|
|
69936
|
+
function getYardNumbers() {
|
|
69937
|
+
return _getYardNumbers.apply(this, arguments);
|
|
68554
69938
|
}
|
|
68555
|
-
return
|
|
69939
|
+
return getYardNumbers;
|
|
68556
69940
|
}(),
|
|
68557
|
-
|
|
68558
|
-
var
|
|
69941
|
+
getUserDetails: function () {
|
|
69942
|
+
var _getUserDetails = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee1() {
|
|
68559
69943
|
return _regenerator().w(function (_context1) {
|
|
68560
69944
|
while (1) switch (_context1.n) {
|
|
68561
69945
|
case 0:
|
|
68562
|
-
return _context1.a(2);
|
|
69946
|
+
return _context1.a(2, {});
|
|
68563
69947
|
}
|
|
68564
69948
|
}, _callee1);
|
|
68565
69949
|
}));
|
|
68566
|
-
function
|
|
68567
|
-
return
|
|
69950
|
+
function getUserDetails() {
|
|
69951
|
+
return _getUserDetails.apply(this, arguments);
|
|
68568
69952
|
}
|
|
68569
|
-
return
|
|
69953
|
+
return getUserDetails;
|
|
68570
69954
|
}(),
|
|
68571
|
-
|
|
68572
|
-
var
|
|
69955
|
+
sendFeedback: function () {
|
|
69956
|
+
var _sendFeedback = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee10() {
|
|
68573
69957
|
return _regenerator().w(function (_context10) {
|
|
68574
69958
|
while (1) switch (_context10.n) {
|
|
68575
69959
|
case 0:
|
|
68576
|
-
return _context10.a(2);
|
|
69960
|
+
return _context10.a(2, {});
|
|
68577
69961
|
}
|
|
68578
69962
|
}, _callee10);
|
|
68579
69963
|
}));
|
|
68580
|
-
function
|
|
68581
|
-
return
|
|
69964
|
+
function sendFeedback() {
|
|
69965
|
+
return _sendFeedback.apply(this, arguments);
|
|
68582
69966
|
}
|
|
68583
|
-
return
|
|
69967
|
+
return sendFeedback;
|
|
68584
69968
|
}(),
|
|
68585
|
-
|
|
68586
|
-
var
|
|
69969
|
+
getUserRoles: function () {
|
|
69970
|
+
var _getUserRoles = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee11() {
|
|
68587
69971
|
return _regenerator().w(function (_context11) {
|
|
68588
69972
|
while (1) switch (_context11.n) {
|
|
68589
69973
|
case 0:
|
|
68590
|
-
return _context11.a(2);
|
|
69974
|
+
return _context11.a(2, []);
|
|
68591
69975
|
}
|
|
68592
69976
|
}, _callee11);
|
|
68593
69977
|
}));
|
|
68594
|
-
function
|
|
68595
|
-
return
|
|
69978
|
+
function getUserRoles() {
|
|
69979
|
+
return _getUserRoles.apply(this, arguments);
|
|
68596
69980
|
}
|
|
68597
|
-
return
|
|
69981
|
+
return getUserRoles;
|
|
68598
69982
|
}(),
|
|
68599
|
-
|
|
68600
|
-
var
|
|
69983
|
+
getHierarchyOptions: function () {
|
|
69984
|
+
var _getHierarchyOptions = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee12() {
|
|
68601
69985
|
return _regenerator().w(function (_context12) {
|
|
68602
69986
|
while (1) switch (_context12.n) {
|
|
68603
69987
|
case 0:
|
|
68604
|
-
return _context12.a(2);
|
|
69988
|
+
return _context12.a(2, []);
|
|
68605
69989
|
}
|
|
68606
69990
|
}, _callee12);
|
|
68607
69991
|
}));
|
|
68608
|
-
function
|
|
68609
|
-
return
|
|
69992
|
+
function getHierarchyOptions() {
|
|
69993
|
+
return _getHierarchyOptions.apply(this, arguments);
|
|
68610
69994
|
}
|
|
68611
|
-
return
|
|
69995
|
+
return getHierarchyOptions;
|
|
68612
69996
|
}(),
|
|
68613
69997
|
getInnovationHubToken: function () {
|
|
68614
69998
|
var _getInnovationHubToken = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee13() {
|
|
68615
69999
|
return _regenerator().w(function (_context13) {
|
|
68616
70000
|
while (1) switch (_context13.n) {
|
|
68617
70001
|
case 0:
|
|
68618
|
-
return _context13.a(2);
|
|
70002
|
+
return _context13.a(2, {});
|
|
68619
70003
|
}
|
|
68620
70004
|
}, _callee13);
|
|
68621
70005
|
}));
|
|
@@ -68629,7 +70013,7 @@ var fetcher = {
|
|
|
68629
70013
|
return _regenerator().w(function (_context14) {
|
|
68630
70014
|
while (1) switch (_context14.n) {
|
|
68631
70015
|
case 0:
|
|
68632
|
-
return _context14.a(2);
|
|
70016
|
+
return _context14.a(2, []);
|
|
68633
70017
|
}
|
|
68634
70018
|
}, _callee14);
|
|
68635
70019
|
}));
|
|
@@ -68643,7 +70027,7 @@ var fetcher = {
|
|
|
68643
70027
|
return _regenerator().w(function (_context15) {
|
|
68644
70028
|
while (1) switch (_context15.n) {
|
|
68645
70029
|
case 0:
|
|
68646
|
-
return _context15.a(2);
|
|
70030
|
+
return _context15.a(2, []);
|
|
68647
70031
|
}
|
|
68648
70032
|
}, _callee15);
|
|
68649
70033
|
}));
|
|
@@ -68657,7 +70041,7 @@ var fetcher = {
|
|
|
68657
70041
|
return _regenerator().w(function (_context16) {
|
|
68658
70042
|
while (1) switch (_context16.n) {
|
|
68659
70043
|
case 0:
|
|
68660
|
-
return _context16.a(2);
|
|
70044
|
+
return _context16.a(2, []);
|
|
68661
70045
|
}
|
|
68662
70046
|
}, _callee16);
|
|
68663
70047
|
}));
|
|
@@ -68666,325 +70050,7 @@ var fetcher = {
|
|
|
68666
70050
|
}
|
|
68667
70051
|
return getCobaltUserRoles;
|
|
68668
70052
|
}()
|
|
68669
|
-
};
|
|
68670
|
-
|
|
68671
|
-
function getAppName() {
|
|
68672
|
-
var _window$toolkitEnv;
|
|
68673
|
-
return (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.APP_NAME ? window.toolkitEnv.APP_NAME : typeof process !== 'undefined' && process.env && process.env.APP_NAME || 'test-app';
|
|
68674
|
-
}
|
|
68675
|
-
function getByPath(obj, path) {
|
|
68676
|
-
if (obj == null) return undefined;
|
|
68677
|
-
var parts = path.split('.');
|
|
68678
|
-
var value = obj;
|
|
68679
|
-
for (var i = 0; i < parts.length && value != null; i++) {
|
|
68680
|
-
value = value[parts[i]];
|
|
68681
|
-
}
|
|
68682
|
-
return value;
|
|
68683
|
-
}
|
|
68684
|
-
function setByPath(obj, path, value) {
|
|
68685
|
-
if (obj == null) obj = {};
|
|
68686
|
-
var parts = path.split('.');
|
|
68687
|
-
var current = obj;
|
|
68688
|
-
for (var i = 0; i < parts.length - 1; i++) {
|
|
68689
|
-
if (current[parts[i]] == null) current[parts[i]] = {};
|
|
68690
|
-
current = current[parts[i]];
|
|
68691
|
-
}
|
|
68692
|
-
current[parts[parts.length - 1]] = value;
|
|
68693
|
-
return obj;
|
|
68694
|
-
}
|
|
68695
|
-
var cache = {
|
|
68696
|
-
local: {},
|
|
68697
|
-
session: {}
|
|
68698
|
-
};
|
|
68699
|
-
function setInitCache(initData) {
|
|
68700
|
-
if (!initData) return;
|
|
68701
|
-
cache = _objectSpread2({
|
|
68702
|
-
local: {},
|
|
68703
|
-
session: {}
|
|
68704
|
-
}, initData);
|
|
68705
|
-
if (initData.login != null) cache.local.login = initData.login;
|
|
68706
|
-
if (initData.settings != null) cache.local.settings = initData.settings;
|
|
68707
|
-
if (initData.dashboard != null) cache.session.dashboard = initData.dashboard;
|
|
68708
|
-
}
|
|
68709
|
-
function setExtraLocal(key, value) {
|
|
68710
|
-
cache.local[key] = value;
|
|
68711
|
-
}
|
|
68712
|
-
function getInitDataForBootstrap() {
|
|
68713
|
-
return getInitData();
|
|
68714
|
-
}
|
|
68715
|
-
function getLocalItem(key, path) {
|
|
68716
|
-
var value = cache.local[key] ?? cache[key];
|
|
68717
|
-
var out = path ? getByPath(value, path) : value;
|
|
68718
|
-
if (out !== undefined) return out;
|
|
68719
|
-
if (key === 'login') return cache.login;
|
|
68720
|
-
if (key === 'settings') return cache.settings;
|
|
68721
|
-
return undefined;
|
|
68722
|
-
}
|
|
68723
|
-
function setLocalItem(key, value, path) {
|
|
68724
|
-
sendStorageSet({
|
|
68725
|
-
op: 'setLocalItem',
|
|
68726
|
-
key: key,
|
|
68727
|
-
value: value,
|
|
68728
|
-
path: path
|
|
68729
|
-
});
|
|
68730
|
-
if (path) {
|
|
68731
|
-
var existing = cache.local[key] ?? cache[key] ?? {};
|
|
68732
|
-
cache.local[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
68733
|
-
} else {
|
|
68734
|
-
cache.local[key] = value;
|
|
68735
|
-
if (key === 'login') cache.login = value;
|
|
68736
|
-
if (key === 'settings') cache.settings = value;
|
|
68737
|
-
}
|
|
68738
|
-
}
|
|
68739
|
-
function getSessionItem(key, path) {
|
|
68740
|
-
var value = cache.session[key] ?? cache[key];
|
|
68741
|
-
var out = path ? getByPath(value, path) : value;
|
|
68742
|
-
if (out !== undefined) return out;
|
|
68743
|
-
if (key === 'dashboard') return cache.dashboard;
|
|
68744
|
-
return undefined;
|
|
68745
|
-
}
|
|
68746
|
-
function setSessionItem(key, value, path) {
|
|
68747
|
-
sendStorageSet({
|
|
68748
|
-
op: 'setSessionItem',
|
|
68749
|
-
key: key,
|
|
68750
|
-
value: value,
|
|
68751
|
-
path: path
|
|
68752
|
-
});
|
|
68753
|
-
if (path) {
|
|
68754
|
-
var existing = cache.session[key] ?? cache[key] ?? {};
|
|
68755
|
-
cache.session[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
68756
|
-
} else {
|
|
68757
|
-
cache.session[key] = value;
|
|
68758
|
-
if (key === 'dashboard') cache.dashboard = value;
|
|
68759
|
-
}
|
|
68760
|
-
}
|
|
68761
|
-
function getItem$1(key) {
|
|
68762
|
-
var APP_NAME = getAppName();
|
|
68763
|
-
var namespaced = "".concat(APP_NAME, ":").concat(key);
|
|
68764
|
-
return cache.local[namespaced] ?? cache[key];
|
|
68765
|
-
}
|
|
68766
|
-
function setItem(key, value) {
|
|
68767
|
-
var APP_NAME = getAppName();
|
|
68768
|
-
var namespaced = "".concat(APP_NAME, ":").concat(key);
|
|
68769
|
-
sendStorageSet({
|
|
68770
|
-
op: 'setLocalItem',
|
|
68771
|
-
key: namespaced,
|
|
68772
|
-
value: value
|
|
68773
|
-
});
|
|
68774
|
-
cache.local[namespaced] = value;
|
|
68775
|
-
cache[key] = value;
|
|
68776
|
-
return value;
|
|
68777
|
-
}
|
|
68778
|
-
function setAppContext() {
|
|
68779
|
-
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
68780
|
-
try {
|
|
68781
|
-
var _window$toolkitEnv2, _storage$getLocalItem, _window$toolkitEnv3;
|
|
68782
|
-
if (_typeof$1(context) !== 'object' || context === null || Array.isArray(context)) {
|
|
68783
|
-
context = {};
|
|
68784
|
-
}
|
|
68785
|
-
var isCoreApp = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
68786
|
-
if (isCoreApp) {
|
|
68787
|
-
setSessionItem('opsportal-core:miHelpBotContext', context);
|
|
68788
|
-
return;
|
|
68789
|
-
}
|
|
68790
|
-
var appTiles = ((_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.tiles) || [];
|
|
68791
|
-
var appName = getAppName();
|
|
68792
|
-
var appData = appTiles.find(function (tile) {
|
|
68793
|
-
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
68794
|
-
});
|
|
68795
|
-
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv3 = window.toolkitEnv) !== null && _window$toolkitEnv3 !== void 0 && _window$toolkitEnv3.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
68796
|
-
if (!appAuthName) throw new Error('appAuthName not found');
|
|
68797
|
-
setSessionItem("".concat(appAuthName, ":miHelpBotContext"), context);
|
|
68798
|
-
} catch (e) {
|
|
68799
|
-
console.log('Error while setting context ', e);
|
|
68800
|
-
}
|
|
68801
|
-
}
|
|
68802
|
-
function clearStorage() {
|
|
68803
|
-
sendStorageSet({
|
|
68804
|
-
op: 'clear'
|
|
68805
|
-
});
|
|
68806
|
-
}
|
|
68807
|
-
var storage$1 = {
|
|
68808
|
-
getLocalItem: getLocalItem,
|
|
68809
|
-
setLocalItem: setLocalItem,
|
|
68810
|
-
getSessionItem: getSessionItem,
|
|
68811
|
-
setSessionItem: setSessionItem,
|
|
68812
|
-
getItem: getItem$1,
|
|
68813
|
-
setItem: setItem,
|
|
68814
|
-
setAppContext: setAppContext,
|
|
68815
|
-
get appContext() {
|
|
68816
|
-
try {
|
|
68817
|
-
var _window$toolkitEnv4, _storage$getLocalItem2, _window$toolkitEnv5;
|
|
68818
|
-
var isCoreApp = (_window$toolkitEnv4 = window.toolkitEnv) !== null && _window$toolkitEnv4 !== void 0 && _window$toolkitEnv4.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
68819
|
-
if (isCoreApp) {
|
|
68820
|
-
return getSessionItem('opsportal-core:miHelpBotContext');
|
|
68821
|
-
}
|
|
68822
|
-
var appTiles = ((_storage$getLocalItem2 = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.tiles) || [];
|
|
68823
|
-
var appName = getAppName();
|
|
68824
|
-
var appData = appTiles.find(function (tile) {
|
|
68825
|
-
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
68826
|
-
});
|
|
68827
|
-
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv5 = window.toolkitEnv) !== null && _window$toolkitEnv5 !== void 0 && _window$toolkitEnv5.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
68828
|
-
return appAuthName ? getSessionItem("".concat(appAuthName, ":miHelpBotContext")) : {};
|
|
68829
|
-
} catch (e) {
|
|
68830
|
-
console.log('App context error, ', e);
|
|
68831
|
-
return '';
|
|
68832
|
-
}
|
|
68833
|
-
},
|
|
68834
|
-
get config() {
|
|
68835
|
-
return getItem$1('config');
|
|
68836
|
-
},
|
|
68837
|
-
get coreConfig() {
|
|
68838
|
-
return getLocalItem('opsportal-core:config');
|
|
68839
|
-
},
|
|
68840
|
-
get permissions() {
|
|
68841
|
-
return getLocalItem('settings', 'permissions') || [];
|
|
68842
|
-
},
|
|
68843
|
-
get permissionIds() {
|
|
68844
|
-
return getLocalItem('settings', 'permissionIds') || [];
|
|
68845
|
-
},
|
|
68846
|
-
get allPermissionIds() {
|
|
68847
|
-
return getLocalItem('settings', 'allPermissionIds') || [];
|
|
68848
|
-
},
|
|
68849
|
-
get coreAppPermissions() {
|
|
68850
|
-
return getLocalItem('ops_portal:permissions') || [];
|
|
68851
|
-
},
|
|
68852
|
-
get currentAppPermissions() {
|
|
68853
|
-
var _storage$getLocalItem3, _window$toolkitEnv6;
|
|
68854
|
-
var appTiles = ((_storage$getLocalItem3 = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem3 === void 0 ? void 0 : _storage$getLocalItem3.tiles) || [];
|
|
68855
|
-
var appName = getAppName();
|
|
68856
|
-
var appData = appTiles.find(function (tile) {
|
|
68857
|
-
return tile.appName ? tile.appName === appName : tile.path === "/".concat(appName);
|
|
68858
|
-
});
|
|
68859
|
-
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv6 = window.toolkitEnv) !== null && _window$toolkitEnv6 !== void 0 && _window$toolkitEnv6.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
68860
|
-
return appAuthName ? storage$1.getLocalItem("".concat(appAuthName, ":permissions")) : [];
|
|
68861
|
-
},
|
|
68862
|
-
get appScopesAndFunctions() {
|
|
68863
|
-
return getLocalItem('appScopesAndFunctions') || [];
|
|
68864
|
-
},
|
|
68865
|
-
get userAppScopes() {
|
|
68866
|
-
return getLocalItem('login', 'userAppScopes') || [];
|
|
68867
|
-
},
|
|
68868
|
-
get userName() {
|
|
68869
|
-
return getLocalItem('login', 'userData.entity_name');
|
|
68870
|
-
},
|
|
68871
|
-
get userAvailability() {
|
|
68872
|
-
return getLocalItem('dashboard', 'userAvailability');
|
|
68873
|
-
},
|
|
68874
|
-
get userEmail() {
|
|
68875
|
-
return getLocalItem('login', 'userData.entity_mail');
|
|
68876
|
-
},
|
|
68877
|
-
get userCopartId() {
|
|
68878
|
-
return getLocalItem('login', 'userData.entity_employee_copart_id');
|
|
68879
|
-
},
|
|
68880
|
-
get userSamAccount() {
|
|
68881
|
-
return getLocalItem('login', 'userData.entity_sam_id');
|
|
68882
|
-
},
|
|
68883
|
-
get userCountry() {
|
|
68884
|
-
return getLocalItem('login', 'userData.entity_country');
|
|
68885
|
-
},
|
|
68886
|
-
get accessToken() {
|
|
68887
|
-
return getLocalItem('login', 'userData.access_token');
|
|
68888
|
-
},
|
|
68889
|
-
get refreshToken() {
|
|
68890
|
-
return getLocalItem('login', 'userData.refresh_token');
|
|
68891
|
-
},
|
|
68892
|
-
get isAuthenticated() {
|
|
68893
|
-
return getLocalItem('login', 'isAuthenticated');
|
|
68894
|
-
},
|
|
68895
|
-
get activeCountry() {
|
|
68896
|
-
var _getSessionItem;
|
|
68897
|
-
return (_getSessionItem = getSessionItem('dashboard')) === null || _getSessionItem === void 0 ? void 0 : _getSessionItem.selectedCountry;
|
|
68898
|
-
},
|
|
68899
|
-
get activeLanguage() {
|
|
68900
|
-
var _getSessionItem2;
|
|
68901
|
-
return ((_getSessionItem2 = getSessionItem('dashboard')) === null || _getSessionItem2 === void 0 ? void 0 : _getSessionItem2.language) || 'en';
|
|
68902
|
-
},
|
|
68903
|
-
get userSecurityLevel() {
|
|
68904
|
-
return Number(getSessionItem('securityLevel')) || 0;
|
|
68905
|
-
},
|
|
68906
|
-
get phoneNumber() {
|
|
68907
|
-
var _getLocalItem;
|
|
68908
|
-
return (_getLocalItem = getLocalItem('dashboard')) === null || _getLocalItem === void 0 ? void 0 : _getLocalItem.phoneNumber;
|
|
68909
|
-
},
|
|
68910
|
-
get userRole() {
|
|
68911
|
-
var _getLocalItem2;
|
|
68912
|
-
return ((_getLocalItem2 = getLocalItem('settings')) === null || _getLocalItem2 === void 0 ? void 0 : _getLocalItem2.selectedRole) || '';
|
|
68913
|
-
},
|
|
68914
|
-
get hasCasAccess() {
|
|
68915
|
-
var _getLocalItem3, _getLocalItem3$userDa;
|
|
68916
|
-
return (_getLocalItem3 = getLocalItem('login')) === null || _getLocalItem3 === void 0 ? void 0 : (_getLocalItem3$userDa = _getLocalItem3.userData) === null || _getLocalItem3$userDa === void 0 ? void 0 : _getLocalItem3$userDa.hasCasAccess;
|
|
68917
|
-
},
|
|
68918
|
-
get activeYardNumber() {
|
|
68919
|
-
var _getSessionItem3;
|
|
68920
|
-
return (_getSessionItem3 = getSessionItem('dashboard')) === null || _getSessionItem3 === void 0 ? void 0 : _getSessionItem3.selectedYard;
|
|
68921
|
-
},
|
|
68922
|
-
get lastSelectedYard() {
|
|
68923
|
-
var data = getLocalItem('lastSelectedYard');
|
|
68924
|
-
if (data && Object.entries(data).length) {
|
|
68925
|
-
return data;
|
|
68926
|
-
}
|
|
68927
|
-
},
|
|
68928
|
-
get homeYard() {
|
|
68929
|
-
var _getLocalItem4;
|
|
68930
|
-
var yardList = ((_getLocalItem4 = getLocalItem('login')) === null || _getLocalItem4 === void 0 ? void 0 : _getLocalItem4.yardList) || [];
|
|
68931
|
-
return yardList.find(function (yard) {
|
|
68932
|
-
return yard.isHomeYard === 'Y';
|
|
68933
|
-
});
|
|
68934
|
-
},
|
|
68935
|
-
get selectedHierarchy() {
|
|
68936
|
-
return storage$1.getLocalItem('settings', 'selectedHierarchy') || {};
|
|
68937
|
-
},
|
|
68938
|
-
get selectedHierarchyOption() {
|
|
68939
|
-
return storage$1.getLocalItem('settings', 'selectedHierarchyOption') || {};
|
|
68940
|
-
},
|
|
68941
|
-
get chromePluginData() {
|
|
68942
|
-
return storage$1.getLocalItem('chromePluginData') || {};
|
|
68943
|
-
},
|
|
68944
|
-
get twilioVoiceTask() {
|
|
68945
|
-
return getLocalItem('twilio', 'voiceTask') || {};
|
|
68946
|
-
},
|
|
68947
|
-
get twilioCallAnswered() {
|
|
68948
|
-
return getLocalItem('twilio', 'callAccepted') || false;
|
|
68949
|
-
},
|
|
68950
|
-
get twilioWrapup() {
|
|
68951
|
-
return getLocalItem('twilio', 'wrapUpCall') || false;
|
|
68952
|
-
},
|
|
68953
|
-
get twilioEnabledStatus() {
|
|
68954
|
-
return getLocalItem('dashboard', 'twilioEnabled') || false;
|
|
68955
|
-
},
|
|
68956
|
-
get clickToDialEnabledStatus() {
|
|
68957
|
-
return cache.local.c2dEnabled ? JSON.parse(cache.local.c2dEnabled) : false;
|
|
68958
|
-
},
|
|
68959
|
-
get callCapsuleEnabledStatus() {
|
|
68960
|
-
return getLocalItem('dashboard', 'isCallCapsuleEnabled') || false;
|
|
68961
|
-
},
|
|
68962
|
-
get flexLoaded() {
|
|
68963
|
-
return getLocalItem('twilio', 'flexLoaded') || false;
|
|
68964
|
-
},
|
|
68965
|
-
get workerProfileData() {
|
|
68966
|
-
return getLocalItem('twilio', 'workerProfileData') || {};
|
|
68967
|
-
},
|
|
68968
|
-
get twilioStatus() {
|
|
68969
|
-
return getLocalItem('twilio', 'status') || 'Offline';
|
|
68970
|
-
},
|
|
68971
|
-
get twilioUserStatus() {
|
|
68972
|
-
return getLocalItem('twilio', 'userStatus') || 'Offline';
|
|
68973
|
-
},
|
|
68974
|
-
get twilioCallSid() {
|
|
68975
|
-
return getLocalItem('twilio', 'callSid') || false;
|
|
68976
|
-
},
|
|
68977
|
-
get twilioWarning() {
|
|
68978
|
-
return getLocalItem('twilio', 'warning') || 'false';
|
|
68979
|
-
},
|
|
68980
|
-
clear: function clear() {
|
|
68981
|
-
return clearStorage();
|
|
68982
|
-
},
|
|
68983
|
-
logout: function logout() {
|
|
68984
|
-
clearStorage();
|
|
68985
|
-
window.location.assign('/logout');
|
|
68986
|
-
}
|
|
68987
|
-
};
|
|
70053
|
+
});
|
|
68988
70054
|
|
|
68989
70055
|
var isEmpty = function isEmpty(arr) {
|
|
68990
70056
|
return !arr || arr.length === 0;
|
|
@@ -69223,17 +70289,551 @@ var iframeFacade = {
|
|
|
69223
70289
|
postUpdateUri: postUpdateUri,
|
|
69224
70290
|
postUpdateCrumbs: postUpdateCrumbs,
|
|
69225
70291
|
postNavConfig: postNavConfig,
|
|
70292
|
+
postNavCounts: postNavCounts,
|
|
70293
|
+
postNavCountsResponse: postNavCountsResponse,
|
|
69226
70294
|
postAppEnv: postAppEnv,
|
|
70295
|
+
sendAppEnv: sendAppEnv,
|
|
69227
70296
|
addMessageListener: addMessageListener,
|
|
69228
70297
|
getInitData: getInitData,
|
|
69229
70298
|
getInitialUri: getInitialUri,
|
|
69230
70299
|
setInitCache: setInitCache,
|
|
69231
70300
|
setExtraLocal: setExtraLocal,
|
|
70301
|
+
setAppName: setAppName,
|
|
70302
|
+
resolveAppAuthName: resolveAppAuthName,
|
|
69232
70303
|
getInitDataForBootstrap: getInitDataForBootstrap,
|
|
69233
|
-
sendStorageGet: sendStorageGet
|
|
70304
|
+
sendStorageGet: sendStorageGet,
|
|
70305
|
+
IFRAME_EVENTS: IFRAME_EVENTS
|
|
69234
70306
|
}
|
|
69235
70307
|
};
|
|
69236
70308
|
|
|
70309
|
+
/**
|
|
70310
|
+
* Register a synchronous LOAD_URI listener before async bootstrap loads.
|
|
70311
|
+
* Call this from the app entry (index.js) before dynamic-importing bootstrap.
|
|
70312
|
+
*/
|
|
70313
|
+
function registerEarlyLoadUriListener() {
|
|
70314
|
+
if (typeof window === 'undefined') return;
|
|
70315
|
+
if (window.__IFRAME_EARLY_LOAD_URI_LISTENER_REGISTERED) return;
|
|
70316
|
+
window.__IFRAME_EARLY_LOAD_URI_LISTENER_REGISTERED = true;
|
|
70317
|
+
window.__IFRAME_EARLY_LOAD_URI = null;
|
|
70318
|
+
window.addEventListener('message', function (event) {
|
|
70319
|
+
if (event.data && event.data.eventType === 'LOAD_URI' && event.data.eventProps) {
|
|
70320
|
+
window.__IFRAME_EARLY_LOAD_URI = event.data.eventProps.uri || '/';
|
|
70321
|
+
}
|
|
70322
|
+
});
|
|
70323
|
+
}
|
|
70324
|
+
|
|
70325
|
+
function resolveRootNode(rootSelector) {
|
|
70326
|
+
var selectors = rootSelector ? [rootSelector] : ['#root', '#app'];
|
|
70327
|
+
for (var i = 0; i < selectors.length; i += 1) {
|
|
70328
|
+
var node = document.querySelector(selectors[i]);
|
|
70329
|
+
if (node) return node;
|
|
70330
|
+
}
|
|
70331
|
+
return null;
|
|
70332
|
+
}
|
|
70333
|
+
function isInIframe() {
|
|
70334
|
+
return typeof window !== 'undefined' && window.self !== window.top;
|
|
70335
|
+
}
|
|
70336
|
+
function renderStandaloneError(rootNode, message) {
|
|
70337
|
+
rootNode.innerHTML = "<h1>".concat(message, "</h1>");
|
|
70338
|
+
}
|
|
70339
|
+
function normalizePermissionKeys(permissionKeys) {
|
|
70340
|
+
if (!permissionKeys) return [];
|
|
70341
|
+
return Array.isArray(permissionKeys) ? permissionKeys : [permissionKeys];
|
|
70342
|
+
}
|
|
70343
|
+
function isNonEmptyObject(value) {
|
|
70344
|
+
return !!value && _typeof$1(value) === 'object' && !Array.isArray(value) && Object.keys(value).length > 0;
|
|
70345
|
+
}
|
|
70346
|
+
function isValidAppConfig(config, validateAppConfig) {
|
|
70347
|
+
if (validateAppConfig) return validateAppConfig(config);
|
|
70348
|
+
return isNonEmptyObject(config);
|
|
70349
|
+
}
|
|
70350
|
+
function hydrateAppConfig(_x) {
|
|
70351
|
+
return _hydrateAppConfig.apply(this, arguments);
|
|
70352
|
+
}
|
|
70353
|
+
function _hydrateAppConfig() {
|
|
70354
|
+
_hydrateAppConfig = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
|
|
70355
|
+
var appName, getCachedLocalItem, sendStorageGet, setExtraLocal, fetcher, configFallbackUri, validateAppConfig, configKey, appConfig;
|
|
70356
|
+
return _regenerator().w(function (_context) {
|
|
70357
|
+
while (1) switch (_context.n) {
|
|
70358
|
+
case 0:
|
|
70359
|
+
appName = _ref.appName, getCachedLocalItem = _ref.getCachedLocalItem, sendStorageGet = _ref.sendStorageGet, setExtraLocal = _ref.setExtraLocal, fetcher = _ref.fetcher, configFallbackUri = _ref.configFallbackUri, validateAppConfig = _ref.validateAppConfig;
|
|
70360
|
+
configKey = "".concat(appName, ":config");
|
|
70361
|
+
appConfig = getCachedLocalItem(configKey);
|
|
70362
|
+
if (isValidAppConfig(appConfig, validateAppConfig)) {
|
|
70363
|
+
_context.n = 2;
|
|
70364
|
+
break;
|
|
70365
|
+
}
|
|
70366
|
+
_context.n = 1;
|
|
70367
|
+
return sendStorageGet({
|
|
70368
|
+
op: 'getLocalItem',
|
|
70369
|
+
key: configKey
|
|
70370
|
+
});
|
|
70371
|
+
case 1:
|
|
70372
|
+
appConfig = _context.v;
|
|
70373
|
+
case 2:
|
|
70374
|
+
if (!(!isValidAppConfig(appConfig, validateAppConfig) && configFallbackUri && fetcher)) {
|
|
70375
|
+
_context.n = 4;
|
|
70376
|
+
break;
|
|
70377
|
+
}
|
|
70378
|
+
console.log('[Iframe] fetching app config from', configFallbackUri);
|
|
70379
|
+
_context.n = 3;
|
|
70380
|
+
return fetcher.getConfig(configFallbackUri);
|
|
70381
|
+
case 3:
|
|
70382
|
+
appConfig = _context.v;
|
|
70383
|
+
case 4:
|
|
70384
|
+
if (isValidAppConfig(appConfig, validateAppConfig)) {
|
|
70385
|
+
setExtraLocal(configKey, appConfig);
|
|
70386
|
+
}
|
|
70387
|
+
case 5:
|
|
70388
|
+
return _context.a(2);
|
|
70389
|
+
}
|
|
70390
|
+
}, _callee);
|
|
70391
|
+
}));
|
|
70392
|
+
return _hydrateAppConfig.apply(this, arguments);
|
|
70393
|
+
}
|
|
70394
|
+
function hydratePermissions(_x2) {
|
|
70395
|
+
return _hydratePermissions.apply(this, arguments);
|
|
70396
|
+
}
|
|
70397
|
+
/**
|
|
70398
|
+
* Bootstrap an iframe-embedded portal app: init bridge data from shell, then render.
|
|
70399
|
+
*
|
|
70400
|
+
* @param {object} options
|
|
70401
|
+
* @param {string} [options.appName] - Defaults to process.env.APP_NAME
|
|
70402
|
+
* @param {string|string[]|null} [options.permissionKeys] - Shell localStorage permission key(s);
|
|
70403
|
+
* defaults to `${appAuthName}:permissions` (resolved from portal tiles config after init)
|
|
70404
|
+
* @param {string} [options.rootSelector] - Root element selector (default: #root then #app)
|
|
70405
|
+
* @param {(initData: *) => void} [options.onInitCache] - Called after setInitCache (e.g. initStoreData)
|
|
70406
|
+
* @param {(initialUri: string, rootNode: HTMLElement) => void} options.render - App render callback
|
|
70407
|
+
* @param {string} [options.standaloneErrorMessage] - Message when not in iframe
|
|
70408
|
+
* @param {boolean} [options.fetchConfigFromShell=true] - Fetch app config/permissions from shell
|
|
70409
|
+
* @param {string} [options.configFallbackUri] - Defaults to process.env.CONFIG_URI
|
|
70410
|
+
* @param {(config: *) => boolean} [options.validateAppConfig] - Config validity check before setExtraLocal
|
|
70411
|
+
* @param {boolean} [options.permissionsOnlyIfArray=true] - Only set permissions when shell returns an array
|
|
70412
|
+
* @param {boolean} [options.autoSendAppEnv=true] - Post toolkit env to shell during bootstrap
|
|
70413
|
+
* @param {object} [options.toolkitEnv] - Env payload; defaults to build-time process.env values
|
|
70414
|
+
* @param {object|null} [options.mihelpAgentProps=null] - Optional miHelp agent props for SET_APP_ENV
|
|
70415
|
+
*/
|
|
70416
|
+
function _hydratePermissions() {
|
|
70417
|
+
_hydratePermissions = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee3(_ref2) {
|
|
70418
|
+
var permissionKeys, getCachedLocalItem, sendStorageGet, setExtraLocal, permissionsOnlyIfArray, keys;
|
|
70419
|
+
return _regenerator().w(function (_context3) {
|
|
70420
|
+
while (1) switch (_context3.n) {
|
|
70421
|
+
case 0:
|
|
70422
|
+
permissionKeys = _ref2.permissionKeys, getCachedLocalItem = _ref2.getCachedLocalItem, sendStorageGet = _ref2.sendStorageGet, setExtraLocal = _ref2.setExtraLocal, permissionsOnlyIfArray = _ref2.permissionsOnlyIfArray;
|
|
70423
|
+
keys = normalizePermissionKeys(permissionKeys);
|
|
70424
|
+
_context3.n = 1;
|
|
70425
|
+
return Promise.all(keys.map(/*#__PURE__*/function () {
|
|
70426
|
+
var _ref3 = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee2(key) {
|
|
70427
|
+
var perms;
|
|
70428
|
+
return _regenerator().w(function (_context2) {
|
|
70429
|
+
while (1) switch (_context2.n) {
|
|
70430
|
+
case 0:
|
|
70431
|
+
perms = getCachedLocalItem(key);
|
|
70432
|
+
if (!(perms == null || permissionsOnlyIfArray && !Array.isArray(perms))) {
|
|
70433
|
+
_context2.n = 2;
|
|
70434
|
+
break;
|
|
70435
|
+
}
|
|
70436
|
+
_context2.n = 1;
|
|
70437
|
+
return sendStorageGet({
|
|
70438
|
+
op: 'getLocalItem',
|
|
70439
|
+
key: key
|
|
70440
|
+
});
|
|
70441
|
+
case 1:
|
|
70442
|
+
perms = _context2.v;
|
|
70443
|
+
case 2:
|
|
70444
|
+
if (!(permissionsOnlyIfArray && !Array.isArray(perms))) {
|
|
70445
|
+
_context2.n = 3;
|
|
70446
|
+
break;
|
|
70447
|
+
}
|
|
70448
|
+
return _context2.a(2);
|
|
70449
|
+
case 3:
|
|
70450
|
+
if (perms != null) setExtraLocal(key, perms);
|
|
70451
|
+
case 4:
|
|
70452
|
+
return _context2.a(2);
|
|
70453
|
+
}
|
|
70454
|
+
}, _callee2);
|
|
70455
|
+
}));
|
|
70456
|
+
return function (_x4) {
|
|
70457
|
+
return _ref3.apply(this, arguments);
|
|
70458
|
+
};
|
|
70459
|
+
}()));
|
|
70460
|
+
case 1:
|
|
70461
|
+
return _context3.a(2);
|
|
70462
|
+
}
|
|
70463
|
+
}, _callee3);
|
|
70464
|
+
}));
|
|
70465
|
+
return _hydratePermissions.apply(this, arguments);
|
|
70466
|
+
}
|
|
70467
|
+
function bootstrapIframeApp(_x3) {
|
|
70468
|
+
return _bootstrapIframeApp.apply(this, arguments);
|
|
70469
|
+
}
|
|
70470
|
+
function _bootstrapIframeApp() {
|
|
70471
|
+
_bootstrapIframeApp = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee4(options) {
|
|
70472
|
+
var _ref4, _ref4$appName, appName, permissionKeysOption, rootSelector, onInitCache, render, _ref4$standaloneError, standaloneErrorMessage, _ref4$fetchConfigFrom, fetchConfigFromShell, _ref4$configFallbackU, configFallbackUri, validateAppConfig, _ref4$permissionsOnly, permissionsOnlyIfArray, _ref4$autoSendAppEnv, autoSendAppEnv, toolkitEnv, _ref4$mihelpAgentProp, mihelpAgentProps, rootNode, bridge, fetcher, storage, getInitialUri, getInitData, setInitCache, setExtraLocal, sendStorageGet, setAppName, sendAppEnv, resolveAppAuthName, _yield$Promise$all, _yield$Promise$all2, initialUri, initData, getCachedLocalItem, appAuthName, permissionKeys, tasks, _t;
|
|
70473
|
+
return _regenerator().w(function (_context4) {
|
|
70474
|
+
while (1) switch (_context4.p = _context4.n) {
|
|
70475
|
+
case 0:
|
|
70476
|
+
registerEarlyLoadUriListener();
|
|
70477
|
+
_ref4 = options || {}, _ref4$appName = _ref4.appName, appName = _ref4$appName === void 0 ? process.env.APP_NAME : _ref4$appName, permissionKeysOption = _ref4.permissionKeys, rootSelector = _ref4.rootSelector, onInitCache = _ref4.onInitCache, render = _ref4.render, _ref4$standaloneError = _ref4.standaloneErrorMessage, standaloneErrorMessage = _ref4$standaloneError === void 0 ? 'This application must be opened from the parent portal.' : _ref4$standaloneError, _ref4$fetchConfigFrom = _ref4.fetchConfigFromShell, fetchConfigFromShell = _ref4$fetchConfigFrom === void 0 ? true : _ref4$fetchConfigFrom, _ref4$configFallbackU = _ref4.configFallbackUri, configFallbackUri = _ref4$configFallbackU === void 0 ? process.env.CONFIG_URI : _ref4$configFallbackU, validateAppConfig = _ref4.validateAppConfig, _ref4$permissionsOnly = _ref4.permissionsOnlyIfArray, permissionsOnlyIfArray = _ref4$permissionsOnly === void 0 ? true : _ref4$permissionsOnly, _ref4$autoSendAppEnv = _ref4.autoSendAppEnv, autoSendAppEnv = _ref4$autoSendAppEnv === void 0 ? true : _ref4$autoSendAppEnv, toolkitEnv = _ref4.toolkitEnv, _ref4$mihelpAgentProp = _ref4.mihelpAgentProps, mihelpAgentProps = _ref4$mihelpAgentProp === void 0 ? null : _ref4$mihelpAgentProp;
|
|
70478
|
+
if (!(typeof render !== 'function')) {
|
|
70479
|
+
_context4.n = 1;
|
|
70480
|
+
break;
|
|
70481
|
+
}
|
|
70482
|
+
throw new Error('bootstrapIframeApp requires a render(initialUri, rootNode) function');
|
|
70483
|
+
case 1:
|
|
70484
|
+
rootNode = resolveRootNode(rootSelector);
|
|
70485
|
+
if (rootNode) {
|
|
70486
|
+
_context4.n = 2;
|
|
70487
|
+
break;
|
|
70488
|
+
}
|
|
70489
|
+
console.error('[Iframe] No root element found');
|
|
70490
|
+
return _context4.a(2);
|
|
70491
|
+
case 2:
|
|
70492
|
+
if (isInIframe()) {
|
|
70493
|
+
_context4.n = 3;
|
|
70494
|
+
break;
|
|
70495
|
+
}
|
|
70496
|
+
renderStandaloneError(rootNode, standaloneErrorMessage);
|
|
70497
|
+
return _context4.a(2);
|
|
70498
|
+
case 3:
|
|
70499
|
+
bridge = iframeFacade.bridge, fetcher = iframeFacade.fetcher, storage = iframeFacade.storage;
|
|
70500
|
+
getInitialUri = bridge.getInitialUri, getInitData = bridge.getInitData, setInitCache = bridge.setInitCache, setExtraLocal = bridge.setExtraLocal, sendStorageGet = bridge.sendStorageGet, setAppName = bridge.setAppName, sendAppEnv = bridge.sendAppEnv, resolveAppAuthName = bridge.resolveAppAuthName;
|
|
70501
|
+
_context4.n = 4;
|
|
70502
|
+
return Promise.all([getInitialUri(), getInitData()]);
|
|
70503
|
+
case 4:
|
|
70504
|
+
_yield$Promise$all = _context4.v;
|
|
70505
|
+
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
70506
|
+
initialUri = _yield$Promise$all2[0];
|
|
70507
|
+
initData = _yield$Promise$all2[1];
|
|
70508
|
+
if (appName && typeof setAppName === 'function') setAppName(appName);
|
|
70509
|
+
if (autoSendAppEnv && typeof sendAppEnv === 'function') {
|
|
70510
|
+
sendAppEnv(toolkitEnv, mihelpAgentProps);
|
|
70511
|
+
}
|
|
70512
|
+
if (initData) {
|
|
70513
|
+
setInitCache(initData);
|
|
70514
|
+
if (onInitCache) onInitCache(initData);
|
|
70515
|
+
} else {
|
|
70516
|
+
console.warn('[Iframe] no initData from shell');
|
|
70517
|
+
}
|
|
70518
|
+
getCachedLocalItem = function getCachedLocalItem(key) {
|
|
70519
|
+
return storage.getLocalItem(key);
|
|
70520
|
+
};
|
|
70521
|
+
appAuthName = typeof resolveAppAuthName === 'function' ? resolveAppAuthName(appName, getCachedLocalItem) : null;
|
|
70522
|
+
permissionKeys = permissionKeysOption !== undefined ? permissionKeysOption : appAuthName ? "".concat(appAuthName, ":permissions") : null;
|
|
70523
|
+
if (!(fetchConfigFromShell && appName)) {
|
|
70524
|
+
_context4.n = 8;
|
|
70525
|
+
break;
|
|
70526
|
+
}
|
|
70527
|
+
_context4.p = 5;
|
|
70528
|
+
tasks = [hydrateAppConfig({
|
|
70529
|
+
appName: appName,
|
|
70530
|
+
getCachedLocalItem: getCachedLocalItem,
|
|
70531
|
+
sendStorageGet: sendStorageGet,
|
|
70532
|
+
setExtraLocal: setExtraLocal,
|
|
70533
|
+
fetcher: fetcher,
|
|
70534
|
+
configFallbackUri: configFallbackUri,
|
|
70535
|
+
validateAppConfig: validateAppConfig
|
|
70536
|
+
})];
|
|
70537
|
+
if (permissionKeys) {
|
|
70538
|
+
tasks.push(hydratePermissions({
|
|
70539
|
+
permissionKeys: permissionKeys,
|
|
70540
|
+
getCachedLocalItem: getCachedLocalItem,
|
|
70541
|
+
sendStorageGet: sendStorageGet,
|
|
70542
|
+
setExtraLocal: setExtraLocal,
|
|
70543
|
+
permissionsOnlyIfArray: permissionsOnlyIfArray
|
|
70544
|
+
}));
|
|
70545
|
+
}
|
|
70546
|
+
_context4.n = 6;
|
|
70547
|
+
return Promise.all(tasks);
|
|
70548
|
+
case 6:
|
|
70549
|
+
_context4.n = 8;
|
|
70550
|
+
break;
|
|
70551
|
+
case 7:
|
|
70552
|
+
_context4.p = 7;
|
|
70553
|
+
_t = _context4.v;
|
|
70554
|
+
console.warn('[Iframe] failed to fetch app config/permissions from shell:', _t);
|
|
70555
|
+
case 8:
|
|
70556
|
+
render(initialUri, rootNode);
|
|
70557
|
+
case 9:
|
|
70558
|
+
return _context4.a(2);
|
|
70559
|
+
}
|
|
70560
|
+
}, _callee4, null, [[5, 7]]);
|
|
70561
|
+
}));
|
|
70562
|
+
return _bootstrapIframeApp.apply(this, arguments);
|
|
70563
|
+
}
|
|
70564
|
+
|
|
70565
|
+
function normalizeIframePath(uri) {
|
|
70566
|
+
if (uri === '' || uri == null) return '/';
|
|
70567
|
+
return uri.startsWith('/') ? uri : "/".concat(uri);
|
|
70568
|
+
}
|
|
70569
|
+
function buildIframeAppUri() {
|
|
70570
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
70571
|
+
_ref$pathname = _ref.pathname,
|
|
70572
|
+
pathname = _ref$pathname === void 0 ? '/' : _ref$pathname,
|
|
70573
|
+
_ref$search = _ref.search,
|
|
70574
|
+
search = _ref$search === void 0 ? '' : _ref$search,
|
|
70575
|
+
_ref$hash = _ref.hash,
|
|
70576
|
+
hash = _ref$hash === void 0 ? '' : _ref$hash;
|
|
70577
|
+
var path = pathname || '/';
|
|
70578
|
+
return "".concat(path).concat(search || '').concat(hash || '');
|
|
70579
|
+
}
|
|
70580
|
+
|
|
70581
|
+
/**
|
|
70582
|
+
* Resolve LOAD_URI target without stripping in-app query params.
|
|
70583
|
+
* Shell often sends pathname-only; preserve existing search when paths match.
|
|
70584
|
+
*/
|
|
70585
|
+
function resolveLoadUriTarget(eventProps) {
|
|
70586
|
+
var currentLocation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
70587
|
+
var target = normalizeIframePath(eventProps === null || eventProps === void 0 ? void 0 : eventProps.uri);
|
|
70588
|
+
var currentPath = currentLocation.pathname || '/';
|
|
70589
|
+
var hasIncomingQuery = target.includes('?') || target.includes('#');
|
|
70590
|
+
if (!hasIncomingQuery && target === currentPath && (currentLocation.search || currentLocation.hash)) {
|
|
70591
|
+
return buildIframeAppUri(currentLocation);
|
|
70592
|
+
}
|
|
70593
|
+
return target;
|
|
70594
|
+
}
|
|
70595
|
+
|
|
70596
|
+
/**
|
|
70597
|
+
* True when the host app uses react-router-dom v6+ (`useNavigate` present, `useHistory` removed).
|
|
70598
|
+
*/
|
|
70599
|
+
var IS_REACT_ROUTER_V6 = typeof ReactRouterDOM__namespace.useNavigate === 'function' && typeof ReactRouterDOM__namespace.useHistory !== 'function';
|
|
70600
|
+
function normalizeNavigateTarget(to) {
|
|
70601
|
+
if (typeof to === 'string') return normalizeIframePath(to);
|
|
70602
|
+
return to;
|
|
70603
|
+
}
|
|
70604
|
+
function useRouterNavigationV5() {
|
|
70605
|
+
var history = ReactRouterDOM__namespace.useHistory();
|
|
70606
|
+
var location = ReactRouterDOM__namespace.useLocation();
|
|
70607
|
+
var navigate = React.useCallback(function (to, options) {
|
|
70608
|
+
if (typeof to === 'number') {
|
|
70609
|
+
history.go(to);
|
|
70610
|
+
return;
|
|
70611
|
+
}
|
|
70612
|
+
var target = normalizeNavigateTarget(to);
|
|
70613
|
+
if ((options === null || options === void 0 ? void 0 : options.state) != null) history.push(target, options.state);else if (options !== null && options !== void 0 && options.replace) history.replace(target);else history.push(target);
|
|
70614
|
+
}, [history]);
|
|
70615
|
+
return {
|
|
70616
|
+
navigate: navigate,
|
|
70617
|
+
location: location
|
|
70618
|
+
};
|
|
70619
|
+
}
|
|
70620
|
+
function useRouterNavigationV6() {
|
|
70621
|
+
var navigateFn = ReactRouterDOM__namespace.useNavigate();
|
|
70622
|
+
var location = ReactRouterDOM__namespace.useLocation();
|
|
70623
|
+
var navigate = React.useCallback(function (to, options) {
|
|
70624
|
+
if (typeof to === 'number') {
|
|
70625
|
+
navigateFn(to);
|
|
70626
|
+
return;
|
|
70627
|
+
}
|
|
70628
|
+
var target = normalizeNavigateTarget(to);
|
|
70629
|
+
if ((options === null || options === void 0 ? void 0 : options.state) != null || options !== null && options !== void 0 && options.replace) {
|
|
70630
|
+
navigateFn(target, {
|
|
70631
|
+
state: options === null || options === void 0 ? void 0 : options.state,
|
|
70632
|
+
replace: options === null || options === void 0 ? void 0 : options.replace
|
|
70633
|
+
});
|
|
70634
|
+
} else {
|
|
70635
|
+
navigateFn(target);
|
|
70636
|
+
}
|
|
70637
|
+
}, [navigateFn]);
|
|
70638
|
+
return {
|
|
70639
|
+
navigate: navigate,
|
|
70640
|
+
location: location
|
|
70641
|
+
};
|
|
70642
|
+
}
|
|
70643
|
+
|
|
70644
|
+
/**
|
|
70645
|
+
* Router-agnostic navigation for iframe shell components.
|
|
70646
|
+
* Uses `useHistory` on react-router-dom v5 and `useNavigate` on v6.
|
|
70647
|
+
*/
|
|
70648
|
+
var useRouterNavigation = IS_REACT_ROUTER_V6 ? useRouterNavigationV6 : useRouterNavigationV5;
|
|
70649
|
+
|
|
70650
|
+
function IframeRouteSync(_ref) {
|
|
70651
|
+
var _ref$updateUriIsPath = _ref.updateUriIsPath,
|
|
70652
|
+
updateUriIsPath = _ref$updateUriIsPath === void 0 ? false : _ref$updateUriIsPath,
|
|
70653
|
+
_ref$suppressEcho = _ref.suppressEcho,
|
|
70654
|
+
suppressEcho = _ref$suppressEcho === void 0 ? true : _ref$suppressEcho;
|
|
70655
|
+
var _useRouterNavigation = useRouterNavigation(),
|
|
70656
|
+
navigate = _useRouterNavigation.navigate,
|
|
70657
|
+
location = _useRouterNavigation.location;
|
|
70658
|
+
var initialRef = React.useRef(true);
|
|
70659
|
+
var suppressUpdateUriRef = React.useRef(false);
|
|
70660
|
+
var locationRef = React.useRef(location);
|
|
70661
|
+
locationRef.current = location;
|
|
70662
|
+
React.useEffect(function () {
|
|
70663
|
+
var remove = addMessageListener(function (data) {
|
|
70664
|
+
if (data.eventType === 'LOAD_URI' && data.eventProps) {
|
|
70665
|
+
var currentLocation = locationRef.current;
|
|
70666
|
+
var target = resolveLoadUriTarget(data.eventProps, currentLocation);
|
|
70667
|
+
var currentUri = buildIframeAppUri(currentLocation);
|
|
70668
|
+
if (target === currentUri) return;
|
|
70669
|
+
if (suppressEcho) suppressUpdateUriRef.current = true;
|
|
70670
|
+
navigate(target);
|
|
70671
|
+
}
|
|
70672
|
+
});
|
|
70673
|
+
return remove;
|
|
70674
|
+
}, [navigate, suppressEcho]);
|
|
70675
|
+
React.useEffect(function () {
|
|
70676
|
+
if (initialRef.current) {
|
|
70677
|
+
initialRef.current = false;
|
|
70678
|
+
return;
|
|
70679
|
+
}
|
|
70680
|
+
if (suppressEcho && suppressUpdateUriRef.current) {
|
|
70681
|
+
suppressUpdateUriRef.current = false;
|
|
70682
|
+
return;
|
|
70683
|
+
}
|
|
70684
|
+
postUpdateUri(buildIframeAppUri(location), updateUriIsPath);
|
|
70685
|
+
}, [location.pathname, location.search, location.hash, updateUriIsPath, suppressEcho]);
|
|
70686
|
+
return null;
|
|
70687
|
+
}
|
|
70688
|
+
|
|
70689
|
+
function serializeCountStatusThresholds(thresholds) {
|
|
70690
|
+
if (!Array.isArray(thresholds)) return undefined;
|
|
70691
|
+
var serialized = thresholds.filter(function (t) {
|
|
70692
|
+
return t && t.status != null && (t.above != null || t.min != null);
|
|
70693
|
+
}).map(function (t) {
|
|
70694
|
+
var entry = {
|
|
70695
|
+
status: t.status
|
|
70696
|
+
};
|
|
70697
|
+
if (t.above != null) entry.above = t.above;
|
|
70698
|
+
if (t.min != null) entry.min = t.min;
|
|
70699
|
+
return entry;
|
|
70700
|
+
});
|
|
70701
|
+
return serialized.length > 0 ? serialized : undefined;
|
|
70702
|
+
}
|
|
70703
|
+
function serializeNavItems(items) {
|
|
70704
|
+
if (!Array.isArray(items)) return [];
|
|
70705
|
+
return items.map(function (item) {
|
|
70706
|
+
var serialized = {
|
|
70707
|
+
name: item.name,
|
|
70708
|
+
route: item.route
|
|
70709
|
+
};
|
|
70710
|
+
if (item.icon && typeof item.icon === 'string') serialized.icon = item.icon;
|
|
70711
|
+
if (typeof item.disabled === 'function') {
|
|
70712
|
+
try {
|
|
70713
|
+
serialized.disabled = item.disabled();
|
|
70714
|
+
} catch (_) {
|
|
70715
|
+
serialized.disabled = false;
|
|
70716
|
+
}
|
|
70717
|
+
} else if (typeof item.disabled === 'boolean') {
|
|
70718
|
+
serialized.disabled = item.disabled;
|
|
70719
|
+
}
|
|
70720
|
+
if (typeof item.hidden === 'function') {
|
|
70721
|
+
try {
|
|
70722
|
+
serialized.hidden = item.hidden();
|
|
70723
|
+
} catch (_) {
|
|
70724
|
+
serialized.hidden = false;
|
|
70725
|
+
}
|
|
70726
|
+
} else if (typeof item.hidden === 'boolean') {
|
|
70727
|
+
serialized.hidden = item.hidden;
|
|
70728
|
+
}
|
|
70729
|
+
if (item.isLandingPage) serialized.isLandingPage = true;
|
|
70730
|
+
if (typeof item.statusColorPosition === 'string') {
|
|
70731
|
+
serialized.statusColorPosition = item.statusColorPosition;
|
|
70732
|
+
}
|
|
70733
|
+
var thresholds = serializeCountStatusThresholds(item.countStatusThresholds);
|
|
70734
|
+
if (thresholds) serialized.countStatusThresholds = thresholds;
|
|
70735
|
+
if (item.subMenuItems && item.subMenuItems.length > 0) {
|
|
70736
|
+
serialized.subMenuItems = serializeNavItems(item.subMenuItems);
|
|
70737
|
+
}
|
|
70738
|
+
return serialized;
|
|
70739
|
+
});
|
|
70740
|
+
}
|
|
70741
|
+
|
|
70742
|
+
function NavConfigSender(_ref) {
|
|
70743
|
+
var navItemsLoader = _ref.navItemsLoader,
|
|
70744
|
+
onError = _ref.onError;
|
|
70745
|
+
var sentRef = React.useRef(false);
|
|
70746
|
+
React.useEffect(function () {
|
|
70747
|
+
if (sentRef.current || !navItemsLoader) return;
|
|
70748
|
+
sentRef.current = true;
|
|
70749
|
+
navItemsLoader().then(function (mod) {
|
|
70750
|
+
var items = mod && (mod.default != null ? mod.default : mod);
|
|
70751
|
+
postNavConfig(serializeNavItems(items));
|
|
70752
|
+
}).catch(function (err) {
|
|
70753
|
+
if (onError) {
|
|
70754
|
+
onError(err);
|
|
70755
|
+
} else {
|
|
70756
|
+
console.warn('[Iframe] Failed to load navItems:', err);
|
|
70757
|
+
}
|
|
70758
|
+
});
|
|
70759
|
+
}, [navItemsLoader, onError]);
|
|
70760
|
+
return null;
|
|
70761
|
+
}
|
|
70762
|
+
|
|
70763
|
+
function resolveCountsLoader(mod) {
|
|
70764
|
+
if (!mod) return null;
|
|
70765
|
+
if (typeof mod === 'function') return mod;
|
|
70766
|
+
if (typeof mod.default === 'function') return mod.default;
|
|
70767
|
+
if (typeof mod.getNavCounts === 'function') return mod.getNavCounts;
|
|
70768
|
+
return null;
|
|
70769
|
+
}
|
|
70770
|
+
function NavCountsResponder(_ref) {
|
|
70771
|
+
var countsLoader = _ref.countsLoader,
|
|
70772
|
+
onError = _ref.onError;
|
|
70773
|
+
React.useEffect(function () {
|
|
70774
|
+
if (!countsLoader) return undefined;
|
|
70775
|
+
return addMessageListener(function (data) {
|
|
70776
|
+
if (!data || data.eventType !== IFRAME_EVENTS.REQUEST_NAV_COUNTS) return;
|
|
70777
|
+
var _ref2 = data.eventProps || {},
|
|
70778
|
+
menuItemName = _ref2.menuItemName,
|
|
70779
|
+
requestId = _ref2.requestId;
|
|
70780
|
+
Promise.resolve().then(function () {
|
|
70781
|
+
return countsLoader();
|
|
70782
|
+
}).then(function (mod) {
|
|
70783
|
+
var loader = resolveCountsLoader(mod);
|
|
70784
|
+
if (!loader) throw new Error('[NavCountsResponder] countsLoader must export a function');
|
|
70785
|
+
return loader(menuItemName);
|
|
70786
|
+
}).then(function (countsByMenu) {
|
|
70787
|
+
return postNavCountsResponse(requestId, countsByMenu || {});
|
|
70788
|
+
}).catch(function (err) {
|
|
70789
|
+
postNavCountsResponse(requestId, {}); // always respond so the shell spinner clears
|
|
70790
|
+
if (onError) onError(err);else console.warn('[NavCountsResponder] Failed to load/post nav counts:', err);
|
|
70791
|
+
});
|
|
70792
|
+
});
|
|
70793
|
+
}, [countsLoader, onError]);
|
|
70794
|
+
return null;
|
|
70795
|
+
}
|
|
70796
|
+
|
|
70797
|
+
function defaultRenderError() {
|
|
70798
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
70799
|
+
role: "alert",
|
|
70800
|
+
style: {
|
|
70801
|
+
padding: 24,
|
|
70802
|
+
textAlign: 'center'
|
|
70803
|
+
}
|
|
70804
|
+
}, /*#__PURE__*/React__default["default"].createElement("h2", null, "Unable to load this application"), /*#__PURE__*/React__default["default"].createElement("p", null, "Your permissions could not be loaded from the portal. Please refresh the page."));
|
|
70805
|
+
}
|
|
70806
|
+
function IframeAppShell(_ref) {
|
|
70807
|
+
var children = _ref.children,
|
|
70808
|
+
permissionKey = _ref.permissionKey,
|
|
70809
|
+
onPermissionsReady = _ref.onPermissionsReady,
|
|
70810
|
+
navItemsLoader = _ref.navItemsLoader,
|
|
70811
|
+
navConfigOnError = _ref.navConfigOnError,
|
|
70812
|
+
countsLoader = _ref.countsLoader,
|
|
70813
|
+
navCountsOnError = _ref.navCountsOnError,
|
|
70814
|
+
_ref$updateUriIsPath = _ref.updateUriIsPath,
|
|
70815
|
+
updateUriIsPath = _ref$updateUriIsPath === void 0 ? false : _ref$updateUriIsPath,
|
|
70816
|
+
renderError = _ref.renderError;
|
|
70817
|
+
var _useRouterNavigation = useRouterNavigation(),
|
|
70818
|
+
navigate = _useRouterNavigation.navigate;
|
|
70819
|
+
var key = permissionKey || "".concat(getAppName(), ":permissions");
|
|
70820
|
+
var ready = Array.isArray(storage$1.getLocalItem(key));
|
|
70821
|
+
React.useEffect(function () {
|
|
70822
|
+
if (ready && onPermissionsReady) onPermissionsReady();
|
|
70823
|
+
}, [ready, onPermissionsReady]);
|
|
70824
|
+
return /*#__PURE__*/React__default["default"].createElement(CrumbProvider, {
|
|
70825
|
+
navigate: navigate
|
|
70826
|
+
}, /*#__PURE__*/React__default["default"].createElement(IframeRouteSync, {
|
|
70827
|
+
updateUriIsPath: updateUriIsPath
|
|
70828
|
+
}), ready ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, navItemsLoader ? /*#__PURE__*/React__default["default"].createElement(NavConfigSender, {
|
|
70829
|
+
navItemsLoader: navItemsLoader,
|
|
70830
|
+
onError: navConfigOnError
|
|
70831
|
+
}) : null, countsLoader ? /*#__PURE__*/React__default["default"].createElement(NavCountsResponder, {
|
|
70832
|
+
countsLoader: countsLoader,
|
|
70833
|
+
onError: navCountsOnError
|
|
70834
|
+
}) : null, children) : (renderError || defaultRenderError)());
|
|
70835
|
+
}
|
|
70836
|
+
|
|
69237
70837
|
setup({
|
|
69238
70838
|
pkg: pkg
|
|
69239
70839
|
});
|
|
@@ -80817,8 +82417,12 @@ exports.AutoRefresh = AutoRefresh;
|
|
|
80817
82417
|
exports.CallLogger = CallLogger;
|
|
80818
82418
|
exports.ContextualHelp = ContextualHelp;
|
|
80819
82419
|
exports.Crumb = Crumb$1;
|
|
82420
|
+
exports.IframeAppShell = IframeAppShell;
|
|
80820
82421
|
exports.accessHelpers = accessHelpers$1;
|
|
82422
|
+
exports.bootstrapIframeApp = bootstrapIframeApp;
|
|
82423
|
+
exports.buildNavCountEntry = buildNavCountEntry;
|
|
80821
82424
|
exports.fetcher = fetcher$1;
|
|
80822
82425
|
exports.iframeFacade = iframeFacade;
|
|
82426
|
+
exports.normalizeIframePath = normalizeIframePath;
|
|
80823
82427
|
exports.storage = storage$2;
|
|
80824
82428
|
//# sourceMappingURL=ops-tool-kit.js.map
|