@stripe/stripe-react-native 0.57.0 → 0.57.2

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 (324) hide show
  1. package/README.md +0 -8
  2. package/android/.idea/AndroidProjectSystem.xml +6 -0
  3. package/android/.idea/caches/deviceStreaming.xml +1029 -0
  4. package/android/.idea/compiler.xml +6 -0
  5. package/android/.idea/gradle.xml +19 -0
  6. package/android/.idea/migrations.xml +10 -0
  7. package/android/.idea/misc.xml +10 -0
  8. package/android/.idea/runConfigurations.xml +17 -0
  9. package/android/.idea/vcs.xml +6 -0
  10. package/android/build.gradle +76 -118
  11. package/android/gradle.properties +1 -1
  12. package/android/local.properties +8 -0
  13. package/android/settings.gradle +2 -0
  14. package/android/spotless.gradle +1 -1
  15. package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +20 -17
  16. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +13 -11
  17. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +17 -21
  18. package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherManager.kt +2 -0
  19. package/android/src/main/java/com/reactnativestripesdk/CustomPaymentMethodActivity.kt +2 -0
  20. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +53 -11
  21. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +105 -117
  22. package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +4 -8
  23. package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +154 -0
  24. package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetManager.kt +13 -15
  25. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +1 -1
  26. package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherManager.kt +1 -1
  27. package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +7 -5
  28. package/android/src/main/java/com/reactnativestripesdk/NavigationBarManager.kt +31 -0
  29. package/android/src/main/java/com/reactnativestripesdk/NavigationBarView.kt +120 -0
  30. package/android/src/main/java/com/reactnativestripesdk/PaymentElementConfig.kt +228 -0
  31. package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherManager.kt +1 -0
  32. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +3 -0
  33. package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +4 -6
  34. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +73 -30
  35. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +19 -245
  36. package/android/src/main/java/com/reactnativestripesdk/StripeAbstractComposeView.kt +53 -17
  37. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +52 -14
  38. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +21 -2
  39. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +4 -4
  40. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +2 -2
  41. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetManager.kt +15 -35
  42. package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerSessionProvider.kt +2 -1
  43. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +5 -10
  44. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +90 -77
  45. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.kt +6 -4
  46. package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +13 -3
  47. package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +41 -0
  48. package/android/src/main/java/com/reactnativestripesdk/utils/KeepJsAwakeTask.kt +1 -1
  49. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +92 -44
  50. package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerDelegate.java +3 -0
  51. package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerInterface.java +2 -0
  52. package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +118 -0
  53. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +4 -0
  54. package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +922 -0
  55. package/android/src/test/java/com/facebook/testutils/shadows/ShadowArguments.kt +29 -0
  56. package/android/src/test/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManagerTest.kt +163 -0
  57. package/android/src/test/java/com/reactnativestripesdk/PaymentElementConfigTest.kt +976 -0
  58. package/android/src/test/java/com/reactnativestripesdk/PaymentSheetAppearanceTest.kt +801 -0
  59. package/android/src/test/java/com/reactnativestripesdk/PaymentSheetManagerTest.kt +523 -0
  60. package/android/src/test/java/com/reactnativestripesdk/addresssheet/AddressSheetViewTest.kt +551 -0
  61. package/android/src/test/java/com/reactnativestripesdk/mappers/MappersTest.kt +567 -0
  62. package/android/src/test/java/com/reactnativestripesdk/mappers/PaymentOptionDisplayDataMapperTest.kt +456 -0
  63. package/android/src/test/java/com/reactnativestripesdk/pushprovisioning/PushProvisioningProxyTest.kt +43 -0
  64. package/android/src/test/resources/robolectric.properties +2 -0
  65. package/ios/AddressSheet/AddressSheetUtils.swift +3 -3
  66. package/ios/AddressSheet/AddressSheetView.swift +25 -25
  67. package/ios/AddressSheet/AddressSheetViewManager.swift +2 -2
  68. package/ios/ApplePayButtonManager.swift +1 -1
  69. package/ios/ApplePayButtonView.swift +9 -10
  70. package/ios/ApplePayUtils.swift +51 -51
  71. package/ios/ApplePayViewController.swift +25 -29
  72. package/ios/AuBECSDebitFormManager.swift +1 -1
  73. package/ios/AuBECSDebitFormView.swift +13 -15
  74. package/ios/CardFieldManager.swift +4 -4
  75. package/ios/CardFieldView.swift +9 -9
  76. package/ios/CardFormManager.swift +3 -3
  77. package/ios/CardFormView.swift +28 -28
  78. package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingView.swift +97 -0
  79. package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewController.swift +133 -0
  80. package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewManager.m +16 -0
  81. package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewManager.swift +17 -0
  82. package/ios/CustomerSheet/CustomerSheetUtils.swift +15 -16
  83. package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +19 -19
  84. package/ios/EmbeddedPaymentElementView.swift +2 -2
  85. package/ios/Errors.swift +22 -23
  86. package/ios/FinancialConnections.swift +37 -37
  87. package/ios/Mappers.swift +210 -71
  88. package/ios/NavigationBarManager.m +13 -0
  89. package/ios/NavigationBarManager.swift +17 -0
  90. package/ios/NavigationBarView.swift +65 -0
  91. package/ios/NewArch/NavigationBarComponentView.h +10 -0
  92. package/ios/NewArch/NavigationBarComponentView.mm +86 -0
  93. package/ios/OldArch/StripeSdkEventEmitterCompat.h +1 -0
  94. package/ios/OldArch/StripeSdkEventEmitterCompat.m +7 -1
  95. package/ios/PaymentMethodFactory.swift +24 -24
  96. package/ios/PaymentOptionDisplayData+ReactNative.swift +4 -4
  97. package/ios/PaymentPassFinder.swift +9 -10
  98. package/ios/PaymentSheetAppearance.swift +137 -138
  99. package/ios/PushProvisioning/AddToWalletButtonManager.swift +2 -2
  100. package/ios/PushProvisioning/AddToWalletButtonView.swift +15 -17
  101. package/ios/PushProvisioning/PushProvisioningUtils.swift +11 -11
  102. package/ios/StripeContainerManager.swift +1 -1
  103. package/ios/StripeContainerView.swift +3 -3
  104. package/ios/StripeOnrampSdk.h +17 -0
  105. package/ios/StripeOnrampSdk.mm +158 -0
  106. package/ios/StripeSdk.mm +8 -0
  107. package/ios/StripeSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  108. package/ios/StripeSdk.xcodeproj/project.xcworkspace/xcuserdata/tianzhao.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  109. package/ios/StripeSdk.xcodeproj/xcuserdata/tianzhao.xcuserdatad/xcschemes/xcschememanagement.plist +19 -0
  110. package/ios/StripeSdkEmitter.swift +4 -0
  111. package/ios/StripeSdkImpl+CustomerSheet.swift +30 -25
  112. package/ios/StripeSdkImpl+Embedded.swift +11 -9
  113. package/ios/StripeSdkImpl+PaymentSheet.swift +36 -34
  114. package/ios/StripeSdkImpl.swift +913 -185
  115. package/ios/UIColorExtension.swift +72 -0
  116. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  117. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  118. package/lib/commonjs/components/AddressSheet.js +1 -1
  119. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  120. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  121. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  122. package/lib/commonjs/components/CardField.js +1 -1
  123. package/lib/commonjs/components/CardField.js.map +1 -1
  124. package/lib/commonjs/components/CardForm.js +1 -1
  125. package/lib/commonjs/components/CardForm.js.map +1 -1
  126. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  127. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  128. package/lib/commonjs/components/StripeContainer.js +1 -1
  129. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  130. package/lib/commonjs/components/StripeProvider.js +1 -1
  131. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  132. package/lib/commonjs/connect/Components.js +2 -0
  133. package/lib/commonjs/connect/Components.js.map +1 -0
  134. package/lib/commonjs/connect/ConnectComponentsProvider.js +2 -0
  135. package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -0
  136. package/lib/commonjs/connect/EmbeddedComponent.js +19 -0
  137. package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -0
  138. package/lib/commonjs/connect/ModalCloseButton.js +2 -0
  139. package/lib/commonjs/connect/ModalCloseButton.js.map +1 -0
  140. package/lib/commonjs/connect/NavigationBar.js +2 -0
  141. package/lib/commonjs/connect/NavigationBar.js.map +1 -0
  142. package/lib/commonjs/connect/connectTypes.js +2 -0
  143. package/lib/commonjs/connect/connectTypes.js.map +1 -0
  144. package/lib/commonjs/events.js +1 -1
  145. package/lib/commonjs/events.js.map +1 -1
  146. package/lib/commonjs/helpers.js +1 -1
  147. package/lib/commonjs/helpers.js.map +1 -1
  148. package/lib/commonjs/hooks/useOnramp.js +2 -0
  149. package/lib/commonjs/hooks/useOnramp.js.map +1 -0
  150. package/lib/commonjs/index.js +1 -1
  151. package/lib/commonjs/index.js.map +1 -1
  152. package/lib/commonjs/plugin/withStripe.js +1 -1
  153. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  154. package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
  155. package/lib/commonjs/specs/NativeAddToWalletButton.js.map +1 -1
  156. package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
  157. package/lib/commonjs/specs/NativeAddressSheet.js.map +1 -1
  158. package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
  159. package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -1
  160. package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
  161. package/lib/commonjs/specs/NativeAuBECSDebitForm.js.map +1 -1
  162. package/lib/commonjs/specs/NativeCardField.js +1 -1
  163. package/lib/commonjs/specs/NativeCardField.js.map +1 -1
  164. package/lib/commonjs/specs/NativeCardForm.js +1 -1
  165. package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
  166. package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +2 -0
  167. package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js.map +1 -0
  168. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
  169. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
  170. package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
  171. package/lib/commonjs/specs/NativeGooglePayButton.js.map +1 -1
  172. package/lib/commonjs/specs/NativeNavigationBar.js +2 -0
  173. package/lib/commonjs/specs/NativeNavigationBar.js.map +1 -0
  174. package/lib/commonjs/specs/NativeOnrampSdkModule.js +2 -0
  175. package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +1 -0
  176. package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
  177. package/lib/commonjs/specs/NativeStripeContainer.js.map +1 -1
  178. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
  179. package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
  180. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
  181. package/lib/commonjs/types/Errors.js +1 -1
  182. package/lib/commonjs/types/Errors.js.map +1 -1
  183. package/lib/commonjs/types/Onramp.js +2 -0
  184. package/lib/commonjs/types/Onramp.js.map +1 -0
  185. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  186. package/lib/commonjs/types/index.js +1 -1
  187. package/lib/commonjs/types/index.js.map +1 -1
  188. package/lib/module/components/AddToWalletButton.js +1 -1
  189. package/lib/module/components/AddToWalletButton.js.map +1 -1
  190. package/lib/module/components/AddressSheet.js +1 -1
  191. package/lib/module/components/AddressSheet.js.map +1 -1
  192. package/lib/module/components/AuBECSDebitForm.js +1 -1
  193. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  194. package/lib/module/components/CardField.js +1 -1
  195. package/lib/module/components/CardField.js.map +1 -1
  196. package/lib/module/components/CardForm.js +1 -1
  197. package/lib/module/components/CardForm.js.map +1 -1
  198. package/lib/module/components/PlatformPayButton.js +1 -1
  199. package/lib/module/components/PlatformPayButton.js.map +1 -1
  200. package/lib/module/components/StripeContainer.js +1 -1
  201. package/lib/module/components/StripeContainer.js.map +1 -1
  202. package/lib/module/components/StripeProvider.js +1 -1
  203. package/lib/module/components/StripeProvider.js.map +1 -1
  204. package/lib/module/connect/Components.js +2 -0
  205. package/lib/module/connect/Components.js.map +1 -0
  206. package/lib/module/connect/ConnectComponentsProvider.js +2 -0
  207. package/lib/module/connect/ConnectComponentsProvider.js.map +1 -0
  208. package/lib/module/connect/EmbeddedComponent.js +19 -0
  209. package/lib/module/connect/EmbeddedComponent.js.map +1 -0
  210. package/lib/module/connect/ModalCloseButton.js +2 -0
  211. package/lib/module/connect/ModalCloseButton.js.map +1 -0
  212. package/lib/module/connect/NavigationBar.js +2 -0
  213. package/lib/module/connect/NavigationBar.js.map +1 -0
  214. package/lib/module/connect/connectTypes.js +2 -0
  215. package/lib/module/connect/connectTypes.js.map +1 -0
  216. package/lib/module/events.js +1 -1
  217. package/lib/module/events.js.map +1 -1
  218. package/lib/module/helpers.js +1 -1
  219. package/lib/module/helpers.js.map +1 -1
  220. package/lib/module/hooks/useOnramp.js +2 -0
  221. package/lib/module/hooks/useOnramp.js.map +1 -0
  222. package/lib/module/index.js +1 -1
  223. package/lib/module/index.js.map +1 -1
  224. package/lib/module/plugin/withStripe.js +1 -1
  225. package/lib/module/plugin/withStripe.js.map +1 -1
  226. package/lib/module/specs/NativeAddToWalletButton.js +1 -1
  227. package/lib/module/specs/NativeAddToWalletButton.js.map +1 -1
  228. package/lib/module/specs/NativeAddressSheet.js +1 -1
  229. package/lib/module/specs/NativeAddressSheet.js.map +1 -1
  230. package/lib/module/specs/NativeApplePayButton.js +1 -1
  231. package/lib/module/specs/NativeApplePayButton.js.map +1 -1
  232. package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
  233. package/lib/module/specs/NativeAuBECSDebitForm.js.map +1 -1
  234. package/lib/module/specs/NativeCardField.js +1 -1
  235. package/lib/module/specs/NativeCardField.js.map +1 -1
  236. package/lib/module/specs/NativeCardForm.js +1 -1
  237. package/lib/module/specs/NativeCardForm.js.map +1 -1
  238. package/lib/module/specs/NativeConnectAccountOnboardingView.js +2 -0
  239. package/lib/module/specs/NativeConnectAccountOnboardingView.js.map +1 -0
  240. package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
  241. package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
  242. package/lib/module/specs/NativeGooglePayButton.js +1 -1
  243. package/lib/module/specs/NativeGooglePayButton.js.map +1 -1
  244. package/lib/module/specs/NativeNavigationBar.js +2 -0
  245. package/lib/module/specs/NativeNavigationBar.js.map +1 -0
  246. package/lib/module/specs/NativeOnrampSdkModule.js +2 -0
  247. package/lib/module/specs/NativeOnrampSdkModule.js.map +1 -0
  248. package/lib/module/specs/NativeStripeContainer.js +1 -1
  249. package/lib/module/specs/NativeStripeContainer.js.map +1 -1
  250. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
  251. package/lib/module/types/EmbeddedPaymentElement.js +1 -1
  252. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
  253. package/lib/module/types/Errors.js +1 -1
  254. package/lib/module/types/Errors.js.map +1 -1
  255. package/lib/module/types/Onramp.js +2 -0
  256. package/lib/module/types/Onramp.js.map +1 -0
  257. package/lib/module/types/PaymentSheet.js.map +1 -1
  258. package/lib/module/types/index.js +1 -1
  259. package/lib/module/types/index.js.map +1 -1
  260. package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -1
  261. package/lib/typescript/src/connect/Components.d.ts +23 -0
  262. package/lib/typescript/src/connect/Components.d.ts.map +1 -0
  263. package/lib/typescript/src/connect/ConnectComponentsProvider.d.ts +22 -0
  264. package/lib/typescript/src/connect/ConnectComponentsProvider.d.ts.map +1 -0
  265. package/lib/typescript/src/connect/EmbeddedComponent.d.ts +18 -0
  266. package/lib/typescript/src/connect/EmbeddedComponent.d.ts.map +1 -0
  267. package/lib/typescript/src/connect/ModalCloseButton.d.ts +7 -0
  268. package/lib/typescript/src/connect/ModalCloseButton.d.ts.map +1 -0
  269. package/lib/typescript/src/connect/NavigationBar.d.ts +8 -0
  270. package/lib/typescript/src/connect/NavigationBar.d.ts.map +1 -0
  271. package/lib/typescript/src/connect/connectTypes.d.ts +464 -0
  272. package/lib/typescript/src/connect/connectTypes.d.ts.map +1 -0
  273. package/lib/typescript/src/events.d.ts +4 -0
  274. package/lib/typescript/src/events.d.ts.map +1 -1
  275. package/lib/typescript/src/functions.d.ts.map +1 -1
  276. package/lib/typescript/src/helpers.d.ts.map +1 -1
  277. package/lib/typescript/src/hooks/useOnramp.d.ts +158 -0
  278. package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -0
  279. package/lib/typescript/src/index.d.ts +4 -0
  280. package/lib/typescript/src/index.d.ts.map +1 -1
  281. package/lib/typescript/src/plugin/withStripe.d.ts +15 -0
  282. package/lib/typescript/src/plugin/withStripe.d.ts.map +1 -1
  283. package/lib/typescript/src/specs/NativeConnectAccountOnboardingView.d.ts +14 -0
  284. package/lib/typescript/src/specs/NativeConnectAccountOnboardingView.d.ts.map +1 -0
  285. package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts +1 -0
  286. package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts.map +1 -1
  287. package/lib/typescript/src/specs/NativeNavigationBar.d.ts +11 -0
  288. package/lib/typescript/src/specs/NativeNavigationBar.d.ts.map +1 -0
  289. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +28 -0
  290. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -0
  291. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +3 -0
  292. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
  293. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -1
  294. package/lib/typescript/src/types/Errors.d.ts +5 -0
  295. package/lib/typescript/src/types/Errors.d.ts.map +1 -1
  296. package/lib/typescript/src/types/Onramp.d.ts +275 -0
  297. package/lib/typescript/src/types/Onramp.d.ts.map +1 -0
  298. package/lib/typescript/src/types/PaymentSheet.d.ts +7 -0
  299. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
  300. package/lib/typescript/src/types/index.d.ts +7 -1
  301. package/lib/typescript/src/types/index.d.ts.map +1 -1
  302. package/package.json +25 -14
  303. package/src/components/StripeProvider.tsx +5 -0
  304. package/src/connect/Components.tsx +279 -0
  305. package/src/connect/ConnectComponentsProvider.tsx +93 -0
  306. package/src/connect/EmbeddedComponent.tsx +407 -0
  307. package/src/connect/ModalCloseButton.tsx +44 -0
  308. package/src/connect/NavigationBar.tsx +29 -0
  309. package/src/connect/connectTypes.ts +626 -0
  310. package/src/events.ts +23 -0
  311. package/src/hooks/useOnramp.tsx +334 -0
  312. package/src/index.tsx +13 -0
  313. package/src/plugin/withStripe.ts +104 -7
  314. package/src/specs/NativeConnectAccountOnboardingView.ts +19 -0
  315. package/src/specs/NativeEmbeddedPaymentElement.ts +5 -1
  316. package/src/specs/NativeNavigationBar.ts +16 -0
  317. package/src/specs/NativeOnrampSdkModule.ts +47 -0
  318. package/src/specs/NativeStripeSdkModule.ts +5 -0
  319. package/src/types/EmbeddedPaymentElement.tsx +24 -3
  320. package/src/types/Errors.ts +6 -0
  321. package/src/types/Onramp.ts +317 -0
  322. package/src/types/PaymentSheet.ts +7 -0
  323. package/src/types/index.ts +8 -0
  324. package/stripe-react-native.podspec +20 -7
@@ -23,4 +23,76 @@ extension UIColor {
23
23
  }
24
24
  self.init(red: CGFloat(r) / 255, green: CGFloat(g) / 255, blue: CGFloat(b) / 255, alpha: CGFloat(a) / 255)
25
25
  }
26
+
27
+ // Parse color strings including hex (#RRGGBB, #RGB, #AARRGGBB), rgb(), rgba(), hsl(), and hsla()
28
+ public convenience init(colorString: String) {
29
+ let trimmed = colorString.trimmingCharacters(in: .whitespaces).lowercased()
30
+
31
+ // Check for hex color
32
+ if trimmed.hasPrefix("#") {
33
+ self.init(hexString: trimmed)
34
+ return
35
+ }
36
+
37
+ // Check for rgb/rgba
38
+ if trimmed.hasPrefix("rgb") {
39
+ if let color = UIColor.parseRGBString(trimmed) {
40
+ self.init(cgColor: color.cgColor)
41
+ return
42
+ }
43
+ }
44
+
45
+ // Check for hsl/hsla
46
+ if trimmed.hasPrefix("hsl") {
47
+ if let color = UIColor.parseHSLString(trimmed) {
48
+ self.init(cgColor: color.cgColor)
49
+ return
50
+ }
51
+ }
52
+
53
+ // Fallback to black
54
+ self.init(red: 0, green: 0, blue: 0, alpha: 1)
55
+ }
56
+
57
+ private static func parseRGBString(_ string: String) -> UIColor? {
58
+ // Parse rgb(r, g, b) or rgba(r, g, b, a)
59
+ let pattern = "rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)"
60
+ guard let regex = try? NSRegularExpression(pattern: pattern),
61
+ let match = regex.firstMatch(in: string, range: NSRange(string.startIndex..., in: string)) else {
62
+ return nil
63
+ }
64
+
65
+ let nsString = string as NSString
66
+ let r = CGFloat((nsString.substring(with: match.range(at: 1)) as NSString).floatValue) / 255.0
67
+ let g = CGFloat((nsString.substring(with: match.range(at: 2)) as NSString).floatValue) / 255.0
68
+ let b = CGFloat((nsString.substring(with: match.range(at: 3)) as NSString).floatValue) / 255.0
69
+
70
+ var a: CGFloat = 1.0
71
+ if match.range(at: 4).location != NSNotFound {
72
+ a = CGFloat((nsString.substring(with: match.range(at: 4)) as NSString).floatValue)
73
+ }
74
+
75
+ return UIColor(red: r, green: g, blue: b, alpha: a)
76
+ }
77
+
78
+ private static func parseHSLString(_ string: String) -> UIColor? {
79
+ // Parse hsl(h, s%, l%) or hsla(h, s%, l%, a)
80
+ let pattern = "hsla?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)"
81
+ guard let regex = try? NSRegularExpression(pattern: pattern),
82
+ let match = regex.firstMatch(in: string, range: NSRange(string.startIndex..., in: string)) else {
83
+ return nil
84
+ }
85
+
86
+ let nsString = string as NSString
87
+ let h = CGFloat((nsString.substring(with: match.range(at: 1)) as NSString).floatValue) / 360.0
88
+ let s = CGFloat((nsString.substring(with: match.range(at: 2)) as NSString).floatValue) / 100.0
89
+ let l = CGFloat((nsString.substring(with: match.range(at: 3)) as NSString).floatValue) / 100.0
90
+
91
+ var a: CGFloat = 1.0
92
+ if match.range(at: 4).location != NSNotFound {
93
+ a = CGFloat((nsString.substring(with: match.range(at: 4)) as NSString).floatValue)
94
+ }
95
+
96
+ return UIColor(hue: h, saturation: s, brightness: l, alpha: a)
97
+ }
26
98
  }
@@ -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 _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/porter/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);}}));}
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/tianzhao/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","_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,qFAAAC,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
+ {"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,uFAAAC,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 _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/porter/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);}}));}
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/tianzhao/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","_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,gFAAAC,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
+ {"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,kFAAAC,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 _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/porter/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));}
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/tianzhao/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","_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,mFAAAC,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
+ {"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,qFAAAC,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 _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/porter/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));});
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/tianzhao/stripe/stripe-react-native/src/components/CardField.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}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","_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,kFAAAC,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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equireWildcard","require","_helpers","_NativeCardField","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","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,oFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,K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(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/porter/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));});
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/tianzhao/stripe/stripe-react-native/src/components/CardForm.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}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","_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,iFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBA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,cAATA,SAAS,CAAE4C,WAAW,CACnCC,WAAW,CAAE7C,SAAS,cAATA,SAAS,CAAE6C,WAAW,CACnCC,YAAY,CAAE9C,SAAS,cAATA,SAAS,CAAE8C,YAAY,CACrCC,WAAW,CAAE/C,SAAS,cAATA,SAAS,CAAE+C,WAAW,CACnCC,QAAQ,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,QAAQ,CAC7BC,gBAAgB,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,gBAAgB,CAC7CC,SAAS,CAAElD,SAAS,cAATA,SAAS,CAAEkD,SAAS,CAC/BC,cAAc,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,cAAc,CACzCC,UAAU,CAAEpD,SAAS,cAATA,SAAS,CAAEoD,UACzB,CAAE,CACFnD,YAAY,CAAE,CACZsB,MAAM,CAAEtB,YAAY,cAAZA,YAAY,CAAEsB,MAAM,CAC5B8B,UAAU,CAAEpD,YAAY,cAAZA,YAAY,CAAEoD,UAAU,CACpC7B,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,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
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_NativeCardForm","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","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,mFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA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D,YAAY,cAAZA,YAAY,CAAEoD,UAAU,CACpC7B,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,CACFpB,aAAa,CAAAX,MAAA,CAAAmD,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.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/porter/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;var callbackProps={onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback,onOrderTrackingAction:orderTrackingCallback,hasShippingMethodCallback:!!onShippingMethodSelected,hasShippingContactCallback:!!onShippingContactSelected,hasCouponCodeCallback:!!onCouponCodeEntered,hasOrderTrackingCallback:!!setOrderTracking};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,buttonBorderRadius:borderRadius,disabled:disabled!=null?disabled:false,style:styles.nativeButtonStyle},callbackProps,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}});
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/tianzhao/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;var callbackProps={onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback,onOrderTrackingAction:orderTrackingCallback,hasShippingMethodCallback:!!onShippingMethodSelected,hasShippingContactCallback:!!onShippingContactSelected,hasCouponCodeCallback:!!onCouponCodeEntered,hasOrderTrackingCallback:!!setOrderTracking};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,buttonBorderRadius:borderRadius,disabled:disabled!=null?disabled:false,style:styles.nativeButtonStyle},callbackProps,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","_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","callbackProps","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","hasShippingMethodCallback","hasShippingContactCallback","hasCouponCodeCallback","hasOrderTrackingCallback","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","buttonBorderRadius","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sourceRoot":"../../../src","sources":["components/PlatformPayButton.tsx"],"mappings":"wSAAA,IAAAA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,CAAI,KAAM,CAC5BM,KAAK,CAAEyB,MAAM,CAACS,iBAAkB,EAC5BrB,aAAa,CACbZ,KAAK,CACV,CAAC,CAEF,GAAArB,WAAA,CAAA0C,GAAA,EAAC3C,sBAAA,CAAAwB,OAAqB,CAAA2B,MAAA,CAAAC,MAAA,EACpB7C,IAAI,CAAEA,IAAK,CACXI,UAAU,CAAEA,UAAW,CACvBK,YAAY,CAAEA,YAAa,CAC3BK,KAAK,CAAEyB,MAAM,CAACS,iBAAkB,EAC5BjC,KAAK,CACV,CACF,CACe,CAAC,CAEvB,CAEA,GAAM,CAAAwB,MAAM,CAAGU,uBAAU,CAACC,MAAM,CAAC,CAC/B1C,QAAQ,CAAE,CACR2C,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDZ,WAAW,CAAE,CACXW,IAAI,CAAE,CACR,CAAC,CACDH,iBAAiB,CAAE,CAAEG,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","callbackProps","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","hasShippingMethodCallback","hasShippingContactCallback","hasCouponCodeCallback","hasOrderTrackingCallback","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","buttonBorderRadius","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sourceRoot":"../../../src","sources":["components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ACjCD,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BM,KAAK,CAAEyB,MAAM,CAACS,iBAAkB,EAC5BrB,aAAa,CACbZ,KAAK,CACV,CAAC,CAEF,GAAArB,WAAA,CAAA0C,GAAA,EAAC3C,sBAAA,CAAAwB,OAAqB,CAAA2B,MAAA,CAAAC,MAAA,EACpB7C,IAAI,CAAEA,IAAK,CACXI,UAAU,CAAEA,UAAW,CACvBK,YAAY,CAAEA,YAAa,CAC3BK,KAAK,CAAEyB,MAAM,CAACS,iBAAkB,EAC5BjC,KAAK,CACV,CACF,CACe,CAAC,CAEvB,CAEA,GAAM,CAAAwB,MAAM,CAAGU,uBAAU,CAACC,MAAM,CAAC,CAC/B1C,QAAQ,CAAE,CACR2C,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDZ,WAAW,CAAE,CACXW,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 _NativeStripeContainer=_interopRequireDefault(require("../specs/NativeStripeContainer"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/porter/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}});
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/tianzhao/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","_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,+EAkB5D,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
+ {"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,iFAkB5D,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 _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 didRegisterHeadlessTask=false;var initStripe=exports.initStripe=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS==='android'&&!didRegisterHeadlessTask){var stripeHeadlessTask=function stripeHeadlessTask(){return new Promise(function(){});};_reactNative.AppRegistry.registerHeadlessTask('StripeKeepJsAwakeTask',function(){return stripeHeadlessTask;});didRegisterHeadlessTask=true;}var extendedParams=Object.assign({},params,{appInfo:appInfo});yield _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;}var initializeStripe=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){if(_helpers.isAndroid){yield initStripe({publishableKey:publishableKey,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{yield initStripe({publishableKey:publishableKey,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}});return function initializeStripe(){return _ref3.apply(this,arguments);};}();initializeStripe();},[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 _NativeOnrampSdkModule=_interopRequireDefault(require("../specs/NativeOnrampSdkModule"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../../package.json"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}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 didRegisterHeadlessTask=false;var initStripe=exports.initStripe=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS==='android'&&!didRegisterHeadlessTask){var stripeHeadlessTask=function stripeHeadlessTask(){return new Promise(function(){});};_reactNative.AppRegistry.registerHeadlessTask('StripeKeepJsAwakeTask',function(){return stripeHeadlessTask;});didRegisterHeadlessTask=true;}var extendedParams=Object.assign({},params,{appInfo:appInfo});yield _NativeStripeSdkModule.default.initialise(extendedParams);if(_reactNative.Platform.OS==='android'){yield _NativeOnrampSdkModule.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;}var initializeStripe=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){if(_helpers.isAndroid){yield initStripe({publishableKey:publishableKey,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{yield initStripe({publishableKey:publishableKey,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}});return function initializeStripe(){return _ref3.apply(this,arguments);};}();initializeStripe();},[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","_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","didRegisterHeadlessTask","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","initializeStripe","_ref3","isAndroid","jsx","Fragment"],"sourceRoot":"../../../src","sources":["components/StripeProvider.tsx"],"mappings":"8SAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAC,sBAAA,CAAAF,OAAA,oCACA,IAAAG,QAAA,CAAAH,OAAA,eAEA,IAAAI,QAAA,CAAAF,sBAAA,CAAAF,OAAA,2BACA,IAAAK,YAAA,CAAAL,OAAA,iBAAqD,IAAAM,WAAA,CAAAN,OAAA,+BAAAO,yBAAAC,CAAA,wBAAA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C,SAAS,CAAAN,KAAA,CAATM,SAAS,CACTC,2BAA2B,CAAAP,KAAA,CAA3BO,2BAA2B,CAE3B,GAAAC,gBAAS,EAAC,UAAM,CACd,GAAI,CAACN,cAAc,CAAE,CACnB,OACF,CACA,GAAM,CAAAO,gBAAgB,gBAAAC,KAAA,IAAA1B,kBAAA,CAAA5B,OAAA,EAAG,WAAY,CACnC,GAAIuD,kBAAS,CAAE,CACb,KAAM,CAAA9B,UAAU,CAAC,CACfqB,cAAc,CAAdA,cAAc,CACdG,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBE,SAAS,CAATA,SAAS,CACTC,2BAA2B,CAA3BA,2BACF,CAAC,CAAC,CACJ,CAAC,IAAM,CACL,KAAM,CAAA1B,UAAU,CAAC,CACfqB,cAAc,CAAdA,cAAc,CACdG,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBD,kBAAkB,CAAlBA,kBAAkB,CAClBG,SAAS,CAATA,SACF,CAAC,CAAC,CACJ,CACF,CAAC,iBAlBK,CAAAG,gBAAgBA,CAAA,SAAAC,KAAA,CAAAb,KAAA,MAAAC,SAAA,OAkBrB,CAEDW,gBAAgB,CAAC,CAAC,CACpB,CAAC,CAAE,CACDP,cAAc,CACdC,kBAAkB,CAClBE,eAAe,CACfD,kBAAkB,CAClBE,SAAS,CACTC,2BAA2B,CAC5B,CAAC,CAEF,MAAO,GAAA1D,WAAA,CAAA+D,GAAA,EAAA/D,WAAA,CAAAgE,QAAA,EAAAZ,QAAA,CAAGA,QAAQ,CAAG,CAAC,CACxB","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_NativeStripeSdkModule","_interopRequireDefault","_NativeOnrampSdkModule","_helpers","_package","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EXPO_PARTNER_ID","repository","pjson","appInfo","name","shouldAttributeExpo","url","version","partnerId","undefined","didRegisterHeadlessTask","initStripe","exports","_ref","_asyncToGenerator2","params","Platform","OS","stripeHeadlessTask","Promise","AppRegistry","registerHeadlessTask","extendedParams","assign","NativeStripeSdk","initialise","NativeOnrampSdk","_x","apply","arguments","StripeProvider","_ref2","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","useEffect","initializeStripe","_ref3","isAndroid","jsx","Fragment"],"sourceRoot":"../../../src","sources":["components/StripeProvider.tsx"],"mappings":"8SAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAC,sBAAA,CAAAF,OAAA,oCACA,IAAAG,sBAAA,CAAAD,sBAAA,CAAAF,OAAA,oCACA,IAAAI,QAAA,CAAAJ,OAAA,eAEA,IAAAK,QAAA,CAAAH,sBAAA,CAAAF,OAAA,2BACA,IAAAM,YAAA,CAAAN,OAAA,iBAAqD,IAAAO,WAAA,CAAAP,OAAA,+BAAAD,wBAAAS,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAX,uBAAA,UAAAA,wBAAAS,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAA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AAlBA,kBAAkB,CAClBD,kBAAkB,CAAlBA,kBAAkB,CAClBG,SAAS,CAATA,SACF,CAAC,CAAC,CACJ,CACF,CAAC,iBAlBK,CAAAG,gBAAgBA,CAAA,SAAAC,KAAA,CAAAb,KAAA,MAAAC,SAAA,OAkBrB,CAEDW,gBAAgB,CAAC,CAAC,CACpB,CAAC,CAAE,CACDP,cAAc,CACdC,kBAAkB,CAClBE,eAAe,CACfD,kBAAkB,CAClBE,SAAS,CACTC,2BAA2B,CAC5B,CAAC,CAEF,MAAO,GAAA3D,WAAA,CAAAgE,GAAA,EAAAhE,WAAA,CAAAiE,QAAA,EAAAZ,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.ConnectAccountOnboarding=ConnectAccountOnboarding;exports.ConnectPaymentDetails=ConnectPaymentDetails;exports.ConnectPayments=ConnectPayments;exports.ConnectPayouts=ConnectPayouts;Object.defineProperty(exports,"NavigationBar",{enumerable:true,get:function get(){return _NavigationBar.NavigationBar;}});var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _EmbeddedComponent=require("./EmbeddedComponent");var _NavigationBar=require("./NavigationBar");var _NativeConnectAccountOnboardingView=_interopRequireDefault(require("../specs/NativeConnectAccountOnboardingView"));var _ConnectComponentsProvider=require("./ConnectComponentsProvider");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/tianzhao/stripe/stripe-react-native/src/connect/Components.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function ConnectAccountOnboarding(_ref){var title=_ref.title,onExit=_ref.onExit,onStepChange=_ref.onStepChange,recipientTermsOfServiceUrl=_ref.recipientTermsOfServiceUrl,fullTermsOfServiceUrl=_ref.fullTermsOfServiceUrl,privacyPolicyUrl=_ref.privacyPolicyUrl,collectionOptions=_ref.collectionOptions,onLoaderStart=_ref.onLoaderStart,onLoadError=_ref.onLoadError,onPageDidLoad=_ref.onPageDidLoad;var _useState=(0,_react.useState)(true),_useState2=(0,_slicedToArray2.default)(_useState,2),visible=_useState2[0],setVisible=_useState2[1];var _useState3=(0,_react.useState)(true),_useState4=(0,_slicedToArray2.default)(_useState3,2),loading=_useState4[0],setLoading=_useState4[1];var _useConnectComponents=(0,_ConnectComponentsProvider.useConnectComponents)(),appearance=_useConnectComponents.appearance;var backgroundColor=(0,_react.useMemo)(function(){var _appearance$variables;return(appearance==null||(_appearance$variables=appearance.variables)==null?void 0:_appearance$variables.colorBackground)||'#FFFFFF';},[appearance]);var textColor=(0,_react.useMemo)(function(){var _appearance$variables2;return(appearance==null||(_appearance$variables2=appearance.variables)==null?void 0:_appearance$variables2.colorText)||'#000000';},[appearance]);var loadingIndicatorColor=(0,_react.useMemo)(function(){var _appearance$variables3;return(appearance==null||(_appearance$variables3=appearance.variables)==null?void 0:_appearance$variables3.colorSecondaryText)||'#888888';},[appearance]);var componentProps=(0,_react.useMemo)(function(){return{setFullTermsOfServiceUrl:fullTermsOfServiceUrl,setRecipientTermsOfServiceUrl:recipientTermsOfServiceUrl,setPrivacyPolicyUrl:privacyPolicyUrl,setCollectionOptions:collectionOptions};},[fullTermsOfServiceUrl,recipientTermsOfServiceUrl,privacyPolicyUrl,collectionOptions]);var onExitCallback=(0,_react.useCallback)(function(){setVisible(false);setTimeout(onExit);},[onExit]);var callbacks=(0,_react.useMemo)(function(){return{onExit:onExitCallback,onStepChange:onStepChange,onCloseWebView:onExitCallback};},[onExitCallback,onStepChange]);var onLoaderStartCallback=(0,_react.useCallback)(function(event){setLoading(false);if(onLoaderStart){onLoaderStart(event);}},[onLoaderStart]);var _useWindowDimensions=(0,_reactNative.useWindowDimensions)(),width=_useWindowDimensions.width,height=_useWindowDimensions.height;var containerStyle=(0,_react.useMemo)(function(){return{width:width,height:height};},[width,height]);if(_reactNative.Platform.OS==='ios'){return(0,_jsxRuntime.jsxs)(_NativeConnectAccountOnboardingView.default,{visible:visible,title:title,backgroundColor:backgroundColor,textColor:textColor,onExitAction:onExitCallback,style:containerStyle,children:[loading?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"large",color:loadingIndicatorColor,style:styles.iosActivityIndicator}):null,(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"account-onboarding",componentProps:componentProps,onLoaderStart:onLoaderStartCallback,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,callbacks:callbacks,style:styles.flex1})]});}return(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:visible,animationType:"slide",presentationStyle:"fullScreen",children:(0,_jsxRuntime.jsxs)(_reactNative.SafeAreaView,{style:styles.flex1,children:[(0,_jsxRuntime.jsx)(_NavigationBar.NavigationBar,{title:title,onCloseButtonPress:onExitCallback,style:styles.navBar}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.onboardingWrapper,children:[loading?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"large",color:loadingIndicatorColor,style:styles.activityIndicator}):null,(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"account-onboarding",componentProps:componentProps,onLoaderStart:onLoaderStartCallback,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,callbacks:callbacks,style:[styles.flex1,{backgroundColor:backgroundColor}]})]})]})});}function ConnectPayments(_ref2){var defaultFilters=_ref2.defaultFilters,onLoaderStart=_ref2.onLoaderStart,onLoadError=_ref2.onLoadError,onPageDidLoad=_ref2.onPageDidLoad,style=_ref2.style;var componentProps=(0,_react.useMemo)(function(){return{setDefaultFilters:defaultFilters};},[defaultFilters]);return(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"payments",onLoaderStart:onLoaderStart,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,componentProps:componentProps,style:style});}function ConnectPayouts(_ref3){var onLoaderStart=_ref3.onLoaderStart,onLoadError=_ref3.onLoadError,onPageDidLoad=_ref3.onPageDidLoad,style=_ref3.style;return(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"payouts",onLoaderStart:onLoaderStart,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,style:style});}function ConnectPaymentDetails(_ref4){var payment=_ref4.payment,onClose=_ref4.onClose,onLoaderStart=_ref4.onLoaderStart,onLoadError=_ref4.onLoadError,onPageDidLoad=_ref4.onPageDidLoad,style=_ref4.style;var componentProps=(0,_react.useMemo)(function(){return{setPayment:payment};},[payment]);var callbacks=(0,_react.useMemo)(function(){return{onClose:onClose};},[onClose]);return(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"payment-details",componentProps:componentProps,callbacks:callbacks,onLoaderStart:onLoaderStart,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,style:style});}var styles=_reactNative.StyleSheet.create({navBar:{height:56},flex1:{flex:1},activityIndicator:{zIndex:1,position:'absolute',left:0,right:0,top:48},iosActivityIndicator:{zIndex:1,position:'absolute',left:0,right:0,top:160},onboardingWrapper:{position:'relative',flex:1}});
2
+ //# sourceMappingURL=Components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_EmbeddedComponent","_NavigationBar","_NativeConnectAccountOnboardingView","_interopRequireDefault","_ConnectComponentsProvider","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConnectAccountOnboarding","_ref","title","onExit","onStepChange","recipientTermsOfServiceUrl","fullTermsOfServiceUrl","privacyPolicyUrl","collectionOptions","onLoaderStart","onLoadError","onPageDidLoad","_useState","useState","_useState2","_slicedToArray2","visible","setVisible","_useState3","_useState4","loading","setLoading","_useConnectComponents","useConnectComponents","appearance","backgroundColor","useMemo","_appearance$variables","variables","colorBackground","textColor","_appearance$variables2","colorText","loadingIndicatorColor","_appearance$variables3","colorSecondaryText","componentProps","setFullTermsOfServiceUrl","setRecipientTermsOfServiceUrl","setPrivacyPolicyUrl","setCollectionOptions","onExitCallback","useCallback","setTimeout","callbacks","onCloseWebView","onLoaderStartCallback","event","_useWindowDimensions","useWindowDimensions","width","height","containerStyle","Platform","OS","jsxs","onExitAction","style","children","jsx","ActivityIndicator","size","color","styles","iosActivityIndicator","EmbeddedComponent","component","flex1","Modal","animationType","presentationStyle","SafeAreaView","NavigationBar","onCloseButtonPress","navBar","View","onboardingWrapper","activityIndicator","ConnectPayments","_ref2","defaultFilters","setDefaultFilters","ConnectPayouts","_ref3","ConnectPaymentDetails","_ref4","payment","onClose","setPayment","StyleSheet","create","flex","zIndex","position","left","right","top"],"sourceRoot":"../../../src","sources":["connect/Components.tsx"],"mappings":"8hBAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAeA,IAAAE,kBAAA,CAAAF,OAAA,wBACA,IAAAG,cAAA,CAAAH,OAAA,oBACA,IAAAI,mCAAA,CAAAC,sBAAA,CAAAL,OAAA,iDACA,IAAAM,0BAAA,CAAAN,OAAA,gCAAmE,IAAAO,WAAA,CAAAP,OAAA,0BAAAQ,YAAA,kFAAAT,wBAAAU,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KA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EA,cAAe,CAC/BQ,SAAS,CAAEA,SAAU,CACrBnC,aAAa,CAAEA,aAAc,CAC7BC,WAAW,CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7B8C,KAAK,CAAEA,KAAM,CACd,CAAC,CAEN,CAEA,GAAM,CAAAM,MAAM,CAAG0B,uBAAU,CAACC,MAAM,CAAC,CAC/BhB,MAAM,CAAE,CACNvB,MAAM,CAAE,EACV,CAAC,CACDgB,KAAK,CAAE,CACLwB,IAAI,CAAE,CACR,CAAC,CACDd,iBAAiB,CAAE,CACjBe,MAAM,CAAE,CAAC,CACTC,QAAQ,CAAE,UAAU,CACpBC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,GAAG,CAAE,EACP,CAAC,CACDhC,oBAAoB,CAAE,CACpB4B,MAAM,CAAE,CAAC,CACTC,QAAQ,CAAE,UAAU,CACpBC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,GAAG,CAAE,GACP,CAAC,CACDpB,iBAAiB,CAAE,CACjBiB,QAAQ,CAAE,UAAU,CACpBF,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useConnectComponents=exports.loadConnectAndInitialize=exports.ConnectComponentsProvider=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _react=_interopRequireWildcard(require("react"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tianzhao/stripe/stripe-react-native/src/connect/ConnectComponentsProvider.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var ConnectInstance=function(){function ConnectInstance(initParams){(0,_classCallCheck2.default)(this,ConnectInstance);this.initParams=initParams;}return(0,_createClass2.default)(ConnectInstance,[{key:"update",value:function update(options){var _this$onUpdate;(_this$onUpdate=this.onUpdate)==null||_this$onUpdate.call(this,options);}}]);}();var loadConnectAndInitialize=exports.loadConnectAndInitialize=function loadConnectAndInitialize(initParams){return new ConnectInstance(initParams);};var ConnectComponentsContext=_react.default.createContext(null);ConnectComponentsContext.displayName='ConnectComponents';var ConnectComponentsProvider=exports.ConnectComponentsProvider=function ConnectComponentsProvider(_ref){var children=_ref.children,connectInstance=_ref.connectInstance;if(!(connectInstance instanceof ConnectInstance)){throw new Error('connectInstance must be an instance of ConnectInstance created via loadConnectAndInitialize');}var _useState=(0,_react.useState)(connectInstance.initParams.appearance),_useState2=(0,_slicedToArray2.default)(_useState,2),appearance=_useState2[0],setAppearance=_useState2[1];var _useState3=(0,_react.useState)(connectInstance.initParams.locale),_useState4=(0,_slicedToArray2.default)(_useState3,2),locale=_useState4[0],setLocale=_useState4[1];if(!connectInstance.onUpdate){connectInstance.onUpdate=function(options){if(options.appearance){setAppearance(options.appearance);}if(options.locale){setLocale(options.locale);}};}var value=(0,_react.useMemo)(function(){return{connectInstance:connectInstance,locale:locale,appearance:appearance};},[connectInstance,locale,appearance]);return(0,_jsxRuntime.jsx)(ConnectComponentsContext.Provider,{value:value,children:children});};var useConnectComponents=exports.useConnectComponents=function useConnectComponents(){var context=_react.default.useContext(ConnectComponentsContext);if(!context){throw new Error(`Could not find a ConnectComponentsContext; You need to wrap your components in an <ConnectComponentsProvider> provider.`);}return context;};
2
+ //# sourceMappingURL=ConnectComponentsProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConnectInstance","initParams","_classCallCheck2","_createClass2","key","value","update","options","_this$onUpdate","onUpdate","loadConnectAndInitialize","exports","ConnectComponentsContext","React","createContext","displayName","ConnectComponentsProvider","_ref","children","connectInstance","Error","_useState","useState","appearance","_useState2","_slicedToArray2","setAppearance","_useState3","locale","_useState4","setLocale","useMemo","jsx","Provider","useConnectComponents","context","useContext"],"sourceRoot":"../../../src","sources":["connect/ConnectComponentsProvider.tsx"],"mappings":"qgBAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAAsD,IAAAC,WAAA,CAAAD,OAAA,0BAAAE,KAAA,MAAAC,YAAA,iGAAAJ,wBAAAK,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAP,uBAAA,UAAAA,wBAAAK,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA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CAClE,GAAM,CAAAC,OAAO,CAAGtB,cAAK,CAACuB,UAAU,CAACxB,wBAAwB,CAAC,CAC1D,GAAI,CAACuB,OAAO,CAAE,CACZ,KAAM,IAAI,CAAAf,KAAK,CACb,yHACF,CAAC,CACH,CACA,MAAO,CAAAe,OAAO,CAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.EmbeddedComponent=EmbeddedComponent;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _package=_interopRequireDefault(require("../../../package.json"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _ConnectComponentsProvider=require("./ConnectComponentsProvider");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/tianzhao/stripe/stripe-react-native/src/connect/EmbeddedComponent.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var DEVELOPMENT_MODE=false;var DEVELOPMENT_URL=_reactNative.Platform.OS==='android'?'http://10.0.2.2:3001':'http://localhost:3001';var PRODUCTION_URL='https://connect-js.stripe.com';var BASE_URL=DEVELOPMENT_MODE?DEVELOPMENT_URL:PRODUCTION_URL;var sdkVersion=_package.default.version;if(!/^\d+\.\d+\.\d+$/.test(sdkVersion)){throw new Error(`Invalid SDK version: ${sdkVersion}. Must be in format X.Y.Z`);}var userAgent=['Mobile',`Stripe ReactNative SDK ${_reactNative.Platform.OS}/${_reactNative.Platform.Version}`,`stripe-react_native/${sdkVersion}`].join(' - ');function EmbeddedComponent(props){var _appearance$variables;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),dynamicWebview=_useState2[0],setDynamicWebview=_useState2[1];var pendingAuthWebViewPromise=(0,_react.useRef)(null);var loadWebViewComponent=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){if(dynamicWebview)return;setDynamicWebview({WebView:null});try{var mod=yield import('react-native-webview');setDynamicWebview({WebView:mod.WebView});}catch(err){console.error('Failed to import react-native-webview:',err);}}),[dynamicWebview]);(0,_react.useEffect)(function(){loadWebViewComponent();},[loadWebViewComponent]);var appState=(0,_react.useRef)(_reactNative.AppState.currentState);(0,_react.useEffect)(function(){var subscription=_reactNative.AppState.addEventListener('change',function(nextAppState){if(appState.current.match(/inactive|background/)&&nextAppState==='active'){if(pendingAuthWebViewPromise.current){var _pendingAuthWebViewPr=pendingAuthWebViewPromise.current,id=_pendingAuthWebViewPr.id,callback=_pendingAuthWebViewPr.callback;pendingAuthWebViewPromise.current=null;callback(id,null);}}appState.current=nextAppState;});return function(){pendingAuthWebViewPromise.current=null;subscription.remove();};},[]);var _ref2=(0,_ConnectComponentsProvider.useConnectComponents)(),connectInstance=_ref2.connectInstance,appearance=_ref2.appearance,locale=_ref2.locale,overrides=_ref2.overrides;var _connectInstance$init=connectInstance.initParams,fonts=_connectInstance$init.fonts,publishableKey=_connectInstance$init.publishableKey,fetchClientSecret=_connectInstance$init.fetchClientSecret;var component=props.component,componentProps=props.componentProps,onLoadError=props.onLoadError,onLoaderStart=props.onLoaderStart,onPageDidLoad=props.onPageDidLoad,callbacks=props.callbacks,style=props.style;var hashParams={component:component,publicKey:publishableKey,merchantIdOverride:overrides==null?void 0:overrides.merchantId,platformIdOverride:overrides==null?void 0:overrides.platformId,apiKeyOverride:overrides==null?void 0:overrides.apiKey,livemodeOverride:overrides==null?void 0:overrides.livemode};var hash=Object.entries(hashParams).filter(function(_ref3){var _ref4=(0,_slicedToArray2.default)(_ref3,2),_=_ref4[0],value=_ref4[1];return value!=null;}).map(function(_ref5){var _ref6=(0,_slicedToArray2.default)(_ref5,2),key=_ref6[0],value=_ref6[1];return`${encodeURIComponent(key)}=${encodeURIComponent(value)}`;}).join('&');var connectURL=`${BASE_URL}/v1.0/react_native_webview.html#${hash}`;var source=(0,_react.useMemo)(function(){return{uri:connectURL};},[connectURL]);var ref=(0,_react.useRef)(null);var _useState3=(0,_react.useState)(appearance),_useState4=(0,_slicedToArray2.default)(_useState3,2),prevAppearance=_useState4[0],setPrevAppearance=_useState4[1];var _useState5=(0,_react.useState)(locale),_useState6=(0,_slicedToArray2.default)(_useState5,2),prevLocale=_useState6[0],setPrevLocale=_useState6[1];if(prevAppearance!==appearance||prevLocale!==locale){var _ref$current;setPrevAppearance(appearance);setPrevLocale(locale);var patchedAppearance=withDefaultFontFamily(appearance);(_ref$current=ref.current)==null||_ref$current.injectJavaScript(`
2
+ (function() {
3
+ window.updateConnectInstance(${JSON.stringify({appearance:patchedAppearance,locale:locale})});
4
+ true;
5
+ })();
6
+ `);}var _useState7=(0,_react.useState)(componentProps),_useState8=(0,_slicedToArray2.default)(_useState7,2),prevComponentProps=_useState8[0],setPrevComponentProps=_useState8[1];if(prevComponentProps!==componentProps){setPrevComponentProps(componentProps);Object.entries(componentProps||{}).forEach(function(_ref7){var _ref$current2;var _ref8=(0,_slicedToArray2.default)(_ref7,2),key=_ref8[0],value=_ref8[1];(_ref$current2=ref.current)==null||_ref$current2.injectJavaScript(`
7
+ (function() {
8
+ window.callSetterWithSerializableValue(${JSON.stringify({setter:key,value:value})});
9
+ true;
10
+ })();
11
+ `);});}var handleUnexpectedError=(0,_react.useCallback)(function(error){var errorMessage=error instanceof Error?error.message:String(error);console.error(`Unexpected error: ${errorMessage}`);},[]);var WebViewComponent=dynamicWebview==null?void 0:dynamicWebview.WebView;var handleAuthWebViewResult=function handleAuthWebViewResult(id,resultUrl){var _ref$current3;(_ref$current3=ref.current)==null||_ref$current3.injectJavaScript(`
12
+ (function() {
13
+ window.returnedFromAuthenticatedWebView(${JSON.stringify({id:id,url:resultUrl})});
14
+ true;
15
+ })();
16
+ `);};var onMessageCallback=(0,_react.useCallback)(function(){var _ref9=(0,_asyncToGenerator2.default)(function*(event){var message=JSON.parse(event.nativeEvent.data);if(message.type==='fetchClientSecret'){var _ref$current4;var clientSecret=yield fetchClientSecret().catch(function(error){handleUnexpectedError(error);return null;});if(!clientSecret)return;(_ref$current4=ref.current)==null||_ref$current4.injectJavaScript(`
17
+ window.clientSecretDeferred.resolve(${JSON.stringify(clientSecret)});
18
+ `);}else if(message.type==='debug'){console.debug(`[EmbeddedComponent ${component}]: ${message.data}`);}else if(message.type==='pageDidLoad'){onPageDidLoad==null||onPageDidLoad();}else if(message.type==='accountSessionClaimed'){}else if(message.type==='openFinancialConnections'){}else if(message.type==='closeWebView'){callbacks==null||callbacks.onCloseWebView==null||callbacks.onCloseWebView({});}else if(message.type==='callSupplementalFunction'){}else if(message.type==='onSetterFunctionCalled'){var _ref0=message.data,setter=_ref0.setter,value=_ref0.value;if(setter==='setOnLoaderStart'){onLoaderStart==null||onLoaderStart(value);}else if(setter==='setOnLoadError'){onLoadError==null||onLoadError(value);}else{var _callbacks$functionNa;var functionName=setter.charAt(3).toLowerCase()+setter.substring(4);callbacks==null||(_callbacks$functionNa=callbacks[functionName])==null||_callbacks$functionNa.call(callbacks,value);}}else if(message.type==='openAuthenticatedWebView'){var _ref1=message.data,url=_ref1.url,id=_ref1.id;if(!isValidUrl(url)){handleUnexpectedError(new Error(`Invalid URL for authenticated webview: ${url}`));return;}_NativeStripeSdkModule.default.openAuthenticatedWebView(id,url).then(function(result){if(_reactNative.Platform.OS==='ios'){var _result$url;handleAuthWebViewResult(id,(_result$url=result==null?void 0:result.url)!=null?_result$url:null);}else{pendingAuthWebViewPromise.current={id:id,callback:handleAuthWebViewResult};}}).catch(handleUnexpectedError);}else{}});return function(_x){return _ref9.apply(this,arguments);};}(),[callbacks,component,fetchClientSecret,handleUnexpectedError,onLoadError,onLoaderStart,onPageDidLoad]);var backgroundColor=(appearance==null||(_appearance$variables=appearance.variables)==null?void 0:_appearance$variables.colorBackground)||'#FFFFFF';var mergedStyle=(0,_react.useMemo)(function(){return[{backgroundColor:backgroundColor},style];},[backgroundColor,style]);if(!WebViewComponent)return null;return(0,_jsxRuntime.jsx)(WebViewComponent,{ref:ref,style:mergedStyle,webviewDebuggingEnabled:DEVELOPMENT_MODE,source:source,userAgent:userAgent,injectedJavaScriptObject:{initParams:{appearance:withDefaultFontFamily(appearance),locale:locale,fonts:fonts},initComponentProps:componentProps,appInfo:{applicationId:overrides==null?void 0:overrides.applicationId}},injectedJavaScriptBeforeContentLoaded:'(function() {})();',onMessage:onMessageCallback});}var DEFAULT_FONT="-apple-system, 'system-ui', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";function withDefaultFontFamily(appearance){var _appearance$variables2;if(appearance!=null&&(_appearance$variables2=appearance.variables)!=null&&_appearance$variables2.fontFamily){return appearance;}return Object.assign({},appearance,{variables:Object.assign({},appearance==null?void 0:appearance.variables,{fontFamily:DEFAULT_FONT})});}function isValidUrl(url){try{var parsedUrl=new URL(url);return parsedUrl.protocol==='http:'||parsedUrl.protocol==='https:';}catch(_unused){return false;}}
19
+ //# sourceMappingURL=EmbeddedComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_package","_interopRequireDefault","_NativeStripeSdkModule","_ConnectComponentsProvider","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEVELOPMENT_MODE","DEVELOPMENT_URL","Platform","OS","PRODUCTION_URL","BASE_URL","sdkVersion","pjson","version","test","Error","userAgent","Version","join","EmbeddedComponent","props","_appearance$variables","_useState","useState","_useState2","_slicedToArray2","dynamicWebview","setDynamicWebview","pendingAuthWebViewPromise","useRef","loadWebViewComponent","useCallback","_asyncToGenerator2","WebView","mod","err","console","error","useEffect","appState","AppState","currentState","subscription","addEventListener","nextAppState","current","match","_pendingAuthWebViewPr","id","callback","remove","_ref2","useConnectComponents","connectInstance","appearance","locale","overrides","_connectInstance$init","initParams","fonts","publishableKey","fetchClientSecret","component","componentProps","onLoadError","onLoaderStart","onPageDidLoad","callbacks","style","hashParams","publicKey","merchantIdOverride","merchantId","platformIdOverride","platformId","apiKeyOverride","apiKey","livemodeOverride","livemode","hash","entries","filter","_ref3","_ref4","_","value","map","_ref5","_ref6","key","encodeURIComponent","connectURL","source","useMemo","uri","ref","_useState3","_useState4","prevAppearance","setPrevAppearance","_useState5","_useState6","prevLocale","setPrevLocale","_ref$current","patchedAppearance","withDefaultFontFamily","injectJavaScript","JSON","stringify","_useState7","_useState8","prevComponentProps","setPrevComponentProps","forEach","_ref7","_ref$current2","_ref8","setter","handleUnexpectedError","errorMessage","message","String","WebViewComponent","handleAuthWebViewResult","resultUrl","_ref$current3","url","onMessageCallback","_ref9","event","parse","nativeEvent","data","type","_ref$current4","clientSecret","catch","debug","onCloseWebView","_ref0","_callbacks$functionNa","functionName","charAt","toLowerCase","substring","_ref1","isValidUrl","NativeStripeSdk","openAuthenticatedWebView","then","result","_result$url","_x","apply","arguments","backgroundColor","variables","colorBackground","mergedStyle","jsx","webviewDebuggingEnabled","injectedJavaScriptObject","initComponentProps","appInfo","applicationId","injectedJavaScriptBeforeContentLoaded","onMessage","DEFAULT_FONT","_appearance$variables2","fontFamily","assign","parsedUrl","URL","protocol","_unused"],"sourceRoot":"../../../src","sources":["connect/EmbeddedComponent.tsx"],"mappings":"sXAAA,IAAAA,MAA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AkB,CAAEpG,cAAc,CAClCqG,OAAO,CAAE,CAAEC,aAAa,CAAE7G,SAAS,cAATA,SAAS,CAAE6G,aAAc,CACrD,CAAE,CAEFC,qCAAqC,CAAE,oBAAqB,CAC5DC,SAAS,CAAEvC,iBAAkB,CAC9B,CAAC,CAEN,CAEA,GAAM,CAAAwC,YAAY,CAChB,wIAAwI,CAG1I,QAAS,CAAA9D,qBAAqBA,CAACpD,UAAe,CAAE,KAAAmH,sBAAA,CAC9C,GAAInH,UAAU,SAAAmH,sBAAA,CAAVnH,UAAU,CAAEuG,SAAS,SAArBY,sBAAA,CAAuBC,UAAU,CAAE,CACrC,MAAO,CAAApH,UAAU,CACnB,CACA,OAAApD,MAAA,CAAAyK,MAAA,IACKrH,UAAU,EACbuG,SAAS,CAAA3J,MAAA,CAAAyK,MAAA,IACJrH,UAAU,cAAVA,UAAU,CAAEuG,SAAS,EACxBa,UAAU,CAAEF,YAAY,EACzB,GAEL,CAGA,QAAS,CAAArB,UAAUA,CAACpB,GAAW,CAAW,CACxC,GAAI,CACF,GAAM,CAAA6C,SAAS,CAAG,GAAI,CAAAC,GAAG,CAAC9C,GAAG,CAAC,CAC9B,MAAO,CAAA6C,SAAS,CAACE,QAAQ,GAAK,OAAO,EAAIF,SAAS,CAACE,QAAQ,GAAK,QAAQ,CAC1E,CAAE,MAAAC,OAAA,CAAM,CACN,MAAO,MAAK,CACd,CACF","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalCloseButton;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/tianzhao/stripe/stripe-react-native/src/connect/ModalCloseButton.tsx";var size=36;var hitSlop={top:10,bottom:10,left:10,right:10};function ModalCloseButton(_ref){var onPress=_ref.onPress;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPress,accessibilityRole:"button",hitSlop:hitSlop,style:[styles.button,{width:size,height:size,borderRadius:size/2}],activeOpacity:0.7,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.cross,{fontSize:Math.round(size*0.6)}],children:"\xD7"})});}var styles=_reactNative.StyleSheet.create({button:{alignItems:'center',justifyContent:'center'},cross:{lineHeight:undefined,includeFontPadding:false,textAlign:'center'}});
2
+ //# sourceMappingURL=ModalCloseButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","size","hitSlop","top","bottom","left","right","ModalCloseButton","_ref","onPress","jsx","TouchableOpacity","accessibilityRole","style","styles","button","width","height","borderRadius","activeOpacity","children","Text","cross","fontSize","Math","round","StyleSheet","create","alignItems","justifyContent","lineHeight","undefined","includeFontPadding","textAlign"],"sourceRoot":"../../../src","sources":["connect/ModalCloseButton.tsx"],"mappings":"6KAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAAkE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,+EAElE,GAAM,CAAAC,IAAI,CAAG,EAAE,CACf,GAAM,CAAAC,OAAO,CAAG,CAAEC,GAAG,CAAE,EAAE,CAAEC,MAAM,CAAE,EAAE,CAAEC,IAAI,CAAE,EAAE,CAAEC,KAAK,CAAE,EAAG,CAAC,CAM7C,QAAS,CAAAC,gBAAgBA,CAAAC,IAAA,CAAqC,IAAlC,CAAAC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CAChD,MACE,GAAAV,WAAA,CAAAW,GAAA,EAACZ,YAAA,CAAAa,gBAAgB,EACfF,OAAO,CAAEA,OAAQ,CACjBG,iBAAiB,CAAC,QAAQ,CAC1BV,OAAO,CAAEA,OAAQ,CACjBW,KAAK,CAAE,CACLC,MAAM,CAACC,MAAM,CACb,CACEC,KAAK,CAAEf,IAAI,CACXgB,MAAM,CAAEhB,IAAI,CACZiB,YAAY,CAAEjB,IAAI,CAAG,CACvB,CAAC,CACD,CACFkB,aAAa,CAAE,GAAI,CAAAC,QAAA,CAEnB,GAAArB,WAAA,CAAAW,GAAA,EAACZ,YAAA,CAAAuB,IAAI,EAACR,KAAK,CAAE,CAACC,MAAM,CAACQ,KAAK,CAAE,CAAEC,QAAQ,CAAEC,IAAI,CAACC,KAAK,CAACxB,IAAI,CAAG,GAAG,CAAE,CAAC,CAAE,CAAAmB,QAAA,CAAC,MAEnE,CAAM,CAAC,CACS,CAAC,CAEvB,CAEA,GAAM,CAAAN,MAAM,CAAGY,uBAAU,CAACC,MAAM,CAAC,CAC/BZ,MAAM,CAAE,CACNa,UAAU,CAAE,QAAQ,CACpBC,cAAc,CAAE,QAClB,CAAC,CACDP,KAAK,CAAE,CACLQ,UAAU,CAAEC,SAAS,CACrBC,kBAAkB,CAAE,KAAK,CACzBC,SAAS,CAAE,QACb,CACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.NavigationBar=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _NativeNavigationBar=_interopRequireDefault(require("../specs/NativeNavigationBar"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["title","onCloseButtonPress"];var _this=this,_jsxFileName="/Users/tianzhao/stripe/stripe-react-native/src/connect/NavigationBar.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var NavigationBar=exports.NavigationBar=(0,_react.forwardRef)(function(_ref,ref){var title=_ref.title,onCloseButtonPress=_ref.onCloseButtonPress,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeNavigationBar.default,Object.assign({ref:ref,title:title,onCloseButtonPress:onCloseButtonPress?function(_event){onCloseButtonPress();}:undefined},rest));});NavigationBar.displayName='NavigationBar';
2
+ //# sourceMappingURL=NavigationBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_NativeNavigationBar","_interopRequireDefault","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NavigationBar","exports","forwardRef","_ref","ref","title","onCloseButtonPress","rest","_objectWithoutProperties2","jsx","assign","_event","undefined","displayName"],"sourceRoot":"../../../src","sources":["connect/NavigationBar.tsx"],"mappings":"yRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,oBAAA,CAAAC,sBAAA,CAAAF,OAAA,kCAA+D,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,oCAAAC,KAAA,MAAAC,YAAA,qFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CA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+ //# sourceMappingURL=connectTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["connect/connectTypes.ts"],"mappings":"","ignoreList":[]}