@copart/ops-tool-kit 1.8.1-alpha.13 → 1.8.1-alpha.15

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.
@@ -29,11 +29,11 @@ function _interopNamespace(e) {
29
29
 
30
30
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
31
31
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
- var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
33
32
  var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
33
+ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
34
34
 
35
35
  const name$f = "@copart/ops-tool-kit";
36
- const version$5 = "1.8.1-alpha.13";
36
+ const version$5 = "1.8.1-alpha.15";
37
37
  const main$1 = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -182,9 +182,10 @@ var setup = (function (_ref) {
182
182
 
183
183
  global.setUpInstana = function () {
184
184
  var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
185
+ var isCoreApp = arguments.length > 1 ? arguments[1] : undefined;
185
186
 
186
187
  //devOnly.log('Instana setting up.')
187
- if (key && !(process.env.NODE_ENV !== "production") && process.env.IS_CORE_APP) {
188
+ if (key && !(process.env.NODE_ENV !== "production") && isCoreApp) {
188
189
 
189
190
  (function (i, s, o, g, r, a, m) {
190
191
  i['InstanaEumObject'] = r;
@@ -288,7 +289,7 @@ function _asyncToGenerator(fn) {
288
289
  };
289
290
  }
290
291
 
291
- function _classCallCheck$2(instance, Constructor) {
292
+ function _classCallCheck(instance, Constructor) {
292
293
  if (!(instance instanceof Constructor)) {
293
294
  throw new TypeError("Cannot call a class as a function");
294
295
  }
@@ -304,7 +305,7 @@ function _defineProperties(target, props) {
304
305
  }
305
306
  }
306
307
 
307
- function _createClass$2(Constructor, protoProps, staticProps) {
308
+ function _createClass(Constructor, protoProps, staticProps) {
308
309
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
309
310
  if (staticProps) _defineProperties(Constructor, staticProps);
310
311
  return Constructor;
@@ -377,7 +378,7 @@ function _objectSpread2(target) {
377
378
  return target;
378
379
  }
379
380
 
380
- function _inherits$2(subClass, superClass) {
381
+ function _inherits(subClass, superClass) {
381
382
  if (typeof superClass !== "function" && superClass !== null) {
382
383
  throw new TypeError("Super expression must either be null or a function");
383
384
  }
@@ -452,7 +453,7 @@ function _assertThisInitialized(self) {
452
453
  return self;
453
454
  }
454
455
 
455
- function _possibleConstructorReturn$2(self, call) {
456
+ function _possibleConstructorReturn(self, call) {
456
457
  if (call && (typeof call === "object" || typeof call === "function")) {
457
458
  return call;
458
459
  }
@@ -1039,7 +1040,7 @@ if (process.env.NODE_ENV !== 'production') {
1039
1040
  var ReactPropTypesSecret$3 = ReactPropTypesSecret_1$1;
1040
1041
 
1041
1042
  var loggedTypeFailures$1 = {};
1042
- var has$7 = Function.call.bind(Object.prototype.hasOwnProperty);
1043
+ var has$5 = Function.call.bind(Object.prototype.hasOwnProperty);
1043
1044
 
1044
1045
  printWarning$5 = function (text) {
1045
1046
  var message = 'Warning: ' + text;
@@ -1072,7 +1073,7 @@ if (process.env.NODE_ENV !== 'production') {
1072
1073
  function checkPropTypes$2(typeSpecs, values, location, componentName, getStack) {
1073
1074
  if (process.env.NODE_ENV !== 'production') {
1074
1075
  for (var typeSpecName in typeSpecs) {
1075
- if (has$7(typeSpecs, typeSpecName)) {
1076
+ if (has$5(typeSpecs, typeSpecName)) {
1076
1077
  var error; // Prop type validation may throw. In case they do, we don't want to
1077
1078
  // fail the render phase where it didn't fail before. So we log it.
1078
1079
  // After these have been cleaned up, we'll let them throw.
@@ -1121,7 +1122,7 @@ checkPropTypes$2.resetWarningCache = function () {
1121
1122
 
1122
1123
  var checkPropTypes_1$1 = checkPropTypes$2;
1123
1124
 
1124
- var has$6 = Function.call.bind(Object.prototype.hasOwnProperty);
1125
+ var has$4 = Function.call.bind(Object.prototype.hasOwnProperty);
1125
1126
 
1126
1127
  var printWarning$4 = function () {};
1127
1128
 
@@ -1475,7 +1476,7 @@ var factoryWithTypeCheckers$1 = function (isValidElement, throwOnDirectAccess) {
1475
1476
  }
1476
1477
 
1477
1478
  for (var key in propValue) {
1478
- if (has$6(propValue, key)) {
1479
+ if (has$4(propValue, key)) {
1479
1480
  var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
1480
1481
 
1481
1482
  if (error instanceof Error) {
@@ -2755,17 +2756,22 @@ var clearStorage = function clearStorage() {
2755
2756
  };
2756
2757
 
2757
2758
  var createOpsStorage = function createOpsStorage() {
2758
- var APP_NAME = process.env.APP_NAME;
2759
2759
  return {
2760
2760
  getLocalItem: getLocalItem,
2761
2761
  setLocalItem: setLocalItem,
2762
2762
  getSessionItem: getSessionItem,
2763
2763
  setSessionItem: setSessionItem,
2764
2764
  setItem: function setItem(key, value) {
2765
+ var _window;
2766
+
2767
+ var APP_NAME = ((_window = window) === null || _window === void 0 ? void 0 : _window.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
2765
2768
  setLocalItem("".concat(APP_NAME, ":").concat(key), value);
2766
2769
  return value;
2767
2770
  },
2768
2771
  getItem: function getItem(key) {
2772
+ var _window2;
2773
+
2774
+ var APP_NAME = ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
2769
2775
  var value = getLocalItem("".concat(APP_NAME, ":").concat(key));
2770
2776
  return value;
2771
2777
  },
@@ -2791,15 +2797,18 @@ var createOpsStorage = function createOpsStorage() {
2791
2797
  },
2792
2798
 
2793
2799
  get currentAppPermissions() {
2800
+ var _window3, _window4;
2801
+
2794
2802
  var appTiles = storage$1.getLocalItem('opsportal-core:config').tiles || [];
2803
+ var appName = ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.APP_NAME) ? window.APP_NAME : process.env.APP_NAME;
2795
2804
  var appData = appTiles.find(function (tile) {
2796
2805
  if (tile.appName) {
2797
- return tile.appName === process.env.APP_NAME;
2806
+ return tile.appName === appName;
2798
2807
  } else {
2799
- return tile.path === "/".concat(process.env.APP_NAME);
2808
+ return tile.path === "/".concat(appName);
2800
2809
  }
2801
2810
  });
2802
- var appAuthName = appData ? appData.appAuthName : process.env.APP_AUTH_NAME;
2811
+ var appAuthName = appData ? appData.appAuthName : ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.APP_AUTH_NAME) ? window.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
2803
2812
  return appAuthName ? storage$1.getLocalItem("".concat(appAuthName, ":permissions")) : [];
2804
2813
  },
2805
2814
 
@@ -2970,15 +2979,15 @@ var withBreadcrumbs = function withBreadcrumbs(Comp) {
2970
2979
  return (
2971
2980
  /*#__PURE__*/
2972
2981
  function (_React$Component) {
2973
- _inherits$2(_class, _React$Component);
2982
+ _inherits(_class, _React$Component);
2974
2983
 
2975
2984
  function _class() {
2976
- _classCallCheck$2(this, _class);
2985
+ _classCallCheck(this, _class);
2977
2986
 
2978
- return _possibleConstructorReturn$2(this, _getPrototypeOf(_class).apply(this, arguments));
2987
+ return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
2979
2988
  }
2980
2989
 
2981
- _createClass$2(_class, [{
2990
+ _createClass(_class, [{
2982
2991
  key: "render",
2983
2992
  value: function render() {
2984
2993
  var _this = this;
@@ -2997,7 +3006,10 @@ var withBreadcrumbs = function withBreadcrumbs(Comp) {
2997
3006
  };
2998
3007
 
2999
3008
  var goHome = function goHome(props) {
3000
- return process.env.IS_CORE_APP ? function () {
3009
+ var _window$toolkitEnv;
3010
+
3011
+ var isCoreApp = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.IS_CORE_APP) ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
3012
+ return isCoreApp ? function () {
3001
3013
  return props.history.push('/');
3002
3014
  } : function () {
3003
3015
  return window.location.assign('/');
@@ -3056,14 +3068,14 @@ var nonSecure = function (size) {
3056
3068
  var BreadcrumbsProvider =
3057
3069
  /*#__PURE__*/
3058
3070
  function (_React$Component) {
3059
- _inherits$2(BreadcrumbsProvider, _React$Component);
3071
+ _inherits(BreadcrumbsProvider, _React$Component);
3060
3072
 
3061
3073
  function BreadcrumbsProvider(props) {
3062
3074
  var _this;
3063
3075
 
3064
- _classCallCheck$2(this, BreadcrumbsProvider);
3076
+ _classCallCheck(this, BreadcrumbsProvider);
3065
3077
 
3066
- _this = _possibleConstructorReturn$2(this, _getPrototypeOf(BreadcrumbsProvider).call(this, props));
3078
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbsProvider).call(this, props));
3067
3079
 
3068
3080
  _defineProperty(_assertThisInitialized(_this), "crumbIds", new Set());
3069
3081
 
@@ -3101,7 +3113,7 @@ function (_React$Component) {
3101
3113
  return _this;
3102
3114
  }
3103
3115
 
3104
- _createClass$2(BreadcrumbsProvider, [{
3116
+ _createClass(BreadcrumbsProvider, [{
3105
3117
  key: "render",
3106
3118
  value: function render() {
3107
3119
  return React__namespace.createElement(Context.Provider, {
@@ -3125,27 +3137,27 @@ var getCrumbProps = function getCrumbProps(props) {
3125
3137
  var Crumb = withBreadcrumbs(_class =
3126
3138
  /*#__PURE__*/
3127
3139
  function (_React$Component) {
3128
- _inherits$2(Crumb, _React$Component);
3140
+ _inherits(Crumb, _React$Component);
3129
3141
 
3130
3142
  function Crumb() {
3131
3143
  var _getPrototypeOf2;
3132
3144
 
3133
3145
  var _this;
3134
3146
 
3135
- _classCallCheck$2(this, Crumb);
3147
+ _classCallCheck(this, Crumb);
3136
3148
 
3137
3149
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3138
3150
  args[_key] = arguments[_key];
3139
3151
  }
3140
3152
 
3141
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(Crumb)).call.apply(_getPrototypeOf2, [this].concat(args)));
3153
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Crumb)).call.apply(_getPrototypeOf2, [this].concat(args)));
3142
3154
 
3143
3155
  _defineProperty(_assertThisInitialized(_this), "crumbId", nonSecure());
3144
3156
 
3145
3157
  return _this;
3146
3158
  }
3147
3159
 
3148
- _createClass$2(Crumb, [{
3160
+ _createClass(Crumb, [{
3149
3161
  key: "componentDidMount",
3150
3162
  value: function componentDidMount() {
3151
3163
  var crumbProps = getCrumbProps(this.props);
@@ -6214,11 +6226,14 @@ var countryCodeMapper = {
6214
6226
  uk: 'UK',
6215
6227
  g: 'DE'
6216
6228
  };
6217
- var countryCode = countryCodeMapper[process.env.STACK];
6218
6229
  var clientName = 'OPS'; // TODO use from config
6219
6230
 
6220
6231
  var handleHeaderVersion = function handleHeaderVersion(config) {
6221
- if (config.url.indexOf('referencedata-ws') !== -1 || process.env.STACK === 'g') {
6232
+ var _window$toolkitEnv;
6233
+
6234
+ var stack = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
6235
+
6236
+ if (config.url.indexOf('referencedata-ws') !== -1 || stack === 'g') {
6222
6237
  config.headers.Version = '2.0';
6223
6238
  }
6224
6239
  };
@@ -6230,8 +6245,11 @@ var handleRole = function handleRole(config) {
6230
6245
  };
6231
6246
 
6232
6247
  var handleHeaders = function handleHeaders(config) {
6248
+ var _window$toolkitEnv2;
6249
+
6250
+ var stack = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
6251
+ var countryCode = countryCodeMapper[stack];
6233
6252
  handleHeaderVersion(config);
6234
- var stack = process.env.STACK;
6235
6253
  var countryCodeFromStorage = storage$1.activeCountry || countryCode;
6236
6254
  var headers = config.headers;
6237
6255
  var accessToken = storage$1.accessToken;
@@ -6307,15 +6325,13 @@ function () {
6307
6325
  while (1) {
6308
6326
  switch (_context.prev = _context.next) {
6309
6327
  case 0:
6310
- process.env.NODE_ENV !== "production" && console.error('fetcher request error: ', error);
6311
-
6312
6328
  if (!((error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 401)) {
6313
- _context.next = 15;
6329
+ _context.next = 14;
6314
6330
  break;
6315
6331
  }
6316
6332
 
6317
6333
  if (!('refreshTokenExpired' in error.response.data)) {
6318
- _context.next = 5;
6334
+ _context.next = 4;
6319
6335
  break;
6320
6336
  }
6321
6337
 
@@ -6323,30 +6339,30 @@ function () {
6323
6339
  storage$1.setSessionItem('redirectUrl', window.location.href);
6324
6340
  return _context.abrupt("return", storage$1.logout());
6325
6341
 
6326
- case 5:
6342
+ case 4:
6327
6343
  if (store.isRefreshing) {
6328
- _context.next = 15;
6344
+ _context.next = 14;
6329
6345
  break;
6330
6346
  }
6331
6347
 
6332
6348
  store.isRefreshing = true;
6333
- _context.next = 9;
6349
+ _context.next = 8;
6334
6350
  return refreshToken();
6335
6351
 
6336
- case 9:
6352
+ case 8:
6337
6353
  _context.sent;
6338
- _context.next = 12;
6354
+ _context.next = 11;
6339
6355
  return fetcher.request(error.response.config);
6340
6356
 
6341
- case 12:
6357
+ case 11:
6342
6358
  final = _context.sent;
6343
6359
  store.isRefreshing = false;
6344
6360
  return _context.abrupt("return", final);
6345
6361
 
6346
- case 15:
6362
+ case 14:
6347
6363
  return _context.abrupt("return", Promise.reject(error));
6348
6364
 
6349
- case 16:
6365
+ case 15:
6350
6366
  case "end":
6351
6367
  return _context.stop();
6352
6368
  }
@@ -6458,11 +6474,14 @@ function () {
6458
6474
  };
6459
6475
  }();
6460
6476
  var findAppData = function findAppData(tiles) {
6477
+ var _window$toolkitEnv;
6478
+
6479
+ var appName = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
6461
6480
  var matchingTiles = tiles.filter(function (tile) {
6462
6481
  if (tile.appName) {
6463
- return tile.appName === process.env.APP_NAME;
6482
+ return tile.appName === appName;
6464
6483
  } else {
6465
- return tile.path === "/".concat(process.env.APP_NAME);
6484
+ return tile.path === "/".concat(appName);
6466
6485
  }
6467
6486
  });
6468
6487
 
@@ -6481,20 +6500,24 @@ function () {
6481
6500
  var _ref2 = _asyncToGenerator(
6482
6501
  /*#__PURE__*/
6483
6502
  regenerator.mark(function _callee2() {
6484
- var config;
6503
+ var _window$toolkitEnv2;
6504
+
6505
+ var coreConfigUri, config;
6485
6506
  return regenerator.wrap(function _callee2$(_context2) {
6486
6507
  while (1) {
6487
6508
  switch (_context2.prev = _context2.next) {
6488
6509
  case 0:
6489
- _context2.next = 2;
6490
- return getConfig(process.env.CORE_CONFIG_URI);
6510
+ coreConfigUri = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.CORE_CONFIG_URI) ? window.toolkitEnv.CORE_CONFIG_URI : process.env.CORE_CONFIG_URI; // This is for fetching core app configs only
6491
6511
 
6492
- case 2:
6512
+ _context2.next = 3;
6513
+ return getConfig(coreConfigUri);
6514
+
6515
+ case 3:
6493
6516
  config = _context2.sent;
6494
6517
  storage.setLocalItem('opsportal-core:config', config);
6495
6518
  return _context2.abrupt("return", findAppData(config.tiles || []));
6496
6519
 
6497
- case 5:
6520
+ case 6:
6498
6521
  case "end":
6499
6522
  return _context2.stop();
6500
6523
  }
@@ -6659,10 +6682,12 @@ exports.all = function () {
6659
6682
  };
6660
6683
  });
6661
6684
 
6662
- var stack$1 = process.env.STACK;
6663
-
6664
6685
  var getDefaultYard = function getDefaultYard(country) {
6665
- if (stack$1 === 'uk') {
6686
+ var _window$toolkitEnv;
6687
+
6688
+ var stack = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
6689
+
6690
+ if (stack === 'uk') {
6666
6691
  return {
6667
6692
  name: "COPART UK",
6668
6693
  number: 400,
@@ -6782,19 +6807,22 @@ function () {
6782
6807
  var _ref = _asyncToGenerator(
6783
6808
  /*#__PURE__*/
6784
6809
  regenerator.mark(function _callee() {
6785
- var config;
6810
+ var _window$toolkitEnv2;
6811
+
6812
+ var configUri, config;
6786
6813
  return regenerator.wrap(function _callee$(_context) {
6787
6814
  while (1) {
6788
6815
  switch (_context.prev = _context.next) {
6789
6816
  case 0:
6790
- _context.next = 2;
6791
- return fetcher.getConfig(process.env.CONFIG_URI);
6817
+ configUri = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.CONFIG_URI) ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
6818
+ _context.next = 3;
6819
+ return fetcher.getConfig(configUri);
6792
6820
 
6793
- case 2:
6821
+ case 3:
6794
6822
  config = _context.sent;
6795
6823
  storage$1.setItem('config', config);
6796
6824
 
6797
- case 4:
6825
+ case 5:
6798
6826
  case "end":
6799
6827
  return _context.stop();
6800
6828
  }
@@ -6839,7 +6867,9 @@ function () {
6839
6867
  var _ref2 = _asyncToGenerator(
6840
6868
  /*#__PURE__*/
6841
6869
  regenerator.mark(function _callee2(loginData) {
6842
- var hasCasAccess, yardList, entitySamID, entityID, entityCasID, userDetails, noCasAccess, userCountryCode, defaultYard;
6870
+ var _window$toolkitEnv3;
6871
+
6872
+ var stack, hasCasAccess, yardList, entitySamID, entityID, entityCasID, userDetails, noCasAccess, userCountryCode, defaultYard;
6843
6873
  return regenerator.wrap(function _callee2$(_context2) {
6844
6874
  while (1) {
6845
6875
  switch (_context2.prev = _context2.next) {
@@ -6875,8 +6905,10 @@ function () {
6875
6905
  return getAndStoreConfig();
6876
6906
 
6877
6907
  case 10:
6878
- if (!(process.env.STACK !== 'g')) {
6879
- _context2.next = 43;
6908
+ stack = ((_window$toolkitEnv3 = window.toolkitEnv) === null || _window$toolkitEnv3 === void 0 ? void 0 : _window$toolkitEnv3.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
6909
+
6910
+ if (!(stack !== 'g')) {
6911
+ _context2.next = 44;
6880
6912
  break;
6881
6913
  }
6882
6914
 
@@ -6888,54 +6920,54 @@ function () {
6888
6920
 
6889
6921
  entityCasID = ''; // cas ID (only applies to cas users)
6890
6922
 
6891
- _context2.prev = 16;
6892
- _context2.next = 19;
6923
+ _context2.prev = 17;
6924
+ _context2.next = 20;
6893
6925
  return fetcher.getUserDetails();
6894
6926
 
6895
- case 19:
6927
+ case 20:
6896
6928
  userDetails = _context2.sent;
6897
6929
  entityID = userDetails.userId.trim().toUpperCase();
6898
6930
  entityCasID = userDetails.userId;
6899
6931
  yardList = userDetails.yardList;
6900
6932
  hasCasAccess = true;
6901
- _context2.next = 38;
6933
+ _context2.next = 39;
6902
6934
  break;
6903
6935
 
6904
- case 26:
6905
- _context2.prev = 26;
6906
- _context2.t0 = _context2["catch"](16);
6936
+ case 27:
6937
+ _context2.prev = 27;
6938
+ _context2.t0 = _context2["catch"](17);
6907
6939
  noCasAccess = hasNoCASAccess(_context2.t0) || inactiveCAS(_context2.t0);
6908
6940
 
6909
6941
  if (!(!noCasAccess && hasNoYardAccess(_context2.t0))) {
6910
- _context2.next = 34;
6942
+ _context2.next = 35;
6911
6943
  break;
6912
6944
  }
6913
6945
 
6914
6946
  console.log('no yard error: ', _context2.t0);
6915
6947
  return _context2.abrupt("return", Promise.reject(hasNoYardAccess));
6916
6948
 
6917
- case 34:
6949
+ case 35:
6918
6950
  userCountryCode = loginData.entity_country;
6919
6951
  defaultYard = getDefaultYard(userCountryCode);
6920
6952
  yardList = [defaultYard];
6921
6953
  hasCasAccess = false;
6922
6954
 
6923
- case 38:
6955
+ case 39:
6924
6956
  if (entityCasID) loginData.entity_cas_id = entityCasID;
6925
6957
  loginData.entity_id = entityID;
6926
6958
  loginData.entity_sam_id = entitySamID;
6927
6959
  loginData.yardList = yardList;
6928
6960
  loginData.hasCasAccess = hasCasAccess;
6929
6961
 
6930
- case 43:
6962
+ case 44:
6931
6963
  storeLoginData(loginData);
6932
6964
 
6933
- case 44:
6965
+ case 45:
6934
6966
  case "end":
6935
6967
  return _context2.stop();
6936
6968
  }
6937
6969
  }
6938
- }, _callee2, null, [[16, 26]]);
6970
+ }, _callee2, null, [[17, 27]]);
6939
6971
  }));
6940
6972
 
6941
6973
  return function setupLogin(_x) {
@@ -7045,7 +7077,7 @@ function () {
7045
7077
  };
7046
7078
  }();
7047
7079
 
7048
- var has$5 = Object.prototype.hasOwnProperty,
7080
+ var has$3 = Object.prototype.hasOwnProperty,
7049
7081
  undef;
7050
7082
  /**
7051
7083
  * Decode a URI encoded string.
@@ -7114,7 +7146,7 @@ function querystringify(obj, prefix) {
7114
7146
  if ('string' !== typeof prefix) prefix = '?';
7115
7147
 
7116
7148
  for (key in obj) {
7117
- if (has$5.call(obj, key)) {
7149
+ if (has$3.call(obj, key)) {
7118
7150
  value = obj[key]; //
7119
7151
  // Edge cases where we actually want to encode the value to an empty
7120
7152
  // string instead of the stringified value.
@@ -7149,9 +7181,10 @@ var querystringify_1 = {
7149
7181
  parse: parse
7150
7182
  };
7151
7183
 
7152
- var stack = process.env.STACK.toLowerCase() || 'c';
7153
-
7154
7184
  var getCompanyCode = function getCompanyCode() {
7185
+ var _window$toolkitEnv;
7186
+
7187
+ var stack = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
7155
7188
  if (stack === 'c') return 'COPART';
7156
7189
  if (stack === 'uk') return 'COPARTUK';
7157
7190
  if (stack === 'g') return storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
@@ -7967,32 +8000,6 @@ _dispatchable(['all'], _xall$1, function all(fn, list) {
7967
8000
 
7968
8001
  var all$1 = all;
7969
8002
 
7970
- /**
7971
- * Returns the larger of its two arguments.
7972
- *
7973
- * @func
7974
- * @memberOf R
7975
- * @since v0.1.0
7976
- * @category Relation
7977
- * @sig Ord a => a -> a -> a
7978
- * @param {*} a
7979
- * @param {*} b
7980
- * @return {*}
7981
- * @see R.maxBy, R.min
7982
- * @example
7983
- *
7984
- * R.max(789, 123); //=> 789
7985
- * R.max('a', 'b'); //=> 'b'
7986
- */
7987
-
7988
- var max =
7989
- /*#__PURE__*/
7990
- _curry2(function max(a, b) {
7991
- return b > a ? b : a;
7992
- });
7993
-
7994
- var max$1 = max;
7995
-
7996
8003
  function _map(fn, functor) {
7997
8004
  var idx = 0;
7998
8005
  var len = functor.length;
@@ -8449,42 +8456,6 @@ _curry2(function prop(p, obj) {
8449
8456
 
8450
8457
  var prop$1 = prop;
8451
8458
 
8452
- /**
8453
- * Returns a new list by plucking the same named property off all objects in
8454
- * the list supplied.
8455
- *
8456
- * `pluck` will work on
8457
- * any [functor](https://github.com/fantasyland/fantasy-land#functor) in
8458
- * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.
8459
- *
8460
- * @func
8461
- * @memberOf R
8462
- * @since v0.1.0
8463
- * @category List
8464
- * @sig Functor f => k -> f {k: v} -> f v
8465
- * @param {Number|String} key The key name to pluck off of each object.
8466
- * @param {Array} f The array or functor to consider.
8467
- * @return {Array} The list of values for the given key.
8468
- * @see R.props
8469
- * @example
8470
- *
8471
- * var getAges = R.pluck('age');
8472
- * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]
8473
- *
8474
- * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]
8475
- * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}
8476
- * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]
8477
- * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]
8478
- */
8479
-
8480
- var pluck =
8481
- /*#__PURE__*/
8482
- _curry2(function pluck(p, list) {
8483
- return map$2(prop$1(p), list);
8484
- });
8485
-
8486
- var pluck$1 = pluck;
8487
-
8488
8459
  /**
8489
8460
  * Returns a single item by iterating through the list, successively calling
8490
8461
  * the iterator function and passing it an accumulator value and the current
@@ -8538,53 +8509,6 @@ _curry3(_reduce);
8538
8509
 
8539
8510
  var reduce$1 = reduce;
8540
8511
 
8541
- /**
8542
- * Takes a list of predicates and returns a predicate that returns true for a
8543
- * given list of arguments if every one of the provided predicates is satisfied
8544
- * by those arguments.
8545
- *
8546
- * The function returned is a curried function whose arity matches that of the
8547
- * highest-arity predicate.
8548
- *
8549
- * @func
8550
- * @memberOf R
8551
- * @since v0.9.0
8552
- * @category Logic
8553
- * @sig [(*... -> Boolean)] -> (*... -> Boolean)
8554
- * @param {Array} predicates An array of predicates to check
8555
- * @return {Function} The combined predicate
8556
- * @see R.anyPass
8557
- * @example
8558
- *
8559
- * const isQueen = R.propEq('rank', 'Q');
8560
- * const isSpade = R.propEq('suit', '♠︎');
8561
- * const isQueenOfSpades = R.allPass([isQueen, isSpade]);
8562
- *
8563
- * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false
8564
- * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true
8565
- */
8566
-
8567
- var allPass =
8568
- /*#__PURE__*/
8569
- _curry1(function allPass(preds) {
8570
- return curryN$1(reduce$1(max$1, 0, pluck$1('length', preds)), function () {
8571
- var idx = 0;
8572
- var len = preds.length;
8573
-
8574
- while (idx < len) {
8575
- if (!preds[idx].apply(this, arguments)) {
8576
- return false;
8577
- }
8578
-
8579
- idx += 1;
8580
- }
8581
-
8582
- return true;
8583
- });
8584
- });
8585
-
8586
- var allPass$1 = allPass;
8587
-
8588
8512
  /**
8589
8513
  * ap applies a list of functions to a list of values.
8590
8514
  *
@@ -10473,85 +10397,6 @@ _curry2(function forEachObjIndexed(fn, obj) {
10473
10397
 
10474
10398
  var forEachObjIndexed$1 = forEachObjIndexed;
10475
10399
 
10476
- /**
10477
- * Returns whether or not a path exists in an object. Only the object's
10478
- * own properties are checked.
10479
- *
10480
- * @func
10481
- * @memberOf R
10482
- * @since v0.26.0
10483
- * @category Object
10484
- * @typedefn Idx = String | Int
10485
- * @sig [Idx] -> {a} -> Boolean
10486
- * @param {Array} path The path to use.
10487
- * @param {Object} obj The object to check the path in.
10488
- * @return {Boolean} Whether the path exists.
10489
- * @see R.has
10490
- * @example
10491
- *
10492
- * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true
10493
- * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true
10494
- * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false
10495
- * R.hasPath(['a', 'b'], {}); // => false
10496
- */
10497
-
10498
- var hasPath =
10499
- /*#__PURE__*/
10500
- _curry2(function hasPath(_path, obj) {
10501
- if (_path.length === 0) {
10502
- return false;
10503
- }
10504
-
10505
- var val = obj;
10506
- var idx = 0;
10507
-
10508
- while (idx < _path.length) {
10509
- if (_has(_path[idx], val)) {
10510
- val = val[_path[idx]];
10511
- idx += 1;
10512
- } else {
10513
- return false;
10514
- }
10515
- }
10516
-
10517
- return true;
10518
- });
10519
-
10520
- var hasPath$1 = hasPath;
10521
-
10522
- /**
10523
- * Returns whether or not an object has an own property with the specified name
10524
- *
10525
- * @func
10526
- * @memberOf R
10527
- * @since v0.7.0
10528
- * @category Object
10529
- * @sig s -> {s: x} -> Boolean
10530
- * @param {String} prop The name of the property to check for.
10531
- * @param {Object} obj The object to query.
10532
- * @return {Boolean} Whether the property exists.
10533
- * @example
10534
- *
10535
- * const hasName = R.has('name');
10536
- * hasName({name: 'alice'}); //=> true
10537
- * hasName({name: 'bob'}); //=> true
10538
- * hasName({}); //=> false
10539
- *
10540
- * const point = {x: 0, y: 0};
10541
- * const pointHas = R.has(R.__, point);
10542
- * pointHas('x'); //=> true
10543
- * pointHas('y'); //=> true
10544
- * pointHas('z'); //=> false
10545
- */
10546
-
10547
- var has$3 =
10548
- /*#__PURE__*/
10549
- _curry2(function has(prop, obj) {
10550
- return hasPath$1([prop], obj);
10551
- });
10552
-
10553
- var has$4 = has$3;
10554
-
10555
10400
  /**
10556
10401
  * Returns `true` if the specified value is equal, in [`R.equals`](#equals)
10557
10402
  * terms, to at least one element of the given list; `false` otherwise.
@@ -11184,20 +11029,20 @@ styleInject(css_248z$g);
11184
11029
  var ConfigFetcher =
11185
11030
  /*#__PURE__*/
11186
11031
  function (_React$Component) {
11187
- _inherits$2(ConfigFetcher, _React$Component);
11032
+ _inherits(ConfigFetcher, _React$Component);
11188
11033
 
11189
11034
  function ConfigFetcher() {
11190
11035
  var _getPrototypeOf2;
11191
11036
 
11192
11037
  var _this;
11193
11038
 
11194
- _classCallCheck$2(this, ConfigFetcher);
11039
+ _classCallCheck(this, ConfigFetcher);
11195
11040
 
11196
11041
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11197
11042
  args[_key] = arguments[_key];
11198
11043
  }
11199
11044
 
11200
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(ConfigFetcher)).call.apply(_getPrototypeOf2, [this].concat(args)));
11045
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ConfigFetcher)).call.apply(_getPrototypeOf2, [this].concat(args)));
11201
11046
 
11202
11047
  _defineProperty(_assertThisInitialized(_this), "state", {
11203
11048
  gotConfig: false
@@ -11206,19 +11051,25 @@ function (_React$Component) {
11206
11051
  return _this;
11207
11052
  }
11208
11053
 
11209
- _createClass$2(ConfigFetcher, [{
11054
+ _createClass(ConfigFetcher, [{
11210
11055
  key: "componentDidMount",
11211
11056
  value: function () {
11212
11057
  var _componentDidMount = _asyncToGenerator(
11213
11058
  /*#__PURE__*/
11214
11059
  regenerator.mark(function _callee() {
11215
- var config;
11060
+ var _window$toolkitEnv, _window$toolkitEnv2;
11061
+
11062
+ var isCoreApp, configUri, config;
11216
11063
  return regenerator.wrap(function _callee$(_context) {
11217
11064
  while (1) {
11218
11065
  switch (_context.prev = _context.next) {
11219
11066
  case 0:
11220
- if (!(global.IS_CORE_APP && (isCoreRoute || isAuthRoute) && !storage$1.isAuthenticated)) {
11221
- _context.next = 2;
11067
+ // If it is the core app and we are on a core route or auth route
11068
+ // and the user is not authenticated, don't fetch config.
11069
+ 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;
11070
+
11071
+ if (!(isCoreApp && (isCoreRoute || isAuthRoute) && !storage$1.isAuthenticated)) {
11072
+ _context.next = 3;
11222
11073
  break;
11223
11074
  }
11224
11075
 
@@ -11228,16 +11079,17 @@ function (_React$Component) {
11228
11079
  };
11229
11080
  }));
11230
11081
 
11231
- case 2:
11232
- _context.next = 4;
11233
- return fetcher.getConfig(process.env.CONFIG_URI);
11082
+ case 3:
11083
+ configUri = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.CONFIG_URI) ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
11084
+ _context.next = 6;
11085
+ return fetcher.getConfig(configUri);
11234
11086
 
11235
- case 4:
11087
+ case 6:
11236
11088
  config = _context.sent;
11237
11089
  storage$1.setItem('config', config);
11238
11090
 
11239
11091
  if (config.instanaKey) {
11240
- window.setUpInstana(config.instanaKey);
11092
+ window.setUpInstana(config.instanaKey, isCoreApp);
11241
11093
  }
11242
11094
 
11243
11095
  this.setState(function (state) {
@@ -11246,7 +11098,7 @@ function (_React$Component) {
11246
11098
  };
11247
11099
  });
11248
11100
 
11249
- case 8:
11101
+ case 10:
11250
11102
  case "end":
11251
11103
  return _context.stop();
11252
11104
  }
@@ -11280,220 +11132,6 @@ function (_React$Component) {
11280
11132
  return ConfigFetcher;
11281
11133
  }(React__namespace.Component);
11282
11134
 
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
-
11497
11135
  var getClassName = createCommonjsModule(function (module, exports) {
11498
11136
 
11499
11137
  Object.defineProperty(exports, "__esModule", {
@@ -21926,20 +21564,20 @@ var initialState = {
21926
21564
  var FeedbackDialog =
21927
21565
  /*#__PURE__*/
21928
21566
  function (_React$PureComponent) {
21929
- _inherits$2(FeedbackDialog, _React$PureComponent);
21567
+ _inherits(FeedbackDialog, _React$PureComponent);
21930
21568
 
21931
21569
  function FeedbackDialog() {
21932
21570
  var _getPrototypeOf2;
21933
21571
 
21934
21572
  var _this;
21935
21573
 
21936
- _classCallCheck$2(this, FeedbackDialog);
21574
+ _classCallCheck(this, FeedbackDialog);
21937
21575
 
21938
21576
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21939
21577
  args[_key] = arguments[_key];
21940
21578
  }
21941
21579
 
21942
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(FeedbackDialog)).call.apply(_getPrototypeOf2, [this].concat(args)));
21580
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FeedbackDialog)).call.apply(_getPrototypeOf2, [this].concat(args)));
21943
21581
 
21944
21582
  _defineProperty(_assertThisInitialized(_this), "state", _objectSpread2({}, initialState));
21945
21583
 
@@ -22042,7 +21680,7 @@ function (_React$PureComponent) {
22042
21680
  return _this;
22043
21681
  }
22044
21682
 
22045
- _createClass$2(FeedbackDialog, [{
21683
+ _createClass(FeedbackDialog, [{
22046
21684
  key: "componentDidMount",
22047
21685
  value: function componentDidMount() {
22048
21686
  // NOTE: To clear out previous state.
@@ -22184,7 +21822,7 @@ var LogOutMenu = function LogOutMenu(_ref) {
22184
21822
  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";
22185
21823
  styleInject(css_248z$b);
22186
21824
 
22187
- var _styleModuleImportMap$6 = {
21825
+ var _styleModuleImportMap$2 = {
22188
21826
  "./CopartLogo.css": {
22189
21827
  "CopartLogo": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogo",
22190
21828
  "CopartLogoNew": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--CopartLogoNew",
@@ -22200,7 +21838,7 @@ var CopartLogo = function CopartLogo() {
22200
21838
  href: "/"
22201
21839
  }, React__namespace.createElement("img", {
22202
21840
  src: imageSrc,
22203
- className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$6, {
21841
+ className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$2, {
22204
21842
  "handleMissingStyleName": "warn"
22205
21843
  })
22206
21844
  }));
@@ -22236,7 +21874,7 @@ var FeedbackButton = function FeedbackButton(props) {
22236
21874
  }));
22237
21875
  };
22238
21876
 
22239
- var _styleModuleImportMap$5 = {
21877
+ var _styleModuleImportMap$1 = {
22240
21878
  "../AppBar.css": {
22241
21879
  "root": "utilities_ops-app-frame_AppBarComponent_AppBar--root",
22242
21880
  "leftItems": "utilities_ops-app-frame_AppBarComponent_AppBar--leftItems",
@@ -22367,7 +22005,7 @@ var PhoneStatus = function PhoneStatus(_ref3) {
22367
22005
  onClick: function onClick() {
22368
22006
  if (!phoneStatusProcessing) togglePhoneAvailability();
22369
22007
  },
22370
- className: _getClassName(getPhoneStatusStyle(phoneStatus, theme), _styleModuleImportMap$5, {
22008
+ className: _getClassName(getPhoneStatusStyle(phoneStatus, theme), _styleModuleImportMap$1, {
22371
22009
  "handleMissingStyleName": "warn"
22372
22010
  })
22373
22011
  }, phoneStatus === PHONE_STATUS.Available ? React__default["default"].createElement(PhoneAvailableIcon, {
@@ -22489,7 +22127,7 @@ var defaultAutoSelectProps$1 = {
22489
22127
  },
22490
22128
  width: 200
22491
22129
  };
22492
- var printerFields$1 = [_objectSpread2({}, defaultAutoSelectProps$1, {
22130
+ var printerFields = [_objectSpread2({}, defaultAutoSelectProps$1, {
22493
22131
  name: 'barcode_label_printers',
22494
22132
  label: 'Bar Code Printer'
22495
22133
  }), _objectSpread2({}, defaultAutoSelectProps$1, {
@@ -22510,11 +22148,11 @@ var css_248z$9 = ".utilities_ops-app-frame_AppBarComponent_Settings_PrinterSetti
22510
22148
  styleInject(css_248z$9);
22511
22149
 
22512
22150
  // Properly populate printer options before feeding to autoselect
22513
- var getPrinterOptions$1 = function getPrinterOptions(printers) {
22151
+ var getPrinterOptions = function getPrinterOptions(printers) {
22514
22152
  return Array.isArray(printers) ? printers : [];
22515
22153
  };
22516
22154
 
22517
- var AUTO_SELECT_STYLE$1 = {
22155
+ var AUTO_SELECT_STYLE = {
22518
22156
  rowHeight: 40,
22519
22157
  optionsMinHeight: 200
22520
22158
  };
@@ -22522,20 +22160,20 @@ var AUTO_SELECT_STYLE$1 = {
22522
22160
  var PrinterSettings =
22523
22161
  /*#__PURE__*/
22524
22162
  function (_React$Component) {
22525
- _inherits$2(PrinterSettings, _React$Component);
22163
+ _inherits(PrinterSettings, _React$Component);
22526
22164
 
22527
22165
  function PrinterSettings() {
22528
22166
  var _getPrototypeOf2;
22529
22167
 
22530
22168
  var _this;
22531
22169
 
22532
- _classCallCheck$2(this, PrinterSettings);
22170
+ _classCallCheck(this, PrinterSettings);
22533
22171
 
22534
22172
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22535
22173
  args[_key] = arguments[_key];
22536
22174
  }
22537
22175
 
22538
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(PrinterSettings)).call.apply(_getPrototypeOf2, [this].concat(args)));
22176
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(PrinterSettings)).call.apply(_getPrototypeOf2, [this].concat(args)));
22539
22177
 
22540
22178
  _defineProperty(_assertThisInitialized(_this), "setPrinter", function (name) {
22541
22179
  return function (value) {
@@ -22546,7 +22184,7 @@ function (_React$Component) {
22546
22184
  return _this;
22547
22185
  }
22548
22186
 
22549
- _createClass$2(PrinterSettings, [{
22187
+ _createClass(PrinterSettings, [{
22550
22188
  key: "render",
22551
22189
  value: function render() {
22552
22190
  var _this2 = this;
@@ -22557,9 +22195,9 @@ function (_React$Component) {
22557
22195
  if (!printersData) return null;
22558
22196
  return React__namespace.createElement("div", {
22559
22197
  className: "col-1-1 utilities_ops-app-frame_AppBarComponent_Settings_PrinterSettings_PrinterSettings--PrinterSettings"
22560
- }, printerFields$1.map(function (printer) {
22198
+ }, printerFields.map(function (printer) {
22561
22199
  var name = printer.name || '';
22562
- var printers = getPrinterOptions$1(printersData[name]);
22200
+ var printers = getPrinterOptions(printersData[name]);
22563
22201
  return React__namespace.createElement("div", {
22564
22202
  key: name,
22565
22203
  className: "utilities_ops-app-frame_AppBarComponent_Settings_PrinterSettings_PrinterSettings--col-1-5"
@@ -22569,7 +22207,7 @@ function (_React$Component) {
22569
22207
  name: name,
22570
22208
  value: _this2.props.activePrinters[name],
22571
22209
  onChange: _this2.props.setPrinterData(name),
22572
- optionStyleProps: AUTO_SELECT_STYLE$1,
22210
+ optionStyleProps: AUTO_SELECT_STYLE,
22573
22211
  options: printers.map(function (data) {
22574
22212
  return data.printer_name;
22575
22213
  }),
@@ -22843,20 +22481,20 @@ var setYardOptions = function setYardOptions(self) {
22843
22481
  var YardNumberContainer =
22844
22482
  /*#__PURE__*/
22845
22483
  function (_React$Component) {
22846
- _inherits$2(YardNumberContainer, _React$Component);
22484
+ _inherits(YardNumberContainer, _React$Component);
22847
22485
 
22848
22486
  function YardNumberContainer() {
22849
22487
  var _getPrototypeOf2;
22850
22488
 
22851
22489
  var _this;
22852
22490
 
22853
- _classCallCheck$2(this, YardNumberContainer);
22491
+ _classCallCheck(this, YardNumberContainer);
22854
22492
 
22855
22493
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22856
22494
  args[_key] = arguments[_key];
22857
22495
  }
22858
22496
 
22859
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(YardNumberContainer)).call.apply(_getPrototypeOf2, [this].concat(args)));
22497
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YardNumberContainer)).call.apply(_getPrototypeOf2, [this].concat(args)));
22860
22498
 
22861
22499
  _defineProperty(_assertThisInitialized(_this), "state", {
22862
22500
  yardOptions: {}
@@ -22869,7 +22507,7 @@ function (_React$Component) {
22869
22507
  return _this;
22870
22508
  }
22871
22509
 
22872
- _createClass$2(YardNumberContainer, [{
22510
+ _createClass(YardNumberContainer, [{
22873
22511
  key: "componentWillMount",
22874
22512
  value: function componentWillMount() {
22875
22513
  var _this$props = this.props,
@@ -23051,20 +22689,20 @@ var formatPhoneNumber = function formatPhoneNumber() {
23051
22689
  return "".concat(formattedNumber, " * ").concat(extension);
23052
22690
  };
23053
22691
 
23054
- var EMPTY_PRINTERS$3 = {
22692
+ var EMPTY_PRINTERS$2 = {
23055
22693
  barcode_label_printers: '',
23056
22694
  check_printers: '',
23057
22695
  standard_printers: '',
23058
22696
  windshield_label_printers: '',
23059
22697
  text_printers: ''
23060
22698
  };
23061
- var isDefault$1 = propEq$1('is_default', true);
22699
+ var isDefault = propEq$1('is_default', true);
23062
22700
 
23063
- var findFirstDefault$1 = function findFirstDefault(printers) {
23064
- return nth$1(0, filter$1(isDefault$1, printers));
22701
+ var findFirstDefault = function findFirstDefault(printers) {
22702
+ return nth$1(0, filter$1(isDefault, printers));
23065
22703
  };
23066
22704
 
23067
- var getValuesArray$1 = function getValuesArray(final, _ref) {
22705
+ var getValuesArray = function getValuesArray(final, _ref) {
23068
22706
  var _ref2 = _slicedToArray(_ref, 2),
23069
22707
  label = _ref2[0],
23070
22708
  printers = _ref2[1];
@@ -23073,66 +22711,66 @@ var getValuesArray$1 = function getValuesArray(final, _ref) {
23073
22711
  return final;
23074
22712
  };
23075
22713
 
23076
- var pluckDefault$1 = function pluckDefault(final, _ref3) {
22714
+ var pluckDefault = function pluckDefault(final, _ref3) {
23077
22715
  var _ref4 = _slicedToArray(_ref3, 2),
23078
22716
  label = _ref4[0],
23079
22717
  printers = _ref4[1];
23080
22718
 
23081
- final[label] = propOr$1('', 'printer_name')(findFirstDefault$1(printers));
22719
+ final[label] = propOr$1('', 'printer_name')(findFirstDefault(printers));
23082
22720
  return final;
23083
22721
  };
23084
22722
 
23085
- var sessionOrDefault$1 = function sessionOrDefault(label) {
22723
+ var sessionOrDefault = function sessionOrDefault(label) {
23086
22724
  return function () {
23087
22725
  var printer_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
23088
22726
  var sessionDashboard = storage$1.getSessionItem('dashboard');
23089
- sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS$3;
22727
+ sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS$2;
23090
22728
  var printerName = sessionDashboard.printers[label];
23091
22729
  return !isEmpty$2(printerName) ? printerName : printer_name;
23092
22730
  };
23093
22731
  };
23094
22732
 
23095
- var chooseActive$1 = function chooseActive(final, _ref5) {
22733
+ var chooseActive = function chooseActive(final, _ref5) {
23096
22734
  var _ref6 = _slicedToArray(_ref5, 2),
23097
22735
  label = _ref6[0],
23098
22736
  printer_name = _ref6[1];
23099
22737
 
23100
22738
  return append$1({
23101
- printer_name: sessionOrDefault$1(label)(printer_name),
22739
+ printer_name: sessionOrDefault(label)(printer_name),
23102
22740
  label: label
23103
22741
  }, final);
23104
22742
  };
23105
22743
 
23106
- var reduceToObject$1 = function reduceToObject(reducer) {
22744
+ var reduceToObject = function reduceToObject(reducer) {
23107
22745
  return function (target) {
23108
22746
  return reduce$1(reducer, {}, target);
23109
22747
  };
23110
22748
  };
23111
22749
 
23112
- var getActivePrinters$1 = (function (printersData) {
22750
+ var getActivePrinters = (function (printersData) {
23113
22751
  if (typeof printersData === 'string') return {};
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));
22752
+ var printers = reduceToObject(getValuesArray)(toPairs$1(printersData));
22753
+ var defaultPrinters = reduceToObject(pluckDefault)(toPairs$1(printers));
22754
+ return reduceToObject(chooseActive)(toPairs$1(defaultPrinters));
23117
22755
  });
23118
22756
 
23119
22757
  var Container =
23120
22758
  /*#__PURE__*/
23121
22759
  function (_React$Component) {
23122
- _inherits$2(Container, _React$Component);
22760
+ _inherits(Container, _React$Component);
23123
22761
 
23124
22762
  function Container() {
23125
22763
  var _getPrototypeOf2;
23126
22764
 
23127
22765
  var _this;
23128
22766
 
23129
- _classCallCheck$2(this, Container);
22767
+ _classCallCheck(this, Container);
23130
22768
 
23131
22769
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
23132
22770
  args[_key] = arguments[_key];
23133
22771
  }
23134
22772
 
23135
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));
22773
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));
23136
22774
 
23137
22775
  _defineProperty(_assertThisInitialized(_this), "state", {
23138
22776
  number: _this.props.phoneNumber.substr(1),
@@ -23244,7 +22882,7 @@ function (_React$Component) {
23244
22882
  return _this;
23245
22883
  }
23246
22884
 
23247
- _createClass$2(Container, [{
22885
+ _createClass(Container, [{
23248
22886
  key: "componentWillReceiveProps",
23249
22887
  value: function componentWillReceiveProps(newProps) {
23250
22888
  this.setStatus('idle');
@@ -23342,7 +22980,7 @@ var validator = function validator(value) {
23342
22980
  return /^\d{8}$/.test(value) ? 'Maximum digits reached.' : '';
23343
22981
  };
23344
22982
 
23345
- var EMPTY_PRINTERS$2 = {
22983
+ var EMPTY_PRINTERS$1 = {
23346
22984
  barcode_label_printers: '',
23347
22985
  check_printers: '',
23348
22986
  standard_printers: '',
@@ -23394,13 +23032,13 @@ var handleInputChange$1 = function handleInputChange(self) {
23394
23032
  if (name === 'selectedRole') {
23395
23033
  var selectedValue = value.selectedValue,
23396
23034
  option = value.option;
23397
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$2, 'printers');
23035
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
23398
23036
  return self.setState({
23399
23037
  selectedRoleOption: option,
23400
23038
  selectedRole: selectedValue
23401
23039
  });
23402
23040
  } else if (name === 'selectedYardNumber') {
23403
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$2, 'printers');
23041
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
23404
23042
  self.updatePhoneNumber(activePhoneNumber$1()); // Ensure we fetch the proper roles per the entered yard
23405
23043
 
23406
23044
  var oldSelectedYard = self.state.selectedYardNumber;
@@ -23414,7 +23052,7 @@ var handleInputChange$1 = function handleInputChange(self) {
23414
23052
 
23415
23053
  if (value !== oldSelectedYard && Boolean(value)) {
23416
23054
  self.setState({
23417
- printersData: EMPTY_PRINTERS$2
23055
+ printersData: EMPTY_PRINTERS$1
23418
23056
  });
23419
23057
  self.getActivePrinters(value, false, yardCountryCode);
23420
23058
  }
@@ -23615,18 +23253,18 @@ var selectedCountryA3code$1 = function selectedCountryA3code() {
23615
23253
  var activePrinters$1 = function activePrinters() {
23616
23254
  var _storage$getLocalItem;
23617
23255
 
23618
- return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS$2;
23256
+ return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS$1;
23619
23257
  };
23620
23258
 
23621
- var makeKeyValue$2 = function makeKeyValue(final, target) {
23259
+ var makeKeyValue$1 = function makeKeyValue(final, target) {
23622
23260
  final[target.label] = target.printer_name;
23623
23261
  return final;
23624
23262
  };
23625
23263
 
23626
- var formatActivePrintersForState$2 = function formatActivePrintersForState() {
23264
+ var formatActivePrintersForState$1 = function formatActivePrintersForState() {
23627
23265
  var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
23628
23266
  var printers = Array.isArray(activePrinters) ? activePrinters : [];
23629
- return printers.reduce(makeKeyValue$2, {});
23267
+ return printers.reduce(makeKeyValue$1, {});
23630
23268
  };
23631
23269
 
23632
23270
  var activePhoneNumber$1 = function activePhoneNumber() {
@@ -23648,20 +23286,20 @@ var filterRoles$2 = function filterRoles(roles, countryCode) {
23648
23286
  var SettingsView$1 =
23649
23287
  /*#__PURE__*/
23650
23288
  function (_React$Component) {
23651
- _inherits$2(SettingsView, _React$Component);
23289
+ _inherits(SettingsView, _React$Component);
23652
23290
 
23653
23291
  function SettingsView() {
23654
23292
  var _getPrototypeOf2;
23655
23293
 
23656
23294
  var _this;
23657
23295
 
23658
- _classCallCheck$2(this, SettingsView);
23296
+ _classCallCheck(this, SettingsView);
23659
23297
 
23660
23298
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
23661
23299
  args[_key] = arguments[_key];
23662
23300
  }
23663
23301
 
23664
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(SettingsView)).call.apply(_getPrototypeOf2, [this].concat(args)));
23302
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SettingsView)).call.apply(_getPrototypeOf2, [this].concat(args)));
23665
23303
 
23666
23304
  _defineProperty(_assertThisInitialized(_this), "state", _objectSpread2({
23667
23305
  phoneNumber: activePhoneNumber$1(),
@@ -23673,10 +23311,10 @@ function (_React$Component) {
23673
23311
  selectedCurrency: selectedCurrency(),
23674
23312
  roles: [],
23675
23313
  selectedRole: frontEndUtils.regex.beautifyRoleText(storage$1.userRole),
23676
- printersData: EMPTY_PRINTERS$2,
23314
+ printersData: EMPTY_PRINTERS$1,
23677
23315
  loadingPrinters: false,
23678
23316
  oldActivePrinters: null
23679
- }, EMPTY_PRINTERS$2));
23317
+ }, EMPTY_PRINTERS$1));
23680
23318
 
23681
23319
  _defineProperty(_assertThisInitialized(_this), "fetchRoles", function (countryCode) {
23682
23320
  fetcher.getUserRoles(countryCode).then(function (_roles) {
@@ -23741,8 +23379,8 @@ function (_React$Component) {
23741
23379
  oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters$1()) : _this.state.oldActivePrinters
23742
23380
  }));
23743
23381
  } else {
23744
- response = getActivePrinters$1(printersData);
23745
- fromatted = formatActivePrintersForState$2(response);
23382
+ response = getActivePrinters(printersData);
23383
+ fromatted = formatActivePrintersForState$1(response);
23746
23384
 
23747
23385
  _this.setState(_objectSpread2({
23748
23386
  oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, fromatted) : _this.state.oldActivePrinters
@@ -23783,7 +23421,7 @@ function (_React$Component) {
23783
23421
  return _this;
23784
23422
  }
23785
23423
 
23786
- _createClass$2(SettingsView, [{
23424
+ _createClass(SettingsView, [{
23787
23425
  key: "componentWillMount",
23788
23426
  value: function componentWillMount() {
23789
23427
  var _this2 = this;
@@ -24051,7 +23689,7 @@ var YardNumberMenu = function YardNumberMenu(_ref) {
24051
23689
  })));
24052
23690
  };
24053
23691
 
24054
- var EMPTY_PRINTERS$1 = {
23692
+ var EMPTY_PRINTERS = {
24055
23693
  barcode_label_printers: '',
24056
23694
  check_printers: '',
24057
23695
  standard_printers: '',
@@ -24101,7 +23739,7 @@ var handleInputChange = function handleInputChange(self) {
24101
23739
  }
24102
23740
 
24103
23741
  selectedValue = value.selectedValue, option = value.option;
24104
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
23742
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24105
23743
  roleName = option && option.roleName || ''; //pathOr('', ['selectedRoleOption', 'roleName'], nextState)
24106
23744
 
24107
23745
  isValidRole = self.state.roles.find(function (role) {
@@ -24122,8 +23760,8 @@ var handleInputChange = function handleInputChange(self) {
24122
23760
  hierarchies: hierarchies,
24123
23761
  selectedHierarchyOption: null,
24124
23762
  selectedYardNumber: null,
24125
- printersData: EMPTY_PRINTERS$1
24126
- }, EMPTY_PRINTERS$1));
23763
+ printersData: EMPTY_PRINTERS
23764
+ }, EMPTY_PRINTERS));
24127
23765
 
24128
23766
  case 10:
24129
23767
  return _context.abrupt("return", self.setState({
@@ -24137,7 +23775,7 @@ var handleInputChange = function handleInputChange(self) {
24137
23775
  break;
24138
23776
  }
24139
23777
 
24140
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
23778
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24141
23779
  country = value.country, _value$yard = value.yard, yard = _value$yard === void 0 ? null : _value$yard;
24142
23780
  countryId = country && country.split('-')[0];
24143
23781
 
@@ -24179,8 +23817,8 @@ var handleInputChange = function handleInputChange(self) {
24179
23817
  level: yard ? 'yard' : 'country'
24180
23818
  },
24181
23819
  selectedYardNumber: yard,
24182
- printersData: EMPTY_PRINTERS$1
24183
- }, EMPTY_PRINTERS$1));
23820
+ printersData: EMPTY_PRINTERS
23821
+ }, EMPTY_PRINTERS));
24184
23822
 
24185
23823
  case 30:
24186
23824
  _context.next = 43;
@@ -24192,7 +23830,7 @@ var handleInputChange = function handleInputChange(self) {
24192
23830
  break;
24193
23831
  }
24194
23832
 
24195
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
23833
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24196
23834
 
24197
23835
  if (!(value !== self.state.selectedYardNumber && Boolean(value))) {
24198
23836
  _context.next = 42;
@@ -24218,8 +23856,8 @@ var handleInputChange = function handleInputChange(self) {
24218
23856
  return _context.abrupt("return", self.setState(function (state) {
24219
23857
  return _objectSpread2({
24220
23858
  selectedYardNumber: value,
24221
- printersData: EMPTY_PRINTERS$1
24222
- }, EMPTY_PRINTERS$1);
23859
+ printersData: EMPTY_PRINTERS
23860
+ }, EMPTY_PRINTERS);
24223
23861
  }));
24224
23862
 
24225
23863
  case 43:
@@ -24401,18 +24039,18 @@ var selectedCountryA3code = function selectedCountryA3code() {
24401
24039
  };
24402
24040
 
24403
24041
  var activePrinters = function activePrinters() {
24404
- return storage$1.getLocalItem('dashboard', 'printers') || EMPTY_PRINTERS$1;
24042
+ return storage$1.getLocalItem('dashboard', 'printers') || EMPTY_PRINTERS;
24405
24043
  };
24406
24044
 
24407
- var makeKeyValue$1 = function makeKeyValue(final, target) {
24045
+ var makeKeyValue = function makeKeyValue(final, target) {
24408
24046
  final[target.label] = target.printer_name;
24409
24047
  return final;
24410
24048
  };
24411
24049
 
24412
- var formatActivePrintersForState$1 = function formatActivePrintersForState() {
24050
+ var formatActivePrintersForState = function formatActivePrintersForState() {
24413
24051
  var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
24414
24052
  var printers = Array.isArray(activePrinters) ? activePrinters : [];
24415
- return printers.reduce(makeKeyValue$1, {});
24053
+ return printers.reduce(makeKeyValue, {});
24416
24054
  };
24417
24055
 
24418
24056
  var activePhoneNumber = function activePhoneNumber() {
@@ -24481,20 +24119,20 @@ var filterRoles = function filterRoles(roles, invalidCodes) {
24481
24119
  var SettingsView =
24482
24120
  /*#__PURE__*/
24483
24121
  function (_React$Component) {
24484
- _inherits$2(SettingsView, _React$Component);
24122
+ _inherits(SettingsView, _React$Component);
24485
24123
 
24486
24124
  function SettingsView() {
24487
24125
  var _getPrototypeOf2;
24488
24126
 
24489
24127
  var _this;
24490
24128
 
24491
- _classCallCheck$2(this, SettingsView);
24129
+ _classCallCheck(this, SettingsView);
24492
24130
 
24493
24131
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24494
24132
  args[_key] = arguments[_key];
24495
24133
  }
24496
24134
 
24497
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(SettingsView)).call.apply(_getPrototypeOf2, [this].concat(args)));
24135
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SettingsView)).call.apply(_getPrototypeOf2, [this].concat(args)));
24498
24136
 
24499
24137
  _defineProperty(_assertThisInitialized(_this), "state", _objectSpread2({
24500
24138
  phoneNumber: activePhoneNumber(),
@@ -24506,9 +24144,9 @@ function (_React$Component) {
24506
24144
  selectedHierarchyOption: storage$1.getLocalItem('settings', 'selectedHierarchyOption'),
24507
24145
  roles: [],
24508
24146
  hierarchies: [],
24509
- printersData: EMPTY_PRINTERS$1,
24147
+ printersData: EMPTY_PRINTERS,
24510
24148
  oldActivePrinters: null
24511
- }, EMPTY_PRINTERS$1));
24149
+ }, EMPTY_PRINTERS));
24512
24150
 
24513
24151
  _defineProperty(_assertThisInitialized(_this), "getRCAvailability",
24514
24152
  /*#__PURE__*/
@@ -24580,8 +24218,8 @@ function (_React$Component) {
24580
24218
  oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters()) : _this.state.oldActivePrinters
24581
24219
  }));
24582
24220
  } else {
24583
- _activePrinters = getActivePrinters$1(printersData);
24584
- update = formatActivePrintersForState$1(_activePrinters);
24221
+ _activePrinters = getActivePrinters(printersData);
24222
+ update = formatActivePrintersForState(_activePrinters);
24585
24223
 
24586
24224
  _this.setState(_objectSpread2({
24587
24225
  oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, update) : _this.state.oldActivePrinters
@@ -24620,7 +24258,7 @@ function (_React$Component) {
24620
24258
  return _this;
24621
24259
  }
24622
24260
 
24623
- _createClass$2(SettingsView, [{
24261
+ _createClass(SettingsView, [{
24624
24262
  key: "componentWillMount",
24625
24263
  value: function () {
24626
24264
  var _componentWillMount = _asyncToGenerator(
@@ -24770,7 +24408,7 @@ function (_React$Component) {
24770
24408
  return SettingsView;
24771
24409
  }(React__default["default"].Component);
24772
24410
 
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}";
24411
+ var css_248z$6 = ".utilities_ops-announcements_Banner--appBarContentBox {\r\n word-break: break-all;\r\n white-space: pre-wrap;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContent {\r\n padding: 0px 5px;\r\n font-size: 13px;\r\n width: 95%;\r\n display: flex;\r\n align-items: end;\r\n grid-gap: 20px;\r\n gap: 20px\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n width: 90%;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n font-weight: 600;\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n color: #201F1E;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 3;\r\n overflow: hidden;\r\n width: 95%;\r\n font-weight: 600;\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n font-size: 12px;\r\n margin-bottom: 5px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox i{\r\n font-size: 16px !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i{\r\n position: relative;\r\n right: -4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer {\r\n display: flex;\r\n flex-direction: row;\r\n padding: 10px 10px;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n min-height: 40px;\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer i{\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer i{\r\n font-size: 16px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\r\n flex-direction: column;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 13px solid white;\r\n position: absolute;\r\n top: 51px;\r\n right: 50px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding: 0px 5px;\r\n font-size: 12px;\r\n flex: 1 1 0%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 4px;\r\n gap: 4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper b{\r\n color: #171717;\r\n}";
24774
24412
  styleInject(css_248z$6);
24775
24413
 
24776
24414
  var moment = createCommonjsModule(function (module, exports) {
@@ -35784,7 +35422,7 @@ var alertToIconMapping = {
35784
35422
  success: 'Accept'
35785
35423
  };
35786
35424
 
35787
- var Actions$1 = function Actions(_ref) {
35425
+ var Actions = function Actions(_ref) {
35788
35426
  var onLeftButtonClick = _ref.onLeftButtonClick,
35789
35427
  count = _ref.count,
35790
35428
  current = _ref.current,
@@ -35820,21 +35458,25 @@ var Actions$1 = function Actions(_ref) {
35820
35458
  }))));
35821
35459
  };
35822
35460
 
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;
35461
+ var Banner = function Banner(props) {
35462
+ var count = props.count,
35463
+ current = props.current,
35464
+ showNavButtons = props.showNavButtons,
35465
+ onLeftButtonClick = props.onLeftButtonClick,
35466
+ onRightButtonClick = props.onRightButtonClick,
35467
+ saveActionComponentState = props.saveActionComponentState,
35468
+ ActionComponent = props.ActionComponent,
35469
+ notification = _objectWithoutProperties(props, ["count", "current", "showNavButtons", "onLeftButtonClick", "onRightButtonClick", "saveActionComponentState", "ActionComponent"]);
35470
+
35471
+ var dismissibleFlag = notification.dismissibleFlag,
35472
+ onDismiss = notification.onDismiss,
35473
+ startsAt = notification.startsAt,
35474
+ timeZoneType = notification.timeZoneType,
35475
+ showSideBar = notification.showSideBar,
35476
+ action = notification.action,
35477
+ content = notification.content,
35478
+ sourceApplication = notification.sourceApplication,
35479
+ categoryDescription = notification.categoryDescription;
35838
35480
  var contentBarRef = React__default["default"].useRef(null);
35839
35481
 
35840
35482
  var _React$useState = React__default["default"].useState('false'),
@@ -35865,14 +35507,20 @@ var Banner = function Banner(_ref2) {
35865
35507
  style: {
35866
35508
  backgroundColor: alertBackgroundColorMapping[categoryDescription.toLowerCase()]
35867
35509
  }
35868
- }, showNavButtons && React__default["default"].createElement(Actions$1, {
35510
+ }, showNavButtons && React__default["default"].createElement(Actions, {
35869
35511
  onLeftButtonClick: onLeftButtonClick,
35870
35512
  count: count,
35871
35513
  current: current,
35872
35514
  onRightButtonClick: onRightButtonClick
35873
35515
  }), React__default["default"].createElement("div", {
35874
- className: "utilities_ops-announcements_Banner--notificationBarContent"
35875
- }, React__default["default"].createElement("div", {
35516
+ className: "utilities_ops-announcements_Banner--notificationBarContent",
35517
+ style: expanded ? {
35518
+ flexDirection: 'column',
35519
+ alignItems: 'flex-start'
35520
+ } : {
35521
+ flexDirection: 'row'
35522
+ }
35523
+ }, React__default["default"].createElement("div", null, React__default["default"].createElement("div", {
35876
35524
  className: "utilities_ops-announcements_Banner--notificationInfoBox"
35877
35525
  }, React__default["default"].createElement("div", null, React__default["default"].createElement(coreComponents.Icon, {
35878
35526
  name: alertToIconMapping[categoryDescription.toLowerCase()],
@@ -35889,7 +35537,14 @@ var Banner = function Banner(_ref2) {
35889
35537
  style: _objectSpread2({}, expanded && {
35890
35538
  WebkitLineClamp: 'unset'
35891
35539
  })
35892
- })), isContentOverFlow && React__default["default"].createElement("div", {
35540
+ })), action && ActionComponent && React__default["default"].createElement("div", {
35541
+ style: {
35542
+ minWidth: '20%'
35543
+ }
35544
+ }, React__default["default"].createElement(ActionComponent, {
35545
+ notification: notification,
35546
+ saveActionComponentState: saveActionComponentState
35547
+ }))), isContentOverFlow && React__default["default"].createElement("div", {
35893
35548
  style: {
35894
35549
  cursor: 'pointer'
35895
35550
  },
@@ -35938,7 +35593,10 @@ var Banner = function Banner(_ref2) {
35938
35593
  dangerouslySetInnerHTML: {
35939
35594
  __html: content
35940
35595
  }
35941
- })), dismissibleFlag && React__default["default"].createElement("div", {
35596
+ }), action && ActionComponent && React__default["default"].createElement("div", null, React__default["default"].createElement(ActionComponent, {
35597
+ notification: notification,
35598
+ saveActionComponentState: saveActionComponentState
35599
+ }))), dismissibleFlag && React__default["default"].createElement("div", {
35942
35600
  style: {
35943
35601
  cursor: 'pointer',
35944
35602
  marginLeft: 'auto',
@@ -35974,7 +35632,7 @@ var Banner = function Banner(_ref2) {
35974
35632
  fontSize: '16px',
35975
35633
  color: alertInfoColorMapping[categoryDescription.toLowerCase()]
35976
35634
  }
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, {
35635
+ })), 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, {
35978
35636
  onLeftButtonClick: onLeftButtonClick,
35979
35637
  count: count,
35980
35638
  current: current,
@@ -36019,7 +35677,14 @@ var Banner = function Banner(_ref2) {
36019
35677
  style: _objectSpread2({}, expanded && {
36020
35678
  WebkitLineClamp: 'unset'
36021
35679
  })
36022
- })));
35680
+ }), action && ActionComponent && React__default["default"].createElement("div", {
35681
+ style: {
35682
+ marginTop: '8px'
35683
+ }
35684
+ }, React__default["default"].createElement(ActionComponent, {
35685
+ notification: notification,
35686
+ saveActionComponentState: saveActionComponentState
35687
+ }))));
36023
35688
  };
36024
35689
 
36025
35690
  var mainNotificationBar = function mainNotificationBar() {
@@ -36029,11 +35694,13 @@ var Banner = function Banner(_ref2) {
36029
35694
  return mainNotificationBar();
36030
35695
  };
36031
35696
 
36032
- var Notifications$1 = function Notifications(_ref) {
35697
+ var Notifications = function Notifications(_ref) {
36033
35698
  var notifications = _ref.notifications,
36034
35699
  _onDismiss = _ref.onDismiss;
36035
35700
  _ref.children;
36036
- var showSideBar = _ref.showSideBar;
35701
+ var showSideBar = _ref.showSideBar,
35702
+ ActionComponent = _ref.ActionComponent,
35703
+ saveActionComponentState = _ref.saveActionComponentState;
36037
35704
 
36038
35705
  var _useState = React.useState(0),
36039
35706
  _useState2 = _slicedToArray(_useState, 2),
@@ -36072,7 +35739,10 @@ var Notifications$1 = function Notifications(_ref) {
36072
35739
 
36073
35740
  i === last && setI(i - 1);
36074
35741
  }
36075
- }, notification)) : null, notifications.length > 0 && showSideBar ? notifications.map(function (notification) {
35742
+ }, notification, {
35743
+ ActionComponent: ActionComponent,
35744
+ saveActionComponentState: saveActionComponentState
35745
+ })) : null, notifications.length > 0 && showSideBar ? notifications.map(function (notification) {
36076
35746
  return React__default["default"].createElement(Banner, _extends({
36077
35747
  key: notification.notificationId,
36078
35748
  current: i + 1,
@@ -36082,31 +35752,13 @@ var Notifications$1 = function Notifications(_ref) {
36082
35752
  return _onDismiss(notification);
36083
35753
  }
36084
35754
  }, notification, {
36085
- showSideBar: showSideBar
35755
+ showSideBar: showSideBar,
35756
+ ActionComponent: ActionComponent,
35757
+ saveActionComponentState: saveActionComponentState
36086
35758
  }));
36087
35759
  }) : null);
36088
35760
  };
36089
35761
 
36090
- var mandatoryKeys = ['apiKey', 'authDomain', 'databaseURL', 'projectId', 'storageBucket', 'messagingSenderId', 'appId'];
36091
- function firebaseConfigValidator (firebaseConfig) {
36092
- return not$1(either$1(isNil$1, isEmpty$2)(firebaseConfig)) && allPass$1(map$2(has$4)(mandatoryKeys))(firebaseConfig);
36093
- }
36094
-
36095
- var getFirebaseConfig = function getFirebaseConfig() {
36096
- var appConfig = storage$1.getItem('config');
36097
- return appConfig.runConfig ? appConfig.runConfig.firebaseConfig : appConfig.firebaseConfig;
36098
- };
36099
- function withFirebaseConfigCheck (Comp) {
36100
- var firebaseConfig = getFirebaseConfig();
36101
- return function (props) {
36102
- return firebaseConfigValidator(firebaseConfig) ? React__default["default"].createElement(Comp, _extends({
36103
- firebaseConfig: firebaseConfig
36104
- }, props)) : React__default["default"].createElement("div", null, props.children);
36105
- };
36106
- }
36107
-
36108
- var Notifications = withFirebaseConfigCheck(Notifications$1);
36109
-
36110
35762
  var capitalizeAndReplaceUnderscores = function capitalizeAndReplaceUnderscores(role) {
36111
35763
  return role.split('_').filter(Boolean).map(function (word) {
36112
35764
  return word[0].toUpperCase() + word.substr(1);
@@ -36121,7 +35773,7 @@ var formatRole = function formatRole(role) {
36121
35773
  return capitalizeAndReplaceUnderscores(formatUK(role));
36122
35774
  };
36123
35775
 
36124
- var _styleModuleImportMap$4 = {
35776
+ var _styleModuleImportMap = {
36125
35777
  "./AppBar.css": {
36126
35778
  "root": "utilities_ops-app-frame_AppBarComponent_AppBar--root",
36127
35779
  "leftItems": "utilities_ops-app-frame_AppBarComponent_AppBar--leftItems",
@@ -36259,12 +35911,15 @@ var generateAppBarElements = function generateAppBarElements(props, showCallout)
36259
35911
  showSettingsInAppbar = enableNewToolkitFeatures;
36260
35912
  } else if (!isAuthRoute) {
36261
35913
  if (enableNewToolkitFeatures && showSettingsMenuByTileConfig) {
35914
+ var _window$toolkitEnv;
35915
+
36262
35916
  var appTiles = coreAppConfig.tiles || [];
35917
+ 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;
36263
35918
  var appTile = appTiles.find(function (tile) {
36264
35919
  if (tile.appName) {
36265
- return tile.appName === process.env.APP_NAME;
35920
+ return tile.appName === appName;
36266
35921
  } else {
36267
- return tile.path === "/".concat(process.env.APP_NAME);
35922
+ return tile.path === "/".concat(appName);
36268
35923
  }
36269
35924
  }) || {};
36270
35925
  showSettingsInAppbar = appTile.showSettingsMenuInAppBar;
@@ -36558,6 +36213,8 @@ var notificationIconComp = function notificationIconComp(_ref3) {
36558
36213
  };
36559
36214
 
36560
36215
  var AppBar$1 = function AppBar(props) {
36216
+ var _window$toolkitEnv4;
36217
+
36561
36218
  var coreAppConfig = storage.getLocalItem('opsportal-core:config');
36562
36219
  var enableNewToolkitFeatures = coreAppConfig.enableNewToolkitFeatures,
36563
36220
  ideaNoteUri = coreAppConfig.ideaNoteUri;
@@ -36600,7 +36257,9 @@ var AppBar$1 = function AppBar(props) {
36600
36257
  title = props.title,
36601
36258
  getInnovationHubToken = props.getInnovationHubToken,
36602
36259
  notifications = props.notifications,
36603
- onDismiss = props.onDismiss;
36260
+ onDismiss = props.onDismiss,
36261
+ ActionComponent = props.ActionComponent,
36262
+ saveActionComponentState = props.saveActionComponentState;
36604
36263
 
36605
36264
  var _useWindowSize = useWindowSize(),
36606
36265
  width = _useWindowSize.width;
@@ -36669,13 +36328,16 @@ var AppBar$1 = function AppBar(props) {
36669
36328
  };
36670
36329
 
36671
36330
  var getTitle = function getTitle() {
36331
+ var _window$toolkitEnv2, _window$toolkitEnv3;
36332
+
36672
36333
  var appTiles = coreAppConfig.tiles || [];
36673
36334
  var appTile;
36335
+ 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;
36674
36336
  var matchingTiles = appTiles.filter(function (tile) {
36675
36337
  if (tile.appName) {
36676
- return tile.appName === process.env.APP_NAME;
36338
+ return tile.appName === appName;
36677
36339
  } else {
36678
- return tile.path === "/".concat(process.env.APP_NAME);
36340
+ return tile.path === "/".concat(appName);
36679
36341
  }
36680
36342
  });
36681
36343
 
@@ -36689,7 +36351,8 @@ var AppBar$1 = function AppBar(props) {
36689
36351
  }
36690
36352
 
36691
36353
  appTile = appTile || {};
36692
- return title || appTile.title || process.env.APP_TITLE;
36354
+ var appTitle = ((_window$toolkitEnv3 = window.toolkitEnv) === null || _window$toolkitEnv3 === void 0 ? void 0 : _window$toolkitEnv3.APP_TITLE) ? window.toolkitEnv.APP_TITLE : process.env.APP_TITLE;
36355
+ return title || appTile.title || appTitle;
36693
36356
  };
36694
36357
 
36695
36358
  var getNotificationWrapperWidth = function getNotificationWrapperWidth() {
@@ -36702,13 +36365,14 @@ var AppBar$1 = function AppBar(props) {
36702
36365
  }
36703
36366
  };
36704
36367
 
36368
+ var stack = ((_window$toolkitEnv4 = window.toolkitEnv) === null || _window$toolkitEnv4 === void 0 ? void 0 : _window$toolkitEnv4.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
36705
36369
  return React__default["default"].createElement("div", {
36706
36370
  "data-e2e": "cc-AppBar",
36707
36371
  className: "utilities_ops-app-frame_AppBarComponent_AppBar--root"
36708
36372
  }, React__default["default"].createElement("div", {
36709
36373
  className: "utilities_ops-app-frame_AppBarComponent_AppBar--leftItems"
36710
36374
  }, React__default["default"].createElement("div", {
36711
- className: _getClassName(enableNewToolkitFeatures ? "copartLogoNew" : "copartLogo", _styleModuleImportMap$4, {
36375
+ className: _getClassName(enableNewToolkitFeatures ? "copartLogoNew" : "copartLogo", _styleModuleImportMap, {
36712
36376
  "handleMissingStyleName": "warn"
36713
36377
  })
36714
36378
  }, React__default["default"].createElement(CopartLogo, null), !enableNewToolkitFeatures && !isAuthRoute ? React__default["default"].createElement("div", {
@@ -36763,9 +36427,9 @@ var AppBar$1 = function AppBar(props) {
36763
36427
  return setCalloutVisible(false);
36764
36428
  },
36765
36429
  isBeakVisible: false
36766
- }, React__default["default"].createElement("div", null, !process.env.STACK || process.env.STACK === 'c' ? React__default["default"].createElement(SettingsView$1, {
36430
+ }, React__default["default"].createElement("div", null, !stack || stack === 'c' ? React__default["default"].createElement(SettingsView$1, {
36767
36431
  onSave: onSave
36768
- }) : null, process.env.STACK === 'uk' ? React__default["default"].createElement(SettingsView, {
36432
+ }) : null, stack === 'uk' ? React__default["default"].createElement(SettingsView, {
36769
36433
  onSave: onSave
36770
36434
  }) : null)) : null, ideaNoteVisible && React__default["default"].createElement("div", {
36771
36435
  className: "utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer"
@@ -36821,7 +36485,9 @@ var AppBar$1 = function AppBar(props) {
36821
36485
  }, React__default["default"].createElement(Notifications, {
36822
36486
  notifications: notifications || [],
36823
36487
  onDismiss: onDismiss,
36824
- showSideBar: true
36488
+ showSideBar: true,
36489
+ ActionComponent: ActionComponent,
36490
+ saveActionComponentState: saveActionComponentState
36825
36491
  })))));
36826
36492
  };
36827
36493
  AppBar$1.defaultProps = {
@@ -36850,569 +36516,9 @@ var Flag = function Flag(props) {
36850
36516
  });
36851
36517
  };
36852
36518
 
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
-
36938
36519
  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}";
36939
36520
  styleInject(css_248z$4);
36940
36521
 
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
-
37416
36522
  /** @license React v16.13.1
37417
36523
  * react-is.production.min.js
37418
36524
  *
@@ -40300,1320 +39406,7 @@ var ReactModal = /*@__PURE__*/unwrapExports(lib);
40300
39406
 
40301
39407
  ReactModal.setAppElement('*');
40302
39408
 
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
- };
39409
+ storage$1.flexLoaded;
41617
39410
 
41618
39411
  var defaultAutoSelectProps = {
41619
39412
  optionStyleProps: {
@@ -41622,7 +39415,7 @@ var defaultAutoSelectProps = {
41622
39415
  },
41623
39416
  width: 200
41624
39417
  };
41625
- var printerFields = [_objectSpread2({}, defaultAutoSelectProps, {
39418
+ [_objectSpread2({}, defaultAutoSelectProps, {
41626
39419
  name: 'barcode_label_printers',
41627
39420
  label: 'Bar Code Printer'
41628
39421
  }), _objectSpread2({}, defaultAutoSelectProps, {
@@ -41639,217 +39432,11 @@ var printerFields = [_objectSpread2({}, defaultAutoSelectProps, {
41639
39432
  label: 'Dot Matrix Printers'
41640
39433
  })];
41641
39434
 
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
- });
39435
+ propEq$1('is_default', true);
41706
39436
 
41707
39437
  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}";
41708
39438
  styleInject(css_248z$3);
41709
39439
 
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
-
41853
39440
  var global$1 = function () {
41854
39441
  if (this) return this; // Unexpected strict mode (may happen if e.g. bundled into ESM module), be nice
41855
39442
  // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
@@ -42116,6 +39703,17 @@ function fetchG2Notifications(updateNotifications, updateAllNotificationsList) {
42116
39703
  }] : null,
42117
39704
  targets: _toConsumableArray(generateTargets(notification))
42118
39705
  };
39706
+
39707
+ if (notification.component_name) {
39708
+ notification.action = {
39709
+ componentName: notification.component_name,
39710
+ properties: notification.component_properties ? JSON.parse(notification.component_properties) : {},
39711
+ componentState: notification.component_state ? JSON.parse(notification.component_state) : {},
39712
+ status: notification.action_status,
39713
+ versionNumber: notification.component_version_number
39714
+ };
39715
+ }
39716
+
42119
39717
  return notification;
42120
39718
  });
42121
39719
  compose(updateNotifications, filterNotifications)(modifiedNotifications);
@@ -45790,6 +43388,11 @@ var version$1 = "8.10.1";
45790
43388
  firebase.registerVersion(name$1, version$1, 'app');
45791
43389
  firebase.SDK_VERSION = version$1;
45792
43390
 
43391
+ var getFirebaseConfig = function getFirebaseConfig() {
43392
+ var appConfig = storage$1.getItem('config');
43393
+ return appConfig.runConfig ? appConfig.runConfig.firebaseConfig : appConfig.firebaseConfig;
43394
+ };
43395
+
45793
43396
  var name="@firebase/database";var version="0.11.0";/**
45794
43397
  * @license
45795
43398
  * Copyright 2019 Google LLC
@@ -50050,14 +47653,15 @@ var CountryFlag = function CountryFlag() {
50050
47653
  };
50051
47654
 
50052
47655
  var AppBar = function AppBar(_ref) {
50053
- var _storage$getSessionIt, _storage$getSessionIt2;
47656
+ var _storage$getSessionIt, _window$toolkitEnv2, _storage$getSessionIt2;
50054
47657
 
50055
47658
  var history = _ref.history,
50056
47659
  setAppBarMounted = _ref.setAppBarMounted,
50057
47660
  onSettingsSaved = _ref.onSettingsSaved,
50058
47661
  showTitle = _ref.showTitle,
50059
47662
  title = _ref.title,
50060
- pathname = _ref.pathname;
47663
+ pathname = _ref.pathname,
47664
+ ActionComponent = _ref.ActionComponent;
50061
47665
  SETTINGS_ITEMS[0].name = storage$1.userName; // Escape hatch for forceUpdate function
50062
47666
 
50063
47667
  var _useReducer = React.useReducer(function (x) {
@@ -50068,14 +47672,14 @@ var AppBar = function AppBar(_ref) {
50068
47672
  var forceUpdate = _useReducer2[1];
50069
47673
 
50070
47674
  var _useState = React.useState(false),
50071
- _useState2 = _slicedToArray(_useState, 2),
50072
- isMounted = _useState2[0],
50073
- setMounted = _useState2[1];
47675
+ _useState2 = _slicedToArray(_useState, 2);
47676
+ _useState2[0];
47677
+ var setMounted = _useState2[1];
50074
47678
 
50075
47679
  var _useState3 = React.useState(false),
50076
- _useState4 = _slicedToArray(_useState3, 2),
50077
- isPrinterDialogOpen = _useState4[0],
50078
- setPrinterDialogOpen = _useState4[1];
47680
+ _useState4 = _slicedToArray(_useState3, 2);
47681
+ _useState4[0];
47682
+ var setPrinterDialogOpen = _useState4[1];
50079
47683
 
50080
47684
  React.useEffect(function () {
50081
47685
  setMounted(true);
@@ -50112,7 +47716,10 @@ var AppBar = function AppBar(_ref) {
50112
47716
  }
50113
47717
 
50114
47718
  if (item.key === 'settings') {
50115
- return process.env.IS_CORE_APP ? history.push('/settings') : window.location.assign('/settings');
47719
+ var _window$toolkitEnv;
47720
+
47721
+ 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;
47722
+ return isCoreApp ? history.push('/settings') : window.location.assign('/settings');
50116
47723
  }
50117
47724
 
50118
47725
  if (item.key === 'printers') {
@@ -50222,6 +47829,17 @@ var AppBar = function AppBar(_ref) {
50222
47829
  });
50223
47830
  };
50224
47831
 
47832
+ var saveActionComponentState = function saveActionComponentState(id, componentState) {
47833
+ var updatedNotifications = notifications.map(function (notification) {
47834
+ if (notification.notificationId === id) {
47835
+ notification.actionComponentState = componentState;
47836
+ }
47837
+
47838
+ return notification;
47839
+ });
47840
+ setNotifications(updatedNotifications);
47841
+ };
47842
+
50225
47843
  var selectedYard = (_storage$getSessionIt = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt === void 0 ? void 0 : _storage$getSessionIt.selectedYard;
50226
47844
  React.useEffect(function () {
50227
47845
  setNotifications([]);
@@ -50271,7 +47889,8 @@ var AppBar = function AppBar(_ref) {
50271
47889
  clearInterval(expireNotificationsInterval);
50272
47890
  };
50273
47891
  }, [notifications]);
50274
- var STACK = process.env.STACK || 'c';
47892
+ var STACK = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.STACK) ? window.toolkitEnv.STACK : process.env.STACK;
47893
+ STACK = STACK || 'c';
50275
47894
  var modifiedSettings = SETTINGS_ITEMS;
50276
47895
  modifiedSettings[0]['name'] = storage$1.userName;
50277
47896
  var _storage$chromePlugin = storage$1.chromePluginData.ringcentral,
@@ -50279,8 +47898,6 @@ var AppBar = function AppBar(_ref) {
50279
47898
  phoneStatus: '',
50280
47899
  phoneStatusProcessing: false
50281
47900
  } : _storage$chromePlugin;
50282
- var placeholderNode = document.getElementById('AppBarPlaceholderDiv');
50283
- var isAppEnabledTwilio = process.env.IS_TWILIO_ENABLED || false;
50284
47901
  return React__default["default"].createElement("div", null, React__default["default"].createElement(AppBar$1, {
50285
47902
  moduleName: "OPS PORTAL",
50286
47903
  isLoggedOn: storage$1.isAuthenticated,
@@ -50303,7 +47920,7 @@ var AppBar = function AppBar(_ref) {
50303
47920
  sendFeedback: fetcher.sendFeedback,
50304
47921
  getInnovationHubToken: fetcher.getInnovationHubToken,
50305
47922
  feedbackConfig: feedbackConfig(),
50306
- stack: process.env.STACK,
47923
+ stack: STACK,
50307
47924
  phoneStatusObject: ringcentral,
50308
47925
  togglePhoneAvailability: togglePhoneAvailability,
50309
47926
  forceUpdate: forceUpdate,
@@ -50312,17 +47929,14 @@ var AppBar = function AppBar(_ref) {
50312
47929
  title: title,
50313
47930
  history: history,
50314
47931
  notifications: notifications,
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
- }
47932
+ onDismiss: dismissNotification,
47933
+ ActionComponent: ActionComponent,
47934
+ saveActionComponentState: saveActionComponentState
50323
47935
  }), React__default["default"].createElement(Notifications, {
50324
47936
  notifications: notifications || [],
50325
- onDismiss: dismissNotification
47937
+ onDismiss: dismissNotification,
47938
+ ActionComponent: ActionComponent,
47939
+ saveActionComponentState: saveActionComponentState
50326
47940
  }));
50327
47941
  };
50328
47942
  AppBar.defaultProps = {
@@ -50342,20 +47956,20 @@ var NO_TILE_PERMISSION = 'Could not verify user access for the tile.';
50342
47956
  var AuthGuard =
50343
47957
  /*#__PURE__*/
50344
47958
  function (_React$PureComponent) {
50345
- _inherits$2(AuthGuard, _React$PureComponent);
47959
+ _inherits(AuthGuard, _React$PureComponent);
50346
47960
 
50347
47961
  function AuthGuard() {
50348
47962
  var _getPrototypeOf2;
50349
47963
 
50350
47964
  var _this;
50351
47965
 
50352
- _classCallCheck$2(this, AuthGuard);
47966
+ _classCallCheck(this, AuthGuard);
50353
47967
 
50354
47968
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50355
47969
  args[_key] = arguments[_key];
50356
47970
  }
50357
47971
 
50358
- _this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(AuthGuard)).call.apply(_getPrototypeOf2, [this].concat(args)));
47972
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(AuthGuard)).call.apply(_getPrototypeOf2, [this].concat(args)));
50359
47973
 
50360
47974
  _defineProperty(_assertThisInitialized(_this), "state", {
50361
47975
  allowAccess: 'wait',
@@ -50379,13 +47993,16 @@ function (_React$PureComponent) {
50379
47993
  return _this;
50380
47994
  }
50381
47995
 
50382
- _createClass$2(AuthGuard, [{
47996
+ _createClass(AuthGuard, [{
50383
47997
  key: "componentDidMount",
50384
47998
  value: function () {
50385
47999
  var _componentDidMount = _asyncToGenerator(
50386
48000
  /*#__PURE__*/
50387
48001
  regenerator.mark(function _callee() {
50388
- var appTile, tileConfigAccess;
48002
+ var _window$toolkitEnv;
48003
+
48004
+ var disableRestrictions, appTile, _window$toolkitEnv2, appAuthName, tileConfigAccess;
48005
+
50389
48006
  return regenerator.wrap(function _callee$(_context) {
50390
48007
  while (1) {
50391
48008
  switch (_context.prev = _context.next) {
@@ -50419,50 +48036,58 @@ function (_React$PureComponent) {
50419
48036
  return _context.abrupt("return", this.allowAccess(AUTHENTICATED_AND_ON_CORE_ROUTE));
50420
48037
 
50421
48038
  case 5:
50422
- if (!process.env.DISABLE_RESTRICTIONS) {
50423
- _context.next = 7;
48039
+ // NOTE: Temporary env variable to make sure configs don't break some apps.
48040
+ // User is authenticated and route is not login/logout, so it must
48041
+ // be a opsportal application other than opsportal-core. We now
48042
+ // need to compare yard and security access to determine what to do.
48043
+ disableRestrictions = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.DISABLE_RESTRICTIONS) ? window.toolkitEnv.DISABLE_RESTRICTIONS : process.env.DISABLE_RESTRICTIONS;
48044
+
48045
+ if (!disableRestrictions) {
48046
+ _context.next = 8;
50424
48047
  break;
50425
48048
  }
50426
48049
 
50427
48050
  return _context.abrupt("return", this.allowAccess(PASS_BECAUSE_RESTRICTIONS_DISABLED));
50428
48051
 
50429
- case 7:
50430
- _context.next = 9;
48052
+ case 8:
48053
+ _context.next = 10;
50431
48054
  return fetcher.getAppTileData();
50432
48055
 
50433
- case 9:
48056
+ case 10:
50434
48057
  appTile = _context.sent;
50435
48058
 
50436
48059
  if (appTile) {
50437
- _context.next = 15;
48060
+ _context.next = 17;
50438
48061
  break;
50439
48062
  }
50440
48063
 
50441
- if (!process.env.APP_AUTH_NAME) {
50442
- _context.next = 14;
48064
+ appAuthName = ((_window$toolkitEnv2 = window.toolkitEnv) === null || _window$toolkitEnv2 === void 0 ? void 0 : _window$toolkitEnv2.APP_AUTH_NAME) ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
48065
+
48066
+ if (!appAuthName) {
48067
+ _context.next = 16;
50443
48068
  break;
50444
48069
  }
50445
48070
 
50446
- _context.next = 14;
50447
- return fetcher.getPermissions(process.env.APP_AUTH_NAME);
48071
+ _context.next = 16;
48072
+ return fetcher.getPermissions(appAuthName);
50448
48073
 
50449
- case 14:
48074
+ case 16:
50450
48075
  return _context.abrupt("return", this.allowAccess(PATH_NOT_FOUND));
50451
48076
 
50452
- case 15:
50453
- _context.next = 17;
48077
+ case 17:
48078
+ _context.next = 19;
50454
48079
  return fetcher.getCoreAppPermissions();
50455
48080
 
50456
- case 17:
48081
+ case 19:
50457
48082
  if (!appTile.appAuthName) {
50458
- _context.next = 20;
48083
+ _context.next = 22;
50459
48084
  break;
50460
48085
  }
50461
48086
 
50462
- _context.next = 20;
48087
+ _context.next = 22;
50463
48088
  return fetcher.getPermissions(appTile.appAuthName);
50464
48089
 
50465
- case 20:
48090
+ case 22:
50466
48091
  // If there are rules, evaluate and act accordingly.
50467
48092
  tileConfigAccess = userHasAccess(appTile);
50468
48093
 
@@ -50472,7 +48097,7 @@ function (_React$PureComponent) {
50472
48097
  this.denyAccess(NO_TILE_PERMISSION);
50473
48098
  }
50474
48099
 
50475
- case 22:
48100
+ case 24:
50476
48101
  case "end":
50477
48102
  return _context.stop();
50478
48103
  }
@@ -50552,11 +48177,19 @@ var AppFrame = function AppFrame(props) {
50552
48177
  window.dispatchEvent(event);
50553
48178
  }
50554
48179
  }, [appBarMounted]);
48180
+ React.useEffect(function () {
48181
+ console.log("+++env in toolkit props=", props.env);
48182
+
48183
+ if (props.env) {
48184
+ window.toolkitEnv = props.env;
48185
+ }
48186
+ }, [props]);
50555
48187
 
50556
48188
  var authGuardProps = _objectSpread2({}, props, {
50557
48189
  setAppBarMounted: setAppBarMounted
50558
48190
  });
50559
48191
 
48192
+ console.log('+++props in frame=', props);
50560
48193
  return React__default["default"].createElement("div", {
50561
48194
  className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
50562
48195
  style: props.handleScrolling ? SCROLL : NO_SCROLL
@@ -50573,7 +48206,8 @@ var AppFrame = function AppFrame(props) {
50573
48206
  },
50574
48207
  showTitle: props.showTitle || true,
50575
48208
  title: props.appTitle,
50576
- pathname: props.location.pathname
48209
+ pathname: props.location.pathname,
48210
+ ActionComponent: props === null || props === void 0 ? void 0 : props.ActionComponent
50577
48211
  })), React__default["default"].createElement("div", {
50578
48212
  className: ""
50579
48213
  }, React__default["default"].createElement(Breadcrumbs, {