@abi-software/mapintegratedvuer 1.17.1 → 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.
- package/dist/{ConnectivityGraph-BL4B9GZX.js → ConnectivityGraph-9pXPgFJR.js} +2 -2
- package/dist/{ContentMixin-Djmb_gqk.js → ContentMixin-DIqgKIz6.js} +279 -536
- package/dist/Flatmap-D7GVPV7o.js +103422 -0
- package/dist/{Iframe-ByYxT4Yq.js → Iframe-CCEA3d9c.js} +2 -2
- package/dist/{MultiFlatmap-DSkdlRiS.js → MultiFlatmap-Cuke1uNp.js} +3 -3
- package/dist/{Plot-ymkHVq_A.js → Plot-B4oTBVAT.js} +2 -2
- package/dist/{Scaffold-bw7posKm.js → Scaffold-Czz8X5kL.js} +79 -53
- package/dist/Simulation-BKmz8zwm.js +107 -0
- package/dist/{index-CwfUgFL1.js → index-_b4VBGHk.js} +30002 -25408
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +4291 -229
- package/dist/style-CM86xE3J.js +119 -0
- package/dist/style.css +1 -1
- package/package.json +10 -5
- package/src/App.vue +285 -258
- package/src/assets/styles.scss +1 -1
- package/src/components/ContextCard.vue +0 -1
- package/src/components/DummyRouteComponent.vue +1 -0
- package/src/components/EventBus.ts +13 -0
- package/src/components/FloatingWindow.vue +142 -0
- package/src/components/MapContent.vue +9 -4
- package/src/components/PlotComponent.vue +56 -0
- package/src/components/SplitDialog.vue +1 -6
- package/src/components/SplitFlow.vue +504 -444
- package/src/components/scripts/utilities.js +1 -1
- package/src/components/viewers/Flatmap.vue +166 -83
- package/src/components/viewers/Simulation.vue +118 -11
- package/src/components.d.ts +3 -0
- package/src/main.js +9 -3
- package/src/mixins/ContentMixin.js +467 -406
- package/src/mixins/DynamicMarkerMixin.js +50 -17
- package/src/services/mapping.js +69 -0
- package/src/services/testData.js +71 -0
- package/src/stores/entries.js +1 -1
- package/src/stores/mapping.js +29 -0
- package/src/stores/settings.js +4 -0
- package/src/stores/simulationPlotStore.js +124 -0
- package/src/stores/splitFlow.js +425 -352
- package/src/types/simulation.js +18 -0
- package/dist/Flatmap-uPEQNDkK.js +0 -202
- package/dist/Simulation-C_gdqDes.js +0 -28
- package/dist/style-Czqe2bTf.js +0 -57
- package/src/components/EventBus.js +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as r } from "./ContentMixin-
|
|
1
|
+
import { C as r } from "./ContentMixin-DIqgKIz6.js";
|
|
2
2
|
import { openBlock as o, createElementBlock as t, createElementVNode as a } from "vue";
|
|
3
|
-
import { _ as s } from "./index-
|
|
3
|
+
import { _ as s } from "./index-_b4VBGHk.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,
|
|
2
|
-
import { C as M } from "./ContentMixin-
|
|
3
|
-
import { D as y } from "./style-
|
|
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";
|
|
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-
|
|
2
|
+
import { C as r } from "./ContentMixin-DIqgKIz6.js";
|
|
3
3
|
import { resolveComponent as a, openBlock as n, createBlock as s } from "vue";
|
|
4
|
-
import { _ as p } from "./index-
|
|
4
|
+
import { _ as p } from "./index-_b4VBGHk.js";
|
|
5
5
|
const l = {
|
|
6
6
|
name: "Plot",
|
|
7
7
|
mixins: [r],
|
|
@@ -1,27 +1,53 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { C as
|
|
3
|
-
import { ScaffoldVuer as
|
|
4
|
-
import { resolveComponent as
|
|
1
|
+
import { _ as p, z as m, E as c } from "./index-_b4VBGHk.js";
|
|
2
|
+
import { C as v } from "./ContentMixin-DIqgKIz6.js";
|
|
3
|
+
import { ScaffoldVuer as w } from "@abi-software/scaffoldvuer";
|
|
4
|
+
import { resolveComponent as u, openBlock as g, createElementBlock as y, createVNode as b, createBlock as S, createCommentVNode as M } from "vue";
|
|
5
|
+
async function k(e) {
|
|
6
|
+
const t = sessionStorage.getItem("flatmap-knowledge");
|
|
7
|
+
if (t) {
|
|
8
|
+
const i = JSON.parse(t).filter((s) => s.references && s.references.length).filter((s) => s.references.includes(e));
|
|
9
|
+
if (i.length)
|
|
10
|
+
return i.map((l) => l.id);
|
|
11
|
+
}
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
async function I(e, t, n) {
|
|
15
|
+
const i = `select knowledge from knowledge
|
|
16
|
+
where source="${N(e)}" and
|
|
17
|
+
knowledge like "%${t}%" order by source desc`;
|
|
18
|
+
return (await n.queryKnowledge(i)).map((a) => JSON.parse(a)).map((a) => a.id);
|
|
19
|
+
}
|
|
20
|
+
function N(e) {
|
|
21
|
+
return $(e.mapMetadata);
|
|
22
|
+
}
|
|
23
|
+
function $(e) {
|
|
24
|
+
let t = "";
|
|
25
|
+
if (e != null && e.connectivity) {
|
|
26
|
+
const n = e.connectivity;
|
|
27
|
+
"knowledge-source" in n ? t = n["knowledge-source"] : "npo" in n && (t = `${n.npo.release}-npo`);
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
}
|
|
5
31
|
const C = {
|
|
6
32
|
name: "Scaffold",
|
|
7
|
-
mixins: [
|
|
33
|
+
mixins: [v],
|
|
8
34
|
components: {
|
|
9
|
-
ScaffoldVuer:
|
|
35
|
+
ScaffoldVuer: w,
|
|
10
36
|
HelpModeDialog: m
|
|
11
37
|
},
|
|
12
38
|
methods: {
|
|
13
39
|
showConnectivitiesByReference: async function(e) {
|
|
14
40
|
const t = sessionStorage.getItem("flatmap-knowledge");
|
|
15
41
|
let n = [];
|
|
16
|
-
t ? n = await
|
|
42
|
+
t ? n = await k(e) : n = await I(this.flatmapService.mapImp, e, this.flatmapService.flatmapQueries);
|
|
17
43
|
const o = [];
|
|
18
|
-
for (const
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
o.push(...
|
|
44
|
+
for (const i of n) {
|
|
45
|
+
const s = this.nervesKnowledge.find((r) => r.id === i);
|
|
46
|
+
if (!s) continue;
|
|
47
|
+
const l = s["nerve-label"];
|
|
48
|
+
if (l) {
|
|
49
|
+
const r = l.flatMap((a) => a.subNerves);
|
|
50
|
+
o.push(...r);
|
|
25
51
|
}
|
|
26
52
|
}
|
|
27
53
|
this.$refs.scaffold.changeHighlightedByName(o, "", !1);
|
|
@@ -37,14 +63,14 @@ const C = {
|
|
|
37
63
|
const n = !!e;
|
|
38
64
|
if (e) {
|
|
39
65
|
const o = [];
|
|
40
|
-
e.OR.forEach((
|
|
41
|
-
"AND" in
|
|
66
|
+
e.OR.forEach((i) => {
|
|
67
|
+
"AND" in i && i.AND.length >= 2 && "models" in i.AND[1] && o.push(...i.AND[1].models);
|
|
42
68
|
});
|
|
43
|
-
for (const
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
t.push(...
|
|
69
|
+
for (const i of o) {
|
|
70
|
+
const s = this.nervesKnowledge.find((l) => l.id === i);
|
|
71
|
+
if (s) {
|
|
72
|
+
const l = s["nerve-label"].map((r) => r.subNerves).flat(1 / 0);
|
|
73
|
+
t.push(...l);
|
|
48
74
|
}
|
|
49
75
|
}
|
|
50
76
|
}
|
|
@@ -69,41 +95,41 @@ const C = {
|
|
|
69
95
|
facetPropPath: "scaffold.connectivity.nerve"
|
|
70
96
|
});
|
|
71
97
|
else {
|
|
72
|
-
const
|
|
73
|
-
let
|
|
74
|
-
if (
|
|
98
|
+
const i = o.toLowerCase();
|
|
99
|
+
let s = this.clickedObject.anatomicalId || "";
|
|
100
|
+
if (s)
|
|
75
101
|
this.filter.push({
|
|
76
|
-
facet: `["${
|
|
77
|
-
facetPropPath: `flatmap.connectivity.source.${
|
|
102
|
+
facet: `["${s}",[]]`,
|
|
103
|
+
facetPropPath: `flatmap.connectivity.source.${i}`,
|
|
78
104
|
tagLabel: n.charAt(0).toUpperCase() + n.slice(1),
|
|
79
105
|
term: o
|
|
80
106
|
});
|
|
81
107
|
else {
|
|
82
|
-
const
|
|
108
|
+
const r = this.connectivitiesStore.filterOptions[this.entry.resource].find((f) => f.key === `flatmap.connectivity.source.${i}`);
|
|
83
109
|
let a;
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
|
|
110
|
+
r == null || r.children.forEach((f) => {
|
|
111
|
+
var d;
|
|
112
|
+
f.label.toLowerCase() === n && (a = f), (d = f.children) == null || d.forEach((h) => {
|
|
87
113
|
h.label.toLowerCase() === n && (a = h);
|
|
88
114
|
});
|
|
89
|
-
}), a && (
|
|
90
|
-
facet:
|
|
91
|
-
facetPropPath: `flatmap.connectivity.source.${
|
|
115
|
+
}), a && (s = a.key.replace(`flatmap.connectivity.source.${i}.`, ""), this.filter.push({
|
|
116
|
+
facet: s,
|
|
117
|
+
facetPropPath: `flatmap.connectivity.source.${i}`,
|
|
92
118
|
tagLabel: a.tagLabel,
|
|
93
119
|
term: o
|
|
94
120
|
}));
|
|
95
121
|
}
|
|
96
122
|
}
|
|
97
|
-
|
|
123
|
+
c.emit("neuron-connection-feature-click", {
|
|
98
124
|
filters: this.filter,
|
|
99
125
|
search: this.filter.length ? "" : n
|
|
100
126
|
});
|
|
101
127
|
} else if (this.$refs.scaffold.viewingMode === "Exploration") {
|
|
102
|
-
const o = this.nervesKnowledge.filter((
|
|
128
|
+
const o = this.nervesKnowledge.filter((i) => JSON.stringify(i["nerve-label"]).includes(n));
|
|
103
129
|
o.length && this.getKnowledgeTooltip({ data: o, type: this.entry });
|
|
104
130
|
}
|
|
105
131
|
}
|
|
106
|
-
} else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0,
|
|
132
|
+
} else t.length > 1 ? this.$refs.scaffold.viewingMode === "Exploration" && this.clickedObject && this.$refs.scaffold.$module.setIgnorePicking(!1) : (this.clickedObject = void 0, c.emit("connectivity-info-close"));
|
|
107
133
|
},
|
|
108
134
|
onResize: function() {
|
|
109
135
|
this.scaffoldCamera.onResize();
|
|
@@ -141,7 +167,7 @@ const C = {
|
|
|
141
167
|
Array.isArray(e) ? n = e : n = [e.name], t && this.$refs.scaffold.changeActiveByName(n, "", !1), this.$refs.scaffold.viewRegion(n);
|
|
142
168
|
},
|
|
143
169
|
scaffoldIsReady: function() {
|
|
144
|
-
this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.visible && this.entry.rotation && this.entry.rotation, this.updateViewerSettings(),
|
|
170
|
+
this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.visible && this.entry.rotation && this.entry.rotation, this.updateViewerSettings(), c.emit("mapLoaded", this.$refs.scaffold), setTimeout(() => {
|
|
145
171
|
this.setNerveGreyScale();
|
|
146
172
|
}, 500);
|
|
147
173
|
},
|
|
@@ -149,14 +175,14 @@ const C = {
|
|
|
149
175
|
* Callback when the vuers emit a selected event.
|
|
150
176
|
*/
|
|
151
177
|
scaffoldHighlighted: function(e, t) {
|
|
152
|
-
var o,
|
|
178
|
+
var o, i, s;
|
|
153
179
|
const n = {
|
|
154
180
|
paneIndex: this.entry.id,
|
|
155
181
|
type: e,
|
|
156
182
|
resource: t,
|
|
157
183
|
internalName: void 0
|
|
158
184
|
};
|
|
159
|
-
t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((
|
|
185
|
+
t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((i = t[0].data) == null ? void 0 : i.id) === "") && (t[0].data.id = (s = t[0].data) == null ? void 0 : s.group), n.internalName = t[0].data.id, n.eventType = "highlighted"), this.$emit("resource-selected", n);
|
|
160
186
|
},
|
|
161
187
|
/**
|
|
162
188
|
* Callback when the vuers emit a selected event.
|
|
@@ -225,18 +251,18 @@ const C = {
|
|
|
225
251
|
mounted: function() {
|
|
226
252
|
this.scaffoldCamera = this.$refs.scaffold.$module.scene.getZincCameraControls();
|
|
227
253
|
}
|
|
228
|
-
},
|
|
229
|
-
function
|
|
230
|
-
const
|
|
231
|
-
return
|
|
232
|
-
|
|
254
|
+
}, O = { class: "viewer-container" };
|
|
255
|
+
function L(e, t, n, o, i, s) {
|
|
256
|
+
const l = u("ScaffoldVuer"), r = u("HelpModeDialog");
|
|
257
|
+
return g(), y("div", O, [
|
|
258
|
+
b(l, {
|
|
233
259
|
state: e.entry.state,
|
|
234
260
|
url: e.entry.resource,
|
|
235
261
|
region: e.entry.region,
|
|
236
|
-
onScaffoldSelected: t[0] || (t[0] = (a) =>
|
|
237
|
-
onScaffoldHighlighted: t[1] || (t[1] = (a) =>
|
|
238
|
-
onScaffoldNavigated: t[2] || (t[2] = (a) =>
|
|
239
|
-
onOnReady:
|
|
262
|
+
onScaffoldSelected: t[0] || (t[0] = (a) => s.scaffoldResourceSelected(e.entry.type, a)),
|
|
263
|
+
onScaffoldHighlighted: t[1] || (t[1] = (a) => s.scaffoldHighlighted(e.entry.type, a)),
|
|
264
|
+
onScaffoldNavigated: t[2] || (t[2] = (a) => s.scaffoldNavigated(e.entry.type, a)),
|
|
265
|
+
onOnReady: s.scaffoldIsReady,
|
|
240
266
|
onOpenMap: e.openMap,
|
|
241
267
|
ref: "scaffold",
|
|
242
268
|
"background-toggle": !0,
|
|
@@ -253,13 +279,13 @@ function O(e, t, n, o, s, i) {
|
|
|
253
279
|
onShownMapTooltip: e.onMapTooltipShown,
|
|
254
280
|
render: e.visible,
|
|
255
281
|
"display-latest-message": !0,
|
|
256
|
-
"warning-message":
|
|
282
|
+
"warning-message": s.warningMessage,
|
|
257
283
|
"display-minimap": !1,
|
|
258
284
|
"display-markers": !1,
|
|
259
285
|
enableOpenMapUI: !0,
|
|
260
286
|
"view-u-r-l": e.entry.viewUrl,
|
|
261
287
|
markerCluster: !0,
|
|
262
|
-
markerLabels:
|
|
288
|
+
markerLabels: s.markerLabels,
|
|
263
289
|
flatmapAPI: e.flatmapAPI,
|
|
264
290
|
showLocalSettings: e.showLocalSettings,
|
|
265
291
|
showOpenMapButton: e.showOpenMapButton,
|
|
@@ -268,17 +294,17 @@ function O(e, t, n, o, s, i) {
|
|
|
268
294
|
tubeLines: e.entry.discoverId === "307" || e.entry.discoverId === 307
|
|
269
295
|
}
|
|
270
296
|
}, 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"]),
|
|
271
|
-
e.helpMode && e.useHelpModeDialog ? (
|
|
297
|
+
e.helpMode && e.useHelpModeDialog ? (g(), S(r, {
|
|
272
298
|
key: 0,
|
|
273
299
|
ref: "scaffoldHelp",
|
|
274
300
|
scaffoldRef: e.scaffoldRef,
|
|
275
301
|
lastItem: e.helpModeLastItem,
|
|
276
302
|
onShowNext: e.onHelpModeShowNext,
|
|
277
303
|
onFinishHelpMode: e.onFinishHelpMode
|
|
278
|
-
}, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) :
|
|
304
|
+
}, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : M("", !0)
|
|
279
305
|
]);
|
|
280
306
|
}
|
|
281
|
-
const H = /* @__PURE__ */
|
|
307
|
+
const H = /* @__PURE__ */ p(C, [["render", L], ["__scopeId", "data-v-5de11cee"]]);
|
|
282
308
|
export {
|
|
283
309
|
H as default
|
|
284
310
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { _ as r, E as i } from "./index-_b4VBGHk.js";
|
|
2
|
+
import { C as l } from "./ContentMixin-DIqgKIz6.js";
|
|
3
|
+
import { SimulationVuer as d } from "@abi-software/simulationvuer";
|
|
4
|
+
import { resolveComponent as u, openBlock as c, createBlock as f } from "vue";
|
|
5
|
+
const h = {
|
|
6
|
+
name: "Simulation",
|
|
7
|
+
mixins: [l],
|
|
8
|
+
components: {
|
|
9
|
+
SimulationVuer: d
|
|
10
|
+
},
|
|
11
|
+
computed: {
|
|
12
|
+
id: function() {
|
|
13
|
+
return this.entry.resource ? this.entry.resource : this.entry.discoverId;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
data: function() {
|
|
17
|
+
return {
|
|
18
|
+
columns: void 0,
|
|
19
|
+
csv: void 0,
|
|
20
|
+
fileOpened: !1
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
handleDataNotification: function(t) {
|
|
25
|
+
i.emit("simulation-response", t);
|
|
26
|
+
},
|
|
27
|
+
handleDataRequest(t) {
|
|
28
|
+
this.processRequest(t);
|
|
29
|
+
},
|
|
30
|
+
handleExternalEvent(t) {
|
|
31
|
+
console.log("handleExternalEvent", t);
|
|
32
|
+
},
|
|
33
|
+
handleFileEvent(t) {
|
|
34
|
+
(t == null ? void 0 : t.type) === "opened" && this.$nextTick(() => {
|
|
35
|
+
this.fileOpened = !0, (this.entry.csv_file || this.csv_file) && this.addExternalData(
|
|
36
|
+
{
|
|
37
|
+
targetEntryId: this.entry.id,
|
|
38
|
+
action: this.entry
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
handleWindowClosed(t) {
|
|
44
|
+
var e;
|
|
45
|
+
(e = this.$refs.simulation) == null || e.removeDataSubscription(t.id);
|
|
46
|
+
},
|
|
47
|
+
processRequest: function(t) {
|
|
48
|
+
var a, n;
|
|
49
|
+
if (t.id !== "nz.ac.auckland.simulation-data-request") return;
|
|
50
|
+
if (parseInt(t.version.split(".")[0]) !== 0) {
|
|
51
|
+
console.warn("Unsupported simulation request version:", t.version);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
((a = t.payload.protocol) == null ? void 0 : a.resource) === this.id && ((n = this.$refs.simulation) == null || n.addDataSubscription({
|
|
55
|
+
id: t.id,
|
|
56
|
+
version: t.version,
|
|
57
|
+
payload: {
|
|
58
|
+
windowId: t.payload.windowId,
|
|
59
|
+
ownerId: t.payload.ownerId,
|
|
60
|
+
component: t.payload.component,
|
|
61
|
+
variable: t.payload.variable,
|
|
62
|
+
withVOI: !0
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
},
|
|
66
|
+
addExternalData: function(t) {
|
|
67
|
+
if (this.entry.id === t.targetEntryId) {
|
|
68
|
+
const e = t.action;
|
|
69
|
+
if (e.csv_file && (this.csv_file = e.csv_file, this.columns = e.columns), this.csv_file && this.fileOpened) {
|
|
70
|
+
const a = [];
|
|
71
|
+
this.columns && this.columns.forEach((n) => {
|
|
72
|
+
n.cellml_variable && n.cellml_variable !== "main/t" && a.push(n.cellml_variable);
|
|
73
|
+
}), this.$refs.simulation.addExternalData(this.csv_file, void 0, a);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
mounted: function() {
|
|
79
|
+
i.on("simulation-external-data", this.addExternalData), i.on("simulation-data-request", this.handleDataRequest), i.on("plot-window-closed", this.handleWindowClosed), i.emit("simulation-ready", {
|
|
80
|
+
resourceId: this.id,
|
|
81
|
+
entryId: this.entry.id,
|
|
82
|
+
ready: !0
|
|
83
|
+
}), console.log(this.entry);
|
|
84
|
+
},
|
|
85
|
+
beforeUnmount: function() {
|
|
86
|
+
i.emit("simulation-ready", {
|
|
87
|
+
resourceId: this.id,
|
|
88
|
+
entryId: this.entry.id,
|
|
89
|
+
ready: !1
|
|
90
|
+
}), i.off("simulation-data-request", this.handleDataRequest), i.off("plot-window-closed", this.handleWindowClosed);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
function m(t, e, a, n, p, o) {
|
|
94
|
+
const s = u("SimulationVuer");
|
|
95
|
+
return c(), f(s, {
|
|
96
|
+
apiLocation: t.apiLocation,
|
|
97
|
+
id: o.id,
|
|
98
|
+
ref: "simulation",
|
|
99
|
+
onDataNotification: o.handleDataNotification,
|
|
100
|
+
onExternalData: o.handleExternalEvent,
|
|
101
|
+
onFile: o.handleFileEvent
|
|
102
|
+
}, null, 8, ["apiLocation", "id", "onDataNotification", "onExternalData", "onFile"]);
|
|
103
|
+
}
|
|
104
|
+
const w = /* @__PURE__ */ r(h, [["render", m]]);
|
|
105
|
+
export {
|
|
106
|
+
w as default
|
|
107
|
+
};
|