@bigbinary/neeto-molecules 1.0.87-beta → 1.0.88
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/README.md +1 -0
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +24 -12
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +27 -15
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +23 -10
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +26 -13
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Scrollable.cjs.js +1 -5
- package/dist/Scrollable.cjs.js.map +1 -1
- package/dist/Scrollable.js +1 -5
- package/dist/Scrollable.js.map +1 -1
- package/dist/Sidebar.cjs.js +136 -212
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +139 -215
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.cjs.js +1 -1
- package/dist/SubHeader.js +1 -1
- package/dist/ToggleFeatureCard.cjs.js +304 -0
- package/dist/ToggleFeatureCard.cjs.js.map +1 -0
- package/dist/ToggleFeatureCard.js +298 -0
- package/dist/ToggleFeatureCard.js.map +1 -0
- package/package.json +2 -2
- package/src/translations/en.json +11 -6
- package/types/ImageWithFallback.d.ts +6 -7
- package/types/Sidebar.d.ts +1 -1
- package/types/ToggleFeatureCard.d.ts +32 -0
package/dist/Sidebar.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, Children, isValidElement, cloneElement, forwardRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { toLower, mergeDeepLeft, all, curry, is, includes, __, not } from 'ramda';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { toLower, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
5
3
|
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
6
4
|
import { useFetchNeetoApps } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
7
|
-
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help
|
|
8
|
-
import {
|
|
5
|
+
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help } from '@bigbinary/neeto-icons';
|
|
6
|
+
import { Typography, Button, Input, Tooltip, Spinner, Avatar } from '@bigbinary/neetoui';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { capitalize, truncate, isPresent, findBy } from '@bigbinary/neeto-commons-frontend/pure';
|
|
9
9
|
import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
|
|
10
10
|
import { t as t$1 } from 'i18next';
|
|
11
11
|
import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
|
|
12
12
|
import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
|
|
13
|
-
import * as
|
|
14
|
-
import { Neeto } from '@bigbinary/neeto-icons/
|
|
13
|
+
import * as ProductLogos from '@bigbinary/neeto-icons/logos';
|
|
14
|
+
import { Neeto } from '@bigbinary/neeto-icons/logos';
|
|
15
15
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
16
16
|
|
|
17
17
|
function _arrayWithHoles(arr) {
|
|
@@ -31486,7 +31486,7 @@ SwitchTransition.defaultProps = {
|
|
|
31486
31486
|
|
|
31487
31487
|
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}}
|
|
31488
31488
|
|
|
31489
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:
|
|
31489
|
+
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}";
|
|
31490
31490
|
n(css$1,{});
|
|
31491
31491
|
|
|
31492
31492
|
function _extends() {
|
|
@@ -31717,18 +31717,42 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31717
31717
|
})))));
|
|
31718
31718
|
};
|
|
31719
31719
|
|
|
31720
|
-
var
|
|
31721
|
-
|
|
31722
|
-
|
|
31723
|
-
|
|
31724
|
-
|
|
31725
|
-
}, /*#__PURE__*/React.createElement(
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
|
|
31720
|
+
var FeaturedTooltip = function FeaturedTooltip(_ref) {
|
|
31721
|
+
var label = _ref.label,
|
|
31722
|
+
description = _ref.description;
|
|
31723
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31724
|
+
className: "neeto-ui-flex neeto-ui-flex-col sidebar-featured-tooltip"
|
|
31725
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
31726
|
+
className: "neeto-ui-text-center sidebar-featured-tooltip__title",
|
|
31727
|
+
lineHeight: "tight",
|
|
31728
|
+
style: "h5",
|
|
31729
|
+
weight: "semibold"
|
|
31730
|
+
}, label), description && /*#__PURE__*/React.createElement(Typography, {
|
|
31731
|
+
className: "neeto-ui-text-center neeto-ui-text-gray-400 sidebar-featured-tooltip__description",
|
|
31732
|
+
lineHeight: "normal",
|
|
31733
|
+
style: "body3"
|
|
31734
|
+
}, description));
|
|
31729
31735
|
};
|
|
31736
|
+
var FeaturedTooltip$1 = /*#__PURE__*/React.memo(FeaturedTooltip);
|
|
31730
31737
|
|
|
31731
|
-
var
|
|
31738
|
+
var NavIconWrapper = function NavIconWrapper(_ref) {
|
|
31739
|
+
var description = _ref.description,
|
|
31740
|
+
label = _ref.label,
|
|
31741
|
+
children = _ref.children;
|
|
31742
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
31743
|
+
className: "sidebar-featured-tooltip__content",
|
|
31744
|
+
content: /*#__PURE__*/React.createElement(FeaturedTooltip$1, {
|
|
31745
|
+
description: description,
|
|
31746
|
+
label: label
|
|
31747
|
+
}),
|
|
31748
|
+
delay: [400, 40],
|
|
31749
|
+
distance: "20rem",
|
|
31750
|
+
duration: [200, 200],
|
|
31751
|
+
position: "right"
|
|
31752
|
+
}, children);
|
|
31753
|
+
};
|
|
31754
|
+
|
|
31755
|
+
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}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.neeto-molecules-help-sublist__item-btn-count{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.neeto-molecules-sidebar__notif-count{position:absolute;right:-2px;top:-2px}";
|
|
31732
31756
|
n(css,{});
|
|
31733
31757
|
|
|
31734
31758
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -31744,7 +31768,9 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31744
31768
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31745
31769
|
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31746
31770
|
};
|
|
31747
|
-
return /*#__PURE__*/React.createElement(
|
|
31771
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
31772
|
+
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31773
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
31748
31774
|
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",
|
|
31749
31775
|
"data-cy": "app-switcher-button",
|
|
31750
31776
|
onClick: handleAppSwitcherToggle,
|
|
@@ -31755,12 +31781,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31755
31781
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31756
31782
|
}, hasHovered && isFreshLoading ? /*#__PURE__*/React.createElement(Spinner, null) : /*#__PURE__*/React.createElement(AppSwitcher$1, {
|
|
31757
31783
|
size: 24
|
|
31758
|
-
}))
|
|
31759
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31760
|
-
component: "span",
|
|
31761
|
-
style: "body2",
|
|
31762
|
-
weight: "normal"
|
|
31763
|
-
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31784
|
+
}))));
|
|
31764
31785
|
};
|
|
31765
31786
|
|
|
31766
31787
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31778,7 +31799,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31778
31799
|
}
|
|
31779
31800
|
},
|
|
31780
31801
|
helpCenterProps: {
|
|
31781
|
-
label: t$1("neetoMolecules.sidebar.helpLinks.
|
|
31802
|
+
label: t$1("neetoMolecules.sidebar.helpLinks.helpCenter"),
|
|
31782
31803
|
icon: Book,
|
|
31783
31804
|
"data-cy": "help-link-help-center-button",
|
|
31784
31805
|
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
@@ -31839,24 +31860,21 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
31839
31860
|
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
31840
31861
|
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31841
31862
|
return /*#__PURE__*/React.createElement("button", {
|
|
31842
|
-
className: "neeto-molecules-
|
|
31863
|
+
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-left",
|
|
31843
31864
|
"data-cy": "profile-section",
|
|
31844
31865
|
ref: ref,
|
|
31845
31866
|
onMouseEnter: function onMouseEnter() {
|
|
31846
31867
|
return setHasHovered(true);
|
|
31847
31868
|
}
|
|
31869
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
31870
|
+
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31848
31871
|
}, isFreshLoading && hasHovered ? /*#__PURE__*/React.createElement("span", {
|
|
31849
31872
|
className: "flex h-11 w-10 items-center justify-center"
|
|
31850
|
-
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(
|
|
31851
|
-
className: "neeto-ui-flex-shrink-0
|
|
31852
|
-
size: "
|
|
31873
|
+
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(Avatar, {
|
|
31874
|
+
className: "neeto-ui-flex-shrink-0",
|
|
31875
|
+
size: "large",
|
|
31853
31876
|
user: profileInfo
|
|
31854
|
-
})
|
|
31855
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31856
|
-
component: "span",
|
|
31857
|
-
style: "body2",
|
|
31858
|
-
weight: "normal"
|
|
31859
|
-
}, truncate(profileInfo.name, 18))));
|
|
31877
|
+
})));
|
|
31860
31878
|
};
|
|
31861
31879
|
var ProfileSection$1 = /*#__PURE__*/forwardRef(ProfileSection);
|
|
31862
31880
|
|
|
@@ -31876,50 +31894,7 @@ function _toConsumableArray(arr) {
|
|
|
31876
31894
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
31877
31895
|
}
|
|
31878
31896
|
|
|
31879
|
-
function _typeof(obj) {
|
|
31880
|
-
"@babel/helpers - typeof";
|
|
31881
|
-
|
|
31882
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
31883
|
-
return typeof obj;
|
|
31884
|
-
} : function (obj) {
|
|
31885
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
31886
|
-
}, _typeof(obj);
|
|
31887
|
-
}
|
|
31888
|
-
|
|
31889
|
-
function _toPrimitive(input, hint) {
|
|
31890
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
31891
|
-
var prim = input[Symbol.toPrimitive];
|
|
31892
|
-
if (prim !== undefined) {
|
|
31893
|
-
var res = prim.call(input, hint || "default");
|
|
31894
|
-
if (_typeof(res) !== "object") return res;
|
|
31895
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31896
|
-
}
|
|
31897
|
-
return (hint === "string" ? String : Number)(input);
|
|
31898
|
-
}
|
|
31899
|
-
|
|
31900
|
-
function _toPropertyKey(arg) {
|
|
31901
|
-
var key = _toPrimitive(arg, "string");
|
|
31902
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
31903
|
-
}
|
|
31904
|
-
|
|
31905
|
-
function _defineProperty(obj, key, value) {
|
|
31906
|
-
key = _toPropertyKey(key);
|
|
31907
|
-
if (key in obj) {
|
|
31908
|
-
Object.defineProperty(obj, key, {
|
|
31909
|
-
value: value,
|
|
31910
|
-
enumerable: true,
|
|
31911
|
-
configurable: true,
|
|
31912
|
-
writable: true
|
|
31913
|
-
});
|
|
31914
|
-
} else {
|
|
31915
|
-
obj[key] = value;
|
|
31916
|
-
}
|
|
31917
|
-
return obj;
|
|
31918
|
-
}
|
|
31919
|
-
|
|
31920
31897
|
var _excluded$2 = ["onClick", "label", "icon"];
|
|
31921
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31922
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31923
31898
|
var LinkSection = function LinkSection(_ref) {
|
|
31924
31899
|
var links = _ref.links;
|
|
31925
31900
|
return /*#__PURE__*/React.createElement("ul", {
|
|
@@ -31930,20 +31905,22 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31930
31905
|
_ref2$icon = _ref2.icon,
|
|
31931
31906
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31932
31907
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
31908
|
+
var IconSVG = icon;
|
|
31933
31909
|
return /*#__PURE__*/React.createElement("li", {
|
|
31934
31910
|
className: "neeto-molecules-profile-sublist__item",
|
|
31935
31911
|
key: idx
|
|
31936
|
-
}, /*#__PURE__*/React.createElement(
|
|
31937
|
-
fullWidth: true,
|
|
31938
|
-
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31939
|
-
iconPosition: "left",
|
|
31940
|
-
iconSize: 18,
|
|
31941
|
-
style: "text"
|
|
31942
|
-
}, _objectSpread$2({
|
|
31943
|
-
icon: icon,
|
|
31944
|
-
label: label,
|
|
31912
|
+
}, /*#__PURE__*/React.createElement("button", _extends({
|
|
31945
31913
|
onClick: onClick
|
|
31946
|
-
}, otherProps
|
|
31914
|
+
}, otherProps, {
|
|
31915
|
+
className: "neeto-molecules-profile-sublist__item-btn"
|
|
31916
|
+
}), icon && /*#__PURE__*/React.createElement("span", {
|
|
31917
|
+
className: "neeto-molecules-profile-sublist__item-btn-icon"
|
|
31918
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
31919
|
+
className: "neeto-molecules-profile-sublist__item-btn-label",
|
|
31920
|
+
component: "span",
|
|
31921
|
+
style: "body2",
|
|
31922
|
+
weight: "normal"
|
|
31923
|
+
}, label)));
|
|
31947
31924
|
}));
|
|
31948
31925
|
};
|
|
31949
31926
|
|
|
@@ -32012,27 +31989,63 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
32012
31989
|
};
|
|
32013
31990
|
|
|
32014
31991
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
32015
|
-
_ref.changesCount;
|
|
32016
|
-
var _useTranslation = useTranslation(),
|
|
32017
|
-
t = _useTranslation.t;
|
|
32018
|
-
var showChangesCount = false;
|
|
31992
|
+
var changesCount = _ref.changesCount;
|
|
32019
31993
|
return /*#__PURE__*/React.createElement("button", {
|
|
32020
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none
|
|
31994
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
32021
31995
|
"data-cy": "help-button",
|
|
32022
31996
|
ref: ref
|
|
32023
31997
|
}, /*#__PURE__*/React.createElement("span", {
|
|
32024
31998
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
32025
31999
|
}, /*#__PURE__*/React.createElement(Help, {
|
|
32026
32000
|
size: 24
|
|
32027
|
-
}),
|
|
32028
|
-
className: "neeto-molecules-
|
|
32029
|
-
|
|
32030
|
-
|
|
32031
|
-
weight: "normal"
|
|
32032
|
-
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
32001
|
+
}), isPresent(changesCount) && /*#__PURE__*/React.createElement("span", {
|
|
32002
|
+
className: "neeto-molecules-sidebar__notif-count",
|
|
32003
|
+
"data-testid": "help-icon-changes-count"
|
|
32004
|
+
}, changesCount)));
|
|
32033
32005
|
};
|
|
32034
32006
|
var HelpSection$1 = /*#__PURE__*/forwardRef(HelpSection);
|
|
32035
32007
|
|
|
32008
|
+
function _typeof(obj) {
|
|
32009
|
+
"@babel/helpers - typeof";
|
|
32010
|
+
|
|
32011
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
32012
|
+
return typeof obj;
|
|
32013
|
+
} : function (obj) {
|
|
32014
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
32015
|
+
}, _typeof(obj);
|
|
32016
|
+
}
|
|
32017
|
+
|
|
32018
|
+
function _toPrimitive(input, hint) {
|
|
32019
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
32020
|
+
var prim = input[Symbol.toPrimitive];
|
|
32021
|
+
if (prim !== undefined) {
|
|
32022
|
+
var res = prim.call(input, hint || "default");
|
|
32023
|
+
if (_typeof(res) !== "object") return res;
|
|
32024
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
32025
|
+
}
|
|
32026
|
+
return (hint === "string" ? String : Number)(input);
|
|
32027
|
+
}
|
|
32028
|
+
|
|
32029
|
+
function _toPropertyKey(arg) {
|
|
32030
|
+
var key = _toPrimitive(arg, "string");
|
|
32031
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
32032
|
+
}
|
|
32033
|
+
|
|
32034
|
+
function _defineProperty(obj, key, value) {
|
|
32035
|
+
key = _toPropertyKey(key);
|
|
32036
|
+
if (key in obj) {
|
|
32037
|
+
Object.defineProperty(obj, key, {
|
|
32038
|
+
value: value,
|
|
32039
|
+
enumerable: true,
|
|
32040
|
+
configurable: true,
|
|
32041
|
+
writable: true
|
|
32042
|
+
});
|
|
32043
|
+
} else {
|
|
32044
|
+
obj[key] = value;
|
|
32045
|
+
}
|
|
32046
|
+
return obj;
|
|
32047
|
+
}
|
|
32048
|
+
|
|
32036
32049
|
var _excluded$1 = ["label"];
|
|
32037
32050
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32038
32051
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -32042,7 +32055,6 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32042
32055
|
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
32043
32056
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32044
32057
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32045
|
-
var showChangesCount = false;
|
|
32046
32058
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32047
32059
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32048
32060
|
onClick: function onClick() {
|
|
@@ -32055,21 +32067,21 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32055
32067
|
var hide = _ref2.hide;
|
|
32056
32068
|
return !hide;
|
|
32057
32069
|
});
|
|
32058
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
32059
|
-
className: "neeto-molecules-help-sublist"
|
|
32060
|
-
}, helpLinks.map(function (_ref3, idx) {
|
|
32070
|
+
return /*#__PURE__*/React.createElement("ul", null, helpLinks.map(function (_ref3, idx) {
|
|
32061
32071
|
var label = _ref3.label,
|
|
32062
32072
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32063
32073
|
return /*#__PURE__*/React.createElement("li", {
|
|
32064
32074
|
className: "neeto-molecules-help-sublist__item",
|
|
32065
32075
|
key: idx
|
|
32066
32076
|
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
32067
|
-
fullWidth: true,
|
|
32068
32077
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
32069
32078
|
iconPosition: "left",
|
|
32070
32079
|
iconSize: 18,
|
|
32071
32080
|
style: "text"
|
|
32072
|
-
}, buttonProps), label,
|
|
32081
|
+
}, buttonProps), label, isPresent(buttonProps.changesCount) && /*#__PURE__*/React.createElement("span", {
|
|
32082
|
+
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
32083
|
+
"data-testid": "help-section-menu-changes-count"
|
|
32084
|
+
}, buttonProps.changesCount)));
|
|
32073
32085
|
}));
|
|
32074
32086
|
};
|
|
32075
32087
|
|
|
@@ -32098,7 +32110,7 @@ var Footer = function Footer(_ref) {
|
|
|
32098
32110
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32099
32111
|
}, []);
|
|
32100
32112
|
return /*#__PURE__*/React.createElement("div", {
|
|
32101
|
-
className: "neeto-molecules-sidebar__footer
|
|
32113
|
+
className: "neeto-molecules-sidebar__footer"
|
|
32102
32114
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
32103
32115
|
interactive: true,
|
|
32104
32116
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32107,8 +32119,6 @@ var Footer = function Footer(_ref) {
|
|
|
32107
32119
|
helpLinkOverrides: helpLinkOverrides
|
|
32108
32120
|
}),
|
|
32109
32121
|
hideOnClick: false,
|
|
32110
|
-
interactiveDebounce: 30,
|
|
32111
|
-
offset: 0,
|
|
32112
32122
|
position: "right",
|
|
32113
32123
|
theme: "light"
|
|
32114
32124
|
}, /*#__PURE__*/React.createElement(HelpSection$1, {
|
|
@@ -32122,10 +32132,10 @@ var Footer = function Footer(_ref) {
|
|
|
32122
32132
|
};
|
|
32123
32133
|
|
|
32124
32134
|
var Header = function Header() {
|
|
32125
|
-
var
|
|
32135
|
+
var _ProductLogos$logoNam;
|
|
32126
32136
|
var productName = globalProps.appName.substr(5);
|
|
32127
32137
|
var logoName = "Neeto".concat(capitalize(productName.toLowerCase()));
|
|
32128
|
-
var
|
|
32138
|
+
var ProductLogo = (_ProductLogos$logoNam = ProductLogos[logoName]) !== null && _ProductLogos$logoNam !== void 0 ? _ProductLogos$logoNam : Neeto;
|
|
32129
32139
|
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
32130
32140
|
data = _useFetchNeetoApps.data;
|
|
32131
32141
|
var homePath = "/";
|
|
@@ -32138,39 +32148,22 @@ var Header = function Header() {
|
|
|
32138
32148
|
}
|
|
32139
32149
|
}
|
|
32140
32150
|
return /*#__PURE__*/React.createElement("div", {
|
|
32141
|
-
className: "neeto-
|
|
32151
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-molecules-sidebar__header",
|
|
32142
32152
|
"data-cy": "sidebar-info"
|
|
32153
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32154
|
+
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32143
32155
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
32144
|
-
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32145
32156
|
to: homePath
|
|
32146
|
-
}, /*#__PURE__*/React.createElement(
|
|
32157
|
+
}, /*#__PURE__*/React.createElement(ProductLogo, null))));
|
|
32147
32158
|
};
|
|
32148
32159
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
32149
32160
|
|
|
32150
|
-
var
|
|
32151
|
-
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32152
|
-
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32153
|
-
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32154
|
-
return false;
|
|
32155
|
-
}
|
|
32156
|
-
var targetSearchParams = targetUrl.searchParams;
|
|
32157
|
-
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32158
|
-
return all(function (key) {
|
|
32159
|
-
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32160
|
-
}, targetSearchKeys);
|
|
32161
|
-
};
|
|
32162
|
-
|
|
32163
|
-
var _excluded = ["label", "to", "icon", "items"],
|
|
32164
|
-
_excluded2 = ["label", "to", "count"];
|
|
32161
|
+
var _excluded = ["label", "to", "icon", "description"];
|
|
32165
32162
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32166
32163
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
32167
32164
|
var Links = function Links(_ref) {
|
|
32168
32165
|
var navLinks = _ref.navLinks;
|
|
32169
32166
|
var location = useLocation();
|
|
32170
|
-
var _useState = useState(true),
|
|
32171
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32172
|
-
isActiveLinkExpanded = _useState2[0],
|
|
32173
|
-
setIsActiveLinkExpanded = _useState2[1];
|
|
32174
32167
|
var filterByPermissions = curry(function (_ref2) {
|
|
32175
32168
|
var permissions = _ref2.permissions;
|
|
32176
32169
|
if (permissions) {
|
|
@@ -32178,79 +32171,33 @@ var Links = function Links(_ref) {
|
|
|
32178
32171
|
}
|
|
32179
32172
|
return true;
|
|
32180
32173
|
});
|
|
32181
|
-
var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
|
|
32182
|
-
if (isNotPresent(items)) return;
|
|
32183
|
-
if (isActive()) {
|
|
32184
|
-
setIsActiveLinkExpanded(not);
|
|
32185
|
-
event.preventDefault();
|
|
32186
|
-
return;
|
|
32187
|
-
}
|
|
32188
|
-
setIsActiveLinkExpanded(true);
|
|
32189
|
-
};
|
|
32190
32174
|
return /*#__PURE__*/React.createElement("div", {
|
|
32191
|
-
className: "neeto-molecules-sidebar__links
|
|
32175
|
+
className: "neeto-molecules-sidebar__links"
|
|
32192
32176
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32193
32177
|
var label = _ref3.label,
|
|
32194
32178
|
to = _ref3.to,
|
|
32195
32179
|
icon = _ref3.icon,
|
|
32196
|
-
|
|
32180
|
+
description = _ref3.description,
|
|
32197
32181
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32198
32182
|
var IconSVG = icon;
|
|
32199
32183
|
var url = new URL(to, window.location.href);
|
|
32200
32184
|
var isActive = function isActive() {
|
|
32201
|
-
return
|
|
32185
|
+
return location.pathname.startsWith(url.pathname);
|
|
32202
32186
|
};
|
|
32203
|
-
|
|
32204
|
-
|
|
32187
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
32188
|
+
description: description,
|
|
32189
|
+
label: label,
|
|
32205
32190
|
key: mainIndex
|
|
32206
32191
|
}, /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32207
32192
|
activeClassName: "active",
|
|
32208
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32209
|
-
onClick: function onClick(event) {
|
|
32210
|
-
return handleNavLinkClick(event, isActive, items);
|
|
32211
|
-
}
|
|
32193
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32212
32194
|
}, _objectSpread({
|
|
32213
32195
|
isActive: isActive,
|
|
32214
32196
|
to: to
|
|
32215
|
-
}, otherProps)), icon && /*#__PURE__*/React.createElement("
|
|
32216
|
-
className: "neeto-molecules-sidebar__link-icon",
|
|
32197
|
+
}, otherProps)), icon && /*#__PURE__*/React.createElement("div", {
|
|
32198
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-molecules-sidebar__link-icon",
|
|
32217
32199
|
"data-testid": label
|
|
32218
|
-
}, /*#__PURE__*/React.createElement(IconSVG, null))
|
|
32219
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
32220
|
-
component: "span",
|
|
32221
|
-
style: "body2",
|
|
32222
|
-
weight: "normal"
|
|
32223
|
-
}, label), items && /*#__PURE__*/React.createElement("span", {
|
|
32224
|
-
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
32225
|
-
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
32226
|
-
})
|
|
32227
|
-
}, /*#__PURE__*/React.createElement(Down, {
|
|
32228
|
-
size: 16
|
|
32229
|
-
}))), items && isMenuExpanded && /*#__PURE__*/React.createElement("div", {
|
|
32230
|
-
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32231
|
-
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
32232
|
-
var subLabel = _ref4.label,
|
|
32233
|
-
subRoute = _ref4.to,
|
|
32234
|
-
count = _ref4.count,
|
|
32235
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32236
|
-
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32237
|
-
activeClassName: "active",
|
|
32238
|
-
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32239
|
-
isActive: function isActive() {
|
|
32240
|
-
return isSubRouteActive(subRoute, location);
|
|
32241
|
-
},
|
|
32242
|
-
key: subIndex,
|
|
32243
|
-
to: subRoute
|
|
32244
|
-
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
32245
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32246
|
-
component: "span",
|
|
32247
|
-
style: "body2"
|
|
32248
|
-
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
32249
|
-
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32250
|
-
component: "span",
|
|
32251
|
-
style: "body2"
|
|
32252
|
-
}, count > 999 ? "999+" : count));
|
|
32253
|
-
})));
|
|
32200
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null))));
|
|
32254
32201
|
}));
|
|
32255
32202
|
};
|
|
32256
32203
|
|
|
@@ -32268,25 +32215,15 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32268
32215
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32269
32216
|
isAppSwitcherOpen = _useState2[0],
|
|
32270
32217
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32271
|
-
var _useState3 = useState(false),
|
|
32272
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32273
|
-
isSidebarCollapsed = _useState4[0],
|
|
32274
|
-
setIsSidebarCollapsed = _useState4[1];
|
|
32275
32218
|
var location = useLocation();
|
|
32276
|
-
var _useTranslation = useTranslation(),
|
|
32277
|
-
t = _useTranslation.t;
|
|
32278
32219
|
useEffect(function () {
|
|
32279
32220
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32280
32221
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32281
32222
|
}, [location]);
|
|
32282
32223
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32283
|
-
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32284
|
-
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32285
|
-
})
|
|
32286
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32287
|
-
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",
|
|
32288
32224
|
"data-cy": "sidebar-wrapper",
|
|
32289
|
-
"data-testid": "sidebar"
|
|
32225
|
+
"data-testid": "sidebar",
|
|
32226
|
+
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")
|
|
32290
32227
|
}, /*#__PURE__*/React.createElement(Header$1, null), /*#__PURE__*/React.createElement(Links, {
|
|
32291
32228
|
navLinks: navLinks
|
|
32292
32229
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
@@ -32297,20 +32234,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32297
32234
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32298
32235
|
return setIsAppSwitcherOpen(not);
|
|
32299
32236
|
}
|
|
32300
|
-
})), /*#__PURE__*/React.createElement(
|
|
32301
|
-
className: "neeto-molecules-sidebar__toggler-wrapper"
|
|
32302
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
32303
|
-
className: "neeto-molecules-sidebar__toggler",
|
|
32304
|
-
icon: Chevron,
|
|
32305
|
-
style: "text",
|
|
32306
|
-
tooltipProps: {
|
|
32307
|
-
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32308
|
-
position: "bottom"
|
|
32309
|
-
},
|
|
32310
|
-
onClick: function onClick() {
|
|
32311
|
-
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32312
|
-
}
|
|
32313
|
-
}))), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32237
|
+
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32314
32238
|
isOpen: isAppSwitcherOpen,
|
|
32315
32239
|
onClose: function onClose() {
|
|
32316
32240
|
return setIsAppSwitcherOpen(false);
|