@abi-software/mapintegratedvuer 1.10.1-beta.1 → 1.10.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/cypress.config.js +5 -2
- package/dist/{ContentMixin-DXXhWj3L.js → ContentMixin-BjWQ5hyW.js} +146 -134
- package/dist/{Flatmap-DTJJHOZJ.js → Flatmap-CRBl8Mce.js} +68 -76
- package/dist/{Iframe-BvIYJdxM.js → Iframe-Oiu2HnRZ.js} +2 -2
- package/dist/{MultiFlatmap-DYUAs7aa.js → MultiFlatmap-vWte5WUA.js} +70 -86
- package/dist/{Plot-B3waT3eW.js → Plot-CEBNX8B0.js} +2 -2
- package/dist/{Scaffold-D1SvYdhM.js → Scaffold-Ckfm9HCl.js} +38 -44
- package/dist/{Simulation-DEcCnsZ0.js → Simulation-DCqdDHl8.js} +2 -2
- package/dist/{index-_BTFPzpV.js → index-Dg5B_ClS.js} +6224 -6128
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +130 -130
- package/dist/{style-DqJAtv3f.js → style-B7PIw3HT.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -7
- package/src/components/ContentVuer.vue +31 -0
- package/src/components/DialogToolbarContent.vue +30 -41
- package/src/components/SplitDialog.vue +110 -40
- package/src/components/SplitFlow.vue +17 -27
- package/src/components/viewers/Flatmap.vue +38 -55
- package/src/components/viewers/MultiFlatmap.vue +30 -82
- package/src/components/viewers/Scaffold.vue +6 -21
- package/src/mixins/ContentMixin.js +35 -10
- package/src/stores/settings.js +7 -0
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 M, d as I, a as h, T as A, e as S, f as N, h as T, l as $ } from "./index-Dg5B_ClS.js";
|
3
|
+
import { mapStores as H } 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 L = 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
|
-
l.forEach((
|
211
|
-
|
212
|
-
}), n = d(n), c.forEach((
|
213
|
-
|
214
|
-
}),
|
210
|
+
l.forEach((f) => {
|
211
|
+
f in t["node-phenotypes"] && n.push(...t["node-phenotypes"][f]);
|
212
|
+
}), n = d(n), c.forEach((f) => {
|
213
|
+
f in t["node-phenotypes"] && s.push(...t["node-phenotypes"][f]);
|
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,
|
@@ -259,10 +259,10 @@ let $ = function() {
|
|
259
259
|
});
|
260
260
|
};
|
261
261
|
};
|
262
|
-
function
|
262
|
+
function P(e) {
|
263
263
|
return e[0].toUpperCase() + e.substring(1);
|
264
264
|
}
|
265
|
-
const
|
265
|
+
const x = {
|
266
266
|
emits: ["flatmap-provenance-ready", "resource-selected", "species-changed"],
|
267
267
|
props: {
|
268
268
|
/**
|
@@ -281,7 +281,7 @@ const D = {
|
|
281
281
|
},
|
282
282
|
inject: ["showGlobalSettings", "showOpenMapButton"],
|
283
283
|
computed: {
|
284
|
-
...
|
284
|
+
...H(C, M, I),
|
285
285
|
idNamePair() {
|
286
286
|
return this.splitFlowStore.idNamePair;
|
287
287
|
},
|
@@ -306,7 +306,7 @@ const D = {
|
|
306
306
|
this.alive = !1;
|
307
307
|
},
|
308
308
|
mounted: function() {
|
309
|
-
|
309
|
+
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
310
|
},
|
311
311
|
methods: {
|
312
312
|
onConnectivityItemClose() {
|
@@ -323,13 +323,13 @@ const D = {
|
|
323
323
|
getState: function() {
|
324
324
|
},
|
325
325
|
openMap: function(e) {
|
326
|
-
e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (
|
326
|
+
e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (h.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`));
|
327
327
|
},
|
328
328
|
onMapmanagerLoaded: function(e) {
|
329
329
|
this.settingsStore.updateMapManager(e);
|
330
330
|
},
|
331
331
|
trackOpenMap: function(e) {
|
332
|
-
|
332
|
+
A.sendEvent({
|
333
333
|
event: "interaction_event",
|
334
334
|
event_name: "portal_maps_open_map",
|
335
335
|
category: e,
|
@@ -356,11 +356,11 @@ const D = {
|
|
356
356
|
var a, r, l, c;
|
357
357
|
const i = t[0];
|
358
358
|
if (this.resourceHasAction(i)) {
|
359
|
-
|
359
|
+
h.emit("PopoverActionClick", i);
|
360
360
|
return;
|
361
361
|
}
|
362
|
-
let n,
|
363
|
-
const
|
362
|
+
let n, s = !1;
|
363
|
+
const o = {
|
364
364
|
paneIndex: this.entry.id,
|
365
365
|
type: e,
|
366
366
|
resource: t,
|
@@ -368,9 +368,9 @@ const D = {
|
|
368
368
|
eventType: void 0
|
369
369
|
};
|
370
370
|
if (e == "MultiFlatmap" || e == "Flatmap")
|
371
|
-
if (
|
372
|
-
if (
|
373
|
-
let
|
371
|
+
if (o.internalName = (a = i == null ? void 0 : i.feature) != null && a.label ? i.feature.label : this.idNamePair[i.feature.models], i.eventType == "click")
|
372
|
+
if (o.eventType = "selected", i.feature.type == "marker") {
|
373
|
+
let f = o.internalName;
|
374
374
|
if (this.settingsStore.isFeaturedMarkerIdentifier(i.feature.id))
|
375
375
|
n = {
|
376
376
|
type: "Search",
|
@@ -380,32 +380,32 @@ const D = {
|
|
380
380
|
else {
|
381
381
|
n = {
|
382
382
|
type: "Facet",
|
383
|
-
facet:
|
383
|
+
facet: f,
|
384
384
|
facetPropPath: "anatomy.organ.category.name",
|
385
385
|
facetSubPropPath: "anatomy.organ.name",
|
386
386
|
term: "Anatomical structure"
|
387
387
|
};
|
388
388
|
let u = /* @__PURE__ */ new Set();
|
389
|
-
i.feature["marker-terms"].forEach((
|
390
|
-
u.add(
|
391
|
-
}), u.add(
|
389
|
+
i.feature["marker-terms"].forEach((y) => {
|
390
|
+
u.add(y.label);
|
391
|
+
}), u.add(f), u.size > 0 && (n = {
|
392
392
|
type: "Facets",
|
393
393
|
labels: [...u]
|
394
394
|
});
|
395
395
|
}
|
396
|
-
|
397
|
-
} else i.feature.type == "feature" && this.syncMode && (
|
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),
|
396
|
+
s = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
397
|
+
} else i.feature.type == "feature" && this.syncMode && (s = !0);
|
398
|
+
else i.eventType == "mouseenter" && (o.eventType = "highlighted", s = !0);
|
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), o.internalName = i.data.id, i.data.lastActionOnMarker === !0 && (n = {
|
400
400
|
type: "Facet",
|
401
|
-
facet:
|
401
|
+
facet: P(i.data.id),
|
402
402
|
facetPropPath: "anatomy.organ.category.name",
|
403
403
|
term: "Anatomical structure"
|
404
|
-
})),
|
405
|
-
n &&
|
404
|
+
})), o.eventType = "selected", s = !0);
|
405
|
+
n && h.emit("PopoverActionClick", n), s && this.$emit("resource-selected", o);
|
406
406
|
},
|
407
407
|
resourceHasAction: function(e) {
|
408
|
-
return e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets";
|
408
|
+
return e && (e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets");
|
409
409
|
},
|
410
410
|
/**
|
411
411
|
* Check if this viewer is currently visible
|
@@ -427,17 +427,17 @@ const D = {
|
|
427
427
|
if (e.resource && e.resource.resource && (i = e.resource.resource[0]), this.entry.type === "Scaffold") {
|
428
428
|
if (this.$refs.scaffold.findObjectsWithGroupName(t).length === 0) {
|
429
429
|
if (e.resource && e.resource.feature) {
|
430
|
-
const
|
431
|
-
if (
|
430
|
+
const o = S(e.resource.feature.models);
|
431
|
+
if (o.length > 0) return o;
|
432
432
|
}
|
433
|
-
let
|
434
|
-
if (
|
435
|
-
return
|
433
|
+
let s = N(t);
|
434
|
+
if (s)
|
435
|
+
return s;
|
436
436
|
if (i && e.eventType === "selected")
|
437
|
-
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((
|
437
|
+
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((o) => o.json()).then((o) => {
|
438
438
|
var a;
|
439
|
-
if (((a =
|
440
|
-
return t =
|
439
|
+
if (((a = o.uberon) == null ? void 0 : a.array.length) > 0)
|
440
|
+
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
441
|
});
|
442
442
|
}
|
443
443
|
} else if (this.entry.type === "MultiFlatmap")
|
@@ -459,27 +459,27 @@ const D = {
|
|
459
459
|
} catch {
|
460
460
|
n = void 0;
|
461
461
|
}
|
462
|
-
let
|
462
|
+
let s;
|
463
463
|
try {
|
464
|
-
|
464
|
+
s = i.item.curie;
|
465
465
|
} catch {
|
466
|
-
|
466
|
+
s = void 0;
|
467
467
|
}
|
468
|
-
let
|
468
|
+
let o;
|
469
469
|
try {
|
470
470
|
let a = 0, r = !1;
|
471
471
|
for (; !r && a < i.organisms.subject.length; ) {
|
472
472
|
const l = i.organisms.subject[a];
|
473
|
-
l.species && (
|
473
|
+
l.species && (o = l.species.name, r = !0), a += 1;
|
474
474
|
}
|
475
475
|
} catch {
|
476
|
-
|
476
|
+
o = void 0;
|
477
477
|
}
|
478
478
|
this.settingsStore.updateFeaturedMarker({
|
479
479
|
identifier: e,
|
480
480
|
marker: n,
|
481
|
-
doi:
|
482
|
-
species:
|
481
|
+
doi: s,
|
482
|
+
species: o
|
483
483
|
});
|
484
484
|
});
|
485
485
|
},
|
@@ -534,6 +534,8 @@ const D = {
|
|
534
534
|
},
|
535
535
|
onResize: function() {
|
536
536
|
},
|
537
|
+
updateViewerSettings: function() {
|
538
|
+
},
|
537
539
|
startHelp: function() {
|
538
540
|
this != null && this.alive && this.isInHelp === !1 && (this.helpMode = !0, window.addEventListener("mousedown", this.checkEndHelpMouseDown), this.isInHelp = !0);
|
539
541
|
},
|
@@ -564,74 +566,84 @@ const D = {
|
|
564
566
|
e.target.closest(".help-mode-dialog") || this.endHelp();
|
565
567
|
},
|
566
568
|
flatmapHighlight: async function(e, t, i, n) {
|
567
|
-
let
|
568
|
-
const
|
569
|
-
if (
|
569
|
+
let s = [...t, ...n];
|
570
|
+
const o = this.settingsStore.globalSettings;
|
571
|
+
if (o.highlightConnectedPaths) {
|
570
572
|
const a = t.length ? t : n.length ? n : [], r = await e.retrieveConnectedPaths(a);
|
571
|
-
r &&
|
573
|
+
r && s.push(...r);
|
572
574
|
}
|
573
|
-
if (
|
575
|
+
if (o.highlightDOIPaths) {
|
574
576
|
const a = await e.searchConnectivitiesByReference(i);
|
575
|
-
a &&
|
577
|
+
a && s.push(...a);
|
576
578
|
}
|
577
|
-
return
|
578
|
-
},
|
579
|
-
|
580
|
-
var
|
581
|
-
if (this.visible) {
|
582
|
-
const
|
583
|
-
let
|
584
|
-
this.flatmapRef && (
|
585
|
-
(
|
579
|
+
return s = [...new Set(s)], s;
|
580
|
+
},
|
581
|
+
sidebarHoverHighlight: function(e) {
|
582
|
+
var t, i;
|
583
|
+
if (this.visible && ((this.flatmapRef || this.multiflatmapRef) && this.flatmapReady || this.scaffoldRef && this.scaffoldLoaded)) {
|
584
|
+
const n = this.settingsStore.hoverAnatomies, s = this.settingsStore.hoverOrgans, o = this.settingsStore.hoverDOI, a = this.settingsStore.hoverConnectivity;
|
585
|
+
let r = null, l = null;
|
586
|
+
this.flatmapRef && (r = this.flatmapRef), this.multiflatmapRef && (r = this.multiflatmapRef.getCurrentFlatmap()), this.scaffoldRef && (l = this.scaffoldRef), clearTimeout(this.highlightDelay), !n.length && !s.length && !o && !a.length && ((this.multiflatmapRef || this.flatmapRef) && r ? ((t = r.mapImp) == null || t.clearSearchResults(), e.connectivitySearch && ((i = r.mapImp) == null || i.setPaint({ dimmed: !0 }))) : this.scaffoldRef && l && l.changeHighlightedByName(s, "", !1)), this.highlightDelay = setTimeout(() => {
|
587
|
+
(n.length || s.length || o || a.length) && ((this.multiflatmapRef || this.flatmapRef) && r ? this.flatmapHighlight(r, n, o, a).then((c) => {
|
586
588
|
try {
|
587
|
-
|
588
|
-
connectivityInfo: { featureId:
|
589
|
+
r.showConnectivityTooltips({
|
590
|
+
connectivityInfo: { featureId: c },
|
589
591
|
data: []
|
590
592
|
});
|
591
|
-
} catch (
|
592
|
-
if (console.log(
|
593
|
-
const
|
594
|
-
|
595
|
-
(
|
596
|
-
(
|
593
|
+
} catch (f) {
|
594
|
+
if (console.log(f), a.length && r.mapImp) {
|
595
|
+
const u = r.mapImp.uuid;
|
596
|
+
c.every(
|
597
|
+
(w) => this.connectivityKnowledge[u].some(
|
598
|
+
(b) => b.id === w
|
597
599
|
)
|
598
|
-
) ||
|
600
|
+
) || r.mapImp.clearSearchResults();
|
599
601
|
}
|
600
602
|
}
|
601
|
-
}) : this.scaffoldRef &&
|
603
|
+
}) : this.scaffoldRef && l && l.changeHighlightedByName(s, "", !1));
|
602
604
|
}, 100);
|
603
605
|
}
|
604
606
|
},
|
605
607
|
onAnnotationOpen: function(e) {
|
606
|
-
|
608
|
+
h.emit("annotation-open", e);
|
607
609
|
},
|
608
610
|
onAnnotationClose: function() {
|
609
|
-
|
611
|
+
h.emit("sidebar-annotation-close");
|
610
612
|
},
|
611
613
|
updateOfflineAnnotationEnabled: function(e) {
|
612
|
-
|
614
|
+
h.emit("update-offline-annotation-enabled", e);
|
613
615
|
},
|
614
616
|
onConnectivityInfoOpen: function(e) {
|
615
|
-
|
617
|
+
h.emit("connectivity-info-open", e);
|
616
618
|
},
|
617
619
|
onConnectivityError: function(e) {
|
618
|
-
|
620
|
+
h.emit("connectivity-error", e);
|
619
621
|
},
|
620
622
|
onConnectivityInfoClose: function() {
|
621
|
-
|
623
|
+
h.emit("connectivity-info-close");
|
624
|
+
},
|
625
|
+
onSidebarAnnotationClose: function() {
|
626
|
+
},
|
627
|
+
showConnectivity: function(e) {
|
628
|
+
},
|
629
|
+
showConnectivitiesByReference: function(e) {
|
630
|
+
},
|
631
|
+
showConnectivityTooltips: function(e) {
|
632
|
+
},
|
633
|
+
changeConnectivitySource: function(e) {
|
622
634
|
},
|
623
635
|
loadConnectivityExplorerConfig: async function(e) {
|
624
|
-
const t = e.mapImp, i =
|
636
|
+
const t = e.mapImp, i = T(t), n = F(new L());
|
625
637
|
n.initialise(this.flatmapAPI);
|
626
|
-
const
|
627
|
-
if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] =
|
638
|
+
const s = await $(t, n), o = t.uuid, a = t.pathways;
|
639
|
+
if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] = s.filter((r) => {
|
628
640
|
var l;
|
629
641
|
return r.source === i && ((l = r.connectivity) == null ? void 0 : l.length);
|
630
|
-
}).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[
|
642
|
+
}).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[o]) {
|
631
643
|
const r = a ? a.paths : {};
|
632
|
-
this.connectivityKnowledge[
|
644
|
+
this.connectivityKnowledge[o] = this.connectivityKnowledge[i].filter((l) => l.id in r);
|
633
645
|
}
|
634
|
-
this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), this.connectivityFilterOptions[
|
646
|
+
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), h.emit("species-layout-connectivity-update");
|
635
647
|
}
|
636
648
|
},
|
637
649
|
data: function() {
|
@@ -670,5 +682,5 @@ const D = {
|
|
670
682
|
}
|
671
683
|
};
|
672
684
|
export {
|
673
|
-
|
685
|
+
x as C
|
674
686
|
};
|