scanbot-web-sdk
Version:
Scanbot Web Document and Barcode Scanner SDK
201 lines (200 loc) • 7.48 kB
TypeScript
import { ActionBarConfiguration } from "../common/ActionBarConfiguration";
import { CameraConfiguration } from "../common/CameraConfiguration";
import { CameraPermissionScreen } from "../common/CameraPermission";
import { DeepPartial, PartiallyConstructible } from "../utils";
import { IconButton } from "../common/Common";
import { MrzFinderLayoutPreset } from "../mrz/MRZFinderLayoutPreset";
import { MrzScannerConfiguration } from "../MrzTypes";
import { MrzScannerIntroScreenConfiguration } from "../mrz/MRZScannerIntroScreenConfiguration";
import { MrzScannerScreenTextLocalization } from "../mrz/MRZScannerScreenTextLocalization";
import { Palette } from "../common/Common";
import { PermanentViewFinderConfiguration } from "../common/ViewFinderConfiguration";
import { ScanCompletionOverlay } from "../common/ScanCompletionOverlay";
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 MRZ (Machine-readable zones) of various documents.
*/
export declare class MrzScannerScreenConfiguration extends PartiallyConstructible {
/**
Version number of the configuration object.
@defaultValue "1.0";
*/
readonly version: string;
/**
The configuration object should be applied for this screen.
@defaultValue "MrzScanner";
*/
readonly screen: string;
/**
Configuration of the all strings for MRZ scanner screen.
@defaultValue new MrzScannerScreenTextLocalization({});
*/
localization: MrzScannerScreenTextLocalization;
/**
Define the screen's base color values from which other colors are derived.
@defaultValue new Palette({});
*/
palette: Palette;
/**
The background color of the MRZ 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 UserGuidanceConfiguration({
"title": new StyledText({
"text": "?finderViewUserGuidance"
})
});
*/
finderViewUserGuidance: UserGuidanceConfiguration;
/**
Configuration of the top bar on the MRZ 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 MRZ scanner.
@defaultValue new MrzScannerIntroScreenConfiguration({});
*/
introScreen: MrzScannerIntroScreenConfiguration;
/**
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": -1.0,
"height": -1.0
}),
"minimumInsets": new EdgeInsets({
"top": 24.0,
"left": 24.0,
"bottom": 24.0,
"right": 24.0
})
});
*/
viewFinder: PermanentViewFinderConfiguration;
/**
Configuration of the MRZ scanner.
@defaultValue new MrzScannerConfiguration({});
*/
scannerConfiguration: MrzScannerConfiguration;
/**
Configuration of the overlay text inside finder.
@defaultValue new TwoLineMrzFinderLayoutPreset({});
*/
mrzExampleOverlay: MrzFinderLayoutPreset;
/**
Configuration of the success overlay.
@defaultValue new ScanCompletionOverlay({});
*/
successOverlay: ScanCompletionOverlay;
/**
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<MrzScannerScreenConfiguration>`} */
constructor(source?: DeepPartial<MrzScannerScreenConfiguration>);
}