@truedat/se 6.1.5 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/components/SearchHome.js +19 -14
- package/src/routines.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/se",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Truedat Web Search Engine",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.5",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "6.
|
|
37
|
+
"@truedat/test": "6.2.0",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@truedat/core": "6.
|
|
89
|
+
"@truedat/core": "6.2.0",
|
|
90
90
|
"path-to-regexp": "^1.7.0",
|
|
91
91
|
"prop-types": "^15.8.1",
|
|
92
92
|
"react-intl": "^5.20.10",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"react-dom": ">= 16.8.6 < 17",
|
|
104
104
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "5c10ee429997ab081477edf0679547eb4bc11f9b"
|
|
107
107
|
}
|
|
@@ -8,9 +8,9 @@ import { Image, Search } from "semantic-ui-react";
|
|
|
8
8
|
import { SEARCH_RESULTS } from "@truedat/core/routes";
|
|
9
9
|
import searchImage from "assets/searching.png";
|
|
10
10
|
import { searchResultsSelector } from "../selectors";
|
|
11
|
-
import { fetchSearch
|
|
11
|
+
import { fetchSearch } from "../routines";
|
|
12
12
|
|
|
13
|
-
const SearchHome = ({ fetchSearch, loading,
|
|
13
|
+
const SearchHome = ({ fetchSearch, loading, results, searchHomeAddon }) => {
|
|
14
14
|
const { formatMessage } = useIntl();
|
|
15
15
|
const history = useHistory();
|
|
16
16
|
|
|
@@ -35,31 +35,36 @@ const SearchHome = ({ fetchSearch, loading, redirectToItem, results }) => {
|
|
|
35
35
|
description: formatMessage({ id: `${index}.search.description` }),
|
|
36
36
|
title: path ? _.join(" > ")([...path, name]) : name,
|
|
37
37
|
as: Link,
|
|
38
|
-
to
|
|
39
|
-
}))
|
|
38
|
+
to,
|
|
39
|
+
})),
|
|
40
40
|
};
|
|
41
41
|
return (
|
|
42
|
-
|
|
43
|
-
<div className="search
|
|
44
|
-
<
|
|
45
|
-
|
|
42
|
+
<>
|
|
43
|
+
<div className="search home wrapper">
|
|
44
|
+
<div className="search icon size">
|
|
45
|
+
<Image className="search" src={searchImage} />
|
|
46
|
+
<Search {...props} />
|
|
47
|
+
</div>
|
|
46
48
|
</div>
|
|
47
|
-
|
|
49
|
+
{searchHomeAddon ? (
|
|
50
|
+
<div className="search home wrapper">{searchHomeAddon}</div>
|
|
51
|
+
) : null}
|
|
52
|
+
</>
|
|
48
53
|
);
|
|
49
54
|
};
|
|
50
55
|
|
|
51
56
|
SearchHome.propTypes = {
|
|
52
57
|
fetchSearch: PropTypes.func,
|
|
53
|
-
redirectToItem: PropTypes.func,
|
|
54
58
|
loading: PropTypes.bool,
|
|
55
|
-
results: PropTypes.array
|
|
59
|
+
results: PropTypes.array,
|
|
56
60
|
};
|
|
57
61
|
|
|
58
|
-
const mapDispatchToProps = { fetchSearch
|
|
62
|
+
const mapDispatchToProps = { fetchSearch };
|
|
59
63
|
|
|
60
|
-
const mapStateToProps = state => ({
|
|
64
|
+
const mapStateToProps = (state) => ({
|
|
61
65
|
results: searchResultsSelector(state),
|
|
62
|
-
loading: state.searchLoading
|
|
66
|
+
loading: state.searchLoading,
|
|
67
|
+
searchHomeAddon: state.searchHomeAddon,
|
|
63
68
|
});
|
|
64
69
|
|
|
65
70
|
export default connect(mapStateToProps, mapDispatchToProps)(SearchHome);
|
package/src/routines.js
CHANGED