@abi-software/simulationvuer 3.0.16 → 3.0.18
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/simulationvuer.js +12006 -11910
- package/dist/simulationvuer.umd.cjs +109 -109
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/SimulationVuer.vue +38 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/simulationvuer",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vite serve --host --force",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@abi-software/plotvuer": "1.0.7",
|
|
24
|
-
"@opencor/opencor": "^0.
|
|
24
|
+
"@opencor/opencor": "^0.20260416.2",
|
|
25
25
|
"element-plus": "2.8.4",
|
|
26
26
|
"jsonschema": "^1.4.0",
|
|
27
27
|
"mathjs": "^15.1.0",
|
|
@@ -83,6 +83,8 @@
|
|
|
83
83
|
ref="opencorRef"
|
|
84
84
|
:omex="opencorOmexFile"
|
|
85
85
|
theme="light"
|
|
86
|
+
@externalData="onExternalData($event)"
|
|
87
|
+
@file="onFile($event)"
|
|
86
88
|
@simulationData="onSimulationData($event)"
|
|
87
89
|
/>
|
|
88
90
|
</div>
|
|
@@ -339,6 +341,22 @@ export default {
|
|
|
339
341
|
|
|
340
342
|
this.$refs.opencorRef?.trackSimulationData(modelParameters);
|
|
341
343
|
},
|
|
344
|
+
/**
|
|
345
|
+
* @public
|
|
346
|
+
* Add external data to the OpenCOR simulation.
|
|
347
|
+
* @param `csv` A CSV string or URL for the external data.
|
|
348
|
+
* @param `voiExpression` Optional VOI expression to map the data.
|
|
349
|
+
* @param `modelParameters` An array of model parameter identifiers.
|
|
350
|
+
*/
|
|
351
|
+
addExternalData(csv, voiExpression, modelParameters) {
|
|
352
|
+
if (!this.$refs.opencorRef?.addExternalData) {
|
|
353
|
+
return Promise.reject(
|
|
354
|
+
new Error("SimulationVuer: OpenCOR instance is not available."),
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
return this.$refs.opencorRef.addExternalData(csv, voiExpression, modelParameters);
|
|
359
|
+
},
|
|
342
360
|
/**
|
|
343
361
|
* @public
|
|
344
362
|
* Remove a data subscription.
|
|
@@ -410,7 +428,24 @@ export default {
|
|
|
410
428
|
},
|
|
411
429
|
/**
|
|
412
430
|
* @public
|
|
413
|
-
* Let the outside world know that we have received some
|
|
431
|
+
* Let the outside world know that we have received some external data from OpenCOR by emitting an `externalData` event.
|
|
432
|
+
* @param `event`
|
|
433
|
+
*/
|
|
434
|
+
onExternalData(event) {
|
|
435
|
+
this.$emit("externalData", event);
|
|
436
|
+
},
|
|
437
|
+
/**
|
|
438
|
+
* @public
|
|
439
|
+
* Let the outside world know that we have received a file from OpenCOR by emitting a `file` event.
|
|
440
|
+
* @param `event`
|
|
441
|
+
*/
|
|
442
|
+
onFile(event) {
|
|
443
|
+
this.$emit("file", event);
|
|
444
|
+
},
|
|
445
|
+
/**
|
|
446
|
+
* @public
|
|
447
|
+
* Let the outside world know that we have received some simulation data from OpenCOR by emitting a `simulationData`
|
|
448
|
+
* event, as well as a `data-notification` event.
|
|
414
449
|
* @param `event`
|
|
415
450
|
*/
|
|
416
451
|
onSimulationData(event) {
|
|
@@ -455,6 +490,8 @@ export default {
|
|
|
455
490
|
data,
|
|
456
491
|
},
|
|
457
492
|
});
|
|
493
|
+
|
|
494
|
+
this.$emit("simulationData", event);
|
|
458
495
|
});
|
|
459
496
|
},
|
|
460
497
|
/**
|