@eeacms/volto-cca-policy 0.3.19 → 0.3.21
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,22 @@ 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.21](https://github.com/eea/volto-cca-policy/compare/0.3.20...0.3.21) - 26 March 2025
|
|
8
|
+
|
|
9
|
+
#### :rocket: Dependency updates
|
|
10
|
+
|
|
11
|
+
- Release @eeacms/volto-searchlib@2.0.14 [EEA Jenkins - [`c6f5a6f`](https://github.com/eea/volto-cca-policy/commit/c6f5a6f72b2c15c59a55aead92c721e985f459f6)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Pin @eeacms/volto-eea-design-system [kreafox - [`2885afc`](https://github.com/eea/volto-cca-policy/commit/2885afc586b5b67002248a479f03a7d40a158e3b)]
|
|
16
|
+
- Update dependencies [kreafox - [`6df47a4`](https://github.com/eea/volto-cca-policy/commit/6df47a49665a72a2c587815628c1793dd67aafb0)]
|
|
17
|
+
### [0.3.20](https://github.com/eea/volto-cca-policy/compare/0.3.19...0.3.20) - 25 March 2025
|
|
18
|
+
|
|
19
|
+
#### :rocket: New Features
|
|
20
|
+
|
|
21
|
+
- feat: refs #285888 make case study header click open image carousel [laszlocseh - [`9bdf161`](https://github.com/eea/volto-cca-policy/commit/9bdf1615b0120cb22be342c4cb4396c4a81c39dc)]
|
|
22
|
+
|
|
7
23
|
### [0.3.19](https://github.com/eea/volto-cca-policy/compare/0.3.18...0.3.19) - 21 March 2025
|
|
8
24
|
|
|
9
25
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-cca-policy",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
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",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@eeacms/volto-block-style": "github:eea/volto-block-style#6.x.x",
|
|
31
31
|
"@eeacms/volto-datablocks": "^7.2.5",
|
|
32
|
-
"@eeacms/volto-eea-design-system": "
|
|
32
|
+
"@eeacms/volto-eea-design-system": "<=1.36.3",
|
|
33
33
|
"@eeacms/volto-eea-website-theme": "^1.35.0",
|
|
34
34
|
"@eeacms/volto-embed": "^9.1.1",
|
|
35
|
-
"@eeacms/volto-globalsearch": "2.0.
|
|
35
|
+
"@eeacms/volto-globalsearch": "2.0.10",
|
|
36
36
|
"@eeacms/volto-hero-block": "^7.1.0",
|
|
37
37
|
"@eeacms/volto-openlayers-map": "*",
|
|
38
|
-
"@eeacms/volto-searchlib": "2.0.
|
|
38
|
+
"@eeacms/volto-searchlib": "2.0.14",
|
|
39
39
|
"@eeacms/volto-slate-label": "^0.6.0",
|
|
40
40
|
"@eeacms/volto-tabs-block": "^7.5.1",
|
|
41
41
|
"@elastic/search-ui": "1.21.2",
|
|
@@ -10,10 +10,27 @@ import './styles.less';
|
|
|
10
10
|
const Slider = loadable(() => import('react-slick'));
|
|
11
11
|
|
|
12
12
|
const ImageGallery = (props) => {
|
|
13
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
items = [],
|
|
15
|
+
propOpen,
|
|
16
|
+
setPropOpen,
|
|
17
|
+
propSlideIndex,
|
|
18
|
+
setPropSlideIndex,
|
|
19
|
+
} = props;
|
|
20
|
+
// if state is managed from an external component then use the external state
|
|
21
|
+
// else use the local one
|
|
22
|
+
const [localOpen, setLocalOpen] = React.useState(false);
|
|
23
|
+
const open = propOpen === undefined ? localOpen : propOpen;
|
|
24
|
+
const setOpen = propOpen === undefined ? setLocalOpen : setPropOpen;
|
|
25
|
+
|
|
26
|
+
// if state is managed from an external component then use the external state
|
|
27
|
+
// else use the local one
|
|
28
|
+
const [localSlideIndex, setLocalSlideIndex] = React.useState(0);
|
|
29
|
+
const slideIndex =
|
|
30
|
+
propSlideIndex === undefined ? localSlideIndex : propSlideIndex;
|
|
31
|
+
const setSlideIndex =
|
|
32
|
+
propSlideIndex === undefined ? setLocalSlideIndex : setPropSlideIndex;
|
|
14
33
|
|
|
15
|
-
const [open, setOpen] = React.useState(false);
|
|
16
|
-
const [slideIndex, setSlideIndex] = React.useState(0);
|
|
17
34
|
const [updateCount, setUpdateCount] = React.useState(0);
|
|
18
35
|
const sliderRef = React.useRef(null);
|
|
19
36
|
|
|
@@ -32,7 +49,7 @@ const ImageGallery = (props) => {
|
|
|
32
49
|
useTransform: false,
|
|
33
50
|
initialSlide: slideIndex,
|
|
34
51
|
}),
|
|
35
|
-
[slideIndex, updateCount],
|
|
52
|
+
[slideIndex, setSlideIndex, updateCount],
|
|
36
53
|
);
|
|
37
54
|
|
|
38
55
|
const handleClick = () => {
|
|
@@ -222,11 +222,24 @@ export const sectionID = (title) => findSection(title)?.section || title;
|
|
|
222
222
|
const PhotoGallery = ({ content }) => {
|
|
223
223
|
const { cca_gallery } = content;
|
|
224
224
|
|
|
225
|
+
const [open, setOpen] = React.useState(false);
|
|
226
|
+
const [slideIndex, setSlideIndex] = React.useState(0);
|
|
227
|
+
|
|
228
|
+
const handleTitleClick = () => {
|
|
229
|
+
setSlideIndex(0);
|
|
230
|
+
setOpen(true);
|
|
231
|
+
};
|
|
225
232
|
return (
|
|
226
233
|
<>
|
|
227
234
|
{cca_gallery && cca_gallery.length > 0 && (
|
|
228
235
|
<div className="case-study-gallery">
|
|
229
|
-
<div
|
|
236
|
+
<div
|
|
237
|
+
className="gallery-title"
|
|
238
|
+
tabIndex={0}
|
|
239
|
+
role="button"
|
|
240
|
+
onClick={handleTitleClick}
|
|
241
|
+
onKeyDown={handleTitleClick}
|
|
242
|
+
>
|
|
230
243
|
<span>
|
|
231
244
|
<FormattedMessage
|
|
232
245
|
id="Case Study illustrations"
|
|
@@ -236,7 +249,13 @@ const PhotoGallery = ({ content }) => {
|
|
|
236
249
|
<span> ({cca_gallery.length}) </span>
|
|
237
250
|
<Icon className="ri-image-fill" />
|
|
238
251
|
</div>
|
|
239
|
-
<ImageGallery
|
|
252
|
+
<ImageGallery
|
|
253
|
+
items={cca_gallery}
|
|
254
|
+
propOpen={open}
|
|
255
|
+
setPropOpen={setOpen}
|
|
256
|
+
propSlideIndex={slideIndex}
|
|
257
|
+
setPropSlideIndex={setSlideIndex}
|
|
258
|
+
/>
|
|
240
259
|
</div>
|
|
241
260
|
)}
|
|
242
261
|
</>
|