react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
172 lines (157 loc) • 5.61 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CroppingConfiguration = exports.CroppingAppearanceConfiguration = void 0;
var _Common = require("../../ui_v2/common/Common");
var _CroppingScreenConfiguration = require("../../ui_v2/document/CroppingScreenConfiguration");
var _CroppingTextLocalization = require("../../ui_v2/document/CroppingTextLocalization");
var _utils = require("../../utils/utils");
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/document/CroppingConfiguration.yaml
/**
Configuration of the general appearance for the cropping screen.
*/
class CroppingAppearanceConfiguration extends _utils.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<CroppingAppearanceConfiguration>`} */
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 standalone cropping screen.
*/
exports.CroppingAppearanceConfiguration = CroppingAppearanceConfiguration;
class CroppingConfiguration extends _utils.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 "CroppingConfiguration"
*/
screen = 'CroppingConfiguration';
/**
Define the screen's base color values from which other colors are derived.
*/
palette = new _Common.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'
});
/**
The UUID of the document to be cropped.
*/
/**
The UUID of the page of the document to be cropped.
*/
/**
Configuration of all the strings for the standalone cropping screen.
*/
localization = new _CroppingTextLocalization.CroppingTextLocalization({});
/**
Configuration of the general appearance for the cropping screen.
*/
appearance = new CroppingAppearanceConfiguration({});
/**
Configuration of the cropping screen.
*/
cropping = new _CroppingScreenConfiguration.CroppingScreenConfiguration({});
/**
Determines if the quality analysis for the acknowledgement mode will run on the filtered or the unfiltered image.
Default is UNFILTERED_DOCUMENT
*/
documentAnalysisMode = 'UNFILTERED_DOCUMENT';
/** @param source {@displayType `DeepPartial<CroppingConfiguration>`} */
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 _Common.Palette(source.palette);
}
if (source.documentUuid !== undefined) {
this.documentUuid = source.documentUuid;
} else {
throw new Error('documentUuid must be present in constructor argument');
}
if (source.pageUuid !== undefined) {
this.pageUuid = source.pageUuid;
} else {
throw new Error('pageUuid must be present in constructor argument');
}
if (source.localization !== undefined) {
this.localization = new _CroppingTextLocalization.CroppingTextLocalization(source.localization);
}
if (source.appearance !== undefined) {
this.appearance = new CroppingAppearanceConfiguration(source.appearance);
}
if (source.cropping !== undefined) {
this.cropping = new _CroppingScreenConfiguration.CroppingScreenConfiguration(source.cropping);
}
if (source.documentAnalysisMode !== undefined) {
this.documentAnalysisMode = source.documentAnalysisMode;
}
}
}
exports.CroppingConfiguration = CroppingConfiguration;
//# sourceMappingURL=CroppingConfiguration.js.map