@eeacms/volto-clms-theme 1.1.198 → 1.1.200
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 +8 -0
- package/package.json +1 -1
- package/src/components/Blocks/CclSubscriptionBlock/SubscriptionView.jsx +7 -8
- package/src/components/CLMSDownloadCartView/Fields/TimeseriesPicker.jsx +1 -1
- package/src/components/CLMSProfileView/CLMSProfileView.jsx +0 -16
- package/src/components/CLMSProfileView/CLMSUserProfileView.jsx +13 -0
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +7 -177
- package/theme/site/extras/footer.less +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ 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.200](https://github.com/eea/volto-clms-theme/compare/1.1.199...1.1.200) - 14 November 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: changes needed on the land portal in relation to moving notifications out of the porta to an external tool at EEA -refs #278670 [ana-oprea - [`c79ae45`](https://github.com/eea/volto-clms-theme/commit/c79ae450db397c2ba1f5d322d5592e762d259031)]
|
|
12
|
+
|
|
13
|
+
### [1.1.199](https://github.com/eea/volto-clms-theme/compare/1.1.198...1.1.199) - 14 November 2024
|
|
14
|
+
|
|
7
15
|
### [1.1.198](https://github.com/eea/volto-clms-theme/compare/1.1.197...1.1.198) - 13 November 2024
|
|
8
16
|
|
|
9
17
|
### [1.1.197](https://github.com/eea/volto-clms-theme/compare/1.1.196...1.1.197) - 11 November 2024
|
package/package.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import CclModal from '@eeacms/volto-clms-theme/components/CclModal/CclModal';
|
|
3
|
-
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
1
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
4
2
|
|
|
5
3
|
const SubscriptionBlockView = (props) => {
|
|
6
4
|
const { data } = props;
|
|
7
5
|
|
|
8
6
|
return (
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
<UniversalLink
|
|
8
|
+
href={
|
|
9
|
+
'https://subscriptions.copernicus-land.eea.europa.eu/copernicus-land-monitoring-service-subscription'
|
|
12
10
|
}
|
|
11
|
+
className="ccl-button ccl-button-green"
|
|
13
12
|
>
|
|
14
|
-
|
|
15
|
-
</
|
|
13
|
+
{data.title || 'Text example...'}
|
|
14
|
+
</UniversalLink>
|
|
16
15
|
);
|
|
17
16
|
};
|
|
18
17
|
|
|
@@ -34,7 +34,7 @@ export const TimeseriesPicker = (props) => {
|
|
|
34
34
|
const diffDays = Math.round(Math.abs((start - end) / oneDay));
|
|
35
35
|
return diffDays < limit;
|
|
36
36
|
};
|
|
37
|
-
const dates_array = data_arrays
|
|
37
|
+
const dates_array = data_arrays?.map((e) => new Date(e));
|
|
38
38
|
return (
|
|
39
39
|
<>
|
|
40
40
|
<Popup
|
|
@@ -9,14 +9,9 @@ import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
|
|
|
9
9
|
import { helmetTitle } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
10
10
|
import {
|
|
11
11
|
CLMSApiTokensView,
|
|
12
|
-
CLMSNewsletterSubscriberView,
|
|
13
12
|
CLMSUserProfileView,
|
|
14
13
|
CLMSDeleteProfileView,
|
|
15
14
|
} from '@eeacms/volto-clms-theme/components/CLMSProfileView';
|
|
16
|
-
import {
|
|
17
|
-
AVAILABLE_SUBSCRIPTIONS,
|
|
18
|
-
SubscriptionView,
|
|
19
|
-
} from '@eeacms/volto-clms-theme/components/CLMSSubscriptionView';
|
|
20
15
|
|
|
21
16
|
import { getExtraBreadcrumbItems } from '../../actions';
|
|
22
17
|
|
|
@@ -67,17 +62,6 @@ class CLMSProfileView extends Component {
|
|
|
67
62
|
<div tabTitle="API tokens">
|
|
68
63
|
<CLMSApiTokensView />
|
|
69
64
|
</div>
|
|
70
|
-
{(this.props.roles?.includes('Manager') ||
|
|
71
|
-
this.props.roles?.includes('Site Administrator')) && (
|
|
72
|
-
<div tabTitle="CLMS updates subscribers">
|
|
73
|
-
<CLMSNewsletterSubscriberView />
|
|
74
|
-
</div>
|
|
75
|
-
)}
|
|
76
|
-
{AVAILABLE_SUBSCRIPTIONS.map((subscription) => (
|
|
77
|
-
<div tabTitle={subscription?.title} key={subscription?.title}>
|
|
78
|
-
<SubscriptionView type={subscription?.type} />
|
|
79
|
-
</div>
|
|
80
|
-
))}
|
|
81
65
|
<div tabTitle="Delete profile">
|
|
82
66
|
<CLMSDeleteProfileView />
|
|
83
67
|
</div>
|
|
@@ -260,6 +260,19 @@ class CLMSUserProfileView extends Component {
|
|
|
260
260
|
/>
|
|
261
261
|
)}
|
|
262
262
|
</div>
|
|
263
|
+
|
|
264
|
+
<p className="callout" style={{ backgroundColor: '#ebefc6' }}>
|
|
265
|
+
If you are interested in receiving news and other updates from
|
|
266
|
+
the Copernicus Land Monitoring Service, please subscribe{' '}
|
|
267
|
+
<UniversalLink
|
|
268
|
+
href={
|
|
269
|
+
'https://subscriptions.copernicus-land.eea.europa.eu/copernicus-land-monitoring-service-subscription'
|
|
270
|
+
}
|
|
271
|
+
>
|
|
272
|
+
here
|
|
273
|
+
</UniversalLink>
|
|
274
|
+
.
|
|
275
|
+
</p>
|
|
263
276
|
</div>
|
|
264
277
|
</Container>
|
|
265
278
|
)}
|
|
@@ -5,13 +5,9 @@
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
7
7
|
import { connect } from 'react-redux';
|
|
8
|
-
import {
|
|
8
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
9
9
|
import { ReactSVG } from 'react-svg';
|
|
10
|
-
import { toast } from 'react-toastify';
|
|
11
10
|
import { compose } from 'redux';
|
|
12
|
-
import validator from 'validator';
|
|
13
|
-
|
|
14
|
-
import { Toast } from '@plone/volto/components';
|
|
15
11
|
|
|
16
12
|
import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
|
|
17
13
|
import { withFontAwesomeLibs } from '@eeacms/volto-clms-utils/helpers';
|
|
@@ -126,126 +122,6 @@ const messages = defineMessages({
|
|
|
126
122
|
*/
|
|
127
123
|
|
|
128
124
|
class Footer extends Component {
|
|
129
|
-
constructor(props) {
|
|
130
|
-
super(props);
|
|
131
|
-
this.handleChange = this.handleChange.bind(this);
|
|
132
|
-
this.handleInputChange = this.handleInputChange.bind(this);
|
|
133
|
-
this.handleBlur = this.handleBlur.bind(this);
|
|
134
|
-
this.onSubmit = this.onSubmit.bind(this);
|
|
135
|
-
this.state = {
|
|
136
|
-
value: '',
|
|
137
|
-
inputValue: false,
|
|
138
|
-
lang: 'en',
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
componentDidMount() {
|
|
143
|
-
this.setState({
|
|
144
|
-
value: '',
|
|
145
|
-
inputValue: this.state.inputValue,
|
|
146
|
-
lang: this.props.intl.locale,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
handleInputChange() {
|
|
151
|
-
this.setState({
|
|
152
|
-
inputValue: !this.state.inputValue,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
handleChange(event) {
|
|
157
|
-
this.setState({
|
|
158
|
-
value: event.target.value,
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
handleBlur(event) {
|
|
162
|
-
const input =
|
|
163
|
-
typeof window !== 'undefined' &&
|
|
164
|
-
document.getElementById('footer-email') !== null
|
|
165
|
-
? document.getElementById('footer-email')
|
|
166
|
-
: '';
|
|
167
|
-
if (!validator.isEmail(event.target.value)) {
|
|
168
|
-
input.setCustomValidity(
|
|
169
|
-
this.props.intl.formatMessage(messages.invalid_mail),
|
|
170
|
-
);
|
|
171
|
-
input.reportValidity();
|
|
172
|
-
} else {
|
|
173
|
-
input.setCustomValidity('');
|
|
174
|
-
input.reportValidity();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
emptyFieldErrorToast = () => {
|
|
179
|
-
toast.error(
|
|
180
|
-
<Toast error title={'Error'} content={'Write your email in the field'} />,
|
|
181
|
-
);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
invalidEmailErrorToast = () => {
|
|
185
|
-
toast.error(<Toast error title={'Error'} content={'Invalid email'} />);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Submit handler
|
|
190
|
-
* @method onSubmit
|
|
191
|
-
* @param {object} data Form data.
|
|
192
|
-
* @returns {undefined}
|
|
193
|
-
*/
|
|
194
|
-
onSubmit(event) {
|
|
195
|
-
event.preventDefault();
|
|
196
|
-
if (
|
|
197
|
-
validator.isEmail(this.state.value) === true &&
|
|
198
|
-
this.state.inputValue === true &&
|
|
199
|
-
this.state.value !== ''
|
|
200
|
-
) {
|
|
201
|
-
this.props
|
|
202
|
-
.subscribeTo('newsletter', this.state.value)
|
|
203
|
-
.then(() => {
|
|
204
|
-
this.props.subscribe_loaded &&
|
|
205
|
-
toast.success(
|
|
206
|
-
<Toast
|
|
207
|
-
success
|
|
208
|
-
title={this.props.intl.formatMessage(messages.success)}
|
|
209
|
-
content={this.props.intl.formatMessage(messages.saved)}
|
|
210
|
-
/>,
|
|
211
|
-
);
|
|
212
|
-
})
|
|
213
|
-
.catch(() => {
|
|
214
|
-
this.props.subscribe_error &&
|
|
215
|
-
toast.error(
|
|
216
|
-
<Toast
|
|
217
|
-
error
|
|
218
|
-
title={this.props.intl.formatMessage(messages.error)}
|
|
219
|
-
content={
|
|
220
|
-
this.props.subscribe_error_message ||
|
|
221
|
-
this.props.intl.formatMessage(messages.errorMessage)
|
|
222
|
-
}
|
|
223
|
-
/>,
|
|
224
|
-
);
|
|
225
|
-
});
|
|
226
|
-
} else if (
|
|
227
|
-
this.state.inputValue === true &&
|
|
228
|
-
validator.isEmail(this.state.value) === false
|
|
229
|
-
) {
|
|
230
|
-
this.invalidEmailErrorToast();
|
|
231
|
-
} else if (
|
|
232
|
-
this.state.inputValue === false &&
|
|
233
|
-
validator.isEmail(this.state.value) === true
|
|
234
|
-
) {
|
|
235
|
-
toast.error(
|
|
236
|
-
<Toast
|
|
237
|
-
error
|
|
238
|
-
title={this.props.intl.formatMessage(messages.error)}
|
|
239
|
-
content={this.props.intl.formatMessage(
|
|
240
|
-
messages.agreePrivacyPolicyCheck,
|
|
241
|
-
)}
|
|
242
|
-
/>,
|
|
243
|
-
);
|
|
244
|
-
} else {
|
|
245
|
-
this.emptyFieldErrorToast();
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
125
|
render() {
|
|
250
126
|
return (
|
|
251
127
|
<footer className="ccl-footer">
|
|
@@ -379,60 +255,14 @@ class Footer extends Component {
|
|
|
379
255
|
Sign up to CLMS updates
|
|
380
256
|
</div>
|
|
381
257
|
<form action="" className="ccl-footer-form">
|
|
382
|
-
<div className="ccl-footer-newsletter">
|
|
383
|
-
<
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
id="footer-email"
|
|
388
|
-
value={this.state.value}
|
|
389
|
-
onChange={this.handleChange}
|
|
390
|
-
onBlur={this.handleBlur}
|
|
391
|
-
/>
|
|
392
|
-
<button
|
|
393
|
-
disabled={
|
|
394
|
-
this.state.inputValue === true &&
|
|
395
|
-
validator.isEmail(this.state.value) === true
|
|
396
|
-
? false
|
|
397
|
-
: true
|
|
398
|
-
}
|
|
399
|
-
type="submit"
|
|
400
|
-
className="ccl-button ccl-button--default"
|
|
401
|
-
onClick={
|
|
402
|
-
validator.isEmail(this.state.value) &&
|
|
403
|
-
this.state.inputValue === true
|
|
404
|
-
? this.onSubmit
|
|
405
|
-
: this.invalidEmailErrorToast
|
|
406
|
-
}
|
|
258
|
+
<div className="ccl-footer-newsletter ">
|
|
259
|
+
<UniversalLink
|
|
260
|
+
href="https://subscriptions.copernicus-land.eea.europa.eu/copernicus-land-monitoring-service-subscription"
|
|
261
|
+
className="ccl-button ccl-button--default footer-clms-updates"
|
|
262
|
+
target="_blank"
|
|
407
263
|
>
|
|
408
264
|
{this.props.intl.formatMessage(messages.subscribe)}
|
|
409
|
-
</
|
|
410
|
-
</div>
|
|
411
|
-
<div className="ccl-form footer-privacy-check">
|
|
412
|
-
<div className="ccl-form-group">
|
|
413
|
-
<input
|
|
414
|
-
type="checkbox"
|
|
415
|
-
id="footer_privacy"
|
|
416
|
-
name="footerPrivacy"
|
|
417
|
-
value={this.state.inputValue}
|
|
418
|
-
onClick={this.handleInputChange}
|
|
419
|
-
className="ccl-checkbox ccl-form-check-input"
|
|
420
|
-
required={true}
|
|
421
|
-
/>
|
|
422
|
-
<label
|
|
423
|
-
className="ccl-form-check-label"
|
|
424
|
-
htmlFor="footer_privacy"
|
|
425
|
-
>
|
|
426
|
-
{this.props.intl.formatMessage(
|
|
427
|
-
messages.agreePrivacyPolicy,
|
|
428
|
-
)}
|
|
429
|
-
<Link to={`/${this.state.lang}/personal-data-protection`}>
|
|
430
|
-
{this.props.intl.formatMessage(
|
|
431
|
-
messages.agreePrivacyPolicyLinkText,
|
|
432
|
-
)}
|
|
433
|
-
</Link>
|
|
434
|
-
</label>
|
|
435
|
-
</div>
|
|
265
|
+
</UniversalLink>
|
|
436
266
|
</div>
|
|
437
267
|
</form>
|
|
438
268
|
|
|
@@ -180,6 +180,17 @@
|
|
|
180
180
|
color: @clmsGreen;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
.ccl-footer
|
|
184
|
+
.ccl-footer-main
|
|
185
|
+
.ccl-footer-col
|
|
186
|
+
.ccl-footer-form
|
|
187
|
+
.footer-clms-updates {
|
|
188
|
+
display: block;
|
|
189
|
+
border: 1px solid #fff;
|
|
190
|
+
background-color: #fff;
|
|
191
|
+
color: @clmsGreen;
|
|
192
|
+
}
|
|
193
|
+
|
|
183
194
|
.ccl-footer .footer-privacy-check .ccl-form-check-label {
|
|
184
195
|
display: inline-block;
|
|
185
196
|
vertical-align: middle;
|