@eeacms/volto-n2k 1.2.1 → 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
CHANGED
|
@@ -4,6 +4,16 @@ 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)]
|
|
7
17
|
### [1.2.1](https://github.com/eea/volto-n2k/compare/1.2.0...1.2.1) - 3 February 2026
|
|
8
18
|
|
|
9
19
|
#### :bug: Bug Fixes
|
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) => {
|
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);
|