@eeacms/volto-globalsearch 0.1.7 → 1.0.1

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.
@@ -2,7 +2,7 @@ const defaultBabel = require('@plone/volto/babel');
2
2
 
3
3
  function applyDefault(api) {
4
4
  const voltoBabel = defaultBabel(api);
5
- voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul');
5
+ voltoBabel.plugins.push('istanbul');
6
6
  return voltoBabel;
7
7
  }
8
8
 
@@ -0,0 +1 @@
1
+ module.exports = require('@plone/volto/babel');
@@ -1,15 +1,18 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
- const projectRootPath = fs.realpathSync('./project'); // __dirname
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')).compilerOptions;
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,6 +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.1](https://github.com/eea/volto-globalsearch/compare/1.0.0...1.0.1) - 16 November 2022
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Fix eslint [Tiberiu Ichim - [`cf2886b`](https://github.com/eea/volto-globalsearch/commit/cf2886b412013f9427cf5d39cdf00004bdd9f80b)]
12
+ - test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`40c08d2`](https://github.com/eea/volto-globalsearch/commit/40c08d2d4eda81ce306225a81f09e0bcfe6794eb)]
13
+ - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`af6e020`](https://github.com/eea/volto-globalsearch/commit/af6e020794798c1f69fee8c08bdf71fc3992230a)]
14
+ ## [1.0.0](https://github.com/eea/volto-globalsearch/compare/0.1.7...1.0.0) - 28 October 2022
15
+
16
+ #### :nail_care: Enhancements
17
+
18
+ - refactor(cypress): Cypress 10 / Razzle 4 [Alin Voinea - [`12e1c49`](https://github.com/eea/volto-globalsearch/commit/12e1c498311752bd5d2fae59b26055d79bb90f45)]
19
+ - refactor(volto-slate): Upgrade to @plone/volto-slate - refs #153447 [Alin Voinea - [`ee7cff9`](https://github.com/eea/volto-globalsearch/commit/ee7cff9442027ff25a80ce77fd99994fa01c0a50)]
20
+
21
+ #### :hammer_and_wrench: Others
22
+
23
+ - Cleanup [Alin Voinea - [`4ca5553`](https://github.com/eea/volto-globalsearch/commit/4ca55539c748ffc43a65092cfc4d159f885605bc)]
24
+ - Update dependencies [Alin Voinea - [`03d8040`](https://github.com/eea/volto-globalsearch/commit/03d8040b74a22cf23680fa5161b95885f4b0ee84)]
7
25
  ### [0.1.7](https://github.com/eea/volto-globalsearch/compare/0.1.6...0.1.7) - 19 October 2022
8
26
 
9
27
  ### [0.1.6](https://github.com/eea/volto-globalsearch/compare/0.1.5...0.1.6) - 27 September 2022
package/README.md CHANGED
@@ -15,36 +15,14 @@
15
15
  [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-globalsearch-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-globalsearch-develop)
16
16
 
17
17
 
18
- [Volto](https://github.com/plone/volto) add-on
18
+ EEA Elastic Search Block with NLP integration [Volto](https://github.com/plone/volto) add-on
19
19
 
20
- ## Features
20
+ ## Demo
21
21
 
22
- Demo GIF
22
+ - https://demo-www.eea.europa.eu/en/advanced-search
23
23
 
24
24
  ## Getting started
25
25
 
26
- ### Try volto-globalsearch with Docker
27
-
28
- 1. Get the latest Docker images
29
-
30
- ```
31
- docker pull plone
32
- docker pull plone/volto
33
- ```
34
-
35
- 1. Start Plone backend
36
- ```
37
- docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
38
- ```
39
-
40
- 1. Start Volto frontend
41
-
42
- ```
43
- docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-globalsearch" plone/volto
44
- ```
45
-
46
- 1. Go to http://localhost:3000
47
-
48
26
  ### Add volto-globalsearch to your Volto project
49
27
 
50
28
  1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
@@ -59,7 +37,7 @@ Demo GIF
59
37
  ],
60
38
 
61
39
  "dependencies": {
62
- "@eeacms/volto-globalsearch": "^1.0.0"
40
+ "@eeacms/volto-globalsearch": "*"
63
41
  }
64
42
  ```
65
43
 
@@ -100,7 +78,3 @@ See [LICENSE.md](https://github.com/eea/volto-globalsearch/blob/master/LICENSE.m
100
78
  ## Funding
101
79
 
102
80
  [European Environment Agency (EU)](http://eea.europa.eu)
103
- nding
104
-
105
- [European Environment Agency (EU)](http://eea.europa.eu)
106
-
package/babel.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports = function (api) {
2
2
  api.cache(true);
3
- const presets = ['razzle/babel'];
3
+ const presets = ['razzle'];
4
4
  const plugins = [
5
5
  [
6
6
  'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
@@ -0,0 +1,26 @@
1
+ const { defineConfig } = require('cypress');
2
+
3
+ module.exports = defineConfig({
4
+ viewportWidth: 1280,
5
+ defaultCommandTimeout: 8888,
6
+ chromeWebSecurity: false,
7
+ reporter: 'junit',
8
+ video: true,
9
+ retries: {
10
+ runMode: 8,
11
+ openMode: 0,
12
+ },
13
+ reporterOptions: {
14
+ mochaFile: 'cypress/reports/cypress-[hash].xml',
15
+ jenkinsMode: true,
16
+ toConsole: true,
17
+ },
18
+ e2e: {
19
+ setupNodeEvents(on, config) {
20
+ // e2e testing node events setup code
21
+ require('@cypress/code-coverage/task')(on, config);
22
+ return config;
23
+ },
24
+ baseUrl: 'http://localhost:3000',
25
+ },
26
+ });
@@ -9,18 +9,18 @@ module.exports = {
9
9
  '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
10
10
  '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
11
11
  '@package/(.*)$': '<rootDir>/src/$1',
12
+ '@root/(.*)$': '<rootDir>/src/$1',
12
13
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
13
14
  '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
14
- 'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
15
+ '@plone/volto-slate':
16
+ '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
15
17
  '~/(.*)$': '<rootDir>/src/$1',
16
18
  'load-volto-addons':
17
19
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
20
+ '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
18
21
  },
19
22
  transform: {
20
23
  '^.+\\.js(x)?$': 'babel-jest',
21
- '^.+\\.css$': 'jest-css-modules',
22
- '^.+\\.less$': 'jest-css-modules',
23
- '^.+\\.scss$': 'jest-css-modules',
24
24
  '^.+\\.(png)$': 'jest-file',
25
25
  '^.+\\.(jpg)$': 'jest-file',
26
26
  '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-globalsearch",
3
- "version": "0.1.7",
3
+ "version": "1.0.1",
4
4
  "description": "@eeacms/volto-globalsearch: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -16,35 +16,37 @@
16
16
  "type": "git",
17
17
  "url": "git@github.com:eea/volto-globalsearch.git"
18
18
  },
19
+ "addons": [
20
+ "@eeacms/volto-searchlib",
21
+ "@eeacms/volto-listing-block"
22
+ ],
19
23
  "dependencies": {
20
24
  "@eeacms/volto-searchlib": "*",
21
25
  "@eeacms/volto-listing-block": "*"
22
26
  },
23
27
  "devDependencies": {
24
28
  "@plone/scripts": "*",
25
- "@cypress/code-coverage": "^3.9.5",
29
+ "@cypress/code-coverage": "^3.10.0",
26
30
  "babel-plugin-transform-class-properties": "^6.24.1",
27
31
  "md5": "^2.3.0"
28
32
  },
29
- "addons": [
30
- "@eeacms/volto-searchlib",
31
- "@eeacms/volto-listing-block"
32
- ],
33
33
  "scripts": {
34
34
  "release": "release-it",
35
+ "release-major-beta": "release-it major --preRelease=beta",
36
+ "release-beta": "release-it --preRelease=beta",
35
37
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
36
38
  "test": "make test",
37
39
  "test:fix": "make test-update",
38
40
  "pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
39
- "stylelint": "if [ -d ./project ]; then ./project/node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'; else ../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'; fi",
40
- "stylelint:overrides": "if [ -d ./project ]; then ./project/node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'; else ../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'; fi",
41
- "stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
42
- "prettier": "if [ -d ./project ]; then ./project/node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'; else ../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'; fi",
43
- "prettier:fix": "if [ -d ./project ]; then ./project/node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'; else ../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'; fi",
44
- "lint": "if [ -d ./project ]; then ./project/node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'; else ../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'; fi",
45
- "lint:fix": "if [ -d ./project ]; then ./project/node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'; else ../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'; fi",
46
- "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
47
- "cypress:run": "if [ -d ./project ]; then NODE_ENV=development ./project/node_modules/cypress/bin/cypress run; else NODE_ENV=development ../../../node_modules/cypress/bin/cypress run; fi",
48
- "cypress:open": "if [ -d ./project ]; then NODE_ENV=development ./project/node_modules/cypress/bin/cypress open; else NODE_ENV=development ../../../node_modules/cypress/bin/cypress open; fi"
41
+ "stylelint": "make stylelint",
42
+ "stylelint:overrides": "make stylelint-overrides",
43
+ "stylelint:fix": "make stylelint-fix",
44
+ "prettier": "make prettier",
45
+ "prettier:fix": "make prettier-fix",
46
+ "lint": "make lint",
47
+ "lint:fix": "make lint-fix",
48
+ "i18n": "make i18n",
49
+ "cypress:run": "make cypress-run",
50
+ "cypress:open": "make cypress-open"
49
51
  }
50
52
  }
@@ -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 { UniversalItem } from '@eeacms/volto-listing-block';
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.UniversalItem = {
76
- component: UniversalItem,
75
+ config.resolve.UniversalCard = {
76
+ component: UniversalCard,
77
77
  };
78
78
 
79
79
  // config.resolve.WebsiteFilterListComponent = {
package/cypress.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "baseUrl": "http://localhost:3000",
3
- "viewportWidth": 1280,
4
- "defaultCommandTimeout": 8888,
5
- "chromeWebSecurity": false,
6
- "reporter": "junit",
7
- "video": true,
8
- "retries": {
9
- "runMode": 8,
10
- "openMode": 0
11
- },
12
- "reporterOptions": {
13
- "mochaFile": "cypress/reports/cypress-[hash].xml",
14
- "jenkinsMode": true,
15
- "toConsole": true
16
- }
17
- }