@eeacms/volto-cca-policy 0.3.92 → 0.3.93

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,7 +4,7 @@ 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.92](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.1...0.3.92) - 8 December 2025
7
+ ### [0.3.93](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.1...0.3.93) - 16 December 2025
8
8
 
9
9
  #### :rocket: Dependency updates
10
10
 
@@ -14,6 +14,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
14
14
 
15
15
  #### :bug: Bug Fixes
16
16
 
17
+ - fix: update comments [kreafox - [`1219fcc`](https://github.com/eea/volto-cca-policy/commit/1219fccab92e59428eccf6b05e600df5878dfe48)]
18
+ - fix: test [kreafox - [`9d687b6`](https://github.com/eea/volto-cca-policy/commit/9d687b68e7a461ad41c48258ba63651de8a0a2fb)]
17
19
  - fix: url instead of link in footer config - refs #293707 [kreafox - [`00e3489`](https://github.com/eea/volto-cca-policy/commit/00e3489e6855024ab8186e042d250b5529bea0e4)]
18
20
  - fix(tests): increase code coverage [kreafox - [`66cd2b3`](https://github.com/eea/volto-cca-policy/commit/66cd2b39a9b7b026c171d99e2bf3b8a47b7cddd2)]
19
21
  - fix(tests): update hyperlink text in PlanningTab [kreafox - [`05080e0`](https://github.com/eea/volto-cca-policy/commit/05080e0727730a5fe7c67d884ad6453eaf82081a)]
@@ -26,6 +28,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
26
28
 
27
29
  #### :nail_care: Enhancements
28
30
 
31
+ - change(mission): code cleanup [kreafox - [`dfa082b`](https://github.com/eea/volto-cca-policy/commit/dfa082b1dbb3480532a6787bf08f96b2af91e265)]
29
32
  - change: code cleanup, add customization comments [kreafox - [`4418a01`](https://github.com/eea/volto-cca-policy/commit/4418a0157df75b4588956b15e1a0950bbd1f504c)]
30
33
  - change: add 301/302 redirect handling [kreafox - [`1125c61`](https://github.com/eea/volto-cca-policy/commit/1125c61f8b963a1f49bb6f7672b68bed03e559f9)]
31
34
  - change: update volto customizations [kreafox - [`a712c5d`](https://github.com/eea/volto-cca-policy/commit/a712c5da2f949262dc82b0526d3623c31a1ee105)]
@@ -46,6 +49,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
46
49
 
47
50
  #### :house: Internal changes
48
51
 
52
+ - style: add EEA green color as theme color - refs #295162 [kreafox - [`0073837`](https://github.com/eea/volto-cca-policy/commit/00738375afe1d0047b6ef2009a45d46fb37a8be6)]
49
53
  - style: improve organisation cards [kreafox - [`6ddd344`](https://github.com/eea/volto-cca-policy/commit/6ddd344ec2486355c15866e51fd33fc4e00c3ba9)]
50
54
  - style: Automated code fix [eea-jenkins - [`ef718da`](https://github.com/eea/volto-cca-policy/commit/ef718da674d72d1f3614593f7381fb422792eece)]
51
55
  - style: cleanup [kreafox - [`142f706`](https://github.com/eea/volto-cca-policy/commit/142f7069f84d1b8460cc6b133e0864f85ad6bc41)]
@@ -58,9 +62,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
58
62
 
59
63
  #### :hammer_and_wrench: Others
60
64
 
65
+ - resolve conflicts [Teodor - [`28f6d21`](https://github.com/eea/volto-cca-policy/commit/28f6d2127a1d2fa8c38d4a5d1f235916892774c8)]
61
66
  - code cleanup [kreafox - [`5eb537f`](https://github.com/eea/volto-cca-policy/commit/5eb537f30bfc867e460fd46a145e0f7069b2c6f7)]
62
67
  - Refs #290863 - update message key [iugin - [`871b61c`](https://github.com/eea/volto-cca-policy/commit/871b61cea7070ff5ca6d303dcf5ecaf2fdd4e965)]
63
68
  - Refs #290863 - add translations [iugin - [`63dfc08`](https://github.com/eea/volto-cca-policy/commit/63dfc08243aa19dec5c92d800b22ed739f2f0f75)]
69
+ - code cleanup [Teodor - [`74dea17`](https://github.com/eea/volto-cca-policy/commit/74dea17652897c2f9e5524ea473e9250953ec614)]
64
70
  - test: try to use specific version for plone-backend [kreafox - [`79c542e`](https://github.com/eea/volto-cca-policy/commit/79c542e8d55d2f1663b768c555880599634ae527)]
65
71
  - test(mission): add unit tests for NoDataReported and StatisticSection components [kreafox - [`36c6e36`](https://github.com/eea/volto-cca-policy/commit/36c6e36278124759240c896786f2ac0c20674730)]
66
72
  - test: resolve Jest errors in component tests [kreafox - [`6dbb735`](https://github.com/eea/volto-cca-policy/commit/6dbb73540e8301fcb42a4d52db7004f5a42db4d8)]
@@ -151,8 +157,19 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
151
157
  - Add some loadable for components [Tiberiu Ichim - [`1793962`](https://github.com/eea/volto-cca-policy/commit/179396211c66a6a2465b2d1b6c0f2afc40fc7189)]
152
158
  - Refs #284961 - test [Tripon Eugen - [`c989f1f`](https://github.com/eea/volto-cca-policy/commit/c989f1f8638c0c5233c5c49f8673c9a2cdc7937e)]
153
159
  - Refs #284961 - add translations [Tripon Eugen - [`04ee988`](https://github.com/eea/volto-cca-policy/commit/04ee988c086d393b9b37ce1ea8d24f5e84f266aa)]
154
- ### [1.0.0-alpha.0](https://github.com/eea/volto-cca-policy/compare/0.3.91...1.0.0-alpha.0) - 15 July 2025
160
+ ### [1.0.0-alpha.0](https://github.com/eea/volto-cca-policy/compare/0.3.92...1.0.0-alpha.0) - 15 July 2025
155
161
 
162
+ ### [0.3.92](https://github.com/eea/volto-cca-policy/compare/0.3.91...0.3.92) - 8 December 2025
163
+
164
+ #### :nail_care: Enhancements
165
+
166
+ - change: code cleanup, add customization comments [kreafox - [`4418a01`](https://github.com/eea/volto-cca-policy/commit/4418a0157df75b4588956b15e1a0950bbd1f504c)]
167
+ - change: add 301/302 redirect handling [kreafox - [`1125c61`](https://github.com/eea/volto-cca-policy/commit/1125c61f8b963a1f49bb6f7672b68bed03e559f9)]
168
+ - change: update volto customizations [kreafox - [`a712c5d`](https://github.com/eea/volto-cca-policy/commit/a712c5da2f949262dc82b0526d3623c31a1ee105)]
169
+
170
+ #### :hammer_and_wrench: Others
171
+
172
+ - code cleanup [kreafox - [`5eb537f`](https://github.com/eea/volto-cca-policy/commit/5eb537f30bfc867e460fd46a145e0f7069b2c6f7)]
156
173
  ### [0.3.91](https://github.com/eea/volto-cca-policy/compare/0.3.90...0.3.91) - 4 December 2025
157
174
 
158
175
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.92",
3
+ "version": "0.3.93",
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",
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Link, useLocation } from 'react-router-dom';
2
+ import { Link } from 'react-router-dom';
3
3
  import { Tab, Container, Divider, Button, Icon } from 'semantic-ui-react';
4
4
  import { formatTextToHTML } from '@eeacms/volto-cca-policy/utils';
5
5
  import { BannerTitle, HTMLField } from '@eeacms/volto-cca-policy/helpers';
@@ -18,14 +18,8 @@ const tabRenderers = {
18
18
  };
19
19
 
20
20
  const MissionSignatoryProfileView = ({ content }) => {
21
- const location = useLocation();
22
- const isSandbox = location.pathname.includes(
23
- '/mission/sandbox/eea-sandbox/signatory-reporting',
24
- );
25
21
  const signatoryData =
26
- content?.['@components']?.missionsignatoryprofile?.[
27
- isSandbox ? 'result_beta' : 'result'
28
- ] || {};
22
+ content?.['@components']?.missionsignatoryprofile?.result || {};
29
23
 
30
24
  const {
31
25
  governance = [{}],
@@ -113,7 +113,6 @@ const AssessmentTab = ({ result, general_text }) => {
113
113
  {assessment_hazards_sectors?.length > 0 && (
114
114
  <AccordionList
115
115
  accordions={assessment_hazards_sectors.flatMap((item) => {
116
- // Beta data (Category > Hazards > Sectors)
117
116
  if (item.Category && Array.isArray(item.Hazards)) {
118
117
  return [
119
118
  {
@@ -139,21 +138,6 @@ const AssessmentTab = ({ result, general_text }) => {
139
138
  ];
140
139
  }
141
140
 
142
- // Production data (Category=null but has Hazards array)
143
- if (item.Category === null && Array.isArray(item.Hazards)) {
144
- return item.Hazards.map((hazard) => ({
145
- title: hazard.Hazard,
146
- content: (
147
- <ul>
148
- {Array.isArray(hazard.Sectors) &&
149
- hazard.Sectors.map((sector, index) => (
150
- <li key={index}>{sector}</li>
151
- ))}
152
- </ul>
153
- ),
154
- }));
155
- }
156
-
157
141
  return [];
158
142
  })}
159
143
  />
@@ -98,28 +98,17 @@ describe('AssessmentTab', () => {
98
98
  expect(link).toHaveAttribute('href', 'https://example.com');
99
99
  });
100
100
 
101
- it('renders beta-style hazards (Category > Hazard > Sector)', () => {
101
+ it('renders hazards (Category > Hazard > Sector)', () => {
102
102
  render(<AssessmentTab result={mockData} />);
103
103
 
104
104
  expect(screen.getByText('Water Management')).toBeInTheDocument();
105
105
  expect(screen.getByText('Flooding')).toBeInTheDocument();
106
106
  expect(screen.getByText('Drought')).toBeInTheDocument();
107
-
108
107
  expect(screen.getByText('Agriculture')).toBeInTheDocument();
109
108
  expect(screen.getAllByText('Health').length).toBeGreaterThanOrEqual(1);
110
109
  expect(screen.getByText('Energy')).toBeInTheDocument();
111
110
  });
112
111
 
113
- it('renders production-style hazards (Hazard > Sectors)', () => {
114
- render(<AssessmentTab result={mockData} />);
115
-
116
- expect(screen.getByText('Storms')).toBeInTheDocument();
117
- expect(screen.getByText('Heatwaves')).toBeInTheDocument();
118
- expect(screen.getByText('Transport')).toBeInTheDocument();
119
- expect(screen.getByText('Tourism')).toBeInTheDocument();
120
- expect(screen.getAllByText('Health').length).toBeGreaterThanOrEqual(1);
121
- });
122
-
123
112
  it('renders NoDataReported when no data available', () => {
124
113
  render(
125
114
  <AssessmentTab
package/src/index.js CHANGED
@@ -570,6 +570,11 @@ const applyConfig = (config) => {
570
570
  config.widgets.vocabulary['plone.app.vocabularies.Users'] =
571
571
  SelectAutoCompleteWidget;
572
572
 
573
+ config.settings.themeColors = [
574
+ ...config.settings.themeColors,
575
+ { value: 'green', title: 'EEA Green' },
576
+ ];
577
+
573
578
  config.settings.matomoTrackerIdFn = (pathname) => {
574
579
  return pathname.split('/')[2] === 'mission'
575
580
  ? {
@@ -92,4 +92,82 @@
92
92
 
93
93
  .ui.items > .item > img + .content {
94
94
  padding-left: 1rem;
95
- }
95
+ }
96
+
97
+ /* Mobile responsive fixes for tabs block */
98
+ @media only screen and (max-width: 480px) {
99
+ .tabs-block .ui.vertical.menu .item .menu-item-text {
100
+ white-space: normal;
101
+ overflow-wrap: break-word;
102
+ word-break: keep-all;
103
+ font-size: 0.8rem;
104
+ line-height: 1.3;
105
+ }
106
+ }
107
+
108
+ @media only screen and (max-width: 380px) {
109
+ .tabs-block .ui.vertical.menu .item .asset-position .menu-item-text {
110
+ font-size: 0.7rem;
111
+ }
112
+ }
113
+
114
+ @media only screen and (max-width: 345px) {
115
+ .tabs-block .ui.vertical.menu .item .asset-position .menu-item-text {
116
+ font-size: 0.65rem;
117
+ }
118
+ }
119
+
120
+ /* Hero */
121
+ .color-bg-green {
122
+ background-color: @green;
123
+ }
124
+
125
+ /* Divider */
126
+ .ui.divider.green,
127
+ .ui.divider.green:not(.vertical):not(.horizontal) {
128
+ border-top-color: @green;
129
+ color: @green;
130
+ }
131
+
132
+ /* Accordion */
133
+ .ui.accordion.green > .active.title,
134
+ .ui.accordion.green.inverted > .title,
135
+ .ui.accordion.green > .filter,
136
+ .ui.accordion.secondary.green > .active.title,
137
+ .ui.accordion.secondary.green.inverted > .title,
138
+ .ui.accordion.secondary.green > .filter {
139
+ --bg-color: @green;
140
+ }
141
+
142
+ .ui.accordion.green > .active.title,
143
+ .ui.accordion.green.inverted > .title,
144
+ .ui.accordion.green.inverted > .icon,
145
+ .ui.accordion.green > .filter {
146
+ --text-color-hover: white;
147
+ --text-color: white;
148
+ }
149
+
150
+ /* Listing cards */
151
+ .ui.card.green {
152
+ box-shadow: none !important;
153
+ border: none;
154
+ }
155
+
156
+ .ui.card.green {
157
+ --card-text-color: @green;
158
+ --card-background-color: white;
159
+ }
160
+
161
+ .card.green.inverted,
162
+ .cardsVisualization .ui.card.green {
163
+ --card-background-color: white;
164
+ --card-text-color: @green !important;
165
+ }
166
+
167
+ .cardsVisualization {
168
+ .ui.cards {
169
+ .ui.card.green::before {
170
+ background-color: @green;
171
+ }
172
+ }
173
+ }