react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
180 lines (165 loc) • 5.8 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/document/DocumentScanningFlow.yaml
import { Palette } from '../../ui_v2/common/Common';
import { DocumentScannerOutputSettings } from '../../ui_v2/document/DocumentScannerOutputSettings';
import { DocumentScannerScreens } from '../../ui_v2/document/DocumentScannerScreens';
import { DocumentScannerTextLocalization } from '../../ui_v2/document/DocumentScannerTextLocalization';
import { PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the general appearance.
*/
export class DocumentFlowAppearanceConfiguration extends PartiallyConstructible {
/**
Determines the visual mode used for the status bar icons.
Default is LIGHT
*/
statusBarMode = 'LIGHT';
/**
Determines the visual mode used for the navigation bar icons. Android only.
Default is LIGHT
*/
navigationBarMode = 'LIGHT';
/**
The background color of the top bar. Only applicable when the visual mode is specified as 'SOLID', otherwise ignored.
Default is "?sbColorPrimary"
*/
topBarBackgroundColor = '?sbColorPrimary';
/**
The background color of the bottom bar.
Default is "?sbColorPrimary"
*/
bottomBarBackgroundColor = '?sbColorPrimary';
/**
Which mode to use when orientation should be locked to landscape or portrait.
Default is NONE
*/
orientationLockMode = 'NONE';
/** @param source {@displayType `DeepPartial<DocumentFlowAppearanceConfiguration>`} */
constructor(source = {}) {
super();
if (source.statusBarMode !== undefined) {
this.statusBarMode = source.statusBarMode;
}
if (source.navigationBarMode !== undefined) {
this.navigationBarMode = source.navigationBarMode;
}
if (source.topBarBackgroundColor !== undefined) {
this.topBarBackgroundColor = source.topBarBackgroundColor;
}
if (source.bottomBarBackgroundColor !== undefined) {
this.bottomBarBackgroundColor = source.bottomBarBackgroundColor;
}
if (source.orientationLockMode !== undefined) {
this.orientationLockMode = source.orientationLockMode;
}
}
}
/**
Configuration of the document scanner screen.
*/
export class DocumentScanningFlow extends PartiallyConstructible {
/**
Version number of the configuration object.
Default is "1.0"
*/
version = '1.0';
/**
The configuration object should be applied for this screen.
Default is "DocumentScanner"
*/
screen = 'DocumentScanner';
/**
Define the screen's base color values from which other colors are derived.
*/
palette = new Palette({
sbColorPrimary: '#C8193C',
sbColorPrimaryDisabled: '#F5F5F5',
sbColorNegative: '#FF3737',
sbColorPositive: '#4EFFB4',
sbColorWarning: '#FFCE5C',
sbColorSecondary: '#FFEDEE',
sbColorSecondaryDisabled: '#F5F5F5',
sbColorOnPrimary: '#FFFFFF',
sbColorOnSecondary: '#C8193C',
sbColorSurface: '#FFFFFF',
sbColorOutline: '#EFEFEF',
sbColorOnSurfaceVariant: '#707070',
sbColorOnSurface: '#000000',
sbColorSurfaceLow: '#00000026',
sbColorSurfaceHigh: '#0000007A',
sbColorModalOverlay: '#000000A3'
});
/**
Configuration of all the strings for the document scanner screen.
*/
localization = new DocumentScannerTextLocalization({});
/**
Configuration of the general appearance.
*/
appearance = new DocumentFlowAppearanceConfiguration({});
/**
Configuration of the output settings.
*/
outputSettings = new DocumentScannerOutputSettings({});
/**
Configuration of the document scanner sub-screens.
*/
screens = new DocumentScannerScreens({});
/**
The UUID of the existing document to be edited.
*/
documentUuid = null;
/**
Clean the existing pages from the scanning session.
Default is true
*/
cleanScanningSession = true;
/**
If enabled, the scanner automatically navigates to the review screen when the flow starts. This property is ignored if the document is empty or if the review screen is disabled.
Default is false
*/
showReviewScreenOnStart = false;
/**
If enabled, the screen will not turn off while the barcode scanner is active. (Android only).
Default is true
*/
keepScreenOn = true;
/** @param source {@displayType `DeepPartial<DocumentScanningFlow>`} */
constructor(source = {}) {
super();
if (source.version !== undefined) {
this.version = source.version;
}
if (source.screen !== undefined) {
this.screen = source.screen;
}
if (source.palette !== undefined) {
this.palette = new Palette(source.palette);
}
if (source.localization !== undefined) {
this.localization = new DocumentScannerTextLocalization(source.localization);
}
if (source.appearance !== undefined) {
this.appearance = new DocumentFlowAppearanceConfiguration(source.appearance);
}
if (source.outputSettings !== undefined) {
this.outputSettings = new DocumentScannerOutputSettings(source.outputSettings);
}
if (source.screens !== undefined) {
this.screens = new DocumentScannerScreens(source.screens);
}
if (source.documentUuid !== undefined) {
this.documentUuid = source.documentUuid != null ? source.documentUuid : null;
}
if (source.cleanScanningSession !== undefined) {
this.cleanScanningSession = source.cleanScanningSession;
}
if (source.showReviewScreenOnStart !== undefined) {
this.showReviewScreenOnStart = source.showReviewScreenOnStart;
}
if (source.keepScreenOn !== undefined) {
this.keepScreenOn = source.keepScreenOn;
}
}
}
//# sourceMappingURL=DocumentScanningFlow.js.map