Skip to content

Commit 5569f96

Browse files
committed
feat: release v3.1.0
1 parent af48587 commit 5569f96

27 files changed

+1093
-648
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Since the **MWC library files** are published on [**npm**](https://www.npmjs.com
8383
8484
To use the precompiled script, simply include the following URL in a `<script>` tag:
8585
```html
86-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.0.1/dist/mwc.bundle.js"></script>
86+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.1.0/dist/mwc.bundle.js"></script>
8787
```
8888
8989
Below is the complete **Hello World** sample page that uses this precompiled script from a CDN.
@@ -98,7 +98,7 @@ Below is the complete **Hello World** sample page that uses this precompiled scr
9898
<meta charset="utf-8" />
9999
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
100100
<title>Mobile Web Capture - Hello World</title>
101-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.0.1/dist/mwc.bundle.js"></script>
101+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.1.0/dist/mwc.bundle.js"></script>
102102
</head>
103103
<body>
104104
<script>
@@ -139,7 +139,7 @@ Let’s walk through the code in the **Hello World** Sample to understand how it
139139
<title>Mobile Web Capture - Hello World</title>
140140
<script src="../dist/mwc.bundle.js"></script>
141141
<!--Alternatively, reference the script from CDN
142-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.0.1/dist/mwc.bundle.js"></script>
142+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.1.0/dist/mwc.bundle.js"></script>
143143
-->
144144
</head>
145145
```
@@ -153,7 +153,7 @@ In this step, **MWC** is referenced using a relative local path in the `<head>`
153153
Alternatively, the script can be referenced from a CDN:
154154
155155
```html
156-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.0.1/dist/mwc.bundle.js"></script>
156+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-mobile-web-capture@3.1.0/dist/mwc.bundle.js"></script>
157157
```
158158
159159
**MWC** wraps all its dependency scripts, so a **MWC** project only needs to include **MWC** itself as a single script. No additional dependency scripts are required.

dev-server/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ app.use(
3434
// Serve static files
3535
app.use("/dist", express.static(distPath));
3636
app.use("/assets", express.static(path.join(__dirname, "../samples/demo/assets")));
37+
app.use("/font", express.static(path.join(__dirname, "../samples/demo/font")));
3738

3839
app.use("/demo/assets", express.static(path.join(__dirname, "../samples/demo/assets")));
40+
app.use("/demo/font", express.static(path.join(__dirname, "../samples/demo/font")));
3941

4042
// Routes
4143
app.get("/", (req, res) => {
@@ -62,6 +64,10 @@ app.get("/scenarios/use-file-input", (req, res) => {
6264
res.sendFile(path.join(__dirname, "../samples/scenarios/use-file-input.html"));
6365
});
6466

67+
app.get("/scenarios/custom-scanner", (req, res) => {
68+
res.sendFile(path.join(__dirname, "../samples/scenarios/custom-scanner.html"));
69+
});
70+
6571
// Allow upload feature
6672
app.post("/upload", function (req, res) {
6773
try {

dist/mwc.bundle.esm.d.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ declare enum EnumMWCViews {
4343
Page = "page",
4444
Document = "document",
4545
Transfer = "transfer",
46-
History = "history"
46+
History = "history",
47+
Scanner = "Scanner"
4748
}
48-
type EnumMWCStartingViews = EnumMWCViews.Library | EnumMWCViews.Document;
49+
type EnumMWCStartingViews = EnumMWCViews.Library | EnumMWCViews.Document | EnumMWCViews.Scanner;
4950
declare enum EnumAllViews {
5051
Library = "library",
5152
Page = "page",
@@ -315,7 +316,6 @@ interface DocumentToolbarButtonsConfig {
315316
manage?: ToolbarButtonConfig;
316317
copyTo?: ToolbarButtonConfig;
317318
moveTo?: ToolbarButtonConfig;
318-
selectAll?: ToolbarButtonConfig;
319319
deleteImage?: ToolbarButtonConfig;
320320
shareImage?: ToolbarButtonConfig;
321321
uploadImage?: ToolbarButtonConfig;
@@ -343,6 +343,7 @@ declare class DocumentView extends MWCView {
343343
private documentTitle;
344344
private headerRenameTitleBtn;
345345
private toolbarBtn;
346+
private headerTitle;
346347
private headerActionBtn;
347348
browseViewer: BrowseViewer;
348349
private isDragged;
@@ -352,6 +353,7 @@ declare class DocumentView extends MWCView {
352353
setVisible(visible: boolean): void;
353354
private createBrowseViewer;
354355
protected createHeader(): void;
356+
private updateHeaderActionBtnStyle;
355357
protected updateHeaderTitle(): void;
356358
private handleRename;
357359
dispose(): void;
@@ -388,6 +390,11 @@ interface HistoryViewConfig {
388390
toolbarButtonsConfig?: HistoryToolbarButtonsConfig;
389391
}
390392

393+
interface MWCScanner {
394+
initialize(): Promise<any>;
395+
launch(): Promise<any>;
396+
dispose(): void;
397+
}
391398
interface MobileWebCaptureConfig {
392399
license?: string;
393400
container?: HTMLElement | string;
@@ -400,6 +407,7 @@ interface MobileWebCaptureConfig {
400407
pageViewConfig?: Pick<PageViewConfig, "container" | "toolbarButtonsConfig">;
401408
transferViewConfig?: Pick<TransferViewConfig, "container" | "toolbarButtonsConfig">;
402409
historyViewConfig?: Pick<HistoryViewConfig, "container" | "toolbarButtonsConfig">;
410+
scanner?: MWCScanner;
403411
documentScannerConfig?: Omit<DocumentScannerConfig, "container" | "license"> & {
404412
scannerViewConfig?: Omit<DocumentScannerViewConfig, "container" | "templateFilePath" | "utilizedTemplateNames" | "_showCorrectionView">;
405413
resultViewConfig?: Omit<DocumentResultViewConfig, "container">;
@@ -408,7 +416,7 @@ interface MobileWebCaptureConfig {
408416
}
409417
declare class MobileWebCapture {
410418
private config;
411-
private documentScanner;
419+
private scanner;
412420
private mwcViews;
413421
private currentView;
414422
private uploadedFiles;
@@ -434,6 +442,7 @@ declare class MobileWebCapture {
434442
private initializeDDV;
435443
private initializeMWCViews;
436444
private switchView;
445+
private processScanResult;
437446
private handleCameraCapture;
438447
private handleGalleryImport;
439448
private handleDocumentClick;
@@ -455,4 +464,5 @@ declare const MWC: {
455464
TransferView: typeof TransferView;
456465
};
457466

458-
export { DocumentView, DocumentViewConfig, EnumAllViews, EnumMWCViews, ExportConfig, LibraryView, LibraryViewConfig, MWC, MobileWebCapture, MobileWebCaptureConfig, PageView, PageViewConfig, TransferView, TransferViewConfig, UploadStatus, UploadedDocument };
467+
export { DocumentView, EnumAllViews, EnumMWCViews, LibraryView, MWC, MobileWebCapture, PageView, TransferView };
468+
export type { DocumentViewConfig, ExportConfig, LibraryViewConfig, MobileWebCaptureConfig, PageViewConfig, TransferViewConfig, UploadStatus, UploadedDocument };

dist/mwc.bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mwc.bundle.mjs

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/mwc.d.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ declare enum EnumMWCViews {
4848
Page = "page",
4949
Document = "document",
5050
Transfer = "transfer",
51-
History = "history"
51+
History = "history",
52+
Scanner = "Scanner"
5253
}
53-
type EnumMWCStartingViews = EnumMWCViews.Library | EnumMWCViews.Document;
54+
type EnumMWCStartingViews = EnumMWCViews.Library | EnumMWCViews.Document | EnumMWCViews.Scanner;
5455
declare enum EnumAllViews {
5556
Library = "library",
5657
Page = "page",
@@ -320,7 +321,6 @@ interface DocumentToolbarButtonsConfig {
320321
manage?: ToolbarButtonConfig;
321322
copyTo?: ToolbarButtonConfig;
322323
moveTo?: ToolbarButtonConfig;
323-
selectAll?: ToolbarButtonConfig;
324324
deleteImage?: ToolbarButtonConfig;
325325
shareImage?: ToolbarButtonConfig;
326326
uploadImage?: ToolbarButtonConfig;
@@ -348,6 +348,7 @@ declare class DocumentView extends MWCView {
348348
private documentTitle;
349349
private headerRenameTitleBtn;
350350
private toolbarBtn;
351+
private headerTitle;
351352
private headerActionBtn;
352353
browseViewer: BrowseViewer;
353354
private isDragged;
@@ -357,6 +358,7 @@ declare class DocumentView extends MWCView {
357358
setVisible(visible: boolean): void;
358359
private createBrowseViewer;
359360
protected createHeader(): void;
361+
private updateHeaderActionBtnStyle;
360362
protected updateHeaderTitle(): void;
361363
private handleRename;
362364
dispose(): void;
@@ -393,6 +395,11 @@ interface HistoryViewConfig {
393395
toolbarButtonsConfig?: HistoryToolbarButtonsConfig;
394396
}
395397

398+
interface MWCScanner {
399+
initialize(): Promise<any>;
400+
launch(): Promise<any>;
401+
dispose(): void;
402+
}
396403
interface MobileWebCaptureConfig {
397404
license?: string;
398405
container?: HTMLElement | string;
@@ -405,6 +412,7 @@ interface MobileWebCaptureConfig {
405412
pageViewConfig?: Pick<PageViewConfig, "container" | "toolbarButtonsConfig">;
406413
transferViewConfig?: Pick<TransferViewConfig, "container" | "toolbarButtonsConfig">;
407414
historyViewConfig?: Pick<HistoryViewConfig, "container" | "toolbarButtonsConfig">;
415+
scanner?: MWCScanner;
408416
documentScannerConfig?: Omit<DocumentScannerConfig, "container" | "license"> & {
409417
scannerViewConfig?: Omit<DocumentScannerViewConfig, "container" | "templateFilePath" | "utilizedTemplateNames" | "_showCorrectionView">;
410418
resultViewConfig?: Omit<DocumentResultViewConfig, "container">;
@@ -413,7 +421,7 @@ interface MobileWebCaptureConfig {
413421
}
414422
declare class MobileWebCapture {
415423
private config;
416-
private documentScanner;
424+
private scanner;
417425
private mwcViews;
418426
private currentView;
419427
private uploadedFiles;
@@ -439,6 +447,7 @@ declare class MobileWebCapture {
439447
private initializeDDV;
440448
private initializeMWCViews;
441449
private switchView;
450+
private processScanResult;
442451
private handleCameraCapture;
443452
private handleGalleryImport;
444453
private handleDocumentClick;
@@ -460,4 +469,5 @@ declare const MWC: {
460469
TransferView: typeof TransferView;
461470
};
462471

463-
export { DocumentView, DocumentViewConfig, EnumAllViews, EnumMWCViews, ExportConfig, LibraryView, LibraryViewConfig, MWC, MobileWebCapture, MobileWebCaptureConfig, PageView, PageViewConfig, TransferView, TransferViewConfig, UploadStatus, UploadedDocument };
472+
export { DocumentView, EnumAllViews, EnumMWCViews, LibraryView, MWC, MobileWebCapture, PageView, TransferView };
473+
export type { DocumentViewConfig, ExportConfig, LibraryViewConfig, MobileWebCaptureConfig, PageViewConfig, TransferViewConfig, UploadStatus, UploadedDocument };

dist/mwc.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mwc.mjs

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/mwc.no-content-bundle.esm.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)