@eeacms/volto-datahub 1.0.5 → 1.0.6
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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/components/ItemView/ItemView.jsx +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [1.0.6](https://github.com/eea/volto-datahub/compare/1.0.5...1.0.6) - 29 December 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`9e5dee2`](https://github.com/eea/volto-datahub/commit/9e5dee2052462d8ee06da0195bcb34b0e26d34d2)]
|
|
7
12
|
### [1.0.5](https://github.com/eea/volto-datahub/compare/1.0.4...1.0.5) - 2 December 2022
|
|
8
13
|
|
|
9
14
|
#### :hammer_and_wrench: Others
|
|
@@ -41,9 +46,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
41
46
|
#### :hammer_and_wrench: Others
|
|
42
47
|
|
|
43
48
|
- Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
|
|
49
|
+
- Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
|
|
44
50
|
- Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
|
|
45
51
|
- Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
|
|
46
52
|
- Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
|
|
53
|
+
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
|
|
47
54
|
## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
|
|
48
55
|
|
|
49
56
|
#### :nail_care: Enhancements
|
|
@@ -68,6 +75,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
68
75
|
#### :hammer_and_wrench: Others
|
|
69
76
|
|
|
70
77
|
- fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
|
|
78
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
|
|
71
79
|
### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
|
|
72
80
|
|
|
73
81
|
#### :hammer_and_wrench: Others
|
|
@@ -156,6 +164,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
156
164
|
#### :hammer_and_wrench: Others
|
|
157
165
|
|
|
158
166
|
- Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
|
|
167
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
|
|
159
168
|
### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
|
|
160
169
|
|
|
161
170
|
### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
|
package/package.json
CHANGED
|
@@ -32,11 +32,15 @@ function IsomorphicPortal({ children }) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
function ItemView(props) {
|
|
35
|
-
const { docid, location } = props;
|
|
35
|
+
const { docid, location, staticContext } = props;
|
|
36
36
|
const { fromPathname, fromSearch } = location?.state || {};
|
|
37
37
|
const dispatch = useDispatch();
|
|
38
38
|
// const content = useSelector((state) => state.content.data);
|
|
39
39
|
let result = useSelector((state) => state.datahub_results?.[docid]);
|
|
40
|
+
if (__SERVER__ && !result?._original?.found) {
|
|
41
|
+
staticContext.error_code = 404;
|
|
42
|
+
staticContext.error = 'NotFound';
|
|
43
|
+
}
|
|
40
44
|
const registry = config.settings.searchlib;
|
|
41
45
|
const appConfig = React.useMemo(
|
|
42
46
|
() => applyConfigurationSchema(rebind(registry.searchui[appName])),
|
|
@@ -171,6 +175,7 @@ function DatahubItemView(props) {
|
|
|
171
175
|
React.useEffect(() => setIsClient(true), []);
|
|
172
176
|
|
|
173
177
|
const docid = props.match?.params?.id;
|
|
178
|
+
const { staticContext = {} } = props;
|
|
174
179
|
|
|
175
180
|
return (
|
|
176
181
|
<div id="view">
|
|
@@ -178,7 +183,11 @@ function DatahubItemView(props) {
|
|
|
178
183
|
{/* Body class if displayName in component is set */}
|
|
179
184
|
<BodyClass className="view-datahub-item" />
|
|
180
185
|
<Container className="view-wrapper">
|
|
181
|
-
<ItemView
|
|
186
|
+
<ItemView
|
|
187
|
+
docid={docid}
|
|
188
|
+
location={location}
|
|
189
|
+
staticContext={staticContext}
|
|
190
|
+
/>
|
|
182
191
|
</Container>
|
|
183
192
|
{isClient && (
|
|
184
193
|
<Portal node={document.getElementById('toolbar')}>
|