@bigbinary/neeto-molecules 4.0.44 → 4.0.45
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.
- package/dist/{Chevron-BFX_mIg6.js → Chevron-DbcAxB4V.js} +16 -17
- package/dist/Chevron-DbcAxB4V.js.map +1 -0
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/FloatingActionMenu.js +68 -60
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Sidebar.js +4 -18
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/{Chevron-ClvaNo3d.js → Chevron-D0wHw6Zg.js} +15 -16
- package/dist/cjs/Chevron-D0wHw6Zg.js.map +1 -0
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/FloatingActionMenu.js +68 -60
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Sidebar.js +3 -17
- package/dist/cjs/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/dist/Chevron-BFX_mIg6.js.map +0 -1
- package/dist/cjs/Chevron-ClvaNo3d.js.map +0 -1
|
@@ -16,6 +16,18 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
16
16
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
17
17
|
import { n } from './inject-css-C2dztUxs.js';
|
|
18
18
|
|
|
19
|
+
var SUB_LINK_TYPES = {
|
|
20
|
+
SYSTEM_VIEW: "system_view",
|
|
21
|
+
SEGMENTS: "segments"
|
|
22
|
+
};
|
|
23
|
+
var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
|
|
24
|
+
var DEFAULT_HOME_PATH = "/admin";
|
|
25
|
+
var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
|
|
26
|
+
var MIN_SIDEBAR_WIDTH = 12.5 * 16;
|
|
27
|
+
var MAX_SIDEBAR_WIDTH = 20 * 16;
|
|
28
|
+
var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
|
|
29
|
+
var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
|
|
30
|
+
|
|
19
31
|
var _excluded$1 = ["checkpointKey", "to", "href", "children"];
|
|
20
32
|
function ownKeys$2(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; }
|
|
21
33
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -40,18 +52,6 @@ var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
|
40
52
|
}));
|
|
41
53
|
};
|
|
42
54
|
|
|
43
|
-
var SUB_LINK_TYPES = {
|
|
44
|
-
SYSTEM_VIEW: "system_view",
|
|
45
|
-
SEGMENTS: "segments"
|
|
46
|
-
};
|
|
47
|
-
var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
|
|
48
|
-
var DEFAULT_HOME_PATH = "/admin";
|
|
49
|
-
var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
|
|
50
|
-
var MIN_SIDEBAR_WIDTH = 12.5 * 16;
|
|
51
|
-
var MAX_SIDEBAR_WIDTH = 20 * 16;
|
|
52
|
-
var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
|
|
53
|
-
var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
|
|
54
|
-
|
|
55
55
|
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
56
56
|
var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
|
|
57
57
|
var targetUrl = new URL(subRoute, window.location.origin);
|
|
@@ -198,8 +198,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
198
198
|
isConfigureNavLink: false
|
|
199
199
|
} : _ref$navLink,
|
|
200
200
|
handleGoBack = _ref.handleGoBack,
|
|
201
|
-
isConfigureSidebar = _ref.isConfigureSidebar
|
|
202
|
-
homePath = _ref.homePath;
|
|
201
|
+
isConfigureSidebar = _ref.isConfigureSidebar;
|
|
203
202
|
var history = useHistory();
|
|
204
203
|
var label = navLink.label,
|
|
205
204
|
items = navLink.items,
|
|
@@ -207,7 +206,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
207
206
|
otherProps = _objectWithoutProperties(navLink, _excluded);
|
|
208
207
|
var handleHomeButtonClick = function handleHomeButtonClick(e) {
|
|
209
208
|
e.stopPropagation();
|
|
210
|
-
handleMetaClick(history,
|
|
209
|
+
handleMetaClick(history, DEFAULT_HOME_PATH, e);
|
|
211
210
|
};
|
|
212
211
|
return /*#__PURE__*/jsxs("div", {
|
|
213
212
|
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
@@ -260,5 +259,5 @@ var Chevron = function Chevron(_ref) {
|
|
|
260
259
|
});
|
|
261
260
|
};
|
|
262
261
|
|
|
263
|
-
export { Chevron as C,
|
|
264
|
-
//# sourceMappingURL=Chevron-
|
|
262
|
+
export { Chevron as C, DEFAULT_HOME_PATH as D, MIN_SIDEBAR_WIDTH as M, PINNED_MORE_NAV_LINKS_KEY as P, SelectedLink as S, _Items as _, CheckPointNavLinks as a, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as b, SIDEBAR_WIDTH_KEY as c, DEFAULT_SIDEBAR_WIDTH as d, enableDraggingStyles as e, filterByPermissions as f, getSidebarStateLocalStorageKey as g, disableDraggingStyles as h, getActiveConfigurePageLink as i, MAX_SIDEBAR_WIDTH as j };
|
|
263
|
+
//# sourceMappingURL=Chevron-DbcAxB4V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-DbcAxB4V.js","sources":["../src/components/Sidebar/constants.js","../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../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":["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\nexport const PINNED_MORE_NAV_LINKS_KEY = \"pinnedMoreNavLinks\";\n","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","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 { DEFAULT_HOME_PATH } from \"components/Sidebar/constants\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, 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":["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","PINNED_MORE_NAV_LINKS_KEY","CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","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","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE;AACZ,CAAC;AAEM,IAAMC,mCAAmC,GAAG;AAE5C,IAAMC,iBAAiB,GAAG;AAE1B,IAAMC,iBAAiB,GAAG;AAC1B,IAAMC,iBAAiB,GAAG,IAAI,GAAG;AACjC,IAAMC,iBAAiB,GAAG,EAAE,GAAG;AAC/B,IAAMC,qBAAqB,GAAG,EAAE,GAAG;AAEnC,IAAMC,yBAAyB,GAAG;;;;;ACXzC,IAAMC,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,QAA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IE,eAAe,EAAA;AAAA,KAAE,CAAC;AAAA,GAC/C,CAAC;AAEV;;;;;AC9DA,IAAM+B,OAAO,GAAG,SAAVA,OAAOA,CAAA1I,IAAA,EAAA;AAAA,EAAA,IAAMwE,KAAK,GAAAxE,IAAA,CAALwE,KAAK;AAAA,EAAA,oBACtBxD,GAAA,CAAA,KAAA,EAAA;AAAWwD,IAAAA,KAAK,EAALA,KAAK;AAAImE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAzI,IAAAA,QAAA,eAC5DY,GAAA,CAAA,MAAA,EAAA;AACE8H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC;KACN;AAAC,GACC,CAAC;AAAA;;;;"}
|
|
@@ -5,7 +5,7 @@ import Button from '@bigbinary/neetoui/Button';
|
|
|
5
5
|
import { not } from 'ramda';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useHistory } from 'react-router-dom';
|
|
8
|
-
import { S as SelectedLink, C as Chevron } from './Chevron-
|
|
8
|
+
import { S as SelectedLink, C as Chevron } from './Chevron-DbcAxB4V.js';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
import '@babel/runtime/helpers/defineProperty';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -5,7 +5,6 @@ import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/
|
|
|
5
5
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
6
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import { isNotPresent, isPresent, truncate, isNotEmpty, humanize, noop } from '@bigbinary/neeto-cist';
|
|
8
|
-
import useFetchNeetoApps from '@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps';
|
|
9
8
|
import useHotkeys from '@bigbinary/neeto-hotkeys';
|
|
10
9
|
import Help from '@bigbinary/neeto-icons/Help';
|
|
11
10
|
import Profile from '@bigbinary/neeto-team-members-frontend/Profile';
|
|
@@ -20,20 +19,21 @@ import Search from '@bigbinary/neeto-icons/Search';
|
|
|
20
19
|
import Input from '@bigbinary/neetoui/Input';
|
|
21
20
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
22
21
|
import { useTranslation, Trans } from 'react-i18next';
|
|
23
|
-
import
|
|
22
|
+
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
23
|
+
import { useQuery } from '@tanstack/react-query';
|
|
24
|
+
import axios from 'axios';
|
|
24
25
|
import Neeto from '@bigbinary/neeto-icons/typeface-logos/Neeto';
|
|
25
26
|
import * as AppIcons from '@bigbinary/neeto-icons/typeface-logos';
|
|
27
|
+
import { n } from './inject-css-C2dztUxs.js';
|
|
26
28
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
27
29
|
import { t } from 'i18next';
|
|
28
30
|
import Book from '@bigbinary/neeto-icons/Book';
|
|
29
31
|
import Community from '@bigbinary/neeto-icons/Community';
|
|
30
32
|
import useBreakpoints from '@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints';
|
|
31
33
|
import ExternalLink from '@bigbinary/neeto-icons/ExternalLink';
|
|
32
|
-
import { useQuery } from '@tanstack/react-query';
|
|
33
|
-
import axios from 'axios';
|
|
34
34
|
import Right from '@bigbinary/neeto-icons/Right';
|
|
35
|
+
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
35
36
|
import ProductSwitcher$1 from '@bigbinary/neeto-icons/ProductSwitcher';
|
|
36
|
-
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
37
37
|
import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage';
|
|
38
38
|
import Check from '@bigbinary/neeto-icons/Check';
|
|
39
39
|
import { getFromLocalStorage } from '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -50,6 +50,26 @@ import '@bigbinary/neetoui/Kbd';
|
|
|
50
50
|
import './platform-F44zJ4Xh.js';
|
|
51
51
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
52
52
|
|
|
53
|
+
var fetch$1 = function fetch() {
|
|
54
|
+
return axios.get("/api/v1/neeto_apps");
|
|
55
|
+
};
|
|
56
|
+
var neetoAppsApi = {
|
|
57
|
+
fetch: fetch$1
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var QUERY_KEYS$1 = {
|
|
61
|
+
NEETO_APPS_LIST: "neeto-apps-list"
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
function ownKeys$5(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; }
|
|
65
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
66
|
+
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
67
|
+
return useQuery(_objectSpread$5({
|
|
68
|
+
queryKey: [QUERY_KEYS$1.NEETO_APPS_LIST],
|
|
69
|
+
queryFn: neetoAppsApi.fetch
|
|
70
|
+
}, options));
|
|
71
|
+
};
|
|
72
|
+
|
|
53
73
|
var css$1 = ".neeto-molecules-product-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:24px;position:relative;transition:all .3s;width:100%}@media screen and (max-width:768px){.neeto-molecules-product-switcher__wrapper{padding:16px}}.neeto-molecules-product-switcher__grid{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-product-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}@media only screen and (max-width:640px){.neeto-molecules-product-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(100%,1fr))}}.neeto-molecules-product-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-product-switcher__header{align-items:flex-start;flex-direction:column;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-product-switcher__header h1{font-size:24px}}@media only screen and (max-width:768px){.neeto-molecules-product-switcher_modal-container .neeto-molecules-product-switcher__header-mobile{align-items:flex-start;margin-bottom:24px}}.neeto-molecules-product-switcher_modal-container .neeto-molecules-product-switcher__wrapper{padding:0}.neeto-molecules-product-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-product-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-product-switcher__search-wrapper{flex-grow:0;width:296px}}.neeto-molecules-product-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-product-switcher-link{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-200));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:1px;cursor:pointer;display:flex;flex-direction:column;gap:16px;max-width:100%;padding:10px 8px;text-decoration:none;transition:all .3s ease-in-out;width:100%}.neeto-molecules-product-switcher-link:focus,.neeto-molecules-product-switcher-link:focus-visible{outline:none}.neeto-molecules-product-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-product-switcher-link:not(.neeto-molecules-product-switcher-link--active):hover{border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-product-switcher-link--active{background-color:rgb(var(--neeto-ui-primary-50));border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-product-switcher-link__icon-holder{flex-grow:1;flex-shrink:0}.neeto-molecules-product-switcher-link__icon-holder svg{height:36px;width:auto}.neeto-molecules-product-switcher-link__icon-holder .neeto-molecules-product-switcher-link__icon-default{height:24px}.neeto-molecules-product-switcher-link__content{flex-shrink:0}.neeto-molecules-product-switcher-link__content span{display:block}.neeto-molecules-product-switcher_modal{z-index:100000}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen{display:flex;flex-direction:column;height:100dvh!important;width:100vw!important}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__header{flex-shrink:0}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__body{--neeto-ui-modal-body-padding-top:24px;flex-grow:1;min-height:0;overflow-y:auto}.neeto-ui-theme--dark .neeto-molecules-product-switcher__wrapper [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-molecules-product-switcher__header{padding-right:56px}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__close{z-index:2}";
|
|
54
74
|
n(css$1,{});
|
|
55
75
|
|
|
@@ -89,6 +109,37 @@ var ProductLink$1 = /*#__PURE__*/memo(ProductLink);
|
|
|
89
109
|
|
|
90
110
|
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; }
|
|
91
111
|
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; }
|
|
112
|
+
var Content = function Content(_ref) {
|
|
113
|
+
var searchTerm = _ref.searchTerm;
|
|
114
|
+
var _useTranslation = useTranslation(),
|
|
115
|
+
t = _useTranslation.t;
|
|
116
|
+
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
117
|
+
data = _useFetchNeetoApps.data,
|
|
118
|
+
isLoading = _useFetchNeetoApps.isLoading;
|
|
119
|
+
var substring = searchTerm.replace(/ /g, "").toLowerCase();
|
|
120
|
+
var filteredApps = data === null || data === void 0 ? void 0 : data.neetoApps.filter(function (_ref2) {
|
|
121
|
+
var name = _ref2.name;
|
|
122
|
+
return name.toLowerCase().includes(substring);
|
|
123
|
+
});
|
|
124
|
+
if (isLoading) {
|
|
125
|
+
return /*#__PURE__*/jsx("div", {
|
|
126
|
+
className: "flex items-center justify-center py-8",
|
|
127
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/jsx("div", {
|
|
131
|
+
className: "neeto-molecules-product-switcher__grid",
|
|
132
|
+
children: filteredApps.map(function (app) {
|
|
133
|
+
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$4({}, app), app.name);
|
|
134
|
+
})
|
|
135
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
136
|
+
className: "neeto-ui-text-center",
|
|
137
|
+
"data-cy": "no-apps-found-title",
|
|
138
|
+
style: "body1",
|
|
139
|
+
children: t("neetoMolecules.productSwitcher.noApps")
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
|
|
92
143
|
var Menu$3 = function Menu(_ref) {
|
|
93
144
|
var _ref$isMobile = _ref.isMobile,
|
|
94
145
|
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
@@ -98,18 +149,6 @@ var Menu$3 = function Menu(_ref) {
|
|
|
98
149
|
_useState2 = _slicedToArray(_useState, 2),
|
|
99
150
|
searchTerm = _useState2[0],
|
|
100
151
|
setSearchTerm = _useState2[1];
|
|
101
|
-
var _useFetchNeetoApps = useFetchNeetoApps({
|
|
102
|
-
enabled: false
|
|
103
|
-
}),
|
|
104
|
-
data = _useFetchNeetoApps.data;
|
|
105
|
-
var substring = searchTerm.replace(/ /g, "").toLowerCase();
|
|
106
|
-
var filteredApps = data === null || data === void 0 ? void 0 : data.neetoApps.filter(function (_ref2) {
|
|
107
|
-
var name = _ref2.name;
|
|
108
|
-
return name.toLowerCase().includes(substring);
|
|
109
|
-
});
|
|
110
|
-
var handleSearch = function handleSearch(e) {
|
|
111
|
-
return setSearchTerm(e.target.value);
|
|
112
|
-
};
|
|
113
152
|
return /*#__PURE__*/jsxs("div", {
|
|
114
153
|
className: "neeto-molecules-product-switcher__wrapper",
|
|
115
154
|
"data-cy": "switcher-wrapper",
|
|
@@ -131,21 +170,15 @@ var Menu$3 = function Menu(_ref) {
|
|
|
131
170
|
prefix: /*#__PURE__*/jsx(Search, {}),
|
|
132
171
|
type: "search",
|
|
133
172
|
value: searchTerm,
|
|
134
|
-
onChange:
|
|
173
|
+
onChange: function onChange(e) {
|
|
174
|
+
return setSearchTerm(e.target.value);
|
|
175
|
+
}
|
|
135
176
|
})
|
|
136
177
|
})]
|
|
137
178
|
}), /*#__PURE__*/jsx("div", {
|
|
138
179
|
className: classnames("neeto-molecules-product-switcher__body", _defineProperty({}, "neeto-molecules-product-switcher__body-mobile", isMobile)),
|
|
139
|
-
children:
|
|
140
|
-
|
|
141
|
-
children: filteredApps.map(function (app) {
|
|
142
|
-
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$4({}, app), app.name);
|
|
143
|
-
})
|
|
144
|
-
}) : /*#__PURE__*/jsx(Typography, {
|
|
145
|
-
className: "neeto-ui-text-center",
|
|
146
|
-
"data-cy": "no-apps-found-title",
|
|
147
|
-
style: "body1",
|
|
148
|
-
children: t("neetoMolecules.productSwitcher.noApps")
|
|
180
|
+
children: /*#__PURE__*/jsx(Content, {
|
|
181
|
+
searchTerm: searchTerm
|
|
149
182
|
})
|
|
150
183
|
})]
|
|
151
184
|
}, "switcher-wrapper");
|
|
@@ -237,7 +270,7 @@ var THEMES = {
|
|
|
237
270
|
};
|
|
238
271
|
var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
239
272
|
|
|
240
|
-
var _excluded$
|
|
273
|
+
var _excluded$1 = ["label", "icon", "changesCount"];
|
|
241
274
|
function ownKeys$3(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; }
|
|
242
275
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
243
276
|
var LinkSection = function LinkSection(_ref) {
|
|
@@ -249,7 +282,7 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
249
282
|
var label = _ref2.label,
|
|
250
283
|
Icon = _ref2.icon,
|
|
251
284
|
changesCount = _ref2.changesCount,
|
|
252
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
285
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$1);
|
|
253
286
|
return /*#__PURE__*/jsxs(MenuItem.Button, _objectSpread$3(_objectSpread$3({
|
|
254
287
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
255
288
|
"data-cy": "floating-action-menu-link-section",
|
|
@@ -367,24 +400,20 @@ var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
|
367
400
|
});
|
|
368
401
|
};
|
|
369
402
|
|
|
370
|
-
var _excluded$1 = ["isLoading", "onMouseEnter"];
|
|
371
403
|
function ownKeys$2(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; }
|
|
372
404
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
373
405
|
var MenuButton$1 = function MenuButton(_ref) {
|
|
374
|
-
var
|
|
375
|
-
onMouseEnter = _ref.onMouseEnter,
|
|
376
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
406
|
+
var otherProps = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
377
407
|
var _useTranslation = useTranslation(),
|
|
378
408
|
t = _useTranslation.t;
|
|
379
409
|
var MenuItem = Dropdown$1.MenuItem;
|
|
380
410
|
return /*#__PURE__*/jsxs(MenuItem.Button, _objectSpread$2(_objectSpread$2({
|
|
381
|
-
onMouseEnter: onMouseEnter,
|
|
382
411
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
383
412
|
"data-cy": "product-switcher-button",
|
|
384
413
|
"data-testid": "product-switcher-button",
|
|
385
414
|
label: t("neetoMolecules.sidebar.productSwitcher"),
|
|
386
415
|
style: "text",
|
|
387
|
-
suffix:
|
|
416
|
+
suffix: /*#__PURE__*/jsx(Right, {
|
|
388
417
|
size: 18
|
|
389
418
|
})
|
|
390
419
|
}, otherProps), {}, {
|
|
@@ -397,26 +426,12 @@ var MenuButton$1 = function MenuButton(_ref) {
|
|
|
397
426
|
var Menu$1 = Dropdown$1.Menu,
|
|
398
427
|
MenuItem$2 = Dropdown$1.MenuItem;
|
|
399
428
|
var Dropdown = function Dropdown() {
|
|
400
|
-
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
401
|
-
data = _useFetchNeetoApps.data,
|
|
402
|
-
isLoading = _useFetchNeetoApps.isLoading,
|
|
403
|
-
isStale = _useFetchNeetoApps.isStale,
|
|
404
|
-
refetchNeetoApps = _useFetchNeetoApps.refetch;
|
|
405
|
-
var onMouseEnter = function onMouseEnter() {
|
|
406
|
-
if (!isStale) return;
|
|
407
|
-
refetchNeetoApps();
|
|
408
|
-
};
|
|
409
429
|
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
410
430
|
appendTo: "parent",
|
|
411
431
|
className: "neeto-molecules-product-switcher-menu-popup-wrapper",
|
|
412
432
|
closeOnSelect: false,
|
|
413
|
-
customTarget: /*#__PURE__*/jsx(MenuButton$1, {
|
|
414
|
-
isLoading: isLoading,
|
|
415
|
-
onMouseEnter: onMouseEnter
|
|
416
|
-
}),
|
|
417
|
-
disabled: !data || isLoading,
|
|
433
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$1, {}),
|
|
418
434
|
interactiveDebounce: 30,
|
|
419
|
-
isOpen: !data ? false : undefined,
|
|
420
435
|
offset: [0, 5],
|
|
421
436
|
position: "right",
|
|
422
437
|
trigger: "all",
|
|
@@ -706,6 +721,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
706
721
|
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; }
|
|
707
722
|
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; }
|
|
708
723
|
var ProfileButton = function ProfileButton(_ref) {
|
|
724
|
+
var _globalProps$user;
|
|
709
725
|
var profileInfoOverrides = _ref.profileInfoOverrides,
|
|
710
726
|
showProductSwitcher = _ref.showProductSwitcher,
|
|
711
727
|
bottomLinks = _ref.bottomLinks,
|
|
@@ -729,10 +745,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
729
745
|
var _Profile$usePaneState = Profile.usePaneState(),
|
|
730
746
|
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
731
747
|
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
732
|
-
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
733
|
-
data = _useFetchNeetoApps.data,
|
|
734
|
-
refetch = _useFetchNeetoApps.refetch,
|
|
735
|
-
isStale = _useFetchNeetoApps.isStale;
|
|
736
748
|
useHotkeys(["ctrl+e", "command+e"], function () {
|
|
737
749
|
return setIsModalOpen(not);
|
|
738
750
|
}, {
|
|
@@ -751,11 +763,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
751
763
|
};
|
|
752
764
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
753
765
|
}, []);
|
|
754
|
-
|
|
755
|
-
if (!isStale) return;
|
|
756
|
-
refetch();
|
|
757
|
-
}, [isStale]);
|
|
758
|
-
var newTopLinks = globalProps.appName.toLowerCase() !== "neetoauth" ? [].concat(_toConsumableArray(getDefaultTopLinks(data === null || data === void 0 ? void 0 : data.isOwner, setIsProfilePaneOpen, profileInfo.isAuthenticated)), _toConsumableArray(topLinks)) : topLinks;
|
|
766
|
+
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;
|
|
759
767
|
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
|
|
760
768
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
761
769
|
return _objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]);
|