applepay-rn 0.0.5 → 0.0.7
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.
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
package com.applepayrn
|
|
2
2
|
|
|
3
|
-
import android.graphics.Color
|
|
4
3
|
import com.facebook.react.module.annotations.ReactModule
|
|
5
4
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
6
5
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
7
6
|
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
8
7
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
9
|
-
import com.facebook.react.viewmanagers.
|
|
10
|
-
import com.facebook.react.viewmanagers.
|
|
8
|
+
import com.facebook.react.viewmanagers.NativeApplePayViewManagerInterface
|
|
9
|
+
import com.facebook.react.viewmanagers.NativeApplePayViewManagerDelegate
|
|
11
10
|
|
|
12
11
|
@ReactModule(name = ApplepayRnViewManager.NAME)
|
|
13
12
|
class ApplepayRnViewManager : SimpleViewManager<ApplepayRnView>(),
|
|
14
|
-
|
|
13
|
+
NativeApplePayViewManagerInterface<ApplepayRnView> {
|
|
15
14
|
private val mDelegate: ViewManagerDelegate<ApplepayRnView>
|
|
16
15
|
|
|
17
16
|
init {
|
|
18
|
-
mDelegate =
|
|
17
|
+
mDelegate = NativeApplePayViewManagerDelegate(this)
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
override fun getDelegate(): ViewManagerDelegate<ApplepayRnView>? {
|
|
@@ -30,12 +29,12 @@ class ApplepayRnViewManager : SimpleViewManager<ApplepayRnView>(),
|
|
|
30
29
|
return ApplepayRnView(context)
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
@ReactProp(name = "
|
|
34
|
-
override fun
|
|
35
|
-
|
|
32
|
+
@ReactProp(name = "configuration")
|
|
33
|
+
override fun setConfiguration(view: ApplepayRnView?, value: String?) {
|
|
34
|
+
// Apple Pay is iOS-only; no-op on Android
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
companion object {
|
|
39
|
-
const val NAME = "
|
|
38
|
+
const val NAME = "NativeApplePayView"
|
|
40
39
|
}
|
|
41
40
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applepay-rn",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "A React Native wrapper around Tap Payments’ Apple Pay iOS SDK, enabling seamless Apple Pay integration in React Native apps.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
|
+
"react-native": "./src/index.tsx",
|
|
6
7
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
10
|
"source": "./src/index.tsx",
|
|
11
|
+
"react-native": "./src/index.tsx",
|
|
10
12
|
"types": "./lib/typescript/src/index.d.ts",
|
|
11
13
|
"default": "./lib/module/index.js"
|
|
12
14
|
},
|