@eeacms/volto-bise-policy 1.3.6 → 1.3.7

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,21 @@ 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.3.7](https://github.com/eea/volto-bise-policy/compare/1.3.6...1.3.7) - 20 August 2026
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add Country Profile variation with CountryFlag banner [Claudia Ifrim - [`baff0b6`](https://github.com/eea/volto-bise-policy/commit/baff0b6d00b7c159b3520b89bcaaa3ba400d8d5b)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix: expand siblings on GET_CONTENT [Claudia Ifrim - [`5e10b2d`](https://github.com/eea/volto-bise-policy/commit/5e10b2d05293f39e9f49673377fd72bb19791435)]
16
+ - fix: preserve extra item fields and store data on direct GET_NAVIGATION calls [Claudia Ifrim - [`d3352d8`](https://github.com/eea/volto-bise-policy/commit/d3352d897102c69155b0740c8f44096b89011630)]
17
+
18
+ #### :house: Internal changes
19
+
20
+ - style: Automated code fix [eea-jenkins - [`8a103af`](https://github.com/eea/volto-bise-policy/commit/8a103af9cf9905de5eeb3ea660a2b076cfa14002)]
21
+
7
22
  ### [1.3.6](https://github.com/eea/volto-bise-policy/compare/1.3.5...1.3.6) - 19 August 2026
8
23
 
9
24
  #### :rocket: New Features
@@ -51,6 +66,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
51
66
 
52
67
  #### :house: Internal changes
53
68
 
69
+ - chore: [JENKINSFILE] sanitize sonarqube command [valentinab25 - [`8e2dc1a`](https://github.com/eea/volto-bise-policy/commit/8e2dc1a14f3230f197f009a76bf87587724b6e3a)]
54
70
 
55
71
  #### :hammer_and_wrench: Others
56
72
 
@@ -154,6 +170,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
154
170
 
155
171
  #### :house: Internal changes
156
172
 
173
+ - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`4c2d75b`](https://github.com/eea/volto-bise-policy/commit/4c2d75bbf6dca47929c6613749169b40ed483985)]
174
+ - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`f99c622`](https://github.com/eea/volto-bise-policy/commit/f99c622726cfd711704f50218a2f1fe833974ec3)]
157
175
 
158
176
  #### :hammer_and_wrench: Others
159
177
 
@@ -416,6 +434,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
416
434
  - chore: customize root theme to use volto-spotlight - refs #259794 [ana-oprea - [`347f96e`](https://github.com/eea/volto-bise-policy/commit/347f96e335139f9656abd34c308c531b05de85e7)]
417
435
  - 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)]
418
436
  - chore: change theme to eea-volto-theme, change config.alias - refs #259794 [ana-oprea - [`c2d08ea`](https://github.com/eea/volto-bise-policy/commit/c2d08ea08a7f0e5f6f7d32149e60ea3f3e901923)]
437
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`a3c9488`](https://github.com/eea/volto-bise-policy/commit/a3c9488c5d09ba97fe5976675524d436080a2460)]
419
438
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`fddc30f`](https://github.com/eea/volto-bise-policy/commit/fddc30f11a1d8ec290edaca2d924282f5e113bc6)]
420
439
  - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`005ce74`](https://github.com/eea/volto-bise-policy/commit/005ce742dbd014fde27e417059251233365766dd)]
421
440
 
@@ -428,9 +447,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
428
447
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c1277ba`](https://github.com/eea/volto-bise-policy/commit/c1277bacf840ee9feccbfd6a2c85f0b25a9a9125)]
429
448
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c944153`](https://github.com/eea/volto-bise-policy/commit/c944153710fd53c5d48863cf363464273e25f52e)]
430
449
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`d648d52`](https://github.com/eea/volto-bise-policy/commit/d648d525a2fc5076577fe0f75ff9782bf0d1d4e9)]
450
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`2a7affe`](https://github.com/eea/volto-bise-policy/commit/2a7affe33d737704bdba117c4a5c8c6748ef7a47)]
451
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`5929642`](https://github.com/eea/volto-bise-policy/commit/59296420105d0e8c1f1547aa0cd17a019e478c2b)]
452
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`b1142f1`](https://github.com/eea/volto-bise-policy/commit/b1142f1da3667a9f56720f65bebce897a5dd8005)]
431
453
  - test: cypress should not wait for navigation, actions, types - refs #259794 [ana-oprea - [`188637c`](https://github.com/eea/volto-bise-policy/commit/188637c78a0cae71b5ee48022507d559dfaceb3e)]
454
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`fa4e473`](https://github.com/eea/volto-bise-policy/commit/fa4e473018386ec3f09d7300d655c8cccdc19a0e)]
455
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`1d9135b`](https://github.com/eea/volto-bise-policy/commit/1d9135bb878b3c7a1b828085b99b9d27d78ce60e)]
432
456
  - remove cypress tests as it doesn t work on bise [Dobricean Ioan Dorian - [`ba7e2de`](https://github.com/eea/volto-bise-policy/commit/ba7e2defea2dcfd01537c3abb41fa9515ff0a3e3)]
433
457
  - add mega menu layout settings as #259794 said [dobri1408 - [`b9a3683`](https://github.com/eea/volto-bise-policy/commit/b9a3683e7d85f8c88ad8feac975c47c434f62c4a)]
458
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`9181908`](https://github.com/eea/volto-bise-policy/commit/9181908c7f4b51bdf83a34f8c7f25827de9b1cc6)]
459
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`099d796`](https://github.com/eea/volto-bise-policy/commit/099d79669471e6924bf1e0bc51a79d54379c3a1a)]
460
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`6d5d8e2`](https://github.com/eea/volto-bise-policy/commit/6d5d8e29b04ddb92628245570055067ca3dcbb6c)]
434
461
  - test: fix comment [valentinab25 - [`4f27d5a`](https://github.com/eea/volto-bise-policy/commit/4f27d5af2e8895c7af4f1157521ca42682b96e23)]
435
462
  - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c2fcb0`](https://github.com/eea/volto-bise-policy/commit/4c2fcb01065e1ef962317ba7be788fd1df079618)]
436
463
  - 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.3.6",
3
+ "version": "1.3.7",
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",
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import config from '@plone/volto/registry';
3
+
4
+ const CountryProfileView = (props) => {
5
+ const defaultVariation = (
6
+ config.blocks.blocksConfig.title.variations || []
7
+ ).find((v) => v.isDefault);
8
+ const DefaultTemplate = defaultVariation?.view;
9
+ const CountryFlagView = config.blocks.blocksConfig?.countryFlag?.view;
10
+
11
+ if (!DefaultTemplate) return null;
12
+
13
+ const banner = CountryFlagView
14
+ ? {
15
+ ...(props.banner || {}),
16
+ title: {
17
+ view: (
18
+ <CountryFlagView {...props} path={props.path || props.pathname} />
19
+ ),
20
+ },
21
+ }
22
+ : props.banner;
23
+
24
+ return <DefaultTemplate {...props} banner={banner} />;
25
+ };
26
+
27
+ export default CountryProfileView;
@@ -0,0 +1,19 @@
1
+ import CountryProfileView from './CountryProfileView';
2
+ import { countryProfileSchemaEnhancer } from './schema';
3
+
4
+ export default function installTitleVariations(config) {
5
+ const titleBlock = config.blocks.blocksConfig.title;
6
+ if (!titleBlock) return config;
7
+
8
+ titleBlock.variations = [
9
+ ...(titleBlock.variations || []),
10
+ {
11
+ id: 'countryProfile',
12
+ title: 'Country Profile',
13
+ view: CountryProfileView,
14
+ schemaEnhancer: countryProfileSchemaEnhancer,
15
+ },
16
+ ];
17
+
18
+ return config;
19
+ }
@@ -0,0 +1,42 @@
1
+ import CountryFlagSchema from '@eeacms/volto-datablocks/components/manage/Blocks/CountryFlag/schema';
2
+ import countryNames from '@eeacms/volto-datablocks/components/manage/Blocks/CountryFlag/data/countries';
3
+
4
+ export const countryProfileSchemaEnhancer = ({ schema, intl }) => {
5
+ const cfSchema = CountryFlagSchema(intl);
6
+
7
+ cfSchema.properties.country_name.choices = Object.keys(countryNames).map(
8
+ (k) => [k, countryNames[k]],
9
+ );
10
+
11
+ schema.fieldsets.push(
12
+ {
13
+ id: 'countryFlag',
14
+ title: 'Country flag',
15
+ fields: [
16
+ 'country_name',
17
+ 'show_name',
18
+ 'show_flag',
19
+ 'show_dropdown',
20
+ 'render_as',
21
+ ],
22
+ },
23
+ {
24
+ id: 'dropdownItems',
25
+ title: 'Dropdown items',
26
+ fields: ['querystring', 'exclude'],
27
+ },
28
+ );
29
+
30
+ schema.properties = {
31
+ ...schema.properties,
32
+ country_name: cfSchema.properties.country_name,
33
+ show_name: cfSchema.properties.show_name,
34
+ show_flag: cfSchema.properties.show_flag,
35
+ show_dropdown: cfSchema.properties.show_dropdown,
36
+ render_as: cfSchema.properties.render_as,
37
+ querystring: cfSchema.properties.querystring,
38
+ exclude: cfSchema.properties.exclude,
39
+ };
40
+
41
+ return schema;
42
+ };
@@ -7,6 +7,7 @@ import installKeyFacts from './KeyFacts';
7
7
  import installMaesViewer from './MaesViewer';
8
8
  import installNavigation from './Navigation';
9
9
  import installCaseStudyExplorer from './CaseStudyExplorer';
10
+ import installTitleVariations from './Title';
10
11
 
11
12
  const config = (config) => {
12
13
  return [
@@ -19,6 +20,7 @@ const config = (config) => {
19
20
  installMaesViewer,
20
21
  installNavigation,
21
22
  installCaseStudyExplorer,
23
+ installTitleVariations,
22
24
  ].reduce((acc, apply) => apply(acc), config);
23
25
  };
24
26
 
@@ -28,9 +28,8 @@ const initialState = {
28
28
  */
29
29
  function getRecursiveItems(items) {
30
30
  return map(items, (item) => ({
31
- title: item.title,
32
- description: item.description,
33
31
  url: flattenToAppURL(item['@id']),
32
+ ...item,
34
33
  ...(item.items && { items: getRecursiveItems(item.items) }),
35
34
  }));
36
35
  }
@@ -71,11 +70,11 @@ export default function navigation(state = initialState, action = {}) {
71
70
  }
72
71
  return state;
73
72
  case `${GET_NAVIGATION}_SUCCESS`:
74
- hasExpander = hasApiExpander(
75
- 'navigation',
76
- getBaseUrl(flattenToAppURL(action.result['@id'])),
77
- );
78
- if (!hasExpander) {
73
+ // Even if the expander is set or not, if the GET_NAVIGATION is
74
+ // called, we want it to store the data if the actions data is
75
+ // not set in the expander data (['@components']) but in the "normal"
76
+ // action result (we look for the object property returned by the endpoint)
77
+ if (!action.result?.['@components'] && action.result?.items) {
79
78
  return {
80
79
  ...state,
81
80
  error: null,
package/src/index.js CHANGED
@@ -110,6 +110,17 @@ const applyConfig = (config) => {
110
110
  'nominatim.openstreetmap.org',
111
111
  ];
112
112
 
113
+ // Needed by the CountryFlag block to fall back to sibling items when it
114
+ // has no listing/query results (e.g. Title block's Country Profile
115
+ // variation).
116
+ config.settings.apiExpanders = [
117
+ ...(config.settings.apiExpanders || []),
118
+ {
119
+ match: '',
120
+ GET_CONTENT: ['siblings'],
121
+ },
122
+ ];
123
+
113
124
  // EEA customizations
114
125
  config.settings.eea = {
115
126
  ...(config.settings.eea || {}),