@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 +14 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +11 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureInteraction.jsx +17 -10
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +9 -0
- package/src/components/manage/Blocks/CaseStudyExplorer/useInteractiveStyles.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTNavigation.jsx +2 -1
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,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 ?
|
|
177
|
+
{selectedFeature ? (
|
|
178
|
+
<FeatureDisplay feature={selectedFeature} onClose={onClosePopup} />
|
|
179
|
+
) : null}
|
|
173
180
|
</div>
|
|
174
181
|
) : null;
|
|
175
182
|
}
|