Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordova-plugin-abbyy-rtr-sdk version 1.0.9 new option update #2915

Merged
merged 2 commits into from
Feb 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 32 additions & 27 deletions src/@ionic-native/plugins/abbyy-rtr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ declare const AbbyyRtrSdk: any;
* default setting will be used.
*/
export interface TextCaptureOptions {

/**
* The name of the license file. This file must be located in the
* www/rtr_assets/ directory in your project.
Expand Down Expand Up @@ -57,14 +56,18 @@ export interface TextCaptureOptions {
* the latest recognition result.
*/
isStopButtonVisible?: boolean;

/**
* Specify the orientation, possible values 'landscape' or 'portrait'.
*/
orientation?: string;
}

/**
* JSON object that represents text recognition results.
* The callback you implement should parse this object and show results to user.
*/
export interface TextCaptureResult {

/**
* An array of objects representing recognized lines of text.
* These objects have the following keys:
Expand All @@ -75,7 +78,7 @@ export interface TextCaptureResult {
* · rect (string): position and size of the bounding rectangle,
* a string of 4 integers separated with whitespaces ("x y width height").
*/
textLines: { text: string, quadrangle: string, rect?: string }[];
textLines: { text: string; quadrangle: string; rect?: string }[];

/**
* Additional information. This object has the following keys:
Expand All @@ -91,10 +94,10 @@ export interface TextCaptureResult {
* the array contains language identifiers (["English", "French", "German"]).
*/
resultInfo: {
stabilityStatus: string,
userAction: string,
frameSize: string,
recognitionLanguages: string[]
stabilityStatus: string;
userAction: string;
frameSize: string;
recognitionLanguages: string[];
};

/**
Expand All @@ -114,7 +117,6 @@ export interface TextCaptureResult {
* keys: you must specify either one of them, but not both at the same time.
*/
export interface DataCaptureOptions {

/**
* The predefined data capture profile to use, for example: "MRZ".
* Note: For the list of supported documents, see Specifications — Data
Expand All @@ -134,10 +136,10 @@ export interface DataCaptureOptions {
* the regular expression that should be matched when capturing a field.
*/
customDataCaptureScenario?: {
name: string,
description: string,
recognitionLanguages: string[],
fields: { regEx: string }[]
name: string;
description: string;
recognitionLanguages: string[];
fields: { regEx: string }[];
};

/**
Expand Down Expand Up @@ -175,14 +177,18 @@ export interface DataCaptureOptions {
* the latest recognition result.
*/
isStopButtonVisible?: boolean;

/**
* Specify the orientation, possible values 'landscape' or 'portrait'.
*/
orientation?: string;
}

/**
* JSON object that represents data recognition results. The callback you
* implement should parse this object and show results to user.
*/
export interface DataCaptureResult {

/**
* The data scheme which was applied during data capture.
* The value is an object which has two keys:
Expand All @@ -195,8 +201,8 @@ export interface DataCaptureResult {
* present in the result.
*/
dataScheme?: {
id: string,
name: string
id: string;
name: string;
};

/**
Expand All @@ -222,15 +228,15 @@ export interface DataCaptureResult {
* of 4 integers separated with whitespaces ("x y width height").
*/
dataFields: {
id: string,
name: string,
text: string,
quadrangle: string,
id: string;
name: string;
text: string;
quadrangle: string;
components: {
text: string,
quadrangle: string,
rect: string
}
text: string;
quadrangle: string;
rect: string;
};
};

/**
Expand All @@ -245,9 +251,9 @@ export interface DataCaptureResult {
* with 2 integers separated with a whitespace ("720 1280").
*/
resultInfo: {
stabilityStatus: string,
userAction: string,
frameSize: string
stabilityStatus: string;
userAction: string;
frameSize: string;
};

/**
Expand Down Expand Up @@ -297,7 +303,6 @@ export interface DataCaptureResult {
})
@Injectable()
export class AbbyyRTR extends IonicNativePlugin {

/**
* Opens a modal dialog with controls for the Text Capture scenario.
* @param {TextCaptureOptions} options
Expand Down