UNPKG

@biopassid/fingerprint-sdk-react-native

Version:
132 lines (131 loc) 3.56 kB
"use strict"; import { FingerprintCaptureType } from "../config/enums/FingerprintCaptureType.js"; import { FingerprintOutputType } from "../config/enums/FingerprintOutputType.js"; import { FingerprintResolutionPreset } from "../config/enums/FingerprintResolutionPreset.js"; const defaultConfig = { licenseKey: '', numberFingersToCapture: 4, fontFamily: 'fingerprintsdk_opensans_regular', overlayColor: '#80000000', timeToCapture: 5, resolutionPreset: FingerprintResolutionPreset.HIGH, captureType: FingerprintCaptureType.LEFT_HAND_FINGERS, outputType: FingerprintOutputType.CAPTURE_AND_SEGMENTATION, captureCountdown: { enabled: true, backgroundColor: '#50888888', progressColor: '#D6A262', textColor: '#FFFFFF' }, backButton: { enabled: true, backgroundColor: '#00000000', buttonPadding: 0, buttonSize: { width: 56, height: 56 }, iconOptions: { enabled: true, iconFile: 'fingerprintsdk_ic_close', iconColor: '#FFFFFF', iconSize: { width: 32, height: 32 } }, labelOptions: { enabled: false, content: 'Voltar', textColor: '#FFFFFF', textSize: 14 } }, helpText: { enabled: true, messages: { leftHandMessage: 'Encaixe a mão esquerda (sem o polegar)\naté o marcador ficar centralizado.', rightHandMessage: 'Encaixe a mão direita (sem o polegar)\naté o marcador ficar centralizado.', thumbsMessage: 'Encaixe os polegares\naté o marcador ficar centralizado.' }, textColor: '#FFFFFF', textSize: 14 }, fingerEllipse: { enabled: true, ellipseColor: '#80D6A262' }, distanceIndicator: { enabled: true, selectedBarColor: '#D6A262', unselectedBarColor: '#FFFFFF', arrowColor: '#D6A262', tooCloseText: { enabled: true, content: 'Muito perto', textColor: '#FFFFFF', textSize: 14 }, tooFarText: { enabled: true, content: 'Muito longe', textColor: '#FFFFFF', textSize: 14 } } }; export function mergeConfigs(config) { return { ...defaultConfig, ...config, captureCountdown: { ...defaultConfig.captureCountdown, ...config.captureCountdown }, backButton: { ...defaultConfig.backButton, ...config.backButton, buttonSize: { ...defaultConfig.backButton?.buttonSize, ...config.backButton?.buttonSize }, iconOptions: { ...defaultConfig.backButton?.iconOptions, ...config.backButton?.iconOptions, iconSize: { ...defaultConfig.backButton?.iconOptions?.iconSize, ...config.backButton?.iconOptions?.iconSize } }, labelOptions: { ...defaultConfig.backButton?.labelOptions, ...config.backButton?.labelOptions } }, helpText: { ...defaultConfig.helpText, ...config.helpText, messages: { ...defaultConfig.helpText?.messages, ...config.helpText?.messages } }, fingerEllipse: { ...defaultConfig.fingerEllipse, ...config.fingerEllipse }, distanceIndicator: { ...defaultConfig.distanceIndicator, ...config.distanceIndicator, tooCloseText: { ...defaultConfig.distanceIndicator?.tooCloseText, ...config.distanceIndicator?.tooCloseText }, tooFarText: { ...defaultConfig.distanceIndicator?.tooFarText, ...config.distanceIndicator?.tooFarText } } }; } //# sourceMappingURL=Utils.js.map