@bigbinary/neeto-molecules 4.1.17 → 4.1.18
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.
|
@@ -26,13 +26,16 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
26
26
|
import { useQuery } from '@tanstack/react-query';
|
|
27
27
|
import axios from 'axios';
|
|
28
28
|
import Crown from '@bigbinary/neeto-icons/Crown';
|
|
29
|
-
import { t } from 'i18next';
|
|
30
|
-
import Book from '@bigbinary/neeto-icons/Book';
|
|
31
29
|
import useBreakpoints from '@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints';
|
|
32
|
-
import
|
|
33
|
-
import
|
|
30
|
+
import Book from '@bigbinary/neeto-icons/Book';
|
|
31
|
+
import ChatQuestions from '@bigbinary/neeto-icons/ChatQuestions';
|
|
32
|
+
import Community from '@bigbinary/neeto-icons/Community';
|
|
33
|
+
import Status from '@bigbinary/neeto-icons/Status';
|
|
34
34
|
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
35
35
|
import Right from '@bigbinary/neeto-icons/Right';
|
|
36
|
+
import { t } from 'i18next';
|
|
37
|
+
import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
|
|
38
|
+
import Tag from '@bigbinary/neetoui/Tag';
|
|
36
39
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
37
40
|
import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage';
|
|
38
41
|
import Moon from '@bigbinary/neeto-icons/Moon';
|
|
@@ -64,21 +67,21 @@ var SPECIAL_APP_NAMES = {
|
|
|
64
67
|
var css$1 = ".neeto-molecules-product-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:24px;position:relative;transition:all .3s;width:100%}@media (prefers-reduced-motion:reduce){.neeto-molecules-product-switcher__wrapper{transition:none}}@media screen and (max-width:768px){.neeto-molecules-product-switcher__wrapper{padding:16px}}.neeto-molecules-product-switcher__grid{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-product-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}@media only screen and (max-width:640px){.neeto-molecules-product-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(100%,1fr))}}.neeto-molecules-product-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-product-switcher__header{align-items:flex-start;flex-direction:column;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-product-switcher__header h1{font-size:24px}}@media only screen and (max-width:768px){.neeto-molecules-product-switcher_modal-container .neeto-molecules-product-switcher__header-mobile{align-items:flex-start;margin-bottom:24px}}.neeto-molecules-product-switcher_modal-container .neeto-molecules-product-switcher__wrapper{padding:0}.neeto-molecules-product-switcher__close-btn{inset-inline-end:12px;position:absolute;top:12px}.neeto-molecules-product-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-product-switcher__search-wrapper{flex-grow:0;width:296px}}.neeto-molecules-product-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-product-switcher-link{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-200));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:1px;cursor:pointer;display:flex;flex-direction:column;gap:16px;max-width:100%;padding:10px 8px;text-decoration:none;transition:all .3s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.neeto-molecules-product-switcher-link{transition:none}}.neeto-molecules-product-switcher-link:focus,.neeto-molecules-product-switcher-link:focus-visible{outline:none}.neeto-molecules-product-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-product-switcher-link:not(.neeto-molecules-product-switcher-link--active):hover{border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-product-switcher-link--active{background-color:rgb(var(--neeto-ui-primary-50));border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-product-switcher-link--highlighted{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-product-switcher-link__icon-holder{flex-grow:1;flex-shrink:0}.neeto-molecules-product-switcher-link__icon-holder svg{height:36px;width:auto}.neeto-molecules-product-switcher-link__icon-holder .neeto-molecules-product-switcher-link__icon-default{height:24px}.neeto-molecules-product-switcher-link__content{flex-shrink:0}.neeto-molecules-product-switcher-link__content span{display:block}.neeto-molecules-product-switcher_modal{z-index:100000}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen{display:flex;flex-direction:column;height:100dvh!important;width:100vw!important}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__header{flex-shrink:0}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__body{--neeto-ui-modal-body-padding-top:24px;flex-grow:1;min-height:0;overflow-y:auto}.neeto-ui-theme--dark .neeto-molecules-product-switcher__wrapper [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal{--neeto-molecules-product-switcher-modal-padding-y:24px;align-items:flex-start;padding-bottom:var(--neeto-molecules-product-switcher-modal-padding-y);padding-top:var(--neeto-molecules-product-switcher-modal-padding-y)}@media only screen and (min-width:1024px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal{--neeto-molecules-product-switcher-modal-padding-y:40px}}@media only screen and (min-width:1536px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal{--neeto-molecules-product-switcher-modal-padding-y:80px}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-body-padding-top:24px;--neeto-ui-modal-body-padding-bottom:24px;--neeto-ui-modal-close-btn-top:12px;--neeto-ui-modal-close-btn-right:12px;--neeto-ui-modal-body-padding-x:0;--neeto-ui-text-h1:24px}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher-link__icon-holder svg{height:32px}@media only screen and (min-width:1024px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-wrapper-width:960px}}@media only screen and (min-width:1280px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-wrapper-width:1024px}}@media only screen and (min-width:1536px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-wrapper-width:1280px}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher-link__icon-holder svg{height:36px}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__header{background-color:rgb(var(--neeto-ui-white));margin-bottom:32px;padding-inline-end:56px;padding-inline-start:24px}@media only screen and (max-width:768px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__header{gap:16px;margin-bottom:16px}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__body{height:calc(100dvh - var(--neeto-molecules-product-switcher-modal-padding-y)*2 - 124px);margin-bottom:0;overflow-y:auto;padding-inline-end:24px;padding-inline-start:24px}@media only screen and (max-width:768px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__body{height:calc(90dvh - var(--neeto-molecules-product-switcher-modal-padding-y)*2 - 124px)}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-ui-modal__close{z-index:2}@media only screen and (min-width:1280px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__search-wrapper{width:420px}}@media only screen and (min-width:1536px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__search-wrapper{width:500px}}";
|
|
65
68
|
n(css$1,{});
|
|
66
69
|
|
|
67
|
-
var _excluded$
|
|
68
|
-
function ownKeys$
|
|
69
|
-
function _objectSpread$
|
|
70
|
+
var _excluded$3 = ["name", "description", "url", "isHighlighted"];
|
|
71
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
72
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
70
73
|
var ProductLink = function ProductLink(_ref) {
|
|
71
74
|
var name = _ref.name,
|
|
72
75
|
description = _ref.description,
|
|
73
76
|
url = _ref.url,
|
|
74
77
|
_ref$isHighlighted = _ref.isHighlighted,
|
|
75
78
|
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
76
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
79
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
77
80
|
var normalizedName = (name || "").toLowerCase();
|
|
78
81
|
var specialCase = SPECIAL_APP_NAMES[normalizedName];
|
|
79
82
|
var appName = "Neeto".concat(name.charAt(0)).concat(name.slice(1).toLowerCase());
|
|
80
83
|
var AppIcon = specialCase ? AppIcons["Neeto".concat(specialCase)] : AppIcons[appName];
|
|
81
|
-
return /*#__PURE__*/jsxs("a", _objectSpread$
|
|
84
|
+
return /*#__PURE__*/jsxs("a", _objectSpread$7(_objectSpread$7({
|
|
82
85
|
"data-testid": "".concat(normalizedName, "-app-link"),
|
|
83
86
|
href: url,
|
|
84
87
|
rel: "noreferrer",
|
|
@@ -107,8 +110,8 @@ var ProductLink = function ProductLink(_ref) {
|
|
|
107
110
|
};
|
|
108
111
|
var ProductLink$1 = /*#__PURE__*/memo(ProductLink);
|
|
109
112
|
|
|
110
|
-
function ownKeys$
|
|
111
|
-
function _objectSpread$
|
|
113
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
114
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
112
115
|
var Content = function Content(_ref) {
|
|
113
116
|
var highlightedIndex = _ref.highlightedIndex,
|
|
114
117
|
filteredApps = _ref.filteredApps,
|
|
@@ -124,7 +127,7 @@ var Content = function Content(_ref) {
|
|
|
124
127
|
return (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/jsx("div", {
|
|
125
128
|
className: "neeto-molecules-product-switcher__grid",
|
|
126
129
|
children: filteredApps.map(function (app, index) {
|
|
127
|
-
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$
|
|
130
|
+
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$6(_objectSpread$6({}, app), {}, {
|
|
128
131
|
"data-highlighted-index": index,
|
|
129
132
|
isHighlighted: index === highlightedIndex
|
|
130
133
|
}), app.name);
|
|
@@ -144,10 +147,10 @@ var neetoAppsApi = {
|
|
|
144
147
|
fetch: fetch$1
|
|
145
148
|
};
|
|
146
149
|
|
|
147
|
-
function ownKeys$
|
|
148
|
-
function _objectSpread$
|
|
150
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
151
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
149
152
|
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
150
|
-
return useQuery(_objectSpread$
|
|
153
|
+
return useQuery(_objectSpread$5({
|
|
151
154
|
queryKey: [QUERY_KEYS$1.NEETO_APPS_LIST],
|
|
152
155
|
queryFn: neetoAppsApi.fetch
|
|
153
156
|
}, options));
|
|
@@ -242,7 +245,7 @@ var useProductSwitcherNavigation = function useProductSwitcherNavigation() {
|
|
|
242
245
|
};
|
|
243
246
|
};
|
|
244
247
|
|
|
245
|
-
var Menu$
|
|
248
|
+
var Menu$4 = function Menu(_ref) {
|
|
246
249
|
var _ref$isMobile = _ref.isMobile,
|
|
247
250
|
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
248
251
|
initialFocusRef = _ref.initialFocusRef;
|
|
@@ -326,7 +329,7 @@ var Modal = function Modal(_ref) {
|
|
|
326
329
|
children: /*#__PURE__*/jsx("div", {
|
|
327
330
|
className: "neeto-molecules-product-switcher_modal-container",
|
|
328
331
|
"data-testid": "product-switcher-modal",
|
|
329
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
332
|
+
children: /*#__PURE__*/jsx(Menu$4, {
|
|
330
333
|
initialFocusRef: initialFocusRef
|
|
331
334
|
})
|
|
332
335
|
})
|
|
@@ -334,6 +337,94 @@ var Modal = function Modal(_ref) {
|
|
|
334
337
|
});
|
|
335
338
|
};
|
|
336
339
|
|
|
340
|
+
var _excluded$2 = ["t", "tReady"];
|
|
341
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
342
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
343
|
+
var MenuItem$7 = Dropdown$1.MenuItem;
|
|
344
|
+
var MenuButton$3 = withT(function (_ref) {
|
|
345
|
+
var t = _ref.t;
|
|
346
|
+
_ref.tReady;
|
|
347
|
+
var otherProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
348
|
+
return /*#__PURE__*/jsx(MenuItem$7.Button, _objectSpread$4(_objectSpread$4({
|
|
349
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
350
|
+
"data-testid": "help-menu-button",
|
|
351
|
+
prefix: /*#__PURE__*/jsx(Help, {
|
|
352
|
+
size: 18
|
|
353
|
+
}),
|
|
354
|
+
style: "text",
|
|
355
|
+
suffix: /*#__PURE__*/jsx(Right, {
|
|
356
|
+
className: "rtl:scale-x-[-1]",
|
|
357
|
+
size: 18
|
|
358
|
+
})
|
|
359
|
+
}, otherProps), {}, {
|
|
360
|
+
children: t("neetoMolecules.sidebar.help")
|
|
361
|
+
}));
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
var Menu$3 = Dropdown$1.Menu,
|
|
365
|
+
MenuItem$6 = Dropdown$1.MenuItem;
|
|
366
|
+
var HelpMenu = function HelpMenu() {
|
|
367
|
+
var _useTranslation = useTranslation(),
|
|
368
|
+
t = _useTranslation.t;
|
|
369
|
+
var _useBreakpoints = useBreakpoints(),
|
|
370
|
+
isSize = _useBreakpoints.isSize;
|
|
371
|
+
var isMobile = isSize("mobile");
|
|
372
|
+
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
373
|
+
closeOnSelect: false,
|
|
374
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$3, {}),
|
|
375
|
+
interactiveDebounce: 30,
|
|
376
|
+
offset: [0, 5],
|
|
377
|
+
position: isMobile ? "bottom" : "right",
|
|
378
|
+
trigger: "all",
|
|
379
|
+
zIndex: 99999,
|
|
380
|
+
children: /*#__PURE__*/jsxs(Menu$3, {
|
|
381
|
+
children: [/*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
382
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
383
|
+
"data-testid": "help-link-help-articles-button",
|
|
384
|
+
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
385
|
+
prefix: /*#__PURE__*/jsx(Book, {
|
|
386
|
+
size: 18
|
|
387
|
+
}),
|
|
388
|
+
rel: "noreferrer",
|
|
389
|
+
target: "_blank",
|
|
390
|
+
children: t("neetoMolecules.sidebar.helpLinks.helpArticles")
|
|
391
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
392
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
393
|
+
"data-testid": "help-link-live-chat-button",
|
|
394
|
+
prefix: /*#__PURE__*/jsx(ChatQuestions, {
|
|
395
|
+
size: 18
|
|
396
|
+
}),
|
|
397
|
+
onClick: function onClick() {
|
|
398
|
+
var _window$NeetoChat, _window$NeetoChat2;
|
|
399
|
+
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
|
|
400
|
+
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
401
|
+
},
|
|
402
|
+
children: t("neetoMolecules.sidebar.helpLinks.liveChat")
|
|
403
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
404
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
405
|
+
"data-testid": "help-link-community-button",
|
|
406
|
+
href: "https://www.launchpass.com/neetohq",
|
|
407
|
+
prefix: /*#__PURE__*/jsx(Community, {
|
|
408
|
+
size: 18
|
|
409
|
+
}),
|
|
410
|
+
rel: "noreferrer",
|
|
411
|
+
target: "_blank",
|
|
412
|
+
children: t("neetoMolecules.sidebar.helpLinks.askTheCommunity")
|
|
413
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
414
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
415
|
+
"data-testid": "help-link-status-button",
|
|
416
|
+
href: "https://neetostatus.com/",
|
|
417
|
+
prefix: /*#__PURE__*/jsx(Status, {
|
|
418
|
+
size: 18
|
|
419
|
+
}),
|
|
420
|
+
rel: "noreferrer",
|
|
421
|
+
target: "_blank",
|
|
422
|
+
children: t("neetoMolecules.sidebar.helpLinks.systemStatus")
|
|
423
|
+
})]
|
|
424
|
+
})
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
|
|
337
428
|
var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
338
429
|
var _window$globalProps;
|
|
339
430
|
var currentUserEmail = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.email;
|
|
@@ -341,25 +432,6 @@ var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
|
341
432
|
};
|
|
342
433
|
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
343
434
|
var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
|
|
344
|
-
var DEFAULT_HELP_LINK_PROPS = {
|
|
345
|
-
helpCenterProps: {
|
|
346
|
-
label: t("neetoMolecules.sidebar.helpLinks.helpCenter"),
|
|
347
|
-
icon: Book,
|
|
348
|
-
"data-testid": "help-link-help-center-button",
|
|
349
|
-
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
350
|
-
target: "_blank"
|
|
351
|
-
},
|
|
352
|
-
liveChatProps: {
|
|
353
|
-
label: t("neetoMolecules.sidebar.helpLinks.liveChat"),
|
|
354
|
-
icon: Help,
|
|
355
|
-
"data-testid": "help-link-live-chat-button",
|
|
356
|
-
onClick: function onClick() {
|
|
357
|
-
var _window$NeetoChat, _window$NeetoChat2;
|
|
358
|
-
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
|
|
359
|
-
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
435
|
var DEFAULT_MENU_LINK_PROPS = {
|
|
364
436
|
engageProps: {
|
|
365
437
|
id: ENGAGE_WIDGET_TRIGGER_ID,
|
|
@@ -370,22 +442,6 @@ var DEFAULT_MENU_LINK_PROPS = {
|
|
|
370
442
|
keyboardShortcutProps: {
|
|
371
443
|
label: t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
|
|
372
444
|
"data-testid": "help-link-keyboard-shortcut-button"
|
|
373
|
-
},
|
|
374
|
-
statusProps: {
|
|
375
|
-
label: t("neetoMolecules.sidebar.helpLinks.productStatus", {
|
|
376
|
-
app: globalProps.appName
|
|
377
|
-
}),
|
|
378
|
-
"data-testid": "help-link-status-button",
|
|
379
|
-
href: "https://neetostatus.com/",
|
|
380
|
-
target: "_blank"
|
|
381
|
-
},
|
|
382
|
-
communityProps: {
|
|
383
|
-
label: t("neetoMolecules.sidebar.helpLinks.community", {
|
|
384
|
-
app: globalProps.appName
|
|
385
|
-
}),
|
|
386
|
-
"data-testid": "help-link-community-button",
|
|
387
|
-
href: "https://www.launchpass.com/neetohq",
|
|
388
|
-
target: "_blank"
|
|
389
445
|
}
|
|
390
446
|
};
|
|
391
447
|
var NON_BUTTON_PROPS = ["isVisible"];
|
|
@@ -568,7 +624,7 @@ var Dropdown = function Dropdown() {
|
|
|
568
624
|
},
|
|
569
625
|
children: /*#__PURE__*/jsx(Menu$1, {
|
|
570
626
|
children: /*#__PURE__*/jsx(MenuItem$3, {
|
|
571
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
627
|
+
children: /*#__PURE__*/jsx(Menu$4, {})
|
|
572
628
|
})
|
|
573
629
|
})
|
|
574
630
|
});
|
|
@@ -820,7 +876,6 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
820
876
|
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4;
|
|
821
877
|
var profileInfo = _ref.profileInfo,
|
|
822
878
|
showProductSwitcher = _ref.showProductSwitcher,
|
|
823
|
-
helpLinks = _ref.helpLinks,
|
|
824
879
|
defaultLinks = _ref.defaultLinks,
|
|
825
880
|
topLinks = _ref.topLinks,
|
|
826
881
|
bottomLinks = _ref.bottomLinks,
|
|
@@ -873,9 +928,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
873
928
|
}]
|
|
874
929
|
}), showProductSwitcher && /*#__PURE__*/jsx(ProductSwitcher, {
|
|
875
930
|
toggleModal: toggleModal
|
|
876
|
-
}), /*#__PURE__*/jsx(
|
|
877
|
-
links: helpLinks
|
|
878
|
-
}), /*#__PURE__*/jsx(Divider, {})]
|
|
931
|
+
}), /*#__PURE__*/jsx(HelpMenu, {}), /*#__PURE__*/jsx(Divider, {})]
|
|
879
932
|
}), isAuthenticated && /*#__PURE__*/jsx(MenuItem.Button, {
|
|
880
933
|
className: "neeto-molecules-profile-popup",
|
|
881
934
|
"data-testid": "my-profile-button",
|
|
@@ -939,12 +992,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
939
992
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
940
993
|
}, []);
|
|
941
994
|
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
|
|
942
|
-
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
943
|
-
return _objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]);
|
|
944
|
-
}).filter(function (_ref2) {
|
|
945
|
-
var hide = _ref2.hide;
|
|
946
|
-
return !hide;
|
|
947
|
-
});
|
|
948
995
|
var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).filter(function (key) {
|
|
949
996
|
var _DEFAULT_MENU_LINK_PR, _DEFAULT_MENU_LINK_PR2, _DEFAULT_MENU_LINK_PR3;
|
|
950
997
|
return (_DEFAULT_MENU_LINK_PR = (_DEFAULT_MENU_LINK_PR2 = (_DEFAULT_MENU_LINK_PR3 = DEFAULT_MENU_LINK_PROPS[key]).isVisible) === null || _DEFAULT_MENU_LINK_PR2 === void 0 ? void 0 : _DEFAULT_MENU_LINK_PR2.call(_DEFAULT_MENU_LINK_PR3)) !== null && _DEFAULT_MENU_LINK_PR !== void 0 ? _DEFAULT_MENU_LINK_PR : true;
|
|
@@ -958,8 +1005,8 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
958
1005
|
}), key === "engageProps" && changesCount && {
|
|
959
1006
|
changesCount: changesCount
|
|
960
1007
|
});
|
|
961
|
-
}).filter(function (
|
|
962
|
-
var hide =
|
|
1008
|
+
}).filter(function (_ref2) {
|
|
1009
|
+
var hide = _ref2.hide;
|
|
963
1010
|
return !hide;
|
|
964
1011
|
});
|
|
965
1012
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -1008,7 +1055,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1008
1055
|
children: /*#__PURE__*/jsx(ProfileMenu, {
|
|
1009
1056
|
customContent: customContent,
|
|
1010
1057
|
defaultLinks: defaultLinks,
|
|
1011
|
-
helpLinks: helpLinks,
|
|
1012
1058
|
isConsumer: isConsumer,
|
|
1013
1059
|
isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
|
|
1014
1060
|
isThemeSwitcherEnabled: isThemeSwitcherEnabled,
|