UNPKG

react-native-scanbot-sdk

Version:

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

216 lines (198 loc) 7.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextPatternScannerIntroScreenConfiguration = exports.TextPatternScannerIntroImage = exports.TextPatternIntroShippingContainer = exports.TextPatternIntroNoImage = exports.TextPatternIntroMeterDevice = exports.TextPatternIntroGeneralField = exports.TextPatternIntroCustomImage = exports.TextPatternIntroAlphabeticField = void 0; var _Common = require("../../ui_v2/common/Common"); var _utils = require("../../utils/utils"); /// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/textpattern/TextPatternScannerIntroScreenConfiguration.yaml /** The image for the introduction screen of a generic text scanner screen. */ /** @internal */ let TextPatternScannerIntroImage = exports.TextPatternScannerIntroImage = void 0; (function (_TextPatternScannerIntroImage) { function From(source) { const _type = source._type; switch (_type) { case 'TextPatternIntroGeneralField': return new TextPatternIntroGeneralField(source); case 'TextPatternIntroAlphabeticField': return new TextPatternIntroAlphabeticField(source); case 'TextPatternIntroMeterDevice': return new TextPatternIntroMeterDevice(source); case 'TextPatternIntroShippingContainer': return new TextPatternIntroShippingContainer(source); case 'TextPatternIntroNoImage': return new TextPatternIntroNoImage(source); case 'TextPatternIntroCustomImage': return new TextPatternIntroCustomImage(source); default: throw `Unknown child class name: ${_type}`; } } _TextPatternScannerIntroImage.From = From; })(TextPatternScannerIntroImage || (exports.TextPatternScannerIntroImage = TextPatternScannerIntroImage = {})); /** The image for the introduction screen featuring a general text field. */ class TextPatternIntroGeneralField extends _utils.PartiallyConstructible { _type = 'TextPatternIntroGeneralField'; /** @param source {@displayType `DeepPartial<TextPatternIntroGeneralField>`} */ constructor(source = {}) { super(); } } /** The image for the introduction screen featuring an alphabetic text field. */ exports.TextPatternIntroGeneralField = TextPatternIntroGeneralField; class TextPatternIntroAlphabeticField extends _utils.PartiallyConstructible { _type = 'TextPatternIntroAlphabeticField'; /** @param source {@displayType `DeepPartial<TextPatternIntroAlphabeticField>`} */ constructor(source = {}) { super(); } } /** The image for the introduction screen featuring an electricity meter. */ exports.TextPatternIntroAlphabeticField = TextPatternIntroAlphabeticField; class TextPatternIntroMeterDevice extends _utils.PartiallyConstructible { _type = 'TextPatternIntroMeterDevice'; /** @param source {@displayType `DeepPartial<TextPatternIntroMeterDevice>`} */ constructor(source = {}) { super(); } } /** The image for the introduction screen showing a text on a shipping container. */ exports.TextPatternIntroMeterDevice = TextPatternIntroMeterDevice; class TextPatternIntroShippingContainer extends _utils.PartiallyConstructible { _type = 'TextPatternIntroShippingContainer'; /** @param source {@displayType `DeepPartial<TextPatternIntroShippingContainer>`} */ constructor(source = {}) { super(); } } /** No image for the introduction screen. */ exports.TextPatternIntroShippingContainer = TextPatternIntroShippingContainer; class TextPatternIntroNoImage extends _utils.PartiallyConstructible { _type = 'TextPatternIntroNoImage'; /** @param source {@displayType `DeepPartial<TextPatternIntroNoImage>`} */ constructor(source = {}) { super(); } } /** A custom image for the introduction screen. */ exports.TextPatternIntroNoImage = TextPatternIntroNoImage; class TextPatternIntroCustomImage extends _utils.PartiallyConstructible { _type = 'TextPatternIntroCustomImage'; /** The web or file URI to the image. */ /** @param source {@displayType `DeepPartial<TextPatternIntroCustomImage>`} */ constructor(source = {}) { super(); if (source.uri !== undefined) { this.uri = source.uri; } else { throw new Error('uri must be present in constructor argument'); } } } /** Configuration of the introduction screen for the generic text scanner. */ exports.TextPatternIntroCustomImage = TextPatternIntroCustomImage; class TextPatternScannerIntroScreenConfiguration extends _utils.PartiallyConstructible { /** The image for the introduction screen. */ image = new TextPatternIntroGeneralField({}); /** The background color of the introduction screen. Default is "?sbColorSurface" */ backgroundColor = '?sbColorSurface'; /** The divider color of the introduction screen. Default is "?sbColorOutline" */ dividerColor = '?sbColorOutline'; /** The handle color of the introduction screen. Default is "?sbColorOutline" */ handlerColor = '?sbColorOutline'; /** Determines whether the introduction screen should automatically be shown or not when the scanning session starts. Default is false */ showAutomatically = false; /** The title of the introduction screen, located in the top bar. */ title = new _Common.StyledText({ text: '?introScreenTitle', color: '?sbColorOnSurface' }); /** The text explanation of the introduction screen. */ explanation = new _Common.StyledText({ text: '?introScreenText', color: '?sbColorOnSurface' }); /** Configuration of the 'Done' / 'Start scanning' button. */ doneButton = new _Common.ButtonConfiguration({ text: '?introScreenDoneButton', accessibilityDescription: '?accessibilityDescriptionIntroScreenDoneButton', background: new _Common.BackgroundStyle({ strokeColor: '#00000000', fillColor: '?sbColorPrimary', strokeWidth: 0.0 }), foreground: new _Common.ForegroundStyle({ color: '?sbColorOnPrimary' }) }); /** @param source {@displayType `DeepPartial<TextPatternScannerIntroScreenConfiguration>`} */ constructor(source = {}) { super(); if (source.image !== undefined) { this.image = TextPatternScannerIntroImage.From(source.image); } if (source.backgroundColor !== undefined) { this.backgroundColor = source.backgroundColor; } if (source.dividerColor !== undefined) { this.dividerColor = source.dividerColor; } if (source.handlerColor !== undefined) { this.handlerColor = source.handlerColor; } if (source.showAutomatically !== undefined) { this.showAutomatically = source.showAutomatically; } if (source.title !== undefined) { this.title = new _Common.StyledText(source.title); } if (source.explanation !== undefined) { this.explanation = new _Common.StyledText(source.explanation); } if (source.doneButton !== undefined) { this.doneButton = new _Common.ButtonConfiguration(source.doneButton); } } } exports.TextPatternScannerIntroScreenConfiguration = TextPatternScannerIntroScreenConfiguration; //# sourceMappingURL=TextPatternScannerIntroScreenConfiguration.js.map