UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

132 lines (119 loc) 4.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TwoLineMrzFinderLayoutPreset = exports.ThreeLineMrzFinderLayoutPreset = exports.NoLayoutPreset = exports.MrzFinderLayoutPreset = void 0; var _utils = require("../../utils/utils"); /// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/mrz/MRZFinderLayoutPreset.yaml /** Source of the text for the MRZ finder example overlay. */ /** @internal */ let MrzFinderLayoutPreset = exports.MrzFinderLayoutPreset = void 0; (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 || (exports.MrzFinderLayoutPreset = MrzFinderLayoutPreset = {})); /** A ready-to-use preset 2-line text to be displayed. */ class TwoLineMrzFinderLayoutPreset extends _utils.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. */ exports.TwoLineMrzFinderLayoutPreset = TwoLineMrzFinderLayoutPreset; class ThreeLineMrzFinderLayoutPreset extends _utils.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. */ exports.ThreeLineMrzFinderLayoutPreset = ThreeLineMrzFinderLayoutPreset; class NoLayoutPreset extends _utils.PartiallyConstructible { _type = 'NoLayoutPreset'; /** @param source {@displayType `DeepPartial<NoLayoutPreset>`} */ constructor(source = {}) { super(); } } exports.NoLayoutPreset = NoLayoutPreset; //# sourceMappingURL=MRZFinderLayoutPreset.js.map