@eeacms/volto-cca-policy 0.3.110 → 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,17 @@ 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
+
7
18
  ### [0.3.110](https://github.com/eea/volto-cca-policy/compare/0.3.109...0.3.110) - 8 April 2026
8
19
 
9
20
  #### :bug: Bug Fixes
@@ -155,7 +166,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
155
166
 
156
167
  #### :house: Internal changes
157
168
 
158
- - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`e901251`](https://github.com/eea/volto-cca-policy/commit/e901251592eb54609fbc7eb8fcf7bd452c2da9cd)]
159
169
 
160
170
  ### [0.3.102](https://github.com/eea/volto-cca-policy/compare/0.3.101...0.3.102) - 24 February 2026
161
171
 
@@ -165,7 +175,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
165
175
 
166
176
  #### :house: Internal changes
167
177
 
168
- - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`8b3699a`](https://github.com/eea/volto-cca-policy/commit/8b3699a6cbaef662b5e80884ac2c1f7dc9c6591e)]
169
178
 
170
179
  ### [0.3.101](https://github.com/eea/volto-cca-policy/compare/0.3.100...0.3.101) - 28 January 2026
171
180
 
@@ -453,7 +462,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
453
462
  - style: fix item spacing [kreafox - [`7d4535d`](https://github.com/eea/volto-cca-policy/commit/7d4535dbc486e6cb80fc55d6ac8c7c01d9cf48af)]
454
463
  - chore: code cleanup [kreafox - [`842419b`](https://github.com/eea/volto-cca-policy/commit/842419b1bce3dc624755c81c9dea672198cab9e2)]
455
464
  - style: update teaser block styling [kreafox - [`1e0cad8`](https://github.com/eea/volto-cca-policy/commit/1e0cad8e1ed3ae827ee868dce8ad50b292a937ba)]
456
- - chore: update Makefile, run yarn i18n [kreafox - [`61e6962`](https://github.com/eea/volto-cca-policy/commit/61e6962901068ae6512265417a730bd9befd65fe)]
457
465
  - chore: move styling to theme folder [kreafox - [`8cf6a1b`](https://github.com/eea/volto-cca-policy/commit/8cf6a1b8b14abf472a9c61b28db574f6d9e0bd3b)]
458
466
  - chore: remove ArrayWidget customization [kreafox - [`249bf93`](https://github.com/eea/volto-cca-policy/commit/249bf93054f7726c3d57a8b8ca01b75cd0d30522)]
459
467
  - chore: remove Footer customization [kreafox - [`7038af3`](https://github.com/eea/volto-cca-policy/commit/7038af37d48a328dfc31746f3fa84973e2f840ab)]
@@ -3216,13 +3224,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3216
3224
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
3217
3225
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
3218
3226
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
3219
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
3220
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
3221
3227
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
3222
3228
 
3223
3229
  #### :house: Internal changes
3224
3230
 
3225
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
3226
3231
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
3227
3232
 
3228
3233
  #### :hammer_and_wrench: Others
@@ -3239,9 +3244,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3239
3244
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
3240
3245
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
3241
3246
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
3242
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
3243
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
3244
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
3245
3247
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
3246
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)]
3247
3249
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -3458,7 +3460,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3458
3460
 
3459
3461
  #### :house: Internal changes
3460
3462
 
3461
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
3462
3463
 
3463
3464
  #### :hammer_and_wrench: Others
3464
3465
 
@@ -3939,7 +3940,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3939
3940
  #### :hammer_and_wrench: Others
3940
3941
 
3941
3942
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
3942
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
3943
3943
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
3944
3944
 
3945
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.110",
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