@bigbinary/neeto-molecules 1.2.3 → 1.2.5-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/Sidebar.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import React, { useState, forwardRef, useEffect } from 'react';
2
2
  import classnames from 'classnames';
3
+ import { capitalize, truncate, isPresent, findBy, notEquals, isNotPresent } from '@bigbinary/neeto-cist';
3
4
  import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
4
5
  import { useFetchNeetoApps, useLocalStorage } from '@bigbinary/neeto-commons-frontend/react-utils';
5
6
  import { Typography, Input, Tooltip, Spinner, Avatar, Button } from '@bigbinary/neetoui';
7
+ import { toLower, curry, is, includes, __, all, equals, mergeDeepLeft, omit, inc, not } from 'ramda';
6
8
  import { useTranslation } from 'react-i18next';
7
- import { Link, useLocation, NavLink } from 'react-router-dom';
8
- import { NeetoIcon, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, Down } from '@bigbinary/neeto-icons';
9
- import { capitalize, truncate, isPresent, findBy, isNotPresent } from '@bigbinary/neeto-cist';
10
- import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
9
+ import { Link, NavLink, useLocation } from 'react-router-dom';
11
10
  import { t as t$1 } from 'i18next';
11
+ import { ChatEmpty, Book, Gift, Keyboard, NeetoIcon, Search, AppSwitcher as AppSwitcher$1, User, Settings, LeftArrow, Help, Down, Left } from '@bigbinary/neeto-icons';
12
+ import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
12
13
  import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
13
- import { toLower, all, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
14
14
  import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
15
15
  import * as ProductTypefaceLogos from '@bigbinary/neeto-icons/typeface-logos';
16
16
  import { Neeto } from '@bigbinary/neeto-icons/typeface-logos';
@@ -83,9 +83,45 @@ var Chevron = function Chevron(_ref) {
83
83
  }));
84
84
  };
85
85
 
86
+ var MY_PROFILE_URL = "/auth/profile/edit";
87
+ var MY_ORGANIZATION_URL = "/auth/organization/edit";
88
+ var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
89
+ var DEFAULT_HELP_LINK_PROPS = {
90
+ liveChatProps: {
91
+ label: t$1("neetoMolecules.sidebar.helpLinks.liveChat"),
92
+ icon: ChatEmpty,
93
+ "data-cy": "help-link-live-chat-button",
94
+ onClick: function onClick() {
95
+ var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
96
+ (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
97
+ (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
98
+ }
99
+ },
100
+ helpCenterProps: {
101
+ label: t$1("neetoMolecules.sidebar.helpLinks.helpArticles"),
102
+ icon: Book,
103
+ "data-cy": "help-link-help-center-button",
104
+ href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
105
+ target: "_blank"
106
+ },
107
+ changelogProps: {
108
+ id: CHANGELOG_WIDGET_TRIGGER_ID,
109
+ label: t$1("neetoMolecules.sidebar.helpLinks.whatsNew"),
110
+ icon: Gift,
111
+ "data-cy": "help-link-changelog-button"
112
+ },
113
+ keyboardShortcutProps: {
114
+ label: t$1("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
115
+ icon: Keyboard,
116
+ "data-cy": "help-link-keyboard-shortcut-button"
117
+ }
118
+ };
119
+ var NAVLINK_KEYS_TO_OMIT = ["Component", "component"];
120
+ var SETTINGS = "Settings";
121
+
86
122
  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}}
87
123
 
88
- var css$1 = ".neeto-molecules-app-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:40px;position:relative;transition:all .3s;width:100%}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__wrapper{padding:32px}}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-app-switcher__header{align-items:flex-start;flex-direction:column-reverse;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__header h1{font-size:28px}}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-app-switcher__search-wrapper{flex-grow:0;width:296px}}.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}";
124
+ var css$1 = ".neeto-molecules-app-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:40px;position:relative;transition:all .3s;width:100%}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__wrapper{padding:32px}}@media screen and (max-width:768px){.neeto-molecules-app-switcher__wrapper{padding:16px}}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(100%,1fr))}}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-app-switcher__header{align-items:flex-start;flex-direction:column-reverse;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__header h1{font-size:24px}}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-app-switcher__search-wrapper{flex-grow:0;width:296px}}.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}";
89
125
  n(css$1,{});
90
126
 
91
127
  function _extends() {
@@ -197,7 +233,7 @@ var AppSwitcher = function AppSwitcher() {
197
233
  }, /*#__PURE__*/React.createElement(Body, null));
198
234
  };
199
235
 
200
- 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{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{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.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:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.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:opacity .3s ease-in-out}.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,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .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-app-switcher-popup-wrapper,.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:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-app-switcher-popup-wrapper .tippy-content,.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-app-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.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;min-height:40px;text-align:left}.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}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.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;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:16px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:16px}.neeto-molecules-app-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}";
236
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--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}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.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)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;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)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-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{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.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:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.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:opacity .3s ease-in-out}.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,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .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-app-switcher-popup-wrapper,.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:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-app-switcher-popup-wrapper .tippy-content,.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-app-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.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;min-height:40px;text-align:left}.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}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.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;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:16px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:16px}.neeto-molecules-app-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-app-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{margin-bottom:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
201
237
  n(css,{});
202
238
 
203
239
  var AppSwitcherButton = function AppSwitcherButton() {
@@ -213,13 +249,17 @@ var AppSwitcherButton = function AppSwitcherButton() {
213
249
  isStale = _useFetchNeetoApps.isStale;
214
250
  return /*#__PURE__*/React.createElement(Tooltip, {
215
251
  interactive: true,
252
+ appendTo: function appendTo() {
253
+ return document.body;
254
+ },
216
255
  className: "neeto-molecules-app-switcher-popup-wrapper",
217
256
  content: /*#__PURE__*/React.createElement(AppSwitcher, null),
257
+ delay: [300, null],
218
258
  disabled: !data,
219
259
  hideOnClick: false,
220
- interactiveDebounce: 20,
221
260
  offset: [0, -70],
222
261
  position: "right",
262
+ strategy: "fixed",
223
263
  theme: "light"
224
264
  }, /*#__PURE__*/React.createElement("button", {
225
265
  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",
@@ -244,41 +284,10 @@ var AppSwitcherButton = function AppSwitcherButton() {
244
284
  }, t("neetoMolecules.sidebar.productSwitcher"))));
245
285
  };
246
286
 
247
- var MY_PROFILE_URL = "/auth/profile/edit";
248
- var MY_ORGANIZATION_URL = "/auth/organization/edit";
249
- var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
250
- var DEFAULT_HELP_LINK_PROPS = {
251
- liveChatProps: {
252
- label: t$1("neetoMolecules.sidebar.helpLinks.liveChat"),
253
- icon: ChatEmpty,
254
- "data-cy": "help-link-live-chat-button",
255
- onClick: function onClick() {
256
- var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
257
- (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
258
- (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
259
- }
260
- },
261
- helpCenterProps: {
262
- label: t$1("neetoMolecules.sidebar.helpLinks.helpArticles"),
263
- icon: Book,
264
- "data-cy": "help-link-help-center-button",
265
- href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
266
- target: "_blank"
267
- },
268
- changelogProps: {
269
- id: CHANGELOG_WIDGET_TRIGGER_ID,
270
- label: t$1("neetoMolecules.sidebar.helpLinks.whatsNew"),
271
- icon: Gift,
272
- "data-cy": "help-link-changelog-button"
273
- },
274
- keyboardShortcutProps: {
275
- label: t$1("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
276
- icon: Keyboard,
277
- "data-cy": "help-link-keyboard-shortcut-button"
278
- }
279
- };
280
-
281
- var isSubRouteActive = function isSubRouteActive(subRoute, location) {
287
+ var isSubRouteActive = function isSubRouteActive(_ref) {
288
+ var subRoute = _ref.subRoute,
289
+ location = _ref.location,
290
+ isSettingsItems = _ref.isSettingsItems;
282
291
  var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
283
292
  var targetUrl = new URL(subRoute, window.location.origin);
284
293
  if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
@@ -286,15 +295,28 @@ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
286
295
  }
287
296
  var targetSearchParams = targetUrl.searchParams;
288
297
  var targetSearchKeys = Array.from(targetSearchParams.keys());
289
- return all(function (key) {
298
+ var targetUrlWithSearch = targetUrl.pathname + targetUrl.search;
299
+ var currentUrlWithSearch = currentBrowserUrl.pathname + currentBrowserUrl.search;
300
+ var isLinkActive = all(function (key) {
290
301
  return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
291
302
  }, targetSearchKeys);
303
+ if (isSettingsItems) {
304
+ return isLinkActive && equals(currentUrlWithSearch, targetUrlWithSearch);
305
+ }
306
+ return isLinkActive;
292
307
  };
293
308
  var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
294
309
  var _globalProps$user, _globalProps$user2;
295
310
  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);
296
311
  return "sidebarState-".concat(user);
297
312
  };
313
+ var filterByPermissions = curry(function (_ref2) {
314
+ var permissions = _ref2.permissions;
315
+ if (permissions) {
316
+ return is(Array, permissions) ? permissions.some(includes(__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
317
+ }
318
+ return true;
319
+ });
298
320
 
299
321
  var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
300
322
  var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
@@ -453,9 +475,9 @@ function _objectWithoutProperties(source, excluded) {
453
475
  return target;
454
476
  }
455
477
 
456
- var _excluded$2 = ["onClick", "label", "icon"];
457
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
458
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
478
+ var _excluded$4 = ["onClick", "label", "icon"];
479
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
480
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
459
481
  var LinkSection = function LinkSection(_ref) {
460
482
  var links = _ref.links;
461
483
  return /*#__PURE__*/React.createElement("ul", {
@@ -465,7 +487,7 @@ var LinkSection = function LinkSection(_ref) {
465
487
  label = _ref2.label,
466
488
  _ref2$icon = _ref2.icon,
467
489
  icon = _ref2$icon === void 0 ? null : _ref2$icon,
468
- otherProps = _objectWithoutProperties(_ref2, _excluded$2);
490
+ otherProps = _objectWithoutProperties(_ref2, _excluded$4);
469
491
  return /*#__PURE__*/React.createElement("li", {
470
492
  className: "neeto-molecules-profile-sublist__item",
471
493
  key: idx
@@ -475,7 +497,7 @@ var LinkSection = function LinkSection(_ref) {
475
497
  iconPosition: "left",
476
498
  iconSize: 18,
477
499
  style: "text"
478
- }, _objectSpread$2({
500
+ }, _objectSpread$3({
479
501
  icon: icon,
480
502
  label: label,
481
503
  onClick: onClick
@@ -532,6 +554,9 @@ var ProfileButton = function ProfileButton(_ref) {
532
554
  var profileInfo = getProfileInfo(data === null || data === void 0 ? void 0 : data.isOwner, profileInfoOverrides);
533
555
  return /*#__PURE__*/React.createElement(Tooltip, {
534
556
  interactive: true,
557
+ appendTo: function appendTo() {
558
+ return document.body;
559
+ },
535
560
  className: "neeto-molecules-profile-popup-wrapper",
536
561
  content: /*#__PURE__*/React.createElement(ProfileMenu, {
537
562
  extraTopLinks: extraTopLinks,
@@ -542,6 +567,7 @@ var ProfileButton = function ProfileButton(_ref) {
542
567
  interactiveDebounce: 20,
543
568
  offset: [0, -70],
544
569
  position: "right",
570
+ strategy: "fixed",
545
571
  theme: "light"
546
572
  }, /*#__PURE__*/React.createElement(ProfileSection$1, {
547
573
  profileInfo: profileInfo
@@ -574,9 +600,9 @@ var HelpSection = function HelpSection(_ref, ref) {
574
600
  };
575
601
  var HelpSection$1 = /*#__PURE__*/forwardRef(HelpSection);
576
602
 
577
- var _excluded$1 = ["label"];
578
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
579
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
603
+ var _excluded$3 = ["label"];
604
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
605
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
580
606
  var HelpSectionMenu = function HelpSectionMenu(_ref) {
581
607
  var helpLinkOverrides = _ref.helpLinkOverrides,
582
608
  changesCount = _ref.changesCount;
@@ -584,7 +610,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
584
610
  _KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
585
611
  setIsOpen = _KeyboardShortcuts$us2[1];
586
612
  var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
587
- return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
613
+ return _objectSpread$2(_objectSpread$2(_objectSpread$2(_objectSpread$2({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
588
614
  onClick: function onClick() {
589
615
  return setIsOpen(true);
590
616
  }
@@ -599,7 +625,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
599
625
  className: "neeto-molecules-help-sublist"
600
626
  }, helpLinks.map(function (_ref3, idx) {
601
627
  var label = _ref3.label,
602
- buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
628
+ buttonProps = _objectWithoutProperties(_ref3, _excluded$3);
603
629
  return /*#__PURE__*/React.createElement("li", {
604
630
  className: "neeto-molecules-help-sublist__item",
605
631
  key: idx
@@ -642,6 +668,9 @@ var Footer = function Footer(_ref) {
642
668
  className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
643
669
  }, /*#__PURE__*/React.createElement(Tooltip, {
644
670
  interactive: true,
671
+ appendTo: function appendTo() {
672
+ return document.body;
673
+ },
645
674
  className: "neeto-molecules-help-popup-wrapper",
646
675
  content: /*#__PURE__*/React.createElement(HelpSectionMenu, {
647
676
  changesCount: changesCount,
@@ -688,26 +717,74 @@ var Header = function Header(_ref) {
688
717
  };
689
718
  var Header$1 = /*#__PURE__*/React.memo(Header);
690
719
 
691
- var _excluded = ["label", "to", "icon", "items"],
692
- _excluded2 = ["label", "to", "count", "data-cy"];
693
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
694
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
720
+ var _excluded$2 = ["label", "to", "count", "dataCy", "items"];
721
+ var Items = function Items(_ref) {
722
+ var items = _ref.items,
723
+ _ref$level = _ref.level,
724
+ level = _ref$level === void 0 ? 0 : _ref$level,
725
+ _ref$isSettingsItems = _ref.isSettingsItems,
726
+ isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems;
727
+ return /*#__PURE__*/React.createElement("div", {
728
+ className: "neeto-molecules-sidebar__sublink-wrapper ml-".concat(level * 2),
729
+ "data-cy": "sidebar-sub-link-wrapper"
730
+ }, items.filter(filterByPermissions).map(function (_ref2, index) {
731
+ var label = _ref2.label,
732
+ to = _ref2.to,
733
+ count = _ref2.count,
734
+ dataCy = _ref2.dataCy,
735
+ subItems = _ref2.items,
736
+ otherProps = _objectWithoutProperties(_ref2, _excluded$2);
737
+ return /*#__PURE__*/React.createElement(React.Fragment, {
738
+ key: index
739
+ }, /*#__PURE__*/React.createElement(NavLink, _extends({
740
+ to: to,
741
+ activeClassName: "active",
742
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-select-none neeto-molecules-sidebar__sublink",
743
+ "data-cy": "".concat(dataCy, "-sub-link"),
744
+ key: index,
745
+ isActive: function isActive() {
746
+ return isSubRouteActive({
747
+ subRoute: to,
748
+ location: location,
749
+ isSettingsItems: isSettingsItems
750
+ });
751
+ }
752
+ }, omit(NAVLINK_KEYS_TO_OMIT, otherProps)), /*#__PURE__*/React.createElement(Typography, {
753
+ className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
754
+ component: "span",
755
+ "data-cy": "".concat(dataCy, "-sub-link-label"),
756
+ style: "body2"
757
+ }, label), /*#__PURE__*/React.createElement(Typography, {
758
+ className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
759
+ component: "span",
760
+ "data-cy": "".concat(dataCy, "-sub-link-count"),
761
+ style: "body2"
762
+ }, count > 999 ? "999+" : count)), isPresent(subItems) && /*#__PURE__*/React.createElement(Items, {
763
+ isSettingsItems: isSettingsItems,
764
+ items: subItems,
765
+ level: inc(level)
766
+ }));
767
+ }));
768
+ };
769
+
770
+ var _excluded$1 = ["label", "to", "icon", "items"];
771
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
772
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
695
773
  var Links = function Links(_ref) {
696
- var navLinks = _ref.navLinks;
697
- var location = useLocation();
774
+ var navLinks = _ref.navLinks,
775
+ setSelectedNavLink = _ref.setSelectedNavLink;
698
776
  var _useState = useState(true),
699
777
  _useState2 = _slicedToArray(_useState, 2),
700
778
  isActiveLinkExpanded = _useState2[0],
701
779
  setIsActiveLinkExpanded = _useState2[1];
702
- var filterByPermissions = curry(function (_ref2) {
703
- var permissions = _ref2.permissions;
704
- if (permissions) {
705
- return is(Array, permissions) ? permissions.some(includes(__, globalProps$1.permissions)) : globalProps$1.permissions.includes(permissions);
706
- }
707
- return true;
708
- });
709
- var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
780
+ var location = useLocation();
781
+ var handleNavLinkClick = function handleNavLinkClick(_ref2) {
782
+ var event = _ref2.event,
783
+ isActive = _ref2.isActive,
784
+ items = _ref2.items,
785
+ navLink = _ref2.navLink;
710
786
  if (isNotPresent(items)) return;
787
+ equals(navLink.label, SETTINGS) && setSelectedNavLink(navLink);
711
788
  if (isActive()) {
712
789
  setIsActiveLinkExpanded(not);
713
790
  event.preventDefault();
@@ -717,12 +794,12 @@ var Links = function Links(_ref) {
717
794
  };
718
795
  return /*#__PURE__*/React.createElement("div", {
719
796
  className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
720
- }, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
721
- var label = _ref3.label,
722
- to = _ref3.to,
723
- icon = _ref3.icon,
724
- items = _ref3.items,
725
- otherProps = _objectWithoutProperties(_ref3, _excluded);
797
+ }, navLinks.filter(filterByPermissions).map(function (navLink, index) {
798
+ var label = navLink.label,
799
+ to = navLink.to,
800
+ icon = navLink.icon,
801
+ items = navLink.items,
802
+ otherProps = _objectWithoutProperties(navLink, _excluded$1);
726
803
  var IconSVG = icon;
727
804
  var url = new URL(to, window.location.href);
728
805
  var isActive = function isActive() {
@@ -730,14 +807,19 @@ var Links = function Links(_ref) {
730
807
  };
731
808
  var isMenuExpanded = isActive() && isActiveLinkExpanded;
732
809
  return /*#__PURE__*/React.createElement(React.Fragment, {
733
- key: mainIndex
810
+ key: index
734
811
  }, /*#__PURE__*/React.createElement(NavLink, _extends({
735
812
  activeClassName: "active",
736
813
  className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
737
814
  onClick: function onClick(event) {
738
- return handleNavLinkClick(event, isActive, items);
815
+ return handleNavLinkClick({
816
+ event: event,
817
+ isActive: isActive,
818
+ items: items,
819
+ navLink: navLink
820
+ });
739
821
  }
740
- }, _objectSpread({
822
+ }, _objectSpread$1({
741
823
  isActive: isActive,
742
824
  to: to
743
825
  }, otherProps)), icon && /*#__PURE__*/React.createElement("span", {
@@ -748,42 +830,62 @@ var Links = function Links(_ref) {
748
830
  component: "span",
749
831
  style: "body2",
750
832
  weight: "normal"
751
- }, label), items && /*#__PURE__*/React.createElement("span", {
833
+ }, label), items && notEquals(label, SETTINGS) && /*#__PURE__*/React.createElement("span", {
752
834
  className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
753
835
  "neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
754
836
  })
755
837
  }, /*#__PURE__*/React.createElement(Down, {
756
838
  size: 16
757
- }))), items && isMenuExpanded && /*#__PURE__*/React.createElement("div", {
758
- className: "neeto-molecules-sidebar__sublink-wrapper",
759
- "data-cy": "sidebar-sub-link-wrapper"
760
- }, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
761
- var subLabel = _ref4.label,
762
- subRoute = _ref4.to,
763
- count = _ref4.count,
764
- dataCy = _ref4["data-cy"],
765
- otherProps = _objectWithoutProperties(_ref4, _excluded2);
766
- return /*#__PURE__*/React.createElement(NavLink, _extends({
767
- activeClassName: "active",
768
- className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
769
- "data-cy": "".concat(dataCy, "-sub-link"),
770
- isActive: function isActive() {
771
- return isSubRouteActive(subRoute, location);
772
- },
773
- key: subIndex,
774
- to: subRoute
775
- }, otherProps), /*#__PURE__*/React.createElement(Typography, {
776
- className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
777
- component: "span",
778
- "data-cy": "".concat(dataCy, "-sub-link-label"),
779
- style: "body2"
780
- }, subLabel), /*#__PURE__*/React.createElement(Typography, {
781
- className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
782
- component: "span",
783
- "data-cy": "".concat(dataCy, "-sub-link-count"),
784
- style: "body2"
785
- }, count > 999 ? "999+" : count));
786
- })));
839
+ }))), items && notEquals(label, SETTINGS) && isMenuExpanded && /*#__PURE__*/React.createElement(Items, {
840
+ items: items
841
+ }));
842
+ }));
843
+ };
844
+
845
+ var _excluded = ["label", "to", "items"];
846
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
847
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
848
+ var SelectedLink = function SelectedLink(_ref) {
849
+ var navLink = _ref.navLink,
850
+ setSelectedNavLink = _ref.setSelectedNavLink;
851
+ var location = useLocation();
852
+ var _useTranslation = useTranslation(),
853
+ t = _useTranslation.t;
854
+ var label = navLink.label,
855
+ to = navLink.to,
856
+ items = navLink.items,
857
+ otherProps = _objectWithoutProperties(navLink, _excluded);
858
+ var url = new URL(to, window.location.href);
859
+ var isActive = function isActive() {
860
+ return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
861
+ };
862
+ var handleGoBack = function handleGoBack(event) {
863
+ event.preventDefault();
864
+ setSelectedNavLink({});
865
+ };
866
+ return /*#__PURE__*/React.createElement("div", {
867
+ className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable"
868
+ }, /*#__PURE__*/React.createElement(NavLink, _extends({
869
+ activeClassName: "active",
870
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
871
+ }, _objectSpread({
872
+ isActive: isActive,
873
+ to: to
874
+ }, otherProps)), /*#__PURE__*/React.createElement(Tooltip, {
875
+ content: t("neetoMolecules.sidebar.goBack"),
876
+ position: "top"
877
+ }, /*#__PURE__*/React.createElement("span", {
878
+ className: "neeto-molecules-sidebar__link-icon",
879
+ "data-testid": "".concat(label, "-go-back-button"),
880
+ onClick: handleGoBack
881
+ }, /*#__PURE__*/React.createElement(Left, null))), /*#__PURE__*/React.createElement(Typography, {
882
+ className: "neeto-molecules-sidebar__link-label",
883
+ component: "span",
884
+ style: "body2",
885
+ weight: "normal"
886
+ }, label)), items && /*#__PURE__*/React.createElement(Items, {
887
+ items: items,
888
+ isSettingsItems: true
787
889
  }));
788
890
  };
789
891
 
@@ -802,6 +904,14 @@ var Sidebar = function Sidebar(_ref) {
802
904
  _useState2 = _slicedToArray(_useState, 2),
803
905
  isAppSwitcherOpen = _useState2[0],
804
906
  setIsAppSwitcherOpen = _useState2[1];
907
+ var _useState3 = useState({}),
908
+ _useState4 = _slicedToArray(_useState3, 2),
909
+ selectedNavLink = _useState4[0],
910
+ setSelectedNavLink = _useState4[1];
911
+ var _useState5 = useState(false),
912
+ _useState6 = _slicedToArray(_useState5, 2),
913
+ isSidebarPaneOpen = _useState6[0],
914
+ setIsSidebarPaneOpen = _useState6[1];
805
915
  var _useLocalStorage = useLocalStorage(getSidebarStateLocalStorageKey(), false),
806
916
  _useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
807
917
  isSidebarCollapsed = _useLocalStorage2[0],
@@ -809,25 +919,62 @@ var Sidebar = function Sidebar(_ref) {
809
919
  var location = useLocation();
810
920
  var _useTranslation = useTranslation(),
811
921
  t = _useTranslation.t;
922
+ var isLargerScreen = function isLargerScreen() {
923
+ return window.innerWidth > 768;
924
+ };
925
+ var isSidebarClosed = isLargerScreen() ? isSidebarCollapsed : not(isSidebarPaneOpen);
812
926
  useEffect(function () {
813
927
  isAppSwitcherOpen && setIsAppSwitcherOpen(false);
814
928
  // eslint-disable-next-line react-hooks/exhaustive-deps
815
929
  }, [location]);
930
+ useEffect(function () {
931
+ var handleResize = function handleResize() {
932
+ if (isLargerScreen()) return;
933
+ setIsSidebarPaneOpen(false);
934
+ setIsSidebarCollapsed(true);
935
+ };
936
+ window.addEventListener("resize", handleResize);
937
+ return function () {
938
+ return window.removeEventListener("resize", handleResize);
939
+ };
940
+ }, []);
816
941
  var productName = globalProps$1.appName.substr(5).toLowerCase();
942
+ useEffect(function () {
943
+ var currentLink = navLinks.find(function (_ref2) {
944
+ var to = _ref2.to,
945
+ isActive = _ref2.isActive;
946
+ var url = new URL(to, window.location.href);
947
+ return is(Function, isActive) ? isActive() : location.pathname.startsWith(url.pathname);
948
+ });
949
+ if (isPresent(currentLink) && equals(currentLink.label, SETTINGS)) {
950
+ setSelectedNavLink(currentLink);
951
+ }
952
+ }, []);
817
953
  return /*#__PURE__*/React.createElement("div", {
818
954
  "data-testid": "sidebar-container",
819
955
  className: classnames("neeto-molecules-sidebar__wrapper", {
820
- "neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
956
+ "neeto-molecules-sidebar__wrapper--collapsed": isLargerScreen() ? isSidebarCollapsed : not(isSidebarPaneOpen)
821
957
  })
822
958
  }, /*#__PURE__*/React.createElement("div", {
823
- 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",
959
+ className: "neeto-molecules-sidebar__backdrop",
960
+ onClick: function onClick() {
961
+ setIsSidebarPaneOpen(false);
962
+ }
963
+ }), /*#__PURE__*/React.createElement("div", {
824
964
  "data-cy": "sidebar-wrapper",
825
- "data-testid": "sidebar"
965
+ "data-testid": "sidebar",
966
+ 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", {
967
+ "neeto-molecules-sidebar--focus-mode": isPresent(selectedNavLink)
968
+ })
826
969
  }, /*#__PURE__*/React.createElement(Header$1, {
827
970
  customLogo: customLogo
828
- }), /*#__PURE__*/React.createElement(Links, {
829
- navLinks: navLinks
830
- }), /*#__PURE__*/React.createElement(Footer, {
971
+ }), isPresent(selectedNavLink) ? /*#__PURE__*/React.createElement(SelectedLink, {
972
+ setSelectedNavLink: setSelectedNavLink,
973
+ navLink: selectedNavLink
974
+ }) : /*#__PURE__*/React.createElement(Links, {
975
+ navLinks: navLinks,
976
+ setSelectedNavLink: setSelectedNavLink
977
+ }), isNotPresent(selectedNavLink) && /*#__PURE__*/React.createElement(Footer, {
831
978
  extraTopLinks: extraTopLinks,
832
979
  helpLinkOverrides: helpLinkOverrides,
833
980
  profileInfoOverrides: profileInfoOverrides,
@@ -836,7 +983,7 @@ var Sidebar = function Sidebar(_ref) {
836
983
  className: "neeto-molecules-sidebar__toggler",
837
984
  "data-cy": "neeto-molecules-sidebar-toggler",
838
985
  "data-testid": "sidebar-toggleButton",
839
- style: "text",
986
+ style: isLargerScreen() ? "text" : "secondary",
840
987
  icon: function icon() {
841
988
  return /*#__PURE__*/React.createElement(Chevron, {
842
989
  style: {
@@ -845,11 +992,12 @@ var Sidebar = function Sidebar(_ref) {
845
992
  });
846
993
  },
847
994
  tooltipProps: {
848
- content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
995
+ content: isSidebarClosed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
849
996
  position: "bottom"
850
997
  },
851
998
  onClick: function onClick() {
852
999
  setIsSidebarCollapsed(!isSidebarCollapsed);
1000
+ setIsSidebarPaneOpen(not);
853
1001
  }
854
1002
  }));
855
1003
  };