@copart/ops-tool-kit 1.8.1-alpha.10 → 1.8.1-alpha.12
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 +387 -2549
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -29,11 +29,11 @@ function _interopNamespace(e) {
|
|
|
29
29
|
|
|
30
30
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
31
31
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
|
-
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
33
32
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
33
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$f = "@copart/ops-tool-kit";
|
|
36
|
-
const version$5 = "1.8.1-alpha.
|
|
36
|
+
const version$5 = "1.8.1-alpha.12";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -182,9 +182,10 @@ var setup = (function (_ref) {
|
|
|
182
182
|
|
|
183
183
|
global.setUpInstana = function () {
|
|
184
184
|
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
185
|
+
var isCoreApp = arguments.length > 1 ? arguments[1] : undefined;
|
|
185
186
|
|
|
186
187
|
//devOnly.log('Instana setting up.')
|
|
187
|
-
if (key && !(process.env.NODE_ENV !== "production") &&
|
|
188
|
+
if (key && !(process.env.NODE_ENV !== "production") && isCoreApp) {
|
|
188
189
|
|
|
189
190
|
(function (i, s, o, g, r, a, m) {
|
|
190
191
|
i['InstanaEumObject'] = r;
|
|
@@ -288,7 +289,7 @@ function _asyncToGenerator(fn) {
|
|
|
288
289
|
};
|
|
289
290
|
}
|
|
290
291
|
|
|
291
|
-
function _classCallCheck
|
|
292
|
+
function _classCallCheck(instance, Constructor) {
|
|
292
293
|
if (!(instance instanceof Constructor)) {
|
|
293
294
|
throw new TypeError("Cannot call a class as a function");
|
|
294
295
|
}
|
|
@@ -304,7 +305,7 @@ function _defineProperties(target, props) {
|
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
307
|
|
|
307
|
-
function _createClass
|
|
308
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
308
309
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
309
310
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
310
311
|
return Constructor;
|
|
@@ -377,7 +378,7 @@ function _objectSpread2(target) {
|
|
|
377
378
|
return target;
|
|
378
379
|
}
|
|
379
380
|
|
|
380
|
-
function _inherits
|
|
381
|
+
function _inherits(subClass, superClass) {
|
|
381
382
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
382
383
|
throw new TypeError("Super expression must either be null or a function");
|
|
383
384
|
}
|
|
@@ -452,7 +453,7 @@ function _assertThisInitialized(self) {
|
|
|
452
453
|
return self;
|
|
453
454
|
}
|
|
454
455
|
|
|
455
|
-
function _possibleConstructorReturn
|
|
456
|
+
function _possibleConstructorReturn(self, call) {
|
|
456
457
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
457
458
|
return call;
|
|
458
459
|
}
|
|
@@ -2755,17 +2756,22 @@ var clearStorage = function clearStorage() {
|
|
|
2755
2756
|
};
|
|
2756
2757
|
|
|
2757
2758
|
var createOpsStorage = function createOpsStorage() {
|
|
2758
|
-
var APP_NAME = process.env.APP_NAME;
|
|
2759
2759
|
return {
|
|
2760
2760
|
getLocalItem: getLocalItem,
|
|
2761
2761
|
setLocalItem: setLocalItem,
|
|
2762
2762
|
getSessionItem: getSessionItem,
|
|
2763
2763
|
setSessionItem: setSessionItem,
|
|
2764
2764
|
setItem: function setItem(key, value) {
|
|
2765
|
+
var _window;
|
|
2766
|
+
|
|
2767
|
+
var APP_NAME = ((_window = window) === null || _window === void 0 ? void 0 : _window.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
|
|
2765
2768
|
setLocalItem("".concat(APP_NAME, ":").concat(key), value);
|
|
2766
2769
|
return value;
|
|
2767
2770
|
},
|
|
2768
2771
|
getItem: function getItem(key) {
|
|
2772
|
+
var _window2;
|
|
2773
|
+
|
|
2774
|
+
var APP_NAME = ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
|
|
2769
2775
|
var value = getLocalItem("".concat(APP_NAME, ":").concat(key));
|
|
2770
2776
|
return value;
|
|
2771
2777
|
},
|
|
@@ -2791,15 +2797,18 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2791
2797
|
},
|
|
2792
2798
|
|
|
2793
2799
|
get currentAppPermissions() {
|
|
2800
|
+
var _window3, _window4;
|
|
2801
|
+
|
|
2794
2802
|
var appTiles = storage$1.getLocalItem('opsportal-core:config').tiles || [];
|
|
2803
|
+
var appName = ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
|
|
2795
2804
|
var appData = appTiles.find(function (tile) {
|
|
2796
2805
|
if (tile.appName) {
|
|
2797
|
-
return tile.appName ===
|
|
2806
|
+
return tile.appName === appName;
|
|
2798
2807
|
} else {
|
|
2799
|
-
return tile.path === "/".concat(
|
|
2808
|
+
return tile.path === "/".concat(appName);
|
|
2800
2809
|
}
|
|
2801
2810
|
});
|
|
2802
|
-
var appAuthName = appData ? appData.appAuthName : process.env.APP_AUTH_NAME;
|
|
2811
|
+
var appAuthName = appData ? appData.appAuthName : ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.APP_AUTH_NAME) ? window.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
2803
2812
|
return appAuthName ? storage$1.getLocalItem("".concat(appAuthName, ":permissions")) : [];
|
|
2804
2813
|
},
|
|
2805
2814
|
|
|
@@ -2970,15 +2979,15 @@ var withBreadcrumbs = function withBreadcrumbs(Comp) {
|
|
|
2970
2979
|
return (
|
|
2971
2980
|
/*#__PURE__*/
|
|
2972
2981
|
function (_React$Component) {
|
|
2973
|
-
_inherits
|
|
2982
|
+
_inherits(_class, _React$Component);
|
|
2974
2983
|
|
|
2975
2984
|
function _class() {
|
|
2976
|
-
_classCallCheck
|
|
2985
|
+
_classCallCheck(this, _class);
|
|
2977
2986
|
|
|
2978
|
-
return _possibleConstructorReturn
|
|
2987
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
|
2979
2988
|
}
|
|
2980
2989
|
|
|
2981
|
-
_createClass
|
|
2990
|
+
_createClass(_class, [{
|
|
2982
2991
|
key: "render",
|
|
2983
2992
|
value: function render() {
|
|
2984
2993
|
var _this = this;
|
|
@@ -2997,7 +3006,10 @@ var withBreadcrumbs = function withBreadcrumbs(Comp) {
|
|
|
2997
3006
|
};
|
|
2998
3007
|
|
|
2999
3008
|
var goHome = function goHome(props) {
|
|
3000
|
-
|
|
3009
|
+
var _window$toolkitEnv;
|
|
3010
|
+
|
|
3011
|
+
var isCoreApp = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.IS_CORE_APP) ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
3012
|
+
return isCoreApp ? function () {
|
|
3001
3013
|
return props.history.push('/');
|
|
3002
3014
|
} : function () {
|
|
3003
3015
|
return window.location.assign('/');
|
|
@@ -3056,14 +3068,14 @@ var nonSecure = function (size) {
|
|
|
3056
3068
|
var BreadcrumbsProvider =
|
|
3057
3069
|
/*#__PURE__*/
|
|
3058
3070
|
function (_React$Component) {
|
|
3059
|
-
_inherits
|
|
3071
|
+
_inherits(BreadcrumbsProvider, _React$Component);
|
|
3060
3072
|
|
|
3061
3073
|
function BreadcrumbsProvider(props) {
|
|
3062
3074
|
var _this;
|
|
3063
3075
|
|
|
3064
|
-
_classCallCheck
|
|
3076
|
+
_classCallCheck(this, BreadcrumbsProvider);
|
|
3065
3077
|
|
|
3066
|
-
_this = _possibleConstructorReturn
|
|
3078
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbsProvider).call(this, props));
|
|
3067
3079
|
|
|
3068
3080
|
_defineProperty(_assertThisInitialized(_this), "crumbIds", new Set());
|
|
3069
3081
|
|
|
@@ -3101,7 +3113,7 @@ function (_React$Component) {
|
|
|
3101
3113
|
return _this;
|
|
3102
3114
|
}
|
|
3103
3115
|
|
|
3104
|
-
_createClass
|
|
3116
|
+
_createClass(BreadcrumbsProvider, [{
|
|
3105
3117
|
key: "render",
|
|
3106
3118
|
value: function render() {
|
|
3107
3119
|
return React__namespace.createElement(Context.Provider, {
|
|
@@ -3125,27 +3137,27 @@ var getCrumbProps = function getCrumbProps(props) {
|
|
|
3125
3137
|
var Crumb = withBreadcrumbs(_class =
|
|
3126
3138
|
/*#__PURE__*/
|
|
3127
3139
|
function (_React$Component) {
|
|
3128
|
-
_inherits
|
|
3140
|
+
_inherits(Crumb, _React$Component);
|
|
3129
3141
|
|
|
3130
3142
|
function Crumb() {
|
|
3131
3143
|
var _getPrototypeOf2;
|
|
3132
3144
|
|
|
3133
3145
|
var _this;
|
|
3134
3146
|
|
|
3135
|
-
_classCallCheck
|
|
3147
|
+
_classCallCheck(this, Crumb);
|
|
3136
3148
|
|
|
3137
3149
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3138
3150
|
args[_key] = arguments[_key];
|
|
3139
3151
|
}
|
|
3140
3152
|
|
|
3141
|
-
_this = _possibleConstructorReturn
|
|
3153
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Crumb)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3142
3154
|
|
|
3143
3155
|
_defineProperty(_assertThisInitialized(_this), "crumbId", nonSecure());
|
|
3144
3156
|
|
|
3145
3157
|
return _this;
|
|
3146
3158
|
}
|
|
3147
3159
|
|
|
3148
|
-
_createClass
|
|
3160
|
+
_createClass(Crumb, [{
|
|
3149
3161
|
key: "componentDidMount",
|
|
3150
3162
|
value: function componentDidMount() {
|
|
3151
3163
|
var crumbProps = getCrumbProps(this.props);
|
|
@@ -6214,11 +6226,14 @@ var countryCodeMapper = {
|
|
|
6214
6226
|
uk: 'UK',
|
|
6215
6227
|
g: 'DE'
|
|
6216
6228
|
};
|
|
6217
|
-
var countryCode = countryCodeMapper[process.env.STACK];
|
|
6218
6229
|
var clientName = 'OPS'; // TODO use from config
|
|
6219
6230
|
|
|
6220
6231
|
var handleHeaderVersion = function handleHeaderVersion(config) {
|
|
6221
|
-
|
|
6232
|
+
var _window$toolkitEnv;
|
|
6233
|
+
|
|
6234
|
+
var stack = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
6235
|
+
|
|
6236
|
+
if (config.url.indexOf('referencedata-ws') !== -1 || stack === 'g') {
|
|
6222
6237
|
config.headers.Version = '2.0';
|
|
6223
6238
|
}
|
|
6224
6239
|
};
|
|
@@ -6230,8 +6245,11 @@ var handleRole = function handleRole(config) {
|
|
|
6230
6245
|
};
|
|
6231
6246
|
|
|
6232
6247
|
var handleHeaders = function handleHeaders(config) {
|
|
6248
|
+
var _window$toolkitEnv2;
|
|
6249
|
+
|
|
6250
|
+
var stack = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
6251
|
+
var countryCode = countryCodeMapper[stack];
|
|
6233
6252
|
handleHeaderVersion(config);
|
|
6234
|
-
var stack = process.env.STACK;
|
|
6235
6253
|
var countryCodeFromStorage = storage$1.activeCountry || countryCode;
|
|
6236
6254
|
var headers = config.headers;
|
|
6237
6255
|
var accessToken = storage$1.accessToken;
|
|
@@ -6307,15 +6325,13 @@ function () {
|
|
|
6307
6325
|
while (1) {
|
|
6308
6326
|
switch (_context.prev = _context.next) {
|
|
6309
6327
|
case 0:
|
|
6310
|
-
process.env.NODE_ENV !== "production" && console.error('fetcher request error: ', error);
|
|
6311
|
-
|
|
6312
6328
|
if (!((error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 401)) {
|
|
6313
|
-
_context.next =
|
|
6329
|
+
_context.next = 14;
|
|
6314
6330
|
break;
|
|
6315
6331
|
}
|
|
6316
6332
|
|
|
6317
6333
|
if (!('refreshTokenExpired' in error.response.data)) {
|
|
6318
|
-
_context.next =
|
|
6334
|
+
_context.next = 4;
|
|
6319
6335
|
break;
|
|
6320
6336
|
}
|
|
6321
6337
|
|
|
@@ -6323,30 +6339,30 @@ function () {
|
|
|
6323
6339
|
storage$1.setSessionItem('redirectUrl', window.location.href);
|
|
6324
6340
|
return _context.abrupt("return", storage$1.logout());
|
|
6325
6341
|
|
|
6326
|
-
case
|
|
6342
|
+
case 4:
|
|
6327
6343
|
if (store.isRefreshing) {
|
|
6328
|
-
_context.next =
|
|
6344
|
+
_context.next = 14;
|
|
6329
6345
|
break;
|
|
6330
6346
|
}
|
|
6331
6347
|
|
|
6332
6348
|
store.isRefreshing = true;
|
|
6333
|
-
_context.next =
|
|
6349
|
+
_context.next = 8;
|
|
6334
6350
|
return refreshToken();
|
|
6335
6351
|
|
|
6336
|
-
case
|
|
6352
|
+
case 8:
|
|
6337
6353
|
_context.sent;
|
|
6338
|
-
_context.next =
|
|
6354
|
+
_context.next = 11;
|
|
6339
6355
|
return fetcher.request(error.response.config);
|
|
6340
6356
|
|
|
6341
|
-
case
|
|
6357
|
+
case 11:
|
|
6342
6358
|
final = _context.sent;
|
|
6343
6359
|
store.isRefreshing = false;
|
|
6344
6360
|
return _context.abrupt("return", final);
|
|
6345
6361
|
|
|
6346
|
-
case
|
|
6362
|
+
case 14:
|
|
6347
6363
|
return _context.abrupt("return", Promise.reject(error));
|
|
6348
6364
|
|
|
6349
|
-
case
|
|
6365
|
+
case 15:
|
|
6350
6366
|
case "end":
|
|
6351
6367
|
return _context.stop();
|
|
6352
6368
|
}
|
|
@@ -6458,11 +6474,14 @@ function () {
|
|
|
6458
6474
|
};
|
|
6459
6475
|
}();
|
|
6460
6476
|
var findAppData = function findAppData(tiles) {
|
|
6477
|
+
var _window$toolkitEnv;
|
|
6478
|
+
|
|
6479
|
+
var appName = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
6461
6480
|
var matchingTiles = tiles.filter(function (tile) {
|
|
6462
6481
|
if (tile.appName) {
|
|
6463
|
-
return tile.appName ===
|
|
6482
|
+
return tile.appName === appName;
|
|
6464
6483
|
} else {
|
|
6465
|
-
return tile.path === "/".concat(
|
|
6484
|
+
return tile.path === "/".concat(appName);
|
|
6466
6485
|
}
|
|
6467
6486
|
});
|
|
6468
6487
|
|
|
@@ -6481,20 +6500,24 @@ function () {
|
|
|
6481
6500
|
var _ref2 = _asyncToGenerator(
|
|
6482
6501
|
/*#__PURE__*/
|
|
6483
6502
|
regenerator.mark(function _callee2() {
|
|
6484
|
-
var
|
|
6503
|
+
var _window$toolkitEnv2;
|
|
6504
|
+
|
|
6505
|
+
var coreConfigUri, config;
|
|
6485
6506
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
6486
6507
|
while (1) {
|
|
6487
6508
|
switch (_context2.prev = _context2.next) {
|
|
6488
6509
|
case 0:
|
|
6489
|
-
|
|
6490
|
-
return getConfig(process.env.CORE_CONFIG_URI);
|
|
6510
|
+
coreConfigUri = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.CORE_CONFIG_URI) ? window.toolkitEnv.CORE_CONFIG_URI : process.env.CORE_CONFIG_URI; // This is for fetching core app configs only
|
|
6491
6511
|
|
|
6492
|
-
|
|
6512
|
+
_context2.next = 3;
|
|
6513
|
+
return getConfig(coreConfigUri);
|
|
6514
|
+
|
|
6515
|
+
case 3:
|
|
6493
6516
|
config = _context2.sent;
|
|
6494
6517
|
storage.setLocalItem('opsportal-core:config', config);
|
|
6495
6518
|
return _context2.abrupt("return", findAppData(config.tiles || []));
|
|
6496
6519
|
|
|
6497
|
-
case
|
|
6520
|
+
case 6:
|
|
6498
6521
|
case "end":
|
|
6499
6522
|
return _context2.stop();
|
|
6500
6523
|
}
|
|
@@ -6659,10 +6682,12 @@ exports.all = function () {
|
|
|
6659
6682
|
};
|
|
6660
6683
|
});
|
|
6661
6684
|
|
|
6662
|
-
var stack$1 = process.env.STACK;
|
|
6663
|
-
|
|
6664
6685
|
var getDefaultYard = function getDefaultYard(country) {
|
|
6665
|
-
|
|
6686
|
+
var _window$toolkitEnv;
|
|
6687
|
+
|
|
6688
|
+
var stack = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
6689
|
+
|
|
6690
|
+
if (stack === 'uk') {
|
|
6666
6691
|
return {
|
|
6667
6692
|
name: "COPART UK",
|
|
6668
6693
|
number: 400,
|
|
@@ -6782,19 +6807,22 @@ function () {
|
|
|
6782
6807
|
var _ref = _asyncToGenerator(
|
|
6783
6808
|
/*#__PURE__*/
|
|
6784
6809
|
regenerator.mark(function _callee() {
|
|
6785
|
-
var
|
|
6810
|
+
var _window$toolkitEnv2;
|
|
6811
|
+
|
|
6812
|
+
var configUri, config;
|
|
6786
6813
|
return regenerator.wrap(function _callee$(_context) {
|
|
6787
6814
|
while (1) {
|
|
6788
6815
|
switch (_context.prev = _context.next) {
|
|
6789
6816
|
case 0:
|
|
6790
|
-
|
|
6791
|
-
|
|
6817
|
+
configUri = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.CONFIG_URI) ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
|
|
6818
|
+
_context.next = 3;
|
|
6819
|
+
return fetcher.getConfig(configUri);
|
|
6792
6820
|
|
|
6793
|
-
case
|
|
6821
|
+
case 3:
|
|
6794
6822
|
config = _context.sent;
|
|
6795
6823
|
storage$1.setItem('config', config);
|
|
6796
6824
|
|
|
6797
|
-
case
|
|
6825
|
+
case 5:
|
|
6798
6826
|
case "end":
|
|
6799
6827
|
return _context.stop();
|
|
6800
6828
|
}
|
|
@@ -6839,7 +6867,9 @@ function () {
|
|
|
6839
6867
|
var _ref2 = _asyncToGenerator(
|
|
6840
6868
|
/*#__PURE__*/
|
|
6841
6869
|
regenerator.mark(function _callee2(loginData) {
|
|
6842
|
-
var
|
|
6870
|
+
var _window$toolkitEnv3;
|
|
6871
|
+
|
|
6872
|
+
var stack, hasCasAccess, yardList, entitySamID, entityID, entityCasID, userDetails, noCasAccess, userCountryCode, defaultYard;
|
|
6843
6873
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
6844
6874
|
while (1) {
|
|
6845
6875
|
switch (_context2.prev = _context2.next) {
|
|
@@ -6875,8 +6905,10 @@ function () {
|
|
|
6875
6905
|
return getAndStoreConfig();
|
|
6876
6906
|
|
|
6877
6907
|
case 10:
|
|
6878
|
-
|
|
6879
|
-
|
|
6908
|
+
stack = ((_window$toolkitEnv3 = window.toolkitEnv) === null || _window$toolkitEnv3 === void 0 ? void 0 : _window$toolkitEnv3.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
6909
|
+
|
|
6910
|
+
if (!(stack !== 'g')) {
|
|
6911
|
+
_context2.next = 44;
|
|
6880
6912
|
break;
|
|
6881
6913
|
}
|
|
6882
6914
|
|
|
@@ -6888,54 +6920,54 @@ function () {
|
|
|
6888
6920
|
|
|
6889
6921
|
entityCasID = ''; // cas ID (only applies to cas users)
|
|
6890
6922
|
|
|
6891
|
-
_context2.prev =
|
|
6892
|
-
_context2.next =
|
|
6923
|
+
_context2.prev = 17;
|
|
6924
|
+
_context2.next = 20;
|
|
6893
6925
|
return fetcher.getUserDetails();
|
|
6894
6926
|
|
|
6895
|
-
case
|
|
6927
|
+
case 20:
|
|
6896
6928
|
userDetails = _context2.sent;
|
|
6897
6929
|
entityID = userDetails.userId.trim().toUpperCase();
|
|
6898
6930
|
entityCasID = userDetails.userId;
|
|
6899
6931
|
yardList = userDetails.yardList;
|
|
6900
6932
|
hasCasAccess = true;
|
|
6901
|
-
_context2.next =
|
|
6933
|
+
_context2.next = 39;
|
|
6902
6934
|
break;
|
|
6903
6935
|
|
|
6904
|
-
case
|
|
6905
|
-
_context2.prev =
|
|
6906
|
-
_context2.t0 = _context2["catch"](
|
|
6936
|
+
case 27:
|
|
6937
|
+
_context2.prev = 27;
|
|
6938
|
+
_context2.t0 = _context2["catch"](17);
|
|
6907
6939
|
noCasAccess = hasNoCASAccess(_context2.t0) || inactiveCAS(_context2.t0);
|
|
6908
6940
|
|
|
6909
6941
|
if (!(!noCasAccess && hasNoYardAccess(_context2.t0))) {
|
|
6910
|
-
_context2.next =
|
|
6942
|
+
_context2.next = 35;
|
|
6911
6943
|
break;
|
|
6912
6944
|
}
|
|
6913
6945
|
|
|
6914
6946
|
console.log('no yard error: ', _context2.t0);
|
|
6915
6947
|
return _context2.abrupt("return", Promise.reject(hasNoYardAccess));
|
|
6916
6948
|
|
|
6917
|
-
case
|
|
6949
|
+
case 35:
|
|
6918
6950
|
userCountryCode = loginData.entity_country;
|
|
6919
6951
|
defaultYard = getDefaultYard(userCountryCode);
|
|
6920
6952
|
yardList = [defaultYard];
|
|
6921
6953
|
hasCasAccess = false;
|
|
6922
6954
|
|
|
6923
|
-
case
|
|
6955
|
+
case 39:
|
|
6924
6956
|
if (entityCasID) loginData.entity_cas_id = entityCasID;
|
|
6925
6957
|
loginData.entity_id = entityID;
|
|
6926
6958
|
loginData.entity_sam_id = entitySamID;
|
|
6927
6959
|
loginData.yardList = yardList;
|
|
6928
6960
|
loginData.hasCasAccess = hasCasAccess;
|
|
6929
6961
|
|
|
6930
|
-
case
|
|
6962
|
+
case 44:
|
|
6931
6963
|
storeLoginData(loginData);
|
|
6932
6964
|
|
|
6933
|
-
case
|
|
6965
|
+
case 45:
|
|
6934
6966
|
case "end":
|
|
6935
6967
|
return _context2.stop();
|
|
6936
6968
|
}
|
|
6937
6969
|
}
|
|
6938
|
-
}, _callee2, null, [[
|
|
6970
|
+
}, _callee2, null, [[17, 27]]);
|
|
6939
6971
|
}));
|
|
6940
6972
|
|
|
6941
6973
|
return function setupLogin(_x) {
|
|
@@ -7149,9 +7181,10 @@ var querystringify_1 = {
|
|
|
7149
7181
|
parse: parse
|
|
7150
7182
|
};
|
|
7151
7183
|
|
|
7152
|
-
var stack = process.env.STACK.toLowerCase() || 'c';
|
|
7153
|
-
|
|
7154
7184
|
var getCompanyCode = function getCompanyCode() {
|
|
7185
|
+
var _window$toolkitEnv;
|
|
7186
|
+
|
|
7187
|
+
var stack = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
7155
7188
|
if (stack === 'c') return 'COPART';
|
|
7156
7189
|
if (stack === 'uk') return 'COPARTUK';
|
|
7157
7190
|
if (stack === 'g') return storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
@@ -11184,20 +11217,20 @@ styleInject(css_248z$g);
|
|
|
11184
11217
|
var ConfigFetcher =
|
|
11185
11218
|
/*#__PURE__*/
|
|
11186
11219
|
function (_React$Component) {
|
|
11187
|
-
_inherits
|
|
11220
|
+
_inherits(ConfigFetcher, _React$Component);
|
|
11188
11221
|
|
|
11189
11222
|
function ConfigFetcher() {
|
|
11190
11223
|
var _getPrototypeOf2;
|
|
11191
11224
|
|
|
11192
11225
|
var _this;
|
|
11193
11226
|
|
|
11194
|
-
_classCallCheck
|
|
11227
|
+
_classCallCheck(this, ConfigFetcher);
|
|
11195
11228
|
|
|
11196
11229
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11197
11230
|
args[_key] = arguments[_key];
|
|
11198
11231
|
}
|
|
11199
11232
|
|
|
11200
|
-
_this = _possibleConstructorReturn
|
|
11233
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ConfigFetcher)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11201
11234
|
|
|
11202
11235
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
11203
11236
|
gotConfig: false
|
|
@@ -11206,19 +11239,25 @@ function (_React$Component) {
|
|
|
11206
11239
|
return _this;
|
|
11207
11240
|
}
|
|
11208
11241
|
|
|
11209
|
-
_createClass
|
|
11242
|
+
_createClass(ConfigFetcher, [{
|
|
11210
11243
|
key: "componentDidMount",
|
|
11211
11244
|
value: function () {
|
|
11212
11245
|
var _componentDidMount = _asyncToGenerator(
|
|
11213
11246
|
/*#__PURE__*/
|
|
11214
11247
|
regenerator.mark(function _callee() {
|
|
11215
|
-
var
|
|
11248
|
+
var _window$toolkitEnv, _window$toolkitEnv2;
|
|
11249
|
+
|
|
11250
|
+
var isCoreApp, configUri, config;
|
|
11216
11251
|
return regenerator.wrap(function _callee$(_context) {
|
|
11217
11252
|
while (1) {
|
|
11218
11253
|
switch (_context.prev = _context.next) {
|
|
11219
11254
|
case 0:
|
|
11220
|
-
|
|
11221
|
-
|
|
11255
|
+
// If it is the core app and we are on a core route or auth route
|
|
11256
|
+
// and the user is not authenticated, don't fetch config.
|
|
11257
|
+
isCoreApp = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.IS_CORE_APP) ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
11258
|
+
|
|
11259
|
+
if (!(isCoreApp && (isCoreRoute || isAuthRoute) && !storage$1.isAuthenticated)) {
|
|
11260
|
+
_context.next = 3;
|
|
11222
11261
|
break;
|
|
11223
11262
|
}
|
|
11224
11263
|
|
|
@@ -11228,16 +11267,17 @@ function (_React$Component) {
|
|
|
11228
11267
|
};
|
|
11229
11268
|
}));
|
|
11230
11269
|
|
|
11231
|
-
case
|
|
11232
|
-
|
|
11233
|
-
|
|
11270
|
+
case 3:
|
|
11271
|
+
configUri = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.CONFIG_URI) ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
|
|
11272
|
+
_context.next = 6;
|
|
11273
|
+
return fetcher.getConfig(configUri);
|
|
11234
11274
|
|
|
11235
|
-
case
|
|
11275
|
+
case 6:
|
|
11236
11276
|
config = _context.sent;
|
|
11237
11277
|
storage$1.setItem('config', config);
|
|
11238
11278
|
|
|
11239
11279
|
if (config.instanaKey) {
|
|
11240
|
-
window.setUpInstana(config.instanaKey);
|
|
11280
|
+
window.setUpInstana(config.instanaKey, isCoreApp);
|
|
11241
11281
|
}
|
|
11242
11282
|
|
|
11243
11283
|
this.setState(function (state) {
|
|
@@ -11246,7 +11286,7 @@ function (_React$Component) {
|
|
|
11246
11286
|
};
|
|
11247
11287
|
});
|
|
11248
11288
|
|
|
11249
|
-
case
|
|
11289
|
+
case 10:
|
|
11250
11290
|
case "end":
|
|
11251
11291
|
return _context.stop();
|
|
11252
11292
|
}
|
|
@@ -11277,220 +11317,6 @@ function (_React$Component) {
|
|
|
11277
11317
|
return ConfigFetcher;
|
|
11278
11318
|
}(React__namespace.Component);
|
|
11279
11319
|
|
|
11280
|
-
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
11281
|
-
|
|
11282
|
-
var _createClass$1 = function () {
|
|
11283
|
-
function defineProperties(target, props) {
|
|
11284
|
-
for (var i = 0; i < props.length; i++) {
|
|
11285
|
-
var descriptor = props[i];
|
|
11286
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
11287
|
-
descriptor.configurable = true;
|
|
11288
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
11289
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
11290
|
-
}
|
|
11291
|
-
}
|
|
11292
|
-
|
|
11293
|
-
return function (Constructor, protoProps, staticProps) {
|
|
11294
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
11295
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
11296
|
-
return Constructor;
|
|
11297
|
-
};
|
|
11298
|
-
}();
|
|
11299
|
-
|
|
11300
|
-
function _classCallCheck$1(instance, Constructor) {
|
|
11301
|
-
if (!(instance instanceof Constructor)) {
|
|
11302
|
-
throw new TypeError("Cannot call a class as a function");
|
|
11303
|
-
}
|
|
11304
|
-
}
|
|
11305
|
-
|
|
11306
|
-
function _possibleConstructorReturn$1(self, call) {
|
|
11307
|
-
if (!self) {
|
|
11308
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
11309
|
-
}
|
|
11310
|
-
|
|
11311
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
11312
|
-
}
|
|
11313
|
-
|
|
11314
|
-
function _inherits$1(subClass, superClass) {
|
|
11315
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
11316
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
11317
|
-
}
|
|
11318
|
-
|
|
11319
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
11320
|
-
constructor: {
|
|
11321
|
-
value: subClass,
|
|
11322
|
-
enumerable: false,
|
|
11323
|
-
writable: true,
|
|
11324
|
-
configurable: true
|
|
11325
|
-
}
|
|
11326
|
-
});
|
|
11327
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
11328
|
-
}
|
|
11329
|
-
|
|
11330
|
-
var Portal$4 = function (_React$Component) {
|
|
11331
|
-
_inherits$1(Portal, _React$Component);
|
|
11332
|
-
|
|
11333
|
-
function Portal() {
|
|
11334
|
-
_classCallCheck$1(this, Portal);
|
|
11335
|
-
|
|
11336
|
-
return _possibleConstructorReturn$1(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments));
|
|
11337
|
-
}
|
|
11338
|
-
|
|
11339
|
-
_createClass$1(Portal, [{
|
|
11340
|
-
key: 'componentWillUnmount',
|
|
11341
|
-
value: function componentWillUnmount() {
|
|
11342
|
-
if (this.defaultNode) {
|
|
11343
|
-
document.body.removeChild(this.defaultNode);
|
|
11344
|
-
}
|
|
11345
|
-
|
|
11346
|
-
this.defaultNode = null;
|
|
11347
|
-
}
|
|
11348
|
-
}, {
|
|
11349
|
-
key: 'render',
|
|
11350
|
-
value: function render() {
|
|
11351
|
-
if (!canUseDOM) {
|
|
11352
|
-
return null;
|
|
11353
|
-
}
|
|
11354
|
-
|
|
11355
|
-
if (!this.props.node && !this.defaultNode) {
|
|
11356
|
-
this.defaultNode = document.createElement('div');
|
|
11357
|
-
document.body.appendChild(this.defaultNode);
|
|
11358
|
-
}
|
|
11359
|
-
|
|
11360
|
-
return ReactDOM__default["default"].createPortal(this.props.children, this.props.node || this.defaultNode);
|
|
11361
|
-
}
|
|
11362
|
-
}]);
|
|
11363
|
-
|
|
11364
|
-
return Portal;
|
|
11365
|
-
}(React__default["default"].Component);
|
|
11366
|
-
|
|
11367
|
-
Portal$4.propTypes = {
|
|
11368
|
-
children: propTypes$1.node.isRequired,
|
|
11369
|
-
node: propTypes$1.any
|
|
11370
|
-
};
|
|
11371
|
-
var Portalv4 = Portal$4;
|
|
11372
|
-
|
|
11373
|
-
var _createClass = function () {
|
|
11374
|
-
function defineProperties(target, props) {
|
|
11375
|
-
for (var i = 0; i < props.length; i++) {
|
|
11376
|
-
var descriptor = props[i];
|
|
11377
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
11378
|
-
descriptor.configurable = true;
|
|
11379
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
11380
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
11381
|
-
}
|
|
11382
|
-
}
|
|
11383
|
-
|
|
11384
|
-
return function (Constructor, protoProps, staticProps) {
|
|
11385
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
11386
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
11387
|
-
return Constructor;
|
|
11388
|
-
};
|
|
11389
|
-
}();
|
|
11390
|
-
|
|
11391
|
-
function _classCallCheck(instance, Constructor) {
|
|
11392
|
-
if (!(instance instanceof Constructor)) {
|
|
11393
|
-
throw new TypeError("Cannot call a class as a function");
|
|
11394
|
-
}
|
|
11395
|
-
}
|
|
11396
|
-
|
|
11397
|
-
function _possibleConstructorReturn(self, call) {
|
|
11398
|
-
if (!self) {
|
|
11399
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
11400
|
-
}
|
|
11401
|
-
|
|
11402
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
11403
|
-
}
|
|
11404
|
-
|
|
11405
|
-
function _inherits(subClass, superClass) {
|
|
11406
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
11407
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
11408
|
-
}
|
|
11409
|
-
|
|
11410
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
11411
|
-
constructor: {
|
|
11412
|
-
value: subClass,
|
|
11413
|
-
enumerable: false,
|
|
11414
|
-
writable: true,
|
|
11415
|
-
configurable: true
|
|
11416
|
-
}
|
|
11417
|
-
});
|
|
11418
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
11419
|
-
} // This file is a fallback for a consumer who is not yet on React 16
|
|
11420
|
-
|
|
11421
|
-
var Portal$3 = function (_React$Component) {
|
|
11422
|
-
_inherits(Portal, _React$Component);
|
|
11423
|
-
|
|
11424
|
-
function Portal() {
|
|
11425
|
-
_classCallCheck(this, Portal);
|
|
11426
|
-
|
|
11427
|
-
return _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments));
|
|
11428
|
-
}
|
|
11429
|
-
|
|
11430
|
-
_createClass(Portal, [{
|
|
11431
|
-
key: 'componentDidMount',
|
|
11432
|
-
value: function componentDidMount() {
|
|
11433
|
-
this.renderPortal();
|
|
11434
|
-
}
|
|
11435
|
-
}, {
|
|
11436
|
-
key: 'componentDidUpdate',
|
|
11437
|
-
value: function componentDidUpdate(props) {
|
|
11438
|
-
this.renderPortal();
|
|
11439
|
-
}
|
|
11440
|
-
}, {
|
|
11441
|
-
key: 'componentWillUnmount',
|
|
11442
|
-
value: function componentWillUnmount() {
|
|
11443
|
-
ReactDOM__default["default"].unmountComponentAtNode(this.defaultNode || this.props.node);
|
|
11444
|
-
|
|
11445
|
-
if (this.defaultNode) {
|
|
11446
|
-
document.body.removeChild(this.defaultNode);
|
|
11447
|
-
}
|
|
11448
|
-
|
|
11449
|
-
this.defaultNode = null;
|
|
11450
|
-
this.portal = null;
|
|
11451
|
-
}
|
|
11452
|
-
}, {
|
|
11453
|
-
key: 'renderPortal',
|
|
11454
|
-
value: function renderPortal(props) {
|
|
11455
|
-
if (!this.props.node && !this.defaultNode) {
|
|
11456
|
-
this.defaultNode = document.createElement('div');
|
|
11457
|
-
document.body.appendChild(this.defaultNode);
|
|
11458
|
-
}
|
|
11459
|
-
|
|
11460
|
-
var children = this.props.children; // https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b
|
|
11461
|
-
|
|
11462
|
-
if (typeof this.props.children.type === 'function') {
|
|
11463
|
-
children = React__default["default"].cloneElement(this.props.children);
|
|
11464
|
-
}
|
|
11465
|
-
|
|
11466
|
-
this.portal = ReactDOM__default["default"].unstable_renderSubtreeIntoContainer(this, children, this.props.node || this.defaultNode);
|
|
11467
|
-
}
|
|
11468
|
-
}, {
|
|
11469
|
-
key: 'render',
|
|
11470
|
-
value: function render() {
|
|
11471
|
-
return null;
|
|
11472
|
-
}
|
|
11473
|
-
}]);
|
|
11474
|
-
|
|
11475
|
-
return Portal;
|
|
11476
|
-
}(React__default["default"].Component);
|
|
11477
|
-
|
|
11478
|
-
var LegacyPortal = Portal$3;
|
|
11479
|
-
Portal$3.propTypes = {
|
|
11480
|
-
children: propTypes$1.node.isRequired,
|
|
11481
|
-
node: propTypes$1.any
|
|
11482
|
-
};
|
|
11483
|
-
|
|
11484
|
-
var Portal$1 = void 0;
|
|
11485
|
-
|
|
11486
|
-
if (ReactDOM__default["default"].createPortal) {
|
|
11487
|
-
Portal$1 = Portalv4;
|
|
11488
|
-
} else {
|
|
11489
|
-
Portal$1 = LegacyPortal;
|
|
11490
|
-
}
|
|
11491
|
-
|
|
11492
|
-
var Portal$2 = Portal$1;
|
|
11493
|
-
|
|
11494
11320
|
var getClassName = createCommonjsModule(function (module, exports) {
|
|
11495
11321
|
|
|
11496
11322
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -21923,20 +21749,20 @@ var initialState = {
|
|
|
21923
21749
|
var FeedbackDialog =
|
|
21924
21750
|
/*#__PURE__*/
|
|
21925
21751
|
function (_React$PureComponent) {
|
|
21926
|
-
_inherits
|
|
21752
|
+
_inherits(FeedbackDialog, _React$PureComponent);
|
|
21927
21753
|
|
|
21928
21754
|
function FeedbackDialog() {
|
|
21929
21755
|
var _getPrototypeOf2;
|
|
21930
21756
|
|
|
21931
21757
|
var _this;
|
|
21932
21758
|
|
|
21933
|
-
_classCallCheck
|
|
21759
|
+
_classCallCheck(this, FeedbackDialog);
|
|
21934
21760
|
|
|
21935
21761
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21936
21762
|
args[_key] = arguments[_key];
|
|
21937
21763
|
}
|
|
21938
21764
|
|
|
21939
|
-
_this = _possibleConstructorReturn
|
|
21765
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FeedbackDialog)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
21940
21766
|
|
|
21941
21767
|
_defineProperty(_assertThisInitialized(_this), "state", _objectSpread2({}, initialState));
|
|
21942
21768
|
|
|
@@ -22039,7 +21865,7 @@ function (_React$PureComponent) {
|
|
|
22039
21865
|
return _this;
|
|
22040
21866
|
}
|
|
22041
21867
|
|
|
22042
|
-
_createClass
|
|
21868
|
+
_createClass(FeedbackDialog, [{
|
|
22043
21869
|
key: "componentDidMount",
|
|
22044
21870
|
value: function componentDidMount() {
|
|
22045
21871
|
// NOTE: To clear out previous state.
|
|
@@ -22181,7 +22007,7 @@ var LogOutMenu = function LogOutMenu(_ref) {
|
|
|
22181
22007
|
var css_248z$b = ".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";
|
|
22182
22008
|
styleInject(css_248z$b);
|
|
22183
22009
|
|
|
22184
|
-
var _styleModuleImportMap$
|
|
22010
|
+
var _styleModuleImportMap$2 = {
|
|
22185
22011
|
"./CopartLogo.css": {
|
|
22186
22012
|
"CopartLogo": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogo",
|
|
22187
22013
|
"CopartLogoNew": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogoNew",
|
|
@@ -22197,7 +22023,7 @@ var CopartLogo = function CopartLogo() {
|
|
|
22197
22023
|
href: "/"
|
|
22198
22024
|
}, React__namespace.createElement("img", {
|
|
22199
22025
|
src: imageSrc,
|
|
22200
|
-
className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$
|
|
22026
|
+
className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$2, {
|
|
22201
22027
|
"handleMissingStyleName": "warn"
|
|
22202
22028
|
})
|
|
22203
22029
|
}));
|
|
@@ -22233,7 +22059,7 @@ var FeedbackButton = function FeedbackButton(props) {
|
|
|
22233
22059
|
}));
|
|
22234
22060
|
};
|
|
22235
22061
|
|
|
22236
|
-
var _styleModuleImportMap$
|
|
22062
|
+
var _styleModuleImportMap$1 = {
|
|
22237
22063
|
"../AppBar.css": {
|
|
22238
22064
|
"root": "utilities_ops-app-frame_AppBarComponent_AppBar--root",
|
|
22239
22065
|
"leftItems": "utilities_ops-app-frame_AppBarComponent_AppBar--leftItems",
|
|
@@ -22364,7 +22190,7 @@ var PhoneStatus = function PhoneStatus(_ref3) {
|
|
|
22364
22190
|
onClick: function onClick() {
|
|
22365
22191
|
if (!phoneStatusProcessing) togglePhoneAvailability();
|
|
22366
22192
|
},
|
|
22367
|
-
className: _getClassName(getPhoneStatusStyle(phoneStatus, theme), _styleModuleImportMap$
|
|
22193
|
+
className: _getClassName(getPhoneStatusStyle(phoneStatus, theme), _styleModuleImportMap$1, {
|
|
22368
22194
|
"handleMissingStyleName": "warn"
|
|
22369
22195
|
})
|
|
22370
22196
|
}, phoneStatus === PHONE_STATUS.Available ? React__default["default"].createElement(PhoneAvailableIcon, {
|
|
@@ -22486,7 +22312,7 @@ var defaultAutoSelectProps$1 = {
|
|
|
22486
22312
|
},
|
|
22487
22313
|
width: 200
|
|
22488
22314
|
};
|
|
22489
|
-
var printerFields
|
|
22315
|
+
var printerFields = [_objectSpread2({}, defaultAutoSelectProps$1, {
|
|
22490
22316
|
name: 'barcode_label_printers',
|
|
22491
22317
|
label: 'Bar Code Printer'
|
|
22492
22318
|
}), _objectSpread2({}, defaultAutoSelectProps$1, {
|
|
@@ -22507,11 +22333,11 @@ var css_248z$9 = ".utilities_ops-app-frame_AppBarComponent_Settings_PrinterSetti
|
|
|
22507
22333
|
styleInject(css_248z$9);
|
|
22508
22334
|
|
|
22509
22335
|
// Properly populate printer options before feeding to autoselect
|
|
22510
|
-
var getPrinterOptions
|
|
22336
|
+
var getPrinterOptions = function getPrinterOptions(printers) {
|
|
22511
22337
|
return Array.isArray(printers) ? printers : [];
|
|
22512
22338
|
};
|
|
22513
22339
|
|
|
22514
|
-
var AUTO_SELECT_STYLE
|
|
22340
|
+
var AUTO_SELECT_STYLE = {
|
|
22515
22341
|
rowHeight: 40,
|
|
22516
22342
|
optionsMinHeight: 200
|
|
22517
22343
|
};
|
|
@@ -22519,20 +22345,20 @@ var AUTO_SELECT_STYLE$1 = {
|
|
|
22519
22345
|
var PrinterSettings =
|
|
22520
22346
|
/*#__PURE__*/
|
|
22521
22347
|
function (_React$Component) {
|
|
22522
|
-
_inherits
|
|
22348
|
+
_inherits(PrinterSettings, _React$Component);
|
|
22523
22349
|
|
|
22524
22350
|
function PrinterSettings() {
|
|
22525
22351
|
var _getPrototypeOf2;
|
|
22526
22352
|
|
|
22527
22353
|
var _this;
|
|
22528
22354
|
|
|
22529
|
-
_classCallCheck
|
|
22355
|
+
_classCallCheck(this, PrinterSettings);
|
|
22530
22356
|
|
|
22531
22357
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22532
22358
|
args[_key] = arguments[_key];
|
|
22533
22359
|
}
|
|
22534
22360
|
|
|
22535
|
-
_this = _possibleConstructorReturn
|
|
22361
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(PrinterSettings)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
22536
22362
|
|
|
22537
22363
|
_defineProperty(_assertThisInitialized(_this), "setPrinter", function (name) {
|
|
22538
22364
|
return function (value) {
|
|
@@ -22543,7 +22369,7 @@ function (_React$Component) {
|
|
|
22543
22369
|
return _this;
|
|
22544
22370
|
}
|
|
22545
22371
|
|
|
22546
|
-
_createClass
|
|
22372
|
+
_createClass(PrinterSettings, [{
|
|
22547
22373
|
key: "render",
|
|
22548
22374
|
value: function render() {
|
|
22549
22375
|
var _this2 = this;
|
|
@@ -22554,9 +22380,9 @@ function (_React$Component) {
|
|
|
22554
22380
|
if (!printersData) return null;
|
|
22555
22381
|
return React__namespace.createElement("div", {
|
|
22556
22382
|
className: "col-1-1 utilities_ops-app-frame_AppBarComponent_Settings_PrinterSettings_PrinterSettings--PrinterSettings"
|
|
22557
|
-
}, printerFields
|
|
22383
|
+
}, printerFields.map(function (printer) {
|
|
22558
22384
|
var name = printer.name || '';
|
|
22559
|
-
var printers = getPrinterOptions
|
|
22385
|
+
var printers = getPrinterOptions(printersData[name]);
|
|
22560
22386
|
return React__namespace.createElement("div", {
|
|
22561
22387
|
key: name,
|
|
22562
22388
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_PrinterSettings_PrinterSettings--col-1-5"
|
|
@@ -22566,7 +22392,7 @@ function (_React$Component) {
|
|
|
22566
22392
|
name: name,
|
|
22567
22393
|
value: _this2.props.activePrinters[name],
|
|
22568
22394
|
onChange: _this2.props.setPrinterData(name),
|
|
22569
|
-
optionStyleProps: AUTO_SELECT_STYLE
|
|
22395
|
+
optionStyleProps: AUTO_SELECT_STYLE,
|
|
22570
22396
|
options: printers.map(function (data) {
|
|
22571
22397
|
return data.printer_name;
|
|
22572
22398
|
}),
|
|
@@ -22840,20 +22666,20 @@ var setYardOptions = function setYardOptions(self) {
|
|
|
22840
22666
|
var YardNumberContainer =
|
|
22841
22667
|
/*#__PURE__*/
|
|
22842
22668
|
function (_React$Component) {
|
|
22843
|
-
_inherits
|
|
22669
|
+
_inherits(YardNumberContainer, _React$Component);
|
|
22844
22670
|
|
|
22845
22671
|
function YardNumberContainer() {
|
|
22846
22672
|
var _getPrototypeOf2;
|
|
22847
22673
|
|
|
22848
22674
|
var _this;
|
|
22849
22675
|
|
|
22850
|
-
_classCallCheck
|
|
22676
|
+
_classCallCheck(this, YardNumberContainer);
|
|
22851
22677
|
|
|
22852
22678
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22853
22679
|
args[_key] = arguments[_key];
|
|
22854
22680
|
}
|
|
22855
22681
|
|
|
22856
|
-
_this = _possibleConstructorReturn
|
|
22682
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YardNumberContainer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
22857
22683
|
|
|
22858
22684
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
22859
22685
|
yardOptions: {}
|
|
@@ -22866,7 +22692,7 @@ function (_React$Component) {
|
|
|
22866
22692
|
return _this;
|
|
22867
22693
|
}
|
|
22868
22694
|
|
|
22869
|
-
_createClass
|
|
22695
|
+
_createClass(YardNumberContainer, [{
|
|
22870
22696
|
key: "componentWillMount",
|
|
22871
22697
|
value: function componentWillMount() {
|
|
22872
22698
|
var _this$props = this.props,
|
|
@@ -23048,20 +22874,20 @@ var formatPhoneNumber = function formatPhoneNumber() {
|
|
|
23048
22874
|
return "".concat(formattedNumber, " * ").concat(extension);
|
|
23049
22875
|
};
|
|
23050
22876
|
|
|
23051
|
-
var EMPTY_PRINTERS$
|
|
22877
|
+
var EMPTY_PRINTERS$2 = {
|
|
23052
22878
|
barcode_label_printers: '',
|
|
23053
22879
|
check_printers: '',
|
|
23054
22880
|
standard_printers: '',
|
|
23055
22881
|
windshield_label_printers: '',
|
|
23056
22882
|
text_printers: ''
|
|
23057
22883
|
};
|
|
23058
|
-
var isDefault
|
|
22884
|
+
var isDefault = propEq$1('is_default', true);
|
|
23059
22885
|
|
|
23060
|
-
var findFirstDefault
|
|
23061
|
-
return nth$1(0, filter$1(isDefault
|
|
22886
|
+
var findFirstDefault = function findFirstDefault(printers) {
|
|
22887
|
+
return nth$1(0, filter$1(isDefault, printers));
|
|
23062
22888
|
};
|
|
23063
22889
|
|
|
23064
|
-
var getValuesArray
|
|
22890
|
+
var getValuesArray = function getValuesArray(final, _ref) {
|
|
23065
22891
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
23066
22892
|
label = _ref2[0],
|
|
23067
22893
|
printers = _ref2[1];
|
|
@@ -23070,66 +22896,66 @@ var getValuesArray$1 = function getValuesArray(final, _ref) {
|
|
|
23070
22896
|
return final;
|
|
23071
22897
|
};
|
|
23072
22898
|
|
|
23073
|
-
var pluckDefault
|
|
22899
|
+
var pluckDefault = function pluckDefault(final, _ref3) {
|
|
23074
22900
|
var _ref4 = _slicedToArray(_ref3, 2),
|
|
23075
22901
|
label = _ref4[0],
|
|
23076
22902
|
printers = _ref4[1];
|
|
23077
22903
|
|
|
23078
|
-
final[label] = propOr$1('', 'printer_name')(findFirstDefault
|
|
22904
|
+
final[label] = propOr$1('', 'printer_name')(findFirstDefault(printers));
|
|
23079
22905
|
return final;
|
|
23080
22906
|
};
|
|
23081
22907
|
|
|
23082
|
-
var sessionOrDefault
|
|
22908
|
+
var sessionOrDefault = function sessionOrDefault(label) {
|
|
23083
22909
|
return function () {
|
|
23084
22910
|
var printer_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
23085
22911
|
var sessionDashboard = storage$1.getSessionItem('dashboard');
|
|
23086
|
-
sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS$
|
|
22912
|
+
sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS$2;
|
|
23087
22913
|
var printerName = sessionDashboard.printers[label];
|
|
23088
22914
|
return !isEmpty$2(printerName) ? printerName : printer_name;
|
|
23089
22915
|
};
|
|
23090
22916
|
};
|
|
23091
22917
|
|
|
23092
|
-
var chooseActive
|
|
22918
|
+
var chooseActive = function chooseActive(final, _ref5) {
|
|
23093
22919
|
var _ref6 = _slicedToArray(_ref5, 2),
|
|
23094
22920
|
label = _ref6[0],
|
|
23095
22921
|
printer_name = _ref6[1];
|
|
23096
22922
|
|
|
23097
22923
|
return append$1({
|
|
23098
|
-
printer_name: sessionOrDefault
|
|
22924
|
+
printer_name: sessionOrDefault(label)(printer_name),
|
|
23099
22925
|
label: label
|
|
23100
22926
|
}, final);
|
|
23101
22927
|
};
|
|
23102
22928
|
|
|
23103
|
-
var reduceToObject
|
|
22929
|
+
var reduceToObject = function reduceToObject(reducer) {
|
|
23104
22930
|
return function (target) {
|
|
23105
22931
|
return reduce$1(reducer, {}, target);
|
|
23106
22932
|
};
|
|
23107
22933
|
};
|
|
23108
22934
|
|
|
23109
|
-
var getActivePrinters
|
|
22935
|
+
var getActivePrinters = (function (printersData) {
|
|
23110
22936
|
if (typeof printersData === 'string') return {};
|
|
23111
|
-
var printers = reduceToObject
|
|
23112
|
-
var defaultPrinters = reduceToObject
|
|
23113
|
-
return reduceToObject
|
|
22937
|
+
var printers = reduceToObject(getValuesArray)(toPairs$1(printersData));
|
|
22938
|
+
var defaultPrinters = reduceToObject(pluckDefault)(toPairs$1(printers));
|
|
22939
|
+
return reduceToObject(chooseActive)(toPairs$1(defaultPrinters));
|
|
23114
22940
|
});
|
|
23115
22941
|
|
|
23116
22942
|
var Container =
|
|
23117
22943
|
/*#__PURE__*/
|
|
23118
22944
|
function (_React$Component) {
|
|
23119
|
-
_inherits
|
|
22945
|
+
_inherits(Container, _React$Component);
|
|
23120
22946
|
|
|
23121
22947
|
function Container() {
|
|
23122
22948
|
var _getPrototypeOf2;
|
|
23123
22949
|
|
|
23124
22950
|
var _this;
|
|
23125
22951
|
|
|
23126
|
-
_classCallCheck
|
|
22952
|
+
_classCallCheck(this, Container);
|
|
23127
22953
|
|
|
23128
22954
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23129
22955
|
args[_key] = arguments[_key];
|
|
23130
22956
|
}
|
|
23131
22957
|
|
|
23132
|
-
_this = _possibleConstructorReturn
|
|
22958
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
23133
22959
|
|
|
23134
22960
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
23135
22961
|
number: _this.props.phoneNumber.substr(1),
|
|
@@ -23241,7 +23067,7 @@ function (_React$Component) {
|
|
|
23241
23067
|
return _this;
|
|
23242
23068
|
}
|
|
23243
23069
|
|
|
23244
|
-
_createClass
|
|
23070
|
+
_createClass(Container, [{
|
|
23245
23071
|
key: "componentWillReceiveProps",
|
|
23246
23072
|
value: function componentWillReceiveProps(newProps) {
|
|
23247
23073
|
this.setStatus('idle');
|
|
@@ -23339,7 +23165,7 @@ var validator = function validator(value) {
|
|
|
23339
23165
|
return /^\d{8}$/.test(value) ? 'Maximum digits reached.' : '';
|
|
23340
23166
|
};
|
|
23341
23167
|
|
|
23342
|
-
var EMPTY_PRINTERS$
|
|
23168
|
+
var EMPTY_PRINTERS$1 = {
|
|
23343
23169
|
barcode_label_printers: '',
|
|
23344
23170
|
check_printers: '',
|
|
23345
23171
|
standard_printers: '',
|
|
@@ -23391,13 +23217,13 @@ var handleInputChange$1 = function handleInputChange(self) {
|
|
|
23391
23217
|
if (name === 'selectedRole') {
|
|
23392
23218
|
var selectedValue = value.selectedValue,
|
|
23393
23219
|
option = value.option;
|
|
23394
|
-
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$
|
|
23220
|
+
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
|
|
23395
23221
|
return self.setState({
|
|
23396
23222
|
selectedRoleOption: option,
|
|
23397
23223
|
selectedRole: selectedValue
|
|
23398
23224
|
});
|
|
23399
23225
|
} else if (name === 'selectedYardNumber') {
|
|
23400
|
-
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$
|
|
23226
|
+
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
|
|
23401
23227
|
self.updatePhoneNumber(activePhoneNumber$1()); // Ensure we fetch the proper roles per the entered yard
|
|
23402
23228
|
|
|
23403
23229
|
var oldSelectedYard = self.state.selectedYardNumber;
|
|
@@ -23411,7 +23237,7 @@ var handleInputChange$1 = function handleInputChange(self) {
|
|
|
23411
23237
|
|
|
23412
23238
|
if (value !== oldSelectedYard && Boolean(value)) {
|
|
23413
23239
|
self.setState({
|
|
23414
|
-
printersData: EMPTY_PRINTERS$
|
|
23240
|
+
printersData: EMPTY_PRINTERS$1
|
|
23415
23241
|
});
|
|
23416
23242
|
self.getActivePrinters(value, false, yardCountryCode);
|
|
23417
23243
|
}
|
|
@@ -23612,18 +23438,18 @@ var selectedCountryA3code$1 = function selectedCountryA3code() {
|
|
|
23612
23438
|
var activePrinters$1 = function activePrinters() {
|
|
23613
23439
|
var _storage$getLocalItem;
|
|
23614
23440
|
|
|
23615
|
-
return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS$
|
|
23441
|
+
return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS$1;
|
|
23616
23442
|
};
|
|
23617
23443
|
|
|
23618
|
-
var makeKeyValue$
|
|
23444
|
+
var makeKeyValue$1 = function makeKeyValue(final, target) {
|
|
23619
23445
|
final[target.label] = target.printer_name;
|
|
23620
23446
|
return final;
|
|
23621
23447
|
};
|
|
23622
23448
|
|
|
23623
|
-
var formatActivePrintersForState$
|
|
23449
|
+
var formatActivePrintersForState$1 = function formatActivePrintersForState() {
|
|
23624
23450
|
var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
23625
23451
|
var printers = Array.isArray(activePrinters) ? activePrinters : [];
|
|
23626
|
-
return printers.reduce(makeKeyValue$
|
|
23452
|
+
return printers.reduce(makeKeyValue$1, {});
|
|
23627
23453
|
};
|
|
23628
23454
|
|
|
23629
23455
|
var activePhoneNumber$1 = function activePhoneNumber() {
|
|
@@ -23645,20 +23471,20 @@ var filterRoles$2 = function filterRoles(roles, countryCode) {
|
|
|
23645
23471
|
var SettingsView$1 =
|
|
23646
23472
|
/*#__PURE__*/
|
|
23647
23473
|
function (_React$Component) {
|
|
23648
|
-
_inherits
|
|
23474
|
+
_inherits(SettingsView, _React$Component);
|
|
23649
23475
|
|
|
23650
23476
|
function SettingsView() {
|
|
23651
23477
|
var _getPrototypeOf2;
|
|
23652
23478
|
|
|
23653
23479
|
var _this;
|
|
23654
23480
|
|
|
23655
|
-
_classCallCheck
|
|
23481
|
+
_classCallCheck(this, SettingsView);
|
|
23656
23482
|
|
|
23657
23483
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23658
23484
|
args[_key] = arguments[_key];
|
|
23659
23485
|
}
|
|
23660
23486
|
|
|
23661
|
-
_this = _possibleConstructorReturn
|
|
23487
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SettingsView)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
23662
23488
|
|
|
23663
23489
|
_defineProperty(_assertThisInitialized(_this), "state", _objectSpread2({
|
|
23664
23490
|
phoneNumber: activePhoneNumber$1(),
|
|
@@ -23670,10 +23496,10 @@ function (_React$Component) {
|
|
|
23670
23496
|
selectedCurrency: selectedCurrency(),
|
|
23671
23497
|
roles: [],
|
|
23672
23498
|
selectedRole: frontEndUtils.regex.beautifyRoleText(storage$1.userRole),
|
|
23673
|
-
printersData: EMPTY_PRINTERS$
|
|
23499
|
+
printersData: EMPTY_PRINTERS$1,
|
|
23674
23500
|
loadingPrinters: false,
|
|
23675
23501
|
oldActivePrinters: null
|
|
23676
|
-
}, EMPTY_PRINTERS$
|
|
23502
|
+
}, EMPTY_PRINTERS$1));
|
|
23677
23503
|
|
|
23678
23504
|
_defineProperty(_assertThisInitialized(_this), "fetchRoles", function (countryCode) {
|
|
23679
23505
|
fetcher.getUserRoles(countryCode).then(function (_roles) {
|
|
@@ -23738,8 +23564,8 @@ function (_React$Component) {
|
|
|
23738
23564
|
oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters$1()) : _this.state.oldActivePrinters
|
|
23739
23565
|
}));
|
|
23740
23566
|
} else {
|
|
23741
|
-
response = getActivePrinters
|
|
23742
|
-
fromatted = formatActivePrintersForState$
|
|
23567
|
+
response = getActivePrinters(printersData);
|
|
23568
|
+
fromatted = formatActivePrintersForState$1(response);
|
|
23743
23569
|
|
|
23744
23570
|
_this.setState(_objectSpread2({
|
|
23745
23571
|
oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, fromatted) : _this.state.oldActivePrinters
|
|
@@ -23780,7 +23606,7 @@ function (_React$Component) {
|
|
|
23780
23606
|
return _this;
|
|
23781
23607
|
}
|
|
23782
23608
|
|
|
23783
|
-
_createClass
|
|
23609
|
+
_createClass(SettingsView, [{
|
|
23784
23610
|
key: "componentWillMount",
|
|
23785
23611
|
value: function componentWillMount() {
|
|
23786
23612
|
var _this2 = this;
|
|
@@ -24048,7 +23874,7 @@ var YardNumberMenu = function YardNumberMenu(_ref) {
|
|
|
24048
23874
|
})));
|
|
24049
23875
|
};
|
|
24050
23876
|
|
|
24051
|
-
var EMPTY_PRINTERS
|
|
23877
|
+
var EMPTY_PRINTERS = {
|
|
24052
23878
|
barcode_label_printers: '',
|
|
24053
23879
|
check_printers: '',
|
|
24054
23880
|
standard_printers: '',
|
|
@@ -24098,7 +23924,7 @@ var handleInputChange = function handleInputChange(self) {
|
|
|
24098
23924
|
}
|
|
24099
23925
|
|
|
24100
23926
|
selectedValue = value.selectedValue, option = value.option;
|
|
24101
|
-
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS
|
|
23927
|
+
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
|
|
24102
23928
|
roleName = option && option.roleName || ''; //pathOr('', ['selectedRoleOption', 'roleName'], nextState)
|
|
24103
23929
|
|
|
24104
23930
|
isValidRole = self.state.roles.find(function (role) {
|
|
@@ -24119,8 +23945,8 @@ var handleInputChange = function handleInputChange(self) {
|
|
|
24119
23945
|
hierarchies: hierarchies,
|
|
24120
23946
|
selectedHierarchyOption: null,
|
|
24121
23947
|
selectedYardNumber: null,
|
|
24122
|
-
printersData: EMPTY_PRINTERS
|
|
24123
|
-
}, EMPTY_PRINTERS
|
|
23948
|
+
printersData: EMPTY_PRINTERS
|
|
23949
|
+
}, EMPTY_PRINTERS));
|
|
24124
23950
|
|
|
24125
23951
|
case 10:
|
|
24126
23952
|
return _context.abrupt("return", self.setState({
|
|
@@ -24134,7 +23960,7 @@ var handleInputChange = function handleInputChange(self) {
|
|
|
24134
23960
|
break;
|
|
24135
23961
|
}
|
|
24136
23962
|
|
|
24137
|
-
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS
|
|
23963
|
+
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
|
|
24138
23964
|
country = value.country, _value$yard = value.yard, yard = _value$yard === void 0 ? null : _value$yard;
|
|
24139
23965
|
countryId = country && country.split('-')[0];
|
|
24140
23966
|
|
|
@@ -24176,8 +24002,8 @@ var handleInputChange = function handleInputChange(self) {
|
|
|
24176
24002
|
level: yard ? 'yard' : 'country'
|
|
24177
24003
|
},
|
|
24178
24004
|
selectedYardNumber: yard,
|
|
24179
|
-
printersData: EMPTY_PRINTERS
|
|
24180
|
-
}, EMPTY_PRINTERS
|
|
24005
|
+
printersData: EMPTY_PRINTERS
|
|
24006
|
+
}, EMPTY_PRINTERS));
|
|
24181
24007
|
|
|
24182
24008
|
case 30:
|
|
24183
24009
|
_context.next = 43;
|
|
@@ -24189,7 +24015,7 @@ var handleInputChange = function handleInputChange(self) {
|
|
|
24189
24015
|
break;
|
|
24190
24016
|
}
|
|
24191
24017
|
|
|
24192
|
-
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS
|
|
24018
|
+
storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
|
|
24193
24019
|
|
|
24194
24020
|
if (!(value !== self.state.selectedYardNumber && Boolean(value))) {
|
|
24195
24021
|
_context.next = 42;
|
|
@@ -24215,8 +24041,8 @@ var handleInputChange = function handleInputChange(self) {
|
|
|
24215
24041
|
return _context.abrupt("return", self.setState(function (state) {
|
|
24216
24042
|
return _objectSpread2({
|
|
24217
24043
|
selectedYardNumber: value,
|
|
24218
|
-
printersData: EMPTY_PRINTERS
|
|
24219
|
-
}, EMPTY_PRINTERS
|
|
24044
|
+
printersData: EMPTY_PRINTERS
|
|
24045
|
+
}, EMPTY_PRINTERS);
|
|
24220
24046
|
}));
|
|
24221
24047
|
|
|
24222
24048
|
case 43:
|
|
@@ -24398,18 +24224,18 @@ var selectedCountryA3code = function selectedCountryA3code() {
|
|
|
24398
24224
|
};
|
|
24399
24225
|
|
|
24400
24226
|
var activePrinters = function activePrinters() {
|
|
24401
|
-
return storage$1.getLocalItem('dashboard', 'printers') || EMPTY_PRINTERS
|
|
24227
|
+
return storage$1.getLocalItem('dashboard', 'printers') || EMPTY_PRINTERS;
|
|
24402
24228
|
};
|
|
24403
24229
|
|
|
24404
|
-
var makeKeyValue
|
|
24230
|
+
var makeKeyValue = function makeKeyValue(final, target) {
|
|
24405
24231
|
final[target.label] = target.printer_name;
|
|
24406
24232
|
return final;
|
|
24407
24233
|
};
|
|
24408
24234
|
|
|
24409
|
-
var formatActivePrintersForState
|
|
24235
|
+
var formatActivePrintersForState = function formatActivePrintersForState() {
|
|
24410
24236
|
var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
24411
24237
|
var printers = Array.isArray(activePrinters) ? activePrinters : [];
|
|
24412
|
-
return printers.reduce(makeKeyValue
|
|
24238
|
+
return printers.reduce(makeKeyValue, {});
|
|
24413
24239
|
};
|
|
24414
24240
|
|
|
24415
24241
|
var activePhoneNumber = function activePhoneNumber() {
|
|
@@ -24478,20 +24304,20 @@ var filterRoles = function filterRoles(roles, invalidCodes) {
|
|
|
24478
24304
|
var SettingsView =
|
|
24479
24305
|
/*#__PURE__*/
|
|
24480
24306
|
function (_React$Component) {
|
|
24481
|
-
_inherits
|
|
24307
|
+
_inherits(SettingsView, _React$Component);
|
|
24482
24308
|
|
|
24483
24309
|
function SettingsView() {
|
|
24484
24310
|
var _getPrototypeOf2;
|
|
24485
24311
|
|
|
24486
24312
|
var _this;
|
|
24487
24313
|
|
|
24488
|
-
_classCallCheck
|
|
24314
|
+
_classCallCheck(this, SettingsView);
|
|
24489
24315
|
|
|
24490
24316
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24491
24317
|
args[_key] = arguments[_key];
|
|
24492
24318
|
}
|
|
24493
24319
|
|
|
24494
|
-
_this = _possibleConstructorReturn
|
|
24320
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SettingsView)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
24495
24321
|
|
|
24496
24322
|
_defineProperty(_assertThisInitialized(_this), "state", _objectSpread2({
|
|
24497
24323
|
phoneNumber: activePhoneNumber(),
|
|
@@ -24503,9 +24329,9 @@ function (_React$Component) {
|
|
|
24503
24329
|
selectedHierarchyOption: storage$1.getLocalItem('settings', 'selectedHierarchyOption'),
|
|
24504
24330
|
roles: [],
|
|
24505
24331
|
hierarchies: [],
|
|
24506
|
-
printersData: EMPTY_PRINTERS
|
|
24332
|
+
printersData: EMPTY_PRINTERS,
|
|
24507
24333
|
oldActivePrinters: null
|
|
24508
|
-
}, EMPTY_PRINTERS
|
|
24334
|
+
}, EMPTY_PRINTERS));
|
|
24509
24335
|
|
|
24510
24336
|
_defineProperty(_assertThisInitialized(_this), "getRCAvailability",
|
|
24511
24337
|
/*#__PURE__*/
|
|
@@ -24577,8 +24403,8 @@ function (_React$Component) {
|
|
|
24577
24403
|
oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters()) : _this.state.oldActivePrinters
|
|
24578
24404
|
}));
|
|
24579
24405
|
} else {
|
|
24580
|
-
_activePrinters = getActivePrinters
|
|
24581
|
-
update = formatActivePrintersForState
|
|
24406
|
+
_activePrinters = getActivePrinters(printersData);
|
|
24407
|
+
update = formatActivePrintersForState(_activePrinters);
|
|
24582
24408
|
|
|
24583
24409
|
_this.setState(_objectSpread2({
|
|
24584
24410
|
oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, update) : _this.state.oldActivePrinters
|
|
@@ -24617,7 +24443,7 @@ function (_React$Component) {
|
|
|
24617
24443
|
return _this;
|
|
24618
24444
|
}
|
|
24619
24445
|
|
|
24620
|
-
_createClass
|
|
24446
|
+
_createClass(SettingsView, [{
|
|
24621
24447
|
key: "componentWillMount",
|
|
24622
24448
|
value: function () {
|
|
24623
24449
|
var _componentWillMount = _asyncToGenerator(
|
|
@@ -24767,7 +24593,7 @@ function (_React$Component) {
|
|
|
24767
24593
|
return SettingsView;
|
|
24768
24594
|
}(React__default["default"].Component);
|
|
24769
24595
|
|
|
24770
|
-
var css_248z$6 = ".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: 0px 5px;\r\n font-size: 13px;\r\n
|
|
24596
|
+
var css_248z$6 = ".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: 0px 5px;\r\n font-size: 13px;\r\n width: 95%;\r\n display: flex;\r\n align-items: end;\r\n grid-gap: 20px;\r\n gap: 20px\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\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}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox b{\r\n color: #171717;\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}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 3;\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}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n font-size: 12px;\r\n margin-bottom: 5px;\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: 16px !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i{\r\n position: relative;\r\n right: -4px;\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}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer i{\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer i{\r\n font-size: 16px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\r\n flex-direction: column;\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: 0px 5px;\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}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper b{\r\n color: #171717;\r\n}";
|
|
24771
24597
|
styleInject(css_248z$6);
|
|
24772
24598
|
|
|
24773
24599
|
var moment = createCommonjsModule(function (module, exports) {
|
|
@@ -35781,7 +35607,7 @@ var alertToIconMapping = {
|
|
|
35781
35607
|
success: 'Accept'
|
|
35782
35608
|
};
|
|
35783
35609
|
|
|
35784
|
-
var Actions
|
|
35610
|
+
var Actions = function Actions(_ref) {
|
|
35785
35611
|
var onLeftButtonClick = _ref.onLeftButtonClick,
|
|
35786
35612
|
count = _ref.count,
|
|
35787
35613
|
current = _ref.current,
|
|
@@ -35817,21 +35643,25 @@ var Actions$1 = function Actions(_ref) {
|
|
|
35817
35643
|
}))));
|
|
35818
35644
|
};
|
|
35819
35645
|
|
|
35820
|
-
var Banner = function Banner(
|
|
35821
|
-
var
|
|
35822
|
-
|
|
35823
|
-
|
|
35824
|
-
|
|
35825
|
-
|
|
35826
|
-
|
|
35827
|
-
|
|
35828
|
-
|
|
35829
|
-
|
|
35830
|
-
|
|
35831
|
-
|
|
35832
|
-
|
|
35833
|
-
|
|
35834
|
-
showSideBar =
|
|
35646
|
+
var Banner = function Banner(props) {
|
|
35647
|
+
var count = props.count,
|
|
35648
|
+
current = props.current,
|
|
35649
|
+
showNavButtons = props.showNavButtons,
|
|
35650
|
+
onLeftButtonClick = props.onLeftButtonClick,
|
|
35651
|
+
onRightButtonClick = props.onRightButtonClick,
|
|
35652
|
+
saveActionComponentState = props.saveActionComponentState,
|
|
35653
|
+
ActionComponent = props.ActionComponent,
|
|
35654
|
+
notification = _objectWithoutProperties(props, ["count", "current", "showNavButtons", "onLeftButtonClick", "onRightButtonClick", "saveActionComponentState", "ActionComponent"]);
|
|
35655
|
+
|
|
35656
|
+
var dismissibleFlag = notification.dismissibleFlag,
|
|
35657
|
+
onDismiss = notification.onDismiss,
|
|
35658
|
+
startsAt = notification.startsAt,
|
|
35659
|
+
timeZoneType = notification.timeZoneType,
|
|
35660
|
+
showSideBar = notification.showSideBar,
|
|
35661
|
+
action = notification.action,
|
|
35662
|
+
content = notification.content,
|
|
35663
|
+
sourceApplication = notification.sourceApplication,
|
|
35664
|
+
categoryDescription = notification.categoryDescription;
|
|
35835
35665
|
var contentBarRef = React__default["default"].useRef(null);
|
|
35836
35666
|
|
|
35837
35667
|
var _React$useState = React__default["default"].useState('false'),
|
|
@@ -35862,14 +35692,20 @@ var Banner = function Banner(_ref2) {
|
|
|
35862
35692
|
style: {
|
|
35863
35693
|
backgroundColor: alertBackgroundColorMapping[categoryDescription.toLowerCase()]
|
|
35864
35694
|
}
|
|
35865
|
-
}, showNavButtons && React__default["default"].createElement(Actions
|
|
35695
|
+
}, showNavButtons && React__default["default"].createElement(Actions, {
|
|
35866
35696
|
onLeftButtonClick: onLeftButtonClick,
|
|
35867
35697
|
count: count,
|
|
35868
35698
|
current: current,
|
|
35869
35699
|
onRightButtonClick: onRightButtonClick
|
|
35870
35700
|
}), React__default["default"].createElement("div", {
|
|
35871
|
-
className: "utilities_ops-announcements_Banner--notificationBarContent"
|
|
35872
|
-
|
|
35701
|
+
className: "utilities_ops-announcements_Banner--notificationBarContent",
|
|
35702
|
+
style: expanded ? {
|
|
35703
|
+
flexDirection: 'column',
|
|
35704
|
+
alignItems: 'flex-start'
|
|
35705
|
+
} : {
|
|
35706
|
+
flexDirection: 'row'
|
|
35707
|
+
}
|
|
35708
|
+
}, React__default["default"].createElement("div", null, React__default["default"].createElement("div", {
|
|
35873
35709
|
className: "utilities_ops-announcements_Banner--notificationInfoBox"
|
|
35874
35710
|
}, React__default["default"].createElement("div", null, React__default["default"].createElement(coreComponents.Icon, {
|
|
35875
35711
|
name: alertToIconMapping[categoryDescription.toLowerCase()],
|
|
@@ -35886,7 +35722,14 @@ var Banner = function Banner(_ref2) {
|
|
|
35886
35722
|
style: _objectSpread2({}, expanded && {
|
|
35887
35723
|
WebkitLineClamp: 'unset'
|
|
35888
35724
|
})
|
|
35889
|
-
})),
|
|
35725
|
+
})), action && ActionComponent && React__default["default"].createElement("div", {
|
|
35726
|
+
style: {
|
|
35727
|
+
minWidth: '20%'
|
|
35728
|
+
}
|
|
35729
|
+
}, React__default["default"].createElement(ActionComponent, {
|
|
35730
|
+
notification: notification,
|
|
35731
|
+
saveActionComponentState: saveActionComponentState
|
|
35732
|
+
}))), isContentOverFlow && React__default["default"].createElement("div", {
|
|
35890
35733
|
style: {
|
|
35891
35734
|
cursor: 'pointer'
|
|
35892
35735
|
},
|
|
@@ -35935,7 +35778,10 @@ var Banner = function Banner(_ref2) {
|
|
|
35935
35778
|
dangerouslySetInnerHTML: {
|
|
35936
35779
|
__html: content
|
|
35937
35780
|
}
|
|
35938
|
-
})
|
|
35781
|
+
}), action && ActionComponent && React__default["default"].createElement("div", null, React__default["default"].createElement(ActionComponent, {
|
|
35782
|
+
notification: notification,
|
|
35783
|
+
saveActionComponentState: saveActionComponentState
|
|
35784
|
+
}))), dismissibleFlag && React__default["default"].createElement("div", {
|
|
35939
35785
|
style: {
|
|
35940
35786
|
cursor: 'pointer',
|
|
35941
35787
|
marginLeft: 'auto',
|
|
@@ -35971,7 +35817,7 @@ var Banner = function Banner(_ref2) {
|
|
|
35971
35817
|
fontSize: '16px',
|
|
35972
35818
|
color: alertInfoColorMapping[categoryDescription.toLowerCase()]
|
|
35973
35819
|
}
|
|
35974
|
-
})), React__default["default"].createElement("div", null, sourceApplication && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("b", null, sourceApplication), " -"), " ", timeDiff)), React__default["default"].createElement("div", null, showNavButtons && React__default["default"].createElement(Actions
|
|
35820
|
+
})), React__default["default"].createElement("div", null, sourceApplication && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("b", null, sourceApplication), " -"), " ", timeDiff)), React__default["default"].createElement("div", null, showNavButtons && React__default["default"].createElement(Actions, {
|
|
35975
35821
|
onLeftButtonClick: onLeftButtonClick,
|
|
35976
35822
|
count: count,
|
|
35977
35823
|
current: current,
|
|
@@ -36016,7 +35862,14 @@ var Banner = function Banner(_ref2) {
|
|
|
36016
35862
|
style: _objectSpread2({}, expanded && {
|
|
36017
35863
|
WebkitLineClamp: 'unset'
|
|
36018
35864
|
})
|
|
36019
|
-
})
|
|
35865
|
+
}), action && ActionComponent && React__default["default"].createElement("div", {
|
|
35866
|
+
style: {
|
|
35867
|
+
marginTop: '8px'
|
|
35868
|
+
}
|
|
35869
|
+
}, React__default["default"].createElement(ActionComponent, {
|
|
35870
|
+
notification: notification,
|
|
35871
|
+
saveActionComponentState: saveActionComponentState
|
|
35872
|
+
}))));
|
|
36020
35873
|
};
|
|
36021
35874
|
|
|
36022
35875
|
var mainNotificationBar = function mainNotificationBar() {
|
|
@@ -36030,7 +35883,8 @@ var Notifications$1 = function Notifications(_ref) {
|
|
|
36030
35883
|
var notifications = _ref.notifications,
|
|
36031
35884
|
_onDismiss = _ref.onDismiss;
|
|
36032
35885
|
_ref.children;
|
|
36033
|
-
var showSideBar = _ref.showSideBar
|
|
35886
|
+
var showSideBar = _ref.showSideBar,
|
|
35887
|
+
ActionComponent = _ref.ActionComponent;
|
|
36034
35888
|
|
|
36035
35889
|
var _useState = React.useState(0),
|
|
36036
35890
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -36069,7 +35923,9 @@ var Notifications$1 = function Notifications(_ref) {
|
|
|
36069
35923
|
|
|
36070
35924
|
i === last && setI(i - 1);
|
|
36071
35925
|
}
|
|
36072
|
-
}, notification
|
|
35926
|
+
}, notification, {
|
|
35927
|
+
ActionComponent: ActionComponent
|
|
35928
|
+
})) : null, notifications.length > 0 && showSideBar ? notifications.map(function (notification) {
|
|
36073
35929
|
return React__default["default"].createElement(Banner, _extends({
|
|
36074
35930
|
key: notification.notificationId,
|
|
36075
35931
|
current: i + 1,
|
|
@@ -36079,7 +35935,8 @@ var Notifications$1 = function Notifications(_ref) {
|
|
|
36079
35935
|
return _onDismiss(notification);
|
|
36080
35936
|
}
|
|
36081
35937
|
}, notification, {
|
|
36082
|
-
showSideBar: showSideBar
|
|
35938
|
+
showSideBar: showSideBar,
|
|
35939
|
+
ActionComponent: ActionComponent
|
|
36083
35940
|
}));
|
|
36084
35941
|
}) : null);
|
|
36085
35942
|
};
|
|
@@ -36118,7 +35975,7 @@ var formatRole = function formatRole(role) {
|
|
|
36118
35975
|
return capitalizeAndReplaceUnderscores(formatUK(role));
|
|
36119
35976
|
};
|
|
36120
35977
|
|
|
36121
|
-
var _styleModuleImportMap
|
|
35978
|
+
var _styleModuleImportMap = {
|
|
36122
35979
|
"./AppBar.css": {
|
|
36123
35980
|
"root": "utilities_ops-app-frame_AppBarComponent_AppBar--root",
|
|
36124
35981
|
"leftItems": "utilities_ops-app-frame_AppBarComponent_AppBar--leftItems",
|
|
@@ -36256,12 +36113,15 @@ var generateAppBarElements = function generateAppBarElements(props, showCallout)
|
|
|
36256
36113
|
showSettingsInAppbar = enableNewToolkitFeatures;
|
|
36257
36114
|
} else if (!isAuthRoute) {
|
|
36258
36115
|
if (enableNewToolkitFeatures && showSettingsMenuByTileConfig) {
|
|
36116
|
+
var _window$toolkitEnv;
|
|
36117
|
+
|
|
36259
36118
|
var appTiles = coreAppConfig.tiles || [];
|
|
36119
|
+
var appName = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
36260
36120
|
var appTile = appTiles.find(function (tile) {
|
|
36261
36121
|
if (tile.appName) {
|
|
36262
|
-
return tile.appName ===
|
|
36122
|
+
return tile.appName === appName;
|
|
36263
36123
|
} else {
|
|
36264
|
-
return tile.path === "/".concat(
|
|
36124
|
+
return tile.path === "/".concat(appName);
|
|
36265
36125
|
}
|
|
36266
36126
|
}) || {};
|
|
36267
36127
|
showSettingsInAppbar = appTile.showSettingsMenuInAppBar;
|
|
@@ -36555,6 +36415,8 @@ var notificationIconComp = function notificationIconComp(_ref3) {
|
|
|
36555
36415
|
};
|
|
36556
36416
|
|
|
36557
36417
|
var AppBar$1 = function AppBar(props) {
|
|
36418
|
+
var _window$toolkitEnv4;
|
|
36419
|
+
|
|
36558
36420
|
var coreAppConfig = storage.getLocalItem('opsportal-core:config');
|
|
36559
36421
|
var enableNewToolkitFeatures = coreAppConfig.enableNewToolkitFeatures,
|
|
36560
36422
|
ideaNoteUri = coreAppConfig.ideaNoteUri;
|
|
@@ -36597,7 +36459,9 @@ var AppBar$1 = function AppBar(props) {
|
|
|
36597
36459
|
title = props.title,
|
|
36598
36460
|
getInnovationHubToken = props.getInnovationHubToken,
|
|
36599
36461
|
notifications = props.notifications,
|
|
36600
|
-
onDismiss = props.onDismiss
|
|
36462
|
+
onDismiss = props.onDismiss,
|
|
36463
|
+
ActionComponent = props.ActionComponent,
|
|
36464
|
+
saveActionComponentState = props.saveActionComponentState;
|
|
36601
36465
|
|
|
36602
36466
|
var _useWindowSize = useWindowSize(),
|
|
36603
36467
|
width = _useWindowSize.width;
|
|
@@ -36666,13 +36530,16 @@ var AppBar$1 = function AppBar(props) {
|
|
|
36666
36530
|
};
|
|
36667
36531
|
|
|
36668
36532
|
var getTitle = function getTitle() {
|
|
36533
|
+
var _window$toolkitEnv2, _window$toolkitEnv3;
|
|
36534
|
+
|
|
36669
36535
|
var appTiles = coreAppConfig.tiles || [];
|
|
36670
36536
|
var appTile;
|
|
36537
|
+
var appName = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
|
|
36671
36538
|
var matchingTiles = appTiles.filter(function (tile) {
|
|
36672
36539
|
if (tile.appName) {
|
|
36673
|
-
return tile.appName ===
|
|
36540
|
+
return tile.appName === appName;
|
|
36674
36541
|
} else {
|
|
36675
|
-
return tile.path === "/".concat(
|
|
36542
|
+
return tile.path === "/".concat(appName);
|
|
36676
36543
|
}
|
|
36677
36544
|
});
|
|
36678
36545
|
|
|
@@ -36686,7 +36553,8 @@ var AppBar$1 = function AppBar(props) {
|
|
|
36686
36553
|
}
|
|
36687
36554
|
|
|
36688
36555
|
appTile = appTile || {};
|
|
36689
|
-
|
|
36556
|
+
var appTitle = ((_window$toolkitEnv3 = window.toolkitEnv) === null || _window$toolkitEnv3 === void 0 ? void 0 : _window$toolkitEnv3.APP_TITLE) ? window.toolkitEnv.APP_TITLE : process.env.APP_TITLE;
|
|
36557
|
+
return title || appTile.title || appTitle;
|
|
36690
36558
|
};
|
|
36691
36559
|
|
|
36692
36560
|
var getNotificationWrapperWidth = function getNotificationWrapperWidth() {
|
|
@@ -36699,13 +36567,14 @@ var AppBar$1 = function AppBar(props) {
|
|
|
36699
36567
|
}
|
|
36700
36568
|
};
|
|
36701
36569
|
|
|
36570
|
+
var stack = ((_window$toolkitEnv4 = window.toolkitEnv) === null || _window$toolkitEnv4 === void 0 ? void 0 : _window$toolkitEnv4.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
36702
36571
|
return React__default["default"].createElement("div", {
|
|
36703
36572
|
"data-e2e": "cc-AppBar",
|
|
36704
36573
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--root"
|
|
36705
36574
|
}, React__default["default"].createElement("div", {
|
|
36706
36575
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--leftItems"
|
|
36707
36576
|
}, React__default["default"].createElement("div", {
|
|
36708
|
-
className: _getClassName(enableNewToolkitFeatures ? "copartLogoNew" : "copartLogo", _styleModuleImportMap
|
|
36577
|
+
className: _getClassName(enableNewToolkitFeatures ? "copartLogoNew" : "copartLogo", _styleModuleImportMap, {
|
|
36709
36578
|
"handleMissingStyleName": "warn"
|
|
36710
36579
|
})
|
|
36711
36580
|
}, React__default["default"].createElement(CopartLogo, null), !enableNewToolkitFeatures && !isAuthRoute ? React__default["default"].createElement("div", {
|
|
@@ -36760,9 +36629,9 @@ var AppBar$1 = function AppBar(props) {
|
|
|
36760
36629
|
return setCalloutVisible(false);
|
|
36761
36630
|
},
|
|
36762
36631
|
isBeakVisible: false
|
|
36763
|
-
}, React__default["default"].createElement("div", null, !
|
|
36632
|
+
}, React__default["default"].createElement("div", null, !stack || stack === 'c' ? React__default["default"].createElement(SettingsView$1, {
|
|
36764
36633
|
onSave: onSave
|
|
36765
|
-
}) : null,
|
|
36634
|
+
}) : null, stack === 'uk' ? React__default["default"].createElement(SettingsView, {
|
|
36766
36635
|
onSave: onSave
|
|
36767
36636
|
}) : null)) : null, ideaNoteVisible && React__default["default"].createElement("div", {
|
|
36768
36637
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer"
|
|
@@ -36818,7 +36687,9 @@ var AppBar$1 = function AppBar(props) {
|
|
|
36818
36687
|
}, React__default["default"].createElement(Notifications, {
|
|
36819
36688
|
notifications: notifications || [],
|
|
36820
36689
|
onDismiss: onDismiss,
|
|
36821
|
-
showSideBar: true
|
|
36690
|
+
showSideBar: true,
|
|
36691
|
+
ActionComponent: ActionComponent,
|
|
36692
|
+
saveActionComponentState: saveActionComponentState
|
|
36822
36693
|
})))));
|
|
36823
36694
|
};
|
|
36824
36695
|
AppBar$1.defaultProps = {
|
|
@@ -36847,569 +36718,9 @@ var Flag = function Flag(props) {
|
|
|
36847
36718
|
});
|
|
36848
36719
|
};
|
|
36849
36720
|
|
|
36850
|
-
var payload = {
|
|
36851
|
-
headers: {
|
|
36852
|
-
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
36853
|
-
}
|
|
36854
|
-
};
|
|
36855
|
-
var changeActivityService = function changeActivityService(workerSid, itemSid) {
|
|
36856
|
-
var _storage$getLocalItem, _storage$getLocalItem2;
|
|
36857
|
-
|
|
36858
|
-
var url = (_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : (_storage$getLocalItem2 = _storage$getLocalItem.endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.changeActivity;
|
|
36859
|
-
return axios.post(frontEndUtils.string.substitute(url, {
|
|
36860
|
-
workerSid: workerSid,
|
|
36861
|
-
itemSid: itemSid
|
|
36862
|
-
}), payload);
|
|
36863
|
-
};
|
|
36864
|
-
var outboundCallService = function outboundCallService(workerSid, phoneNumber) {
|
|
36865
|
-
var _storage$getLocalItem5, _storage$getLocalItem6;
|
|
36866
|
-
|
|
36867
|
-
var url = (_storage$getLocalItem5 = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem5 === void 0 ? void 0 : (_storage$getLocalItem6 = _storage$getLocalItem5.endpoints) === null || _storage$getLocalItem6 === void 0 ? void 0 : _storage$getLocalItem6.twilioClickToDial;
|
|
36868
|
-
return fetcher.post(frontEndUtils.string.substitute(url, {
|
|
36869
|
-
phoneNumber: phoneNumber
|
|
36870
|
-
}));
|
|
36871
|
-
};
|
|
36872
|
-
|
|
36873
|
-
var noCallInfo = 'No Active Call';
|
|
36874
|
-
var IN_CALL = 'InCall';
|
|
36875
|
-
var WRAPUP = 'Wrapup';
|
|
36876
|
-
var RINGING = 'Ringing';
|
|
36877
|
-
var notLoggedInMsg = ' Not Logged in! Click here and wait';
|
|
36878
|
-
var loadingMsg = 'Loading...';
|
|
36879
|
-
var errorMessage = 'You Cannot Change Status While On Active Call';
|
|
36880
|
-
var activeTabWarning = '*Active MiPhone - Please do not close this tab';
|
|
36881
|
-
var warningMsg = 'Error occurred. Please check MiPhone status';
|
|
36882
|
-
var enableRejectButton = ['admin']; // TO DO: Need to change logic for UK + countries
|
|
36883
|
-
|
|
36884
|
-
var getFormattedPhoneNumber = function getFormattedPhoneNumber() {
|
|
36885
|
-
var number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
36886
|
-
|
|
36887
|
-
if (startsWith$1('+1', number)) {
|
|
36888
|
-
return number.replace(/(\d{1})(\d{3})(\d{3})(\d{4})/, '$1 ($2) $3-$4');
|
|
36889
|
-
}
|
|
36890
|
-
|
|
36891
|
-
return number.replace(/(\d{2})(\d{3})(\d{3})(\d{4})/, '$1 ($2) $3-$4');
|
|
36892
|
-
};
|
|
36893
|
-
var colorMapper = {
|
|
36894
|
-
Offline: '#606471',
|
|
36895
|
-
Available: '#62c158',
|
|
36896
|
-
Unavailable: '#dd392b',
|
|
36897
|
-
Break: '#FFFF00',
|
|
36898
|
-
'Lunch Break': '#FF66FF',
|
|
36899
|
-
'Outbound Only': '#f27b0e'
|
|
36900
|
-
};
|
|
36901
|
-
var dispatchTwilioStatus = function dispatchTwilioStatus(status) {
|
|
36902
|
-
var isTask = storage$1.twilioVoiceTask;
|
|
36903
|
-
|
|
36904
|
-
if (!isEmpty$2(isTask) && !includes$1(status, [IN_CALL, WRAPUP, RINGING])) {
|
|
36905
|
-
return false;
|
|
36906
|
-
} else {
|
|
36907
|
-
storage$1.setLocalItem('twilio', status, 'userStatus');
|
|
36908
|
-
var event = new Event('changeBusyLightStatus');
|
|
36909
|
-
window.dispatchEvent(event);
|
|
36910
|
-
}
|
|
36911
|
-
};
|
|
36912
|
-
var setFavicon = function setFavicon(url) {
|
|
36913
|
-
var nodeList = document.getElementsByTagName('link');
|
|
36914
|
-
|
|
36915
|
-
for (var i = 0; i < nodeList.length; i++) {
|
|
36916
|
-
if (nodeList[i].getAttribute('rel') == 'shortcut icon') {
|
|
36917
|
-
nodeList[i].setAttribute('href', url);
|
|
36918
|
-
}
|
|
36919
|
-
}
|
|
36920
|
-
};
|
|
36921
|
-
var getWarningMsg = function getWarningMsg(error) {
|
|
36922
|
-
return pathOr$1(warningMsg, ['data', 'message', 0], error);
|
|
36923
|
-
};
|
|
36924
|
-
var getFlexUrl = function getFlexUrl() {
|
|
36925
|
-
var _storage$getLocalItem, _storage$getLocalItem2;
|
|
36926
|
-
|
|
36927
|
-
return ((_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : (_storage$getLocalItem2 = _storage$getLocalItem.endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.twilioUrl) || 'https://flex.twilio.com/agent-desktop/';
|
|
36928
|
-
};
|
|
36929
|
-
var getFlexDomain = function getFlexDomain() {
|
|
36930
|
-
var _storage$getLocalItem3, _storage$getLocalItem4;
|
|
36931
|
-
|
|
36932
|
-
return ((_storage$getLocalItem3 = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem3 === void 0 ? void 0 : (_storage$getLocalItem4 = _storage$getLocalItem3.endpoints) === null || _storage$getLocalItem4 === void 0 ? void 0 : _storage$getLocalItem4.flexDomain) || 'https://flex.twilio.com';
|
|
36933
|
-
};
|
|
36934
|
-
|
|
36935
36721
|
var css_248z$4 = "#utilities_ops-app-frame_CallCapsule_style--flex-iframe {\r\n width: '100%';\r\n height: '100%';\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--flex-bar {\r\n position: relative;\r\n z-index: 9999;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-end;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--iframeSection {\r\n border: 1px solid #233659;\r\n border-radius: 8px !important;\r\n overflow: hidden;\r\n width: 560px;\r\n height: 610px;\r\n position: absolute;\r\n top: 53px;\r\n z-index: 100;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--fullScreen{\r\n border: 1px solid #233659;\r\n border-radius: 20px !important;\r\n overflow: hidden;\r\n width: 98vw;\r\n height: 610px;\r\n position: absolute;\r\n top: 53px;\r\n left: -8.7em;\r\n z-index: 100;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--CallerPillCon {\r\n display: flex;\r\n background-color: #8eacdc;\r\n border-radius: 30px;\r\n justify-content: center;\r\n padding: 2px 10px;\r\n min-width: 300px;\r\n min-height: 37px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--leftPillCon {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-direction: column;\r\n min-width: 125px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--heading1 {\r\n font-size: 12px;\r\n font-weight: bold;\r\n color: #3c4656;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--iframePopUp {\r\n display: block;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--heading6 {\r\n font-size: 10px;\r\n color: #3c4656;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--heading7{\r\n font-size: 12px;\r\n background: yellow;\r\n border-radius: 20px;\r\n padding: 0 5px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--centerPillCon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0 6px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--rightPillCon{\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0 6px;\r\n min-width: 152px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--statusIndicator {\r\n padding: 0 3px 5px 0;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--dialpadCon {\r\n position: absolute;\r\n top: 55px;\r\n width: 100%;\r\n left: 5em;\r\n max-width: 202px;\r\n padding: 15px;\r\n background: #263238;\r\n border-radius: 22.5px;\r\n box-shadow: 0 5px 10px -5px rgba(0, 0, 0, 0.2);\r\n z-index: 10;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--inputCon {\r\n width: 100%;\r\n margin-bottom: 5px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--inputCon input {\r\n background: #37474f;\r\n color: #cfd8dc;\r\n padding: 5px;\r\n border: none;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--inputCon input:focus {\r\n outline: none;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--btn {\r\n display: inline-block;\r\n width: calc(33.33% - 10px);\r\n font-size: 14px;\r\n background: transparent;\r\n border: none;\r\n color: #cfd8dc;\r\n padding: 10px 0;\r\n text-align: center;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--btn:hover {\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_CallCapsule_style--btn:nth-child(3n - 1) {\r\n margin: 0 15px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--visible {\r\n visibility: visible;\r\n overflow: hidden;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--hidden {\r\n visibility: hidden;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--callActionCon {\r\n display: flex;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--marginLeft {\r\n margin-left: 40px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--CallerPillCon hr {\r\n width: 100%;\r\n margin: 0;\r\n outline: none;\r\n border: none;\r\n border-right: 1px solid #ddd;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_CallCapsule_style--shake {\r\n 0% {\r\n -webkit-transform: translate(2px, 1px) rotate(0deg);\r\n }\r\n 10% {\r\n -webkit-transform: translate(-1px, -2px) rotate(-1deg);\r\n }\r\n 20% {\r\n -webkit-transform: translate(-3px, 0px) rotate(1deg);\r\n }\r\n 30% {\r\n -webkit-transform: translate(0px, 2px) rotate(0deg);\r\n }\r\n 40% {\r\n -webkit-transform: translate(1px, -1px) rotate(1deg);\r\n }\r\n 50% {\r\n -webkit-transform: translate(-1px, 2px) rotate(-1deg);\r\n }\r\n 60% {\r\n -webkit-transform: translate(-3px, 1px) rotate(0deg);\r\n }\r\n 70% {\r\n -webkit-transform: translate(2px, 1px) rotate(-1deg);\r\n }\r\n 80% {\r\n -webkit-transform: translate(-1px, -1px) rotate(1deg);\r\n }\r\n 90% {\r\n -webkit-transform: translate(2px, 2px) rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: translate(1px, -2px) rotate(-1deg);\r\n }\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--shake {\r\n -webkit-animation-name: utilities_ops-app-frame_CallCapsule_style--shake;\r\n -webkit-animation-duration: 1.3s;\r\n -webkit-transform-origin: 50% 50%;\r\n -webkit-animation-iteration-count: infinite;\r\n -webkit-animation-timing-function: linear;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--actionIcon {\r\n position: relative;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--wrapText {\r\n font-size: 9px;\r\n position: absolute;\r\n top: 22px;\r\n}\r\n\r\n.utilities_ops-app-frame_CallCapsule_style--container {\r\n max-width: 100%;\r\n max-height: 100%;\r\n position: relative;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--numberCircle {\r\n border-radius: 40%;\r\n cursor: pointer;\r\n width: 28px;\r\n height: 18px;\r\n padding: 0px 11px;\r\n background: #fff;\r\n color: #666;\r\n text-align: center;\r\n font-size: 12px;\r\n margin-bottom: 9px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--unreadCircle{\r\n border-radius: 50%;\r\n cursor: pointer;\r\n width: 16px;\r\n height: 16px;\r\n padding: 2px 2px 3px;\r\n background: #e81010;\r\n color: #fff;\r\n text-align: center;\r\n font-size: 8px;\r\n position: absolute;\r\n left: 18px;\r\n top: -3px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--iconBtn{\r\n margin: 0 5px;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--iconBtn:focus{\r\n outline: none !important\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--icon{\r\n color: #000;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--disabledIcon svg{\r\n opacity:0.4;\r\n cursor: not-allowed;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--dialog{\r\nwidth: 420px;\r\nheight: 115px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--dialogCon{\r\n position: absolute;\r\n top: 35%;\r\n left: 36%;\r\n border: 1px solid rgb(204, 204, 204);\r\n background: rgb(255, 255, 255);\r\n overflow: auto;\r\n border-radius: 4px;\r\n outline: none;\r\n padding: 0px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--dialogHeading{\r\n background-color: #1d5ab9;\r\n color: #fff;\r\n padding: 10px 5px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--dialogInfo{\r\n padding: 20px 10px;\r\n text-align: center;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--dialogBtn{\r\n margin: 5px;\r\n text-align:right;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--warningMsg {\r\n color: #fff;\r\n display: flex;\r\n background-color: #dd392b;\r\n border-radius: 7px;\r\n justify-content: center;\r\n min-width: 300px;\r\n font-size: 12px;\r\n margin: 0 25px -1px 25px;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--capsuleSpinner{\r\n position: absolute;\r\n left:47%;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--opacity{\r\n opacity: 0.5;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--closeFlexIcon {\r\n position: absolute;\r\n right: 2px;\r\n top: 14px;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_CallCapsule_style--callIndicator{\r\n margin-top: 7px;\r\n}";
|
|
36936
36722
|
styleInject(css_248z$4);
|
|
36937
36723
|
|
|
36938
|
-
var _styleModuleImportMap$3 = {
|
|
36939
|
-
"./style.css": {
|
|
36940
|
-
"flex-iframe": "utilities_ops-app-frame_CallCapsule_style--flex-iframe",
|
|
36941
|
-
"flex-bar": "utilities_ops-app-frame_CallCapsule_style--flex-bar",
|
|
36942
|
-
"iframeSection": "utilities_ops-app-frame_CallCapsule_style--iframeSection",
|
|
36943
|
-
"fullScreen": "utilities_ops-app-frame_CallCapsule_style--fullScreen",
|
|
36944
|
-
"CallerPillCon": "utilities_ops-app-frame_CallCapsule_style--CallerPillCon",
|
|
36945
|
-
"leftPillCon": "utilities_ops-app-frame_CallCapsule_style--leftPillCon",
|
|
36946
|
-
"heading1": "utilities_ops-app-frame_CallCapsule_style--heading1",
|
|
36947
|
-
"iframePopUp": "utilities_ops-app-frame_CallCapsule_style--iframePopUp",
|
|
36948
|
-
"heading6": "utilities_ops-app-frame_CallCapsule_style--heading6",
|
|
36949
|
-
"heading7": "utilities_ops-app-frame_CallCapsule_style--heading7",
|
|
36950
|
-
"centerPillCon": "utilities_ops-app-frame_CallCapsule_style--centerPillCon",
|
|
36951
|
-
"rightPillCon": "utilities_ops-app-frame_CallCapsule_style--rightPillCon",
|
|
36952
|
-
"statusIndicator": "utilities_ops-app-frame_CallCapsule_style--statusIndicator",
|
|
36953
|
-
"dialpadCon": "utilities_ops-app-frame_CallCapsule_style--dialpadCon",
|
|
36954
|
-
"inputCon": "utilities_ops-app-frame_CallCapsule_style--inputCon",
|
|
36955
|
-
"btn": "utilities_ops-app-frame_CallCapsule_style--btn",
|
|
36956
|
-
"visible": "utilities_ops-app-frame_CallCapsule_style--visible",
|
|
36957
|
-
"hidden": "utilities_ops-app-frame_CallCapsule_style--hidden",
|
|
36958
|
-
"callActionCon": "utilities_ops-app-frame_CallCapsule_style--callActionCon",
|
|
36959
|
-
"marginLeft": "utilities_ops-app-frame_CallCapsule_style--marginLeft",
|
|
36960
|
-
"shake": "utilities_ops-app-frame_CallCapsule_style--shake",
|
|
36961
|
-
"actionIcon": "utilities_ops-app-frame_CallCapsule_style--actionIcon",
|
|
36962
|
-
"wrapText": "utilities_ops-app-frame_CallCapsule_style--wrapText",
|
|
36963
|
-
"container": "utilities_ops-app-frame_CallCapsule_style--container",
|
|
36964
|
-
"numberCircle": "utilities_ops-app-frame_CallCapsule_style--numberCircle",
|
|
36965
|
-
"unreadCircle": "utilities_ops-app-frame_CallCapsule_style--unreadCircle",
|
|
36966
|
-
"iconBtn": "utilities_ops-app-frame_CallCapsule_style--iconBtn",
|
|
36967
|
-
"icon": "utilities_ops-app-frame_CallCapsule_style--icon",
|
|
36968
|
-
"disabledIcon": "utilities_ops-app-frame_CallCapsule_style--disabledIcon",
|
|
36969
|
-
"dialog": "utilities_ops-app-frame_CallCapsule_style--dialog",
|
|
36970
|
-
"dialogCon": "utilities_ops-app-frame_CallCapsule_style--dialogCon",
|
|
36971
|
-
"dialogHeading": "utilities_ops-app-frame_CallCapsule_style--dialogHeading",
|
|
36972
|
-
"dialogInfo": "utilities_ops-app-frame_CallCapsule_style--dialogInfo",
|
|
36973
|
-
"dialogBtn": "utilities_ops-app-frame_CallCapsule_style--dialogBtn",
|
|
36974
|
-
"warningMsg": "utilities_ops-app-frame_CallCapsule_style--warningMsg",
|
|
36975
|
-
"capsuleSpinner": "utilities_ops-app-frame_CallCapsule_style--capsuleSpinner",
|
|
36976
|
-
"opacity": "utilities_ops-app-frame_CallCapsule_style--opacity",
|
|
36977
|
-
"closeFlexIcon": "utilities_ops-app-frame_CallCapsule_style--closeFlexIcon",
|
|
36978
|
-
"callIndicator": "utilities_ops-app-frame_CallCapsule_style--callIndicator"
|
|
36979
|
-
}
|
|
36980
|
-
};
|
|
36981
|
-
|
|
36982
|
-
var IconComponent = function IconComponent(_ref) {
|
|
36983
|
-
var name = _ref.name,
|
|
36984
|
-
_ref$customStyle = _ref.customStyle,
|
|
36985
|
-
customStyle = _ref$customStyle === void 0 ? '' : _ref$customStyle,
|
|
36986
|
-
_ref$tooltipContent = _ref.tooltipContent,
|
|
36987
|
-
tooltipContent = _ref$tooltipContent === void 0 ? '' : _ref$tooltipContent,
|
|
36988
|
-
onClick = _ref.onClick;
|
|
36989
|
-
var fieldDisplay = null;
|
|
36990
|
-
|
|
36991
|
-
switch (name) {
|
|
36992
|
-
case 'dialpad':
|
|
36993
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
36994
|
-
width: "16px",
|
|
36995
|
-
height: "18px",
|
|
36996
|
-
viewBox: "0 0 16 22",
|
|
36997
|
-
version: "1.1",
|
|
36998
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
36999
|
-
}, React__default["default"].createElement("defs", null, React__default["default"].createElement("path", {
|
|
37000
|
-
d: "M12,19 C10.9,19 10,19.9 10,21 C10,22.1 10.9,23 12,23 C13.1,23 14,22.1 14,21 C14,19.9 13.1,19 12,19 L12,19 Z M6,1 C4.9,1 4,1.9 4,3 C4,4.1 4.9,5 6,5 C7.1,5 8,4.1 8,3 C8,1.9 7.1,1 6,1 L6,1 Z M6,7 C4.9,7 4,7.9 4,9 C4,10.1 4.9,11 6,11 C7.1,11 8,10.1 8,9 C8,7.9 7.1,7 6,7 L6,7 Z M6,13 C4.9,13 4,13.9 4,15 C4,16.1 4.9,17 6,17 C7.1,17 8,16.1 8,15 C8,13.9 7.1,13 6,13 L6,13 Z M18,5 C19.1,5 20,4.1 20,3 C20,1.9 19.1,1 18,1 C16.9,1 16,1.9 16,3 C16,4.1 16.9,5 18,5 L18,5 Z M12,13 C10.9,13 10,13.9 10,15 C10,16.1 10.9,17 12,17 C13.1,17 14,16.1 14,15 C14,13.9 13.1,13 12,13 L12,13 Z M18,13 C16.9,13 16,13.9 16,15 C16,16.1 16.9,17 18,17 C19.1,17 20,16.1 20,15 C20,13.9 19.1,13 18,13 L18,13 Z M18,7 C16.9,7 16,7.9 16,9 C16,10.1 16.9,11 18,11 C19.1,11 20,10.1 20,9 C20,7.9 19.1,7 18,7 L18,7 Z M12,7 C10.9,7 10,7.9 10,9 C10,10.1 10.9,11 12,11 C13.1,11 14,10.1 14,9 C14,7.9 13.1,7 12,7 L12,7 Z M12,1 C10.9,1 10,1.9 10,3 C10,4.1 10.9,5 12,5 C13.1,5 14,4.1 14,3 C14,1.9 13.1,1 12,1 L12,1 Z",
|
|
37001
|
-
id: "path-dialpad"
|
|
37002
|
-
})), React__default["default"].createElement("g", {
|
|
37003
|
-
id: "Symbols",
|
|
37004
|
-
stroke: "none",
|
|
37005
|
-
strokeWidth: "1",
|
|
37006
|
-
fill: "none",
|
|
37007
|
-
fillRule: "evenodd"
|
|
37008
|
-
}, React__default["default"].createElement("g", {
|
|
37009
|
-
id: "Artboard",
|
|
37010
|
-
transform: "translate(-361.000000, -48.000000)"
|
|
37011
|
-
}, React__default["default"].createElement("g", {
|
|
37012
|
-
id: "Group",
|
|
37013
|
-
transform: "translate(357.000000, 47.000000)"
|
|
37014
|
-
}, React__default["default"].createElement("polygon", {
|
|
37015
|
-
id: "Bounds",
|
|
37016
|
-
points: "0 0 24 0 24 24 0 24"
|
|
37017
|
-
}), React__default["default"].createElement("mask", {
|
|
37018
|
-
id: "mask-dialpad",
|
|
37019
|
-
fill: "white"
|
|
37020
|
-
}, React__default["default"].createElement("use", {
|
|
37021
|
-
xlinkHref: "#path-dialpad"
|
|
37022
|
-
})), React__default["default"].createElement("use", {
|
|
37023
|
-
id: "Mask",
|
|
37024
|
-
fill: "#000000",
|
|
37025
|
-
xlinkHref: "#path-dialpad"
|
|
37026
|
-
}), React__default["default"].createElement("g", {
|
|
37027
|
-
mask: "url(#mask-dialpad)",
|
|
37028
|
-
fill: "#000000",
|
|
37029
|
-
id: "Color-1"
|
|
37030
|
-
}, React__default["default"].createElement("g", null, React__default["default"].createElement("rect", {
|
|
37031
|
-
id: "Color-1",
|
|
37032
|
-
x: "0",
|
|
37033
|
-
y: "0",
|
|
37034
|
-
width: "24",
|
|
37035
|
-
height: "24"
|
|
37036
|
-
})))))));
|
|
37037
|
-
break;
|
|
37038
|
-
|
|
37039
|
-
case 'reload':
|
|
37040
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37041
|
-
width: "18px",
|
|
37042
|
-
height: "20px",
|
|
37043
|
-
viewBox: "0 0 20 20",
|
|
37044
|
-
version: "1.1",
|
|
37045
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37046
|
-
}, React__default["default"].createElement("g", {
|
|
37047
|
-
id: "Symbols",
|
|
37048
|
-
stroke: "none",
|
|
37049
|
-
strokeWidth: "1",
|
|
37050
|
-
fill: "none",
|
|
37051
|
-
fillRule: "evenodd"
|
|
37052
|
-
}, React__default["default"].createElement("g", {
|
|
37053
|
-
id: "Artboard-Copy",
|
|
37054
|
-
transform: "translate(-138.000000, -36.000000)",
|
|
37055
|
-
fill: "#171717",
|
|
37056
|
-
fillRule: "nonzero"
|
|
37057
|
-
}, React__default["default"].createElement("path", {
|
|
37058
|
-
d: "M148,56 C148.917969,56 149.803385,55.8811849 150.65625,55.6435547 C151.509115,55.4059245 152.306641,55.070638 153.048828,54.6376953 C153.791016,54.2047526 154.466471,53.6839193 155.075195,53.0751953 C155.683919,52.4664714 156.204753,51.7910156 156.637695,51.0488281 C157.070638,50.3066406 157.405924,49.5091146 157.643555,48.65625 C157.881185,47.8033854 158,46.9179688 158,46 C158,44.8802083 157.820964,43.804362 157.462891,42.7724609 C157.104818,41.7405599 156.601888,40.7998047 155.954102,39.9501953 C155.306315,39.1005859 154.533203,38.3649089 153.634766,37.7431641 C152.736328,37.1214193 151.746745,36.6640625 150.666016,36.3710938 L150.666016,36.3710938 L150.333984,37.5722656 C151.277995,37.8326823 152.142253,38.2347005 152.926758,38.7783203 C153.711263,39.3219401 154.386719,39.9648438 154.953125,40.7070312 C155.519531,41.4492188 155.960612,42.2727865 156.276367,43.1777344 C156.592122,44.0826823 156.75,45.0234375 156.75,46 C156.75,46.8072917 156.645833,47.5820312 156.4375,48.3242188 C156.229167,49.0664062 155.93457,49.7613932 155.553711,50.4091797 C155.172852,51.0569661 154.715495,51.6477865 154.181641,52.1816406 C153.647786,52.7154948 153.056966,53.1728516 152.40918,53.5537109 C151.761393,53.9345703 151.064779,54.2291667 150.319336,54.4375 C149.573893,54.6458333 148.800781,54.75 148,54.75 C147.192708,54.75 146.417969,54.6458333 145.675781,54.4375 C144.933594,54.2291667 144.238607,53.9345703 143.59082,53.5537109 C142.943034,53.1728516 142.352214,52.7154948 141.818359,52.1816406 C141.284505,51.6477865 140.827148,51.0569661 140.446289,50.4091797 C140.06543,49.7613932 139.770833,49.0647786 139.5625,48.3193359 C139.354167,47.5738932 139.25,46.8007812 139.25,46 C139.25,45.1601562 139.367188,44.343099 139.601562,43.5488281 C139.835938,42.7545573 140.171224,42.0139974 140.607422,41.3271484 C141.04362,40.6402995 141.569336,40.0218099 142.18457,39.4716797 C142.799805,38.9215495 143.488281,38.4641927 144.25,38.0996094 L144.25,38.0996094 L144.25,41 L145.5,41 L145.5,36 L140.5,36 L140.5,37.25 L143.175781,37.25 C142.375,37.6927083 141.655599,38.2249349 141.017578,38.8466797 C140.379557,39.4684245 139.837565,40.1585286 139.391602,40.9169922 C138.945638,41.6754557 138.602214,42.484375 138.361328,43.34375 C138.120443,44.203125 138,45.0885417 138,46 C138,46.9244792 138.118815,47.8115234 138.356445,48.6611328 C138.594076,49.5107422 138.929362,50.3066406 139.362305,51.0488281 C139.795247,51.7910156 140.316081,52.4664714 140.924805,53.0751953 C141.533529,53.6839193 142.208984,54.2047526 142.951172,54.6376953 C143.693359,55.070638 144.490885,55.4059245 145.34375,55.6435547 C146.196615,55.8811849 147.082031,56 148,56 Z",
|
|
37059
|
-
id: "icon_reload"
|
|
37060
|
-
}))));
|
|
37061
|
-
break;
|
|
37062
|
-
|
|
37063
|
-
case 'accept':
|
|
37064
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37065
|
-
width: "36px",
|
|
37066
|
-
height: "25px",
|
|
37067
|
-
viewBox: "0 0 36 25",
|
|
37068
|
-
version: "1.1",
|
|
37069
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37070
|
-
}, React__default["default"].createElement("defs", null, React__default["default"].createElement("polygon", {
|
|
37071
|
-
id: "path-2",
|
|
37072
|
-
points: "7.5 13.475 4.025 10 2.84166667 11.175 7.5 15.8333333 17.5 5.83333333 16.325 4.65833333"
|
|
37073
|
-
})), React__default["default"].createElement("g", {
|
|
37074
|
-
id: "Symbols",
|
|
37075
|
-
stroke: "none",
|
|
37076
|
-
strokeWidth: "1",
|
|
37077
|
-
fill: "none",
|
|
37078
|
-
fillRule: "evenodd"
|
|
37079
|
-
}, React__default["default"].createElement("g", {
|
|
37080
|
-
id: "Artboard-Copy",
|
|
37081
|
-
transform: "translate(-234.000000, -33.000000)"
|
|
37082
|
-
}, React__default["default"].createElement("g", {
|
|
37083
|
-
id: "icon_accept",
|
|
37084
|
-
transform: "translate(234.000000, 33.500000)"
|
|
37085
|
-
}, React__default["default"].createElement("rect", {
|
|
37086
|
-
id: "Rectangle",
|
|
37087
|
-
fill: "#4B9D4F",
|
|
37088
|
-
x: "0",
|
|
37089
|
-
y: "0",
|
|
37090
|
-
width: "36",
|
|
37091
|
-
height: "24",
|
|
37092
|
-
rx: "12"
|
|
37093
|
-
}), React__default["default"].createElement("g", {
|
|
37094
|
-
id: "icon_accept",
|
|
37095
|
-
transform: "translate(8.000000, 2.000000)"
|
|
37096
|
-
}, React__default["default"].createElement("polygon", {
|
|
37097
|
-
id: "Bounds",
|
|
37098
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37099
|
-
}), React__default["default"].createElement("mask", {
|
|
37100
|
-
id: "mask-3",
|
|
37101
|
-
fill: "white"
|
|
37102
|
-
}, React__default["default"].createElement("use", {
|
|
37103
|
-
xlinkHref: "#path-2"
|
|
37104
|
-
})), React__default["default"].createElement("use", {
|
|
37105
|
-
id: "Mask",
|
|
37106
|
-
fill: "#000000",
|
|
37107
|
-
xlinkHref: "#path-2"
|
|
37108
|
-
}), React__default["default"].createElement("g", {
|
|
37109
|
-
id: "Group",
|
|
37110
|
-
mask: "url(#mask-3)",
|
|
37111
|
-
fill: "#FFFFFF"
|
|
37112
|
-
}, React__default["default"].createElement("g", {
|
|
37113
|
-
id: "Color-2"
|
|
37114
|
-
}, React__default["default"].createElement("rect", {
|
|
37115
|
-
id: "color-2",
|
|
37116
|
-
x: "0",
|
|
37117
|
-
y: "0",
|
|
37118
|
-
width: "20",
|
|
37119
|
-
height: "20"
|
|
37120
|
-
}))))))));
|
|
37121
|
-
break;
|
|
37122
|
-
|
|
37123
|
-
case 'reject':
|
|
37124
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37125
|
-
width: "36px",
|
|
37126
|
-
height: "25px",
|
|
37127
|
-
viewBox: "0 0 36 25",
|
|
37128
|
-
version: "1.1",
|
|
37129
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37130
|
-
}, React__default["default"].createElement("defs", null, React__default["default"].createElement("polygon", {
|
|
37131
|
-
id: "path-3",
|
|
37132
|
-
points: "15.8333333 5.34166667 14.6583333 4.16666667 10 8.825 5.34166667 4.16666667 4.16666667 5.34166667 8.825 10 4.16666667 14.6583333 5.34166667 15.8333333 10 11.175 14.6583333 15.8333333 15.8333333 14.6583333 11.175 10"
|
|
37133
|
-
})), React__default["default"].createElement("g", {
|
|
37134
|
-
id: "Symbols",
|
|
37135
|
-
stroke: "none",
|
|
37136
|
-
strokeWidth: "1",
|
|
37137
|
-
fill: "none",
|
|
37138
|
-
fillRule: "evenodd"
|
|
37139
|
-
}, React__default["default"].createElement("g", {
|
|
37140
|
-
id: "Artboard-Copy",
|
|
37141
|
-
transform: "translate(-290.000000, -33.000000)"
|
|
37142
|
-
}, React__default["default"].createElement("g", {
|
|
37143
|
-
id: "icon_reject",
|
|
37144
|
-
transform: "translate(290.000000, 33.500000)"
|
|
37145
|
-
}, React__default["default"].createElement("rect", {
|
|
37146
|
-
id: "Rectangle",
|
|
37147
|
-
fill: "#E53935",
|
|
37148
|
-
x: "0",
|
|
37149
|
-
y: "0",
|
|
37150
|
-
width: "36",
|
|
37151
|
-
height: "24",
|
|
37152
|
-
rx: "12"
|
|
37153
|
-
}), React__default["default"].createElement("g", {
|
|
37154
|
-
id: "Icon_reject",
|
|
37155
|
-
transform: "translate(8.000000, 2.000000)"
|
|
37156
|
-
}, React__default["default"].createElement("polygon", {
|
|
37157
|
-
id: "Bounds",
|
|
37158
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37159
|
-
}), React__default["default"].createElement("mask", {
|
|
37160
|
-
id: "mask-4",
|
|
37161
|
-
fill: "white"
|
|
37162
|
-
}, React__default["default"].createElement("use", {
|
|
37163
|
-
xlinkHref: "#path-3"
|
|
37164
|
-
})), React__default["default"].createElement("use", {
|
|
37165
|
-
id: "Mask",
|
|
37166
|
-
fill: "#000000",
|
|
37167
|
-
xlinkHref: "#path-3"
|
|
37168
|
-
}), React__default["default"].createElement("g", {
|
|
37169
|
-
id: "Group",
|
|
37170
|
-
mask: "url(#mask-4)",
|
|
37171
|
-
fill: "#FFFFFF"
|
|
37172
|
-
}, React__default["default"].createElement("g", {
|
|
37173
|
-
id: "Color-3"
|
|
37174
|
-
}, React__default["default"].createElement("rect", {
|
|
37175
|
-
id: "color-3",
|
|
37176
|
-
x: "0",
|
|
37177
|
-
y: "0",
|
|
37178
|
-
width: "20",
|
|
37179
|
-
height: "20"
|
|
37180
|
-
}))))))));
|
|
37181
|
-
break;
|
|
37182
|
-
|
|
37183
|
-
case 'wrapup':
|
|
37184
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37185
|
-
width: "36px",
|
|
37186
|
-
height: "24px",
|
|
37187
|
-
viewBox: "0 0 36 24",
|
|
37188
|
-
version: "1.1",
|
|
37189
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37190
|
-
}, React__default["default"].createElement("defs", null, React__default["default"].createElement("path", {
|
|
37191
|
-
d: "M10,7.5 C8.66666667,7.5 7.375,7.70833333 6.16666667,8.1 L6.16666667,10.6833333 C6.16666667,11.0083333 5.975,11.3 5.7,11.4333333 C4.88333333,11.8416667 4.14166667,12.3666667 3.48333333,12.975 C3.33333333,13.125 3.125,13.2083333 2.9,13.2083333 C2.66666667,13.2083333 2.45833333,13.1166667 2.30833333,12.9666667 L0.241666667,10.9 C0.0916666667,10.7583333 0,10.55 0,10.3166667 C0,10.0833333 0.0916666667,9.875 0.241666667,9.725 C2.78333333,7.31666667 6.21666667,5.83333333 10,5.83333333 C13.7833333,5.83333333 17.2166667,7.31666667 19.7583333,9.725 C19.9083333,9.875 20,10.0833333 20,10.3166667 C20,10.55 19.9083333,10.7583333 19.7583333,10.9083333 L17.6916667,12.975 C17.5416667,13.125 17.3333333,13.2166667 17.1,13.2166667 C16.875,13.2166667 16.6666667,13.125 16.5166667,12.9833333 C15.8583333,12.3666667 15.1083333,11.85 14.2916667,11.4416667 C14.0166667,11.3083333 13.825,11.025 13.825,10.6916667 L13.825,8.10833333 C12.625,7.70833333 11.3333333,7.5 10,7.5 L10,7.5 Z",
|
|
37192
|
-
id: "path-4"
|
|
37193
|
-
})), React__default["default"].createElement("g", {
|
|
37194
|
-
id: "Symbols",
|
|
37195
|
-
stroke: "none",
|
|
37196
|
-
strokeWidth: "1",
|
|
37197
|
-
fill: "none",
|
|
37198
|
-
fillRule: "evenodd"
|
|
37199
|
-
}, React__default["default"].createElement("g", {
|
|
37200
|
-
id: "Artboard-Copy",
|
|
37201
|
-
transform: "translate(-290.000000, -133.000000)"
|
|
37202
|
-
}, React__default["default"].createElement("g", {
|
|
37203
|
-
id: "icon_complete_call",
|
|
37204
|
-
transform: "translate(290.000000, 133.000000)"
|
|
37205
|
-
}, React__default["default"].createElement("rect", {
|
|
37206
|
-
id: "Rectangle",
|
|
37207
|
-
fill: "#1D5AB9",
|
|
37208
|
-
x: "0",
|
|
37209
|
-
y: "0",
|
|
37210
|
-
width: "36",
|
|
37211
|
-
height: "24",
|
|
37212
|
-
rx: "12"
|
|
37213
|
-
}), React__default["default"].createElement("g", {
|
|
37214
|
-
id: "icon_accept",
|
|
37215
|
-
transform: "translate(8.000000, 2.000000)"
|
|
37216
|
-
}, React__default["default"].createElement("polygon", {
|
|
37217
|
-
id: "Bounds",
|
|
37218
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37219
|
-
}), React__default["default"].createElement("mask", {
|
|
37220
|
-
id: "mask-5",
|
|
37221
|
-
fill: "white"
|
|
37222
|
-
}, React__default["default"].createElement("use", {
|
|
37223
|
-
xlinkHref: "#path-4"
|
|
37224
|
-
})), React__default["default"].createElement("use", {
|
|
37225
|
-
id: "Mask",
|
|
37226
|
-
fill: "#000000",
|
|
37227
|
-
xlinkHref: "#path-4"
|
|
37228
|
-
}), React__default["default"].createElement("g", {
|
|
37229
|
-
id: "Group",
|
|
37230
|
-
mask: "url(#mask-5)",
|
|
37231
|
-
fill: "#FFFFFF"
|
|
37232
|
-
}, React__default["default"].createElement("g", {
|
|
37233
|
-
id: "Color"
|
|
37234
|
-
}, React__default["default"].createElement("rect", {
|
|
37235
|
-
id: "color",
|
|
37236
|
-
x: "0",
|
|
37237
|
-
y: "0",
|
|
37238
|
-
width: "20",
|
|
37239
|
-
height: "20"
|
|
37240
|
-
}))))))));
|
|
37241
|
-
break;
|
|
37242
|
-
|
|
37243
|
-
case 'end':
|
|
37244
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37245
|
-
width: "36px",
|
|
37246
|
-
height: "24px",
|
|
37247
|
-
viewBox: "0 0 36 24",
|
|
37248
|
-
version: "1.1",
|
|
37249
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37250
|
-
}, React__default["default"].createElement("defs", null, React__default["default"].createElement("path", {
|
|
37251
|
-
d: "M10,7.5 C8.66666667,7.5 7.375,7.70833333 6.16666667,8.1 L6.16666667,10.6833333 C6.16666667,11.0083333 5.975,11.3 5.7,11.4333333 C4.88333333,11.8416667 4.14166667,12.3666667 3.48333333,12.975 C3.33333333,13.125 3.125,13.2083333 2.9,13.2083333 C2.66666667,13.2083333 2.45833333,13.1166667 2.30833333,12.9666667 L0.241666667,10.9 C0.0916666667,10.7583333 0,10.55 0,10.3166667 C0,10.0833333 0.0916666667,9.875 0.241666667,9.725 C2.78333333,7.31666667 6.21666667,5.83333333 10,5.83333333 C13.7833333,5.83333333 17.2166667,7.31666667 19.7583333,9.725 C19.9083333,9.875 20,10.0833333 20,10.3166667 C20,10.55 19.9083333,10.7583333 19.7583333,10.9083333 L17.6916667,12.975 C17.5416667,13.125 17.3333333,13.2166667 17.1,13.2166667 C16.875,13.2166667 16.6666667,13.125 16.5166667,12.9833333 C15.8583333,12.3666667 15.1083333,11.85 14.2916667,11.4416667 C14.0166667,11.3083333 13.825,11.025 13.825,10.6916667 L13.825,8.10833333 C12.625,7.70833333 11.3333333,7.5 10,7.5 L10,7.5 Z",
|
|
37252
|
-
id: "path-5"
|
|
37253
|
-
})), React__default["default"].createElement("g", {
|
|
37254
|
-
id: "Symbols",
|
|
37255
|
-
stroke: "none",
|
|
37256
|
-
strokeWidth: "1",
|
|
37257
|
-
fill: "none",
|
|
37258
|
-
fillRule: "evenodd"
|
|
37259
|
-
}, React__default["default"].createElement("g", {
|
|
37260
|
-
id: "Artboard-Copy",
|
|
37261
|
-
transform: "translate(-290.000000, -70.000000)"
|
|
37262
|
-
}, React__default["default"].createElement("g", {
|
|
37263
|
-
id: "icon_end_call",
|
|
37264
|
-
transform: "translate(290.000000, 70.000000)"
|
|
37265
|
-
}, React__default["default"].createElement("rect", {
|
|
37266
|
-
id: "Rectangle",
|
|
37267
|
-
fill: "#E53935",
|
|
37268
|
-
x: "0",
|
|
37269
|
-
y: "0",
|
|
37270
|
-
width: "36",
|
|
37271
|
-
height: "24",
|
|
37272
|
-
rx: "12"
|
|
37273
|
-
}), React__default["default"].createElement("g", {
|
|
37274
|
-
id: "icon_end_call",
|
|
37275
|
-
transform: "translate(8.000000, 2.000000)"
|
|
37276
|
-
}, React__default["default"].createElement("polygon", {
|
|
37277
|
-
id: "Bounds",
|
|
37278
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37279
|
-
}), React__default["default"].createElement("mask", {
|
|
37280
|
-
id: "mask-6",
|
|
37281
|
-
fill: "white"
|
|
37282
|
-
}, React__default["default"].createElement("use", {
|
|
37283
|
-
xlinkHref: "#path-5"
|
|
37284
|
-
})), React__default["default"].createElement("use", {
|
|
37285
|
-
id: "Mask",
|
|
37286
|
-
fill: "#000000",
|
|
37287
|
-
xlinkHref: "#path-5"
|
|
37288
|
-
}), React__default["default"].createElement("g", {
|
|
37289
|
-
id: "Group",
|
|
37290
|
-
mask: "url(#mask-6)",
|
|
37291
|
-
fill: "#FFFFFF"
|
|
37292
|
-
}, React__default["default"].createElement("g", {
|
|
37293
|
-
id: "Color"
|
|
37294
|
-
}, React__default["default"].createElement("rect", {
|
|
37295
|
-
id: "color",
|
|
37296
|
-
x: "0",
|
|
37297
|
-
y: "0",
|
|
37298
|
-
width: "20",
|
|
37299
|
-
height: "20"
|
|
37300
|
-
}))))))));
|
|
37301
|
-
break;
|
|
37302
|
-
|
|
37303
|
-
case 'in_call':
|
|
37304
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37305
|
-
width: "20px",
|
|
37306
|
-
height: "20px",
|
|
37307
|
-
viewBox: "0 0 20 20",
|
|
37308
|
-
version: "1.1",
|
|
37309
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37310
|
-
}, React__default["default"].createElement("g", {
|
|
37311
|
-
id: "Symbols",
|
|
37312
|
-
stroke: "none",
|
|
37313
|
-
strokeWidth: "1",
|
|
37314
|
-
fill: "none",
|
|
37315
|
-
fillRule: "evenodd"
|
|
37316
|
-
}, React__default["default"].createElement("g", {
|
|
37317
|
-
id: "Artboard-Copy",
|
|
37318
|
-
transform: "translate(-266.000000, -163.000000)"
|
|
37319
|
-
}, React__default["default"].createElement("g", {
|
|
37320
|
-
id: "phone-in-progress-icon",
|
|
37321
|
-
transform: "translate(266.000000, 163.000000)"
|
|
37322
|
-
}, React__default["default"].createElement("polygon", {
|
|
37323
|
-
id: "bounds",
|
|
37324
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37325
|
-
}), React__default["default"].createElement("path", {
|
|
37326
|
-
d: "M16.6666667,12.9166667 C15.625,12.9166667 14.625,12.75 13.6916667,12.4416667 C13.4,12.35 13.075,12.4166667 12.8416667,12.6416667 L11.0083333,14.475 C8.65,13.275 6.71666667,11.35 5.51666667,8.98333333 L7.35,7.14166667 C7.58333333,6.925 7.65,6.6 7.55833333,6.30833333 C7.25,5.375 7.08333333,4.375 7.08333333,3.33333333 C7.08333333,2.875 6.70833333,2.5 6.25,2.5 L3.33333333,2.5 C2.875,2.5 2.5,2.875 2.5,3.33333333 C2.5,11.1583333 8.84166667,17.5 16.6666667,17.5 C17.125,17.5 17.5,17.125 17.5,16.6666667 L17.5,13.75 C17.5,13.2916667 17.125,12.9166667 16.6666667,12.9166667 Z M15.8333333,10 L17.5,10 C17.5,5.85833333 14.1416667,2.5 10,2.5 L10,4.16666667 C13.225,4.16666667 15.8333333,6.775 15.8333333,10 Z M12.5,10 L14.1666667,10 C14.1666667,7.7 12.3,5.83333333 10,5.83333333 L10,7.5 C11.3833333,7.5 12.5,8.61666667 12.5,10 Z",
|
|
37327
|
-
id: "in-progress-icon",
|
|
37328
|
-
fill: "#1D5AB9",
|
|
37329
|
-
fillRule: "nonzero"
|
|
37330
|
-
})))));
|
|
37331
|
-
break;
|
|
37332
|
-
|
|
37333
|
-
case 'conference':
|
|
37334
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37335
|
-
width: "20px",
|
|
37336
|
-
height: "20px",
|
|
37337
|
-
viewBox: "0 0 20 20",
|
|
37338
|
-
version: "1.1",
|
|
37339
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37340
|
-
}, React__default["default"].createElement("g", {
|
|
37341
|
-
id: "Symbols",
|
|
37342
|
-
stroke: "none",
|
|
37343
|
-
strokeWidth: "1",
|
|
37344
|
-
fill: "none",
|
|
37345
|
-
fillRule: "evenodd"
|
|
37346
|
-
}, React__default["default"].createElement("g", {
|
|
37347
|
-
id: "Artboard-Copy",
|
|
37348
|
-
transform: "translate(-266.000000, -114.000000)"
|
|
37349
|
-
}, React__default["default"].createElement("g", {
|
|
37350
|
-
id: "phone-conference-icon",
|
|
37351
|
-
transform: "translate(266.000000, 114.000000)"
|
|
37352
|
-
}, React__default["default"].createElement("polygon", {
|
|
37353
|
-
id: "bounds",
|
|
37354
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37355
|
-
}), React__default["default"].createElement("path", {
|
|
37356
|
-
d: "M5.25,2.5 C5.70833333,2.5 6.08333333,2.875 6.08333333,3.33333333 C6.08333333,4.375 6.25,5.375 6.55833333,6.30833333 C6.65,6.6 6.58333333,6.925 6.35,7.14166667 L6.35,7.14166667 L4.51666667,8.98333333 C5.71666667,11.35 7.65,13.275 10.0083333,14.475 L10.0083333,14.475 L11.8416667,12.6416667 C12.075,12.4166667 12.4,12.35 12.6916667,12.4416667 C13.625,12.75 14.625,12.9166667 15.6666667,12.9166667 C16.125,12.9166667 16.5,13.2916667 16.5,13.75 L16.5,13.75 L16.5,16.6666667 C16.5,17.125 16.125,17.5 15.6666667,17.5 C7.84166667,17.5 1.5,11.1583333 1.5,3.33333333 C1.5,2.875 1.875,2.5 2.33333333,2.5 L2.33333333,2.5 Z M11.5,7 C12.665,7 15,7.585 15,8.75 L15,8.75 L15,10 L8,10 L8,8.75 C8,7.585 10.335,7 11.5,7 Z M15.5,7 C16.665,7 19,7.585 19,8.75 L19,8.75 L19,10 L16,10 L16,8.75 C16,8.01 15.595,7.445 15.015,7.025 C15.19,7.01 15.355,7 15.5,7 Z M15.5,3 C16.33,3 16.995,3.67 16.995,4.5 C16.995,5.33 16.33,6 15.5,6 C14.67,6 14,5.33 14,4.5 C14,3.67 14.67,3 15.5,3 Z M11.5,3 C12.33,3 12.995,3.67 12.995,4.5 C12.995,5.33 12.33,6 11.5,6 C10.67,6 10,5.33 10,4.5 C10,3.67 10.67,3 11.5,3 Z",
|
|
37357
|
-
id: "conference-icon",
|
|
37358
|
-
fill: "#1D5AB9",
|
|
37359
|
-
fillRule: "nonzero"
|
|
37360
|
-
})))));
|
|
37361
|
-
break;
|
|
37362
|
-
|
|
37363
|
-
case 'wrapping':
|
|
37364
|
-
fieldDisplay = React__default["default"].createElement("svg", {
|
|
37365
|
-
width: "20px",
|
|
37366
|
-
height: "20px",
|
|
37367
|
-
viewBox: "0 0 20 20",
|
|
37368
|
-
version: "1.1",
|
|
37369
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
37370
|
-
}, React__default["default"].createElement("g", {
|
|
37371
|
-
id: "Symbols",
|
|
37372
|
-
stroke: "none",
|
|
37373
|
-
strokeWidth: "1",
|
|
37374
|
-
fill: "none",
|
|
37375
|
-
fillRule: "evenodd"
|
|
37376
|
-
}, React__default["default"].createElement("g", {
|
|
37377
|
-
id: "Artboard-Copy",
|
|
37378
|
-
transform: "translate(-266.000000, -188.000000)"
|
|
37379
|
-
}, React__default["default"].createElement("g", {
|
|
37380
|
-
id: "phone-wrap-up-icon",
|
|
37381
|
-
transform: "translate(266.000000, 188.000000)"
|
|
37382
|
-
}, React__default["default"].createElement("polygon", {
|
|
37383
|
-
id: "bounds",
|
|
37384
|
-
points: "0 0 20 0 20 20 0 20"
|
|
37385
|
-
}), React__default["default"].createElement("path", {
|
|
37386
|
-
d: "M6.25,2.5 C6.70833333,2.5 7.08333333,2.875 7.08333333,3.33333333 C7.08333333,4.375 7.25,5.375 7.55833333,6.30833333 C7.65,6.6 7.58333333,6.925 7.35,7.14166667 L7.35,7.14166667 L5.51666667,8.98333333 C6.71666667,11.35 8.65,13.275 11.0083333,14.475 L11.0083333,14.475 L12.8416667,12.6416667 C13.075,12.4166667 13.4,12.35 13.6916667,12.4416667 C14.625,12.75 15.625,12.9166667 16.6666667,12.9166667 C17.125,12.9166667 17.5,13.2916667 17.5,13.75 L17.5,13.75 L17.5,16.6666667 C17.5,17.125 17.125,17.5 16.6666667,17.5 C8.84166667,17.5 2.5,11.1583333 2.5,3.33333333 C2.5,2.875 2.875,2.5 3.33333333,2.5 L3.33333333,2.5 Z M18.1083333,3 L19.1666667,4.05833333 L13.175,10.05 L10,6.875 L11.0583333,5.81666667 L13.1833333,7.94166667 L18.1083333,3 Z",
|
|
37387
|
-
id: "wrap-up-icon",
|
|
37388
|
-
fill: "#1D5AB9",
|
|
37389
|
-
fillRule: "nonzero"
|
|
37390
|
-
})))));
|
|
37391
|
-
break;
|
|
37392
|
-
|
|
37393
|
-
default:
|
|
37394
|
-
fieldDisplay = null;
|
|
37395
|
-
}
|
|
37396
|
-
|
|
37397
|
-
return React__default["default"].createElement(coreComponents.Tooltip, {
|
|
37398
|
-
content: tooltipContent
|
|
37399
|
-
}, React__default["default"].createElement("div", {
|
|
37400
|
-
onClick: onClick,
|
|
37401
|
-
className: "utilities_ops-app-frame_CallCapsule_style--iconBtn",
|
|
37402
|
-
name: name,
|
|
37403
|
-
onKeyPress: onClick,
|
|
37404
|
-
role: "button",
|
|
37405
|
-
tabIndex: "0"
|
|
37406
|
-
}, React__default["default"].createElement("span", {
|
|
37407
|
-
className: _getClassName(customStyle, _styleModuleImportMap$3, {
|
|
37408
|
-
"handleMissingStyleName": "warn"
|
|
37409
|
-
})
|
|
37410
|
-
}, fieldDisplay)));
|
|
37411
|
-
};
|
|
37412
|
-
|
|
37413
36724
|
/** @license React v16.13.1
|
|
37414
36725
|
* react-is.production.min.js
|
|
37415
36726
|
*
|
|
@@ -40297,1320 +39608,7 @@ var ReactModal = /*@__PURE__*/unwrapExports(lib);
|
|
|
40297
39608
|
|
|
40298
39609
|
ReactModal.setAppElement('*');
|
|
40299
39610
|
|
|
40300
|
-
|
|
40301
|
-
var showReload = _ref.showReload,
|
|
40302
|
-
onReloadFlex = _ref.onReloadFlex;
|
|
40303
|
-
return React__default["default"].createElement(ReactModal, {
|
|
40304
|
-
isOpen: showReload,
|
|
40305
|
-
className: "utilities_ops-app-frame_CallCapsule_style--dialogCon"
|
|
40306
|
-
}, React__default["default"].createElement("h3", {
|
|
40307
|
-
className: "utilities_ops-app-frame_CallCapsule_style--dialogHeading"
|
|
40308
|
-
}, "Warning!"), React__default["default"].createElement("p", {
|
|
40309
|
-
className: "utilities_ops-app-frame_CallCapsule_style--dialogInfo"
|
|
40310
|
-
}, "You have closed active flex tab. Please reload flex"), React__default["default"].createElement("div", {
|
|
40311
|
-
className: "utilities_ops-app-frame_CallCapsule_style--dialogBtn"
|
|
40312
|
-
}, React__default["default"].createElement(coreComponents.Button, {
|
|
40313
|
-
primary: true,
|
|
40314
|
-
onClick: onReloadFlex
|
|
40315
|
-
}, "Ok")));
|
|
40316
|
-
};
|
|
40317
|
-
|
|
40318
|
-
var Warning = function Warning(_ref) {
|
|
40319
|
-
var warning = _ref.warning,
|
|
40320
|
-
setWarning = _ref.setWarning,
|
|
40321
|
-
_ref$isVoiceEmpty = _ref.isVoiceEmpty,
|
|
40322
|
-
isVoiceEmpty = _ref$isVoiceEmpty === void 0 ? false : _ref$isVoiceEmpty,
|
|
40323
|
-
setShowFlex = _ref.setShowFlex,
|
|
40324
|
-
isFlexLoaded = _ref.isFlexLoaded;
|
|
40325
|
-
|
|
40326
|
-
var warningIconClick = function warningIconClick() {
|
|
40327
|
-
setShowFlex(true);
|
|
40328
|
-
|
|
40329
|
-
if (isVoiceEmpty) {
|
|
40330
|
-
setWarning('false');
|
|
40331
|
-
}
|
|
40332
|
-
};
|
|
40333
|
-
|
|
40334
|
-
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(coreComponents.Tooltip, {
|
|
40335
|
-
content: warning
|
|
40336
|
-
}, React__default["default"].createElement(coreComponents.IconButton, {
|
|
40337
|
-
disabled: isFlexLoaded,
|
|
40338
|
-
onClick: warningIconClick
|
|
40339
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40340
|
-
name: "warning",
|
|
40341
|
-
variant: "material",
|
|
40342
|
-
style: _objectSpread2({
|
|
40343
|
-
color: 'red'
|
|
40344
|
-
}, isFlexLoaded ? {
|
|
40345
|
-
opacity: '0.3',
|
|
40346
|
-
cursor: 'not-allowed'
|
|
40347
|
-
} : {
|
|
40348
|
-
cursor: 'pointer'
|
|
40349
|
-
})
|
|
40350
|
-
}))));
|
|
40351
|
-
};
|
|
40352
|
-
|
|
40353
|
-
var _styleModuleImportMap$2 = {
|
|
40354
|
-
"./style.css": {
|
|
40355
|
-
"flex-iframe": "utilities_ops-app-frame_CallCapsule_style--flex-iframe",
|
|
40356
|
-
"flex-bar": "utilities_ops-app-frame_CallCapsule_style--flex-bar",
|
|
40357
|
-
"iframeSection": "utilities_ops-app-frame_CallCapsule_style--iframeSection",
|
|
40358
|
-
"fullScreen": "utilities_ops-app-frame_CallCapsule_style--fullScreen",
|
|
40359
|
-
"CallerPillCon": "utilities_ops-app-frame_CallCapsule_style--CallerPillCon",
|
|
40360
|
-
"leftPillCon": "utilities_ops-app-frame_CallCapsule_style--leftPillCon",
|
|
40361
|
-
"heading1": "utilities_ops-app-frame_CallCapsule_style--heading1",
|
|
40362
|
-
"iframePopUp": "utilities_ops-app-frame_CallCapsule_style--iframePopUp",
|
|
40363
|
-
"heading6": "utilities_ops-app-frame_CallCapsule_style--heading6",
|
|
40364
|
-
"heading7": "utilities_ops-app-frame_CallCapsule_style--heading7",
|
|
40365
|
-
"centerPillCon": "utilities_ops-app-frame_CallCapsule_style--centerPillCon",
|
|
40366
|
-
"rightPillCon": "utilities_ops-app-frame_CallCapsule_style--rightPillCon",
|
|
40367
|
-
"statusIndicator": "utilities_ops-app-frame_CallCapsule_style--statusIndicator",
|
|
40368
|
-
"dialpadCon": "utilities_ops-app-frame_CallCapsule_style--dialpadCon",
|
|
40369
|
-
"inputCon": "utilities_ops-app-frame_CallCapsule_style--inputCon",
|
|
40370
|
-
"btn": "utilities_ops-app-frame_CallCapsule_style--btn",
|
|
40371
|
-
"visible": "utilities_ops-app-frame_CallCapsule_style--visible",
|
|
40372
|
-
"hidden": "utilities_ops-app-frame_CallCapsule_style--hidden",
|
|
40373
|
-
"callActionCon": "utilities_ops-app-frame_CallCapsule_style--callActionCon",
|
|
40374
|
-
"marginLeft": "utilities_ops-app-frame_CallCapsule_style--marginLeft",
|
|
40375
|
-
"shake": "utilities_ops-app-frame_CallCapsule_style--shake",
|
|
40376
|
-
"actionIcon": "utilities_ops-app-frame_CallCapsule_style--actionIcon",
|
|
40377
|
-
"wrapText": "utilities_ops-app-frame_CallCapsule_style--wrapText",
|
|
40378
|
-
"container": "utilities_ops-app-frame_CallCapsule_style--container",
|
|
40379
|
-
"numberCircle": "utilities_ops-app-frame_CallCapsule_style--numberCircle",
|
|
40380
|
-
"unreadCircle": "utilities_ops-app-frame_CallCapsule_style--unreadCircle",
|
|
40381
|
-
"iconBtn": "utilities_ops-app-frame_CallCapsule_style--iconBtn",
|
|
40382
|
-
"icon": "utilities_ops-app-frame_CallCapsule_style--icon",
|
|
40383
|
-
"disabledIcon": "utilities_ops-app-frame_CallCapsule_style--disabledIcon",
|
|
40384
|
-
"dialog": "utilities_ops-app-frame_CallCapsule_style--dialog",
|
|
40385
|
-
"dialogCon": "utilities_ops-app-frame_CallCapsule_style--dialogCon",
|
|
40386
|
-
"dialogHeading": "utilities_ops-app-frame_CallCapsule_style--dialogHeading",
|
|
40387
|
-
"dialogInfo": "utilities_ops-app-frame_CallCapsule_style--dialogInfo",
|
|
40388
|
-
"dialogBtn": "utilities_ops-app-frame_CallCapsule_style--dialogBtn",
|
|
40389
|
-
"warningMsg": "utilities_ops-app-frame_CallCapsule_style--warningMsg",
|
|
40390
|
-
"capsuleSpinner": "utilities_ops-app-frame_CallCapsule_style--capsuleSpinner",
|
|
40391
|
-
"opacity": "utilities_ops-app-frame_CallCapsule_style--opacity",
|
|
40392
|
-
"closeFlexIcon": "utilities_ops-app-frame_CallCapsule_style--closeFlexIcon",
|
|
40393
|
-
"callIndicator": "utilities_ops-app-frame_CallCapsule_style--callIndicator"
|
|
40394
|
-
}
|
|
40395
|
-
};
|
|
40396
|
-
|
|
40397
|
-
var CallIndicator = function CallIndicator(_ref) {
|
|
40398
|
-
var voiceTask = _ref.voiceTask;
|
|
40399
|
-
var _voiceTask$event = voiceTask.event,
|
|
40400
|
-
event = _voiceTask$event === void 0 ? '' : _voiceTask$event,
|
|
40401
|
-
conference = voiceTask.conference;
|
|
40402
|
-
return React__default["default"].createElement("span", {
|
|
40403
|
-
className: "utilities_ops-app-frame_CallCapsule_style--callIndicator"
|
|
40404
|
-
}, event === 'assigned' && conference !== 'true' && React__default["default"].createElement(IconComponent, {
|
|
40405
|
-
name: "in_call",
|
|
40406
|
-
customStyle: "icon",
|
|
40407
|
-
tooltipContent: "In Call"
|
|
40408
|
-
}), event === 'wrapping' && React__default["default"].createElement(IconComponent, {
|
|
40409
|
-
name: "wrapping",
|
|
40410
|
-
customStyle: "icon",
|
|
40411
|
-
tooltipContent: "Wrapping"
|
|
40412
|
-
}), conference === 'true' && event === 'assigned' && React__default["default"].createElement(IconComponent, {
|
|
40413
|
-
name: "conference",
|
|
40414
|
-
customStyle: "icon",
|
|
40415
|
-
tooltipContent: "Conference"
|
|
40416
|
-
}));
|
|
40417
|
-
};
|
|
40418
|
-
|
|
40419
|
-
var CallerInfo = function CallerInfo(_ref2) {
|
|
40420
|
-
_ref2.isVoiceEmpty;
|
|
40421
|
-
var voiceTask = _ref2.voiceTask;
|
|
40422
|
-
var _voiceTask$callerNumb = voiceTask.callerNumber,
|
|
40423
|
-
callerNumber = _voiceTask$callerNumb === void 0 ? '' : _voiceTask$callerNumb,
|
|
40424
|
-
_voiceTask$callerType = voiceTask.callerType,
|
|
40425
|
-
callerType = _voiceTask$callerType === void 0 ? '' : _voiceTask$callerType,
|
|
40426
|
-
_voiceTask$callType = voiceTask.callType,
|
|
40427
|
-
callType = _voiceTask$callType === void 0 ? '' : _voiceTask$callType;
|
|
40428
|
-
return React__default["default"].createElement("div", {
|
|
40429
|
-
className: "utilities_ops-app-frame_CallCapsule_style--leftPillCon"
|
|
40430
|
-
}, React__default["default"].createElement(coreComponents.Typography, {
|
|
40431
|
-
variant: "h1",
|
|
40432
|
-
className: "utilities_ops-app-frame_CallCapsule_style--heading1"
|
|
40433
|
-
}, callerNumber ? getFormattedPhoneNumber(callerNumber) : noCallInfo), React__default["default"].createElement(coreComponents.Typography, {
|
|
40434
|
-
variant: "h6",
|
|
40435
|
-
className: "utilities_ops-app-frame_CallCapsule_style--heading6"
|
|
40436
|
-
}, callType === 'callback' ? callerType ? "".concat(callerType, " - CALLBACK") : 'CALLBACK' : "".concat(callerType)));
|
|
40437
|
-
};
|
|
40438
|
-
|
|
40439
|
-
var Voice = function Voice(_ref3) {
|
|
40440
|
-
var onAccept = _ref3.onAccept,
|
|
40441
|
-
onReject = _ref3.onReject,
|
|
40442
|
-
onWrapup = _ref3.onWrapup,
|
|
40443
|
-
onHangup = _ref3.onHangup,
|
|
40444
|
-
voiceTask = _ref3.voiceTask,
|
|
40445
|
-
role = _ref3.role;
|
|
40446
|
-
var _voiceTask$accept = voiceTask.accept,
|
|
40447
|
-
accept = _voiceTask$accept === void 0 ? '' : _voiceTask$accept,
|
|
40448
|
-
_voiceTask$wrapup = voiceTask.wrapup,
|
|
40449
|
-
wrapup = _voiceTask$wrapup === void 0 ? '' : _voiceTask$wrapup,
|
|
40450
|
-
_voiceTask$event2 = voiceTask.event,
|
|
40451
|
-
event = _voiceTask$event2 === void 0 ? '' : _voiceTask$event2;
|
|
40452
|
-
return React__default["default"].createElement("div", {
|
|
40453
|
-
className: "utilities_ops-app-frame_CallCapsule_style--centerPillCon"
|
|
40454
|
-
}, accept !== 'true' && wrapup !== 'true' && React__default["default"].createElement("div", {
|
|
40455
|
-
className: "utilities_ops-app-frame_CallCapsule_style--actionIcon"
|
|
40456
|
-
}, React__default["default"].createElement(IconComponent, {
|
|
40457
|
-
name: "accept",
|
|
40458
|
-
customStyle: "icon",
|
|
40459
|
-
tooltipContent: "Answer",
|
|
40460
|
-
onClick: onAccept
|
|
40461
|
-
})), accept !== 'true' && event === 'reserved' && enableRejectButton.includes(role) && React__default["default"].createElement("div", {
|
|
40462
|
-
className: "utilities_ops-app-frame_CallCapsule_style--actionIcon"
|
|
40463
|
-
}, React__default["default"].createElement(IconComponent, {
|
|
40464
|
-
name: "reject",
|
|
40465
|
-
customStyle: "icon",
|
|
40466
|
-
tooltipContent: "Reject",
|
|
40467
|
-
onClick: onReject
|
|
40468
|
-
})), accept === 'true' && wrapup !== 'true' && React__default["default"].createElement("div", {
|
|
40469
|
-
className: "utilities_ops-app-frame_CallCapsule_style--actionIcon"
|
|
40470
|
-
}, React__default["default"].createElement(IconComponent, {
|
|
40471
|
-
name: "end",
|
|
40472
|
-
customStyle: "icon",
|
|
40473
|
-
tooltipContent: "Hang Up",
|
|
40474
|
-
onClick: onHangup
|
|
40475
|
-
})), wrapup === 'true' && React__default["default"].createElement("div", {
|
|
40476
|
-
className: "utilities_ops-app-frame_CallCapsule_style--actionIcon"
|
|
40477
|
-
}, React__default["default"].createElement(IconComponent, {
|
|
40478
|
-
name: "wrapup",
|
|
40479
|
-
customStyle: "icon",
|
|
40480
|
-
tooltipContent: "Wrap up",
|
|
40481
|
-
onClick: onWrapup
|
|
40482
|
-
})));
|
|
40483
|
-
};
|
|
40484
|
-
|
|
40485
|
-
var Actions = function Actions(_ref4) {
|
|
40486
|
-
var onDialPadIconClick = _ref4.onDialPadIconClick,
|
|
40487
|
-
onIframeOpenClick = _ref4.onIframeOpenClick,
|
|
40488
|
-
showFlex = _ref4.showFlex,
|
|
40489
|
-
isFlexLoaded = _ref4.isFlexLoaded,
|
|
40490
|
-
onReloadFlex = _ref4.onReloadFlex,
|
|
40491
|
-
voiceTaskAccepted = _ref4.voiceTaskAccepted,
|
|
40492
|
-
isFullScreen = _ref4.isFullScreen,
|
|
40493
|
-
toggleScreen = _ref4.toggleScreen;
|
|
40494
|
-
return React__default["default"].createElement("div", {
|
|
40495
|
-
className: "utilities_ops-app-frame_CallCapsule_style--centerPillCon"
|
|
40496
|
-
}, !voiceTaskAccepted && React__default["default"].createElement(IconComponent, {
|
|
40497
|
-
name: "dialpad",
|
|
40498
|
-
color: "#000",
|
|
40499
|
-
tooltipContent: "Dialpad",
|
|
40500
|
-
onClick: onDialPadIconClick
|
|
40501
|
-
}), isFlexLoaded && React__default["default"].createElement(IconComponent, {
|
|
40502
|
-
name: "reload",
|
|
40503
|
-
customStyle: voiceTaskAccepted ? 'disabledIcon' : 'icon',
|
|
40504
|
-
tooltipContent: voiceTaskAccepted ? 'Please reload when there is no active call' : 'Reload',
|
|
40505
|
-
onClick: function onClick() {
|
|
40506
|
-
return voiceTaskAccepted ? false : onReloadFlex();
|
|
40507
|
-
}
|
|
40508
|
-
}), !isFlexLoaded && React__default["default"].createElement(coreComponents.Tooltip, {
|
|
40509
|
-
content: showFlex ? 'Hide' : 'Show'
|
|
40510
|
-
}, React__default["default"].createElement(coreComponents.IconButton, {
|
|
40511
|
-
onClick: onIframeOpenClick
|
|
40512
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40513
|
-
name: showFlex ? 'close' : 'more_horiz',
|
|
40514
|
-
variant: "material",
|
|
40515
|
-
style: {
|
|
40516
|
-
color: '#3c4656',
|
|
40517
|
-
cursor: 'pointer',
|
|
40518
|
-
fontSize: '18px'
|
|
40519
|
-
}
|
|
40520
|
-
}))), !isFlexLoaded && showFlex && React__default["default"].createElement(coreComponents.Tooltip, {
|
|
40521
|
-
content: isFullScreen ? 'Exit Full Screen' : 'Full Screen'
|
|
40522
|
-
}, React__default["default"].createElement(coreComponents.IconButton, {
|
|
40523
|
-
onClick: toggleScreen
|
|
40524
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40525
|
-
name: isFullScreen ? 'fullscreen_exit' : 'fullscreen',
|
|
40526
|
-
variant: "material",
|
|
40527
|
-
style: {
|
|
40528
|
-
color: '#3c4656',
|
|
40529
|
-
cursor: 'pointer',
|
|
40530
|
-
fontSize: '18px'
|
|
40531
|
-
}
|
|
40532
|
-
}))));
|
|
40533
|
-
};
|
|
40534
|
-
|
|
40535
|
-
var Activity = function Activity(_ref5) {
|
|
40536
|
-
var onDropDownClick = _ref5.onDropDownClick,
|
|
40537
|
-
items = _ref5.items,
|
|
40538
|
-
status = _ref5.status,
|
|
40539
|
-
voiceTask = _ref5.voiceTask;
|
|
40540
|
-
var isDropDownOpen = !isEmpty$2(voiceTask) && (voiceTask === null || voiceTask === void 0 ? void 0 : voiceTask.wrapup) !== 'true';
|
|
40541
|
-
return React__default["default"].createElement("div", {
|
|
40542
|
-
className: "utilities_ops-app-frame_CallCapsule_style--rightPillCon"
|
|
40543
|
-
}, React__default["default"].createElement("div", {
|
|
40544
|
-
className: "utilities_ops-app-frame_CallCapsule_style--statusIndicator"
|
|
40545
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40546
|
-
name: "CircleFill",
|
|
40547
|
-
style: {
|
|
40548
|
-
color: colorMapper[status],
|
|
40549
|
-
fontSize: '10px'
|
|
40550
|
-
}
|
|
40551
|
-
})), React__default["default"].createElement(coreComponents.Typography, {
|
|
40552
|
-
variant: "h1",
|
|
40553
|
-
className: "utilities_ops-app-frame_CallCapsule_style--heading1"
|
|
40554
|
-
}, React__default["default"].createElement("span", null, status)), !isDropDownOpen ? React__default["default"].createElement(coreComponents.Tooltip, {
|
|
40555
|
-
content: "Status"
|
|
40556
|
-
}, React__default["default"].createElement(coreComponents.IconDropdownMenu, {
|
|
40557
|
-
items: items,
|
|
40558
|
-
icon: "CaretSolidDown",
|
|
40559
|
-
onItemClick: function onItemClick(event, item) {
|
|
40560
|
-
onDropDownClick(item);
|
|
40561
|
-
},
|
|
40562
|
-
position: "ChevronDown"
|
|
40563
|
-
})) : React__default["default"].createElement(coreComponents.Tooltip, {
|
|
40564
|
-
content: errorMessage
|
|
40565
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40566
|
-
name: "CaretSolidDown",
|
|
40567
|
-
style: {
|
|
40568
|
-
cursor: 'not-allowed',
|
|
40569
|
-
opacity: '0.3',
|
|
40570
|
-
fontSize: '14px',
|
|
40571
|
-
color: 'rgb(29, 90, 185)'
|
|
40572
|
-
}
|
|
40573
|
-
})));
|
|
40574
|
-
};
|
|
40575
|
-
|
|
40576
|
-
var NotLoggedIn = function NotLoggedIn(_ref6) {
|
|
40577
|
-
var onIframeOpenClick = _ref6.onIframeOpenClick,
|
|
40578
|
-
showFlex = _ref6.showFlex,
|
|
40579
|
-
isReload = _ref6.isReload;
|
|
40580
|
-
return React__default["default"].createElement("div", {
|
|
40581
|
-
className: "utilities_ops-app-frame_CallCapsule_style--centerPillCon"
|
|
40582
|
-
}, !isReload && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(coreComponents.Typography, {
|
|
40583
|
-
variant: "h3",
|
|
40584
|
-
className: "utilities_ops-app-frame_CallCapsule_style--heading1"
|
|
40585
|
-
}, notLoggedInMsg), React__default["default"].createElement(coreComponents.Tooltip, {
|
|
40586
|
-
content: showFlex ? 'Hide' : 'Show'
|
|
40587
|
-
}, React__default["default"].createElement(coreComponents.IconButton, {
|
|
40588
|
-
onClick: onIframeOpenClick
|
|
40589
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40590
|
-
name: showFlex ? 'close' : 'launch',
|
|
40591
|
-
variant: "material",
|
|
40592
|
-
style: {
|
|
40593
|
-
color: '#3c4656',
|
|
40594
|
-
cursor: 'pointer',
|
|
40595
|
-
fontSize: '18px'
|
|
40596
|
-
}
|
|
40597
|
-
})))), isReload && React__default["default"].createElement(coreComponents.Typography, {
|
|
40598
|
-
variant: "h3",
|
|
40599
|
-
className: "utilities_ops-app-frame_CallCapsule_style--heading1"
|
|
40600
|
-
}, loadingMsg));
|
|
40601
|
-
};
|
|
40602
|
-
|
|
40603
|
-
var ReloadFlex = function ReloadFlex(_ref7) {
|
|
40604
|
-
var onReloadFlex = _ref7.onReloadFlex,
|
|
40605
|
-
showReload = _ref7.showReload;
|
|
40606
|
-
return React__default["default"].createElement("div", {
|
|
40607
|
-
className: "utilities_ops-app-frame_CallCapsule_style--centerPillCon"
|
|
40608
|
-
}, React__default["default"].createElement(coreComponents.Typography, {
|
|
40609
|
-
variant: "h3",
|
|
40610
|
-
className: "utilities_ops-app-frame_CallCapsule_style--heading1"
|
|
40611
|
-
}, "Please reload the flex"), React__default["default"].createElement(IconComponent, {
|
|
40612
|
-
name: "reload",
|
|
40613
|
-
customStyle: "icon",
|
|
40614
|
-
tooltipContent: "Reload",
|
|
40615
|
-
onClick: onReloadFlex
|
|
40616
|
-
}), React__default["default"].createElement(ReloadDialog, {
|
|
40617
|
-
showReload: showReload,
|
|
40618
|
-
onReloadFlex: onReloadFlex
|
|
40619
|
-
}));
|
|
40620
|
-
};
|
|
40621
|
-
|
|
40622
|
-
var Divider = function Divider() {
|
|
40623
|
-
return React__default["default"].createElement("hr", null);
|
|
40624
|
-
};
|
|
40625
|
-
|
|
40626
|
-
var CallerPill = function CallerPill(_ref8) {
|
|
40627
|
-
var profileData = _ref8.profileData,
|
|
40628
|
-
acceptTask = _ref8.acceptTask,
|
|
40629
|
-
rejectTask = _ref8.rejectTask,
|
|
40630
|
-
onDropDownClick = _ref8.onDropDownClick,
|
|
40631
|
-
onDialPadIconClick = _ref8.onDialPadIconClick,
|
|
40632
|
-
onIframeOpenClick = _ref8.onIframeOpenClick,
|
|
40633
|
-
_ref8$activities = _ref8.activities,
|
|
40634
|
-
activities = _ref8$activities === void 0 ? [] : _ref8$activities,
|
|
40635
|
-
showFlex = _ref8.showFlex,
|
|
40636
|
-
status = _ref8.status,
|
|
40637
|
-
voiceTask = _ref8.voiceTask,
|
|
40638
|
-
isFlexLoaded = _ref8.isFlexLoaded,
|
|
40639
|
-
onReloadFlex = _ref8.onReloadFlex,
|
|
40640
|
-
showReload = _ref8.showReload,
|
|
40641
|
-
hangupTask = _ref8.hangupTask,
|
|
40642
|
-
wrapupTask = _ref8.wrapupTask,
|
|
40643
|
-
isFullScreen = _ref8.isFullScreen,
|
|
40644
|
-
toggleScreen = _ref8.toggleScreen,
|
|
40645
|
-
isReload = _ref8.isReload,
|
|
40646
|
-
showSpinner = _ref8.showSpinner,
|
|
40647
|
-
warning = _ref8.warning,
|
|
40648
|
-
setWarning = _ref8.setWarning,
|
|
40649
|
-
setShowFlex = _ref8.setShowFlex;
|
|
40650
|
-
return React__default["default"].createElement("div", {
|
|
40651
|
-
className: _getClassName("CallerPillCon ".concat(showSpinner ? ' opacity' : ''), _styleModuleImportMap$2, {
|
|
40652
|
-
"handleMissingStyleName": "warn"
|
|
40653
|
-
})
|
|
40654
|
-
}, !isEmpty$2(profileData) && !showReload && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(CallIndicator, {
|
|
40655
|
-
voiceTask: voiceTask
|
|
40656
|
-
}), React__default["default"].createElement(CallerInfo, {
|
|
40657
|
-
voiceTask: voiceTask,
|
|
40658
|
-
isVoiceEmpty: isEmpty$2(voiceTask)
|
|
40659
|
-
}), React__default["default"].createElement(Divider, null), !isEmpty$2(voiceTask) && React__default["default"].createElement(Voice, {
|
|
40660
|
-
onAccept: acceptTask,
|
|
40661
|
-
onReject: rejectTask,
|
|
40662
|
-
onHangup: hangupTask,
|
|
40663
|
-
voiceTask: voiceTask,
|
|
40664
|
-
onWrapup: wrapupTask,
|
|
40665
|
-
role: profileData === null || profileData === void 0 ? void 0 : profileData.role
|
|
40666
|
-
}), React__default["default"].createElement(Actions, {
|
|
40667
|
-
onDialPadIconClick: onDialPadIconClick,
|
|
40668
|
-
onIframeOpenClick: onIframeOpenClick,
|
|
40669
|
-
showFlex: showFlex,
|
|
40670
|
-
isFlexLoaded: isFlexLoaded,
|
|
40671
|
-
onReloadFlex: onReloadFlex,
|
|
40672
|
-
voiceTaskAccepted: (voiceTask === null || voiceTask === void 0 ? void 0 : voiceTask.accept) === 'true',
|
|
40673
|
-
isFullScreen: isFullScreen,
|
|
40674
|
-
toggleScreen: toggleScreen
|
|
40675
|
-
}), React__default["default"].createElement(Divider, null), React__default["default"].createElement(Activity, {
|
|
40676
|
-
onDropDownClick: onDropDownClick,
|
|
40677
|
-
items: activities,
|
|
40678
|
-
status: status,
|
|
40679
|
-
voiceTask: voiceTask
|
|
40680
|
-
})), isEmpty$2(profileData) && !showReload && React__default["default"].createElement(NotLoggedIn, {
|
|
40681
|
-
isReload: isReload,
|
|
40682
|
-
onIframeOpenClick: onIframeOpenClick,
|
|
40683
|
-
showFlex: showFlex
|
|
40684
|
-
}), showReload && React__default["default"].createElement(ReloadFlex, {
|
|
40685
|
-
showReload: showReload,
|
|
40686
|
-
onReloadFlex: onReloadFlex
|
|
40687
|
-
}), showSpinner && React__default["default"].createElement("span", {
|
|
40688
|
-
className: "utilities_ops-app-frame_CallCapsule_style--capsuleSpinner"
|
|
40689
|
-
}, React__default["default"].createElement(coreComponents.Spinner, {
|
|
40690
|
-
size: "xs"
|
|
40691
|
-
})), warning !== 'false' && React__default["default"].createElement(Warning, {
|
|
40692
|
-
setWarning: setWarning,
|
|
40693
|
-
setShowFlex: setShowFlex,
|
|
40694
|
-
isVoiceEmpty: isEmpty$2(voiceTask),
|
|
40695
|
-
isFlexLoaded: isFlexLoaded,
|
|
40696
|
-
warning: warning
|
|
40697
|
-
}));
|
|
40698
|
-
};
|
|
40699
|
-
|
|
40700
|
-
var _styleModuleImportMap$1 = {
|
|
40701
|
-
"./style.css": {
|
|
40702
|
-
"flex-iframe": "utilities_ops-app-frame_CallCapsule_style--flex-iframe",
|
|
40703
|
-
"flex-bar": "utilities_ops-app-frame_CallCapsule_style--flex-bar",
|
|
40704
|
-
"iframeSection": "utilities_ops-app-frame_CallCapsule_style--iframeSection",
|
|
40705
|
-
"fullScreen": "utilities_ops-app-frame_CallCapsule_style--fullScreen",
|
|
40706
|
-
"CallerPillCon": "utilities_ops-app-frame_CallCapsule_style--CallerPillCon",
|
|
40707
|
-
"leftPillCon": "utilities_ops-app-frame_CallCapsule_style--leftPillCon",
|
|
40708
|
-
"heading1": "utilities_ops-app-frame_CallCapsule_style--heading1",
|
|
40709
|
-
"iframePopUp": "utilities_ops-app-frame_CallCapsule_style--iframePopUp",
|
|
40710
|
-
"heading6": "utilities_ops-app-frame_CallCapsule_style--heading6",
|
|
40711
|
-
"heading7": "utilities_ops-app-frame_CallCapsule_style--heading7",
|
|
40712
|
-
"centerPillCon": "utilities_ops-app-frame_CallCapsule_style--centerPillCon",
|
|
40713
|
-
"rightPillCon": "utilities_ops-app-frame_CallCapsule_style--rightPillCon",
|
|
40714
|
-
"statusIndicator": "utilities_ops-app-frame_CallCapsule_style--statusIndicator",
|
|
40715
|
-
"dialpadCon": "utilities_ops-app-frame_CallCapsule_style--dialpadCon",
|
|
40716
|
-
"inputCon": "utilities_ops-app-frame_CallCapsule_style--inputCon",
|
|
40717
|
-
"btn": "utilities_ops-app-frame_CallCapsule_style--btn",
|
|
40718
|
-
"visible": "utilities_ops-app-frame_CallCapsule_style--visible",
|
|
40719
|
-
"hidden": "utilities_ops-app-frame_CallCapsule_style--hidden",
|
|
40720
|
-
"callActionCon": "utilities_ops-app-frame_CallCapsule_style--callActionCon",
|
|
40721
|
-
"marginLeft": "utilities_ops-app-frame_CallCapsule_style--marginLeft",
|
|
40722
|
-
"shake": "utilities_ops-app-frame_CallCapsule_style--shake",
|
|
40723
|
-
"actionIcon": "utilities_ops-app-frame_CallCapsule_style--actionIcon",
|
|
40724
|
-
"wrapText": "utilities_ops-app-frame_CallCapsule_style--wrapText",
|
|
40725
|
-
"container": "utilities_ops-app-frame_CallCapsule_style--container",
|
|
40726
|
-
"numberCircle": "utilities_ops-app-frame_CallCapsule_style--numberCircle",
|
|
40727
|
-
"unreadCircle": "utilities_ops-app-frame_CallCapsule_style--unreadCircle",
|
|
40728
|
-
"iconBtn": "utilities_ops-app-frame_CallCapsule_style--iconBtn",
|
|
40729
|
-
"icon": "utilities_ops-app-frame_CallCapsule_style--icon",
|
|
40730
|
-
"disabledIcon": "utilities_ops-app-frame_CallCapsule_style--disabledIcon",
|
|
40731
|
-
"dialog": "utilities_ops-app-frame_CallCapsule_style--dialog",
|
|
40732
|
-
"dialogCon": "utilities_ops-app-frame_CallCapsule_style--dialogCon",
|
|
40733
|
-
"dialogHeading": "utilities_ops-app-frame_CallCapsule_style--dialogHeading",
|
|
40734
|
-
"dialogInfo": "utilities_ops-app-frame_CallCapsule_style--dialogInfo",
|
|
40735
|
-
"dialogBtn": "utilities_ops-app-frame_CallCapsule_style--dialogBtn",
|
|
40736
|
-
"warningMsg": "utilities_ops-app-frame_CallCapsule_style--warningMsg",
|
|
40737
|
-
"capsuleSpinner": "utilities_ops-app-frame_CallCapsule_style--capsuleSpinner",
|
|
40738
|
-
"opacity": "utilities_ops-app-frame_CallCapsule_style--opacity",
|
|
40739
|
-
"closeFlexIcon": "utilities_ops-app-frame_CallCapsule_style--closeFlexIcon",
|
|
40740
|
-
"callIndicator": "utilities_ops-app-frame_CallCapsule_style--callIndicator"
|
|
40741
|
-
}
|
|
40742
|
-
};
|
|
40743
|
-
|
|
40744
|
-
var Dialer = function Dialer(_ref) {
|
|
40745
|
-
var opened = _ref.opened,
|
|
40746
|
-
onOutBoundCall = _ref.onOutBoundCall;
|
|
40747
|
-
|
|
40748
|
-
var _React$useState = React__default["default"].useState(''),
|
|
40749
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
40750
|
-
number = _React$useState2[0],
|
|
40751
|
-
setNumber = _React$useState2[1];
|
|
40752
|
-
|
|
40753
|
-
var buttons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'];
|
|
40754
|
-
var inputRef = React.useRef();
|
|
40755
|
-
|
|
40756
|
-
var backspace = function backspace() {
|
|
40757
|
-
var input = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
|
|
40758
|
-
var selectionStart = input.selectionStart;
|
|
40759
|
-
var selectionEnd = input.selectionEnd;
|
|
40760
|
-
var len = input.value.length;
|
|
40761
|
-
var textbefore = input.value.substring(0, selectionStart); // text in front of selected text
|
|
40762
|
-
|
|
40763
|
-
input.value.substring(selectionStart, selectionEnd); // selected text
|
|
40764
|
-
|
|
40765
|
-
var textafter = input.value.substring(selectionEnd, len); // text following selected text
|
|
40766
|
-
|
|
40767
|
-
if (selectionStart === selectionEnd) {
|
|
40768
|
-
// if no text is selected
|
|
40769
|
-
if (selectionStart > 0) {
|
|
40770
|
-
input.value = input.value.substring(0, selectionStart - 1) + input.value.substring(selectionEnd, len);
|
|
40771
|
-
input.focus();
|
|
40772
|
-
input.selectionStart = selectionStart - 1;
|
|
40773
|
-
input.selectionEnd = selectionStart - 1;
|
|
40774
|
-
} else {
|
|
40775
|
-
input.focus();
|
|
40776
|
-
input.selectionStart = 0;
|
|
40777
|
-
input.selectionEnd = 0;
|
|
40778
|
-
}
|
|
40779
|
-
} // if some text is selected
|
|
40780
|
-
else {
|
|
40781
|
-
input.value = textbefore + textafter;
|
|
40782
|
-
input.focus();
|
|
40783
|
-
input.selectionStart = selectionStart;
|
|
40784
|
-
input.selectionEnd = selectionStart;
|
|
40785
|
-
}
|
|
40786
|
-
};
|
|
40787
|
-
|
|
40788
|
-
var AddNumber = function AddNumber(char) {
|
|
40789
|
-
var input = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
|
|
40790
|
-
var index = input === null || input === void 0 ? void 0 : input.selectionStart;
|
|
40791
|
-
input.value = input.value.substr(0, index) + char + input.value.substr(index);
|
|
40792
|
-
input.focus();
|
|
40793
|
-
input.selectionStart = index + 1;
|
|
40794
|
-
input.selectionEnd = index + 1;
|
|
40795
|
-
};
|
|
40796
|
-
|
|
40797
|
-
var onKeyPress = function onKeyPress(e) {
|
|
40798
|
-
if (e.keyCode == 13) {
|
|
40799
|
-
onOutBoundCall(e.target.value);
|
|
40800
|
-
}
|
|
40801
|
-
};
|
|
40802
|
-
|
|
40803
|
-
return React__default["default"].createElement("div", {
|
|
40804
|
-
className: _getClassName("dialpadCon ".concat(opened ? 'visible' : 'hidden'), _styleModuleImportMap$1, {
|
|
40805
|
-
"handleMissingStyleName": "warn"
|
|
40806
|
-
})
|
|
40807
|
-
}, React__default["default"].createElement("div", {
|
|
40808
|
-
className: "utilities_ops-app-frame_CallCapsule_style--inputCon"
|
|
40809
|
-
}, React__default["default"].createElement("input", {
|
|
40810
|
-
ref: inputRef,
|
|
40811
|
-
placeholder: "",
|
|
40812
|
-
value: number,
|
|
40813
|
-
onKeyDown: function onKeyDown(e) {
|
|
40814
|
-
return onKeyPress(e);
|
|
40815
|
-
},
|
|
40816
|
-
onChange: function onChange(e) {
|
|
40817
|
-
return setNumber(e.target.value);
|
|
40818
|
-
}
|
|
40819
|
-
})), React__default["default"].createElement("section", null, buttons.map(function (char) {
|
|
40820
|
-
return React__default["default"].createElement("button", {
|
|
40821
|
-
className: "utilities_ops-app-frame_CallCapsule_style--btn",
|
|
40822
|
-
key: char,
|
|
40823
|
-
onClick: function onClick() {
|
|
40824
|
-
return AddNumber(char);
|
|
40825
|
-
}
|
|
40826
|
-
}, char);
|
|
40827
|
-
})), React__default["default"].createElement("div", {
|
|
40828
|
-
className: "utilities_ops-app-frame_CallCapsule_style--callActionCon"
|
|
40829
|
-
}, React__default["default"].createElement("div", {
|
|
40830
|
-
className: "utilities_ops-app-frame_CallCapsule_style--marginLeft"
|
|
40831
|
-
}, React__default["default"].createElement(coreComponents.IconButton, {
|
|
40832
|
-
onClick: function onClick() {
|
|
40833
|
-
backspace();
|
|
40834
|
-
}
|
|
40835
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40836
|
-
name: "Back",
|
|
40837
|
-
style: {
|
|
40838
|
-
color: 'red',
|
|
40839
|
-
fontSize: '18px',
|
|
40840
|
-
textAlign: 'center',
|
|
40841
|
-
cursor: 'pointer'
|
|
40842
|
-
}
|
|
40843
|
-
}))), React__default["default"].createElement("div", {
|
|
40844
|
-
className: "utilities_ops-app-frame_CallCapsule_style--marginLeft"
|
|
40845
|
-
}, React__default["default"].createElement(coreComponents.IconButton, {
|
|
40846
|
-
onClick: function onClick() {
|
|
40847
|
-
var _inputRef$current;
|
|
40848
|
-
|
|
40849
|
-
onOutBoundCall(inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value);
|
|
40850
|
-
}
|
|
40851
|
-
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
40852
|
-
name: "Phone",
|
|
40853
|
-
style: {
|
|
40854
|
-
color: 'green',
|
|
40855
|
-
fontSize: '18px',
|
|
40856
|
-
textAlign: 'center',
|
|
40857
|
-
cursor: 'pointer'
|
|
40858
|
-
}
|
|
40859
|
-
})))));
|
|
40860
|
-
};
|
|
40861
|
-
|
|
40862
|
-
var voiceReducer = function voiceReducer(state, action) {
|
|
40863
|
-
var type = action.type,
|
|
40864
|
-
payload = action.payload;
|
|
40865
|
-
|
|
40866
|
-
switch (type) {
|
|
40867
|
-
case 'task':
|
|
40868
|
-
return _objectSpread2({}, state, {}, payload);
|
|
40869
|
-
|
|
40870
|
-
case 'autoAnswerTask':
|
|
40871
|
-
return _objectSpread2({}, state, {
|
|
40872
|
-
accept: 'true'
|
|
40873
|
-
}, payload);
|
|
40874
|
-
|
|
40875
|
-
case 'accept':
|
|
40876
|
-
return _objectSpread2({}, state, {
|
|
40877
|
-
accept: 'true'
|
|
40878
|
-
}, payload);
|
|
40879
|
-
|
|
40880
|
-
case 'wrapup':
|
|
40881
|
-
return _objectSpread2({}, state, {
|
|
40882
|
-
wrapup: 'true'
|
|
40883
|
-
}, payload);
|
|
40884
|
-
|
|
40885
|
-
case 'conference':
|
|
40886
|
-
return _objectSpread2({}, state, {}, payload);
|
|
40887
|
-
|
|
40888
|
-
case 'complete':
|
|
40889
|
-
return {};
|
|
40890
|
-
|
|
40891
|
-
default:
|
|
40892
|
-
throw new Error();
|
|
40893
|
-
}
|
|
40894
|
-
};
|
|
40895
|
-
|
|
40896
|
-
var _styleModuleImportMap = {
|
|
40897
|
-
"./style.css": {
|
|
40898
|
-
"flex-iframe": "utilities_ops-app-frame_CallCapsule_style--flex-iframe",
|
|
40899
|
-
"flex-bar": "utilities_ops-app-frame_CallCapsule_style--flex-bar",
|
|
40900
|
-
"iframeSection": "utilities_ops-app-frame_CallCapsule_style--iframeSection",
|
|
40901
|
-
"fullScreen": "utilities_ops-app-frame_CallCapsule_style--fullScreen",
|
|
40902
|
-
"CallerPillCon": "utilities_ops-app-frame_CallCapsule_style--CallerPillCon",
|
|
40903
|
-
"leftPillCon": "utilities_ops-app-frame_CallCapsule_style--leftPillCon",
|
|
40904
|
-
"heading1": "utilities_ops-app-frame_CallCapsule_style--heading1",
|
|
40905
|
-
"iframePopUp": "utilities_ops-app-frame_CallCapsule_style--iframePopUp",
|
|
40906
|
-
"heading6": "utilities_ops-app-frame_CallCapsule_style--heading6",
|
|
40907
|
-
"heading7": "utilities_ops-app-frame_CallCapsule_style--heading7",
|
|
40908
|
-
"centerPillCon": "utilities_ops-app-frame_CallCapsule_style--centerPillCon",
|
|
40909
|
-
"rightPillCon": "utilities_ops-app-frame_CallCapsule_style--rightPillCon",
|
|
40910
|
-
"statusIndicator": "utilities_ops-app-frame_CallCapsule_style--statusIndicator",
|
|
40911
|
-
"dialpadCon": "utilities_ops-app-frame_CallCapsule_style--dialpadCon",
|
|
40912
|
-
"inputCon": "utilities_ops-app-frame_CallCapsule_style--inputCon",
|
|
40913
|
-
"btn": "utilities_ops-app-frame_CallCapsule_style--btn",
|
|
40914
|
-
"visible": "utilities_ops-app-frame_CallCapsule_style--visible",
|
|
40915
|
-
"hidden": "utilities_ops-app-frame_CallCapsule_style--hidden",
|
|
40916
|
-
"callActionCon": "utilities_ops-app-frame_CallCapsule_style--callActionCon",
|
|
40917
|
-
"marginLeft": "utilities_ops-app-frame_CallCapsule_style--marginLeft",
|
|
40918
|
-
"shake": "utilities_ops-app-frame_CallCapsule_style--shake",
|
|
40919
|
-
"actionIcon": "utilities_ops-app-frame_CallCapsule_style--actionIcon",
|
|
40920
|
-
"wrapText": "utilities_ops-app-frame_CallCapsule_style--wrapText",
|
|
40921
|
-
"container": "utilities_ops-app-frame_CallCapsule_style--container",
|
|
40922
|
-
"numberCircle": "utilities_ops-app-frame_CallCapsule_style--numberCircle",
|
|
40923
|
-
"unreadCircle": "utilities_ops-app-frame_CallCapsule_style--unreadCircle",
|
|
40924
|
-
"iconBtn": "utilities_ops-app-frame_CallCapsule_style--iconBtn",
|
|
40925
|
-
"icon": "utilities_ops-app-frame_CallCapsule_style--icon",
|
|
40926
|
-
"disabledIcon": "utilities_ops-app-frame_CallCapsule_style--disabledIcon",
|
|
40927
|
-
"dialog": "utilities_ops-app-frame_CallCapsule_style--dialog",
|
|
40928
|
-
"dialogCon": "utilities_ops-app-frame_CallCapsule_style--dialogCon",
|
|
40929
|
-
"dialogHeading": "utilities_ops-app-frame_CallCapsule_style--dialogHeading",
|
|
40930
|
-
"dialogInfo": "utilities_ops-app-frame_CallCapsule_style--dialogInfo",
|
|
40931
|
-
"dialogBtn": "utilities_ops-app-frame_CallCapsule_style--dialogBtn",
|
|
40932
|
-
"warningMsg": "utilities_ops-app-frame_CallCapsule_style--warningMsg",
|
|
40933
|
-
"capsuleSpinner": "utilities_ops-app-frame_CallCapsule_style--capsuleSpinner",
|
|
40934
|
-
"opacity": "utilities_ops-app-frame_CallCapsule_style--opacity",
|
|
40935
|
-
"closeFlexIcon": "utilities_ops-app-frame_CallCapsule_style--closeFlexIcon",
|
|
40936
|
-
"callIndicator": "utilities_ops-app-frame_CallCapsule_style--callIndicator"
|
|
40937
|
-
}
|
|
40938
|
-
};
|
|
40939
|
-
var isFlexAvailable = storage$1.flexLoaded;
|
|
40940
|
-
var CallCapsule = function CallCapsule() {
|
|
40941
|
-
var isVoiceTask = storage$1.twilioVoiceTask;
|
|
40942
|
-
var _isVoiceTask$accept = isVoiceTask.accept,
|
|
40943
|
-
accept = _isVoiceTask$accept === void 0 ? '' : _isVoiceTask$accept,
|
|
40944
|
-
_isVoiceTask$event = isVoiceTask.event,
|
|
40945
|
-
event = _isVoiceTask$event === void 0 ? '' : _isVoiceTask$event;
|
|
40946
|
-
|
|
40947
|
-
var _useState = React.useState(false),
|
|
40948
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
40949
|
-
showFlex = _useState2[0],
|
|
40950
|
-
setShowFlex = _useState2[1];
|
|
40951
|
-
|
|
40952
|
-
var _useState3 = React.useState(accept !== 'true' && event === 'reserved'),
|
|
40953
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
40954
|
-
shake = _useState4[0],
|
|
40955
|
-
setShake = _useState4[1];
|
|
40956
|
-
|
|
40957
|
-
var _useState5 = React.useState(storage$1.workerProfileData),
|
|
40958
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
40959
|
-
profileData = _useState6[0],
|
|
40960
|
-
setWorkerProfileData = _useState6[1];
|
|
40961
|
-
|
|
40962
|
-
var _useState7 = React.useState(storage$1.twilioStatus),
|
|
40963
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
40964
|
-
status = _useState8[0],
|
|
40965
|
-
setStatus = _useState8[1];
|
|
40966
|
-
|
|
40967
|
-
var _useState9 = React.useState(false),
|
|
40968
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
40969
|
-
dialerOpen = _useState10[0],
|
|
40970
|
-
setDialerOpen = _useState10[1];
|
|
40971
|
-
|
|
40972
|
-
var _useReducer = React.useReducer(voiceReducer, isVoiceTask),
|
|
40973
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
40974
|
-
voiceTask = _useReducer2[0],
|
|
40975
|
-
dispatchVoice = _useReducer2[1];
|
|
40976
|
-
|
|
40977
|
-
var _useState11 = React.useState(isFlexAvailable === 'true'),
|
|
40978
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
40979
|
-
isFlexLoaded = _useState12[0],
|
|
40980
|
-
setFlexLoaded = _useState12[1];
|
|
40981
|
-
|
|
40982
|
-
var _useState13 = React.useState(false),
|
|
40983
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
40984
|
-
showReload = _useState14[0],
|
|
40985
|
-
setShowReload = _useState14[1];
|
|
40986
|
-
|
|
40987
|
-
var _useState15 = React.useState(false),
|
|
40988
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
40989
|
-
isFullScreen = _useState16[0],
|
|
40990
|
-
setFullScreen = _useState16[1];
|
|
40991
|
-
|
|
40992
|
-
var _useState17 = React.useState(false),
|
|
40993
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
40994
|
-
isReload = _useState18[0],
|
|
40995
|
-
setReload = _useState18[1];
|
|
40996
|
-
|
|
40997
|
-
var _useState19 = React.useState(false),
|
|
40998
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
40999
|
-
showSpinner = _useState20[0],
|
|
41000
|
-
setShowSpinner = _useState20[1];
|
|
41001
|
-
|
|
41002
|
-
var _useState21 = React.useState(storage$1.twilioWarning),
|
|
41003
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
41004
|
-
warning = _useState22[0],
|
|
41005
|
-
setWarning = _useState22[1]; // Used to send messages across all the opened tabs.
|
|
41006
|
-
|
|
41007
|
-
|
|
41008
|
-
var broadcast = React.useMemo(function () {
|
|
41009
|
-
return new BroadcastChannel('twilioChannel');
|
|
41010
|
-
}, []);
|
|
41011
|
-
|
|
41012
|
-
var onReservationCreated = function onReservationCreated(task) {
|
|
41013
|
-
var taskType = task.taskType;
|
|
41014
|
-
|
|
41015
|
-
if (includes$1(taskType, ['voice', 'custom1', 'callback'])) {
|
|
41016
|
-
setShake(true);
|
|
41017
|
-
dispatchVoice({
|
|
41018
|
-
type: 'task',
|
|
41019
|
-
payload: task
|
|
41020
|
-
});
|
|
41021
|
-
}
|
|
41022
|
-
|
|
41023
|
-
setShowSpinner(false);
|
|
41024
|
-
};
|
|
41025
|
-
|
|
41026
|
-
var onAutoAnswer = function onAutoAnswer(task) {
|
|
41027
|
-
setShowSpinner(true);
|
|
41028
|
-
dispatchVoice({
|
|
41029
|
-
type: 'autoAnswerTask',
|
|
41030
|
-
payload: task
|
|
41031
|
-
});
|
|
41032
|
-
};
|
|
41033
|
-
|
|
41034
|
-
var acceptedTask = function acceptedTask(task) {
|
|
41035
|
-
setShake(false);
|
|
41036
|
-
dispatchVoice({
|
|
41037
|
-
type: 'accept',
|
|
41038
|
-
payload: task
|
|
41039
|
-
});
|
|
41040
|
-
};
|
|
41041
|
-
|
|
41042
|
-
var reservationChanged = function reservationChanged() {
|
|
41043
|
-
setShowSpinner(false);
|
|
41044
|
-
};
|
|
41045
|
-
|
|
41046
|
-
var taskCompleted = function taskCompleted() {
|
|
41047
|
-
dispatchVoice({
|
|
41048
|
-
type: 'complete'
|
|
41049
|
-
});
|
|
41050
|
-
setShake(false);
|
|
41051
|
-
setWarning('false');
|
|
41052
|
-
setShowSpinner(false);
|
|
41053
|
-
dispatchTwilioStatus(storage$1.twilioStatus);
|
|
41054
|
-
};
|
|
41055
|
-
|
|
41056
|
-
var rejectedTask = function rejectedTask() {
|
|
41057
|
-
dispatchVoice({
|
|
41058
|
-
type: 'complete'
|
|
41059
|
-
});
|
|
41060
|
-
};
|
|
41061
|
-
|
|
41062
|
-
var conferenceUpdated = function conferenceUpdated(isConference) {
|
|
41063
|
-
dispatchVoice({
|
|
41064
|
-
type: 'conference',
|
|
41065
|
-
payload: {
|
|
41066
|
-
conference: isConference
|
|
41067
|
-
}
|
|
41068
|
-
});
|
|
41069
|
-
};
|
|
41070
|
-
|
|
41071
|
-
var acceptTaskInFlex = function acceptTaskInFlex() {
|
|
41072
|
-
var twilioTask = storage$1.twilioVoiceTask;
|
|
41073
|
-
|
|
41074
|
-
if (!isFlexLoaded && (twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid)) {
|
|
41075
|
-
window.frames['twilioFlex'].postMessage({
|
|
41076
|
-
event: 'acceptTask',
|
|
41077
|
-
sid: twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid
|
|
41078
|
-
}, getFlexDomain());
|
|
41079
|
-
}
|
|
41080
|
-
};
|
|
41081
|
-
|
|
41082
|
-
var rejectTaskInFlex = function rejectTaskInFlex() {
|
|
41083
|
-
setShake(false);
|
|
41084
|
-
var twilioTask = storage$1.twilioVoiceTask;
|
|
41085
|
-
|
|
41086
|
-
if ((twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid) && !isFlexLoaded) {
|
|
41087
|
-
window.frames['twilioFlex'].postMessage({
|
|
41088
|
-
event: 'rejectTask',
|
|
41089
|
-
sid: twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid
|
|
41090
|
-
}, getFlexDomain());
|
|
41091
|
-
rejectedTask();
|
|
41092
|
-
broadcast.postMessage({
|
|
41093
|
-
event: 'rejectedTask'
|
|
41094
|
-
});
|
|
41095
|
-
}
|
|
41096
|
-
};
|
|
41097
|
-
|
|
41098
|
-
var hangupCallInFlex = function hangupCallInFlex() {
|
|
41099
|
-
var twilioTask = storage$1.twilioVoiceTask;
|
|
41100
|
-
|
|
41101
|
-
if (!isFlexLoaded && (twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid)) {
|
|
41102
|
-
window.frames['twilioFlex'].postMessage({
|
|
41103
|
-
event: 'hangupCall',
|
|
41104
|
-
sid: twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid
|
|
41105
|
-
}, getFlexDomain());
|
|
41106
|
-
}
|
|
41107
|
-
};
|
|
41108
|
-
|
|
41109
|
-
var wrapupTaskInFlex = function wrapupTaskInFlex() {
|
|
41110
|
-
var twilioTask = storage$1.twilioVoiceTask;
|
|
41111
|
-
|
|
41112
|
-
if (!isFlexLoaded && (twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid)) {
|
|
41113
|
-
window.frames['twilioFlex'].postMessage({
|
|
41114
|
-
event: 'wrapupTask',
|
|
41115
|
-
sid: twilioTask === null || twilioTask === void 0 ? void 0 : twilioTask.reservationSid
|
|
41116
|
-
}, getFlexDomain());
|
|
41117
|
-
}
|
|
41118
|
-
};
|
|
41119
|
-
|
|
41120
|
-
React.useEffect(function () {
|
|
41121
|
-
if (!isFlexLoaded) {
|
|
41122
|
-
storage$1.setLocalItem('twilio', voiceTask, 'voiceTask');
|
|
41123
|
-
}
|
|
41124
|
-
}, [voiceTask, isFlexLoaded]);
|
|
41125
|
-
React.useEffect(function () {
|
|
41126
|
-
if (!isFlexLoaded) {
|
|
41127
|
-
setFavicon('/copart_red_favicon.ico');
|
|
41128
|
-
} else {
|
|
41129
|
-
setFavicon('/copartFavicon.ico');
|
|
41130
|
-
}
|
|
41131
|
-
}, [isFlexLoaded]);
|
|
41132
|
-
React.useEffect(function () {
|
|
41133
|
-
broadcast.postMessage({
|
|
41134
|
-
event: 'showWarning',
|
|
41135
|
-
warningMsg: warning
|
|
41136
|
-
});
|
|
41137
|
-
storage$1.setLocalItem('twilio', warning, 'warning');
|
|
41138
|
-
}, [warning]);
|
|
41139
|
-
React.useEffect(function () {
|
|
41140
|
-
var handleBeforeunload = function handleBeforeunload(event) {
|
|
41141
|
-
if (!isFlexLoaded) {
|
|
41142
|
-
// TO DO: Custom message is not working in chrome alert popup
|
|
41143
|
-
var confirmationMessage = 'Active call is in progress';
|
|
41144
|
-
(event || window.event).returnValue = confirmationMessage;
|
|
41145
|
-
return confirmationMessage;
|
|
41146
|
-
}
|
|
41147
|
-
};
|
|
41148
|
-
|
|
41149
|
-
var handleUnLoad = function handleUnLoad(event) {
|
|
41150
|
-
if (!isFlexLoaded) {
|
|
41151
|
-
localStorage.removeItem('twilio');
|
|
41152
|
-
broadcast.postMessage({
|
|
41153
|
-
event: 'flexTabClosed'
|
|
41154
|
-
});
|
|
41155
|
-
}
|
|
41156
|
-
};
|
|
41157
|
-
|
|
41158
|
-
window.addEventListener('beforeunload', handleBeforeunload);
|
|
41159
|
-
window.addEventListener('unload', handleUnLoad);
|
|
41160
|
-
return function clear() {
|
|
41161
|
-
window.removeEventListener('beforeunload', handleBeforeunload);
|
|
41162
|
-
window.removeEventListener('unload', handleUnLoad);
|
|
41163
|
-
};
|
|
41164
|
-
}, [isFlexLoaded]);
|
|
41165
|
-
React.useEffect(function () {
|
|
41166
|
-
broadcast.onmessage = function (messageEvent) {
|
|
41167
|
-
var ev = pathOr$1('', ['data', 'event'], messageEvent);
|
|
41168
|
-
|
|
41169
|
-
switch (ev) {
|
|
41170
|
-
case 'activity':
|
|
41171
|
-
setStatus(pathOr$1('', ['data', 'activity'], messageEvent));
|
|
41172
|
-
break;
|
|
41173
|
-
|
|
41174
|
-
case 'completeTask':
|
|
41175
|
-
taskCompleted();
|
|
41176
|
-
break;
|
|
41177
|
-
|
|
41178
|
-
case 'wrapupTask':
|
|
41179
|
-
dispatchVoice({
|
|
41180
|
-
type: 'wrapup',
|
|
41181
|
-
payload: pathOr$1({}, ['data', 'task'], messageEvent)
|
|
41182
|
-
});
|
|
41183
|
-
break;
|
|
41184
|
-
|
|
41185
|
-
case 'reservationChanged':
|
|
41186
|
-
reservationChanged();
|
|
41187
|
-
break;
|
|
41188
|
-
|
|
41189
|
-
case 'accepted':
|
|
41190
|
-
setShowSpinner(false);
|
|
41191
|
-
acceptedTask(pathOr$1({}, ['data', 'task'], messageEvent));
|
|
41192
|
-
break;
|
|
41193
|
-
|
|
41194
|
-
case 'acceptTask':
|
|
41195
|
-
acceptTaskInFlex();
|
|
41196
|
-
break;
|
|
41197
|
-
|
|
41198
|
-
case 'rejectTask':
|
|
41199
|
-
rejectTaskInFlex();
|
|
41200
|
-
break;
|
|
41201
|
-
|
|
41202
|
-
case 'rejectedTask':
|
|
41203
|
-
setShake(false);
|
|
41204
|
-
setShowSpinner(false);
|
|
41205
|
-
dispatchVoice({
|
|
41206
|
-
type: 'complete'
|
|
41207
|
-
});
|
|
41208
|
-
break;
|
|
41209
|
-
|
|
41210
|
-
case 'outboundCall':
|
|
41211
|
-
{
|
|
41212
|
-
setTask(pathOr$1({}, ['data', 'task'], messageEvent)); // outboundCall()
|
|
41213
|
-
}
|
|
41214
|
-
break;
|
|
41215
|
-
|
|
41216
|
-
case 'reservationCreated':
|
|
41217
|
-
onReservationCreated(pathOr$1({}, ['data', 'task'], messageEvent));
|
|
41218
|
-
break;
|
|
41219
|
-
|
|
41220
|
-
case 'autoAnswer':
|
|
41221
|
-
onAutoAnswer(pathOr$1({}, ['data', 'task'], messageEvent));
|
|
41222
|
-
break;
|
|
41223
|
-
|
|
41224
|
-
case 'autoWrapup':
|
|
41225
|
-
dispatchVoice({
|
|
41226
|
-
type: 'task',
|
|
41227
|
-
payload: pathOr$1({}, ['data', 'task'], messageEvent)
|
|
41228
|
-
});
|
|
41229
|
-
break;
|
|
41230
|
-
|
|
41231
|
-
case 'flexLoaded':
|
|
41232
|
-
setShowReload(false);
|
|
41233
|
-
setReload(true);
|
|
41234
|
-
setFlexLoaded(true);
|
|
41235
|
-
dispatchVoice({
|
|
41236
|
-
type: 'complete'
|
|
41237
|
-
});
|
|
41238
|
-
setWorkerProfileData({});
|
|
41239
|
-
setShake(false);
|
|
41240
|
-
setDialerOpen(false);
|
|
41241
|
-
break;
|
|
41242
|
-
|
|
41243
|
-
case 'flexTabClosed':
|
|
41244
|
-
{
|
|
41245
|
-
setShowReload(true);
|
|
41246
|
-
setReload(false);
|
|
41247
|
-
setShake(false);
|
|
41248
|
-
dispatchVoice({
|
|
41249
|
-
type: 'complete'
|
|
41250
|
-
});
|
|
41251
|
-
storage$1.setLocalItem('twilio', 'false', 'flexLoaded');
|
|
41252
|
-
}
|
|
41253
|
-
break;
|
|
41254
|
-
|
|
41255
|
-
case 'workerProfile':
|
|
41256
|
-
setWorkerProfileData(pathOr$1({}, ['data', 'workerProfileData'], messageEvent));
|
|
41257
|
-
setReload(false);
|
|
41258
|
-
break;
|
|
41259
|
-
|
|
41260
|
-
case 'showWarning':
|
|
41261
|
-
setWarning(pathOr$1('false', ['data', 'warningMsg'], messageEvent));
|
|
41262
|
-
break;
|
|
41263
|
-
|
|
41264
|
-
case 'conference':
|
|
41265
|
-
conferenceUpdated(pathOr$1('false', ['data', 'isConference'], messageEvent));
|
|
41266
|
-
break;
|
|
41267
|
-
|
|
41268
|
-
case 'hangupCall':
|
|
41269
|
-
hangupCallInFlex();
|
|
41270
|
-
break;
|
|
41271
|
-
|
|
41272
|
-
case 'wrapupCall':
|
|
41273
|
-
wrapupTaskInFlex();
|
|
41274
|
-
break;
|
|
41275
|
-
}
|
|
41276
|
-
};
|
|
41277
|
-
}, [isFlexLoaded]);
|
|
41278
|
-
React.useEffect(function () {
|
|
41279
|
-
if (isFlexAvailable !== 'true') {
|
|
41280
|
-
broadcast.postMessage({
|
|
41281
|
-
event: 'flexLoaded'
|
|
41282
|
-
});
|
|
41283
|
-
storage$1.setLocalItem('twilio', 'true', 'flexLoaded');
|
|
41284
|
-
}
|
|
41285
|
-
|
|
41286
|
-
var receiveMessage = function receiveMessage(ev) {
|
|
41287
|
-
if (ev.origin === getFlexDomain()) {
|
|
41288
|
-
var _ev$data = ev.data,
|
|
41289
|
-
_event = _ev$data.event,
|
|
41290
|
-
_ev$data$task = _ev$data.task,
|
|
41291
|
-
task = _ev$data$task === void 0 ? {} : _ev$data$task,
|
|
41292
|
-
workerProfileData = _ev$data.workerProfileData,
|
|
41293
|
-
_status = _ev$data.status;
|
|
41294
|
-
_ev$data.changedActivity;
|
|
41295
|
-
_ev$data.reservation;
|
|
41296
|
-
var isConference = _ev$data.isConference;
|
|
41297
|
-
var _task$taskSid = task.taskSid,
|
|
41298
|
-
taskSid = _task$taskSid === void 0 ? '' : _task$taskSid;
|
|
41299
|
-
|
|
41300
|
-
switch (_event) {
|
|
41301
|
-
case 'autoAnswer':
|
|
41302
|
-
{
|
|
41303
|
-
dispatchTwilioStatus(RINGING);
|
|
41304
|
-
onAutoAnswer(task);
|
|
41305
|
-
broadcast.postMessage({
|
|
41306
|
-
event: 'autoAnswer',
|
|
41307
|
-
task: task
|
|
41308
|
-
});
|
|
41309
|
-
console.log('MIPHONE:RINGING:AUTOANSWER', taskSid);
|
|
41310
|
-
}
|
|
41311
|
-
break;
|
|
41312
|
-
|
|
41313
|
-
case 'reservationCreated':
|
|
41314
|
-
{
|
|
41315
|
-
dispatchTwilioStatus(RINGING);
|
|
41316
|
-
onReservationCreated(task);
|
|
41317
|
-
broadcast.postMessage({
|
|
41318
|
-
event: 'reservationCreated',
|
|
41319
|
-
task: task
|
|
41320
|
-
});
|
|
41321
|
-
console.log('MIPHONE:RINGING', taskSid);
|
|
41322
|
-
}
|
|
41323
|
-
break;
|
|
41324
|
-
|
|
41325
|
-
case 'reservationAccepted':
|
|
41326
|
-
{
|
|
41327
|
-
acceptedTask(task);
|
|
41328
|
-
setShowSpinner(false);
|
|
41329
|
-
broadcast.postMessage({
|
|
41330
|
-
event: 'accepted',
|
|
41331
|
-
task: task
|
|
41332
|
-
});
|
|
41333
|
-
dispatchTwilioStatus(IN_CALL);
|
|
41334
|
-
console.log('MIPHONE:ACCEPTED', taskSid);
|
|
41335
|
-
}
|
|
41336
|
-
break;
|
|
41337
|
-
|
|
41338
|
-
case 'reservationChanged':
|
|
41339
|
-
{
|
|
41340
|
-
reservationChanged();
|
|
41341
|
-
broadcast.postMessage({
|
|
41342
|
-
event: 'reservationChanged'
|
|
41343
|
-
});
|
|
41344
|
-
dispatchTwilioStatus(_status);
|
|
41345
|
-
console.log('MIPHONE:RESERVATION CHANGED', taskSid);
|
|
41346
|
-
}
|
|
41347
|
-
break;
|
|
41348
|
-
|
|
41349
|
-
case 'workerProfile':
|
|
41350
|
-
{
|
|
41351
|
-
setWorkerProfileData(workerProfileData);
|
|
41352
|
-
setReload(false);
|
|
41353
|
-
|
|
41354
|
-
var _status2 = pathOr$1('Offline', ['activity', 'name'], workerProfileData);
|
|
41355
|
-
|
|
41356
|
-
storage$1.setLocalItem('twilio', workerProfileData, 'workerProfileData');
|
|
41357
|
-
storage$1.setLocalItem('twilio', _status2, 'status');
|
|
41358
|
-
dispatchTwilioStatus(_status2);
|
|
41359
|
-
broadcast.postMessage({
|
|
41360
|
-
event: 'activity',
|
|
41361
|
-
activity: _status2
|
|
41362
|
-
});
|
|
41363
|
-
broadcast.postMessage({
|
|
41364
|
-
event: 'workerProfile',
|
|
41365
|
-
workerProfileData: workerProfileData
|
|
41366
|
-
});
|
|
41367
|
-
broadcast.postMessage({
|
|
41368
|
-
event: 'showWarning',
|
|
41369
|
-
warningMsg: 'false'
|
|
41370
|
-
});
|
|
41371
|
-
setStatus(_status2);
|
|
41372
|
-
}
|
|
41373
|
-
break;
|
|
41374
|
-
|
|
41375
|
-
case 'completeTask':
|
|
41376
|
-
{
|
|
41377
|
-
taskCompleted();
|
|
41378
|
-
broadcast.postMessage({
|
|
41379
|
-
event: 'completeTask'
|
|
41380
|
-
});
|
|
41381
|
-
dispatchTwilioStatus(_status);
|
|
41382
|
-
console.log('MIPHONE:COMPLETED', taskSid);
|
|
41383
|
-
dispatchVoice({
|
|
41384
|
-
type: 'complete'
|
|
41385
|
-
});
|
|
41386
|
-
}
|
|
41387
|
-
break;
|
|
41388
|
-
|
|
41389
|
-
case 'wrapupTask':
|
|
41390
|
-
{
|
|
41391
|
-
dispatchTwilioStatus(WRAPUP);
|
|
41392
|
-
dispatchVoice({
|
|
41393
|
-
type: 'wrapup',
|
|
41394
|
-
payload: task
|
|
41395
|
-
});
|
|
41396
|
-
broadcast.postMessage({
|
|
41397
|
-
event: 'wrapupTask',
|
|
41398
|
-
task: task
|
|
41399
|
-
});
|
|
41400
|
-
console.log('MIPHONE:WRAPUP', taskSid);
|
|
41401
|
-
}
|
|
41402
|
-
break;
|
|
41403
|
-
|
|
41404
|
-
case 'autoWrapup':
|
|
41405
|
-
{
|
|
41406
|
-
dispatchTwilioStatus(WRAPUP);
|
|
41407
|
-
dispatchVoice({
|
|
41408
|
-
type: 'task',
|
|
41409
|
-
payload: task
|
|
41410
|
-
});
|
|
41411
|
-
broadcast.postMessage({
|
|
41412
|
-
event: 'autoWrapup',
|
|
41413
|
-
task: task
|
|
41414
|
-
});
|
|
41415
|
-
console.log('MIPHONE:AUTO WRAPUP', taskSid);
|
|
41416
|
-
}
|
|
41417
|
-
break;
|
|
41418
|
-
|
|
41419
|
-
case 'activity':
|
|
41420
|
-
{
|
|
41421
|
-
setStatus(_status);
|
|
41422
|
-
dispatchTwilioStatus(_status);
|
|
41423
|
-
broadcast.postMessage({
|
|
41424
|
-
event: 'activity',
|
|
41425
|
-
activity: _status
|
|
41426
|
-
});
|
|
41427
|
-
storage$1.setLocalItem('twilio', _status, 'status');
|
|
41428
|
-
}
|
|
41429
|
-
break;
|
|
41430
|
-
|
|
41431
|
-
case 'conference':
|
|
41432
|
-
{
|
|
41433
|
-
console.log('conference--', isConference);
|
|
41434
|
-
conferenceUpdated(isConference);
|
|
41435
|
-
broadcast.postMessage({
|
|
41436
|
-
event: 'conference',
|
|
41437
|
-
isConference: isConference
|
|
41438
|
-
});
|
|
41439
|
-
}
|
|
41440
|
-
break;
|
|
41441
|
-
}
|
|
41442
|
-
}
|
|
41443
|
-
};
|
|
41444
|
-
|
|
41445
|
-
window.addEventListener('message', receiveMessage, false);
|
|
41446
|
-
return function clear() {
|
|
41447
|
-
window.removeEventListener('message', receiveMessage, false);
|
|
41448
|
-
broadcast.close();
|
|
41449
|
-
};
|
|
41450
|
-
}, []);
|
|
41451
|
-
|
|
41452
|
-
var acceptTask = function acceptTask() {
|
|
41453
|
-
setShake(false);
|
|
41454
|
-
setShowSpinner(true);
|
|
41455
|
-
|
|
41456
|
-
if (!isFlexLoaded) {
|
|
41457
|
-
acceptTaskInFlex();
|
|
41458
|
-
} else {
|
|
41459
|
-
broadcast.postMessage({
|
|
41460
|
-
event: 'acceptTask'
|
|
41461
|
-
});
|
|
41462
|
-
}
|
|
41463
|
-
};
|
|
41464
|
-
|
|
41465
|
-
var rejectTask = function rejectTask() {
|
|
41466
|
-
setShake(false);
|
|
41467
|
-
setShowSpinner(false);
|
|
41468
|
-
|
|
41469
|
-
if (!isFlexLoaded) {
|
|
41470
|
-
rejectTaskInFlex();
|
|
41471
|
-
} else {
|
|
41472
|
-
broadcast.postMessage({
|
|
41473
|
-
event: 'rejectTask'
|
|
41474
|
-
});
|
|
41475
|
-
}
|
|
41476
|
-
};
|
|
41477
|
-
|
|
41478
|
-
var hangupTask = function hangupTask() {
|
|
41479
|
-
// setShowSpinner(true)
|
|
41480
|
-
if (!isFlexLoaded) {
|
|
41481
|
-
hangupCallInFlex();
|
|
41482
|
-
} else {
|
|
41483
|
-
broadcast.postMessage({
|
|
41484
|
-
event: 'hangupCall'
|
|
41485
|
-
});
|
|
41486
|
-
}
|
|
41487
|
-
};
|
|
41488
|
-
|
|
41489
|
-
var wrapupTask = function wrapupTask() {
|
|
41490
|
-
if (!isFlexLoaded) {
|
|
41491
|
-
wrapupTaskInFlex();
|
|
41492
|
-
} else {
|
|
41493
|
-
broadcast.postMessage({
|
|
41494
|
-
event: 'wrapupCall'
|
|
41495
|
-
});
|
|
41496
|
-
}
|
|
41497
|
-
};
|
|
41498
|
-
|
|
41499
|
-
var onDialPadIconClick = function onDialPadIconClick() {
|
|
41500
|
-
setDialerOpen(!dialerOpen);
|
|
41501
|
-
setShowFlex(false);
|
|
41502
|
-
};
|
|
41503
|
-
|
|
41504
|
-
var onIframeOpenClick = function onIframeOpenClick() {
|
|
41505
|
-
setShowFlex(!showFlex);
|
|
41506
|
-
setDialerOpen(false);
|
|
41507
|
-
};
|
|
41508
|
-
|
|
41509
|
-
var toggleScreen = function toggleScreen() {
|
|
41510
|
-
setFullScreen(!isFullScreen);
|
|
41511
|
-
};
|
|
41512
|
-
|
|
41513
|
-
var onReloadFlex = function onReloadFlex() {
|
|
41514
|
-
setFlexLoaded(false);
|
|
41515
|
-
setShowReload(false);
|
|
41516
|
-
setReload(true);
|
|
41517
|
-
setWorkerProfileData({});
|
|
41518
|
-
dispatchVoice({
|
|
41519
|
-
type: 'complete'
|
|
41520
|
-
});
|
|
41521
|
-
setShake(false);
|
|
41522
|
-
broadcast.postMessage({
|
|
41523
|
-
event: 'flexLoaded'
|
|
41524
|
-
});
|
|
41525
|
-
localStorage.removeItem('twilio');
|
|
41526
|
-
storage$1.setLocalItem('twilio', 'true', 'flexLoaded');
|
|
41527
|
-
setDialerOpen(false);
|
|
41528
|
-
};
|
|
41529
|
-
|
|
41530
|
-
var onDropDownClick = function onDropDownClick(item) {
|
|
41531
|
-
setShowSpinner(true);
|
|
41532
|
-
changeActivityService(profileData === null || profileData === void 0 ? void 0 : profileData.worker, item.sid).then(function (data) {
|
|
41533
|
-
setStatus(item.name);
|
|
41534
|
-
dispatchTwilioStatus(item.name);
|
|
41535
|
-
setShowSpinner(false);
|
|
41536
|
-
broadcast.postMessage({
|
|
41537
|
-
event: 'activity',
|
|
41538
|
-
activity: item.name
|
|
41539
|
-
});
|
|
41540
|
-
storage$1.setLocalItem('twilio', item.name, 'status');
|
|
41541
|
-
}).catch(function (e) {
|
|
41542
|
-
setShowSpinner(false);
|
|
41543
|
-
setWarning(getWarningMsg(e === null || e === void 0 ? void 0 : e.response));
|
|
41544
|
-
console.log('Changing Activity Error', e);
|
|
41545
|
-
});
|
|
41546
|
-
};
|
|
41547
|
-
|
|
41548
|
-
var onOutBoundCall = function onOutBoundCall(number) {
|
|
41549
|
-
setShowSpinner(true);
|
|
41550
|
-
outboundCallService(profileData === null || profileData === void 0 ? void 0 : profileData.worker, number).then(function (data) {
|
|
41551
|
-
setShowSpinner(false);
|
|
41552
|
-
setDialerOpen(false);
|
|
41553
|
-
console.log('Outbound call intiated');
|
|
41554
|
-
}).catch(function (e) {
|
|
41555
|
-
console.log('error', e);
|
|
41556
|
-
setWarning(getWarningMsg(e === null || e === void 0 ? void 0 : e.response));
|
|
41557
|
-
setShowSpinner(false);
|
|
41558
|
-
});
|
|
41559
|
-
};
|
|
41560
|
-
|
|
41561
|
-
return React__default["default"].createElement("div", {
|
|
41562
|
-
className: "utilities_ops-app-frame_CallCapsule_style--container"
|
|
41563
|
-
}, React__default["default"].createElement("div", {
|
|
41564
|
-
className: "utilities_ops-app-frame_CallCapsule_style--flex-bar"
|
|
41565
|
-
}, React__default["default"].createElement("div", {
|
|
41566
|
-
className: _getClassName(shake ? 'shake' : '', _styleModuleImportMap, {
|
|
41567
|
-
"handleMissingStyleName": "warn"
|
|
41568
|
-
})
|
|
41569
|
-
}, React__default["default"].createElement("div", {
|
|
41570
|
-
className: "utilities_ops-app-frame_CallCapsule_style--warningMsg"
|
|
41571
|
-
}, !isFlexLoaded && React__default["default"].createElement("span", null, activeTabWarning)), React__default["default"].createElement(CallerPill, {
|
|
41572
|
-
profileData: profileData,
|
|
41573
|
-
voiceTask: voiceTask,
|
|
41574
|
-
acceptTask: acceptTask,
|
|
41575
|
-
rejectTask: rejectTask,
|
|
41576
|
-
wrapupTask: wrapupTask,
|
|
41577
|
-
hangupTask: hangupTask,
|
|
41578
|
-
onDropDownClick: onDropDownClick,
|
|
41579
|
-
activities: profileData === null || profileData === void 0 ? void 0 : profileData.activities,
|
|
41580
|
-
showFlex: showFlex,
|
|
41581
|
-
status: status,
|
|
41582
|
-
onDialPadIconClick: onDialPadIconClick,
|
|
41583
|
-
onIframeOpenClick: onIframeOpenClick,
|
|
41584
|
-
isFlexLoaded: isFlexLoaded,
|
|
41585
|
-
onReloadFlex: onReloadFlex,
|
|
41586
|
-
showReload: showReload,
|
|
41587
|
-
isFullScreen: isFullScreen,
|
|
41588
|
-
toggleScreen: toggleScreen,
|
|
41589
|
-
isReload: isReload,
|
|
41590
|
-
showSpinner: showSpinner,
|
|
41591
|
-
warning: warning,
|
|
41592
|
-
setWarning: setWarning,
|
|
41593
|
-
setShowFlex: setShowFlex
|
|
41594
|
-
}))), React__default["default"].createElement(Dialer, {
|
|
41595
|
-
onOutBoundCall: onOutBoundCall,
|
|
41596
|
-
opened: dialerOpen
|
|
41597
|
-
}), !isFlexLoaded && React__default["default"].createElement("div", {
|
|
41598
|
-
className: _getClassName("".concat(showFlex ? 'visible' : 'hidden', " ").concat(isFullScreen ? 'fullScreen' : 'iframeSection'), _styleModuleImportMap, {
|
|
41599
|
-
"handleMissingStyleName": "warn"
|
|
41600
|
-
})
|
|
41601
|
-
}, React__default["default"].createElement("iframe", {
|
|
41602
|
-
style: {
|
|
41603
|
-
width: '100%',
|
|
41604
|
-
height: '100%',
|
|
41605
|
-
borderRadius: '6px'
|
|
41606
|
-
},
|
|
41607
|
-
title: "flex",
|
|
41608
|
-
src: getFlexUrl(),
|
|
41609
|
-
id: "flex-iframe",
|
|
41610
|
-
name: "twilioFlex",
|
|
41611
|
-
allow: "camera;microphone;autoplay"
|
|
41612
|
-
})));
|
|
41613
|
-
};
|
|
39611
|
+
storage$1.flexLoaded;
|
|
41614
39612
|
|
|
41615
39613
|
var defaultAutoSelectProps = {
|
|
41616
39614
|
optionStyleProps: {
|
|
@@ -41619,7 +39617,7 @@ var defaultAutoSelectProps = {
|
|
|
41619
39617
|
},
|
|
41620
39618
|
width: 200
|
|
41621
39619
|
};
|
|
41622
|
-
|
|
39620
|
+
[_objectSpread2({}, defaultAutoSelectProps, {
|
|
41623
39621
|
name: 'barcode_label_printers',
|
|
41624
39622
|
label: 'Bar Code Printer'
|
|
41625
39623
|
}), _objectSpread2({}, defaultAutoSelectProps, {
|
|
@@ -41636,217 +39634,11 @@ var printerFields = [_objectSpread2({}, defaultAutoSelectProps, {
|
|
|
41636
39634
|
label: 'Dot Matrix Printers'
|
|
41637
39635
|
})];
|
|
41638
39636
|
|
|
41639
|
-
|
|
41640
|
-
barcode_label_printers: '',
|
|
41641
|
-
check_printers: '',
|
|
41642
|
-
standard_printers: '',
|
|
41643
|
-
windshield_label_printers: '',
|
|
41644
|
-
text_printers: ''
|
|
41645
|
-
};
|
|
41646
|
-
var isDefault = propEq$1('is_default', true);
|
|
41647
|
-
|
|
41648
|
-
var findFirstDefault = function findFirstDefault(printers) {
|
|
41649
|
-
return nth$1(0, filter$1(isDefault, printers));
|
|
41650
|
-
};
|
|
41651
|
-
|
|
41652
|
-
var getValuesArray = function getValuesArray(final, _ref) {
|
|
41653
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
41654
|
-
label = _ref2[0],
|
|
41655
|
-
printers = _ref2[1];
|
|
41656
|
-
|
|
41657
|
-
final[label] = values$1(printers);
|
|
41658
|
-
return final;
|
|
41659
|
-
};
|
|
41660
|
-
|
|
41661
|
-
var pluckDefault = function pluckDefault(final, _ref3) {
|
|
41662
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
41663
|
-
label = _ref4[0],
|
|
41664
|
-
printers = _ref4[1];
|
|
41665
|
-
|
|
41666
|
-
final[label] = propOr$1('', 'printer_name')(findFirstDefault(printers));
|
|
41667
|
-
return final;
|
|
41668
|
-
};
|
|
41669
|
-
|
|
41670
|
-
var sessionOrDefault = function sessionOrDefault(label) {
|
|
41671
|
-
return function () {
|
|
41672
|
-
var printer_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
41673
|
-
var sessionDashboard = storage$1.getSessionItem('dashboard');
|
|
41674
|
-
sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS;
|
|
41675
|
-
var printerName = sessionDashboard.printers[label];
|
|
41676
|
-
return !isEmpty$2(printerName) ? printerName : printer_name;
|
|
41677
|
-
};
|
|
41678
|
-
};
|
|
41679
|
-
|
|
41680
|
-
var chooseActive = function chooseActive(final, _ref5) {
|
|
41681
|
-
var _ref6 = _slicedToArray(_ref5, 2),
|
|
41682
|
-
label = _ref6[0],
|
|
41683
|
-
printer_name = _ref6[1];
|
|
41684
|
-
|
|
41685
|
-
return append$1({
|
|
41686
|
-
printer_name: sessionOrDefault(label)(printer_name),
|
|
41687
|
-
label: label
|
|
41688
|
-
}, final);
|
|
41689
|
-
};
|
|
41690
|
-
|
|
41691
|
-
var reduceToObject = function reduceToObject(reducer) {
|
|
41692
|
-
return function (target) {
|
|
41693
|
-
return reduce$1(reducer, {}, target);
|
|
41694
|
-
};
|
|
41695
|
-
};
|
|
41696
|
-
|
|
41697
|
-
var getActivePrinters = (function (printersData) {
|
|
41698
|
-
if (typeof printersData === 'string') return {};
|
|
41699
|
-
var printers = reduceToObject(getValuesArray)(toPairs$1(printersData));
|
|
41700
|
-
var defaultPrinters = reduceToObject(pluckDefault)(toPairs$1(printers));
|
|
41701
|
-
return reduceToObject(chooseActive)(toPairs$1(defaultPrinters));
|
|
41702
|
-
});
|
|
39637
|
+
propEq$1('is_default', true);
|
|
41703
39638
|
|
|
41704
39639
|
var css_248z$3 = ".utilities_ops-app-frame_PrinterDialog_PrinterDialog--printerSettings {\r\n width: 700px;\r\n padding: 10px;\r\n background: #f1f1f1;\r\n}\r\n\r\n.utilities_ops-app-frame_PrinterDialog_PrinterDialog--buttonBox {\r\n display: flex;\r\n width: 100%;\r\n justify-content: flex-end;\r\n padding-top: 5px;\r\n}";
|
|
41705
39640
|
styleInject(css_248z$3);
|
|
41706
39641
|
|
|
41707
|
-
var countryHeaders = {
|
|
41708
|
-
c: 'USA',
|
|
41709
|
-
uk: 'GBR',
|
|
41710
|
-
g: 'DEU'
|
|
41711
|
-
}; // Properly populate printer options before feeding to autoselect
|
|
41712
|
-
|
|
41713
|
-
var getPrinterOptions = function getPrinterOptions(printers) {
|
|
41714
|
-
return Array.isArray(printers) ? printers : [];
|
|
41715
|
-
};
|
|
41716
|
-
|
|
41717
|
-
var AUTO_SELECT_STYLE = {
|
|
41718
|
-
rowHeight: 40,
|
|
41719
|
-
optionsMinHeight: 200
|
|
41720
|
-
};
|
|
41721
|
-
|
|
41722
|
-
var makeKeyValue = function makeKeyValue(final, target) {
|
|
41723
|
-
final[target.label] = target.printer_name;
|
|
41724
|
-
return final;
|
|
41725
|
-
};
|
|
41726
|
-
|
|
41727
|
-
var formatActivePrintersForState = function formatActivePrintersForState() {
|
|
41728
|
-
var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
41729
|
-
var printers = Array.isArray(activePrinters) ? activePrinters : [];
|
|
41730
|
-
return printers.reduce(makeKeyValue, {});
|
|
41731
|
-
};
|
|
41732
|
-
|
|
41733
|
-
var PrinterDialog = function PrinterDialog(_ref) {
|
|
41734
|
-
var isDialogOpen = _ref.isDialogOpen,
|
|
41735
|
-
handleClose = _ref.handleClose;
|
|
41736
|
-
|
|
41737
|
-
var _useState = React.useState({}),
|
|
41738
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
41739
|
-
printersData = _useState2[0],
|
|
41740
|
-
setPrintersData = _useState2[1];
|
|
41741
|
-
|
|
41742
|
-
var _useState3 = React.useState({}),
|
|
41743
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
41744
|
-
activePrinters = _useState4[0],
|
|
41745
|
-
setActivePrinters = _useState4[1];
|
|
41746
|
-
|
|
41747
|
-
React.useEffect(function () {
|
|
41748
|
-
fetchActivePrinters(storage$1.activeYardNumber);
|
|
41749
|
-
}, []);
|
|
41750
|
-
|
|
41751
|
-
var fetchActivePrinters =
|
|
41752
|
-
/*#__PURE__*/
|
|
41753
|
-
function () {
|
|
41754
|
-
var _ref2 = _asyncToGenerator(
|
|
41755
|
-
/*#__PURE__*/
|
|
41756
|
-
regenerator.mark(function _callee(yardNumber) {
|
|
41757
|
-
var printers, activePrinters, update;
|
|
41758
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
41759
|
-
while (1) {
|
|
41760
|
-
switch (_context.prev = _context.next) {
|
|
41761
|
-
case 0:
|
|
41762
|
-
_context.next = 2;
|
|
41763
|
-
return fetcher.getPrintersForYard(yardNumber);
|
|
41764
|
-
|
|
41765
|
-
case 2:
|
|
41766
|
-
printers = _context.sent;
|
|
41767
|
-
activePrinters = getActivePrinters(printers);
|
|
41768
|
-
update = formatActivePrintersForState(activePrinters);
|
|
41769
|
-
console.log(update);
|
|
41770
|
-
setActivePrinters(update);
|
|
41771
|
-
setPrintersData(printers);
|
|
41772
|
-
|
|
41773
|
-
case 8:
|
|
41774
|
-
case "end":
|
|
41775
|
-
return _context.stop();
|
|
41776
|
-
}
|
|
41777
|
-
}
|
|
41778
|
-
}, _callee);
|
|
41779
|
-
}));
|
|
41780
|
-
|
|
41781
|
-
return function fetchActivePrinters(_x) {
|
|
41782
|
-
return _ref2.apply(this, arguments);
|
|
41783
|
-
};
|
|
41784
|
-
}();
|
|
41785
|
-
|
|
41786
|
-
var savePrinters = function savePrinters() {
|
|
41787
|
-
var selectedRole = storage$1.userRole;
|
|
41788
|
-
var securityLevel = storage$1.getSessionItem('securityLevel');
|
|
41789
|
-
var dashboard = storage$1.getSessionItem('dashboard');
|
|
41790
|
-
var selectedCurrency = dashboard.selectedCurrency,
|
|
41791
|
-
language = dashboard.language,
|
|
41792
|
-
yard = dashboard.yard;
|
|
41793
|
-
storage$1.setSessionItem('dashboard', _objectSpread2({}, storage$1.getSessionItem('dashboard'), {
|
|
41794
|
-
printers: activePrinters
|
|
41795
|
-
}));
|
|
41796
|
-
storage$1.setLocalItem('dashboard', activePrinters, 'printers');
|
|
41797
|
-
fetcher.setUserPreferences('oph', {
|
|
41798
|
-
selectedCurrency: selectedCurrency,
|
|
41799
|
-
language: language,
|
|
41800
|
-
// TODO Remove this after remove role selection
|
|
41801
|
-
selectedRole: selectedRole,
|
|
41802
|
-
printers: activePrinters,
|
|
41803
|
-
yard: yard,
|
|
41804
|
-
securityLevel: securityLevel
|
|
41805
|
-
}, countryHeaders[process.env.STACK] || 'USA');
|
|
41806
|
-
handleClose();
|
|
41807
|
-
};
|
|
41808
|
-
|
|
41809
|
-
return React__default["default"].createElement(coreComponents.Dialog, {
|
|
41810
|
-
title: "Printer Selection",
|
|
41811
|
-
isOpen: isDialogOpen,
|
|
41812
|
-
dismiss: handleClose
|
|
41813
|
-
}, printersData ? React__default["default"].createElement("div", {
|
|
41814
|
-
className: "utilities_ops-app-frame_PrinterDialog_PrinterDialog--printerSettings"
|
|
41815
|
-
}, React__default["default"].createElement("div", {
|
|
41816
|
-
className: "col-1-1"
|
|
41817
|
-
}, printerFields.map(function (printer) {
|
|
41818
|
-
var name = printer.name || '';
|
|
41819
|
-
var printers = getPrinterOptions(printersData[name]);
|
|
41820
|
-
return React__default["default"].createElement("div", {
|
|
41821
|
-
key: name,
|
|
41822
|
-
className: "col-1-3"
|
|
41823
|
-
}, React__default["default"].createElement(coreComponents.AutoSelect, {
|
|
41824
|
-
key: name,
|
|
41825
|
-
label: printer.label,
|
|
41826
|
-
name: name,
|
|
41827
|
-
value: activePrinters[name],
|
|
41828
|
-
onChange: function onChange(value) {
|
|
41829
|
-
setActivePrinters(_objectSpread2({}, activePrinters, _defineProperty({}, name, value)));
|
|
41830
|
-
},
|
|
41831
|
-
optionStyleProps: AUTO_SELECT_STYLE,
|
|
41832
|
-
options: printers.map(function (data) {
|
|
41833
|
-
return data.printer_name;
|
|
41834
|
-
}),
|
|
41835
|
-
displayOption: function displayOption(code) {
|
|
41836
|
-
return code;
|
|
41837
|
-
}
|
|
41838
|
-
}));
|
|
41839
|
-
})), React__default["default"].createElement("hr", null), React__default["default"].createElement("div", {
|
|
41840
|
-
className: "utilities_ops-app-frame_PrinterDialog_PrinterDialog--buttonBox"
|
|
41841
|
-
}, React__default["default"].createElement(coreComponents.Button, {
|
|
41842
|
-
primary: true,
|
|
41843
|
-
onClick: handleClose
|
|
41844
|
-
}, "Cancel"), React__default["default"].createElement(coreComponents.Button, {
|
|
41845
|
-
primary: true,
|
|
41846
|
-
onClick: savePrinters
|
|
41847
|
-
}, "Save"))) : null);
|
|
41848
|
-
};
|
|
41849
|
-
|
|
41850
39642
|
var global$1 = function () {
|
|
41851
39643
|
if (this) return this; // Unexpected strict mode (may happen if e.g. bundled into ESM module), be nice
|
|
41852
39644
|
// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
|
|
@@ -42113,6 +39905,17 @@ function fetchG2Notifications(updateNotifications, updateAllNotificationsList) {
|
|
|
42113
39905
|
}] : null,
|
|
42114
39906
|
targets: _toConsumableArray(generateTargets(notification))
|
|
42115
39907
|
};
|
|
39908
|
+
|
|
39909
|
+
if (notification.component_name) {
|
|
39910
|
+
notification.action = {
|
|
39911
|
+
componentName: notification.component_name,
|
|
39912
|
+
properties: notification.component_properties ? JSON.parse(notification.component_properties) : {},
|
|
39913
|
+
componentState: notification.component_state ? JSON.parse(notification.component_state) : {},
|
|
39914
|
+
status: notification.action_status,
|
|
39915
|
+
versionNumber: notification.component_version_number
|
|
39916
|
+
};
|
|
39917
|
+
}
|
|
39918
|
+
|
|
42116
39919
|
return notification;
|
|
42117
39920
|
});
|
|
42118
39921
|
compose(updateNotifications, filterNotifications)(modifiedNotifications);
|
|
@@ -50047,14 +47850,15 @@ var CountryFlag = function CountryFlag() {
|
|
|
50047
47850
|
};
|
|
50048
47851
|
|
|
50049
47852
|
var AppBar = function AppBar(_ref) {
|
|
50050
|
-
var _storage$getSessionIt, _storage$getSessionIt2;
|
|
47853
|
+
var _storage$getSessionIt, _window$toolkitEnv2, _storage$getSessionIt2;
|
|
50051
47854
|
|
|
50052
47855
|
var history = _ref.history,
|
|
50053
47856
|
setAppBarMounted = _ref.setAppBarMounted,
|
|
50054
47857
|
onSettingsSaved = _ref.onSettingsSaved,
|
|
50055
47858
|
showTitle = _ref.showTitle,
|
|
50056
47859
|
title = _ref.title,
|
|
50057
|
-
pathname = _ref.pathname
|
|
47860
|
+
pathname = _ref.pathname,
|
|
47861
|
+
ActionComponent = _ref.ActionComponent;
|
|
50058
47862
|
SETTINGS_ITEMS[0].name = storage$1.userName; // Escape hatch for forceUpdate function
|
|
50059
47863
|
|
|
50060
47864
|
var _useReducer = React.useReducer(function (x) {
|
|
@@ -50065,14 +47869,14 @@ var AppBar = function AppBar(_ref) {
|
|
|
50065
47869
|
var forceUpdate = _useReducer2[1];
|
|
50066
47870
|
|
|
50067
47871
|
var _useState = React.useState(false),
|
|
50068
|
-
_useState2 = _slicedToArray(_useState, 2)
|
|
50069
|
-
|
|
50070
|
-
setMounted = _useState2[1];
|
|
47872
|
+
_useState2 = _slicedToArray(_useState, 2);
|
|
47873
|
+
_useState2[0];
|
|
47874
|
+
var setMounted = _useState2[1];
|
|
50071
47875
|
|
|
50072
47876
|
var _useState3 = React.useState(false),
|
|
50073
|
-
_useState4 = _slicedToArray(_useState3, 2)
|
|
50074
|
-
|
|
50075
|
-
setPrinterDialogOpen = _useState4[1];
|
|
47877
|
+
_useState4 = _slicedToArray(_useState3, 2);
|
|
47878
|
+
_useState4[0];
|
|
47879
|
+
var setPrinterDialogOpen = _useState4[1];
|
|
50076
47880
|
|
|
50077
47881
|
React.useEffect(function () {
|
|
50078
47882
|
setMounted(true);
|
|
@@ -50109,7 +47913,10 @@ var AppBar = function AppBar(_ref) {
|
|
|
50109
47913
|
}
|
|
50110
47914
|
|
|
50111
47915
|
if (item.key === 'settings') {
|
|
50112
|
-
|
|
47916
|
+
var _window$toolkitEnv;
|
|
47917
|
+
|
|
47918
|
+
var isCoreApp = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.IS_CORE_APP) ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
|
|
47919
|
+
return isCoreApp ? history.push('/settings') : window.location.assign('/settings');
|
|
50113
47920
|
}
|
|
50114
47921
|
|
|
50115
47922
|
if (item.key === 'printers') {
|
|
@@ -50219,6 +48026,17 @@ var AppBar = function AppBar(_ref) {
|
|
|
50219
48026
|
});
|
|
50220
48027
|
};
|
|
50221
48028
|
|
|
48029
|
+
var saveActionComponentState = function saveActionComponentState(id, componentState) {
|
|
48030
|
+
var updatedNotifications = notifications.map(function (notification) {
|
|
48031
|
+
if (notification.notificationId === id) {
|
|
48032
|
+
notification.actionComponentState = componentState;
|
|
48033
|
+
}
|
|
48034
|
+
|
|
48035
|
+
return notification;
|
|
48036
|
+
});
|
|
48037
|
+
setNotifications(updatedNotifications);
|
|
48038
|
+
};
|
|
48039
|
+
|
|
50222
48040
|
var selectedYard = (_storage$getSessionIt = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt === void 0 ? void 0 : _storage$getSessionIt.selectedYard;
|
|
50223
48041
|
React.useEffect(function () {
|
|
50224
48042
|
setNotifications([]);
|
|
@@ -50268,7 +48086,8 @@ var AppBar = function AppBar(_ref) {
|
|
|
50268
48086
|
clearInterval(expireNotificationsInterval);
|
|
50269
48087
|
};
|
|
50270
48088
|
}, [notifications]);
|
|
50271
|
-
var STACK = process.env.STACK
|
|
48089
|
+
var STACK = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
|
|
48090
|
+
STACK = STACK || 'c';
|
|
50272
48091
|
var modifiedSettings = SETTINGS_ITEMS;
|
|
50273
48092
|
modifiedSettings[0]['name'] = storage$1.userName;
|
|
50274
48093
|
var _storage$chromePlugin = storage$1.chromePluginData.ringcentral,
|
|
@@ -50276,8 +48095,6 @@ var AppBar = function AppBar(_ref) {
|
|
|
50276
48095
|
phoneStatus: '',
|
|
50277
48096
|
phoneStatusProcessing: false
|
|
50278
48097
|
} : _storage$chromePlugin;
|
|
50279
|
-
var placeholderNode = document.getElementById('AppBarPlaceholderDiv');
|
|
50280
|
-
var isAppEnabledTwilio = process.env.IS_TWILIO_ENABLED || false;
|
|
50281
48098
|
return React__default["default"].createElement("div", null, React__default["default"].createElement(AppBar$1, {
|
|
50282
48099
|
moduleName: "OPS PORTAL",
|
|
50283
48100
|
isLoggedOn: storage$1.isAuthenticated,
|
|
@@ -50300,7 +48117,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
50300
48117
|
sendFeedback: fetcher.sendFeedback,
|
|
50301
48118
|
getInnovationHubToken: fetcher.getInnovationHubToken,
|
|
50302
48119
|
feedbackConfig: feedbackConfig(),
|
|
50303
|
-
stack:
|
|
48120
|
+
stack: STACK,
|
|
50304
48121
|
phoneStatusObject: ringcentral,
|
|
50305
48122
|
togglePhoneAvailability: togglePhoneAvailability,
|
|
50306
48123
|
forceUpdate: forceUpdate,
|
|
@@ -50309,17 +48126,14 @@ var AppBar = function AppBar(_ref) {
|
|
|
50309
48126
|
title: title,
|
|
50310
48127
|
history: history,
|
|
50311
48128
|
notifications: notifications,
|
|
50312
|
-
onDismiss: dismissNotification
|
|
50313
|
-
|
|
50314
|
-
|
|
50315
|
-
}, React__default["default"].createElement(CallCapsule, null)), isPrinterDialogOpen && React__default["default"].createElement(PrinterDialog, {
|
|
50316
|
-
isDialogOpen: isPrinterDialogOpen,
|
|
50317
|
-
handleClose: function handleClose() {
|
|
50318
|
-
return setPrinterDialogOpen(false);
|
|
50319
|
-
}
|
|
48129
|
+
onDismiss: dismissNotification,
|
|
48130
|
+
ActionComponent: ActionComponent,
|
|
48131
|
+
saveActionComponentState: saveActionComponentState
|
|
50320
48132
|
}), React__default["default"].createElement(Notifications, {
|
|
50321
48133
|
notifications: notifications || [],
|
|
50322
|
-
onDismiss: dismissNotification
|
|
48134
|
+
onDismiss: dismissNotification,
|
|
48135
|
+
ActionComponent: ActionComponent,
|
|
48136
|
+
saveActionComponentState: saveActionComponentState
|
|
50323
48137
|
}));
|
|
50324
48138
|
};
|
|
50325
48139
|
AppBar.defaultProps = {
|
|
@@ -50339,20 +48153,20 @@ var NO_TILE_PERMISSION = 'Could not verify user access for the tile.';
|
|
|
50339
48153
|
var AuthGuard =
|
|
50340
48154
|
/*#__PURE__*/
|
|
50341
48155
|
function (_React$PureComponent) {
|
|
50342
|
-
_inherits
|
|
48156
|
+
_inherits(AuthGuard, _React$PureComponent);
|
|
50343
48157
|
|
|
50344
48158
|
function AuthGuard() {
|
|
50345
48159
|
var _getPrototypeOf2;
|
|
50346
48160
|
|
|
50347
48161
|
var _this;
|
|
50348
48162
|
|
|
50349
|
-
_classCallCheck
|
|
48163
|
+
_classCallCheck(this, AuthGuard);
|
|
50350
48164
|
|
|
50351
48165
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50352
48166
|
args[_key] = arguments[_key];
|
|
50353
48167
|
}
|
|
50354
48168
|
|
|
50355
|
-
_this = _possibleConstructorReturn
|
|
48169
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(AuthGuard)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
50356
48170
|
|
|
50357
48171
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
50358
48172
|
allowAccess: 'wait',
|
|
@@ -50376,13 +48190,16 @@ function (_React$PureComponent) {
|
|
|
50376
48190
|
return _this;
|
|
50377
48191
|
}
|
|
50378
48192
|
|
|
50379
|
-
_createClass
|
|
48193
|
+
_createClass(AuthGuard, [{
|
|
50380
48194
|
key: "componentDidMount",
|
|
50381
48195
|
value: function () {
|
|
50382
48196
|
var _componentDidMount = _asyncToGenerator(
|
|
50383
48197
|
/*#__PURE__*/
|
|
50384
48198
|
regenerator.mark(function _callee() {
|
|
50385
|
-
var
|
|
48199
|
+
var _window$toolkitEnv;
|
|
48200
|
+
|
|
48201
|
+
var disableRestrictions, appTile, _window$toolkitEnv2, appAuthName, tileConfigAccess;
|
|
48202
|
+
|
|
50386
48203
|
return regenerator.wrap(function _callee$(_context) {
|
|
50387
48204
|
while (1) {
|
|
50388
48205
|
switch (_context.prev = _context.next) {
|
|
@@ -50416,50 +48233,58 @@ function (_React$PureComponent) {
|
|
|
50416
48233
|
return _context.abrupt("return", this.allowAccess(AUTHENTICATED_AND_ON_CORE_ROUTE));
|
|
50417
48234
|
|
|
50418
48235
|
case 5:
|
|
50419
|
-
|
|
50420
|
-
|
|
48236
|
+
// NOTE: Temporary env variable to make sure configs don't break some apps.
|
|
48237
|
+
// User is authenticated and route is not login/logout, so it must
|
|
48238
|
+
// be a opsportal application other than opsportal-core. We now
|
|
48239
|
+
// need to compare yard and security access to determine what to do.
|
|
48240
|
+
disableRestrictions = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.DISABLE_RESTRICTIONS) ? window.toolkitEnv.DISABLE_RESTRICTIONS : process.env.DISABLE_RESTRICTIONS;
|
|
48241
|
+
|
|
48242
|
+
if (!disableRestrictions) {
|
|
48243
|
+
_context.next = 8;
|
|
50421
48244
|
break;
|
|
50422
48245
|
}
|
|
50423
48246
|
|
|
50424
48247
|
return _context.abrupt("return", this.allowAccess(PASS_BECAUSE_RESTRICTIONS_DISABLED));
|
|
50425
48248
|
|
|
50426
|
-
case
|
|
50427
|
-
_context.next =
|
|
48249
|
+
case 8:
|
|
48250
|
+
_context.next = 10;
|
|
50428
48251
|
return fetcher.getAppTileData();
|
|
50429
48252
|
|
|
50430
|
-
case
|
|
48253
|
+
case 10:
|
|
50431
48254
|
appTile = _context.sent;
|
|
50432
48255
|
|
|
50433
48256
|
if (appTile) {
|
|
50434
|
-
_context.next =
|
|
48257
|
+
_context.next = 17;
|
|
50435
48258
|
break;
|
|
50436
48259
|
}
|
|
50437
48260
|
|
|
50438
|
-
|
|
50439
|
-
|
|
48261
|
+
appAuthName = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.APP_AUTH_NAME) ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
48262
|
+
|
|
48263
|
+
if (!appAuthName) {
|
|
48264
|
+
_context.next = 16;
|
|
50440
48265
|
break;
|
|
50441
48266
|
}
|
|
50442
48267
|
|
|
50443
|
-
_context.next =
|
|
50444
|
-
return fetcher.getPermissions(
|
|
48268
|
+
_context.next = 16;
|
|
48269
|
+
return fetcher.getPermissions(appAuthName);
|
|
50445
48270
|
|
|
50446
|
-
case
|
|
48271
|
+
case 16:
|
|
50447
48272
|
return _context.abrupt("return", this.allowAccess(PATH_NOT_FOUND));
|
|
50448
48273
|
|
|
50449
|
-
case
|
|
50450
|
-
_context.next =
|
|
48274
|
+
case 17:
|
|
48275
|
+
_context.next = 19;
|
|
50451
48276
|
return fetcher.getCoreAppPermissions();
|
|
50452
48277
|
|
|
50453
|
-
case
|
|
48278
|
+
case 19:
|
|
50454
48279
|
if (!appTile.appAuthName) {
|
|
50455
|
-
_context.next =
|
|
48280
|
+
_context.next = 22;
|
|
50456
48281
|
break;
|
|
50457
48282
|
}
|
|
50458
48283
|
|
|
50459
|
-
_context.next =
|
|
48284
|
+
_context.next = 22;
|
|
50460
48285
|
return fetcher.getPermissions(appTile.appAuthName);
|
|
50461
48286
|
|
|
50462
|
-
case
|
|
48287
|
+
case 22:
|
|
50463
48288
|
// If there are rules, evaluate and act accordingly.
|
|
50464
48289
|
tileConfigAccess = userHasAccess(appTile);
|
|
50465
48290
|
|
|
@@ -50469,7 +48294,7 @@ function (_React$PureComponent) {
|
|
|
50469
48294
|
this.denyAccess(NO_TILE_PERMISSION);
|
|
50470
48295
|
}
|
|
50471
48296
|
|
|
50472
|
-
case
|
|
48297
|
+
case 24:
|
|
50473
48298
|
case "end":
|
|
50474
48299
|
return _context.stop();
|
|
50475
48300
|
}
|
|
@@ -50508,7 +48333,7 @@ var GoHome = function GoHome(props) {
|
|
|
50508
48333
|
}, props.reason));
|
|
50509
48334
|
};
|
|
50510
48335
|
|
|
50511
|
-
var css_248z = ".utilities_ops-app-frame_AppFrame_AppFrame--AppFrame {\r\n background: var(--paleGray);\r\n background: var(--paleGray);\r\n height: 100vh;\r\n max-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n flex-basis: 0;\r\n}\r\n\r\n.utilities_ops-app-frame_AppFrame_AppFrame--header {\r\n flex
|
|
48336
|
+
var css_248z = ".utilities_ops-app-frame_AppFrame_AppFrame--AppFrame {\r\n background: var(--paleGray);\r\n background: var(--paleGray);\r\n height: 100vh;\r\n max-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n flex-basis: 0;\r\n}\r\n\r\n.utilities_ops-app-frame_AppFrame_AppFrame--header {\r\n flex: 0 1 auto;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n/* Wrapper that contains the app being developed. */\r\n\r\n.utilities_ops-app-frame_AppFrame_AppFrame--AppContainer {\r\n height: 100%;\r\n flex: 1 1 auto;\r\n display: flex;\r\n flex-flow: column;\r\n}\r\n\r\n.utilities_ops-app-frame_AppFrame_AppFrame--pageWrapper {\r\n height: 100vh;\r\n display: flex;\r\n flex-flow: column;\r\n}\r\n\r\n.utilities_ops-app-frame_AppFrame_AppFrame--breadCrumbsWrapper {\r\n flex: 0 1 auto;\r\n}\r\n";
|
|
50512
48337
|
styleInject(css_248z);
|
|
50513
48338
|
|
|
50514
48339
|
if (!storage$1.activeYardNumber) {
|
|
@@ -50549,17 +48374,27 @@ var AppFrame = function AppFrame(props) {
|
|
|
50549
48374
|
window.dispatchEvent(event);
|
|
50550
48375
|
}
|
|
50551
48376
|
}, [appBarMounted]);
|
|
48377
|
+
React.useEffect(function () {
|
|
48378
|
+
console.log("+++env in toolkit props=", props.env);
|
|
48379
|
+
|
|
48380
|
+
if (props.env) {
|
|
48381
|
+
window.toolkitEnv = props.env;
|
|
48382
|
+
}
|
|
48383
|
+
}, [props]);
|
|
50552
48384
|
|
|
50553
48385
|
var authGuardProps = _objectSpread2({}, props, {
|
|
50554
48386
|
setAppBarMounted: setAppBarMounted
|
|
50555
48387
|
});
|
|
50556
48388
|
|
|
48389
|
+
console.log('+++props in frame=', props);
|
|
50557
48390
|
return React__default["default"].createElement("div", {
|
|
50558
48391
|
className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
|
|
50559
48392
|
style: props.handleScrolling ? SCROLL : NO_SCROLL
|
|
50560
48393
|
}, React__default["default"].createElement(BreadcrumbsProvider, {
|
|
50561
48394
|
history: props.history
|
|
50562
|
-
}, React__default["default"].createElement(AuthGuard, authGuardProps, React__default["default"].createElement(ConfigFetcher, null, React__default["default"].createElement("div",
|
|
48395
|
+
}, React__default["default"].createElement(AuthGuard, authGuardProps, React__default["default"].createElement(ConfigFetcher, null, React__default["default"].createElement("div", {
|
|
48396
|
+
className: "utilities_ops-app-frame_AppFrame_AppFrame--pageWrapper"
|
|
48397
|
+
}, React__default["default"].createElement("header", {
|
|
50563
48398
|
className: "utilities_ops-app-frame_AppFrame_AppFrame--header"
|
|
50564
48399
|
}, React__default["default"].createElement(AppBar, {
|
|
50565
48400
|
searchBarProps: props.searchBarProps,
|
|
@@ -50570,11 +48405,14 @@ var AppFrame = function AppFrame(props) {
|
|
|
50570
48405
|
},
|
|
50571
48406
|
showTitle: props.showTitle || true,
|
|
50572
48407
|
title: props.appTitle,
|
|
50573
|
-
pathname: props.location.pathname
|
|
50574
|
-
|
|
48408
|
+
pathname: props.location.pathname,
|
|
48409
|
+
ActionComponent: props === null || props === void 0 ? void 0 : props.ActionComponent
|
|
48410
|
+
})), React__default["default"].createElement("div", {
|
|
48411
|
+
className: "utilities_ops-app-frame_AppFrame_AppFrame--breadCrumbsWrapper"
|
|
48412
|
+
}, React__default["default"].createElement(Breadcrumbs, {
|
|
50575
48413
|
history: props.history,
|
|
50576
48414
|
pathname: window.location.pathname
|
|
50577
|
-
}), React__default["default"].createElement("main", {
|
|
48415
|
+
})), React__default["default"].createElement("main", {
|
|
50578
48416
|
className: "utilities_ops-app-frame_AppFrame_AppFrame--AppContainer"
|
|
50579
48417
|
}, props.children))))));
|
|
50580
48418
|
};
|