@primer-io/react-native 2.38.0 → 2.39.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/LICENSE +21 -0
- package/README.md +149 -0
- package/android/build.gradle +34 -83
- package/android/src/main/java/com/primerioreactnative/{PrimerRN.kt → DefaultNativePrimerModule.kt} +87 -79
- package/android/src/main/java/com/primerioreactnative/PrimerRNHeadlessUniversalCheckout.kt +4 -1
- package/android/src/main/java/com/primerioreactnative/PrimerSdkPackage.kt +117 -0
- package/android/src/main/java/com/primerioreactnative/components/manager/ach/PrimerRNAchMandateManager.kt +4 -1
- package/android/src/main/java/com/primerioreactnative/components/manager/ach/PrimerRNHeadlessUniversalCheckoutStripeAchUserDetailsComponent.kt +8 -4
- package/android/src/main/java/com/primerioreactnative/components/manager/asset/PrimerRNHeadlessUniversalCheckoutAssetManager.kt +7 -2
- package/android/src/main/java/com/primerioreactnative/components/manager/banks/PrimerRNHeadlessUniversalCheckoutBanksComponent.kt +7 -4
- package/android/src/main/java/com/primerioreactnative/components/manager/googlePay/PrimerGooglePayButtonConstantsModule.kt +3 -1
- package/android/src/main/java/com/primerioreactnative/components/manager/klarna/PrimerRNHeadlessUniversalCheckoutKlarnaComponent.kt +9 -5
- package/android/src/main/java/com/primerioreactnative/components/manager/nativeUi/PrimerRNHeadlessUniversalCheckoutNativeUiManager.kt +8 -2
- package/android/src/main/java/com/primerioreactnative/components/manager/raw/PrimerRNHeadlessUniversalCheckoutRawManager.kt +7 -3
- package/android/src/main/java/com/primerioreactnative/components/manager/vault/PrimerRNHeadlessUniversalCheckoutVaultManager.kt +7 -1
- package/android/src/main/java/com/primerioreactnative/datamodels/PrimerSettingsRN.kt +4 -5
- package/android/src/main/java/com/primerioreactnative/extensions/PrimerUIOptionsRN.kt +1 -2
- package/android/src/newarch/java/com/primerioreactnative/NativePrimerModule.kt +119 -0
- package/android/src/oldarch/java/com/primerioreactnative/NativePrimerModule.kt +135 -0
- package/ios/ReactNative.xcodeproj/project.pbxproj +14 -0
- package/ios/Sources/Headless Universal Checkout/Managers/Ach/PrimerRNHeadlessUniversalCheckoutStripeAchUserDetailsComponent.swift +1 -0
- package/ios/Sources/Headless Universal Checkout/Managers/Ach/RNTAchMandateManager.swift +0 -1
- package/ios/Sources/Headless Universal Checkout/Managers/Klarna/PrimerRNHeadlessUniversalCheckoutKlarnaComponent.swift +1 -2
- package/ios/Sources/Headless Universal Checkout/Managers/Payment Method Managers/RNPrimerHeadlessUniversalCheckoutVaultManager.swift +1 -0
- package/ios/Sources/Headless Universal Checkout/Managers/Payment Method Managers/RNTNativeUIManager.swift +1 -0
- package/ios/Sources/Headless Universal Checkout/Managers/Payment Method Managers/RNTRawDataManager.swift +1 -0
- package/ios/Sources/Headless Universal Checkout/Managers/RNTRedirectManager.swift +1 -0
- package/ios/Sources/NativePrimer/RCTNativePrimer.h +20 -0
- package/ios/Sources/NativePrimer/RCTNativePrimer.mm +222 -0
- package/ios/Sources/RNTPrimer.swift +27 -40
- package/ios/Sources/version.swift +1 -1
- package/lib/module/HeadlessUniversalCheckout/Components/NativeResourceView.js +11 -8
- package/lib/module/HeadlessUniversalCheckout/Components/NativeResourceView.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/AssetsManager.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/Managers/AssetsManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.js +15 -19
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.js +15 -19
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.js +15 -19
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.js +11 -16
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/Utils/EventType.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/Utils/EventType.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/VaultManager.js +3 -1
- package/lib/module/HeadlessUniversalCheckout/Managers/VaultManager.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.js +30 -42
- package/lib/module/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.js +2 -0
- package/lib/module/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.js.map +1 -1
- package/lib/module/HeadlessUniversalCheckout/types.js +1 -0
- package/lib/module/HeadlessUniversalCheckout/types.js.map +1 -1
- package/lib/module/Primer.js +14 -13
- package/lib/module/Primer.js.map +1 -1
- package/lib/module/RNPrimer.js +23 -26
- package/lib/module/RNPrimer.js.map +1 -1
- package/lib/module/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.js +2 -0
- package/lib/module/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.js.map +1 -1
- package/lib/module/index.js +28 -16
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/IssuingBank.js +1 -1
- package/lib/module/models/IssuingBank.js.map +1 -1
- package/lib/module/models/NamedComponentStep.js +1 -1
- package/lib/module/models/NamedComponentStep.js.map +1 -1
- package/lib/module/models/NamedComponentValidatableData.js +1 -1
- package/lib/module/models/NamedComponentValidatableData.js.map +1 -1
- package/lib/module/models/PrimerCheckoutAdditionalInfo.js +1 -1
- package/lib/module/models/PrimerCheckoutAdditionalInfo.js.map +1 -1
- package/lib/module/models/PrimerCheckoutData.js +2 -0
- package/lib/module/models/PrimerCheckoutData.js.map +1 -1
- package/lib/module/models/PrimerCheckoutPaymentMethodData.js +1 -1
- package/lib/module/models/PrimerCheckoutPaymentMethodData.js.map +1 -1
- package/lib/module/models/PrimerClientSession.js +1 -1
- package/lib/module/models/PrimerClientSession.js.map +1 -1
- package/lib/module/models/PrimerComponentDataValidation.js +2 -0
- package/lib/module/models/PrimerComponentDataValidation.js.map +1 -1
- package/lib/module/models/PrimerError.js +2 -0
- package/lib/module/models/PrimerError.js.map +1 -1
- package/lib/module/models/PrimerHandlers.js +1 -1
- package/lib/module/models/PrimerHandlers.js.map +1 -1
- package/lib/module/models/PrimerHeadlessUniversalCheckoutPaymentMethod.js +1 -1
- package/lib/module/models/PrimerHeadlessUniversalCheckoutPaymentMethod.js.map +1 -1
- package/lib/module/models/PrimerImplementedRNCallbacks.js +1 -1
- package/lib/module/models/PrimerImplementedRNCallbacks.js.map +1 -1
- package/lib/module/models/PrimerInitializationData.js +2 -0
- package/lib/module/models/PrimerInitializationData.js.map +1 -1
- package/lib/module/models/PrimerInputElementType.js +2 -0
- package/lib/module/models/PrimerInputElementType.js.map +1 -1
- package/lib/module/models/PrimerInterfaces.js +2 -0
- package/lib/module/models/PrimerInterfaces.js.map +1 -1
- package/lib/module/models/PrimerPaymentMethodManagerCategory.js +2 -0
- package/lib/module/models/PrimerPaymentMethodManagerCategory.js.map +1 -1
- package/lib/module/models/PrimerPaymentMethodResource.js +1 -1
- package/lib/module/models/PrimerPaymentMethodResource.js.map +1 -1
- package/lib/module/models/PrimerPaymentMethodTokenData.js +2 -0
- package/lib/module/models/PrimerPaymentMethodTokenData.js.map +1 -1
- package/lib/module/models/PrimerRawData.js +1 -1
- package/lib/module/models/PrimerRawData.js.map +1 -1
- package/lib/module/models/PrimerSessionIntent.js +2 -0
- package/lib/module/models/PrimerSessionIntent.js.map +1 -1
- package/lib/module/models/PrimerSettings.js +2 -0
- package/lib/module/models/PrimerSettings.js.map +1 -1
- package/lib/module/models/PrimerTheme.js +1 -1
- package/lib/module/models/PrimerTheme.js.map +1 -1
- package/lib/module/models/PrimerValidationError.js +1 -1
- package/lib/module/models/PrimerValidationError.js.map +1 -1
- package/lib/module/models/PrimerValidationErrorResult.js +2 -0
- package/lib/module/models/PrimerValidationErrorResult.js.map +1 -1
- package/lib/module/models/PrimerVaultedPaymentMethod.js +2 -0
- package/lib/module/models/PrimerVaultedPaymentMethod.js.map +1 -1
- package/lib/module/models/PrimerVaultedPaymentMethodAdditionalData.js +1 -1
- package/lib/module/models/PrimerVaultedPaymentMethodAdditionalData.js.map +1 -1
- package/lib/module/models/PrimerVaultedPaymentMethodResult.js +2 -0
- package/lib/module/models/PrimerVaultedPaymentMethodResult.js.map +1 -1
- package/lib/module/models/RetailOutletsRetail.js +1 -1
- package/lib/module/models/RetailOutletsRetail.js.map +1 -1
- package/lib/module/models/ach/AchCollectableData.js +2 -0
- package/lib/module/models/ach/AchCollectableData.js.map +1 -1
- package/lib/module/models/ach/AchSteps.js +2 -0
- package/lib/module/models/ach/AchSteps.js.map +1 -1
- package/lib/module/models/banks/BanksCollectableData.js +2 -0
- package/lib/module/models/banks/BanksCollectableData.js.map +1 -1
- package/lib/module/models/banks/BanksSteps.js +2 -0
- package/lib/module/models/banks/BanksSteps.js.map +1 -1
- package/lib/module/models/klarna/KlarnaPaymentCategory.js +1 -1
- package/lib/module/models/klarna/KlarnaPaymentCategory.js.map +1 -1
- package/lib/module/models/klarna/KlarnaPaymentCollectableData.js +2 -0
- package/lib/module/models/klarna/KlarnaPaymentCollectableData.js.map +1 -1
- package/lib/module/models/klarna/KlarnaPaymentSteps.js +2 -0
- package/lib/module/models/klarna/KlarnaPaymentSteps.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/specs/NativePrimer.js +6 -0
- package/lib/module/specs/NativePrimer.js.map +1 -0
- package/lib/module/utils/index.js +5 -3
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Components/NativeResourceView.d.ts +1 -1
- package/lib/typescript/src/HeadlessUniversalCheckout/Components/NativeResourceView.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Components/PrimerGooglePayButton.d.ts +1 -1
- package/lib/typescript/src/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.d.ts.map +1 -0
- package/lib/typescript/src/HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/AssetsManager.d.ts +2 -2
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/AssetsManager.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/AchManager.d.ts +6 -6
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.d.ts.map +1 -0
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/ComponentWithRedirectManager.d.ts +6 -6
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/KlarnaManager.d.ts +7 -7
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/NativeUIManager.d.ts +1 -1
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/RawDataManager.d.ts +2 -2
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.d.ts.map +1 -0
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/Utils/EventType.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/VaultManager.d.ts +3 -3
- package/lib/typescript/src/HeadlessUniversalCheckout/Managers/VaultManager.d.ts.map +1 -0
- package/lib/typescript/src/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.d.ts.map +1 -0
- package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/RNPrimerHeadlessUniversalCheckout.d.ts +1 -2
- package/lib/typescript/src/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.d.ts.map +1 -0
- package/lib/typescript/src/HeadlessUniversalCheckout/types.d.ts.map +1 -0
- package/lib/typescript/src/Primer.d.ts.map +1 -0
- package/lib/typescript/{RNPrimer.d.ts → src/RNPrimer.d.ts} +2 -7
- package/lib/typescript/src/RNPrimer.d.ts.map +1 -0
- package/lib/typescript/src/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.d.ts.map +1 -0
- package/lib/typescript/{index.d.ts → src/index.d.ts} +35 -16
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/models/IssuingBank.d.ts.map +1 -0
- package/lib/typescript/src/models/NamedComponentStep.d.ts.map +1 -0
- package/lib/typescript/src/models/NamedComponentValidatableData.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerCheckoutAdditionalInfo.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerCheckoutData.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerCheckoutPaymentMethodData.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerClientSession.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/PrimerComponentDataValidation.d.ts +2 -2
- package/lib/typescript/src/models/PrimerComponentDataValidation.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerError.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerHandlers.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerHeadlessUniversalCheckoutPaymentMethod.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerImplementedRNCallbacks.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerInitializationData.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerInputElementType.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerPaymentMethodManagerCategory.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerPaymentMethodResource.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerPaymentMethodTokenData.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerRawData.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerSessionIntent.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerSettings.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerTheme.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerValidationError.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/PrimerValidationErrorResult.d.ts +1 -1
- package/lib/typescript/src/models/PrimerValidationErrorResult.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/PrimerVaultedPaymentMethod.d.ts +1 -1
- package/lib/typescript/src/models/PrimerVaultedPaymentMethod.d.ts.map +1 -0
- package/lib/typescript/src/models/PrimerVaultedPaymentMethodAdditionalData.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/PrimerVaultedPaymentMethodResult.d.ts +1 -1
- package/lib/typescript/src/models/PrimerVaultedPaymentMethodResult.d.ts.map +1 -0
- package/lib/typescript/src/models/RetailOutletsRetail.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/ach/AchCollectableData.d.ts +1 -1
- package/lib/typescript/src/models/ach/AchCollectableData.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/ach/AchSteps.d.ts +1 -1
- package/lib/typescript/src/models/ach/AchSteps.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/banks/BanksCollectableData.d.ts +1 -1
- package/lib/typescript/src/models/banks/BanksCollectableData.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/banks/BanksSteps.d.ts +2 -2
- package/lib/typescript/src/models/banks/BanksSteps.d.ts.map +1 -0
- package/lib/typescript/src/models/klarna/KlarnaPaymentCategory.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/klarna/KlarnaPaymentCollectableData.d.ts +2 -2
- package/lib/typescript/src/models/klarna/KlarnaPaymentCollectableData.d.ts.map +1 -0
- package/lib/typescript/{models → src/models}/klarna/KlarnaPaymentSteps.d.ts +2 -2
- package/lib/typescript/src/models/klarna/KlarnaPaymentSteps.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativePrimer.d.ts +27 -0
- package/lib/typescript/src/specs/NativePrimer.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/package.json +68 -26
- package/primer-io-react-native.podspec +2 -0
- package/src/HeadlessUniversalCheckout/Components/NativeResourceView.tsx +2 -1
- package/src/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.tsx +2 -1
- package/src/HeadlessUniversalCheckout/Managers/AssetsManager.ts +2 -2
- package/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.ts +9 -7
- package/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.ts +9 -7
- package/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.ts +13 -8
- package/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.ts +1 -1
- package/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.ts +3 -2
- package/src/HeadlessUniversalCheckout/Managers/VaultManager.ts +5 -5
- package/src/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.ts +2 -2
- package/src/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.ts +2 -2
- package/src/RNPrimer.ts +27 -45
- package/src/index.tsx +43 -18
- package/src/models/PrimerComponentDataValidation.ts +2 -2
- package/src/models/PrimerValidationErrorResult.ts +1 -1
- package/src/models/PrimerVaultedPaymentMethod.ts +1 -1
- package/src/models/PrimerVaultedPaymentMethodResult.ts +1 -1
- package/src/models/ach/AchCollectableData.ts +1 -1
- package/src/models/ach/AchSteps.ts +1 -1
- package/src/models/banks/BanksCollectableData.ts +1 -1
- package/src/models/banks/BanksSteps.ts +2 -2
- package/src/models/klarna/KlarnaPaymentCollectableData.ts +2 -2
- package/src/models/klarna/KlarnaPaymentSteps.ts +2 -2
- package/src/specs/NativePrimer.ts +43 -0
- package/src/utils/index.ts +3 -3
- package/android/.editorconfig +0 -2
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -183
- package/android/gradlew.bat +0 -100
- package/android/src/main/java/com/primerioreactnative/ReactNativePackage.kt +0 -49
- package/ios/Pods/Manifest.lock +0 -3
- package/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -352
- package/ios/Pods/Target Support Files/Pods-ReactNative/Pods-ReactNative-acknowledgements.markdown +0 -3
- package/ios/Pods/Target Support Files/Pods-ReactNative/Pods-ReactNative-acknowledgements.plist +0 -29
- package/ios/Pods/Target Support Files/Pods-ReactNative/Pods-ReactNative-dummy.m +0 -5
- package/ios/Pods/Target Support Files/Pods-ReactNative/Pods-ReactNative.debug.xcconfig +0 -8
- package/ios/Pods/Target Support Files/Pods-ReactNative/Pods-ReactNative.release.xcconfig +0 -8
- package/ios/Sources/RNTPrimer.m +0 -86
- package/lib/commonjs/HeadlessUniversalCheckout/Components/NativeResourceView.js +0 -30
- package/lib/commonjs/HeadlessUniversalCheckout/Components/NativeResourceView.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.js +0 -9
- package/lib/commonjs/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView.js +0 -9
- package/lib/commonjs/HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/AssetsManager.js +0 -90
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/AssetsManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.js +0 -106
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager.js +0 -38
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.js +0 -109
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.js +0 -105
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.js +0 -34
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.js +0 -148
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/Utils/EventType.js +0 -8
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/Utils/EventType.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/VaultManager.js +0 -107
- package/lib/commonjs/HeadlessUniversalCheckout/Managers/VaultManager.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.js +0 -269
- package/lib/commonjs/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.js +0 -120
- package/lib/commonjs/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.js.map +0 -1
- package/lib/commonjs/HeadlessUniversalCheckout/types.js +0 -34
- package/lib/commonjs/HeadlessUniversalCheckout/types.js.map +0 -1
- package/lib/commonjs/Primer.js +0 -269
- package/lib/commonjs/Primer.js.map +0 -1
- package/lib/commonjs/RNPrimer.js +0 -219
- package/lib/commonjs/RNPrimer.js.map +0 -1
- package/lib/commonjs/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.js +0 -12
- package/lib/commonjs/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.js.map +0 -1
- package/lib/commonjs/index.js +0 -125
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/models/IssuingBank.js +0 -2
- package/lib/commonjs/models/IssuingBank.js.map +0 -1
- package/lib/commonjs/models/NamedComponentStep.js +0 -2
- package/lib/commonjs/models/NamedComponentStep.js.map +0 -1
- package/lib/commonjs/models/NamedComponentValidatableData.js +0 -2
- package/lib/commonjs/models/NamedComponentValidatableData.js.map +0 -1
- package/lib/commonjs/models/PrimerCheckoutAdditionalInfo.js +0 -2
- package/lib/commonjs/models/PrimerCheckoutAdditionalInfo.js.map +0 -1
- package/lib/commonjs/models/PrimerCheckoutData.js +0 -11
- package/lib/commonjs/models/PrimerCheckoutData.js.map +0 -1
- package/lib/commonjs/models/PrimerCheckoutPaymentMethodData.js +0 -2
- package/lib/commonjs/models/PrimerCheckoutPaymentMethodData.js.map +0 -1
- package/lib/commonjs/models/PrimerClientSession.js +0 -2
- package/lib/commonjs/models/PrimerClientSession.js.map +0 -1
- package/lib/commonjs/models/PrimerComponentDataValidation.js +0 -6
- package/lib/commonjs/models/PrimerComponentDataValidation.js.map +0 -1
- package/lib/commonjs/models/PrimerCountryCode.js +0 -4
- package/lib/commonjs/models/PrimerCountryCode.js.map +0 -1
- package/lib/commonjs/models/PrimerCurrencyCode.js +0 -4
- package/lib/commonjs/models/PrimerCurrencyCode.js.map +0 -1
- package/lib/commonjs/models/PrimerError.js +0 -18
- package/lib/commonjs/models/PrimerError.js.map +0 -1
- package/lib/commonjs/models/PrimerHandlers.js +0 -2
- package/lib/commonjs/models/PrimerHandlers.js.map +0 -1
- package/lib/commonjs/models/PrimerHeadlessUniversalCheckoutPaymentMethod.js +0 -2
- package/lib/commonjs/models/PrimerHeadlessUniversalCheckoutPaymentMethod.js.map +0 -1
- package/lib/commonjs/models/PrimerImplementedRNCallbacks.js +0 -2
- package/lib/commonjs/models/PrimerImplementedRNCallbacks.js.map +0 -1
- package/lib/commonjs/models/PrimerInitializationData.js +0 -6
- package/lib/commonjs/models/PrimerInitializationData.js.map +0 -1
- package/lib/commonjs/models/PrimerInputElementType.js +0 -19
- package/lib/commonjs/models/PrimerInputElementType.js.map +0 -1
- package/lib/commonjs/models/PrimerInterfaces.js +0 -6
- package/lib/commonjs/models/PrimerInterfaces.js.map +0 -1
- package/lib/commonjs/models/PrimerPaymentMethodManagerCategory.js +0 -13
- package/lib/commonjs/models/PrimerPaymentMethodManagerCategory.js.map +0 -1
- package/lib/commonjs/models/PrimerPaymentMethodResource.js +0 -2
- package/lib/commonjs/models/PrimerPaymentMethodResource.js.map +0 -1
- package/lib/commonjs/models/PrimerPaymentMethodTokenData.js +0 -12
- package/lib/commonjs/models/PrimerPaymentMethodTokenData.js.map +0 -1
- package/lib/commonjs/models/PrimerRawData.js +0 -2
- package/lib/commonjs/models/PrimerRawData.js.map +0 -1
- package/lib/commonjs/models/PrimerSessionIntent.js +0 -12
- package/lib/commonjs/models/PrimerSessionIntent.js.map +0 -1
- package/lib/commonjs/models/PrimerSettings.js +0 -6
- package/lib/commonjs/models/PrimerSettings.js.map +0 -1
- package/lib/commonjs/models/PrimerTheme.js +0 -2
- package/lib/commonjs/models/PrimerTheme.js.map +0 -1
- package/lib/commonjs/models/PrimerValidationError.js +0 -2
- package/lib/commonjs/models/PrimerValidationError.js.map +0 -1
- package/lib/commonjs/models/PrimerValidationErrorResult.js +0 -6
- package/lib/commonjs/models/PrimerValidationErrorResult.js.map +0 -1
- package/lib/commonjs/models/PrimerVaultedPaymentMethod.js +0 -6
- package/lib/commonjs/models/PrimerVaultedPaymentMethod.js.map +0 -1
- package/lib/commonjs/models/PrimerVaultedPaymentMethodAdditionalData.js +0 -2
- package/lib/commonjs/models/PrimerVaultedPaymentMethodAdditionalData.js.map +0 -1
- package/lib/commonjs/models/PrimerVaultedPaymentMethodResult.js +0 -6
- package/lib/commonjs/models/PrimerVaultedPaymentMethodResult.js.map +0 -1
- package/lib/commonjs/models/RetailOutletsRetail.js +0 -2
- package/lib/commonjs/models/RetailOutletsRetail.js.map +0 -1
- package/lib/commonjs/models/ach/AchCollectableData.js +0 -6
- package/lib/commonjs/models/ach/AchCollectableData.js.map +0 -1
- package/lib/commonjs/models/ach/AchSteps.js +0 -6
- package/lib/commonjs/models/ach/AchSteps.js.map +0 -1
- package/lib/commonjs/models/banks/BanksCollectableData.js +0 -6
- package/lib/commonjs/models/banks/BanksCollectableData.js.map +0 -1
- package/lib/commonjs/models/banks/BanksSteps.js +0 -6
- package/lib/commonjs/models/banks/BanksSteps.js.map +0 -1
- package/lib/commonjs/models/klarna/KlarnaPaymentCategory.js +0 -2
- package/lib/commonjs/models/klarna/KlarnaPaymentCategory.js.map +0 -1
- package/lib/commonjs/models/klarna/KlarnaPaymentCollectableData.js +0 -6
- package/lib/commonjs/models/klarna/KlarnaPaymentCollectableData.js.map +0 -1
- package/lib/commonjs/models/klarna/KlarnaPaymentSteps.js +0 -6
- package/lib/commonjs/models/klarna/KlarnaPaymentSteps.js.map +0 -1
- package/lib/commonjs/utils/index.js +0 -39
- package/lib/commonjs/utils/index.js.map +0 -1
- package/lib/module/models/PrimerCountryCode.js +0 -2
- package/lib/module/models/PrimerCountryCode.js.map +0 -1
- package/lib/module/models/PrimerCurrencyCode.js +0 -2
- package/lib/module/models/PrimerCurrencyCode.js.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Components/NativeResourceView.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Components/PrimerGooglePayButton.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/AssetsManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/KlarnaManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/NativeUIManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/RawDataManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/Utils/EventType.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/Managers/VaultManager.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/PrimerHeadlessUniversalCheckout.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/RNPrimerHeadlessUniversalCheckout.d.ts.map +0 -1
- package/lib/typescript/HeadlessUniversalCheckout/types.d.ts.map +0 -1
- package/lib/typescript/Primer.d.ts.map +0 -1
- package/lib/typescript/RNPrimer.d.ts.map +0 -1
- package/lib/typescript/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/models/IssuingBank.d.ts.map +0 -1
- package/lib/typescript/models/NamedComponentStep.d.ts.map +0 -1
- package/lib/typescript/models/NamedComponentValidatableData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerCheckoutAdditionalInfo.d.ts.map +0 -1
- package/lib/typescript/models/PrimerCheckoutData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerCheckoutPaymentMethodData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerClientSession.d.ts.map +0 -1
- package/lib/typescript/models/PrimerComponentDataValidation.d.ts.map +0 -1
- package/lib/typescript/models/PrimerCountryCode.d.ts +0 -4
- package/lib/typescript/models/PrimerCountryCode.d.ts.map +0 -1
- package/lib/typescript/models/PrimerCurrencyCode.d.ts +0 -4
- package/lib/typescript/models/PrimerCurrencyCode.d.ts.map +0 -1
- package/lib/typescript/models/PrimerError.d.ts.map +0 -1
- package/lib/typescript/models/PrimerHandlers.d.ts.map +0 -1
- package/lib/typescript/models/PrimerHeadlessUniversalCheckoutPaymentMethod.d.ts.map +0 -1
- package/lib/typescript/models/PrimerImplementedRNCallbacks.d.ts.map +0 -1
- package/lib/typescript/models/PrimerInitializationData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerInputElementType.d.ts.map +0 -1
- package/lib/typescript/models/PrimerInterfaces.d.ts.map +0 -1
- package/lib/typescript/models/PrimerPaymentMethodManagerCategory.d.ts.map +0 -1
- package/lib/typescript/models/PrimerPaymentMethodResource.d.ts.map +0 -1
- package/lib/typescript/models/PrimerPaymentMethodTokenData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerRawData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerSessionIntent.d.ts.map +0 -1
- package/lib/typescript/models/PrimerSettings.d.ts.map +0 -1
- package/lib/typescript/models/PrimerTheme.d.ts.map +0 -1
- package/lib/typescript/models/PrimerValidationError.d.ts.map +0 -1
- package/lib/typescript/models/PrimerValidationErrorResult.d.ts.map +0 -1
- package/lib/typescript/models/PrimerVaultedPaymentMethod.d.ts.map +0 -1
- package/lib/typescript/models/PrimerVaultedPaymentMethodAdditionalData.d.ts.map +0 -1
- package/lib/typescript/models/PrimerVaultedPaymentMethodResult.d.ts.map +0 -1
- package/lib/typescript/models/RetailOutletsRetail.d.ts.map +0 -1
- package/lib/typescript/models/ach/AchCollectableData.d.ts.map +0 -1
- package/lib/typescript/models/ach/AchSteps.d.ts.map +0 -1
- package/lib/typescript/models/banks/BanksCollectableData.d.ts.map +0 -1
- package/lib/typescript/models/banks/BanksSteps.d.ts.map +0 -1
- package/lib/typescript/models/klarna/KlarnaPaymentCategory.d.ts.map +0 -1
- package/lib/typescript/models/klarna/KlarnaPaymentCollectableData.d.ts.map +0 -1
- package/lib/typescript/models/klarna/KlarnaPaymentSteps.d.ts.map +0 -1
- package/lib/typescript/utils/index.d.ts.map +0 -1
- package/src/models/PrimerCountryCode.ts +0 -249
- package/src/models/PrimerCurrencyCode.ts +0 -182
- /package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Components/PrimerKlarnaPaymentView.d.ts +0 -0
- /package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/AchMandateManager.d.ts +0 -0
- /package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/Managers/PaymentMethodManagers/Utils/EventType.d.ts +0 -0
- /package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/PrimerHeadlessUniversalCheckout.d.ts +0 -0
- /package/lib/typescript/{HeadlessUniversalCheckout → src/HeadlessUniversalCheckout}/types.d.ts +0 -0
- /package/lib/typescript/{Primer.d.ts → src/Primer.d.ts} +0 -0
- /package/lib/typescript/{RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.d.ts → src/RNTPrimerHeadlessUniversalCheckoutCardFormUIManager.d.ts} +0 -0
- /package/lib/typescript/{models → src/models}/IssuingBank.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/NamedComponentStep.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/NamedComponentValidatableData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerCheckoutAdditionalInfo.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerCheckoutData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerCheckoutPaymentMethodData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerClientSession.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerError.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerHandlers.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerHeadlessUniversalCheckoutPaymentMethod.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerImplementedRNCallbacks.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerInitializationData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerInputElementType.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerInterfaces.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerPaymentMethodManagerCategory.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerPaymentMethodResource.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerPaymentMethodTokenData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerRawData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerSessionIntent.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerSettings.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerTheme.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerValidationError.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/PrimerVaultedPaymentMethodAdditionalData.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/RetailOutletsRetail.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/klarna/KlarnaPaymentCategory.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BanksCollectableData.d.ts","sourceRoot":"","sources":["../../../../../src/models/banks/BanksCollectableData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAEtF,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,MAAM,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,mBAAmB,EAAE,gBAAgB,CAAC;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,6BAA6B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,mBAAmB,EAAE,QAAQ,CAAC;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,6BAA6B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IssuingBank } from '../IssuingBank';
|
|
2
|
-
import { NamedComponentStep } from '../NamedComponentStep';
|
|
1
|
+
import type { IssuingBank } from '../IssuingBank';
|
|
2
|
+
import type { NamedComponentStep } from '../NamedComponentStep';
|
|
3
3
|
export type BanksStep = BanksLoading | BanksRetrieved;
|
|
4
4
|
/**
|
|
5
5
|
* A type representing the loading of the bank list.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BanksSteps.d.ts","sourceRoot":"","sources":["../../../../../src/models/banks/BanksSteps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,cAAc,CAAC;CAC1B,GAAG,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentCategory.d.ts","sourceRoot":"","sources":["../../../../../src/models/klarna/KlarnaPaymentCategory.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NamedComponentValidatableData } from '../NamedComponentValidatableData';
|
|
2
|
-
import { KlarnaPaymentCategory } from './KlarnaPaymentCategory';
|
|
1
|
+
import type { NamedComponentValidatableData } from '../NamedComponentValidatableData';
|
|
2
|
+
import type { KlarnaPaymentCategory } from './KlarnaPaymentCategory';
|
|
3
3
|
export type KlarnaPaymentValidatableData = KlarnaPaymentOptions | KlarnaPaymentFinalization;
|
|
4
4
|
/**
|
|
5
5
|
* A type representing Klarna payment options required for configuring the {@link KlarnaComponent}.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentCollectableData.d.ts","sourceRoot":"","sources":["../../../../../src/models/klarna/KlarnaPaymentCollectableData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,4BAA4B,GAAG,oBAAoB,GAAG,yBAAyB,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,sBAAsB,CAAC;IAE5C;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,eAAe,EAAE,qBAAqB,CAAC;CACxC,GAAG,6BAA6B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,mBAAmB,EAAE,2BAA2B,CAAC;CAClD,GAAG,6BAA6B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NamedComponentStep } from './../NamedComponentStep';
|
|
2
|
-
import { KlarnaPaymentCategory } from './KlarnaPaymentCategory';
|
|
1
|
+
import type { NamedComponentStep } from './../NamedComponentStep';
|
|
2
|
+
import type { KlarnaPaymentCategory } from './KlarnaPaymentCategory';
|
|
3
3
|
export type KlarnaPaymentStep = PaymentSessionCreated | PaymentViewLoaded | PaymentSessionAuthorized | PaymentSessionFinalized;
|
|
4
4
|
/**
|
|
5
5
|
* A type that indicates that the payment view is loaded and ready to be displayed.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentSteps.d.ts","sourceRoot":"","sources":["../../../../../src/models/klarna/KlarnaPaymentSteps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,iBAAiB,GACzB,qBAAqB,GACrB,iBAAiB,GACjB,wBAAwB,GACxB,uBAAuB,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,QAAQ,EAAE,mBAAmB,CAAA;CAAE,GAAG,kBAAkB,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,uBAAuB,CAAC;IAClC;;OAEG;IACH,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;CAC5C,GAAG,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,0BAA0B,CAAC;IACrC;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IAAE,QAAQ,EAAE,yBAAyB,CAAA;CAAE,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TurboModule, CodegenTypes } from 'react-native';
|
|
2
|
+
export type EmittedEvent = {
|
|
3
|
+
eventType: string;
|
|
4
|
+
data: string;
|
|
5
|
+
};
|
|
6
|
+
export interface Spec extends TurboModule {
|
|
7
|
+
configure(settings?: string): Promise<void>;
|
|
8
|
+
showUniversalCheckoutWithClientToken(clientToken: string): Promise<void>;
|
|
9
|
+
showVaultManagerWithClientToken(clientToken: string): Promise<void>;
|
|
10
|
+
showPaymentMethod(paymentMethod: string, intent: string, clientToken: string): Promise<void>;
|
|
11
|
+
dismiss(): Promise<void>;
|
|
12
|
+
cleanUp(): Promise<void>;
|
|
13
|
+
handleTokenizationNewClientToken(newClientToken: string): Promise<void>;
|
|
14
|
+
handleTokenizationSuccess(): Promise<void>;
|
|
15
|
+
handleTokenizationFailure(errorMessage: string): Promise<void>;
|
|
16
|
+
handleResumeWithNewClientToken(newClientToken: string): Promise<void>;
|
|
17
|
+
handleResumeSuccess(): Promise<void>;
|
|
18
|
+
handleResumeFailure(errorMessage: string): Promise<void>;
|
|
19
|
+
handlePaymentCreationAbort(errorMessage: string): Promise<void>;
|
|
20
|
+
handlePaymentCreationContinue(): Promise<void>;
|
|
21
|
+
showErrorMessage(errorMessage: string): Promise<void>;
|
|
22
|
+
setImplementedRNCallbacks(implementedRNCallbacks: string): Promise<void>;
|
|
23
|
+
readonly onEvent: CodegenTypes.EventEmitter<EmittedEvent>;
|
|
24
|
+
}
|
|
25
|
+
declare const _default: Spec;
|
|
26
|
+
export default _default;
|
|
27
|
+
//# sourceMappingURL=NativePrimer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativePrimer.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativePrimer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAG5C,oCAAoC,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,+BAA+B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7F,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAGzB,gCAAgC,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAG/D,8BAA8B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAGzD,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAG/C,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD,yBAAyB,CAAC,sBAAsB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;CAC3D;;AAGD,wBAAsE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAwBxD;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,QAOrE"}
|
package/package.json
CHANGED
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer-io/react-native",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.39.1",
|
|
4
4
|
"description": "Primer SDK for RN",
|
|
5
|
-
"main": "lib/
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
10
15
|
"files": [
|
|
11
16
|
"src",
|
|
12
17
|
"lib",
|
|
13
18
|
"android",
|
|
14
19
|
"ios",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
17
23
|
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
18
29
|
"!**/__tests__",
|
|
19
30
|
"!**/__fixtures__",
|
|
20
|
-
"!**/__mocks__"
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
21
33
|
],
|
|
22
34
|
"scripts": {
|
|
23
|
-
"test": "jest",
|
|
24
35
|
"typescript": "tsc --noEmit",
|
|
25
36
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
26
37
|
"build": "bob build",
|
|
27
38
|
"prepare": "bob build",
|
|
28
39
|
"release": "release-it",
|
|
29
|
-
"example": "yarn
|
|
30
|
-
"
|
|
40
|
+
"example": "yarn workspace @primer-io/react-native-example",
|
|
41
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
42
|
+
"bootstrap": "yarn example pods",
|
|
43
|
+
"test": "jest src/__tests__ --coverage",
|
|
44
|
+
"test:unit:coverage:lcov": "yarn test && node scripts/aggregate-coverage.js && nyc report --reporter lcov"
|
|
31
45
|
},
|
|
32
46
|
"keywords": [
|
|
33
47
|
"react-native",
|
|
@@ -49,26 +63,33 @@
|
|
|
49
63
|
"access": "public"
|
|
50
64
|
},
|
|
51
65
|
"devDependencies": {
|
|
52
|
-
"@commitlint/config-conventional": "^
|
|
66
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
67
|
+
"@eslint/compat": "^1.4.0",
|
|
68
|
+
"@react-native-community/cli": "20.0.0",
|
|
53
69
|
"@react-native-community/eslint-config": "^2.0.0",
|
|
54
70
|
"@release-it/conventional-changelog": "^5.1.1",
|
|
55
71
|
"@tsconfig/react-native": "^3.0.0",
|
|
56
|
-
"@types/jest": "^
|
|
72
|
+
"@types/jest": "^29.5.14",
|
|
57
73
|
"@types/react": "^19.1.0",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"eslint
|
|
62
|
-
"eslint-
|
|
63
|
-
"
|
|
74
|
+
"commitlint": "^19.8.1",
|
|
75
|
+
"danger": "^13.0.4",
|
|
76
|
+
"del-cli": "^6.0.0",
|
|
77
|
+
"eslint": "^9.35.0",
|
|
78
|
+
"eslint-config-prettier": "^10.1.8",
|
|
79
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
64
80
|
"jest": "^29.7.0",
|
|
81
|
+
"nyc": "^15.1.0",
|
|
65
82
|
"pod-install": "^0.1.0",
|
|
66
|
-
"prettier": "3.
|
|
67
|
-
"react
|
|
83
|
+
"prettier": "3.6.2",
|
|
84
|
+
"react": "19.1.0",
|
|
85
|
+
"react-native": "0.81.1",
|
|
86
|
+
"react-native-builder-bob": "^0.40.13",
|
|
68
87
|
"react-test-renderer": "19.1.0",
|
|
69
|
-
"
|
|
88
|
+
"slack-message-builder": "^1.2.1",
|
|
70
89
|
"ts-jest": "^29.1.2",
|
|
71
|
-
"
|
|
90
|
+
"turbo": "^2.5.6",
|
|
91
|
+
"typescript": "^5.9.2",
|
|
92
|
+
"typescript-eslint": "^8.46.1"
|
|
72
93
|
},
|
|
73
94
|
"peerDependencies": {
|
|
74
95
|
"react": ">=16.8.0",
|
|
@@ -77,6 +98,10 @@
|
|
|
77
98
|
"engines": {
|
|
78
99
|
"node": ">=20"
|
|
79
100
|
},
|
|
101
|
+
"workspaces": [
|
|
102
|
+
"example"
|
|
103
|
+
],
|
|
104
|
+
"packageManager": "yarn@3.6.1",
|
|
80
105
|
"release-it": {
|
|
81
106
|
"git": {
|
|
82
107
|
"commitMessage": "chore: release ${version}",
|
|
@@ -129,8 +154,12 @@
|
|
|
129
154
|
"source": "src",
|
|
130
155
|
"output": "lib",
|
|
131
156
|
"targets": [
|
|
132
|
-
|
|
133
|
-
|
|
157
|
+
[
|
|
158
|
+
"module",
|
|
159
|
+
{
|
|
160
|
+
"esm": true
|
|
161
|
+
}
|
|
162
|
+
],
|
|
134
163
|
[
|
|
135
164
|
"typescript",
|
|
136
165
|
{
|
|
@@ -138,5 +167,18 @@
|
|
|
138
167
|
}
|
|
139
168
|
]
|
|
140
169
|
]
|
|
170
|
+
},
|
|
171
|
+
"codegenConfig": {
|
|
172
|
+
"name": "NativePrimerSpec",
|
|
173
|
+
"type": "modules",
|
|
174
|
+
"jsSrcsDir": "src/specs",
|
|
175
|
+
"android": {
|
|
176
|
+
"javaPackageName": "com.primerioreactnative"
|
|
177
|
+
},
|
|
178
|
+
"ios": {
|
|
179
|
+
"modulesProvider": {
|
|
180
|
+
"NativePrimer": "RCTNativePrimer"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
141
183
|
}
|
|
142
184
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleSheet, TouchableOpacity, NativeModules } from 'react-native';
|
|
2
|
+
import type { GestureResponderEvent, ViewStyle } from 'react-native';
|
|
2
3
|
import { PrimerGooglePayButton } from './PrimerGooglePayButton';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Resource } from '
|
|
2
|
-
import { IPrimerAsset as Asset } from '../../models/PrimerPaymentMethodResource';
|
|
1
|
+
import type { IPrimerPaymentMethodResource as Resource } from '../../models/PrimerPaymentMethodResource';
|
|
2
|
+
import type { IPrimerAsset as Asset } from '../../models/PrimerPaymentMethodResource';
|
|
3
3
|
import { NativeModules } from 'react-native';
|
|
4
4
|
|
|
5
5
|
const { RNTPrimerHeadlessUniversalCheckoutAssetsManager } = NativeModules;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModules
|
|
2
|
-
import {
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
+
import type { EmitterSubscription } from 'react-native';
|
|
3
|
+
import type {
|
|
3
4
|
PrimerComponentDataValidationError,
|
|
4
5
|
PrimerInvalidComponentData,
|
|
5
6
|
PrimerValidComponentData,
|
|
6
7
|
PrimerValidatingComponentData,
|
|
7
|
-
} from '
|
|
8
|
-
import { PrimerError } from '
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
} from '../../../models/PrimerComponentDataValidation';
|
|
9
|
+
import { PrimerError } from '../../../models/PrimerError';
|
|
10
|
+
import { eventTypes } from './Utils/EventType';
|
|
11
|
+
import type { EventType } from './Utils/EventType';
|
|
12
|
+
import type { AchStep } from '../../../models/ach/AchSteps';
|
|
13
|
+
import type { AchValidatableData } from '../../../models/ach/AchCollectableData';
|
|
12
14
|
|
|
13
15
|
const { RNTPrimerHeadlessUniversalCheckoutStripeAchUserDetailsComponent } = NativeModules;
|
|
14
16
|
|
package/src/HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModules
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
+
import type { EmitterSubscription } from 'react-native';
|
|
3
|
+
import type { BanksValidatableData } from '../../../models/banks/BanksCollectableData';
|
|
4
|
+
import type {
|
|
4
5
|
PrimerComponentDataValidationError,
|
|
5
6
|
PrimerInvalidComponentData,
|
|
6
7
|
PrimerValidComponentData,
|
|
7
8
|
PrimerValidatingComponentData,
|
|
8
|
-
} from '
|
|
9
|
-
import { PrimerError } from '
|
|
10
|
-
import { BanksStep } from '
|
|
11
|
-
import {
|
|
9
|
+
} from '../../../models/PrimerComponentDataValidation';
|
|
10
|
+
import { PrimerError } from '../../../models/PrimerError';
|
|
11
|
+
import type { BanksStep } from '../../../models/banks/BanksSteps';
|
|
12
|
+
import { eventTypes } from './Utils/EventType';
|
|
13
|
+
import type { EventType } from './Utils/EventType';
|
|
12
14
|
|
|
13
15
|
const { RNTPrimerHeadlessUniversalCheckoutBanksComponent } = NativeModules;
|
|
14
16
|
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModules
|
|
2
|
-
import {
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
+
import type { EmitterSubscription } from 'react-native';
|
|
3
|
+
import type {
|
|
3
4
|
PrimerComponentDataValidationError,
|
|
4
5
|
PrimerInvalidComponentData,
|
|
5
6
|
PrimerValidComponentData,
|
|
6
7
|
PrimerValidatingComponentData,
|
|
7
|
-
} from '
|
|
8
|
-
import { PrimerError } from '
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
} from '../../../models/PrimerComponentDataValidation';
|
|
9
|
+
import { PrimerError } from '../../../models/PrimerError';
|
|
10
|
+
import type {
|
|
11
|
+
KlarnaPaymentOptions,
|
|
12
|
+
KlarnaPaymentValidatableData,
|
|
13
|
+
} from '../../../models/klarna/KlarnaPaymentCollectableData';
|
|
14
|
+
import type { KlarnaPaymentStep } from '../../../models/klarna/KlarnaPaymentSteps';
|
|
15
|
+
import { eventTypes } from './Utils/EventType';
|
|
16
|
+
import type { EventType } from './Utils/EventType';
|
|
17
|
+
import { PrimerSessionIntent } from '../../../models/PrimerSessionIntent';
|
|
13
18
|
|
|
14
19
|
const { RNTPrimerHeadlessUniversalCheckoutKlarnaComponent } = NativeModules;
|
|
15
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
|
-
import type { PrimerSessionIntent } from '
|
|
2
|
+
import type { PrimerSessionIntent } from '../../../models/PrimerSessionIntent';
|
|
3
3
|
|
|
4
4
|
const { RNTPrimerHeadlessUniversalPaymentMethodNativeUIManager } = NativeModules;
|
|
5
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type PrimerRawData as RawData } from '../../../models/PrimerRawData';
|
|
2
|
-
import { NativeEventEmitter, NativeModules
|
|
3
|
-
import type {
|
|
2
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
3
|
+
import type { EmitterSubscription, EventSubscription } from 'react-native';
|
|
4
|
+
import type { PrimerInitializationData } from '../../../models/PrimerInitializationData';
|
|
4
5
|
import { PrimerError } from '../../../models/PrimerError';
|
|
5
6
|
import type { PrimerInputElementType } from '../../../models/PrimerInputElementType';
|
|
6
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
|
-
import { PrimerValidationError as ValidationError } from '
|
|
3
|
-
import { PrimerVaultedPaymentMethod as VaultedPaymentMethod } from '
|
|
4
|
-
import { PrimerVaultedPaymentMethodAdditionalData as VaultedPaymentMethodAdditionalData } from '
|
|
5
|
-
import { PrimerVaultedPaymentMethodResult } from '
|
|
6
|
-
import { PrimerValidationErrorResult } from '
|
|
2
|
+
import type { PrimerValidationError as ValidationError } from '../../models/PrimerValidationError';
|
|
3
|
+
import type { PrimerVaultedPaymentMethod as VaultedPaymentMethod } from '../../models/PrimerVaultedPaymentMethod';
|
|
4
|
+
import type { PrimerVaultedPaymentMethodAdditionalData as VaultedPaymentMethodAdditionalData } from '../../models/PrimerVaultedPaymentMethodAdditionalData';
|
|
5
|
+
import type { PrimerVaultedPaymentMethodResult } from '../../models/PrimerVaultedPaymentMethodResult';
|
|
6
|
+
import type { PrimerValidationErrorResult } from '../../models/PrimerValidationErrorResult';
|
|
7
7
|
|
|
8
8
|
const { RNPrimerHeadlessUniversalCheckoutVaultManager } = NativeModules;
|
|
9
9
|
|
|
@@ -6,12 +6,12 @@ import type { PrimerSettings } from '../models/PrimerSettings';
|
|
|
6
6
|
import type { PrimerClientSession } from '../models/PrimerClientSession';
|
|
7
7
|
import { PrimerError } from '../models/PrimerError';
|
|
8
8
|
import type { PrimerPaymentMethodTokenData } from '../models/PrimerPaymentMethodTokenData';
|
|
9
|
-
import type { PrimerImplementedRNCallbacks } from '
|
|
9
|
+
import type { PrimerImplementedRNCallbacks } from '../models/PrimerImplementedRNCallbacks';
|
|
10
10
|
import type { IPrimerHeadlessUniversalCheckoutPaymentMethod } from '../models/PrimerHeadlessUniversalCheckoutPaymentMethod';
|
|
11
11
|
import type {
|
|
12
12
|
PrimerHeadlessUniversalCheckoutResumeHandler,
|
|
13
13
|
PrimerPaymentCreationHandler,
|
|
14
|
-
} from '
|
|
14
|
+
} from '../models/PrimerHandlers';
|
|
15
15
|
|
|
16
16
|
///////////////////////////////////////////
|
|
17
17
|
// DECISION HANDLERS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModules
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
+
import type { EmitterSubscription, EventSubscription } from 'react-native';
|
|
2
3
|
import type { PrimerSettings } from '../models/PrimerSettings';
|
|
3
|
-
import { EventSubscription } from 'react-native';
|
|
4
4
|
|
|
5
5
|
const { PrimerHeadlessUniversalCheckout } = NativeModules;
|
|
6
6
|
|
package/src/RNPrimer.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModules, EmitterSubscription } from 'react-native';
|
|
2
1
|
import type { PrimerSettings } from './models/PrimerSettings';
|
|
3
|
-
import { EventSubscription } from 'react-native';
|
|
2
|
+
import type { EventSubscription } from 'react-native';
|
|
3
|
+
import NativePrimer from './specs/NativePrimer';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
6
|
+
|
|
7
|
+
// Create the event emitter instance for old architecture
|
|
8
|
+
const nativeEventEmitter = new NativeEventEmitter(NativeModules.NativePrimer);
|
|
9
|
+
|
|
10
|
+
// Subscriptions
|
|
11
|
+
let subscriptions: EventSubscription[] = [];
|
|
7
12
|
|
|
8
13
|
type EventType =
|
|
9
14
|
| 'onCheckoutComplete'
|
|
@@ -24,39 +29,29 @@ export interface IPrimerError {
|
|
|
24
29
|
recoverySuggestion?: string;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
const eventTypes: EventType[] = [
|
|
28
|
-
'onCheckoutComplete',
|
|
29
|
-
'onBeforeClientSessionUpdate',
|
|
30
|
-
'onClientSessionUpdate',
|
|
31
|
-
'onBeforePaymentCreate',
|
|
32
|
-
'onError',
|
|
33
|
-
'onDismiss',
|
|
34
|
-
'onTokenizeSuccess',
|
|
35
|
-
'onResumeSuccess',
|
|
36
|
-
'onCheckoutReceivedAdditionalInfo',
|
|
37
|
-
'onResumePending',
|
|
38
|
-
'detectImplementedRNCallbacks',
|
|
39
|
-
];
|
|
40
|
-
|
|
41
32
|
const RNPrimer = {
|
|
42
33
|
///////////////////////////////////////////
|
|
43
34
|
// Event Emitter
|
|
44
35
|
///////////////////////////////////////////
|
|
45
36
|
|
|
46
|
-
addListener(eventType: EventType, listener: (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
addListener(eventType: EventType, listener: (data: any) => void) {
|
|
38
|
+
if (NativePrimer.onEvent) {
|
|
39
|
+
// New Architecture
|
|
40
|
+
subscriptions.push(
|
|
41
|
+
NativePrimer.onEvent((emittedEvent: any) => {
|
|
42
|
+
if (emittedEvent.eventType === eventType) {
|
|
43
|
+
listener(emittedEvent.data);
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
} else {
|
|
48
|
+
// Old Architecture - listen to individual events
|
|
49
|
+
subscriptions.push(nativeEventEmitter.addListener(eventType, listener));
|
|
50
|
+
}
|
|
52
51
|
},
|
|
53
|
-
|
|
54
|
-
removeAllListenersForEvent(eventType: EventType) {
|
|
55
|
-
eventEmitter.removeAllListeners(eventType);
|
|
56
|
-
},
|
|
57
|
-
|
|
58
52
|
removeAllListeners() {
|
|
59
|
-
|
|
53
|
+
subscriptions.forEach((subscription) => subscription.remove());
|
|
54
|
+
subscriptions = [];
|
|
60
55
|
},
|
|
61
56
|
|
|
62
57
|
///////////////////////////////////////////
|
|
@@ -84,7 +79,7 @@ const RNPrimer = {
|
|
|
84
79
|
});
|
|
85
80
|
},
|
|
86
81
|
|
|
87
|
-
showVaultManager: (clientToken: string
|
|
82
|
+
showVaultManager: (clientToken: string): Promise<void> => {
|
|
88
83
|
return new Promise(async (resolve, reject) => {
|
|
89
84
|
try {
|
|
90
85
|
await NativePrimer.showVaultManagerWithClientToken(clientToken);
|
|
@@ -194,7 +189,7 @@ const RNPrimer = {
|
|
|
194
189
|
handleResumeFailure: (errorMessage: string | null): Promise<void> => {
|
|
195
190
|
return new Promise(async (resolve, reject) => {
|
|
196
191
|
try {
|
|
197
|
-
await NativePrimer.
|
|
192
|
+
await NativePrimer.handleResumeFailure(errorMessage || '');
|
|
198
193
|
resolve();
|
|
199
194
|
} catch (err) {
|
|
200
195
|
reject(err);
|
|
@@ -227,7 +222,6 @@ const RNPrimer = {
|
|
|
227
222
|
},
|
|
228
223
|
|
|
229
224
|
// Error Handler
|
|
230
|
-
|
|
231
225
|
showErrorMessage: (errorMessage: string | null): Promise<void> => {
|
|
232
226
|
return new Promise(async (resolve, reject) => {
|
|
233
227
|
try {
|
|
@@ -239,19 +233,7 @@ const RNPrimer = {
|
|
|
239
233
|
});
|
|
240
234
|
},
|
|
241
235
|
|
|
242
|
-
handleSuccess: (): Promise<void> => {
|
|
243
|
-
return new Promise(async (resolve, reject) => {
|
|
244
|
-
try {
|
|
245
|
-
await NativePrimer.handleSuccess();
|
|
246
|
-
resolve();
|
|
247
|
-
} catch (err) {
|
|
248
|
-
reject(err);
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
},
|
|
252
|
-
|
|
253
236
|
// HELPERS
|
|
254
|
-
|
|
255
237
|
setImplementedRNCallbacks: (implementedRNCallbacks: any): Promise<void> => {
|
|
256
238
|
return new Promise(async (resolve, reject) => {
|
|
257
239
|
try {
|
package/src/index.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export type {
|
|
|
33
33
|
PrimerCheckoutDataPayment as CheckoutDataPayment,
|
|
34
34
|
} from './models/PrimerCheckoutData';
|
|
35
35
|
export type { PrimerCheckoutPaymentMethodData as CheckoutPaymentMethodData } from './models/PrimerCheckoutPaymentMethodData';
|
|
36
|
-
export { PrimerError } from './models/PrimerError';
|
|
36
|
+
export type { PrimerError } from './models/PrimerError';
|
|
37
37
|
export type { PrimerPaymentMethodAsset as Asset } from './models/PrimerPaymentMethodResource';
|
|
38
38
|
export type {
|
|
39
39
|
IPrimerPaymentMethodResource as Resource,
|
|
@@ -71,34 +71,59 @@ export type {
|
|
|
71
71
|
KlarnaPaymentFinalization,
|
|
72
72
|
KlarnaPaymentValidatableData,
|
|
73
73
|
} from './models/klarna/KlarnaPaymentCollectableData';
|
|
74
|
-
|
|
74
|
+
import type {
|
|
75
75
|
PaymentSessionCreated,
|
|
76
76
|
PaymentSessionAuthorized,
|
|
77
77
|
PaymentSessionFinalized,
|
|
78
78
|
PaymentViewLoaded,
|
|
79
79
|
KlarnaPaymentStep,
|
|
80
80
|
} from './models/klarna/KlarnaPaymentSteps';
|
|
81
|
-
export { PrimerKlarnaPaymentView } from './HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView';
|
|
82
|
-
export {
|
|
83
|
-
NativeResourceView,
|
|
84
|
-
PrimerGooglePayButtonConstants,
|
|
85
|
-
} from './HeadlessUniversalCheckout/Components/NativeResourceView';
|
|
86
|
-
export { PrimerGooglePayButton } from './HeadlessUniversalCheckout/Components/PrimerGooglePayButton';
|
|
87
|
-
export type { UserDetailsRetrieved as CollectUserDetails, UserDetailsCollected, AchStep } from './models/ach/AchSteps';
|
|
88
|
-
export type { AchFirstName, AchLastName, AchEmailAddress, AchValidatableData } from './models/ach/AchCollectableData';
|
|
89
|
-
export { PrimerHeadlessUniversalCheckoutAchManager as AchManager } from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager';
|
|
90
81
|
export type {
|
|
82
|
+
PaymentSessionCreated,
|
|
83
|
+
PaymentSessionAuthorized,
|
|
84
|
+
PaymentSessionFinalized,
|
|
85
|
+
PaymentViewLoaded,
|
|
86
|
+
KlarnaPaymentStep,
|
|
87
|
+
};
|
|
88
|
+
import { PrimerKlarnaPaymentView } from './HeadlessUniversalCheckout/Components/PrimerKlarnaPaymentView';
|
|
89
|
+
export { PrimerKlarnaPaymentView };
|
|
90
|
+
import { NativeResourceView } from './HeadlessUniversalCheckout/Components/NativeResourceView';
|
|
91
|
+
export { NativeResourceView };
|
|
92
|
+
import { PrimerGooglePayButtonConstants } from './HeadlessUniversalCheckout/Components/NativeResourceView';
|
|
93
|
+
export { PrimerGooglePayButtonConstants };
|
|
94
|
+
import { PrimerGooglePayButton } from './HeadlessUniversalCheckout/Components/PrimerGooglePayButton';
|
|
95
|
+
export { PrimerGooglePayButton };
|
|
96
|
+
import type { UserDetailsRetrieved, UserDetailsCollected, AchStep } from './models/ach/AchSteps';
|
|
97
|
+
export type { UserDetailsRetrieved as CollectUserDetails, UserDetailsCollected, AchStep };
|
|
98
|
+
import type { AchFirstName, AchLastName, AchEmailAddress, AchValidatableData } from './models/ach/AchCollectableData';
|
|
99
|
+
export type { AchFirstName, AchLastName, AchEmailAddress, AchValidatableData };
|
|
100
|
+
import { PrimerHeadlessUniversalCheckoutAchManager } from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager';
|
|
101
|
+
import type {
|
|
91
102
|
StripeAchUserDetailsComponent,
|
|
92
103
|
AchManagerProps,
|
|
93
104
|
} from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchManager';
|
|
94
|
-
export { PrimerHeadlessUniversalCheckoutAchMandateManager as AchMandateManager } from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager';
|
|
95
105
|
|
|
96
|
-
|
|
97
|
-
export
|
|
106
|
+
import { PrimerHeadlessUniversalCheckoutAchMandateManager } from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/AchMandateManager';
|
|
107
|
+
export { PrimerHeadlessUniversalCheckoutAchMandateManager as AchMandateManager };
|
|
108
|
+
export { PrimerHeadlessUniversalCheckoutAchManager as AchManager };
|
|
109
|
+
export type { StripeAchUserDetailsComponent, AchManagerProps };
|
|
110
|
+
|
|
111
|
+
import { PrimerHeadlessUniversalCheckoutComponentWithRedirectManager } from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager';
|
|
112
|
+
import type {
|
|
98
113
|
BanksComponent,
|
|
99
114
|
ComponentWithRedirectManagerProps,
|
|
100
115
|
} from './HeadlessUniversalCheckout/Managers/PaymentMethodManagers/ComponentWithRedirectManager';
|
|
101
|
-
export
|
|
102
|
-
export type {
|
|
103
|
-
|
|
104
|
-
export type {
|
|
116
|
+
export { PrimerHeadlessUniversalCheckoutComponentWithRedirectManager as ComponentWithRedirectManager };
|
|
117
|
+
export type { BanksComponent, ComponentWithRedirectManagerProps };
|
|
118
|
+
import type { IssuingBank } from './models/IssuingBank';
|
|
119
|
+
export type { IssuingBank };
|
|
120
|
+
import type { BankId, BankListFilter, BanksValidatableData } from './models/banks/BanksCollectableData';
|
|
121
|
+
export type { BankId, BankListFilter, BanksValidatableData };
|
|
122
|
+
import type { BanksLoading, BanksRetrieved, BanksStep } from './models/banks/BanksSteps';
|
|
123
|
+
export type { BanksLoading, BanksRetrieved, BanksStep };
|
|
124
|
+
import type { NamedComponentValidatableData } from './models/NamedComponentValidatableData';
|
|
125
|
+
export type { NamedComponentValidatableData };
|
|
126
|
+
|
|
127
|
+
// must be exported in order to support the old architecture
|
|
128
|
+
const nativeModule = require('./specs/NativePrimer').default;
|
|
129
|
+
export default nativeModule;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NamedComponentValidatableData } from './NamedComponentValidatableData';
|
|
1
|
+
import type { NamedComponentValidatableData } from './NamedComponentValidatableData';
|
|
2
2
|
import { PrimerError } from './PrimerError';
|
|
3
|
-
import { PrimerValidationError } from './PrimerValidationError';
|
|
3
|
+
import type { PrimerValidationError } from './PrimerValidationError';
|
|
4
4
|
|
|
5
5
|
export type PrimerValidatingComponentData<T extends NamedComponentValidatableData> = IPrimerValidatingComponentData<T>;
|
|
6
6
|
export type PrimerValidComponentData<T extends NamedComponentValidatableData> = IPrimerValidComponentData<T>;
|