@copart/ops-tool-kit 1.13.0-beta.26 → 1.13.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
File without changes
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
47
47
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
48
48
 
49
49
  const name$1 = "@copart/ops-tool-kit";
50
- const version$3 = "1.13.0-beta.26";
50
+ const version$3 = "1.13.0-beta.27";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -2838,13 +2838,13 @@ var Breadcrumbs = withBreadcrumbs(index$1.purist(function (props) {
2838
2838
  props.history.push(isEmbedded && (_props$appTile2 = props.appTile) !== null && _props$appTile2 !== void 0 && _props$appTile2.path ? props.appTile.path : '/');
2839
2839
  },
2840
2840
  className: "utilities_ops-app-frame_Breadcrumbs_styles_Breadcrumbs--Crumb"
2841
- }, props === null || props === void 0 ? void 0 : (_props$appTile3 = props.appTile) === null || _props$appTile3 === void 0 ? void 0 : _props$appTile3.title) : null, props.breadcrumbs.crumbs.map(function (crumb, index) {
2841
+ }, props === null || props === void 0 ? void 0 : (_props$appTile3 = props.appTile) === null || _props$appTile3 === void 0 ? void 0 : _props$appTile3.title) : null, props.breadcrumbs.crumbs.map(function (crumb, idx) {
2842
2842
  return /*#__PURE__*/React__namespace.createElement("a", {
2843
2843
  onClick: function onClick() {
2844
2844
  return props.history.push(crumb.to);
2845
2845
  },
2846
2846
  className: "utilities_ops-app-frame_Breadcrumbs_styles_Breadcrumbs--Crumb",
2847
- key: crumb.children
2847
+ key: crumb.crumbId != null ? crumb.crumbId : idx
2848
2848
  }, crumb.children);
2849
2849
  }, this)), /*#__PURE__*/React__namespace.createElement("div", {
2850
2850
  id: "notCrumbs",
@@ -21538,7 +21538,8 @@ var isEmbeddedPath = function isEmbeddedPath() {
21538
21538
  };
21539
21539
  var CopartLogo = function CopartLogo() {
21540
21540
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
21541
- history = _ref.history;
21541
+ history = _ref.history,
21542
+ onNavigate = _ref.onNavigate;
21542
21543
  var coreAppConfig = storage$2.getLocalItem('opsportal-core:config');
21543
21544
  var enableNewToolkitFeatures = coreAppConfig.enableNewToolkitFeatures;
21544
21545
  enableNewToolkitFeatures = enableNewToolkitFeatures || isAuthRoute && !isCoreRoute;
@@ -21548,6 +21549,10 @@ var CopartLogo = function CopartLogo() {
21548
21549
  // Outside embedded: keep default <a href="/"> full navigation.
21549
21550
  if (history && typeof history.push === 'function' && isEmbeddedPath()) {
21550
21551
  e.preventDefault();
21552
+ // SPA nav keeps the header mounted, so any open sidebar (settings /
21553
+ // notifications / mihelp / search / mobile menu) would otherwise stay
21554
+ // open after landing on Home. Close them before navigating.
21555
+ if (typeof onNavigate === 'function') onNavigate();
21551
21556
  history.push('/');
21552
21557
  }
21553
21558
  };
@@ -27652,6 +27657,14 @@ var AppBar$1 = function AppBar(props) {
27652
27657
  // [mihelpRef, mihelpIconRef],
27653
27658
  // )
27654
27659
 
27660
+ var closeAllPanels = function closeAllPanels() {
27661
+ setSettingsVisible(false);
27662
+ setNotificationsVisible(false);
27663
+ setMihelpVisible(false);
27664
+ setIdeaNoteVisible(false);
27665
+ setMobileMenuVisible(false);
27666
+ setShowSearchContainer(false);
27667
+ };
27655
27668
  var closeSidebar = function closeSidebar(e) {
27656
27669
  if (e.target.className.includes('sideBarWrapper')) {
27657
27670
  setNotificationsVisible(false);
@@ -27712,7 +27725,8 @@ var AppBar$1 = function AppBar(props) {
27712
27725
  fontSize: '16px'
27713
27726
  }
27714
27727
  })), /*#__PURE__*/React__default["default"].createElement(CopartLogo, {
27715
- history: props.history
27728
+ history: props.history,
27729
+ onNavigate: closeAllPanels
27716
27730
  }), !enableNewToolkitFeatures && !isAuthRoute ? /*#__PURE__*/React__default["default"].createElement("div", {
27717
27731
  className: "utilities_ops-app-frame_AppBarComponent_AppBar--moduleName"
27718
27732
  }, moduleName) : null), /*#__PURE__*/React__default["default"].createElement(Breadcrumbs, {