@bigbinary/neeto-molecules 4.1.36 → 4.1.38

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.
@@ -10,7 +10,7 @@ import Help from '@bigbinary/neeto-icons/Help';
10
10
  import Profile from '@bigbinary/neeto-team-members-frontend/Profile';
11
11
  import Avatar from '@bigbinary/neetoui/Avatar';
12
12
  import Dropdown$1 from '@bigbinary/neetoui/Dropdown';
13
- import { isEmpty, toLower, omit, mergeDeepLeft, not } from 'ramda';
13
+ import { isEmpty, toLower, mergeDeepLeft, not } from 'ramda';
14
14
  import KeyboardShortcuts from './KeyboardShortcuts.js';
15
15
  import Modal$1 from '@bigbinary/neetoui/Modal';
16
16
  import classnames from 'classnames';
@@ -33,12 +33,12 @@ import Community from '@bigbinary/neeto-icons/Community';
33
33
  import Status from '@bigbinary/neeto-icons/Status';
34
34
  import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
35
35
  import Right from '@bigbinary/neeto-icons/Right';
36
- import { t } from 'i18next';
37
36
  import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
38
37
  import Tag from '@bigbinary/neetoui/Tag';
39
38
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
40
39
  import CloseCircle from '@bigbinary/neeto-icons/CloseCircle';
41
40
  import User from '@bigbinary/neeto-icons/User';
41
+ import { t } from 'i18next';
42
42
  import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage';
43
43
  import Moon from '@bigbinary/neeto-icons/Moon';
44
44
  import Sun from '@bigbinary/neeto-icons/Sun';
@@ -427,36 +427,6 @@ var HelpMenu = function HelpMenu() {
427
427
  });
428
428
  };
429
429
 
430
- var shouldShowWhatsNew = function shouldShowWhatsNew() {
431
- var _window$globalProps;
432
- var currentUserEmail = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.email;
433
- return window.location.hostname === "localhost" || currentUserEmail === "oliver@example.com" || (currentUserEmail === null || currentUserEmail === void 0 ? void 0 : currentUserEmail.endsWith("@bigbinary.com"));
434
- };
435
- var MY_ORGANIZATION_URL = "/auth/organization/edit";
436
- var DELETE_WORKSPACE_URL = "/auth/organization/delete";
437
- var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
438
- var DEFAULT_MENU_LINK_PROPS = {
439
- engageProps: {
440
- id: ENGAGE_WIDGET_TRIGGER_ID,
441
- label: t("neetoMolecules.sidebar.helpLinks.whatsNew"),
442
- "data-testid": "help-link-engage-button",
443
- isVisible: shouldShowWhatsNew
444
- },
445
- keyboardShortcutProps: {
446
- label: t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
447
- "data-testid": "help-link-keyboard-shortcut-button"
448
- }
449
- };
450
- var NON_BUTTON_PROPS = ["isVisible"];
451
-
452
- // Theme switcher
453
- var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
454
- var THEMES = {
455
- LIGHT: "neeto-ui-theme--light",
456
- DARK: "neeto-ui-theme--dark"
457
- };
458
- var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
459
-
460
430
  var _excluded$2 = ["label", "icon", "changesCount"];
461
431
  function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
462
432
  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; }
@@ -477,7 +447,7 @@ var LinkSection = function LinkSection(_ref) {
477
447
  size: 18
478
448
  }),
479
449
  style: "text"
480
- }, omit(NON_BUTTON_PROPS, otherProps)), {}, {
450
+ }, otherProps), {}, {
481
451
  children: [label, isPresent(changesCount) && /*#__PURE__*/jsx("span", {
482
452
  className: "neeto-molecules-menu-list__item-btn-count",
483
453
  "data-testid": "help-section-menu-changes-count",
@@ -650,7 +620,7 @@ var ProfileHeader = function ProfileHeader(_ref) {
650
620
  var name = profileInfo.name,
651
621
  email = profileInfo.email;
652
622
  return /*#__PURE__*/jsxs("span", {
653
- className: "flex w-full items-center gap-2 text-start",
623
+ className: "flex w-full min-w-0 items-center gap-2 text-start",
654
624
  "data-testid": "floating-action-menu-profile-header",
655
625
  children: [/*#__PURE__*/jsx(Avatar, {
656
626
  "data-testid": "floating-action-menu-header-profile-icon",
@@ -700,6 +670,29 @@ var MenuButton$1 = function MenuButton(_ref) {
700
670
  }));
701
671
  };
702
672
 
673
+ var MY_ORGANIZATION_URL = "/auth/organization/edit";
674
+ var DELETE_WORKSPACE_URL = "/auth/organization/delete";
675
+ var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
676
+ var DEFAULT_MENU_LINK_PROPS = {
677
+ engageProps: {
678
+ id: ENGAGE_WIDGET_TRIGGER_ID,
679
+ label: t("neetoMolecules.sidebar.helpLinks.whatsNew"),
680
+ "data-testid": "help-link-engage-button"
681
+ },
682
+ keyboardShortcutProps: {
683
+ label: t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
684
+ "data-testid": "help-link-keyboard-shortcut-button"
685
+ }
686
+ };
687
+
688
+ // Theme switcher
689
+ var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
690
+ var THEMES = {
691
+ LIGHT: "neeto-ui-theme--light",
692
+ DARK: "neeto-ui-theme--dark"
693
+ };
694
+ var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
695
+
703
696
  var Menu$1 = Dropdown$1.Menu,
704
697
  MenuItem$3 = Dropdown$1.MenuItem;
705
698
  var ProfileExpandMenu = function ProfileExpandMenu(_ref) {
@@ -1056,10 +1049,7 @@ var ProfileButton = function ProfileButton(_ref) {
1056
1049
  window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
1057
1050
  }, []);
1058
1051
  var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
1059
- var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).filter(function (key) {
1060
- var _DEFAULT_MENU_LINK_PR, _DEFAULT_MENU_LINK_PR2, _DEFAULT_MENU_LINK_PR3;
1061
- return (_DEFAULT_MENU_LINK_PR = (_DEFAULT_MENU_LINK_PR2 = (_DEFAULT_MENU_LINK_PR3 = DEFAULT_MENU_LINK_PROPS[key]).isVisible) === null || _DEFAULT_MENU_LINK_PR2 === void 0 ? void 0 : _DEFAULT_MENU_LINK_PR2.call(_DEFAULT_MENU_LINK_PR3)) !== null && _DEFAULT_MENU_LINK_PR !== void 0 ? _DEFAULT_MENU_LINK_PR : true;
1062
- }).map(function (key) {
1052
+ var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).map(function (key) {
1063
1053
  return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_MENU_LINK_PROPS[key]), key === "keyboardShortcutProps" && {
1064
1054
  onClick: function onClick() {
1065
1055
  return setIsOpen(function (prev) {