@eeacms/volto-datahub 2.0.5 → 3.0.1
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/.eslintrc.js +7 -6
- package/CHANGELOG.md +20 -0
- package/DEVELOP.md +19 -17
- package/README.md +33 -19
- package/docker-compose.yml +1 -1
- package/jest-addon.config.js +11 -4
- package/locales/de/LC_MESSAGES/volto.po +4 -1
- package/locales/en/LC_MESSAGES/volto.po +4 -1
- package/locales/it/LC_MESSAGES/volto.po +4 -1
- package/locales/ro/LC_MESSAGES/volto.po +4 -1
- package/locales/volto.pot +6 -3
- package/package.json +1 -1
- package/src/components/ItemView/Datasets/DatasetEsri.jsx +2 -2
- package/src/components/ItemView/Datasets/DatasetEsri.test.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetHttpLinks.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetHttpLinks.test.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetItemDownloadList.test.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetItemsList.jsx +104 -106
- package/src/components/ItemView/Datasets/DatasetLinks.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetLinks.test.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetUrls.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetUrls.test.jsx +1 -1
- package/src/components/ItemView/ItemView.jsx +10 -4
- package/src/components/ItemView/MetadataSection.test.jsx +1 -1
- package/src/components/ItemView/MoreLikeThis.test.jsx +1 -1
- package/src/config/index.js +1 -1
package/.eslintrc.js
CHANGED
|
@@ -16,16 +16,16 @@ if (configFile) {
|
|
|
16
16
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
const { AddonRegistry } = require('@plone/registry/addon-registry');
|
|
20
|
+
const { registry } = AddonRegistry.init(projectRootPath);
|
|
21
21
|
|
|
22
22
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(
|
|
23
|
+
const addonAliases = Object.keys(registry.packages).map((o) => [
|
|
24
24
|
o,
|
|
25
|
-
|
|
25
|
+
registry.packages[o].modulePath,
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
|
-
const addonExtenders =
|
|
28
|
+
const addonExtenders = registry.getEslintExtenders().map((m) => require(m));
|
|
29
29
|
|
|
30
30
|
const defaultConfig = {
|
|
31
31
|
extends: `${voltoPath}/.eslintrc`,
|
|
@@ -34,7 +34,7 @@ const defaultConfig = {
|
|
|
34
34
|
alias: {
|
|
35
35
|
map: [
|
|
36
36
|
['@plone/volto', '@plone/volto/src'],
|
|
37
|
-
['@plone/volto-slate', '@plone/volto
|
|
37
|
+
['@plone/volto-slate', '@plone/volto-slate/src'],
|
|
38
38
|
...addonAliases,
|
|
39
39
|
['@package', `${__dirname}/src`],
|
|
40
40
|
['@root', `${__dirname}/src`],
|
|
@@ -48,6 +48,7 @@ const defaultConfig = {
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
rules: {
|
|
51
|
+
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
|
|
51
52
|
'react/jsx-no-target-blank': [
|
|
52
53
|
'error',
|
|
53
54
|
{
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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
|
+
### [3.0.1](https://github.com/eea/volto-datahub/compare/3.0.0...3.0.1) - 8 April 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: make test [Alin V. (Claudiu) - [`efd16b0`](https://github.com/eea/volto-datahub/commit/efd16b0d63c5ca93f3e57c1a679eaa2e31de2c28)]
|
|
12
|
+
|
|
13
|
+
## [3.0.0](https://github.com/eea/volto-datahub/compare/2.0.5...3.0.0) - 25 March 2026
|
|
14
|
+
|
|
15
|
+
#### :rocket: New Features
|
|
16
|
+
|
|
17
|
+
- feat: Volto 18 support - refs #287700 [Alin Voinea - [`ac2b36c`](https://github.com/eea/volto-datahub/commit/ac2b36c35bcd12d7558e1b40c56c6553199feffa)]
|
|
18
|
+
|
|
19
|
+
#### :house: Internal changes
|
|
20
|
+
|
|
21
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`5e7b692`](https://github.com/eea/volto-datahub/commit/5e7b6923049dab3df919a00b01de13a4c55d1035)]
|
|
22
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`7e8048c`](https://github.com/eea/volto-datahub/commit/7e8048cec178e5efc73e30b30ef77f5f79e7f2ac)]
|
|
23
|
+
|
|
24
|
+
#### :hammer_and_wrench: Others
|
|
25
|
+
|
|
26
|
+
- tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`54937c6`](https://github.com/eea/volto-datahub/commit/54937c65d18a64477dcaf886f6e31a66675e2b1e)]
|
|
7
27
|
### [2.0.5](https://github.com/eea/volto-datahub/compare/2.0.4...2.0.5) - 4 November 2025
|
|
8
28
|
|
|
9
29
|
#### :bug: Bug Fixes
|
package/DEVELOP.md
CHANGED
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
|
|
27
27
|
### Or add @eeacms/volto-datahub to your Volto project
|
|
28
28
|
|
|
29
|
-
Before starting make sure your development environment is properly set. See [Volto
|
|
29
|
+
Before starting make sure your development environment is properly set. See the official Plone documentation for [creating a project with Cookieplone](https://6.docs.plone.org/install/create-project-cookieplone.html) and [installing an add-on in development mode in Volto 18 and 19](https://6.docs.plone.org/volto/development/add-ons/install-an-add-on-dev-18.html).
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
For new Volto 18+ projects, use Cookieplone. It includes `mrs-developer` by default.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
1. Create a new Volto project with Cookieplone
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-datahub --skip-install
|
|
38
|
-
cd my-volto-project
|
|
35
|
+
uvx cookieplone project
|
|
36
|
+
cd project-title
|
|
39
37
|
|
|
40
38
|
1. Add the following to `mrs.developer.json`:
|
|
41
39
|
|
|
42
40
|
{
|
|
43
41
|
"volto-datahub": {
|
|
42
|
+
"output": "packages",
|
|
44
43
|
"url": "https://github.com/eea/volto-datahub.git",
|
|
45
44
|
"package": "@eeacms/volto-datahub",
|
|
46
45
|
"branch": "develop",
|
|
@@ -48,28 +47,31 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
1.
|
|
50
|
+
1. Add `@eeacms/volto-datahub` to the `addons` key in your project `volto.config.js`
|
|
51
|
+
|
|
52
|
+
1. Install or refresh the project setup
|
|
52
53
|
|
|
53
|
-
make
|
|
54
|
-
yarn
|
|
54
|
+
make install
|
|
55
55
|
|
|
56
|
-
1. Start backend
|
|
56
|
+
1. Start backend in one terminal
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
make backend-start
|
|
59
59
|
|
|
60
|
-
...wait for backend to setup and start
|
|
60
|
+
...wait for backend to setup and start, ending with `Ready to handle requests`
|
|
61
61
|
|
|
62
62
|
...you can also check http://localhost:8080/Plone
|
|
63
63
|
|
|
64
|
-
1. Start frontend
|
|
64
|
+
1. Start frontend in a second terminal
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
make frontend-start
|
|
67
67
|
|
|
68
68
|
1. Go to http://localhost:3000
|
|
69
69
|
|
|
70
70
|
1. Happy hacking!
|
|
71
71
|
|
|
72
|
-
cd
|
|
72
|
+
cd packages/volto-datahub
|
|
73
|
+
|
|
74
|
+
For legacy Volto 17 projects, keep using the yarn-based workflow from the Volto 17 documentation.
|
|
73
75
|
|
|
74
76
|
## Cypress
|
|
75
77
|
|
|
@@ -81,7 +83,7 @@ project where you added `volto-datahub` to `mrs.developer.json`
|
|
|
81
83
|
Go to:
|
|
82
84
|
|
|
83
85
|
```BASH
|
|
84
|
-
cd
|
|
86
|
+
cd packages/volto-datahub/
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
Start:
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
[](https://github.com/eea/volto-datahub/releases)
|
|
4
4
|
|
|
5
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-datahub/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
|
|
10
10
|
|
|
11
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-datahub/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
EEA DataHub search [Volto](https://github.com/plone/volto) add-on
|
|
@@ -32,6 +32,11 @@ EEA DataHub search [Volto](https://github.com/plone/volto) add-on
|
|
|
32
32
|
|
|
33
33
|
Go to http://localhost:3000
|
|
34
34
|
|
|
35
|
+
`make start` now defaults to Volto 18. To run the same setup against Volto 17, use:
|
|
36
|
+
|
|
37
|
+
VOLTO_VERSION=17 make
|
|
38
|
+
VOLTO_VERSION=17 make start
|
|
39
|
+
|
|
35
40
|
### Add volto-datahub to your Volto project
|
|
36
41
|
|
|
37
42
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
@@ -45,30 +50,39 @@ Go to http://localhost:3000
|
|
|
45
50
|
* If you already have a volto project, just update `package.json`:
|
|
46
51
|
|
|
47
52
|
```JSON
|
|
48
|
-
"addons": [
|
|
49
|
-
"@eeacms/volto-datahub"
|
|
50
|
-
],
|
|
51
|
-
|
|
52
53
|
"dependencies": {
|
|
53
54
|
"@eeacms/volto-datahub": "*"
|
|
54
55
|
}
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
and `volto.config.js`:
|
|
59
|
+
|
|
60
|
+
```JavaScript
|
|
61
|
+
const addons = ['@eeacms/volto-datahub'];
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
* If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:
|
|
58
65
|
|
|
59
66
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
cd my-volto-project
|
|
67
|
+
uvx cookieplone project
|
|
68
|
+
cd project-title
|
|
63
69
|
```
|
|
64
70
|
|
|
65
|
-
1. Install
|
|
71
|
+
1. Install or update dependencies, then start the project:
|
|
66
72
|
|
|
67
73
|
```
|
|
68
|
-
|
|
69
|
-
yarn start
|
|
74
|
+
make install
|
|
70
75
|
```
|
|
71
76
|
|
|
77
|
+
For a Cookieplone project, start the backend and frontend in separate terminals:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
make backend-start
|
|
81
|
+
make frontend-start
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For a legacy Volto 17 project, install the package with `yarn` and restart the frontend as usual.
|
|
85
|
+
|
|
72
86
|
1. Go to http://localhost:3000
|
|
73
87
|
|
|
74
88
|
1. Happy editing!
|
package/docker-compose.yml
CHANGED
package/jest-addon.config.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
require('dotenv').config({ path: __dirname + '/.env' });
|
|
2
2
|
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const voltoSlatePath = fs.existsSync(
|
|
7
|
+
path.join(__dirname, '../../../node_modules/@plone/volto-slate/src'),
|
|
8
|
+
)
|
|
9
|
+
? '<rootDir>/node_modules/@plone/volto-slate/src'
|
|
10
|
+
: '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src';
|
|
11
|
+
|
|
3
12
|
module.exports = {
|
|
4
13
|
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
5
14
|
collectCoverageFrom: [
|
|
@@ -16,10 +25,8 @@ module.exports = {
|
|
|
16
25
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
17
26
|
'@eeacms/search': '<rootDir>/node_modules/@eeacms/volto-searchlib/src',
|
|
18
27
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
19
|
-
'@plone/volto-slate$':
|
|
20
|
-
|
|
21
|
-
'@plone/volto-slate/(.*)$':
|
|
22
|
-
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
|
|
28
|
+
'@plone/volto-slate$': voltoSlatePath,
|
|
29
|
+
'@plone/volto-slate/(.*)$': `${voltoSlatePath}/$1`,
|
|
23
30
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
24
31
|
'load-volto-addons':
|
|
25
32
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
package/locales/volto.pot
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2026-03-10T22:12:17.375Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
-
"MIME-Version: 1.0\n"
|
|
8
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
8
|
"Content-Transfer-Encoding: 8bit\n"
|
|
10
9
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
10
|
+
"MIME-Version: 1.0\n"
|
|
11
11
|
"Language-Code: en\n"
|
|
12
12
|
"Language-Name: English\n"
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
#. Default: "RSS Feed"
|
|
17
|
+
#: components/ItemView/ItemView
|
|
18
|
+
msgid "rssFeed"
|
|
19
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { List } from 'semantic-ui-react';
|
|
2
|
-
import { SVGIcon } from '
|
|
2
|
+
import { SVGIcon } from '@eeacms/volto-datahub/components/ItemView/utils.js';
|
|
3
3
|
|
|
4
4
|
import lockSVG from 'remixicon/icons/System/lock-line.svg';
|
|
5
5
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
6
|
-
import servicesSVG from '
|
|
6
|
+
import servicesSVG from '@eeacms/volto-datahub/components/ItemView/icons/services.svg';
|
|
7
7
|
|
|
8
8
|
const ItemLink = ({ item }) => (
|
|
9
9
|
<List.Item key={item.id}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon, List } from 'semantic-ui-react';
|
|
2
2
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
3
|
-
import { SVGIcon } from '
|
|
3
|
+
import { SVGIcon } from '@eeacms/volto-datahub/components/ItemView/utils.js';
|
|
4
4
|
|
|
5
5
|
import lockSVG from 'remixicon/icons/System/lock-line.svg';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
5
5
|
|
|
6
6
|
import DatasetHttpLinks from './DatasetHttpLinks';
|
|
@@ -5,7 +5,7 @@ import DatasetUrls from './DatasetUrls';
|
|
|
5
5
|
import DatasetLinks from './DatasetLinks';
|
|
6
6
|
import DatasetEsri from './DatasetEsri';
|
|
7
7
|
import DatasetHttpLinks from './DatasetHttpLinks';
|
|
8
|
-
import '@testing-library/jest-dom
|
|
8
|
+
import '@testing-library/jest-dom';
|
|
9
9
|
|
|
10
10
|
import DatasetItemDownloadList from './DatasetItemDownloadList';
|
|
11
11
|
|
|
@@ -6,7 +6,7 @@ import { useLocation, useHistory } from 'react-router-dom';
|
|
|
6
6
|
import { DateTime } from '@eeacms/search';
|
|
7
7
|
import { AccordionFilter } from '@eeacms/volto-accordion-block/components';
|
|
8
8
|
|
|
9
|
-
import { SVGIcon } from '
|
|
9
|
+
import { SVGIcon } from '@eeacms/volto-datahub/components/ItemView/utils.js';
|
|
10
10
|
import DatasetItemDownloadList from './DatasetItemDownloadList';
|
|
11
11
|
import { isInternal, isObsolete } from '@eeacms/volto-datahub/utils';
|
|
12
12
|
|
|
@@ -144,122 +144,120 @@ const DatasetItemsList = (props) => {
|
|
|
144
144
|
const archived = isObsolete(dataset.cl_status);
|
|
145
145
|
const active = isActive(id);
|
|
146
146
|
return (
|
|
147
|
-
|
|
148
|
-
<Accordion
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
})}
|
|
147
|
+
<Accordion id={id} key={id ?? index}>
|
|
148
|
+
<Accordion.Title
|
|
149
|
+
role="button"
|
|
150
|
+
tabIndex={0}
|
|
151
|
+
active={active}
|
|
152
|
+
aria-expanded={active}
|
|
153
|
+
index={index}
|
|
154
|
+
onClick={(e) => handleClick(e, { index, id, item })}
|
|
155
|
+
onKeyDown={(e) => {
|
|
156
|
+
if (e.keyCode === 13 || e.keyCode === 32) {
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
handleClick(e, { index, id, item });
|
|
159
|
+
}
|
|
160
|
+
}}
|
|
161
|
+
>
|
|
162
|
+
<span className="dataset-title">
|
|
163
|
+
{dataset.resourceTitleObject.default}
|
|
164
|
+
<span className="formats">
|
|
165
|
+
{(dataset.format || [])
|
|
166
|
+
.filter((item, pos, self) => self.indexOf(item) === pos)
|
|
167
|
+
.map((item, i) => {
|
|
168
|
+
return (
|
|
169
|
+
<span className="dh-label" key={i}>
|
|
170
|
+
{item}
|
|
171
|
+
</span>
|
|
172
|
+
);
|
|
173
|
+
})}
|
|
175
174
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
175
|
+
{Array.isArray(dataset.linkProtocol) ? (
|
|
176
|
+
<>
|
|
177
|
+
{dataset.linkProtocol
|
|
178
|
+
.filter(
|
|
179
|
+
(i) => i.includes('ESRI') || i.includes('OGC'),
|
|
180
|
+
)
|
|
181
|
+
.filter(
|
|
182
|
+
(item, pos, self) => self.indexOf(item) === pos,
|
|
183
|
+
)
|
|
184
|
+
.map((item, i) => {
|
|
185
|
+
return (
|
|
186
|
+
<span className="dh-label" key={i}>
|
|
187
|
+
{item}
|
|
188
|
+
</span>
|
|
189
|
+
);
|
|
190
|
+
})}
|
|
191
|
+
</>
|
|
192
|
+
) : (
|
|
193
|
+
<>
|
|
194
|
+
{['ESRI', 'OGC'].includes(dataset.linkProtocol) && (
|
|
195
|
+
<span className="dh-label">
|
|
196
|
+
{dataset.linkProtocol}
|
|
197
|
+
</span>
|
|
198
|
+
)}
|
|
199
|
+
</>
|
|
200
|
+
)}
|
|
202
201
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
{archived && (
|
|
203
|
+
<span className="dh-label inverted">Superseded</span>
|
|
204
|
+
)}
|
|
206
205
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
</span>
|
|
206
|
+
{isInternal(dataset) && (
|
|
207
|
+
<SVGIcon name={lockSVG} size="18" />
|
|
208
|
+
)}
|
|
211
209
|
</span>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
210
|
+
</span>
|
|
211
|
+
{active ? (
|
|
212
|
+
<Icon className="ri-arrow-up-s-line" />
|
|
213
|
+
) : (
|
|
214
|
+
<Icon className="ri-arrow-down-s-line" />
|
|
215
|
+
)}
|
|
216
|
+
</Accordion.Title>
|
|
217
|
+
<Accordion.Content active={active}>
|
|
218
|
+
<div className="dataset-content">
|
|
219
|
+
<div>
|
|
220
|
+
{publicationDateForResource && (
|
|
221
|
+
<div>
|
|
222
|
+
<strong>Published: </strong>
|
|
223
|
+
<DateTime
|
|
224
|
+
format="DATE_MED"
|
|
225
|
+
value={publicationDateForResource}
|
|
226
|
+
/>
|
|
227
|
+
</div>
|
|
228
|
+
)}
|
|
229
|
+
|
|
230
|
+
{resourceTemporalExtentDetails &&
|
|
231
|
+
resourceTemporalExtentDetails?.length > 0 && (
|
|
222
232
|
<div>
|
|
223
|
-
<strong>
|
|
224
|
-
|
|
225
|
-
format="DATE_MED"
|
|
226
|
-
value={publicationDateForResource}
|
|
227
|
-
/>
|
|
233
|
+
<strong>Temporal coverage: </strong>
|
|
234
|
+
{temporalDateRange}
|
|
228
235
|
</div>
|
|
229
236
|
)}
|
|
237
|
+
</div>
|
|
230
238
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
target="_blank"
|
|
245
|
-
rel="noreferrer"
|
|
246
|
-
href={
|
|
247
|
-
`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/` +
|
|
248
|
-
`${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`
|
|
249
|
-
}
|
|
250
|
-
>
|
|
251
|
-
Metadata Factsheet
|
|
252
|
-
</a>
|
|
253
|
-
</div>
|
|
239
|
+
<div className="dataset-pdf">
|
|
240
|
+
<div className="d-link">
|
|
241
|
+
<Icon className="file pdf" />
|
|
242
|
+
<a
|
|
243
|
+
target="_blank"
|
|
244
|
+
rel="noreferrer"
|
|
245
|
+
href={
|
|
246
|
+
`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/` +
|
|
247
|
+
`${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`
|
|
248
|
+
}
|
|
249
|
+
>
|
|
250
|
+
Metadata Factsheet
|
|
251
|
+
</a>
|
|
254
252
|
</div>
|
|
255
253
|
</div>
|
|
254
|
+
</div>
|
|
256
255
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
</>
|
|
256
|
+
{!!dataset.link && dataset.link.length > 0 && (
|
|
257
|
+
<DatasetItemDownloadList link={dataset.link} />
|
|
258
|
+
)}
|
|
259
|
+
</Accordion.Content>
|
|
260
|
+
</Accordion>
|
|
263
261
|
);
|
|
264
262
|
})}
|
|
265
263
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Icon, List } from 'semantic-ui-react';
|
|
2
|
-
import { SVGIcon } from '
|
|
2
|
+
import { SVGIcon } from '@eeacms/volto-datahub/components/ItemView/utils.js';
|
|
3
3
|
|
|
4
4
|
import lockSVG from 'remixicon/icons/System/lock-line.svg';
|
|
5
5
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
|
|
6
6
|
import DatasetLinks from './DatasetLinks';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Icon, List } from 'semantic-ui-react';
|
|
2
|
-
import { SVGIcon } from '
|
|
2
|
+
import { SVGIcon } from '@eeacms/volto-datahub/components/ItemView/utils.js';
|
|
3
3
|
|
|
4
4
|
import lockSVG from 'remixicon/icons/System/lock-line.svg';
|
|
5
5
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import { isInternalURL } from '@eeacms/volto-datahub/utils';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
|
|
6
6
|
import DatasetUrls from './DatasetUrls';
|
|
7
7
|
|
|
@@ -3,11 +3,15 @@ import { Portal } from 'react-portal';
|
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
4
|
import { Link, useLocation } from 'react-router-dom';
|
|
5
5
|
import { Container, Icon, Button, Popup } from 'semantic-ui-react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import Toolbar from '@plone/volto/components/manage/Toolbar/Toolbar';
|
|
7
|
+
import ErrorBoundary from '@plone/volto/components/theme/Error/ErrorBoundary';
|
|
8
|
+
import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
|
|
9
|
+
import Helmet from '@plone/volto/helpers/Helmet/Helmet';
|
|
10
|
+
import { asyncConnect } from '@plone/volto/helpers/AsyncConnect';
|
|
8
11
|
import config from '@plone/volto/registry';
|
|
9
12
|
import { rebind, applyConfigurationSchema } from '@eeacms/search';
|
|
10
|
-
import
|
|
13
|
+
import Callout from '@eeacms/volto-eea-design-system/ui/Callout/Callout';
|
|
14
|
+
import Banner from '@eeacms/volto-eea-design-system/ui/Banner/Banner';
|
|
11
15
|
import { defineMessages, useIntl } from 'react-intl';
|
|
12
16
|
import {
|
|
13
17
|
MoreLikeThis,
|
|
@@ -188,7 +192,9 @@ function ItemView(props) {
|
|
|
188
192
|
<Banner.Title>{title?.raw}</Banner.Title>
|
|
189
193
|
{/* <Banner.MetadataField label="Prod-ID" value={prodID} /> */}
|
|
190
194
|
<Banner.Metadata>
|
|
191
|
-
{obsolete &&
|
|
195
|
+
{obsolete && (
|
|
196
|
+
<div className="ui label archived-item">Archived</div>
|
|
197
|
+
)}
|
|
192
198
|
{prodID && (
|
|
193
199
|
<>
|
|
194
200
|
{prodID.length > PROD_ID_COUNT ? (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
3
|
import { runRequest } from '@eeacms/search';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
|
|
6
6
|
import MoreLikeThis from './MoreLikeThis';
|
|
7
7
|
|
package/src/config/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import views from './views';
|
|
|
4
4
|
import filters from './filters';
|
|
5
5
|
import vocabs from './vocabulary';
|
|
6
6
|
|
|
7
|
-
import DatahubLandingPage from '
|
|
7
|
+
import DatahubLandingPage from '@eeacms/volto-datahub/components/LandingPage/DatahubLandingPage';
|
|
8
8
|
|
|
9
9
|
const datahubConfig = {
|
|
10
10
|
title: 'Datahub',
|