UNPKG

scanbot-web-sdk

Version:

Scanbot Web Document and Barcode Scanner SDK

313 lines (312 loc) 12.1 kB
import type { DeepPartial } from "../utils"; import { ActionBarConfiguration } from "../common/ActionBarConfiguration"; import { CameraConfiguration } from "../common/CameraConfiguration"; import { CameraPermissionScreen } from "../common/CameraPermission"; import { CheckScannerConfiguration } from "../CheckScannerTypes"; import { CheckScannerGuidanceConfiguration } from "../check/CheckScannerUserGuidance"; import { CheckScannerIntroScreenConfiguration } from "../check/CheckScannerIntroScreenConfiguration"; import { CheckScannerScreenTextLocalization } from "../check/CheckScannerScreenTextLocalization"; import { CheckScanningProgressConfiguration } from "../check/CheckScanningProgressConfiguration"; import { IconButton } from "../common/Common"; import { Palette } from "../common/Common"; import { PermanentViewFinderConfiguration } from "../common/ViewFinderConfiguration"; import { ScanCompletionOverlay } from "../common/ScanCompletionOverlay"; import { ScanbotAlertDialog } from "../common/ScanbotAlertDialog"; import { Sound } from "../common/Common"; import { TopBarConfiguration } from "../common/TopBarConfiguration"; import { UserGuidanceConfiguration } from "../common/UserGuidanceConfiguration"; import { Vibration } from "../common/Common"; /** Configuration of the screen for detecting check data. */ export declare class CheckScannerScreenConfiguration { /** Version number of the configuration object. @defaultValue "1.0"; */ readonly version: string; /** The configuration object should be applied for this screen. @defaultValue "CheckScanner"; */ readonly screen: string; /** Configuration of the all strings for check scanner screen. @defaultValue new CheckScannerScreenTextLocalization({}); */ localization: CheckScannerScreenTextLocalization; /** Define the screen's base color values from which other colors are derived. @defaultValue new Palette({}); */ palette: Palette; /** The background color of the check scanner screen. @defaultValue "?sbColorSurfaceLow"; */ backgroundColor: string; /** Configuration of the camera behavior. @defaultValue new CameraConfiguration({}); */ cameraConfiguration: CameraConfiguration; /** Configuration of the dialog for requesting camera permissions. @defaultValue new CameraPermissionScreen({ "background": "?sbColorSurface", "iconBackground": "?sbColorOutline", "icon": new IconStyle({ "visible": true, "color": "?sbColorOnSurface" }), "closeButton": new ButtonConfiguration({ "visible": true, "text": "?cameraPermissionCloseButton", "accessibilityDescription": "?accessibilityDescriptionCameraPermissionCloseButton", "background": new BackgroundStyle({ "strokeColor": "#00000000", "fillColor": "#00000000", "strokeWidth": 0.0 }), "foreground": new ForegroundStyle({ "iconVisible": false, "color": "?sbColorPrimary", "useShadow": false }) }), "enableCameraTitle": new StyledText({ "text": "?cameraPermissionEnableCameraTitle", "color": "?sbColorOnSurface" }), "enableCameraExplanation": new StyledText({ "text": "?cameraPermissionEnableCameraExplanation", "color": "?sbColorOnSurfaceVariant" }) }); */ cameraPermission: CameraPermissionScreen; /** Configuration of the top user guidance. @defaultValue new UserGuidanceConfiguration({ "title": new StyledText({ "text": "?topUserGuidance" }) }); */ topUserGuidance: UserGuidanceConfiguration; /** Configuration of the user guidance below finder view. @defaultValue new CheckScannerGuidanceConfiguration({}); */ scanStatusUserGuidance: CheckScannerGuidanceConfiguration; /** Configuration of the top bar on the check scanner screen. @defaultValue new TopBarConfiguration({ "title": new StyledText({ "visible": true, "text": "?topBarTitle" }), "cancelButton": new ButtonConfiguration({ "text": "?topBarCancelButton", "accessibilityDescription": "?accessibilityDescriptionCancelButton", "background": new BackgroundStyle({ "strokeColor": "#00000000", "fillColor": "#00000000", "strokeWidth": 0.0 }), "foreground": new ForegroundStyle({ "color": "?sbColorOnPrimary" }) }) }); */ topBar: TopBarConfiguration; /** Configuration of the button in the top bar that opens the introduction screen. @defaultValue new IconButton({ "color": "?sbColorOnPrimary", "accessibilityDescription": "?accessibilityDescriptionOpenIntroScreenButton" }); */ topBarOpenIntroScreenButton: IconButton; /** Configuration of the introduction screen for the check scanner. @defaultValue new CheckScannerIntroScreenConfiguration({}); */ introScreen: CheckScannerIntroScreenConfiguration; /** Configuration of the action bar. @defaultValue new ActionBarConfiguration({ "flipCameraButton": new RoundButton({ "visible": false, "accessibilityDescription": "?accessibilityDescriptionFlipCameraButton", "backgroundColor": "?sbColorSurfaceHigh", "foregroundColor": "?sbColorOnPrimary", "activeBackgroundColor": "?sbColorWarning", "activeForegroundColor": "#1C1B1F" }) }); */ actionBar: ActionBarConfiguration; /** Configuration of the view finder. @defaultValue new PermanentViewFinderConfiguration({ "style": new FinderCorneredStyle({ "strokeColor": "?sbColorSurface", "strokeWidth": 2.0 }), "aspectRatio": new AspectRatio({ "width": 2.14, "height": 1.0 }), "minimumInsets": new EdgeInsets({ "top": 24.0, "left": 24.0, "bottom": 24.0, "right": 24.0 }) }); */ viewFinder: PermanentViewFinderConfiguration; /** Configuration for the check recognizer. @defaultValue new CheckScannerConfiguration({}); */ scannerConfiguration: CheckScannerConfiguration; /** Flag to capture high resolution image. @defaultValue false; */ captureHighResolutionImage: boolean; /** Flag to show or hide the preset button. @defaultValue true; */ exampleOverlayVisible: boolean; /** Configuration of visualization of the scanning progress. @defaultValue new CheckScanningProgressConfiguration({}); */ scanningProgress: CheckScanningProgressConfiguration; /** Timeout for the no Check found state. If the no Check found state is active longer than this value, the alert will be presented. @defaultValue 5000; */ noCheckFoundTimeout: number; /** Timeout for the accumulation state. If the accumulation state is active longer than this value, the alert will be presented. @defaultValue 3000; */ accumulationTimeout: number; /** Configuration of the success overlay. @defaultValue new ScanCompletionOverlay({}); */ successOverlay: ScanCompletionOverlay; /** Configuration of the alert dialog that will be presented when no Check is detected. @defaultValue new ScanbotAlertDialog({ "title": new StyledText({ "text": "?checkNoCheckDetectedAlertTitle", "color": "?sbColorOnSurface" }), "subtitle": new StyledText({ "text": "?checkNoCheckDetectedAlertSubtitle", "color": "?sbColorOnSurfaceVariant" }), "sheetColor": "?sbColorSurface", "modalOverlayColor": "?sbColorModalOverlay", "dividerColor": "?sbColorOutline", "okButton": new ButtonConfiguration({ "visible": true, "text": "?checkAlertRetryButton", "accessibilityDescription": "?accessibilityDescriptionRetryButton", "background": new BackgroundStyle({ "strokeColor": "?sbColorPrimary", "fillColor": "?sbColorPrimary", "strokeWidth": 1.0 }), "foreground": new ForegroundStyle({ "iconVisible": true, "color": "?sbColorOnPrimary", "useShadow": false }) }), "cancelButton": new ButtonConfiguration({ "visible": true, "text": "?checkAlertCloseScannerButton", "accessibilityDescription": "?accessibilityDescriptionCloseScannerButton", "background": new BackgroundStyle({ "strokeColor": "#00000000", "fillColor": "#00000000", "strokeWidth": 1.0 }), "foreground": new ForegroundStyle({ "iconVisible": false, "color": "?sbColorPrimary", "useShadow": false }) }) }); */ noCheckDetectedAlertDialog: ScanbotAlertDialog; /** Configuration of the alert dialog that will be presented when scanned image is not good. @defaultValue new ScanbotAlertDialog({ "title": new StyledText({ "text": "?checkImageNotGoodAlertTitle", "color": "?sbColorOnSurface" }), "subtitle": new StyledText({ "text": "?checkImageNotGoodAlertSubtitle", "color": "?sbColorOnSurfaceVariant" }), "sheetColor": "?sbColorSurface", "modalOverlayColor": "?sbColorModalOverlay", "dividerColor": "?sbColorOutline", "okButton": new ButtonConfiguration({ "visible": true, "text": "?checkAlertRetryButton", "accessibilityDescription": "?accessibilityDescriptionRetryButton", "background": new BackgroundStyle({ "strokeColor": "?sbColorPrimary", "fillColor": "?sbColorPrimary", "strokeWidth": 1.0 }), "foreground": new ForegroundStyle({ "iconVisible": true, "color": "?sbColorOnPrimary", "useShadow": false }) }), "cancelButton": new ButtonConfiguration({ "visible": true, "text": "?checkAlertCloseScannerButton", "accessibilityDescription": "?accessibilityDescriptionCloseScannerButton", "background": new BackgroundStyle({ "strokeColor": "#00000000", "fillColor": "#00000000", "strokeWidth": 1.0 }), "foreground": new ForegroundStyle({ "iconVisible": false, "color": "?sbColorPrimary", "useShadow": false }) }) }); */ imageNotGoodAlertDialog: ScanbotAlertDialog; /** Configuration of the scan confirmation sound. @defaultValue new Sound({}); */ sound: Sound; /** Configuration of the vibration feedback. @defaultValue new Vibration({}); */ vibration: Vibration; /** @param source {@displayType `DeepPartial<CheckScannerScreenConfiguration>`} */ constructor(source?: DeepPartial<CheckScannerScreenConfiguration>); }