@stripe/stripe-react-native 0.22.0 → 0.22.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +0 -2
  3. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +2 -3
  4. package/ios/Mappers.swift +26 -7
  5. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  6. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  7. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  8. package/lib/commonjs/components/ApplePayButton.js +1 -1
  9. package/lib/commonjs/components/ApplePayButton.js.map +1 -1
  10. package/lib/commonjs/components/ApplePayButtonNative.js +2 -0
  11. package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -0
  12. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  13. package/lib/commonjs/components/CardField.js.map +1 -1
  14. package/lib/commonjs/components/CardForm.js.map +1 -1
  15. package/lib/commonjs/components/GooglePayButton.js +1 -1
  16. package/lib/commonjs/components/GooglePayButton.js.map +1 -1
  17. package/lib/commonjs/components/GooglePayButtonNative.js +2 -0
  18. package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -0
  19. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  20. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  21. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  22. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  23. package/lib/commonjs/functions.js.map +1 -1
  24. package/lib/commonjs/helpers.js.map +1 -1
  25. package/lib/commonjs/hooks/useApplePay.js.map +1 -1
  26. package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
  27. package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
  28. package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
  29. package/lib/commonjs/hooks/useGooglePay.js.map +1 -1
  30. package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
  31. package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
  32. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  35. package/lib/commonjs/types/ApplePay.js.map +1 -1
  36. package/lib/commonjs/types/Common.js.map +1 -1
  37. package/lib/commonjs/types/Errors.js.map +1 -1
  38. package/lib/commonjs/types/FinancialConnections.js.map +1 -1
  39. package/lib/commonjs/types/GooglePay.js.map +1 -1
  40. package/lib/commonjs/types/NextAction.js.map +1 -1
  41. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  42. package/lib/commonjs/types/PaymentMethod.js.map +1 -1
  43. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  44. package/lib/commonjs/types/PlatformPay.js.map +1 -1
  45. package/lib/commonjs/types/PushProvisioning.js.map +1 -1
  46. package/lib/commonjs/types/SetupIntent.js.map +1 -1
  47. package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
  48. package/lib/commonjs/types/Token.js.map +1 -1
  49. package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
  50. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
  51. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  52. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  53. package/lib/commonjs/types/components/GooglePayButtonComponent.js +2 -0
  54. package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -0
  55. package/lib/commonjs/types/index.js +1 -1
  56. package/lib/commonjs/types/index.js.map +1 -1
  57. package/lib/module/NativeStripeSdk.js.map +1 -1
  58. package/lib/module/components/AddToWalletButton.js.map +1 -1
  59. package/lib/module/components/AddressSheet.js.map +1 -1
  60. package/lib/module/components/ApplePayButton.js +1 -1
  61. package/lib/module/components/ApplePayButton.js.map +1 -1
  62. package/lib/module/components/ApplePayButtonNative.js +2 -0
  63. package/lib/module/components/ApplePayButtonNative.js.map +1 -0
  64. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  65. package/lib/module/components/CardField.js.map +1 -1
  66. package/lib/module/components/CardForm.js.map +1 -1
  67. package/lib/module/components/GooglePayButton.js +1 -1
  68. package/lib/module/components/GooglePayButton.js.map +1 -1
  69. package/lib/module/components/GooglePayButtonNative.js +2 -0
  70. package/lib/module/components/GooglePayButtonNative.js.map +1 -0
  71. package/lib/module/components/PlatformPayButton.js +1 -1
  72. package/lib/module/components/PlatformPayButton.js.map +1 -1
  73. package/lib/module/components/StripeContainer.js.map +1 -1
  74. package/lib/module/components/StripeProvider.js.map +1 -1
  75. package/lib/module/functions.js.map +1 -1
  76. package/lib/module/helpers.js.map +1 -1
  77. package/lib/module/hooks/useApplePay.js.map +1 -1
  78. package/lib/module/hooks/useConfirmPayment.js.map +1 -1
  79. package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
  80. package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
  81. package/lib/module/hooks/useGooglePay.js.map +1 -1
  82. package/lib/module/hooks/usePaymentSheet.js.map +1 -1
  83. package/lib/module/hooks/usePlatformPay.js.map +1 -1
  84. package/lib/module/hooks/useStripe.js.map +1 -1
  85. package/lib/module/index.js.map +1 -1
  86. package/lib/module/plugin/withStripe.js.map +1 -1
  87. package/lib/module/types/ApplePay.js.map +1 -1
  88. package/lib/module/types/Common.js.map +1 -1
  89. package/lib/module/types/Errors.js.map +1 -1
  90. package/lib/module/types/FinancialConnections.js.map +1 -1
  91. package/lib/module/types/GooglePay.js.map +1 -1
  92. package/lib/module/types/NextAction.js.map +1 -1
  93. package/lib/module/types/PaymentIntent.js.map +1 -1
  94. package/lib/module/types/PaymentMethod.js.map +1 -1
  95. package/lib/module/types/PaymentSheet.js.map +1 -1
  96. package/lib/module/types/PlatformPay.js.map +1 -1
  97. package/lib/module/types/PushProvisioning.js.map +1 -1
  98. package/lib/module/types/SetupIntent.js.map +1 -1
  99. package/lib/module/types/ThreeDSecure.js.map +1 -1
  100. package/lib/module/types/Token.js.map +1 -1
  101. package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
  102. package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
  103. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  104. package/lib/module/types/components/CardFormView.js.map +1 -1
  105. package/lib/module/types/components/GooglePayButtonComponent.js +2 -0
  106. package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -0
  107. package/lib/module/types/index.js +1 -1
  108. package/lib/module/types/index.js.map +1 -1
  109. package/lib/typescript/src/components/ApplePayButton.d.ts +1 -1
  110. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +3 -0
  111. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +3 -0
  112. package/lib/typescript/src/types/Token.d.ts +1 -0
  113. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +12 -1
  114. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +6 -0
  115. package/lib/typescript/src/types/index.d.ts +2 -1
  116. package/package.json +3 -3
  117. package/src/components/ApplePayButton.tsx +3 -10
  118. package/src/components/ApplePayButtonNative.tsx +5 -0
  119. package/src/components/GooglePayButton.tsx +1 -3
  120. package/src/components/GooglePayButtonNative.tsx +7 -0
  121. package/src/components/PlatformPayButton.tsx +2 -4
  122. package/src/types/Token.ts +1 -0
  123. package/src/types/components/ApplePayButtonComponent.ts +18 -2
  124. package/src/types/components/GooglePayButtonComponent.ts +6 -0
  125. package/src/types/index.ts +2 -0
  126. package/stripe-react-native.podspec +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.22.1 - 2022-12-07
6
+
7
+ ## Fixes
8
+
9
+ - Fixed the `ShippingMethod` type to contain the `isPending` field instead of a `type` field (which previously was never correct). This reflects the inputs accepted. [#1227](https://github.com/stripe/stripe-react-native/pull/1227)
10
+ - Fixed the `ShippingMethod` type to contain the `startDate` and `endDate` keys, if applicable. [#1227](https://github.com/stripe/stripe-react-native/pull/1227)
11
+ - Fixed instances of the "duplicate registered views" error. [#1233](https://github.com/stripe/stripe-react-native/pull/1233)
12
+ - Fixed extra margin that was being added to `<CardForm />` on Android. [#1234](https://github.com/stripe/stripe-react-native/pull/1234)
13
+
5
14
  ## 0.22.0 - 2022-12-02
6
15
 
7
16
  ### Breaking changes
@@ -2,7 +2,6 @@ package com.reactnativestripesdk
2
2
 
3
3
  import android.content.res.ColorStateList
4
4
  import android.graphics.Color
5
- import android.graphics.Typeface
6
5
  import android.os.Build
7
6
  import android.text.Editable
8
7
  import android.text.InputFilter
@@ -143,7 +142,6 @@ class CardFieldView(context: ThemedReactContext) : FrameLayout(context) {
143
142
  }
144
143
  }
145
144
 
146
- mCardWidget.setPadding(40, 0, 40, 0)
147
145
  mCardWidget.background = MaterialShapeDrawable(
148
146
  ShapeAppearanceModel()
149
147
  .toBuilder()
@@ -2,12 +2,12 @@ package com.reactnativestripesdk
2
2
 
3
3
  import android.content.res.ColorStateList
4
4
  import android.graphics.Color
5
- import android.graphics.Typeface
6
5
  import android.os.Build
7
6
  import android.text.InputFilter
8
7
  import android.view.View
9
8
  import android.view.View.OnFocusChangeListener
10
9
  import android.widget.FrameLayout
10
+ import androidx.core.view.setMargins
11
11
  import com.facebook.react.bridge.ReadableMap
12
12
  import com.facebook.react.uimanager.PixelUtil
13
13
  import com.facebook.react.uimanager.ThemedReactContext
@@ -40,7 +40,7 @@ class CardFormView(context: ThemedReactContext) : FrameLayout(context) {
40
40
  init {
41
41
  cardFormViewBinding.cardMultilineWidgetContainer.isFocusable = true
42
42
  cardFormViewBinding.cardMultilineWidgetContainer.isFocusableInTouchMode = true
43
-
43
+ (cardFormViewBinding.cardMultilineWidgetContainer.layoutParams as MarginLayoutParams).setMargins(0)
44
44
  addView(cardForm)
45
45
  setListeners()
46
46
 
@@ -191,7 +191,6 @@ class CardFormView(context: ThemedReactContext) : FrameLayout(context) {
191
191
  }
192
192
  }
193
193
 
194
- cardFormViewBinding.cardMultilineWidgetContainer.setPadding(40, 0, 40, 0)
195
194
  cardFormViewBinding.cardMultilineWidgetContainer.background = MaterialShapeDrawable(
196
195
  ShapeAppearanceModel()
197
196
  .toBuilder()
package/ios/Mappers.swift CHANGED
@@ -146,7 +146,7 @@ class Mappers {
146
146
  let tokenMap: NSDictionary = [
147
147
  "id": token.tokenId,
148
148
  "bankAccount": mapFromBankAccount(token.bankAccount) ?? NSNull(),
149
- "created": convertDateToUnixTimestamp(date: token.created) ?? NSNull(),
149
+ "created": convertDateToUnixTimestampMilliseconds(date: token.created) ?? NSNull(),
150
150
  "card": mapFromCard(token.card) ?? NSNull(),
151
151
  "livemode": token.livemode,
152
152
  "type": mapFromTokenType(token.type) ?? NSNull(),
@@ -180,13 +180,24 @@ class Mappers {
180
180
  }
181
181
 
182
182
  class func mapFromShippingMethod(shippingMethod: PKShippingMethod) -> NSDictionary {
183
- let method: NSDictionary = [
183
+ let method: NSMutableDictionary = [
184
184
  "detail": shippingMethod.detail ?? "",
185
185
  "identifier": shippingMethod.identifier ?? "",
186
186
  "amount": shippingMethod.amount.stringValue,
187
- "type": shippingMethod.type,
187
+ "isPending": shippingMethod.type == .pending,
188
188
  "label": shippingMethod.label
189
189
  ]
190
+
191
+ if #available(iOS 15.0, *) {
192
+ if let dateComponentsRange = shippingMethod.dateComponentsRange {
193
+ method.setObject(
194
+ convertDateToUnixTimestampSeconds(date: dateComponentsRange.startDateComponents.date) ?? NSNull(),
195
+ forKey: "startDate" as NSCopying)
196
+ method.setObject(
197
+ convertDateToUnixTimestampSeconds(date: dateComponentsRange.endDateComponents.date) ?? NSNull(),
198
+ forKey: "endDate" as NSCopying)
199
+ }
200
+ }
190
201
 
191
202
  return method
192
203
  }
@@ -372,7 +383,7 @@ class Mappers {
372
383
  "paymentMethodId": paymentIntent.paymentMethodId ?? NSNull(),
373
384
  "captureMethod": mapCaptureMethod(paymentIntent.captureMethod),
374
385
  "confirmationMethod": mapConfirmationMethod(paymentIntent.confirmationMethod),
375
- "created": convertDateToUnixTimestamp(date: paymentIntent.created) ?? NSNull(),
386
+ "created": convertDateToUnixTimestampMilliseconds(date: paymentIntent.created) ?? NSNull(),
376
387
  "amount": paymentIntent.amount,
377
388
  "lastPaymentError": NSNull(),
378
389
  "shipping": NSNull(),
@@ -397,7 +408,7 @@ class Mappers {
397
408
  }
398
409
 
399
410
  if let canceledAt = paymentIntent.canceledAt {
400
- intent.setValue(convertDateToUnixTimestamp(date: canceledAt), forKey: "canceledAt")
411
+ intent.setValue(convertDateToUnixTimestampMilliseconds(date: canceledAt), forKey: "canceledAt")
401
412
  }
402
413
 
403
414
  return intent;
@@ -718,7 +729,7 @@ class Mappers {
718
729
  }
719
730
 
720
731
  intent.setValue(types, forKey: "paymentMethodTypes")
721
- intent.setValue(convertDateToUnixTimestamp(date: setupIntent.created), forKey: "created")
732
+ intent.setValue(convertDateToUnixTimestampMilliseconds(date: setupIntent.created), forKey: "created")
722
733
 
723
734
  if let lastSetupError = setupIntent.lastSetupError {
724
735
  let setupError: NSMutableDictionary = [
@@ -928,13 +939,21 @@ class Mappers {
928
939
  return uiCustomization
929
940
  }
930
941
 
931
- class func convertDateToUnixTimestamp(date: Date?) -> String? {
942
+ class func convertDateToUnixTimestampMilliseconds(date: Date?) -> String? {
932
943
  if let date = date {
933
944
  let value = date.timeIntervalSince1970 * 1000.0
934
945
  return String(format: "%.0f", value)
935
946
  }
936
947
  return nil
937
948
  }
949
+
950
+ class func convertDateToUnixTimestampSeconds(date: Date?) -> String? {
951
+ if let date = date {
952
+ let value = date.timeIntervalSince1970
953
+ return String(format: "%.0f", value)
954
+ }
955
+ return nil
956
+ }
938
957
 
939
958
  class func mapFromCardValidationState(state: STPCardValidationState?) -> String {
940
959
  if let state = state {
@@ -1 +1 @@
1
- {"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,yCAkIA,GAAQA,CAAAA,SAAR,CAAsBC,0BAAtB,CAAQD,SAAR,C,aAEeA,S","sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PlatformPay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n isPlatformPaySupported(params: {\n googlePay?: GooglePay.IsSupportedParams;\n }): Promise<boolean>;\n createPlatformPayPaymentMethod(\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.PaymentMethodResult>;\n dismissPlatformPay(): Promise<boolean>;\n updatePlatformPaySheet(\n summaryItems: Array<ApplePay.CartSummaryItem>,\n shippingMethods: Array<ApplePay.ShippingMethod>,\n errors: Array<PlatformPay.ApplePaySheetError>\n ): Promise<void>;\n confirmPlatformPay(\n clientSecret: string,\n params: PlatformPay.ConfirmParams,\n isPaymentIntent: boolean\n ): Promise<\n PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult\n >;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"]}
1
+ {"version":3,"names":["StripeSdk","NativeModules"],"sources":["NativeStripeSdk.tsx"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PlatformPay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n isPlatformPaySupported(params: {\n googlePay?: GooglePay.IsSupportedParams;\n }): Promise<boolean>;\n createPlatformPayPaymentMethod(\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.PaymentMethodResult>;\n dismissPlatformPay(): Promise<boolean>;\n updatePlatformPaySheet(\n summaryItems: Array<ApplePay.CartSummaryItem>,\n shippingMethods: Array<ApplePay.ShippingMethod>,\n errors: Array<PlatformPay.ApplePaySheetError>\n ): Promise<void>;\n confirmPlatformPay(\n clientSecret: string,\n params: PlatformPay.ConfirmParams,\n isPaymentIntent: boolean\n ): Promise<\n PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult\n >;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"],"mappings":"gFAAA,yCAkIA,GAAQA,UAAS,CAAKC,0BAAa,CAA3BD,SAAS,CAAmB,aAErBA,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AddToWalletButton.tsx"],"names":["AddToWalletButtonNative","AddToWalletButton","onComplete","props","value","nativeEvent"],"mappings":"wXAAA,oDACA,yC,qIAeA,GAAMA,CAAAA,uBAAuB,CAC3B,wCAA4B,mBAA5B,CADF,CAiEO,QAASC,CAAAA,iBAAT,MAA4D,IAA/BC,CAAAA,UAA+B,MAA/BA,UAA+B,CAAhBC,KAAgB,uDACjE,MACE,8BAAC,uBAAD,0BACMA,KADN,EAEE,gBAAgB,CAAE,0BAChBC,KADgB,QAIbF,CAAAA,UAAU,CAACE,KAAK,CAACC,WAAP,CAJG,EAFpB,6EADF,CAUD","sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n requireNativeComponent,\n NativeSyntheticEvent,\n ImageSourcePropType,\n} from 'react-native';\nimport type {\n Token,\n CardActionError,\n StripeError,\n GooglePayCardToken,\n} from '../types';\n\nconst AddToWalletButtonNative =\n requireNativeComponent<any>('AddToWalletButton');\n\n/**\n * Add to wallet button component props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n /** Sets the Apple Wallet/Google Pay button style. If the button is placed over a dark background, set this to 'onDarkBackground', otherwise set to 'onLightBackground'. */\n iOSButtonStyle?: 'onDarkBackground' | 'onLightBackground';\n /** The image asset to use as the Google Pay button. Downloadable from https://developers.google.com/pay/issuers/apis/push-provisioning/android/downloads/flutter/googlepay_flutter_buttons.zip */\n androidAssetSource: ImageSourcePropType;\n testID?: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If true, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n /** Details of the Issued Card you'd like added to the device's wallet */\n cardDetails: {\n /** The `primary_account_identifier` value from the issued card. */\n primaryAccountIdentifier: string | null;\n /** The card holder name (used only on iOS) */\n name: string;\n /** A user-facing description of the card. Required on Android.*/\n description: string;\n /** Last 4 digits of the card, only used on iOS */\n lastFour?: string;\n /** Optional, only used on iOS */\n brand?: Token.CardBrand;\n };\n // Optional, only for Android and only for cards that are in the \"yellow path\" (as defined by Google- https://developers.google.com/pay/issuers/apis/push-provisioning/android/wallet-operations#resolving_yellow_path). Obtain this value via the `isCardInWallet` method.\n token?: GooglePayCardToken | null;\n /** Used by stripe to securely obtain card info of the card being provisioned. */\n ephemeralKey: object;\n /** Called when the flow completes. If the `error` field is `null`, then the card was successfully added to the user's native wallet. */\n onComplete(result: { error: StripeError<CardActionError> | null }): void;\n}\n\n/**\n * Add to wallet button\n *\n * @example\n * ```ts\n * <AddToWalletButton\n * testEnv={true}\n * style={styles.myButtonStyle}\n * iOSButtonStyle=\"onLightBackground\"\n * cardDetails={{\n * primaryAccountIdentifier: \"V-123\",\n * name: \"David Wallace\",\n * lastFour: \"4242\",\n * }}\n * ephemeralKey={myEphemeralKey} // This object is retrieved from your server. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#update-your-backend\n * onComplete={(error) => {\n * Alert.alert(\n * error ? error.code : 'Success',\n * error\n * ? error.message\n * : 'Card was successfully added to the wallet.'\n * );\n * }}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AddToWalletButton({ onComplete, ...props }: Props) {\n return (\n <AddToWalletButtonNative\n {...props}\n onCompleteAction={(\n value: NativeSyntheticEvent<{\n error: StripeError<CardActionError> | null;\n }>\n ) => onComplete(value.nativeEvent)}\n />\n );\n}\n"]}
1
+ {"version":3,"names":["AddToWalletButtonNative","requireNativeComponent","AddToWalletButton","onComplete","props","value","nativeEvent"],"sources":["AddToWalletButton.tsx"],"sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n requireNativeComponent,\n NativeSyntheticEvent,\n ImageSourcePropType,\n} from 'react-native';\nimport type {\n Token,\n CardActionError,\n StripeError,\n GooglePayCardToken,\n} from '../types';\n\nconst AddToWalletButtonNative =\n requireNativeComponent<any>('AddToWalletButton');\n\n/**\n * Add to wallet button component props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n /** Sets the Apple Wallet/Google Pay button style. If the button is placed over a dark background, set this to 'onDarkBackground', otherwise set to 'onLightBackground'. */\n iOSButtonStyle?: 'onDarkBackground' | 'onLightBackground';\n /** The image asset to use as the Google Pay button. Downloadable from https://developers.google.com/pay/issuers/apis/push-provisioning/android/downloads/flutter/googlepay_flutter_buttons.zip */\n androidAssetSource: ImageSourcePropType;\n testID?: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If true, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n /** Details of the Issued Card you'd like added to the device's wallet */\n cardDetails: {\n /** The `primary_account_identifier` value from the issued card. */\n primaryAccountIdentifier: string | null;\n /** The card holder name (used only on iOS) */\n name: string;\n /** A user-facing description of the card. Required on Android.*/\n description: string;\n /** Last 4 digits of the card, only used on iOS */\n lastFour?: string;\n /** Optional, only used on iOS */\n brand?: Token.CardBrand;\n };\n // Optional, only for Android and only for cards that are in the \"yellow path\" (as defined by Google- https://developers.google.com/pay/issuers/apis/push-provisioning/android/wallet-operations#resolving_yellow_path). Obtain this value via the `isCardInWallet` method.\n token?: GooglePayCardToken | null;\n /** Used by stripe to securely obtain card info of the card being provisioned. */\n ephemeralKey: object;\n /** Called when the flow completes. If the `error` field is `null`, then the card was successfully added to the user's native wallet. */\n onComplete(result: { error: StripeError<CardActionError> | null }): void;\n}\n\n/**\n * Add to wallet button\n *\n * @example\n * ```ts\n * <AddToWalletButton\n * testEnv={true}\n * style={styles.myButtonStyle}\n * iOSButtonStyle=\"onLightBackground\"\n * cardDetails={{\n * primaryAccountIdentifier: \"V-123\",\n * name: \"David Wallace\",\n * lastFour: \"4242\",\n * }}\n * ephemeralKey={myEphemeralKey} // This object is retrieved from your server. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#update-your-backend\n * onComplete={(error) => {\n * Alert.alert(\n * error ? error.code : 'Success',\n * error\n * ? error.message\n * : 'Card was successfully added to the wallet.'\n * );\n * }}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AddToWalletButton({ onComplete, ...props }: Props) {\n return (\n <AddToWalletButtonNative\n {...props}\n onCompleteAction={(\n value: NativeSyntheticEvent<{\n error: StripeError<CardActionError> | null;\n }>\n ) => onComplete(value.nativeEvent)}\n />\n );\n}\n"],"mappings":"wXAAA,oDACA,yCAOsB,qIAQtB,GAAMA,wBAAuB,CAC3B,GAAAC,mCAAsB,EAAM,mBAAmB,CAAC,CAgE3C,QAASC,kBAAiB,MAAkC,IAA/BC,WAAU,MAAVA,UAAU,CAAKC,KAAK,uDACtD,MACE,8BAAC,uBAAuB,0BAClBA,KAAK,EACT,gBAAgB,CAAE,0BAChBC,KAEE,QACCF,WAAU,CAACE,KAAK,CAACC,WAAW,CAAC,EAAC,6EACnC,CAEN"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AddressSheet.tsx"],"names":["AddressSheetNative","AddressSheet","onSubmit","onError","props","value","nativeEvent","error"],"mappings":"8WAAA,oDACA,yC,wIAYA,GAAMA,CAAAA,kBAAkB,CAAG,wCAA4B,kBAA5B,CAA3B,CAsDO,QAASC,CAAAA,YAAT,MAA8D,IAAtCC,CAAAA,QAAsC,MAAtCA,QAAsC,CAA5BC,OAA4B,MAA5BA,OAA4B,CAAhBC,KAAgB,uDACnE,MACE,8BAAC,kBAAD,0BACMA,KADN,EAEE,cAAc,CAAE,wBAACC,KAAD,QACdH,CAAAA,QAAQ,CAACG,KAAK,CAACC,WAAP,CADM,EAFlB,CAKE,aAAa,CAAE,uBACbD,KADa,QAIVF,CAAAA,OAAO,CAACE,KAAK,CAACC,WAAN,CAAkBC,KAAnB,CAJG,EALjB,6EADF,CAaD","sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n NativeSyntheticEvent,\n} from 'react-native';\nimport type {\n PaymentSheet,\n AddressDetails,\n StripeError,\n AddressSheetError,\n} from '../types';\n\nconst AddressSheetNative = requireNativeComponent<any>('AddressSheetView');\n\n/**\n * Props\n */\nexport interface Props extends AccessibilityProps {\n /** Whether the sheet is visible. Defaults to false. */\n visible: boolean;\n /** Controls how the modal is presented (after animation). iOS only. Defaults to `popover`. */\n presentationStyle?: 'fullscreen' | 'popover';\n /** Controls how the modal animates. iOS only. */\n animationStyle?: 'flip' | 'curl' | 'slide' | 'dissolve';\n /** Configuration for the look and feel of the UI. */\n appearance?: PaymentSheet.AppearanceParams;\n /** The values to prepopulate the sheet's fields with. */\n defaultValues?: AddressDetails;\n /** Configuration for additional fields besides the physical address */\n additionalFields?: {\n /** Determines whether the phone number is hidden, required, or optional. Defaults to hidden. */\n phoneNumber?: 'hidden' | 'optional' | 'required';\n /** The label of a checkbox displayed below other fields. If null or undefined, the checkbox is not displayed. */\n checkboxLabel?: string;\n };\n /** A list of two-letter country codes representing countries the customers can select. If the list is empty (the default), we display all countries. */\n allowedCountries?: Array<string>;\n /** A list of two-letter country codes representing countries that support address autocomplete. Defaults to a list of countries that Stripe has audited to ensure a good autocomplete experience. */\n autocompleteCountries?: Array<string>;\n /** The title of the primary button displayed at the bottom of the screen. Defaults to \"Save Address\". */\n primaryButtonTitle?: string;\n /** Title displayed at the top of the sheet. Defaults to \"Address\". */\n sheetTitle?: string;\n /** Android only. Google Places api key used to provide autocomplete suggestions. When null, autocomplete is disabled on Android. */\n googlePlacesApiKey?: string;\n /** Called when the user submits their information */\n onSubmit: (result: CollectAddressResult) => void;\n /** Called when the user taps the button to close the sheet before submitting their information, or when an error occurs. */\n onError: (error: StripeError<AddressSheetError>) => void;\n}\n\nexport type CollectAddressResult = Required<AddressDetails>;\n\n/**\n *\n *\n * @example\n * ```ts\n * <AddressSheet\n *\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AddressSheet({ onSubmit, onError, ...props }: Props) {\n return (\n <AddressSheetNative\n {...props}\n onSubmitAction={(value: NativeSyntheticEvent<CollectAddressResult>) =>\n onSubmit(value.nativeEvent)\n }\n onErrorAction={(\n value: NativeSyntheticEvent<{\n error: StripeError<AddressSheetError>;\n }>\n ) => onError(value.nativeEvent.error)}\n />\n );\n}\n"]}
1
+ {"version":3,"names":["AddressSheetNative","requireNativeComponent","AddressSheet","onSubmit","onError","props","value","nativeEvent","error"],"sources":["AddressSheet.tsx"],"sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n NativeSyntheticEvent,\n} from 'react-native';\nimport type {\n PaymentSheet,\n AddressDetails,\n StripeError,\n AddressSheetError,\n} from '../types';\n\nconst AddressSheetNative = requireNativeComponent<any>('AddressSheetView');\n\n/**\n * Props\n */\nexport interface Props extends AccessibilityProps {\n /** Whether the sheet is visible. Defaults to false. */\n visible: boolean;\n /** Controls how the modal is presented (after animation). iOS only. Defaults to `popover`. */\n presentationStyle?: 'fullscreen' | 'popover';\n /** Controls how the modal animates. iOS only. */\n animationStyle?: 'flip' | 'curl' | 'slide' | 'dissolve';\n /** Configuration for the look and feel of the UI. */\n appearance?: PaymentSheet.AppearanceParams;\n /** The values to prepopulate the sheet's fields with. */\n defaultValues?: AddressDetails;\n /** Configuration for additional fields besides the physical address */\n additionalFields?: {\n /** Determines whether the phone number is hidden, required, or optional. Defaults to hidden. */\n phoneNumber?: 'hidden' | 'optional' | 'required';\n /** The label of a checkbox displayed below other fields. If null or undefined, the checkbox is not displayed. */\n checkboxLabel?: string;\n };\n /** A list of two-letter country codes representing countries the customers can select. If the list is empty (the default), we display all countries. */\n allowedCountries?: Array<string>;\n /** A list of two-letter country codes representing countries that support address autocomplete. Defaults to a list of countries that Stripe has audited to ensure a good autocomplete experience. */\n autocompleteCountries?: Array<string>;\n /** The title of the primary button displayed at the bottom of the screen. Defaults to \"Save Address\". */\n primaryButtonTitle?: string;\n /** Title displayed at the top of the sheet. Defaults to \"Address\". */\n sheetTitle?: string;\n /** Android only. Google Places api key used to provide autocomplete suggestions. When null, autocomplete is disabled on Android. */\n googlePlacesApiKey?: string;\n /** Called when the user submits their information */\n onSubmit: (result: CollectAddressResult) => void;\n /** Called when the user taps the button to close the sheet before submitting their information, or when an error occurs. */\n onError: (error: StripeError<AddressSheetError>) => void;\n}\n\nexport type CollectAddressResult = Required<AddressDetails>;\n\n/**\n *\n *\n * @example\n * ```ts\n * <AddressSheet\n *\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AddressSheet({ onSubmit, onError, ...props }: Props) {\n return (\n <AddressSheetNative\n {...props}\n onSubmitAction={(value: NativeSyntheticEvent<CollectAddressResult>) =>\n onSubmit(value.nativeEvent)\n }\n onErrorAction={(\n value: NativeSyntheticEvent<{\n error: StripeError<AddressSheetError>;\n }>\n ) => onError(value.nativeEvent.error)}\n />\n );\n}\n"],"mappings":"8WAAA,oDACA,yCAIsB,wIAQtB,GAAMA,mBAAkB,CAAG,GAAAC,mCAAsB,EAAM,kBAAkB,CAAC,CAsDnE,QAASC,aAAY,MAAyC,IAAtCC,SAAQ,MAARA,QAAQ,CAAEC,OAAO,MAAPA,OAAO,CAAKC,KAAK,uDACxD,MACE,8BAAC,kBAAkB,0BACbA,KAAK,EACT,cAAc,CAAE,wBAACC,KAAiD,QAChEH,SAAQ,CAACG,KAAK,CAACC,WAAW,CAAC,EAC5B,CACD,aAAa,CAAE,uBACbD,KAEE,QACCF,QAAO,CAACE,KAAK,CAACC,WAAW,CAACC,KAAK,CAAC,EAAC,6EACtC,CAEN"}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ApplePayButton=ApplePayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/ApplePayButton.tsx";var _excluded=["onPress","buttonStyle","type","borderRadius"];function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var ApplePayButtonNative=(0,_reactNative.requireNativeComponent)('ApplePayButton');function ApplePayButton(_ref){var onPress=_ref.onPress,_ref$buttonStyle=_ref.buttonStyle,buttonStyle=_ref$buttonStyle===void 0?'black':_ref$buttonStyle,_ref$type=_ref.type,type=_ref$type===void 0?'plain':_ref$type,_ref$borderRadius=_ref.borderRadius,borderRadius=_ref$borderRadius===void 0?4:_ref$borderRadius,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var buttonType=(0,_react.useMemo)(function(){return mapButtonType(type);},[type]);var style=(0,_react.useMemo)(function(){return mapButtonStyle(buttonStyle);},[buttonStyle]);return _react.default.createElement(ApplePayButtonNative,(0,_extends2.default)({type:buttonType,buttonStyle:style,borderRadius:borderRadius,onPressAction:onPress},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:53,columnNumber:5}}));}function mapButtonType(type){switch(type){case'plain':return 0;case'buy':return 1;case'setUp':return 2;case'inStore':return 3;case'donate':return 4;case'checkout':return 5;case'book':return 6;case'subscribe':return 7;case'reload':return 8;case'addMoney':return 9;case'topUp':return 10;case'order':return 11;case'rent':return 12;case'support':return 13;case'contribute':return 14;case'tip':return 15;default:return 0;}}function mapButtonStyle(type){switch(type){case'white':return 0;case'whiteOutline':return 1;case'black':return 2;case'automatic':return 3;default:return 2;}}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ApplePayButton=ApplePayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _ApplePayButtonNative=_interopRequireDefault(require("./ApplePayButtonNative"));var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/ApplePayButton.tsx";var _excluded=["onPress","buttonStyle","type","borderRadius"];function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ApplePayButton(_ref){var onPress=_ref.onPress,_ref$buttonStyle=_ref.buttonStyle,buttonStyle=_ref$buttonStyle===void 0?'black':_ref$buttonStyle,_ref$type=_ref.type,type=_ref$type===void 0?'plain':_ref$type,_ref$borderRadius=_ref.borderRadius,borderRadius=_ref$borderRadius===void 0?4:_ref$borderRadius,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var buttonType=(0,_react.useMemo)(function(){return mapButtonType(type);},[type]);var style=(0,_react.useMemo)(function(){return mapButtonStyle(buttonStyle);},[buttonStyle]);return _react.default.createElement(_ApplePayButtonNative.default,(0,_extends2.default)({type:buttonType,buttonStyle:style,borderRadius:borderRadius,onPressAction:onPress},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:46,columnNumber:5}}));}function mapButtonType(type){switch(type){case'plain':return 0;case'buy':return 1;case'setUp':return 2;case'inStore':return 3;case'donate':return 4;case'checkout':return 5;case'book':return 6;case'subscribe':return 7;case'reload':return 8;case'addMoney':return 9;case'topUp':return 10;case'order':return 11;case'rent':return 12;case'support':return 13;case'contribute':return 14;case'tip':return 15;default:return 0;}}function mapButtonStyle(type){switch(type){case'white':return 0;case'whiteOutline':return 1;case'black':return 2;case'automatic':return 3;default:return 2;}}
2
2
  //# sourceMappingURL=ApplePayButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ApplePayButton.tsx"],"names":["ApplePayButtonNative","ApplePayButton","onPress","buttonStyle","type","borderRadius","props","buttonType","mapButtonType","style","mapButtonStyle"],"mappings":"kXACA,qDACA,yC,6pCAOA,GAAMA,CAAAA,oBAAoB,CACxB,wCAA4D,gBAA5D,CADF,CAgCO,QAASC,CAAAA,cAAT,MAMG,IALRC,CAAAA,OAKQ,MALRA,OAKQ,uBAJRC,WAIQ,CAJRA,WAIQ,2BAJM,OAIN,iCAHRC,IAGQ,CAHRA,IAGQ,oBAHD,OAGC,kCAFRC,YAEQ,CAFRA,YAEQ,4BAFO,CAEP,mBADLC,KACK,uDACR,GAAMC,CAAAA,UAAU,CAAG,mBAAQ,iBAAMC,CAAAA,aAAa,CAACJ,IAAD,CAAnB,EAAR,CAAmC,CAACA,IAAD,CAAnC,CAAnB,CACA,GAAMK,CAAAA,KAAK,CAAG,mBAAQ,iBAAMC,CAAAA,cAAc,CAACP,WAAD,CAApB,EAAR,CAA2C,CAACA,WAAD,CAA3C,CAAd,CAEA,MACE,8BAAC,oBAAD,wBACE,IAAI,CAAEI,UADR,CAEE,WAAW,CAAEE,KAFf,CAGE,YAAY,CAAEJ,YAHhB,CAIE,aAAa,CAAEH,OAJjB,EAKMI,KALN,8EADF,CASD,CAED,QAASE,CAAAA,aAAT,CAAuBJ,IAAvB,CAA2D,CACzD,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,KAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,SAAL,CACE,MAAO,EAAP,CACF,IAAK,QAAL,CACE,MAAO,EAAP,CACF,IAAK,UAAL,CACE,MAAO,EAAP,CACF,IAAK,MAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,IAAK,QAAL,CACE,MAAO,EAAP,CACF,IAAK,UAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,GAAP,CACF,IAAK,OAAL,CACE,MAAO,GAAP,CACF,IAAK,MAAL,CACE,MAAO,GAAP,CACF,IAAK,SAAL,CACE,MAAO,GAAP,CACF,IAAK,YAAL,CACE,MAAO,GAAP,CACF,IAAK,KAAL,CACE,MAAO,GAAP,CACF,QACE,MAAO,EAAP,CAlCJ,CAoCD,CAED,QAASM,CAAAA,cAAT,CAAwBN,IAAxB,CAA6D,CAC3D,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,cAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,QACE,MAAO,EAAP,CAVJ,CAYD","sourcesContent":["import type { ApplePayButtonComponent } from '../types';\nimport React, { useMemo } from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\n\n/**\n * Apple Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: ApplePayButtonComponent.Type;\n buttonStyle?: ApplePayButtonComponent.Style;\n borderRadius?: number;\n onPress(): void;\n testID?: string;\n}\n\n/**\n * Apple Pay Button Component\n *\n * @example\n * ```ts\n * <ApplePayButton\n * onPress={pay}\n * type=\"plain\"\n * buttonStyle=\"black\"\n * borderRadius={4}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function ApplePayButton({\n onPress,\n buttonStyle = 'black',\n type = 'plain',\n borderRadius = 4,\n ...props\n}: Props) {\n const buttonType = useMemo(() => mapButtonType(type), [type]);\n const style = useMemo(() => mapButtonStyle(buttonStyle), [buttonStyle]);\n\n return (\n <ApplePayButtonNative\n type={buttonType}\n buttonStyle={style}\n borderRadius={borderRadius}\n onPressAction={onPress}\n {...props}\n />\n );\n}\n\nfunction mapButtonType(type: ApplePayButtonComponent.Type) {\n switch (type) {\n case 'plain':\n return 0;\n case 'buy':\n return 1;\n case 'setUp':\n return 2;\n case 'inStore':\n return 3;\n case 'donate':\n return 4;\n case 'checkout':\n return 5;\n case 'book':\n return 6;\n case 'subscribe':\n return 7;\n case 'reload':\n return 8;\n case 'addMoney':\n return 9;\n case 'topUp':\n return 10;\n case 'order':\n return 11;\n case 'rent':\n return 12;\n case 'support':\n return 13;\n case 'contribute':\n return 14;\n case 'tip':\n return 15;\n default:\n return 0;\n }\n}\n\nfunction mapButtonStyle(type: ApplePayButtonComponent.Style) {\n switch (type) {\n case 'white':\n return 0;\n case 'whiteOutline':\n return 1;\n case 'black':\n return 2;\n case 'automatic':\n return 3;\n default:\n return 2;\n }\n}\n"]}
1
+ {"version":3,"names":["ApplePayButton","onPress","buttonStyle","type","borderRadius","props","buttonType","useMemo","mapButtonType","style","mapButtonStyle"],"sources":["ApplePayButton.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport ApplePayButtonNative from './ApplePayButtonNative';\nimport type { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';\nimport type { ApplePayButtonComponent } from '../types';\n\n/**\n * Apple Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: ApplePayButtonComponent.Type;\n buttonStyle?: ApplePayButtonComponent.Style;\n borderRadius?: number;\n onPress(): void;\n testID?: string;\n}\n\n/**\n * Apple Pay Button Component\n *\n * @example\n * ```ts\n * <ApplePayButton\n * onPress={pay}\n * type=\"plain\"\n * buttonStyle=\"black\"\n * borderRadius={4}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function ApplePayButton({\n onPress,\n buttonStyle = 'black',\n type = 'plain',\n borderRadius = 4,\n ...props\n}: Props) {\n const buttonType = useMemo(() => mapButtonType(type), [type]);\n const style = useMemo(() => mapButtonStyle(buttonStyle), [buttonStyle]);\n\n return (\n <ApplePayButtonNative\n type={buttonType}\n buttonStyle={style}\n borderRadius={borderRadius}\n onPressAction={onPress}\n {...props}\n />\n );\n}\n\nfunction mapButtonType(type: ApplePayButtonComponent.Type) {\n switch (type) {\n case 'plain':\n return 0;\n case 'buy':\n return 1;\n case 'setUp':\n return 2;\n case 'inStore':\n return 3;\n case 'donate':\n return 4;\n case 'checkout':\n return 5;\n case 'book':\n return 6;\n case 'subscribe':\n return 7;\n case 'reload':\n return 8;\n case 'addMoney':\n return 9;\n case 'topUp':\n return 10;\n case 'order':\n return 11;\n case 'rent':\n return 12;\n case 'support':\n return 13;\n case 'contribute':\n return 14;\n case 'tip':\n return 15;\n default:\n return 0;\n }\n}\n\nfunction mapButtonStyle(type: ApplePayButtonComponent.Style) {\n switch (type) {\n case 'white':\n return 0;\n case 'whiteOutline':\n return 1;\n case 'black':\n return 2;\n case 'automatic':\n return 3;\n default:\n return 2;\n }\n}\n"],"mappings":"kXAAA,qDACA,oFAA0D,6pCAiCnD,QAASA,eAAc,MAMpB,IALRC,QAAO,MAAPA,OAAO,uBACPC,WAAW,CAAXA,WAAW,2BAAG,OAAO,iCACrBC,IAAI,CAAJA,IAAI,oBAAG,OAAO,kCACdC,YAAY,CAAZA,YAAY,4BAAG,CAAC,mBACbC,KAAK,uDAER,GAAMC,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 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var ApplePayButtonNative=(0,_reactNative.requireNativeComponent)('ApplePayButton');var _default=ApplePayButtonNative;exports.default=_default;
2
+ //# sourceMappingURL=ApplePayButtonNative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ApplePayButtonNative","requireNativeComponent"],"sources":["ApplePayButtonNative.tsx"],"sourcesContent":["import { requireNativeComponent } from 'react-native';\nimport type { ApplePayButtonComponent } from '../types';\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\nexport default ApplePayButtonNative;\n"],"mappings":"gFAAA,yCAEA,GAAMA,qBAAoB,CACxB,GAAAC,mCAAsB,EAAsC,gBAAgB,CAAC,CAAC,aACjED,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AuBECSDebitForm.tsx"],"names":["AuBECSDebitFormNative","AuBECSDebitForm","onComplete","companyName","formStyle","props","value","nativeEvent"],"mappings":"oXAAA,oDACA,yC,6JAQA,GAAMA,CAAAA,qBAAqB,CACzB,wCACE,iBADF,CADF,CA+BO,QAASC,CAAAA,eAAT,MAKG,IAJRC,CAAAA,UAIQ,MAJRA,UAIQ,CAHRC,WAGQ,MAHRA,WAGQ,CAFRC,SAEQ,MAFRA,SAEQ,CADLC,KACK,uDACR,MACE,8BAAC,qBAAD,wBACE,gBAAgB,CAAE,0BAACC,KAAD,QAAWJ,CAAAA,UAAU,CAACI,KAAK,CAACC,WAAP,CAArB,EADpB,CAEE,WAAW,CAAEJ,WAFf,CAGE,SAAS,kBAAOC,SAAP,CAHX,EAIMC,KAJN,8EADF,CAQD","sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport type { AuBECSDebitFormComponent } from '../types';\n\nconst AuBECSDebitFormNative =\n requireNativeComponent<AuBECSDebitFormComponent.NativeProps>(\n 'AuBECSDebitForm'\n );\n\n/**\n * BECS Debit Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n companyName: string;\n onComplete(value: AuBECSDebitFormComponent.FormDetails): void;\n formStyle?: AuBECSDebitFormComponent.Styles;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * BECS Debit form component\n *\n * @example\n * ```ts\n * <AuBECSDebitForm\n * companyName=\"Example Company Inc.\"\n * onComplete={value => onComplete(value)}\n * style={{ width: '100%', height: 500 }}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AuBECSDebitForm({\n onComplete,\n companyName,\n formStyle,\n ...props\n}: Props) {\n return (\n <AuBECSDebitFormNative\n onCompleteAction={(value) => onComplete(value.nativeEvent)}\n companyName={companyName}\n formStyle={{ ...formStyle }}\n {...props}\n />\n );\n}\n"]}
1
+ {"version":3,"names":["AuBECSDebitFormNative","requireNativeComponent","AuBECSDebitForm","onComplete","companyName","formStyle","props","value","nativeEvent"],"sources":["AuBECSDebitForm.tsx"],"sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport type { AuBECSDebitFormComponent } from '../types';\n\nconst AuBECSDebitFormNative =\n requireNativeComponent<AuBECSDebitFormComponent.NativeProps>(\n 'AuBECSDebitForm'\n );\n\n/**\n * BECS Debit Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n companyName: string;\n onComplete(value: AuBECSDebitFormComponent.FormDetails): void;\n formStyle?: AuBECSDebitFormComponent.Styles;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * BECS Debit form component\n *\n * @example\n * ```ts\n * <AuBECSDebitForm\n * companyName=\"Example Company Inc.\"\n * onComplete={value => onComplete(value)}\n * style={{ width: '100%', height: 500 }}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AuBECSDebitForm({\n onComplete,\n companyName,\n formStyle,\n ...props\n}: Props) {\n return (\n <AuBECSDebitFormNative\n onCompleteAction={(value) => onComplete(value.nativeEvent)}\n companyName={companyName}\n formStyle={{ ...formStyle }}\n {...props}\n />\n );\n}\n"],"mappings":"oXAAA,oDACA,yCAKsB,6JAGtB,GAAMA,sBAAqB,CACzB,GAAAC,mCAAsB,EACpB,iBAAiB,CAClB,CA4BI,QAASC,gBAAe,MAKrB,IAJRC,WAAU,MAAVA,UAAU,CACVC,WAAW,MAAXA,WAAW,CACXC,SAAS,MAATA,SAAS,CACNC,KAAK,uDAER,MACE,8BAAC,qBAAqB,wBACpB,gBAAgB,CAAE,0BAACC,KAAK,QAAKJ,WAAU,CAACI,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3D,WAAW,CAAEJ,WAAY,CACzB,SAAS,kBAAOC,SAAS,CAAG,EACxBC,KAAK,8EACT,CAEN"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CardField.tsx"],"names":["CardFieldNative","CardField","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode","props","inputRef","onCardChangeHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","current","focus","UIManager","dispatchViewManagerCommand","blur","clear","inputRefValue","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"mappings":"qWACA,qDAOA,yCASA,mC,otCAOA,GAAMA,CAAAA,eAAe,CACnB,wCAAmD,WAAnD,CADF,CA8CO,GAAMC,CAAAA,SAAS,CAAG,sBACvB,cAWEC,GAXF,CAYK,IAVDC,CAAAA,YAUC,MAVDA,YAUC,CATDC,OASC,MATDA,OASC,CARDC,MAQC,MARDA,MAQC,CAPDC,SAOC,MAPDA,SAOC,CANDC,YAMC,MANDA,YAMC,CALDC,iBAKC,MALDA,iBAKC,CAJDC,WAIC,MA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,YAAY,CAAEC,mBAFhB,CAGE,aAAa,CAAEoB,cAHjB,CAIE,iBAAiB,CAAExB,iBAAF,OAAEA,iBAAF,CAAuB,IAJ1C,CAKE,WAAW,CAAEC,WAAF,OAAEA,WAAF,CAAiB,IAL9B,CAME,SAAS,CAAE,CACTgC,eAAe,CAAEnC,SAAF,cAAEA,SAAS,CAAEmC,eADnB,CAETC,WAAW,CAAEpC,SAAF,cAAEA,SAAS,CAAEoC,WAFf,CAGTC,WAAW,CAAErC,SAAF,cAAEA,SAAS,CAAEqC,WAHf,CAITC,YAAY,CAAEtC,SAAF,cAAEA,SAAS,CAAEsC,YAJhB,CAKTC,WAAW,CAAEvC,SAAF,cAAEA,SAAS,CAAEuC,WALf,CAMTC,QAAQ,CAAExC,SAAF,cAAEA,SAAS,CAAEwC,QANZ,CAOTC,gBAAgB,CAAEzC,SAAF,cAAEA,SAAS,CAAEyC,gBAPpB,CAQTC,SAAS,CAAE1C,SAAF,cAAEA,SAAS,CAAE0C,SARb,CASTC,cAAc,CAAE3C,SAAF,cAAEA,SAAS,CAAE2C,cATlB,CAUTC,UAAU,CAAE5C,SAAF,cAAEA,SAAS,CAAE4C,UAVd,CANb,CAkBE,YAAY,CAAE,CACZvB,MAAM,CAAEpB,YAAF,cAAEA,YAAY,CAAEoB,MADV,CAEZwB,UAAU,CAAE5C,YAAF,cAAEA,YAAY,CAAE4C,UAFd,CAGZvB,GAAG,CAAErB,YAAF,cAAEA,YAAY,CAAEqB,GAHP,CAIZF,UAAU,CAAEnB,YAAF,cAAEA,YAAY,CAAEmB,UAJd,CAlBhB,EAwBMhB,KAxBN,gFADF,CA4BD,CArIsB,CAAlB,C","sourcesContent":["import type { CardFieldInput } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFieldNative =\n requireNativeComponent<CardFieldInput.NativeProps>('CardField');\n\n/**\n * Card Field Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n /** Controls if a postal code entry field can be displayed to the user. If true, the type of code entry shown is controlled by the set countryCode prop. Some country codes may result in no postal code entry being shown if those countries do not commonly use postal codes. If false, no postal code entry will ever be displayed. Defaults to true.*/\n postalCodeEnabled?: boolean;\n /** Controls the postal code entry shown (if the postalCodeEnabled prop is set to true). Defaults to the device's default locale. */\n countryCode?: string;\n cardStyle?: CardFieldInput.Styles;\n placeholders?: CardFieldInput.Placeholders;\n autofocus?: boolean;\n onCardChange?(card: CardFieldInput.Details): void;\n onBlur?(): void;\n onFocus?(focusedField: CardFieldInput.FieldName | null): void;\n testID?: string;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onCardChange` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Field Component\n *\n * @example\n * ```ts\n * <CardField\n * postalCodeEnabled={false}\n * onCardChange={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 50}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardField = forwardRef<CardFieldInput.Methods, Props>(\n (\n {\n onCardChange,\n onFocus,\n onBlur,\n cardStyle,\n placeholders,\n postalCodeEnabled,\n countryCode,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onCardChangeHandler = useCallback(\n (event: NativeSyntheticEvent<CardFieldInput.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFieldInput.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n validExpiryDate: card.validExpiryDate,\n validNumber: card.validNumber,\n validCVC: card.validCVC,\n };\n\n if (card.hasOwnProperty('postalCode')) {\n data.postalCode = card.postalCode || '';\n }\n if (card.hasOwnProperty('number') || card.hasOwnProperty('cvc')) {\n data.number = card.number || '';\n data.cvc = card.cvc || '';\n if (__DEV__ && onCardChange && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onCardChange?.(data);\n },\n [onCardChange]\n );\n\n const onFocusHandler = useCallback(\n (event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n onFocus?.(focusedField);\n } else {\n onBlur?.();\n }\n },\n [onFocus, onBlur]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n const clear = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'clear' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n clear,\n }));\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFieldNative\n ref={inputRef}\n onCardChange={onCardChangeHandler}\n onFocusChange={onFocusHandler}\n postalCodeEnabled={postalCodeEnabled ?? true}\n countryCode={countryCode ?? null}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n }}\n placeholders={{\n number: placeholders?.number,\n expiration: placeholders?.expiration,\n cvc: placeholders?.cvc,\n postalCode: placeholders?.postalCode,\n }}\n {...props}\n />\n );\n }\n);\n"]}
1
+ {"version":3,"names":["CardFieldNative","requireNativeComponent","CardField","forwardRef","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode","props","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sources":["CardField.tsx"],"sourcesContent":["import type { CardFieldInput } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFieldNative =\n requireNativeComponent<CardFieldInput.NativeProps>('CardField');\n\n/**\n * Card Field Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n /** Controls if a postal code entry field can be displayed to the user. If true, the type of code entry shown is controlled by the set countryCode prop. Some country codes may result in no postal code entry being shown if those countries do not commonly use postal codes. If false, no postal code entry will ever be displayed. Defaults to true.*/\n postalCodeEnabled?: boolean;\n /** Controls the postal code entry shown (if the postalCodeEnabled prop is set to true). Defaults to the device's default locale. */\n countryCode?: string;\n cardStyle?: CardFieldInput.Styles;\n placeholders?: CardFieldInput.Placeholders;\n autofocus?: boolean;\n onCardChange?(card: CardFieldInput.Details): void;\n onBlur?(): void;\n onFocus?(focusedField: CardFieldInput.FieldName | null): void;\n testID?: string;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onCardChange` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Field Component\n *\n * @example\n * ```ts\n * <CardField\n * postalCodeEnabled={false}\n * onCardChange={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 50}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardField = forwardRef<CardFieldInput.Methods, Props>(\n (\n {\n onCardChange,\n onFocus,\n onBlur,\n cardStyle,\n placeholders,\n postalCodeEnabled,\n countryCode,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onCardChangeHandler = useCallback(\n (event: NativeSyntheticEvent<CardFieldInput.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFieldInput.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n validExpiryDate: card.validExpiryDate,\n validNumber: card.validNumber,\n validCVC: card.validCVC,\n };\n\n if (card.hasOwnProperty('postalCode')) {\n data.postalCode = card.postalCode || '';\n }\n if (card.hasOwnProperty('number') || card.hasOwnProperty('cvc')) {\n data.number = card.number || '';\n data.cvc = card.cvc || '';\n if (__DEV__ && onCardChange && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onCardChange?.(data);\n },\n [onCardChange]\n );\n\n const onFocusHandler = useCallback(\n (event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n onFocus?.(focusedField);\n } else {\n onBlur?.();\n }\n },\n [onFocus, onBlur]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n const clear = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'clear' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n clear,\n }));\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFieldNative\n ref={inputRef}\n onCardChange={onCardChangeHandler}\n onFocusChange={onFocusHandler}\n postalCodeEnabled={postalCodeEnabled ?? true}\n countryCode={countryCode ?? null}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n }}\n placeholders={{\n number: placeholders?.number,\n expiration: placeholders?.expiration,\n cvc: placeholders?.cvc,\n postalCode: placeholders?.postalCode,\n }}\n {...props}\n />\n );\n }\n);\n"],"mappings":"qWACA,qDAOA,yCASA,mCAKoB,otCAEpB,GAAMA,gBAAe,CACnB,GAAAC,mCAAsB,EAA6B,WAAW,CAAC,CA6C1D,GAAMC,UAAS,CAAG,GAAAC,iBAAU,EACjC,cAWEC,GAAG,CACA,IAVDC,aAAY,MAAZA,YAAY,CACZC,OAAO,MAAPA,OAAO,CACPC,MAAM,MAANA,MAAM,CACNC,SAAS,MAATA,SAAS,CACTC,YAAY,MAAZA,YAAY,CACZC,iBAAiB,MAAjBA,iBAAiB,CACjBC,WAAW,MAAXA,WAAW,CACRC,KAAK,uDAIV,GAAMC,SAAQ,CAAG,GAAAC,aAAM,EAAM,IAAI,CAAC,CAElC,GAAMC,oBAAmB,CAAG,GAAAC,kBAAW,EACrC,SAACC,KAAmD,CAAK,CACvD,GAAMC,KAAI,CAAGD,KAAK,CAACE,WAAW,CAE9B,GAAMC,KAA4B,CAAG,CACnCC,KAAK,CAAEH,IAAI,CAACG,KAAK,CACjBC,WAAW,CAAEJ,IAAI,CAACI,WAAW,CAC7BC,UAAU,CAAEL,IAAI,CAACK,UAAU,CAC3BC,QAAQ,CAAEN,IAAI,CAACM,QAAQ,CACvBC,KAAK,CAAEP,IAAI,CAACO,KAAK,CACjBC,eAAe,CAAER,IAAI,CAACQ,eAAe,CACrCC,WAAW,CAAET,IAAI,CAACS,WAAW,CAC7BC,QAAQ,CAAEV,IAAI,CAACU,QACjB,CAAC,CAED,GAAIV,IAAI,CAACW,cAAc,CAAC,YAAY,CAAC,CAAE,CACrCT,IAAI,CAACU,UAAU,CAAGZ,IAAI,CAACY,UAAU,EAAI,EAAE,CACzC,CACA,GAAIZ,IAAI,CAACW,cAAc,CAAC,QAAQ,CAAC,EAAIX,IA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pD,SAAS,cAATA,SAAS,CAAEoD,cAAc,CACzCC,UAAU,CAAErD,SAAS,cAATA,SAAS,CAAEqD,UACzB,CAAE,CACF,YAAY,CAAE,CACZ9B,MAAM,CAAEtB,YAAY,cAAZA,YAAY,CAAEsB,MAAM,CAC5B+B,UAAU,CAAErD,YAAY,cAAZA,YAAY,CAAEqD,UAAU,CACpC9B,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,EACElB,KAAK,gFACT,CAEN,CAAC,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CardForm.tsx"],"names":["CardFormNative","CardForm","ref","onFormComplete","cardStyle","placeholders","defaultValues","props","inputRef","onFormCompleteHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","hasOwnProperty","number","cvc","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","current","blur","onFocusHandler","focusedField","inputRefValue","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"mappings":"oWACA,qDAOA,yCASA,mC,grCAOA,GAAMA,CAAAA,cAAc,CAClB,wCAAiD,UAAjD,CADF,CAmDO,GAAMC,CAAAA,QAAQ,CAAG,sBACtB,cAYEC,GAZF,CAaK,IAXDC,CAAAA,cAWC,MAXDA,cAWC,CAVDC,SAUC,MAVDA,SAUC,CALDC,YAKC,MALDA,YAKC,CAJDC,aAIC,MAJDA,aAIC,CAHEC,KAGF,uDACH,GAAMC,CAAAA,QAAQ,CAAG,kBAAY,IAAZ,CAAjB,CAEA,GAAMC,CAAAA,qBAAqB,CAAG,uBAC5B,SAACC,KAAD,CAAuD,CACrD,GAAMC,CAAAA,IAAI,CAAGD,KAAK,CAACE,WAAnB,CAEA,GAAMC,CAAAA,IAA0B,CAAG,CACjCC,KAAK,CAAEH,IAAI,CAACG,KADqB,CA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GAAG,CAAElB,YAAF,cAAEA,YAAY,CAAEkB,GAHP,CAIZH,UAAU,CAAEf,YAAF,cAAEA,YAAY,CAAEe,UAJd,CAlBhB,CAwBE,aAAa,kBACPd,aADO,OACPA,aADO,CACU,EADV,CAxBf,CA2BE,aAAa,CAAE0B,cA3BjB,EA6BMzB,KA7BN,gFADF,CAiCD,CA3HqB,CAAjB,C","sourcesContent":["import type { CardFormView } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFormNative =\n requireNativeComponent<CardFormView.NativeProps>('CardForm');\n\n/**\n * Card Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n testID?: string;\n\n /** All styles except backgroundColor, cursorColor, borderColor, and borderRadius are Android only */\n cardStyle?: CardFormView.Styles;\n // isUserInteractionEnabled?: boolean;\n\n // TODO: will make it public when iOS SDK allows for this\n // postalCodeEnabled?: boolean;\n\n /** Android only */\n placeholders?: CardFormView.Placeholders;\n /** Android only */\n defaultValues?: CardFormView.DefaultValues;\n // onBlur?(): void;\n // onFocus?(focusedField: CardFormView.FieldNames | null): void;\n onFormComplete?(card: CardFormView.Details): void;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onFormComplete` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Form Component\n *\n * @example\n * ```ts\n * <CardForm\n * onFormComplete={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 200}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardForm = forwardRef<CardFormView.Methods, Props>(\n (\n {\n onFormComplete,\n cardStyle,\n // isUserInteractionEnabled = true,\n // postalCodeEnabled = true,\n // onFocus,\n // onBlur,\n placeholders,\n defaultValues,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onFormCompleteHandler = useCallback(\n (event: NativeSyntheticEvent<CardFormView.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFormView.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n country: card.country,\n postalCode: card.postalCode,\n };\n\n if (card.hasOwnProperty('number') || card.hasOwnProperty('cvc')) {\n data.number = card.number || '';\n data.cvc = card.cvc || '';\n if (__DEV__ && onFormComplete && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onFormComplete?.(data);\n },\n [onFormComplete]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n }));\n\n const onFocusHandler = useCallback((event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n // onFocus?.(focusedField);\n } else {\n // onBlur?.();\n }\n }, []);\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFormNative\n ref={inputRef}\n onFormComplete={onFormCompleteHandler}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n // disabledBackgroundColor: cardStyle?.disabledBackgroundColor,\n // type: cardStyle?.type,\n }}\n // isUserInteractionEnabledValue={isUserInteractionEnabled}\n placeholders={{\n number: placeholders?.number,\n expiration: placeholders?.expiration,\n cvc: placeholders?.cvc,\n postalCode: placeholders?.postalCode,\n }}\n defaultValues={{\n ...(defaultValues ?? {}),\n }}\n onFocusChange={onFocusHandler}\n // postalCodeEnabled={postalCodeEnabled}\n {...props}\n />\n );\n }\n);\n"]}
1
+ {"version":3,"names":["CardFormNative","requireNativeComponent","CardForm","forwardRef","ref","onFormComplete","cardStyle","placeholders","defaultValues","props","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","hasOwnProperty","number","cvc","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sources":["CardForm.tsx"],"sourcesContent":["import type { CardFormView } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFormNative =\n requireNativeComponent<CardFormView.NativeProps>('CardForm');\n\n/**\n * Card Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n testID?: string;\n\n /** All styles except backgroundColor, cursorColor, borderColor, and borderRadius are Android only */\n cardStyle?: CardFormView.Styles;\n // isUserInteractionEnabled?: boolean;\n\n // TODO: will make it public when iOS SDK allows for this\n // postalCodeEnabled?: boolean;\n\n /** Android only */\n placeholders?: CardFormView.Placeholders;\n /** Android only */\n defaultValues?: CardFormView.DefaultValues;\n // onBlur?(): void;\n // onFocus?(focusedField: CardFormView.FieldNames | null): void;\n onFormComplete?(card: CardFormView.Details): void;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onFormComplete` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Form Component\n *\n * @example\n * ```ts\n * <CardForm\n * onFormComplete={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 200}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardForm = forwardRef<CardFormView.Methods, Props>(\n (\n {\n onFormComplete,\n cardStyle,\n // isUserInteractionEnabled = true,\n // postalCodeEnabled = true,\n // onFocus,\n // onBlur,\n placeholders,\n defaultValues,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onFormCompleteHandler = useCallback(\n (event: NativeSyntheticEvent<CardFormView.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFormView.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n country: card.country,\n postalCode: card.postalCode,\n };\n\n if (card.hasOwnProperty('number') || card.hasOwnProperty('cvc')) {\n data.number = card.number || '';\n data.cvc = card.cvc || '';\n if (__DEV__ && onFormComplete && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onFormComplete?.(data);\n },\n [onFormComplete]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n }));\n\n const onFocusHandler = useCallback((event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n // onFocus?.(focusedField);\n } else {\n // onBlur?.();\n }\n }, []);\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFormNative\n ref={inputRef}\n onFormComplete={onFormCompleteHandler}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n // disabledBackgroundColor: cardStyle?.disabledBackgroundColor,\n // type: cardStyle?.type,\n }}\n // isUserInteractionEnabledValue={isUserInteractionEnabled}\n placeholders={{\n number: placeholders?.number,\n expiration: placeholders?.expiration,\n cvc: placeholders?.cvc,\n postalCode: placeholders?.postalCode,\n }}\n defaultValues={{\n ...(defaultValues ?? {}),\n }}\n onFocusChange={onFocusHandler}\n // postalCodeEnabled={postalCodeEnabled}\n {...props}\n />\n );\n }\n);\n"],"mappings":"oWACA,qDAOA,yCASA,mCAKoB,grCAEpB,GAAMA,eAAc,CAClB,GAAAC,mCAAsB,EAA2B,UAAU,CAAC,CAkDvD,GAAMC,SAAQ,CAAG,GAAAC,iBAAU,EAChC,cAYEC,GAAG,CACA,IAXDC,eAAc,MAAdA,cAAc,CACdC,SAAS,MAATA,SAAS,CAKTC,YAAY,MAAZA,YAAY,CACZC,aAAa,MAAbA,aAAa,CACVC,KAAK,uDAIV,GAAMC,SAAQ,CAAG,GAAAC,aAAM,EAAM,IAAI,CAAC,CAElC,GAAMC,sBAAqB,CAAG,GAAAC,kBAAW,EACvC,SAACC,KAAiD,CAAK,CACrD,GAAMC,KAAI,CAAGD,KAAK,CAACE,WAAW,CAE9B,GAAMC,KAA0B,CAAG,CACjCC,KAAK,CAAEH,IAAI,CAACG,KAAK,CACjBC,WAAW,CAAEJ,IAAI,CAACI,WAAW,CAC7BC,UAAU,CAAEL,IAAI,CAACK,UAAU,CAC3BC,QAAQ,CAAEN,IAAI,CAACM,QAAQ,CACvBC,KAAK,CAAEP,IAAI,CAACO,KAAK,CACjBC,OAAO,CAAER,IAAI,CAACQ,OAAO,CACrBC,UAAU,CAAET,IAAI,CAACS,UACnB,CAAC,CAED,GAAIT,IAAI,CAACU,cAAc,CAAC,QAAQ,CAAC,EAAIV,IAAI,CAACU,cAAc,CAAC,KAAK,CAAC,CAAE,CAC/DR,IAAI,CAACS,MAAM,CAAGX,IAAI,CAACW,MAAM,EAAI,EAAE,C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RequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.GooglePayButton=GooglePayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/GooglePayButton.tsx";var _excluded=["type","onPress","disabled"];var GooglePayButtonNative=(0,_reactNative.requireNativeComponent)('GooglePayButton');function GooglePayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?'pay':_ref$type,onPress=_ref.onPress,disabled=_ref.disabled,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return _react.default.createElement(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:1,onPress:onPress,style:disabled?styles.disabled:{},__self:this,__source:{fileName:_jsxFileName,lineNumber:45,columnNumber:5}},_react.default.createElement(GooglePayButtonNative,(0,_extends2.default)({buttonType:type},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:51,columnNumber:7}})));}var styles=_reactNative.StyleSheet.create({disabled:{opacity:0.3}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.GooglePayButton=GooglePayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _GooglePayButtonNative=_interopRequireDefault(require("./GooglePayButtonNative"));var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/GooglePayButton.tsx";var _excluded=["type","onPress","disabled"];function GooglePayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?'pay':_ref$type,onPress=_ref.onPress,disabled=_ref.disabled,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return _react.default.createElement(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:1,onPress:onPress,style:disabled?styles.disabled:{},__self:this,__source:{fileName:_jsxFileName,lineNumber:43,columnNumber:5}},_react.default.createElement(_GooglePayButtonNative.default,(0,_extends2.default)({buttonType:type},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:49,columnNumber:7}})));}var styles=_reactNative.StyleSheet.create({disabled:{opacity:0.3}});
2
2
  //# sourceMappingURL=GooglePayButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["GooglePayButton.tsx"],"names":["GooglePayButtonNative","GooglePayButton","type","onPress","disabled","props","styles","StyleSheet","create","opacity"],"mappings":"oXAAA,oDACA,yC,kJASA,GAAMA,CAAAA,qBAAqB,CAAG,wCAA4B,iBAA5B,CAA9B,CA2BO,QAASC,CAAAA,eAAT,MAKG,oBAJRC,IAIQ,CAJRA,IAIQ,oBAJD,KAIC,WAHRC,OAGQ,MAHRA,OAGQ,CAFRC,QAEQ,MAFRA,QAEQ,CADLC,KACK,uDACR,MACE,8BAAC,6BAAD,EACE,QAAQ,CAAED,QADZ,CAEE,aAAa,CAAE,CAFjB,CAGE,OAAO,CAAED,OAHX,CAIE,KAAK,CAAEC,QAAQ,CAAGE,MAAM,CAACF,QAAV,CAAqB,EAJtC,4EAME,6BAAC,qBAAD,wBAAuB,UAAU,CAAEF,IAAnC,EAA6CG,KAA7C,8EANF,CADF,CAUD,CAED,GAAMC,CAAAA,MAAM,CAAGC,wBAAWC,MAAX,CAAkB,CAC/BJ,QAAQ,CAAE,CACRK,OAAO,CAAE,GADD,CADqB,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n requireNativeComponent,\n TouchableOpacity,\n StyleSheet,\n} from 'react-native';\n\nconst GooglePayButtonNative = requireNativeComponent<any>('GooglePayButton');\n\n/**\n * Google Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: 'pay' | 'standard';\n onPress(): void;\n disabled?: boolean;\n testID?: string;\n}\n\n/**\n * Google Pay Button Component\n *\n * @example\n * ```ts\n * <GooglePayButton\n * onPress={pay}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function GooglePayButton({\n type = 'pay',\n onPress,\n disabled,\n ...props\n}: Props) {\n return (\n <TouchableOpacity\n disabled={disabled}\n activeOpacity={1}\n onPress={onPress}\n style={disabled ? styles.disabled : {}}\n >\n <GooglePayButtonNative buttonType={type} {...props} />\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n disabled: {\n opacity: 0.3,\n },\n});\n"]}
1
+ {"version":3,"names":["GooglePayButton","type","onPress","disabled","props","styles","StyleSheet","create","opacity"],"sources":["GooglePayButton.tsx"],"sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n TouchableOpacity,\n StyleSheet,\n} from 'react-native';\nimport GooglePayButtonNative from './GooglePayButtonNative';\n\n/**\n * Google Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: 'pay' | 'standard';\n onPress(): void;\n disabled?: boolean;\n testID?: string;\n}\n\n/**\n * Google Pay Button Component\n *\n * @example\n * ```ts\n * <GooglePayButton\n * onPress={pay}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function GooglePayButton({\n type = 'pay',\n onPress,\n disabled,\n ...props\n}: Props) {\n return (\n <TouchableOpacity\n disabled={disabled}\n activeOpacity={1}\n onPress={onPress}\n style={disabled ? styles.disabled : {}}\n >\n <GooglePayButtonNative buttonType={type} {...props} />\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n disabled: {\n opacity: 0.3,\n },\n});\n"],"mappings":"oXAAA,oDACA,yCAOA,sFAA4D,kJA2BrD,QAASA,gBAAe,MAKrB,oBAJRC,IAAI,CAAJA,IAAI,oBAAG,KAAK,WACZC,OAAO,MAAPA,OAAO,CACPC,QAAQ,MAARA,QAAQ,CACLC,KAAK,uDAER,MACE,8BAAC,6BAAgB,EACf,QAAQ,CAAED,QAAS,CACnB,aAAa,CAAE,CAAE,CACjB,OAAO,CAAED,OAAQ,CACjB,KAAK,CAAEC,QAAQ,CAAGE,MAAM,CAACF,QAAQ,CAAG,CAAC,CAAE,4EAEvC,6BAAC,8BAAqB,wBAAC,UAAU,CAAEF,IAAK,EAAKG,KAAK,8EAAI,CACrC,CAEvB,CAEA,GAAMC,OAAM,CAAGC,uBAAU,CAACC,MAAM,CAAC,CAC/BJ,QAAQ,CAAE,CACRK,OAAO,CAAE,GACX,CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var GooglePayButtonNative=(0,_reactNative.requireNativeComponent)('GooglePayButton');var _default=GooglePayButtonNative;exports.default=_default;
2
+ //# sourceMappingURL=GooglePayButtonNative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GooglePayButtonNative","requireNativeComponent"],"sources":["GooglePayButtonNative.tsx"],"sourcesContent":["import { requireNativeComponent } from 'react-native';\nimport type { GooglePayButtonComponent } from '../types';\nconst GooglePayButtonNative =\n requireNativeComponent<GooglePayButtonComponent.NativeProps>(\n 'GooglePayButton'\n );\nexport default GooglePayButtonNative;\n"],"mappings":"gFAAA,yCAEA,GAAMA,sBAAqB,CACzB,GAAAC,mCAAsB,EACpB,iBAAiB,CAClB,CAAC,aACWD,qBAAqB"}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _PlatformPay=require("../types/PlatformPay");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered"];var GooglePayButtonNative=(0,_reactNative.requireNativeComponent)('GooglePayButton');var ApplePayButtonNative=(0,_reactNative.requireNativeComponent)('ApplePayButton');function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;return _react.default.createElement(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:disabled?styles.disabled:styles.notDisabled,__self:this,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:5}},_reactNative.Platform.OS==='ios'?_react.default.createElement(ApplePayButtonNative,(0,_extends2.default)({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:132,columnNumber:9}})):_react.default.createElement(GooglePayButtonNative,(0,_extends2.default)({type:type},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:9}})));}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.3},notDisabled:{flex:0}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _PlatformPay=require("../types/PlatformPay");var _GooglePayButtonNative=_interopRequireDefault(require("./GooglePayButtonNative"));var _ApplePayButtonNative=_interopRequireDefault(require("./ApplePayButtonNative"));var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered"];function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;return _react.default.createElement(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:disabled?styles.disabled:styles.notDisabled,__self:this,__source:{fileName:_jsxFileName,lineNumber:123,columnNumber:5}},_reactNative.Platform.OS==='ios'?_react.default.createElement(_ApplePayButtonNative.default,(0,_extends2.default)({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:130,columnNumber:9}})):_react.default.createElement(_GooglePayButtonNative.default,(0,_extends2.default)({type:type},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:141,columnNumber:9}})));}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.3},notDisabled:{flex:0}});
2
2
  //# sourceMappingURL=PlatformPayButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PlatformPayButton.tsx"],"names":["GooglePayButtonNative","ApplePayButtonNative","PlatformPayButton","type","ButtonType","Default","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","props","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","styles","notDisabled","Platform","OS","StyleSheet","create","flex","opacity"],"mappings":"wXAAA,oDACA,yCAUA,iD,6PAOA,GAAMA,CAAAA,qBAAqB,CAAG,wCAA4B,iBAA5B,CAA9B,CACA,GAAMC,CAAAA,oBAAoB,CAAG,wCAA4B,gBAA5B,CAA7B,CA+DO,QAASC,CAAAA,iBAAT,MAUG,oBATRC,IASQ,CATRA,IASQ,oBATDC,wBAAWC,OASV,gCARRC,UAQQ,CARRA,UAQQ,0BARKC,yBAAYC,SAQjB,iBAPRC,OAOQ,MAPRA,OAOQ,CANRC,QAMQ,MANRA,QAMQ,CALRC,YAKQ,MALRA,YAKQ,CAJRC,wBAIQ,MAJRA,wBAIQ,CAHRC,yBAGQ,MAHRA,yBAGQ,CAFRC,mBAEQ,MAFRA,mBAEQ,CADLC,KACK,uDACR,GAAMC,CAAAA,sBAAsB,CAAGJ,wBAAwB,CACnD,SACEK,KADF,CAIK,CACHL,wBAAwB,EAAIA,wBAAwB,CAACK,KAAK,CAACC,WAAP,CAApD,CACD,CAPkD,CAQnDC,SARJ,CAUA,GAAMC,CAAAA,uBAAuB,CAAGP,yBAAyB,CACrD,SACEI,KADF,CAIK,CACHJ,yBAAyB,CAACI,KAAK,CAACC,WAAP,CAAzB,CACD,CAPoD,CAQrDC,SARJ,CAUA,GAAME,CAAAA,kBAAkB,CAAGP,mBAAmB,CAC1C,SACEG,KADF,CAIK,CACHH,mBAAmB,EAAIA,mBAAmB,CAACG,KAAK,CAACC,WAAP,CAA1C,CACD,CAPyC,CAQ1CC,SARJ,CAUA,MACE,8BAAC,6BAAD,EACE,QAAQ,CAAET,QADZ,CAEE,aAAa,CAAEA,QAAQ,CAAG,GAAH,CAAS,CAFlC,CAGE,OAAO,CAAED,OAHX,CAIE,KAAK,CAAEC,QAAQ,CAAGY,MAAM,CAACZ,QAAV,CAAqBY,MAAM,CAACC,WAJ7C,6EAMGC,sBAASC,EAAT,GAAgB,KAAhB,CACC,6BAAC,oBAAD,wBACE,IAAI,CAAEtB,IADR,CAEE,WAAW,CAAEG,UAFf,CAGE,YAAY,CAAEK,YAHhB,CAIE,QAAQ,CAAED,QAJZ,CAKE,8BAA8B,CAAEM,sBALlC,CAME,+BAA+B,CAAEI,uBANnC,CAOE,yBAAyB,CAAEC,kBAP7B,EAQMN,KARN,+EADD,CAYC,6BAAC,qBAAD,wBAAuB,IAAI,CAAEZ,IAA7B,EAAuCY,KAAvC,+EAlBJ,CADF,CAuBD,CAED,GAAMO,CAAAA,MAAM,CAAGI,wBAAWC,MAAX,CAAkB,CAC/BjB,QAAQ,CAAE,CACRkB,IAAI,CAAE,CADE,CAERC,OAAO,CAAE,GAFD,CADqB,CAK/BN,WAAW,CAAE,CACXK,IAAI,CAAE,CADK,CALkB,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n requireNativeComponent,\n TouchableOpacity,\n StyleSheet,\n Platform,\n NativeSyntheticEvent,\n} from 'react-native';\nimport {\n ButtonType,\n ButtonStyle,\n ShippingMethod,\n ShippingContact,\n} from '../types/PlatformPay';\n\nconst GooglePayButtonNative = requireNativeComponent<any>('GooglePayButton');\nconst ApplePayButtonNative = requireNativeComponent<any>('ApplePayButton');\n\n/**\n * PlatformPayButton Component Props\n */\nexport interface Props extends AccessibilityProps {\n /** Sets the text displayed by the button. */\n type?: ButtonType;\n /** iOS only. Sets the coloring of the button. */\n appearance?: ButtonStyle;\n /** iOS only. Sets the border radius of the button. */\n borderRadius?: number;\n /** Function called whenever the button is pressed. */\n onPress(): void;\n /** Set to `true` to disable the button from being pressed & apply a slight opacity to indicate that it is unpressable. Defaults to false. */\n disabled?: boolean;\n /**\n * This callback is triggered whenever the user selects a shipping method in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingMethod` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingMethodSelected?: (event: {\n shippingMethod: ShippingMethod;\n }) => void;\n /**\n * This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingContact` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingContactSelected?: (event: {\n shippingContact: ShippingContact;\n }) => void;\n /**\n * This callback is triggered whenever the user inputs a coupon code in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `couponCode` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onCouponCodeEntered?: (event: { couponCode: string }) => void;\n testID?: string;\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * PlatformPayButton Component. Display the platform-specific native wallet pay button: Apple Pay on iOS, and Google Pay on Android.\n *\n * @example\n * ```ts\n * <PlatformPayButton\n * onPress={pay}\n * type={PlatformPay.ButtonType.Subscribe}\n * appearance={PlatformPay.ButtonStyle.WhiteOutline}\n * borderRadius={4}\n * disabled={!isApplePaySupported}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function PlatformPayButton({\n type = ButtonType.Default,\n appearance = ButtonStyle.Automatic,\n onPress,\n disabled,\n borderRadius,\n onShippingMethodSelected,\n onShippingContactSelected,\n onCouponCodeEntered,\n ...props\n}: Props) {\n const shippingMethodCallback = onShippingMethodSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingMethod: ShippingMethod;\n }>\n ) => {\n onShippingMethodSelected && onShippingMethodSelected(value.nativeEvent);\n }\n : undefined;\n\n const shippingContactCallback = onShippingContactSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingContact: ShippingContact;\n }>\n ) => {\n onShippingContactSelected(value.nativeEvent);\n }\n : undefined;\n\n const couponCodeCallback = onCouponCodeEntered\n ? (\n value: NativeSyntheticEvent<{\n couponCode: string;\n }>\n ) => {\n onCouponCodeEntered && onCouponCodeEntered(value.nativeEvent);\n }\n : undefined;\n\n return (\n <TouchableOpacity\n disabled={disabled}\n activeOpacity={disabled ? 0.3 : 1}\n onPress={onPress}\n style={disabled ? styles.disabled : styles.notDisabled}\n >\n {Platform.OS === 'ios' ? (\n <ApplePayButtonNative\n type={type}\n buttonStyle={appearance}\n borderRadius={borderRadius}\n disabled={disabled}\n onShippingMethodSelectedAction={shippingMethodCallback}\n onShippingContactSelectedAction={shippingContactCallback}\n onCouponCodeEnteredAction={couponCodeCallback}\n {...props}\n />\n ) : (\n <GooglePayButtonNative type={type} {...props} />\n )}\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n disabled: {\n flex: 0,\n opacity: 0.3,\n },\n notDisabled: {\n flex: 0,\n },\n});\n"]}
1
+ {"version":3,"names":["PlatformPayButton","type","ButtonType","Default","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","props","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","styles","notDisabled","Platform","OS","StyleSheet","create","flex","opacity"],"sources":["PlatformPayButton.tsx"],"sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n TouchableOpacity,\n StyleSheet,\n Platform,\n NativeSyntheticEvent,\n} from 'react-native';\nimport {\n ButtonType,\n ButtonStyle,\n ShippingMethod,\n ShippingContact,\n} from '../types/PlatformPay';\nimport GooglePayButtonNative from './GooglePayButtonNative';\nimport ApplePayButtonNative from './ApplePayButtonNative';\n\n/**\n * PlatformPayButton Component Props\n */\nexport interface Props extends AccessibilityProps {\n /** Sets the text displayed by the button. */\n type?: ButtonType;\n /** iOS only. Sets the coloring of the button. */\n appearance?: ButtonStyle;\n /** iOS only. Sets the border radius of the button. */\n borderRadius?: number;\n /** Function called whenever the button is pressed. */\n onPress(): void;\n /** Set to `true` to disable the button from being pressed & apply a slight opacity to indicate that it is unpressable. Defaults to false. */\n disabled?: boolean;\n /**\n * This callback is triggered whenever the user selects a shipping method in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingMethod` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingMethodSelected?: (event: {\n shippingMethod: ShippingMethod;\n }) => void;\n /**\n * This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingContact` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingContactSelected?: (event: {\n shippingContact: ShippingContact;\n }) => void;\n /**\n * This callback is triggered whenever the user inputs a coupon code in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `couponCode` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onCouponCodeEntered?: (event: { couponCode: string }) => void;\n testID?: string;\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * PlatformPayButton Component. Display the platform-specific native wallet pay button: Apple Pay on iOS, and Google Pay on Android.\n *\n * @example\n * ```ts\n * <PlatformPayButton\n * onPress={pay}\n * type={PlatformPay.ButtonType.Subscribe}\n * appearance={PlatformPay.ButtonStyle.WhiteOutline}\n * borderRadius={4}\n * disabled={!isApplePaySupported}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function PlatformPayButton({\n type = ButtonType.Default,\n appearance = ButtonStyle.Automatic,\n onPress,\n disabled,\n borderRadius,\n onShippingMethodSelected,\n onShippingContactSelected,\n onCouponCodeEntered,\n ...props\n}: Props) {\n const shippingMethodCallback = onShippingMethodSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingMethod: ShippingMethod;\n }>\n ) => {\n onShippingMethodSelected && onShippingMethodSelected(value.nativeEvent);\n }\n : undefined;\n\n const shippingContactCallback = onShippingContactSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingContact: ShippingContact;\n }>\n ) => {\n onShippingContactSelected(value.nativeEvent);\n }\n : undefined;\n\n const couponCodeCallback = onCouponCodeEntered\n ? (\n value: NativeSyntheticEvent<{\n couponCode: string;\n }>\n ) => {\n onCouponCodeEntered && onCouponCodeEntered(value.nativeEvent);\n }\n : undefined;\n\n return (\n <TouchableOpacity\n disabled={disabled}\n activeOpacity={disabled ? 0.3 : 1}\n onPress={onPress}\n style={disabled ? styles.disabled : styles.notDisabled}\n >\n {Platform.OS === 'ios' ? (\n <ApplePayButtonNative\n type={type}\n buttonStyle={appearance}\n borderRadius={borderRadius}\n disabled={disabled}\n onShippingMethodSelectedAction={shippingMethodCallback}\n onShippingContactSelectedAction={shippingContactCallback}\n onCouponCodeEnteredAction={couponCodeCallback}\n {...props}\n />\n ) : (\n <GooglePayButtonNative type={type} {...props} />\n )}\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n disabled: {\n flex: 0,\n opacity: 0.3,\n },\n notDisabled: {\n flex: 0,\n },\n});\n"],"mappings":"wXAAA,oDACA,yCASA,iDAMA,sFACA,oFAA0D,6PA+DnD,QAASA,kBAAiB,MAUvB,oBATRC,IAAI,CAAJA,IAAI,oBAAGC,uBAAU,CAACC,OAAO,gCACzBC,UAAU,CAAVA,UAAU,0BAAGC,wBAAW,CAACC,SAAS,iBAClCC,OAAO,MAAPA,OAAO,CACPC,QAAQ,MAARA,QAAQ,CACRC,YAAY,MAAZA,YAAY,CACZC,wBAAwB,MAAxBA,wBAAwB,CACxBC,yBAAyB,MAAzBA,yBAAyB,CACzBC,mBAAmB,MAAnBA,mBAAmB,CAChBC,KAAK,uDAER,GAAMC,uBAAsB,CAAGJ,wBAAwB,CACnD,SACEK,KAEE,CACC,CACHL,wBAAwB,EAAIA,wBAAwB,CAACK,KAAK,CAACC,WAAW,CAAC,CACzE,CAAC,CACDC,SAAS,CAEb,GAAMC,wBAAuB,CAAGP,yBAAyB,CACrD,SACEI,KAEE,CACC,CACHJ,yBAAyB,CAACI,KAAK,CAACC,WAAW,CAAC,CAC9C,CAAC,CACDC,SAAS,CAEb,GAAME,mBAAkB,CAAGP,mBAAmB,CAC1C,SACEG,KAEE,CACC,CACHH,mBAAmB,EAAIA,mBAAmB,CAACG,KAAK,CAACC,WAAW,CAAC,CAC/D,CAAC,CACDC,SAAS,CAEb,MACE,8BAAC,6BAAgB,EACf,QAAQ,CAAET,QAAS,CACnB,aAAa,CAAEA,QAAQ,CAAG,GAAG,CAAG,CAAE,CAClC,OAAO,CAAED,OAAQ,CACjB,KAAK,CAAEC,QAAQ,CAAGY,MAAM,CAACZ,QAAQ,CAAGY,MAAM,CAACC,WAAY,6EAEtDC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CACpB,6BAAC,6BAAoB,wBACnB,IAAI,CAAEtB,IAAK,CACX,WAAW,CAAEG,UAAW,CACxB,YAAY,CAAEK,YAAa,CAC3B,QAAQ,CAAED,QAAS,CACnB,8BAA8B,CAAEM,sBAAuB,CACvD,+BAA+B,CAAEI,uBAAwB,CACzD,yBAAyB,CAAEC,kBAAmB,EAC1CN,KAAK,+EACT,CAEF,6BAAC,8BAAqB,wBAAC,IAAI,CAAEZ,IAAK,EAAKY,KAAK,+EAC7C,CACgB,CAEvB,CAEA,GAAMO,OAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BjB,QAAQ,CAAE,CACRkB,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDN,WAAW,CAAE,CACXK,IAAI,CAAE,CACR,CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["StripeContainer.tsx"],"names":["StripeContainerNative","StripeContainer","keyboardShouldPersistTaps","children","styles","container","StyleSheet","create","flex"],"mappings":"oLAAA,oDAEA,yC,sGAQA,GAAMA,CAAAA,qBAAqB,CAAG,wCAA4B,iBAA5B,CAA9B,CAkBO,QAASC,CAAAA,eAAT,MAGG,IAFRC,CAAAA,yBAEQ,MAFRA,yBAEQ,CADRC,QACQ,MADRA,QACQ,CACR,MACE,8BAAC,qBAAD,EACE,yBAAyB,CAAED,yBAD7B,CAEE,KAAK,CAAEE,MAAM,CAACC,SAFhB,4EAIE,6BAAC,iBAAD,EAAM,KAAK,CAAED,MAAM,CAACC,SAApB,CAA+B,UAAU,CAAE,KAA3C,4EACGF,QADH,CAJF,CADF,CAUD,CAED,GAAMC,CAAAA,MAAM,CAAGE,wBAAWC,MAAX,CAAkB,CAC/BF,SAAS,CAAE,CACTG,IAAI,CAAE,CADG,CADoB,CAAlB,CAAf","sourcesContent":["import React from 'react';\n\nimport {\n requireNativeComponent,\n StyleProp,\n StyleSheet,\n ViewStyle,\n View,\n} from 'react-native';\n\nconst StripeContainerNative = requireNativeComponent<any>('StripeContainer');\n\n/**\n * Stripe Container Component Props\n */\nexport interface Props {\n children: React.ReactElement | React.ReactElement[];\n keyboardShouldPersistTaps?: boolean;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * StripeContainer Component\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeContainer({\n keyboardShouldPersistTaps,\n children,\n}: Props) {\n return (\n <StripeContainerNative\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n style={styles.container}\n >\n <View style={styles.container} accessible={false}>\n {children}\n </View>\n </StripeContainerNative>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
1
+ {"version":3,"names":["StripeContainerNative","requireNativeComponent","StripeContainer","keyboardShouldPersistTaps","children","styles","container","StyleSheet","create","flex"],"sources":["StripeContainer.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n requireNativeComponent,\n StyleProp,\n StyleSheet,\n ViewStyle,\n View,\n} from 'react-native';\n\nconst StripeContainerNative = requireNativeComponent<any>('StripeContainer');\n\n/**\n * Stripe Container Component Props\n */\nexport interface Props {\n children: React.ReactElement | React.ReactElement[];\n keyboardShouldPersistTaps?: boolean;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * StripeContainer Component\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeContainer({\n keyboardShouldPersistTaps,\n children,\n}: Props) {\n return (\n <StripeContainerNative\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n style={styles.container}\n >\n <View style={styles.container} accessible={false}>\n {children}\n </View>\n </StripeContainerNative>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":"oLAAA,oDAEA,yCAMsB,sGAEtB,GAAMA,sBAAqB,CAAG,GAAAC,mCAAsB,EAAM,iBAAiB,CAAC,CAkBrE,QAASC,gBAAe,MAGrB,IAFRC,0BAAyB,MAAzBA,yBAAyB,CACzBC,QAAQ,MAARA,QAAQ,CAER,MACE,8BAAC,qBAAqB,EACpB,yBAAyB,CAAED,yBAA0B,CACrD,KAAK,CAAEE,MAAM,CAACC,SAAU,4EAExB,6BAAC,iBAAI,EAAC,KAAK,CAAED,MAAM,CAACC,SAAU,CAAC,UAAU,CAAE,KAAM,4EAC9CF,QAAQ,CACJ,CACe,CAE5B,CAEA,GAAMC,OAAM,CAAGE,uBAAU,CAACC,MAAM,CAAC,CAC/BF,SAAS,CAAE,CACTG,IAAI,CAAE,CACR,CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["StripeProvider.tsx"],"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","isAndroid"],"mappings":"8SAAA,qDAEA,2EACA,mCAEA,sE,0/BAEA,GAAMA,CAAAA,eAAe,CAAG,2BAAxB,CASA,GAAMC,CAAAA,UAAe,CAAGC,iBAAMD,UAA9B,CAEA,GAAME,CAAAA,OAAgB,CAAG,CACvBC,IAAI,CAAE,mCAA2BF,iBAAME,IAAjC,SAA+CF,iBAAME,IADpC,CAKvBC,GAAG,CAAEJ,UAAU,CAACI,GAAX,EAAkBJ,UALA,CAMvBK,OAAO,CAAEJ,iBAAMI,OANQ,CAOvBC,SAAS,CAAE,mCAAwBP,eAAxB,CAA0CQ,SAP9B,CAAzB,CAUO,GAAMC,CAAAA,UAAU,oDAAG,UAAOC,MAAP,CAAmD,CAC3E,GAAMC,CAAAA,cAAgC,kBAAQD,MAAR,EAAgBP,OAAO,CAAPA,OAAhB,EAAtC,CACAS,yBAAgBC,UAAhB,CAA2BF,cAA3B,EACD,CAHsB,iBAAVF,CAAAA,UAAU,4CAAhB,C,8BAyBA,QAASK,CAAAA,cAAT,OAQG,IAPRC,CAAAA,QAOQ,OAPRA,QAOQ,CANRC,cAMQ,OANRA,cAMQ,CALRC,kBAKQ,OALRA,kBAKQ,CAJRC,kBAIQ,OAJRA,kBAIQ,CAHRC,eAGQ,OAHRA,eAGQ,CAFRC,SAEQ,OAFRA,SAEQ,CADRC,2BACQ,OADRA,2BACQ,CACR,qBAAU,UAAM,CACd,GAAI,CAACL,cAAL,CAAqB,CACnB,OACD,CACD,GAAIM,kBAAJ,CAAe,CACbV,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBE,SAAS,CAATA,SALyB,CAMzBC,2BAA2B,CAA3BA,2BANyB,CAA3B,EAQD,CATD,IASO,CACLT,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBD,kBAAkB,CAAlBA,kBALyB,CAMzBG,SAAS,CAATA,SANyB,CAA3B,EAQD,CACF,CAvBD,CAuBG,CACDJ,cADC,CAEDC,kBAFC,CAGDE,eAHC,CAIDD,kBAJC,CAKDE,SALC,CAMDC,2BANC,CAvBH,EAgCA,MAAO,2DAAGN,QAAH,CAAP,CACD","sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n ]);\n\n return <>{children}</>;\n}\n"]}
1
+ {"version":3,"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","shouldAttributeExpo","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","useEffect","isAndroid"],"sources":["StripeProvider.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturn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