react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
125 lines (111 loc) • 3.86 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/mrz/MRZFinderLayoutPreset.yaml
import { PartiallyConstructible } from '../../utils/utils';
/**
Source of the text for the MRZ finder example overlay.
*/
/** @internal */
export let MrzFinderLayoutPreset;
(function (_MrzFinderLayoutPreset) {
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 {
_type = 'TwoLineMRZFinderLayoutPreset';
/**
The first line of the MRZ text.
Default is "I<USASMITH<<JACK<<<<<<<<<<<<<<<<<<<<"
*/
mrzTextLine1 = 'I<USASMITH<<JACK<<<<<<<<<<<<<<<<<<<<';
/**
The second line of the MRZ text.
Default is "2342353464USA9602300M2904076<<<<<<<2"
*/
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
*/
adjustedFinderAspectRatio = 5.390625;
/** @param source {@displayType `DeepPartial<TwoLineMrzFinderLayoutPreset>`} */
constructor(source = {}) {
super();
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 {
_type = 'ThreeLineMRZFinderLayoutPreset';
/**
The first line of the MRZ text.
Default is "I<USA2342353464<<<<<<<<<<<<<<<"
*/
mrzTextLine1 = 'I<USA2342353464<<<<<<<<<<<<<<<';
/**
The second line of the MRZ text.
Default is "9602300M2904076USA<<<<<<<<<<<2"
*/
mrzTextLine2 = '9602300M2904076USA<<<<<<<<<<<2';
/**
The third line of the MRZ text.
Default is "SMITH<<JACK<<<<<<<<<<<<<<<<<<<"
*/
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
*/
adjustedFinderAspectRatio = 4.3125;
/** @param source {@displayType `DeepPartial<ThreeLineMrzFinderLayoutPreset>`} */
constructor(source = {}) {
super();
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 {
_type = 'NoLayoutPreset';
/** @param source {@displayType `DeepPartial<NoLayoutPreset>`} */
constructor(source = {}) {
super();
}
}
//# sourceMappingURL=MRZFinderLayoutPreset.js.map