@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
@@ -0,0 +1,202 @@
1
+ import { _ as d, z as c, T as h, E as l } from "./index-qyfmiqHe.js";
2
+ import { C as u } from "./ContentMixin-BImmmP1E.js";
3
+ import { D as y } from "./style-DezYtA61.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,6 +1,6 @@
1
- import { C as r } from "./ContentMixin-DIqgKIz6.js";
1
+ import { C as r } from "./ContentMixin-BImmmP1E.js";
2
2
  import { openBlock as o, createElementBlock as t, createElementVNode as a } from "vue";
3
- import { _ as s } from "./index-_b4VBGHk.js";
3
+ import { _ as s } from "./index-qyfmiqHe.js";
4
4
  const n = {
5
5
  name: "Iframe",
6
6
  mixins: [r]
@@ -1,6 +1,6 @@
1
- import { _ as c, z as h, E as r, T as l, b as g } from "./index-_b4VBGHk.js";
2
- import { C as M } from "./ContentMixin-DIqgKIz6.js";
3
- import { D as y } from "./style-CM86xE3J.js";
1
+ import { _ as c, z as h, E as r, T as l, a as g } from "./index-qyfmiqHe.js";
2
+ import { C as M } from "./ContentMixin-BImmmP1E.js";
3
+ import { D as y } from "./style-DezYtA61.js";
4
4
  import { MultiFlatmapVuer as C } from "@abi-software/flatmapvuer";
5
5
  import { resolveComponent as p, openBlock as m, createElementBlock as v, createVNode as I, createBlock as S, createCommentVNode as F } from "vue";
6
6
  const w = '<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,7 +1,7 @@
1
1
  import { PlotVuer as o } from "@abi-software/plotvuer";
2
- import { C as r } from "./ContentMixin-DIqgKIz6.js";
2
+ import { C as r } from "./ContentMixin-BImmmP1E.js";
3
3
  import { resolveComponent as a, openBlock as n, createBlock as s } from "vue";
4
- import { _ as p } from "./index-_b4VBGHk.js";
4
+ import { _ as p } from "./index-qyfmiqHe.js";
5
5
  const l = {
6
6
  name: "Plot",
7
7
  mixins: [r],
@@ -0,0 +1,304 @@
1
+ import { resolveComponent as g, openBlock as c, createElementBlock as y, createBlock as m, createCommentVNode as v, markRaw as d } from "vue";
2
+ import { _ as w, z as b, E as h, g as S, b as $ } from "./index-qyfmiqHe.js";
3
+ import { C as M } from "./ContentMixin-BImmmP1E.js";
4
+ import { ScaffoldVuer as C } from "@abi-software/scaffoldvuer";
5
+ const O = {
6
+ name: "Scaffold",
7
+ mixins: [M],
8
+ components: {
9
+ ScaffoldVuer: C,
10
+ HelpModeDialog: b
11
+ },
12
+ methods: {
13
+ showConnectivitiesByReference: async function(e) {
14
+ if (this.$refs.scaffold) {
15
+ const t = sessionStorage.getItem("flatmap-knowledge");
16
+ let i = [];
17
+ t ? i = await S(e) : i = await $(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
18
+ const s = [];
19
+ for (const o of i) {
20
+ const n = this.nervesKnowledge.find((f) => f.id === o);
21
+ if (!n) continue;
22
+ const l = n["nerve-label"];
23
+ if (l) {
24
+ const f = l.flatMap((a) => a.subNerves);
25
+ s.push(...f);
26
+ }
27
+ }
28
+ this.$refs.scaffold.changeHighlightedByName(s, "", !1);
29
+ }
30
+ },
31
+ setNerveGreyScale: function() {
32
+ if (this.$refs.scaffold && this.nervesKnowledge.length) {
33
+ const t = this.nervesKnowledge.reduce((i, s) => i.concat(s["nerve-label"] || []), []).reduce((i, s) => i.concat(s.subNerves || []), []);
34
+ this.$refs.scaffold.setGreyScale(!0, t);
35
+ }
36
+ },
37
+ setVisibilityFilter: function(e) {
38
+ if (this.$refs.scaffold) {
39
+ let t = [];
40
+ const i = !!e;
41
+ if (e) {
42
+ const s = [];
43
+ e.OR.forEach((o) => {
44
+ "AND" in o && o.AND.length >= 2 && "models" in o.AND[1] && s.push(...o.AND[1].models);
45
+ });
46
+ for (const o of s) {
47
+ const n = this.nervesKnowledge.find((l) => l.id === o);
48
+ if (n) {
49
+ const l = n["nerve-label"].map((f) => f.subNerves).flat(1 / 0);
50
+ t.push(...l);
51
+ }
52
+ }
53
+ }
54
+ this.$refs.scaffold.zoomToNerves(t, i);
55
+ }
56
+ },
57
+ syncFilter: function(e) {
58
+ var t;
59
+ ((t = this.$refs.scaffold) == null ? void 0 : t.viewingMode) === "Neuron Connection" && (this.filter = e.filter((i) => {
60
+ var s;
61
+ return ((s = i.facet) == null ? void 0 : s.toLowerCase()) !== "show all";
62
+ }));
63
+ },
64
+ scaffoldResourceSelected: async function(e, t) {
65
+ if (this.resourceSelected(e, t, !0), t.length === 1) {
66
+ if (this.clickedObject = t[0].data, this.clickedObject.isNerves || this.clickedObject.anatomicalId) {
67
+ const i = this.clickedObject.id.toLowerCase();
68
+ if (this.$refs.scaffold.viewingMode === "Neuron Connection") {
69
+ const s = this.settingsStore.globalSettings.connectionType;
70
+ if (this.clickedObject.isNerves)
71
+ this.filter.push({
72
+ facet: i,
73
+ term: "Nerves",
74
+ facetPropPath: "scaffold.connectivity.nerve"
75
+ });
76
+ else {
77
+ const o = s.toLowerCase();
78
+ let n = this.clickedObject.anatomicalId || "";
79
+ if (n)
80
+ this.filter.push({
81
+ facet: `["${n}",[]]`,
82
+ facetPropPath: `flatmap.connectivity.source.${o}`,
83
+ tagLabel: i.charAt(0).toUpperCase() + i.slice(1),
84
+ term: s
85
+ });
86
+ else {
87
+ const f = this.connectivitiesStore.filterOptions[this.entry.resource].find((r) => r.key === `flatmap.connectivity.source.${o}`);
88
+ let a;
89
+ f == null || f.children.forEach((r) => {
90
+ var p;
91
+ r.label.toLowerCase() === i && (a = r), (p = r.children) == null || p.forEach((u) => {
92
+ u.label.toLowerCase() === i && (a = u);
93
+ });
94
+ }), a && (n = a.key.replace(`flatmap.connectivity.source.${o}.`, ""), this.filter.push({
95
+ facet: n,
96
+ facetPropPath: `flatmap.connectivity.source.${o}`,
97
+ tagLabel: a.tagLabel,
98
+ term: s
99
+ }));
100
+ }
101
+ }
102
+ h.emit("neuron-connection-feature-click", {
103
+ filters: this.filter,
104
+ search: this.filter.length ? "" : i
105
+ });
106
+ } else if (this.$refs.scaffold.viewingMode === "Exploration") {
107
+ const s = this.nervesKnowledge.filter((o) => JSON.stringify(o["nerve-label"]).includes(i));
108
+ s.length && this.getKnowledgeTooltip({ data: s, type: this.entry });
109
+ }
110
+ }
111
+ } else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, h.emit("connectivity-info-close"));
112
+ },
113
+ onResize: function() {
114
+ var e, t, i;
115
+ this.scaffoldCamera || (this.scaffoldCamera = d((i = (t = (e = this.$refs.scaffold) == null ? void 0 : e.$module) == null ? void 0 : t.scene) == null ? void 0 : i.getZincCameraControls())), this.scaffoldCamera && this.scaffoldCamera.onResize();
116
+ },
117
+ getState: function() {
118
+ return this.$refs.scaffold ? this.$refs.scaffold.getState() : this.entry.state;
119
+ },
120
+ /**
121
+ * Perform a local search on this contentvuer
122
+ */
123
+ search: function(e) {
124
+ if (this.$refs.scaffold)
125
+ return this.$refs.scaffold.search(e, !0);
126
+ },
127
+ searchSuggestions: function(e, t) {
128
+ if (e === "" || !this.$refs.scaffold)
129
+ return t;
130
+ this.$refs.scaffold.fetchSuggestions(e).forEach((s) => {
131
+ s.suggestion && t.push(s.suggestion);
132
+ });
133
+ },
134
+ showConnectivityTooltips: function(e) {
135
+ if (this.$refs.scaffold)
136
+ if (e.label)
137
+ this.$refs.scaffold.changeHighlightedByName([e.label], "", !1), this.$refs.scaffold.showRegionTooltip(e.label, !1, !1);
138
+ else {
139
+ const t = e.connectivityInfo["nerve-label"];
140
+ if (t) {
141
+ const i = t.flatMap((s) => s.subNerves);
142
+ this.$refs.scaffold.changeHighlightedByName(i, "", !1);
143
+ }
144
+ this.$refs.scaffold.hideRegionTooltip();
145
+ }
146
+ },
147
+ zoomToFeatures: function(e, t) {
148
+ if (this.$refs.scaffold) {
149
+ let i;
150
+ Array.isArray(e) ? i = e : i = [e.name], t && this.$refs.scaffold.changeActiveByName(i, "", !1), this.$refs.scaffold.viewRegion(i);
151
+ }
152
+ },
153
+ scaffoldIsReady: function() {
154
+ this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.scaffoldRef || (this.scaffoldRef = d(this.$refs.scaffold), this.scaffoldRef && (this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources)), this.updateViewerSettings(), h.emit("mapLoaded", this.$refs.scaffold), setTimeout(() => {
155
+ this.setNerveGreyScale();
156
+ }, 500);
157
+ },
158
+ /**
159
+ * Callback when the vuers emit a selected event.
160
+ */
161
+ scaffoldHighlighted: function(e, t) {
162
+ var s, o, n;
163
+ const i = {
164
+ paneIndex: this.entry.id,
165
+ type: e,
166
+ resource: t,
167
+ internalName: void 0
168
+ };
169
+ t && t[0] && ((((s = t[0].data) == null ? void 0 : s.id) === void 0 || ((o = t[0].data) == null ? void 0 : o.id) === "") && (t[0].data.id = (n = t[0].data) == null ? void 0 : n.group), i.internalName = t[0].data.id, i.eventType = "highlighted"), this.$emit("resource-selected", i);
170
+ },
171
+ /**
172
+ * Callback when the vuers emit a selected event.
173
+ */
174
+ scaffoldNavigated: function(e, t) {
175
+ if (this.mouseHovered) {
176
+ const i = {
177
+ paneIndex: this.entry.id,
178
+ eventType: "panZoom",
179
+ payload: t,
180
+ type: e
181
+ };
182
+ this.$emit("resource-selected", i);
183
+ }
184
+ },
185
+ updateWithViewUrl: function(e) {
186
+ this.$refs.scaffold && this.$refs.scaffold.updateViewURL(e);
187
+ },
188
+ /**
189
+ * Change the view mode of the current scaffold
190
+ */
191
+ changeViewingMode: function(e) {
192
+ this.$refs.scaffold && this.$refs.scaffold.changeViewingMode(e);
193
+ },
194
+ updateViewerSettings: function() {
195
+ if (this.$refs.scaffold) {
196
+ const {
197
+ backgroundDisplay: e,
198
+ organsDisplay: t,
199
+ outlinesDisplay: i,
200
+ viewingMode: s
201
+ } = this.settingsStore.globalSettings;
202
+ this.$refs.scaffold.backgroundChangeCallback(e), this.$refs.scaffold.changeViewingMode(s), this.$refs.scaffold.setColour(t), this.$refs.scaffold.setOutlines(i);
203
+ }
204
+ }
205
+ },
206
+ computed: {
207
+ warningMessage: function() {
208
+ return this.entry.discoverId === "307" || this.entry.discoverId === 307 ? "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." : "Under active development";
209
+ },
210
+ markerLabels: function() {
211
+ return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
212
+ }
213
+ },
214
+ watch: {
215
+ visible: {
216
+ handler(e) {
217
+ e && !this.activated && (this.activated = !0, this.$nextTick(() => {
218
+ this.$refs.scaffold && (this.scaffoldRef = d(this.$refs.scaffold), this.scaffoldRef && (this.loadExplorerConfig(), this.connectivityKnowledge = this.connectivitiesStore.globalConnectivities, this.connectivityFilterOptions = this.connectivitiesStore.filterOptions, this.connectivityFilterSources = this.connectivitiesStore.filterSources));
219
+ }));
220
+ },
221
+ deep: !0,
222
+ immediate: !0
223
+ },
224
+ connectivityKnowledge: {
225
+ handler(e, t) {
226
+ if (this.entry.resource in e) {
227
+ const i = e[this.entry.resource];
228
+ i.length !== this.nervesKnowledge.length && (this.nervesKnowledge = i, this.scaffoldLoaded && this.setNerveGreyScale());
229
+ }
230
+ },
231
+ deep: !0,
232
+ immediate: !0
233
+ }
234
+ },
235
+ data: function() {
236
+ return {
237
+ activated: !1,
238
+ apiLocation: process.env.VUE_APP_API_LOCATION,
239
+ scaffoldCamera: void 0,
240
+ scaffoldLoaded: !1,
241
+ nervesKnowledge: [],
242
+ clickedObject: void 0,
243
+ filter: [],
244
+ query: ""
245
+ };
246
+ }
247
+ }, N = { class: "viewer-container" };
248
+ function k(e, t, i, s, o, n) {
249
+ const l = g("ScaffoldVuer"), f = g("HelpModeDialog");
250
+ return c(), y("div", N, [
251
+ e.activated ? (c(), m(l, {
252
+ key: 0,
253
+ state: e.entry.state,
254
+ url: e.entry.resource,
255
+ region: e.entry.region,
256
+ onScaffoldSelected: t[0] || (t[0] = (a) => n.scaffoldResourceSelected(e.entry.type, a)),
257
+ onScaffoldHighlighted: t[1] || (t[1] = (a) => n.scaffoldHighlighted(e.entry.type, a)),
258
+ onScaffoldNavigated: t[2] || (t[2] = (a) => n.scaffoldNavigated(e.entry.type, a)),
259
+ onOnReady: n.scaffoldIsReady,
260
+ onOpenMap: e.openMap,
261
+ ref: "scaffold",
262
+ "background-toggle": !0,
263
+ traditional: !0,
264
+ helpMode: e.helpMode,
265
+ helpModeActiveItem: e.helpModeActiveItem,
266
+ helpModeDialog: e.useHelpModeDialog,
267
+ onAnnotationOpen: e.onAnnotationOpen,
268
+ onAnnotationClose: e.onAnnotationClose,
269
+ onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
270
+ annotationSidebar: e.annotationSidebar,
271
+ onHelpModeLastItem: e.onHelpModeLastItem,
272
+ onShownTooltip: e.onTooltipShown,
273
+ onShownMapTooltip: e.onMapTooltipShown,
274
+ render: e.visible,
275
+ "display-latest-message": !0,
276
+ "warning-message": n.warningMessage,
277
+ "display-minimap": !1,
278
+ "display-markers": !1,
279
+ enableOpenMapUI: !0,
280
+ "view-u-r-l": e.entry.viewUrl,
281
+ markerCluster: !0,
282
+ markerLabels: n.markerLabels,
283
+ flatmapAPI: e.flatmapAPI,
284
+ showLocalSettings: e.showLocalSettings,
285
+ showOpenMapButton: e.showOpenMapButton,
286
+ usageConfig: {
287
+ showTubeLinesControls: !1,
288
+ tubeLines: e.entry.discoverId === "307" || e.entry.discoverId === 307
289
+ }
290
+ }, null, 8, ["state", "url", "region", "onOnReady", "onOpenMap", "helpMode", "helpModeActiveItem", "helpModeDialog", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "render", "warning-message", "view-u-r-l", "markerLabels", "flatmapAPI", "showLocalSettings", "showOpenMapButton", "usageConfig"])) : v("", !0),
291
+ e.helpMode && e.useHelpModeDialog ? (c(), m(f, {
292
+ key: 1,
293
+ ref: "scaffoldHelp",
294
+ scaffoldRef: e.scaffoldRef,
295
+ lastItem: e.helpModeLastItem,
296
+ onShowNext: e.onHelpModeShowNext,
297
+ onFinishHelpMode: e.onFinishHelpMode
298
+ }, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : v("", !0)
299
+ ]);
300
+ }
301
+ const T = /* @__PURE__ */ w(O, [["render", k], ["__scopeId", "data-v-0a40d7b9"]]);
302
+ export {
303
+ T as default
304
+ };
@@ -0,0 +1,28 @@
1
+ import { C as n } from "./ContentMixin-BImmmP1E.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-qyfmiqHe.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
+ };