@stripe/stripe-react-native 0.44.0 → 0.45.0

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 (314) hide show
  1. package/.clang-format +90 -0
  2. package/.editorconfig +3 -0
  3. package/CHANGELOG.md +7 -1
  4. package/android/build.gradle +89 -18
  5. package/android/gradle.properties +1 -1
  6. package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +15 -6
  7. package/android/src/main/java/com/reactnativestripesdk/CardChangeEvent.kt +56 -0
  8. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +4 -4
  9. package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +55 -45
  10. package/android/src/main/java/com/reactnativestripesdk/{CardFocusEvent.kt → CardFocusChangeEvent.kt} +2 -2
  11. package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +17 -16
  12. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +5 -5
  13. package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +39 -33
  14. package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +4 -2
  15. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +182 -0
  16. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +231 -0
  17. package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +8 -5
  18. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +14 -6
  19. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +3 -1
  20. package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +17 -0
  21. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +266 -0
  22. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +8 -13
  23. package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -3
  24. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +106 -59
  25. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +34 -4
  26. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +33 -27
  27. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +49 -24
  28. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +16 -3
  29. package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +11 -29
  30. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +36 -12
  31. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +5 -3
  32. package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -0
  33. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +21 -0
  34. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerDelegate.java +49 -0
  35. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerInterface.java +25 -0
  36. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerDelegate.java +64 -0
  37. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerInterface.java +30 -0
  38. package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerDelegate.java +41 -0
  39. package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerInterface.java +20 -0
  40. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerDelegate.java +36 -0
  41. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerInterface.java +20 -0
  42. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerDelegate.java +73 -0
  43. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerInterface.java +31 -0
  44. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerDelegate.java +67 -0
  45. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerInterface.java +29 -0
  46. package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerDelegate.java +49 -0
  47. package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerInterface.java +21 -0
  48. package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerDelegate.java +38 -0
  49. package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerInterface.java +19 -0
  50. package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerDelegate.java +32 -0
  51. package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerInterface.java +17 -0
  52. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +311 -0
  53. package/ios/AddressSheet/AddressSheetUtils.swift +21 -19
  54. package/ios/AddressSheet/AddressSheetView.swift +23 -17
  55. package/ios/ApplePayButtonManager.m +0 -1
  56. package/ios/ApplePayButtonManager.swift +1 -3
  57. package/ios/ApplePayButtonView.swift +25 -20
  58. package/ios/ApplePayViewController.swift +22 -22
  59. package/ios/AuBECSDebitFormView.swift +14 -8
  60. package/ios/CardFieldManager.swift +1 -4
  61. package/ios/CardFieldView.swift +28 -25
  62. package/ios/CardFormManager.swift +1 -4
  63. package/ios/CardFormView.swift +25 -16
  64. package/ios/CustomerSheet/CustomerSheetUtils.swift +12 -16
  65. package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +8 -8
  66. package/ios/EmbeddedPaymentElementManager.m +6 -0
  67. package/ios/EmbeddedPaymentElementView.swift +48 -0
  68. package/ios/NewArch/AddToWalletButtonComponentView.h +10 -0
  69. package/ios/NewArch/AddToWalletButtonComponentView.mm +93 -0
  70. package/ios/NewArch/AddressSheetViewComponentView.h +10 -0
  71. package/ios/NewArch/AddressSheetViewComponentView.mm +109 -0
  72. package/ios/NewArch/ApplePayButtonComponentView.h +10 -0
  73. package/ios/NewArch/ApplePayButtonComponentView.mm +124 -0
  74. package/ios/NewArch/AuBECSDebitFormComponentView.h +10 -0
  75. package/ios/NewArch/AuBECSDebitFormComponentView.mm +95 -0
  76. package/ios/NewArch/CardFieldComponentView.h +10 -0
  77. package/ios/NewArch/CardFieldComponentView.mm +125 -0
  78. package/ios/NewArch/CardFormComponentView.h +10 -0
  79. package/ios/NewArch/CardFormComponentView.mm +108 -0
  80. package/ios/NewArch/StripeContainerComponentView.h +10 -0
  81. package/ios/NewArch/StripeContainerComponentView.mm +74 -0
  82. package/ios/NewArch/StripeNewArchConversions.h +20 -0
  83. package/ios/NewArch/StripeNewArchConversions.mm +47 -0
  84. package/ios/OldArch/StripeSdkEventEmitterCompat.h +27 -0
  85. package/ios/OldArch/StripeSdkEventEmitterCompat.m +105 -0
  86. package/ios/PaymentOptionDisplayData+ReactNative.swift +55 -0
  87. package/ios/PaymentSheetAppearance.swift +194 -1
  88. package/ios/PushProvisioning/AddToWalletButtonView.swift +19 -13
  89. package/ios/StripeContainerView.swift +5 -3
  90. package/ios/StripeSdk.h +21 -0
  91. package/ios/StripeSdk.mm +415 -0
  92. package/ios/StripeSdkEmitter.swift +19 -0
  93. package/ios/{StripeSdk+CustomerSheet.swift → StripeSdkImpl+CustomerSheet.swift} +24 -25
  94. package/ios/StripeSdkImpl+Embedded.swift +327 -0
  95. package/ios/{StripeSdk+PaymentSheet.swift → StripeSdkImpl+PaymentSheet.swift} +18 -29
  96. package/ios/{StripeSdk.swift → StripeSdkImpl.swift} +50 -72
  97. package/ios/StripeSwiftInterop.h +25 -0
  98. package/ios/stripe_react_native.h +2 -0
  99. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  100. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  101. package/lib/commonjs/components/AddressSheet.js +1 -1
  102. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  103. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  104. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  105. package/lib/commonjs/components/CardField.js +1 -1
  106. package/lib/commonjs/components/CardField.js.map +1 -1
  107. package/lib/commonjs/components/CardForm.js +1 -1
  108. package/lib/commonjs/components/CardForm.js.map +1 -1
  109. package/lib/commonjs/components/CustomerSheet.js +1 -1
  110. package/lib/commonjs/components/CustomerSheet.js.map +1 -1
  111. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  112. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  113. package/lib/commonjs/components/StripeContainer.js +1 -1
  114. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  115. package/lib/commonjs/components/StripeProvider.js +1 -1
  116. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  117. package/lib/commonjs/events.js +2 -0
  118. package/lib/commonjs/events.js.map +1 -0
  119. package/lib/commonjs/functions.js +1 -1
  120. package/lib/commonjs/functions.js.map +1 -1
  121. package/lib/commonjs/index.js +1 -1
  122. package/lib/commonjs/index.js.map +1 -1
  123. package/lib/commonjs/specs/NativeAddToWalletButton.js +2 -0
  124. package/lib/commonjs/specs/NativeAddToWalletButton.js.map +1 -0
  125. package/lib/commonjs/specs/NativeAddressSheet.js +2 -0
  126. package/lib/commonjs/specs/NativeAddressSheet.js.map +1 -0
  127. package/lib/commonjs/specs/NativeApplePayButton.js +2 -0
  128. package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -0
  129. package/lib/commonjs/specs/NativeAuBECSDebitForm.js +2 -0
  130. package/lib/commonjs/specs/NativeAuBECSDebitForm.js.map +1 -0
  131. package/lib/commonjs/specs/NativeCardField.js +2 -0
  132. package/lib/commonjs/specs/NativeCardField.js.map +1 -0
  133. package/lib/commonjs/specs/NativeCardForm.js +2 -0
  134. package/lib/commonjs/specs/NativeCardForm.js.map +1 -0
  135. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +2 -0
  136. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -0
  137. package/lib/commonjs/specs/NativeGooglePayButton.js +2 -0
  138. package/lib/commonjs/specs/NativeGooglePayButton.js.map +1 -0
  139. package/lib/commonjs/specs/NativeStripeContainer.js +2 -0
  140. package/lib/commonjs/specs/NativeStripeContainer.js.map +1 -0
  141. package/lib/commonjs/specs/NativeStripeSdkModule.js +2 -0
  142. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -0
  143. package/lib/commonjs/specs/utils.js +2 -0
  144. package/lib/commonjs/specs/utils.js.map +1 -0
  145. package/lib/commonjs/types/EmbeddedPaymentElement.js +2 -0
  146. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -0
  147. package/lib/commonjs/types/PaymentSheet.js +1 -1
  148. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  149. package/lib/module/components/AddToWalletButton.js +1 -1
  150. package/lib/module/components/AddToWalletButton.js.map +1 -1
  151. package/lib/module/components/AddressSheet.js +1 -1
  152. package/lib/module/components/AddressSheet.js.map +1 -1
  153. package/lib/module/components/AuBECSDebitForm.js +1 -1
  154. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  155. package/lib/module/components/CardField.js +1 -1
  156. package/lib/module/components/CardField.js.map +1 -1
  157. package/lib/module/components/CardForm.js +1 -1
  158. package/lib/module/components/CardForm.js.map +1 -1
  159. package/lib/module/components/CustomerSheet.js +1 -1
  160. package/lib/module/components/CustomerSheet.js.map +1 -1
  161. package/lib/module/components/PlatformPayButton.js +1 -1
  162. package/lib/module/components/PlatformPayButton.js.map +1 -1
  163. package/lib/module/components/StripeContainer.js +1 -1
  164. package/lib/module/components/StripeContainer.js.map +1 -1
  165. package/lib/module/components/StripeProvider.js +1 -1
  166. package/lib/module/components/StripeProvider.js.map +1 -1
  167. package/lib/module/events.js +2 -0
  168. package/lib/module/events.js.map +1 -0
  169. package/lib/module/functions.js +1 -1
  170. package/lib/module/functions.js.map +1 -1
  171. package/lib/module/index.js +1 -1
  172. package/lib/module/index.js.map +1 -1
  173. package/lib/module/specs/NativeAddToWalletButton.js +2 -0
  174. package/lib/module/specs/NativeAddToWalletButton.js.map +1 -0
  175. package/lib/module/specs/NativeAddressSheet.js +2 -0
  176. package/lib/module/specs/NativeAddressSheet.js.map +1 -0
  177. package/lib/module/specs/NativeApplePayButton.js +2 -0
  178. package/lib/module/specs/NativeApplePayButton.js.map +1 -0
  179. package/lib/module/specs/NativeAuBECSDebitForm.js +2 -0
  180. package/lib/module/specs/NativeAuBECSDebitForm.js.map +1 -0
  181. package/lib/module/specs/NativeCardField.js +2 -0
  182. package/lib/module/specs/NativeCardField.js.map +1 -0
  183. package/lib/module/specs/NativeCardForm.js +2 -0
  184. package/lib/module/specs/NativeCardForm.js.map +1 -0
  185. package/lib/module/specs/NativeEmbeddedPaymentElement.js +2 -0
  186. package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -0
  187. package/lib/module/specs/NativeGooglePayButton.js +2 -0
  188. package/lib/module/specs/NativeGooglePayButton.js.map +1 -0
  189. package/lib/module/specs/NativeStripeContainer.js +2 -0
  190. package/lib/module/specs/NativeStripeContainer.js.map +1 -0
  191. package/lib/module/specs/NativeStripeSdkModule.js +2 -0
  192. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -0
  193. package/lib/module/specs/utils.js +2 -0
  194. package/lib/module/specs/utils.js.map +1 -0
  195. package/lib/module/types/EmbeddedPaymentElement.js +2 -0
  196. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -0
  197. package/lib/module/types/PaymentSheet.js +1 -1
  198. package/lib/module/types/PaymentSheet.js.map +1 -1
  199. package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -1
  200. package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -1
  201. package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -1
  202. package/lib/typescript/src/components/CardField.d.ts +1 -1
  203. package/lib/typescript/src/components/CardField.d.ts.map +1 -1
  204. package/lib/typescript/src/components/CardForm.d.ts +1 -1
  205. package/lib/typescript/src/components/CardForm.d.ts.map +1 -1
  206. package/lib/typescript/src/components/CustomerSheet.d.ts +1 -1
  207. package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -1
  208. package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -1
  209. package/lib/typescript/src/events.d.ts +13 -0
  210. package/lib/typescript/src/events.d.ts.map +1 -0
  211. package/lib/typescript/src/functions.d.ts.map +1 -1
  212. package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +4 -4
  213. package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -1
  214. package/lib/typescript/src/hooks/useStripe.d.ts +2 -2
  215. package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -1
  216. package/lib/typescript/src/index.d.ts +2 -0
  217. package/lib/typescript/src/index.d.ts.map +1 -1
  218. package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts +27 -0
  219. package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts.map +1 -0
  220. package/lib/typescript/src/specs/NativeAddressSheet.d.ts +34 -0
  221. package/lib/typescript/src/specs/NativeAddressSheet.d.ts.map +1 -0
  222. package/lib/typescript/src/specs/NativeApplePayButton.d.ts +28 -0
  223. package/lib/typescript/src/specs/NativeApplePayButton.d.ts.map +1 -0
  224. package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts +19 -0
  225. package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts.map +1 -0
  226. package/lib/typescript/src/specs/NativeCardField.d.ts +33 -0
  227. package/lib/typescript/src/specs/NativeCardField.d.ts.map +1 -0
  228. package/lib/typescript/src/specs/NativeCardForm.d.ts +31 -0
  229. package/lib/typescript/src/specs/NativeCardForm.d.ts.map +1 -0
  230. package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts +22 -0
  231. package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts.map +1 -0
  232. package/lib/typescript/src/specs/NativeGooglePayButton.d.ts +11 -0
  233. package/lib/typescript/src/specs/NativeGooglePayButton.d.ts.map +1 -0
  234. package/lib/typescript/src/specs/NativeStripeContainer.d.ts +8 -0
  235. package/lib/typescript/src/specs/NativeStripeContainer.d.ts.map +1 -0
  236. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +93 -0
  237. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -0
  238. package/lib/typescript/src/specs/utils.d.ts +20 -0
  239. package/lib/typescript/src/specs/utils.d.ts.map +1 -0
  240. package/lib/typescript/src/types/CustomerSheet.d.ts +1 -5
  241. package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -1
  242. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +161 -0
  243. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -0
  244. package/lib/typescript/src/types/PaymentSheet.d.ts +97 -4
  245. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
  246. package/lib/typescript/src/types/components/CardFieldInput.d.ts +3 -2
  247. package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -1
  248. package/lib/typescript/src/types/components/CardFormView.d.ts +3 -1
  249. package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -1
  250. package/package.json +20 -1
  251. package/src/components/AddToWalletButton.tsx +2 -5
  252. package/src/components/AddressSheet.tsx +5 -16
  253. package/src/components/AuBECSDebitForm.tsx +3 -12
  254. package/src/components/CardField.tsx +20 -30
  255. package/src/components/CardForm.tsx +14 -29
  256. package/src/components/CustomerSheet.tsx +23 -25
  257. package/src/components/PlatformPayButton.tsx +6 -6
  258. package/src/components/StripeContainer.tsx +5 -12
  259. package/src/components/StripeProvider.tsx +1 -1
  260. package/src/events.ts +49 -0
  261. package/src/functions.ts +13 -24
  262. package/src/hooks/useFinancialConnectionsSheet.tsx +2 -2
  263. package/src/hooks/useStripe.tsx +2 -2
  264. package/src/index.tsx +3 -0
  265. package/src/specs/NativeAddToWalletButton.ts +40 -0
  266. package/src/specs/NativeAddressSheet.ts +50 -0
  267. package/src/specs/NativeApplePayButton.ts +40 -0
  268. package/src/specs/NativeAuBECSDebitForm.ts +24 -0
  269. package/src/specs/NativeCardField.ts +51 -0
  270. package/src/specs/NativeCardForm.ts +43 -0
  271. package/src/specs/NativeEmbeddedPaymentElement.ts +37 -0
  272. package/src/specs/NativeGooglePayButton.ts +20 -0
  273. package/src/specs/NativeStripeContainer.ts +12 -0
  274. package/src/specs/NativeStripeSdkModule.ts +219 -0
  275. package/src/specs/utils.ts +22 -0
  276. package/src/types/CustomerSheet.ts +1 -5
  277. package/src/types/EmbeddedPaymentElement.tsx +467 -0
  278. package/src/types/PaymentSheet.ts +114 -4
  279. package/src/types/components/CardFieldInput.ts +1 -2
  280. package/src/types/components/CardFormView.ts +1 -1
  281. package/stripe-react-native.podspec +27 -2
  282. package/android/.gradle/8.11.1/checksums/checksums.lock +0 -0
  283. package/android/.gradle/8.11.1/checksums/md5-checksums.bin +0 -0
  284. package/android/.gradle/8.11.1/checksums/sha1-checksums.bin +0 -0
  285. package/android/.gradle/8.11.1/executionHistory/executionHistory.lock +0 -0
  286. package/android/.gradle/8.11.1/fileChanges/last-build.bin +0 -0
  287. package/android/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
  288. package/android/.gradle/8.11.1/gc.properties +0 -0
  289. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  290. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  291. package/android/.gradle/vcs-1/gc.properties +0 -0
  292. package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +0 -54
  293. package/ios/StripeSdk.m +0 -244
  294. package/lib/commonjs/NativeStripeSdk.js +0 -2
  295. package/lib/commonjs/NativeStripeSdk.js.map +0 -1
  296. package/lib/commonjs/components/ApplePayButtonNative.js +0 -2
  297. package/lib/commonjs/components/ApplePayButtonNative.js.map +0 -1
  298. package/lib/commonjs/components/GooglePayButtonNative.js +0 -2
  299. package/lib/commonjs/components/GooglePayButtonNative.js.map +0 -1
  300. package/lib/module/NativeStripeSdk.js +0 -2
  301. package/lib/module/NativeStripeSdk.js.map +0 -1
  302. package/lib/module/components/ApplePayButtonNative.js +0 -2
  303. package/lib/module/components/ApplePayButtonNative.js.map +0 -1
  304. package/lib/module/components/GooglePayButtonNative.js +0 -2
  305. package/lib/module/components/GooglePayButtonNative.js.map +0 -1
  306. package/lib/typescript/src/NativeStripeSdk.d.ts +0 -58
  307. package/lib/typescript/src/NativeStripeSdk.d.ts.map +0 -1
  308. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +0 -4
  309. package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +0 -1
  310. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +0 -4
  311. package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +0 -1
  312. package/src/NativeStripeSdk.tsx +0 -159
  313. package/src/components/ApplePayButtonNative.tsx +0 -5
  314. package/src/components/GooglePayButtonNative.tsx +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","_codegenNativeCommands","NativeComponentRegistry","_require","ConditionallyIgnoredEventHandlers","_require2","dispatchCommand","nativeComponentName","__INTERNAL_VIEW_CONFIG","exports","uiViewClassName","directEventTypes","topEmbeddedPaymentElementDidUpdateHeight","registrationName","validAttributes","Object","assign","configuration","intentConfiguration","onEmbeddedPaymentElementDidUpdateHeight","_default","default","get","Commands","confirm","ref","clearPaymentOption"],"sourceRoot":"../../../src","sources":["specs/NativeEmbeddedPaymentElement.ts"],"mappings":"mNAKA,IAAAA,uBAAA,CAAAC,sBAAA,CAAAC,OAAA,6DAIA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,4DAyBA,IAAAE,uBAEmB,CAFnBF,OAEmB,CAFnB,gEAEkB,CAAC,CAFnB,IAAAG,QAAA,CAAAH,OAEmB,CAFnB,yDAEkB,CAAC,CAFnBI,iCAEmB,CAAAD,QAAA,CAFnBC,iCAEmB,CAFnB,IAAAC,SAAA,CAAAL,OAEmB,CAFnB,kDAEkB,CAAC,CAFnBM,eAEmB,CAAAD,SAAA,CAFnBC,eAEmB,CAFnB,IAAAC,mBAEmB,CAFnB,4BAEmB,CAFnB,IAAAC,sBAEmB,CAAAC,OAAA,CAAAD,sBAAA,CAFnB,CAAAE,eAEmB,CAFnB,4BAEmB,CAFnBC,gBAEmB,CAFnB,CAAAC,wCAEmB,CAFnB,CAAAC,gBAEmB,CAFnB,yCAEkB,EAAC,CAFnBC,eAEmB,CAAAC,MAAA,CAAAC,MAAA,EAFnBC,aAEmB,CAFnB,IAEmB,CAFnBC,mBAEmB,CAFnB,IAEmB,EAFnBd,iCAEmB,CAFnB,CAAAe,uCAEmB,CAFnB,IAEkB,EAAC,CAAD,CAAC,KAAAC,QAAA,CAAAX,OAAA,CAAAY,OAAA,CAFnBnB,uBAEmB,CAFnBoB,GAEmB,CAFnBf,mBAEmB,CAFnB,kBAAAC,sBAEmB,EAAD,CAAC,CAFnB,IAAAe,QAEmB,CAAAd,OAAA,CAAAc,QAAA,CAFnB,CAAAC,OAEmB,SAFnB,CAAAA,OAEmBA,CAFnBC,GAEmB,CAFnB,CAAAnB,eAEmB,CAFnBmB,GAEmB,CAFnB,SAEmB,CAFnB,EAEkB,CAAC,CAAD,CAAC,CAFnBC,kBAEmB,SAFnB,CAAAA,kBAEmBA,CAFnBD,GAEmB,CAFnB,CAAAnB,eAEmB,CAFnBmB,GAEmB,CAFnB,oBAEmB,CAFnB,EAEkB,CAAC,CAAD,EAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _codegenNativeComponent=_interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));var NativeComponentRegistry=require('react-native/Libraries/NativeComponent/NativeComponentRegistry');var nativeComponentName='GooglePayButton';var __INTERNAL_VIEW_CONFIG=exports.__INTERNAL_VIEW_CONFIG={uiViewClassName:'GooglePayButton',validAttributes:{type:true,appearance:true,borderRadius:true}};var _default=exports.default=NativeComponentRegistry.get(nativeComponentName,function(){return __INTERNAL_VIEW_CONFIG;});
2
+ //# sourceMappingURL=NativeGooglePayButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","NativeComponentRegistry","nativeComponentName","__INTERNAL_VIEW_CONFIG","exports","uiViewClassName","validAttributes","type","appearance","borderRadius","_default","default","get"],"sourceRoot":"../../../src","sources":["specs/NativeGooglePayButton.ts"],"mappings":"kMAKA,IAAAA,uBAAA,CAAAC,sBAAA,CAAAC,OAAA,6DAYA,IAAAC,uBAEmB,CAFnBD,OAEmB,CAFnB,gEAEkB,CAAC,CAFnB,IAAAE,mBAEmB,CAFnB,iBAEmB,CAFnB,IAAAC,sBAEmB,CAAAC,OAAA,CAAAD,sBAAA,CAFnB,CAAAE,eAEmB,CAFnB,iBAEmB,CAFnBC,eAEmB,CAFnB,CAAAC,IAEmB,CAFnB,IAEmB,CAFnBC,UAEmB,CAFnB,IAEmB,CAFnBC,YAEmB,CAFnB,IAEkB,EAAC,KAAAC,QAAA,CAAAN,OAAA,CAAAO,OAAA,CAFnBV,uBAEmB,CAFnBW,GAEmB,CAFnBV,mBAEmB,CAFnB,kBAAAC,sBAEmB,EAAD,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _codegenNativeComponent=_interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));var NativeComponentRegistry=require('react-native/Libraries/NativeComponent/NativeComponentRegistry');var nativeComponentName='StripeContainer';var __INTERNAL_VIEW_CONFIG=exports.__INTERNAL_VIEW_CONFIG={uiViewClassName:'StripeContainer',validAttributes:{keyboardShouldPersistTaps:true}};var _default=exports.default=NativeComponentRegistry.get(nativeComponentName,function(){return __INTERNAL_VIEW_CONFIG;});
2
+ //# sourceMappingURL=NativeStripeContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","NativeComponentRegistry","nativeComponentName","__INTERNAL_VIEW_CONFIG","exports","uiViewClassName","validAttributes","keyboardShouldPersistTaps","_default","default","get"],"sourceRoot":"../../../src","sources":["specs/NativeStripeContainer.ts"],"mappings":"kMACA,IAAAA,uBAAA,CAAAC,sBAAA,CAAAC,OAAA,6DAQA,IAAAC,uBAEmB,CAFnBD,OAEmB,CAFnB,gEAEkB,CAAC,CAFnB,IAAAE,mBAEmB,CAFnB,iBAEmB,CAFnB,IAAAC,sBAEmB,CAAAC,OAAA,CAAAD,sBAAA,CAFnB,CAAAE,eAEmB,CAFnB,iBAEmB,CAFnBC,eAEmB,CAFnB,CAAAC,yBAEmB,CAFnB,IAEkB,EAAC,KAAAC,QAAA,CAAAJ,OAAA,CAAAK,OAAA,CAFnBR,uBAEmB,CAFnBS,GAEmB,CAFnBR,mBAEmB,CAFnB,kBAAAC,sBAEmB,EAAD,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var _default=exports.default=_reactNative.TurboModuleRegistry.getEnforcing('StripeSdk');
2
+ //# sourceMappingURL=NativeStripeSdkModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeStripeSdkModule.ts"],"mappings":"gFAAA,IAAAA,YAAA,CAAAC,OAAA,iBAAmD,IAAAC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CA0NpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/utils.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useEmbeddedPaymentElement=useEmbeddedPaymentElement;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _react=_interopRequireWildcard(require("react"));var _events=require("../events");var _NativeEmbeddedPaymentElement=_interopRequireWildcard(require("../specs/NativeEmbeddedPaymentElement"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/types/EmbeddedPaymentElement.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var EmbeddedPaymentElement=function(){function EmbeddedPaymentElement(){(0,_classCallCheck2.default)(this,EmbeddedPaymentElement);}return(0,_createClass2.default)(EmbeddedPaymentElement,[{key:"update",value:(function(){var _update=(0,_asyncToGenerator2.default)(function*(intentConfig){var result=yield _NativeStripeSdkModule.default.updateEmbeddedPaymentElement(intentConfig);return result;});function update(_x){return _update.apply(this,arguments);}return update;}())},{key:"confirm",value:(function(){var _confirm=(0,_asyncToGenerator2.default)(function*(){var result=yield _NativeStripeSdkModule.default.confirmEmbeddedPaymentElement(-1);return result;});function confirm(){return _confirm.apply(this,arguments);}return confirm;}())},{key:"clearPaymentOption",value:function clearPaymentOption(){_NativeStripeSdkModule.default.clearEmbeddedPaymentOption(-1);}}]);}();var confirmHandlerCallback=null;var formSheetActionConfirmCallback=null;function createEmbeddedPaymentElement(_x2,_x3){return _createEmbeddedPaymentElement.apply(this,arguments);}function _createEmbeddedPaymentElement(){_createEmbeddedPaymentElement=(0,_asyncToGenerator2.default)(function*(intentConfig,configuration){setupConfirmHandlers(intentConfig,configuration);yield _NativeStripeSdkModule.default.createEmbeddedPaymentElement(intentConfig,configuration);return new EmbeddedPaymentElement();});return _createEmbeddedPaymentElement.apply(this,arguments);}function setupConfirmHandlers(intentConfig,configuration){var _configuration$formSh;var confirmHandler=intentConfig.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null||_confirmHandlerCallba.remove();confirmHandlerCallback=(0,_events.addListener)('onConfirmHandlerCallback',function(_ref){var paymentMethod=_ref.paymentMethod,shouldSavePaymentMethod=_ref.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdkModule.default.intentCreationCallback);});}if(((_configuration$formSh=configuration.formSheetAction)==null?void 0:_configuration$formSh.type)==='confirm'){var confirmFormSheetHandler=configuration.formSheetAction.onFormSheetConfirmComplete;if(confirmFormSheetHandler){var _formSheetActionConfi;(_formSheetActionConfi=formSheetActionConfirmCallback)==null||_formSheetActionConfi.remove();formSheetActionConfirmCallback=(0,_events.addListener)('embeddedPaymentElementFormSheetConfirmComplete',function(result){confirmFormSheetHandler(result);});}}}function useEmbeddedPaymentElement(intentConfig,configuration){var _this=this;var isAndroid=_reactNative.Platform.OS==='android';var elementRef=(0,_react.useRef)(null);var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),element=_useState2[0],setElement=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),paymentOption=_useState4[0],setPaymentOption=_useState4[1];var _useState5=(0,_react.useState)(),_useState6=(0,_slicedToArray2.default)(_useState5,2),height=_useState6[0],setHeight=_useState6[1];var viewRef=(0,_react.useRef)(null);var _useState7=(0,_react.useState)(null),_useState8=(0,_slicedToArray2.default)(_useState7,2),loadingError=_useState8[0],setLoadingError=_useState8[1];function getElementOrThrow(ref){if(!ref.current){throw new Error('EmbeddedPaymentElement is not ready yet – wait until it finishes loading before calling this API.');}return ref.current;}(0,_react.useEffect)(function(){var active=true;(0,_asyncToGenerator2.default)(function*(){var el=yield createEmbeddedPaymentElement(intentConfig,configuration);if(!active)return;elementRef.current=el;setElement(el);})();var getCurrentRef=function getCurrentRef(){return viewRef.current;};return function(){var _elementRef$current;active=false;(_elementRef$current=elementRef.current)==null||_elementRef$current.clearPaymentOption();elementRef.current=null;var currentRef=getCurrentRef();if(isAndroid&&currentRef){_NativeEmbeddedPaymentElement.Commands.clearPaymentOption(currentRef);}setElement(null);};},[intentConfig,configuration,viewRef,isAndroid]);(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementDidUpdatePaymentOption',function(_ref3){var opt=_ref3.paymentOption;return setPaymentOption(opt!=null?opt:null);});return function(){return sub.remove();};});(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementDidUpdateHeight',function(_ref4){var h=_ref4.height;if(h>0){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setHeight(h);}});return function(){return sub.remove();};},[]);(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementLoadingFailed',function(nativeError){setLoadingError(new Error(nativeError.message));});return function(){return sub.remove();};},[]);var embeddedPaymentElementView=(0,_react.useMemo)(function(){if(isAndroid&&configuration&&intentConfig){return(0,_jsxRuntime.jsx)(_NativeEmbeddedPaymentElement.default,{ref:viewRef,style:[{width:'100%',height:height}],configuration:configuration,intentConfiguration:intentConfig});}if(!element)return null;return(0,_jsxRuntime.jsx)(_NativeEmbeddedPaymentElement.default,{ref:viewRef,style:{width:'100%',height:height},configuration:configuration,intentConfiguration:intentConfig});},[configuration,element,height,intentConfig,isAndroid]);var confirm=(0,_react.useCallback)(function(){var currentRef=viewRef.current;if(isAndroid){if(currentRef){var promise=new Promise(function(resolve){var sub=(0,_events.addListener)('embeddedPaymentElementFormSheetConfirmComplete',function(result){sub.remove();resolve(result);});});_NativeEmbeddedPaymentElement.Commands.confirm(currentRef);return promise;}else{return Promise.reject(new Error('Unable to find Android embedded payment element view!'));}}return getElementOrThrow(elementRef).confirm();},[isAndroid]);var update=(0,_react.useCallback)(function(cfg){return getElementOrThrow(elementRef).update(cfg);},[]);var clearPaymentOption=(0,_react.useCallback)(function(){if(isAndroid){var tag=(0,_reactNative.findNodeHandle)(viewRef.current);if(tag==null){return Promise.reject(new Error('Unable to find Android view handle'));}return _NativeStripeSdkModule.default.clearEmbeddedPaymentOption(tag);}getElementOrThrow(elementRef).clearPaymentOption();return Promise.resolve();},[isAndroid]);return{embeddedPaymentElementView:embeddedPaymentElementView,paymentOption:paymentOption,confirm:confirm,update:update,clearPaymentOption:clearPaymentOption,loadingError:loadingError};}
2
+ //# sourceMappingURL=EmbeddedPaymentElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_NativeStripeSdkModule","_interopRequireDefault","_react","_interopRequireWildcard","_events","_NativeEmbeddedPaymentElement","_jsxRuntime","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EmbeddedPaymentElement","_classCallCheck2","_createClass2","key","value","_update","_asyncToGenerator2","intentConfig","result","NativeStripeSdkModule","updateEmbeddedPaymentElement","update","_x","apply","arguments","_confirm","confirmEmbeddedPaymentElement","confirm","clearPaymentOption","clearEmbeddedPaymentOption","confirmHandlerCallback","formSheetActionConfirmCallback","createEmbeddedPaymentElement","_x2","_x3","_createEmbeddedPaymentElement","configuration","setupConfirmHandlers","_configuration$formSh","confirmHandler","_confirmHandlerCallba","remove","addListener","_ref","paymentMethod","shouldSavePaymentMethod","intentCreationCallback","formSheetAction","type","confirmFormSheetHandler","onFormSheetConfirmComplete","_formSheetActionConfi","useEmbeddedPaymentElement","_this","isAndroid","Platform","OS","elementRef","useRef","_useState","useState","_useState2","_slicedToArray2","element","setElement","_useState3","_useState4","paymentOption","setPaymentOption","_useState5","_useState6","height","setHeight","viewRef","_useState7","_useState8","loadingError","setLoadingError","getElementOrThrow","ref","current","Error","useEffect","active","el","getCurrentRef","_elementRef$current","currentRef","Commands","sub","_ref3","opt","_ref4","h","LayoutAnimation","configureNext","Presets","easeInEaseOut","nativeError","message","embeddedPaymentElementView","useMemo","jsx","style","width","intentConfiguration","useCallback","promise","Promise","resolve","reject","cfg","tag","findNodeHandle"],"sourceRoot":"../../../src","sources":["types/EmbeddedPaymentElement.tsx"],"mappings":"4jBACA,IAAAA,YAAA,CAAAC,OAAA,iBAeA,IAAAC,sBAAA,CAAAC,sBAAA,CAAAF,OAAA,oCACA,IAAAG,MAAA,CAAAC,uBAAA,CAAAJ,OAAA,WAUA,IAAAK,OAAA,CAAAL,OAAA,cACA,IAAAM,6BAAA,CAAAF,uBAAA,CAAAJ,OAAA,2CAG+C,IAAAO,WAAA,CAAAP,OAAA,0BAAAQ,YAAA,8FAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAN,wBAAAM,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B,CAClBgD,YAAY,CAAZA,YACF,CAAC,CACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.PaymentMethodLayout=exports.LinkDisplay=exports.CollectionMode=exports.CardBrandCategory=exports.CardBrandAcceptanceFilter=exports.CaptureMethod=exports.AddressCollectionMode=void 0;var LinkDisplay=exports.LinkDisplay=function(LinkDisplay){LinkDisplay["AUTOMATIC"]="automatic";LinkDisplay["NEVER"]="never";return LinkDisplay;}({});var CollectionMode=exports.CollectionMode=function(CollectionMode){CollectionMode["AUTOMATIC"]="automatic";CollectionMode["NEVER"]="never";CollectionMode["ALWAYS"]="always";return CollectionMode;}({});var AddressCollectionMode=exports.AddressCollectionMode=function(AddressCollectionMode){AddressCollectionMode["AUTOMATIC"]="automatic";AddressCollectionMode["NEVER"]="never";AddressCollectionMode["FULL"]="full";return AddressCollectionMode;}({});var CaptureMethod=exports.CaptureMethod=function(CaptureMethod){CaptureMethod["Automatic"]="Automatic";CaptureMethod["Manual"]="Manual";CaptureMethod["AutomaticAsync"]="AutomaticAsync";return CaptureMethod;}({});var PaymentMethodLayout=exports.PaymentMethodLayout=function(PaymentMethodLayout){PaymentMethodLayout["Horizontal"]="Horizontal";PaymentMethodLayout["Vertical"]="Vertical";PaymentMethodLayout["Automatic"]="Automatic";return PaymentMethodLayout;}({});var CardBrandCategory=exports.CardBrandCategory=function(CardBrandCategory){CardBrandCategory["Visa"]="visa";CardBrandCategory["Mastercard"]="mastercard";CardBrandCategory["Amex"]="amex";CardBrandCategory["Discover"]="discover";return CardBrandCategory;}({});var CardBrandAcceptanceFilter=exports.CardBrandAcceptanceFilter=function(CardBrandAcceptanceFilter){CardBrandAcceptanceFilter["All"]="all";CardBrandAcceptanceFilter["Allowed"]="allowed";CardBrandAcceptanceFilter["Disallowed"]="disallowed";return CardBrandAcceptanceFilter;}({});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.RowStyle=exports.PaymentMethodLayout=exports.LinkDisplay=exports.CollectionMode=exports.CardBrandCategory=exports.CardBrandAcceptanceFilter=exports.CaptureMethod=exports.AddressCollectionMode=void 0;var LinkDisplay=exports.LinkDisplay=function(LinkDisplay){LinkDisplay["AUTOMATIC"]="automatic";LinkDisplay["NEVER"]="never";return LinkDisplay;}({});var RowStyle=exports.RowStyle=function(RowStyle){RowStyle["FlatWithRadio"]="flatWithRadio";RowStyle["FloatingButton"]="floatingButton";RowStyle["FlatWithCheckmark"]="flatWithCheckmark";return RowStyle;}({});var CollectionMode=exports.CollectionMode=function(CollectionMode){CollectionMode["AUTOMATIC"]="automatic";CollectionMode["NEVER"]="never";CollectionMode["ALWAYS"]="always";return CollectionMode;}({});var AddressCollectionMode=exports.AddressCollectionMode=function(AddressCollectionMode){AddressCollectionMode["AUTOMATIC"]="automatic";AddressCollectionMode["NEVER"]="never";AddressCollectionMode["FULL"]="full";return AddressCollectionMode;}({});var CaptureMethod=exports.CaptureMethod=function(CaptureMethod){CaptureMethod["Automatic"]="Automatic";CaptureMethod["Manual"]="Manual";CaptureMethod["AutomaticAsync"]="AutomaticAsync";return CaptureMethod;}({});var PaymentMethodLayout=exports.PaymentMethodLayout=function(PaymentMethodLayout){PaymentMethodLayout["Horizontal"]="Horizontal";PaymentMethodLayout["Vertical"]="Vertical";PaymentMethodLayout["Automatic"]="Automatic";return PaymentMethodLayout;}({});var CardBrandCategory=exports.CardBrandCategory=function(CardBrandCategory){CardBrandCategory["Visa"]="visa";CardBrandCategory["Mastercard"]="mastercard";CardBrandCategory["Amex"]="amex";CardBrandCategory["Discover"]="discover";return CardBrandCategory;}({});var CardBrandAcceptanceFilter=exports.CardBrandAcceptanceFilter=function(CardBrandAcceptanceFilter){CardBrandAcceptanceFilter["All"]="all";CardBrandAcceptanceFilter["Allowed"]="allowed";CardBrandAcceptanceFilter["Disallowed"]="disallowed";return CardBrandAcceptanceFilter;}({});
2
2
  //# sourceMappingURL=PaymentSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LinkDisplay","exports","CollectionMode","AddressCollectionMode","CaptureMethod","PaymentMethodLayout","CardBrandCategory","CardBrandAcceptanceFilter"],"sourceRoot":"../../../src","sources":["types/PaymentSheet.ts"],"mappings":"0PAiLY,CAAAA,WAAW,CAAAC,OAAA,CAAAD,WAAA,UAAXA,WAAW,EAAXA,WAAW,0BAAXA,WAAW,wBAAX,CAAAA,WAAW,UA6LX,CAAAE,cAAc,CAAAD,OAAA,CAAAC,cAAA,UAAdA,cAAc,EAAdA,cAAc,0BAAdA,cAAc,kBAAdA,cAAc,0BAAd,CAAAA,cAAc,UASd,CAAAC,qBAAqB,CAAAF,OAAA,CAAAE,qBAAA,UAArBA,qBAAqB,EAArBA,qBAAqB,0BAArBA,qBAAqB,kBAArBA,qBAAqB,sBAArB,CAAAA,qBAAqB,UA8CrB,CAAAC,aAAa,CAAAH,OAAA,CAAAG,aAAA,UAAbA,aAAa,EAAbA,aAAa,0BAAbA,aAAa,oBAAbA,aAAa,0CAAb,CAAAA,aAAa,UAqCb,CAAAC,mBAAmB,CAAAJ,OAAA,CAAAI,mBAAA,UAAnBA,mBAAmB,EAAnBA,mBAAmB,4BAAnBA,mBAAmB,wBAAnBA,mBAAmB,gCAAnB,CAAAA,mBAAmB,UAoBnB,CAAAC,iBAAiB,CAAAL,OAAA,CAAAK,iBAAA,UAAjBA,iBAAiB,EAAjBA,iBAAiB,gBAAjBA,iBAAiB,4BAAjBA,iBAAiB,gBAAjBA,iBAAiB,8BAAjB,CAAAA,iBAAiB,UAejB,CAAAC,yBAAyB,CAAAN,OAAA,CAAAM,yBAAA,UAAzBA,yBAAyB,EAAzBA,yBAAyB,cAAzBA,yBAAyB,sBAAzBA,yBAAyB,kCAAzB,CAAAA,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["LinkDisplay","exports","RowStyle","CollectionMode","AddressCollectionMode","CaptureMethod","PaymentMethodLayout","CardBrandCategory","CardBrandAcceptanceFilter"],"sourceRoot":"../../../src","sources":["types/PaymentSheet.ts"],"mappings":"2QA6KY,CAAAA,WAAW,CAAAC,OAAA,CAAAD,WAAA,UAAXA,WAAW,EAAXA,WAAW,0BAAXA,WAAW,wBAAX,CAAAA,WAAW,UA4KX,CAAAE,QAAQ,CAAAD,OAAA,CAAAC,QAAA,UAARA,QAAQ,EAARA,QAAQ,kCAARA,QAAQ,oCAARA,QAAQ,gDAAR,CAAAA,QAAQ,UAmIR,CAAAC,cAAc,CAAAF,OAAA,CAAAE,cAAA,UAAdA,cAAc,EAAdA,cAAc,0BAAdA,cAAc,kBAAdA,cAAc,0BAAd,CAAAA,cAAc,UASd,CAAAC,qBAAqB,CAAAH,OAAA,CAAAG,qBAAA,UAArBA,qBAAqB,EAArBA,qBAAqB,0BAArBA,qBAAqB,kBAArBA,qBAAqB,sBAArB,CAAAA,qBAAqB,UA8CrB,CAAAC,aAAa,CAAAJ,OAAA,CAAAI,aAAA,UAAbA,aAAa,EAAbA,aAAa,0BAAbA,aAAa,oBAAbA,aAAa,0CAAb,CAAAA,aAAa,UAqCb,CAAAC,mBAAmB,CAAAL,OAAA,CAAAK,mBAAA,UAAnBA,mBAAmB,EAAnBA,mBAAmB,4BAAnBA,mBAAmB,wBAAnBA,mBAAmB,gCAAnB,CAAAA,mBAAmB,UAoBnB,CAAAC,iBAAiB,CAAAN,OAAA,CAAAM,iBAAA,UAAjBA,iBAAiB,EAAjBA,iBAAiB,gBAAjBA,iBAAiB,4BAAjBA,iBAAiB,gBAAjBA,iBAAiB,8BAAjB,CAAAA,iBAAiB,UAejB,CAAAC,yBAAyB,CAAAP,OAAA,CAAAO,yBAAA,UAAzBA,yBAAyB,EAAzBA,yBAAyB,cAAzBA,yBAAyB,sBAAzBA,yBAAyB,kCAAzB,CAAAA,yBAAyB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];var AddToWalletButtonNative=(0,_reactNative.requireNativeComponent)('AddToWalletButton');function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AddToWalletButtonNative,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddToWalletButton.default,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
2
2
  //# sourceMappingURL=AddToWalletButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButtonNative","requireNativeComponent","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAOsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,4FAAAC,SAAA,gBAQtB,GAAM,CAAAC,uBAAuB,CAC3B,GAAAC,mCAAsB,EAAM,mBAAmB,CAAC,CAgE3C,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAJ,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACR,uBAAuB,CAAAS,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,yFAAAC,SAAA,gBAgEhE,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAF,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAS,GAAA,EAACV,wBAAA,CAAAS,OAAuB,CAAAE,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];var AddressSheetNative=(0,_reactNative.requireNativeComponent)('AddressSheetView');function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AddressSheetNative,Object.assign({},props,{onSubmitAction:function onSubmitAction(value){return onSubmit(value.nativeEvent);},onErrorAction:function onErrorAction(value){return onError(value.nativeEvent.error);}}));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddressSheet.default,Object.assign({},props,{onSubmitAction:function onSubmitAction(event){return onSubmit(event.nativeEvent.result);},onErrorAction:function onErrorAction(event){return onError(event.nativeEvent.error);}}));}
2
2
  //# sourceMappingURL=AddressSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AddressSheetNative","requireNativeComponent","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","value","nativeEvent","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAIsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,wBAQtB,GAAM,CAAAC,kBAAkB,CAAG,GAAAC,mCAAsB,EAAM,kBAAkB,CAAC,CA4DnE,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAJ,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAY,GAAA,EAACT,kBAAkB,CAAAU,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAiD,QAChE,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAAC,EAC5B,CACDC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CACXF,KAEE,QACC,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACE,KAAK,CAAC,EAAC,EACvC,CAAC,CAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,oFAAAC,SAAA,wBA4DtD,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAF,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAU,GAAA,EAACX,mBAAA,CAAAU,OAAkB,CAAAE,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAK,QAAK,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAACC,MAAM,CAAC,EAAC,CAC9DC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAGH,KAAK,QAAK,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACG,KAAK,CAAC,EAAC,EAC5D,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];var AuBECSDebitFormNative=(0,_reactNative.requireNativeComponent)('AuBECSDebitForm');function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AuBECSDebitFormNative,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAuBECSDebitForm.default,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
2
2
  //# sourceMappingURL=AuBECSDebitForm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitFormNative","requireNativeComponent","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAKsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,0FAAAC,SAAA,0CAGtB,GAAM,CAAAC,qBAAqB,CACzB,GAAAC,mCAAsB,EACpB,iBACF,CAAC,CA4BI,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAJ,SAAA,EAER,MACE,GAAAF,WAAA,CAAAa,GAAA,EAACV,qBAAqB,CAAAW,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,0CA6B5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAF,SAAA,EAER,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACZ,sBAAA,CAAAW,OAAqB,CAAAE,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardFieldNative=(0,_reactNative.requireNativeComponent)('CardField');var CardField=exports.CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,postalCodeEnabled=_ref.postalCodeEnabled,countryCode=_ref.countryCode,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn(`[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`);}}onCardChange==null||onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null||onFocus(focusedField);}else{onBlur==null||onBlur();}},[onFocus,onBlur]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};var clear=function clear(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'clear',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(CardFieldNative,Object.assign({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,countryCode:countryCode!=null?countryCode:null,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode}},props));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _helpers=require("../helpers");var _NativeCardField=_interopRequireWildcard(require("../specs/NativeCardField"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardField=exports.CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,autofocus=_ref.autofocus,postalCodeEnabled=_ref.postalCodeEnabled,disabled=_ref.disabled,dangerouslyGetFullCardDetails=_ref.dangerouslyGetFullCardDetails,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent.card;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn(`[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`);}}onCardChange==null||onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null||onFocus(focusedField);}else{onBlur==null||onBlur();}},[onFocus,onBlur]);var focus=function focus(){_NativeCardField.Commands.focus(inputRef.current);};var blur=function blur(){_NativeCardField.Commands.blur(inputRef.current);};var clear=function clear(){_NativeCardField.Commands.clear(inputRef.current);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(_NativeCardField.default,Object.assign({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},autofocus:autofocus!=null?autofocus:false,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,disabled:disabled!=null?disabled:false,dangerouslyGetFullCardDetails:dangerouslyGetFullCardDetails!=null?dangerouslyGetFullCardDetails:false},props));});
2
2
  //# sourceMappingURL=CardField.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardFieldNative","requireNativeComponent","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,sGAAAC,KAAA,MAAAC,YAAA,yFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA,OAAAC,CAAA,CAAAC,MAAA,CAAAC,cAAA,EAAAD,MAAA,CAAAE,wBAAA,SA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+D,MAAA,EACdjD,GAAG,CAAEU,QAAS,CACdT,YAAY,CAAEW,mBAAoB,CAClCsC,aAAa,CAAElB,cAAe,CAC9B1B,iBAAiB,CAAEA,iBAAiB,OAAjBA,iBAAiB,CAAI,IAAK,CAC7CC,WAAW,CAAEA,WAAW,OAAXA,WAAW,CAAI,IAAK,CACjCH,SAAS,CAAE,CACT+C,eAAe,CAAE/C,SAAS,cAATA,SAAS,CAAE+C,eAAe,CAC3CC,WAAW,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,WAAW,CACnCC,WAAW,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,WAAW,CACnCC,YAAY,CAAElD,SAAS,cAATA,SAAS,CAAEkD,YAAY,CACrCC,WAAW,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,WAAW,CACnCC,QAAQ,CAAEpD,SAAS,cAATA,SAAS,CAAEoD,QAAQ,CAC7BC,gBAAgB,CAAErD,SAAS,cAATA,SAAS,CAAEqD,gBAAgB,CAC7CC,SAAS,CAAEtD,SAAS,cAATA,SAAS,CAAEsD,SAAS,CAC/BC,cAAc,CAAEvD,SAAS,cAATA,SAAS,CAAEuD,cAAc,CACzCC,UAAU,CAAExD,SAAS,cAATA,SAAS,CAAEwD,UACzB,CAAE,CACFvD,YAAY,CAAE,CACZsB,MAAM,CAAEtB,YAAY,cAAZA,YAAY,CAAEsB,MAAM,CAC5BkC,UAAU,CAAExD,YAAY,cAAZA,YAAY,CAAEwD,UAAU,CACpCjC,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,EACElB,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_helpers","_NativeCardField","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","Commands","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,QAAA,CAAAD,OAAA,eAMA,IAAAE,gBAAA,CAAAH,uBAAA,CAAAC,OAAA,8BAGkC,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,+IAAAC,KAAA,MAAAC,YAAA,sFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA,OAAAC,CAA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perty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardForm.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardFormNative=(0,_reactNative.requireNativeComponent)('CardForm');var CardForm=exports.CardForm=(0,_react.forwardRef)(function(_ref,ref){var onFormComplete=_ref.onFormComplete,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,defaultValues=_ref.defaultValues,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onFormCompleteHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,country:card.country,postalCode:card.postalCode};if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onFormComplete&&card.complete){console.warn(`[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`);}}onFormComplete==null||onFormComplete(data);},[onFormComplete]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur};});var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);}else{}},[]);(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(CardFormNative,Object.assign({ref:inputRef,onFormComplete:onFormCompleteHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},defaultValues:Object.assign({},defaultValues!=null?defaultValues:{}),onFocusChange:onFocusHandler},props));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _NativeCardForm=_interopRequireWildcard(require("../specs/NativeCardForm"));var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardForm.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardForm=exports.CardForm=(0,_react.forwardRef)(function(_ref,ref){var onFormComplete=_ref.onFormComplete,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,defaultValues=_ref.defaultValues,autofocus=_ref.autofocus,dangerouslyGetFullCardDetails=_ref.dangerouslyGetFullCardDetails,disabled=_ref.disabled,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onFormCompleteHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent.card;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,country:card.country,postalCode:card.postalCode};if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onFormComplete&&card.complete){console.warn(`[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`);}}onFormComplete==null||onFormComplete(data);},[onFormComplete]);var focus=function focus(){_NativeCardForm.Commands.focus(inputRef.current);};var blur=function blur(){_NativeCardForm.Commands.blur(inputRef.current);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur};});var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);}},[]);(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(_NativeCardForm.default,Object.assign({ref:inputRef,onFormComplete:onFormCompleteHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},defaultValues:Object.assign({},defaultValues!=null?defaultValues:{}),onFocusChange:onFocusHandler,autofocus:autofocus!=null?autofocus:false,dangerouslyGetFullCardDetails:dangerouslyGetFullCardDetails!=null?dangerouslyGetFullCardDetails:false,disabled:disabled!=null?disabled:false,postalCodeEnabled:true},props));});
2
2
  //# sourceMappingURL=CardForm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardFormNative","requireNativeComponent","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"mappings":"oRACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,mEAAAC,KAAA,MAAAC,YAAA,wFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAA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S,cAATA,SAAS,CAAE4C,WAAW,CACnCC,YAAY,CAAE7C,SAAS,cAATA,SAAS,CAAE6C,YAAY,CACrCC,WAAW,CAAE9C,SAAS,cAATA,SAAS,CAAE8C,WAAW,CACnCC,QAAQ,CAAE/C,SAAS,cAATA,SAAS,CAAE+C,QAAQ,CAC7BC,gBAAgB,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,gBAAgB,CAC7CC,SAAS,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,SAAS,CAC/BC,cAAc,CAAElD,SAAS,cAATA,SAAS,CAAEkD,cAAc,CACzCC,UAAU,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,UAGzB,CAAE,CACFlD,YAAY,CAAE,CACZmB,MAAM,CAAEnB,YAAY,cAAZA,YAAY,CAAEmB,MAAM,CAC5BgC,UAAU,CAAEnD,YAAY,cAAZA,YAAY,CAAEmD,UAAU,CACpC/B,GAAG,CAAEpB,YAAY,cAAZA,YAAY,CAAEoB,GAAG,CACtBF,UAAU,CAAElB,YAAY,cAAZA,YAAY,CAAEkB,UAC5B,CAAE,CACFjB,aAAa,CAAAlB,MAAA,CAAAyD,MAAA,IACPvC,aAAa,OAAbA,aAAa,CAAI,CAAC,CAAC,CACvB,CACFmD,aAAa,CAAErB,cAAe,EAE1B7B,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_NativeCardForm","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","Commands","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange","postalCodeEnabled"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"mappings":"oRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,eAAA,CAAAF,uBAAA,CAAAC,OAAA,6BACA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,0HAAAC,KAAA,MAAAC,YAAA,qFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA,OAAAC,CAAA,CAAAC,MAAA,CAAAC,cAAA,EAAAD,MAAA,CAAAE,wBAAA,SAAAC,CAAA,IAAAd,CAAA,gBAAAc,CAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,CAAA,OAAAG,CAAA,CAAAP,CAAA,CAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,CAAAc,CAAA,OAAAG,CAAA,GAAAA,CAAA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AAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,CACFpB,aAAa,CAAAhB,MAAA,CAAAwD,MAAA,IACPxC,aAAa,OAAbA,aAAa,CAAI,CAAC,CAAC,CACvB,CACFoD,aAAa,CAAErB,cAAe,CAC9B9B,SAAS,CAAEA,SAAS,OAATA,SAAS,CAAI,KAAM,CAC9BC,6BAA6B,CAAEA,6BAA6B,OAA7BA,6BAA6B,CAAI,KAAM,CACtEC,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BkD,iBAAiB,OACbjD,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null||_fetchPaymentMethodsC.remove();fetchPaymentMethodsCallback=eventEmitter.addListener('onCustomerAdapterFetchPaymentMethodsCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchPaymentMethods){var paymentMethods=yield customerAdapter.fetchPaymentMethods();yield _NativeStripeSdk.default.customerAdapterFetchPaymentMethodsCallback(paymentMethods);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.attachPaymentMethod){var _attachPaymentMethodC;(_attachPaymentMethodC=attachPaymentMethodCallback)==null||_attachPaymentMethodC.remove();attachPaymentMethodCallback=eventEmitter.addListener('onCustomerAdapterAttachPaymentMethodCallback',function(){var _ref4=(0,_asyncToGenerator2.default)(function*(_ref3){var paymentMethodId=_ref3.paymentMethodId;if(customerAdapter.attachPaymentMethod){var paymentMethod=yield customerAdapter.attachPaymentMethod(paymentMethodId);yield _NativeStripeSdk.default.customerAdapterAttachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x2){return _ref4.apply(this,arguments);};}());}if(customerAdapter.detachPaymentMethod){var _detachPaymentMethodC;(_detachPaymentMethodC=detachPaymentMethodCallback)==null||_detachPaymentMethodC.remove();detachPaymentMethodCallback=eventEmitter.addListener('onCustomerAdapterDetachPaymentMethodCallback',function(){var _ref6=(0,_asyncToGenerator2.default)(function*(_ref5){var paymentMethodId=_ref5.paymentMethodId;if(customerAdapter.detachPaymentMethod){var paymentMethod=yield customerAdapter.detachPaymentMethod(paymentMethodId);yield _NativeStripeSdk.default.customerAdapterDetachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x3){return _ref6.apply(this,arguments);};}());}if(customerAdapter.setSelectedPaymentOption){var _setSelectedPaymentOp;(_setSelectedPaymentOp=setSelectedPaymentOptionCallback)==null||_setSelectedPaymentOp.remove();setSelectedPaymentOptionCallback=eventEmitter.addListener('onCustomerAdapterSetSelectedPaymentOptionCallback',function(){var _ref8=(0,_asyncToGenerator2.default)(function*(_ref7){var paymentOption=_ref7.paymentOption;if(customerAdapter.setSelectedPaymentOption){yield customerAdapter.setSelectedPaymentOption(paymentOption);yield _NativeStripeSdk.default.customerAdapterSetSelectedPaymentOptionCallback();}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}});return function(_x4){return _ref8.apply(this,arguments);};}());}if(customerAdapter.fetchSelectedPaymentOption){var _fetchSelectedPayment;(_fetchSelectedPayment=fetchSelectedPaymentOptionCallback)==null||_fetchSelectedPayment.remove();fetchSelectedPaymentOptionCallback=eventEmitter.addListener('onCustomerAdapterFetchSelectedPaymentOptionCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchSelectedPaymentOption){var paymentOption=yield customerAdapter.fetchSelectedPaymentOption();yield _NativeStripeSdk.default.customerAdapterFetchSelectedPaymentOptionCallback(paymentOption);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.setupIntentClientSecretForCustomerAttach){var _setupIntentClientSec;(_setupIntentClientSec=setupIntentClientSecretForCustomerAttachCallback)==null||_setupIntentClientSec.remove();setupIntentClientSecretForCustomerAttachCallback=eventEmitter.addListener('onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.setupIntentClientSecretForCustomerAttach){var clientSecret=yield customerAdapter.setupIntentClientSecretForCustomerAttach();yield _NativeStripeSdk.default.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(clientSecret);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.');}}));}return{fetchPaymentMethods:!!customerAdapter.fetchPaymentMethods,attachPaymentMethod:!!customerAdapter.attachPaymentMethod,detachPaymentMethod:!!customerAdapter.detachPaymentMethod,setSelectedPaymentOption:!!customerAdapter.setSelectedPaymentOption,fetchSelectedPaymentOption:!!customerAdapter.fetchSelectedPaymentOption,setupIntentClientSecretForCustomerAttach:!!customerAdapter.setupIntentClientSecretForCustomerAttach};};var present=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{return yield _NativeStripeSdk.default.presentCustomerSheet(params);}catch(error){return{error:error};}});return function present(){return _ref11.apply(this,arguments);};}();var retrievePaymentOptionSelection=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(){try{return yield _NativeStripeSdk.default.retrieveCustomerSheetPaymentOptionSelection();}catch(error){return{error:error};}});return function retrievePaymentOptionSelection(){return _ref12.apply(this,arguments);};}();function Component(_ref13){var visible=_ref13.visible,presentationStyle=_ref13.presentationStyle,animationStyle=_ref13.animationStyle,style=_ref13.style,appearance=_ref13.appearance,setupIntentClientSecret=_ref13.setupIntentClientSecret,customerId=_ref13.customerId,customerEphemeralKeySecret=_ref13.customerEphemeralKeySecret,merchantDisplayName=_ref13.merchantDisplayName,headerTextForSelectionScreen=_ref13.headerTextForSelectionScreen,defaultBillingDetails=_ref13.defaultBillingDetails,billingDetailsCollectionConfiguration=_ref13.billingDetailsCollectionConfiguration,returnURL=_ref13.returnURL,removeSavedPaymentMethodMessage=_ref13.removeSavedPaymentMethodMessage,applePayEnabled=_ref13.applePayEnabled,googlePayEnabled=_ref13.googlePayEnabled,timeout=_ref13.timeout,onResult=_ref13.onResult,customerAdapter=_ref13.customerAdapter;_react.default.useEffect(function(){if(visible){initialize({style:style,appearance:appearance,setupIntentClientSecret:setupIntentClientSecret,customerId:customerId,customerEphemeralKeySecret:customerEphemeralKeySecret,merchantDisplayName:merchantDisplayName,headerTextForSelectionScreen:headerTextForSelectionScreen,defaultBillingDetails:defaultBillingDetails,billingDetailsCollectionConfiguration:billingDetailsCollectionConfiguration,returnURL:returnURL,removeSavedPaymentMethodMessage:removeSavedPaymentMethodMessage,applePayEnabled:applePayEnabled,googlePayEnabled:googlePayEnabled,customerAdapter:customerAdapter}).then(function(initResult){if(initResult.error){onResult(initResult);}else{present({timeout:timeout,presentationStyle:presentationStyle,animationStyle:animationStyle}).then(function(presentResult){onResult(presentResult);});}});}},[visible]);return null;}var CustomerSheet=exports.CustomerSheet={Component:Component,initialize:initialize,present:present,retrievePaymentOptionSelection:retrievePaymentOptionSelection};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _events=require("../events");var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdkModule.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null||_fetchPaymentMethodsC.remove();fetchPaymentMethodsCallback=(0,_events.addListener)('onCustomerAdapterFetchPaymentMethodsCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchPaymentMethods){var paymentMethods=yield customerAdapter.fetchPaymentMethods();yield _NativeStripeSdkModule.default.customerAdapterFetchPaymentMethodsCallback(paymentMethods);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.attachPaymentMethod){var _attachPaymentMethodC;(_attachPaymentMethodC=attachPaymentMethodCallback)==null||_attachPaymentMethodC.remove();attachPaymentMethodCallback=(0,_events.addListener)('onCustomerAdapterAttachPaymentMethodCallback',function(){var _ref4=(0,_asyncToGenerator2.default)(function*(_ref3){var paymentMethodId=_ref3.paymentMethodId;if(customerAdapter.attachPaymentMethod){var paymentMethod=yield customerAdapter.attachPaymentMethod(paymentMethodId);yield _NativeStripeSdkModule.default.customerAdapterAttachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x2){return _ref4.apply(this,arguments);};}());}if(customerAdapter.detachPaymentMethod){var _detachPaymentMethodC;(_detachPaymentMethodC=detachPaymentMethodCallback)==null||_detachPaymentMethodC.remove();detachPaymentMethodCallback=(0,_events.addListener)('onCustomerAdapterDetachPaymentMethodCallback',function(){var _ref6=(0,_asyncToGenerator2.default)(function*(_ref5){var paymentMethodId=_ref5.paymentMethodId;if(customerAdapter.detachPaymentMethod){var paymentMethod=yield customerAdapter.detachPaymentMethod(paymentMethodId);yield _NativeStripeSdkModule.default.customerAdapterDetachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x3){return _ref6.apply(this,arguments);};}());}if(customerAdapter.setSelectedPaymentOption){var _setSelectedPaymentOp;(_setSelectedPaymentOp=setSelectedPaymentOptionCallback)==null||_setSelectedPaymentOp.remove();setSelectedPaymentOptionCallback=(0,_events.addListener)('onCustomerAdapterSetSelectedPaymentOptionCallback',function(){var _ref8=(0,_asyncToGenerator2.default)(function*(_ref7){var paymentOption=_ref7.paymentOption;if(customerAdapter.setSelectedPaymentOption){yield customerAdapter.setSelectedPaymentOption(paymentOption);yield _NativeStripeSdkModule.default.customerAdapterSetSelectedPaymentOptionCallback();}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}});return function(_x4){return _ref8.apply(this,arguments);};}());}if(customerAdapter.fetchSelectedPaymentOption){var _fetchSelectedPayment;(_fetchSelectedPayment=fetchSelectedPaymentOptionCallback)==null||_fetchSelectedPayment.remove();fetchSelectedPaymentOptionCallback=(0,_events.addListener)('onCustomerAdapterFetchSelectedPaymentOptionCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchSelectedPaymentOption){var paymentOption=yield customerAdapter.fetchSelectedPaymentOption();yield _NativeStripeSdkModule.default.customerAdapterFetchSelectedPaymentOptionCallback(paymentOption);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.setupIntentClientSecretForCustomerAttach){var _setupIntentClientSec;(_setupIntentClientSec=setupIntentClientSecretForCustomerAttachCallback)==null||_setupIntentClientSec.remove();setupIntentClientSecretForCustomerAttachCallback=(0,_events.addListener)('onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.setupIntentClientSecretForCustomerAttach){var clientSecret=yield customerAdapter.setupIntentClientSecretForCustomerAttach();yield _NativeStripeSdkModule.default.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(clientSecret);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.');}}));}return{fetchPaymentMethods:!!customerAdapter.fetchPaymentMethods,attachPaymentMethod:!!customerAdapter.attachPaymentMethod,detachPaymentMethod:!!customerAdapter.detachPaymentMethod,setSelectedPaymentOption:!!customerAdapter.setSelectedPaymentOption,fetchSelectedPaymentOption:!!customerAdapter.fetchSelectedPaymentOption,setupIntentClientSecretForCustomerAttach:!!customerAdapter.setupIntentClientSecretForCustomerAttach};};var present=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{return yield _NativeStripeSdkModule.default.presentCustomerSheet(params);}catch(error){return{error:error};}});return function present(){return _ref11.apply(this,arguments);};}();var retrievePaymentOptionSelection=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(){try{return yield _NativeStripeSdkModule.default.retrieveCustomerSheetPaymentOptionSelection();}catch(error){return{error:error};}});return function retrievePaymentOptionSelection(){return _ref12.apply(this,arguments);};}();function Component(_ref13){var visible=_ref13.visible,presentationStyle=_ref13.presentationStyle,animationStyle=_ref13.animationStyle,style=_ref13.style,appearance=_ref13.appearance,setupIntentClientSecret=_ref13.setupIntentClientSecret,customerId=_ref13.customerId,customerEphemeralKeySecret=_ref13.customerEphemeralKeySecret,merchantDisplayName=_ref13.merchantDisplayName,headerTextForSelectionScreen=_ref13.headerTextForSelectionScreen,defaultBillingDetails=_ref13.defaultBillingDetails,billingDetailsCollectionConfiguration=_ref13.billingDetailsCollectionConfiguration,returnURL=_ref13.returnURL,removeSavedPaymentMethodMessage=_ref13.removeSavedPaymentMethodMessage,applePayEnabled=_ref13.applePayEnabled,googlePayEnabled=_ref13.googlePayEnabled,timeout=_ref13.timeout,onResult=_ref13.onResult,customerAdapter=_ref13.customerAdapter;_react.default.useEffect(function(){if(visible){initialize({style:style,appearance:appearance,setupIntentClientSecret:setupIntentClientSecret,customerId:customerId,customerEphemeralKeySecret:customerEphemeralKeySecret,merchantDisplayName:merchantDisplayName,headerTextForSelectionScreen:headerTextForSelectionScreen,defaultBillingDetails:defaultBillingDetails,billingDetailsCollectionConfiguration:billingDetailsCollectionConfiguration,returnURL:returnURL,removeSavedPaymentMethodMessage:removeSavedPaymentMethodMessage,applePayEnabled:applePayEnabled,googlePayEnabled:googlePayEnabled,customerAdapter:customerAdapter}).then(function(initResult){if(initResult.error){onResult(initResult);}else{present({timeout:timeout,presentationStyle:presentationStyle,animationStyle:animationStyle}).then(function(presentResult){onResult(presentResult);});}});}},[visible]);return null;}var CustomerSheet=exports.CustomerSheet={Component:Component,initialize:initialize,present:present,retrievePaymentOptionSelection:retrievePaymentOptionSelection};
2
2
  //# sourceMappingURL=CustomerSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdk","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","_ref","_asyncToGenerator2","default","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","_yield$NativeStripeSd","NativeStripeSdk","initCustomerSheet","error","_x","apply","arguments","fetchPaymentMethods","_fetchPaymentMethodsC","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","_attachPaymentMethodC","_ref4","_ref3","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","_x2","detachPaymentMethod","_detachPaymentMethodC","_ref6","_ref5","customerAdapterDetachPaymentMethodCallback","_x3","setSelectedPaymentOption","_setSelectedPaymentOp","_ref8","_ref7","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","_x4","fetchSelectedPaymentOption","_fetchSelectedPayment","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","_setupIntentClientSec","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","_ref11","length","undefined","presentCustomerSheet","retrievePaymentOptionSelection","_ref12","retrieveCustomerSheetPaymentOptionSelection","Component","_ref13","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheet","exports"],"sourceRoot":"../../../src","sources":["components/CustomerSheet.tsx"],"mappings":"2QAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAKA,IAAAE,gBAAA,CAAAH,sBAAA,CAAAC,OAAA,wBAUA,GAAM,CAAAG,YAAY,CAAG,GAAI,CAAAC,+BAAkB,CAACC,0BAAa,CAACC,SAAS,CAAC,CACpE,GAAI,CAAAC,2BAAuD,CAAG,IAAI,CAClE,GAAI,CAAAC,2BAAuD,CAAG,IAAI,CAClE,GAAI,CAAAC,2BAAuD,CAAG,IAAI,CAClE,GAAI,CAAAC,gCAA4D,CAAG,IAAI,CACvE,GAAI,CAAAC,kCAA8D,CAAG,IAAI,CACzE,GAAI,CAAAC,gDAA4E,CAC9E,IAAI,CAGN,GAAM,CAAAC,UAAU,gBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjBC,MAA+B,CAC0B,CACzD,GAAI,CAAAC,wBAAwB,CAAG,CAAC,CAAC,CACjC,GAAID,MAAM,CAACE,eAAe,CAAE,CAC1BD,wBAAwB,CAAGE,sCAAsC,CAC/DH,MAAM,CAACE,eACT,CAAC,CACH,CAEA,GAAI,CACF,IAAAE,qBAAA,MAAwB,CAAAC,wBAAe,CAACC,iBAAiB,CACvDN,MAAM,CACNC,wBACF,CAAC,CAHOM,KAAK,CAAAH,qBAAA,CAALG,KAAK,CAIb,GAAIA,KAAK,CAAE,CACT,MAAO,CAAEA,KAAK,CAALA,KAAM,CAAC,CAClB,CACA,MAAO,CAAC,CAAC,CACX,CAAE,MAAOA,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBAxBK,CAAAX,UAAUA,CAAAY,EAAA,SAAAX,IAAA,CAAAY,KAA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CACtB,CAAC,IAAM,CACL/B,OAAO,CAAC,CACN0B,OAAO,CAAPA,OAAO,CACPf,iBAAiB,CAAjBA,iBAAiB,CACjBC,cAAc,CAAdA,cACF,CAAC,CAAC,CAACkB,IAAI,CAAC,SAACE,aAAa,CAAK,CACzBL,QAAQ,CAACK,aAAa,CAAC,CACzB,CAAC,CAAC,CACJ,CACF,CAAC,CAAC,CACJ,CAGF,CAAC,CAAE,CAACtB,OAAO,CAAC,CAAC,CAEb,MAAO,KAAI,CACb,CAKO,GAAM,CAAAuB,aAAa,CAAAC,OAAA,CAAAD,aAAA,CAAG,CAC3BzB,SAAS,CAATA,SAAS,CACT1D,UAAU,CAAVA,UAAU,CACVkD,OAAO,CAAPA,OAAO,CACPK,8BAA8B,CAA9BA,8BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeStripeSdkModule","_events","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","_ref","_asyncToGenerator2","default","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","_yield$NativeStripeSd","NativeStripeSdk","initCustomerSheet","error","_x","apply","arguments","fetchPaymentMethods","_fetchPaymentMethodsC","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","_attachPaymentMethodC","_ref4","_ref3","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","_x2","detachPaymentMethod","_detachPaymentMethodC","_ref6","_ref5","customerAdapterDetachPaymentMethodCallback","_x3","setSelectedPaymentOption","_setSelectedPaymentOp","_ref8","_ref7","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","_x4","fetchSelectedPaymentOption","_fetchSelectedPayment","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","_setupIntentClientSec","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","_ref11","length","undefined","presentCustomerSheet","retrievePaymentOptionSelection","_ref12","retrieveCustomerSheetPaymentOptionSelection","Component","_ref13","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheet","exports"],"sourceRoot":"../../../src","sources":["components/CustomerSheet.tsx"],"mappings":"2QAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCASA,IAAAE,OAAA,CAAAF,OAAA,cAEA,GAAI,CAAAG,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,gCAA0D,CAAG,IAAI,CACrE,GAAI,CAAAC,kCAA4D,CAAG,IAAI,CACvE,GAAI,CAAAC,gDAA0E,CAC5E,IAAI,CAGN,GAAM,CAAAC,UAAU,gBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjBC,MAA+B,CAG3B,CACJ,GAAI,CAAAC,wBAAwB,CAAG,CAAC,CAAC,CACjC,GAAID,MAAM,CAACE,eAAe,CAAE,CAC1BD,wBAAwB,CAAGE,sCAAsC,CAC/DH,MAAM,CAACE,eACT,CAAC,CACH,CAEA,GAAI,CACF,IAAAE,qBAAA,MAAwB,CAAAC,8BAAe,CAACC,iBAAiB,CACvDN,MAAM,CACNC,wBACF,CAAC,CAHOM,KAAK,CAAAH,qBAAA,CAALG,KAAK,CAIb,GAAIA,KAAK,CAAE,CACT,MAAO,CAAEA,KAAK,CAALA,KAAM,CAAC,CAClB,CACA,MAAO,CAAC,CAAC,CACX,CAAE,MAAOA,KAAU,CAAE,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AU,CAAK,CACtB,GAAIA,UAAU,CAACtE,KAAK,CAAE,CACpBkE,QAAQ,CAACI,UAAU,CAAC,CACtB,CAAC,IAAM,CACL/B,OAAO,CAAC,CACN0B,OAAO,CAAPA,OAAO,CACPf,iBAAiB,CAAjBA,iBAAiB,CACjBC,cAAc,CAAdA,cACF,CAAC,CAAC,CAACkB,IAAI,CAAC,SAACE,aAAa,CAAK,CACzBL,QAAQ,CAACK,aAAa,CAAC,CACzB,CAAC,CAAC,CACJ,CACF,CAAC,CAAC,CACJ,CAGF,CAAC,CAAE,CAACtB,OAAO,CAAC,CAAC,CAEb,MAAO,KAAI,CACb,CAKO,GAAM,CAAAuB,aAAa,CAAAC,OAAA,CAAAD,aAAA,CAAG,CAC3BzB,SAAS,CAATA,SAAS,CACT1D,UAAU,CAAVA,UAAU,CACVkD,OAAO,CAAPA,OAAO,CACPK,8BAA8B,CAA9BA,8BACF,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _PlatformPay=require("../types/PlatformPay");var _GooglePayButtonNative=_interopRequireDefault(require("./GooglePayButtonNative"));var _ApplePayButtonNative=_interopRequireDefault(require("./ApplePayButtonNative"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style"];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,setOrderTracking=_ref.setOrderTracking,style=_ref.style,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;var orderTrackingCallback=setOrderTracking?function(){setOrderTracking(_NativeStripeSdk.default.configureOrderTracking);}:undefined;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:[disabled?styles.disabled:styles.notDisabled,style],children:_reactNative.Platform.OS==='ios'?(0,_jsxRuntime.jsx)(_ApplePayButtonNative.default,Object.assign({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback,onOrderTrackingAction:orderTrackingCallback,style:styles.nativeButtonStyle},props)):(0,_jsxRuntime.jsx)(_GooglePayButtonNative.default,Object.assign({type:type,appearance:appearance,borderRadius:borderRadius,style:styles.nativeButtonStyle},props))});}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.4},notDisabled:{flex:0},nativeButtonStyle:{flex:1}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _PlatformPay=require("../types/PlatformPay");var _NativeApplePayButton=_interopRequireDefault(require("../specs/NativeApplePayButton"));var _NativeGooglePayButton=_interopRequireDefault(require("../specs/NativeGooglePayButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style"];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,setOrderTracking=_ref.setOrderTracking,style=_ref.style,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;var orderTrackingCallback=setOrderTracking?function(){setOrderTracking(_NativeStripeSdkModule.default.configureOrderTracking);}:undefined;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:[disabled?styles.disabled:styles.notDisabled,style],children:_reactNative.Platform.OS==='ios'?(0,_jsxRuntime.jsx)(_NativeApplePayButton.default,Object.assign({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled!=null?disabled:false,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback,onOrderTrackingAction:orderTrackingCallback,style:styles.nativeButtonStyle},props)):(0,_jsxRuntime.jsx)(_NativeGooglePayButton.default,Object.assign({type:type,appearance:appearance,borderRadius:borderRadius,style:styles.nativeButtonStyle},props))});}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.4},notDisabled:{flex:0},nativeButtonStyle:{flex:1}});
2
2
  //# sourceMappingURL=PlatformPayButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdk","_PlatformPay","_GooglePayButtonNative","_ApplePayButtonNative","_jsxRuntime","_jsxFileName","_excluded","PlatformPayButton","_ref","_ref$type","type","ButtonType","Default","_ref$appearance","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style","props","_objectWithoutProperties2","default","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","orderTrackingCallback","NativeStripeSdk","configureOrderTracking","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sourceRoot":"../../../src","sources":["components/PlatformPayButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,gBAAA,CAAAH,sBAAA,CAAAC,OAAA,wBACA,IAAAG,YAAA,CAAAH,OAAA,yBAMA,IAAAI,sBAAA,CAAAL,sBAAA,CAAAC,OAAA,6BACA,IAAAK,qBAAA,CAAAN,sBAAA,CAAAC,OAAA,4BAA0D,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,YAAA,4FAAA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AAEG,IAAI,CAAE,CAAE,CAC/B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdkModule","_PlatformPay","_NativeApplePayButton","_NativeGooglePayButton","_jsxRuntime","_jsxFileName","_excluded","PlatformPayButton","_ref","_ref$type","type","ButtonType","Default","_ref$appearance","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style","props","_objectWithoutProperties2","default","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","orderTrackingCallback","NativeStripeSdk","configureOrderTracking","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sourceRoot":"../../../src","sources":["components/PlatformPayButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCACA,IAAAG,YAAA,CAAAH,OAAA,yBAMA,IAAAI,qBAAA,CAAAL,sBAAA,CAAAC,OAAA,mCACA,IAAAK,sBAAA,CAAAN,sBAAA,CAAAC,OAAA,oCAAmE,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,YAAA,yFAAAC,SAAA,mKA4E5D,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAYvB,KAAAC,SAAA,CAAAD,IAAA,CAXRE,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAGE,uBAAU,CAACC,OAAO,CAAAH,SAAA,CAAAI,eAAA,CAAAL,IAAA,CACzBM,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAGE,wBAAW,CAACC,SAAS,CAAAH,eAAA,CAClCI,OAAO,CAAAT,IAAA,C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CAAE,CAAAkB,QAAA,CAE/DC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CACpB,GAAAxC,WAAA,CAAAiC,GAAA,EAACnC,qBAAA,CAAAyB,OAAoB,CAAAkB,MAAA,CAAAC,MAAA,EACnBpC,IAAI,CAAEA,IAAK,CACXqC,WAAW,CAAEjC,UAAW,CACxBK,YAAY,CAAEA,YAAa,CAC3BD,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5B8B,8BAA8B,CAAEpB,sBAAuB,CACvDqB,+BAA+B,CAAEjB,uBAAwB,CACzDkB,yBAAyB,CAAEjB,kBAAmB,CAC9CkB,qBAAqB,CAAEjB,qBAAsB,CAC7CV,KAAK,CAAEgB,MAAM,CAACY,iBAAkB,EAC5B3B,KAAK,CACV,CAAC,CAEF,GAAArB,WAAA,CAAAiC,GAAA,EAAClC,sBAAA,CAAAwB,OAAqB,CAAAkB,MAAA,CAAAC,MAAA,EACpBpC,IAAI,CAAEA,IAAK,CACXI,UAAU,CAAEA,UAAW,CACvBK,YAAY,CAAEA,YAAa,CAC3BK,KAAK,CAAEgB,MAAM,CAACY,iBAAkB,EAC5B3B,KAAK,CACV,CACF,CACe,CAAC,CAEvB,CAEA,GAAM,CAAAe,MAAM,CAAGa,uBAAU,CAACC,MAAM,CAAC,CAC/BpC,QAAQ,CAAE,CACRqC,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDf,WAAW,CAAE,CACXc,IAAI,CAAE,CACR,CAAC,CACDH,iBAAiB,CAAE,CAAEG,IAAI,CAAE,CAAE,CAC/B,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/StripeContainer.tsx";var StripeContainerNative=(0,_reactNative.requireNativeComponent)('StripeContainer');function StripeContainer(_ref){var keyboardShouldPersistTaps=_ref.keyboardShouldPersistTaps,children=_ref.children;return(0,_jsxRuntime.jsx)(StripeContainerNative,{keyboardShouldPersistTaps:keyboardShouldPersistTaps,style:styles.container,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,accessible:false,children:children})});}var styles=_reactNative.StyleSheet.create({container:{flex:1}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeContainer=_interopRequireDefault(require("../specs/NativeStripeContainer"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/StripeContainer.tsx";function StripeContainer(_ref){var keyboardShouldPersistTaps=_ref.keyboardShouldPersistTaps,children=_ref.children;return(0,_jsxRuntime.jsx)(_NativeStripeContainer.default,{keyboardShouldPersistTaps:keyboardShouldPersistTaps!=null?keyboardShouldPersistTaps:true,style:styles.container,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,accessible:false,children:children})});}var styles=_reactNative.StyleSheet.create({container:{flex:1}});
2
2
  //# sourceMappingURL=StripeContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","StripeContainerNative","requireNativeComponent","StripeContainer","_ref","keyboardShouldPersistTaps","children","jsx","style","styles","container","View","accessible","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/StripeContainer.tsx"],"mappings":"oLAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBAMsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,sFAEtB,GAAM,CAAAC,qBAAqB,CAAG,GAAAC,mCAAsB,EAAM,iBAAiB,CAAC,CAkBrE,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAGrB,IAFR,CAAAC,yBAAyB,CAAAD,IAAA,CAAzBC,yBAAyB,CACzBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAER,MACE,GAAAP,WAAA,CAAAQ,GAAA,EAACN,qBAAqB,EACpBI,yBAAyB,CAAEA,yBAA0B,CACrDG,KAAK,CAAEC,MAAM,CAACC,SAAU,CAAAJ,QAAA,CAExB,GAAAP,WAAA,CAAAQ,GAAA,EAACT,YAAA,CAAAa,IAAI,EAACH,KAAK,CAAEC,MAAM,CAACC,SAAU,CAACE,UAAU,CAAE,KAAM,CAAAN,QAAA,CAC9CA,QAAQ,CACL,CAAC,CACc,CAAC,CAE5B,CAEA,GAAM,CAAAG,MAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BJ,SAAS,CAAE,CACTK,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeContainer","_jsxRuntime","_jsxFileName","StripeContainer","_ref","keyboardShouldPersistTaps","children","jsx","default","style","styles","container","View","accessible","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/StripeContainer.tsx"],"mappings":"oLAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCAAmE,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,YAAA,mFAkB5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAGrB,IAFR,CAAAC,yBAAyB,CAAAD,IAAA,CAAzBC,yBAAyB,CACzBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAER,MACE,GAAAL,WAAA,CAAAM,GAAA,EAACP,sBAAA,CAAAQ,OAAqB,EACpBH,yBAAyB,CAAEA,yBAAyB,OAAzBA,yBAAyB,CAAI,IAAK,CAC7DI,KAAK,CAAEC,MAAM,CAACC,SAAU,CAAAL,QAAA,CAExB,GAAAL,WAAA,CAAAM,GAAA,EAACR,YAAA,CAAAa,IAAI,EAACH,KAAK,CAAEC,MAAM,CAACC,SAAU,CAACE,UAAU,CAAE,KAAM,CAAAP,QAAA,CAC9CA,QAAQ,CACL,CAAC,CACc,CAAC,CAE5B,CAEA,GAAM,CAAAI,MAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BJ,SAAS,CAAE,CACTK,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../../package.json"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?`${_package.default.name}/expo`:_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=exports.initStripe=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS==='android'){var stripeHeadlessTask=function stripeHeadlessTask(){return new Promise(function(){});};_reactNative.AppRegistry.registerHeadlessTask('StripeKeepJsAwakeTask',function(){return stripeHeadlessTask;});}var extendedParams=Object.assign({},params,{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);});return function initStripe(_x){return _ref.apply(this,arguments);};}();function StripeProvider(_ref2){var children=_ref2.children,publishableKey=_ref2.publishableKey,merchantIdentifier=_ref2.merchantIdentifier,threeDSecureParams=_ref2.threeDSecureParams,stripeAccountId=_ref2.stripeAccountId,urlScheme=_ref2.urlScheme,setReturnUrlSchemeOnAndroid=_ref2.setReturnUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setReturnUrlSchemeOnAndroid]);return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../../package.json"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?`${_package.default.name}/expo`:_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=exports.initStripe=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS==='android'){var stripeHeadlessTask=function stripeHeadlessTask(){return new Promise(function(){});};_reactNative.AppRegistry.registerHeadlessTask('StripeKeepJsAwakeTask',function(){return stripeHeadlessTask;});}var extendedParams=Object.assign({},params,{appInfo:appInfo});_NativeStripeSdkModule.default.initialise(extendedParams);});return function initStripe(_x){return _ref.apply(this,arguments);};}();function StripeProvider(_ref2){var children=_ref2.children,publishableKey=_ref2.publishableKey,merchantIdentifier=_ref2.merchantIdentifier,threeDSecureParams=_ref2.threeDSecureParams,stripeAccountId=_ref2.stripeAccountId,urlScheme=_ref2.urlScheme,setReturnUrlSchemeOnAndroid=_ref2.setReturnUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdkModule.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{_NativeStripeSdkModule.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setReturnUrlSchemeOnAndroid]);return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});}
2
2
  //# sourceMappingURL=StripeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_NativeStripeSdk","_interopRequireDefault","_helpers","_package","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EXPO_PARTNER_ID","repository","pjson","appInfo","name","shouldAttributeExpo","url","version","partnerId","undefined","initStripe","exports","_ref","_asyncToGenerator2","params","Platform","OS","stripeHeadlessTask","Promise","AppRegistry","registerHeadlessTask","extendedParams","assign","NativeStripeSdk","initialise","_x","apply","arguments","StripeProvider","_ref2","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","useEffect","isAndroid","jsx","Fragment"],"sourceRoot":"../../../src","sources":["components/StripeProvider.tsx"],"mappings":"8SAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,gBAAA,CAAAC,sBAAA,CAAAF,OAAA,wBACA,IAAAG,QAAA,CAAAH,OAAA,eAEA,IAAAI,QAAA,CAAAF,sBAAA,CAAAF,OAAA,2BACA,IAAAK,YAAA,CAAAL,OAAA,iBAAqD,IAAAM,WAAA,C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A,CAA3BO,2BAA2B,CAE3B,GAAAC,gBAAS,EAAC,UAAM,CACd,GAAI,CAACN,cAAc,CAAE,CACnB,OACF,CACA,GAAIO,kBAAS,CAAE,CACbf,wBAAe,CAACC,UAAU,CAAC,CACzBO,cAAc,CAAdA,cAAc,CACd5B,OAAO,CAAPA,OAAO,CACP+B,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBE,SAAS,CAATA,SAAS,CACTC,2BAA2B,CAA3BA,2BACF,CAAC,CAAC,CACJ,CAAC,IAAM,CACLb,wBAAe,CAACC,UAAU,CAAC,CACzBO,cAAc,CAAdA,cAAc,CACd5B,OAAO,CAAPA,OAAO,CACP+B,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBD,kBAAkB,CAAlBA,kBAAkB,CAClBG,SAAS,CAATA,SACF,CAAC,CAAC,CACJ,CACF,CAAC,CAAE,CACDJ,cAAc,CACdC,kBAAkB,CAClBE,eAAe,CACfD,kBAAkB,CAClBE,SAAS,CACTC,2BAA2B,CAC5B,CAAC,CAEF,MAAO,GAAAzD,WAAA,CAAA4D,GAAA,EAAA5D,WAAA,CAAA6D,QAAA,EAAAV,QAAA,CAAGA,QAAQ,CAAG,CAAC,CACxB","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_NativeStripeSdkModule","_interopRequireDefault","_helpers","_package","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EXPO_PARTNER_ID","repository","pjson","appInfo","name","shouldAttributeExpo","url","version","partnerId","undefined","initStripe","exports","_ref","_asyncToGenerator2","params","Platform","OS","stripeHeadlessTask","Promise","AppRegistry","registerHeadlessTask","extendedParams","assign","NativeStripeSdk","initialise","_x","apply","arguments","StripeProvider","_ref2","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlSc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CAsBM,QAAS,CAAAC,cAAcA,CAAAC,KAAA,CAQpB,IAPR,CAAAC,QAAQ,CAAAD,KAAA,CAARC,QAAQ,CACRC,cAAc,CAAAF,KAAA,CAAdE,cAAc,CACdC,kBAAkB,CAAAH,KAAA,CAAlBG,kBAAkB,CAClBC,kBAAkB,CAAAJ,KAAA,CAAlBI,kBAAkB,CAClBC,eAAe,CAAAL,KAAA,CAAfK,eAAe,CACfC,SAAS,CAAAN,KAAA,CAATM,SAAS,CACTC,2BAA2B,CAAAP,KAAA,CAA3BO,2BAA2B,CAE3B,GAAAC,gBAAS,EAAC,UAAM,CACd,GAAI,CAACN,cAAc,CAAE,CACnB,OACF,CACA,GAAIO,kBAAS,CAAE,CACbf,8BAAe,CAACC,UAAU,CAAC,CACzBO,cAAc,CAAdA,cAAc,CACd5B,OAAO,CAAPA,OAAO,CACP+B,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBE,SAAS,CAATA,SAAS,CACTC,2BAA2B,CAA3BA,2BACF,CAAC,CAAC,CACJ,CAAC,IAAM,CACLb,8BAAe,CAACC,UAAU,CAAC,CACzBO,cAAc,CAAdA,cAAc,CACd5B,OAAO,CAAPA,OAAO,CACP+B,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBD,kBAAkB,CAAlBA,kBAAkB,CAClBG,SAAS,CAATA,SACF,CAAC,CAAC,CACJ,CACF,CAAC,CAAE,CACDJ,cAAc,CACdC,kBAAkB,CAClBE,eAAe,CACfD,kBAAkB,CAClBE,SAAS,CACTC,2BAA2B,CAC5B,CAAC,CAEF,MAAO,GAAAzD,WAAA,CAAA4D,GAAA,EAAA5D,WAAA,CAAA6D,QAAA,EAAAV,QAAA,CAAGA,QAAQ,CAAG,CAAC,CACxB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.addListener=addListener;var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("./specs/NativeStripeSdkModule"));var compatEventEmitter=_NativeStripeSdkModule.default.onConfirmHandlerCallback==null?_reactNative.Platform.OS==='ios'?new _reactNative.NativeEventEmitter(_NativeStripeSdkModule.default):_reactNative.DeviceEventEmitter:null;function addListener(event,handler){if(compatEventEmitter!=null){return compatEventEmitter.addListener(event,handler);}return _NativeStripeSdkModule.default[event](handler);}
2
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_NativeStripeSdkModule","_interopRequireDefault","compatEventEmitter","NativeStripeSdkModule","onConfirmHandlerCallback","Platform","OS","NativeEventEmitter","DeviceEventEmitter","addListener","event","handler"],"sourceRoot":"../../src","sources":["events.ts"],"mappings":"4KAQA,IAAAA,YAAA,CAAAC,OAAA,iBAMA,IAAAC,sBAAA,CAAAC,sBAAA,CAAAF,OAAA,mCAEA,GAAM,CAAAG,kBAAkB,CAGtBC,8BAAqB,CAACC,wBAAwB,EAAI,IAAI,CAClDC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CACnB,GAAI,CAAAC,+BAAkB,CAACJ,8BAA4B,CAAC,CACpDK,+BAAkB,CACpB,IAAI,CAiBH,QAAS,CAAAC,WAAWA,CACzBC,KAAa,CACbC,OAA8D,CAC3C,CACnB,GAAIT,kBAAkB,EAAI,IAAI,CAAE,CAC9B,MAAO,CAAAA,kBAAkB,CAACO,WAAW,CAACC,KAAK,CAAEC,OAAO,CAAC,CACvD,CACA,MAAO,CAAAR,8BAAqB,CAACO,KAAK,CAAC,CAACC,OAAc,CAAC,CACrD","ignoreList":[]}