@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.
@@ -35,12 +35,12 @@ var Community = require('@bigbinary/neeto-icons/Community');
35
35
  var Status = require('@bigbinary/neeto-icons/Status');
36
36
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
37
37
  var Right = require('@bigbinary/neeto-icons/Right');
38
- var i18next = require('i18next');
39
38
  var CheckCircle = require('@bigbinary/neeto-icons/CheckCircle');
40
39
  var Tag = require('@bigbinary/neetoui/Tag');
41
40
  var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
42
41
  var CloseCircle = require('@bigbinary/neeto-icons/CloseCircle');
43
42
  var User = require('@bigbinary/neeto-icons/User');
43
+ var i18next = require('i18next');
44
44
  var useLocalStorage = require('@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage');
45
45
  var Moon = require('@bigbinary/neeto-icons/Moon');
46
46
  var Sun = require('@bigbinary/neeto-icons/Sun');
@@ -448,36 +448,6 @@ var HelpMenu = function HelpMenu() {
448
448
  });
449
449
  };
450
450
 
451
- var shouldShowWhatsNew = function shouldShowWhatsNew() {
452
- var _window$globalProps;
453
- 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;
454
- return window.location.hostname === "localhost" || currentUserEmail === "oliver@example.com" || (currentUserEmail === null || currentUserEmail === void 0 ? void 0 : currentUserEmail.endsWith("@bigbinary.com"));
455
- };
456
- var MY_ORGANIZATION_URL = "/auth/organization/edit";
457
- var DELETE_WORKSPACE_URL = "/auth/organization/delete";
458
- var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
459
- var DEFAULT_MENU_LINK_PROPS = {
460
- engageProps: {
461
- id: ENGAGE_WIDGET_TRIGGER_ID,
462
- label: i18next.t("neetoMolecules.sidebar.helpLinks.whatsNew"),
463
- "data-testid": "help-link-engage-button",
464
- isVisible: shouldShowWhatsNew
465
- },
466
- keyboardShortcutProps: {
467
- label: i18next.t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
468
- "data-testid": "help-link-keyboard-shortcut-button"
469
- }
470
- };
471
- var NON_BUTTON_PROPS = ["isVisible"];
472
-
473
- // Theme switcher
474
- var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
475
- var THEMES = {
476
- LIGHT: "neeto-ui-theme--light",
477
- DARK: "neeto-ui-theme--dark"
478
- };
479
- var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
480
-
481
451
  var _excluded$2 = ["label", "icon", "changesCount"];
482
452
  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; }
483
453
  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; }
@@ -498,7 +468,7 @@ var LinkSection = function LinkSection(_ref) {
498
468
  size: 18
499
469
  }),
500
470
  style: "text"
501
- }, ramda.omit(NON_BUTTON_PROPS, otherProps)), {}, {
471
+ }, otherProps), {}, {
502
472
  children: [label, neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
503
473
  className: "neeto-molecules-menu-list__item-btn-count",
504
474
  "data-testid": "help-section-menu-changes-count",
@@ -671,7 +641,7 @@ var ProfileHeader = function ProfileHeader(_ref) {
671
641
  var name = profileInfo.name,
672
642
  email = profileInfo.email;
673
643
  return /*#__PURE__*/jsxRuntime.jsxs("span", {
674
- className: "flex w-full items-center gap-2 text-start",
644
+ className: "flex w-full min-w-0 items-center gap-2 text-start",
675
645
  "data-testid": "floating-action-menu-profile-header",
676
646
  children: [/*#__PURE__*/jsxRuntime.jsx(Avatar, {
677
647
  "data-testid": "floating-action-menu-header-profile-icon",
@@ -721,6 +691,29 @@ var MenuButton$1 = function MenuButton(_ref) {
721
691
  }));
722
692
  };
723
693
 
694
+ var MY_ORGANIZATION_URL = "/auth/organization/edit";
695
+ var DELETE_WORKSPACE_URL = "/auth/organization/delete";
696
+ var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
697
+ var DEFAULT_MENU_LINK_PROPS = {
698
+ engageProps: {
699
+ id: ENGAGE_WIDGET_TRIGGER_ID,
700
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.whatsNew"),
701
+ "data-testid": "help-link-engage-button"
702
+ },
703
+ keyboardShortcutProps: {
704
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
705
+ "data-testid": "help-link-keyboard-shortcut-button"
706
+ }
707
+ };
708
+
709
+ // Theme switcher
710
+ var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
711
+ var THEMES = {
712
+ LIGHT: "neeto-ui-theme--light",
713
+ DARK: "neeto-ui-theme--dark"
714
+ };
715
+ var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
716
+
724
717
  var Menu$1 = Dropdown$1.Menu,
725
718
  MenuItem$3 = Dropdown$1.MenuItem;
726
719
  var ProfileExpandMenu = function ProfileExpandMenu(_ref) {
@@ -1077,10 +1070,7 @@ var ProfileButton = function ProfileButton(_ref) {
1077
1070
  window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
1078
1071
  }, []);
1079
1072
  var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
1080
- var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).filter(function (key) {
1081
- var _DEFAULT_MENU_LINK_PR, _DEFAULT_MENU_LINK_PR2, _DEFAULT_MENU_LINK_PR3;
1082
- 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;
1083
- }).map(function (key) {
1073
+ var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).map(function (key) {
1084
1074
  return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_MENU_LINK_PROPS[key]), key === "keyboardShortcutProps" && {
1085
1075
  onClick: function onClick() {
1086
1076
  return setIsOpen(function (prev) {