@bigbinary/neeto-molecules 4.1.68 → 4.1.70
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/AuditLogs.js +1 -0
- package/dist/AuditLogs.js.map +1 -1
- package/dist/cjs/AuditLogs.js +1 -0
- package/dist/cjs/AuditLogs.js.map +1 -1
- package/dist/cjs/v2/AuditLogs.js +24 -26
- package/dist/cjs/v2/AuditLogs.js.map +1 -1
- package/dist/cjs/v2/Container.js +8 -1
- package/dist/cjs/v2/Container.js.map +1 -1
- package/dist/cjs/v2/FloatingActionMenu.js +433 -536
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/v2/MenuBar.js +51 -37
- package/dist/cjs/v2/MenuBar.js.map +1 -1
- package/dist/cjs/v2/Search.js +9 -19
- package/dist/cjs/v2/Search.js.map +1 -1
- package/dist/cjs/v2/StickyRibbonsContainer.js +79 -37
- package/dist/cjs/v2/StickyRibbonsContainer.js.map +1 -1
- package/dist/v2/AuditLogs.js +24 -26
- package/dist/v2/AuditLogs.js.map +1 -1
- package/dist/v2/Container.js +8 -1
- package/dist/v2/Container.js.map +1 -1
- package/dist/v2/FloatingActionMenu.js +436 -539
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/dist/v2/MenuBar.js +51 -37
- package/dist/v2/MenuBar.js.map +1 -1
- package/dist/v2/Search.js +11 -21
- package/dist/v2/Search.js.map +1 -1
- package/dist/v2/StickyRibbonsContainer.js +81 -39
- package/dist/v2/StickyRibbonsContainer.js.map +1 -1
- package/package.json +7 -7
- package/src/translations/ar.json +37 -36
- package/src/translations/bg.json +37 -36
- package/src/translations/ca.json +37 -36
- package/src/translations/cs.json +37 -36
- package/src/translations/da.json +37 -36
- package/src/translations/de.json +37 -36
- package/src/translations/en.json +34 -34
- package/src/translations/es-MX.json +37 -36
- package/src/translations/es.json +37 -36
- package/src/translations/et.json +37 -36
- package/src/translations/fi.json +37 -36
- package/src/translations/fil.json +37 -36
- package/src/translations/fr.json +37 -36
- package/src/translations/he.json +37 -36
- package/src/translations/hi.json +37 -36
- package/src/translations/hr.json +37 -36
- package/src/translations/hu.json +37 -36
- package/src/translations/id.json +37 -36
- package/src/translations/it.json +37 -36
- package/src/translations/ja.json +37 -36
- package/src/translations/ko.json +37 -36
- package/src/translations/nl.json +37 -36
- package/src/translations/pl.json +37 -36
- package/src/translations/pt-BR.json +37 -36
- package/src/translations/pt.json +37 -36
- package/src/translations/ro.json +37 -36
- package/src/translations/ru.json +37 -36
- package/src/translations/sk.json +37 -36
- package/src/translations/sl.json +37 -36
- package/src/translations/sv.json +37 -36
- package/src/translations/th.json +37 -36
- package/src/translations/tr.json +37 -36
- package/src/translations/uk.json +37 -36
- package/src/translations/vi.json +37 -36
- package/src/translations/zh-CN.json +37 -36
- package/src/translations/zh-TW.json +37 -36
|
@@ -24,11 +24,10 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
24
24
|
var axios = require('axios');
|
|
25
25
|
var search = require('../search-BBuFYdmG.js');
|
|
26
26
|
var useBreakpoints = require('@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints');
|
|
27
|
+
var i18next = require('i18next');
|
|
28
|
+
var createLucideIcon = require('../createLucideIcon-DBDhE7kE.js');
|
|
27
29
|
var circleQuestionMark = require('../circle-question-mark-kxBMPyWQ.js');
|
|
28
30
|
var chevronRight = require('../chevron-right-DpleLIQp.js');
|
|
29
|
-
var createLucideIcon = require('../createLucideIcon-DBDhE7kE.js');
|
|
30
|
-
var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
|
|
31
|
-
var i18next = require('i18next');
|
|
32
31
|
var user = require('../user-Ku5LVfLy.js');
|
|
33
32
|
var useLocalStorage = require('@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage');
|
|
34
33
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
@@ -253,8 +252,8 @@ var SPECIAL_APP_NAMES = {
|
|
|
253
252
|
};
|
|
254
253
|
|
|
255
254
|
var _excluded$3 = ["name", "description", "url", "isHighlighted"];
|
|
256
|
-
function ownKeys$
|
|
257
|
-
function _objectSpread$
|
|
255
|
+
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; }
|
|
256
|
+
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; }
|
|
258
257
|
var ProductLink$1 = function ProductLink(_ref) {
|
|
259
258
|
var _globalProps, _globalProps2;
|
|
260
259
|
var name = _ref.name,
|
|
@@ -268,7 +267,7 @@ var ProductLink$1 = function ProductLink(_ref) {
|
|
|
268
267
|
var safeName = name || "";
|
|
269
268
|
var appName = "Neeto".concat(safeName.charAt(0)).concat(safeName.slice(1).toLowerCase());
|
|
270
269
|
var AppIcon = specialCase ? AppIcons__namespace["Neeto".concat(specialCase)] : AppIcons__namespace[appName];
|
|
271
|
-
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread$
|
|
270
|
+
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread$7(_objectSpread$7({
|
|
272
271
|
"data-testid": "".concat(normalizedName, "-app-link"),
|
|
273
272
|
href: url,
|
|
274
273
|
rel: "noreferrer",
|
|
@@ -296,8 +295,8 @@ var ProductLink$1 = function ProductLink(_ref) {
|
|
|
296
295
|
};
|
|
297
296
|
var ProductLink = /*#__PURE__*/React.memo(ProductLink$1);
|
|
298
297
|
|
|
299
|
-
function ownKeys$
|
|
300
|
-
function _objectSpread$
|
|
298
|
+
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; }
|
|
299
|
+
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; }
|
|
301
300
|
var Content = function Content(_ref) {
|
|
302
301
|
var highlightedIndex = _ref.highlightedIndex,
|
|
303
302
|
filteredApps = _ref.filteredApps,
|
|
@@ -315,7 +314,7 @@ var Content = function Content(_ref) {
|
|
|
315
314
|
return (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
316
315
|
className: "grid grid-cols-[repeat(auto-fill,minmax(288px,1fr))] gap-3 max-lg:grid-cols-[repeat(auto-fill,minmax(248px,1fr))] max-sm:grid-cols-1",
|
|
317
316
|
children: filteredApps.map(function (app, index) {
|
|
318
|
-
return /*#__PURE__*/jsxRuntime.jsx(ProductLink, _objectSpread$
|
|
317
|
+
return /*#__PURE__*/jsxRuntime.jsx(ProductLink, _objectSpread$6(_objectSpread$6({}, app), {}, {
|
|
319
318
|
"data-highlighted-index": index,
|
|
320
319
|
isHighlighted: index === highlightedIndex
|
|
321
320
|
}), app.name);
|
|
@@ -338,10 +337,10 @@ var neetoAppsApi = {
|
|
|
338
337
|
fetch: fetch$1
|
|
339
338
|
};
|
|
340
339
|
|
|
341
|
-
function ownKeys$
|
|
342
|
-
function _objectSpread$
|
|
340
|
+
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; }
|
|
341
|
+
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; }
|
|
343
342
|
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
344
|
-
return reactQuery.useQuery(_objectSpread$
|
|
343
|
+
return reactQuery.useQuery(_objectSpread$5({
|
|
345
344
|
queryKey: [QUERY_KEYS$1.NEETO_APPS_LIST],
|
|
346
345
|
queryFn: neetoAppsApi.fetch,
|
|
347
346
|
staleTime: 5 * 60 * 1000
|
|
@@ -533,141 +532,161 @@ var Modal = reactUtils.withT(function (_ref) {
|
|
|
533
532
|
});
|
|
534
533
|
});
|
|
535
534
|
|
|
536
|
-
var
|
|
535
|
+
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
536
|
+
var DELETE_WORKSPACE_URL = "/auth/organization/delete";
|
|
537
|
+
var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
|
|
538
|
+
var DEFAULT_MENU_LINK_PROPS = {
|
|
539
|
+
engageProps: {
|
|
540
|
+
id: ENGAGE_WIDGET_TRIGGER_ID,
|
|
541
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.whatsNew"),
|
|
542
|
+
"data-testid": "help-link-engage-button"
|
|
543
|
+
},
|
|
544
|
+
keyboardShortcutProps: {
|
|
545
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
|
|
546
|
+
"data-testid": "help-link-keyboard-shortcut-button"
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
// Theme switcher
|
|
551
|
+
var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
|
|
552
|
+
var THEMES = {
|
|
553
|
+
LIGHT: "light",
|
|
554
|
+
DARK: "dark"
|
|
555
|
+
};
|
|
537
556
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}));
|
|
557
|
+
// Legacy neetoUI theme classes — kept until full migration is complete.
|
|
558
|
+
var LEGACY_THEMES = {
|
|
559
|
+
LIGHT: "neeto-ui-theme--light",
|
|
560
|
+
DARK: "neeto-ui-theme--dark"
|
|
561
|
+
};
|
|
562
|
+
var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
563
|
+
var MENU_ITEM_CLASSES = "gap-2.5 px-2.5 py-2 font-medium [&>[data-slot=menu-item-prefix]>svg]:!size-[18px] [&>[data-slot=menu-item-suffix]>svg]:!size-[18px]";
|
|
564
|
+
var THEME_BUTTON_BASE = "relative z-10 flex items-center justify-center gap-1 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none";
|
|
565
|
+
var THEME_ICON_BASE = "transition-transform duration-300 ease-out";
|
|
566
|
+
|
|
567
|
+
var _excluded$2 = ["className"];
|
|
568
|
+
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; }
|
|
569
|
+
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; }
|
|
570
|
+
var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
571
|
+
var className = _ref.className,
|
|
572
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
573
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenu.MenuItem, _objectSpread$4({
|
|
574
|
+
className: classnames(MENU_ITEM_CLASSES, className),
|
|
575
|
+
ref: forwardedRef
|
|
576
|
+
}, props));
|
|
559
577
|
});
|
|
560
|
-
|
|
578
|
+
MenuItem.displayName = "FloatingActionMenu.MenuItem";
|
|
561
579
|
|
|
562
580
|
var HelpItems = reactUtils.withT(function (_ref) {
|
|
563
581
|
var _globalProps;
|
|
564
582
|
var t = _ref.t;
|
|
565
583
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
566
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
567
|
-
className: MENU_ITEM_CLASS$1,
|
|
584
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
568
585
|
"data-testid": "help-link-help-articles-button",
|
|
569
586
|
href: "https://help.".concat(ramda.toLower(((_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : _globalProps.appName) || ""), ".com/"),
|
|
587
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(BookOpen, {
|
|
588
|
+
size: 18
|
|
589
|
+
}),
|
|
570
590
|
rel: "noreferrer",
|
|
571
591
|
target: "_blank",
|
|
572
|
-
children:
|
|
573
|
-
|
|
574
|
-
}), t("neetoMolecules.sidebar.helpLinks.helpArticles")]
|
|
575
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
576
|
-
className: MENU_ITEM_CLASS$1,
|
|
592
|
+
children: t("neetoMolecules.sidebar.helpLinks.helpArticles")
|
|
593
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
577
594
|
"data-testid": "help-link-live-chat-button",
|
|
578
|
-
|
|
595
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(MessageCircleQuestionMark, {
|
|
596
|
+
size: 18
|
|
597
|
+
}),
|
|
579
598
|
onClick: function onClick() {
|
|
580
599
|
var _window$NeetoChat, _window$NeetoChat2;
|
|
581
600
|
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
|
|
582
601
|
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
583
602
|
},
|
|
584
|
-
children:
|
|
585
|
-
|
|
586
|
-
}), t("neetoMolecules.sidebar.helpLinks.liveChat")]
|
|
587
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
588
|
-
className: MENU_ITEM_CLASS$1,
|
|
603
|
+
children: t("neetoMolecules.sidebar.helpLinks.liveChat")
|
|
604
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
589
605
|
"data-testid": "help-link-community-button",
|
|
590
606
|
href: "https://www.launchpass.com/neetohq",
|
|
607
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Users, {
|
|
608
|
+
size: 18
|
|
609
|
+
}),
|
|
591
610
|
rel: "noreferrer",
|
|
592
611
|
target: "_blank",
|
|
593
|
-
children:
|
|
594
|
-
|
|
595
|
-
}), t("neetoMolecules.sidebar.helpLinks.askTheCommunity")]
|
|
596
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
597
|
-
className: MENU_ITEM_CLASS$1,
|
|
612
|
+
children: t("neetoMolecules.sidebar.helpLinks.askTheCommunity")
|
|
613
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
598
614
|
"data-testid": "help-link-status-button",
|
|
599
615
|
href: "https://neetostatus.com/",
|
|
616
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Activity, {
|
|
617
|
+
size: 18
|
|
618
|
+
}),
|
|
600
619
|
rel: "noreferrer",
|
|
601
620
|
target: "_blank",
|
|
602
|
-
children:
|
|
603
|
-
size: 18
|
|
604
|
-
}), t("neetoMolecules.sidebar.helpLinks.systemStatus")]
|
|
621
|
+
children: t("neetoMolecules.sidebar.helpLinks.systemStatus")
|
|
605
622
|
})]
|
|
606
623
|
});
|
|
607
624
|
});
|
|
608
|
-
|
|
625
|
+
|
|
626
|
+
var MobileHelpMenu = function MobileHelpMenu() {
|
|
627
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
628
|
+
t = _useTranslation.t;
|
|
609
629
|
var _useState = React.useState(false),
|
|
610
630
|
_useState2 = _slicedToArray(_useState, 2),
|
|
611
631
|
open = _useState2[0],
|
|
612
632
|
setOpen = _useState2[1];
|
|
613
|
-
|
|
614
|
-
var _useBreakpoints = useBreakpoints(),
|
|
615
|
-
isSize = _useBreakpoints.isSize;
|
|
616
|
-
var isMobile = isSize("mobile");
|
|
617
|
-
var handleMouseEnter = React.useCallback(function () {
|
|
618
|
-
clearTimeout(timeoutRef.current);
|
|
619
|
-
setOpen(true);
|
|
620
|
-
}, []);
|
|
621
|
-
var handleMouseLeave = React.useCallback(function () {
|
|
622
|
-
timeoutRef.current = setTimeout(function () {
|
|
623
|
-
return setOpen(false);
|
|
624
|
-
}, 150);
|
|
625
|
-
}, []);
|
|
626
|
-
if (isMobile) {
|
|
627
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Collapsible, {
|
|
628
|
-
open: open,
|
|
629
|
-
onOpenChange: setOpen,
|
|
630
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
631
|
-
asChild: true,
|
|
632
|
-
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$4, {})
|
|
633
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
634
|
-
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
635
|
-
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {})
|
|
636
|
-
})]
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Popover, {
|
|
633
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Collapsible, {
|
|
640
634
|
open: open,
|
|
641
635
|
onOpenChange: setOpen,
|
|
642
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
636
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
643
637
|
asChild: true,
|
|
644
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
638
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuItem, {
|
|
639
|
+
className: classnames("group", MENU_ITEM_CLASSES),
|
|
640
|
+
"data-testid": "help-menu-button",
|
|
641
|
+
onSelect: function onSelect(e) {
|
|
642
|
+
return e.preventDefault();
|
|
649
643
|
},
|
|
650
|
-
|
|
651
|
-
|
|
644
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(circleQuestionMark.CircleQuestionMark, {
|
|
645
|
+
className: "size-[18px] shrink-0"
|
|
646
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
647
|
+
className: "flex-1 truncate",
|
|
648
|
+
children: t("neetoMolecules.sidebar.help")
|
|
649
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
650
|
+
className: "ms-auto shrink-0 transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
651
|
+
size: 18
|
|
652
|
+
})]
|
|
652
653
|
})
|
|
653
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
654
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
655
|
+
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
656
|
+
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {})
|
|
657
|
+
})]
|
|
658
|
+
});
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
var HelpMenu = function HelpMenu() {
|
|
662
|
+
var _useBreakpoints = useBreakpoints(),
|
|
663
|
+
isSize = _useBreakpoints.isSize;
|
|
664
|
+
var isMobile = isSize("mobile");
|
|
665
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
666
|
+
t = _useTranslation.t;
|
|
667
|
+
if (isMobile) return /*#__PURE__*/jsxRuntime.jsx(MobileHelpMenu, {});
|
|
668
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSub, {
|
|
669
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSubTrigger, {
|
|
670
|
+
className: MENU_ITEM_CLASSES,
|
|
671
|
+
"data-testid": "help-menu-button",
|
|
672
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(circleQuestionMark.CircleQuestionMark, {
|
|
673
|
+
className: "size-[18px]"
|
|
674
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
675
|
+
className: "flex-1",
|
|
676
|
+
children: t("neetoMolecules.sidebar.help")
|
|
677
|
+
})]
|
|
678
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubContent, {
|
|
679
|
+
className: "z-[99999]",
|
|
680
|
+
collisionPadding: 16,
|
|
657
681
|
sideOffset: 8,
|
|
658
|
-
onMouseEnter: handleMouseEnter,
|
|
659
|
-
onMouseLeave: handleMouseLeave,
|
|
660
|
-
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
|
661
|
-
return e.preventDefault();
|
|
662
|
-
},
|
|
663
682
|
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {})
|
|
664
683
|
})]
|
|
665
684
|
});
|
|
666
685
|
};
|
|
667
686
|
|
|
668
|
-
var _excluded$
|
|
669
|
-
function ownKeys$
|
|
670
|
-
function _objectSpread$
|
|
687
|
+
var _excluded$1 = ["label", "icon", "changesCount", "href"];
|
|
688
|
+
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; }
|
|
689
|
+
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; }
|
|
671
690
|
var LinkSection = function LinkSection(_ref) {
|
|
672
691
|
var links = _ref.links;
|
|
673
692
|
if (neetoCist.isNotPresent(links)) return null;
|
|
@@ -677,25 +696,21 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
677
696
|
Icon = _ref2.icon,
|
|
678
697
|
changesCount = _ref2.changesCount,
|
|
679
698
|
href = _ref2.href,
|
|
680
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
681
|
-
|
|
682
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Tag, _objectSpread$7(_objectSpread$7(_objectSpread$7({
|
|
683
|
-
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
699
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$1);
|
|
700
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuItem, _objectSpread$3(_objectSpread$3(_objectSpread$3({
|
|
684
701
|
"data-testid": "floating-action-menu-link-section",
|
|
685
|
-
|
|
702
|
+
prefix: Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
703
|
+
size: 18
|
|
704
|
+
}),
|
|
705
|
+
suffix: neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
706
|
+
className: "bg-foreground text-background flex h-[1.125rem] min-w-[1.125rem] items-center justify-center rounded-full px-1 text-[10px] select-none [--accent-foreground:var(--background)]",
|
|
707
|
+
"data-testid": "help-section-menu-changes-count",
|
|
708
|
+
children: changesCount
|
|
709
|
+
})
|
|
686
710
|
}, href ? {
|
|
687
711
|
href: href
|
|
688
712
|
} : {}), otherProps), {}, {
|
|
689
|
-
children:
|
|
690
|
-
size: 18
|
|
691
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
692
|
-
className: "flex flex-grow items-center gap-2",
|
|
693
|
-
children: [label, neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
694
|
-
className: "bg-foreground text-background flex h-[1.125rem] min-w-[1.125rem] shrink-0 items-center justify-center rounded-full px-1 text-[10px] select-none",
|
|
695
|
-
"data-testid": "help-section-menu-changes-count",
|
|
696
|
-
children: changesCount
|
|
697
|
-
})]
|
|
698
|
-
})]
|
|
713
|
+
children: label
|
|
699
714
|
}), idx);
|
|
700
715
|
})
|
|
701
716
|
});
|
|
@@ -726,28 +741,6 @@ var useFetchLoggedInOrganizations = function useFetchLoggedInOrganizations(email
|
|
|
726
741
|
});
|
|
727
742
|
};
|
|
728
743
|
|
|
729
|
-
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; }
|
|
730
|
-
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; }
|
|
731
|
-
var MenuButton$3 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
732
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
733
|
-
t = _useTranslation.t;
|
|
734
|
-
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$6(_objectSpread$6({
|
|
735
|
-
ref: ref,
|
|
736
|
-
className: "group hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
737
|
-
"data-testid": "organization-switcher-button",
|
|
738
|
-
type: "button"
|
|
739
|
-
}, props), {}, {
|
|
740
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
741
|
-
className: "flex-grow text-start",
|
|
742
|
-
children: t("neetoMolecules.sidebar.organizationSwitcher.label")
|
|
743
|
-
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
744
|
-
className: "transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
745
|
-
size: 18
|
|
746
|
-
})]
|
|
747
|
-
}));
|
|
748
|
-
});
|
|
749
|
-
MenuButton$3.displayName = "OrganizationSwitcherMenuButton";
|
|
750
|
-
|
|
751
744
|
var isCurrentSubdomain = function isCurrentSubdomain(link) {
|
|
752
745
|
try {
|
|
753
746
|
var currentSubdomain = window.location.hostname.split(".")[0];
|
|
@@ -757,28 +750,30 @@ var isCurrentSubdomain = function isCurrentSubdomain(link) {
|
|
|
757
750
|
return false;
|
|
758
751
|
}
|
|
759
752
|
};
|
|
753
|
+
|
|
760
754
|
var OrganizationItems = reactUtils.withT(function (_ref) {
|
|
761
755
|
var t = _ref.t,
|
|
762
756
|
organizations = _ref.organizations,
|
|
763
757
|
authAppUrl = _ref.authAppUrl;
|
|
764
758
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
765
759
|
children: [organizations === null || organizations === void 0 ? void 0 : organizations.map(function (organization) {
|
|
766
|
-
|
|
760
|
+
var isCurrent = isCurrentSubdomain(organization.organizationUrl);
|
|
761
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
762
|
+
className: classnames({
|
|
763
|
+
"text-green-600": isCurrent
|
|
764
|
+
}),
|
|
767
765
|
href: organization.organizationUrl,
|
|
768
766
|
rel: "noreferrer",
|
|
769
767
|
target: "_blank",
|
|
770
|
-
|
|
771
|
-
"text-green-600": isCurrentSubdomain(organization.organizationUrl)
|
|
772
|
-
}),
|
|
773
|
-
children: [organization.orgName, isCurrentSubdomain(organization.organizationUrl) && /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Badge, {
|
|
768
|
+
suffix: isCurrent && /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Badge, {
|
|
774
769
|
variant: "default",
|
|
775
770
|
children: [/*#__PURE__*/jsxRuntime.jsx(CircleCheck, {
|
|
776
771
|
size: 12
|
|
777
772
|
}), t("neetoMolecules.sidebar.organizationSwitcher.signedin")]
|
|
778
|
-
})
|
|
773
|
+
}),
|
|
774
|
+
children: organization.orgName
|
|
779
775
|
}, organization.userId);
|
|
780
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
781
|
-
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
776
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
782
777
|
href: authAppUrl,
|
|
783
778
|
rel: "noreferrer",
|
|
784
779
|
target: "_blank",
|
|
@@ -786,70 +781,75 @@ var OrganizationItems = reactUtils.withT(function (_ref) {
|
|
|
786
781
|
})]
|
|
787
782
|
});
|
|
788
783
|
});
|
|
789
|
-
|
|
790
|
-
|
|
784
|
+
|
|
785
|
+
var MobileOrganizationSwitcher = function MobileOrganizationSwitcher(_ref) {
|
|
786
|
+
var organizations = _ref.organizations,
|
|
787
|
+
authAppUrl = _ref.authAppUrl;
|
|
788
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
789
|
+
t = _useTranslation.t;
|
|
791
790
|
var _useState = React.useState(false),
|
|
792
791
|
_useState2 = _slicedToArray(_useState, 2),
|
|
793
792
|
open = _useState2[0],
|
|
794
793
|
setOpen = _useState2[1];
|
|
795
|
-
|
|
794
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Collapsible, {
|
|
795
|
+
open: open,
|
|
796
|
+
onOpenChange: setOpen,
|
|
797
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
798
|
+
asChild: true,
|
|
799
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuItem, {
|
|
800
|
+
className: classnames("group", MENU_ITEM_CLASSES),
|
|
801
|
+
"data-testid": "organization-switcher-button",
|
|
802
|
+
onSelect: function onSelect(e) {
|
|
803
|
+
return e.preventDefault();
|
|
804
|
+
},
|
|
805
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
806
|
+
className: "flex-1 truncate",
|
|
807
|
+
children: t("neetoMolecules.sidebar.organizationSwitcher.label")
|
|
808
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
809
|
+
className: "ms-auto shrink-0 transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
810
|
+
size: 18
|
|
811
|
+
})]
|
|
812
|
+
})
|
|
813
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
814
|
+
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
815
|
+
children: /*#__PURE__*/jsxRuntime.jsx(OrganizationItems, {
|
|
816
|
+
authAppUrl: authAppUrl,
|
|
817
|
+
organizations: organizations
|
|
818
|
+
})
|
|
819
|
+
})]
|
|
820
|
+
});
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
824
|
+
var _globalProps$user;
|
|
796
825
|
var _useBreakpoints = useBreakpoints(),
|
|
797
826
|
isSize = _useBreakpoints.isSize;
|
|
798
827
|
var isMobile = isSize("mobile");
|
|
828
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
829
|
+
t = _useTranslation.t;
|
|
799
830
|
var _useFetchLoggedInOrga = useFetchLoggedInOrganizations(initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$user = initializers.globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email),
|
|
800
831
|
_useFetchLoggedInOrga2 = _useFetchLoggedInOrga.data,
|
|
801
832
|
_useFetchLoggedInOrga3 = _useFetchLoggedInOrga2 === void 0 ? {} : _useFetchLoggedInOrga2,
|
|
802
833
|
organizations = _useFetchLoggedInOrga3.organizations,
|
|
803
834
|
authAppUrl = _useFetchLoggedInOrga3.authAppUrl;
|
|
804
|
-
var handleMouseEnter = React.useCallback(function () {
|
|
805
|
-
clearTimeout(timeoutRef.current);
|
|
806
|
-
setOpen(true);
|
|
807
|
-
}, []);
|
|
808
|
-
var handleMouseLeave = React.useCallback(function () {
|
|
809
|
-
timeoutRef.current = setTimeout(function () {
|
|
810
|
-
return setOpen(false);
|
|
811
|
-
}, 150);
|
|
812
|
-
}, []);
|
|
813
835
|
if (isMobile) {
|
|
814
|
-
return /*#__PURE__*/jsxRuntime.
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
818
|
-
asChild: true,
|
|
819
|
-
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$3, {})
|
|
820
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
821
|
-
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
822
|
-
children: /*#__PURE__*/jsxRuntime.jsx(OrganizationItems, {
|
|
823
|
-
authAppUrl: authAppUrl,
|
|
824
|
-
organizations: organizations
|
|
825
|
-
})
|
|
826
|
-
})]
|
|
836
|
+
return /*#__PURE__*/jsxRuntime.jsx(MobileOrganizationSwitcher, {
|
|
837
|
+
authAppUrl: authAppUrl,
|
|
838
|
+
organizations: organizations
|
|
827
839
|
});
|
|
828
840
|
}
|
|
829
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
return setOpen(function (prev) {
|
|
837
|
-
return !prev;
|
|
838
|
-
});
|
|
839
|
-
},
|
|
840
|
-
onMouseEnter: handleMouseEnter,
|
|
841
|
-
onMouseLeave: handleMouseLeave
|
|
841
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSub, {
|
|
842
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubTrigger, {
|
|
843
|
+
className: MENU_ITEM_CLASSES,
|
|
844
|
+
"data-testid": "organization-switcher-button",
|
|
845
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
846
|
+
className: "flex-1",
|
|
847
|
+
children: t("neetoMolecules.sidebar.organizationSwitcher.label")
|
|
842
848
|
})
|
|
843
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
side: "right",
|
|
849
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubContent, {
|
|
850
|
+
className: "z-[99999]",
|
|
851
|
+
collisionPadding: 16,
|
|
847
852
|
sideOffset: 8,
|
|
848
|
-
onMouseEnter: handleMouseEnter,
|
|
849
|
-
onMouseLeave: handleMouseLeave,
|
|
850
|
-
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
|
851
|
-
return e.preventDefault();
|
|
852
|
-
},
|
|
853
853
|
children: /*#__PURE__*/jsxRuntime.jsx(OrganizationItems, {
|
|
854
854
|
authAppUrl: authAppUrl,
|
|
855
855
|
organizations: organizations
|
|
@@ -858,87 +858,69 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
|
858
858
|
});
|
|
859
859
|
};
|
|
860
860
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$5(_objectSpread$5({
|
|
868
|
-
ref: ref,
|
|
869
|
-
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
870
|
-
"data-testid": "product-switcher-button",
|
|
871
|
-
type: "button"
|
|
872
|
-
}, otherProps), {}, {
|
|
873
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
874
|
-
className: "flex-grow text-start",
|
|
861
|
+
var Dropdown = reactUtils.withT(function (_ref) {
|
|
862
|
+
var t = _ref.t;
|
|
863
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSub, {
|
|
864
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubTrigger, {
|
|
865
|
+
className: MENU_ITEM_CLASSES,
|
|
866
|
+
"data-testid": "product-switcher-button",
|
|
875
867
|
children: t("neetoMolecules.sidebar.productSwitcher")
|
|
876
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
877
|
-
className: "
|
|
878
|
-
size: 18
|
|
879
|
-
})]
|
|
880
|
-
}));
|
|
881
|
-
});
|
|
882
|
-
MenuButton$2.displayName = "ProductSwitcherMenuButton";
|
|
883
|
-
|
|
884
|
-
var Dropdown = function Dropdown() {
|
|
885
|
-
var _useState = React.useState(false),
|
|
886
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
887
|
-
open = _useState2[0],
|
|
888
|
-
setOpen = _useState2[1];
|
|
889
|
-
var timeoutRef = React.useRef(null);
|
|
890
|
-
var handleMouseEnter = React.useCallback(function () {
|
|
891
|
-
clearTimeout(timeoutRef.current);
|
|
892
|
-
setOpen(true);
|
|
893
|
-
}, []);
|
|
894
|
-
var handleMouseLeave = React.useCallback(function () {
|
|
895
|
-
timeoutRef.current = setTimeout(function () {
|
|
896
|
-
return setOpen(false);
|
|
897
|
-
}, 150);
|
|
898
|
-
}, []);
|
|
899
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Popover, {
|
|
900
|
-
open: open,
|
|
901
|
-
onOpenChange: setOpen,
|
|
902
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.PopoverAnchor, {
|
|
903
|
-
asChild: true,
|
|
904
|
-
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$2, {
|
|
905
|
-
onClick: function onClick() {
|
|
906
|
-
return setOpen(function (prev) {
|
|
907
|
-
return !prev;
|
|
908
|
-
});
|
|
909
|
-
},
|
|
910
|
-
onMouseEnter: handleMouseEnter,
|
|
911
|
-
onMouseLeave: handleMouseLeave
|
|
912
|
-
})
|
|
913
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.PopoverContent, {
|
|
914
|
-
align: "start",
|
|
915
|
-
className: "z-[99999] flex h-[max(36rem,min(80vh,48rem))] max-h-[var(--radix-popover-content-available-height)] w-[calc(100vw-25rem)] max-w-7xl flex-col overflow-hidden rounded-xl p-0",
|
|
868
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubContent, {
|
|
869
|
+
className: "z-[99999] flex h-[max(36rem,min(80vh,48rem))] w-[calc(100vw-25rem)] max-w-7xl flex-col overflow-hidden rounded-xl p-0",
|
|
916
870
|
collisionPadding: 16,
|
|
917
|
-
side: "right",
|
|
918
871
|
sideOffset: 8,
|
|
919
|
-
onMouseEnter: handleMouseEnter,
|
|
920
|
-
onMouseLeave: handleMouseLeave,
|
|
921
|
-
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
|
922
|
-
return e.preventDefault();
|
|
923
|
-
},
|
|
924
872
|
children: /*#__PURE__*/jsxRuntime.jsx(Menu, {})
|
|
925
873
|
})]
|
|
926
874
|
});
|
|
927
|
-
};
|
|
875
|
+
});
|
|
928
876
|
|
|
929
877
|
var ProductSwitcher = function ProductSwitcher(_ref) {
|
|
930
878
|
var toggleModal = _ref.toggleModal;
|
|
931
879
|
var _useBreakpoints = useBreakpoints(),
|
|
932
880
|
isSize = _useBreakpoints.isSize;
|
|
933
881
|
var isMobile = isSize("mobile");
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
882
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
883
|
+
t = _useTranslation.t;
|
|
884
|
+
if (isMobile) {
|
|
885
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
886
|
+
"data-testid": "product-switcher-button",
|
|
887
|
+
suffix: /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
888
|
+
className: "rtl:scale-x-[-1]",
|
|
889
|
+
size: 18
|
|
890
|
+
}),
|
|
891
|
+
onClick: function onClick() {
|
|
892
|
+
return toggleModal(true);
|
|
893
|
+
},
|
|
894
|
+
children: t("neetoMolecules.sidebar.productSwitcher")
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
return /*#__PURE__*/jsxRuntime.jsx(Dropdown, {});
|
|
939
898
|
};
|
|
940
899
|
|
|
941
|
-
var
|
|
900
|
+
var ProfileItems = reactUtils.withT(function (_ref) {
|
|
901
|
+
var _window$globalProps;
|
|
902
|
+
var t = _ref.t,
|
|
903
|
+
onProfileClick = _ref.onProfileClick;
|
|
904
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
905
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
906
|
+
"data-testid": "profile-my-profile-button",
|
|
907
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(user.User, {
|
|
908
|
+
size: 18
|
|
909
|
+
}),
|
|
910
|
+
onClick: onProfileClick,
|
|
911
|
+
children: t("neetoMolecules.sidebar.myProfile")
|
|
912
|
+
}), ((_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__*/jsxRuntime.jsx(MenuItem, {
|
|
913
|
+
"data-testid": "profile-cancel-account-button",
|
|
914
|
+
href: DELETE_WORKSPACE_URL,
|
|
915
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(CircleX, {
|
|
916
|
+
size: 18
|
|
917
|
+
}),
|
|
918
|
+
rel: "noreferrer",
|
|
919
|
+
target: "_blank",
|
|
920
|
+
children: t("neetoMolecules.sidebar.cancelAccount")
|
|
921
|
+
})]
|
|
922
|
+
});
|
|
923
|
+
});
|
|
942
924
|
|
|
943
925
|
var ProfileHeader = function ProfileHeader(_ref) {
|
|
944
926
|
var profileInfo = _ref.profileInfo;
|
|
@@ -976,149 +958,68 @@ var ProfileHeader = function ProfileHeader(_ref) {
|
|
|
976
958
|
});
|
|
977
959
|
};
|
|
978
960
|
|
|
979
|
-
var
|
|
980
|
-
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; }
|
|
981
|
-
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; }
|
|
982
|
-
var MenuButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
961
|
+
var MobileProfileExpandMenu = function MobileProfileExpandMenu(_ref) {
|
|
983
962
|
var profileInfo = _ref.profileInfo,
|
|
984
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
985
|
-
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$4(_objectSpread$4({
|
|
986
|
-
ref: ref,
|
|
987
|
-
className: "group hover:bg-accent flex w-full items-center gap-2 rounded-md px-2.5 py-2 transition-colors",
|
|
988
|
-
"data-testid": "profile-expand-menu-button",
|
|
989
|
-
type: "button"
|
|
990
|
-
}, otherProps), {}, {
|
|
991
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
|
|
992
|
-
profileInfo: profileInfo
|
|
993
|
-
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
994
|
-
className: "shrink-0 transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
995
|
-
size: 18
|
|
996
|
-
})]
|
|
997
|
-
}));
|
|
998
|
-
});
|
|
999
|
-
MenuButton$1.displayName = "ProfileExpandMenuButton";
|
|
1000
|
-
|
|
1001
|
-
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
1002
|
-
var DELETE_WORKSPACE_URL = "/auth/organization/delete";
|
|
1003
|
-
var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
|
|
1004
|
-
var DEFAULT_MENU_LINK_PROPS = {
|
|
1005
|
-
engageProps: {
|
|
1006
|
-
id: ENGAGE_WIDGET_TRIGGER_ID,
|
|
1007
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.whatsNew"),
|
|
1008
|
-
"data-testid": "help-link-engage-button"
|
|
1009
|
-
},
|
|
1010
|
-
keyboardShortcutProps: {
|
|
1011
|
-
label: i18next.t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
|
|
1012
|
-
"data-testid": "help-link-keyboard-shortcut-button"
|
|
1013
|
-
}
|
|
1014
|
-
};
|
|
1015
|
-
|
|
1016
|
-
// Theme switcher
|
|
1017
|
-
var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
|
|
1018
|
-
var THEMES = {
|
|
1019
|
-
LIGHT: "light",
|
|
1020
|
-
DARK: "dark"
|
|
1021
|
-
};
|
|
1022
|
-
|
|
1023
|
-
// Legacy neetoUI theme classes — kept until full migration is complete.
|
|
1024
|
-
var LEGACY_THEMES = {
|
|
1025
|
-
LIGHT: "neeto-ui-theme--light",
|
|
1026
|
-
DARK: "neeto-ui-theme--dark"
|
|
1027
|
-
};
|
|
1028
|
-
var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
1029
|
-
|
|
1030
|
-
var ProfileItems = reactUtils.withT(function (_ref) {
|
|
1031
|
-
var _window$globalProps;
|
|
1032
|
-
var t = _ref.t,
|
|
1033
963
|
onProfileClick = _ref.onProfileClick;
|
|
1034
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1035
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1036
|
-
className: MENU_ITEM_CLASS,
|
|
1037
|
-
"data-testid": "profile-my-profile-button",
|
|
1038
|
-
type: "button",
|
|
1039
|
-
onClick: onProfileClick,
|
|
1040
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(user.User, {
|
|
1041
|
-
size: 18
|
|
1042
|
-
}), t("neetoMolecules.sidebar.myProfile")]
|
|
1043
|
-
}), ((_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__*/jsxRuntime.jsxs("a", {
|
|
1044
|
-
className: MENU_ITEM_CLASS,
|
|
1045
|
-
"data-testid": "profile-cancel-account-button",
|
|
1046
|
-
href: DELETE_WORKSPACE_URL,
|
|
1047
|
-
rel: "noreferrer",
|
|
1048
|
-
target: "_blank",
|
|
1049
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(CircleX, {
|
|
1050
|
-
size: 18
|
|
1051
|
-
}), t("neetoMolecules.sidebar.cancelAccount")]
|
|
1052
|
-
})]
|
|
1053
|
-
});
|
|
1054
|
-
});
|
|
1055
|
-
var ProfileExpandMenu = function ProfileExpandMenu(_ref2) {
|
|
1056
|
-
var profileInfo = _ref2.profileInfo;
|
|
1057
964
|
var _useState = React.useState(false),
|
|
1058
965
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1059
966
|
open = _useState2[0],
|
|
1060
967
|
setOpen = _useState2[1];
|
|
968
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Collapsible, {
|
|
969
|
+
open: open,
|
|
970
|
+
onOpenChange: setOpen,
|
|
971
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
972
|
+
asChild: true,
|
|
973
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuItem, {
|
|
974
|
+
className: classnames("group", MENU_ITEM_CLASSES),
|
|
975
|
+
"data-testid": "profile-expand-menu-button",
|
|
976
|
+
onSelect: function onSelect(e) {
|
|
977
|
+
return e.preventDefault();
|
|
978
|
+
},
|
|
979
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
|
|
980
|
+
profileInfo: profileInfo
|
|
981
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
982
|
+
className: "ms-auto shrink-0 transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
983
|
+
size: 18
|
|
984
|
+
})]
|
|
985
|
+
})
|
|
986
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
987
|
+
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
988
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ProfileItems, {
|
|
989
|
+
onProfileClick: onProfileClick
|
|
990
|
+
})
|
|
991
|
+
})]
|
|
992
|
+
});
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
var ProfileExpandMenu = function ProfileExpandMenu(_ref) {
|
|
996
|
+
var profileInfo = _ref.profileInfo;
|
|
1061
997
|
var _Profile$usePaneState = v2.Profile.usePaneState(),
|
|
1062
998
|
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
1063
999
|
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
1064
|
-
var timeoutRef = React.useRef(null);
|
|
1065
1000
|
var _useBreakpoints = useBreakpoints(),
|
|
1066
1001
|
isSize = _useBreakpoints.isSize;
|
|
1067
1002
|
var isMobile = isSize("mobile");
|
|
1068
|
-
var handleMouseEnter = React.useCallback(function () {
|
|
1069
|
-
clearTimeout(timeoutRef.current);
|
|
1070
|
-
setOpen(true);
|
|
1071
|
-
}, []);
|
|
1072
|
-
var handleMouseLeave = React.useCallback(function () {
|
|
1073
|
-
timeoutRef.current = setTimeout(function () {
|
|
1074
|
-
return setOpen(false);
|
|
1075
|
-
}, 150);
|
|
1076
|
-
}, []);
|
|
1077
1003
|
var onProfileClick = function onProfileClick() {
|
|
1078
1004
|
return setIsProfilePaneOpen(true);
|
|
1079
1005
|
};
|
|
1080
1006
|
if (isMobile) {
|
|
1081
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
1085
|
-
asChild: true,
|
|
1086
|
-
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$1, {
|
|
1087
|
-
profileInfo: profileInfo
|
|
1088
|
-
})
|
|
1089
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
1090
|
-
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
1091
|
-
children: /*#__PURE__*/jsxRuntime.jsx(ProfileItems, {
|
|
1092
|
-
onProfileClick: onProfileClick
|
|
1093
|
-
})
|
|
1094
|
-
})]
|
|
1007
|
+
return /*#__PURE__*/jsxRuntime.jsx(MobileProfileExpandMenu, {
|
|
1008
|
+
onProfileClick: onProfileClick,
|
|
1009
|
+
profileInfo: profileInfo
|
|
1095
1010
|
});
|
|
1096
1011
|
}
|
|
1097
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
profileInfo: profileInfo,
|
|
1104
|
-
onClick: function onClick() {
|
|
1105
|
-
return setOpen(function (prev) {
|
|
1106
|
-
return !prev;
|
|
1107
|
-
});
|
|
1108
|
-
},
|
|
1109
|
-
onMouseEnter: handleMouseEnter,
|
|
1110
|
-
onMouseLeave: handleMouseLeave
|
|
1012
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSub, {
|
|
1013
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubTrigger, {
|
|
1014
|
+
className: classnames("group items-center", MENU_ITEM_CLASSES),
|
|
1015
|
+
"data-testid": "profile-expand-menu-button",
|
|
1016
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
|
|
1017
|
+
profileInfo: profileInfo
|
|
1111
1018
|
})
|
|
1112
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
side: "right",
|
|
1019
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubContent, {
|
|
1020
|
+
className: "z-[99999]",
|
|
1021
|
+
collisionPadding: 16,
|
|
1116
1022
|
sideOffset: 8,
|
|
1117
|
-
onMouseEnter: handleMouseEnter,
|
|
1118
|
-
onMouseLeave: handleMouseLeave,
|
|
1119
|
-
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
|
1120
|
-
return e.preventDefault();
|
|
1121
|
-
},
|
|
1122
1023
|
children: /*#__PURE__*/jsxRuntime.jsx(ProfileItems, {
|
|
1123
1024
|
onProfileClick: onProfileClick
|
|
1124
1025
|
})
|
|
@@ -1208,72 +1109,83 @@ var ThemeSwitcher = function ThemeSwitcher() {
|
|
|
1208
1109
|
weight: "medium",
|
|
1209
1110
|
children: t("neetoMolecules.sidebar.themeSwitcher.label")
|
|
1210
1111
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1211
|
-
|
|
1112
|
+
"aria-label": t("neetoMolecules.sidebar.themeSwitcher.label"),
|
|
1113
|
+
className: "bg-muted relative grid grid-cols-2 rounded-lg p-0.5",
|
|
1212
1114
|
"data-testid": "theme-switcher-button",
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
className:
|
|
1217
|
-
|
|
1218
|
-
|
|
1115
|
+
role: "group",
|
|
1116
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1117
|
+
"aria-hidden": true,
|
|
1118
|
+
className: "bg-background ring-border absolute inset-y-0.5 left-0.5 w-[calc(50%-2px)] rounded-md shadow-md ring-1 transition-transform duration-300 ease-out ring-inset",
|
|
1119
|
+
style: {
|
|
1120
|
+
transform: "translateX(".concat(isDarkThemeSelected ? "100%" : "0", ")")
|
|
1121
|
+
}
|
|
1122
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuItem, {
|
|
1123
|
+
asChild: true,
|
|
1124
|
+
onSelect: function onSelect(e) {
|
|
1125
|
+
e.preventDefault();
|
|
1126
|
+
switchTheme(THEMES.LIGHT);
|
|
1219
1127
|
},
|
|
1220
|
-
children:
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1128
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1129
|
+
"aria-checked": !isDarkThemeSelected,
|
|
1130
|
+
"data-testid": "theme-switcher-light-button",
|
|
1131
|
+
role: "menuitemradio",
|
|
1132
|
+
type: "button",
|
|
1133
|
+
className: classnames(THEME_BUTTON_BASE, isDarkThemeSelected ? "text-muted-foreground hover:text-foreground" : "text-foreground"),
|
|
1134
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Sun, {
|
|
1135
|
+
size: 13,
|
|
1136
|
+
className: classnames(THEME_ICON_BASE, isDarkThemeSelected ? "scale-90 -rotate-45" : "rotate-0")
|
|
1137
|
+
}), t("neetoMolecules.sidebar.themeSwitcher.light")]
|
|
1138
|
+
})
|
|
1139
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuItem, {
|
|
1140
|
+
asChild: true,
|
|
1141
|
+
onSelect: function onSelect(e) {
|
|
1142
|
+
e.preventDefault();
|
|
1143
|
+
switchTheme(THEMES.DARK);
|
|
1229
1144
|
},
|
|
1230
|
-
children:
|
|
1231
|
-
|
|
1232
|
-
|
|
1145
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1146
|
+
"aria-checked": isDarkThemeSelected,
|
|
1147
|
+
"data-testid": "theme-switcher-dark-button",
|
|
1148
|
+
role: "menuitemradio",
|
|
1149
|
+
type: "button",
|
|
1150
|
+
className: classnames(THEME_BUTTON_BASE, isDarkThemeSelected ? "text-foreground" : "text-muted-foreground hover:text-foreground"),
|
|
1151
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Moon, {
|
|
1152
|
+
size: 13,
|
|
1153
|
+
className: classnames(THEME_ICON_BASE, isDarkThemeSelected ? "rotate-0" : "scale-90 rotate-45")
|
|
1154
|
+
}), t("neetoMolecules.sidebar.themeSwitcher.dark")]
|
|
1155
|
+
})
|
|
1233
1156
|
})]
|
|
1234
1157
|
})]
|
|
1235
1158
|
});
|
|
1236
1159
|
};
|
|
1237
1160
|
|
|
1238
|
-
|
|
1239
|
-
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; }
|
|
1240
|
-
var MenuButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
1161
|
+
var TriggerContent = reactUtils.withT(function (_ref) {
|
|
1241
1162
|
var _globalProps$organiza;
|
|
1242
|
-
var
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1251
|
-
className: "flex flex-grow flex-col gap-1.5",
|
|
1252
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1253
|
-
className: "text-sm font-medium",
|
|
1163
|
+
var t = _ref.t;
|
|
1164
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1165
|
+
className: "flex flex-grow flex-col gap-1.5",
|
|
1166
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
1167
|
+
asChild: true,
|
|
1168
|
+
variant: "body3",
|
|
1169
|
+
weight: "medium",
|
|
1170
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1254
1171
|
children: t("neetoMolecules.sidebar.workspace")
|
|
1255
|
-
})
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
})
|
|
1263
|
-
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
1264
|
-
className: "shrink-0 transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
1265
|
-
size: 18
|
|
1172
|
+
})
|
|
1173
|
+
}), ((_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.name) && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
1174
|
+
asChild: true,
|
|
1175
|
+
color: "muted",
|
|
1176
|
+
variant: "caption",
|
|
1177
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1178
|
+
children: initializers.globalProps.organization.name
|
|
1179
|
+
})
|
|
1266
1180
|
})]
|
|
1267
|
-
})
|
|
1181
|
+
});
|
|
1268
1182
|
});
|
|
1269
|
-
MenuButton.displayName = "WorkspaceMenuButton";
|
|
1270
1183
|
|
|
1271
1184
|
var WorkspaceItems = reactUtils.withT(function (_ref) {
|
|
1272
1185
|
var _globalProps$organiza;
|
|
1273
1186
|
var t = _ref.t;
|
|
1274
1187
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1275
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1276
|
-
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
1188
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
1277
1189
|
"data-testid": "profile-organization-settings-button",
|
|
1278
1190
|
href: MY_ORGANIZATION_URL,
|
|
1279
1191
|
rel: "noreferrer",
|
|
@@ -1283,14 +1195,23 @@ var WorkspaceItems = reactUtils.withT(function (_ref) {
|
|
|
1283
1195
|
className: "px-2.5 py-2",
|
|
1284
1196
|
children: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1285
1197
|
className: "flex flex-col gap-0.5 text-start",
|
|
1286
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1287
|
-
|
|
1288
|
-
|
|
1198
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
1199
|
+
asChild: true,
|
|
1200
|
+
variant: "body3",
|
|
1201
|
+
weight: "medium",
|
|
1202
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1203
|
+
children: t("neetoMolecules.sidebar.workspaceMenu.subdomain")
|
|
1204
|
+
})
|
|
1289
1205
|
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1290
|
-
className: "
|
|
1291
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1292
|
-
|
|
1293
|
-
|
|
1206
|
+
className: "flex items-center gap-1",
|
|
1207
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
1208
|
+
asChild: true,
|
|
1209
|
+
color: "muted",
|
|
1210
|
+
variant: "caption",
|
|
1211
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1212
|
+
className: "min-w-0 truncate",
|
|
1213
|
+
children: initializers.globalProps.organization.subdomain
|
|
1214
|
+
})
|
|
1294
1215
|
}), /*#__PURE__*/jsxRuntime.jsx(v2_CopyToClipboardButton, {
|
|
1295
1216
|
className: "flex-shrink-0",
|
|
1296
1217
|
value: initializers.globalProps.organization.subdomain,
|
|
@@ -1301,61 +1222,49 @@ var WorkspaceItems = reactUtils.withT(function (_ref) {
|
|
|
1301
1222
|
})]
|
|
1302
1223
|
});
|
|
1303
1224
|
});
|
|
1304
|
-
|
|
1225
|
+
|
|
1226
|
+
var MobileWorkspaceMenu = function MobileWorkspaceMenu() {
|
|
1305
1227
|
var _useState = React.useState(false),
|
|
1306
1228
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1307
1229
|
open = _useState2[0],
|
|
1308
1230
|
setOpen = _useState2[1];
|
|
1309
|
-
|
|
1310
|
-
var _useBreakpoints = useBreakpoints(),
|
|
1311
|
-
isSize = _useBreakpoints.isSize;
|
|
1312
|
-
var isMobile = isSize("mobile");
|
|
1313
|
-
var handleMouseEnter = React.useCallback(function () {
|
|
1314
|
-
clearTimeout(timeoutRef.current);
|
|
1315
|
-
setOpen(true);
|
|
1316
|
-
}, []);
|
|
1317
|
-
var handleMouseLeave = React.useCallback(function () {
|
|
1318
|
-
timeoutRef.current = setTimeout(function () {
|
|
1319
|
-
return setOpen(false);
|
|
1320
|
-
}, 150);
|
|
1321
|
-
}, []);
|
|
1322
|
-
if (isMobile) {
|
|
1323
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Collapsible, {
|
|
1324
|
-
open: open,
|
|
1325
|
-
onOpenChange: setOpen,
|
|
1326
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
1327
|
-
asChild: true,
|
|
1328
|
-
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton, {})
|
|
1329
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
1330
|
-
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
1331
|
-
children: /*#__PURE__*/jsxRuntime.jsx(WorkspaceItems, {})
|
|
1332
|
-
})]
|
|
1333
|
-
});
|
|
1334
|
-
}
|
|
1335
|
-
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Popover, {
|
|
1231
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.Collapsible, {
|
|
1336
1232
|
open: open,
|
|
1337
1233
|
onOpenChange: setOpen,
|
|
1338
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1234
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleTrigger, {
|
|
1339
1235
|
asChild: true,
|
|
1340
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1236
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuItem, {
|
|
1237
|
+
className: classnames("group items-center", MENU_ITEM_CLASSES),
|
|
1238
|
+
"data-testid": "workspace-display",
|
|
1239
|
+
onSelect: function onSelect(e) {
|
|
1240
|
+
return e.preventDefault();
|
|
1345
1241
|
},
|
|
1346
|
-
|
|
1347
|
-
|
|
1242
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TriggerContent, {}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
1243
|
+
className: "ms-auto shrink-0 transition-transform group-data-[state=open]:rotate-90 rtl:scale-x-[-1]",
|
|
1244
|
+
size: 18
|
|
1245
|
+
})]
|
|
1348
1246
|
})
|
|
1349
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1247
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
1248
|
+
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
1249
|
+
children: /*#__PURE__*/jsxRuntime.jsx(WorkspaceItems, {})
|
|
1250
|
+
})]
|
|
1251
|
+
});
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
var WorkspaceMenu = function WorkspaceMenu() {
|
|
1255
|
+
var _useBreakpoints = useBreakpoints(),
|
|
1256
|
+
isSize = _useBreakpoints.isSize;
|
|
1257
|
+
var isMobile = isSize("mobile");
|
|
1258
|
+
if (isMobile) return /*#__PURE__*/jsxRuntime.jsx(MobileWorkspaceMenu, {});
|
|
1259
|
+
return /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSub, {
|
|
1260
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubTrigger, {
|
|
1261
|
+
className: classnames("group items-center", MENU_ITEM_CLASSES),
|
|
1262
|
+
"data-testid": "workspace-display",
|
|
1263
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TriggerContent, {})
|
|
1264
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSubContent, {
|
|
1265
|
+
className: "z-[99999]",
|
|
1266
|
+
collisionPadding: 16,
|
|
1353
1267
|
sideOffset: 8,
|
|
1354
|
-
onMouseEnter: handleMouseEnter,
|
|
1355
|
-
onMouseLeave: handleMouseLeave,
|
|
1356
|
-
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
|
1357
|
-
return e.preventDefault();
|
|
1358
|
-
},
|
|
1359
1268
|
children: /*#__PURE__*/jsxRuntime.jsx(WorkspaceItems, {})
|
|
1360
1269
|
})]
|
|
1361
1270
|
});
|
|
@@ -1398,18 +1307,24 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1398
1307
|
href: NEETO_AUTH_BILLING_INFO_URL
|
|
1399
1308
|
};
|
|
1400
1309
|
};
|
|
1310
|
+
var isProPlan = normalizedPlan === "pro";
|
|
1401
1311
|
var subscriptionPlanLink = _objectSpread$2({
|
|
1402
|
-
label: /*#__PURE__*/jsxRuntime.jsxs(
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1312
|
+
label: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1313
|
+
className: "flex items-center gap-2",
|
|
1314
|
+
children: [globalProps.appName, isProPlan ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
1315
|
+
label: neetoCist.humanize((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.subscriptionPlan),
|
|
1316
|
+
style: {
|
|
1317
|
+
"--accent-foreground": "var(--color-amber-950)"
|
|
1318
|
+
},
|
|
1319
|
+
variant: "amber"
|
|
1320
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
1321
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(Crown, {
|
|
1322
|
+
className: "size-3"
|
|
1407
1323
|
}),
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
})
|
|
1324
|
+
label: t("neetoMolecules.sidebar.upgradePlan"),
|
|
1325
|
+
style: {
|
|
1326
|
+
"--accent-foreground": "var(--primary-foreground)"
|
|
1327
|
+
}
|
|
1413
1328
|
})]
|
|
1414
1329
|
}),
|
|
1415
1330
|
"data-testid": "subscription-plan"
|
|
@@ -1420,27 +1335,27 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1420
1335
|
children: [/*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1421
1336
|
links: defaultLinks
|
|
1422
1337
|
}), neetoCist.isNotEmpty(topLinks) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1423
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1338
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1424
1339
|
className: "my-2"
|
|
1425
1340
|
}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1426
1341
|
links: topLinks
|
|
1427
1342
|
})]
|
|
1428
1343
|
}), neetoCist.isPresent(customContent) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1429
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1344
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1430
1345
|
className: "my-2"
|
|
1431
1346
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1432
1347
|
className: "px-3 py-1",
|
|
1433
1348
|
children: customContent
|
|
1434
1349
|
})]
|
|
1435
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1350
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1436
1351
|
className: "my-2"
|
|
1437
|
-
}), ((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.isOwner) && /*#__PURE__*/jsxRuntime.jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1352
|
+
}), ((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.isOwner) && /*#__PURE__*/jsxRuntime.jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1438
1353
|
className: "my-2"
|
|
1439
1354
|
}), neetoCist.isPresent((_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1440
1355
|
links: [subscriptionPlanLink]
|
|
1441
1356
|
}), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
|
|
1442
1357
|
toggleModal: toggleModal
|
|
1443
|
-
}), /*#__PURE__*/jsxRuntime.jsx(HelpMenu, {}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1358
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpMenu, {}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1444
1359
|
className: "my-2"
|
|
1445
1360
|
})]
|
|
1446
1361
|
}), isAuthenticated && !isConsumer && /*#__PURE__*/jsxRuntime.jsx(ProfileExpandMenu, {
|
|
@@ -1448,7 +1363,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1448
1363
|
}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1449
1364
|
links: bottomLinks
|
|
1450
1365
|
}), isThemeSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1451
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1366
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1452
1367
|
className: "my-2"
|
|
1453
1368
|
}), /*#__PURE__*/jsxRuntime.jsx(ThemeSwitcher, {})]
|
|
1454
1369
|
})]
|
|
@@ -1458,6 +1373,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1458
1373
|
function ownKeys$1(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; }
|
|
1459
1374
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1460
1375
|
var ProfileButton = function ProfileButton(_ref) {
|
|
1376
|
+
var _globalProps$user;
|
|
1461
1377
|
var profileInfoOverrides = _ref.profileInfoOverrides,
|
|
1462
1378
|
showProductSwitcher = _ref.showProductSwitcher,
|
|
1463
1379
|
bottomLinks = _ref.bottomLinks,
|
|
@@ -1478,13 +1394,12 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1478
1394
|
setIsUpgradeModalOpen = _useState4[1];
|
|
1479
1395
|
var _useState5 = React.useState(false),
|
|
1480
1396
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
1481
|
-
|
|
1482
|
-
|
|
1397
|
+
isMenuOpen = _useState6[0],
|
|
1398
|
+
setIsMenuOpen = _useState6[1];
|
|
1483
1399
|
var _useState7 = React.useState(null),
|
|
1484
1400
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
1485
1401
|
changesCount = _useState8[0],
|
|
1486
1402
|
setChangesCount = _useState8[1];
|
|
1487
|
-
var timeoutRef = React.useRef(null);
|
|
1488
1403
|
var _KeyboardShortcuts$us = v2_KeyboardShortcuts.usePaneState(),
|
|
1489
1404
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
1490
1405
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
@@ -1506,20 +1421,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1506
1421
|
};
|
|
1507
1422
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
1508
1423
|
}, []);
|
|
1509
|
-
React.useEffect(function () {
|
|
1510
|
-
return function () {
|
|
1511
|
-
return clearTimeout(timeoutRef.current);
|
|
1512
|
-
};
|
|
1513
|
-
}, []);
|
|
1514
|
-
var handleMouseEnter = React.useCallback(function () {
|
|
1515
|
-
clearTimeout(timeoutRef.current);
|
|
1516
|
-
setIsPopoverOpen(true);
|
|
1517
|
-
}, []);
|
|
1518
|
-
var handleMouseLeave = React.useCallback(function () {
|
|
1519
|
-
timeoutRef.current = setTimeout(function () {
|
|
1520
|
-
return setIsPopoverOpen(false);
|
|
1521
|
-
}, 150);
|
|
1522
|
-
}, []);
|
|
1523
1424
|
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
|
|
1524
1425
|
var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).map(function (key) {
|
|
1525
1426
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_MENU_LINK_PROPS[key]), key === "keyboardShortcutProps" && {
|
|
@@ -1538,41 +1439,37 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1538
1439
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1539
1440
|
children: [/*#__PURE__*/jsxRuntime.jsx(v2.Profile.Pane, {
|
|
1540
1441
|
popoverProps: profilePopoverProps
|
|
1541
|
-
}),
|
|
1442
|
+
}), isMenuOpen && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1542
1443
|
className: "pointer-events-none fixed inset-0 z-[99998] bg-black/[0.27]"
|
|
1543
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(primitives.
|
|
1544
|
-
open:
|
|
1545
|
-
onOpenChange:
|
|
1546
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1444
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenu, {
|
|
1445
|
+
open: isMenuOpen,
|
|
1446
|
+
onOpenChange: setIsMenuOpen,
|
|
1447
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuTrigger, {
|
|
1547
1448
|
asChild: true,
|
|
1548
1449
|
children: /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1549
1450
|
className: "bg-primary flex flex-col items-center justify-center gap-1.5 rounded-e-2xl p-1",
|
|
1550
1451
|
type: "button",
|
|
1551
|
-
onMouseEnter: handleMouseEnter,
|
|
1552
|
-
onMouseLeave: handleMouseLeave,
|
|
1553
1452
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Avatar, {
|
|
1554
|
-
className: "size-[1.625rem] shrink-0 rounded-full border-2
|
|
1453
|
+
className: "border-background size-[1.625rem] shrink-0 rounded-full border-2",
|
|
1555
1454
|
"data-testid": "profile-avatar",
|
|
1556
1455
|
user: {
|
|
1557
1456
|
name: profileInfo.name,
|
|
1558
1457
|
imageUrl: profileInfo.imageUrl
|
|
1559
1458
|
}
|
|
1560
1459
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1561
|
-
className: "flex size-[1.625rem] items-center justify-center rounded-full
|
|
1460
|
+
className: "bg-background text-foreground flex size-[1.625rem] items-center justify-center rounded-full",
|
|
1562
1461
|
children: /*#__PURE__*/jsxRuntime.jsx(circleQuestionMark.CircleQuestionMark, {
|
|
1563
1462
|
size: 20
|
|
1564
1463
|
})
|
|
1565
1464
|
})]
|
|
1566
1465
|
})
|
|
1567
|
-
}), /*#__PURE__*/jsxRuntime.jsx(primitives.
|
|
1466
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuContent, {
|
|
1568
1467
|
align: "end",
|
|
1569
|
-
className: "z-[99999] max-h-[var(--radix-
|
|
1468
|
+
className: "z-[99999] max-h-[var(--radix-dropdown-menu-content-available-height)] w-64 overflow-y-auto rounded-xl p-0",
|
|
1570
1469
|
collisionPadding: 16,
|
|
1571
1470
|
side: "right",
|
|
1572
1471
|
sideOffset: 8,
|
|
1573
|
-
|
|
1574
|
-
onMouseLeave: handleMouseLeave,
|
|
1575
|
-
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
|
1472
|
+
onCloseAutoFocus: function onCloseAutoFocus(e) {
|
|
1576
1473
|
return e.preventDefault();
|
|
1577
1474
|
},
|
|
1578
1475
|
children: /*#__PURE__*/jsxRuntime.jsx(ProfileMenu, {
|
|
@@ -1601,7 +1498,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1601
1498
|
onClose: function onClose() {
|
|
1602
1499
|
return setIsModalOpen(false);
|
|
1603
1500
|
}
|
|
1604
|
-
}), enableSubscriptionUpgradeRequest && /*#__PURE__*/jsxRuntime.jsx(SubscriptionUpgradeRequestModal, {
|
|
1501
|
+
}), enableSubscriptionUpgradeRequest && !((_globalProps$user = globalProps.user) !== null && _globalProps$user !== void 0 && _globalProps$user.isOwner) && /*#__PURE__*/jsxRuntime.jsx(SubscriptionUpgradeRequestModal, {
|
|
1605
1502
|
isOpen: isUpgradeModalOpen,
|
|
1606
1503
|
onClose: function onClose() {
|
|
1607
1504
|
return setIsUpgradeModalOpen(false);
|
|
@@ -1641,7 +1538,7 @@ var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1641
1538
|
var isBigBinaryEmail = initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$user = initializers.globalProps.user) === null || _globalProps$user === void 0 || (_globalProps$user = _globalProps$user.email) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.endsWith("@bigbinary.com");
|
|
1642
1539
|
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
1643
1540
|
ref: ref,
|
|
1644
|
-
className: "fixed start-0 bottom-4 z-[99999] rounded-e-[1.0625rem] border border-s-0
|
|
1541
|
+
className: "bg-popover border-border fixed start-0 bottom-4 z-[99999] rounded-e-[1.0625rem] border border-s-0",
|
|
1645
1542
|
"data-testid": "floating-action-menu-container"
|
|
1646
1543
|
}, otherProps), {}, {
|
|
1647
1544
|
children: /*#__PURE__*/jsxRuntime.jsx(ProfileButton, _defineProperty({
|