@eeacms/volto-cca-policy 0.2.48 → 0.2.49

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,17 @@ 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.48](https://github.com/eea/volto-cca-policy/compare/0.2.47...0.2.48) - 2 July 2024
7
+ ### [0.2.49](https://github.com/eea/volto-cca-policy/compare/0.2.48...0.2.49) - 8 July 2024
8
8
 
9
9
  #### :hammer_and_wrench: Others
10
10
 
11
- - Update version for hero block [Tiberiu Ichim - [`24131f1`](https://github.com/eea/volto-cca-policy/commit/24131f1626e2e27169e737ac0ac0b369b4804064)]
11
+ - Refs #271901 - text and link update [Tripon Eugen - [`6b65679`](https://github.com/eea/volto-cca-policy/commit/6b65679e7c8816bdada23d0fdca06b78f003179a)]
12
+ - Refs #271901 - text update [Tripon Eugen - [`5802a0d`](https://github.com/eea/volto-cca-policy/commit/5802a0dd31e6c67981b6c163886842be90051b52)]
13
+ - Refs #271901 - placeholder update [Tripon Eugen - [`2db9a1d`](https://github.com/eea/volto-cca-policy/commit/2db9a1dba66c42a23c4c1764315e0066a39d0c69)]
14
+ - Refs #271901 - mission big top right magnifying lens path and text [Tripon Eugen - [`1ec0c0f`](https://github.com/eea/volto-cca-policy/commit/1ec0c0fa3be0a12e738d21ac33e185b9b0a1afcc)]
15
+ - Refs #271901 - search all [Tripon Eugen - [`2724891`](https://github.com/eea/volto-cca-policy/commit/2724891523839591ba5f68f93bbeb0e14538c1a0)]
16
+ ### [0.2.48](https://github.com/eea/volto-cca-policy/compare/0.2.47...0.2.48) - 2 July 2024
17
+
12
18
  ### [0.2.47](https://github.com/eea/volto-cca-policy/compare/0.2.46...0.2.47) - 2 July 2024
13
19
 
14
20
  #### :hammer_and_wrench: Others
@@ -1425,13 +1431,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1425
1431
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
1426
1432
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
1427
1433
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
1428
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
1429
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
1430
1434
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
1431
1435
 
1432
1436
  #### :house: Internal changes
1433
1437
 
1434
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
1435
1438
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
1436
1439
 
1437
1440
  #### :hammer_and_wrench: Others
@@ -1448,9 +1451,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1448
1451
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
1449
1452
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
1450
1453
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
1451
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
1452
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
1453
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
1454
1454
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
1455
1455
  - 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)]
1456
1456
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -1667,7 +1667,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1667
1667
 
1668
1668
  #### :house: Internal changes
1669
1669
 
1670
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
1671
1670
 
1672
1671
  #### :hammer_and_wrench: Others
1673
1672
 
@@ -2148,7 +2147,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2148
2147
  #### :hammer_and_wrench: Others
2149
2148
 
2150
2149
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
2151
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
2152
2150
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
2153
2151
 
2154
2152
  #### :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.48",
3
+ "version": "0.2.49",
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",
package/src/index.js CHANGED
@@ -170,11 +170,12 @@ const applyConfig = (config) => {
170
170
  isDefault: false,
171
171
  // to replace search path change path to whatever you want and match with the page in volto website
172
172
  matchpath: '/en/mission',
173
- path: '/en/mission/knowledge-and-data/search-the-database',
174
- placeholder: 'Search the Climate-ADAPT database',
175
- description: 'Looking for more information?',
176
- buttonTitle: 'Explore more on Climate-ADAPT',
177
- buttonUrl: 'https://climate-adapt.eea.europa.eu/en/data-and-downloads/',
173
+ path: '/en/mission/advanced-search',
174
+ placeholder: 'Search the EU Mission on Adaptation',
175
+ description: 'For more search options',
176
+ buttonTitle: 'Go to advanced search',
177
+ buttonUrl:
178
+ 'https://climate-adapt.eea.europa.eu/en/mission/advanced-search/',
178
179
  },
179
180
  {
180
181
  isDefault: false,
@@ -4,6 +4,7 @@ import installMissionStoriesSearch from './mission_stories/config-stories';
4
4
  import installMissionToolsSearch from './mission_tools/config-tools';
5
5
  import installMissionProjectsSearch from './mission_projects/config-projects';
6
6
  import installMissionFundingSearch from './mission_funding/config-funding';
7
+ import installMissionAllSearch from './mission_all/config-all';
7
8
 
8
9
  const extraQueryParams = {
9
10
  text_fields: [
@@ -33,6 +34,7 @@ const applyConfig = (config) => {
33
34
  installMissionProjectsSearch,
34
35
  installMissionToolsSearch,
35
36
  installMissionFundingSearch,
37
+ installMissionAllSearch,
36
38
  ].reduce((acc, cur) => cur(acc), config.settings.searchlib);
37
39
 
38
40
  config.settings.searchlib.searchui.ccaSearch.extraQueryParams = extraQueryParams;
@@ -40,6 +42,7 @@ const applyConfig = (config) => {
40
42
  config.settings.searchlib.searchui.missionProjects.extraQueryParams = extraQueryParams;
41
43
  config.settings.searchlib.searchui.missionStoriesSearch.extraQueryParams = extraQueryParams;
42
44
  config.settings.searchlib.searchui.missionToolsSearch.extraQueryParams = extraQueryParams;
45
+ config.settings.searchlib.searchui.missionAll.extraQueryParams = extraQueryParams;
43
46
 
44
47
  // console.log(config.settings.searchlib);
45
48
 
@@ -0,0 +1,113 @@
1
+ import { mergeConfig } from '@eeacms/search';
2
+ import { build_runtime_mappings } from '@eeacms/volto-globalsearch/utils';
3
+ import { getClientProxyAddress } from '../utils';
4
+
5
+ import facets from './facets-all';
6
+
7
+ const missionAllConfig = {
8
+ title: 'Mission All',
9
+ };
10
+
11
+ export const clusters = {
12
+ name: 'op_cluster',
13
+ field: 'objectProvides',
14
+ clusters: [
15
+ // {
16
+ // name: 'Type1',
17
+ // icon: { name: 'bullhorn' },
18
+ // values: ['Video', 'Guidance'],
19
+ // defaultResultView: 'horizontalCard',
20
+ // },
21
+ ],
22
+ };
23
+
24
+ export default function installMainSearch(config) {
25
+ const envConfig = process.env.RAZZLE_ENV_CONFIG
26
+ ? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
27
+ : missionAllConfig;
28
+
29
+ const pjson = require('@eeacms/volto-cca-policy/../package.json');
30
+
31
+ envConfig.app_name = pjson.name;
32
+ envConfig.app_version = pjson.version;
33
+
34
+ config.searchui.missionAll = {
35
+ ...mergeConfig(envConfig, config.searchui.globalsearchbase),
36
+ elastic_index: '_es/globalsearch',
37
+ index_name: 'data_searchui',
38
+ host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
39
+ vocab: {
40
+ cluster_name: {
41
+ cca: 'Mission Portal',
42
+ },
43
+ },
44
+ runtime_mappings: build_runtime_mappings(clusters),
45
+ };
46
+
47
+ const { missionAll } = config.searchui;
48
+
49
+ // missionAll.permanentFilters.push({
50
+ // term: {
51
+ // cca_include_in_mission: 'true',
52
+ // },
53
+ // });
54
+ missionAll.permanentFilters.push({
55
+ bool: {
56
+ should: [
57
+ {
58
+ terms: {
59
+ objectProvides: [
60
+ 'Mission tool',
61
+ 'Mission story',
62
+ 'Funding oportunity',
63
+ ],
64
+ },
65
+ },
66
+ {
67
+ term: {
68
+ cca_include_in_mission: 'true',
69
+ },
70
+ },
71
+ {
72
+ term: {
73
+ id: 'https://climate-adapt.eea.europa.eu/en/mission/*',
74
+ },
75
+ },
76
+ ],
77
+ minimum_should_match: 1,
78
+ },
79
+ });
80
+
81
+ // missionAll.permanentFilters.push({
82
+ // terms: {
83
+ // objectProvides: [
84
+ // 'Funding oportunity',
85
+ // 'Mission tool',
86
+ // 'Mission story',
87
+ // 'News',
88
+ // 'Events',
89
+ // 'Webpage',
90
+ // // '',
91
+ // 'Adaptation option',
92
+ // 'Case study',
93
+ // 'Guidance',
94
+ // 'Video',
95
+ // 'Indicator',
96
+ // 'Information portal',
97
+ // 'Organisation',
98
+ // 'Publication reference',
99
+ // 'Research and knowledge project',
100
+ // 'Tool',
101
+ // ],
102
+ // },
103
+ // });
104
+
105
+ missionAll.facets = facets;
106
+
107
+ if (typeof window !== 'undefined') {
108
+ config.searchui.missionAll.host =
109
+ process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
110
+ }
111
+
112
+ return config;
113
+ }
@@ -0,0 +1,37 @@
1
+ import { multiTermFacet } from '@eeacms/search';
2
+ import {
3
+ include_archived,
4
+ objectProvides,
5
+ language,
6
+ issued_date,
7
+ geographic_countries,
8
+ cca_climate_impacts,
9
+ cca_adaptation_sectors,
10
+ } from '../common';
11
+
12
+ const facets = [
13
+ multiTermFacet({
14
+ field: 'cca_funding_programme.keyword',
15
+ isFilterable: false,
16
+ isMulti: true,
17
+ label: 'Funding Programme',
18
+ iconsFamily: 'Funding Programme',
19
+ alwaysVisible: false,
20
+ }),
21
+ cca_climate_impacts,
22
+ cca_adaptation_sectors,
23
+ multiTermFacet({
24
+ field: 'cca_adaptation_elements.keyword',
25
+ isFilterable: false,
26
+ isMulti: true,
27
+ label: 'Adaptation Elements',
28
+ alwaysVisible: false,
29
+ }),
30
+ geographic_countries,
31
+ include_archived,
32
+ issued_date,
33
+ language,
34
+ objectProvides,
35
+ ];
36
+
37
+ export default facets;