@eeacms/volto-arcgis-block 0.1.430 → 0.1.431
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 +9 -0
- package/Jenkinsfile +9 -6
- package/README.md +8 -8
- package/package.json +1 -1
- package/src/components/MapViewer/AreaWidget.jsx +63 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,19 @@ 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.1.431](https://github.com/eea/volto-arcgis-block/compare/0.1.430...0.1.431) - 3 March 2026
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`78addd9`](https://github.com/eea/volto-arcgis-block/commit/78addd9908a5a16eb8b8c984b6d98fe992af4449)]
|
|
12
|
+
- chore: [JENKINSFILE] add package version in sonarqube [EEA Jenkins - [`3001a9d`](https://github.com/eea/volto-arcgis-block/commit/3001a9d84c1ceb2072d2c8fdf42b75b0fa2a36c7)]
|
|
13
|
+
- chore: [JENKINSFILE] add sonarqube branches Refs #293878 [EEA Jenkins - [`3430596`](https://github.com/eea/volto-arcgis-block/commit/34305966fc548b9213d2a914cdd61fdb4ef3a973)]
|
|
14
|
+
|
|
7
15
|
### [0.1.430](https://github.com/eea/volto-arcgis-block/compare/0.1.429...0.1.430) - 19 February 2026
|
|
8
16
|
|
|
9
17
|
#### :hammer_and_wrench: Others
|
|
10
18
|
|
|
19
|
+
- Merge pull request #1106 from eea/develop [Unai Bolivar - [`d05af07`](https://github.com/eea/volto-arcgis-block/commit/d05af073c82e9137010ce0b2555a9405989e300f)]
|
|
11
20
|
- (bug): WFS fix [Unai Bolivar - [`dd08e60`](https://github.com/eea/volto-arcgis-block/commit/dd08e60240a885b9e611b6e096d413027a4d2b2c)]
|
|
12
21
|
- (bug): shapefileLimit error popup [Unai Bolivar - [`70d95a5`](https://github.com/eea/volto-arcgis-block/commit/70d95a5d58feed47bf027a0a213eb892a6d1a661)]
|
|
13
22
|
### [0.1.429](https://github.com/eea/volto-arcgis-block/compare/0.1.428...0.1.429) - 17 February 2026
|
package/Jenkinsfile
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
pipeline {
|
|
2
|
-
tools {
|
|
3
|
-
jdk 'Java17'
|
|
4
|
-
}
|
|
5
2
|
agent {
|
|
6
3
|
node { label 'docker-host' }
|
|
7
4
|
}
|
|
@@ -240,11 +237,17 @@ pipeline {
|
|
|
240
237
|
// script {
|
|
241
238
|
// def scannerHome = tool 'SonarQubeScanner'
|
|
242
239
|
// def nodeJS = tool 'NodeJS'
|
|
240
|
+
// if (env.CHANGE_ID) {
|
|
241
|
+
// env.sonarParams = " -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} -Dsonar.pullrequest.key=${env.CHANGE_ID} "
|
|
242
|
+
// }
|
|
243
|
+
// else {
|
|
244
|
+
// env.sonarParams = " -Dsonar.branch.name=${env.BRANCH_NAME}"
|
|
245
|
+
// }
|
|
243
246
|
// withSonarQubeEnv('Sonarqube') {
|
|
244
247
|
// sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
245
248
|
// sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
246
|
-
// sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME
|
|
247
|
-
// sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}
|
|
249
|
+
// sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME -Dsonar.projectName=$GIT_NAME -Dsonar.projectVersion=\$(jq -r '.version' package.json) ${env.sonarParams}"
|
|
250
|
+
// sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}&tags=${SONARQUBE_TAGS}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
|
|
248
251
|
// }
|
|
249
252
|
// }
|
|
250
253
|
// }
|
|
@@ -268,7 +271,7 @@ pipeline {
|
|
|
268
271
|
// script {
|
|
269
272
|
// sh '''echo "Error" > checkresult.txt'''
|
|
270
273
|
// catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
271
|
-
// sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /
|
|
274
|
+
// sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemasterV2.sh | grep -v "Found script" | tee checkresult.txt'''
|
|
272
275
|
// }
|
|
273
276
|
|
|
274
277
|
// publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: 'Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed',
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
[](https://github.com/eea/volto-arcgis-block/releases)
|
|
4
4
|
|
|
5
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-arcgis-block/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-arcgis-block
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block)
|
|
10
10
|
|
|
11
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-arcgis-block/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-arcgis-block
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block&branch=develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block&branch=develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block&branch=develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-arcgis-block&branch=develop)
|
|
16
16
|
|
|
17
17
|
## ArcGIS Map integration for Volto blocks
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -15,7 +15,9 @@ var Graphic,
|
|
|
15
15
|
SimpleLineSymbol,
|
|
16
16
|
SimpleFillSymbol,
|
|
17
17
|
SpatialReference,
|
|
18
|
-
Polygon
|
|
18
|
+
Polygon,
|
|
19
|
+
TextSymbol,
|
|
20
|
+
Point;
|
|
19
21
|
|
|
20
22
|
class AreaWidget extends React.Component {
|
|
21
23
|
/**
|
|
@@ -40,6 +42,12 @@ class AreaWidget extends React.Component {
|
|
|
40
42
|
east: '',
|
|
41
43
|
west: '',
|
|
42
44
|
},
|
|
45
|
+
areaCoordinates: {
|
|
46
|
+
originLat: '',
|
|
47
|
+
originLon: '',
|
|
48
|
+
cursorLat: '',
|
|
49
|
+
cursorLon: '',
|
|
50
|
+
},
|
|
43
51
|
};
|
|
44
52
|
this.menuClass =
|
|
45
53
|
'esri-icon-cursor-marquee esri-widget--button esri-widget esri-interactive';
|
|
@@ -74,6 +82,8 @@ class AreaWidget extends React.Component {
|
|
|
74
82
|
'esri/symbols/SimpleFillSymbol',
|
|
75
83
|
'esri/geometry/SpatialReference',
|
|
76
84
|
'esri/geometry/Polygon',
|
|
85
|
+
'esri/symbols/TextSymbol',
|
|
86
|
+
'esri/geometry/Point',
|
|
77
87
|
]).then(
|
|
78
88
|
([
|
|
79
89
|
_Graphic,
|
|
@@ -89,6 +99,8 @@ class AreaWidget extends React.Component {
|
|
|
89
99
|
_SimpleFillSymbol,
|
|
90
100
|
_SpatialReference,
|
|
91
101
|
_Polygon,
|
|
102
|
+
_TextSymbol,
|
|
103
|
+
_Point,
|
|
92
104
|
]) => {
|
|
93
105
|
[
|
|
94
106
|
Graphic,
|
|
@@ -104,6 +116,8 @@ class AreaWidget extends React.Component {
|
|
|
104
116
|
SimpleFillSymbol,
|
|
105
117
|
SpatialReference,
|
|
106
118
|
Polygon,
|
|
119
|
+
TextSymbol,
|
|
120
|
+
Point,
|
|
107
121
|
] = [
|
|
108
122
|
_Graphic,
|
|
109
123
|
_Extent,
|
|
@@ -118,6 +132,8 @@ class AreaWidget extends React.Component {
|
|
|
118
132
|
_SimpleFillSymbol,
|
|
119
133
|
_SpatialReference,
|
|
120
134
|
_Polygon,
|
|
135
|
+
_TextSymbol,
|
|
136
|
+
_Point,
|
|
121
137
|
];
|
|
122
138
|
},
|
|
123
139
|
);
|
|
@@ -922,12 +938,35 @@ class AreaWidget extends React.Component {
|
|
|
922
938
|
|
|
923
939
|
let extentGraphic = null;
|
|
924
940
|
let origin = null;
|
|
941
|
+
let originGraphic = null;
|
|
942
|
+
let cursorGraphic = null;
|
|
925
943
|
const drawGraphics = this.props.view.on('drag', (e) => {
|
|
926
944
|
if (this.props.mapViewer.pan_enabled) return;
|
|
927
945
|
e.stopPropagation();
|
|
928
946
|
if (e.action === 'start') {
|
|
929
947
|
if (extentGraphic) this.props.view.graphics.remove(extentGraphic);
|
|
948
|
+
if (originGraphic) this.props.view.graphics.remove(originGraphic);
|
|
930
949
|
origin = this.props.view.toMap(e);
|
|
950
|
+
this.setState({
|
|
951
|
+
areaCoordinates: {
|
|
952
|
+
originLat: origin.latitude.toFixed(3),
|
|
953
|
+
originLon: origin.longitude.toFixed(3),
|
|
954
|
+
},
|
|
955
|
+
});
|
|
956
|
+
let originTextSymbol = new TextSymbol(
|
|
957
|
+
this.state.areaCoordinates.originLon +
|
|
958
|
+
' , ' +
|
|
959
|
+
this.state.areaCoordinates.originLat,
|
|
960
|
+
);
|
|
961
|
+
originTextSymbol.horizontalAlignment = 'right';
|
|
962
|
+
originTextSymbol.verticalAlignment = 'bottom';
|
|
963
|
+
originTextSymbol.font.size = 8;
|
|
964
|
+
var point = new Point(
|
|
965
|
+
this.state.areaCoordinates.originLon,
|
|
966
|
+
this.state.areaCoordinates.originLat,
|
|
967
|
+
);
|
|
968
|
+
originGraphic = new Graphic(point, originTextSymbol);
|
|
969
|
+
this.props.view.graphics.add(originGraphic);
|
|
931
970
|
if (extentGraphic && this.checkExtent(extentGraphic.geometry)) {
|
|
932
971
|
this.setState({
|
|
933
972
|
showInfoPopup: true,
|
|
@@ -963,7 +1002,16 @@ class AreaWidget extends React.Component {
|
|
|
963
1002
|
}
|
|
964
1003
|
} else if (e.action === 'update') {
|
|
965
1004
|
if (extentGraphic) this.props.view.graphics.remove(extentGraphic);
|
|
1005
|
+
if (cursorGraphic) this.props.view.graphics.remove(cursorGraphic);
|
|
966
1006
|
let p = this.props.view.toMap(e);
|
|
1007
|
+
this.setState({
|
|
1008
|
+
areaCoordinates: {
|
|
1009
|
+
originLat: this.state.areaCoordinates.originLat,
|
|
1010
|
+
originLon: this.state.areaCoordinates.originLon,
|
|
1011
|
+
cursorLat: p.latitude.toFixed(3),
|
|
1012
|
+
cursorLon: p.longitude.toFixed(3),
|
|
1013
|
+
},
|
|
1014
|
+
});
|
|
967
1015
|
extentGraphic = new Graphic({
|
|
968
1016
|
geometry: new Extent({
|
|
969
1017
|
xmin: Math.min(p.x, origin.x),
|
|
@@ -1012,6 +1060,20 @@ class AreaWidget extends React.Component {
|
|
|
1012
1060
|
end: { x: p.longitude, y: p.latitude },
|
|
1013
1061
|
});
|
|
1014
1062
|
this.props.view.graphics.add(extentGraphic);
|
|
1063
|
+
let cursorTextSymbol = new TextSymbol(
|
|
1064
|
+
this.state.areaCoordinates.cursorLon +
|
|
1065
|
+
' , ' +
|
|
1066
|
+
this.state.areaCoordinates.cursorLat,
|
|
1067
|
+
);
|
|
1068
|
+
cursorTextSymbol.horizontalAlignment = 'left';
|
|
1069
|
+
cursorTextSymbol.verticalAlignment = 'top';
|
|
1070
|
+
cursorTextSymbol.font.size = 8;
|
|
1071
|
+
var point2 = new Point(
|
|
1072
|
+
this.state.areaCoordinates.cursorLon,
|
|
1073
|
+
this.state.areaCoordinates.cursorLat,
|
|
1074
|
+
);
|
|
1075
|
+
cursorGraphic = new Graphic(point2, cursorTextSymbol);
|
|
1076
|
+
this.props.view.graphics.add(cursorGraphic);
|
|
1015
1077
|
}
|
|
1016
1078
|
});
|
|
1017
1079
|
this.setState({
|