@eeacms/volto-n2k 1.2.0 → 1.2.2
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 +23 -0
- package/README.md +8 -8
- package/package.json +1 -1
- package/src/components/manage/Blocks/HabitatsBanner/View.jsx +2 -10
- package/src/components/manage/Blocks/SiteHabitatsList/View.jsx +6 -3
- package/src/components/manage/Blocks/TilesImages/schema.js +11 -6
- package/src/components/manage/Blocks/TilesImages/variations/ImageGallery/ImageGallery.jsx +4 -2
- package/src/components/manage/Blocks/TilesImages/variations/ImageGallery/styles.less +4 -0
- package/src/helpers.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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.2.2](https://github.com/eea/volto-n2k/compare/1.2.1...1.2.2) - 23 February 2026
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- style: Automated code fix [eea-jenkins - [`dd7eb96`](https://github.com/eea/volto-n2k/commit/dd7eb969dbf212e8cc0e49d76dff0cedfcc26e53)]
|
|
12
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`0e3a176`](https://github.com/eea/volto-n2k/commit/0e3a176b5013e874fd769549c7c43dacdfee07d2)]
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- #286491 - refactor: move priority labels to shared helpers [Claudia Ifrim - [`4bee837`](https://github.com/eea/volto-n2k/commit/4bee8379fff1fd0b2984b2acb66c8272e7a6f1ff)]
|
|
17
|
+
### [1.2.1](https://github.com/eea/volto-n2k/compare/1.2.0...1.2.1) - 3 February 2026
|
|
18
|
+
|
|
19
|
+
#### :bug: Bug Fixes
|
|
20
|
+
|
|
21
|
+
- fix: edit style [nileshgulia1 - [`a823420`](https://github.com/eea/volto-n2k/commit/a823420dfc8cd6fc4421d2888028faaf25d2fffa)]
|
|
22
|
+
|
|
7
23
|
### [1.2.0](https://github.com/eea/volto-n2k/compare/1.1.12...1.2.0) - 3 February 2026
|
|
8
24
|
|
|
9
25
|
#### :rocket: New Features
|
|
@@ -151,6 +167,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
151
167
|
|
|
152
168
|
#### :house: Internal changes
|
|
153
169
|
|
|
170
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`e4f9fc8`](https://github.com/eea/volto-n2k/commit/e4f9fc800b753b97cca7c685bc47dd48804276f0)]
|
|
154
171
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`647d621`](https://github.com/eea/volto-n2k/commit/647d621d52400c50f5bc629b3ddc4f2121f14ffa)]
|
|
155
172
|
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`60d94b6`](https://github.com/eea/volto-n2k/commit/60d94b61ff8826abc57af9616793a1a247f585b5)]
|
|
156
173
|
|
|
@@ -165,6 +182,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
165
182
|
- try to use volto-spotlight theme in jenkins [Miu Razvan - [`ec0b952`](https://github.com/eea/volto-n2k/commit/ec0b9525b967f907922ae660bd9f520119cd80c1)]
|
|
166
183
|
- remove waitForResourceToLoad [ana-oprea - [`eaded9b`](https://github.com/eea/volto-n2k/commit/eaded9b9ecd1ca2eb78aa8dd65838c063d95db85)]
|
|
167
184
|
- update image size from 300 to 800 px [Claudia Ifrim - [`8d9270a`](https://github.com/eea/volto-n2k/commit/8d9270a09506278ceaea25e8a72abdf5b22fcc78)]
|
|
185
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`350f8a6`](https://github.com/eea/volto-n2k/commit/350f8a6928aafbf168472b572f8041a79f71f577)]
|
|
186
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`99b3a84`](https://github.com/eea/volto-n2k/commit/99b3a84a266710fadf7d430117359b741cadede8)]
|
|
187
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`050ac98`](https://github.com/eea/volto-n2k/commit/050ac982ec39e9a1b4885b665cdc118fca7b1283)]
|
|
188
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`3546040`](https://github.com/eea/volto-n2k/commit/35460409817f496fc752ab34e37d6d33a069b2e9)]
|
|
189
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`06a4ab1`](https://github.com/eea/volto-n2k/commit/06a4ab151799b8cdf4a316dbcb0c323e0f568e30)]
|
|
168
190
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4850d6a`](https://github.com/eea/volto-n2k/commit/4850d6a65349fe49dbe9244c30592ae38c9aeaba)]
|
|
169
191
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`2c91856`](https://github.com/eea/volto-n2k/commit/2c9185688a2fe6b36e5eeb2963f6c8676e3c5628)]
|
|
170
192
|
### [1.0.33](https://github.com/eea/volto-n2k/compare/1.0.32...1.0.33) - 3 July 2023
|
|
@@ -421,6 +443,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
421
443
|
- Update [razvanMiu - [`42ab50e`](https://github.com/eea/volto-n2k/commit/42ab50e6681a47251d15ac06b836c6f8c27157fa)]
|
|
422
444
|
- Added bubble chart [razvanMiu - [`89fba5e`](https://github.com/eea/volto-n2k/commit/89fba5e5db41aa955ba2d0ed58c9f0042c461504)]
|
|
423
445
|
- Group species by id_eunis in species list [razvanMiu - [`543c957`](https://github.com/eea/volto-n2k/commit/543c9573b53acd8eecc9afbb6ae7beeddba53966)]
|
|
446
|
+
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2ca3e4c`](https://github.com/eea/volto-n2k/commit/2ca3e4c092211f92339791d71db81f5b4ca2d562)]
|
|
424
447
|
- update maps - species and habitats distribution maps [Claudia Ifrim - [`ad12eb1`](https://github.com/eea/volto-n2k/commit/ad12eb141907d6f28444f1eafc3f687735d2a68d)]
|
|
425
448
|
- update format for common name and author [Claudia Ifrim - [`26b7a2f`](https://github.com/eea/volto-n2k/commit/26b7a2f3d20c7701b57fb24f39fc7dfeceec3ce8)]
|
|
426
449
|
- update format for species name (common / scientific) [Claudia Ifrim - [`abdedcf`](https://github.com/eea/volto-n2k/commit/abdedcfe645665031dedf050fd2c5cdde8c14a50)]
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
[](https://github.com/eea/volto-n2k/releases)
|
|
4
4
|
|
|
5
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-n2k/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-n2k
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k)
|
|
10
10
|
|
|
11
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-n2k/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-n2k
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k&branch=develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k&branch=develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k&branch=develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-n2k&branch=develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
[Volto](https://github.com/plone/volto) add-on
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VisibilitySensor } from '@eeacms/volto-datablocks/components';
|
|
2
2
|
import { connectToMultipleProviders } from '@eeacms/volto-datablocks/hocs';
|
|
3
|
-
import { replaceQueryParam } from '@eeacms/volto-n2k/helpers';
|
|
3
|
+
import { replaceQueryParam, priorityLabels } from '@eeacms/volto-n2k/helpers';
|
|
4
4
|
import arrowLeft from '@eeacms/volto-n2k/icons/arrow-left.svg';
|
|
5
5
|
import arrowRight from '@eeacms/volto-n2k/icons/arrow-right.svg';
|
|
6
6
|
import loadable from '@loadable/component';
|
|
@@ -56,15 +56,7 @@ const ViewComponent = (props) => {
|
|
|
56
56
|
const priorityLabel = useMemo(() => {
|
|
57
57
|
const priority = habitat_prioriy[0];
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
return 'Conditional priority';
|
|
61
|
-
}
|
|
62
|
-
if (priority === null) {
|
|
63
|
-
return '';
|
|
64
|
-
}
|
|
65
|
-
if (priority === 1) {
|
|
66
|
-
return 'Priority habitat';
|
|
67
|
-
}
|
|
59
|
+
return priorityLabels.habitat_prioriy[priority] ?? '';
|
|
68
60
|
}, [habitat_prioriy]);
|
|
69
61
|
|
|
70
62
|
const pictures = useMemo(
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import { Container, Pagination, Grid } from 'semantic-ui-react';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
getObjectByIndex,
|
|
6
|
+
photoPlaceholders,
|
|
7
|
+
priorityLabels,
|
|
8
|
+
} from '@eeacms/volto-n2k/helpers';
|
|
5
9
|
import { Filters } from './Filters';
|
|
6
10
|
|
|
7
11
|
import './style.less';
|
|
8
|
-
import { filtersLabels } from './utils';
|
|
9
12
|
|
|
10
13
|
const getCurrentPageLength = (pagination, arr) => {
|
|
11
14
|
const totalPages = Math.ceil(pagination.totalItems / pagination.itemsPerPage);
|
|
@@ -17,7 +20,7 @@ const getCurrentPageLength = (pagination, arr) => {
|
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
function getPriorityString(priority) {
|
|
20
|
-
return
|
|
23
|
+
return priorityLabels.habitat_prioriy[priority] || '';
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
const View = (props) => {
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
const imageSchema = {
|
|
1
|
+
const imageSchema = ({ formData }) => ({
|
|
2
2
|
title: 'Image',
|
|
3
3
|
fieldsets: [
|
|
4
4
|
{
|
|
5
5
|
id: 'default',
|
|
6
6
|
title: 'Default',
|
|
7
|
-
fields: [
|
|
7
|
+
fields: [
|
|
8
|
+
'image',
|
|
9
|
+
...(formData?.variation !== 'imageGallery' ? ['link'] : []),
|
|
10
|
+
'title',
|
|
11
|
+
'copyright',
|
|
12
|
+
],
|
|
8
13
|
},
|
|
9
14
|
],
|
|
10
15
|
properties: {
|
|
11
16
|
image: {
|
|
12
|
-
title: '
|
|
17
|
+
title: 'Image',
|
|
13
18
|
widget: 'object_by_path',
|
|
14
19
|
},
|
|
15
20
|
link: {
|
|
@@ -23,8 +28,8 @@ const imageSchema = {
|
|
|
23
28
|
title: 'Copyright',
|
|
24
29
|
},
|
|
25
30
|
},
|
|
26
|
-
required: [
|
|
27
|
-
};
|
|
31
|
+
required: [],
|
|
32
|
+
});
|
|
28
33
|
|
|
29
34
|
export default function getSchema({ formData }) {
|
|
30
35
|
return {
|
|
@@ -72,7 +77,7 @@ export default function getSchema({ formData }) {
|
|
|
72
77
|
images: {
|
|
73
78
|
title: 'Images',
|
|
74
79
|
widget: 'object_list',
|
|
75
|
-
schema: imageSchema,
|
|
80
|
+
schema: imageSchema({ formData }),
|
|
76
81
|
},
|
|
77
82
|
},
|
|
78
83
|
required: [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import loadable from '@loadable/component';
|
|
3
3
|
import { Modal, Image } from 'semantic-ui-react';
|
|
4
|
-
|
|
4
|
+
import cx from 'classnames';
|
|
5
5
|
import 'slick-carousel/slick/slick.css';
|
|
6
6
|
import 'slick-carousel/slick/slick-theme.css';
|
|
7
7
|
|
|
@@ -56,7 +56,9 @@ const ImageGallery = (props) => {
|
|
|
56
56
|
<Image
|
|
57
57
|
src={`${items[0]?.image}/@@images/image/preview`}
|
|
58
58
|
alt={items[0]?.title}
|
|
59
|
-
className=
|
|
59
|
+
className={cx('preview-image', {
|
|
60
|
+
'image-gallery-preview': mode === 'edit',
|
|
61
|
+
})}
|
|
60
62
|
/>
|
|
61
63
|
</div>
|
|
62
64
|
{mode === 'view' ? (
|
package/src/helpers.js
CHANGED
|
@@ -30,6 +30,14 @@ export const photoPlaceholders = {
|
|
|
30
30
|
default: defaultPNG,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
export const priorityLabels = {
|
|
34
|
+
habitat_prioriy: {
|
|
35
|
+
1: 'Priority habitat',
|
|
36
|
+
0: 'Conditional priority',
|
|
37
|
+
'-1': '',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
33
41
|
export const getObjectByIndex = (provider_data, index) => {
|
|
34
42
|
const obj = {};
|
|
35
43
|
const keys = Object.keys(provider_data);
|