@bigbinary/neeto-molecules 1.0.90 → 1.0.91-beta
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 +34 -6
- package/dist/Columns.cjs.js.map +1 -1
- package/dist/Columns.js +37 -9
- package/dist/Columns.js.map +1 -1
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomain.cjs.js +8 -10
- package/dist/CustomDomain.cjs.js.map +1 -1
- package/dist/CustomDomain.js +10 -13
- package/dist/CustomDomain.js.map +1 -1
- package/dist/CustomDomainDashboard.cjs.js +38 -38
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +41 -42
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/EmailForm.cjs.js +1 -1
- package/dist/EmailForm.cjs.js.map +1 -1
- package/dist/EmailForm.js +1 -1
- package/dist/EmailForm.js.map +1 -1
- package/dist/Header.cjs.js +22 -24
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +25 -27
- package/dist/Header.js.map +1 -1
- package/dist/IconPicker.cjs.js +1 -0
- package/dist/IconPicker.cjs.js.map +1 -1
- package/dist/IconPicker.js +1 -0
- package/dist/IconPicker.js.map +1 -1
- package/dist/IntegrationCard.cjs.js +223 -38
- package/dist/IntegrationCard.cjs.js.map +1 -1
- package/dist/IntegrationCard.js +227 -42
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.cjs.js +22 -14
- package/dist/IntegrationDisconnectAlert.cjs.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.js +19 -14
- package/dist/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.cjs.js +17 -9
- package/dist/IntegrationWalkthroughModal.cjs.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.js +14 -9
- package/dist/IntegrationWalkthroughModal.js.map +1 -1
- package/dist/IpRestriction.cjs.js +54 -50
- package/dist/IpRestriction.cjs.js.map +1 -1
- package/dist/IpRestriction.js +55 -51
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.cjs.js +2 -0
- package/dist/KeyboardShortcuts.cjs.js.map +1 -1
- package/dist/KeyboardShortcuts.js +2 -0
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/NeetoWidget.cjs.js +5 -20
- package/dist/NeetoWidget.cjs.js.map +1 -1
- package/dist/NeetoWidget.js +5 -21
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Rename.cjs.js +8 -3
- package/dist/Rename.cjs.js.map +1 -1
- package/dist/Rename.js +8 -3
- package/dist/Rename.js.map +1 -1
- package/dist/Schedule.cjs.js +28 -16
- package/dist/Schedule.cjs.js.map +1 -1
- package/dist/Schedule.js +30 -18
- package/dist/Schedule.js.map +1 -1
- package/dist/Scrollable.cjs.js +5 -1
- package/dist/Scrollable.cjs.js.map +1 -1
- package/dist/Scrollable.js +5 -1
- package/dist/Scrollable.js.map +1 -1
- package/dist/ShareViaLink.cjs.js +7 -8
- package/dist/ShareViaLink.cjs.js.map +1 -1
- package/dist/ShareViaLink.js +7 -9
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.cjs.js +231 -138
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +234 -141
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.cjs.js +7 -4
- package/dist/SubHeader.cjs.js.map +1 -1
- package/dist/SubHeader.js +8 -5
- package/dist/SubHeader.js.map +1 -1
- package/dist/ToggleFeatureCard.cjs.js +104 -19
- package/dist/ToggleFeatureCard.cjs.js.map +1 -1
- package/dist/ToggleFeatureCard.js +104 -19
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/package.json +4 -2
- package/src/translations/en.json +17 -4
- package/types/Columns.d.ts +8 -7
- package/types/Header.d.ts +2 -0
- package/types/IntegrationCard.d.ts +14 -5
- package/types/Schedule.d.ts +7 -0
- package/types/Sidebar.d.ts +1 -1
- package/types/SubHeader.d.ts +1 -1
- package/types/ToggleFeatureCard.d.ts +3 -9
package/dist/Sidebar.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, Children, isValidElement, cloneElement, forwardRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Typography, Button, Input, Tooltip, Spinner, Avatar } from '@bigbinary/neetoui';
|
|
2
|
+
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
3
|
+
import { useFetchNeetoApps, useLocalStorage } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
4
|
+
import { Typography, Button, Input, Spinner, Avatar, Tooltip } from '@bigbinary/neetoui';
|
|
5
|
+
import { toLower, all, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
7
6
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import {
|
|
7
|
+
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
8
|
+
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, Down } from '@bigbinary/neeto-icons';
|
|
9
|
+
import { capitalize, truncate, findBy, isNotPresent } from '@bigbinary/neeto-commons-frontend/pure';
|
|
9
10
|
import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
|
|
10
11
|
import { t as t$1 } from 'i18next';
|
|
11
12
|
import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
|
|
12
13
|
import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
|
|
13
|
-
import * as
|
|
14
|
-
import { Neeto } from '@bigbinary/neeto-icons/logos';
|
|
15
|
-
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
14
|
+
import * as ProductTypefaceLogos from '@bigbinary/neeto-icons/typeface-logos';
|
|
15
|
+
import { Neeto } from '@bigbinary/neeto-icons/typeface-logos';
|
|
16
16
|
|
|
17
17
|
function _arrayWithHoles(arr) {
|
|
18
18
|
if (Array.isArray(arr)) return 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:240px;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:40px;position:relative;width:calc(100% - 240px)}.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__header h1{font-size:40px;line-height:var(--neeto-ui-leading-tight);margin-top:-16px}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.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() {
|
|
@@ -31614,7 +31614,7 @@ var Body = function Body(_ref) {
|
|
|
31614
31614
|
className: "neeto-molecules-app-switcher__header",
|
|
31615
31615
|
"data-cy": "app-switcher-body-wrapper"
|
|
31616
31616
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
31617
|
-
style: "
|
|
31617
|
+
style: "h1"
|
|
31618
31618
|
}, t("neetoMolecules.appSwitcher.chooseNeetoProduct")), /*#__PURE__*/React.createElement("div", {
|
|
31619
31619
|
className: "neeto-molecules-app-switcher__search-wrapper"
|
|
31620
31620
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -31717,42 +31717,20 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31717
31717
|
})))));
|
|
31718
31718
|
};
|
|
31719
31719
|
|
|
31720
|
-
var
|
|
31721
|
-
var
|
|
31722
|
-
|
|
31723
|
-
|
|
31724
|
-
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
|
|
31729
|
-
|
|
31730
|
-
}
|
|
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);
|
|
31720
|
+
var Chevron = function Chevron(_ref) {
|
|
31721
|
+
var style = _ref.style;
|
|
31722
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
31723
|
+
height: "16",
|
|
31724
|
+
viewBox: "0 0 16 16",
|
|
31725
|
+
width: "16",
|
|
31726
|
+
style: style
|
|
31727
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
31728
|
+
d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
|
|
31729
|
+
fill: "currentColor"
|
|
31730
|
+
}));
|
|
31753
31731
|
};
|
|
31754
31732
|
|
|
31755
|
-
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-
|
|
31733
|
+
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}.neeto-molecules-sidebar__wrapper:hover .neeto-molecules-sidebar__toggler{opacity:1}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.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\"}.neeto-molecules-sidebar__toggler-hover-area{bottom:0;left:100%;position:absolute;top:0;width:40px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__toggler{opacity:0;position:absolute;right:8px;top:8px;transition:opacity .3s ease-in-out;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__toggler:focus{opacity:1}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:8px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link:not(:first-child){margin-top:10px}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:none}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret{opacity:1}.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-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.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))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}";
|
|
31756
31734
|
n(css,{});
|
|
31757
31735
|
|
|
31758
31736
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -31768,9 +31746,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31768
31746
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31769
31747
|
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31770
31748
|
};
|
|
31771
|
-
return /*#__PURE__*/React.createElement(
|
|
31772
|
-
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31773
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
31749
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
31774
31750
|
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",
|
|
31775
31751
|
"data-cy": "app-switcher-button",
|
|
31776
31752
|
onClick: handleAppSwitcherToggle,
|
|
@@ -31781,7 +31757,12 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31781
31757
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31782
31758
|
}, hasHovered && isFreshLoading ? /*#__PURE__*/React.createElement(Spinner, null) : /*#__PURE__*/React.createElement(AppSwitcher$1, {
|
|
31783
31759
|
size: 24
|
|
31784
|
-
}))
|
|
31760
|
+
})), /*#__PURE__*/React.createElement(Typography, {
|
|
31761
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31762
|
+
component: "span",
|
|
31763
|
+
style: "body2",
|
|
31764
|
+
weight: "normal"
|
|
31765
|
+
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31785
31766
|
};
|
|
31786
31767
|
|
|
31787
31768
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31799,7 +31780,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31799
31780
|
}
|
|
31800
31781
|
},
|
|
31801
31782
|
helpCenterProps: {
|
|
31802
|
-
label: t$1("neetoMolecules.sidebar.helpLinks.
|
|
31783
|
+
label: t$1("neetoMolecules.sidebar.helpLinks.helpArticles"),
|
|
31803
31784
|
icon: Book,
|
|
31804
31785
|
"data-cy": "help-link-help-center-button",
|
|
31805
31786
|
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
@@ -31818,6 +31799,24 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31818
31799
|
}
|
|
31819
31800
|
};
|
|
31820
31801
|
|
|
31802
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
31803
|
+
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
31804
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
31805
|
+
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
31806
|
+
return false;
|
|
31807
|
+
}
|
|
31808
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
31809
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
31810
|
+
return all(function (key) {
|
|
31811
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
31812
|
+
}, targetSearchKeys);
|
|
31813
|
+
};
|
|
31814
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
31815
|
+
var _globalProps$user, _globalProps$user2;
|
|
31816
|
+
var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
|
|
31817
|
+
return "sidebarState-".concat(user);
|
|
31818
|
+
};
|
|
31819
|
+
|
|
31821
31820
|
var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
31822
31821
|
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
|
|
31823
31822
|
return mergeDeepLeft(profileInfoOverrides, {
|
|
@@ -31844,6 +31843,7 @@ var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
|
31844
31843
|
label: t$1("neetoMolecules.sidebar.logout"),
|
|
31845
31844
|
onClick: function onClick() {
|
|
31846
31845
|
resetAuthTokens();
|
|
31846
|
+
localStorage.removeItem(getSidebarStateLocalStorageKey());
|
|
31847
31847
|
window.location.href = "/logout";
|
|
31848
31848
|
},
|
|
31849
31849
|
"data-cy": "profile-logout-button"
|
|
@@ -31860,21 +31860,24 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
31860
31860
|
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
31861
31861
|
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31862
31862
|
return /*#__PURE__*/React.createElement("button", {
|
|
31863
|
-
className: "neeto-molecules-
|
|
31863
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none",
|
|
31864
31864
|
"data-cy": "profile-section",
|
|
31865
31865
|
ref: ref,
|
|
31866
31866
|
onMouseEnter: function onMouseEnter() {
|
|
31867
31867
|
return setHasHovered(true);
|
|
31868
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"
|
|
31871
31869
|
}, isFreshLoading && hasHovered ? /*#__PURE__*/React.createElement("span", {
|
|
31872
31870
|
className: "flex h-11 w-10 items-center justify-center"
|
|
31873
|
-
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(Avatar, {
|
|
31874
|
-
className: "neeto-ui-flex-shrink-0",
|
|
31875
|
-
size: "
|
|
31871
|
+
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
31872
|
+
className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
|
|
31873
|
+
size: "small",
|
|
31876
31874
|
user: profileInfo
|
|
31877
|
-
})
|
|
31875
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
31876
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31877
|
+
component: "span",
|
|
31878
|
+
style: "body2",
|
|
31879
|
+
weight: "normal"
|
|
31880
|
+
}, truncate(profileInfo.name, 18))));
|
|
31878
31881
|
};
|
|
31879
31882
|
var ProfileSection$1 = /*#__PURE__*/forwardRef(ProfileSection);
|
|
31880
31883
|
|
|
@@ -31894,7 +31897,50 @@ function _toConsumableArray(arr) {
|
|
|
31894
31897
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
31895
31898
|
}
|
|
31896
31899
|
|
|
31900
|
+
function _typeof(obj) {
|
|
31901
|
+
"@babel/helpers - typeof";
|
|
31902
|
+
|
|
31903
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
31904
|
+
return typeof obj;
|
|
31905
|
+
} : function (obj) {
|
|
31906
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
31907
|
+
}, _typeof(obj);
|
|
31908
|
+
}
|
|
31909
|
+
|
|
31910
|
+
function _toPrimitive(input, hint) {
|
|
31911
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
31912
|
+
var prim = input[Symbol.toPrimitive];
|
|
31913
|
+
if (prim !== undefined) {
|
|
31914
|
+
var res = prim.call(input, hint || "default");
|
|
31915
|
+
if (_typeof(res) !== "object") return res;
|
|
31916
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31917
|
+
}
|
|
31918
|
+
return (hint === "string" ? String : Number)(input);
|
|
31919
|
+
}
|
|
31920
|
+
|
|
31921
|
+
function _toPropertyKey(arg) {
|
|
31922
|
+
var key = _toPrimitive(arg, "string");
|
|
31923
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
31924
|
+
}
|
|
31925
|
+
|
|
31926
|
+
function _defineProperty(obj, key, value) {
|
|
31927
|
+
key = _toPropertyKey(key);
|
|
31928
|
+
if (key in obj) {
|
|
31929
|
+
Object.defineProperty(obj, key, {
|
|
31930
|
+
value: value,
|
|
31931
|
+
enumerable: true,
|
|
31932
|
+
configurable: true,
|
|
31933
|
+
writable: true
|
|
31934
|
+
});
|
|
31935
|
+
} else {
|
|
31936
|
+
obj[key] = value;
|
|
31937
|
+
}
|
|
31938
|
+
return obj;
|
|
31939
|
+
}
|
|
31940
|
+
|
|
31897
31941
|
var _excluded$2 = ["onClick", "label", "icon"];
|
|
31942
|
+
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; }
|
|
31943
|
+
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; }
|
|
31898
31944
|
var LinkSection = function LinkSection(_ref) {
|
|
31899
31945
|
var links = _ref.links;
|
|
31900
31946
|
return /*#__PURE__*/React.createElement("ul", {
|
|
@@ -31905,22 +31951,20 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31905
31951
|
_ref2$icon = _ref2.icon,
|
|
31906
31952
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31907
31953
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
31908
|
-
var IconSVG = icon;
|
|
31909
31954
|
return /*#__PURE__*/React.createElement("li", {
|
|
31910
31955
|
className: "neeto-molecules-profile-sublist__item",
|
|
31911
31956
|
key: idx
|
|
31912
|
-
}, /*#__PURE__*/React.createElement(
|
|
31957
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
31958
|
+
fullWidth: true,
|
|
31959
|
+
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31960
|
+
iconPosition: "left",
|
|
31961
|
+
iconSize: 18,
|
|
31962
|
+
style: "text"
|
|
31963
|
+
}, _objectSpread$2({
|
|
31964
|
+
icon: icon,
|
|
31965
|
+
label: label,
|
|
31913
31966
|
onClick: onClick
|
|
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)));
|
|
31967
|
+
}, otherProps))));
|
|
31924
31968
|
}));
|
|
31925
31969
|
};
|
|
31926
31970
|
|
|
@@ -31989,63 +32033,27 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
31989
32033
|
};
|
|
31990
32034
|
|
|
31991
32035
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
31992
|
-
|
|
32036
|
+
_ref.changesCount;
|
|
32037
|
+
var _useTranslation = useTranslation(),
|
|
32038
|
+
t = _useTranslation.t;
|
|
32039
|
+
var showChangesCount = false;
|
|
31993
32040
|
return /*#__PURE__*/React.createElement("button", {
|
|
31994
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
32041
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none",
|
|
31995
32042
|
"data-cy": "help-button",
|
|
31996
32043
|
ref: ref
|
|
31997
32044
|
}, /*#__PURE__*/React.createElement("span", {
|
|
31998
32045
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31999
32046
|
}, /*#__PURE__*/React.createElement(Help, {
|
|
32000
32047
|
size: 24
|
|
32001
|
-
}),
|
|
32002
|
-
className: "neeto-molecules-
|
|
32003
|
-
|
|
32004
|
-
|
|
32048
|
+
}), showChangesCount ), /*#__PURE__*/React.createElement(Typography, {
|
|
32049
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32050
|
+
component: "span",
|
|
32051
|
+
style: "body2",
|
|
32052
|
+
weight: "normal"
|
|
32053
|
+
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
32005
32054
|
};
|
|
32006
32055
|
var HelpSection$1 = /*#__PURE__*/forwardRef(HelpSection);
|
|
32007
32056
|
|
|
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
|
-
|
|
32049
32057
|
var _excluded$1 = ["label"];
|
|
32050
32058
|
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; }
|
|
32051
32059
|
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; }
|
|
@@ -32055,6 +32063,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32055
32063
|
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
32056
32064
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32057
32065
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32066
|
+
var showChangesCount = false;
|
|
32058
32067
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32059
32068
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32060
32069
|
onClick: function onClick() {
|
|
@@ -32067,21 +32076,21 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32067
32076
|
var hide = _ref2.hide;
|
|
32068
32077
|
return !hide;
|
|
32069
32078
|
});
|
|
32070
|
-
return /*#__PURE__*/React.createElement("ul",
|
|
32079
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
32080
|
+
className: "neeto-molecules-help-sublist"
|
|
32081
|
+
}, helpLinks.map(function (_ref3, idx) {
|
|
32071
32082
|
var label = _ref3.label,
|
|
32072
32083
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32073
32084
|
return /*#__PURE__*/React.createElement("li", {
|
|
32074
32085
|
className: "neeto-molecules-help-sublist__item",
|
|
32075
32086
|
key: idx
|
|
32076
32087
|
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
32088
|
+
fullWidth: true,
|
|
32077
32089
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
32078
32090
|
iconPosition: "left",
|
|
32079
32091
|
iconSize: 18,
|
|
32080
32092
|
style: "text"
|
|
32081
|
-
}, buttonProps), label,
|
|
32082
|
-
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
32083
|
-
"data-testid": "help-section-menu-changes-count"
|
|
32084
|
-
}, buttonProps.changesCount)));
|
|
32093
|
+
}, buttonProps), label, showChangesCount ));
|
|
32085
32094
|
}));
|
|
32086
32095
|
};
|
|
32087
32096
|
|
|
@@ -32110,7 +32119,7 @@ var Footer = function Footer(_ref) {
|
|
|
32110
32119
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32111
32120
|
}, []);
|
|
32112
32121
|
return /*#__PURE__*/React.createElement("div", {
|
|
32113
|
-
className: "neeto-molecules-sidebar__footer"
|
|
32122
|
+
className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
|
|
32114
32123
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
32115
32124
|
interactive: true,
|
|
32116
32125
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32119,6 +32128,8 @@ var Footer = function Footer(_ref) {
|
|
|
32119
32128
|
helpLinkOverrides: helpLinkOverrides
|
|
32120
32129
|
}),
|
|
32121
32130
|
hideOnClick: false,
|
|
32131
|
+
interactiveDebounce: 30,
|
|
32132
|
+
offset: 0,
|
|
32122
32133
|
position: "right",
|
|
32123
32134
|
theme: "light"
|
|
32124
32135
|
}, /*#__PURE__*/React.createElement(HelpSection$1, {
|
|
@@ -32132,10 +32143,10 @@ var Footer = function Footer(_ref) {
|
|
|
32132
32143
|
};
|
|
32133
32144
|
|
|
32134
32145
|
var Header = function Header() {
|
|
32135
|
-
var
|
|
32146
|
+
var _ProductTypefaceLogos;
|
|
32136
32147
|
var productName = globalProps.appName.substr(5);
|
|
32137
32148
|
var logoName = "Neeto".concat(capitalize(productName.toLowerCase()));
|
|
32138
|
-
var
|
|
32149
|
+
var ProductTypefaceLogo = (_ProductTypefaceLogos = ProductTypefaceLogos[logoName]) !== null && _ProductTypefaceLogos !== void 0 ? _ProductTypefaceLogos : Neeto;
|
|
32139
32150
|
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
32140
32151
|
data = _useFetchNeetoApps.data;
|
|
32141
32152
|
var homePath = "/";
|
|
@@ -32148,22 +32159,26 @@ var Header = function Header() {
|
|
|
32148
32159
|
}
|
|
32149
32160
|
}
|
|
32150
32161
|
return /*#__PURE__*/React.createElement("div", {
|
|
32151
|
-
className: "neeto-
|
|
32162
|
+
className: "neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable",
|
|
32152
32163
|
"data-cy": "sidebar-info"
|
|
32153
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32154
|
-
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32155
32164
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
32165
|
+
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32156
32166
|
to: homePath
|
|
32157
|
-
}, /*#__PURE__*/React.createElement(
|
|
32167
|
+
}, /*#__PURE__*/React.createElement(ProductTypefaceLogo, null)));
|
|
32158
32168
|
};
|
|
32159
32169
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
32160
32170
|
|
|
32161
|
-
var _excluded = ["label", "to", "icon", "
|
|
32171
|
+
var _excluded = ["label", "to", "icon", "items"],
|
|
32172
|
+
_excluded2 = ["label", "to", "count"];
|
|
32162
32173
|
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; }
|
|
32163
32174
|
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; }
|
|
32164
32175
|
var Links = function Links(_ref) {
|
|
32165
32176
|
var navLinks = _ref.navLinks;
|
|
32166
32177
|
var location = useLocation();
|
|
32178
|
+
var _useState = useState(true),
|
|
32179
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32180
|
+
isActiveLinkExpanded = _useState2[0],
|
|
32181
|
+
setIsActiveLinkExpanded = _useState2[1];
|
|
32167
32182
|
var filterByPermissions = curry(function (_ref2) {
|
|
32168
32183
|
var permissions = _ref2.permissions;
|
|
32169
32184
|
if (permissions) {
|
|
@@ -32171,33 +32186,79 @@ var Links = function Links(_ref) {
|
|
|
32171
32186
|
}
|
|
32172
32187
|
return true;
|
|
32173
32188
|
});
|
|
32189
|
+
var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
|
|
32190
|
+
if (isNotPresent(items)) return;
|
|
32191
|
+
if (isActive()) {
|
|
32192
|
+
setIsActiveLinkExpanded(not);
|
|
32193
|
+
event.preventDefault();
|
|
32194
|
+
return;
|
|
32195
|
+
}
|
|
32196
|
+
setIsActiveLinkExpanded(true);
|
|
32197
|
+
};
|
|
32174
32198
|
return /*#__PURE__*/React.createElement("div", {
|
|
32175
|
-
className: "neeto-molecules-sidebar__links"
|
|
32199
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
|
|
32176
32200
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32177
32201
|
var label = _ref3.label,
|
|
32178
32202
|
to = _ref3.to,
|
|
32179
32203
|
icon = _ref3.icon,
|
|
32180
|
-
|
|
32204
|
+
items = _ref3.items,
|
|
32181
32205
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32182
32206
|
var IconSVG = icon;
|
|
32183
32207
|
var url = new URL(to, window.location.href);
|
|
32184
32208
|
var isActive = function isActive() {
|
|
32185
|
-
return location.pathname.startsWith(url.pathname);
|
|
32209
|
+
return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
32186
32210
|
};
|
|
32187
|
-
|
|
32188
|
-
|
|
32189
|
-
label: label,
|
|
32211
|
+
var isMenuExpanded = isActive() && isActiveLinkExpanded;
|
|
32212
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
32190
32213
|
key: mainIndex
|
|
32191
32214
|
}, /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32192
32215
|
activeClassName: "active",
|
|
32193
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32216
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
32217
|
+
onClick: function onClick(event) {
|
|
32218
|
+
return handleNavLinkClick(event, isActive, items);
|
|
32219
|
+
}
|
|
32194
32220
|
}, _objectSpread({
|
|
32195
32221
|
isActive: isActive,
|
|
32196
32222
|
to: to
|
|
32197
|
-
}, otherProps)), icon && /*#__PURE__*/React.createElement("
|
|
32198
|
-
className: "neeto-
|
|
32223
|
+
}, otherProps)), icon && /*#__PURE__*/React.createElement("span", {
|
|
32224
|
+
className: "neeto-molecules-sidebar__link-icon",
|
|
32199
32225
|
"data-testid": label
|
|
32200
|
-
}, /*#__PURE__*/React.createElement(IconSVG, null))
|
|
32226
|
+
}, /*#__PURE__*/React.createElement(IconSVG, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
32227
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32228
|
+
component: "span",
|
|
32229
|
+
style: "body2",
|
|
32230
|
+
weight: "normal"
|
|
32231
|
+
}, label), items && /*#__PURE__*/React.createElement("span", {
|
|
32232
|
+
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
32233
|
+
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
32234
|
+
})
|
|
32235
|
+
}, /*#__PURE__*/React.createElement(Down, {
|
|
32236
|
+
size: 16
|
|
32237
|
+
}))), items && isMenuExpanded && /*#__PURE__*/React.createElement("div", {
|
|
32238
|
+
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32239
|
+
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
32240
|
+
var subLabel = _ref4.label,
|
|
32241
|
+
subRoute = _ref4.to,
|
|
32242
|
+
count = _ref4.count,
|
|
32243
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32244
|
+
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
32245
|
+
activeClassName: "active",
|
|
32246
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32247
|
+
isActive: function isActive() {
|
|
32248
|
+
return isSubRouteActive(subRoute, location);
|
|
32249
|
+
},
|
|
32250
|
+
key: subIndex,
|
|
32251
|
+
to: subRoute
|
|
32252
|
+
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
32253
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32254
|
+
component: "span",
|
|
32255
|
+
style: "body2"
|
|
32256
|
+
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
32257
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32258
|
+
component: "span",
|
|
32259
|
+
style: "body2"
|
|
32260
|
+
}, count > 999 ? "999+" : count));
|
|
32261
|
+
})));
|
|
32201
32262
|
}));
|
|
32202
32263
|
};
|
|
32203
32264
|
|
|
@@ -32215,15 +32276,27 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32215
32276
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32216
32277
|
isAppSwitcherOpen = _useState2[0],
|
|
32217
32278
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32279
|
+
var _useLocalStorage = useLocalStorage(getSidebarStateLocalStorageKey(), false),
|
|
32280
|
+
_useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
|
|
32281
|
+
isSidebarCollapsed = _useLocalStorage2[0],
|
|
32282
|
+
setIsSidebarCollapsed = _useLocalStorage2[1];
|
|
32218
32283
|
var location = useLocation();
|
|
32284
|
+
var _useTranslation = useTranslation(),
|
|
32285
|
+
t = _useTranslation.t;
|
|
32219
32286
|
useEffect(function () {
|
|
32220
32287
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32221
32288
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32222
32289
|
}, [location]);
|
|
32290
|
+
var productName = globalProps$1.appName.substr(5).toLowerCase();
|
|
32223
32291
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32292
|
+
"data-testid": "sidebar-container",
|
|
32293
|
+
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32294
|
+
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32295
|
+
})
|
|
32296
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32297
|
+
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",
|
|
32224
32298
|
"data-cy": "sidebar-wrapper",
|
|
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")
|
|
32299
|
+
"data-testid": "sidebar"
|
|
32227
32300
|
}, /*#__PURE__*/React.createElement(Header$1, null), /*#__PURE__*/React.createElement(Links, {
|
|
32228
32301
|
navLinks: navLinks
|
|
32229
32302
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
@@ -32234,6 +32307,26 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32234
32307
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32235
32308
|
return setIsAppSwitcherOpen(not);
|
|
32236
32309
|
}
|
|
32310
|
+
})), isSidebarCollapsed && /*#__PURE__*/React.createElement("div", {
|
|
32311
|
+
className: "neeto-molecules-sidebar__toggler-hover-area"
|
|
32312
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
32313
|
+
className: "neeto-molecules-sidebar__toggler",
|
|
32314
|
+
"data-testid": "sidebar-toggleButton",
|
|
32315
|
+
style: "text",
|
|
32316
|
+
icon: function icon() {
|
|
32317
|
+
return /*#__PURE__*/React.createElement(Chevron, {
|
|
32318
|
+
style: {
|
|
32319
|
+
color: "rgb(var(--neeto-".concat(productName, "-primary))")
|
|
32320
|
+
}
|
|
32321
|
+
});
|
|
32322
|
+
},
|
|
32323
|
+
tooltipProps: {
|
|
32324
|
+
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32325
|
+
position: "bottom"
|
|
32326
|
+
},
|
|
32327
|
+
onClick: function onClick() {
|
|
32328
|
+
setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32329
|
+
}
|
|
32237
32330
|
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32238
32331
|
isOpen: isAppSwitcherOpen,
|
|
32239
32332
|
onClose: function onClose() {
|