@abi-software/mapintegratedvuer 1.9.1 → 1.9.3-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.
@@ -1,6 +1,6 @@
1
1
  import { markRaw as w } from "vue";
2
- import { u as b, p as C, q as I, E as h, T as M, r as S, s as F, v as A, x as $ } from "./index-qckfB1dl.js";
3
- import { mapStores as H } from "pinia";
2
+ import { u as b, b as F, c as M, E as f, T as C, d as S, e as I, f as A, l as H } from "./index-DMpfPm6s.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)
@@ -32,7 +32,7 @@ const d = function(e) {
32
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) {
@@ -155,16 +155,6 @@ let N = function() {
155
155
  } catch (n) {
156
156
  throw new Error(n);
157
157
  }
158
- }, this.queryMapPaths = async function(e) {
159
- const t = this.flatmapAPI + `flatmap/${e}/pathways`;
160
- try {
161
- const i = await fetch(t);
162
- if (!i.ok)
163
- throw new Error(`Response status: ${i.status}`);
164
- return await i.json();
165
- } catch (i) {
166
- throw new Error(i);
167
- }
168
158
  }, this.queryForConnectivity = function(e, t, i, n = !0) {
169
159
  const o = { sql: this.buildConnectivitySqlStatement(t) }, s = {
170
160
  method: "POST",
@@ -217,10 +207,10 @@ let N = function() {
217
207
  let n = [], o = [], s;
218
208
  if (t && t["node-phenotypes"]) {
219
209
  const l = ["ilxtr:hasSomaLocatedIn"], c = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
220
- l.forEach((u) => {
221
- n.push(...t["node-phenotypes"][u]);
222
- }), n = d(n), c.forEach((u) => {
223
- o.push(...t["node-phenotypes"][u]);
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]);
224
214
  }), o = d(o);
225
215
  } else
226
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;
@@ -269,7 +259,7 @@ let N = function() {
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
- ...H(b, C, I),
284
+ ...N(b, F, M),
294
285
  idNamePair() {
295
286
  return this.splitFlowStore.idNamePair;
296
287
  },
@@ -305,12 +296,22 @@ 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
  },
310
305
  mounted: function() {
311
- h.on("startHelp", () => {
306
+ f.on("startHelp", () => {
312
307
  this.startHelp();
313
- }), this.multiflatmapRef = this.$refs.multiflatmap, this.flatmapRef = this.$refs.flatmap, this.scaffoldRef = this.$refs.scaffold, this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities;
308
+ }), f.on("connectivity-item-close", () => {
309
+ if (this.multiflatmapRef) {
310
+ const e = this.multiflatmapRef.getCurrentFlatmap();
311
+ e && e.closeTooltip();
312
+ }
313
+ this.flatmapRef && this.flatmapRef.closeTooltip();
314
+ }), 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
315
  },
315
316
  methods: {
316
317
  toggleSyncMode: function() {
@@ -318,13 +319,13 @@ const D = {
318
319
  getState: function() {
319
320
  },
320
321
  openMap: function(e) {
321
- e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (h.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`));
322
+ e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (f.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`));
322
323
  },
323
324
  onMapmanagerLoaded: function(e) {
324
325
  this.settingsStore.updateMapManager(e);
325
326
  },
326
327
  trackOpenMap: function(e) {
327
- M.sendEvent({
328
+ C.sendEvent({
328
329
  event: "interaction_event",
329
330
  event_name: "portal_maps_open_map",
330
331
  category: e,
@@ -351,7 +352,7 @@ const D = {
351
352
  var a, r, l, c;
352
353
  const i = t[0];
353
354
  if (this.resourceHasAction(i)) {
354
- h.emit("PopoverActionClick", i);
355
+ f.emit("PopoverActionClick", i);
355
356
  return;
356
357
  }
357
358
  let n, o = !1;
@@ -365,7 +366,7 @@ const D = {
365
366
  if (e == "MultiFlatmap" || e == "Flatmap")
366
367
  if (s.internalName = (a = i == null ? void 0 : i.feature) != null && a.label ? i.feature.label : this.idNamePair[i.feature.models], i.eventType == "click")
367
368
  if (s.eventType = "selected", i.feature.type == "marker") {
368
- let u = s.internalName;
369
+ let h = s.internalName;
369
370
  if (this.settingsStore.isFeaturedMarkerIdentifier(i.feature.id))
370
371
  n = {
371
372
  type: "Search",
@@ -375,17 +376,17 @@ const D = {
375
376
  else {
376
377
  n = {
377
378
  type: "Facet",
378
- facet: u,
379
+ facet: h,
379
380
  facetPropPath: "anatomy.organ.category.name",
380
381
  facetSubPropPath: "anatomy.organ.name",
381
382
  term: "Anatomical structure"
382
383
  };
383
- let f = /* @__PURE__ */ new Set();
384
+ let u = /* @__PURE__ */ new Set();
384
385
  i.feature["marker-terms"].forEach((m) => {
385
- f.add(m.label);
386
- }), f.add(u), f.size > 0 && (n = {
386
+ u.add(m.label);
387
+ }), u.add(h), u.size > 0 && (n = {
387
388
  type: "Facets",
388
- labels: [...f]
389
+ labels: [...u]
389
390
  });
390
391
  }
391
392
  o = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
@@ -393,11 +394,11 @@ const D = {
393
394
  else i.eventType == "mouseenter" && (s.eventType = "highlighted", o = !0);
394
395
  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
396
  type: "Facet",
396
- facet: P(i.data.id),
397
+ facet: T(i.data.id),
397
398
  facetPropPath: "anatomy.organ.category.name",
398
399
  term: "Anatomical structure"
399
400
  })), s.eventType = "selected", o = !0);
400
- n && h.emit("PopoverActionClick", n), o && this.$emit("resource-selected", s);
401
+ n && f.emit("PopoverActionClick", n), o && this.$emit("resource-selected", s);
401
402
  },
402
403
  resourceHasAction: function(e) {
403
404
  return e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets";
@@ -425,7 +426,7 @@ const D = {
425
426
  const s = S(e.resource.feature.models);
426
427
  if (s.length > 0) return s;
427
428
  }
428
- let o = F(t);
429
+ let o = I(t);
429
430
  if (o)
430
431
  return o;
431
432
  if (i && e.eventType === "selected")
@@ -579,13 +580,16 @@ const D = {
579
580
  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(() => {
580
581
  (t.length || i.length || n || o.length) && ((this.multiflatmapRef || this.flatmapRef) && s ? this.flatmapHighlight(s, t, n, o).then((r) => {
581
582
  try {
582
- s.zoomToFeatures(r);
583
+ s.showConnectivityTooltips({
584
+ connectivityInfo: { featureId: r },
585
+ data: []
586
+ });
583
587
  } catch (l) {
584
588
  if (console.log(l), o.length && s.mapImp) {
585
589
  const c = s.mapImp.uuid;
586
590
  r.every(
587
- (f) => this.connectivityKnowledge[c].some(
588
- (m) => m.id === f
591
+ (u) => this.connectivityKnowledge[c].some(
592
+ (m) => m.id === u
589
593
  )
590
594
  ) || s.mapImp.clearSearchResults();
591
595
  }
@@ -595,66 +599,35 @@ const D = {
595
599
  }
596
600
  },
597
601
  onAnnotationOpen: function(e) {
598
- h.emit("annotation-open", e);
602
+ f.emit("annotation-open", e);
599
603
  },
600
604
  onAnnotationClose: function() {
601
- h.emit("annotation-close");
605
+ f.emit("annotation-close");
606
+ },
607
+ updateOfflineAnnotationEnabled: function(e) {
608
+ f.emit("update-offline-annotation-enabled", e);
602
609
  },
603
610
  onConnectivityInfoOpen: function(e) {
604
- h.emit("connectivity-info-open", e);
611
+ f.emit("connectivity-info-open", e);
605
612
  },
606
613
  onConnectivityError: function(e) {
607
- h.emit("connectivity-error", e);
614
+ f.emit("connectivity-error", e);
608
615
  },
609
616
  onConnectivityInfoClose: function() {
610
- h.emit("connectivity-info-close");
611
- },
612
- loadConnectivityKnowledge: async function(e) {
613
- const t = A(e), i = w(new N());
614
- i.initialise(this.flatmapAPI);
615
- const n = await $(e, i), o = e.uuid;
616
- if (this.connectivityKnowledge[t] || (this.connectivityKnowledge[t] = n.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 i.queryMapPaths(o), a = s ? s.paths : {};
621
- this.connectivityKnowledge[o] = n.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));
625
- }
626
- this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge), h.emit("species-layout-connectivity-update");
627
- },
628
- getSearchedId: function(e, t) {
629
- let i = [];
630
- const n = e.mapImp.search(t);
631
- return (n.__featureIds || n.featureIds).forEach((s) => {
632
- var r;
633
- const a = e.mapImp.annotation(s);
634
- (r = a.label) != null && r.toLowerCase().includes(t.toLowerCase()) && a.models && !i.includes(a.models) && i.push(a.models);
635
- }), i;
636
- },
637
- connectivityQueryFilter: async function(e, t) {
638
- const i = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
639
- if (e.$el.checkVisibility()) {
640
- let n = {
641
- state: "default",
642
- data: [...i]
643
- };
644
- if (t && (t.type === "query-update" ? (this.query !== t.value && (this.target = []), this.query = t.value) : t.type === "filter-update" && (this.filter = t.value)), this.query) {
645
- n.state = "processed";
646
- let o = [], s = {};
647
- const a = this.query.split(",").map((f) => f.trim());
648
- for (let f = 0; f < a.length; f++)
649
- o.push(this.getSearchedId(e, a[f]));
650
- const r = await Promise.all(o), l = [...new Set(r.flat())];
651
- let c = await e.retrieveConnectedPaths(l, s);
652
- c = [...l, ...c.filter((f) => !l.includes(f))];
653
- let u = i.filter((f) => c.includes(f.id));
654
- n.data = u;
655
- }
656
- h.emit("connectivity-knowledge", n);
617
+ f.emit("connectivity-info-close");
618
+ },
619
+ loadConnectivityExplorerConfig: async function(e) {
620
+ const t = e.mapImp, i = A(t), n = w(new $());
621
+ n.initialise(this.flatmapAPI);
622
+ const o = await H(t, n), s = t.uuid, a = t.pathways;
623
+ if (this.connectivityKnowledge[i] || (this.connectivityKnowledge[i] = o.filter((r) => {
624
+ var l;
625
+ return r.source === i && ((l = r.connectivity) == null ? void 0 : l.length);
626
+ }).sort((r, l) => r.label.localeCompare(l.label))), !this.connectivityKnowledge[s]) {
627
+ const r = a ? a.paths : {};
628
+ this.connectivityKnowledge[s] = this.connectivityKnowledge[i].filter((l) => l.id in r);
657
629
  }
630
+ 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");
658
631
  }
659
632
  },
660
633
  data: function() {
@@ -677,8 +650,8 @@ const D = {
677
650
  isInHelp: !1,
678
651
  mapManager: void 0,
679
652
  connectivityKnowledge: {},
680
- query: "",
681
- filter: [],
653
+ connectivityFilterOptions: {},
654
+ connectivityFilterSources: {},
682
655
  highlightDelay: void 0
683
656
  };
684
657
  },
@@ -1,13 +1,14 @@
1
- import { _ as d, k as h, t as u, T as l, E as i } from "./index-qckfB1dl.js";
2
- import { C as y } from "./ContentMixin-c9DvlJVP.js";
3
- import { D as I, r as g } from "./style-C6pIyWak.js";
4
- import { resolveComponent as s, openBlock as p, createElementBlock as M, createVNode as v, createBlock as C, createCommentVNode as S } from "vue";
5
- const F = {
1
+ import { _ as h, k as c, t as u, T as l, E as i } from "./index-DMpfPm6s.js";
2
+ import { C as g } from "./ContentMixin-W2PTyJZz.js";
3
+ import { D as y } from "./style-Ba4Y-S47.js";
4
+ import { FlatmapVuer as M } from "@abi-software/flatmapvuer";
5
+ import { resolveComponent as r, openBlock as p, createElementBlock as I, createVNode as v, createBlock as C, createCommentVNode as S } from "vue";
6
+ const w = {
6
7
  name: "Flatmap",
7
- mixins: [y, I],
8
+ mixins: [g, y],
8
9
  components: {
9
- FlatmapVuer: g,
10
- HelpModeDialog: h
10
+ FlatmapVuer: M,
11
+ HelpModeDialog: c
11
12
  },
12
13
  methods: {
13
14
  getState: function() {
@@ -42,16 +43,15 @@ const F = {
42
43
  },
43
44
  flatmapReadyCall: function(e) {
44
45
  let t = { id: this.entry.id, prov: this.getFlatmapImp().provenance };
45
- const a = e.mapImp;
46
- i.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.flatmapReadyForMarkerUpdates(e), this.loadConnectivityKnowledge(a), i.emit("mapLoaded", e);
46
+ e.mapImp, i.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.flatmapReadyForMarkerUpdates(e), this.updateSettings(), this.loadConnectivityExplorerConfig(e), i.emit("mapLoaded", e);
47
47
  },
48
48
  onPathwaySelectionChanged: function(e) {
49
- const { label: t, property: a, checked: n, selectionsTitle: r } = e;
49
+ const { label: t, property: a, checked: n, selectionsTitle: s } = e;
50
50
  l.sendEvent({
51
51
  event: "interaction_event",
52
52
  event_name: "portal_maps_pathway_change",
53
53
  category: t + " [" + a + "] " + n,
54
- location: r
54
+ location: s
55
55
  });
56
56
  },
57
57
  highlightFeatures: function(e) {
@@ -70,8 +70,8 @@ const F = {
70
70
  searchSuggestions: function(e, t) {
71
71
  if (e && this.$refs.flatmap.mapImp) {
72
72
  const a = this.$refs.flatmap.mapImp.search(e);
73
- (a.__featureIds || a.featureIds).forEach((r) => {
74
- const o = this.$refs.flatmap.mapImp.annotation(r);
73
+ (a.__featureIds || a.featureIds).forEach((s) => {
74
+ const o = this.$refs.flatmap.mapImp.annotation(s);
75
75
  o && o.label && t.push(o.label);
76
76
  });
77
77
  }
@@ -80,9 +80,9 @@ const F = {
80
80
  let a = e.name;
81
81
  const n = this.$refs.flatmap.mapImp;
82
82
  if (a) {
83
- const r = n.search(a);
84
- if (r.featureIds.length) {
85
- let o = n.modelForFeature(r.featureIds[0]);
83
+ const s = n.search(a);
84
+ if (s.featureIds.length) {
85
+ let o = n.modelForFeature(s.featureIds[0]);
86
86
  o ? (t && n.selectFeatures(o), n.zoomToFeatures(o)) : n.clearSearchResults();
87
87
  }
88
88
  } else
@@ -90,6 +90,16 @@ const F = {
90
90
  },
91
91
  changeViewingMode: function(e) {
92
92
  this.$refs.flatmap.changeViewingMode(e);
93
+ },
94
+ updateSettings: function() {
95
+ const {
96
+ backgroundDisplay: e,
97
+ viewingMode: t,
98
+ flightPathDisplay: a,
99
+ organsDisplay: n,
100
+ outlines: s
101
+ } = this.settingsStore.globalSettings, o = this.$refs.flatmap;
102
+ o.changeViewingMode(t), o.setFlightPath3D(a), o.setColour(n), o.setOutlines(s), o.backgroundChangeCallback(e);
93
103
  }
94
104
  },
95
105
  computed: {
@@ -104,6 +114,16 @@ const F = {
104
114
  this.flatmapMarkerUpdate(void 0);
105
115
  }), i.on("hoverUpdate", () => {
106
116
  this.cardHoverHighlight();
117
+ }), i.on("viewingModeUpdate", (e) => {
118
+ this.$refs.flatmap.changeViewingMode(e);
119
+ }), i.on("flightPathUpdate", (e) => {
120
+ this.$refs.flatmap.setFlightPath3D(e);
121
+ }), i.on("organsDisplayUpdate", (e) => {
122
+ this.$refs.flatmap.setColour(e);
123
+ }), i.on("outlinesDisplayUpdate", (e) => {
124
+ this.$refs.flatmap.setOutlines(e);
125
+ }), i.on("backgroundDisplayUpdate", (e) => {
126
+ this.$refs.flatmap.backgroundChangeCallback(e);
107
127
  }), i.on("show-connectivity", (e) => {
108
128
  const { featureIds: t, offset: a } = e, n = this.$refs.flatmap;
109
129
  n && n.moveMap(t, {
@@ -113,20 +133,17 @@ const F = {
113
133
  }), i.on("show-reference-connectivities", (e) => {
114
134
  const t = this.$refs.flatmap;
115
135
  t && t.showConnectivitiesByReference(e);
116
- }), i.on("connectivity-query-filter", (e) => {
117
- const t = this.$refs.flatmap;
118
- t && t.mapImp && this.connectivityQueryFilter(t, e);
119
136
  });
120
137
  }
121
- }, w = { class: "viewer-container" };
122
- function $(e, t, a, n, r, o) {
123
- const m = s("FlatmapVuer"), f = s("HelpModeDialog");
124
- return p(), M("div", w, [
125
- v(m, {
138
+ }, b = { class: "viewer-container" };
139
+ function F(e, t, a, n, s, o) {
140
+ const f = r("FlatmapVuer"), m = r("HelpModeDialog");
141
+ return p(), I("div", b, [
142
+ v(f, {
126
143
  state: e.entry.state,
127
144
  entry: e.entry.resource,
128
145
  mapManager: e.mapManager,
129
- onResourceSelected: t[0] || (t[0] = (c) => o.flatmaprResourceSelected(e.entry.type, c)),
146
+ onResourceSelected: t[0] || (t[0] = (d) => o.flatmaprResourceSelected(e.entry.type, d)),
130
147
  onPanZoomCallback: e.flatmapPanZoomCallback,
131
148
  name: e.entry.resource,
132
149
  style: { height: "100%", width: "100%" },
@@ -140,10 +157,12 @@ function $(e, t, a, n, r, o) {
140
157
  onShownMapTooltip: e.onMapTooltipShown,
141
158
  onAnnotationOpen: e.onAnnotationOpen,
142
159
  onAnnotationClose: e.onAnnotationClose,
160
+ onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
143
161
  annotationSidebar: e.annotationSidebar,
144
162
  onConnectivityInfoOpen: e.onConnectivityInfoOpen,
145
163
  onConnectivityError: e.onConnectivityError,
146
164
  onConnectivityInfoClose: e.onConnectivityInfoClose,
165
+ connectivityInfoSidebar: e.connectivityInfoSidebar,
147
166
  pathControls: !0,
148
167
  ref: "flatmap",
149
168
  onReady: o.flatmapReadyCall,
@@ -152,11 +171,13 @@ function $(e, t, a, n, r, o) {
152
171
  enableOpenMapUI: !0,
153
172
  flatmapAPI: e.flatmapAPI,
154
173
  sparcAPI: e.apiLocation,
174
+ showLocalSettings: e.showLocalSettings,
175
+ showOpenMapButton: e.showOpenMapButton,
155
176
  onOpenMap: e.openMap,
156
177
  onPathwaySelectionChanged: o.onPathwaySelectionChanged,
157
178
  onMapmanagerLoaded: e.onMapmanagerLoaded
158
- }, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded"]),
159
- e.helpMode && e.useHelpModeDialog ? (p(), C(f, {
179
+ }, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded"]),
180
+ e.helpMode && e.useHelpModeDialog ? (p(), C(m, {
160
181
  key: 0,
161
182
  ref: "flatmapHelp",
162
183
  flatmapRef: e.flatmapRef,
@@ -166,7 +187,7 @@ function $(e, t, a, n, r, o) {
166
187
  }, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : S("", !0)
167
188
  ]);
168
189
  }
169
- const R = /* @__PURE__ */ d(F, [["render", $], ["__scopeId", "data-v-4ff4b478"]]);
190
+ const P = /* @__PURE__ */ h(w, [["render", F], ["__scopeId", "data-v-b2faff4c"]]);
170
191
  export {
171
- R as default
192
+ P as default
172
193
  };
@@ -1,6 +1,6 @@
1
- import { C as r } from "./ContentMixin-c9DvlJVP.js";
1
+ import { C as r } from "./ContentMixin-W2PTyJZz.js";
2
2
  import { openBlock as o, createElementBlock as t, createElementVNode as s } from "vue";
3
- import { _ as n } from "./index-qckfB1dl.js";
3
+ import { _ as n } from "./index-DMpfPm6s.js";
4
4
  const a = {
5
5
  name: "Iframe",
6
6
  mixins: [r]
@@ -1,8 +1,9 @@
1
- import { _ as u, k as h, a as y, g, E as s, t as v, T as p } from "./index-qckfB1dl.js";
2
- import { C as M } from "./ContentMixin-c9DvlJVP.js";
3
- import { D as C, h as I } from "./style-C6pIyWak.js";
4
- import { resolveComponent as f, openBlock as c, createElementBlock as S, createVNode as F, createBlock as k, createCommentVNode as w } from "vue";
5
- const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>', d = (e) => {
1
+ import { _ as d, k as h, a as g, g as y, E as s, t as M, T as p } from "./index-DMpfPm6s.js";
2
+ import { C as v } from "./ContentMixin-W2PTyJZz.js";
3
+ import { D as C } from "./style-Ba4Y-S47.js";
4
+ import { MultiFlatmapVuer as S } from "@abi-software/flatmapvuer";
5
+ import { resolveComponent as f, openBlock as c, createElementBlock as F, createVNode as I, createBlock as w, createCommentVNode as k } from "vue";
6
+ const b = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>', u = (e) => {
6
7
  const t = [
7
8
  {
8
9
  display: "Open AC Map",
@@ -28,21 +29,21 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
28
29
  break;
29
30
  }
30
31
  return t;
31
- }, b = {
32
+ }, R = {
32
33
  name: "MultiFlatmap",
33
- mixins: [M, C],
34
+ mixins: [v, C],
34
35
  components: {
35
- MultiFlatmapVuer: I,
36
+ MultiFlatmapVuer: S,
36
37
  HelpModeDialog: h
37
38
  },
38
39
  data: function() {
39
40
  return {
40
41
  zoomLevel: 6,
41
42
  flatmapReady: !1,
42
- availableSpecies: y(),
43
+ availableSpecies: g(),
43
44
  scaffoldResource: {},
44
45
  showStarInLegend: !1,
45
- openMapOptions: d("Human Male")
46
+ openMapOptions: u("Human Male")
46
47
  };
47
48
  },
48
49
  methods: {
@@ -60,7 +61,7 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
60
61
  title: "View 3D scaffold",
61
62
  layout: "2horpanel",
62
63
  type: "SyncMap"
63
- } : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await g(this.apiLocation, "human")), e = {
64
+ } : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await y(this.apiLocation, "human")), e = {
64
65
  contextCardUrl: this.scaffoldResource.human.datasetInfo.contextCardUrl,
65
66
  discoverId: this.scaffoldResource.human.datasetInfo.discoverId,
66
67
  s3uri: this.scaffoldResource.human.datasetInfo.s3uri,
@@ -117,7 +118,7 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
117
118
  featureId: t.feature.featureId || "",
118
119
  taxonomy: t.taxonomy || "",
119
120
  resources: t.resource.join(", ")
120
- }, o = v(n);
121
+ }, o = M(n);
121
122
  p.sendEvent({
122
123
  event: "interaction_event",
123
124
  event_name: "portal_maps_connectivity",
@@ -188,7 +189,7 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
188
189
  }
189
190
  },
190
191
  flatmapChanged: async function(e) {
191
- this.activeSpecies = e, this.openMapOptions = d(e), this.$emit("species-changed", e), this.entry.state && this.entry.state.species === this.activeSpecies || this.syncMode == !0 && await this.toggleSyncMode(), this.updateProvCard(), p.sendEvent({
192
+ this.activeSpecies = e, this.openMapOptions = u(e), this.$emit("species-changed", e), this.entry.state && this.entry.state.species === this.activeSpecies || this.syncMode == !0 && await this.toggleSyncMode(), this.updateProvCard(), p.sendEvent({
192
193
  event: "interaction_event",
193
194
  event_name: "portal_maps_species_change",
194
195
  category: this.activeSpecies
@@ -198,7 +199,7 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
198
199
  if (e) {
199
200
  e.enablePanZoomEvents(!0), this.flatmapReady = !0;
200
201
  const t = e.mapImp;
201
- this.flatmapMarkerUpdate(t), this.updateProvCard(), this.loadConnectivityKnowledge(t), s.emit("mapLoaded", e);
202
+ this.flatmapMarkerUpdate(t), this.updateProvCard(), this.updateSettings(), this.loadConnectivityExplorerConfig(e), s.emit("mapLoaded", e);
202
203
  }
203
204
  },
204
205
  getFlatmapImp: function() {
@@ -232,7 +233,7 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
232
233
  let o = a;
233
234
  if (o || (o = this.getFlatmapImp()), o) {
234
235
  let i = document.createElement("div");
235
- i.innerHTML = R;
236
+ i.innerHTML = b;
236
237
  const r = o.addMarker(e, {
237
238
  element: i,
238
239
  className: "highlight-marker",
@@ -256,6 +257,19 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
256
257
  },
257
258
  changeConnectivitySource: function(e) {
258
259
  this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().changeConnectivitySource(e);
260
+ },
261
+ updateSettings: function() {
262
+ const {
263
+ backgroundDisplay: e,
264
+ viewingMode: t,
265
+ flightPathDisplay: a,
266
+ organsDisplay: n,
267
+ outlines: o
268
+ } = this.settingsStore.globalSettings;
269
+ if (this.flatmapReady) {
270
+ const i = this.$refs.multiflatmap.getCurrentFlatmap();
271
+ i.changeViewingMode(t), i.setFlightPath3D(a), i.setColour(n), i.setOutlines(o), i.backgroundChangeCallback(e);
272
+ }
259
273
  }
260
274
  },
261
275
  computed: {
@@ -299,18 +313,23 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
299
313
  this.flatmapReady && this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
300
314
  }), s.on("hoverUpdate", () => {
301
315
  this.flatmapReady && this.cardHoverHighlight();
302
- }), s.on("connectivity-query-filter", (e) => {
303
- if (this.flatmapReady && this.$refs.multiflatmap) {
304
- const t = this.$refs.multiflatmap.getCurrentFlatmap();
305
- t && t.mapImp && this.connectivityQueryFilter(t, e);
306
- }
316
+ }), s.on("viewingModeUpdate", (e) => {
317
+ this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().changeViewingMode(e);
318
+ }), s.on("flightPathUpdate", (e) => {
319
+ this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().setFlightPath3D(e);
320
+ }), s.on("organsDisplayUpdate", (e) => {
321
+ this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().setColour(e);
322
+ }), s.on("outlinesDisplayUpdate", (e) => {
323
+ this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().setOutlines(e);
324
+ }), s.on("backgroundDisplayUpdate", (e) => {
325
+ this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().backgroundChangeCallback(e);
307
326
  });
308
327
  }
309
- }, H = { class: "viewer-container" };
328
+ }, O = { class: "viewer-container" };
310
329
  function L(e, t, a, n, o, i) {
311
330
  const r = f("MultiFlatmapVuer"), l = f("HelpModeDialog");
312
- return c(), S("div", H, [
313
- F(r, {
331
+ return c(), F("div", O, [
332
+ I(r, {
314
333
  availableSpecies: e.availableSpecies,
315
334
  onFlatmapChanged: i.flatmapChanged,
316
335
  onReady: i.multiFlatmapReady,
@@ -327,6 +346,7 @@ function L(e, t, a, n, o, i) {
327
346
  onShownMapTooltip: e.onMapTooltipShown,
328
347
  onAnnotationOpen: e.onAnnotationOpen,
329
348
  onAnnotationClose: e.onAnnotationClose,
349
+ onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
330
350
  annotationSidebar: e.annotationSidebar,
331
351
  onConnectivityInfoOpen: e.onConnectivityInfoOpen,
332
352
  onConnectivityError: e.onConnectivityError,
@@ -339,24 +359,27 @@ function L(e, t, a, n, o, i) {
339
359
  openMapOptions: e.openMapOptions,
340
360
  flatmapAPI: e.flatmapAPI,
341
361
  sparcAPI: e.apiLocation,
362
+ showLocalSettings: e.showLocalSettings,
363
+ showOpenMapButton: e.showOpenMapButton,
342
364
  onPanZoomCallback: i.flatmapPanZoomCallback,
343
365
  onOpenMap: e.openMap,
344
366
  onFinishHelpMode: e.endHelp,
345
367
  onPathwaySelectionChanged: i.onPathwaySelectionChanged,
346
368
  onOpenPubmedUrl: i.onOpenPubmedUrl,
347
- onMapmanagerLoaded: e.onMapmanagerLoaded
348
- }, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "mapManager", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl", "onMapmanagerLoaded"]),
349
- e.helpMode && e.useHelpModeDialog ? (c(), k(l, {
369
+ onMapmanagerLoaded: e.onMapmanagerLoaded,
370
+ showPathwayFilter: !1
371
+ }, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "mapManager", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl", "onMapmanagerLoaded"]),
372
+ e.helpMode && e.useHelpModeDialog ? (c(), w(l, {
350
373
  key: 0,
351
374
  ref: "multiflatmapHelp",
352
375
  multiflatmapRef: e.multiflatmapRef,
353
376
  lastItem: e.helpModeLastItem,
354
377
  onShowNext: e.onHelpModeShowNext,
355
378
  onFinishHelpMode: e.onFinishHelpMode
356
- }, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : w("", !0)
379
+ }, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : k("", !0)
357
380
  ]);
358
381
  }
359
- const T = /* @__PURE__ */ u(b, [["render", L], ["__scopeId", "data-v-e96022db"]]);
382
+ const E = /* @__PURE__ */ d(R, [["render", L], ["__scopeId", "data-v-eef77976"]]);
360
383
  export {
361
- T as default
384
+ E as default
362
385
  };