UNPKG

react-native-scanbot-sdk

Version:

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

110 lines (98 loc) 3.94 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/documentdataextractor/DocumentDataExtractorUserGuidance.yaml import { BackgroundStyle, StyledText } from '../../ui_v2/common/Common'; import { DeepPartial, PartiallyConstructible } from '../../utils/utils'; /** Configure the captions of the user guidance hints for different scanning states. */ export class DocumentDataExtractorGuidanceStates extends PartiallyConstructible { /** The user guidance text displayed when no document is found. Initial state. Default is "?documentUserGuidanceNoDocumentFound" */ public noDocumentFound: string = '?documentUserGuidanceNoDocumentFound'; /** The user guidance text displayed when a document presence was detected and scanning is in progress. Default is "?documentUserGuidanceScanningProgress" */ public scanningProgress: string = '?documentUserGuidanceScanningProgress'; /** The user guidance text displayed when it is too dark to capture an adequate image. Default is "?documentUserGuidanceTooDark" */ public tooDark: string = '?documentUserGuidanceTooDark'; /** The user guidance text displayed when the detected document is too far away and appears too small. Default is "?documentUserGuidanceTooSmall" */ public tooSmall: string = '?documentUserGuidanceTooSmall'; /** The user guidance text displayed when the detected document is not in a good perspective (device tilted). Default is "?documentUserGuidanceBadPerspective" */ public badPerspective: string = '?documentUserGuidanceBadPerspective'; /** @param source {@displayType `DeepPartial<DocumentDataExtractorGuidanceStates>`} */ public constructor(source: DeepPartial<DocumentDataExtractorGuidanceStates> = {}) { super(); if (source.noDocumentFound !== undefined) { this.noDocumentFound = source.noDocumentFound; } if (source.scanningProgress !== undefined) { this.scanningProgress = source.scanningProgress; } if (source.tooDark !== undefined) { this.tooDark = source.tooDark; } if (source.tooSmall !== undefined) { this.tooSmall = source.tooSmall; } if (source.badPerspective !== undefined) { this.badPerspective = source.badPerspective; } } } /** Configuration of the hints guiding users through the document scanning process. */ export class DocumentDataExtractorGuidanceConfiguration extends PartiallyConstructible { /** Determines whether the user guidance hints should be visible (enabled). Default is true */ public visibility: boolean = true; /** Configure the text style for the user guidance hints. */ public title: StyledText = new StyledText({ text: '?documentUserGuidanceNoDocumentFound', color: '?sbColorOnPrimary', }); /** Configure the background style for the user guidance hints. */ public background: BackgroundStyle = new BackgroundStyle({ strokeColor: '#00000000', fillColor: '?sbColorSurfaceLow', }); /** Configure the captions of the user guidance hints for different states. */ public statesTitles: DocumentDataExtractorGuidanceStates = new DocumentDataExtractorGuidanceStates({}); /** @param source {@displayType `DeepPartial<DocumentDataExtractorGuidanceConfiguration>`} */ public constructor(source: DeepPartial<DocumentDataExtractorGuidanceConfiguration> = {}) { super(); if (source.visibility !== undefined) { this.visibility = source.visibility; } if (source.title !== undefined) { this.title = new StyledText(source.title); } if (source.background !== undefined) { this.background = new BackgroundStyle(source.background); } if (source.statesTitles !== undefined) { this.statesTitles = new DocumentDataExtractorGuidanceStates(source.statesTitles); } } }