@eeacms/volto-arcgis-block 0.1.218 → 0.1.220
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,7 +4,14 @@ 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.
|
|
7
|
+
### [0.1.220](https://github.com/eea/volto-arcgis-block/compare/0.1.219...0.1.220) - 24 October 2023
|
|
8
|
+
|
|
9
|
+
### [0.1.219](https://github.com/eea/volto-arcgis-block/compare/0.1.218...0.1.219) - 24 October 2023
|
|
10
|
+
|
|
11
|
+
#### :hammer_and_wrench: Others
|
|
12
|
+
|
|
13
|
+
- Add to cart button disabled if area of interest is no allowed [masanchez85 - [`5682616`](https://github.com/eea/volto-arcgis-block/commit/5682616ce95f62fb61461e8950866902bb8efc26)]
|
|
14
|
+
### [0.1.218](https://github.com/eea/volto-arcgis-block/compare/0.1.217...0.1.218) - 24 October 2023
|
|
8
15
|
|
|
9
16
|
### [0.1.217](https://github.com/eea/volto-arcgis-block/compare/0.1.216...0.1.217) - 23 October 2023
|
|
10
17
|
|
package/package.json
CHANGED
|
@@ -419,20 +419,9 @@ class AreaWidget extends React.Component {
|
|
|
419
419
|
async initFMI() {
|
|
420
420
|
let currentUrl = window.location.href.split('.eu');
|
|
421
421
|
let fetchUrl = '';
|
|
422
|
-
if (currentUrl[0] === 'https://
|
|
423
|
-
fetchUrl =
|
|
424
|
-
|
|
425
|
-
fetchUrl = fetchUrl + '/++api++/@registry';
|
|
426
|
-
} else {
|
|
427
|
-
fetchUrl = fetchUrl + '/++api++/@anon-registry';
|
|
428
|
-
}
|
|
429
|
-
} else if (currentUrl[0] === 'https://clmsdemo.devel6cph.eea') {
|
|
430
|
-
fetchUrl = 'https://clmsdemo.devel6cph.eea.europa.eu';
|
|
431
|
-
if (this.getAuthToken()) {
|
|
432
|
-
fetchUrl = fetchUrl + '/++api++/@registry';
|
|
433
|
-
} else {
|
|
434
|
-
fetchUrl = fetchUrl + '/++api++/@anon-registry';
|
|
435
|
-
}
|
|
422
|
+
if (currentUrl[0] === 'https://clmsdemo.devel6cph.eea') {
|
|
423
|
+
fetchUrl =
|
|
424
|
+
'https://clmsdemo.devel6cph.eea.europa.eu/++api++/@anon-registry';
|
|
436
425
|
} else {
|
|
437
426
|
fetchUrl = 'https://land.copernicus.eu/++api++/@anon-registry';
|
|
438
427
|
}
|
|
@@ -447,31 +436,6 @@ class AreaWidget extends React.Component {
|
|
|
447
436
|
//console.error('There was a problem with the fetch operation:', error);
|
|
448
437
|
}
|
|
449
438
|
}
|
|
450
|
-
getAuthToken() {
|
|
451
|
-
let tokenResult = null;
|
|
452
|
-
if (this.getCookie('auth_token')) {
|
|
453
|
-
tokenResult = true;
|
|
454
|
-
} else {
|
|
455
|
-
tokenResult = false;
|
|
456
|
-
}
|
|
457
|
-
return tokenResult;
|
|
458
|
-
}
|
|
459
|
-
getCookie(name) {
|
|
460
|
-
var dc = document.cookie;
|
|
461
|
-
var prefix = name + '=';
|
|
462
|
-
var begin = dc.indexOf('; ' + prefix);
|
|
463
|
-
if (begin === -1) {
|
|
464
|
-
begin = dc.indexOf(prefix);
|
|
465
|
-
if (begin !== 0) return null;
|
|
466
|
-
} else {
|
|
467
|
-
begin += 2;
|
|
468
|
-
var end = document.cookie.indexOf(';', begin);
|
|
469
|
-
if (end === -1) {
|
|
470
|
-
end = dc.length;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
return decodeURI(dc.substring(begin + prefix.length, end));
|
|
474
|
-
}
|
|
475
439
|
/**
|
|
476
440
|
* This method renders the component
|
|
477
441
|
* @returns jsx
|
|
@@ -107,7 +107,11 @@ export const AddCartItem = ({
|
|
|
107
107
|
) {
|
|
108
108
|
document.getElementById('products_label').click();
|
|
109
109
|
} else {
|
|
110
|
-
if (
|
|
110
|
+
if (
|
|
111
|
+
areaData &&
|
|
112
|
+
document.querySelector('.drawRectanglePopup-block').style
|
|
113
|
+
.display === 'none'
|
|
114
|
+
) {
|
|
111
115
|
checkArea(e);
|
|
112
116
|
}
|
|
113
117
|
}
|
|
@@ -200,20 +200,9 @@ class UseCasesMapViewer extends React.Component {
|
|
|
200
200
|
async initFMI() {
|
|
201
201
|
let currentUrl = window.location.href.split('.eu');
|
|
202
202
|
let fetchUrl = '';
|
|
203
|
-
if (currentUrl[0] === 'https://
|
|
204
|
-
fetchUrl =
|
|
205
|
-
|
|
206
|
-
fetchUrl = fetchUrl + '/++api++/@registry';
|
|
207
|
-
} else {
|
|
208
|
-
fetchUrl = fetchUrl + '/++api++/@anon-registry';
|
|
209
|
-
}
|
|
210
|
-
} else if (currentUrl[0] === 'https://clmsdemo.devel6cph.eea') {
|
|
211
|
-
fetchUrl = 'https://clmsdemo.devel6cph.eea.europa.eu';
|
|
212
|
-
if (this.getAuthToken()) {
|
|
213
|
-
fetchUrl = fetchUrl + '/++api++/@registry';
|
|
214
|
-
} else {
|
|
215
|
-
fetchUrl = fetchUrl + '/++api++/@anon-registry';
|
|
216
|
-
}
|
|
203
|
+
if (currentUrl[0] === 'https://clmsdemo.devel6cph.eea') {
|
|
204
|
+
fetchUrl =
|
|
205
|
+
'https://clmsdemo.devel6cph.eea.europa.eu/++api++/@anon-registry';
|
|
217
206
|
} else {
|
|
218
207
|
fetchUrl = 'https://land.copernicus.eu/++api++/@anon-registry';
|
|
219
208
|
}
|
|
@@ -250,31 +239,6 @@ class UseCasesMapViewer extends React.Component {
|
|
|
250
239
|
//console.error('There was a problem with the fetch operation:', error);
|
|
251
240
|
}
|
|
252
241
|
}
|
|
253
|
-
getAuthToken() {
|
|
254
|
-
let tokenResult = null;
|
|
255
|
-
if (this.getCookie('auth_token')) {
|
|
256
|
-
tokenResult = true;
|
|
257
|
-
} else {
|
|
258
|
-
tokenResult = false;
|
|
259
|
-
}
|
|
260
|
-
return tokenResult;
|
|
261
|
-
}
|
|
262
|
-
getCookie(name) {
|
|
263
|
-
var dc = document.cookie;
|
|
264
|
-
var prefix = name + '=';
|
|
265
|
-
var begin = dc.indexOf('; ' + prefix);
|
|
266
|
-
if (begin === -1) {
|
|
267
|
-
begin = dc.indexOf(prefix);
|
|
268
|
-
if (begin !== 0) return null;
|
|
269
|
-
} else {
|
|
270
|
-
begin += 2;
|
|
271
|
-
var end = document.cookie.indexOf(';', begin);
|
|
272
|
-
if (end === -1) {
|
|
273
|
-
end = dc.length;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return decodeURI(dc.substring(begin + prefix.length, end));
|
|
277
|
-
}
|
|
278
242
|
/**
|
|
279
243
|
* This method will disable all the functionalities on the map
|
|
280
244
|
* @param {MapView} view
|