react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
116 lines (105 loc) • 3.95 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CreditCardScannerGuidanceStates = exports.CreditCardScanGuidanceConfiguration = void 0;
var _Common = require("../../ui_v2/common/Common");
var _utils = require("../../utils/utils");
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/creditcard/CreditCardScannerUserGuidance.yaml
/**
Configure the captions of the user guidance hints for different scanning states.
*/
class CreditCardScannerGuidanceStates extends _utils.PartiallyConstructible {
/**
The user guidance text displayed when no credit card is found. Initial state.
Default is "?creditCardUserGuidanceNoCardFound"
*/
noCardFound = '?creditCardUserGuidanceNoCardFound';
/**
The user guidance text displayed when a card presence was detected and scanning is in progress.
Default is "?creditCardUserGuidanceScanningProgress"
*/
scanningProgress = '?creditCardUserGuidanceScanningProgress';
/**
The user guidance text displayed when it is too dark to capture an adequate image.
Default is "?creditCardUserGuidanceTooDark"
*/
tooDark = '?creditCardUserGuidanceTooDark';
/**
The user guidance text displayed when the detected card is too far away and appears too small.
Default is "?creditCardUserGuidanceTooSmall"
*/
tooSmall = '?creditCardUserGuidanceTooSmall';
/**
The user guidance text displayed when the detected card is not in a good perspective (device tilted).
Default is "?creditCardUserGuidanceBadPerspective"
*/
badPerspective = '?creditCardUserGuidanceBadPerspective';
/** @param source {@displayType `DeepPartial<CreditCardScannerGuidanceStates>`} */
constructor(source = {}) {
super();
if (source.noCardFound !== undefined) {
this.noCardFound = source.noCardFound;
}
if (source.scanningProgress !== undefined) {
this.scanningProgress = source.scanningProgress;
}
if (source.tooDark !== undefined) {
this.tooDark = source.tooDark;
}
if (source.tooSmall !== undefined) {
this.tooSmall = source.tooSmall;
}
if (source.badPerspective !== undefined) {
this.badPerspective = source.badPerspective;
}
}
}
/**
Configuration of the hints guiding users through the credit card scanning process.
*/
exports.CreditCardScannerGuidanceStates = CreditCardScannerGuidanceStates;
class CreditCardScanGuidanceConfiguration extends _utils.PartiallyConstructible {
/**
Determines whether the user guidance hints should be visible (enabled).
Default is true
*/
visibility = true;
/**
Configure the text style for the user guidance hints.
*/
title = new _Common.StyledText({
text: '?creditCardUserGuidanceNoCardFound',
color: '?sbColorOnPrimary'
});
/**
Configure the background style for the user guidance hints.
*/
background = new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '?sbColorSurfaceLow'
});
/**
Configure the captions of the user guidance hints for different states.
*/
statesTitles = new CreditCardScannerGuidanceStates({});
/** @param source {@displayType `DeepPartial<CreditCardScanGuidanceConfiguration>`} */
constructor(source = {}) {
super();
if (source.visibility !== undefined) {
this.visibility = source.visibility;
}
if (source.title !== undefined) {
this.title = new _Common.StyledText(source.title);
}
if (source.background !== undefined) {
this.background = new _Common.BackgroundStyle(source.background);
}
if (source.statesTitles !== undefined) {
this.statesTitles = new CreditCardScannerGuidanceStates(source.statesTitles);
}
}
}
exports.CreditCardScanGuidanceConfiguration = CreditCardScanGuidanceConfiguration;
//# sourceMappingURL=CreditCardScannerUserGuidance.js.map