Upgrade Guide
Introduction
The Invox Dictation SDK JavaScript library is a powerful tool for developers to integrate various medical functionalities into their web applications. To keep up with the latest features and bug fixes, it is important to upgrade to the latest version of the library.
This guide provides step-by-step instructions on how to upgrade your current version of the Invox Dictation SDK JavaScript library by downloading and replacing the invox.min.js file in your web pages.
Steps
Step 1: Back up your current library.
Before replacing invox.min.js with the new library, back up your old library. Copy the invox.min.js file to a separate location so you can revert to the previous version if necessary.
Step 2: Download the new library.
Download the latest Invox Dictation SDK package from the Download section. Download the ZIP file for the latest library version.
Step 3: Replace the old library.
Replace the old invox.min.js file in your deployment directory with the new one from the /libs folder of the downloaded package.
Step 4: Update your web pages.
After replacing the file, update the reference in all web pages that load the library:
<!-- Old reference -->
<script src="path/to/old/invox.min.js"></script>
<!-- New reference -->
<script src="path/to/new/invox.min.js"></script>
Step 5: Test your application.
After replacing the library in your web pages, thoroughly test your application to ensure that it still works correctly. If you encounter any issues, refer to the JavaScript API documentation.
Introduction
Version 2.9 introduces a pure ESM architecture with UI components as named exports. The SDK is distributed via npm, making upgrades straightforward.
Upgrade via npm
To upgrade to the latest version of the SDK, run:
npm update @invox-medical-npm/invox-dictation
Check your current version
To verify which version is installed:
npm list @invox-medical-npm/invox-dictation
Install a specific version
If you need to install a specific version (e.g., to match your server):
npm install @invox-medical-npm/invox-dictation@2.9.0
Breaking changes from v2.8
1. ESM module system
The previous invox.min.js (IIFE) build has been replaced with an ESM bundle:
- <script src="./node_modules/@invox-medical-npm/invox-dictation/dist/libs/invox.min.js"></script>
+ <script type="module">
+ import INVOX from "@invox-medical-npm/invox-dictation";
+ </script>
2. Components are named exports
UI components are now named exports from the package, not global INVOXMDComponent_* variables:
- const bar = INVOXMDComponent_Bar.create("invox-bar");
+ import { BarComponent } from "@invox-medical-npm/invox-dictation";
+ const bar = BarComponent.create("invox-bar");
| Old global | New named export |
|---|---|
INVOXMDComponent_Bar | BarComponent |
INVOXMDComponent_Dictionary | DictionaryDialog |
INVOXMDComponent_Templates | TemplatesDialog |
INVOXMDComponent_Transformations | TransformationsDialog |
3. CSS is auto-injected
Separate CSS file imports are no longer needed; styles are injected at runtime:
- <link rel="stylesheet" href="invox-bar-component.css">
<!-- No CSS import needed — styles are auto-injected -->
4. No opus/ folder copying required
The Opus audio library is bundled within the main ESM module — no manual cp -r step needed.
Migration steps
- Update the SDK:
npm install @invox-medical-npm/invox-dictation - Replace script tags with
type="module"imports. - Replace component globals with named imports from the package.
- Remove CSS
linktags for component stylesheets. - Remove
opus/folder copying from your build script. - Test your application thoroughly after migration.
Before upgrading patch versions, check the Changelog for any breaking changes.