@abi-software/mapintegratedvuer 1.17.3-simulation.2 → 1.17.4

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 (47) hide show
  1. package/dist/{ConnectivityGraph-9pXPgFJR.js → ConnectivityGraph-CNtSLKGZ.js} +19 -21
  2. package/dist/{ContentMixin-DIqgKIz6.js → ContentMixin-BImmmP1E.js} +521 -295
  3. package/dist/Flatmap-CakK_75H.js +202 -0
  4. package/dist/{Iframe-CCEA3d9c.js → Iframe-C7E9XJu7.js} +2 -2
  5. package/dist/{MultiFlatmap-Cuke1uNp.js → MultiFlatmap-DnDXuvTw.js} +3 -3
  6. package/dist/{Plot-B4oTBVAT.js → Plot-CxCj3uTj.js} +2 -2
  7. package/dist/Scaffold-D1NyLNzW.js +304 -0
  8. package/dist/Simulation-Br3Grrd6.js +28 -0
  9. package/dist/{index-_b4VBGHk.js → index-qyfmiqHe.js} +22862 -27602
  10. package/dist/mapintegratedvuer.js +1 -1
  11. package/dist/mapintegratedvuer.umd.cjs +232 -4291
  12. package/dist/style-DezYtA61.js +57 -0
  13. package/dist/style.css +1 -1
  14. package/package.json +5 -10
  15. package/src/App.vue +258 -285
  16. package/src/assets/styles.scss +1 -1
  17. package/src/components/ContextCard.vue +1 -0
  18. package/src/components/EventBus.js +3 -0
  19. package/src/components/MapContent.vue +4 -9
  20. package/src/components/SplitDialog.vue +6 -2
  21. package/src/components/SplitFlow.vue +445 -504
  22. package/src/components/scripts/utilities.js +1 -1
  23. package/src/components/viewers/ConnectivityGraph.vue +1 -9
  24. package/src/components/viewers/Flatmap.vue +83 -166
  25. package/src/components/viewers/Scaffold.vue +130 -78
  26. package/src/components/viewers/Simulation.vue +11 -118
  27. package/src/components.d.ts +0 -3
  28. package/src/main.js +3 -9
  29. package/src/mixins/ContentMixin.js +384 -496
  30. package/src/mixins/DynamicMarkerMixin.js +17 -50
  31. package/src/stores/connectivities.js +10 -1
  32. package/src/stores/entries.js +1 -1
  33. package/src/stores/settings.js +0 -4
  34. package/src/stores/splitFlow.js +352 -425
  35. package/dist/Flatmap-D7GVPV7o.js +0 -103422
  36. package/dist/Scaffold-Czz8X5kL.js +0 -310
  37. package/dist/Simulation-BKmz8zwm.js +0 -107
  38. package/dist/style-CM86xE3J.js +0 -119
  39. package/src/components/DummyRouteComponent.vue +0 -1
  40. package/src/components/EventBus.ts +0 -13
  41. package/src/components/FloatingWindow.vue +0 -142
  42. package/src/components/PlotComponent.vue +0 -56
  43. package/src/services/mapping.js +0 -69
  44. package/src/services/testData.js +0 -71
  45. package/src/stores/mapping.js +0 -29
  46. package/src/stores/simulationPlotStore.js +0 -124
  47. package/src/types/simulation.js +0 -18
@@ -1,8 +1,6 @@
1
1
 
2
2
  import { mapStores } from 'pinia';
3
3
  import { useSettingsStore } from '../stores/settings';
4
- import { retrieveProtocolData } from '../services/testData.js';
5
- import { markRaw } from 'vue'
6
4
 
7
5
  // remove duplicates by stringifying the objects
8
6
  const removeDuplicates = function (arrayOfAnything) {
@@ -11,18 +9,12 @@ const removeDuplicates = function (arrayOfAnything) {
11
9
  JSON.parse(e)
12
10
  )
13
11
  }
14
-
12
+
15
13
  /* eslint-disable no-alert, no-console */
16
14
  export default {
17
15
  computed: {
18
16
  ...mapStores(useSettingsStore),
19
17
  },
20
- data: function () {
21
- return {
22
- protocolData: undefined,
23
- markerToUberonID: {},
24
- }
25
- },
26
18
  methods: {
27
19
  flatmapPanZoomCallback: function (payload) {
28
20
  if (this.mouseHovered) {
@@ -41,23 +33,22 @@ export default {
41
33
  */
42
34
  flatmapMarkerUpdate(flatmap) {
43
35
  if (!this.flatmapReady) return;
44
- if (!this.protocolData) {
45
- let flatmapImp = flatmap;
46
- if (!flatmapImp)
47
- flatmapImp = this.getFlatmapImp();
48
36
 
49
- if (flatmapImp) {
50
- // Set the dataset markers
51
- let markers = this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.markers : [];
52
- markers = removeDuplicates(markers);
53
- flatmapImp.clearMarkers();
54
- flatmapImp.clearDatasetMarkers();
55
- flatmapImp.addDatasetMarkers(markers);
37
+ let flatmapImp = flatmap;
38
+ if (!flatmapImp)
39
+ flatmapImp = this.getFlatmapImp();
56
40
 
57
- // Set the featured markers
58
- if (this.entry.type === "MultiFlatmap") {
59
- this.restoreFeaturedMarkers(flatmapImp);
60
- }
41
+ if (flatmapImp) {
42
+ // Set the dataset markers
43
+ let markers = this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.markers : [];
44
+ markers = removeDuplicates(markers);
45
+ flatmapImp.clearMarkers();
46
+ flatmapImp.clearDatasetMarkers();
47
+ flatmapImp.addDatasetMarkers(markers);
48
+
49
+ // Set the featured markers
50
+ if (this.entry.type === "MultiFlatmap") {
51
+ this.restoreFeaturedMarkers(flatmapImp);
61
52
  }
62
53
  }
63
54
  },
@@ -81,36 +72,12 @@ export default {
81
72
  }
82
73
  return markersOnFlatmap;
83
74
  },
84
- updateProtocolMarkers: function (flatmapImp, ids) {
85
- flatmapImp.clearMarkers()
86
- if (ids.length > 0) {
87
- ids.forEach((id) => {
88
- const terms = flatmapImp.sparqlQuery(`
89
- prefix bgf: <https://bg-rdf.org/ontologies/bondgraph-framework#>
90
- prefix UBERON: <http://purl.obolibrary.org/obo/UBERON_>
91
- select ?featureUri where {
92
- ?featureUri bgf:hasLocation ?region
93
- filter (?region in (${id}))
94
- }`)
95
- const result = terms[0]
96
- const featureUri = result.get('featureUri').value
97
- const fID = flatmapImp.addMarkerByFeatureUri(featureUri)
98
- this.markerToUberonID[fID] = id
99
- })
100
- }
101
- },
102
- flatmapReadyForMarkerUpdates: async function (flatmap) {
75
+ flatmapReadyForMarkerUpdates: function (flatmap) {
103
76
  if (flatmap) {
104
77
  flatmap.enablePanZoomEvents(true); // Use zoom events for dynamic markers
105
78
  this.flatmapReady = true;
106
79
  const flatmapImp = flatmap.mapImp;
107
- if (flatmapImp) {
108
- const flatmapUUID = flatmapImp.mapMetadata.uuid;
109
- this.protocolData = markRaw(await retrieveProtocolData(this.settingsStore.testDataLocation, flatmapUUID));
110
- if (!this.protocolData) {
111
- this.flatmapMarkerUpdate(flatmapImp);
112
- }
113
- }
80
+ this.flatmapMarkerUpdate(flatmapImp);
114
81
  }
115
82
  },
116
83
  }
@@ -8,6 +8,7 @@ export const useConnectivitiesStore = defineStore('connectivities', {
8
8
  globalConnectivities: {},
9
9
  filterOptions: {},
10
10
  filterSources: {},
11
+ connectivitiesUpdated: true,
11
12
  };
12
13
  },
13
14
  getters: {
@@ -74,11 +75,19 @@ export const useConnectivitiesStore = defineStore('connectivities', {
74
75
  if (!listsAreEqual(this.activeConnectivityKeys, activeConnectivityKeys)) {
75
76
  this.activeConnectivityKeys = activeConnectivityKeys;
76
77
  return true;
78
+ } else if (this.connectivitiesUpdated) {
79
+ this.connectivitiesUpdated = !activeConnectivityKeys.every(ele => ele in this.globalConnectivities);
80
+ return true;
77
81
  }
78
82
  return false;
79
83
  },
80
84
  updateGlobalConnectivities(globalConnectivities) {
81
- this.globalConnectivities = globalConnectivities;
85
+ if (globalConnectivities) {
86
+ if (JSON.stringify(globalConnectivities) !== JSON.stringify(this.globalConnectivities)) {
87
+ this.globalConnectivities = globalConnectivities;
88
+ this.connectivitiesUpdated = true;
89
+ }
90
+ }
82
91
  },
83
92
  updateFilterOptions(filterOptions) {
84
93
  this.filterOptions = filterOptions;
@@ -1,6 +1,6 @@
1
1
  import { defineStore } from 'pinia';
2
2
  import { initialDefaultState } from "../components/scripts/utilities";
3
- import { getKnowledgeSourceFromProvenance } from '@abi-software/flatmapvuer';
3
+ import { getKnowledgeSourceFromProvenance } from '@abi-software/flatmapvuer/src/services/flatmapKnowledge.js';
4
4
 
5
5
  /* eslint-disable no-alert, no-console */
6
6
 
@@ -14,7 +14,6 @@ export const useSettingsStore = defineStore('settings', {
14
14
  flatmapAPI: undefined,
15
15
  mapManager: undefined,
16
16
  rootUrl: undefined,
17
- testDataLocation: undefined,
18
17
  facets: { species: [], gender: [], organ: [] },
19
18
  appliedFacets: [],
20
19
  numberOfDatasetsForFacets: [],
@@ -117,9 +116,6 @@ export const useSettingsStore = defineStore('settings', {
117
116
  updateRootUrl(rootUrl) {
118
117
  this.rootUrl = rootUrl;
119
118
  },
120
- updateTestDataLocation(testDataLocation) {
121
- this.testDataLocation = testDataLocation;
122
- },
123
119
  updateMarkers(markers) {
124
120
  this.markers = markers;
125
121
  },