+
+
{{ connectivityError.errorConnectivities }}
@@ -219,6 +216,10 @@
/>
+
+
+
+
@@ -234,9 +235,13 @@ import {
ElContainer as Container,
ElIcon as Icon,
} from 'element-plus'
-import ExternalResourceCard from './ExternalResourceCard.vue'
+
import EventBus from './EventBus.js'
-import { CopyToClipboard, ConnectivityGraph } from '@abi-software/map-utilities';
+import {
+ CopyToClipboard,
+ ConnectivityGraph,
+ ExternalResourceCard,
+} from '@abi-software/map-utilities';
import '@abi-software/map-utilities/dist/style.css';
const titleCase = (str) => {
@@ -307,6 +312,7 @@ export default {
connectivityError: null,
timeoutID: undefined,
graphViewLoaded: false,
+ updatedCopyContent: '',
}
},
watch: {
@@ -319,9 +325,6 @@ export default {
},
},
computed: {
- updatedCopyContent: function () {
- return this.getUpdateCopyContent();
- },
resources: function () {
let resources = [];
if (this.entry && this.entry.hyperlinks) {
@@ -421,7 +424,10 @@ export default {
const name = data.map(t => t.label).join(', ');
this.toggleConnectivityTooltip(name, {show: true});
},
- getUpdateCopyContent: function () {
+ onReferencesLoaded: function (references) {
+ this.updatedCopyContent = this.getUpdateCopyContent(references);
+ },
+ getUpdateCopyContent: function (references) {
if (!this.entry) {
return '';
}
@@ -443,21 +449,6 @@ export default {
contentArray.push(`
${this.provSpeciesDescription}
`);
}
- // PubMed URL
- if (this.resources?.length) {
- const pubmedContents = [];
- this.resources.forEach((resource) => {
- let pubmedContent = '';
- if (resource.id === 'pubmed') {
- pubmedContent += `
PubMed URL:
`;
- pubmedContent += '\n';
- pubmedContent += `
`;
- }
- pubmedContents.push(pubmedContent);
- });
- contentArray.push(pubmedContents.join('\n\n
'));
- }
-
// entry.paths
if (this.entry.paths) {
contentArray.push(`
${this.entry.paths}
`);
@@ -513,6 +504,17 @@ export default {
contentArray.push(transformedDestinations);
}
+ // References
+ if (references) {
+ let contentString = `
References
`;
+ contentString += '\n';
+ const contentList = references.list
+ .map((item) => `
${item}`)
+ .join('\n');
+ contentString += `
`;
+ contentArray.push(contentString);
+ }
+
return contentArray.join('\n\n
');
},
toggleConnectivityTooltip: function (name, option) {
@@ -597,6 +599,7 @@ export default {
},
},
mounted: function () {
+ this.updatedCopyContent = this.getUpdateCopyContent();
EventBus.on('connectivity-graph-error', (errorInfo) => {
this.pushConnectivityError(errorInfo);
});
@@ -617,6 +620,11 @@ export default {
flex-direction: row;
justify-content: space-between;
gap: 1rem;
+
+ .title-content {
+ flex: 1 0 0%;
+ max-width: 85%;
+ }
}
.title {
@@ -922,7 +930,10 @@ export default {
.title-buttons {
display: flex;
+ flex: 1 0 0%;
+ max-width: 15%;
flex-direction: row;
+ justify-content: end;
gap: 0.5rem;
:deep(.copy-clipboard-button) {
@@ -954,12 +965,18 @@ export default {
.content-container-connectivity {
position: relative;
+
+ &:not([style*="display: none"]) ~ .content-container-references {
+ margin-top: -1.25rem;
+ }
}
.connectivity-error-container {
position: sticky;
bottom: 0.5rem;
width: 100%;
+ min-height: 31px; // placeholder
+ margin-top: -10px !important;
display: flex;
flex-direction: row;
align-items: center;
diff --git a/src/components/ExternalResourceCard.vue b/src/components/ExternalResourceCard.vue
deleted file mode 100644
index 15ffe876..00000000
--- a/src/components/ExternalResourceCard.vue
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
- Open publications in PubMed
-
-
-
-
-
-
-
-
-
diff --git a/src/exampleConnectivityInput.js b/src/exampleConnectivityInput.js
index 6d73e2bb..b530c36f 100644
--- a/src/exampleConnectivityInput.js
+++ b/src/exampleConnectivityInput.js
@@ -274,10 +274,7 @@ export default {
"ilxtr:neuron-type-aacar-5"
],
"hyperlinks": [
- {
- "url": "https://pubmed.ncbi.nlm.nih.gov/?term=%2F%2Fwww.ncbi.nlm.nih.gov%2Fpubmed%2F27783854",
- "id": "pubmed"
- }
+ "https://doi.org/10.1002/cphy.c150046"
],
"provenanceTaxonomy": [
"NCBITaxon:9606",