@eeacms/volto-marine-policy 2.0.37 → 2.0.39

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,14 @@ 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
+ ### [2.0.39](https://github.com/eea/volto-marine-policy/compare/2.0.38...2.0.39) - 12 January 2026
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: added new project to blueparks projects [laszlocseh - [`f26543c`](https://github.com/eea/volto-marine-policy/commit/f26543c2842dda09095588d27f5452ec875b224d)]
12
+
13
+ ### [2.0.38](https://github.com/eea/volto-marine-policy/compare/2.0.37...2.0.38) - 8 January 2026
14
+
7
15
  ### [2.0.37](https://github.com/eea/volto-marine-policy/compare/2.0.36...2.0.37) - 27 November 2025
8
16
 
9
17
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-marine-policy",
3
- "version": "2.0.37",
3
+ "version": "2.0.39",
4
4
  "description": "@eeacms/volto-marine-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -15,6 +15,7 @@ import InfoOverlay from './InfoOverlay';
15
15
  import FeatureInteraction from './FeatureInteraction';
16
16
 
17
17
  import {
18
+ BLUEPARKProjects,
18
19
  centerAndResetMapZoom,
19
20
  clearFilters,
20
21
  getFeatures,
@@ -255,7 +256,7 @@ const selectedClusterStyle = ({ selectedFeature, ol, mapVariation }) => {
255
256
  iconSize = 'tiny';
256
257
 
257
258
  if (
258
- ['BioProtect', 'BLUE CONNECT', 'BLUE4ALL', 'EFFECTIVE'].includes(
259
+ BLUEPARKProjects.includes(
259
260
  feature.values_.features[0].values_['project'],
260
261
  )
261
262
  ) {
@@ -53,7 +53,7 @@ function FeatureInteraction({ onFeatureSelect, ol }) {
53
53
 
54
54
  features.forEach((feature) => {
55
55
  const subfeatures = feature.values_.features;
56
- if (subfeatures.length === 1) {
56
+ if (subfeatures.length >= 1) {
57
57
  const selectedFeature = subfeatures[0].values_;
58
58
  // if (hideFilters) {
59
59
  // const url = window.location.origin + selectedFeature.path;
@@ -163,10 +163,10 @@ const ObjectivesChart = ({
163
163
  chartRef.current.style.cursor = 'default'; // Reset cursor
164
164
  }
165
165
  };
166
-
167
166
  const labels = Object.keys(objectives);
168
167
  const values = Object.values(objectives);
169
- const totalCount = values.reduce((acc, curr) => acc + curr, 0);
168
+ const totalCount = items ? items.length : 0;
169
+ // const totalCount = values.reduce((acc, curr) => acc + curr, 0);
170
170
  const customColors = ['#007b6c', '#fdaf20', '#004b7f', '#f9eb8a', '#9e83b6']; // Adjust colors as needed
171
171
  const grayColor = '#d3d3d3';
172
172
  // const pull = labels.map((_, i) => (i === highlightedIndex ? 0.1 : 0));
@@ -1,3 +1,11 @@
1
+ export const BLUEPARKProjects = [
2
+ 'BioProtect',
3
+ 'BLUE CONNECT',
4
+ 'BLUE4ALL',
5
+ 'EFFECTIVE',
6
+ 'SEAMPHONI',
7
+ ];
8
+
1
9
  export const objectivesCustomOrder = [
2
10
  'Objective 1: Protect and restore marine and freshwater ecosystems and biodiversity',
3
11
  'Objective 2: Prevent and eliminate pollution of our oceans, seas and waters',
@@ -206,12 +214,7 @@ export function filterCases(cases, activeFilters, indicatorOnly, mapVariation) {
206
214
  // BioProtect, BLUE CONNECT, BLUE4ALL, EFFECTIVE
207
215
  if (['blueParks'].includes(mapVariation)) {
208
216
  let project = _case.properties.project;
209
- if (
210
- ['BioProtect', 'BLUE CONNECT', 'BLUE4ALL', 'EFFECTIVE'].includes(
211
- project,
212
- )
213
- )
214
- flag_project = true;
217
+ if (BLUEPARKProjects.includes(project)) flag_project = true;
215
218
  } else if (!activeFilters.project_filter.length) {
216
219
  flag_project = true;
217
220
  } else {