@eeacms/volto-datahub 1.0.5 → 1.0.7

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 CHANGED
@@ -4,6 +4,16 @@ 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.7](https://github.com/eea/volto-datahub/compare/1.0.6...1.0.7) - 12 January 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - updated base url for datahub [Zoltan Szabo - [`9619cd5`](https://github.com/eea/volto-datahub/commit/9619cd5f3918c286a8a123735eaa2db5a10172e7)]
12
+ ### [1.0.6](https://github.com/eea/volto-datahub/compare/1.0.5...1.0.6) - 6 January 2023
13
+
14
+ #### :hammer_and_wrench: Others
15
+
16
+ - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`9e5dee2`](https://github.com/eea/volto-datahub/commit/9e5dee2052462d8ee06da0195bcb34b0e26d34d2)]
7
17
  ### [1.0.5](https://github.com/eea/volto-datahub/compare/1.0.4...1.0.5) - 2 December 2022
8
18
 
9
19
  #### :hammer_and_wrench: Others
@@ -41,9 +51,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
41
51
  #### :hammer_and_wrench: Others
42
52
 
43
53
  - Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
54
+ - Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
44
55
  - Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
45
56
  - Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
46
57
  - Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
58
+ - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
47
59
  ## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
48
60
 
49
61
  #### :nail_care: Enhancements
@@ -68,6 +80,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
68
80
  #### :hammer_and_wrench: Others
69
81
 
70
82
  - fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
83
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
71
84
  ### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
72
85
 
73
86
  #### :hammer_and_wrench: Others
@@ -156,6 +169,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
156
169
  #### :hammer_and_wrench: Others
157
170
 
158
171
  - Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
172
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
159
173
  ### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
160
174
 
161
175
  ### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-datahub",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -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 docid={docid} location={location} />
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')}>
package/src/index.js CHANGED
@@ -30,7 +30,7 @@ const applyConfig = (config) => {
30
30
  datahub.enableNLP = true;
31
31
  datahub.showPromptQueries = false;
32
32
  datahub.requestBodyModifiers.push(tweakForNLPService);
33
- datahub.indexBaseUrl = 'https://galliwasp.eea.europa.eu';
33
+ datahub.indexBaseUrl = 'https://sdi.eea.europa.eu';
34
34
  // datahub.resultViews[0].factories.item = "DatahubListingViewItem"
35
35
  datahub.resultItemModel.factory = 'DatahubResultModel';
36
36