capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
101 lines (95 loc) • 4.02 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/check/CheckScannerUserGuidance.yaml
import { BackgroundStyle, StyledText } from '../../ui_v2/common/Common';
import { PartiallyConstructible } from '../../utils/utils';
/**
Configure the captions of the user guidance hints for different scanning states.
*/
export class CheckScannerGuidanceStates extends PartiallyConstructible {
/** @param source {@displayType `DeepPartial<CheckScannerGuidanceStates>`} */
constructor(source = {}) {
super();
/**
The user guidance text displayed when no check is found. Initial state.
Default is "?checkUserGuidanceNoCheckFound"
*/
this.noCheckFound = '?checkUserGuidanceNoCheckFound';
/**
The user guidance text displayed when a check presence was detected and scanning is in progress.
Default is "?checkUserGuidanceScanningProgress"
*/
this.scanningProgress = '?checkUserGuidanceScanningProgress';
/**
The user guidance text displayed when it is too dark to capture an adequate image.
Default is "?checkUserGuidanceTooDark"
*/
this.tooDark = '?checkUserGuidanceTooDark';
/**
The user guidance text displayed when the detected check is too far away and appears too small.
Default is "?checkUserGuidanceTooSmall"
*/
this.tooSmall = '?checkUserGuidanceTooSmall';
/**
The user guidance text displayed when the detected check is not in a good perspective (device tilted).
Default is "?checkUserGuidanceBadPerspective"
*/
this.badPerspective = '?checkUserGuidanceBadPerspective';
if (source.noCheckFound !== undefined) {
this.noCheckFound = source.noCheckFound;
}
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 check scanning process.
*/
export class CheckScannerGuidanceConfiguration extends PartiallyConstructible {
/** @param source {@displayType `DeepPartial<CheckScannerGuidanceConfiguration>`} */
constructor(source = {}) {
super();
/**
Determines whether the user guidance hints should be visible (enabled).
Default is true
*/
this.visibility = true;
/**
Configure the text style for the user guidance hints.
*/
this.title = new StyledText({ text: '?checkUserGuidanceNoCheckFound', color: '?sbColorOnPrimary' });
/**
Configure the background style for the user guidance hints.
*/
this.background = new BackgroundStyle({
strokeColor: '#00000000',
fillColor: '?sbColorSurfaceLow',
});
/**
Configure the captions of the user guidance hints for different states.
*/
this.statesTitles = new CheckScannerGuidanceStates({});
if (source.visibility !== undefined) {
this.visibility = source.visibility;
}
if (source.title !== undefined) {
this.title = new StyledText(source.title);
}
if (source.background !== undefined) {
this.background = new BackgroundStyle(source.background);
}
if (source.statesTitles !== undefined) {
this.statesTitles = new CheckScannerGuidanceStates(source.statesTitles);
}
}
}
//# sourceMappingURL=CheckScannerUserGuidance.js.map