@bigbinary/neeto-molecules 1.0.87-beta → 1.0.88
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 +1 -0
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +24 -12
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +27 -15
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +23 -10
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +26 -13
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Scrollable.cjs.js +1 -5
- package/dist/Scrollable.cjs.js.map +1 -1
- package/dist/Scrollable.js +1 -5
- package/dist/Scrollable.js.map +1 -1
- package/dist/Sidebar.cjs.js +136 -212
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +139 -215
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.cjs.js +1 -1
- package/dist/SubHeader.js +1 -1
- package/dist/ToggleFeatureCard.cjs.js +304 -0
- package/dist/ToggleFeatureCard.cjs.js.map +1 -0
- package/dist/ToggleFeatureCard.js +298 -0
- package/dist/ToggleFeatureCard.js.map +1 -0
- package/package.json +2 -2
- package/src/translations/en.json +11 -6
- package/types/ImageWithFallback.d.ts +6 -7
- package/types/Sidebar.d.ts +1 -1
- package/types/ToggleFeatureCard.d.ts +32 -0
package/dist/Sidebar.cjs.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var neetoui = require('@bigbinary/neetoui');
|
|
5
4
|
var ramda = require('ramda');
|
|
6
|
-
var reactI18next = require('react-i18next');
|
|
7
5
|
var reactRouterDom = require('react-router-dom');
|
|
8
6
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
9
7
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
8
|
+
var neetoui = require('@bigbinary/neetoui');
|
|
9
|
+
var reactI18next = require('react-i18next');
|
|
10
10
|
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
11
11
|
var AppIcons = require('@bigbinary/neeto-icons/app-icons');
|
|
12
12
|
var i18next = require('i18next');
|
|
13
13
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
14
14
|
var KeyboardShortcuts = require('@bigbinary/neeto-molecules/KeyboardShortcuts');
|
|
15
|
-
var
|
|
15
|
+
var ProductLogos = require('@bigbinary/neeto-icons/logos');
|
|
16
16
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -38,7 +38,7 @@ function _interopNamespace(e) {
|
|
|
38
38
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
39
39
|
var AppIcons__namespace = /*#__PURE__*/_interopNamespace(AppIcons);
|
|
40
40
|
var KeyboardShortcuts__default = /*#__PURE__*/_interopDefaultLegacy(KeyboardShortcuts);
|
|
41
|
-
var
|
|
41
|
+
var ProductLogos__namespace = /*#__PURE__*/_interopNamespace(ProductLogos);
|
|
42
42
|
|
|
43
43
|
function _arrayWithHoles(arr) {
|
|
44
44
|
if (Array.isArray(arr)) return arr;
|
|
@@ -31512,7 +31512,7 @@ SwitchTransition.defaultProps = {
|
|
|
31512
31512
|
|
|
31513
31513
|
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}}
|
|
31514
31514
|
|
|
31515
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:
|
|
31515
|
+
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:var(--neeto-ui-sidebar-width);overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;position:relative;width:calc(100vw - var(--neeto-ui-sidebar-width))}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__close-btn{position:absolute;right:24px;top:24px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31516
31516
|
n(css$1,{});
|
|
31517
31517
|
|
|
31518
31518
|
function _extends() {
|
|
@@ -31743,18 +31743,42 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31743
31743
|
})))));
|
|
31744
31744
|
};
|
|
31745
31745
|
|
|
31746
|
-
var
|
|
31747
|
-
|
|
31748
|
-
|
|
31749
|
-
|
|
31750
|
-
|
|
31751
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
|
|
31746
|
+
var FeaturedTooltip = function FeaturedTooltip(_ref) {
|
|
31747
|
+
var label = _ref.label,
|
|
31748
|
+
description = _ref.description;
|
|
31749
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31750
|
+
className: "neeto-ui-flex neeto-ui-flex-col sidebar-featured-tooltip"
|
|
31751
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31752
|
+
className: "neeto-ui-text-center sidebar-featured-tooltip__title",
|
|
31753
|
+
lineHeight: "tight",
|
|
31754
|
+
style: "h5",
|
|
31755
|
+
weight: "semibold"
|
|
31756
|
+
}, label), description && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31757
|
+
className: "neeto-ui-text-center neeto-ui-text-gray-400 sidebar-featured-tooltip__description",
|
|
31758
|
+
lineHeight: "normal",
|
|
31759
|
+
style: "body3"
|
|
31760
|
+
}, description));
|
|
31755
31761
|
};
|
|
31762
|
+
var FeaturedTooltip$1 = /*#__PURE__*/React__default["default"].memo(FeaturedTooltip);
|
|
31756
31763
|
|
|
31757
|
-
var
|
|
31764
|
+
var NavIconWrapper = function NavIconWrapper(_ref) {
|
|
31765
|
+
var description = _ref.description,
|
|
31766
|
+
label = _ref.label,
|
|
31767
|
+
children = _ref.children;
|
|
31768
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
31769
|
+
className: "sidebar-featured-tooltip__content",
|
|
31770
|
+
content: /*#__PURE__*/React__default["default"].createElement(FeaturedTooltip$1, {
|
|
31771
|
+
description: description,
|
|
31772
|
+
label: label
|
|
31773
|
+
}),
|
|
31774
|
+
delay: [400, 40],
|
|
31775
|
+
distance: "20rem",
|
|
31776
|
+
duration: [200, 200],
|
|
31777
|
+
position: "right"
|
|
31778
|
+
}, children);
|
|
31779
|
+
};
|
|
31780
|
+
|
|
31781
|
+
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;max-width:300px;padding:40px 0;transition:all .3s;width:300px;z-index:99997}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}@media (min-width:1440px){.neeto-molecules-sidebar{max-width:320px;width:320px}}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed{max-width:var(--neeto-ui-sidebar-width);width:var(--neeto-ui-sidebar-width)}.neeto-molecules-sidebar__header{margin-bottom:40px;padding:0 20px;width:100%}.neeto-molecules-sidebar__logo,.neeto-molecules-sidebar__logo svg{height:40px;width:40px}.neeto-molecules-sidebar__info{padding-left:10px;width:calc(100% - 40px)}.neeto-molecules-sidebar__info .neeto-molecules-typography{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.neeto-molecules-sidebar__links{margin-bottom:20px;padding-left:12px;padding-right:12px;width:100%}.neeto-molecules-sidebar__link{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-gray-600));cursor:pointer;margin:8px 0;padding:8px;position:relative;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__link.mb-0{margin-bottom:0}.neeto-molecules-sidebar__link-icon{flex-shrink:0;width:40px}.neeto-molecules-sidebar__link-label{overflow:hidden;padding-left:10px;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 40px)}.neeto-molecules-sidebar__link-sub-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 56px)}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-600));text-decoration:none}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-gray-600));cursor:pointer;margin:4px 0;padding:8px 8px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-700));text-decoration:none}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{background-color:rgb(var(--neeto-ui-gray-300));color:rgb(var(--neeto-ui-gray-700));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__footer{margin-top:auto;padding:0 12px;width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-wrapper{outline:none!important}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile{background-color:rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);box-shadow:var(--neeto-ui-shadow-sm);cursor:pointer;padding:8px;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-content{padding-left:10px;padding-right:30px;position:relative;width:calc(100% - 40px)}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-content .neeto-molecules-typography{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-drop-icon{color:rgb(var(--neeto-ui-gray-500));position:absolute;right:8px;top:50%;transform:translateY(-50%)}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed{padding:24px 0}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__profile{background-color:transparent;box-shadow:none;padding:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__header,.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__links{padding-left:16px;padding-right:16px}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__link-icon{width:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__footer{padding-left:16px;padding-right:16px}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:var(--neeto-ui-shadow-xs)!important}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400));list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-profile-sublist__item-btn{align-items:center;border-radius:0;color:rgb(var(--neeto-ui-gray-800));cursor:pointer;display:flex;font-size:var(--neeto-ui-text-sm);font-weight:var(--neeto-ui-font-normal);gap:8px;line-height:1.143;min-height:32px;outline-color:transparent;padding:6px 40px 6px 12px;position:relative;text-decoration:none;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.neeto-molecules-profile-sublist__item-btn.disabled{color:rgb(var(--neeto-ui-gray-500));cursor:not-allowed}.neeto-molecules-profile-sublist__item-btn:focus,.neeto-molecules-profile-sublist__item-btn:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-profile-sublist__item-btn--style-danger{color:rgb(var(--neeto-ui-error-800))}.neeto-molecules-profile-sublist__item-btn-icon{color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-profile-sublist__item-btn-icon svg{height:20px;width:20px}.neeto-molecules-help-sublist__item-btn{border-radius:0;color:rgb(var(--neeto-ui-gray-800));cursor:pointer;display:flex;font-size:var(--neeto-ui-text-sm);font-weight:var(--neeto-ui-font-normal);gap:8px;justify-content:flex-end;line-height:1.143;min-height:32px;outline-color:transparent;padding:6px 40px 6px 12px;position:relative;text-decoration:none;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.neeto-molecules-help-sublist__item-btn.disabled{color:rgb(var(--neeto-ui-gray-500));cursor:not-allowed}.neeto-molecules-help-sublist__item-btn:focus,.neeto-molecules-help-sublist__item-btn:hover{background-color:rgb(var(--neeto-ui-gray-200));box-shadow:none}.neeto-molecules-help-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn--style-danger{color:rgb(var(--neeto-ui-error-800))}.neeto-molecules-help-sublist__item-btn-icon{color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-help-sublist__item-btn-icon svg{height:20px;width:20px}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.neeto-molecules-help-sublist__item-btn-count{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.neeto-molecules-sidebar__notif-count{position:absolute;right:-2px;top:-2px}";
|
|
31758
31782
|
n(css,{});
|
|
31759
31783
|
|
|
31760
31784
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -31770,7 +31794,9 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31770
31794
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31771
31795
|
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31772
31796
|
};
|
|
31773
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
31797
|
+
return /*#__PURE__*/React__default["default"].createElement(NavIconWrapper, {
|
|
31798
|
+
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31799
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31774
31800
|
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--app-switcher neeto-molecules-sidebar__link--button neeto-ui-flex neeto-ui-w-full neeto-ui-select-none neeto-ui-items-center neeto-ui-justify-start neeto-ui-shadow-none",
|
|
31775
31801
|
"data-cy": "app-switcher-button",
|
|
31776
31802
|
onClick: handleAppSwitcherToggle,
|
|
@@ -31781,12 +31807,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31781
31807
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31782
31808
|
}, hasHovered && isFreshLoading ? /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
31783
31809
|
size: 24
|
|
31784
|
-
}))
|
|
31785
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31786
|
-
component: "span",
|
|
31787
|
-
style: "body2",
|
|
31788
|
-
weight: "normal"
|
|
31789
|
-
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31810
|
+
}))));
|
|
31790
31811
|
};
|
|
31791
31812
|
|
|
31792
31813
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31804,7 +31825,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31804
31825
|
}
|
|
31805
31826
|
},
|
|
31806
31827
|
helpCenterProps: {
|
|
31807
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.
|
|
31828
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.helpCenter"),
|
|
31808
31829
|
icon: neetoIcons.Book,
|
|
31809
31830
|
"data-cy": "help-link-help-center-button",
|
|
31810
31831
|
href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
|
|
@@ -31865,24 +31886,21 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
31865
31886
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31866
31887
|
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31867
31888
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31868
|
-
className: "neeto-molecules-
|
|
31889
|
+
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-left",
|
|
31869
31890
|
"data-cy": "profile-section",
|
|
31870
31891
|
ref: ref,
|
|
31871
31892
|
onMouseEnter: function onMouseEnter() {
|
|
31872
31893
|
return setHasHovered(true);
|
|
31873
31894
|
}
|
|
31895
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31896
|
+
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31874
31897
|
}, isFreshLoading && hasHovered ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31875
31898
|
className: "flex h-11 w-10 items-center justify-center"
|
|
31876
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null)) : /*#__PURE__*/React__default["default"].createElement(
|
|
31877
|
-
className: "neeto-ui-flex-shrink-0
|
|
31878
|
-
size: "
|
|
31899
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null)) : /*#__PURE__*/React__default["default"].createElement(neetoui.Avatar, {
|
|
31900
|
+
className: "neeto-ui-flex-shrink-0",
|
|
31901
|
+
size: "large",
|
|
31879
31902
|
user: profileInfo
|
|
31880
|
-
})
|
|
31881
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
31882
|
-
component: "span",
|
|
31883
|
-
style: "body2",
|
|
31884
|
-
weight: "normal"
|
|
31885
|
-
}, pure.truncate(profileInfo.name, 18))));
|
|
31903
|
+
})));
|
|
31886
31904
|
};
|
|
31887
31905
|
var ProfileSection$1 = /*#__PURE__*/React.forwardRef(ProfileSection);
|
|
31888
31906
|
|
|
@@ -31902,50 +31920,7 @@ function _toConsumableArray(arr) {
|
|
|
31902
31920
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
31903
31921
|
}
|
|
31904
31922
|
|
|
31905
|
-
function _typeof(obj) {
|
|
31906
|
-
"@babel/helpers - typeof";
|
|
31907
|
-
|
|
31908
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
31909
|
-
return typeof obj;
|
|
31910
|
-
} : function (obj) {
|
|
31911
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
31912
|
-
}, _typeof(obj);
|
|
31913
|
-
}
|
|
31914
|
-
|
|
31915
|
-
function _toPrimitive(input, hint) {
|
|
31916
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
31917
|
-
var prim = input[Symbol.toPrimitive];
|
|
31918
|
-
if (prim !== undefined) {
|
|
31919
|
-
var res = prim.call(input, hint || "default");
|
|
31920
|
-
if (_typeof(res) !== "object") return res;
|
|
31921
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31922
|
-
}
|
|
31923
|
-
return (hint === "string" ? String : Number)(input);
|
|
31924
|
-
}
|
|
31925
|
-
|
|
31926
|
-
function _toPropertyKey(arg) {
|
|
31927
|
-
var key = _toPrimitive(arg, "string");
|
|
31928
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
31929
|
-
}
|
|
31930
|
-
|
|
31931
|
-
function _defineProperty(obj, key, value) {
|
|
31932
|
-
key = _toPropertyKey(key);
|
|
31933
|
-
if (key in obj) {
|
|
31934
|
-
Object.defineProperty(obj, key, {
|
|
31935
|
-
value: value,
|
|
31936
|
-
enumerable: true,
|
|
31937
|
-
configurable: true,
|
|
31938
|
-
writable: true
|
|
31939
|
-
});
|
|
31940
|
-
} else {
|
|
31941
|
-
obj[key] = value;
|
|
31942
|
-
}
|
|
31943
|
-
return obj;
|
|
31944
|
-
}
|
|
31945
|
-
|
|
31946
31923
|
var _excluded$2 = ["onClick", "label", "icon"];
|
|
31947
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31948
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31949
31924
|
var LinkSection = function LinkSection(_ref) {
|
|
31950
31925
|
var links = _ref.links;
|
|
31951
31926
|
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
@@ -31956,20 +31931,22 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31956
31931
|
_ref2$icon = _ref2.icon,
|
|
31957
31932
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31958
31933
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
31934
|
+
var IconSVG = icon;
|
|
31959
31935
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
31960
31936
|
className: "neeto-molecules-profile-sublist__item",
|
|
31961
31937
|
key: idx
|
|
31962
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31963
|
-
fullWidth: true,
|
|
31964
|
-
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31965
|
-
iconPosition: "left",
|
|
31966
|
-
iconSize: 18,
|
|
31967
|
-
style: "text"
|
|
31968
|
-
}, _objectSpread$2({
|
|
31969
|
-
icon: icon,
|
|
31970
|
-
label: label,
|
|
31938
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", _extends({
|
|
31971
31939
|
onClick: onClick
|
|
31972
|
-
}, otherProps
|
|
31940
|
+
}, otherProps, {
|
|
31941
|
+
className: "neeto-molecules-profile-sublist__item-btn"
|
|
31942
|
+
}), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31943
|
+
className: "neeto-molecules-profile-sublist__item-btn-icon"
|
|
31944
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31945
|
+
className: "neeto-molecules-profile-sublist__item-btn-label",
|
|
31946
|
+
component: "span",
|
|
31947
|
+
style: "body2",
|
|
31948
|
+
weight: "normal"
|
|
31949
|
+
}, label)));
|
|
31973
31950
|
}));
|
|
31974
31951
|
};
|
|
31975
31952
|
|
|
@@ -32038,27 +32015,63 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
32038
32015
|
};
|
|
32039
32016
|
|
|
32040
32017
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
32041
|
-
_ref.changesCount;
|
|
32042
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
32043
|
-
t = _useTranslation.t;
|
|
32044
|
-
var showChangesCount = false;
|
|
32018
|
+
var changesCount = _ref.changesCount;
|
|
32045
32019
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
32046
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none
|
|
32020
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
32047
32021
|
"data-cy": "help-button",
|
|
32048
32022
|
ref: ref
|
|
32049
32023
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32050
32024
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
32051
32025
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
32052
32026
|
size: 24
|
|
32053
|
-
}),
|
|
32054
|
-
className: "neeto-molecules-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
weight: "normal"
|
|
32058
|
-
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
32027
|
+
}), pure.isPresent(changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32028
|
+
className: "neeto-molecules-sidebar__notif-count",
|
|
32029
|
+
"data-testid": "help-icon-changes-count"
|
|
32030
|
+
}, changesCount)));
|
|
32059
32031
|
};
|
|
32060
32032
|
var HelpSection$1 = /*#__PURE__*/React.forwardRef(HelpSection);
|
|
32061
32033
|
|
|
32034
|
+
function _typeof(obj) {
|
|
32035
|
+
"@babel/helpers - typeof";
|
|
32036
|
+
|
|
32037
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
32038
|
+
return typeof obj;
|
|
32039
|
+
} : function (obj) {
|
|
32040
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
32041
|
+
}, _typeof(obj);
|
|
32042
|
+
}
|
|
32043
|
+
|
|
32044
|
+
function _toPrimitive(input, hint) {
|
|
32045
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
32046
|
+
var prim = input[Symbol.toPrimitive];
|
|
32047
|
+
if (prim !== undefined) {
|
|
32048
|
+
var res = prim.call(input, hint || "default");
|
|
32049
|
+
if (_typeof(res) !== "object") return res;
|
|
32050
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
32051
|
+
}
|
|
32052
|
+
return (hint === "string" ? String : Number)(input);
|
|
32053
|
+
}
|
|
32054
|
+
|
|
32055
|
+
function _toPropertyKey(arg) {
|
|
32056
|
+
var key = _toPrimitive(arg, "string");
|
|
32057
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
32058
|
+
}
|
|
32059
|
+
|
|
32060
|
+
function _defineProperty(obj, key, value) {
|
|
32061
|
+
key = _toPropertyKey(key);
|
|
32062
|
+
if (key in obj) {
|
|
32063
|
+
Object.defineProperty(obj, key, {
|
|
32064
|
+
value: value,
|
|
32065
|
+
enumerable: true,
|
|
32066
|
+
configurable: true,
|
|
32067
|
+
writable: true
|
|
32068
|
+
});
|
|
32069
|
+
} else {
|
|
32070
|
+
obj[key] = value;
|
|
32071
|
+
}
|
|
32072
|
+
return obj;
|
|
32073
|
+
}
|
|
32074
|
+
|
|
32062
32075
|
var _excluded$1 = ["label"];
|
|
32063
32076
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32064
32077
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -32068,7 +32081,6 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32068
32081
|
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
32069
32082
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32070
32083
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32071
|
-
var showChangesCount = false;
|
|
32072
32084
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32073
32085
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32074
32086
|
onClick: function onClick() {
|
|
@@ -32081,21 +32093,21 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32081
32093
|
var hide = _ref2.hide;
|
|
32082
32094
|
return !hide;
|
|
32083
32095
|
});
|
|
32084
|
-
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
32085
|
-
className: "neeto-molecules-help-sublist"
|
|
32086
|
-
}, helpLinks.map(function (_ref3, idx) {
|
|
32096
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", null, helpLinks.map(function (_ref3, idx) {
|
|
32087
32097
|
var label = _ref3.label,
|
|
32088
32098
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32089
32099
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
32090
32100
|
className: "neeto-molecules-help-sublist__item",
|
|
32091
32101
|
key: idx
|
|
32092
32102
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
32093
|
-
fullWidth: true,
|
|
32094
32103
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
32095
32104
|
iconPosition: "left",
|
|
32096
32105
|
iconSize: 18,
|
|
32097
32106
|
style: "text"
|
|
32098
|
-
}, buttonProps), label,
|
|
32107
|
+
}, buttonProps), label, pure.isPresent(buttonProps.changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32108
|
+
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
32109
|
+
"data-testid": "help-section-menu-changes-count"
|
|
32110
|
+
}, buttonProps.changesCount)));
|
|
32099
32111
|
}));
|
|
32100
32112
|
};
|
|
32101
32113
|
|
|
@@ -32124,7 +32136,7 @@ var Footer = function Footer(_ref) {
|
|
|
32124
32136
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32125
32137
|
}, []);
|
|
32126
32138
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32127
|
-
className: "neeto-molecules-sidebar__footer
|
|
32139
|
+
className: "neeto-molecules-sidebar__footer"
|
|
32128
32140
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32129
32141
|
interactive: true,
|
|
32130
32142
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32133,8 +32145,6 @@ var Footer = function Footer(_ref) {
|
|
|
32133
32145
|
helpLinkOverrides: helpLinkOverrides
|
|
32134
32146
|
}),
|
|
32135
32147
|
hideOnClick: false,
|
|
32136
|
-
interactiveDebounce: 30,
|
|
32137
|
-
offset: 0,
|
|
32138
32148
|
position: "right",
|
|
32139
32149
|
theme: "light"
|
|
32140
32150
|
}, /*#__PURE__*/React__default["default"].createElement(HelpSection$1, {
|
|
@@ -32148,10 +32158,10 @@ var Footer = function Footer(_ref) {
|
|
|
32148
32158
|
};
|
|
32149
32159
|
|
|
32150
32160
|
var Header = function Header() {
|
|
32151
|
-
var
|
|
32161
|
+
var _ProductLogos$logoNam;
|
|
32152
32162
|
var productName = globalProps.appName.substr(5);
|
|
32153
32163
|
var logoName = "Neeto".concat(pure.capitalize(productName.toLowerCase()));
|
|
32154
|
-
var
|
|
32164
|
+
var ProductLogo = (_ProductLogos$logoNam = ProductLogos__namespace[logoName]) !== null && _ProductLogos$logoNam !== void 0 ? _ProductLogos$logoNam : ProductLogos.Neeto;
|
|
32155
32165
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
32156
32166
|
data = _useFetchNeetoApps.data;
|
|
32157
32167
|
var homePath = "/";
|
|
@@ -32164,39 +32174,22 @@ var Header = function Header() {
|
|
|
32164
32174
|
}
|
|
32165
32175
|
}
|
|
32166
32176
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32167
|
-
className: "neeto-
|
|
32177
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-molecules-sidebar__header",
|
|
32168
32178
|
"data-cy": "sidebar-info"
|
|
32179
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32180
|
+
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32169
32181
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
32170
|
-
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32171
32182
|
to: homePath
|
|
32172
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
32183
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductLogo, null))));
|
|
32173
32184
|
};
|
|
32174
32185
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
32175
32186
|
|
|
32176
|
-
var
|
|
32177
|
-
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32178
|
-
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32179
|
-
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32180
|
-
return false;
|
|
32181
|
-
}
|
|
32182
|
-
var targetSearchParams = targetUrl.searchParams;
|
|
32183
|
-
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32184
|
-
return ramda.all(function (key) {
|
|
32185
|
-
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32186
|
-
}, targetSearchKeys);
|
|
32187
|
-
};
|
|
32188
|
-
|
|
32189
|
-
var _excluded = ["label", "to", "icon", "items"],
|
|
32190
|
-
_excluded2 = ["label", "to", "count"];
|
|
32187
|
+
var _excluded = ["label", "to", "icon", "description"];
|
|
32191
32188
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32192
32189
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
32193
32190
|
var Links = function Links(_ref) {
|
|
32194
32191
|
var navLinks = _ref.navLinks;
|
|
32195
32192
|
var location = reactRouterDom.useLocation();
|
|
32196
|
-
var _useState = React.useState(true),
|
|
32197
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32198
|
-
isActiveLinkExpanded = _useState2[0],
|
|
32199
|
-
setIsActiveLinkExpanded = _useState2[1];
|
|
32200
32193
|
var filterByPermissions = ramda.curry(function (_ref2) {
|
|
32201
32194
|
var permissions = _ref2.permissions;
|
|
32202
32195
|
if (permissions) {
|
|
@@ -32204,79 +32197,33 @@ var Links = function Links(_ref) {
|
|
|
32204
32197
|
}
|
|
32205
32198
|
return true;
|
|
32206
32199
|
});
|
|
32207
|
-
var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
|
|
32208
|
-
if (pure.isNotPresent(items)) return;
|
|
32209
|
-
if (isActive()) {
|
|
32210
|
-
setIsActiveLinkExpanded(ramda.not);
|
|
32211
|
-
event.preventDefault();
|
|
32212
|
-
return;
|
|
32213
|
-
}
|
|
32214
|
-
setIsActiveLinkExpanded(true);
|
|
32215
|
-
};
|
|
32216
32200
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32217
|
-
className: "neeto-molecules-sidebar__links
|
|
32201
|
+
className: "neeto-molecules-sidebar__links"
|
|
32218
32202
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32219
32203
|
var label = _ref3.label,
|
|
32220
32204
|
to = _ref3.to,
|
|
32221
32205
|
icon = _ref3.icon,
|
|
32222
|
-
|
|
32206
|
+
description = _ref3.description,
|
|
32223
32207
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32224
32208
|
var IconSVG = icon;
|
|
32225
32209
|
var url = new URL(to, window.location.href);
|
|
32226
32210
|
var isActive = function isActive() {
|
|
32227
|
-
return
|
|
32211
|
+
return location.pathname.startsWith(url.pathname);
|
|
32228
32212
|
};
|
|
32229
|
-
|
|
32230
|
-
|
|
32213
|
+
return /*#__PURE__*/React__default["default"].createElement(NavIconWrapper, {
|
|
32214
|
+
description: description,
|
|
32215
|
+
label: label,
|
|
32231
32216
|
key: mainIndex
|
|
32232
32217
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32233
32218
|
activeClassName: "active",
|
|
32234
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32235
|
-
onClick: function onClick(event) {
|
|
32236
|
-
return handleNavLinkClick(event, isActive, items);
|
|
32237
|
-
}
|
|
32219
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32238
32220
|
}, _objectSpread({
|
|
32239
32221
|
isActive: isActive,
|
|
32240
32222
|
to: to
|
|
32241
|
-
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("
|
|
32242
|
-
className: "neeto-molecules-sidebar__link-icon",
|
|
32223
|
+
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32224
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-molecules-sidebar__link-icon",
|
|
32243
32225
|
"data-testid": label
|
|
32244
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))
|
|
32245
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
32246
|
-
component: "span",
|
|
32247
|
-
style: "body2",
|
|
32248
|
-
weight: "normal"
|
|
32249
|
-
}, label), items && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32250
|
-
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
32251
|
-
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
32252
|
-
})
|
|
32253
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
|
|
32254
|
-
size: 16
|
|
32255
|
-
}))), items && isMenuExpanded && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32256
|
-
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32257
|
-
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
32258
|
-
var subLabel = _ref4.label,
|
|
32259
|
-
subRoute = _ref4.to,
|
|
32260
|
-
count = _ref4.count,
|
|
32261
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32262
|
-
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32263
|
-
activeClassName: "active",
|
|
32264
|
-
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32265
|
-
isActive: function isActive() {
|
|
32266
|
-
return isSubRouteActive(subRoute, location);
|
|
32267
|
-
},
|
|
32268
|
-
key: subIndex,
|
|
32269
|
-
to: subRoute
|
|
32270
|
-
}, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32271
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32272
|
-
component: "span",
|
|
32273
|
-
style: "body2"
|
|
32274
|
-
}, subLabel), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32275
|
-
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32276
|
-
component: "span",
|
|
32277
|
-
style: "body2"
|
|
32278
|
-
}, count > 999 ? "999+" : count));
|
|
32279
|
-
})));
|
|
32226
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))));
|
|
32280
32227
|
}));
|
|
32281
32228
|
};
|
|
32282
32229
|
|
|
@@ -32294,25 +32241,15 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32294
32241
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32295
32242
|
isAppSwitcherOpen = _useState2[0],
|
|
32296
32243
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32297
|
-
var _useState3 = React.useState(false),
|
|
32298
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32299
|
-
isSidebarCollapsed = _useState4[0],
|
|
32300
|
-
setIsSidebarCollapsed = _useState4[1];
|
|
32301
32244
|
var location = reactRouterDom.useLocation();
|
|
32302
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
32303
|
-
t = _useTranslation.t;
|
|
32304
32245
|
React.useEffect(function () {
|
|
32305
32246
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32306
32247
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32307
32248
|
}, [location]);
|
|
32308
32249
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32309
|
-
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32310
|
-
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32311
|
-
})
|
|
32312
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32313
|
-
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",
|
|
32314
32250
|
"data-cy": "sidebar-wrapper",
|
|
32315
|
-
"data-testid": "sidebar"
|
|
32251
|
+
"data-testid": "sidebar",
|
|
32252
|
+
className: classnames("neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden", "neeto-molecules-sidebar--collapsed")
|
|
32316
32253
|
}, /*#__PURE__*/React__default["default"].createElement(Header$1, null), /*#__PURE__*/React__default["default"].createElement(Links, {
|
|
32317
32254
|
navLinks: navLinks
|
|
32318
32255
|
}), /*#__PURE__*/React__default["default"].createElement(Footer, {
|
|
@@ -32323,20 +32260,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32323
32260
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32324
32261
|
return setIsAppSwitcherOpen(ramda.not);
|
|
32325
32262
|
}
|
|
32326
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
32327
|
-
className: "neeto-molecules-sidebar__toggler-wrapper"
|
|
32328
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
32329
|
-
className: "neeto-molecules-sidebar__toggler",
|
|
32330
|
-
icon: Chevron,
|
|
32331
|
-
style: "text",
|
|
32332
|
-
tooltipProps: {
|
|
32333
|
-
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32334
|
-
position: "bottom"
|
|
32335
|
-
},
|
|
32336
|
-
onClick: function onClick() {
|
|
32337
|
-
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32338
|
-
}
|
|
32339
|
-
}))), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcher, {
|
|
32263
|
+
})), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcher, {
|
|
32340
32264
|
isOpen: isAppSwitcherOpen,
|
|
32341
32265
|
onClose: function onClose() {
|
|
32342
32266
|
return setIsAppSwitcherOpen(false);
|