UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

122 lines (119 loc) 5.72 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/document/AcknowledgementScreenConfiguration.yaml import { BackgroundStyle, BarButtonConfiguration, IconStyle, StyledText } from '../../ui_v2/common/Common'; import { IconUserGuidanceConfiguration } from '../../ui_v2/common/UserGuidanceConfiguration'; import { PartiallyConstructible } from '../../utils/utils'; export const AcknowledgementModeValues = ['BAD_QUALITY', 'ALWAYS', 'NONE']; /** Configuration of the bottom bar for the acknowledgement screen. */ export class AcknowledgementBottomBar extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<AcknowledgementBottomBar>`} */ constructor(source = {}) { super(); /** Configuration of the 'retake' button. */ this.retakeButton = new BarButtonConfiguration({ title: new StyledText({ text: '?acknowledgementRetakeButtonTitle', color: '?sbColorOnPrimary' }), accessibilityDescription: '?accessibilityDescriptionAcknowledgementRetakeButton', background: new BackgroundStyle({ strokeColor: '#00000000', fillColor: '#00000000', strokeWidth: 0.0 }), icon: new IconStyle({ color: '?sbColorOnPrimary' }), }); /** Configuration of the 'accept' button, when the quality of the scanned page is acceptable. */ this.acceptWhenOkButton = new BarButtonConfiguration({ title: new StyledText({ text: '?acknowledgementAcceptButtonTitle', color: '?sbColorOnPrimary' }), accessibilityDescription: '?accessibilityDescriptionAcknowledgementAcceptButton', background: new BackgroundStyle({ strokeColor: '#00000000', fillColor: '#00000000', strokeWidth: 0.0 }), icon: new IconStyle({ color: '?sbColorOnPrimary' }), }); /** Configuration of the 'accept' button, when the quality of the scanned page is unacceptable. */ this.acceptWhenNotOkButton = new BarButtonConfiguration({ title: new StyledText({ text: '?acknowledgementAcceptButtonTitle', color: '?sbColorOnPrimary' }), accessibilityDescription: '?accessibilityDescriptionAcknowledgementAcceptButton', background: new BackgroundStyle({ strokeColor: '#00000000', fillColor: '#00000000', strokeWidth: 0.0 }), icon: new IconStyle({ color: '?sbColorOnPrimary' }), }); if (source.retakeButton !== undefined) { this.retakeButton = new BarButtonConfiguration(source.retakeButton); } if (source.acceptWhenOkButton !== undefined) { this.acceptWhenOkButton = new BarButtonConfiguration(source.acceptWhenOkButton); } if (source.acceptWhenNotOkButton !== undefined) { this.acceptWhenNotOkButton = new BarButtonConfiguration(source.acceptWhenNotOkButton); } } } /** Configuration of the acknowledgement screen. */ export class AcknowledgementScreenConfiguration extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<AcknowledgementScreenConfiguration>`} */ constructor(source = {}) { super(); /** Configuration of the title, located in the top bar. */ this.topBarTitle = new StyledText({ visible: false, text: '?acknowledgementTitle', color: '?sbColorOnPrimary', }); /** The minimum quality of a scanned page to be deemed acceptable. Used in conjunction with the acknowledgement mode. Default is POOR */ this.minimumQuality = 'POOR'; /** Determines, after each page is snapped, whether the acknowledgment screen should be displayed or not. Default is ALWAYS */ this.acknowledgementMode = 'ALWAYS'; /** Configuration of the hint that explains that the quality of the scanned page is unacceptable. */ this.badImageHint = new IconUserGuidanceConfiguration({ visible: true, icon: new IconStyle({ color: '?sbColorOnPrimary' }), title: new StyledText({ text: '?acknowledgementScreenBadDocumentHint', color: '?sbColorOnPrimary' }), background: new BackgroundStyle({ strokeColor: '?sbColorNegative', fillColor: '?sbColorNegative', strokeWidth: 0.0, }), }); /** The background color of the acknowledgement screen. Default is "?sbColorOutline" */ this.backgroundColor = '?sbColorOutline'; /** Configuration of the bottom bar for the acknowledgement screen. */ this.bottomBar = new AcknowledgementBottomBar({}); if (source.topBarTitle !== undefined) { this.topBarTitle = new StyledText(source.topBarTitle); } if (source.minimumQuality !== undefined) { this.minimumQuality = source.minimumQuality; } if (source.acknowledgementMode !== undefined) { this.acknowledgementMode = source.acknowledgementMode; } if (source.badImageHint !== undefined) { this.badImageHint = new IconUserGuidanceConfiguration(source.badImageHint); } if (source.backgroundColor !== undefined) { this.backgroundColor = source.backgroundColor; } if (source.bottomBar !== undefined) { this.bottomBar = new AcknowledgementBottomBar(source.bottomBar); } } } //# sourceMappingURL=AcknowledgementScreenConfiguration.js.map