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