@abi-software/mapintegratedvuer 1.18.3 → 1.18.4-beta.1
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/{ConnectivityGraph-DLFptXBx.js → ConnectivityGraph-2udNFLIF.js} +2 -2
- package/dist/{ContentMixin-mlgJKWSV.js → ContentMixin-CNjL9TTP.js} +1 -1
- package/dist/{Flatmap-C_dxdPoG.js → Flatmap-B_ca6idg.js} +3 -3
- package/dist/{Iframe-DSs4fYFg.js → Iframe-ba2kWoQp.js} +2 -2
- package/dist/{MultiFlatmap-CR4VErZA.js → MultiFlatmap-CS6SZ-le.js} +3 -3
- package/dist/{Plot-DR5LbEyP.js → Plot-BQtVooP8.js} +2 -2
- package/dist/{Scaffold-BWpF_Rpf.js → Scaffold-pMqcYh1l.js} +2 -2
- package/dist/{Simulation-CVXo2IEG.js → Simulation-ChMh8Nmk.js} +2 -2
- package/dist/{index-CMkLXnxB.js → index-DfylWmCz.js} +26 -7
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +1 -1
- package/dist/{style-BQwr0Nf9.js → style-Bxxbwgzs.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ContextCard.vue +40 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.4-beta.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vite --host --force",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@abi-software/map-utilities": "1.8.3",
|
|
58
58
|
"@abi-software/plotvuer": "1.0.7",
|
|
59
59
|
"@abi-software/scaffoldvuer": "1.15.6",
|
|
60
|
-
"@abi-software/simulationvuer": "3.
|
|
60
|
+
"@abi-software/simulationvuer": "3.2.6",
|
|
61
61
|
"@abi-software/sparc-annotation": "0.3.2",
|
|
62
62
|
"@abi-software/svg-sprite": "1.0.4",
|
|
63
63
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -263,7 +263,7 @@ export default {
|
|
|
263
263
|
this.flatmapSource.forEach((source, i) => {
|
|
264
264
|
const path = this.generateFileLink(source);
|
|
265
265
|
let flatmapContent = `<div>${source.name}</div>`;
|
|
266
|
-
let flatmapSource = this.flatmapAPI ?
|
|
266
|
+
let flatmapSource = this.flatmapAPI ?
|
|
267
267
|
`${this.flatmapAPI}viewer?id=${source.flatmapUUID}` : source.flatmapUUID;
|
|
268
268
|
flatmapContent += `\n`;
|
|
269
269
|
flatmapContent += `<div><a href="${flatmapSource}">${flatmapSource}</a></div>`;
|
|
@@ -413,8 +413,16 @@ export default {
|
|
|
413
413
|
},
|
|
414
414
|
generateFileLink(sample){
|
|
415
415
|
const path = this.processPathForUrl(sample.path);
|
|
416
|
-
|
|
417
|
-
link =
|
|
416
|
+
const version = sample.version || '';
|
|
417
|
+
let link = '';
|
|
418
|
+
|
|
419
|
+
if (sample.datasetURL) {
|
|
420
|
+
const datasetFileURL = sample.datasetURL.replace(/datasets\/(\d+)\/version\/(\d+)/, "datasets/file/$1/$2");
|
|
421
|
+
link = `${datasetFileURL}?path=${path}`;
|
|
422
|
+
} else if (sample.discoverId) {
|
|
423
|
+
link = `${this.envVars.ROOT_URL}/datasets/file/${sample.discoverId}/${version}?path=${path}`;
|
|
424
|
+
}
|
|
425
|
+
|
|
418
426
|
return link;
|
|
419
427
|
},
|
|
420
428
|
parseMarkdown(markdown){
|
|
@@ -427,6 +435,28 @@ export default {
|
|
|
427
435
|
const viewUrl = this.getFileFromPath(view.path)
|
|
428
436
|
this.$emit("scaffold-view-clicked", viewUrl);
|
|
429
437
|
},
|
|
438
|
+
fetchDOIURL: async function (doi) {
|
|
439
|
+
const doiKey = doi.includes('https://doi.org/') ? this.splitDoiFromUrl(doi) : doi;
|
|
440
|
+
const apiURL = `https://doi.org/api/handles/${doiKey}?noredirect`;
|
|
441
|
+
|
|
442
|
+
try {
|
|
443
|
+
const response = await fetch(apiURL);
|
|
444
|
+
if (!response.ok) {
|
|
445
|
+
throw new Error(`Response status: ${response.status}`);
|
|
446
|
+
}
|
|
447
|
+
const data = await response.json();
|
|
448
|
+
|
|
449
|
+
const urlEntry = data.values?.find(item => item.type === 'URL');
|
|
450
|
+
|
|
451
|
+
if (urlEntry && urlEntry.data && urlEntry.data.value) {
|
|
452
|
+
return urlEntry.data.value;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
throw new Error("Redirect URL not found in DOI metadata");
|
|
456
|
+
} catch (error) {
|
|
457
|
+
throw new Error(error);
|
|
458
|
+
}
|
|
459
|
+
},
|
|
430
460
|
getOriginalSource: function() {
|
|
431
461
|
const discoverId = this.entry.discoverId
|
|
432
462
|
const filesPos = 'files/'.length
|
|
@@ -449,7 +479,12 @@ export default {
|
|
|
449
479
|
.then((data) => {
|
|
450
480
|
this.loadingOriginalSource = false
|
|
451
481
|
if (data.result) {
|
|
452
|
-
data.result.forEach(result => {
|
|
482
|
+
data.result.forEach(async (result) => {
|
|
483
|
+
if (result.doi) {
|
|
484
|
+
const datasetURL = await this.fetchDOIURL(result.doi);
|
|
485
|
+
result.datasetURL = datasetURL
|
|
486
|
+
result.name = result.name || result.path.split('/').pop()
|
|
487
|
+
}
|
|
453
488
|
if (result.flatmapUUID) {
|
|
454
489
|
this.flatmapSource.push(result)
|
|
455
490
|
} else {
|
|
@@ -636,7 +671,7 @@ export default {
|
|
|
636
671
|
visibility: visible;
|
|
637
672
|
}
|
|
638
673
|
}
|
|
639
|
-
|
|
674
|
+
|
|
640
675
|
.flatmap-entry {
|
|
641
676
|
margin-top: 16px;
|
|
642
677
|
}
|