@abi-software/map-utilities 1.7.0 → 1.7.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/map-utilities.js +72 -12
- package/dist/map-utilities.umd.cjs +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CopyToClipboard/CopyToClipboard.vue +2 -0
- package/src/components/Tooltip/AnnotationPopup.vue +32 -1
- package/src/components/Tooltip/ExternalResourceCard.vue +49 -4
package/dist/map-utilities.js
CHANGED
|
@@ -9592,7 +9592,7 @@ const C5 = function(t = {}) {
|
|
|
9592
9592
|
e
|
|
9593
9593
|
), t = !1;
|
|
9594
9594
|
}
|
|
9595
|
-
t ? this.textLabel = _5 : this.textLabel = "Error trying to copy to clipboard!";
|
|
9595
|
+
t ? (this.textLabel = _5, this.$emit("copied", { status: "success" })) : (this.textLabel = "Error trying to copy to clipboard!", this.$emit("copied", { status: "error" }));
|
|
9596
9596
|
},
|
|
9597
9597
|
resetSettings: function() {
|
|
9598
9598
|
this.autoHideTimeout = 0, this.textLabel = this.label;
|
|
@@ -9634,7 +9634,7 @@ function O5(t, e, r, n, a, i) {
|
|
|
9634
9634
|
_: 1
|
|
9635
9635
|
}, 8, ["content", "hide-after", "onHide", "append-to"]);
|
|
9636
9636
|
}
|
|
9637
|
-
const Sg = /* @__PURE__ */ Er(T5, [["render", O5], ["__scopeId", "data-v-
|
|
9637
|
+
const Sg = /* @__PURE__ */ Er(T5, [["render", O5], ["__scopeId", "data-v-c791b9aa"]]), A5 = {
|
|
9638
9638
|
name: "AnnotationPopup",
|
|
9639
9639
|
props: {
|
|
9640
9640
|
annotationEntry: {
|
|
@@ -9705,10 +9705,24 @@ const Sg = /* @__PURE__ */ Er(T5, [["render", O5], ["__scopeId", "data-v-91c822c
|
|
|
9705
9705
|
},
|
|
9706
9706
|
methods: {
|
|
9707
9707
|
previous: function() {
|
|
9708
|
-
this.entryIndex !== 0
|
|
9708
|
+
if (this.entryIndex !== 0) {
|
|
9709
|
+
this.entryIndex = this.entryIndex - 1, this.emitActiveItemChange();
|
|
9710
|
+
const t = this.annotationEntry[this.entryIndex], e = {
|
|
9711
|
+
event_name: "portal_maps_annotation_previous",
|
|
9712
|
+
category: String((t == null ? void 0 : t.featureId) || "")
|
|
9713
|
+
};
|
|
9714
|
+
this.trackEvent(e);
|
|
9715
|
+
}
|
|
9709
9716
|
},
|
|
9710
9717
|
next: function() {
|
|
9711
|
-
this.entryIndex !== this.annotationEntry.length - 1
|
|
9718
|
+
if (this.entryIndex !== this.annotationEntry.length - 1) {
|
|
9719
|
+
this.entryIndex = this.entryIndex + 1, this.emitActiveItemChange();
|
|
9720
|
+
const t = this.annotationEntry[this.entryIndex], e = {
|
|
9721
|
+
event_name: "portal_maps_annotation_next",
|
|
9722
|
+
category: String((t == null ? void 0 : t.featureId) || "")
|
|
9723
|
+
};
|
|
9724
|
+
this.trackEvent(e);
|
|
9725
|
+
}
|
|
9712
9726
|
},
|
|
9713
9727
|
emitActiveItemChange: function() {
|
|
9714
9728
|
const t = { tabType: "annotation" }, e = this.annotationEntry[this.entryIndex], r = { ...t, ...e };
|
|
@@ -9833,6 +9847,21 @@ const Sg = /* @__PURE__ */ Er(T5, [["render", O5], ["__scopeId", "data-v-91c822c
|
|
|
9833
9847
|
return t.join(`
|
|
9834
9848
|
|
|
9835
9849
|
<br>`);
|
|
9850
|
+
},
|
|
9851
|
+
onCopied: function() {
|
|
9852
|
+
const t = this.annotationEntry[this.entryIndex], e = {
|
|
9853
|
+
event_name: "portal_maps_annotation_copy_content",
|
|
9854
|
+
category: String((t == null ? void 0 : t.featureId) || "")
|
|
9855
|
+
};
|
|
9856
|
+
this.trackEvent(e);
|
|
9857
|
+
},
|
|
9858
|
+
trackEvent: function(t) {
|
|
9859
|
+
const e = {
|
|
9860
|
+
event: "interaction_event",
|
|
9861
|
+
location: "map_annotation",
|
|
9862
|
+
...t
|
|
9863
|
+
};
|
|
9864
|
+
this.$emit("trackEvent", e);
|
|
9836
9865
|
}
|
|
9837
9866
|
},
|
|
9838
9867
|
watch: {
|
|
@@ -9857,7 +9886,7 @@ const Sg = /* @__PURE__ */ Er(T5, [["render", O5], ["__scopeId", "data-v-91c822c
|
|
|
9857
9886
|
e.name && e.email && e.canUpdate ? (this.creator = e, e.orcid || (this.creator.orcid = "0000-0000-0000-0000"), this.authenticated = !0) : this.errorMessage = "", this.updatePrevSubmissions();
|
|
9858
9887
|
});
|
|
9859
9888
|
}
|
|
9860
|
-
}, Ha = (t) => (Ba("data-v-
|
|
9889
|
+
}, Ha = (t) => (Ba("data-v-2a2f8754"), t = t(), $a(), t), P5 = {
|
|
9861
9890
|
key: 0,
|
|
9862
9891
|
class: "toggle-button"
|
|
9863
9892
|
}, D5 = { class: "block" }, R5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("div", { class: "title" }, "Feature Annotations", -1)), L5 = { class: "title-buttons" }, F5 = { key: 0 }, M5 = ["href"], N5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("strong", { class: "sub-title" }, "Previous submissions:", -1)), B5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("strong", null, "Evidence: ", -1)), $5 = ["href"], q5 = { key: 1 }, z5 = { key: 2 }, V5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("strong", null, "Comment: ", -1)), H5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("strong", { class: "sub-title" }, "Suggest changes:", -1)), K5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("strong", null, "Evidence:", -1)), G5 = /* @__PURE__ */ Ha(() => /* @__PURE__ */ ae("strong", null, "Comment:", -1)), U5 = { class: "sub-title" };
|
|
@@ -9916,7 +9945,10 @@ function W5(t, e, r, n, a, i) {
|
|
|
9916
9945
|
default: U(() => [
|
|
9917
9946
|
R5,
|
|
9918
9947
|
ae("div", L5, [
|
|
9919
|
-
J(u, {
|
|
9948
|
+
J(u, {
|
|
9949
|
+
onCopied: i.onCopied,
|
|
9950
|
+
content: i.updatedCopyContent
|
|
9951
|
+
}, null, 8, ["onCopied", "content"])
|
|
9920
9952
|
])
|
|
9921
9953
|
]),
|
|
9922
9954
|
_: 1
|
|
@@ -10190,7 +10222,7 @@ function W5(t, e, r, n, a, i) {
|
|
|
10190
10222
|
_: 1
|
|
10191
10223
|
});
|
|
10192
10224
|
}
|
|
10193
|
-
const j5 = /* @__PURE__ */ Er(A5, [["render", W5], ["__scopeId", "data-v-
|
|
10225
|
+
const j5 = /* @__PURE__ */ Er(A5, [["render", W5], ["__scopeId", "data-v-2a2f8754"]]), Y5 = {
|
|
10194
10226
|
name: "CreateTooltipContent",
|
|
10195
10227
|
components: {
|
|
10196
10228
|
Button: mr,
|
|
@@ -34345,6 +34377,13 @@ const bT = /* @__PURE__ */ Er(EG, [["render", kG], ["__scopeId", "data-v-2f3dd1d
|
|
|
34345
34377
|
methods: {
|
|
34346
34378
|
showRelatedConnectivities: function(t) {
|
|
34347
34379
|
this.$emit("show-reference-connectivities", t);
|
|
34380
|
+
const e = {
|
|
34381
|
+
event: "interaction_event",
|
|
34382
|
+
event_name: "portal_maps_show_related_connectivities",
|
|
34383
|
+
category: t,
|
|
34384
|
+
location: "map_connectivity_references"
|
|
34385
|
+
};
|
|
34386
|
+
this.$emit("trackEvent", e);
|
|
34348
34387
|
},
|
|
34349
34388
|
formatReferences: function(t) {
|
|
34350
34389
|
const e = this.extractNonPubMedReferences(t), r = t.filter((n) => !e.includes(n));
|
|
@@ -34558,9 +34597,26 @@ const bT = /* @__PURE__ */ Er(EG, [["render", kG], ["__scopeId", "data-v-2f3dd1d
|
|
|
34558
34597
|
} catch (r) {
|
|
34559
34598
|
throw new Error(r);
|
|
34560
34599
|
}
|
|
34600
|
+
},
|
|
34601
|
+
onCopied: function(t, e) {
|
|
34602
|
+
let r = "Reference List", n = "", a = this.citationType;
|
|
34603
|
+
e ? (r = e.resource, n = e.type === "doi" ? e.id : "") : r = [
|
|
34604
|
+
...this.pubMedReferences,
|
|
34605
|
+
...this.openLibReferences,
|
|
34606
|
+
...this.isbnDBReferences
|
|
34607
|
+
].map((u) => u.type === "doi" ? u.id : u.resource).join(", ");
|
|
34608
|
+
const i = {
|
|
34609
|
+
event: "interaction_event",
|
|
34610
|
+
event_name: "portal_maps_copy_citation",
|
|
34611
|
+
category: r,
|
|
34612
|
+
doi: n,
|
|
34613
|
+
citation_type: a,
|
|
34614
|
+
location: "map_connectivity_references"
|
|
34615
|
+
};
|
|
34616
|
+
this.$emit("trackEvent", i);
|
|
34561
34617
|
}
|
|
34562
34618
|
}
|
|
34563
|
-
}, Za = (t) => (Ba("data-v-
|
|
34619
|
+
}, Za = (t) => (Ba("data-v-e4259096"), t = t(), $a(), t), AG = { class: "resource-container" }, PG = { class: "attribute-title-container" }, DG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("div", { class: "attribute-title" }, "References", -1)), RG = { class: "copy-button" }, LG = {
|
|
34564
34620
|
key: 0,
|
|
34565
34621
|
class: "citation-tabs"
|
|
34566
34622
|
}, FG = { class: "citation-list" }, MG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("span", null, "Internal Server Error", -1)), NG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("br", null, null, -1)), BG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("br", null, null, -1)), $G = ["href"], qG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("br", null, null, -1)), zG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("span", null, "Sorry, something went wrong.", -1)), VG = /* @__PURE__ */ Za(() => /* @__PURE__ */ ae("br", null, null, -1)), HG = ["onClick"], KG = ["innerHTML"], GG = ["innerHTML"], UG = ["href"];
|
|
@@ -34571,6 +34627,7 @@ function WG(t, e, r, n, a, i) {
|
|
|
34571
34627
|
DG,
|
|
34572
34628
|
ae("div", RG, [
|
|
34573
34629
|
J(o, {
|
|
34630
|
+
onCopied: e[0] || (e[0] = (l) => i.onCopied(l, "")),
|
|
34574
34631
|
label: "Copy list to clipboard",
|
|
34575
34632
|
content: t.referecesListContent
|
|
34576
34633
|
}, null, 8, ["content"])
|
|
@@ -34630,8 +34687,9 @@ function WG(t, e, r, n, a, i) {
|
|
|
34630
34687
|
onShowRelatedConnectivities: i.showRelatedConnectivities
|
|
34631
34688
|
}, null, 8, ["resource", "onShowRelatedConnectivities"]),
|
|
34632
34689
|
J(o, {
|
|
34690
|
+
onCopied: (v) => i.onCopied(v, l),
|
|
34633
34691
|
content: l.citation[t.citationType]
|
|
34634
|
-
}, null, 8, ["content"])
|
|
34692
|
+
}, null, 8, ["onCopied", "content"])
|
|
34635
34693
|
], 64))
|
|
34636
34694
|
], 64)) : pe("", !0)
|
|
34637
34695
|
], 2);
|
|
@@ -34647,8 +34705,9 @@ function WG(t, e, r, n, a, i) {
|
|
|
34647
34705
|
onShowRelatedConnectivities: i.showRelatedConnectivities
|
|
34648
34706
|
}, null, 8, ["resource", "onShowRelatedConnectivities"]),
|
|
34649
34707
|
J(o, {
|
|
34708
|
+
onCopied: (c) => i.onCopied(c, l),
|
|
34650
34709
|
content: i.formatCopyReference(l)
|
|
34651
|
-
}, null, 8, ["content"])
|
|
34710
|
+
}, null, 8, ["onCopied", "content"])
|
|
34652
34711
|
]))), 128)),
|
|
34653
34712
|
(q(!0), ie(je, null, Lt(t.isbnDBReferences, (l) => (q(), ie("li", {
|
|
34654
34713
|
key: l.id
|
|
@@ -34662,13 +34721,14 @@ function WG(t, e, r, n, a, i) {
|
|
|
34662
34721
|
onShowRelatedConnectivities: i.showRelatedConnectivities
|
|
34663
34722
|
}, null, 8, ["resource", "onShowRelatedConnectivities"]),
|
|
34664
34723
|
J(o, {
|
|
34724
|
+
onCopied: (c) => i.onCopied(c, l),
|
|
34665
34725
|
content: l.url
|
|
34666
|
-
}, null, 8, ["content"])
|
|
34726
|
+
}, null, 8, ["onCopied", "content"])
|
|
34667
34727
|
]))), 128))
|
|
34668
34728
|
])
|
|
34669
34729
|
]);
|
|
34670
34730
|
}
|
|
34671
|
-
const wT = /* @__PURE__ */ Er(OG, [["render", WG], ["__scopeId", "data-v-
|
|
34731
|
+
const wT = /* @__PURE__ */ Er(OG, [["render", WG], ["__scopeId", "data-v-e4259096"]]);
|
|
34672
34732
|
function jG(t) {
|
|
34673
34733
|
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, r) {
|
|
34674
34734
|
var n = t.get(e);
|