@eeacms/volto-globalsearch 0.1.4 → 0.1.6

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,51 +4,58 @@ 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.4](https://github.com/eea/volto-globalsearch/compare/0.1.3...0.1.4)
7
+ ### [0.1.6](https://github.com/eea/volto-globalsearch/compare/0.1.5...0.1.6) - 27 September 2022
8
8
 
9
+ #### :hammer_and_wrench: Others
9
10
 
10
- #### [0.1.3](https://github.com/eea/volto-globalsearch/compare/0.1.2...0.1.3)
11
+ - Fix dependencies [kreafox - [`50ad307`](https://github.com/eea/volto-globalsearch/commit/50ad307d64140c43df9dded27c0b532923885764)]
12
+ - Add UniversalItem [kreafox - [`bd71e6b`](https://github.com/eea/volto-globalsearch/commit/bd71e6b7c6f9f57563c0eefd60ebeaeb53fff43f)]
13
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c2d848e`](https://github.com/eea/volto-globalsearch/commit/c2d848e1efa456f53d883c50769882101e1ce19f)]
14
+ ### [0.1.5](https://github.com/eea/volto-globalsearch/compare/0.1.4...0.1.5) - 28 July 2022
11
15
 
12
- > 10 June 2022
16
+ #### :hammer_and_wrench: Others
13
17
 
14
- - Fix dependencies [`#5`](https://github.com/eea/volto-globalsearch/pull/5)
18
+ - Use simple facet view for reading time [kreafox - [`7b1d61c`](https://github.com/eea/volto-globalsearch/commit/7b1d61c533ce64061ec1430c3d3b71b3f904c74b)]
19
+ - New version of facets for globalsearch [Tiberiu Ichim - [`b3cef12`](https://github.com/eea/volto-globalsearch/commit/b3cef1264f7f5d0f2c30710b1cdfd82c5adc3f98)]
20
+ - Switch to simple MultiTermFacet [Tiberiu Ichim - [`33b5062`](https://github.com/eea/volto-globalsearch/commit/33b5062347761044b94c94f9cdb33528370140bf)]
21
+ - Don't show minutes in reading time [Tiberiu Ichim - [`e35bf3d`](https://github.com/eea/volto-globalsearch/commit/e35bf3dc6b6270f21d6211b57ae68f617f2129bc)]
22
+ ### [0.1.4](https://github.com/eea/volto-globalsearch/compare/0.1.3...0.1.4) - 30 June 2022
15
23
 
16
- #### [0.1.2](https://github.com/eea/volto-globalsearch/compare/0.1.1...0.1.2)
24
+ #### :hammer_and_wrench: Others
17
25
 
18
- > 10 June 2022
26
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5dce07b`](https://github.com/eea/volto-globalsearch/commit/5dce07ba7d1e82776a426e9746d5dab1b0acf738)]
27
+ ### [0.1.3](https://github.com/eea/volto-globalsearch/compare/0.1.2...0.1.3) - 10 June 2022
19
28
 
20
- - Develop [`#4`](https://github.com/eea/volto-globalsearch/pull/4)
21
- - New design v1 [`#3`](https://github.com/eea/volto-globalsearch/pull/3)
22
- - Change layout component [`0c84f55`](https://github.com/eea/volto-globalsearch/commit/0c84f558596f68cff1243ed01cbec3307d1e1fc7)
29
+ ### [0.1.2](https://github.com/eea/volto-globalsearch/compare/0.1.1...0.1.2) - 10 June 2022
23
30
 
24
- #### [0.1.1](https://github.com/eea/volto-globalsearch/compare/0.1.0...0.1.1)
31
+ #### :hammer_and_wrench: Others
25
32
 
26
- > 9 June 2022
33
+ - Change layout component [kreafox - [`0c84f55`](https://github.com/eea/volto-globalsearch/commit/0c84f558596f68cff1243ed01cbec3307d1e1fc7)]
34
+ ### [0.1.1](https://github.com/eea/volto-globalsearch/compare/0.1.0...0.1.1) - 9 June 2022
27
35
 
28
- - Develop [`#2`](https://github.com/eea/volto-globalsearch/pull/2)
29
- - updated versions [`af47bcf`](https://github.com/eea/volto-globalsearch/commit/af47bcfc92b9f64bf05825717c70d430a02af0e4)
30
- - Update versions [`6a367af`](https://github.com/eea/volto-globalsearch/commit/6a367affd02af1ddfad1686007ab2615d2f278af)
36
+ #### :hammer_and_wrench: Others
31
37
 
32
- #### [0.1.0](https://github.com/eea/volto-globalsearch/compare/0.0.1...0.1.0)
38
+ - updated versions [Zoltan Szabo - [`af47bcf`](https://github.com/eea/volto-globalsearch/commit/af47bcfc92b9f64bf05825717c70d430a02af0e4)]
39
+ - Update versions [Tiberiu Ichim - [`6a367af`](https://github.com/eea/volto-globalsearch/commit/6a367affd02af1ddfad1686007ab2615d2f278af)]
40
+ ### [0.1.0](https://github.com/eea/volto-globalsearch/compare/0.0.1...0.1.0) - 7 June 2022
33
41
 
34
- > 7 June 2022
42
+ #### :hammer_and_wrench: Others
35
43
 
36
- - Develop [`#1`](https://github.com/eea/volto-globalsearch/pull/1)
37
- - fixed stylelint for less file [`162704c`](https://github.com/eea/volto-globalsearch/commit/162704c502109e8ab0d7903568ff42603c3bc852)
38
- - prettier less file [`6bd424c`](https://github.com/eea/volto-globalsearch/commit/6bd424c1dae2ceceaf412339c3096dc575c0bc65)
39
- - ignore eslint for *.json files [`e18919e`](https://github.com/eea/volto-globalsearch/commit/e18919e1255818c5cf33bf769cca078d75ca3422)
40
- - formatting [`18282ed`](https://github.com/eea/volto-globalsearch/commit/18282ed159865bcbc50e2fd17417cf6d90d3e593)
41
- - updated dependencies [`cfcf46e`](https://github.com/eea/volto-globalsearch/commit/cfcf46ee33b23bb31f76955c12a857411f042daf)
44
+ - fixed stylelint for less file [Zoltan Szabo - [`162704c`](https://github.com/eea/volto-globalsearch/commit/162704c502109e8ab0d7903568ff42603c3bc852)]
45
+ - prettier less file [Zoltan Szabo - [`6bd424c`](https://github.com/eea/volto-globalsearch/commit/6bd424c1dae2ceceaf412339c3096dc575c0bc65)]
46
+ - ignore eslint for *.json files [Zoltan Szabo - [`e18919e`](https://github.com/eea/volto-globalsearch/commit/e18919e1255818c5cf33bf769cca078d75ca3422)]
47
+ - formatting [Zoltan Szabo - [`18282ed`](https://github.com/eea/volto-globalsearch/commit/18282ed159865bcbc50e2fd17417cf6d90d3e593)]
48
+ - updated dependencies [Zoltan Szabo - [`cfcf46e`](https://github.com/eea/volto-globalsearch/commit/cfcf46ee33b23bb31f76955c12a857411f042daf)]
49
+ - [JENKINSFILE] fix after bootstrap [valentinab25 - [`61c8c46`](https://github.com/eea/volto-globalsearch/commit/61c8c46891edf3b52768f12cf7505c034ef7bb89)]
50
+ ### 0.0.1 - 19 May 2022
42
51
 
43
- #### 0.0.1
52
+ #### :hammer_and_wrench: Others
44
53
 
45
- > 19 May 2022
46
-
47
- - WIP [`be733dd`](https://github.com/eea/volto-globalsearch/commit/be733dd1b600855d330cf92fbdcbf75bdade37dc)
48
- - enable nlp for globalsearch [`af84cf8`](https://github.com/eea/volto-globalsearch/commit/af84cf80adecb402ee32e248a1939f32342e35cf)
49
- - Disable thumbnail for datahub series [`07fcfda`](https://github.com/eea/volto-globalsearch/commit/07fcfda64a357ce6e91242b254b2c93759b60298)
50
- - Remove console.log calls [`fb7b1ed`](https://github.com/eea/volto-globalsearch/commit/fb7b1ed4b2ceea4afc716532e1122380460a95f1)
51
- - Depend onf volto-searchlib [`b2150f3`](https://github.com/eea/volto-globalsearch/commit/b2150f3f0f9a469622e499d8f4814e15777946a2)
52
- - Add stuff from searchlib [`86735df`](https://github.com/eea/volto-globalsearch/commit/86735dfd46a46754983bf4f8b22ec9b2f120f100)
53
- - Run bootstrap [`b219853`](https://github.com/eea/volto-globalsearch/commit/b219853d799a21f5db4460ad18c251a21e73da8f)
54
- - Initial commit [`51e39a1`](https://github.com/eea/volto-globalsearch/commit/51e39a1daef6e253c79d212da68183bc4e93b63f)
54
+ - WIP [Tiberiu Ichim - [`be733dd`](https://github.com/eea/volto-globalsearch/commit/be733dd1b600855d330cf92fbdcbf75bdade37dc)]
55
+ - enable nlp for globalsearch [Zoltan Szabo - [`af84cf8`](https://github.com/eea/volto-globalsearch/commit/af84cf80adecb402ee32e248a1939f32342e35cf)]
56
+ - Disable thumbnail for datahub series [Zoltan Szabo - [`07fcfda`](https://github.com/eea/volto-globalsearch/commit/07fcfda64a357ce6e91242b254b2c93759b60298)]
57
+ - Remove console.log calls [Tiberiu Ichim - [`fb7b1ed`](https://github.com/eea/volto-globalsearch/commit/fb7b1ed4b2ceea4afc716532e1122380460a95f1)]
58
+ - Depend onf volto-searchlib [Tiberiu Ichim - [`b2150f3`](https://github.com/eea/volto-globalsearch/commit/b2150f3f0f9a469622e499d8f4814e15777946a2)]
59
+ - Add stuff from searchlib [Tiberiu Ichim - [`86735df`](https://github.com/eea/volto-globalsearch/commit/86735dfd46a46754983bf4f8b22ec9b2f120f100)]
60
+ - Run bootstrap [Tiberiu Ichim - [`b219853`](https://github.com/eea/volto-globalsearch/commit/b219853d799a21f5db4460ad18c251a21e73da8f)]
61
+ - Initial commit [Tiberiu Ichim - [`51e39a1`](https://github.com/eea/volto-globalsearch/commit/51e39a1daef6e253c79d212da68183bc4e93b63f)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-globalsearch",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "@eeacms/volto-globalsearch: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -17,7 +17,8 @@
17
17
  "url": "git@github.com:eea/volto-globalsearch.git"
18
18
  },
19
19
  "dependencies": {
20
- "@eeacms/volto-searchlib": "*"
20
+ "@eeacms/volto-searchlib": "*",
21
+ "@eeacms/volto-listing-block": "*"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@plone/scripts": "*",
@@ -25,7 +26,8 @@
25
26
  "babel-plugin-transform-class-properties": "^6.24.1"
26
27
  },
27
28
  "addons": [
28
- "@eeacms/volto-searchlib"
29
+ "@eeacms/volto-searchlib",
30
+ "@eeacms/volto-listing-block"
29
31
  ],
30
32
  "scripts": {
31
33
  "release": "release-it",
@@ -11,6 +11,43 @@ import placesBlacklist from './json/placesBlacklist.json';
11
11
  import topicsBlacklist from './json/topicsBlacklist.json';
12
12
  import { getTodayWithTime } from '../utils';
13
13
 
14
+ const languageCodes = [
15
+ 'ar',
16
+ 'sr',
17
+ 'sq',
18
+ 'bg',
19
+ 'bs',
20
+ 'cs',
21
+ 'hr',
22
+ 'da',
23
+ 'nl',
24
+ 'el',
25
+ 'en',
26
+ 'et',
27
+ 'fi',
28
+ 'fr',
29
+ 'ga',
30
+ 'de',
31
+ 'hu',
32
+ 'is',
33
+ 'it',
34
+ 'lv',
35
+ 'lt',
36
+ 'mk',
37
+ 'mt',
38
+ 'no',
39
+ 'pl',
40
+ 'pt',
41
+ 'ro',
42
+ 'ru',
43
+ 'sh',
44
+ 'sk',
45
+ 'sl',
46
+ 'es',
47
+ 'sv',
48
+ 'tr',
49
+ ];
50
+
14
51
  const facets = [
15
52
  booleanFacet(() => ({
16
53
  field: 'IncludeArchived',
@@ -60,11 +97,9 @@ const facets = [
60
97
  isMulti: true,
61
98
  label: 'Topics',
62
99
  blacklist: topicsBlacklist,
63
- factory: 'MultiTermListFacet',
64
- wrapper: 'ModalFacetWrapper',
65
100
  show: 10000,
66
101
  showAllOptions: true, // show all options (even if 0) in modal facet
67
- // factory: 'sui.Facet',
102
+ alwaysVisible: true,
68
103
  }),
69
104
  multiTermFacet({
70
105
  field: 'spatial',
@@ -72,21 +107,18 @@ const facets = [
72
107
  isMulti: true,
73
108
  label: 'Countries',
74
109
  whitelist: spatialWhitelist,
75
- wrapper: 'ModalFacetWrapper',
76
110
  show: 10000,
77
- factory: 'MultiTermListFacet',
78
111
  iconsFamily: 'Countries',
79
112
  enableExact: true,
80
113
  sortOn: 'value',
114
+ alwaysVisible: true,
81
115
  }),
82
116
  multiTermFacet({
83
117
  field: 'op_cluster',
84
118
  isFilterable: true,
85
119
  isMulti: true,
86
120
  label: 'Section',
87
- wrapper: 'ModalFacetWrapper',
88
121
  show: 10000,
89
- factory: 'MultiTermListFacet',
90
122
  showInFacetsList: false,
91
123
  }),
92
124
 
@@ -96,9 +128,7 @@ const facets = [
96
128
  isMulti: true,
97
129
  label: 'Regions/Places/Cities/Seas...',
98
130
  blacklist: placesBlacklist,
99
- wrapper: 'ModalFacetWrapper',
100
131
  show: 10000,
101
- factory: 'MultiTermListFacet',
102
132
  showAllOptions: true, // show all options (even if 0) in modal facet
103
133
  }),
104
134
  multiTermFacet({
@@ -108,8 +138,6 @@ const facets = [
108
138
  label: 'Content types',
109
139
  iconsFamily: 'Content types',
110
140
  //whitelist: objectProvidesWhitelist,
111
- wrapper: 'ModalFacetWrapper',
112
- factory: 'MultiTermListFacet',
113
141
  optionsFilter: 'typesForClustersOptionsFilter',
114
142
  }),
115
143
  multiTermFacet({
@@ -117,12 +145,9 @@ const facets = [
117
145
  isFilterable: false,
118
146
  isMulti: true,
119
147
  label: 'Sources',
120
- wrapper: 'ModalFacetWrapper',
121
- factory: 'MultiTermListFacet',
122
148
  iconsFamily: 'Sources',
123
149
  }),
124
150
  histogramFacet({
125
- wrapper: 'ModalFacetWrapper',
126
151
  field: 'year',
127
152
  // isFilterable: false,
128
153
  isMulti: true,
@@ -157,9 +182,7 @@ const facets = [
157
182
  }),
158
183
 
159
184
  histogramFacet({
160
- wrapper: 'ModalFacetWrapper',
161
185
  field: 'time_coverage',
162
- // isFilterable: false,
163
186
  isMulti: true,
164
187
  label: 'Time coverage',
165
188
  // TODO: implement split in buckets
@@ -170,31 +193,14 @@ const facets = [
170
193
  includeOutlierEnd: false,
171
194
  }),
172
195
  step: 10,
173
- // [
174
- // {
175
- // to: 1900,
176
- // },
177
- // {
178
- // key: '2001-2010',
179
- // from: 2001,
180
- // to: 2010,
181
- // },
182
- // {
183
- // from: 2011,
184
- // },
185
- // ]
186
- // min_max_script:
187
- //
188
- //"def vals = doc['year']; if (vals.length == 0){return 2000} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2000);}return ret;}",
189
-
196
+ // isFilterable: false,
190
197
  aggs_script:
191
198
  "def vals = doc['time_coverage']; if (vals.length == 0){return 2500} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2500);}return ret;}",
192
199
  }),
193
200
 
194
201
  fixedRangeFacet({
195
- wrapper: 'ModalFacetWrapper',
196
202
  field: 'readingTime',
197
- label: 'Reading time (minutes)',
203
+ label: 'Reading time',
198
204
  rangeType: 'fixed',
199
205
  isMulti: true,
200
206
  ranges: [
@@ -204,7 +210,7 @@ const facets = [
204
210
  { from: 25, to: 10000, key: 'Large (25+ minutes)' },
205
211
  // { to: -0.0001, key: 'Unknown' },
206
212
  ],
207
- factory: 'ModalFixedRangeFacet',
213
+ // factory: 'ModalFixedRangeFacet',
208
214
  default: {
209
215
  values: [{ name: 'All', rangeType: 'fixed' }],
210
216
  type: 'any',
@@ -233,7 +239,6 @@ const facets = [
233
239
  },
234
240
  }),
235
241
  multiTermFacet({
236
- wrapper: 'ModalFacetWrapper',
237
242
  field: 'language',
238
243
  isFilterable: false,
239
244
  isMulti: true,
@@ -242,43 +247,7 @@ const facets = [
242
247
  values: ['en'],
243
248
  type: 'any',
244
249
  },
245
- factory: 'MultiTermListFacet',
246
- facetValues: [
247
- 'ar',
248
- 'sr',
249
- 'sq',
250
- 'bg',
251
- 'bs',
252
- 'cs',
253
- 'hr',
254
- 'da',
255
- 'nl',
256
- 'el',
257
- 'en',
258
- 'et',
259
- 'fi',
260
- 'fr',
261
- 'ga',
262
- 'de',
263
- 'hu',
264
- 'is',
265
- 'it',
266
- 'lv',
267
- 'lt',
268
- 'mk',
269
- 'mt',
270
- 'no',
271
- 'pl',
272
- 'pt',
273
- 'ro',
274
- 'ru',
275
- 'sh',
276
- 'sk',
277
- 'sl',
278
- 'es',
279
- 'sv',
280
- 'tr',
281
- ],
250
+ facetValues: languageCodes,
282
251
  sortOn: 'custom',
283
252
  sortOnCustomLabel: 'Alphabetical',
284
253
  }),
@@ -296,3 +265,37 @@ export default {
296
265
  // type: 'any',
297
266
  // },
298
267
  // },
268
+ // wrapper: 'ModalFacetWrapper',
269
+ // [
270
+ // {
271
+ // to: 1900,
272
+ // },
273
+ // {
274
+ // key: '2001-2010',
275
+ // from: 2001,
276
+ // to: 2010,
277
+ // },
278
+ // {
279
+ // from: 2011,
280
+ // },
281
+ // ]
282
+ // min_max_script:
283
+ //
284
+ //"def vals = doc['year']; if (vals.length == 0){return 2000} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2000);}return ret;}",
285
+ // factory: 'MultiTermFacet',
286
+ // wrapper: 'ModalFacetWrapper',
287
+ // factory: 'sui.Facet',
288
+ // factory: 'MultiTermFacet',
289
+ // wrapper: 'ModalFacetWrapper',
290
+ // wrapper: 'ModalFacetWrapper',
291
+ // factory: 'MultiTermFacet',
292
+ // wrapper: 'ModalFacetWrapper',
293
+ // wrapper: 'ModalFacetWrapper',
294
+ // factory: 'MultiTermFacet',
295
+ // factory: 'MultiTermFacet',
296
+ // wrapper: 'ModalFacetWrapper',
297
+ // factory: 'MultiTermFacet',
298
+ // wrapper: 'ModalFacetWrapper',
299
+ // factory: 'MultiTermFacet',
300
+ // wrapper: 'ModalFacetWrapper',
301
+ // wrapper: 'ModalFacetWrapper',
@@ -18,7 +18,7 @@ const globalSearchConfig = {
18
18
  layoutComponent: 'TopFilterLayout',
19
19
  contentBodyComponent: 'FilterAsideContentView',
20
20
  enableNLP: true, // enables NLP capabilities
21
- facetsListComponent: 'VerticalCardsModalFacets',
21
+ facetsListComponent: 'DropdownFacetsList',
22
22
  runtime_mappings: build_runtime_mappings(clusters),
23
23
  useSearchPhrases: false,
24
24
  searchAsYouType: false,
@@ -2,6 +2,8 @@ import { suiFacet, mergeConfig } from '@eeacms/search';
2
2
  import { getGlobalsearchThumbUrl, getGlobalsearchIconUrl } from './../utils';
3
3
  import { typesForClustersOptionsFilter } from './clusters';
4
4
 
5
+ import { UniversalItem } from '@eeacms/volto-listing-block';
6
+
5
7
  // import WebsiteFilterListComponent from './../components/WebsiteFilterListComponent';
6
8
 
7
9
  import contentTypeNormalize from './json/contentTypeNormalize.json';
@@ -69,6 +71,11 @@ export default function install(config) {
69
71
  );
70
72
 
71
73
  config.resolve.typesForClustersOptionsFilter = typesForClustersOptionsFilter;
74
+
75
+ config.resolve.UniversalItem = {
76
+ component: UniversalItem,
77
+ };
78
+
72
79
  // config.resolve.WebsiteFilterListComponent = {
73
80
  // component: WebsiteFilterListComponent,
74
81
  // };