@bigbinary/neeto-molecules 4.0.134 → 4.0.135

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.
@@ -25,10 +25,12 @@ import { n } from './inject-css-C2dztUxs.js';
25
25
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
26
26
  import { useQuery } from '@tanstack/react-query';
27
27
  import axios from 'axios';
28
+ import Crown from '@bigbinary/neeto-icons/Crown';
28
29
  import { t } from 'i18next';
29
30
  import Book from '@bigbinary/neeto-icons/Book';
30
31
  import useBreakpoints from '@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints';
31
- import ExternalLink from '@bigbinary/neeto-icons/ExternalLink';
32
+ import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
33
+ import Tag from '@bigbinary/neetoui/Tag';
32
34
  import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
33
35
  import Right from '@bigbinary/neeto-icons/Right';
34
36
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
@@ -39,6 +41,7 @@ import { getFromLocalStorage } from '@bigbinary/neeto-commons-frontend/utils';
39
41
  import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils/axios';
40
42
  import { removeFromLocalStorage } from '@bigbinary/neeto-commons-frontend/utils/general';
41
43
  import Logout from '@bigbinary/neeto-icons/Logout';
44
+ import CopyToClipboardButton from './CopyToClipboardButton.js';
42
45
  import './useKeyboardShortcutsPaneState-C_eLceJQ.js';
43
46
  import 'zustand/shallow';
44
47
  import '@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions';
@@ -48,6 +51,8 @@ import '@bigbinary/neetoui/Button';
48
51
  import '@bigbinary/neetoui/managers';
49
52
  import '@bigbinary/neetoui/Kbd';
50
53
  import './ua-parser-rRwDJPFB.js';
54
+ import '@bigbinary/neeto-icons/Copy';
55
+ import '@bigbinary/neeto-icons/Check';
51
56
 
52
57
  var QUERY_KEYS$1 = {
53
58
  NEETO_APPS_LIST: "neeto-apps-list"
@@ -498,19 +503,21 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
498
503
  href: organization.organizationUrl,
499
504
  rel: "noreferrer",
500
505
  style: "text",
501
- suffix: /*#__PURE__*/jsx(ExternalLink, {
502
- size: 18
503
- }),
504
506
  target: "_blank",
505
507
  className: classnames({
506
508
  "neeto-molecules-organization-switcher-active-button": isCurrentSubdomain(organization.organizationUrl)
507
509
  }),
508
- children: [/*#__PURE__*/jsx(Avatar, {
509
- user: {
510
- name: organization.userName,
511
- imageUrl: organization.userImageUrl
512
- }
513
- }), organization.orgName]
510
+ children: [organization.orgName, isCurrentSubdomain(organization.organizationUrl) && /*#__PURE__*/jsx(Tag, {
511
+ icon: function icon() {
512
+ return /*#__PURE__*/jsx(CheckCircle, {
513
+ size: 12
514
+ });
515
+ },
516
+ size: "small",
517
+ style: "primary",
518
+ type: "solid",
519
+ children: t("neetoMolecules.sidebar.organizationSwitcher.signedin")
520
+ })]
514
521
  }, organization.userId);
515
522
  }), /*#__PURE__*/jsx(MenuItem$4.Button, {
516
523
  href: authAppUrl,
@@ -779,23 +786,29 @@ var WorkspaceMenu = function WorkspaceMenu() {
779
786
  rel: "noreferrer",
780
787
  target: "_blank",
781
788
  children: t("neetoMolecules.sidebar.workspaceMenu.settings")
782
- }), ((_globalProps$organiza = globalProps$1.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain) && /*#__PURE__*/jsx(MenuItem.Button, {
783
- href: MY_ORGANIZATION_URL,
784
- rel: "noreferrer",
785
- target: "_blank",
789
+ }), ((_globalProps$organiza = globalProps$1.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain) && /*#__PURE__*/jsx(MenuItem, {
790
+ className: "px-6 py-2",
786
791
  children: /*#__PURE__*/jsxs("span", {
787
- className: "neeto-molecules-workspace-display__content flex flex-col gap-1.5 text-start",
792
+ className: "neeto-molecules-workspace-display__content flex flex-col gap-0.5 text-start",
788
793
  children: [/*#__PURE__*/jsx(Typography, {
789
794
  className: "neeto-molecules-workspace-display__label",
790
795
  component: "span",
791
796
  style: "body2",
792
797
  weight: "medium",
793
798
  children: t("neetoMolecules.sidebar.workspaceMenu.subdomain")
794
- }), /*#__PURE__*/jsx(Typography, {
795
- className: "neeto-molecules-workspace-display__name neeto-ui-text-gray-500",
799
+ }), /*#__PURE__*/jsxs(Typography, {
800
+ className: "neeto-molecules-workspace-display__name neeto-ui-text-gray-500 flex items-center gap-1",
796
801
  component: "span",
797
802
  style: "body3",
798
- children: globalProps$1.organization.subdomain
803
+ children: [/*#__PURE__*/jsx("span", {
804
+ className: "min-w-0 truncate",
805
+ children: globalProps$1.organization.subdomain
806
+ }), /*#__PURE__*/jsx(CopyToClipboardButton, {
807
+ className: "flex-shrink-0",
808
+ size: "small",
809
+ style: "text",
810
+ value: globalProps$1.organization.subdomain
811
+ })]
799
812
  })]
800
813
  })
801
814
  })]
@@ -823,6 +836,8 @@ var ProfileMenu = function ProfileMenu(_ref) {
823
836
  var _Profile$usePaneState = Profile.usePaneState(),
824
837
  _Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
825
838
  setIsProfilePaneOpen = _Profile$usePaneState2[1];
839
+ var _useTranslation = useTranslation(),
840
+ t = _useTranslation.t;
826
841
  var normalizedPlan = (((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) || "").toLowerCase();
827
842
  return /*#__PURE__*/jsxs(Menu, {
828
843
  className: "pb-1",
@@ -842,11 +857,15 @@ var ProfileMenu = function ProfileMenu(_ref) {
842
857
  links: [{
843
858
  label: /*#__PURE__*/jsxs(Fragment, {
844
859
  children: [globalProps.appName, " ", /*#__PURE__*/jsx("span", {
845
- className: classnames("neeto-molecules-subscription-plan-badge", {
860
+ className: classnames("neeto-molecules-subscription-plan-badge flex items-center gap-1", {
846
861
  "neeto-molecules-subscription-plan-badge--pro": normalizedPlan === "pro",
847
862
  "neeto-molecules-subscription-plan-badge--free": normalizedPlan === "free"
848
863
  }),
849
- children: humanize((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.subscriptionPlan)
864
+ children: normalizedPlan === "pro" ? humanize((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.subscriptionPlan) : /*#__PURE__*/jsxs(Fragment, {
865
+ children: [/*#__PURE__*/jsx(Crown, {
866
+ size: 12
867
+ }), t("neetoMolecules.sidebar.upgradePlan")]
868
+ })
850
869
  })]
851
870
  }),
852
871
  href: NEETO_AUTH_BILLING_INFO_URL,
@@ -1012,7 +1031,7 @@ var ProfileButton = function ProfileButton(_ref) {
1012
1031
  });
1013
1032
  };
1014
1033
 
1015
- 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}";
1034
+ 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}.neeto-molecules-subscription-plan-badge--pro{background-color:#ffe44a;color:#000}.neeto-molecules-subscription-plan-badge--free{background-color:rgb(var(--neeto-ui-primary-500));color:rgb(var(--neeto-ui-white))}.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}";
1016
1035
  n(css,{});
1017
1036
 
1018
1037
  var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent", "profilePopoverProps", "isConsumer"];