@eeacms/volto-cca-policy 0.2.12 → 0.2.13

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
+ ### [0.2.13](https://github.com/eea/volto-cca-policy/compare/0.2.12...0.2.13) - 30 April 2024
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat(mission): add mission_tool search config [kreafox - [`96f2c20`](https://github.com/eea/volto-cca-policy/commit/96f2c205100ae3df652429ffaea833fb2aabb7b3)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Refs #269158 - adjust wording [Tripon Eugen - [`ede12a3`](https://github.com/eea/volto-cca-policy/commit/ede12a324689c5791e63c495b07dd9e3f2d29665)]
16
+ - Refs #269158 - research project acetype [Tripon Eugen - [`f1b175c`](https://github.com/eea/volto-cca-policy/commit/f1b175c461c9811a34449b08e1fccffa910a4ebd)]
7
17
  ### [0.2.12](https://github.com/eea/volto-cca-policy/compare/0.2.11...0.2.12) - 29 April 2024
8
18
 
9
19
  #### :bug: Bug Fixes
@@ -1070,13 +1080,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1070
1080
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
1071
1081
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
1072
1082
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
1073
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
1074
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
1075
1083
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
1076
1084
 
1077
1085
  #### :house: Internal changes
1078
1086
 
1079
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
1080
1087
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
1081
1088
 
1082
1089
  #### :hammer_and_wrench: Others
@@ -1093,9 +1100,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1093
1100
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
1094
1101
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
1095
1102
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
1096
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
1097
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
1098
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
1099
1103
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
1100
1104
  - 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)]
1101
1105
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -1312,7 +1316,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1312
1316
 
1313
1317
  #### :house: Internal changes
1314
1318
 
1315
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
1316
1319
 
1317
1320
  #### :hammer_and_wrench: Others
1318
1321
 
@@ -1793,7 +1796,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1793
1796
  #### :hammer_and_wrench: Others
1794
1797
 
1795
1798
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
1796
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
1797
1799
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
1798
1800
 
1799
1801
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
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",
@@ -43,6 +43,7 @@ const portalTypesToSearchTypes = {
43
43
  'eea.climateadapt.c3sindicator': 'Indicator',
44
44
  'eea.climateadapt.informationportal': 'Information portal',
45
45
  'eea.climateadapt.publicationreport': 'Publication reference',
46
+ 'eea.climateadapt.aceproject': 'Research and knowledge project',
46
47
  'eea.climateadapt.researchproject': 'Research and knowledge project',
47
48
  'eea.climateadapt.tool': 'Tool',
48
49
  'eea.climateadapt.video': 'Video',
@@ -1,6 +1,7 @@
1
1
  import { mergeConfig } from '@eeacms/search';
2
2
  import { build_runtime_mappings } from '@eeacms/volto-globalsearch/utils';
3
3
  import { getClientProxyAddress } from './utils';
4
+ import vocabs from './vocabulary';
4
5
 
5
6
  import facets from './facets';
6
7
 
@@ -36,25 +37,8 @@ export default function installMainSearch(config) {
36
37
  elastic_index: '_es/globalsearch',
37
38
  index_name: 'data_searchui',
38
39
  host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
39
- vocab: {
40
- cluster_name: {
41
- cca: 'Climate-ADAPT',
42
- },
43
- 'cca_key_type_measure.keyword': {
44
- A1: 'A1: Policy Instruments',
45
- A2: 'A2: Management and planning',
46
- A3: 'A3: Coordination cooperation and networks',
47
- B1: 'B1: Financing incentive instruments',
48
- B2: 'B2: Insurance and risk sharing instruments',
49
- C1: 'C1: Grey options',
50
- C2: 'C2: Technological options',
51
- D1: 'D1: Green options',
52
- D2: 'D2: Blue options',
53
- E1: 'E1: Information and awareness raising',
54
- E2: 'E2: Capacity building empowering and lifestyle practices',
55
- },
56
- },
57
40
  runtime_mappings: build_runtime_mappings(clusters),
41
+ ...vocabs,
58
42
  };
59
43
 
60
44
  const { ccaSearch } = config.searchui;
@@ -2,6 +2,7 @@ import installMainSearch from './config';
2
2
  import installHealthSearch from './health_observatory/config-health';
3
3
  import installMissionStoriesSearch from './mission_stories/config-stories';
4
4
  import installMissionProjectsSearch from './mission_projects/config-projects';
5
+ import installMissionToolsSearch from './mission_tools/config-tools';
5
6
 
6
7
  const extraQueryParams = {
7
8
  text_fields: [
@@ -36,10 +37,15 @@ const applyConfig = (config) => {
36
37
  installMainSearch(config.settings.searchlib),
37
38
  );
38
39
 
40
+ config.settings.searchlib = installMissionToolsSearch(
41
+ installMainSearch(config.settings.searchlib),
42
+ );
43
+
39
44
  config.settings.searchlib.searchui.ccaSearch.extraQueryParams = extraQueryParams;
40
45
  config.settings.searchlib.searchui.ccaHealthSearch.extraQueryParams = extraQueryParams;
41
46
  config.settings.searchlib.searchui.missionProjects.extraQueryParams = extraQueryParams;
42
47
  config.settings.searchlib.searchui.missionStoriesSearch.extraQueryParams = extraQueryParams;
48
+ config.settings.searchlib.searchui.missionToolsSearch.extraQueryParams = extraQueryParams;
43
49
 
44
50
  return config;
45
51
  };
@@ -0,0 +1,57 @@
1
+ import { mergeConfig } from '@eeacms/search';
2
+ import { getClientProxyAddress, getSearchThumbUrl } from '../utils';
3
+ import facets from './facets-tools';
4
+
5
+ const missionToolsConfig = {
6
+ title: 'Mission Tools Search',
7
+ ...facets,
8
+ };
9
+
10
+ export default function installMissionToolsSearch(config) {
11
+ const envConfig = process.env.RAZZLE_ENV_CONFIG
12
+ ? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
13
+ : missionToolsConfig;
14
+
15
+ const pjson = require('@eeacms/volto-cca-policy/../package.json');
16
+ envConfig.app_name = pjson.name;
17
+ envConfig.app_version = pjson.version;
18
+
19
+ config.searchui.missionToolsSearch = {
20
+ ...mergeConfig(envConfig, config.searchui.globalsearchbase),
21
+ elastic_index: '_es/globalsearch',
22
+ index_name: 'data_searchui',
23
+ host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
24
+ vocab: {
25
+ cluster_name: {
26
+ cca: 'Mission Portal',
27
+ },
28
+ },
29
+ };
30
+
31
+ const { missionToolsSearch } = config.searchui;
32
+
33
+ missionToolsSearch.facets = facets;
34
+
35
+ if (typeof window !== 'undefined') {
36
+ config.searchui.missionToolsSearch.host =
37
+ process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
38
+ }
39
+
40
+ missionToolsSearch.resultItemModel = {
41
+ factory: 'ResultModel',
42
+ urlField: 'about',
43
+ titleField: 'title',
44
+ metatypeField: 'objectProvides',
45
+ descriptionField: 'description',
46
+ tagsField: 'topic',
47
+ issuedField: 'issued',
48
+ getThumbnailUrl: 'getSearchThumbUrl',
49
+ getIconUrl: 'getGlobalsearchIconUrl',
50
+ fallbackThumbUrl:
51
+ 'https://react.semantic-ui.com/images/wireframe/white-image.png',
52
+ };
53
+
54
+ config.resolve.getSearchThumbUrl = getSearchThumbUrl();
55
+
56
+ return config;
57
+ }
@@ -0,0 +1,47 @@
1
+ import { multiTermFacet } from '@eeacms/search';
2
+
3
+ import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
4
+ import { cca_climate_impacts, cca_adaptation_sectors } from './../common';
5
+
6
+ const facets = [
7
+ multiTermFacet({
8
+ field: 'cca_rast_steps.keyword',
9
+ isFilterable: false,
10
+ isMulti: true,
11
+ label: 'RAST step(s) of relevance',
12
+ alwaysVisible: false,
13
+ }),
14
+ multiTermFacet({
15
+ field: 'cca_geographical_scale.keyword',
16
+ isFilterable: false,
17
+ isMulti: true,
18
+ label: 'Geographical scale',
19
+ alwaysVisible: false,
20
+ }),
21
+ cca_climate_impacts,
22
+ multiTermFacet({
23
+ field: 'cca_tool_language.keyword',
24
+ isFilterable: false,
25
+ isMulti: true,
26
+ label: 'Language(s) of the tool',
27
+ alwaysVisible: false,
28
+ }),
29
+ cca_adaptation_sectors,
30
+ multiTermFacet({
31
+ field: 'cca_most_useful_for.keyword',
32
+ isFilterable: false,
33
+ isMulti: true,
34
+ label: 'Most useful for',
35
+ alwaysVisible: false,
36
+ }),
37
+ multiTermFacet({
38
+ field: 'cca_user_requirements.keyword',
39
+ isFilterable: false,
40
+ isMulti: true,
41
+ label: 'User requirements',
42
+ alwaysVisible: false,
43
+ }),
44
+ ...globalSearchBaseConfig.facets,
45
+ ];
46
+
47
+ export default facets;
@@ -0,0 +1,24 @@
1
+ const vocab = {
2
+ cluster_name: {
3
+ cca: 'Climate-ADAPT',
4
+ },
5
+ 'cca_key_type_measure.keyword': {
6
+ A1: 'A1: Policy Instruments',
7
+ A2: 'A2: Management and planning',
8
+ A3: 'A3: Coordination cooperation and networks',
9
+ B1: 'B1: Financing incentive instruments',
10
+ B2: 'B2: Insurance and risk sharing instruments',
11
+ C1: 'C1: Grey options',
12
+ C2: 'C2: Technological options',
13
+ D1: 'D1: Green options',
14
+ D2: 'D2: Blue options',
15
+ E1: 'E1: Information and awareness raising',
16
+ E2: 'E2: Capacity building empowering and lifestyle practices',
17
+ },
18
+ objectProvides: {
19
+ 'Publication reference': 'Publications and reports',
20
+ Video: 'Videos and podcasts',
21
+ },
22
+ };
23
+
24
+ export default { vocab };