@eeacms/volto-cca-policy 0.3.18 → 0.3.19

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,20 @@ 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.19](https://github.com/eea/volto-cca-policy/compare/0.3.18...0.3.19) - 21 March 2025
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: stylelint [kreafox - [`1337dee`](https://github.com/eea/volto-cca-policy/commit/1337dee1acd7f239c605c89536ddd4915c89409b)]
12
+ - fix: stylelint [kreafox - [`bae43eb`](https://github.com/eea/volto-cca-policy/commit/bae43ebbba20085f04a37741962ce93e6a16b006)]
13
+ - fix: stylelint [kreafox - [`118510b`](https://github.com/eea/volto-cca-policy/commit/118510be22b732779c4090143e0ffb27c7e6d3ed)]
14
+ - fix: stylelint [kreafox - [`22d0850`](https://github.com/eea/volto-cca-policy/commit/22d08500f566acceaf8f1cf80f4f720f988cf085)]
15
+ - fix: stylelint [kreafox - [`54efc0b`](https://github.com/eea/volto-cca-policy/commit/54efc0b7048d81071ae1f8fff85faad9b7aa646d)]
16
+ - fix: ast navigation for AdaptationSupportTool [laszlocseh - [`94a58dc`](https://github.com/eea/volto-cca-policy/commit/94a58dc30c7b5339a814c714c1e982bea8e08727)]
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - Tweaks to functionality of case study explorer [Tiberiu Ichim - [`e7cad8a`](https://github.com/eea/volto-cca-policy/commit/e7cad8aa932373b255c875f14f59a18ef3aa51c0)]
7
21
  ### [0.3.18](https://github.com/eea/volto-cca-policy/compare/0.3.17...0.3.18) - 21 March 2025
8
22
 
9
23
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
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,9 +1,19 @@
1
1
  import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
+ import { Icon } from 'semantic-ui-react';
3
4
 
4
- export default function FeatureDisplay({ feature }) {
5
+ export default function FeatureDisplay({ feature, onClose }) {
5
6
  return feature ? (
6
7
  <div id="csepopup">
8
+ <div
9
+ className="close"
10
+ role="button"
11
+ onClick={onClose}
12
+ tabIndex={-1}
13
+ onKeyDown={onClose}
14
+ >
15
+ <Icon className="ri-close-circle-line" />
16
+ </div>
7
17
  <p>
8
18
  <strong>
9
19
  <a className="dbitem" href={feature.url} target="_blank">
@@ -121,15 +121,6 @@ export default function FeatureInteraction({
121
121
 
122
122
  function handleClick(evt) {
123
123
  if (evt.originalEvent.target.tagName === 'A') return;
124
- if (selectedFeature) {
125
- onFeatureSelect(null);
126
-
127
- const view = map.getView();
128
- view.animate({
129
- ...mapCenter,
130
- duration: 1000,
131
- });
132
- }
133
124
  }
134
125
 
135
126
  function handlePointerMove(e) {
@@ -158,6 +149,20 @@ export default function FeatureInteraction({
158
149
  clusterCirclesLayer,
159
150
  ]);
160
151
 
152
+ function onClosePopup(evt) {
153
+ evt.preventDefault();
154
+
155
+ if (selectedFeature) {
156
+ onFeatureSelect(null);
157
+
158
+ const view = map.getView();
159
+ view.animate({
160
+ ...mapCenter,
161
+ duration: 2000,
162
+ });
163
+ }
164
+ }
165
+
161
166
  return isClient ? (
162
167
  <div
163
168
  id="popup-overlay"
@@ -169,7 +174,9 @@ export default function FeatureInteraction({
169
174
  visibility: selectedFeature ? 'visible' : 'hidden',
170
175
  }}
171
176
  >
172
- {selectedFeature ? <FeatureDisplay feature={selectedFeature} /> : null}
177
+ {selectedFeature ? (
178
+ <FeatureDisplay feature={selectedFeature} onClose={onClosePopup} />
179
+ ) : null}
173
180
  </div>
174
181
  ) : null;
175
182
  }
@@ -6,6 +6,15 @@
6
6
  border-bottom: 6px solid #005c96;
7
7
  background-color: white;
8
8
 
9
+ .close {
10
+ position: relative;
11
+ top: -8px;
12
+ width: 20px;
13
+ height: 20px;
14
+ cursor: pointer;
15
+ float: right;
16
+ }
17
+
9
18
  a.dbitem {
10
19
  font-size: 14px;
11
20
  text-decoration: none;
@@ -10,7 +10,7 @@ function getStyle(size, haveAdaptecca) {
10
10
  size === 1
11
11
  ? new ol.style.Style({
12
12
  image: new ol.style.Circle({
13
- radius: 5,
13
+ radius: 7,
14
14
  stroke: new ol.style.Stroke({
15
15
  color: '#fff',
16
16
  }),
@@ -29,7 +29,8 @@ const ASTNavigation = (props) => {
29
29
  rootPath,
30
30
  {
31
31
  'path.depth': 1,
32
- portal_type: ['collective.cover.content'],
32
+ portal_type: ['Folder'],
33
+ object_provides: 'eea.climateadapt.interfaces.ICover',
33
34
  review_state: 'published',
34
35
  b_size: 100,
35
36
  },