@bigbinary/neeto-molecules 1.0.65-beta → 1.0.65
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 +17 -8
- 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 +93 -119
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +96 -122
- package/dist/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +1 -4
- package/types/Sidebar.d.ts +1 -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
|
-
import { useTranslation } from 'react-i18next';
|
|
6
3
|
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
7
|
-
import {
|
|
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
|
+
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { capitalize, isPresent, 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() {
|
|
@@ -31714,14 +31714,51 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31714
31714
|
})))));
|
|
31715
31715
|
};
|
|
31716
31716
|
|
|
31717
|
-
var css = "
|
|
31717
|
+
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}";
|
|
31718
31718
|
n(css,{});
|
|
31719
31719
|
|
|
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));
|
|
31735
|
+
};
|
|
31736
|
+
var FeaturedTooltip$1 = /*#__PURE__*/React.memo(FeaturedTooltip);
|
|
31737
|
+
|
|
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
|
+
|
|
31720
31755
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
31721
31756
|
var onAppSwitcherToggle = _ref.onAppSwitcherToggle;
|
|
31722
31757
|
var _useTranslation = useTranslation(),
|
|
31723
31758
|
t = _useTranslation.t;
|
|
31724
|
-
return /*#__PURE__*/React.createElement(
|
|
31759
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
31760
|
+
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31761
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
31725
31762
|
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",
|
|
31726
31763
|
"data-cy": "app-switcher-button",
|
|
31727
31764
|
onClick: onAppSwitcherToggle
|
|
@@ -31729,12 +31766,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31729
31766
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31730
31767
|
}, /*#__PURE__*/React.createElement(AppSwitcher$1, {
|
|
31731
31768
|
size: 24
|
|
31732
|
-
}))
|
|
31733
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31734
|
-
component: "span",
|
|
31735
|
-
style: "body2",
|
|
31736
|
-
weight: "normal"
|
|
31737
|
-
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31769
|
+
}))));
|
|
31738
31770
|
};
|
|
31739
31771
|
|
|
31740
31772
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31805,26 +31837,24 @@ var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
|
31805
31837
|
};
|
|
31806
31838
|
|
|
31807
31839
|
var HelpSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31808
|
-
_ref.changesCount;
|
|
31809
|
-
var _useTranslation = useTranslation(),
|
|
31810
|
-
t = _useTranslation.t;
|
|
31811
|
-
var showChangesCount = false;
|
|
31840
|
+
var changesCount = _ref.changesCount;
|
|
31812
31841
|
return /*#__PURE__*/React.createElement("button", {
|
|
31813
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none
|
|
31842
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
31814
31843
|
"data-cy": "help-button",
|
|
31815
31844
|
ref: ref
|
|
31816
31845
|
}, /*#__PURE__*/React.createElement("span", {
|
|
31817
31846
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31818
31847
|
}, /*#__PURE__*/React.createElement(Help, {
|
|
31819
31848
|
size: 24
|
|
31820
|
-
}),
|
|
31821
|
-
className: "neeto-molecules-
|
|
31822
|
-
|
|
31823
|
-
|
|
31824
|
-
weight: "normal"
|
|
31825
|
-
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
31849
|
+
}), isPresent(changesCount) && /*#__PURE__*/React.createElement("span", {
|
|
31850
|
+
className: "neeto-molecules-sidebar__notif-count",
|
|
31851
|
+
"data-testid": "help-icon-changes-count"
|
|
31852
|
+
}, changesCount)));
|
|
31826
31853
|
});
|
|
31827
31854
|
HelpSection.displayName = "HelpSection";
|
|
31855
|
+
HelpSection.propTypes = {
|
|
31856
|
+
changesCount: propTypes.exports.number
|
|
31857
|
+
};
|
|
31828
31858
|
|
|
31829
31859
|
function _typeof(obj) {
|
|
31830
31860
|
"@babel/helpers - typeof";
|
|
@@ -31875,7 +31905,6 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
31875
31905
|
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
31876
31906
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
31877
31907
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
31878
|
-
var showChangesCount = false;
|
|
31879
31908
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
31880
31909
|
return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
31881
31910
|
onClick: function onClick() {
|
|
@@ -31886,40 +31915,37 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
31886
31915
|
var hide = _ref2.hide;
|
|
31887
31916
|
return !hide;
|
|
31888
31917
|
});
|
|
31889
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
31890
|
-
className: "neeto-molecules-help-sublist"
|
|
31891
|
-
}, helpLinks.map(function (_ref3, idx) {
|
|
31918
|
+
return /*#__PURE__*/React.createElement("ul", null, helpLinks.map(function (_ref3, idx) {
|
|
31892
31919
|
var label = _ref3.label,
|
|
31893
31920
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$2);
|
|
31894
31921
|
return /*#__PURE__*/React.createElement("li", {
|
|
31895
31922
|
className: "neeto-molecules-help-sublist__item",
|
|
31896
31923
|
key: idx
|
|
31897
31924
|
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
31898
|
-
fullWidth: true,
|
|
31899
31925
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
31900
31926
|
iconPosition: "left",
|
|
31901
31927
|
iconSize: 18,
|
|
31902
31928
|
style: "text"
|
|
31903
|
-
}, buttonProps), label,
|
|
31929
|
+
}, buttonProps), label, isPresent(buttonProps.changesCount) && /*#__PURE__*/React.createElement("span", {
|
|
31930
|
+
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
31931
|
+
"data-testid": "help-section-menu-changes-count"
|
|
31932
|
+
}, buttonProps.changesCount)));
|
|
31904
31933
|
}));
|
|
31905
31934
|
};
|
|
31906
31935
|
|
|
31907
31936
|
var ProfileSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31908
31937
|
var profileInfo = _ref.profileInfo;
|
|
31909
31938
|
return /*#__PURE__*/React.createElement("button", {
|
|
31910
|
-
className: "neeto-molecules-sidebar__profile
|
|
31939
|
+
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-left",
|
|
31911
31940
|
"data-cy": "profile-section",
|
|
31912
31941
|
ref: ref
|
|
31942
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
31943
|
+
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31913
31944
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
31914
|
-
className: "neeto-ui-flex-shrink-0
|
|
31915
|
-
size: "
|
|
31945
|
+
className: "neeto-ui-flex-shrink-0",
|
|
31946
|
+
size: "large",
|
|
31916
31947
|
user: profileInfo
|
|
31917
|
-
})
|
|
31918
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31919
|
-
component: "span",
|
|
31920
|
-
style: "body2",
|
|
31921
|
-
weight: "normal"
|
|
31922
|
-
}, truncate(profileInfo.name, 18)));
|
|
31948
|
+
})));
|
|
31923
31949
|
});
|
|
31924
31950
|
ProfileSection.displayName = "ProfileSection";
|
|
31925
31951
|
|
|
@@ -31950,19 +31976,22 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31950
31976
|
_ref2$icon = _ref2.icon,
|
|
31951
31977
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31952
31978
|
otherProps = _objectWithoutProperties(_ref2, _excluded$1);
|
|
31979
|
+
var IconSVG = icon;
|
|
31953
31980
|
return /*#__PURE__*/React.createElement("li", {
|
|
31954
31981
|
className: "neeto-molecules-profile-sublist__item",
|
|
31955
31982
|
key: idx
|
|
31956
|
-
}, /*#__PURE__*/React.createElement(
|
|
31957
|
-
fullWidth: true,
|
|
31958
|
-
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31959
|
-
icon: icon,
|
|
31960
|
-
iconPosition: "left",
|
|
31961
|
-
iconSize: 18,
|
|
31962
|
-
label: label,
|
|
31963
|
-
style: "text",
|
|
31983
|
+
}, /*#__PURE__*/React.createElement("button", _extends({
|
|
31964
31984
|
onClick: onClick
|
|
31965
|
-
}, otherProps
|
|
31985
|
+
}, otherProps, {
|
|
31986
|
+
className: "neeto-molecules-profile-sublist__item-btn"
|
|
31987
|
+
}), icon && /*#__PURE__*/React.createElement("span", {
|
|
31988
|
+
className: "neeto-molecules-profile-sublist__item-btn-icon"
|
|
31989
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
31990
|
+
className: "neeto-molecules-profile-sublist__item-btn-label",
|
|
31991
|
+
component: "span",
|
|
31992
|
+
style: "body2",
|
|
31993
|
+
weight: "normal"
|
|
31994
|
+
}, label)));
|
|
31966
31995
|
}));
|
|
31967
31996
|
};
|
|
31968
31997
|
|
|
@@ -32016,7 +32045,7 @@ var Footer = function Footer(_ref) {
|
|
|
32016
32045
|
var profileInfo = getProfileInfo(profileInfoOverrides);
|
|
32017
32046
|
var changesCount = (_helpLinkOverrides$ch = helpLinkOverrides.changelogProps) === null || _helpLinkOverrides$ch === void 0 ? void 0 : _helpLinkOverrides$ch.changesCount;
|
|
32018
32047
|
return /*#__PURE__*/React.createElement("div", {
|
|
32019
|
-
className: "neeto-molecules-sidebar__footer
|
|
32048
|
+
className: "neeto-molecules-sidebar__footer"
|
|
32020
32049
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
32021
32050
|
interactive: true,
|
|
32022
32051
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32024,8 +32053,6 @@ var Footer = function Footer(_ref) {
|
|
|
32024
32053
|
helpLinkOverrides: helpLinkOverrides
|
|
32025
32054
|
}),
|
|
32026
32055
|
hideOnClick: false,
|
|
32027
|
-
interactiveDebounce: 30,
|
|
32028
|
-
offset: 0,
|
|
32029
32056
|
position: "right",
|
|
32030
32057
|
theme: "light"
|
|
32031
32058
|
}, /*#__PURE__*/React.createElement(HelpSection, {
|
|
@@ -32036,8 +32063,6 @@ var Footer = function Footer(_ref) {
|
|
|
32036
32063
|
interactive: true,
|
|
32037
32064
|
className: "neeto-molecules-profile-popup-wrapper",
|
|
32038
32065
|
hideOnClick: false,
|
|
32039
|
-
interactiveDebounce: 30,
|
|
32040
|
-
offset: 0,
|
|
32041
32066
|
position: "right",
|
|
32042
32067
|
theme: "light",
|
|
32043
32068
|
content: /*#__PURE__*/React.createElement(ProfileMenu, {
|
|
@@ -32057,17 +32082,17 @@ var Header = function Header() {
|
|
|
32057
32082
|
name: globalProps.appName.split("neeto")[1]
|
|
32058
32083
|
}, globalProps.neetoApps)) === null || _findBy2 === void 0 ? void 0 : _findBy2.url) !== null && _findBy$url !== void 0 ? _findBy$url : window.location.origin);
|
|
32059
32084
|
return /*#__PURE__*/React.createElement("div", {
|
|
32060
|
-
className: "neeto-
|
|
32085
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-molecules-sidebar__header",
|
|
32061
32086
|
"data-cy": "sidebar-info"
|
|
32087
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32088
|
+
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32062
32089
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
32063
|
-
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32064
32090
|
to: homeUrl.pathname
|
|
32065
|
-
}, ProductLogo ? /*#__PURE__*/React.createElement(ProductLogo, null) : /*#__PURE__*/React.createElement(Neeto, null)));
|
|
32091
|
+
}, ProductLogo ? /*#__PURE__*/React.createElement(ProductLogo, null) : /*#__PURE__*/React.createElement(Neeto, null))));
|
|
32066
32092
|
};
|
|
32067
32093
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
32068
32094
|
|
|
32069
|
-
var _excluded = ["label", "to", "icon", "
|
|
32070
|
-
_excluded2 = ["label", "to", "count"];
|
|
32095
|
+
var _excluded = ["label", "to", "icon", "description"];
|
|
32071
32096
|
var Links = function Links(_ref) {
|
|
32072
32097
|
var navLinks = _ref.navLinks;
|
|
32073
32098
|
var location = useLocation();
|
|
@@ -32079,61 +32104,31 @@ var Links = function Links(_ref) {
|
|
|
32079
32104
|
return true;
|
|
32080
32105
|
});
|
|
32081
32106
|
return /*#__PURE__*/React.createElement("div", {
|
|
32082
|
-
className: "neeto-molecules-sidebar__links
|
|
32107
|
+
className: "neeto-molecules-sidebar__links"
|
|
32083
32108
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32084
32109
|
var label = _ref3.label,
|
|
32085
32110
|
to = _ref3.to,
|
|
32086
32111
|
icon = _ref3.icon,
|
|
32087
|
-
|
|
32112
|
+
description = _ref3.description,
|
|
32088
32113
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32089
32114
|
var IconSVG = icon;
|
|
32090
32115
|
var url = new URL(to, window.location.href);
|
|
32091
32116
|
var isActive = function isActive() {
|
|
32092
32117
|
return location.pathname.startsWith(url.pathname);
|
|
32093
32118
|
};
|
|
32094
|
-
return /*#__PURE__*/React.createElement(
|
|
32095
|
-
|
|
32119
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
32120
|
+
description: description,
|
|
32121
|
+
key: mainIndex,
|
|
32122
|
+
label: label
|
|
32096
32123
|
}, /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32097
32124
|
activeClassName: "active",
|
|
32098
32125
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
32099
32126
|
isActive: isActive,
|
|
32100
32127
|
to: to
|
|
32101
|
-
}, otherProps), icon && /*#__PURE__*/React.createElement("
|
|
32102
|
-
className: "neeto-molecules-sidebar__link-icon",
|
|
32128
|
+
}, otherProps), icon && /*#__PURE__*/React.createElement("div", {
|
|
32129
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-molecules-sidebar__link-icon",
|
|
32103
32130
|
"data-testid": label
|
|
32104
|
-
}, /*#__PURE__*/React.createElement(IconSVG, null))
|
|
32105
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
32106
|
-
component: "span",
|
|
32107
|
-
style: "body2",
|
|
32108
|
-
weight: "normal"
|
|
32109
|
-
}, label), items && /*#__PURE__*/React.createElement("span", {
|
|
32110
|
-
className: classnames("neeto-molecules-sidebar__link-icon", {
|
|
32111
|
-
"neeto-molecules-sidebar__link-icon--rotate": isActive()
|
|
32112
|
-
})
|
|
32113
|
-
}, /*#__PURE__*/React.createElement(Down, {
|
|
32114
|
-
size: 16
|
|
32115
|
-
}))), items && isActive() && /*#__PURE__*/React.createElement("div", {
|
|
32116
|
-
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32117
|
-
}, items.map(function (_ref4, subIndex) {
|
|
32118
|
-
var subLabel = _ref4.label,
|
|
32119
|
-
subRoute = _ref4.to,
|
|
32120
|
-
count = _ref4.count,
|
|
32121
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32122
|
-
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32123
|
-
activeClassName: "active",
|
|
32124
|
-
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32125
|
-
key: subIndex,
|
|
32126
|
-
to: subRoute
|
|
32127
|
-
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
32128
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32129
|
-
component: "span",
|
|
32130
|
-
style: "body2"
|
|
32131
|
-
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
32132
|
-
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32133
|
-
component: "span",
|
|
32134
|
-
style: "body2"
|
|
32135
|
-
}, count));
|
|
32136
|
-
})));
|
|
32131
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null))));
|
|
32137
32132
|
}));
|
|
32138
32133
|
};
|
|
32139
32134
|
|
|
@@ -32151,25 +32146,15 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32151
32146
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32152
32147
|
isAppSwitcherOpen = _useState2[0],
|
|
32153
32148
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32154
|
-
var _useState3 = useState(false),
|
|
32155
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32156
|
-
isSidebarCollapsed = _useState4[0],
|
|
32157
|
-
setIsSidebarCollapsed = _useState4[1];
|
|
32158
32149
|
var location = useLocation();
|
|
32159
|
-
var _useTranslation = useTranslation(),
|
|
32160
|
-
t = _useTranslation.t;
|
|
32161
32150
|
useEffect(function () {
|
|
32162
32151
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32163
32152
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32164
32153
|
}, [location]);
|
|
32165
32154
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32166
|
-
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32167
|
-
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32168
|
-
})
|
|
32169
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32170
|
-
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",
|
|
32171
32155
|
"data-cy": "sidebar-wrapper",
|
|
32172
|
-
"data-testid": "sidebar"
|
|
32156
|
+
"data-testid": "sidebar",
|
|
32157
|
+
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")
|
|
32173
32158
|
}, /*#__PURE__*/React.createElement(Header$1, null), /*#__PURE__*/React.createElement(Links, {
|
|
32174
32159
|
navLinks: navLinks
|
|
32175
32160
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
@@ -32180,17 +32165,6 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32180
32165
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32181
32166
|
return setIsAppSwitcherOpen(not);
|
|
32182
32167
|
}
|
|
32183
|
-
})), /*#__PURE__*/React.createElement(Button, {
|
|
32184
|
-
className: "neeto-molecules-sidebar__toggler",
|
|
32185
|
-
icon: Expand,
|
|
32186
|
-
style: "text",
|
|
32187
|
-
tooltipProps: {
|
|
32188
|
-
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32189
|
-
position: "bottom"
|
|
32190
|
-
},
|
|
32191
|
-
onClick: function onClick() {
|
|
32192
|
-
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32193
|
-
}
|
|
32194
32168
|
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32195
32169
|
isOpen: isAppSwitcherOpen,
|
|
32196
32170
|
onClose: function onClose() {
|