@bigbinary/neeto-molecules 1.0.74 → 1.0.76-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/CustomDomainDashboard.cjs.js +12 -26
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +14 -28
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/EmailForm.cjs.js +2941 -0
- package/dist/EmailForm.cjs.js.map +1 -0
- package/dist/EmailForm.js +2911 -0
- package/dist/EmailForm.js.map +1 -0
- package/dist/EmailPreview.cjs.js +5 -3
- package/dist/EmailPreview.cjs.js.map +1 -1
- package/dist/EmailPreview.js +6 -4
- package/dist/EmailPreview.js.map +1 -1
- package/dist/Header.cjs.js +11 -25
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +14 -28
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Rename.cjs.js +9 -9
- package/dist/Rename.cjs.js.map +1 -1
- package/dist/Rename.js +9 -9
- package/dist/Rename.js.map +1 -1
- package/dist/ShareViaEmail.cjs.js +5 -3
- package/dist/ShareViaEmail.cjs.js.map +1 -1
- package/dist/ShareViaEmail.js +6 -4
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/Sidebar.cjs.js +181 -95
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +183 -97
- package/dist/Sidebar.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +33 -2
- package/types/EmailForm.d.ts +55 -0
- package/types/EmailFormProvider.d.ts +35 -0
- 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 ramda = require('ramda');
|
|
5
|
-
var reactRouterDom = require('react-router-dom');
|
|
6
|
-
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
7
4
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
8
5
|
var neetoui = require('@bigbinary/neetoui');
|
|
6
|
+
var ramda = require('ramda');
|
|
9
7
|
var reactI18next = require('react-i18next');
|
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
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,7 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31743
31743
|
})))));
|
|
31744
31744
|
};
|
|
31745
31745
|
|
|
31746
|
-
var
|
|
31747
|
-
var label = _ref.label,
|
|
31748
|
-
description = _ref.description;
|
|
31749
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31750
|
-
className: "neeto-ui-flex neeto-ui-flex-col sidebar-featured-tooltip"
|
|
31751
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31752
|
-
className: "neeto-ui-text-center sidebar-featured-tooltip__title",
|
|
31753
|
-
lineHeight: "tight",
|
|
31754
|
-
style: "h5",
|
|
31755
|
-
weight: "semibold"
|
|
31756
|
-
}, label), description && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31757
|
-
className: "neeto-ui-text-center neeto-ui-text-gray-400 sidebar-featured-tooltip__description",
|
|
31758
|
-
lineHeight: "normal",
|
|
31759
|
-
style: "body3"
|
|
31760
|
-
}, description));
|
|
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);
|
|
31779
|
-
};
|
|
31780
|
-
|
|
31781
|
-
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;max-width:300px;padding:40px 0;transition:all .3s;width:300px;z-index:99997}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}@media (min-width:1440px){.neeto-molecules-sidebar{max-width:320px;width:320px}}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed{max-width:var(--neeto-ui-sidebar-width);width:var(--neeto-ui-sidebar-width)}.neeto-molecules-sidebar__header{margin-bottom:40px;padding:0 20px;width:100%}.neeto-molecules-sidebar__logo,.neeto-molecules-sidebar__logo svg{height:40px;width:40px}.neeto-molecules-sidebar__info{padding-left:10px;width:calc(100% - 40px)}.neeto-molecules-sidebar__info .neeto-molecules-typography{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.neeto-molecules-sidebar__links{margin-bottom:20px;padding-left:12px;padding-right:12px;width:100%}.neeto-molecules-sidebar__link{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-gray-600));cursor:pointer;margin:8px 0;padding:8px;position:relative;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__link.mb-0{margin-bottom:0}.neeto-molecules-sidebar__link-icon{flex-shrink:0;width:40px}.neeto-molecules-sidebar__link-label{overflow:hidden;padding-left:10px;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 40px)}.neeto-molecules-sidebar__link-sub-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 56px)}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-600));text-decoration:none}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-gray-600));cursor:pointer;margin:4px 0;padding:8px 8px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-700));text-decoration:none}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{background-color:rgb(var(--neeto-ui-gray-300));color:rgb(var(--neeto-ui-gray-700));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__footer{margin-top:auto;padding:0 12px;width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-wrapper{outline:none!important}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile{background-color:rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);box-shadow:var(--neeto-ui-shadow-sm);cursor:pointer;padding:8px;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-content{padding-left:10px;padding-right:30px;position:relative;width:calc(100% - 40px)}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-content .neeto-molecules-typography{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-drop-icon{color:rgb(var(--neeto-ui-gray-500));position:absolute;right:8px;top:50%;transform:translateY(-50%)}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed{padding:24px 0}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__profile{background-color:transparent;box-shadow:none;padding:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__header,.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__links{padding-left:16px;padding-right:16px}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__link-icon{width:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--collapsed .neeto-molecules-sidebar__footer{padding-left:16px;padding-right:16px}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:var(--neeto-ui-shadow-xs)!important}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400));list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-profile-sublist__item-btn{align-items:center;border-radius:0;color:rgb(var(--neeto-ui-gray-800));cursor:pointer;display:flex;font-size:var(--neeto-ui-text-sm);font-weight:var(--neeto-ui-font-normal);gap:8px;line-height:1.143;min-height:32px;outline-color:transparent;padding:6px 40px 6px 12px;position:relative;text-decoration:none;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.neeto-molecules-profile-sublist__item-btn.disabled{color:rgb(var(--neeto-ui-gray-500));cursor:not-allowed}.neeto-molecules-profile-sublist__item-btn:focus,.neeto-molecules-profile-sublist__item-btn:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-profile-sublist__item-btn--style-danger{color:rgb(var(--neeto-ui-error-800))}.neeto-molecules-profile-sublist__item-btn-icon{color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-profile-sublist__item-btn-icon svg{height:20px;width:20px}.neeto-molecules-help-sublist__item-btn{border-radius:0;color:rgb(var(--neeto-ui-gray-800));cursor:pointer;display:flex;font-size:var(--neeto-ui-text-sm);font-weight:var(--neeto-ui-font-normal);gap:8px;justify-content:flex-end;line-height:1.143;min-height:32px;outline-color:transparent;padding:6px 40px 6px 12px;position:relative;text-decoration:none;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.neeto-molecules-help-sublist__item-btn.disabled{color:rgb(var(--neeto-ui-gray-500));cursor:not-allowed}.neeto-molecules-help-sublist__item-btn:focus,.neeto-molecules-help-sublist__item-btn:hover{background-color:rgb(var(--neeto-ui-gray-200));box-shadow:none}.neeto-molecules-help-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn--style-danger{color:rgb(var(--neeto-ui-error-800))}.neeto-molecules-help-sublist__item-btn-icon{color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-help-sublist__item-btn-icon svg{height:20px;width:20px}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.neeto-molecules-help-sublist__item-btn-count{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.neeto-molecules-sidebar__notif-count{position:absolute;right:-2px;top:-2px}";
|
|
31746
|
+
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{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{left:calc(100% + 4px);position:absolute;top:32px;z-index:99996;z-index:calc(var(--neeto-molecules-sidebar-z-index) - 2)}.neeto-molecules-sidebar__header{margin-bottom:40px;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-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;min-width:0;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.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--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;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
31747
|
n(css,{});
|
|
31783
31748
|
|
|
31784
31749
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
@@ -31794,9 +31759,7 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31794
31759
|
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31795
31760
|
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31796
31761
|
};
|
|
31797
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
31798
|
-
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31799
|
-
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31762
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31800
31763
|
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
31764
|
"data-cy": "app-switcher-button",
|
|
31802
31765
|
onClick: handleAppSwitcherToggle,
|
|
@@ -31807,7 +31770,12 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31807
31770
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31808
31771
|
}, hasHovered && isFreshLoading ? /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
31809
31772
|
size: 24
|
|
31810
|
-
}))
|
|
31773
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31774
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31775
|
+
component: "span",
|
|
31776
|
+
style: "body2",
|
|
31777
|
+
weight: "normal"
|
|
31778
|
+
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31811
31779
|
};
|
|
31812
31780
|
|
|
31813
31781
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31825,7 +31793,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31825
31793
|
}
|
|
31826
31794
|
},
|
|
31827
31795
|
helpCenterProps: {
|
|
31828
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.
|
|
31796
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.helpArticles"),
|
|
31829
31797
|
icon: neetoIcons.Book,
|
|
31830
31798
|
"data-cy": "help-link-help-center-button",
|
|
31831
31799
|
href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
|
|
@@ -31886,21 +31854,26 @@ var ProfileSection = function ProfileSection(_ref, ref) {
|
|
|
31886
31854
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31887
31855
|
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31888
31856
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31889
|
-
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-
|
|
31857
|
+
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-lef",
|
|
31890
31858
|
"data-cy": "profile-section",
|
|
31891
31859
|
ref: ref,
|
|
31892
31860
|
onMouseEnter: function onMouseEnter() {
|
|
31893
31861
|
return setHasHovered(true);
|
|
31894
31862
|
}
|
|
31895
31863
|
}, /*#__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"
|
|
31864
|
+
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
31865
|
}, isFreshLoading && hasHovered ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31898
31866
|
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: "
|
|
31867
|
+
}, /*#__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, {
|
|
31868
|
+
className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
|
|
31869
|
+
size: "small",
|
|
31902
31870
|
user: profileInfo
|
|
31903
|
-
})
|
|
31871
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31872
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31873
|
+
component: "span",
|
|
31874
|
+
style: "body2",
|
|
31875
|
+
weight: "normal"
|
|
31876
|
+
}, pure.truncate(profileInfo.name, 18)))));
|
|
31904
31877
|
};
|
|
31905
31878
|
var ProfileSection$1 = /*#__PURE__*/React.forwardRef(ProfileSection);
|
|
31906
31879
|
|
|
@@ -31931,22 +31904,19 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
31931
31904
|
_ref2$icon = _ref2.icon,
|
|
31932
31905
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
31933
31906
|
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
31934
|
-
var IconSVG = icon;
|
|
31935
31907
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
31936
31908
|
className: "neeto-molecules-profile-sublist__item",
|
|
31937
31909
|
key: idx
|
|
31938
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31910
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
31911
|
+
fullWidth: true,
|
|
31912
|
+
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31913
|
+
icon: icon,
|
|
31914
|
+
iconPosition: "left",
|
|
31915
|
+
iconSize: 18,
|
|
31916
|
+
label: label,
|
|
31917
|
+
style: "text",
|
|
31939
31918
|
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)));
|
|
31919
|
+
}, otherProps)));
|
|
31950
31920
|
}));
|
|
31951
31921
|
};
|
|
31952
31922
|
|
|
@@ -32014,19 +31984,24 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
32014
31984
|
};
|
|
32015
31985
|
|
|
32016
31986
|
var HelpSection = function HelpSection(_ref, ref) {
|
|
32017
|
-
|
|
31987
|
+
_ref.changesCount;
|
|
31988
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
31989
|
+
t = _useTranslation.t;
|
|
31990
|
+
var showChangesCount = false;
|
|
32018
31991
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
32019
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
31992
|
+
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
31993
|
"data-cy": "help-button",
|
|
32021
31994
|
ref: ref
|
|
32022
31995
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32023
31996
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
32024
31997
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
32025
31998
|
size: 24
|
|
32026
|
-
}),
|
|
32027
|
-
className: "neeto-molecules-
|
|
32028
|
-
|
|
32029
|
-
|
|
31999
|
+
}), showChangesCount ), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32000
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32001
|
+
component: "span",
|
|
32002
|
+
style: "body2",
|
|
32003
|
+
weight: "normal"
|
|
32004
|
+
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
32030
32005
|
};
|
|
32031
32006
|
var HelpSection$1 = /*#__PURE__*/React.forwardRef(HelpSection);
|
|
32032
32007
|
|
|
@@ -32080,6 +32055,7 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32080
32055
|
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
32081
32056
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32082
32057
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32058
|
+
var showChangesCount = false;
|
|
32083
32059
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32084
32060
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32085
32061
|
onClick: function onClick() {
|
|
@@ -32092,21 +32068,21 @@ var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
|
32092
32068
|
var hide = _ref2.hide;
|
|
32093
32069
|
return !hide;
|
|
32094
32070
|
});
|
|
32095
|
-
return /*#__PURE__*/React__default["default"].createElement("ul",
|
|
32071
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
32072
|
+
className: "neeto-molecules-help-sublist"
|
|
32073
|
+
}, helpLinks.map(function (_ref3, idx) {
|
|
32096
32074
|
var label = _ref3.label,
|
|
32097
32075
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32098
32076
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
32099
32077
|
className: "neeto-molecules-help-sublist__item",
|
|
32100
32078
|
key: idx
|
|
32101
32079
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
32080
|
+
fullWidth: true,
|
|
32102
32081
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
32103
32082
|
iconPosition: "left",
|
|
32104
32083
|
iconSize: 18,
|
|
32105
32084
|
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)));
|
|
32085
|
+
}, buttonProps), label, showChangesCount ));
|
|
32110
32086
|
}));
|
|
32111
32087
|
};
|
|
32112
32088
|
|
|
@@ -32135,7 +32111,7 @@ var Footer = function Footer(_ref) {
|
|
|
32135
32111
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32136
32112
|
}, []);
|
|
32137
32113
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32138
|
-
className: "neeto-molecules-sidebar__footer"
|
|
32114
|
+
className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
|
|
32139
32115
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32140
32116
|
interactive: true,
|
|
32141
32117
|
className: "neeto-molecules-help-popup-wrapper",
|
|
@@ -32144,6 +32120,8 @@ var Footer = function Footer(_ref) {
|
|
|
32144
32120
|
helpLinkOverrides: helpLinkOverrides
|
|
32145
32121
|
}),
|
|
32146
32122
|
hideOnClick: false,
|
|
32123
|
+
interactiveDebounce: 30,
|
|
32124
|
+
offset: 0,
|
|
32147
32125
|
position: "right",
|
|
32148
32126
|
theme: "light"
|
|
32149
32127
|
}, /*#__PURE__*/React__default["default"].createElement(HelpSection$1, {
|
|
@@ -32157,10 +32135,10 @@ var Footer = function Footer(_ref) {
|
|
|
32157
32135
|
};
|
|
32158
32136
|
|
|
32159
32137
|
var Header = function Header() {
|
|
32160
|
-
var
|
|
32138
|
+
var _ProductTypefaceLogos;
|
|
32161
32139
|
var productName = globalProps.appName.substr(5);
|
|
32162
32140
|
var logoName = "Neeto".concat(pure.capitalize(productName.toLowerCase()));
|
|
32163
|
-
var
|
|
32141
|
+
var ProductTypefaceLogo = (_ProductTypefaceLogos = ProductTypefaceLogos__namespace[logoName]) !== null && _ProductTypefaceLogos !== void 0 ? _ProductTypefaceLogos : ProductTypefaceLogos.Neeto;
|
|
32164
32142
|
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
32165
32143
|
data = _useFetchNeetoApps.data;
|
|
32166
32144
|
var homePath = "/";
|
|
@@ -32173,17 +32151,53 @@ var Header = function Header() {
|
|
|
32173
32151
|
}
|
|
32174
32152
|
}
|
|
32175
32153
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32176
|
-
className: "neeto-
|
|
32154
|
+
className: "neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable",
|
|
32177
32155
|
"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
32156
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
32157
|
+
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32181
32158
|
to: homePath
|
|
32182
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
32159
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductTypefaceLogo, null)));
|
|
32183
32160
|
};
|
|
32184
32161
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
32185
32162
|
|
|
32186
|
-
var
|
|
32163
|
+
var getMaxLabelLength = function getMaxLabelLength(isSubItem, hasSubItems) {
|
|
32164
|
+
if (isSubItem) return 14;
|
|
32165
|
+
if (hasSubItems) return 16;
|
|
32166
|
+
return 20;
|
|
32167
|
+
};
|
|
32168
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
32169
|
+
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32170
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32171
|
+
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32172
|
+
return false;
|
|
32173
|
+
}
|
|
32174
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
32175
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32176
|
+
return ramda.all(function (key) {
|
|
32177
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32178
|
+
}, targetSearchKeys);
|
|
32179
|
+
};
|
|
32180
|
+
var optimizeLabel = function optimizeLabel(_ref) {
|
|
32181
|
+
var _ref$label = _ref.label,
|
|
32182
|
+
label = _ref$label === void 0 ? "" : _ref$label,
|
|
32183
|
+
_ref$hasSubItems = _ref.hasSubItems,
|
|
32184
|
+
hasSubItems = _ref$hasSubItems === void 0 ? false : _ref$hasSubItems,
|
|
32185
|
+
_ref$isSubItem = _ref.isSubItem,
|
|
32186
|
+
isSubItem = _ref$isSubItem === void 0 ? false : _ref$isSubItem;
|
|
32187
|
+
var maxLength = getMaxLabelLength(isSubItem, hasSubItems);
|
|
32188
|
+
if (label.length < maxLength) return {
|
|
32189
|
+
label: label,
|
|
32190
|
+
isLabelPristine: true
|
|
32191
|
+
};
|
|
32192
|
+
var optimizedLabel = label.substring(0, maxLength).trim();
|
|
32193
|
+
return {
|
|
32194
|
+
label: "".concat(optimizedLabel, "..."),
|
|
32195
|
+
isLabelPristine: false
|
|
32196
|
+
};
|
|
32197
|
+
};
|
|
32198
|
+
|
|
32199
|
+
var _excluded = ["label", "to", "icon", "items"],
|
|
32200
|
+
_excluded2 = ["label", "to", "count"];
|
|
32187
32201
|
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
32202
|
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
32203
|
var Links = function Links(_ref) {
|
|
@@ -32197,21 +32211,25 @@ var Links = function Links(_ref) {
|
|
|
32197
32211
|
return true;
|
|
32198
32212
|
});
|
|
32199
32213
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32200
|
-
className: "neeto-molecules-sidebar__links"
|
|
32214
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
|
|
32201
32215
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32202
32216
|
var label = _ref3.label,
|
|
32203
32217
|
to = _ref3.to,
|
|
32204
32218
|
icon = _ref3.icon,
|
|
32205
|
-
|
|
32219
|
+
items = _ref3.items,
|
|
32206
32220
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32207
32221
|
var IconSVG = icon;
|
|
32208
32222
|
var url = new URL(to, window.location.href);
|
|
32209
32223
|
var isActive = function isActive() {
|
|
32210
|
-
return location.pathname.startsWith(url.pathname);
|
|
32224
|
+
return ramda.is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
32211
32225
|
};
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
|
|
32226
|
+
var _optimizeLabel = optimizeLabel({
|
|
32227
|
+
label: label,
|
|
32228
|
+
hasSubItems: pure.isPresent(items) && pure.isNotEmpty(items)
|
|
32229
|
+
}),
|
|
32230
|
+
optimizedLabel = _optimizeLabel.label,
|
|
32231
|
+
isLabelPristine = _optimizeLabel.isLabelPristine;
|
|
32232
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
32215
32233
|
key: mainIndex
|
|
32216
32234
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32217
32235
|
activeClassName: "active",
|
|
@@ -32219,10 +32237,57 @@ var Links = function Links(_ref) {
|
|
|
32219
32237
|
}, _objectSpread({
|
|
32220
32238
|
isActive: isActive,
|
|
32221
32239
|
to: to
|
|
32222
|
-
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("
|
|
32223
|
-
className: "neeto-
|
|
32240
|
+
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32241
|
+
className: "neeto-molecules-sidebar__link-icon",
|
|
32224
32242
|
"data-testid": label
|
|
32225
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))
|
|
32243
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32244
|
+
content: label,
|
|
32245
|
+
disabled: isLabelPristine
|
|
32246
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32247
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32248
|
+
component: "span",
|
|
32249
|
+
style: "body2",
|
|
32250
|
+
weight: "normal"
|
|
32251
|
+
}, optimizedLabel)), items && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32252
|
+
className: classnames("neeto-molecules-sidebar__link-icon", {
|
|
32253
|
+
"neeto-molecules-sidebar__link-icon--rotate": isActive()
|
|
32254
|
+
})
|
|
32255
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
|
|
32256
|
+
size: 16
|
|
32257
|
+
}))), items && isActive() && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32258
|
+
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32259
|
+
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
32260
|
+
var subLabel = _ref4.label,
|
|
32261
|
+
subRoute = _ref4.to,
|
|
32262
|
+
count = _ref4.count,
|
|
32263
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32264
|
+
var _optimizeLabel2 = optimizeLabel({
|
|
32265
|
+
label: subLabel,
|
|
32266
|
+
isSubItem: true
|
|
32267
|
+
}),
|
|
32268
|
+
optimizedLabel = _optimizeLabel2.label,
|
|
32269
|
+
isSubLabelPristine = _optimizeLabel2.isLabelPristine;
|
|
32270
|
+
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32271
|
+
activeClassName: "active",
|
|
32272
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32273
|
+
key: subIndex,
|
|
32274
|
+
to: subRoute,
|
|
32275
|
+
isActive: function isActive() {
|
|
32276
|
+
return isSubRouteActive(subRoute, location);
|
|
32277
|
+
}
|
|
32278
|
+
}, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32279
|
+
content: subLabel,
|
|
32280
|
+
disabled: isSubLabelPristine
|
|
32281
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32282
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32283
|
+
component: "span",
|
|
32284
|
+
style: "body2"
|
|
32285
|
+
}, optimizedLabel)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32286
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32287
|
+
component: "span",
|
|
32288
|
+
style: "body2"
|
|
32289
|
+
}, count > 999 ? "999+" : count));
|
|
32290
|
+
})));
|
|
32226
32291
|
}));
|
|
32227
32292
|
};
|
|
32228
32293
|
|
|
@@ -32240,15 +32305,25 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32240
32305
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32241
32306
|
isAppSwitcherOpen = _useState2[0],
|
|
32242
32307
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32308
|
+
var _useState3 = React.useState(false),
|
|
32309
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32310
|
+
isSidebarCollapsed = _useState4[0],
|
|
32311
|
+
setIsSidebarCollapsed = _useState4[1];
|
|
32243
32312
|
var location = reactRouterDom.useLocation();
|
|
32313
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
32314
|
+
t = _useTranslation.t;
|
|
32244
32315
|
React.useEffect(function () {
|
|
32245
32316
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32246
32317
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32247
32318
|
}, [location]);
|
|
32248
32319
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32320
|
+
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32321
|
+
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32322
|
+
})
|
|
32323
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32324
|
+
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
32325
|
"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")
|
|
32326
|
+
"data-testid": "sidebar"
|
|
32252
32327
|
}, /*#__PURE__*/React__default["default"].createElement(Header$1, null), /*#__PURE__*/React__default["default"].createElement(Links, {
|
|
32253
32328
|
navLinks: navLinks
|
|
32254
32329
|
}), /*#__PURE__*/React__default["default"].createElement(Footer, {
|
|
@@ -32259,6 +32334,17 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32259
32334
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32260
32335
|
return setIsAppSwitcherOpen(ramda.not);
|
|
32261
32336
|
}
|
|
32337
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
32338
|
+
className: "neeto-molecules-sidebar__toggler",
|
|
32339
|
+
icon: isSidebarCollapsed ? neetoIcons.SidebarOpen : neetoIcons.SidebarClose,
|
|
32340
|
+
style: "text",
|
|
32341
|
+
tooltipProps: {
|
|
32342
|
+
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32343
|
+
position: "bottom"
|
|
32344
|
+
},
|
|
32345
|
+
onClick: function onClick() {
|
|
32346
|
+
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32347
|
+
}
|
|
32262
32348
|
})), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcher, {
|
|
32263
32349
|
isOpen: isAppSwitcherOpen,
|
|
32264
32350
|
onClose: function onClose() {
|