@bigbinary/neeto-molecules 3.16.63 → 3.16.65

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.
@@ -99,6 +99,7 @@ var disableDraggingStyles = function disableDraggingStyles() {
99
99
  var SubLink = function SubLink(_ref) {
100
100
  var to = _ref.to,
101
101
  href = _ref.href,
102
+ onClick = _ref.onClick,
102
103
  label = _ref.label,
103
104
  _ref$type = _ref.type,
104
105
  type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
@@ -129,6 +130,7 @@ var SubLink = function SubLink(_ref) {
129
130
  };
130
131
  return /*#__PURE__*/jsxRuntime.jsxs(CheckPointNavLinks, {
131
132
  href: href,
133
+ onClick: onClick,
132
134
  to: to,
133
135
  activeClassName: "active",
134
136
  className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
@@ -171,7 +173,8 @@ var _Items = function Items(_ref) {
171
173
  href: subItem.href,
172
174
  isActive: subItem.isActive,
173
175
  isSectionHeader: neetoCist.isPresent(subItem.item),
174
- to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path
176
+ to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path,
177
+ onClick: subItem.onClick
175
178
  })), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
176
179
  children: [/*#__PURE__*/jsxRuntime.jsx(_Items, {
177
180
  isSettingsItems: isSettingsItems,
@@ -273,4 +276,4 @@ exports.enableDraggingStyles = enableDraggingStyles;
273
276
  exports.filterByPermissions = filterByPermissions;
274
277
  exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
275
278
  exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
276
- //# sourceMappingURL=Chevron-BKclhyNs.js.map
279
+ //# sourceMappingURL=Chevron-BKL6X7TW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chevron-BKL6X7TW.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n\nexport const DEFAULT_HOME_PATH = \"/admin\";\n\nexport const SIDEBAR_WIDTH_KEY = \"neeto-molecules-sidebar-width\";\nexport const MIN_SIDEBAR_WIDTH = 12.5 * 16;\nexport const MAX_SIDEBAR_WIDTH = 20 * 16;\nexport const DEFAULT_SIDEBAR_WIDTH = 15 * 16;\n","import { isPresent, isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n\nexport const enableDraggingStyles = () => {\n document.body.classList.add(\"dragging-sidebar\");\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n};\n\nexport const disableDraggingStyles = () => {\n document.body.classList.remove(\"dragging-sidebar\");\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n};\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n onClick,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, onClick, to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={isSubLinkActive}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import { Fragment } from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n onClick={subItem.onClick}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n homePath,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, homePath, e);\n };\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-home-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","SIDEBAR_WIDTH_KEY","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","DEFAULT_SIDEBAR_WIDTH","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","enableDraggingStyles","document","body","classList","add","style","cursor","userSelect","disableDraggingStyles","remove","SubLink","onClick","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","homePath","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA,CAAA;AAET,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA,CAAA;AAGtB,EAAA,IAAMU,WAAW,GAAGR,IAAI,GAAG,GAAG,GAAGS,sBAAO,CAAA;AACxC,EAAA,IAAMC,SAAS,GAAGV,IAAI,GAAAW,eAAA,CAAA;AAChBX,IAAAA,IAAI,EAAJA,IAAI;AAAEY,IAAAA,GAAG,EAAEZ,IAAAA;GAASE,EAAAA,MAAM,IAAAS,eAAA,CAAA;IAC1BZ,EAAE,EAAEQ,UAAU,IAAIR,EAAE;AAAEa,IAAAA,GAAG,EAAEb,EAAAA;AAAE,GAAA,EAAKG,MAAM,CAAE,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AA,CAAC+F,UAAU,EAAA;AACTC,QAAAA,SAAS,EAAC,MAAM;AAChB/B,QAAAA,KAAK,EAAC,OAAO;AACb6B,QAAAA,SAAS,EAAEoC,UAAU,CAAC,qCAAqC,EAAAC,eAAA,CAAA;AACzD,UAAA,gDAAgD,EAC9CzE,kBAAAA;AAAkB,SAAA,EACnB,MAAM,EAAG0D,kBAAkB,CAC7B,CAAE;AAAAhI,QAAAA,QAAA,EAEFoF,KAAAA;AAAK,OACI,CAAC,CAAA;AAAA,KAAA,CACV,CAAC,EACL0B,KAAK,iBAAIlG,cAAA,CAACiG,MAAK,EAAA;AAAOC,MAAAA,KAAK,EAALA,KAAK;MAAIE,eAAe,EAAA,IAAA;AAAA,KAAE,CAAC,CAAA;AAAA,GAC/C,CAAC,CAAA;AAEV;;;;;AC7DA,IAAMgC,OAAO,GAAG,SAAVA,OAAOA,CAAApJ,IAAA,EAAA;AAAA,EAAA,IAAMiF,KAAK,GAAAjF,IAAA,CAALiF,KAAK,CAAA;AAAA,EAAA,oBACtBjE,cAAA,CAAA,KAAA,EAAA;AAAWiE,IAAAA,KAAK,EAALA,KAAK;AAAIoE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAnJ,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACEwI,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;AAAA;;;;;;;;;;;;;;;;;;"}
@@ -7,7 +7,7 @@ var Button = require('@bigbinary/neetoui/Button');
7
7
  var ramda = require('ramda');
8
8
  var reactI18next = require('react-i18next');
9
9
  var reactRouterDom = require('react-router-dom');
10
- var Chevron = require('./Chevron-BKclhyNs.js');
10
+ var Chevron = require('./Chevron-BKL6X7TW.js');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  require('@babel/runtime/helpers/defineProperty');
13
13
  require('@babel/runtime/helpers/objectWithoutProperties');
@@ -515,6 +515,24 @@ var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
515
515
  var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
516
516
  return "sidebarState-".concat(user);
517
517
  };
518
+ var getUserProfileInfo = function getUserProfileInfo() {
519
+ var _globalProps$user$fir, _globalProps$user3, _globalProps$user$las, _globalProps$user4, _globalProps$user5, _globalProps$user6, _globalProps$user7;
520
+ return {
521
+ name: "".concat((_globalProps$user$fir = (_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.firstName) !== null && _globalProps$user$fir !== void 0 ? _globalProps$user$fir : "", " ").concat((_globalProps$user$las = (_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.lastName) !== null && _globalProps$user$las !== void 0 ? _globalProps$user$las : ""),
522
+ imageUrl: globalProps.authenticated ? (_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.profileImageUrl : "https://d2v7kzglnr2dnh.cloudfront.net/others/profile-pic.jpg",
523
+ email: ((_globalProps$user6 = globalProps.user) === null || _globalProps$user6 === void 0 ? void 0 : _globalProps$user6.email) || ((_globalProps$user7 = globalProps.user) === null || _globalProps$user7 === void 0 ? void 0 : _globalProps$user7.phoneNumber),
524
+ isAuthenticated: globalProps.authenticated
525
+ };
526
+ };
527
+ var getConsumerProfileInfo = function getConsumerProfileInfo() {
528
+ var _globalProps$consumer, _globalProps$consumer2, _globalProps$consumer3, _globalProps$consumer4, _globalProps$consumer5, _globalProps$consumer6, _globalProps$consumer7;
529
+ return {
530
+ name: "".concat((_globalProps$consumer = (_globalProps$consumer2 = globalProps.consumer) === null || _globalProps$consumer2 === void 0 ? void 0 : _globalProps$consumer2.firstName) !== null && _globalProps$consumer !== void 0 ? _globalProps$consumer : "", " ").concat((_globalProps$consumer3 = (_globalProps$consumer4 = globalProps.consumer) === null || _globalProps$consumer4 === void 0 ? void 0 : _globalProps$consumer4.lastName) !== null && _globalProps$consumer3 !== void 0 ? _globalProps$consumer3 : ""),
531
+ imageUrl: ((_globalProps$consumer5 = globalProps.consumer) === null || _globalProps$consumer5 === void 0 ? void 0 : _globalProps$consumer5.profileImageUrl) || "https://d2v7kzglnr2dnh.cloudfront.net/others/profile-pic.jpg",
532
+ email: ((_globalProps$consumer6 = globalProps.consumer) === null || _globalProps$consumer6 === void 0 ? void 0 : _globalProps$consumer6.email) || ((_globalProps$consumer7 = globalProps.consumer) === null || _globalProps$consumer7 === void 0 ? void 0 : _globalProps$consumer7.phoneNumber),
533
+ isAuthenticated: globalProps.isConsumer
534
+ };
535
+ };
518
536
  var getDefaultTopLinks = function getDefaultTopLinks(isOwner, setIsProfilePaneOpen, isAuthenticated) {
519
537
  if (!isAuthenticated) return [];
520
538
  var topLinks = [{
@@ -536,12 +554,15 @@ var getDefaultTopLinks = function getDefaultTopLinks(isOwner, setIsProfilePaneOp
536
554
  }
537
555
  return topLinks;
538
556
  };
539
- var getDefaultBottomLinks = function getDefaultBottomLinks(isAuthenticated) {
557
+ var getDefaultBottomLinks = function getDefaultBottomLinks(isAuthenticated, isConsumer) {
540
558
  return [isAuthenticated ? {
541
559
  label: i18next.t("neetoMolecules.sidebar.logout"),
542
560
  onClick: function onClick() {
543
561
  axios$1.resetAuthTokens();
544
562
  general.removeFromLocalStorage(getSidebarStateLocalStorageKey());
563
+ isConsumer ?
564
+ // eslint-disable-next-line xss/no-location-href-assign
565
+ window.location.href = "/consumers/logout?redirect_uri=".concat(window.location.origin) :
545
566
  // eslint-disable-next-line xss/no-location-href-assign
546
567
  window.location.href = "/logout";
547
568
  },
@@ -555,14 +576,8 @@ var getDefaultBottomLinks = function getDefaultBottomLinks(isAuthenticated) {
555
576
  "data-cy": "profile-login-button"
556
577
  }];
557
578
  };
558
- var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
559
- var _globalProps$user$fir, _globalProps$user3, _globalProps$user$las, _globalProps$user4, _globalProps$user5, _globalProps$user6, _globalProps$user7;
560
- return ramda.mergeDeepLeft(profileInfoOverrides, {
561
- name: "".concat((_globalProps$user$fir = (_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.firstName) !== null && _globalProps$user$fir !== void 0 ? _globalProps$user$fir : "", " ").concat((_globalProps$user$las = (_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.lastName) !== null && _globalProps$user$las !== void 0 ? _globalProps$user$las : ""),
562
- imageUrl: globalProps.authenticated ? (_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.profileImageUrl : "https://d2v7kzglnr2dnh.cloudfront.net/others/profile-pic.jpg",
563
- email: ((_globalProps$user6 = globalProps.user) === null || _globalProps$user6 === void 0 ? void 0 : _globalProps$user6.email) || ((_globalProps$user7 = globalProps.user) === null || _globalProps$user7 === void 0 ? void 0 : _globalProps$user7.phoneNumber),
564
- isAuthenticated: globalProps.authenticated
565
- });
579
+ var getProfileInfo = function getProfileInfo(profileInfoOverrides, isConsumer) {
580
+ return ramda.mergeDeepLeft(profileInfoOverrides, isConsumer ? getConsumerProfileInfo() : getUserProfileInfo());
566
581
  };
567
582
 
568
583
  // Theme switcher utils.
@@ -668,7 +683,8 @@ var ProfileMenu = function ProfileMenu(_ref) {
668
683
  customContent = _ref.customContent,
669
684
  toggleModal = _ref.toggleModal,
670
685
  isThemeSwitcherEnabled = _ref.isThemeSwitcherEnabled,
671
- isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled;
686
+ isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
687
+ isConsumer = _ref.isConsumer;
672
688
  var Menu = Dropdown$1.Menu,
673
689
  MenuItem = Dropdown$1.MenuItem,
674
690
  Divider = Dropdown$1.Divider;
@@ -682,33 +698,35 @@ var ProfileMenu = function ProfileMenu(_ref) {
682
698
  children: isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
683
699
  profileInfo: profileInfo
684
700
  })
685
- }), neetoCist.isPresent((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
686
- links: [{
687
- label: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
688
- i18nKey: "neetoMolecules.sidebar.currentPlan",
689
- values: {
690
- subscriptionPlan: neetoCist.humanize((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.subscriptionPlan)
691
- }
692
- }),
693
- href: NEETO_AUTH_BILLING_INFO_URL,
694
- "data-testid": "subscription-plan"
695
- }]
696
- }), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
697
- toggleModal: toggleModal
698
- }), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), isThemeSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(ThemeSwitcher, {}), neetoCist.isNotEmpty(topLinks) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
699
- children: [/*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
700
- links: topLinks
701
- })]
702
- }), neetoCist.isPresent(customContent) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
703
- children: [/*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
704
- className: "neeto-molecules-floating-action-button__profile-wrapper-custom-content",
705
- children: customContent
706
- })]
707
- }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
708
- links: defaultLinks
709
- }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
710
- links: helpLinks
711
- }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
701
+ }), !isConsumer && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
702
+ children: [neetoCist.isPresent((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
703
+ links: [{
704
+ label: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
705
+ i18nKey: "neetoMolecules.sidebar.currentPlan",
706
+ values: {
707
+ subscriptionPlan: neetoCist.humanize((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.subscriptionPlan)
708
+ }
709
+ }),
710
+ href: NEETO_AUTH_BILLING_INFO_URL,
711
+ "data-testid": "subscription-plan"
712
+ }]
713
+ }), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
714
+ toggleModal: toggleModal
715
+ }), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), isThemeSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(ThemeSwitcher, {}), neetoCist.isNotEmpty(topLinks) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
716
+ children: [/*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
717
+ links: topLinks
718
+ })]
719
+ }), neetoCist.isPresent(customContent) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
720
+ children: [/*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
721
+ className: "neeto-molecules-floating-action-button__profile-wrapper-custom-content",
722
+ children: customContent
723
+ })]
724
+ }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
725
+ links: defaultLinks
726
+ }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
727
+ links: helpLinks
728
+ }), /*#__PURE__*/jsxRuntime.jsx(Divider, {})]
729
+ }), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
712
730
  links: bottomLinks
713
731
  })]
714
732
  });
@@ -724,7 +742,8 @@ var ProfileButton = function ProfileButton(_ref) {
724
742
  customContent = _ref.customContent,
725
743
  isThemeSwitcherEnabled = _ref.isThemeSwitcherEnabled,
726
744
  isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
727
- profilePopoverProps = _ref.profilePopoverProps;
745
+ profilePopoverProps = _ref.profilePopoverProps,
746
+ isConsumer = _ref.isConsumer;
728
747
  var _useState = React.useState(false),
729
748
  _useState2 = _slicedToArray(_useState, 2),
730
749
  isModalOpen = _useState2[0],
@@ -743,7 +762,7 @@ var ProfileButton = function ProfileButton(_ref) {
743
762
  data = _useFetchNeetoApps.data,
744
763
  refetch = _useFetchNeetoApps.refetch,
745
764
  isStale = _useFetchNeetoApps.isStale;
746
- var profileInfo = getProfileInfo(profileInfoOverrides);
765
+ var profileInfo = getProfileInfo(profileInfoOverrides, isConsumer);
747
766
  React.useEffect(function () {
748
767
  var Nv = {
749
768
  onReceiveData: function onReceiveData(data) {
@@ -761,7 +780,7 @@ var ProfileButton = function ProfileButton(_ref) {
761
780
  refetch();
762
781
  }, [isStale]);
763
782
  var newTopLinks = globalProps.appName.toLowerCase() !== "neetoauth" ? [].concat(_toConsumableArray(getDefaultTopLinks(data === null || data === void 0 ? void 0 : data.isOwner, setIsProfilePaneOpen, profileInfo.isAuthenticated)), _toConsumableArray(topLinks)) : topLinks;
764
- var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated)), _toConsumableArray(bottomLinks));
783
+ var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
765
784
  var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
766
785
  return _objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]);
767
786
  }).filter(function (_ref2) {
@@ -825,6 +844,7 @@ var ProfileButton = function ProfileButton(_ref) {
825
844
  customContent: customContent,
826
845
  defaultLinks: defaultLinks,
827
846
  helpLinks: helpLinks,
847
+ isConsumer: isConsumer,
828
848
  isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
829
849
  isThemeSwitcherEnabled: isThemeSwitcherEnabled,
830
850
  profileInfo: profileInfo,
@@ -850,7 +870,7 @@ var ProfileButton = function ProfileButton(_ref) {
850
870
  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-bottom-right-radius:1.0625rem;border-left:none;border-top-right-radius:1.0625rem;bottom:16px;left: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-bottom-right-radius:1rem;border-color:rgb(var(--neeto-ui-primary-500));border-top-right-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;min-width:.9375rem;pointer-events:none;position:absolute;right:0;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-left:.25rem;padding-right:.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-top-left-radius:var(--neeto-ui-rounded);border-top-right-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}";
851
871
  injectCss.n(css,{});
852
872
 
853
- var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent", "profilePopoverProps"];
873
+ var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent", "profilePopoverProps", "isConsumer"];
854
874
  function ownKeys(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; }
855
875
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
856
876
  var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -870,11 +890,13 @@ var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
870
890
  customContent = _ref.customContent,
871
891
  _ref$profilePopoverPr = _ref.profilePopoverProps,
872
892
  profilePopoverProps = _ref$profilePopoverPr === void 0 ? {} : _ref$profilePopoverPr,
893
+ _ref$isConsumer = _ref.isConsumer,
894
+ isConsumer = _ref$isConsumer === void 0 ? false : _ref$isConsumer,
873
895
  otherProps = _objectWithoutProperties(_ref, _excluded);
874
896
  React.useEffect(function () {
875
897
  isThemeSwitcherEnabled && setAppTheme();
876
898
  }, []);
877
- var isBigBinaryEmail = initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$user = initializers.globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email.endsWith("@bigbinary.com");
899
+ 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");
878
900
  return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
879
901
  ref: ref,
880
902
  className: "neeto-molecules-floating-action-menu__container",
@@ -884,6 +906,7 @@ var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
884
906
  children: /*#__PURE__*/jsxRuntime.jsx(ProfileButton, _defineProperty({
885
907
  bottomLinks: bottomLinks,
886
908
  customContent: customContent,
909
+ isConsumer: isConsumer,
887
910
  isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
888
911
  isThemeSwitcherEnabled: isThemeSwitcherEnabled,
889
912
  profileInfoOverrides: profileInfoOverrides,