@abi-software/mapintegratedvuer 1.17.2 → 1.17.3-simulation.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{ConnectivityGraph-BL4B9GZX.js → ConnectivityGraph-9pXPgFJR.js} +2 -2
  2. package/dist/{ContentMixin-Djmb_gqk.js → ContentMixin-DIqgKIz6.js} +279 -536
  3. package/dist/Flatmap-D7GVPV7o.js +103422 -0
  4. package/dist/{Iframe-ByYxT4Yq.js → Iframe-CCEA3d9c.js} +2 -2
  5. package/dist/{MultiFlatmap-DSkdlRiS.js → MultiFlatmap-Cuke1uNp.js} +3 -3
  6. package/dist/{Plot-ymkHVq_A.js → Plot-B4oTBVAT.js} +2 -2
  7. package/dist/{Scaffold-bw7posKm.js → Scaffold-Czz8X5kL.js} +79 -53
  8. package/dist/Simulation-BKmz8zwm.js +107 -0
  9. package/dist/{index-CwfUgFL1.js → index-_b4VBGHk.js} +30002 -25408
  10. package/dist/mapintegratedvuer.js +1 -1
  11. package/dist/mapintegratedvuer.umd.cjs +4291 -229
  12. package/dist/style-CM86xE3J.js +119 -0
  13. package/dist/style.css +1 -1
  14. package/package.json +10 -5
  15. package/src/App.vue +285 -258
  16. package/src/assets/styles.scss +1 -1
  17. package/src/components/ContextCard.vue +0 -1
  18. package/src/components/DummyRouteComponent.vue +1 -0
  19. package/src/components/EventBus.ts +13 -0
  20. package/src/components/FloatingWindow.vue +142 -0
  21. package/src/components/MapContent.vue +9 -4
  22. package/src/components/PlotComponent.vue +56 -0
  23. package/src/components/SplitDialog.vue +1 -6
  24. package/src/components/SplitFlow.vue +504 -444
  25. package/src/components/scripts/utilities.js +1 -1
  26. package/src/components/viewers/Flatmap.vue +166 -83
  27. package/src/components/viewers/Simulation.vue +118 -11
  28. package/src/components.d.ts +3 -0
  29. package/src/main.js +9 -3
  30. package/src/mixins/ContentMixin.js +467 -406
  31. package/src/mixins/DynamicMarkerMixin.js +50 -17
  32. package/src/services/mapping.js +69 -0
  33. package/src/services/testData.js +71 -0
  34. package/src/stores/entries.js +1 -1
  35. package/src/stores/mapping.js +29 -0
  36. package/src/stores/settings.js +4 -0
  37. package/src/stores/simulationPlotStore.js +124 -0
  38. package/src/stores/splitFlow.js +425 -352
  39. package/src/types/simulation.js +18 -0
  40. package/dist/Flatmap-uPEQNDkK.js +0 -202
  41. package/dist/Simulation-C_gdqDes.js +0 -28
  42. package/dist/style-Czqe2bTf.js +0 -57
  43. package/src/components/EventBus.js +0 -3
@@ -0,0 +1,18 @@
1
+ export const SIMULATION_REQUEST_ID = 'nz.ac.auckland.simulation-data-request'
2
+ export const SIMULATION_REQUEST_VERSION = '0.1.0'
3
+
4
+ // export type RequestId = typeof SIMULATION_REQUEST_ID
5
+
6
+ // // Definition of the request.
7
+ // export interface SimulationRequest {
8
+ // id: RequestId
9
+ // component: string // e.g., 'main'
10
+ // variable: string // e.g., 'v_W_GI'
11
+ // version: string // e.g., '0.1.0'
12
+ // identifier: string // e.g., 'bvc/ID-0000040'
13
+ // }
14
+
15
+ // // Definition of the response.
16
+ // export interface SimulationResponse {
17
+ // [variableName: string]: number[] | Float32Array
18
+ // }
@@ -1,202 +0,0 @@
1
- import { _ as d, z as c, T as h, E as l } from "./index-CwfUgFL1.js";
2
- import { C as u } from "./ContentMixin-Djmb_gqk.js";
3
- import { D as y } from "./style-Czqe2bTf.js";
4
- import { FlatmapVuer as g } from "@abi-software/flatmapvuer";
5
- import { resolveComponent as r, openBlock as p, createElementBlock as M, createVNode as C, createBlock as v, createCommentVNode as I } from "vue";
6
- const S = {
7
- name: "Flatmap",
8
- mixins: [u, y],
9
- components: {
10
- FlatmapVuer: g,
11
- HelpModeDialog: c
12
- },
13
- data: function() {
14
- return {
15
- flatmapReady: !1,
16
- displayMinimap: !1
17
- };
18
- },
19
- methods: {
20
- getState: function() {
21
- return this.$refs.flatmap.getState();
22
- },
23
- /**
24
- * Perform a local search on this contentvuer
25
- * This is similar to directly clicking onthe map
26
- */
27
- search: function(e) {
28
- return this.$refs.flatmap.searchAndShowResult(e, !0, !0);
29
- },
30
- getFlatmapImp() {
31
- var e;
32
- return (e = this.$refs.flatmap) == null ? void 0 : e.mapImp;
33
- },
34
- contextRestored(e) {
35
- this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings();
36
- },
37
- flatmapReadyCall: function(e) {
38
- var n, i, o;
39
- this.flatmapReady = !0;
40
- const t = this.getFlatmapImp();
41
- (n = t == null ? void 0 : t.mapMetadata) != null && n.name && (this.updateEntryLabel((i = t == null ? void 0 : t.mapMetadata) == null ? void 0 : i.name), this.updateEntryTitle((o = t == null ? void 0 : t.mapMetadata) == null ? void 0 : o.name));
42
- let a = { id: this.entry.id, prov: t.mapMetadata };
43
- l.emit("mapImpProv", a), this.$emit("flatmap-provenance-ready", a), this.flatmapReadyForMarkerUpdates(e), this.updateViewerSettings(), this.loadConnectivityExplorerConfig(e).then(() => {
44
- l.emit("mapLoaded", e);
45
- });
46
- },
47
- onPathwaySelectionChanged: function(e) {
48
- const { label: t, property: a, checked: n, selectionsTitle: i } = e;
49
- h.sendEvent({
50
- event: "interaction_event",
51
- event_name: "portal_maps_pathway_change",
52
- category: t + " [" + a + "] " + n,
53
- location: i
54
- });
55
- },
56
- onSidebarAnnotationClose: function() {
57
- this.flatmapReady && this.$refs.flatmap && this.$refs.flatmap.annotationEventCallback({}, { type: "aborted" });
58
- },
59
- /**
60
- * Append the list of suggested terms to suggestions
61
- */
62
- searchSuggestions: function(e, t) {
63
- if (e && this.$refs.flatmap.mapImp) {
64
- const a = this.$refs.flatmap.mapImp.search(e);
65
- (a.__featureIds || a.featureIds).forEach((i) => {
66
- const o = this.$refs.flatmap.mapImp.annotation(i);
67
- o && o.label && t.push(o.label);
68
- });
69
- }
70
- },
71
- showConnectivity: function(e) {
72
- if (this != null && this.alive) {
73
- const { featureIds: t, offset: a } = e, n = this.$refs.flatmap;
74
- n && n.moveMap(t, {
75
- offsetX: a ? -150 : 0,
76
- zoom: 4
77
- });
78
- }
79
- },
80
- showConnectivityTooltips: function(e) {
81
- this != null && this.alive && this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e);
82
- },
83
- showConnectivitiesByReference: function(e) {
84
- if (this != null && this.alive) {
85
- const t = this.$refs.flatmap;
86
- t && t.showConnectivitiesByReference(e);
87
- }
88
- },
89
- changeConnectivitySource: function(e, t) {
90
- if (this != null && this.alive && this.flatmapReady) {
91
- const a = this.$refs.flatmap, n = a.mapImp.mapMetadata.uuid;
92
- t.includes(n) || (t.push(n), a.changeConnectivitySource(e));
93
- }
94
- },
95
- zoomToFeatures: function(e, t) {
96
- let a = e.name;
97
- const n = this.$refs.flatmap.mapImp;
98
- if (a) {
99
- const i = n.search(a);
100
- if (i.featureIds.length) {
101
- let o = n.modelForFeature(i.featureIds[0]);
102
- o ? (t && n.selectFeatures(o), n.zoomToFeatures(o)) : n.clearSearchResults();
103
- }
104
- } else
105
- n.clearSearchResults();
106
- },
107
- changeViewingMode: function(e) {
108
- this.$refs.flatmap.changeViewingMode(e);
109
- },
110
- updateViewerSettings: function() {
111
- const {
112
- backgroundDisplay: e,
113
- viewingMode: t,
114
- flightPathDisplay: a,
115
- organsDisplay: n,
116
- outlinesDisplay: i,
117
- connectionType: o
118
- } = this.settingsStore.globalSettings, s = this.$refs.flatmap;
119
- s.changeViewingMode(t), s.setFlightPath3D(a), s.setColour(n), s.setOutlines(i), s.backgroundChangeCallback(e), s.setConnectionType(o);
120
- },
121
- setVisibilityFilter: function(e) {
122
- if (this != null && this.alive) {
123
- const t = this.$refs.flatmap;
124
- t && t.setVisibilityFilter(e);
125
- }
126
- },
127
- getKnowledgeTooltip: async function(e) {
128
- if (this != null && this.alive) {
129
- const t = this.$refs.flatmap;
130
- if (t) {
131
- const a = e.data[0];
132
- t.searchAndShowResult(a.id, !0, !1);
133
- }
134
- }
135
- }
136
- },
137
- computed: {
138
- facetSpecies() {
139
- return this.settingsStore.facets.species;
140
- }
141
- }
142
- }, w = { class: "viewer-container" };
143
- function F(e, t, a, n, i, o) {
144
- const s = r("FlatmapVuer"), f = r("HelpModeDialog");
145
- return p(), M("div", w, [
146
- C(s, {
147
- state: e.entry.state,
148
- entry: e.entry.resource,
149
- mapManager: e.mapManager,
150
- onResourceSelected: t[0] || (t[0] = (m) => e.flatmapResourceSelected(e.entry.type, m)),
151
- onPanZoomCallback: e.flatmapPanZoomCallback,
152
- name: e.entry.resource,
153
- style: { height: "100%", width: "100%" },
154
- minZoom: e.entry.minZoom,
155
- helpMode: e.helpMode,
156
- helpModeActiveItem: e.helpModeActiveItem,
157
- helpModeInitialIndex: -1,
158
- helpModeDialog: e.useHelpModeDialog,
159
- onHelpModeLastItem: e.onHelpModeLastItem,
160
- onShownTooltip: e.onTooltipShown,
161
- onShownMapTooltip: e.onMapTooltipShown,
162
- onAnnotationOpen: e.onAnnotationOpen,
163
- onAnnotationClose: e.onAnnotationClose,
164
- onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
165
- annotationSidebar: e.annotationSidebar,
166
- onConnectivityInfoOpen: e.onConnectivityInfoOpen,
167
- onConnectivityError: e.onConnectivityError,
168
- onConnectivityInfoClose: e.onConnectivityInfoClose,
169
- onNeuronConnectionFeatureClick: e.onNeuronConnectionFeatureClick,
170
- connectivityInfoSidebar: e.connectivityInfoSidebar,
171
- pathControls: !0,
172
- ref: "flatmap",
173
- onContextRestored: o.contextRestored,
174
- onReady: o.flatmapReadyCall,
175
- displayMinimap: e.displayMinimap,
176
- displayWarning: !0,
177
- enableOpenMapUI: !0,
178
- flatmapAPI: e.flatmapAPI,
179
- render: e.visible,
180
- sparcAPI: e.apiLocation,
181
- showLocalSettings: e.showLocalSettings,
182
- showOpenMapButton: e.showOpenMapButton,
183
- onOpenMap: e.openMap,
184
- onPathwaySelectionChanged: o.onPathwaySelectionChanged,
185
- onMapmanagerLoaded: e.onMapmanagerLoaded,
186
- showPathwayFilter: !1,
187
- onTrackEvent: e.trackEvent
188
- }, null, 8, ["state", "entry", "mapManager", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityError", "onConnectivityInfoClose", "onNeuronConnectionFeatureClick", "connectivityInfoSidebar", "onContextRestored", "onReady", "displayMinimap", "flatmapAPI", "render", "sparcAPI", "showLocalSettings", "showOpenMapButton", "onOpenMap", "onPathwaySelectionChanged", "onMapmanagerLoaded", "onTrackEvent"]),
189
- e.helpMode && e.useHelpModeDialog ? (p(), v(f, {
190
- key: 0,
191
- ref: "flatmapHelp",
192
- flatmapRef: e.flatmapRef,
193
- lastItem: e.helpModeLastItem,
194
- onShowNext: e.onHelpModeShowNext,
195
- onFinishHelpMode: e.onFinishHelpMode
196
- }, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : I("", !0)
197
- ]);
198
- }
199
- const $ = /* @__PURE__ */ d(S, [["render", F], ["__scopeId", "data-v-a87dcfac"]]);
200
- export {
201
- $ as default
202
- };
@@ -1,28 +0,0 @@
1
- import { C as n } from "./ContentMixin-Djmb_gqk.js";
2
- import { SimulationVuer as e } from "@abi-software/simulationvuer";
3
- import { resolveComponent as r, openBlock as a, createBlock as c } from "vue";
4
- import { _ as m } from "./index-CwfUgFL1.js";
5
- const s = {
6
- name: "Simulation",
7
- mixins: [n],
8
- components: {
9
- SimulationVuer: e
10
- },
11
- computed: {
12
- id: function() {
13
- return this.entry.resource ? this.entry.resource : this.entry.discoverId;
14
- }
15
- }
16
- };
17
- function u(o, p, l, d, f, t) {
18
- const i = r("SimulationVuer");
19
- return a(), c(i, {
20
- apiLocation: o.apiLocation,
21
- id: t.id,
22
- ref: "simulation"
23
- }, null, 8, ["apiLocation", "id"]);
24
- }
25
- const y = /* @__PURE__ */ m(s, [["render", u]]);
26
- export {
27
- y as default
28
- };
@@ -1,57 +0,0 @@
1
- import { mapStores as o } from "pinia";
2
- import { u as p } from "./index-CwfUgFL1.js";
3
- const l = function(t) {
4
- return t ? [...new Set(t.map((e) => JSON.stringify(e)))].map(
5
- (e) => JSON.parse(e)
6
- ) : [];
7
- }, u = {
8
- computed: {
9
- ...o(p)
10
- },
11
- methods: {
12
- flatmapPanZoomCallback: function(t) {
13
- if (this.mouseHovered) {
14
- const e = {
15
- paneIndex: this.entry.id,
16
- eventType: "panZoom",
17
- payload: t,
18
- type: this.entry.type
19
- };
20
- this.$emit("resource-selected", e);
21
- }
22
- },
23
- /**
24
- * Function used for updating the flatmap markers.
25
- * We set the markers based on what was searched and the flatmap clusters them.
26
- */
27
- flatmapMarkerUpdate(t) {
28
- if (!this.flatmapReady) return;
29
- let e = t;
30
- if (e || (e = this.getFlatmapImp()), e) {
31
- let a = this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.markers : [];
32
- a = l(a), e.clearMarkers(), e.clearDatasetMarkers(), e.addDatasetMarkers(a), this.entry.type === "MultiFlatmap" && this.restoreFeaturedMarkers(e);
33
- }
34
- },
35
- // removeMarkersNotOnFlatmap: rewrites the dataset marker list to only include markers that are on the flatmap
36
- removeMarkersNotOnFlatmap(t, e) {
37
- let a = t.anatomicalIdentifiers, m = [];
38
- for (let i = 0; i < e.length; i++) {
39
- let r = e[i], n = { id: r.id, terms: [] };
40
- for (let s = 0; s < r.terms.length; s++)
41
- a.includes(r.terms[s]) && n.terms.push(r.terms[s]);
42
- m.push(n);
43
- }
44
- return m;
45
- },
46
- flatmapReadyForMarkerUpdates: function(t) {
47
- if (t) {
48
- t.enablePanZoomEvents(!0), this.flatmapReady = !0;
49
- const e = t.mapImp;
50
- this.flatmapMarkerUpdate(e);
51
- }
52
- }
53
- }
54
- };
55
- export {
56
- u as D
57
- };
@@ -1,3 +0,0 @@
1
- import mitt from 'mitt';
2
- const EventBus = new mitt();
3
- export default EventBus;