react-native-scanbot-barcode-scanner-sdk 7.1.2-rc.2 → 8.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/Libraries.txt +437 -17
- package/README.md +32 -34
- package/RNScanbotBarcodeSDK.podspec +3 -2
- package/android/gradle.properties +3 -3
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.kt +117 -69
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkPluginResultDelegate.kt +3 -2
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerView.kt +76 -50
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewEvents.kt +24 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewManager.kt +66 -55
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/models/ScanbotBarcodeScannerModels.kt +1 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/extensions/Extensions.kt +19 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerLegacyView.h +8 -7
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerLegacyView.m +92 -221
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerView.h +12 -8
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerView.mm +147 -317
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewController+Utils.swift +74 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewController.swift +429 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewManager.mm +17 -23
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewOperators.h +95 -0
- package/ios/ScanbotBarcodeSdk.m +58 -76
- package/ios/ScanbotBarcodeSdkPluginResultDelegate.m +2 -6
- package/lib/commonjs/Barcode.js +51 -0
- package/lib/commonjs/Barcode.js.map +1 -0
- package/lib/commonjs/ImageProcessor.js +24 -0
- package/lib/commonjs/ImageProcessor.js.map +1 -0
- package/lib/commonjs/Sdk.js +57 -0
- package/lib/commonjs/Sdk.js.map +1 -0
- package/lib/commonjs/{component → components}/barcode-camera-view/ScanbotBarcodeCameraView.js +14 -9
- package/lib/commonjs/components/barcode-camera-view/ScanbotBarcodeCameraView.js.map +1 -0
- package/lib/commonjs/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js.map +1 -0
- package/lib/commonjs/components/barcode-camera-view/ScanbotBarcodeCameraViewTypes.js.map +1 -0
- package/lib/commonjs/{component/barcode-camera-view → components}/index.js +3 -3
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/components/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +1 -0
- package/lib/commonjs/impl/BarcodeScannerImpl.js +59 -0
- package/lib/commonjs/impl/BarcodeScannerImpl.js.map +1 -0
- package/lib/commonjs/impl/ImageProcessorImpl.js +20 -0
- package/lib/commonjs/impl/ImageProcessorImpl.js.map +1 -0
- package/lib/commonjs/impl/SdkImpl.js +27 -0
- package/lib/commonjs/impl/SdkImpl.js.map +1 -0
- package/lib/commonjs/impl/index.js +39 -0
- package/lib/commonjs/impl/index.js.map +1 -0
- package/lib/commonjs/impl/scanbotBarcodeSDKModule.js +22 -0
- package/lib/commonjs/impl/scanbotBarcodeSDKModule.js.map +1 -0
- package/lib/commonjs/index.js +18 -162
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types/base/SdkConfiguration.js +106 -0
- package/lib/commonjs/types/base/SdkConfiguration.js.map +1 -0
- package/lib/commonjs/{base/barcodeSDKConfigurations.js → types/base/customTypes.js} +1 -1
- package/lib/commonjs/types/base/customTypes.js.map +1 -0
- package/lib/commonjs/types/base/errors.js +139 -0
- package/lib/commonjs/types/base/errors.js.map +1 -0
- package/lib/commonjs/types/base/index.js +50 -0
- package/lib/commonjs/types/base/index.js.map +1 -0
- package/lib/commonjs/types/base/utils.js +59 -0
- package/lib/commonjs/types/base/utils.js.map +1 -0
- package/lib/commonjs/{barcode → types/core/barcode}/BarcodeConfigurationTypes.js +244 -74
- package/lib/commonjs/types/core/barcode/BarcodeConfigurationTypes.js.map +1 -0
- package/lib/commonjs/{barcode → types/core/barcode}/BarcodeDocumentTypes.js +62 -10
- package/lib/commonjs/types/core/barcode/BarcodeDocumentTypes.js.map +1 -0
- package/lib/commonjs/{barcode → types/core/barcode}/BarcodeScannerTypes.js +39 -28
- package/lib/commonjs/types/core/barcode/BarcodeScannerTypes.js.map +1 -0
- package/lib/commonjs/{barcode → types/core/barcode}/BarcodeTypes.js +31 -12
- package/lib/commonjs/types/core/barcode/BarcodeTypes.js.map +1 -0
- package/lib/commonjs/types/core/barcode/index.js.map +1 -0
- package/lib/commonjs/types/core/camera/Camera.js +23 -0
- package/lib/commonjs/types/core/camera/Camera.js.map +1 -0
- package/lib/commonjs/types/core/camera/index.js +17 -0
- package/lib/commonjs/types/core/camera/index.js.map +1 -0
- package/lib/commonjs/types/core/common/CommonTypes.js +29 -0
- package/lib/commonjs/types/core/common/CommonTypes.js.map +1 -0
- package/lib/commonjs/{utils/json → types/core/common}/JsonSerializationTypes.js +2 -3
- package/lib/commonjs/types/core/common/JsonSerializationTypes.js.map +1 -0
- package/lib/commonjs/types/core/common/index.js +28 -0
- package/lib/commonjs/types/core/common/index.js.map +1 -0
- package/lib/commonjs/{documents → types/core/generic_document}/BarcodeDocumentModel.js +1131 -160
- package/lib/commonjs/types/core/generic_document/BarcodeDocumentModel.js.map +1 -0
- package/lib/commonjs/{documents → types/core/generic_document}/CommonFieldType.js +6 -3
- package/lib/commonjs/types/core/generic_document/CommonFieldType.js.map +1 -0
- package/lib/commonjs/{documents → types/core/generic_document}/GenericDocument.js +13 -18
- package/lib/commonjs/types/core/generic_document/GenericDocument.js.map +1 -0
- package/lib/commonjs/types/core/generic_document/index.js.map +1 -0
- package/lib/commonjs/{utils → types/core}/geometry/Geometry.js +4 -8
- package/lib/commonjs/types/core/geometry/Geometry.js.map +1 -0
- package/lib/commonjs/types/core/geometry/index.js +17 -0
- package/lib/commonjs/types/core/geometry/index.js.map +1 -0
- package/lib/commonjs/{imageRef → types/core/image}/ImageRefTypes.js +157 -69
- package/lib/commonjs/types/core/image/ImageRefTypes.js.map +1 -0
- package/lib/commonjs/types/core/image/ImageTypes.js +41 -0
- package/lib/commonjs/types/core/image/ImageTypes.js.map +1 -0
- package/lib/commonjs/{imageRef → types/core/image}/image.js +54 -50
- package/lib/commonjs/types/core/image/image.js.map +1 -0
- package/lib/commonjs/{imageRef → types/core/image}/index.js +0 -11
- package/lib/commonjs/types/core/image/index.js.map +1 -0
- package/lib/commonjs/types/core/index.js +105 -0
- package/lib/commonjs/types/core/index.js.map +1 -0
- package/lib/commonjs/types/core/licensing/LicensingTypes.js +239 -0
- package/lib/commonjs/types/core/licensing/LicensingTypes.js.map +1 -0
- package/lib/commonjs/types/core/licensing/index.js +17 -0
- package/lib/commonjs/types/core/licensing/index.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/ArTrackingOverlayConfiguration.js +8 -14
- package/lib/commonjs/types/core/ui_v2/barcode/ArTrackingOverlayConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/BarcodeInfoMapping.js +4 -8
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeInfoMapping.js.map +1 -0
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeItemMapper.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerScreenConfiguration.js +17 -19
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerUiResult.js +3 -6
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeScannerUiResult.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/BarcodeTextLocalization.js +1 -3
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeTextLocalization.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/BarcodeUseCase.js +6 -6
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeUseCase.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/FindAndPickScanningModeUseCase.js +6 -9
- package/lib/commonjs/types/core/ui_v2/barcode/FindAndPickScanningModeUseCase.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/MultipleScanningModeUseCase.js +11 -14
- package/lib/commonjs/types/core/ui_v2/barcode/MultipleScanningModeUseCase.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/SingleScanningModeUseCase.js +4 -6
- package/lib/commonjs/types/core/ui_v2/barcode/SingleScanningModeUseCase.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/ActionBarConfiguration.js +2 -4
- package/lib/commonjs/types/core/ui_v2/common/ActionBarConfiguration.js.map +1 -0
- package/lib/commonjs/types/core/ui_v2/common/BottomBarConfiguration.js +23 -0
- package/lib/commonjs/types/core/ui_v2/common/BottomBarConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/CameraConfiguration.js +11 -3
- package/lib/commonjs/types/core/ui_v2/common/CameraConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/CameraPermission.js +2 -4
- package/lib/commonjs/types/core/ui_v2/common/CameraPermission.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/Common.js +20 -35
- package/lib/commonjs/types/core/ui_v2/common/Common.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/NavigationBarConfiguration.js +1 -0
- package/lib/commonjs/types/core/ui_v2/common/NavigationBarConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/ScanCompletionOverlay.js +2 -4
- package/lib/commonjs/types/core/ui_v2/common/ScanCompletionOverlay.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/ScanbotAlertDialog.js +2 -4
- package/lib/commonjs/types/core/ui_v2/common/ScanbotAlertDialog.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/TopBarConfiguration.js +4 -4
- package/lib/commonjs/types/core/ui_v2/common/TopBarConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/UserGuidanceConfiguration.js +3 -6
- package/lib/commonjs/types/core/ui_v2/common/UserGuidanceConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/common/ViewFinderConfiguration.js +14 -19
- package/lib/commonjs/types/core/ui_v2/common/ViewFinderConfiguration.js.map +1 -0
- package/lib/commonjs/{ui_v2 → types/core/ui_v2}/index.js +15 -15
- package/lib/commonjs/types/core/ui_v2/index.js.map +1 -0
- package/lib/commonjs/{imageRef → types/core/utils}/ObjectPoolTypes.js +2 -4
- package/lib/commonjs/types/core/utils/ObjectPoolTypes.js.map +1 -0
- package/lib/commonjs/types/core/utils/index.js +28 -0
- package/lib/commonjs/types/core/utils/index.js.map +1 -0
- package/lib/commonjs/types/core/utils/utils.js +10 -0
- package/lib/commonjs/types/core/utils/utils.js.map +1 -0
- package/lib/commonjs/types/index.js +28 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/module/Barcode.js +45 -0
- package/lib/module/Barcode.js.map +1 -0
- package/lib/module/ImageProcessor.js +19 -0
- package/lib/module/ImageProcessor.js.map +1 -0
- package/lib/module/Sdk.js +51 -0
- package/lib/module/Sdk.js.map +1 -0
- package/lib/module/{component → components}/barcode-camera-view/ScanbotBarcodeCameraView.js +10 -4
- package/lib/module/components/barcode-camera-view/ScanbotBarcodeCameraView.js.map +1 -0
- package/lib/module/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js.map +1 -0
- package/lib/module/components/barcode-camera-view/ScanbotBarcodeCameraViewTypes.js.map +1 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +1 -0
- package/lib/module/impl/BarcodeScannerImpl.js +53 -0
- package/lib/module/impl/BarcodeScannerImpl.js.map +1 -0
- package/lib/module/impl/ImageProcessorImpl.js +15 -0
- package/lib/module/impl/ImageProcessorImpl.js.map +1 -0
- package/lib/module/impl/SdkImpl.js +22 -0
- package/lib/module/impl/SdkImpl.js.map +1 -0
- package/lib/module/impl/index.js +4 -0
- package/lib/module/impl/index.js.map +1 -0
- package/lib/module/impl/scanbotBarcodeSDKModule.js +16 -0
- package/lib/module/impl/scanbotBarcodeSDKModule.js.map +1 -0
- package/lib/module/index.js +5 -119
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/base/SdkConfiguration.js +100 -0
- package/lib/module/types/base/SdkConfiguration.js.map +1 -0
- package/lib/module/types/base/customTypes.js +2 -0
- package/lib/module/types/base/customTypes.js.map +1 -0
- package/lib/module/types/base/errors.js +119 -0
- package/lib/module/types/base/errors.js.map +1 -0
- package/lib/module/types/base/index.js +5 -0
- package/lib/module/types/base/index.js.map +1 -0
- package/lib/module/types/base/utils.js +52 -0
- package/lib/module/types/base/utils.js.map +1 -0
- package/lib/module/{barcode → types/core/barcode}/BarcodeConfigurationTypes.js +244 -76
- package/lib/module/types/core/barcode/BarcodeConfigurationTypes.js.map +1 -0
- package/lib/module/{barcode → types/core/barcode}/BarcodeDocumentTypes.js +60 -9
- package/lib/module/types/core/barcode/BarcodeDocumentTypes.js.map +1 -0
- package/lib/module/{barcode → types/core/barcode}/BarcodeScannerTypes.js +39 -28
- package/lib/module/types/core/barcode/BarcodeScannerTypes.js.map +1 -0
- package/lib/module/{barcode → types/core/barcode}/BarcodeTypes.js +30 -11
- package/lib/module/types/core/barcode/BarcodeTypes.js.map +1 -0
- package/lib/module/types/core/barcode/index.js.map +1 -0
- package/lib/module/types/core/camera/Camera.js +17 -0
- package/lib/module/types/core/camera/Camera.js.map +1 -0
- package/lib/module/types/core/camera/index.js +2 -0
- package/lib/module/types/core/camera/index.js.map +1 -0
- package/lib/module/types/core/common/CommonTypes.js +23 -0
- package/lib/module/types/core/common/CommonTypes.js.map +1 -0
- package/lib/module/{utils/json → types/core/common}/JsonSerializationTypes.js +2 -4
- package/lib/module/types/core/common/JsonSerializationTypes.js.map +1 -0
- package/lib/module/types/core/common/index.js +3 -0
- package/lib/module/types/core/common/index.js.map +1 -0
- package/lib/module/{documents → types/core/generic_document}/BarcodeDocumentModel.js +1129 -159
- package/lib/module/types/core/generic_document/BarcodeDocumentModel.js.map +1 -0
- package/lib/module/{documents → types/core/generic_document}/CommonFieldType.js +6 -3
- package/lib/module/types/core/generic_document/CommonFieldType.js.map +1 -0
- package/lib/module/{documents → types/core/generic_document}/GenericDocument.js +13 -18
- package/lib/module/types/core/generic_document/GenericDocument.js.map +1 -0
- package/lib/module/types/core/generic_document/index.js.map +1 -0
- package/lib/module/{utils → types/core}/geometry/Geometry.js +4 -9
- package/lib/module/types/core/geometry/Geometry.js.map +1 -0
- package/lib/module/types/core/geometry/index.js +2 -0
- package/lib/module/types/core/geometry/index.js.map +1 -0
- package/lib/module/{imageRef → types/core/image}/ImageRefTypes.js +156 -68
- package/lib/module/types/core/image/ImageRefTypes.js.map +1 -0
- package/lib/module/types/core/image/ImageTypes.js +35 -0
- package/lib/module/types/core/image/ImageTypes.js.map +1 -0
- package/lib/module/{imageRef → types/core/image}/image.js +54 -49
- package/lib/module/types/core/image/image.js.map +1 -0
- package/lib/module/{imageRef → types/core/image}/index.js +0 -1
- package/lib/module/types/core/image/index.js.map +1 -0
- package/lib/module/types/core/index.js +10 -0
- package/lib/module/types/core/index.js.map +1 -0
- package/lib/module/types/core/licensing/LicensingTypes.js +233 -0
- package/lib/module/types/core/licensing/LicensingTypes.js.map +1 -0
- package/lib/module/types/core/licensing/index.js +2 -0
- package/lib/module/types/core/licensing/index.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/ArTrackingOverlayConfiguration.js +8 -14
- package/lib/module/types/core/ui_v2/barcode/ArTrackingOverlayConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/BarcodeInfoMapping.js +4 -9
- package/lib/module/types/core/ui_v2/barcode/BarcodeInfoMapping.js.map +1 -0
- package/lib/module/types/core/ui_v2/barcode/BarcodeItemMapper.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerScreenConfiguration.js +17 -19
- package/lib/module/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerUiResult.js +3 -7
- package/lib/module/types/core/ui_v2/barcode/BarcodeScannerUiResult.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/BarcodeTextLocalization.js +1 -4
- package/lib/module/types/core/ui_v2/barcode/BarcodeTextLocalization.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/BarcodeUseCase.js +6 -6
- package/lib/module/types/core/ui_v2/barcode/BarcodeUseCase.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/FindAndPickScanningModeUseCase.js +6 -9
- package/lib/module/types/core/ui_v2/barcode/FindAndPickScanningModeUseCase.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/MultipleScanningModeUseCase.js +11 -14
- package/lib/module/types/core/ui_v2/barcode/MultipleScanningModeUseCase.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/SingleScanningModeUseCase.js +4 -6
- package/lib/module/types/core/ui_v2/barcode/SingleScanningModeUseCase.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/ActionBarConfiguration.js +2 -4
- package/lib/module/types/core/ui_v2/common/ActionBarConfiguration.js.map +1 -0
- package/lib/module/types/core/ui_v2/common/BottomBarConfiguration.js +17 -0
- package/lib/module/types/core/ui_v2/common/BottomBarConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/CameraConfiguration.js +11 -4
- package/lib/module/types/core/ui_v2/common/CameraConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/CameraPermission.js +2 -5
- package/lib/module/types/core/ui_v2/common/CameraPermission.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/Common.js +20 -36
- package/lib/module/types/core/ui_v2/common/Common.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/NavigationBarConfiguration.js +1 -0
- package/lib/module/types/core/ui_v2/common/NavigationBarConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/ScanCompletionOverlay.js +2 -4
- package/lib/module/types/core/ui_v2/common/ScanCompletionOverlay.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/ScanbotAlertDialog.js +2 -4
- package/lib/module/types/core/ui_v2/common/ScanbotAlertDialog.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/TopBarConfiguration.js +4 -4
- package/lib/module/types/core/ui_v2/common/TopBarConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/UserGuidanceConfiguration.js +3 -6
- package/lib/module/types/core/ui_v2/common/UserGuidanceConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/common/ViewFinderConfiguration.js +14 -19
- package/lib/module/types/core/ui_v2/common/ViewFinderConfiguration.js.map +1 -0
- package/lib/module/{ui_v2 → types/core/ui_v2}/index.js +2 -2
- package/lib/module/types/core/ui_v2/index.js.map +1 -0
- package/lib/module/{imageRef → types/core/utils}/ObjectPoolTypes.js +2 -5
- package/lib/module/types/core/utils/ObjectPoolTypes.js.map +1 -0
- package/lib/module/types/core/utils/index.js +3 -0
- package/lib/module/types/core/utils/index.js.map +1 -0
- package/lib/module/types/core/utils/utils.js +8 -0
- package/lib/module/types/core/utils/utils.js.map +1 -0
- package/lib/module/types/index.js +3 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/typescript/src/Barcode.d.ts +47 -0
- package/lib/typescript/src/Barcode.d.ts.map +1 -0
- package/lib/typescript/src/ImageProcessor.d.ts +12 -0
- package/lib/typescript/src/ImageProcessor.d.ts.map +1 -0
- package/lib/typescript/src/Sdk.d.ts +58 -0
- package/lib/typescript/src/Sdk.d.ts.map +1 -0
- package/lib/typescript/src/components/barcode-camera-view/ScanbotBarcodeCameraView.d.ts.map +1 -0
- package/lib/typescript/src/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts +17 -12
- package/lib/typescript/src/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts.map +1 -0
- package/lib/typescript/src/components/barcode-camera-view/ScanbotBarcodeCameraViewTypes.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +4 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/{component → components}/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/components/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/impl/BarcodeScannerImpl.d.ts +2 -0
- package/lib/typescript/src/impl/BarcodeScannerImpl.d.ts.map +1 -0
- package/lib/typescript/src/impl/ImageProcessorImpl.d.ts +2 -0
- package/lib/typescript/src/impl/ImageProcessorImpl.d.ts.map +1 -0
- package/lib/typescript/src/impl/SdkImpl.d.ts +2 -0
- package/lib/typescript/src/impl/SdkImpl.d.ts.map +1 -0
- package/lib/typescript/src/impl/index.d.ts +4 -0
- package/lib/typescript/src/impl/index.d.ts.map +1 -0
- package/lib/typescript/src/impl/scanbotBarcodeSDKModule.d.ts +2 -0
- package/lib/typescript/src/impl/scanbotBarcodeSDKModule.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -66
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/base/SdkConfiguration.d.ts +74 -0
- package/lib/typescript/src/types/base/SdkConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/types/base/customTypes.d.ts +15 -0
- package/lib/typescript/src/types/base/customTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/base/errors.d.ts +55 -0
- package/lib/typescript/src/types/base/errors.d.ts.map +1 -0
- package/lib/typescript/src/types/base/index.d.ts +5 -0
- package/lib/typescript/src/types/base/index.d.ts.map +1 -0
- package/lib/typescript/src/types/base/utils.d.ts +3 -0
- package/lib/typescript/src/types/base/utils.d.ts.map +1 -0
- package/lib/typescript/src/{barcode → types/core/barcode}/BarcodeConfigurationTypes.d.ts +203 -36
- package/lib/typescript/src/types/core/barcode/BarcodeConfigurationTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/core/barcode/BarcodeDocumentTypes.d.ts +117 -0
- package/lib/typescript/src/types/core/barcode/BarcodeDocumentTypes.d.ts.map +1 -0
- package/lib/typescript/src/{barcode → types/core/barcode}/BarcodeScannerTypes.d.ts +68 -21
- package/lib/typescript/src/types/core/barcode/BarcodeScannerTypes.d.ts.map +1 -0
- package/lib/typescript/src/{barcode → types/core/barcode}/BarcodeTypes.d.ts +390 -13
- package/lib/typescript/src/types/core/barcode/BarcodeTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/core/barcode/index.d.ts.map +1 -0
- package/lib/typescript/src/types/core/camera/Camera.d.ts +26 -0
- package/lib/typescript/src/types/core/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/src/types/core/camera/index.d.ts +2 -0
- package/lib/typescript/src/types/core/camera/index.d.ts.map +1 -0
- package/lib/typescript/src/types/core/common/CommonTypes.d.ts +36 -0
- package/lib/typescript/src/types/core/common/CommonTypes.d.ts.map +1 -0
- package/lib/typescript/src/{utils/json → types/core/common}/JsonSerializationTypes.d.ts +13 -4
- package/lib/typescript/src/types/core/common/JsonSerializationTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/core/common/index.d.ts +3 -0
- package/lib/typescript/src/types/core/common/index.d.ts.map +1 -0
- package/lib/typescript/src/types/core/generic_document/BarcodeDocumentModel.d.ts +2360 -0
- package/lib/typescript/src/types/core/generic_document/BarcodeDocumentModel.d.ts.map +1 -0
- package/lib/typescript/src/types/core/generic_document/CommonFieldType.d.ts +176 -0
- package/lib/typescript/src/types/core/generic_document/CommonFieldType.d.ts.map +1 -0
- package/lib/typescript/src/{documents → types/core/generic_document}/GenericDocument.d.ts +82 -14
- package/lib/typescript/src/types/core/generic_document/GenericDocument.d.ts.map +1 -0
- package/lib/typescript/src/types/core/generic_document/index.d.ts.map +1 -0
- package/lib/typescript/src/{utils → types/core}/geometry/Geometry.d.ts +6 -5
- package/lib/typescript/src/types/core/geometry/Geometry.d.ts.map +1 -0
- package/lib/typescript/src/types/core/geometry/index.d.ts +2 -0
- package/lib/typescript/src/types/core/geometry/index.d.ts.map +1 -0
- package/lib/typescript/src/{imageRef → types/core/image}/ImageRefTypes.d.ts +208 -40
- package/lib/typescript/src/types/core/image/ImageRefTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/core/image/ImageTypes.d.ts +63 -0
- package/lib/typescript/src/types/core/image/ImageTypes.d.ts.map +1 -0
- package/lib/typescript/src/{imageRef → types/core/image}/image.d.ts +6 -10
- package/lib/typescript/src/types/core/image/image.d.ts.map +1 -0
- package/lib/typescript/src/{imageRef → types/core/image}/index.d.ts +0 -1
- package/lib/typescript/src/types/core/image/index.d.ts.map +1 -0
- package/lib/typescript/src/types/core/index.d.ts +10 -0
- package/lib/typescript/src/types/core/index.d.ts.map +1 -0
- package/lib/typescript/src/types/core/licensing/LicensingTypes.d.ts +243 -0
- package/lib/typescript/src/types/core/licensing/LicensingTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/core/licensing/index.d.ts +2 -0
- package/lib/typescript/src/types/core/licensing/index.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/ArTrackingOverlayConfiguration.d.ts +27 -10
- package/lib/typescript/src/types/core/ui_v2/barcode/ArTrackingOverlayConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeInfoMapping.d.ts +6 -6
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeInfoMapping.d.ts.map +1 -0
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeItemMapper.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerScreenConfiguration.d.ts +14 -14
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerUiResult.d.ts +4 -4
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeScannerUiResult.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeTextLocalization.d.ts +2 -2
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeTextLocalization.d.ts.map +1 -0
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeUseCase.d.ts +8 -0
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeUseCase.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/FindAndPickScanningModeUseCase.d.ts +6 -6
- package/lib/typescript/src/types/core/ui_v2/barcode/FindAndPickScanningModeUseCase.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/MultipleScanningModeUseCase.d.ts +42 -15
- package/lib/typescript/src/types/core/ui_v2/barcode/MultipleScanningModeUseCase.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/SingleScanningModeUseCase.d.ts +5 -5
- package/lib/typescript/src/types/core/ui_v2/barcode/SingleScanningModeUseCase.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/ActionBarConfiguration.d.ts +3 -3
- package/lib/typescript/src/types/core/ui_v2/common/ActionBarConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/types/core/ui_v2/common/BottomBarConfiguration.d.ts +26 -0
- package/lib/typescript/src/types/core/ui_v2/common/BottomBarConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/CameraConfiguration.d.ts +25 -5
- package/lib/typescript/src/types/core/ui_v2/common/CameraConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/CameraPermission.d.ts +4 -4
- package/lib/typescript/src/types/core/ui_v2/common/CameraPermission.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/Common.d.ts +55 -24
- package/lib/typescript/src/types/core/ui_v2/common/Common.d.ts.map +1 -0
- package/lib/typescript/src/types/core/ui_v2/common/NavigationBarConfiguration.d.ts +26 -0
- package/lib/typescript/src/types/core/ui_v2/common/NavigationBarConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/ScanCompletionOverlay.d.ts +3 -3
- package/lib/typescript/src/types/core/ui_v2/common/ScanCompletionOverlay.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/ScanbotAlertDialog.d.ts +3 -3
- package/lib/typescript/src/types/core/ui_v2/common/ScanbotAlertDialog.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/TopBarConfiguration.d.ts +33 -7
- package/lib/typescript/src/types/core/ui_v2/common/TopBarConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/UserGuidanceConfiguration.d.ts +4 -4
- package/lib/typescript/src/types/core/ui_v2/common/UserGuidanceConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/common/ViewFinderConfiguration.d.ts +7 -7
- package/lib/typescript/src/types/core/ui_v2/common/ViewFinderConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/index.d.ts +2 -2
- package/lib/typescript/src/types/core/ui_v2/index.d.ts.map +1 -0
- package/lib/typescript/src/{imageRef → types/core/utils}/ObjectPoolTypes.d.ts +3 -3
- package/lib/typescript/src/types/core/utils/ObjectPoolTypes.d.ts.map +1 -0
- package/lib/typescript/src/types/core/utils/index.d.ts +3 -0
- package/lib/typescript/src/types/core/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/types/core/utils/utils.d.ts +28 -0
- package/lib/typescript/src/types/core/utils/utils.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +3 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/package.json +13 -13
- package/src/Barcode.ts +67 -0
- package/src/ImageProcessor.ts +18 -0
- package/src/Sdk.ts +53 -0
- package/src/{component → components}/barcode-camera-view/ScanbotBarcodeCameraView.tsx +13 -4
- package/src/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewProperties.ts +22 -14
- package/src/components/index.ts +3 -0
- package/src/{component → components}/spec/ScanbotBarcodeScannerViewNativeComponent.ts +3 -0
- package/src/impl/BarcodeScannerImpl.ts +115 -0
- package/src/impl/ImageProcessorImpl.ts +14 -0
- package/src/impl/SdkImpl.ts +28 -0
- package/src/impl/index.ts +3 -0
- package/src/impl/scanbotBarcodeSDKModule.ts +22 -0
- package/src/index.ts +5 -178
- package/src/types/base/SdkConfiguration.ts +120 -0
- package/src/types/base/customTypes.ts +14 -0
- package/src/types/base/errors.ts +158 -0
- package/src/types/base/index.ts +4 -0
- package/src/types/base/utils.ts +53 -0
- package/src/{barcode → types/core/barcode}/BarcodeConfigurationTypes.ts +294 -83
- package/src/types/core/barcode/BarcodeDocumentTypes.ts +218 -0
- package/src/{barcode → types/core/barcode}/BarcodeScannerTypes.ts +91 -44
- package/src/{barcode → types/core/barcode}/BarcodeTypes.ts +315 -19
- package/src/types/core/camera/Camera.ts +33 -0
- package/src/types/core/camera/index.ts +1 -0
- package/src/types/core/common/CommonTypes.ts +43 -0
- package/src/{utils/json → types/core/common}/JsonSerializationTypes.ts +16 -5
- package/src/types/core/common/index.ts +2 -0
- package/src/{documents → types/core/generic_document}/BarcodeDocumentModel.ts +1524 -172
- package/src/{documents → types/core/generic_document}/CommonFieldType.ts +96 -7
- package/src/{documents → types/core/generic_document}/GenericDocument.ts +77 -28
- package/src/{utils → types/core}/geometry/Geometry.ts +6 -8
- package/src/types/core/geometry/index.ts +1 -0
- package/src/{imageRef → types/core/image}/ImageRefTypes.ts +277 -83
- package/src/types/core/image/ImageTypes.ts +78 -0
- package/src/{imageRef → types/core/image}/image.ts +44 -76
- package/src/{imageRef → types/core/image}/index.ts +0 -1
- package/src/types/core/index.ts +9 -0
- package/src/types/core/licensing/LicensingTypes.ts +377 -0
- package/src/types/core/licensing/index.ts +1 -0
- package/src/{ui_v2 → types/core/ui_v2}/barcode/ArTrackingOverlayConfiguration.ts +28 -17
- package/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeInfoMapping.ts +6 -9
- package/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerScreenConfiguration.ts +18 -25
- package/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeScannerUiResult.ts +5 -7
- package/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeTextLocalization.ts +2 -3
- package/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeUseCase.ts +6 -5
- package/src/{ui_v2 → types/core/ui_v2}/barcode/FindAndPickScanningModeUseCase.ts +17 -19
- package/src/{ui_v2 → types/core/ui_v2}/barcode/MultipleScanningModeUseCase.ts +50 -25
- package/src/{ui_v2 → types/core/ui_v2}/barcode/SingleScanningModeUseCase.ts +9 -10
- package/src/{ui_v2 → types/core/ui_v2}/common/ActionBarConfiguration.ts +3 -4
- package/src/types/core/ui_v2/common/BottomBarConfiguration.ts +33 -0
- package/src/{ui_v2 → types/core/ui_v2}/common/CameraConfiguration.ts +33 -7
- package/src/{ui_v2 → types/core/ui_v2}/common/CameraPermission.ts +4 -5
- package/src/{ui_v2 → types/core/ui_v2}/common/Common.ts +62 -41
- package/src/{ui_v2 → types/core/ui_v2}/common/NavigationBarConfiguration.ts +19 -2
- package/src/{ui_v2 → types/core/ui_v2}/common/ScanCompletionOverlay.ts +3 -4
- package/src/{ui_v2 → types/core/ui_v2}/common/ScanbotAlertDialog.ts +3 -4
- package/src/{ui_v2 → types/core/ui_v2}/common/TopBarConfiguration.ts +37 -13
- package/src/{ui_v2 → types/core/ui_v2}/common/UserGuidanceConfiguration.ts +4 -6
- package/src/{ui_v2 → types/core/ui_v2}/common/ViewFinderConfiguration.ts +15 -17
- package/src/{ui_v2 → types/core/ui_v2}/index.ts +2 -4
- package/src/{imageRef → types/core/utils}/ObjectPoolTypes.ts +3 -4
- package/src/types/core/utils/index.ts +2 -0
- package/src/types/core/utils/utils.ts +45 -0
- package/src/types/index.ts +2 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/extensions/IntExtensions.kt +0 -7
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewControllerWrapper.h +0 -121
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewControllerWrapper.m +0 -307
- package/lib/commonjs/barcode/BarcodeConfigurationTypes.js.map +0 -1
- package/lib/commonjs/barcode/BarcodeDocumentTypes.js.map +0 -1
- package/lib/commonjs/barcode/BarcodeScannerTypes.js.map +0 -1
- package/lib/commonjs/barcode/BarcodeTypes.js.map +0 -1
- package/lib/commonjs/barcode/index.js.map +0 -1
- package/lib/commonjs/base/barcodeSDKConfigurations.js.map +0 -1
- package/lib/commonjs/base/barcodeSDKTypes.js +0 -2
- package/lib/commonjs/base/barcodeSDKTypes.js.map +0 -1
- package/lib/commonjs/base/index.js +0 -28
- package/lib/commonjs/base/index.js.map +0 -1
- package/lib/commonjs/component/barcode-camera-view/ScanbotBarcodeCameraView.js.map +0 -1
- package/lib/commonjs/component/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js.map +0 -1
- package/lib/commonjs/component/barcode-camera-view/ScanbotBarcodeCameraViewTypes.js.map +0 -1
- package/lib/commonjs/component/barcode-camera-view/index.js.map +0 -1
- package/lib/commonjs/component/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +0 -1
- package/lib/commonjs/documents/BarcodeDocumentModel.js.map +0 -1
- package/lib/commonjs/documents/CommonFieldType.js.map +0 -1
- package/lib/commonjs/documents/GenericDocument.js.map +0 -1
- package/lib/commonjs/documents/index.js.map +0 -1
- package/lib/commonjs/imageRef/ImageRefTypes.js.map +0 -1
- package/lib/commonjs/imageRef/ImageTypes.js +0 -24
- package/lib/commonjs/imageRef/ImageTypes.js.map +0 -1
- package/lib/commonjs/imageRef/ObjectPoolTypes.js.map +0 -1
- package/lib/commonjs/imageRef/image.js.map +0 -1
- package/lib/commonjs/imageRef/index.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/ArTrackingOverlayConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeInfoMapping.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeItemMapper.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeScannerConfiguration.js +0 -179
- package/lib/commonjs/ui_v2/barcode/BarcodeScannerConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeScannerScreenConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeScannerUiResult.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeTextLocalization.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeUseCase.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/FindAndPickScanningModeUseCase.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/MultipleScanningModeUseCase.js.map +0 -1
- package/lib/commonjs/ui_v2/barcode/SingleScanningModeUseCase.js.map +0 -1
- package/lib/commonjs/ui_v2/common/ActionBarConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/common/CameraConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/common/CameraPermission.js.map +0 -1
- package/lib/commonjs/ui_v2/common/Common.js.map +0 -1
- package/lib/commonjs/ui_v2/common/NavigationBarConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/common/ScanCompletionOverlay.js.map +0 -1
- package/lib/commonjs/ui_v2/common/ScanbotAlertDialog.js.map +0 -1
- package/lib/commonjs/ui_v2/common/TopBarConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/common/UserGuidanceConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/common/ViewFinderConfiguration.js.map +0 -1
- package/lib/commonjs/ui_v2/index.js.map +0 -1
- package/lib/commonjs/utils/geometry/Geometry.js.map +0 -1
- package/lib/commonjs/utils/index.js +0 -39
- package/lib/commonjs/utils/index.js.map +0 -1
- package/lib/commonjs/utils/json/JsonSerializationTypes.js.map +0 -1
- package/lib/commonjs/utils/utils.js +0 -31
- package/lib/commonjs/utils/utils.js.map +0 -1
- package/lib/module/barcode/BarcodeConfigurationTypes.js.map +0 -1
- package/lib/module/barcode/BarcodeDocumentTypes.js.map +0 -1
- package/lib/module/barcode/BarcodeScannerTypes.js.map +0 -1
- package/lib/module/barcode/BarcodeTypes.js.map +0 -1
- package/lib/module/barcode/index.js.map +0 -1
- package/lib/module/base/barcodeSDKConfigurations.js +0 -2
- package/lib/module/base/barcodeSDKConfigurations.js.map +0 -1
- package/lib/module/base/barcodeSDKTypes.js +0 -2
- package/lib/module/base/barcodeSDKTypes.js.map +0 -1
- package/lib/module/base/index.js +0 -3
- package/lib/module/base/index.js.map +0 -1
- package/lib/module/component/barcode-camera-view/ScanbotBarcodeCameraView.js.map +0 -1
- package/lib/module/component/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js.map +0 -1
- package/lib/module/component/barcode-camera-view/ScanbotBarcodeCameraViewTypes.js.map +0 -1
- package/lib/module/component/barcode-camera-view/index.js +0 -4
- package/lib/module/component/barcode-camera-view/index.js.map +0 -1
- package/lib/module/component/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +0 -1
- package/lib/module/documents/BarcodeDocumentModel.js.map +0 -1
- package/lib/module/documents/CommonFieldType.js.map +0 -1
- package/lib/module/documents/GenericDocument.js.map +0 -1
- package/lib/module/documents/index.js.map +0 -1
- package/lib/module/imageRef/ImageRefTypes.js.map +0 -1
- package/lib/module/imageRef/ImageTypes.js +0 -18
- package/lib/module/imageRef/ImageTypes.js.map +0 -1
- package/lib/module/imageRef/ObjectPoolTypes.js.map +0 -1
- package/lib/module/imageRef/image.js.map +0 -1
- package/lib/module/imageRef/index.js.map +0 -1
- package/lib/module/ui_v2/barcode/ArTrackingOverlayConfiguration.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeInfoMapping.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeItemMapper.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeScannerConfiguration.js +0 -173
- package/lib/module/ui_v2/barcode/BarcodeScannerConfiguration.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeScannerScreenConfiguration.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeScannerUiResult.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeTextLocalization.js.map +0 -1
- package/lib/module/ui_v2/barcode/BarcodeUseCase.js.map +0 -1
- package/lib/module/ui_v2/barcode/FindAndPickScanningModeUseCase.js.map +0 -1
- package/lib/module/ui_v2/barcode/MultipleScanningModeUseCase.js.map +0 -1
- package/lib/module/ui_v2/barcode/SingleScanningModeUseCase.js.map +0 -1
- package/lib/module/ui_v2/common/ActionBarConfiguration.js.map +0 -1
- package/lib/module/ui_v2/common/CameraConfiguration.js.map +0 -1
- package/lib/module/ui_v2/common/CameraPermission.js.map +0 -1
- package/lib/module/ui_v2/common/Common.js.map +0 -1
- package/lib/module/ui_v2/common/NavigationBarConfiguration.js.map +0 -1
- package/lib/module/ui_v2/common/ScanCompletionOverlay.js.map +0 -1
- package/lib/module/ui_v2/common/ScanbotAlertDialog.js.map +0 -1
- package/lib/module/ui_v2/common/TopBarConfiguration.js.map +0 -1
- package/lib/module/ui_v2/common/UserGuidanceConfiguration.js.map +0 -1
- package/lib/module/ui_v2/common/ViewFinderConfiguration.js.map +0 -1
- package/lib/module/ui_v2/index.js.map +0 -1
- package/lib/module/utils/geometry/Geometry.js.map +0 -1
- package/lib/module/utils/index.js +0 -4
- package/lib/module/utils/index.js.map +0 -1
- package/lib/module/utils/json/JsonSerializationTypes.js.map +0 -1
- package/lib/module/utils/utils.js +0 -22
- package/lib/module/utils/utils.js.map +0 -1
- package/lib/typescript/src/barcode/BarcodeConfigurationTypes.d.ts.map +0 -1
- package/lib/typescript/src/barcode/BarcodeDocumentTypes.d.ts +0 -50
- package/lib/typescript/src/barcode/BarcodeDocumentTypes.d.ts.map +0 -1
- package/lib/typescript/src/barcode/BarcodeScannerTypes.d.ts.map +0 -1
- package/lib/typescript/src/barcode/BarcodeTypes.d.ts.map +0 -1
- package/lib/typescript/src/barcode/index.d.ts.map +0 -1
- package/lib/typescript/src/base/barcodeSDKConfigurations.d.ts +0 -60
- package/lib/typescript/src/base/barcodeSDKConfigurations.d.ts.map +0 -1
- package/lib/typescript/src/base/barcodeSDKTypes.d.ts +0 -46
- package/lib/typescript/src/base/barcodeSDKTypes.d.ts.map +0 -1
- package/lib/typescript/src/base/index.d.ts +0 -3
- package/lib/typescript/src/base/index.d.ts.map +0 -1
- package/lib/typescript/src/component/barcode-camera-view/ScanbotBarcodeCameraView.d.ts.map +0 -1
- package/lib/typescript/src/component/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts.map +0 -1
- package/lib/typescript/src/component/barcode-camera-view/ScanbotBarcodeCameraViewTypes.d.ts.map +0 -1
- package/lib/typescript/src/component/barcode-camera-view/index.d.ts +0 -4
- package/lib/typescript/src/component/barcode-camera-view/index.d.ts.map +0 -1
- package/lib/typescript/src/component/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/documents/BarcodeDocumentModel.d.ts +0 -1458
- package/lib/typescript/src/documents/BarcodeDocumentModel.d.ts.map +0 -1
- package/lib/typescript/src/documents/CommonFieldType.d.ts +0 -61
- package/lib/typescript/src/documents/CommonFieldType.d.ts.map +0 -1
- package/lib/typescript/src/documents/GenericDocument.d.ts.map +0 -1
- package/lib/typescript/src/documents/index.d.ts.map +0 -1
- package/lib/typescript/src/imageRef/ImageRefTypes.d.ts.map +0 -1
- package/lib/typescript/src/imageRef/ImageTypes.d.ts +0 -15
- package/lib/typescript/src/imageRef/ImageTypes.d.ts.map +0 -1
- package/lib/typescript/src/imageRef/ObjectPoolTypes.d.ts.map +0 -1
- package/lib/typescript/src/imageRef/image.d.ts.map +0 -1
- package/lib/typescript/src/imageRef/index.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/ArTrackingOverlayConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeInfoMapping.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeItemMapper.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeScannerConfiguration.d.ts +0 -114
- package/lib/typescript/src/ui_v2/barcode/BarcodeScannerConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeScannerScreenConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeScannerUiResult.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeTextLocalization.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeUseCase.d.ts +0 -8
- package/lib/typescript/src/ui_v2/barcode/BarcodeUseCase.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/FindAndPickScanningModeUseCase.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/MultipleScanningModeUseCase.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/barcode/SingleScanningModeUseCase.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/ActionBarConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/CameraConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/CameraPermission.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/Common.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/NavigationBarConfiguration.d.ts +0 -13
- package/lib/typescript/src/ui_v2/common/NavigationBarConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/ScanCompletionOverlay.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/ScanbotAlertDialog.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/TopBarConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/UserGuidanceConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/common/ViewFinderConfiguration.d.ts.map +0 -1
- package/lib/typescript/src/ui_v2/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/geometry/Geometry.d.ts.map +0 -1
- package/lib/typescript/src/utils/index.d.ts +0 -4
- package/lib/typescript/src/utils/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/json/JsonSerializationTypes.d.ts.map +0 -1
- package/lib/typescript/src/utils/utils.d.ts +0 -17
- package/lib/typescript/src/utils/utils.d.ts.map +0 -1
- package/src/barcode/BarcodeDocumentTypes.ts +0 -120
- package/src/base/barcodeSDKConfigurations.ts +0 -70
- package/src/base/barcodeSDKTypes.ts +0 -44
- package/src/base/index.ts +0 -2
- package/src/component/barcode-camera-view/index.ts +0 -3
- package/src/imageRef/ImageTypes.ts +0 -23
- package/src/ui_v2/barcode/BarcodeScannerConfiguration.ts +0 -207
- package/src/utils/index.ts +0 -3
- package/src/utils/utils.ts +0 -42
- /package/lib/commonjs/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js +0 -0
- /package/lib/commonjs/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewTypes.js +0 -0
- /package/lib/commonjs/{component → components}/spec/ScanbotBarcodeScannerViewNativeComponent.js +0 -0
- /package/lib/commonjs/{barcode → types/core/barcode}/index.js +0 -0
- /package/lib/commonjs/{documents → types/core/generic_document}/index.js +0 -0
- /package/lib/commonjs/{ui_v2 → types/core/ui_v2}/barcode/BarcodeItemMapper.js +0 -0
- /package/lib/module/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js +0 -0
- /package/lib/module/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewTypes.js +0 -0
- /package/lib/module/{component → components}/spec/ScanbotBarcodeScannerViewNativeComponent.js +0 -0
- /package/lib/module/{barcode → types/core/barcode}/index.js +0 -0
- /package/lib/module/{documents → types/core/generic_document}/index.js +0 -0
- /package/lib/module/{ui_v2 → types/core/ui_v2}/barcode/BarcodeItemMapper.js +0 -0
- /package/lib/typescript/src/{component → components}/barcode-camera-view/ScanbotBarcodeCameraView.d.ts +0 -0
- /package/lib/typescript/src/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewTypes.d.ts +0 -0
- /package/lib/typescript/src/{barcode → types/core/barcode}/index.d.ts +0 -0
- /package/lib/typescript/src/{documents → types/core/generic_document}/index.d.ts +0 -0
- /package/lib/typescript/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeItemMapper.d.ts +0 -0
- /package/src/{component → components}/barcode-camera-view/ScanbotBarcodeCameraViewTypes.ts +0 -0
- /package/src/{barcode → types/core/barcode}/index.ts +0 -0
- /package/src/{documents → types/core/generic_document}/index.ts +0 -0
- /package/src/{ui_v2 → types/core/ui_v2}/barcode/BarcodeItemMapper.ts +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import ScanbotBarcodeScannerSDK
|
|
3
|
+
import ScanbotBarcodeSDKWrapper
|
|
4
|
+
|
|
5
|
+
@objc public protocol RNScanbotBarcodeScannerEventDelegate {
|
|
6
|
+
|
|
7
|
+
@objc func onScannedBarcode(_ barcode: String)
|
|
8
|
+
|
|
9
|
+
@objc func onSelectedBarcode(_ barcode: String)
|
|
10
|
+
|
|
11
|
+
@objc func onError(_ errorMessage: String, errorCode: Int)
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
extension RNScanbotBarcodeScannerEventDelegate {
|
|
16
|
+
|
|
17
|
+
func onError(error: SBError){
|
|
18
|
+
onError(error.localizedDescription, errorCode: error.errorCode)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
struct RNScanbotBarcodeScannerDefaults {
|
|
23
|
+
let hardwareButtonsEnabled = true
|
|
24
|
+
// Finder Config
|
|
25
|
+
let finderStrokeWidth = CGFloat(2)
|
|
26
|
+
let finderStrokeColor = SBComponentUtils.fromRgbAHex("#ffffffff")
|
|
27
|
+
let finderOverlayColor = SBComponentUtils.fromRgbAHex("#000000A9")
|
|
28
|
+
let finderInset = UIEdgeInsets(top: 10,left: 10,bottom: 10,right: 10)
|
|
29
|
+
let finderAspectRatio = SBSDKAspectRatio(width: 4, height: 3)
|
|
30
|
+
// Camera Config
|
|
31
|
+
let cameraZoomRange = SBSDKZoomRange(minZoom: 1, maxZoom: 12)
|
|
32
|
+
let cameraZoomFactor = 0.0
|
|
33
|
+
// Overlay Config
|
|
34
|
+
let overlayPolygonColor = SBComponentUtils.fromRgbAHex("#00CFA633")
|
|
35
|
+
let overlayStrokeColor = SBComponentUtils.fromRgbAHex("#00CFA6CC")
|
|
36
|
+
let overlayTextColor = SBComponentUtils.fromRgbAHex("#000000")
|
|
37
|
+
let overlayTextContainerColor = SBComponentUtils.fromRgbAHex("#00CFA6CC")
|
|
38
|
+
let overlayTextFormat: SBSDKBarcodeOverlayFormat = .codeAndType
|
|
39
|
+
// Barcode Config
|
|
40
|
+
let configFormatConfigurations: [SBSDKBarcodeFormatConfigurationBase] = []
|
|
41
|
+
let configExtractedDocumentFormats: [SBSDKBarcodeDocumentFormat] = SBSDKBarcodeDocumentFormats.all
|
|
42
|
+
let configEngineMode = SBSDKBarcodeScannerEngineMode.nextGen
|
|
43
|
+
let configAccumulationConfigTime: Int = 100
|
|
44
|
+
let configAccumulationConfigRemoveUnconnectedResults: Bool = false
|
|
45
|
+
let configAccumulationConfigMethod: NSString = "interpolateByCamera"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
struct BarcodeItemOverlayViewConfig: Decodable {
|
|
49
|
+
let text: String?
|
|
50
|
+
let textColor: String?
|
|
51
|
+
let textContainerColor: String?
|
|
52
|
+
let polygonColor: String?
|
|
53
|
+
let strokeColor: String?
|
|
54
|
+
let refreshRate: Double?
|
|
55
|
+
var lastBind: Double?
|
|
56
|
+
|
|
57
|
+
init(
|
|
58
|
+
text: String?,
|
|
59
|
+
textColor: String? = nil,
|
|
60
|
+
textContainerColor: String? = nil,
|
|
61
|
+
polygonColor: String? = nil,
|
|
62
|
+
strokeColor: String? = nil,
|
|
63
|
+
refreshRate: Double? = nil,
|
|
64
|
+
lastBind: Double? = nil
|
|
65
|
+
) {
|
|
66
|
+
self.text = text
|
|
67
|
+
self.textColor = textColor
|
|
68
|
+
self.textContainerColor = textContainerColor
|
|
69
|
+
self.polygonColor = polygonColor
|
|
70
|
+
self.strokeColor = strokeColor
|
|
71
|
+
self.refreshRate = refreshRate
|
|
72
|
+
self.lastBind = lastBind
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import ScanbotBarcodeScannerSDK
|
|
3
|
+
import ScanbotBarcodeSDKWrapper
|
|
4
|
+
|
|
5
|
+
@objc public class RNScanbotBarcodeScannerViewController: UIViewController {
|
|
6
|
+
|
|
7
|
+
private let scannerViewController = SBSDKBarcodeScannerViewController()
|
|
8
|
+
private var defaults = RNScanbotBarcodeScannerDefaults()
|
|
9
|
+
private var barcodeItemOverlayViewBinders: [String: BarcodeItemOverlayViewConfig]? = nil
|
|
10
|
+
private var barcodeItemOverlayLoadingText: String? = nil
|
|
11
|
+
|
|
12
|
+
@objc public var delegate: RNScanbotBarcodeScannerEventDelegate? = nil
|
|
13
|
+
|
|
14
|
+
public override func viewDidLoad() {
|
|
15
|
+
super.viewDidLoad()
|
|
16
|
+
|
|
17
|
+
scannerViewController.delegate = self
|
|
18
|
+
scannerViewController.trackingOverlayController.delegate = self
|
|
19
|
+
self.sbsdk_attach(scannerViewController, in: self.view)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@objc public func setDefaults(){
|
|
23
|
+
hardwareButtonsEnabled(defaults.hardwareButtonsEnabled)
|
|
24
|
+
|
|
25
|
+
//Finder Configs
|
|
26
|
+
finderOverlayColor(defaults.finderOverlayColor)
|
|
27
|
+
finderStrokeColor(defaults.finderStrokeColor)
|
|
28
|
+
finderRequiredAspectRatios()
|
|
29
|
+
finderInsets()
|
|
30
|
+
|
|
31
|
+
//Overlay Configs
|
|
32
|
+
overlayPolygonColor(defaults.overlayPolygonColor)
|
|
33
|
+
overlayStrokeColor(defaults.overlayStrokeColor)
|
|
34
|
+
overlayTextColor(defaults.overlayTextColor)
|
|
35
|
+
overlayTextContainerColor(defaults.overlayTextContainerColor)
|
|
36
|
+
overlayTextFormat()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@objc public func prepareForRecycle(){
|
|
40
|
+
scannerViewController.delegate = nil
|
|
41
|
+
scannerViewController.trackingOverlayController.delegate = nil
|
|
42
|
+
barcodeItemOverlayViewBinders = nil
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// MARK: General settings
|
|
46
|
+
|
|
47
|
+
@objc public func flashEnabled(_ enabled: Bool) {
|
|
48
|
+
scannerViewController.isFlashLightEnabled = enabled
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@objc public func hardwareButtonsEnabled(_ enabled: Bool) {
|
|
52
|
+
scannerViewController.hardwareButtonsEnabled = enabled
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@objc public func scanningEnabled(_ enabled: Bool) {
|
|
56
|
+
scannerViewController.isScanningEnabled = enabled
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// MARK: Finder Configuration
|
|
60
|
+
|
|
61
|
+
@objc public func finderEnabled(_ enabled: Bool) {
|
|
62
|
+
scannerViewController.viewFinderConfiguration.isViewFinderEnabled = enabled
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@objc public func finderStrokeWidth(_ width: NSNumber?) {
|
|
66
|
+
scannerViewController.viewFinderConfiguration.lineWidth = width?.doubleValue ?? defaults.finderStrokeWidth
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@objc public func finderStrokeColor(_ value: UIColor?) {
|
|
70
|
+
scannerViewController.viewFinderConfiguration.lineColor = value ?? defaults.finderStrokeColor
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@objc public func finderOverlayColor(_ value: UIColor?) {
|
|
74
|
+
scannerViewController.viewFinderConfiguration.backgroundColor = value ?? defaults.finderOverlayColor
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@objc public func finderInsets(_ value: NSDictionary? = nil){
|
|
78
|
+
if let dict = value {
|
|
79
|
+
let left = (dict["left"] as? Double) ?? defaults.finderInset.left
|
|
80
|
+
let top = (dict["top"] as? Double) ?? defaults.finderInset.top
|
|
81
|
+
let right = (dict["right"] as? Double) ?? defaults.finderInset.right
|
|
82
|
+
let bottom = (dict["bottom"] as? Double) ?? defaults.finderInset.bottom
|
|
83
|
+
|
|
84
|
+
finderInsets(left: left, top: top, right: right, bottom: bottom)
|
|
85
|
+
} else {
|
|
86
|
+
scannerViewController.viewFinderConfiguration.minimumInset = defaults.finderInset
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@objc public func finderInsets(left: Double, top: Double, right: Double, bottom: Double) {
|
|
91
|
+
scannerViewController.viewFinderConfiguration.minimumInset = UIEdgeInsets(
|
|
92
|
+
top: top,left: left,bottom: bottom, right: right
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@objc public func finderRequiredAspectRatios(_ value: NSDictionary? = nil) {
|
|
97
|
+
if let dict = value {
|
|
98
|
+
let width = (dict["width"] as? Double) ?? defaults.finderAspectRatio.width
|
|
99
|
+
let height = (dict["height"] as? Double) ?? defaults.finderAspectRatio.height
|
|
100
|
+
|
|
101
|
+
finderRequiredAspectRatios(width: width, height: height)
|
|
102
|
+
} else {
|
|
103
|
+
scannerViewController.viewFinderConfiguration.aspectRatio = defaults.finderAspectRatio
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@objc public func finderRequiredAspectRatios(width: Double, height: Double) {
|
|
108
|
+
scannerViewController.viewFinderConfiguration.aspectRatio = SBSDKAspectRatio(
|
|
109
|
+
width: width, height: height
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// MARK: Camera Configuration
|
|
114
|
+
|
|
115
|
+
@objc public func cameraZoomFactor(_ zoomFactor: NSNumber?) {
|
|
116
|
+
scannerViewController.zoomConfiguration.initialZoomFactor = zoomFactor?.doubleValue ?? defaults.cameraZoomFactor
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@objc public func cameraZoomRange(_ value: NSDictionary?) {
|
|
120
|
+
if let dict = value {
|
|
121
|
+
let minZoom = (dict["minZoom"] as? Double) ?? defaults.cameraZoomRange.minZoom
|
|
122
|
+
let maxZoom = (dict["maxZoom"] as? Double) ?? defaults.cameraZoomRange.maxZoom
|
|
123
|
+
|
|
124
|
+
cameraZoomRange(minZoom: minZoom, maxZoom: maxZoom)
|
|
125
|
+
} else {
|
|
126
|
+
scannerViewController.zoomConfiguration.zoomRange = defaults.cameraZoomRange
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@objc public func cameraZoomRange(minZoom: Double, maxZoom: Double) {
|
|
131
|
+
scannerViewController.zoomConfiguration.zoomRange = SBSDKZoomRange(
|
|
132
|
+
minZoom: minZoom, maxZoom: maxZoom
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@objc public func cameraDevice(_ device: NSString?) {
|
|
137
|
+
if let device = device {
|
|
138
|
+
let cameraDevice = SBComponentUtils.cameraDeviceToNative(device as String)
|
|
139
|
+
scannerViewController.cameraDevice = cameraDevice
|
|
140
|
+
} else {
|
|
141
|
+
scannerViewController.cameraDevice = .defaultBackFacingCamera
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@objc public func minFocusDistanceLock(_ enabled: Bool) {
|
|
146
|
+
if(enabled){
|
|
147
|
+
scannerViewController.beginFocusLockAt(lensPosition: 0.0)
|
|
148
|
+
} else {
|
|
149
|
+
scannerViewController.endFocusLock()
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// MARK: Overlay Configuration
|
|
154
|
+
|
|
155
|
+
@objc public func overlayEnabled(_ enabled: Bool) {
|
|
156
|
+
scannerViewController.isTrackingOverlayEnabled = enabled
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@objc public func overlayPolygonColor(_ value: UIColor?) {
|
|
160
|
+
scannerViewController.trackingOverlayController.configuration.polygonStyle.polygonBackgroundColor = value ?? defaults.overlayPolygonColor
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@objc public func overlayStrokeColor(_ value: UIColor?) {
|
|
164
|
+
scannerViewController.trackingOverlayController.configuration.polygonStyle.polygonColor = value ?? defaults.overlayStrokeColor
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@objc public func overlayTextColor(_ value: UIColor?) {
|
|
168
|
+
scannerViewController.trackingOverlayController.configuration.textStyle.textColor = value ?? defaults.overlayTextColor
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@objc public func overlayTextContainerColor(_ value: UIColor?) {
|
|
172
|
+
scannerViewController.trackingOverlayController.configuration.textStyle.textBackgroundColor = value ?? defaults.overlayTextContainerColor
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@objc public func overlayTextFormat(_ format: NSString? = nil) {
|
|
176
|
+
if let format = format {
|
|
177
|
+
scannerViewController.trackingOverlayController.configuration.textStyle.trackingOverlayTextFormat = SBComponentUtils.barcodeOverlayTextFormatToNative(format as String)
|
|
178
|
+
} else {
|
|
179
|
+
scannerViewController.trackingOverlayController.configuration.textStyle.trackingOverlayTextFormat = defaults.overlayTextFormat
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@objc public func overlayLoadingTextValue(_ value: NSString?) {
|
|
184
|
+
self.barcodeItemOverlayLoadingText = value as String?
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// MARK: Barcode Configuration
|
|
188
|
+
|
|
189
|
+
@objc public func configExtractedDocumentFormats(_ formats: NSArray?) {
|
|
190
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
191
|
+
|
|
192
|
+
if let formats = formats as? [String] {
|
|
193
|
+
configuration.extractedDocumentFormats = SBComponentUtils.barcodeDocumentFormatToNative(formats)
|
|
194
|
+
} else {
|
|
195
|
+
configuration.extractedDocumentFormats = defaults.configExtractedDocumentFormats
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
scannerViewController.setConfiguration(configuration)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@objc public func configFormatConfigurations(_ formats: [NSDictionary]) {
|
|
202
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
203
|
+
configuration.barcodeFormatConfigurations = formats.compactMap {
|
|
204
|
+
if let configDict = $0 as? [String: Any],
|
|
205
|
+
let config = try? SBConfiguration(configDict).convert(to: SBSDKBarcodeFormatConfigurationBase.self){
|
|
206
|
+
return config
|
|
207
|
+
}
|
|
208
|
+
delegate?.onError("Unable to decode format configurations", errorCode: SBSDKErrorType.invalidData.rawValue)
|
|
209
|
+
return nil
|
|
210
|
+
}
|
|
211
|
+
scannerViewController.setConfiguration(configuration)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@objc public func configOnlyAcceptDocuments(_ onlyAcceptDocuments: Bool) {
|
|
215
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
216
|
+
configuration.onlyAcceptDocuments = onlyAcceptDocuments
|
|
217
|
+
scannerViewController.setConfiguration(configuration)
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@objc public func configReturnBarcodeImage(_ returnBarcodeImage: Bool) {
|
|
221
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
222
|
+
configuration.returnBarcodeImage = returnBarcodeImage
|
|
223
|
+
scannerViewController.setConfiguration(configuration)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@objc public func configEngineMode(_ engineMode: NSString?) {
|
|
227
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
228
|
+
|
|
229
|
+
if let engineMode = engineMode {
|
|
230
|
+
configuration.engineMode = SBComponentUtils.barcodeEngineModeToNative(engineMode as String)
|
|
231
|
+
} else {
|
|
232
|
+
configuration.engineMode = defaults.configEngineMode
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
scannerViewController.setConfiguration(configuration)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@objc public func configAccumulationConfiguration(_ config: NSDictionary?) {
|
|
239
|
+
if let dict = config {
|
|
240
|
+
let accumulationTime = (dict["accumulationTime"] as? Int) ?? defaults.configAccumulationConfigTime
|
|
241
|
+
let removeUnconnectedResults = dict["removeUnconnectedResults"] as? Bool ?? defaults.configAccumulationConfigRemoveUnconnectedResults
|
|
242
|
+
let method = dict["method"] as? NSString ?? defaults.configAccumulationConfigMethod
|
|
243
|
+
|
|
244
|
+
configAccumulationConfiguration(
|
|
245
|
+
accumulationTime: accumulationTime,
|
|
246
|
+
removeUnconnectedResults: removeUnconnectedResults,
|
|
247
|
+
method: method
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
} else {
|
|
251
|
+
configAccumulationConfiguration(
|
|
252
|
+
accumulationTime: defaults.configAccumulationConfigTime,
|
|
253
|
+
removeUnconnectedResults: defaults.configAccumulationConfigRemoveUnconnectedResults,
|
|
254
|
+
method: defaults.configAccumulationConfigMethod
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@objc public func configAccumulationConfiguration(accumulationTime: Int, removeUnconnectedResults: Bool, method: NSString) {
|
|
260
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
261
|
+
configuration.accumulationConfig.accumulationTime = accumulationTime
|
|
262
|
+
configuration.accumulationConfig.removeUnconnectedResults = removeUnconnectedResults
|
|
263
|
+
if let method = SBComponentUtils.decodeFromString(type: SBSDKBarcodeAccumulationMethod.self, value: method as String) {
|
|
264
|
+
configuration.accumulationConfig.method = method
|
|
265
|
+
} else {
|
|
266
|
+
configuration.accumulationConfig.method = .interpolateByCamera
|
|
267
|
+
}
|
|
268
|
+
scannerViewController.setConfiguration(configuration)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@objc public func configOptimizedForOverlays(_ optimizedForOverlays: Bool) {
|
|
272
|
+
let configuration = scannerViewController.copyCurrentConfiguration()
|
|
273
|
+
configuration.optimizedForOverlays = optimizedForOverlays
|
|
274
|
+
scannerViewController.setConfiguration(configuration)
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// MARK: Commands
|
|
278
|
+
|
|
279
|
+
@objc public func freezeCamera() {
|
|
280
|
+
scannerViewController.freezeCamera()
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@objc public func unfreezeCamera() {
|
|
284
|
+
scannerViewController.unfreezeCamera()
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// MARK: Barcode Item Overlay
|
|
288
|
+
|
|
289
|
+
@objc public func bindBarcodeItemOverlayView(barcodeID: NSString, bindingConfigJson: NSString) {
|
|
290
|
+
if self.barcodeItemOverlayViewBinders?[barcodeID as String] != nil {
|
|
291
|
+
|
|
292
|
+
if let data = (bindingConfigJson as String).data(using: .utf8),
|
|
293
|
+
var updatedBoundItem = try? JSONDecoder().decode(BarcodeItemOverlayViewConfig.self, from: data){
|
|
294
|
+
updatedBoundItem.lastBind = Date().timeIntervalSince1970 * 1000.0
|
|
295
|
+
|
|
296
|
+
self.barcodeItemOverlayViewBinders?[barcodeID as String] = updatedBoundItem
|
|
297
|
+
} else {
|
|
298
|
+
delegate?.onError(error: SBError.argumentError(message: "Unable to decode binder configuration"))
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@objc public func overlayViewBinder(_ enabled: Bool){
|
|
304
|
+
if(enabled){
|
|
305
|
+
barcodeItemOverlayViewBinders = [:]
|
|
306
|
+
} else {
|
|
307
|
+
barcodeItemOverlayViewBinders = nil
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
private func addBarcodeItemOverlayViewInitialVinder(_ barcodes: [SBSDKBarcodeItem]){
|
|
312
|
+
for barcode in barcodes {
|
|
313
|
+
if barcodeItemOverlayViewBinders?[barcode.uuid] == nil {
|
|
314
|
+
barcodeItemOverlayViewBinders?[barcode.uuid] = BarcodeItemOverlayViewConfig(text: barcodeItemOverlayLoadingText)
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
private func refreshBarcodeItemOverlayViewConfig(_ config: BarcodeItemOverlayViewConfig) -> Bool {
|
|
320
|
+
if let refreshRate = config.refreshRate, refreshRate > 0,
|
|
321
|
+
let lastBind = config.lastBind, lastBind > 0 {
|
|
322
|
+
let currentTime = (Date().timeIntervalSince1970 * 1000.0)
|
|
323
|
+
return ( currentTime - lastBind ) >= refreshRate
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return false
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// MARK: Utils
|
|
330
|
+
|
|
331
|
+
private func barcodeResultToString(_ result: [SBSDKBarcodeItem]) -> String? {
|
|
332
|
+
|
|
333
|
+
if let barcodes = SBComponentUtils.nativeResultsToDictionary(result),
|
|
334
|
+
let data = try? JSONSerialization.data(withJSONObject: barcodes),
|
|
335
|
+
let jsonString = String(data: data, encoding: .utf8) {
|
|
336
|
+
return jsonString
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return nil
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@objc public func attachController(parentViewController: UIViewController?, inView view: UIView){
|
|
343
|
+
parentViewController?.sbsdk_attach(self, in: view)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@objc public func detachController(){
|
|
347
|
+
self.sbsdk_detach(self)
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
//MARK: Delegates
|
|
352
|
+
|
|
353
|
+
extension RNScanbotBarcodeScannerViewController: SBSDKBarcodeScannerViewControllerDelegate {
|
|
354
|
+
|
|
355
|
+
public func barcodeScannerController(_ controller: SBSDKBarcodeScannerViewController,
|
|
356
|
+
didScanBarcodes codes: [SBSDKBarcodeItem]) {
|
|
357
|
+
|
|
358
|
+
if let jsonString = barcodeResultToString(codes) {
|
|
359
|
+
delegate?.onScannedBarcode(jsonString)
|
|
360
|
+
addBarcodeItemOverlayViewInitialVinder(codes)
|
|
361
|
+
} else {
|
|
362
|
+
delegate?.onError(error: SBError.resultError(reason: "Unable to process barcode data"))
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
public func barcodeScannerController(_ controller: SBSDKBarcodeScannerViewController, didFailScanning error: any Error) {
|
|
367
|
+
delegate?.onError(error: SBError(error: error))
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
extension RNScanbotBarcodeScannerViewController: SBSDKBarcodeTrackingOverlayControllerDelegate {
|
|
372
|
+
|
|
373
|
+
public func barcodeTrackingOverlay(_ controller: SBSDKBarcodeTrackingOverlayController, didTapOnBarcode barcode: SBSDKBarcodeItem) {
|
|
374
|
+
if let jsonString = barcodeResultToString([barcode]) {
|
|
375
|
+
delegate?.onSelectedBarcode(jsonString)
|
|
376
|
+
} else {
|
|
377
|
+
delegate?.onError(error: SBError.resultError(reason: "Unable to process barcode data"))
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
public func barcodeTrackingOverlay(_ controller: SBSDKBarcodeTrackingOverlayController, polygonStyleFor barcode: SBSDKBarcodeItem, proposedStyle: SBSDKBarcodeTrackedViewPolygonStyle) -> SBSDKBarcodeTrackedViewPolygonStyle {
|
|
382
|
+
|
|
383
|
+
if let boundItem = self.barcodeItemOverlayViewBinders?[barcode.uuid] {
|
|
384
|
+
|
|
385
|
+
guard !refreshBarcodeItemOverlayViewConfig(boundItem)
|
|
386
|
+
else { return proposedStyle }
|
|
387
|
+
|
|
388
|
+
if let strokeColor = boundItem.strokeColor {
|
|
389
|
+
proposedStyle.polygonColor = SBComponentUtils.fromRgbAHex(strokeColor)
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if let polygonColor = boundItem.polygonColor {
|
|
393
|
+
proposedStyle.polygonBackgroundColor = SBComponentUtils.fromRgbAHex(polygonColor)
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return proposedStyle
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
public func barcodeTrackingOverlay(_ controller: SBSDKBarcodeTrackingOverlayController, textStyleFor barcode: SBSDKBarcodeItem, proposedStyle: SBSDKBarcodeTrackedViewTextStyle) -> SBSDKBarcodeTrackedViewTextStyle {
|
|
401
|
+
|
|
402
|
+
if let boundItem = self.barcodeItemOverlayViewBinders?[barcode.uuid] {
|
|
403
|
+
|
|
404
|
+
guard !refreshBarcodeItemOverlayViewConfig(boundItem)
|
|
405
|
+
else { return proposedStyle }
|
|
406
|
+
|
|
407
|
+
if let textColor = boundItem.textColor {
|
|
408
|
+
proposedStyle.textColor = SBComponentUtils.fromRgbAHex(textColor)
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
if let textContainerColor = boundItem.textContainerColor {
|
|
412
|
+
proposedStyle.textBackgroundColor = SBComponentUtils.fromRgbAHex(textContainerColor)
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
return proposedStyle
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
public func barcodeTrackingOverlay(_ controller: SBSDKBarcodeTrackingOverlayController, overrideTextFor barcode: SBSDKBarcodeItem, proposedString: String) -> String {
|
|
420
|
+
|
|
421
|
+
if let boundItem = self.barcodeItemOverlayViewBinders?[barcode.uuid] ,
|
|
422
|
+
let text = boundItem.text {
|
|
423
|
+
return text
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return proposedString
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
+
#if !defined(RCT_NEW_ARCH_ENABLED)
|
|
1
2
|
|
|
2
|
-
#import <Foundation/Foundation.h>
|
|
3
|
-
#import <React/RCTLog.h>
|
|
4
|
-
#import <React/RCTUIManager.h>
|
|
5
3
|
#import <React/RCTViewManager.h>
|
|
6
|
-
#import <
|
|
7
|
-
|
|
4
|
+
#import <React/RCTUIManager.h>
|
|
8
5
|
|
|
9
|
-
#if !defined(RCT_NEW_ARCH_ENABLED)
|
|
10
6
|
#import "RNScanbotBarcodeScannerLegacyView.h"
|
|
11
|
-
typedef void (^NativeViewBlock)(RNScanbotBarcodeScannerLegacyView* _Nonnull);
|
|
12
|
-
#else
|
|
13
|
-
#import "RNScanbotBarcodeScannerView.h"
|
|
14
|
-
#endif
|
|
15
7
|
|
|
8
|
+
typedef void (^NativeViewBlock)(RNScanbotBarcodeScannerLegacyView* _Nonnull);
|
|
16
9
|
|
|
17
10
|
@interface RNScanbotBarcodeScannerViewManager: RCTViewManager
|
|
18
11
|
@end
|
|
@@ -22,30 +15,31 @@ typedef void (^NativeViewBlock)(RNScanbotBarcodeScannerLegacyView* _Nonnull);
|
|
|
22
15
|
RCT_EXPORT_MODULE(ScanbotBarcodeScannerView)
|
|
23
16
|
|
|
24
17
|
- (UIView *)view {
|
|
25
|
-
#if !defined(RCT_NEW_ARCH_ENABLED)
|
|
26
18
|
return [[RNScanbotBarcodeScannerLegacyView alloc] init];
|
|
27
|
-
#else
|
|
28
|
-
return [[RNScanbotBarcodeScannerView alloc] init];
|
|
29
|
-
#endif
|
|
30
19
|
}
|
|
31
20
|
|
|
21
|
+
// Events
|
|
32
22
|
RCT_EXPORT_VIEW_PROPERTY(onBarcodeScannerResult, RCTDirectEventBlock)
|
|
33
23
|
RCT_EXPORT_VIEW_PROPERTY(onSelectBarcodeResult, RCTDirectEventBlock)
|
|
34
|
-
|
|
24
|
+
RCT_EXPORT_VIEW_PROPERTY(onError, RCTDirectEventBlock)
|
|
25
|
+
// General Configuration
|
|
35
26
|
RCT_EXPORT_VIEW_PROPERTY(flashEnabled, BOOL)
|
|
27
|
+
RCT_EXPORT_VIEW_PROPERTY(scanningEnabled, BOOL)
|
|
28
|
+
RCT_EXPORT_VIEW_PROPERTY(hardwareButtonsEnabled, BOOL)
|
|
29
|
+
// Finder Configuration
|
|
36
30
|
RCT_EXPORT_VIEW_PROPERTY(finderEnabled, BOOL)
|
|
37
|
-
RCT_EXPORT_VIEW_PROPERTY(finderStrokeWidth,
|
|
31
|
+
RCT_EXPORT_VIEW_PROPERTY(finderStrokeWidth, NSNumber)
|
|
38
32
|
RCT_EXPORT_VIEW_PROPERTY(finderStrokeColor, UIColor)
|
|
39
33
|
RCT_EXPORT_VIEW_PROPERTY(finderOverlayColor, UIColor)
|
|
40
|
-
//RCT_EXPORT_VIEW_PROPERTY(finderMinPadding,
|
|
34
|
+
//RCT_EXPORT_VIEW_PROPERTY(finderMinPadding, NSNumber)
|
|
41
35
|
RCT_EXPORT_VIEW_PROPERTY(finderInset, NSDictionary)
|
|
42
36
|
RCT_EXPORT_VIEW_PROPERTY(finderRequiredAspectRatios, NSDictionary)
|
|
43
|
-
|
|
37
|
+
// Camera Configuration
|
|
38
|
+
RCT_EXPORT_VIEW_PROPERTY(cameraZoomFactor, NSNumber)
|
|
44
39
|
RCT_EXPORT_VIEW_PROPERTY(cameraZoomRange, NSDictionary)
|
|
45
40
|
RCT_EXPORT_VIEW_PROPERTY(cameraModule, NSString)
|
|
46
41
|
RCT_EXPORT_VIEW_PROPERTY(minFocusDistanceLock, BOOL)
|
|
47
|
-
|
|
48
|
-
RCT_EXPORT_VIEW_PROPERTY(hardwareButtonsEnabled, BOOL)
|
|
42
|
+
// Overlay Configuration
|
|
49
43
|
RCT_EXPORT_VIEW_PROPERTY(overlayEnabled, BOOL)
|
|
50
44
|
RCT_EXPORT_VIEW_PROPERTY(overlayPolygonColor, UIColor)
|
|
51
45
|
RCT_EXPORT_VIEW_PROPERTY(overlayStrokeColor, UIColor)
|
|
@@ -54,6 +48,7 @@ RCT_EXPORT_VIEW_PROPERTY(overlayTextContainerColor, UIColor)
|
|
|
54
48
|
RCT_EXPORT_VIEW_PROPERTY(overlayTextFormat, NSString)
|
|
55
49
|
RCT_EXPORT_VIEW_PROPERTY(overlayLoadingTextValue, NSString)
|
|
56
50
|
RCT_EXPORT_VIEW_PROPERTY(overlayBarcodeItemOverlayViewBinder, BOOL)
|
|
51
|
+
// Barcode Configuration
|
|
57
52
|
RCT_EXPORT_VIEW_PROPERTY(configFormatConfigurations, NSArray)
|
|
58
53
|
RCT_EXPORT_VIEW_PROPERTY(configExtractedDocumentFormats, NSArray)
|
|
59
54
|
RCT_EXPORT_VIEW_PROPERTY(configOnlyAcceptDocuments, BOOL)
|
|
@@ -63,7 +58,6 @@ RCT_EXPORT_VIEW_PROPERTY(configOptimizedForOverlays, BOOL)
|
|
|
63
58
|
RCT_EXPORT_VIEW_PROPERTY(configAccumulation, NSDictionary)
|
|
64
59
|
|
|
65
60
|
//Commands
|
|
66
|
-
#if !defined(RCT_NEW_ARCH_ENABLED)
|
|
67
61
|
RCT_EXPORT_METHOD(freezeCamera:(nonnull NSNumber*) reactTag) {
|
|
68
62
|
[self callNativeMethodWithReactTag: reactTag andBlock: ^void (RNScanbotBarcodeScannerLegacyView *nativeView) {
|
|
69
63
|
[nativeView freezeCamera];
|
|
@@ -93,7 +87,7 @@ RCT_EXPORT_METHOD(bindBarcodeItemOverlayView:(nonnull NSNumber*) reactTag
|
|
|
93
87
|
block(view);
|
|
94
88
|
}];
|
|
95
89
|
}
|
|
96
|
-
#endif
|
|
97
|
-
|
|
98
90
|
|
|
99
91
|
@end
|
|
92
|
+
|
|
93
|
+
#endif
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
|
+
#pragma once
|
|
3
|
+
#import <react/renderer/components/RNScanbotBarcodeScannerViewSpec/Props.h>
|
|
4
|
+
|
|
5
|
+
inline bool operator!=(const facebook::react::ScanbotBarcodeScannerViewFinderInsetStruct &i,const facebook::react::ScanbotBarcodeScannerViewFinderInsetStruct &j) {
|
|
6
|
+
return !(i.left == j.left && i.top == j.top && i.bottom == j.bottom && i.right == j.right);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
inline bool operator!=(const facebook::react::ScanbotBarcodeScannerViewFinderRequiredAspectRatiosStruct &i,const facebook::react::ScanbotBarcodeScannerViewFinderRequiredAspectRatiosStruct &j) {
|
|
10
|
+
return !(i.width == j.width && i.height == j.height);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
inline bool operator!=(const facebook::react::ScanbotBarcodeScannerViewCameraZoomRangeStruct &i,const facebook::react::ScanbotBarcodeScannerViewCameraZoomRangeStruct &j) {
|
|
14
|
+
return !(i.maxZoom == j.maxZoom && i.minZoom == j.minZoom);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
inline bool operator!=(const std::vector<std::string> &v1,const std::vector<std::string> &v2) {
|
|
18
|
+
|
|
19
|
+
if(v1.size() != v2.size()) return true;
|
|
20
|
+
|
|
21
|
+
for(int i = 0; i< v1.size(); i++){
|
|
22
|
+
if(v1[i] != v2[i]){
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
inline bool operator!=(std::vector<facebook::react::ScanbotBarcodeScannerViewConfigFormatConfigurationsStruct> const &v1, std::vector<facebook::react::ScanbotBarcodeScannerViewConfigFormatConfigurationsStruct> const &v2){
|
|
31
|
+
|
|
32
|
+
if(v1.size() != v2.size()) return true;
|
|
33
|
+
|
|
34
|
+
for(int i = 0; i< v1.size(); i++){
|
|
35
|
+
if(
|
|
36
|
+
v1[i]._type != v2[i]._type ||
|
|
37
|
+
v1[i].regexFilter != v2[i].regexFilter ||
|
|
38
|
+
v1[i].minimumSizeScore != v2[i].minimumSizeScore ||
|
|
39
|
+
v1[i].addAdditionalQuietZone != v2[i].addAdditionalQuietZone ||
|
|
40
|
+
v1[i].minimum1DQuietZoneSize != v2[i].minimum1DQuietZoneSize ||
|
|
41
|
+
v1[i].minimumTextLength != v2[i].minimumTextLength ||
|
|
42
|
+
v1[i].maximumTextLength != v2[i].maximumTextLength ||
|
|
43
|
+
v1[i].enableOneDBlurScanner != v2[i].enableOneDBlurScanner ||
|
|
44
|
+
v1[i].returnStartEnd != v2[i].returnStartEnd ||
|
|
45
|
+
v1[i].stripCheckDigits != v2[i].stripCheckDigits ||
|
|
46
|
+
v1[i].checksum != v2[i].checksum ||
|
|
47
|
+
v1[i].code32 != v2[i].code32 ||
|
|
48
|
+
v1[i].code39 != v2[i].code39 ||
|
|
49
|
+
v1[i].pzn7 != v2[i].pzn7 ||
|
|
50
|
+
v1[i].pzn8 != v2[i].pzn8 ||
|
|
51
|
+
v1[i].tryCode39ExtendedMode != v2[i].tryCode39ExtendedMode ||
|
|
52
|
+
v1[i].useCode39CheckDigit != v2[i].useCode39CheckDigit ||
|
|
53
|
+
v1[i].gs1Handling != v2[i].gs1Handling ||
|
|
54
|
+
v1[i].iata2of5 != v2[i].iata2of5 ||
|
|
55
|
+
v1[i].code25 != v2[i].code25 ||
|
|
56
|
+
v1[i].industrial2of5 != v2[i].industrial2of5 ||
|
|
57
|
+
v1[i].useIATA2OF5Checksum != v2[i].useIATA2OF5Checksum ||
|
|
58
|
+
v1[i].checksumAlgorithms != v2[i].checksumAlgorithms ||
|
|
59
|
+
v1[i].ean8 != v2[i].ean8 ||
|
|
60
|
+
v1[i].ean13 != v2[i].ean13 ||
|
|
61
|
+
v1[i].upca != v2[i].upca ||
|
|
62
|
+
v1[i].upce != v2[i].upce ||
|
|
63
|
+
v1[i].extensions != v2[i].extensions ||
|
|
64
|
+
v1[i].minimumValue != v2[i].minimumValue ||
|
|
65
|
+
v1[i].allowNarrowBarsOnly != v2[i].allowNarrowBarsOnly ||
|
|
66
|
+
v1[i].allowWideBarsOnly != v2[i].allowWideBarsOnly ||
|
|
67
|
+
v1[i].strictMode != v2[i].strictMode ||
|
|
68
|
+
v1[i].qr != v2[i].qr ||
|
|
69
|
+
v1[i].microQr != v2[i].microQr ||
|
|
70
|
+
v1[i].rmqr != v2[i].rmqr ||
|
|
71
|
+
v1[i].minimumValue != v2[i].minimumValue ||
|
|
72
|
+
v1[i].allowNarrowBarsOnly != v2[i].allowNarrowBarsOnly ||
|
|
73
|
+
v1[i].allowWideBarsOnly != v2[i].allowWideBarsOnly ||
|
|
74
|
+
v1[i].strictMode != v2[i].strictMode ||
|
|
75
|
+
v1[i].qr != v2[i].qr ||
|
|
76
|
+
v1[i].australiaPostCustomerFormat != v2[i].australiaPostCustomerFormat ||
|
|
77
|
+
v1[i].formats != v2[i].formats ||
|
|
78
|
+
v1[i].minimumNumberOfRequiredFramesWithEqualRecognitionResult != v2[i].minimumNumberOfRequiredFramesWithEqualRecognitionResult ||
|
|
79
|
+
v1[i].minimumNumberOfRequiredFramesWithEqualRecognitionResultExtensionless != v2[i].minimumNumberOfRequiredFramesWithEqualRecognitionResultExtensionless ||
|
|
80
|
+
v1[i].oneDConfirmationMode != v2[i].oneDConfirmationMode
|
|
81
|
+
){
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
inline bool operator!=(facebook::react::ScanbotBarcodeScannerViewConfigAccumulationStruct const &i, facebook::react::ScanbotBarcodeScannerViewConfigAccumulationStruct const &j) {
|
|
90
|
+
return i.accumulationTime != j.accumulationTime ||
|
|
91
|
+
i.method != j.method ||
|
|
92
|
+
i.removeUnconnectedResults != j.removeUnconnectedResults;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#endif
|