@bigbinary/neeto-molecules 1.11.7 → 1.12.0

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,490 @@
1
+ 'use strict';
2
+
3
+ var _extends = require('./extends-1b35a664.js');
4
+ var defineProperty = require('./defineProperty-886ed289.js');
5
+ var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
6
+ var React = require('react');
7
+ var classnames = require('classnames');
8
+ var neetoCist = require('@bigbinary/neeto-cist');
9
+ var neetoIcons = require('@bigbinary/neeto-icons');
10
+ var neetoui = require('@bigbinary/neetoui');
11
+ var reactRouterDom = require('react-router-dom');
12
+ var constants = require('@bigbinary/neeto-commons-frontend/constants');
13
+ var reactI18next = require('react-i18next');
14
+ var useRegisterNavigationCheckpoint = require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
15
+ var slicedToArray = require('./slicedToArray-f320d9e7.js');
16
+ var general = require('@bigbinary/neeto-commons-frontend/utils/general');
17
+ var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
18
+ var reactRouterDom_min = require('react-router-dom/cjs/react-router-dom.min');
19
+ var MoreDropdown = require('./MoreDropdown.js');
20
+ var utils = require('@bigbinary/neeto-commons-frontend/utils');
21
+ var formik = require('@bigbinary/neetoui/formik');
22
+ var i18next = require('i18next');
23
+ var yup = require('yup');
24
+ var ramda = require('ramda');
25
+ var injectCss = require('./inject-css-80a5faa3.js');
26
+
27
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
28
+
29
+ function _interopNamespace(e) {
30
+ if (e && e.__esModule) return e;
31
+ var n = Object.create(null);
32
+ if (e) {
33
+ Object.keys(e).forEach(function (k) {
34
+ if (k !== 'default') {
35
+ var d = Object.getOwnPropertyDescriptor(e, k);
36
+ Object.defineProperty(n, k, d.get ? d : {
37
+ enumerable: true,
38
+ get: function () { return e[k]; }
39
+ });
40
+ }
41
+ });
42
+ }
43
+ n["default"] = e;
44
+ return Object.freeze(n);
45
+ }
46
+
47
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
48
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
49
+ var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
50
+
51
+ var _excluded$1 = ["checkpointKey", "to", "children"];
52
+ var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
53
+ var checkpointKey = _ref.checkpointKey,
54
+ to = _ref.to,
55
+ children = _ref.children,
56
+ others = objectWithoutProperties._objectWithoutProperties(_ref, _excluded$1);
57
+ var _useNavigationCheckpo = useRegisterNavigationCheckpoint.useNavigationCheckpoints(checkpointKey),
58
+ checkpoint = _useNavigationCheckpo[checkpointKey];
59
+ return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends._extends({
60
+ to: checkpoint || to
61
+ }, others), children);
62
+ };
63
+
64
+ var DeleteAlert = function DeleteAlert(_ref) {
65
+ var isOpen = _ref.isOpen,
66
+ onClose = _ref.onClose,
67
+ segment = _ref.segment,
68
+ columns = _ref.columns;
69
+ var _useTranslation = reactI18next.useTranslation(),
70
+ t = _useTranslation.t;
71
+ var history = reactRouterDom.useHistory();
72
+ var _getQueryParams = general.getQueryParams(),
73
+ segmentId = _getQueryParams.segmentId;
74
+ var _useDestroySegment = neetoFiltersFrontend.useDestroySegment(),
75
+ deleteSegment = _useDestroySegment.mutate,
76
+ isDeleting = _useDestroySegment.isLoading;
77
+ var handleClearAll = function handleClearAll() {
78
+ var params = neetoFiltersFrontend.buildUrlFromFilters({
79
+ columns: columns,
80
+ filters: [],
81
+ isClearAll: true
82
+ });
83
+ history.push({
84
+ search: params
85
+ });
86
+ };
87
+ var handleDelete = function handleDelete() {
88
+ segment.id === segmentId && handleClearAll();
89
+ deleteSegment(segment.id, {
90
+ onSuccess: onClose
91
+ });
92
+ };
93
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, {
94
+ isOpen: isOpen,
95
+ onClose: onClose,
96
+ isSubmitting: isDeleting,
97
+ submitButtonLabel: t("neetoMolecules.common.actions.delete"),
98
+ message: /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
99
+ i18nKey: "neetoMolecules.sidebar.segments.deleteAlertMessage",
100
+ values: {
101
+ entity: segment.name
102
+ }
103
+ }),
104
+ title: t("neetoMolecules.common.deleteAlert.title", {
105
+ entity: t("neetoMolecules.sidebar.segments.segment", constants.SINGULAR)
106
+ }),
107
+ onSubmit: handleDelete
108
+ });
109
+ };
110
+
111
+ var RENAME_SEGMENT_FORM_VALIDATION = yup__namespace.object().shape({
112
+ name: yup__namespace.string().trim().required(i18next.t("neetoMolecules.sidebar.segments.validations.nameIsRequired"))
113
+ });
114
+
115
+ 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; }
116
+ 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), !0).forEach(function (r) { defineProperty._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; }
117
+ var Rename = function Rename(_ref) {
118
+ var isOpen = _ref.isOpen,
119
+ setIsOpen = _ref.setIsOpen,
120
+ segment = _ref.segment;
121
+ var _useTranslation = reactI18next.useTranslation(),
122
+ t = _useTranslation.t;
123
+ var _useUpdateSegment = neetoFiltersFrontend.useUpdateSegment(),
124
+ updateSegment = _useUpdateSegment.mutate;
125
+ var inputRef = React.useRef();
126
+ var handleSubmit = function handleSubmit(values, _ref2) {
127
+ var setSubmitting = _ref2.setSubmitting,
128
+ setFieldError = _ref2.setFieldError;
129
+ setSubmitting(true);
130
+ updateSegment({
131
+ id: segment.id,
132
+ payload: _objectSpread$2(_objectSpread$2({}, segment), values),
133
+ showToastr: false
134
+ }, {
135
+ onSuccess: function onSuccess() {
136
+ setIsOpen(false);
137
+ utils.showThumbsUpToastr();
138
+ },
139
+ onSettled: function onSettled() {
140
+ setSubmitting(false);
141
+ },
142
+ onError: function onError(error) {
143
+ var _error$response, _error$response3, _error$response3$data;
144
+ if (((_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== 422) {
145
+ var _error$response2, _error$response2$data;
146
+ var errorMessage = (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.error;
147
+ neetoui.Toastr.error(errorMessage || t("neetoMolecules.common.somethingWentWrong"));
148
+ return;
149
+ }
150
+ setFieldError("name", (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : _error$response3$data.error);
151
+ }
152
+ });
153
+ };
154
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane, {
155
+ isOpen: isOpen,
156
+ initialFocusRef: inputRef,
157
+ onClose: function onClose() {
158
+ return setIsOpen(false);
159
+ }
160
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
161
+ "data-cy": "edit-pane-header",
162
+ style: "h2"
163
+ }, t("neetoMolecules.sidebar.segments.renameTitle"))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
164
+ className: "w-full",
165
+ formikProps: {
166
+ initialValues: {
167
+ name: segment.name
168
+ },
169
+ validateOnChange: true,
170
+ validateOnBlur: true,
171
+ validationSchema: RENAME_SEGMENT_FORM_VALIDATION,
172
+ onSubmit: handleSubmit
173
+ }
174
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
175
+ required: true,
176
+ className: "w-full",
177
+ "data-testid": "segment-name-input-field",
178
+ label: t("neetoMolecules.sidebar.segments.renameFieldLabel"),
179
+ name: "name",
180
+ ref: inputRef
181
+ })), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
182
+ className: "flex items-center space-x-2"
183
+ }, /*#__PURE__*/React__default["default"].createElement(formik.ActionBlock, {
184
+ cancelButtonProps: {
185
+ onClick: function onClick() {
186
+ return setIsOpen(false);
187
+ },
188
+ disabled: false,
189
+ className: "ml-2"
190
+ }
191
+ }))));
192
+ };
193
+
194
+ var Segment = function Segment(_ref) {
195
+ var dataCy = _ref.dataCy,
196
+ segment = _ref.segment,
197
+ label = _ref.label,
198
+ columns = _ref.columns;
199
+ var _useTranslation = reactI18next.useTranslation(),
200
+ t = _useTranslation.t;
201
+ var _useState = React.useState(false),
202
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
203
+ isDeleteAlertOpen = _useState2[0],
204
+ setIsDeleteAlertOpen = _useState2[1];
205
+ var _useState3 = React.useState(false),
206
+ _useState4 = slicedToArray._slicedToArray(_useState3, 2),
207
+ isRenamePaneOpen = _useState4[0],
208
+ setIsRenamePaneOpen = _useState4[1];
209
+ var history = reactRouterDom_min.useHistory();
210
+ var _getQueryParams = general.getQueryParams(),
211
+ segmentId = _getQueryParams.segmentId;
212
+ var handleSelectSegment = function handleSelectSegment() {
213
+ var _segment$filters$;
214
+ history.push({
215
+ search: neetoFiltersFrontend.buildUrlFromSegment({
216
+ columns: columns,
217
+ filters: (_segment$filters$ = segment.filters[0]) === null || _segment$filters$ === void 0 ? void 0 : _segment$filters$.conditions,
218
+ id: segment.id
219
+ })
220
+ });
221
+ };
222
+ var dataCyPrefix = dataCy || neetoCist.hyphenate(label);
223
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("button", {
224
+ "data-cy": "".concat(dataCyPrefix, "-segment-link"),
225
+ className: classnames__default["default"]("neeto-molecules-sidebar-segment neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none mb-0 w-full py-1", {
226
+ active: segmentId === segment.id
227
+ }),
228
+ onClick: handleSelectSegment
229
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
230
+ className: "neeto-molecules-sidebar__link-sub-label neeto-molecules-sidebar-segment__label neeto-ui-flex-grow min-w-0",
231
+ component: "span",
232
+ "data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
233
+ style: "body2"
234
+ }, label), /*#__PURE__*/React__default["default"].createElement(MoreDropdown, {
235
+ dropdownButtonProps: {
236
+ "data-testid": "segment-more-menu-".concat(dataCyPrefix),
237
+ className: "flex-shrink-0",
238
+ size: "small",
239
+ style: "secondary"
240
+ },
241
+ dropdownProps: {
242
+ position: "bottom-end",
243
+ strategy: "fixed",
244
+ autoWidth: true,
245
+ onClick: function onClick(e) {
246
+ e.stopPropagation();
247
+ }
248
+ },
249
+ menuItems: [{
250
+ label: t("neetoMolecules.common.actions.rename"),
251
+ onClick: function onClick(e) {
252
+ setIsRenamePaneOpen(true);
253
+ e.stopPropagation();
254
+ },
255
+ key: "edit-custom-segment-button"
256
+ }, {
257
+ label: t("neetoMolecules.common.actions.delete"),
258
+ onClick: function onClick(e) {
259
+ setIsDeleteAlertOpen(true);
260
+ e.stopPropagation();
261
+ },
262
+ key: "delete-custom-segment-button"
263
+ }]
264
+ })), /*#__PURE__*/React__default["default"].createElement(DeleteAlert, {
265
+ columns: columns,
266
+ segment: segment,
267
+ isOpen: isDeleteAlertOpen,
268
+ onClose: function onClose() {
269
+ return setIsDeleteAlertOpen(false);
270
+ }
271
+ }), /*#__PURE__*/React__default["default"].createElement(Rename, {
272
+ segment: segment,
273
+ isOpen: isRenamePaneOpen,
274
+ setIsOpen: setIsRenamePaneOpen
275
+ }));
276
+ };
277
+
278
+ var shouldShowWhatsNew = function shouldShowWhatsNew() {
279
+ var _window$globalProps, _window$globalProps$u;
280
+ var currentUserEmail = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.email;
281
+ return window.location.hostname === "localhost" || currentUserEmail === "oliver@example.com" || (currentUserEmail === null || currentUserEmail === void 0 ? void 0 : currentUserEmail.endsWith("@bigbinary.com"));
282
+ };
283
+ var MY_PROFILE_URL = "/auth/profile/edit";
284
+ var MY_ORGANIZATION_URL = "/auth/organization/edit";
285
+ var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
286
+ var SUB_LINK_TYPES = {
287
+ SYSTEM_VIEW: "system_view",
288
+ SEGMENT: "segment"
289
+ };
290
+ var DEFAULT_HELP_LINK_PROPS = {
291
+ liveChatProps: {
292
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.liveChat"),
293
+ icon: neetoIcons.ChatEmpty,
294
+ "data-cy": "help-link-live-chat-button",
295
+ onClick: function onClick() {
296
+ var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
297
+ (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
298
+ (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
299
+ }
300
+ },
301
+ helpCenterProps: {
302
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.helpArticles"),
303
+ icon: neetoIcons.Book,
304
+ "data-cy": "help-link-help-center-button",
305
+ href: "https://help.".concat(ramda.toLower(globalProps.appName), ".com/"),
306
+ target: "_blank"
307
+ },
308
+ changelogProps: {
309
+ id: CHANGELOG_WIDGET_TRIGGER_ID,
310
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.whatsNew"),
311
+ icon: neetoIcons.Gift,
312
+ "data-cy": "help-link-changelog-button",
313
+ isVisible: shouldShowWhatsNew
314
+ },
315
+ keyboardShortcutProps: {
316
+ label: i18next.t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
317
+ icon: neetoIcons.Keyboard,
318
+ "data-cy": "help-link-keyboard-shortcut-button"
319
+ }
320
+ };
321
+
322
+ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
323
+ var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
324
+ var targetUrl = new URL(subRoute, window.location.origin);
325
+ if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
326
+ return false;
327
+ }
328
+ var targetSearchParams = targetUrl.searchParams;
329
+ var targetSearchKeys = Array.from(targetSearchParams.keys());
330
+ return ramda.all(function (key) {
331
+ return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
332
+ }, targetSearchKeys) && ramda.equals(currentBrowserUrl.hash, targetUrl.hash);
333
+ };
334
+ var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
335
+ var _globalProps$user, _globalProps$user2;
336
+ 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);
337
+ return "sidebarState-".concat(user);
338
+ };
339
+ var filterByPermissions = ramda.curry(function (_ref) {
340
+ var permissions = _ref.permissions;
341
+ if (permissions) {
342
+ return ramda.is(Array, permissions) ? permissions.some(ramda.includes(ramda.__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
343
+ }
344
+ return true;
345
+ });
346
+
347
+ var SubLink = function SubLink(_ref) {
348
+ var dataCy = _ref.dataCy,
349
+ to = _ref.to,
350
+ label = _ref.label,
351
+ _ref$type = _ref.type,
352
+ type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
353
+ count = _ref.count,
354
+ columns = _ref.columns,
355
+ filters = _ref.filters,
356
+ id = _ref.id,
357
+ isSectionHeader = _ref.isSectionHeader,
358
+ isCountsLoading = _ref.isCountsLoading;
359
+ var segment = {
360
+ id: id,
361
+ name: label,
362
+ filters: filters
363
+ };
364
+ if (type === SUB_LINK_TYPES.SEGMENT) {
365
+ return /*#__PURE__*/React__default["default"].createElement(Segment, {
366
+ columns: columns,
367
+ dataCy: dataCy,
368
+ label: label,
369
+ segment: segment
370
+ });
371
+ }
372
+ var dataCyPrefix = dataCy || neetoCist.hyphenate(label);
373
+ var renderCount = function renderCount(count) {
374
+ return count > 999 ? "999+" : count;
375
+ };
376
+ return /*#__PURE__*/React__default["default"].createElement(CheckPointNavLinks, {
377
+ to: to,
378
+ activeClassName: "active",
379
+ className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
380
+ "data-cy": "".concat(dataCyPrefix, "-sub-link"),
381
+ isActive: function isActive() {
382
+ return !isSectionHeader && isSubRouteActive(to, location);
383
+ }
384
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
385
+ className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
386
+ component: "span",
387
+ "data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
388
+ style: "body2"
389
+ }, label), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
390
+ className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
391
+ component: "span",
392
+ "data-cy": "".concat(dataCyPrefix, "-sub-link-count"),
393
+ style: "body2"
394
+ }, isCountsLoading ? /*#__PURE__*/React__default["default"].createElement("div", {
395
+ className: "neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse"
396
+ }) : renderCount(count)));
397
+ };
398
+
399
+ 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; }
400
+ 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), !0).forEach(function (r) { defineProperty._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; }
401
+ var Items = function Items(_ref) {
402
+ var items = _ref.items,
403
+ _ref$isSettingsItems = _ref.isSettingsItems,
404
+ isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems,
405
+ isCountsLoading = _ref.isCountsLoading,
406
+ columns = _ref.columns,
407
+ dataCy = _ref["data-cy"];
408
+ var _useTranslation = reactI18next.useTranslation(),
409
+ t = _useTranslation.t;
410
+ var firstSegmentIndex = neetoCist._findIndexBy({
411
+ type: SUB_LINK_TYPES.SEGMENT
412
+ }, items);
413
+ return /*#__PURE__*/React__default["default"].createElement("div", {
414
+ className: "neeto-molecules-sidebar__sublink-wrapper",
415
+ "data-cy": "sidebar-sub-link-wrapper"
416
+ }, items.filter(filterByPermissions).map(function (subItem, subIndex) {
417
+ var _subItem$to;
418
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
419
+ key: subIndex
420
+ }, subIndex === firstSegmentIndex && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
421
+ className: "neeto-molecules-sidebar-segments-header neeto-ui-text-transform-capitalize neeto-ui-text-gray-600 py-2 uppercase",
422
+ style: "body3",
423
+ weight: "semibold"
424
+ }, t("neetoMolecules.sidebar.segments.segment", constants.PLURAL)), /*#__PURE__*/React__default["default"].createElement(SubLink, _extends._extends({}, _objectSpread$1(_objectSpread$1({}, subItem), {}, {
425
+ columns: columns,
426
+ dataCy: dataCy,
427
+ isCountsLoading: isCountsLoading
428
+ }), {
429
+ isSectionHeader: neetoCist.isPresent(subItem.item),
430
+ to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path
431
+ })), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/React__default["default"].createElement(Items, {
432
+ isSettingsItems: isSettingsItems,
433
+ items: subItem.items
434
+ }));
435
+ }));
436
+ };
437
+
438
+ var _excluded = ["label", "to", "items", "isConfigureNavLink"];
439
+ 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; }
440
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty._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; }
441
+ var SelectedLink = function SelectedLink(_ref) {
442
+ var navLink = _ref.navLink,
443
+ handleGoBack = _ref.handleGoBack,
444
+ isConfigureSidebar = _ref.isConfigureSidebar;
445
+ var label = navLink.label,
446
+ to = navLink.to,
447
+ items = navLink.items,
448
+ isConfigureNavLink = navLink.isConfigureNavLink,
449
+ otherProps = objectWithoutProperties._objectWithoutProperties(navLink, _excluded);
450
+ var Header = neetoCist.isPresent(to) ? reactRouterDom.NavLink : "div";
451
+ return /*#__PURE__*/React__default["default"].createElement("div", {
452
+ className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
453
+ "data-cy": "configure-nav-container"
454
+ }, /*#__PURE__*/React__default["default"].createElement(Header, _extends._extends({
455
+ activeClassName: "active",
456
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
457
+ isActive: function isActive() {
458
+ return isConfigureNavLink;
459
+ }
460
+ }, _objectSpread({
461
+ to: to
462
+ }, otherProps)), isConfigureNavLink && /*#__PURE__*/React__default["default"].createElement("span", {
463
+ className: "neeto-molecules-sidebar__link-icon",
464
+ "data-testid": "".concat(label, "-go-back-button"),
465
+ onClick: handleGoBack
466
+ }, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Left, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
467
+ component: "span",
468
+ style: "body2",
469
+ weight: "normal",
470
+ className: classnames__default["default"]("neeto-molecules-sidebar__link-label", defineProperty._defineProperty({
471
+ "neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
472
+ }, "pl-6", isConfigureSidebar))
473
+ }, label)), items && /*#__PURE__*/React__default["default"].createElement(Items, {
474
+ items: items,
475
+ isSettingsItems: true
476
+ }));
477
+ };
478
+
479
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper__configure-page{position:relative;transition:all .15s}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar,.neeto-molecules-sidebar__wrapper__configure-page{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;position:fixed;top:0;transition:none}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar__configure-page{max-width:100%;position:static;transition:all .15s;width:100%}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page-header{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__configure-page{height:auto}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-app-switcher-popup-wrapper,.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-app-switcher-popup-wrapper .tippy-content,.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-app-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-app-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-app-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
480
+ injectCss.n(css,{});
481
+
482
+ exports.CheckPointNavLinks = CheckPointNavLinks;
483
+ exports.DEFAULT_HELP_LINK_PROPS = DEFAULT_HELP_LINK_PROPS;
484
+ exports.Items = Items;
485
+ exports.MY_ORGANIZATION_URL = MY_ORGANIZATION_URL;
486
+ exports.MY_PROFILE_URL = MY_PROFILE_URL;
487
+ exports.SelectedLink = SelectedLink;
488
+ exports.filterByPermissions = filterByPermissions;
489
+ exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
490
+ //# sourceMappingURL=sidebar-99f98b4d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-99f98b4d.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/Components/Links/Segments/DeleteAlert.jsx","../../src/components/Sidebar/Components/Links/Segments/constants.js","../../src/components/Sidebar/Components/Links/Segments/Rename.jsx","../../src/components/Sidebar/Components/Links/Segments/Segment.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","import React from \"react\";\n\nimport { SINGULAR } from \"neetocommons/constants\";\nimport { getQueryParams } from \"neetocommons/utils/general\";\nimport { useDestroySegment, buildUrlFromFilters } from \"neetofilters\";\nimport { Alert } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nconst DeleteAlert = ({ isOpen, onClose, segment, columns }) => {\n const { t } = useTranslation();\n const history = useHistory();\n\n const { segmentId } = getQueryParams();\n\n const { mutate: deleteSegment, isLoading: isDeleting } = useDestroySegment();\n\n const handleClearAll = () => {\n const params = buildUrlFromFilters({\n columns,\n filters: [],\n isClearAll: true,\n });\n history.push({ search: params });\n };\n\n const handleDelete = () => {\n segment.id === segmentId && handleClearAll();\n deleteSegment(segment.id, { onSuccess: onClose });\n };\n\n return (\n <Alert\n {...{ isOpen, onClose }}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoMolecules.common.actions.delete\")}\n message={\n <Trans\n i18nKey=\"neetoMolecules.sidebar.segments.deleteAlertMessage\"\n values={{ entity: segment.name }}\n />\n }\n title={t(\"neetoMolecules.common.deleteAlert.title\", {\n entity: t(\"neetoMolecules.sidebar.segments.segment\", SINGULAR),\n })}\n onSubmit={handleDelete}\n />\n );\n};\n\nexport default DeleteAlert;\n","import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const RENAME_SEGMENT_FORM_VALIDATION = yup.object().shape({\n name: yup\n .string()\n .trim()\n .required(t(\"neetoMolecules.sidebar.segments.validations.nameIsRequired\")),\n});\n","import React, { useRef } from \"react\";\n\nimport { showThumbsUpToastr } from \"neetocommons/utils\";\nimport { useUpdateSegment } from \"neetofilters\";\nimport { Pane, Toastr, Typography } from \"neetoui\";\nimport { Form, Input, ActionBlock } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { RENAME_SEGMENT_FORM_VALIDATION } from \"./constants\";\n\nconst Rename = ({ isOpen, setIsOpen, segment }) => {\n const { t } = useTranslation();\n\n const { mutate: updateSegment } = useUpdateSegment();\n\n const inputRef = useRef();\n\n const handleSubmit = (values, { setSubmitting, setFieldError }) => {\n setSubmitting(true);\n updateSegment(\n { id: segment.id, payload: { ...segment, ...values }, showToastr: false },\n {\n onSuccess: () => {\n setIsOpen(false);\n showThumbsUpToastr();\n },\n onSettled: () => {\n setSubmitting(false);\n },\n onError: error => {\n if (error.response?.status !== 422) {\n const errorMessage = error.response?.data?.error;\n Toastr.error(\n errorMessage || t(\"neetoMolecules.common.somethingWentWrong\")\n );\n\n return;\n }\n\n setFieldError(\"name\", error.response?.data?.error);\n },\n }\n );\n };\n\n return (\n <Pane\n {...{ isOpen }}\n initialFocusRef={inputRef}\n onClose={() => setIsOpen(false)}\n >\n <Pane.Header>\n <Typography data-cy=\"edit-pane-header\" style=\"h2\">\n {t(\"neetoMolecules.sidebar.segments.renameTitle\")}\n </Typography>\n </Pane.Header>\n <Form\n className=\"w-full\"\n formikProps={{\n initialValues: { name: segment.name },\n validateOnChange: true,\n validateOnBlur: true,\n validationSchema: RENAME_SEGMENT_FORM_VALIDATION,\n onSubmit: handleSubmit,\n }}\n >\n <Pane.Body>\n <Input\n required\n className=\"w-full\"\n data-testid=\"segment-name-input-field\"\n label={t(\"neetoMolecules.sidebar.segments.renameFieldLabel\")}\n name=\"name\"\n ref={inputRef}\n />\n </Pane.Body>\n <Pane.Footer className=\"flex items-center space-x-2\">\n <ActionBlock\n cancelButtonProps={{\n onClick: () => setIsOpen(false),\n disabled: false,\n className: \"ml-2\",\n }}\n />\n </Pane.Footer>\n </Form>\n </Pane>\n );\n};\n\nexport default Rename;\n","import React, { useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { getQueryParams } from \"neetocommons/utils/general\";\nimport { buildUrlFromSegment } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom/cjs/react-router-dom.min\";\n\nimport MoreDropdown from \"components/MoreDropdown\";\n\nimport DeleteAlert from \"./DeleteAlert\";\nimport Rename from \"./Rename\";\n\nconst Segment = ({ dataCy, segment, label, columns }) => {\n const { t } = useTranslation();\n const [isDeleteAlertOpen, setIsDeleteAlertOpen] = useState(false);\n const [isRenamePaneOpen, setIsRenamePaneOpen] = useState(false);\n\n const history = useHistory();\n\n const { segmentId } = getQueryParams();\n\n const handleSelectSegment = () => {\n history.push({\n search: buildUrlFromSegment({\n columns,\n filters: segment.filters[0]?.conditions,\n id: segment.id,\n }),\n });\n };\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n return (\n <>\n <button\n data-cy={`${dataCyPrefix}-segment-link`}\n className={classNames(\n \"neeto-molecules-sidebar-segment neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none mb-0 w-full py-1\",\n { active: segmentId === segment.id }\n )}\n onClick={handleSelectSegment}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-molecules-sidebar-segment__label neeto-ui-flex-grow min-w-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <MoreDropdown\n dropdownButtonProps={{\n \"data-testid\": `segment-more-menu-${dataCyPrefix}`,\n className: \"flex-shrink-0\",\n size: \"small\",\n style: \"secondary\",\n }}\n dropdownProps={{\n position: \"bottom-end\",\n strategy: \"fixed\",\n autoWidth: true,\n onClick: e => {\n e.stopPropagation();\n },\n }}\n menuItems={[\n {\n label: t(\"neetoMolecules.common.actions.rename\"),\n onClick: e => {\n setIsRenamePaneOpen(true);\n e.stopPropagation();\n },\n key: \"edit-custom-segment-button\",\n },\n {\n label: t(\"neetoMolecules.common.actions.delete\"),\n onClick: e => {\n setIsDeleteAlertOpen(true);\n e.stopPropagation();\n },\n key: \"delete-custom-segment-button\",\n },\n ]}\n />\n </button>\n <DeleteAlert\n {...{ columns, segment }}\n isOpen={isDeleteAlertOpen}\n onClose={() => setIsDeleteAlertOpen(false)}\n />\n <Rename\n {...{ segment }}\n isOpen={isRenamePaneOpen}\n setIsOpen={setIsRenamePaneOpen}\n />\n </>\n );\n};\n\nexport default Segment;\n","import { t } from \"i18next\";\nimport { Book, Keyboard, Gift, ChatEmpty } from \"neetoicons\";\nimport { toLower } from \"ramda\";\n\nconst shouldShowWhatsNew = () => {\n const currentUserEmail = window.globalProps?.user?.email;\n\n return (\n window.location.hostname === \"localhost\" ||\n currentUserEmail === \"oliver@example.com\" ||\n currentUserEmail?.endsWith(\"@bigbinary.com\")\n );\n};\n\nexport const MY_PROFILE_URL = \"/auth/profile/edit\";\nexport const MY_ORGANIZATION_URL = \"/auth/organization/edit\";\nexport const CHANGELOG_WIDGET_TRIGGER_ID = \"neetochangelog-trigger\";\nexport const PRODUCT_LOGO_WIDTH = 40;\nexport const PRODUCT_LOGO_HEIGHT = 40;\n\nexport const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENT: \"segment\",\n};\n\nexport const DEFAULT_HELP_LINK_PROPS = {\n liveChatProps: {\n label: t(\"neetoMolecules.sidebar.helpLinks.liveChat\"),\n icon: ChatEmpty,\n \"data-cy\": \"help-link-live-chat-button\",\n onClick: () => {\n window.NeetoChat?.contextualHelp?.maximizeWidget();\n window.NeetoChat?.contextualHelp?.openWidget();\n },\n },\n helpCenterProps: {\n label: t(\"neetoMolecules.sidebar.helpLinks.helpArticles\"),\n icon: Book,\n \"data-cy\": \"help-link-help-center-button\",\n href: `https://help.${toLower(globalProps.appName)}.com/`,\n target: \"_blank\",\n },\n changelogProps: {\n id: CHANGELOG_WIDGET_TRIGGER_ID,\n label: t(\"neetoMolecules.sidebar.helpLinks.whatsNew\"),\n icon: Gift,\n \"data-cy\": \"help-link-changelog-button\",\n isVisible: shouldShowWhatsNew,\n },\n keyboardShortcutProps: {\n label: t(\"neetoMolecules.sidebar.helpLinks.keyboardShortcuts\"),\n icon: Keyboard,\n \"data-cy\": \"help-link-keyboard-shortcut-button\",\n },\n};\n\nexport const QUERY_CACHE_KEY = \"queryCache\";\nexport const NEETO_APPS_QUERY_KEY = \"neeto-apps-list\";\nexport const NAV_LINK_KEYS_TO_OMIT = [\"Component\", \"component\"];\n","import { __, all, curry, equals, includes, is, repeat } 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 if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {\n return false;\n }\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.hash, targetUrl.hash)\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) {\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 getInitialExpandedState = items => repeat(true, items.length);\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\nimport Segment from \"./Segments/Segment\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n dataCy,\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n columns,\n filters,\n id,\n isSectionHeader,\n isCountsLoading,\n}) => {\n const segment = { id, name: label, filters };\n\n if (type === SUB_LINK_TYPES.SEGMENT) {\n return <Segment {...{ columns, dataCy, label, segment }} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ 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={() => !isSectionHeader && isSubRouteActive(to, location)}\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 React from \"react\";\n\nimport { _findIndexBy, isPresent } from \"neetocist\";\nimport { PLURAL } from \"neetocommons/constants\";\nimport { Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport SubLink from \"./SubLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({\n items,\n isSettingsItems = false,\n isCountsLoading,\n columns,\n \"data-cy\": dataCy,\n}) => {\n const { t } = useTranslation();\n const firstSegmentIndex = _findIndexBy(\n { type: SUB_LINK_TYPES.SEGMENT },\n items\n );\n\n return (\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 <React.Fragment key={subIndex}>\n {subIndex === firstSegmentIndex && (\n <Typography\n className=\"neeto-molecules-sidebar-segments-header neeto-ui-text-transform-capitalize neeto-ui-text-gray-600 py-2 uppercase\"\n style=\"body3\"\n weight=\"semibold\"\n >\n {t(\"neetoMolecules.sidebar.segments.segment\", PLURAL)}\n </Typography>\n )}\n <SubLink\n {...{ ...subItem, columns, dataCy, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </React.Fragment>\n ))}\n </div>\n );\n};\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { NavLink } from \"react-router-dom\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({ navLink, handleGoBack, isConfigureSidebar }) => {\n const { label, to, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const Header = isPresent(to) ? NavLink : \"div\";\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 <Header\n activeClassName=\"active\"\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link\"\n isActive={() => isConfigureNavLink}\n {...{ to, ...otherProps }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-testid={`${label}-go-back-button`}\n onClick={handleGoBack}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </Header>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","DeleteAlert","isOpen","onClose","segment","columns","_useTranslation","useTranslation","t","history","useHistory","_getQueryParams","getQueryParams","segmentId","_useDestroySegment","useDestroySegment","deleteSegment","mutate","isDeleting","isLoading","handleClearAll","params","buildUrlFromFilters","filters","isClearAll","push","search","handleDelete","id","onSuccess","Alert","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","entity","name","title","SINGULAR","onSubmit","RENAME_SEGMENT_FORM_VALIDATION","yup","object","shape","string","trim","required","Rename","setIsOpen","_useUpdateSegment","useUpdateSegment","updateSegment","inputRef","useRef","handleSubmit","_ref2","setSubmitting","setFieldError","payload","_objectSpread","showToastr","showThumbsUpToastr","onSettled","onError","error","_error$response","_error$response3","_error$response3$data","response","status","_error$response2","_error$response2$data","errorMessage","data","Toastr","Pane","initialFocusRef","Header","Typography","style","Form","className","formikProps","initialValues","validateOnChange","validateOnBlur","validationSchema","Body","Input","label","ref","Footer","ActionBlock","cancelButtonProps","onClick","disabled","Segment","dataCy","_useState","useState","_useState2","_slicedToArray","isDeleteAlertOpen","setIsDeleteAlertOpen","_useState3","_useState4","isRenamePaneOpen","setIsRenamePaneOpen","handleSelectSegment","_segment$filters$","buildUrlFromSegment","conditions","dataCyPrefix","hyphenate","Fragment","concat","classNames","active","component","MoreDropdown","dropdownButtonProps","size","dropdownProps","position","strategy","autoWidth","e","stopPropagation","menuItems","key","shouldShowWhatsNew","_window$globalProps","_window$globalProps$u","currentUserEmail","window","globalProps","user","email","location","hostname","endsWith","MY_PROFILE_URL","MY_ORGANIZATION_URL","CHANGELOG_WIDGET_TRIGGER_ID","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENT","DEFAULT_HELP_LINK_PROPS","liveChatProps","icon","ChatEmpty","_window$NeetoChat","_window$NeetoChat$con","_window$NeetoChat2","_window$NeetoChat2$co","NeetoChat","contextualHelp","maximizeWidget","openWidget","helpCenterProps","Book","href","toLower","appName","target","changelogProps","Gift","isVisible","keyboardShortcutProps","Keyboard","isSubRouteActive","subRoute","currentBrowserUrl","URL","pathname","hash","origin","targetUrl","startsWith","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","phoneNumber","filterByPermissions","curry","permissions","is","some","includes","__","SubLink","_ref$type","type","count","isSectionHeader","isCountsLoading","renderCount","activeClassName","isActive","Items","items","_ref$isSettingsItems","isSettingsItems","firstSegmentIndex","_findIndexBy","filter","map","subItem","subIndex","_subItem$to","weight","PLURAL","isPresent","item","path","SelectedLink","navLink","handleGoBack","isConfigureSidebar","isConfigureNavLink","otherProps","Left","_defineProperty"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,gDAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,yBAAA,CAAAC,aAAA,CAACC,sBAAO,EAAAC,iBAAA,CAAA;IAACX,EAAE,EAAEO,UAAU,IAAIP,EAAAA;GAAQE,EAAAA,MAAM,CACtCD,EAAAA,QACM,CAAC,CAAA;AAEd;;ACLA,IAAM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