@eeacms/volto-cca-policy 1.0.26 → 1.0.27
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,12 @@ 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.0.27](https://github.com/eea/volto-cca-policy/compare/1.0.26...1.0.27) - 21 September 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix(navigator): country filtering on map view - refs #304610 [kreafox - [`2b8c52d`](https://github.com/eea/volto-cca-policy/commit/2b8c52dee15ed7a43a90eb2214db6557d7d3c964)]
|
|
12
|
+
|
|
7
13
|
### [1.0.26](https://github.com/eea/volto-cca-policy/compare/1.0.25...1.0.26) - 21 September 2026
|
|
8
14
|
|
|
9
15
|
#### :rocket: New Features
|
|
@@ -461,6 +467,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
461
467
|
|
|
462
468
|
#### :house: Internal changes
|
|
463
469
|
|
|
470
|
+
- chore: [JENKINSFILE] sanitize sonarqube command Refs #305084 [valentinab25 - [`8106a44`](https://github.com/eea/volto-cca-policy/commit/8106a44e8f40dd360a274cede4b3f9c215d026cf)]
|
|
464
471
|
|
|
465
472
|
#### :hammer_and_wrench: Others
|
|
466
473
|
|
|
@@ -791,6 +798,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
791
798
|
|
|
792
799
|
#### :house: Internal changes
|
|
793
800
|
|
|
801
|
+
- chore: [JENKINSFILE] sanitize sonarqube command Refs #305084 [valentinab25 - [`8106a44`](https://github.com/eea/volto-cca-policy/commit/8106a44e8f40dd360a274cede4b3f9c215d026cf)]
|
|
794
802
|
|
|
795
803
|
#### :hammer_and_wrench: Others
|
|
796
804
|
|
|
@@ -1327,6 +1335,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1327
1335
|
|
|
1328
1336
|
#### :house: Internal changes
|
|
1329
1337
|
|
|
1338
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`e901251`](https://github.com/eea/volto-cca-policy/commit/e901251592eb54609fbc7eb8fcf7bd452c2da9cd)]
|
|
1330
1339
|
|
|
1331
1340
|
### [0.3.102](https://github.com/eea/volto-cca-policy/compare/0.3.101...0.3.102) - 24 February 2026
|
|
1332
1341
|
|
|
@@ -1336,6 +1345,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1336
1345
|
|
|
1337
1346
|
#### :house: Internal changes
|
|
1338
1347
|
|
|
1348
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`8b3699a`](https://github.com/eea/volto-cca-policy/commit/8b3699a6cbaef662b5e80884ac2c1f7dc9c6591e)]
|
|
1339
1349
|
|
|
1340
1350
|
### [0.3.101](https://github.com/eea/volto-cca-policy/compare/0.3.100...0.3.101) - 28 January 2026
|
|
1341
1351
|
|
|
@@ -1623,6 +1633,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1623
1633
|
- style: fix item spacing [kreafox - [`7d4535d`](https://github.com/eea/volto-cca-policy/commit/7d4535dbc486e6cb80fc55d6ac8c7c01d9cf48af)]
|
|
1624
1634
|
- chore: code cleanup [kreafox - [`842419b`](https://github.com/eea/volto-cca-policy/commit/842419b1bce3dc624755c81c9dea672198cab9e2)]
|
|
1625
1635
|
- style: update teaser block styling [kreafox - [`1e0cad8`](https://github.com/eea/volto-cca-policy/commit/1e0cad8e1ed3ae827ee868dce8ad50b292a937ba)]
|
|
1636
|
+
- chore: update Makefile, run yarn i18n [kreafox - [`61e6962`](https://github.com/eea/volto-cca-policy/commit/61e6962901068ae6512265417a730bd9befd65fe)]
|
|
1626
1637
|
- chore: move styling to theme folder [kreafox - [`8cf6a1b`](https://github.com/eea/volto-cca-policy/commit/8cf6a1b8b14abf472a9c61b28db574f6d9e0bd3b)]
|
|
1627
1638
|
- chore: remove ArrayWidget customization [kreafox - [`249bf93`](https://github.com/eea/volto-cca-policy/commit/249bf93054f7726c3d57a8b8ca01b75cd0d30522)]
|
|
1628
1639
|
- chore: remove Footer customization [kreafox - [`7038af3`](https://github.com/eea/volto-cca-policy/commit/7038af37d48a328dfc31746f3fa84973e2f840ab)]
|
|
@@ -4385,10 +4396,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
4385
4396
|
- Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
|
|
4386
4397
|
- Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
|
|
4387
4398
|
- Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
|
|
4399
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
|
|
4400
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
|
|
4388
4401
|
### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
|
|
4389
4402
|
|
|
4390
4403
|
#### :house: Internal changes
|
|
4391
4404
|
|
|
4405
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
|
|
4392
4406
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
|
|
4393
4407
|
|
|
4394
4408
|
#### :hammer_and_wrench: Others
|
|
@@ -4405,6 +4419,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
4405
4419
|
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
|
|
4406
4420
|
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
|
|
4407
4421
|
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
|
|
4422
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
|
|
4423
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
|
|
4424
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
|
|
4408
4425
|
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
|
|
4409
4426
|
- Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
|
|
4410
4427
|
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
|
|
@@ -4621,6 +4638,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
4621
4638
|
|
|
4622
4639
|
#### :house: Internal changes
|
|
4623
4640
|
|
|
4641
|
+
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
|
|
4624
4642
|
|
|
4625
4643
|
#### :hammer_and_wrench: Others
|
|
4626
4644
|
|
|
@@ -5101,6 +5119,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
5101
5119
|
#### :hammer_and_wrench: Others
|
|
5102
5120
|
|
|
5103
5121
|
- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
|
|
5122
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
|
|
5104
5123
|
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
|
|
5105
5124
|
|
|
5106
5125
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
getColorForCount,
|
|
23
23
|
normalizeCountryName,
|
|
24
24
|
buildCountryCounts,
|
|
25
|
+
filterCountryCounts,
|
|
25
26
|
mapLegendItems,
|
|
27
|
+
setCountryFilter,
|
|
26
28
|
} from './utils';
|
|
27
29
|
|
|
28
30
|
const messages = defineMessages({
|
|
@@ -147,10 +149,7 @@ const NavigatorCatalogueMapViewInner = (props) => {
|
|
|
147
149
|
// Handler: replace country filter + switch to list view
|
|
148
150
|
const handleExploreTools = React.useCallback(
|
|
149
151
|
(countryName) => {
|
|
150
|
-
|
|
151
|
-
// Clear existing country filter, then set the new one
|
|
152
|
-
searchContext?.removeFilter(field);
|
|
153
|
-
searchContext?.addFilter(field, countryName, 'any');
|
|
152
|
+
setCountryFilter(searchContext, countryName);
|
|
154
153
|
// Switch to listing view
|
|
155
154
|
views.setActiveViewId('listing');
|
|
156
155
|
},
|
|
@@ -159,8 +158,12 @@ const NavigatorCatalogueMapViewInner = (props) => {
|
|
|
159
158
|
|
|
160
159
|
// Build lookup: countryName -> count
|
|
161
160
|
const countryCounts = React.useMemo(
|
|
162
|
-
() =>
|
|
163
|
-
|
|
161
|
+
() =>
|
|
162
|
+
filterCountryCounts(
|
|
163
|
+
buildCountryCounts(searchContext?.facets),
|
|
164
|
+
searchContext?.filters,
|
|
165
|
+
),
|
|
166
|
+
[searchContext?.facets, searchContext?.filters],
|
|
164
167
|
);
|
|
165
168
|
|
|
166
169
|
const [tileWMSSources, setTileWMSSources] = React.useState(null);
|
|
@@ -3,7 +3,9 @@ import {
|
|
|
3
3
|
getColorForCount,
|
|
4
4
|
normalizeCountryName,
|
|
5
5
|
buildCountryCounts,
|
|
6
|
+
filterCountryCounts,
|
|
6
7
|
mapLegendItems,
|
|
8
|
+
setCountryFilter,
|
|
7
9
|
} from './utils';
|
|
8
10
|
|
|
9
11
|
describe('getColorForCount', () => {
|
|
@@ -135,6 +137,54 @@ describe('buildCountryCounts', () => {
|
|
|
135
137
|
});
|
|
136
138
|
});
|
|
137
139
|
|
|
140
|
+
describe('setCountryFilter', () => {
|
|
141
|
+
it('replaces the current country selection', () => {
|
|
142
|
+
const searchContext = {
|
|
143
|
+
setFilter: jest.fn(),
|
|
144
|
+
addFilter: jest.fn(),
|
|
145
|
+
removeFilter: jest.fn(),
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
setCountryFilter(searchContext, 'Germany');
|
|
149
|
+
|
|
150
|
+
expect(searchContext.setFilter).toHaveBeenCalledWith(
|
|
151
|
+
'cca_geographic_countries.keyword',
|
|
152
|
+
'Germany',
|
|
153
|
+
'any',
|
|
154
|
+
);
|
|
155
|
+
expect(searchContext.addFilter).not.toHaveBeenCalled();
|
|
156
|
+
expect(searchContext.removeFilter).not.toHaveBeenCalled();
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
describe('filterCountryCounts', () => {
|
|
161
|
+
const countryCounts = { Spain: 3, France: 7, Germany: 5 };
|
|
162
|
+
|
|
163
|
+
it('shows all country counts without a country filter', () => {
|
|
164
|
+
expect(filterCountryCounts(countryCounts, [])).toEqual(countryCounts);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it('shows only countries selected in the country filter', () => {
|
|
168
|
+
expect(
|
|
169
|
+
filterCountryCounts(countryCounts, [
|
|
170
|
+
{
|
|
171
|
+
field: 'cca_geographic_countries.keyword',
|
|
172
|
+
values: ['Spain'],
|
|
173
|
+
type: 'any',
|
|
174
|
+
},
|
|
175
|
+
]),
|
|
176
|
+
).toEqual({ Spain: 3 });
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('ignores filters for other fields', () => {
|
|
180
|
+
expect(
|
|
181
|
+
filterCountryCounts(countryCounts, [
|
|
182
|
+
{ field: 'cca_climate_impacts.keyword', values: ['Flooding'] },
|
|
183
|
+
]),
|
|
184
|
+
).toEqual(countryCounts);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
|
|
138
188
|
describe('mapLegendItems', () => {
|
|
139
189
|
it('has 5 legend items', () => {
|
|
140
190
|
expect(mapLegendItems).toHaveLength(5);
|
|
@@ -47,6 +47,28 @@ export const buildCountryCounts = (facets) => {
|
|
|
47
47
|
return counts;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
export const filterCountryCounts = (countryCounts, filters) => {
|
|
51
|
+
const selectedCountries =
|
|
52
|
+
filters?.find(({ field }) => field === 'cca_geographic_countries.keyword')
|
|
53
|
+
?.values || [];
|
|
54
|
+
|
|
55
|
+
if (!selectedCountries.length) return countryCounts;
|
|
56
|
+
|
|
57
|
+
return Object.fromEntries(
|
|
58
|
+
selectedCountries
|
|
59
|
+
.filter((country) => countryCounts[country] !== undefined)
|
|
60
|
+
.map((country) => [country, countryCounts[country]]),
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const setCountryFilter = (searchContext, countryName) => {
|
|
65
|
+
searchContext?.setFilter(
|
|
66
|
+
'cca_geographic_countries.keyword',
|
|
67
|
+
countryName,
|
|
68
|
+
'any',
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
50
72
|
/**
|
|
51
73
|
* Legend items for the map view
|
|
52
74
|
*/
|