@abi-software/mapintegratedvuer 1.16.2 → 1.16.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 (41) hide show
  1. package/dist/{ContentMixin-DiDiS2Ct.js → ContentMixin-CN4E1Tcm.js} +224 -455
  2. package/dist/{style-t77Cw_0W.js → DynamicMarkerMixin-ToiTtIcj.js} +1 -1
  3. package/dist/Flatmap-D7eEw_Q5.js +103398 -0
  4. package/dist/{Iframe-Drf0INka.js → Iframe-NY9zAQZz.js} +2 -2
  5. package/dist/{MultiFlatmap-ZODnXOPU.js → MultiFlatmap-C8gAg-MI.js} +15 -15
  6. package/dist/{Plot-DrEUpK5N.js → Plot-DH_Px9IB.js} +2 -2
  7. package/dist/{Scaffold-BiDz1Mwi.js → Scaffold-C6XY3IQb.js} +79 -53
  8. package/dist/Simulation-Bb3HbeD4.js +72 -0
  9. package/dist/{index-C753e18_.js → index-DaB85Tpy.js} +19768 -20046
  10. package/dist/mapintegratedvuer.js +1 -1
  11. package/dist/mapintegratedvuer.umd.cjs +4271 -231
  12. package/dist/style.css +1 -1
  13. package/package.json +9 -4
  14. package/src/App.vue +283 -260
  15. package/src/assets/styles.scss +1 -1
  16. package/src/components/ContentBar.vue +0 -1
  17. package/src/components/ContentVuer.vue +0 -2
  18. package/src/components/ContextCard.vue +0 -1
  19. package/src/components/DummyRouteComponent.vue +1 -0
  20. package/src/components/EventBus.ts +13 -0
  21. package/src/components/FloatingWindow.vue +125 -0
  22. package/src/components/MapContent.vue +8 -5
  23. package/src/components/PlotComponent.vue +56 -0
  24. package/src/components/SplitFlow.vue +470 -439
  25. package/src/components/scripts/utilities.js +1 -1
  26. package/src/components/viewers/Flatmap.vue +136 -84
  27. package/src/components/viewers/MultiFlatmap.vue +1 -1
  28. package/src/components/viewers/Simulation.vue +66 -15
  29. package/src/components.d.ts +3 -0
  30. package/src/main.js +9 -3
  31. package/src/mixins/ContentMixin.js +419 -390
  32. package/src/services/mapping.js +69 -0
  33. package/src/stores/entries.js +1 -1
  34. package/src/stores/mapping.js +29 -0
  35. package/src/stores/settings.js +0 -4
  36. package/src/stores/simulationPlotStore.js +104 -0
  37. package/src/stores/splitFlow.js +427 -362
  38. package/src/types/simulation.js +18 -0
  39. package/dist/Flatmap-Dh0ybLSL.js +0 -202
  40. package/dist/Simulation-lEXXSWRc.js +0 -28
  41. 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, q as c, E as l, T as h } from "./index-C753e18_.js";
2
- import { C as u } from "./ContentMixin-DiDiS2Ct.js";
3
- import { D as y } from "./style-t77Cw_0W.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-DiDiS2Ct.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-C753e18_.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,3 +0,0 @@
1
- import mitt from 'mitt';
2
- const EventBus = new mitt();
3
- export default EventBus;