@bigbinary/neeto-molecules 1.7.0-beta.0 → 1.7.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -54
- package/dist/Breadcrumbs.js +4 -9
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Builder.js +5 -2
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +39 -6
- package/dist/CalendarView.js.map +1 -1
- package/dist/Columns.js +27 -16
- package/dist/Columns.js.map +1 -1
- package/dist/Currency.js +937 -0
- package/dist/Currency.js.map +1 -0
- package/dist/CustomDomainDashboard.js +45 -39
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/EmojiPicker.js +134 -0
- package/dist/EmojiPicker.js.map +1 -0
- package/dist/EmojiReactions.js +123 -0
- package/dist/EmojiReactions.js.map +1 -0
- package/dist/ErrorPage.js +4 -2
- package/dist/ErrorPage.js.map +1 -1
- package/dist/FloatingActionMenu.js +6 -5
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +9 -36
- package/dist/Header.js.map +1 -1
- package/dist/HelpPopover.js +109 -27
- package/dist/HelpPopover.js.map +1 -1
- package/dist/IpRestriction.js +1 -3
- package/dist/IpRestriction.js.map +1 -1
- package/dist/LoginPage.js +5 -4
- package/dist/LoginPage.js.map +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/NavigationHeader.js +9 -9
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/ProductEmbed.js +72 -23
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +2 -0
- package/dist/PublishBlock.js.map +1 -1
- package/dist/Rename.js +4 -9
- package/dist/Rename.js.map +1 -1
- package/dist/Schedule.js +8 -4
- package/dist/Schedule.js.map +1 -1
- package/dist/Search.js +3 -1
- package/dist/Search.js.map +1 -1
- package/dist/Security.js +7 -34
- package/dist/Security.js.map +1 -1
- package/dist/Settings.js +10 -36
- package/dist/Settings.js.map +1 -1
- package/dist/ShareViaLink.js +30 -25
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +449 -50
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.js +40 -7
- package/dist/SubHeader.js.map +1 -1
- package/dist/Taxonomy.js +46 -40
- package/dist/Taxonomy.js.map +1 -1
- package/dist/ToggleFeatureCard.js +25 -11
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +4 -9
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/Builder.js +5 -2
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +36 -3
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/Columns.js +25 -14
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/Currency.js +943 -0
- package/dist/cjs/Currency.js.map +1 -0
- package/dist/cjs/CustomDomainDashboard.js +43 -36
- package/dist/cjs/CustomDomainDashboard.js.map +1 -1
- package/dist/cjs/EmojiPicker.js +142 -0
- package/dist/cjs/EmojiPicker.js.map +1 -0
- package/dist/cjs/EmojiReactions.js +130 -0
- package/dist/cjs/EmojiReactions.js.map +1 -0
- package/dist/cjs/ErrorPage.js +4 -2
- package/dist/cjs/ErrorPage.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +6 -5
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +9 -35
- package/dist/cjs/Header.js.map +1 -1
- package/dist/cjs/HelpPopover.js +109 -26
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/IpRestriction.js +1 -3
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/LoginPage.js +5 -4
- package/dist/cjs/LoginPage.js.map +1 -1
- package/dist/cjs/MenuBar.js +1 -1
- package/dist/cjs/NavigationHeader.js +9 -9
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +71 -22
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +2 -0
- package/dist/cjs/PublishBlock.js.map +1 -1
- package/dist/cjs/Rename.js +4 -9
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/Schedule.js +8 -4
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Search.js +3 -1
- package/dist/cjs/Search.js.map +1 -1
- package/dist/cjs/Security.js +7 -33
- package/dist/cjs/Security.js.map +1 -1
- package/dist/cjs/Settings.js +10 -35
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +30 -25
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/dist/cjs/Sidebar.js +442 -42
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/SubHeader.js +37 -4
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/Taxonomy.js +43 -36
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/ToggleFeatureCard.js +25 -12
- package/dist/cjs/ToggleFeatureCard.js.map +1 -1
- package/package.json +9 -2
- package/src/translations/en.json +20 -4
- package/types/Builder.d.ts +52 -9
- package/types/Columns.d.ts +2 -3
- package/types/Currency.d.ts +35 -0
- package/types/EmojiPicker.d.ts +33 -0
- package/types/EmojiReactions.d.ts +60 -0
- package/types/ErrorPage.d.ts +1 -0
- package/types/HelpPopover.d.ts +1 -0
- package/types/ProductEmbed.d.ts +3 -0
- package/types/Schedule.d.ts +1 -0
- package/types/Sidebar.d.ts +10 -2
- package/types/SubHeader.d.ts +0 -1
- package/types/ToggleFeatureCard.d.ts +8 -1
package/dist/Sidebar.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import React, { useState, forwardRef, useEffect } from 'react';
|
|
1
|
+
import React, { useState, forwardRef, useEffect, useRef } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
4
4
|
import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage';
|
|
5
|
-
import { Typography, Input, Tooltip, Spinner, Avatar, Button } from '@bigbinary/neetoui';
|
|
6
|
-
import { toLower, all, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { Link,
|
|
5
|
+
import { Typography, Input, Tooltip, Spinner, Avatar, Button, Dropdown, Alert, Pane, Toastr } from '@bigbinary/neetoui';
|
|
6
|
+
import { toLower, all, mergeDeepLeft, mergeRight, curry, is, includes, __, not } from 'ramda';
|
|
7
|
+
import { useTranslation, Trans } from 'react-i18next';
|
|
8
|
+
import { Link, NavLink, useHistory, useLocation } from 'react-router-dom';
|
|
9
9
|
import useFetchNeetoApps from '@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps';
|
|
10
|
-
import { NeetoIcon, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, Down } from '@bigbinary/neeto-icons';
|
|
11
|
-
import { capitalize,
|
|
10
|
+
import { NeetoIcon, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, MenuVertical, MenuHorizontal, Down } from '@bigbinary/neeto-icons';
|
|
11
|
+
import { capitalize, isPresent, truncate, findBy, hyphenate, _findIndexBy, isNotPresent } from '@bigbinary/neeto-cist';
|
|
12
12
|
import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
|
|
13
13
|
import { t as t$1 } from 'i18next';
|
|
14
14
|
import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils/axios';
|
|
15
|
-
import { removeFromLocalStorage } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
15
|
+
import { removeFromLocalStorage, getQueryParams } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
16
16
|
import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
|
|
17
17
|
import * as ProductTypefaceLogos from '@bigbinary/neeto-icons/typeface-logos';
|
|
18
18
|
import { Neeto } from '@bigbinary/neeto-icons/typeface-logos';
|
|
19
|
+
import { SINGULAR, PLURAL } from '@bigbinary/neeto-commons-frontend/constants';
|
|
20
|
+
import { useNavigationCheckpoints } from '@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint';
|
|
21
|
+
import { useDestroySegment, buildUrlFromFilters, useUpdateSegment, buildUrlFromSegment } from '@bigbinary/neeto-filters-frontend';
|
|
22
|
+
import { useHistory as useHistory$1 } from 'react-router-dom/cjs/react-router-dom.min';
|
|
23
|
+
import { showThumbsUpToastr } from '@bigbinary/neeto-commons-frontend/utils';
|
|
24
|
+
import { Form, Input as Input$1, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
25
|
+
import * as yup from 'yup';
|
|
19
26
|
|
|
20
27
|
function _arrayWithHoles(arr) {
|
|
21
28
|
if (Array.isArray(arr)) return arr;
|
|
@@ -199,7 +206,7 @@ var AppSwitcher = function AppSwitcher() {
|
|
|
199
206
|
}, /*#__PURE__*/React.createElement(Body, null));
|
|
200
207
|
};
|
|
201
208
|
|
|
202
|
-
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:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.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}}";
|
|
209
|
+
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:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.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-segments-header{padding-left:58px}";
|
|
203
210
|
n(css,{});
|
|
204
211
|
|
|
205
212
|
var AppSwitcherButton = function AppSwitcherButton() {
|
|
@@ -258,6 +265,10 @@ var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
|
258
265
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
259
266
|
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
260
267
|
var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
|
|
268
|
+
var SUB_LINK_TYPES = {
|
|
269
|
+
SYSTEM_VIEW: "system_view",
|
|
270
|
+
SEGMENT: "segment"
|
|
271
|
+
};
|
|
261
272
|
var DEFAULT_HELP_LINK_PROPS = {
|
|
262
273
|
liveChatProps: {
|
|
263
274
|
label: t$1("neetoMolecules.sidebar.helpLinks.liveChat"),
|
|
@@ -298,6 +309,9 @@ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
|
298
309
|
}
|
|
299
310
|
var targetSearchParams = targetUrl.searchParams;
|
|
300
311
|
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
312
|
+
if (isPresent(currentBrowserUrl.searchParams.get("segment_id"))) {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
301
315
|
return all(function (key) {
|
|
302
316
|
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
303
317
|
}, targetSearchKeys);
|
|
@@ -466,9 +480,9 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
466
480
|
return target;
|
|
467
481
|
}
|
|
468
482
|
|
|
469
|
-
var _excluded$
|
|
470
|
-
function ownKeys$
|
|
471
|
-
function _objectSpread$
|
|
483
|
+
var _excluded$7 = ["onClick", "label", "icon"];
|
|
484
|
+
function ownKeys$5(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; }
|
|
485
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
472
486
|
var LinkSection = function LinkSection(_ref) {
|
|
473
487
|
var links = _ref.links;
|
|
474
488
|
return /*#__PURE__*/React.createElement("ul", {
|
|
@@ -478,7 +492,7 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
478
492
|
label = _ref2.label,
|
|
479
493
|
_ref2$icon = _ref2.icon,
|
|
480
494
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
481
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
495
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$7);
|
|
482
496
|
return /*#__PURE__*/React.createElement("li", {
|
|
483
497
|
className: "neeto-molecules-profile-sublist__item",
|
|
484
498
|
key: idx
|
|
@@ -488,7 +502,7 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
488
502
|
iconPosition: "left",
|
|
489
503
|
iconSize: 18,
|
|
490
504
|
style: "text"
|
|
491
|
-
}, _objectSpread$
|
|
505
|
+
}, _objectSpread$5({
|
|
492
506
|
icon: icon,
|
|
493
507
|
label: label,
|
|
494
508
|
onClick: onClick
|
|
@@ -591,9 +605,9 @@ var HelpSection = function HelpSection(_ref, ref) {
|
|
|
591
605
|
};
|
|
592
606
|
var HelpSection$1 = /*#__PURE__*/forwardRef(HelpSection);
|
|
593
607
|
|
|
594
|
-
var _excluded$
|
|
595
|
-
function ownKeys$
|
|
596
|
-
function _objectSpread$
|
|
608
|
+
var _excluded$6 = ["label"];
|
|
609
|
+
function ownKeys$4(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; }
|
|
610
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
597
611
|
var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
598
612
|
var helpLinkOverrides = _ref.helpLinkOverrides,
|
|
599
613
|
changesCount = _ref.changesCount;
|
|
@@ -604,7 +618,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
604
618
|
var _DEFAULT_HELP_LINK_PR, _DEFAULT_HELP_LINK_PR2, _DEFAULT_HELP_LINK_PR3;
|
|
605
619
|
return (_DEFAULT_HELP_LINK_PR = (_DEFAULT_HELP_LINK_PR2 = (_DEFAULT_HELP_LINK_PR3 = DEFAULT_HELP_LINK_PROPS[key]).isVisible) === null || _DEFAULT_HELP_LINK_PR2 === void 0 ? void 0 : _DEFAULT_HELP_LINK_PR2.call(_DEFAULT_HELP_LINK_PR3)) !== null && _DEFAULT_HELP_LINK_PR !== void 0 ? _DEFAULT_HELP_LINK_PR : true;
|
|
606
620
|
}).map(function (key) {
|
|
607
|
-
return _objectSpread$
|
|
621
|
+
return _objectSpread$4(_objectSpread$4(_objectSpread$4(_objectSpread$4({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
608
622
|
onClick: function onClick() {
|
|
609
623
|
return setIsOpen(true);
|
|
610
624
|
}
|
|
@@ -619,7 +633,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
619
633
|
className: "neeto-molecules-help-sublist"
|
|
620
634
|
}, helpLinks.map(function (_ref3, idx) {
|
|
621
635
|
var label = _ref3.label,
|
|
622
|
-
buttonProps = _objectWithoutProperties(_ref3, _excluded$
|
|
636
|
+
buttonProps = _objectWithoutProperties(_ref3, _excluded$6);
|
|
623
637
|
return /*#__PURE__*/React.createElement("li", {
|
|
624
638
|
className: "neeto-molecules-help-sublist__item",
|
|
625
639
|
key: idx
|
|
@@ -711,12 +725,406 @@ var Header = function Header(_ref) {
|
|
|
711
725
|
};
|
|
712
726
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
713
727
|
|
|
714
|
-
var _excluded = ["
|
|
715
|
-
|
|
728
|
+
var _excluded$5 = ["checkpointKey", "to", "children"];
|
|
729
|
+
var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
730
|
+
var checkpointKey = _ref.checkpointKey,
|
|
731
|
+
to = _ref.to,
|
|
732
|
+
children = _ref.children,
|
|
733
|
+
others = _objectWithoutProperties(_ref, _excluded$5);
|
|
734
|
+
var _useNavigationCheckpo = useNavigationCheckpoints(checkpointKey),
|
|
735
|
+
checkpoint = _useNavigationCheckpo[checkpointKey];
|
|
736
|
+
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
737
|
+
to: checkpoint || to
|
|
738
|
+
}, others), children);
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
var MENU_ITEM_TYPES = {
|
|
742
|
+
menuItem: "menuItem",
|
|
743
|
+
divider: "divider"
|
|
744
|
+
};
|
|
745
|
+
var DEFAULT_TOOLTIP_PROPS = {
|
|
746
|
+
disabled: true,
|
|
747
|
+
position: "bottom"
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
var _excluded$4 = ["label", "key"],
|
|
751
|
+
_excluded2 = ["isVisible", "key"];
|
|
752
|
+
var MenuItem$1 = Dropdown.MenuItem,
|
|
753
|
+
Menu$1 = Dropdown.Menu;
|
|
754
|
+
var Submenu = function Submenu(_ref) {
|
|
755
|
+
var label = _ref.label,
|
|
756
|
+
key = _ref.key,
|
|
757
|
+
menuItemProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
758
|
+
return /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
759
|
+
customTarget: /*#__PURE__*/React.createElement(MenuItem$1.Button, null, label),
|
|
760
|
+
key: key,
|
|
761
|
+
position: "left",
|
|
762
|
+
trigger: "hover"
|
|
763
|
+
}, menuItemProps.dropdownProps), /*#__PURE__*/React.createElement(Menu$1, null, menuItemProps.menuItems.map(function (_ref2) {
|
|
764
|
+
var _ref2$isVisible = _ref2.isVisible,
|
|
765
|
+
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
766
|
+
key = _ref2.key,
|
|
767
|
+
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
768
|
+
if (!isVisible) return null;
|
|
769
|
+
return /*#__PURE__*/React.createElement(MoreDropdownMenuItem, _extends({
|
|
770
|
+
key: key
|
|
771
|
+
}, menuItemProps));
|
|
772
|
+
})));
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
var _excluded$3 = ["onClick", "label", "type", "hasSubItems"];
|
|
776
|
+
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; }
|
|
777
|
+
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; }
|
|
778
|
+
var MenuItem = Dropdown.MenuItem,
|
|
779
|
+
Divider = Dropdown.Divider;
|
|
780
|
+
var MoreDropdownMenuItem = function MoreDropdownMenuItem(_ref) {
|
|
781
|
+
var onClick = _ref.onClick,
|
|
782
|
+
label = _ref.label,
|
|
783
|
+
_ref$type = _ref.type,
|
|
784
|
+
type = _ref$type === void 0 ? MENU_ITEM_TYPES.menuItem : _ref$type,
|
|
785
|
+
_ref$hasSubItems = _ref.hasSubItems,
|
|
786
|
+
hasSubItems = _ref$hasSubItems === void 0 ? false : _ref$hasSubItems,
|
|
787
|
+
menuItemProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
788
|
+
if (type === MENU_ITEM_TYPES.divider) {
|
|
789
|
+
return /*#__PURE__*/React.createElement(Divider, null);
|
|
790
|
+
}
|
|
791
|
+
if (hasSubItems) {
|
|
792
|
+
return /*#__PURE__*/React.createElement(Submenu, _objectSpread$3({
|
|
793
|
+
label: label
|
|
794
|
+
}, menuItemProps));
|
|
795
|
+
}
|
|
796
|
+
return /*#__PURE__*/React.createElement(MenuItem.Button, _objectSpread$3({
|
|
797
|
+
onClick: onClick
|
|
798
|
+
}, menuItemProps), label);
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
var _excluded$2 = ["isVisible", "key"];
|
|
802
|
+
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; }
|
|
803
|
+
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; }
|
|
804
|
+
var Menu = Dropdown.Menu;
|
|
805
|
+
var MoreDropdown = function MoreDropdown(_ref) {
|
|
806
|
+
var _ref$dropdownButtonPr = _ref.dropdownButtonProps,
|
|
807
|
+
dropdownButtonProps = _ref$dropdownButtonPr === void 0 ? {} : _ref$dropdownButtonPr,
|
|
808
|
+
_ref$isVertical = _ref.isVertical,
|
|
809
|
+
isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
|
|
810
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
811
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
812
|
+
_ref$dropdownProps = _ref.dropdownProps,
|
|
813
|
+
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
814
|
+
menuTopChildren = _ref.menuTopChildren,
|
|
815
|
+
menuBottomChildren = _ref.menuBottomChildren,
|
|
816
|
+
_ref$menuItems = _ref.menuItems,
|
|
817
|
+
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
818
|
+
var _useTranslation = useTranslation(),
|
|
819
|
+
t = _useTranslation.t;
|
|
820
|
+
var tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
|
|
821
|
+
var targetIcon = isVertical ? MenuVertical : MenuHorizontal;
|
|
822
|
+
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
823
|
+
if (isDropdownDisabled && !tooltipProps.disabled) {
|
|
824
|
+
return /*#__PURE__*/React.createElement(Tooltip, tooltipProps, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, _extends({
|
|
825
|
+
disabled: true,
|
|
826
|
+
"data-cy": "more-dropdown-button",
|
|
827
|
+
"data-testid": "nui-dropdown-button",
|
|
828
|
+
icon: targetIcon,
|
|
829
|
+
iconPosition: "right",
|
|
830
|
+
size: "medium",
|
|
831
|
+
style: "text"
|
|
832
|
+
}, dropdownButtonProps))));
|
|
833
|
+
}
|
|
834
|
+
return /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
835
|
+
autoWidth: true,
|
|
836
|
+
className: "flex",
|
|
837
|
+
disabled: isDisabled,
|
|
838
|
+
icon: targetIcon,
|
|
839
|
+
buttonProps: _objectSpread$2({
|
|
840
|
+
className: "min-h-0 flex-shrink-0",
|
|
841
|
+
style: "text",
|
|
842
|
+
tooltipProps: {
|
|
843
|
+
content: t("neetoMolecules.moreDropdown.tooltip"),
|
|
844
|
+
position: "top"
|
|
845
|
+
}
|
|
846
|
+
}, dropdownButtonProps)
|
|
847
|
+
}, dropdownProps), /*#__PURE__*/React.createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
|
|
848
|
+
var _ref2$isVisible = _ref2.isVisible,
|
|
849
|
+
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
850
|
+
key = _ref2.key,
|
|
851
|
+
menuItemProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
852
|
+
if (!isVisible) return null;
|
|
853
|
+
return /*#__PURE__*/React.createElement(MoreDropdownMenuItem, _extends({
|
|
854
|
+
key: key
|
|
855
|
+
}, menuItemProps));
|
|
856
|
+
}), menuBottomChildren));
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
var DeleteAlert = function DeleteAlert(_ref) {
|
|
860
|
+
var isOpen = _ref.isOpen,
|
|
861
|
+
onClose = _ref.onClose,
|
|
862
|
+
segment = _ref.segment,
|
|
863
|
+
columns = _ref.columns;
|
|
864
|
+
var _useTranslation = useTranslation(),
|
|
865
|
+
t = _useTranslation.t;
|
|
866
|
+
var history = useHistory();
|
|
867
|
+
var _getQueryParams = getQueryParams(),
|
|
868
|
+
segmentId = _getQueryParams.segmentId;
|
|
869
|
+
var _useDestroySegment = useDestroySegment(),
|
|
870
|
+
deleteSegment = _useDestroySegment.mutate,
|
|
871
|
+
isDeleting = _useDestroySegment.isLoading;
|
|
872
|
+
var handleClearAll = function handleClearAll() {
|
|
873
|
+
var params = buildUrlFromFilters({
|
|
874
|
+
columns: columns,
|
|
875
|
+
filters: [],
|
|
876
|
+
isClearAll: true
|
|
877
|
+
});
|
|
878
|
+
history.push({
|
|
879
|
+
search: params
|
|
880
|
+
});
|
|
881
|
+
};
|
|
882
|
+
var handleDelete = function handleDelete() {
|
|
883
|
+
segment.id === segmentId && handleClearAll();
|
|
884
|
+
deleteSegment(segment.id, {
|
|
885
|
+
onSuccess: onClose
|
|
886
|
+
});
|
|
887
|
+
};
|
|
888
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
889
|
+
isOpen: isOpen,
|
|
890
|
+
onClose: onClose,
|
|
891
|
+
isSubmitting: isDeleting,
|
|
892
|
+
submitButtonLabel: t("neetoMolecules.common.actions.delete"),
|
|
893
|
+
message: /*#__PURE__*/React.createElement(Trans, {
|
|
894
|
+
i18nKey: "neetoMolecules.sidebar.segments.deleteAlertMessage",
|
|
895
|
+
values: {
|
|
896
|
+
entity: segment.name
|
|
897
|
+
}
|
|
898
|
+
}),
|
|
899
|
+
title: t("neetoMolecules.common.deleteAlert.title", {
|
|
900
|
+
entity: t("neetoMolecules.sidebar.segments.segment", SINGULAR)
|
|
901
|
+
}),
|
|
902
|
+
onSubmit: handleDelete
|
|
903
|
+
});
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
var RENAME_SEGMENT_FORM_VALIDATION = yup.object().shape({
|
|
907
|
+
name: yup.string().trim().required(t$1("neetoMolecules.sidebar.segments.validations.nameIsRequired"))
|
|
908
|
+
});
|
|
909
|
+
|
|
910
|
+
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; }
|
|
911
|
+
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; }
|
|
912
|
+
var Rename = function Rename(_ref) {
|
|
913
|
+
var isOpen = _ref.isOpen,
|
|
914
|
+
setIsOpen = _ref.setIsOpen,
|
|
915
|
+
segment = _ref.segment;
|
|
916
|
+
var _useTranslation = useTranslation(),
|
|
917
|
+
t = _useTranslation.t;
|
|
918
|
+
var _useUpdateSegment = useUpdateSegment(),
|
|
919
|
+
updateSegment = _useUpdateSegment.mutate;
|
|
920
|
+
var inputRef = useRef();
|
|
921
|
+
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
922
|
+
var setSubmitting = _ref2.setSubmitting,
|
|
923
|
+
setFieldError = _ref2.setFieldError;
|
|
924
|
+
setSubmitting(true);
|
|
925
|
+
updateSegment({
|
|
926
|
+
id: segment.id,
|
|
927
|
+
payload: _objectSpread$1(_objectSpread$1({}, segment), values),
|
|
928
|
+
showToastr: false
|
|
929
|
+
}, {
|
|
930
|
+
onSuccess: function onSuccess() {
|
|
931
|
+
setIsOpen(false);
|
|
932
|
+
showThumbsUpToastr();
|
|
933
|
+
},
|
|
934
|
+
onSettled: function onSettled() {
|
|
935
|
+
setSubmitting(false);
|
|
936
|
+
},
|
|
937
|
+
onError: function onError(error) {
|
|
938
|
+
var _error$response, _error$response3, _error$response3$data;
|
|
939
|
+
if (((_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== 422) {
|
|
940
|
+
var _error$response2, _error$response2$data;
|
|
941
|
+
var errorMessage = (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.error;
|
|
942
|
+
Toastr.error(errorMessage || t("neetoMolecules.common.somethingWentWrong"));
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
setFieldError("name", (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : _error$response3$data.error);
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
};
|
|
949
|
+
return /*#__PURE__*/React.createElement(Pane, {
|
|
950
|
+
isOpen: isOpen,
|
|
951
|
+
initialFocusRef: inputRef,
|
|
952
|
+
onClose: function onClose() {
|
|
953
|
+
return setIsOpen(false);
|
|
954
|
+
}
|
|
955
|
+
}, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
956
|
+
"data-cy": "edit-pane-header",
|
|
957
|
+
style: "h2"
|
|
958
|
+
}, t("neetoMolecules.sidebar.segments.renameTitle"))), /*#__PURE__*/React.createElement(Form, {
|
|
959
|
+
className: "w-full",
|
|
960
|
+
formikProps: {
|
|
961
|
+
initialValues: {
|
|
962
|
+
name: segment.name
|
|
963
|
+
},
|
|
964
|
+
validateOnChange: true,
|
|
965
|
+
validateOnBlur: true,
|
|
966
|
+
validationSchema: RENAME_SEGMENT_FORM_VALIDATION,
|
|
967
|
+
onSubmit: handleSubmit
|
|
968
|
+
}
|
|
969
|
+
}, /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(Input$1, {
|
|
970
|
+
required: true,
|
|
971
|
+
className: "w-full",
|
|
972
|
+
"data-testid": "segment-name-input-field",
|
|
973
|
+
label: t("neetoMolecules.sidebar.segments.renameFieldLabel"),
|
|
974
|
+
name: "name",
|
|
975
|
+
ref: inputRef
|
|
976
|
+
})), /*#__PURE__*/React.createElement(Pane.Footer, {
|
|
977
|
+
className: "flex items-center space-x-2"
|
|
978
|
+
}, /*#__PURE__*/React.createElement(ActionBlock, {
|
|
979
|
+
cancelButtonProps: {
|
|
980
|
+
onClick: function onClick() {
|
|
981
|
+
return setIsOpen(false);
|
|
982
|
+
},
|
|
983
|
+
disabled: false,
|
|
984
|
+
className: "ml-2"
|
|
985
|
+
}
|
|
986
|
+
}))));
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
var Segment = function Segment(_ref) {
|
|
990
|
+
var dataCy = _ref.dataCy,
|
|
991
|
+
segment = _ref.segment,
|
|
992
|
+
label = _ref.label,
|
|
993
|
+
columns = _ref.columns;
|
|
994
|
+
var _useTranslation = useTranslation(),
|
|
995
|
+
t = _useTranslation.t;
|
|
996
|
+
var _useState = useState(false),
|
|
997
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
998
|
+
isDeleteAlertOpen = _useState2[0],
|
|
999
|
+
setIsDeleteAlertOpen = _useState2[1];
|
|
1000
|
+
var _useState3 = useState(false),
|
|
1001
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1002
|
+
isRenamePaneOpen = _useState4[0],
|
|
1003
|
+
setIsRenamePaneOpen = _useState4[1];
|
|
1004
|
+
var history = useHistory$1();
|
|
1005
|
+
var _getQueryParams = getQueryParams(),
|
|
1006
|
+
segmentId = _getQueryParams.segmentId;
|
|
1007
|
+
var handleSelectSegment = function handleSelectSegment() {
|
|
1008
|
+
var _segment$filters$;
|
|
1009
|
+
history.push({
|
|
1010
|
+
search: buildUrlFromSegment({
|
|
1011
|
+
columns: columns,
|
|
1012
|
+
filters: (_segment$filters$ = segment.filters[0]) === null || _segment$filters$ === void 0 ? void 0 : _segment$filters$.conditions,
|
|
1013
|
+
id: segment.id
|
|
1014
|
+
})
|
|
1015
|
+
});
|
|
1016
|
+
};
|
|
1017
|
+
var dataCyPrefix = dataCy || hyphenate(label);
|
|
1018
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
1019
|
+
"data-cy": "".concat(dataCyPrefix, "-segment-link"),
|
|
1020
|
+
className: classnames("neeto-molecules-sidebar-segment neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none mb-0 w-full py-1", {
|
|
1021
|
+
active: segmentId === segment.id
|
|
1022
|
+
}),
|
|
1023
|
+
onClick: handleSelectSegment
|
|
1024
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
1025
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-molecules-sidebar-segment__label neeto-ui-flex-grow min-w-0",
|
|
1026
|
+
component: "span",
|
|
1027
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
|
|
1028
|
+
style: "body2"
|
|
1029
|
+
}, label), /*#__PURE__*/React.createElement(MoreDropdown, {
|
|
1030
|
+
dropdownButtonProps: {
|
|
1031
|
+
"data-testid": "segment-more-menu-".concat(dataCyPrefix),
|
|
1032
|
+
className: "flex-shrink-0",
|
|
1033
|
+
size: "small",
|
|
1034
|
+
style: "secondary"
|
|
1035
|
+
},
|
|
1036
|
+
dropdownProps: {
|
|
1037
|
+
position: "bottom-end",
|
|
1038
|
+
strategy: "fixed",
|
|
1039
|
+
autoWidth: true,
|
|
1040
|
+
onClick: function onClick(e) {
|
|
1041
|
+
e.stopPropagation();
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
menuItems: [{
|
|
1045
|
+
label: t("neetoMolecules.common.actions.rename"),
|
|
1046
|
+
onClick: function onClick(e) {
|
|
1047
|
+
setIsRenamePaneOpen(true);
|
|
1048
|
+
e.stopPropagation();
|
|
1049
|
+
},
|
|
1050
|
+
key: "edit-custom-segment-button"
|
|
1051
|
+
}, {
|
|
1052
|
+
label: t("neetoMolecules.common.actions.delete"),
|
|
1053
|
+
onClick: function onClick(e) {
|
|
1054
|
+
setIsDeleteAlertOpen(true);
|
|
1055
|
+
e.stopPropagation();
|
|
1056
|
+
},
|
|
1057
|
+
key: "delete-custom-segment-button"
|
|
1058
|
+
}]
|
|
1059
|
+
})), /*#__PURE__*/React.createElement(DeleteAlert, {
|
|
1060
|
+
columns: columns,
|
|
1061
|
+
segment: segment,
|
|
1062
|
+
isOpen: isDeleteAlertOpen,
|
|
1063
|
+
onClose: function onClose() {
|
|
1064
|
+
return setIsDeleteAlertOpen(false);
|
|
1065
|
+
}
|
|
1066
|
+
}), /*#__PURE__*/React.createElement(Rename, {
|
|
1067
|
+
segment: segment,
|
|
1068
|
+
isOpen: isRenamePaneOpen,
|
|
1069
|
+
setIsOpen: setIsRenamePaneOpen
|
|
1070
|
+
}));
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
var _excluded$1 = ["data-cy", "to", "label", "type", "count", "columns", "filters", "id"];
|
|
1074
|
+
var SubLink = function SubLink(_ref) {
|
|
1075
|
+
var dataCy = _ref["data-cy"],
|
|
1076
|
+
to = _ref.to,
|
|
1077
|
+
label = _ref.label,
|
|
1078
|
+
_ref$type = _ref.type,
|
|
1079
|
+
type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
|
|
1080
|
+
count = _ref.count,
|
|
1081
|
+
columns = _ref.columns,
|
|
1082
|
+
filters = _ref.filters,
|
|
1083
|
+
id = _ref.id,
|
|
1084
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
1085
|
+
var segment = {
|
|
1086
|
+
id: id,
|
|
1087
|
+
name: label,
|
|
1088
|
+
filters: filters
|
|
1089
|
+
};
|
|
1090
|
+
if (type === SUB_LINK_TYPES.SEGMENT) {
|
|
1091
|
+
return /*#__PURE__*/React.createElement(Segment, {
|
|
1092
|
+
columns: columns,
|
|
1093
|
+
dataCy: dataCy,
|
|
1094
|
+
label: label,
|
|
1095
|
+
segment: segment
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
var dataCyPrefix = dataCy || hyphenate(label);
|
|
1099
|
+
return /*#__PURE__*/React.createElement(CheckPointNavLinks, _extends({
|
|
1100
|
+
to: to,
|
|
1101
|
+
activeClassName: "active",
|
|
1102
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
1103
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link"),
|
|
1104
|
+
isActive: function isActive() {
|
|
1105
|
+
return isSubRouteActive(to, location);
|
|
1106
|
+
}
|
|
1107
|
+
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
1108
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
1109
|
+
component: "span",
|
|
1110
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
|
|
1111
|
+
style: "body2"
|
|
1112
|
+
}, label), /*#__PURE__*/React.createElement(Typography, {
|
|
1113
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
1114
|
+
component: "span",
|
|
1115
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-count"),
|
|
1116
|
+
style: "body2"
|
|
1117
|
+
}, count > 999 ? "999+" : count));
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
var _excluded = ["label", "to", "icon", "items"];
|
|
716
1121
|
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; }
|
|
717
1122
|
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; }
|
|
718
1123
|
var Links = function Links(_ref) {
|
|
719
|
-
var navLinks = _ref.navLinks
|
|
1124
|
+
var navLinks = _ref.navLinks,
|
|
1125
|
+
isCountsLoading = _ref.isCountsLoading;
|
|
1126
|
+
var _useTranslation = useTranslation(),
|
|
1127
|
+
t = _useTranslation.t;
|
|
720
1128
|
var location = useLocation();
|
|
721
1129
|
var _useState = useState(true),
|
|
722
1130
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -751,12 +1159,16 @@ var Links = function Links(_ref) {
|
|
|
751
1159
|
var isActive = function isActive() {
|
|
752
1160
|
return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
753
1161
|
};
|
|
754
|
-
var isMenuExpanded = isActive() && isActiveLinkExpanded;
|
|
1162
|
+
var isMenuExpanded = isActive() && isActiveLinkExpanded && !isCountsLoading;
|
|
1163
|
+
var firstSegmentIndex = _findIndexBy({
|
|
1164
|
+
type: SUB_LINK_TYPES.SEGMENT
|
|
1165
|
+
}, items);
|
|
755
1166
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
756
1167
|
key: mainIndex
|
|
757
|
-
}, /*#__PURE__*/React.createElement(
|
|
1168
|
+
}, /*#__PURE__*/React.createElement(CheckPointNavLinks, _extends({
|
|
758
1169
|
activeClassName: "active",
|
|
759
1170
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
1171
|
+
"data-testid": "navlink-".concat(hyphenate(label)),
|
|
760
1172
|
onClick: function onClick(event) {
|
|
761
1173
|
return handleNavLinkClick(event, isActive, items);
|
|
762
1174
|
}
|
|
@@ -780,32 +1192,16 @@ var Links = function Links(_ref) {
|
|
|
780
1192
|
}))), items && isMenuExpanded && /*#__PURE__*/React.createElement("div", {
|
|
781
1193
|
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
782
1194
|
"data-cy": "sidebar-sub-link-wrapper"
|
|
783
|
-
}, items.filter(filterByPermissions).map(function (
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
isActive: function isActive() {
|
|
794
|
-
return isSubRouteActive(subRoute, location);
|
|
795
|
-
},
|
|
796
|
-
key: subIndex,
|
|
797
|
-
to: subRoute
|
|
798
|
-
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
799
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
800
|
-
component: "span",
|
|
801
|
-
"data-cy": "".concat(dataCy, "-sub-link-label"),
|
|
802
|
-
style: "body2"
|
|
803
|
-
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
804
|
-
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
805
|
-
component: "span",
|
|
806
|
-
"data-cy": "".concat(dataCy, "-sub-link-count"),
|
|
807
|
-
style: "body2"
|
|
808
|
-
}, count > 999 ? "999+" : count));
|
|
1195
|
+
}, items.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
1196
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
1197
|
+
key: subIndex
|
|
1198
|
+
}, subIndex === firstSegmentIndex && /*#__PURE__*/React.createElement(Typography, {
|
|
1199
|
+
className: "neeto-molecules-sidebar-segments-header neeto-ui-text-transform-capitalize neeto-ui-text-gray-600 py-2 uppercase",
|
|
1200
|
+
style: "body3",
|
|
1201
|
+
weight: "semibold"
|
|
1202
|
+
}, t("neetoMolecules.sidebar.segments.segment", PLURAL)), /*#__PURE__*/React.createElement(SubLink, _extends({}, subItem, {
|
|
1203
|
+
columns: otherProps.columns
|
|
1204
|
+
})));
|
|
809
1205
|
})));
|
|
810
1206
|
}));
|
|
811
1207
|
};
|
|
@@ -813,6 +1209,8 @@ var Links = function Links(_ref) {
|
|
|
813
1209
|
var Sidebar = function Sidebar(_ref) {
|
|
814
1210
|
var navLinks = _ref.navLinks,
|
|
815
1211
|
customLogo = _ref.customLogo,
|
|
1212
|
+
_ref$isCountsLoading = _ref.isCountsLoading,
|
|
1213
|
+
isCountsLoading = _ref$isCountsLoading === void 0 ? false : _ref$isCountsLoading,
|
|
816
1214
|
_ref$profileInfoOverr = _ref.profileInfoOverrides,
|
|
817
1215
|
profileInfoOverrides = _ref$profileInfoOverr === void 0 ? {} : _ref$profileInfoOverr,
|
|
818
1216
|
_ref$helpLinkOverride = _ref.helpLinkOverrides,
|
|
@@ -875,6 +1273,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
875
1273
|
}, /*#__PURE__*/React.createElement(Header$1, {
|
|
876
1274
|
customLogo: customLogo
|
|
877
1275
|
}), /*#__PURE__*/React.createElement(Links, {
|
|
1276
|
+
isCountsLoading: isCountsLoading,
|
|
878
1277
|
navLinks: navLinks
|
|
879
1278
|
}), showFooter && /*#__PURE__*/React.createElement(Footer, {
|
|
880
1279
|
extraTopLinks: extraTopLinks,
|