@eeacms/volto-arcgis-block 0.1.445 → 0.1.447

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,10 @@ 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.447](https://github.com/eea/volto-arcgis-block/compare/0.1.446...0.1.447) - 8 May 2026
8
+
9
+ ### [0.1.446](https://github.com/eea/volto-arcgis-block/compare/0.1.445...0.1.446) - 7 May 2026
10
+
7
11
  ### [0.1.445](https://github.com/eea/volto-arcgis-block/compare/0.1.444...0.1.445) - 28 April 2026
8
12
 
9
13
  ### [0.1.444](https://github.com/eea/volto-arcgis-block/compare/0.1.443...0.1.444) - 17 April 2026
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.445",
3
+ "version": "0.1.447",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -2306,14 +2306,22 @@ class MenuWidget extends React.Component {
2306
2306
  return (url || '').replace(/^https?:\/\//i, '');
2307
2307
  }
2308
2308
 
2309
- getProxyBase() {
2310
- return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
2311
- }
2309
+ getProxyBase = () => {
2310
+ // const origin = window?.location?.origin || '';
2311
+ // return origin ? `${origin}/ogcproxy/` : '/ogcproxy/';
2312
+ // return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
2313
+ return 'https://land.copernicus.eu/ogcproxy/';
2314
+ };
2312
2315
 
2313
2316
  buildProxiedUrl(url) {
2314
2317
  if (!url) return url;
2315
2318
  const hasProxy = /\/ogcproxy\//i.test(url);
2316
- return hasProxy ? url : this.getProxyBase() + this.stripProtocol(url);
2319
+ if (hasProxy) {
2320
+ const strippedUrl = this.stripProtocol(url);
2321
+ const proxyPath = strippedUrl.split(/\/ogcproxy\//i)[1] || '';
2322
+ return this.getProxyBase() + proxyPath.replace(/^\/+/, '');
2323
+ }
2324
+ return this.getProxyBase() + this.stripProtocol(url);
2317
2325
  }
2318
2326
 
2319
2327
  parseWMSLayers(xml) {
@@ -310,12 +310,20 @@ class UploadWidget extends React.Component {
310
310
  };
311
311
 
312
312
  getProxyBase = () => {
313
- // const href = window.location.href || '';
314
- // return href.replace('/en/map-viewer', '/ogcproxy/');
315
- return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
313
+ // const origin = window?.location?.origin || '';
314
+ // return origin ? `${origin}/ogcproxy/` : '/ogcproxy/';
315
+ // return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
316
+ return 'https://land.copernicus.eu/ogcproxy/';
316
317
  };
317
318
 
318
319
  buildProxiedUrl = (url) => {
320
+ if (!url) return url;
321
+ const hasProxy = /\/ogcproxy\//i.test(url);
322
+ if (hasProxy) {
323
+ const strippedUrl = this.stripProtocol(url);
324
+ const proxyPath = strippedUrl.split(/\/ogcproxy\//i)[1] || '';
325
+ return this.getProxyBase() + proxyPath.replace(/^\/+/, '');
326
+ }
319
327
  return this.getProxyBase() + this.stripProtocol(url);
320
328
  };
321
329