@eeacms/volto-cca-policy 0.3.95 → 0.3.97
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,28 @@ 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.97](https://github.com/eea/volto-cca-policy/compare/0.3.96...0.3.97) - 12 January 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: resolve alignment issue in slate box [kreafox - [`7ea9046`](https://github.com/eea/volto-cca-policy/commit/7ea9046c36cfd1f64f0249dcfd7c138ede887412)]
|
|
12
|
+
|
|
13
|
+
### [0.3.96](https://github.com/eea/volto-cca-policy/compare/0.3.95...0.3.96) - 19 December 2025
|
|
14
|
+
|
|
15
|
+
#### :bug: Bug Fixes
|
|
16
|
+
|
|
17
|
+
- fix: render of reference info [kreafox - [`8d339d5`](https://github.com/eea/volto-cca-policy/commit/8d339d504c3c9871841d8585e9bfd7b2eacd4118)]
|
|
18
|
+
- fix: add missing reference info in DatabaseItemView [kreafox - [`7493d25`](https://github.com/eea/volto-cca-policy/commit/7493d256385f9209c87dca845d4acffcb5cfbe13)]
|
|
19
|
+
|
|
20
|
+
#### :nail_care: Enhancements
|
|
21
|
+
|
|
22
|
+
- refactor: code improvement [kreafox - [`a0fd02e`](https://github.com/eea/volto-cca-policy/commit/a0fd02e2abb9054818dd4b6f6760c88e2e5897a2)]
|
|
23
|
+
- change: update DatabaseItemView for full-width visualization - refs #295722 [kreafox - [`0be2939`](https://github.com/eea/volto-cca-policy/commit/0be2939ee02cafca9d2bf32a6fa49888d7cbcad6)]
|
|
24
|
+
|
|
25
|
+
#### :house: Internal changes
|
|
26
|
+
|
|
27
|
+
- style: CSS cleanup [kreafox - [`f183f72`](https://github.com/eea/volto-cca-policy/commit/f183f720afa0291c5ff4f3d3f879e32b5d04b896)]
|
|
28
|
+
|
|
7
29
|
### [0.3.95](https://github.com/eea/volto-cca-policy/compare/0.3.94...0.3.95) - 18 December 2025
|
|
8
30
|
|
|
9
31
|
#### :house: Internal changes
|
package/package.json
CHANGED
|
@@ -33,7 +33,17 @@ import {
|
|
|
33
33
|
BannerTitle,
|
|
34
34
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const SHARE_EEA = ['https://cmshare.eea.eu', 'shareit.eea.europa.eu'];
|
|
37
|
+
|
|
38
|
+
const SUBTITLES = {
|
|
39
|
+
[TOOL]: 'Tools',
|
|
40
|
+
[PUBLICATION_REPORT]: 'Publications and Report',
|
|
41
|
+
[GUIDANCE]: 'Guidance Document',
|
|
42
|
+
[INDICATOR]: 'Indicator',
|
|
43
|
+
[INFORMATION_PORTAL]: 'Information Portal',
|
|
44
|
+
[ORGANISATION]: 'Organisation',
|
|
45
|
+
[VIDEO]: 'Video',
|
|
46
|
+
};
|
|
37
47
|
|
|
38
48
|
const MaybeFlourishVisualization = ({ content }) => {
|
|
39
49
|
const { map_graphs } = content;
|
|
@@ -63,7 +73,6 @@ const MaybeFlourishVisualization = ({ content }) => {
|
|
|
63
73
|
|
|
64
74
|
function getFirstIframeSrc(htmlString) {
|
|
65
75
|
const iframeRegex = /<iframe[^>]+src=["']([^"']+)["']/;
|
|
66
|
-
|
|
67
76
|
const iframeMatch = htmlString.match(iframeRegex);
|
|
68
77
|
if (iframeMatch) {
|
|
69
78
|
return iframeMatch[1];
|
|
@@ -79,10 +88,8 @@ function getFirstIframeSrc(htmlString) {
|
|
|
79
88
|
|
|
80
89
|
const MaybeIframeVisualization = ({ content }) => {
|
|
81
90
|
const { map_graphs, map_graphs_height } = content;
|
|
82
|
-
|
|
83
91
|
const url = getFirstIframeSrc(map_graphs || '');
|
|
84
92
|
const height = map_graphs_height || 800;
|
|
85
|
-
|
|
86
93
|
const [isClient, setIsClient] = React.useState();
|
|
87
94
|
|
|
88
95
|
React.useEffect(() => setIsClient(true), []);
|
|
@@ -108,6 +115,47 @@ const MaybeIframeVisualization = ({ content }) => {
|
|
|
108
115
|
);
|
|
109
116
|
};
|
|
110
117
|
|
|
118
|
+
const BottomInfo = (props) => {
|
|
119
|
+
const { content } = props;
|
|
120
|
+
const { organisational_websites, organisational_contact_information } =
|
|
121
|
+
content;
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<>
|
|
125
|
+
<Divider />
|
|
126
|
+
<ReferenceInfo content={content} />
|
|
127
|
+
|
|
128
|
+
{organisational_websites && (
|
|
129
|
+
<>
|
|
130
|
+
<h5>
|
|
131
|
+
<FormattedMessage
|
|
132
|
+
id="Links to further information"
|
|
133
|
+
defaultMessage="Links to further information"
|
|
134
|
+
/>
|
|
135
|
+
</h5>
|
|
136
|
+
<HTMLField value={organisational_websites} />
|
|
137
|
+
</>
|
|
138
|
+
)}
|
|
139
|
+
|
|
140
|
+
{organisational_contact_information && (
|
|
141
|
+
<>
|
|
142
|
+
<h5>
|
|
143
|
+
<FormattedMessage
|
|
144
|
+
id="Contact information for the Observatory"
|
|
145
|
+
defaultMessage="Contact information for the Observatory"
|
|
146
|
+
/>
|
|
147
|
+
</h5>
|
|
148
|
+
<HTMLField value={organisational_contact_information} />
|
|
149
|
+
</>
|
|
150
|
+
)}
|
|
151
|
+
|
|
152
|
+
<ContentRelatedItems {...props} />
|
|
153
|
+
<PublishedModifiedInfo {...props} />
|
|
154
|
+
<ShareInfoButton {...props} />
|
|
155
|
+
</>
|
|
156
|
+
);
|
|
157
|
+
};
|
|
158
|
+
|
|
111
159
|
const DatabaseItemView = (props) => {
|
|
112
160
|
const { content } = props;
|
|
113
161
|
const type = content['@type'];
|
|
@@ -116,41 +164,16 @@ const DatabaseItemView = (props) => {
|
|
|
116
164
|
acronym,
|
|
117
165
|
embed_url,
|
|
118
166
|
long_description,
|
|
119
|
-
organisational_websites,
|
|
120
167
|
organisational_key_activities,
|
|
121
|
-
organisational_contact_information,
|
|
122
168
|
related_documents_presentations,
|
|
123
169
|
} = content;
|
|
124
170
|
const item_title = acronym ? title + ' (' + acronym + ')' : title;
|
|
171
|
+
const subtitle = SUBTITLES[type] ?? '';
|
|
172
|
+
const hasVisualization = !!content?.map_graphs?.length;
|
|
173
|
+
const isFullWidthVisualization =
|
|
174
|
+
hasVisualization && content?.map_graphs_full_width;
|
|
125
175
|
|
|
126
|
-
|
|
127
|
-
switch (type) {
|
|
128
|
-
case TOOL:
|
|
129
|
-
subtitle = 'Tools';
|
|
130
|
-
break;
|
|
131
|
-
case PUBLICATION_REPORT:
|
|
132
|
-
subtitle = 'Publications and Report';
|
|
133
|
-
break;
|
|
134
|
-
case GUIDANCE:
|
|
135
|
-
subtitle = 'Guidance Document';
|
|
136
|
-
break;
|
|
137
|
-
case INDICATOR:
|
|
138
|
-
subtitle = 'Indicator';
|
|
139
|
-
break;
|
|
140
|
-
case INFORMATION_PORTAL:
|
|
141
|
-
subtitle = 'Information Portal';
|
|
142
|
-
break;
|
|
143
|
-
case ORGANISATION:
|
|
144
|
-
subtitle = 'Organisation';
|
|
145
|
-
break;
|
|
146
|
-
case VIDEO:
|
|
147
|
-
subtitle = 'Video';
|
|
148
|
-
break;
|
|
149
|
-
default:
|
|
150
|
-
subtitle = '';
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const is_cmshare_video = share_eea.some((domain) =>
|
|
176
|
+
const is_cmshare_video = SHARE_EEA.some((domain) =>
|
|
154
177
|
content?.embed_url?.includes(domain),
|
|
155
178
|
);
|
|
156
179
|
|
|
@@ -173,54 +196,46 @@ const DatabaseItemView = (props) => {
|
|
|
173
196
|
<Container>
|
|
174
197
|
<PortalMessage content={content} />
|
|
175
198
|
<Grid columns="12">
|
|
176
|
-
<
|
|
199
|
+
<Grid.Row>
|
|
177
200
|
<Grid.Column
|
|
178
201
|
mobile={12}
|
|
179
202
|
tablet={12}
|
|
180
203
|
computer={8}
|
|
181
204
|
className="col-left"
|
|
182
205
|
>
|
|
183
|
-
<ItemLogo {...props}
|
|
206
|
+
<ItemLogo {...props} />
|
|
184
207
|
|
|
185
|
-
{type === VIDEO && (
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
</center>
|
|
201
|
-
</div>
|
|
202
|
-
)}
|
|
203
|
-
</>
|
|
208
|
+
{type === VIDEO && is_cmshare_video && (
|
|
209
|
+
<div className="video-wrapper">
|
|
210
|
+
<center>
|
|
211
|
+
<video
|
|
212
|
+
controls="controls"
|
|
213
|
+
preload="metadata"
|
|
214
|
+
width="100%"
|
|
215
|
+
height="480"
|
|
216
|
+
src={fixEmbedURL(embed_url, is_cmshare_video)}
|
|
217
|
+
type="video/mp4"
|
|
218
|
+
>
|
|
219
|
+
<track default kind="captions" srcLang="en" src="" />
|
|
220
|
+
</video>
|
|
221
|
+
</center>
|
|
222
|
+
</div>
|
|
204
223
|
)}
|
|
205
224
|
|
|
206
225
|
<HTMLField value={long_description} />
|
|
207
226
|
|
|
208
|
-
{type === VIDEO && (
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
id="See video outside Climate-ADAPT"
|
|
217
|
-
defaultMessage="See video outside Climate-ADAPT"
|
|
218
|
-
/>
|
|
219
|
-
}
|
|
227
|
+
{type === VIDEO && !is_cmshare_video && (
|
|
228
|
+
<div className="external-video">
|
|
229
|
+
<ExternalLink
|
|
230
|
+
url={embed_url}
|
|
231
|
+
text={
|
|
232
|
+
<FormattedMessage
|
|
233
|
+
id="See video outside Climate-ADAPT"
|
|
234
|
+
defaultMessage="See video outside Climate-ADAPT"
|
|
220
235
|
/>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
236
|
+
}
|
|
237
|
+
/>
|
|
238
|
+
</div>
|
|
224
239
|
)}
|
|
225
240
|
|
|
226
241
|
{related_documents_presentations && (
|
|
@@ -248,40 +263,14 @@ const DatabaseItemView = (props) => {
|
|
|
248
263
|
</>
|
|
249
264
|
)}
|
|
250
265
|
|
|
251
|
-
|
|
252
|
-
<MaybeIframeVisualization {...props} />
|
|
253
|
-
|
|
254
|
-
<Divider />
|
|
255
|
-
|
|
256
|
-
<ReferenceInfo content={content} />
|
|
257
|
-
|
|
258
|
-
{organisational_websites && (
|
|
259
|
-
<>
|
|
260
|
-
<h5>
|
|
261
|
-
<FormattedMessage
|
|
262
|
-
id="Links to further information"
|
|
263
|
-
defaultMessage="Links to further information"
|
|
264
|
-
/>
|
|
265
|
-
</h5>
|
|
266
|
-
<HTMLField value={organisational_websites} />
|
|
267
|
-
</>
|
|
268
|
-
)}
|
|
269
|
-
|
|
270
|
-
{organisational_contact_information && (
|
|
266
|
+
{hasVisualization && !isFullWidthVisualization && (
|
|
271
267
|
<>
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
id="Contact information for the Observatory"
|
|
275
|
-
defaultMessage="Contact information for the Observatory"
|
|
276
|
-
/>
|
|
277
|
-
</h5>
|
|
278
|
-
<HTMLField value={organisational_contact_information} />
|
|
268
|
+
<MaybeFlourishVisualization {...props} />
|
|
269
|
+
<MaybeIframeVisualization {...props} />
|
|
279
270
|
</>
|
|
280
271
|
)}
|
|
281
272
|
|
|
282
|
-
<
|
|
283
|
-
<PublishedModifiedInfo {...props} />
|
|
284
|
-
<ShareInfoButton {...props} />
|
|
273
|
+
{!isFullWidthVisualization && <BottomInfo {...props} />}
|
|
285
274
|
</Grid.Column>
|
|
286
275
|
|
|
287
276
|
<Grid.Column
|
|
@@ -293,7 +282,28 @@ const DatabaseItemView = (props) => {
|
|
|
293
282
|
<ContentMetadata {...props} />
|
|
294
283
|
<DocumentsList {...props} />
|
|
295
284
|
</Grid.Column>
|
|
296
|
-
</
|
|
285
|
+
</Grid.Row>
|
|
286
|
+
|
|
287
|
+
{isFullWidthVisualization && (
|
|
288
|
+
<>
|
|
289
|
+
<Grid.Row>
|
|
290
|
+
<Grid.Column mobile={12} tablet={12} computer={12}>
|
|
291
|
+
<MaybeFlourishVisualization {...props} />
|
|
292
|
+
<MaybeIframeVisualization {...props} />
|
|
293
|
+
</Grid.Column>
|
|
294
|
+
</Grid.Row>
|
|
295
|
+
<Grid.Row>
|
|
296
|
+
<Grid.Column
|
|
297
|
+
mobile={12}
|
|
298
|
+
tablet={12}
|
|
299
|
+
computer={12}
|
|
300
|
+
className="col-left"
|
|
301
|
+
>
|
|
302
|
+
<BottomInfo {...props} />
|
|
303
|
+
</Grid.Column>
|
|
304
|
+
</Grid.Row>
|
|
305
|
+
</>
|
|
306
|
+
)}
|
|
297
307
|
</Grid>
|
|
298
308
|
</Container>
|
|
299
309
|
</div>
|
|
@@ -94,6 +94,14 @@
|
|
|
94
94
|
padding-left: 1rem;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
// Fix alignment issue in slate box
|
|
98
|
+
.sidebar-container {
|
|
99
|
+
.slate_wysiwyg_box {
|
|
100
|
+
display: grid;
|
|
101
|
+
align-items: center;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
97
105
|
/* Tabs block */
|
|
98
106
|
.cca-main-homepage .tabs-block {
|
|
99
107
|
.ui.menu.vertical .item,
|