@eeacms/volto-globalsearch 1.0.13 → 1.0.14
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 +8 -0
- package/package.json +1 -1
- package/src/config/facets.js +4 -1
- package/src/config/views.js +12 -0
- package/src/utils.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ 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
|
+
### [1.0.14](https://github.com/eea/volto-globalsearch/compare/1.0.13...1.0.14) - 10 March 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- test(Jenkinsfile): Use latest stable volto for testing [Zoltan Szabo - [`f0f9449`](https://github.com/eea/volto-globalsearch/commit/f0f94497767e6a7cf8ecb721fabddba757d7aebd)]
|
|
12
|
+
- use the correct thumbnails for the new eea site [Zoltan Szabo - [`5e2a38f`](https://github.com/eea/volto-globalsearch/commit/5e2a38ffe2559b9d64e6431cf3b08bfe8c9b4bae)]
|
|
13
|
+
- update landing page config [Zoltan Szabo - [`e00c526`](https://github.com/eea/volto-globalsearch/commit/e00c5268bad30215808497ec0f1b8072a7288f05)]
|
|
14
|
+
- use current year for Publishing year facet [Zoltan Szabo - [`01e6cf2`](https://github.com/eea/volto-globalsearch/commit/01e6cf26dadd5e43d121cf2230dad32da7d12d79)]
|
|
7
15
|
### [1.0.13](https://github.com/eea/volto-globalsearch/compare/1.0.12...1.0.13) - 7 March 2023
|
|
8
16
|
|
|
9
17
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
package/src/config/facets.js
CHANGED
|
@@ -48,6 +48,9 @@ const languageCodes = [
|
|
|
48
48
|
'tr',
|
|
49
49
|
];
|
|
50
50
|
|
|
51
|
+
const today = new Date();
|
|
52
|
+
const currentYear = today.getFullYear();
|
|
53
|
+
|
|
51
54
|
const facets = [
|
|
52
55
|
booleanFacet(() => ({
|
|
53
56
|
field: 'IncludeArchived',
|
|
@@ -167,7 +170,7 @@ const facets = [
|
|
|
167
170
|
// TODO: implement split in buckets
|
|
168
171
|
ranges: makeRange({
|
|
169
172
|
step: 1,
|
|
170
|
-
normalRange: [1994,
|
|
173
|
+
normalRange: [1994, currentYear],
|
|
171
174
|
includeOutlierStart: false,
|
|
172
175
|
includeOutlierEnd: false,
|
|
173
176
|
}),
|
package/src/config/views.js
CHANGED
|
@@ -83,6 +83,18 @@ export default {
|
|
|
83
83
|
// clusterIcons,
|
|
84
84
|
sortField: 'issued.date',
|
|
85
85
|
sortDirection: 'desc',
|
|
86
|
+
default_filters: [
|
|
87
|
+
{
|
|
88
|
+
field: 'language',
|
|
89
|
+
values: ['en'],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
//TODO: This is a temporary solution, until we find another way to detect if there was any interaction on the landing page
|
|
93
|
+
filterForAllResults: {
|
|
94
|
+
field: 'items_count_language',
|
|
95
|
+
value: 1,
|
|
96
|
+
},
|
|
97
|
+
|
|
86
98
|
sections: [
|
|
87
99
|
{
|
|
88
100
|
id: 'topics',
|
package/src/utils.js
CHANGED
|
@@ -167,7 +167,8 @@ export const getGlobalsearchThumbUrl = (contentTypeNormalize) => (
|
|
|
167
167
|
result.about?.raw?.indexOf('://biodiversity.europa.eu') !== -1 ||
|
|
168
168
|
result.about?.raw?.indexOf('://forest.eea.europa.eu') !== -1 ||
|
|
169
169
|
result.about?.raw?.indexOf('://climate-energy.eea.europa.eu') !== -1 ||
|
|
170
|
-
result.about?.raw?.indexOf('://industry.eea.europa.eu') !== -1
|
|
170
|
+
result.about?.raw?.indexOf('://industry.eea.europa.eu') !== -1 ||
|
|
171
|
+
result.about?.raw?.indexOf('://www.eea.europa.eu/en/') !== -1
|
|
171
172
|
) {
|
|
172
173
|
if (result.image_preview) {
|
|
173
174
|
image = result.image_preview.raw;
|
|
@@ -175,8 +176,9 @@ export const getGlobalsearchThumbUrl = (contentTypeNormalize) => (
|
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
if (
|
|
178
|
-
result.about?.raw?.startsWith('http://www.eea.europa.eu') ||
|
|
179
|
-
|
|
179
|
+
(result.about?.raw?.startsWith('http://www.eea.europa.eu') ||
|
|
180
|
+
result.about?.raw?.startsWith('https://www.eea.europa.eu')) &&
|
|
181
|
+
result.about?.raw?.indexOf('://www.eea.europa.eu/en/') === -1
|
|
180
182
|
) {
|
|
181
183
|
image = result.about.raw + '/image_preview';
|
|
182
184
|
has_img = true;
|