@eeacms/volto-arcgis-block 0.1.447 → 0.1.448
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
CHANGED
|
@@ -4,6 +4,12 @@ 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.448](https://github.com/eea/volto-arcgis-block/compare/0.1.447...0.1.448) - 11 May 2026
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- (bug): fix for tickets CLMS-297970, CLMS-288681, CLMS-288445, and implement proxy switching [Unai Bolivar - [`ce3e215`](https://github.com/eea/volto-arcgis-block/commit/ce3e215ed660836bc0f94fcd06536993b448d1b8)]
|
|
12
|
+
- (bug): Area widget loads nuts and countries after using swipe widget [Unai Bolivar - [`324cee2`](https://github.com/eea/volto-arcgis-block/commit/324cee2be67845fd1170425180b5e6562c381fad)]
|
|
7
13
|
### [0.1.447](https://github.com/eea/volto-arcgis-block/compare/0.1.446...0.1.447) - 8 May 2026
|
|
8
14
|
|
|
9
15
|
### [0.1.446](https://github.com/eea/volto-arcgis-block/compare/0.1.445...0.1.446) - 7 May 2026
|
package/package.json
CHANGED
|
@@ -358,7 +358,18 @@ class AreaWidget extends React.Component {
|
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
resolveNutsGroupLayerState() {
|
|
362
|
+
if (!this.nutsGroupLayer || !this.props.map || !this.props.map.layers) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (!this.props.map.layers.includes(this.nutsGroupLayer)) {
|
|
367
|
+
this.props.map.add(this.nutsGroupLayer);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
361
371
|
loadNutsService(id, levels) {
|
|
372
|
+
this.resolveNutsGroupLayerState();
|
|
362
373
|
this.clearWidget();
|
|
363
374
|
document.querySelector('.esri-attribution__powered-by').style.display =
|
|
364
375
|
'flex';
|
|
@@ -374,6 +385,7 @@ class AreaWidget extends React.Component {
|
|
|
374
385
|
}
|
|
375
386
|
|
|
376
387
|
loadCountriesService(id) {
|
|
388
|
+
this.resolveNutsGroupLayerState();
|
|
377
389
|
document.querySelector('.esri-attribution__powered-by').style.display =
|
|
378
390
|
'flex';
|
|
379
391
|
var layer = new FeatureLayer({
|
|
@@ -2307,10 +2307,10 @@ class MenuWidget extends React.Component {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
|
|
2309
2309
|
getProxyBase = () => {
|
|
2310
|
-
|
|
2311
|
-
|
|
2310
|
+
const origin = window?.location?.origin || '';
|
|
2311
|
+
return origin ? `${origin}/ogcproxy/` : '/ogcproxy/';
|
|
2312
2312
|
// return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
|
|
2313
|
-
return 'https://land.copernicus.eu/ogcproxy/';
|
|
2313
|
+
// return 'https://land.copernicus.eu/ogcproxy/';
|
|
2314
2314
|
};
|
|
2315
2315
|
|
|
2316
2316
|
buildProxiedUrl(url) {
|
|
@@ -284,12 +284,9 @@ class UploadWidget extends React.Component {
|
|
|
284
284
|
return queryService;
|
|
285
285
|
}
|
|
286
286
|
const pathName = (parsedUrl.pathname || '').toLowerCase();
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
);
|
|
291
|
-
if (serviceMatch) {
|
|
292
|
-
return serviceMatch.toUpperCase();
|
|
287
|
+
const pathServiceType = this.resolveServiceTypeFromPath(pathName);
|
|
288
|
+
if (pathServiceType) {
|
|
289
|
+
return pathServiceType;
|
|
293
290
|
}
|
|
294
291
|
return null;
|
|
295
292
|
} catch (e) {
|
|
@@ -297,6 +294,23 @@ class UploadWidget extends React.Component {
|
|
|
297
294
|
}
|
|
298
295
|
};
|
|
299
296
|
|
|
297
|
+
resolveServiceTypeFromPath = (pathName) => {
|
|
298
|
+
const value = (pathName || '').toLowerCase();
|
|
299
|
+
if (!value) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
if (/\bwmts\b|\/wmts(?:[/._-]|$)/i.test(value)) {
|
|
303
|
+
return 'WMTS';
|
|
304
|
+
}
|
|
305
|
+
if (/\bwfs\b|\/wfs(?:[/._-]|$)/i.test(value)) {
|
|
306
|
+
return 'WFS';
|
|
307
|
+
}
|
|
308
|
+
if (/\bwms\b|\/wms(?:[/._-]|$)/i.test(value)) {
|
|
309
|
+
return 'WMS';
|
|
310
|
+
}
|
|
311
|
+
return null;
|
|
312
|
+
};
|
|
313
|
+
|
|
300
314
|
isServiceTypeMatchingUrl = (serviceUrl, selectedServiceType) => {
|
|
301
315
|
const encodedServiceType = this.getServiceTypeFromUrl(serviceUrl);
|
|
302
316
|
if (!encodedServiceType) {
|
|
@@ -305,15 +319,30 @@ class UploadWidget extends React.Component {
|
|
|
305
319
|
return encodedServiceType === selectedServiceType;
|
|
306
320
|
};
|
|
307
321
|
|
|
322
|
+
clearUploadForm = (clearServiceType = false) => {
|
|
323
|
+
this.setState({
|
|
324
|
+
...this.buildUploadResetState(),
|
|
325
|
+
...(clearServiceType ? { selectedServiceType: '' } : {}),
|
|
326
|
+
});
|
|
327
|
+
if (this.fileInput && this.fileInput.current) {
|
|
328
|
+
this.fileInput.current.value = null;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
handleServiceTypeMismatch = () => {
|
|
333
|
+
this.errorPopup('serviceTypeMismatch');
|
|
334
|
+
this.clearUploadForm(true);
|
|
335
|
+
};
|
|
336
|
+
|
|
308
337
|
stripProtocol = (url) => {
|
|
309
338
|
return (url || '').replace(/^https?:\/\//i, '');
|
|
310
339
|
};
|
|
311
340
|
|
|
312
341
|
getProxyBase = () => {
|
|
313
|
-
|
|
314
|
-
|
|
342
|
+
const origin = window?.location?.origin || '';
|
|
343
|
+
return origin ? `${origin}/ogcproxy/` : '/ogcproxy/';
|
|
315
344
|
// return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
|
|
316
|
-
return 'https://land.copernicus.eu/ogcproxy/';
|
|
345
|
+
// return 'https://land.copernicus.eu/ogcproxy/';
|
|
317
346
|
};
|
|
318
347
|
|
|
319
348
|
buildProxiedUrl = (url) => {
|
|
@@ -535,6 +564,15 @@ class UploadWidget extends React.Component {
|
|
|
535
564
|
handleSelectLayers = async () => {
|
|
536
565
|
const { serviceUrl, selectedServiceType } = this.state;
|
|
537
566
|
const trimmedServiceUrl = (serviceUrl || '').trim();
|
|
567
|
+
if (
|
|
568
|
+
selectedServiceType &&
|
|
569
|
+
trimmedServiceUrl !== '' &&
|
|
570
|
+
this.isValidUrl(trimmedServiceUrl) &&
|
|
571
|
+
!this.isServiceTypeMatchingUrl(trimmedServiceUrl, selectedServiceType)
|
|
572
|
+
) {
|
|
573
|
+
this.handleServiceTypeMismatch();
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
538
576
|
if (
|
|
539
577
|
selectedServiceType === 'WFS' &&
|
|
540
578
|
trimmedServiceUrl !== '' &&
|
|
@@ -560,6 +598,15 @@ class UploadWidget extends React.Component {
|
|
|
560
598
|
const trimmedServiceUrl = (serviceUrl || '').trim();
|
|
561
599
|
const selectedServiceType = this.state.selectedServiceType;
|
|
562
600
|
const selectedFeatures = this.state.selectedFeatures;
|
|
601
|
+
if (
|
|
602
|
+
selectedServiceType &&
|
|
603
|
+
trimmedServiceUrl !== '' &&
|
|
604
|
+
this.isValidUrl(trimmedServiceUrl) &&
|
|
605
|
+
!this.isServiceTypeMatchingUrl(trimmedServiceUrl, selectedServiceType)
|
|
606
|
+
) {
|
|
607
|
+
this.handleServiceTypeMismatch();
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
563
610
|
if (
|
|
564
611
|
selectedServiceType &&
|
|
565
612
|
trimmedServiceUrl !== '' &&
|
|
@@ -1025,6 +1072,16 @@ class UploadWidget extends React.Component {
|
|
|
1025
1072
|
</div>
|
|
1026
1073
|
</>
|
|
1027
1074
|
)}
|
|
1075
|
+
{this.state.infoPopupType === 'serviceTypeMismatch' && (
|
|
1076
|
+
<>
|
|
1077
|
+
<span className="drawRectanglePopup-icon">
|
|
1078
|
+
<FontAwesomeIcon icon={['fas', 'info-circle']} />
|
|
1079
|
+
</span>
|
|
1080
|
+
<div className="drawRectanglePopup-text">
|
|
1081
|
+
Selected service type does not match the provided URL.
|
|
1082
|
+
</div>
|
|
1083
|
+
</>
|
|
1084
|
+
)}
|
|
1028
1085
|
</div>
|
|
1029
1086
|
</div>
|
|
1030
1087
|
</div>
|