@bigbinary/neeto-molecules 1.0.55-beta → 1.0.55
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/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +16 -7
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +18 -9
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +15 -6
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +17 -8
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Sidebar.cjs.js +56 -108
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +57 -109
- package/dist/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +0 -1
package/dist/Sidebar.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, Children, isValidElement, cloneElement, forwardRef, useState } from 'react';
|
|
2
|
-
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, Down, Expand } from '@bigbinary/neeto-icons';
|
|
3
|
-
import { Typography, Button, Input, Avatar, Tooltip } from '@bigbinary/neetoui';
|
|
4
2
|
import { toLower, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
5
3
|
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
4
|
+
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help } from '@bigbinary/neeto-icons';
|
|
5
|
+
import { Typography, Button, Input, Tooltip, Avatar } from '@bigbinary/neetoui';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { capitalize, truncate, _findBy } from '@bigbinary/neeto-commons-frontend/pure';
|
|
8
8
|
import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
|
|
9
9
|
import { t as t$1 } from 'i18next';
|
|
10
10
|
import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
|
|
11
11
|
import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
|
|
12
|
-
import * as ProductLogos from '@bigbinary/neeto-icons/
|
|
13
|
-
import { Neeto } from '@bigbinary/neeto-icons/
|
|
12
|
+
import * as ProductLogos from '@bigbinary/neeto-icons/logos';
|
|
13
|
+
import { Neeto } from '@bigbinary/neeto-icons/logos';
|
|
14
14
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
15
15
|
|
|
16
16
|
function _arrayWithHoles(arr) {
|
|
@@ -31485,7 +31485,7 @@ SwitchTransition.defaultProps = {
|
|
|
31485
31485
|
|
|
31486
31486
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
31487
31487
|
|
|
31488
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:
|
|
31488
|
+
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:var(--neeto-ui-sidebar-width);overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;position:relative;width:calc(100vw - var(--neeto-ui-sidebar-width))}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__close-btn{position:absolute;right:24px;top:24px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31489
31489
|
n(css$1,{});
|
|
31490
31490
|
|
|
31491
31491
|
function _extends() {
|
|
@@ -31713,14 +31713,50 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31713
31713
|
})))));
|
|
31714
31714
|
};
|
|
31715
31715
|
|
|
31716
|
-
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-
|
|
31716
|
+
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;max-width:300px;padding:40px 0;transition:all .3s;width:300px;z-index:99997}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}@media (min-width:1440px){.neeto-molecules-sidebar{max-width:320px;width:320px}}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed{max-width:var(--neeto-ui-sidebar-width);width:var(--neeto-ui-sidebar-width)}.neeto-molecules-sidebar__header{margin-bottom:40px;padding:0 20px;width:100%}.neeto-molecules-sidebar__logo,.neeto-molecules-sidebar__logo svg{height:40px;width:40px}.neeto-molecules-sidebar__info{padding-left:10px;width:calc(100% - 40px)}.neeto-molecules-sidebar__info .neeto-molecules-typography{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.neeto-molecules-sidebar__links{margin-bottom:20px;padding-left:12px;padding-right:12px;width:100%}.neeto-molecules-sidebar__link{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-gray-600));cursor:pointer;margin:8px 0;padding:8px;position:relative;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__link.mb-0{margin-bottom:0}.neeto-molecules-sidebar__link-icon{flex-shrink:0;width:40px}.neeto-molecules-sidebar__link-label{overflow:hidden;padding-left:10px;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 40px)}.neeto-molecules-sidebar__link-sub-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 56px)}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-600));text-decoration:none}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-gray-600));cursor:pointer;margin:4px 0;padding:8px 8px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-700));text-decoration:none}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{background-color:rgb(var(--neeto-ui-gray-300));color:rgb(var(--neeto-ui-gray-700));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__footer{margin-top:auto;padding:0 12px;width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-wrapper{outline:none!important}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile{background-color:rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);box-shadow:var(--neeto-ui-shadow-sm);cursor:pointer;padding:8px;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-content{padding-left:10px;padding-right:30px;position:relative;width:calc(100% - 40px)}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-content .neeto-molecules-typography{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-drop-icon{color:rgb(var(--neeto-ui-gray-500));position:absolute;right:8px;top:50%;transform:translateY(-50%)}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed{padding:24px 0}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__profile{background-color:transparent;box-shadow:none;padding:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__header,.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__links{padding-left:16px;padding-right:16px}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__link-icon{width:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__footer{padding-left:16px;padding-right:16px}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:var(--neeto-ui-shadow-xs)!important}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400));list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-profile-sublist__item-btn{align-items:center;border-radius:0;color:rgb(var(--neeto-ui-gray-800));cursor:pointer;display:flex;font-size:var(--neeto-ui-text-sm);font-weight:var(--neeto-ui-font-normal);gap:8px;line-height:1.143;min-height:32px;outline-color:transparent;padding:6px 40px 6px 12px;position:relative;text-decoration:none;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.neeto-molecules-profile-sublist__item-btn.disabled{color:rgb(var(--neeto-ui-gray-500));cursor:not-allowed}.neeto-molecules-profile-sublist__item-btn:focus,.neeto-molecules-profile-sublist__item-btn:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-profile-sublist__item-btn--style-danger{color:rgb(var(--neeto-ui-error-800))}.neeto-molecules-profile-sublist__item-btn-icon{color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-profile-sublist__item-btn-icon svg{height:20px;width:20px}.neeto-molecules-help-sublist__item-btn{border-radius:0;color:rgb(var(--neeto-ui-gray-800));cursor:pointer;display:flex;font-size:var(--neeto-ui-text-sm);font-weight:var(--neeto-ui-font-normal);gap:8px;justify-content:flex-end;line-height:1.143;min-height:32px;outline-color:transparent;padding:6px 40px 6px 12px;position:relative;text-decoration:none;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.neeto-molecules-help-sublist__item-btn.disabled{color:rgb(var(--neeto-ui-gray-500));cursor:not-allowed}.neeto-molecules-help-sublist__item-btn:focus,.neeto-molecules-help-sublist__item-btn:hover{background-color:rgb(var(--neeto-ui-gray-200));box-shadow:none}.neeto-molecules-help-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn--style-danger{color:rgb(var(--neeto-ui-error-800))}.neeto-molecules-help-sublist__item-btn-icon{color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-help-sublist__item-btn-icon svg{height:20px;width:20px}";
|
|
31717
31717
|
n(css,{});
|
|
31718
31718
|
|
|
31719
|
+
var FeaturedTooltip = function FeaturedTooltip(_ref) {
|
|
31720
|
+
var label = _ref.label,
|
|
31721
|
+
description = _ref.description;
|
|
31722
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31723
|
+
className: "neeto-ui-flex neeto-ui-flex-col sidebar-featured-tooltip"
|
|
31724
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
31725
|
+
className: "neeto-ui-text-center sidebar-featured-tooltip__title",
|
|
31726
|
+
lineHeight: "tight",
|
|
31727
|
+
style: "h5",
|
|
31728
|
+
weight: "semibold"
|
|
31729
|
+
}, label), description && /*#__PURE__*/React.createElement(Typography, {
|
|
31730
|
+
className: "neeto-ui-text-center neeto-ui-text-gray-400 sidebar-featured-tooltip__description",
|
|
31731
|
+
lineHeight: "normal",
|
|
31732
|
+
style: "body3"
|
|
31733
|
+
}, description));
|
|
31734
|
+
};
|
|
31735
|
+
|
|
31736
|
+
var NavIconWrapper = function NavIconWrapper(_ref) {
|
|
31737
|
+
var description = _ref.description,
|
|
31738
|
+
label = _ref.label,
|
|
31739
|
+
children = _ref.children;
|
|
31740
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
31741
|
+
className: "sidebar-featured-tooltip__content",
|
|
31742
|
+
content: /*#__PURE__*/React.createElement(FeaturedTooltip, {
|
|
31743
|
+
description: description,
|
|
31744
|
+
label: label
|
|
31745
|
+
}),
|
|
31746
|
+
delay: [400, 40],
|
|
31747
|
+
distance: "20rem",
|
|
31748
|
+
duration: [200, 200],
|
|
31749
|
+
position: "right"
|
|
31750
|
+
}, children);
|
|
31751
|
+
};
|
|
31752
|
+
|
|
31719
31753
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
31720
31754
|
var onAppSwitcherToggle = _ref.onAppSwitcherToggle;
|
|
31721
31755
|
var _useTranslation = useTranslation(),
|
|
31722
31756
|
t = _useTranslation.t;
|
|
31723
|
-
return /*#__PURE__*/React.createElement(
|
|
31757
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
31758
|
+
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31759
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
31724
31760
|
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--app-switcher neeto-molecules-sidebar__link--button neeto-ui-flex neeto-ui-w-full neeto-ui-select-none neeto-ui-items-center neeto-ui-justify-start neeto-ui-shadow-none",
|
|
31725
31761
|
"data-cy": "app-switcher-button",
|
|
31726
31762
|
onClick: onAppSwitcherToggle
|
|
@@ -31728,12 +31764,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31728
31764
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31729
31765
|
}, /*#__PURE__*/React.createElement(AppSwitcher$1, {
|
|
31730
31766
|
size: 24
|
|
31731
|
-
}))
|
|
31732
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31733
|
-
component: "span",
|
|
31734
|
-
style: "body2",
|
|
31735
|
-
weight: "normal"
|
|
31736
|
-
}, t("neetoMolecules.sidebar.neetoProducts")));
|
|
31767
|
+
}))));
|
|
31737
31768
|
};
|
|
31738
31769
|
|
|
31739
31770
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31804,22 +31835,15 @@ var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
|
31804
31835
|
};
|
|
31805
31836
|
|
|
31806
31837
|
var HelpSection = /*#__PURE__*/forwardRef(function (_, ref) {
|
|
31807
|
-
var _useTranslation = useTranslation(),
|
|
31808
|
-
t = _useTranslation.t;
|
|
31809
31838
|
return /*#__PURE__*/React.createElement("button", {
|
|
31810
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none
|
|
31839
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
31811
31840
|
"data-cy": "help-button",
|
|
31812
31841
|
ref: ref
|
|
31813
31842
|
}, /*#__PURE__*/React.createElement("span", {
|
|
31814
31843
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31815
31844
|
}, /*#__PURE__*/React.createElement(Help, {
|
|
31816
31845
|
size: 24
|
|
31817
|
-
}))
|
|
31818
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31819
|
-
component: "span",
|
|
31820
|
-
style: "body2",
|
|
31821
|
-
weight: "normal"
|
|
31822
|
-
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
31846
|
+
})));
|
|
31823
31847
|
});
|
|
31824
31848
|
HelpSection.displayName = "HelpSection";
|
|
31825
31849
|
|
|
@@ -31904,16 +31928,9 @@ var ProfileSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
31904
31928
|
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31905
31929
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
31906
31930
|
className: "neeto-ui-flex-shrink-0",
|
|
31907
|
-
size: "
|
|
31931
|
+
size: "large",
|
|
31908
31932
|
user: profileInfo
|
|
31909
|
-
})
|
|
31910
|
-
className: "neeto-molecules-sidebar__profile-content"
|
|
31911
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
31912
|
-
component: "span",
|
|
31913
|
-
style: "body2",
|
|
31914
|
-
title: profileInfo.name,
|
|
31915
|
-
weight: "normal"
|
|
31916
|
-
}, truncate(profileInfo.name, 18)))));
|
|
31933
|
+
})));
|
|
31917
31934
|
});
|
|
31918
31935
|
ProfileSection.displayName = "ProfileSection";
|
|
31919
31936
|
|
|
@@ -32055,8 +32072,7 @@ var Header = function Header() {
|
|
|
32055
32072
|
}, ProductLogo ? /*#__PURE__*/React.createElement(ProductLogo, null) : /*#__PURE__*/React.createElement(Neeto, null))));
|
|
32056
32073
|
};
|
|
32057
32074
|
|
|
32058
|
-
var _excluded = ["label", "to", "icon", "
|
|
32059
|
-
_excluded2 = ["label", "to", "count"];
|
|
32075
|
+
var _excluded = ["label", "to", "icon", "description"];
|
|
32060
32076
|
var Links = function Links(_ref) {
|
|
32061
32077
|
var navLinks = _ref.navLinks;
|
|
32062
32078
|
var location = useLocation();
|
|
@@ -32073,15 +32089,17 @@ var Links = function Links(_ref) {
|
|
|
32073
32089
|
var label = _ref3.label,
|
|
32074
32090
|
to = _ref3.to,
|
|
32075
32091
|
icon = _ref3.icon,
|
|
32076
|
-
|
|
32092
|
+
description = _ref3.description,
|
|
32077
32093
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32078
32094
|
var IconSVG = icon;
|
|
32079
32095
|
var url = new URL(to, window.location.href);
|
|
32080
32096
|
var isActive = function isActive() {
|
|
32081
32097
|
return location.pathname.startsWith(url.pathname);
|
|
32082
32098
|
};
|
|
32083
|
-
return /*#__PURE__*/React.createElement(
|
|
32084
|
-
|
|
32099
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
32100
|
+
description: description,
|
|
32101
|
+
key: mainIndex,
|
|
32102
|
+
label: label
|
|
32085
32103
|
}, /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32086
32104
|
activeClassName: "active",
|
|
32087
32105
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
@@ -32090,39 +32108,7 @@ var Links = function Links(_ref) {
|
|
|
32090
32108
|
}, otherProps), icon && /*#__PURE__*/React.createElement("div", {
|
|
32091
32109
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-molecules-sidebar__link-icon",
|
|
32092
32110
|
"data-testid": label
|
|
32093
|
-
}, /*#__PURE__*/React.createElement(IconSVG, null))
|
|
32094
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
32095
|
-
component: "span",
|
|
32096
|
-
style: "body2",
|
|
32097
|
-
weight: "normal"
|
|
32098
|
-
}, label), items && /*#__PURE__*/React.createElement("div", {
|
|
32099
|
-
className: classnames("neeto-molecules-sidebar__link-icon", {
|
|
32100
|
-
"neeto-molecules-sidebar__link-icon--rotate": isActive()
|
|
32101
|
-
})
|
|
32102
|
-
}, /*#__PURE__*/React.createElement(Down, {
|
|
32103
|
-
size: 16
|
|
32104
|
-
}))), items && isActive() && /*#__PURE__*/React.createElement("div", {
|
|
32105
|
-
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32106
|
-
}, items.map(function (_ref4, subIndex) {
|
|
32107
|
-
var subLabel = _ref4.label,
|
|
32108
|
-
subRoute = _ref4.to,
|
|
32109
|
-
count = _ref4.count,
|
|
32110
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32111
|
-
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32112
|
-
activeClassName: "active",
|
|
32113
|
-
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center select-none",
|
|
32114
|
-
key: subIndex,
|
|
32115
|
-
to: subRoute
|
|
32116
|
-
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
32117
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32118
|
-
component: "span",
|
|
32119
|
-
style: "body2"
|
|
32120
|
-
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
32121
|
-
className: "neeto-molecules-sidebar__link-sub-count",
|
|
32122
|
-
component: "span",
|
|
32123
|
-
style: "body2"
|
|
32124
|
-
}, count));
|
|
32125
|
-
})));
|
|
32111
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null))));
|
|
32126
32112
|
}));
|
|
32127
32113
|
};
|
|
32128
32114
|
|
|
@@ -32140,35 +32126,15 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32140
32126
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32141
32127
|
isAppSwitcherOpen = _useState2[0],
|
|
32142
32128
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32143
|
-
var _useState3 = useState(false),
|
|
32144
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32145
|
-
isSidebarCollapsed = _useState4[0],
|
|
32146
|
-
setIsSidebarCollapsed = _useState4[1];
|
|
32147
|
-
var _useState5 = useState(false),
|
|
32148
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
32149
|
-
isSidebarFixed = _useState6[0],
|
|
32150
|
-
setIsSidebarFixed = _useState6[1];
|
|
32151
|
-
var _useState7 = useState(false),
|
|
32152
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
32153
|
-
isButtonHovered = _useState8[0],
|
|
32154
|
-
setIsButtonHovered = _useState8[1];
|
|
32155
32129
|
var location = useLocation();
|
|
32156
32130
|
useEffect(function () {
|
|
32157
32131
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32158
32132
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32159
32133
|
}, [location]);
|
|
32160
32134
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32161
|
-
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32162
|
-
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed,
|
|
32163
|
-
"neeto-molecules-sidebar__wrapper--fixed": isSidebarFixed && !isButtonHovered
|
|
32164
|
-
}),
|
|
32165
|
-
onMouseLeave: function onMouseLeave() {
|
|
32166
|
-
return setIsSidebarFixed(false);
|
|
32167
|
-
}
|
|
32168
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32169
|
-
className: "neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden",
|
|
32170
32135
|
"data-cy": "sidebar-wrapper",
|
|
32171
|
-
"data-testid": "sidebar"
|
|
32136
|
+
"data-testid": "sidebar",
|
|
32137
|
+
className: classnames("neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden", "neeto-molecules-sidebar--collapsed")
|
|
32172
32138
|
}, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(Links, {
|
|
32173
32139
|
navLinks: navLinks
|
|
32174
32140
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
@@ -32179,24 +32145,6 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32179
32145
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32180
32146
|
return setIsAppSwitcherOpen(not);
|
|
32181
32147
|
}
|
|
32182
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
32183
|
-
className: "neeto-molecules-sidebar__hover-area",
|
|
32184
|
-
onMouseEnter: function onMouseEnter() {
|
|
32185
|
-
return isSidebarCollapsed && setIsSidebarFixed(true);
|
|
32186
|
-
}
|
|
32187
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
32188
|
-
className: "neeto-molecules-sidebar__toggler p-0",
|
|
32189
|
-
icon: Expand,
|
|
32190
|
-
style: "text",
|
|
32191
|
-
onClick: function onClick() {
|
|
32192
|
-
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32193
|
-
},
|
|
32194
|
-
onMouseEnter: function onMouseEnter() {
|
|
32195
|
-
return setIsButtonHovered(true);
|
|
32196
|
-
},
|
|
32197
|
-
onMouseLeave: function onMouseLeave() {
|
|
32198
|
-
return setIsButtonHovered(false);
|
|
32199
|
-
}
|
|
32200
32148
|
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32201
32149
|
isOpen: isAppSwitcherOpen,
|
|
32202
32150
|
onClose: function onClose() {
|