react-native-plaid-link-sdk 12.8.3 → 13.0.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/CHANGELOG.md +1470 -0
- package/README.md +217 -239
- package/V13_MIGRATION_GUIDE.md +470 -0
- package/android/build.gradle +30 -98
- package/android/src/main/AndroidManifest.xml +1 -8
- package/android/src/main/java/expo/modules/plaidlinksdk/PlaidEmbeddedResultDispatcher.kt +19 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/PlaidResultMappers.kt +217 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +5 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkModule.kt +183 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkView.kt +69 -0
- package/build/PlaidEmbeddedSearchView.d.ts +12 -0
- package/build/PlaidEmbeddedSearchView.d.ts.map +1 -0
- package/build/PlaidEmbeddedSearchView.js +8 -0
- package/build/PlaidEmbeddedSearchView.js.map +1 -0
- package/{dist/src/Types.d.ts → build/ReactNativePlaidLinkSdk.types.d.ts} +78 -47
- package/build/ReactNativePlaidLinkSdk.types.d.ts.map +1 -0
- package/{dist/build → build}/ReactNativePlaidLinkSdk.types.js +82 -71
- package/build/ReactNativePlaidLinkSdk.types.js.map +1 -0
- package/build/ReactNativePlaidLinkSdkModule.d.ts +16 -0
- package/build/ReactNativePlaidLinkSdkModule.d.ts.map +1 -0
- package/{dist/build → build}/ReactNativePlaidLinkSdkModule.js +1 -1
- package/build/ReactNativePlaidLinkSdkModule.js.map +1 -0
- package/build/index.d.ts +13 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +82 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/Frameworks/LinkKit.xcframework/Info.plist +44 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +327 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +53695 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +201 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +650 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +53695 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +53695 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +759 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +256 -0
- package/ios/ReactNativePlaidLinkSdk.podspec +29 -0
- package/ios/src/PlaidEmbeddedSearchView.swift +101 -0
- package/ios/src/RNPlaidLinkSdkVersion.swift +19 -0
- package/ios/src/ReactNativePlaidLinkSdkModule.swift +555 -0
- package/package.json +65 -73
- package/src/PlaidEmbeddedSearchView.tsx +35 -0
- package/src/ReactNativePlaidLinkSdk.types.ts +894 -0
- package/src/ReactNativePlaidLinkSdkModule.ts +31 -0
- package/src/index.ts +166 -22
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/android/gradle.properties +0 -31
- package/android/gradlew +0 -174
- package/android/gradlew.bat +0 -89
- package/android/src/main/java/com/plaid/ActivityResultHandler.java +0 -7
- package/android/src/main/java/com/plaid/ActivityResultManager.java +0 -15
- package/android/src/main/java/com/plaid/GlobalFunctions.kt +0 -42
- package/android/src/main/java/com/plaid/PLKEmbeddedView.kt +0 -161
- package/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt +0 -50
- package/android/src/main/java/com/plaid/PlaidModule.kt +0 -291
- package/android/src/main/java/com/plaid/PlaidPackage.java +0 -117
- package/android/src/main/java/com/plaid/gson/PlaidJsonConverter.kt +0 -94
- package/android/src/main/java/com/plaid/gson/RNAccountAdapter.kt +0 -48
- package/android/src/main/java/com/plaid/gson/RNEventMetadataAdapter.kt +0 -49
- package/android/src/main/java/com/plaid/gson/RNLinkInstitutionAdapter.kt +0 -34
- package/android/src/main/res/layout/plk_embedded_view.xml +0 -5
- package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerDelegate.java +0 -35
- package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerInterface.java +0 -18
- package/android/src/paper/java/com/plaid/NativePlaidLinkModuleAndroidSpec.java +0 -64
- package/android/src/paper/java/com/plaid/NativePlaidLinkModuleiOSSpec.java +0 -59
- package/dist/build/EmbeddedLink/EmbeddedLinkView.d.ts +0 -2
- package/dist/build/EmbeddedLink/EmbeddedLinkView.js +0 -56
- package/dist/build/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
- package/dist/build/EmbeddedLink/EmbeddedLinkView.web.js +0 -2
- package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
- package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.js +0 -3
- package/dist/build/PlaidEmbeddedSearchView.d.ts +0 -2
- package/dist/build/PlaidEmbeddedSearchView.js +0 -25
- package/dist/build/PlaidLink.d.ts +0 -7
- package/dist/build/PlaidLink.js +0 -137
- package/dist/build/ReactNativePlaidLinkSdk.types.d.ts +0 -108
- package/dist/build/ReactNativePlaidLinkSdkModule.d.ts +0 -2
- package/dist/build/ReactNativePlaidLinkSdkView.d.ts +0 -2
- package/dist/build/ReactNativePlaidLinkSdkView.js +0 -7
- package/dist/build/Types.d.ts +0 -108
- package/dist/build/Types.js +0 -462
- package/dist/build/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -2
- package/dist/build/fabric/EmbeddedLinkViewNativeComponent.js +0 -3
- package/dist/build/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -2
- package/dist/build/fabric/NativePlaidLinkModuleAndroid.js +0 -5
- package/dist/build/fabric/NativePlaidLinkModuleiOS.d.ts +0 -2
- package/dist/build/fabric/NativePlaidLinkModuleiOS.js +0 -5
- package/dist/build/fabric/fabricUtils.d.ts +0 -1
- package/dist/build/fabric/fabricUtils.js +0 -2
- package/dist/build/index.d.ts +0 -14
- package/dist/build/index.js +0 -154
- package/dist/scripts/check-package-entrypoints.d.ts +0 -1
- package/dist/scripts/check-package-entrypoints.js +0 -61
- package/dist/src/EmbeddedLink/EmbeddedLinkView.d.ts +0 -13
- package/dist/src/EmbeddedLink/EmbeddedLinkView.js +0 -55
- package/dist/src/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
- package/dist/src/EmbeddedLink/EmbeddedLinkView.web.js +0 -1
- package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
- package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.js +0 -2
- package/dist/src/PlaidLink.d.ts +0 -34
- package/dist/src/PlaidLink.js +0 -136
- package/dist/src/Types.js +0 -463
- package/dist/src/__tests__/Types.tests.d.ts +0 -1
- package/dist/src/__tests__/Types.tests.js +0 -14
- package/dist/src/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -15
- package/dist/src/fabric/EmbeddedLinkViewNativeComponent.js +0 -2
- package/dist/src/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -15
- package/dist/src/fabric/NativePlaidLinkModuleAndroid.js +0 -4
- package/dist/src/fabric/NativePlaidLinkModuleiOS.d.ts +0 -15
- package/dist/src/fabric/NativePlaidLinkModuleiOS.js +0 -4
- package/dist/src/fabric/fabricUtils.d.ts +0 -1
- package/dist/src/fabric/fabricUtils.js +0 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -5
- package/ios/PLKEmbeddedView.m +0 -7
- package/ios/PLKEmbeddedView.swift +0 -116
- package/ios/PLKEmbeddedViewComponentView.h +0 -28
- package/ios/PLKEmbeddedViewComponentView.mm +0 -91
- package/ios/PLKEmbeddedViewManager.swift +0 -14
- package/ios/PLKFabricHelpers.h +0 -116
- package/ios/RNLinksdk-Bridging-Header.h +0 -8
- package/ios/RNLinksdk.h +0 -19
- package/ios/RNLinksdk.mm +0 -732
- package/ios/RNPlaidHelper.h +0 -15
- package/ios/RNPlaidHelper.m +0 -33
- package/ios/react_native_plaid_link_sdk.h +0 -2
- package/react-native-plaid-link-sdk.podspec +0 -40
- package/src/EmbeddedLink/EmbeddedLinkView.tsx +0 -95
- package/src/EmbeddedLink/EmbeddedLinkView.web.tsx +0 -5
- package/src/EmbeddedLink/NativeEmbeddedLinkView.tsx +0 -3
- package/src/PlaidLink.tsx +0 -167
- package/src/Types.ts +0 -634
- package/src/__tests__/Types.tests.ts +0 -15
- package/src/fabric/EmbeddedLinkViewNativeComponent.ts +0 -24
- package/src/fabric/NativePlaidLinkModuleAndroid.ts +0 -32
- package/src/fabric/NativePlaidLinkModuleiOS.ts +0 -33
- package/src/fabric/fabricUtils.ts +0 -2
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
package com.plaid
|
|
2
|
-
|
|
3
|
-
import android.app.Application
|
|
4
|
-
import android.content.Context
|
|
5
|
-
import android.content.Intent
|
|
6
|
-
import android.util.AttributeSet
|
|
7
|
-
import android.util.Log
|
|
8
|
-
import android.view.View
|
|
9
|
-
import android.widget.FrameLayout
|
|
10
|
-
import com.facebook.react.bridge.Arguments
|
|
11
|
-
import com.facebook.react.bridge.NativeModule
|
|
12
|
-
import com.facebook.react.bridge.ReactContext
|
|
13
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
14
|
-
import com.facebook.react.uimanager.events.RCTEventEmitter
|
|
15
|
-
import com.plaid.gson.PlaidJsonConverter
|
|
16
|
-
import com.plaid.link.OpenPlaidLink
|
|
17
|
-
import com.plaid.link.Plaid.create
|
|
18
|
-
import com.plaid.link.Plaid.createLinkEmbeddedView
|
|
19
|
-
import com.plaid.link.Plaid.setLinkEventListener
|
|
20
|
-
import com.plaid.link.configuration.LinkTokenConfiguration
|
|
21
|
-
import com.plaid.link.configuration.LinkTokenConfiguration.Builder
|
|
22
|
-
import com.plaid.link.event.LinkEvent
|
|
23
|
-
import com.plaid.link.result.LinkExit
|
|
24
|
-
import com.plaid.link.result.LinkSuccess
|
|
25
|
-
import org.json.JSONException
|
|
26
|
-
import org.json.JSONObject
|
|
27
|
-
|
|
28
|
-
class PLKEmbeddedView @JvmOverloads constructor(
|
|
29
|
-
context: Context,
|
|
30
|
-
attrs: AttributeSet? = null
|
|
31
|
-
) : FrameLayout(context, attrs), ActivityResultHandler {
|
|
32
|
-
private val themedReactContext: ThemedReactContext = context as ThemedReactContext
|
|
33
|
-
private val TAG = "EmbeddedSearch"
|
|
34
|
-
private val LINK_ACTIVITY_REQUEST_CODE = 3364
|
|
35
|
-
private val EVENT_NAME = "OnEmbeddedEvent"
|
|
36
|
-
private val jsonConverter = PlaidJsonConverter()
|
|
37
|
-
|
|
38
|
-
init {
|
|
39
|
-
inflate(context, R.layout.plk_embedded_view, this)
|
|
40
|
-
setupOnEventListener()
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
fun setToken(token: String) {
|
|
44
|
-
val embeddedView = createEmbedded(token)
|
|
45
|
-
val frameLayout = findViewById<FrameLayout>(R.id.embedded_frame_layout)
|
|
46
|
-
frameLayout.addView(embeddedView)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
override fun onAttachedToWindow() {
|
|
50
|
-
super.onAttachedToWindow()
|
|
51
|
-
val nativeModule: NativeModule? = themedReactContext.getNativeModule(PlaidModule::class.java)
|
|
52
|
-
if (nativeModule is PlaidModule) {
|
|
53
|
-
// Add our handler so we can get the callback result.
|
|
54
|
-
nativeModule.mActivityResultManager[LINK_ACTIVITY_REQUEST_CODE] = this
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
override fun onDetachedFromWindow() {
|
|
59
|
-
super.onDetachedFromWindow()
|
|
60
|
-
val nativeModule: NativeModule? = themedReactContext.getNativeModule(PlaidModule::class.java)
|
|
61
|
-
if (nativeModule is PlaidModule) {
|
|
62
|
-
// Remove the handler so the module can handle it.
|
|
63
|
-
nativeModule.mActivityResultManager.remove(LINK_ACTIVITY_REQUEST_CODE)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
private fun createEmbedded(token: String): View? {
|
|
68
|
-
val linkTokenConfiguration: LinkTokenConfiguration = Builder().token(token).build()
|
|
69
|
-
val activity = themedReactContext.currentActivity ?: return null
|
|
70
|
-
return createLinkEmbeddedView(activity, linkTokenConfiguration, { config: LinkTokenConfiguration? ->
|
|
71
|
-
val plaidHandler = create((themedReactContext.applicationContext as Application), config!!)
|
|
72
|
-
val currentActivity = themedReactContext.currentActivity
|
|
73
|
-
if (currentActivity != null) {
|
|
74
|
-
plaidHandler.open(currentActivity)
|
|
75
|
-
}
|
|
76
|
-
}) { linkExit: LinkExit ->
|
|
77
|
-
handleLinkExit(linkExit)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
private fun setupOnEventListener() {
|
|
82
|
-
setLinkEventListener { event: LinkEvent ->
|
|
83
|
-
try {
|
|
84
|
-
val jsonString = jsonConverter.convert(event)
|
|
85
|
-
val jsonObject = JSONObject(jsonString)
|
|
86
|
-
val eventMap = convertJsonToMap(jsonObject)
|
|
87
|
-
val eventName = PLKEmbeddedViewManager.EVENT_NAME
|
|
88
|
-
eventMap.putString("embeddedEventName", "onEvent")
|
|
89
|
-
val reactContext = context as ReactContext
|
|
90
|
-
reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(id, eventName, eventMap)
|
|
91
|
-
return@setLinkEventListener
|
|
92
|
-
} catch (e: JSONException) {
|
|
93
|
-
Log.e(TAG, "JSON Exception: $e")
|
|
94
|
-
return@setLinkEventListener
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
override fun handleActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
|
|
100
|
-
if (requestCode == LINK_ACTIVITY_REQUEST_CODE) {
|
|
101
|
-
val openPlaidLink = OpenPlaidLink()
|
|
102
|
-
when (val linkResult = openPlaidLink.parseResult(resultCode, data)) {
|
|
103
|
-
is LinkSuccess -> {
|
|
104
|
-
try {
|
|
105
|
-
val jsonString = jsonConverter.convert(linkResult)
|
|
106
|
-
val jsonObject = JSONObject(jsonString)
|
|
107
|
-
val successMap = convertJsonToMap(jsonObject)
|
|
108
|
-
val eventName = PLKEmbeddedViewManager.EVENT_NAME
|
|
109
|
-
successMap.putString("embeddedEventName", "onSuccess")
|
|
110
|
-
val reactContext = context as ReactContext
|
|
111
|
-
reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(id, eventName, successMap)
|
|
112
|
-
} catch (e: JSONException) {
|
|
113
|
-
Log.e(TAG, "JSON Exception parsing LinkSuccess")
|
|
114
|
-
sendLinkExitFrom(e)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
is LinkExit -> {
|
|
118
|
-
handleLinkExit(linkResult)
|
|
119
|
-
}
|
|
120
|
-
else -> {
|
|
121
|
-
Log.e(TAG, "Unhandled LinkResult")
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
private fun handleLinkExit(linkExit: LinkExit) {
|
|
128
|
-
try {
|
|
129
|
-
val jsonString = jsonConverter.convert(linkExit)
|
|
130
|
-
val jsonObject = JSONObject(jsonString)
|
|
131
|
-
val exitMap = convertJsonToMap(jsonObject)
|
|
132
|
-
val eventName = PLKEmbeddedViewManager.EVENT_NAME
|
|
133
|
-
exitMap.putString("embeddedEventName", "onExit")
|
|
134
|
-
val reactContext = context as ReactContext
|
|
135
|
-
reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(id, eventName, exitMap)
|
|
136
|
-
} catch (e: JSONException) {
|
|
137
|
-
Log.e(TAG, "JSON Exception: $e")
|
|
138
|
-
sendLinkExitFrom(e)
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
private fun sendLinkExitFrom(e: JSONException) {
|
|
143
|
-
val map = Arguments.createMap()
|
|
144
|
-
val errorMap = Arguments.createMap()
|
|
145
|
-
val exitMetadataMap = Arguments.createMap()
|
|
146
|
-
errorMap.putString("error_message", e.message)
|
|
147
|
-
errorMap.putString("json", e.message)
|
|
148
|
-
errorMap.putString("error_type", "JSONException")
|
|
149
|
-
errorMap.putInt("error_code", 499)
|
|
150
|
-
exitMetadataMap.putString("error_message", e.message)
|
|
151
|
-
exitMetadataMap.putString("json", e.message)
|
|
152
|
-
exitMetadataMap.putString("error_type", "JSONException")
|
|
153
|
-
exitMetadataMap.putInt("error_code", 499)
|
|
154
|
-
map.putString("eventName", "EXIT")
|
|
155
|
-
map.putMap("metadata", exitMetadataMap)
|
|
156
|
-
map.putMap("error", errorMap)
|
|
157
|
-
map.putString("embeddedEventName", "onExit")
|
|
158
|
-
val reactContext = context as ReactContext
|
|
159
|
-
reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(id, PLKEmbeddedViewManager.EVENT_NAME, map)
|
|
160
|
-
}
|
|
161
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
package com.plaid
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.module.annotations.ReactModule
|
|
4
|
-
import com.facebook.react.uimanager.SimpleViewManager
|
|
5
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
6
|
-
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
7
|
-
import com.facebook.react.uimanager.annotations.ReactProp
|
|
8
|
-
import com.facebook.react.viewmanagers.PLKEmbeddedViewManagerDelegate
|
|
9
|
-
import com.facebook.react.viewmanagers.PLKEmbeddedViewManagerInterface
|
|
10
|
-
|
|
11
|
-
@ReactModule(name = PLKEmbeddedViewManager.REACT_CLASS)
|
|
12
|
-
class PLKEmbeddedViewManager : SimpleViewManager<PLKEmbeddedView>(),
|
|
13
|
-
PLKEmbeddedViewManagerInterface<PLKEmbeddedView> {
|
|
14
|
-
private val delegate: ViewManagerDelegate<PLKEmbeddedView>
|
|
15
|
-
|
|
16
|
-
init {
|
|
17
|
-
delegate = PLKEmbeddedViewManagerDelegate(this)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
override fun getName(): String {
|
|
21
|
-
return REACT_CLASS
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public override fun createViewInstance(context: ThemedReactContext): PLKEmbeddedView {
|
|
25
|
-
return PLKEmbeddedView(context)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@ReactProp(name = "token")
|
|
29
|
-
override fun setToken(view: PLKEmbeddedView, token: String?) {
|
|
30
|
-
view.setToken(token ?: "")
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
override fun setIOSPresentationStyle(view: PLKEmbeddedView, value: String?) {
|
|
34
|
-
// Unsupported on Android
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
override fun getExportedCustomBubblingEventTypeConstants(): Map<String, Any> {
|
|
38
|
-
return mutableMapOf(
|
|
39
|
-
EVENT_NAME to mutableMapOf(
|
|
40
|
-
"phasedRegistrationNames" to mutableMapOf(
|
|
41
|
-
"bubbled" to EVENT_NAME
|
|
42
|
-
)
|
|
43
|
-
))
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
companion object {
|
|
47
|
-
const val REACT_CLASS = "PLKEmbeddedView"
|
|
48
|
-
const val EVENT_NAME = "onEmbeddedEvent"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
package com.plaid
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import android.app.Application
|
|
5
|
-
import android.content.Intent
|
|
6
|
-
import android.os.Handler
|
|
7
|
-
import android.os.Looper
|
|
8
|
-
import android.text.TextUtils
|
|
9
|
-
import android.util.Log
|
|
10
|
-
import com.facebook.react.bridge.ActivityEventListener
|
|
11
|
-
import com.facebook.react.bridge.Callback
|
|
12
|
-
import com.facebook.react.bridge.Promise
|
|
13
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
14
|
-
import com.facebook.react.bridge.ReactMethod
|
|
15
|
-
import com.facebook.react.bridge.ReadableMap
|
|
16
|
-
import com.facebook.react.module.annotations.ReactModule
|
|
17
|
-
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
18
|
-
import com.plaid.gson.PlaidJsonConverter
|
|
19
|
-
import com.plaid.link.Plaid
|
|
20
|
-
import com.plaid.link.PlaidHandler
|
|
21
|
-
import com.plaid.link.OnLoadCallback
|
|
22
|
-
import com.plaid.link.configuration.LinkLogLevel
|
|
23
|
-
import com.plaid.link.configuration.LinkTokenConfiguration
|
|
24
|
-
import com.plaid.link.event.LinkEvent
|
|
25
|
-
import com.plaid.link.exception.LinkException
|
|
26
|
-
import com.plaid.link.result.LinkResultHandler
|
|
27
|
-
import com.plaid.link.SubmissionData
|
|
28
|
-
import org.json.JSONException
|
|
29
|
-
import org.json.JSONObject
|
|
30
|
-
import java.util.concurrent.CountDownLatch
|
|
31
|
-
import java.util.concurrent.TimeUnit
|
|
32
|
-
|
|
33
|
-
@ReactModule(name = PlaidModule.NAME)
|
|
34
|
-
class PlaidModule internal constructor(reactContext: ReactApplicationContext) :
|
|
35
|
-
NativePlaidLinkModuleAndroidSpec(reactContext), ActivityEventListener {
|
|
36
|
-
|
|
37
|
-
val mActivityResultManager by lazy { ActivityResultManager() }
|
|
38
|
-
|
|
39
|
-
private val jsonConverter by lazy { PlaidJsonConverter() }
|
|
40
|
-
|
|
41
|
-
private var onSuccessCallback: Callback? = null
|
|
42
|
-
private var onExitCallback: Callback? = null
|
|
43
|
-
|
|
44
|
-
private var plaidHandler: PlaidHandler? = null
|
|
45
|
-
|
|
46
|
-
companion object {
|
|
47
|
-
private const val LINK_TOKEN_PREFIX = "link"
|
|
48
|
-
|
|
49
|
-
const val NAME = "PlaidAndroid"
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
override fun getName(): String {
|
|
53
|
-
return NAME
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
override fun initialize() {
|
|
57
|
-
super.initialize()
|
|
58
|
-
reactApplicationContext.addActivityEventListener(this)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
override fun invalidate() {
|
|
62
|
-
super.invalidate()
|
|
63
|
-
reactApplicationContext.removeActivityEventListener(this)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private fun getLinkTokenConfiguration(
|
|
67
|
-
token: String,
|
|
68
|
-
noLoadingState: Boolean,
|
|
69
|
-
logLevel: LinkLogLevel,
|
|
70
|
-
): LinkTokenConfiguration? {
|
|
71
|
-
if (token == null) {
|
|
72
|
-
return null
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (!token.startsWith(LINK_TOKEN_PREFIX)) {
|
|
76
|
-
return null
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
val builder = LinkTokenConfiguration.Builder()
|
|
80
|
-
.token(token)
|
|
81
|
-
.logLevel(logLevel)
|
|
82
|
-
.noLoadingState(noLoadingState)
|
|
83
|
-
|
|
84
|
-
return builder.build()
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@ReactMethod
|
|
88
|
-
override fun submit(phoneNumber: String?, dateOfBirth: String?, params: ReadableMap?) {
|
|
89
|
-
if (plaidHandler != null) {
|
|
90
|
-
val paramsMap: Map<String, String>? = params?.let { map ->
|
|
91
|
-
map.toHashMap().mapNotNull { (key, value) ->
|
|
92
|
-
if (value is String) key to value else null
|
|
93
|
-
}.toMap()
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
val submissionData = SubmissionData(
|
|
97
|
-
phoneNumber = phoneNumber,
|
|
98
|
-
dateOfBirth = dateOfBirth,
|
|
99
|
-
params = paramsMap
|
|
100
|
-
)
|
|
101
|
-
plaidHandler?.submit(submissionData)
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@ReactMethod
|
|
106
|
-
override fun createPlaidLink(
|
|
107
|
-
token: String,
|
|
108
|
-
noLoadingState: Boolean,
|
|
109
|
-
logLevel: String,
|
|
110
|
-
onLoad: Callback,
|
|
111
|
-
) {
|
|
112
|
-
val tokenConfiguration = getLinkTokenConfiguration(token, noLoadingState, getLogLevel(logLevel))
|
|
113
|
-
if (tokenConfiguration == null) {
|
|
114
|
-
throw LinkException("Unable to open link, please check that your configuration is valid")
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Set the event listener here instead of in open for Layer use cases.
|
|
118
|
-
try {
|
|
119
|
-
Plaid.setLinkEventListener { linkEvent: LinkEvent ->
|
|
120
|
-
var json = jsonConverter.convert(linkEvent)
|
|
121
|
-
val eventMap = convertJsonToMap(JSONObject(json))
|
|
122
|
-
reactApplicationContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
123
|
-
.emit("onEvent", eventMap)
|
|
124
|
-
}
|
|
125
|
-
} catch (ex: JSONException) {
|
|
126
|
-
Log.e("PlaidModule", ex.toString())
|
|
127
|
-
throw ex
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Create Plaid handler.
|
|
131
|
-
this.plaidHandler = Plaid.create(
|
|
132
|
-
reactApplicationContext.getApplicationContext() as Application,
|
|
133
|
-
tokenConfiguration,
|
|
134
|
-
onLoad = OnLoadCallback {
|
|
135
|
-
try {
|
|
136
|
-
onLoad.invoke()
|
|
137
|
-
} catch (e: Exception) {
|
|
138
|
-
Log.e("PlaidModule", "onLoad callback failed", e)
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
)
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
@ReactMethod
|
|
145
|
-
override fun open(onSuccessCallback: Callback, onExitCallback: Callback) {
|
|
146
|
-
val activity = reactApplicationContext.currentActivity ?: throw IllegalStateException("Current activity is null")
|
|
147
|
-
|
|
148
|
-
plaidHandler?.let { handler ->
|
|
149
|
-
// Work with nonNullValue here
|
|
150
|
-
this.onSuccessCallback = onSuccessCallback
|
|
151
|
-
this.onExitCallback = onExitCallback
|
|
152
|
-
handler.open(activity)
|
|
153
|
-
} ?: run {
|
|
154
|
-
// Handler is nil.
|
|
155
|
-
throw LinkException("Create must be called before open.")
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@ReactMethod
|
|
160
|
-
override fun destroy(promise: Promise) {
|
|
161
|
-
val latch = CountDownLatch(1)
|
|
162
|
-
|
|
163
|
-
Handler(Looper.getMainLooper()).post {
|
|
164
|
-
try {
|
|
165
|
-
Plaid.destroy()
|
|
166
|
-
} catch (e: Exception) {
|
|
167
|
-
promise.reject("DESTROY_FAILED", "Failed to destroy Plaid", e)
|
|
168
|
-
latch.countDown()
|
|
169
|
-
return@post
|
|
170
|
-
}
|
|
171
|
-
latch.countDown()
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
try {
|
|
175
|
-
// Wait for main-thread work to finish (max 5 seconds)
|
|
176
|
-
if (!latch.await(5, TimeUnit.SECONDS)) {
|
|
177
|
-
promise.reject("TIMEOUT", "Timed out waiting for destroy() to complete.")
|
|
178
|
-
} else {
|
|
179
|
-
promise.resolve(null)
|
|
180
|
-
}
|
|
181
|
-
} catch (e: InterruptedException) {
|
|
182
|
-
promise.reject("INTERRUPTED", "Thread was interrupted", e)
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
@ReactMethod
|
|
188
|
-
@Suppress("unused")
|
|
189
|
-
override fun startLinkActivityForResult(
|
|
190
|
-
token: String,
|
|
191
|
-
noLoadingState: Boolean,
|
|
192
|
-
logLevel: String,
|
|
193
|
-
onSuccessCallback: Callback,
|
|
194
|
-
onExitCallback: Callback
|
|
195
|
-
) {
|
|
196
|
-
val activity = reactApplicationContext.currentActivity ?: throw IllegalStateException("Current activity is null")
|
|
197
|
-
this.onSuccessCallback = onSuccessCallback
|
|
198
|
-
this.onExitCallback = onExitCallback
|
|
199
|
-
|
|
200
|
-
try {
|
|
201
|
-
Plaid.setLinkEventListener { linkEvent: LinkEvent ->
|
|
202
|
-
var json = jsonConverter.convert(linkEvent)
|
|
203
|
-
val eventMap = convertJsonToMap(JSONObject(json))
|
|
204
|
-
reactApplicationContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
205
|
-
.emit("onEvent", eventMap)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
val tokenConfiguration = getLinkTokenConfiguration(token, noLoadingState, getLogLevel(logLevel))
|
|
209
|
-
tokenConfiguration?.let {
|
|
210
|
-
Plaid.create(
|
|
211
|
-
reactApplicationContext.getApplicationContext() as Application,
|
|
212
|
-
it
|
|
213
|
-
).open(activity)
|
|
214
|
-
return
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
throw LinkException("Unable to open link, please check that your configuration is valid")
|
|
218
|
-
} catch (ex: JSONException) {
|
|
219
|
-
Log.e("PlaidModule", ex.toString())
|
|
220
|
-
throw ex
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
override fun addListener(eventName: String?) = Unit
|
|
225
|
-
|
|
226
|
-
override fun removeListeners(count: Double) = Unit
|
|
227
|
-
|
|
228
|
-
private fun maybeGetStringField(obj: JSONObject, fieldName: String): String? {
|
|
229
|
-
if (obj.has(fieldName) && !TextUtils.isEmpty(obj.getString(fieldName))) {
|
|
230
|
-
return obj.getString(fieldName)
|
|
231
|
-
}
|
|
232
|
-
return null
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
private fun maybeGetBooleanField(obj: JSONObject, fieldName: String): Boolean? {
|
|
236
|
-
if (obj.has(fieldName)) {
|
|
237
|
-
return obj.getBoolean(fieldName);
|
|
238
|
-
}
|
|
239
|
-
return null
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
private fun getLogLevel(string: String): LinkLogLevel {
|
|
243
|
-
when (string) {
|
|
244
|
-
"debug" -> return LinkLogLevel.DEBUG
|
|
245
|
-
"info" -> return LinkLogLevel.INFO
|
|
246
|
-
"warn" -> return LinkLogLevel.WARN
|
|
247
|
-
"error" -> return LinkLogLevel.ERROR
|
|
248
|
-
else -> {
|
|
249
|
-
return LinkLogLevel.ASSERT
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
override fun onActivityResult(
|
|
255
|
-
activity: Activity,
|
|
256
|
-
requestCode: Int,
|
|
257
|
-
resultCode: Int,
|
|
258
|
-
data: Intent?
|
|
259
|
-
) {
|
|
260
|
-
|
|
261
|
-
// Dispath to embedded to handle the callback.
|
|
262
|
-
if (mActivityResultManager[requestCode] != null) {
|
|
263
|
-
mActivityResultManager.dispatch(requestCode, resultCode, data)
|
|
264
|
-
return
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
val linkHandler = LinkResultHandler(
|
|
268
|
-
onSuccess = { success ->
|
|
269
|
-
val result = convertJsonToMap(JSONObject(jsonConverter.convert(success)))
|
|
270
|
-
print(result)
|
|
271
|
-
this.onSuccessCallback?.invoke(result)
|
|
272
|
-
},
|
|
273
|
-
onExit = { exit ->
|
|
274
|
-
val result = convertJsonToMap(JSONObject(jsonConverter.convert(exit)))
|
|
275
|
-
print(result)
|
|
276
|
-
this.onExitCallback?.invoke(result)
|
|
277
|
-
}
|
|
278
|
-
)
|
|
279
|
-
|
|
280
|
-
if (linkHandler.onActivityResult(requestCode, resultCode, data)) {
|
|
281
|
-
return
|
|
282
|
-
} else {
|
|
283
|
-
Log.i("PlaidModule", "Result code not handled.")
|
|
284
|
-
}
|
|
285
|
-
return
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
override fun onNewIntent(intent: Intent) {
|
|
289
|
-
// Do Nothing
|
|
290
|
-
}
|
|
291
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
package com.plaid;
|
|
2
|
-
|
|
3
|
-
import java.util.ArrayList;
|
|
4
|
-
import java.util.HashMap;
|
|
5
|
-
import java.util.List;
|
|
6
|
-
import java.util.Map;
|
|
7
|
-
|
|
8
|
-
import com.facebook.react.TurboReactPackage;
|
|
9
|
-
import com.facebook.react.ViewManagerOnDemandReactPackage;
|
|
10
|
-
import com.facebook.react.bridge.ModuleSpec;
|
|
11
|
-
import com.facebook.react.bridge.NativeModule;
|
|
12
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
13
|
-
import com.facebook.react.common.MapBuilder;
|
|
14
|
-
import com.facebook.react.module.annotations.ReactModule;
|
|
15
|
-
import com.facebook.react.module.annotations.ReactModuleList;
|
|
16
|
-
import com.facebook.react.module.model.ReactModuleInfo;
|
|
17
|
-
import com.facebook.react.module.model.ReactModuleInfoProvider;
|
|
18
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
19
|
-
|
|
20
|
-
import javax.annotation.Nonnull;
|
|
21
|
-
import javax.annotation.Nullable;
|
|
22
|
-
import javax.inject.Provider;
|
|
23
|
-
|
|
24
|
-
@ReactModuleList(nativeModules = {PlaidModule.class})
|
|
25
|
-
public class PlaidPackage extends TurboReactPackage implements ViewManagerOnDemandReactPackage {
|
|
26
|
-
|
|
27
|
-
private @Nullable Map<String, ModuleSpec> mViewManagers;
|
|
28
|
-
|
|
29
|
-
private Map<String, ModuleSpec> getViewManagersMap(final ReactApplicationContext reactContext) {
|
|
30
|
-
if (mViewManagers == null) {
|
|
31
|
-
Map<String, ModuleSpec> specs = MapBuilder.newHashMap();
|
|
32
|
-
specs.put(
|
|
33
|
-
PLKEmbeddedViewManager.REACT_CLASS,
|
|
34
|
-
ModuleSpec.viewManagerSpec(
|
|
35
|
-
new Provider<NativeModule>() {
|
|
36
|
-
@Override
|
|
37
|
-
public NativeModule get() {
|
|
38
|
-
return new PLKEmbeddedViewManager();
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
mViewManagers = specs;
|
|
42
|
-
}
|
|
43
|
-
return mViewManagers;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** {@inheritDoc} */
|
|
47
|
-
@Override
|
|
48
|
-
public List<String> getViewManagerNames(ReactApplicationContext reactContext) {
|
|
49
|
-
return new ArrayList<>(getViewManagersMap(reactContext).keySet());
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@Override
|
|
53
|
-
protected List<ModuleSpec> getViewManagers(ReactApplicationContext reactContext) {
|
|
54
|
-
return new ArrayList<>(getViewManagersMap(reactContext).values());
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** {@inheritDoc} */
|
|
58
|
-
@Override
|
|
59
|
-
public @Nullable ViewManager createViewManager(
|
|
60
|
-
ReactApplicationContext reactContext, String viewManagerName) {
|
|
61
|
-
ModuleSpec spec = getViewManagersMap(reactContext).get(viewManagerName);
|
|
62
|
-
return spec != null ? (ViewManager) spec.getProvider().get() : null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@Override
|
|
66
|
-
public NativeModule getModule(String name, @Nonnull ReactApplicationContext reactContext) {
|
|
67
|
-
switch (name) {
|
|
68
|
-
case PlaidModule.NAME:
|
|
69
|
-
return new PlaidModule(reactContext);
|
|
70
|
-
default:
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@Override
|
|
76
|
-
public ReactModuleInfoProvider getReactModuleInfoProvider() {
|
|
77
|
-
try {
|
|
78
|
-
Class<?> reactModuleInfoProviderClass =
|
|
79
|
-
Class.forName("com.plaid.PlaidPackage$$ReactModuleInfoProvider");
|
|
80
|
-
return (ReactModuleInfoProvider) reactModuleInfoProviderClass.newInstance();
|
|
81
|
-
} catch (ClassNotFoundException e) {
|
|
82
|
-
// ReactModuleSpecProcessor does not run at build-time. Create this ReactModuleInfoProvider by
|
|
83
|
-
// hand.
|
|
84
|
-
return new ReactModuleInfoProvider() {
|
|
85
|
-
@Override
|
|
86
|
-
public Map<String, ReactModuleInfo> getReactModuleInfos() {
|
|
87
|
-
final Map<String, ReactModuleInfo> reactModuleInfoMap = new HashMap<>();
|
|
88
|
-
|
|
89
|
-
Class<? extends NativeModule>[] moduleList =
|
|
90
|
-
new Class[]{
|
|
91
|
-
PlaidModule.class,
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
for (Class<? extends NativeModule> moduleClass : moduleList) {
|
|
95
|
-
ReactModule reactModule = moduleClass.getAnnotation(ReactModule.class);
|
|
96
|
-
|
|
97
|
-
reactModuleInfoMap.put(
|
|
98
|
-
reactModule.name(),
|
|
99
|
-
new ReactModuleInfo(
|
|
100
|
-
reactModule.name(),
|
|
101
|
-
moduleClass.getName(),
|
|
102
|
-
reactModule.canOverrideExistingModule(),
|
|
103
|
-
reactModule.needsEagerInit(),
|
|
104
|
-
reactModule.hasConstants(),
|
|
105
|
-
reactModule.isCxxModule(),
|
|
106
|
-
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return reactModuleInfoMap;
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
} catch (InstantiationException | IllegalAccessException e) {
|
|
113
|
-
throw new RuntimeException(
|
|
114
|
-
"No ReactModuleInfoProvider for com.plaid.PlaidPackage$$ReactModuleInfoProvider", e);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|