diff --git a/packages/example/ios/Podfile.lock b/packages/example/ios/Podfile.lock index 8421ed3e8..3b3f0c8b8 100644 --- a/packages/example/ios/Podfile.lock +++ b/packages/example/ios/Podfile.lock @@ -11,15 +11,15 @@ PODS: - ReactCommon/turbomodule/core (= 0.72.0) - fmt (6.2.1) - glog (0.3.5) - - primer-io-react-native (2.24.1): - - PrimerSDK (= 2.26.7) + - primer-io-react-native (2.25.0): + - PrimerSDK (= 2.27.0) - React-Core - Primer3DS (2.3.2) - PrimerIPay88MYSDK (0.1.7) - PrimerKlarnaSDK (1.1.0) - - PrimerSDK (2.26.7): - - PrimerSDK/Core (= 2.26.7) - - PrimerSDK/Core (2.26.7) + - PrimerSDK (2.27.0): + - PrimerSDK/Core (= 2.27.0) + - PrimerSDK/Core (2.27.0) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -566,11 +566,11 @@ SPEC CHECKSUMS: FBReactNativeSpec: 6e7e74b1ed7f0a1a469a82a67521b33285f5fef3 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - primer-io-react-native: 24cc7cf1394b46e1731a434592c5b7da9c8d17e8 + primer-io-react-native: 8f5a31d699b11d1fe9538fb6f4c8f08f22dc00dd Primer3DS: 81e7969033230c7346a517cd609be956914738bb PrimerIPay88MYSDK: 436ee0be7e2c97e4e81456ccddee20175e9e3c4d PrimerKlarnaSDK: 83e9a1357a7247bf8fa2836fc945cf97644d601d - PrimerSDK: 3d415b64abebc1a36bd5575169137ea5deed9eba + PrimerSDK: d602d8492ad2b6d04a8ee36274d9756d8ad79a67 RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: 656ef0536dd60a9740961ade6a64ba0cb0572d2b RCTTypeSafety: 82bd23b63f043d1a6b8e80e72fd15c08e04528a4 diff --git a/packages/example/src/components/PrimerCardNumberInputElement.tsx b/packages/example/src/components/PrimerCardNumberInputElement.tsx deleted file mode 100644 index 053721fa7..000000000 --- a/packages/example/src/components/PrimerCardNumberInputElement.tsx +++ /dev/null @@ -1,3 +0,0 @@ -// MyCustomView.js -import {requireNativeComponent} from 'react-native'; -export const PrimerCardNumberEditText = requireNativeComponent('PrimerCardNumberEditText'); diff --git a/packages/sdk/android/src/main/java/com/primerioreactnative/PrimerCardNumberEditTextManager.kt b/packages/sdk/android/src/main/java/com/primerioreactnative/PrimerCardNumberEditTextManager.kt deleted file mode 100644 index 1dfe74ba0..000000000 --- a/packages/sdk/android/src/main/java/com/primerioreactnative/PrimerCardNumberEditTextManager.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.primerioreactnative - -import com.facebook.react.uimanager.SimpleViewManager -import com.facebook.react.uimanager.ThemedReactContext -import io.primer.android.components.ui.widgets.* - -val listOfTextInputs = mutableListOf() - -class PrimerCardNumberEditTextManager : SimpleViewManager() { - - override fun getName(): String { - return REACT_CLASS - } - - override fun createViewInstance(reactContext: ThemedReactContext): PrimerCardNumberEditText { - val editText = PrimerCardNumberEditText(reactContext) - return editText - } - - companion object { - const val REACT_CLASS = "PrimerCardNumberEditText" - } -} - -class PrimerCardholderNameEditTextManager : SimpleViewManager() { - - override fun getName(): String { - return REACT_CLASS - } - - override fun createViewInstance(reactContext: ThemedReactContext): PrimerCardholderNameEditText { - return PrimerCardholderNameEditText(reactContext) - } - - companion object { - const val REACT_CLASS = "PrimerCardholderNameEditText" - } -} - -class PrimerExpiryEditTextManager : SimpleViewManager() { - - override fun getName(): String { - return REACT_CLASS - } - - override fun createViewInstance(reactContext: ThemedReactContext): PrimerExpiryEditText { - return PrimerExpiryEditText(reactContext) - } - - companion object { - const val REACT_CLASS = "PrimerExpiryEditText" - } -} - -class PrimerCvvEditTextManager : SimpleViewManager() { - - override fun getName(): String { - return REACT_CLASS - } - - override fun createViewInstance(reactContext: ThemedReactContext): PrimerCvvEditText { - return PrimerCvvEditText(reactContext) - } - - companion object { - const val REACT_CLASS = "PrimerCvvEditText" - } -} diff --git a/packages/sdk/android/src/main/java/com/primerioreactnative/ReactNativePackage.kt b/packages/sdk/android/src/main/java/com/primerioreactnative/ReactNativePackage.kt index 69e451afe..ff06feae7 100644 --- a/packages/sdk/android/src/main/java/com/primerioreactnative/ReactNativePackage.kt +++ b/packages/sdk/android/src/main/java/com/primerioreactnative/ReactNativePackage.kt @@ -34,10 +34,6 @@ class ReactNativePackage : ReactPackage { override fun createViewManagers(reactContext: ReactApplicationContext): List> { return mutableListOf( - PrimerCardNumberEditTextManager(), - PrimerCardholderNameEditTextManager(), - PrimerExpiryEditTextManager(), - PrimerCvvEditTextManager(), PrimerKlarnaPaymentViewManager(reactContext) ) } diff --git a/packages/sdk/ios/Sources/Headless Universal Checkout/Managers/Payment Method Managers/RNTPrimerCardNumberInputElementManager.m b/packages/sdk/ios/Sources/Headless Universal Checkout/Managers/Payment Method Managers/RNTPrimerCardNumberInputElementManager.m deleted file mode 100644 index 7d39f577d..000000000 --- a/packages/sdk/ios/Sources/Headless Universal Checkout/Managers/Payment Method Managers/RNTPrimerCardNumberInputElementManager.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// RNTPrimerCardNumberInputElementManager.m -// primer-io-react-native -// -// Created by Evangelos on 3/3/22. -// - -#import -@import PrimerSDK; - -@interface RNTPrimerCardNumberInputElementManager : RCTViewManager -@end - -@implementation RNTPrimerCardNumberInputElementManager - -RCT_EXPORT_MODULE(PrimerCardNumberEditText) - -- (UIView *)view -{ - return [[PrimerCardNumberInputElement alloc] init]; -} - -@end diff --git a/packages/sdk/ios/Sources/version.swift b/packages/sdk/ios/Sources/version.swift index 50d4441f5..f54865fd8 100644 --- a/packages/sdk/ios/Sources/version.swift +++ b/packages/sdk/ios/Sources/version.swift @@ -1,2 +1,2 @@ // swiftlint:disable:next identifier_name -public let PrimerReactNativeSDKVersion = "2.24.1" +public let PrimerReactNativeSDKVersion = "2.25.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f5b4ddd81..937bf4935 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@primer-io/react-native", - "version": "2.24.1", + "version": "2.25.0", "description": "Primer SDK for RN", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/packages/sdk/primer-io-react-native.podspec b/packages/sdk/primer-io-react-native.podspec index cc78dfecf..4c0ab9c22 100644 --- a/packages/sdk/primer-io-react-native.podspec +++ b/packages/sdk/primer-io-react-native.podspec @@ -16,5 +16,5 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}" s.dependency "React-Core" - s.dependency "PrimerSDK", "2.26.7" + s.dependency "PrimerSDK", "2.27.0" end diff --git a/packages/sdk/src/PrimerInput.tsx b/packages/sdk/src/PrimerInput.tsx deleted file mode 100644 index 4fbf5dd0a..000000000 --- a/packages/sdk/src/PrimerInput.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { PrimerHeadlessUniversalCheckoutCardFormUIManager } from './RNTPrimerHeadlessUniversalCheckoutCardFormUIManager'; -import React, { useEffect, useRef } from 'react'; -import { NativeModules, requireNativeComponent, ViewProps } from 'react-native'; - - -// PrimerCardNumberEditText -export const PrimerCardNumberEditTextRaw = requireNativeComponent<{}>( - 'PrimerCardNumberEditText' -); - -type PrimerCardNumberEditTextProps = ViewProps; - -const { PrimerRN } = NativeModules; - -export const PrimerCardNumberEditText: React.FC = (props) => { - const ref = useRef(React.createRef()); - - useEffect(() => { - const tag = ref.current.current._nativeTag; - PrimerHeadlessUniversalCheckoutCardFormUIManager.addInput(tag); - return () => PrimerRN.removeInput(tag); - }, []); - - const rawComponent = ( - //@ts-ignore - - ); - - return rawComponent; -}; - -// PrimerCardholderNameEditText -export const PrimerCardholderNameEditTextRaw = requireNativeComponent<{}>( - 'PrimerCardholderNameEditText' -); - -type PrimerCardholderNameEditTextProps = ViewProps; - -export const PrimerCardholderNameEditText: React.FC = ( - props -) => { - const ref = useRef(React.createRef()); - - useEffect(() => { - const tag = ref.current.current._nativeTag; - PrimerRN.addInput(tag); - return () => PrimerRN.removeInput(tag); - }, []); - //@ts-ignore - return ; -}; - -// PrimerExpiryEditText -export const PrimerExpiryEditTextRaw = requireNativeComponent<{}>( - 'PrimerExpiryEditText' -); - -type PrimerExpiryEditTextProps = ViewProps; - -export const PrimerExpiryEditText: React.FC = ( - props -) => { - //@ts-ignore - return ; -}; - -// cvv -export const PrimerCvvEditTextRaw = requireNativeComponent<{}>( - 'PrimerCvvEditText' -); - -type PrimerCvvEditTextProps = ViewProps; - -export const PrimerCvvEditText: React.FC = (props) => { - //@ts-ignore - return ; -};