@eeacms/volto-cca-policy 0.3.23 → 0.3.24
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/CHANGELOG.md +22 -0
- package/package.json +3 -3
- package/src/customizations/volto/error.jsx +109 -0
- package/src/index.js +53 -2
- /package/locales/{no → nn}/LC_MESSAGES/volto.po +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ 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.3.24](https://github.com/eea/volto-cca-policy/compare/0.3.23...0.3.24) - 11 April 2025
|
|
8
|
+
|
|
9
|
+
#### :rocket: Dependency updates
|
|
10
|
+
|
|
11
|
+
- Release @eeacms/volto-globalsearch@2.0.11 [EEA Jenkins - [`e96979c`](https://github.com/eea/volto-cca-policy/commit/e96979c8b0bd19a67055f0a1c1e9fd8eeec41e69)]
|
|
12
|
+
- Release @eeacms/volto-searchlib@2.0.15 [EEA Jenkins - [`35919dd`](https://github.com/eea/volto-cca-policy/commit/35919dd309a32ab58704d90291db6b812d4a9d1b)]
|
|
13
|
+
|
|
14
|
+
#### :house: Internal changes
|
|
15
|
+
|
|
16
|
+
- style: Automated code fix [eea-jenkins - [`3630c9a`](https://github.com/eea/volto-cca-policy/commit/3630c9ab97418376c1d4a75a546d4eeb3c8d32e8)]
|
|
17
|
+
- style: Automated code fix [eea-jenkins - [`d085ddd`](https://github.com/eea/volto-cca-policy/commit/d085dddcb1ee2967ecfebd1f956082d2f9bfd16f)]
|
|
18
|
+
- style: Automated code fix [eea-jenkins - [`687b4a2`](https://github.com/eea/volto-cca-policy/commit/687b4a20546b72d6c95810f97f24b08cb46b13b4)]
|
|
19
|
+
|
|
20
|
+
#### :hammer_and_wrench: Others
|
|
21
|
+
|
|
22
|
+
- More langs [Tiberiu Ichim - [`0cea414`](https://github.com/eea/volto-cca-policy/commit/0cea4147d6ae72f4f4ca6cb87177745dbdb79259)]
|
|
23
|
+
- More langs [Tiberiu Ichim - [`9010d13`](https://github.com/eea/volto-cca-policy/commit/9010d132d2b9aad96fa6a297ffd25bdf329ce124)]
|
|
24
|
+
- More langs [Tiberiu Ichim - [`d7a9036`](https://github.com/eea/volto-cca-policy/commit/d7a9036d8341204026fd62aadc748cf71324fe21)]
|
|
25
|
+
- Rename norwegian [Tiberiu Ichim - [`15aaf95`](https://github.com/eea/volto-cca-policy/commit/15aaf9515c86131efebffb9a280e4ea913adebb9)]
|
|
26
|
+
- Add norwegian [Tiberiu Ichim - [`1c2410b`](https://github.com/eea/volto-cca-policy/commit/1c2410b7e590b1ba409d698f3ef2a943ba1fabe5)]
|
|
27
|
+
- Enable extra languages [Tiberiu Ichim - [`3210236`](https://github.com/eea/volto-cca-policy/commit/321023608d5ae8294490929e2def26686ea63cd8)]
|
|
28
|
+
- Add error component [Tiberiu Ichim - [`8a9d6dc`](https://github.com/eea/volto-cca-policy/commit/8a9d6dc3d90b67463b0f3356ce887c7a15996e67)]
|
|
7
29
|
### [0.3.23](https://github.com/eea/volto-cca-policy/compare/0.3.22...0.3.23) - 7 April 2025
|
|
8
30
|
|
|
9
31
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-cca-policy",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.24",
|
|
4
4
|
"description": "@eeacms/volto-cca-policy: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@eeacms/volto-eea-design-system": "<=1.36.3",
|
|
33
33
|
"@eeacms/volto-eea-website-theme": "^1.35.0",
|
|
34
34
|
"@eeacms/volto-embed": "^9.1.1",
|
|
35
|
-
"@eeacms/volto-globalsearch": "2.0.
|
|
35
|
+
"@eeacms/volto-globalsearch": "2.0.11",
|
|
36
36
|
"@eeacms/volto-hero-block": "^7.1.0",
|
|
37
37
|
"@eeacms/volto-openlayers-map": "*",
|
|
38
|
-
"@eeacms/volto-searchlib": "2.0.
|
|
38
|
+
"@eeacms/volto-searchlib": "2.0.15",
|
|
39
39
|
"@eeacms/volto-slate-label": "^0.6.0",
|
|
40
40
|
"@eeacms/volto-tabs-block": "^7.5.1",
|
|
41
41
|
"@elastic/search-ui": "1.21.2",
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Page.
|
|
3
|
+
* @module Error
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { useHistory } from 'react-router-dom';
|
|
10
|
+
|
|
11
|
+
const styles = {
|
|
12
|
+
container: {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
height: '100vh',
|
|
18
|
+
textAlign: 'center',
|
|
19
|
+
// backgroundColor: '#f8f9fa',
|
|
20
|
+
color: '#343a40',
|
|
21
|
+
fontFamily: 'Arial, sans-serif',
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
fontSize: '2rem',
|
|
25
|
+
marginBottom: '1rem',
|
|
26
|
+
},
|
|
27
|
+
message: {
|
|
28
|
+
fontSize: '1.2rem',
|
|
29
|
+
marginBottom: '2rem',
|
|
30
|
+
},
|
|
31
|
+
button: {
|
|
32
|
+
padding: '10px 20px',
|
|
33
|
+
fontSize: '1rem',
|
|
34
|
+
color: '#fff',
|
|
35
|
+
backgroundColor: '#004B7F',
|
|
36
|
+
border: 'none',
|
|
37
|
+
borderRadius: '5px',
|
|
38
|
+
cursor: 'pointer',
|
|
39
|
+
marginBottom: '1rem',
|
|
40
|
+
},
|
|
41
|
+
link: {
|
|
42
|
+
color: '#004B7F',
|
|
43
|
+
textDecoration: 'none',
|
|
44
|
+
fontSize: '1rem',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Error page.
|
|
50
|
+
* @function Error
|
|
51
|
+
* @returns {string} Markup of the error page.
|
|
52
|
+
*/
|
|
53
|
+
const Error = ({ message, stackTrace }) => {
|
|
54
|
+
let history = useHistory();
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div
|
|
58
|
+
style={{
|
|
59
|
+
fontFamily: 'Helvetica, sans-serif',
|
|
60
|
+
fontSize: '20px',
|
|
61
|
+
display: 'flex',
|
|
62
|
+
flexDirection: 'column',
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
<div style={styles.container}>
|
|
68
|
+
<h1 style={styles.title}>
|
|
69
|
+
<FormattedMessage
|
|
70
|
+
id="Sorry, something went wrong with your request"
|
|
71
|
+
defaultMessage="Sorry, something went wrong with your request"
|
|
72
|
+
/>
|
|
73
|
+
</h1>
|
|
74
|
+
<p style={styles.message}>We're sorry, but an error has occurred.</p>
|
|
75
|
+
|
|
76
|
+
<button style={styles.button} onClick={() => history.goBack()}>
|
|
77
|
+
<FormattedMessage id="Navigate back" defaultMessage="Navigate back" />
|
|
78
|
+
</button>
|
|
79
|
+
<a style={styles.link} href="/">
|
|
80
|
+
<FormattedMessage
|
|
81
|
+
id="return to the site root"
|
|
82
|
+
defaultMessage="return to the site root"
|
|
83
|
+
/>
|
|
84
|
+
</a>
|
|
85
|
+
<p>
|
|
86
|
+
<FormattedMessage
|
|
87
|
+
id="or try a different page."
|
|
88
|
+
defaultMessage="or try a different page."
|
|
89
|
+
/>
|
|
90
|
+
</p>
|
|
91
|
+
<div style={{ display: 'none' }}>
|
|
92
|
+
<strong style={{ color: 'red' }}>{message}</strong>
|
|
93
|
+
<pre>{stackTrace}</pre>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
Error.propTypes = {
|
|
101
|
+
message: PropTypes.string.isRequired,
|
|
102
|
+
stackTrace: PropTypes.string,
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
Error.defaultProps = {
|
|
106
|
+
stackTrace: null,
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default injectIntl(Error);
|
package/src/index.js
CHANGED
|
@@ -105,18 +105,69 @@ const applyConfig = (config) => {
|
|
|
105
105
|
config.settings.isMultilingual = true;
|
|
106
106
|
config.settings.hasLanguageDropdown = true;
|
|
107
107
|
config.settings.defaultLanguage = 'en';
|
|
108
|
-
config.settings.supportedLanguages = [
|
|
108
|
+
config.settings.supportedLanguages = [
|
|
109
|
+
'en',
|
|
110
|
+
|
|
111
|
+
'bg', // bulgarian
|
|
112
|
+
'es', // spanish
|
|
113
|
+
'cs', // czech
|
|
114
|
+
'da', // danish
|
|
115
|
+
'de', // german
|
|
116
|
+
'et', // estonian
|
|
117
|
+
'el', // greek
|
|
118
|
+
'fr', // french
|
|
119
|
+
'ga', // irish
|
|
120
|
+
'hr', // croatian
|
|
121
|
+
'it', // italian
|
|
122
|
+
'lv', // latvia
|
|
123
|
+
'lt', // lituania
|
|
124
|
+
'hu', // hungarian
|
|
125
|
+
'mt', // malta
|
|
126
|
+
'nl', // dutch
|
|
127
|
+
'pl', // polish
|
|
128
|
+
'pt', // portuguese
|
|
129
|
+
'ro', // romanian
|
|
130
|
+
'sk', // slovakian
|
|
131
|
+
'sl', // slovenian
|
|
132
|
+
'fi', // suomi (finish)
|
|
133
|
+
'sv', // swedish
|
|
134
|
+
|
|
135
|
+
'is', // islenska, for iceland
|
|
136
|
+
'nn', // norwegean (one of 2)
|
|
137
|
+
'tr', // turkish
|
|
138
|
+
];
|
|
109
139
|
|
|
110
140
|
// EEA customizations
|
|
111
141
|
config.settings.eea = {
|
|
112
142
|
...(config.settings.eea || {}),
|
|
113
143
|
languages: [
|
|
114
144
|
{ name: 'English', code: 'en' },
|
|
145
|
+
// { name: 'български', code: 'bg' },
|
|
146
|
+
{ name: 'Español', code: 'es' },
|
|
147
|
+
// { name: 'Čeština', code: 'cs' },
|
|
148
|
+
{ name: 'Dansk', code: 'da' },
|
|
115
149
|
{ name: 'Deutsch', code: 'de' },
|
|
150
|
+
// { name: 'Eesti keel', code: 'et' },
|
|
151
|
+
{ name: 'Ελληνικά', code: 'el' },
|
|
116
152
|
{ name: 'Français', code: 'fr' },
|
|
117
|
-
{ name: '
|
|
153
|
+
// { name: 'Gaeilge', code: 'ga' },
|
|
154
|
+
{ name: 'Hrvatski', code: 'hr' },
|
|
118
155
|
{ name: 'Italiano', code: 'it' },
|
|
156
|
+
// { name: 'Latviešu valoda', code: 'lv' },
|
|
157
|
+
// { name: 'Lietuvių kalba', code: 'lt' },
|
|
158
|
+
// { name: 'Magyar', code: 'hu' },
|
|
159
|
+
// { name: 'Malti', code: 'mt' },
|
|
160
|
+
// { name: 'Nederlands', code: 'nl' },
|
|
119
161
|
{ name: 'Polski', code: 'pl' },
|
|
162
|
+
{ name: 'Português', code: 'pt' },
|
|
163
|
+
// { name: 'Română', code: 'ro' },
|
|
164
|
+
// { name: 'Slovenčina', code: 'sk' },
|
|
165
|
+
// { name: 'Slovenščina', code: 'sl' },
|
|
166
|
+
{ name: 'Suomi', code: 'fi' },
|
|
167
|
+
{ name: 'Svenska', code: 'sv' },
|
|
168
|
+
{ name: 'Íslenska', code: 'is' },
|
|
169
|
+
{ name: 'Nynorsk', code: 'nn' },
|
|
170
|
+
// { name: 'Türkçe', code: 'tr' },
|
|
120
171
|
],
|
|
121
172
|
headerOpts: {
|
|
122
173
|
...(config.settings.eea?.headerOpts || {}),
|
|
File without changes
|