@eeacms/volto-eea-website-policy 2.7.0 → 3.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/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ 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
+ ### [3.0.0](https://github.com/eea/volto-eea-website-policy/compare/2.8.0...3.0.0) - 23 December 2025
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: Release 3.0.0 - enable language menu and drop Plone 4 redirects [Alin Voinea - [`66e232a`](https://github.com/eea/volto-eea-website-policy/commit/66e232a1665f5989051ce7251fbe613fb5a5992c)]
12
+ - feat: Enable language dropdown, remove Plone 4 external routes, use english mega menu for all languages - refs #294286 [Alin Voinea - [`3459fef`](https://github.com/eea/volto-eea-website-policy/commit/3459fefabf78866c8c7a49b3940c969c8bd2938b)]
13
+
14
+ #### :hammer_and_wrench: Others
15
+
16
+ ### [2.8.0](https://github.com/eea/volto-eea-website-policy/compare/2.7.0...2.8.0) - 4 December 2025
17
+
18
+ #### :rocket: New Features
19
+
20
+ - feat: Custom ErrorView - refs #291209 [Nilesh - [`842a21b`](https://github.com/eea/volto-eea-website-policy/commit/842a21b2ae439c61ef30c12a6636feb09a8ddd2e)]
21
+
7
22
  ### [2.7.0](https://github.com/eea/volto-eea-website-policy/compare/2.6.0...2.7.0) - 3 December 2025
8
23
 
9
24
  #### :rocket: New Features
@@ -12,7 +27,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
12
27
 
13
28
  #### :hammer_and_wrench: Others
14
29
 
15
- - Release 2.7.0 [Alin Voinea - [`351d759`](https://github.com/eea/volto-eea-website-policy/commit/351d75995c0327e4f8e59e447d4ec6ceaf15de7b)]
16
30
  ### [2.6.0](https://github.com/eea/volto-eea-website-policy/compare/2.5.1...2.6.0) - 6 August 2025
17
31
 
18
32
  #### :nail_care: Enhancements
@@ -11,4 +11,12 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #. Default: "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
15
+ #: components/ErrorView/ErrorView
16
+ msgid "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
17
+ msgstr ""
14
18
 
19
+ #. Default: "Our apologies, our website is not available at the moment."
20
+ #: components/ErrorView/ErrorView
21
+ msgid "Our apologies, our website is not available at the moment."
22
+ msgstr ""
@@ -11,4 +11,12 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #. Default: "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
15
+ #: components/ErrorView/ErrorView
16
+ msgid "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
17
+ msgstr ""
14
18
 
19
+ #. Default: "Our apologies, our website is not available at the moment."
20
+ #: components/ErrorView/ErrorView
21
+ msgid "Our apologies, our website is not available at the moment."
22
+ msgstr ""
@@ -11,4 +11,12 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #. Default: "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
15
+ #: components/ErrorView/ErrorView
16
+ msgid "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
17
+ msgstr ""
14
18
 
19
+ #. Default: "Our apologies, our website is not available at the moment."
20
+ #: components/ErrorView/ErrorView
21
+ msgid "Our apologies, our website is not available at the moment."
22
+ msgstr ""
@@ -11,4 +11,12 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #. Default: "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
15
+ #: components/ErrorView/ErrorView
16
+ msgid "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
17
+ msgstr ""
14
18
 
19
+ #. Default: "Our apologies, our website is not available at the moment."
20
+ #: components/ErrorView/ErrorView
21
+ msgid "Our apologies, our website is not available at the moment."
22
+ msgstr ""
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2024-09-02T18:05:47.779Z\n"
4
+ "POT-Creation-Date: 2025-12-04T19:37:35.684Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -13,9 +13,12 @@ msgstr ""
13
13
  "Preferred-Encodings: utf-8\n"
14
14
  "Domain: volto\n"
15
15
 
16
- #. Default: "Navigation"
17
- #: components/Blocks/ContextNavigation/variations/Accordion
18
- #: components/Blocks/ContextNavigation/variations/AccordionClaude
19
- #: components/Blocks/ContextNavigation/variations/AccordionOriginal
20
- msgid "Navigation"
16
+ #. Default: "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
17
+ #: components/ErrorView/ErrorView
18
+ msgid "If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
19
+ msgstr ""
20
+
21
+ #. Default: "Our apologies, our website is not available at the moment."
22
+ #: components/ErrorView/ErrorView
23
+ msgid "Our apologies, our website is not available at the moment."
21
24
  msgstr ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "2.7.0",
3
+ "version": "3.0.0",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,191 @@
1
+ import { FormattedMessage } from 'react-intl';
2
+ import { Container } from 'semantic-ui-react';
3
+
4
+ /**
5
+ * @function ErrorView
6
+ * @returns {string} Static Markup of the Error page.
7
+ */
8
+ const ErrorView = ({ name, error }) => {
9
+ return (
10
+ <Container
11
+ className="view-wrapper"
12
+ style={{
13
+ fontFamily: 'Helvetica, sans-serif',
14
+ fontSize: '20px',
15
+ display: 'flex',
16
+ flexDirection: 'column',
17
+ justifyContent: 'center',
18
+ alignItems: 'center',
19
+ backgroundColor: '#006699',
20
+ minHeight: '100vh',
21
+ width: '100vw',
22
+ margin: 0,
23
+ padding: 0,
24
+ position: 'fixed',
25
+ top: 0,
26
+ left: 0,
27
+ right: 0,
28
+ bottom: 0,
29
+ }}
30
+ >
31
+ {__DEVELOPMENT__ && (
32
+ <>
33
+ {error && (
34
+ <div
35
+ style={{
36
+ backgroundColor: '#f8f8f8',
37
+ border: '1px solid #ddd',
38
+ borderRadius: '4px',
39
+ padding: '20px',
40
+ margin: '20px 0',
41
+ maxWidth: '90%',
42
+ overflow: 'auto',
43
+ textAlign: 'center',
44
+ }}
45
+ >
46
+ <h3 style={{ marginTop: 0, color: '#d32f2f' }}>
47
+ Error Details (Development Mode)
48
+ </h3>
49
+ {error.name && (
50
+ <p>
51
+ <strong>Error Name:</strong> {error.name}
52
+ </p>
53
+ )}
54
+ {error.message && (
55
+ <p>
56
+ <strong>Error Message:</strong> {error.message}
57
+ </p>
58
+ )}
59
+ {error.status && (
60
+ <p>
61
+ <strong>Status:</strong> {error.status}
62
+ </p>
63
+ )}
64
+ {error.stack && (
65
+ <>
66
+ <p>
67
+ <strong>Stack Trace:</strong>
68
+ </p>
69
+ <pre
70
+ style={{
71
+ backgroundColor: '#f0f0f0',
72
+ padding: '10px',
73
+ borderRadius: '4px',
74
+ fontSize: '12px',
75
+ lineHeight: '1.4',
76
+ overflow: 'auto',
77
+ whiteSpace: 'pre-wrap',
78
+ wordBreak: 'break-word',
79
+ }}
80
+ >
81
+ {error.stack}
82
+ </pre>
83
+ </>
84
+ )}
85
+ {name && (
86
+ <p>
87
+ <strong>Component Name:</strong> {name}
88
+ </p>
89
+ )}
90
+ </div>
91
+ )}
92
+ </>
93
+ )}
94
+ {!__DEVELOPMENT__ && (
95
+ <div
96
+ style={{
97
+ display: 'flex',
98
+ flexDirection: 'column',
99
+ justifyContent: 'center',
100
+ alignItems: 'center',
101
+ textAlign: 'center',
102
+ width: '100%',
103
+ color: 'white',
104
+ }}
105
+ >
106
+ <div>
107
+ <h1
108
+ style={{
109
+ fontSize: '18px',
110
+ fontWeight: 'normal',
111
+ margin: '0 0 10px 0',
112
+ color: 'white',
113
+ }}
114
+ >
115
+ European Environment Agency (EEA)
116
+ </h1>
117
+ <a
118
+ href="https://www.eea.europa.eu"
119
+ style={{
120
+ color: 'white',
121
+ textDecoration: 'underline',
122
+ fontSize: '16px',
123
+ }}
124
+ >
125
+ www.eea.europa.eu
126
+ </a>
127
+ </div>
128
+
129
+ <div
130
+ style={{
131
+ borderTop: '1px solid rgba(255, 255, 255, 0.3)',
132
+ borderBottom: '1px solid rgba(255, 255, 255, 0.3)',
133
+ padding: '30px 0',
134
+ margin: '20px 0',
135
+ width: '600px',
136
+ maxWidth: '90%',
137
+ }}
138
+ >
139
+ <h2
140
+ style={{
141
+ fontSize: '24px',
142
+ fontWeight: 'bold',
143
+ margin: '0',
144
+ color: 'white',
145
+ lineHeight: '1.4',
146
+ }}
147
+ >
148
+ <FormattedMessage
149
+ id="Our apologies, our website is not available at the moment."
150
+ defaultMessage="Our apologies, our website is not available at the moment."
151
+ />
152
+ </h2>
153
+ </div>
154
+
155
+ <div>
156
+ <p
157
+ style={{
158
+ fontSize: '16px',
159
+ fontStyle: 'italic',
160
+ margin: '0 0 20px 0',
161
+ color: 'white',
162
+ }}
163
+ >
164
+ <FormattedMessage
165
+ id="If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
166
+ defaultMessage="If this problem persists Contact EEA Web Team (web.helpdesk at eea.europa.eu)"
167
+ />
168
+ </p>
169
+ <p
170
+ style={{
171
+ fontSize: '14px',
172
+ margin: '0',
173
+ color: 'white',
174
+ lineHeight: '1.4',
175
+ }}
176
+ >
177
+ <span style={{ textDecoration: 'underline' }}>
178
+ European Environment Agency
179
+ </span>
180
+ , Kongens Nytorv 6, 1050
181
+ <br />
182
+ Copenhagen K, Denmark - Phone: +45 3336 7100
183
+ </p>
184
+ </div>
185
+ </div>
186
+ )}
187
+ </Container>
188
+ );
189
+ };
190
+
191
+ export default ErrorView;
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { runtimeConfig } from '@plone/volto/runtime_config';
2
1
  import { appendGroup, getAsyncData } from './helpers';
3
2
  import { FrequencyOfDissemination } from '@eeacms/volto-eea-website-policy/components/Widgets/FrequencyOfDissemination';
3
+ import ErrorView from '@eeacms/volto-eea-website-policy/components/ErrorView/ErrorView';
4
4
 
5
5
  const restrictedBlocks = [
6
6
  'imagecards',
@@ -37,20 +37,6 @@ const overrideBlocks = {
37
37
  };
38
38
 
39
39
  const applyConfig = (config) => {
40
- // #158717#note-25 any path that isn't static, en or controlpanel is treated as external
41
- const notInEN =
42
- /^(?!(#|\/en|\/login-authomatic|\/personal-information|\/azure_login|\/fallback_login|\/static|\/controlpanel|\/cypress|\/login|\/logout|\/contact-form|\/passwordreset)).*$/;
43
- config.settings.externalRoutes = [
44
- ...(config.settings.externalRoutes || []),
45
- {
46
- match: {
47
- path: notInEN,
48
- exact: false,
49
- strict: false,
50
- },
51
- },
52
- ];
53
-
54
40
  // #160689 Redirect contact-form to contact-us
55
41
  config.settings.contactForm = '/en/about/contact-us';
56
42
 
@@ -63,26 +49,14 @@ const applyConfig = (config) => {
63
49
  };
64
50
  }
65
51
 
66
- // #137187 Keycloak integration
67
- if (runtimeConfig['RAZZLE_KEYCLOAK'] === 'Yes') {
68
- config.settings.externalRoutes = [
69
- ...(config.settings.externalRoutes || []),
70
- {
71
- match: {
72
- path: '/login',
73
- exact: true,
74
- strict: false,
75
- },
76
- },
77
- {
78
- match: {
79
- path: '/logout',
80
- exact: true,
81
- strict: false,
82
- },
83
- },
84
- ];
85
- }
52
+ // #293749 Language dropdown
53
+ config.settings.hasLanguageDropdown = true;
54
+
55
+ //This only works if the component is wrapped in ErrorBoundary from volto
56
+ config.registerComponent({
57
+ name: 'ErrorBoundary',
58
+ component: ErrorView,
59
+ });
86
60
 
87
61
  if (config.blocks.blocksConfig.embed_static_content) {
88
62
  //prepopulate data for SSR particularly for history diffs
@@ -101,7 +75,13 @@ const applyConfig = (config) => {
101
75
  config.settings.isMultilingual = true;
102
76
  config.settings.defaultLanguage =
103
77
  config.settings.eea?.defaultLanguage || 'en';
104
- config.settings.supportedLanguages = ['en'];
78
+
79
+ config.settings.supportedLanguages = config.settings.eea?.languages?.map(
80
+ (item) => item.code,
81
+ ) || ['en'];
82
+
83
+ config.settings.navigationLanguage = 'en';
84
+
105
85
  // Disable languages #158616
106
86
  // config.settings.eea?.languages?.map(
107
87
  // (item) => item.code,