card-react-native 1.0.2 → 1.0.3-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 +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/cardsdkreactnative/CardSdkReactNativeViewManager.kt +13 -1
- package/card-react-native.podspec +2 -2
- package/lib/commonjs/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -1
- package/ios/CardSdkReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
package/README.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -106,7 +106,7 @@ dependencies {
|
|
|
106
106
|
//noinspection GradleDynamicVersion
|
|
107
107
|
implementation "com.facebook.react:react-native:+"
|
|
108
108
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
109
|
-
implementation('com.github.Tap-Payments:Card-Android:1.0.
|
|
109
|
+
implementation('com.github.Tap-Payments:Card-Android:1.0.13.1') {
|
|
110
110
|
exclude group: 'com.google.firebase', module: 'firebase-iid'
|
|
111
111
|
}
|
|
112
112
|
implementation 'com.google.firebase:firebase-core:+'
|
|
@@ -68,7 +68,8 @@ class CardSdkReactNativeViewManager : SimpleViewManager<View>() {
|
|
|
68
68
|
print(config.toString())
|
|
69
69
|
initializeFirebase(view.context.getApplicationContext());
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
val configMap = config.toHashMap().filterValues { it != null } as HashMap<String, Any>
|
|
72
|
+
TapCardConfiguration.configureWithTapCardDictionaryConfiguration(view.context, customView ,configMap, object : TapCardStatusDelegate{
|
|
72
73
|
|
|
73
74
|
override fun onHeightChange(heightChange: String) {
|
|
74
75
|
// view.layoutParams.height = 95
|
|
@@ -161,6 +162,17 @@ class CardSdkReactNativeViewManager : SimpleViewManager<View>() {
|
|
|
161
162
|
// customView.generateTapToken()
|
|
162
163
|
}
|
|
163
164
|
|
|
165
|
+
|
|
166
|
+
override fun onInValidInput(isValid: Boolean) {
|
|
167
|
+
val event = Arguments.createMap().apply {
|
|
168
|
+
putBoolean("data",isValid)
|
|
169
|
+
}
|
|
170
|
+
val reactContext = view.context as ReactContext
|
|
171
|
+
reactContext
|
|
172
|
+
.getJSModule(RCTEventEmitter::class.java)
|
|
173
|
+
.receiveEvent(view.id, "onInvalidInput", event)
|
|
174
|
+
}
|
|
175
|
+
|
|
164
176
|
override fun onChangeSaveCard(enabled: Boolean) {
|
|
165
177
|
Log.e("configTest", enabled.toString())
|
|
166
178
|
val event = Arguments.createMap().apply {
|
|
@@ -21,10 +21,10 @@ Pod::Spec.new do |s|
|
|
|
21
21
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
22
22
|
if respond_to?(:install_modules_dependencies, true)
|
|
23
23
|
install_modules_dependencies(s)
|
|
24
|
-
s.dependency 'Card-iOS', '1.0.
|
|
24
|
+
s.dependency 'Card-iOS', '1.0.6'
|
|
25
25
|
else
|
|
26
26
|
s.dependency "React-Core"
|
|
27
|
-
s.dependency 'Card-iOS', '1.0.
|
|
27
|
+
s.dependency 'Card-iOS', '1.0.6'
|
|
28
28
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
29
29
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
30
30
|
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
package/lib/commonjs/index.js
CHANGED
|
@@ -46,7 +46,7 @@ function TapCardView({
|
|
|
46
46
|
onChangeSaveCard
|
|
47
47
|
}, ref) {
|
|
48
48
|
const viewRef = (0, _react.useRef)();
|
|
49
|
-
const [height, setHeight] = (0, _react.useState)(style.height ??
|
|
49
|
+
const [height, setHeight] = (0, _react.useState)(style.height ?? 94);
|
|
50
50
|
const [addFlex, setAddFlex] = (0, _react.useState)(false);
|
|
51
51
|
const generateToken = (0, _react.useCallback)(() => {
|
|
52
52
|
return _reactNative.UIManager.dispatchViewManagerCommand(
|
package/lib/module/index.js
CHANGED
|
@@ -25,7 +25,7 @@ function TapCardView({
|
|
|
25
25
|
onChangeSaveCard
|
|
26
26
|
}, ref) {
|
|
27
27
|
const viewRef = useRef();
|
|
28
|
-
const [height, setHeight] = useState(style.height ??
|
|
28
|
+
const [height, setHeight] = useState(style.height ?? 94);
|
|
29
29
|
const [addFlex, setAddFlex] = useState(false);
|
|
30
30
|
const generateToken = useCallback(() => {
|
|
31
31
|
return UIManager.dispatchViewManagerCommand(
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -102,7 +102,7 @@ function TapCardView(
|
|
|
102
102
|
) {
|
|
103
103
|
const viewRef =
|
|
104
104
|
useRef<ITapCardViewInputRef>() as MutableRefObject<ITapCardViewInputRef>;
|
|
105
|
-
const [height, setHeight] = useState(style.height ??
|
|
105
|
+
const [height, setHeight] = useState(style.height ?? 94);
|
|
106
106
|
const [addFlex, setAddFlex] = useState(false);
|
|
107
107
|
|
|
108
108
|
const generateToken = useCallback(() => {
|