react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
947 lines (936 loc) • 41.6 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
startBarcodeScanner: true,
startDocumentScanner: true,
startCroppingScreen: true,
startMRZScanner: true,
startTextPatternScanner: true,
startCreditCardScanner: true,
startCheckScanner: true,
startDocumentDataExtractor: true,
startVINScanner: true
};
exports.startBarcodeScanner = startBarcodeScanner;
exports.startCheckScanner = startCheckScanner;
exports.startCreditCardScanner = startCreditCardScanner;
exports.startCroppingScreen = startCroppingScreen;
exports.startDocumentDataExtractor = startDocumentDataExtractor;
exports.startDocumentScanner = startDocumentScanner;
exports.startMRZScanner = startMRZScanner;
exports.startTextPatternScanner = startTextPatternScanner;
exports.startVINScanner = startVINScanner;
var _reactNative = require("react-native");
var _document_scanner = require("../document_scanner");
var _utils = require("../utils");
var _BarcodeScannerUiResult = require("./barcode/BarcodeScannerUiResult");
Object.keys(_BarcodeScannerUiResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeScannerUiResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeScannerUiResult[key];
}
});
});
var _MultipleScanningModeUseCase = require("./barcode/MultipleScanningModeUseCase");
Object.keys(_MultipleScanningModeUseCase).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _MultipleScanningModeUseCase[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _MultipleScanningModeUseCase[key];
}
});
});
var _SingleScanningModeUseCase = require("./barcode/SingleScanningModeUseCase");
Object.keys(_SingleScanningModeUseCase).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _SingleScanningModeUseCase[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _SingleScanningModeUseCase[key];
}
});
});
var _CheckScannerUIResult = require("./check/CheckScannerUIResult");
Object.keys(_CheckScannerUIResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CheckScannerUIResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CheckScannerUIResult[key];
}
});
});
var _CreditCardScannerUIResult = require("./creditcard/CreditCardScannerUIResult");
Object.keys(_CreditCardScannerUIResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CreditCardScannerUIResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CreditCardScannerUIResult[key];
}
});
});
var _DocumentDataExtractorUIResult = require("./dde/DocumentDataExtractorUIResult");
Object.keys(_DocumentDataExtractorUIResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentDataExtractorUIResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentDataExtractorUIResult[key];
}
});
});
var _MRZScannerUIResult = require("./mrz/MRZScannerUIResult");
Object.keys(_MRZScannerUIResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _MRZScannerUIResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _MRZScannerUIResult[key];
}
});
});
var _TextPatternScannerUIResult = require("./textpattern/TextPatternScannerUIResult");
Object.keys(_TextPatternScannerUIResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _TextPatternScannerUIResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _TextPatternScannerUIResult[key];
}
});
});
var _VINScannerUIResult = require("./vin/VINScannerUIResult");
Object.keys(_VINScannerUIResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _VINScannerUIResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _VINScannerUIResult[key];
}
});
});
var _ArTrackingOverlayConfiguration = require("./barcode/ArTrackingOverlayConfiguration");
Object.keys(_ArTrackingOverlayConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ArTrackingOverlayConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ArTrackingOverlayConfiguration[key];
}
});
});
var _BarcodeInfoMapping = require("./barcode/BarcodeInfoMapping");
Object.keys(_BarcodeInfoMapping).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeInfoMapping[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeInfoMapping[key];
}
});
});
var _BarcodeItemMapper = require("./barcode/BarcodeItemMapper");
Object.keys(_BarcodeItemMapper).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeItemMapper[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeItemMapper[key];
}
});
});
var _BarcodeScannerConfiguration = require("./barcode/BarcodeScannerConfiguration");
Object.keys(_BarcodeScannerConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeScannerConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeScannerConfiguration[key];
}
});
});
var _BarcodeScannerScreenConfiguration = require("./barcode/BarcodeScannerScreenConfiguration");
Object.keys(_BarcodeScannerScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeScannerScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeScannerScreenConfiguration[key];
}
});
});
var _BarcodeTextLocalization = require("./barcode/BarcodeTextLocalization");
Object.keys(_BarcodeTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeTextLocalization[key];
}
});
});
var _BarcodeUseCase = require("./barcode/BarcodeUseCase");
Object.keys(_BarcodeUseCase).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _BarcodeUseCase[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _BarcodeUseCase[key];
}
});
});
var _FindAndPickScanningModeUseCase = require("./barcode/FindAndPickScanningModeUseCase");
Object.keys(_FindAndPickScanningModeUseCase).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _FindAndPickScanningModeUseCase[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _FindAndPickScanningModeUseCase[key];
}
});
});
var _CheckScannerIntroScreenConfiguration = require("./check/CheckScannerIntroScreenConfiguration");
Object.keys(_CheckScannerIntroScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CheckScannerIntroScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CheckScannerIntroScreenConfiguration[key];
}
});
});
var _CheckScannerScreenConfiguration = require("./check/CheckScannerScreenConfiguration");
Object.keys(_CheckScannerScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CheckScannerScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CheckScannerScreenConfiguration[key];
}
});
});
var _CheckScannerScreenTextLocalization = require("./check/CheckScannerScreenTextLocalization");
Object.keys(_CheckScannerScreenTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CheckScannerScreenTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CheckScannerScreenTextLocalization[key];
}
});
});
var _CheckScannerUserGuidance = require("./check/CheckScannerUserGuidance");
Object.keys(_CheckScannerUserGuidance).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CheckScannerUserGuidance[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CheckScannerUserGuidance[key];
}
});
});
var _CheckScanningProgressConfiguration = require("./check/CheckScanningProgressConfiguration");
Object.keys(_CheckScanningProgressConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CheckScanningProgressConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CheckScanningProgressConfiguration[key];
}
});
});
var _ActionBarConfiguration = require("./common/ActionBarConfiguration");
Object.keys(_ActionBarConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ActionBarConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ActionBarConfiguration[key];
}
});
});
var _CameraConfiguration = require("./common/CameraConfiguration");
Object.keys(_CameraConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CameraConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CameraConfiguration[key];
}
});
});
var _CameraPermission = require("./common/CameraPermission");
Object.keys(_CameraPermission).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CameraPermission[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CameraPermission[key];
}
});
});
var _Common = require("./common/Common");
Object.keys(_Common).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _Common[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _Common[key];
}
});
});
var _NavigationBarConfiguration = require("./common/NavigationBarConfiguration");
Object.keys(_NavigationBarConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _NavigationBarConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _NavigationBarConfiguration[key];
}
});
});
var _ScanCompletionOverlay = require("./common/ScanCompletionOverlay");
Object.keys(_ScanCompletionOverlay).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ScanCompletionOverlay[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ScanCompletionOverlay[key];
}
});
});
var _ScanbotAlertDialog = require("./common/ScanbotAlertDialog");
Object.keys(_ScanbotAlertDialog).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ScanbotAlertDialog[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ScanbotAlertDialog[key];
}
});
});
var _TopBarConfiguration = require("./common/TopBarConfiguration");
Object.keys(_TopBarConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _TopBarConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _TopBarConfiguration[key];
}
});
});
var _UserGuidanceConfiguration = require("./common/UserGuidanceConfiguration");
Object.keys(_UserGuidanceConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _UserGuidanceConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _UserGuidanceConfiguration[key];
}
});
});
var _ViewFinderConfiguration = require("./common/ViewFinderConfiguration");
Object.keys(_ViewFinderConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ViewFinderConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ViewFinderConfiguration[key];
}
});
});
var _CreditCardScannerIntroScreenConfiguration = require("./creditcard/CreditCardScannerIntroScreenConfiguration");
Object.keys(_CreditCardScannerIntroScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CreditCardScannerIntroScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CreditCardScannerIntroScreenConfiguration[key];
}
});
});
var _CreditCardScannerScreenConfiguration = require("./creditcard/CreditCardScannerScreenConfiguration");
Object.keys(_CreditCardScannerScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CreditCardScannerScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CreditCardScannerScreenConfiguration[key];
}
});
});
var _CreditCardScannerScreenTextLocalization = require("./creditcard/CreditCardScannerScreenTextLocalization");
Object.keys(_CreditCardScannerScreenTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CreditCardScannerScreenTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CreditCardScannerScreenTextLocalization[key];
}
});
});
var _CreditCardScannerUserGuidance = require("./creditcard/CreditCardScannerUserGuidance");
Object.keys(_CreditCardScannerUserGuidance).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CreditCardScannerUserGuidance[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CreditCardScannerUserGuidance[key];
}
});
});
var _CreditCardScanningProgressConfiguration = require("./creditcard/CreditCardScanningProgressConfiguration");
Object.keys(_CreditCardScanningProgressConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CreditCardScanningProgressConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CreditCardScanningProgressConfiguration[key];
}
});
});
var _DocumentDataExtractionProgressConfiguration = require("./dde/DocumentDataExtractionProgressConfiguration");
Object.keys(_DocumentDataExtractionProgressConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentDataExtractionProgressConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentDataExtractionProgressConfiguration[key];
}
});
});
var _DocumentDataExtractorIntroScreenConfiguration = require("./dde/DocumentDataExtractorIntroScreenConfiguration");
Object.keys(_DocumentDataExtractorIntroScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentDataExtractorIntroScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentDataExtractorIntroScreenConfiguration[key];
}
});
});
var _DocumentDataExtractorScreenConfiguration = require("./dde/DocumentDataExtractorScreenConfiguration");
Object.keys(_DocumentDataExtractorScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentDataExtractorScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentDataExtractorScreenConfiguration[key];
}
});
});
var _DocumentDataExtractorScreenTextLocalization = require("./dde/DocumentDataExtractorScreenTextLocalization");
Object.keys(_DocumentDataExtractorScreenTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentDataExtractorScreenTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentDataExtractorScreenTextLocalization[key];
}
});
});
var _DocumentDataExtractorUserGuidance = require("./dde/DocumentDataExtractorUserGuidance");
Object.keys(_DocumentDataExtractorUserGuidance).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentDataExtractorUserGuidance[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentDataExtractorUserGuidance[key];
}
});
});
var _AcknowledgementScreenConfiguration = require("./document/AcknowledgementScreenConfiguration");
Object.keys(_AcknowledgementScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _AcknowledgementScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _AcknowledgementScreenConfiguration[key];
}
});
});
var _CameraScreenConfiguration = require("./document/CameraScreenConfiguration");
Object.keys(_CameraScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CameraScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CameraScreenConfiguration[key];
}
});
});
var _CroppingConfiguration = require("./document/CroppingConfiguration");
Object.keys(_CroppingConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CroppingConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CroppingConfiguration[key];
}
});
});
var _CroppingResult = require("./document/CroppingResult");
Object.keys(_CroppingResult).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CroppingResult[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CroppingResult[key];
}
});
});
var _CroppingScreenConfiguration = require("./document/CroppingScreenConfiguration");
Object.keys(_CroppingScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CroppingScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CroppingScreenConfiguration[key];
}
});
});
var _CroppingTextLocalization = require("./document/CroppingTextLocalization");
Object.keys(_CroppingTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _CroppingTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _CroppingTextLocalization[key];
}
});
});
var _DocumentScannerCameraConfiguration = require("./document/DocumentScannerCameraConfiguration");
Object.keys(_DocumentScannerCameraConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScannerCameraConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScannerCameraConfiguration[key];
}
});
});
var _DocumentScannerGuidanceVisibility = require("./document/DocumentScannerGuidanceVisibility");
Object.keys(_DocumentScannerGuidanceVisibility).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScannerGuidanceVisibility[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScannerGuidanceVisibility[key];
}
});
});
var _DocumentScannerOutputSettings = require("./document/DocumentScannerOutputSettings");
Object.keys(_DocumentScannerOutputSettings).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScannerOutputSettings[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScannerOutputSettings[key];
}
});
});
var _DocumentScannerScreens = require("./document/DocumentScannerScreens");
Object.keys(_DocumentScannerScreens).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScannerScreens[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScannerScreens[key];
}
});
});
var _DocumentScannerTextLocalization = require("./document/DocumentScannerTextLocalization");
Object.keys(_DocumentScannerTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScannerTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScannerTextLocalization[key];
}
});
});
var _DocumentScannerUserGuidance = require("./document/DocumentScannerUserGuidance");
Object.keys(_DocumentScannerUserGuidance).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScannerUserGuidance[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScannerUserGuidance[key];
}
});
});
var _DocumentScanningFlow = require("./document/DocumentScanningFlow");
Object.keys(_DocumentScanningFlow).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _DocumentScanningFlow[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _DocumentScanningFlow[key];
}
});
});
var _IntroductionScreenConfiguration = require("./document/IntroductionScreenConfiguration");
Object.keys(_IntroductionScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _IntroductionScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _IntroductionScreenConfiguration[key];
}
});
});
var _ReorderPagesScreenConfiguration = require("./document/ReorderPagesScreenConfiguration");
Object.keys(_ReorderPagesScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ReorderPagesScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ReorderPagesScreenConfiguration[key];
}
});
});
var _ReviewScreenConfiguration = require("./document/ReviewScreenConfiguration");
Object.keys(_ReviewScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _ReviewScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ReviewScreenConfiguration[key];
}
});
});
var _MRZFinderLayoutPreset = require("./mrz/MRZFinderLayoutPreset");
Object.keys(_MRZFinderLayoutPreset).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _MRZFinderLayoutPreset[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _MRZFinderLayoutPreset[key];
}
});
});
var _MRZScannerIntroScreenConfiguration = require("./mrz/MRZScannerIntroScreenConfiguration");
Object.keys(_MRZScannerIntroScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _MRZScannerIntroScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _MRZScannerIntroScreenConfiguration[key];
}
});
});
var _MRZScannerScreenConfiguration = require("./mrz/MRZScannerScreenConfiguration");
Object.keys(_MRZScannerScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _MRZScannerScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _MRZScannerScreenConfiguration[key];
}
});
});
var _MRZScannerScreenTextLocalization = require("./mrz/MRZScannerScreenTextLocalization");
Object.keys(_MRZScannerScreenTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _MRZScannerScreenTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _MRZScannerScreenTextLocalization[key];
}
});
});
var _TextPatternScannerIntroScreenConfiguration = require("./textpattern/TextPatternScannerIntroScreenConfiguration");
Object.keys(_TextPatternScannerIntroScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _TextPatternScannerIntroScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _TextPatternScannerIntroScreenConfiguration[key];
}
});
});
var _TextPatternScannerScreenConfiguration = require("./textpattern/TextPatternScannerScreenConfiguration");
Object.keys(_TextPatternScannerScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _TextPatternScannerScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _TextPatternScannerScreenConfiguration[key];
}
});
});
var _TextPatternScannerScreenTextLocalization = require("./textpattern/TextPatternScannerScreenTextLocalization");
Object.keys(_TextPatternScannerScreenTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _TextPatternScannerScreenTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _TextPatternScannerScreenTextLocalization[key];
}
});
});
var _VINScannerIntroScreenConfiguration = require("./vin/VINScannerIntroScreenConfiguration");
Object.keys(_VINScannerIntroScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _VINScannerIntroScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _VINScannerIntroScreenConfiguration[key];
}
});
});
var _VINScannerScreenConfiguration = require("./vin/VINScannerScreenConfiguration");
Object.keys(_VINScannerScreenConfiguration).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _VINScannerScreenConfiguration[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _VINScannerScreenConfiguration[key];
}
});
});
var _VINScannerScreenTextLocalization = require("./vin/VINScannerScreenTextLocalization");
Object.keys(_VINScannerScreenTextLocalization).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _VINScannerScreenTextLocalization[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _VINScannerScreenTextLocalization[key];
}
});
});
const LINKING_ERROR = `The package 'react-native-scanbot-sdk' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
const ScanbotSDKUIImpl = _reactNative.NativeModules.RNScanbotRTUUI ? _reactNative.NativeModules.RNScanbotRTUUI : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
const isIOS = _reactNative.Platform.OS === 'ios';
/**
* Opens the Ready-To-Use UI screen for scanning Barcodes and QR-Codes with the desired configuration.
*/
async function startBarcodeScanner(config) {
const barcodeItemMapperEventName = 'barcodeItemMapperEvent';
let barcodeItemMapperCallback = null;
let barcodeItemMapperEventEmitter = null;
if (config.useCase instanceof _SingleScanningModeUseCase.SingleScanningMode || config.useCase instanceof _MultipleScanningModeUseCase.MultipleScanningMode) {
barcodeItemMapperCallback = config.useCase.barcodeInfoMapping.barcodeItemMapper;
if (barcodeItemMapperCallback) {
barcodeItemMapperEventEmitter = new _reactNative.NativeEventEmitter(ScanbotSDKUIImpl);
barcodeItemMapperEventEmitter.removeAllListeners(barcodeItemMapperEventName);
barcodeItemMapperEventEmitter.addListener(barcodeItemMapperEventName, barcodeItem => {
const barcodeItemUuid = `${barcodeItem.text}${barcodeItem.upcEanExtension}_${barcodeItem.format}`;
barcodeItemMapperCallback(barcodeItem, barcodeMappedData => ScanbotSDKUIImpl.onBarcodeItemMapper(barcodeItemUuid, barcodeMappedData), () => ScanbotSDKUIImpl.onBarcodeItemMapper(barcodeItemUuid, null));
});
// On iOS, the communication with the native part is throwing an error (startBarcodeScannerV2) because of the barcodeItemMapper
// callback in the configuration class (not parsable), that's why we need to remove it before executing startBarcodeScannerV2 method
config.useCase.barcodeInfoMapping.barcodeItemMapper = null;
return new Promise((resolve, reject) => {
ScanbotSDKUIImpl.startBarcodeScanner(isIOS ? JSON.stringify(config) : config, true).then(result => {
barcodeItemMapperEventEmitter?.removeAllListeners(barcodeItemMapperEventName);
barcodeItemMapperEventEmitter = null;
resolve((0, _utils.mapRTUUIResult)(result, _BarcodeScannerUiResult.BarcodeScannerUiResult));
}).catch(error => {
barcodeItemMapperEventEmitter?.removeAllListeners(barcodeItemMapperEventName);
barcodeItemMapperEventEmitter = null;
reject(error);
});
});
}
}
return ScanbotSDKUIImpl.startBarcodeScanner(isIOS ? JSON.stringify(config) : config, false).then(result => (0, _utils.mapRTUUIResult)(result, _BarcodeScannerUiResult.BarcodeScannerUiResult));
}
/**
* Opens the Ready-To-Use UI Document Scanner screen with the desired configuration.
*/
async function startDocumentScanner(config) {
return ScanbotSDKUIImpl.startDocumentScannerV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _document_scanner.DocumentData));
}
/**
* Opens the Ready-To-Use UI Cropping screen with the desired configuration.
*/
async function startCroppingScreen(config) {
return ScanbotSDKUIImpl.startCroppingScreenV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _document_scanner.DocumentData));
}
/**
* Opens the Ready-To-Use UI MRZ Scanner screen with the desired configuration.
*/
async function startMRZScanner(config) {
return ScanbotSDKUIImpl.startMRZScannerV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _MRZScannerUIResult.MrzScannerUiResult));
}
/**
* Opens the Ready-To-Use UI Text Pattern scanner with the desired configuration.
*/
async function startTextPatternScanner(config) {
return ScanbotSDKUIImpl.startTextPatternScannerV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _TextPatternScannerUIResult.TextPatternScannerUiResult));
}
/**
* Opens the Ready-To-Use UI Credit Card scanner with the desired configuration.
*/
async function startCreditCardScanner(config) {
return ScanbotSDKUIImpl.startCreditCardScannerV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _CreditCardScannerUIResult.CreditCardScannerUiResult));
}
/**
* Opens the Ready-To-Use UI Check scanner with the desired configuration.
*/
async function startCheckScanner(config) {
return ScanbotSDKUIImpl.startCheckScannerV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _CheckScannerUIResult.CheckScannerUiResult));
}
/**
* Opens the Ready-To-Use UI Document Data Extractor screen with the desired configuration.
*/
async function startDocumentDataExtractor(config) {
return ScanbotSDKUIImpl.startDocumentDataExtractor(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _DocumentDataExtractorUIResult.DocumentDataExtractorUiResult));
}
/**
* Opens the Ready-To-Use UI VIN Scanner screen with the desired configuration.
*/
async function startVINScanner(config) {
return ScanbotSDKUIImpl.startVINScannerV2(isIOS ? JSON.stringify(config) : config).then(result => (0, _utils.mapRTUUIResult)(result, _VINScannerUIResult.VinScannerUiResult));
}
//# sourceMappingURL=index.js.map