@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.
- package/dist/ConfigureView-DD3TW3Z8.js +393 -0
- package/dist/ConfigureView-DD3TW3Z8.js.map +1 -0
- package/dist/FloatingActionMenu.js +22 -10
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Sidebar.js +1 -2
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/ConfigureView-CIHmB-58.js +409 -0
- package/dist/cjs/ConfigureView-CIHmB-58.js.map +1 -0
- package/dist/cjs/FloatingActionMenu.js +22 -10
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Sidebar.js +1 -2
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/v2/ConfigurePageSidebar.js +55 -0
- package/dist/cjs/v2/ConfigurePageSidebar.js.map +1 -0
- package/dist/cjs/v2/Sidebar.js +648 -0
- package/dist/cjs/v2/Sidebar.js.map +1 -0
- package/dist/v2/ConfigurePageSidebar.js +53 -0
- package/dist/v2/ConfigurePageSidebar.js.map +1 -0
- package/dist/v2/Sidebar.js +627 -0
- package/dist/v2/Sidebar.js.map +1 -0
- package/package.json +14 -2
- package/types/v2/ConfigurePageSidebar.d.ts +16 -0
- package/types/v2/Sidebar.d.ts +41 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
7
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
9
|
+
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
10
|
+
var ramda = require('ramda');
|
|
11
|
+
var reactRouterDom = require('react-router-dom');
|
|
12
|
+
var useRegisterNavigationCheckpoint = require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
|
|
13
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
+
var classnames = require('classnames');
|
|
15
|
+
var Segments = require('@bigbinary/neeto-filters-frontend/Segments');
|
|
16
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @license lucide-react v1.7.0 - ISC
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the ISC license.
|
|
22
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
26
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
27
|
+
}).join(" ").trim();
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v1.7.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @license lucide-react v1.7.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
const toCamelCase = (string) => string.replace(
|
|
46
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
47
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @license lucide-react v1.7.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
const toPascalCase = (string) => {
|
|
59
|
+
const camelCase = toCamelCase(string);
|
|
60
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @license lucide-react v1.7.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
var defaultAttributes = {
|
|
71
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
72
|
+
width: 24,
|
|
73
|
+
height: 24,
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
fill: "none",
|
|
76
|
+
stroke: "currentColor",
|
|
77
|
+
strokeWidth: 2,
|
|
78
|
+
strokeLinecap: "round",
|
|
79
|
+
strokeLinejoin: "round"
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @license lucide-react v1.7.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
const hasA11yProp = (props) => {
|
|
90
|
+
for (const prop in props) {
|
|
91
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const LucideContext = React.createContext({});
|
|
99
|
+
const useLucideContext = () => React.useContext(LucideContext);
|
|
100
|
+
|
|
101
|
+
const Icon = React.forwardRef(
|
|
102
|
+
({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
103
|
+
const {
|
|
104
|
+
size: contextSize = 24,
|
|
105
|
+
strokeWidth: contextStrokeWidth = 2,
|
|
106
|
+
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
107
|
+
color: contextColor = "currentColor",
|
|
108
|
+
className: contextClass = ""
|
|
109
|
+
} = useLucideContext() ?? {};
|
|
110
|
+
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
111
|
+
return React.createElement(
|
|
112
|
+
"svg",
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
...defaultAttributes,
|
|
116
|
+
width: size ?? contextSize ?? defaultAttributes.width,
|
|
117
|
+
height: size ?? contextSize ?? defaultAttributes.height,
|
|
118
|
+
stroke: color ?? contextColor,
|
|
119
|
+
strokeWidth: calculatedStrokeWidth,
|
|
120
|
+
className: mergeClasses("lucide", contextClass, className),
|
|
121
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
122
|
+
...rest
|
|
123
|
+
},
|
|
124
|
+
[
|
|
125
|
+
...iconNode.map(([tag, attrs]) => React.createElement(tag, attrs)),
|
|
126
|
+
...Array.isArray(children) ? children : [children]
|
|
127
|
+
]
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @license lucide-react v1.7.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
const createLucideIcon = (iconName, iconNode) => {
|
|
141
|
+
const Component = React.forwardRef(
|
|
142
|
+
({ className, ...props }, ref) => React.createElement(Icon, {
|
|
143
|
+
ref,
|
|
144
|
+
iconNode,
|
|
145
|
+
className: mergeClasses(
|
|
146
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
147
|
+
`lucide-${iconName}`,
|
|
148
|
+
className
|
|
149
|
+
),
|
|
150
|
+
...props
|
|
151
|
+
})
|
|
152
|
+
);
|
|
153
|
+
Component.displayName = toPascalCase(iconName);
|
|
154
|
+
return Component;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @license lucide-react v1.7.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
const __iconNode = [
|
|
166
|
+
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
167
|
+
[
|
|
168
|
+
"path",
|
|
169
|
+
{
|
|
170
|
+
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",
|
|
171
|
+
key: "r6nss1"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
];
|
|
175
|
+
const House = createLucideIcon("house", __iconNode);
|
|
176
|
+
|
|
177
|
+
var _excluded$1 = ["checkpointKey", "to", "href", "children"];
|
|
178
|
+
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; }
|
|
179
|
+
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; }
|
|
180
|
+
var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
181
|
+
var checkpointKey = _ref.checkpointKey,
|
|
182
|
+
to = _ref.to,
|
|
183
|
+
href = _ref.href,
|
|
184
|
+
children = _ref.children,
|
|
185
|
+
others = _objectWithoutProperties(_ref, _excluded$1);
|
|
186
|
+
var _useNavigationCheckpo = useRegisterNavigationCheckpoint.useNavigationCheckpoints(checkpointKey),
|
|
187
|
+
checkpoint = _useNavigationCheckpo[checkpointKey];
|
|
188
|
+
var LinkElement = href ? "a" : reactRouterDom.NavLink;
|
|
189
|
+
var linkProps = href ? _objectSpread$2({
|
|
190
|
+
href: href,
|
|
191
|
+
key: href
|
|
192
|
+
}, others) : _objectSpread$2({
|
|
193
|
+
to: checkpoint || to,
|
|
194
|
+
key: to
|
|
195
|
+
}, others);
|
|
196
|
+
return /*#__PURE__*/jsxRuntime.jsx(LinkElement, _objectSpread$2(_objectSpread$2({}, linkProps), {}, {
|
|
197
|
+
children: children
|
|
198
|
+
}));
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var SUB_LINK_TYPES = {
|
|
202
|
+
SYSTEM_VIEW: "system_view",
|
|
203
|
+
SEGMENTS: "segments"
|
|
204
|
+
};
|
|
205
|
+
var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
|
|
206
|
+
var DEFAULT_HOME_PATH = "/admin";
|
|
207
|
+
var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
|
|
208
|
+
var MIN_SIDEBAR_WIDTH = 12.5 * 16;
|
|
209
|
+
var MAX_SIDEBAR_WIDTH = 20 * 16;
|
|
210
|
+
var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
|
|
211
|
+
var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
|
|
212
|
+
var SPECIAL_APP_NAMES = {
|
|
213
|
+
bugwatch: "BugWatch"
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
217
|
+
var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
|
|
218
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
219
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
220
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
221
|
+
return ramda.all(function (key) {
|
|
222
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
223
|
+
}, targetSearchKeys) && ramda.equals(currentBrowserUrl.pathname, targetUrl.pathname);
|
|
224
|
+
};
|
|
225
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
226
|
+
var _globalProps$user, _globalProps$user2;
|
|
227
|
+
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);
|
|
228
|
+
return "sidebarState-".concat(user);
|
|
229
|
+
};
|
|
230
|
+
var filterByPermissions = ramda.curry(function (_ref) {
|
|
231
|
+
var permissions = _ref.permissions;
|
|
232
|
+
if (permissions && neetoCist.isNotEmpty(permissions)) {
|
|
233
|
+
return ramda.is(Array, permissions) ? permissions.some(ramda.includes(ramda.__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
|
|
234
|
+
}
|
|
235
|
+
return true;
|
|
236
|
+
});
|
|
237
|
+
var getActiveConfigurePageLink = function getActiveConfigurePageLink(_ref2) {
|
|
238
|
+
var navLinks = _ref2.navLinks,
|
|
239
|
+
location = _ref2.location;
|
|
240
|
+
return navLinks.find(function (link) {
|
|
241
|
+
var _link$to;
|
|
242
|
+
var _ref3 = ((_link$to = link.to) === null || _link$to === void 0 ? void 0 : _link$to.split("?")) || [],
|
|
243
|
+
_ref4 = _slicedToArray(_ref3, 1),
|
|
244
|
+
linkPathname = _ref4[0];
|
|
245
|
+
return neetoCist.isPresent(link.isConfigureNavLink) && link.isConfigureNavLink && location.pathname.startsWith(linkPathname);
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
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; }
|
|
250
|
+
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; }
|
|
251
|
+
var SubLinkItem = function SubLinkItem(_ref) {
|
|
252
|
+
var to = _ref.to,
|
|
253
|
+
href = _ref.href,
|
|
254
|
+
onClick = _ref.onClick,
|
|
255
|
+
label = _ref.label,
|
|
256
|
+
className = _ref.className,
|
|
257
|
+
_ref$type = _ref.type,
|
|
258
|
+
type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
|
|
259
|
+
count = _ref.count,
|
|
260
|
+
isSectionHeader = _ref.isSectionHeader,
|
|
261
|
+
isCountsLoading = _ref.isCountsLoading,
|
|
262
|
+
dataTestid = _ref["data-testid"],
|
|
263
|
+
_ref$entity = _ref.entity,
|
|
264
|
+
entity = _ref$entity === void 0 ? "" : _ref$entity,
|
|
265
|
+
_ref$columns = _ref.columns,
|
|
266
|
+
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
267
|
+
baseUrl = _ref.baseUrl,
|
|
268
|
+
isActive = _ref.isActive,
|
|
269
|
+
tag = _ref.tag;
|
|
270
|
+
var location = reactRouterDom.useLocation();
|
|
271
|
+
if (type === SUB_LINK_TYPES.SEGMENTS) {
|
|
272
|
+
return /*#__PURE__*/jsxRuntime.jsx(Segments, {
|
|
273
|
+
baseUrl: baseUrl,
|
|
274
|
+
columns: columns,
|
|
275
|
+
entity: entity,
|
|
276
|
+
isIndependent: false
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
var dataTestidPrefix = dataTestid || neetoCist.hyphenate(label);
|
|
280
|
+
var renderCount = function renderCount(count) {
|
|
281
|
+
return count > 999 ? "999+" : count;
|
|
282
|
+
};
|
|
283
|
+
var isSubLinkActive = function isSubLinkActive() {
|
|
284
|
+
return !isSectionHeader && (ramda.is(Function, isActive) ? isActive() : isSubRouteActive(to, location));
|
|
285
|
+
};
|
|
286
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.SidebarMenuSubItem, {
|
|
287
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.SidebarMenuSubButton, {
|
|
288
|
+
asChild: true,
|
|
289
|
+
isActive: isSubLinkActive(),
|
|
290
|
+
size: "md",
|
|
291
|
+
className: classnames("h-auto overflow-visible py-1.5 whitespace-normal", className),
|
|
292
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(CheckPointNavLinks, {
|
|
293
|
+
href: href,
|
|
294
|
+
onClick: onClick,
|
|
295
|
+
to: to,
|
|
296
|
+
activeClassName: "active",
|
|
297
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link"),
|
|
298
|
+
isActive: isSubLinkActive,
|
|
299
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
300
|
+
className: "flex flex-grow items-center gap-2",
|
|
301
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link-label"),
|
|
302
|
+
children: [label, tag && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, _objectSpread$1({}, tag))]
|
|
303
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
304
|
+
className: "text-sidebar-foreground/70 flex-shrink-0 text-xs",
|
|
305
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link-count"),
|
|
306
|
+
children: isCountsLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
307
|
+
className: "bg-sidebar-accent h-4 w-4 animate-pulse rounded"
|
|
308
|
+
}) : renderCount(count)
|
|
309
|
+
})]
|
|
310
|
+
})
|
|
311
|
+
})
|
|
312
|
+
});
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
var _excluded = ["label", "items"];
|
|
316
|
+
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; }
|
|
317
|
+
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; }
|
|
318
|
+
var ConfigureView = function ConfigureView(_ref) {
|
|
319
|
+
var _ref$navLink = _ref.navLink,
|
|
320
|
+
navLink = _ref$navLink === void 0 ? {
|
|
321
|
+
label: "",
|
|
322
|
+
items: [],
|
|
323
|
+
isConfigureNavLink: false
|
|
324
|
+
} : _ref$navLink,
|
|
325
|
+
handleGoBack = _ref.handleGoBack;
|
|
326
|
+
_ref.isConfigureSidebar;
|
|
327
|
+
var history = reactRouterDom.useHistory();
|
|
328
|
+
var label = navLink.label,
|
|
329
|
+
items = navLink.items,
|
|
330
|
+
otherProps = _objectWithoutProperties(navLink, _excluded);
|
|
331
|
+
var handleHomeButtonClick = function handleHomeButtonClick(e) {
|
|
332
|
+
e.stopPropagation();
|
|
333
|
+
reactUtils.handleMetaClick(history, DEFAULT_HOME_PATH, e);
|
|
334
|
+
};
|
|
335
|
+
var renderItems = function renderItems(itemList) {
|
|
336
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.SidebarMenu, {
|
|
337
|
+
className: "gap-1",
|
|
338
|
+
children: itemList.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
339
|
+
var _subItem$to, _subItem$to2;
|
|
340
|
+
return /*#__PURE__*/jsxRuntime.jsx(React.Fragment, {
|
|
341
|
+
children: neetoCist.isPresent(subItem.items) ? /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.SidebarMenuItem, {
|
|
342
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.SidebarMenuButton, {
|
|
343
|
+
asChild: true,
|
|
344
|
+
className: "font-medium",
|
|
345
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CheckPointNavLinks, {
|
|
346
|
+
href: subItem.href,
|
|
347
|
+
to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path,
|
|
348
|
+
onClick: subItem.onClick,
|
|
349
|
+
children: subItem.label
|
|
350
|
+
})
|
|
351
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.SidebarMenuSub, {
|
|
352
|
+
children: subItem.items.filter(filterByPermissions).map(function (nestedItem, nestedIndex) {
|
|
353
|
+
var _nestedItem$to;
|
|
354
|
+
return /*#__PURE__*/jsxRuntime.jsx(SubLinkItem, _objectSpread(_objectSpread({}, _objectSpread({}, nestedItem)), {}, {
|
|
355
|
+
href: nestedItem.href,
|
|
356
|
+
isActive: nestedItem.isActive,
|
|
357
|
+
to: (_nestedItem$to = nestedItem.to) !== null && _nestedItem$to !== void 0 ? _nestedItem$to : nestedItem.path,
|
|
358
|
+
onClick: nestedItem.onClick
|
|
359
|
+
}), nestedIndex);
|
|
360
|
+
})
|
|
361
|
+
})]
|
|
362
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(SubLinkItem, _objectSpread(_objectSpread({}, _objectSpread({}, subItem)), {}, {
|
|
363
|
+
href: subItem.href,
|
|
364
|
+
isActive: subItem.isActive,
|
|
365
|
+
to: (_subItem$to2 = subItem.to) !== null && _subItem$to2 !== void 0 ? _subItem$to2 : subItem.path,
|
|
366
|
+
onClick: subItem.onClick
|
|
367
|
+
}))
|
|
368
|
+
}, subIndex);
|
|
369
|
+
})
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.SidebarGroup, {
|
|
373
|
+
"data-testid": "configure-nav-container",
|
|
374
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.SidebarGroupLabel, _objectSpread(_objectSpread({
|
|
375
|
+
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",
|
|
376
|
+
onClick: handleGoBack
|
|
377
|
+
}, _objectSpread({}, ramda.omit(["icon", "isConfigureNavLink"], otherProps))), {}, {
|
|
378
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(House, {
|
|
379
|
+
className: "size-4 shrink-0 cursor-pointer",
|
|
380
|
+
"data-testid": "".concat(general.hyphenize(label), "-go-back-button"),
|
|
381
|
+
onClick: handleHomeButtonClick
|
|
382
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
383
|
+
className: "text-sidebar-foreground/50",
|
|
384
|
+
children: "/"
|
|
385
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
386
|
+
children: label
|
|
387
|
+
})]
|
|
388
|
+
})), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.SidebarGroupContent, {
|
|
389
|
+
children: items && renderItems(items)
|
|
390
|
+
})]
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
exports.CheckPointNavLinks = CheckPointNavLinks;
|
|
395
|
+
exports.ConfigureView = ConfigureView;
|
|
396
|
+
exports.DEFAULT_HOME_PATH = DEFAULT_HOME_PATH;
|
|
397
|
+
exports.DEFAULT_SIDEBAR_WIDTH = DEFAULT_SIDEBAR_WIDTH;
|
|
398
|
+
exports.MAX_SIDEBAR_WIDTH = MAX_SIDEBAR_WIDTH;
|
|
399
|
+
exports.MIN_SIDEBAR_WIDTH = MIN_SIDEBAR_WIDTH;
|
|
400
|
+
exports.PINNED_MORE_NAV_LINKS_KEY = PINNED_MORE_NAV_LINKS_KEY;
|
|
401
|
+
exports.SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = SELECTED_NAV_LINK_ROUTE_STORAGE_KEY;
|
|
402
|
+
exports.SIDEBAR_WIDTH_KEY = SIDEBAR_WIDTH_KEY;
|
|
403
|
+
exports.SPECIAL_APP_NAMES = SPECIAL_APP_NAMES;
|
|
404
|
+
exports.SubLinkItem = SubLinkItem;
|
|
405
|
+
exports.createLucideIcon = createLucideIcon;
|
|
406
|
+
exports.filterByPermissions = filterByPermissions;
|
|
407
|
+
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
408
|
+
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
409
|
+
//# sourceMappingURL=ConfigureView-CIHmB-58.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigureView-CIHmB-58.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":["createContext","useContext","forwardRef","createElement","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;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CAAA;AAChBoE,MAAAA,SAAS,EAAC,iIAAiI;AAC3IF,MAAAA,OAAO,EAAEoC;KAAa,EAAAtG,aAAA,CAAA,EAAA,EACbkI,UAAI,CAAC,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAAExB,UAAU,CAAC,CAAA,CAAA,EAAA,EAAA,EAAA;MAAApH,QAAA,EAAA,cAEzDY,cAAA,CAACiI,KAAI,EAAA;AACH/D,QAAAA,SAAS,EAAC,gCAAgC;AAC1C,QAAA,aAAA,EAAA,EAAA,CAAA1B,MAAA,CAAgB0F,iBAAS,CAACjE,KAAK,CAAC,EAAA,iBAAA,CAAkB;AAClDD,QAAAA,OAAO,EAAEyC;OACV,CAAC,eACFzG,cAAA,CAAA,MAAA,EAAA;AAAMkE,QAAAA,SAAS,EAAC,4BAA4B;AAAA9E,QAAAA,QAAA,EAAC;OAAO,CAAC,eACrDY,cAAA,CAAA,MAAA,EAAA;AAAAZ,QAAAA,QAAA,EAAO6E;AAAK,OAAO,CAAC;AAAA,KAAA,CACH,CAAC,eACpBjE,cAAA,CAACmI,8BAAmB,EAAA;AAAA/I,MAAAA,QAAA,EAAE+G,KAAK,IAAIU,WAAW,CAACV,KAAK;AAAC,KAAsB,CAAC;AAAA,GAC5D,CAAC;AAEnB;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -964,7 +964,7 @@ var WorkspaceMenu = function WorkspaceMenu() {
|
|
|
964
964
|
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; }
|
|
965
965
|
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; }
|
|
966
966
|
var ProfileMenu = function ProfileMenu(_ref) {
|
|
967
|
-
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4;
|
|
967
|
+
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
|
|
968
968
|
var profileInfo = _ref.profileInfo,
|
|
969
969
|
showProductSwitcher = _ref.showProductSwitcher,
|
|
970
970
|
defaultLinks = _ref.defaultLinks,
|
|
@@ -985,7 +985,22 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
985
985
|
t = _useTranslation.t;
|
|
986
986
|
var normalizedPlan = (((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) || "").toLowerCase();
|
|
987
987
|
var isFreePlan = normalizedPlan === "free";
|
|
988
|
-
var
|
|
988
|
+
var isOwner = (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.isOwner;
|
|
989
|
+
var showUpgradeModal = isFreePlan && enableSubscriptionUpgradeRequest && !isOwner;
|
|
990
|
+
var getSubscriptionPlanAction = function getSubscriptionPlanAction() {
|
|
991
|
+
if (showUpgradeModal) return {
|
|
992
|
+
onClick: openUpgradeModal
|
|
993
|
+
};
|
|
994
|
+
if (isFreePlan && isOwner && enableSubscriptionUpgradeRequest) {
|
|
995
|
+
var _globalProps$organiza;
|
|
996
|
+
return {
|
|
997
|
+
href: "".concat((_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.authAppUrl, "/admin/billing/overview")
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
return {
|
|
1001
|
+
href: NEETO_AUTH_BILLING_INFO_URL
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
989
1004
|
var subscriptionPlanLink = _objectSpread$2({
|
|
990
1005
|
label: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
991
1006
|
children: [globalProps.appName, " ", /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -993,7 +1008,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
993
1008
|
"neeto-molecules-subscription-plan-badge--pro": normalizedPlan === "pro",
|
|
994
1009
|
"neeto-molecules-subscription-plan-badge--free": isFreePlan
|
|
995
1010
|
}),
|
|
996
|
-
children: normalizedPlan === "pro" ? neetoCist.humanize((_globalProps$
|
|
1011
|
+
children: normalizedPlan === "pro" ? neetoCist.humanize((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.subscriptionPlan) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
997
1012
|
children: [/*#__PURE__*/jsxRuntime.jsx(Crown, {
|
|
998
1013
|
size: 12
|
|
999
1014
|
}), t("neetoMolecules.sidebar.upgradePlan")]
|
|
@@ -1001,11 +1016,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1001
1016
|
})]
|
|
1002
1017
|
}),
|
|
1003
1018
|
"data-testid": "subscription-plan"
|
|
1004
|
-
},
|
|
1005
|
-
onClick: openUpgradeModal
|
|
1006
|
-
} : {
|
|
1007
|
-
href: NEETO_AUTH_BILLING_INFO_URL
|
|
1008
|
-
});
|
|
1019
|
+
}, getSubscriptionPlanAction());
|
|
1009
1020
|
return /*#__PURE__*/jsxRuntime.jsxs(Menu, {
|
|
1010
1021
|
className: "pb-1",
|
|
1011
1022
|
children: [!isConsumer && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -1020,7 +1031,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1020
1031
|
className: "neeto-molecules-floating-action-button__profile-wrapper-custom-content",
|
|
1021
1032
|
children: customContent
|
|
1022
1033
|
})]
|
|
1023
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), ((_globalProps$
|
|
1034
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), ((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.isOwner) && /*#__PURE__*/jsxRuntime.jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), neetoCist.isPresent((_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1024
1035
|
links: [subscriptionPlanLink]
|
|
1025
1036
|
}), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
|
|
1026
1037
|
toggleModal: toggleModal
|
|
@@ -1038,6 +1049,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1038
1049
|
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; }
|
|
1039
1050
|
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; }
|
|
1040
1051
|
var ProfileButton = function ProfileButton(_ref) {
|
|
1052
|
+
var _globalProps$user;
|
|
1041
1053
|
var profileInfoOverrides = _ref.profileInfoOverrides,
|
|
1042
1054
|
showProductSwitcher = _ref.showProductSwitcher,
|
|
1043
1055
|
bottomLinks = _ref.bottomLinks,
|
|
@@ -1168,7 +1180,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1168
1180
|
onClose: function onClose() {
|
|
1169
1181
|
return setIsModalOpen(false);
|
|
1170
1182
|
}
|
|
1171
|
-
}), enableSubscriptionUpgradeRequest && /*#__PURE__*/jsxRuntime.jsx(SubscriptionUpgradeRequestModal, {
|
|
1183
|
+
}), enableSubscriptionUpgradeRequest && !((_globalProps$user = globalProps.user) !== null && _globalProps$user !== void 0 && _globalProps$user.isOwner) && /*#__PURE__*/jsxRuntime.jsx(SubscriptionUpgradeRequestModal, {
|
|
1172
1184
|
isOpen: isUpgradeModalOpen,
|
|
1173
1185
|
onClose: function onClose() {
|
|
1174
1186
|
return setIsUpgradeModalOpen(false);
|