@eeacms/volto-cca-policy 0.3.73 → 0.3.75
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/.eslintrc.js +8 -4
- package/CHANGELOG.md +68 -2
- package/package.json +11 -10
- package/src/components/manage/Blocks/ASTNavigation/schema.js +3 -1
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/schema.js +3 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/schema.js +3 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +3 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +6 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +1 -1
- package/src/components/manage/Blocks/CollectionStatistics/styles.less +1 -1
- package/src/components/manage/Blocks/ContentLinks/schema.js +3 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/euro-countries-simplified.js +46197 -0
- package/src/components/manage/Blocks/CountryMapHeatIndex/styles.less +1 -1
- package/src/components/manage/Blocks/CountryMapObservatory/mapstyle.js +28 -26
- package/src/components/manage/Blocks/CountryMapObservatory/styles.less +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -5
- package/src/components/manage/Blocks/CountryMapProfile/euro-countries-simplified.js +46197 -0
- package/src/components/manage/Blocks/CountryMapProfile/styles.less +1 -1
- package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +1 -2
- package/src/components/manage/Blocks/FlourishEmbedBlock/schema.js +3 -1
- package/src/components/manage/Blocks/RASTBlock/schema.js +3 -1
- package/src/components/manage/Blocks/ReadMore/schema.js +3 -1
- package/src/components/manage/Blocks/RelevantAceContent/schema.js +3 -1
- package/src/components/manage/Blocks/SearchAceContent/schema.js +3 -1
- package/src/components/manage/Blocks/TransRegionSelect/schema.js +3 -1
- package/src/components/manage/Blocks/index.js +0 -1
- package/src/components/theme/ASTNavigation/ASTNavigation.jsx +2 -3
- package/src/components/theme/BannerTitle/BannerTitle.jsx +2 -0
- package/src/components/theme/Header/Header.jsx +32 -22
- package/src/components/theme/Header/LanguageSwitch.jsx +2 -2
- package/src/components/theme/Views/BrokenLinks.jsx +0 -2
- package/src/components/theme/Views/CcaEventView.jsx +2 -4
- package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -2
- package/src/components/theme/Widgets/GeolocationWidget.jsx +0 -2
- package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -5
- package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +30 -9
- package/src/customizations/@plone/volto-slate/widgets/README.md +15 -1
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-1.svg +6 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-2.svg +9 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-3.svg +10 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-4.svg +11 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-5.svg +13 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-6.svg +14 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +61 -0
- package/src/customizations/volto/components/theme/App/App.jsx +3 -1
- package/src/customizations/volto/helpers/Html/Html.jsx +2 -9
- package/src/customizations/volto/middleware/api.js +190 -186
- package/src/customizations/volto/server.jsx +1 -1
- package/src/express-middleware.js +4 -2
- package/src/helpers/Utils.jsx +15 -2
- package/src/helpers/country_map/euro-countries-simplified.js +3 -1
- package/src/index.js +2 -8
- package/src/search/cca/views.js +3 -1
- package/src/search/health_observatory/views-health.js +3 -1
- package/src/store/middleware.js +38 -37
- package/theme/globals/blocks.less +4 -0
- package/theme/globals/mission.less +2 -9
- package/theme/globals/observatory.less +2 -2
- package/theme/globals/views.less +25 -0
- package/src/components/theme/Views/brokenlinks.less +0 -21
- package/src/components/theme/Widgets/geolocation.css +0 -3
- package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.test.jsx +0 -229
- package/src/customizations/volto/components/manage/Widgets/ArrayWidget.jsx +0 -428
- package/src/customizations/volto/components/manage/Widgets/Readme.md +0 -5
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +0 -96
- package/src/policy.js +0 -135
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
const flagRenderer =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
const flagRenderer =
|
|
2
|
+
({ stroke, fill, ol }) =>
|
|
3
|
+
(pixelCoordinates, state) => {
|
|
4
|
+
const context = state.context;
|
|
5
|
+
const geometry = state.geometry.clone();
|
|
6
|
+
geometry.setCoordinates(pixelCoordinates);
|
|
7
|
+
const extent = geometry.getExtent();
|
|
8
|
+
const width = ol.extent.getWidth(extent);
|
|
9
|
+
const height = ol.extent.getHeight(extent);
|
|
10
|
+
const flag = state.feature.get('flag');
|
|
11
|
+
if (!flag || height < 1 || width < 1) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
// Stitch out country shape from the blue canvas
|
|
16
|
+
context.save();
|
|
17
|
+
const renderContext = ol.render.toContext(context, {
|
|
18
|
+
pixelRatio: 1,
|
|
19
|
+
});
|
|
20
|
+
renderContext.setFillStrokeStyle(fill, stroke);
|
|
21
|
+
renderContext.drawGeometry(geometry);
|
|
22
|
+
context.clip();
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
24
|
+
// Fill transparent country with the flag image
|
|
25
|
+
const bottomLeft = ol.extent.getBottomLeft(extent);
|
|
26
|
+
const left = bottomLeft[0];
|
|
27
|
+
const bottom = bottomLeft[1];
|
|
28
|
+
context.drawImage(flag, left, bottom, width, height);
|
|
29
|
+
context.restore();
|
|
30
|
+
};
|
|
29
31
|
|
|
30
32
|
export const makeStyles = (ol) => {
|
|
31
33
|
const fill = new ol.style.Fill();
|
|
@@ -29,11 +29,11 @@ const View = (props) => {
|
|
|
29
29
|
const highlight = React.useRef();
|
|
30
30
|
const [stateHighlight, setStateHighlight] = React.useState();
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
ol,
|
|
36
|
-
|
|
32
|
+
const styles = React.useMemo(
|
|
33
|
+
() => makeStyles(highlight, ol),
|
|
34
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
|
+
[stateHighlight, ol],
|
|
36
|
+
);
|
|
37
37
|
const tooltipRef = React.useRef();
|
|
38
38
|
const [tileWMSSources, setTileWMSSources] = React.useState();
|
|
39
39
|
const [euCountriesSource, setEuCountriessource] = React.useState();
|