@eeacms/volto-cca-policy 0.2.87 → 0.2.89

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,15 @@ 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
+ ### [0.2.89](https://github.com/eea/volto-cca-policy/compare/0.2.88...0.2.89) - 7 January 2025
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Refs #268762 - update map to allow hover tr update [Tripon Eugen - [`0be2afe`](https://github.com/eea/volto-cca-policy/commit/0be2afed14d855d9bbf7bbaebb0f70688506e692)]
12
+ - Refs #268762 - update map to allow hover tr [Tripon Eugen - [`8a94cf1`](https://github.com/eea/volto-cca-policy/commit/8a94cf1888f34793b8637fe383b923ee196403d8)]
13
+ - Remove prefix condition, will be solved by indexing [Tiberiu Ichim - [`3cf4ed0`](https://github.com/eea/volto-cca-policy/commit/3cf4ed0befde89e8cc3393c8458aa3d5a6d9a70a)]
14
+ ### [0.2.88](https://github.com/eea/volto-cca-policy/compare/0.2.87...0.2.88) - 6 January 2025
15
+
7
16
  ### [0.2.87](https://github.com/eea/volto-cca-policy/compare/0.2.86...0.2.87) - 20 December 2024
8
17
 
9
18
  #### :nail_care: Enhancements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.87",
3
+ "version": "0.2.89",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -37,12 +37,21 @@ const CountryMapObservatoryView = (props) => {
37
37
  setOverlaySource(new ol.source.Vector());
38
38
 
39
39
  const features = new ol.format.GeoJSON().readFeatures(geofeatures);
40
+ const updateEuCountryNames = euCountryNames.map((countryName) => {
41
+ if ('Turkey' === countryName) {
42
+ countryName = 'Türkiye';
43
+ }
44
+ return countryName;
45
+ });
46
+
40
47
  const filtered = features.filter((f) =>
41
- euCountryNames.includes(f.get('na')),
48
+ updateEuCountryNames.includes(f.get('na')),
42
49
  );
43
-
44
50
  filtered.forEach((feature) => {
45
51
  const img = new Image();
52
+ if ('Türkiye' === feature.values_.na) {
53
+ feature.values_.na = 'Turkey';
54
+ }
46
55
  img.onload = function () {
47
56
  feature.set('flag', img);
48
57
  };
@@ -70,12 +79,14 @@ const CountryMapObservatoryView = (props) => {
70
79
 
71
80
  const onFeatureClick = React.useCallback(
72
81
  (feature) => {
73
- const country = feature.get('na');
82
+ let country = feature.get('na');
83
+ if ('Türkiye' === country) {
84
+ country = 'Turkey';
85
+ }
74
86
  history.push(`${baseUrl}/${country.toLowerCase()}`);
75
87
  },
76
88
  [baseUrl, history],
77
89
  );
78
- // console.log(geofeatures, projection, euCountriesSource, overlaySource);
79
90
 
80
91
  return tileWMSSources ? (
81
92
  <Map
@@ -85,11 +85,11 @@ export default function installMainSearch(config) {
85
85
  cca_include_in_mission: 'true',
86
86
  },
87
87
  },
88
- {
89
- prefix: {
90
- 'id.keyword': 'https://climate-adapt.eea.europa.eu/en/mission',
91
- },
92
- },
88
+ // {
89
+ // prefix: {
90
+ // 'id.keyword': 'https://climate-adapt.eea.europa.eu/en/mission',
91
+ // },
92
+ // },
93
93
  ],
94
94
  minimum_should_match: 1,
95
95
  },
@@ -1,6 +1,7 @@
1
1
  import { multiTermFacet } from '@eeacms/search';
2
2
 
3
- // import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
3
+ import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
4
+
4
5
  import {
5
6
  cca_climate_impacts,
6
7
  cca_adaptation_sectors,
@@ -46,7 +47,7 @@ const facets = [
46
47
  alwaysVisible: false,
47
48
  }),
48
49
  language,
49
- // ...globalSearchBaseConfig.facets,
50
+ ...globalSearchBaseConfig.facets.filter((f) => f.field !== 'language'),
50
51
  ];
51
52
 
52
53
  export default facets;