react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
843 lines (799 loc) • 27.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TextButtonMode = exports.ShutterButton = exports.ScanAssistanceOverlay = exports.PreviewButton = exports.PageSnapFunnelAnimation = exports.PageSnapFeedbackNone = exports.PageSnapFeedbackMode = exports.PageSnapCheckMarkAnimation = exports.PagePreviewMode = exports.NoButtonMode = exports.DocumentPolygonConfiguration = exports.CaptureFeedback = exports.CameraScreenConfiguration = exports.CameraBottomBar = void 0;
var _DocumentScannerTypes = require("../../document_scanner/DocumentScannerTypes");
var _CameraPermission = require("../../ui_v2/common/CameraPermission");
var _Common = require("../../ui_v2/common/Common");
var _ScanbotAlertDialog = require("../../ui_v2/common/ScanbotAlertDialog");
var _UserGuidanceConfiguration = require("../../ui_v2/common/UserGuidanceConfiguration");
var _ViewFinderConfiguration = require("../../ui_v2/common/ViewFinderConfiguration");
var _AcknowledgementScreenConfiguration = require("../../ui_v2/document/AcknowledgementScreenConfiguration");
var _DocumentScannerCameraConfiguration = require("../../ui_v2/document/DocumentScannerCameraConfiguration");
var _DocumentScannerUserGuidance = require("../../ui_v2/document/DocumentScannerUserGuidance");
var _IntroductionScreenConfiguration = require("../../ui_v2/document/IntroductionScreenConfiguration");
var _Geometry = require("../../utils/geometry/Geometry");
var _utils = require("../../utils/utils");
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/document/CameraScreenConfiguration.yaml
/**
Configuration of the 'shutter' button.
*/
class ShutterButton extends _utils.PartiallyConstructible {
/**
Determines if the 'shutter' button can be tapped to manually snap a document when 'auto snapping mode' is active.
Default is true
*/
enabledInAutoSnappingMode = true;
/**
The text to be read when the 'shutter' button is selected via the accessibility mode.
Default is "?accessibilityDescriptionCameraShutterButton"
*/
accessibilityDescription = '?accessibilityDescriptionCameraShutterButton';
/**
The outer color of the 'shutter' button.
Default is "?sbColorOnPrimary"
*/
outerColor = '?sbColorOnPrimary';
/**
The inner color of the 'shutter' button.
Default is "?sbColorOnPrimary"
*/
innerColor = '?sbColorOnPrimary';
/** @param source {@displayType `DeepPartial<ShutterButton>`} */
constructor(source = {}) {
super();
if (source.enabledInAutoSnappingMode !== undefined) {
this.enabledInAutoSnappingMode = source.enabledInAutoSnappingMode;
}
if (source.accessibilityDescription !== undefined) {
this.accessibilityDescription = source.accessibilityDescription;
}
if (source.outerColor !== undefined) {
this.outerColor = source.outerColor;
}
if (source.innerColor !== undefined) {
this.innerColor = source.innerColor;
}
}
}
/**
Configuration of the 'preview' button.
*/
exports.ShutterButton = ShutterButton;
/** @internal */
let PreviewButton = exports.PreviewButton = void 0;
(function (_PreviewButton) {
function From(source) {
const _type = source._type;
switch (_type) {
case 'PagePreviewMode':
return new PagePreviewMode(source);
case 'TextButtonMode':
return new TextButtonMode(source);
case 'NoButtonMode':
return new NoButtonMode(source);
default:
throw `Unknown child class name: ${_type}`;
}
}
_PreviewButton.From = From;
})(PreviewButton || (exports.PreviewButton = PreviewButton = {}));
/**
Configuration of the scan assistance overlay.
*/
class ScanAssistanceOverlay extends _utils.PartiallyConstructible {
/**
Determines whether the scan assistance overlay is visible or not. If the viewfinder is enabled, this flag is ignored and the scan assistance overlay is not displayed.
Default is true
*/
visible = true;
/**
The background color of the scan assistance overlay.
Default is "?sbColorModalOverlay"
*/
backgroundColor = '?sbColorModalOverlay';
/**
The foreground color of the scan assistance overlay image.
Default is "?sbColorSurface"
*/
foregroundColor = '?sbColorSurface';
/** @param source {@displayType `DeepPartial<ScanAssistanceOverlay>`} */
constructor(source = {}) {
super();
if (source.visible !== undefined) {
this.visible = source.visible;
}
if (source.backgroundColor !== undefined) {
this.backgroundColor = source.backgroundColor;
}
if (source.foregroundColor !== undefined) {
this.foregroundColor = source.foregroundColor;
}
}
}
/**
Configuration of the 'preview' button in 'page preview mode'.
*/
exports.ScanAssistanceOverlay = ScanAssistanceOverlay;
class PagePreviewMode extends _utils.PartiallyConstructible {
_type = 'PagePreviewMode';
/**
The text to be read when the 'preview' button is selected via the accessibility mode.
Default is "?accessibilityDescriptionCameraPreviewButton"
*/
accessibilityDescription = '?accessibilityDescriptionCameraPreviewButton';
/**
The color of the image placeholder.
Default is "?sbColorOnSurfaceVariant"
*/
imagePlaceholderColor = '?sbColorOnSurfaceVariant';
/**
Configuration of the page counter icon.
*/
pageCounter = new _Common.BadgeStyle({
visible: true,
background: new _Common.BackgroundStyle({
strokeColor: '?sbColorSurface',
fillColor: '?sbColorSurface'
}),
foregroundColor: '?sbColorPrimary'
});
/** @param source {@displayType `DeepPartial<PagePreviewMode>`} */
constructor(source = {}) {
super();
if (source.accessibilityDescription !== undefined) {
this.accessibilityDescription = source.accessibilityDescription;
}
if (source.imagePlaceholderColor !== undefined) {
this.imagePlaceholderColor = source.imagePlaceholderColor;
}
if (source.pageCounter !== undefined) {
this.pageCounter = new _Common.BadgeStyle(source.pageCounter);
}
}
}
/**
Configuration of the 'preview' button in 'text button mode'.
*/
exports.PagePreviewMode = PagePreviewMode;
class TextButtonMode extends _utils.PartiallyConstructible {
_type = 'TextButtonMode';
/**
The text to be read when the 'preview' button is selected via the accessibility mode.
Default is "?accessibilityDescriptionCameraPreviewButton"
*/
accessibilityDescription = '?accessibilityDescriptionCameraPreviewButton';
/**
Configuration of the text style for the 'preview' button.
*/
style = new _Common.StyledText({
text: '?cameraPreviewButtonTitle',
color: '?sbColorOnPrimary'
});
/** @param source {@displayType `DeepPartial<TextButtonMode>`} */
constructor(source = {}) {
super();
if (source.accessibilityDescription !== undefined) {
this.accessibilityDescription = source.accessibilityDescription;
}
if (source.style !== undefined) {
this.style = new _Common.StyledText(source.style);
}
}
}
/**
Configuration of the 'preview' button in 'no button mode'.
*/
exports.TextButtonMode = TextButtonMode;
class NoButtonMode extends _utils.PartiallyConstructible {
_type = 'NoButtonMode';
/**
Whether the button is visible.
Default is false
*/
visible = false;
/** @param source {@displayType `DeepPartial<NoButtonMode>`} */
constructor(source = {}) {
super();
if (source.visible !== undefined) {
this.visible = source.visible;
}
}
}
/**
Configuration of the bottom bar for the camera screen.
*/
exports.NoButtonMode = NoButtonMode;
class CameraBottomBar extends _utils.PartiallyConstructible {
/**
Configuration of the 'import' button.
*/
importButton = new _Common.BarButtonConfiguration({
title: new _Common.StyledText({
visible: false,
text: '?cameraImportButtonTitle',
color: '?sbColorOnPrimary'
}),
accessibilityDescription: '?accessibilityDescriptionCameraImportButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
icon: new _Common.IconStyle({
color: '?sbColorOnPrimary'
})
});
/**
Configuration of the 'auto snapping mode' button.
*/
autoSnappingModeButton = new _Common.BarButtonConfiguration({
title: new _Common.StyledText({
visible: false,
text: '?cameraAutoSnapButtonTitle',
color: '?sbColorOnPrimary'
}),
accessibilityDescription: '?accessibilityDescriptionCameraAutoSnapButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
icon: new _Common.IconStyle({
color: '?sbColorOnPrimary'
})
});
/**
Configuration of the 'manual snapping mode' button.
*/
manualSnappingModeButton = new _Common.BarButtonConfiguration({
title: new _Common.StyledText({
visible: false,
text: '?cameraManualSnapButtonTitle',
color: '?sbColorOnPrimary'
}),
accessibilityDescription: '?accessibilityDescriptionCameraManualSnapButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
icon: new _Common.IconStyle({
color: '?sbColorOnPrimary'
})
});
/**
Configuration of the 'shutter' button.
*/
shutterButton = new ShutterButton({
accessibilityDescription: '?accessibilityDescriptionCameraShutterButton'
});
/**
Configuration of the 'flashlight' button when in the 'on' state.
*/
torchOnButton = new _Common.BarButtonConfiguration({
title: new _Common.StyledText({
visible: false,
text: '?cameraTorchOnButtonTitle',
color: '?sbColorOnPrimary'
}),
accessibilityDescription: '?accessibilityDescriptionCameraTorchOnButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
icon: new _Common.IconStyle({
color: '?sbColorOnPrimary'
})
});
/**
Configuration of the 'flashlight' button when in the 'off' state.
*/
torchOffButton = new _Common.BarButtonConfiguration({
title: new _Common.StyledText({
visible: false,
text: '?cameraTorchOffButtonTitle',
color: '?sbColorOnPrimary'
}),
accessibilityDescription: '?accessibilityDescriptionCameraTorchOffButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
icon: new _Common.IconStyle({
color: '?sbColorOnPrimary'
})
});
/**
Configuration of the 'preview' button.
*/
previewButton = new PagePreviewMode({});
/** @param source {@displayType `DeepPartial<CameraBottomBar>`} */
constructor(source = {}) {
super();
if (source.importButton !== undefined) {
this.importButton = new _Common.BarButtonConfiguration(source.importButton);
}
if (source.autoSnappingModeButton !== undefined) {
this.autoSnappingModeButton = new _Common.BarButtonConfiguration(source.autoSnappingModeButton);
}
if (source.manualSnappingModeButton !== undefined) {
this.manualSnappingModeButton = new _Common.BarButtonConfiguration(source.manualSnappingModeButton);
}
if (source.shutterButton !== undefined) {
this.shutterButton = new ShutterButton(source.shutterButton);
}
if (source.torchOnButton !== undefined) {
this.torchOnButton = new _Common.BarButtonConfiguration(source.torchOnButton);
}
if (source.torchOffButton !== undefined) {
this.torchOffButton = new _Common.BarButtonConfiguration(source.torchOffButton);
}
if (source.previewButton !== undefined) {
this.previewButton = PreviewButton.From(source.previewButton);
}
}
}
/**
The type of animation to display after snapping a page.
*/
exports.CameraBottomBar = CameraBottomBar;
/** @internal */
let PageSnapFeedbackMode = exports.PageSnapFeedbackMode = void 0;
(function (_PageSnapFeedbackMode) {
function From(source) {
const _type = source._type;
switch (_type) {
case 'PageSnapFunnelAnimation':
return new PageSnapFunnelAnimation(source);
case 'PageSnapCheckMarkAnimation':
return new PageSnapCheckMarkAnimation(source);
case 'PageSnapFeedbackNone':
return new PageSnapFeedbackNone(source);
default:
throw `Unknown child class name: ${_type}`;
}
}
_PageSnapFeedbackMode.From = From;
})(PageSnapFeedbackMode || (exports.PageSnapFeedbackMode = PageSnapFeedbackMode = {}));
/**
Configuration of the funnel animation.
*/
class PageSnapFunnelAnimation extends _utils.PartiallyConstructible {
_type = 'PageSnapFunnelAnimation';
/**
The overlay color for the funnel animation.
Default is "?sbColorModalOverlay"
*/
overlayColor = '?sbColorModalOverlay';
/** @param source {@displayType `DeepPartial<PageSnapFunnelAnimation>`} */
constructor(source = {}) {
super();
if (source.overlayColor !== undefined) {
this.overlayColor = source.overlayColor;
}
}
}
/**
Configuration of the check mark animation.
*/
exports.PageSnapFunnelAnimation = PageSnapFunnelAnimation;
class PageSnapCheckMarkAnimation extends _utils.PartiallyConstructible {
_type = 'PageSnapCheckMarkAnimation';
/**
The overlay color for the check mark animation.
Default is "?sbColorModalOverlay"
*/
overlayColor = '?sbColorModalOverlay';
/**
The background color for the check mark animation.
Default is "?sbColorOutline"
*/
checkMarkBackgroundColor = '?sbColorOutline';
/**
The check mark color for the check mark animation.
Default is "#00000000"
*/
checkMarkColor = '#00000000';
/** @param source {@displayType `DeepPartial<PageSnapCheckMarkAnimation>`} */
constructor(source = {}) {
super();
if (source.overlayColor !== undefined) {
this.overlayColor = source.overlayColor;
}
if (source.checkMarkBackgroundColor !== undefined) {
this.checkMarkBackgroundColor = source.checkMarkBackgroundColor;
}
if (source.checkMarkColor !== undefined) {
this.checkMarkColor = source.checkMarkColor;
}
}
}
/**
To not use a snap animation.
*/
exports.PageSnapCheckMarkAnimation = PageSnapCheckMarkAnimation;
class PageSnapFeedbackNone extends _utils.PartiallyConstructible {
_type = 'PageSnapFeedbackNone';
/** @param source {@displayType `DeepPartial<PageSnapFeedbackNone>`} */
constructor(source = {}) {
super();
}
}
/**
Configuration of the feedback shown after snapping a page.
*/
exports.PageSnapFeedbackNone = PageSnapFeedbackNone;
class CaptureFeedback extends _utils.PartiallyConstructible {
/**
Whether the camera preview should blink or not after snapping a page.
Default is true
*/
cameraBlinkEnabled = true;
/**
The type of animation to display after snapping a page.
*/
snapFeedbackMode = new PageSnapFunnelAnimation({});
/** @param source {@displayType `DeepPartial<CaptureFeedback>`} */
constructor(source = {}) {
super();
if (source.cameraBlinkEnabled !== undefined) {
this.cameraBlinkEnabled = source.cameraBlinkEnabled;
}
if (source.snapFeedbackMode !== undefined) {
this.snapFeedbackMode = PageSnapFeedbackMode.From(source.snapFeedbackMode);
}
}
}
/**
Configuration of the document contour detection polygon.
*/
exports.CaptureFeedback = CaptureFeedback;
class DocumentPolygonConfiguration extends _utils.PartiallyConstructible {
/**
Determines the visibility mode for the polygon.
Default is ENABLED
*/
visibility = 'ENABLED';
/**
Configuration of the polygon when the detected document status is 'OK'.
*/
documentOk = new _Common.PolygonStyle({
strokeColor: '?sbColorPositive',
fillColor: '#00000000',
strokeWidth: 2.0
});
/**
Configuration of the polygon when the detected document status is 'not OK'.
*/
documentNotOk = new _Common.PolygonStyle({
strokeColor: '?sbColorNegative',
fillColor: '#00000000',
strokeWidth: 2.0
});
/**
Configuration of the animated polygon when the document is being scanned for capturing in 'auto snapping mode'.
*/
autoSnapProgress = new _Common.PolygonStyle({
strokeColor: '#40A9FF',
fillColor: '#00000000',
strokeWidth: 2.0
});
/** @param source {@displayType `DeepPartial<DocumentPolygonConfiguration>`} */
constructor(source = {}) {
super();
if (source.visibility !== undefined) {
this.visibility = source.visibility;
}
if (source.documentOk !== undefined) {
this.documentOk = new _Common.PolygonStyle(source.documentOk);
}
if (source.documentNotOk !== undefined) {
this.documentNotOk = new _Common.PolygonStyle(source.documentNotOk);
}
if (source.autoSnapProgress !== undefined) {
this.autoSnapProgress = new _Common.PolygonStyle(source.autoSnapProgress);
}
}
}
/**
Configuration of the screen for scanning the pages with the camera.
*/
exports.DocumentPolygonConfiguration = DocumentPolygonConfiguration;
class CameraScreenConfiguration extends _utils.PartiallyConstructible {
/**
Configuration of the acknowledgement screen.
*/
acknowledgement = new _AcknowledgementScreenConfiguration.AcknowledgementScreenConfiguration({});
/**
Configuration of the document scanner introduction screen.
*/
introduction = new _IntroductionScreenConfiguration.IntroductionScreenConfiguration({});
/**
Configuration of the scan assistance overlay.
*/
scanAssistanceOverlay = new ScanAssistanceOverlay({});
/**
Configuration of the camera permission screen.
*/
cameraPermission = new _CameraPermission.CameraPermissionScreen({
statusBarMode: 'DARK',
background: '?sbColorSurface',
iconBackground: '?sbColorOutline',
icon: new _Common.IconStyle({
visible: true,
color: '?sbColorOnSurface'
}),
enableCameraButton: new _Common.ButtonConfiguration({
visible: true,
text: '?cameraPermissionEnableCameraButton',
accessibilityDescription: '?accessibilityDescriptionCameraPermissionEnableCameraButton',
background: new _Common.BackgroundStyle({
strokeColor: '?sbColorPrimary',
fillColor: '?sbColorPrimary',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
iconVisible: false,
color: '?sbColorOnPrimary',
useShadow: false
})
}),
closeButton: new _Common.ButtonConfiguration({
visible: true,
text: '?cameraPermissionCloseButton',
accessibilityDescription: '?accessibilityDescriptionCameraPermissionCloseButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
iconVisible: false,
color: '?sbColorPrimary',
useShadow: false
})
}),
enableCameraTitle: new _Common.StyledText({
text: '?cameraPermissionEnableCameraTitle',
color: '?sbColorOnSurface'
}),
enableCameraExplanation: new _Common.StyledText({
text: '?cameraPermissionEnableCameraExplanation',
color: '?sbColorOnSurfaceVariant'
})
});
/**
Configuration of the title, located in the top bar.
*/
topBarTitle = new _Common.StyledText({
text: '?cameraTopBarTitle',
color: '?sbColorOnPrimary'
});
/**
Configuration of the 'introduction' button, located in the top bar.
*/
topBarIntroButton = new _Common.IconButton({
color: '?sbColorOnPrimary',
accessibilityDescription: '?accessibilityDescriptionCameraTopBarIntroButton'
});
/**
Configuration of the 'cancel' button, located in the top bar.
*/
topBarBackButton = new _Common.ButtonConfiguration({
visible: true,
text: '?cameraTopBarCancelButtonTitle',
accessibilityDescription: '?accessibilityDescriptionCameraTopBarCancelButton',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
iconVisible: true,
color: '?sbColorOnPrimary',
useShadow: false
})
});
/**
Configuration of the static user guidance, located just below the top bar.
*/
topUserGuidance = new _UserGuidanceConfiguration.UserGuidanceConfiguration({
title: new _Common.StyledText({
text: '?cameraTopGuidance',
color: '?sbColorOnPrimary'
})
});
/**
Configuration of the hints guiding users through the scanning process.
*/
userGuidance = new _DocumentScannerUserGuidance.DocumentScannerUserGuidance({});
/**
The background color of the camera screen.
Default is "#000000FF"
*/
backgroundColor = '#000000FF';
/**
If set to true, images imported from the gallery/photo library will be analyzed and eventually rotated to correct their orientation.
Default is true
*/
autoRotateImages = true;
/**
Configuration of the camera behavior.
*/
cameraConfiguration = new _DocumentScannerCameraConfiguration.DocumentScannerCameraConfiguration({});
/**
The parameters of the document scanner.
*/
scannerParameters = new _DocumentScannerTypes.DocumentScannerParameters({});
/**
Configuration of the document contour detection polygon.
*/
polygon = new DocumentPolygonConfiguration({});
/**
Configuration of the bottom bar for the camera screen.
*/
bottomBar = new CameraBottomBar({});
/**
Configuration of the viewfinder.
*/
viewFinder = new _ViewFinderConfiguration.ViewFinderConfiguration({
aspectRatio: new _Geometry.AspectRatio({
width: 21.0,
height: 29.0
}),
visible: false
});
/**
Configuration of the feedback shown after snapping a page.
*/
captureFeedback = new CaptureFeedback({});
/**
Configuration of the scan confirmation vibration.
*/
vibration = new _Common.Vibration({
enabled: true
});
/**
Configuration of timeouts.
*/
timeouts = new _Common.Timeouts({
autoCancelTimeout: 0,
initialScanDelay: 0
});
/**
Configuration of the alert dialog displayed when the scan limit is reached.
*/
limitReachedAlertDialog = new _ScanbotAlertDialog.ScanbotAlertDialog({
title: new _Common.StyledText({
text: '?cameraLimitReachedAlertTitle',
color: '?sbColorOnSurface'
}),
subtitle: new _Common.StyledText({
text: '?cameraLimitReachedAlertSubtitle',
color: '?sbColorOnSurfaceVariant'
}),
okButton: new _Common.ButtonConfiguration({
text: '?cameraLimitReachedOkButtonTitle',
accessibilityDescription: '?accessibilityDescriptionCameraLimitReachedOkButton',
background: new _Common.BackgroundStyle({
fillColor: '?sbColorPrimary',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
color: '?sbColorOnPrimary'
})
}),
cancelButton: new _Common.ButtonConfiguration({
visible: false
})
});
/**
Configuration of the alert dialog displayed when the 'cancel' button is pressed.
*/
cancelAlertDialog = new _ScanbotAlertDialog.ScanbotAlertDialog({
title: new _Common.StyledText({
text: '?cameraCancelAlertTitle',
color: '?sbColorOnSurface'
}),
subtitle: new _Common.StyledText({
text: '?cameraCancelAlertSubtitle',
color: '?sbColorOnSurfaceVariant'
}),
okButton: new _Common.ButtonConfiguration({
text: '?cameraCancelYesButtonTitle',
accessibilityDescription: '?accessibilityDescriptionCameraCancelYesButton',
background: new _Common.BackgroundStyle({
fillColor: '?sbColorPrimary',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
color: '?sbColorOnPrimary'
})
}),
cancelButton: new _Common.ButtonConfiguration({
text: '?cameraCancelNoButtonTitle',
accessibilityDescription: '?accessibilityDescriptionCameraCancelNoButton',
background: new _Common.BackgroundStyle({
fillColor: '#00000000',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
color: '?sbColorPrimary'
})
})
});
/** @param source {@displayType `DeepPartial<CameraScreenConfiguration>`} */
constructor(source = {}) {
super();
if (source.acknowledgement !== undefined) {
this.acknowledgement = new _AcknowledgementScreenConfiguration.AcknowledgementScreenConfiguration(source.acknowledgement);
}
if (source.introduction !== undefined) {
this.introduction = new _IntroductionScreenConfiguration.IntroductionScreenConfiguration(source.introduction);
}
if (source.scanAssistanceOverlay !== undefined) {
this.scanAssistanceOverlay = new ScanAssistanceOverlay(source.scanAssistanceOverlay);
}
if (source.cameraPermission !== undefined) {
this.cameraPermission = new _CameraPermission.CameraPermissionScreen(source.cameraPermission);
}
if (source.topBarTitle !== undefined) {
this.topBarTitle = new _Common.StyledText(source.topBarTitle);
}
if (source.topBarIntroButton !== undefined) {
this.topBarIntroButton = new _Common.IconButton(source.topBarIntroButton);
}
if (source.topBarBackButton !== undefined) {
this.topBarBackButton = new _Common.ButtonConfiguration(source.topBarBackButton);
}
if (source.topUserGuidance !== undefined) {
this.topUserGuidance = new _UserGuidanceConfiguration.UserGuidanceConfiguration(source.topUserGuidance);
}
if (source.userGuidance !== undefined) {
this.userGuidance = new _DocumentScannerUserGuidance.DocumentScannerUserGuidance(source.userGuidance);
}
if (source.backgroundColor !== undefined) {
this.backgroundColor = source.backgroundColor;
}
if (source.autoRotateImages !== undefined) {
this.autoRotateImages = source.autoRotateImages;
}
if (source.cameraConfiguration !== undefined) {
this.cameraConfiguration = new _DocumentScannerCameraConfiguration.DocumentScannerCameraConfiguration(source.cameraConfiguration);
}
if (source.scannerParameters !== undefined) {
this.scannerParameters = new _DocumentScannerTypes.DocumentScannerParameters(source.scannerParameters);
}
if (source.polygon !== undefined) {
this.polygon = new DocumentPolygonConfiguration(source.polygon);
}
if (source.bottomBar !== undefined) {
this.bottomBar = new CameraBottomBar(source.bottomBar);
}
if (source.viewFinder !== undefined) {
this.viewFinder = new _ViewFinderConfiguration.ViewFinderConfiguration(source.viewFinder);
}
if (source.captureFeedback !== undefined) {
this.captureFeedback = new CaptureFeedback(source.captureFeedback);
}
if (source.vibration !== undefined) {
this.vibration = new _Common.Vibration(source.vibration);
}
if (source.timeouts !== undefined) {
this.timeouts = new _Common.Timeouts(source.timeouts);
}
if (source.limitReachedAlertDialog !== undefined) {
this.limitReachedAlertDialog = new _ScanbotAlertDialog.ScanbotAlertDialog(source.limitReachedAlertDialog);
}
if (source.cancelAlertDialog !== undefined) {
this.cancelAlertDialog = new _ScanbotAlertDialog.ScanbotAlertDialog(source.cancelAlertDialog);
}
}
}
exports.CameraScreenConfiguration = CameraScreenConfiguration;
//# sourceMappingURL=CameraScreenConfiguration.js.map