@smile_identity/react-native 10.2.2 → 10.2.4-beta.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/README.md +4 -28
- package/android/build.gradle +4 -1
- package/android/gradle.properties +3 -3
- package/android/src/main/java/com/smileidentity/react/Mapper.kt +21 -5
- package/android/src/main/java/com/smileidentity/react/SmileIdModule.kt +37 -39
- package/android/src/main/java/com/smileidentity/react/SmileIdPackage.kt +4 -0
- package/android/src/main/java/com/smileidentity/react/fragments/SmileCaptureFragment.kt +56 -0
- package/android/src/main/java/com/smileidentity/react/results/BiometricKycCaptureResult.kt +9 -0
- package/android/src/main/java/com/smileidentity/react/results/SmartSelfieCaptureResult.kt +3 -2
- package/android/src/main/java/com/smileidentity/react/utils/BiometricKycCaptureResultAdapter.kt +69 -0
- package/android/src/main/java/com/smileidentity/react/utils/ReactUtils.kt +16 -0
- package/android/src/main/java/com/smileidentity/react/utils/SelfieCaptureResultAdapter.kt +0 -2
- package/android/src/main/java/com/smileidentity/react/viewmanagers/BaseSmileIDViewManager.kt +130 -0
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBiometricKYCViewManager.kt +22 -46
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDConsentViewManager.kt +27 -52
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentCaptureViewManager.kt +15 -40
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDDocumentVerificationViewManager.kt +23 -49
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDEnhancedDocumentVerificationViewManager.kt +28 -47
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieAuthenticationEnhancedViewManager.kt +39 -0
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieAuthenticationViewManager.kt +16 -40
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieCaptureViewManager.kt +15 -38
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieEnrollmentEnhancedViewManager.kt +39 -0
- package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDSmartSelfieEnrollmentViewManager.kt +15 -44
- package/android/src/main/java/com/smileidentity/react/views/SmileIDBiometricKYCView.kt +14 -7
- package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentCaptureView.kt +9 -0
- package/android/src/main/java/com/smileidentity/react/views/SmileIDDocumentVerificationView.kt +2 -4
- package/android/src/main/java/com/smileidentity/react/views/SmileIDEnhancedDocumentVerificationView.kt +11 -5
- package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieAuthenticationEnhancedView.kt +61 -0
- package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieAuthenticationView.kt +0 -2
- package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieCaptureView.kt +38 -25
- package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieEnrollmentEnhancedView.kt +68 -0
- package/android/src/main/java/com/smileidentity/react/views/SmileIDSmartSelfieEnrollmentView.kt +35 -30
- package/android/src/main/java/com/smileidentity/react/views/SmileIDView.kt +11 -10
- package/android/src/main/res/values/colors.xml +14 -0
- package/android/src/main/res/values/strings.xml +91 -0
- package/android/src/oldarch/SmileIdSpec.kt +3 -12
- package/ios/RNSmileID.mm +6 -3
- package/ios/RNSmileID.swift +470 -477
- package/ios/View/SmileIDSmartSelfieAuthEnhancedView.swift +44 -0
- package/ios/View/SmileIDSmartSelfieAuthView.swift +2 -3
- package/ios/View/SmileIDSmartSelfieCaptureView.swift +2 -2
- package/ios/View/SmileIDSmartSelfieEnrollmentEnhancedView.swift +44 -0
- package/ios/ViewManagers/SmileIDBaseViewManager.swift +24 -20
- package/ios/ViewManagers/SmileIDBiometricKYCViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDBiometricKYCViewManager.swift +24 -24
- package/ios/ViewManagers/SmileIDConsentViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDConsentViewManager.swift +1 -1
- package/ios/ViewManagers/SmileIDDocumentCaptureViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDDocumentCaptureViewManager.swift +1 -1
- package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDDocumentVerificationViewManager.swift +1 -1
- package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDEnhancedDocumentVerificationViewManager.swift +1 -1
- package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationEnhancedViewManager.m +10 -0
- package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationEnhancedViewManager.swift +25 -0
- package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDSmartSelfieAuthenticationViewManager.swift +1 -1
- package/ios/ViewManagers/SmileIDSmartSelfieCaptureViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDSmartSelfieCaptureViewManager.swift +1 -1
- package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentEnhancedViewManager.m +10 -0
- package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentEnhancedViewManager.swift +25 -0
- package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentViewManager.m +4 -1
- package/ios/ViewManagers/SmileIDSmartSelfieEnrollmentViewManager.swift +1 -1
- package/lib/commonjs/NativeSmileId.js.map +1 -1
- package/lib/commonjs/SmileIDBiometricKYCView.js +18 -29
- package/lib/commonjs/SmileIDBiometricKYCView.js.map +1 -1
- package/lib/commonjs/SmileIDConsentView.js +9 -29
- package/lib/commonjs/SmileIDConsentView.js.map +1 -1
- package/lib/commonjs/SmileIDDocumentCaptureView.js +9 -29
- package/lib/commonjs/SmileIDDocumentCaptureView.js.map +1 -1
- package/lib/commonjs/SmileIDDocumentVerificationView.js +9 -29
- package/lib/commonjs/SmileIDDocumentVerificationView.js.map +1 -1
- package/lib/commonjs/SmileIDEnhancedDocumentVerificationView.js +17 -28
- package/lib/commonjs/SmileIDEnhancedDocumentVerificationView.js.map +1 -1
- package/lib/commonjs/SmileIDSmartSelfieAuthenticationEnhancedView.js +20 -0
- package/lib/commonjs/SmileIDSmartSelfieAuthenticationEnhancedView.js.map +1 -0
- package/lib/commonjs/SmileIDSmartSelfieAuthenticationView.js +9 -29
- package/lib/commonjs/SmileIDSmartSelfieAuthenticationView.js.map +1 -1
- package/lib/commonjs/SmileIDSmartSelfieCaptureView.js +9 -29
- package/lib/commonjs/SmileIDSmartSelfieCaptureView.js.map +1 -1
- package/lib/commonjs/SmileIDSmartSelfieEnrollmentEnhancedView.js +20 -0
- package/lib/commonjs/SmileIDSmartSelfieEnrollmentEnhancedView.js.map +1 -0
- package/lib/commonjs/SmileIDSmartSelfieEnrollmentView.js +9 -29
- package/lib/commonjs/SmileIDSmartSelfieEnrollmentView.js.map +1 -1
- package/lib/commonjs/index.js +26 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useSmileIDView.js +55 -0
- package/lib/commonjs/useSmileIDView.js.map +1 -0
- package/lib/module/NativeSmileId.js.map +1 -1
- package/lib/module/SmileIDBiometricKYCView.js +18 -26
- package/lib/module/SmileIDBiometricKYCView.js.map +1 -1
- package/lib/module/SmileIDConsentView.js +9 -26
- package/lib/module/SmileIDConsentView.js.map +1 -1
- package/lib/module/SmileIDDocumentCaptureView.js +9 -26
- package/lib/module/SmileIDDocumentCaptureView.js.map +1 -1
- package/lib/module/SmileIDDocumentVerificationView.js +9 -26
- package/lib/module/SmileIDDocumentVerificationView.js.map +1 -1
- package/lib/module/SmileIDEnhancedDocumentVerificationView.js +17 -25
- package/lib/module/SmileIDEnhancedDocumentVerificationView.js.map +1 -1
- package/lib/module/SmileIDSmartSelfieAuthenticationEnhancedView.js +13 -0
- package/lib/module/SmileIDSmartSelfieAuthenticationEnhancedView.js.map +1 -0
- package/lib/module/SmileIDSmartSelfieAuthenticationView.js +9 -26
- package/lib/module/SmileIDSmartSelfieAuthenticationView.js.map +1 -1
- package/lib/module/SmileIDSmartSelfieCaptureView.js +9 -26
- package/lib/module/SmileIDSmartSelfieCaptureView.js.map +1 -1
- package/lib/module/SmileIDSmartSelfieEnrollmentEnhancedView.js +13 -0
- package/lib/module/SmileIDSmartSelfieEnrollmentEnhancedView.js.map +1 -0
- package/lib/module/SmileIDSmartSelfieEnrollmentView.js +9 -26
- package/lib/module/SmileIDSmartSelfieEnrollmentView.js.map +1 -1
- package/lib/module/index.js +10 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useSmileIDView.js +48 -0
- package/lib/module/useSmileIDView.js.map +1 -0
- package/lib/typescript/NativeSmileId.d.ts +6 -4
- package/lib/typescript/NativeSmileId.d.ts.map +1 -1
- package/lib/typescript/SmileIDBiometricKYCView.d.ts +3 -6
- package/lib/typescript/SmileIDBiometricKYCView.d.ts.map +1 -1
- package/lib/typescript/SmileIDConsentView.d.ts +3 -6
- package/lib/typescript/SmileIDConsentView.d.ts.map +1 -1
- package/lib/typescript/SmileIDDocumentCaptureView.d.ts +4 -7
- package/lib/typescript/SmileIDDocumentCaptureView.d.ts.map +1 -1
- package/lib/typescript/SmileIDDocumentVerificationView.d.ts +3 -6
- package/lib/typescript/SmileIDDocumentVerificationView.d.ts.map +1 -1
- package/lib/typescript/SmileIDEnhancedDocumentVerificationView.d.ts +3 -6
- package/lib/typescript/SmileIDEnhancedDocumentVerificationView.d.ts.map +1 -1
- package/lib/typescript/SmileIDSmartSelfieAuthenticationEnhancedView.d.ts +5 -0
- package/lib/typescript/SmileIDSmartSelfieAuthenticationEnhancedView.d.ts.map +1 -0
- package/lib/typescript/SmileIDSmartSelfieAuthenticationView.d.ts +3 -6
- package/lib/typescript/SmileIDSmartSelfieAuthenticationView.d.ts.map +1 -1
- package/lib/typescript/SmileIDSmartSelfieCaptureView.d.ts +3 -6
- package/lib/typescript/SmileIDSmartSelfieCaptureView.d.ts.map +1 -1
- package/lib/typescript/SmileIDSmartSelfieEnrollmentEnhancedView.d.ts +5 -0
- package/lib/typescript/SmileIDSmartSelfieEnrollmentEnhancedView.d.ts.map +1 -0
- package/lib/typescript/SmileIDSmartSelfieEnrollmentView.d.ts +3 -6
- package/lib/typescript/SmileIDSmartSelfieEnrollmentView.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +12 -6
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +2 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/useSmileIDView.d.ts +12 -0
- package/lib/typescript/useSmileIDView.d.ts.map +1 -0
- package/package.json +1 -1
- package/react-native-smile-id.podspec +1 -1
- package/src/NativeSmileId.ts +10 -14
- package/src/SmileIDBiometricKYCView.tsx +14 -30
- package/src/SmileIDConsentView.tsx +7 -30
- package/src/SmileIDDocumentCaptureView.tsx +12 -36
- package/src/SmileIDDocumentVerificationView.tsx +9 -36
- package/src/SmileIDEnhancedDocumentVerificationView.tsx +23 -35
- package/src/SmileIDSmartSelfieAuthenticationEnhancedView.tsx +28 -0
- package/src/SmileIDSmartSelfieAuthenticationView.tsx +10 -37
- package/src/SmileIDSmartSelfieCaptureView.tsx +9 -33
- package/src/SmileIDSmartSelfieEnrollmentEnhancedView.tsx +25 -0
- package/src/SmileIDSmartSelfieEnrollmentView.tsx +10 -37
- package/src/index.tsx +21 -2
- package/src/types.ts +8 -0
- package/src/useSmileIDView.tsx +80 -0
package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDBiometricKYCViewManager.kt
CHANGED
|
@@ -1,70 +1,46 @@
|
|
|
1
1
|
package com.smileidentity.react.viewmanagers
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
-
import com.facebook.react.bridge.
|
|
4
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
5
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
|
-
import com.
|
|
7
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
6
|
+
import com.smileidentity.react.toConsentInfo
|
|
8
7
|
import com.smileidentity.react.toIdInfo
|
|
9
8
|
import com.smileidentity.react.utils.getBoolOrDefault
|
|
10
9
|
import com.smileidentity.react.utils.getImmutableMapOrDefault
|
|
10
|
+
import com.smileidentity.react.utils.getMapOrDefault
|
|
11
11
|
import com.smileidentity.react.utils.getStringOrDefault
|
|
12
12
|
import com.smileidentity.react.views.SmileIDBiometricKYCView
|
|
13
13
|
|
|
14
14
|
@ReactModule(name = SmileIDBiometricKYCViewManager.NAME)
|
|
15
15
|
class SmileIDBiometricKYCViewManager(
|
|
16
16
|
private val reactApplicationContext: ReactApplicationContext
|
|
17
|
-
) :
|
|
17
|
+
) : BaseSmileIDViewManager<SmileIDBiometricKYCView>(reactApplicationContext) {
|
|
18
18
|
|
|
19
19
|
override fun getName(): String = NAME
|
|
20
20
|
|
|
21
|
-
override fun
|
|
22
|
-
return
|
|
23
|
-
"onSmileResult" to mapOf(
|
|
24
|
-
"phasedRegistrationNames" to mapOf(
|
|
25
|
-
"bubbled" to "onResult"
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
override fun getCommandsMap(): Map<String, Int> {
|
|
32
|
-
return mapOf("setParams" to COMMAND_SET_PARAMS)
|
|
21
|
+
override fun createSmileView(): SmileIDBiometricKYCView {
|
|
22
|
+
return SmileIDBiometricKYCView(reactApplicationContext)
|
|
33
23
|
}
|
|
34
24
|
|
|
35
|
-
override fun
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
view.userId = params.getStringOrDefault("userId")
|
|
52
|
-
view.jobId = params.getStringOrDefault("jobId")
|
|
53
|
-
view.idInfo = idInfo
|
|
54
|
-
view.allowAgentMode = params.getBoolOrDefault("allowAgentMode", false)
|
|
55
|
-
view.showAttribution = params.getBoolOrDefault("showAttribution", true)
|
|
56
|
-
view.showInstructions = params.getBoolOrDefault("showInstructions", true)
|
|
57
|
-
view.allowNewEnroll = params.getBoolOrDefault("allowNewEnroll", false)
|
|
58
|
-
view.renderContent()
|
|
59
|
-
}
|
|
60
|
-
}
|
|
25
|
+
override fun applyArgs(view: SmileIDBiometricKYCView, args: ReadableMap?) {
|
|
26
|
+
args?.let {
|
|
27
|
+
val idInfoMap = it.getMap("idInfo")
|
|
28
|
+
?: return view.emitFailure(IllegalArgumentException("idInfo is required to run Biometric KYC"))
|
|
29
|
+
val consentInformationMap = it.getMap("consentInformation")
|
|
30
|
+
?: return view.emitFailure(IllegalArgumentException("consentInformation is required to run Biometric KYC"))
|
|
31
|
+
val idInfo = idInfoMap.toIdInfo()
|
|
32
|
+
view.consentInformation = consentInformationMap.toConsentInfo()
|
|
33
|
+
view.extraPartnerParams = it.getImmutableMapOrDefault("extraPartnerParams")
|
|
34
|
+
view.userId = it.getStringOrDefault("userId")
|
|
35
|
+
view.jobId = it.getStringOrDefault("jobId")
|
|
36
|
+
view.idInfo = idInfo
|
|
37
|
+
view.allowAgentMode = it.getBoolOrDefault("allowAgentMode", false)
|
|
38
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
39
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
40
|
+
view.allowNewEnroll = it.getBoolOrDefault("allowNewEnroll", false)
|
|
61
41
|
}
|
|
62
42
|
}
|
|
63
43
|
|
|
64
|
-
override fun createViewInstance(p0: ThemedReactContext): SmileIDBiometricKYCView {
|
|
65
|
-
return SmileIDBiometricKYCView(reactApplicationContext)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
44
|
companion object {
|
|
69
45
|
const val NAME = "SmileIDBiometricKYCView"
|
|
70
46
|
const val COMMAND_SET_PARAMS = 6
|
package/android/src/main/java/com/smileidentity/react/viewmanagers/SmileIDConsentViewManager.kt
CHANGED
|
@@ -2,6 +2,7 @@ package com.smileidentity.react.viewmanagers
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
@@ -9,72 +10,46 @@ import com.smileidentity.react.utils.getBoolOrDefault
|
|
|
9
10
|
import com.smileidentity.react.utils.getImmutableMapOrDefault
|
|
10
11
|
import com.smileidentity.react.utils.getStringOrDefault
|
|
11
12
|
import com.smileidentity.react.views.SmileIDConsentView
|
|
13
|
+
import com.smileidentity.react.views.SmileIDDocumentCaptureView
|
|
12
14
|
|
|
13
15
|
@ReactModule(name = SmileIDConsentViewManager.NAME)
|
|
14
16
|
class SmileIDConsentViewManager(
|
|
15
17
|
private val reactApplicationContext: ReactApplicationContext
|
|
16
|
-
) :
|
|
18
|
+
) : BaseSmileIDViewManager<SmileIDConsentView>(reactApplicationContext) {
|
|
17
19
|
|
|
18
20
|
override fun getName(): String = NAME
|
|
19
21
|
|
|
20
|
-
override fun
|
|
21
|
-
return
|
|
22
|
-
"onSmileResult" to mapOf(
|
|
23
|
-
"phasedRegistrationNames" to mapOf(
|
|
24
|
-
"bubbled" to "onResult"
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun getCommandsMap(): Map<String, Int> {
|
|
31
|
-
return mapOf("setParams" to COMMAND_SET_PARAMS)
|
|
22
|
+
override fun createSmileView(): SmileIDConsentView {
|
|
23
|
+
return SmileIDConsentView(reactApplicationContext)
|
|
32
24
|
}
|
|
33
25
|
|
|
34
|
-
override fun
|
|
35
|
-
|
|
36
|
-
commandId: String?,
|
|
37
|
-
args: ReadableArray?
|
|
38
|
-
) {
|
|
39
|
-
super.receiveCommand(view, commandId, args)
|
|
40
|
-
when (commandId?.toInt()) {
|
|
41
|
-
COMMAND_SET_PARAMS -> {
|
|
42
|
-
// Extract params from args and apply to view
|
|
43
|
-
val params = args?.getMap(0)
|
|
44
|
-
params?.let {
|
|
45
|
-
|
|
46
|
-
val partnerName = params.getString("partnerName")
|
|
47
|
-
?: return view.emitFailure(IllegalArgumentException("partnerName is required to show Consent Screen"))
|
|
48
|
-
val partnerPrivacyPolicy = params.getString("partnerPrivacyPolicy") ?: return view.emitFailure(
|
|
49
|
-
IllegalArgumentException("partnerPrivacyPolicy is required to show Consent Screen")
|
|
50
|
-
)
|
|
51
|
-
val logoResName = params.getString("partnerIcon")
|
|
52
|
-
?: return view.emitFailure(IllegalArgumentException("partnerIcon is required to show Consent Screen"))
|
|
53
|
-
val productName = params.getString("productName")
|
|
54
|
-
?: return view.emitFailure(IllegalArgumentException("productName is required to show Consent Screen"))
|
|
26
|
+
override fun applyArgs(view: SmileIDConsentView, args: ReadableMap?) {
|
|
27
|
+
args?.let {
|
|
55
28
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
29
|
+
val partnerName = it.getString("partnerName")
|
|
30
|
+
?: return view.emitFailure(IllegalArgumentException("partnerName is required to show Consent Screen"))
|
|
31
|
+
val partnerPrivacyPolicy = it.getString("partnerPrivacyPolicy") ?: return view.emitFailure(
|
|
32
|
+
IllegalArgumentException("partnerPrivacyPolicy is required to show Consent Screen")
|
|
33
|
+
)
|
|
34
|
+
val logoResName = it.getString("partnerIcon")
|
|
35
|
+
?: return view.emitFailure(IllegalArgumentException("partnerIcon is required to show Consent Screen"))
|
|
36
|
+
val productName = it.getString("productName")
|
|
37
|
+
?: return view.emitFailure(IllegalArgumentException("productName is required to show Consent Screen"))
|
|
38
|
+
|
|
39
|
+
view.extraPartnerParams = it.getImmutableMapOrDefault("extraPartnerParams")
|
|
40
|
+
view.userId = it.getStringOrDefault("userId")
|
|
41
|
+
view.jobId = it.getStringOrDefault("jobId")
|
|
42
|
+
view.partnerName = partnerName
|
|
43
|
+
view.partnerPrivacyPolicy = partnerPrivacyPolicy
|
|
44
|
+
view.logoResName = logoResName
|
|
45
|
+
view.productName = productName
|
|
46
|
+
view.allowAgentMode = it.getBoolOrDefault("allowAgentMode", false)
|
|
47
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
48
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
69
49
|
}
|
|
70
50
|
}
|
|
71
51
|
|
|
72
|
-
override fun createViewInstance(p0: ThemedReactContext): SmileIDConsentView {
|
|
73
|
-
return SmileIDConsentView(reactApplicationContext)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
52
|
companion object {
|
|
77
53
|
const val NAME = "SmileIDConsentView"
|
|
78
|
-
const val COMMAND_SET_PARAMS = 5
|
|
79
54
|
}
|
|
80
55
|
}
|
|
@@ -2,64 +2,39 @@ package com.smileidentity.react.viewmanagers
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
8
9
|
import com.smileidentity.react.utils.getBoolOrDefault
|
|
9
10
|
import com.smileidentity.react.utils.getStringOrDefault
|
|
10
11
|
import com.smileidentity.react.views.SmileIDDocumentCaptureView
|
|
12
|
+
import com.smileidentity.react.views.SmileIDDocumentVerificationView
|
|
11
13
|
|
|
12
14
|
@ReactModule(name = SmileIDDocumentCaptureViewManager.NAME)
|
|
13
15
|
class SmileIDDocumentCaptureViewManager(
|
|
14
16
|
private val reactApplicationContext: ReactApplicationContext
|
|
15
|
-
) :
|
|
17
|
+
) : BaseSmileIDViewManager<SmileIDDocumentCaptureView>(reactApplicationContext) {
|
|
16
18
|
override fun getName(): String = NAME
|
|
17
19
|
|
|
18
|
-
override fun
|
|
19
|
-
return
|
|
20
|
-
"onSmileResult" to mapOf(
|
|
21
|
-
"phasedRegistrationNames" to mapOf(
|
|
22
|
-
"bubbled" to "onResult"
|
|
23
|
-
)
|
|
24
|
-
)
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
override fun getCommandsMap(): Map<String, Int> {
|
|
29
|
-
return mapOf("setParams" to COMMAND_SET_PARAMS)
|
|
20
|
+
override fun createSmileView(): SmileIDDocumentCaptureView {
|
|
21
|
+
return SmileIDDocumentCaptureView(reactApplicationContext)
|
|
30
22
|
}
|
|
31
23
|
|
|
32
|
-
override fun
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
params?.let {
|
|
43
|
-
view.userId = params.getStringOrDefault("userId")
|
|
44
|
-
view.jobId = params.getStringOrDefault("jobId")
|
|
45
|
-
view.allowAgentMode = params.getBoolOrDefault("allowAgentMode", true)
|
|
46
|
-
view.showAttribution = params.getBoolOrDefault("showAttribution", true)
|
|
47
|
-
view.showInstructions = params.getBoolOrDefault("showInstructions", true)
|
|
48
|
-
view.showConfirmation = params.getBoolOrDefault("showConfirmation", true)
|
|
49
|
-
view.allowGalleryUpload = params.getBoolOrDefault("allowGalleryUpload", false)
|
|
50
|
-
view.front = params.getBoolOrDefault("isDocumentFrontSide", true)
|
|
51
|
-
view.renderContent()
|
|
52
|
-
}
|
|
53
|
-
}
|
|
24
|
+
override fun applyArgs(view: SmileIDDocumentCaptureView, args: ReadableMap?) {
|
|
25
|
+
args?.let {
|
|
26
|
+
view.userId = it.getStringOrDefault("userId")
|
|
27
|
+
view.jobId = it.getStringOrDefault("jobId")
|
|
28
|
+
view.allowAgentMode = it.getBoolOrDefault("allowAgentMode", true)
|
|
29
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
30
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
31
|
+
view.showConfirmation = it.getBoolOrDefault("showConfirmation", true)
|
|
32
|
+
view.allowGalleryUpload = it.getBoolOrDefault("allowGalleryUpload", false)
|
|
33
|
+
view.front = it.getBoolOrDefault("isDocumentFrontSide", true)
|
|
54
34
|
}
|
|
55
35
|
}
|
|
56
36
|
|
|
57
|
-
override fun createViewInstance(p0: ThemedReactContext): SmileIDDocumentCaptureView {
|
|
58
|
-
return SmileIDDocumentCaptureView(reactApplicationContext)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
37
|
companion object {
|
|
62
38
|
const val NAME = "SmileIDDocumentCaptureView"
|
|
63
|
-
const val COMMAND_SET_PARAMS = 1
|
|
64
39
|
}
|
|
65
40
|
}
|
|
@@ -2,6 +2,7 @@ package com.smileidentity.react.viewmanagers
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
@@ -10,67 +11,40 @@ import com.smileidentity.react.utils.getFloatOrDefault
|
|
|
10
11
|
import com.smileidentity.react.utils.getImmutableMapOrDefault
|
|
11
12
|
import com.smileidentity.react.utils.getStringOrDefault
|
|
12
13
|
import com.smileidentity.react.views.SmileIDDocumentVerificationView
|
|
14
|
+
import com.smileidentity.react.views.SmileIDEnhancedDocumentVerificationView
|
|
13
15
|
|
|
14
16
|
@ReactModule(name = SmileIDDocumentVerificationViewManager.NAME)
|
|
15
17
|
class SmileIDDocumentVerificationViewManager(
|
|
16
18
|
private val reactApplicationContext: ReactApplicationContext
|
|
17
|
-
) :
|
|
19
|
+
) : BaseSmileIDViewManager<SmileIDDocumentVerificationView>(reactApplicationContext) {
|
|
18
20
|
|
|
19
21
|
override fun getName(): String = NAME
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return mapOf(
|
|
23
|
-
"onSmileResult" to mapOf(
|
|
24
|
-
"phasedRegistrationNames" to mapOf(
|
|
25
|
-
"bubbled" to "onResult"
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
override fun getCommandsMap(): Map<String, Int> {
|
|
32
|
-
return mapOf("setParams" to COMMAND_SET_PARAMS)
|
|
22
|
+
override fun createSmileView(): SmileIDDocumentVerificationView {
|
|
23
|
+
return SmileIDDocumentVerificationView(reactApplicationContext)
|
|
33
24
|
}
|
|
34
25
|
|
|
35
|
-
override fun
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
view.showAttribution = params.getBoolOrDefault("showAttribution", true)
|
|
54
|
-
view.captureBothSides = params.getBoolOrDefault("captureBothSides", false)
|
|
55
|
-
view.showInstructions = params.getBoolOrDefault("showInstructions", true)
|
|
56
|
-
view.allowGalleryUpload = params.getBoolOrDefault("allowGalleryUpload", false)
|
|
57
|
-
view.bypassSelfieCaptureWithFilePath = params.getStringOrDefault("bypassSelfieCaptureWithFilePath", null)
|
|
58
|
-
view.documentType = params.getStringOrDefault("documentType", null)
|
|
59
|
-
view.idAspectRatio = params.getFloatOrDefault("idAspectRatio")
|
|
60
|
-
view.allowNewEnroll = params.getBoolOrDefault("allowNewEnroll", false)
|
|
61
|
-
view.skipApiSubmission = params.getBoolOrDefault("skipApiSubmission", false)
|
|
62
|
-
view.renderContent()
|
|
63
|
-
}
|
|
64
|
-
}
|
|
26
|
+
override fun applyArgs(view: SmileIDDocumentVerificationView, args: ReadableMap?) {
|
|
27
|
+
args?.let {
|
|
28
|
+
val countryCode = it.getString("countryCode")
|
|
29
|
+
?: return view.emitFailure(IllegalArgumentException("countryCode is required to run Document Verification"))
|
|
30
|
+
view.extraPartnerParams = it.getImmutableMapOrDefault("extraPartnerParams")
|
|
31
|
+
view.userId = it.getStringOrDefault("userId")
|
|
32
|
+
view.jobId = it.getStringOrDefault("jobId")
|
|
33
|
+
view.countryCode = countryCode
|
|
34
|
+
view.allowAgentMode = it.getBoolOrDefault("allowAgentMode", false)
|
|
35
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
36
|
+
view.captureBothSides = it.getBoolOrDefault("captureBothSides", false)
|
|
37
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
38
|
+
view.allowGalleryUpload = it.getBoolOrDefault("allowGalleryUpload", false)
|
|
39
|
+
view.bypassSelfieCaptureWithFilePath = it.getStringOrDefault("bypassSelfieCaptureWithFilePath", null)
|
|
40
|
+
view.documentType = it.getStringOrDefault("documentType", null)
|
|
41
|
+
view.idAspectRatio = it.getFloatOrDefault("idAspectRatio")
|
|
42
|
+
view.allowNewEnroll = it.getBoolOrDefault("allowNewEnroll", false)
|
|
43
|
+
view.skipApiSubmission = it.getBoolOrDefault("skipApiSubmission", false)
|
|
65
44
|
}
|
|
66
45
|
}
|
|
67
46
|
|
|
68
|
-
override fun createViewInstance(p0: ThemedReactContext): SmileIDDocumentVerificationView {
|
|
69
|
-
return SmileIDDocumentVerificationView(reactApplicationContext)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
47
|
companion object {
|
|
73
48
|
const val NAME = "SmileIDDocumentVerificationView"
|
|
74
|
-
const val COMMAND_SET_PARAMS = 4
|
|
75
49
|
}
|
|
76
50
|
}
|
|
@@ -2,74 +2,55 @@ package com.smileidentity.react.viewmanagers
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
9
|
+
import com.smileidentity.react.toConsentInfo
|
|
10
|
+
import com.smileidentity.react.toIdInfo
|
|
8
11
|
import com.smileidentity.react.utils.getBoolOrDefault
|
|
9
12
|
import com.smileidentity.react.utils.getFloatOrDefault
|
|
10
13
|
import com.smileidentity.react.utils.getImmutableMapOrDefault
|
|
14
|
+
import com.smileidentity.react.utils.getMapOrDefault
|
|
11
15
|
import com.smileidentity.react.utils.getStringOrDefault
|
|
12
16
|
import com.smileidentity.react.views.SmileIDEnhancedDocumentVerificationView
|
|
17
|
+
import com.smileidentity.react.views.SmileIDSmartSelfieAuthenticationEnhancedView
|
|
13
18
|
|
|
14
19
|
@ReactModule(name = SmileIDEnhancedDocumentVerificationViewManager.NAME)
|
|
15
20
|
class SmileIDEnhancedDocumentVerificationViewManager(
|
|
16
21
|
private val reactApplicationContext: ReactApplicationContext
|
|
17
|
-
) :
|
|
22
|
+
) : BaseSmileIDViewManager<SmileIDEnhancedDocumentVerificationView>(reactApplicationContext) {
|
|
18
23
|
|
|
19
24
|
override fun getName(): String = NAME
|
|
20
25
|
|
|
21
|
-
override fun
|
|
22
|
-
return
|
|
23
|
-
"onSmileResult" to mapOf(
|
|
24
|
-
"phasedRegistrationNames" to mapOf(
|
|
25
|
-
"bubbled" to "onResult"
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
override fun getCommandsMap(): Map<String, Int> {
|
|
32
|
-
return mapOf("setParams" to COMMAND_SET_PARAMS)
|
|
26
|
+
override fun createSmileView(): SmileIDEnhancedDocumentVerificationView {
|
|
27
|
+
return SmileIDEnhancedDocumentVerificationView(reactApplicationContext)
|
|
33
28
|
}
|
|
34
29
|
|
|
35
|
-
override fun
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
view.showInstructions = params.getBoolOrDefault("showInstructions", true)
|
|
56
|
-
view.allowGalleryUpload = params.getBoolOrDefault("allowGalleryUpload", false)
|
|
57
|
-
view.documentType = params.getStringOrDefault("documentType")
|
|
58
|
-
view.idAspectRatio = params.getFloatOrDefault("idAspectRatio")
|
|
59
|
-
view.allowNewEnroll = params.getBoolOrDefault("allowNewEnroll", false)
|
|
60
|
-
view.skipApiSubmission = params.getBoolOrDefault("skipApiSubmission", false)
|
|
61
|
-
view.renderContent()
|
|
62
|
-
}
|
|
63
|
-
}
|
|
30
|
+
override fun applyArgs(view: SmileIDEnhancedDocumentVerificationView, args: ReadableMap?) {
|
|
31
|
+
args?.let {
|
|
32
|
+
val countryCode = it.getString("countryCode")
|
|
33
|
+
?: return view.emitFailure(IllegalArgumentException("countryCode is required to run Enhanced Document Verification"))
|
|
34
|
+
val consentInformationMap = it.getMap("consentInformation")
|
|
35
|
+
?: return view.emitFailure(IllegalArgumentException("consentInformation is required to run Biometric KYC"))
|
|
36
|
+
view.consentInformation = consentInformationMap.toConsentInfo()
|
|
37
|
+
view.extraPartnerParams = it.getImmutableMapOrDefault("extraPartnerParams")
|
|
38
|
+
view.userId = it.getStringOrDefault("userId")
|
|
39
|
+
view.jobId = it.getStringOrDefault("jobId")
|
|
40
|
+
view.countryCode = countryCode
|
|
41
|
+
view.allowAgentMode = it.getBoolOrDefault("allowAgentMode", false)
|
|
42
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
43
|
+
view.captureBothSides = it.getBoolOrDefault("captureBothSides", false)
|
|
44
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
45
|
+
view.allowGalleryUpload = it.getBoolOrDefault("allowGalleryUpload", false)
|
|
46
|
+
view.documentType = it.getStringOrDefault("documentType")
|
|
47
|
+
view.idAspectRatio = it.getFloatOrDefault("idAspectRatio")
|
|
48
|
+
view.allowNewEnroll = it.getBoolOrDefault("allowNewEnroll", false)
|
|
49
|
+
view.skipApiSubmission = it.getBoolOrDefault("skipApiSubmission", false)
|
|
64
50
|
}
|
|
65
51
|
}
|
|
66
52
|
|
|
67
|
-
override fun createViewInstance(p0: ThemedReactContext): SmileIDEnhancedDocumentVerificationView {
|
|
68
|
-
return SmileIDEnhancedDocumentVerificationView(reactApplicationContext)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
53
|
companion object {
|
|
72
54
|
const val NAME = "SmileIDEnhancedDocumentVerificationView"
|
|
73
|
-
const val COMMAND_SET_PARAMS = 3
|
|
74
55
|
}
|
|
75
56
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
package com.smileidentity.react.viewmanagers
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
+
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
6
|
+
import com.facebook.react.module.annotations.ReactModule
|
|
7
|
+
import com.facebook.react.uimanager.SimpleViewManager
|
|
8
|
+
import com.facebook.react.uimanager.ThemedReactContext
|
|
9
|
+
import com.smileidentity.react.utils.getBoolOrDefault
|
|
10
|
+
import com.smileidentity.react.utils.getImmutableMapOrDefault
|
|
11
|
+
import com.smileidentity.react.utils.getStringOrDefault
|
|
12
|
+
import com.smileidentity.react.views.SmileIDSmartSelfieAuthenticationEnhancedView
|
|
13
|
+
import com.smileidentity.react.views.SmileIDSmartSelfieAuthenticationView
|
|
14
|
+
|
|
15
|
+
@ReactModule(name = SmileIDSmartSelfieAuthenticationEnhancedViewManager.NAME)
|
|
16
|
+
class SmileIDSmartSelfieAuthenticationEnhancedViewManager(
|
|
17
|
+
private val reactApplicationContext: ReactApplicationContext
|
|
18
|
+
) : BaseSmileIDViewManager<SmileIDSmartSelfieAuthenticationEnhancedView>(reactApplicationContext) {
|
|
19
|
+
|
|
20
|
+
override fun getName(): String = NAME
|
|
21
|
+
|
|
22
|
+
override fun createSmileView(): SmileIDSmartSelfieAuthenticationEnhancedView {
|
|
23
|
+
return SmileIDSmartSelfieAuthenticationEnhancedView(reactApplicationContext)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
override fun applyArgs(view: SmileIDSmartSelfieAuthenticationEnhancedView, args: ReadableMap?) {
|
|
27
|
+
args?.let {
|
|
28
|
+
view.extraPartnerParams = it.getImmutableMapOrDefault("extraPartnerParams")
|
|
29
|
+
view.userId = it.getStringOrDefault("userId")
|
|
30
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
31
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
32
|
+
view.allowNewEnroll = it.getBoolOrDefault("allowNewEnroll", false)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
companion object {
|
|
37
|
+
const val NAME = "SmileIDSmartSelfieAuthenticationEnhancedView"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -2,6 +2,7 @@ package com.smileidentity.react.viewmanagers
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
6
|
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
@@ -9,59 +10,34 @@ import com.smileidentity.react.utils.getBoolOrDefault
|
|
|
9
10
|
import com.smileidentity.react.utils.getImmutableMapOrDefault
|
|
10
11
|
import com.smileidentity.react.utils.getStringOrDefault
|
|
11
12
|
import com.smileidentity.react.views.SmileIDSmartSelfieAuthenticationView
|
|
13
|
+
import com.smileidentity.react.views.SmileIDSmartSelfieCaptureView
|
|
14
|
+
import com.smileidentity.react.views.SmileIDSmartSelfieEnrollmentEnhancedView
|
|
12
15
|
|
|
13
16
|
@ReactModule(name = SmileIDSmartSelfieAuthenticationViewManager.NAME)
|
|
14
17
|
class SmileIDSmartSelfieAuthenticationViewManager(
|
|
15
18
|
private val reactApplicationContext: ReactApplicationContext
|
|
16
|
-
) :
|
|
19
|
+
) : BaseSmileIDViewManager<SmileIDSmartSelfieAuthenticationView>(reactApplicationContext) {
|
|
17
20
|
|
|
18
21
|
override fun getName(): String = NAME
|
|
19
22
|
|
|
20
|
-
override fun
|
|
21
|
-
return
|
|
22
|
-
"onSmileResult" to mapOf(
|
|
23
|
-
"phasedRegistrationNames" to mapOf(
|
|
24
|
-
"bubbled" to "onResult"
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun getCommandsMap(): Map<String, Int> {
|
|
31
|
-
return mapOf("setParams" to COMMAND_SET_PARAMS)
|
|
23
|
+
override fun createSmileView(): SmileIDSmartSelfieAuthenticationView {
|
|
24
|
+
return SmileIDSmartSelfieAuthenticationView(reactApplicationContext)
|
|
32
25
|
}
|
|
33
26
|
|
|
34
|
-
override fun
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
params?.let {
|
|
45
|
-
view.extraPartnerParams = params.getImmutableMapOrDefault("extraPartnerParams")
|
|
46
|
-
view.userId = params.getStringOrDefault("userId")
|
|
47
|
-
view.jobId = params.getStringOrDefault("jobId")
|
|
48
|
-
view.allowAgentMode = params.getBoolOrDefault("allowAgentMode", false)
|
|
49
|
-
view.showAttribution = params.getBoolOrDefault("showAttribution", true)
|
|
50
|
-
view.showInstructions = params.getBoolOrDefault("showInstructions", true)
|
|
51
|
-
view.allowNewEnroll = params.getBoolOrDefault("allowNewEnroll", false)
|
|
52
|
-
view.skipApiSubmission = params.getBoolOrDefault("skipApiSubmission", false)
|
|
53
|
-
view.renderContent()
|
|
54
|
-
}
|
|
55
|
-
}
|
|
27
|
+
override fun applyArgs(view: SmileIDSmartSelfieAuthenticationView, args: ReadableMap?) {
|
|
28
|
+
args?.let {
|
|
29
|
+
view.extraPartnerParams = it.getImmutableMapOrDefault("extraPartnerParams")
|
|
30
|
+
view.userId = it.getStringOrDefault("userId")
|
|
31
|
+
view.jobId = it.getStringOrDefault("jobId")
|
|
32
|
+
view.allowAgentMode = it.getBoolOrDefault("allowAgentMode", false)
|
|
33
|
+
view.showAttribution = it.getBoolOrDefault("showAttribution", true)
|
|
34
|
+
view.showInstructions = it.getBoolOrDefault("showInstructions", true)
|
|
35
|
+
view.allowNewEnroll = it.getBoolOrDefault("allowNewEnroll", false)
|
|
36
|
+
view.skipApiSubmission = it.getBoolOrDefault("skipApiSubmission", false)
|
|
56
37
|
}
|
|
57
38
|
}
|
|
58
39
|
|
|
59
|
-
override fun createViewInstance(p0: ThemedReactContext): SmileIDSmartSelfieAuthenticationView {
|
|
60
|
-
return SmileIDSmartSelfieAuthenticationView(reactApplicationContext)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
40
|
companion object {
|
|
64
41
|
const val NAME = "SmileIDSmartSelfieAuthenticationView"
|
|
65
|
-
const val COMMAND_SET_PARAMS = 2
|
|
66
42
|
}
|
|
67
43
|
}
|