@abi-software/mapintegratedvuer 1.12.6 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContentMixin-DE9Pk_KF.js → ContentMixin-Cf4ti-Vc.js} +116 -102
- package/dist/{Flatmap-BdSINIH3.js → Flatmap-DRaM5H0L.js} +11 -10
- package/dist/{Iframe-DL3E0cnI.js → Iframe-DMyBLdD3.js} +2 -2
- package/dist/{MultiFlatmap-DKPBFc_Y.js → MultiFlatmap-CgvcY__u.js} +30 -27
- package/dist/{Plot-_ca3lFZI.js → Plot-BDAChTio.js} +2 -2
- package/dist/{Scaffold-DxH7TMFn.js → Scaffold-CXo37tTA.js} +2 -2
- package/dist/{Simulation-ewRVK6sW.js → Simulation-B4f-ubkl.js} +2 -2
- package/dist/{index-BHZwLSRu.js → index-CDhuA6QJ.js} +31 -8
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +4 -4
- package/dist/{style-IHXUSXDX.js → style-BeNQcAFm.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ContentVuer.vue +3 -0
- package/src/components/ContextCard.vue +3 -0
- package/src/components/SplitDialog.vue +27 -0
- package/src/components/SplitFlow.vue +8 -0
- package/src/components/viewers/Flatmap.vue +2 -1
- package/src/components/viewers/MultiFlatmap.vue +4 -1
- package/src/mixins/ContentMixin.js +20 -0
- package/src/stores/settings.js +4 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { markRaw as y } from "vue";
|
|
2
|
-
import { c as C, u as E, d as O, e as N, E as f, T as b, f as R, h as x, i as w, l as P, J as B } from "./index-
|
|
2
|
+
import { c as C, u as E, d as O, e as N, E as f, T as b, f as R, h as x, i as w, l as P, J as B } from "./index-CDhuA6QJ.js";
|
|
3
3
|
import { mapStores as X } from "pinia";
|
|
4
4
|
const M = function(e) {
|
|
5
5
|
return e ? [...new Set(e.map((r) => JSON.stringify(r)))].map(
|
|
@@ -7,17 +7,17 @@ const M = function(e) {
|
|
|
7
7
|
) : [];
|
|
8
8
|
}, d = [], T = async function(e, r) {
|
|
9
9
|
const t = r.filter(
|
|
10
|
-
(
|
|
10
|
+
(i) => d.some((s) => s.taxon === i)
|
|
11
11
|
), n = d.filter(
|
|
12
|
-
(
|
|
12
|
+
(i) => t.includes(i.taxon)
|
|
13
13
|
), a = r.filter(
|
|
14
|
-
(
|
|
14
|
+
(i) => !t.includes(i)
|
|
15
15
|
);
|
|
16
16
|
if (a.length) {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
let { entity: l, label: o } =
|
|
17
|
+
const i = await e.queryLabels(a);
|
|
18
|
+
if (i.length)
|
|
19
|
+
return i.forEach((s) => {
|
|
20
|
+
let { entity: l, label: o } = s;
|
|
21
21
|
o === "Mammalia" && (o = "Mammalia not otherwise specified");
|
|
22
22
|
const c = { taxon: l, label: o };
|
|
23
23
|
n.push(c), d.push(c);
|
|
@@ -29,8 +29,8 @@ const M = function(e) {
|
|
|
29
29
|
let t = JSON.stringify(e), n = JSON.stringify(r);
|
|
30
30
|
return t.indexOf(n) !== -1;
|
|
31
31
|
}, A = (e, r) => {
|
|
32
|
-
const t = e.name ?? e, n = r.name ?? r, a = t.toUpperCase(),
|
|
33
|
-
return a <
|
|
32
|
+
const t = e.name ?? e, n = r.name ?? r, a = t.toUpperCase(), i = n.toUpperCase();
|
|
33
|
+
return a < i ? -1 : a > i ? 1 : 0;
|
|
34
34
|
};
|
|
35
35
|
let S = function() {
|
|
36
36
|
this.initialise = function(e) {
|
|
@@ -42,13 +42,13 @@ let S = function() {
|
|
|
42
42
|
if (r.provenanceTaxonomy) {
|
|
43
43
|
n = [];
|
|
44
44
|
try {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const { label: l } =
|
|
45
|
+
const i = await T(e, r.provenanceTaxonomy);
|
|
46
|
+
i.length && i.forEach((s) => {
|
|
47
|
+
const { label: l } = s;
|
|
48
48
|
n.push(l);
|
|
49
49
|
});
|
|
50
|
-
} catch (
|
|
51
|
-
console.log(
|
|
50
|
+
} catch (i) {
|
|
51
|
+
console.log(i);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
@@ -88,10 +88,10 @@ let S = function() {
|
|
|
88
88
|
let n = {};
|
|
89
89
|
this.uberons = [];
|
|
90
90
|
const a = await T(e, r);
|
|
91
|
-
a.length && (a.forEach((
|
|
92
|
-
const { taxon:
|
|
93
|
-
n[
|
|
94
|
-
id:
|
|
91
|
+
a.length && (a.forEach((i) => {
|
|
92
|
+
const { taxon: s, label: l } = i;
|
|
93
|
+
n[s] = l, this.uberons.push({
|
|
94
|
+
id: s,
|
|
95
95
|
name: l
|
|
96
96
|
});
|
|
97
97
|
}), t(n));
|
|
@@ -123,10 +123,10 @@ let S = function() {
|
|
|
123
123
|
Array.isArray(a) ? n.push(a.flat()) : n.push(a);
|
|
124
124
|
}), n.flat();
|
|
125
125
|
}, this.findComponents = function(e, r, t, n) {
|
|
126
|
-
let a = e.connectivity.flat(),
|
|
127
|
-
return
|
|
128
|
-
l = !1, L(r, o) && (l = !0), n && L(n, o) && (l = !0), L(t, o) && (l = !0), l ||
|
|
129
|
-
}),
|
|
126
|
+
let a = e.connectivity.flat(), i = M(a), s = [], l = !1;
|
|
127
|
+
return i.forEach((o) => {
|
|
128
|
+
l = !1, L(r, o) && (l = !0), n && L(n, o) && (l = !0), L(t, o) && (l = !0), l || s.push(o);
|
|
129
|
+
}), s;
|
|
130
130
|
}, this.retrieveFlatmapKnowledgeForEvent = async function(e, r) {
|
|
131
131
|
this.controller && this.controller.abort(), this.controller = new AbortController(), this.controller.signal;
|
|
132
132
|
const t = r.resource;
|
|
@@ -135,12 +135,12 @@ let S = function() {
|
|
|
135
135
|
return await Promise.all([n]);
|
|
136
136
|
}, this.queryForConnectivityNew = function(e, r, t = "map", n = !0) {
|
|
137
137
|
return this.connectivitySource = t, new Promise((a) => {
|
|
138
|
-
(t === "map" ? this.queryMapConnectivity(e.mapMetadata.uuid, r) : e.queryKnowledge(r)).then((
|
|
139
|
-
if (this.checkConnectivityExists(
|
|
138
|
+
(t === "map" ? this.queryMapConnectivity(e.mapMetadata.uuid, r) : e.queryKnowledge(r)).then((s) => {
|
|
139
|
+
if (this.checkConnectivityExists(s)) {
|
|
140
140
|
t === "map" && (this.noMapConnectivity = !1);
|
|
141
|
-
let l =
|
|
141
|
+
let l = s;
|
|
142
142
|
n ? this.processConnectivity(e, l).then((o) => {
|
|
143
|
-
|
|
143
|
+
s.references && (this.rawURLs = [...s.references]), a(o);
|
|
144
144
|
}) : a(l);
|
|
145
145
|
} else t === "map" ? (this.connectivitySource = "sckan", this.noMapConnectivity = !0, e.queryKnowledge(r).then((l) => {
|
|
146
146
|
if (this.checkConnectivityExists(l)) {
|
|
@@ -151,8 +151,8 @@ let S = function() {
|
|
|
151
151
|
} else
|
|
152
152
|
a(!1);
|
|
153
153
|
}).catch(() => a(!1))) : a(!1);
|
|
154
|
-
}).catch((
|
|
155
|
-
|
|
154
|
+
}).catch((s) => {
|
|
155
|
+
s.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${r}.`), a(!1);
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
158
|
}, this.queryMapConnectivity = async function(e, r) {
|
|
@@ -166,7 +166,7 @@ let S = function() {
|
|
|
166
166
|
throw new Error(n);
|
|
167
167
|
}
|
|
168
168
|
}, this.queryForConnectivity = function(e, r, t, n = !0) {
|
|
169
|
-
const a = { sql: this.buildConnectivitySqlStatement(r) },
|
|
169
|
+
const a = { sql: this.buildConnectivitySqlStatement(r) }, i = {
|
|
170
170
|
method: "POST",
|
|
171
171
|
headers: {
|
|
172
172
|
"Content-Type": "application/json"
|
|
@@ -175,17 +175,17 @@ let S = function() {
|
|
|
175
175
|
...t ? { signal: t } : {}
|
|
176
176
|
// add signal to header if it exists
|
|
177
177
|
};
|
|
178
|
-
return new Promise((
|
|
179
|
-
fetch(`${this.flatmapAPI}knowledge/query/`,
|
|
178
|
+
return new Promise((s) => {
|
|
179
|
+
fetch(`${this.flatmapAPI}knowledge/query/`, i).then((l) => l.json()).then((l) => {
|
|
180
180
|
if (this.connectivityExists(l)) {
|
|
181
181
|
let o = JSON.parse(l.values[0][0]);
|
|
182
182
|
n ? this.processConnectivity(e, o).then((c) => {
|
|
183
|
-
|
|
184
|
-
}) :
|
|
183
|
+
s(c);
|
|
184
|
+
}) : s(o);
|
|
185
185
|
} else
|
|
186
|
-
|
|
186
|
+
s(!1);
|
|
187
187
|
}).catch((l) => {
|
|
188
|
-
l.name === "AbortError" || console.error("Error:", l),
|
|
188
|
+
l.name === "AbortError" || console.error("Error:", l), s(!1);
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
191
|
}, this.checkConnectivityExists = function(e) {
|
|
@@ -204,17 +204,17 @@ let S = function() {
|
|
|
204
204
|
r[a] == null ? n += `, ${a}` : n += `, ${r[a]}`;
|
|
205
205
|
}), n;
|
|
206
206
|
}, this.flattenAndFindDatasets = function(e, r, t) {
|
|
207
|
-
let n = this.flattenConnectivity(e), a = this.flattenConnectivity(r),
|
|
207
|
+
let n = this.flattenConnectivity(e), a = this.flattenConnectivity(r), i = this.flattenConnectivity(t);
|
|
208
208
|
this.originsWithDatasets = this.uberons.filter(
|
|
209
|
-
(
|
|
209
|
+
(s) => n.indexOf(s.id) !== -1
|
|
210
210
|
).sort(A), this.componentsWithDatasets = this.uberons.filter(
|
|
211
|
-
(
|
|
211
|
+
(s) => a.indexOf(s.id) !== -1
|
|
212
212
|
).sort(A), this.destinationsWithDatasets = this.uberons.filter(
|
|
213
|
-
(
|
|
213
|
+
(s) => i.indexOf(s.id) !== -1
|
|
214
214
|
).sort(A);
|
|
215
215
|
}, this.processConnectivity = function(e, r) {
|
|
216
216
|
return new Promise((t) => {
|
|
217
|
-
let n = [], a = [],
|
|
217
|
+
let n = [], a = [], i;
|
|
218
218
|
if (r && r["node-phenotypes"]) {
|
|
219
219
|
const o = ["ilxtr:hasSomaLocatedIn"], c = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
|
|
220
220
|
o.forEach((u) => {
|
|
@@ -223,19 +223,19 @@ let S = function() {
|
|
|
223
223
|
u in r["node-phenotypes"] && a.push(...r["node-phenotypes"][u]);
|
|
224
224
|
}), a = M(a);
|
|
225
225
|
} else
|
|
226
|
-
a = M(r.axons), r.somas && r.somas.length > 0 && n.push(...r.somas), r.dendrites && r.dendrites.length > 0 && n.push(...r.dendrites), n = M(n),
|
|
227
|
-
const
|
|
226
|
+
a = M(r.axons), r.somas && r.somas.length > 0 && n.push(...r.somas), r.dendrites && r.dendrites.length > 0 && n.push(...r.dendrites), n = M(n), i = r.somas;
|
|
227
|
+
const s = this.findComponents(r, a, n, i), l = this.findAllIdsFromConnectivity(r);
|
|
228
228
|
this.createLabelLookup(e, l).then((o) => {
|
|
229
229
|
this.origins = n.map(
|
|
230
230
|
(c) => this.createLabelFromNeuralNode(c, o)
|
|
231
|
-
).sort(A), this.components =
|
|
231
|
+
).sort(A), this.components = s.map(
|
|
232
232
|
(c) => this.createLabelFromNeuralNode(c, o)
|
|
233
233
|
).sort(A), this.destinations = a.map(
|
|
234
234
|
(c) => this.createLabelFromNeuralNode(c, o)
|
|
235
|
-
).sort(A), this.flattenAndFindDatasets(n,
|
|
235
|
+
).sort(A), this.flattenAndFindDatasets(n, s, a), t({
|
|
236
236
|
ids: {
|
|
237
237
|
dendrites: n,
|
|
238
|
-
components:
|
|
238
|
+
components: s,
|
|
239
239
|
axons: a
|
|
240
240
|
},
|
|
241
241
|
labels: {
|
|
@@ -266,10 +266,10 @@ let S = function() {
|
|
|
266
266
|
});
|
|
267
267
|
if (!a.ok)
|
|
268
268
|
throw new Error(`Cannot access ${t}`);
|
|
269
|
-
const
|
|
270
|
-
if ("error" in
|
|
271
|
-
throw new TypeError(
|
|
272
|
-
return
|
|
269
|
+
const i = await a.json();
|
|
270
|
+
if ("error" in i)
|
|
271
|
+
throw new TypeError(i.error);
|
|
272
|
+
return i.values;
|
|
273
273
|
};
|
|
274
274
|
};
|
|
275
275
|
const I = [
|
|
@@ -1093,10 +1093,10 @@ const I = [
|
|
|
1093
1093
|
if (!a.length)
|
|
1094
1094
|
return;
|
|
1095
1095
|
t in e || (e[t] = {});
|
|
1096
|
-
const
|
|
1096
|
+
const i = a.map((s) => s.toLowerCase()).sort();
|
|
1097
1097
|
e[t] = {
|
|
1098
1098
|
nerve: n,
|
|
1099
|
-
subNerves:
|
|
1099
|
+
subNerves: i
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
1102
|
}), e;
|
|
@@ -1113,15 +1113,15 @@ const I = [
|
|
|
1113
1113
|
facetPropPath: "scaffold.connectivity.nerve",
|
|
1114
1114
|
label: "",
|
|
1115
1115
|
children: []
|
|
1116
|
-
},
|
|
1117
|
-
for (const [
|
|
1118
|
-
if (
|
|
1116
|
+
}, i = [];
|
|
1117
|
+
for (const [s, l] of Object.entries(n))
|
|
1118
|
+
if (s === "label" && (a.label = l), s === "subclass labels")
|
|
1119
1119
|
for (const o of l)
|
|
1120
|
-
|
|
1120
|
+
i.push({
|
|
1121
1121
|
facetPropPath: "scaffold.connectivity.subnerve",
|
|
1122
1122
|
label: o
|
|
1123
1123
|
});
|
|
1124
|
-
|
|
1124
|
+
i.length && (a.children = i.sort((s, l) => s.label.localeCompare(l.label)), t.push(a));
|
|
1125
1125
|
}
|
|
1126
1126
|
return t.length && (r.children = t.sort((n, a) => n.label.localeCompare(a.label)), e.push(r)), e;
|
|
1127
1127
|
};
|
|
@@ -1172,6 +1172,20 @@ const K = {
|
|
|
1172
1172
|
this.multiflatmapRef = this.$refs.multiflatmap, this.flatmapRef = this.$refs.flatmap, this.scaffoldRef = this.$refs.scaffold, this.iframeRef = this.$refs.iframe, this.plotRef = this.$refs.plot, this.simulationRef = this.$refs.simulation, (this.scaffoldRef || this.iframeRef || this.plotRef || this.simulationRef) && this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources;
|
|
1173
1173
|
},
|
|
1174
1174
|
methods: {
|
|
1175
|
+
toggleMinimap: function(e, r) {
|
|
1176
|
+
var t;
|
|
1177
|
+
if (this.multiflatmapRef) {
|
|
1178
|
+
const n = this.multiflatmapRef.getCurrentFlatmap(), a = n == null ? void 0 : n.mapImp;
|
|
1179
|
+
if (a)
|
|
1180
|
+
if (e === !0) {
|
|
1181
|
+
if (r === !1) {
|
|
1182
|
+
const i = ((t = a.options) == null ? void 0 : t.minimap) || { position: "top-right" };
|
|
1183
|
+
a.createMinimap(i), n.addResizeButtonToMinimap(), n.minimapSmall = !1;
|
|
1184
|
+
}
|
|
1185
|
+
} else
|
|
1186
|
+
a.closeMinimap();
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1175
1189
|
onConnectivityItemClose() {
|
|
1176
1190
|
if (this != null && this.alive) {
|
|
1177
1191
|
if (this.multiflatmapRef) {
|
|
@@ -1220,14 +1234,14 @@ const K = {
|
|
|
1220
1234
|
* Callback when the vuers emit a selected event.
|
|
1221
1235
|
*/
|
|
1222
1236
|
resourceSelected: function(e, r) {
|
|
1223
|
-
var
|
|
1237
|
+
var s, l, o, c;
|
|
1224
1238
|
const t = r[0];
|
|
1225
1239
|
if (this.resourceHasAction(t)) {
|
|
1226
1240
|
f.emit("PopoverActionClick", t);
|
|
1227
1241
|
return;
|
|
1228
1242
|
}
|
|
1229
1243
|
let n, a = !1;
|
|
1230
|
-
const
|
|
1244
|
+
const i = {
|
|
1231
1245
|
paneIndex: this.entry.id,
|
|
1232
1246
|
type: e,
|
|
1233
1247
|
resource: r,
|
|
@@ -1235,9 +1249,9 @@ const K = {
|
|
|
1235
1249
|
eventType: void 0
|
|
1236
1250
|
};
|
|
1237
1251
|
if (e == "MultiFlatmap" || e == "Flatmap")
|
|
1238
|
-
if (
|
|
1239
|
-
if (
|
|
1240
|
-
let u =
|
|
1252
|
+
if (i.internalName = (s = t == null ? void 0 : t.feature) != null && s.label ? t.feature.label : this.idNamePair[t.feature.models], t.eventType == "click") {
|
|
1253
|
+
if (i.eventType = "selected", t.feature.type == "marker") {
|
|
1254
|
+
let u = i.internalName;
|
|
1241
1255
|
if (this.settingsStore.isFeaturedMarkerIdentifier(t.feature.id))
|
|
1242
1256
|
n = {
|
|
1243
1257
|
type: "Search",
|
|
@@ -1267,12 +1281,12 @@ const K = {
|
|
|
1267
1281
|
}
|
|
1268
1282
|
a = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
|
1269
1283
|
}
|
|
1270
|
-
} else t.eventType == "mouseenter" && (
|
|
1271
|
-
else e == "Scaffold" && (t && ((((l = t.data) == null ? void 0 : l.id) === void 0 || ((o = t.data) == null ? void 0 : o.id) === "") && (t.data.id = (c = t.data) == null ? void 0 : c.group),
|
|
1284
|
+
} else t.eventType == "mouseenter" && (i.eventType = "highlighted", a = !0);
|
|
1285
|
+
else e == "Scaffold" && (t && ((((l = t.data) == null ? void 0 : l.id) === void 0 || ((o = t.data) == null ? void 0 : o.id) === "") && (t.data.id = (c = t.data) == null ? void 0 : c.group), i.internalName = t.data.id, t.data.lastActionOnMarker === !0 && (n = {
|
|
1272
1286
|
type: "Facet",
|
|
1273
1287
|
facets: [H(t.data.id)]
|
|
1274
|
-
})),
|
|
1275
|
-
n && f.emit("PopoverActionClick", n), a && this.$emit("resource-selected",
|
|
1288
|
+
})), i.eventType = "selected", a = !0);
|
|
1289
|
+
n && f.emit("PopoverActionClick", n), a && this.$emit("resource-selected", i);
|
|
1276
1290
|
},
|
|
1277
1291
|
resourceHasAction: function(e) {
|
|
1278
1292
|
return e && (e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets");
|
|
@@ -1295,17 +1309,17 @@ const K = {
|
|
|
1295
1309
|
if (e.resource && e.resource.resource && (t = e.resource.resource[0]), this.entry.type === "Scaffold") {
|
|
1296
1310
|
if (this.$refs.scaffold.findObjectsWithGroupName(r).length === 0) {
|
|
1297
1311
|
if (e.resource && e.resource.feature) {
|
|
1298
|
-
const
|
|
1299
|
-
if (
|
|
1312
|
+
const i = R(e.resource.feature.models);
|
|
1313
|
+
if (i.length > 0) return i;
|
|
1300
1314
|
}
|
|
1301
1315
|
let a = x(r);
|
|
1302
1316
|
if (a)
|
|
1303
1317
|
return a;
|
|
1304
1318
|
if (t && e.eventType === "selected")
|
|
1305
|
-
return fetch(`${this.apiLocation}get-related-terms/${t}`).then((
|
|
1306
|
-
var
|
|
1307
|
-
if (((
|
|
1308
|
-
return r =
|
|
1319
|
+
return fetch(`${this.apiLocation}get-related-terms/${t}`).then((i) => i.json()).then((i) => {
|
|
1320
|
+
var s;
|
|
1321
|
+
if (((s = i.uberon) == null ? void 0 : s.array.length) > 0)
|
|
1322
|
+
return r = i.uberon.array[0].name.charAt(0).toUpperCase() + i.uberon.array[0].name.slice(1), t = i.uberon.array[0].id.toUpperCase(), { id: t, name: r };
|
|
1309
1323
|
});
|
|
1310
1324
|
}
|
|
1311
1325
|
} else if (this.entry.type === "MultiFlatmap")
|
|
@@ -1333,21 +1347,21 @@ const K = {
|
|
|
1333
1347
|
} catch {
|
|
1334
1348
|
a = void 0;
|
|
1335
1349
|
}
|
|
1336
|
-
let
|
|
1350
|
+
let i;
|
|
1337
1351
|
try {
|
|
1338
|
-
let
|
|
1339
|
-
for (; !l &&
|
|
1340
|
-
const o = t.organisms.subject[
|
|
1341
|
-
o.species && (
|
|
1352
|
+
let s = 0, l = !1;
|
|
1353
|
+
for (; !l && s < t.organisms.subject.length; ) {
|
|
1354
|
+
const o = t.organisms.subject[s];
|
|
1355
|
+
o.species && (i = o.species.name, l = !0), s += 1;
|
|
1342
1356
|
}
|
|
1343
1357
|
} catch {
|
|
1344
|
-
|
|
1358
|
+
i = void 0;
|
|
1345
1359
|
}
|
|
1346
1360
|
this.settingsStore.updateFeaturedMarker({
|
|
1347
1361
|
identifier: e,
|
|
1348
1362
|
marker: n,
|
|
1349
1363
|
doi: a,
|
|
1350
|
-
species:
|
|
1364
|
+
species: i
|
|
1351
1365
|
});
|
|
1352
1366
|
});
|
|
1353
1367
|
},
|
|
@@ -1362,10 +1376,10 @@ const K = {
|
|
|
1362
1376
|
return !r.datasets || r.datasets.length == 0 ? !1 : r.datasets.map((t) => t.id);
|
|
1363
1377
|
},
|
|
1364
1378
|
flatmapResourceSelected: function(e, r) {
|
|
1365
|
-
var
|
|
1379
|
+
var s;
|
|
1366
1380
|
this.resourceSelected(e, r);
|
|
1367
|
-
const t = r[0], { eventType: n, feature: a } = t, { viewingMode:
|
|
1368
|
-
if (n === "click" && a.type === "feature" && ((
|
|
1381
|
+
const t = r[0], { eventType: n, feature: a } = t, { viewingMode: i } = this.settingsStore.globalSettings;
|
|
1382
|
+
if (n === "click" && a.type === "feature" && ((s = a.models) != null && s.startsWith("ilxtr:"))) {
|
|
1369
1383
|
const l = [];
|
|
1370
1384
|
r.forEach((o) => {
|
|
1371
1385
|
const { models: c } = o.feature;
|
|
@@ -1374,7 +1388,7 @@ const K = {
|
|
|
1374
1388
|
event: "interaction_event",
|
|
1375
1389
|
event_name: "portal_maps_connectivity",
|
|
1376
1390
|
category: l.join(", "),
|
|
1377
|
-
location: e + " " +
|
|
1391
|
+
location: e + " " + i
|
|
1378
1392
|
});
|
|
1379
1393
|
}
|
|
1380
1394
|
},
|
|
@@ -1429,31 +1443,31 @@ const K = {
|
|
|
1429
1443
|
},
|
|
1430
1444
|
flatmapHighlight: async function(e, r, t, n) {
|
|
1431
1445
|
let a = [...r, ...n];
|
|
1432
|
-
const
|
|
1433
|
-
if (
|
|
1434
|
-
const
|
|
1446
|
+
const i = this.settingsStore.globalSettings;
|
|
1447
|
+
if (i.highlightConnectedPaths) {
|
|
1448
|
+
const s = r.length ? r : n.length ? n : [], l = await e.retrieveConnectedPaths(s);
|
|
1435
1449
|
l && a.push(...l);
|
|
1436
1450
|
}
|
|
1437
|
-
if (
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1451
|
+
if (i.highlightDOIPaths) {
|
|
1452
|
+
const s = await e.searchConnectivitiesByReference(t);
|
|
1453
|
+
s && a.push(...s);
|
|
1440
1454
|
}
|
|
1441
1455
|
return a = [...new Set(a)], a;
|
|
1442
1456
|
},
|
|
1443
1457
|
sidebarHoverHighlight: function(e) {
|
|
1444
1458
|
var r, t;
|
|
1445
1459
|
if (this.visible && ((this.flatmapRef || this.multiflatmapRef) && this.flatmapReady || this.scaffoldRef && this.scaffoldLoaded)) {
|
|
1446
|
-
const n = this.settingsStore.hoverAnatomies, a = this.settingsStore.hoverOrgans,
|
|
1460
|
+
const n = this.settingsStore.hoverAnatomies, a = this.settingsStore.hoverOrgans, i = this.settingsStore.hoverDOI, s = this.settingsStore.hoverConnectivity;
|
|
1447
1461
|
let l = null, o = null;
|
|
1448
|
-
this.flatmapRef && (l = this.flatmapRef), this.multiflatmapRef && (l = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (o = this.scaffoldRef), clearTimeout(this.highlightDelay), !n.length && !a.length && !
|
|
1449
|
-
(n.length || a.length ||
|
|
1462
|
+
this.flatmapRef && (l = this.flatmapRef), this.multiflatmapRef && (l = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (o = this.scaffoldRef), clearTimeout(this.highlightDelay), !n.length && !a.length && !i && !s.length && ((this.multiflatmapRef || this.flatmapRef) && l ? ((r = l.mapImp) == null || r.clearSearchResults(), e.connectivityProcessed && ((t = l.mapImp) == null || t.setPaint({ dimmed: !0 }))) : this.scaffoldRef && o && o.changeHighlightedByName(a, "", !1)), this.highlightDelay = setTimeout(() => {
|
|
1463
|
+
(n.length || a.length || i || s.length) && ((this.multiflatmapRef || this.flatmapRef) && l ? this.flatmapHighlight(l, n, i, s).then((c) => {
|
|
1450
1464
|
try {
|
|
1451
1465
|
l.showConnectivityTooltips({
|
|
1452
1466
|
connectivityInfo: { featureId: c },
|
|
1453
1467
|
data: []
|
|
1454
1468
|
});
|
|
1455
1469
|
} catch (u) {
|
|
1456
|
-
if (console.log(u),
|
|
1470
|
+
if (console.log(u), s.length && l.mapImp) {
|
|
1457
1471
|
const h = l.mapImp.uuid;
|
|
1458
1472
|
c.every(
|
|
1459
1473
|
(v) => this.connectivityKnowledge[h].some(
|
|
@@ -1499,7 +1513,7 @@ const K = {
|
|
|
1499
1513
|
this.flatmapService = await this.mockUpFlatmapService(), this.loadConnectivityExplorerConfig(this.flatmapService);
|
|
1500
1514
|
},
|
|
1501
1515
|
mockUpFlatmapService: async function() {
|
|
1502
|
-
const t = (await (await fetch(this.flatmapAPI)).json()).filter((u) => u.id === "human-flatmap_male").sort((u, h) => h.created.localeCompare(u.created))[0], n = t.uuid, a = t.sckan["knowledge-source"],
|
|
1516
|
+
const t = (await (await fetch(this.flatmapAPI)).json()).filter((u) => u.id === "human-flatmap_male").sort((u, h) => h.created.localeCompare(u.created))[0], n = t.uuid, a = t.sckan["knowledge-source"], s = await (await fetch(`${this.flatmapAPI}/flatmap/${n}/pathways`)).json();
|
|
1503
1517
|
this.flatmapQueries = y(new S()), this.flatmapQueries.initialise(this.flatmapAPI);
|
|
1504
1518
|
const l = {
|
|
1505
1519
|
mapMetadata: {
|
|
@@ -1508,7 +1522,7 @@ const K = {
|
|
|
1508
1522
|
...t.sckan
|
|
1509
1523
|
}
|
|
1510
1524
|
},
|
|
1511
|
-
pathways:
|
|
1525
|
+
pathways: s,
|
|
1512
1526
|
resource: this.entry.resource,
|
|
1513
1527
|
knowledgeSource: a,
|
|
1514
1528
|
queryKnowledge: async (u) => {
|
|
@@ -1540,28 +1554,28 @@ const K = {
|
|
|
1540
1554
|
};
|
|
1541
1555
|
},
|
|
1542
1556
|
loadConnectivityExplorerConfig: async function(e) {
|
|
1543
|
-
var
|
|
1557
|
+
var i;
|
|
1544
1558
|
const r = e.mapImp, t = w(r), n = e.mockup ? r.resource : r.uuid;
|
|
1545
1559
|
let a = [];
|
|
1546
1560
|
if (!this.connectivityKnowledge[t]) {
|
|
1547
1561
|
this.flatmapQueries = y(new S()), this.flatmapQueries.initialise(this.flatmapAPI);
|
|
1548
|
-
const
|
|
1549
|
-
this.connectivityKnowledge[t] =
|
|
1562
|
+
const s = await P(r, this.flatmapQueries);
|
|
1563
|
+
this.connectivityKnowledge[t] = s.filter((l) => {
|
|
1550
1564
|
var o;
|
|
1551
1565
|
return (o = l.connectivity) == null ? void 0 : o.length;
|
|
1552
1566
|
}).sort((l, o) => l.label.localeCompare(o.label));
|
|
1553
1567
|
}
|
|
1554
1568
|
if (!this.connectivityKnowledge[n]) {
|
|
1555
|
-
const
|
|
1556
|
-
this.connectivityKnowledge[n] = this.connectivityKnowledge[t].filter((l) => l.id in
|
|
1569
|
+
const s = ((i = r.pathways) == null ? void 0 : i.paths) || {};
|
|
1570
|
+
this.connectivityKnowledge[n] = this.connectivityKnowledge[t].filter((l) => l.id in s);
|
|
1557
1571
|
}
|
|
1558
1572
|
if (!this.connectivityFilterOptions[n] && !e.mockup && (this.connectivityFilterOptions[n] = await e.getFilterOptions(r, this.connectivityKnowledge[n])), e.mockup) {
|
|
1559
|
-
const
|
|
1573
|
+
const s = e.getTermNerveMaps() || {}, l = JSON.parse(JSON.stringify(this.connectivityKnowledge[n]));
|
|
1560
1574
|
this.connectivityKnowledge[n] = l.map((c) => {
|
|
1561
1575
|
var h;
|
|
1562
1576
|
let u = c;
|
|
1563
1577
|
if ((h = c.nerves) != null && h.length) {
|
|
1564
|
-
const v = c.nerves.flat(1 / 0).reduce((p, g) => (g in
|
|
1578
|
+
const v = c.nerves.flat(1 / 0).reduce((p, g) => (g in s && p.push(s[g]), p), []);
|
|
1565
1579
|
v != null && v.length && (a.push(...v), u["nerve-label"] = v.sort((p, g) => p.nerve.localeCompare(g.nerve)));
|
|
1566
1580
|
}
|
|
1567
1581
|
return u;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as c, q as d, E as l, T as h } from "./index-
|
|
2
|
-
import { C as u } from "./ContentMixin-
|
|
3
|
-
import { D as y } from "./style-
|
|
1
|
+
import { _ as c, q as d, E as l, T as h } from "./index-CDhuA6QJ.js";
|
|
2
|
+
import { C as u } from "./ContentMixin-Cf4ti-Vc.js";
|
|
3
|
+
import { D as y } from "./style-BeNQcAFm.js";
|
|
4
4
|
import { FlatmapVuer as g } from "@abi-software/flatmapvuer";
|
|
5
|
-
import { resolveComponent as r, openBlock as p, createElementBlock as
|
|
5
|
+
import { resolveComponent as r, openBlock as p, createElementBlock as M, createVNode as C, createBlock as v, createCommentVNode as S } from "vue";
|
|
6
6
|
const w = {
|
|
7
7
|
name: "Flatmap",
|
|
8
8
|
mixins: [u, y],
|
|
@@ -12,7 +12,8 @@ const w = {
|
|
|
12
12
|
},
|
|
13
13
|
data: function() {
|
|
14
14
|
return {
|
|
15
|
-
flatmapReady: !1
|
|
15
|
+
flatmapReady: !1,
|
|
16
|
+
displayMinimap: !1
|
|
16
17
|
};
|
|
17
18
|
},
|
|
18
19
|
methods: {
|
|
@@ -135,8 +136,8 @@ const w = {
|
|
|
135
136
|
}, I = { class: "viewer-container" };
|
|
136
137
|
function F(e, t, a, n, i, o) {
|
|
137
138
|
const s = r("FlatmapVuer"), f = r("HelpModeDialog");
|
|
138
|
-
return p(),
|
|
139
|
-
|
|
139
|
+
return p(), M("div", I, [
|
|
140
|
+
C(s, {
|
|
140
141
|
state: e.entry.state,
|
|
141
142
|
entry: e.entry.resource,
|
|
142
143
|
mapManager: e.mapManager,
|
|
@@ -164,7 +165,7 @@ function F(e, t, a, n, i, o) {
|
|
|
164
165
|
pathControls: !0,
|
|
165
166
|
ref: "flatmap",
|
|
166
167
|
onReady: o.flatmapReadyCall,
|
|
167
|
-
displayMinimap:
|
|
168
|
+
displayMinimap: e.displayMinimap,
|
|
168
169
|
displayWarning: !0,
|
|
169
170
|
enableOpenMapUI: !0,
|
|
170
171
|
flatmapAPI: e.flatmapAPI,
|
|
@@ -176,7 +177,7 @@ function F(e, t, a, n, i, o) {
|
|
|
176
177
|
onMapmanagerLoaded: e.onMapmanagerLoaded,
|
|
177
178
|
showPathwayFilter: !1,
|
|
178
179
|
onTrackEvent: e.trackEvent
|
|
179
|
-
}, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "onNeuronConnectionFeatureClick", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded", "onTrackEvent"]),
|
|
180
|
+
}, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "onNeuronConnectionFeatureClick", "connectivityInfoSidebar", "onReady", "displayMinimap", "flatmapAPI", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded", "onTrackEvent"]),
|
|
180
181
|
e.helpMode && e.useHelpModeDialog ? (p(), v(f, {
|
|
181
182
|
key: 0,
|
|
182
183
|
ref: "flatmapHelp",
|
|
@@ -187,7 +188,7 @@ function F(e, t, a, n, i, o) {
|
|
|
187
188
|
}, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : S("", !0)
|
|
188
189
|
]);
|
|
189
190
|
}
|
|
190
|
-
const T = /* @__PURE__ */ c(w, [["render", F], ["__scopeId", "data-v-
|
|
191
|
+
const T = /* @__PURE__ */ c(w, [["render", F], ["__scopeId", "data-v-be4a55a2"]]);
|
|
191
192
|
export {
|
|
192
193
|
T as default
|
|
193
194
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as r } from "./ContentMixin-
|
|
1
|
+
import { C as r } from "./ContentMixin-Cf4ti-Vc.js";
|
|
2
2
|
import { openBlock as o, createElementBlock as t, createElementVNode as a } from "vue";
|
|
3
|
-
import { _ as s } from "./index-
|
|
3
|
+
import { _ as s } from "./index-CDhuA6QJ.js";
|
|
4
4
|
const n = {
|
|
5
5
|
name: "Iframe",
|
|
6
6
|
mixins: [r]
|