Skip to content

Commit 8791549

Browse files
feat: release v3.0.0 (#29)
Co-authored-by: felixindynamsoft <[email protected]>
1 parent 8caa3c2 commit 8791549

File tree

71 files changed

+3468
-4371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3468
-4371
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ The simplest way to include the SDK is to use either the [**jsDelivr**](https://
3131
- jsDelivr
3232

3333
```html
34-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mrz-scanner@2.1.0/dist/mrz-scanner.bundle.js"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mrz-scanner@3.0.0/dist/mrz-scanner.bundle.js"></script>
3535
```
3636

3737
- UNPKG
3838

3939
```html
40-
<script src="https://unpkg.com/dynamsoft-mrz-scanner@2.1.0/dist/mrz-scanner.bundle.js"></script>
40+
<script src="https://unpkg.com/dynamsoft-mrz-scanner@3.0.0/dist/mrz-scanner.bundle.js"></script>
4141
```
4242

4343
When using a framework such as **React**, **Vue** or **Angular**, we recommend adding the package as a dependency using a package manager such as **npm** or **yarn**:
4444

4545
```sh
46-
npm i dynamsoft-mrz-scanner@2.1.0 -E
46+
npm i dynamsoft-mrz-scanner@3.0.0 -E
4747
# or
48-
yarn add dynamsoft-mrz-scanner@2.1.0 -E
48+
yarn add dynamsoft-mrz-scanner@3.0.0 -E
4949
```
5050

5151
> [!WARNING]
@@ -60,7 +60,7 @@ Below is the complete Hello World sample page that uses the precompiled script s
6060
<meta charset="utf-8" />
6161
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6262
<title>Dynamsoft MRZ Scanner - Hello World</title>
63-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mrz-scanner@2.1.0/dist/mrz-scanner.bundle.js"></script>
63+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mrz-scanner@3.0.0/dist/mrz-scanner.bundle.js"></script>
6464
</head>
6565

6666
<body>
@@ -139,7 +139,7 @@ Let's now go through the code of the Hello World sample and understand the purpo
139139
<meta charset="utf-8" />
140140
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
141141
<title>Dynamsoft MRZ Scanner - Hello World</title>
142-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mrz-scanner@2.1.0/dist/mrz-scanner.bundle.js"></script>
142+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mrz-scanner@3.0.0/dist/mrz-scanner.bundle.js"></script>
143143
</head>
144144
145145
<body>

dev-server/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ httpServer.listen(httpPort, () => {
119119
console.log("\x1b[33m Demo:\x1b[0m http://localhost:" + httpPort + "/demo");
120120
console.log("\x1b[90m-------------------\x1b[0m");
121121
console.log("\x1b[33m Use File Input:\x1b[0m http://localhost:" + httpPort + "/scenarios/use-file-input");
122+
console.log("\x1b[90m-------------------\x1b[0m");
122123
});
123124

124125
httpsServer.listen(httpsPort, "0.0.0.0", () => {

dist/mrz-scanner.bundle.esm.d.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
import { DSImageData, EngineResourcePaths } from 'dynamsoft-core';
2-
export * from 'dynamsoft-core';
3-
export * from 'dynamsoft-license';
4-
import { CapturedResult, CaptureVisionRouter } from 'dynamsoft-capture-vision-router';
5-
export * from 'dynamsoft-capture-vision-router';
6-
import { CameraEnhancer, CameraView } from 'dynamsoft-camera-enhancer';
7-
export * from 'dynamsoft-camera-enhancer';
8-
export * from 'dynamsoft-label-recognizer';
9-
export * from 'dynamsoft-code-parser';
10-
export * from 'dynamsoft-utility';
1+
import { DSImageData, CapturedResult, CaptureVisionRouter, CameraEnhancer, CameraView, EngineResourcePaths } from 'dynamsoft-capture-vision-bundle';
2+
export * from 'dynamsoft-capture-vision-bundle';
113

124
declare enum EnumMRZScanMode {
135
Passport = "passport",
@@ -106,6 +98,7 @@ declare function displayMRZDate(date: MRZDate): string;
10698

10799
interface MRZScannerViewConfig {
108100
cameraEnhancerUIPath?: string;
101+
uiPath?: string;
109102
container?: HTMLElement | string;
110103
templateFilePath?: string;
111104
utilizedTemplateNames?: UtilizedTemplateNames;
@@ -158,12 +151,14 @@ declare class MRZScannerView {
158151
private initializeScanModeManager;
159152
private getScanMode;
160153
private DCEShowToast;
154+
private firstFrame;
161155
private startCapturing;
162156
private toggleScanDocType;
163157
launch(): Promise<MRZResult>;
164158
}
165159

166160
interface MRZResultViewToolbarButtonsConfig {
161+
cancel?: ToolbarButton;
167162
rescan?: ToolbarButtonConfig;
168163
done?: ToolbarButtonConfig;
169164
}
@@ -173,7 +168,10 @@ interface MRZResultViewConfig {
173168
showOriginalImage?: boolean;
174169
showMRZText?: boolean;
175170
allowResultEditing?: boolean;
171+
emptyResultMessage?: string;
176172
onDone?: (result: MRZResult) => Promise<void>;
173+
onCancel?: (result: MRZResult) => Promise<void>;
174+
_isFileMode?: boolean;
177175
}
178176
declare class MRZResultView {
179177
private resources;
@@ -184,6 +182,7 @@ declare class MRZResultView {
184182
constructor(resources: SharedResources, config: MRZResultViewConfig, scannerView: MRZScannerView);
185183
launch(): Promise<MRZResult>;
186184
private handleRescan;
185+
private handleCancel;
187186
private handleDone;
188187
private createControls;
189188
private handleFieldEdit;
@@ -219,6 +218,8 @@ declare class MRZScanner {
219218
private isInitialized;
220219
private isCapturing;
221220
private loadingScreen;
221+
private isDynamsoftResourcesLoaded;
222+
protected isFileMode: boolean;
222223
private showLoadingOverlay;
223224
private hideLoadingOverlay;
224225
constructor(config: MRZScannerConfig);
@@ -229,6 +230,7 @@ declare class MRZScanner {
229230
resultView?: MRZResultView;
230231
};
231232
}>;
233+
private initializeDynamsoftResources;
232234
private initializeDCVResources;
233235
private shouldCreateDefaultContainer;
234236
private createDefaultMRZScannerContainer;

dist/mrz-scanner.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mrz-scanner.bundle.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/mrz-scanner.d.ts

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
import { DSImageData, EngineResourcePaths } from 'dynamsoft-core';
2-
import * as dynamsoftCore from 'dynamsoft-core';
3-
export { dynamsoftCore as Core };
4-
import * as dynamsoftLicense from 'dynamsoft-license';
5-
export { dynamsoftLicense as License };
6-
import { CapturedResult, CaptureVisionRouter } from 'dynamsoft-capture-vision-router';
7-
import * as dynamsoftCaptureVisionRouter from 'dynamsoft-capture-vision-router';
8-
export { dynamsoftCaptureVisionRouter as CVR };
9-
import { CameraEnhancer, CameraView } from 'dynamsoft-camera-enhancer';
10-
import * as dynamsoftCameraEnhancer from 'dynamsoft-camera-enhancer';
11-
export { dynamsoftCameraEnhancer as DCE };
12-
import * as dynamsoftCodeParser from 'dynamsoft-code-parser';
13-
export { dynamsoftCodeParser as DCP };
14-
import * as dynamsoftLabelRecognizer from 'dynamsoft-label-recognizer';
15-
export { dynamsoftLabelRecognizer as DLR };
16-
import * as dynamsoftUtility from 'dynamsoft-utility';
17-
export { dynamsoftUtility as Utility };
1+
import { DSImageData, CapturedResult, CaptureVisionRouter, CameraEnhancer, CameraView, EngineResourcePaths } from 'dynamsoft-capture-vision-bundle';
2+
import * as dynamsoftCaptureVisionBundle from 'dynamsoft-capture-vision-bundle';
3+
export { dynamsoftCaptureVisionBundle as Dynamsoft };
184

195
declare enum EnumMRZScanMode {
206
Passport = "passport",
@@ -113,6 +99,7 @@ declare function displayMRZDate(date: MRZDate): string;
11399

114100
interface MRZScannerViewConfig {
115101
cameraEnhancerUIPath?: string;
102+
uiPath?: string;
116103
container?: HTMLElement | string;
117104
templateFilePath?: string;
118105
utilizedTemplateNames?: UtilizedTemplateNames;
@@ -165,12 +152,14 @@ declare class MRZScannerView {
165152
private initializeScanModeManager;
166153
private getScanMode;
167154
private DCEShowToast;
155+
private firstFrame;
168156
private startCapturing;
169157
private toggleScanDocType;
170158
launch(): Promise<MRZResult>;
171159
}
172160

173161
interface MRZResultViewToolbarButtonsConfig {
162+
cancel?: ToolbarButton;
174163
rescan?: ToolbarButtonConfig;
175164
done?: ToolbarButtonConfig;
176165
}
@@ -180,7 +169,10 @@ interface MRZResultViewConfig {
180169
showOriginalImage?: boolean;
181170
showMRZText?: boolean;
182171
allowResultEditing?: boolean;
172+
emptyResultMessage?: string;
183173
onDone?: (result: MRZResult) => Promise<void>;
174+
onCancel?: (result: MRZResult) => Promise<void>;
175+
_isFileMode?: boolean;
184176
}
185177
declare class MRZResultView {
186178
private resources;
@@ -191,6 +183,7 @@ declare class MRZResultView {
191183
constructor(resources: SharedResources, config: MRZResultViewConfig, scannerView: MRZScannerView);
192184
launch(): Promise<MRZResult>;
193185
private handleRescan;
186+
private handleCancel;
194187
private handleDone;
195188
private createControls;
196189
private handleFieldEdit;
@@ -226,6 +219,8 @@ declare class MRZScanner {
226219
private isInitialized;
227220
private isCapturing;
228221
private loadingScreen;
222+
private isDynamsoftResourcesLoaded;
223+
protected isFileMode: boolean;
229224
private showLoadingOverlay;
230225
private hideLoadingOverlay;
231226
constructor(config: MRZScannerConfig);
@@ -236,6 +231,7 @@ declare class MRZScanner {
236231
resultView?: MRZResultView;
237232
};
238233
}>;
234+
private initializeDynamsoftResources;
239235
private initializeDCVResources;
240236
private shouldCreateDefaultContainer;
241237
private createDefaultMRZScannerContainer;

dist/mrz-scanner.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mrz-scanner.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/mrz-scanner.no-content-bundle.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)