@eeacms/volto-bise-policy 1.2.36 → 1.2.38

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,11 +4,19 @@ 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.36](https://github.com/eea/volto-bise-policy/compare/1.2.35...1.2.36) - 3 February 2026
7
+ ### [1.2.38](https://github.com/eea/volto-bise-policy/compare/1.2.37...1.2.38) - 11 February 2026
8
8
 
9
- #### :bug: Bug Fixes
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - fix richtext widget view [nileshgulia1 - [`e4b1e25`](https://github.com/eea/volto-bise-policy/commit/e4b1e25e9430456367a2d3cb5026092a0054608f)]
12
+ ### [1.2.37](https://github.com/eea/volto-bise-policy/compare/1.2.36...1.2.37) - 4 February 2026
10
13
 
11
- - fix: accordion heading color for NRR CT [nileshgulia1 - [`cc69641`](https://github.com/eea/volto-bise-policy/commit/cc696413c032196bde20c0306f7fe9fd29344017)]
14
+ #### :hammer_and_wrench: Others
15
+
16
+ - Merge pull request #70 from eea/develop [Nilesh - [`b4d955d`](https://github.com/eea/volto-bise-policy/commit/b4d955d00123444fb351d3f38b26aa1e4244c79a)]
17
+ - fix eslint [nileshgulia1 - [`b1cdf89`](https://github.com/eea/volto-bise-policy/commit/b1cdf89b239d0406db87db3433b8c1591f9da32a)]
18
+ - fix NRR widgets and Case studies Views refs #296409 [nileshgulia1 - [`8f5a5f5`](https://github.com/eea/volto-bise-policy/commit/8f5a5f57fbe1630839658850ec4f593e84836739)]
19
+ ### [1.2.36](https://github.com/eea/volto-bise-policy/compare/1.2.35...1.2.36) - 3 February 2026
12
20
 
13
21
  ### [1.2.35](https://github.com/eea/volto-bise-policy/compare/1.2.34...1.2.35) - 30 January 2026
14
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-bise-policy",
3
- "version": "1.2.36",
3
+ "version": "1.2.38",
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",
@@ -1,3 +1,5 @@
1
+ import { UniversalLink } from '@plone/volto/components';
2
+ import { Popup } from 'semantic-ui-react';
1
3
  export const NRRTypologyOfMeasuresView = ({ value }) => {
2
4
  let parsedValue = value;
3
5
 
@@ -21,11 +23,15 @@ export const NRRTypologyOfMeasuresView = ({ value }) => {
21
23
  <b>Related typology of measures: </b>
22
24
  </span>
23
25
  <ul>
24
- {items.map((item, index) => (
25
- <li key={item['@id'] ?? index}>
26
- <p>{item.title}</p>
27
- </li>
28
- ))}
26
+ {items.map((item) => {
27
+ const description = item.title.split(' - ')?.pop();
28
+ const code = item.title.split(' - ').slice(0, 2).join(' - ');
29
+ return (
30
+ <li key={item['@id']}>
31
+ <Popup content={description} trigger={<b>{code}</b>} />
32
+ </li>
33
+ );
34
+ })}
29
35
  </ul>
30
36
  </div>
31
37
  );
@@ -63,6 +69,69 @@ export const NRRArticleView = ({ value }) => {
63
69
  );
64
70
  };
65
71
 
72
+ export const NRRrelatedCaseStudiesView = ({ value }) => {
73
+ let parsedValue = value;
74
+
75
+ if (typeof value === 'string') {
76
+ try {
77
+ parsedValue = JSON.parse(value);
78
+ } catch (e) {
79
+ return null;
80
+ }
81
+ }
82
+
83
+ const items = Array.isArray(parsedValue)
84
+ ? parsedValue
85
+ : parsedValue?.value || [];
86
+
87
+ if (!items || items.length === 0) return null;
88
+
89
+ return (
90
+ <div className="eunis-widget-viewZ">
91
+ <span>
92
+ <b>Related Case Studies: </b>
93
+ </span>
94
+ <ul>
95
+ {items.map((item, index) => (
96
+ <li key={item['@id'] ?? index}>
97
+ <UniversalLink href={item['@id']}>{item.title}</UniversalLink>
98
+ </li>
99
+ ))}
100
+ </ul>
101
+ </div>
102
+ );
103
+ };
104
+
105
+ export const NRRMeasuresImplementedView = ({ value }) => {
106
+ let parsedValue = value;
107
+
108
+ if (typeof value === 'string') {
109
+ try {
110
+ parsedValue = JSON.parse(value);
111
+ } catch (e) {
112
+ return null;
113
+ }
114
+ }
115
+
116
+ const items = Array.isArray(parsedValue)
117
+ ? parsedValue
118
+ : parsedValue?.value || [];
119
+
120
+ if (!items || items.length === 0) return null;
121
+
122
+ return (
123
+ <div className="eunis-widget-viewZ">
124
+ <ul>
125
+ {items.map((item, index) => (
126
+ <li key={item['@id'] ?? index}>
127
+ <UniversalLink href={item['@id']}>{item.title}</UniversalLink>
128
+ </li>
129
+ ))}
130
+ </ul>
131
+ </div>
132
+ );
133
+ };
134
+
66
135
  export const NRREcosystemTypologyView = ({ value }) => {
67
136
  let parsedValue = value;
68
137
 
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import cx from 'classnames';
3
+
4
+ const RichTextWidget = ({ value, className }) =>
5
+ value ? (
6
+ <div
7
+ className={cx(className, 'richtext', 'widget')}
8
+ dangerouslySetInnerHTML={{
9
+ __html: value.data,
10
+ }}
11
+ />
12
+ ) : (
13
+ ''
14
+ );
15
+
16
+ export default RichTextWidget;
package/src/index.js CHANGED
@@ -30,7 +30,10 @@ import {
30
30
  NRRTypologyOfMeasuresView,
31
31
  NRREcosystemTypologyView,
32
32
  NRRArticleView,
33
+ NRRrelatedCaseStudiesView,
34
+ NRRMeasuresImplementedView,
33
35
  } from './components/Widgets/NRRWidgets';
36
+ import RichTextWidget from './components/Widgets/RichTextWidget';
34
37
 
35
38
  const restrictedBlocks = ['imagecards', 'embed_eea_tableau_block'];
36
39
 
@@ -285,7 +288,9 @@ const applyConfig = (config) => {
285
288
  config.widgets.views.id.eunis_msfd_relevant_classification_json =
286
289
  EUNISMSFDView;
287
290
  config.widgets.views.id.eunis_code = EUNISCodeView;
288
-
291
+ config.widgets.views.id.related_case_studies = NRRrelatedCaseStudiesView;
292
+ config.widgets.views.id.nrr_measures_implemented = NRRMeasuresImplementedView;
293
+ config.widgets.views.widget.richtext = RichTextWidget;
289
294
  return config;
290
295
  };
291
296
 
@@ -45,3 +45,8 @@
45
45
  .contenttype-nrr_case_study .accordion-block.has--theme--secondary h2.headline {
46
46
  color: var(--text-color-secondary, #289588);
47
47
  }
48
+
49
+ .contenttype-nrr_measure
50
+ .top.aligned.four.wide.computer.twelve.wide.mobile.four.wide.column {
51
+ background-color: #f9f9f9;
52
+ }
@@ -366,4 +366,11 @@ p.has--clear--both:empty {
366
366
  border-right: 0.1rem solid @secondaryColor !important;
367
367
  }
368
368
  }
369
+ }
370
+
371
+
372
+ //fix Sidebar menu vertical scroll
373
+
374
+ div[role="navigation"] .toolbar-content.show {
375
+ max-height: 100vh !important;
369
376
  }