UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

138 lines (134 loc) 5.14 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/check/CheckScannerIntroScreenConfiguration.yaml import { BackgroundStyle, ButtonConfiguration, ForegroundStyle, StyledText } from '../../ui_v2/common/Common'; import { PartiallyConstructible } from '../../utils/utils'; /** @internal */ export var CheckScannerIntroImage; (function (CheckScannerIntroImage) { /** @internal */ function From(source) { const _type = source['_type']; switch (_type) { case 'CheckIntroDefaultImage': return new CheckIntroDefaultImage(source); case 'CheckNoImage': return new CheckNoImage(source); case 'CheckIntroCustomImage': return new CheckIntroCustomImage(source); default: throw `Unknown child class name: ${_type}`; } } CheckScannerIntroImage.From = From; })(CheckScannerIntroImage || (CheckScannerIntroImage = {})); /** No image for the introduction screen. */ export class CheckIntroDefaultImage extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<CheckIntroDefaultImage>`} */ constructor(source = {}) { super(); this._type = 'CheckIntroDefaultImage'; } } /** No image for the introduction screen. */ export class CheckNoImage extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<CheckNoImage>`} */ constructor(source = {}) { super(); this._type = 'CheckNoImage'; } } /** A custom image for the introduction screen. */ export class CheckIntroCustomImage extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<CheckIntroCustomImage>`} */ constructor(source = {}) { super(); this._type = 'CheckIntroCustomImage'; 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 check scanner. */ export class CheckScannerIntroScreenConfiguration extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<CheckScannerIntroScreenConfiguration>`} */ constructor(source = {}) { super(); /** The image for the introduction screen. */ this.image = new CheckIntroDefaultImage({}); /** The background color of the introduction screen. Default is "?sbColorSurface" */ this.backgroundColor = '?sbColorSurface'; /** The divider color of the introduction screen. Default is "?sbColorOutline" */ this.dividerColor = '?sbColorOutline'; /** The handle color of the introduction screen. Default is "?sbColorOutline" */ this.handlerColor = '?sbColorOutline'; /** Determines whether the introduction screen should automatically be shown or not when the scanning session starts. Default is false */ this.showAutomatically = false; /** The title of the introduction screen, located in the top bar. */ this.title = new StyledText({ text: '?introScreenTitle', color: '?sbColorOnSurface' }); /** The text explanation of the introduction screen. */ this.explanation = new StyledText({ text: '?introScreenText', color: '?sbColorOnSurface' }); /** Configuration of the 'Done' / 'Start scanning' button. */ this.doneButton = new ButtonConfiguration({ text: '?introScreenDoneButton', accessibilityDescription: '?accessibilityDescriptionIntroScreenDoneButton', background: new BackgroundStyle({ strokeColor: '#00000000', fillColor: '?sbColorPrimary', strokeWidth: 0.0 }), foreground: new ForegroundStyle({ color: '?sbColorOnPrimary' }), }); if (source.image !== undefined) { this.image = CheckScannerIntroImage.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 StyledText(source.title); } if (source.explanation !== undefined) { this.explanation = new StyledText(source.explanation); } if (source.doneButton !== undefined) { this.doneButton = new ButtonConfiguration(source.doneButton); } } } //# sourceMappingURL=CheckScannerIntroScreenConfiguration.js.map