@eeacms/volto-cca-policy 0.3.49 → 0.3.51
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 +15 -2
- package/package.json +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/Interactions.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +9 -4
- package/src/components/manage/Blocks/CountryMapProfile/mapstyle.js +2 -2
- package/src/components/manage/Blocks/index.js +2 -2
- package/src/customizations/volto/helpers/Html/Html.jsx +11 -15
- package/theme/globals/search.less +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +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.
|
|
7
|
+
### [0.3.51](https://github.com/eea/volto-cca-policy/compare/0.3.50...0.3.51) - 26 May 2025
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- Let's serialize in one line [Tiberiu Ichim - [`bd44758`](https://github.com/eea/volto-cca-policy/commit/bd44758dae105604632f8aa8f54a485681c95f73)]
|
|
12
|
+
- Show the download button to the anonymous users [Tiberiu Ichim - [`394fec5`](https://github.com/eea/volto-cca-policy/commit/394fec59a62ec8836ad0a7a840b5c3e748b2ef5a)]
|
|
13
|
+
### [0.3.50](https://github.com/eea/volto-cca-policy/compare/0.3.49...0.3.50) - 25 May 2025
|
|
14
|
+
|
|
15
|
+
#### :house: Internal changes
|
|
16
|
+
|
|
17
|
+
- style: Automated code fix [eea-jenkins - [`8b15b1d`](https://github.com/eea/volto-cca-policy/commit/8b15b1df58a8ed7382de0ace6d034db3e31b01ee)]
|
|
18
|
+
- style: Automated code fix [eea-jenkins - [`607cc52`](https://github.com/eea/volto-cca-policy/commit/607cc5264b7ea48582f00f9b0822798809ad8bb5)]
|
|
19
|
+
|
|
20
|
+
#### :hammer_and_wrench: Others
|
|
21
|
+
|
|
22
|
+
- Fix eslint [Tiberiu Ichim - [`56c0e38`](https://github.com/eea/volto-cca-policy/commit/56c0e38085bf9c6bbcd6cc9775d8306afb94492b)]
|
|
23
|
+
### [0.3.49](https://github.com/eea/volto-cca-policy/compare/0.3.48...0.3.49) - 23 May 2025
|
|
24
|
+
|
|
12
25
|
### [0.3.48](https://github.com/eea/volto-cca-policy/compare/0.3.47...0.3.48) - 22 May 2025
|
|
13
26
|
|
|
14
27
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
setTooltipVisibility,
|
|
5
5
|
getClosestFeatureToCoordinate,
|
|
6
6
|
} from '@eeacms/volto-cca-policy/helpers/country_map/countryMap';
|
|
7
|
-
import { openlayers as ol } from '@eeacms/volto-openlayers-map';
|
|
8
7
|
import { useMapContext } from '@eeacms/volto-openlayers-map/api';
|
|
9
8
|
|
|
10
9
|
export const Interactions = ({
|
|
@@ -15,6 +14,7 @@ export const Interactions = ({
|
|
|
15
14
|
euCountryFeatures,
|
|
16
15
|
setStateHighlight,
|
|
17
16
|
countries_metadata,
|
|
17
|
+
ol,
|
|
18
18
|
}) => {
|
|
19
19
|
const map = useMapContext().map;
|
|
20
20
|
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from '@eeacms/volto-cca-policy/helpers/country_map/countryMap';
|
|
10
10
|
import { withGeoJsonData } from '@eeacms/volto-cca-policy/helpers/country_map/hocs';
|
|
11
11
|
import { clientOnly } from '@eeacms/volto-cca-policy/helpers';
|
|
12
|
-
import {
|
|
12
|
+
import { withOpenLayers } from '@eeacms/volto-openlayers-map';
|
|
13
13
|
import { Map, Layer, Layers, Controls } from '@eeacms/volto-openlayers-map/api';
|
|
14
14
|
import { makeStyles } from './mapstyle';
|
|
15
15
|
import { Interactions } from './Interactions';
|
|
@@ -25,13 +25,16 @@ import './styles.less';
|
|
|
25
25
|
// 'https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2/2021/4326/20M/cntrg.json';
|
|
26
26
|
|
|
27
27
|
const View = (props) => {
|
|
28
|
-
const { geofeatures, projection } = props;
|
|
28
|
+
const { geofeatures, projection, ol } = props;
|
|
29
29
|
|
|
30
30
|
const highlight = React.useRef();
|
|
31
31
|
const [stateHighlight, setStateHighlight] = React.useState();
|
|
32
32
|
|
|
33
33
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
|
-
const styles = React.useMemo(() => makeStyles(highlight), [
|
|
34
|
+
const styles = React.useMemo(() => makeStyles(highlight, ol), [
|
|
35
|
+
stateHighlight,
|
|
36
|
+
ol,
|
|
37
|
+
]);
|
|
35
38
|
const tooltipRef = React.useRef();
|
|
36
39
|
const [tileWMSSources, setTileWMSSources] = React.useState();
|
|
37
40
|
const [euCountriesSource, setEuCountriessource] = React.useState();
|
|
@@ -123,7 +126,7 @@ const View = (props) => {
|
|
|
123
126
|
transition: 0,
|
|
124
127
|
}),
|
|
125
128
|
]);
|
|
126
|
-
}, [geofeatures, countries_metadata, thematicMapMode, euCountryNames]);
|
|
129
|
+
}, [geofeatures, countries_metadata, thematicMapMode, euCountryNames, ol]);
|
|
127
130
|
|
|
128
131
|
const baseUrl = props.path || props.location?.pathname || '';
|
|
129
132
|
|
|
@@ -161,6 +164,7 @@ const View = (props) => {
|
|
|
161
164
|
<Layers>
|
|
162
165
|
{props.mode !== 'edit' && (
|
|
163
166
|
<Interactions
|
|
167
|
+
ol={ol}
|
|
164
168
|
tooltipRef={tooltipRef}
|
|
165
169
|
// onFeatureClick={onFeatureClick}
|
|
166
170
|
countries_metadata={countries_metadata}
|
|
@@ -203,4 +207,5 @@ export default compose(
|
|
|
203
207
|
withGeoJsonData,
|
|
204
208
|
withResponsiveContainer('countryMapProfile'),
|
|
205
209
|
withVisibilitySensor(),
|
|
210
|
+
withOpenLayers,
|
|
206
211
|
)(View);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openlayers as ol } from '@eeacms/volto-openlayers-map';
|
|
1
|
+
// import { openlayers as ol } from '@eeacms/volto-openlayers-map';
|
|
2
2
|
|
|
3
3
|
// const flagRenderer = ({ stroke, fill }) => (pixelCoordinates, state) => {
|
|
4
4
|
// const context = state.context;
|
|
@@ -29,7 +29,7 @@ import { openlayers as ol } from '@eeacms/volto-openlayers-map';
|
|
|
29
29
|
// context.restore();
|
|
30
30
|
// };
|
|
31
31
|
|
|
32
|
-
export const makeStyles = (highlight) => {
|
|
32
|
+
export const makeStyles = (highlight, ol) => {
|
|
33
33
|
const fill = new ol.style.Fill({ color: 'rgb(251,250,230, 0.8)' });
|
|
34
34
|
const stroke = new ol.style.Stroke({
|
|
35
35
|
// color: 'rgba(255,255,255,0.8)',
|
|
@@ -22,7 +22,7 @@ import installASTNavigation from './ASTNavigation';
|
|
|
22
22
|
|
|
23
23
|
// import installMKHMap from './MKHMap';
|
|
24
24
|
// import installCountryMapHeatIndex from './CountryMapHeatIndex';
|
|
25
|
-
|
|
25
|
+
import installCountryMapProfile from './CountryMapProfile';
|
|
26
26
|
|
|
27
27
|
export default function installBlocks(config) {
|
|
28
28
|
config.blocks.blocksConfig.title.restricted = false;
|
|
@@ -51,8 +51,8 @@ export default function installBlocks(config) {
|
|
|
51
51
|
installRedirectBlock,
|
|
52
52
|
installContentLinks,
|
|
53
53
|
installASTNavigation,
|
|
54
|
+
installCountryMapProfile,
|
|
54
55
|
// installMKHMap,
|
|
55
56
|
// installCountryMapHeatIndex,
|
|
56
|
-
// installCountryMapProfile,
|
|
57
57
|
)(config);
|
|
58
58
|
}
|
|
@@ -114,20 +114,17 @@ class Html extends Component {
|
|
|
114
114
|
{React.createElement('script', {
|
|
115
115
|
nonce: nonce,
|
|
116
116
|
dangerouslySetInnerHTML: {
|
|
117
|
-
__html: `window.env = ${serialize(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
{ space: 2 },
|
|
130
|
-
)};`,
|
|
117
|
+
__html: `window.env = ${serialize({
|
|
118
|
+
...runtimeConfig,
|
|
119
|
+
// Seamless mode requirement, the client need to know where the API is located
|
|
120
|
+
// if not set in the API_PATH
|
|
121
|
+
...(apiPath && {
|
|
122
|
+
apiPath,
|
|
123
|
+
}),
|
|
124
|
+
...(publicURL && {
|
|
125
|
+
publicURL,
|
|
126
|
+
}),
|
|
127
|
+
})};`,
|
|
131
128
|
},
|
|
132
129
|
})}
|
|
133
130
|
|
|
@@ -195,7 +192,6 @@ class Html extends Component {
|
|
|
195
192
|
dangerouslySetInnerHTML: {
|
|
196
193
|
__html: `window.__data=${serialize(
|
|
197
194
|
loadReducers(store.getState()),
|
|
198
|
-
{ space: 2 },
|
|
199
195
|
)};`,
|
|
200
196
|
},
|
|
201
197
|
charSet: 'UTF-8',
|
|
@@ -11,12 +11,6 @@ body.searchlib-page .searchlib-block {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
body.is-anonymous .searchlib-block .search-body-footer {
|
|
15
|
-
button.download-btn {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
.searchlib-page .content-section-tabs.menu .item i.icon.small {
|
|
21
15
|
width: 32px;
|
|
22
16
|
height: 32px;
|