@eeacms/volto-cca-policy 0.3.109 → 0.3.111

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
+ ### [0.3.111](https://github.com/eea/volto-cca-policy/compare/0.3.110...0.3.111) - 9 April 2026
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add PhotoGallery component to AdaptationOptionView and enhance accessibility - refs #296805 [kreafox - [`0e18e3f`](https://github.com/eea/volto-cca-policy/commit/0e18e3ffa61180aa70f843d7ff3e10c76d7cc9a2)]
12
+
13
+ #### :rocket: Dependency updates
14
+
15
+ - Release @eeacms/volto-slate-label@2.0.1 [EEA Jenkins - [`9eeafda`](https://github.com/eea/volto-cca-policy/commit/9eeafda6b7de48f33191207b88559a7211181556)]
16
+ - Release @eeacms/volto-globalsearch@4.0.1 [EEA Jenkins - [`dbcadfc`](https://github.com/eea/volto-cca-policy/commit/dbcadfc75e7497f30e4aeed8598e7fb751c20240)]
17
+
18
+ ### [0.3.110](https://github.com/eea/volto-cca-policy/compare/0.3.109...0.3.110) - 8 April 2026
19
+
20
+ #### :bug: Bug Fixes
21
+
22
+ - fix: filename handling in ImageWidget [Krisztina Elekes - [`a66267b`](https://github.com/eea/volto-cca-policy/commit/a66267b6a639c7a3d9f0a7516efec0ecb8d6f02e)]
23
+
24
+ #### :nail_care: Enhancements
25
+
26
+ - change(style): info message background color - refs #296805 [kreafox - [`1466f80`](https://github.com/eea/volto-cca-policy/commit/1466f80eec4840fcd83102659fca3ea64f005de8)]
27
+
7
28
  ### [0.3.109](https://github.com/eea/volto-cca-policy/compare/0.3.108...0.3.109) - 1 April 2026
8
29
 
9
30
  #### :nail_care: Enhancements
@@ -145,7 +166,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
145
166
 
146
167
  #### :house: Internal changes
147
168
 
148
- - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`e901251`](https://github.com/eea/volto-cca-policy/commit/e901251592eb54609fbc7eb8fcf7bd452c2da9cd)]
149
169
 
150
170
  ### [0.3.102](https://github.com/eea/volto-cca-policy/compare/0.3.101...0.3.102) - 24 February 2026
151
171
 
@@ -155,7 +175,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
155
175
 
156
176
  #### :house: Internal changes
157
177
 
158
- - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`8b3699a`](https://github.com/eea/volto-cca-policy/commit/8b3699a6cbaef662b5e80884ac2c1f7dc9c6591e)]
159
178
 
160
179
  ### [0.3.101](https://github.com/eea/volto-cca-policy/compare/0.3.100...0.3.101) - 28 January 2026
161
180
 
@@ -443,7 +462,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
443
462
  - style: fix item spacing [kreafox - [`7d4535d`](https://github.com/eea/volto-cca-policy/commit/7d4535dbc486e6cb80fc55d6ac8c7c01d9cf48af)]
444
463
  - chore: code cleanup [kreafox - [`842419b`](https://github.com/eea/volto-cca-policy/commit/842419b1bce3dc624755c81c9dea672198cab9e2)]
445
464
  - style: update teaser block styling [kreafox - [`1e0cad8`](https://github.com/eea/volto-cca-policy/commit/1e0cad8e1ed3ae827ee868dce8ad50b292a937ba)]
446
- - chore: update Makefile, run yarn i18n [kreafox - [`61e6962`](https://github.com/eea/volto-cca-policy/commit/61e6962901068ae6512265417a730bd9befd65fe)]
447
465
  - chore: move styling to theme folder [kreafox - [`8cf6a1b`](https://github.com/eea/volto-cca-policy/commit/8cf6a1b8b14abf472a9c61b28db574f6d9e0bd3b)]
448
466
  - chore: remove ArrayWidget customization [kreafox - [`249bf93`](https://github.com/eea/volto-cca-policy/commit/249bf93054f7726c3d57a8b8ca01b75cd0d30522)]
449
467
  - chore: remove Footer customization [kreafox - [`7038af3`](https://github.com/eea/volto-cca-policy/commit/7038af37d48a328dfc31746f3fa84973e2f840ab)]
@@ -3206,13 +3224,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3206
3224
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
3207
3225
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
3208
3226
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
3209
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
3210
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
3211
3227
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
3212
3228
 
3213
3229
  #### :house: Internal changes
3214
3230
 
3215
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
3216
3231
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
3217
3232
 
3218
3233
  #### :hammer_and_wrench: Others
@@ -3229,9 +3244,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3229
3244
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
3230
3245
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
3231
3246
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
3232
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
3233
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
3234
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
3235
3247
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
3236
3248
  - Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
3237
3249
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -3448,7 +3460,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3448
3460
 
3449
3461
  #### :house: Internal changes
3450
3462
 
3451
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
3452
3463
 
3453
3464
  #### :hammer_and_wrench: Others
3454
3465
 
@@ -3929,7 +3940,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3929
3940
  #### :hammer_and_wrench: Others
3930
3941
 
3931
3942
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
3932
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
3933
3943
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
3934
3944
 
3935
3945
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.109",
3
+ "version": "0.3.111",
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",
@@ -33,11 +33,11 @@
33
33
  "@eeacms/volto-eea-design-system": "*",
34
34
  "@eeacms/volto-eea-website-theme": "*",
35
35
  "@eeacms/volto-embed": "*",
36
- "@eeacms/volto-globalsearch": "4.0.0",
36
+ "@eeacms/volto-globalsearch": "4.0.1",
37
37
  "@eeacms/volto-group-block": "^9.0.0",
38
38
  "@eeacms/volto-openlayers-map": "1.0.1",
39
39
  "@eeacms/volto-searchlib": "^2.1.10",
40
- "@eeacms/volto-slate-label": "2.0.0",
40
+ "@eeacms/volto-slate-label": "2.0.1",
41
41
  "@eeacms/volto-tabs-block": "^9.0.3",
42
42
  "@elastic/search-ui": "1.21.2",
43
43
  "@plone-collective/volto-authomatic": "2.0.1",
@@ -11,13 +11,65 @@ import {
11
11
  AccordionList,
12
12
  PortalMessage,
13
13
  ShareInfoButton,
14
+ ImageGallery,
14
15
  } from '@eeacms/volto-cca-policy/components';
15
16
  import { Callout } from '@eeacms/volto-eea-design-system/ui';
16
- import { Container, Grid, Image } from 'semantic-ui-react';
17
+ import { Container, Grid, Image, Icon } from 'semantic-ui-react';
17
18
  import { getFilteredBlocks } from '@eeacms/volto-cca-policy/utils';
18
19
  import { UniversalLink } from '@plone/volto/components';
19
20
  import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
20
21
 
22
+ const PhotoGallery = ({ content }) => {
23
+ const { cca_adaptation_gallery } = content;
24
+
25
+ const [open, setOpen] = React.useState(false);
26
+ const [slideIndex, setSlideIndex] = React.useState(0);
27
+
28
+ const handleTitleClick = () => {
29
+ setSlideIndex(0);
30
+ setOpen(true);
31
+ };
32
+
33
+ const handleKeyDown = (e) => {
34
+ if (e.key === 'Enter' || e.key === ' ') {
35
+ e.preventDefault();
36
+ handleTitleClick();
37
+ }
38
+ };
39
+
40
+ return (
41
+ <>
42
+ {cca_adaptation_gallery && cca_adaptation_gallery.length > 0 && (
43
+ <div className="case-study-gallery">
44
+ <div
45
+ className="gallery-title"
46
+ tabIndex={0}
47
+ role="button"
48
+ onClick={handleTitleClick}
49
+ onKeyDown={handleKeyDown}
50
+ >
51
+ <span>
52
+ <FormattedMessage
53
+ id="Adaptation Option illustrations"
54
+ defaultMessage="Adaptation Option illustrations"
55
+ />
56
+ </span>
57
+ <span> ({cca_adaptation_gallery.length}) </span>
58
+ <Icon className="ri-image-fill" />
59
+ </div>
60
+ <ImageGallery
61
+ items={cca_adaptation_gallery}
62
+ propOpen={open}
63
+ setPropOpen={setOpen}
64
+ propSlideIndex={slideIndex}
65
+ setPropSlideIndex={setSlideIndex}
66
+ />
67
+ </div>
68
+ )}
69
+ </>
70
+ );
71
+ };
72
+
21
73
  function AdaptationOptionView(props) {
22
74
  const intl = useIntl();
23
75
  const { content = {} } = props;
@@ -39,6 +91,7 @@ function AdaptationOptionView(props) {
39
91
  implementation_time,
40
92
  related_case_studies,
41
93
  show_related_resources,
94
+ cca_adaptation_gallery,
42
95
  stakeholder_participation,
43
96
  relevant_eu_policies_items,
44
97
  } = content;
@@ -293,12 +346,14 @@ function AdaptationOptionView(props) {
293
346
  computer={4}
294
347
  className="col-right"
295
348
  >
296
- {image && (
297
- <Image
298
- src={content.image?.scales?.large?.download}
299
- className="preview-image"
300
- />
301
- )}
349
+ <PhotoGallery {...props} />
350
+ {!cca_adaptation_gallery?.length &&
351
+ image?.scales?.large?.download && (
352
+ <Image
353
+ src={image?.scales?.large?.download}
354
+ className="preview-image"
355
+ />
356
+ )}
302
357
  <ContentMetadata
303
358
  {...props}
304
359
  related_case_studies={related_case_studies}
@@ -229,6 +229,14 @@ const PhotoGallery = ({ content }) => {
229
229
  setSlideIndex(0);
230
230
  setOpen(true);
231
231
  };
232
+
233
+ const handleKeyDown = (e) => {
234
+ if (e.key === 'Enter' || e.key === ' ') {
235
+ e.preventDefault();
236
+ handleTitleClick();
237
+ }
238
+ };
239
+
232
240
  return (
233
241
  <>
234
242
  {cca_gallery && cca_gallery.length > 0 && (
@@ -238,7 +246,7 @@ const PhotoGallery = ({ content }) => {
238
246
  tabIndex={0}
239
247
  role="button"
240
248
  onClick={handleTitleClick}
241
- onKeyDown={handleTitleClick}
249
+ onKeyDown={handleKeyDown}
242
250
  >
243
251
  <span>
244
252
  <FormattedMessage
@@ -247,9 +247,7 @@ const UnconnectedImageInput = (props) => {
247
247
  }
248
248
 
249
249
  const dataUrl = await readBlobAsDataURL(blob);
250
- const filenameFromUrl = getFilenameFromUrl(url, fallbackFilename);
251
-
252
- setFileValueFromDataUrl(dataUrl, filenameFromUrl);
250
+ setFileValueFromDataUrl(dataUrl, fallbackFilename);
253
251
  } catch (e) {
254
252
  setError(intl.formatMessage(messages.imageImportFailed));
255
253
  } finally {
@@ -421,9 +421,9 @@ iframe {
421
421
  padding: 0.7rem;
422
422
  margin-top: 0 !important;
423
423
  margin-bottom: 1.5em !important;
424
- background-color: #f9f9f9;
424
+ background-color: @ccaYellowColor;
425
425
  box-shadow:
426
- 0px 0px 0px 1px #d2d2d2 inset,
426
+ 0px 0px 0px 1px #e1d098 inset,
427
427
  0px 0px 0px 0px rgba(0, 0, 0, 0);
428
428
 
429
429
  p,
@@ -12,6 +12,7 @@
12
12
  @secondaryColor: #005c97;
13
13
  @ccaGreenColor: #8a9c39;
14
14
  @ccaOrangeColor: #ef7000;
15
+ @ccaYellowColor: #f3e2ab;
15
16
 
16
17
  @linkColor: #006bb8;
17
18
  @linkHoverColor: #004b7f;
@@ -256,7 +256,7 @@ hr {
256
256
  font-size: 0.9rem;
257
257
 
258
258
  &.warning {
259
- background: #f3e2ab;
259
+ background: @ccaYellowColor;
260
260
  }
261
261
 
262
262
  &.info {