@abi-software/mapintegratedvuer 1.9.2 → 1.9.3-beta.0
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-DO6jlHIh.js → ContentMixin-W2PTyJZz.js} +162 -156
- package/dist/{Flatmap-CY9MPW7I.js → Flatmap--SlRCdfI.js} +70 -47
- package/dist/{Iframe-XTSWvVQw.js → Iframe-DYGGdodq.js} +2 -2
- package/dist/{MultiFlatmap-B7e2d6WK.js → MultiFlatmap-CEimf8Pc.js} +50 -22
- package/dist/{Plot-D3lEgm6I.js → Plot-x7fR8yUx.js} +2 -2
- package/dist/Scaffold-CfDMtWBm.js +194 -0
- package/dist/{Simulation-CrPJ4_pw.js → Simulation-BOhCaUMa.js} +2 -2
- package/dist/{index-BcpVBq1h.js → index-DMpfPm6s.js} +19969 -20101
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +226 -6059
- package/dist/style-Ba4Y-S47.js +66 -0
- package/dist/style.css +1 -1
- package/package.json +6 -5
- package/src/App.vue +2 -0
- package/src/assets/header-icon.scss +2 -2
- package/src/components/DialogToolbarContent.vue +434 -18
- package/src/components/MapContent.vue +24 -2
- package/src/components/SplitDialog.vue +63 -31
- package/src/components/SplitFlow.vue +131 -60
- package/src/components/viewers/Flatmap.vue +37 -1
- package/src/components/viewers/MultiFlatmap.vue +55 -1
- package/src/components/viewers/Scaffold.vue +19 -0
- package/src/components.d.ts +9 -0
- package/src/mixins/ContentMixin.js +44 -23
- package/src/stores/connectivities.js +59 -11
- package/src/stores/settings.js +15 -4
- package/vite.bundle-build.js +5 -2
- package/dist/Scaffold-2Zg19azr.js +0 -43337
- package/dist/style-CIceSTeY.js +0 -104700
@@ -1,17 +1,17 @@
|
|
1
|
-
import { markRaw as
|
2
|
-
import { u as b,
|
3
|
-
import { mapStores as
|
1
|
+
import { markRaw as w } from "vue";
|
2
|
+
import { u as b, b as F, c as M, E as f, T as C, d as S, e as I, f as A, l as H } from "./index-DMpfPm6s.js";
|
3
|
+
import { mapStores as N } from "pinia";
|
4
4
|
const d = function(e) {
|
5
5
|
return e ? [...new Set(e.map((t) => JSON.stringify(t)))].map(
|
6
6
|
(t) => JSON.parse(t)
|
7
7
|
) : [];
|
8
|
-
}, g = [],
|
9
|
-
const
|
8
|
+
}, g = [], v = async function(e, t) {
|
9
|
+
const i = t.filter(
|
10
10
|
(s) => g.some((a) => a.taxon === s)
|
11
|
-
),
|
12
|
-
(s) =>
|
11
|
+
), n = g.filter(
|
12
|
+
(s) => i.includes(s.taxon)
|
13
13
|
), o = t.filter(
|
14
|
-
(s) => !
|
14
|
+
(s) => !i.includes(s)
|
15
15
|
);
|
16
16
|
if (o.length) {
|
17
17
|
const s = await e.queryLabels(o);
|
@@ -20,32 +20,32 @@ const d = function(e) {
|
|
20
20
|
let { entity: r, label: l } = a;
|
21
21
|
l === "Mammalia" && (l = "Mammalia not otherwise specified");
|
22
22
|
const c = { taxon: r, label: l };
|
23
|
-
|
24
|
-
}),
|
23
|
+
n.push(c), g.push(c);
|
24
|
+
}), n;
|
25
25
|
} else
|
26
|
-
return
|
26
|
+
return n;
|
27
27
|
}, y = function(e, t) {
|
28
28
|
if (!e || !t) return !1;
|
29
|
-
let
|
30
|
-
return
|
29
|
+
let i = JSON.stringify(e), n = JSON.stringify(t);
|
30
|
+
return i.indexOf(n) !== -1;
|
31
31
|
}, p = (e, t) => {
|
32
|
-
const
|
32
|
+
const i = e.name ?? e, n = t.name ?? t, o = i.toUpperCase(), s = n.toUpperCase();
|
33
33
|
return o < s ? -1 : o > s ? 1 : 0;
|
34
34
|
};
|
35
|
-
let
|
35
|
+
let $ = function() {
|
36
36
|
this.initialise = function(e) {
|
37
37
|
this.flatmapAPI = e, this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "sckan";
|
38
38
|
}, this.createTooltipData = async function(e, t) {
|
39
|
-
let
|
40
|
-
t.feature.hyperlinks && t.feature.hyperlinks.length > 0 ?
|
41
|
-
let
|
39
|
+
let i = [];
|
40
|
+
t.feature.hyperlinks && t.feature.hyperlinks.length > 0 ? i = t.feature.hyperlinks : i = this.rawURLs;
|
41
|
+
let n;
|
42
42
|
if (t.provenanceTaxonomy) {
|
43
|
-
|
43
|
+
n = [];
|
44
44
|
try {
|
45
|
-
const s = await
|
45
|
+
const s = await v(e, t.provenanceTaxonomy);
|
46
46
|
s.length && s.forEach((a) => {
|
47
47
|
const { label: r } = a;
|
48
|
-
|
48
|
+
n.push(r);
|
49
49
|
});
|
50
50
|
} catch (s) {
|
51
51
|
console.log(s);
|
@@ -60,9 +60,9 @@ let N = function() {
|
|
60
60
|
componentsWithDatasets: this.componentsWithDatasets,
|
61
61
|
title: t.label,
|
62
62
|
featureId: t.resource,
|
63
|
-
hyperlinks:
|
63
|
+
hyperlinks: i,
|
64
64
|
provenanceTaxonomy: t.provenanceTaxonomy,
|
65
|
-
provenanceTaxonomyLabel:
|
65
|
+
provenanceTaxonomyLabel: n,
|
66
66
|
connectivitySource: this.connectivitySource
|
67
67
|
};
|
68
68
|
}, this.updateTooltipData = function(e) {
|
@@ -77,66 +77,66 @@ let N = function() {
|
|
77
77
|
connectivitySource: this.connectivitySource
|
78
78
|
};
|
79
79
|
}, this.createComponentsLabelList = function(e, t) {
|
80
|
-
let
|
81
|
-
return e.forEach((
|
82
|
-
|
83
|
-
}),
|
80
|
+
let i = [];
|
81
|
+
return e.forEach((n) => {
|
82
|
+
i.push(this.createLabelFromNeuralNode(n[0]), t), n.length === 2 && i.push(this.createLabelFromNeuralNode(n[1]), t);
|
83
|
+
}), i;
|
84
84
|
}, this.createLabelLookup = function(e, t) {
|
85
|
-
return new Promise(async (
|
86
|
-
let
|
85
|
+
return new Promise(async (i) => {
|
86
|
+
let n = {};
|
87
87
|
this.uberons = [];
|
88
|
-
const o = await
|
88
|
+
const o = await v(e, t);
|
89
89
|
o.length && (o.forEach((s) => {
|
90
90
|
const { taxon: a, label: r } = s;
|
91
|
-
|
91
|
+
n[a] = r, this.uberons.push({
|
92
92
|
id: a,
|
93
93
|
name: r
|
94
94
|
});
|
95
|
-
}), n
|
95
|
+
}), i(n));
|
96
96
|
});
|
97
97
|
}, this.buildConnectivitySqlStatement = function(e) {
|
98
98
|
let t = "select knowledge from knowledge where entity in (";
|
99
99
|
if (e.length === 1)
|
100
100
|
t += `'${e[0]}')`;
|
101
101
|
else if (e.length > 1)
|
102
|
-
for (let
|
103
|
-
t += `'${e[
|
102
|
+
for (let i in e)
|
103
|
+
t += `'${e[i]}'${i >= e.length - 1 ? ")" : ","} `;
|
104
104
|
return t;
|
105
105
|
}, this.buildLabelSqlStatement = function(e) {
|
106
106
|
let t = "select entity, label from labels where entity in (";
|
107
107
|
if (e.length === 1)
|
108
108
|
t += `'${e[0]}')`;
|
109
109
|
else if (e.length > 1)
|
110
|
-
for (let
|
111
|
-
t += `'${e[
|
110
|
+
for (let i in e)
|
111
|
+
t += `'${e[i]}'${i >= e.length - 1 ? ")" : ","} `;
|
112
112
|
return t;
|
113
113
|
}, this.findAllIdsFromConnectivity = function(e) {
|
114
|
-
let t = e.connectivity.flat(),
|
115
|
-
return
|
116
|
-
Array.isArray(o) ?
|
117
|
-
}), [...new Set(
|
114
|
+
let t = e.connectivity.flat(), i = [...new Set(t)], n = [];
|
115
|
+
return i.forEach((o) => {
|
116
|
+
Array.isArray(o) ? n.push(o.flat()) : n.push(o);
|
117
|
+
}), [...new Set(n.flat())];
|
118
118
|
}, this.flattenConnectivity = function(e) {
|
119
|
-
let t = e.flat(),
|
120
|
-
return
|
121
|
-
Array.isArray(o) ?
|
122
|
-
}),
|
123
|
-
}, this.findComponents = function(e, t,
|
119
|
+
let t = e.flat(), i = [...new Set(t)], n = [];
|
120
|
+
return i.forEach((o) => {
|
121
|
+
Array.isArray(o) ? n.push(o.flat()) : n.push(o);
|
122
|
+
}), n.flat();
|
123
|
+
}, this.findComponents = function(e, t, i, n) {
|
124
124
|
let o = e.connectivity.flat(), s = d(o), a = [], r = !1;
|
125
125
|
return s.forEach((l) => {
|
126
|
-
r = !1, y(t, l) && (r = !0),
|
126
|
+
r = !1, y(t, l) && (r = !0), n && y(n, l) && (r = !0), y(i, l) && (r = !0), r || a.push(l);
|
127
127
|
}), a;
|
128
128
|
}, this.retrieveFlatmapKnowledgeForEvent = async function(e, t) {
|
129
129
|
this.controller && this.controller.abort(), this.controller = new AbortController(), this.controller.signal;
|
130
|
-
const
|
131
|
-
if (this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], !
|
132
|
-
let
|
133
|
-
return await Promise.all([
|
134
|
-
}, this.queryForConnectivityNew = function(e, t,
|
135
|
-
return this.connectivitySource =
|
136
|
-
(
|
130
|
+
const i = t.resource;
|
131
|
+
if (this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], !i || i.length === 0 || !i[0]) return;
|
132
|
+
let n = this.queryForConnectivityNew(e, i[0]);
|
133
|
+
return await Promise.all([n]);
|
134
|
+
}, this.queryForConnectivityNew = function(e, t, i = "sckan", n = !0) {
|
135
|
+
return this.connectivitySource = i, new Promise((o) => {
|
136
|
+
(i === "map" ? this.queryMapConnectivity(e.provenance.uuid, t) : e.queryKnowledge(t)).then((a) => {
|
137
137
|
if (this.checkConnectivityExists(a)) {
|
138
138
|
let r = a;
|
139
|
-
|
139
|
+
n ? this.processConnectivity(e, r).then((l) => {
|
140
140
|
a.references && (this.rawURLs = [...a.references]), o(l);
|
141
141
|
}) : o(r);
|
142
142
|
} else
|
@@ -146,40 +146,30 @@ let N = function() {
|
|
146
146
|
});
|
147
147
|
});
|
148
148
|
}, this.queryMapConnectivity = async function(e, t) {
|
149
|
-
const
|
149
|
+
const i = this.flatmapAPI + `flatmap/${e}/connectivity/${t}`;
|
150
150
|
try {
|
151
|
-
const
|
152
|
-
if (!i.ok)
|
153
|
-
throw new Error(`Response status: ${i.status}`);
|
154
|
-
return await i.json();
|
155
|
-
} catch (i) {
|
156
|
-
throw new Error(i);
|
157
|
-
}
|
158
|
-
}, this.queryMapPaths = async function(e) {
|
159
|
-
const t = this.flatmapAPI + `flatmap/${e}/pathways`;
|
160
|
-
try {
|
161
|
-
const n = await fetch(t);
|
151
|
+
const n = await fetch(i);
|
162
152
|
if (!n.ok)
|
163
153
|
throw new Error(`Response status: ${n.status}`);
|
164
154
|
return await n.json();
|
165
155
|
} catch (n) {
|
166
156
|
throw new Error(n);
|
167
157
|
}
|
168
|
-
}, this.queryForConnectivity = function(e, t,
|
158
|
+
}, this.queryForConnectivity = function(e, t, i, n = !0) {
|
169
159
|
const o = { sql: this.buildConnectivitySqlStatement(t) }, s = {
|
170
160
|
method: "POST",
|
171
161
|
headers: {
|
172
162
|
"Content-Type": "application/json"
|
173
163
|
},
|
174
164
|
body: JSON.stringify(o),
|
175
|
-
...
|
165
|
+
...i ? { signal: i } : {}
|
176
166
|
// add signal to header if it exists
|
177
167
|
};
|
178
168
|
return new Promise((a) => {
|
179
169
|
fetch(`${this.flatmapAPI}knowledge/query/`, s).then((r) => r.json()).then((r) => {
|
180
170
|
if (this.connectivityExists(r)) {
|
181
171
|
let l = JSON.parse(r.values[0][0]);
|
182
|
-
|
172
|
+
n ? this.processConnectivity(e, l).then((c) => {
|
183
173
|
a(c);
|
184
174
|
}) : a(l);
|
185
175
|
} else
|
@@ -196,45 +186,45 @@ let N = function() {
|
|
196
186
|
}, this.findIfNodeIsSingle = function(e) {
|
197
187
|
return e.length === 1 ? (console.error("Server returns a single node", e), e[0]) : e.length === 2 && e[1].length === 0 ? e[0] : !1;
|
198
188
|
}, this.createLabelFromNeuralNode = function(e, t) {
|
199
|
-
let
|
200
|
-
if (
|
201
|
-
return t[
|
202
|
-
let
|
189
|
+
let i = this.findIfNodeIsSingle(e);
|
190
|
+
if (i)
|
191
|
+
return t[i];
|
192
|
+
let n = t[e[0]];
|
203
193
|
return e.length === 2 && e[1].length > 0 && e[1].forEach((o) => {
|
204
|
-
t[o] == null ?
|
205
|
-
}),
|
206
|
-
}, this.flattenAndFindDatasets = function(e, t,
|
207
|
-
let
|
194
|
+
t[o] == null ? n += `, ${o}` : n += `, ${t[o]}`;
|
195
|
+
}), n;
|
196
|
+
}, this.flattenAndFindDatasets = function(e, t, i) {
|
197
|
+
let n = this.flattenConnectivity(e), o = this.flattenConnectivity(t), s = this.flattenConnectivity(i);
|
208
198
|
this.originsWithDatasets = this.uberons.filter(
|
209
|
-
(a) =>
|
199
|
+
(a) => n.indexOf(a.id) !== -1
|
210
200
|
).sort(p), this.componentsWithDatasets = this.uberons.filter(
|
211
201
|
(a) => o.indexOf(a.id) !== -1
|
212
202
|
).sort(p), this.destinationsWithDatasets = this.uberons.filter(
|
213
203
|
(a) => s.indexOf(a.id) !== -1
|
214
204
|
).sort(p);
|
215
205
|
}, this.processConnectivity = function(e, t) {
|
216
|
-
return new Promise((
|
217
|
-
let
|
206
|
+
return new Promise((i) => {
|
207
|
+
let n = [], o = [], s;
|
218
208
|
if (t && t["node-phenotypes"]) {
|
219
209
|
const l = ["ilxtr:hasSomaLocatedIn"], c = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
|
220
210
|
l.forEach((h) => {
|
221
|
-
|
222
|
-
}),
|
223
|
-
o.push(...t["node-phenotypes"][h]);
|
211
|
+
h in t["node-phenotypes"] && n.push(...t["node-phenotypes"][h]);
|
212
|
+
}), n = d(n), c.forEach((h) => {
|
213
|
+
h in t["node-phenotypes"] && o.push(...t["node-phenotypes"][h]);
|
224
214
|
}), o = d(o);
|
225
215
|
} else
|
226
|
-
o = d(t.axons), t.somas && t.somas.length > 0 &&
|
227
|
-
const a = this.findComponents(t, o,
|
216
|
+
o = d(t.axons), t.somas && t.somas.length > 0 && n.push(...t.somas), t.dendrites && t.dendrites.length > 0 && n.push(...t.dendrites), n = d(n), s = t.somas;
|
217
|
+
const a = this.findComponents(t, o, n, s), r = this.findAllIdsFromConnectivity(t);
|
228
218
|
this.createLabelLookup(e, r).then((l) => {
|
229
|
-
this.origins =
|
219
|
+
this.origins = n.map(
|
230
220
|
(c) => this.createLabelFromNeuralNode(c, l)
|
231
221
|
).sort(p), this.components = a.map(
|
232
222
|
(c) => this.createLabelFromNeuralNode(c, l)
|
233
223
|
).sort(p), this.destinations = o.map(
|
234
224
|
(c) => this.createLabelFromNeuralNode(c, l)
|
235
|
-
).sort(p), this.flattenAndFindDatasets(
|
225
|
+
).sort(p), this.flattenAndFindDatasets(n, a, o), i({
|
236
226
|
ids: {
|
237
|
-
dendrites:
|
227
|
+
dendrites: n,
|
238
228
|
components: a,
|
239
229
|
axons: o
|
240
230
|
},
|
@@ -251,8 +241,8 @@ let N = function() {
|
|
251
241
|
if (e.length === 1)
|
252
242
|
t += `'${e[0]}')`;
|
253
243
|
else if (e.length > 1)
|
254
|
-
for (let
|
255
|
-
t += `'${e[
|
244
|
+
for (let i in e)
|
245
|
+
t += `'${e[i]}'${i >= e.length - 1 ? ")" : ","} `;
|
256
246
|
return t;
|
257
247
|
}, this.buildPubmedSqlStatementForModels = function(e) {
|
258
248
|
return `select distinct publication from publications where entity = '${e}'`;
|
@@ -264,12 +254,12 @@ let N = function() {
|
|
264
254
|
"Content-Type": "application/json"
|
265
255
|
},
|
266
256
|
body: JSON.stringify(t)
|
267
|
-
}).then((
|
268
|
-
console.error("Error:",
|
257
|
+
}).then((i) => i.json()).catch((i) => {
|
258
|
+
console.error("Error:", i);
|
269
259
|
});
|
270
260
|
};
|
271
261
|
};
|
272
|
-
function
|
262
|
+
function T(e) {
|
273
263
|
return e[0].toUpperCase() + e.substring(1);
|
274
264
|
}
|
275
265
|
const D = {
|
@@ -289,8 +279,9 @@ const D = {
|
|
289
279
|
default: !1
|
290
280
|
}
|
291
281
|
},
|
282
|
+
inject: ["showGlobalSettings", "showOpenMapButton"],
|
292
283
|
computed: {
|
293
|
-
...
|
284
|
+
...N(b, F, M),
|
294
285
|
idNamePair() {
|
295
286
|
return this.splitFlowStore.idNamePair;
|
296
287
|
},
|
@@ -305,12 +296,22 @@ const D = {
|
|
305
296
|
},
|
306
297
|
annotationSidebar() {
|
307
298
|
return this.settingsStore.annotationSidebar;
|
299
|
+
},
|
300
|
+
// Hide local settings if global settings are shown
|
301
|
+
showLocalSettings() {
|
302
|
+
return !this.showGlobalSettings;
|
308
303
|
}
|
309
304
|
},
|
310
305
|
mounted: function() {
|
311
306
|
f.on("startHelp", () => {
|
312
307
|
this.startHelp();
|
313
|
-
}),
|
308
|
+
}), f.on("connectivity-item-close", () => {
|
309
|
+
if (this.multiflatmapRef) {
|
310
|
+
const e = this.multiflatmapRef.getCurrentFlatmap();
|
311
|
+
e && e.closeTooltip();
|
312
|
+
}
|
313
|
+
this.flatmapRef && this.flatmapRef.closeTooltip();
|
314
|
+
}), this.multiflatmapRef = this.$refs.multiflatmap, this.flatmapRef = this.$refs.flatmap, this.scaffoldRef = this.$refs.scaffold, this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources;
|
314
315
|
},
|
315
316
|
methods: {
|
316
317
|
toggleSyncMode: function() {
|
@@ -349,12 +350,12 @@ const D = {
|
|
349
350
|
*/
|
350
351
|
resourceSelected: function(e, t) {
|
351
352
|
var a, r, l, c;
|
352
|
-
const
|
353
|
-
if (this.resourceHasAction(
|
354
|
-
f.emit("PopoverActionClick",
|
353
|
+
const i = t[0];
|
354
|
+
if (this.resourceHasAction(i)) {
|
355
|
+
f.emit("PopoverActionClick", i);
|
355
356
|
return;
|
356
357
|
}
|
357
|
-
let
|
358
|
+
let n, o = !1;
|
358
359
|
const s = {
|
359
360
|
paneIndex: this.entry.id,
|
360
361
|
type: e,
|
@@ -363,17 +364,17 @@ const D = {
|
|
363
364
|
eventType: void 0
|
364
365
|
};
|
365
366
|
if (e == "MultiFlatmap" || e == "Flatmap")
|
366
|
-
if (s.internalName = (a =
|
367
|
-
if (s.eventType = "selected",
|
367
|
+
if (s.internalName = (a = i == null ? void 0 : i.feature) != null && a.label ? i.feature.label : this.idNamePair[i.feature.models], i.eventType == "click")
|
368
|
+
if (s.eventType = "selected", i.feature.type == "marker") {
|
368
369
|
let h = s.internalName;
|
369
|
-
if (this.settingsStore.isFeaturedMarkerIdentifier(
|
370
|
-
|
370
|
+
if (this.settingsStore.isFeaturedMarkerIdentifier(i.feature.id))
|
371
|
+
n = {
|
371
372
|
type: "Search",
|
372
|
-
term: this.settingsStore.featuredMarkerDoi(
|
373
|
+
term: this.settingsStore.featuredMarkerDoi(i.feature.id),
|
373
374
|
featuredDataset: !0
|
374
375
|
};
|
375
376
|
else {
|
376
|
-
|
377
|
+
n = {
|
377
378
|
type: "Facet",
|
378
379
|
facet: h,
|
379
380
|
facetPropPath: "anatomy.organ.category.name",
|
@@ -381,23 +382,23 @@ const D = {
|
|
381
382
|
term: "Anatomical structure"
|
382
383
|
};
|
383
384
|
let u = /* @__PURE__ */ new Set();
|
384
|
-
|
385
|
+
i.feature["marker-terms"].forEach((m) => {
|
385
386
|
u.add(m.label);
|
386
|
-
}), u.add(h), u.size > 0 && (
|
387
|
+
}), u.add(h), u.size > 0 && (n = {
|
387
388
|
type: "Facets",
|
388
389
|
labels: [...u]
|
389
390
|
});
|
390
391
|
}
|
391
392
|
o = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
392
|
-
} else
|
393
|
-
else
|
394
|
-
else e == "Scaffold" && (
|
393
|
+
} else i.feature.type == "feature" && this.syncMode && (o = !0);
|
394
|
+
else i.eventType == "mouseenter" && (s.eventType = "highlighted", o = !0);
|
395
|
+
else e == "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), s.internalName = i.data.id, i.data.lastActionOnMarker === !0 && (n = {
|
395
396
|
type: "Facet",
|
396
|
-
facet:
|
397
|
+
facet: T(i.data.id),
|
397
398
|
facetPropPath: "anatomy.organ.category.name",
|
398
399
|
term: "Anatomical structure"
|
399
400
|
})), s.eventType = "selected", o = !0);
|
400
|
-
|
401
|
+
n && f.emit("PopoverActionClick", n), o && this.$emit("resource-selected", s);
|
401
402
|
},
|
402
403
|
resourceHasAction: function(e) {
|
403
404
|
return e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets";
|
@@ -418,53 +419,53 @@ const D = {
|
|
418
419
|
getNameAndIdFromSyncData: async function(e) {
|
419
420
|
let t = e.internalName;
|
420
421
|
t === void 0 && e.resource && (t = e.resource.label);
|
421
|
-
let
|
422
|
-
if (e.resource && e.resource.resource && (
|
422
|
+
let i;
|
423
|
+
if (e.resource && e.resource.resource && (i = e.resource.resource[0]), this.entry.type === "Scaffold") {
|
423
424
|
if (this.$refs.scaffold.findObjectsWithGroupName(t).length === 0) {
|
424
425
|
if (e.resource && e.resource.feature) {
|
425
426
|
const s = S(e.resource.feature.models);
|
426
427
|
if (s.length > 0) return s;
|
427
428
|
}
|
428
|
-
let o =
|
429
|
+
let o = I(t);
|
429
430
|
if (o)
|
430
431
|
return o;
|
431
|
-
if (
|
432
|
-
return fetch(`${this.apiLocation}get-related-terms/${
|
432
|
+
if (i && e.eventType === "selected")
|
433
|
+
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((s) => s.json()).then((s) => {
|
433
434
|
var a;
|
434
435
|
if (((a = s.uberon) == null ? void 0 : a.array.length) > 0)
|
435
|
-
return t = s.uberon.array[0].name.charAt(0).toUpperCase() + s.uberon.array[0].name.slice(1),
|
436
|
+
return t = s.uberon.array[0].name.charAt(0).toUpperCase() + s.uberon.array[0].name.slice(1), i = s.uberon.array[0].id.toUpperCase(), { id: i, name: t };
|
436
437
|
});
|
437
438
|
}
|
438
439
|
} else if (this.entry.type === "MultiFlatmap")
|
439
440
|
if (t === "Bladder")
|
440
441
|
t = "Urinary Bladder";
|
441
442
|
else {
|
442
|
-
const
|
443
|
-
|
443
|
+
const n = S(t);
|
444
|
+
n.length > 0 && (t = n[0]);
|
444
445
|
}
|
445
|
-
return { id:
|
446
|
+
return { id: i, name: t };
|
446
447
|
},
|
447
448
|
// Get the species and andaotmy info for the featured datasets
|
448
449
|
getDatasetAnatomyInfo: function(e) {
|
449
450
|
fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then((t) => t.json()).then((t) => {
|
450
|
-
const
|
451
|
-
let
|
451
|
+
const i = t.result[0];
|
452
|
+
let n;
|
452
453
|
try {
|
453
|
-
|
454
|
+
n = i.anatomy.organ[0].curie;
|
454
455
|
} catch {
|
455
|
-
|
456
|
+
n = void 0;
|
456
457
|
}
|
457
458
|
let o;
|
458
459
|
try {
|
459
|
-
o =
|
460
|
+
o = i.item.curie;
|
460
461
|
} catch {
|
461
462
|
o = void 0;
|
462
463
|
}
|
463
464
|
let s;
|
464
465
|
try {
|
465
466
|
let a = 0, r = !1;
|
466
|
-
for (; !r && a <
|
467
|
-
const l =
|
467
|
+
for (; !r && a < i.organisms.subject.length; ) {
|
468
|
+
const l = i.organisms.subject[a];
|
468
469
|
l.species && (s = l.species.name, r = !0), a += 1;
|
469
470
|
}
|
470
471
|
} catch {
|
@@ -472,7 +473,7 @@ const D = {
|
|
472
473
|
}
|
473
474
|
this.settingsStore.updateFeaturedMarker({
|
474
475
|
identifier: e,
|
475
|
-
marker:
|
476
|
+
marker: n,
|
476
477
|
doi: o,
|
477
478
|
species: s
|
478
479
|
});
|
@@ -486,7 +487,7 @@ const D = {
|
|
486
487
|
// Check if the new featured dataset api has any info
|
487
488
|
newFeaturedDatasetApiHasInfo: async function() {
|
488
489
|
let t = await (await fetch(`${this.apiLocation}get_featured_dataset`)).json();
|
489
|
-
return !t.datasets || t.datasets.length == 0 ? !1 : t.datasets.map((
|
490
|
+
return !t.datasets || t.datasets.length == 0 ? !1 : t.datasets.map((i) => i.id);
|
490
491
|
},
|
491
492
|
/**
|
492
493
|
* Get a list of featured datasets to display.
|
@@ -495,11 +496,11 @@ const D = {
|
|
495
496
|
let e = [], t = await this.oldFeaturedDatasetApiHasInfo();
|
496
497
|
if (t) e = t;
|
497
498
|
else {
|
498
|
-
let
|
499
|
-
|
499
|
+
let i = await this.newFeaturedDatasetApiHasInfo();
|
500
|
+
i && (e = i);
|
500
501
|
}
|
501
|
-
this.settingsStore.updateFeatured(e), e.forEach((
|
502
|
-
this.getDatasetAnatomyInfo(
|
502
|
+
this.settingsStore.updateFeatured(e), e.forEach((i) => {
|
503
|
+
this.getDatasetAnatomyInfo(i);
|
503
504
|
});
|
504
505
|
},
|
505
506
|
zoomToFeatures: function() {
|
@@ -558,15 +559,15 @@ const D = {
|
|
558
559
|
checkEndHelpMouseDown: function(e) {
|
559
560
|
e.target.closest(".help-mode-dialog") || this.endHelp();
|
560
561
|
},
|
561
|
-
flatmapHighlight: async function(e, t,
|
562
|
-
let o = [...t, ...
|
562
|
+
flatmapHighlight: async function(e, t, i, n) {
|
563
|
+
let o = [...t, ...n];
|
563
564
|
const s = this.settingsStore.globalSettings;
|
564
565
|
if (s.highlightConnectedPaths) {
|
565
|
-
const a = t.length ? t :
|
566
|
+
const a = t.length ? t : n.length ? n : [], r = await e.retrieveConnectedPaths(a);
|
566
567
|
r && o.push(...r);
|
567
568
|
}
|
568
569
|
if (s.highlightDOIPaths) {
|
569
|
-
const a = await e.searchConnectivitiesByReference(
|
570
|
+
const a = await e.searchConnectivitiesByReference(i);
|
570
571
|
a && o.push(...a);
|
571
572
|
}
|
572
573
|
return o = [...new Set(o)], o;
|
@@ -574,12 +575,15 @@ const D = {
|
|
574
575
|
cardHoverHighlight: function() {
|
575
576
|
var e;
|
576
577
|
if (this.visible) {
|
577
|
-
const t = this.settingsStore.hoverAnatomies,
|
578
|
+
const t = this.settingsStore.hoverAnatomies, i = this.settingsStore.hoverOrgans, n = this.settingsStore.hoverDOI, o = this.settingsStore.hoverConnectivity;
|
578
579
|
let s = null, a = null;
|
579
|
-
this.flatmapRef && (s = this.flatmapRef), this.multiflatmapRef && (s = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (a = this.scaffoldRef), clearTimeout(this.highlightDelay), !t.length && !
|
580
|
-
(t.length ||
|
580
|
+
this.flatmapRef && (s = this.flatmapRef), this.multiflatmapRef && (s = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (a = this.scaffoldRef), clearTimeout(this.highlightDelay), !t.length && !i.length && !n && !o.length && ((this.multiflatmapRef || this.flatmapRef) && s ? (e = s.mapImp) == null || e.clearSearchResults() : this.scaffoldRef && a && a.changeHighlightedByName(i, "", !1)), this.highlightDelay = setTimeout(() => {
|
581
|
+
(t.length || i.length || n || o.length) && ((this.multiflatmapRef || this.flatmapRef) && s ? this.flatmapHighlight(s, t, n, o).then((r) => {
|
581
582
|
try {
|
582
|
-
s.
|
583
|
+
s.showConnectivityTooltips({
|
584
|
+
connectivityInfo: { featureId: r },
|
585
|
+
data: []
|
586
|
+
});
|
583
587
|
} catch (l) {
|
584
588
|
if (console.log(l), o.length && s.mapImp) {
|
585
589
|
const c = s.mapImp.uuid;
|
@@ -590,7 +594,7 @@ const D = {
|
|
590
594
|
) || s.mapImp.clearSearchResults();
|
591
595
|
}
|
592
596
|
}
|
593
|
-
}) : this.scaffoldRef && a && a.changeHighlightedByName(
|
597
|
+
}) : this.scaffoldRef && a && a.changeHighlightedByName(i, "", !1));
|
594
598
|
}, 100);
|
595
599
|
}
|
596
600
|
},
|
@@ -600,6 +604,9 @@ const D = {
|
|
600
604
|
onAnnotationClose: function() {
|
601
605
|
f.emit("annotation-close");
|
602
606
|
},
|
607
|
+
updateOfflineAnnotationEnabled: function(e) {
|
608
|
+
f.emit("update-offline-annotation-enabled", e);
|
609
|
+
},
|
603
610
|
onConnectivityInfoOpen: function(e) {
|
604
611
|
f.emit("connectivity-info-open", e);
|
605
612
|
},
|
@@ -609,21 +616,18 @@ const D = {
|
|
609
616
|
onConnectivityInfoClose: function() {
|
610
617
|
f.emit("connectivity-info-close");
|
611
618
|
},
|
612
|
-
|
613
|
-
const t =
|
619
|
+
loadConnectivityExplorerConfig: async function(e) {
|
620
|
+
const t = e.mapImp, i = A(t), n = w(new $());
|
614
621
|
n.initialise(this.flatmapAPI);
|
615
|
-
const
|
616
|
-
if (this.connectivityKnowledge[
|
617
|
-
var
|
618
|
-
return
|
619
|
-
}).sort((
|
620
|
-
const
|
621
|
-
this.connectivityKnowledge[
|
622
|
-
var l;
|
623
|
-
return r.source === t && ((l = r.connectivity) == null ? void 0 : l.length) && r.id in a;
|
624
|
-
}).sort((r, l) => r.label.localeCompare(l.label));
|
622
|
+
const o = await H(t, n), s = t.uuid, a = t.pathways;
|
623
|
+
if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] = o.filter((r) => {
|
624
|
+
var l;
|
625
|
+
return r.source === i && ((l = r.connectivity) == null ? void 0 : l.length);
|
626
|
+
}).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[s]) {
|
627
|
+
const r = a ? a.paths : {};
|
628
|
+
this.connectivityKnowledge[s] = this.connectivityKnowledge[i].filter((l) => l.id in r);
|
625
629
|
}
|
626
|
-
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), f.emit("species-layout-connectivity-update");
|
630
|
+
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), this.connectivityFilterOptions[s] || (this.connectivityFilterOptions[s] = await e.getFilterOptions()), this.connectivitiesStore.updateFilterOptions(this.connectivityFilterOptions), this.connectivityFilterSources[s] || (this.connectivityFilterSources[s] = e.getFilterSources()), this.connectivitiesStore.updateFilterSources(this.connectivityFilterSources), f.emit("species-layout-connectivity-update");
|
627
631
|
}
|
628
632
|
},
|
629
633
|
data: function() {
|
@@ -646,6 +650,8 @@ const D = {
|
|
646
650
|
isInHelp: !1,
|
647
651
|
mapManager: void 0,
|
648
652
|
connectivityKnowledge: {},
|
653
|
+
connectivityFilterOptions: {},
|
654
|
+
connectivityFilterSources: {},
|
649
655
|
highlightDelay: void 0
|
650
656
|
};
|
651
657
|
},
|