@eeacms/volto-datahub 2.0.4 → 3.0.0
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 +18 -13
- 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.test.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/DatasetLinks.test.jsx +1 -1
- package/src/components/ItemView/Datasets/DatasetUrls.test.jsx +1 -1
- package/src/components/ItemView/ItemView.jsx +25 -19
- package/src/components/ItemView/MetadataSection.test.jsx +1 -1
- package/src/components/ItemView/MoreLikeThis.test.jsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.0](https://github.com/eea/volto-datahub/compare/2.0.5...3.0.0) - 25 March 2026
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: Volto 18 support - refs #287700 [Alin Voinea - [`ac2b36c`](https://github.com/eea/volto-datahub/commit/ac2b36c35bcd12d7558e1b40c56c6553199feffa)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
#### :hammer_and_wrench: Others
|
|
17
|
+
|
|
18
|
+
- tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`54937c6`](https://github.com/eea/volto-datahub/commit/54937c65d18a64477dcaf886f6e31a66675e2b1e)]
|
|
19
|
+
### [2.0.5](https://github.com/eea/volto-datahub/compare/2.0.4...2.0.5) - 4 November 2025
|
|
20
|
+
|
|
21
|
+
#### :bug: Bug Fixes
|
|
22
|
+
|
|
23
|
+
- fix: error in itemView refs#291209, wrap inside ErrorBoundary [nileshgulia1 - [`b0ee8de`](https://github.com/eea/volto-datahub/commit/b0ee8ded47539f1119c96fcca98885d52700857e)]
|
|
24
|
+
|
|
7
25
|
### [2.0.4](https://github.com/eea/volto-datahub/compare/2.0.3...2.0.4) - 29 October 2025
|
|
8
26
|
|
|
9
27
|
#### :bug: Bug Fixes
|
|
@@ -52,7 +70,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
52
70
|
|
|
53
71
|
#### :house: Internal changes
|
|
54
72
|
|
|
55
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`8438e52`](https://github.com/eea/volto-datahub/commit/8438e52e811c46aa542a601b75f4198b214b5ffd)]
|
|
56
73
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`da129fb`](https://github.com/eea/volto-datahub/commit/da129fb1259a26c87259f380a37db688281b192d)]
|
|
57
74
|
|
|
58
75
|
#### :hammer_and_wrench: Others
|
|
@@ -62,11 +79,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
62
79
|
- remove eslint file from ignoring [Teodor - [`39f6633`](https://github.com/eea/volto-datahub/commit/39f66338f2f7d1797343b88aa20dea9425f37014)]
|
|
63
80
|
- change eslint rule [Teodor - [`73e4bc2`](https://github.com/eea/volto-datahub/commit/73e4bc217e9aa9804f0f57cf9e3488cb2e1e85b8)]
|
|
64
81
|
- Ref #263008 [Teodor - [`9d58c52`](https://github.com/eea/volto-datahub/commit/9d58c52b6bc207c5c622c0428be39ae18875cf64)]
|
|
65
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`524fcc6`](https://github.com/eea/volto-datahub/commit/524fcc6a40e1437dac449543607089b4ba4feb21)]
|
|
66
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`98c01ac`](https://github.com/eea/volto-datahub/commit/98c01ac599087cf5a9011d3384483d023a4d12bb)]
|
|
67
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`bdcc59c`](https://github.com/eea/volto-datahub/commit/bdcc59c2d4cfd8beba4386d6f23f220c777f0513)]
|
|
68
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`5d12d14`](https://github.com/eea/volto-datahub/commit/5d12d1428a547b8628231dc38110a55b806edebb)]
|
|
69
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`dba984e`](https://github.com/eea/volto-datahub/commit/dba984e6b840c451b8de15d40de0e49c1dd09a9b)]
|
|
70
82
|
### [1.0.32](https://github.com/eea/volto-datahub/compare/1.0.31...1.0.32) - 11 October 2023
|
|
71
83
|
|
|
72
84
|
#### :house: Internal changes
|
|
@@ -112,7 +124,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
112
124
|
- Fix content type for rss feed [Tiberiu Ichim - [`65b73a7`](https://github.com/eea/volto-datahub/commit/65b73a79d73e626f652716305e80d9a2b017c85c)]
|
|
113
125
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`ead1c04`](https://github.com/eea/volto-datahub/commit/ead1c042d1358b385c19ec66ec84d7c736574b1d)]
|
|
114
126
|
- Added 'DOI' links to datahub [Zoltan Szabo - [`b33a657`](https://github.com/eea/volto-datahub/commit/b33a657096eaec4caa641379e69e941a3b2c1583)]
|
|
115
|
-
- test: Fix eslint and yarn i18n [Alin Voinea - [`39a4a69`](https://github.com/eea/volto-datahub/commit/39a4a695733514890075886753b9d7b91d853646)]
|
|
116
127
|
- i18n: Add en [Alin Voinea - [`cdb303f`](https://github.com/eea/volto-datahub/commit/cdb303f2ac5e1f9eb22eda46bb58087c62af6ba5)]
|
|
117
128
|
### [1.0.27](https://github.com/eea/volto-datahub/compare/1.0.26...1.0.27) - 25 August 2023
|
|
118
129
|
|
|
@@ -160,7 +171,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
160
171
|
|
|
161
172
|
#### :house: Internal changes
|
|
162
173
|
|
|
163
|
-
- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`e5933ce`](https://github.com/eea/volto-datahub/commit/e5933ce8879d98aabe0bab56980dbd50ce856a36)]
|
|
164
174
|
|
|
165
175
|
#### :hammer_and_wrench: Others
|
|
166
176
|
|
|
@@ -215,7 +225,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
215
225
|
- added utils.js [Zoltan Szabo - [`fdb33c3`](https://github.com/eea/volto-datahub/commit/fdb33c37e1af2fe071dbe8f4f5dcd2b82932edc8)]
|
|
216
226
|
- Show 'Obsolete' info in the metadata section in the banner [Zoltan Szabo - [`fddfd2a`](https://github.com/eea/volto-datahub/commit/fddfd2aea63d1a1d1567c163ab29dd7119781117)]
|
|
217
227
|
- Show 'More information' section only if it's not empty [Zoltan Szabo - [`612f035`](https://github.com/eea/volto-datahub/commit/612f03509c6adf143631ae6dee5ca2bd48a501c3)]
|
|
218
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b9100f6`](https://github.com/eea/volto-datahub/commit/b9100f6b2b2e9e9a26b9c11708c8fda94137cecc)]
|
|
219
228
|
### [1.0.15](https://github.com/eea/volto-datahub/compare/1.0.14...1.0.15) - 1 March 2023
|
|
220
229
|
|
|
221
230
|
### [1.0.14](https://github.com/eea/volto-datahub/compare/1.0.13...1.0.14) - 1 March 2023
|
|
@@ -308,11 +317,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
308
317
|
#### :hammer_and_wrench: Others
|
|
309
318
|
|
|
310
319
|
- Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
|
|
311
|
-
- Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
|
|
312
320
|
- Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
|
|
313
321
|
- Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
|
|
314
322
|
- Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
|
|
315
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
|
|
316
323
|
## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
|
|
317
324
|
|
|
318
325
|
#### :nail_care: Enhancements
|
|
@@ -337,7 +344,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
337
344
|
#### :hammer_and_wrench: Others
|
|
338
345
|
|
|
339
346
|
- fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
|
|
340
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
|
|
341
347
|
### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
|
|
342
348
|
|
|
343
349
|
#### :hammer_and_wrench: Others
|
|
@@ -426,7 +432,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
426
432
|
#### :hammer_and_wrench: Others
|
|
427
433
|
|
|
428
434
|
- Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
|
|
429
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
|
|
430
435
|
### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
|
|
431
436
|
|
|
432
437
|
### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
|
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,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
|
|
|
@@ -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,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,7 +3,7 @@ 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 } from '@plone/volto/components';
|
|
6
|
+
import { Toolbar, ErrorBoundary } from '@plone/volto/components';
|
|
7
7
|
import { BodyClass, asyncConnect, Helmet } from '@plone/volto/helpers';
|
|
8
8
|
import config from '@plone/volto/registry';
|
|
9
9
|
import { rebind, applyConfigurationSchema } from '@eeacms/search';
|
|
@@ -25,6 +25,9 @@ const WORD_COUNT = 60;
|
|
|
25
25
|
const PROD_ID_COUNT = 3;
|
|
26
26
|
|
|
27
27
|
const splitContent = (content, wordCount) => {
|
|
28
|
+
if (!content || typeof content !== 'string') {
|
|
29
|
+
return ['', ''];
|
|
30
|
+
}
|
|
28
31
|
const words = content.split(' ');
|
|
29
32
|
let firstTextPart = '',
|
|
30
33
|
secondTextPart = '';
|
|
@@ -101,9 +104,10 @@ function ItemView(props) {
|
|
|
101
104
|
|
|
102
105
|
const rawTitle = item && item._meta.found ? title?.raw || '' : docid;
|
|
103
106
|
|
|
104
|
-
const
|
|
107
|
+
const descriptionText = description?.raw || '';
|
|
108
|
+
const splitDescription = descriptionText.split(' ').length > WORD_COUNT;
|
|
105
109
|
const [firstTextPart, secondTextPart] = splitContent(
|
|
106
|
-
|
|
110
|
+
descriptionText,
|
|
107
111
|
WORD_COUNT,
|
|
108
112
|
);
|
|
109
113
|
const [isReadMore, setIsReadMore] = React.useState(false);
|
|
@@ -251,7 +255,7 @@ function ItemView(props) {
|
|
|
251
255
|
</Button>
|
|
252
256
|
</p>
|
|
253
257
|
) : (
|
|
254
|
-
<p>{
|
|
258
|
+
<p>{descriptionText}</p>
|
|
255
259
|
)}
|
|
256
260
|
</Callout>
|
|
257
261
|
</div>
|
|
@@ -278,21 +282,23 @@ function DatahubItemView(props) {
|
|
|
278
282
|
const { staticContext = {} } = props;
|
|
279
283
|
|
|
280
284
|
return (
|
|
281
|
-
<
|
|
282
|
-
<
|
|
283
|
-
|
|
284
|
-
<
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
285
|
+
<ErrorBoundary>
|
|
286
|
+
<div id="view">
|
|
287
|
+
<BodyClass className="view-datahub-item" />
|
|
288
|
+
<Container className="view-wrapper">
|
|
289
|
+
<ItemView
|
|
290
|
+
docid={docid}
|
|
291
|
+
location={location}
|
|
292
|
+
staticContext={staticContext}
|
|
293
|
+
/>
|
|
294
|
+
</Container>
|
|
295
|
+
{isClient && (
|
|
296
|
+
<Portal node={document.getElementById('toolbar')}>
|
|
297
|
+
<Toolbar pathname={props.pathname || ''} inner={<span />} />
|
|
298
|
+
</Portal>
|
|
299
|
+
)}
|
|
300
|
+
</div>
|
|
301
|
+
</ErrorBoundary>
|
|
296
302
|
);
|
|
297
303
|
}
|
|
298
304
|
export default asyncConnect([
|
|
@@ -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
|
|