@eeacms/volto-cca-policy 0.1.40 → 0.1.42

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,21 @@ 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.1.42](https://github.com/eea/volto-cca-policy/compare/0.1.41...0.1.42) - 5 September 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Refs #257400 - Add Key Type Measure - facet vocabulary terms instead of keys. [GhitaB - [`53070bc`](https://github.com/eea/volto-cca-policy/commit/53070bc9b32f31d1c7e64a05eb8a7409c8021029)]
12
+ - Refs #257400 - Add Key Type Measure - test vocab. [GhitaB - [`d42e3d3`](https://github.com/eea/volto-cca-policy/commit/d42e3d3c88585461a7f07deac4eaa853787fefbd)]
13
+ - Refs #257400 - Add Key Type Measure facet for ccaSearch. [GhitaB - [`242fa6d`](https://github.com/eea/volto-cca-policy/commit/242fa6dea274b1e9197642e42b5f6119a25abccc)]
14
+ - Also fix health catalog [Tiberiu Ichim - [`6695897`](https://github.com/eea/volto-cca-policy/commit/6695897b6e70b3d3708e2ef895b5bd5a9b2fe9f5)]
15
+ - Fix expiration date in search catalogue [Tiberiu Ichim - [`543dd0b`](https://github.com/eea/volto-cca-policy/commit/543dd0b4e950ea93dd35f2bfa9ceb4061a74e1fd)]
16
+ ### [0.1.41](https://github.com/eea/volto-cca-policy/compare/0.1.40...0.1.41) - 1 September 2023
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - Updates [Tiberiu Ichim - [`1d498e3`](https://github.com/eea/volto-cca-policy/commit/1d498e3578b28a71240edb650ed93157f6cd933d)]
21
+ - Add health catalog configuration [Tiberiu Ichim - [`783fa1a`](https://github.com/eea/volto-cca-policy/commit/783fa1afc834e39dc123f9a789816098fdb4d302)]
7
22
  ### [0.1.40](https://github.com/eea/volto-cca-policy/compare/0.1.39...0.1.40) - 28 August 2023
8
23
 
9
24
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
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",
@@ -0,0 +1,115 @@
1
+ import { mergeConfig } from '@eeacms/search';
2
+ import { build_runtime_mappings } from '@eeacms/volto-globalsearch/utils';
3
+
4
+ import facets from './facets-health';
5
+
6
+ // import views from './views';
7
+ // import filters from './filters';
8
+ // import vocabs from './vocabulary';
9
+
10
+ const getClientProxyAddress = () => {
11
+ const url = new URL(window.location);
12
+ url.pathname = '';
13
+ url.search = '';
14
+ return url.toString();
15
+ };
16
+
17
+ const ccaConfig = {
18
+ title: 'ClimateAdapt Health',
19
+ };
20
+
21
+ export const clusters = {
22
+ name: 'op_cluster',
23
+ field: 'objectProvides',
24
+ clusters: [
25
+ // {
26
+ // name: 'Type1',
27
+ // icon: { name: 'bullhorn' },
28
+ // values: ['Video', 'Guidance'],
29
+ // defaultResultView: 'horizontalCard',
30
+ // },
31
+ ],
32
+ };
33
+
34
+ export default function installMainSearch(config) {
35
+ const envConfig = process.env.RAZZLE_ENV_CONFIG
36
+ ? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
37
+ : ccaConfig;
38
+
39
+ const pjson = require('@eeacms/volto-cca-policy/../package.json');
40
+
41
+ envConfig.app_name = pjson.name;
42
+ envConfig.app_version = pjson.version;
43
+
44
+ config.searchui.ccaHealthSearch = {
45
+ ...mergeConfig(envConfig, config.searchui.globalsearchbase),
46
+ elastic_index: '_es/globalsearch',
47
+ index_name: 'data_searchui',
48
+ host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
49
+ vocab: {
50
+ cluster_name: {
51
+ cca: 'Climate-ADAPT',
52
+ },
53
+ },
54
+ runtime_mappings: build_runtime_mappings(clusters),
55
+ };
56
+
57
+ const { ccaHealthSearch } = config.searchui;
58
+
59
+ ccaHealthSearch.permanentFilters.push({
60
+ term: {
61
+ cca_include_in_search_observatory: 'true',
62
+ },
63
+ });
64
+
65
+ ccaHealthSearch.permanentFilters.push({
66
+ terms: {
67
+ objectProvides: [
68
+ 'Adaptation option',
69
+ 'Case study',
70
+ 'Guidance',
71
+ 'Video',
72
+ 'Indicator',
73
+ 'Information portal',
74
+ 'Organisation',
75
+ 'Publication reference',
76
+ 'Research and knowledge project',
77
+ 'Tool',
78
+ ],
79
+ },
80
+ });
81
+
82
+ ccaHealthSearch.facets = facets;
83
+
84
+ ccaHealthSearch.initialView.tilesLandingPageParams.sections = [
85
+ {
86
+ id: 'types',
87
+ title: 'Types',
88
+ facetField: 'objectProvides',
89
+ sortOn: 'alpha',
90
+ icon: {
91
+ family: 'Content types',
92
+ },
93
+ },
94
+ {
95
+ id: 'healthImpacts',
96
+ title: 'Health Impacts',
97
+ facetField: 'cca_health_impacts.keyword',
98
+ sortOn: 'alpha',
99
+ whitelist: [
100
+ 'Wildfires',
101
+ 'Air pollution and aero-allergens',
102
+ 'Droughts and floods',
103
+ 'Climate-sensitive diseases',
104
+ 'Heat',
105
+ ],
106
+ },
107
+ ];
108
+
109
+ if (typeof window !== 'undefined') {
110
+ config.searchui.ccaHealthSearch.host =
111
+ process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
112
+ }
113
+
114
+ return config;
115
+ }
@@ -50,6 +50,19 @@ export default function installMainSearch(config) {
50
50
  cluster_name: {
51
51
  cca: 'Climate-ADAPT',
52
52
  },
53
+ 'cca_key_type_measure.keyword': {
54
+ A1: 'A1: Policy Instruments',
55
+ A2: 'A2: Management and planning',
56
+ A3: 'A3: Coordination cooperation and networks',
57
+ B1: 'B1: Financing incentive instruments',
58
+ B2: 'B2: Insurance and risk sharing instruments',
59
+ C1: 'C1: Grey options',
60
+ C2: 'C2: Technological options',
61
+ D1: 'D1: Green options',
62
+ D2: 'D2: Blue options',
63
+ E1: 'E1: Information and awareness raising',
64
+ E2: 'E2: Capacity building empowering and lifestyle practices',
65
+ },
53
66
  },
54
67
  runtime_mappings: build_runtime_mappings(clusters),
55
68
  };
@@ -61,11 +74,11 @@ export default function installMainSearch(config) {
61
74
  cluster_name: 'cca',
62
75
  },
63
76
  });
64
- ccaSearch.permanentFilters.push({
65
- term: {
66
- cca_include_in_search: 'true',
67
- },
68
- });
77
+ // ccaSearch.permanentFilters.push({
78
+ // term: {
79
+ // cca_include_in_search: 'true',
80
+ // },
81
+ // });
69
82
 
70
83
  ccaSearch.permanentFilters.push({
71
84
  terms: {
@@ -172,6 +185,7 @@ export default function installMainSearch(config) {
172
185
  config.searchui.ccaSearch.host =
173
186
  process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
174
187
  }
188
+
175
189
  // console.log(config.searchui.ccaSearch);
176
190
 
177
191
  return config;