@eeacms/volto-cca-policy 0.3.33 → 0.3.35
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 +18 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +8 -6
- package/src/components/manage/Blocks/CountryMapObservatory/Interactions.jsx +6 -2
- package/src/components/theme/MissionSignatoryProfile/TabSections/AssessmentTab.jsx +4 -11
- package/src/components/theme/MissionSignatoryProfile/TabSections/PlanningTab.jsx +4 -13
- package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +2 -1
- package/src/customizations/@plone/volto-slate/widgets/README.md +13 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.35](https://github.com/eea/volto-cca-policy/compare/0.3.34...0.3.35) - 6 May 2025
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- style: Automated code fix [eea-jenkins - [`3ee5c45`](https://github.com/eea/volto-cca-policy/commit/3ee5c45a2c6240ca4891b424278b66d36b097bd2)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Customize html widget to let it treat whitespace [Tiberiu Ichim - [`c587517`](https://github.com/eea/volto-cca-policy/commit/c58751740401480d5e87674cc1a16d9a010385be)]
|
|
16
|
+
- Refs #287349 - remove uk from observatory map dependency [Tripon Eugen - [`6b90a59`](https://github.com/eea/volto-cca-policy/commit/6b90a599a2aaa9c00b9b24625216c5c34e518075)]
|
|
17
|
+
- Refs #287349 - remove uk from observatory map eslint [Tripon Eugen - [`b535431`](https://github.com/eea/volto-cca-policy/commit/b5354318a41f03cc8d5dec9ae5a93cd8e1182d0d)]
|
|
18
|
+
- Refs #287349 - remove uk from observatory map [Tripon Eugen - [`d3d89dd`](https://github.com/eea/volto-cca-policy/commit/d3d89ddf80e63af63ebcc4a3a2eb538dce1eec3b)]
|
|
19
|
+
### [0.3.34](https://github.com/eea/volto-cca-policy/compare/0.3.33...0.3.34) - 6 May 2025
|
|
20
|
+
|
|
21
|
+
#### :bug: Bug Fixes
|
|
22
|
+
|
|
23
|
+
- fix: production crash by using safe Item subcomponent access [kreafox - [`2e7b86e`](https://github.com/eea/volto-cca-policy/commit/2e7b86ee37834c316ac38813415b77f34c0ae92f)]
|
|
24
|
+
|
|
7
25
|
### [0.3.33](https://github.com/eea/volto-cca-policy/compare/0.3.32...0.3.33) - 5 May 2025
|
|
8
26
|
|
|
9
27
|
#### :rocket: Dependency updates
|
package/package.json
CHANGED
|
@@ -37,12 +37,14 @@ const CountryMapObservatoryView = (props) => {
|
|
|
37
37
|
setOverlaySource(new ol.source.Vector());
|
|
38
38
|
|
|
39
39
|
const features = new ol.format.GeoJSON().readFeatures(geofeatures);
|
|
40
|
-
const updateEuCountryNames = euCountryNames
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
const updateEuCountryNames = euCountryNames
|
|
41
|
+
.map((countryName) => {
|
|
42
|
+
if ('Turkey' === countryName) {
|
|
43
|
+
countryName = 'Türkiye';
|
|
44
|
+
}
|
|
45
|
+
return countryName;
|
|
46
|
+
})
|
|
47
|
+
.filter((countryName) => countryName !== 'United Kingdom');
|
|
46
48
|
|
|
47
49
|
const filtered = features.filter((f) =>
|
|
48
50
|
updateEuCountryNames.includes(f.get('na')),
|
|
@@ -21,6 +21,10 @@ function setTooltipVisibility(node, label, event, visible) {
|
|
|
21
21
|
export const Interactions = ({ overlaySource, tooltipRef, onFeatureClick }) => {
|
|
22
22
|
const map = useMapContext().map;
|
|
23
23
|
|
|
24
|
+
const euCountryNamesFiltered = euCountryNames.filter(
|
|
25
|
+
(euCountryName) => euCountryName !== 'United Kingdom',
|
|
26
|
+
);
|
|
27
|
+
|
|
24
28
|
React.useEffect(() => {
|
|
25
29
|
if (!map) return;
|
|
26
30
|
|
|
@@ -40,7 +44,7 @@ export const Interactions = ({ overlaySource, tooltipRef, onFeatureClick }) => {
|
|
|
40
44
|
overlaySource.removeFeature(highlight);
|
|
41
45
|
} catch {}
|
|
42
46
|
}
|
|
43
|
-
if (feature &&
|
|
47
|
+
if (feature && euCountryNamesFiltered.includes(feature.get('na'))) {
|
|
44
48
|
overlaySource.addFeature(feature);
|
|
45
49
|
map.getTargetElement().style.cursor = 'pointer';
|
|
46
50
|
const node = tooltipRef.current;
|
|
@@ -64,7 +68,7 @@ export const Interactions = ({ overlaySource, tooltipRef, onFeatureClick }) => {
|
|
|
64
68
|
onFeatureClick(feature);
|
|
65
69
|
}
|
|
66
70
|
});
|
|
67
|
-
}, [map, overlaySource, tooltipRef, onFeatureClick]);
|
|
71
|
+
}, [map, overlaySource, tooltipRef, onFeatureClick, euCountryNamesFiltered]);
|
|
68
72
|
|
|
69
73
|
return null;
|
|
70
74
|
};
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Tab,
|
|
4
|
-
Image,
|
|
5
|
-
Segment,
|
|
6
|
-
Item,
|
|
7
|
-
ItemGroup,
|
|
8
|
-
ItemContent,
|
|
9
|
-
} from 'semantic-ui-react';
|
|
2
|
+
import { Tab, Image, Segment, Item } from 'semantic-ui-react';
|
|
10
3
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
11
4
|
import AccordionList from '../AccordionList';
|
|
12
5
|
|
|
@@ -16,14 +9,14 @@ const ItemsSection = ({ items }) => {
|
|
|
16
9
|
if (!items?.length) return null;
|
|
17
10
|
|
|
18
11
|
return (
|
|
19
|
-
<
|
|
12
|
+
<Item.Group className="items-group">
|
|
20
13
|
{items.map((item, index) => (
|
|
21
14
|
<Item key={index}>
|
|
22
15
|
<Image size="small" src={image} />
|
|
23
|
-
<
|
|
16
|
+
<Item.Content verticalAlign="middle">{item.Factor}</Item.Content>
|
|
24
17
|
</Item>
|
|
25
18
|
))}
|
|
26
|
-
</
|
|
19
|
+
</Item.Group>
|
|
27
20
|
);
|
|
28
21
|
};
|
|
29
22
|
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Tab,
|
|
4
|
-
Message,
|
|
5
|
-
Segment,
|
|
6
|
-
Grid,
|
|
7
|
-
Item,
|
|
8
|
-
ItemGroup,
|
|
9
|
-
ItemContent,
|
|
10
|
-
Image,
|
|
11
|
-
} from 'semantic-ui-react';
|
|
2
|
+
import { Tab, Message, Segment, Grid, Item, Image } from 'semantic-ui-react';
|
|
12
3
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
13
4
|
import { HTMLField } from '@eeacms/volto-cca-policy/helpers';
|
|
14
5
|
import {
|
|
@@ -22,14 +13,14 @@ const ItemsSection = ({ items }) => {
|
|
|
22
13
|
if (!items?.length) return null;
|
|
23
14
|
|
|
24
15
|
return (
|
|
25
|
-
<
|
|
16
|
+
<Item.Group className="items-group">
|
|
26
17
|
{items.map((sector, index) => (
|
|
27
18
|
<Item key={index}>
|
|
28
19
|
<Image size="small" src={image} />
|
|
29
|
-
<
|
|
20
|
+
<Item.Content verticalAlign="middle">{sector}</Item.Content>
|
|
30
21
|
</Item>
|
|
31
22
|
))}
|
|
32
|
-
</
|
|
23
|
+
</Item.Group>
|
|
33
24
|
);
|
|
34
25
|
};
|
|
35
26
|
|
|
@@ -80,7 +80,8 @@ const HtmlSlateWidget = (props) => {
|
|
|
80
80
|
parsed.getElementsByTagName('google-sheets-html-origin').length > 0
|
|
81
81
|
? parsed.querySelector('google-sheets-html-origin > table')
|
|
82
82
|
: parsed.body;
|
|
83
|
-
let data = deserialize(editor, body, { collapseWhitespace:
|
|
83
|
+
let data = deserialize(editor, body, { collapseWhitespace: true });
|
|
84
|
+
// console.log({ data, parsed, body, html });
|
|
84
85
|
if (data.length) {
|
|
85
86
|
data = normalizeExternalData(editor, data);
|
|
86
87
|
} else {
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
# Customizations
|
|
2
|
+
|
|
1
3
|
Customized for this
|
|
2
4
|
|
|
5
|
+
```js
|
|
6
|
+
if (data.length) {
|
|
7
|
+
data = normalizeExternalData(editor, data);
|
|
8
|
+
} else {
|
|
9
|
+
return [createEmptyParagraph()];
|
|
10
|
+
}
|
|
3
11
|
```
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
|
|
13
|
+
and this:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
let data = deserialize(editor, body, { collapseWhitespace: true });
|
|
9
17
|
```
|