@eeacms/volto-arcgis-block 0.1.53 → 0.1.54
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,13 @@ 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.54](https://github.com/eea/volto-arcgis-block/compare/0.1.53...0.1.54) - 9 September 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- ESLint fix [rodriama - [`8860f76`](https://github.com/eea/volto-arcgis-block/commit/8860f7649e8dddc2ec999ee1eb2367e810e29017)]
|
|
12
|
+
- ESLint fix [rodriama - [`88aeea7`](https://github.com/eea/volto-arcgis-block/commit/88aeea7a1b3c8b77df43de9217f60553d1d5ed41)]
|
|
13
|
+
- Use cases display page [Jose Asensio - [`6070438`](https://github.com/eea/volto-arcgis-block/commit/6070438872216bfb5450060a7ae20ca368429a20)]
|
|
7
14
|
### [0.1.53](https://github.com/eea/volto-arcgis-block/compare/0.1.52...0.1.53) - 7 September 2022
|
|
8
15
|
|
|
9
16
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -58,17 +58,19 @@ class InfoWidget extends React.Component {
|
|
|
58
58
|
</div>
|
|
59
59
|
<div className="use-case-detail-content">
|
|
60
60
|
<div className="use-case-detail-product">
|
|
61
|
-
{UseCase.
|
|
61
|
+
{UseCase.Use_case_topics}
|
|
62
62
|
</div>
|
|
63
63
|
<div className="use-case-detail-title">
|
|
64
64
|
<h3>{UseCase.Use_case_title}</h3>
|
|
65
65
|
</div>
|
|
66
66
|
<div className="use-case-detail-info">
|
|
67
|
-
<span>{UseCase.Use_case_topics}</span>
|
|
68
67
|
<span>{UseCase.Use_case_submitting_production_year}</span>
|
|
69
68
|
<span>{UseCase.Origin_name}</span>
|
|
70
69
|
<span>{responsibleOrganizationOrPerson}</span>
|
|
71
70
|
</div>
|
|
71
|
+
<div className="use-case-detail-info">
|
|
72
|
+
<b>{UseCase.Copernicus_Land_Monitoring_Service_products_used}</b>
|
|
73
|
+
</div>
|
|
72
74
|
<div className="use-case-detail-description">
|
|
73
75
|
<p>{UseCase.Use_case_summary}</p>
|
|
74
76
|
{UseCase.Links_to_web_sites && (
|
|
@@ -186,10 +188,13 @@ class InfoWidget extends React.Component {
|
|
|
186
188
|
regionFeatures.push(this.features[feature].attributes);
|
|
187
189
|
}
|
|
188
190
|
}
|
|
191
|
+
let count = [...new Set(regionFeatures.map((item) => item.Use_case_id))]
|
|
192
|
+
.length;
|
|
193
|
+
|
|
189
194
|
return (
|
|
190
195
|
<div>
|
|
191
196
|
<div className="use-cases-products-title">
|
|
192
|
-
<span>{
|
|
197
|
+
<span>{count} </span>
|
|
193
198
|
use cases
|
|
194
199
|
</div>
|
|
195
200
|
<div className="use-case-button-back">
|
|
@@ -220,10 +225,12 @@ class InfoWidget extends React.Component {
|
|
|
220
225
|
mapViewer.state.selectedUseCases[feature].attributes,
|
|
221
226
|
);
|
|
222
227
|
}
|
|
228
|
+
let count = [...new Set(regionFeatures.map((item) => item.Use_case_id))]
|
|
229
|
+
.length;
|
|
223
230
|
return (
|
|
224
231
|
<>
|
|
225
232
|
<div className="use-cases-products-title">
|
|
226
|
-
<span>{
|
|
233
|
+
<span>{count} </span>
|
|
227
234
|
use cases
|
|
228
235
|
</div>
|
|
229
236
|
<div className="use-case-button-back">
|
|
@@ -248,41 +255,35 @@ class InfoWidget extends React.Component {
|
|
|
248
255
|
}
|
|
249
256
|
|
|
250
257
|
/**
|
|
251
|
-
* Transfrom raw data to ordered data by
|
|
258
|
+
* Transfrom raw data to ordered data by environmental topics
|
|
252
259
|
*/
|
|
253
260
|
proccessDataSummary() {
|
|
254
|
-
let
|
|
255
|
-
let elements = [];
|
|
261
|
+
let topicProducts = this.getDifferentTopicUsed(this.features);
|
|
256
262
|
|
|
257
|
-
for (let
|
|
258
|
-
processedData[
|
|
263
|
+
for (let topicProduct in topicProducts) {
|
|
264
|
+
processedData[topicProducts[topicProduct]] = [];
|
|
259
265
|
}
|
|
260
266
|
|
|
261
267
|
for (let feature in this.features) {
|
|
262
|
-
|
|
263
|
-
}
|
|
268
|
+
let topics = this.features[feature].attributes.Use_case_topics.split(',');
|
|
264
269
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
].push(elements[element]);
|
|
270
|
+
for (let topic in topics) {
|
|
271
|
+
processedData[topics[topic]].push(this.features[feature].attributes);
|
|
272
|
+
}
|
|
269
273
|
}
|
|
270
274
|
}
|
|
271
275
|
|
|
272
276
|
/**
|
|
273
|
-
* Creates lateral menu ordered by specified
|
|
277
|
+
* Creates lateral menu ordered by specified environmental topic
|
|
274
278
|
* @param {Object} data
|
|
275
|
-
* @param {String}
|
|
279
|
+
* @param {String} topic_name
|
|
276
280
|
* @returns lateralMenuDOM
|
|
277
281
|
*/
|
|
278
|
-
getDataSummary(data,
|
|
282
|
+
getDataSummary(data, topic_name) {
|
|
279
283
|
let children = this.getDataBrief(data);
|
|
280
284
|
|
|
281
285
|
return (
|
|
282
|
-
<div
|
|
283
|
-
key={Copernicus_Land_Monitoring_Service_products_used}
|
|
284
|
-
className="use-cases-dropdown"
|
|
285
|
-
>
|
|
286
|
+
<div key={topic_name} className="use-cases-dropdown">
|
|
286
287
|
<div
|
|
287
288
|
className="ccl-expandable__button"
|
|
288
289
|
aria-expanded="false"
|
|
@@ -291,7 +292,7 @@ class InfoWidget extends React.Component {
|
|
|
291
292
|
tabIndex="0"
|
|
292
293
|
role="button"
|
|
293
294
|
>
|
|
294
|
-
{
|
|
295
|
+
{topic_name}
|
|
295
296
|
</div>
|
|
296
297
|
<div className="use-cases-element-container">{children}</div>
|
|
297
298
|
</div>
|
|
@@ -322,9 +323,9 @@ class InfoWidget extends React.Component {
|
|
|
322
323
|
setDOMSummary() {
|
|
323
324
|
this.proccessDataSummary();
|
|
324
325
|
let DOMElements = [];
|
|
325
|
-
for (let
|
|
326
|
+
for (let topic_name in processedData)
|
|
326
327
|
DOMElements.push(
|
|
327
|
-
this.getDataSummary(processedData[
|
|
328
|
+
this.getDataSummary(processedData[topic_name], topic_name),
|
|
328
329
|
);
|
|
329
330
|
return <>{DOMElements}</>;
|
|
330
331
|
}
|
|
@@ -339,27 +340,23 @@ class InfoWidget extends React.Component {
|
|
|
339
340
|
}
|
|
340
341
|
|
|
341
342
|
/**
|
|
342
|
-
* Returns all different
|
|
343
|
+
* Returns all different Environmental Topic names
|
|
343
344
|
* @param {Array} features
|
|
344
|
-
* @returns
|
|
345
|
+
* @returns allTopicNames
|
|
345
346
|
*/
|
|
346
|
-
|
|
347
|
-
let
|
|
348
|
-
oldFeatureName = '';
|
|
347
|
+
getDifferentTopicUsed(features) {
|
|
348
|
+
let topicProducts = [];
|
|
349
349
|
|
|
350
350
|
for (let feature in features) {
|
|
351
|
-
let
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
) {
|
|
358
|
-
serviceProducts.push(currentCLMS);
|
|
359
|
-
oldFeatureName = currentCLMS;
|
|
351
|
+
let topics = features[feature].attributes.Use_case_topics.split(',');
|
|
352
|
+
|
|
353
|
+
for (let topic in topics) {
|
|
354
|
+
if (!topicProducts.includes(topics[topic])) {
|
|
355
|
+
topicProducts.push(topics[topic]);
|
|
356
|
+
}
|
|
360
357
|
}
|
|
361
358
|
}
|
|
362
|
-
return
|
|
359
|
+
return topicProducts.sort();
|
|
363
360
|
}
|
|
364
361
|
|
|
365
362
|
/**
|
|
@@ -406,7 +403,15 @@ class InfoWidget extends React.Component {
|
|
|
406
403
|
return (
|
|
407
404
|
<>
|
|
408
405
|
<div className="use-cases-products-title">
|
|
409
|
-
<span>
|
|
406
|
+
<span>
|
|
407
|
+
{
|
|
408
|
+
[
|
|
409
|
+
...new Set(
|
|
410
|
+
this.features.map((item) => item.attributes.Use_case_id),
|
|
411
|
+
),
|
|
412
|
+
].length
|
|
413
|
+
}{' '}
|
|
414
|
+
</span>
|
|
410
415
|
use cases
|
|
411
416
|
</div>
|
|
412
417
|
<div className="use-cases-products-list">
|
|
@@ -353,21 +353,39 @@ class UseCasesMapViewer extends React.Component {
|
|
|
353
353
|
let region = response.results[0].graphic.attributes.Region;
|
|
354
354
|
|
|
355
355
|
layerControl.getRegionInfo(region, (data) => {
|
|
356
|
-
let data_eu =
|
|
357
|
-
(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
356
|
+
let data_eu = [
|
|
357
|
+
...new Set(
|
|
358
|
+
data.features
|
|
359
|
+
.filter((a) => a.attributes.Spatial_coverage === 'EU')
|
|
360
|
+
.map((item) => item.attributes.Use_case_id),
|
|
361
|
+
),
|
|
362
|
+
].length;
|
|
363
|
+
let data_eea = [
|
|
364
|
+
...new Set(
|
|
365
|
+
data.features
|
|
366
|
+
.filter((a) => a.attributes.Spatial_coverage === 'EEA')
|
|
367
|
+
.map((item) => item.attributes.Use_case_id),
|
|
368
|
+
),
|
|
369
|
+
].length;
|
|
370
|
+
let data_global = [
|
|
371
|
+
...new Set(
|
|
372
|
+
data.features
|
|
373
|
+
.filter((a) => a.attributes.Spatial_coverage === 'GLOBAL')
|
|
374
|
+
.map((item) => item.attributes.Use_case_id),
|
|
375
|
+
),
|
|
376
|
+
].length;
|
|
377
|
+
let data_country = [
|
|
378
|
+
...new Set(
|
|
379
|
+
data.features
|
|
380
|
+
.filter(
|
|
381
|
+
(a) =>
|
|
382
|
+
a.attributes.Spatial_coverage !== 'EU' &&
|
|
383
|
+
a.attributes.Spatial_coverage !== 'EEA' &&
|
|
384
|
+
a.attributes.Spatial_coverage !== 'GLOBAL',
|
|
385
|
+
)
|
|
386
|
+
.map((item) => item.attributes.Use_case_id),
|
|
387
|
+
),
|
|
388
|
+
].length;
|
|
371
389
|
|
|
372
390
|
let string = '';
|
|
373
391
|
if (data_eu > 0) {
|