@eeacms/volto-cca-policy 0.3.71 → 0.3.73
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 +68 -4
- package/locales/bg/LC_MESSAGES/volto.po +91 -34
- package/locales/cs/LC_MESSAGES/volto.po +91 -34
- package/locales/da/LC_MESSAGES/volto.po +91 -34
- package/locales/de/LC_MESSAGES/volto.po +91 -34
- package/locales/el/LC_MESSAGES/volto.po +91 -34
- package/locales/en/LC_MESSAGES/volto.po +67 -10
- package/locales/es/LC_MESSAGES/volto.po +91 -34
- package/locales/et/LC_MESSAGES/volto.po +91 -34
- package/locales/fi/LC_MESSAGES/volto.po +91 -34
- package/locales/fr/LC_MESSAGES/volto.po +91 -34
- package/locales/ga/LC_MESSAGES/volto.po +91 -34
- package/locales/hr/LC_MESSAGES/volto.po +91 -34
- package/locales/hu/LC_MESSAGES/volto.po +91 -34
- package/locales/is/LC_MESSAGES/volto.po +91 -34
- package/locales/it/LC_MESSAGES/volto.po +91 -34
- package/locales/lt/LC_MESSAGES/volto.po +91 -34
- package/locales/lv/LC_MESSAGES/volto.po +85 -27
- package/locales/mt/LC_MESSAGES/volto.po +91 -34
- package/locales/nl/LC_MESSAGES/volto.po +91 -34
- package/locales/nn/LC_MESSAGES/volto.po +37 -13
- package/locales/pl/LC_MESSAGES/volto.po +91 -34
- package/locales/pt/LC_MESSAGES/volto.po +91 -34
- package/locales/ro/LC_MESSAGES/volto.po +91 -34
- package/locales/sk/LC_MESSAGES/volto.po +91 -34
- package/locales/sl/LC_MESSAGES/volto.po +91 -34
- package/locales/sv/LC_MESSAGES/volto.po +91 -34
- package/locales/tr/LC_MESSAGES/volto.po +75 -34
- package/package.json +2 -2
- package/src/cntrg.data +35 -0
- package/src/components/manage/Blocks/CountryMapProfile/Filter.jsx +37 -79
- package/src/components/manage/Blocks/CountryMapProfile/Filter.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/Interactions.jsx +49 -3
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +7 -47
- package/src/components/manage/Blocks/CountryMapProfile/mapstyle.js +48 -7
- package/src/components/manage/Blocks/CountryMapProfile/styles.less +30 -10
- package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +26 -2
- package/src/customizations/@plone/volto-slate/widgets/README.md +2 -0
- package/src/express-middleware.js +1 -0
- package/src/helpers/country_map/countryMap.js +5 -0
- package/src/helpers/country_map/euro-countries-simplified.js +39 -0
- package/src/helpers/country_map/hocs.jsx +2 -1
- package/src/search/cca/config.js +0 -67
- package/src/search/cca/facets.js +12 -22
- package/src/search/vocabulary.js +12 -0
package/src/search/cca/config.js
CHANGED
|
@@ -36,31 +36,15 @@ export const clusters = {
|
|
|
36
36
|
})),
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
// console.log('clusters default', clusters, build_runtime_mappings(clusters));
|
|
40
|
-
// console.log(
|
|
41
|
-
// 'clusters mission',
|
|
42
|
-
// clusters_mission,
|
|
43
|
-
// build_runtime_mappings(clusters_mission),
|
|
44
|
-
// );
|
|
45
|
-
|
|
46
39
|
const cca_build_runtime_mappings = {};
|
|
47
40
|
cca_build_runtime_mappings['op_cluster'] = {
|
|
48
41
|
type: 'keyword',
|
|
49
42
|
script: {
|
|
50
43
|
source:
|
|
51
|
-
// "emit('_all_'); if (doc['cca_include_in_search_observatory'][0]) {emit('Health Observatory')} if (doc['cca_include_in_mission.keyword'][0].toString() == 'true') {emit('Mission Portal')} else {emit('Climate-ADAPT')}",
|
|
52
|
-
// "emit('_all_'); if (doc['cca_include_in_search_observatory'][0]) {emit('Health Observatory')} if (doc['cca_include_in_mission.keyword'][0].toString() == 'true' or (doc['id.keyword'].length==1 and doc['id.keyword'][0].toString().indexOf('https://climate-adapt.eea.europa.eu/en/mission')==0)) {emit('Mission Portal')} else {emit('Climate adapt')}",
|
|
53
|
-
// "def objectProvides = ['Adaptation option','Case study','Guidance','Video','Indicator','Information portal','Organisation','Publication reference','Research and knowledge project','Video','Tool'];def vals = doc['objectProvides'];for (defVal in objectProvides) {for (objVal in vals) {if (objVal.contains(defVal)) {emit('Climate-ADAPT')}}}emit('_all_');if (doc['cca_include_in_search_observatory'][0]) {emit('Health Observatory')} if (doc['cca_include_in_mission.keyword'][0].toString() == 'true') {emit('Mission Portal')} else {if (doc['id.keyword'].length==1) { if(doc['id.keyword'][0].toString().contains('climate-adapt.eea.europa.eu/en/mission')) {emit('Mission Portal')}}}",
|
|
54
44
|
"def objectProvides = ['Adaptation option','Case study','Guidance','Video','Indicator','Information portal','Organisation','Publication reference','Research and knowledge project','Video','Tool'];def vals = doc['objectProvides'];for (defVal in objectProvides) {for (objVal in vals) {if (objVal.contains(defVal)) {emit('Climate-ADAPT')}}}emit('_all_');if (doc['cca_include_in_search_observatory'][0]) {for (defVal in objectProvides) {for (objVal in vals) {if (objVal.contains(defVal)){emit('Health Observatory')}}}} if (doc['cca_include_in_mission.keyword'][0].toString() == 'true') {emit('Mission Portal')} else {if (doc['id.keyword'].length==1) { if(doc['id.keyword'][0].toString().contains('climate-adapt.eea.europa.eu/en/mission')) {emit('Mission Portal')}}}",
|
|
55
45
|
},
|
|
56
46
|
};
|
|
57
47
|
|
|
58
|
-
// const mapping = {};
|
|
59
|
-
// mapping[settings.name] = {
|
|
60
|
-
// type: 'keyword',
|
|
61
|
-
// script: { source: source },
|
|
62
|
-
// };
|
|
63
|
-
|
|
64
48
|
export default function installMainSearch(config) {
|
|
65
49
|
const envConfig = ccaConfig;
|
|
66
50
|
const pjson = require('@eeacms/volto-cca-policy/../package.json');
|
|
@@ -68,8 +52,6 @@ export default function installMainSearch(config) {
|
|
|
68
52
|
envConfig.app_name = pjson.name;
|
|
69
53
|
envConfig.app_version = pjson.version;
|
|
70
54
|
|
|
71
|
-
// console.log('config.searchui.ccaSearch clusers', clusters);
|
|
72
|
-
// debugger;
|
|
73
55
|
config.searchui.ccaSearch = {
|
|
74
56
|
...mergeConfig(envConfig, config.searchui.globalsearchbase),
|
|
75
57
|
elastic_index: '_es/globalsearch',
|
|
@@ -101,38 +83,7 @@ export default function installMainSearch(config) {
|
|
|
101
83
|
},
|
|
102
84
|
});
|
|
103
85
|
|
|
104
|
-
// ccaSearch.permanentFilters.push((filters) => {
|
|
105
|
-
// const hasLanguageFilter = filters.find(({ field }) => field === 'language');
|
|
106
|
-
// console.log('permanentFilters', hasLanguageFilter, filters);
|
|
107
|
-
// if (!hasLanguageFilter) {
|
|
108
|
-
// return {
|
|
109
|
-
// terms: {
|
|
110
|
-
// language: ['en'],
|
|
111
|
-
// },
|
|
112
|
-
// };
|
|
113
|
-
// }
|
|
114
|
-
// return null;
|
|
115
|
-
// });
|
|
116
|
-
|
|
117
|
-
// ccaSearch.permanentFilters.push({
|
|
118
|
-
// terms: {
|
|
119
|
-
// objectProvides: [
|
|
120
|
-
// 'Adaptation option',
|
|
121
|
-
// 'Case study',
|
|
122
|
-
// 'Guidance',
|
|
123
|
-
// 'Video',
|
|
124
|
-
// 'Indicator',
|
|
125
|
-
// 'Information portal',
|
|
126
|
-
// 'Organisation',
|
|
127
|
-
// 'Publication reference',
|
|
128
|
-
// 'Research and knowledge project',
|
|
129
|
-
// 'Tool',
|
|
130
|
-
// ],
|
|
131
|
-
// },
|
|
132
|
-
// });
|
|
133
|
-
|
|
134
86
|
ccaSearch.facets = facets;
|
|
135
|
-
// console.log('ccaSearch.facets', ccaSearch.facets);
|
|
136
87
|
|
|
137
88
|
ccaSearch.initialView.tilesLandingPageParams.sections = [
|
|
138
89
|
{
|
|
@@ -196,24 +147,6 @@ export default function installMainSearch(config) {
|
|
|
196
147
|
className: 'facet-option-icon',
|
|
197
148
|
},
|
|
198
149
|
},
|
|
199
|
-
// {
|
|
200
|
-
// id: 'language',
|
|
201
|
-
// title: 'Languages',
|
|
202
|
-
// facetField: 'language',
|
|
203
|
-
// sortOn: 'custom',
|
|
204
|
-
// sortOrder: 'asc',
|
|
205
|
-
// },
|
|
206
|
-
// {
|
|
207
|
-
// id: 'website',
|
|
208
|
-
// title: 'Websites',
|
|
209
|
-
// facetField: 'cluster_name',
|
|
210
|
-
// sortOn: 'count',
|
|
211
|
-
// sortOrder: 'desc',
|
|
212
|
-
// icon: {
|
|
213
|
-
// family: 'Sources',
|
|
214
|
-
// className: 'facet-option-icon',
|
|
215
|
-
// },
|
|
216
|
-
// },
|
|
217
150
|
];
|
|
218
151
|
|
|
219
152
|
if (typeof window !== 'undefined') {
|
package/src/search/cca/facets.js
CHANGED
|
@@ -42,6 +42,18 @@ const messages = defineMessages({
|
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
+
const op_cluster = {
|
|
46
|
+
field: 'op_cluster',
|
|
47
|
+
factory: 'MultiTermFacet',
|
|
48
|
+
isFilterable: true,
|
|
49
|
+
isMulti: true,
|
|
50
|
+
label: messages.section,
|
|
51
|
+
show: 10000,
|
|
52
|
+
showInFacetsList: false,
|
|
53
|
+
ignoreNLPWhenActive: true,
|
|
54
|
+
blacklist: ['Others', 'Publications'],
|
|
55
|
+
};
|
|
56
|
+
|
|
45
57
|
const adaptation_sectors = {
|
|
46
58
|
field: 'cca_adaptation_sectors.keyword',
|
|
47
59
|
factory: 'MultiTermFacet',
|
|
@@ -55,28 +67,6 @@ const adaptation_sectors = {
|
|
|
55
67
|
showAllOptions: true,
|
|
56
68
|
alwaysVisible: true,
|
|
57
69
|
};
|
|
58
|
-
const op_cluster = {
|
|
59
|
-
field: 'op_cluster',
|
|
60
|
-
factory: 'MultiTermFacet',
|
|
61
|
-
isFilterable: true,
|
|
62
|
-
isMulti: true,
|
|
63
|
-
label: messages.section,
|
|
64
|
-
show: 10000,
|
|
65
|
-
showInFacetsList: false,
|
|
66
|
-
ignoreNLPWhenActive: true,
|
|
67
|
-
blacklist: ['Others', 'Publications'],
|
|
68
|
-
};
|
|
69
|
-
// const clusters = {
|
|
70
|
-
// field: 'op_cluster',
|
|
71
|
-
// factory: 'MultiTermFacet',
|
|
72
|
-
// isFilterable: true,
|
|
73
|
-
// isMulti: true,
|
|
74
|
-
// label: 'Section',
|
|
75
|
-
// show: 10000,
|
|
76
|
-
// showInFacetsList: false,
|
|
77
|
-
// ignoreNLPWhenActive: true,
|
|
78
|
-
// blacklist: ['Others', 'Publications'],
|
|
79
|
-
// };
|
|
80
70
|
|
|
81
71
|
const climate_impacts = {
|
|
82
72
|
field: 'cca_climate_impacts.keyword',
|
package/src/search/vocabulary.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { eea_languages } from '@eeacms/volto-cca-policy/constants';
|
|
2
|
+
import { defineMessages } from 'react-intl';
|
|
3
|
+
|
|
4
|
+
defineMessages({
|
|
5
|
+
publicationReference: {
|
|
6
|
+
id: 'Publication reference',
|
|
7
|
+
defaultMessage: 'Publications and reports',
|
|
8
|
+
},
|
|
9
|
+
video: {
|
|
10
|
+
id: 'Video',
|
|
11
|
+
defaultMessage: 'Videos and podcasts',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
2
14
|
|
|
3
15
|
export const vocab = {
|
|
4
16
|
cluster_name: {
|