@bigbinary/neeto-molecules 3.16.17 → 3.16.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Chevron-CFpCkNj1.js +260 -0
- package/dist/Chevron-CFpCkNj1.js.map +1 -0
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/ProductEmbed.js +29 -9
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/Sidebar.js +113 -60
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/Chevron-D-gKazxD.js +276 -0
- package/dist/cjs/Chevron-D-gKazxD.js.map +1 -0
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/ProductEmbed.js +28 -8
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/Sidebar.js +112 -59
- package/dist/cjs/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/types/ProductEmbed.d.ts +6 -0
- package/types/Sidebar.d.ts +1 -0
- package/dist/Chevron-DfSoxXBs.js +0 -246
- package/dist/Chevron-DfSoxXBs.js.map +0 -1
- package/dist/cjs/Chevron-DJbXy_CD.js +0 -256
- package/dist/cjs/Chevron-DJbXy_CD.js.map +0 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { handleMetaClick } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
|
+
import { hyphenize } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
6
|
+
import Home from '@bigbinary/neeto-icons/Home';
|
|
7
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
8
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
9
|
+
import { curry, is, includes, __, all, equals, omit } from 'ramda';
|
|
10
|
+
import { NavLink, useHistory } from 'react-router-dom';
|
|
11
|
+
import { Fragment } from 'react';
|
|
12
|
+
import { isNotEmpty, isPresent, hyphenate } from '@bigbinary/neeto-cist';
|
|
13
|
+
import Segments from '@bigbinary/neeto-filters-frontend/Segments';
|
|
14
|
+
import { useNavigationCheckpoints } from '@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint';
|
|
15
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
16
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
17
|
+
import { n } from './inject-css-DmrvuTKK.js';
|
|
18
|
+
|
|
19
|
+
var _excluded$1 = ["checkpointKey", "to", "href", "children"];
|
|
20
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
+
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(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; }
|
|
22
|
+
var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
23
|
+
var checkpointKey = _ref.checkpointKey,
|
|
24
|
+
to = _ref.to,
|
|
25
|
+
href = _ref.href,
|
|
26
|
+
children = _ref.children,
|
|
27
|
+
others = _objectWithoutProperties(_ref, _excluded$1);
|
|
28
|
+
var _useNavigationCheckpo = useNavigationCheckpoints(checkpointKey),
|
|
29
|
+
checkpoint = _useNavigationCheckpo[checkpointKey];
|
|
30
|
+
var LinkElement = href ? "a" : NavLink;
|
|
31
|
+
var linkProps = href ? _objectSpread$2({
|
|
32
|
+
href: href,
|
|
33
|
+
key: href
|
|
34
|
+
}, others) : _objectSpread$2({
|
|
35
|
+
to: checkpoint || to,
|
|
36
|
+
key: to
|
|
37
|
+
}, others);
|
|
38
|
+
return /*#__PURE__*/jsx(LinkElement, _objectSpread$2(_objectSpread$2({}, linkProps), {}, {
|
|
39
|
+
children: children
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var SUB_LINK_TYPES = {
|
|
44
|
+
SYSTEM_VIEW: "system_view",
|
|
45
|
+
SEGMENTS: "segments"
|
|
46
|
+
};
|
|
47
|
+
var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
|
|
48
|
+
var DEFAULT_HOME_PATH = "/";
|
|
49
|
+
var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
|
|
50
|
+
var MIN_SIDEBAR_WIDTH = 12.5 * 16;
|
|
51
|
+
var MAX_SIDEBAR_WIDTH = 20 * 16;
|
|
52
|
+
var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
|
|
53
|
+
|
|
54
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
55
|
+
var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
|
|
56
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
57
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
58
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
59
|
+
return all(function (key) {
|
|
60
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
61
|
+
}, targetSearchKeys) && equals(currentBrowserUrl.pathname, targetUrl.pathname);
|
|
62
|
+
};
|
|
63
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
64
|
+
var _globalProps$user, _globalProps$user2;
|
|
65
|
+
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);
|
|
66
|
+
return "sidebarState-".concat(user);
|
|
67
|
+
};
|
|
68
|
+
var filterByPermissions = curry(function (_ref) {
|
|
69
|
+
var permissions = _ref.permissions;
|
|
70
|
+
if (permissions && isNotEmpty(permissions)) {
|
|
71
|
+
return is(Array, permissions) ? permissions.some(includes(__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
});
|
|
75
|
+
var getActiveConfigurePageLink = function getActiveConfigurePageLink(_ref2) {
|
|
76
|
+
var navLinks = _ref2.navLinks,
|
|
77
|
+
location = _ref2.location;
|
|
78
|
+
return navLinks.find(function (link) {
|
|
79
|
+
var _link$to;
|
|
80
|
+
var _ref3 = ((_link$to = link.to) === null || _link$to === void 0 ? void 0 : _link$to.split("?")) || [],
|
|
81
|
+
_ref4 = _slicedToArray(_ref3, 1),
|
|
82
|
+
linkPathname = _ref4[0];
|
|
83
|
+
return isPresent(link.isConfigureNavLink) && link.isConfigureNavLink && location.pathname.startsWith(linkPathname);
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
var enableDraggingStyles = function enableDraggingStyles() {
|
|
87
|
+
document.body.classList.add("dragging-sidebar");
|
|
88
|
+
document.body.style.cursor = "col-resize";
|
|
89
|
+
document.body.style.userSelect = "none";
|
|
90
|
+
};
|
|
91
|
+
var disableDraggingStyles = function disableDraggingStyles() {
|
|
92
|
+
document.body.classList.remove("dragging-sidebar");
|
|
93
|
+
document.body.style.cursor = "";
|
|
94
|
+
document.body.style.userSelect = "";
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var SubLink = function SubLink(_ref) {
|
|
98
|
+
var to = _ref.to,
|
|
99
|
+
href = _ref.href,
|
|
100
|
+
label = _ref.label,
|
|
101
|
+
_ref$type = _ref.type,
|
|
102
|
+
type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
|
|
103
|
+
count = _ref.count,
|
|
104
|
+
isSectionHeader = _ref.isSectionHeader,
|
|
105
|
+
isCountsLoading = _ref.isCountsLoading,
|
|
106
|
+
dataCy = _ref["data-cy"],
|
|
107
|
+
_ref$entity = _ref.entity,
|
|
108
|
+
entity = _ref$entity === void 0 ? "" : _ref$entity,
|
|
109
|
+
_ref$columns = _ref.columns,
|
|
110
|
+
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
111
|
+
baseUrl = _ref.baseUrl,
|
|
112
|
+
isActive = _ref.isActive;
|
|
113
|
+
if (type === SUB_LINK_TYPES.SEGMENTS) {
|
|
114
|
+
return /*#__PURE__*/jsx(Segments, {
|
|
115
|
+
baseUrl: baseUrl,
|
|
116
|
+
columns: columns,
|
|
117
|
+
entity: entity,
|
|
118
|
+
isIndependent: false
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
var dataCyPrefix = dataCy || hyphenate(label);
|
|
122
|
+
var renderCount = function renderCount(count) {
|
|
123
|
+
return count > 999 ? "999+" : count;
|
|
124
|
+
};
|
|
125
|
+
var isSubLinkActive = function isSubLinkActive() {
|
|
126
|
+
return !isSectionHeader && (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));
|
|
127
|
+
};
|
|
128
|
+
return /*#__PURE__*/jsxs(CheckPointNavLinks, {
|
|
129
|
+
href: href,
|
|
130
|
+
to: to,
|
|
131
|
+
activeClassName: "active",
|
|
132
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
133
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link"),
|
|
134
|
+
isActive: isSubLinkActive,
|
|
135
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
136
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
137
|
+
component: "span",
|
|
138
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
|
|
139
|
+
style: "body2",
|
|
140
|
+
children: label
|
|
141
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
142
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
143
|
+
component: "span",
|
|
144
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-count"),
|
|
145
|
+
style: "body2",
|
|
146
|
+
children: isCountsLoading ? /*#__PURE__*/jsx("div", {
|
|
147
|
+
className: "neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse"
|
|
148
|
+
}) : renderCount(count)
|
|
149
|
+
})]
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
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; }
|
|
154
|
+
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(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; }
|
|
155
|
+
var _Items = function Items(_ref) {
|
|
156
|
+
var items = _ref.items,
|
|
157
|
+
_ref$isSettingsItems = _ref.isSettingsItems,
|
|
158
|
+
isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems,
|
|
159
|
+
isCountsLoading = _ref.isCountsLoading;
|
|
160
|
+
return /*#__PURE__*/jsx("div", {
|
|
161
|
+
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
162
|
+
"data-cy": "sidebar-sub-link-wrapper",
|
|
163
|
+
children: items.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
164
|
+
var _subItem$to;
|
|
165
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
166
|
+
children: [/*#__PURE__*/jsx(SubLink, _objectSpread$1(_objectSpread$1({}, _objectSpread$1(_objectSpread$1({}, subItem), {}, {
|
|
167
|
+
isCountsLoading: isCountsLoading
|
|
168
|
+
})), {}, {
|
|
169
|
+
href: subItem.href,
|
|
170
|
+
isActive: subItem.isActive,
|
|
171
|
+
isSectionHeader: isPresent(subItem.item),
|
|
172
|
+
to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path
|
|
173
|
+
})), isSettingsItems && isPresent(subItem.items) && /*#__PURE__*/jsxs(Fragment$1, {
|
|
174
|
+
children: [/*#__PURE__*/jsx(_Items, {
|
|
175
|
+
isSettingsItems: isSettingsItems,
|
|
176
|
+
items: subItem.items
|
|
177
|
+
}), items.length - 1 !== subIndex && /*#__PURE__*/jsx("hr", {
|
|
178
|
+
className: "neeto-molecules-sidebar__separator neeto-ui-border-gray-200"
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
}, subIndex);
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
var _excluded = ["label", "items", "isConfigureNavLink"];
|
|
187
|
+
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; }
|
|
188
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
189
|
+
var SelectedLink = function SelectedLink(_ref) {
|
|
190
|
+
var _ref$navLink = _ref.navLink,
|
|
191
|
+
navLink = _ref$navLink === void 0 ? {
|
|
192
|
+
label: "",
|
|
193
|
+
items: [],
|
|
194
|
+
isConfigureNavLink: false
|
|
195
|
+
} : _ref$navLink,
|
|
196
|
+
handleGoBack = _ref.handleGoBack,
|
|
197
|
+
isConfigureSidebar = _ref.isConfigureSidebar,
|
|
198
|
+
homePath = _ref.homePath;
|
|
199
|
+
var history = useHistory();
|
|
200
|
+
var label = navLink.label,
|
|
201
|
+
items = navLink.items,
|
|
202
|
+
isConfigureNavLink = navLink.isConfigureNavLink,
|
|
203
|
+
otherProps = _objectWithoutProperties(navLink, _excluded);
|
|
204
|
+
var handleHomeButtonClick = function handleHomeButtonClick(e) {
|
|
205
|
+
e.stopPropagation();
|
|
206
|
+
handleMetaClick(history, homePath, e);
|
|
207
|
+
};
|
|
208
|
+
return /*#__PURE__*/jsxs("div", {
|
|
209
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
210
|
+
"data-cy": "configure-nav-container",
|
|
211
|
+
children: [/*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
212
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200",
|
|
213
|
+
onClick: handleGoBack
|
|
214
|
+
}, _objectSpread({}, omit(["icon"], otherProps))), {}, {
|
|
215
|
+
children: [isConfigureNavLink && /*#__PURE__*/jsxs("span", {
|
|
216
|
+
className: "neeto-molecules-sidebar__link-icon flex items-center pl-3",
|
|
217
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
218
|
+
"data-cy": "".concat(hyphenize(label), "-go-back-button"),
|
|
219
|
+
"data-testid": "".concat(label, "-go-home-button"),
|
|
220
|
+
icon: Home,
|
|
221
|
+
style: "text",
|
|
222
|
+
onClick: handleHomeButtonClick
|
|
223
|
+
}), /*#__PURE__*/jsx("span", {
|
|
224
|
+
className: "px-1 text-xs",
|
|
225
|
+
children: "/"
|
|
226
|
+
})]
|
|
227
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
228
|
+
component: "span",
|
|
229
|
+
style: "body1",
|
|
230
|
+
className: classnames("neeto-molecules-sidebar__link-label", _defineProperty({
|
|
231
|
+
"neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
|
|
232
|
+
}, "pl-4", isConfigureSidebar)),
|
|
233
|
+
children: label
|
|
234
|
+
})]
|
|
235
|
+
})), items && /*#__PURE__*/jsx(_Items, {
|
|
236
|
+
items: items,
|
|
237
|
+
isSettingsItems: true
|
|
238
|
+
})]
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
var css = ":root{--neeto-molecules-sidebar-width:15rem;--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-engage-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:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;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 .neeto-molecules-sidebar{left:0;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:.5rem;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-15rem;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){height:calc(100vh - 7.75rem)!important;overflow-y:auto}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode)::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode)::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:3.125rem}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode)::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:3.125rem}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;position:absolute!important;right:.5rem;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:12.625rem;left:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:.5rem 0 2rem;padding:0 1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding:.75rem 1.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.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{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:left}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));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-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.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-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:.25rem 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-bottom:0;padding:.5rem 1.5rem .5rem 3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));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-black));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-accent-800));font-weight:500;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:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-bottom:.25rem}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-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:.25rem 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:2.5rem;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:.5rem}.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:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);margin-bottom:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!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:3.625rem}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:.25rem 1.5rem .25rem 3.625rem}.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:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);margin-bottom:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin:0 0 .625rem!important;min-height:0;overflow-y:auto;padding:0 0 .625rem!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding:.75rem .25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0;padding-bottom:.625rem;padding-top:.625rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-left:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding:.5rem .75rem .5rem 1.5rem;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-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;justify-content:center;min-width:1rem;padding-left:.25rem;padding-right:.25rem;position:absolute;right:-4px;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-bottom:1.5rem;padding:.5rem 1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;position:absolute;right:0;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-300));bottom:0;content:\"\";left:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:1px}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-500));width:3px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:3px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;left:15rem;left:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}";
|
|
243
|
+
n(css,{});
|
|
244
|
+
|
|
245
|
+
var Chevron = function Chevron(_ref) {
|
|
246
|
+
var style = _ref.style;
|
|
247
|
+
return /*#__PURE__*/jsx("svg", {
|
|
248
|
+
style: style,
|
|
249
|
+
height: "16",
|
|
250
|
+
viewBox: "0 0 16 16",
|
|
251
|
+
width: "16",
|
|
252
|
+
children: /*#__PURE__*/jsx("path", {
|
|
253
|
+
d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
|
|
254
|
+
fill: "currentColor"
|
|
255
|
+
})
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export { Chevron as C, DEFAULT_SIDEBAR_WIDTH as D, MIN_SIDEBAR_WIDTH as M, SelectedLink as S, _Items as _, CheckPointNavLinks as a, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as b, SIDEBAR_WIDTH_KEY as c, DEFAULT_HOME_PATH as d, enableDraggingStyles as e, filterByPermissions as f, getSidebarStateLocalStorageKey as g, disableDraggingStyles as h, getActiveConfigurePageLink as i, MAX_SIDEBAR_WIDTH as j };
|
|
260
|
+
//# sourceMappingURL=Chevron-CFpCkNj1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-CFpCkNj1.js","sources":["../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../src/components/Sidebar/constants.js","../src/components/Sidebar/utils.js","../src/components/Sidebar/Components/Links/SubLink.jsx","../src/components/Sidebar/Components/Links/Items.jsx","../src/components/Sidebar/Components/Links/SelectedLink.jsx","../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n\nexport const DEFAULT_HOME_PATH = \"/\";\n\nexport const SIDEBAR_WIDTH_KEY = \"neeto-molecules-sidebar-width\";\nexport const MIN_SIDEBAR_WIDTH = 12.5 * 16;\nexport const MAX_SIDEBAR_WIDTH = 20 * 16;\nexport const DEFAULT_SIDEBAR_WIDTH = 15 * 16;\n","import { isPresent, isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n\nexport const enableDraggingStyles = () => {\n document.body.classList.add(\"dragging-sidebar\");\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n};\n\nexport const disableDraggingStyles = () => {\n document.body.classList.remove(\"dragging-sidebar\");\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n};\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={isSubLinkActive}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import { Fragment } from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n homePath,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, homePath, e);\n };\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-home-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","SIDEBAR_WIDTH_KEY","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","DEFAULT_SIDEBAR_WIDTH","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","enableDraggingStyles","document","body","classList","add","style","cursor","userSelect","disableDraggingStyles","remove","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","homePath","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","onClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA,CAAA;AAET,EAAA,IAAAC,qBAAA,GACEC,wBAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA,CAAA;AAGtB,EAAA,IAAMU,WAAW,GAAGR,IAAI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6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useHistory } from 'react-router-dom';
|
|
8
|
-
import { S as SelectedLink, C as Chevron } from './Chevron-
|
|
8
|
+
import { S as SelectedLink, C as Chevron } from './Chevron-CFpCkNj1.js';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
import '@babel/runtime/helpers/defineProperty';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
package/dist/ProductEmbed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { filterBy, hyphenate, noop } from '@bigbinary/neeto-cist';
|
|
1
|
+
import { isPresent, filterBy, hyphenate, noop } from '@bigbinary/neeto-cist';
|
|
2
2
|
import { useLocation, useHistory } from 'react-router-dom';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -20,6 +20,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
20
20
|
import Delete from '@bigbinary/neeto-icons/Delete';
|
|
21
21
|
import Plus from '@bigbinary/neeto-icons/Plus';
|
|
22
22
|
import Label from '@bigbinary/neetoui/Label';
|
|
23
|
+
import HelpPopover from './HelpPopover.js';
|
|
23
24
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
24
25
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
25
26
|
import Checkbox from '@bigbinary/neetoui/Checkbox';
|
|
@@ -33,9 +34,6 @@ import './index-DAYCJu79.js';
|
|
|
33
34
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
34
35
|
import './Breadcrumbs.js';
|
|
35
36
|
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
36
|
-
import './HelpPopover.js';
|
|
37
|
-
import '@bigbinary/neeto-icons/Help';
|
|
38
|
-
import '@bigbinary/neetoui/Popover';
|
|
39
37
|
import './MoreDropdown.js';
|
|
40
38
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
41
39
|
import '@bigbinary/neeto-icons/MenuVertical';
|
|
@@ -47,6 +45,8 @@ import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
|
47
45
|
import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
48
46
|
import '@bigbinary/neeto-icons/Search';
|
|
49
47
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
48
|
+
import '@bigbinary/neeto-icons/Help';
|
|
49
|
+
import '@bigbinary/neetoui/Popover';
|
|
50
50
|
import 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
51
51
|
import 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
52
52
|
import './CopyToClipboardButton.js';
|
|
@@ -237,7 +237,8 @@ var toCamelCasedString = function toCamelCasedString(string) {
|
|
|
237
237
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
238
238
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
239
239
|
var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
240
|
-
var updateCustomization = _ref.updateCustomization
|
|
240
|
+
var updateCustomization = _ref.updateCustomization,
|
|
241
|
+
queryParamsProps = _ref.queryParamsProps;
|
|
241
242
|
var _useTranslation = useTranslation(),
|
|
242
243
|
t = _useTranslation.t;
|
|
243
244
|
var _useState = useState([INITIAL_QUERY_PARAM]),
|
|
@@ -265,10 +266,15 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
265
266
|
});
|
|
266
267
|
}, [queryParams]);
|
|
267
268
|
return /*#__PURE__*/jsxs("div", {
|
|
268
|
-
children: [/*#__PURE__*/
|
|
269
|
-
className: "mb-2",
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
270
|
+
className: "mb-2 flex",
|
|
271
|
+
children: [/*#__PURE__*/jsx(Label, {
|
|
272
|
+
"data-cy": "dynamic-query-params-label",
|
|
273
|
+
"data-testid": "dynamic-query-params-label",
|
|
274
|
+
children: queryParamsProps.label || t("neetoMolecules.productEmbed.queryParam.label")
|
|
275
|
+
}), isPresent(queryParamsProps.helpPopoverProps) && /*#__PURE__*/jsx(HelpPopover, _objectSpread$3({
|
|
276
|
+
className: "ml-1"
|
|
277
|
+
}, queryParamsProps.helpPopoverProps))]
|
|
272
278
|
}), queryParams.map(function (param, index) {
|
|
273
279
|
return /*#__PURE__*/jsxs("div", {
|
|
274
280
|
className: "mb-2 flex gap-1",
|
|
@@ -315,6 +321,7 @@ var ElementPopup$1 = function ElementPopup(_ref) {
|
|
|
315
321
|
var customization = _ref.customization,
|
|
316
322
|
updateCustomization = _ref.updateCustomization,
|
|
317
323
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
324
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
318
325
|
otherCustomizations = _ref.otherCustomizations;
|
|
319
326
|
var elementSelector = customization.elementSelector;
|
|
320
327
|
var _useTranslation = useTranslation(),
|
|
@@ -342,6 +349,7 @@ var ElementPopup$1 = function ElementPopup(_ref) {
|
|
|
342
349
|
});
|
|
343
350
|
}
|
|
344
351
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsx(DynamicQueryParams, {
|
|
352
|
+
queryParamsProps: queryParamsProps,
|
|
345
353
|
updateCustomization: updateCustomization
|
|
346
354
|
})]
|
|
347
355
|
});
|
|
@@ -351,6 +359,7 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
351
359
|
var customization = _ref.customization,
|
|
352
360
|
updateCustomization = _ref.updateCustomization,
|
|
353
361
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
362
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
354
363
|
otherCustomizations = _ref.otherCustomizations;
|
|
355
364
|
var _useTranslation = useTranslation(),
|
|
356
365
|
t = _useTranslation.t;
|
|
@@ -437,6 +446,7 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
437
446
|
});
|
|
438
447
|
}
|
|
439
448
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsx(DynamicQueryParams, {
|
|
449
|
+
queryParamsProps: queryParamsProps,
|
|
440
450
|
updateCustomization: updateCustomization
|
|
441
451
|
})]
|
|
442
452
|
});
|
|
@@ -446,6 +456,7 @@ var Inline$1 = function Inline(_ref) {
|
|
|
446
456
|
var customization = _ref.customization,
|
|
447
457
|
updateCustomization = _ref.updateCustomization,
|
|
448
458
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
459
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
449
460
|
otherCustomizations = _ref.otherCustomizations;
|
|
450
461
|
var height = customization.height,
|
|
451
462
|
width = customization.width,
|
|
@@ -512,6 +523,7 @@ var Inline$1 = function Inline(_ref) {
|
|
|
512
523
|
}
|
|
513
524
|
})]
|
|
514
525
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsx(DynamicQueryParams, {
|
|
526
|
+
queryParamsProps: queryParamsProps,
|
|
515
527
|
updateCustomization: updateCustomization
|
|
516
528
|
})]
|
|
517
529
|
});
|
|
@@ -1351,6 +1363,7 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
|
|
|
1351
1363
|
customEmbedScriptPath = _ref.customEmbedScriptPath,
|
|
1352
1364
|
customPreviewIframeUrl = _ref.customPreviewIframeUrl,
|
|
1353
1365
|
id = _ref.id,
|
|
1366
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
1354
1367
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
1355
1368
|
options = _ref.options,
|
|
1356
1369
|
extraArgs = _ref.extraArgs,
|
|
@@ -1431,6 +1444,7 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
|
|
|
1431
1444
|
customization: customization,
|
|
1432
1445
|
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
1433
1446
|
otherCustomizations: otherCustomizations,
|
|
1447
|
+
queryParamsProps: queryParamsProps,
|
|
1434
1448
|
updateCustomization: updateCustomization
|
|
1435
1449
|
})]
|
|
1436
1450
|
})
|
|
@@ -1531,6 +1545,11 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
1531
1545
|
id = _ref.id,
|
|
1532
1546
|
_ref$isQueryParamsEna = _ref.isQueryParamsEnabled,
|
|
1533
1547
|
isQueryParamsEnabled = _ref$isQueryParamsEna === void 0 ? false : _ref$isQueryParamsEna,
|
|
1548
|
+
_ref$queryParamsProps = _ref.queryParamsProps,
|
|
1549
|
+
queryParamsProps = _ref$queryParamsProps === void 0 ? {
|
|
1550
|
+
helpPopoverProps: {},
|
|
1551
|
+
label: ""
|
|
1552
|
+
} : _ref$queryParamsProps,
|
|
1534
1553
|
_ref$options = _ref.options,
|
|
1535
1554
|
options = _ref$options === void 0 ? {} : _ref$options,
|
|
1536
1555
|
_ref$extraArgs = _ref.extraArgs,
|
|
@@ -1555,6 +1574,7 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
1555
1574
|
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
1556
1575
|
options: options,
|
|
1557
1576
|
otherCustomizations: otherCustomizations,
|
|
1577
|
+
queryParamsProps: queryParamsProps,
|
|
1558
1578
|
selectedEmbed: selectedEmbed,
|
|
1559
1579
|
supportedLanguages: supportedLanguages
|
|
1560
1580
|
}) : /*#__PURE__*/jsx(EmbedSelector, {
|