@bigbinary/neeto-molecules 1.0.73-beta → 1.0.74
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/Columns.cjs.js +32 -3
- package/dist/Columns.cjs.js.map +1 -1
- package/dist/Columns.js +32 -3
- package/dist/Columns.js.map +1 -1
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +49 -45
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +51 -47
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/DynamicVariables.cjs.js +31 -2
- package/dist/DynamicVariables.cjs.js.map +1 -1
- package/dist/DynamicVariables.js +31 -2
- package/dist/DynamicVariables.js.map +1 -1
- package/dist/Header.cjs.js +30 -50
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +33 -53
- 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 +90 -135
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +92 -137
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.cjs.js +13 -18
- package/dist/SubHeader.cjs.js.map +1 -1
- package/dist/SubHeader.js +13 -18
- package/dist/SubHeader.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +2 -6
- package/types/Columns.d.ts +1 -2
- package/types/DynamicVariables.d.ts +1 -2
- package/types/Header.d.ts +1 -1
- package/types/Sidebar.d.ts +1 -1
- package/types/SubHeader.d.ts +1 -2
package/dist/Sidebar.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, Children, isValidElement, cloneElement, forwardRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Typography, Button, Input, Spinner, Avatar, Tooltip } from '@bigbinary/neetoui';
|
|
4
|
-
import { toLower, mergeDeepLeft, all, curry, is, includes, __, not } from 'ramda';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { toLower, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
6
3
|
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
7
4
|
import { useFetchNeetoApps } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
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';
|
|
@@ -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,7 +31717,42 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31717
31717
|
})))));
|
|
31718
31718
|
};
|
|
31719
31719
|
|
|
31720
|
-
var
|
|
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
|
+
|
|
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}";
|
|
31721
31756
|
n(css,{});
|
|
31722
31757
|
|
|
31723
31758
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -31733,7 +31768,9 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31733
31768
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31734
31769
|
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31735
31770
|
};
|
|
31736
|
-
return /*#__PURE__*/React.createElement(
|
|
31771
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
31772
|
+
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31773
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
31737
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",
|
|
31738
31775
|
"data-cy": "app-switcher-button",
|
|
31739
31776
|
onClick: handleAppSwitcherToggle,
|
|
@@ -31744,12 +31781,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31744
31781
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31745
31782
|
}, hasHovered && isFreshLoading ? /*#__PURE__*/React.createElement(Spinner, null) : /*#__PURE__*/React.createElement(AppSwitcher$1, {
|
|
31746
31783
|
size: 24
|
|
31747
|
-
}))
|
|
31748
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31749
|
-
component: "span",
|
|
31750
|
-
style: "body2",
|
|
31751
|
-
weight: "normal"
|
|
31752
|
-
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31784
|
+
}))));
|
|
31753
31785
|
};
|
|
31754
31786
|
|
|
31755
31787
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31767,7 +31799,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31767
31799
|
}
|
|
31768
31800
|
},
|
|
31769
31801
|
helpCenterProps: {
|
|
31770
|
-
label: t$1("neetoMolecules.sidebar.helpLinks.
|
|
31802
|
+
label: t$1("neetoMolecules.sidebar.helpLinks.helpCenter"),
|
|
31771
31803
|
icon: Book,
|
|
31772
31804
|
"data-cy": "help-link-help-center-button",
|
|
31773
31805
|
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
@@ -31828,26 +31860,21 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
31828
31860
|
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
31829
31861
|
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31830
31862
|
return /*#__PURE__*/React.createElement("button", {
|
|
31831
|
-
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-
|
|
31863
|
+
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-left",
|
|
31832
31864
|
"data-cy": "profile-section",
|
|
31833
31865
|
ref: ref,
|
|
31834
31866
|
onMouseEnter: function onMouseEnter() {
|
|
31835
31867
|
return setHasHovered(true);
|
|
31836
31868
|
}
|
|
31837
31869
|
}, /*#__PURE__*/React.createElement("span", {
|
|
31838
|
-
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center
|
|
31870
|
+
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31839
31871
|
}, isFreshLoading && hasHovered ? /*#__PURE__*/React.createElement("span", {
|
|
31840
31872
|
className: "flex h-11 w-10 items-center justify-center"
|
|
31841
|
-
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(
|
|
31842
|
-
className: "neeto-ui-flex-shrink-0
|
|
31843
|
-
size: "
|
|
31873
|
+
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(Avatar, {
|
|
31874
|
+
className: "neeto-ui-flex-shrink-0",
|
|
31875
|
+
size: "large",
|
|
31844
31876
|
user: profileInfo
|
|
31845
|
-
})
|
|
31846
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31847
|
-
component: "span",
|
|
31848
|
-
style: "body2",
|
|
31849
|
-
weight: "normal"
|
|
31850
|
-
}, truncate(profileInfo.name, 18)))));
|
|
31877
|
+
})));
|
|
31851
31878
|
};
|
|
31852
31879
|
var ProfileSection$1 = /*#__PURE__*/forwardRef(ProfileSection);
|
|
31853
31880
|
|
|
@@ -31878,19 +31905,22 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31878
31905
|
_ref2$icon = _ref2.icon,
|
|
31879
31906
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31880
31907
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
31908
|
+
var IconSVG = icon;
|
|
31881
31909
|
return /*#__PURE__*/React.createElement("li", {
|
|
31882
31910
|
className: "neeto-molecules-profile-sublist__item",
|
|
31883
31911
|
key: idx
|
|
31884
|
-
}, /*#__PURE__*/React.createElement(
|
|
31885
|
-
fullWidth: true,
|
|
31886
|
-
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31887
|
-
icon: icon,
|
|
31888
|
-
iconPosition: "left",
|
|
31889
|
-
iconSize: 18,
|
|
31890
|
-
label: label,
|
|
31891
|
-
style: "text",
|
|
31912
|
+
}, /*#__PURE__*/React.createElement("button", _extends({
|
|
31892
31913
|
onClick: onClick
|
|
31893
|
-
}, 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)));
|
|
31894
31924
|
}));
|
|
31895
31925
|
};
|
|
31896
31926
|
|
|
@@ -31958,24 +31988,19 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
31958
31988
|
};
|
|
31959
31989
|
|
|
31960
31990
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
31961
|
-
_ref.changesCount;
|
|
31962
|
-
var _useTranslation = useTranslation(),
|
|
31963
|
-
t = _useTranslation.t;
|
|
31964
|
-
var showChangesCount = false;
|
|
31991
|
+
var changesCount = _ref.changesCount;
|
|
31965
31992
|
return /*#__PURE__*/React.createElement("button", {
|
|
31966
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none
|
|
31993
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
31967
31994
|
"data-cy": "help-button",
|
|
31968
31995
|
ref: ref
|
|
31969
31996
|
}, /*#__PURE__*/React.createElement("span", {
|
|
31970
31997
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31971
31998
|
}, /*#__PURE__*/React.createElement(Help, {
|
|
31972
31999
|
size: 24
|
|
31973
|
-
}),
|
|
31974
|
-
className: "neeto-molecules-
|
|
31975
|
-
|
|
31976
|
-
|
|
31977
|
-
weight: "normal"
|
|
31978
|
-
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
32000
|
+
}), isPresent(changesCount) && /*#__PURE__*/React.createElement("span", {
|
|
32001
|
+
className: "neeto-molecules-sidebar__notif-count",
|
|
32002
|
+
"data-testid": "help-icon-changes-count"
|
|
32003
|
+
}, changesCount)));
|
|
31979
32004
|
};
|
|
31980
32005
|
var HelpSection$1 = /*#__PURE__*/forwardRef(HelpSection);
|
|
31981
32006
|
|
|
@@ -32029,7 +32054,6 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32029
32054
|
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
32030
32055
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32031
32056
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32032
|
-
var showChangesCount = false;
|
|
32033
32057
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32034
32058
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32035
32059
|
onClick: function onClick() {
|
|
@@ -32042,21 +32066,21 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32042
32066
|
var hide = _ref2.hide;
|
|
32043
32067
|
return !hide;
|
|
32044
32068
|
});
|
|
32045
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
32046
|
-
className: "neeto-molecules-help-sublist"
|
|
32047
|
-
}, helpLinks.map(function (_ref3, idx) {
|
|
32069
|
+
return /*#__PURE__*/React.createElement("ul", null, helpLinks.map(function (_ref3, idx) {
|
|
32048
32070
|
var label = _ref3.label,
|
|
32049
32071
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32050
32072
|
return /*#__PURE__*/React.createElement("li", {
|
|
32051
32073
|
className: "neeto-molecules-help-sublist__item",
|
|
32052
32074
|
key: idx
|
|
32053
32075
|
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
32054
|
-
fullWidth: true,
|
|
32055
32076
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
32056
32077
|
iconPosition: "left",
|
|
32057
32078
|
iconSize: 18,
|
|
32058
32079
|
style: "text"
|
|
32059
|
-
}, buttonProps), label,
|
|
32080
|
+
}, buttonProps), label, isPresent(buttonProps.changesCount) && /*#__PURE__*/React.createElement("span", {
|
|
32081
|
+
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
32082
|
+
"data-testid": "help-section-menu-changes-count"
|
|
32083
|
+
}, buttonProps.changesCount)));
|
|
32060
32084
|
}));
|
|
32061
32085
|
};
|
|
32062
32086
|
|
|
@@ -32085,7 +32109,7 @@ var Footer = function Footer(_ref) {
|
|
|
32085
32109
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32086
32110
|
}, []);
|
|
32087
32111
|
return /*#__PURE__*/React.createElement("div", {
|
|
32088
|
-
className: "neeto-molecules-sidebar__footer
|
|
32112
|
+
className: "neeto-molecules-sidebar__footer"
|
|
32089
32113
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
32090
32114
|
interactive: true,
|
|
32091
32115
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32094,8 +32118,6 @@ var Footer = function Footer(_ref) {
|
|
|
32094
32118
|
helpLinkOverrides: helpLinkOverrides
|
|
32095
32119
|
}),
|
|
32096
32120
|
hideOnClick: false,
|
|
32097
|
-
interactiveDebounce: 30,
|
|
32098
|
-
offset: 0,
|
|
32099
32121
|
position: "right",
|
|
32100
32122
|
theme: "light"
|
|
32101
32123
|
}, /*#__PURE__*/React.createElement(HelpSection$1, {
|
|
@@ -32125,30 +32147,17 @@ var Header = function Header() {
|
|
|
32125
32147
|
}
|
|
32126
32148
|
}
|
|
32127
32149
|
return /*#__PURE__*/React.createElement("div", {
|
|
32128
|
-
className: "neeto-
|
|
32150
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-molecules-sidebar__header",
|
|
32129
32151
|
"data-cy": "sidebar-info"
|
|
32152
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32153
|
+
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32130
32154
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
32131
|
-
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32132
32155
|
to: homePath
|
|
32133
|
-
}, /*#__PURE__*/React.createElement(ProductLogo, null)));
|
|
32156
|
+
}, /*#__PURE__*/React.createElement(ProductLogo, null))));
|
|
32134
32157
|
};
|
|
32135
32158
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
32136
32159
|
|
|
32137
|
-
var
|
|
32138
|
-
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32139
|
-
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32140
|
-
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32141
|
-
return false;
|
|
32142
|
-
}
|
|
32143
|
-
var targetSearchParams = targetUrl.searchParams;
|
|
32144
|
-
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32145
|
-
return all(function (key) {
|
|
32146
|
-
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32147
|
-
}, targetSearchKeys);
|
|
32148
|
-
};
|
|
32149
|
-
|
|
32150
|
-
var _excluded = ["label", "to", "icon", "items"],
|
|
32151
|
-
_excluded2 = ["label", "to", "count"];
|
|
32160
|
+
var _excluded = ["label", "to", "icon", "description"];
|
|
32152
32161
|
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; }
|
|
32153
32162
|
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; }
|
|
32154
32163
|
var Links = function Links(_ref) {
|
|
@@ -32162,19 +32171,21 @@ var Links = function Links(_ref) {
|
|
|
32162
32171
|
return true;
|
|
32163
32172
|
});
|
|
32164
32173
|
return /*#__PURE__*/React.createElement("div", {
|
|
32165
|
-
className: "neeto-molecules-sidebar__links
|
|
32174
|
+
className: "neeto-molecules-sidebar__links"
|
|
32166
32175
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32167
32176
|
var label = _ref3.label,
|
|
32168
32177
|
to = _ref3.to,
|
|
32169
32178
|
icon = _ref3.icon,
|
|
32170
|
-
|
|
32179
|
+
description = _ref3.description,
|
|
32171
32180
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32172
32181
|
var IconSVG = icon;
|
|
32173
32182
|
var url = new URL(to, window.location.href);
|
|
32174
32183
|
var isActive = function isActive() {
|
|
32175
32184
|
return location.pathname.startsWith(url.pathname);
|
|
32176
32185
|
};
|
|
32177
|
-
return /*#__PURE__*/React.createElement(
|
|
32186
|
+
return /*#__PURE__*/React.createElement(NavIconWrapper, {
|
|
32187
|
+
description: description,
|
|
32188
|
+
label: label,
|
|
32178
32189
|
key: mainIndex
|
|
32179
32190
|
}, /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32180
32191
|
activeClassName: "active",
|
|
@@ -32182,45 +32193,10 @@ var Links = function Links(_ref) {
|
|
|
32182
32193
|
}, _objectSpread({
|
|
32183
32194
|
isActive: isActive,
|
|
32184
32195
|
to: to
|
|
32185
|
-
}, otherProps)), icon && /*#__PURE__*/React.createElement("
|
|
32186
|
-
className: "neeto-molecules-sidebar__link-icon",
|
|
32196
|
+
}, otherProps)), icon && /*#__PURE__*/React.createElement("div", {
|
|
32197
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-molecules-sidebar__link-icon",
|
|
32187
32198
|
"data-testid": label
|
|
32188
|
-
}, /*#__PURE__*/React.createElement(IconSVG, null))
|
|
32189
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
32190
|
-
component: "span",
|
|
32191
|
-
style: "body2",
|
|
32192
|
-
weight: "normal"
|
|
32193
|
-
}, label), items && /*#__PURE__*/React.createElement("span", {
|
|
32194
|
-
className: classnames("neeto-molecules-sidebar__link-icon", {
|
|
32195
|
-
"neeto-molecules-sidebar__link-icon--rotate": isActive()
|
|
32196
|
-
})
|
|
32197
|
-
}, /*#__PURE__*/React.createElement(Down, {
|
|
32198
|
-
size: 16
|
|
32199
|
-
}))), items && isActive() && /*#__PURE__*/React.createElement("div", {
|
|
32200
|
-
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32201
|
-
}, items.map(function (_ref4, subIndex) {
|
|
32202
|
-
var subLabel = _ref4.label,
|
|
32203
|
-
subRoute = _ref4.to,
|
|
32204
|
-
count = _ref4.count,
|
|
32205
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32206
|
-
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32207
|
-
activeClassName: "active",
|
|
32208
|
-
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32209
|
-
isActive: function isActive() {
|
|
32210
|
-
return isSubRouteActive(subRoute, location);
|
|
32211
|
-
},
|
|
32212
|
-
key: subIndex,
|
|
32213
|
-
to: subRoute
|
|
32214
|
-
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
32215
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32216
|
-
component: "span",
|
|
32217
|
-
style: "body2"
|
|
32218
|
-
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
32219
|
-
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32220
|
-
component: "span",
|
|
32221
|
-
style: "body2"
|
|
32222
|
-
}, count));
|
|
32223
|
-
})));
|
|
32199
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null))));
|
|
32224
32200
|
}));
|
|
32225
32201
|
};
|
|
32226
32202
|
|
|
@@ -32238,25 +32214,15 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32238
32214
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32239
32215
|
isAppSwitcherOpen = _useState2[0],
|
|
32240
32216
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32241
|
-
var _useState3 = useState(false),
|
|
32242
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32243
|
-
isSidebarCollapsed = _useState4[0],
|
|
32244
|
-
setIsSidebarCollapsed = _useState4[1];
|
|
32245
32217
|
var location = useLocation();
|
|
32246
|
-
var _useTranslation = useTranslation(),
|
|
32247
|
-
t = _useTranslation.t;
|
|
32248
32218
|
useEffect(function () {
|
|
32249
32219
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32250
32220
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32251
32221
|
}, [location]);
|
|
32252
32222
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32253
|
-
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32254
|
-
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32255
|
-
})
|
|
32256
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32257
|
-
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",
|
|
32258
32223
|
"data-cy": "sidebar-wrapper",
|
|
32259
|
-
"data-testid": "sidebar"
|
|
32224
|
+
"data-testid": "sidebar",
|
|
32225
|
+
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")
|
|
32260
32226
|
}, /*#__PURE__*/React.createElement(Header$1, null), /*#__PURE__*/React.createElement(Links, {
|
|
32261
32227
|
navLinks: navLinks
|
|
32262
32228
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
@@ -32267,17 +32233,6 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32267
32233
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32268
32234
|
return setIsAppSwitcherOpen(not);
|
|
32269
32235
|
}
|
|
32270
|
-
})), /*#__PURE__*/React.createElement(Button, {
|
|
32271
|
-
className: "neeto-molecules-sidebar__toggler",
|
|
32272
|
-
icon: isSidebarCollapsed ? SidebarOpen : SidebarClose,
|
|
32273
|
-
style: "text",
|
|
32274
|
-
tooltipProps: {
|
|
32275
|
-
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32276
|
-
position: "bottom"
|
|
32277
|
-
},
|
|
32278
|
-
onClick: function onClick() {
|
|
32279
|
-
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32280
|
-
}
|
|
32281
32236
|
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32282
32237
|
isOpen: isAppSwitcherOpen,
|
|
32283
32238
|
onClose: function onClose() {
|