UNPKG

react-native-scanbot-sdk

Version:

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

171 lines (160 loc) 5.73 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'; /** Determines, after each page is snapped, whether the acknowledgment screen should be displayed or not. - `BAD_QUALITY`: The acknowledgement screen will only be shown when the quality of a scanned page is unacceptable. The quality threshold is determined by the `minimumQuality` parameter. - `ALWAYS`: The acknowledgement screen will always be shown after each snap, regardless of the scanned page's quality. - `NONE`: The acknowledgement screen will be disabled, in effect never shown. */ export const AcknowledgementModeValues = ['BAD_QUALITY', 'ALWAYS', 'NONE']; /** Configuration of the bottom bar for the acknowledgement screen. */ export class AcknowledgementBottomBar extends PartiallyConstructible { /** Configuration of the 'retake' button. */ 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. */ 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. */ 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' }) }); /** @param source {@displayType `DeepPartial<AcknowledgementBottomBar>`} */ constructor(source = {}) { super(); 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 { /** Configuration of the title, located in the top bar. */ 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 */ minimumQuality = 'POOR'; /** Determines, after each page is snapped, whether the acknowledgment screen should be displayed or not. Default is ALWAYS */ acknowledgementMode = 'ALWAYS'; /** Configuration of the hint that explains that the quality of the scanned page is unacceptable. */ 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" */ backgroundColor = '?sbColorOutline'; /** Configuration of the bottom bar for the acknowledgement screen. */ bottomBar = new AcknowledgementBottomBar({}); /** @param source {@displayType `DeepPartial<AcknowledgementScreenConfiguration>`} */ constructor(source = {}) { super(); 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