@eeacms/volto-globalsearch 1.0.0 → 1.0.2
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/.project.eslintrc.js +12 -5
- package/CHANGELOG.md +21 -1
- package/package.json +4 -4
- package/src/config/facets.js +2 -1
- package/src/config/index.js +3 -3
- package/src/config/views.js +25 -0
package/.project.eslintrc.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
const projectRootPath = fs.
|
|
4
|
+
const projectRootPath = fs.existsSync('./project')
|
|
5
|
+
? fs.realpathSync('./project')
|
|
6
|
+
: fs.realpathSync('./../../../');
|
|
5
7
|
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
6
|
-
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
|
|
8
|
+
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
|
|
9
|
+
.compilerOptions;
|
|
7
10
|
|
|
8
11
|
const pathsConfig = jsConfig.paths;
|
|
9
12
|
|
|
10
13
|
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
11
14
|
|
|
12
|
-
Object.keys(pathsConfig).forEach(pkg => {
|
|
15
|
+
Object.keys(pathsConfig).forEach((pkg) => {
|
|
13
16
|
if (pkg === '@plone/volto') {
|
|
14
17
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
|
|
15
18
|
}
|
|
@@ -18,11 +21,15 @@ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
|
18
21
|
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
19
22
|
|
|
20
23
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
21
|
-
const addonAliases = Object.keys(reg.packages).map(o => [
|
|
24
|
+
const addonAliases = Object.keys(reg.packages).map((o) => [
|
|
22
25
|
o,
|
|
23
26
|
reg.packages[o].modulePath,
|
|
24
27
|
]);
|
|
25
28
|
|
|
29
|
+
const voltoSearchlibPath = path.dirname(
|
|
30
|
+
reg.packages['@eeacms/volto-searchlib'].modulePath,
|
|
31
|
+
);
|
|
32
|
+
const searchlibPath = path.resolve(`${voltoSearchlibPath}/searchlib`);
|
|
26
33
|
|
|
27
34
|
module.exports = {
|
|
28
35
|
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
@@ -32,6 +39,7 @@ module.exports = {
|
|
|
32
39
|
map: [
|
|
33
40
|
['@plone/volto', '@plone/volto/src'],
|
|
34
41
|
...addonAliases,
|
|
42
|
+
['@eeacms/search', searchlibPath],
|
|
35
43
|
['@package', `${__dirname}/src`],
|
|
36
44
|
['~', `${__dirname}/src`],
|
|
37
45
|
],
|
|
@@ -43,4 +51,3 @@ module.exports = {
|
|
|
43
51
|
},
|
|
44
52
|
},
|
|
45
53
|
};
|
|
46
|
-
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,24 @@ 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.
|
|
7
|
+
### [1.0.2](https://github.com/eea/volto-globalsearch/compare/1.0.1...1.0.2) - 29 December 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Revert "Automated release 1.0.2" [Alin Voinea - [`2164d79`](https://github.com/eea/volto-globalsearch/commit/2164d798ab3a71fca4769a37aa0f9116f032c16a)]
|
|
12
|
+
- Tweak Published filter [Tiberiu Ichim - [`8e4bafa`](https://github.com/eea/volto-globalsearch/commit/8e4bafa53658b84fac3cc5434680128d891ab427)]
|
|
13
|
+
- Make last 2 years default [Tiberiu Ichim - [`ff765e2`](https://github.com/eea/volto-globalsearch/commit/ff765e24a1d93c60f091aeffa7c3156d8fb98e49)]
|
|
14
|
+
- Add compact listing, placeholder for now [Tiberiu Ichim - [`3f6104f`](https://github.com/eea/volto-globalsearch/commit/3f6104fb1725f7e3c22736a30629f64e4882242a)]
|
|
15
|
+
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`8120264`](https://github.com/eea/volto-globalsearch/commit/812026495c31b272e6ae6415642cf1a6b2f783cf)]
|
|
16
|
+
- yarn 3 [Alin Voinea - [`b61ad50`](https://github.com/eea/volto-globalsearch/commit/b61ad5075a79bebfce1044a6cd4978c92d98fbdc)]
|
|
17
|
+
### [1.0.1](https://github.com/eea/volto-globalsearch/compare/1.0.0...1.0.1) - 16 November 2022
|
|
18
|
+
|
|
19
|
+
#### :hammer_and_wrench: Others
|
|
20
|
+
|
|
21
|
+
- Fix eslint [Tiberiu Ichim - [`cf2886b`](https://github.com/eea/volto-globalsearch/commit/cf2886b412013f9427cf5d39cdf00004bdd9f80b)]
|
|
22
|
+
- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`40c08d2`](https://github.com/eea/volto-globalsearch/commit/40c08d2d4eda81ce306225a81f09e0bcfe6794eb)]
|
|
23
|
+
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`af6e020`](https://github.com/eea/volto-globalsearch/commit/af6e020794798c1f69fee8c08bdf71fc3992230a)]
|
|
24
|
+
## [1.0.0](https://github.com/eea/volto-globalsearch/compare/0.1.7...1.0.0) - 28 October 2022
|
|
8
25
|
|
|
9
26
|
#### :nail_care: Enhancements
|
|
10
27
|
|
|
@@ -22,6 +39,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
22
39
|
#### :hammer_and_wrench: Others
|
|
23
40
|
|
|
24
41
|
- Fix dependencies [kreafox - [`50ad307`](https://github.com/eea/volto-globalsearch/commit/50ad307d64140c43df9dded27c0b532923885764)]
|
|
42
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c2d848e`](https://github.com/eea/volto-globalsearch/commit/c2d848e1efa456f53d883c50769882101e1ce19f)]
|
|
25
43
|
### [0.1.5](https://github.com/eea/volto-globalsearch/compare/0.1.4...0.1.5) - 28 July 2022
|
|
26
44
|
|
|
27
45
|
#### :hammer_and_wrench: Others
|
|
@@ -34,6 +52,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
34
52
|
|
|
35
53
|
#### :hammer_and_wrench: Others
|
|
36
54
|
|
|
55
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5dce07b`](https://github.com/eea/volto-globalsearch/commit/5dce07ba7d1e82776a426e9746d5dab1b0acf738)]
|
|
37
56
|
### [0.1.3](https://github.com/eea/volto-globalsearch/compare/0.1.2...0.1.3) - 10 June 2022
|
|
38
57
|
|
|
39
58
|
### [0.1.2](https://github.com/eea/volto-globalsearch/compare/0.1.1...0.1.2) - 10 June 2022
|
|
@@ -56,6 +75,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
56
75
|
- ignore eslint for *.json files [Zoltan Szabo - [`e18919e`](https://github.com/eea/volto-globalsearch/commit/e18919e1255818c5cf33bf769cca078d75ca3422)]
|
|
57
76
|
- formatting [Zoltan Szabo - [`18282ed`](https://github.com/eea/volto-globalsearch/commit/18282ed159865bcbc50e2fd17417cf6d90d3e593)]
|
|
58
77
|
- updated dependencies [Zoltan Szabo - [`cfcf46e`](https://github.com/eea/volto-globalsearch/commit/cfcf46ee33b23bb31f76955c12a857411f042daf)]
|
|
78
|
+
- [JENKINSFILE] fix after bootstrap [valentinab25 - [`61c8c46`](https://github.com/eea/volto-globalsearch/commit/61c8c46891edf3b52768f12cf7505c034ef7bb89)]
|
|
59
79
|
### 0.0.1 - 19 May 2022
|
|
60
80
|
|
|
61
81
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-globalsearch",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "@eeacms/volto-globalsearch: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@eeacms/volto-listing-block"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@eeacms/volto-
|
|
25
|
-
"@eeacms/volto-
|
|
24
|
+
"@eeacms/volto-listing-block": "*",
|
|
25
|
+
"@eeacms/volto-searchlib": "*"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@plone/scripts": "*",
|
|
29
28
|
"@cypress/code-coverage": "^3.10.0",
|
|
29
|
+
"@plone/scripts": "*",
|
|
30
30
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
31
31
|
"md5": "^2.3.0"
|
|
32
32
|
},
|
package/src/config/facets.js
CHANGED
|
@@ -219,6 +219,7 @@ const facets = [
|
|
|
219
219
|
dateRangeFacet({
|
|
220
220
|
field: 'issued.date',
|
|
221
221
|
label: ' ',
|
|
222
|
+
activeFilterLabel: 'Published',
|
|
222
223
|
isFilter: true, // filters don't need facet options to show up
|
|
223
224
|
showInFacetsList: false,
|
|
224
225
|
showInSecondaryFacetsList: true,
|
|
@@ -234,7 +235,7 @@ const facets = [
|
|
|
234
235
|
],
|
|
235
236
|
factory: 'DropdownRangeFilter',
|
|
236
237
|
default: {
|
|
237
|
-
values: ['
|
|
238
|
+
values: ['Last 2 years'],
|
|
238
239
|
type: 'any',
|
|
239
240
|
},
|
|
240
241
|
}),
|
package/src/config/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { suiFacet, mergeConfig } from '@eeacms/search';
|
|
|
2
2
|
import { getGlobalsearchThumbUrl, getGlobalsearchIconUrl } from './../utils';
|
|
3
3
|
import { typesForClustersOptionsFilter } from './clusters';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { UniversalCard } from '@eeacms/volto-listing-block';
|
|
6
6
|
|
|
7
7
|
// import WebsiteFilterListComponent from './../components/WebsiteFilterListComponent';
|
|
8
8
|
|
|
@@ -72,8 +72,8 @@ export default function install(config) {
|
|
|
72
72
|
|
|
73
73
|
config.resolve.typesForClustersOptionsFilter = typesForClustersOptionsFilter;
|
|
74
74
|
|
|
75
|
-
config.resolve.
|
|
76
|
-
component:
|
|
75
|
+
config.resolve.UniversalCard = {
|
|
76
|
+
component: UniversalCard,
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// config.resolve.WebsiteFilterListComponent = {
|
package/src/config/views.js
CHANGED
|
@@ -24,7 +24,19 @@ export default {
|
|
|
24
24
|
item: 'CardItem',
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
id: 'compactListing',
|
|
29
|
+
title: 'Compact listing',
|
|
30
|
+
icon: 'th',
|
|
31
|
+
render: null,
|
|
32
|
+
isDefault: false,
|
|
33
|
+
factories: {
|
|
34
|
+
view: 'HorizontalCard.Group',
|
|
35
|
+
item: 'HorizontalCardItem',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
27
38
|
],
|
|
39
|
+
|
|
28
40
|
cardViewParams: {
|
|
29
41
|
urlField: 'about',
|
|
30
42
|
titleField: 'title',
|
|
@@ -51,6 +63,19 @@ export default {
|
|
|
51
63
|
clusterIcons,
|
|
52
64
|
},
|
|
53
65
|
|
|
66
|
+
compactListingViewParams: {
|
|
67
|
+
urlField: 'about',
|
|
68
|
+
titleField: 'title',
|
|
69
|
+
metatypeField: 'objectProvides',
|
|
70
|
+
descriptionField: 'description',
|
|
71
|
+
tagsField: 'topic',
|
|
72
|
+
issuedField: 'issued',
|
|
73
|
+
enabled: false,
|
|
74
|
+
getThumbnailUrl: 'getGlobalsearchThumbUrl',
|
|
75
|
+
getIconUrl: 'getGlobalsearchIconUrl',
|
|
76
|
+
clusterIcons,
|
|
77
|
+
},
|
|
78
|
+
|
|
54
79
|
initialView: {
|
|
55
80
|
factory: 'TilesLandingPage',
|
|
56
81
|
tilesLandingPageParams: {
|