@abi-software/mapintegratedvuer 1.10.1-beta.1 → 1.10.2-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/cypress.config.js +5 -2
- package/dist/{ContentMixin-DXXhWj3L.js → ContentMixin-CGhcj7xh.js} +140 -144
- package/dist/Flatmap-DbgtlxmY.js +198 -0
- package/dist/{Iframe-BvIYJdxM.js → Iframe-BEt0VIIr.js} +2 -2
- package/dist/{MultiFlatmap-DYUAs7aa.js → MultiFlatmap-BPc3Wof9.js} +90 -156
- package/dist/{Plot-B3waT3eW.js → Plot-CNEgDLi2.js} +2 -2
- package/dist/{Scaffold-D1SvYdhM.js → Scaffold-Cn8XyaSz.js} +37 -68
- package/dist/{Simulation-DEcCnsZ0.js → Simulation-wF9y8sIT.js} +2 -2
- package/dist/{index-_BTFPzpV.js → index-Dm85KBw6.js} +20884 -20931
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +146 -146
- package/dist/{style-DqJAtv3f.js → style-DF6s1KEf.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -7
- package/src/components/ContentVuer.vue +34 -15
- package/src/components/DialogToolbarContent.vue +87 -130
- package/src/components/SplitDialog.vue +145 -77
- package/src/components/SplitFlow.vue +86 -75
- package/src/components/viewers/Flatmap.vue +50 -55
- package/src/components/viewers/MultiFlatmap.vue +42 -166
- package/src/components/viewers/Scaffold.vue +6 -52
- package/src/components.d.ts +1 -1
- package/src/mixins/ContentMixin.js +46 -62
- package/src/stores/settings.js +8 -0
- package/src/stores/splitFlow.js +0 -69
- package/vite.config.js +3 -0
- package/dist/Flatmap-DTJJHOZJ.js +0 -197
package/cypress.config.js
CHANGED
|
@@ -21,13 +21,16 @@ export default {
|
|
|
21
21
|
},
|
|
22
22
|
env: {
|
|
23
23
|
visualRegressionType: 'regression',
|
|
24
|
+
visualRegressionBaseDirectory: 'cypress/snapshots/MapContent.cy.js/base',
|
|
25
|
+
visualRegressionDiffDirectory: 'cypress/snapshots/diff',
|
|
24
26
|
visualRegressionGenerateDiff: 'always',
|
|
25
|
-
visualRegressionFailSilently: false
|
|
27
|
+
visualRegressionFailSilently: false,
|
|
26
28
|
},
|
|
27
|
-
screenshotsFolder: './cypress/snapshots
|
|
29
|
+
screenshotsFolder: './cypress/snapshots',
|
|
28
30
|
setupNodeEvents(on, config) {
|
|
29
31
|
configureVisualRegression(on)
|
|
30
32
|
},
|
|
33
|
+
trashAssetsBeforeRuns: false,
|
|
31
34
|
},
|
|
32
35
|
video: true,
|
|
33
36
|
videoCompression: true,
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { markRaw as
|
|
2
|
-
import { u as
|
|
3
|
-
import { mapStores as
|
|
1
|
+
import { markRaw as F } from "vue";
|
|
2
|
+
import { u as C, c as I, d as A, E as f, a as M, g as S, e as $, f as H, l as N } from "./index-Dm85KBw6.js";
|
|
3
|
+
import { mapStores as L } 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
|
-
},
|
|
8
|
+
}, m = [], v = async function(e, t) {
|
|
9
9
|
const i = t.filter(
|
|
10
|
-
(
|
|
11
|
-
), n =
|
|
12
|
-
(
|
|
13
|
-
),
|
|
14
|
-
(
|
|
10
|
+
(o) => m.some((a) => a.taxon === o)
|
|
11
|
+
), n = m.filter(
|
|
12
|
+
(o) => i.includes(o.taxon)
|
|
13
|
+
), s = t.filter(
|
|
14
|
+
(o) => !i.includes(o)
|
|
15
15
|
);
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
16
|
+
if (s.length) {
|
|
17
|
+
const o = await e.queryLabels(s);
|
|
18
|
+
if (o.length)
|
|
19
|
+
return o.forEach((a) => {
|
|
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
|
-
n.push(c),
|
|
23
|
+
n.push(c), m.push(c);
|
|
24
24
|
}), n;
|
|
25
25
|
} else
|
|
26
26
|
return n;
|
|
27
|
-
},
|
|
27
|
+
}, g = function(e, t) {
|
|
28
28
|
if (!e || !t) return !1;
|
|
29
29
|
let i = JSON.stringify(e), n = JSON.stringify(t);
|
|
30
30
|
return i.indexOf(n) !== -1;
|
|
31
31
|
}, p = (e, t) => {
|
|
32
|
-
const i = e.name ?? e, n = t.name ?? t,
|
|
33
|
-
return
|
|
32
|
+
const i = e.name ?? e, n = t.name ?? t, s = i.toUpperCase(), o = n.toUpperCase();
|
|
33
|
+
return s < o ? -1 : s > o ? 1 : 0;
|
|
34
34
|
};
|
|
35
|
-
let
|
|
35
|
+
let P = 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) {
|
|
@@ -42,13 +42,13 @@ let $ = function() {
|
|
|
42
42
|
if (t.provenanceTaxonomy) {
|
|
43
43
|
n = [];
|
|
44
44
|
try {
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const o = await v(e, t.provenanceTaxonomy);
|
|
46
|
+
o.length && o.forEach((a) => {
|
|
47
47
|
const { label: r } = a;
|
|
48
48
|
n.push(r);
|
|
49
49
|
});
|
|
50
|
-
} catch (
|
|
51
|
-
console.log(
|
|
50
|
+
} catch (o) {
|
|
51
|
+
console.log(o);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
@@ -85,9 +85,9 @@ let $ = function() {
|
|
|
85
85
|
return new Promise(async (i) => {
|
|
86
86
|
let n = {};
|
|
87
87
|
this.uberons = [];
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
const { taxon: a, label: r } =
|
|
88
|
+
const s = await v(e, t);
|
|
89
|
+
s.length && (s.forEach((o) => {
|
|
90
|
+
const { taxon: a, label: r } = o;
|
|
91
91
|
n[a] = r, this.uberons.push({
|
|
92
92
|
id: a,
|
|
93
93
|
name: r
|
|
@@ -112,18 +112,18 @@ let $ = function() {
|
|
|
112
112
|
return t;
|
|
113
113
|
}, this.findAllIdsFromConnectivity = function(e) {
|
|
114
114
|
let t = e.connectivity.flat(), i = [...new Set(t)], n = [];
|
|
115
|
-
return i.forEach((
|
|
116
|
-
Array.isArray(
|
|
115
|
+
return i.forEach((s) => {
|
|
116
|
+
Array.isArray(s) ? n.push(s.flat()) : n.push(s);
|
|
117
117
|
}), [...new Set(n.flat())];
|
|
118
118
|
}, this.flattenConnectivity = function(e) {
|
|
119
119
|
let t = e.flat(), i = [...new Set(t)], n = [];
|
|
120
|
-
return i.forEach((
|
|
121
|
-
Array.isArray(
|
|
120
|
+
return i.forEach((s) => {
|
|
121
|
+
Array.isArray(s) ? n.push(s.flat()) : n.push(s);
|
|
122
122
|
}), n.flat();
|
|
123
123
|
}, this.findComponents = function(e, t, i, n) {
|
|
124
|
-
let
|
|
125
|
-
return
|
|
126
|
-
r = !1,
|
|
124
|
+
let s = e.connectivity.flat(), o = d(s), a = [], r = !1;
|
|
125
|
+
return o.forEach((l) => {
|
|
126
|
+
r = !1, g(t, l) && (r = !0), n && g(n, l) && (r = !0), g(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;
|
|
@@ -132,17 +132,17 @@ let $ = function() {
|
|
|
132
132
|
let n = this.queryForConnectivityNew(e, i[0]);
|
|
133
133
|
return await Promise.all([n]);
|
|
134
134
|
}, this.queryForConnectivityNew = function(e, t, i = "sckan", n = !0) {
|
|
135
|
-
return this.connectivitySource = i, new Promise((
|
|
135
|
+
return this.connectivitySource = i, new Promise((s) => {
|
|
136
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
|
-
a.references && (this.rawURLs = [...a.references]),
|
|
141
|
-
}) :
|
|
140
|
+
a.references && (this.rawURLs = [...a.references]), s(l);
|
|
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 ${t}.`),
|
|
145
|
+
a.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${t}.`), s(!1);
|
|
146
146
|
});
|
|
147
147
|
});
|
|
148
148
|
}, this.queryMapConnectivity = async function(e, t) {
|
|
@@ -156,17 +156,17 @@ let $ = function() {
|
|
|
156
156
|
throw new Error(n);
|
|
157
157
|
}
|
|
158
158
|
}, this.queryForConnectivity = function(e, t, i, n = !0) {
|
|
159
|
-
const
|
|
159
|
+
const s = { sql: this.buildConnectivitySqlStatement(t) }, o = {
|
|
160
160
|
method: "POST",
|
|
161
161
|
headers: {
|
|
162
162
|
"Content-Type": "application/json"
|
|
163
163
|
},
|
|
164
|
-
body: JSON.stringify(
|
|
164
|
+
body: JSON.stringify(s),
|
|
165
165
|
...i ? { signal: i } : {}
|
|
166
166
|
// add signal to header if it exists
|
|
167
167
|
};
|
|
168
168
|
return new Promise((a) => {
|
|
169
|
-
fetch(`${this.flatmapAPI}knowledge/query/`,
|
|
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
172
|
n ? this.processConnectivity(e, l).then((c) => {
|
|
@@ -190,43 +190,43 @@ let $ = function() {
|
|
|
190
190
|
if (i)
|
|
191
191
|
return t[i];
|
|
192
192
|
let n = t[e[0]];
|
|
193
|
-
return e.length === 2 && e[1].length > 0 && e[1].forEach((
|
|
194
|
-
t[
|
|
193
|
+
return e.length === 2 && e[1].length > 0 && e[1].forEach((s) => {
|
|
194
|
+
t[s] == null ? n += `, ${s}` : n += `, ${t[s]}`;
|
|
195
195
|
}), n;
|
|
196
196
|
}, this.flattenAndFindDatasets = function(e, t, i) {
|
|
197
|
-
let n = this.flattenConnectivity(e),
|
|
197
|
+
let n = this.flattenConnectivity(e), s = this.flattenConnectivity(t), 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(
|
|
201
|
-
(a) => o.indexOf(a.id) !== -1
|
|
202
|
-
).sort(p), this.destinationsWithDatasets = this.uberons.filter(
|
|
203
201
|
(a) => s.indexOf(a.id) !== -1
|
|
202
|
+
).sort(p), this.destinationsWithDatasets = this.uberons.filter(
|
|
203
|
+
(a) => o.indexOf(a.id) !== -1
|
|
204
204
|
).sort(p);
|
|
205
205
|
}, this.processConnectivity = function(e, t) {
|
|
206
206
|
return new Promise((i) => {
|
|
207
|
-
let n = [],
|
|
207
|
+
let n = [], s = [], o;
|
|
208
208
|
if (t && t["node-phenotypes"]) {
|
|
209
209
|
const l = ["ilxtr:hasSomaLocatedIn"], c = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
|
|
210
210
|
l.forEach((h) => {
|
|
211
211
|
h in t["node-phenotypes"] && n.push(...t["node-phenotypes"][h]);
|
|
212
212
|
}), n = d(n), c.forEach((h) => {
|
|
213
|
-
h in t["node-phenotypes"] &&
|
|
214
|
-
}),
|
|
213
|
+
h in t["node-phenotypes"] && s.push(...t["node-phenotypes"][h]);
|
|
214
|
+
}), s = d(s);
|
|
215
215
|
} else
|
|
216
|
-
|
|
217
|
-
const a = this.findComponents(t,
|
|
216
|
+
s = 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), o = t.somas;
|
|
217
|
+
const a = this.findComponents(t, s, n, o), r = this.findAllIdsFromConnectivity(t);
|
|
218
218
|
this.createLabelLookup(e, r).then((l) => {
|
|
219
219
|
this.origins = n.map(
|
|
220
220
|
(c) => this.createLabelFromNeuralNode(c, l)
|
|
221
221
|
).sort(p), this.components = a.map(
|
|
222
222
|
(c) => this.createLabelFromNeuralNode(c, l)
|
|
223
|
-
).sort(p), this.destinations =
|
|
223
|
+
).sort(p), this.destinations = s.map(
|
|
224
224
|
(c) => this.createLabelFromNeuralNode(c, l)
|
|
225
|
-
).sort(p), this.flattenAndFindDatasets(n, a,
|
|
225
|
+
).sort(p), this.flattenAndFindDatasets(n, a, s), i({
|
|
226
226
|
ids: {
|
|
227
227
|
dendrites: n,
|
|
228
228
|
components: a,
|
|
229
|
-
axons:
|
|
229
|
+
axons: s
|
|
230
230
|
},
|
|
231
231
|
labels: {
|
|
232
232
|
origins: this.origins,
|
|
@@ -262,7 +262,7 @@ let $ = function() {
|
|
|
262
262
|
function T(e) {
|
|
263
263
|
return e[0].toUpperCase() + e.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 D = {
|
|
|
281
281
|
},
|
|
282
282
|
inject: ["showGlobalSettings", "showOpenMapButton"],
|
|
283
283
|
computed: {
|
|
284
|
-
...
|
|
284
|
+
...L(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
|
},
|
|
@@ -306,7 +303,7 @@ const D = {
|
|
|
306
303
|
this.alive = !1;
|
|
307
304
|
},
|
|
308
305
|
mounted: function() {
|
|
309
|
-
|
|
306
|
+
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;
|
|
310
307
|
},
|
|
311
308
|
methods: {
|
|
312
309
|
onConnectivityItemClose() {
|
|
@@ -318,12 +315,10 @@ const D = {
|
|
|
318
315
|
this.flatmapRef && this.flatmapRef.closeTooltip();
|
|
319
316
|
}
|
|
320
317
|
},
|
|
321
|
-
toggleSyncMode: function() {
|
|
322
|
-
},
|
|
323
318
|
getState: function() {
|
|
324
319
|
},
|
|
325
320
|
openMap: function(e) {
|
|
326
|
-
|
|
321
|
+
f.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`);
|
|
327
322
|
},
|
|
328
323
|
onMapmanagerLoaded: function(e) {
|
|
329
324
|
this.settingsStore.updateMapManager(e);
|
|
@@ -359,8 +354,8 @@ const D = {
|
|
|
359
354
|
f.emit("PopoverActionClick", i);
|
|
360
355
|
return;
|
|
361
356
|
}
|
|
362
|
-
let n,
|
|
363
|
-
const
|
|
357
|
+
let n, s = !1;
|
|
358
|
+
const o = {
|
|
364
359
|
paneIndex: this.entry.id,
|
|
365
360
|
type: e,
|
|
366
361
|
resource: t,
|
|
@@ -368,9 +363,9 @@ const D = {
|
|
|
368
363
|
eventType: void 0
|
|
369
364
|
};
|
|
370
365
|
if (e == "MultiFlatmap" || e == "Flatmap")
|
|
371
|
-
if (
|
|
372
|
-
if (
|
|
373
|
-
let h =
|
|
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") {
|
|
367
|
+
if (o.eventType = "selected", i.feature.type == "marker") {
|
|
368
|
+
let h = o.internalName;
|
|
374
369
|
if (this.settingsStore.isFeaturedMarkerIdentifier(i.feature.id))
|
|
375
370
|
n = {
|
|
376
371
|
type: "Search",
|
|
@@ -386,26 +381,26 @@ const D = {
|
|
|
386
381
|
term: "Anatomical structure"
|
|
387
382
|
};
|
|
388
383
|
let u = /* @__PURE__ */ new Set();
|
|
389
|
-
i.feature["marker-terms"].forEach((
|
|
390
|
-
u.add(
|
|
384
|
+
i.feature["marker-terms"].forEach((y) => {
|
|
385
|
+
u.add(y.label);
|
|
391
386
|
}), u.add(h), u.size > 0 && (n = {
|
|
392
387
|
type: "Facets",
|
|
393
388
|
labels: [...u]
|
|
394
389
|
});
|
|
395
390
|
}
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
else i.eventType == "mouseenter" && (
|
|
399
|
-
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),
|
|
391
|
+
s = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
|
392
|
+
}
|
|
393
|
+
} else i.eventType == "mouseenter" && (o.eventType = "highlighted", s = !0);
|
|
394
|
+
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), o.internalName = i.data.id, i.data.lastActionOnMarker === !0 && (n = {
|
|
400
395
|
type: "Facet",
|
|
401
396
|
facet: T(i.data.id),
|
|
402
397
|
facetPropPath: "anatomy.organ.category.name",
|
|
403
398
|
term: "Anatomical structure"
|
|
404
|
-
})),
|
|
405
|
-
n && f.emit("PopoverActionClick", n),
|
|
399
|
+
})), o.eventType = "selected", s = !0);
|
|
400
|
+
n && f.emit("PopoverActionClick", n), s && this.$emit("resource-selected", o);
|
|
406
401
|
},
|
|
407
402
|
resourceHasAction: function(e) {
|
|
408
|
-
return e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets";
|
|
403
|
+
return e && (e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets");
|
|
409
404
|
},
|
|
410
405
|
/**
|
|
411
406
|
* Check if this viewer is currently visible
|
|
@@ -427,17 +422,17 @@ const D = {
|
|
|
427
422
|
if (e.resource && e.resource.resource && (i = e.resource.resource[0]), this.entry.type === "Scaffold") {
|
|
428
423
|
if (this.$refs.scaffold.findObjectsWithGroupName(t).length === 0) {
|
|
429
424
|
if (e.resource && e.resource.feature) {
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
425
|
+
const o = S(e.resource.feature.models);
|
|
426
|
+
if (o.length > 0) return o;
|
|
432
427
|
}
|
|
433
|
-
let
|
|
434
|
-
if (
|
|
435
|
-
return
|
|
428
|
+
let s = $(t);
|
|
429
|
+
if (s)
|
|
430
|
+
return s;
|
|
436
431
|
if (i && e.eventType === "selected")
|
|
437
|
-
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((
|
|
432
|
+
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((o) => o.json()).then((o) => {
|
|
438
433
|
var a;
|
|
439
|
-
if (((a =
|
|
440
|
-
return t =
|
|
434
|
+
if (((a = o.uberon) == null ? void 0 : a.array.length) > 0)
|
|
435
|
+
return t = 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: t };
|
|
441
436
|
});
|
|
442
437
|
}
|
|
443
438
|
} else if (this.entry.type === "MultiFlatmap")
|
|
@@ -459,27 +454,27 @@ const D = {
|
|
|
459
454
|
} catch {
|
|
460
455
|
n = void 0;
|
|
461
456
|
}
|
|
462
|
-
let
|
|
457
|
+
let s;
|
|
463
458
|
try {
|
|
464
|
-
|
|
459
|
+
s = i.item.curie;
|
|
465
460
|
} catch {
|
|
466
|
-
|
|
461
|
+
s = void 0;
|
|
467
462
|
}
|
|
468
|
-
let
|
|
463
|
+
let o;
|
|
469
464
|
try {
|
|
470
465
|
let a = 0, r = !1;
|
|
471
466
|
for (; !r && a < i.organisms.subject.length; ) {
|
|
472
467
|
const l = i.organisms.subject[a];
|
|
473
|
-
l.species && (
|
|
468
|
+
l.species && (o = l.species.name, r = !0), a += 1;
|
|
474
469
|
}
|
|
475
470
|
} catch {
|
|
476
|
-
|
|
471
|
+
o = void 0;
|
|
477
472
|
}
|
|
478
473
|
this.settingsStore.updateFeaturedMarker({
|
|
479
474
|
identifier: e,
|
|
480
475
|
marker: n,
|
|
481
|
-
doi:
|
|
482
|
-
species:
|
|
476
|
+
doi: s,
|
|
477
|
+
species: o
|
|
483
478
|
});
|
|
484
479
|
});
|
|
485
480
|
},
|
|
@@ -509,31 +504,14 @@ const D = {
|
|
|
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() {
|
|
536
512
|
},
|
|
513
|
+
updateViewerSettings: function() {
|
|
514
|
+
},
|
|
537
515
|
startHelp: function() {
|
|
538
516
|
this != null && this.alive && this.isInHelp === !1 && (this.helpMode = !0, window.addEventListener("mousedown", this.checkEndHelpMouseDown), this.isInHelp = !0);
|
|
539
517
|
},
|
|
@@ -564,41 +542,41 @@ const D = {
|
|
|
564
542
|
e.target.closest(".help-mode-dialog") || this.endHelp();
|
|
565
543
|
},
|
|
566
544
|
flatmapHighlight: async function(e, t, i, n) {
|
|
567
|
-
let
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
545
|
+
let s = [...t, ...n];
|
|
546
|
+
const o = this.settingsStore.globalSettings;
|
|
547
|
+
if (o.highlightConnectedPaths) {
|
|
570
548
|
const a = t.length ? t : n.length ? n : [], r = await e.retrieveConnectedPaths(a);
|
|
571
|
-
r &&
|
|
549
|
+
r && s.push(...r);
|
|
572
550
|
}
|
|
573
|
-
if (
|
|
551
|
+
if (o.highlightDOIPaths) {
|
|
574
552
|
const a = await e.searchConnectivitiesByReference(i);
|
|
575
|
-
a &&
|
|
553
|
+
a && s.push(...a);
|
|
576
554
|
}
|
|
577
|
-
return
|
|
578
|
-
},
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
if (this.visible) {
|
|
582
|
-
const
|
|
583
|
-
let
|
|
584
|
-
this.flatmapRef && (
|
|
585
|
-
(
|
|
555
|
+
return s = [...new Set(s)], s;
|
|
556
|
+
},
|
|
557
|
+
sidebarHoverHighlight: function(e) {
|
|
558
|
+
var t, i;
|
|
559
|
+
if (this.visible && ((this.flatmapRef || this.multiflatmapRef) && this.flatmapReady || this.scaffoldRef && this.scaffoldLoaded)) {
|
|
560
|
+
const n = this.settingsStore.hoverAnatomies, s = this.settingsStore.hoverOrgans, o = this.settingsStore.hoverDOI, a = this.settingsStore.hoverConnectivity;
|
|
561
|
+
let r = null, l = null;
|
|
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 ? ((t = r.mapImp) == null || t.clearSearchResults(), e.connectivityProcessed && ((i = r.mapImp) == null || i.setPaint({ dimmed: !0 }))) : this.scaffoldRef && l && l.changeHighlightedByName(s, "", !1)), this.highlightDelay = setTimeout(() => {
|
|
563
|
+
(n.length || s.length || o || a.length) && ((this.multiflatmapRef || this.flatmapRef) && r ? this.flatmapHighlight(r, n, o, a).then((c) => {
|
|
586
564
|
try {
|
|
587
|
-
|
|
588
|
-
connectivityInfo: { featureId:
|
|
565
|
+
r.showConnectivityTooltips({
|
|
566
|
+
connectivityInfo: { featureId: c },
|
|
589
567
|
data: []
|
|
590
568
|
});
|
|
591
|
-
} catch (
|
|
592
|
-
if (console.log(
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
(
|
|
596
|
-
(
|
|
569
|
+
} catch (h) {
|
|
570
|
+
if (console.log(h), a.length && r.mapImp) {
|
|
571
|
+
const u = r.mapImp.uuid;
|
|
572
|
+
c.every(
|
|
573
|
+
(w) => this.connectivityKnowledge[u].some(
|
|
574
|
+
(b) => b.id === w
|
|
597
575
|
)
|
|
598
|
-
) ||
|
|
576
|
+
) || r.mapImp.clearSearchResults();
|
|
599
577
|
}
|
|
600
578
|
}
|
|
601
|
-
}) : this.scaffoldRef &&
|
|
579
|
+
}) : this.scaffoldRef && l && l.changeHighlightedByName(s, "", !1));
|
|
602
580
|
}, 100);
|
|
603
581
|
}
|
|
604
582
|
},
|
|
@@ -606,7 +584,7 @@ const D = {
|
|
|
606
584
|
f.emit("annotation-open", e);
|
|
607
585
|
},
|
|
608
586
|
onAnnotationClose: function() {
|
|
609
|
-
f.emit("annotation-close");
|
|
587
|
+
f.emit("sidebar-annotation-close");
|
|
610
588
|
},
|
|
611
589
|
updateOfflineAnnotationEnabled: function(e) {
|
|
612
590
|
f.emit("update-offline-annotation-enabled", e);
|
|
@@ -620,18 +598,36 @@ const D = {
|
|
|
620
598
|
onConnectivityInfoClose: function() {
|
|
621
599
|
f.emit("connectivity-info-close");
|
|
622
600
|
},
|
|
601
|
+
onSidebarAnnotationClose: function() {
|
|
602
|
+
},
|
|
603
|
+
onNeuronConnectionClick: function(e) {
|
|
604
|
+
f.emit("neuron-connection-click", e);
|
|
605
|
+
},
|
|
606
|
+
onNeuronConnectionFeatureClick: function(e) {
|
|
607
|
+
f.emit("neuron-connection-feature-click", e);
|
|
608
|
+
},
|
|
609
|
+
showConnectivity: function(e) {
|
|
610
|
+
},
|
|
611
|
+
showConnectivitiesByReference: function() {
|
|
612
|
+
},
|
|
613
|
+
showConnectivityTooltips: function() {
|
|
614
|
+
},
|
|
615
|
+
changeConnectivitySource: function() {
|
|
616
|
+
},
|
|
617
|
+
setVisibilityFilter: function() {
|
|
618
|
+
},
|
|
623
619
|
loadConnectivityExplorerConfig: async function(e) {
|
|
624
|
-
const t = e.mapImp, i =
|
|
620
|
+
const t = e.mapImp, i = H(t), n = F(new P());
|
|
625
621
|
n.initialise(this.flatmapAPI);
|
|
626
|
-
const
|
|
627
|
-
if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] =
|
|
622
|
+
const s = await N(t, n), o = t.uuid, a = t.pathways;
|
|
623
|
+
if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] = s.filter((r) => {
|
|
628
624
|
var l;
|
|
629
625
|
return r.source === i && ((l = r.connectivity) == null ? void 0 : l.length);
|
|
630
|
-
}).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[
|
|
626
|
+
}).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[o]) {
|
|
631
627
|
const r = a ? a.paths : {};
|
|
632
|
-
this.connectivityKnowledge[
|
|
628
|
+
this.connectivityKnowledge[o] = this.connectivityKnowledge[i].filter((l) => l.id in r);
|
|
633
629
|
}
|
|
634
|
-
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), this.connectivityFilterOptions[
|
|
630
|
+
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), this.connectivityFilterOptions[o] || (this.connectivityFilterOptions[o] = await e.getFilterOptions()), this.connectivitiesStore.updateFilterOptions(this.connectivityFilterOptions), this.connectivityFilterSources[o] || (this.connectivityFilterSources[o] = e.getFilterSources()), this.connectivitiesStore.updateFilterSources(this.connectivityFilterSources), f.emit("species-layout-connectivity-update");
|
|
635
631
|
}
|
|
636
632
|
},
|
|
637
633
|
data: function() {
|
|
@@ -670,5 +666,5 @@ const D = {
|
|
|
670
666
|
}
|
|
671
667
|
};
|
|
672
668
|
export {
|
|
673
|
-
|
|
669
|
+
O as C
|
|
674
670
|
};
|