@bigbinary/neeto-molecules 4.0.87 → 4.0.89
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/BoardView.js +4 -4
- package/dist/BoardView.js.map +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/BrowserPreview.js +1 -1
- package/dist/BrowserSupport.js +5 -0
- package/dist/BrowserSupport.js.map +1 -1
- package/dist/Builder.js +4 -4
- package/dist/Builder.js.map +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/CalendarView.js +2 -2
- package/dist/CalendarView.js.map +1 -1
- package/dist/CardLayout.js +1 -1
- package/dist/CardLayout.js.map +1 -1
- package/dist/Chevron-kr6SNbMJ.js +263 -0
- package/dist/{Chevron-DXA34GCh.js.map → Chevron-kr6SNbMJ.js.map} +1 -1
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/DocumentEditor.js +3 -3
- package/dist/DocumentEditor.js.map +1 -1
- package/dist/DynamicVariables.js +1 -1
- package/dist/EmailPreview.js +1 -1
- package/dist/EmailPreview.js.map +1 -1
- package/dist/Engagements.js +4 -4
- package/dist/Engagements.js.map +1 -1
- package/dist/FileUpload.js +1 -1
- package/dist/FinderModal.js +3 -3
- package/dist/FinderModal.js.map +1 -1
- package/dist/FloatingActionMenu.js +7 -4
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +1 -1
- package/dist/InlineInput.js +1 -1
- package/dist/Insights.js +4 -4
- package/dist/Insights.js.map +1 -1
- package/dist/IpRestriction.js +3 -3
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.js +2 -2
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Metadata.js +3 -3
- package/dist/Metadata.js.map +1 -1
- package/dist/NavigationHeader.js +1 -1
- package/dist/NeetoWidget.js +1 -1
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Onboarding.js +12 -2
- package/dist/Onboarding.js.map +1 -1
- package/dist/OptionFields.js +4 -4
- package/dist/OptionFields.js.map +1 -1
- package/dist/PageLoader.js +1 -1
- package/dist/ProductEmbed.js +5 -5
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +1 -1
- package/dist/PublishYourItem.js +1 -1
- package/dist/PublishYourItem.js.map +1 -1
- package/dist/Rename.js +1 -1
- package/dist/ResponsiveDevicePicker.js +1 -1
- package/dist/Schedule.js +6 -6
- package/dist/Schedule.js.map +1 -1
- package/dist/SendToFields.js +2 -2
- package/dist/SendToFields.js.map +1 -1
- package/dist/SessionEnvironment.js +2 -2
- package/dist/SessionEnvironment.js.map +1 -1
- package/dist/ShareViaLink.js +3 -3
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/SubHeader.js +1 -1
- package/dist/SuffixedInput.js +2 -2
- package/dist/SuffixedInput.js.map +1 -1
- package/dist/Taxonomy.js +3 -3
- package/dist/Taxonomy.js.map +1 -1
- package/dist/VersionHistory.js +2 -2
- package/dist/VersionHistory.js.map +1 -1
- package/dist/cjs/BoardView.js +4 -4
- package/dist/cjs/BoardView.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +1 -1
- package/dist/cjs/BrowserPreview.js +1 -1
- package/dist/cjs/BrowserSupport.js +5 -0
- package/dist/cjs/BrowserSupport.js.map +1 -1
- package/dist/cjs/Builder.js +4 -4
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/ButtonGroup.js +1 -1
- package/dist/cjs/CalendarView.js +2 -2
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/CardLayout.js +1 -1
- package/dist/cjs/CardLayout.js.map +1 -1
- package/dist/cjs/Chevron-7PZUWPKl.js +280 -0
- package/dist/cjs/{Chevron-C5y6R4rr.js.map → Chevron-7PZUWPKl.js.map} +1 -1
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/DocumentEditor.js +3 -3
- package/dist/cjs/DocumentEditor.js.map +1 -1
- package/dist/cjs/DynamicVariables.js +1 -1
- package/dist/cjs/EmailPreview.js +1 -1
- package/dist/cjs/EmailPreview.js.map +1 -1
- package/dist/cjs/Engagements.js +4 -4
- package/dist/cjs/Engagements.js.map +1 -1
- package/dist/cjs/FileUpload.js +1 -1
- package/dist/cjs/FinderModal.js +3 -3
- package/dist/cjs/FinderModal.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +7 -4
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +1 -1
- package/dist/cjs/InlineInput.js +1 -1
- package/dist/cjs/Insights.js +4 -4
- package/dist/cjs/Insights.js.map +1 -1
- package/dist/cjs/IpRestriction.js +3 -3
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/KeyboardShortcuts.js +2 -2
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/MenuBar.js +1 -1
- package/dist/cjs/Metadata.js +3 -3
- package/dist/cjs/Metadata.js.map +1 -1
- package/dist/cjs/NavigationHeader.js +1 -1
- package/dist/cjs/NeetoWidget.js +1 -1
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/Onboarding.js +12 -2
- package/dist/cjs/Onboarding.js.map +1 -1
- package/dist/cjs/OptionFields.js +4 -4
- package/dist/cjs/OptionFields.js.map +1 -1
- package/dist/cjs/PageLoader.js +1 -1
- package/dist/cjs/ProductEmbed.js +5 -5
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +1 -1
- package/dist/cjs/PublishYourItem.js +1 -1
- package/dist/cjs/PublishYourItem.js.map +1 -1
- package/dist/cjs/Rename.js +1 -1
- package/dist/cjs/ResponsiveDevicePicker.js +1 -1
- package/dist/cjs/Schedule.js +6 -6
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/SendToFields.js +2 -2
- package/dist/cjs/SendToFields.js.map +1 -1
- package/dist/cjs/SessionEnvironment.js +2 -2
- package/dist/cjs/SessionEnvironment.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +3 -3
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/dist/cjs/Sidebar.js +1 -1
- package/dist/cjs/SubHeader.js +1 -1
- package/dist/cjs/SuffixedInput.js +2 -2
- package/dist/cjs/SuffixedInput.js.map +1 -1
- package/dist/cjs/Taxonomy.js +3 -3
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/VersionHistory.js +2 -2
- package/dist/cjs/VersionHistory.js.map +1 -1
- package/dist/styles/page-loader.css +1 -1
- package/dist/styles/page-loader.js +1 -1
- package/package.json +2 -1
- package/dist/Chevron-DXA34GCh.js +0 -263
- package/dist/cjs/Chevron-C5y6R4rr.js +0 -280
|
@@ -0,0 +1,280 @@
|
|
|
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 useRegisterNavigationCheckpoint = require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
|
|
17
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
18
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
19
|
+
var injectCss = require('./inject-css-B6qYtOJe.js');
|
|
20
|
+
|
|
21
|
+
var SUB_LINK_TYPES = {
|
|
22
|
+
SYSTEM_VIEW: "system_view",
|
|
23
|
+
SEGMENTS: "segments"
|
|
24
|
+
};
|
|
25
|
+
var SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = "selectedNavLinkRoute";
|
|
26
|
+
var DEFAULT_HOME_PATH = "/admin";
|
|
27
|
+
var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
|
|
28
|
+
var MIN_SIDEBAR_WIDTH = 12.5 * 16;
|
|
29
|
+
var MAX_SIDEBAR_WIDTH = 20 * 16;
|
|
30
|
+
var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
|
|
31
|
+
var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
|
|
32
|
+
|
|
33
|
+
var _excluded$1 = ["checkpointKey", "to", "href", "children"];
|
|
34
|
+
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; }
|
|
35
|
+
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; }
|
|
36
|
+
var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
37
|
+
var checkpointKey = _ref.checkpointKey,
|
|
38
|
+
to = _ref.to,
|
|
39
|
+
href = _ref.href,
|
|
40
|
+
children = _ref.children,
|
|
41
|
+
others = _objectWithoutProperties(_ref, _excluded$1);
|
|
42
|
+
var _useNavigationCheckpo = useRegisterNavigationCheckpoint.useNavigationCheckpoints(checkpointKey),
|
|
43
|
+
checkpoint = _useNavigationCheckpo[checkpointKey];
|
|
44
|
+
var LinkElement = href ? "a" : reactRouterDom.NavLink;
|
|
45
|
+
var linkProps = href ? _objectSpread$2({
|
|
46
|
+
href: href,
|
|
47
|
+
key: href
|
|
48
|
+
}, others) : _objectSpread$2({
|
|
49
|
+
to: checkpoint || to,
|
|
50
|
+
key: to
|
|
51
|
+
}, others);
|
|
52
|
+
return /*#__PURE__*/jsxRuntime.jsx(LinkElement, _objectSpread$2(_objectSpread$2({}, linkProps), {}, {
|
|
53
|
+
children: children
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
58
|
+
var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
|
|
59
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
60
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
61
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
62
|
+
return ramda.all(function (key) {
|
|
63
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
64
|
+
}, targetSearchKeys) && ramda.equals(currentBrowserUrl.pathname, targetUrl.pathname);
|
|
65
|
+
};
|
|
66
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
67
|
+
var _globalProps$user, _globalProps$user2;
|
|
68
|
+
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);
|
|
69
|
+
return "sidebarState-".concat(user);
|
|
70
|
+
};
|
|
71
|
+
var filterByPermissions = ramda.curry(function (_ref) {
|
|
72
|
+
var permissions = _ref.permissions;
|
|
73
|
+
if (permissions && neetoCist.isNotEmpty(permissions)) {
|
|
74
|
+
return ramda.is(Array, permissions) ? permissions.some(ramda.includes(ramda.__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
});
|
|
78
|
+
var getActiveConfigurePageLink = function getActiveConfigurePageLink(_ref2) {
|
|
79
|
+
var navLinks = _ref2.navLinks,
|
|
80
|
+
location = _ref2.location;
|
|
81
|
+
return navLinks.find(function (link) {
|
|
82
|
+
var _link$to;
|
|
83
|
+
var _ref3 = ((_link$to = link.to) === null || _link$to === void 0 ? void 0 : _link$to.split("?")) || [],
|
|
84
|
+
_ref4 = _slicedToArray(_ref3, 1),
|
|
85
|
+
linkPathname = _ref4[0];
|
|
86
|
+
return neetoCist.isPresent(link.isConfigureNavLink) && link.isConfigureNavLink && location.pathname.startsWith(linkPathname);
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
var enableDraggingStyles = function enableDraggingStyles() {
|
|
90
|
+
document.body.classList.add("dragging-sidebar");
|
|
91
|
+
document.body.style.cursor = "col-resize";
|
|
92
|
+
document.body.style.userSelect = "none";
|
|
93
|
+
};
|
|
94
|
+
var disableDraggingStyles = function disableDraggingStyles() {
|
|
95
|
+
document.body.classList.remove("dragging-sidebar");
|
|
96
|
+
document.body.style.cursor = "";
|
|
97
|
+
document.body.style.userSelect = "";
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var SubLink = function SubLink(_ref) {
|
|
101
|
+
var to = _ref.to,
|
|
102
|
+
href = _ref.href,
|
|
103
|
+
onClick = _ref.onClick,
|
|
104
|
+
label = _ref.label,
|
|
105
|
+
_ref$type = _ref.type,
|
|
106
|
+
type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
|
|
107
|
+
count = _ref.count,
|
|
108
|
+
isSectionHeader = _ref.isSectionHeader,
|
|
109
|
+
isCountsLoading = _ref.isCountsLoading,
|
|
110
|
+
dataCy = _ref["data-cy"],
|
|
111
|
+
_ref$entity = _ref.entity,
|
|
112
|
+
entity = _ref$entity === void 0 ? "" : _ref$entity,
|
|
113
|
+
_ref$columns = _ref.columns,
|
|
114
|
+
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
115
|
+
baseUrl = _ref.baseUrl,
|
|
116
|
+
isActive = _ref.isActive;
|
|
117
|
+
if (type === SUB_LINK_TYPES.SEGMENTS) {
|
|
118
|
+
return /*#__PURE__*/jsxRuntime.jsx(Segments, {
|
|
119
|
+
baseUrl: baseUrl,
|
|
120
|
+
columns: columns,
|
|
121
|
+
entity: entity,
|
|
122
|
+
isIndependent: false
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
var dataCyPrefix = dataCy || neetoCist.hyphenate(label);
|
|
126
|
+
var renderCount = function renderCount(count) {
|
|
127
|
+
return count > 999 ? "999+" : count;
|
|
128
|
+
};
|
|
129
|
+
var isSubLinkActive = function isSubLinkActive() {
|
|
130
|
+
return !isSectionHeader && (ramda.is(Function, isActive) ? isActive() : isSubRouteActive(to, location));
|
|
131
|
+
};
|
|
132
|
+
return /*#__PURE__*/jsxRuntime.jsxs(CheckPointNavLinks, {
|
|
133
|
+
href: href,
|
|
134
|
+
onClick: onClick,
|
|
135
|
+
to: to,
|
|
136
|
+
activeClassName: "active",
|
|
137
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
138
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link"),
|
|
139
|
+
isActive: isSubLinkActive,
|
|
140
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
141
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
142
|
+
component: "span",
|
|
143
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
|
|
144
|
+
style: "body2",
|
|
145
|
+
children: label
|
|
146
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
147
|
+
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
148
|
+
component: "span",
|
|
149
|
+
"data-cy": "".concat(dataCyPrefix, "-sub-link-count"),
|
|
150
|
+
style: "body2",
|
|
151
|
+
children: isCountsLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
152
|
+
className: "neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse"
|
|
153
|
+
}) : renderCount(count)
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
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; }
|
|
159
|
+
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; }
|
|
160
|
+
var _Items = function Items(_ref) {
|
|
161
|
+
var items = _ref.items,
|
|
162
|
+
_ref$isSettingsItems = _ref.isSettingsItems,
|
|
163
|
+
isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems,
|
|
164
|
+
isCountsLoading = _ref.isCountsLoading;
|
|
165
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
166
|
+
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
167
|
+
"data-cy": "sidebar-sub-link-wrapper",
|
|
168
|
+
children: items.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
169
|
+
var _subItem$to;
|
|
170
|
+
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
171
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SubLink, _objectSpread$1(_objectSpread$1({}, _objectSpread$1(_objectSpread$1({}, subItem), {}, {
|
|
172
|
+
isCountsLoading: isCountsLoading
|
|
173
|
+
})), {}, {
|
|
174
|
+
href: subItem.href,
|
|
175
|
+
isActive: subItem.isActive,
|
|
176
|
+
isSectionHeader: neetoCist.isPresent(subItem.item),
|
|
177
|
+
to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path,
|
|
178
|
+
onClick: subItem.onClick
|
|
179
|
+
})), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
180
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(_Items, {
|
|
181
|
+
isSettingsItems: isSettingsItems,
|
|
182
|
+
items: subItem.items
|
|
183
|
+
}), items.length - 1 !== subIndex && /*#__PURE__*/jsxRuntime.jsx("hr", {
|
|
184
|
+
className: "neeto-molecules-sidebar__separator neeto-ui-border-gray-200"
|
|
185
|
+
})]
|
|
186
|
+
})]
|
|
187
|
+
}, subIndex);
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
var _excluded = ["label", "items", "isConfigureNavLink"];
|
|
193
|
+
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; }
|
|
194
|
+
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; }
|
|
195
|
+
var SelectedLink = function SelectedLink(_ref) {
|
|
196
|
+
var _ref$navLink = _ref.navLink,
|
|
197
|
+
navLink = _ref$navLink === void 0 ? {
|
|
198
|
+
label: "",
|
|
199
|
+
items: [],
|
|
200
|
+
isConfigureNavLink: false
|
|
201
|
+
} : _ref$navLink,
|
|
202
|
+
handleGoBack = _ref.handleGoBack,
|
|
203
|
+
isConfigureSidebar = _ref.isConfigureSidebar;
|
|
204
|
+
var history = reactRouterDom.useHistory();
|
|
205
|
+
var label = navLink.label,
|
|
206
|
+
items = navLink.items,
|
|
207
|
+
isConfigureNavLink = navLink.isConfigureNavLink,
|
|
208
|
+
otherProps = _objectWithoutProperties(navLink, _excluded);
|
|
209
|
+
var handleHomeButtonClick = function handleHomeButtonClick(e) {
|
|
210
|
+
e.stopPropagation();
|
|
211
|
+
reactUtils.handleMetaClick(history, DEFAULT_HOME_PATH, e);
|
|
212
|
+
};
|
|
213
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
214
|
+
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
215
|
+
"data-cy": "configure-nav-container",
|
|
216
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
217
|
+
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",
|
|
218
|
+
onClick: handleGoBack
|
|
219
|
+
}, _objectSpread({}, ramda.omit(["icon"], otherProps))), {}, {
|
|
220
|
+
children: [isConfigureNavLink && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
221
|
+
className: "neeto-molecules-sidebar__link-icon flex items-center pl-3",
|
|
222
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
223
|
+
"data-cy": "".concat(general.hyphenize(label), "-go-back-button"),
|
|
224
|
+
"data-testid": "".concat(label, "-go-home-button"),
|
|
225
|
+
icon: Home,
|
|
226
|
+
style: "text",
|
|
227
|
+
onClick: handleHomeButtonClick
|
|
228
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
229
|
+
className: "px-1 text-xs",
|
|
230
|
+
children: "/"
|
|
231
|
+
})]
|
|
232
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
233
|
+
component: "span",
|
|
234
|
+
style: "body1",
|
|
235
|
+
className: classnames("neeto-molecules-sidebar__link-label", _defineProperty({
|
|
236
|
+
"neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
|
|
237
|
+
}, "pl-4", isConfigureSidebar)),
|
|
238
|
+
children: label
|
|
239
|
+
})]
|
|
240
|
+
})), items && /*#__PURE__*/jsxRuntime.jsx(_Items, {
|
|
241
|
+
items: items,
|
|
242
|
+
isSettingsItems: true
|
|
243
|
+
})]
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
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--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-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));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){height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto;padding-block-end:4rem}.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{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{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{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding-block:.75rem;padding-inline: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--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: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]{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: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: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-block:.25rem;padding-inline:0}.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:1.5rem;padding-inline-start: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-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__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-block:.75rem;padding-inline:.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-block-end:0;padding-block:.625rem;padding-inline:.75rem}.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: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;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)}";
|
|
248
|
+
injectCss.n(css,{});
|
|
249
|
+
|
|
250
|
+
var Chevron = function Chevron(_ref) {
|
|
251
|
+
var style = _ref.style;
|
|
252
|
+
return /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
253
|
+
style: style,
|
|
254
|
+
height: "16",
|
|
255
|
+
viewBox: "0 0 16 16",
|
|
256
|
+
width: "16",
|
|
257
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
258
|
+
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",
|
|
259
|
+
fill: "currentColor"
|
|
260
|
+
})
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
exports.CheckPointNavLinks = CheckPointNavLinks;
|
|
265
|
+
exports.Chevron = Chevron;
|
|
266
|
+
exports.DEFAULT_HOME_PATH = DEFAULT_HOME_PATH;
|
|
267
|
+
exports.DEFAULT_SIDEBAR_WIDTH = DEFAULT_SIDEBAR_WIDTH;
|
|
268
|
+
exports.MAX_SIDEBAR_WIDTH = MAX_SIDEBAR_WIDTH;
|
|
269
|
+
exports.MIN_SIDEBAR_WIDTH = MIN_SIDEBAR_WIDTH;
|
|
270
|
+
exports.PINNED_MORE_NAV_LINKS_KEY = PINNED_MORE_NAV_LINKS_KEY;
|
|
271
|
+
exports.SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = SELECTED_NAV_LINK_ROUTE_STORAGE_KEY;
|
|
272
|
+
exports.SIDEBAR_WIDTH_KEY = SIDEBAR_WIDTH_KEY;
|
|
273
|
+
exports.SelectedLink = SelectedLink;
|
|
274
|
+
exports._Items = _Items;
|
|
275
|
+
exports.disableDraggingStyles = disableDraggingStyles;
|
|
276
|
+
exports.enableDraggingStyles = enableDraggingStyles;
|
|
277
|
+
exports.filterByPermissions = filterByPermissions;
|
|
278
|
+
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
279
|
+
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
280
|
+
//# sourceMappingURL=Chevron-7PZUWPKl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-C5y6R4rr.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","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 { 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 onClick,\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, onClick, 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 onClick={subItem.onClick}\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 { 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-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":["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","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","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","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAO,IAA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AM;AACZM,UAAAA,OAAO,EAAEiD;SACV,CAAC,eACF/G,cAAA,CAAA,MAAA,EAAA;AAAMqF,UAAAA,SAAS,EAAC,cAAc;AAAAjG,UAAAA,QAAA,EAAC;AAAC,SAAM,CAAC;AAAA,OACnC,CACP,eACDY,cAAA,CAACsF,UAAU,EAAA;AACTC,QAAAA,SAAS,EAAC,MAAM;AAChB/B,QAAAA,KAAK,EAAC,OAAO;AACb6B,QAAAA,SAAS,EAAEmC,UAAU,CAAC,qCAAqC,EAAAC,eAAA,CAAA;AACzD,UAAA,gDAAgD,EAC9CxE;AAAkB,SAAA,EACnB,MAAM,EAAG0D,kBAAkB,CAC7B,CAAE;AAAAvH,QAAAA,QAAA,EAEF2E;AAAK,OACI,CAAC;AAAA,KAAA,CACV,CAAC,EACL0B,KAAK,iBAAIzF,cAAA,CAACwF,MAAK,EAAA;AAAOC,MAAAA,KAAK,EAALA,KAAK;MAAIE,eAAe,EAAA;AAAA,KAAE,CAAC;AAAA,GAC/C,CAAC;AAEV;;;;;AC9DA,IAAM+B,OAAO,GAAG,SAAVA,OAAOA,CAAA1I,IAAA,EAAA;AAAA,EAAA,IAAMwE,KAAK,GAAAxE,IAAA,CAALwE,KAAK;AAAA,EAAA,oBACtBxD,cAAA,CAAA,KAAA,EAAA;AAAWwD,IAAAA,KAAK,EAALA,KAAK;AAAImE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAzI,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACE8H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC;KACN;AAAC,GACC,CAAC;AAAA;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Chevron-7PZUWPKl.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","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 { 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 onClick,\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, onClick, 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 onClick={subItem.onClick}\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 { 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-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":["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","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","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","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_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;;;;;ACXzC,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,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BxD,cAAA,CAAA,KAAA,EAAA;AAAWwD,IAAAA,KAAK,EAALA,KAAK;AAAImE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAzI,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACE8H,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-7PZUWPKl.js');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
require('@babel/runtime/helpers/defineProperty');
|
|
13
13
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -37,7 +37,7 @@ var IMAGE_UPLOAD_CONFIG = {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:1024px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:2rem;line-height:1.25}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:.75rem auto}.neeto-molecules-document__wrapper .ProseMirror{flex-grow:1;height:auto;max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-
|
|
40
|
+
var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:1024px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:2rem;line-height:1.25}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:.75rem auto}.neeto-molecules-document__wrapper .ProseMirror{flex-grow:1;height:auto;max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-inline-end:none;border-inline-start:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:.375rem}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:46.875rem;padding-inline-end:0!important;padding-inline-start:0!important}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper button.neeto-editor-fixed-menu__item{flex-shrink:0}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:.75rem 1.5rem 2rem!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:.75rem auto 0;max-width:48rem!important;padding-inline-end:1rem;padding-inline-start:1rem}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:48rem!important;padding-inline-end:1rem;padding-inline-start:1rem}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.neeto-molecules-document__wrapper ins{background-color:#c1f4cb!important;text-decoration:none!important}.neeto-molecules-document__wrapper del{background-color:#faa!important}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image{border-radius:5px;overflow:hidden;padding-bottom:56.25%;position:relative;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image img{height:100%;inset-inline-start:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}@media screen and (max-width:767px){.ne-media-uploader-modal{width:95vw!important}}";
|
|
41
41
|
injectCss.n(css,{});
|
|
42
42
|
|
|
43
43
|
var useEditor = function useEditor(_ref) {
|
|
@@ -272,7 +272,7 @@ var Editor = function Editor(_ref) {
|
|
|
272
272
|
src: thumbnailImageUrl
|
|
273
273
|
})
|
|
274
274
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
275
|
-
className: "neeto-ui-rounded-full absolute
|
|
275
|
+
className: "neeto-ui-rounded-full absolute end-2 top-2",
|
|
276
276
|
children: /*#__PURE__*/jsxRuntime.jsx(Dropdown, {
|
|
277
277
|
strategy: "fixed",
|
|
278
278
|
buttonProps: {
|
|
@@ -303,7 +303,7 @@ var Editor = function Editor(_ref) {
|
|
|
303
303
|
setIsThumbnailImageModalOpen(false);
|
|
304
304
|
},
|
|
305
305
|
children: [/*#__PURE__*/jsxRuntime.jsx(Modal.Header, {
|
|
306
|
-
className: "
|
|
306
|
+
className: "ms-0 ps-0",
|
|
307
307
|
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
308
308
|
style: "h2",
|
|
309
309
|
children: t("neetoMolecules.documentEditor.uploadThumbnailImage")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentEditor.js","sources":["../../src/components/DocumentEditor/constants.js","../../src/components/DocumentEditor/hooks/useEditor.js","../../src/components/DocumentEditor/MediaUploader.jsx","../../src/components/DocumentEditor/utils.js","../../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-6\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute right-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ml-0 pl-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,CACV;AAEM,IAAMC,oBAAoB,GAAG;AAClCC,EAAAA,iBAAiB,EAAE,IAAI;AACvBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,IAAI,EAAE;AACR,CAAC;AAEM,IAAMC,mBAAmB,GAAG;AACjCC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,iBAAiB,EAAE;AACjB,IAAA,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,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SAAS,EAAC,6DAA6D;AACvE,UAAA,SAAA,EAAQ,8BAA8B;AACtCoF,UAAAA,KAAK,EAAC,OAAO;UAAAxD,QAAA,EAEZ3E,MAAM,CAACT,sBAAsB;AAAC,SACrB,CACb;AAAA,OACE,CAAC;AAAA,KAAA,CACM,CAAC,eACf+G,eAAA,CAACkC,KAAK,EAAA;AACJzF,MAAAA,SAAS,EAAC,+BAA+B;AACzC,MAAA,aAAA,EAAY,uBAAuB;AACnC0F,MAAAA,MAAM,EAAEnD,yBAA0B;AAClCoD,MAAAA,OAAO,EAAE,SAATA,OAAOA,GAAQ;QACbzG,4BAA4B,CAAC,KAAK,CAAC;MACrC,CAAE;AAAA0C,MAAAA,QAAA,EAAA,cAEF/B,cAAA,CAAC4F,KAAK,CAACG,MAAM,EAAA;AAAC5F,QAAAA,SAAS,EAAC,WAAW;QAAA4B,QAAA,eACjC/B,cAAA,CAAC2F,UAAU,EAAA;AAACJ,UAAAA,KAAK,EAAC,IAAI;UAAAxD,QAAA,EACnBrB,CAAC,CAAC,oDAAoD;SAC7C;AAAC,OACD,CAAC,eACfV,cAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA;AAA4B,OAAK,CAAC;AAAA,KAClD,CAAC;AAAA,GACL,CAAC;AAEV,CAAC;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB;AAErC,YAAA,aAAeC,UAAI,CAAClF,MAAM,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"DocumentEditor.js","sources":["../../src/components/DocumentEditor/constants.js","../../src/components/DocumentEditor/hooks/useEditor.js","../../src/components/DocumentEditor/MediaUploader.jsx","../../src/components/DocumentEditor/utils.js","../../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-6\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute end-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ms-0 ps-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAA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