@copart/ops-tool-kit 1.10.0-alpha.16 → 1.10.0-alpha.18

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.
@@ -33,7 +33,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
33
33
  var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
34
34
 
35
35
  const name$e = "@copart/ops-tool-kit";
36
- const version$3 = "1.10.0-alpha.16";
36
+ const version$3 = "1.10.0-alpha.18";
37
37
  const main = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -32335,6 +32335,16 @@ var AppBar = function AppBar(_ref) {
32335
32335
  showMihelpTooltip = _useState10[0],
32336
32336
  setShowMihelpTooltip = _useState10[1];
32337
32337
 
32338
+ var tileData = findAppData(coreAppConfig.tiles || []) || {};
32339
+ var mihelpAppPath = !isCoreRoute ? tileData.mihelpAppPath : null;
32340
+ var isMihelpEnabled;
32341
+
32342
+ if (isCoreRoute) {
32343
+ isMihelpEnabled = coreAppConfig.enableMiHelp;
32344
+ } else {
32345
+ isMihelpEnabled = Boolean(mihelpAppPath);
32346
+ }
32347
+
32338
32348
  React.useEffect(function () {
32339
32349
  setMounted(true);
32340
32350
 
@@ -32346,7 +32356,7 @@ var AppBar = function AppBar(_ref) {
32346
32356
  window.addEventListener('sessionStorageChanged', onStorageChanged);
32347
32357
  setAppBarMounted(true);
32348
32358
 
32349
- if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login')) {
32359
+ if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login') && isMihelpEnabled) {
32350
32360
  appendElementorStyles();
32351
32361
  getLatestRelease();
32352
32362
  }
@@ -32391,7 +32401,7 @@ var AppBar = function AppBar(_ref) {
32391
32401
  document.head.appendChild(link);
32392
32402
  });
32393
32403
  style = document.createElement('style');
32394
- css = document.createTextNode(".elementor-1674 .elementor-element.elementor-element-e83e3ae{\n width: 100% !important;\n padding-right: 0 !important;\n }\n .elementor-1674 .elementor-element.elementor-element-e83e3ae > .elementor-element-populated{\n border-style: none !important;\n }\n .elementor-1674 .elementor-element.elementor-element-efa7410 > .elementor-widget-container{\n padding:0 !important;\n }\n .elementor-widget-container ul,.elementor-widget-container ol{\n padding-left:40px !important;\n }\n .elementor-1674 .elementor-element.elementor-element-4a49924{\n margin-top:0 !important;\n }\n .elementor-column-gap-default>.elementor-column>.elementor-element-populated{\n padding:0 !important;\n }");
32404
+ css = document.createTextNode(".elementor-1674 .elementor-element.elementor-element-e83e3ae{\n width: 100% !important;\n padding-right: 0 !important;\n }\n .elementor-1674 .elementor-element.elementor-element-e83e3ae > .elementor-element-populated{\n border-style: none !important;\n }\n .elementor-1674 .elementor-element.elementor-element-efa7410 > .elementor-widget-container{\n padding:0 !important;\n }\n .elementor-widget-container ul,.elementor-widget-container ol{\n padding-left:40px !important;\n }\n .elementor-1674 .elementor-element.elementor-element-4a49924{\n margin-top:0 !important;\n }\n .elementor-column-gap-default>.elementor-column>.elementor-element-populated{\n padding:0 !important;\n }\n .wp-block-separator{\n width:100% !important\n }");
32395
32405
  style.appendChild(css);
32396
32406
  document.head.appendChild(style);
32397
32407
  }
@@ -32533,8 +32543,6 @@ var AppBar = function AppBar(_ref) {
32533
32543
  }
32534
32544
  };
32535
32545
 
32536
- var tileData = findAppData(coreAppConfig.tiles || []) || {};
32537
- var mihelpAppPath = !isCoreRoute ? tileData.mihelpAppPath : null;
32538
32546
  var isIdeaNoteEnabled = getIdeaNoteEnabledStatus(tileData);
32539
32547
 
32540
32548
  var handleHelpClick = function handleHelpClick() {
@@ -32543,14 +32551,6 @@ var AppBar = function AppBar(_ref) {
32543
32551
  window.open(uri, "_blank");
32544
32552
  };
32545
32553
 
32546
- var isMihelpEnabled;
32547
-
32548
- if (isCoreRoute) {
32549
- isMihelpEnabled = coreAppConfig.enableMiHelp;
32550
- } else {
32551
- isMihelpEnabled = Boolean(mihelpAppPath);
32552
- }
32553
-
32554
32554
  var feedbackConfig = function feedbackConfig() {
32555
32555
  var _storage$coreConfig;
32556
32556
 
@@ -47544,8 +47544,19 @@ function ContextualHelp(_ref) {
47544
47544
  article = _useState2[0],
47545
47545
  setArticle = _useState2[1];
47546
47546
 
47547
+ var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
47548
+ var tileData = findAppData(coreAppConfig.tiles || []) || {};
47549
+ var mihelpAppPath = !isCoreRoute ? tileData.mihelpAppPath : null;
47550
+ var isMihelpEnabled;
47551
+
47552
+ if (isCoreRoute) {
47553
+ isMihelpEnabled = coreAppConfig.enableMiHelp;
47554
+ } else {
47555
+ isMihelpEnabled = Boolean(mihelpAppPath);
47556
+ }
47557
+
47547
47558
  React.useEffect(function () {
47548
- getArticle();
47559
+ isMihelpEnabled && getArticle();
47549
47560
  }, []);
47550
47561
 
47551
47562
  var getArticle =
@@ -47595,7 +47606,11 @@ function ContextualHelp(_ref) {
47595
47606
  }();
47596
47607
 
47597
47608
  return React__default["default"].createElement("div", null, React__default["default"].createElement(coreComponents.Tooltip, {
47598
- content: !article || !(article === null || article === void 0 ? void 0 : article.id) ? React__default["default"].createElement("h3", {
47609
+ content: !isMihelpEnabled ? React__default["default"].createElement("h3", {
47610
+ style: {
47611
+ color: 'rgba(224, 26, 26, 0.8)'
47612
+ }
47613
+ }, "Mihelp is not enabled for this app") : !article || !(article === null || article === void 0 ? void 0 : article.id) ? React__default["default"].createElement("h3", {
47599
47614
  style: {
47600
47615
  color: 'rgba(224, 26, 26, 0.8)'
47601
47616
  }