@eeacms/volto-n2k 0.1.15 → 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.
- package/.coverage.babel.config.js +1 -1
- package/.i18n.babel.config.js +1 -0
- package/.project.eslintrc.js +46 -0
- package/CHANGELOG.md +20 -2
- package/README.md +1 -72
- package/RELEASE.md +74 -0
- package/babel.config.js +17 -0
- package/cypress.config.js +26 -0
- package/jest-addon.config.js +4 -4
- package/locales/volto.pot +69 -0
- package/package.json +21 -14
- package/src/components/index.js +3 -3
- package/src/components/manage/Blocks/CddaShape/View.jsx +14 -1
- package/src/components/manage/Blocks/ExploreHabitats/View.jsx +17 -5
- package/src/components/manage/Blocks/ExploreSites/View.jsx +15 -6
- package/src/components/manage/Blocks/ExploreSpecies/View.jsx +15 -5
- package/src/components/manage/Blocks/HabitatDistribution/View.jsx +14 -1
- package/src/components/manage/Blocks/HabitatProtectedSites/View.jsx +14 -1
- package/src/components/manage/Blocks/Landing/DefalutView.jsx +0 -16
- package/src/components/manage/Blocks/Landing/Edit.jsx +0 -16
- package/src/components/manage/Blocks/Landing/View.jsx +0 -16
- package/src/components/manage/Blocks/NavigationAnchors/View.jsx +1 -1
- package/src/components/manage/Blocks/SiteShape/View.jsx +14 -1
- package/src/components/manage/Blocks/SpeciesDistribution/View.jsx +14 -1
- package/src/components/manage/Blocks/SpeciesProtectedSites/View.jsx +14 -1
- package/src/components/theme/AppExtras/MultilingualRedirector/MultilingualRedirector.jsx +3 -3
- package/src/components/theme/Header/Header.jsx +58 -25
- package/src/components/theme/LanguageSelector/LanguageSelector.jsx +22 -14
- package/src/components/theme/Navigation/Navigation.jsx +37 -22
- package/src/components/theme/Sitemap/Sitemap.jsx +2 -2
- package/src/index.js +31 -29
- package/src/less/styles.less +10 -12
- package/src/static/global-line.svg +1 -0
- package/Jenkinsfile +0 -242
- package/cypress/fixtures/example.json +0 -5
- package/cypress/integration/block-basics.js +0 -32
- package/cypress/plugins/index.js +0 -26
- package/cypress/support/commands.js +0 -315
- package/cypress/support/index.js +0 -53
- package/cypress.json +0 -17
|
@@ -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('
|
|
5
|
+
voltoBabel.plugins.push('istanbul');
|
|
6
6
|
return voltoBabel;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@plone/volto/babel');
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const projectRootPath = fs.realpathSync('./project'); // __dirname
|
|
5
|
+
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
6
|
+
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
|
|
7
|
+
|
|
8
|
+
const pathsConfig = jsConfig.paths;
|
|
9
|
+
|
|
10
|
+
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
11
|
+
|
|
12
|
+
Object.keys(pathsConfig).forEach(pkg => {
|
|
13
|
+
if (pkg === '@plone/volto') {
|
|
14
|
+
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
18
|
+
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
19
|
+
|
|
20
|
+
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
21
|
+
const addonAliases = Object.keys(reg.packages).map(o => [
|
|
22
|
+
o,
|
|
23
|
+
reg.packages[o].modulePath,
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
29
|
+
settings: {
|
|
30
|
+
'import/resolver': {
|
|
31
|
+
alias: {
|
|
32
|
+
map: [
|
|
33
|
+
['@plone/volto', '@plone/volto/src'],
|
|
34
|
+
...addonAliases,
|
|
35
|
+
['@package', `${__dirname}/src`],
|
|
36
|
+
['~', `${__dirname}/src`],
|
|
37
|
+
],
|
|
38
|
+
extensions: ['.js', '.jsx', '.json'],
|
|
39
|
+
},
|
|
40
|
+
'babel-plugin-root-import': {
|
|
41
|
+
rootPathSuffix: 'src',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,29 @@ 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
|
|
7
|
+
### [1.0.1](https://github.com/eea/volto-n2k/compare/1.0.0...1.0.1) - 2 November 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Update [Miu Razvan - [`923d3f5`](https://github.com/eea/volto-n2k/commit/923d3f5213dfa930ba7aa6fcd85fd75b7ed709a4)]
|
|
12
|
+
- Fix language selector [Miu Razvan - [`a47cffa`](https://github.com/eea/volto-n2k/commit/a47cffa07bb74b5337e36611dc0c8f037c887430)]
|
|
13
|
+
- Use eea basemap [Miu Razvan - [`1531a7c`](https://github.com/eea/volto-n2k/commit/1531a7ca624bb7c1ad584983b19ecc86fa182340)]
|
|
14
|
+
- bugfix for maps - macos [Claudia Ifrim - [`881d066`](https://github.com/eea/volto-n2k/commit/881d06614e517d1d31da712ae3b7562e375f8664)]
|
|
15
|
+
- change basemap for explore species [Claudia Ifrim - [`cd0f217`](https://github.com/eea/volto-n2k/commit/cd0f217f89743892f2a682f0210a29b6daf93698)]
|
|
16
|
+
- change basemap for explore habitats [Claudia Ifrim - [`43535a8`](https://github.com/eea/volto-n2k/commit/43535a82952c460bb712bdc6c995bf24c404b023)]
|
|
17
|
+
- change basemap for explore sites [Claudia Ifrim - [`dd854c7`](https://github.com/eea/volto-n2k/commit/dd854c75b17854a067ffa863863d0b984db99b1b)]
|
|
18
|
+
## [1.0.0](https://github.com/eea/volto-n2k/compare/0.1.15...1.0.0) - 1 November 2022
|
|
8
19
|
|
|
9
20
|
#### :hammer_and_wrench: Others
|
|
10
21
|
|
|
11
|
-
- Update [Miu Razvan - [`
|
|
22
|
+
- Update dependencies [Miu Razvan - [`bba4c51`](https://github.com/eea/volto-n2k/commit/bba4c5182605a167e9543be169a18fed4eefd55e)]
|
|
23
|
+
- Update [Miu Razvan - [`8851f91`](https://github.com/eea/volto-n2k/commit/8851f912c4fa42fae62bb43f9f78452ebaa7052d)]
|
|
24
|
+
- Update [Miu Razvan - [`bfa0e45`](https://github.com/eea/volto-n2k/commit/bfa0e457d93ed95c579bbee55de6f536bedb122f)]
|
|
25
|
+
- Use volto-bise develop branch [Miu Razvan - [`5bc318b`](https://github.com/eea/volto-n2k/commit/5bc318b2f96dcb6c7a7c7e9141d29be005031784)]
|
|
26
|
+
- Update [Miu Razvan - [`5f9827a`](https://github.com/eea/volto-n2k/commit/5f9827a7a06a31dbc761eaf7d005b6c24e287d72)]
|
|
27
|
+
- Update [Miu Razvan - [`4aa3901`](https://github.com/eea/volto-n2k/commit/4aa3901867b8d6b11e3356e726fa12a077c5acb2)]
|
|
28
|
+
### [0.1.15](https://github.com/eea/volto-n2k/compare/0.1.14...0.1.15) - 19 October 2022
|
|
29
|
+
|
|
12
30
|
### [0.1.14](https://github.com/eea/volto-n2k/compare/0.1.13...0.1.14) - 18 October 2022
|
|
13
31
|
|
|
14
32
|
#### :hammer_and_wrench: Others
|
package/README.md
CHANGED
|
@@ -59,78 +59,7 @@ Demo GIF
|
|
|
59
59
|
|
|
60
60
|
## Release
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
* The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
|
|
65
|
-
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
|
|
66
|
-
* The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
|
|
67
|
-
* Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
|
|
68
|
-
* As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
|
|
69
|
-
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
|
|
70
|
-
* You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
|
|
71
|
-
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
|
|
72
|
-
|
|
73
|
-
### Manual release from the develop branch ( beta release )
|
|
74
|
-
|
|
75
|
-
#### Installation and configuration of release-it
|
|
76
|
-
|
|
77
|
-
You need to first install the [release-it](https://github.com/release-it/release-it) client.
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
npm install -g release-it
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
|
84
|
-
|
|
85
|
-
Release-it is a tool that automates 4 important steps in the release process:
|
|
86
|
-
|
|
87
|
-
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
|
88
|
-
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
|
|
89
|
-
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
|
90
|
-
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
|
91
|
-
|
|
92
|
-
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
#### Using release-it tool
|
|
105
|
-
|
|
106
|
-
There are 3 yarn scripts that can be run to do the release
|
|
107
|
-
|
|
108
|
-
##### yarn release-beta
|
|
109
|
-
|
|
110
|
-
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
? Select increment (next version):
|
|
114
|
-
❯ prepatch (0.1.1-beta.0)
|
|
115
|
-
preminor (0.2.0-beta.0)
|
|
116
|
-
premajor (1.0.0-beta.0)
|
|
117
|
-
Other, please specify...
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
##### yarn release-major-beta
|
|
121
|
-
|
|
122
|
-
Same as `yarn release-beta`, but with premajor version pre-selected.
|
|
123
|
-
|
|
124
|
-
##### yarn release
|
|
125
|
-
|
|
126
|
-
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
|
127
|
-
|
|
128
|
-
#### Important notes
|
|
129
|
-
|
|
130
|
-
> Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
|
|
131
|
-
|
|
132
|
-
> Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
|
|
133
|
-
|
|
62
|
+
See [RELEASE.md](https://github.com/eea/volto-n2k/blob/master/RELEASE.md).
|
|
134
63
|
|
|
135
64
|
## How to contribute
|
|
136
65
|
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
## Release
|
|
2
|
+
|
|
3
|
+
### Automatic release using Jenkins
|
|
4
|
+
|
|
5
|
+
* The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
|
|
6
|
+
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
|
|
7
|
+
* The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
|
|
8
|
+
* Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
|
|
9
|
+
* As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
|
|
10
|
+
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
|
|
11
|
+
* You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
|
|
12
|
+
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
|
|
13
|
+
|
|
14
|
+
### Manual release from the develop branch ( beta release )
|
|
15
|
+
|
|
16
|
+
#### Installation and configuration of release-it
|
|
17
|
+
|
|
18
|
+
You need to first install the [release-it](https://github.com/release-it/release-it) client.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npm install -g release-it
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
|
25
|
+
|
|
26
|
+
Release-it is a tool that automates 4 important steps in the release process:
|
|
27
|
+
|
|
28
|
+
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
|
29
|
+
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
|
|
30
|
+
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
|
31
|
+
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
|
32
|
+
|
|
33
|
+
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using release-it tool
|
|
46
|
+
|
|
47
|
+
There are 3 yarn scripts that can be run to do the release
|
|
48
|
+
|
|
49
|
+
##### yarn release-beta
|
|
50
|
+
|
|
51
|
+
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
? Select increment (next version):
|
|
55
|
+
❯ prepatch (0.1.1-beta.0)
|
|
56
|
+
preminor (0.2.0-beta.0)
|
|
57
|
+
premajor (1.0.0-beta.0)
|
|
58
|
+
Other, please specify...
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
##### yarn release-major-beta
|
|
62
|
+
|
|
63
|
+
Same as `yarn release-beta`, but with premajor version pre-selected.
|
|
64
|
+
|
|
65
|
+
##### yarn release
|
|
66
|
+
|
|
67
|
+
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
|
68
|
+
|
|
69
|
+
#### Important notes
|
|
70
|
+
|
|
71
|
+
> Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
|
|
72
|
+
|
|
73
|
+
> Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
|
|
74
|
+
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = function (api) {
|
|
2
|
+
api.cache(true);
|
|
3
|
+
const presets = ['razzle'];
|
|
4
|
+
const plugins = [
|
|
5
|
+
[
|
|
6
|
+
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
|
|
7
|
+
{
|
|
8
|
+
messagesDir: './build/messages/',
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
plugins,
|
|
15
|
+
presets,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -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
|
+
});
|
package/jest-addon.config.js
CHANGED
|
@@ -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
|
|
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',
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: Plone\n"
|
|
4
|
+
"POT-Creation-Date: 2022-11-01T00:27:35.893Z\n"
|
|
5
|
+
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
|
+
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
+
"MIME-Version: 1.0\n"
|
|
8
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
10
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
11
|
+
"Language-Code: en\n"
|
|
12
|
+
"Language-Name: English\n"
|
|
13
|
+
"Preferred-Encodings: utf-8\n"
|
|
14
|
+
"Domain: volto\n"
|
|
15
|
+
|
|
16
|
+
#: components/theme/Navigation/Navigation
|
|
17
|
+
# defaultMessage: Close menu
|
|
18
|
+
msgid "Close menu"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#: components/manage/Blocks/SlateSVG/index
|
|
22
|
+
# defaultMessage: Edit slate svg
|
|
23
|
+
msgid "Edit slate svg"
|
|
24
|
+
msgstr ""
|
|
25
|
+
|
|
26
|
+
#: components/theme/Navigation/Navigation
|
|
27
|
+
# defaultMessage: Open menu
|
|
28
|
+
msgid "Open menu"
|
|
29
|
+
msgstr ""
|
|
30
|
+
|
|
31
|
+
#: components/manage/Blocks/SlateSVG/index
|
|
32
|
+
# defaultMessage: Remove slate svg
|
|
33
|
+
msgid "Remove slate svg"
|
|
34
|
+
msgstr ""
|
|
35
|
+
|
|
36
|
+
#: components/theme/Sitemap/Sitemap
|
|
37
|
+
# defaultMessage: Sitemap
|
|
38
|
+
msgid "Sitemap"
|
|
39
|
+
msgstr ""
|
|
40
|
+
|
|
41
|
+
#: components/manage/Blocks/Landing/EditBlockWrapper
|
|
42
|
+
# defaultMessage: Unknown Block {block}
|
|
43
|
+
msgid "Unknown Block"
|
|
44
|
+
msgstr ""
|
|
45
|
+
|
|
46
|
+
#: components/theme/Footer/Footer
|
|
47
|
+
# defaultMessage: Copyright notice
|
|
48
|
+
msgid "copyright_notice"
|
|
49
|
+
msgstr ""
|
|
50
|
+
|
|
51
|
+
#: components/manage/Blocks/Landing/EditBlockWrapper
|
|
52
|
+
# defaultMessage: delete
|
|
53
|
+
msgid "delete"
|
|
54
|
+
msgstr ""
|
|
55
|
+
|
|
56
|
+
#: components/theme/Footer/Footer
|
|
57
|
+
# defaultMessage: Home
|
|
58
|
+
msgid "home"
|
|
59
|
+
msgstr ""
|
|
60
|
+
|
|
61
|
+
#: components/theme/Footer/Footer
|
|
62
|
+
# defaultMessage: Privacy and legal notice
|
|
63
|
+
msgid "legal_notice"
|
|
64
|
+
msgstr ""
|
|
65
|
+
|
|
66
|
+
#: components/theme/Footer/Footer
|
|
67
|
+
# defaultMessage: Sitemap
|
|
68
|
+
msgid "sitemap"
|
|
69
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-n2k",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "volto-n2k: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"@eeacms/volto-datablocks",
|
|
18
18
|
"@eeacms/volto-openlayers-map",
|
|
19
19
|
"@eeacms/volto-resize-helper",
|
|
20
|
-
"@eeacms/volto-tabs-block"
|
|
20
|
+
"@eeacms/volto-tabs-block",
|
|
21
|
+
"@eeacms/volto-bise"
|
|
21
22
|
],
|
|
22
23
|
"repository": {
|
|
23
24
|
"type": "git",
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"@eeacms/volto-resize-helper": "*",
|
|
29
30
|
"@eeacms/volto-openlayers-map": "*",
|
|
30
31
|
"@eeacms/volto-tabs-block": "*",
|
|
32
|
+
"@eeacms/volto-bise": "*",
|
|
31
33
|
"volto-slate": "*",
|
|
32
34
|
"d3": "^7.6.1",
|
|
33
35
|
"d3-shape": "^3.1.0",
|
|
@@ -38,23 +40,28 @@
|
|
|
38
40
|
"slick-carousel": "1.8.1"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
43
|
+
"@plone/scripts": "*",
|
|
44
|
+
"@cypress/code-coverage": "^3.10.0",
|
|
45
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
46
|
+
"md5": "^2.3.0"
|
|
44
47
|
},
|
|
45
48
|
"scripts": {
|
|
46
49
|
"release": "release-it",
|
|
47
50
|
"release-major-beta": "release-it major --preRelease=beta",
|
|
48
51
|
"release-beta": "release-it --preRelease=beta",
|
|
49
52
|
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
53
|
+
"test": "make test",
|
|
54
|
+
"test:fix": "make test-update",
|
|
55
|
+
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
|
|
56
|
+
"stylelint": "make stylelint",
|
|
57
|
+
"stylelint:overrides": "make stylelint-overrides",
|
|
58
|
+
"stylelint:fix": "make stylelint-fix",
|
|
59
|
+
"prettier": "make prettier",
|
|
60
|
+
"prettier:fix": "make prettier-fix",
|
|
61
|
+
"lint": "make lint",
|
|
62
|
+
"lint:fix": "make lint-fix",
|
|
63
|
+
"i18n": "make i18n",
|
|
64
|
+
"cypress:run": "make cypress-run",
|
|
65
|
+
"cypress:open": "make cypress-open"
|
|
59
66
|
}
|
|
60
67
|
}
|
package/src/components/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export Header from '@eeacms/volto-n2k/components/theme/Header/Header';
|
|
2
|
-
export Footer from '@eeacms/volto-n2k/components/theme/Footer/Footer';
|
|
3
|
-
export Sitemap from '@eeacms/volto-n2k/components/theme/Sitemap/Sitemap';
|
|
1
|
+
export { default as Header } from '@eeacms/volto-n2k/components/theme/Header/Header';
|
|
2
|
+
export { default as Footer } from '@eeacms/volto-n2k/components/theme/Footer/Footer';
|
|
3
|
+
export { default as Sitemap } from '@eeacms/volto-n2k/components/theme/Sitemap/Sitemap';
|
|
@@ -11,6 +11,7 @@ import './style.less';
|
|
|
11
11
|
const View = (props) => {
|
|
12
12
|
const [options, setOptions] = React.useState({});
|
|
13
13
|
const [vectorSource, setVectorSource] = useState(null);
|
|
14
|
+
const [tileWMSSources, setTileWMSSources] = useState([]);
|
|
14
15
|
const { extent, format, proj, style, source } = openlayers;
|
|
15
16
|
const provider_data = props.provider_data || {};
|
|
16
17
|
const { site_code = [] } = provider_data;
|
|
@@ -18,6 +19,17 @@ const View = (props) => {
|
|
|
18
19
|
useEffect(() => {
|
|
19
20
|
if (__SERVER__) return;
|
|
20
21
|
setVectorSource(new source.Vector());
|
|
22
|
+
setTileWMSSources([
|
|
23
|
+
new source.TileWMS({
|
|
24
|
+
url: 'https://gisco-services.ec.europa.eu/maps/service',
|
|
25
|
+
params: {
|
|
26
|
+
LAYERS: 'OSMPositronComposite',
|
|
27
|
+
TILED: true,
|
|
28
|
+
},
|
|
29
|
+
serverType: 'geoserver',
|
|
30
|
+
transition: 0,
|
|
31
|
+
}),
|
|
32
|
+
]);
|
|
21
33
|
/* eslint-disable-next-line */
|
|
22
34
|
}, []);
|
|
23
35
|
|
|
@@ -57,10 +69,11 @@ const View = (props) => {
|
|
|
57
69
|
minZoom: 10,
|
|
58
70
|
zoom: 10,
|
|
59
71
|
}}
|
|
72
|
+
pixelRatio={1}
|
|
60
73
|
{...options}
|
|
61
74
|
>
|
|
62
75
|
<Layers>
|
|
63
|
-
<Layer.Tile zIndex={0} />
|
|
76
|
+
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
64
77
|
<Layer.Vector
|
|
65
78
|
source={vectorSource}
|
|
66
79
|
style={
|
|
@@ -12,7 +12,7 @@ import './style.less';
|
|
|
12
12
|
const View = (props) => {
|
|
13
13
|
const [options, setOptions] = React.useState({});
|
|
14
14
|
const [vectorSource, setVectorSource] = useState(null);
|
|
15
|
-
const [
|
|
15
|
+
const [tileWMSSources, setTileWMSSources] = useState([]);
|
|
16
16
|
const { extent, format, proj, style, source } = openlayers;
|
|
17
17
|
|
|
18
18
|
const { results = [], payload = {} } = props.search || {};
|
|
@@ -27,7 +27,18 @@ const View = (props) => {
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
if (__SERVER__) return;
|
|
29
29
|
setVectorSource(new source.Vector());
|
|
30
|
-
|
|
30
|
+
setTileWMSSources([
|
|
31
|
+
new source.TileWMS({
|
|
32
|
+
url: 'https://gisco-services.ec.europa.eu/maps/service',
|
|
33
|
+
params: {
|
|
34
|
+
LAYERS: 'OSMPositronComposite',
|
|
35
|
+
TILED: true,
|
|
36
|
+
with: 256,
|
|
37
|
+
height: 256,
|
|
38
|
+
},
|
|
39
|
+
serverType: 'geoserver',
|
|
40
|
+
transition: 0,
|
|
41
|
+
}),
|
|
31
42
|
new source.TileWMS({
|
|
32
43
|
extent: [
|
|
33
44
|
-3959514.742799999,
|
|
@@ -42,7 +53,7 @@ const View = (props) => {
|
|
|
42
53
|
// Countries have transparency, so do not fade tiles:
|
|
43
54
|
transition: 0,
|
|
44
55
|
}),
|
|
45
|
-
);
|
|
56
|
+
]);
|
|
46
57
|
/* eslint-disable-next-line */
|
|
47
58
|
}, []);
|
|
48
59
|
|
|
@@ -108,11 +119,12 @@ const View = (props) => {
|
|
|
108
119
|
showFullExtent: true,
|
|
109
120
|
zoom: 5,
|
|
110
121
|
}}
|
|
122
|
+
pixelRatio={1}
|
|
111
123
|
{...options}
|
|
112
124
|
>
|
|
113
125
|
<Layers>
|
|
114
|
-
<Layer.Tile zIndex={0} />
|
|
115
|
-
<Layer.Tile source={
|
|
126
|
+
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
127
|
+
<Layer.Tile source={tileWMSSources[1]} zIndex={1} />
|
|
116
128
|
<Layer.Vector
|
|
117
129
|
source={vectorSource}
|
|
118
130
|
title="highlightLayer"
|
|
@@ -12,7 +12,7 @@ import './style.less';
|
|
|
12
12
|
const View = (props) => {
|
|
13
13
|
const [options, setOptions] = React.useState({});
|
|
14
14
|
const [vectorSource, setVectorSource] = useState(null);
|
|
15
|
-
const [
|
|
15
|
+
const [tileWMSSources, setTileWMSSources] = useState([]);
|
|
16
16
|
const { extent, format, proj, style, source } = openlayers;
|
|
17
17
|
|
|
18
18
|
const { results = [], payload = {} } = props.search || {};
|
|
@@ -27,7 +27,16 @@ const View = (props) => {
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
if (__SERVER__) return;
|
|
29
29
|
setVectorSource(new source.Vector());
|
|
30
|
-
|
|
30
|
+
setTileWMSSources([
|
|
31
|
+
new source.TileWMS({
|
|
32
|
+
url: 'https://gisco-services.ec.europa.eu/maps/service',
|
|
33
|
+
params: {
|
|
34
|
+
LAYERS: 'OSMPositronComposite',
|
|
35
|
+
TILED: true,
|
|
36
|
+
},
|
|
37
|
+
serverType: 'geoserver',
|
|
38
|
+
transition: 0,
|
|
39
|
+
}),
|
|
31
40
|
new source.TileWMS({
|
|
32
41
|
extent: [
|
|
33
42
|
-3603195.606899999,
|
|
@@ -39,10 +48,9 @@ const View = (props) => {
|
|
|
39
48
|
'https://bio.discomap.eea.europa.eu/arcgis/services/ProtectedSites/Natura2000Sites/MapServer/WMSServer',
|
|
40
49
|
params: { LAYERS: '2', TILED: true },
|
|
41
50
|
serverType: 'geoserver',
|
|
42
|
-
// Countries have transparency, so do not fade tiles:
|
|
43
51
|
transition: 0,
|
|
44
52
|
}),
|
|
45
|
-
);
|
|
53
|
+
]);
|
|
46
54
|
/* eslint-disable-next-line */
|
|
47
55
|
}, []);
|
|
48
56
|
|
|
@@ -106,11 +114,12 @@ const View = (props) => {
|
|
|
106
114
|
showFullExtent: true,
|
|
107
115
|
zoom: 5,
|
|
108
116
|
}}
|
|
117
|
+
pixelRatio={1}
|
|
109
118
|
{...options}
|
|
110
119
|
>
|
|
111
120
|
<Layers>
|
|
112
|
-
<Layer.Tile zIndex={0} />
|
|
113
|
-
<Layer.Tile source={
|
|
121
|
+
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
122
|
+
<Layer.Tile source={tileWMSSources[1]} zIndex={1} />
|
|
114
123
|
<Layer.Vector
|
|
115
124
|
source={vectorSource}
|
|
116
125
|
title="highlightLayer"
|
|
@@ -12,7 +12,7 @@ import './style.less';
|
|
|
12
12
|
const View = (props) => {
|
|
13
13
|
const [options, setOptions] = React.useState({});
|
|
14
14
|
const [vectorSource, setVectorSource] = useState(null);
|
|
15
|
-
const [
|
|
15
|
+
const [tileWMSSources, setTileWMSSources] = useState([]);
|
|
16
16
|
const { extent, format, proj, style, source } = openlayers;
|
|
17
17
|
|
|
18
18
|
const { results = [], payload = {} } = props.search || {};
|
|
@@ -27,7 +27,16 @@ const View = (props) => {
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
if (__SERVER__) return;
|
|
29
29
|
setVectorSource(new source.Vector());
|
|
30
|
-
|
|
30
|
+
setTileWMSSources([
|
|
31
|
+
new source.TileWMS({
|
|
32
|
+
url: 'https://gisco-services.ec.europa.eu/maps/service',
|
|
33
|
+
params: {
|
|
34
|
+
LAYERS: 'OSMPositronComposite',
|
|
35
|
+
TILED: true,
|
|
36
|
+
},
|
|
37
|
+
serverType: 'geoserver',
|
|
38
|
+
transition: 0,
|
|
39
|
+
}),
|
|
31
40
|
new source.TileWMS({
|
|
32
41
|
extent: [
|
|
33
42
|
-3690067.3068000004,
|
|
@@ -42,7 +51,7 @@ const View = (props) => {
|
|
|
42
51
|
// Countries have transparency, so do not fade tiles:
|
|
43
52
|
transition: 0,
|
|
44
53
|
}),
|
|
45
|
-
);
|
|
54
|
+
]);
|
|
46
55
|
/* eslint-disable-next-line */
|
|
47
56
|
}, []);
|
|
48
57
|
|
|
@@ -108,11 +117,12 @@ const View = (props) => {
|
|
|
108
117
|
showFullExtent: true,
|
|
109
118
|
zoom: 5,
|
|
110
119
|
}}
|
|
120
|
+
pixelRatio={1}
|
|
111
121
|
{...options}
|
|
112
122
|
>
|
|
113
123
|
<Layers>
|
|
114
|
-
<Layer.Tile zIndex={0} />
|
|
115
|
-
<Layer.Tile source={
|
|
124
|
+
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
125
|
+
<Layer.Tile source={tileWMSSources[1]} zIndex={1} />
|
|
116
126
|
<Layer.Vector
|
|
117
127
|
source={vectorSource}
|
|
118
128
|
title="highlightLayer"
|