scandit-react-native-datacapture-id 7.6.2 → 8.0.0-beta.2
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/android/build.gradle +1 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/id/ScanditDataCaptureIdModule.kt +38 -24
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/id/ScanditDataCaptureIdPackage.kt +1 -2
- package/dist/dts/index.d.ts +55 -8
- package/dist/id.js +755 -481
- package/dist/id.js.map +1 -1
- package/dist/index.js +137 -146
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureId.m +19 -11
- package/ios/Sources/ScanditDataCaptureId.swift +54 -43
- package/package.json +10 -10
- package/scandit-react-native-datacapture-id.podspec +2 -2
- package/dist/dts/native/IdCaptureListenerProxy.d.ts +0 -14
- package/dist/dts/native/IdCaptureProxy.d.ts +0 -11
package/android/build.gradle
CHANGED
|
@@ -75,7 +75,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
dependencies {
|
|
78
|
-
def sdk_version = "
|
|
78
|
+
def sdk_version = "8.0.0-beta.2"
|
|
79
79
|
|
|
80
80
|
println("Version of the native sdk used in this build: ${safeExtGet("global_sdk_version", sdk_version)}")
|
|
81
81
|
api project(path: ":scandit-react-native-datacapture-core")
|
package/android/src/main/kotlin/com/scandit/datacapture/reactnative/id/ScanditDataCaptureIdModule.kt
CHANGED
|
@@ -14,6 +14,7 @@ import com.facebook.react.bridge.ReadableMap
|
|
|
14
14
|
import com.scandit.datacapture.frameworks.core.errors.ParameterNullError
|
|
15
15
|
import com.scandit.datacapture.frameworks.id.IdCaptureModule
|
|
16
16
|
import com.scandit.datacapture.reactnative.core.utils.ReactNativeResult
|
|
17
|
+
import com.scandit.datacapture.reactnative.core.utils.modeId
|
|
17
18
|
|
|
18
19
|
class ScanditDataCaptureIdModule(
|
|
19
20
|
reactContext: ReactApplicationContext,
|
|
@@ -22,45 +23,39 @@ class ScanditDataCaptureIdModule(
|
|
|
22
23
|
|
|
23
24
|
override fun getName(): String = "ScanditDataCaptureId"
|
|
24
25
|
|
|
25
|
-
init {
|
|
26
|
-
// automatically register listeners
|
|
27
|
-
idCaptureModule.addListener()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
26
|
override fun invalidate() {
|
|
31
27
|
idCaptureModule.onDestroy()
|
|
32
28
|
super.invalidate()
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
@ReactMethod
|
|
36
|
-
fun
|
|
37
|
-
idCaptureModule.
|
|
32
|
+
fun addIdCaptureListener(readableMap: ReadableMap) {
|
|
33
|
+
idCaptureModule.addListener(readableMap.modeId)
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
@ReactMethod
|
|
41
|
-
fun
|
|
42
|
-
idCaptureModule.
|
|
37
|
+
fun removeIdCaptureListener(readableMap: ReadableMap) {
|
|
38
|
+
idCaptureModule.removeListener(readableMap.modeId)
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
@ReactMethod
|
|
46
|
-
fun
|
|
47
|
-
idCaptureModule.
|
|
42
|
+
fun resetIdCaptureMode(readableMap: ReadableMap) {
|
|
43
|
+
idCaptureModule.resetMode(readableMap.modeId)
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
@Suppress("UNUSED_PARAMETER")
|
|
51
46
|
@ReactMethod
|
|
52
|
-
fun
|
|
53
|
-
idCaptureModule.
|
|
47
|
+
fun finishDidCaptureCallback(readableMap: ReadableMap) {
|
|
48
|
+
idCaptureModule.finishDidCaptureId(readableMap.modeId, readableMap.getBoolean("enabled"))
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
@ReactMethod
|
|
57
|
-
fun
|
|
58
|
-
idCaptureModule.
|
|
52
|
+
fun finishDidRejectCallback(readableMap: ReadableMap) {
|
|
53
|
+
idCaptureModule.finishDidRejectId(readableMap.modeId, readableMap.getBoolean("enabled"))
|
|
59
54
|
}
|
|
60
55
|
|
|
61
56
|
@ReactMethod
|
|
62
|
-
fun setModeEnabledState(
|
|
63
|
-
idCaptureModule.setModeEnabled(enabled)
|
|
57
|
+
fun setModeEnabledState(readableMap: ReadableMap) {
|
|
58
|
+
idCaptureModule.setModeEnabled(readableMap.modeId, readableMap.getBoolean("enabled"))
|
|
64
59
|
}
|
|
65
60
|
|
|
66
61
|
@ReactMethod
|
|
@@ -72,18 +67,37 @@ class ScanditDataCaptureIdModule(
|
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
@ReactMethod
|
|
75
|
-
fun updateIdCaptureMode(
|
|
76
|
-
|
|
70
|
+
fun updateIdCaptureMode(readableMap: ReadableMap, promise: Promise) {
|
|
71
|
+
val modeJson = readableMap.getString("modeJson")
|
|
72
|
+
if (modeJson == null) {
|
|
73
|
+
promise.reject(ParameterNullError("modeJson"))
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
idCaptureModule.updateModeFromJson(readableMap.modeId, modeJson, ReactNativeResult(promise))
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
@ReactMethod
|
|
80
|
-
fun applyIdCaptureModeSettings(
|
|
81
|
-
|
|
80
|
+
fun applyIdCaptureModeSettings(readableMap: ReadableMap, promise: Promise) {
|
|
81
|
+
val settingsJson = readableMap.getString("settingsJson")
|
|
82
|
+
if (settingsJson == null) {
|
|
83
|
+
promise.reject(ParameterNullError("settingsJson"))
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
idCaptureModule.applyModeSettings(
|
|
87
|
+
readableMap.modeId,
|
|
88
|
+
settingsJson,
|
|
89
|
+
ReactNativeResult(promise)
|
|
90
|
+
)
|
|
82
91
|
}
|
|
83
92
|
|
|
84
93
|
@ReactMethod
|
|
85
|
-
fun updateIdCaptureFeedback(
|
|
86
|
-
|
|
94
|
+
fun updateIdCaptureFeedback(readableMap: ReadableMap, promise: Promise) {
|
|
95
|
+
val feedbackJson = readableMap.getString("feedbackJson")
|
|
96
|
+
if (feedbackJson == null) {
|
|
97
|
+
promise.reject(ParameterNullError("feedbackJson"))
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
idCaptureModule.updateFeedback(readableMap.modeId, feedbackJson, ReactNativeResult(promise))
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
override fun getConstants(): MutableMap<String, Any> = mutableMapOf(
|
|
@@ -11,7 +11,6 @@ import com.facebook.react.bridge.NativeModule
|
|
|
11
11
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
12
12
|
import com.facebook.react.uimanager.ViewManager
|
|
13
13
|
import com.scandit.datacapture.frameworks.id.IdCaptureModule
|
|
14
|
-
import com.scandit.datacapture.frameworks.id.listeners.FrameworksIdCaptureListener
|
|
15
14
|
import com.scandit.datacapture.reactnative.core.utils.ReactNativeEventEmitter
|
|
16
15
|
|
|
17
16
|
class ScanditDataCaptureIdPackage : ReactPackage {
|
|
@@ -26,7 +25,7 @@ class ScanditDataCaptureIdPackage : ReactPackage {
|
|
|
26
25
|
|
|
27
26
|
private fun getIdCaptureModule(reactContext: ReactApplicationContext): IdCaptureModule {
|
|
28
27
|
val emitter = ReactNativeEventEmitter(reactContext)
|
|
29
|
-
return IdCaptureModule(
|
|
28
|
+
return IdCaptureModule(emitter).also {
|
|
30
29
|
it.onCreate(reactContext)
|
|
31
30
|
}
|
|
32
31
|
}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,10 +1,57 @@
|
|
|
1
|
-
export { DateResult
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { DateResult } from 'scandit-datacapture-frameworks-id';
|
|
2
|
+
export { IdAnonymizationMode } from 'scandit-datacapture-frameworks-id';
|
|
3
|
+
export { IdFieldType } from 'scandit-datacapture-frameworks-id';
|
|
4
|
+
export { IdImageType } from 'scandit-datacapture-frameworks-id';
|
|
5
|
+
export { CapturedSides } from 'scandit-datacapture-frameworks-id';
|
|
6
|
+
export { TextHintPosition } from 'scandit-datacapture-frameworks-id';
|
|
7
|
+
export { BarcodeResult } from 'scandit-datacapture-frameworks-id';
|
|
8
|
+
export { Duration } from 'scandit-datacapture-frameworks-id';
|
|
9
|
+
export { IdImages } from 'scandit-datacapture-frameworks-id';
|
|
10
|
+
export { IdSide } from 'scandit-datacapture-frameworks-id';
|
|
11
|
+
export { Sex } from 'scandit-datacapture-frameworks-id';
|
|
5
12
|
export { UsRealIdStatus } from 'scandit-datacapture-frameworks-id';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
13
|
+
export { CapturedId } from 'scandit-datacapture-frameworks-id';
|
|
14
|
+
export { MobileDocumentOCRResult } from 'scandit-datacapture-frameworks-id';
|
|
15
|
+
export { MobileDocumentResult } from 'scandit-datacapture-frameworks-id';
|
|
16
|
+
export { MRZResult } from 'scandit-datacapture-frameworks-id';
|
|
17
|
+
export { VIZResult } from 'scandit-datacapture-frameworks-id';
|
|
18
|
+
export { IdCapture } from 'scandit-datacapture-frameworks-id';
|
|
19
|
+
export { IdCaptureFeedback } from 'scandit-datacapture-frameworks-id';
|
|
20
|
+
export { IdCaptureListener } from 'scandit-datacapture-frameworks-id';
|
|
21
|
+
export { IdCaptureOverlay } from 'scandit-datacapture-frameworks-id';
|
|
22
|
+
export { IdCaptureSettings } from 'scandit-datacapture-frameworks-id';
|
|
23
|
+
export { IdLayoutLineStyle } from 'scandit-datacapture-frameworks-id';
|
|
24
|
+
export { IdLayoutStyle } from 'scandit-datacapture-frameworks-id';
|
|
25
|
+
export { RejectionReason } from 'scandit-datacapture-frameworks-id';
|
|
26
|
+
export { IdCaptureDocumentType } from 'scandit-datacapture-frameworks-id';
|
|
27
|
+
export { DriverLicense } from 'scandit-datacapture-frameworks-id';
|
|
28
|
+
export { HealthInsuranceCard } from 'scandit-datacapture-frameworks-id';
|
|
29
|
+
export { IdCaptureDocument } from 'scandit-datacapture-frameworks-id';
|
|
30
|
+
export { IdCard } from 'scandit-datacapture-frameworks-id';
|
|
31
|
+
export { Passport } from 'scandit-datacapture-frameworks-id';
|
|
32
|
+
export { RegionSpecific } from 'scandit-datacapture-frameworks-id';
|
|
33
|
+
export { ResidencePermit } from 'scandit-datacapture-frameworks-id';
|
|
34
|
+
export { VisaIcao } from 'scandit-datacapture-frameworks-id';
|
|
35
|
+
export { IdCaptureScanner } from 'scandit-datacapture-frameworks-id';
|
|
36
|
+
export { SingleSideScanner } from 'scandit-datacapture-frameworks-id';
|
|
37
|
+
export { FullDocumentScanner } from 'scandit-datacapture-frameworks-id';
|
|
38
|
+
export { MobileDocumentScanner } from 'scandit-datacapture-frameworks-id';
|
|
39
|
+
export { PhysicalDocumentScanner } from 'scandit-datacapture-frameworks-id';
|
|
40
|
+
export { MobileDocumentDataElement } from 'scandit-datacapture-frameworks-id';
|
|
41
|
+
export { IdCaptureRegion } from 'scandit-datacapture-frameworks-id';
|
|
42
|
+
export { RegionSpecificSubtype } from 'scandit-datacapture-frameworks-id';
|
|
43
|
+
export { AamvaBarcodeVerificationResult } from 'scandit-datacapture-frameworks-id';
|
|
44
|
+
export { AamvaBarcodeVerificationStatus } from 'scandit-datacapture-frameworks-id';
|
|
45
|
+
export { DataConsistencyResult } from 'scandit-datacapture-frameworks-id';
|
|
46
|
+
export { DataConsistencyCheck } from 'scandit-datacapture-frameworks-id';
|
|
47
|
+
export { VerificationResult } from 'scandit-datacapture-frameworks-id';
|
|
48
|
+
export { ProfessionalDrivingPermit } from 'scandit-datacapture-frameworks-id';
|
|
49
|
+
export { VehicleRestriction } from 'scandit-datacapture-frameworks-id';
|
|
50
|
+
export { DrivingLicenseCategory } from 'scandit-datacapture-frameworks-id';
|
|
51
|
+
export { DrivingLicenseDetails } from 'scandit-datacapture-frameworks-id';
|
|
52
|
+
export { IdCaptureController } from 'scandit-datacapture-frameworks-id';
|
|
53
|
+
export { IdCaptureListenerController } from 'scandit-datacapture-frameworks-id';
|
|
54
|
+
export { IdCaptureListenerProxy } from 'scandit-datacapture-frameworks-id';
|
|
55
|
+
export { IdCaptureListenerEvents } from 'scandit-datacapture-frameworks-id';
|
|
56
|
+
export { IdCaptureProxy } from 'scandit-datacapture-frameworks-id';
|
|
10
57
|
export * from './IdCaptureView';
|