@bigbinary/neeto-molecules 1.0.78 → 1.0.79-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomain.cjs.js +19 -28
- package/dist/CustomDomain.cjs.js.map +1 -1
- package/dist/CustomDomain.js +21 -30
- package/dist/CustomDomain.js.map +1 -1
- package/dist/CustomDomainDashboard.cjs.js +31 -53
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +34 -56
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +10 -23
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +13 -26
- 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 +5 -1
- package/dist/Scrollable.cjs.js.map +1 -1
- package/dist/Scrollable.js +5 -1
- package/dist/Scrollable.js.map +1 -1
- package/dist/Sidebar.cjs.js +213 -135
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +216 -138
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.cjs.js +1 -1
- package/dist/SubHeader.js +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +12 -7
- package/types/Sidebar.d.ts +1 -1
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');
|
|
4
5
|
var ramda = require('ramda');
|
|
6
|
+
var reactI18next = require('react-i18next');
|
|
5
7
|
var reactRouterDom = require('react-router-dom');
|
|
6
8
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
7
9
|
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 ProductTypefaceLogos = require('@bigbinary/neeto-icons/typeface-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 ProductTypefaceLogos__namespace = /*#__PURE__*/_interopNamespace(ProductTypefaceLogos);
|
|
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:240px;overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;position:relative;width:calc(100% - 240px)}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__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,42 +31743,18 @@ 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
|
-
|
|
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));
|
|
31761
|
-
};
|
|
31762
|
-
var FeaturedTooltip$1 = /*#__PURE__*/React__default["default"].memo(FeaturedTooltip);
|
|
31763
|
-
|
|
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);
|
|
31746
|
+
var Chevron = function Chevron() {
|
|
31747
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
31748
|
+
height: "16",
|
|
31749
|
+
viewBox: "0 0 16 16",
|
|
31750
|
+
width: "16"
|
|
31751
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
31752
|
+
d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
|
|
31753
|
+
fill: "currentColor"
|
|
31754
|
+
}));
|
|
31779
31755
|
};
|
|
31780
31756
|
|
|
31781
|
-
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-
|
|
31757
|
+
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-z-index:99998}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scale(-1)}.neeto-molecules-sidebar__wrapper:hover .neeto-molecules-sidebar__toggler{opacity:1}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler-wrapper{bottom:0;left:100%;top:0;width:40px}.neeto-molecules-sidebar__toggler,.neeto-molecules-sidebar__toggler-wrapper{position:absolute;z-index:99996;z-index:calc(var(--neeto-molecules-sidebar-z-index) - 2)}.neeto-molecules-sidebar__toggler{left:4px;opacity:0;top:34px}.neeto-molecules-sidebar__toggler:focus{opacity:1}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:8px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link:not(:first-child){margin-top:10px}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:none}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-name{flex-grow:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:focus,.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:focus-visible,.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:var(--neeto-ui-shadow-xs)!important}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}";
|
|
31782
31758
|
n(css,{});
|
|
31783
31759
|
|
|
31784
31760
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -31794,9 +31770,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31794
31770
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31795
31771
|
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31796
31772
|
};
|
|
31797
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
31798
|
-
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31799
|
-
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31773
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31800
31774
|
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--app-switcher neeto-molecules-sidebar__link--button neeto-ui-flex neeto-ui-w-full neeto-ui-select-none neeto-ui-items-center neeto-ui-justify-start neeto-ui-shadow-none",
|
|
31801
31775
|
"data-cy": "app-switcher-button",
|
|
31802
31776
|
onClick: handleAppSwitcherToggle,
|
|
@@ -31807,7 +31781,12 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31807
31781
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31808
31782
|
}, hasHovered && isFreshLoading ? /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
31809
31783
|
size: 24
|
|
31810
|
-
}))
|
|
31784
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31785
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31786
|
+
component: "span",
|
|
31787
|
+
style: "body2",
|
|
31788
|
+
weight: "normal"
|
|
31789
|
+
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31811
31790
|
};
|
|
31812
31791
|
|
|
31813
31792
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31825,7 +31804,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31825
31804
|
}
|
|
31826
31805
|
},
|
|
31827
31806
|
helpCenterProps: {
|
|
31828
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.
|
|
31807
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.helpArticles"),
|
|
31829
31808
|
icon: neetoIcons.Book,
|
|
31830
31809
|
"data-cy": "help-link-help-center-button",
|
|
31831
31810
|
href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
|
|
@@ -31886,21 +31865,26 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
31886
31865
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31887
31866
|
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31888
31867
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31889
|
-
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-
|
|
31868
|
+
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-lef",
|
|
31890
31869
|
"data-cy": "profile-section",
|
|
31891
31870
|
ref: ref,
|
|
31892
31871
|
onMouseEnter: function onMouseEnter() {
|
|
31893
31872
|
return setHasHovered(true);
|
|
31894
31873
|
}
|
|
31895
31874
|
}, /*#__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"
|
|
31875
|
+
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center neeto-molecules-sidebar__link"
|
|
31897
31876
|
}, isFreshLoading && hasHovered ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31898
31877
|
className: "flex h-11 w-10 items-center justify-center"
|
|
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: "
|
|
31878
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null)) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Avatar, {
|
|
31879
|
+
className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
|
|
31880
|
+
size: "small",
|
|
31902
31881
|
user: profileInfo
|
|
31903
|
-
})
|
|
31882
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31883
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31884
|
+
component: "span",
|
|
31885
|
+
style: "body2",
|
|
31886
|
+
weight: "normal"
|
|
31887
|
+
}, pure.truncate(profileInfo.name, 18)))));
|
|
31904
31888
|
};
|
|
31905
31889
|
var ProfileSection$1 = /*#__PURE__*/React.forwardRef(ProfileSection);
|
|
31906
31890
|
|
|
@@ -31920,7 +31904,50 @@ function _toConsumableArray(arr) {
|
|
|
31920
31904
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
31921
31905
|
}
|
|
31922
31906
|
|
|
31907
|
+
function _typeof(obj) {
|
|
31908
|
+
"@babel/helpers - typeof";
|
|
31909
|
+
|
|
31910
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
31911
|
+
return typeof obj;
|
|
31912
|
+
} : function (obj) {
|
|
31913
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
31914
|
+
}, _typeof(obj);
|
|
31915
|
+
}
|
|
31916
|
+
|
|
31917
|
+
function _toPrimitive(input, hint) {
|
|
31918
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
31919
|
+
var prim = input[Symbol.toPrimitive];
|
|
31920
|
+
if (prim !== undefined) {
|
|
31921
|
+
var res = prim.call(input, hint || "default");
|
|
31922
|
+
if (_typeof(res) !== "object") return res;
|
|
31923
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31924
|
+
}
|
|
31925
|
+
return (hint === "string" ? String : Number)(input);
|
|
31926
|
+
}
|
|
31927
|
+
|
|
31928
|
+
function _toPropertyKey(arg) {
|
|
31929
|
+
var key = _toPrimitive(arg, "string");
|
|
31930
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
31931
|
+
}
|
|
31932
|
+
|
|
31933
|
+
function _defineProperty(obj, key, value) {
|
|
31934
|
+
key = _toPropertyKey(key);
|
|
31935
|
+
if (key in obj) {
|
|
31936
|
+
Object.defineProperty(obj, key, {
|
|
31937
|
+
value: value,
|
|
31938
|
+
enumerable: true,
|
|
31939
|
+
configurable: true,
|
|
31940
|
+
writable: true
|
|
31941
|
+
});
|
|
31942
|
+
} else {
|
|
31943
|
+
obj[key] = value;
|
|
31944
|
+
}
|
|
31945
|
+
return obj;
|
|
31946
|
+
}
|
|
31947
|
+
|
|
31923
31948
|
var _excluded$2 = ["onClick", "label", "icon"];
|
|
31949
|
+
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; }
|
|
31950
|
+
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; }
|
|
31924
31951
|
var LinkSection = function LinkSection(_ref) {
|
|
31925
31952
|
var links = _ref.links;
|
|
31926
31953
|
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
@@ -31931,22 +31958,20 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31931
31958
|
_ref2$icon = _ref2.icon,
|
|
31932
31959
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31933
31960
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
31934
|
-
var IconSVG = icon;
|
|
31935
31961
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
31936
31962
|
className: "neeto-molecules-profile-sublist__item",
|
|
31937
31963
|
key: idx
|
|
31938
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31964
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
31965
|
+
fullWidth: true,
|
|
31966
|
+
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31967
|
+
iconPosition: "left",
|
|
31968
|
+
iconSize: 18,
|
|
31969
|
+
style: "text"
|
|
31970
|
+
}, _objectSpread$2({
|
|
31971
|
+
icon: icon,
|
|
31972
|
+
label: label,
|
|
31939
31973
|
onClick: onClick
|
|
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)));
|
|
31974
|
+
}, otherProps))));
|
|
31950
31975
|
}));
|
|
31951
31976
|
};
|
|
31952
31977
|
|
|
@@ -32014,63 +32039,27 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
32014
32039
|
};
|
|
32015
32040
|
|
|
32016
32041
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
32017
|
-
|
|
32042
|
+
_ref.changesCount;
|
|
32043
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
32044
|
+
t = _useTranslation.t;
|
|
32045
|
+
var showChangesCount = false;
|
|
32018
32046
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
32019
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
32047
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none",
|
|
32020
32048
|
"data-cy": "help-button",
|
|
32021
32049
|
ref: ref
|
|
32022
32050
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32023
32051
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
32024
32052
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
32025
32053
|
size: 24
|
|
32026
|
-
}),
|
|
32027
|
-
className: "neeto-molecules-
|
|
32028
|
-
|
|
32029
|
-
|
|
32054
|
+
}), showChangesCount ), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32055
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32056
|
+
component: "span",
|
|
32057
|
+
style: "body2",
|
|
32058
|
+
weight: "normal"
|
|
32059
|
+
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
32030
32060
|
};
|
|
32031
32061
|
var HelpSection$1 = /*#__PURE__*/React.forwardRef(HelpSection);
|
|
32032
32062
|
|
|
32033
|
-
function _typeof(obj) {
|
|
32034
|
-
"@babel/helpers - typeof";
|
|
32035
|
-
|
|
32036
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
32037
|
-
return typeof obj;
|
|
32038
|
-
} : function (obj) {
|
|
32039
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
32040
|
-
}, _typeof(obj);
|
|
32041
|
-
}
|
|
32042
|
-
|
|
32043
|
-
function _toPrimitive(input, hint) {
|
|
32044
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
32045
|
-
var prim = input[Symbol.toPrimitive];
|
|
32046
|
-
if (prim !== undefined) {
|
|
32047
|
-
var res = prim.call(input, hint || "default");
|
|
32048
|
-
if (_typeof(res) !== "object") return res;
|
|
32049
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
32050
|
-
}
|
|
32051
|
-
return (hint === "string" ? String : Number)(input);
|
|
32052
|
-
}
|
|
32053
|
-
|
|
32054
|
-
function _toPropertyKey(arg) {
|
|
32055
|
-
var key = _toPrimitive(arg, "string");
|
|
32056
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
32057
|
-
}
|
|
32058
|
-
|
|
32059
|
-
function _defineProperty(obj, key, value) {
|
|
32060
|
-
key = _toPropertyKey(key);
|
|
32061
|
-
if (key in obj) {
|
|
32062
|
-
Object.defineProperty(obj, key, {
|
|
32063
|
-
value: value,
|
|
32064
|
-
enumerable: true,
|
|
32065
|
-
configurable: true,
|
|
32066
|
-
writable: true
|
|
32067
|
-
});
|
|
32068
|
-
} else {
|
|
32069
|
-
obj[key] = value;
|
|
32070
|
-
}
|
|
32071
|
-
return obj;
|
|
32072
|
-
}
|
|
32073
|
-
|
|
32074
32063
|
var _excluded$1 = ["label"];
|
|
32075
32064
|
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; }
|
|
32076
32065
|
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; }
|
|
@@ -32080,6 +32069,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32080
32069
|
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
32081
32070
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32082
32071
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32072
|
+
var showChangesCount = false;
|
|
32083
32073
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32084
32074
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32085
32075
|
onClick: function onClick() {
|
|
@@ -32092,21 +32082,21 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32092
32082
|
var hide = _ref2.hide;
|
|
32093
32083
|
return !hide;
|
|
32094
32084
|
});
|
|
32095
|
-
return /*#__PURE__*/React__default["default"].createElement("ul",
|
|
32085
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
32086
|
+
className: "neeto-molecules-help-sublist"
|
|
32087
|
+
}, helpLinks.map(function (_ref3, idx) {
|
|
32096
32088
|
var label = _ref3.label,
|
|
32097
32089
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32098
32090
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
32099
32091
|
className: "neeto-molecules-help-sublist__item",
|
|
32100
32092
|
key: idx
|
|
32101
32093
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
32094
|
+
fullWidth: true,
|
|
32102
32095
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
32103
32096
|
iconPosition: "left",
|
|
32104
32097
|
iconSize: 18,
|
|
32105
32098
|
style: "text"
|
|
32106
|
-
}, buttonProps), label,
|
|
32107
|
-
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
32108
|
-
"data-testid": "help-section-menu-changes-count"
|
|
32109
|
-
}, buttonProps.changesCount)));
|
|
32099
|
+
}, buttonProps), label, showChangesCount ));
|
|
32110
32100
|
}));
|
|
32111
32101
|
};
|
|
32112
32102
|
|
|
@@ -32135,7 +32125,7 @@ var Footer = function Footer(_ref) {
|
|
|
32135
32125
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32136
32126
|
}, []);
|
|
32137
32127
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32138
|
-
className: "neeto-molecules-sidebar__footer"
|
|
32128
|
+
className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
|
|
32139
32129
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32140
32130
|
interactive: true,
|
|
32141
32131
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32144,6 +32134,8 @@ var Footer = function Footer(_ref) {
|
|
|
32144
32134
|
helpLinkOverrides: helpLinkOverrides
|
|
32145
32135
|
}),
|
|
32146
32136
|
hideOnClick: false,
|
|
32137
|
+
interactiveDebounce: 30,
|
|
32138
|
+
offset: 0,
|
|
32147
32139
|
position: "right",
|
|
32148
32140
|
theme: "light"
|
|
32149
32141
|
}, /*#__PURE__*/React__default["default"].createElement(HelpSection$1, {
|
|
@@ -32157,10 +32149,10 @@ var Footer = function Footer(_ref) {
|
|
|
32157
32149
|
};
|
|
32158
32150
|
|
|
32159
32151
|
var Header = function Header() {
|
|
32160
|
-
var
|
|
32152
|
+
var _ProductTypefaceLogos;
|
|
32161
32153
|
var productName = globalProps.appName.substr(5);
|
|
32162
32154
|
var logoName = "Neeto".concat(pure.capitalize(productName.toLowerCase()));
|
|
32163
|
-
var
|
|
32155
|
+
var ProductTypefaceLogo = (_ProductTypefaceLogos = ProductTypefaceLogos__namespace[logoName]) !== null && _ProductTypefaceLogos !== void 0 ? _ProductTypefaceLogos : ProductTypefaceLogos.Neeto;
|
|
32164
32156
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
32165
32157
|
data = _useFetchNeetoApps.data;
|
|
32166
32158
|
var homePath = "/";
|
|
@@ -32173,22 +32165,39 @@ var Header = function Header() {
|
|
|
32173
32165
|
}
|
|
32174
32166
|
}
|
|
32175
32167
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32176
|
-
className: "neeto-
|
|
32168
|
+
className: "neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable",
|
|
32177
32169
|
"data-cy": "sidebar-info"
|
|
32178
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32179
|
-
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32180
32170
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
32171
|
+
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32181
32172
|
to: homePath
|
|
32182
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
32173
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductTypefaceLogo, null)));
|
|
32183
32174
|
};
|
|
32184
32175
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
32185
32176
|
|
|
32186
|
-
var
|
|
32177
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
32178
|
+
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32179
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32180
|
+
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32181
|
+
return false;
|
|
32182
|
+
}
|
|
32183
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
32184
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32185
|
+
return ramda.all(function (key) {
|
|
32186
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32187
|
+
}, targetSearchKeys);
|
|
32188
|
+
};
|
|
32189
|
+
|
|
32190
|
+
var _excluded = ["label", "to", "icon", "items"],
|
|
32191
|
+
_excluded2 = ["label", "to", "count"];
|
|
32187
32192
|
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; }
|
|
32188
32193
|
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; }
|
|
32189
32194
|
var Links = function Links(_ref) {
|
|
32190
32195
|
var navLinks = _ref.navLinks;
|
|
32191
32196
|
var location = reactRouterDom.useLocation();
|
|
32197
|
+
var _useState = React.useState(true),
|
|
32198
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32199
|
+
isActiveLinkExpanded = _useState2[0],
|
|
32200
|
+
setIsActiveLinkExpanded = _useState2[1];
|
|
32192
32201
|
var filterByPermissions = ramda.curry(function (_ref2) {
|
|
32193
32202
|
var permissions = _ref2.permissions;
|
|
32194
32203
|
if (permissions) {
|
|
@@ -32196,33 +32205,79 @@ var Links = function Links(_ref) {
|
|
|
32196
32205
|
}
|
|
32197
32206
|
return true;
|
|
32198
32207
|
});
|
|
32208
|
+
var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
|
|
32209
|
+
if (pure.isNotPresent(items)) return;
|
|
32210
|
+
if (isActive()) {
|
|
32211
|
+
setIsActiveLinkExpanded(ramda.not);
|
|
32212
|
+
event.preventDefault();
|
|
32213
|
+
return;
|
|
32214
|
+
}
|
|
32215
|
+
setIsActiveLinkExpanded(true);
|
|
32216
|
+
};
|
|
32199
32217
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32200
|
-
className: "neeto-molecules-sidebar__links"
|
|
32218
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
|
|
32201
32219
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32202
32220
|
var label = _ref3.label,
|
|
32203
32221
|
to = _ref3.to,
|
|
32204
32222
|
icon = _ref3.icon,
|
|
32205
|
-
|
|
32223
|
+
items = _ref3.items,
|
|
32206
32224
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32207
32225
|
var IconSVG = icon;
|
|
32208
32226
|
var url = new URL(to, window.location.href);
|
|
32209
32227
|
var isActive = function isActive() {
|
|
32210
|
-
return location.pathname.startsWith(url.pathname);
|
|
32228
|
+
return ramda.is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
32211
32229
|
};
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
label: label,
|
|
32230
|
+
var isMenuExpanded = isActive() && isActiveLinkExpanded;
|
|
32231
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
32215
32232
|
key: mainIndex
|
|
32216
32233
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32217
32234
|
activeClassName: "active",
|
|
32218
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32235
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
32236
|
+
onClick: function onClick(event) {
|
|
32237
|
+
return handleNavLinkClick(event, isActive, items);
|
|
32238
|
+
}
|
|
32219
32239
|
}, _objectSpread({
|
|
32220
32240
|
isActive: isActive,
|
|
32221
32241
|
to: to
|
|
32222
|
-
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("
|
|
32223
|
-
className: "neeto-
|
|
32242
|
+
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32243
|
+
className: "neeto-molecules-sidebar__link-icon",
|
|
32224
32244
|
"data-testid": label
|
|
32225
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))
|
|
32245
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32246
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32247
|
+
component: "span",
|
|
32248
|
+
style: "body2",
|
|
32249
|
+
weight: "normal"
|
|
32250
|
+
}, label), items && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32251
|
+
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
32252
|
+
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
32253
|
+
})
|
|
32254
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
|
|
32255
|
+
size: 16
|
|
32256
|
+
}))), items && isMenuExpanded && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32257
|
+
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32258
|
+
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
32259
|
+
var subLabel = _ref4.label,
|
|
32260
|
+
subRoute = _ref4.to,
|
|
32261
|
+
count = _ref4.count,
|
|
32262
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32263
|
+
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32264
|
+
activeClassName: "active",
|
|
32265
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32266
|
+
isActive: function isActive() {
|
|
32267
|
+
return isSubRouteActive(subRoute, location);
|
|
32268
|
+
},
|
|
32269
|
+
key: subIndex,
|
|
32270
|
+
to: subRoute
|
|
32271
|
+
}, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32272
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32273
|
+
component: "span",
|
|
32274
|
+
style: "body2"
|
|
32275
|
+
}, subLabel), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32276
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32277
|
+
component: "span",
|
|
32278
|
+
style: "body2"
|
|
32279
|
+
}, count > 999 ? "999+" : count));
|
|
32280
|
+
})));
|
|
32226
32281
|
}));
|
|
32227
32282
|
};
|
|
32228
32283
|
|
|
@@ -32240,15 +32295,25 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32240
32295
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32241
32296
|
isAppSwitcherOpen = _useState2[0],
|
|
32242
32297
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32298
|
+
var _useState3 = React.useState(false),
|
|
32299
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32300
|
+
isSidebarCollapsed = _useState4[0],
|
|
32301
|
+
setIsSidebarCollapsed = _useState4[1];
|
|
32243
32302
|
var location = reactRouterDom.useLocation();
|
|
32303
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
32304
|
+
t = _useTranslation.t;
|
|
32244
32305
|
React.useEffect(function () {
|
|
32245
32306
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32246
32307
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32247
32308
|
}, [location]);
|
|
32248
32309
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32310
|
+
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32311
|
+
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32312
|
+
})
|
|
32313
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32314
|
+
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",
|
|
32249
32315
|
"data-cy": "sidebar-wrapper",
|
|
32250
|
-
"data-testid": "sidebar"
|
|
32251
|
-
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
|
+
"data-testid": "sidebar"
|
|
32252
32317
|
}, /*#__PURE__*/React__default["default"].createElement(Header$1, null), /*#__PURE__*/React__default["default"].createElement(Links, {
|
|
32253
32318
|
navLinks: navLinks
|
|
32254
32319
|
}), /*#__PURE__*/React__default["default"].createElement(Footer, {
|
|
@@ -32259,7 +32324,20 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32259
32324
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32260
32325
|
return setIsAppSwitcherOpen(ramda.not);
|
|
32261
32326
|
}
|
|
32262
|
-
})),
|
|
32327
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32328
|
+
className: "neeto-molecules-sidebar__toggler-wrapper"
|
|
32329
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
32330
|
+
className: "neeto-molecules-sidebar__toggler",
|
|
32331
|
+
icon: Chevron,
|
|
32332
|
+
style: "text",
|
|
32333
|
+
tooltipProps: {
|
|
32334
|
+
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32335
|
+
position: "bottom"
|
|
32336
|
+
},
|
|
32337
|
+
onClick: function onClick() {
|
|
32338
|
+
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32339
|
+
}
|
|
32340
|
+
}))), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcher, {
|
|
32263
32341
|
isOpen: isAppSwitcherOpen,
|
|
32264
32342
|
onClose: function onClose() {
|
|
32265
32343
|
return setIsAppSwitcherOpen(false);
|