@copart/ops-tool-kit 1.13.0-beta.6 → 1.13.0-beta.7

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$1 = "@copart/ops-tool-kit";
50
- const version$3 = "1.13.0-beta.6";
50
+ const version$3 = "1.13.0-beta.7";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -63683,7 +63683,8 @@ var NavigationBar = function NavigationBar(_ref2) {
63683
63683
  showNavIconInHeader = _ref2.showNavIconInHeader,
63684
63684
  isNavBarOpen = _ref2.isNavBarOpen,
63685
63685
  _ref2$showLevel3Navig = _ref2.showLevel3Navigation,
63686
- showLevel3Navigation = _ref2$showLevel3Navig === void 0 ? false : _ref2$showLevel3Navig;
63686
+ showLevel3Navigation = _ref2$showLevel3Navig === void 0 ? false : _ref2$showLevel3Navig,
63687
+ basePath = _ref2.basePath;
63687
63688
  // const withCounts = getCounts && typeof getCounts === 'function'
63688
63689
  var navigateFunction = navigateTo || (history === null || history === void 0 ? void 0 : history.push) || defaultRedirect;
63689
63690
  var _useState = React.useState(null),
@@ -63765,7 +63766,8 @@ var NavigationBar = function NavigationBar(_ref2) {
63765
63766
  countsRef: countsRef,
63766
63767
  countAutoReloadDisabled: countAutoReloadDisabled,
63767
63768
  onNavSectionToggle: onNavSectionToggle,
63768
- showLevel3Navigation: showLevel3Navigation
63769
+ showLevel3Navigation: showLevel3Navigation,
63770
+ basePath: basePath
63769
63771
  }) : null, isConfigValid === false ? /*#__PURE__*/React__default["default"].createElement("div", null, "Please check your navigation config") : null);
63770
63772
  };
63771
63773
  var NavigationMenu = function NavigationMenu(_ref3) {
@@ -63786,8 +63788,10 @@ var NavigationMenu = function NavigationMenu(_ref3) {
63786
63788
  countAutoReloadDisabled = _ref3.countAutoReloadDisabled,
63787
63789
  onNavSectionToggle = _ref3.onNavSectionToggle,
63788
63790
  _ref3$showLevel3Navig = _ref3.showLevel3Navigation,
63789
- showLevel3Navigation = _ref3$showLevel3Navig === void 0 ? false : _ref3$showLevel3Navig;
63790
- var redirectUrl = window.location.pathname;
63791
+ showLevel3Navigation = _ref3$showLevel3Navig === void 0 ? false : _ref3$showLevel3Navig,
63792
+ basePath = _ref3.basePath;
63793
+ var rawUrl = window.location.pathname;
63794
+ var redirectUrl = basePath && rawUrl.startsWith(basePath) ? rawUrl.slice(basePath.length) || '/' : rawUrl;
63791
63795
  var _useState11 = React.useState(null),
63792
63796
  _useState12 = _slicedToArray(_useState11, 2),
63793
63797
  counts = _useState12[0],
@@ -63796,7 +63800,7 @@ var NavigationMenu = function NavigationMenu(_ref3) {
63796
63800
  React.useEffect(function () {
63797
63801
  if (redirectUrl != '/') {
63798
63802
  var splitUrl = redirectUrl.split('/');
63799
- if (!process.env.IS_CORE_APP) {
63803
+ if (!process.env.IS_CORE_APP && !basePath) {
63800
63804
  splitUrl.shift();
63801
63805
  }
63802
63806
  // if (splitUrl.length - 1 === configDepth) {
@@ -64588,7 +64592,8 @@ var AppFrame = function AppFrame(props) {
64588
64592
  onNavSectionToggle: props.onNavSectionToggle,
64589
64593
  showNavIconInHeader: props === null || props === void 0 ? void 0 : props.showNavIconInHeader,
64590
64594
  isNavBarOpen: isNavBarOpen,
64591
- showLevel3Navigation: props.showLevel3Navigation
64595
+ showLevel3Navigation: props.showLevel3Navigation,
64596
+ basePath: props.navBasePath
64592
64597
  }) : null, /*#__PURE__*/React__default["default"].createElement("div", {
64593
64598
  style: {
64594
64599
  marginLeft: props.showNavigation && !(props !== null && props !== void 0 && props.showNavIconInHeader) ? navigationWidth : '0px',