@bigbinary/neeto-molecules 1.0.115 → 1.1.0
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/CustomDomainDashboard.cjs.js +23 -24
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +26 -27
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +21 -23
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +24 -26
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/NeetoWidget.cjs.js +52 -31
- package/dist/NeetoWidget.cjs.js.map +1 -1
- package/dist/NeetoWidget.js +54 -33
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Scrollable.cjs.js +5 -1
- package/dist/Scrollable.cjs.js.map +1 -1
- package/dist/Scrollable.js +5 -1
- package/dist/Scrollable.js.map +1 -1
- package/dist/Security.cjs.js +28 -25
- package/dist/Security.cjs.js.map +1 -1
- package/dist/Security.js +31 -28
- package/dist/Security.js.map +1 -1
- package/dist/Sidebar.cjs.js +251 -139
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +254 -142
- 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 +10 -3
- package/types/Header.d.ts +3 -2
- package/types/Sidebar.d.ts +2 -1
package/dist/Sidebar.cjs.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
5
|
-
var reactRouterDom = require('react-router-dom');
|
|
4
|
+
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
6
5
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
7
|
-
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
8
6
|
var neetoui = require('@bigbinary/neetoui');
|
|
7
|
+
var ramda = require('ramda');
|
|
9
8
|
var reactI18next = require('react-i18next');
|
|
9
|
+
var reactRouterDom = require('react-router-dom');
|
|
10
|
+
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
10
11
|
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
11
12
|
var AppIcons = require('@bigbinary/neeto-icons/app-icons');
|
|
12
13
|
var i18next = require('i18next');
|
|
13
14
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
14
15
|
var KeyboardShortcuts = require('@bigbinary/neeto-molecules/KeyboardShortcuts');
|
|
15
|
-
var
|
|
16
|
-
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
16
|
+
var ProductTypefaceLogos = require('@bigbinary/neeto-icons/typeface-logos');
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
@@ -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;
|
|
@@ -34087,7 +34087,7 @@ SwitchTransition.defaultProps = {
|
|
|
34087
34087
|
|
|
34088
34088
|
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}}
|
|
34089
34089
|
|
|
34090
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:
|
|
34090
|
+
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:0;overflow:hidden;position:fixed;top:0;z-index:99998}.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;width:100vw}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:40px;position:relative}.neeto-molecules-app-switcher__wrapper--collapsed{width:100vw}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__header h1{font-size:40px;line-height:var(--neeto-ui-leading-tight);margin-top:-16px}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
34091
34091
|
n(css$1,{});
|
|
34092
34092
|
|
|
34093
34093
|
function _extends() {
|
|
@@ -34215,7 +34215,7 @@ var Body = function Body(_ref) {
|
|
|
34215
34215
|
className: "neeto-molecules-app-switcher__header",
|
|
34216
34216
|
"data-cy": "app-switcher-body-wrapper"
|
|
34217
34217
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34218
|
-
style: "
|
|
34218
|
+
style: "h1"
|
|
34219
34219
|
}, t("neetoMolecules.appSwitcher.chooseNeetoProduct")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34220
34220
|
className: "neeto-molecules-app-switcher__search-wrapper"
|
|
34221
34221
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
@@ -34292,7 +34292,8 @@ var useOnClickOutside = function useOnClickOutside(insideRef, outsideRef, handle
|
|
|
34292
34292
|
|
|
34293
34293
|
var AppSwitcher = function AppSwitcher(_ref) {
|
|
34294
34294
|
var isOpen = _ref.isOpen,
|
|
34295
|
-
onClose = _ref.onClose
|
|
34295
|
+
onClose = _ref.onClose,
|
|
34296
|
+
isSidebarCollapsed = _ref.isSidebarCollapsed;
|
|
34296
34297
|
var paneWrapper = React.useRef(null);
|
|
34297
34298
|
var backdropRef = React.useRef(null);
|
|
34298
34299
|
useOnClickOutside(paneWrapper, backdropRef, onClose);
|
|
@@ -34309,56 +34310,38 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
34309
34310
|
"in": isOpen,
|
|
34310
34311
|
timeout: 300
|
|
34311
34312
|
}, /*#__PURE__*/React__default["default"].createElement(Backdrop$1, {
|
|
34312
|
-
className: "neeto-molecules-app-switcher__backdrop",
|
|
34313
34313
|
key: "switcher-backdrop",
|
|
34314
|
-
ref: backdropRef
|
|
34314
|
+
ref: backdropRef,
|
|
34315
|
+
className: classnames("neeto-molecules-app-switcher__backdrop", {
|
|
34316
|
+
"neeto-molecules-app-switcher__backdrop--collapsed": isSidebarCollapsed
|
|
34317
|
+
})
|
|
34315
34318
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34316
|
-
className: "neeto-molecules-app-switcher__wrapper",
|
|
34317
34319
|
"data-cy": "switcher-wrapper",
|
|
34318
34320
|
"data-testid": "switcher-wrapper",
|
|
34319
34321
|
key: "switcher-wrapper",
|
|
34320
|
-
ref: paneWrapper
|
|
34322
|
+
ref: paneWrapper,
|
|
34323
|
+
className: classnames("neeto-molecules-app-switcher__wrapper", {
|
|
34324
|
+
"neeto-molecules-app-switcher__wrapper--collapsed": isSidebarCollapsed
|
|
34325
|
+
})
|
|
34321
34326
|
}, /*#__PURE__*/React__default["default"].createElement(Body, {
|
|
34322
34327
|
onClose: onClose
|
|
34323
34328
|
})))));
|
|
34324
34329
|
};
|
|
34325
34330
|
|
|
34326
|
-
var
|
|
34327
|
-
var
|
|
34328
|
-
|
|
34329
|
-
|
|
34330
|
-
|
|
34331
|
-
|
|
34332
|
-
|
|
34333
|
-
|
|
34334
|
-
|
|
34335
|
-
|
|
34336
|
-
}
|
|
34337
|
-
className: "neeto-ui-text-center neeto-ui-text-gray-400 sidebar-featured-tooltip__description",
|
|
34338
|
-
lineHeight: "normal",
|
|
34339
|
-
style: "body3"
|
|
34340
|
-
}, description));
|
|
34341
|
-
};
|
|
34342
|
-
var FeaturedTooltip$1 = /*#__PURE__*/React__default["default"].memo(FeaturedTooltip);
|
|
34343
|
-
|
|
34344
|
-
var NavIconWrapper = function NavIconWrapper(_ref) {
|
|
34345
|
-
var description = _ref.description,
|
|
34346
|
-
label = _ref.label,
|
|
34347
|
-
children = _ref.children;
|
|
34348
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
34349
|
-
className: "sidebar-featured-tooltip__content",
|
|
34350
|
-
content: /*#__PURE__*/React__default["default"].createElement(FeaturedTooltip$1, {
|
|
34351
|
-
description: description,
|
|
34352
|
-
label: label
|
|
34353
|
-
}),
|
|
34354
|
-
delay: [400, 40],
|
|
34355
|
-
distance: "20rem",
|
|
34356
|
-
duration: [200, 200],
|
|
34357
|
-
position: "right"
|
|
34358
|
-
}, children);
|
|
34331
|
+
var Chevron = function Chevron(_ref) {
|
|
34332
|
+
var style = _ref.style;
|
|
34333
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
34334
|
+
height: "16",
|
|
34335
|
+
viewBox: "0 0 16 16",
|
|
34336
|
+
width: "16",
|
|
34337
|
+
style: style
|
|
34338
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
34339
|
+
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",
|
|
34340
|
+
fill: "currentColor"
|
|
34341
|
+
}));
|
|
34359
34342
|
};
|
|
34360
34343
|
|
|
34361
|
-
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-
|
|
34344
|
+
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}.neeto-molecules-sidebar__wrapper:hover .neeto-molecules-sidebar__toggler{opacity:1}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler-hover-area{bottom:0;left:100%;position:absolute;top:0;width:40px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__toggler{opacity:0;position:absolute;right:8px;top:8px;transition:opacity .3s ease-in-out;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__toggler:focus{opacity:1}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-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-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:16px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:16px}";
|
|
34362
34345
|
n(css,{});
|
|
34363
34346
|
|
|
34364
34347
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -34377,9 +34360,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
34377
34360
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
34378
34361
|
if (!data) event.stopPropagation();else onAppSwitcherToggle();
|
|
34379
34362
|
};
|
|
34380
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
34381
|
-
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
34382
|
-
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
34363
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
34383
34364
|
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",
|
|
34384
34365
|
"data-cy": "app-switcher-button",
|
|
34385
34366
|
"data-testid": "app-switcher-button",
|
|
@@ -34396,7 +34377,12 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
34396
34377
|
"data-testid": "app-switcher-button-loader"
|
|
34397
34378
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null)) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
34398
34379
|
size: 24
|
|
34399
|
-
}))
|
|
34380
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34381
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
34382
|
+
component: "span",
|
|
34383
|
+
style: "body2",
|
|
34384
|
+
weight: "normal"
|
|
34385
|
+
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
34400
34386
|
};
|
|
34401
34387
|
|
|
34402
34388
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -34414,7 +34400,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
34414
34400
|
}
|
|
34415
34401
|
},
|
|
34416
34402
|
helpCenterProps: {
|
|
34417
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.
|
|
34403
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.helpArticles"),
|
|
34418
34404
|
icon: neetoIcons.Book,
|
|
34419
34405
|
"data-cy": "help-link-help-center-button",
|
|
34420
34406
|
href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
|
|
@@ -34433,6 +34419,24 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
34433
34419
|
}
|
|
34434
34420
|
};
|
|
34435
34421
|
|
|
34422
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
34423
|
+
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
34424
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
34425
|
+
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
34426
|
+
return false;
|
|
34427
|
+
}
|
|
34428
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
34429
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
34430
|
+
return ramda.all(function (key) {
|
|
34431
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
34432
|
+
}, targetSearchKeys);
|
|
34433
|
+
};
|
|
34434
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
34435
|
+
var _globalProps$user, _globalProps$user2;
|
|
34436
|
+
var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
|
|
34437
|
+
return "sidebarState-".concat(user);
|
|
34438
|
+
};
|
|
34439
|
+
|
|
34436
34440
|
var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
34437
34441
|
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
|
|
34438
34442
|
return ramda.mergeDeepLeft(profileInfoOverrides, {
|
|
@@ -34459,6 +34463,7 @@ var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
|
34459
34463
|
label: i18next.t("neetoMolecules.sidebar.logout"),
|
|
34460
34464
|
onClick: function onClick() {
|
|
34461
34465
|
utils.resetAuthTokens();
|
|
34466
|
+
localStorage.removeItem(getSidebarStateLocalStorageKey());
|
|
34462
34467
|
window.location.href = "/logout";
|
|
34463
34468
|
},
|
|
34464
34469
|
"data-cy": "profile-logout-button"
|
|
@@ -34477,7 +34482,7 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
34477
34482
|
isLoading = _useFetchNeetoApps.isLoading,
|
|
34478
34483
|
isStale = _useFetchNeetoApps.isStale;
|
|
34479
34484
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
34480
|
-
className: "neeto-molecules-
|
|
34485
|
+
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",
|
|
34481
34486
|
"data-cy": "profile-section",
|
|
34482
34487
|
"data-testid": "profile-section",
|
|
34483
34488
|
ref: ref,
|
|
@@ -34487,17 +34492,19 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
34487
34492
|
setHasHovered(true);
|
|
34488
34493
|
}
|
|
34489
34494
|
}
|
|
34490
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
34491
|
-
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
34492
34495
|
}, isLoading && hasHovered ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
34493
|
-
className: "flex h-10 w-10 items-center justify-center",
|
|
34494
34496
|
"data-testid": "profile-avatar-loader"
|
|
34495
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null)) : /*#__PURE__*/React__default["default"].createElement(neetoui.Avatar, {
|
|
34496
|
-
className: "neeto-ui-flex-shrink-0",
|
|
34497
|
+
}, /*#__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, {
|
|
34498
|
+
className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
|
|
34497
34499
|
"data-testid": "profile-avatar",
|
|
34498
|
-
size: "
|
|
34500
|
+
size: "small",
|
|
34499
34501
|
user: profileInfo
|
|
34500
|
-
})
|
|
34502
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34503
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
34504
|
+
component: "span",
|
|
34505
|
+
style: "body2",
|
|
34506
|
+
weight: "normal"
|
|
34507
|
+
}, pure.truncate(profileInfo.name, 18))));
|
|
34501
34508
|
};
|
|
34502
34509
|
var ProfileSection$1 = /*#__PURE__*/React.forwardRef(ProfileSection);
|
|
34503
34510
|
|
|
@@ -34517,7 +34524,50 @@ function _toConsumableArray(arr) {
|
|
|
34517
34524
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
34518
34525
|
}
|
|
34519
34526
|
|
|
34527
|
+
function _typeof(obj) {
|
|
34528
|
+
"@babel/helpers - typeof";
|
|
34529
|
+
|
|
34530
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
34531
|
+
return typeof obj;
|
|
34532
|
+
} : function (obj) {
|
|
34533
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
34534
|
+
}, _typeof(obj);
|
|
34535
|
+
}
|
|
34536
|
+
|
|
34537
|
+
function _toPrimitive(input, hint) {
|
|
34538
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
34539
|
+
var prim = input[Symbol.toPrimitive];
|
|
34540
|
+
if (prim !== undefined) {
|
|
34541
|
+
var res = prim.call(input, hint || "default");
|
|
34542
|
+
if (_typeof(res) !== "object") return res;
|
|
34543
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
34544
|
+
}
|
|
34545
|
+
return (hint === "string" ? String : Number)(input);
|
|
34546
|
+
}
|
|
34547
|
+
|
|
34548
|
+
function _toPropertyKey(arg) {
|
|
34549
|
+
var key = _toPrimitive(arg, "string");
|
|
34550
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
34551
|
+
}
|
|
34552
|
+
|
|
34553
|
+
function _defineProperty(obj, key, value) {
|
|
34554
|
+
key = _toPropertyKey(key);
|
|
34555
|
+
if (key in obj) {
|
|
34556
|
+
Object.defineProperty(obj, key, {
|
|
34557
|
+
value: value,
|
|
34558
|
+
enumerable: true,
|
|
34559
|
+
configurable: true,
|
|
34560
|
+
writable: true
|
|
34561
|
+
});
|
|
34562
|
+
} else {
|
|
34563
|
+
obj[key] = value;
|
|
34564
|
+
}
|
|
34565
|
+
return obj;
|
|
34566
|
+
}
|
|
34567
|
+
|
|
34520
34568
|
var _excluded$2 = ["onClick", "label", "icon"];
|
|
34569
|
+
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; }
|
|
34570
|
+
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; }
|
|
34521
34571
|
var LinkSection = function LinkSection(_ref) {
|
|
34522
34572
|
var links = _ref.links;
|
|
34523
34573
|
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
@@ -34528,22 +34578,20 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
34528
34578
|
_ref2$icon = _ref2.icon,
|
|
34529
34579
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
34530
34580
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
34531
|
-
var IconSVG = icon;
|
|
34532
34581
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
34533
34582
|
className: "neeto-molecules-profile-sublist__item",
|
|
34534
34583
|
key: idx
|
|
34535
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
34584
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
34585
|
+
fullWidth: true,
|
|
34586
|
+
className: "neeto-molecules-profile-sublist__item-btn",
|
|
34587
|
+
iconPosition: "left",
|
|
34588
|
+
iconSize: 18,
|
|
34589
|
+
style: "text"
|
|
34590
|
+
}, _objectSpread$2({
|
|
34591
|
+
icon: icon,
|
|
34592
|
+
label: label,
|
|
34536
34593
|
onClick: onClick
|
|
34537
|
-
}, otherProps
|
|
34538
|
-
className: "neeto-molecules-profile-sublist__item-btn"
|
|
34539
|
-
}), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
34540
|
-
className: "neeto-molecules-profile-sublist__item-btn-icon"
|
|
34541
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34542
|
-
className: "neeto-molecules-profile-sublist__item-btn-label",
|
|
34543
|
-
component: "span",
|
|
34544
|
-
style: "body2",
|
|
34545
|
-
weight: "normal"
|
|
34546
|
-
}, label)));
|
|
34594
|
+
}, otherProps))));
|
|
34547
34595
|
}));
|
|
34548
34596
|
};
|
|
34549
34597
|
|
|
@@ -34560,7 +34608,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
34560
34608
|
"data-cy": "profile-popup",
|
|
34561
34609
|
"data-testid": "profile-popup"
|
|
34562
34610
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34563
|
-
className: classnames("neeto-ui-relative neeto-ui-flex neeto-ui-items-center neeto-ui-p-3")
|
|
34611
|
+
className: classnames("neeto-ui-relative neeto-ui-flex neeto-ui-items-center neeto-ui-p-3 neeto-ui-bg-primary-100 neeto-molecules-profile-popup__top-section")
|
|
34564
34612
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34565
34613
|
className: "top-0 left-0"
|
|
34566
34614
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Avatar, {
|
|
@@ -34576,7 +34624,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
34576
34624
|
title: name,
|
|
34577
34625
|
weight: "semibold"
|
|
34578
34626
|
}, pure.truncate(name, 18)), email && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34579
|
-
className: "neeto-ui-w-full neeto-ui-truncate neeto-ui-text-gray-
|
|
34627
|
+
className: "neeto-ui-w-full neeto-ui-truncate neeto-ui-text-gray-700",
|
|
34580
34628
|
lineHeight: "tight",
|
|
34581
34629
|
style: "body3"
|
|
34582
34630
|
}, email))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -34603,6 +34651,8 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
34603
34651
|
}),
|
|
34604
34652
|
disabled: !data,
|
|
34605
34653
|
hideOnClick: false,
|
|
34654
|
+
interactiveDebounce: 20,
|
|
34655
|
+
offset: [0, -70],
|
|
34606
34656
|
position: "right",
|
|
34607
34657
|
theme: "light"
|
|
34608
34658
|
}, /*#__PURE__*/React__default["default"].createElement(ProfileSection$1, {
|
|
@@ -34610,10 +34660,14 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
34610
34660
|
}));
|
|
34611
34661
|
};
|
|
34612
34662
|
|
|
34663
|
+
// Rule can be enabled once the ticket - https://github.com/bigbinary/neeto-commons-frontend/issues/905 is closed.
|
|
34664
|
+
// eslint-disable-next-line @bigbinary/neeto/no-dumb-components-with-use-translation
|
|
34613
34665
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
34614
34666
|
var changesCount = _ref.changesCount;
|
|
34667
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
34668
|
+
t = _useTranslation.t;
|
|
34615
34669
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
34616
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
34670
|
+
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",
|
|
34617
34671
|
"data-cy": "help-button",
|
|
34618
34672
|
ref: ref
|
|
34619
34673
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -34623,51 +34677,15 @@ var HelpSection = function HelpSection(_ref, ref) {
|
|
|
34623
34677
|
}), pure.isPresent(changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
34624
34678
|
className: "neeto-molecules-sidebar__notif-count",
|
|
34625
34679
|
"data-testid": "help-icon-changes-count"
|
|
34626
|
-
}, changesCount))
|
|
34680
|
+
}, changesCount)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34681
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
34682
|
+
component: "span",
|
|
34683
|
+
style: "body2",
|
|
34684
|
+
weight: "normal"
|
|
34685
|
+
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
34627
34686
|
};
|
|
34628
34687
|
var HelpSection$1 = /*#__PURE__*/React.forwardRef(HelpSection);
|
|
34629
34688
|
|
|
34630
|
-
function _typeof(obj) {
|
|
34631
|
-
"@babel/helpers - typeof";
|
|
34632
|
-
|
|
34633
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
34634
|
-
return typeof obj;
|
|
34635
|
-
} : function (obj) {
|
|
34636
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
34637
|
-
}, _typeof(obj);
|
|
34638
|
-
}
|
|
34639
|
-
|
|
34640
|
-
function _toPrimitive(input, hint) {
|
|
34641
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
34642
|
-
var prim = input[Symbol.toPrimitive];
|
|
34643
|
-
if (prim !== undefined) {
|
|
34644
|
-
var res = prim.call(input, hint || "default");
|
|
34645
|
-
if (_typeof(res) !== "object") return res;
|
|
34646
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
34647
|
-
}
|
|
34648
|
-
return (hint === "string" ? String : Number)(input);
|
|
34649
|
-
}
|
|
34650
|
-
|
|
34651
|
-
function _toPropertyKey(arg) {
|
|
34652
|
-
var key = _toPrimitive(arg, "string");
|
|
34653
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
34654
|
-
}
|
|
34655
|
-
|
|
34656
|
-
function _defineProperty(obj, key, value) {
|
|
34657
|
-
key = _toPropertyKey(key);
|
|
34658
|
-
if (key in obj) {
|
|
34659
|
-
Object.defineProperty(obj, key, {
|
|
34660
|
-
value: value,
|
|
34661
|
-
enumerable: true,
|
|
34662
|
-
configurable: true,
|
|
34663
|
-
writable: true
|
|
34664
|
-
});
|
|
34665
|
-
} else {
|
|
34666
|
-
obj[key] = value;
|
|
34667
|
-
}
|
|
34668
|
-
return obj;
|
|
34669
|
-
}
|
|
34670
|
-
|
|
34671
34689
|
var _excluded$1 = ["label"];
|
|
34672
34690
|
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; }
|
|
34673
34691
|
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; }
|
|
@@ -34689,13 +34707,16 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
34689
34707
|
var hide = _ref2.hide;
|
|
34690
34708
|
return !hide;
|
|
34691
34709
|
});
|
|
34692
|
-
return /*#__PURE__*/React__default["default"].createElement("ul",
|
|
34710
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
34711
|
+
className: "neeto-molecules-help-sublist"
|
|
34712
|
+
}, helpLinks.map(function (_ref3, idx) {
|
|
34693
34713
|
var label = _ref3.label,
|
|
34694
34714
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
34695
34715
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
34696
34716
|
className: "neeto-molecules-help-sublist__item",
|
|
34697
34717
|
key: idx
|
|
34698
34718
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
34719
|
+
fullWidth: true,
|
|
34699
34720
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
34700
34721
|
iconPosition: "left",
|
|
34701
34722
|
iconSize: 18,
|
|
@@ -34732,7 +34753,7 @@ var Footer = function Footer(_ref) {
|
|
|
34732
34753
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
34733
34754
|
}, []);
|
|
34734
34755
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34735
|
-
className: "neeto-molecules-sidebar__footer"
|
|
34756
|
+
className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
|
|
34736
34757
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
34737
34758
|
interactive: true,
|
|
34738
34759
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -34741,6 +34762,8 @@ var Footer = function Footer(_ref) {
|
|
|
34741
34762
|
helpLinkOverrides: helpLinkOverrides
|
|
34742
34763
|
}),
|
|
34743
34764
|
hideOnClick: false,
|
|
34765
|
+
interactiveDebounce: 20,
|
|
34766
|
+
offset: [0, -70],
|
|
34744
34767
|
position: "right",
|
|
34745
34768
|
theme: "light"
|
|
34746
34769
|
}, /*#__PURE__*/React__default["default"].createElement(HelpSection$1, {
|
|
@@ -34754,12 +34777,12 @@ var Footer = function Footer(_ref) {
|
|
|
34754
34777
|
};
|
|
34755
34778
|
|
|
34756
34779
|
var Header = function Header(_ref) {
|
|
34757
|
-
var
|
|
34780
|
+
var _ProductTypefaceLogos;
|
|
34758
34781
|
var customLogo = _ref.customLogo;
|
|
34759
34782
|
var productName = globalProps.appName.substr(5);
|
|
34760
34783
|
var logoName = "Neeto".concat(pure.capitalize(productName.toLowerCase()));
|
|
34761
|
-
var
|
|
34762
|
-
var LogoComponent = customLogo !== null && customLogo !== void 0 ? customLogo :
|
|
34784
|
+
var ProductTypefaceLogo = (_ProductTypefaceLogos = ProductTypefaceLogos__namespace[logoName]) !== null && _ProductTypefaceLogos !== void 0 ? _ProductTypefaceLogos : ProductTypefaceLogos.Neeto;
|
|
34785
|
+
var LogoComponent = customLogo !== null && customLogo !== void 0 ? customLogo : ProductTypefaceLogo;
|
|
34763
34786
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
34764
34787
|
data = _useFetchNeetoApps.data;
|
|
34765
34788
|
var homePath = "/";
|
|
@@ -34772,22 +34795,26 @@ var Header = function Header(_ref) {
|
|
|
34772
34795
|
}
|
|
34773
34796
|
}
|
|
34774
34797
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34775
|
-
className: "neeto-
|
|
34798
|
+
className: "neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable",
|
|
34776
34799
|
"data-cy": "sidebar-info"
|
|
34777
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34778
|
-
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
34779
34800
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
34801
|
+
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
34780
34802
|
to: homePath
|
|
34781
|
-
}, /*#__PURE__*/React__default["default"].createElement(LogoComponent, null)))
|
|
34803
|
+
}, /*#__PURE__*/React__default["default"].createElement(LogoComponent, null)));
|
|
34782
34804
|
};
|
|
34783
34805
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
34784
34806
|
|
|
34785
|
-
var _excluded = ["label", "to", "icon", "
|
|
34807
|
+
var _excluded = ["label", "to", "icon", "items"],
|
|
34808
|
+
_excluded2 = ["label", "to", "count", "dataCy"];
|
|
34786
34809
|
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; }
|
|
34787
34810
|
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; }
|
|
34788
34811
|
var Links = function Links(_ref) {
|
|
34789
34812
|
var navLinks = _ref.navLinks;
|
|
34790
34813
|
var location = reactRouterDom.useLocation();
|
|
34814
|
+
var _useState = React.useState(true),
|
|
34815
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34816
|
+
isActiveLinkExpanded = _useState2[0],
|
|
34817
|
+
setIsActiveLinkExpanded = _useState2[1];
|
|
34791
34818
|
var filterByPermissions = ramda.curry(function (_ref2) {
|
|
34792
34819
|
var permissions = _ref2.permissions;
|
|
34793
34820
|
if (permissions) {
|
|
@@ -34795,33 +34822,84 @@ var Links = function Links(_ref) {
|
|
|
34795
34822
|
}
|
|
34796
34823
|
return true;
|
|
34797
34824
|
});
|
|
34825
|
+
var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
|
|
34826
|
+
if (pure.isNotPresent(items)) return;
|
|
34827
|
+
if (isActive()) {
|
|
34828
|
+
setIsActiveLinkExpanded(ramda.not);
|
|
34829
|
+
event.preventDefault();
|
|
34830
|
+
return;
|
|
34831
|
+
}
|
|
34832
|
+
setIsActiveLinkExpanded(true);
|
|
34833
|
+
};
|
|
34798
34834
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34799
|
-
className: "neeto-molecules-sidebar__links"
|
|
34835
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
|
|
34800
34836
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
34801
34837
|
var label = _ref3.label,
|
|
34802
34838
|
to = _ref3.to,
|
|
34803
34839
|
icon = _ref3.icon,
|
|
34804
|
-
|
|
34840
|
+
items = _ref3.items,
|
|
34805
34841
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
34806
34842
|
var IconSVG = icon;
|
|
34807
34843
|
var url = new URL(to, window.location.href);
|
|
34808
34844
|
var isActive = function isActive() {
|
|
34809
|
-
return location.pathname.startsWith(url.pathname);
|
|
34845
|
+
return ramda.is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
34810
34846
|
};
|
|
34811
|
-
|
|
34812
|
-
|
|
34813
|
-
label: label,
|
|
34847
|
+
var isMenuExpanded = isActive() && isActiveLinkExpanded;
|
|
34848
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
34814
34849
|
key: mainIndex
|
|
34815
34850
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
34816
34851
|
activeClassName: "active",
|
|
34817
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
34852
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
34853
|
+
onClick: function onClick(event) {
|
|
34854
|
+
return handleNavLinkClick(event, isActive, items);
|
|
34855
|
+
}
|
|
34818
34856
|
}, _objectSpread({
|
|
34819
34857
|
isActive: isActive,
|
|
34820
34858
|
to: to
|
|
34821
|
-
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("
|
|
34822
|
-
className: "neeto-
|
|
34859
|
+
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
34860
|
+
className: "neeto-molecules-sidebar__link-icon",
|
|
34823
34861
|
"data-testid": label
|
|
34824
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))
|
|
34862
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34863
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
34864
|
+
component: "span",
|
|
34865
|
+
style: "body2",
|
|
34866
|
+
weight: "normal"
|
|
34867
|
+
}, label), items && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
34868
|
+
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
34869
|
+
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
34870
|
+
})
|
|
34871
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
|
|
34872
|
+
size: 16
|
|
34873
|
+
}))), items && isMenuExpanded && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34874
|
+
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
34875
|
+
"data-cy": "sidebar-sub-link-wrapper"
|
|
34876
|
+
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
34877
|
+
var subLabel = _ref4.label,
|
|
34878
|
+
subRoute = _ref4.to,
|
|
34879
|
+
count = _ref4.count,
|
|
34880
|
+
dataCy = _ref4.dataCy,
|
|
34881
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
34882
|
+
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
34883
|
+
activeClassName: "active",
|
|
34884
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
34885
|
+
"data-cy": "".concat(dataCy, "-sub-link"),
|
|
34886
|
+
isActive: function isActive() {
|
|
34887
|
+
return isSubRouteActive(subRoute, location);
|
|
34888
|
+
},
|
|
34889
|
+
key: subIndex,
|
|
34890
|
+
to: subRoute
|
|
34891
|
+
}, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34892
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
34893
|
+
component: "span",
|
|
34894
|
+
"data-cy": "".concat(dataCy, "-sub-link-label"),
|
|
34895
|
+
style: "body2"
|
|
34896
|
+
}, subLabel), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
34897
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
34898
|
+
component: "span",
|
|
34899
|
+
"data-cy": "".concat(dataCy, "-sub-link-count"),
|
|
34900
|
+
style: "body2"
|
|
34901
|
+
}, count > 999 ? "999+" : count));
|
|
34902
|
+
})));
|
|
34825
34903
|
}));
|
|
34826
34904
|
};
|
|
34827
34905
|
|
|
@@ -34840,15 +34918,27 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
34840
34918
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34841
34919
|
isAppSwitcherOpen = _useState2[0],
|
|
34842
34920
|
setIsAppSwitcherOpen = _useState2[1];
|
|
34921
|
+
var _useLocalStorage = reactUtils.useLocalStorage(getSidebarStateLocalStorageKey(), false),
|
|
34922
|
+
_useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
|
|
34923
|
+
isSidebarCollapsed = _useLocalStorage2[0],
|
|
34924
|
+
setIsSidebarCollapsed = _useLocalStorage2[1];
|
|
34843
34925
|
var location = reactRouterDom.useLocation();
|
|
34926
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
34927
|
+
t = _useTranslation.t;
|
|
34844
34928
|
React.useEffect(function () {
|
|
34845
34929
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
34846
34930
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34847
34931
|
}, [location]);
|
|
34932
|
+
var productName = initializers.globalProps.appName.substr(5).toLowerCase();
|
|
34848
34933
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34934
|
+
"data-testid": "sidebar-container",
|
|
34935
|
+
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
34936
|
+
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
34937
|
+
})
|
|
34938
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34939
|
+
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",
|
|
34849
34940
|
"data-cy": "sidebar-wrapper",
|
|
34850
|
-
"data-testid": "sidebar"
|
|
34851
|
-
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")
|
|
34941
|
+
"data-testid": "sidebar"
|
|
34852
34942
|
}, /*#__PURE__*/React__default["default"].createElement(Header$1, {
|
|
34853
34943
|
customLogo: customLogo
|
|
34854
34944
|
}), /*#__PURE__*/React__default["default"].createElement(Links, {
|
|
@@ -34861,7 +34951,29 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
34861
34951
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
34862
34952
|
return setIsAppSwitcherOpen(ramda.not);
|
|
34863
34953
|
}
|
|
34954
|
+
})), isSidebarCollapsed && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34955
|
+
className: "neeto-molecules-sidebar__toggler-hover-area"
|
|
34956
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
34957
|
+
className: "neeto-molecules-sidebar__toggler",
|
|
34958
|
+
"data-cy": "neeto-molecules-sidebar-toggler",
|
|
34959
|
+
"data-testid": "sidebar-toggleButton",
|
|
34960
|
+
style: "text",
|
|
34961
|
+
icon: function icon() {
|
|
34962
|
+
return /*#__PURE__*/React__default["default"].createElement(Chevron, {
|
|
34963
|
+
style: {
|
|
34964
|
+
color: "rgb(var(--neeto-".concat(productName, "-primary))")
|
|
34965
|
+
}
|
|
34966
|
+
});
|
|
34967
|
+
},
|
|
34968
|
+
tooltipProps: {
|
|
34969
|
+
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
34970
|
+
position: "bottom"
|
|
34971
|
+
},
|
|
34972
|
+
onClick: function onClick() {
|
|
34973
|
+
setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
34974
|
+
}
|
|
34864
34975
|
})), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcher, {
|
|
34976
|
+
isSidebarCollapsed: isSidebarCollapsed,
|
|
34865
34977
|
isOpen: isAppSwitcherOpen,
|
|
34866
34978
|
onClose: function onClose() {
|
|
34867
34979
|
return setIsAppSwitcherOpen(false);
|