@eeacms/volto-cca-policy 0.3.5 → 0.3.6

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,11 +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.3.5](https://github.com/eea/volto-cca-policy/compare/0.3.4...0.3.5) - 11 February 2025
7
+ ### [0.3.6](https://github.com/eea/volto-cca-policy/compare/0.3.5...0.3.6) - 12 February 2025
8
8
 
9
- #### :rocket: Dependency updates
9
+ #### :hammer_and_wrench: Others
10
10
 
11
- - Release @eeacms/volto-searchlib@2.0.10 [EEA Jenkins - [`15f188a`](https://github.com/eea/volto-cca-policy/commit/15f188ac1913c7f70408ced1bb26c181fa017071)]
11
+ - Remove console log [Tiberiu Ichim - [`ef6d4e1`](https://github.com/eea/volto-cca-policy/commit/ef6d4e1ef9c923eb43b946257bf58841869f84be)]
12
+ - Countries [Tiberiu Ichim - [`dc07b0c`](https://github.com/eea/volto-cca-policy/commit/dc07b0ca95b8e1c79e2135c13b54cbd95896b682)]
13
+ - Refs #283012 - countries force translation and eslint [Tripon Eugen - [`5eb20ad`](https://github.com/eea/volto-cca-policy/commit/5eb20adb1f10cd33d27b61fc696c2b0c7a1d62ad)]
14
+ - Mission funding search [Tiberiu Ichim - [`fa9eb69`](https://github.com/eea/volto-cca-policy/commit/fa9eb6969b8d267cb31642f5d253b5399519cb77)]
15
+ ### [0.3.5](https://github.com/eea/volto-cca-policy/compare/0.3.4...0.3.5) - 12 February 2025
12
16
 
13
17
  ### [0.3.4](https://github.com/eea/volto-cca-policy/compare/0.3.3...0.3.4) - 10 February 2025
14
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
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",
@@ -182,6 +182,7 @@ export const language = {
182
182
  default: (options) => {
183
183
  const { language } = options || {};
184
184
  // console.log('options', options);
185
+
185
186
  return {
186
187
  values: [language || 'en'],
187
188
  type: 'any',
@@ -19,6 +19,7 @@ const messages = defineMessages({
19
19
  id: 'Adaptation Approaches',
20
20
  defaultMessage: 'Adaptation Approaches',
21
21
  },
22
+ countries: { id: 'Countries', defaultMessage: 'Countries' },
22
23
  });
23
24
 
24
25
  const blacklist = ['IncludeArchived', 'issued.date', 'language'];
@@ -28,9 +29,15 @@ let globalFacets = globalSearchBaseConfig.facets.filter(
28
29
 
29
30
  for (let i = 0; i < globalFacets.length; i++) {
30
31
  if (globalFacets[i]['field'] === 'objectProvides') {
31
- // globalFacets[i]['label'] = 'Type of item';
32
32
  globalFacets[i]['label'] = messages.typeOfItem;
33
33
  }
34
+ if (
35
+ globalFacets[i]['field'] === 'spatial' &&
36
+ typeof globalFacets[i]['label'] === 'string' &&
37
+ globalFacets[i]['label'] === 'Countries'
38
+ ) {
39
+ globalFacets[i]['label'] = messages.countries;
40
+ }
34
41
  }
35
42
 
36
43
  globalFacets = globalFacets.concat(
@@ -41,6 +41,7 @@ export default function installMissionFundingSearch(config) {
41
41
  ],
42
42
  },
43
43
  });
44
+ missionFundingSearch.facets = facets;
44
45
 
45
46
  if (typeof window !== 'undefined') {
46
47
  config.searchui.missionFundingSearch.host =
@@ -1,7 +1,12 @@
1
1
  import { multiTermFacet } from '@eeacms/search';
2
2
  import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
3
- // import spatialWhitelist from '@eeacms/volto-globalsearch/config/json/spatialWhitelist';
4
- import { cca_adaptation_sectors, language } from './../common';
3
+ import spatialWhitelist from '@eeacms/volto-globalsearch/config/json/spatialWhitelist';
4
+ import {
5
+ cca_adaptation_sectors,
6
+ language,
7
+ // geographic_countries,
8
+ } from './../common';
9
+
5
10
  import { defineMessages } from 'react-intl';
6
11
 
7
12
  const messages = defineMessages({
@@ -13,9 +18,13 @@ const messages = defineMessages({
13
18
  id: 'Eligible to receive funding',
14
19
  defaultMessage: 'Eligible to receive funding',
15
20
  },
21
+ countries: {
22
+ id: 'Countries',
23
+ defaultMessage: 'Countries',
24
+ },
16
25
  });
17
26
 
18
- const blacklist = ['IncludeArchived', 'issued.date', 'spatial', 'language'];
27
+ const blacklist = ['IncludeArchived', 'issued.date', 'language', 'spatial'];
19
28
 
20
29
  const facets = [
21
30
  multiTermFacet({
@@ -33,20 +42,19 @@ const facets = [
33
42
  alwaysVisible: false,
34
43
  }),
35
44
  cca_adaptation_sectors,
36
- language,
37
- // multiTermFacet({
38
- // field: 'spatial',
39
- // isFilterable: true,
40
- // isMulti: true,
41
- // label: 'Countries',
42
- // spatialWhitelist: spatialWhitelist,
43
- // show: 10000,
44
- // iconsFamily: 'Countries',
45
- // enableExact: true,
46
- // alwaysVisible: false,
47
- // }),
48
-
49
45
  ...globalSearchBaseConfig.facets.filter((f) => !blacklist.includes(f.field)),
46
+ language,
47
+ multiTermFacet({
48
+ field: 'spatial',
49
+ isFilterable: true,
50
+ isMulti: true,
51
+ label: messages.countries,
52
+ spatialWhitelist: spatialWhitelist,
53
+ show: 10000,
54
+ iconsFamily: 'Countries',
55
+ enableExact: true,
56
+ alwaysVisible: false,
57
+ }),
50
58
  ];
51
59
 
52
60
  export default facets;