@bigbinary/neeto-molecules 4.1.45 → 4.1.47

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.
@@ -0,0 +1,393 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import { useContext, createContext, forwardRef, createElement, Fragment } from 'react';
4
+ import { SidebarMenuSubItem, SidebarMenuSubButton, Badge, SidebarGroup, SidebarGroupLabel, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuSub } from '@bigbinary/neeto-atoms';
5
+ import { isNotEmpty, isPresent, hyphenate } from '@bigbinary/neeto-cist';
6
+ import { handleMetaClick } from '@bigbinary/neeto-commons-frontend/react-utils';
7
+ import { hyphenize } from '@bigbinary/neeto-commons-frontend/utils/general';
8
+ import { curry, is, includes, __, all, equals, omit } from 'ramda';
9
+ import { NavLink, useLocation, useHistory } from 'react-router-dom';
10
+ import { useNavigationCheckpoints } from '@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint';
11
+ import { jsx, jsxs } from 'react/jsx-runtime';
12
+ import classnames from 'classnames';
13
+ import Segments from '@bigbinary/neeto-filters-frontend/Segments';
14
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
15
+
16
+ /**
17
+ * @license lucide-react v1.7.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */
22
+
23
+ const mergeClasses = (...classes) => classes.filter((className, index, array) => {
24
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
25
+ }).join(" ").trim();
26
+
27
+ /**
28
+ * @license lucide-react v1.7.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */
33
+
34
+ const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
35
+
36
+ /**
37
+ * @license lucide-react v1.7.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */
42
+
43
+ const toCamelCase = (string) => string.replace(
44
+ /^([A-Z])|[\s-_]+(\w)/g,
45
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
46
+ );
47
+
48
+ /**
49
+ * @license lucide-react v1.7.0 - ISC
50
+ *
51
+ * This source code is licensed under the ISC license.
52
+ * See the LICENSE file in the root directory of this source tree.
53
+ */
54
+
55
+
56
+ const toPascalCase = (string) => {
57
+ const camelCase = toCamelCase(string);
58
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
59
+ };
60
+
61
+ /**
62
+ * @license lucide-react v1.7.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */
67
+
68
+ var defaultAttributes = {
69
+ xmlns: "http://www.w3.org/2000/svg",
70
+ width: 24,
71
+ height: 24,
72
+ viewBox: "0 0 24 24",
73
+ fill: "none",
74
+ stroke: "currentColor",
75
+ strokeWidth: 2,
76
+ strokeLinecap: "round",
77
+ strokeLinejoin: "round"
78
+ };
79
+
80
+ /**
81
+ * @license lucide-react v1.7.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */
86
+
87
+ const hasA11yProp = (props) => {
88
+ for (const prop in props) {
89
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
90
+ return true;
91
+ }
92
+ }
93
+ return false;
94
+ };
95
+
96
+ const LucideContext = createContext({});
97
+ const useLucideContext = () => useContext(LucideContext);
98
+
99
+ const Icon = forwardRef(
100
+ ({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
101
+ const {
102
+ size: contextSize = 24,
103
+ strokeWidth: contextStrokeWidth = 2,
104
+ absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
105
+ color: contextColor = "currentColor",
106
+ className: contextClass = ""
107
+ } = useLucideContext() ?? {};
108
+ const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
109
+ return createElement(
110
+ "svg",
111
+ {
112
+ ref,
113
+ ...defaultAttributes,
114
+ width: size ?? contextSize ?? defaultAttributes.width,
115
+ height: size ?? contextSize ?? defaultAttributes.height,
116
+ stroke: color ?? contextColor,
117
+ strokeWidth: calculatedStrokeWidth,
118
+ className: mergeClasses("lucide", contextClass, className),
119
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
120
+ ...rest
121
+ },
122
+ [
123
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
124
+ ...Array.isArray(children) ? children : [children]
125
+ ]
126
+ );
127
+ }
128
+ );
129
+
130
+ /**
131
+ * @license lucide-react v1.7.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */
136
+
137
+
138
+ const createLucideIcon = (iconName, iconNode) => {
139
+ const Component = forwardRef(
140
+ ({ className, ...props }, ref) => createElement(Icon, {
141
+ ref,
142
+ iconNode,
143
+ className: mergeClasses(
144
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
145
+ `lucide-${iconName}`,
146
+ className
147
+ ),
148
+ ...props
149
+ })
150
+ );
151
+ Component.displayName = toPascalCase(iconName);
152
+ return Component;
153
+ };
154
+
155
+ /**
156
+ * @license lucide-react v1.7.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */
161
+
162
+
163
+ const __iconNode = [
164
+ ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
165
+ [
166
+ "path",
167
+ {
168
+ d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
169
+ key: "r6nss1"
170
+ }
171
+ ]
172
+ ];
173
+ const House = createLucideIcon("house", __iconNode);
174
+
175
+ var _excluded$1 = ["checkpointKey", "to", "href", "children"];
176
+ 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; }
177
+ 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; }
178
+ var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
179
+ var checkpointKey = _ref.checkpointKey,
180
+ to = _ref.to,
181
+ href = _ref.href,
182
+ children = _ref.children,
183
+ others = _objectWithoutProperties(_ref, _excluded$1);
184
+ var _useNavigationCheckpo = useNavigationCheckpoints(checkpointKey),
185
+ checkpoint = _useNavigationCheckpo[checkpointKey];
186
+ var LinkElement = href ? "a" : NavLink;
187
+ var linkProps = href ? _objectSpread$2({
188
+ href: href,
189
+ key: href
190
+ }, others) : _objectSpread$2({
191
+ to: checkpoint || to,
192
+ key: to
193
+ }, others);
194
+ return /*#__PURE__*/jsx(LinkElement, _objectSpread$2(_objectSpread$2({}, linkProps), {}, {
195
+ children: children
196
+ }));
197
+ };
198
+
199
+ var SUB_LINK_TYPES = {
200
+ SYSTEM_VIEW: "system_view",
201
+ SEGMENTS: "segments"
202
+ };
203
+ var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
204
+ var DEFAULT_HOME_PATH = "/admin";
205
+ var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
206
+ var MIN_SIDEBAR_WIDTH = 12.5 * 16;
207
+ var MAX_SIDEBAR_WIDTH = 20 * 16;
208
+ var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
209
+ var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
210
+ var SPECIAL_APP_NAMES = {
211
+ bugwatch: "BugWatch"
212
+ };
213
+
214
+ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
215
+ var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
216
+ var targetUrl = new URL(subRoute, window.location.origin);
217
+ var targetSearchParams = targetUrl.searchParams;
218
+ var targetSearchKeys = Array.from(targetSearchParams.keys());
219
+ return all(function (key) {
220
+ return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
221
+ }, targetSearchKeys) && equals(currentBrowserUrl.pathname, targetUrl.pathname);
222
+ };
223
+ var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
224
+ var _globalProps$user, _globalProps$user2;
225
+ 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);
226
+ return "sidebarState-".concat(user);
227
+ };
228
+ var filterByPermissions = curry(function (_ref) {
229
+ var permissions = _ref.permissions;
230
+ if (permissions && isNotEmpty(permissions)) {
231
+ return is(Array, permissions) ? permissions.some(includes(__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
232
+ }
233
+ return true;
234
+ });
235
+ var getActiveConfigurePageLink = function getActiveConfigurePageLink(_ref2) {
236
+ var navLinks = _ref2.navLinks,
237
+ location = _ref2.location;
238
+ return navLinks.find(function (link) {
239
+ var _link$to;
240
+ var _ref3 = ((_link$to = link.to) === null || _link$to === void 0 ? void 0 : _link$to.split("?")) || [],
241
+ _ref4 = _slicedToArray(_ref3, 1),
242
+ linkPathname = _ref4[0];
243
+ return isPresent(link.isConfigureNavLink) && link.isConfigureNavLink && location.pathname.startsWith(linkPathname);
244
+ });
245
+ };
246
+
247
+ 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; }
248
+ 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; }
249
+ var SubLinkItem = function SubLinkItem(_ref) {
250
+ var to = _ref.to,
251
+ href = _ref.href,
252
+ onClick = _ref.onClick,
253
+ label = _ref.label,
254
+ className = _ref.className,
255
+ _ref$type = _ref.type,
256
+ type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
257
+ count = _ref.count,
258
+ isSectionHeader = _ref.isSectionHeader,
259
+ isCountsLoading = _ref.isCountsLoading,
260
+ dataTestid = _ref["data-testid"],
261
+ _ref$entity = _ref.entity,
262
+ entity = _ref$entity === void 0 ? "" : _ref$entity,
263
+ _ref$columns = _ref.columns,
264
+ columns = _ref$columns === void 0 ? [] : _ref$columns,
265
+ baseUrl = _ref.baseUrl,
266
+ isActive = _ref.isActive,
267
+ tag = _ref.tag;
268
+ var location = useLocation();
269
+ if (type === SUB_LINK_TYPES.SEGMENTS) {
270
+ return /*#__PURE__*/jsx(Segments, {
271
+ baseUrl: baseUrl,
272
+ columns: columns,
273
+ entity: entity,
274
+ isIndependent: false
275
+ });
276
+ }
277
+ var dataTestidPrefix = dataTestid || hyphenate(label);
278
+ var renderCount = function renderCount(count) {
279
+ return count > 999 ? "999+" : count;
280
+ };
281
+ var isSubLinkActive = function isSubLinkActive() {
282
+ return !isSectionHeader && (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));
283
+ };
284
+ return /*#__PURE__*/jsx(SidebarMenuSubItem, {
285
+ children: /*#__PURE__*/jsx(SidebarMenuSubButton, {
286
+ asChild: true,
287
+ isActive: isSubLinkActive(),
288
+ size: "md",
289
+ className: classnames("h-auto overflow-visible py-1.5 whitespace-normal", className),
290
+ children: /*#__PURE__*/jsxs(CheckPointNavLinks, {
291
+ href: href,
292
+ onClick: onClick,
293
+ to: to,
294
+ activeClassName: "active",
295
+ "data-testid": "".concat(dataTestidPrefix, "-sub-link"),
296
+ isActive: isSubLinkActive,
297
+ children: [/*#__PURE__*/jsxs("span", {
298
+ className: "flex flex-grow items-center gap-2",
299
+ "data-testid": "".concat(dataTestidPrefix, "-sub-link-label"),
300
+ children: [label, tag && /*#__PURE__*/jsx(Badge, _objectSpread$1({}, tag))]
301
+ }), /*#__PURE__*/jsx("span", {
302
+ className: "text-sidebar-foreground/70 flex-shrink-0 text-xs",
303
+ "data-testid": "".concat(dataTestidPrefix, "-sub-link-count"),
304
+ children: isCountsLoading ? /*#__PURE__*/jsx("div", {
305
+ className: "bg-sidebar-accent h-4 w-4 animate-pulse rounded"
306
+ }) : renderCount(count)
307
+ })]
308
+ })
309
+ })
310
+ });
311
+ };
312
+
313
+ var _excluded = ["label", "items"];
314
+ 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; }
315
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).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; }
316
+ var ConfigureView = function ConfigureView(_ref) {
317
+ var _ref$navLink = _ref.navLink,
318
+ navLink = _ref$navLink === void 0 ? {
319
+ label: "",
320
+ items: [],
321
+ isConfigureNavLink: false
322
+ } : _ref$navLink,
323
+ handleGoBack = _ref.handleGoBack;
324
+ _ref.isConfigureSidebar;
325
+ var history = useHistory();
326
+ var label = navLink.label,
327
+ items = navLink.items,
328
+ otherProps = _objectWithoutProperties(navLink, _excluded);
329
+ var handleHomeButtonClick = function handleHomeButtonClick(e) {
330
+ e.stopPropagation();
331
+ handleMetaClick(history, DEFAULT_HOME_PATH, e);
332
+ };
333
+ var renderItems = function renderItems(itemList) {
334
+ return /*#__PURE__*/jsx(SidebarMenu, {
335
+ className: "gap-1",
336
+ children: itemList.filter(filterByPermissions).map(function (subItem, subIndex) {
337
+ var _subItem$to, _subItem$to2;
338
+ return /*#__PURE__*/jsx(Fragment, {
339
+ children: isPresent(subItem.items) ? /*#__PURE__*/jsxs(SidebarMenuItem, {
340
+ children: [/*#__PURE__*/jsx(SidebarMenuButton, {
341
+ asChild: true,
342
+ className: "font-medium",
343
+ children: /*#__PURE__*/jsx(CheckPointNavLinks, {
344
+ href: subItem.href,
345
+ to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path,
346
+ onClick: subItem.onClick,
347
+ children: subItem.label
348
+ })
349
+ }), /*#__PURE__*/jsx(SidebarMenuSub, {
350
+ children: subItem.items.filter(filterByPermissions).map(function (nestedItem, nestedIndex) {
351
+ var _nestedItem$to;
352
+ return /*#__PURE__*/jsx(SubLinkItem, _objectSpread(_objectSpread({}, _objectSpread({}, nestedItem)), {}, {
353
+ href: nestedItem.href,
354
+ isActive: nestedItem.isActive,
355
+ to: (_nestedItem$to = nestedItem.to) !== null && _nestedItem$to !== void 0 ? _nestedItem$to : nestedItem.path,
356
+ onClick: nestedItem.onClick
357
+ }), nestedIndex);
358
+ })
359
+ })]
360
+ }) : /*#__PURE__*/jsx(SubLinkItem, _objectSpread(_objectSpread({}, _objectSpread({}, subItem)), {}, {
361
+ href: subItem.href,
362
+ isActive: subItem.isActive,
363
+ to: (_subItem$to2 = subItem.to) !== null && _subItem$to2 !== void 0 ? _subItem$to2 : subItem.path,
364
+ onClick: subItem.onClick
365
+ }))
366
+ }, subIndex);
367
+ })
368
+ });
369
+ };
370
+ return /*#__PURE__*/jsxs(SidebarGroup, {
371
+ "data-testid": "configure-nav-container",
372
+ children: [/*#__PURE__*/jsxs(SidebarGroupLabel, _objectSpread(_objectSpread({
373
+ className: "border-sidebar-border text-sidebar-foreground mb-2 h-10 cursor-pointer gap-1.5 rounded-none border-b px-3 text-sm font-semibold",
374
+ onClick: handleGoBack
375
+ }, _objectSpread({}, omit(["icon", "isConfigureNavLink"], otherProps))), {}, {
376
+ children: [/*#__PURE__*/jsx(House, {
377
+ className: "size-4 shrink-0 cursor-pointer",
378
+ "data-testid": "".concat(hyphenize(label), "-go-back-button"),
379
+ onClick: handleHomeButtonClick
380
+ }), /*#__PURE__*/jsx("span", {
381
+ className: "text-sidebar-foreground/50",
382
+ children: "/"
383
+ }), /*#__PURE__*/jsx("span", {
384
+ children: label
385
+ })]
386
+ })), /*#__PURE__*/jsx(SidebarGroupContent, {
387
+ children: items && renderItems(items)
388
+ })]
389
+ });
390
+ };
391
+
392
+ export { ConfigureView as C, DEFAULT_HOME_PATH as D, MIN_SIDEBAR_WIDTH as M, PINNED_MORE_NAV_LINKS_KEY as P, SPECIAL_APP_NAMES as S, CheckPointNavLinks as a, SubLinkItem as b, createLucideIcon as c, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as d, SIDEBAR_WIDTH_KEY as e, filterByPermissions as f, getSidebarStateLocalStorageKey as g, DEFAULT_SIDEBAR_WIDTH as h, getActiveConfigurePageLink as i, MAX_SIDEBAR_WIDTH as j };
393
+ //# sourceMappingURL=ConfigureView-DD3TW3Z8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigureView-DD3TW3Z8.js","sources":["../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js","../node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js","../node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js","../node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js","../node_modules/lucide-react/dist/esm/defaultAttributes.js","../node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js","../node_modules/lucide-react/dist/esm/context.js","../node_modules/lucide-react/dist/esm/Icon.js","../node_modules/lucide-react/dist/esm/createLucideIcon.js","../node_modules/lucide-react/dist/esm/icons/house.js","../src/v2/components/Sidebar/Components/CheckPointNavLink.jsx","../src/v2/components/Sidebar/constants.js","../src/v2/components/Sidebar/utils.js","../src/v2/components/Sidebar/Components/SubLinkItem.jsx","../src/v2/components/Sidebar/Components/ConfigureView.jsx"],"sourcesContent":["/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses };\n//# sourceMappingURL=mergeClasses.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { toKebabCase };\n//# sourceMappingURL=toKebabCase.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\n\nexport { toCamelCase };\n//# sourceMappingURL=toCamelCase.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { toCamelCase } from './toCamelCase.js';\n\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\n\nexport { toPascalCase };\n//# sourceMappingURL=toPascalCase.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n return false;\n};\n\nexport { hasA11yProp };\n//# sourceMappingURL=hasA11yProp.js.map\n","\"use strict\";\n\"use client\";\n/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { createContext, useContext, useMemo, createElement } from 'react';\n\nconst LucideContext = createContext({});\nfunction LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n className\n}) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n className\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, className]\n );\n return createElement(LucideContext.Provider, { value }, children);\n}\nconst useLucideContext = () => useContext(LucideContext);\n\nexport { LucideProvider, useLucideContext };\n//# sourceMappingURL=context.js.map\n","\"use strict\";\n\"use client\";\n/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { hasA11yProp } from './shared/src/utils/hasA11yProp.js';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.js';\nimport { useLucideContext } from './context.js';\n\nconst Icon = forwardRef(\n ({ color, size, strokeWidth, absoluteStrokeWidth, className = \"\", children, iconNode, ...rest }, ref) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n color: contextColor = \"currentColor\",\n className: contextClass = \"\"\n } = useLucideContext() ?? {};\n const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;\n return createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size ?? contextSize ?? defaultAttributes.width,\n height: size ?? contextSize ?? defaultAttributes.height,\n stroke: color ?? contextColor,\n strokeWidth: calculatedStrokeWidth,\n className: mergeClasses(\"lucide\", contextClass, className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.js';\nimport { toKebabCase } from './shared/src/utils/toKebabCase.js';\nimport { toPascalCase } from './shared/src/utils/toPascalCase.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\", key: \"5wwlr5\" }],\n [\n \"path\",\n {\n d: \"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\",\n key: \"r6nss1\"\n }\n ]\n];\nconst House = createLucideIcon(\"house\", __iconNode);\n\nexport { __iconNode, House as default };\n//# sourceMappingURL=house.js.map\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","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\nexport const SPECIAL_APP_NAMES = { bugwatch: \"BugWatch\" };\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","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport {\n Badge,\n SidebarMenuSubItem,\n SidebarMenuSubButton,\n} from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { is } from \"ramda\";\nimport { useLocation } from \"react-router-dom\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../constants\";\nimport { isSubRouteActive } from \"../utils\";\n\nconst SubLinkItem = ({\n to,\n href,\n onClick,\n label,\n className,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-testid\": dataTestid,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n tag,\n}) => {\n const location = useLocation();\n\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataTestidPrefix = dataTestid || 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 <SidebarMenuSubItem>\n <SidebarMenuSubButton\n asChild\n isActive={isSubLinkActive()}\n size=\"md\"\n className={classnames(\n \"h-auto overflow-visible py-1.5 whitespace-normal\",\n className\n )}\n >\n <CheckPointNavLinks\n {...{ href, onClick, to }}\n activeClassName=\"active\"\n data-testid={`${dataTestidPrefix}-sub-link`}\n isActive={isSubLinkActive}\n >\n <span\n className=\"flex flex-grow items-center gap-2\"\n data-testid={`${dataTestidPrefix}-sub-link-label`}\n >\n {label}\n {tag && <Badge {...tag} />}\n </span>\n <span\n className=\"text-sidebar-foreground/70 flex-shrink-0 text-xs\"\n data-testid={`${dataTestidPrefix}-sub-link-count`}\n >\n {isCountsLoading ? (\n <div className=\"bg-sidebar-accent h-4 w-4 animate-pulse rounded\" />\n ) : (\n renderCount(count)\n )}\n </span>\n </CheckPointNavLinks>\n </SidebarMenuSubButton>\n </SidebarMenuSubItem>\n );\n};\n\nexport default SubLinkItem;\n","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport { Fragment } from \"react\";\n\nimport {\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n} from \"@bigbinary/neeto-atoms\";\nimport { Home } from \"lucide-react\";\nimport { isPresent } from \"neetocist\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\nimport SubLinkItem from \"./SubLinkItem\";\n\nimport { DEFAULT_HOME_PATH } from \"../constants\";\nimport { filterByPermissions } from \"../utils\";\n\nconst ConfigureView = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar: _isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, e);\n };\n\n const renderItems = itemList => (\n <SidebarMenu className=\"gap-1\">\n {itemList.filter(filterByPermissions).map((subItem, subIndex) => (\n <Fragment key={subIndex}>\n {isPresent(subItem.items) ? (\n <SidebarMenuItem>\n <SidebarMenuButton asChild className=\"font-medium\">\n <CheckPointNavLinks\n href={subItem.href}\n to={subItem.to ?? subItem.path}\n onClick={subItem.onClick}\n >\n {subItem.label}\n </CheckPointNavLinks>\n </SidebarMenuButton>\n <SidebarMenuSub>\n {subItem.items\n .filter(filterByPermissions)\n .map((nestedItem, nestedIndex) => (\n <SubLinkItem\n key={nestedIndex}\n {...{ ...nestedItem }}\n href={nestedItem.href}\n isActive={nestedItem.isActive}\n to={nestedItem.to ?? nestedItem.path}\n onClick={nestedItem.onClick}\n />\n ))}\n </SidebarMenuSub>\n </SidebarMenuItem>\n ) : (\n <SubLinkItem\n {...{ ...subItem }}\n href={subItem.href}\n isActive={subItem.isActive}\n to={subItem.to ?? subItem.path}\n onClick={subItem.onClick}\n />\n )}\n </Fragment>\n ))}\n </SidebarMenu>\n );\n\n return (\n <SidebarGroup data-testid=\"configure-nav-container\">\n <SidebarGroupLabel\n className=\"border-sidebar-border text-sidebar-foreground mb-2 h-10 cursor-pointer gap-1.5 rounded-none border-b px-3 text-sm font-semibold\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\", \"isConfigureNavLink\"], otherProps) }}\n >\n <Home\n className=\"size-4 shrink-0 cursor-pointer\"\n data-testid={`${hyphenize(label)}-go-back-button`}\n onClick={handleHomeButtonClick}\n />\n <span className=\"text-sidebar-foreground/50\">/</span>\n <span>{label}</span>\n </SidebarGroupLabel>\n <SidebarGroupContent>{items && renderItems(items)}</SidebarGroupContent>\n </SidebarGroup>\n );\n};\n\nexport default ConfigureView;\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","PINNED_MORE_NAV_LINKS_KEY","SPECIAL_APP_NAMES","bugwatch","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","SubLinkItem","onClick","label","className","_ref$type","type","count","isSectionHeader","isCountsLoading","dataTestid","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","tag","useLocation","Segments","isIndependent","dataTestidPrefix","hyphenate","renderCount","isSubLinkActive","Function","SidebarMenuSubItem","SidebarMenuSubButton","asChild","size","classnames","_jsxs","activeClassName","Badge","ConfigureView","_ref$navLink","navLink","items","handleGoBack","isConfigureSidebar","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","renderItems","itemList","SidebarMenu","filter","map","subItem","subIndex","_subItem$to","_subItem$to2","Fragment","SidebarMenuItem","SidebarMenuButton","path","SidebarMenuSub","nestedItem","nestedIndex","_nestedItem$to","SidebarGroup","SidebarGroupLabel","omit","Home","hyphenize","SidebarGroupContent"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,YAAY,GAAG,CAAC,GAAG,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK;AACjF,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,KAAK;AAC5F,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;;ACTnB;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,WAAW,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE;;ACP3F;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,WAAW,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO;AAC9C,EAAE,uBAAuB;AACzB,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW;AAC3D,CAAC;;ACVD;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,YAAY,GAAG,CAAC,MAAM,KAAK;AACjC,EAAE,MAAM,SAAS,GAAG,WAAW,CAA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AAAC,KAAsB,CAAC;AAAA,GAC5D,CAAC;AAEnB;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
@@ -943,7 +943,7 @@ var WorkspaceMenu = function WorkspaceMenu() {
943
943
  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; }
944
944
  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; }
945
945
  var ProfileMenu = function ProfileMenu(_ref) {
946
- var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4;
946
+ var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
947
947
  var profileInfo = _ref.profileInfo,
948
948
  showProductSwitcher = _ref.showProductSwitcher,
949
949
  defaultLinks = _ref.defaultLinks,
@@ -964,7 +964,22 @@ var ProfileMenu = function ProfileMenu(_ref) {
964
964
  t = _useTranslation.t;
965
965
  var normalizedPlan = (((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) || "").toLowerCase();
966
966
  var isFreePlan = normalizedPlan === "free";
967
- var showUpgradeAction = isFreePlan && enableSubscriptionUpgradeRequest;
967
+ var isOwner = (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.isOwner;
968
+ var showUpgradeModal = isFreePlan && enableSubscriptionUpgradeRequest && !isOwner;
969
+ var getSubscriptionPlanAction = function getSubscriptionPlanAction() {
970
+ if (showUpgradeModal) return {
971
+ onClick: openUpgradeModal
972
+ };
973
+ if (isFreePlan && isOwner && enableSubscriptionUpgradeRequest) {
974
+ var _globalProps$organiza;
975
+ return {
976
+ href: "".concat((_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.authAppUrl, "/admin/billing/overview")
977
+ };
978
+ }
979
+ return {
980
+ href: NEETO_AUTH_BILLING_INFO_URL
981
+ };
982
+ };
968
983
  var subscriptionPlanLink = _objectSpread$2({
969
984
  label: /*#__PURE__*/jsxs(Fragment, {
970
985
  children: [globalProps.appName, " ", /*#__PURE__*/jsx("span", {
@@ -972,7 +987,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
972
987
  "neeto-molecules-subscription-plan-badge--pro": normalizedPlan === "pro",
973
988
  "neeto-molecules-subscription-plan-badge--free": isFreePlan
974
989
  }),
975
- children: normalizedPlan === "pro" ? humanize((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.subscriptionPlan) : /*#__PURE__*/jsxs(Fragment, {
990
+ children: normalizedPlan === "pro" ? humanize((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.subscriptionPlan) : /*#__PURE__*/jsxs(Fragment, {
976
991
  children: [/*#__PURE__*/jsx(Crown, {
977
992
  size: 12
978
993
  }), t("neetoMolecules.sidebar.upgradePlan")]
@@ -980,11 +995,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
980
995
  })]
981
996
  }),
982
997
  "data-testid": "subscription-plan"
983
- }, showUpgradeAction ? {
984
- onClick: openUpgradeModal
985
- } : {
986
- href: NEETO_AUTH_BILLING_INFO_URL
987
- });
998
+ }, getSubscriptionPlanAction());
988
999
  return /*#__PURE__*/jsxs(Menu, {
989
1000
  className: "pb-1",
990
1001
  children: [!isConsumer && /*#__PURE__*/jsxs(Fragment, {
@@ -999,7 +1010,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
999
1010
  className: "neeto-molecules-floating-action-button__profile-wrapper-custom-content",
1000
1011
  children: customContent
1001
1012
  })]
1002
- }), /*#__PURE__*/jsx(Divider, {}), ((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.isOwner) && /*#__PURE__*/jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsx(Divider, {}), isPresent((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.subscriptionPlan) && /*#__PURE__*/jsx(LinkSection, {
1013
+ }), /*#__PURE__*/jsx(Divider, {}), ((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.isOwner) && /*#__PURE__*/jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsx(Divider, {}), isPresent((_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.subscriptionPlan) && /*#__PURE__*/jsx(LinkSection, {
1003
1014
  links: [subscriptionPlanLink]
1004
1015
  }), showProductSwitcher && /*#__PURE__*/jsx(ProductSwitcher, {
1005
1016
  toggleModal: toggleModal
@@ -1017,6 +1028,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
1017
1028
  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; }
1018
1029
  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; }
1019
1030
  var ProfileButton = function ProfileButton(_ref) {
1031
+ var _globalProps$user;
1020
1032
  var profileInfoOverrides = _ref.profileInfoOverrides,
1021
1033
  showProductSwitcher = _ref.showProductSwitcher,
1022
1034
  bottomLinks = _ref.bottomLinks,
@@ -1147,7 +1159,7 @@ var ProfileButton = function ProfileButton(_ref) {
1147
1159
  onClose: function onClose() {
1148
1160
  return setIsModalOpen(false);
1149
1161
  }
1150
- }), enableSubscriptionUpgradeRequest && /*#__PURE__*/jsx(SubscriptionUpgradeRequestModal, {
1162
+ }), enableSubscriptionUpgradeRequest && !((_globalProps$user = globalProps.user) !== null && _globalProps$user !== void 0 && _globalProps$user.isOwner) && /*#__PURE__*/jsx(SubscriptionUpgradeRequestModal, {
1151
1163
  isOpen: isUpgradeModalOpen,
1152
1164
  onClose: function onClose() {
1153
1165
  return setIsUpgradeModalOpen(false);