@bigbinary/neeto-molecules 4.0.136 → 4.0.138-beta1
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/AuditLogs.js +2 -2
- package/dist/AuditLogs.js.map +1 -1
- package/dist/Chevron-BKcfhjTb.js +276 -0
- package/dist/Chevron-BKcfhjTb.js.map +1 -0
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/NavigationHeader.js +1 -1
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/Schedule.js +1 -1
- package/dist/Schedule.js.map +1 -1
- package/dist/Sidebar.js +2 -2
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/AuditLogs.js +2 -2
- package/dist/cjs/AuditLogs.js.map +1 -1
- package/dist/cjs/Chevron-M6m34ZqO.js +294 -0
- package/dist/cjs/Chevron-M6m34ZqO.js.map +1 -0
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/NavigationHeader.js +1 -1
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/Schedule.js +1 -1
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Sidebar.js +2 -2
- package/dist/cjs/Sidebar.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/ar.json +1 -1
- package/src/translations/bg.json +1 -1
- package/src/translations/ca.json +1 -1
- package/src/translations/cs.json +1 -1
- package/src/translations/de.json +1 -1
- package/src/translations/et.json +2 -2
- package/src/translations/fr.json +1 -1
- package/src/translations/hi.json +2 -2
- package/src/translations/hr.json +2 -2
- package/src/translations/it.json +1 -1
- package/src/translations/ja.json +1 -1
- package/src/translations/nl.json +1 -1
- package/src/translations/pl.json +2 -2
- package/src/translations/ro.json +1 -1
- package/src/translations/ru.json +1 -1
- package/src/translations/sk.json +1 -1
- package/src/translations/sl.json +1 -1
- package/src/translations/th.json +1 -1
- package/src/translations/tr.json +1 -1
- package/src/translations/uk.json +1 -1
- package/dist/Chevron-CvDNGT0i.js +0 -269
- package/dist/Chevron-CvDNGT0i.js.map +0 -1
- package/dist/cjs/Chevron-CLyBYgRO.js +0 -287
- package/dist/cjs/Chevron-CLyBYgRO.js.map +0 -1
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
var classnames = require('classnames');
|
|
6
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
7
|
+
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
8
|
+
var Home = require('@bigbinary/neeto-icons/Home');
|
|
9
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
10
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
11
|
+
var ramda = require('ramda');
|
|
12
|
+
var reactRouterDom = require('react-router-dom');
|
|
13
|
+
var React = require('react');
|
|
14
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
15
|
+
var Segments = require('@bigbinary/neeto-filters-frontend/Segments');
|
|
16
|
+
var Tag = require('@bigbinary/neetoui/Tag');
|
|
17
|
+
var useRegisterNavigationCheckpoint = require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
|
|
18
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
19
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
20
|
+
var injectCss = require('./inject-css-B6qYtOJe.js');
|
|
21
|
+
|
|
22
|
+
var SUB_LINK_TYPES = {
|
|
23
|
+
SYSTEM_VIEW: "system_view",
|
|
24
|
+
SEGMENTS: "segments"
|
|
25
|
+
};
|
|
26
|
+
var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
|
|
27
|
+
var DEFAULT_HOME_PATH = "/admin";
|
|
28
|
+
var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
|
|
29
|
+
var MIN_SIDEBAR_WIDTH = 12.5 * 16;
|
|
30
|
+
var MAX_SIDEBAR_WIDTH = 20 * 16;
|
|
31
|
+
var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
|
|
32
|
+
var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
|
|
33
|
+
var SPECIAL_APP_NAMES = {
|
|
34
|
+
bugwatch: "BugWatch"
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var _excluded$1 = ["checkpointKey", "to", "href", "children"];
|
|
38
|
+
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; }
|
|
39
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
40
|
+
var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
41
|
+
var checkpointKey = _ref.checkpointKey,
|
|
42
|
+
to = _ref.to,
|
|
43
|
+
href = _ref.href,
|
|
44
|
+
children = _ref.children,
|
|
45
|
+
others = _objectWithoutProperties(_ref, _excluded$1);
|
|
46
|
+
var _useNavigationCheckpo = useRegisterNavigationCheckpoint.useNavigationCheckpoints(checkpointKey),
|
|
47
|
+
checkpoint = _useNavigationCheckpo[checkpointKey];
|
|
48
|
+
var LinkElement = href ? "a" : reactRouterDom.NavLink;
|
|
49
|
+
var linkProps = href ? _objectSpread$3({
|
|
50
|
+
href: href,
|
|
51
|
+
key: href
|
|
52
|
+
}, others) : _objectSpread$3({
|
|
53
|
+
to: checkpoint || to,
|
|
54
|
+
key: to
|
|
55
|
+
}, others);
|
|
56
|
+
return /*#__PURE__*/jsxRuntime.jsx(LinkElement, _objectSpread$3(_objectSpread$3({}, linkProps), {}, {
|
|
57
|
+
children: children
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
62
|
+
var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
|
|
63
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
64
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
65
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
66
|
+
return ramda.all(function (key) {
|
|
67
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
68
|
+
}, targetSearchKeys) && ramda.equals(currentBrowserUrl.pathname, targetUrl.pathname);
|
|
69
|
+
};
|
|
70
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
71
|
+
var _globalProps$user, _globalProps$user2;
|
|
72
|
+
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);
|
|
73
|
+
return "sidebarState-".concat(user);
|
|
74
|
+
};
|
|
75
|
+
var filterByPermissions = ramda.curry(function (_ref) {
|
|
76
|
+
var permissions = _ref.permissions;
|
|
77
|
+
if (permissions && neetoCist.isNotEmpty(permissions)) {
|
|
78
|
+
return ramda.is(Array, permissions) ? permissions.some(ramda.includes(ramda.__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
});
|
|
82
|
+
var getActiveConfigurePageLink = function getActiveConfigurePageLink(_ref2) {
|
|
83
|
+
var navLinks = _ref2.navLinks,
|
|
84
|
+
location = _ref2.location;
|
|
85
|
+
return navLinks.find(function (link) {
|
|
86
|
+
var _link$to;
|
|
87
|
+
var _ref3 = ((_link$to = link.to) === null || _link$to === void 0 ? void 0 : _link$to.split("?")) || [],
|
|
88
|
+
_ref4 = _slicedToArray(_ref3, 1),
|
|
89
|
+
linkPathname = _ref4[0];
|
|
90
|
+
return neetoCist.isPresent(link.isConfigureNavLink) && link.isConfigureNavLink && location.pathname.startsWith(linkPathname);
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
var enableDraggingStyles = function enableDraggingStyles() {
|
|
94
|
+
document.body.classList.add("dragging-sidebar");
|
|
95
|
+
document.body.style.cursor = "col-resize";
|
|
96
|
+
document.body.style.userSelect = "none";
|
|
97
|
+
};
|
|
98
|
+
var disableDraggingStyles = function disableDraggingStyles() {
|
|
99
|
+
document.body.classList.remove("dragging-sidebar");
|
|
100
|
+
document.body.style.cursor = "";
|
|
101
|
+
document.body.style.userSelect = "";
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
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; }
|
|
105
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
106
|
+
var SubLink = function SubLink(_ref) {
|
|
107
|
+
var to = _ref.to,
|
|
108
|
+
href = _ref.href,
|
|
109
|
+
onClick = _ref.onClick,
|
|
110
|
+
label = _ref.label,
|
|
111
|
+
_ref$type = _ref.type,
|
|
112
|
+
type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
|
|
113
|
+
count = _ref.count,
|
|
114
|
+
isSectionHeader = _ref.isSectionHeader,
|
|
115
|
+
isCountsLoading = _ref.isCountsLoading,
|
|
116
|
+
isSettingsItems = _ref.isSettingsItems,
|
|
117
|
+
dataTestid = _ref["data-testid"],
|
|
118
|
+
_ref$entity = _ref.entity,
|
|
119
|
+
entity = _ref$entity === void 0 ? "" : _ref$entity,
|
|
120
|
+
_ref$columns = _ref.columns,
|
|
121
|
+
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
122
|
+
baseUrl = _ref.baseUrl,
|
|
123
|
+
isActive = _ref.isActive,
|
|
124
|
+
tag = _ref.tag,
|
|
125
|
+
className = _ref.className;
|
|
126
|
+
if (type === SUB_LINK_TYPES.SEGMENTS) {
|
|
127
|
+
return /*#__PURE__*/jsxRuntime.jsx(Segments, {
|
|
128
|
+
baseUrl: baseUrl,
|
|
129
|
+
columns: columns,
|
|
130
|
+
entity: entity,
|
|
131
|
+
isIndependent: false
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
var dataTestidPrefix = dataTestid || neetoCist.hyphenate(label);
|
|
135
|
+
var renderCount = function renderCount(count) {
|
|
136
|
+
return count > 999 ? "999+" : count;
|
|
137
|
+
};
|
|
138
|
+
var isSubLinkActive = function isSubLinkActive() {
|
|
139
|
+
return !isSectionHeader && (ramda.is(Function, isActive) ? isActive() : isSubRouteActive(to, location));
|
|
140
|
+
};
|
|
141
|
+
return /*#__PURE__*/jsxRuntime.jsxs(CheckPointNavLinks, {
|
|
142
|
+
href: href,
|
|
143
|
+
onClick: onClick,
|
|
144
|
+
to: to,
|
|
145
|
+
activeClassName: "active",
|
|
146
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link"),
|
|
147
|
+
isActive: isSubLinkActive,
|
|
148
|
+
className: classnames("neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none", className, {
|
|
149
|
+
"neeto-molecules-sidebar__sublink--settings-items": isSettingsItems
|
|
150
|
+
}),
|
|
151
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
152
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow flex items-center gap-2",
|
|
153
|
+
component: "span",
|
|
154
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link-label"),
|
|
155
|
+
style: "body2",
|
|
156
|
+
children: [label, tag && /*#__PURE__*/jsxRuntime.jsx(Tag, _objectSpread$2({}, tag))]
|
|
157
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
158
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
159
|
+
component: "span",
|
|
160
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link-count"),
|
|
161
|
+
style: "body2",
|
|
162
|
+
children: isCountsLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
163
|
+
className: "neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse"
|
|
164
|
+
}) : renderCount(count)
|
|
165
|
+
})]
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
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; }
|
|
170
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
171
|
+
var _Items = function Items(_ref) {
|
|
172
|
+
var items = _ref.items,
|
|
173
|
+
_ref$isSettingsItems = _ref.isSettingsItems,
|
|
174
|
+
isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems,
|
|
175
|
+
isCountsLoading = _ref.isCountsLoading;
|
|
176
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
177
|
+
"data-testid": "sidebar-sub-link-wrapper",
|
|
178
|
+
className: classnames("neeto-molecules-sidebar__sublink-wrapper", {
|
|
179
|
+
"neeto-molecules-sidebar__sublink-wrapper--settings-items": isSettingsItems
|
|
180
|
+
}),
|
|
181
|
+
children: items.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
182
|
+
var _subItem$to;
|
|
183
|
+
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
184
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SubLink, _objectSpread$1(_objectSpread$1({}, _objectSpread$1(_objectSpread$1({}, subItem), {}, {
|
|
185
|
+
isCountsLoading: isCountsLoading,
|
|
186
|
+
isSettingsItems: isSettingsItems
|
|
187
|
+
})), {}, {
|
|
188
|
+
href: subItem.href,
|
|
189
|
+
isActive: subItem.isActive,
|
|
190
|
+
isSectionHeader: neetoCist.isPresent(subItem.item),
|
|
191
|
+
to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path,
|
|
192
|
+
className: classnames({
|
|
193
|
+
"neeto-molecules-sidebar__sublink-title": isSettingsItems && neetoCist.isPresent(subItem.items)
|
|
194
|
+
}),
|
|
195
|
+
onClick: subItem.onClick
|
|
196
|
+
})), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/jsxRuntime.jsx(_Items, {
|
|
197
|
+
isSettingsItems: isSettingsItems,
|
|
198
|
+
items: subItem.items
|
|
199
|
+
})]
|
|
200
|
+
}, subIndex);
|
|
201
|
+
})
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
var _excluded = ["label", "items", "isConfigureNavLink"];
|
|
206
|
+
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; }
|
|
207
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
208
|
+
var SelectedLink = function SelectedLink(_ref) {
|
|
209
|
+
var _ref$navLink = _ref.navLink,
|
|
210
|
+
navLink = _ref$navLink === void 0 ? {
|
|
211
|
+
label: "",
|
|
212
|
+
items: [],
|
|
213
|
+
isConfigureNavLink: false
|
|
214
|
+
} : _ref$navLink,
|
|
215
|
+
handleGoBack = _ref.handleGoBack,
|
|
216
|
+
isConfigureSidebar = _ref.isConfigureSidebar;
|
|
217
|
+
var history = reactRouterDom.useHistory();
|
|
218
|
+
var label = navLink.label,
|
|
219
|
+
items = navLink.items,
|
|
220
|
+
isConfigureNavLink = navLink.isConfigureNavLink,
|
|
221
|
+
otherProps = _objectWithoutProperties(navLink, _excluded);
|
|
222
|
+
var handleHomeButtonClick = function handleHomeButtonClick(e) {
|
|
223
|
+
e.stopPropagation();
|
|
224
|
+
reactUtils.handleMetaClick(history, DEFAULT_HOME_PATH, e);
|
|
225
|
+
};
|
|
226
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
227
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
228
|
+
"data-testid": "configure-nav-container",
|
|
229
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
230
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-molecules-sidebar__link--selected neeto-ui-border-b neeto-ui-border-gray-200",
|
|
231
|
+
onClick: handleGoBack
|
|
232
|
+
}, _objectSpread({}, ramda.omit(["icon", "iconProps"], otherProps))), {}, {
|
|
233
|
+
children: [isConfigureNavLink && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
234
|
+
className: "neeto-molecules-sidebar__link-icon flex items-center pl-4",
|
|
235
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
236
|
+
"data-testid": "".concat(general.hyphenize(label), "-go-back-button"),
|
|
237
|
+
icon: function icon() {
|
|
238
|
+
return /*#__PURE__*/jsxRuntime.jsx(Home, {
|
|
239
|
+
size: 20
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
style: "text",
|
|
243
|
+
onClick: handleHomeButtonClick
|
|
244
|
+
})
|
|
245
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
246
|
+
component: "span",
|
|
247
|
+
style: "body2",
|
|
248
|
+
className: classnames("neeto-molecules-sidebar__link-label", _defineProperty({
|
|
249
|
+
"neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
|
|
250
|
+
}, "pl-4", isConfigureSidebar)),
|
|
251
|
+
children: label
|
|
252
|
+
})]
|
|
253
|
+
})), items && /*#__PURE__*/jsxRuntime.jsx(_Items, {
|
|
254
|
+
items: items,
|
|
255
|
+
isSettingsItems: true
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
var css = ":root{--neeto-molecules-sidebar-width:15rem;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998}@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%;inset-inline-start: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{inset-inline-start: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{inset-inline-end:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__sublink-wrapper{padding-block:.25rem;padding-inline:.75rem}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:.5rem;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{inset-inline-start:-15rem;inset-inline-start: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-ui-theme--dark .neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-ui-theme--dark .neeto-molecules-sidebar__configure-page{background-color:rgb(var(--neeto-ui-white))}.neeto-ui-theme--dark .neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-ui-theme--dark .neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-sidebar{background-color:#f9f9f9;height:100vh;height:100dvh;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){display:flex;flex-direction:column;gap:.25rem;height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto;padding-block-end:4rem;padding:.125rem 1rem 0}.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__toggler{color:rgb(var(--neeto-ui-primary-500))!important;inset-inline-end:.5rem;position:absolute!important;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:12.625rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);transition:none}}.neeto-molecules-sidebar__configure-page{background-color:rgb(var(--neeto-ui-white));border-inline-end: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;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{--neeto-ui-text-body2:1rem;margin-block:.5rem 2rem;margin-inline:0;padding-block:0;padding-inline:1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{border-radius:.25rem;color:rgb(var(--neeto-ui-black));gap:.5rem;line-height:1.2;padding-block:.5rem;padding-inline:.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{stroke-width:1.2;vector-effect:non-scaling-stroke;color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-icon--rotate{opacity:1;transform:rotate(90deg)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:start}@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:#eee;color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link--hover-active{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__link.active{background-color:#e5e5e5;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: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{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-block-end:0;margin-inline:0;padding-block:.5rem;padding-inline-end:.5rem;padding-inline-start:2.5rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink--settings-items{padding-block:.375rem;padding-inline-end:1.5rem;padding-inline-start:1.5rem}.neeto-molecules-sidebar__sublink--settings-items:focus,.neeto-molecules-sidebar__sublink--settings-items:focus-visible,.neeto-molecules-sidebar__sublink--settings-items:hover{background-color:#eee!important;border-radius:.25rem!important}.neeto-molecules-sidebar__sublink--settings-items.active,.neeto-molecules-sidebar__sublink--settings-items:active{background-color:#e5e5e5!important;border-radius:.25rem!important;color:rgb(var(--neeto-ui-black))!important}.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__sublink-wrapper{display:flex;flex-direction:column;gap:.125rem;padding-inline:0}.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-title.active{background-color:transparent!important;border-radius:0!important;box-shadow:none!important}.neeto-molecules-sidebar__sublink-wrapper--settings-items{padding-block:.25rem;padding-inline:.75rem}.neeto-molecules-sidebar__footer{margin-block-start: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-block-end:.5rem;margin-inline:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-block-end:.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-start-end-radius:var(--neeto-ui-rounded);border-start-start-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-block-start:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding-block:.25rem;padding-inline: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:start}.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{inset-inline-end:-6px;position:absolute;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);height:calc(100dvh - 1rem);margin-block-end:.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%;inset-inline-start: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-inline-start:3.625rem}.neeto-molecules-sidebar-segment{margin-block-end:0!important;padding-block:.25rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-block-start:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-block-start:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-block-end:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin-block-end:.625rem!important;margin-inline:0!important;min-height:0;overflow-y:auto;padding-block-end:.625rem!important;padding-inline:0!important}.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-block:.75rem;padding-inline:.25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link--selected{background-color:transparent;border-radius:0}.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-block-end:0;padding-block:.625rem;padding-inline:1.5rem}.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-inline-start:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding-block:.5rem;padding-inline-end:.75rem;padding-inline-start: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:#e5e5e5;color:rgb(var(--neeto-ui-black));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;inset-inline-end:-4px;justify-content:center;min-width:1rem;padding-inline:.25rem;position:absolute;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-block-end:1.5rem;padding-block:.5rem;padding-inline:1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;inset-inline-end:0;position:absolute;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-200));bottom:0;content:\"\";inset-inline-start:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.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;inset-inline-start:15rem;inset-inline-start: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}[dir=rtl] .neeto-molecules-sidebar__toggler{transform:scaleX(-1);transition:none}[dir=rtl] .neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scaleX(1)}[dir=rtl] .neeto-molecules-sidebar__link-icon{transform:scaleX(-1)}[dir=rtl] .neeto-molecules-sidebar__link-icon--rotate{transform:scaleX(1) rotate(90deg)}";
|
|
261
|
+
injectCss.n(css,{});
|
|
262
|
+
|
|
263
|
+
var Chevron = function Chevron(_ref) {
|
|
264
|
+
var style = _ref.style;
|
|
265
|
+
return /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
266
|
+
style: style,
|
|
267
|
+
height: "16",
|
|
268
|
+
viewBox: "0 0 16 16",
|
|
269
|
+
width: "16",
|
|
270
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
271
|
+
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",
|
|
272
|
+
fill: "currentColor"
|
|
273
|
+
})
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
exports.CheckPointNavLinks = CheckPointNavLinks;
|
|
278
|
+
exports.Chevron = Chevron;
|
|
279
|
+
exports.DEFAULT_HOME_PATH = DEFAULT_HOME_PATH;
|
|
280
|
+
exports.DEFAULT_SIDEBAR_WIDTH = DEFAULT_SIDEBAR_WIDTH;
|
|
281
|
+
exports.MAX_SIDEBAR_WIDTH = MAX_SIDEBAR_WIDTH;
|
|
282
|
+
exports.MIN_SIDEBAR_WIDTH = MIN_SIDEBAR_WIDTH;
|
|
283
|
+
exports.PINNED_MORE_NAV_LINKS_KEY = PINNED_MORE_NAV_LINKS_KEY;
|
|
284
|
+
exports.SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = SELECTED_NAV_LINK_ROUTE_STORAGE_KEY;
|
|
285
|
+
exports.SIDEBAR_WIDTH_KEY = SIDEBAR_WIDTH_KEY;
|
|
286
|
+
exports.SPECIAL_APP_NAMES = SPECIAL_APP_NAMES;
|
|
287
|
+
exports.SelectedLink = SelectedLink;
|
|
288
|
+
exports._Items = _Items;
|
|
289
|
+
exports.disableDraggingStyles = disableDraggingStyles;
|
|
290
|
+
exports.enableDraggingStyles = enableDraggingStyles;
|
|
291
|
+
exports.filterByPermissions = filterByPermissions;
|
|
292
|
+
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
293
|
+
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
294
|
+
//# sourceMappingURL=Chevron-M6m34ZqO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-M6m34ZqO.js","sources":["../../src/components/Sidebar/constants.js","../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n\nexport const DEFAULT_HOME_PATH = \"/admin\";\n\nexport const SIDEBAR_WIDTH_KEY = \"neeto-molecules-sidebar-width\";\nexport const MIN_SIDEBAR_WIDTH = 12.5 * 16;\nexport const MAX_SIDEBAR_WIDTH = 20 * 16;\nexport const DEFAULT_SIDEBAR_WIDTH = 15 * 16;\n\nexport const PINNED_MORE_NAV_LINKS_KEY = \"pinnedMoreNavLinks\";\n\nexport const SPECIAL_APP_NAMES = { bugwatch: \"BugWatch\" };\n","import { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\n};\n\nexport default CheckPointNavLinks;\n","import { isPresent, isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n\nexport const enableDraggingStyles = () => {\n document.body.classList.add(\"dragging-sidebar\");\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n};\n\nexport const disableDraggingStyles = () => {\n document.body.classList.remove(\"dragging-sidebar\");\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n};\n","import classNames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography, Tag } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n onClick,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n isSettingsItems,\n \"data-testid\": dataTestid,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n tag,\n className,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataTestidPrefix = dataTestid || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, onClick, to }}\n activeClassName=\"active\"\n data-testid={`${dataTestidPrefix}-sub-link`}\n isActive={isSubLinkActive}\n className={classNames(\n \"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\",\n className,\n {\n \"neeto-molecules-sidebar__sublink--settings-items\": isSettingsItems,\n }\n )}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow flex items-center gap-2\"\n component=\"span\"\n data-testid={`${dataTestidPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n {tag && <Tag {...tag} />}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-testid={`${dataTestidPrefix}-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 classNames from \"classnames\";\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n data-testid=\"sidebar-sub-link-wrapper\"\n className={classNames(\"neeto-molecules-sidebar__sublink-wrapper\", {\n \"neeto-molecules-sidebar__sublink-wrapper--settings-items\":\n isSettingsItems,\n })}\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading, isSettingsItems }}\n href={subItem.href}\n isActive={subItem.isActive}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n className={classNames({\n \"neeto-molecules-sidebar__sublink-title\":\n isSettingsItems && isPresent(subItem.items),\n })}\n onClick={subItem.onClick}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { DEFAULT_HOME_PATH } from \"components/Sidebar/constants\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, e);\n };\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-testid=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-molecules-sidebar__link--selected neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\", \"iconProps\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-4\">\n <Button\n data-testid={`${hyphenize(label)}-go-back-button`}\n icon={() => <Home size={20} />}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","SIDEBAR_WIDTH_KEY","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","DEFAULT_SIDEBAR_WIDTH","PINNED_MORE_NAV_LINKS_KEY","SPECIAL_APP_NAMES","bugwatch","CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","enableDraggingStyles","document","body","classList","add","style","cursor","userSelect","disableDraggingStyles","remove","SubLink","onClick","label","_ref$type","type","count","isSectionHeader","isCountsLoading","isSettingsItems","dataTestid","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","tag","className","Segments","isIndependent","dataTestidPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","classNames","Typography","component","Tag","Items","items","_ref$isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Items","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","size","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE;AACZ,CAAC;AAEM,IAAMC,mCAAmC,GAAG;AAE5C,IAAMC,iBAAiB,GAAG;AAE1B,IAAMC,iBAAiB,GAAG;AAC1B,IAAMC,iBAAiB,GAAG,IAAI,GAAG;AACjC,IAAMC,iBAAiB,GAAG,EAAE,GAAG;AAC/B,IAAMC,qBAAqB,GAAG,EAAE,GAAG;AAEnC,IAAMC,yBAAyB,GAAG;AAElC,IAAMC,iBAAiB,GAAG;AAAEC,EAAAA,QAAQ,EAAE;AAAW;;;;;ACbxD,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA;AAET,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA;AAGtB,EAAA,IAAMU,WAAW,GAAGR,IAAI,GAAG,GAAG,GAAGS,sBAAO;AACxC,EAAA,IAAMC,SAAS,GAAGV,IAAI,GAAAW,eAAA,CAAA;AAChBX,IAAAA,IAAI,EA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AAE,CAAC;AAAA,GAC/C,CAAC;AAEV;;;;;AC5DA,IAAMsD,OAAO,GAAG,SAAVA,OAAOA,CAAA3I,IAAA,EAAA;AAAA,EAAA,IAAMwE,KAAK,GAAAxE,IAAA,CAALwE,KAAK;AAAA,EAAA,oBACtBxD,cAAA,CAAA,KAAA,EAAA;AAAWwD,IAAAA,KAAK,EAALA,KAAK;AAAIoE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAA1I,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACE+H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC;KACN;AAAC,GACC,CAAC;AAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,7 +7,7 @@ var Button = require('@bigbinary/neetoui/Button');
|
|
|
7
7
|
var ramda = require('ramda');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var reactRouterDom = require('react-router-dom');
|
|
10
|
-
var Chevron = require('./Chevron-
|
|
10
|
+
var Chevron = require('./Chevron-M6m34ZqO.js');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
require('@babel/runtime/helpers/defineProperty');
|
|
13
13
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -176,7 +176,7 @@ var NavigationLinks = function NavigationLinks(_ref) {
|
|
|
176
176
|
return /*#__PURE__*/jsxRuntime.jsxs(reactRouterDom.NavLink, _objectSpread$1(_objectSpread$1({
|
|
177
177
|
activeClassName: "active",
|
|
178
178
|
"data-testid": "".concat(general.joinHyphenCase(key), "-tab"),
|
|
179
|
-
className: classnames("neeto-molecules-navigation-header__link px-2 capitalize no-underline md:px-0", className, {
|
|
179
|
+
className: classnames("neeto-molecules-navigation-header__link whitespace-nowrap px-2 capitalize no-underline md:px-0", className, {
|
|
180
180
|
disabled: disabled
|
|
181
181
|
}),
|
|
182
182
|
onClick: function onClick(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationHeader.js","sources":["../../src/components/NavigationHeader/constants.jsx","../../src/components/NavigationHeader/LeftBlock.jsx","../../src/components/NavigationHeader/OverflowLinks.jsx","../../src/components/NavigationHeader/Navigation.jsx","../../src/components/NavigationHeader/utils.js","../../src/components/NavigationHeader/RightBlock.jsx","../../src/components/NavigationHeader/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport { Home } from \"neetoicons\";\n\nexport const DEFAULT_HOME_BUTTON_PROPS = {\n tooltip: {\n content: t(\"neetoMolecules.navigationHeader.home\"),\n position: \"bottom\",\n },\n homeUrl: \"/\",\n icon: <Home />,\n};\n","import { isPresent } from \"neetocist\";\nimport { Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeDeepRight } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport Rename from \"components/Rename\";\n\nimport { DEFAULT_HOME_BUTTON_PROPS } from \"./constants\";\n\nconst LeftBlock = ({\n homeButtonProps: customHomeButtonProps,\n homeUrl,\n renameProps,\n children,\n}) => {\n const homeButtonProps = mergeDeepRight(\n DEFAULT_HOME_BUTTON_PROPS,\n customHomeButtonProps\n );\n\n return (\n <div\n className=\"flex items-center gap-1 md:gap-2\"\n data-testid=\"navigation-header-left-block\"\n >\n <Tooltip\n content={homeButtonProps.tooltip.content}\n position={homeButtonProps.tooltip.position}\n touch={[\"hold\", 500]}\n >\n <Link data-testid=\"home-button\" to={homeUrl}>\n <div className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-200 p-1\">\n {homeButtonProps.icon}\n </div>\n </Link>\n </Tooltip>\n {isPresent(renameProps) && (\n <Rename\n dropdownItems={renameProps.dropdownItems}\n value={renameProps.value}\n {...renameProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nLeftBlock.propTypes = {\n /**\n * Object containing the home button icon and the props to be passed to the tooltip of the home button.\n */\n homeButtonProps: PropTypes.shape({\n tooltip: PropTypes.shape({\n content: PropTypes.string,\n postition: PropTypes.string,\n }),\n icon: PropTypes.node,\n }),\n /**\n * URL to navigate when the home button is clicked.\n */\n homeUrl: PropTypes.string.isRequired,\n /**\n * Props to be passed to the `Rename` component. Please check the `Rename` component props for more details\n */\n renameProps: PropTypes.object,\n /**\n * To render extra content in the block.\n */\n children: PropTypes.node,\n};\n\nexport default LeftBlock;\n","import classNames from \"classnames\";\nimport { existsBy, isNotEmpty } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport { Dropdown } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\nimport { useLocation } from \"react-router-dom\";\n\nconst { Menu, MenuItem } = Dropdown;\n\nconst OverflowLinks = ({ overflowLinks }) => {\n const { pathname } = useLocation();\n const { t } = useTranslation();\n\n const isMoreButtonActive = existsBy({ to: pathname }, overflowLinks);\n\n if (!isNotEmpty(overflowLinks)) {\n return null;\n }\n\n return (\n <Dropdown\n buttonStyle=\"text\"\n label={t(\"neetoMolecules.navigationHeader.more\")}\n position=\"bottom-end\"\n buttonProps={{\n className: classNames(\n \"neeto-molecules-navigation-header__link neeto-molecules-navigation-header__link--more neeto-ui-typography neeto-ui-text-h4 neeto-ui-font-semibold neeto-ui-leading-normal px-2 capitalize no-underline md:px-0\",\n { active: isMoreButtonActive }\n ),\n }}\n >\n <Menu>\n {overflowLinks.map(({ key, to, label, disabled, ...rest }) => {\n const isActive = to === pathname;\n const menuButton = (\n <MenuItem.Button\n {...{ isActive, to }}\n data-testid={`${joinHyphenCase(key)}-more-tab`}\n isDisabled={disabled}\n key={key}\n onClick={e => disabled && e.preventDefault()}\n {...rest}\n >\n {label}\n </MenuItem.Button>\n );\n\n if (\n isActive &&\n rest.moreOptions &&\n isNotEmpty(rest.moreOptions.menuItems)\n ) {\n return (\n <Dropdown\n customTarget={menuButton}\n key={`${key}-nested-dropdown`}\n position=\"right-start\"\n trigger=\"hover\"\n >\n <Menu>\n {rest.moreOptions.menuItems.map(\n ({ key, label, ...itemProps }) => (\n <MenuItem.Button key={key} {...itemProps}>\n {label}\n </MenuItem.Button>\n )\n )}\n </Menu>\n </Dropdown>\n );\n }\n\n return menuButton;\n })}\n </Menu>\n </Dropdown>\n );\n};\n\nOverflowLinks.propTypes = {\n /**\n * Array of overflow links to be displayed in the more dropdown\n */\n overflowLinks: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n to: PropTypes.string,\n label: PropTypes.string,\n disabled: PropTypes.bool,\n moreOptions: PropTypes.shape({\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n isDisabled: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n content: PropTypes.string,\n }),\n })\n ),\n }),\n })\n ),\n};\n\nexport default OverflowLinks;\n","import classNames from \"classnames\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { NavLink } from \"react-router-dom\";\n\nimport MoreDropdown from \"components/MoreDropdown\";\n\nimport OverflowLinks from \"./OverflowLinks\";\n\nconst NavigationLinks = ({ headerLinks, maxVisibleLinks = 5 }) => {\n const visibleLinks = headerLinks.slice(0, maxVisibleLinks);\n const overflowLinks = headerLinks.slice(maxVisibleLinks);\n\n return (\n <div\n className=\"font- flex w-full items-center justify-between gap-4 md:justify-center md:gap-3 lg:gap-6\"\n data-testid=\"navigation-header-navigation-links\"\n >\n {visibleLinks.map(\n ({\n className = \"\",\n key,\n label,\n disabled,\n labelProps,\n moreOptions,\n ...rest\n }) => (\n <NavLink\n activeClassName=\"active\"\n data-testid={`${joinHyphenCase(key)}-tab`}\n key={key}\n className={classNames(\n \"neeto-molecules-navigation-header__link px-2 capitalize no-underline md:px-0\",\n className,\n { disabled }\n )}\n onClick={e => disabled && e.preventDefault()}\n {...rest}\n >\n <Typography\n component=\"span\"\n lineHeight=\"normal\"\n style=\"h4\"\n weight=\"semibold\"\n {...(labelProps || {})}\n >\n {label}\n </Typography>\n {/*\n TODO: In future, render this MoreDropdown only for Active links\n Ref: https://github.com/neetozone/neeto-molecules/issues/2610\n */}\n {moreOptions && <MoreDropdown {...moreOptions} />}\n </NavLink>\n )\n )}\n <OverflowLinks {...{ overflowLinks }} />\n </div>\n );\n};\n\nNavigationLinks.propTypes = {\n /**\n * Links to be rendered in the center of the navigation header. It is an array of objects.\n * Each object should have the properties `key`, `to` and `label`. Other props will be passed on to the `Navlink` component from\n `react-router-dom`.\n */\n headerLinks: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n to: PropTypes.string,\n label: PropTypes.string,\n className: PropTypes.string,\n labelProps: PropTypes.shape({ lineHeight: PropTypes.string }),\n moreOptions: PropTypes.shape({\n isVertical: PropTypes.bool,\n dropdownButtonProps: PropTypes.shape({\n size: PropTypes.string,\n className: PropTypes.string,\n }),\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n isDisabled: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n content: PropTypes.string,\n }),\n })\n ),\n }),\n })\n ),\n /**\n * Maximum number of links to be visible in the navigation header. Remaining links will be shown in a more dropdown.\n */\n maxVisibleLinks: PropTypes.number,\n};\n\nexport default NavigationLinks;\n","export const isAbsoluteUrl = url => /^https?:\\/\\//.test(url);\n","import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport PublishBlock from \"components/PublishBlock\";\n\nimport \"./navigation-header.scss\";\nimport { isAbsoluteUrl } from \"./utils\";\n\nconst RightBlock = ({\n isDraftBlockHidden,\n previewDraftUrl,\n isResetDraftButtonVisible,\n onResetClick,\n isResetting,\n isPublishDisabled,\n isPublishing,\n handlePublish,\n isPublishPreviewDisabled,\n previewPublishedUrl,\n isPublishButtonVisible,\n isResetAlertOpen,\n setIsResetAlertOpen,\n handleReset,\n publishAlertTitle,\n publishAlertDescription,\n publishButtonProps = {},\n}) => {\n const { t } = useTranslation();\n\n const renderDraftButtons = ({ ViewDraftButton, ResetDraftButton }) =>\n !isDraftBlockHidden && (\n <>\n <ViewDraftButton\n {...(isAbsoluteUrl(previewDraftUrl)\n ? { href: previewDraftUrl }\n : { to: previewDraftUrl })}\n />\n {isResetDraftButtonVisible && (\n <ResetDraftButton\n loading={isResetting}\n onClick={() => onResetClick()}\n />\n )}\n </>\n );\n\n const renderPublishButtons = ({ PublishButton, PublishPreviewButton }) => (\n <>\n {isPublishButtonVisible && (\n <PublishButton\n disabled={isPublishDisabled}\n loading={isPublishing}\n onClick={() => handlePublish()}\n {...publishButtonProps}\n />\n )}\n <PublishPreviewButton\n {...(isAbsoluteUrl(previewPublishedUrl)\n ? { href: previewPublishedUrl }\n : { to: previewPublishedUrl })}\n disabled={isPublishPreviewDisabled}\n className={classNames({\n \"standalone-publish-preview-button\": !isPublishButtonVisible,\n })}\n />\n </>\n );\n\n return (\n <>\n <PublishBlock {...{ renderDraftButtons, renderPublishButtons }} />\n <PublishBlock.Alert\n isOpen={isResetAlertOpen}\n isSubmitting={isResetting}\n message={\n publishAlertDescription ||\n t(\"neetoMolecules.navigationHeader.resetDescription\")\n }\n title={\n publishAlertTitle || t(\"neetoMolecules.navigationHeader.resetTitle\")\n }\n onClose={() => setIsResetAlertOpen(false)}\n onSubmit={handleReset}\n />\n </>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * To show/hide the draft block.\n */\n isDraftBlockHidden: PropTypes.bool,\n /**\n * Draft preview URL, when the draft button is clicked user will be redirected to this URL.\n */\n previewDraftUrl: PropTypes.string,\n /**\n * Boolean to control the visibility of reset draft button.\n */\n isResetDraftButtonVisible: PropTypes.bool,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n onResetClick: PropTypes.func,\n /**\n * Setting this to `true` will show a spinner on the reset button. Use when the reset process is in progress.\n */\n isResetting: PropTypes.bool,\n /**\n * To disable the publish button.\n */\n isPublishDisabled: PropTypes.bool,\n /**\n * Setting this to `true` will show a spinner on the publish button. Use when the publish process is in progress.\n */\n isPublishing: PropTypes.bool,\n /**\n * Callback function that will be called when the publish button is clicked.\n */\n handlePublish: PropTypes.func,\n /**\n * To disable the publish preview button.\n */\n isPublishPreviewDisabled: PropTypes.bool,\n /**\n * Publish preview URL, when the preview publish button is clicked user will be redirected to this URL.\n */\n previewPublishedUrl: PropTypes.string,\n /**\n * Boolean to control whether the user have the ability to publish.\n */\n isPublishButtonVisible: PropTypes.bool,\n /**\n * Boolean to control whether the reset alert is open.\n */\n isResetAlertOpen: PropTypes.bool,\n /**\n * Handler to control the `isResetAlert` state variable.\n */\n setIsResetAlertOpen: PropTypes.func,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n handleReset: PropTypes.func,\n /**\n * Description to be shown in the publish alert\n */\n publishAlertDescription: PropTypes.string,\n /**\n * Title of the publish alert\n */\n publishAlertTitle: PropTypes.string,\n /**\n * Props to be passed to the publish button\n */\n publishButtonProps: PropTypes.object,\n};\n\nexport default RightBlock;\n","import { isPresent } from \"neetocist\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport PropTypes from \"prop-types\";\nimport { filter, length } from \"ramda\";\n\nimport LeftBlock from \"./LeftBlock\";\nimport NavigationLinks from \"./Navigation\";\nimport RightBlock from \"./RightBlock\";\n\nconst NavigationHeader = ({\n leftActionBlock,\n navigationLinks,\n rightActionBlock,\n}) => {\n const { isSize } = useBreakpoints();\n const isMobile = isSize(\"mobile\");\n\n const numberOfChildren = length(\n filter(isPresent, [leftActionBlock, navigationLinks, rightActionBlock])\n );\n\n const gridStyle = {\n gridTemplateColumns: isMobile\n ? `repeat(${\n navigationLinks ? numberOfChildren - 1 : numberOfChildren\n }, auto)`\n : `repeat(${numberOfChildren}, 1fr)`,\n };\n\n return (\n <div className=\"w-full\">\n <div\n className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white flex h-16 w-full flex-shrink-0 items-center overflow-x-auto border-b px-2 py-2 md:px-4 lg:px-6\"\n data-testid=\"navigation-header\"\n >\n <div className=\"grid w-full gap-4\" style={gridStyle}>\n {leftActionBlock}\n {!isMobile && navigationLinks}\n {rightActionBlock}\n </div>\n </div>\n {isMobile && (\n <div className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white flex flex-shrink-0 items-center overflow-x-auto border-b px-4 py-2 lg:px-6\">\n {navigationLinks}\n </div>\n )}\n </div>\n );\n};\n\nNavigationHeader.LeftActionBlock = LeftBlock;\nNavigationHeader.NavigationLinks = NavigationLinks;\nNavigationHeader.RightActionBlock = RightBlock;\n\nNavigationHeader.propTypes = {\n /**\n * To specify the content to be rendered in the left side of the `NavigationHeader`.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered at the center of the `NavigationHeader`.\n */\n navigationLinks: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `NavigationHeader`.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default NavigationHeader;\n"],"names":["DEFAULT_HOME_BUTTON_PROPS","tooltip","content","t","position","homeUrl","icon","_jsx","Home","LeftBlock","_ref","customHomeButtonProps","homeButtonProps","renameProps","children","mergeDeepRight","_jsxs","className","Tooltip","touch","Link","to","isPresent","Rename","_objectSpread","dropdownItems","value","Menu","Dropdown","MenuItem","OverflowLinks","overflowLinks","_useLocation","useLocation","pathname","_useTranslation","useTranslation","isMoreButtonActive","existsBy","isNotEmpty","buttonStyle","label","buttonProps","classNames","active","map","_ref2","key","disabled","rest","_objectWithoutProperties","_excluded","isActive","menuButton","_createElement","Button","concat","joinHyphenCase","isDisabled","onClick","e","preventDefault","moreOptions","menuItems","customTarget","trigger","_ref3","itemProps","_excluded2","NavigationLinks","headerLinks","_ref$maxVisibleLinks","maxVisibleLinks","visibleLinks","slice","_ref2$className","labelProps","NavLink","activeClassName","Typography","component","lineHeight","style","weight","MoreDropdown","isAbsoluteUrl","url","test","RightBlock","isDraftBlockHidden","previewDraftUrl","isResetDraftButtonVisible","onResetClick","isResetting","isPublishDisabled","isPublishing","handlePublish","isPublishPreviewDisabled","previewPublishedUrl","isPublishButtonVisible","isResetAlertOpen","setIsResetAlertOpen","handleReset","publishAlertTitle","publishAlertDescription","_ref$publishButtonPro","publishButtonProps","renderDraftButtons","ViewDraftButton","ResetDraftButton","_Fragment","href","loading","renderPublishButtons","PublishButton","PublishPreviewButton","PublishBlock","Alert","isOpen","isSubmitting","message","title","onClose","onSubmit","NavigationHeader","leftActionBlock","navigationLinks","rightActionBlock","_useBreakpoints","useBreakpoints","isSize","isMobile","numberOfChildren","length","filter","gridStyle","gridTemplateColumns","LeftActionBlock","RightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,yBAAyB,GAAG;AACvCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,OAAO,EAAEC,SAAC,CAAC,sCAAsC,CAAC;AAClDC,IAAAA,QAAQ,EAAE;GACX;AACDC,EAAAA,OAAO,EAAE,GAAG;AACZC,EAAAA,IAAI,eAAEC,cAAA,CAACC,IAAI,EAAA,EAAE;AACf,CAAC;;;;ACAD,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJaC,qBAAqB,GAAAD,IAAA,CAAtCE,eAAe;IACfP,OAAO,GAAAK,IAAA,CAAPL,OAAO;IACPQ,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AAER,EAAA,IAAMF,eAAe,GAAGG,oBAAc,CACpCf,yBAAyB,EACzBW,qBACF,CAAC;AAED,EAAA,oBACEK,eAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;AAC5C,IAAA,aAAA,EAAY,8BAA8B;IAAAH,QAAA,EAAA,cAE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jD+G,eAAe,EACf,CAACM,QAAQ,IAAIL,eAAe,EAC5BC,gBAAgB;OACd;AAAC,KACH,CAAC,EACLI,QAAQ,iBACP5H,cAAA,CAAA,KAAA,EAAA;AAAKU,MAAAA,SAAS,EAAC,yJAAyJ;AAAAH,MAAAA,QAAA,EACrKgH;AAAe,KACb,CACN;AAAA,GACE,CAAC;AAEV;AAEAF,gBAAgB,CAACa,eAAe,GAAGhI,SAAS;AAC5CmH,gBAAgB,CAACvD,eAAe,GAAGA,eAAe;AAClDuD,gBAAgB,CAACc,gBAAgB,GAAGlD,UAAU;;;;"}
|
|
1
|
+
{"version":3,"file":"NavigationHeader.js","sources":["../../src/components/NavigationHeader/constants.jsx","../../src/components/NavigationHeader/LeftBlock.jsx","../../src/components/NavigationHeader/OverflowLinks.jsx","../../src/components/NavigationHeader/Navigation.jsx","../../src/components/NavigationHeader/utils.js","../../src/components/NavigationHeader/RightBlock.jsx","../../src/components/NavigationHeader/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport { Home } from \"neetoicons\";\n\nexport const DEFAULT_HOME_BUTTON_PROPS = {\n tooltip: {\n content: t(\"neetoMolecules.navigationHeader.home\"),\n position: \"bottom\",\n },\n homeUrl: \"/\",\n icon: <Home />,\n};\n","import { isPresent } from \"neetocist\";\nimport { Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeDeepRight } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport Rename from \"components/Rename\";\n\nimport { DEFAULT_HOME_BUTTON_PROPS } from \"./constants\";\n\nconst LeftBlock = ({\n homeButtonProps: customHomeButtonProps,\n homeUrl,\n renameProps,\n children,\n}) => {\n const homeButtonProps = mergeDeepRight(\n DEFAULT_HOME_BUTTON_PROPS,\n customHomeButtonProps\n );\n\n return (\n <div\n className=\"flex items-center gap-1 md:gap-2\"\n data-testid=\"navigation-header-left-block\"\n >\n <Tooltip\n content={homeButtonProps.tooltip.content}\n position={homeButtonProps.tooltip.position}\n touch={[\"hold\", 500]}\n >\n <Link data-testid=\"home-button\" to={homeUrl}>\n <div className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-200 p-1\">\n {homeButtonProps.icon}\n </div>\n </Link>\n </Tooltip>\n {isPresent(renameProps) && (\n <Rename\n dropdownItems={renameProps.dropdownItems}\n value={renameProps.value}\n {...renameProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nLeftBlock.propTypes = {\n /**\n * Object containing the home button icon and the props to be passed to the tooltip of the home button.\n */\n homeButtonProps: PropTypes.shape({\n tooltip: PropTypes.shape({\n content: PropTypes.string,\n postition: PropTypes.string,\n }),\n icon: PropTypes.node,\n }),\n /**\n * URL to navigate when the home button is clicked.\n */\n homeUrl: PropTypes.string.isRequired,\n /**\n * Props to be passed to the `Rename` component. Please check the `Rename` component props for more details\n */\n renameProps: PropTypes.object,\n /**\n * To render extra content in the block.\n */\n children: PropTypes.node,\n};\n\nexport default LeftBlock;\n","import classNames from \"classnames\";\nimport { existsBy, isNotEmpty } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport { Dropdown } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\nimport { useLocation } from \"react-router-dom\";\n\nconst { Menu, MenuItem } = Dropdown;\n\nconst OverflowLinks = ({ overflowLinks }) => {\n const { pathname } = useLocation();\n const { t } = useTranslation();\n\n const isMoreButtonActive = existsBy({ to: pathname }, overflowLinks);\n\n if (!isNotEmpty(overflowLinks)) {\n return null;\n }\n\n return (\n <Dropdown\n buttonStyle=\"text\"\n label={t(\"neetoMolecules.navigationHeader.more\")}\n position=\"bottom-end\"\n buttonProps={{\n className: classNames(\n \"neeto-molecules-navigation-header__link neeto-molecules-navigation-header__link--more neeto-ui-typography neeto-ui-text-h4 neeto-ui-font-semibold neeto-ui-leading-normal px-2 capitalize no-underline md:px-0\",\n { active: isMoreButtonActive }\n ),\n }}\n >\n <Menu>\n {overflowLinks.map(({ key, to, label, disabled, ...rest }) => {\n const isActive = to === pathname;\n const menuButton = (\n <MenuItem.Button\n {...{ isActive, to }}\n data-testid={`${joinHyphenCase(key)}-more-tab`}\n isDisabled={disabled}\n key={key}\n onClick={e => disabled && e.preventDefault()}\n {...rest}\n >\n {label}\n </MenuItem.Button>\n );\n\n if (\n isActive &&\n rest.moreOptions &&\n isNotEmpty(rest.moreOptions.menuItems)\n ) {\n return (\n <Dropdown\n customTarget={menuButton}\n key={`${key}-nested-dropdown`}\n position=\"right-start\"\n trigger=\"hover\"\n >\n <Menu>\n {rest.moreOptions.menuItems.map(\n ({ key, label, ...itemProps }) => (\n <MenuItem.Button key={key} {...itemProps}>\n {label}\n </MenuItem.Button>\n )\n )}\n </Menu>\n </Dropdown>\n );\n }\n\n return menuButton;\n })}\n </Menu>\n </Dropdown>\n );\n};\n\nOverflowLinks.propTypes = {\n /**\n * Array of overflow links to be displayed in the more dropdown\n */\n overflowLinks: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n to: PropTypes.string,\n label: PropTypes.string,\n disabled: PropTypes.bool,\n moreOptions: PropTypes.shape({\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n isDisabled: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n content: PropTypes.string,\n }),\n })\n ),\n }),\n })\n ),\n};\n\nexport default OverflowLinks;\n","import classNames from \"classnames\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { NavLink } from \"react-router-dom\";\n\nimport MoreDropdown from \"components/MoreDropdown\";\n\nimport OverflowLinks from \"./OverflowLinks\";\n\nconst NavigationLinks = ({ headerLinks, maxVisibleLinks = 5 }) => {\n const visibleLinks = headerLinks.slice(0, maxVisibleLinks);\n const overflowLinks = headerLinks.slice(maxVisibleLinks);\n\n return (\n <div\n className=\"font- flex w-full items-center justify-between gap-4 md:justify-center md:gap-3 lg:gap-6\"\n data-testid=\"navigation-header-navigation-links\"\n >\n {visibleLinks.map(\n ({\n className = \"\",\n key,\n label,\n disabled,\n labelProps,\n moreOptions,\n ...rest\n }) => (\n <NavLink\n activeClassName=\"active\"\n data-testid={`${joinHyphenCase(key)}-tab`}\n key={key}\n className={classNames(\n \"neeto-molecules-navigation-header__link whitespace-nowrap px-2 capitalize no-underline md:px-0\",\n className,\n { disabled }\n )}\n onClick={e => disabled && e.preventDefault()}\n {...rest}\n >\n <Typography\n component=\"span\"\n lineHeight=\"normal\"\n style=\"h4\"\n weight=\"semibold\"\n {...(labelProps || {})}\n >\n {label}\n </Typography>\n {/*\n TODO: In future, render this MoreDropdown only for Active links\n Ref: https://github.com/neetozone/neeto-molecules/issues/2610\n */}\n {moreOptions && <MoreDropdown {...moreOptions} />}\n </NavLink>\n )\n )}\n <OverflowLinks {...{ overflowLinks }} />\n </div>\n );\n};\n\nNavigationLinks.propTypes = {\n /**\n * Links to be rendered in the center of the navigation header. It is an array of objects.\n * Each object should have the properties `key`, `to` and `label`. Other props will be passed on to the `Navlink` component from\n `react-router-dom`.\n */\n headerLinks: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n to: PropTypes.string,\n label: PropTypes.string,\n className: PropTypes.string,\n labelProps: PropTypes.shape({ lineHeight: PropTypes.string }),\n moreOptions: PropTypes.shape({\n isVertical: PropTypes.bool,\n dropdownButtonProps: PropTypes.shape({\n size: PropTypes.string,\n className: PropTypes.string,\n }),\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n isDisabled: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n content: PropTypes.string,\n }),\n })\n ),\n }),\n })\n ),\n /**\n * Maximum number of links to be visible in the navigation header. Remaining links will be shown in a more dropdown.\n */\n maxVisibleLinks: PropTypes.number,\n};\n\nexport default NavigationLinks;\n","export const isAbsoluteUrl = url => /^https?:\\/\\//.test(url);\n","import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport PublishBlock from \"components/PublishBlock\";\n\nimport \"./navigation-header.scss\";\nimport { isAbsoluteUrl } from \"./utils\";\n\nconst RightBlock = ({\n isDraftBlockHidden,\n previewDraftUrl,\n isResetDraftButtonVisible,\n onResetClick,\n isResetting,\n isPublishDisabled,\n isPublishing,\n handlePublish,\n isPublishPreviewDisabled,\n previewPublishedUrl,\n isPublishButtonVisible,\n isResetAlertOpen,\n setIsResetAlertOpen,\n handleReset,\n publishAlertTitle,\n publishAlertDescription,\n publishButtonProps = {},\n}) => {\n const { t } = useTranslation();\n\n const renderDraftButtons = ({ ViewDraftButton, ResetDraftButton }) =>\n !isDraftBlockHidden && (\n <>\n <ViewDraftButton\n {...(isAbsoluteUrl(previewDraftUrl)\n ? { href: previewDraftUrl }\n : { to: previewDraftUrl })}\n />\n {isResetDraftButtonVisible && (\n <ResetDraftButton\n loading={isResetting}\n onClick={() => onResetClick()}\n />\n )}\n </>\n );\n\n const renderPublishButtons = ({ PublishButton, PublishPreviewButton }) => (\n <>\n {isPublishButtonVisible && (\n <PublishButton\n disabled={isPublishDisabled}\n loading={isPublishing}\n onClick={() => handlePublish()}\n {...publishButtonProps}\n />\n )}\n <PublishPreviewButton\n {...(isAbsoluteUrl(previewPublishedUrl)\n ? { href: previewPublishedUrl }\n : { to: previewPublishedUrl })}\n disabled={isPublishPreviewDisabled}\n className={classNames({\n \"standalone-publish-preview-button\": !isPublishButtonVisible,\n })}\n />\n </>\n );\n\n return (\n <>\n <PublishBlock {...{ renderDraftButtons, renderPublishButtons }} />\n <PublishBlock.Alert\n isOpen={isResetAlertOpen}\n isSubmitting={isResetting}\n message={\n publishAlertDescription ||\n t(\"neetoMolecules.navigationHeader.resetDescription\")\n }\n title={\n publishAlertTitle || t(\"neetoMolecules.navigationHeader.resetTitle\")\n }\n onClose={() => setIsResetAlertOpen(false)}\n onSubmit={handleReset}\n />\n </>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * To show/hide the draft block.\n */\n isDraftBlockHidden: PropTypes.bool,\n /**\n * Draft preview URL, when the draft button is clicked user will be redirected to this URL.\n */\n previewDraftUrl: PropTypes.string,\n /**\n * Boolean to control the visibility of reset draft button.\n */\n isResetDraftButtonVisible: PropTypes.bool,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n onResetClick: PropTypes.func,\n /**\n * Setting this to `true` will show a spinner on the reset button. Use when the reset process is in progress.\n */\n isResetting: PropTypes.bool,\n /**\n * To disable the publish button.\n */\n isPublishDisabled: PropTypes.bool,\n /**\n * Setting this to `true` will show a spinner on the publish button. Use when the publish process is in progress.\n */\n isPublishing: PropTypes.bool,\n /**\n * Callback function that will be called when the publish button is clicked.\n */\n handlePublish: PropTypes.func,\n /**\n * To disable the publish preview button.\n */\n isPublishPreviewDisabled: PropTypes.bool,\n /**\n * Publish preview URL, when the preview publish button is clicked user will be redirected to this URL.\n */\n previewPublishedUrl: PropTypes.string,\n /**\n * Boolean to control whether the user have the ability to publish.\n */\n isPublishButtonVisible: PropTypes.bool,\n /**\n * Boolean to control whether the reset alert is open.\n */\n isResetAlertOpen: PropTypes.bool,\n /**\n * Handler to control the `isResetAlert` state variable.\n */\n setIsResetAlertOpen: PropTypes.func,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n handleReset: PropTypes.func,\n /**\n * Description to be shown in the publish alert\n */\n publishAlertDescription: PropTypes.string,\n /**\n * Title of the publish alert\n */\n publishAlertTitle: PropTypes.string,\n /**\n * Props to be passed to the publish button\n */\n publishButtonProps: PropTypes.object,\n};\n\nexport default RightBlock;\n","import { isPresent } from \"neetocist\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport PropTypes from \"prop-types\";\nimport { filter, length } from \"ramda\";\n\nimport LeftBlock from \"./LeftBlock\";\nimport NavigationLinks from \"./Navigation\";\nimport RightBlock from \"./RightBlock\";\n\nconst NavigationHeader = ({\n leftActionBlock,\n navigationLinks,\n rightActionBlock,\n}) => {\n const { isSize } = useBreakpoints();\n const isMobile = isSize(\"mobile\");\n\n const numberOfChildren = length(\n filter(isPresent, [leftActionBlock, navigationLinks, rightActionBlock])\n );\n\n const gridStyle = {\n gridTemplateColumns: isMobile\n ? `repeat(${\n navigationLinks ? numberOfChildren - 1 : numberOfChildren\n }, auto)`\n : `repeat(${numberOfChildren}, 1fr)`,\n };\n\n return (\n <div className=\"w-full\">\n <div\n className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white flex h-16 w-full flex-shrink-0 items-center overflow-x-auto border-b px-2 py-2 md:px-4 lg:px-6\"\n data-testid=\"navigation-header\"\n >\n <div className=\"grid w-full gap-4\" style={gridStyle}>\n {leftActionBlock}\n {!isMobile && navigationLinks}\n {rightActionBlock}\n </div>\n </div>\n {isMobile && (\n <div className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white flex flex-shrink-0 items-center overflow-x-auto border-b px-4 py-2 lg:px-6\">\n {navigationLinks}\n </div>\n )}\n </div>\n );\n};\n\nNavigationHeader.LeftActionBlock = LeftBlock;\nNavigationHeader.NavigationLinks = NavigationLinks;\nNavigationHeader.RightActionBlock = RightBlock;\n\nNavigationHeader.propTypes = {\n /**\n * To specify the content to be rendered in the left side of the `NavigationHeader`.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered at the center of the `NavigationHeader`.\n */\n navigationLinks: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `NavigationHeader`.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default NavigationHeader;\n"],"names":["DEFAULT_HOME_BUTTON_PROPS","tooltip","content","t","position","homeUrl","icon","_jsx","Home","LeftBlock","_ref","customHomeButtonProps","homeButtonProps","renameProps","children","mergeDeepRight","_jsxs","className","Tooltip","touch","Link","to","isPresent","Rename","_objectSpread","dropdownItems","value","Menu","Dropdown","MenuItem","OverflowLinks","overflowLinks","_useLocation","useLocation","pathname","_useTranslation","useTranslation","isMoreButtonActive","existsBy","isNotEmpty","buttonStyle","label","buttonProps","classNames","active","map","_ref2","key","disabled","rest","_objectWithoutProperties","_excluded","isActive","menuButton","_createElement","Button","concat","joinHyphenCase","isDisabled","onClick","e","preventDefault","moreOptions","menuItems","customTarget","trigger","_ref3","itemProps","_excluded2","NavigationLinks","headerLinks","_ref$maxVisibleLinks","maxVisibleLinks","visibleLinks","slice","_ref2$className","labelProps","NavLink","activeClassName","Typography","component","lineHeight","style","weight","MoreDropdown","isAbsoluteUrl","url","test","RightBlock","isDraftBlockHidden","previewDraftUrl","isResetDraftButtonVisible","onResetClick","isResetting","isPublishDisabled","isPublishing","handlePublish","isPublishPreviewDisabled","previewPublishedUrl","isPublishButtonVisible","isResetAlertOpen","setIsResetAlertOpen","handleReset","publishAlertTitle","publishAlertDescription","_ref$publishButtonPro","publishButtonProps","renderDraftButtons","ViewDraftButton","ResetDraftButton","_Fragment","href","loading","renderPublishButtons","PublishButton","PublishPreviewButton","PublishBlock","Alert","isOpen","isSubmitting","message","title","onClose","onSubmit","NavigationHeader","leftActionBlock","navigationLinks","rightActionBlock","_useBreakpoints","useBreakpoints","isSize","isMobile","numberOfChildren","length","filter","gridStyle","gridTemplateColumns","LeftActionBlock","RightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,yBAAyB,GAAG;AACvCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,OAAO,EAAEC,SAAC,CAAC,sCAAsC,CAAC;AAClDC,IAAAA,QAAQ,EAAE;GACX;AACDC,EAAAA,OAAO,EAAE,GAAG;AACZC,EAAAA,IAAI,eAAEC,cAAA,CAACC,IAAI,EAAA,EAAE;AACf,CAAC;;;;ACAD,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJaC,qBAAqB,GAAAD,IAAA,CA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AAA,oBACEpH,eAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,QAAQ;AAAAH,IAAAA,QAAA,gBACrBP,cAAA,CAAA,KAAA,EAAA;AACEU,MAAAA,SAAS,EAAC,6KAA6K;AACvL,MAAA,aAAA,EAAY,mBAAmB;AAAAH,MAAAA,QAAA,eAE/BE,eAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAC,mBAAmB;AAACiE,QAAAA,KAAK,EAAEqD,SAAU;QAAAzH,QAAA,EAAA,CACjD+G,eAAe,EACf,CAACM,QAAQ,IAAIL,eAAe,EAC5BC,gBAAgB;OACd;AAAC,KACH,CAAC,EACLI,QAAQ,iBACP5H,cAAA,CAAA,KAAA,EAAA;AAAKU,MAAAA,SAAS,EAAC,yJAAyJ;AAAAH,MAAAA,QAAA,EACrKgH;AAAe,KACb,CACN;AAAA,GACE,CAAC;AAEV;AAEAF,gBAAgB,CAACa,eAAe,GAAGhI,SAAS;AAC5CmH,gBAAgB,CAACvD,eAAe,GAAGA,eAAe;AAClDuD,gBAAgB,CAACc,gBAAgB,GAAGlD,UAAU;;;;"}
|
package/dist/cjs/Schedule.js
CHANGED
|
@@ -462,7 +462,7 @@ var formatCreateLabel = ramda.identity;
|
|
|
462
462
|
var isValidTimeSlotOption = function isValidTimeSlotOption(value) {
|
|
463
463
|
// Allow HH:MM AM/PM, H:MM AM/PM, H:MM am/pm, or HH:MM (24h)
|
|
464
464
|
// Accepts 1 or 2 digit hour (1-12) with AM/PM OR 00-23:00-59 for 24h, AM/PM (any case) optional, optional leading zero
|
|
465
|
-
|
|
465
|
+
|
|
466
466
|
var timeRegex = /^(((0?[1-9]|1[0-2]):[0-5]\d ?[AaPp][Mm])|([01]?\d|2[0-3]):[0-5]\d)$/;
|
|
467
467
|
return timeRegex.test(value);
|
|
468
468
|
};
|