@abi-software/simulationvuer 3.0.17 → 3.0.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/simulationvuer",
3
- "version": "3.0.17",
3
+ "version": "3.0.19",
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.20260416.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,28 @@ 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
+ console.warn(
354
+ "SimulationVuer: addExternalData: OpenCOR instance is not available.",
355
+ );
356
+
357
+ return;
358
+ }
359
+
360
+ return this.$refs.opencorRef.addExternalData(
361
+ csv,
362
+ voiExpression,
363
+ modelParameters,
364
+ );
365
+ },
342
366
  /**
343
367
  * @public
344
368
  * Remove a data subscription.
@@ -410,7 +434,24 @@ export default {
410
434
  },
411
435
  /**
412
436
  * @public
413
- * Let the outside world know that we have received some simulation data from OpenCOR by emitting a `data-notification` event.
437
+ * Let the outside world know that we have received some external data from OpenCOR by emitting an `externalData` event.
438
+ * @param `event`
439
+ */
440
+ onExternalData(event) {
441
+ this.$emit("externalData", event);
442
+ },
443
+ /**
444
+ * @public
445
+ * Let the outside world know that we have received a file from OpenCOR by emitting a `file` event.
446
+ * @param `event`
447
+ */
448
+ onFile(event) {
449
+ this.$emit("file", event);
450
+ },
451
+ /**
452
+ * @public
453
+ * Let the outside world know that we have received some simulation data from OpenCOR by emitting a `simulationData`
454
+ * event, as well as a `data-notification` event.
414
455
  * @param `event`
415
456
  */
416
457
  onSimulationData(event) {
@@ -456,6 +497,8 @@ export default {
456
497
  },
457
498
  });
458
499
  });
500
+
501
+ this.$emit("simulationData", event);
459
502
  },
460
503
  /**
461
504
  * @public