@eeacms/volto-cca-policy 0.2.37 → 0.2.39

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,24 @@ 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.2.39](https://github.com/eea/volto-cca-policy/compare/0.2.38...0.2.39) - 30 May 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: privacy protection [kreafox - [`8c2ecd9`](https://github.com/eea/volto-cca-policy/commit/8c2ecd9677b01b7fe98c22afbf0707e582feb27f)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - test: update snapshot [kreafox - [`137a7ec`](https://github.com/eea/volto-cca-policy/commit/137a7ec6b9ddc14265ab8b07d73b9562947ac3b9)]
16
+ - Proper urls [Tiberiu Ichim - [`3fa085b`](https://github.com/eea/volto-cca-policy/commit/3fa085b287d9fe37b19bd626c19b51e73b72d898)]
17
+ - Fix typo [Tiberiu Ichim - [`b2fdb30`](https://github.com/eea/volto-cca-policy/commit/b2fdb30ce29312b6c41687a0aedc45ad2a13c548)]
18
+ - WIP [Tiberiu Ichim - [`cd161ef`](https://github.com/eea/volto-cca-policy/commit/cd161efbd05acec99af576a2132730696e0ed3b6)]
19
+ ### [0.2.38](https://github.com/eea/volto-cca-policy/compare/0.2.37...0.2.38) - 29 May 2024
20
+
21
+ #### :house: Internal changes
22
+
23
+ - style: remove border on iframe [kreafox - [`996bafd`](https://github.com/eea/volto-cca-policy/commit/996bafd58fe7e1922311d8417ef454b5ebe7b0cd)]
24
+
7
25
  ### [0.2.37](https://github.com/eea/volto-cca-policy/compare/0.2.36...0.2.37) - 29 May 2024
8
26
 
9
27
  #### :house: Internal changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
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",
@@ -16,6 +16,7 @@ import {
16
16
  import { PortalMessage } from '@eeacms/volto-cca-policy/components';
17
17
  import { Link } from 'react-router-dom';
18
18
  import { FormattedMessage } from 'react-intl';
19
+ import { useSelector } from 'react-redux';
19
20
 
20
21
  if (!__SERVER__) {
21
22
  window.cds_toolbox = {
@@ -98,12 +99,10 @@ function C3SIndicatorView(props) {
98
99
  logo,
99
100
  // c3sjs_overview,
100
101
  } = content;
101
- // console.log('c3sjs_overview', c3sjs_overview, props);
102
102
  const [showDetails, setShowDetails] = useState(false);
103
- // const hasIndicatorTitle =
104
- // indicator_title && indicator_title !== '_' && indicator_title !== '-';
105
103
 
106
104
  const [activeAccordion, setActiveAccordion] = React.useState([true, false]);
105
+ const currentLanguage = useSelector((state) => state.intl.locale);
107
106
 
108
107
  function handleAccordionClick(e, index) {
109
108
  const _activeAccordion = JSON.parse(JSON.stringify(activeAccordion));
@@ -261,7 +260,13 @@ function C3SIndicatorView(props) {
261
260
  implemented by ECMWF.
262
261
  </p>
263
262
  <p>
264
- <a href="/knowledge/european-climate-data-explorer/disclaimer">
263
+ <a
264
+ href={
265
+ '/' +
266
+ currentLanguage +
267
+ '/knowledge/european-climate-data-explorer/disclaimer'
268
+ }
269
+ >
265
270
  <FormattedMessage id="Disclaimer" defaultMessage="Disclaimer" />
266
271
  </a>
267
272
  </p>
@@ -111,6 +111,10 @@ const DatabaseItemView = (props) => {
111
111
  }
112
112
  return null;
113
113
  };
114
+ const flourishPath = data_src(map_graphs);
115
+ const flourishUrl = map_graphs
116
+ ? `https://flo.uri.sh/${flourishPath}/embed`
117
+ : null;
114
118
 
115
119
  const is_cmshare_video = share_eea.some((domain) =>
116
120
  content?.embed_url?.includes(domain),
@@ -213,22 +217,23 @@ const DatabaseItemView = (props) => {
213
217
  </>
214
218
  )}
215
219
 
216
- <PrivacyProtection
217
- data={{
218
- dataprotection,
219
- }}
220
- >
221
- {!!data_src(map_graphs) && (
220
+ {!!flourishPath && (
221
+ <PrivacyProtection
222
+ data={{
223
+ url: flourishUrl,
224
+ dataprotection: dataprotection,
225
+ }}
226
+ >
222
227
  <iframe
223
228
  height="980"
224
229
  width="100%"
225
- src={`https://flo.uri.sh/${data_src(map_graphs)}/embed`}
230
+ src={flourishUrl}
226
231
  title="Interactive or visual content"
227
232
  className="flourish-embed-iframe"
228
233
  sandbox="allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"
229
234
  ></iframe>
230
- )}
231
- </PrivacyProtection>
235
+ </PrivacyProtection>
236
+ )}
232
237
 
233
238
  <Divider />
234
239
 
@@ -195,3 +195,7 @@ body.subsite {
195
195
  font-size: 23px;
196
196
  }
197
197
  }
198
+
199
+ iframe {
200
+ border: none;
201
+ }