@eeacms/volto-bise-policy 1.2.29 → 1.2.31

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,25 @@ 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
+ ### [1.2.31](https://github.com/eea/volto-bise-policy/compare/1.2.30...1.2.31) - 28 November 2025
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: SimpleDataTable schema [laszlocseh - [`8c71dd0`](https://github.com/eea/volto-bise-policy/commit/8c71dd0a1946203dc5b20d7ea14d9e11a4944e69)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - test: enable sonarqube test [laszlocseh - [`2d7705f`](https://github.com/eea/volto-bise-policy/commit/2d7705fc3ee3da7071c9755cee1dd2d8453b2616)]
16
+ ### [1.2.30](https://github.com/eea/volto-bise-policy/compare/1.2.29...1.2.30) - 7 November 2025
17
+
18
+ #### :rocket: New Features
19
+
20
+ - feat: update EUNIS marine habitat widgets [laszlocseh - [`702fe69`](https://github.com/eea/volto-bise-policy/commit/702fe69ff8d69c6bd7c130bb12fd57f346b534fd)]
21
+
22
+ #### :house: Internal changes
23
+
24
+ - style: Automated code fix [eea-jenkins - [`e880e27`](https://github.com/eea/volto-bise-policy/commit/e880e27804d16e394b3d5fc9ced17168a68157bf)]
25
+
7
26
  ### [1.2.29](https://github.com/eea/volto-bise-policy/compare/1.2.28...1.2.29) - 5 November 2025
8
27
 
9
28
  #### :rocket: New Features
@@ -172,7 +191,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
172
191
  - chore: customize root theme to use volto-spotlight - refs #259794 [ana-oprea - [`347f96e`](https://github.com/eea/volto-bise-policy/commit/347f96e335139f9656abd34c308c531b05de85e7)]
173
192
  - chore: change the theme and alias to volto-spotlight and add volto-spotlight to package.json - refs #259794 [ana-oprea - [`52732a1`](https://github.com/eea/volto-bise-policy/commit/52732a17b3247a04ffae0a3f5118e173afa98157)]
174
193
  - chore: change theme to eea-volto-theme, change config.alias - refs #259794 [ana-oprea - [`c2d08ea`](https://github.com/eea/volto-bise-policy/commit/c2d08ea08a7f0e5f6f7d32149e60ea3f3e901923)]
175
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`a3c9488`](https://github.com/eea/volto-bise-policy/commit/a3c9488c5d09ba97fe5976675524d436080a2460)]
176
194
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`fddc30f`](https://github.com/eea/volto-bise-policy/commit/fddc30f11a1d8ec290edaca2d924282f5e113bc6)]
177
195
  - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`005ce74`](https://github.com/eea/volto-bise-policy/commit/005ce742dbd014fde27e417059251233365766dd)]
178
196
 
@@ -185,17 +203,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
185
203
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c1277ba`](https://github.com/eea/volto-bise-policy/commit/c1277bacf840ee9feccbfd6a2c85f0b25a9a9125)]
186
204
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c944153`](https://github.com/eea/volto-bise-policy/commit/c944153710fd53c5d48863cf363464273e25f52e)]
187
205
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`d648d52`](https://github.com/eea/volto-bise-policy/commit/d648d525a2fc5076577fe0f75ff9782bf0d1d4e9)]
188
- - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`2a7affe`](https://github.com/eea/volto-bise-policy/commit/2a7affe33d737704bdba117c4a5c8c6748ef7a47)]
189
- - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`5929642`](https://github.com/eea/volto-bise-policy/commit/59296420105d0e8c1f1547aa0cd17a019e478c2b)]
190
- - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`b1142f1`](https://github.com/eea/volto-bise-policy/commit/b1142f1da3667a9f56720f65bebce897a5dd8005)]
191
206
  - test: cypress should not wait for navigation, actions, types - refs #259794 [ana-oprea - [`188637c`](https://github.com/eea/volto-bise-policy/commit/188637c78a0cae71b5ee48022507d559dfaceb3e)]
192
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`fa4e473`](https://github.com/eea/volto-bise-policy/commit/fa4e473018386ec3f09d7300d655c8cccdc19a0e)]
193
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`1d9135b`](https://github.com/eea/volto-bise-policy/commit/1d9135bb878b3c7a1b828085b99b9d27d78ce60e)]
194
207
  - remove cypress tests as it doesn t work on bise [Dobricean Ioan Dorian - [`ba7e2de`](https://github.com/eea/volto-bise-policy/commit/ba7e2defea2dcfd01537c3abb41fa9515ff0a3e3)]
195
208
  - add mega menu layout settings as #259794 said [dobri1408 - [`b9a3683`](https://github.com/eea/volto-bise-policy/commit/b9a3683e7d85f8c88ad8feac975c47c434f62c4a)]
196
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`9181908`](https://github.com/eea/volto-bise-policy/commit/9181908c7f4b51bdf83a34f8c7f25827de9b1cc6)]
197
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`099d796`](https://github.com/eea/volto-bise-policy/commit/099d79669471e6924bf1e0bc51a79d54379c3a1a)]
198
- - test: [JENKINS] Improve cypress time [valentinab25 - [`6d5d8e2`](https://github.com/eea/volto-bise-policy/commit/6d5d8e29b04ddb92628245570055067ca3dcbb6c)]
199
209
  - test: fix comment [valentinab25 - [`4f27d5a`](https://github.com/eea/volto-bise-policy/commit/4f27d5af2e8895c7af4f1157521ca42682b96e23)]
200
210
  - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c2fcb0`](https://github.com/eea/volto-bise-policy/commit/4c2fcb01065e1ef962317ba7be788fd1df079618)]
201
211
  - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`89afaa1`](https://github.com/eea/volto-bise-policy/commit/89afaa15892930452027ef8c8593fc6d193cda70)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-bise-policy",
3
- "version": "1.2.29",
3
+ "version": "1.2.31",
4
4
  "description": "@eeacms/volto-bise-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -251,6 +251,22 @@ export const EUNISMSFDView = ({ value }) => {
251
251
  );
252
252
  };
253
253
 
254
+ export const EUNISCodeView = ({ value }) => {
255
+ if (!value) return value;
256
+
257
+ return (
258
+ <span>
259
+ <a
260
+ href={`/habitats_eunis_revised/EUNISrev_${value}`}
261
+ target="_blank"
262
+ rel="noopener"
263
+ >
264
+ {value}
265
+ </a>
266
+ </span>
267
+ );
268
+ };
269
+
254
270
  export const EUNISHDView = ({ value }) => {
255
271
  let parsedValue = value;
256
272
 
@@ -279,7 +295,62 @@ export const EUNISHDView = ({ value }) => {
279
295
  <a href={item.link}>{item.value}</a>
280
296
  </>
281
297
  ) : (
282
- `${item.relation}${item.value}`
298
+ <>
299
+ <span>{item.relation}</span>
300
+ <a
301
+ href={`/habitats/ANNEX1_${item.value}`}
302
+ target="_blank"
303
+ rel="noopener"
304
+ >
305
+ {item.value}
306
+ </a>
307
+ </>
308
+ )}
309
+ </div>
310
+ </div>
311
+ ))}
312
+ </div>
313
+ );
314
+ };
315
+
316
+ export const EUNISEuropeanRedListView = ({ value }) => {
317
+ let parsedValue = value;
318
+
319
+ if (typeof value === 'string') {
320
+ try {
321
+ parsedValue = JSON.parse(value);
322
+ } catch (e) {
323
+ return null;
324
+ }
325
+ }
326
+
327
+ const items = Array.isArray(parsedValue)
328
+ ? parsedValue
329
+ : parsedValue?.value || [];
330
+
331
+ if (!items || items.length === 0) return null;
332
+
333
+ return (
334
+ <div className="eunis-widget-view">
335
+ {items.map((item) => (
336
+ <div key={item['@id']} className="msfd-item">
337
+ <div>
338
+ {item.link ? (
339
+ <>
340
+ <span>{item.relation}</span>
341
+ <a href={item.link}>{item.value}</a>
342
+ </>
343
+ ) : (
344
+ <>
345
+ <span>{item.relation}</span>
346
+ <a
347
+ href={`/habitats_rl/REDLIST_${item.value.split(' - ')[1]}`}
348
+ target="_blank"
349
+ rel="noopener"
350
+ >
351
+ {item.value}
352
+ </a>
353
+ </>
283
354
  )}
284
355
  </div>
285
356
  </div>
@@ -315,7 +386,15 @@ export const EUNISLinksToFinerEUNISHabitatsView = ({ value }) => {
315
386
  <a href={item.link}>{item.value}</a>
316
387
  </>
317
388
  ) : (
318
- `${item.value}`
389
+ <>
390
+ <a
391
+ href={`/habitats_eunis_revised/EUNISrev_${item.value}`}
392
+ target="_blank"
393
+ rel="noopener"
394
+ >
395
+ {item.value}
396
+ </a>
397
+ </>
319
398
  )}
320
399
  </div>
321
400
  </div>
@@ -360,7 +439,6 @@ export const EUNISCountryCodeView = ({ value }) => {
360
439
  ));
361
440
  };
362
441
 
363
- export const EUNISEuropeanRedListView = EUNISHDView;
364
442
  export const EUNISRegionalSeaConventionValueView = EUNISMSFDView;
365
443
 
366
444
  const msfdSchema = {
@@ -397,7 +475,7 @@ const hdSchema = {
397
475
  {
398
476
  id: 'default',
399
477
  title: 'default',
400
- fields: ['relation', 'value', 'link'],
478
+ fields: ['relation', 'value'],
401
479
  },
402
480
  ],
403
481
  properties: {
@@ -429,7 +507,7 @@ const europeanRedlistSchema = {
429
507
  {
430
508
  id: 'default',
431
509
  title: 'default',
432
- fields: ['relation', 'value', 'link'],
510
+ fields: ['relation', 'value'],
433
511
  },
434
512
  ],
435
513
  properties: {
@@ -462,7 +540,7 @@ const linksToFinerEUNISHabitatsSchema = {
462
540
  {
463
541
  id: 'default',
464
542
  title: 'default',
465
- fields: ['value', 'link'],
543
+ fields: ['value'],
466
544
  },
467
545
  ],
468
546
  properties: {
@@ -72,10 +72,18 @@ class Edit extends Component {
72
72
  const choices = Array.from(
73
73
  Object.keys(provider_data).sort((a, b) => a - b),
74
74
  ).map((n) => [n, n]);
75
- schema.properties.columns.schemaExtender = (schema) => {
76
- schema.properties.column.choices = choices;
77
- schema.properties.column_link.choices = choices;
78
- return schema;
75
+
76
+ const originalExtender = schema.properties.columns.schemaExtender;
77
+
78
+ schema.properties.columns.schemaExtender = (schema, child) => {
79
+ // First, apply the original schemaExtender
80
+ const extendedSchema = originalExtender(schema, child, this.props.intl);
81
+
82
+ // Then apply customizations
83
+ extendedSchema.properties.column.choices = choices;
84
+ extendedSchema.properties.column_link.choices = choices;
85
+
86
+ return extendedSchema;
79
87
  };
80
88
 
81
89
  return schema;
package/src/index.js CHANGED
@@ -11,6 +11,7 @@ import biseWhiteLogo from '@eeacms/volto-bise-policy/../theme/assets/images/Head
11
11
  import ecLogo from '@eeacms/volto-bise-policy/../theme/assets/logos/logo-ec.svg';
12
12
 
13
13
  import {
14
+ EUNISCodeView,
14
15
  EUNISMSFDWidget,
15
16
  EUNISMSFDView,
16
17
  EUNISHDWidget,
@@ -254,6 +255,7 @@ const applyConfig = (config) => {
254
255
  config.widgets.id.eunis_msfd_relevant_classification_json = EUNISMSFDWidget;
255
256
  config.widgets.views.id.eunis_msfd_relevant_classification_json =
256
257
  EUNISMSFDView;
258
+ config.widgets.views.id.eunis_code = EUNISCodeView;
257
259
 
258
260
  return config;
259
261
  };