@bigbinary/neeto-molecules 4.0.144 → 4.0.146
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/Breadcrumbs.js +39 -22
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/EmailForm.js +1 -1
- package/dist/FinderModal.js +61 -73
- package/dist/FinderModal.js.map +1 -1
- package/dist/Header.js +1 -1
- package/dist/NavigationHeader.js +1 -1
- package/dist/Taxonomy.js +1 -1
- package/dist/cjs/Breadcrumbs.js +39 -22
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/EmailForm.js +1 -1
- package/dist/cjs/FinderModal.js +59 -71
- package/dist/cjs/FinderModal.js.map +1 -1
- package/dist/cjs/Header.js +1 -1
- package/dist/cjs/NavigationHeader.js +1 -1
- package/dist/cjs/Taxonomy.js +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +3 -0
- package/types/FinderModal.d.ts +0 -8
package/dist/Breadcrumbs.js
CHANGED
|
@@ -1,45 +1,62 @@
|
|
|
1
1
|
import classnames from 'classnames';
|
|
2
|
+
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
2
3
|
import { hyphenize } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
3
4
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
4
5
|
import { Link } from 'react-router-dom';
|
|
5
6
|
import { n } from './inject-css-C2dztUxs.js';
|
|
6
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
|
-
var css = ".neeto-molecules-breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-breadcrumb a{transition:none}}.neeto-molecules-breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-breadcrumb-separator{font-size:.75rem;line-height:1rem;margin-inline:.75rem}.neeto-molecules-breadcrumbs-wrap{display:flex;flex-wrap:wrap;gap:.375rem 0;margin-block-end:2.5rem}@media screen and (max-width:768px){.neeto-molecules-breadcrumbs-wrap{margin-block-end:1rem}}";
|
|
9
|
+
var css = ".neeto-molecules-breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-breadcrumb a{transition:none}}.neeto-molecules-breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-breadcrumb-separator{font-size:.75rem;line-height:1rem;margin-inline:.75rem}.neeto-molecules-breadcrumbs-wrap{display:flex;flex-wrap:wrap;gap:.375rem 0;margin-block-end:2.5rem}@media screen and (max-width:768px){.neeto-molecules-breadcrumbs-wrap{margin-block-end:1rem}}.neeto-molecules-breadcrumbs-list{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}";
|
|
9
10
|
n(css,{});
|
|
10
11
|
|
|
11
|
-
var Breadcrumbs = function
|
|
12
|
-
var
|
|
12
|
+
var Breadcrumbs = withT(function (_ref) {
|
|
13
|
+
var t = _ref.t,
|
|
14
|
+
breadcrumbs = _ref.breadcrumbs,
|
|
13
15
|
_ref$hasTrailingSepar = _ref.hasTrailingSeparator,
|
|
14
16
|
hasTrailingSeparator = _ref$hasTrailingSepar === void 0 ? false : _ref$hasTrailingSepar,
|
|
15
17
|
className = _ref.className;
|
|
16
|
-
return /*#__PURE__*/jsx("
|
|
18
|
+
return /*#__PURE__*/jsx("nav", {
|
|
19
|
+
"aria-label": t("neetoMolecules.breadcrumbs.breadcrumbAriaLabel"),
|
|
17
20
|
className: classnames("neeto-molecules-breadcrumbs-wrap", className),
|
|
18
|
-
children:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
children: /*#__PURE__*/jsx("ol", {
|
|
22
|
+
className: "neeto-molecules-breadcrumbs-list",
|
|
23
|
+
children: breadcrumbs.map(function (_ref2, index) {
|
|
24
|
+
var text = _ref2.text,
|
|
25
|
+
_ref2$link = _ref2.link,
|
|
26
|
+
link = _ref2$link === void 0 ? "#" : _ref2$link;
|
|
27
|
+
var isLast = index + 1 === breadcrumbs.length;
|
|
28
|
+
var isCurrentPage = isLast && !hasTrailingSeparator;
|
|
29
|
+
return /*#__PURE__*/jsxs("li", {
|
|
30
|
+
className: "neeto-molecules-breadcrumb",
|
|
31
|
+
"data-testid": "header-breadcrumb",
|
|
32
|
+
children: [isCurrentPage ? /*#__PURE__*/jsx(Typography, {
|
|
33
|
+
"aria-current": "page",
|
|
34
|
+
className: "neeto-ui-text-gray-700 neeto-molecules-breadcrumb-link",
|
|
29
35
|
component: "span",
|
|
30
36
|
"data-testid": "".concat(hyphenize(text), "-breadcrumb"),
|
|
31
37
|
style: "body2",
|
|
32
38
|
weight: "normal",
|
|
33
39
|
children: text
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
}) : /*#__PURE__*/jsx(Link, {
|
|
41
|
+
to: link,
|
|
42
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
43
|
+
className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
|
|
44
|
+
component: "span",
|
|
45
|
+
"data-testid": "".concat(hyphenize(text), "-breadcrumb"),
|
|
46
|
+
style: "body2",
|
|
47
|
+
weight: "normal",
|
|
48
|
+
children: text
|
|
49
|
+
})
|
|
50
|
+
}), !isCurrentPage && /*#__PURE__*/jsx("span", {
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
className: "neeto-molecules-breadcrumb-separator neeto-ui-text-black",
|
|
53
|
+
children: "/"
|
|
54
|
+
})]
|
|
55
|
+
}, index);
|
|
56
|
+
})
|
|
40
57
|
})
|
|
41
58
|
});
|
|
42
|
-
};
|
|
59
|
+
});
|
|
43
60
|
|
|
44
61
|
export { Breadcrumbs as default };
|
|
45
62
|
//# sourceMappingURL=Breadcrumbs.js.map
|
package/dist/Breadcrumbs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sources":["../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = (
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = withT(\n ({ t, breadcrumbs, hasTrailingSeparator = false, className }) => (\n <nav\n aria-label={t(\"neetoMolecules.breadcrumbs.breadcrumbAriaLabel\")}\n className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}\n >\n <ol className=\"neeto-molecules-breadcrumbs-list\">\n {breadcrumbs.map(({ text, link = \"#\" }, index) => {\n const isLast = index + 1 === breadcrumbs.length;\n const isCurrentPage = isLast && !hasTrailingSeparator;\n\n return (\n <li\n className=\"neeto-molecules-breadcrumb\"\n data-testid=\"header-breadcrumb\"\n key={index}\n >\n {isCurrentPage ? (\n <Typography\n aria-current=\"page\"\n className=\"neeto-ui-text-gray-700 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n ) : (\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n )}\n {!isCurrentPage && (\n <span\n aria-hidden=\"true\"\n className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\"\n >\n /\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n )\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","withT","_ref","t","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","_jsx","classNames","children","map","_ref2","index","text","_ref2$link","link","isLast","length","isCurrentPage","_jsxs","Typography","component","concat","hyphenize","style","weight","Link","to"],"mappings":";;;;;;;;;;;AASA,IAAMA,WAAW,GAAGC,KAAK,CACvB,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAAC,qBAAA,GAAAH,IAAA,CAAEI,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAEE,SAAS,GAAAL,IAAA,CAATK,SAAS;AAAA,EAAA,oBACxDC,GAAA,CAAA,KAAA,EAAA;IACE,YAAA,EAAYL,CAAC,CAAC,gDAAgD,CAAE;AAChEI,IAAAA,SAAS,EAAEE,UAAU,CAAC,kCAAkC,EAAEF,SAAS,CAAE;AAAAG,IAAAA,QAAA,e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,cAAAA,MAAM,EAAC,QAAQ;AAAAhB,cAAAA,QAAA,EAEdI;aACS;AAAC,WACT,CACP,EACA,CAACK,aAAa,iBACbX,GAAA,CAAA,MAAA,EAAA;AACE,YAAA,aAAA,EAAY,MAAM;AAClBD,YAAAA,SAAS,EAAC,0DAA0D;AAAAG,YAAAA,QAAA,EACrE;AAED,WAAM,CACP;AAAA,SAAA,EAjCIG,KAkCH,CAAC;MAET,CAAC;KACC;AAAC,GACF,CAAC;AAAA,CAEV;;;;"}
|
package/dist/EmailForm.js
CHANGED
|
@@ -47,6 +47,7 @@ import '@babel/runtime/helpers/objectWithoutProperties';
|
|
|
47
47
|
import '@bigbinary/neeto-icons/Braces';
|
|
48
48
|
import '@bigbinary/neetoui/Dropdown';
|
|
49
49
|
import './Breadcrumbs.js';
|
|
50
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
50
51
|
import 'react-router-dom';
|
|
51
52
|
import './HelpPopover.js';
|
|
52
53
|
import '@bigbinary/neeto-icons/Help';
|
|
@@ -54,7 +55,6 @@ import '@bigbinary/neetoui/Popover';
|
|
|
54
55
|
import './MoreDropdown.js';
|
|
55
56
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
56
57
|
import '@bigbinary/neeto-icons/MenuVertical';
|
|
57
|
-
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
58
58
|
import './Search.js';
|
|
59
59
|
import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
60
60
|
import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
package/dist/FinderModal.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React__default, { useRef } from 'react';
|
|
4
|
-
import { isNotPresent, humanize, noop } from '@bigbinary/neeto-cist';
|
|
4
|
+
import { isNotEmpty, isNotPresent, humanize, noop } from '@bigbinary/neeto-cist';
|
|
5
5
|
import useHotkeys from '@bigbinary/neeto-hotkeys';
|
|
6
6
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
7
|
-
import {
|
|
8
|
-
import classnames from 'classnames';
|
|
7
|
+
import { isEmpty, prop } from 'ramda';
|
|
9
8
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
10
9
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
11
10
|
import Tag from '@bigbinary/neetoui/Tag';
|
|
@@ -29,22 +28,20 @@ import '@bigbinary/neetoui/Input';
|
|
|
29
28
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
30
29
|
|
|
31
30
|
var _excluded$1 = ["to", "children"];
|
|
32
|
-
function ownKeys$
|
|
33
|
-
function _objectSpread$
|
|
31
|
+
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; }
|
|
32
|
+
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; }
|
|
34
33
|
var Link = function Link(_ref) {
|
|
35
34
|
var to = _ref.to,
|
|
36
35
|
children = _ref.children,
|
|
37
36
|
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
38
37
|
var url = new URL(to);
|
|
39
38
|
url.host = "";
|
|
40
|
-
return /*#__PURE__*/jsx(Link$1, _objectSpread$
|
|
39
|
+
return /*#__PURE__*/jsx(Link$1, _objectSpread$1(_objectSpread$1({}, rest), {}, {
|
|
41
40
|
to: "".concat(url.pathname).concat(url.search),
|
|
42
41
|
children: children
|
|
43
42
|
}));
|
|
44
43
|
};
|
|
45
44
|
|
|
46
|
-
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; }
|
|
47
|
-
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; }
|
|
48
45
|
var minMax = function minMax(number) {
|
|
49
46
|
var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;
|
|
50
47
|
var min = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -79,19 +76,6 @@ var filterAndHighlightContent = function filterAndHighlightContent(bodyContent,
|
|
|
79
76
|
}, index);
|
|
80
77
|
});
|
|
81
78
|
};
|
|
82
|
-
var flattenData = function flattenData(data) {
|
|
83
|
-
if (!data) return [];
|
|
84
|
-
if (Array.isArray(data)) return data;
|
|
85
|
-
var result = [];
|
|
86
|
-
Object.keys(data).forEach(function (key) {
|
|
87
|
-
data[key].forEach(function (item) {
|
|
88
|
-
result.push(_objectSpread$1(_objectSpread$1({}, item), {}, {
|
|
89
|
-
category: key
|
|
90
|
-
}));
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
return result;
|
|
94
|
-
};
|
|
95
79
|
var createStylePalette = function createStylePalette(values) {
|
|
96
80
|
var assignedStyles = {};
|
|
97
81
|
var styleIndex = 0;
|
|
@@ -108,17 +92,18 @@ var getStyle = createStylePalette(["primary", "info", "success", "secondary", "w
|
|
|
108
92
|
var ModalBody = function ModalBody(_ref) {
|
|
109
93
|
var containerRef = _ref.containerRef,
|
|
110
94
|
data = _ref.data,
|
|
111
|
-
iconComponentMap = _ref.iconComponentMap,
|
|
112
95
|
onClose = _ref.onClose,
|
|
113
96
|
loading = _ref.loading,
|
|
114
97
|
searchTerm = _ref.searchTerm;
|
|
115
98
|
var _useTranslation = useTranslation(),
|
|
116
99
|
t = _useTranslation.t;
|
|
117
|
-
var
|
|
118
|
-
|
|
100
|
+
var categoryGroups = Object.keys(data).filter(function (key) {
|
|
101
|
+
return isNotEmpty(data[key]);
|
|
102
|
+
});
|
|
103
|
+
var isDataEmpty = isNotPresent(data) || isEmpty(categoryGroups);
|
|
119
104
|
if (isDataEmpty && !loading) {
|
|
120
105
|
return /*#__PURE__*/jsx(Modal.Body, {
|
|
121
|
-
className: "neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-
|
|
106
|
+
className: "neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-3 py-5",
|
|
122
107
|
children: /*#__PURE__*/jsx(NoData, {
|
|
123
108
|
description: t("neetoMolecules.finderModal.noDataDesc"),
|
|
124
109
|
title: t("neetoMolecules.finderModal.noDataTitle")
|
|
@@ -126,49 +111,53 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
126
111
|
});
|
|
127
112
|
}
|
|
128
113
|
return /*#__PURE__*/jsx(Modal.Body, {
|
|
129
|
-
className: "neeto-molecules-finder-modal__body h-96 overflow-y-auto px-
|
|
114
|
+
className: "neeto-molecules-finder-modal__body h-96 overflow-y-auto px-3 py-4",
|
|
130
115
|
children: /*#__PURE__*/jsx("div", {
|
|
131
|
-
className: "flex flex-col
|
|
116
|
+
className: "flex flex-col",
|
|
132
117
|
ref: containerRef,
|
|
133
|
-
children:
|
|
134
|
-
var
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
118
|
+
children: categoryGroups.map(function (category, categoryIndex) {
|
|
119
|
+
var items = data[category];
|
|
120
|
+
var shouldShowCategoryDivider = categoryIndex < categoryGroups.length - 1;
|
|
121
|
+
return /*#__PURE__*/jsxs("div", {
|
|
122
|
+
children: [items.map(function (item) {
|
|
123
|
+
var nameContent = htmlToText(item.name);
|
|
124
|
+
var bodyContent = htmlToText(item.body);
|
|
125
|
+
var filteredBodyContent = filterAndHighlightContent(bodyContent, searchTerm);
|
|
126
|
+
return /*#__PURE__*/jsx(Link, {
|
|
127
|
+
className: "neeto-molecules-search-result-item hover:neeto-ui-bg-accent-100 focus:neeto-ui-bg-accent-100 neeto-ui-rounded-lg flex w-full cursor-pointer items-center gap-2 px-3 py-2.5 text-xs transition-all duration-300",
|
|
128
|
+
to: item.url,
|
|
129
|
+
onClick: onClose,
|
|
130
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
131
|
+
className: "line-clamp-1 flex flex-col gap-1",
|
|
132
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
133
|
+
className: "flex items-start gap-2",
|
|
134
|
+
children: [nameContent && /*#__PURE__*/jsx(Typography, {
|
|
135
|
+
className: "neeto-ui-text-black",
|
|
136
|
+
weight: "semibold",
|
|
137
|
+
children: highlightMatch(nameContent, searchTerm)
|
|
138
|
+
}), category && /*#__PURE__*/jsx(Tag, {
|
|
139
|
+
className: "mt-1",
|
|
140
|
+
size: "small",
|
|
141
|
+
style: getStyle(category),
|
|
142
|
+
type: "solid",
|
|
143
|
+
children: humanize(category)
|
|
144
|
+
})]
|
|
145
|
+
}), bodyContent && /*#__PURE__*/jsx(Typography, {
|
|
146
|
+
className: "neeto-ui-text-gray-600 truncate text-xs",
|
|
147
|
+
children: filteredBodyContent || bodyContent
|
|
148
|
+
})]
|
|
149
|
+
})
|
|
150
|
+
}, "".concat(category, "-").concat(item.id));
|
|
151
|
+
}), shouldShowCategoryDivider && /*#__PURE__*/jsx("hr", {
|
|
152
|
+
className: "neeto-ui-border-gray-300 mx-3 my-3 border-t"
|
|
164
153
|
})]
|
|
165
|
-
},
|
|
154
|
+
}, category);
|
|
166
155
|
})
|
|
167
156
|
})
|
|
168
157
|
});
|
|
169
158
|
};
|
|
170
159
|
|
|
171
|
-
var css = ".neeto-molecules-finder-modal__search .neeto-ui-input--naked input{padding-inline-start:4px}.neeto-molecules-finder-modal-backdrop{grid-template-columns:100%}.neeto-molecules-finder-modal-backdrop .neeto-ui-modal__wrapper.neeto-molecules-finder-modal{margin-inline-end:auto;margin-inline-start:auto;max-width:740px;width:100%}.neeto-molecules-finder-matched-tag{background-color:#fbe48f!important}.neeto-molecules-finder-modal__footer{--neeto-ui-modal-footer-bg:rgb(var(--neeto-ui-white))}";
|
|
160
|
+
var css = ".neeto-molecules-finder-modal__search .neeto-ui-input--naked input{padding-inline-start:4px}.neeto-molecules-finder-modal-backdrop{grid-template-columns:100%}.neeto-molecules-finder-modal-backdrop .neeto-ui-modal__wrapper.neeto-molecules-finder-modal{margin-inline-end:auto;margin-inline-start:auto;max-width:740px;width:100%}.neeto-molecules-finder-matched-tag{background-color:#fbe48f!important;border-radius:var(--neeto-ui-rounded-sm);padding:0 .5px 2px}.neeto-molecules-finder-modal__footer{--neeto-ui-modal-footer-bg:rgb(var(--neeto-ui-white))}.neeto-molecules-finder-modal__header{--neeto-ui-input-prefix-suffix-icon-size:1.25rem;--neeto-ui-input-font-size:1rem}.neeto-molecules-finder-modal__body{--neeto-ui-tag-padding-x:0.625rem;--neeto-ui-tag-padding-y:0.125rem}";
|
|
172
161
|
n(css,{});
|
|
173
162
|
|
|
174
163
|
var ModalFooter = function ModalFooter(_ref) {
|
|
@@ -186,10 +175,10 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
186
175
|
}, {
|
|
187
176
|
label: t("neetoMolecules.common.actions.move"),
|
|
188
177
|
keys: [/*#__PURE__*/jsx(Up, {
|
|
189
|
-
className: "neeto-ui-text-gray-
|
|
178
|
+
className: "neeto-ui-text-gray-600",
|
|
190
179
|
size: 12
|
|
191
180
|
}, "up"), /*#__PURE__*/jsx(Down, {
|
|
192
|
-
className: "neeto-ui-text-gray-
|
|
181
|
+
className: "neeto-ui-text-gray-600",
|
|
193
182
|
size: 12
|
|
194
183
|
}, "down")],
|
|
195
184
|
isVisible: true
|
|
@@ -199,21 +188,22 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
199
188
|
isVisible: true
|
|
200
189
|
}];
|
|
201
190
|
return /*#__PURE__*/jsx(Modal.Footer, {
|
|
202
|
-
className: "neeto-ui-border-gray-300 neeto-molecules-finder-modal__footer border-t px-
|
|
191
|
+
className: "neeto-ui-border-gray-300 neeto-molecules-finder-modal__footer border-t px-6 py-4",
|
|
203
192
|
children: /*#__PURE__*/jsx("div", {
|
|
204
|
-
className: "neeto-ui-text-xxs flex items-center
|
|
193
|
+
className: "neeto-ui-text-xxs flex items-center gap-4",
|
|
205
194
|
children: shortcuts.filter(prop("isVisible")).map(function (_ref2, index) {
|
|
206
195
|
var label = _ref2.label,
|
|
207
196
|
keys = _ref2.keys;
|
|
208
197
|
return /*#__PURE__*/jsxs("div", {
|
|
209
198
|
className: "flex items-center gap-1",
|
|
210
199
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
200
|
+
className: "neeto-ui-text-gray-600",
|
|
211
201
|
component: "span",
|
|
212
202
|
style: "nano",
|
|
213
203
|
children: label
|
|
214
204
|
}), keys.map(function (key, index) {
|
|
215
205
|
return /*#__PURE__*/jsx(Typography, {
|
|
216
|
-
className: "neeto-ui-bg-gray-200 neeto-ui-rounded-sm
|
|
206
|
+
className: "neeto-ui-bg-gray-200 neeto-ui-rounded-sm neeto-ui-text-gray-600 px-1.5 py-1",
|
|
217
207
|
component: "span",
|
|
218
208
|
style: "nano",
|
|
219
209
|
children: key
|
|
@@ -228,16 +218,16 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
228
218
|
var ModalHeader = withT(function (_ref) {
|
|
229
219
|
var t = _ref.t,
|
|
230
220
|
enableAdvancedSearch = _ref.enableAdvancedSearch,
|
|
231
|
-
loading = _ref.loading,
|
|
232
221
|
onSearch = _ref.onSearch,
|
|
233
|
-
onGoToAdvanced = _ref.onGoToAdvanced
|
|
222
|
+
onGoToAdvanced = _ref.onGoToAdvanced,
|
|
223
|
+
loading = _ref.loading;
|
|
234
224
|
return /*#__PURE__*/jsx(Modal.Header, {
|
|
235
|
-
className: "neeto-molecules-finder-modal__header neeto-ui-border-gray-
|
|
225
|
+
className: "neeto-molecules-finder-modal__header neeto-ui-border-gray-300 border-b px-0 py-0",
|
|
236
226
|
children: /*#__PURE__*/jsx(Search, {
|
|
237
227
|
onSearch: onSearch,
|
|
238
228
|
nakedInput: true,
|
|
239
229
|
autoComplete: "off",
|
|
240
|
-
className: "neeto-molecules-finder-modal__search px-
|
|
230
|
+
className: "neeto-molecules-finder-modal__search px-6 py-3",
|
|
241
231
|
name: "term",
|
|
242
232
|
placeholder: t("neetoMolecules.common.actions.search"),
|
|
243
233
|
suffix: /*#__PURE__*/jsxs("div", {
|
|
@@ -251,7 +241,7 @@ var ModalHeader = withT(function (_ref) {
|
|
|
251
241
|
className: "ms-3 whitespace-nowrap",
|
|
252
242
|
label: t("neetoMolecules.finderModal.advancedSearch"),
|
|
253
243
|
size: "small",
|
|
254
|
-
style: "
|
|
244
|
+
style: "tertiary",
|
|
255
245
|
onClick: onGoToAdvanced
|
|
256
246
|
})]
|
|
257
247
|
})
|
|
@@ -259,14 +249,13 @@ var ModalHeader = withT(function (_ref) {
|
|
|
259
249
|
});
|
|
260
250
|
});
|
|
261
251
|
|
|
262
|
-
var _excluded = ["enableAdvancedSearch", "data", "
|
|
252
|
+
var _excluded = ["enableAdvancedSearch", "data", "isFetching", "isOpen", "searchTerm", "setSearchTerm", "onClose", "onGoToAdvanced"];
|
|
263
253
|
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; }
|
|
264
254
|
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; }
|
|
265
255
|
var FinderModal = function FinderModal(_ref) {
|
|
266
256
|
var _ref$enableAdvancedSe = _ref.enableAdvancedSearch,
|
|
267
257
|
enableAdvancedSearch = _ref$enableAdvancedSe === void 0 ? true : _ref$enableAdvancedSe,
|
|
268
258
|
data = _ref.data,
|
|
269
|
-
iconComponentMap = _ref.iconComponentMap,
|
|
270
259
|
isFetching = _ref.isFetching,
|
|
271
260
|
isOpen = _ref.isOpen,
|
|
272
261
|
searchTerm = _ref.searchTerm,
|
|
@@ -316,7 +305,6 @@ var FinderModal = function FinderModal(_ref) {
|
|
|
316
305
|
}), /*#__PURE__*/jsx(ModalBody, {
|
|
317
306
|
containerRef: containerRef,
|
|
318
307
|
data: data,
|
|
319
|
-
iconComponentMap: iconComponentMap,
|
|
320
308
|
onClose: onClose,
|
|
321
309
|
searchTerm: searchTerm,
|
|
322
310
|
loading: isFetching
|
package/dist/FinderModal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinderModal.js","sources":["../src/components/FinderModal/Link.jsx","../src/components/FinderModal/utils.jsx","../src/components/FinderModal/Body.jsx","../src/components/FinderModal/Footer.jsx","../src/components/FinderModal/Header.jsx","../src/components/FinderModal/index.jsx"],"sourcesContent":["import { Link as RRDLink } from \"react-router-dom\";\n\nconst Link = ({ to, children, ...rest }) => {\n const url = new URL(to);\n url.host = \"\";\n\n return (\n <RRDLink {...rest} to={`${url.pathname}${url.search}`}>\n {children}\n </RRDLink>\n );\n};\n\nexport default Link;\n","import React from \"react\";\n\nexport const minMax = (number, max = Number.POSITIVE_INFINITY, min = 0) =>\n Math.min(max, Math.max(min, number));\n\nexport const htmlToText = html => {\n if (!html) return null;\n\n const tmp = document.createElement(\"div\");\n tmp.innerHTML = html;\n\n return tmp.textContent || tmp.innerText || \"\";\n};\n\nexport const highlightMatch = (text, searchTerm) => {\n if (!searchTerm) return text;\n\n const regex = new RegExp(`(${searchTerm})`, \"gi\");\n\n return text.split(regex).map((part, index) =>\n part?.toLowerCase() === searchTerm.toLowerCase() ? (\n <span className=\"neeto-molecules-finder-matched-tag\" key={index}>\n {part}\n </span>\n ) : (\n part\n )\n );\n};\n\nexport const filterAndHighlightContent = (bodyContent, searchTerm) => {\n if (!searchTerm) return bodyContent;\n\n if (!bodyContent) return null;\n\n return bodyContent\n .split(/(.{1,130}(?:\\s|$))/g)\n .filter(line => line.trim())\n .filter(line => line.toLowerCase().includes(searchTerm.toLowerCase()))\n .map((line, index) => (\n <React.Fragment key={index}>\n {highlightMatch(line, searchTerm)}\n <br />\n </React.Fragment>\n ));\n};\n\nexport const flattenData = data => {\n if (!data) return [];\n\n if (Array.isArray(data)) return data;\n\n const result = [];\n Object.keys(data).forEach(key => {\n data[key].forEach(item => {\n result.push({ ...item, category: key });\n });\n });\n\n return result;\n};\n\nexport const createStylePalette = values => {\n const assignedStyles = {};\n let styleIndex = 0;\n\n return key => {\n if (assignedStyles[key]) return assignedStyles[key];\n const style = values[styleIndex];\n styleIndex = (styleIndex + 1) % values.length;\n assignedStyles[key] = style;\n\n return style;\n };\n};\n","import classNames from \"classnames\";\nimport { humanize, isNotPresent } from \"neetocist\";\nimport { Modal, Typography, NoData, Tag } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Link from \"./Link\";\nimport {\n htmlToText,\n highlightMatch,\n filterAndHighlightContent,\n flattenData,\n createStylePalette,\n} from \"./utils\";\n\nconst getStyle = createStylePalette([\n \"primary\",\n \"info\",\n \"success\",\n \"secondary\",\n \"warning\",\n]);\n\nconst ModalBody = ({\n containerRef,\n data,\n iconComponentMap,\n onClose,\n loading,\n searchTerm,\n}) => {\n const { t } = useTranslation();\n\n const flattenedData = flattenData(data);\n const isDataEmpty = isNotPresent(flattenedData);\n\n if (isDataEmpty && !loading) {\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-4 py-6\">\n <NoData\n description={t(\"neetoMolecules.finderModal.noDataDesc\")}\n title={t(\"neetoMolecules.finderModal.noDataTitle\")}\n />\n </Modal.Body>\n );\n }\n\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body h-96 overflow-y-auto px-4 py-6\">\n <div className=\"flex flex-col gap-y-2\" ref={containerRef}>\n {flattenedData.map(item => {\n const Icon =\n (item.category && iconComponentMap[item.category]) ||\n iconComponentMap.default;\n\n const nameContent = htmlToText(item.name);\n const bodyContent = htmlToText(item.body);\n\n const filteredBodyContent = filterAndHighlightContent(\n bodyContent,\n searchTerm\n );\n\n return (\n <Link\n className=\"neeto-molecules-search-result-item hover:neeto-ui-bg-accent-100 focus:neeto-ui-bg-accent-100 neeto-ui-rounded flex w-full cursor-pointer items-center gap-2 p-2 text-xs\"\n key={item.id}\n to={item.url}\n onClick={onClose}\n >\n <Icon className=\"neeto-ui-text-gray-500 min-w-fit\" size={16} />\n <div className=\"line-clamp-1 flex flex-col\">\n <div className=\"flex items-center gap-2\">\n {nameContent && (\n <Typography className=\"neeto-ui-text-black text-sm font-medium\">\n {highlightMatch(nameContent, searchTerm)}\n </Typography>\n )}\n {item.category && (\n <Tag size=\"small\" style={getStyle(item.category)}>\n {humanize(item.category)}\n </Tag>\n )}\n </div>\n {bodyContent && (\n <Typography\n className={classNames(\"truncate\", {\n \"neeto-ui-text-gray-600 text-xs\": nameContent,\n \"neeto-ui-text-black text-sm font-medium\": !nameContent,\n })}\n >\n {filteredBodyContent || bodyContent}\n </Typography>\n )}\n </div>\n </Link>\n );\n })}\n </div>\n </Modal.Body>\n );\n};\n\nexport default ModalBody;\n","import { Down, Up } from \"neetoicons\";\nimport { Modal, Typography } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ModalFooter = ({ enableAdvancedSearch }) => {\n const { t } = useTranslation();\n\n const shortcuts = [\n {\n label: t(\"neetoMolecules.finderModal.advancedSearch\"),\n keys: [\"Cmd/Ctrl\", \"Return\"],\n isVisible: enableAdvancedSearch,\n },\n {\n label: t(\"neetoMolecules.common.actions.open\"),\n keys: [\"Return\"],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.move\"),\n keys: [\n <Up className=\"neeto-ui-text-gray-800\" key=\"up\" size={12} />,\n <Down className=\"neeto-ui-text-gray-800\" key=\"down\" size={12} />,\n ],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.close\"),\n keys: [\"Esc\"],\n isVisible: true,\n },\n ];\n\n return (\n <Modal.Footer className=\"neeto-ui-border-gray-300 neeto-molecules-finder-modal__footer border-t px-4 py-3\">\n <div className=\"neeto-ui-text-xxs flex items-center justify-end gap-4\">\n {shortcuts.filter(prop(\"isVisible\")).map(({ label, keys }, index) => (\n <div className=\"flex items-center gap-1\" key={index}>\n <Typography component=\"span\" style=\"nano\">\n {label}\n </Typography>\n {keys.map((key, index) => (\n <Typography\n className=\"neeto-ui-bg-gray-200 neeto-ui-rounded-sm p-1\"\n component=\"span\"\n key={index}\n style=\"nano\"\n >\n {key}\n </Typography>\n ))}\n </div>\n ))}\n </div>\n </Modal.Footer>\n );\n};\n\nexport default ModalFooter;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Button, Modal, Spinner } from \"neetoui\";\n\nimport Search from \"components/Search\";\n\nconst ModalHeader = withT(\n ({ t, enableAdvancedSearch, loading, onSearch, onGoToAdvanced }) => (\n <Modal.Header className=\"neeto-molecules-finder-modal__header neeto-ui-border-gray-200 border-b px-0 py-0\">\n <Search\n {...{ onSearch }}\n nakedInput\n autoComplete=\"off\"\n className=\"neeto-molecules-finder-modal__search px-3 py-1.5\"\n name=\"term\"\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n suffix={\n <div className=\"ms-3 flex items-center\">\n <div className=\"h-4 w-4 flex-shrink-0\">\n {loading && <Spinner size=\"small\" />}\n </div>\n {enableAdvancedSearch && (\n <Button\n className=\"ms-3 whitespace-nowrap\"\n label={t(\"neetoMolecules.finderModal.advancedSearch\")}\n size=\"small\"\n style=\"secondary\"\n onClick={onGoToAdvanced}\n />\n )}\n </div>\n }\n />\n </Modal.Header>\n )\n);\n\nexport default ModalHeader;\n","import { useRef } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\nimport { Modal } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport ModalBody from \"./Body\";\nimport \"./finder-modal.scss\";\nimport ModalFooter from \"./Footer\";\nimport ModalHeader from \"./Header\";\nimport { minMax } from \"./utils\";\n\nconst FinderModal = ({\n enableAdvancedSearch = true,\n data,\n iconComponentMap,\n isFetching,\n isOpen,\n searchTerm,\n setSearchTerm,\n onClose,\n onGoToAdvanced = noop,\n ...props\n}) => {\n const containerRef = useRef();\n const mutables = useRef({ focusIndex: -1 }).current;\n\n const onFocusChange = offset => {\n const container = containerRef.current;\n if (!container) return;\n\n const nodes = container.querySelectorAll(\n \"a.neeto-molecules-search-result-item\"\n );\n\n if (isEmpty(nodes)) return;\n\n mutables.focusIndex = minMax(\n mutables.focusIndex + offset,\n nodes.length - 1\n );\n\n const targetNode = nodes[mutables.focusIndex];\n if (targetNode) {\n targetNode.focus();\n }\n };\n\n useHotkeys(\n [\"up\", \"down\"],\n event => {\n event.preventDefault();\n if (event.code === \"ArrowUp\") onFocusChange(-1);\n else if (event.code === \"ArrowDown\") onFocusChange(1);\n },\n { mode: \"global\", enabled: isOpen }\n );\n\n useHotkeys([\"ctrl+enter\", \"command+enter\"], onGoToAdvanced, {\n mode: \"global\",\n enabled: isOpen && enableAdvancedSearch,\n });\n\n return (\n <Modal\n {...{ isOpen, onClose }}\n closeButton={false}\n {...props}\n backdropClassName=\"neeto-molecules-finder-modal-backdrop py-10 px-4\"\n className=\"neeto-molecules-finder-modal\"\n >\n <ModalHeader\n {...{ enableAdvancedSearch, onGoToAdvanced }}\n loading={isFetching}\n onSearch={setSearchTerm}\n />\n <ModalBody\n {...{ containerRef, data, iconComponentMap, onClose, searchTerm }}\n loading={isFetching}\n />\n <ModalFooter {...{ enableAdvancedSearch }} />\n </Modal>\n );\n};\n\nFinderModal.propTypes = {\n /*\n Boolean to indicate decide whether to show advanced search button or not\n */\n enableAdvancedSearch: PropTypes.bool,\n /*\n Data to be displayed in the modal. Can be an array of items with category property,\n or an object with category keys containing arrays of items.\n */\n data: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n url: PropTypes.string,\n body: PropTypes.string,\n name: PropTypes.string,\n category: PropTypes.string,\n })\n ),\n PropTypes.objectOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n url: PropTypes.string,\n body: PropTypes.string,\n name: PropTypes.string,\n })\n )\n ),\n ]),\n /*\n Icon component map to render icons for each section\n */\n iconComponentMap: PropTypes.objectOf(PropTypes.elementType),\n /*\n Boolean to indicate whether data is being fetched or not\n */\n isFetching: PropTypes.bool,\n /*\n Boolean to indicate whether modal is open or not\n */\n isOpen: PropTypes.bool,\n /*\n Term used for search\n */\n searchTerm: PropTypes.string,\n /*\n Function to set search term\n */\n setSearchTerm: PropTypes.func,\n /*\n Function to close the modal\n */\n onClose: PropTypes.func,\n /*\n Function to execute when user clicks on advanced search button\n */\n onGoToAdvanced: PropTypes.func,\n};\n\nexport default FinderModal;\n"],"names":["Link","_ref","to","children","rest","_objectWithoutProperties","_excluded","url","URL","host","_jsx","RRDLink","_objectSpread","concat","pathname","search","minMax","number","max","arguments","length","undefined","Number","POSITIVE_INFINITY","min","Math","htmlToText","html","tmp","document","createElement","innerHTML","textContent","innerText","highlightMatch","text","searchTerm","regex","RegExp","split","map","part","index","toLowerCase","className","filterAndHighlightContent","bodyContent","filter","line","trim","includes","_jsxs","React","Fragment","flattenData","data","Array","isArray","result","Object","keys","forEach","key","item","push","category","createStylePalette","values","assignedStyles","styleIndex","style","getStyle","ModalBody","containerRef","iconComponentMap","onClose","loading","_useTranslation","useTranslation","t","flattenedData","isDataEmpty","isNotPresent","Modal","Body","NoData","description","title","ref","Icon","nameContent","name","body","filteredBodyContent","onClick","size","Typography","Tag","humanize","classNames","id","ModalFooter","enableAdvancedSearch","shortcuts","label","isVisible","Up","Down","Footer","prop","_ref2","component","ModalHeader","withT","onSearch","onGoToAdvanced","Header","Search","nakedInput","autoComplete","placeholder","suffix","Spinner","Button","FinderModal","_ref$enableAdvancedSe","isFetching","isOpen","setSearchTerm","_ref$onGoToAdvanced","noop","props","useRef","mutables","focusIndex","current","onFocusChange","offset","container","nodes","querySelectorAll","isEmpty","targetNode","focus","useHotkeys","event","preventDefault","code","mode","enabled","closeButton","backdropClassName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAAkC;AAAA,EAAA,IAA5BC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA;AACnC,EAAA,IAAMC,GAAG,GAAG,IAAIC,GAAG,CA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,YAAY;AAAElB,MAAAA,IAAI,EAAJA,IAAI;AAAEmB,MAAAA,gBAAgB,EAAhBA,gBAAgB;AAAEC,MAAAA,OAAO,EAAPA,OAAO;AAAEvC,MAAAA,UAAU,EAAVA,UAAU;AAC/DwC,MAAAA,OAAO,EAAEkD;AAAW,KACrB,CAAC,eACFpH,GAAA,CAAC2F,WAAW,EAAA;AAAOC,MAAAA,oBAAoB,EAApBA;AAAoB,KAAK,CAAC;AAAA,GAAA,CACxC,CAAC;AAEZ;;;;"}
|
|
1
|
+
{"version":3,"file":"FinderModal.js","sources":["../src/components/FinderModal/Link.jsx","../src/components/FinderModal/utils.jsx","../src/components/FinderModal/Body.jsx","../src/components/FinderModal/Footer.jsx","../src/components/FinderModal/Header.jsx","../src/components/FinderModal/index.jsx"],"sourcesContent":["import { Link as RRDLink } from \"react-router-dom\";\n\nconst Link = ({ to, children, ...rest }) => {\n const url = new URL(to);\n url.host = \"\";\n\n return (\n <RRDLink {...rest} to={`${url.pathname}${url.search}`}>\n {children}\n </RRDLink>\n );\n};\n\nexport default Link;\n","import React from \"react\";\n\nexport const minMax = (number, max = Number.POSITIVE_INFINITY, min = 0) =>\n Math.min(max, Math.max(min, number));\n\nexport const htmlToText = html => {\n if (!html) return null;\n\n const tmp = document.createElement(\"div\");\n tmp.innerHTML = html;\n\n return tmp.textContent || tmp.innerText || \"\";\n};\n\nexport const highlightMatch = (text, searchTerm) => {\n if (!searchTerm) return text;\n\n const regex = new RegExp(`(${searchTerm})`, \"gi\");\n\n return text.split(regex).map((part, index) =>\n part?.toLowerCase() === searchTerm.toLowerCase() ? (\n <span className=\"neeto-molecules-finder-matched-tag\" key={index}>\n {part}\n </span>\n ) : (\n part\n )\n );\n};\n\nexport const filterAndHighlightContent = (bodyContent, searchTerm) => {\n if (!searchTerm) return bodyContent;\n\n if (!bodyContent) return null;\n\n return bodyContent\n .split(/(.{1,130}(?:\\s|$))/g)\n .filter(line => line.trim())\n .filter(line => line.toLowerCase().includes(searchTerm.toLowerCase()))\n .map((line, index) => (\n <React.Fragment key={index}>\n {highlightMatch(line, searchTerm)}\n <br />\n </React.Fragment>\n ));\n};\n\nexport const flattenData = data => {\n if (!data) return [];\n\n if (Array.isArray(data)) return data;\n\n const result = [];\n Object.keys(data).forEach(key => {\n data[key].forEach(item => {\n result.push({ ...item, category: key });\n });\n });\n\n return result;\n};\n\nexport const createStylePalette = values => {\n const assignedStyles = {};\n let styleIndex = 0;\n\n return key => {\n if (assignedStyles[key]) return assignedStyles[key];\n const style = values[styleIndex];\n styleIndex = (styleIndex + 1) % values.length;\n assignedStyles[key] = style;\n\n return style;\n };\n};\n","import { humanize, isNotEmpty, isNotPresent } from \"neetocist\";\nimport { Modal, Typography, NoData, Tag } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Link from \"./Link\";\nimport {\n htmlToText,\n highlightMatch,\n filterAndHighlightContent,\n createStylePalette,\n} from \"./utils\";\n\nconst getStyle = createStylePalette([\n \"primary\",\n \"info\",\n \"success\",\n \"secondary\",\n \"warning\",\n]);\n\nconst ModalBody = ({ containerRef, data, onClose, loading, searchTerm }) => {\n const { t } = useTranslation();\n\n const categoryGroups = Object.keys(data).filter(key => isNotEmpty(data[key]));\n const isDataEmpty = isNotPresent(data) || isEmpty(categoryGroups);\n\n if (isDataEmpty && !loading) {\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-3 py-5\">\n <NoData\n description={t(\"neetoMolecules.finderModal.noDataDesc\")}\n title={t(\"neetoMolecules.finderModal.noDataTitle\")}\n />\n </Modal.Body>\n );\n }\n\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body h-96 overflow-y-auto px-3 py-4\">\n <div className=\"flex flex-col\" ref={containerRef}>\n {categoryGroups.map((category, categoryIndex) => {\n const items = data[category];\n const shouldShowCategoryDivider =\n categoryIndex < categoryGroups.length - 1;\n\n return (\n <div key={category}>\n {items.map(item => {\n const nameContent = htmlToText(item.name);\n const bodyContent = htmlToText(item.body);\n\n const filteredBodyContent = filterAndHighlightContent(\n bodyContent,\n searchTerm\n );\n\n return (\n <Link\n className=\"neeto-molecules-search-result-item hover:neeto-ui-bg-accent-100 focus:neeto-ui-bg-accent-100 neeto-ui-rounded-lg flex w-full cursor-pointer items-center gap-2 px-3 py-2.5 text-xs transition-all duration-300\"\n key={`${category}-${item.id}`}\n to={item.url}\n onClick={onClose}\n >\n <div className=\"line-clamp-1 flex flex-col gap-1\">\n <div className=\"flex items-start gap-2\">\n {nameContent && (\n <Typography\n className=\"neeto-ui-text-black\"\n weight=\"semibold\"\n >\n {highlightMatch(nameContent, searchTerm)}\n </Typography>\n )}\n {category && (\n <Tag\n className=\"mt-1\"\n size=\"small\"\n style={getStyle(category)}\n type=\"solid\"\n >\n {humanize(category)}\n </Tag>\n )}\n </div>\n {bodyContent && (\n <Typography className=\"neeto-ui-text-gray-600 truncate text-xs\">\n {filteredBodyContent || bodyContent}\n </Typography>\n )}\n </div>\n </Link>\n );\n })}\n {shouldShowCategoryDivider && (\n <hr className=\"neeto-ui-border-gray-300 mx-3 my-3 border-t\" />\n )}\n </div>\n );\n })}\n </div>\n </Modal.Body>\n );\n};\n\nexport default ModalBody;\n","import { Down, Up } from \"neetoicons\";\nimport { Modal, Typography } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ModalFooter = ({ enableAdvancedSearch }) => {\n const { t } = useTranslation();\n\n const shortcuts = [\n {\n label: t(\"neetoMolecules.finderModal.advancedSearch\"),\n keys: [\"Cmd/Ctrl\", \"Return\"],\n isVisible: enableAdvancedSearch,\n },\n {\n label: t(\"neetoMolecules.common.actions.open\"),\n keys: [\"Return\"],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.move\"),\n keys: [\n <Up className=\"neeto-ui-text-gray-600\" key=\"up\" size={12} />,\n <Down className=\"neeto-ui-text-gray-600\" key=\"down\" size={12} />,\n ],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.close\"),\n keys: [\"Esc\"],\n isVisible: true,\n },\n ];\n\n return (\n <Modal.Footer className=\"neeto-ui-border-gray-300 neeto-molecules-finder-modal__footer border-t px-6 py-4\">\n <div className=\"neeto-ui-text-xxs flex items-center gap-4\">\n {shortcuts.filter(prop(\"isVisible\")).map(({ label, keys }, index) => (\n <div className=\"flex items-center gap-1\" key={index}>\n <Typography\n className=\"neeto-ui-text-gray-600\"\n component=\"span\"\n style=\"nano\"\n >\n {label}\n </Typography>\n {keys.map((key, index) => (\n <Typography\n className=\"neeto-ui-bg-gray-200 neeto-ui-rounded-sm neeto-ui-text-gray-600 px-1.5 py-1\"\n component=\"span\"\n key={index}\n style=\"nano\"\n >\n {key}\n </Typography>\n ))}\n </div>\n ))}\n </div>\n </Modal.Footer>\n );\n};\n\nexport default ModalFooter;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Button, Modal, Spinner } from \"neetoui\";\n\nimport Search from \"components/Search\";\n\nconst ModalHeader = withT(\n ({ t, enableAdvancedSearch, onSearch, onGoToAdvanced, loading }) => (\n <Modal.Header className=\"neeto-molecules-finder-modal__header neeto-ui-border-gray-300 border-b px-0 py-0\">\n <Search\n {...{ onSearch }}\n nakedInput\n autoComplete=\"off\"\n className=\"neeto-molecules-finder-modal__search px-6 py-3\"\n name=\"term\"\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n suffix={\n <div className=\"ms-3 flex items-center\">\n <div className=\"h-4 w-4 flex-shrink-0\">\n {loading && <Spinner size=\"small\" />}\n </div>\n {enableAdvancedSearch && (\n <Button\n className=\"ms-3 whitespace-nowrap\"\n label={t(\"neetoMolecules.finderModal.advancedSearch\")}\n size=\"small\"\n style=\"tertiary\"\n onClick={onGoToAdvanced}\n />\n )}\n </div>\n }\n />\n </Modal.Header>\n )\n);\n\nexport default ModalHeader;\n","import { useRef } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\nimport { Modal } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport ModalBody from \"./Body\";\nimport \"./finder-modal.scss\";\nimport ModalFooter from \"./Footer\";\nimport ModalHeader from \"./Header\";\nimport { minMax } from \"./utils\";\n\nconst FinderModal = ({\n enableAdvancedSearch = true,\n data,\n isFetching,\n isOpen,\n searchTerm,\n setSearchTerm,\n onClose,\n onGoToAdvanced = noop,\n ...props\n}) => {\n const containerRef = useRef();\n const mutables = useRef({ focusIndex: -1 }).current;\n\n const onFocusChange = offset => {\n const container = containerRef.current;\n if (!container) return;\n\n const nodes = container.querySelectorAll(\n \"a.neeto-molecules-search-result-item\"\n );\n\n if (isEmpty(nodes)) return;\n\n mutables.focusIndex = minMax(\n mutables.focusIndex + offset,\n nodes.length - 1\n );\n\n const targetNode = nodes[mutables.focusIndex];\n if (targetNode) {\n targetNode.focus();\n }\n };\n\n useHotkeys(\n [\"up\", \"down\"],\n event => {\n event.preventDefault();\n if (event.code === \"ArrowUp\") onFocusChange(-1);\n else if (event.code === \"ArrowDown\") onFocusChange(1);\n },\n { mode: \"global\", enabled: isOpen }\n );\n\n useHotkeys([\"ctrl+enter\", \"command+enter\"], onGoToAdvanced, {\n mode: \"global\",\n enabled: isOpen && enableAdvancedSearch,\n });\n\n return (\n <Modal\n {...{ isOpen, onClose }}\n closeButton={false}\n {...props}\n backdropClassName=\"neeto-molecules-finder-modal-backdrop py-10 px-4\"\n className=\"neeto-molecules-finder-modal\"\n >\n <ModalHeader\n {...{ enableAdvancedSearch, onGoToAdvanced }}\n loading={isFetching}\n onSearch={setSearchTerm}\n />\n <ModalBody\n {...{ containerRef, data, onClose, searchTerm }}\n loading={isFetching}\n />\n <ModalFooter {...{ enableAdvancedSearch }} />\n </Modal>\n );\n};\n\nFinderModal.propTypes = {\n /*\n Boolean to indicate decide whether to show advanced search button or not\n */\n enableAdvancedSearch: PropTypes.bool,\n /*\n Data to be displayed in the modal\n */\n data: PropTypes.objectOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n url: PropTypes.string,\n body: PropTypes.string,\n name: PropTypes.string,\n })\n )\n ),\n /*\n Boolean to indicate whether data is being fetched or not\n */\n isFetching: PropTypes.bool,\n /*\n Boolean to indicate whether modal is open or not\n */\n isOpen: PropTypes.bool,\n /*\n Term used for search\n */\n searchTerm: PropTypes.string,\n /*\n Function to set search term\n */\n setSearchTerm: PropTypes.func,\n /*\n Function to close the modal\n */\n onClose: PropTypes.func,\n /*\n Function to execute when user clicks on advanced search button\n */\n onGoToAdvanced: PropTypes.func,\n};\n\nexport default FinderModal;\n"],"names":["Link","_ref","to","children","rest","_objectWithoutProperties","_excluded","url","URL","host","_jsx","RRDLink","_objectSpread","concat","pathname","search","minMax","number","max","arguments","length","undefined","Number","POSITIVE_INFINITY","min","Math","htmlToText","html","tmp","document","createElement","innerHTML","textContent","innerText","highlightMatch","text","searchTerm","regex","RegExp","split","map","part","index","toLowerCase","className","filterAndHighlightContent","bodyContent","filter","line","trim","includes","_jsxs","React","Fragment","createStylePalette","values","assignedStyles","styleIndex","key","style","getStyle","ModalBody","containerRef","data","onClose","loading","_useTranslation","useTranslation","t","categoryGroups","Object","keys","isNotEmpty","isDataEmpty","isNotPresent","isEmpty","Modal","Body","NoData","description","title","ref","category","categoryIndex","items","shouldShowCategoryDivider","item","nameContent","name","body","filteredBodyContent","onClick","Typography","weight","Tag","size","type","humanize","id","ModalFooter","enableAdvancedSearch","shortcuts","label","isVisible","Up","Down","Footer","prop","_ref2","component","ModalHeader","withT","onSearch","onGoToAdvanced","Header","Search","nakedInput","autoComplete","placeholder","suffix","Spinner","Button","FinderModal","_ref$enableAdvancedSe","isFetching","isOpen","setSearchTerm","_ref$onGoToAdvanced","noop","props","useRef","mutables","focusIndex","current","onFocusChange","offset","container","nodes","querySelectorAll","targetNode","focus","useHotkeys","event","preventDefault","code","mode","enabled","closeButton","backdropClassName"],"mappings":";;;;;;;;;;;;;;;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,YAAY,EAAZA,YAAY;AAAEC,MAAAA,IAAI,EAAJA,IAAI;AAAEC,MAAAA,OAAO,EAAPA,OAAO;AAAE5B,MAAAA,UAAU,EAAVA,UAAU;AAC7C6B,MAAAA,OAAO,EAAE2D;AAAW,KACrB,CAAC,eACFlH,GAAA,CAACyF,WAAW,EAAA;AAAOC,MAAAA,oBAAoB,EAApBA;AAAoB,KAAK,CAAC;AAAA,GAAA,CACxC,CAAC;AAEZ;;;;"}
|
package/dist/Header.js
CHANGED
|
@@ -10,6 +10,7 @@ import MoreDropdown from './MoreDropdown.js';
|
|
|
10
10
|
import Search from './Search.js';
|
|
11
11
|
import { n } from './inject-css-C2dztUxs.js';
|
|
12
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
13
14
|
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
14
15
|
import 'react-router-dom';
|
|
15
16
|
import '@bigbinary/neeto-icons/Help';
|
|
@@ -21,7 +22,6 @@ import '@bigbinary/neeto-icons/MenuVertical';
|
|
|
21
22
|
import '@bigbinary/neetoui/Dropdown';
|
|
22
23
|
import '@bigbinary/neetoui/Tooltip';
|
|
23
24
|
import 'ramda';
|
|
24
|
-
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
25
25
|
import '@babel/runtime/helpers/slicedToArray';
|
|
26
26
|
import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
27
27
|
import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
package/dist/NavigationHeader.js
CHANGED
|
@@ -22,13 +22,13 @@ import '@babel/runtime/helpers/slicedToArray';
|
|
|
22
22
|
import '@bigbinary/neeto-commons-frontend/react-utils/useOnClickOutside';
|
|
23
23
|
import '@bigbinary/neeto-commons-frontend/react-utils/useStateWithDependency';
|
|
24
24
|
import './Breadcrumbs.js';
|
|
25
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
25
26
|
import '@bigbinary/neeto-hotkeys';
|
|
26
27
|
import '@bigbinary/neeto-icons/Check';
|
|
27
28
|
import '@bigbinary/neeto-icons/Close';
|
|
28
29
|
import '@bigbinary/neetoui/Button';
|
|
29
30
|
import '@bigbinary/neetoui/Input';
|
|
30
31
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
31
|
-
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
32
32
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
33
33
|
import '@bigbinary/neeto-icons/MenuVertical';
|
|
34
34
|
import '@bigbinary/neeto-commons-frontend/react-utils/withT';
|
package/dist/Taxonomy.js
CHANGED
|
@@ -34,6 +34,7 @@ import './_commonjsHelpers-BFTU3MAI.js';
|
|
|
34
34
|
import './inject-css-C2dztUxs.js';
|
|
35
35
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
36
36
|
import './Breadcrumbs.js';
|
|
37
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
37
38
|
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
38
39
|
import 'react-router-dom';
|
|
39
40
|
import './HelpPopover.js';
|
|
@@ -49,7 +50,6 @@ import '@bigbinary/neetoui/Input';
|
|
|
49
50
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
50
51
|
import '@bigbinary/neeto-icons/MenuVertical';
|
|
51
52
|
import '@bigbinary/neetoui/Tooltip';
|
|
52
|
-
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
53
53
|
import '@bigbinary/neeto-icons/Column';
|
|
54
54
|
import './Columns-D51hN86M.js';
|
|
55
55
|
import '@dnd-kit/core';
|