@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 CHANGED
@@ -16,16 +16,16 @@ if (configFile) {
16
16
  voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
17
17
  }
18
18
 
19
- const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
20
- const reg = new AddonConfigurationRegistry(projectRootPath);
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(reg.packages).map((o) => [
23
+ const addonAliases = Object.keys(registry.packages).map((o) => [
24
24
  o,
25
- reg.packages[o].modulePath,
25
+ registry.packages[o].modulePath,
26
26
  ]);
27
27
 
28
- const addonExtenders = reg.getEslintExtenders().map((m) => require(m));
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/packages/volto-slate/src'],
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 Developer Documentation](https://docs.voltocms.com/getting-started/install/)
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
- 1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
31
+ For new Volto 18+ projects, use Cookieplone. It includes `mrs-developer` by default.
32
32
 
33
- npm install -g yo @plone/generator-volto mrs-developer
33
+ 1. Create a new Volto project with Cookieplone
34
34
 
35
- 1. Create new volto app
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. Install
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 develop
54
- yarn
54
+ make install
55
55
 
56
- 1. Start backend
56
+ 1. Start backend in one terminal
57
57
 
58
- docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend
58
+ make backend-start
59
59
 
60
- ...wait for backend to setup and start - `Ready to handle requests`:
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
- yarn start
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 src/addons/volto-datahub/
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 src/addons/volto-datahub/
86
+ cd packages/volto-datahub/
85
87
  ```
86
88
 
87
89
  Start:
package/README.md CHANGED
@@ -3,16 +3,16 @@
3
3
  [![Releases](https://img.shields.io/github/v/release/eea/volto-datahub)](https://github.com/eea/volto-datahub/releases)
4
4
 
5
5
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-datahub%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-datahub/job/master/display/redirect)
6
- [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-master&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-master)
7
- [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-master&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-master)
8
- [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-master&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-master)
9
- [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-master&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-master)
6
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
7
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
8
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
9
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub)
10
10
 
11
11
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-datahub%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-datahub/job/develop/display/redirect)
12
- [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-develop)
13
- [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-develop)
14
- [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-develop)
15
- [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub-develop)
12
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&branch=develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
13
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&branch=develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
14
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&branch=develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-datahub&branch=develop)
15
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-datahub&branch=develop&metric=duplicated_lines_density)](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
- * If not, create one:
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
- npm install -g yo @plone/generator-volto
61
- yo @plone/volto my-volto-project --canary --addon @eeacms/volto-datahub
62
- cd my-volto-project
67
+ uvx cookieplone project
68
+ cd project-title
63
69
  ```
64
70
 
65
- 1. Install new add-ons and restart Volto:
71
+ 1. Install or update dependencies, then start the project:
66
72
 
67
73
  ```
68
- yarn
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!
@@ -15,7 +15,7 @@ services:
15
15
  args:
16
16
  ADDON_NAME: "${ADDON_NAME}"
17
17
  ADDON_PATH: "${ADDON_PATH}"
18
- VOLTO_VERSION: ${VOLTO_VERSION:-16}
18
+ VOLTO_VERSION: ${VOLTO_VERSION:-18-yarn}
19
19
  ports:
20
20
  - "3000:3000"
21
21
  - "3001:3001"
@@ -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
- '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
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',
@@ -11,4 +11,7 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
-
14
+ #. Default: "RSS Feed"
15
+ #: components/ItemView/ItemView
16
+ msgid "rssFeed"
17
+ msgstr ""
@@ -11,4 +11,7 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
-
14
+ #. Default: "RSS Feed"
15
+ #: components/ItemView/ItemView
16
+ msgid "rssFeed"
17
+ msgstr ""
@@ -11,4 +11,7 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
-
14
+ #. Default: "RSS Feed"
15
+ #: components/ItemView/ItemView
16
+ msgid "rssFeed"
17
+ msgstr ""
@@ -11,4 +11,7 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
-
14
+ #. Default: "RSS Feed"
15
+ #: components/ItemView/ItemView
16
+ msgid "rssFeed"
17
+ msgstr ""
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: 2023-06-28T10:48:22.678Z\n"
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-datahub",
3
- "version": "2.0.5",
3
+ "version": "3.0.1",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -1,9 +1,9 @@
1
1
  import { List } from 'semantic-ui-react';
2
- import { SVGIcon } from '../utils.js';
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 '../icons/services.svg';
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 React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
- import '@testing-library/jest-dom/extend-expect';
3
+ import '@testing-library/jest-dom';
4
4
 
5
5
  import DatasetEsri from './DatasetEsri';
6
6
 
@@ -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 '../utils.js';
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/extend-expect';
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/extend-expect';
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 '../utils.js';
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 id={id} key={index}>
149
- <Accordion.Title
150
- role="button"
151
- tabIndex={0}
152
- active={active}
153
- aria-expanded={active}
154
- index={index}
155
- onClick={(e) => handleClick(e, { index, id, item })}
156
- onKeyDown={(e) => {
157
- if (e.keyCode === 13 || e.keyCode === 32) {
158
- e.preventDefault();
159
- handleClick(e, { index, id, item });
160
- }
161
- }}
162
- >
163
- <span className="dataset-title">
164
- {dataset.resourceTitleObject.default}
165
- <span className="formats">
166
- {(dataset.format || [])
167
- .filter((item, pos, self) => self.indexOf(item) === pos)
168
- .map((item, i) => {
169
- return (
170
- <span className="dh-label" key={i}>
171
- {item}
172
- </span>
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
- {Array.isArray(dataset.linkProtocol) ? (
177
- <>
178
- {dataset.linkProtocol
179
- .filter(
180
- (i) => i.includes('ESRI') || i.includes('OGC'),
181
- )
182
- .filter(
183
- (item, pos, self) => self.indexOf(item) === pos,
184
- )
185
- .map((item, i) => {
186
- return (
187
- <span className="dh-label" key={i}>
188
- {item}
189
- </span>
190
- );
191
- })}
192
- </>
193
- ) : (
194
- <>
195
- {['ESRI', 'OGC'].includes(dataset.linkProtocol) && (
196
- <span className="dh-label">
197
- {dataset.linkProtocol}
198
- </span>
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
- {archived && (
204
- <span className="dh-label inverted">Superseded</span>
205
- )}
202
+ {archived && (
203
+ <span className="dh-label inverted">Superseded</span>
204
+ )}
206
205
 
207
- {isInternal(dataset) && (
208
- <SVGIcon name={lockSVG} size="18" />
209
- )}
210
- </span>
206
+ {isInternal(dataset) && (
207
+ <SVGIcon name={lockSVG} size="18" />
208
+ )}
211
209
  </span>
212
- {active ? (
213
- <Icon className="ri-arrow-up-s-line" />
214
- ) : (
215
- <Icon className="ri-arrow-down-s-line" />
216
- )}
217
- </Accordion.Title>
218
- <Accordion.Content active={active}>
219
- <div className="dataset-content">
220
- <div>
221
- {publicationDateForResource && (
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>Published: </strong>
224
- <DateTime
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
- {resourceTemporalExtentDetails &&
232
- resourceTemporalExtentDetails?.length > 0 && (
233
- <div>
234
- <strong>Temporal coverage: </strong>
235
- {temporalDateRange}
236
- </div>
237
- )}
238
- </div>
239
-
240
- <div className="dataset-pdf">
241
- <div className="d-link">
242
- <Icon className="file pdf" />
243
- <a
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
- {!!dataset.link && dataset.link.length > 0 && (
258
- <DatasetItemDownloadList link={dataset.link} />
259
- )}
260
- </Accordion.Content>
261
- </Accordion>
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 '../utils.js';
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/extend-expect';
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 '../utils.js';
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/extend-expect';
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 { Toolbar, ErrorBoundary } from '@plone/volto/components';
7
- import { BodyClass, asyncConnect, Helmet } from '@plone/volto/helpers';
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 { Callout, Banner } from '@eeacms/volto-eea-design-system/ui';
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 && <div class="ui label archived-item">Archived</div>}
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,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
- import '@testing-library/jest-dom/extend-expect';
3
+ import '@testing-library/jest-dom';
4
4
  import MetadataSection from './MetadataSection';
5
5
 
6
6
  describe('MetadataSection', () => {
@@ -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/extend-expect';
4
+ import '@testing-library/jest-dom';
5
5
 
6
6
  import MoreLikeThis from './MoreLikeThis';
7
7
 
@@ -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 '../components/LandingPage/DatahubLandingPage';
7
+ import DatahubLandingPage from '@eeacms/volto-datahub/components/LandingPage/DatahubLandingPage';
8
8
 
9
9
  const datahubConfig = {
10
10
  title: 'Datahub',