@eeacms/volto-arcgis-block 0.1.52 → 0.1.53
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.53](https://github.com/eea/volto-arcgis-block/compare/0.1.52...0.1.53) - 7 September 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Console error fix [rodriama - [`ae7e327`](https://github.com/eea/volto-arcgis-block/commit/ae7e327ce30dc7bd5fd48c012ee65ec9e70178b6)]
|
|
12
|
+
- CLMS-1294, CLMS-1293 [rodriama - [`df31c1a`](https://github.com/eea/volto-arcgis-block/commit/df31c1a800b2a4d85dc882de729f8bec87f99414)]
|
|
7
13
|
### [0.1.52](https://github.com/eea/volto-arcgis-block/compare/0.1.51...0.1.52) - 5 September 2022
|
|
8
14
|
|
|
9
15
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -246,7 +246,7 @@ class AreaWidget extends React.Component {
|
|
|
246
246
|
});
|
|
247
247
|
|
|
248
248
|
this.props.download
|
|
249
|
-
? this.props.view.ui.add(this.container)
|
|
249
|
+
? this.container !== null && this.props.view.ui.add(this.container)
|
|
250
250
|
: this.props.view.ui.add(this.container.current, 'top-right');
|
|
251
251
|
}
|
|
252
252
|
|
|
@@ -377,30 +377,6 @@ class AreaWidget extends React.Component {
|
|
|
377
377
|
</div>
|
|
378
378
|
</label>
|
|
379
379
|
</div>
|
|
380
|
-
<div>
|
|
381
|
-
{/* <div class="map-download-resource">
|
|
382
|
-
<div class="ccl-form">
|
|
383
|
-
<div class="map-download-header">
|
|
384
|
-
<label for="download_area_select" class="map-download-header-title">Download resource as</label>
|
|
385
|
-
<span class="info-icon" tooltip="Info" direction="up">
|
|
386
|
-
<FontAwesomeIcon
|
|
387
|
-
className="map-menu-icon"
|
|
388
|
-
icon={['fas', 'info-circle']}
|
|
389
|
-
/>
|
|
390
|
-
</span>
|
|
391
|
-
</div>
|
|
392
|
-
<div class="ccl-select-container">
|
|
393
|
-
<div class="ccl-select-container">
|
|
394
|
-
<select class="ccl-select" id="download_area_select" name="" >
|
|
395
|
-
<option value="option1">GeoTiff</option>
|
|
396
|
-
<option value="option2">ESRI Geodatabase</option>
|
|
397
|
-
<option value="option3">SQLite Database</option>
|
|
398
|
-
</select>
|
|
399
|
-
</div>
|
|
400
|
-
</div>
|
|
401
|
-
</div>
|
|
402
|
-
</div> */}
|
|
403
|
-
</div>
|
|
404
380
|
</fieldset>
|
|
405
381
|
</div>
|
|
406
382
|
</div>
|
|
@@ -32,7 +32,7 @@ export const AddCartItem = ({
|
|
|
32
32
|
const [showMessage, setShowMessage] = useState(false);
|
|
33
33
|
const [modal, setModal] = useState(false);
|
|
34
34
|
|
|
35
|
-
const checkArea = () => {
|
|
35
|
+
const checkArea = (e) => {
|
|
36
36
|
let check = document.querySelector('.area-panel input:checked').value;
|
|
37
37
|
let area = {};
|
|
38
38
|
if (check === 'area') {
|
|
@@ -68,7 +68,7 @@ export const AddCartItem = ({
|
|
|
68
68
|
showMessageTimer();
|
|
69
69
|
}
|
|
70
70
|
} else {
|
|
71
|
-
|
|
71
|
+
closeModal(e);
|
|
72
72
|
let data = checkCartData(cartData, area, dataset);
|
|
73
73
|
addCartItem(data).then(() => {
|
|
74
74
|
setMessage('Added to cart');
|
|
@@ -121,11 +121,13 @@ export const AddCartItem = ({
|
|
|
121
121
|
}, 4000);
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
const showModal = () => {
|
|
124
|
+
const showModal = (e) => {
|
|
125
|
+
if (e) e.stopPropagation();
|
|
125
126
|
setModal(true);
|
|
126
127
|
};
|
|
127
128
|
|
|
128
|
-
const closeModal = () => {
|
|
129
|
+
const closeModal = (e) => {
|
|
130
|
+
if (e) e.stopPropagation();
|
|
129
131
|
setModal(false);
|
|
130
132
|
};
|
|
131
133
|
|
|
@@ -144,7 +146,7 @@ export const AddCartItem = ({
|
|
|
144
146
|
}
|
|
145
147
|
};
|
|
146
148
|
|
|
147
|
-
const selectBBox = () => {
|
|
149
|
+
const selectBBox = (e) => {
|
|
148
150
|
if (
|
|
149
151
|
!mapViewer.activeWidget ||
|
|
150
152
|
!mapViewer.activeWidget.container.current.classList.contains(
|
|
@@ -159,7 +161,7 @@ export const AddCartItem = ({
|
|
|
159
161
|
let node = document.getElementById('map_area_button');
|
|
160
162
|
node.dispatchEvent(event);
|
|
161
163
|
}
|
|
162
|
-
closeModal();
|
|
164
|
+
closeModal(e);
|
|
163
165
|
};
|
|
164
166
|
|
|
165
167
|
const showLogin = (e) => {
|
|
@@ -184,6 +186,7 @@ export const AddCartItem = ({
|
|
|
184
186
|
floating
|
|
185
187
|
size="small"
|
|
186
188
|
style={{
|
|
189
|
+
zIndex: 2,
|
|
187
190
|
transform: download
|
|
188
191
|
? 'translate(1rem, 4rem)'
|
|
189
192
|
: checkScrollPosition(),
|
|
@@ -222,8 +225,8 @@ export const AddCartItem = ({
|
|
|
222
225
|
<span
|
|
223
226
|
className="ccl-icon-close"
|
|
224
227
|
aria-label="Close"
|
|
225
|
-
onClick={() => closeModal()}
|
|
226
|
-
onKeyDown={() => closeModal()}
|
|
228
|
+
onClick={(e) => closeModal(e)}
|
|
229
|
+
onKeyDown={(e) => closeModal(e)}
|
|
227
230
|
tabIndex="0"
|
|
228
231
|
role="button"
|
|
229
232
|
></span>
|
|
@@ -234,26 +237,44 @@ export const AddCartItem = ({
|
|
|
234
237
|
<ul>
|
|
235
238
|
<li>
|
|
236
239
|
<p>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
Europe is selected by
|
|
240
|
+
If you would like to download entire dataset select Add
|
|
241
|
+
entire dataset (Note: download will take longer for large
|
|
242
|
+
datasets, and the bounding box for Europe is selected by
|
|
243
|
+
default).
|
|
240
244
|
</p>
|
|
241
245
|
</li>
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
<br />
|
|
247
|
+
{dataset.IsTimeSeries ? (
|
|
248
|
+
<>
|
|
249
|
+
<li>
|
|
250
|
+
<p>
|
|
251
|
+
if you would like to download data for your area of
|
|
252
|
+
interest select first area of interest and then click
|
|
253
|
+
download button next to the dataset (Note: the time
|
|
254
|
+
range to download will be the first date of the
|
|
255
|
+
dataset but if it is not informed in the metadata it
|
|
256
|
+
will be the last 10 days).
|
|
257
|
+
</p>
|
|
258
|
+
</li>
|
|
259
|
+
<br />
|
|
260
|
+
<li>
|
|
261
|
+
<p>
|
|
262
|
+
If you would like to download data for your area of
|
|
263
|
+
interest and for the selected time interval, please
|
|
264
|
+
follow this{' '}
|
|
265
|
+
<a href={dataset.DatasetURL + '/download-by-area'}>
|
|
266
|
+
link
|
|
267
|
+
</a>
|
|
268
|
+
.
|
|
269
|
+
</p>
|
|
270
|
+
</li>
|
|
271
|
+
</>
|
|
272
|
+
) : (
|
|
249
273
|
<li>
|
|
250
274
|
<p>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
Download by area
|
|
255
|
-
</a>
|
|
256
|
-
.
|
|
275
|
+
if you would like to download data for your area of
|
|
276
|
+
interest select first area of interest and then click
|
|
277
|
+
download button next to the dataset.
|
|
257
278
|
</p>
|
|
258
279
|
</li>
|
|
259
280
|
)}
|
|
@@ -266,28 +287,28 @@ export const AddCartItem = ({
|
|
|
266
287
|
<>
|
|
267
288
|
<button
|
|
268
289
|
className="ccl-button ccl-button-green"
|
|
269
|
-
onClick={() => checkArea()}
|
|
290
|
+
onClick={(e) => checkArea(e)}
|
|
270
291
|
>
|
|
271
|
-
Add
|
|
292
|
+
Add entire dataset
|
|
272
293
|
</button>
|
|
273
294
|
<button
|
|
274
295
|
className="ccl-button ccl-button--default"
|
|
275
|
-
onClick={() => selectBBox()}
|
|
296
|
+
onClick={(e) => selectBBox(e)}
|
|
276
297
|
>
|
|
277
|
-
|
|
298
|
+
Area of interest
|
|
278
299
|
</button>
|
|
279
300
|
</>
|
|
280
301
|
) : (
|
|
281
302
|
<>
|
|
282
303
|
<button
|
|
283
304
|
className="ccl-button ccl-button-green"
|
|
284
|
-
onClick={() => checkArea()}
|
|
305
|
+
onClick={(e) => checkArea(e)}
|
|
285
306
|
>
|
|
286
307
|
Add to cart
|
|
287
308
|
</button>
|
|
288
309
|
<button
|
|
289
310
|
className="ccl-button ccl-button--default"
|
|
290
|
-
onClick={() => closeModal()}
|
|
311
|
+
onClick={(e) => closeModal(e)}
|
|
291
312
|
>
|
|
292
313
|
Cancel
|
|
293
314
|
</button>
|
|
@@ -301,10 +322,10 @@ export const AddCartItem = ({
|
|
|
301
322
|
<span
|
|
302
323
|
className={'map-menu-icon map-menu-icon-login'}
|
|
303
324
|
onClick={(e) => {
|
|
304
|
-
isLoggedIn ? showModal() : showLogin(e);
|
|
325
|
+
isLoggedIn ? showModal(e) : showLogin(e);
|
|
305
326
|
}}
|
|
306
327
|
onKeyDown={(e) => {
|
|
307
|
-
isLoggedIn ? showModal() : showLogin(e);
|
|
328
|
+
isLoggedIn ? showModal(e) : showLogin(e);
|
|
308
329
|
}}
|
|
309
330
|
tabIndex="0"
|
|
310
331
|
role="button"
|
|
@@ -844,6 +865,8 @@ class MenuWidget extends React.Component {
|
|
|
844
865
|
href={dataset.DatasetURL}
|
|
845
866
|
target="_blank"
|
|
846
867
|
rel="noreferrer"
|
|
868
|
+
onClick={(e) => e.stopPropagation()}
|
|
869
|
+
onKeyDown={(e) => e.stopPropagation()}
|
|
847
870
|
>
|
|
848
871
|
<Popup
|
|
849
872
|
trigger={
|
|
@@ -643,6 +643,7 @@
|
|
|
643
643
|
#download_panel .area-panel {
|
|
644
644
|
width: 100%;
|
|
645
645
|
height: 100%;
|
|
646
|
+
font-size: 1rem;
|
|
646
647
|
}
|
|
647
648
|
|
|
648
649
|
.ui.floating.message {
|
|
@@ -791,6 +792,11 @@
|
|
|
791
792
|
display: none;
|
|
792
793
|
}
|
|
793
794
|
|
|
795
|
+
/* Scale */
|
|
796
|
+
.esri-scale-bar {
|
|
797
|
+
z-index: 0;
|
|
798
|
+
}
|
|
799
|
+
|
|
794
800
|
/* Modal */
|
|
795
801
|
.map-download-modal.ui.modal {
|
|
796
802
|
margin: 0 !important;
|