@abi-software/map-side-bar 2.3.2-beta.0 → 2.3.2-beta.2
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 +80 -40
- package/dist/map-side-bar.umd.cjs +18 -7
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ConnectivityInfo.vue +48 -20
- package/src/components/DatasetCard.vue +40 -4
package/dist/map-side-bar.js
CHANGED
|
@@ -27899,12 +27899,13 @@ const Rm = "Copy to clipboard", EG = "Copied!", FG = "#8300bf", TG = {
|
|
|
27899
27899
|
default: ""
|
|
27900
27900
|
},
|
|
27901
27901
|
/**
|
|
27902
|
-
*
|
|
27903
|
-
*
|
|
27902
|
+
* `theme: light` will show white button,
|
|
27903
|
+
* to use when the button is over other readable text content.
|
|
27904
|
+
* Default button is transparent.
|
|
27904
27905
|
*/
|
|
27905
27906
|
theme: {
|
|
27906
27907
|
type: String,
|
|
27907
|
-
default: "
|
|
27908
|
+
default: ""
|
|
27908
27909
|
}
|
|
27909
27910
|
},
|
|
27910
27911
|
data: function() {
|
|
@@ -27914,18 +27915,22 @@ const Rm = "Copy to clipboard", EG = "Copied!", FG = "#8300bf", TG = {
|
|
|
27914
27915
|
iconColor: FG
|
|
27915
27916
|
};
|
|
27916
27917
|
},
|
|
27917
|
-
mounted: function() {
|
|
27918
|
-
this.theme !== "light" && (this.iconColor = "white");
|
|
27919
|
-
},
|
|
27920
27918
|
methods: {
|
|
27921
27919
|
copyToClipboard: async function() {
|
|
27922
27920
|
let e = !0;
|
|
27923
27921
|
this.autoHideTimeout = 600;
|
|
27924
27922
|
try {
|
|
27925
|
-
|
|
27923
|
+
const t = this.content.replaceAll(`
|
|
27924
|
+
`, ""), n = document.createElement("div");
|
|
27925
|
+
n.innerHTML = this.content;
|
|
27926
|
+
const r = n.textContent || n.innerText || "", o = new Blob([t], { type: "text/html" }), a = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({
|
|
27927
|
+
"text/html": o,
|
|
27928
|
+
"text/plain": a
|
|
27929
|
+
});
|
|
27930
|
+
await navigator.clipboard.write([i]);
|
|
27926
27931
|
} catch (t) {
|
|
27927
27932
|
console.error(
|
|
27928
|
-
"Error when trying to use navigator.clipboard.
|
|
27933
|
+
"Error when trying to use navigator.clipboard.write()",
|
|
27929
27934
|
t
|
|
27930
27935
|
), e = !1;
|
|
27931
27936
|
}
|
|
@@ -27966,7 +27971,7 @@ function IG(e, t, n, r, o, a) {
|
|
|
27966
27971
|
_: 1
|
|
27967
27972
|
}, 8, ["content", "hide-after", "onHide"]);
|
|
27968
27973
|
}
|
|
27969
|
-
const bx = /* @__PURE__ */ kG(TG, [["render", IG], ["__scopeId", "data-v-
|
|
27974
|
+
const bx = /* @__PURE__ */ kG(TG, [["render", IG], ["__scopeId", "data-v-4f007f83"]]), NG = {
|
|
27970
27975
|
data() {
|
|
27971
27976
|
return {
|
|
27972
27977
|
ElIconView: O1
|
|
@@ -28078,7 +28083,7 @@ const bx = /* @__PURE__ */ kG(TG, [["render", IG], ["__scopeId", "data-v-e0e80a0
|
|
|
28078
28083
|
return t.json();
|
|
28079
28084
|
throw Error(t.statusText);
|
|
28080
28085
|
}).then((t) => {
|
|
28081
|
-
this.thumbnail = t.banner, this.discoverId = t.id, this.version = t.version, this.dataLocation = `https://sparc.science/datasets/${t.id}?type=dataset`, this.getBiolucidaInfo(this.discoverId), this.loading = !1;
|
|
28086
|
+
this.thumbnail = t.banner, this.discoverId = t.id, this.version = t.version, this.dataLocation = `https://sparc.science/datasets/${t.id}?type=dataset`, this.getBiolucidaInfo(this.discoverId), this.loading = !1, this.updateCopyContent();
|
|
28082
28087
|
}).catch(() => {
|
|
28083
28088
|
this.thumbnail = vg, this.discoverId = Number(this.entry.datasetId), this.loading = !1;
|
|
28084
28089
|
});
|
|
@@ -28095,13 +28100,33 @@ const bx = /* @__PURE__ */ kG(TG, [["render", IG], ["__scopeId", "data-v-e0e80a0
|
|
|
28095
28100
|
},
|
|
28096
28101
|
updateCopyContent: function() {
|
|
28097
28102
|
const e = [];
|
|
28098
|
-
if (this.entry.name && e.push(this.entry.name), this.contributors) {
|
|
28103
|
+
if (this.entry.name && e.push(`<div><strong>${this.entry.name}</strong></div>`), this.contributors) {
|
|
28099
28104
|
let t = this.contributors;
|
|
28100
|
-
this.entry.publishDate && (t += ` (${this.publishYear})`), e.push(t);
|
|
28105
|
+
this.entry.publishDate && (t += ` (${this.publishYear})`), e.push(`<div>${t}</div>`);
|
|
28106
|
+
}
|
|
28107
|
+
if (this.samples && e.push(`<div>${this.samples}</div>`), this.entry.doi) {
|
|
28108
|
+
let t = "<div><strong>DOI:</strong></div>";
|
|
28109
|
+
t += `
|
|
28110
|
+
`, t += `<a href="${this.entry.doi}">${this.entry.doi}</a>`, e.push(`<div>${t}</div>`);
|
|
28101
28111
|
}
|
|
28102
|
-
|
|
28112
|
+
if (this.entry.datasetId) {
|
|
28113
|
+
let t = "<div><strong>Dataset ID:</strong></div>";
|
|
28114
|
+
t += `
|
|
28115
|
+
`, t += `${this.entry.datasetId}`, e.push(`<div>${t}</div>`);
|
|
28116
|
+
}
|
|
28117
|
+
if (this.dataLocation) {
|
|
28118
|
+
let t = "<div><strong>Dataset URL:</strong></div>";
|
|
28119
|
+
t += `
|
|
28120
|
+
`, t += `<a href="${this.dataLocation}">${this.dataLocation}</a>`, e.push(`<div>${t}</div>`);
|
|
28121
|
+
}
|
|
28122
|
+
if (this.version) {
|
|
28123
|
+
let t = "<div><strong>Dataset version:</strong></div>";
|
|
28124
|
+
t += `
|
|
28125
|
+
`, t += `${this.version}`, e.push(`<div>${t}</div>`);
|
|
28126
|
+
}
|
|
28127
|
+
this.copyContent = e.join(`
|
|
28103
28128
|
|
|
28104
|
-
|
|
28129
|
+
<br>`);
|
|
28105
28130
|
}
|
|
28106
28131
|
},
|
|
28107
28132
|
created: function() {
|
|
@@ -28113,7 +28138,7 @@ const bx = /* @__PURE__ */ kG(TG, [["render", IG], ["__scopeId", "data-v-e0e80a0
|
|
|
28113
28138
|
this.getBanner();
|
|
28114
28139
|
}
|
|
28115
28140
|
}
|
|
28116
|
-
}, LG = (e) => (vi("data-v-
|
|
28141
|
+
}, LG = (e) => (vi("data-v-541a51e6"), e = e(), gi(), e), PG = {
|
|
28117
28142
|
class: "dataset-card-container",
|
|
28118
28143
|
ref: "container"
|
|
28119
28144
|
}, RG = {
|
|
@@ -28185,7 +28210,7 @@ function KG(e, t, n, r, o, a) {
|
|
|
28185
28210
|
], 512)
|
|
28186
28211
|
], 512);
|
|
28187
28212
|
}
|
|
28188
|
-
const wx = /* @__PURE__ */ Pr(NG, [["render", KG], ["__scopeId", "data-v-
|
|
28213
|
+
const wx = /* @__PURE__ */ Pr(NG, [["render", KG], ["__scopeId", "data-v-541a51e6"]]), Bm = function(e) {
|
|
28189
28214
|
return [...new Set(e.map((t) => JSON.stringify(t)))].map(
|
|
28190
28215
|
(t) => JSON.parse(t)
|
|
28191
28216
|
);
|
|
@@ -31081,13 +31106,9 @@ const l5 = /* @__PURE__ */ Pr(TJ, [["render", IJ], ["__scopeId", "data-v-e726c31
|
|
|
31081
31106
|
sensory: "is the location of the initial cell body in the PNS circuit"
|
|
31082
31107
|
},
|
|
31083
31108
|
componentsWithDatasets: [],
|
|
31084
|
-
uberons: [{ id: void 0, name: void 0 }]
|
|
31085
|
-
copyContent: ""
|
|
31109
|
+
uberons: [{ id: void 0, name: void 0 }]
|
|
31086
31110
|
};
|
|
31087
31111
|
},
|
|
31088
|
-
mounted: function() {
|
|
31089
|
-
this.updateCopyContent();
|
|
31090
|
-
},
|
|
31091
31112
|
watch: {
|
|
31092
31113
|
availableAnatomyFacets: {
|
|
31093
31114
|
handler: function(e) {
|
|
@@ -31098,6 +31119,9 @@ const l5 = /* @__PURE__ */ Pr(TJ, [["render", IJ], ["__scopeId", "data-v-e726c31
|
|
|
31098
31119
|
}
|
|
31099
31120
|
},
|
|
31100
31121
|
computed: {
|
|
31122
|
+
updatedCopyContent: function() {
|
|
31123
|
+
return this.getUpdateCopyContent();
|
|
31124
|
+
},
|
|
31101
31125
|
resources: function() {
|
|
31102
31126
|
let e = [];
|
|
31103
31127
|
return this.entry && this.entry.hyperlinks && (e = this.entry.hyperlinks), e;
|
|
@@ -31162,33 +31186,49 @@ const l5 = /* @__PURE__ */ Pr(TJ, [["render", IJ], ["__scopeId", "data-v-e726c31
|
|
|
31162
31186
|
const t = e.featureId || [];
|
|
31163
31187
|
this.$emit("show-connectivity", t);
|
|
31164
31188
|
},
|
|
31165
|
-
|
|
31166
|
-
var t, n, r, o;
|
|
31189
|
+
getUpdateCopyContent: function() {
|
|
31190
|
+
var t, n, r, o, a;
|
|
31191
|
+
if (!this.entry)
|
|
31192
|
+
return "";
|
|
31167
31193
|
const e = [];
|
|
31168
|
-
if (this.entry.title ? e.push(Ki(this.entry.title)) : e.push(this.entry.featureId), (t = this.entry.provenanceTaxonomyLabel) != null && t.length && e.push(this.provSpeciesDescription),
|
|
31169
|
-
|
|
31170
|
-
|
|
31194
|
+
if (this.entry.title ? e.push(`<div><strong>${Ki(this.entry.title)}</strong></div>`) : e.push(`<div><strong>${this.entry.featureId}</strong></div>`), (t = this.entry.provenanceTaxonomyLabel) != null && t.length && e.push(`<div>${this.provSpeciesDescription}</div>`), (n = this.resources) != null && n.length) {
|
|
31195
|
+
const i = [];
|
|
31196
|
+
this.resources.forEach((s) => {
|
|
31197
|
+
let l = "";
|
|
31198
|
+
s.id === "pubmed" && (l += "<div><strong>PubMed URL:</strong></div>", l += `
|
|
31199
|
+
`, l += `<div><a href="${s.url}">${s.url}</a></div>`), i.push(l);
|
|
31200
|
+
}), e.push(i.join(`
|
|
31201
|
+
|
|
31202
|
+
<br>`));
|
|
31203
|
+
}
|
|
31204
|
+
if (this.entry.paths && e.push(`<div>${this.entry.paths}</div>`), (r = this.entry.origins) != null && r.length) {
|
|
31205
|
+
let i = "<div><strong>Origin</strong></div>";
|
|
31206
|
+
const s = this.entry.origins.map((l) => `<li>${Ki(l)}</li>`).join(`
|
|
31171
31207
|
`);
|
|
31172
|
-
|
|
31208
|
+
i += `
|
|
31209
|
+
`, i += `<ul>${s}</ul>`, e.push(i);
|
|
31173
31210
|
}
|
|
31174
|
-
if ((
|
|
31175
|
-
e.push(
|
|
31176
|
-
|
|
31211
|
+
if ((o = this.entry.components) != null && o.length) {
|
|
31212
|
+
e.push();
|
|
31213
|
+
let i = "<div><strong>Components</strong></div>";
|
|
31214
|
+
const s = this.entry.components.map((l) => `<li>${Ki(l)}</li>`).join(`
|
|
31177
31215
|
`);
|
|
31178
|
-
|
|
31216
|
+
i += `
|
|
31217
|
+
`, i += `<ul>${s}</ul>`, e.push(i);
|
|
31179
31218
|
}
|
|
31180
|
-
if ((
|
|
31181
|
-
|
|
31182
|
-
const
|
|
31219
|
+
if ((a = this.entry.destinations) != null && a.length) {
|
|
31220
|
+
let i = "<div><strong>Destination</strong></div>";
|
|
31221
|
+
const s = this.entry.destinations.map((l) => `<li>${Ki(l)}</li>`).join(`
|
|
31183
31222
|
`);
|
|
31184
|
-
|
|
31223
|
+
i += `
|
|
31224
|
+
`, i += `<ul>${s}</ul>`, e.push(i);
|
|
31185
31225
|
}
|
|
31186
|
-
|
|
31226
|
+
return e.join(`
|
|
31187
31227
|
|
|
31188
|
-
|
|
31228
|
+
<br>`);
|
|
31189
31229
|
}
|
|
31190
31230
|
}
|
|
31191
|
-
}, ka = (e) => (vi("data-v-
|
|
31231
|
+
}, ka = (e) => (vi("data-v-f39a40b5"), e = e(), gi(), e), PJ = {
|
|
31192
31232
|
key: 0,
|
|
31193
31233
|
class: "main"
|
|
31194
31234
|
}, RJ = { class: "connectivity-info-title" }, BJ = {
|
|
@@ -31418,13 +31458,13 @@ function dZ(e, t, n, r, o, a) {
|
|
|
31418
31458
|
])
|
|
31419
31459
|
]),
|
|
31420
31460
|
M("div", cZ, [
|
|
31421
|
-
ee(g, { content:
|
|
31461
|
+
ee(g, { content: a.updatedCopyContent }, null, 8, ["content"])
|
|
31422
31462
|
])
|
|
31423
31463
|
])), [
|
|
31424
31464
|
[v, e.loading]
|
|
31425
31465
|
]) : j("", !0);
|
|
31426
31466
|
}
|
|
31427
|
-
const u5 = /* @__PURE__ */ Pr(LJ, [["render", dZ], ["__scopeId", "data-v-
|
|
31467
|
+
const u5 = /* @__PURE__ */ Pr(LJ, [["render", dZ], ["__scopeId", "data-v-f39a40b5"]]), fZ = {
|
|
31428
31468
|
name: "Tabs",
|
|
31429
31469
|
props: {
|
|
31430
31470
|
tabTitles: {
|