scanbot-web-sdk 4.0.0-beta.1 → 4.0.0-rc.2
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/@types/model/configuration/base-configuration.d.ts +9 -0
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +24 -1
- package/@types/model/configuration/vin-scanner-configuration.d.ts +10 -0
- package/@types/scanbot-sdk.d.ts +3 -0
- package/@types/text-data-scanner-view.d.ts +7 -4
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +1 -1
- package/bundle/ScanbotSDK.min.js +3 -3
- package/package.json +1 -1
|
@@ -14,4 +14,13 @@ export declare class BaseConfiguration {
|
|
|
14
14
|
static mapValues(source: any, destination: {
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}, ignore?: string[]): void;
|
|
17
|
+
static mapValuesDeep(source: any, destination: {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}): void;
|
|
20
|
+
/** Instantiate a new configuration object of type T and merge any of its values with the values provided
|
|
21
|
+
* in the partialConfigurationObject.
|
|
22
|
+
*/
|
|
23
|
+
protected static _fromJson<T extends BaseConfiguration>(t: {
|
|
24
|
+
new (): T;
|
|
25
|
+
}, partialConfigurationObject: any): T;
|
|
17
26
|
}
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import { TextDataScannerResult } from "../generic-text-line-recognizer/text-data-scanner-result";
|
|
2
2
|
import { ScannerConfiguration } from "./scanner-configuration";
|
|
3
|
+
import { TextStyleConfiguration } from "./text-style-configuration";
|
|
4
|
+
import { WindowStyleConfiguration } from "./window-style-configuration";
|
|
3
5
|
import { ViewFinderConfiguration } from "./view-finder-configuration";
|
|
6
|
+
declare class TextDataScannerWindowStyle implements WindowStyleConfiguration {
|
|
7
|
+
aspectRatio: number;
|
|
8
|
+
widthProportion: number;
|
|
9
|
+
borderColor: string;
|
|
10
|
+
left: string;
|
|
11
|
+
top: string;
|
|
12
|
+
transform: string;
|
|
13
|
+
}
|
|
14
|
+
declare class TextDataScannerTextStyle implements TextStyleConfiguration {
|
|
15
|
+
color: string;
|
|
16
|
+
size: string;
|
|
17
|
+
weight: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class TextDataScannerViewFinderStyle implements ViewFinderConfiguration {
|
|
20
|
+
window: TextDataScannerWindowStyle;
|
|
21
|
+
text: TextDataScannerTextStyle;
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
hint: string;
|
|
24
|
+
}
|
|
4
25
|
export declare type ValidatorPreset = "VehicleIdentificationNumber";
|
|
26
|
+
export declare type TextDetectionCallback = (e: TextDataScannerResult) => void;
|
|
5
27
|
export declare class TextDataScannerConfiguration extends ScannerConfiguration {
|
|
6
28
|
constructor();
|
|
7
29
|
ocrResolutionLimit?: number;
|
|
8
30
|
supportedLanguages?: string[];
|
|
9
31
|
validatorPreset?: ValidatorPreset;
|
|
10
32
|
style?: ViewFinderConfiguration;
|
|
11
|
-
onTextDetected?:
|
|
33
|
+
onTextDetected?: TextDetectionCallback;
|
|
12
34
|
static fromJson(json: any): TextDataScannerConfiguration;
|
|
13
35
|
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScannerConfiguration } from "./scanner-configuration";
|
|
2
|
+
import { ViewFinderConfiguration } from "./view-finder-configuration";
|
|
3
|
+
import { TextDetectionCallback } from "./text-data-scanner-configuration";
|
|
4
|
+
export declare class VINScannerConfiguration extends ScannerConfiguration {
|
|
5
|
+
constructor();
|
|
6
|
+
ocrResolutionLimit?: number;
|
|
7
|
+
style?: ViewFinderConfiguration;
|
|
8
|
+
onTextDetected?: TextDetectionCallback;
|
|
9
|
+
static fromJson(json: any): VINScannerConfiguration;
|
|
10
|
+
}
|
package/@types/scanbot-sdk.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
|
|
|
21
21
|
import OcrEngine from "./service/ocr-engine";
|
|
22
22
|
import { ContourDetectionResult } from "./model/document/contour-detection-result";
|
|
23
23
|
import { TextDataScannerConfiguration } from "./model/configuration/text-data-scanner-configuration";
|
|
24
|
+
import { VINScannerConfiguration } from "./model/configuration/vin-scanner-configuration";
|
|
24
25
|
import { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
|
|
25
26
|
import DocumentQualityAnalyzerConfiguration from "./model/configuration/document-quality-analyzer-configuration";
|
|
26
27
|
import DocumentQualityAnalyzer from "./service/document-quality-analyzer";
|
|
@@ -38,6 +39,7 @@ export default class ScanbotSDK {
|
|
|
38
39
|
createBarcodeScanner(configuration: BarcodeScannerConfiguration): Promise<IBarcodeScannerHandle>;
|
|
39
40
|
openCroppingView(configuration: CroppingViewConfiguration): Promise<ICroppingViewHandle>;
|
|
40
41
|
createTextDataScanner(configuration: TextDataScannerConfiguration): Promise<ITextDataScannerHandle>;
|
|
42
|
+
createVINScanner(configuration: VINScannerConfiguration): Promise<ITextDataScannerHandle>;
|
|
41
43
|
/**
|
|
42
44
|
* Image Operations
|
|
43
45
|
*/
|
|
@@ -67,4 +69,5 @@ export default class ScanbotSDK {
|
|
|
67
69
|
throwIfMissing(property: any, message: string): void;
|
|
68
70
|
release(object: any, source?: string): Promise<void>;
|
|
69
71
|
private licenseCheck;
|
|
72
|
+
private createGenericTextLineScanner;
|
|
70
73
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
|
|
3
|
-
import {
|
|
3
|
+
import { TextDetectionCallback } from "./model/configuration/text-data-scanner-configuration";
|
|
4
4
|
import { ViewFinder } from "./view/view-finder";
|
|
5
5
|
import TextDataScanner from "./service/text-data-recognizer";
|
|
6
|
+
import { ScannerConfiguration } from "./model/configuration/scanner-configuration";
|
|
7
|
+
import { ViewFinderConfiguration } from "./model/configuration/view-finder-configuration";
|
|
6
8
|
export declare class TextDataScannerProps extends ScanbotCameraProps {
|
|
7
9
|
textDataScanner: TextDataScanner;
|
|
10
|
+
onTextDetected: TextDetectionCallback;
|
|
11
|
+
style: ViewFinderConfiguration;
|
|
8
12
|
}
|
|
9
13
|
export declare class TextDataScannerState extends ScanbotCameraState {
|
|
10
14
|
isFinderVisible?: boolean;
|
|
@@ -14,14 +18,13 @@ export default class TextDataScannerView extends ScannerView<TextDataScannerProp
|
|
|
14
18
|
finder?: ViewFinder;
|
|
15
19
|
shouldComputeSize: boolean;
|
|
16
20
|
private paused;
|
|
17
|
-
private _configuration?;
|
|
18
21
|
constructor(props: TextDataScannerProps);
|
|
19
|
-
get configuration():
|
|
22
|
+
get configuration(): ScannerConfiguration;
|
|
20
23
|
get enabled(): boolean;
|
|
21
24
|
/**
|
|
22
25
|
* Public API functions
|
|
23
26
|
*/
|
|
24
|
-
static create(configuration:
|
|
27
|
+
static create(configuration: ScannerConfiguration, style: ViewFinderConfiguration, onTextDetected: TextDetectionCallback, textDataScanner: TextDataScanner): Promise<TextDataScannerView>;
|
|
25
28
|
isDetectionPaused(): boolean;
|
|
26
29
|
resumeDetection(): Promise<void>;
|
|
27
30
|
pauseDetection(): void;
|
|
@@ -15,6 +15,6 @@ export default class BarcodePolygonLabel extends React.Component<BarcodePolygonL
|
|
|
15
15
|
style(style: BarcodePolygonLabelStyle): void;
|
|
16
16
|
update(model: BarcodeOverlay): void;
|
|
17
17
|
label: HTMLDivElement;
|
|
18
|
-
formatText(code: Barcode, format: SelectionOverlayTextFormat): string;
|
|
18
|
+
formatText(code: Barcode, format: SelectionOverlayTextFormat): string | undefined;
|
|
19
19
|
render(): React.ReactNode;
|
|
20
20
|
}
|