@eeacms/volto-datahub 1.0.3 → 1.0.4

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,12 @@ 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.4](https://github.com/eea/volto-datahub/compare/1.0.3...1.0.4) - 29 November 2022
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Small improvements [kreafox - [`fd2c67c`](https://github.com/eea/volto-datahub/commit/fd2c67ce73aa716e487331f2db6c04232b59883f)]
12
+ - Add isomorphic portal [Tiberiu Ichim - [`8b183b1`](https://github.com/eea/volto-datahub/commit/8b183b1d1fd424055e5f2330b56320d930f903da)]
7
13
  ### [1.0.3](https://github.com/eea/volto-datahub/compare/1.0.2...1.0.3) - 25 November 2022
8
14
 
9
15
  #### :hammer_and_wrench: Others
@@ -29,11 +35,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
29
35
  #### :hammer_and_wrench: Others
30
36
 
31
37
  - Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
32
- - Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
33
38
  - Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
34
39
  - Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
35
40
  - Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
36
- - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
37
41
  ## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
38
42
 
39
43
  #### :nail_care: Enhancements
@@ -58,7 +62,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
58
62
  #### :hammer_and_wrench: Others
59
63
 
60
64
  - fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
61
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
62
65
  ### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
63
66
 
64
67
  #### :hammer_and_wrench: Others
@@ -147,7 +150,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
147
150
  #### :hammer_and_wrench: Others
148
151
 
149
152
  - Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
150
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
151
153
  ### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
152
154
 
153
155
  ### [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.3",
3
+ "version": "1.0.4",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -183,7 +183,12 @@ const DatasetList = (props) => {
183
183
  {/* {(item.name || item.description) && (
184
184
  <span className="item-protocol">{item.protocol}:</span>
185
185
  )} */}
186
- <a className="item-link" href={item.url}>
186
+ <a
187
+ className="item-link"
188
+ href={item.url}
189
+ target="_blank"
190
+ rel="noreferrer"
191
+ >
187
192
  {item.protocol} {item.name || item.description}
188
193
  </a>
189
194
  {is_internal_url(item.url) && (
@@ -204,7 +209,12 @@ const DatasetList = (props) => {
204
209
  {/* {(item.name || item.description) && (
205
210
  <span className="item-protocol">{item.protocol}:</span>
206
211
  )} */}
207
- <a className="item-link" href={item.url}>
212
+ <a
213
+ className="item-link"
214
+ href={item.url}
215
+ target="_blank"
216
+ rel="noreferrer"
217
+ >
208
218
  {item.protocol} {item.name || item.description}
209
219
  </a>
210
220
  {is_internal_url(item.url) && (
@@ -305,7 +315,17 @@ const Datasets = (props) => {
305
315
  </span>
306
316
  );
307
317
  })}
318
+ {(dataset.linkProtocol || [])
319
+ .filter((i) => i.includes('ESRI') || i.includes('OGC'))
320
+ .map((item, i) => {
321
+ return (
322
+ <span className="format-label" key={i}>
323
+ {item}
324
+ </span>
325
+ );
326
+ })}
308
327
  </span>
328
+
309
329
  {is_internal(dataset) && <SVGIcon name={lockSVG} size="18" />}
310
330
  </span>
311
331
  <Icon className="ri-arrow-down-s-line" />
@@ -348,14 +368,14 @@ const Datasets = (props) => {
348
368
 
349
369
  {dataset.resourceType[0] !== 'nonGeographicDataset' && (
350
370
  <div className="dataset-pdf">
351
- <div className="pdf-btn">
371
+ <div className="d-link">
352
372
  <Icon className="file pdf" />
353
373
  <a
354
374
  target="_blank"
355
375
  rel="noreferrer"
356
376
  href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
357
377
  >
358
- SDI Metadata Factsheet
378
+ Metadata Factsheet
359
379
  </a>
360
380
  </div>
361
381
  </div>
@@ -20,6 +20,17 @@ import { setDatahubResult } from '@eeacms/volto-datahub/store';
20
20
 
21
21
  const appName = 'datahub';
22
22
 
23
+ function IsomorphicPortal({ children }) {
24
+ const [isClient, setIsClient] = React.useState();
25
+ React.useEffect(() => setIsClient(true), []);
26
+
27
+ return isClient ? (
28
+ <Portal node={document.getElementById('page-header')}>{children}</Portal>
29
+ ) : (
30
+ children
31
+ );
32
+ }
33
+
23
34
  function ItemView(props) {
24
35
  const { docid, location } = props;
25
36
  const { fromPathname, fromSearch } = location?.state || {};
@@ -84,54 +95,49 @@ function ItemView(props) {
84
95
  handler();
85
96
  }, [item, dispatch, docid, rawTitle]);
86
97
 
87
- const [isClient, setIsClient] = React.useState();
88
- React.useEffect(() => setIsClient(true), []);
89
-
90
98
  return item && item._meta.found ? (
91
99
  <div className="dataset-view">
92
100
  <Helmet title={title?.raw} />
93
- {isClient && (
94
- <Portal node={document.getElementById('page-header')}>
95
- <div className="dataset">
96
- <Banner>
97
- <Banner.Content>
98
- <Banner.Subtitle>
99
- <Link
100
- to={
101
- location?.state
102
- ? { pathname: fromPathname, search: fromSearch }
103
- : {
104
- pathname: '/en/datahub/',
105
- }
106
- }
107
- >
108
- <Icon className="arrow left" />
109
- Datahub overview
110
- </Link>
111
- </Banner.Subtitle>
112
- <Banner.Title>{title?.raw}</Banner.Title>
113
- <Banner.Metadata>
114
- <Banner.MetadataField label="Prod-ID" value={prodID} />
115
- <Banner.MetadataField
116
- label="Published"
117
- type="date"
118
- value={<DateTime format="DATE_MED" value={result.issued} />}
119
- />
120
- <Banner.MetadataField
121
- label="Last modified"
122
- type="date"
123
- value={<DateTime format="DATE_MED" value={changeDate} />}
124
- />
125
- {/* <Banner.MetadataField
101
+ <IsomorphicPortal>
102
+ <div className="dataset">
103
+ <Banner>
104
+ <Banner.Content>
105
+ <Banner.Subtitle>
106
+ <Link
107
+ to={
108
+ location?.state
109
+ ? { pathname: fromPathname, search: fromSearch }
110
+ : {
111
+ pathname: '/en/datahub/',
112
+ }
113
+ }
114
+ >
115
+ <Icon className="arrow left" />
116
+ Datahub overview
117
+ </Link>
118
+ </Banner.Subtitle>
119
+ <Banner.Title>{title?.raw}</Banner.Title>
120
+ <Banner.Metadata>
121
+ <Banner.MetadataField label="Prod-ID" value={prodID} />
122
+ <Banner.MetadataField
123
+ label="Published"
124
+ type="date"
125
+ value={<DateTime format="DATE_MED" value={result.issued} />}
126
+ />
127
+ <Banner.MetadataField
128
+ label="Last modified"
129
+ type="date"
130
+ value={<DateTime format="DATE_MED" value={changeDate} />}
131
+ />
132
+ {/* <Banner.MetadataField
126
133
  label="Reading time"
127
134
  value={readingTime?.raw}
128
135
  /> */}
129
- </Banner.Metadata>
130
- </Banner.Content>
131
- </Banner>
132
- </div>
133
- </Portal>
134
- )}
136
+ </Banner.Metadata>
137
+ </Banner.Content>
138
+ </Banner>
139
+ </div>
140
+ </IsomorphicPortal>
135
141
 
136
142
  <div className="dataset-container">
137
143
  <Callout>{description?.raw}</Callout>
@@ -64,14 +64,25 @@ const MetadataSection = (props) => {
64
64
  </div>
65
65
  )}
66
66
 
67
- <div className="pdf-btn">
67
+ <div className="d-link">
68
68
  <Icon className="file pdf" />
69
69
  <a
70
70
  target="_blank"
71
71
  rel="noreferrer"
72
72
  href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
73
73
  >
74
- SDI Metadata Factsheet
74
+ Metadata Factsheet
75
+ </a>
76
+ </div>
77
+
78
+ <div className="d-link">
79
+ <i class="ri-external-link-line"></i>
80
+ <a
81
+ target="_blank"
82
+ rel="noreferrer"
83
+ href={`${appConfig.indexBaseUrl}/catalogue/srv/eng/catalog.search#/metadata/${docid}`}
84
+ >
85
+ Metadata catalogue
75
86
  </a>
76
87
  </div>
77
88
  </div>
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { Tab, Card, Menu } from 'semantic-ui-react';
3
+ import { Tab, Card, Menu, Divider } from 'semantic-ui-react';
4
4
  import useDeepCompareEffect from 'use-deep-compare-effect';
5
5
  import { useAtom } from 'jotai';
6
6
 
@@ -247,7 +247,7 @@ const LandingPage = (props) => {
247
247
  </div>
248
248
  ) : null}
249
249
  {children}
250
- <hr></hr>
250
+ <Divider />
251
251
  <div className="landing-page-cards">
252
252
  <div className="ui cards">
253
253
  <div