@eeacms/volto-cca-policy 0.2.47 → 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 +11 -0
- package/package.json +2 -1
- package/src/index.js +6 -5
- package/src/search/index.js +3 -0
- package/src/search/mission_all/config-all.js +113 -0
- package/src/search/mission_all/facets-all.js +37 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +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.49](https://github.com/eea/volto-cca-policy/compare/0.2.48...0.2.49) - 8 July 2024
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
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
|
+
|
|
7
18
|
### [0.2.47](https://github.com/eea/volto-cca-policy/compare/0.2.46...0.2.47) - 2 July 2024
|
|
8
19
|
|
|
9
20
|
#### :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.
|
|
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",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@elastic/search-ui": "1.21.2",
|
|
39
39
|
"@eeacms/volto-slate-label": "^0.6.0",
|
|
40
40
|
"@eeacms/volto-tabs-block": "^7.5.1",
|
|
41
|
+
"@eeacms/volto-hero-block": "^7.1.0",
|
|
41
42
|
"d3-array": "^2.12.1",
|
|
42
43
|
"jotai": "^1.6.0",
|
|
43
44
|
"query-string": "7.1.0",
|
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/
|
|
174
|
-
placeholder: 'Search the
|
|
175
|
-
description: '
|
|
176
|
-
buttonTitle: '
|
|
177
|
-
buttonUrl:
|
|
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,
|
package/src/search/index.js
CHANGED
|
@@ -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;
|