@eeacms/volto-clms-theme 1.1.286 → 1.1.288

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,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.1.288](https://github.com/eea/volto-clms-theme/compare/1.1.287...1.1.288) - 19 May 2026
8
+
9
+ #### :house: Internal changes
10
+
11
+ - style: Automated code fix [eea-jenkins - [`5ebcd5d`](https://github.com/eea/volto-clms-theme/commit/5ebcd5daedd1c8aaecc547af75f8b96145161c4c)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Refs #295031 - Remove CDSE related code in CLMSDownloadsView/FileCard and DatasetDownloadInformationWidget. [GhitaB - [`db56c2d`](https://github.com/eea/volto-clms-theme/commit/db56c2dac67ba22000f45820fab1287aba12f0fb)]
16
+ ### [1.1.287](https://github.com/eea/volto-clms-theme/compare/1.1.286...1.1.287) - 18 May 2026
17
+
18
+ #### :house: Internal changes
19
+
20
+ - style: Automated code fix [eea-jenkins - [`3f56cf8`](https://github.com/eea/volto-clms-theme/commit/3f56cf831a5df1394e9c214bfff848b8feae55a1)]
21
+
22
+ #### :hammer_and_wrench: Others
23
+
24
+ - Remove @plone-collective/volto-authomatic dependency [dobri1408 - [`122f114`](https://github.com/eea/volto-clms-theme/commit/122f1149d28d509610a25916fb9cd6d91d58d028)]
25
+ - Add Login component to routes and clean up code [dobri1408 - [`dd6641b`](https://github.com/eea/volto-clms-theme/commit/dd6641baa61ceb97fb0e5ebe83060af904e4c178)]
26
+ - (bug): Fix feedback survey modal crash by guarding missing config and clearing stale open timer [Unai Bolivar - [`a04d0ce`](https://github.com/eea/volto-clms-theme/commit/a04d0ce7513fc992554483593a97d1d775927ccb)]
27
+ - Delete src/components/CLMSLoginView/AuthomaticLoginPlone.jsx [dobri1408 - [`c3fcfaa`](https://github.com/eea/volto-clms-theme/commit/c3fcfaa868c900794132d014f37cefa519b65678)]
7
28
  ### [1.1.286](https://github.com/eea/volto-clms-theme/compare/1.1.285...1.1.286) - 15 May 2026
8
29
 
9
30
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.286",
3
+ "version": "1.1.288",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -59,7 +59,6 @@
59
59
  "@fortawesome/react-fontawesome": "0.1.14",
60
60
  "@ginkgo-bioworks/react-json-schema-form-builder": "2.10.1",
61
61
  "@kitconcept/volto-blocks-grid": "7.0.2",
62
- "@plone-collective/volto-authomatic": "2.0.1",
63
62
  "connected-react-router": "6.8.0",
64
63
  "d3-array": "^2.12.1",
65
64
  "husky": "7.0.4",
@@ -22,7 +22,7 @@ function SurveyModal(props) {
22
22
  >
23
23
  <ModalContent>
24
24
  <ModalDescription>
25
- <p>{config.text}</p>
25
+ <p>{config?.text || ''}</p>
26
26
  </ModalDescription>
27
27
  </ModalContent>
28
28
  <ModalActions>
@@ -42,7 +42,9 @@ function SurveyModal(props) {
42
42
  setOpen(false);
43
43
  markSurveyAsDone();
44
44
  //window.open(config.link, '_blank');
45
- window.location.replace(config.link);
45
+ if (config?.link) {
46
+ window.location.replace(config.link);
47
+ }
46
48
  }}
47
49
  >
48
50
  Take survey
@@ -100,20 +102,29 @@ export const FeedbackSurvey = () => {
100
102
 
101
103
  const location = useLocation();
102
104
  useEffect(() => {
105
+ let modalTimer;
103
106
  if (surveyConfig !== undefined) {
104
107
  if (surveyConfig.is_active === true) {
105
108
  incrementPageviews(20);
106
109
  let willOpen = decideToOpenModal();
107
110
  if (willOpen) {
108
- setTimeout(() => {
111
+ modalTimer = setTimeout(() => {
109
112
  setIsModalOpen(true);
110
113
  }, 5000);
111
114
  }
112
115
  }
113
116
  }
117
+
118
+ return () => {
119
+ if (modalTimer) {
120
+ clearTimeout(modalTimer);
121
+ }
122
+ };
114
123
  }, [location, surveyConfig]);
115
124
 
116
- return isModalOpen ? <SurveyModal config={surveyConfig} /> : null;
125
+ return isModalOpen && surveyConfig ? (
126
+ <SurveyModal config={surveyConfig} />
127
+ ) : null;
117
128
  };
118
129
 
119
130
  export default FeedbackSurvey;
@@ -163,11 +163,7 @@ const FileCard = (props) => {
163
163
  <Grid.Column
164
164
  width={['In_progress', 'Queued'].includes(item?.Status) ? 8 : 10}
165
165
  >
166
- <Header as="h3">{`Job ID: ${
167
- item?.cdse_task_role === 'parent' && !item?.FMETaskId
168
- ? 'CDSE PROCESSING...'
169
- : item?.FMETaskId
170
- }`}</Header>
166
+ <Header as="h3">{`Job ID: ${item?.FMETaskId}`}</Header>
171
167
  <Header.Subheader as="h4">{`Task ID: ${item?.TaskID}`}</Header.Subheader>
172
168
  <Segment basic className="file-datetimes">
173
169
  {item?.RegistrationDateTime && (
@@ -196,10 +192,10 @@ const FileCard = (props) => {
196
192
  </>
197
193
  )}
198
194
  </Segment>
199
- {item?.Datasets.length > 0 && (
195
+ {item?.Datasets?.length > 0 && (
200
196
  <ul>
201
- {item?.Datasets.map((dataset) => (
202
- <li>
197
+ {item?.Datasets.map((dataset, index) => (
198
+ <li key={dataset?.DatasetTitle || dataset?.name || index}>
203
199
  <DatasetNaming dataset={dataset} />
204
200
  </li>
205
201
  ))}
@@ -213,22 +209,6 @@ const FileCard = (props) => {
213
209
  <br />
214
210
  </>
215
211
  )}
216
- {item?.cdse_errors?.length > 0 && (
217
- <details style={{ marginTop: '0.5em' }}>
218
- <summary
219
- style={{
220
- cursor: 'pointer',
221
- }}
222
- >
223
- Show details
224
- </summary>
225
- <ul>
226
- {item.cdse_errors.map((err, idx) => (
227
- <li key={idx}>{err}</li>
228
- ))}
229
- </ul>
230
- </details>
231
- )}
232
212
  </Segment>
233
213
  )}
234
214
  {item?.Status === 'Finished_ok' && 3 - daysDiff > -1 && (
@@ -44,7 +44,6 @@ const ItemSchema = () => ({
44
44
  title: 'Enter the data source',
45
45
  description: '',
46
46
  choices: [
47
- ['CDSE', 'CDSE'],
48
47
  ['CDSE_CSV', 'CDSE_CSV'],
49
48
  ['WEKEO', 'WEKEO'],
50
49
  ['EEA', 'EEA'],
package/src/index.js CHANGED
@@ -4,7 +4,7 @@ import customBlocks, {
4
4
  } from '@eeacms/volto-clms-theme/components/Blocks/customBlocks';
5
5
 
6
6
  // ROUTE VIEWS
7
- import { ContactForm, Search, Sitemap } from '@plone/volto/components';
7
+ import { ContactForm, Search, Sitemap, Login } from '@plone/volto/components';
8
8
 
9
9
  // VIEWS
10
10
  import CLMSDatasetDetailView from '@eeacms/volto-clms-theme/components/CLMSDatasetDetailView/CLMSDatasetDetailView';
@@ -52,7 +52,6 @@ import { CheckboxHtmlWidget } from './components/Blocks/CustomTemplates/VoltoFor
52
52
  import reducers from './reducers';
53
53
  import CookieBanner from 'volto-cookie-banner/CookieBannerContainer';
54
54
  import CLMSLoginView from './components/CLMSLoginView/CLMSLogin';
55
- import AuthomaticLoginPlone from './components/CLMSLoginView/AuthomaticLoginPlone';
56
55
 
57
56
  //SLATE CONFIGURATION
58
57
  import installLinkEditor from '@plone/volto-slate/editor/plugins/AdvancedLink';
@@ -257,14 +256,15 @@ const applyConfig = (config) => {
257
256
  config,
258
257
  );
259
258
 
260
- const loginRoutes = [
259
+ config.addonRoutes = [
260
+ ...config.addonRoutes,
261
261
  {
262
262
  path: '/login-plone',
263
- component: AuthomaticLoginPlone,
263
+ component: Login,
264
264
  },
265
265
  {
266
266
  path: '/**/login-plone',
267
- component: AuthomaticLoginPlone,
267
+ component: Login,
268
268
  },
269
269
  {
270
270
  path: '/login',
@@ -274,11 +274,6 @@ const applyConfig = (config) => {
274
274
  path: '/**/login',
275
275
  component: CLMSLoginView,
276
276
  },
277
- ];
278
-
279
- config.addonRoutes = [
280
- ...loginRoutes,
281
- ...config.addonRoutes,
282
277
  {
283
278
  path: '/profile',
284
279
  component: ProfileView,
@@ -1,110 +0,0 @@
1
- /**
2
- * Authomatic login mounted on /login-plone.
3
- * @module components/CLMSLoginView/AuthomaticLoginPlone
4
- */
5
- import React, { useEffect, useState } from 'react';
6
- import {
7
- authomaticRedirect,
8
- listAuthOptions,
9
- oidcRedirect,
10
- } from '@plone-collective/volto-authomatic/actions'; // eslint-disable-line import/no-unresolved
11
- // eslint-disable-next-line import/no-unresolved
12
- import LoginForm from '@plone-collective/volto-authomatic/components/Login/LoginForm';
13
- import { injectIntl } from 'react-intl';
14
- import { useSelector, useDispatch } from 'react-redux';
15
- import { useLocation } from 'react-router-dom';
16
- import qs from 'query-string';
17
- import { useCookies } from 'react-cookie';
18
-
19
- function getReturnUrl(location) {
20
- const returnUrl = qs.parse(location.search).return_url;
21
-
22
- if (returnUrl) {
23
- return returnUrl;
24
- }
25
-
26
- const pathname = location.pathname || '/';
27
- const loginPloneSuffix = '/login-plone';
28
- const loginSuffix = '/login';
29
-
30
- if (pathname === loginPloneSuffix || pathname === loginSuffix) {
31
- return '/';
32
- }
33
-
34
- if (pathname.endsWith(loginPloneSuffix)) {
35
- return pathname.slice(0, -loginPloneSuffix.length) || '/';
36
- }
37
-
38
- if (pathname.endsWith(loginSuffix)) {
39
- return pathname.slice(0, -loginSuffix.length) || '/';
40
- }
41
-
42
- return '/';
43
- }
44
-
45
- function AuthomaticLoginPlone() {
46
- const dispatch = useDispatch();
47
- const [startedOAuth, setStartedOAuth] = useState(false);
48
- const [startedOIDC, setStartedOIDC] = useState(false);
49
- const loading = useSelector((state) => state.authOptions.loading);
50
- const options = useSelector((state) => state.authOptions.options);
51
- const loginOAuthValues = useSelector((state) => state.authomaticRedirect);
52
- const loginOIDCValues = useSelector((state) => state.oidcRedirect);
53
- const location = useLocation();
54
- const [, setCookie] = useCookies();
55
-
56
- useEffect(() => {
57
- dispatch(listAuthOptions());
58
- }, [dispatch]);
59
-
60
- useEffect(() => {
61
- const nextUrl = loginOAuthValues.next_url;
62
- const session = loginOAuthValues.session;
63
-
64
- if (nextUrl && session && startedOAuth) {
65
- setStartedOAuth(false);
66
- setTimeout(() => {
67
- window.location.href = nextUrl;
68
- }, 500);
69
- }
70
- }, [startedOAuth, loginOAuthValues]);
71
-
72
- const onSelectProvider = (provider) => {
73
- setStartedOAuth(true);
74
- setCookie('return_url', getReturnUrl(location), { path: '/' });
75
- dispatch(authomaticRedirect(provider.id));
76
- };
77
-
78
- useEffect(() => {
79
- const nextUrl = loginOIDCValues.next_url;
80
-
81
- if (nextUrl && startedOIDC) {
82
- setStartedOIDC(false);
83
- setTimeout(() => {
84
- window.location.href = nextUrl;
85
- }, 500);
86
- }
87
- }, [startedOIDC, loginOIDCValues]);
88
-
89
- useEffect(() => {
90
- if (
91
- options !== undefined &&
92
- options.length === 1 &&
93
- options[0].id === 'oidc'
94
- ) {
95
- setStartedOIDC(true);
96
- dispatch(oidcRedirect('oidc'));
97
- }
98
- }, [options, dispatch]);
99
-
100
- return (
101
- <LoginForm
102
- loading={loading}
103
- providers={options}
104
- action="login"
105
- onSelectProvider={onSelectProvider}
106
- />
107
- );
108
- }
109
-
110
- export default injectIntl(AuthomaticLoginPlone);