@copart/ops-tool-kit 1.13.0-beta.24 → 1.13.0-beta.25

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.24";
50
+ const version$3 = "1.13.0-beta.25";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -21579,13 +21579,27 @@ var _styleModuleImportMap$9 = {
21579
21579
  "logoLink": "utilities_ops-app-frame_AppBarComponent_CopartLogo_CopartLogo--logoLink"
21580
21580
  }
21581
21581
  };
21582
+ var isEmbeddedPath = function isEmbeddedPath() {
21583
+ return typeof window !== 'undefined' && window.location.pathname.startsWith('/embedded');
21584
+ };
21582
21585
  var CopartLogo = function CopartLogo() {
21583
- var coreAppConfig = storage.getLocalItem('opsportal-core:config');
21586
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
21587
+ history = _ref.history;
21588
+ var coreAppConfig = storage$2.getLocalItem('opsportal-core:config');
21584
21589
  var enableNewToolkitFeatures = coreAppConfig.enableNewToolkitFeatures;
21585
21590
  enableNewToolkitFeatures = enableNewToolkitFeatures || isAuthRoute && !isCoreRoute;
21586
21591
  var imageSrc = enableNewToolkitFeatures ? "/images/G2logo.svg" : "https://www.copart.com/images/logo.svg";
21592
+ var handleClick = function handleClick(e) {
21593
+ // Inside embedded shell: SPA navigate home (avoid full reload / blank-page history issues).
21594
+ // Outside embedded: keep default <a href="/"> full navigation.
21595
+ if (history && typeof history.push === 'function' && isEmbeddedPath()) {
21596
+ e.preventDefault();
21597
+ history.push('/');
21598
+ }
21599
+ };
21587
21600
  return /*#__PURE__*/React__namespace.createElement("a", {
21588
- href: "/"
21601
+ href: "/",
21602
+ onClick: handleClick
21589
21603
  }, /*#__PURE__*/React__namespace.createElement("img", {
21590
21604
  src: imageSrc,
21591
21605
  className: _getClassName(enableNewToolkitFeatures ? "CopartLogoNew" : "CopartLogo", _styleModuleImportMap$9, {
@@ -27497,7 +27511,9 @@ var AppBar$1 = function AppBar(props) {
27497
27511
  color: '#FFF',
27498
27512
  fontSize: '16px'
27499
27513
  }
27500
- })), /*#__PURE__*/React__default["default"].createElement(CopartLogo, null), !enableNewToolkitFeatures && !isAuthRoute ? /*#__PURE__*/React__default["default"].createElement("div", {
27514
+ })), /*#__PURE__*/React__default["default"].createElement(CopartLogo, {
27515
+ history: props.history
27516
+ }), !enableNewToolkitFeatures && !isAuthRoute ? /*#__PURE__*/React__default["default"].createElement("div", {
27501
27517
  className: "utilities_ops-app-frame_AppBarComponent_AppBar--moduleName"
27502
27518
  }, moduleName) : null), /*#__PURE__*/React__default["default"].createElement(Breadcrumbs, {
27503
27519
  history: props.history,