@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 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/actual',
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 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";
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
- }, g = [], v = async function(e, t) {
8
+ }, m = [], v = async function(e, t) {
9
9
  const i = t.filter(
10
- (s) => g.some((a) => a.taxon === s)
11
- ), n = g.filter(
12
- (s) => i.includes(s.taxon)
13
- ), o = t.filter(
14
- (s) => !i.includes(s)
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 (o.length) {
17
- const s = await e.queryLabels(o);
18
- if (s.length)
19
- return s.forEach((a) => {
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), g.push(c);
23
+ n.push(c), m.push(c);
24
24
  }), n;
25
25
  } else
26
26
  return n;
27
- }, y = function(e, t) {
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, o = i.toUpperCase(), s = n.toUpperCase();
33
- return o < s ? -1 : o > s ? 1 : 0;
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 $ = function() {
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 s = await v(e, t.provenanceTaxonomy);
46
- s.length && s.forEach((a) => {
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 (s) {
51
- console.log(s);
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 o = await v(e, t);
89
- o.length && (o.forEach((s) => {
90
- const { taxon: a, label: r } = s;
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((o) => {
116
- Array.isArray(o) ? n.push(o.flat()) : n.push(o);
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((o) => {
121
- Array.isArray(o) ? n.push(o.flat()) : n.push(o);
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 o = e.connectivity.flat(), s = d(o), a = [], r = !1;
125
- return s.forEach((l) => {
126
- r = !1, y(t, l) && (r = !0), n && y(n, l) && (r = !0), y(i, l) && (r = !0), r || a.push(l);
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((o) => {
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]), o(l);
141
- }) : o(r);
140
+ a.references && (this.rawURLs = [...a.references]), s(l);
141
+ }) : s(r);
142
142
  } else
143
- o(!1);
143
+ s(!1);
144
144
  }).catch((a) => {
145
- a.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${t}.`), o(!1);
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 o = { sql: this.buildConnectivitySqlStatement(t) }, s = {
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(o),
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/`, s).then((r) => r.json()).then((r) => {
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((o) => {
194
- t[o] == null ? n += `, ${o}` : n += `, ${t[o]}`;
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), o = this.flattenConnectivity(t), s = this.flattenConnectivity(i);
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 = [], o = [], s;
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((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]);
214
- }), o = d(o);
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
- 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);
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 = o.map(
223
+ ).sort(p), this.destinations = s.map(
224
224
  (c) => this.createLabelFromNeuralNode(c, l)
225
- ).sort(p), this.flattenAndFindDatasets(n, a, o), i({
225
+ ).sort(p), this.flattenAndFindDatasets(n, a, s), i({
226
226
  ids: {
227
227
  dendrites: n,
228
228
  components: a,
229
- axons: o
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 T(e) {
262
+ function P(e) {
263
263
  return e[0].toUpperCase() + e.substring(1);
264
264
  }
265
- const D = {
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
- ...N(b, F, C),
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
- 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;
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")) : (f.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`));
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
- M.sendEvent({
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
- f.emit("PopoverActionClick", i);
359
+ h.emit("PopoverActionClick", i);
360
360
  return;
361
361
  }
362
- let n, o = !1;
363
- const s = {
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 (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") {
373
- let h = s.internalName;
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: h,
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((m) => {
390
- u.add(m.label);
391
- }), u.add(h), u.size > 0 && (n = {
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
- o = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
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 = {
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: T(i.data.id),
401
+ facet: P(i.data.id),
402
402
  facetPropPath: "anatomy.organ.category.name",
403
403
  term: "Anatomical structure"
404
- })), s.eventType = "selected", o = !0);
405
- n && f.emit("PopoverActionClick", n), o && this.$emit("resource-selected", s);
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 s = S(e.resource.feature.models);
431
- if (s.length > 0) return s;
430
+ const o = S(e.resource.feature.models);
431
+ if (o.length > 0) return o;
432
432
  }
433
- let o = I(t);
434
- if (o)
435
- return o;
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((s) => s.json()).then((s) => {
437
+ return fetch(`${this.apiLocation}get-related-terms/${i}`).then((o) => o.json()).then((o) => {
438
438
  var a;
439
- if (((a = s.uberon) == null ? void 0 : a.array.length) > 0)
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 };
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 o;
462
+ let s;
463
463
  try {
464
- o = i.item.curie;
464
+ s = i.item.curie;
465
465
  } catch {
466
- o = void 0;
466
+ s = void 0;
467
467
  }
468
- let s;
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 && (s = l.species.name, r = !0), a += 1;
473
+ l.species && (o = l.species.name, r = !0), a += 1;
474
474
  }
475
475
  } catch {
476
- s = void 0;
476
+ o = void 0;
477
477
  }
478
478
  this.settingsStore.updateFeaturedMarker({
479
479
  identifier: e,
480
480
  marker: n,
481
- doi: o,
482
- species: s
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 o = [...t, ...n];
568
- const s = this.settingsStore.globalSettings;
569
- if (s.highlightConnectedPaths) {
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 && o.push(...r);
573
+ r && s.push(...r);
572
574
  }
573
- if (s.highlightDOIPaths) {
575
+ if (o.highlightDOIPaths) {
574
576
  const a = await e.searchConnectivitiesByReference(i);
575
- a && o.push(...a);
577
+ a && s.push(...a);
576
578
  }
577
- return o = [...new Set(o)], o;
578
- },
579
- cardHoverHighlight: function() {
580
- var e;
581
- if (this.visible) {
582
- const t = this.settingsStore.hoverAnatomies, i = this.settingsStore.hoverOrgans, n = this.settingsStore.hoverDOI, o = this.settingsStore.hoverConnectivity;
583
- let s = null, a = null;
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) => {
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
- s.showConnectivityTooltips({
588
- connectivityInfo: { featureId: r },
589
+ r.showConnectivityTooltips({
590
+ connectivityInfo: { featureId: c },
589
591
  data: []
590
592
  });
591
- } catch (l) {
592
- if (console.log(l), o.length && s.mapImp) {
593
- const c = s.mapImp.uuid;
594
- r.every(
595
- (u) => this.connectivityKnowledge[c].some(
596
- (m) => m.id === u
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
- ) || s.mapImp.clearSearchResults();
600
+ ) || r.mapImp.clearSearchResults();
599
601
  }
600
602
  }
601
- }) : this.scaffoldRef && a && a.changeHighlightedByName(i, "", !1));
603
+ }) : this.scaffoldRef && l && l.changeHighlightedByName(s, "", !1));
602
604
  }, 100);
603
605
  }
604
606
  },
605
607
  onAnnotationOpen: function(e) {
606
- f.emit("annotation-open", e);
608
+ h.emit("annotation-open", e);
607
609
  },
608
610
  onAnnotationClose: function() {
609
- f.emit("annotation-close");
611
+ h.emit("sidebar-annotation-close");
610
612
  },
611
613
  updateOfflineAnnotationEnabled: function(e) {
612
- f.emit("update-offline-annotation-enabled", e);
614
+ h.emit("update-offline-annotation-enabled", e);
613
615
  },
614
616
  onConnectivityInfoOpen: function(e) {
615
- f.emit("connectivity-info-open", e);
617
+ h.emit("connectivity-info-open", e);
616
618
  },
617
619
  onConnectivityError: function(e) {
618
- f.emit("connectivity-error", e);
620
+ h.emit("connectivity-error", e);
619
621
  },
620
622
  onConnectivityInfoClose: function() {
621
- f.emit("connectivity-info-close");
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 = A(t), n = w(new $());
636
+ const t = e.mapImp, i = T(t), n = F(new L());
625
637
  n.initialise(this.flatmapAPI);
626
- const o = await H(t, n), s = t.uuid, a = t.pathways;
627
- if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] = o.filter((r) => {
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[s]) {
642
+ }).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[o]) {
631
643
  const r = a ? a.paths : {};
632
- this.connectivityKnowledge[s] = this.connectivityKnowledge[i].filter((l) => l.id in r);
644
+ this.connectivityKnowledge[o] = this.connectivityKnowledge[i].filter((l) => l.id in r);
633
645
  }
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");
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
- D as C
685
+ x as C
674
686
  };