@eeacms/volto-globalsearch 1.0.12 → 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 CHANGED
@@ -4,6 +4,20 @@ 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)]
15
+ ### [1.0.13](https://github.com/eea/volto-globalsearch/compare/1.0.12...1.0.13) - 7 March 2023
16
+
17
+ #### :hammer_and_wrench: Others
18
+
19
+ - set the middleware proxy address for globalsearchbase [Zoltan Szabo - [`d0a0802`](https://github.com/eea/volto-globalsearch/commit/d0a08026fa73ce8fd15b666c922e7db71104a5d1)]
20
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b710a4f`](https://github.com/eea/volto-globalsearch/commit/b710a4f73f61e164ecf502a83e7f07d0daf578b3)]
7
21
  ### [1.0.12](https://github.com/eea/volto-globalsearch/compare/1.0.11...1.0.12) - 1 March 2023
8
22
 
9
23
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-globalsearch",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "@eeacms/volto-globalsearch: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -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, 2022],
173
+ normalRange: [1994, currentYear],
171
174
  includeOutlierStart: false,
172
175
  includeOutlierEnd: false,
173
176
  }),
@@ -77,6 +77,9 @@ export default function install(config) {
77
77
  if (typeof window !== 'undefined') {
78
78
  config.searchui.globalsearch.host =
79
79
  process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
80
+
81
+ config.searchui.globalsearchbase.host =
82
+ process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
80
83
  }
81
84
 
82
85
  config.searchui.standalone = {
@@ -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
- result.about?.raw?.startsWith('https://www.eea.europa.eu')
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;