@bigbinary/neeto-molecules 4.0.132 → 4.0.133

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.
@@ -29,18 +29,18 @@ var reactQuery = require('@tanstack/react-query');
29
29
  var axios = require('axios');
30
30
  var i18next = require('i18next');
31
31
  var Book = require('@bigbinary/neeto-icons/Book');
32
- var Community = require('@bigbinary/neeto-icons/Community');
33
32
  var useBreakpoints = require('@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints');
34
33
  var ExternalLink = require('@bigbinary/neeto-icons/ExternalLink');
35
34
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
36
35
  var Right = require('@bigbinary/neeto-icons/Right');
37
36
  var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
38
- var ProductSwitcher$1 = require('@bigbinary/neeto-icons/ProductSwitcher');
39
37
  var useLocalStorage = require('@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage');
40
- var Check = require('@bigbinary/neeto-icons/Check');
38
+ var Moon = require('@bigbinary/neeto-icons/Moon');
39
+ var Sun = require('@bigbinary/neeto-icons/Sun');
41
40
  var utils = require('@bigbinary/neeto-commons-frontend/utils');
42
41
  var axios$1 = require('@bigbinary/neeto-commons-frontend/utils/axios');
43
42
  var general = require('@bigbinary/neeto-commons-frontend/utils/general');
43
+ var Logout = require('@bigbinary/neeto-icons/Logout');
44
44
  require('./useKeyboardShortcutsPaneState-YnXpWOcs.js');
45
45
  require('zustand/shallow');
46
46
  require('@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions');
@@ -358,21 +358,10 @@ var shouldShowWhatsNew = function shouldShowWhatsNew() {
358
358
  var MY_ORGANIZATION_URL = "/auth/organization/edit";
359
359
  var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
360
360
  var DEFAULT_HELP_LINK_PROPS = {
361
- communityProps: {
362
- label: i18next.t("neetoMolecules.sidebar.helpLinks.community", {
363
- app: globalProps.appName
364
- }),
365
- icon: Community,
366
- "data-testid": "help-link-community-button",
367
- "data-btn-weight": "bold",
368
- href: "https://www.launchpass.com/neetohq",
369
- target: "_blank"
370
- },
371
361
  helpCenterProps: {
372
362
  label: i18next.t("neetoMolecules.sidebar.helpLinks.helpCenter"),
373
363
  icon: Book,
374
364
  "data-testid": "help-link-help-center-button",
375
- "data-btn-weight": "bold",
376
365
  href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
377
366
  target: "_blank"
378
367
  },
@@ -380,7 +369,6 @@ var DEFAULT_HELP_LINK_PROPS = {
380
369
  label: i18next.t("neetoMolecules.sidebar.helpLinks.liveChat"),
381
370
  icon: Help,
382
371
  "data-testid": "help-link-live-chat-button",
383
- "data-btn-weight": "bold",
384
372
  onClick: function onClick() {
385
373
  var _window$NeetoChat, _window$NeetoChat2;
386
374
  (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
@@ -406,6 +394,14 @@ var DEFAULT_MENU_LINK_PROPS = {
406
394
  "data-testid": "help-link-status-button",
407
395
  href: "https://neetostatus.com/",
408
396
  target: "_blank"
397
+ },
398
+ communityProps: {
399
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.community", {
400
+ app: globalProps.appName
401
+ }),
402
+ "data-testid": "help-link-community-button",
403
+ href: "https://www.launchpass.com/neetohq",
404
+ target: "_blank"
409
405
  }
410
406
  };
411
407
  var NON_BUTTON_PROPS = ["isVisible"];
@@ -474,10 +470,10 @@ var useFetchLoggedInOrganizations = function useFetchLoggedInOrganizations(email
474
470
  });
475
471
  };
476
472
 
477
- var MenuItem$4 = Dropdown$1.MenuItem;
473
+ var MenuItem$5 = Dropdown$1.MenuItem;
478
474
  var MenuButton$2 = reactUtils.withT(function (_ref) {
479
475
  var t = _ref.t;
480
- return /*#__PURE__*/jsxRuntime.jsx(MenuItem$4.Button, {
476
+ return /*#__PURE__*/jsxRuntime.jsx(MenuItem$5.Button, {
481
477
  className: "neeto-molecules-menu-sublist__item-btn",
482
478
  "data-testid": "organization-switcher-button",
483
479
  style: "text",
@@ -490,7 +486,7 @@ var MenuButton$2 = reactUtils.withT(function (_ref) {
490
486
  });
491
487
 
492
488
  var Menu$2 = Dropdown$1.Menu,
493
- MenuItem$3 = Dropdown$1.MenuItem;
489
+ MenuItem$4 = Dropdown$1.MenuItem;
494
490
  var OrganizationSwitcher = function OrganizationSwitcher() {
495
491
  var _globalProps$user;
496
492
  var _useTranslation = reactI18next.useTranslation(),
@@ -509,7 +505,7 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
509
505
  return currentSubdomain === linkSubdomain;
510
506
  };
511
507
  return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
512
- className: "neeto-molecules-theme-switcher-menu-popup-wrapper",
508
+ className: "neeto-molecules-organization-switcher-menu-popup-wrapper",
513
509
  closeOnSelect: false,
514
510
  customTarget: /*#__PURE__*/jsxRuntime.jsx(MenuButton$2, {}),
515
511
  interactiveDebounce: 30,
@@ -519,7 +515,7 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
519
515
  zIndex: 99999,
520
516
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$2, {
521
517
  children: [organizations === null || organizations === void 0 ? void 0 : organizations.map(function (organization) {
522
- return /*#__PURE__*/jsxRuntime.jsxs(MenuItem$3.Button, {
518
+ return /*#__PURE__*/jsxRuntime.jsxs(MenuItem$4.Button, {
523
519
  href: organization.organizationUrl,
524
520
  rel: "noreferrer",
525
521
  style: "text",
@@ -537,7 +533,7 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
537
533
  }
538
534
  }), organization.orgName]
539
535
  }, organization.userId);
540
- }), /*#__PURE__*/jsxRuntime.jsx(MenuItem$3.Button, {
536
+ }), /*#__PURE__*/jsxRuntime.jsx(MenuItem$4.Button, {
541
537
  href: authAppUrl,
542
538
  rel: "noreferrer",
543
539
  target: "_blank",
@@ -554,7 +550,7 @@ var MenuButton$1 = function MenuButton(_ref) {
554
550
  var _useTranslation = reactI18next.useTranslation(),
555
551
  t = _useTranslation.t;
556
552
  var MenuItem = Dropdown$1.MenuItem;
557
- return /*#__PURE__*/jsxRuntime.jsxs(MenuItem.Button, _objectSpread$2(_objectSpread$2({
553
+ return /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, _objectSpread$2(_objectSpread$2({
558
554
  className: "neeto-molecules-menu-sublist__item-btn",
559
555
  "data-testid": "product-switcher-button",
560
556
  label: t("neetoMolecules.sidebar.productSwitcher"),
@@ -564,14 +560,12 @@ var MenuButton$1 = function MenuButton(_ref) {
564
560
  size: 18
565
561
  })
566
562
  }, otherProps), {}, {
567
- children: [/*#__PURE__*/jsxRuntime.jsx(ProductSwitcher$1, {
568
- size: 20
569
- }), t("neetoMolecules.sidebar.productSwitcher")]
563
+ children: t("neetoMolecules.sidebar.productSwitcher")
570
564
  }));
571
565
  };
572
566
 
573
567
  var Menu$1 = Dropdown$1.Menu,
574
- MenuItem$2 = Dropdown$1.MenuItem;
568
+ MenuItem$3 = Dropdown$1.MenuItem;
575
569
  var Dropdown = function Dropdown() {
576
570
  return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
577
571
  appendTo: "parent",
@@ -587,7 +581,7 @@ var Dropdown = function Dropdown() {
587
581
  classNames: "neeto-molecules-product-switcher-menu-popup__dropdown"
588
582
  },
589
583
  children: /*#__PURE__*/jsxRuntime.jsx(Menu$1, {
590
- children: /*#__PURE__*/jsxRuntime.jsx(MenuItem$2, {
584
+ children: /*#__PURE__*/jsxRuntime.jsx(MenuItem$3, {
591
585
  children: /*#__PURE__*/jsxRuntime.jsx(Menu$3, {})
592
586
  })
593
587
  })
@@ -610,21 +604,18 @@ var ProfileHeader = function ProfileHeader(_ref) {
610
604
  var profileInfo = _ref.profileInfo;
611
605
  var name = profileInfo.name,
612
606
  email = profileInfo.email;
613
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
614
- className: "neeto-ui-relative neeto-ui-flex neeto-ui-items-center neeto-ui-p-3 neeto-ui-bg-primary-50 neeto-molecules-profile-popup__top-section",
607
+ return /*#__PURE__*/jsxRuntime.jsxs("span", {
608
+ className: "flex w-full items-center gap-2 text-start",
615
609
  "data-testid": "floating-action-menu-profile-header",
616
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
617
- className: "start-0 top-0",
618
- children: /*#__PURE__*/jsxRuntime.jsx(Avatar, {
619
- "data-testid": "floating-action-menu-header-profile-icon",
620
- size: "large",
621
- user: profileInfo
622
- })
623
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
624
- className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-grow neeto-ui-min-w-0 neeto-ui-ps-3",
610
+ children: [/*#__PURE__*/jsxRuntime.jsx(Avatar, {
611
+ "data-testid": "floating-action-menu-header-profile-icon",
612
+ size: "medium",
613
+ user: profileInfo
614
+ }), /*#__PURE__*/jsxRuntime.jsxs("span", {
615
+ className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-grow neeto-ui-min-w-0 gap-1",
625
616
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
626
617
  className: "neeto-ui-m-0",
627
- component: "h2",
618
+ component: "span",
628
619
  "data-testid": "floating-action-menu-header-user-name",
629
620
  lineHeight: "tight",
630
621
  style: "h5",
@@ -632,7 +623,8 @@ var ProfileHeader = function ProfileHeader(_ref) {
632
623
  weight: "semibold",
633
624
  children: neetoCist.truncate(name, 18)
634
625
  }), email && /*#__PURE__*/jsxRuntime.jsx(Typography, {
635
- className: "neeto-ui-w-full neeto-ui-truncate neeto-ui-text-gray-700",
626
+ className: "neeto-ui-w-full neeto-ui-truncate neeto-ui-text-gray-500",
627
+ component: "span",
636
628
  "data-testid": "floating-action-menu-header-user-email",
637
629
  lineHeight: "tight",
638
630
  style: "body3",
@@ -665,29 +657,10 @@ var getConsumerProfileInfo = function getConsumerProfileInfo() {
665
657
  isAuthenticated: globalProps.isConsumer
666
658
  };
667
659
  };
668
- var getDefaultTopLinks = function getDefaultTopLinks(isOwner, setIsProfilePaneOpen, isAuthenticated) {
669
- if (!isAuthenticated) return [];
670
- var topLinks = [{
671
- label: i18next.t("neetoMolecules.sidebar.myProfile"),
672
- onClick: function onClick() {
673
- return setIsProfilePaneOpen(true);
674
- },
675
- "data-testid": "my-profile-button"
676
- }];
677
- if (isOwner) {
678
- topLinks.push({
679
- label: i18next.t("neetoMolecules.sidebar.myWorkspace"),
680
- onClick: function onClick() {
681
- return window.open(MY_ORGANIZATION_URL, "_self");
682
- },
683
- "data-testid": "profile-organization-settings-button"
684
- });
685
- }
686
- return topLinks;
687
- };
688
660
  var getDefaultBottomLinks = function getDefaultBottomLinks(isAuthenticated, isConsumer) {
689
661
  return [isAuthenticated ? {
690
662
  label: i18next.t("neetoMolecules.sidebar.logout"),
663
+ icon: Logout,
691
664
  onClick: function onClick() {
692
665
  axios$1.resetAuthTokens();
693
666
  general.removeFromLocalStorage(getSidebarStateLocalStorageKey());
@@ -722,49 +695,99 @@ var setAppTheme = function setAppTheme() {
722
695
  isDarkTheme ? setDarkTheme() : setLightTheme();
723
696
  };
724
697
 
698
+ var MenuItem$2 = Dropdown$1.MenuItem;
699
+ var ThemeSwitcher = function ThemeSwitcher() {
700
+ var _useTranslation = reactI18next.useTranslation(),
701
+ t = _useTranslation.t;
702
+ var _useLocalStorage = useLocalStorage(APP_THEME_LOCALSTORAGE_KEY, THEMES.LIGHT),
703
+ _useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
704
+ appTheme = _useLocalStorage2[0],
705
+ setAppTheme = _useLocalStorage2[1];
706
+ var isDarkThemeSelected = appTheme === THEMES.DARK;
707
+ var switchTheme = function switchTheme(theme) {
708
+ theme === THEMES.LIGHT ? setLightTheme() : setDarkTheme();
709
+ setAppTheme(theme);
710
+ };
711
+ return /*#__PURE__*/jsxRuntime.jsxs(MenuItem$2, {
712
+ className: "neeto-molecules-theme-switcher flex items-center justify-between gap-2 px-5 py-3",
713
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
714
+ className: "neeto-molecules-theme-switcher__label",
715
+ children: t("neetoMolecules.sidebar.themeSwitcher.label")
716
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
717
+ className: "neeto-molecules-theme-switcher__segmented-control",
718
+ "data-testid": "theme-switcher-button",
719
+ children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
720
+ "data-testid": "theme-switcher-light-button",
721
+ type: "button",
722
+ className: classnames("neeto-molecules-theme-switcher__option", {
723
+ "neeto-molecules-theme-switcher__option--active": !isDarkThemeSelected
724
+ }),
725
+ onClick: function onClick() {
726
+ return switchTheme(THEMES.LIGHT);
727
+ },
728
+ children: [/*#__PURE__*/jsxRuntime.jsx(Sun, {
729
+ size: 18
730
+ }), t("neetoMolecules.sidebar.themeSwitcher.light")]
731
+ }), /*#__PURE__*/jsxRuntime.jsxs("button", {
732
+ "data-testid": "theme-switcher-dark-button",
733
+ type: "button",
734
+ className: classnames("neeto-molecules-theme-switcher__option", {
735
+ "neeto-molecules-theme-switcher__option--active": isDarkThemeSelected
736
+ }),
737
+ onClick: function onClick() {
738
+ return switchTheme(THEMES.DARK);
739
+ },
740
+ children: [/*#__PURE__*/jsxRuntime.jsx(Moon, {
741
+ size: 18
742
+ }), t("neetoMolecules.sidebar.themeSwitcher.dark")]
743
+ })]
744
+ })]
745
+ });
746
+ };
747
+
725
748
  var MenuItem$1 = Dropdown$1.MenuItem;
726
749
  var MenuButton = reactUtils.withT(function (_ref) {
727
- var t = _ref.t,
728
- selectedThemeName = _ref.selectedThemeName;
750
+ var _globalProps$organiza;
751
+ var t = _ref.t;
729
752
  return /*#__PURE__*/jsxRuntime.jsx(MenuItem$1.Button, {
730
- className: "neeto-molecules-menu-sublist__item-btn",
731
- "data-testid": "theme-switcher-button",
753
+ className: "neeto-molecules-workspace-display",
754
+ "data-testid": "workspace-display",
732
755
  style: "text",
733
756
  suffix: /*#__PURE__*/jsxRuntime.jsx(Right, {
734
757
  className: "rtl:scale-x-[-1]",
735
758
  size: 18
736
759
  }),
737
- children: t("neetoMolecules.sidebar.themeSwitcher.label", {
738
- selectedTheme: selectedThemeName
760
+ children: /*#__PURE__*/jsxRuntime.jsxs("span", {
761
+ className: "neeto-molecules-workspace-display__content flex flex-col gap-1.5 text-start",
762
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
763
+ className: "neeto-molecules-workspace-display__label",
764
+ component: "span",
765
+ style: "body2",
766
+ weight: "medium",
767
+ children: t("neetoMolecules.sidebar.workspace")
768
+ }), ((_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.name) && /*#__PURE__*/jsxRuntime.jsx(Typography, {
769
+ className: "neeto-molecules-workspace-display__name neeto-ui-text-gray-500",
770
+ component: "span",
771
+ style: "body3",
772
+ children: initializers.globalProps.organization.name
773
+ })]
739
774
  })
740
775
  });
741
776
  });
742
777
 
743
778
  var Menu = Dropdown$1.Menu,
744
779
  MenuItem = Dropdown$1.MenuItem;
745
- var ThemeSwitcher = function ThemeSwitcher() {
780
+ var WorkspaceMenu = function WorkspaceMenu() {
781
+ var _globalProps$organiza;
746
782
  var _useTranslation = reactI18next.useTranslation(),
747
783
  t = _useTranslation.t;
748
784
  var _useBreakpoints = useBreakpoints(),
749
785
  isSize = _useBreakpoints.isSize;
750
- var _useLocalStorage = useLocalStorage(APP_THEME_LOCALSTORAGE_KEY, THEMES.LIGHT),
751
- _useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
752
- appTheme = _useLocalStorage2[0],
753
- setAppTheme = _useLocalStorage2[1];
754
- var isDarkThemeSelected = appTheme === THEMES.DARK;
755
- var selectedThemeName = isDarkThemeSelected ? t("neetoMolecules.sidebar.themeSwitcher.dark") : t("neetoMolecules.sidebar.themeSwitcher.light");
756
786
  var isMobile = isSize("mobile");
757
- var switchTheme = function switchTheme(theme) {
758
- theme === THEMES.LIGHT ? setLightTheme() : setDarkTheme();
759
- setAppTheme(theme);
760
- };
761
787
  return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
762
- appendTo: "parent",
763
- className: "neeto-molecules-theme-switcher-menu-popup-wrapper",
788
+ className: "neeto-molecules-organization-menu-popup-wrapper",
764
789
  closeOnSelect: false,
765
- customTarget: /*#__PURE__*/jsxRuntime.jsx(MenuButton, {
766
- selectedThemeName: selectedThemeName
767
- }),
790
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(MenuButton, {}),
768
791
  interactiveDebounce: 30,
769
792
  offset: [0, 5],
770
793
  position: isMobile ? "bottom" : "right",
@@ -772,36 +795,37 @@ var ThemeSwitcher = function ThemeSwitcher() {
772
795
  zIndex: 99999,
773
796
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu, {
774
797
  children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
775
- "data-testid": "theme-switcher-light-button",
776
- suffix: !isDarkThemeSelected && /*#__PURE__*/jsxRuntime.jsx(Check, {
777
- size: 18
778
- }),
779
- className: classnames({
780
- "neeto-molecules-theme-switcher-active-button": !isDarkThemeSelected
781
- }),
782
- onClick: function onClick() {
783
- return switchTheme(THEMES.LIGHT);
784
- },
785
- children: t("neetoMolecules.sidebar.themeSwitcher.light")
786
- }), /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
787
- "data-testid": "theme-switcher-dark-button",
788
- suffix: isDarkThemeSelected && /*#__PURE__*/jsxRuntime.jsx(Check, {
789
- size: 18
790
- }),
791
- className: classnames({
792
- "neeto-molecules-theme-switcher-active-button": isDarkThemeSelected
793
- }),
794
- onClick: function onClick() {
795
- return switchTheme(THEMES.DARK);
796
- },
797
- children: t("neetoMolecules.sidebar.themeSwitcher.dark")
798
+ "data-testid": "profile-organization-settings-button",
799
+ href: MY_ORGANIZATION_URL,
800
+ rel: "noreferrer",
801
+ target: "_blank",
802
+ children: t("neetoMolecules.sidebar.workspaceMenu.settings")
803
+ }), ((_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain) && /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
804
+ href: MY_ORGANIZATION_URL,
805
+ rel: "noreferrer",
806
+ target: "_blank",
807
+ children: /*#__PURE__*/jsxRuntime.jsxs("span", {
808
+ className: "neeto-molecules-workspace-display__content flex flex-col gap-1.5 text-start",
809
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
810
+ className: "neeto-molecules-workspace-display__label",
811
+ component: "span",
812
+ style: "body2",
813
+ weight: "medium",
814
+ children: t("neetoMolecules.sidebar.workspaceMenu.subdomain")
815
+ }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
816
+ className: "neeto-molecules-workspace-display__name neeto-ui-text-gray-500",
817
+ component: "span",
818
+ style: "body3",
819
+ children: initializers.globalProps.organization.subdomain
820
+ })]
821
+ })
798
822
  })]
799
823
  })
800
824
  });
801
825
  };
802
826
 
803
827
  var ProfileMenu = function ProfileMenu(_ref) {
804
- var _globalProps$user, _globalProps$user2;
828
+ var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4;
805
829
  var profileInfo = _ref.profileInfo,
806
830
  showProductSwitcher = _ref.showProductSwitcher,
807
831
  helpLinks = _ref.helpLinks,
@@ -817,29 +841,16 @@ var ProfileMenu = function ProfileMenu(_ref) {
817
841
  MenuItem = Dropdown$1.MenuItem,
818
842
  Divider = Dropdown$1.Divider;
819
843
  var isAuthenticated = profileInfo.isAuthenticated;
844
+ var _Profile$usePaneState = Profile.usePaneState(),
845
+ _Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
846
+ setIsProfilePaneOpen = _Profile$usePaneState2[1];
847
+ var normalizedPlan = (((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) || "").toLowerCase();
820
848
  return /*#__PURE__*/jsxRuntime.jsxs(Menu, {
821
849
  className: "pb-1",
822
- children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem, {
823
- className: "neeto-molecules-profile-popup",
824
- "data-testid": "profile-popup",
825
- children: isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
826
- profileInfo: profileInfo
827
- })
828
- }), !isConsumer && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
829
- children: [neetoCist.isPresent((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
830
- links: [{
831
- label: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
832
- i18nKey: "neetoMolecules.sidebar.currentPlan",
833
- values: {
834
- subscriptionPlan: neetoCist.humanize((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.subscriptionPlan)
835
- }
836
- }),
837
- href: NEETO_AUTH_BILLING_INFO_URL,
838
- "data-testid": "subscription-plan"
839
- }]
840
- }), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
841
- toggleModal: toggleModal
842
- }), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), isThemeSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(ThemeSwitcher, {}), neetoCist.isNotEmpty(topLinks) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
850
+ children: [!isConsumer && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
851
+ children: [/*#__PURE__*/jsxRuntime.jsx(LinkSection, {
852
+ links: defaultLinks
853
+ }), neetoCist.isNotEmpty(topLinks) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
843
854
  children: [/*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
844
855
  links: topLinks
845
856
  })]
@@ -848,13 +859,38 @@ var ProfileMenu = function ProfileMenu(_ref) {
848
859
  className: "neeto-molecules-floating-action-button__profile-wrapper-custom-content",
849
860
  children: customContent
850
861
  })]
851
- }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
852
- links: defaultLinks
853
- }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
862
+ }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.isOwner) && /*#__PURE__*/jsxRuntime.jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), neetoCist.isPresent((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
863
+ links: [{
864
+ label: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
865
+ children: [globalProps.appName, " ", /*#__PURE__*/jsxRuntime.jsx("span", {
866
+ className: classnames("neeto-molecules-subscription-plan-badge", {
867
+ "neeto-molecules-subscription-plan-badge--pro": normalizedPlan === "pro",
868
+ "neeto-molecules-subscription-plan-badge--free": normalizedPlan === "free"
869
+ }),
870
+ children: neetoCist.humanize((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.subscriptionPlan)
871
+ })]
872
+ }),
873
+ href: NEETO_AUTH_BILLING_INFO_URL,
874
+ "data-testid": "subscription-plan"
875
+ }]
876
+ }), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
877
+ toggleModal: toggleModal
878
+ }), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
854
879
  links: helpLinks
855
880
  }), /*#__PURE__*/jsxRuntime.jsx(Divider, {})]
881
+ }), isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
882
+ className: "neeto-molecules-profile-popup",
883
+ "data-testid": "my-profile-button",
884
+ onClick: function onClick() {
885
+ return setIsProfilePaneOpen(true);
886
+ },
887
+ children: /*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
888
+ profileInfo: profileInfo
889
+ })
856
890
  }), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
857
891
  links: bottomLinks
892
+ }), isThemeSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
893
+ children: [/*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(ThemeSwitcher, {})]
858
894
  })]
859
895
  });
860
896
  };
@@ -862,7 +898,6 @@ var ProfileMenu = function ProfileMenu(_ref) {
862
898
  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; }
863
899
  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; }
864
900
  var ProfileButton = function ProfileButton(_ref) {
865
- var _globalProps$user;
866
901
  var profileInfoOverrides = _ref.profileInfoOverrides,
867
902
  showProductSwitcher = _ref.showProductSwitcher,
868
903
  bottomLinks = _ref.bottomLinks,
@@ -876,16 +911,17 @@ var ProfileButton = function ProfileButton(_ref) {
876
911
  _useState2 = _slicedToArray(_useState, 2),
877
912
  isModalOpen = _useState2[0],
878
913
  setIsModalOpen = _useState2[1];
879
- var _useState3 = React.useState(null),
914
+ var _useState3 = React.useState(false),
880
915
  _useState4 = _slicedToArray(_useState3, 2),
881
- changesCount = _useState4[0],
882
- setChangesCount = _useState4[1];
916
+ isBackdropVisible = _useState4[0],
917
+ setIsBackdropVisible = _useState4[1];
918
+ var _useState5 = React.useState(null),
919
+ _useState6 = _slicedToArray(_useState5, 2),
920
+ changesCount = _useState6[0],
921
+ setChangesCount = _useState6[1];
883
922
  var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
884
923
  _KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
885
924
  setIsOpen = _KeyboardShortcuts$us2[1];
886
- var _Profile$usePaneState = Profile.usePaneState(),
887
- _Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
888
- setIsProfilePaneOpen = _Profile$usePaneState2[1];
889
925
  useHotkeys(["ctrl+e", "command+e"], function () {
890
926
  return setIsModalOpen(ramda.not);
891
927
  }, {
@@ -904,7 +940,6 @@ var ProfileButton = function ProfileButton(_ref) {
904
940
  };
905
941
  window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
906
942
  }, []);
907
- var newTopLinks = globalProps.appName.toLowerCase() !== "neetoauth" ? [].concat(_toConsumableArray(getDefaultTopLinks((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.isOwner, setIsProfilePaneOpen, profileInfo.isAuthenticated)), _toConsumableArray(topLinks)) : topLinks;
908
943
  var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
909
944
  var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
910
945
  return _objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]);
@@ -932,6 +967,8 @@ var ProfileButton = function ProfileButton(_ref) {
932
967
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
933
968
  children: [/*#__PURE__*/jsxRuntime.jsx(Profile.Pane, {
934
969
  popoverProps: profilePopoverProps
970
+ }), isBackdropVisible && /*#__PURE__*/jsxRuntime.jsx("div", {
971
+ className: "neeto-molecules-floating-action-button__backdrop"
935
972
  }), /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
936
973
  appendTo: function appendTo() {
937
974
  return document.body;
@@ -940,10 +977,10 @@ var ProfileButton = function ProfileButton(_ref) {
940
977
  closeOnSelect: false,
941
978
  icon: neetoCist.noop,
942
979
  interactiveDebounce: 30,
943
- offset: [15, 10],
980
+ offset: [4, 4],
944
981
  position: "right-end",
945
982
  strategy: "fixed",
946
- theme: "light",
983
+ theme: "light neeto-molecules-floating-action-outer-dropdown-wrapper",
947
984
  trigger: "all",
948
985
  zIndex: 99999,
949
986
  customTarget: /*#__PURE__*/jsxRuntime.jsxs("button", {
@@ -964,6 +1001,12 @@ var ProfileButton = function ProfileButton(_ref) {
964
1001
  dropdownProps: {
965
1002
  classNames: "neeto-molecules-floating-action-button__dropdown"
966
1003
  },
1004
+ onHide: function onHide() {
1005
+ return setIsBackdropVisible(false);
1006
+ },
1007
+ onShow: function onShow() {
1008
+ return setIsBackdropVisible(true);
1009
+ },
967
1010
  children: /*#__PURE__*/jsxRuntime.jsx(ProfileMenu, {
968
1011
  customContent: customContent,
969
1012
  defaultLinks: defaultLinks,
@@ -973,9 +1016,9 @@ var ProfileButton = function ProfileButton(_ref) {
973
1016
  isThemeSwitcherEnabled: isThemeSwitcherEnabled,
974
1017
  profileInfo: profileInfo,
975
1018
  showProductSwitcher: showProductSwitcher,
1019
+ topLinks: topLinks,
976
1020
  bottomLinks: newBottomLinks,
977
- toggleModal: setIsModalOpen,
978
- topLinks: newTopLinks
1021
+ toggleModal: setIsModalOpen
979
1022
  })
980
1023
  }), neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
981
1024
  className: "neeto-molecules-menu__notif-count",
@@ -990,7 +1033,7 @@ var ProfileButton = function ProfileButton(_ref) {
990
1033
  });
991
1034
  };
992
1035
 
993
- var css = ":root{--neeto-molecules-floating-menu-z-index:99999}.neeto-molecules-floating-action-menu__container{background-color:rgb(var(--neeto-ui-white));border:1px solid rgb(var(--neeto-ui-white));border-end-end-radius:1.0625rem;border-inline-start:none;border-start-end-radius:1.0625rem;bottom:16px;inset-inline-start:0;position:fixed;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-color:rgb(var(--neeto-ui-primary-500));border-end-end-radius:1rem;border-start-end-radius:1rem;display:flex;flex-direction:column;gap:.375rem;justify-content:center;padding:.25rem}.neeto-molecules-floating-action-button__help-icon{align-items:center;background-color:#fff;border-radius:6.25rem;display:flex;height:1.625rem;justify-content:center;width:1.625rem}.neeto-molecules-floating-action-button__profile-avatar{--neeto-ui-avatar-container-width:1.625rem;--neeto-ui-avatar-container-height:1.625rem;border:2px solid #fff;border-radius:6.25rem}.neeto-molecules-floating-action-button__profile-avatar>div{height:100%;width:100%}.neeto-molecules-floating-action-button__profile-avatar .neeto-ui-avatar{height:100%!important;width:100%!important}.neeto-molecules-floating-action-button__dropdown{flex-shrink:0;max-height:95vh!important;max-width:none;width:16rem;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button__dropdown ul{padding-top:0!important}.neeto-molecules-product-switcher-menu-popup__dropdown{max-height:none!important;max-width:none}.neeto-molecules-menu__notif-count{border:1px solid #fff;height:.9375rem;inset-inline-end:0;min-width:.9375rem;pointer-events:none;position:absolute;top:0;z-index:3}.neeto-molecules-menu-list__item-btn-count,.neeto-molecules-menu__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);justify-content:center;padding-inline-end:.25rem;padding-inline-start:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-molecules-menu-list__item-btn-count{height:1.125rem;min-width:1.125rem}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper .tippy-content{padding:0}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-start-end-radius:var(--neeto-ui-rounded);border-start-start-radius:var(--neeto-ui-rounded)}.neeto-molecules-menu-sublist__item-btn{font-weight:500!important;height:2.5rem}.neeto-molecules-menu-sublist__item-btn[data-btn-weight=bold]{font-weight:700!important}.neeto-molecules-menu-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-menu-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-menu-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-product-switcher-menu-popup-wrapper{height:95vh;overflow-y:auto;width:calc(100vw - 25rem)}.neeto-molecules-floating-action-button__profile-wrapper-custom-content:hover{background-color:rgb(var(--neeto-ui-white))!important}.neeto-molecules-theme-switcher-menu-popup-wrapper .neeto-ui-dropdown__popup-menu{padding-top:.25rem!important}.neeto-molecules-organization-switcher-active-button,.neeto-molecules-theme-switcher-active-button{color:rgb(var(--neeto-ui-success-600))!important}";
1036
+ var css = ":root{--neeto-molecules-floating-menu-z-index:99999}.neeto-molecules-floating-action-menu__container{background-color:rgb(var(--neeto-ui-white));border:1px solid rgb(var(--neeto-ui-white));border-end-end-radius:1.0625rem;border-inline-start:none;border-start-end-radius:1.0625rem;bottom:16px;inset-inline-start:0;position:fixed;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-color:rgb(var(--neeto-ui-primary-500));border-end-end-radius:1rem;border-start-end-radius:1rem;display:flex;flex-direction:column;gap:.375rem;justify-content:center;padding:.25rem}.neeto-molecules-floating-action-button__help-icon{align-items:center;background-color:#fff;border-radius:6.25rem;display:flex;height:1.625rem;justify-content:center;width:1.625rem}.neeto-molecules-floating-action-button__profile-avatar{--neeto-ui-avatar-container-width:1.625rem;--neeto-ui-avatar-container-height:1.625rem;border:2px solid #fff;border-radius:6.25rem}.neeto-molecules-floating-action-button__profile-avatar>div{height:100%;width:100%}.neeto-molecules-floating-action-button__profile-avatar .neeto-ui-avatar{height:100%!important;width:100%!important}.neeto-molecules-floating-action-button__dropdown{--neeto-ui-dropdown-divider-margin:0.5rem;--neeto-ui-dropdown-item-border-radius:0.25rem;flex-shrink:0;max-height:95vh!important;max-width:none;width:16rem;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button__dropdown .neeto-ui-dropdown__popup-menu{padding-bottom:.75rem!important;padding-top:.75rem!important}.neeto-molecules-floating-action-button__dropdown.neeto-ui-dropdown__popup .neeto-ui-dropdown__popup-menu-item{background-color:transparent!important;padding-left:.75rem;padding-right:.75rem}.neeto-molecules-floating-action-button__backdrop{background-color:rgba(var(--neeto-ui-black),.27);height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:99998;z-index:calc(var(--neeto-molecules-floating-menu-z-index) - 1)}.neeto-molecules-product-switcher-menu-popup__dropdown{max-height:none!important;max-width:none}.neeto-molecules-menu__notif-count{border:1px solid #fff;height:.9375rem;inset-inline-end:0;min-width:.9375rem;pointer-events:none;position:absolute;top:0;z-index:3}.neeto-molecules-menu-list__item-btn-count,.neeto-molecules-menu__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);justify-content:center;padding-inline-end:.25rem;padding-inline-start:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-molecules-menu-list__item-btn-count{height:1.125rem;min-width:1.125rem}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:.75rem!important;min-width:15rem}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper .tippy-content{padding:0}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-radius:.25rem;transition:var(--neeto-ui-transition)}.neeto-molecules-profile-popup__top-section:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-menu-sublist__item-btn{font-weight:500!important;height:2.5rem}.neeto-molecules-menu-sublist__item-btn[data-btn-weight=bold]{font-weight:700!important}.neeto-molecules-menu-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-menu-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-menu-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-product-switcher-menu-popup-wrapper{height:95vh;overflow-y:auto;width:calc(100vw - 25rem)}.neeto-molecules-floating-action-button__profile-wrapper-custom-content:hover{background-color:rgb(var(--neeto-ui-white))!important}.neeto-molecules-organization-switcher-active-button,.neeto-molecules-theme-switcher-active-button{color:rgb(var(--neeto-ui-success-600))!important}.tippy-box[data-theme~=neeto-molecules-floating-action-outer-dropdown-wrapper]{--neeto-ui-dropdown-box-shadow:0 0 0 0;--neeto-ui-dropdown-border-radius:0.75rem;--neeto-ui-dropdown-popup-border-radius:0.75rem;--neeto-ui-dropdown-margin-y:0;--neeto-ui-dropdown-margin-x:0;transition:var(--neeto-ui-transition)}.tippy-box[data-theme~=neeto-molecules-floating-action-outer-dropdown-wrapper] .neeto-ui-dropdown__popup{--neeto-ui-dropdown-border-radius:0.75rem;transition:var(--neeto-ui-transition)}.tippy-box[data-theme~=neeto-molecules-floating-action-outer-dropdown-wrapper] .neeto-ui-dropdown__popup .neeto-ui-dropdown__popup-divider{transition:var(--neeto-ui-transition)}.neeto-molecules-subscription-plan-badge{border-radius:9999px;display:inline-block;font-size:.625rem;font-weight:600;line-height:1.1;padding:.25rem .625rem;text-transform:uppercase}.neeto-molecules-subscription-plan-badge--pro{background-color:#ffe44a;color:#000}.neeto-molecules-subscription-plan-badge--free{background-color:rgb(var(--neeto-ui-gray-300));color:rgb(var(--neeto-ui-black))}.neeto-molecules-theme-switcher{border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}.neeto-molecules-theme-switcher__label{color:rgb(var(--neeto-ui-gray-800));font-size:.875rem;font-weight:500}.neeto-molecules-theme-switcher__segmented-control{background-color:rgb(var(--neeto-ui-gray-200));border-radius:9999px;display:flex;gap:.25rem;padding:.0625rem}.neeto-molecules-theme-switcher__option{align-items:center;background-color:transparent;border:1px solid transparent;border-radius:9999px;color:rgb(var(--neeto-ui-gray-700));cursor:pointer;display:flex;flex:1;font-size:.75rem;font-weight:500;gap:.125rem;padding:.25rem .375rem;transition:all .2s ease;white-space:nowrap}.neeto-molecules-theme-switcher__option:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-theme-switcher__option--active{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-300));box-shadow:0 1px 2px rgba(0,0,0,.05);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-theme-switcher__option svg{flex-shrink:0}";
994
1037
  injectCss.n(css,{});
995
1038
 
996
1039
  var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent", "profilePopoverProps", "isConsumer"];