@eeacms/volto-cca-policy 0.2.82 → 0.2.84
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 +20 -0
- package/package.json +2 -2
- package/src/components/theme/Views/DatabaseItemView.jsx +16 -6
- package/src/helpers/Constants.jsx +1 -0
- package/src/search/common.js +30 -30
- package/src/search/config.js +17 -0
- package/src/search/mission_all/config-all.js +2 -0
- package/src/search/mission_all/facets-all.js +3 -2
- package/src/search/mission_funding/facets-funding.js +2 -1
- package/src/search/mission_stories/facets-stories.js +6 -1
- package/src/search/mission_tools/facets-tools.js +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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.84](https://github.com/eea/volto-cca-policy/compare/0.2.83...0.2.84) - 17 December 2024
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Fix eslint [Tiberiu Ichim - [`d2ab8e1`](https://github.com/eea/volto-cca-policy/commit/d2ab8e15c70bf790a40105e9ea994d907b8cfbd5)]
|
|
12
|
+
- Remove console.log [Tiberiu Ichim - [`5a78a19`](https://github.com/eea/volto-cca-policy/commit/5a78a1938470e4d4997cbaf9bee2d08e6a40cf49)]
|
|
13
|
+
- Rework language facets for Mission [Tiberiu Ichim - [`85a611a`](https://github.com/eea/volto-cca-policy/commit/85a611ae595f682b1348936d18750ed4bd209137)]
|
|
14
|
+
### [0.2.83](https://github.com/eea/volto-cca-policy/compare/0.2.82...0.2.83) - 16 December 2024
|
|
15
|
+
|
|
16
|
+
#### :rocket: Dependency updates
|
|
17
|
+
|
|
18
|
+
- Release @eeacms/volto-searchlib@2.0.5 [EEA Jenkins - [`4adc1dc`](https://github.com/eea/volto-cca-policy/commit/4adc1dc79bca9439b2bd5b79d231c1e2243fc74b)]
|
|
19
|
+
- Release @eeacms/volto-searchlib@2.0.4 [EEA Jenkins - [`3b5547c`](https://github.com/eea/volto-cca-policy/commit/3b5547c8a7be40a44fd978efe9ea4736e3fa7bed)]
|
|
20
|
+
|
|
21
|
+
#### :hammer_and_wrench: Others
|
|
22
|
+
|
|
23
|
+
- Don't expose all the languages [Tiberiu Ichim - [`80e20af`](https://github.com/eea/volto-cca-policy/commit/80e20af2f56d164e6efbd90370307f7317c38909)]
|
|
24
|
+
- Add 2 new fields to download [Tiberiu Ichim - [`c8f71ba`](https://github.com/eea/volto-cca-policy/commit/c8f71ba52d8e39568e3ad00cf6e6bc45650e66b8)]
|
|
25
|
+
- Ad Maps/Graphs height, handle iframe src and URL for indicators [kreafox - [`4f314c0`](https://github.com/eea/volto-cca-policy/commit/4f314c0f8b5e316d67f3c871276e92128ebf129b)]
|
|
26
|
+
- Set download fields [Tiberiu Ichim - [`6677ee0`](https://github.com/eea/volto-cca-policy/commit/6677ee0fa1f863387488db9adb2d5730b4099016)]
|
|
7
27
|
### [0.2.82](https://github.com/eea/volto-cca-policy/compare/0.2.81...0.2.82) - 12 December 2024
|
|
8
28
|
|
|
9
29
|
#### :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.84",
|
|
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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@eeacms/volto-globalsearch": "^1.1.0",
|
|
36
36
|
"@eeacms/volto-hero-block": "^7.1.0",
|
|
37
37
|
"@eeacms/volto-openlayers-map": "*",
|
|
38
|
-
"@eeacms/volto-searchlib": "2.0.
|
|
38
|
+
"@eeacms/volto-searchlib": "2.0.5",
|
|
39
39
|
"@eeacms/volto-slate-label": "^0.6.0",
|
|
40
40
|
"@eeacms/volto-tabs-block": "^7.5.1",
|
|
41
41
|
"@elastic/search-ui": "1.21.2",
|
|
@@ -94,15 +94,26 @@ const MaybeFlourishVisualization = ({ content }) => {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
function getFirstIframeSrc(htmlString) {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const iframeRegex = /<iframe[^>]+src=["']([^"']+)["']/;
|
|
98
|
+
|
|
99
|
+
const iframeMatch = htmlString.match(iframeRegex);
|
|
100
|
+
if (iframeMatch) {
|
|
101
|
+
return iframeMatch[1];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
try {
|
|
105
|
+
const url = new URL(htmlString);
|
|
106
|
+
return url.href;
|
|
107
|
+
} catch (e) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
100
110
|
}
|
|
101
111
|
|
|
102
112
|
const MaybeIframeVisualization = ({ content }) => {
|
|
103
|
-
const { map_graphs } = content;
|
|
113
|
+
const { map_graphs, map_graphs_height } = content;
|
|
104
114
|
|
|
105
115
|
const url = getFirstIframeSrc(map_graphs || '');
|
|
116
|
+
const height = map_graphs_height || 800;
|
|
106
117
|
|
|
107
118
|
const [isClient, setIsClient] = React.useState();
|
|
108
119
|
|
|
@@ -110,7 +121,6 @@ const MaybeIframeVisualization = ({ content }) => {
|
|
|
110
121
|
|
|
111
122
|
if (!(isClient && url)) return null;
|
|
112
123
|
|
|
113
|
-
// <div dangerouslySetInnerHTML={{ __html: map_graphs }} />
|
|
114
124
|
return (
|
|
115
125
|
<PrivacyProtection
|
|
116
126
|
data={{
|
|
@@ -119,7 +129,7 @@ const MaybeIframeVisualization = ({ content }) => {
|
|
|
119
129
|
}}
|
|
120
130
|
>
|
|
121
131
|
<iframe
|
|
122
|
-
height=
|
|
132
|
+
height={height}
|
|
123
133
|
width="100%"
|
|
124
134
|
src={url}
|
|
125
135
|
title="Interactive or visual content"
|
package/src/search/common.js
CHANGED
|
@@ -141,40 +141,40 @@ export const language = {
|
|
|
141
141
|
type: 'any',
|
|
142
142
|
},
|
|
143
143
|
facetValues: [
|
|
144
|
-
'
|
|
145
|
-
'sr',
|
|
146
|
-
'sq',
|
|
147
|
-
'bg',
|
|
148
|
-
'bs',
|
|
149
|
-
'cs',
|
|
150
|
-
'hr',
|
|
151
|
-
'da',
|
|
152
|
-
'nl',
|
|
153
|
-
'el',
|
|
144
|
+
'de',
|
|
154
145
|
'en',
|
|
155
|
-
'
|
|
156
|
-
'fi',
|
|
146
|
+
'es',
|
|
157
147
|
'fr',
|
|
158
|
-
'ga',
|
|
159
|
-
'de',
|
|
160
|
-
'hu',
|
|
161
|
-
'is',
|
|
162
148
|
'it',
|
|
163
|
-
'lv',
|
|
164
|
-
'lt',
|
|
165
|
-
'mk',
|
|
166
|
-
'mt',
|
|
167
|
-
'no',
|
|
168
149
|
'pl',
|
|
169
|
-
'
|
|
170
|
-
'
|
|
171
|
-
'
|
|
172
|
-
'
|
|
173
|
-
'
|
|
174
|
-
'
|
|
175
|
-
'
|
|
176
|
-
'
|
|
177
|
-
'
|
|
150
|
+
// 'ar',
|
|
151
|
+
// 'bg',
|
|
152
|
+
// 'bs',
|
|
153
|
+
// 'cs',
|
|
154
|
+
// 'da',
|
|
155
|
+
// 'el',
|
|
156
|
+
// 'et',
|
|
157
|
+
// 'fi',
|
|
158
|
+
// 'ga',
|
|
159
|
+
// 'hr',
|
|
160
|
+
// 'hu',
|
|
161
|
+
// 'is',
|
|
162
|
+
// 'lt',
|
|
163
|
+
// 'lv',
|
|
164
|
+
// 'mk',
|
|
165
|
+
// 'mt',
|
|
166
|
+
// 'nl',
|
|
167
|
+
// 'no',
|
|
168
|
+
// 'pt',
|
|
169
|
+
// 'ro',
|
|
170
|
+
// 'ru',
|
|
171
|
+
// 'sh',
|
|
172
|
+
// 'sk',
|
|
173
|
+
// 'sl',
|
|
174
|
+
// 'sq',
|
|
175
|
+
// 'sr',
|
|
176
|
+
// 'sv',
|
|
177
|
+
// 'tr',
|
|
178
178
|
],
|
|
179
179
|
sortOn: 'custom',
|
|
180
180
|
sortOnCustomLabel: 'Alphabetical',
|
package/src/search/config.js
CHANGED
|
@@ -70,6 +70,22 @@ export default function installMainSearch(config) {
|
|
|
70
70
|
|
|
71
71
|
// console.log('config.searchui.ccaSearch clusers', clusters);
|
|
72
72
|
// debugger;
|
|
73
|
+
config.searchui.globalsearch.download_fields = [
|
|
74
|
+
{ field: 'about', name: 'About' },
|
|
75
|
+
{ field: 'title', name: 'title' },
|
|
76
|
+
{ field: 'issued', name: 'Issued' },
|
|
77
|
+
{ field: 'objectProvides', name: 'Content type' },
|
|
78
|
+
{ field: 'cca_adaptation_sectors', name: 'Sectors' },
|
|
79
|
+
{ field: 'cca_climate_impacts', name: 'Climate impact' },
|
|
80
|
+
{ field: 'transnational_regions', name: 'Transnational regions' },
|
|
81
|
+
{ field: 'cca_adaptation_elements', name: 'Adaptation Approaches' },
|
|
82
|
+
{ field: 'cca_funding_programme', name: 'Funding programme' },
|
|
83
|
+
{ field: 'cca_key_type_measure', name: 'Key type measure' },
|
|
84
|
+
{ field: 'cca_geographic_countries', name: 'Countries' },
|
|
85
|
+
{ field: 'cca_origin_websites', name: 'Origin website' },
|
|
86
|
+
{ field: 'cca_health_impacts', name: 'Health impacts' },
|
|
87
|
+
{ field: 'cca_partner_contributors', name: 'Observatory impacts' },
|
|
88
|
+
];
|
|
73
89
|
config.searchui.ccaSearch = {
|
|
74
90
|
...mergeConfig(envConfig, config.searchui.globalsearchbase),
|
|
75
91
|
elastic_index: '_es/globalsearch',
|
|
@@ -206,5 +222,6 @@ export default function installMainSearch(config) {
|
|
|
206
222
|
process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
|
|
207
223
|
}
|
|
208
224
|
|
|
225
|
+
// console.log(config);
|
|
209
226
|
return config;
|
|
210
227
|
}
|
|
@@ -2,13 +2,13 @@ import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-sea
|
|
|
2
2
|
import { multiTermFacet } from '@eeacms/search';
|
|
3
3
|
import {
|
|
4
4
|
// objectProvides,
|
|
5
|
-
|
|
5
|
+
language,
|
|
6
6
|
geographic_countries,
|
|
7
7
|
cca_climate_impacts,
|
|
8
8
|
cca_adaptation_sectors,
|
|
9
9
|
} from '../common';
|
|
10
10
|
|
|
11
|
-
const blacklist = ['IncludeArchived', 'issued.date'];
|
|
11
|
+
const blacklist = ['IncludeArchived', 'issued.date', 'language'];
|
|
12
12
|
let globalFacets = globalSearchBaseConfig.facets.filter(
|
|
13
13
|
(f) => !blacklist.includes(f.field),
|
|
14
14
|
);
|
|
@@ -23,6 +23,7 @@ globalFacets = globalFacets.concat(
|
|
|
23
23
|
cca_climate_impacts,
|
|
24
24
|
cca_adaptation_sectors,
|
|
25
25
|
geographic_countries,
|
|
26
|
+
language,
|
|
26
27
|
multiTermFacet({
|
|
27
28
|
field: 'cca_adaptation_elements.keyword',
|
|
28
29
|
isFilterable: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { multiTermFacet } from '@eeacms/search';
|
|
2
2
|
import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
|
|
3
3
|
// import spatialWhitelist from '@eeacms/volto-globalsearch/config/json/spatialWhitelist';
|
|
4
|
-
import { cca_adaptation_sectors } from './../common';
|
|
4
|
+
import { cca_adaptation_sectors, language } from './../common';
|
|
5
5
|
|
|
6
6
|
const blacklist = ['IncludeArchived', 'issued.date', 'spatial', 'language'];
|
|
7
7
|
|
|
@@ -21,6 +21,7 @@ const facets = [
|
|
|
21
21
|
alwaysVisible: false,
|
|
22
22
|
}),
|
|
23
23
|
cca_adaptation_sectors,
|
|
24
|
+
language,
|
|
24
25
|
// multiTermFacet({
|
|
25
26
|
// field: 'spatial',
|
|
26
27
|
// isFilterable: true,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { multiTermFacet } from '@eeacms/search';
|
|
2
2
|
|
|
3
3
|
import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
cca_climate_impacts,
|
|
6
|
+
cca_adaptation_sectors,
|
|
7
|
+
language,
|
|
8
|
+
} from './../common';
|
|
5
9
|
|
|
6
10
|
const facets = [
|
|
7
11
|
cca_climate_impacts,
|
|
@@ -31,6 +35,7 @@ const facets = [
|
|
|
31
35
|
iconsFamily: 'Hazard Type',
|
|
32
36
|
alwaysVisible: false,
|
|
33
37
|
}),
|
|
38
|
+
language,
|
|
34
39
|
];
|
|
35
40
|
|
|
36
41
|
export default facets;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { multiTermFacet } from '@eeacms/search';
|
|
2
2
|
|
|
3
|
-
import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
|
|
4
|
-
import {
|
|
3
|
+
// import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
|
|
4
|
+
import {
|
|
5
|
+
cca_climate_impacts,
|
|
6
|
+
cca_adaptation_sectors,
|
|
7
|
+
language,
|
|
8
|
+
} from './../common';
|
|
5
9
|
|
|
6
10
|
const facets = [
|
|
7
11
|
multiTermFacet({
|
|
@@ -41,7 +45,8 @@ const facets = [
|
|
|
41
45
|
label: 'User requirements',
|
|
42
46
|
alwaysVisible: false,
|
|
43
47
|
}),
|
|
44
|
-
|
|
48
|
+
language,
|
|
49
|
+
// ...globalSearchBaseConfig.facets,
|
|
45
50
|
];
|
|
46
51
|
|
|
47
52
|
export default facets;
|