@abi-software/mapintegratedvuer 1.10.1 → 1.10.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/{ContentMixin-BjWQ5hyW.js → ContentMixin-s7Ep3pGV.js} +186 -208
- package/dist/{Flatmap-CRBl8Mce.js → Flatmap-BoLc9V2N.js} +16 -9
- package/dist/{Iframe-Oiu2HnRZ.js → Iframe-DvOBuFWP.js} +2 -2
- package/dist/{MultiFlatmap-vWte5WUA.js → MultiFlatmap-R2NBfCgt.js} +42 -95
- package/dist/{Plot-CEBNX8B0.js → Plot-DEhsJQZ8.js} +2 -2
- package/dist/{Scaffold-Ckfm9HCl.js → Scaffold-Cddb_Lnn.js} +28 -53
- package/dist/{Simulation-DCqdDHl8.js → Simulation-C7bvmX3f.js} +2 -2
- package/dist/{index-Dg5B_ClS.js → index-DL73mn-k.js} +22518 -22816
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +196 -196
- package/dist/{style-B7PIw3HT.js → style-62hTn7u0.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/src/components/ContentVuer.vue +3 -15
- package/src/components/DialogToolbarContent.vue +0 -77
- package/src/components/SplitDialog.vue +6 -34
- package/src/components/SplitFlow.vue +27 -51
- package/src/components/viewers/Flatmap.vue +9 -0
- package/src/components/viewers/MultiFlatmap.vue +8 -84
- package/src/components/viewers/Scaffold.vue +0 -31
- package/src/components.d.ts +0 -1
- package/src/mixins/ContentMixin.js +10 -57
- package/src/stores/splitFlow.js +0 -69
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { markRaw as F } from "vue";
|
|
2
|
-
import { u as C, c as
|
|
3
|
-
import { mapStores as
|
|
4
|
-
const d = function(
|
|
5
|
-
return
|
|
6
|
-
(
|
|
2
|
+
import { u as C, c as I, d as A, a as h, T as M, g as S, e as $, f as H, l as L } from "./index-DL73mn-k.js";
|
|
3
|
+
import { mapStores as N } from "pinia";
|
|
4
|
+
const d = function(t) {
|
|
5
|
+
return t ? [...new Set(t.map((e) => JSON.stringify(e)))].map(
|
|
6
|
+
(e) => JSON.parse(e)
|
|
7
7
|
) : [];
|
|
8
|
-
}, m = [], v = async function(
|
|
9
|
-
const i =
|
|
8
|
+
}, m = [], v = async function(t, e) {
|
|
9
|
+
const i = e.filter(
|
|
10
10
|
(o) => m.some((a) => a.taxon === o)
|
|
11
11
|
), n = m.filter(
|
|
12
12
|
(o) => i.includes(o.taxon)
|
|
13
|
-
), s =
|
|
13
|
+
), s = e.filter(
|
|
14
14
|
(o) => !i.includes(o)
|
|
15
15
|
);
|
|
16
16
|
if (s.length) {
|
|
17
|
-
const o = await
|
|
17
|
+
const o = await t.queryLabels(s);
|
|
18
18
|
if (o.length)
|
|
19
19
|
return o.forEach((a) => {
|
|
20
20
|
let { entity: r, label: l } = a;
|
|
@@ -24,25 +24,25 @@ const d = function(e) {
|
|
|
24
24
|
}), n;
|
|
25
25
|
} else
|
|
26
26
|
return n;
|
|
27
|
-
}, g = function(
|
|
28
|
-
if (!
|
|
29
|
-
let i = JSON.stringify(
|
|
27
|
+
}, g = function(t, e) {
|
|
28
|
+
if (!t || !e) return !1;
|
|
29
|
+
let i = JSON.stringify(t), n = JSON.stringify(e);
|
|
30
30
|
return i.indexOf(n) !== -1;
|
|
31
|
-
}, p = (
|
|
32
|
-
const i =
|
|
31
|
+
}, p = (t, e) => {
|
|
32
|
+
const i = t.name ?? t, n = e.name ?? e, s = i.toUpperCase(), o = n.toUpperCase();
|
|
33
33
|
return s < o ? -1 : s > o ? 1 : 0;
|
|
34
34
|
};
|
|
35
|
-
let
|
|
36
|
-
this.initialise = function(
|
|
37
|
-
this.flatmapAPI =
|
|
38
|
-
}, this.createTooltipData = async function(
|
|
35
|
+
let P = function() {
|
|
36
|
+
this.initialise = function(t) {
|
|
37
|
+
this.flatmapAPI = t, this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "sckan";
|
|
38
|
+
}, this.createTooltipData = async function(t, e) {
|
|
39
39
|
let i = [];
|
|
40
|
-
|
|
40
|
+
e.feature.hyperlinks && e.feature.hyperlinks.length > 0 ? i = e.feature.hyperlinks : i = this.rawURLs;
|
|
41
41
|
let n;
|
|
42
|
-
if (
|
|
42
|
+
if (e.provenanceTaxonomy) {
|
|
43
43
|
n = [];
|
|
44
44
|
try {
|
|
45
|
-
const o = await v(
|
|
45
|
+
const o = await v(t, e.provenanceTaxonomy);
|
|
46
46
|
o.length && o.forEach((a) => {
|
|
47
47
|
const { label: r } = a;
|
|
48
48
|
n.push(r);
|
|
@@ -58,16 +58,16 @@ let L = function() {
|
|
|
58
58
|
destinationsWithDatasets: this.destinationsWithDatasets,
|
|
59
59
|
originsWithDatasets: this.originsWithDatasets,
|
|
60
60
|
componentsWithDatasets: this.componentsWithDatasets,
|
|
61
|
-
title:
|
|
62
|
-
featureId:
|
|
61
|
+
title: e.label,
|
|
62
|
+
featureId: e.resource,
|
|
63
63
|
hyperlinks: i,
|
|
64
|
-
provenanceTaxonomy:
|
|
64
|
+
provenanceTaxonomy: e.provenanceTaxonomy,
|
|
65
65
|
provenanceTaxonomyLabel: n,
|
|
66
66
|
connectivitySource: this.connectivitySource
|
|
67
67
|
};
|
|
68
|
-
}, this.updateTooltipData = function(
|
|
68
|
+
}, this.updateTooltipData = function(t) {
|
|
69
69
|
return {
|
|
70
|
-
...
|
|
70
|
+
...t,
|
|
71
71
|
origins: this.origins,
|
|
72
72
|
originsWithDatasets: this.originsWithDatasets,
|
|
73
73
|
components: this.components,
|
|
@@ -76,16 +76,16 @@ let L = function() {
|
|
|
76
76
|
destinationsWithDatasets: this.destinationsWithDatasets,
|
|
77
77
|
connectivitySource: this.connectivitySource
|
|
78
78
|
};
|
|
79
|
-
}, this.createComponentsLabelList = function(
|
|
79
|
+
}, this.createComponentsLabelList = function(t, e) {
|
|
80
80
|
let i = [];
|
|
81
|
-
return
|
|
82
|
-
i.push(this.createLabelFromNeuralNode(n[0]),
|
|
81
|
+
return t.forEach((n) => {
|
|
82
|
+
i.push(this.createLabelFromNeuralNode(n[0]), e), n.length === 2 && i.push(this.createLabelFromNeuralNode(n[1]), e);
|
|
83
83
|
}), i;
|
|
84
|
-
}, this.createLabelLookup = function(
|
|
84
|
+
}, this.createLabelLookup = function(t, e) {
|
|
85
85
|
return new Promise(async (i) => {
|
|
86
86
|
let n = {};
|
|
87
87
|
this.uberons = [];
|
|
88
|
-
const s = await v(
|
|
88
|
+
const s = await v(t, e);
|
|
89
89
|
s.length && (s.forEach((o) => {
|
|
90
90
|
const { taxon: a, label: r } = o;
|
|
91
91
|
n[a] = r, this.uberons.push({
|
|
@@ -94,59 +94,59 @@ let L = function() {
|
|
|
94
94
|
});
|
|
95
95
|
}), i(n));
|
|
96
96
|
});
|
|
97
|
-
}, this.buildConnectivitySqlStatement = function(
|
|
98
|
-
let
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
else if (
|
|
102
|
-
for (let i in
|
|
103
|
-
|
|
104
|
-
return
|
|
105
|
-
}, this.buildLabelSqlStatement = function(
|
|
106
|
-
let
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
else if (
|
|
110
|
-
for (let i in
|
|
111
|
-
|
|
112
|
-
return
|
|
113
|
-
}, this.findAllIdsFromConnectivity = function(
|
|
114
|
-
let
|
|
97
|
+
}, this.buildConnectivitySqlStatement = function(t) {
|
|
98
|
+
let e = "select knowledge from knowledge where entity in (";
|
|
99
|
+
if (t.length === 1)
|
|
100
|
+
e += `'${t[0]}')`;
|
|
101
|
+
else if (t.length > 1)
|
|
102
|
+
for (let i in t)
|
|
103
|
+
e += `'${t[i]}'${i >= t.length - 1 ? ")" : ","} `;
|
|
104
|
+
return e;
|
|
105
|
+
}, this.buildLabelSqlStatement = function(t) {
|
|
106
|
+
let e = "select entity, label from labels where entity in (";
|
|
107
|
+
if (t.length === 1)
|
|
108
|
+
e += `'${t[0]}')`;
|
|
109
|
+
else if (t.length > 1)
|
|
110
|
+
for (let i in t)
|
|
111
|
+
e += `'${t[i]}'${i >= t.length - 1 ? ")" : ","} `;
|
|
112
|
+
return e;
|
|
113
|
+
}, this.findAllIdsFromConnectivity = function(t) {
|
|
114
|
+
let e = t.connectivity.flat(), i = [...new Set(e)], n = [];
|
|
115
115
|
return i.forEach((s) => {
|
|
116
116
|
Array.isArray(s) ? n.push(s.flat()) : n.push(s);
|
|
117
117
|
}), [...new Set(n.flat())];
|
|
118
|
-
}, this.flattenConnectivity = function(
|
|
119
|
-
let
|
|
118
|
+
}, this.flattenConnectivity = function(t) {
|
|
119
|
+
let e = t.flat(), i = [...new Set(e)], n = [];
|
|
120
120
|
return i.forEach((s) => {
|
|
121
121
|
Array.isArray(s) ? n.push(s.flat()) : n.push(s);
|
|
122
122
|
}), n.flat();
|
|
123
|
-
}, this.findComponents = function(
|
|
124
|
-
let s =
|
|
123
|
+
}, this.findComponents = function(t, e, i, n) {
|
|
124
|
+
let s = t.connectivity.flat(), o = d(s), a = [], r = !1;
|
|
125
125
|
return o.forEach((l) => {
|
|
126
|
-
r = !1, g(
|
|
126
|
+
r = !1, g(e, l) && (r = !0), n && g(n, l) && (r = !0), g(i, l) && (r = !0), r || a.push(l);
|
|
127
127
|
}), a;
|
|
128
|
-
}, this.retrieveFlatmapKnowledgeForEvent = async function(
|
|
128
|
+
}, this.retrieveFlatmapKnowledgeForEvent = async function(t, e) {
|
|
129
129
|
this.controller && this.controller.abort(), this.controller = new AbortController(), this.controller.signal;
|
|
130
|
-
const i =
|
|
130
|
+
const i = e.resource;
|
|
131
131
|
if (this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], !i || i.length === 0 || !i[0]) return;
|
|
132
|
-
let n = this.queryForConnectivityNew(
|
|
132
|
+
let n = this.queryForConnectivityNew(t, i[0]);
|
|
133
133
|
return await Promise.all([n]);
|
|
134
|
-
}, this.queryForConnectivityNew = function(
|
|
134
|
+
}, this.queryForConnectivityNew = function(t, e, i = "sckan", n = !0) {
|
|
135
135
|
return this.connectivitySource = i, new Promise((s) => {
|
|
136
|
-
(i === "map" ? this.queryMapConnectivity(
|
|
136
|
+
(i === "map" ? this.queryMapConnectivity(t.provenance.uuid, e) : t.queryKnowledge(e)).then((a) => {
|
|
137
137
|
if (this.checkConnectivityExists(a)) {
|
|
138
138
|
let r = a;
|
|
139
|
-
n ? this.processConnectivity(
|
|
139
|
+
n ? this.processConnectivity(t, r).then((l) => {
|
|
140
140
|
a.references && (this.rawURLs = [...a.references]), s(l);
|
|
141
141
|
}) : s(r);
|
|
142
142
|
} else
|
|
143
143
|
s(!1);
|
|
144
144
|
}).catch((a) => {
|
|
145
|
-
a.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${
|
|
145
|
+
a.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${e}.`), s(!1);
|
|
146
146
|
});
|
|
147
147
|
});
|
|
148
|
-
}, this.queryMapConnectivity = async function(
|
|
149
|
-
const i = this.flatmapAPI + `flatmap/${
|
|
148
|
+
}, this.queryMapConnectivity = async function(t, e) {
|
|
149
|
+
const i = this.flatmapAPI + `flatmap/${t}/connectivity/${e}`;
|
|
150
150
|
try {
|
|
151
151
|
const n = await fetch(i);
|
|
152
152
|
if (!n.ok)
|
|
@@ -155,8 +155,8 @@ let L = function() {
|
|
|
155
155
|
} catch (n) {
|
|
156
156
|
throw new Error(n);
|
|
157
157
|
}
|
|
158
|
-
}, this.queryForConnectivity = function(
|
|
159
|
-
const s = { sql: this.buildConnectivitySqlStatement(
|
|
158
|
+
}, this.queryForConnectivity = function(t, e, i, n = !0) {
|
|
159
|
+
const s = { sql: this.buildConnectivitySqlStatement(e) }, o = {
|
|
160
160
|
method: "POST",
|
|
161
161
|
headers: {
|
|
162
162
|
"Content-Type": "application/json"
|
|
@@ -169,7 +169,7 @@ let L = function() {
|
|
|
169
169
|
fetch(`${this.flatmapAPI}knowledge/query/`, o).then((r) => r.json()).then((r) => {
|
|
170
170
|
if (this.connectivityExists(r)) {
|
|
171
171
|
let l = JSON.parse(r.values[0][0]);
|
|
172
|
-
n ? this.processConnectivity(
|
|
172
|
+
n ? this.processConnectivity(t, l).then((c) => {
|
|
173
173
|
a(c);
|
|
174
174
|
}) : a(l);
|
|
175
175
|
} else
|
|
@@ -178,23 +178,23 @@ let L = function() {
|
|
|
178
178
|
r.name === "AbortError" || console.error("Error:", r), a(!1);
|
|
179
179
|
});
|
|
180
180
|
});
|
|
181
|
-
}, this.checkConnectivityExists = function(
|
|
182
|
-
var
|
|
183
|
-
return
|
|
184
|
-
}, this.connectivityExists = function(
|
|
185
|
-
return !!(
|
|
186
|
-
}, this.findIfNodeIsSingle = function(
|
|
187
|
-
return
|
|
188
|
-
}, this.createLabelFromNeuralNode = function(
|
|
189
|
-
let i = this.findIfNodeIsSingle(
|
|
181
|
+
}, this.checkConnectivityExists = function(t) {
|
|
182
|
+
var e;
|
|
183
|
+
return t && ((e = t.connectivity) == null ? void 0 : e.length);
|
|
184
|
+
}, this.connectivityExists = function(t) {
|
|
185
|
+
return !!(t.values && t.values.length > 0 && JSON.parse(t.values[0][0]).connectivity && JSON.parse(t.values[0][0]).connectivity.length > 0);
|
|
186
|
+
}, this.findIfNodeIsSingle = function(t) {
|
|
187
|
+
return t.length === 1 ? (console.error("Server returns a single node", t), t[0]) : t.length === 2 && t[1].length === 0 ? t[0] : !1;
|
|
188
|
+
}, this.createLabelFromNeuralNode = function(t, e) {
|
|
189
|
+
let i = this.findIfNodeIsSingle(t);
|
|
190
190
|
if (i)
|
|
191
|
-
return
|
|
192
|
-
let n = t[
|
|
193
|
-
return
|
|
194
|
-
|
|
191
|
+
return e[i];
|
|
192
|
+
let n = e[t[0]];
|
|
193
|
+
return t.length === 2 && t[1].length > 0 && t[1].forEach((s) => {
|
|
194
|
+
e[s] == null ? n += `, ${s}` : n += `, ${e[s]}`;
|
|
195
195
|
}), n;
|
|
196
|
-
}, this.flattenAndFindDatasets = function(
|
|
197
|
-
let n = this.flattenConnectivity(
|
|
196
|
+
}, this.flattenAndFindDatasets = function(t, e, i) {
|
|
197
|
+
let n = this.flattenConnectivity(t), s = this.flattenConnectivity(e), o = this.flattenConnectivity(i);
|
|
198
198
|
this.originsWithDatasets = this.uberons.filter(
|
|
199
199
|
(a) => n.indexOf(a.id) !== -1
|
|
200
200
|
).sort(p), this.componentsWithDatasets = this.uberons.filter(
|
|
@@ -202,20 +202,20 @@ let L = function() {
|
|
|
202
202
|
).sort(p), this.destinationsWithDatasets = this.uberons.filter(
|
|
203
203
|
(a) => o.indexOf(a.id) !== -1
|
|
204
204
|
).sort(p);
|
|
205
|
-
}, this.processConnectivity = function(
|
|
205
|
+
}, this.processConnectivity = function(t, e) {
|
|
206
206
|
return new Promise((i) => {
|
|
207
207
|
let n = [], s = [], o;
|
|
208
|
-
if (
|
|
208
|
+
if (e && e["node-phenotypes"]) {
|
|
209
209
|
const l = ["ilxtr:hasSomaLocatedIn"], c = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
|
|
210
210
|
l.forEach((f) => {
|
|
211
|
-
f in
|
|
211
|
+
f in e["node-phenotypes"] && n.push(...e["node-phenotypes"][f]);
|
|
212
212
|
}), n = d(n), c.forEach((f) => {
|
|
213
|
-
f in
|
|
213
|
+
f in e["node-phenotypes"] && s.push(...e["node-phenotypes"][f]);
|
|
214
214
|
}), s = d(s);
|
|
215
215
|
} else
|
|
216
|
-
s = d(
|
|
217
|
-
const a = this.findComponents(
|
|
218
|
-
this.createLabelLookup(
|
|
216
|
+
s = d(e.axons), e.somas && e.somas.length > 0 && n.push(...e.somas), e.dendrites && e.dendrites.length > 0 && n.push(...e.dendrites), n = d(n), o = e.somas;
|
|
217
|
+
const a = this.findComponents(e, s, n, o), r = this.findAllIdsFromConnectivity(e);
|
|
218
|
+
this.createLabelLookup(t, r).then((l) => {
|
|
219
219
|
this.origins = n.map(
|
|
220
220
|
(c) => this.createLabelFromNeuralNode(c, l)
|
|
221
221
|
).sort(p), this.components = a.map(
|
|
@@ -236,33 +236,33 @@ let L = function() {
|
|
|
236
236
|
});
|
|
237
237
|
});
|
|
238
238
|
});
|
|
239
|
-
}, this.buildPubmedSqlStatement = function(
|
|
240
|
-
let
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
else if (
|
|
244
|
-
for (let i in
|
|
245
|
-
|
|
246
|
-
return
|
|
247
|
-
}, this.buildPubmedSqlStatementForModels = function(
|
|
248
|
-
return `select distinct publication from publications where entity = '${
|
|
249
|
-
}, this.flatmapQuery = function(
|
|
250
|
-
const
|
|
239
|
+
}, this.buildPubmedSqlStatement = function(t) {
|
|
240
|
+
let e = "select distinct publication from publications where entity in (";
|
|
241
|
+
if (t.length === 1)
|
|
242
|
+
e += `'${t[0]}')`;
|
|
243
|
+
else if (t.length > 1)
|
|
244
|
+
for (let i in t)
|
|
245
|
+
e += `'${t[i]}'${i >= t.length - 1 ? ")" : ","} `;
|
|
246
|
+
return e;
|
|
247
|
+
}, this.buildPubmedSqlStatementForModels = function(t) {
|
|
248
|
+
return `select distinct publication from publications where entity = '${t}'`;
|
|
249
|
+
}, this.flatmapQuery = function(t) {
|
|
250
|
+
const e = { sql: t };
|
|
251
251
|
return fetch(`${this.flatmapAPI}knowledge/query/`, {
|
|
252
252
|
method: "POST",
|
|
253
253
|
headers: {
|
|
254
254
|
"Content-Type": "application/json"
|
|
255
255
|
},
|
|
256
|
-
body: JSON.stringify(
|
|
256
|
+
body: JSON.stringify(e)
|
|
257
257
|
}).then((i) => i.json()).catch((i) => {
|
|
258
258
|
console.error("Error:", i);
|
|
259
259
|
});
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
|
-
function
|
|
263
|
-
return
|
|
262
|
+
function T(t) {
|
|
263
|
+
return t[0].toUpperCase() + t.substring(1);
|
|
264
264
|
}
|
|
265
|
-
const
|
|
265
|
+
const O = {
|
|
266
266
|
emits: ["flatmap-provenance-ready", "resource-selected", "species-changed"],
|
|
267
267
|
props: {
|
|
268
268
|
/**
|
|
@@ -281,13 +281,10 @@ const x = {
|
|
|
281
281
|
},
|
|
282
282
|
inject: ["showGlobalSettings", "showOpenMapButton"],
|
|
283
283
|
computed: {
|
|
284
|
-
...
|
|
284
|
+
...N(C, I, A),
|
|
285
285
|
idNamePair() {
|
|
286
286
|
return this.splitFlowStore.idNamePair;
|
|
287
287
|
},
|
|
288
|
-
syncMode() {
|
|
289
|
-
return this.splitFlowStore.syncMode;
|
|
290
|
-
},
|
|
291
288
|
useHelpModeDialog() {
|
|
292
289
|
return this.settingsStore.useHelpModeDialog;
|
|
293
290
|
},
|
|
@@ -312,27 +309,25 @@ const x = {
|
|
|
312
309
|
onConnectivityItemClose() {
|
|
313
310
|
if (this != null && this.alive) {
|
|
314
311
|
if (this.multiflatmapRef) {
|
|
315
|
-
const
|
|
316
|
-
|
|
312
|
+
const t = this.multiflatmapRef.getCurrentFlatmap();
|
|
313
|
+
t && t.closeTooltip();
|
|
317
314
|
}
|
|
318
315
|
this.flatmapRef && this.flatmapRef.closeTooltip();
|
|
319
316
|
}
|
|
320
317
|
},
|
|
321
|
-
toggleSyncMode: function() {
|
|
322
|
-
},
|
|
323
318
|
getState: function() {
|
|
324
319
|
},
|
|
325
|
-
openMap: function(
|
|
326
|
-
|
|
320
|
+
openMap: function(t) {
|
|
321
|
+
h.emit("OpenNewMap", t), this.trackOpenMap(`open_new_${t}_map`);
|
|
327
322
|
},
|
|
328
|
-
onMapmanagerLoaded: function(
|
|
329
|
-
this.settingsStore.updateMapManager(
|
|
323
|
+
onMapmanagerLoaded: function(t) {
|
|
324
|
+
this.settingsStore.updateMapManager(t);
|
|
330
325
|
},
|
|
331
|
-
trackOpenMap: function(
|
|
332
|
-
|
|
326
|
+
trackOpenMap: function(t) {
|
|
327
|
+
M.sendEvent({
|
|
333
328
|
event: "interaction_event",
|
|
334
329
|
event_name: "portal_maps_open_map",
|
|
335
|
-
category:
|
|
330
|
+
category: t,
|
|
336
331
|
location: "open_new_map"
|
|
337
332
|
});
|
|
338
333
|
},
|
|
@@ -352,9 +347,9 @@ const x = {
|
|
|
352
347
|
/**
|
|
353
348
|
* Callback when the vuers emit a selected event.
|
|
354
349
|
*/
|
|
355
|
-
resourceSelected: function(
|
|
350
|
+
resourceSelected: function(t, e) {
|
|
356
351
|
var a, r, l, c;
|
|
357
|
-
const i =
|
|
352
|
+
const i = e[0];
|
|
358
353
|
if (this.resourceHasAction(i)) {
|
|
359
354
|
h.emit("PopoverActionClick", i);
|
|
360
355
|
return;
|
|
@@ -362,13 +357,13 @@ const x = {
|
|
|
362
357
|
let n, s = !1;
|
|
363
358
|
const o = {
|
|
364
359
|
paneIndex: this.entry.id,
|
|
365
|
-
type:
|
|
366
|
-
resource:
|
|
360
|
+
type: t,
|
|
361
|
+
resource: e,
|
|
367
362
|
internalName: void 0,
|
|
368
363
|
eventType: void 0
|
|
369
364
|
};
|
|
370
|
-
if (
|
|
371
|
-
if (o.internalName = (a = i == null ? void 0 : i.feature) != null && a.label ? i.feature.label : this.idNamePair[i.feature.models], i.eventType == "click")
|
|
365
|
+
if (t == "MultiFlatmap" || t == "Flatmap")
|
|
366
|
+
if (o.internalName = (a = i == null ? void 0 : i.feature) != null && a.label ? i.feature.label : this.idNamePair[i.feature.models], i.eventType == "click") {
|
|
372
367
|
if (o.eventType = "selected", i.feature.type == "marker") {
|
|
373
368
|
let f = o.internalName;
|
|
374
369
|
if (this.settingsStore.isFeaturedMarkerIdentifier(i.feature.id))
|
|
@@ -393,19 +388,19 @@ const x = {
|
|
|
393
388
|
labels: [...u]
|
|
394
389
|
});
|
|
395
390
|
}
|
|
396
|
-
s = !0,
|
|
397
|
-
}
|
|
398
|
-
else i.eventType == "mouseenter" && (o.eventType = "highlighted", s = !0);
|
|
399
|
-
else
|
|
391
|
+
s = !0, t == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
|
392
|
+
}
|
|
393
|
+
} else i.eventType == "mouseenter" && (o.eventType = "highlighted", s = !0);
|
|
394
|
+
else t == "Scaffold" && (i && ((((r = i.data) == null ? void 0 : r.id) === void 0 || ((l = i.data) == null ? void 0 : l.id) === "") && (i.data.id = (c = i.data) == null ? void 0 : c.group), o.internalName = i.data.id, i.data.lastActionOnMarker === !0 && (n = {
|
|
400
395
|
type: "Facet",
|
|
401
|
-
facet:
|
|
396
|
+
facet: T(i.data.id),
|
|
402
397
|
facetPropPath: "anatomy.organ.category.name",
|
|
403
398
|
term: "Anatomical structure"
|
|
404
399
|
})), o.eventType = "selected", s = !0);
|
|
405
400
|
n && h.emit("PopoverActionClick", n), s && this.$emit("resource-selected", o);
|
|
406
401
|
},
|
|
407
|
-
resourceHasAction: function(
|
|
408
|
-
return
|
|
402
|
+
resourceHasAction: function(t) {
|
|
403
|
+
return t && (t.type === "URL" || t.type === "Search" || t.type === "Neuron Search" || t.type == "Facet" || t.type == "Facets");
|
|
409
404
|
},
|
|
410
405
|
/**
|
|
411
406
|
* Check if this viewer is currently visible
|
|
@@ -420,39 +415,39 @@ const x = {
|
|
|
420
415
|
* if it cannot be found in the map, it will perform several
|
|
421
416
|
* calls to try to ge a valid name/id.
|
|
422
417
|
*/
|
|
423
|
-
getNameAndIdFromSyncData: async function(
|
|
424
|
-
let
|
|
425
|
-
|
|
418
|
+
getNameAndIdFromSyncData: async function(t) {
|
|
419
|
+
let e = t.internalName;
|
|
420
|
+
e === void 0 && t.resource && (e = t.resource.label);
|
|
426
421
|
let i;
|
|
427
|
-
if (
|
|
428
|
-
if (this.$refs.scaffold.findObjectsWithGroupName(
|
|
429
|
-
if (
|
|
430
|
-
const o = S(
|
|
422
|
+
if (t.resource && t.resource.resource && (i = t.resource.resource[0]), this.entry.type === "Scaffold") {
|
|
423
|
+
if (this.$refs.scaffold.findObjectsWithGroupName(e).length === 0) {
|
|
424
|
+
if (t.resource && t.resource.feature) {
|
|
425
|
+
const o = S(t.resource.feature.models);
|
|
431
426
|
if (o.length > 0) return o;
|
|
432
427
|
}
|
|
433
|
-
let s =
|
|
428
|
+
let s = $(e);
|
|
434
429
|
if (s)
|
|
435
430
|
return s;
|
|
436
|
-
if (i &&
|
|
431
|
+
if (i && t.eventType === "selected")
|
|
437
432
|
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((o) => o.json()).then((o) => {
|
|
438
433
|
var a;
|
|
439
434
|
if (((a = o.uberon) == null ? void 0 : a.array.length) > 0)
|
|
440
|
-
return
|
|
435
|
+
return e = o.uberon.array[0].name.charAt(0).toUpperCase() + o.uberon.array[0].name.slice(1), i = o.uberon.array[0].id.toUpperCase(), { id: i, name: e };
|
|
441
436
|
});
|
|
442
437
|
}
|
|
443
438
|
} else if (this.entry.type === "MultiFlatmap")
|
|
444
|
-
if (
|
|
445
|
-
|
|
439
|
+
if (e === "Bladder")
|
|
440
|
+
e = "Urinary Bladder";
|
|
446
441
|
else {
|
|
447
|
-
const n = S(
|
|
448
|
-
n.length > 0 && (
|
|
442
|
+
const n = S(e);
|
|
443
|
+
n.length > 0 && (e = n[0]);
|
|
449
444
|
}
|
|
450
|
-
return { id: i, name:
|
|
445
|
+
return { id: i, name: e };
|
|
451
446
|
},
|
|
452
447
|
// Get the species and andaotmy info for the featured datasets
|
|
453
|
-
getDatasetAnatomyInfo: function(
|
|
454
|
-
fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${
|
|
455
|
-
const i =
|
|
448
|
+
getDatasetAnatomyInfo: function(t) {
|
|
449
|
+
fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${t}`).then((e) => e.json()).then((e) => {
|
|
450
|
+
const i = e.result[0];
|
|
456
451
|
let n;
|
|
457
452
|
try {
|
|
458
453
|
n = i.anatomy.organ[0].curie;
|
|
@@ -476,7 +471,7 @@ const x = {
|
|
|
476
471
|
o = void 0;
|
|
477
472
|
}
|
|
478
473
|
this.settingsStore.updateFeaturedMarker({
|
|
479
|
-
identifier:
|
|
474
|
+
identifier: t,
|
|
480
475
|
marker: n,
|
|
481
476
|
doi: s,
|
|
482
477
|
species: o
|
|
@@ -485,51 +480,32 @@ const x = {
|
|
|
485
480
|
},
|
|
486
481
|
// Check if the old featured dataset api has any info
|
|
487
482
|
oldFeaturedDatasetApiHasInfo: async function() {
|
|
488
|
-
let
|
|
489
|
-
return !
|
|
483
|
+
let e = await (await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();
|
|
484
|
+
return !e.identifiers || e.identifiers.length == 0 ? !1 : e.identifiers;
|
|
490
485
|
},
|
|
491
486
|
// Check if the new featured dataset api has any info
|
|
492
487
|
newFeaturedDatasetApiHasInfo: async function() {
|
|
493
|
-
let
|
|
494
|
-
return !
|
|
488
|
+
let e = await (await fetch(`${this.apiLocation}get_featured_dataset`)).json();
|
|
489
|
+
return !e.datasets || e.datasets.length == 0 ? !1 : e.datasets.map((i) => i.id);
|
|
495
490
|
},
|
|
496
491
|
/**
|
|
497
492
|
* Get a list of featured datasets to display.
|
|
498
493
|
*/
|
|
499
494
|
getFeaturedDatasets: async function() {
|
|
500
|
-
let
|
|
501
|
-
if (
|
|
495
|
+
let t = [], e = await this.oldFeaturedDatasetApiHasInfo();
|
|
496
|
+
if (e) t = e;
|
|
502
497
|
else {
|
|
503
498
|
let i = await this.newFeaturedDatasetApiHasInfo();
|
|
504
|
-
i && (
|
|
499
|
+
i && (t = i);
|
|
505
500
|
}
|
|
506
|
-
this.settingsStore.updateFeatured(
|
|
501
|
+
this.settingsStore.updateFeatured(t), t.forEach((i) => {
|
|
507
502
|
this.getDatasetAnatomyInfo(i);
|
|
508
503
|
});
|
|
509
504
|
},
|
|
510
505
|
zoomToFeatures: function() {
|
|
511
506
|
},
|
|
512
|
-
handleSyncMouseEvent: async function(e) {
|
|
513
|
-
let t = await this.getNameAndIdFromSyncData(e);
|
|
514
|
-
e.eventType === "highlighted" ? this.highlightFeatures(t) : e.eventType === "selected" && this.displayTooltip(t);
|
|
515
|
-
},
|
|
516
|
-
/**
|
|
517
|
-
* Handle sync pan zoom event
|
|
518
|
-
*/
|
|
519
|
-
handleSyncPanZoomEvent: function() {
|
|
520
|
-
},
|
|
521
507
|
highlightFeatures: function() {
|
|
522
508
|
},
|
|
523
|
-
receiveSynchronisedEvent: async function(e) {
|
|
524
|
-
if (e.paneIndex !== this.entry.id)
|
|
525
|
-
e.eventType == "panZoom" || this.handleSyncMouseEvent(e);
|
|
526
|
-
else if (e.eventType == "selected") {
|
|
527
|
-
let t = await this.getNameAndIdFromSyncData(e);
|
|
528
|
-
this.zoomToFeatures(t, !1);
|
|
529
|
-
}
|
|
530
|
-
},
|
|
531
|
-
requestSynchronisedEvent: function() {
|
|
532
|
-
},
|
|
533
509
|
flatmapMarkerUpdate() {
|
|
534
510
|
},
|
|
535
511
|
onResize: function() {
|
|
@@ -547,8 +523,8 @@ const x = {
|
|
|
547
523
|
onHelpModeShowNext: function() {
|
|
548
524
|
this.helpModeActiveItem += 1;
|
|
549
525
|
},
|
|
550
|
-
onHelpModeLastItem: function(
|
|
551
|
-
|
|
526
|
+
onHelpModeLastItem: function(t) {
|
|
527
|
+
t && (this.helpModeLastItem = !0);
|
|
552
528
|
},
|
|
553
529
|
onFinishHelpMode: function() {
|
|
554
530
|
this.helpMode = !1, this.helpModeActiveItem = 0, this.helpModeLastItem = !1;
|
|
@@ -562,28 +538,28 @@ const x = {
|
|
|
562
538
|
/**
|
|
563
539
|
* End help-mode only if user clicks outside of help mode dialog.
|
|
564
540
|
*/
|
|
565
|
-
checkEndHelpMouseDown: function(
|
|
566
|
-
|
|
541
|
+
checkEndHelpMouseDown: function(t) {
|
|
542
|
+
t.target.closest(".help-mode-dialog") || this.endHelp();
|
|
567
543
|
},
|
|
568
|
-
flatmapHighlight: async function(
|
|
569
|
-
let s = [...
|
|
544
|
+
flatmapHighlight: async function(t, e, i, n) {
|
|
545
|
+
let s = [...e, ...n];
|
|
570
546
|
const o = this.settingsStore.globalSettings;
|
|
571
547
|
if (o.highlightConnectedPaths) {
|
|
572
|
-
const a =
|
|
548
|
+
const a = e.length ? e : n.length ? n : [], r = await t.retrieveConnectedPaths(a);
|
|
573
549
|
r && s.push(...r);
|
|
574
550
|
}
|
|
575
551
|
if (o.highlightDOIPaths) {
|
|
576
|
-
const a = await
|
|
552
|
+
const a = await t.searchConnectivitiesByReference(i);
|
|
577
553
|
a && s.push(...a);
|
|
578
554
|
}
|
|
579
555
|
return s = [...new Set(s)], s;
|
|
580
556
|
},
|
|
581
|
-
sidebarHoverHighlight: function(
|
|
582
|
-
var
|
|
557
|
+
sidebarHoverHighlight: function(t) {
|
|
558
|
+
var e, i;
|
|
583
559
|
if (this.visible && ((this.flatmapRef || this.multiflatmapRef) && this.flatmapReady || this.scaffoldRef && this.scaffoldLoaded)) {
|
|
584
560
|
const n = this.settingsStore.hoverAnatomies, s = this.settingsStore.hoverOrgans, o = this.settingsStore.hoverDOI, a = this.settingsStore.hoverConnectivity;
|
|
585
561
|
let r = null, l = null;
|
|
586
|
-
this.flatmapRef && (r = this.flatmapRef), this.multiflatmapRef && (r = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (l = this.scaffoldRef), clearTimeout(this.highlightDelay), !n.length && !s.length && !o && !a.length && ((this.multiflatmapRef || this.flatmapRef) && r ? ((
|
|
562
|
+
this.flatmapRef && (r = this.flatmapRef), this.multiflatmapRef && (r = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (l = this.scaffoldRef), clearTimeout(this.highlightDelay), !n.length && !s.length && !o && !a.length && ((this.multiflatmapRef || this.flatmapRef) && r ? ((e = r.mapImp) == null || e.clearSearchResults(), t.connectivityProcessed && ((i = r.mapImp) == null || i.setPaint({ dimmed: !0 }))) : this.scaffoldRef && l && l.changeHighlightedByName(s, "", !1)), this.highlightDelay = setTimeout(() => {
|
|
587
563
|
(n.length || s.length || o || a.length) && ((this.multiflatmapRef || this.flatmapRef) && r ? this.flatmapHighlight(r, n, o, a).then((c) => {
|
|
588
564
|
try {
|
|
589
565
|
r.showConnectivityTooltips({
|
|
@@ -604,38 +580,40 @@ const x = {
|
|
|
604
580
|
}, 100);
|
|
605
581
|
}
|
|
606
582
|
},
|
|
607
|
-
onAnnotationOpen: function(
|
|
608
|
-
h.emit("annotation-open",
|
|
583
|
+
onAnnotationOpen: function(t) {
|
|
584
|
+
h.emit("annotation-open", t);
|
|
609
585
|
},
|
|
610
586
|
onAnnotationClose: function() {
|
|
611
587
|
h.emit("sidebar-annotation-close");
|
|
612
588
|
},
|
|
613
|
-
updateOfflineAnnotationEnabled: function(
|
|
614
|
-
h.emit("update-offline-annotation-enabled",
|
|
589
|
+
updateOfflineAnnotationEnabled: function(t) {
|
|
590
|
+
h.emit("update-offline-annotation-enabled", t);
|
|
615
591
|
},
|
|
616
|
-
onConnectivityInfoOpen: function(
|
|
617
|
-
h.emit("connectivity-info-open",
|
|
592
|
+
onConnectivityInfoOpen: function(t) {
|
|
593
|
+
h.emit("connectivity-info-open", t);
|
|
618
594
|
},
|
|
619
|
-
onConnectivityError: function(
|
|
620
|
-
h.emit("connectivity-error",
|
|
595
|
+
onConnectivityError: function(t) {
|
|
596
|
+
h.emit("connectivity-error", t);
|
|
621
597
|
},
|
|
622
598
|
onConnectivityInfoClose: function() {
|
|
623
599
|
h.emit("connectivity-info-close");
|
|
624
600
|
},
|
|
625
601
|
onSidebarAnnotationClose: function() {
|
|
626
602
|
},
|
|
627
|
-
showConnectivity: function(
|
|
603
|
+
showConnectivity: function() {
|
|
604
|
+
},
|
|
605
|
+
showConnectivitiesByReference: function() {
|
|
628
606
|
},
|
|
629
|
-
|
|
607
|
+
showConnectivityTooltips: function() {
|
|
630
608
|
},
|
|
631
|
-
|
|
609
|
+
changeConnectivitySource: function() {
|
|
632
610
|
},
|
|
633
|
-
|
|
611
|
+
setVisibilityFilter: function() {
|
|
634
612
|
},
|
|
635
|
-
loadConnectivityExplorerConfig: async function(
|
|
636
|
-
const
|
|
613
|
+
loadConnectivityExplorerConfig: async function(t) {
|
|
614
|
+
const e = t.mapImp, i = H(e), n = F(new P());
|
|
637
615
|
n.initialise(this.flatmapAPI);
|
|
638
|
-
const s = await
|
|
616
|
+
const s = await L(e, n), o = e.uuid, a = e.pathways;
|
|
639
617
|
if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] = s.filter((r) => {
|
|
640
618
|
var l;
|
|
641
619
|
return r.source === i && ((l = r.connectivity) == null ? void 0 : l.length);
|
|
@@ -643,7 +621,7 @@ const x = {
|
|
|
643
621
|
const r = a ? a.paths : {};
|
|
644
622
|
this.connectivityKnowledge[o] = this.connectivityKnowledge[i].filter((l) => l.id in r);
|
|
645
623
|
}
|
|
646
|
-
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), this.connectivityFilterOptions[o] || (this.connectivityFilterOptions[o] = await
|
|
624
|
+
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), this.connectivityFilterOptions[o] || (this.connectivityFilterOptions[o] = await t.getFilterOptions()), this.connectivitiesStore.updateFilterOptions(this.connectivityFilterOptions), this.connectivityFilterSources[o] || (this.connectivityFilterSources[o] = t.getFilterSources()), this.connectivitiesStore.updateFilterSources(this.connectivityFilterSources), h.emit("species-layout-connectivity-update");
|
|
647
625
|
}
|
|
648
626
|
},
|
|
649
627
|
data: function() {
|
|
@@ -676,11 +654,11 @@ const x = {
|
|
|
676
654
|
this.flatmapAPI = void 0, this.apiLocation = void 0, this.settingsStore.flatmapAPI && (this.flatmapAPI = this.settingsStore.flatmapAPI), this.settingsStore.sparcApi && (this.apiLocation = this.settingsStore.sparcApi), this.settingsStore.mapManager && (this.mapManager = this.settingsStore.mapManager);
|
|
677
655
|
},
|
|
678
656
|
watch: {
|
|
679
|
-
helpMode: function(
|
|
680
|
-
|
|
657
|
+
helpMode: function(t) {
|
|
658
|
+
t || (this.helpModeActiveItem = 0);
|
|
681
659
|
}
|
|
682
660
|
}
|
|
683
661
|
};
|
|
684
662
|
export {
|
|
685
|
-
|
|
663
|
+
O as C
|
|
686
664
|
};
|