@abi-software/mapintegratedvuer 1.17.3 → 1.17.4
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/{ConnectivityGraph-CKIf0I87.js → ConnectivityGraph-CNtSLKGZ.js} +19 -21
- package/dist/{ContentMixin-NLNFG_hM.js → ContentMixin-BImmmP1E.js} +167 -198
- package/dist/{Flatmap-DHIsuG3u.js → Flatmap-CakK_75H.js} +3 -3
- package/dist/{Iframe-CGY2MkCp.js → Iframe-C7E9XJu7.js} +2 -2
- package/dist/{MultiFlatmap-DMu4KUod.js → MultiFlatmap-DnDXuvTw.js} +3 -3
- package/dist/{Plot-BAew77Nh.js → Plot-CxCj3uTj.js} +2 -2
- package/dist/Scaffold-D1NyLNzW.js +304 -0
- package/dist/{Simulation-BJx5DtiY.js → Simulation-Br3Grrd6.js} +2 -2
- package/dist/{index-CgeNF-PU.js → index-qyfmiqHe.js} +18648 -18794
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +177 -174
- package/dist/{style-CCOYYK7g.js → style-DezYtA61.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/SplitDialog.vue +0 -1
- package/src/components/SplitFlow.vue +1 -0
- package/src/components/viewers/ConnectivityGraph.vue +1 -9
- package/src/components/viewers/Scaffold.vue +130 -78
- package/src/mixins/ContentMixin.js +9 -60
- package/src/stores/connectivities.js +10 -1
- package/dist/Scaffold-CB4NmIv6.js +0 -284
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { markRaw as
|
|
2
|
-
import { G as
|
|
3
|
-
import { mapStores as
|
|
1
|
+
import { markRaw as A } from "vue";
|
|
2
|
+
import { G as C, c as _, u as E, d as O, e as N, f as x, T as d, E as m, h as R, l as P, i as B } from "./index-qyfmiqHe.js";
|
|
3
|
+
import { mapStores as X } from "pinia";
|
|
4
4
|
const b = function(e) {
|
|
5
5
|
return e ? [...new Set(e.map((n) => JSON.stringify(n)))].map(
|
|
6
6
|
(n) => JSON.parse(n)
|
|
7
7
|
) : [];
|
|
8
|
-
},
|
|
8
|
+
}, L = [], w = async function(e, n) {
|
|
9
9
|
const r = n.filter(
|
|
10
|
-
(
|
|
11
|
-
), t =
|
|
12
|
-
(
|
|
10
|
+
(l) => L.some((s) => s.taxon === l)
|
|
11
|
+
), t = L.filter(
|
|
12
|
+
(l) => r.includes(l.taxon)
|
|
13
13
|
), a = n.filter(
|
|
14
|
-
(
|
|
14
|
+
(l) => !r.includes(l)
|
|
15
15
|
);
|
|
16
16
|
if (a.length) {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
let { entity:
|
|
17
|
+
const l = await e.queryLabels(a);
|
|
18
|
+
if (l.length)
|
|
19
|
+
return l.forEach((s) => {
|
|
20
|
+
let { entity: i, label: h } = s;
|
|
21
21
|
h === "Mammalia" && (h = "Mammalia not otherwise specified");
|
|
22
|
-
const o = { taxon:
|
|
23
|
-
t.push(o),
|
|
22
|
+
const o = { taxon: i, label: h };
|
|
23
|
+
t.push(o), L.push(o);
|
|
24
24
|
}), t;
|
|
25
25
|
} else
|
|
26
26
|
return t;
|
|
27
|
-
},
|
|
27
|
+
}, y = function(e, n) {
|
|
28
28
|
if (!e || !n) return !1;
|
|
29
29
|
let r = JSON.stringify(e), t = JSON.stringify(n);
|
|
30
30
|
return r.indexOf(t) !== -1;
|
|
31
|
-
},
|
|
32
|
-
const r = e.name ?? e, t = n.name ?? n, a = r.toUpperCase(),
|
|
33
|
-
return a <
|
|
31
|
+
}, F = (e, n) => {
|
|
32
|
+
const r = e.name ?? e, t = n.name ?? n, a = r.toUpperCase(), l = t.toUpperCase();
|
|
33
|
+
return a < l ? -1 : a > l ? 1 : 0;
|
|
34
34
|
};
|
|
35
|
-
let
|
|
35
|
+
let T = function() {
|
|
36
36
|
this.initialise = function(e) {
|
|
37
37
|
this.flatmapAPI = e, this.destinations = [], this.origins = [], this.components = [], this.destinationsWithDatasets = [], this.originsWithDatasets = [], this.componentsWithDatasets = [], this.destinationsCombinations = [], this.originsCombinations = [], this.componentsCombinations = [], this.singleConnectivityList = [], this.hasSingleConnectivityList = !1, this.rawURLs = [], this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "map", this.noMapConnectivity = !1;
|
|
38
38
|
}, this.createTooltipData = async function(e, n) {
|
|
@@ -42,13 +42,13 @@ let S = function() {
|
|
|
42
42
|
if (n.provenanceTaxonomy) {
|
|
43
43
|
t = [];
|
|
44
44
|
try {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const { label:
|
|
48
|
-
t.push(
|
|
45
|
+
const l = await w(e, n.provenanceTaxonomy);
|
|
46
|
+
l.length && l.forEach((s) => {
|
|
47
|
+
const { label: i } = s;
|
|
48
|
+
t.push(i);
|
|
49
49
|
});
|
|
50
|
-
} catch (
|
|
51
|
-
console.log(
|
|
50
|
+
} catch (l) {
|
|
51
|
+
console.log(l);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
@@ -94,12 +94,12 @@ let S = function() {
|
|
|
94
94
|
return new Promise(async (r) => {
|
|
95
95
|
let t = {};
|
|
96
96
|
this.uberons = [];
|
|
97
|
-
const a = await
|
|
98
|
-
a.length && (a.forEach((
|
|
99
|
-
const { taxon:
|
|
100
|
-
t[
|
|
101
|
-
id:
|
|
102
|
-
name:
|
|
97
|
+
const a = await w(e, n);
|
|
98
|
+
a.length && (a.forEach((l) => {
|
|
99
|
+
const { taxon: s, label: i } = l;
|
|
100
|
+
t[s] = i, this.uberons.push({
|
|
101
|
+
id: s,
|
|
102
|
+
name: i
|
|
103
103
|
});
|
|
104
104
|
}), r(t));
|
|
105
105
|
});
|
|
@@ -130,10 +130,10 @@ let S = function() {
|
|
|
130
130
|
Array.isArray(a) ? t.push(a.flat()) : t.push(a);
|
|
131
131
|
}), t.flat();
|
|
132
132
|
}, this.findComponents = function(e, n, r, t) {
|
|
133
|
-
let a = e.connectivity.flat(),
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
}),
|
|
133
|
+
let a = e.connectivity.flat(), l = b(a), s = [], i = !1;
|
|
134
|
+
return l.forEach((h) => {
|
|
135
|
+
i = !1, y(n, h) && (i = !0), t && y(t, h) && (i = !0), y(r, h) && (i = !0), i || s.push(h);
|
|
136
|
+
}), s;
|
|
137
137
|
}, this.retrieveFlatmapKnowledgeForEvent = async function(e, n) {
|
|
138
138
|
this.controller && this.controller.abort(), this.controller = new AbortController(), this.controller.signal;
|
|
139
139
|
const r = n.resource;
|
|
@@ -141,8 +141,8 @@ let S = function() {
|
|
|
141
141
|
let t = await this.queryForConnectivityNew(e, r[0]);
|
|
142
142
|
return await Promise.all([t]);
|
|
143
143
|
}, this.queryForConnectivityNew = async function(e, n, r = "map", t = !0) {
|
|
144
|
-
const a = /^sckan-(\d{4})/.exec(e.knowledgeSource || ""),
|
|
145
|
-
return this.connectivitySource =
|
|
144
|
+
const a = /^sckan-(\d{4})/.exec(e.knowledgeSource || ""), s = (a ? Number(a[1]) : 0) >= 2026, i = e.mapMetadata.uuid, h = this.flatmapAPI;
|
|
145
|
+
return this.connectivitySource = s ? "sckan" : r, s && (this.singleConnectivityList = await C(h, i, n)), new Promise((o) => {
|
|
146
146
|
(this.connectivitySource === "map" ? this.queryMapConnectivity(e.mapMetadata.uuid, n) : e.queryKnowledge(n)).then((c) => {
|
|
147
147
|
if (this.checkConnectivityExists(c)) {
|
|
148
148
|
this.connectivitySource === "map" && (this.noMapConnectivity = !1);
|
|
@@ -174,7 +174,7 @@ let S = function() {
|
|
|
174
174
|
throw new Error(t);
|
|
175
175
|
}
|
|
176
176
|
}, this.queryForConnectivity = function(e, n, r, t = !0) {
|
|
177
|
-
const a = { sql: this.buildConnectivitySqlStatement(n) },
|
|
177
|
+
const a = { sql: this.buildConnectivitySqlStatement(n) }, l = {
|
|
178
178
|
method: "POST",
|
|
179
179
|
headers: {
|
|
180
180
|
"Content-Type": "application/json"
|
|
@@ -183,17 +183,17 @@ let S = function() {
|
|
|
183
183
|
...r ? { signal: r } : {}
|
|
184
184
|
// add signal to header if it exists
|
|
185
185
|
};
|
|
186
|
-
return new Promise((
|
|
187
|
-
fetch(`${this.flatmapAPI}knowledge/query/`,
|
|
188
|
-
if (this.connectivityExists(
|
|
189
|
-
let h = JSON.parse(
|
|
186
|
+
return new Promise((s) => {
|
|
187
|
+
fetch(`${this.flatmapAPI}knowledge/query/`, l).then((i) => i.json()).then((i) => {
|
|
188
|
+
if (this.connectivityExists(i)) {
|
|
189
|
+
let h = JSON.parse(i.values[0][0]);
|
|
190
190
|
t ? this.processConnectivity(e, h).then((o) => {
|
|
191
|
-
|
|
192
|
-
}) :
|
|
191
|
+
s(o);
|
|
192
|
+
}) : s(h);
|
|
193
193
|
} else
|
|
194
|
-
|
|
195
|
-
}).catch((
|
|
196
|
-
|
|
194
|
+
s(!1);
|
|
195
|
+
}).catch((i) => {
|
|
196
|
+
i.name === "AbortError" || console.error("Error:", i), s(!1);
|
|
197
197
|
});
|
|
198
198
|
});
|
|
199
199
|
}, this.checkConnectivityExists = function(e) {
|
|
@@ -212,17 +212,17 @@ let S = function() {
|
|
|
212
212
|
n[a] == null ? t += `, ${a}` : t += `, ${n[a]}`;
|
|
213
213
|
}), t;
|
|
214
214
|
}, this.flattenAndFindDatasets = function(e, n, r) {
|
|
215
|
-
let t = this.flattenConnectivity(e), a = this.flattenConnectivity(n),
|
|
215
|
+
let t = this.flattenConnectivity(e), a = this.flattenConnectivity(n), l = this.flattenConnectivity(r);
|
|
216
216
|
this.originsWithDatasets = this.uberons.filter(
|
|
217
|
-
(
|
|
218
|
-
).sort(
|
|
219
|
-
(
|
|
220
|
-
).sort(
|
|
221
|
-
(
|
|
222
|
-
).sort(
|
|
223
|
-
const { sckanNodeId:
|
|
224
|
-
r.find((c) => JSON.stringify(c) === JSON.stringify(
|
|
225
|
-
sckanId:
|
|
217
|
+
(s) => t.indexOf(s.id) !== -1
|
|
218
|
+
).sort(F), this.componentsWithDatasets = this.uberons.filter(
|
|
219
|
+
(s) => a.indexOf(s.id) !== -1
|
|
220
|
+
).sort(F), this.destinationsWithDatasets = this.uberons.filter(
|
|
221
|
+
(s) => l.indexOf(s.id) !== -1
|
|
222
|
+
).sort(F), this.singleConnectivityList.length > 0 && this.singleConnectivityList.forEach((s) => {
|
|
223
|
+
const { sckanNodeId: i, sckanNodeLabel: h, mapNodeId: o, mapNodeLabel: u } = s;
|
|
224
|
+
r.find((c) => JSON.stringify(c) === JSON.stringify(i)) && (this.destinationsCombinations.push({
|
|
225
|
+
sckanId: i,
|
|
226
226
|
sckanLabel: h,
|
|
227
227
|
mapId: o,
|
|
228
228
|
mapLabel: u
|
|
@@ -232,8 +232,8 @@ let S = function() {
|
|
|
232
232
|
id: f,
|
|
233
233
|
name: u.split(",")[v]
|
|
234
234
|
});
|
|
235
|
-
})), e.find((c) => JSON.stringify(c) === JSON.stringify(
|
|
236
|
-
sckanId:
|
|
235
|
+
})), e.find((c) => JSON.stringify(c) === JSON.stringify(i)) && (this.originsCombinations.push({
|
|
236
|
+
sckanId: i,
|
|
237
237
|
sckanLabel: h,
|
|
238
238
|
mapId: o,
|
|
239
239
|
mapLabel: u
|
|
@@ -243,8 +243,8 @@ let S = function() {
|
|
|
243
243
|
id: f,
|
|
244
244
|
name: u.split(",")[v]
|
|
245
245
|
});
|
|
246
|
-
})), n.find((c) => JSON.stringify(c) === JSON.stringify(
|
|
247
|
-
sckanId:
|
|
246
|
+
})), n.find((c) => JSON.stringify(c) === JSON.stringify(i)) && (this.componentsCombinations.push({
|
|
247
|
+
sckanId: i,
|
|
248
248
|
sckanLabel: h,
|
|
249
249
|
mapId: o,
|
|
250
250
|
mapLabel: u
|
|
@@ -258,7 +258,7 @@ let S = function() {
|
|
|
258
258
|
});
|
|
259
259
|
}, this.processConnectivity = function(e, n) {
|
|
260
260
|
return new Promise((r) => {
|
|
261
|
-
let t = [], a = [],
|
|
261
|
+
let t = [], a = [], l;
|
|
262
262
|
if (n && n["node-phenotypes"]) {
|
|
263
263
|
const h = ["ilxtr:hasSomaLocatedIn"], o = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
|
|
264
264
|
h.forEach((u) => {
|
|
@@ -267,19 +267,19 @@ let S = function() {
|
|
|
267
267
|
u in n["node-phenotypes"] && a.push(...n["node-phenotypes"][u]);
|
|
268
268
|
}), a = b(a);
|
|
269
269
|
} else
|
|
270
|
-
a = b(n.axons), n.somas && n.somas.length > 0 && t.push(...n.somas), n.dendrites && n.dendrites.length > 0 && t.push(...n.dendrites), t = b(t),
|
|
271
|
-
const
|
|
272
|
-
this.createLabelLookup(e,
|
|
270
|
+
a = b(n.axons), n.somas && n.somas.length > 0 && t.push(...n.somas), n.dendrites && n.dendrites.length > 0 && t.push(...n.dendrites), t = b(t), l = n.somas;
|
|
271
|
+
const s = this.findComponents(n, a, t, l), i = this.findAllIdsFromConnectivity(n);
|
|
272
|
+
this.createLabelLookup(e, i).then((h) => {
|
|
273
273
|
this.origins = t.map(
|
|
274
274
|
(o) => this.createLabelFromNeuralNode(o, h)
|
|
275
|
-
).sort(
|
|
275
|
+
).sort(F), this.components = s.map(
|
|
276
276
|
(o) => this.createLabelFromNeuralNode(o, h)
|
|
277
|
-
).sort(
|
|
277
|
+
).sort(F), this.destinations = a.map(
|
|
278
278
|
(o) => this.createLabelFromNeuralNode(o, h)
|
|
279
|
-
).sort(
|
|
279
|
+
).sort(F), this.flattenAndFindDatasets(t, s, a), r({
|
|
280
280
|
ids: {
|
|
281
281
|
dendrites: t,
|
|
282
|
-
components:
|
|
282
|
+
components: s,
|
|
283
283
|
axons: a
|
|
284
284
|
},
|
|
285
285
|
labels: {
|
|
@@ -310,13 +310,13 @@ let S = function() {
|
|
|
310
310
|
});
|
|
311
311
|
if (!a.ok)
|
|
312
312
|
throw new Error(`Cannot access ${r}`);
|
|
313
|
-
const
|
|
314
|
-
if ("error" in
|
|
315
|
-
throw new TypeError(
|
|
316
|
-
return
|
|
313
|
+
const l = await a.json();
|
|
314
|
+
if ("error" in l)
|
|
315
|
+
throw new TypeError(l.error);
|
|
316
|
+
return l.values;
|
|
317
317
|
};
|
|
318
318
|
};
|
|
319
|
-
const
|
|
319
|
+
const S = [
|
|
320
320
|
{
|
|
321
321
|
id: 0,
|
|
322
322
|
nerve_id: "ILX:0793723",
|
|
@@ -1129,50 +1129,50 @@ const I = [
|
|
|
1129
1129
|
"FMA subclasses (in human nerves)": ["FMA:6892", "FMA:6893"],
|
|
1130
1130
|
"subclass labels": ["Right T9 grey ramus communicans", "Left T9 grey ramus communicans"]
|
|
1131
1131
|
}
|
|
1132
|
-
],
|
|
1132
|
+
], U = () => {
|
|
1133
1133
|
const e = {};
|
|
1134
|
-
return
|
|
1134
|
+
return S.forEach((n) => {
|
|
1135
1135
|
const r = n.nerve_id, t = n.label.toLowerCase(), a = n["subclass labels"];
|
|
1136
1136
|
if (r && t !== "nerve") {
|
|
1137
1137
|
if (!a.length)
|
|
1138
1138
|
return;
|
|
1139
1139
|
r in e || (e[r] = {});
|
|
1140
|
-
const
|
|
1140
|
+
const l = a.map((s) => s.toLowerCase()).sort();
|
|
1141
1141
|
e[r] = {
|
|
1142
1142
|
nerve: t,
|
|
1143
|
-
subNerves:
|
|
1143
|
+
subNerves: l
|
|
1144
1144
|
};
|
|
1145
1145
|
}
|
|
1146
1146
|
}), e;
|
|
1147
|
-
},
|
|
1147
|
+
}, k = () => {
|
|
1148
1148
|
let e = [], n = {
|
|
1149
1149
|
key: "scaffold.connectivity.nerve",
|
|
1150
1150
|
label: "Nerves",
|
|
1151
1151
|
children: []
|
|
1152
1152
|
}, r = [];
|
|
1153
|
-
for (const t of
|
|
1153
|
+
for (const t of S) {
|
|
1154
1154
|
if (t.label === "nerve")
|
|
1155
1155
|
continue;
|
|
1156
1156
|
let a = {
|
|
1157
1157
|
facetPropPath: "scaffold.connectivity.nerve",
|
|
1158
1158
|
label: "",
|
|
1159
1159
|
children: []
|
|
1160
|
-
},
|
|
1161
|
-
for (const [
|
|
1162
|
-
if (
|
|
1163
|
-
for (const h of
|
|
1164
|
-
|
|
1160
|
+
}, l = [];
|
|
1161
|
+
for (const [s, i] of Object.entries(t))
|
|
1162
|
+
if (s === "label" && (a.label = i), s === "subclass labels")
|
|
1163
|
+
for (const h of i)
|
|
1164
|
+
l.push({
|
|
1165
1165
|
facetPropPath: "scaffold.connectivity.subnerve",
|
|
1166
1166
|
label: h
|
|
1167
1167
|
});
|
|
1168
|
-
|
|
1168
|
+
l.length && (a.children = l.sort((s, i) => s.label.localeCompare(i.label)), r.push(a));
|
|
1169
1169
|
}
|
|
1170
1170
|
return r.length && (n.children = r.sort((t, a) => t.label.localeCompare(a.label)), e.push(n)), e;
|
|
1171
1171
|
};
|
|
1172
|
-
function
|
|
1172
|
+
function D(e) {
|
|
1173
1173
|
return e[0].toUpperCase() + e.substring(1);
|
|
1174
1174
|
}
|
|
1175
|
-
const
|
|
1175
|
+
const J = {
|
|
1176
1176
|
emits: ["flatmap-provenance-ready", "resource-selected", "species-changed"],
|
|
1177
1177
|
props: {
|
|
1178
1178
|
/**
|
|
@@ -1191,7 +1191,7 @@ const K = {
|
|
|
1191
1191
|
},
|
|
1192
1192
|
inject: ["showGlobalSettings", "showOpenMapButton"],
|
|
1193
1193
|
computed: {
|
|
1194
|
-
...
|
|
1194
|
+
...X(_, E, O, N),
|
|
1195
1195
|
idNamePair() {
|
|
1196
1196
|
return this.splitFlowStore.idNamePair;
|
|
1197
1197
|
},
|
|
@@ -1213,7 +1213,7 @@ const K = {
|
|
|
1213
1213
|
this.alive = !1;
|
|
1214
1214
|
},
|
|
1215
1215
|
mounted: function() {
|
|
1216
|
-
this.multiflatmapRef = this.$refs.multiflatmap, this.flatmapRef = this.$refs.flatmap, this.
|
|
1216
|
+
this.multiflatmapRef = A(this.$refs.multiflatmap), this.flatmapRef = A(this.$refs.flatmap), this.iframeRef = A(this.$refs.iframe), this.plotRef = A(this.$refs.plot), this.simulationRef = A(this.$refs.simulation), (this.iframeRef || this.plotRef || this.simulationRef) && this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources;
|
|
1217
1217
|
},
|
|
1218
1218
|
methods: {
|
|
1219
1219
|
toggleMinimap: function(e, n) {
|
|
@@ -1223,8 +1223,8 @@ const K = {
|
|
|
1223
1223
|
if (a)
|
|
1224
1224
|
if (e === !0) {
|
|
1225
1225
|
if (n === !1) {
|
|
1226
|
-
const
|
|
1227
|
-
a.createMinimap(
|
|
1226
|
+
const l = ((r = a.options) == null ? void 0 : r.minimap) || { position: "top-right" };
|
|
1227
|
+
a.createMinimap(l), t.addResizeButtonToMinimap(), t.minimapSmall = !1;
|
|
1228
1228
|
}
|
|
1229
1229
|
} else
|
|
1230
1230
|
a.closeMinimap();
|
|
@@ -1248,7 +1248,7 @@ const K = {
|
|
|
1248
1248
|
this.settingsStore.updateMapManager(e);
|
|
1249
1249
|
},
|
|
1250
1250
|
trackOpenMap: function(e) {
|
|
1251
|
-
|
|
1251
|
+
d.sendEvent({
|
|
1252
1252
|
event: "interaction_event",
|
|
1253
1253
|
event_name: "portal_maps_open_map",
|
|
1254
1254
|
category: e,
|
|
@@ -1278,14 +1278,14 @@ const K = {
|
|
|
1278
1278
|
* Callback when the vuers emit a selected event.
|
|
1279
1279
|
*/
|
|
1280
1280
|
resourceSelected: function(e, n) {
|
|
1281
|
-
var
|
|
1281
|
+
var s, i, h, o;
|
|
1282
1282
|
const r = n[0];
|
|
1283
1283
|
if (this.resourceHasAction(r)) {
|
|
1284
1284
|
m.emit("PopoverActionClick", r);
|
|
1285
1285
|
return;
|
|
1286
1286
|
}
|
|
1287
1287
|
let t, a = !1;
|
|
1288
|
-
const
|
|
1288
|
+
const l = {
|
|
1289
1289
|
paneIndex: this.entry.id,
|
|
1290
1290
|
type: e,
|
|
1291
1291
|
resource: n,
|
|
@@ -1293,9 +1293,9 @@ const K = {
|
|
|
1293
1293
|
eventType: void 0
|
|
1294
1294
|
};
|
|
1295
1295
|
if (e == "MultiFlatmap" || e == "Flatmap")
|
|
1296
|
-
if (
|
|
1297
|
-
if (
|
|
1298
|
-
let u =
|
|
1296
|
+
if (l.internalName = (s = r == null ? void 0 : r.feature) != null && s.label ? r.feature.label : this.idNamePair[r.feature.models], r.eventType == "click") {
|
|
1297
|
+
if (l.eventType = "selected", r.feature.type == "marker") {
|
|
1298
|
+
let u = l.internalName;
|
|
1299
1299
|
if (this.settingsStore.isFeaturedMarkerIdentifier(r.feature.id))
|
|
1300
1300
|
t = {
|
|
1301
1301
|
type: "Search",
|
|
@@ -1325,50 +1325,16 @@ const K = {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
a = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
|
1327
1327
|
}
|
|
1328
|
-
} else r.eventType == "mouseenter" && (
|
|
1329
|
-
else e == "Scaffold" && (r && ((((
|
|
1328
|
+
} else r.eventType == "mouseenter" && (l.eventType = "highlighted", a = !0);
|
|
1329
|
+
else e == "Scaffold" && (r && ((((i = r.data) == null ? void 0 : i.id) === void 0 || ((h = r.data) == null ? void 0 : h.id) === "") && (r.data.id = (o = r.data) == null ? void 0 : o.group), l.internalName = r.data.id, r.data.lastActionOnMarker === !0 && (t = {
|
|
1330
1330
|
type: "Facet",
|
|
1331
|
-
facets: [
|
|
1332
|
-
})),
|
|
1333
|
-
t && m.emit("PopoverActionClick", t), a && this.$emit("resource-selected",
|
|
1331
|
+
facets: [D(r.data.id)]
|
|
1332
|
+
})), l.eventType = "selected", a = !0);
|
|
1333
|
+
t && m.emit("PopoverActionClick", t), a && this.$emit("resource-selected", l);
|
|
1334
1334
|
},
|
|
1335
1335
|
resourceHasAction: function(e) {
|
|
1336
1336
|
return e && (e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets");
|
|
1337
1337
|
},
|
|
1338
|
-
/**
|
|
1339
|
-
* Get the term to zoom/highlight in a synchronisation event,
|
|
1340
|
-
* if it cannot be found in the map, it will perform several
|
|
1341
|
-
* calls to try to ge a valid name/id.
|
|
1342
|
-
*/
|
|
1343
|
-
getNameAndIdFromSyncData: async function(e) {
|
|
1344
|
-
let n = e.internalName;
|
|
1345
|
-
n === void 0 && e.resource && (n = e.resource.label);
|
|
1346
|
-
let r;
|
|
1347
|
-
if (e.resource && e.resource.resource && (r = e.resource.resource[0]), this.entry.type === "Scaffold") {
|
|
1348
|
-
if (this.$refs.scaffold.findObjectsWithGroupName(n).length === 0) {
|
|
1349
|
-
if (e.resource && e.resource.feature) {
|
|
1350
|
-
const i = w(e.resource.feature.models);
|
|
1351
|
-
if (i.length > 0) return i;
|
|
1352
|
-
}
|
|
1353
|
-
let a = X(n);
|
|
1354
|
-
if (a)
|
|
1355
|
-
return a;
|
|
1356
|
-
if (r && e.eventType === "selected")
|
|
1357
|
-
return fetch(`${this.apiLocation}get-related-terms/${r}`).then((i) => i.json()).then((i) => {
|
|
1358
|
-
var l;
|
|
1359
|
-
if (((l = i.uberon) == null ? void 0 : l.array.length) > 0)
|
|
1360
|
-
return n = i.uberon.array[0].name.charAt(0).toUpperCase() + i.uberon.array[0].name.slice(1), r = i.uberon.array[0].id.toUpperCase(), { id: r, name: n };
|
|
1361
|
-
});
|
|
1362
|
-
}
|
|
1363
|
-
} else if (this.entry.type === "MultiFlatmap")
|
|
1364
|
-
if (n === "Bladder")
|
|
1365
|
-
n = "Urinary Bladder";
|
|
1366
|
-
else {
|
|
1367
|
-
const t = w(n);
|
|
1368
|
-
t.length > 0 && (n = t[0]);
|
|
1369
|
-
}
|
|
1370
|
-
return { id: r, name: n };
|
|
1371
|
-
},
|
|
1372
1338
|
// Get the species and andaotmy info for the featured datasets
|
|
1373
1339
|
getDatasetAnatomyInfo: function(e) {
|
|
1374
1340
|
fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then((n) => n.json()).then((n) => {
|
|
@@ -1385,21 +1351,21 @@ const K = {
|
|
|
1385
1351
|
} catch {
|
|
1386
1352
|
a = void 0;
|
|
1387
1353
|
}
|
|
1388
|
-
let
|
|
1354
|
+
let l;
|
|
1389
1355
|
try {
|
|
1390
|
-
let
|
|
1391
|
-
for (; !
|
|
1392
|
-
const h = r.organisms.subject[
|
|
1393
|
-
h.species && (
|
|
1356
|
+
let s = 0, i = !1;
|
|
1357
|
+
for (; !i && s < r.organisms.subject.length; ) {
|
|
1358
|
+
const h = r.organisms.subject[s];
|
|
1359
|
+
h.species && (l = h.species.name, i = !0), s += 1;
|
|
1394
1360
|
}
|
|
1395
1361
|
} catch {
|
|
1396
|
-
|
|
1362
|
+
l = void 0;
|
|
1397
1363
|
}
|
|
1398
1364
|
this.settingsStore.updateFeaturedMarker({
|
|
1399
1365
|
identifier: e,
|
|
1400
1366
|
marker: t,
|
|
1401
1367
|
doi: a,
|
|
1402
|
-
species:
|
|
1368
|
+
species: l
|
|
1403
1369
|
});
|
|
1404
1370
|
});
|
|
1405
1371
|
},
|
|
@@ -1414,19 +1380,19 @@ const K = {
|
|
|
1414
1380
|
return !n.datasets || n.datasets.length == 0 ? !1 : n.datasets.map((r) => r.id);
|
|
1415
1381
|
},
|
|
1416
1382
|
flatmapResourceSelected: function(e, n) {
|
|
1417
|
-
var
|
|
1383
|
+
var s;
|
|
1418
1384
|
this.resourceSelected(e, n);
|
|
1419
|
-
const r = n[0], { eventType: t, feature: a } = r, { viewingMode:
|
|
1420
|
-
if (t === "click" && a.type === "feature" && ((
|
|
1421
|
-
const
|
|
1385
|
+
const r = n[0], { eventType: t, feature: a } = r, { viewingMode: l } = this.settingsStore.globalSettings;
|
|
1386
|
+
if (t === "click" && a.type === "feature" && ((s = a.models) != null && s.startsWith("ilxtr:"))) {
|
|
1387
|
+
const i = [];
|
|
1422
1388
|
n.forEach((h) => {
|
|
1423
1389
|
const { models: o } = h.feature;
|
|
1424
|
-
|
|
1425
|
-
}),
|
|
1390
|
+
i.push(o);
|
|
1391
|
+
}), d.sendEvent({
|
|
1426
1392
|
event: "interaction_event",
|
|
1427
1393
|
event_name: "portal_maps_connectivity",
|
|
1428
|
-
category:
|
|
1429
|
-
location: e + " " +
|
|
1394
|
+
category: i.join(", "),
|
|
1395
|
+
location: e + " " + l
|
|
1430
1396
|
});
|
|
1431
1397
|
}
|
|
1432
1398
|
},
|
|
@@ -1481,37 +1447,37 @@ const K = {
|
|
|
1481
1447
|
},
|
|
1482
1448
|
flatmapHighlight: async function(e, n, r, t) {
|
|
1483
1449
|
let a = [...n, ...t];
|
|
1484
|
-
const
|
|
1485
|
-
if (
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1450
|
+
const l = this.settingsStore.globalSettings;
|
|
1451
|
+
if (l.highlightConnectedPaths) {
|
|
1452
|
+
const s = n.length ? n : t.length ? t : [], i = await e.retrieveConnectedPaths(s);
|
|
1453
|
+
i && a.push(...i);
|
|
1488
1454
|
}
|
|
1489
|
-
if (
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1455
|
+
if (l.highlightDOIPaths) {
|
|
1456
|
+
const s = await e.searchConnectivitiesByReference(r);
|
|
1457
|
+
s && a.push(...s);
|
|
1492
1458
|
}
|
|
1493
1459
|
return a = [...new Set(a)], a;
|
|
1494
1460
|
},
|
|
1495
1461
|
sidebarHoverHighlight: function(e) {
|
|
1496
1462
|
var n, r;
|
|
1497
1463
|
if (this.visible && ((this.flatmapRef || this.multiflatmapRef) && this.flatmapReady || this.scaffoldRef && this.scaffoldLoaded)) {
|
|
1498
|
-
const t = this.settingsStore.hoverAnatomies, a = this.settingsStore.hoverOrgans,
|
|
1499
|
-
let
|
|
1500
|
-
this.flatmapRef && (
|
|
1501
|
-
(t.length || a.length ||
|
|
1464
|
+
const t = this.settingsStore.hoverAnatomies, a = this.settingsStore.hoverOrgans, l = this.settingsStore.hoverDOI, s = this.settingsStore.hoverConnectivity;
|
|
1465
|
+
let i = null, h = null;
|
|
1466
|
+
this.flatmapRef && (i = this.flatmapRef), this.multiflatmapRef && (i = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (h = this.scaffoldRef), clearTimeout(this.highlightDelay), !t.length && !a.length && !l && !s.length && ((this.multiflatmapRef || this.flatmapRef) && i ? i.mapImp && !i.mapImp.contextLost && ((n = i.mapImp) == null || n.clearSearchResults(), e.connectivityProcessed && ((r = i.mapImp) == null || r.setPaint({ dimmed: !0 }))) : this.scaffoldRef && h && h.changeHighlightedByName(a, "", !1)), this.highlightDelay = setTimeout(() => {
|
|
1467
|
+
(t.length || a.length || l || s.length) && ((this.multiflatmapRef || this.flatmapRef) && i ? this.flatmapHighlight(i, t, l, s).then((o) => {
|
|
1502
1468
|
try {
|
|
1503
|
-
|
|
1469
|
+
i.showConnectivityTooltips({
|
|
1504
1470
|
connectivityInfo: { featureId: o },
|
|
1505
1471
|
data: []
|
|
1506
1472
|
});
|
|
1507
1473
|
} catch (u) {
|
|
1508
|
-
if (console.log(u),
|
|
1509
|
-
const c =
|
|
1474
|
+
if (console.log(u), s.length && i.mapImp) {
|
|
1475
|
+
const c = i.mapImp.uuid;
|
|
1510
1476
|
o.every(
|
|
1511
1477
|
(f) => this.connectivityKnowledge[c].some(
|
|
1512
1478
|
(p) => p.id === f
|
|
1513
1479
|
)
|
|
1514
|
-
) ||
|
|
1480
|
+
) || i.mapImp && !i.mapImp.contextLost && i.mapImp.clearSearchResults();
|
|
1515
1481
|
}
|
|
1516
1482
|
}
|
|
1517
1483
|
}) : this.scaffoldRef && h && h.changeHighlightedByName(a, "", !1));
|
|
@@ -1551,16 +1517,16 @@ const K = {
|
|
|
1551
1517
|
this.flatmapService = await this.mockUpFlatmapService(), this.loadConnectivityExplorerConfig(this.flatmapService);
|
|
1552
1518
|
},
|
|
1553
1519
|
mockUpFlatmapService: async function() {
|
|
1554
|
-
const r = (await (await fetch(this.flatmapAPI)).json()).filter((u) => u.id === "human-flatmap_male").sort((u, c) => c.created.localeCompare(u.created))[0], t = r.uuid, a = r.sckan["knowledge-source"],
|
|
1555
|
-
this.flatmapQueries =
|
|
1556
|
-
const
|
|
1520
|
+
const r = (await (await fetch(this.flatmapAPI)).json()).filter((u) => u.id === "human-flatmap_male").sort((u, c) => c.created.localeCompare(u.created))[0], t = r.uuid, a = r.sckan["knowledge-source"], s = await (await fetch(`${this.flatmapAPI}/flatmap/${t}/pathways`)).json();
|
|
1521
|
+
this.flatmapQueries = A(new T()), this.flatmapQueries.initialise(this.flatmapAPI);
|
|
1522
|
+
const i = {
|
|
1557
1523
|
mapMetadata: {
|
|
1558
1524
|
uuid: t,
|
|
1559
1525
|
connectivity: {
|
|
1560
1526
|
...r.sckan
|
|
1561
1527
|
}
|
|
1562
1528
|
},
|
|
1563
|
-
pathways:
|
|
1529
|
+
pathways: s,
|
|
1564
1530
|
resource: this.entry.resource,
|
|
1565
1531
|
knowledgeSource: a,
|
|
1566
1532
|
queryKnowledge: async (u) => {
|
|
@@ -1570,50 +1536,50 @@ const K = {
|
|
|
1570
1536
|
queryLabels: async (u) => {
|
|
1571
1537
|
const c = `select source, entity, knowledge from knowledge where (source=? or source is null) and entity in (?${", ?".repeat(u.length - 1)}) order by entity, source desc`, v = [a, ...u], f = await this.flatmapQueries.queryKnowledge(c, v), p = [];
|
|
1572
1538
|
let g;
|
|
1573
|
-
for (const
|
|
1574
|
-
if (
|
|
1575
|
-
const
|
|
1539
|
+
for (const M of f)
|
|
1540
|
+
if (M[1] !== g) {
|
|
1541
|
+
const I = JSON.parse(M[2]);
|
|
1576
1542
|
p.push({
|
|
1577
|
-
entity:
|
|
1578
|
-
label:
|
|
1579
|
-
}), g =
|
|
1543
|
+
entity: M[1],
|
|
1544
|
+
label: I.label || M[1]
|
|
1545
|
+
}), g = M[1];
|
|
1580
1546
|
}
|
|
1581
1547
|
return p;
|
|
1582
1548
|
}
|
|
1583
|
-
}, h =
|
|
1549
|
+
}, h = k();
|
|
1584
1550
|
return {
|
|
1585
1551
|
mockup: !0,
|
|
1586
1552
|
getFilterOptions: async (u, c) => {
|
|
1587
|
-
const f = await
|
|
1553
|
+
const f = await B(this.flatmapAPI, u, c, void 0);
|
|
1588
1554
|
return [...h, ...f];
|
|
1589
1555
|
},
|
|
1590
|
-
getTermNerveMaps:
|
|
1591
|
-
mapImp:
|
|
1556
|
+
getTermNerveMaps: U,
|
|
1557
|
+
mapImp: i
|
|
1592
1558
|
};
|
|
1593
1559
|
},
|
|
1594
1560
|
loadConnectivityExplorerConfig: async function(e) {
|
|
1595
|
-
var
|
|
1561
|
+
var l;
|
|
1596
1562
|
const n = e.mapImp, r = R(n), t = e.mockup ? n.resource : n.uuid;
|
|
1597
1563
|
let a = [];
|
|
1598
1564
|
if (!this.connectivityKnowledge[r]) {
|
|
1599
|
-
this.flatmapQueries =
|
|
1600
|
-
const
|
|
1601
|
-
this.connectivityKnowledge[r] =
|
|
1565
|
+
this.flatmapQueries = A(new T()), this.flatmapQueries.initialise(this.flatmapAPI);
|
|
1566
|
+
const s = await P(n, this.flatmapQueries);
|
|
1567
|
+
this.connectivityKnowledge[r] = s.filter((i) => {
|
|
1602
1568
|
var h;
|
|
1603
|
-
return (h =
|
|
1604
|
-
}).sort((
|
|
1569
|
+
return (h = i.connectivity) == null ? void 0 : h.length;
|
|
1570
|
+
}).sort((i, h) => i.label.localeCompare(h.label));
|
|
1605
1571
|
}
|
|
1606
1572
|
if (!this.connectivityKnowledge[t]) {
|
|
1607
|
-
const
|
|
1608
|
-
this.connectivityKnowledge[t] = this.connectivityKnowledge[r].filter((
|
|
1573
|
+
const s = ((l = n.pathways) == null ? void 0 : l.paths) || {};
|
|
1574
|
+
this.connectivityKnowledge[t] = this.connectivityKnowledge[r].filter((i) => i.id in s);
|
|
1609
1575
|
}
|
|
1610
1576
|
if (!this.connectivityFilterOptions[t] && !e.mockup && (this.connectivityFilterOptions[t] = await e.getFilterOptions(n, this.connectivityKnowledge[t])), e.mockup) {
|
|
1611
|
-
const
|
|
1612
|
-
this.connectivityKnowledge[t] =
|
|
1577
|
+
const s = e.getTermNerveMaps() || {}, i = JSON.parse(JSON.stringify(this.connectivityKnowledge[t]));
|
|
1578
|
+
this.connectivityKnowledge[t] = i.map((o) => {
|
|
1613
1579
|
var c;
|
|
1614
1580
|
let u = o;
|
|
1615
1581
|
if ((c = o.nerves) != null && c.length) {
|
|
1616
|
-
const f = o.nerves.flat(1 / 0).reduce((p, g) => (g in
|
|
1582
|
+
const f = o.nerves.flat(1 / 0).reduce((p, g) => (g in s && p.push(s[g]), p), []);
|
|
1617
1583
|
f != null && f.length && (a.push(...f), u["nerve-label"] = f.sort((p, g) => p.nerve.localeCompare(g.nerve)));
|
|
1618
1584
|
}
|
|
1619
1585
|
return u;
|
|
@@ -1648,18 +1614,18 @@ const K = {
|
|
|
1648
1614
|
this.tooltipEntry = await Promise.all(n), this.tooltipEntry.map((t) => t.featureId[0]).length > 0 && m.emit("connectivity-info-open", this.tooltipEntry);
|
|
1649
1615
|
},
|
|
1650
1616
|
changeConnectivitySource: async function(e, n) {
|
|
1651
|
-
var
|
|
1652
|
-
const { entry: r, connectivitySource: t } = e, a = (
|
|
1653
|
-
n.includes(a) || (n.push(a), await this.flatmapQueries.queryForConnectivityNew(this.flatmapService.mapImp, r.featureId[0], t), this.tooltipEntry = this.tooltipEntry.map((
|
|
1617
|
+
var l, s;
|
|
1618
|
+
const { entry: r, connectivitySource: t } = e, a = (s = (l = this == null ? void 0 : this.flatmapService) == null ? void 0 : l.mapImp) == null ? void 0 : s.mapMetadata.uuid;
|
|
1619
|
+
n.includes(a) || (n.push(a), await this.flatmapQueries.queryForConnectivityNew(this.flatmapService.mapImp, r.featureId[0], t), this.tooltipEntry = this.tooltipEntry.map((i) => i.featureId[0] === r.featureId[0] ? this.flatmapQueries.updateTooltipData(i) : i), m.emit("connectivity-info-open", this.tooltipEntry));
|
|
1654
1620
|
},
|
|
1655
1621
|
trackEvent: function(e) {
|
|
1656
|
-
|
|
1622
|
+
d.sendEvent(e);
|
|
1657
1623
|
}
|
|
1658
1624
|
},
|
|
1659
1625
|
data: function() {
|
|
1660
1626
|
return {
|
|
1661
1627
|
apiLocation: void 0,
|
|
1662
|
-
activeSpecies:
|
|
1628
|
+
activeSpecies: x,
|
|
1663
1629
|
scaffoldCamera: void 0,
|
|
1664
1630
|
mainStyle: {
|
|
1665
1631
|
height: this.entry.datasetTitle ? "calc(100% - 30px)" : "100%",
|
|
@@ -1672,6 +1638,9 @@ const K = {
|
|
|
1672
1638
|
multiflatmapRef: null,
|
|
1673
1639
|
flatmapRef: null,
|
|
1674
1640
|
scaffoldRef: null,
|
|
1641
|
+
iframeRef: null,
|
|
1642
|
+
plotRef: null,
|
|
1643
|
+
simulationRef: null,
|
|
1675
1644
|
scaffoldLoaded: !1,
|
|
1676
1645
|
isInHelp: !1,
|
|
1677
1646
|
mapManager: void 0,
|
|
@@ -1695,5 +1664,5 @@ const K = {
|
|
|
1695
1664
|
}
|
|
1696
1665
|
};
|
|
1697
1666
|
export {
|
|
1698
|
-
|
|
1667
|
+
J as C
|
|
1699
1668
|
};
|