@eeacms/volto-n2k 0.1.14 → 1.0.0
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 +16 -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/ExploreSites/View.jsx +10 -5
- package/src/components/manage/Blocks/Landing/Edit.jsx +1 -0
- package/src/components/manage/Blocks/Landing/View.jsx +5 -17
- package/src/components/manage/Blocks/NavigationAnchors/View.jsx +1 -1
- package/src/components/theme/AppExtras/MultilingualRedirector/MultilingualRedirector.jsx +3 -3
- package/src/components/theme/Header/Header.jsx +56 -25
- package/src/components/theme/LanguageSelector/LanguageSelector.jsx +61 -13
- package/src/components/theme/Navigation/Navigation.jsx +34 -20
- 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,12 +4,27 @@ 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.0](https://github.com/eea/volto-n2k/compare/0.1.15...1.0.0) - 1 November 2022
|
|
8
|
+
|
|
9
|
+
#### :nail_care: Enhancements
|
|
10
|
+
|
|
11
|
+
- refactor: use latest volto [Miu Razvan - [`92c4e10`](https://github.com/eea/volto-n2k/commit/92c4e1076c75f2d59042c4075804531b3899fc6b)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Update dependencies [Miu Razvan - [`bba4c51`](https://github.com/eea/volto-n2k/commit/bba4c5182605a167e9543be169a18fed4eefd55e)]
|
|
16
|
+
- Update [Miu Razvan - [`8851f91`](https://github.com/eea/volto-n2k/commit/8851f912c4fa42fae62bb43f9f78452ebaa7052d)]
|
|
17
|
+
- Update [Miu Razvan - [`bfa0e45`](https://github.com/eea/volto-n2k/commit/bfa0e457d93ed95c579bbee55de6f536bedb122f)]
|
|
18
|
+
- Use volto-bise develop branch [Miu Razvan - [`5bc318b`](https://github.com/eea/volto-n2k/commit/5bc318b2f96dcb6c7a7c7e9141d29be005031784)]
|
|
19
|
+
- Update [Miu Razvan - [`5f9827a`](https://github.com/eea/volto-n2k/commit/5f9827a7a06a31dbc761eaf7d005b6c24e287d72)]
|
|
20
|
+
- Update [Miu Razvan - [`4aa3901`](https://github.com/eea/volto-n2k/commit/4aa3901867b8d6b11e3356e726fa12a077c5acb2)]
|
|
21
|
+
### [0.1.15](https://github.com/eea/volto-n2k/compare/0.1.14...0.1.15) - 19 October 2022
|
|
22
|
+
|
|
7
23
|
### [0.1.14](https://github.com/eea/volto-n2k/compare/0.1.13...0.1.14) - 18 October 2022
|
|
8
24
|
|
|
9
25
|
#### :hammer_and_wrench: Others
|
|
10
26
|
|
|
11
27
|
- Prettier fix [Miu Razvan - [`0a9192d`](https://github.com/eea/volto-n2k/commit/0a9192dd9d51620f68b4adcc76aa0a58435700ca)]
|
|
12
|
-
- Multilanguage landing page [Miu Razvan - [`a7ceedf`](https://github.com/eea/volto-n2k/commit/a7ceedf0fe304f0a220aa1b6f2737c86537e15da)]
|
|
13
28
|
### [0.1.13](https://github.com/eea/volto-n2k/compare/0.1.12...0.1.13) - 30 September 2022
|
|
14
29
|
|
|
15
30
|
### [0.1.12](https://github.com/eea/volto-n2k/compare/0.1.11...0.1.12) - 30 September 2022
|
|
@@ -86,7 +101,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
86
101
|
- Update [razvanMiu - [`42ab50e`](https://github.com/eea/volto-n2k/commit/42ab50e6681a47251d15ac06b836c6f8c27157fa)]
|
|
87
102
|
- Added bubble chart [razvanMiu - [`89fba5e`](https://github.com/eea/volto-n2k/commit/89fba5e5db41aa955ba2d0ed58c9f0042c461504)]
|
|
88
103
|
- Group species by id_eunis in species list [razvanMiu - [`543c957`](https://github.com/eea/volto-n2k/commit/543c9573b53acd8eecc9afbb6ae7beeddba53966)]
|
|
89
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2ca3e4c`](https://github.com/eea/volto-n2k/commit/2ca3e4c092211f92339791d71db81f5b4ca2d562)]
|
|
90
104
|
- update maps - species and habitats distribution maps [Claudia Ifrim - [`ad12eb1`](https://github.com/eea/volto-n2k/commit/ad12eb141907d6f28444f1eafc3f687735d2a68d)]
|
|
91
105
|
- update format for common name and author [Claudia Ifrim - [`26b7a2f`](https://github.com/eea/volto-n2k/commit/26b7a2f3d20c7701b57fb24f39fc7dfeceec3ce8)]
|
|
92
106
|
- update format for species name (common / scientific) [Claudia Ifrim - [`abdedcf`](https://github.com/eea/volto-n2k/commit/abdedcfe645665031dedf050fd2c5cdde8c14a50)]
|
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.
|
|
3
|
+
"version": "1.0.0",
|
|
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": "github:eea/volto-bise#develop",
|
|
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';
|
|
@@ -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,13 @@ 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: { LAYERS: 'OSMPositronComposite', TILED: true },
|
|
34
|
+
serverType: 'geoserver',
|
|
35
|
+
transition: 0,
|
|
36
|
+
}),
|
|
31
37
|
new source.TileWMS({
|
|
32
38
|
extent: [
|
|
33
39
|
-3603195.606899999,
|
|
@@ -39,10 +45,9 @@ const View = (props) => {
|
|
|
39
45
|
'https://bio.discomap.eea.europa.eu/arcgis/services/ProtectedSites/Natura2000Sites/MapServer/WMSServer',
|
|
40
46
|
params: { LAYERS: '2', TILED: true },
|
|
41
47
|
serverType: 'geoserver',
|
|
42
|
-
// Countries have transparency, so do not fade tiles:
|
|
43
48
|
transition: 0,
|
|
44
49
|
}),
|
|
45
|
-
);
|
|
50
|
+
]);
|
|
46
51
|
/* eslint-disable-next-line */
|
|
47
52
|
}, []);
|
|
48
53
|
|
|
@@ -110,7 +115,7 @@ const View = (props) => {
|
|
|
110
115
|
>
|
|
111
116
|
<Layers>
|
|
112
117
|
<Layer.Tile zIndex={0} />
|
|
113
|
-
<Layer.Tile source={
|
|
118
|
+
<Layer.Tile source={tileWMSSources[1]} zIndex={1} />
|
|
114
119
|
<Layer.Vector
|
|
115
120
|
source={vectorSource}
|
|
116
121
|
title="highlightLayer"
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { connect } from 'react-redux';
|
|
3
3
|
import { Grid } from 'semantic-ui-react';
|
|
4
4
|
import { RenderBlocks, UniversalLink } from '@plone/volto/components';
|
|
5
|
-
import LanguageSelector from '@eeacms/volto-n2k/components/theme/LanguageSelector/LanguageSelector';
|
|
6
5
|
import DefaultView from './DefalutView';
|
|
7
6
|
import hiker from './images/hiker.webp';
|
|
8
7
|
import { tileProps, getStyle } from './index';
|
|
@@ -17,23 +16,11 @@ const View = (props) => {
|
|
|
17
16
|
return useDefault ? (
|
|
18
17
|
<DefaultView {...props} />
|
|
19
18
|
) : (
|
|
20
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
className="landing-page-wrapper default full-width"
|
|
21
|
+
style={getStyle(props)}
|
|
22
|
+
>
|
|
21
23
|
<Grid className="landing-page" container columns="12">
|
|
22
|
-
<Grid.Column
|
|
23
|
-
{...{
|
|
24
|
-
mobile: 12,
|
|
25
|
-
tablet: 12,
|
|
26
|
-
computer: 12,
|
|
27
|
-
largeScreen: 12,
|
|
28
|
-
widescreen: 12,
|
|
29
|
-
}}
|
|
30
|
-
style={{ zIndex: 1, marginBottom: '1rem' }}
|
|
31
|
-
>
|
|
32
|
-
<LanguageSelector
|
|
33
|
-
navigation={props.navigation}
|
|
34
|
-
className="landingpage-variation"
|
|
35
|
-
/>
|
|
36
|
-
</Grid.Column>
|
|
37
24
|
<Grid.Row>
|
|
38
25
|
<Grid.Column
|
|
39
26
|
className="landing-page-description"
|
|
@@ -81,4 +68,5 @@ const View = (props) => {
|
|
|
81
68
|
|
|
82
69
|
export default connect((state) => ({
|
|
83
70
|
navigation: state.navigation,
|
|
71
|
+
screen: state.screen,
|
|
84
72
|
}))(View);
|
|
@@ -6,7 +6,7 @@ import qs from 'querystring';
|
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { UniversalLink } from '@plone/volto/components';
|
|
8
8
|
import { withHashLink } from 'volto-slate/hooks';
|
|
9
|
-
import { StickyContext } from '
|
|
9
|
+
import { StickyContext } from '@eeacms/volto-bise/components';
|
|
10
10
|
import './styles.less';
|
|
11
11
|
|
|
12
12
|
const formatLink = (str, obj) => {
|
|
@@ -9,12 +9,12 @@ const MultilingualRedirector = (props) => {
|
|
|
9
9
|
const { settings } = config;
|
|
10
10
|
const { pathname, children } = props;
|
|
11
11
|
const currentLanguage =
|
|
12
|
-
cookie.load('N2K_LANGUAGE') || settings.defaultLanguage;
|
|
13
|
-
const redirectToLanguage = settings.supportedLanguages.includes(
|
|
12
|
+
cookie.load('N2K_LANGUAGE') || settings.n2k.defaultLanguage;
|
|
13
|
+
const redirectToLanguage = settings.n2k.supportedLanguages.includes(
|
|
14
14
|
currentLanguage,
|
|
15
15
|
)
|
|
16
16
|
? currentLanguage
|
|
17
|
-
: settings.defaultLanguage;
|
|
17
|
+
: settings.n2k.defaultLanguage;
|
|
18
18
|
const dispatch = useDispatch();
|
|
19
19
|
|
|
20
20
|
React.useEffect(() => {
|