@bigbinary/neeto-molecules 1.0.70 → 1.0.71
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/Schedule.cjs.js +12 -14
- package/dist/Schedule.cjs.js.map +1 -1
- package/dist/Schedule.js +13 -15
- package/dist/Schedule.js.map +1 -1
- package/dist/Sidebar.cjs.js +193 -145
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +195 -147
- package/dist/Sidebar.js.map +1 -1
- package/package.json +3 -3
- package/src/translations/en.json +1 -1
package/dist/Sidebar.cjs.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var ramda = require('ramda');
|
|
5
5
|
var reactRouterDom = require('react-router-dom');
|
|
6
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
6
7
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
7
8
|
var neetoui = require('@bigbinary/neetoui');
|
|
8
9
|
var reactI18next = require('react-i18next');
|
|
@@ -31609,7 +31610,6 @@ var AppLink = function AppLink(_ref) {
|
|
|
31609
31610
|
var AppLink$1 = /*#__PURE__*/React__default["default"].memo(AppLink);
|
|
31610
31611
|
|
|
31611
31612
|
var Body = function Body(_ref) {
|
|
31612
|
-
var _globalProps$neetoApp;
|
|
31613
31613
|
var onClose = _ref.onClose;
|
|
31614
31614
|
var _useTranslation = reactI18next.useTranslation(),
|
|
31615
31615
|
t = _useTranslation.t;
|
|
@@ -31617,9 +31617,12 @@ var Body = function Body(_ref) {
|
|
|
31617
31617
|
_useState2 = _slicedToArray(_useState, 2),
|
|
31618
31618
|
searchTerm = _useState2[0],
|
|
31619
31619
|
setSearchTerm = _useState2[1];
|
|
31620
|
-
var
|
|
31620
|
+
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31621
|
+
data = _useFetchNeetoApps.data;
|
|
31622
|
+
var substring = searchTerm.replace(/ /g, "").toLowerCase();
|
|
31623
|
+
var filteredApps = data === null || data === void 0 ? void 0 : data.neetoApps.filter(function (_ref2) {
|
|
31621
31624
|
var name = _ref2.name;
|
|
31622
|
-
return name
|
|
31625
|
+
return name.toLowerCase().includes(substring);
|
|
31623
31626
|
});
|
|
31624
31627
|
var handleSearch = function handleSearch(e) {
|
|
31625
31628
|
return setSearchTerm(e.target.value);
|
|
@@ -31740,9 +31743,6 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31740
31743
|
})))));
|
|
31741
31744
|
};
|
|
31742
31745
|
|
|
31743
|
-
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}";
|
|
31744
|
-
n(css,{});
|
|
31745
|
-
|
|
31746
31746
|
var FeaturedTooltip = function FeaturedTooltip(_ref) {
|
|
31747
31747
|
var label = _ref.label,
|
|
31748
31748
|
description = _ref.description;
|
|
@@ -31778,19 +31778,34 @@ var NavIconWrapper = function NavIconWrapper(_ref) {
|
|
|
31778
31778
|
}, children);
|
|
31779
31779
|
};
|
|
31780
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}";
|
|
31782
|
+
n(css,{});
|
|
31783
|
+
|
|
31781
31784
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
31782
31785
|
var onAppSwitcherToggle = _ref.onAppSwitcherToggle;
|
|
31783
31786
|
var _useTranslation = reactI18next.useTranslation(),
|
|
31784
31787
|
t = _useTranslation.t;
|
|
31788
|
+
var _useState = React.useState(false),
|
|
31789
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31790
|
+
hasHovered = _useState2[0],
|
|
31791
|
+
setHasHovered = _useState2[1];
|
|
31792
|
+
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31793
|
+
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31794
|
+
var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
|
|
31795
|
+
if (isFreshLoading) event.stopPropagation();else onAppSwitcherToggle();
|
|
31796
|
+
};
|
|
31785
31797
|
return /*#__PURE__*/React__default["default"].createElement(NavIconWrapper, {
|
|
31786
31798
|
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31787
31799
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31788
31800
|
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--app-switcher neeto-molecules-sidebar__link--button neeto-ui-flex neeto-ui-w-full neeto-ui-select-none neeto-ui-items-center neeto-ui-justify-start neeto-ui-shadow-none",
|
|
31789
31801
|
"data-cy": "app-switcher-button",
|
|
31790
|
-
onClick:
|
|
31802
|
+
onClick: handleAppSwitcherToggle,
|
|
31803
|
+
onMouseEnter: function onMouseEnter() {
|
|
31804
|
+
return setHasHovered(true);
|
|
31805
|
+
}
|
|
31791
31806
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31792
|
-
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31793
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
31807
|
+
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
|
|
31808
|
+
}, hasHovered && isFreshLoading ? /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
31794
31809
|
size: 24
|
|
31795
31810
|
}))));
|
|
31796
31811
|
};
|
|
@@ -31829,7 +31844,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31829
31844
|
}
|
|
31830
31845
|
};
|
|
31831
31846
|
|
|
31832
|
-
var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
31847
|
+
var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
31833
31848
|
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
|
|
31834
31849
|
return ramda.mergeDeepLeft(profileInfoOverrides, {
|
|
31835
31850
|
name: "".concat((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.firstName, " ").concat((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.lastName),
|
|
@@ -31842,7 +31857,7 @@ var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
|
31842
31857
|
return window.open(MY_PROFILE_URL, "_blank");
|
|
31843
31858
|
},
|
|
31844
31859
|
"data-cy": "my-profile-button"
|
|
31845
|
-
},
|
|
31860
|
+
}, isOwner && {
|
|
31846
31861
|
label: i18next.t("neetoMolecules.sidebar.myOrganization"),
|
|
31847
31862
|
icon: neetoIcons.Settings,
|
|
31848
31863
|
onClick: function onClick() {
|
|
@@ -31862,121 +31877,32 @@ var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
|
31862
31877
|
});
|
|
31863
31878
|
};
|
|
31864
31879
|
|
|
31865
|
-
var
|
|
31866
|
-
var changesCount = _ref.changesCount;
|
|
31867
|
-
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31868
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
31869
|
-
"data-cy": "help-button",
|
|
31870
|
-
ref: ref
|
|
31871
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31872
|
-
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31873
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
31874
|
-
size: 24
|
|
31875
|
-
}), pure.isPresent(changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31876
|
-
className: "neeto-molecules-sidebar__notif-count",
|
|
31877
|
-
"data-testid": "help-icon-changes-count"
|
|
31878
|
-
}, changesCount)));
|
|
31879
|
-
});
|
|
31880
|
-
HelpSection.displayName = "HelpSection";
|
|
31881
|
-
HelpSection.propTypes = {
|
|
31882
|
-
changesCount: propTypes.exports.number
|
|
31883
|
-
};
|
|
31884
|
-
|
|
31885
|
-
function _typeof(obj) {
|
|
31886
|
-
"@babel/helpers - typeof";
|
|
31887
|
-
|
|
31888
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
31889
|
-
return typeof obj;
|
|
31890
|
-
} : function (obj) {
|
|
31891
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
31892
|
-
}, _typeof(obj);
|
|
31893
|
-
}
|
|
31894
|
-
|
|
31895
|
-
function _toPrimitive(input, hint) {
|
|
31896
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
31897
|
-
var prim = input[Symbol.toPrimitive];
|
|
31898
|
-
if (prim !== undefined) {
|
|
31899
|
-
var res = prim.call(input, hint || "default");
|
|
31900
|
-
if (_typeof(res) !== "object") return res;
|
|
31901
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31902
|
-
}
|
|
31903
|
-
return (hint === "string" ? String : Number)(input);
|
|
31904
|
-
}
|
|
31905
|
-
|
|
31906
|
-
function _toPropertyKey(arg) {
|
|
31907
|
-
var key = _toPrimitive(arg, "string");
|
|
31908
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
31909
|
-
}
|
|
31910
|
-
|
|
31911
|
-
function _defineProperty(obj, key, value) {
|
|
31912
|
-
key = _toPropertyKey(key);
|
|
31913
|
-
if (key in obj) {
|
|
31914
|
-
Object.defineProperty(obj, key, {
|
|
31915
|
-
value: value,
|
|
31916
|
-
enumerable: true,
|
|
31917
|
-
configurable: true,
|
|
31918
|
-
writable: true
|
|
31919
|
-
});
|
|
31920
|
-
} else {
|
|
31921
|
-
obj[key] = value;
|
|
31922
|
-
}
|
|
31923
|
-
return obj;
|
|
31924
|
-
}
|
|
31925
|
-
|
|
31926
|
-
var _excluded$2 = ["label"];
|
|
31927
|
-
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; }
|
|
31928
|
-
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; }
|
|
31929
|
-
var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
31930
|
-
var helpLinkOverrides = _ref.helpLinkOverrides,
|
|
31931
|
-
changesCount = _ref.changesCount;
|
|
31932
|
-
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
31933
|
-
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
31934
|
-
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
31935
|
-
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
31936
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
31937
|
-
onClick: function onClick() {
|
|
31938
|
-
return setIsOpen(true);
|
|
31939
|
-
}
|
|
31940
|
-
}), key === "changelogProps" && changesCount && {
|
|
31941
|
-
changesCount: changesCount
|
|
31942
|
-
});
|
|
31943
|
-
}).filter(function (_ref2) {
|
|
31944
|
-
var hide = _ref2.hide;
|
|
31945
|
-
return !hide;
|
|
31946
|
-
});
|
|
31947
|
-
return /*#__PURE__*/React__default["default"].createElement("ul", null, helpLinks.map(function (_ref3, idx) {
|
|
31948
|
-
var label = _ref3.label,
|
|
31949
|
-
buttonProps = _objectWithoutProperties(_ref3, _excluded$2);
|
|
31950
|
-
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
31951
|
-
className: "neeto-molecules-help-sublist__item",
|
|
31952
|
-
key: idx
|
|
31953
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
31954
|
-
className: "neeto-molecules-help-sublist__item-btn",
|
|
31955
|
-
iconPosition: "left",
|
|
31956
|
-
iconSize: 18,
|
|
31957
|
-
style: "text"
|
|
31958
|
-
}, buttonProps), label, pure.isPresent(buttonProps.changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31959
|
-
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
31960
|
-
"data-testid": "help-section-menu-changes-count"
|
|
31961
|
-
}, buttonProps.changesCount)));
|
|
31962
|
-
}));
|
|
31963
|
-
};
|
|
31964
|
-
|
|
31965
|
-
var ProfileSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
31880
|
+
var ProfileSection = function ProfileSection(_ref, ref) {
|
|
31966
31881
|
var profileInfo = _ref.profileInfo;
|
|
31882
|
+
var _useState = React.useState(false),
|
|
31883
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31884
|
+
hasHovered = _useState2[0],
|
|
31885
|
+
setHasHovered = _useState2[1];
|
|
31886
|
+
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31887
|
+
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31967
31888
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31968
31889
|
className: "neeto-molecules-sidebar__profile-wrapper neeto-ui-w-full neeto-ui-text-left",
|
|
31969
31890
|
"data-cy": "profile-section",
|
|
31970
|
-
ref: ref
|
|
31891
|
+
ref: ref,
|
|
31892
|
+
onMouseEnter: function onMouseEnter() {
|
|
31893
|
+
return setHasHovered(true);
|
|
31894
|
+
}
|
|
31971
31895
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31972
31896
|
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31973
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31897
|
+
}, isFreshLoading && hasHovered ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31898
|
+
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, {
|
|
31974
31900
|
className: "neeto-ui-flex-shrink-0",
|
|
31975
31901
|
size: "large",
|
|
31976
31902
|
user: profileInfo
|
|
31977
31903
|
})));
|
|
31978
|
-
}
|
|
31979
|
-
ProfileSection
|
|
31904
|
+
};
|
|
31905
|
+
var ProfileSection$1 = /*#__PURE__*/React.forwardRef(ProfileSection);
|
|
31980
31906
|
|
|
31981
31907
|
function _arrayWithoutHoles(arr) {
|
|
31982
31908
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
@@ -31994,7 +31920,7 @@ function _toConsumableArray(arr) {
|
|
|
31994
31920
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
31995
31921
|
}
|
|
31996
31922
|
|
|
31997
|
-
var _excluded$
|
|
31923
|
+
var _excluded$2 = ["onClick", "label", "icon"];
|
|
31998
31924
|
var LinkSection = function LinkSection(_ref) {
|
|
31999
31925
|
var links = _ref.links;
|
|
32000
31926
|
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
@@ -32004,7 +31930,7 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
32004
31930
|
label = _ref2.label,
|
|
32005
31931
|
_ref2$icon = _ref2.icon,
|
|
32006
31932
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
32007
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
31933
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
32008
31934
|
var IconSVG = icon;
|
|
32009
31935
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
32010
31936
|
className: "neeto-molecules-profile-sublist__item",
|
|
@@ -32063,6 +31989,127 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
32063
31989
|
}));
|
|
32064
31990
|
};
|
|
32065
31991
|
|
|
31992
|
+
var ProfileButton = function ProfileButton(_ref) {
|
|
31993
|
+
var extraTopLinks = _ref.extraTopLinks,
|
|
31994
|
+
profileInfoOverrides = _ref.profileInfoOverrides;
|
|
31995
|
+
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
31996
|
+
data = _useFetchNeetoApps.data,
|
|
31997
|
+
isFreshLoading = _useFetchNeetoApps.isFreshLoading;
|
|
31998
|
+
var profileInfo = getProfileInfo(data === null || data === void 0 ? void 0 : data.isOwner, profileInfoOverrides);
|
|
31999
|
+
var profileInfoComponent = /*#__PURE__*/React__default["default"].createElement(ProfileSection$1, {
|
|
32000
|
+
profileInfo: profileInfo
|
|
32001
|
+
});
|
|
32002
|
+
if (isFreshLoading) return profileInfoComponent;
|
|
32003
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32004
|
+
interactive: true,
|
|
32005
|
+
className: "neeto-molecules-profile-popup-wrapper",
|
|
32006
|
+
content: /*#__PURE__*/React__default["default"].createElement(ProfileMenu, {
|
|
32007
|
+
extraTopLinks: extraTopLinks,
|
|
32008
|
+
profileInfo: profileInfo
|
|
32009
|
+
}),
|
|
32010
|
+
hideOnClick: false,
|
|
32011
|
+
position: "right",
|
|
32012
|
+
theme: "light"
|
|
32013
|
+
}, profileInfoComponent);
|
|
32014
|
+
};
|
|
32015
|
+
|
|
32016
|
+
var HelpSection = function HelpSection(_ref, ref) {
|
|
32017
|
+
var changesCount = _ref.changesCount;
|
|
32018
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
32019
|
+
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
32020
|
+
"data-cy": "help-button",
|
|
32021
|
+
ref: ref
|
|
32022
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32023
|
+
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
32024
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
32025
|
+
size: 24
|
|
32026
|
+
}), pure.isPresent(changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32027
|
+
className: "neeto-molecules-sidebar__notif-count",
|
|
32028
|
+
"data-testid": "help-icon-changes-count"
|
|
32029
|
+
}, changesCount)));
|
|
32030
|
+
};
|
|
32031
|
+
var HelpSection$1 = /*#__PURE__*/React.forwardRef(HelpSection);
|
|
32032
|
+
|
|
32033
|
+
function _typeof(obj) {
|
|
32034
|
+
"@babel/helpers - typeof";
|
|
32035
|
+
|
|
32036
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
32037
|
+
return typeof obj;
|
|
32038
|
+
} : function (obj) {
|
|
32039
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
32040
|
+
}, _typeof(obj);
|
|
32041
|
+
}
|
|
32042
|
+
|
|
32043
|
+
function _toPrimitive(input, hint) {
|
|
32044
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
32045
|
+
var prim = input[Symbol.toPrimitive];
|
|
32046
|
+
if (prim !== undefined) {
|
|
32047
|
+
var res = prim.call(input, hint || "default");
|
|
32048
|
+
if (_typeof(res) !== "object") return res;
|
|
32049
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
32050
|
+
}
|
|
32051
|
+
return (hint === "string" ? String : Number)(input);
|
|
32052
|
+
}
|
|
32053
|
+
|
|
32054
|
+
function _toPropertyKey(arg) {
|
|
32055
|
+
var key = _toPrimitive(arg, "string");
|
|
32056
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
32057
|
+
}
|
|
32058
|
+
|
|
32059
|
+
function _defineProperty(obj, key, value) {
|
|
32060
|
+
key = _toPropertyKey(key);
|
|
32061
|
+
if (key in obj) {
|
|
32062
|
+
Object.defineProperty(obj, key, {
|
|
32063
|
+
value: value,
|
|
32064
|
+
enumerable: true,
|
|
32065
|
+
configurable: true,
|
|
32066
|
+
writable: true
|
|
32067
|
+
});
|
|
32068
|
+
} else {
|
|
32069
|
+
obj[key] = value;
|
|
32070
|
+
}
|
|
32071
|
+
return obj;
|
|
32072
|
+
}
|
|
32073
|
+
|
|
32074
|
+
var _excluded$1 = ["label"];
|
|
32075
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32076
|
+
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; }
|
|
32077
|
+
var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
32078
|
+
var helpLinkOverrides = _ref.helpLinkOverrides,
|
|
32079
|
+
changesCount = _ref.changesCount;
|
|
32080
|
+
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
32081
|
+
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
32082
|
+
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
32083
|
+
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
32084
|
+
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
32085
|
+
onClick: function onClick() {
|
|
32086
|
+
return setIsOpen(true);
|
|
32087
|
+
}
|
|
32088
|
+
}), key === "changelogProps" && changesCount && {
|
|
32089
|
+
changesCount: changesCount
|
|
32090
|
+
});
|
|
32091
|
+
}).filter(function (_ref2) {
|
|
32092
|
+
var hide = _ref2.hide;
|
|
32093
|
+
return !hide;
|
|
32094
|
+
});
|
|
32095
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", null, helpLinks.map(function (_ref3, idx) {
|
|
32096
|
+
var label = _ref3.label,
|
|
32097
|
+
buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
32098
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
32099
|
+
className: "neeto-molecules-help-sublist__item",
|
|
32100
|
+
key: idx
|
|
32101
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
32102
|
+
className: "neeto-molecules-help-sublist__item-btn",
|
|
32103
|
+
iconPosition: "left",
|
|
32104
|
+
iconSize: 18,
|
|
32105
|
+
style: "text"
|
|
32106
|
+
}, buttonProps), label, pure.isPresent(buttonProps.changesCount) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32107
|
+
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
32108
|
+
"data-testid": "help-section-menu-changes-count"
|
|
32109
|
+
}, buttonProps.changesCount)));
|
|
32110
|
+
}));
|
|
32111
|
+
};
|
|
32112
|
+
|
|
32066
32113
|
var Footer = function Footer(_ref) {
|
|
32067
32114
|
var extraTopLinks = _ref.extraTopLinks,
|
|
32068
32115
|
helpLinkOverrides = _ref.helpLinkOverrides,
|
|
@@ -32070,7 +32117,6 @@ var Footer = function Footer(_ref) {
|
|
|
32070
32117
|
_ref$showAppSwitcher = _ref.showAppSwitcher,
|
|
32071
32118
|
showAppSwitcher = _ref$showAppSwitcher === void 0 ? false : _ref$showAppSwitcher,
|
|
32072
32119
|
onAppSwitcherToggle = _ref.onAppSwitcherToggle;
|
|
32073
|
-
var profileInfo = getProfileInfo(profileInfoOverrides);
|
|
32074
32120
|
var _useState = React.useState(null),
|
|
32075
32121
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32076
32122
|
changesCount = _useState2[0],
|
|
@@ -32100,44 +32146,45 @@ var Footer = function Footer(_ref) {
|
|
|
32100
32146
|
hideOnClick: false,
|
|
32101
32147
|
position: "right",
|
|
32102
32148
|
theme: "light"
|
|
32103
|
-
}, /*#__PURE__*/React__default["default"].createElement(HelpSection, {
|
|
32149
|
+
}, /*#__PURE__*/React__default["default"].createElement(HelpSection$1, {
|
|
32104
32150
|
changesCount: changesCount
|
|
32105
32151
|
})), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcherButton, {
|
|
32106
32152
|
onAppSwitcherToggle: onAppSwitcherToggle
|
|
32107
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
32108
|
-
|
|
32109
|
-
|
|
32110
|
-
|
|
32111
|
-
position: "right",
|
|
32112
|
-
theme: "light",
|
|
32113
|
-
content: /*#__PURE__*/React__default["default"].createElement(ProfileMenu, {
|
|
32114
|
-
extraTopLinks: extraTopLinks,
|
|
32115
|
-
profileInfo: profileInfo
|
|
32116
|
-
})
|
|
32117
|
-
}, /*#__PURE__*/React__default["default"].createElement(ProfileSection, {
|
|
32118
|
-
profileInfo: profileInfo
|
|
32119
|
-
})));
|
|
32153
|
+
}), /*#__PURE__*/React__default["default"].createElement(ProfileButton, {
|
|
32154
|
+
extraTopLinks: extraTopLinks,
|
|
32155
|
+
profileInfoOverrides: profileInfoOverrides
|
|
32156
|
+
}));
|
|
32120
32157
|
};
|
|
32121
32158
|
|
|
32122
32159
|
var Header = function Header() {
|
|
32123
|
-
var
|
|
32124
|
-
var
|
|
32125
|
-
var
|
|
32126
|
-
var
|
|
32127
|
-
|
|
32128
|
-
|
|
32160
|
+
var _ProductLogos$logoNam;
|
|
32161
|
+
var productName = globalProps.appName.substr(5);
|
|
32162
|
+
var logoName = "Neeto".concat(pure.capitalize(productName.toLowerCase()));
|
|
32163
|
+
var ProductLogo = (_ProductLogos$logoNam = ProductLogos__namespace[logoName]) !== null && _ProductLogos$logoNam !== void 0 ? _ProductLogos$logoNam : ProductLogos.Neeto;
|
|
32164
|
+
var _useFetchNeetoApps = reactUtils.useFetchNeetoApps(),
|
|
32165
|
+
data = _useFetchNeetoApps.data;
|
|
32166
|
+
var homePath = "/";
|
|
32167
|
+
if (data !== null && data !== void 0 && data.neetoApps) {
|
|
32168
|
+
var _findBy = pure.findBy({
|
|
32169
|
+
name: productName
|
|
32170
|
+
}, data.neetoApps),
|
|
32171
|
+
url = _findBy.url;
|
|
32172
|
+
homePath = new URL(url).pathname;
|
|
32173
|
+
}
|
|
32129
32174
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32130
32175
|
className: "neeto-ui-flex neeto-ui-items-center neeto-molecules-sidebar__header",
|
|
32131
32176
|
"data-cy": "sidebar-info"
|
|
32132
32177
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32133
32178
|
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32134
32179
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
32135
|
-
to:
|
|
32136
|
-
},
|
|
32180
|
+
to: homePath
|
|
32181
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductLogo, null))));
|
|
32137
32182
|
};
|
|
32138
32183
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
32139
32184
|
|
|
32140
32185
|
var _excluded = ["label", "to", "icon", "description"];
|
|
32186
|
+
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; }
|
|
32187
|
+
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; }
|
|
32141
32188
|
var Links = function Links(_ref) {
|
|
32142
32189
|
var navLinks = _ref.navLinks;
|
|
32143
32190
|
var location = reactRouterDom.useLocation();
|
|
@@ -32163,14 +32210,15 @@ var Links = function Links(_ref) {
|
|
|
32163
32210
|
};
|
|
32164
32211
|
return /*#__PURE__*/React__default["default"].createElement(NavIconWrapper, {
|
|
32165
32212
|
description: description,
|
|
32166
|
-
|
|
32167
|
-
|
|
32213
|
+
label: label,
|
|
32214
|
+
key: mainIndex
|
|
32168
32215
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32169
32216
|
activeClassName: "active",
|
|
32170
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32217
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
|
|
32218
|
+
}, _objectSpread({
|
|
32171
32219
|
isActive: isActive,
|
|
32172
32220
|
to: to
|
|
32173
|
-
}, otherProps), icon && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32221
|
+
}, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32174
32222
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-molecules-sidebar__link-icon",
|
|
32175
32223
|
"data-testid": label
|
|
32176
32224
|
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))));
|