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 CHANGED
@@ -53,7 +53,7 @@ npm install card-react-native
53
53
  ```
54
54
 
55
55
  ```sh
56
- yarn install card-react-native
56
+ yarn add card-react-native
57
57
  ```
58
58
 
59
59
  Then run in your terminal
@@ -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.7') {
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
- TapCardConfiguration.configureWithTapCardDictionaryConfiguration(view.context, customView ,config.toHashMap(), object : TapCardStatusDelegate{
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.3'
24
+ s.dependency 'Card-iOS', '1.0.6'
25
25
  else
26
26
  s.dependency "React-Core"
27
- s.dependency 'Card-iOS', '1.0.3'
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"
@@ -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 ?? 95);
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(
@@ -25,7 +25,7 @@ function TapCardView({
25
25
  onChangeSaveCard
26
26
  }, ref) {
27
27
  const viewRef = useRef();
28
- const [height, setHeight] = useState(style.height ?? 95);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "card-react-native",
3
- "version": "1.0.2",
3
+ "version": "1.0.3-1",
4
4
  "description": "Tap Card SDK Wrapper",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
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 ?? 95);
105
+ const [height, setHeight] = useState(style.height ?? 94);
106
106
  const [addFlex, setAddFlex] = useState(false);
107
107
 
108
108
  const generateToken = useCallback(() => {
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- </Workspace>