@bigbinary/neeto-molecules 4.1.34 → 4.1.36
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/FloatingActionMenu.js +129 -65
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +129 -65
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/ar.json +2 -1
- package/src/translations/bg.json +2 -1
- package/src/translations/ca.json +2 -1
- package/src/translations/cs.json +2 -1
- package/src/translations/da.json +2 -1
- package/src/translations/de.json +2 -1
- package/src/translations/en.json +1 -0
- package/src/translations/es-MX.json +2 -1
- package/src/translations/es.json +2 -1
- package/src/translations/et.json +2 -1
- package/src/translations/fi.json +2 -1
- package/src/translations/fil.json +2 -1
- package/src/translations/fr.json +2 -1
- package/src/translations/he.json +2 -1
- package/src/translations/hi.json +2 -1
- package/src/translations/hr.json +2 -1
- package/src/translations/hu.json +2 -1
- package/src/translations/id.json +2 -1
- package/src/translations/it.json +2 -1
- package/src/translations/ja.json +2 -1
- package/src/translations/ko.json +2 -1
- package/src/translations/nl.json +2 -1
- package/src/translations/pl.json +2 -1
- package/src/translations/pt-BR.json +2 -1
- package/src/translations/pt.json +2 -1
- package/src/translations/ro.json +2 -1
- package/src/translations/ru.json +2 -1
- package/src/translations/sk.json +2 -1
- package/src/translations/sl.json +2 -1
- package/src/translations/sv.json +2 -1
- package/src/translations/th.json +2 -1
- package/src/translations/tr.json +2 -1
- package/src/translations/uk.json +2 -1
- package/src/translations/vi.json +2 -1
- package/src/translations/zh-CN.json +2 -1
- package/src/translations/zh-TW.json +2 -1
|
@@ -37,6 +37,8 @@ import { t } from 'i18next';
|
|
|
37
37
|
import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
|
|
38
38
|
import Tag from '@bigbinary/neetoui/Tag';
|
|
39
39
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
40
|
+
import CloseCircle from '@bigbinary/neeto-icons/CloseCircle';
|
|
41
|
+
import User from '@bigbinary/neeto-icons/User';
|
|
40
42
|
import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage';
|
|
41
43
|
import Moon from '@bigbinary/neeto-icons/Moon';
|
|
42
44
|
import Sun from '@bigbinary/neeto-icons/Sun';
|
|
@@ -67,21 +69,21 @@ var SPECIAL_APP_NAMES = {
|
|
|
67
69
|
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}}";
|
|
68
70
|
n(css$1,{});
|
|
69
71
|
|
|
70
|
-
var _excluded$
|
|
71
|
-
function ownKeys$
|
|
72
|
-
function _objectSpread$
|
|
72
|
+
var _excluded$4 = ["name", "description", "url", "isHighlighted"];
|
|
73
|
+
function ownKeys$8(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; }
|
|
74
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
73
75
|
var ProductLink = function ProductLink(_ref) {
|
|
74
76
|
var name = _ref.name,
|
|
75
77
|
description = _ref.description,
|
|
76
78
|
url = _ref.url,
|
|
77
79
|
_ref$isHighlighted = _ref.isHighlighted,
|
|
78
80
|
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
79
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
81
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
80
82
|
var normalizedName = (name || "").toLowerCase();
|
|
81
83
|
var specialCase = SPECIAL_APP_NAMES[normalizedName];
|
|
82
84
|
var appName = "Neeto".concat(name.charAt(0)).concat(name.slice(1).toLowerCase());
|
|
83
85
|
var AppIcon = specialCase ? AppIcons["Neeto".concat(specialCase)] : AppIcons[appName];
|
|
84
|
-
return /*#__PURE__*/jsxs("a", _objectSpread$
|
|
86
|
+
return /*#__PURE__*/jsxs("a", _objectSpread$8(_objectSpread$8({
|
|
85
87
|
"data-testid": "".concat(normalizedName, "-app-link"),
|
|
86
88
|
href: url,
|
|
87
89
|
rel: "noreferrer",
|
|
@@ -110,8 +112,8 @@ var ProductLink = function ProductLink(_ref) {
|
|
|
110
112
|
};
|
|
111
113
|
var ProductLink$1 = /*#__PURE__*/memo(ProductLink);
|
|
112
114
|
|
|
113
|
-
function ownKeys$
|
|
114
|
-
function _objectSpread$
|
|
115
|
+
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; }
|
|
116
|
+
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; }
|
|
115
117
|
var Content = function Content(_ref) {
|
|
116
118
|
var highlightedIndex = _ref.highlightedIndex,
|
|
117
119
|
filteredApps = _ref.filteredApps,
|
|
@@ -127,7 +129,7 @@ var Content = function Content(_ref) {
|
|
|
127
129
|
return (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/jsx("div", {
|
|
128
130
|
className: "neeto-molecules-product-switcher__grid",
|
|
129
131
|
children: filteredApps.map(function (app, index) {
|
|
130
|
-
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$
|
|
132
|
+
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$7(_objectSpread$7({}, app), {}, {
|
|
131
133
|
"data-highlighted-index": index,
|
|
132
134
|
isHighlighted: index === highlightedIndex
|
|
133
135
|
}), app.name);
|
|
@@ -147,10 +149,10 @@ var neetoAppsApi = {
|
|
|
147
149
|
fetch: fetch$1
|
|
148
150
|
};
|
|
149
151
|
|
|
150
|
-
function ownKeys$
|
|
151
|
-
function _objectSpread$
|
|
152
|
+
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; }
|
|
153
|
+
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; }
|
|
152
154
|
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
153
|
-
return useQuery(_objectSpread$
|
|
155
|
+
return useQuery(_objectSpread$6({
|
|
154
156
|
queryKey: [QUERY_KEYS$1.NEETO_APPS_LIST],
|
|
155
157
|
queryFn: neetoAppsApi.fetch
|
|
156
158
|
}, options));
|
|
@@ -245,7 +247,7 @@ var useProductSwitcherNavigation = function useProductSwitcherNavigation() {
|
|
|
245
247
|
};
|
|
246
248
|
};
|
|
247
249
|
|
|
248
|
-
var Menu$
|
|
250
|
+
var Menu$5 = function Menu(_ref) {
|
|
249
251
|
var _ref$isMobile = _ref.isMobile,
|
|
250
252
|
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
251
253
|
initialFocusRef = _ref.initialFocusRef;
|
|
@@ -329,7 +331,7 @@ var Modal = function Modal(_ref) {
|
|
|
329
331
|
children: /*#__PURE__*/jsx("div", {
|
|
330
332
|
className: "neeto-molecules-product-switcher_modal-container",
|
|
331
333
|
"data-testid": "product-switcher-modal",
|
|
332
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
334
|
+
children: /*#__PURE__*/jsx(Menu$5, {
|
|
333
335
|
initialFocusRef: initialFocusRef
|
|
334
336
|
})
|
|
335
337
|
})
|
|
@@ -337,15 +339,15 @@ var Modal = function Modal(_ref) {
|
|
|
337
339
|
});
|
|
338
340
|
};
|
|
339
341
|
|
|
340
|
-
var _excluded$
|
|
341
|
-
function ownKeys$
|
|
342
|
-
function _objectSpread$
|
|
343
|
-
var MenuItem$
|
|
344
|
-
var MenuButton$
|
|
342
|
+
var _excluded$3 = ["t", "tReady"];
|
|
343
|
+
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; }
|
|
344
|
+
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; }
|
|
345
|
+
var MenuItem$9 = Dropdown$1.MenuItem;
|
|
346
|
+
var MenuButton$4 = withT(function (_ref) {
|
|
345
347
|
var t = _ref.t;
|
|
346
348
|
_ref.tReady;
|
|
347
|
-
var otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
348
|
-
return /*#__PURE__*/jsx(MenuItem$
|
|
349
|
+
var otherProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
350
|
+
return /*#__PURE__*/jsx(MenuItem$9.Button, _objectSpread$5(_objectSpread$5({
|
|
349
351
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
350
352
|
"data-testid": "help-menu-button",
|
|
351
353
|
prefix: /*#__PURE__*/jsx(Help, {
|
|
@@ -361,8 +363,8 @@ var MenuButton$3 = withT(function (_ref) {
|
|
|
361
363
|
}));
|
|
362
364
|
});
|
|
363
365
|
|
|
364
|
-
var Menu$
|
|
365
|
-
MenuItem$
|
|
366
|
+
var Menu$4 = Dropdown$1.Menu,
|
|
367
|
+
MenuItem$8 = Dropdown$1.MenuItem;
|
|
366
368
|
var HelpMenu = function HelpMenu() {
|
|
367
369
|
var _useTranslation = useTranslation(),
|
|
368
370
|
t = _useTranslation.t;
|
|
@@ -371,14 +373,14 @@ var HelpMenu = function HelpMenu() {
|
|
|
371
373
|
var isMobile = isSize("mobile");
|
|
372
374
|
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
373
375
|
closeOnSelect: false,
|
|
374
|
-
customTarget: /*#__PURE__*/jsx(MenuButton$
|
|
376
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$4, {}),
|
|
375
377
|
interactiveDebounce: 30,
|
|
376
378
|
offset: [0, 5],
|
|
377
379
|
position: isMobile ? "bottom" : "right",
|
|
378
380
|
trigger: "all",
|
|
379
381
|
zIndex: 99999,
|
|
380
|
-
children: /*#__PURE__*/jsxs(Menu$
|
|
381
|
-
children: [/*#__PURE__*/jsx(MenuItem$
|
|
382
|
+
children: /*#__PURE__*/jsxs(Menu$4, {
|
|
383
|
+
children: [/*#__PURE__*/jsx(MenuItem$8.Button, {
|
|
382
384
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
383
385
|
"data-testid": "help-link-help-articles-button",
|
|
384
386
|
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
@@ -388,7 +390,7 @@ var HelpMenu = function HelpMenu() {
|
|
|
388
390
|
rel: "noreferrer",
|
|
389
391
|
target: "_blank",
|
|
390
392
|
children: t("neetoMolecules.sidebar.helpLinks.helpArticles")
|
|
391
|
-
}), /*#__PURE__*/jsx(MenuItem$
|
|
393
|
+
}), /*#__PURE__*/jsx(MenuItem$8.Button, {
|
|
392
394
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
393
395
|
"data-testid": "help-link-live-chat-button",
|
|
394
396
|
prefix: /*#__PURE__*/jsx(ChatQuestions, {
|
|
@@ -400,7 +402,7 @@ var HelpMenu = function HelpMenu() {
|
|
|
400
402
|
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
401
403
|
},
|
|
402
404
|
children: t("neetoMolecules.sidebar.helpLinks.liveChat")
|
|
403
|
-
}), /*#__PURE__*/jsx(MenuItem$
|
|
405
|
+
}), /*#__PURE__*/jsx(MenuItem$8.Button, {
|
|
404
406
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
405
407
|
"data-testid": "help-link-community-button",
|
|
406
408
|
href: "https://www.launchpass.com/neetohq",
|
|
@@ -410,7 +412,7 @@ var HelpMenu = function HelpMenu() {
|
|
|
410
412
|
rel: "noreferrer",
|
|
411
413
|
target: "_blank",
|
|
412
414
|
children: t("neetoMolecules.sidebar.helpLinks.askTheCommunity")
|
|
413
|
-
}), /*#__PURE__*/jsx(MenuItem$
|
|
415
|
+
}), /*#__PURE__*/jsx(MenuItem$8.Button, {
|
|
414
416
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
415
417
|
"data-testid": "help-link-status-button",
|
|
416
418
|
href: "https://neetostatus.com/",
|
|
@@ -431,6 +433,7 @@ var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
|
431
433
|
return window.location.hostname === "localhost" || currentUserEmail === "oliver@example.com" || (currentUserEmail === null || currentUserEmail === void 0 ? void 0 : currentUserEmail.endsWith("@bigbinary.com"));
|
|
432
434
|
};
|
|
433
435
|
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
436
|
+
var DELETE_WORKSPACE_URL = "/auth/organization/delete";
|
|
434
437
|
var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
|
|
435
438
|
var DEFAULT_MENU_LINK_PROPS = {
|
|
436
439
|
engageProps: {
|
|
@@ -454,9 +457,9 @@ var THEMES = {
|
|
|
454
457
|
};
|
|
455
458
|
var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
456
459
|
|
|
457
|
-
var _excluded$
|
|
458
|
-
function ownKeys$
|
|
459
|
-
function _objectSpread$
|
|
460
|
+
var _excluded$2 = ["label", "icon", "changesCount"];
|
|
461
|
+
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; }
|
|
462
|
+
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; }
|
|
460
463
|
var LinkSection = function LinkSection(_ref) {
|
|
461
464
|
var links = _ref.links;
|
|
462
465
|
var MenuItem = Dropdown$1.MenuItem;
|
|
@@ -466,8 +469,8 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
466
469
|
var label = _ref2.label,
|
|
467
470
|
Icon = _ref2.icon,
|
|
468
471
|
changesCount = _ref2.changesCount,
|
|
469
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
470
|
-
return /*#__PURE__*/jsxs(MenuItem.Button, _objectSpread$
|
|
472
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
473
|
+
return /*#__PURE__*/jsxs(MenuItem.Button, _objectSpread$4(_objectSpread$4({
|
|
471
474
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
472
475
|
"data-testid": "floating-action-menu-link-section",
|
|
473
476
|
prefix: Icon && /*#__PURE__*/jsx(Icon, {
|
|
@@ -510,10 +513,10 @@ var useFetchLoggedInOrganizations = function useFetchLoggedInOrganizations(email
|
|
|
510
513
|
});
|
|
511
514
|
};
|
|
512
515
|
|
|
513
|
-
var MenuItem$
|
|
514
|
-
var MenuButton$
|
|
516
|
+
var MenuItem$7 = Dropdown$1.MenuItem;
|
|
517
|
+
var MenuButton$3 = withT(function (_ref) {
|
|
515
518
|
var t = _ref.t;
|
|
516
|
-
return /*#__PURE__*/jsx(MenuItem$
|
|
519
|
+
return /*#__PURE__*/jsx(MenuItem$7.Button, {
|
|
517
520
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
518
521
|
"data-testid": "organization-switcher-button",
|
|
519
522
|
style: "text",
|
|
@@ -525,8 +528,8 @@ var MenuButton$2 = withT(function (_ref) {
|
|
|
525
528
|
});
|
|
526
529
|
});
|
|
527
530
|
|
|
528
|
-
var Menu$
|
|
529
|
-
MenuItem$
|
|
531
|
+
var Menu$3 = Dropdown$1.Menu,
|
|
532
|
+
MenuItem$6 = Dropdown$1.MenuItem;
|
|
530
533
|
var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
531
534
|
var _globalProps$user;
|
|
532
535
|
var _useTranslation = useTranslation(),
|
|
@@ -547,15 +550,15 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
|
547
550
|
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
548
551
|
className: "neeto-molecules-organization-switcher-menu-popup-wrapper",
|
|
549
552
|
closeOnSelect: false,
|
|
550
|
-
customTarget: /*#__PURE__*/jsx(MenuButton$
|
|
553
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$3, {}),
|
|
551
554
|
interactiveDebounce: 30,
|
|
552
555
|
offset: [0, 5],
|
|
553
556
|
position: isMobile ? "bottom" : "right",
|
|
554
557
|
trigger: "all",
|
|
555
558
|
zIndex: 99999,
|
|
556
|
-
children: /*#__PURE__*/jsxs(Menu$
|
|
559
|
+
children: /*#__PURE__*/jsxs(Menu$3, {
|
|
557
560
|
children: [organizations === null || organizations === void 0 ? void 0 : organizations.map(function (organization) {
|
|
558
|
-
return /*#__PURE__*/jsxs(MenuItem$
|
|
561
|
+
return /*#__PURE__*/jsxs(MenuItem$6.Button, {
|
|
559
562
|
href: organization.organizationUrl,
|
|
560
563
|
rel: "noreferrer",
|
|
561
564
|
style: "text",
|
|
@@ -575,7 +578,7 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
|
575
578
|
children: t("neetoMolecules.sidebar.organizationSwitcher.signedin")
|
|
576
579
|
})]
|
|
577
580
|
}, organization.userId);
|
|
578
|
-
}), /*#__PURE__*/jsx(MenuItem$
|
|
581
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
579
582
|
href: authAppUrl,
|
|
580
583
|
rel: "noreferrer",
|
|
581
584
|
target: "_blank",
|
|
@@ -585,14 +588,14 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
|
585
588
|
});
|
|
586
589
|
};
|
|
587
590
|
|
|
588
|
-
function ownKeys$
|
|
589
|
-
function _objectSpread$
|
|
590
|
-
var MenuButton$
|
|
591
|
+
function ownKeys$3(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; }
|
|
592
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
593
|
+
var MenuButton$2 = function MenuButton(_ref) {
|
|
591
594
|
var otherProps = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
592
595
|
var _useTranslation = useTranslation(),
|
|
593
596
|
t = _useTranslation.t;
|
|
594
597
|
var MenuItem = Dropdown$1.MenuItem;
|
|
595
|
-
return /*#__PURE__*/jsx(MenuItem.Button, _objectSpread$
|
|
598
|
+
return /*#__PURE__*/jsx(MenuItem.Button, _objectSpread$3(_objectSpread$3({
|
|
596
599
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
597
600
|
"data-testid": "product-switcher-button",
|
|
598
601
|
label: t("neetoMolecules.sidebar.productSwitcher"),
|
|
@@ -606,14 +609,14 @@ var MenuButton$1 = function MenuButton(_ref) {
|
|
|
606
609
|
}));
|
|
607
610
|
};
|
|
608
611
|
|
|
609
|
-
var Menu$
|
|
610
|
-
MenuItem$
|
|
612
|
+
var Menu$2 = Dropdown$1.Menu,
|
|
613
|
+
MenuItem$5 = Dropdown$1.MenuItem;
|
|
611
614
|
var Dropdown = function Dropdown() {
|
|
612
615
|
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
613
616
|
appendTo: "parent",
|
|
614
617
|
className: "neeto-molecules-product-switcher-menu-popup-wrapper",
|
|
615
618
|
closeOnSelect: false,
|
|
616
|
-
customTarget: /*#__PURE__*/jsx(MenuButton$
|
|
619
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$2, {}),
|
|
617
620
|
interactiveDebounce: 30,
|
|
618
621
|
offset: [0, 5],
|
|
619
622
|
position: "right",
|
|
@@ -622,9 +625,9 @@ var Dropdown = function Dropdown() {
|
|
|
622
625
|
dropdownProps: {
|
|
623
626
|
classNames: "neeto-molecules-product-switcher-menu-popup__dropdown"
|
|
624
627
|
},
|
|
625
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
626
|
-
children: /*#__PURE__*/jsx(MenuItem$
|
|
627
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
628
|
+
children: /*#__PURE__*/jsx(Menu$2, {
|
|
629
|
+
children: /*#__PURE__*/jsx(MenuItem$5, {
|
|
630
|
+
children: /*#__PURE__*/jsx(Menu$5, {})
|
|
628
631
|
})
|
|
629
632
|
})
|
|
630
633
|
});
|
|
@@ -635,7 +638,7 @@ var ProductSwitcher = function ProductSwitcher(_ref) {
|
|
|
635
638
|
var _useBreakpoints = useBreakpoints(),
|
|
636
639
|
isSize = _useBreakpoints.isSize;
|
|
637
640
|
var isMobile = isSize("mobile");
|
|
638
|
-
return isMobile ? /*#__PURE__*/jsx(MenuButton$
|
|
641
|
+
return isMobile ? /*#__PURE__*/jsx(MenuButton$2, {
|
|
639
642
|
onClick: function onClick() {
|
|
640
643
|
return toggleModal(true);
|
|
641
644
|
}
|
|
@@ -676,6 +679,77 @@ var ProfileHeader = function ProfileHeader(_ref) {
|
|
|
676
679
|
});
|
|
677
680
|
};
|
|
678
681
|
|
|
682
|
+
var _excluded$1 = ["profileInfo"];
|
|
683
|
+
function ownKeys$2(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; }
|
|
684
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
685
|
+
var MenuItem$4 = Dropdown$1.MenuItem;
|
|
686
|
+
var MenuButton$1 = function MenuButton(_ref) {
|
|
687
|
+
var profileInfo = _ref.profileInfo,
|
|
688
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
689
|
+
return /*#__PURE__*/jsx(MenuItem$4.Button, _objectSpread$2(_objectSpread$2({
|
|
690
|
+
className: "neeto-molecules-profile-popup",
|
|
691
|
+
"data-testid": "profile-expand-menu-button",
|
|
692
|
+
suffix: /*#__PURE__*/jsx(Right, {
|
|
693
|
+
className: "rtl:scale-x-[-1]",
|
|
694
|
+
size: 18
|
|
695
|
+
})
|
|
696
|
+
}, otherProps), {}, {
|
|
697
|
+
children: /*#__PURE__*/jsx(ProfileHeader, {
|
|
698
|
+
profileInfo: profileInfo
|
|
699
|
+
})
|
|
700
|
+
}));
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
var Menu$1 = Dropdown$1.Menu,
|
|
704
|
+
MenuItem$3 = Dropdown$1.MenuItem;
|
|
705
|
+
var ProfileExpandMenu = function ProfileExpandMenu(_ref) {
|
|
706
|
+
var _window$globalProps;
|
|
707
|
+
var profileInfo = _ref.profileInfo;
|
|
708
|
+
var _useTranslation = useTranslation(),
|
|
709
|
+
t = _useTranslation.t;
|
|
710
|
+
var _useBreakpoints = useBreakpoints(),
|
|
711
|
+
isSize = _useBreakpoints.isSize;
|
|
712
|
+
var _Profile$usePaneState = Profile.usePaneState(),
|
|
713
|
+
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
714
|
+
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
715
|
+
var isMobile = isSize("mobile");
|
|
716
|
+
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
717
|
+
closeOnSelect: false,
|
|
718
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$1, {
|
|
719
|
+
profileInfo: profileInfo
|
|
720
|
+
}),
|
|
721
|
+
interactiveDebounce: 30,
|
|
722
|
+
offset: [0, 5],
|
|
723
|
+
position: isMobile ? "bottom" : "right",
|
|
724
|
+
trigger: "all",
|
|
725
|
+
zIndex: 99999,
|
|
726
|
+
children: /*#__PURE__*/jsxs(Menu$1, {
|
|
727
|
+
children: [/*#__PURE__*/jsx(MenuItem$3.Button, {
|
|
728
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
729
|
+
"data-testid": "profile-my-profile-button",
|
|
730
|
+
prefix: /*#__PURE__*/jsx(User, {
|
|
731
|
+
size: 18
|
|
732
|
+
}),
|
|
733
|
+
onClick: function onClick() {
|
|
734
|
+
return setIsProfilePaneOpen(true);
|
|
735
|
+
},
|
|
736
|
+
children: t("neetoMolecules.sidebar.myProfile")
|
|
737
|
+
}), ((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.isOwner) && /*#__PURE__*/jsx(MenuItem$3.Button, {
|
|
738
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
739
|
+
"data-testid": "profile-cancel-account-button",
|
|
740
|
+
href: DELETE_WORKSPACE_URL,
|
|
741
|
+
prefix: /*#__PURE__*/jsx(CloseCircle, {
|
|
742
|
+
size: 18
|
|
743
|
+
}),
|
|
744
|
+
rel: "noreferrer",
|
|
745
|
+
style: "text",
|
|
746
|
+
target: "_blank",
|
|
747
|
+
children: t("neetoMolecules.sidebar.cancelAccount")
|
|
748
|
+
})]
|
|
749
|
+
})
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
|
|
679
753
|
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
680
754
|
var _globalProps$user, _globalProps$user2;
|
|
681
755
|
var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
|
|
@@ -888,9 +962,6 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
888
962
|
MenuItem = Dropdown$1.MenuItem,
|
|
889
963
|
Divider = Dropdown$1.Divider;
|
|
890
964
|
var isAuthenticated = profileInfo.isAuthenticated;
|
|
891
|
-
var _Profile$usePaneState = Profile.usePaneState(),
|
|
892
|
-
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
893
|
-
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
894
965
|
var _useTranslation = useTranslation(),
|
|
895
966
|
t = _useTranslation.t;
|
|
896
967
|
var normalizedPlan = (((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) || "").toLowerCase();
|
|
@@ -929,15 +1000,8 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
929
1000
|
}), showProductSwitcher && /*#__PURE__*/jsx(ProductSwitcher, {
|
|
930
1001
|
toggleModal: toggleModal
|
|
931
1002
|
}), /*#__PURE__*/jsx(HelpMenu, {}), /*#__PURE__*/jsx(Divider, {})]
|
|
932
|
-
}), isAuthenticated && /*#__PURE__*/jsx(
|
|
933
|
-
|
|
934
|
-
"data-testid": "my-profile-button",
|
|
935
|
-
onClick: function onClick() {
|
|
936
|
-
return setIsProfilePaneOpen(true);
|
|
937
|
-
},
|
|
938
|
-
children: /*#__PURE__*/jsx(ProfileHeader, {
|
|
939
|
-
profileInfo: profileInfo
|
|
940
|
-
})
|
|
1003
|
+
}), isAuthenticated && /*#__PURE__*/jsx(ProfileExpandMenu, {
|
|
1004
|
+
profileInfo: profileInfo
|
|
941
1005
|
}), /*#__PURE__*/jsx(LinkSection, {
|
|
942
1006
|
links: bottomLinks
|
|
943
1007
|
}), isThemeSwitcherEnabled && /*#__PURE__*/jsxs(Fragment, {
|