capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
116 lines (109 loc) • 4.33 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/mrz/MRZFinderLayoutPreset.yaml
import { PartiallyConstructible } from '../../utils/utils';
/** @internal */
export var MrzFinderLayoutPreset;
(function (MrzFinderLayoutPreset) {
/** @internal */
function From(source) {
const _type = source['_type'];
switch (_type) {
case 'TwoLineMRZFinderLayoutPreset':
return new TwoLineMrzFinderLayoutPreset(source);
case 'ThreeLineMRZFinderLayoutPreset':
return new ThreeLineMrzFinderLayoutPreset(source);
case 'NoLayoutPreset':
return new NoLayoutPreset(source);
default:
throw `Unknown child class name: ${_type}`;
}
}
MrzFinderLayoutPreset.From = From;
})(MrzFinderLayoutPreset || (MrzFinderLayoutPreset = {}));
/**
A ready-to-use preset 2-line text to be displayed.
*/
export class TwoLineMrzFinderLayoutPreset extends PartiallyConstructible {
/** @param source {@displayType `DeepPartial<TwoLineMrzFinderLayoutPreset>`} */
constructor(source = {}) {
super();
this._type = 'TwoLineMRZFinderLayoutPreset';
/**
The first line of the MRZ text.
Default is "I<USASMITH<<JACK<<<<<<<<<<<<<<<<<<<<"
*/
this.mrzTextLine1 = 'I<USASMITH<<JACK<<<<<<<<<<<<<<<<<<<<';
/**
The second line of the MRZ text.
Default is "2342353464USA9602300M2904076<<<<<<<2"
*/
this.mrzTextLine2 = '2342353464USA9602300M2904076<<<<<<<2';
/**
Aspect ratio of the finder adjusted to the 2-line MRZ text. Not editable. To override, please use 'aspectRatio' parameter in 'viewFinder' field in MRZ screen configuration.
Default is 5.390625
*/
this.adjustedFinderAspectRatio = 5.390625;
if (source.mrzTextLine1 !== undefined) {
this.mrzTextLine1 = source.mrzTextLine1;
}
if (source.mrzTextLine2 !== undefined) {
this.mrzTextLine2 = source.mrzTextLine2;
}
if (source.adjustedFinderAspectRatio !== undefined) {
this.adjustedFinderAspectRatio = source.adjustedFinderAspectRatio;
}
}
}
/**
A ready-to-use preset 3-line text to be displayed.
*/
export class ThreeLineMrzFinderLayoutPreset extends PartiallyConstructible {
/** @param source {@displayType `DeepPartial<ThreeLineMrzFinderLayoutPreset>`} */
constructor(source = {}) {
super();
this._type = 'ThreeLineMRZFinderLayoutPreset';
/**
The first line of the MRZ text.
Default is "I<USA2342353464<<<<<<<<<<<<<<<"
*/
this.mrzTextLine1 = 'I<USA2342353464<<<<<<<<<<<<<<<';
/**
The second line of the MRZ text.
Default is "9602300M2904076USA<<<<<<<<<<<2"
*/
this.mrzTextLine2 = '9602300M2904076USA<<<<<<<<<<<2';
/**
The third line of the MRZ text.
Default is "SMITH<<JACK<<<<<<<<<<<<<<<<<<<"
*/
this.mrzTextLine3 = 'SMITH<<JACK<<<<<<<<<<<<<<<<<<<';
/**
Aspect ratio of the finder adjusted to the 3-line MRZ text. Not editable. To override, please use 'aspectRatio' parameter in 'viewFinder' field in MRZ screen configuration.
Default is 4.3125
*/
this.adjustedFinderAspectRatio = 4.3125;
if (source.mrzTextLine1 !== undefined) {
this.mrzTextLine1 = source.mrzTextLine1;
}
if (source.mrzTextLine2 !== undefined) {
this.mrzTextLine2 = source.mrzTextLine2;
}
if (source.mrzTextLine3 !== undefined) {
this.mrzTextLine3 = source.mrzTextLine3;
}
if (source.adjustedFinderAspectRatio !== undefined) {
this.adjustedFinderAspectRatio = source.adjustedFinderAspectRatio;
}
}
}
/**
No layout preset.
*/
export class NoLayoutPreset extends PartiallyConstructible {
/** @param source {@displayType `DeepPartial<NoLayoutPreset>`} */
constructor(source = {}) {
super();
this._type = 'NoLayoutPreset';
}
}
//# sourceMappingURL=MRZFinderLayoutPreset.js.map