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