@abi-software/mapintegratedvuer 1.21.1 → 1.21.2

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 (68) hide show
  1. package/README.md +23 -5
  2. package/assets/location-icon.html +33 -1
  3. package/assets/styleguide.css +18 -18
  4. package/cypress.config.js +7 -9
  5. package/dist/{ConnectivityGraph-CZMROk9r.js → ConnectivityGraph-DrSaFEDd.js} +3 -3
  6. package/dist/{ContentMixin-Vn34n5t2.js → ContentMixin-Xg0PjBqG.js} +2 -2
  7. package/dist/{DynamicMarkerMixin-BS6t7w_i.js → DynamicMarkerMixin-D5Ruu_hd.js} +1 -1
  8. package/dist/{Flatmap-BejxA0uz.js → Flatmap-CxN8TbnS.js} +4 -4
  9. package/dist/{Iframe-BWbhTjCR.js → Iframe-CkgbLfJt.js} +4 -4
  10. package/dist/{MultiFlatmap-nlmsH-Ib.js → MultiFlatmap-CkejvAJe.js} +4 -4
  11. package/dist/{Plot-ChbPsDZX.js → Plot-BfwoipSl.js} +2 -2
  12. package/dist/{Scaffold-C6f7c7Ha.js → Scaffold-DCqsTKpg.js} +4 -4
  13. package/dist/{Simulation-DcJScRYo.js → Simulation-BOtU3kTT.js} +2 -2
  14. package/dist/{connectivities-UXTqf7_0.js → connectivities-DyeS8w0c.js} +126 -95
  15. package/dist/index.html +9 -6
  16. package/dist/mapintegratedvuer.js +5489 -5578
  17. package/dist/mapintegratedvuer.umd.cjs +196 -196
  18. package/dist/style.css +1 -1
  19. package/eslint.config.js +39 -15
  20. package/package.json +11 -5
  21. package/public/index.html +9 -6
  22. package/src/App.vue +234 -249
  23. package/src/assets/_variables.scss +12 -10
  24. package/src/assets/header-icon.scss +8 -9
  25. package/src/assets/mapicon-species-style.css +10 -8
  26. package/src/assets/styles.scss +1 -1
  27. package/src/components/ContentBar.vue +98 -106
  28. package/src/components/ContentVuer.vue +36 -39
  29. package/src/components/ContextCard.vue +238 -199
  30. package/src/components/ContextHelp.vue +22 -26
  31. package/src/components/CustomSplitter.vue +32 -43
  32. package/src/components/DatasetHeader.vue +37 -41
  33. package/src/components/DialogToolbarContent.vue +292 -256
  34. package/src/components/FlatmapContextCard.vue +52 -57
  35. package/src/components/MapContent.vue +90 -86
  36. package/src/components/ResizeSensor.vue +8 -13
  37. package/src/components/SearchControls.vue +26 -35
  38. package/src/components/SimulatedData.js +196 -219
  39. package/src/components/SplitDialog.vue +139 -129
  40. package/src/components/SplitFlow.vue +421 -237
  41. package/src/components/index.js +1 -3
  42. package/src/components/scripts/simulation_data.js +393 -397
  43. package/src/components/scripts/utilities.js +108 -78
  44. package/src/components/viewers/CellDLViewer.vue +9 -9
  45. package/src/components/viewers/ConnectivityGraph.vue +9 -12
  46. package/src/components/viewers/Flatmap.vue +23 -25
  47. package/src/components/viewers/Iframe.vue +8 -10
  48. package/src/components/viewers/MultiFlatmap.vue +59 -69
  49. package/src/components/viewers/Plot.vue +6 -7
  50. package/src/components/viewers/Scaffold.vue +73 -63
  51. package/src/components/viewers/Simulation.vue +10 -15
  52. package/src/main.js +16 -21
  53. package/src/mixins/ContentMixin.js +208 -178
  54. package/src/mixins/DynamicMarkerMixin.js +14 -18
  55. package/src/mixins/RetrieveContextCardMixin.js +35 -30
  56. package/src/mixins/S3Bucket.vue +10 -13
  57. package/src/services/knowledgeMapping.js +53 -53
  58. package/src/services/tagging.js +4 -4
  59. package/src/stores/connectivities.js +46 -8
  60. package/src/stores/entries.js +7 -9
  61. package/src/stores/index.js +7 -7
  62. package/src/stores/settings.js +23 -31
  63. package/src/stores/splitFlow.js +364 -298
  64. package/vite.bundle-build.js +24 -26
  65. package/vite.config.js +22 -21
  66. package/vite.static-build.js +4 -4
  67. package/vitest.workspace.js +1 -3
  68. package/vuese-generator.js +47 -55
@@ -58,47 +58,43 @@
58
58
  </template>
59
59
 
60
60
  <script>
61
- /* eslint-disable no-alert, no-console */
62
61
  import Tagging from '../../services/tagging.js';
63
- import ContentMixin from "../../mixins/ContentMixin";
64
- import EventBus from "../EventBus";
65
- import {
66
- availableSpecies,
67
- defaultSpecies,
68
- } from "../scripts/utilities";
69
- import DyncamicMarkerMixin from "../../mixins/DynamicMarkerMixin";
62
+ import ContentMixin from '../../mixins/ContentMixin';
63
+ import EventBus from '../EventBus';
64
+ import { availableSpecies, defaultSpecies } from '../scripts/utilities';
65
+ import DyncamicMarkerMixin from '../../mixins/DynamicMarkerMixin';
70
66
 
71
- import YellowStar from "../../icons/yellowstar";
67
+ import YellowStar from '../../icons/yellowstar';
72
68
 
73
- import { MultiFlatmapVuer } from "@abi-software/flatmapvuer";
74
- import "@abi-software/flatmapvuer/dist/style.css";
75
- import { HelpModeDialog } from '@abi-software/map-utilities'
76
- import '@abi-software/map-utilities/dist/style.css'
69
+ import { MultiFlatmapVuer } from '@abi-software/flatmapvuer';
70
+ import '@abi-software/flatmapvuer/dist/style.css';
71
+ import { HelpModeDialog } from '@abi-software/map-utilities';
72
+ import '@abi-software/map-utilities/dist/style.css';
77
73
 
78
- const getOpenMapOptions = (species) => {
74
+ const getOpenMapOptions = (_species) => {
79
75
  const options = [
80
76
  {
81
- display: "Open AC Map",
82
- key: "AC"
77
+ display: 'Open AC Map',
78
+ key: 'AC',
83
79
  },
84
80
  {
85
- display: "Open FC Map",
86
- key: "FC"
81
+ display: 'Open FC Map',
82
+ key: 'FC',
87
83
  },
88
84
  {
89
- display: "Open 3D Human Map",
90
- key: "3D"
85
+ display: 'Open 3D Human Map',
86
+ key: '3D',
91
87
  },
92
88
  {
93
- display: "Open Connectivity Graph",
94
- key: "CG"
89
+ display: 'Open Connectivity Graph',
90
+ key: 'CG',
95
91
  },
96
- ]
92
+ ];
97
93
  return options;
98
- }
94
+ };
99
95
 
100
96
  export default {
101
- name: "MultiFlatmap",
97
+ name: 'MultiFlatmap',
102
98
  mixins: [ContentMixin, DyncamicMarkerMixin],
103
99
  components: {
104
100
  MultiFlatmapVuer,
@@ -108,12 +104,12 @@ export default {
108
104
  return {
109
105
  availableSpecies: availableSpecies(),
110
106
  flatmapReady: false,
111
- scaffoldResource: { },
107
+ scaffoldResource: {},
112
108
  showStarInLegend: false,
113
109
  speciesHasChanged: false,
114
110
  openMapOptions: getOpenMapOptions(defaultSpecies),
115
111
  zoomLevel: 6,
116
- }
112
+ };
117
113
  },
118
114
  methods: {
119
115
  getState: function () {
@@ -124,11 +120,11 @@ export default {
124
120
  if (this.mouseHovered) {
125
121
  const result = {
126
122
  paneIndex: this.entry.id,
127
- eventType: "panZoom",
123
+ eventType: 'panZoom',
128
124
  payload: payload,
129
125
  type: this.entry.type,
130
126
  };
131
- this.$emit("resource-selected", result);
127
+ this.$emit('resource-selected', result);
132
128
  }
133
129
  },
134
130
  /**
@@ -147,10 +143,9 @@ export default {
147
143
  if (term && flatmap.mapImp) {
148
144
  const results = flatmap.mapImp.search(term);
149
145
  const featureIds = results.__featureIds || results.featureIds;
150
- featureIds.forEach(id => {
146
+ featureIds.forEach((id) => {
151
147
  const annotation = flatmap.mapImp.annotation(id);
152
- if (annotation && annotation.label)
153
- suggestions.push(annotation.label);
148
+ if (annotation && annotation.label) suggestions.push(annotation.label);
154
149
  });
155
150
  }
156
151
  },
@@ -159,26 +154,26 @@ export default {
159
154
  // GA Tagging
160
155
  // Event tracking for maps' pathway selection change
161
156
  Tagging.sendEvent({
162
- 'event': 'interaction_event',
163
- 'event_name': 'portal_maps_pathway_change',
164
- 'category': label + ' [' + property + '] ' + checked,
165
- 'location': selectionsTitle
157
+ event: 'interaction_event',
158
+ event_name: 'portal_maps_pathway_change',
159
+ category: label + ' [' + property + '] ' + checked,
160
+ location: selectionsTitle,
166
161
  });
167
162
  },
168
- onSidebarAnnotationClose: function() {
163
+ onSidebarAnnotationClose: function () {
169
164
  if (this.flatmapReady) {
170
165
  const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
171
- currentFlatmap.annotationEventCallback({}, { type: 'aborted' })
166
+ currentFlatmap.annotationEventCallback({}, { type: 'aborted' });
172
167
  }
173
168
  },
174
169
  onOpenPubmedUrl: function (url) {
175
170
  // GA Tagging
176
171
  // Event tracking for open pubmed url from popup
177
172
  Tagging.sendEvent({
178
- 'event': 'interaction_event',
179
- 'event_name': 'portal_maps_pubmed_url',
180
- 'file_path': url,
181
- 'location': 'map_popup_button',
173
+ event: 'interaction_event',
174
+ event_name: 'portal_maps_pubmed_url',
175
+ file_path: url,
176
+ location: 'map_popup_button',
182
177
  });
183
178
  },
184
179
  zoomToFeatures: function (info, forceSelect) {
@@ -198,21 +193,21 @@ export default {
198
193
  flatmap.clearSearchResults();
199
194
  }
200
195
  },
201
- updateProvCard: function() {
196
+ updateProvCard: function () {
202
197
  const imp = this.getFlatmapImp();
203
198
  if (imp) {
204
- let provClone = {id: this.entry.id, prov: imp.mapMetadata};
205
- EventBus.emit("mapImpProv", provClone);
206
- this.$emit("flatmap-provenance-ready", provClone);
199
+ let provClone = { id: this.entry.id, prov: imp.mapMetadata };
200
+ EventBus.emit('mapImpProv', provClone);
201
+ this.$emit('flatmap-provenance-ready', provClone);
207
202
  }
208
203
  },
209
- contextRestored: function(flatmap) {
204
+ contextRestored: function (flatmap) {
210
205
  if (flatmap) {
211
206
  this.flatmapMarkerUpdate(flatmap.mapImp);
212
207
  this.updateViewerSettings();
213
208
  if (this.speciesHasChanged) {
214
209
  this.speciesHasChanged = false;
215
- this.$emit("species-changed", this.activeSpecies);
210
+ this.$emit('species-changed', this.activeSpecies);
216
211
  }
217
212
  }
218
213
  },
@@ -228,7 +223,7 @@ export default {
228
223
  this.flatmapMarkerUpdate(flatmapImp);
229
224
  this.updateViewerSettings();
230
225
  this.speciesHasChanged = false;
231
- this.$emit("species-changed", activeSpecies);
226
+ this.$emit('species-changed', activeSpecies);
232
227
  } else {
233
228
  this.speciesHasChanged = true;
234
229
  }
@@ -236,9 +231,9 @@ export default {
236
231
  // GA Tagging
237
232
  // Event tracking for maps' species change
238
233
  Tagging.sendEvent({
239
- 'event': 'interaction_event',
240
- 'event_name': 'portal_maps_species_change',
241
- 'category': this.activeSpecies
234
+ event: 'interaction_event',
235
+ event_name: 'portal_maps_species_change',
236
+ category: this.activeSpecies,
242
237
  });
243
238
  },
244
239
  multiFlatmapReady: function (flatmap) {
@@ -251,13 +246,13 @@ export default {
251
246
  this.updateViewerSettings();
252
247
  // Wait for flatmap's connectivity to load before emitting mapLoaded
253
248
  this.loadConnectivityExplorerConfig(flatmap).then(() => {
254
- EventBus.emit("mapLoaded", flatmap);
249
+ EventBus.emit('mapLoaded', flatmap);
255
250
  });
256
251
  }
257
252
  },
258
253
  getFlatmapImp: function () {
259
- if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap) {
260
- return this.$refs.multiflatmap.getCurrentFlatmap()["mapImp"];
254
+ if (this.entry.type === 'MultiFlatmap' && this.flatmapReady && this.$refs.multiflatmap) {
255
+ return this.$refs.multiflatmap.getCurrentFlatmap()['mapImp'];
261
256
  } else {
262
257
  return undefined;
263
258
  }
@@ -266,17 +261,16 @@ export default {
266
261
  const flatmapImp = this.getFlatmapImp();
267
262
  let shownMarkers = flatmapImp.visibleMarkerAnatomicalIds();
268
263
  let returnedAction = {
269
- type: "Facets",
270
- label: "Unused",
271
- val: shownMarkers.map(marker => this.idNamePair[marker]),
264
+ type: 'Facets',
265
+ label: 'Unused',
266
+ val: shownMarkers.map((marker) => this.idNamePair[marker]),
272
267
  };
273
- EventBus.emit("PopoverActionClick", returnedAction);
268
+ EventBus.emit('PopoverActionClick', returnedAction);
274
269
  },
275
270
  flatmapIsReady() {
276
271
  return this.flatmapReady;
277
272
  },
278
273
  restoreFeaturedMarkers: function (flatmap) {
279
-
280
274
  this.settingsStore.resetFeaturedMarkerIdentifier();
281
275
  const markers = this.settingsStore.featuredMarkers;
282
276
  this.updateFeaturedMarkers(markers, flatmap);
@@ -286,8 +280,7 @@ export default {
286
280
  this.showStarInLegend = false; // will show if we have a featured marker
287
281
  for (let index = 0; index < markers.length; ++index) {
288
282
  if (markers[index]) {
289
- const markerIdentifier =
290
- this.settingsStore.featuredMarkerIdentifiers[index];
283
+ const markerIdentifier = this.settingsStore.featuredMarkerIdentifiers[index];
291
284
  if (!markerIdentifier) {
292
285
  // Add the featured marker to the legend if we have a featured marker
293
286
  const markerExists = this.addFeaturedMarker(markers[index], index, flatmap);
@@ -300,8 +293,7 @@ export default {
300
293
  },
301
294
  // addFeaturedMarker: add a featured marker to the map at the specified uberon location
302
295
  addFeaturedMarker: function (marker, index, flatmap) {
303
- const markerSpecies =
304
- this.settingsStore.featuredMarkerSpecies[index];
296
+ const markerSpecies = this.settingsStore.featuredMarkerSpecies[index];
305
297
  if (markerSpecies && !this.activeSpecies.startsWith(markerSpecies)) {
306
298
  return false;
307
299
  }
@@ -312,14 +304,14 @@ export default {
312
304
 
313
305
  if (flatmapImp) {
314
306
  // create the star marker
315
- let wrapperElement = document.createElement("div");
307
+ let wrapperElement = document.createElement('div');
316
308
  wrapperElement.innerHTML = YellowStar;
317
309
 
318
310
  // add it to the flatmap
319
311
  const markerIdentifier = flatmapImp.addMarker(marker, {
320
312
  element: wrapperElement,
321
- className: "highlight-marker",
322
- cluster: false
313
+ className: 'highlight-marker',
314
+ cluster: false,
323
315
  });
324
316
 
325
317
  // update the store with the marker identifier
@@ -445,7 +437,6 @@ export default {
445
437
 
446
438
  <!-- Add "scoped" attribute to limit CSS to this component only -->
447
439
  <style scoped lang="scss">
448
-
449
440
  .viewer-container {
450
441
  width: 100%;
451
442
  height: 100%;
@@ -470,7 +461,6 @@ export default {
470
461
  }
471
462
  }
472
463
  }
473
-
474
464
  </style>
475
465
 
476
466
  <style src="../../assets/mapicon-species-style.css"></style>
@@ -9,16 +9,15 @@
9
9
  </template>
10
10
 
11
11
  <script>
12
- /* eslint-disable no-alert, no-console */
13
- import { PlotVuer } from "@abi-software/plotvuer";
14
- import "@abi-software/plotvuer/dist/style.css";
15
- import ContentMixin from "../../mixins/ContentMixin";
12
+ import { PlotVuer } from '@abi-software/plotvuer';
13
+ import '@abi-software/plotvuer/dist/style.css';
14
+ import ContentMixin from '../../mixins/ContentMixin';
16
15
 
17
16
  export default {
18
- name: "Plot",
19
- mixins: [ ContentMixin ],
17
+ name: 'Plot',
18
+ mixins: [ContentMixin],
20
19
  components: {
21
20
  PlotVuer,
22
- }
21
+ },
23
22
  };
24
23
  </script>
@@ -38,7 +38,7 @@
38
38
  :showOpenMapButton="showOpenMapButton"
39
39
  :usageConfig="{
40
40
  showTubeLinesControls: false,
41
- tubeLines: (entry.discoverId === '307' || entry.discoverId === 307)
41
+ tubeLines: entry.discoverId === '307' || entry.discoverId === 307,
42
42
  }"
43
43
  />
44
44
 
@@ -54,20 +54,22 @@
54
54
  </template>
55
55
 
56
56
  <script>
57
- /* eslint-disable no-alert, no-console */
58
- import { markRaw } from "vue";
59
- import EventBus from "../EventBus";
60
- import ContentMixin from "../../mixins/ContentMixin";
57
+ import { markRaw } from 'vue';
58
+ import EventBus from '../EventBus';
59
+ import ContentMixin from '../../mixins/ContentMixin';
61
60
 
62
- import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
63
- import "@abi-software/scaffoldvuer/dist/style.css";
64
- import { HelpModeDialog } from '@abi-software/map-utilities'
65
- import '@abi-software/map-utilities/dist/style.css'
66
- import { getReferenceConnectivitiesFromStorage, getReferenceConnectivitiesByAPI } from "@abi-software/flatmapvuer/src/services/flatmapKnowledge.js";
61
+ import { ScaffoldVuer } from '@abi-software/scaffoldvuer';
62
+ import '@abi-software/scaffoldvuer/dist/style.css';
63
+ import { HelpModeDialog } from '@abi-software/map-utilities';
64
+ import '@abi-software/map-utilities/dist/style.css';
65
+ import {
66
+ getReferenceConnectivitiesFromStorage,
67
+ getReferenceConnectivitiesByAPI,
68
+ } from '@abi-software/flatmapvuer/src/services/flatmapKnowledge.js';
67
69
 
68
70
  export default {
69
- name: "Scaffold",
70
- mixins: [ ContentMixin ],
71
+ name: 'Scaffold',
72
+ mixins: [ContentMixin],
71
73
  components: {
72
74
  ScaffoldVuer,
73
75
  HelpModeDialog,
@@ -76,24 +78,28 @@ export default {
76
78
  showConnectivitiesByReference: async function (resource) {
77
79
  if (this.$refs.scaffold) {
78
80
  const flatmapKnowledge = sessionStorage.getItem('flatmap-knowledge');
79
- let featureIds = [];
81
+ let featureIds;
80
82
  if (flatmapKnowledge) {
81
83
  featureIds = await getReferenceConnectivitiesFromStorage(resource);
82
84
  } else {
83
- featureIds = await getReferenceConnectivitiesByAPI(this.flatmapService.mapImp, resource, this.flatmapService.flatmapQueries);
85
+ featureIds = await getReferenceConnectivitiesByAPI(
86
+ this.flatmapService.mapImp,
87
+ resource,
88
+ this.flatmapService.flatmapQueries,
89
+ );
84
90
  }
85
91
  const nerveLabels = [];
86
92
  for (const id of featureIds) {
87
- const knowledge = this.nervesKnowledge.find(k => k.id === id);
93
+ const knowledge = this.nervesKnowledge.find((k) => k.id === id);
88
94
  if (!knowledge) continue;
89
95
 
90
96
  const nerves = knowledge['nerve-label'];
91
97
  if (nerves) {
92
- const subNerves = nerves.flatMap(n => n.subNerves);
98
+ const subNerves = nerves.flatMap((n) => n.subNerves);
93
99
  nerveLabels.push(...subNerves);
94
100
  }
95
101
  }
96
- this.$refs.scaffold.changeHighlightedByName(nerveLabels, "", false);
102
+ this.$refs.scaffold.changeHighlightedByName(nerveLabels, '', false);
97
103
  }
98
104
  },
99
105
  setNerveGreyScale: function () {
@@ -115,7 +121,7 @@ export default {
115
121
  const processed = payload ? true : false;
116
122
  if (payload) {
117
123
  const ids = [];
118
- payload['OR'].forEach(orData => {
124
+ payload['OR'].forEach((orData) => {
119
125
  if ('AND' in orData) {
120
126
  if (orData['AND'].length >= 2 && 'models' in orData['AND'][1]) {
121
127
  ids.push(...orData['AND'][1]['models']);
@@ -125,7 +131,7 @@ export default {
125
131
  for (const id of ids) {
126
132
  const nerveKnowledge = this.nervesKnowledge.find((knowledge) => knowledge.id === id);
127
133
  if (nerveKnowledge) {
128
- const nerves = nerveKnowledge['nerve-label'].map(n => n.subNerves).flat(Infinity);
134
+ const nerves = nerveKnowledge['nerve-label'].map((n) => n.subNerves).flat(Infinity);
129
135
  names.push(...nerves);
130
136
  }
131
137
  }
@@ -134,12 +140,12 @@ export default {
134
140
  }
135
141
  },
136
142
  syncFilter: function (data) {
137
- if (this.$refs.scaffold?.viewingMode === "Neuron Connection") {
138
- this.filter = data.filter(f => f.facet?.toLowerCase() !== 'show all');
143
+ if (this.$refs.scaffold?.viewingMode === 'Neuron Connection') {
144
+ this.filter = data.filter((f) => f.facet?.toLowerCase() !== 'show all');
139
145
  }
140
146
  },
141
147
  scaffoldResourceSelected: async function (type, resource) {
142
- this.resourceSelected(type, resource, true)
148
+ this.resourceSelected(type, resource, true);
143
149
  // When we directly click on a nerve, there will only be only one resource selected.
144
150
  // Both EventBus.emit and getKnowledgeTooltip will trigger sidebar content update
145
151
  // Then setVisibilityFilter will be called to zoom to the clicked nerve.
@@ -147,7 +153,7 @@ export default {
147
153
  this.clickedObject = resource[0].data;
148
154
  if (this.clickedObject.isNerves || this.clickedObject.anatomicalId) {
149
155
  const label = this.clickedObject.id.toLowerCase();
150
- if (this.$refs.scaffold.viewingMode === "Neuron Connection") {
156
+ if (this.$refs.scaffold.viewingMode === 'Neuron Connection') {
151
157
  const connectionType = this.settingsStore.globalSettings.connectionType;
152
158
 
153
159
  // nerve click
@@ -172,7 +178,9 @@ export default {
172
178
  } else {
173
179
  // get filterOptions from store
174
180
  const filterOptions = this.connectivitiesStore.filterOptions[this.entry.resource];
175
- const filterOption = filterOptions.find((option) => option.key === `flatmap.connectivity.source.${connectionTypeKey}`);
181
+ const filterOption = filterOptions.find(
182
+ (option) => option.key === `flatmap.connectivity.source.${connectionTypeKey}`,
183
+ );
176
184
  let neuronFilter;
177
185
 
178
186
  filterOption?.children.forEach((child) => {
@@ -187,7 +195,10 @@ export default {
187
195
  });
188
196
 
189
197
  if (neuronFilter) {
190
- uberonTerm = neuronFilter.key.replace(`flatmap.connectivity.source.${connectionTypeKey}.`, '');
198
+ uberonTerm = neuronFilter.key.replace(
199
+ `flatmap.connectivity.source.${connectionTypeKey}.`,
200
+ '',
201
+ );
191
202
  this.filter.push({
192
203
  facet: uberonTerm,
193
204
  facetPropPath: `flatmap.connectivity.source.${connectionTypeKey}`,
@@ -198,13 +209,14 @@ export default {
198
209
  }
199
210
  }
200
211
 
201
- EventBus.emit("neuron-connection-feature-click", {
212
+ EventBus.emit('neuron-connection-feature-click', {
202
213
  filters: this.filter,
203
- search: this.filter.length ? '' : label
204
- })
205
- } else if (this.$refs.scaffold.viewingMode === "Exploration") {
206
- const nerveKnowledge = this.nervesKnowledge
207
- .filter(knowledge => JSON.stringify(knowledge['nerve-label']).includes(label));
214
+ search: this.filter.length ? '' : label,
215
+ });
216
+ } else if (this.$refs.scaffold.viewingMode === 'Exploration') {
217
+ const nerveKnowledge = this.nervesKnowledge.filter((knowledge) =>
218
+ JSON.stringify(knowledge['nerve-label']).includes(label),
219
+ );
208
220
  if (nerveKnowledge.length) {
209
221
  this.getKnowledgeTooltip({ data: nerveKnowledge, type: this.entry });
210
222
  }
@@ -215,14 +227,14 @@ export default {
215
227
  // if multiple resources selected is because of directly clicking on a nerve
216
228
  // enable picking again
217
229
  // otherwise, it is related to the explorer search
218
- if (this.$refs.scaffold.viewingMode === "Exploration") {
230
+ if (this.$refs.scaffold.viewingMode === 'Exploration') {
219
231
  if (this.clickedObject) {
220
232
  this.$refs.scaffold.$module.setIgnorePicking(false);
221
233
  }
222
234
  }
223
235
  } else {
224
236
  this.clickedObject = undefined;
225
- EventBus.emit("connectivity-info-close");
237
+ EventBus.emit('connectivity-info-close');
226
238
  }
227
239
  },
228
240
  onResize: function () {
@@ -248,37 +260,37 @@ export default {
248
260
  return this.$refs.scaffold.search(term, true);
249
261
  }
250
262
  },
251
- searchSuggestions: function(term, suggestions){
252
- if (term === "" || !this.$refs.scaffold) {
263
+ searchSuggestions: function (term, suggestions) {
264
+ if (term === '' || !this.$refs.scaffold) {
253
265
  return suggestions;
254
266
  }
255
267
  const items = this.$refs.scaffold.fetchSuggestions(term);
256
- items.forEach(item => {
268
+ items.forEach((item) => {
257
269
  if (item.suggestion) suggestions.push(item.suggestion);
258
270
  });
259
271
  },
260
272
  showConnectivityTooltips: function (payload) {
261
273
  if (this.$refs.scaffold) {
262
274
  if (payload.label) {
263
- this.$refs.scaffold.changeHighlightedByName([payload.label], "", false);
275
+ this.$refs.scaffold.changeHighlightedByName([payload.label], '', false);
264
276
  this.$refs.scaffold.showRegionTooltip(payload.label, false, false);
265
277
  } else {
266
278
  const nerves = payload.connectivityInfo['nerve-label'];
267
279
  if (nerves) {
268
- const nerveLabels = nerves.flatMap(n => n.subNerves);
269
- this.$refs.scaffold.changeHighlightedByName(nerveLabels, "", false);
280
+ const nerveLabels = nerves.flatMap((n) => n.subNerves);
281
+ this.$refs.scaffold.changeHighlightedByName(nerveLabels, '', false);
270
282
  }
271
283
  this.$refs.scaffold.hideRegionTooltip();
272
284
  }
273
285
  }
274
286
  },
275
- zoomToFeatures: function(info, forceSelect) {
287
+ zoomToFeatures: function (info, forceSelect) {
276
288
  if (this.$refs.scaffold) {
277
- let names = undefined;
289
+ let names;
278
290
  if (Array.isArray(info)) names = info;
279
- else names = [ info.name ];
291
+ else names = [info.name];
280
292
  if (forceSelect) {
281
- this.$refs.scaffold.changeActiveByName(names, "", false);
293
+ this.$refs.scaffold.changeActiveByName(names, '', false);
282
294
  }
283
295
  this.$refs.scaffold.viewRegion(names);
284
296
  }
@@ -296,7 +308,7 @@ export default {
296
308
  }
297
309
  }
298
310
  this.updateViewerSettings();
299
- EventBus.emit("mapLoaded", this.$refs.scaffold);
311
+ EventBus.emit('mapLoaded', this.$refs.scaffold);
300
312
  setTimeout(() => {
301
313
  this.setNerveGreyScale();
302
314
  }, 500);
@@ -312,13 +324,13 @@ export default {
312
324
  internalName: undefined,
313
325
  };
314
326
  if (resource && resource[0]) {
315
- if (resource[0].data?.id === undefined || resource[0].data?.id === "") {
327
+ if (resource[0].data?.id === undefined || resource[0].data?.id === '') {
316
328
  resource[0].data.id = resource[0].data?.group;
317
329
  }
318
330
  result.internalName = resource[0].data.id;
319
- result.eventType = "highlighted";
331
+ result.eventType = 'highlighted';
320
332
  }
321
- this.$emit("resource-selected", result);
333
+ this.$emit('resource-selected', result);
322
334
  },
323
335
  /**
324
336
  * Callback when the vuers emit a selected event.
@@ -327,14 +339,14 @@ export default {
327
339
  if (this.mouseHovered) {
328
340
  const result = {
329
341
  paneIndex: this.entry.id,
330
- eventType: "panZoom",
342
+ eventType: 'panZoom',
331
343
  payload: resource,
332
344
  type: type,
333
345
  };
334
- this.$emit("resource-selected", result);
346
+ this.$emit('resource-selected', result);
335
347
  }
336
348
  },
337
- updateWithViewUrl: function(viewUrl) {
349
+ updateWithViewUrl: function (viewUrl) {
338
350
  if (this.$refs.scaffold) {
339
351
  this.$refs.scaffold.updateViewURL(viewUrl);
340
352
  }
@@ -349,12 +361,8 @@ export default {
349
361
  },
350
362
  updateViewerSettings: function () {
351
363
  if (this.$refs.scaffold) {
352
- const {
353
- backgroundDisplay,
354
- organsDisplay,
355
- outlinesDisplay,
356
- viewingMode,
357
- } = this.settingsStore.globalSettings;
364
+ const { backgroundDisplay, organsDisplay, outlinesDisplay, viewingMode } =
365
+ this.settingsStore.globalSettings;
358
366
  this.$refs.scaffold.backgroundChangeCallback(backgroundDisplay);
359
367
  this.$refs.scaffold.changeViewingMode(viewingMode);
360
368
  this.$refs.scaffold.setColour(organsDisplay);
@@ -363,22 +371,24 @@ export default {
363
371
  },
364
372
  },
365
373
  computed: {
366
- warningMessage: function() {
367
- if ((this.entry.discoverId === '307' || this.entry.discoverId === 307)) {
368
- return "This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed.";
374
+ warningMessage: function () {
375
+ if (this.entry.discoverId === '307' || this.entry.discoverId === 307) {
376
+ return 'This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed.';
369
377
  } else {
370
- return "Under active development";
378
+ return 'Under active development';
371
379
  }
372
380
  },
373
381
  markerLabels: function () {
374
- return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
382
+ return this.settingsStore.globalSettings.displayMarkers
383
+ ? this.settingsStore.numberOfDatasetsForFacets
384
+ : {};
375
385
  },
376
386
  },
377
387
  watch: {
378
388
  visible: {
379
389
  handler(visible) {
380
390
  // Only activate scaffoldvuer when the pane becomes active
381
- if (visible && (!this.activated)) {
391
+ if (visible && !this.activated) {
382
392
  this.activated = true;
383
393
  this.$nextTick(() => {
384
394
  if (this.$refs.scaffold) {
@@ -397,7 +407,7 @@ export default {
397
407
  immediate: true,
398
408
  },
399
409
  connectivityKnowledge: {
400
- handler(newVal, oldVal) {
410
+ handler(newVal, _oldVal) {
401
411
  // Store scaffold knowledge locally
402
412
  if (this.entry.resource in newVal) {
403
413
  const scaffoldKnowledge = newVal[this.entry.resource];
@@ -1,29 +1,24 @@
1
1
  <template>
2
- <SimulationVuer
3
- :apiLocation="apiLocation"
4
- :id="id"
5
- ref="simulation"
6
- />
2
+ <SimulationVuer :apiLocation="apiLocation" :id="id" ref="simulation" />
7
3
  </template>
8
4
 
9
5
  <script>
10
- /* eslint-disable no-alert, no-console */
11
- import ContentMixin from "../../mixins/ContentMixin";
12
- import { SimulationVuer } from "@abi-software/simulationvuer";
13
- import "@abi-software/simulationvuer/dist/style.css";
6
+ import ContentMixin from '../../mixins/ContentMixin';
7
+ import { SimulationVuer } from '@abi-software/simulationvuer';
8
+ import '@abi-software/simulationvuer/dist/style.css';
14
9
 
15
10
  export default {
16
- name: "Simulation",
17
- mixins: [ ContentMixin ],
11
+ name: 'Simulation',
12
+ mixins: [ContentMixin],
18
13
  components: {
19
14
  SimulationVuer,
20
15
  },
21
16
  computed: {
22
- id: function() {
17
+ id: function () {
23
18
  //resource field is only available for simulation omex file and it will run locally.
24
19
  //discoverId field is used for simulations running on O2SPARC.
25
- return this.entry.resource ? this.entry.resource: this.entry.discoverId;
26
- }
27
- }
20
+ return this.entry.resource ? this.entry.resource : this.entry.discoverId;
21
+ },
22
+ },
28
23
  };
29
24
  </script>