@abi-software/map-side-bar 2.3.2-beta.2 → 2.3.2-beta.4
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/dist/map-side-bar.js +502 -498
- package/dist/map-side-bar.umd.cjs +29 -33
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ConnectivityInfo.vue +71 -39
package/package.json
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
<external-resource-card :resources="resources"></external-resource-card>
|
|
22
22
|
</div>
|
|
23
|
-
<div>
|
|
23
|
+
<div class="title-buttons">
|
|
24
24
|
<el-popover
|
|
25
|
-
width="
|
|
25
|
+
width="auto"
|
|
26
26
|
trigger="hover"
|
|
27
27
|
:teleported="false"
|
|
28
|
-
popper-class="popover-
|
|
28
|
+
popper-class="popover-map-pin"
|
|
29
29
|
>
|
|
30
30
|
<template #reference>
|
|
31
31
|
<el-button class="button-circle" circle @click="showConnectivity(entry)">
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
Show connectivity on map
|
|
39
39
|
</span>
|
|
40
40
|
</el-popover>
|
|
41
|
+
<CopyToClipboard :content="updatedCopyContent" />
|
|
41
42
|
</div>
|
|
42
43
|
</div>
|
|
43
44
|
<div v-if="featuresAlert" class="attribute-title-container">
|
|
@@ -174,11 +175,6 @@
|
|
|
174
175
|
Search for data on components
|
|
175
176
|
</el-button>
|
|
176
177
|
</div>
|
|
177
|
-
|
|
178
|
-
<!-- Copy to clipboard button container -->
|
|
179
|
-
<div class="float-button-container">
|
|
180
|
-
<CopyToClipboard :content="updatedCopyContent" />
|
|
181
|
-
</div>
|
|
182
178
|
</div>
|
|
183
179
|
</template>
|
|
184
180
|
|
|
@@ -400,38 +396,54 @@ export default {
|
|
|
400
396
|
contentArray.push(`<div>${this.entry.paths}</div>`);
|
|
401
397
|
}
|
|
402
398
|
|
|
399
|
+
function transformData(title, items, itemsWithDatasets = []) {
|
|
400
|
+
let contentString = `<div><strong>${title}</strong></div>`;
|
|
401
|
+
const transformedItems = [];
|
|
402
|
+
items.forEach((item) => {
|
|
403
|
+
let itemNames = [];
|
|
404
|
+
item.split(',').forEach((name) => {
|
|
405
|
+
const match = itemsWithDatasets.find((a) => a.name === name.trim());
|
|
406
|
+
if (match) {
|
|
407
|
+
itemNames.push(`${capitalise(name)} (${match.id})`);
|
|
408
|
+
} else {
|
|
409
|
+
itemNames.push(`${capitalise(name)}`);
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
transformedItems.push(itemNames.join(','));
|
|
413
|
+
});
|
|
414
|
+
const contentList = transformedItems
|
|
415
|
+
.map((item) => `<li>${item}</li>`)
|
|
416
|
+
.join('\n');
|
|
417
|
+
contentString += '\n';
|
|
418
|
+
contentString += `<ul>${contentList}</ul>`;
|
|
419
|
+
return contentString;
|
|
420
|
+
}
|
|
421
|
+
|
|
403
422
|
// Origins
|
|
404
423
|
if (this.entry.origins?.length) {
|
|
405
|
-
|
|
406
|
-
const origins = this.entry.origins
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
originsContent += `<ul>${origins}</ul>`;
|
|
411
|
-
contentArray.push(originsContent);
|
|
424
|
+
const title = 'Origin';
|
|
425
|
+
const origins = this.entry.origins;
|
|
426
|
+
const originsWithDatasets = this.entry.originsWithDatasets;
|
|
427
|
+
const transformedOrigins = transformData(title, origins, originsWithDatasets);
|
|
428
|
+
contentArray.push(transformedOrigins);
|
|
412
429
|
}
|
|
413
430
|
|
|
414
431
|
// Components
|
|
415
432
|
if (this.entry.components?.length) {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
componentsContent += '\n';
|
|
422
|
-
componentsContent += `<ul>${components}</ul>`;
|
|
423
|
-
contentArray.push(componentsContent);
|
|
433
|
+
const title = 'Components';
|
|
434
|
+
const components = this.entry.components;
|
|
435
|
+
const componentsWithDatasets = this.entry.componentsWithDatasets;
|
|
436
|
+
const transformedComponents = transformData(title, components, componentsWithDatasets);
|
|
437
|
+
contentArray.push(transformedComponents);
|
|
424
438
|
}
|
|
425
439
|
|
|
426
440
|
// Destination
|
|
427
441
|
if (this.entry.destinations?.length) {
|
|
428
|
-
|
|
429
|
-
const destinations = this.entry.destinations
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
destinationsContent += `<ul>${destinations}</ul>`;
|
|
434
|
-
contentArray.push(destinationsContent);
|
|
442
|
+
const title = 'Destination';
|
|
443
|
+
const destinations = this.entry.destinations;
|
|
444
|
+
const destinationsWithDatasets = this.entry.destinationsWithDatasets;
|
|
445
|
+
const transformedDestinations = transformData(title, destinations, destinationsWithDatasets);
|
|
446
|
+
contentArray.push(transformedDestinations);
|
|
435
447
|
}
|
|
436
448
|
|
|
437
449
|
return contentArray.join('\n\n<br>');
|
|
@@ -479,6 +491,7 @@ export default {
|
|
|
479
491
|
}
|
|
480
492
|
|
|
481
493
|
.button-circle {
|
|
494
|
+
margin: 0;
|
|
482
495
|
width: 24px !important;
|
|
483
496
|
height: 24px !important;
|
|
484
497
|
|
|
@@ -706,16 +719,35 @@ export default {
|
|
|
706
719
|
top: 99.4%;
|
|
707
720
|
}
|
|
708
721
|
|
|
709
|
-
.
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
722
|
+
.title-buttons {
|
|
723
|
+
display: flex;
|
|
724
|
+
flex-direction: row;
|
|
725
|
+
gap: 0.5rem;
|
|
726
|
+
|
|
727
|
+
:deep(.copy-clipboard-button) {
|
|
728
|
+
&,
|
|
729
|
+
&:hover,
|
|
730
|
+
&:focus {
|
|
731
|
+
border-color: $app-primary-color !important;
|
|
732
|
+
border-radius: 50%;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
715
736
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
737
|
+
:deep(.el-popper.popover-map-pin) {
|
|
738
|
+
padding: 4px 10px;
|
|
739
|
+
min-width: max-content;
|
|
740
|
+
font-family: Asap;
|
|
741
|
+
font-size: 12px;
|
|
742
|
+
line-height: inherit;
|
|
743
|
+
color: inherit;
|
|
744
|
+
background: #f3ecf6 !important;
|
|
745
|
+
border: 1px solid $app-primary-color;
|
|
746
|
+
|
|
747
|
+
& .el-popper__arrow::before {
|
|
748
|
+
border: 1px solid;
|
|
749
|
+
border-color: $app-primary-color;
|
|
750
|
+
background: #f3ecf6;
|
|
719
751
|
}
|
|
720
752
|
}
|
|
721
753
|
</style>
|