@bigbinary/neeto-molecules 1.8.1 → 1.9.0

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/dist/Sidebar.js CHANGED
@@ -1121,7 +1121,8 @@ var _excluded = ["label", "to", "icon", "items"];
1121
1121
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1122
1122
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1123
1123
  var Links = function Links(_ref) {
1124
- var navLinks = _ref.navLinks;
1124
+ var navLinks = _ref.navLinks,
1125
+ isCountsLoading = _ref.isCountsLoading;
1125
1126
  var _useTranslation = useTranslation(),
1126
1127
  t = _useTranslation.t;
1127
1128
  var location = useLocation();
@@ -1158,7 +1159,7 @@ var Links = function Links(_ref) {
1158
1159
  var isActive = function isActive() {
1159
1160
  return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
1160
1161
  };
1161
- var isMenuExpanded = isActive() && isActiveLinkExpanded;
1162
+ var isMenuExpanded = isActive() && isActiveLinkExpanded && !isCountsLoading;
1162
1163
  var firstSegmentIndex = _findIndexBy({
1163
1164
  type: SUB_LINK_TYPES.SEGMENT
1164
1165
  }, items);
@@ -1208,6 +1209,8 @@ var Links = function Links(_ref) {
1208
1209
  var Sidebar = function Sidebar(_ref) {
1209
1210
  var navLinks = _ref.navLinks,
1210
1211
  customLogo = _ref.customLogo,
1212
+ _ref$isCountsLoading = _ref.isCountsLoading,
1213
+ isCountsLoading = _ref$isCountsLoading === void 0 ? false : _ref$isCountsLoading,
1211
1214
  _ref$profileInfoOverr = _ref.profileInfoOverrides,
1212
1215
  profileInfoOverrides = _ref$profileInfoOverr === void 0 ? {} : _ref$profileInfoOverr,
1213
1216
  _ref$helpLinkOverride = _ref.helpLinkOverrides,
@@ -1270,6 +1273,7 @@ var Sidebar = function Sidebar(_ref) {
1270
1273
  }, /*#__PURE__*/React.createElement(Header$1, {
1271
1274
  customLogo: customLogo
1272
1275
  }), /*#__PURE__*/React.createElement(Links, {
1276
+ isCountsLoading: isCountsLoading,
1273
1277
  navLinks: navLinks
1274
1278
  }), showFooter && /*#__PURE__*/React.createElement(Footer, {
1275
1279
  extraTopLinks: extraTopLinks,