From ecba569de216a02ce7a73cf6cee0ae3b9ce83058 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Thu, 16 Apr 2026 01:32:03 +1200 Subject: [PATCH 1/4] OpenCOR: upgraded to version 0.20260416.2. --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3dc8dfd..0314611 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@abi-software/plotvuer": "1.0.7", - "@opencor/opencor": "^0.20260416.0", + "@opencor/opencor": "^0.20260416.2", "element-plus": "2.8.4", "jsonschema": "^1.4.0", "mathjs": "^15.1.0", @@ -1734,9 +1734,9 @@ } }, "node_modules/@opencor/opencor": { - "version": "0.20260416.0", - "resolved": "https://registry.npmjs.org/@opencor/opencor/-/opencor-0.20260416.0.tgz", - "integrity": "sha512-3bRJP5roZR3KVSIaOA7rTzL5QilyutZAo9qffD41Gk7ijCvyhH8i0BAhRvCOllwps3XYx6jmykbOqaci+kixUw==", + "version": "0.20260416.2", + "resolved": "https://registry.npmjs.org/@opencor/opencor/-/opencor-0.20260416.2.tgz", + "integrity": "sha512-dW5avxpifTQtEWT8cnxhKuuydAkg8wLU9y66xRmWJQMyUc+PUL9tE2sRd+EEimkOyerWa589oRT95HcVsnCA0g==", "license": "Apache-2.0", "dependencies": { "@napi-rs/keyring": "^1.2.0", diff --git a/package.json b/package.json index da2ee89..06cd617 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@abi-software/plotvuer": "1.0.7", - "@opencor/opencor": "^0.20260416.0", + "@opencor/opencor": "^0.20260416.2", "element-plus": "2.8.4", "jsonschema": "^1.4.0", "mathjs": "^15.1.0", From 8b5bbbd49986f4a85a9d65d84ec0b094ffcfd9d8 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Thu, 16 Apr 2026 13:11:39 +1200 Subject: [PATCH 2/4] Added the exposed `addExternalData()` method. --- src/components/SimulationVuer.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/components/SimulationVuer.vue b/src/components/SimulationVuer.vue index 3af17fd..8251ee0 100644 --- a/src/components/SimulationVuer.vue +++ b/src/components/SimulationVuer.vue @@ -339,6 +339,22 @@ export default { this.$refs.opencorRef?.trackSimulationData(modelParameters); }, + /** + * @public + * Add external data to the OpenCOR simulation. + * @param `csv` A CSV string or URL for the external data. + * @param `voiExpression` Optional VOI expression to map the data. + * @param `modelParameters` An array of model parameter identifiers. + */ + addExternalData(csv, voiExpression, modelParameters) { + if (!this.$refs.opencorRef?.addExternalData) { + return Promise.reject( + new Error("SimulationVuer: OpenCOR instance is not available."), + ); + } + + return this.$refs.opencorRef.addExternalData(csv, voiExpression, modelParameters); + }, /** * @public * Remove a data subscription. From a1177ecd3b31bbb4bef88f4d36fd2b88f3a2c66a Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Thu, 16 Apr 2026 13:07:00 +1200 Subject: [PATCH 3/4] Forward OpenCOR's `externalData` and `file` events. --- src/components/SimulationVuer.vue | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/components/SimulationVuer.vue b/src/components/SimulationVuer.vue index 8251ee0..9918524 100644 --- a/src/components/SimulationVuer.vue +++ b/src/components/SimulationVuer.vue @@ -83,6 +83,8 @@ ref="opencorRef" :omex="opencorOmexFile" theme="light" + @externalData="onExternalData($event)" + @file="onFile($event)" @simulationData="onSimulationData($event)" /> @@ -426,7 +428,24 @@ export default { }, /** * @public - * Let the outside world know that we have received some simulation data from OpenCOR by emitting a `data-notification` event. + * Let the outside world know that we have received some external data from OpenCOR by emitting an `externalData` event. + * @param `event` + */ + onExternalData(event) { + this.$emit("externalData", event); + }, + /** + * @public + * Let the outside world know that we have received a file from OpenCOR by emitting a `file` event. + * @param `event` + */ + onFile(event) { + this.$emit("file", event); + }, + /** + * @public + * Let the outside world know that we have received some simulation data from OpenCOR by emitting a `simulationData` + * event, as well as a `data-notification` event. * @param `event` */ onSimulationData(event) { @@ -471,6 +490,8 @@ export default { data, }, }); + + this.$emit("simulationData", event); }); }, /** From 6e587457b2dc0c7bc8ad24f53938b79241c72177 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Thu, 16 Apr 2026 13:27:55 +1200 Subject: [PATCH 4/4] Version 3.0.18. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0314611..f50cc90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@abi-software/simulationvuer", - "version": "3.0.17", + "version": "3.0.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@abi-software/simulationvuer", - "version": "3.0.17", + "version": "3.0.18", "license": "Apache-2.0", "dependencies": { "@abi-software/plotvuer": "1.0.7", diff --git a/package.json b/package.json index 06cd617..d2db123 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@abi-software/simulationvuer", - "version": "3.0.17", + "version": "3.0.18", "private": false, "scripts": { "serve": "vite serve --host --force",