labsense-ui-kit 1.2.77 → 1.2.79

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.
@@ -9350,10 +9350,11 @@ var Sidebar = function Sidebar(_ref22) {
9350
9350
  };
9351
9351
  var isRouteActive = function isRouteActive(item) {
9352
9352
  var _item$children2;
9353
+ if (!item.url || item.url === '#') return false;
9353
9354
  var currentBase = getBasePath(location.pathname);
9354
9355
  var itemBase = item.activeUrl ? getBasePath(item.activeUrl) : getBasePath(item.url);
9355
9356
  return currentBase === itemBase || ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.some(function (child) {
9356
- return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
9357
+ return child.url && currentBase === getBasePath(child.activeUrl) || child.url && currentBase === getBasePath(child.url);
9357
9358
  }));
9358
9359
  };
9359
9360
  var ChildLink = React.memo(function (_ref23) {
@@ -9463,7 +9464,14 @@ var Sidebar = function Sidebar(_ref22) {
9463
9464
  }, [item.url, location.pathname]);
9464
9465
  return item.url ? React.createElement(SidebarLink, {
9465
9466
  to: item.url,
9466
- onClick: handleNavClick
9467
+ onClick: function onClick(e) {
9468
+ if (item.onClick) {
9469
+ e.preventDefault();
9470
+ item.onClick();
9471
+ } else {
9472
+ handleNavClick(e);
9473
+ }
9474
+ }
9467
9475
  }, ContentLayout) : React.createElement(Container, {
9468
9476
  "$flexDirection": 'column',
9469
9477
  "$alignItems": 'start',