@bigbinary/neeto-molecules 1.0.67 → 1.0.69-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/BrowserSupport.cjs.js +7 -3
- package/dist/BrowserSupport.cjs.js.map +1 -1
- package/dist/BrowserSupport.js +7 -3
- package/dist/BrowserSupport.js.map +1 -1
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +11 -24
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +12 -25
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +10 -23
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +12 -25
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Sidebar.cjs.js +159 -98
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +163 -102
- package/dist/Sidebar.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +6 -2
- package/types/Sidebar.d.ts +1 -4
package/dist/Sidebar.cjs.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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
4
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
7
5
|
var neetoui = require('@bigbinary/neetoui');
|
|
6
|
+
var ramda = require('ramda');
|
|
8
7
|
var reactI18next = require('react-i18next');
|
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
9
|
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
10
10
|
var AppIcons = require('@bigbinary/neeto-icons/app-icons');
|
|
11
11
|
var i18next = require('i18next');
|
|
12
12
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
13
13
|
var KeyboardShortcuts = require('@bigbinary/neeto-molecules/KeyboardShortcuts');
|
|
14
|
-
var ProductLogos = require('@bigbinary/neeto-icons/logos');
|
|
14
|
+
var ProductLogos = require('@bigbinary/neeto-icons/typeface-logos');
|
|
15
15
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
16
16
|
|
|
17
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -31511,7 +31511,7 @@ SwitchTransition.defaultProps = {
|
|
|
31511
31511
|
|
|
31512
31512
|
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}}
|
|
31513
31513
|
|
|
31514
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:
|
|
31514
|
+
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}";
|
|
31515
31515
|
n(css$1,{});
|
|
31516
31516
|
|
|
31517
31517
|
function _extends() {
|
|
@@ -31740,51 +31740,14 @@ var AppSwitcher = function AppSwitcher(_ref) {
|
|
|
31740
31740
|
})))));
|
|
31741
31741
|
};
|
|
31742
31742
|
|
|
31743
|
-
var css = ".neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-
|
|
31743
|
+
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}";
|
|
31744
31744
|
n(css,{});
|
|
31745
31745
|
|
|
31746
|
-
var FeaturedTooltip = function FeaturedTooltip(_ref) {
|
|
31747
|
-
var label = _ref.label,
|
|
31748
|
-
description = _ref.description;
|
|
31749
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31750
|
-
className: "neeto-ui-flex neeto-ui-flex-col sidebar-featured-tooltip"
|
|
31751
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31752
|
-
className: "neeto-ui-text-center sidebar-featured-tooltip__title",
|
|
31753
|
-
lineHeight: "tight",
|
|
31754
|
-
style: "h5",
|
|
31755
|
-
weight: "semibold"
|
|
31756
|
-
}, label), description && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31757
|
-
className: "neeto-ui-text-center neeto-ui-text-gray-400 sidebar-featured-tooltip__description",
|
|
31758
|
-
lineHeight: "normal",
|
|
31759
|
-
style: "body3"
|
|
31760
|
-
}, description));
|
|
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
31746
|
var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
31782
31747
|
var onAppSwitcherToggle = _ref.onAppSwitcherToggle;
|
|
31783
31748
|
var _useTranslation = reactI18next.useTranslation(),
|
|
31784
31749
|
t = _useTranslation.t;
|
|
31785
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
31786
|
-
label: t("neetoMolecules.sidebar.productSwitcher")
|
|
31787
|
-
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31750
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31788
31751
|
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
31752
|
"data-cy": "app-switcher-button",
|
|
31790
31753
|
onClick: onAppSwitcherToggle
|
|
@@ -31792,7 +31755,12 @@ var AppSwitcherButton = function AppSwitcherButton(_ref) {
|
|
|
31792
31755
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31793
31756
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, {
|
|
31794
31757
|
size: 24
|
|
31795
|
-
}))
|
|
31758
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31759
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31760
|
+
component: "span",
|
|
31761
|
+
style: "body2",
|
|
31762
|
+
weight: "normal"
|
|
31763
|
+
}, t("neetoMolecules.sidebar.productSwitcher")));
|
|
31796
31764
|
};
|
|
31797
31765
|
|
|
31798
31766
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
@@ -31810,7 +31778,7 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31810
31778
|
}
|
|
31811
31779
|
},
|
|
31812
31780
|
helpCenterProps: {
|
|
31813
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.
|
|
31781
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.helpArticles"),
|
|
31814
31782
|
icon: neetoIcons.Book,
|
|
31815
31783
|
"data-cy": "help-link-help-center-button",
|
|
31816
31784
|
href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
|
|
@@ -31863,24 +31831,26 @@ var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
|
31863
31831
|
};
|
|
31864
31832
|
|
|
31865
31833
|
var HelpSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
31866
|
-
|
|
31834
|
+
_ref.changesCount;
|
|
31835
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
31836
|
+
t = _useTranslation.t;
|
|
31837
|
+
var showChangesCount = false;
|
|
31867
31838
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31868
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none",
|
|
31839
|
+
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",
|
|
31869
31840
|
"data-cy": "help-button",
|
|
31870
31841
|
ref: ref
|
|
31871
31842
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31872
31843
|
className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
|
|
31873
31844
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
31874
31845
|
size: 24
|
|
31875
|
-
}),
|
|
31876
|
-
className: "neeto-molecules-
|
|
31877
|
-
|
|
31878
|
-
|
|
31846
|
+
}), showChangesCount ), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31847
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31848
|
+
component: "span",
|
|
31849
|
+
style: "body2",
|
|
31850
|
+
weight: "normal"
|
|
31851
|
+
}, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
|
|
31879
31852
|
});
|
|
31880
31853
|
HelpSection.displayName = "HelpSection";
|
|
31881
|
-
HelpSection.propTypes = {
|
|
31882
|
-
changesCount: propTypes.exports.number
|
|
31883
|
-
};
|
|
31884
31854
|
|
|
31885
31855
|
function _typeof(obj) {
|
|
31886
31856
|
"@babel/helpers - typeof";
|
|
@@ -31927,51 +31897,58 @@ var _excluded$2 = ["label"];
|
|
|
31927
31897
|
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
31898
|
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
31899
|
var HelpSectionMenu = function HelpSectionMenu(_ref) {
|
|
31930
|
-
var helpLinkOverrides = _ref.helpLinkOverrides
|
|
31900
|
+
var helpLinkOverrides = _ref.helpLinkOverrides,
|
|
31901
|
+
changesCount = _ref.changesCount;
|
|
31931
31902
|
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
31932
31903
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
31933
31904
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
31905
|
+
var showChangesCount = false;
|
|
31934
31906
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
31935
|
-
return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
31907
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
|
|
31936
31908
|
onClick: function onClick() {
|
|
31937
31909
|
return setIsOpen(true);
|
|
31938
31910
|
}
|
|
31911
|
+
}), key === "changelogProps" && changesCount && {
|
|
31912
|
+
changesCount: changesCount
|
|
31939
31913
|
});
|
|
31940
31914
|
}).filter(function (_ref2) {
|
|
31941
31915
|
var hide = _ref2.hide;
|
|
31942
31916
|
return !hide;
|
|
31943
31917
|
});
|
|
31944
|
-
return /*#__PURE__*/React__default["default"].createElement("ul",
|
|
31918
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
31919
|
+
className: "neeto-molecules-help-sublist"
|
|
31920
|
+
}, helpLinks.map(function (_ref3, idx) {
|
|
31945
31921
|
var label = _ref3.label,
|
|
31946
31922
|
buttonProps = _objectWithoutProperties(_ref3, _excluded$2);
|
|
31947
31923
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
31948
31924
|
className: "neeto-molecules-help-sublist__item",
|
|
31949
31925
|
key: idx
|
|
31950
31926
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
31927
|
+
fullWidth: true,
|
|
31951
31928
|
className: "neeto-molecules-help-sublist__item-btn",
|
|
31952
31929
|
iconPosition: "left",
|
|
31953
31930
|
iconSize: 18,
|
|
31954
31931
|
style: "text"
|
|
31955
|
-
}, buttonProps), label,
|
|
31956
|
-
className: "neeto-molecules-help-sublist__item-btn-count",
|
|
31957
|
-
"data-testid": "help-section-menu-changes-count"
|
|
31958
|
-
}, buttonProps.changesCount)));
|
|
31932
|
+
}, buttonProps), label, showChangesCount ));
|
|
31959
31933
|
}));
|
|
31960
31934
|
};
|
|
31961
31935
|
|
|
31962
31936
|
var ProfileSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
31963
31937
|
var profileInfo = _ref.profileInfo;
|
|
31964
31938
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
31965
|
-
className: "neeto-molecules-sidebar__profile-
|
|
31939
|
+
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
31966
31940
|
"data-cy": "profile-section",
|
|
31967
31941
|
ref: ref
|
|
31968
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
31969
|
-
className: "neeto-molecules-sidebar__profile neeto-ui-flex neeto-ui-w-full neeto-ui-flex-shrink-0 neeto-ui-items-center"
|
|
31970
31942
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Avatar, {
|
|
31971
|
-
className: "neeto-ui-flex-shrink-0",
|
|
31972
|
-
size: "
|
|
31943
|
+
className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
|
|
31944
|
+
size: "small",
|
|
31973
31945
|
user: profileInfo
|
|
31974
|
-
})
|
|
31946
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
31947
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
31948
|
+
component: "span",
|
|
31949
|
+
style: "body2",
|
|
31950
|
+
weight: "normal"
|
|
31951
|
+
}, pure.truncate(profileInfo.name, 18)));
|
|
31975
31952
|
});
|
|
31976
31953
|
ProfileSection.displayName = "ProfileSection";
|
|
31977
31954
|
|
|
@@ -32002,22 +31979,19 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
32002
31979
|
_ref2$icon = _ref2.icon,
|
|
32003
31980
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
32004
31981
|
otherProps = _objectWithoutProperties(_ref2, _excluded$1);
|
|
32005
|
-
var IconSVG = icon;
|
|
32006
31982
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
32007
31983
|
className: "neeto-molecules-profile-sublist__item",
|
|
32008
31984
|
key: idx
|
|
32009
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31985
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
31986
|
+
fullWidth: true,
|
|
31987
|
+
className: "neeto-molecules-profile-sublist__item-btn",
|
|
31988
|
+
icon: icon,
|
|
31989
|
+
iconPosition: "left",
|
|
31990
|
+
iconSize: 18,
|
|
31991
|
+
label: label,
|
|
31992
|
+
style: "text",
|
|
32010
31993
|
onClick: onClick
|
|
32011
|
-
}, otherProps
|
|
32012
|
-
className: "neeto-molecules-profile-sublist__item-btn"
|
|
32013
|
-
}), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32014
|
-
className: "neeto-molecules-profile-sublist__item-btn-icon"
|
|
32015
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32016
|
-
className: "neeto-molecules-profile-sublist__item-btn-label",
|
|
32017
|
-
component: "span",
|
|
32018
|
-
style: "body2",
|
|
32019
|
-
weight: "normal"
|
|
32020
|
-
}, label)));
|
|
31994
|
+
}, otherProps)));
|
|
32021
31995
|
}));
|
|
32022
31996
|
};
|
|
32023
31997
|
|
|
@@ -32061,7 +32035,6 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
32061
32035
|
};
|
|
32062
32036
|
|
|
32063
32037
|
var Footer = function Footer(_ref) {
|
|
32064
|
-
var _helpLinkOverrides$ch;
|
|
32065
32038
|
var extraTopLinks = _ref.extraTopLinks,
|
|
32066
32039
|
helpLinkOverrides = _ref.helpLinkOverrides,
|
|
32067
32040
|
profileInfoOverrides = _ref.profileInfoOverrides,
|
|
@@ -32069,16 +32042,35 @@ var Footer = function Footer(_ref) {
|
|
|
32069
32042
|
showAppSwitcher = _ref$showAppSwitcher === void 0 ? false : _ref$showAppSwitcher,
|
|
32070
32043
|
onAppSwitcherToggle = _ref.onAppSwitcherToggle;
|
|
32071
32044
|
var profileInfo = getProfileInfo(profileInfoOverrides);
|
|
32072
|
-
var
|
|
32045
|
+
var _useState = React.useState(null),
|
|
32046
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32047
|
+
changesCount = _useState2[0],
|
|
32048
|
+
setChangesCount = _useState2[1];
|
|
32049
|
+
React.useEffect(function () {
|
|
32050
|
+
var Nv = {
|
|
32051
|
+
onReceiveData: function onReceiveData(data) {
|
|
32052
|
+
if (data.unreadCount) {
|
|
32053
|
+
setChangesCount(data.unreadCount);
|
|
32054
|
+
}
|
|
32055
|
+
},
|
|
32056
|
+
onShow: function onShow() {
|
|
32057
|
+
setChangesCount(null);
|
|
32058
|
+
}
|
|
32059
|
+
};
|
|
32060
|
+
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
32061
|
+
}, []);
|
|
32073
32062
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32074
|
-
className: "neeto-molecules-sidebar__footer"
|
|
32063
|
+
className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
|
|
32075
32064
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
|
|
32076
32065
|
interactive: true,
|
|
32077
32066
|
className: "neeto-molecules-help-popup-wrapper",
|
|
32078
32067
|
content: /*#__PURE__*/React__default["default"].createElement(HelpSectionMenu, {
|
|
32068
|
+
changesCount: changesCount,
|
|
32079
32069
|
helpLinkOverrides: helpLinkOverrides
|
|
32080
32070
|
}),
|
|
32081
32071
|
hideOnClick: false,
|
|
32072
|
+
interactiveDebounce: 30,
|
|
32073
|
+
offset: 0,
|
|
32082
32074
|
position: "right",
|
|
32083
32075
|
theme: "light"
|
|
32084
32076
|
}, /*#__PURE__*/React__default["default"].createElement(HelpSection, {
|
|
@@ -32089,6 +32081,8 @@ var Footer = function Footer(_ref) {
|
|
|
32089
32081
|
interactive: true,
|
|
32090
32082
|
className: "neeto-molecules-profile-popup-wrapper",
|
|
32091
32083
|
hideOnClick: false,
|
|
32084
|
+
interactiveDebounce: 30,
|
|
32085
|
+
offset: 0,
|
|
32092
32086
|
position: "right",
|
|
32093
32087
|
theme: "light",
|
|
32094
32088
|
content: /*#__PURE__*/React__default["default"].createElement(ProfileMenu, {
|
|
@@ -32108,17 +32102,30 @@ var Header = function Header() {
|
|
|
32108
32102
|
name: globalProps.appName.split("neeto")[1]
|
|
32109
32103
|
}, globalProps.neetoApps)) === null || _findBy2 === void 0 ? void 0 : _findBy2.url) !== null && _findBy$url !== void 0 ? _findBy$url : window.location.origin);
|
|
32110
32104
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32111
|
-
className: "neeto-
|
|
32105
|
+
className: "neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable",
|
|
32112
32106
|
"data-cy": "sidebar-info"
|
|
32113
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32114
|
-
className: "neeto-molecules-sidebar__logo flex flex-shrink-0 items-center justify-center"
|
|
32115
32107
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
32108
|
+
className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
|
|
32116
32109
|
to: homeUrl.pathname
|
|
32117
|
-
}, ProductLogo ? /*#__PURE__*/React__default["default"].createElement(ProductLogo, null) : /*#__PURE__*/React__default["default"].createElement(ProductLogos.Neeto, null)))
|
|
32110
|
+
}, ProductLogo ? /*#__PURE__*/React__default["default"].createElement(ProductLogo, null) : /*#__PURE__*/React__default["default"].createElement(ProductLogos.Neeto, null)));
|
|
32118
32111
|
};
|
|
32119
32112
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
32120
32113
|
|
|
32121
|
-
var
|
|
32114
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
32115
|
+
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32116
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32117
|
+
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32118
|
+
return false;
|
|
32119
|
+
}
|
|
32120
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
32121
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32122
|
+
return ramda.all(function (key) {
|
|
32123
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32124
|
+
}, targetSearchKeys);
|
|
32125
|
+
};
|
|
32126
|
+
|
|
32127
|
+
var _excluded = ["label", "to", "icon", "items"],
|
|
32128
|
+
_excluded2 = ["label", "to", "count"];
|
|
32122
32129
|
var Links = function Links(_ref) {
|
|
32123
32130
|
var navLinks = _ref.navLinks;
|
|
32124
32131
|
var location = reactRouterDom.useLocation();
|
|
@@ -32130,31 +32137,64 @@ var Links = function Links(_ref) {
|
|
|
32130
32137
|
return true;
|
|
32131
32138
|
});
|
|
32132
32139
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32133
|
-
className: "neeto-molecules-sidebar__links"
|
|
32140
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
|
|
32134
32141
|
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32135
32142
|
var label = _ref3.label,
|
|
32136
32143
|
to = _ref3.to,
|
|
32137
32144
|
icon = _ref3.icon,
|
|
32138
|
-
|
|
32145
|
+
items = _ref3.items,
|
|
32139
32146
|
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32140
32147
|
var IconSVG = icon;
|
|
32141
32148
|
var url = new URL(to, window.location.href);
|
|
32142
32149
|
var isActive = function isActive() {
|
|
32143
32150
|
return location.pathname.startsWith(url.pathname);
|
|
32144
32151
|
};
|
|
32145
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
32146
|
-
|
|
32147
|
-
key: mainIndex,
|
|
32148
|
-
label: label
|
|
32152
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
32153
|
+
key: mainIndex
|
|
32149
32154
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32150
32155
|
activeClassName: "active",
|
|
32151
32156
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
32152
32157
|
isActive: isActive,
|
|
32153
32158
|
to: to
|
|
32154
|
-
}, otherProps), icon && /*#__PURE__*/React__default["default"].createElement("
|
|
32155
|
-
className: "neeto-
|
|
32159
|
+
}, otherProps), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32160
|
+
className: "neeto-molecules-sidebar__link-icon",
|
|
32156
32161
|
"data-testid": label
|
|
32157
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null))
|
|
32162
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32163
|
+
className: "neeto-molecules-sidebar__link-label",
|
|
32164
|
+
component: "span",
|
|
32165
|
+
style: "body2",
|
|
32166
|
+
weight: "normal"
|
|
32167
|
+
}, label), items && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
32168
|
+
className: classnames("neeto-molecules-sidebar__link-icon", {
|
|
32169
|
+
"neeto-molecules-sidebar__link-icon--rotate": isActive()
|
|
32170
|
+
})
|
|
32171
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
|
|
32172
|
+
size: 16
|
|
32173
|
+
}))), items && isActive() && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32174
|
+
className: "neeto-molecules-sidebar__sublink-wrapper"
|
|
32175
|
+
}, items.map(function (_ref4, subIndex) {
|
|
32176
|
+
var subLabel = _ref4.label,
|
|
32177
|
+
subRoute = _ref4.to,
|
|
32178
|
+
count = _ref4.count,
|
|
32179
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
32180
|
+
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
|
|
32181
|
+
activeClassName: "active",
|
|
32182
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
32183
|
+
isActive: function isActive() {
|
|
32184
|
+
return isSubRouteActive(subRoute, location);
|
|
32185
|
+
},
|
|
32186
|
+
key: subIndex,
|
|
32187
|
+
to: subRoute
|
|
32188
|
+
}, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32189
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
32190
|
+
component: "span",
|
|
32191
|
+
style: "body2"
|
|
32192
|
+
}, subLabel), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
32193
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
32194
|
+
component: "span",
|
|
32195
|
+
style: "body2"
|
|
32196
|
+
}, count));
|
|
32197
|
+
})));
|
|
32158
32198
|
}));
|
|
32159
32199
|
};
|
|
32160
32200
|
|
|
@@ -32172,15 +32212,25 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32172
32212
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32173
32213
|
isAppSwitcherOpen = _useState2[0],
|
|
32174
32214
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32215
|
+
var _useState3 = React.useState(false),
|
|
32216
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32217
|
+
isSidebarCollapsed = _useState4[0],
|
|
32218
|
+
setIsSidebarCollapsed = _useState4[1];
|
|
32175
32219
|
var location = reactRouterDom.useLocation();
|
|
32220
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
32221
|
+
t = _useTranslation.t;
|
|
32176
32222
|
React.useEffect(function () {
|
|
32177
32223
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
32178
32224
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32179
32225
|
}, [location]);
|
|
32180
32226
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32227
|
+
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32228
|
+
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32229
|
+
})
|
|
32230
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32231
|
+
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",
|
|
32181
32232
|
"data-cy": "sidebar-wrapper",
|
|
32182
|
-
"data-testid": "sidebar"
|
|
32183
|
-
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")
|
|
32233
|
+
"data-testid": "sidebar"
|
|
32184
32234
|
}, /*#__PURE__*/React__default["default"].createElement(Header$1, null), /*#__PURE__*/React__default["default"].createElement(Links, {
|
|
32185
32235
|
navLinks: navLinks
|
|
32186
32236
|
}), /*#__PURE__*/React__default["default"].createElement(Footer, {
|
|
@@ -32191,6 +32241,17 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32191
32241
|
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
32192
32242
|
return setIsAppSwitcherOpen(ramda.not);
|
|
32193
32243
|
}
|
|
32244
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
32245
|
+
className: "neeto-molecules-sidebar__toggler",
|
|
32246
|
+
icon: isSidebarCollapsed ? neetoIcons.SidebarOpen : neetoIcons.SidebarClose,
|
|
32247
|
+
style: "text",
|
|
32248
|
+
tooltipProps: {
|
|
32249
|
+
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
32250
|
+
position: "bottom"
|
|
32251
|
+
},
|
|
32252
|
+
onClick: function onClick() {
|
|
32253
|
+
return setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32254
|
+
}
|
|
32194
32255
|
})), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(AppSwitcher, {
|
|
32195
32256
|
isOpen: isAppSwitcherOpen,
|
|
32196
32257
|
onClose: function onClose() {
|