@eeacms/volto-clms-theme 1.1.288 → 1.1.289

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,11 @@ 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.289](https://github.com/eea/volto-clms-theme/compare/1.1.288...1.1.289) - 21 May 2026
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - fix ESlint [Teodor Voicu - [`2b285af`](https://github.com/eea/volto-clms-theme/commit/2b285afa78aa2a2458d8eb2e4a0c8af481767240)]
7
12
  ### [1.1.288](https://github.com/eea/volto-clms-theme/compare/1.1.287...1.1.288) - 19 May 2026
8
13
 
9
14
  #### :house: Internal changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.288",
3
+ "version": "1.1.289",
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",
@@ -1,42 +1,17 @@
1
1
  import React, { useState } from 'react';
2
2
  import { compose } from 'redux';
3
- import { useSelector, useDispatch } from 'react-redux';
4
3
  import VisibilitySensor from 'react-visibility-sensor';
5
- import {
6
- Placeholder,
7
- Dimmer,
8
- Loader,
9
- Button,
10
- Checkbox,
11
- } from 'semantic-ui-react';
4
+ import { Placeholder, Button, Checkbox } from 'semantic-ui-react';
12
5
  import { withCookies } from 'react-cookie';
13
6
  import { serializeNodes } from '@plone/volto-slate/editor/render';
14
- import { defineMessages, injectIntl } from 'react-intl';
15
- import { toast } from 'react-toastify';
7
+ import { injectIntl } from 'react-intl';
16
8
  import config from '@plone/volto/registry';
17
- import { getBaseUrl } from '@plone/volto/helpers';
18
- import { Toast } from '@plone/volto/components';
19
- import {
20
- getConnectedDataParametersForContext,
21
- getFilteredURL,
22
- } from '@eeacms/volto-datablocks/helpers';
23
9
 
24
10
  import { createImageUrl } from '@eeacms/volto-embed/PrivacyProtection/helpers';
25
11
  import { ProtectionSchema } from '@eeacms/volto-embed/PrivacyProtection/schema';
26
12
 
27
13
  import '@eeacms/volto-embed/PrivacyProtection/styles.less';
28
14
 
29
- const messages = defineMessages({
30
- success: {
31
- id: 'Success',
32
- defaultMessage: 'Success',
33
- },
34
- image: {
35
- id: 'Live image generated',
36
- defaultMessage: 'Live image generated',
37
- },
38
- });
39
-
40
15
  const key = (domain_key) => `accept-${domain_key}`;
41
16
 
42
17
  const getExpDays = () =>
@@ -76,16 +51,7 @@ const CookieWatcher = (domain_key, cookies, pollingRate = 250) => {
76
51
  };
77
52
 
78
53
  const PrivacyProtection = (props) => {
79
- const {
80
- children,
81
- data = {},
82
- id,
83
- editable,
84
- intl,
85
- path,
86
- cookies,
87
- height = '',
88
- } = props;
54
+ const { children, data = {}, id, editable, cookies, height = '' } = props;
89
55
  const {
90
56
  enabled = false,
91
57
  privacy_statement,
@@ -100,15 +66,7 @@ const PrivacyProtection = (props) => {
100
66
  const [remember, setRemember] = useState(
101
67
  cookieExist(privacy_cookie_key, cookies) ? defaultShow : true,
102
68
  );
103
- const dispatch = useDispatch();
104
69
  const checkExistance = CookieWatcher(privacy_cookie_key, cookies);
105
- const connected_data_parameters = useSelector((state) => {
106
- return getConnectedDataParametersForContext(
107
- state?.connected_data_parameters,
108
- state.router?.location?.pathname,
109
- );
110
- });
111
- const url = getFilteredURL(data.url, connected_data_parameters);
112
70
 
113
71
  React.useEffect(() => {
114
72
  if (bgImg) {
@@ -127,37 +85,6 @@ const PrivacyProtection = (props) => {
127
85
  [checkExistance],
128
86
  );
129
87
 
130
- //screenshot api
131
- React.useEffect(() => {
132
- if (enabled && !bgImg && !show && url) {
133
- fetch(
134
- `${getBaseUrl(
135
- '',
136
- )}/cors-proxy/https://screenshot.eea.europa.eu/api/v1/retrieve_image_for_url?url=${encodeURIComponent(
137
- url,
138
- )}&w=1920&waitfor=4000`,
139
- )
140
- .then((e) => e.blob())
141
- .then((blob) => {
142
- setImage(URL.createObjectURL(blob));
143
- if (editable) {
144
- toast.success(
145
- <Toast
146
- success
147
- title={intl.formatMessage(messages.success)}
148
- content={intl.formatMessage(messages.image)}
149
- />,
150
- );
151
- }
152
- })
153
- .catch(() => {
154
- if (__DEVELOPMENT__) {
155
- /* eslint-disable-next-line */
156
- console.log('Please enable your VPN!');
157
- }
158
- });
159
- }
160
- }, [enabled, url, path, dispatch, bgImg, show, intl, editable]);
161
88
  return (
162
89
  <VisibilitySensor
163
90
  onChange={(isVisible) => {
@@ -178,10 +105,6 @@ const PrivacyProtection = (props) => {
178
105
  >
179
106
  {!enabled || show ? (
180
107
  children
181
- ) : !__DEVELOPMENT__ && !image ? (
182
- <Dimmer active>
183
- <Loader />
184
- </Dimmer>
185
108
  ) : (
186
109
  <div
187
110
  className="privacy-protection"