@copart/ops-tool-kit 1.12.3 → 1.12.4-alpha.1

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.
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
47
47
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
48
48
 
49
49
  const name$r = "@copart/ops-tool-kit";
50
- const version$8 = "1.12.3";
50
+ const version$8 = "1.12.4-alpha.1";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -1263,17 +1263,17 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
1263
1263
  var ReactPropTypesSecret$2 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1264
1264
  var ReactPropTypesSecret_1 = ReactPropTypesSecret$2;
1265
1265
 
1266
- var has$4 = Function.call.bind(Object.prototype.hasOwnProperty);
1266
+ var has$6 = Function.call.bind(Object.prototype.hasOwnProperty);
1267
1267
 
1268
1268
  var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
1269
1269
 
1270
- var has$3 = has$4;
1270
+ var has$5 = has$6;
1271
1271
 
1272
1272
  var printWarning$3 = function () {};
1273
1273
  if (process.env.NODE_ENV !== 'production') {
1274
1274
  var ReactPropTypesSecret = ReactPropTypesSecret$1;
1275
1275
  var loggedTypeFailures = {};
1276
- var has$2 = has$3;
1276
+ var has$4 = has$5;
1277
1277
  printWarning$3 = function (text) {
1278
1278
  var message = 'Warning: ' + text;
1279
1279
  if (typeof console !== 'undefined') {
@@ -1302,7 +1302,7 @@ if (process.env.NODE_ENV !== 'production') {
1302
1302
  function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
1303
1303
  if (process.env.NODE_ENV !== 'production') {
1304
1304
  for (var typeSpecName in typeSpecs) {
1305
- if (has$2(typeSpecs, typeSpecName)) {
1305
+ if (has$4(typeSpecs, typeSpecName)) {
1306
1306
  var error;
1307
1307
  // Prop type validation may throw. In case they do, we don't want to
1308
1308
  // fail the render phase where it didn't fail before. So we log it.
@@ -1652,7 +1652,7 @@ var factoryWithTypeCheckers = function (isValidElement, throwOnDirectAccess) {
1652
1652
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1653
1653
  }
1654
1654
  for (var key in propValue) {
1655
- if (has$3(propValue, key)) {
1655
+ if (has$5(propValue, key)) {
1656
1656
  var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
1657
1657
  if (error instanceof Error) {
1658
1658
  return error;
@@ -1683,7 +1683,7 @@ var factoryWithTypeCheckers = function (isValidElement, throwOnDirectAccess) {
1683
1683
  if (checkerResult == null) {
1684
1684
  return null;
1685
1685
  }
1686
- if (checkerResult.data && has$3(checkerResult.data, 'expectedType')) {
1686
+ if (checkerResult.data && has$5(checkerResult.data, 'expectedType')) {
1687
1687
  expectedTypes.push(checkerResult.data.expectedType);
1688
1688
  }
1689
1689
  }
@@ -1736,7 +1736,7 @@ var factoryWithTypeCheckers = function (isValidElement, throwOnDirectAccess) {
1736
1736
  var allKeys = objectAssign({}, props[propName], shapeTypes);
1737
1737
  for (var key in allKeys) {
1738
1738
  var checker = shapeTypes[key];
1739
- if (has$3(shapeTypes, key) && typeof checker !== 'function') {
1739
+ if (has$5(shapeTypes, key) && typeof checker !== 'function') {
1740
1740
  return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1741
1741
  }
1742
1742
  if (!checker) {
@@ -5302,6 +5302,9 @@ var handleHeaders = function handleHeaders(config) {
5302
5302
  if (accessToken && headers) {
5303
5303
  headers.Authorization = "bearer ".concat(accessToken);
5304
5304
  if (headers.country) headers.country || (headers.country = countryCodeFromStorage);
5305
+ if (headers.gStackCountry) {
5306
+ headers.country = headers.gStackCountry;
5307
+ }
5305
5308
  if (stack !== 'g') {
5306
5309
  headers['Content-Type'] = 'application/json';
5307
5310
  headers.countryCode || (headers.countryCode = config.imageRequest ? 'US' : countryCode);
@@ -6043,7 +6046,7 @@ var oktaLogin = /*#__PURE__*/function () {
6043
6046
  };
6044
6047
  }();
6045
6048
 
6046
- var has$1 = Object.prototype.hasOwnProperty,
6049
+ var has$3 = Object.prototype.hasOwnProperty,
6047
6050
  undef;
6048
6051
 
6049
6052
  /**
@@ -6124,7 +6127,7 @@ function querystringify(obj, prefix) {
6124
6127
  //
6125
6128
  if ('string' !== typeof prefix) prefix = '?';
6126
6129
  for (key in obj) {
6127
- if (has$1.call(obj, key)) {
6130
+ if (has$3.call(obj, key)) {
6128
6131
  value = obj[key];
6129
6132
 
6130
6133
  //
@@ -7201,6 +7204,38 @@ var prop = /*#__PURE__*/_curry2(function prop(p, obj) {
7201
7204
  });
7202
7205
  var prop$1 = prop;
7203
7206
 
7207
+ /**
7208
+ * Returns a new list by plucking the same named property off all objects in
7209
+ * the list supplied.
7210
+ *
7211
+ * `pluck` will work on
7212
+ * any [functor](https://github.com/fantasyland/fantasy-land#functor) in
7213
+ * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.
7214
+ *
7215
+ * @func
7216
+ * @memberOf R
7217
+ * @since v0.1.0
7218
+ * @category List
7219
+ * @sig Functor f => k -> f {k: v} -> f v
7220
+ * @param {Number|String} key The key name to pluck off of each object.
7221
+ * @param {Array} f The array or functor to consider.
7222
+ * @return {Array} The list of values for the given key.
7223
+ * @see R.props
7224
+ * @example
7225
+ *
7226
+ * var getAges = R.pluck('age');
7227
+ * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]
7228
+ *
7229
+ * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]
7230
+ * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}
7231
+ * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]
7232
+ * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]
7233
+ */
7234
+ var pluck = /*#__PURE__*/_curry2(function pluck(p, list) {
7235
+ return map$3(prop$1(p), list);
7236
+ });
7237
+ var pluck$1 = pluck;
7238
+
7204
7239
  /**
7205
7240
  * Returns a single item by iterating through the list, successively calling
7206
7241
  * the iterator function and passing it an accumulator value and the current
@@ -8920,6 +8955,74 @@ var forEachObjIndexed = /*#__PURE__*/_curry2(function forEachObjIndexed(fn, obj)
8920
8955
  });
8921
8956
  var forEachObjIndexed$1 = forEachObjIndexed;
8922
8957
 
8958
+ /**
8959
+ * Returns whether or not a path exists in an object. Only the object's
8960
+ * own properties are checked.
8961
+ *
8962
+ * @func
8963
+ * @memberOf R
8964
+ * @since v0.26.0
8965
+ * @category Object
8966
+ * @typedefn Idx = String | Int
8967
+ * @sig [Idx] -> {a} -> Boolean
8968
+ * @param {Array} path The path to use.
8969
+ * @param {Object} obj The object to check the path in.
8970
+ * @return {Boolean} Whether the path exists.
8971
+ * @see R.has
8972
+ * @example
8973
+ *
8974
+ * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true
8975
+ * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true
8976
+ * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false
8977
+ * R.hasPath(['a', 'b'], {}); // => false
8978
+ */
8979
+ var hasPath$1 = /*#__PURE__*/_curry2(function hasPath(_path, obj) {
8980
+ if (_path.length === 0) {
8981
+ return false;
8982
+ }
8983
+ var val = obj;
8984
+ var idx = 0;
8985
+ while (idx < _path.length) {
8986
+ if (_has(_path[idx], val)) {
8987
+ val = val[_path[idx]];
8988
+ idx += 1;
8989
+ } else {
8990
+ return false;
8991
+ }
8992
+ }
8993
+ return true;
8994
+ });
8995
+ var hasPath$2 = hasPath$1;
8996
+
8997
+ /**
8998
+ * Returns whether or not an object has an own property with the specified name
8999
+ *
9000
+ * @func
9001
+ * @memberOf R
9002
+ * @since v0.7.0
9003
+ * @category Object
9004
+ * @sig s -> {s: x} -> Boolean
9005
+ * @param {String} prop The name of the property to check for.
9006
+ * @param {Object} obj The object to query.
9007
+ * @return {Boolean} Whether the property exists.
9008
+ * @example
9009
+ *
9010
+ * const hasName = R.has('name');
9011
+ * hasName({name: 'alice'}); //=> true
9012
+ * hasName({name: 'bob'}); //=> true
9013
+ * hasName({}); //=> false
9014
+ *
9015
+ * const point = {x: 0, y: 0};
9016
+ * const pointHas = R.has(R.__, point);
9017
+ * pointHas('x'); //=> true
9018
+ * pointHas('y'); //=> true
9019
+ * pointHas('z'); //=> false
9020
+ */
9021
+ var has$1 = /*#__PURE__*/_curry2(function has(prop, obj) {
9022
+ return hasPath$2([prop], obj);
9023
+ });
9024
+ var has$2 = has$1;
9025
+
8923
9026
  /**
8924
9027
  * Returns `true` if the specified value is equal, in [`R.equals`](#equals)
8925
9028
  * terms, to at least one element of the given list; `false` otherwise.
@@ -9485,6 +9588,85 @@ var getUserScopes = /*#__PURE__*/function () {
9485
9588
  };
9486
9589
  }();
9487
9590
 
9591
+ var getCobaltUserFacilities = /*#__PURE__*/function () {
9592
+ var _ref = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(country, role) {
9593
+ var url, headers, response, facilitiesData, yardObject;
9594
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9595
+ while (1) switch (_context.prev = _context.next) {
9596
+ case 0:
9597
+ _context.prev = 0;
9598
+ url = frontEndUtils.string.substitute(storage$1.coreConfig.endpoints.allFacilitiesNew, {
9599
+ country: country.toLowerCase()
9600
+ });
9601
+ headers = _objectSpread2({
9602
+ gStackCountry: country,
9603
+ AUTHORIZATIONROLE: role
9604
+ }, storage$1.activeLanguage === 'fi' ? {
9605
+ language: 'en',
9606
+ LANGUAGECODE: 'en'
9607
+ } : {});
9608
+ _context.next = 5;
9609
+ return fetcher.get(url, {
9610
+ headers: headers
9611
+ });
9612
+ case 5:
9613
+ response = _context.sent;
9614
+ facilitiesData = response.data.data;
9615
+ yardObject = map$3(function (val) {
9616
+ return {
9617
+ yard_number: val.yard_number,
9618
+ yard_name: val.yard_name
9619
+ };
9620
+ }, facilitiesData);
9621
+ return _context.abrupt("return", yardObject);
9622
+ case 11:
9623
+ _context.prev = 11;
9624
+ _context.t0 = _context["catch"](0);
9625
+ return _context.abrupt("return", Promise.reject('Unable to fetch Facilities'));
9626
+ case 14:
9627
+ case "end":
9628
+ return _context.stop();
9629
+ }
9630
+ }, _callee, null, [[0, 11]]);
9631
+ }));
9632
+ return function getCobaltUserFacilities(_x, _x2) {
9633
+ return _ref.apply(this, arguments);
9634
+ };
9635
+ }();
9636
+
9637
+ var getCobaltUserRoles = /*#__PURE__*/function () {
9638
+ var _ref = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(country) {
9639
+ var url, _yield$fetcher$get, data;
9640
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9641
+ while (1) switch (_context.prev = _context.next) {
9642
+ case 0:
9643
+ _context.prev = 0;
9644
+ url = storage$1.coreConfig.endpoints.getRoles;
9645
+ _context.next = 4;
9646
+ return fetcher.get(url, {
9647
+ headers: _objectSpread2(_objectSpread2({}, fetcher.defaults.headers.common), {}, {
9648
+ gStackCountry: country
9649
+ })
9650
+ });
9651
+ case 4:
9652
+ _yield$fetcher$get = _context.sent;
9653
+ data = _yield$fetcher$get.data;
9654
+ return _context.abrupt("return", data);
9655
+ case 9:
9656
+ _context.prev = 9;
9657
+ _context.t0 = _context["catch"](0);
9658
+ return _context.abrupt("return", Promise.reject('Unable to fetch Roles'));
9659
+ case 12:
9660
+ case "end":
9661
+ return _context.stop();
9662
+ }
9663
+ }, _callee, null, [[0, 9]]);
9664
+ }));
9665
+ return function getCobaltUserRoles(_x) {
9666
+ return _ref.apply(this, arguments);
9667
+ };
9668
+ }();
9669
+
9488
9670
  fetcher.login = login;
9489
9671
  fetcher.oktaLogin = oktaLogin;
9490
9672
  fetcher.getConfig = getConfig;
@@ -9501,6 +9683,8 @@ fetcher.getPermissions = getPermissions;
9501
9683
  fetcher.getCoreAppPermissions = getCoreAppPermissions;
9502
9684
  fetcher.getInnovationHubToken = getInnovationHubToken;
9503
9685
  fetcher.getUserScopes = getUserScopes;
9686
+ fetcher.getCobaltUserFacilities = getCobaltUserFacilities;
9687
+ fetcher.getCobaltUserRoles = getCobaltUserRoles;
9504
9688
 
9505
9689
  var getRouteName = function getRouteName() {
9506
9690
  return window.location.pathname.split('/').splice(1)[0];
@@ -23380,6 +23564,10 @@ var spanish = {
23380
23564
  code: 'es',
23381
23565
  description: 'Spanish'
23382
23566
  };
23567
+ var finnish = {
23568
+ code: 'fi',
23569
+ description: 'Finnish'
23570
+ };
23383
23571
  var getLanguages = function getLanguages() {
23384
23572
  var selectedCountry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
23385
23573
  var stack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'c';
@@ -23421,6 +23609,10 @@ var getLanguages = function getLanguages() {
23421
23609
  en: english,
23422
23610
  es: spanish
23423
23611
  },
23612
+ FI: {
23613
+ en: english,
23614
+ fi: finnish
23615
+ },
23424
23616
  IN: {
23425
23617
  en: english
23426
23618
  },
@@ -23453,7 +23645,7 @@ var LanguageMenu = function LanguageMenu(props) {
23453
23645
  className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--col-1-1"
23454
23646
  }, /*#__PURE__*/React__default["default"].createElement(coreComponents.Select, {
23455
23647
  label: locale('Language'),
23456
- options: formatOptions(Object.values(languageOptions)),
23648
+ options: formatOptions(Object.values(languageOptions || {})),
23457
23649
  selectedOption: props.value,
23458
23650
  onChange: function onChange(e, option) {
23459
23651
  return props.handleChange(option.key);
@@ -23465,7 +23657,7 @@ var LanguageMenu = function LanguageMenu(props) {
23465
23657
  }));
23466
23658
  };
23467
23659
 
23468
- var unique = function unique(roles) {
23660
+ var unique$1 = function unique(roles) {
23469
23661
  return roles.reduce(function (final, role) {
23470
23662
  var found = final.find(function (r) {
23471
23663
  return role.roleName === r.roleName;
@@ -23477,14 +23669,14 @@ var unique = function unique(roles) {
23477
23669
  };
23478
23670
 
23479
23671
  // Sort roles based on session country
23480
- var filterRoles$4 = function filterRoles(roles) {
23481
- var filtered = unique(roles).filter(function (role) {
23672
+ var filterRoles$3 = function filterRoles(roles) {
23673
+ var filtered = unique$1(roles).filter(function (role) {
23482
23674
  return role.roleName;
23483
23675
  });
23484
23676
  var byCountry = descend$1(prop$1('countryCode'));
23485
23677
  return sort$1(byCountry, filtered);
23486
23678
  };
23487
- var RoleSelector$1 = function RoleSelector(_ref) {
23679
+ var RoleSelector$2 = function RoleSelector(_ref) {
23488
23680
  var handleChange = _ref.handleChange,
23489
23681
  value = _ref.value,
23490
23682
  roles = _ref.roles,
@@ -23497,7 +23689,7 @@ var RoleSelector$1 = function RoleSelector(_ref) {
23497
23689
  }, /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, {
23498
23690
  name: "role",
23499
23691
  label: "Role",
23500
- options: filterRoles$4(roles),
23692
+ options: filterRoles$3(roles),
23501
23693
  onChange: function onChange(value) {
23502
23694
  var selectedValue = _typeof$1(value) === 'object' ? frontEndUtils.regex.beautifyRoleText(value.roleName) : value;
23503
23695
  var option = _typeof$1(value) === 'object' ? value : null;
@@ -23528,7 +23720,7 @@ var optionStyleProps = {
23528
23720
  rowHeight: 40,
23529
23721
  optionsMinHeight: 200
23530
23722
  };
23531
- var YardNumberMenu$1 = function YardNumberMenu(_ref) {
23723
+ var YardNumberMenu$2 = function YardNumberMenu(_ref) {
23532
23724
  var selectedYard = _ref.selectedYard,
23533
23725
  name = _ref.name,
23534
23726
  handleChange = _ref.handleChange,
@@ -23634,7 +23826,7 @@ var YardNumberContainer = /*#__PURE__*/function (_React$Component) {
23634
23826
  value: function render() {
23635
23827
  var props = this.props,
23636
23828
  state = this.state;
23637
- return /*#__PURE__*/React__namespace.createElement(YardNumberMenu$1, {
23829
+ return /*#__PURE__*/React__namespace.createElement(YardNumberMenu$2, {
23638
23830
  required: true,
23639
23831
  name: "selectedYard",
23640
23832
  label: "Yard",
@@ -23726,7 +23918,7 @@ var formatPhoneNumber = function formatPhoneNumber() {
23726
23918
  return "".concat(formattedNumber, " * ").concat(extension);
23727
23919
  };
23728
23920
 
23729
- var EMPTY_PRINTERS$3 = {
23921
+ var EMPTY_PRINTERS$2 = {
23730
23922
  barcode_label_printers: '',
23731
23923
  check_printers: '',
23732
23924
  standard_printers: '',
@@ -23755,7 +23947,7 @@ var sessionOrDefault = function sessionOrDefault(label) {
23755
23947
  return function () {
23756
23948
  var printer_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
23757
23949
  var sessionDashboard = storage$1.getSessionItem('dashboard');
23758
- sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS$3;
23950
+ sessionDashboard.printers = sessionDashboard.printers || EMPTY_PRINTERS$2;
23759
23951
  var printerName = sessionDashboard.printers[label];
23760
23952
  return !isEmpty$2(printerName) ? printerName : printer_name;
23761
23953
  };
@@ -23784,14 +23976,14 @@ var getActivePrinters = (function (printersData) {
23784
23976
  var css_248z$9 = ".utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--title {\r\n font-weight: 500;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--inputRow {\r\n display: flex;\r\n width: 100%;\r\n align-items: flex-end;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--inputRow .ms-TextField-errorMessage {\r\n position: absolute;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--textField {\r\n position: relative;\r\n display: flex;\r\n align-items: flex-end;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--prefix {\r\n margin: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--testCallButton {\r\n margin-left: 12px;\r\n}\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--prefix8 {\r\n margin: auto 2px auto 0;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--PhoneNumberSettings input {\r\n margin-right: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--smallInfo {\r\n margin-top: 2px;\r\n opacity: 0.5;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--PhoneNumberSettings small {\r\n margin-bottom: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--statusIndicator {\r\n position: absolute;\r\n right: 5px;\r\n height: 30px;\r\n display: flex;\r\n bottom: 1px;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--PhoneNumberSettings .utilities_ops-app-frame_AppBarComponent_Settings_PhoneNumberSettings_styles_PhoneNumberSettings--statusIndicator .ms-Spinner-circle {\r\n max-width: 20px !important;\r\n max-height: 20px !important;\r\n right: 5px;\r\n}\r\n\r\nmaterial-icon[name='check'] {\r\n color: rgb(100, 181, 10);\r\n font-size: 12px;\r\n}\r\n\r\nmaterial-icon[name='error_outline'] {\r\n color: #a80000;\r\n font-size: 12px;\r\n}\r\n";
23785
23977
  styleInject(css_248z$9);
23786
23978
 
23787
- var EMPTY_PRINTERS$2 = {
23979
+ var EMPTY_PRINTERS$1 = {
23788
23980
  barcode_label_printers: '',
23789
23981
  check_printers: '',
23790
23982
  standard_printers: '',
23791
23983
  windshield_label_printers: '',
23792
23984
  text_printers: ''
23793
23985
  };
23794
- var getHierarchyLevel$1 = function getHierarchyLevel(levelId) {
23986
+ var getHierarchyLevel = function getHierarchyLevel(levelId) {
23795
23987
  switch (levelId) {
23796
23988
  case 0:
23797
23989
  return 'country';
@@ -23801,8 +23993,8 @@ var getHierarchyLevel$1 = function getHierarchyLevel(levelId) {
23801
23993
  return '';
23802
23994
  }
23803
23995
  };
23804
- var isInvalid$1 = either$1(isNil$1, isEmpty$2);
23805
- var keysToBeDeleted$1 = ['openEmailDialog', 'openPhoneDialog', 'searchParam', 'selectedCountry', 'selectedCountryA3code', 'selectedCurrency', 'selectedRole', 'selectedTimeZone', 'selectedYard', 'showPhoneEntryOnEnter', 'yard'];
23996
+ var isInvalid = either$1(isNil$1, isEmpty$2);
23997
+ var keysToBeDeleted = ['openEmailDialog', 'openPhoneDialog', 'searchParam', 'selectedCountry', 'selectedCountryA3code', 'selectedCurrency', 'selectedRole', 'selectedTimeZone', 'selectedYard', 'showPhoneEntryOnEnter', 'yard'];
23806
23998
 
23807
23999
  // Handles changes to all inputs.
23808
24000
  var handleInputChange$2 = function handleInputChange(self) {
@@ -23812,14 +24004,14 @@ var handleInputChange$2 = function handleInputChange(self) {
23812
24004
  if (name === 'selectedRole') {
23813
24005
  var selectedValue = value.selectedValue,
23814
24006
  option = value.option;
23815
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$2, 'printers');
24007
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
23816
24008
  return self.setState({
23817
24009
  selectedRoleOption: option,
23818
24010
  selectedRole: selectedValue
23819
24011
  });
23820
24012
  } else if (name === 'selectedYardNumber') {
23821
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$2, 'printers');
23822
- self.updatePhoneNumber(activePhoneNumber$2());
24013
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
24014
+ self.updatePhoneNumber(activePhoneNumber$1());
23823
24015
 
23824
24016
  // Ensure we fetch the proper roles per the entered yard
23825
24017
  var oldSelectedYard = self.state.selectedYardNumber;
@@ -23832,7 +24024,7 @@ var handleInputChange$2 = function handleInputChange(self) {
23832
24024
  });
23833
24025
  if (value !== oldSelectedYard && Boolean(value)) {
23834
24026
  self.setState({
23835
- printersData: EMPTY_PRINTERS$2
24027
+ printersData: EMPTY_PRINTERS$1
23836
24028
  });
23837
24029
  self.getActivePrinters(value, false, yardCountryCode);
23838
24030
  }
@@ -23854,12 +24046,12 @@ var handleInputChange$2 = function handleInputChange(self) {
23854
24046
  return final;
23855
24047
  }, {});
23856
24048
  };
23857
- var getSelectedYard$1 = function getSelectedYard(selectedNumber) {
24049
+ var getSelectedYard = function getSelectedYard(selectedNumber) {
23858
24050
  return storage$1.getLocalItem('login').yardList.find(function (yard) {
23859
24051
  return yard.number == selectedNumber;
23860
24052
  });
23861
24053
  };
23862
- var pickUserSecurityLevel$1 = function pickUserSecurityLevel() {
24054
+ var pickUserSecurityLevel = function pickUserSecurityLevel() {
23863
24055
  var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23864
24056
  return obj.userSecurityLevel || '0';
23865
24057
  };
@@ -23885,7 +24077,7 @@ var saveSettings$2 = function saveSettings(self) {
23885
24077
  };
23886
24078
  dashboardState = storage$1.getLocalItem('dashboard');
23887
24079
  cleanedDashboardState = pickBy$1(function (val, key) {
23888
- return !keysToBeDeleted$1.includes(key);
24080
+ return !keysToBeDeleted.includes(key);
23889
24081
  }, dashboardState);
23890
24082
  storage$1.setLocalItem('dashboard', cleanedDashboardState);
23891
24083
  toPairs$1(self.state).forEach(function (_ref4) {
@@ -23911,11 +24103,11 @@ var saveSettings$2 = function saveSettings(self) {
23911
24103
  if (roleOptionFromState) {
23912
24104
  _roleOptionFromState$ = roleOptionFromState.levelId, levelId = _roleOptionFromState$ === void 0 ? -1 : _roleOptionFromState$, _roleOptionFromState$2 = roleOptionFromState.hierarchyId, hierarchyId = _roleOptionFromState$2 === void 0 ? -1 : _roleOptionFromState$2;
23913
24105
  storage$1.setLocalItem('settings', {
23914
- level: getHierarchyLevel$1(levelId),
24106
+ level: getHierarchyLevel(levelId),
23915
24107
  id: hierarchyId
23916
24108
  }, 'selectedHierarchy');
23917
24109
  }
23918
- if (!(isInvalid$1(selectedYard) || isInvalid$1(selectedLanguage) || isInvalid$1(selectedCurrency))) {
24110
+ if (!(isInvalid(selectedYard) || isInvalid(selectedLanguage) || isInvalid(selectedCurrency))) {
23919
24111
  _context.next = 13;
23920
24112
  break;
23921
24113
  }
@@ -23938,7 +24130,7 @@ var saveSettings$2 = function saveSettings(self) {
23938
24130
  storage$1.setLocalItem('settings', roleName, 'selectedRole');
23939
24131
  storage$1.setLocalItem('lastSelectedYard', yard);
23940
24132
  storage$1.setLocalItem('dashboard', selectedCurrency || yard.yard_currency, 'selectedCurrency');
23941
- securityLevel = pickUserSecurityLevel$1(getSelectedYard$1(selectedYard));
24133
+ securityLevel = pickUserSecurityLevel(getSelectedYard(selectedYard));
23942
24134
  storage$1.setSessionItem('securityLevel', Number(securityLevel));
23943
24135
  _context.next = 24;
23944
24136
  return fetcher.getUserScopes();
@@ -23992,7 +24184,7 @@ var selectedLanguage$1 = function selectedLanguage() {
23992
24184
  var _storage$getSessionIt3;
23993
24185
  return ((_storage$getSessionIt3 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt3 === void 0 ? void 0 : _storage$getSessionIt3.language) || 'en';
23994
24186
  };
23995
- var selectedCurrency$1 = function selectedCurrency() {
24187
+ var selectedCurrency = function selectedCurrency() {
23996
24188
  var _storage$getSessionIt4;
23997
24189
  return ((_storage$getSessionIt4 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt4 === void 0 ? void 0 : _storage$getSessionIt4.selectedCurrency) || 'USD';
23998
24190
  };
@@ -24000,28 +24192,28 @@ var selectedCountryA3code$2 = function selectedCountryA3code() {
24000
24192
  var _storage$getSessionIt5;
24001
24193
  return ((_storage$getSessionIt5 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt5 === void 0 ? void 0 : _storage$getSessionIt5.selectedCountryA3code) || 'USA';
24002
24194
  };
24003
- var activePrinters$2 = function activePrinters() {
24195
+ var activePrinters$1 = function activePrinters() {
24004
24196
  var _storage$getLocalItem;
24005
- return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS$2;
24197
+ return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS$1;
24006
24198
  };
24007
- var makeKeyValue$2 = function makeKeyValue(final, target) {
24199
+ var makeKeyValue$1 = function makeKeyValue(final, target) {
24008
24200
  final[target.label] = target.printer_name;
24009
24201
  return final;
24010
24202
  };
24011
- var formatActivePrintersForState$2 = function formatActivePrintersForState() {
24203
+ var formatActivePrintersForState$1 = function formatActivePrintersForState() {
24012
24204
  var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
24013
24205
  var printers = Array.isArray(activePrinters) ? activePrinters : [];
24014
- return printers.reduce(makeKeyValue$2, {});
24206
+ return printers.reduce(makeKeyValue$1, {});
24015
24207
  };
24016
- var activePhoneNumber$2 = function activePhoneNumber() {
24208
+ var activePhoneNumber$1 = function activePhoneNumber() {
24017
24209
  var _storage$getLocalItem2;
24018
24210
  return ((_storage$getLocalItem2 = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.phoneNumber) || '';
24019
24211
  };
24020
- var ringCentralEnabled$2 = function ringCentralEnabled() {
24212
+ var ringCentralEnabled$1 = function ringCentralEnabled() {
24021
24213
  var _storage$getLocalItem3;
24022
24214
  return ((_storage$getLocalItem3 = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem3 === void 0 ? void 0 : _storage$getLocalItem3.ringCentralEnabled) || false;
24023
24215
  };
24024
- var filterRoles$3 = function filterRoles(roles, countryCode) {
24216
+ var filterRoles$2 = function filterRoles(roles, countryCode) {
24025
24217
  return compose(uniqBy$1(prop$1('roleName')), filter$1(propEq$1('countryCode', countryCode)))(roles);
24026
24218
  };
24027
24219
  var SettingsView$2 = /*#__PURE__*/function (_React$Component) {
@@ -24035,22 +24227,22 @@ var SettingsView$2 = /*#__PURE__*/function (_React$Component) {
24035
24227
  }
24036
24228
  _this = _super.call.apply(_super, [this].concat(args));
24037
24229
  _defineProperty$2(_assertThisInitialized(_this), "state", _objectSpread2({
24038
- phoneNumber: activePhoneNumber$2(),
24039
- ringCentralEnabled: ringCentralEnabled$2(),
24230
+ phoneNumber: activePhoneNumber$1(),
24231
+ ringCentralEnabled: ringCentralEnabled$1(),
24040
24232
  selectedYardNumber: selectedYardNumber$2(),
24041
24233
  selectedCountry: selectedCountry$1(),
24042
24234
  selectedCountryA3code: selectedCountryA3code$2(),
24043
24235
  selectedLanguage: selectedLanguage$1(),
24044
- selectedCurrency: selectedCurrency$1(),
24236
+ selectedCurrency: selectedCurrency(),
24045
24237
  roles: [],
24046
24238
  selectedRole: frontEndUtils.regex.beautifyRoleText(storage$1.userRole),
24047
- printersData: EMPTY_PRINTERS$2,
24239
+ printersData: EMPTY_PRINTERS$1,
24048
24240
  loadingPrinters: false,
24049
24241
  oldActivePrinters: null
24050
- }, EMPTY_PRINTERS$2));
24242
+ }, EMPTY_PRINTERS$1));
24051
24243
  _defineProperty$2(_assertThisInitialized(_this), "fetchRoles", function (countryCode) {
24052
24244
  fetcher.getUserRoles(countryCode).then(function (_roles) {
24053
- var roles = filterRoles$3(_roles, countryCode);
24245
+ var roles = filterRoles$2(_roles, countryCode);
24054
24246
  var selectedRole = _this.state.selectedRole;
24055
24247
  _this.setState({
24056
24248
  roles: roles
@@ -24094,12 +24286,12 @@ var SettingsView$2 = /*#__PURE__*/function (_React$Component) {
24094
24286
  showLoading: false
24095
24287
  });
24096
24288
  if (firstTime && storage$1.getLocalItem('dashboard', 'printers')) {
24097
- _this.setState(_objectSpread2(_objectSpread2({}, activePrinters$2()), {}, {
24098
- oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters$2()) : _this.state.oldActivePrinters
24289
+ _this.setState(_objectSpread2(_objectSpread2({}, activePrinters$1()), {}, {
24290
+ oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters$1()) : _this.state.oldActivePrinters
24099
24291
  }));
24100
24292
  } else {
24101
24293
  response = getActivePrinters(printersData);
24102
- fromatted = formatActivePrintersForState$2(response);
24294
+ fromatted = formatActivePrintersForState$1(response);
24103
24295
  _this.setState(_objectSpread2({
24104
24296
  oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, fromatted) : _this.state.oldActivePrinters
24105
24297
  }, fromatted));
@@ -24137,8 +24329,8 @@ var SettingsView$2 = /*#__PURE__*/function (_React$Component) {
24137
24329
  getRCExtensionStatus().then(function (response) {
24138
24330
  response && resetPhoneSettingsBasedOnRCStatus(response);
24139
24331
  _this2.setState({
24140
- ringCentralEnabled: ringCentralEnabled$2(),
24141
- phoneNumber: activePhoneNumber$2()
24332
+ ringCentralEnabled: ringCentralEnabled$1(),
24333
+ phoneNumber: activePhoneNumber$1()
24142
24334
  });
24143
24335
  });
24144
24336
  this.getActivePrinters(this.state.selectedYardNumber, true, this.state.selectedCountryA3code);
@@ -24178,7 +24370,7 @@ var SettingsView$2 = /*#__PURE__*/function (_React$Component) {
24178
24370
  selectedYard: this.state.selectedYardNumber,
24179
24371
  handleChange: this.handleInputChange.selectedYardNumber,
24180
24372
  selectedCountry: this.state.selectedCountry
24181
- }), /*#__PURE__*/React__default["default"].createElement(RoleSelector$1, {
24373
+ }), /*#__PURE__*/React__default["default"].createElement(RoleSelector$2, {
24182
24374
  roles: this.state.roles,
24183
24375
  value: this.state.selectedRole,
24184
24376
  handleChange: this.handleInputChange.selectedRole,
@@ -24214,12 +24406,12 @@ var SettingsView$2 = /*#__PURE__*/function (_React$Component) {
24214
24406
  return SettingsView;
24215
24407
  }(React__default["default"].Component);
24216
24408
 
24217
- var filterRoles$2 = function filterRoles(roles) {
24409
+ var filterRoles$1 = function filterRoles(roles) {
24218
24410
  return roles.filter(function (role) {
24219
24411
  return role.roleName;
24220
24412
  });
24221
24413
  };
24222
- var RoleSelector = function RoleSelector(_ref) {
24414
+ var RoleSelector$1 = function RoleSelector(_ref) {
24223
24415
  var handleChange = _ref.handleChange,
24224
24416
  value = _ref.value,
24225
24417
  roles = _ref.roles,
@@ -24231,7 +24423,7 @@ var RoleSelector = function RoleSelector(_ref) {
24231
24423
  }, /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, {
24232
24424
  name: "role",
24233
24425
  label: "Role",
24234
- options: filterRoles$2(roles),
24426
+ options: filterRoles$1(roles),
24235
24427
  onChange: function onChange(value) {
24236
24428
  var selectedValue = _typeof$1(value) === 'object' ? frontEndUtils.regex.beautifyRoleText(value.roleName) : value;
24237
24429
  var option = _typeof$1(value) === 'object' ? value : null;
@@ -24353,7 +24545,7 @@ var HierarchyMenu = function HierarchyMenu(props) {
24353
24545
  };
24354
24546
 
24355
24547
  var _excluded$2 = ["value", "handleChange", "yardOptions", "label", "disabled"];
24356
- var YardNumberMenu = function YardNumberMenu(_ref) {
24548
+ var YardNumberMenu$1 = function YardNumberMenu(_ref) {
24357
24549
  var value = _ref.value,
24358
24550
  handleChange = _ref.handleChange,
24359
24551
  yardOptions = _ref.yardOptions;
@@ -24382,7 +24574,7 @@ var YardNumberMenu = function YardNumberMenu(_ref) {
24382
24574
  })));
24383
24575
  };
24384
24576
 
24385
- var EMPTY_PRINTERS$1 = {
24577
+ var EMPTY_PRINTERS = {
24386
24578
  barcode_label_printers: '',
24387
24579
  check_printers: '',
24388
24580
  standard_printers: '',
@@ -24404,7 +24596,7 @@ var handleInputChange$1 = function handleInputChange(self) {
24404
24596
  break;
24405
24597
  }
24406
24598
  selectedValue = value.selectedValue, option = value.option;
24407
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
24599
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24408
24600
  roleName = option && option.roleName || ''; //pathOr('', ['selectedRoleOption', 'roleName'], nextState)
24409
24601
  isValidRole = self.state.roles.find(function (role) {
24410
24602
  return role.roleName === roleName;
@@ -24421,8 +24613,8 @@ var handleInputChange$1 = function handleInputChange(self) {
24421
24613
  hierarchies: hierarchies,
24422
24614
  selectedHierarchyOption: null,
24423
24615
  selectedYardNumber: null,
24424
- printersData: EMPTY_PRINTERS$1
24425
- }, EMPTY_PRINTERS$1));
24616
+ printersData: EMPTY_PRINTERS
24617
+ }, EMPTY_PRINTERS));
24426
24618
  case 10:
24427
24619
  return _context.abrupt("return", self.setState({
24428
24620
  selectedRoleOption: option,
@@ -24433,7 +24625,7 @@ var handleInputChange$1 = function handleInputChange(self) {
24433
24625
  _context.next = 32;
24434
24626
  break;
24435
24627
  }
24436
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
24628
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24437
24629
  country = value.country, _value$yard = value.yard, yard = _value$yard === void 0 ? null : _value$yard;
24438
24630
  countryId = country && country.split('-')[0];
24439
24631
  if (!countryId) {
@@ -24466,8 +24658,8 @@ var handleInputChange$1 = function handleInputChange(self) {
24466
24658
  level: yard ? 'yard' : 'country'
24467
24659
  },
24468
24660
  selectedYardNumber: yard,
24469
- printersData: EMPTY_PRINTERS$1
24470
- }, EMPTY_PRINTERS$1));
24661
+ printersData: EMPTY_PRINTERS
24662
+ }, EMPTY_PRINTERS));
24471
24663
  case 30:
24472
24664
  _context.next = 43;
24473
24665
  break;
@@ -24476,7 +24668,7 @@ var handleInputChange$1 = function handleInputChange(self) {
24476
24668
  _context.next = 43;
24477
24669
  break;
24478
24670
  }
24479
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS$1, 'printers');
24671
+ storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24480
24672
  if (!(value !== self.state.selectedYardNumber && Boolean(value))) {
24481
24673
  _context.next = 42;
24482
24674
  break;
@@ -24496,8 +24688,8 @@ var handleInputChange$1 = function handleInputChange(self) {
24496
24688
  return _context.abrupt("return", self.setState(function (state) {
24497
24689
  return _objectSpread2({
24498
24690
  selectedYardNumber: value,
24499
- printersData: EMPTY_PRINTERS$1
24500
- }, EMPTY_PRINTERS$1);
24691
+ printersData: EMPTY_PRINTERS
24692
+ }, EMPTY_PRINTERS);
24501
24693
  }));
24502
24694
  case 43:
24503
24695
  self.setState(function (state) {
@@ -24651,23 +24843,23 @@ var selectedCountryA3code$1 = function selectedCountryA3code() {
24651
24843
  var _storage$getSessionIt2;
24652
24844
  return ((_storage$getSessionIt2 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt2 === void 0 ? void 0 : _storage$getSessionIt2.selectedCountryA3code) || 'GBR';
24653
24845
  };
24654
- var activePrinters$1 = function activePrinters() {
24655
- return storage$1.getLocalItem('dashboard', 'printers') || EMPTY_PRINTERS$1;
24846
+ var activePrinters = function activePrinters() {
24847
+ return storage$1.getLocalItem('dashboard', 'printers') || EMPTY_PRINTERS;
24656
24848
  };
24657
- var makeKeyValue$1 = function makeKeyValue(final, target) {
24849
+ var makeKeyValue = function makeKeyValue(final, target) {
24658
24850
  final[target.label] = target.printer_name;
24659
24851
  return final;
24660
24852
  };
24661
- var formatActivePrintersForState$1 = function formatActivePrintersForState() {
24853
+ var formatActivePrintersForState = function formatActivePrintersForState() {
24662
24854
  var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
24663
24855
  var printers = Array.isArray(activePrinters) ? activePrinters : [];
24664
- return printers.reduce(makeKeyValue$1, {});
24856
+ return printers.reduce(makeKeyValue, {});
24665
24857
  };
24666
- var activePhoneNumber$1 = function activePhoneNumber() {
24858
+ var activePhoneNumber = function activePhoneNumber() {
24667
24859
  var _storage$getLocalItem2;
24668
24860
  return ((_storage$getLocalItem2 = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.phoneNumber) || '';
24669
24861
  };
24670
- var ringCentralEnabled$1 = function ringCentralEnabled() {
24862
+ var ringCentralEnabled = function ringCentralEnabled() {
24671
24863
  var _storage$getLocalItem3;
24672
24864
  return ((_storage$getLocalItem3 = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem3 === void 0 ? void 0 : _storage$getLocalItem3.ringCentralEnabled) || false;
24673
24865
  };
@@ -24704,7 +24896,7 @@ var getYardOptions = /*#__PURE__*/function () {
24704
24896
  return _ref7.apply(this, arguments);
24705
24897
  };
24706
24898
  }();
24707
- var filterRoles$1 = function filterRoles(roles, invalidCodes) {
24899
+ var filterRoles = function filterRoles(roles, invalidCodes) {
24708
24900
  return compose(uniqBy$1(prop$1('roleName')), filter$1(compose(not$1, flip$3(includes$1)(invalidCodes), prop$1('countryCode'))))(roles);
24709
24901
  };
24710
24902
  var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
@@ -24718,8 +24910,8 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24718
24910
  }
24719
24911
  _this = _super.call.apply(_super, [this].concat(args));
24720
24912
  _defineProperty$2(_assertThisInitialized(_this), "state", _objectSpread2({
24721
- phoneNumber: activePhoneNumber$1(),
24722
- ringCentralEnabled: ringCentralEnabled$1(),
24913
+ phoneNumber: activePhoneNumber(),
24914
+ ringCentralEnabled: ringCentralEnabled(),
24723
24915
  selectedYardNumber: selectedYardNumber$1(),
24724
24916
  selectedCountryA3code: selectedCountryA3code$1(),
24725
24917
  selectedRole: frontEndUtils.regex.beautifyRoleText(storage$1.userRole),
@@ -24727,9 +24919,9 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24727
24919
  selectedHierarchyOption: storage$1.getLocalItem('settings', 'selectedHierarchyOption'),
24728
24920
  roles: [],
24729
24921
  hierarchies: [],
24730
- printersData: EMPTY_PRINTERS$1,
24922
+ printersData: EMPTY_PRINTERS,
24731
24923
  oldActivePrinters: null
24732
- }, EMPTY_PRINTERS$1));
24924
+ }, EMPTY_PRINTERS));
24733
24925
  _defineProperty$2(_assertThisInitialized(_this), "getRCAvailability", /*#__PURE__*/_asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
24734
24926
  var response;
24735
24927
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -24741,8 +24933,8 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24741
24933
  response = _context4.sent;
24742
24934
  resetPhoneSettingsBasedOnRCStatus(response);
24743
24935
  _this.setState({
24744
- ringCentralEnabled: ringCentralEnabled$1(),
24745
- phoneNumber: activePhoneNumber$1()
24936
+ ringCentralEnabled: ringCentralEnabled(),
24937
+ phoneNumber: activePhoneNumber()
24746
24938
  });
24747
24939
  case 5:
24748
24940
  case "end":
@@ -24775,12 +24967,12 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24775
24967
  showLoading: false
24776
24968
  });
24777
24969
  if (firstTime && storage$1.getLocalItem('dashboard', 'printers')) {
24778
- _this.setState(_objectSpread2(_objectSpread2({}, activePrinters$1()), {}, {
24779
- oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters$1()) : _this.state.oldActivePrinters
24970
+ _this.setState(_objectSpread2(_objectSpread2({}, activePrinters()), {}, {
24971
+ oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters()) : _this.state.oldActivePrinters
24780
24972
  }));
24781
24973
  } else {
24782
24974
  _activePrinters = getActivePrinters(printersData);
24783
- update = formatActivePrintersForState$1(_activePrinters);
24975
+ update = formatActivePrintersForState(_activePrinters);
24784
24976
  _this.setState(_objectSpread2({
24785
24977
  oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, update) : _this.state.oldActivePrinters
24786
24978
  }, update));
@@ -24822,7 +25014,7 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24822
25014
  case 2:
24823
25015
  _roles = _context6.sent;
24824
25016
  // MEA and UK are both valid in UK portal so filter out the rest
24825
- roles = filterRoles$1(_roles, ['CAN', 'BRA', 'USA', 'IND']);
25017
+ roles = filterRoles(_roles, ['CAN', 'BRA', 'USA', 'IND']);
24826
25018
  _context6.next = 6;
24827
25019
  return fetcher.getHierarchyOptions(storage$1.userRole);
24828
25020
  case 6:
@@ -24894,7 +25086,7 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24894
25086
  }), /*#__PURE__*/React__default["default"].createElement("p", null, "Settings")), /*#__PURE__*/React__default["default"].createElement("div", {
24895
25087
  className: "col-1-1 utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--inputRow",
24896
25088
  "data-e2e": "LocationAndLanguageRow"
24897
- }, /*#__PURE__*/React__default["default"].createElement(RoleSelector, {
25089
+ }, /*#__PURE__*/React__default["default"].createElement(RoleSelector$1, {
24898
25090
  roles: roles,
24899
25091
  value: selectedRole,
24900
25092
  selectedCountryA3code: this.state.selectedCountryA3code,
@@ -24903,7 +25095,7 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24903
25095
  hierarchies: hierarchies,
24904
25096
  value: this.state.selectedHierarchyOption,
24905
25097
  handleChange: this.handleInputChange.selectedHierarchyOption
24906
- }), /*#__PURE__*/React__default["default"].createElement(YardNumberMenu, {
25098
+ }), /*#__PURE__*/React__default["default"].createElement(YardNumberMenu$1, {
24907
25099
  yardOptions: yardOptions,
24908
25100
  disabled: disableYardDropDown,
24909
25101
  value: this.state.selectedYardNumber,
@@ -24933,64 +25125,195 @@ var SettingsView$1 = /*#__PURE__*/function (_React$Component) {
24933
25125
  return SettingsView;
24934
25126
  }(React__default["default"].Component);
24935
25127
 
24936
- var EMPTY_PRINTERS = {
24937
- barcode_label_printers: '',
24938
- check_printers: '',
24939
- standard_printers: '',
24940
- windshield_label_printers: '',
24941
- text_printers: ''
25128
+ var unique = function unique(roles) {
25129
+ return roles.reduce(function (final, role) {
25130
+ var found = final.find(function (r) {
25131
+ return role.roleName === r.roleName;
25132
+ });
25133
+ if (found) return final;
25134
+ final.push(role);
25135
+ return final;
25136
+ }, []);
24942
25137
  };
24943
- var getHierarchyLevel = function getHierarchyLevel(levelId) {
24944
- switch (levelId) {
24945
- case 0:
24946
- return 'country';
24947
- case 100:
24948
- return 'yard';
24949
- default:
24950
- return '';
25138
+ var RoleSelector = function RoleSelector(_ref) {
25139
+ var handleChange = _ref.handleChange,
25140
+ value = _ref.value,
25141
+ roles = _ref.roles;
25142
+ return /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, {
25143
+ name: "role",
25144
+ options: unique(roles),
25145
+ onChange: function onChange(value) {
25146
+ var selectedValue = value && value.roleName ? value.roleName : value;
25147
+ handleChange({
25148
+ selectedValue: selectedValue
25149
+ });
25150
+ },
25151
+ displayOption: function displayOption(o) {
25152
+ return o.roleName && locale(frontEndUtils.regex.capitalizeFirstLetter(frontEndUtils.regex.beautifyRoleText(o.roleName)));
25153
+ },
25154
+ serializeOption: function serializeOption(o) {
25155
+ return o.roleName;
25156
+ },
25157
+ value: value && locale(frontEndUtils.regex.capitalizeFirstLetter(frontEndUtils.regex.beautifyRoleText(value))),
25158
+ placeholder: "Role",
25159
+ label: locale('Role'),
25160
+ required: true
25161
+ });
25162
+ };
25163
+
25164
+ var YardNumberMenu = function YardNumberMenu(_ref) {
25165
+ var handleChange = _ref.handleChange,
25166
+ value = _ref.value,
25167
+ yardOptions = _ref.yardOptions;
25168
+ return /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, {
25169
+ name: "facility",
25170
+ options: yardOptions,
25171
+ onChange: handleChange,
25172
+ displayOption: function displayOption(yard) {
25173
+ return "".concat(yard.yard_number, " - ").concat(yard.yard_name);
25174
+ },
25175
+ value: value,
25176
+ placeholder: "Facility",
25177
+ label: locale('Facility'),
25178
+ required: true
25179
+ });
25180
+ };
25181
+
25182
+ var COUNTRIES$1 = {
25183
+ DE: {
25184
+ name: 'Germany',
25185
+ code: 'DEU'
25186
+ },
25187
+ ES: {
25188
+ name: 'Spain',
25189
+ code: 'ESP'
25190
+ },
25191
+ FI: {
25192
+ name: 'Finland',
25193
+ code: 'FIN'
24951
25194
  }
24952
25195
  };
24953
- var isInvalid = either$1(isNil$1, isEmpty$2);
24954
- var keysToBeDeleted = ['openEmailDialog', 'openPhoneDialog', 'searchParam', 'selectedCountry', 'selectedCountryA3code', 'selectedCurrency', 'selectedRole', 'selectedTimeZone', 'selectedYard', 'showPhoneEntryOnEnter', 'yard'];
25196
+ var validCountry = function validCountry(value) {
25197
+ return value && includes$1(value, keys$3(COUNTRIES$1)) ? locale(COUNTRIES$1[value].name) : value || '';
25198
+ };
25199
+ var CountrySelector = function CountrySelector(_ref) {
25200
+ var handleChange = _ref.handleChange,
25201
+ value = _ref.value,
25202
+ countries = _ref.countries;
25203
+ return /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, {
25204
+ name: "country",
25205
+ options: countries,
25206
+ onChange: handleChange,
25207
+ displayOption: function displayOption(country) {
25208
+ if (!country || !COUNTRIES$1[country]) return country || '';
25209
+ return locale(COUNTRIES$1[country].name);
25210
+ },
25211
+ value: validCountry(value),
25212
+ placeholder: "Country",
25213
+ label: locale('Country'),
25214
+ required: true
25215
+ });
25216
+ };
25217
+
25218
+ var COUNTRIES = {
25219
+ DE: {
25220
+ name: 'Germany',
25221
+ code: 'DEU'
25222
+ },
25223
+ ES: {
25224
+ name: 'Spain',
25225
+ code: 'ESP'
25226
+ },
25227
+ FI: {
25228
+ name: 'Finland',
25229
+ code: 'FIN'
25230
+ }
25231
+ };
25232
+ var getRolesMap = function getRolesMap(userRoles) {
25233
+ var rolesMap = {};
25234
+ userRoles.map(function (obj) {
25235
+ if (has$2(obj.roleName, rolesMap)) rolesMap[obj.roleName] = [].concat(_toConsumableArray(rolesMap[obj.roleName]), [obj.hierarchyId]);else rolesMap[obj.roleName] = [obj.hierarchyId];
25236
+ });
25237
+ storage$1.setLocalItem('settings', rolesMap, 'rolesMap');
25238
+ return rolesMap;
25239
+ };
25240
+ var getUserRolesFromFetcher = /*#__PURE__*/function () {
25241
+ var _ref = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
25242
+ var promises, userRoles, result;
25243
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25244
+ while (1) switch (_context.prev = _context.next) {
25245
+ case 0:
25246
+ promises = keys$3(COUNTRIES).map(function (country) {
25247
+ return fetcher.getCobaltUserRoles(COUNTRIES[country].code);
25248
+ });
25249
+ _context.next = 3;
25250
+ return Promise.all(promises);
25251
+ case 3:
25252
+ userRoles = _context.sent;
25253
+ result = keys$3(COUNTRIES).map(function (country, index) {
25254
+ return {
25255
+ country: country,
25256
+ roles: userRoles[index]
25257
+ };
25258
+ }).filter(function (roleByCountry) {
25259
+ return !isEmpty$2(roleByCountry.roles);
25260
+ });
25261
+ return _context.abrupt("return", result);
25262
+ case 6:
25263
+ case "end":
25264
+ return _context.stop();
25265
+ }
25266
+ }, _callee);
25267
+ }));
25268
+ return function getUserRolesFromFetcher() {
25269
+ return _ref.apply(this, arguments);
25270
+ };
25271
+ }();
25272
+ var getSelectedYardNumberAndName = function getSelectedYardNumberAndName() {
25273
+ var _storage$getLocalItem = storage$1.getLocalItem('dashboard'),
25274
+ selectedYard = _storage$getLocalItem.selectedYard,
25275
+ yardList = _storage$getLocalItem.yardList;
25276
+ var selectedYardObject = head$1(filter$1(function (yard) {
25277
+ return yard.yard_number === selectedYard;
25278
+ }, yardList)) || {};
25279
+ return !isEmpty$2(selectedYardObject) ? "".concat(selectedYardObject.yard_number, " - ").concat(selectedYardObject.yard_name) : null;
25280
+ };
25281
+ var getAccessCountries = function getAccessCountries(userRoles) {
25282
+ return userRoles.map(function (rolesByCountry) {
25283
+ return rolesByCountry.country;
25284
+ });
25285
+ };
25286
+ var getActiveCountryObjByCountry = function getActiveCountryObjByCountry(userRoles, selectedCountry) {
25287
+ return userRoles.find(function (rolesByCountry) {
25288
+ return rolesByCountry.country === selectedCountry;
25289
+ });
25290
+ };
24955
25291
 
24956
25292
  // Handles changes to all inputs.
24957
25293
  var handleInputChange = function handleInputChange(self) {
24958
- var yardCountryCode = self.state.selectedCountryA3code;
25294
+ self.state.selectedCountryA3code;
24959
25295
  var handleChange = function handleChange(name) {
24960
25296
  return function (value) {
24961
- if (name === 'selectedRole') {
25297
+ if (name === 'selectedCountry') {
25298
+ return self.setState({
25299
+ selectedCountry: value
25300
+ });
25301
+ } else if (name === 'selectedRole') {
24962
25302
  var selectedValue = value.selectedValue,
24963
25303
  option = value.option;
24964
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24965
25304
  return self.setState({
24966
25305
  selectedRoleOption: option,
24967
25306
  selectedRole: selectedValue
24968
25307
  });
24969
25308
  } else if (name === 'selectedYardNumber') {
24970
- storage$1.setSessionItem('dashboard', EMPTY_PRINTERS, 'printers');
24971
- self.updatePhoneNumber(activePhoneNumber());
24972
-
24973
- // Ensure we fetch the proper roles per the entered yard
24974
- var oldSelectedYard = self.state.selectedYardNumber;
24975
- fetcher.getYardNumbers(value).then(function (yards) {
24976
- var currentYard = find$1(propEq$1('yard_number', parseInt(value)), yards);
24977
- if (currentYard) yardCountryCode = currentYard.yard_country_code;
24978
- self.fetchRoles(yardCountryCode);
24979
- self.setState({
24980
- selectedCountryA3code: yardCountryCode
24981
- });
24982
- if (value !== oldSelectedYard && Boolean(value)) {
24983
- self.setState({
24984
- printersData: EMPTY_PRINTERS
24985
- });
24986
- self.getActivePrinters(value, false, yardCountryCode);
24987
- }
25309
+ return self.setState({
25310
+ selectedYardNumber: value
24988
25311
  });
24989
- return self.setState(function (state) {
24990
- return {
24991
- selectedRole: '',
24992
- selectedYardNumber: value
24993
- };
25312
+ } else if (name === 'selectedYardNumberAndName') {
25313
+ var yardNumber = value.yard_number;
25314
+ return self.setState({
25315
+ selectedYardNumber: yardNumber,
25316
+ selectedYardNumberAndName: value
24994
25317
  });
24995
25318
  }
24996
25319
  self.setState(function (state) {
@@ -25003,131 +25326,39 @@ var handleInputChange = function handleInputChange(self) {
25003
25326
  return final;
25004
25327
  }, {});
25005
25328
  };
25006
- var getSelectedYard = function getSelectedYard(selectedNumber) {
25007
- return storage$1.getLocalItem('login').yardList.find(function (yard) {
25008
- return yard.number == selectedNumber;
25009
- });
25010
- };
25011
- var pickUserSecurityLevel = function pickUserSecurityLevel() {
25012
- var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
25013
- return obj.userSecurityLevel || '0';
25014
- };
25015
25329
  var saveSettings = function saveSettings(self) {
25016
- return /*#__PURE__*/function () {
25017
- var _ref3 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
25018
- var _yard$yard_country_co, _yard$yard_country_co2;
25019
- var printers, dashboardSessionState, oldSettings, dashboardState, cleanedDashboardState, _self$state, selectedYard, selectedRole, selectedLanguage, selectedCurrency, roles, roleOptionFromState, roleName, _roleOptionFromState$, levelId, _roleOptionFromState$2, hierarchyId, yard, securityLevel, userScopes, newSettings;
25020
- return _regeneratorRuntime().wrap(function _callee$(_context) {
25021
- while (1) switch (_context.prev = _context.next) {
25022
- case 0:
25023
- printers = {}; // ******* Hack to be remved ******* create date July 12, 2019 *******
25024
- // Just a hack to ensure yard gets changed to avoid issue caused by proquote app which is using old toolkit
25025
- // remove this hack once pro quote app update its tool kit version to latest
25026
- dashboardSessionState = storage$1.getSessionItem('dashboard');
25027
- oldSettings = {
25028
- selectedCurrency: dashboardSessionState.selectedCurrency,
25029
- selectedYard: dashboardSessionState.selectedYard,
25030
- selectedCountry: dashboardSessionState.selectedCountry,
25031
- language: dashboardSessionState.language,
25032
- selectedRole: storage$1.getLocalItem('settings').selectedRole,
25033
- activePrinters: self.state.oldActivePrinters
25034
- };
25035
- dashboardState = storage$1.getLocalItem('dashboard');
25036
- cleanedDashboardState = pickBy$1(function (val, key) {
25037
- return !keysToBeDeleted.includes(key);
25038
- }, dashboardState);
25039
- storage$1.setLocalItem('dashboard', cleanedDashboardState);
25040
- toPairs$1(self.state).forEach(function (_ref4) {
25041
- var _ref5 = _slicedToArray(_ref4, 2),
25042
- key = _ref5[0],
25043
- value = _ref5[1];
25044
- if (key.endsWith('_printers')) {
25045
- printers[key] = (value || '').toUpperCase();
25046
- } else {
25047
- if (key === 'printersData') {
25048
- value = JSON.stringify(value);
25049
- }
25050
- if (key === 'phoneNumber') {
25051
- storage$1.setLocalItem('dashboard', value, 'phoneNumber');
25052
- }
25053
- }
25054
- });
25055
- _self$state = self.state, selectedYard = _self$state.selectedYardNumber, selectedRole = _self$state.selectedRole, selectedLanguage = _self$state.selectedLanguage, selectedCurrency = _self$state.selectedCurrency, roles = _self$state.roles, _self$state.selectedRoleOption;
25056
- roleOptionFromState = roles.find(function (roleOption) {
25057
- return frontEndUtils.regex.beautifyRoleText(roleOption.roleName) === selectedRole;
25058
- }) || head$1(roles);
25059
- roleName = propOr$1('', 'roleName', roleOptionFromState); // Update hierarchy on local storage when role changes
25060
- if (roleOptionFromState) {
25061
- _roleOptionFromState$ = roleOptionFromState.levelId, levelId = _roleOptionFromState$ === void 0 ? -1 : _roleOptionFromState$, _roleOptionFromState$2 = roleOptionFromState.hierarchyId, hierarchyId = _roleOptionFromState$2 === void 0 ? -1 : _roleOptionFromState$2;
25062
- storage$1.setLocalItem('settings', {
25063
- level: getHierarchyLevel(levelId),
25064
- id: hierarchyId
25065
- }, 'selectedHierarchy');
25066
- }
25067
- if (!(isInvalid(selectedYard) || isInvalid(selectedLanguage) || isInvalid(selectedCurrency))) {
25068
- _context.next = 13;
25069
- break;
25070
- }
25071
- return _context.abrupt("return");
25072
- case 13:
25073
- yard = self.yardsHistory.get(selectedYard)[selectedYard];
25074
- storage$1.setSessionItem('dashboard', _objectSpread2(_objectSpread2({}, storage$1.getSessionItem('dashboard')), {}, {
25075
- selectedCurrency: selectedCurrency || yard.yard_currency,
25076
- selectedCountry: (_yard$yard_country_co = yard.yard_country_code) === null || _yard$yard_country_co === void 0 ? void 0 : _yard$yard_country_co.slice(0, 2),
25077
- selectedCountryA3code: yard.yard_country_code,
25078
- selectedYard: yard.yard_number,
25079
- selectedTimeZone: yard.time_zone,
25080
- language: selectedLanguage || 'en',
25081
- selectedRole: roleName,
25082
- printers: printers,
25083
- yard: yard
25084
- }));
25085
- storage$1.setLocalItem('dashboard', printers, 'printers');
25086
- storage$1.setLocalItem('dashboard', selectedLanguage || 'en', 'language');
25087
- storage$1.setLocalItem('settings', roleName, 'selectedRole');
25088
- storage$1.setLocalItem('lastSelectedYard', yard);
25089
- storage$1.setLocalItem('dashboard', selectedCurrency || yard.yard_currency, 'selectedCurrency');
25090
- securityLevel = pickUserSecurityLevel(getSelectedYard(selectedYard));
25091
- storage$1.setSessionItem('securityLevel', Number(securityLevel));
25092
- _context.next = 24;
25093
- return fetcher.getUserScopes();
25094
- case 24:
25095
- userScopes = _context.sent;
25096
- storage$1.setLocalItem('login', userScopes, 'userAppScopes');
25097
- // persist user preferences
25098
- _context.next = 28;
25099
- return fetcher.setUserPreferences('oph', {
25100
- selectedCurrency: selectedCurrency || yard.yard_currency,
25101
- language: selectedLanguage || 'en',
25102
- // TODO Remove this after remove role selection
25103
- selectedRole: roleName,
25104
- printers: printers,
25105
- yard: yard,
25106
- securityLevel: securityLevel
25107
- }, 'USA');
25108
- case 28:
25109
- self.setState({
25110
- oldActivePrinters: printers
25111
- });
25112
- newSettings = {
25113
- selectedCurrency: selectedCurrency || yard.yard_currency,
25114
- selectedYard: yard.yard_number,
25115
- selectedCountry: (_yard$yard_country_co2 = yard.yard_country_code) === null || _yard$yard_country_co2 === void 0 ? void 0 : _yard$yard_country_co2.slice(0, 2),
25116
- language: selectedLanguage || 'en',
25117
- selectedRole: roleName,
25118
- activePrinters: self.activePrinters
25119
- };
25120
- self.props.onSave(oldSettings, newSettings);
25121
- case 31:
25122
- case "end":
25123
- return _context.stop();
25124
- }
25125
- }, _callee);
25126
- }));
25127
- return function (_x) {
25128
- return _ref3.apply(this, arguments);
25330
+ return function () {
25331
+ var _self$state = self.state,
25332
+ selectedCountry = _self$state.selectedCountry,
25333
+ selectedRole = _self$state.selectedRole,
25334
+ selectedYard = _self$state.selectedYardNumber,
25335
+ language = _self$state.selectedLanguage,
25336
+ yardOptions = _self$state.yardOptions;
25337
+ if (!selectedCountry || !language || !selectedYard || !selectedRole) {
25338
+ return;
25339
+ }
25340
+ var selectedCountryA3code = COUNTRIES[selectedCountry].code;
25341
+ var dashboard = {
25342
+ language: language,
25343
+ selectedCountry: selectedCountry,
25344
+ selectedCountryA3code: selectedCountryA3code,
25345
+ selectedYard: selectedYard
25129
25346
  };
25130
- }();
25347
+ localStorage.setItem('dashboard', JSON.stringify(dashboard));
25348
+ sessionStorage.setItem('dashboard', JSON.stringify(dashboard));
25349
+ storage$1.setLocalItem('dashboard', {
25350
+ yard_number: selectedYard
25351
+ }, 'yard');
25352
+ storage$1.setSessionItem('dashboard', {
25353
+ yard_number: selectedYard
25354
+ }, 'yard');
25355
+ storage$1.setLocalItem('dashboard', yardOptions, 'yardList');
25356
+ storage$1.setSessionItem('dashboard', yardOptions, 'yardList');
25357
+ storage$1.setLocalItem('settings', selectedRole, 'selectedRole');
25358
+ if (self.props.onSave) {
25359
+ self.props.onSave();
25360
+ }
25361
+ };
25131
25362
  };
25132
25363
  var selectedYardNumber = function selectedYardNumber() {
25133
25364
  var _storage$getSessionIt;
@@ -25141,37 +25372,9 @@ var selectedLanguage = function selectedLanguage() {
25141
25372
  var _storage$getSessionIt3;
25142
25373
  return ((_storage$getSessionIt3 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt3 === void 0 ? void 0 : _storage$getSessionIt3.language) || 'en';
25143
25374
  };
25144
- var selectedCurrency = function selectedCurrency() {
25145
- var _storage$getSessionIt4;
25146
- return ((_storage$getSessionIt4 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt4 === void 0 ? void 0 : _storage$getSessionIt4.selectedCurrency) || 'USD';
25147
- };
25148
25375
  var selectedCountryA3code = function selectedCountryA3code() {
25149
- var _storage$getSessionIt5;
25150
- return ((_storage$getSessionIt5 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt5 === void 0 ? void 0 : _storage$getSessionIt5.selectedCountryA3code) || 'USA';
25151
- };
25152
- var activePrinters = function activePrinters() {
25153
- var _storage$getLocalItem;
25154
- return ((_storage$getLocalItem = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.printers) || EMPTY_PRINTERS;
25155
- };
25156
- var makeKeyValue = function makeKeyValue(final, target) {
25157
- final[target.label] = target.printer_name;
25158
- return final;
25159
- };
25160
- var formatActivePrintersForState = function formatActivePrintersForState() {
25161
- var activePrinters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
25162
- var printers = Array.isArray(activePrinters) ? activePrinters : [];
25163
- return printers.reduce(makeKeyValue, {});
25164
- };
25165
- var activePhoneNumber = function activePhoneNumber() {
25166
- var _storage$getLocalItem2;
25167
- return ((_storage$getLocalItem2 = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.phoneNumber) || '';
25168
- };
25169
- var ringCentralEnabled = function ringCentralEnabled() {
25170
- var _storage$getLocalItem3;
25171
- return ((_storage$getLocalItem3 = storage$1.getLocalItem('dashboard')) === null || _storage$getLocalItem3 === void 0 ? void 0 : _storage$getLocalItem3.ringCentralEnabled) || false;
25172
- };
25173
- var filterRoles = function filterRoles(roles, countryCode) {
25174
- return compose(uniqBy$1(prop$1('roleName')), filter$1(propEq$1('countryCode', countryCode)))(roles);
25376
+ var _storage$getSessionIt4;
25377
+ return ((_storage$getSessionIt4 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt4 === void 0 ? void 0 : _storage$getSessionIt4.selectedCountryA3code) || 'USA';
25175
25378
  };
25176
25379
  var SettingsView = /*#__PURE__*/function (_React$Component) {
25177
25380
  _inherits$2(SettingsView, _React$Component);
@@ -25183,126 +25386,215 @@ var SettingsView = /*#__PURE__*/function (_React$Component) {
25183
25386
  args[_key] = arguments[_key];
25184
25387
  }
25185
25388
  _this = _super.call.apply(_super, [this].concat(args));
25186
- _defineProperty$2(_assertThisInitialized(_this), "state", _objectSpread2({
25187
- phoneNumber: activePhoneNumber(),
25188
- ringCentralEnabled: ringCentralEnabled(),
25389
+ _defineProperty$2(_assertThisInitialized(_this), "state", {
25189
25390
  selectedYardNumber: selectedYardNumber(),
25190
25391
  selectedCountry: selectedCountry(),
25191
25392
  selectedCountryA3code: selectedCountryA3code(),
25192
25393
  selectedLanguage: selectedLanguage(),
25193
- selectedCurrency: selectedCurrency(),
25194
25394
  roles: [],
25195
- selectedRole: frontEndUtils.regex.beautifyRoleText(storage$1.userRole),
25196
- printersData: EMPTY_PRINTERS,
25197
- loadingPrinters: false,
25198
- oldActivePrinters: null
25199
- }, EMPTY_PRINTERS));
25200
- _defineProperty$2(_assertThisInitialized(_this), "fetchRoles", function (countryCode) {
25201
- fetcher.getUserRoles(countryCode).then(function (_roles) {
25202
- var roles = filterRoles(_roles, countryCode);
25203
- var selectedRole = _this.state.selectedRole;
25204
- _this.setState({
25205
- roles: roles
25206
- });
25207
- if (selectedRole && !find$1(compose(equals$1(selectedRole), frontEndUtils.regex.beautifyRoleText, prop$1('roleName')), roles)) {
25208
- _this.setState({
25209
- selectedRole: ''
25210
- });
25211
- }
25212
- }).catch(function (err) {
25213
- _this.setState({
25214
- roles: [],
25215
- selectedRole: ''
25216
- });
25217
- });
25395
+ countries: [],
25396
+ userRoles: [],
25397
+ yardOptions: [],
25398
+ selectedYardNumberAndName: getSelectedYardNumberAndName() || null,
25399
+ selectedRole: storage$1.getLocalItem('settings').selectedRole || '',
25400
+ showLoading: false
25218
25401
  });
25219
- _defineProperty$2(_assertThisInitialized(_this), "getActivePrinters", /*#__PURE__*/function () {
25220
- var _ref6 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(yardNumber) {
25221
- var firstTime,
25222
- countryA3code,
25223
- printersData,
25224
- response,
25225
- fromatted,
25226
- _args2 = arguments;
25227
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25228
- while (1) switch (_context2.prev = _context2.next) {
25402
+ _defineProperty$2(_assertThisInitialized(_this), "fetchFacilititesForRole", /*#__PURE__*/function () {
25403
+ var _ref2 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(roleName, activeCountryObj) {
25404
+ var _activeCountryObj$rol;
25405
+ var allFacilities, rolesMap, yardOptions;
25406
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25407
+ while (1) switch (_context.prev = _context.next) {
25229
25408
  case 0:
25230
- firstTime = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : false;
25231
- countryA3code = _args2.length > 2 ? _args2[2] : undefined;
25409
+ if (!(!roleName || !(activeCountryObj !== null && activeCountryObj !== void 0 && (_activeCountryObj$rol = activeCountryObj.roles) !== null && _activeCountryObj$rol !== void 0 && _activeCountryObj$rol.length))) {
25410
+ _context.next = 3;
25411
+ break;
25412
+ }
25232
25413
  _this.setState({
25233
- loadingPrinters: true,
25234
- showLoading: true
25414
+ yardOptions: []
25235
25415
  });
25236
- _context2.next = 5;
25237
- return fetcher.getPrintersForYard(yardNumber, countryA3code);
25238
- case 5:
25239
- printersData = _context2.sent;
25416
+ return _context.abrupt("return");
25417
+ case 3:
25418
+ if (!includes$1(roleName, pluck$1('roleName', (activeCountryObj === null || activeCountryObj === void 0 ? void 0 : activeCountryObj.roles) || []))) {
25419
+ _context.next = 22;
25420
+ break;
25421
+ }
25422
+ _context.prev = 4;
25423
+ if (COUNTRIES[_this.state.selectedCountry]) {
25424
+ _context.next = 8;
25425
+ break;
25426
+ }
25240
25427
  _this.setState({
25241
- printersData: printersData,
25242
- loadingPrinters: false,
25243
- showLoading: false
25428
+ yardOptions: []
25244
25429
  });
25245
- if (firstTime && storage$1.getLocalItem('dashboard', 'printers')) {
25246
- _this.setState(_objectSpread2(_objectSpread2({}, activePrinters()), {}, {
25247
- oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, activePrinters()) : _this.state.oldActivePrinters
25248
- }));
25249
- } else {
25250
- response = getActivePrinters(printersData);
25251
- fromatted = formatActivePrintersForState(response);
25252
- _this.setState(_objectSpread2({
25253
- oldActivePrinters: !_this.state.oldActivePrinters ? _objectSpread2({}, fromatted) : _this.state.oldActivePrinters
25254
- }, fromatted));
25255
- }
25430
+ return _context.abrupt("return");
25256
25431
  case 8:
25432
+ _context.next = 10;
25433
+ return fetcher.getCobaltUserFacilities(COUNTRIES[_this.state.selectedCountry].code, roleName);
25434
+ case 10:
25435
+ allFacilities = _context.sent;
25436
+ rolesMap = getRolesMap((activeCountryObj === null || activeCountryObj === void 0 ? void 0 : activeCountryObj.roles) || []);
25437
+ if (!includes$1(_this.state.selectedYardNumber, rolesMap[roleName])) {
25438
+ _this.setState({
25439
+ selectedYardNumber: '',
25440
+ selectedYardNumberAndName: ''
25441
+ });
25442
+ }
25443
+ yardOptions = filter$1(function (yard) {
25444
+ return includes$1(yard.yard_number, rolesMap[roleName]);
25445
+ }, allFacilities);
25446
+ _this.setState({
25447
+ yardOptions: yardOptions
25448
+ });
25449
+ _context.next = 20;
25450
+ break;
25451
+ case 17:
25452
+ _context.prev = 17;
25453
+ _context.t0 = _context["catch"](4);
25454
+ _this.setState({
25455
+ yardOptions: []
25456
+ });
25457
+ case 20:
25458
+ _context.next = 23;
25459
+ break;
25460
+ case 22:
25461
+ _this.setState({
25462
+ selectedRole: '',
25463
+ yardOptions: []
25464
+ });
25465
+ case 23:
25257
25466
  case "end":
25258
- return _context2.stop();
25467
+ return _context.stop();
25259
25468
  }
25260
- }, _callee2);
25469
+ }, _callee, null, [[4, 17]]);
25261
25470
  }));
25262
- return function (_x2) {
25263
- return _ref6.apply(this, arguments);
25471
+ return function (_x, _x2) {
25472
+ return _ref2.apply(this, arguments);
25264
25473
  };
25265
25474
  }());
25266
- _defineProperty$2(_assertThisInitialized(_this), "updatePhoneNumber", function (phoneNumber) {
25267
- _this.setState({
25268
- phoneNumber: phoneNumber
25269
- });
25270
- });
25271
25475
  _defineProperty$2(_assertThisInitialized(_this), "handleInputChange", handleInputChange(_assertThisInitialized(_this)));
25272
25476
  _defineProperty$2(_assertThisInitialized(_this), "saveSettings", saveSettings(_assertThisInitialized(_this)));
25273
25477
  _defineProperty$2(_assertThisInitialized(_this), "yardsHistory", new Map());
25274
- _defineProperty$2(_assertThisInitialized(_this), "setPrinterData", function (name) {
25275
- return function (value) {
25276
- _this.setState(_defineProperty$2({}, name, value));
25277
- };
25278
- });
25279
25478
  return _this;
25280
- } // componentWillMount() {
25281
- // this.fetchRoles(this.state.selectedCountryA3code)
25282
- // getRCExtensionStatus().then((response) => {
25283
- // response && resetPhoneSettingsBasedOnRCStatus(response)
25284
- // this.setState({
25285
- // ringCentralEnabled: ringCentralEnabled(),
25286
- // phoneNumber: activePhoneNumber(),
25287
- // })
25288
- // })
25289
- // this.getActivePrinters(
25290
- // this.state.selectedYardNumber,
25291
- // true,
25292
- // this.state.selectedCountryA3code,
25293
- // )
25294
- // }
25479
+ }
25295
25480
  _createClass$2(SettingsView, [{
25296
- key: "activePrinters",
25297
- get: function get() {
25298
- return {
25299
- barcode_label_printers: this.state.barcode_label_printers,
25300
- check_printers: this.state.check_printers,
25301
- standard_printers: this.state.standard_printers,
25302
- windshield_label_printers: this.state.windshield_label_printers,
25303
- text_printers: this.state.text_printers
25304
- };
25305
- }
25481
+ key: "componentWillMount",
25482
+ value: function () {
25483
+ var _componentWillMount = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
25484
+ var _activeCountryObj$rol2;
25485
+ var userRoles, countries, _this$state, selectedCountry, selectedRole, activeCountryObj, firstRole;
25486
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25487
+ while (1) switch (_context2.prev = _context2.next) {
25488
+ case 0:
25489
+ _context2.next = 2;
25490
+ return getUserRolesFromFetcher();
25491
+ case 2:
25492
+ userRoles = _context2.sent;
25493
+ countries = getAccessCountries(userRoles);
25494
+ _this$state = this.state, selectedCountry = _this$state.selectedCountry, selectedRole = _this$state.selectedRole;
25495
+ if (!selectedCountry) {
25496
+ selectedCountry = head$1(countries) || '';
25497
+ }
25498
+ activeCountryObj = getActiveCountryObjByCountry(userRoles, selectedCountry);
25499
+ this.setState({
25500
+ selectedCountry: (activeCountryObj === null || activeCountryObj === void 0 ? void 0 : activeCountryObj.country) || selectedCountry,
25501
+ countries: countries,
25502
+ roles: (activeCountryObj === null || activeCountryObj === void 0 ? void 0 : activeCountryObj.roles) || [],
25503
+ userRoles: userRoles
25504
+ });
25505
+ if (!(selectedRole && activeCountryObj)) {
25506
+ _context2.next = 13;
25507
+ break;
25508
+ }
25509
+ _context2.next = 11;
25510
+ return this.fetchFacilititesForRole(selectedRole, activeCountryObj);
25511
+ case 11:
25512
+ _context2.next = 19;
25513
+ break;
25514
+ case 13:
25515
+ if (!((activeCountryObj === null || activeCountryObj === void 0 ? void 0 : (_activeCountryObj$rol2 = activeCountryObj.roles) === null || _activeCountryObj$rol2 === void 0 ? void 0 : _activeCountryObj$rol2.length) > 0)) {
25516
+ _context2.next = 19;
25517
+ break;
25518
+ }
25519
+ firstRole = activeCountryObj.roles[0];
25520
+ if (!firstRole) {
25521
+ _context2.next = 19;
25522
+ break;
25523
+ }
25524
+ this.setState({
25525
+ selectedRole: firstRole.roleName
25526
+ });
25527
+ _context2.next = 19;
25528
+ return this.fetchFacilititesForRole(firstRole.roleName, activeCountryObj);
25529
+ case 19:
25530
+ case "end":
25531
+ return _context2.stop();
25532
+ }
25533
+ }, _callee2, this);
25534
+ }));
25535
+ function componentWillMount() {
25536
+ return _componentWillMount.apply(this, arguments);
25537
+ }
25538
+ return componentWillMount;
25539
+ }()
25540
+ }, {
25541
+ key: "componentWillUpdate",
25542
+ value: function () {
25543
+ var _componentWillUpdate = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(nextProps, nextState) {
25544
+ var activeCountryObj, _activeCountryObj;
25545
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
25546
+ while (1) switch (_context3.prev = _context3.next) {
25547
+ case 0:
25548
+ if (!(nextState.selectedCountry !== this.state.selectedCountry)) {
25549
+ _context3.next = 5;
25550
+ break;
25551
+ }
25552
+ this.setState({
25553
+ selectedRole: null,
25554
+ selectedYardNumber: null,
25555
+ selectedYardNumberAndName: null,
25556
+ yardOptions: [],
25557
+ selectedLanguage: null
25558
+ });
25559
+ if (nextState.selectedCountry) {
25560
+ activeCountryObj = getActiveCountryObjByCountry(this.state.userRoles, nextState.selectedCountry);
25561
+ this.setState({
25562
+ roles: (activeCountryObj === null || activeCountryObj === void 0 ? void 0 : activeCountryObj.roles) || []
25563
+ });
25564
+ } else {
25565
+ this.setState({
25566
+ roles: []
25567
+ });
25568
+ }
25569
+ _context3.next = 11;
25570
+ break;
25571
+ case 5:
25572
+ if (!(nextState.selectedRole !== this.state.selectedRole)) {
25573
+ _context3.next = 11;
25574
+ break;
25575
+ }
25576
+ this.setState({
25577
+ selectedYardNumber: null,
25578
+ selectedYardNumberAndName: null
25579
+ });
25580
+ if (!nextState.selectedRole) {
25581
+ _context3.next = 11;
25582
+ break;
25583
+ }
25584
+ _activeCountryObj = getActiveCountryObjByCountry(this.state.userRoles, nextState.selectedCountry);
25585
+ _context3.next = 11;
25586
+ return this.fetchFacilititesForRole(nextState.selectedRole, _activeCountryObj);
25587
+ case 11:
25588
+ case "end":
25589
+ return _context3.stop();
25590
+ }
25591
+ }, _callee3, this);
25592
+ }));
25593
+ function componentWillUpdate(_x3, _x4) {
25594
+ return _componentWillUpdate.apply(this, arguments);
25595
+ }
25596
+ return componentWillUpdate;
25597
+ }()
25306
25598
  }, {
25307
25599
  key: "render",
25308
25600
  value: function render() {
@@ -25310,7 +25602,50 @@ var SettingsView = /*#__PURE__*/function (_React$Component) {
25310
25602
  className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--settingsForm"
25311
25603
  }, this.props.width > 760 && /*#__PURE__*/React__default["default"].createElement(ProfileDetails, {
25312
25604
  logout: this.props.onLogoutItemClicked
25313
- }));
25605
+ }), /*#__PURE__*/React__default["default"].createElement("form", null, /*#__PURE__*/React__default["default"].createElement("div", {
25606
+ className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--settingsHeader"
25607
+ }, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
25608
+ name: "gear",
25609
+ variant: "solid"
25610
+ }), /*#__PURE__*/React__default["default"].createElement("p", null, "Settings")), /*#__PURE__*/React__default["default"].createElement("div", {
25611
+ className: "col-1-1 utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--inputRow",
25612
+ "data-e2e": "LocationAndLanguageRow"
25613
+ }, /*#__PURE__*/React__default["default"].createElement(CountrySelector, {
25614
+ countries: this.state.countries || [],
25615
+ value: this.state.selectedCountry,
25616
+ handleChange: this.handleInputChange.selectedCountry
25617
+ }), /*#__PURE__*/React__default["default"].createElement(RoleSelector, {
25618
+ roles: this.state.roles,
25619
+ value: this.state.selectedRole,
25620
+ handleChange: this.handleInputChange.selectedRole
25621
+ }), /*#__PURE__*/React__default["default"].createElement(YardNumberMenu, {
25622
+ handleChange: this.handleInputChange.selectedYardNumberAndName,
25623
+ value: this.state.selectedYardNumberAndName,
25624
+ yardOptions: this.state.yardOptions
25625
+ }), /*#__PURE__*/React__default["default"].createElement(LanguageMenu, {
25626
+ value: this.state.selectedLanguage,
25627
+ handleChange: this.handleInputChange.selectedLanguage,
25628
+ selectedCountry: this.state.selectedCountry,
25629
+ stack: "c"
25630
+ }))), /*#__PURE__*/React__default["default"].createElement("hr", {
25631
+ className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--settings-hr"
25632
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
25633
+ className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--buttonBox",
25634
+ "data-e2e": "saveButton"
25635
+ }, /*#__PURE__*/React__default["default"].createElement(coreComponents.Button, {
25636
+ primary: true,
25637
+ type: "submit",
25638
+ onClick: this.saveSettings
25639
+ }, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
25640
+ name: "floppy-disk",
25641
+ variant: "regular"
25642
+ }), /*#__PURE__*/React__default["default"].createElement("span", {
25643
+ className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--saveTxt"
25644
+ }, "Save"))), this.state.showLoading && /*#__PURE__*/React__default["default"].createElement("div", {
25645
+ className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--spinner"
25646
+ }, /*#__PURE__*/React__default["default"].createElement(coreComponents.Spinner, {
25647
+ size: "60px"
25648
+ })));
25314
25649
  }
25315
25650
  }]);
25316
25651
  return SettingsView;
@@ -68500,12 +68835,13 @@ var formatNumber = function formatNumber(number) {
68500
68835
  return sign * Math.abs(number) + unitlist[unit];
68501
68836
  };
68502
68837
 
68503
- var css_248z$2 = ".utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer {\r\n display: flex;\r\n flex-direction: column;\r\n position: absolute;\r\n background: #3A4454;\r\n min-width: 50px;\r\n max-width: 50px;\r\n height: 100%;\r\n color: #ffffff;\r\n font-size: 14px;\r\n z-index: 101;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts {\r\n min-width: 100px;\r\n max-width: 100px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader {\r\n min-width: 0px;\r\n max-width: 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen {\r\n max-width: 500px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons{\r\n min-width: auto;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton{\r\n min-width: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu {\r\n flex: 1;\r\n overflow-y: auto;\r\n -ms-overflow-style: none;\r\n scrollbar-width: none;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu::-webkit-scrollbar { \r\n display: none;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n display: flex;\r\n width: 100%;\r\n padding: 6px 12px 6px 12px;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled {\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected {\r\n color: #323130;\r\n background-color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus {\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-left: auto;\r\n margin-right: 10px;\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px;\r\n text-align: right;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable:not(:hover) .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: auto;\r\n text-align: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px !important;\r\n text-align: right !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--expandedMenu {\r\n background-color: #73A6FF;\r\n transition: background-color 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n margin-left: auto;\r\n font-size: 12px;\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount {\r\n margin: 0 10px 0 auto;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n min-width: 20px;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\r\n font-size: 14px;\r\n /* width: 20px; */\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i{\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 0px;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons i{\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 0;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n margin-top: 2px;\r\n font-weight: 100;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 100%;\r\n margin: 2px 10px 0 10px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 100%;\r\n margin: 0 5px 0 0;\r\n font-weight: 600;\r\n margin-left: 0px;\r\n cursor: auto;\r\n cursor: initial;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n margin: 0;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n margin-right: 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n padding-left: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName > span {\r\n display: inline;\r\n display: initial;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel2 {\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 {\r\n display: flex;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n padding: 6px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--statusColor {\r\n position: absolute;\r\n width: 10px;\r\n height: 95%;\r\n left: -13px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem {\r\n width: 13px;\r\n margin-left: 1px;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem {\r\n width: 100%;\r\n margin-left: 1px;\r\n transition-delay: 0.25s;\r\n}";
68838
+ var css_248z$2 = ".utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer {\r\n display: flex;\r\n flex-direction: column;\r\n position: absolute;\r\n background: #3A4454;\r\n min-width: 50px;\r\n max-width: 50px;\r\n height: 100%;\r\n color: #ffffff;\r\n font-size: 14px;\r\n z-index: 101;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu {\r\n min-width: 70px;\r\n max-width: 70px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts {\r\n min-width: 100px;\r\n max-width: 100px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader {\r\n min-width: 0px;\r\n max-width: 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen {\r\n max-width: 500px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons{\r\n min-width: auto;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton{\r\n min-width: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu {\r\n flex: 1;\r\n overflow-y: auto;\r\n -ms-overflow-style: none;\r\n scrollbar-width: none;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu::-webkit-scrollbar { \r\n display: none;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n display: flex;\r\n width: 100%;\r\n padding: 6px 12px 6px 12px;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled {\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected {\r\n color: #323130;\r\n background-color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus {\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-left: auto;\r\n margin-right: 10px;\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px;\r\n text-align: right;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable:not(:hover) .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: auto;\r\n text-align: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px !important;\r\n text-align: right !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--expandedMenu {\r\n background-color: #73A6FF;\r\n transition: background-color 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n margin-left: auto;\r\n font-size: 12px;\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount {\r\n margin: 0 10px 0 auto;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n min-width: 20px;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\r\n font-size: 14px;\r\n /* width: 20px; */\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i{\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemSelectedStatus .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1NoHover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-right: 6px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 0px;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 0;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n margin-top: 2px;\r\n font-weight: 100;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 100%;\r\n margin: 2px 10px 0 10px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--disabled .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n color: #A19F9D;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n max-width: 100%;\r\n margin: 0 5px 0 0;\r\n font-weight: 600;\r\n margin-left: 0px;\r\n cursor: auto;\r\n cursor: initial;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\r\n margin: 0;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n margin-right: 0px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n padding-left: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName > span {\r\n display: inline;\r\n display: initial;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n margin-left: auto;\r\n margin-right: 10px;\r\n min-width: none;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px;\r\n text-align: right;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--countsAvailable:not(:hover) .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: auto;\r\n text-align: auto;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\r\n min-width: 70px !important;\r\n text-align: right !important;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\r\n margin-left: auto;\r\n font-size: 12px;\r\n color: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n color: #323130;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton.utilities_ops-app-frame_NavigationBar_NavigationBar--showExpandIcons i{\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i{\r\n font-size: 12px;\r\n transition-delay: 0.25s;\r\n}\r\n\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel2 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\r\n margin-right: 6px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 {\r\n display: flex;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\r\n padding: 6px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--statusColor {\r\n position: absolute;\r\n width: 10px;\r\n height: 95%;\r\n left: -13px;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem {\r\n width: 13px;\r\n margin-left: 1px;\r\n transition: all 0.5s ease-in-out;\r\n}\r\n\r\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem, .utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer.utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen .utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem {\r\n width: 100%;\r\n margin-left: 1px;\r\n transition-delay: 0.25s;\r\n}";
68504
68839
  styleInject(css_248z$2);
68505
68840
 
68506
68841
  var _styleModuleImportMap$1 = {
68507
68842
  "./NavigationBar.css": {
68508
68843
  "NavBarContainer": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer",
68844
+ "level3Menu": "utilities_ops-app-frame_NavigationBar_NavigationBar--level3Menu",
68509
68845
  "withCounts": "utilities_ops-app-frame_NavigationBar_NavigationBar--withCounts",
68510
68846
  "showNavIconInHeader": "utilities_ops-app-frame_NavigationBar_NavigationBar--showNavIconInHeader",
68511
68847
  "navBarOpen": "utilities_ops-app-frame_NavigationBar_NavigationBar--navBarOpen",
@@ -68521,6 +68857,7 @@ var _styleModuleImportMap$1 = {
68521
68857
  "selected": "utilities_ops-app-frame_NavigationBar_NavigationBar--selected",
68522
68858
  "NavItemCount": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount",
68523
68859
  "NavItemIcon": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon",
68860
+ "NavMenuLevel1NoHover": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1NoHover",
68524
68861
  "NavItemName": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName",
68525
68862
  "NavMenuLevel1": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1",
68526
68863
  "NavMenuLevel2": "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel2",
@@ -68571,10 +68908,14 @@ var getDepth = function getDepth(navItems) {
68571
68908
  };
68572
68909
  var validateConfig = function validateConfig(navItems) {
68573
68910
  var maxDepth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
68911
+ var showLevel3Navigation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
68574
68912
  var mandatoryKeys = ['name', 'route'];
68575
68913
  if (navItems.length === 0) return false;
68576
68914
  var depth = getDepth(navItems);
68577
68915
  if (depth > maxDepth) return false;
68916
+
68917
+ // If showLevel3Navigation is true, config must have exactly 3 levels
68918
+ if (showLevel3Navigation && depth !== 3) return false;
68578
68919
  navItems.map(function (item) {
68579
68920
  var configItem = _objectSpread2({}, item);
68580
68921
  if (!configItem.isLandingPage && mandatoryKeys.every(function (key) {
@@ -68584,7 +68925,7 @@ var validateConfig = function validateConfig(navItems) {
68584
68925
  return false;
68585
68926
  }
68586
68927
  if (configItem.subMenuItems) {
68587
- validateConfig(configItem.subMenuItems, maxDepth - 1);
68928
+ validateConfig(configItem.subMenuItems, maxDepth - 1, showLevel3Navigation);
68588
68929
  }
68589
68930
  });
68590
68931
  return true;
@@ -68619,14 +68960,16 @@ var NavigationBar = function NavigationBar(_ref2) {
68619
68960
  countAutoReloadDisabled = _ref2.countAutoReloadDisabled,
68620
68961
  onNavSectionToggle = _ref2.onNavSectionToggle,
68621
68962
  showNavIconInHeader = _ref2.showNavIconInHeader,
68622
- isNavBarOpen = _ref2.isNavBarOpen;
68963
+ isNavBarOpen = _ref2.isNavBarOpen,
68964
+ _ref2$showLevel3Navig = _ref2.showLevel3Navigation,
68965
+ showLevel3Navigation = _ref2$showLevel3Navig === void 0 ? false : _ref2$showLevel3Navig;
68623
68966
  // const withCounts = getCounts && typeof getCounts === 'function'
68624
68967
  var navigateFunction = navigateTo || (history === null || history === void 0 ? void 0 : history.push) || defaultRedirect;
68625
68968
  var _useState = React.useState(null),
68626
68969
  _useState2 = _slicedToArray(_useState, 2),
68627
68970
  navItemsModified = _useState2[0],
68628
68971
  setNavItemsModified = _useState2[1];
68629
- var _useState3 = React.useState(false),
68972
+ var _useState3 = React.useState(showLevel3Navigation ? showNavIconInHeader : false),
68630
68973
  _useState4 = _slicedToArray(_useState3, 2),
68631
68974
  isHover = _useState4[0],
68632
68975
  setHover = _useState4[1];
@@ -68648,7 +68991,7 @@ var NavigationBar = function NavigationBar(_ref2) {
68648
68991
  setWithCounts = _useState12[1];
68649
68992
  React.useEffect(function () {
68650
68993
  if (Array.isArray(navItems)) {
68651
- var isValid = validateConfig(navItems);
68994
+ var isValid = validateConfig(navItems, 3, showLevel3Navigation);
68652
68995
  if (isValid) {
68653
68996
  var updatedNavItems = updateRoutes(navItems, '');
68654
68997
  var depth = getDepth(navItems);
@@ -68669,18 +69012,19 @@ var NavigationBar = function NavigationBar(_ref2) {
68669
69012
  } else {
68670
69013
  setConfigValid(false);
68671
69014
  }
68672
- }, []);
69015
+ }, [showLevel3Navigation]);
68673
69016
  React.useEffect(function () {
68674
69017
  setShowNavigationCounts(withCounts);
68675
69018
  }, [withCounts]);
69019
+ var isCountLevelActiveSubmenu = showLevel3Navigation && configDepth === 3 ? activeSubmenu.length > 1 : activeSubmenu.length > 0;
68676
69020
  return /*#__PURE__*/React__default["default"].createElement("div", {
68677
69021
  onMouseOver: function onMouseOver() {
68678
- return setHover(true);
69022
+ return !showLevel3Navigation || !showNavIconInHeader ? setHover(true) : null;
68679
69023
  },
68680
69024
  onMouseLeave: function onMouseLeave() {
68681
- return setHover(false);
69025
+ return !showLevel3Navigation || !showNavIconInHeader ? setHover(false) : null;
68682
69026
  },
68683
- className: _getClassName("NavBarContainer ".concat(activeSubmenu !== null && activeSubmenu !== void 0 && activeSubmenu.length && withCounts ? 'withCounts' : '', " ").concat(getCounts && typeof getCounts === 'function' ? 'countsAvailable' : '', " ").concat(showNavIconInHeader ? 'showNavIconInHeader' : '', " ").concat(showNavIconInHeader && isNavBarOpen ? 'navBarOpen' : ''), _styleModuleImportMap$1, {
69027
+ className: _getClassName("NavBarContainer ".concat(isCountLevelActiveSubmenu && withCounts ? 'withCounts' : '', " ").concat(getCounts && typeof getCounts === 'function' ? 'countsAvailable' : '', " ").concat(showNavIconInHeader ? 'showNavIconInHeader' : '', " ").concat(showNavIconInHeader && isNavBarOpen ? 'navBarOpen' : '', " ").concat(showLevel3Navigation && configDepth === 3 ? 'level3Menu' : ''), _styleModuleImportMap$1, {
68684
69028
  "handleMissingStyleName": "warn"
68685
69029
  })
68686
69030
  }, isConfigValid ? /*#__PURE__*/React__default["default"].createElement(NavigationMenu, {
@@ -68698,7 +69042,8 @@ var NavigationBar = function NavigationBar(_ref2) {
68698
69042
  withCounts: withCounts,
68699
69043
  countsRef: countsRef,
68700
69044
  countAutoReloadDisabled: countAutoReloadDisabled,
68701
- onNavSectionToggle: onNavSectionToggle
69045
+ onNavSectionToggle: onNavSectionToggle,
69046
+ showLevel3Navigation: showLevel3Navigation
68702
69047
  }) : null, isConfigValid === false ? /*#__PURE__*/React__default["default"].createElement("div", null, "Please check your navigation config") : null);
68703
69048
  };
68704
69049
  var NavigationMenu = function NavigationMenu(_ref3) {
@@ -68716,7 +69061,9 @@ var NavigationMenu = function NavigationMenu(_ref3) {
68716
69061
  withCounts = _ref3.withCounts,
68717
69062
  countsRef = _ref3.countsRef,
68718
69063
  countAutoReloadDisabled = _ref3.countAutoReloadDisabled,
68719
- onNavSectionToggle = _ref3.onNavSectionToggle;
69064
+ onNavSectionToggle = _ref3.onNavSectionToggle,
69065
+ _ref3$showLevel3Navig = _ref3.showLevel3Navigation,
69066
+ showLevel3Navigation = _ref3$showLevel3Navig === void 0 ? false : _ref3$showLevel3Navig;
68720
69067
  var redirectUrl = window.location.pathname;
68721
69068
  var _useState13 = React.useState(null),
68722
69069
  _useState14 = _slicedToArray(_useState13, 2),
@@ -68759,6 +69106,15 @@ var NavigationMenu = function NavigationMenu(_ref3) {
68759
69106
  }
68760
69107
  }
68761
69108
  }, [configDepth, redirectUrl]);
69109
+ var reloadCounts = function reloadCounts(menuItemName, setCountsLoading) {
69110
+ getCounts(menuItemName).then(function (result) {
69111
+ setCounts(result);
69112
+ setWithCounts(!isEmpty$2(result));
69113
+ if (setCountsLoading) setCountsLoading(false);
69114
+ }).catch(function () {
69115
+ if (setCountsLoading) setCountsLoading(false);
69116
+ });
69117
+ };
68762
69118
  return /*#__PURE__*/React__default["default"].createElement("div", {
68763
69119
  className: _getClassName("NavMenu", _styleModuleImportMap$1, {
68764
69120
  "handleMissingStyleName": "warn"
@@ -68786,7 +69142,10 @@ var NavigationMenu = function NavigationMenu(_ref3) {
68786
69142
  onNavSectionToggle: onNavSectionToggle,
68787
69143
  counts: counts,
68788
69144
  setCounts: setCounts,
68789
- countLoadAttemptsRef: countLoadAttemptsRef
69145
+ countLoadAttemptsRef: countLoadAttemptsRef,
69146
+ configDepth: configDepth,
69147
+ reloadCounts: reloadCounts,
69148
+ showLevel3Navigation: showLevel3Navigation
68790
69149
  });
68791
69150
  }));
68792
69151
  };
@@ -68808,15 +69167,95 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref4) {
68808
69167
  onNavSectionToggle = _ref4.onNavSectionToggle,
68809
69168
  counts = _ref4.counts,
68810
69169
  setCounts = _ref4.setCounts,
68811
- countLoadAttemptsRef = _ref4.countLoadAttemptsRef;
69170
+ countLoadAttemptsRef = _ref4.countLoadAttemptsRef,
69171
+ configDepth = _ref4.configDepth,
69172
+ reloadCounts = _ref4.reloadCounts,
69173
+ _ref4$showLevel3Navig = _ref4.showLevel3Navigation,
69174
+ showLevel3Navigation = _ref4$showLevel3Navig === void 0 ? false : _ref4$showLevel3Navig;
69175
+ var isMenuExpanded = showLevel3Navigation ? activeSubmenu.includes(navItem.fullRoute) : false;
69176
+ var showCounts = showLevel3Navigation && isMenuExpanded && getCounts && typeof getCounts === 'function';
69177
+ var _useState15 = React.useState(false),
69178
+ _useState16 = _slicedToArray(_useState15, 2);
69179
+ _useState16[0];
69180
+ var setCountsLoading = _useState16[1];
68812
69181
  var hasSubMenuItems = navItem.subMenuItems && navItem.subMenuItems.length > 0;
69182
+ var isDisabled = showLevel3Navigation ? typeof navItem.disabled === 'function' ? navItem.disabled() : navItem.disabled : false;
68813
69183
  var shortName = navItem.shortName ? navItem.shortName.toUpperCase() : dotIcon;
68814
69184
  var nameText = isHover ? (_navItem$name = navItem.name) === null || _navItem$name === void 0 ? void 0 : _navItem$name.toUpperCase() : shortName;
69185
+ React.useEffect(function () {
69186
+ if (showLevel3Navigation && showCounts) {
69187
+ if (!countAutoReloadDisabled || (countLoadAttemptsRef === null || countLoadAttemptsRef === void 0 ? void 0 : countLoadAttemptsRef.current) === 0) {
69188
+ countLoadAttemptsRef.current++;
69189
+ setCountsLoading(true);
69190
+ reloadCounts(navItem.route, setCountsLoading);
69191
+ }
69192
+ }
69193
+ }, [showLevel3Navigation, activeSubmenu]);
69194
+ var navigateToItem = function navigateToItem(item) {
69195
+ setSelected(item.fullRoute);
69196
+ navigateFunction(item.fullRoute);
69197
+ };
69198
+ var handleItemClick = function handleItemClick(event) {
69199
+ if (showLevel3Navigation) {
69200
+ event.stopPropagation();
69201
+ if (isDisabled) return;
69202
+ if (hasSubMenuItems) {
69203
+ if (!isMenuExpanded) {
69204
+ setActiveSubmenu(function (menuItems) {
69205
+ return allowMultipleNavItemsOpen ? [].concat(_toConsumableArray(menuItems), [navItem.fullRoute]) : [navItem.fullRoute];
69206
+ });
69207
+ onNavSectionToggle(navItem.route, true);
69208
+ } else {
69209
+ setActiveSubmenu(function (menuItems) {
69210
+ return _toConsumableArray(menuItems).filter(function (item) {
69211
+ return item !== navItem.fullRoute;
69212
+ });
69213
+ });
69214
+ onNavSectionToggle(navItem.route, false);
69215
+ }
69216
+ if (!isMenuExpanded && showCounts && !countAutoReloadDisabled) {
69217
+ reloadCounts(undefined, setCountsLoading);
69218
+ }
69219
+ } else {
69220
+ navigateToItem(navItem);
69221
+ var pathSplit = window.location.pathname.split('/');
69222
+ var path = "/".concat(pathSplit[pathSplit.length - 1]);
69223
+ if (path === navItem.fullRoute && !allowMultipleNavItemsOpen) {
69224
+ setActiveSubmenu([navItem.fullRoute]);
69225
+ }
69226
+ }
69227
+ }
69228
+ };
69229
+ var highlight = false;
69230
+ if (showLevel3Navigation) {
69231
+ if (navItem !== null && navItem !== void 0 && navItem.subMenuItems || !allowMultipleNavItemsOpen) {
69232
+ highlight = isMenuExpanded;
69233
+ } else if (allowMultipleNavItemsOpen) {
69234
+ highlight = selected === navItem.fullRoute;
69235
+ }
69236
+ }
69237
+
69238
+ // Check if highlightMenu prop is true and highlight is false
69239
+ var shouldShowHighlightBackground = showLevel3Navigation && navItem.highlightMenu === true && !highlight;
69240
+
69241
+ // Use highlightMenuColor if it's a string, otherwise use default red color
69242
+ var backgroundColor = shouldShowHighlightBackground ? typeof navItem.highlightMenuColor === 'string' ? navItem.highlightMenuColor : statusColors[1] : '';
68815
69243
  return /*#__PURE__*/React__default["default"].createElement("div", {
68816
- className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1"
69244
+ animate: showLevel3Navigation && isMenuExpanded ? 'open' : 'closed',
69245
+ className: _getClassName("NavMenuLevel1".concat(showLevel3Navigation && !isHover && configDepth === 3 ? ' NavMenuLevel1NoHover' : ''), _styleModuleImportMap$1, {
69246
+ "handleMissingStyleName": "warn"
69247
+ })
68817
69248
  }, /*#__PURE__*/React__default["default"].createElement("div", {
68818
- className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem"
68819
- }, navItem.icon && /*#__PURE__*/React__default["default"].createElement("div", {
69249
+ onClick: showLevel3Navigation ? function (event) {
69250
+ return handleItemClick(event);
69251
+ } : undefined,
69252
+ style: {
69253
+ backgroundColor: backgroundColor
69254
+ },
69255
+ className: _getClassName("NavItem ".concat(showLevel3Navigation && highlight && configDepth < 3 ? 'expandedMenu' : '', " ").concat(selected === navItem.fullRoute && navItem !== null && navItem !== void 0 && navItem.subMenuItems ? 'NavItemSelected' : '', " ").concat(isDisabled ? 'disabled' : ''), _styleModuleImportMap$1, {
69256
+ "handleMissingStyleName": "warn"
69257
+ })
69258
+ }, showLevel3Navigation ? null : navItem.icon && /*#__PURE__*/React__default["default"].createElement("div", {
68820
69259
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon"
68821
69260
  }, /*#__PURE__*/React__default["default"].createElement(NavIcon, {
68822
69261
  icon: navItem.icon
@@ -68824,7 +69263,44 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref4) {
68824
69263
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem"
68825
69264
  }, nameText), navItem.hasOwnProperty('count') && /*#__PURE__*/React__default["default"].createElement("div", {
68826
69265
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount"
68827
- }, navItem.count)), /*#__PURE__*/React__default["default"].createElement("div", null, hasSubMenuItems ? navItem.subMenuItems.filter(function (item) {
69266
+ }, navItem.count), showLevel3Navigation && /*#__PURE__*/React__default["default"].createElement("div", {
69267
+ className: _getClassName("expandButton ".concat(activeSubmenu !== null && activeSubmenu !== void 0 && activeSubmenu.length && withCounts ? 'showExpandIcons' : ''), _styleModuleImportMap$1, {
69268
+ "handleMissingStyleName": "warn"
69269
+ })
69270
+ }, hasSubMenuItems && /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
69271
+ name: isMenuExpanded ? 'chevron-up' : 'chevron-down'
69272
+ }))), showLevel3Navigation && /*#__PURE__*/React__default["default"].createElement(velocityReact.VelocityTransitionGroup, {
69273
+ enter: {
69274
+ animation: 'slideDown',
69275
+ duration: 200,
69276
+ display: 'flex',
69277
+ complete: function complete(elements) {
69278
+ elements.forEach(function (el) {
69279
+ el.style.removeProperty("height");
69280
+ });
69281
+ }
69282
+ },
69283
+ leave: {
69284
+ animation: 'slideUp',
69285
+ duration: 200,
69286
+ complete: function complete(elements) {
69287
+ elements.forEach(function (el) {
69288
+ el.style.removeProperty("height");
69289
+ });
69290
+ }
69291
+ },
69292
+ style: _objectSpread2({
69293
+ marginTop: '3px',
69294
+ overflow: 'hidden',
69295
+ padding: '0 2px'
69296
+ }, configDepth === 3 ? {
69297
+ backgroundColor: '#2F3743'
69298
+ } : {
69299
+ marginLeft: '10px',
69300
+ backgroundColor: '#232932',
69301
+ borderLeft: '1px solid #8A8886'
69302
+ })
69303
+ }, hasSubMenuItems && isMenuExpanded ? navItem.subMenuItems.filter(function (item) {
68828
69304
  return typeof item.hidden === 'function' ? !item.hidden() : !item.hidden;
68829
69305
  }).map(function (subItem) {
68830
69306
  return /*#__PURE__*/React__default["default"].createElement(NavigationMenuLevel2, {
@@ -68845,7 +69321,36 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref4) {
68845
69321
  onNavSectionToggle: onNavSectionToggle,
68846
69322
  counts: counts,
68847
69323
  setCounts: setCounts,
68848
- countLoadAttemptsRef: countLoadAttemptsRef
69324
+ countLoadAttemptsRef: countLoadAttemptsRef,
69325
+ configDepth: configDepth,
69326
+ reloadCounts: reloadCounts,
69327
+ showLevel3Navigation: showLevel3Navigation
69328
+ });
69329
+ }) : null), !showLevel3Navigation && /*#__PURE__*/React__default["default"].createElement("div", null, hasSubMenuItems ? navItem.subMenuItems.filter(function (item) {
69330
+ return typeof item.hidden === 'function' ? !item.hidden() : !item.hidden;
69331
+ }).map(function (subItem) {
69332
+ return /*#__PURE__*/React__default["default"].createElement(NavigationMenuLevel2, {
69333
+ key: subItem.name,
69334
+ isHover: isHover,
69335
+ navItem: subItem,
69336
+ selected: selected,
69337
+ setSelected: setSelected,
69338
+ activeSubmenu: activeSubmenu,
69339
+ setActiveSubmenu: setActiveSubmenu,
69340
+ allowMultipleNavItemsOpen: allowMultipleNavItemsOpen,
69341
+ navigateFunction: navigateFunction,
69342
+ getCounts: getCounts,
69343
+ setWithCounts: setWithCounts,
69344
+ withCounts: withCounts,
69345
+ countsRef: countsRef,
69346
+ countAutoReloadDisabled: countAutoReloadDisabled,
69347
+ onNavSectionToggle: onNavSectionToggle,
69348
+ counts: counts,
69349
+ setCounts: setCounts,
69350
+ countLoadAttemptsRef: countLoadAttemptsRef,
69351
+ configDepth: configDepth,
69352
+ reloadCounts: reloadCounts,
69353
+ showLevel3Navigation: showLevel3Navigation
68849
69354
  });
68850
69355
  }) : null));
68851
69356
  };
@@ -68863,23 +69368,27 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
68863
69368
  setActiveSubmenu = _ref5.setActiveSubmenu,
68864
69369
  allowMultipleNavItemsOpen = _ref5.allowMultipleNavItemsOpen,
68865
69370
  navigateFunction = _ref5.navigateFunction,
68866
- getCounts = _ref5.getCounts,
68867
- setWithCounts = _ref5.setWithCounts,
68868
- withCounts = _ref5.withCounts,
69371
+ getCounts = _ref5.getCounts;
69372
+ _ref5.setWithCounts;
69373
+ var withCounts = _ref5.withCounts,
68869
69374
  countsRef = _ref5.countsRef,
68870
69375
  countAutoReloadDisabled = _ref5.countAutoReloadDisabled,
68871
69376
  _ref5$onNavSectionTog = _ref5.onNavSectionToggle,
68872
69377
  onNavSectionToggle = _ref5$onNavSectionTog === void 0 ? function () {} : _ref5$onNavSectionTog,
68873
- counts = _ref5.counts,
68874
- setCounts = _ref5.setCounts,
68875
- countLoadAttemptsRef = _ref5.countLoadAttemptsRef;
69378
+ counts = _ref5.counts;
69379
+ _ref5.setCounts;
69380
+ var countLoadAttemptsRef = _ref5.countLoadAttemptsRef,
69381
+ configDepth = _ref5.configDepth,
69382
+ reloadCounts = _ref5.reloadCounts,
69383
+ _ref5$showLevel3Navig = _ref5.showLevel3Navigation,
69384
+ showLevel3Navigation = _ref5$showLevel3Navig === void 0 ? false : _ref5$showLevel3Navig;
68876
69385
  // const isMenuExpanded = activeSubmenu === navItem.fullRoute
68877
69386
  var isMenuExpanded = activeSubmenu.includes(navItem.fullRoute);
68878
69387
  var showCounts = isMenuExpanded && getCounts && typeof getCounts === 'function';
68879
- var _useState15 = React.useState(false),
68880
- _useState16 = _slicedToArray(_useState15, 2),
68881
- countsLoading = _useState16[0],
68882
- setCountsLoading = _useState16[1];
69388
+ var _useState17 = React.useState(false),
69389
+ _useState18 = _slicedToArray(_useState17, 2),
69390
+ countsLoading = _useState18[0],
69391
+ setCountsLoading = _useState18[1];
68883
69392
  var hasSubMenuItems = navItem.subMenuItems && navItem.subMenuItems.length > 0;
68884
69393
  var isDisabled = typeof navItem.disabled === 'function' ? navItem.disabled() : navItem.disabled;
68885
69394
  // const withCounts = getCounts && typeof getCounts === 'function'
@@ -68889,36 +69398,39 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
68889
69398
  if (!countAutoReloadDisabled || (countLoadAttemptsRef === null || countLoadAttemptsRef === void 0 ? void 0 : countLoadAttemptsRef.current) === 0) {
68890
69399
  countLoadAttemptsRef.current++;
68891
69400
  setCountsLoading(true);
68892
- reloadCounts(navItem.route);
69401
+ reloadCounts(navItem.route, setCountsLoading);
68893
69402
  }
68894
69403
  if (countsRef && _typeof$1(countsRef) === 'object') {
68895
69404
  countsRef.current = {
68896
69405
  refreshCounts: function refreshCounts() {
68897
- return reloadCounts(navItem.route);
69406
+ return reloadCounts(navItem.route, setCountsLoading);
68898
69407
  }
68899
69408
  };
68900
69409
  }
68901
69410
  }
68902
69411
  }, [activeSubmenu]);
68903
- var reloadCounts = function reloadCounts(menuItemName) {
68904
- getCounts(menuItemName).then(function (result) {
68905
- setCounts(result);
68906
- setWithCounts(!isEmpty$2(result));
68907
- setCountsLoading(false);
68908
- }).catch(function () {
68909
- setCountsLoading(false);
68910
- });
68911
- };
68912
69412
  var navigateToItem = function navigateToItem(item) {
68913
69413
  setSelected(item.fullRoute);
68914
69414
  navigateFunction(item.fullRoute);
68915
69415
  };
68916
- var handleItemClick = function handleItemClick() {
69416
+ var handleItemClick = function handleItemClick(event) {
69417
+ event.stopPropagation();
68917
69418
  if (isDisabled) return;
68918
69419
  if (hasSubMenuItems) {
68919
69420
  if (!isMenuExpanded) {
68920
69421
  setActiveSubmenu(function (menuItems) {
68921
- return allowMultipleNavItemsOpen ? [].concat(_toConsumableArray(menuItems), [navItem.fullRoute]) : [navItem.fullRoute];
69422
+ if (allowMultipleNavItemsOpen) {
69423
+ return [].concat(_toConsumableArray(menuItems), [navItem.fullRoute]);
69424
+ } else {
69425
+ // When allowMultipleNavItemsOpen is false, replace with current item
69426
+ // But preserve parent Level1 route in 3-level config
69427
+ if (showLevel3Navigation && configDepth === 3) {
69428
+ var parentRoute = navItem.fullRoute.split('/').slice(0, 2).join('/');
69429
+ return [parentRoute, navItem.fullRoute];
69430
+ } else {
69431
+ return [navItem.fullRoute];
69432
+ }
69433
+ }
68922
69434
  });
68923
69435
  onNavSectionToggle(navItem.route, true);
68924
69436
  } else {
@@ -68931,14 +69443,21 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
68931
69443
  }
68932
69444
  // setActiveSubmenu(isMenuExpanded ? null : navItem.fullRoute)
68933
69445
  if (!isMenuExpanded && showCounts && !countAutoReloadDisabled) {
68934
- reloadCounts();
69446
+ reloadCounts(undefined, setCountsLoading);
68935
69447
  }
68936
69448
  } else {
68937
69449
  navigateToItem(navItem);
68938
69450
  var pathSplit = window.location.pathname.split('/');
68939
69451
  var path = "/".concat(pathSplit[pathSplit.length - 1]);
68940
69452
  if (path === navItem.fullRoute && !allowMultipleNavItemsOpen) {
68941
- setActiveSubmenu([navItem.fullRoute]);
69453
+ // When allowMultipleNavItemsOpen is false, set active submenu
69454
+ // But preserve parent Level1 route in 3-level config
69455
+ if (showLevel3Navigation && configDepth === 3) {
69456
+ var parentRoute = navItem.fullRoute.split('/').slice(0, 2).join('/');
69457
+ setActiveSubmenu([parentRoute, navItem.fullRoute]);
69458
+ } else {
69459
+ setActiveSubmenu([navItem.fullRoute]);
69460
+ }
68942
69461
  }
68943
69462
  }
68944
69463
  };
@@ -68956,9 +69475,14 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
68956
69475
  var backgroundColor = shouldShowHighlightBackground ? typeof navItem.highlightMenuColor === 'string' ? navItem.highlightMenuColor : statusColors[1] : '';
68957
69476
  return /*#__PURE__*/React__default["default"].createElement("div", {
68958
69477
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel2",
68959
- animate: isMenuExpanded ? 'open' : 'closed'
69478
+ animate: isMenuExpanded ? 'open' : 'closed',
69479
+ style: {
69480
+ flexDirection: 'column'
69481
+ }
68960
69482
  }, /*#__PURE__*/React__default["default"].createElement("div", {
68961
- onClick: handleItemClick,
69483
+ onClick: function onClick(event) {
69484
+ return handleItemClick(event);
69485
+ },
68962
69486
  style: {
68963
69487
  backgroundColor: backgroundColor
68964
69488
  },
@@ -69015,7 +69539,13 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
69015
69539
  count: counts && counts[subItem.route],
69016
69540
  countsLoading: countsLoading,
69017
69541
  selected: selected,
69018
- navigateToItem: navigateToItem
69542
+ navigateToItem: navigateToItem,
69543
+ configDepth: configDepth,
69544
+ activeSubmenu: activeSubmenu,
69545
+ setActiveSubmenu: setActiveSubmenu,
69546
+ allowMultipleNavItemsOpen: allowMultipleNavItemsOpen,
69547
+ onNavSectionToggle: onNavSectionToggle,
69548
+ showLevel3Navigation: showLevel3Navigation
69019
69549
  });
69020
69550
  }) : null));
69021
69551
  };
@@ -69025,7 +69555,15 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref6) {
69025
69555
  countsLoading = _ref6.countsLoading,
69026
69556
  isHover = _ref6.isHover,
69027
69557
  selected = _ref6.selected,
69028
- navigateToItem = _ref6.navigateToItem;
69558
+ navigateToItem = _ref6.navigateToItem,
69559
+ configDepth = _ref6.configDepth,
69560
+ activeSubmenu = _ref6.activeSubmenu,
69561
+ setActiveSubmenu = _ref6.setActiveSubmenu,
69562
+ allowMultipleNavItemsOpen = _ref6.allowMultipleNavItemsOpen,
69563
+ _ref6$onNavSectionTog = _ref6.onNavSectionToggle,
69564
+ onNavSectionToggle = _ref6$onNavSectionTog === void 0 ? function () {} : _ref6$onNavSectionTog,
69565
+ _ref6$showLevel3Navig = _ref6.showLevel3Navigation,
69566
+ showLevel3Navigation = _ref6$showLevel3Navig === void 0 ? false : _ref6$showLevel3Navig;
69029
69567
  var countText = !isHover ? formatNumber(count) : count;
69030
69568
  var status, statusColor;
69031
69569
  if (countText && navItem.getStatus && navItem.getStatus) {
@@ -69034,21 +69572,75 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref6) {
69034
69572
  }
69035
69573
  var position = (navItem === null || navItem === void 0 ? void 0 : navItem.statusColorPosition) || '';
69036
69574
  var isDisabled = typeof navItem.disabled === 'function' ? navItem.disabled() : navItem.disabled;
69575
+
69576
+ // In 2-level config, Level3 should behave like Level2
69577
+ var isLevel2Style = showLevel3Navigation && configDepth === 2;
69578
+ var isMenuExpanded = isLevel2Style ? activeSubmenu.includes(navItem.fullRoute) : false;
69579
+ var hasSubMenuItems = navItem.subMenuItems && navItem.subMenuItems.length > 0;
69580
+ var handleItemClick = function handleItemClick(event) {
69581
+ if (isLevel2Style) {
69582
+ event.stopPropagation();
69583
+ if (isDisabled) return;
69584
+ if (hasSubMenuItems) {
69585
+ if (!isMenuExpanded) {
69586
+ setActiveSubmenu(function (menuItems) {
69587
+ if (allowMultipleNavItemsOpen) {
69588
+ return [].concat(_toConsumableArray(menuItems), [navItem.fullRoute]);
69589
+ } else {
69590
+ return [navItem.fullRoute];
69591
+ }
69592
+ });
69593
+ onNavSectionToggle(navItem.route, true);
69594
+ } else {
69595
+ setActiveSubmenu(function (menuItems) {
69596
+ return _toConsumableArray(menuItems).filter(function (item) {
69597
+ return item !== navItem.fullRoute;
69598
+ });
69599
+ });
69600
+ onNavSectionToggle(navItem.route, false);
69601
+ }
69602
+ } else {
69603
+ navigateToItem(navItem);
69604
+ var pathSplit = window.location.pathname.split('/');
69605
+ var path = "/".concat(pathSplit[pathSplit.length - 1]);
69606
+ if (path === navItem.fullRoute && !allowMultipleNavItemsOpen) {
69607
+ setActiveSubmenu([navItem.fullRoute]);
69608
+ }
69609
+ }
69610
+ } else {
69611
+ // Original Level3 behavior for 3-level config
69612
+ if (!isDisabled) navigateToItem(navItem);
69613
+ }
69614
+ };
69615
+ var highlight = false;
69616
+ if (isLevel2Style) {
69617
+ if (navItem !== null && navItem !== void 0 && navItem.subMenuItems || !allowMultipleNavItemsOpen) {
69618
+ highlight = isMenuExpanded;
69619
+ } else if (allowMultipleNavItemsOpen) {
69620
+ highlight = selected === navItem.fullRoute;
69621
+ }
69622
+ }
69623
+
69624
+ // Check if highlightMenu prop is true and highlight is false
69625
+ var shouldShowHighlightBackground = navItem.highlightMenu === true && !highlight;
69626
+
69627
+ // Use highlightMenuColor if it's a string, otherwise use default red color
69628
+ var backgroundColor = shouldShowHighlightBackground ? typeof navItem.highlightMenuColor === 'string' ? navItem.highlightMenuColor : statusColors[1] : '';
69037
69629
  return /*#__PURE__*/React__default["default"].createElement("div", {
69038
- className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3"
69630
+ className: _getClassName("NavMenuLevel3 ".concat(isLevel2Style ? 'level2Style' : ''), _styleModuleImportMap$1, {
69631
+ "handleMissingStyleName": "warn"
69632
+ })
69039
69633
  }, /*#__PURE__*/React__default["default"].createElement("div", {
69040
69634
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--statusColor",
69041
69635
  style: {
69042
69636
  backgroundColor: position === 'leftBorder' ? statusColor : ''
69043
69637
  }
69044
69638
  }), /*#__PURE__*/React__default["default"].createElement("div", {
69045
- onClick: function onClick() {
69046
- return !isDisabled && navigateToItem(navItem);
69047
- },
69639
+ onClick: handleItemClick,
69048
69640
  style: {
69049
- backgroundColor: position === 'background' ? statusColor : ''
69641
+ backgroundColor: position === 'background' ? statusColor : backgroundColor
69050
69642
  },
69051
- className: _getClassName("NavItem ".concat(selected === navItem.fullRoute ? 'NavItemSelected' : '', " ").concat(selected === navItem.fullRoute && position === 'background' ? 'NavItemSelectedStatus' : '', " ").concat(isDisabled ? 'disabled' : ''), _styleModuleImportMap$1, {
69643
+ className: _getClassName("NavItem ".concat(isLevel2Style && highlight ? 'expandedMenu' : '', " ").concat(selected === navItem.fullRoute ? 'NavItemSelected' : '', " ").concat(selected === navItem.fullRoute && position === 'background' ? 'NavItemSelectedStatus' : '', " ").concat(isDisabled ? 'disabled' : ''), _styleModuleImportMap$1, {
69052
69644
  "handleMissingStyleName": "warn"
69053
69645
  })
69054
69646
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -69057,7 +69649,11 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref6) {
69057
69649
  icon: navItem.icon
69058
69650
  })), /*#__PURE__*/React__default["default"].createElement("div", {
69059
69651
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName"
69060
- }, navItem.name), (countsLoading || !isNil$1(countText)) && /*#__PURE__*/React__default["default"].createElement("div", {
69652
+ }, navItem.name), isLevel2Style && hasSubMenuItems && /*#__PURE__*/React__default["default"].createElement("div", {
69653
+ className: "utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton"
69654
+ }, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
69655
+ name: isMenuExpanded ? 'chevron-up' : 'chevron-down'
69656
+ })), (countsLoading || !isNil$1(countText)) && /*#__PURE__*/React__default["default"].createElement("div", {
69061
69657
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount"
69062
69658
  }, countsLoading ? /*#__PURE__*/React__default["default"].createElement(coreComponents.Spinner, {
69063
69659
  size: "xxs"
@@ -69186,7 +69782,9 @@ var AppFrame = function AppFrame(props) {
69186
69782
  }, []);
69187
69783
 
69188
69784
  // const showNavigationCounts = props.getCounts && typeof props.getCounts === 'function'
69189
- var navigationWidth = activeSubmenu !== null && activeSubmenu !== void 0 && activeSubmenu.length && showNavigationCounts ? '100px' : '50px';
69785
+ var baseWidth = props.showLevel3Navigation ? '70px' : '50px';
69786
+ var isThirdLevelOpen = props.showLevel3Navigation && (activeSubmenu === null || activeSubmenu === void 0 ? void 0 : activeSubmenu.length) > 1;
69787
+ var navigationWidth = props.showLevel3Navigation ? isThirdLevelOpen && showNavigationCounts ? '100px' : baseWidth : activeSubmenu !== null && activeSubmenu !== void 0 && activeSubmenu.length && showNavigationCounts ? '100px' : baseWidth;
69190
69788
  return /*#__PURE__*/React__default["default"].createElement("div", {
69191
69789
  className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
69192
69790
  style: props.handleScrolling ? SCROLL : NO_SCROLL
@@ -69225,7 +69823,8 @@ var AppFrame = function AppFrame(props) {
69225
69823
  countAutoReloadDisabled: props.countAutoReloadDisabled,
69226
69824
  onNavSectionToggle: props.onNavSectionToggle,
69227
69825
  showNavIconInHeader: props === null || props === void 0 ? void 0 : props.showNavIconInHeader,
69228
- isNavBarOpen: isNavBarOpen
69826
+ isNavBarOpen: isNavBarOpen,
69827
+ showLevel3Navigation: props.showLevel3Navigation
69229
69828
  }) : null, /*#__PURE__*/React__default["default"].createElement("div", {
69230
69829
  style: {
69231
69830
  marginLeft: props.showNavigation && !(props !== null && props !== void 0 && props.showNavIconInHeader) ? navigationWidth : '0px',
@@ -81223,7 +81822,7 @@ var index_esm = /*#__PURE__*/Object.freeze({
81223
81822
  });
81224
81823
 
81225
81824
  var purify = createCommonjsModule(function (module, exports) {
81226
- /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
81825
+ /*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
81227
81826
 
81228
81827
  (function (global, factory) {
81229
81828
  module.exports = factory() ;
@@ -81256,12 +81855,18 @@ var purify = createCommonjsModule(function (module, exports) {
81256
81855
  };
81257
81856
  }
81258
81857
  if (!apply) {
81259
- apply = function apply(fun, thisValue, args) {
81260
- return fun.apply(thisValue, args);
81858
+ apply = function apply(func, thisArg) {
81859
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
81860
+ args[_key - 2] = arguments[_key];
81861
+ }
81862
+ return func.apply(thisArg, args);
81261
81863
  };
81262
81864
  }
81263
81865
  if (!construct) {
81264
- construct = function construct(Func, args) {
81866
+ construct = function construct(Func) {
81867
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
81868
+ args[_key2 - 1] = arguments[_key2];
81869
+ }
81265
81870
  return new Func(...args);
81266
81871
  };
81267
81872
  }
@@ -81290,8 +81895,8 @@ var purify = createCommonjsModule(function (module, exports) {
81290
81895
  if (thisArg instanceof RegExp) {
81291
81896
  thisArg.lastIndex = 0;
81292
81897
  }
81293
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
81294
- args[_key - 1] = arguments[_key];
81898
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
81899
+ args[_key3 - 1] = arguments[_key3];
81295
81900
  }
81296
81901
  return apply(func, thisArg, args);
81297
81902
  };
@@ -81302,12 +81907,12 @@ var purify = createCommonjsModule(function (module, exports) {
81302
81907
  * @param func - The constructor function to be wrapped and called.
81303
81908
  * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
81304
81909
  */
81305
- function unconstruct(func) {
81910
+ function unconstruct(Func) {
81306
81911
  return function () {
81307
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
81308
- args[_key2] = arguments[_key2];
81912
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
81913
+ args[_key4] = arguments[_key4];
81309
81914
  }
81310
- return construct(func, args);
81915
+ return construct(Func, args);
81311
81916
  };
81312
81917
  }
81313
81918
  /**
@@ -81405,8 +82010,8 @@ var purify = createCommonjsModule(function (module, exports) {
81405
82010
  }
81406
82011
  return fallbackValue;
81407
82012
  }
81408
- const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
81409
- const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
82013
+ const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
82014
+ const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'slot', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
81410
82015
  const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
81411
82016
  // List of SVG elements that are disallowed by default.
81412
82017
  // We still need to know them so that we can do namespace
@@ -81418,7 +82023,7 @@ var purify = createCommonjsModule(function (module, exports) {
81418
82023
  // even those that we disallow by default.
81419
82024
  const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
81420
82025
  const text = freeze(['#text']);
81421
- const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
82026
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
81422
82027
  const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
81423
82028
  const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
81424
82029
  const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
@@ -81528,7 +82133,7 @@ var purify = createCommonjsModule(function (module, exports) {
81528
82133
  function createDOMPurify() {
81529
82134
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
81530
82135
  const DOMPurify = root => createDOMPurify(root);
81531
- DOMPurify.version = '3.2.6';
82136
+ DOMPurify.version = '3.2.7';
81532
82137
  DOMPurify.removed = [];
81533
82138
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
81534
82139
  // Not running in a browser, provide a factory function
@@ -82225,7 +82830,7 @@ var purify = createCommonjsModule(function (module, exports) {
82225
82830
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
82226
82831
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
82227
82832
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
82228
- _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
82833
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||
82229
82834
  // Alternative, second condition checks if it's an `is`-attribute, AND
82230
82835
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
82231
82836
  lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ;else {
@@ -82304,7 +82909,12 @@ var purify = createCommonjsModule(function (module, exports) {
82304
82909
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
82305
82910
  }
82306
82911
  /* Work around a security issue with comments inside attributes */
82307
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
82912
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
82913
+ _removeAttribute(name, currentNode);
82914
+ continue;
82915
+ }
82916
+ /* Make sure we cannot easily use animated hrefs, even if animations are allowed */
82917
+ if (lcName === 'attributename' && stringMatch(value, 'href')) {
82308
82918
  _removeAttribute(name, currentNode);
82309
82919
  continue;
82310
82920
  }