@eeacms/volto-eea-map 2.0.5 → 2.0.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.
@@ -0,0 +1,2 @@
1
+ [ -n "$CI" ] && exit 0
2
+ yarn lint-staged
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ 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
+ ### [2.0.6](https://github.com/eea/volto-eea-map/compare/2.0.5...2.0.6) - 29 September 2023
8
+
9
+ #### :house: Internal changes
10
+
11
+ - style: lint-staged reorder in package.json [Alin Voinea - [`c72036c`](https://github.com/eea/volto-eea-map/commit/c72036c7d0fe1a578280bf117de0ac7d0c3af51d)]
12
+
13
+ #### :house: Documentation changes
14
+
15
+ - docs: Update README and DEVELOP [Alin Voinea - [`bf38088`](https://github.com/eea/volto-eea-map/commit/bf38088f4e5056afbb3a949a03a73354d411e9de)]
16
+ - docs: Update README and DEVELOP [Alin Voinea - [`605f3a7`](https://github.com/eea/volto-eea-map/commit/605f3a7251ea1a9b8d49529da660a13132a04ff9)]
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c6d141`](https://github.com/eea/volto-eea-map/commit/4c6d1413b67ffc3fe27a7d09dcc99ef98867cec9)]
21
+ - test: Fix package.json scripts to use makefile [Alin Voinea - [`1cd6751`](https://github.com/eea/volto-eea-map/commit/1cd675118165d8631c41d35c00a8c902c7edd803)]
22
+ - test: Fix eslint and yarn i18n [Alin Voinea - [`0184641`](https://github.com/eea/volto-eea-map/commit/018464116ba5b86b2c1e0a4ebc9b2fd95b772b66)]
23
+ - i18n: Add en [Alin Voinea - [`1d29304`](https://github.com/eea/volto-eea-map/commit/1d293049a21e138fa933cd5ed9a04cceac1a5cff)]
7
24
  ### [2.0.5](https://github.com/eea/volto-eea-map/compare/2.0.4...2.0.5) - 23 August 2023
8
25
 
9
26
  #### :bug: Bug Fixes
package/DEVELOP.md CHANGED
@@ -1,4 +1,4 @@
1
- # volto-addon-template
1
+ # volto-eea-map
2
2
 
3
3
  ## Develop
4
4
 
@@ -16,12 +16,14 @@
16
16
 
17
17
  1. Go to http://localhost:3000
18
18
 
19
- 1. Happy hacking!
19
+ 1. Initialize git hooks
20
20
 
21
21
  ```Bash
22
- cd src/addons/volto-eea-map/
22
+ yarn prepare
23
23
  ```
24
24
 
25
+ 1. Happy hacking!
26
+
25
27
  ### Or add @eeacms/volto-eea-map to your Volto project
26
28
 
27
29
  Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
@@ -32,15 +34,15 @@ Before starting make sure your development environment is properly set. See [Vol
32
34
 
33
35
  1. Create new volto app
34
36
 
35
- yo @plone/volto my-volto-project --addon @eeacms/volto-addon-template --skip-install
37
+ yo @plone/volto my-volto-project --addon @eeacms/volto-eea-map --skip-install
36
38
  cd my-volto-project
37
39
 
38
40
  1. Add the following to `mrs.developer.json`:
39
41
 
40
42
  {
41
- "volto-addon-template": {
42
- "url": "https://github.com/eea/volto-addon-template.git",
43
- "package": "@eeacms/volto-addon-template",
43
+ "volto-eea-map": {
44
+ "url": "https://github.com/eea/volto-eea-map.git",
45
+ "package": "@eeacms/volto-eea-map",
44
46
  "branch": "develop",
45
47
  "path": "src"
46
48
  }
@@ -48,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol
48
50
 
49
51
  1. Install
50
52
 
51
- yarn develop
53
+ make develop
52
54
  yarn
53
55
 
54
56
  1. Start backend
55
57
 
56
- docker pull plone
57
- docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
58
+ docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend
58
59
 
59
60
  ...wait for backend to setup and start - `Ready to handle requests`:
60
61
 
61
- docker logs -f plone
62
-
63
62
  ...you can also check http://localhost:8080/Plone
64
63
 
65
64
  1. Start frontend
@@ -70,7 +69,7 @@ Before starting make sure your development environment is properly set. See [Vol
70
69
 
71
70
  1. Happy hacking!
72
71
 
73
- cd src/addons/volto-addon-template/
72
+ cd src/addons/volto-eea-map/
74
73
 
75
74
  ## Cypress
76
75
 
package/README.md CHANGED
@@ -14,12 +14,25 @@
14
14
  [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-eea-map-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-develop)
15
15
  [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-eea-map-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map-develop)
16
16
 
17
-
18
17
  [Volto](https://github.com/plone/volto) add-on
19
18
 
20
- ## Features
19
+ # Configuration
20
+
21
+ This addon contains the EEA Embed Map Block & EEA Map Block. It's configured to work with the map visualization content type and give more access to ArcGIS maps. See available maps here https://discomap.eea.europa.eu/
22
+
23
+ # Enable data queries auto-import
24
+
25
+ To enable automatic import of queries from the content-type, "Parameters for data connections" should be checked as behavior on the content-type that uses the map.
26
+
27
+ controlpanel/dexterity-types/{content-type-id}
28
+
29
+ # Enable Sources
30
+
31
+ Sources (Data provenance) should be set on the visualization. To enable this, "EEA Core Metadata" should be checked as behavior on the visualization content-type.
21
32
 
22
- Demo GIF
33
+ controlpanel/dexterity-types/map_visualization
34
+
35
+ After this, sources can be added from the visualization edit interface. "Data Provenance" tab => "Add source"
23
36
 
24
37
  ## Getting started
25
38
 
package/cypress.config.js CHANGED
@@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');
2
2
 
3
3
  module.exports = defineConfig({
4
4
  viewportWidth: 1280,
5
- defaultCommandTimeout: 8888,
5
+ defaultCommandTimeout: 5000,
6
6
  chromeWebSecurity: false,
7
7
  reporter: 'junit',
8
8
  video: true,
9
9
  retries: {
10
- runMode: 8,
10
+ runMode: 1,
11
11
  openMode: 0,
12
12
  },
13
13
  reporterOptions: {
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-map",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "@eeacms/volto-eea-map: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -36,23 +36,49 @@
36
36
  "babel-plugin-transform-class-properties": "^6.24.1",
37
37
  "cypress": "10.3.1",
38
38
  "cypress-fail-fast": "^5.0.1",
39
+ "husky": "*",
40
+ "lint-staged": "*",
39
41
  "md5": "^2.3.0"
40
42
  },
43
+ "lint-staged": {
44
+ "src/**/*.{js,jsx,ts,tsx,json}": [
45
+ "make lint-fix",
46
+ "make prettier-fix"
47
+ ],
48
+ "src/**/*.{jsx}": [
49
+ "make i18n"
50
+ ],
51
+ "theme/**/*.{css,less}": [
52
+ "make stylelint-fix"
53
+ ],
54
+ "src/**/*.{css,less}": [
55
+ "make stylelint-fix"
56
+ ],
57
+ "theme/**/*.overrides": [
58
+ "make stylelint-fix"
59
+ ],
60
+ "src/**/*.overrides": [
61
+ "make stylelint-fix"
62
+ ]
63
+ },
41
64
  "scripts": {
42
65
  "release": "release-it",
66
+ "release-major-beta": "release-it major --preRelease=beta",
67
+ "release-beta": "release-it --preRelease=beta",
43
68
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
44
69
  "test": "make test",
45
70
  "test:fix": "make test-update",
46
71
  "pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
47
- "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",
48
- "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",
49
- "stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
50
- "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",
51
- "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",
52
- "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",
53
- "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",
54
- "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
55
- "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",
56
- "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"
72
+ "stylelint": "make stylelint",
73
+ "stylelint:overrides": "make stylelint-overrides",
74
+ "stylelint:fix": "make stylelint-fix",
75
+ "prettier": "make prettier",
76
+ "prettier:fix": "make prettier-fix",
77
+ "lint": "make lint",
78
+ "lint:fix": "make lint-fix",
79
+ "i18n": "make i18n",
80
+ "cypress:run": "make cypress-run",
81
+ "cypress:open": "make cypress-open",
82
+ "prepare": "husky install"
57
83
  }
58
84
  }
@@ -1,6 +1,6 @@
1
- export Webmap from './Webmap';
2
- export ExtraViews from './ExtraViews';
3
- export LegendView from './LegendView';
1
+ export { default as Webmap } from './Webmap';
2
+ export { default as ExtraViews } from './ExtraViews';
3
+ export { default as LegendView } from './LegendView';
4
4
 
5
- export EmbedMapView from './Blocks/EmbedEEAMap/View';
6
- export EmbedMapEdit from './Blocks/EmbedEEAMap/Edit';
5
+ export { default as EmbedMapView } from './Blocks/EmbedEEAMap/View';
6
+ export { default as EmbedMapEdit } from './Blocks/EmbedEEAMap/Edit';