@stripe/stripe-react-native 0.57.2 → 0.57.3

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 (111) hide show
  1. package/android/build.gradle +1 -0
  2. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +131 -30
  3. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetManager.kt +38 -13
  4. package/android/src/test/java/com/reactnativestripesdk/DrawableConversionPropertyTest.kt +224 -0
  5. package/android/src/test/java/com/reactnativestripesdk/DrawableConversionTest.kt +146 -0
  6. package/android/src/test/java/com/reactnativestripesdk/DrawableLoadingTest.kt +150 -0
  7. package/android/src/test/java/com/reactnativestripesdk/PaymentOptionImageConsistencyTest.kt +186 -0
  8. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  9. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  10. package/lib/commonjs/components/AddressSheet.js +1 -1
  11. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  12. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  13. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  14. package/lib/commonjs/components/CardField.js +1 -1
  15. package/lib/commonjs/components/CardField.js.map +1 -1
  16. package/lib/commonjs/components/CardForm.js +1 -1
  17. package/lib/commonjs/components/CardForm.js.map +1 -1
  18. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  19. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  20. package/lib/commonjs/components/StripeContainer.js +1 -1
  21. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  22. package/lib/commonjs/connect/Components.js +1 -1
  23. package/lib/commonjs/connect/Components.js.map +1 -1
  24. package/lib/commonjs/connect/ConnectComponentsProvider.js +1 -1
  25. package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -1
  26. package/lib/commonjs/connect/EmbeddedComponent.js +1 -1
  27. package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -1
  28. package/lib/commonjs/connect/ModalCloseButton.js +1 -1
  29. package/lib/commonjs/connect/ModalCloseButton.js.map +1 -1
  30. package/lib/commonjs/connect/NavigationBar.js +1 -1
  31. package/lib/commonjs/connect/NavigationBar.js.map +1 -1
  32. package/lib/commonjs/helpers.js +1 -1
  33. package/lib/commonjs/hooks/useOnramp.js +1 -1
  34. package/lib/commonjs/hooks/useOnramp.js.map +1 -1
  35. package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
  36. package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
  37. package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
  38. package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
  39. package/lib/commonjs/specs/NativeCardField.js +1 -1
  40. package/lib/commonjs/specs/NativeCardField.js.map +1 -1
  41. package/lib/commonjs/specs/NativeCardForm.js +1 -1
  42. package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
  43. package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +1 -1
  44. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
  45. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
  46. package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
  47. package/lib/commonjs/specs/NativeNavigationBar.js +1 -1
  48. package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
  49. package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
  50. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
  51. package/lib/module/components/AddToWalletButton.js +1 -1
  52. package/lib/module/components/AddToWalletButton.js.map +1 -1
  53. package/lib/module/components/AddressSheet.js +1 -1
  54. package/lib/module/components/AddressSheet.js.map +1 -1
  55. package/lib/module/components/AuBECSDebitForm.js +1 -1
  56. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  57. package/lib/module/components/CardField.js +1 -1
  58. package/lib/module/components/CardField.js.map +1 -1
  59. package/lib/module/components/CardForm.js +1 -1
  60. package/lib/module/components/CardForm.js.map +1 -1
  61. package/lib/module/components/PlatformPayButton.js +1 -1
  62. package/lib/module/components/PlatformPayButton.js.map +1 -1
  63. package/lib/module/components/StripeContainer.js +1 -1
  64. package/lib/module/components/StripeContainer.js.map +1 -1
  65. package/lib/module/connect/Components.js +1 -1
  66. package/lib/module/connect/Components.js.map +1 -1
  67. package/lib/module/connect/ConnectComponentsProvider.js +1 -1
  68. package/lib/module/connect/ConnectComponentsProvider.js.map +1 -1
  69. package/lib/module/connect/EmbeddedComponent.js +1 -1
  70. package/lib/module/connect/EmbeddedComponent.js.map +1 -1
  71. package/lib/module/connect/ModalCloseButton.js +1 -1
  72. package/lib/module/connect/ModalCloseButton.js.map +1 -1
  73. package/lib/module/connect/NavigationBar.js +1 -1
  74. package/lib/module/connect/NavigationBar.js.map +1 -1
  75. package/lib/module/helpers.js +1 -1
  76. package/lib/module/hooks/useOnramp.js +1 -1
  77. package/lib/module/hooks/useOnramp.js.map +1 -1
  78. package/lib/module/specs/NativeAddToWalletButton.js +1 -1
  79. package/lib/module/specs/NativeAddressSheet.js +1 -1
  80. package/lib/module/specs/NativeApplePayButton.js +1 -1
  81. package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
  82. package/lib/module/specs/NativeCardField.js +1 -1
  83. package/lib/module/specs/NativeCardField.js.map +1 -1
  84. package/lib/module/specs/NativeCardForm.js +1 -1
  85. package/lib/module/specs/NativeCardForm.js.map +1 -1
  86. package/lib/module/specs/NativeConnectAccountOnboardingView.js +1 -1
  87. package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
  88. package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
  89. package/lib/module/specs/NativeGooglePayButton.js +1 -1
  90. package/lib/module/specs/NativeNavigationBar.js +1 -1
  91. package/lib/module/specs/NativeStripeContainer.js +1 -1
  92. package/lib/module/types/EmbeddedPaymentElement.js +1 -1
  93. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
  94. package/lib/typescript/src/connect/EmbeddedComponent.d.ts.map +1 -1
  95. package/lib/typescript/src/hooks/useOnramp.d.ts +2 -1
  96. package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
  97. package/package.json +12 -5
  98. package/src/connect/EmbeddedComponent.tsx +10 -10
  99. package/src/hooks/useOnramp.tsx +5 -1
  100. package/android/.idea/AndroidProjectSystem.xml +0 -6
  101. package/android/.idea/caches/deviceStreaming.xml +0 -1029
  102. package/android/.idea/compiler.xml +0 -6
  103. package/android/.idea/gradle.xml +0 -19
  104. package/android/.idea/migrations.xml +0 -10
  105. package/android/.idea/misc.xml +0 -10
  106. package/android/.idea/runConfigurations.xml +0 -17
  107. package/android/.idea/vcs.xml +0 -6
  108. package/android/local.properties +0 -8
  109. package/ios/StripeSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  110. package/ios/StripeSdk.xcodeproj/project.xcworkspace/xcuserdata/tianzhao.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  111. package/ios/StripeSdk.xcodeproj/xcuserdata/tianzhao.xcuserdatad/xcschemes/xcschememanagement.plist +0 -19
@@ -0,0 +1,150 @@
1
+ package com.reactnativestripesdk
2
+
3
+ import android.graphics.Canvas
4
+ import android.graphics.Color
5
+ import android.graphics.ColorFilter
6
+ import android.graphics.PixelFormat
7
+ import android.graphics.drawable.Drawable
8
+ import kotlinx.coroutines.delay
9
+ import kotlinx.coroutines.launch
10
+ import kotlinx.coroutines.test.runTest
11
+ import org.junit.Assert.assertNotNull
12
+ import org.junit.Assert.assertTrue
13
+ import org.junit.Test
14
+ import org.junit.runner.RunWith
15
+ import org.robolectric.RobolectricTestRunner
16
+
17
+ @RunWith(RobolectricTestRunner::class)
18
+ class DrawableLoadingTest {
19
+ /**
20
+ * Mock drawable that simulates DelegateDrawable's async loading behavior
21
+ */
22
+ class MockAsyncDrawable : Drawable() {
23
+ private var loaded = false
24
+ private var width = 1
25
+ private var height = 1
26
+
27
+ override fun getIntrinsicWidth(): Int = width
28
+
29
+ override fun getIntrinsicHeight(): Int = height
30
+
31
+ suspend fun simulateLoading(delayMs: Long = 100) {
32
+ delay(delayMs)
33
+ width = 150
34
+ height = 100
35
+ loaded = true
36
+ invalidateSelf() // Trigger callback
37
+ }
38
+
39
+ override fun draw(canvas: Canvas) {
40
+ // Draw a simple colored rectangle
41
+ canvas.drawColor(Color.RED)
42
+ }
43
+
44
+ override fun setAlpha(alpha: Int) {}
45
+
46
+ override fun setColorFilter(colorFilter: ColorFilter?) {}
47
+
48
+ override fun getOpacity(): Int = PixelFormat.OPAQUE
49
+ }
50
+
51
+ @Test
52
+ fun `waitForDrawableToLoad returns immediately for already loaded drawable`() =
53
+ runTest {
54
+ val drawable = MockAsyncDrawable()
55
+ // Pre-load the drawable
56
+ drawable.simulateLoading(0)
57
+
58
+ val startTime = System.currentTimeMillis()
59
+ val result = waitForDrawableToLoad(drawable, timeoutMs = 3000)
60
+ val elapsed = System.currentTimeMillis() - startTime
61
+
62
+ assertNotNull(result)
63
+ assertTrue("Should return quickly (< 100ms)", elapsed < 100)
64
+ assertTrue("Drawable should be loaded", result.intrinsicWidth > 1)
65
+ }
66
+
67
+ @Test
68
+ fun `waitForDrawableToLoad waits for drawable to load`() =
69
+ runTest {
70
+ val drawable = MockAsyncDrawable()
71
+
72
+ // Start async loading
73
+ launch {
74
+ drawable.simulateLoading(100)
75
+ }
76
+
77
+ val result = waitForDrawableToLoad(drawable, timeoutMs = 3000)
78
+
79
+ assertNotNull(result)
80
+ assertTrue("Drawable should be loaded after waiting", result.intrinsicWidth > 1)
81
+ assertTrue("Drawable should be loaded after waiting", result.intrinsicHeight > 1)
82
+ assertTrue("Width should be 150", result.intrinsicWidth == 150)
83
+ assertTrue("Height should be 100", result.intrinsicHeight == 100)
84
+ }
85
+
86
+ @Test
87
+ fun `waitForDrawableToLoad times out gracefully for drawable that never loads`() =
88
+ runTest {
89
+ val drawable = MockAsyncDrawable() // Never call simulateLoading()
90
+
91
+ val result = waitForDrawableToLoad(drawable, timeoutMs = 500)
92
+
93
+ // Should return the drawable even if timeout (best effort)
94
+ assertNotNull(result)
95
+ }
96
+
97
+ @Test
98
+ fun `convertDrawableToBase64 with async drawable returns consistent results`() =
99
+ runTest {
100
+ val drawable1 = MockAsyncDrawable()
101
+ val drawable2 = MockAsyncDrawable()
102
+
103
+ // Simulate both loading
104
+ launch { drawable1.simulateLoading(50) }
105
+ launch { drawable2.simulateLoading(100) }
106
+
107
+ val result1 = convertDrawableToBase64(drawable1)
108
+ val result2 = convertDrawableToBase64(drawable2)
109
+
110
+ assertNotNull("Result1 should not be null", result1)
111
+ assertNotNull("Result2 should not be null", result2)
112
+
113
+ // Both should be non-empty and similar length (same dimensions)
114
+ assertTrue("Both results should be non-empty", result1!!.isNotEmpty())
115
+ assertTrue("Both results should be non-empty", result2!!.isNotEmpty())
116
+
117
+ // They should be similar length since both are 150x100
118
+ val lengthDiff = kotlin.math.abs(result1.length - result2.length)
119
+ assertTrue(
120
+ "Results should have similar length (both 150x100), diff: $lengthDiff",
121
+ lengthDiff < result1.length * 0.1, // Within 10%
122
+ )
123
+ }
124
+
125
+ @Test
126
+ fun `waitForDrawableToLoad handles multiple concurrent calls`() =
127
+ runTest {
128
+ val drawable1 = MockAsyncDrawable()
129
+ val drawable2 = MockAsyncDrawable()
130
+ val drawable3 = MockAsyncDrawable()
131
+
132
+ // Start all loading at the same time
133
+ launch { drawable1.simulateLoading(50) }
134
+ launch { drawable2.simulateLoading(75) }
135
+ launch { drawable3.simulateLoading(100) }
136
+
137
+ // Wait for all concurrently
138
+ val result1 = waitForDrawableToLoad(drawable1, timeoutMs = 3000)
139
+ val result2 = waitForDrawableToLoad(drawable2, timeoutMs = 3000)
140
+ val result3 = waitForDrawableToLoad(drawable3, timeoutMs = 3000)
141
+
142
+ assertNotNull(result1)
143
+ assertNotNull(result2)
144
+ assertNotNull(result3)
145
+
146
+ assertTrue("All drawables should be loaded", result1.intrinsicWidth > 1)
147
+ assertTrue("All drawables should be loaded", result2.intrinsicWidth > 1)
148
+ assertTrue("All drawables should be loaded", result3.intrinsicWidth > 1)
149
+ }
150
+ }
@@ -0,0 +1,186 @@
1
+ package com.reactnativestripesdk
2
+
3
+ import android.graphics.Color
4
+ import android.graphics.drawable.ColorDrawable
5
+ import kotlinx.coroutines.test.runTest
6
+ import org.junit.Assert.assertEquals
7
+ import org.junit.Assert.assertNotEquals
8
+ import org.junit.Assert.assertNotNull
9
+ import org.junit.Assert.assertTrue
10
+ import org.junit.Test
11
+ import org.junit.runner.RunWith
12
+ import org.robolectric.RobolectricTestRunner
13
+
14
+ /**
15
+ * Regression tests for the payment option image consistency bug.
16
+ *
17
+ * Issue: PaymentOption.icon() was returning a DelegateDrawable that loaded asynchronously,
18
+ * causing inconsistent base64 strings across multiple calls. Sometimes it returned a 1x1
19
+ * placeholder (134 bytes), sometimes the full image (5650 bytes).
20
+ *
21
+ * These tests ensure this bug never returns.
22
+ */
23
+ @RunWith(RobolectricTestRunner::class)
24
+ class PaymentOptionImageConsistencyTest {
25
+ @Test
26
+ fun `REGRESSION - multiple calls return consistent base64 strings`() =
27
+ runTest {
28
+ // This test specifically guards against the original bug where
29
+ // multiple calls to icon() returned inconsistent results
30
+ val drawable =
31
+ ColorDrawable(Color.BLUE).apply {
32
+ setBounds(0, 0, 147, 105) // Typical card icon size
33
+ }
34
+
35
+ val results = mutableListOf<String?>()
36
+ repeat(10) {
37
+ results.add(convertDrawableToBase64(drawable))
38
+ }
39
+
40
+ // All results should be identical
41
+ val uniqueResults = results.toSet()
42
+ assertEquals(
43
+ "All 10 calls should return identical base64 (was returning different values due to async loading bug)",
44
+ 1,
45
+ uniqueResults.size,
46
+ )
47
+
48
+ // Verify the result is not null
49
+ assertNotNull("Base64 result should not be null", results.first())
50
+ }
51
+
52
+ @Test
53
+ fun `REGRESSION - base64 is not 1x1 placeholder`() =
54
+ runTest {
55
+ // This test guards against returning the 1x1 placeholder image
56
+ // Original bug: Sometimes returned 134-byte 1x1 black placeholder
57
+ val drawable =
58
+ ColorDrawable(Color.RED).apply {
59
+ setBounds(0, 0, 147, 105)
60
+ }
61
+
62
+ val result = convertDrawableToBase64(drawable)
63
+
64
+ assertNotNull(result)
65
+ // Original bug: 1x1 placeholder was 134 bytes
66
+ // Real image should be much larger
67
+ assertTrue(
68
+ "Base64 should be > 200 chars (original bug returned 134-byte 1x1 placeholder)",
69
+ result!!.length > 200,
70
+ )
71
+ }
72
+
73
+ @Test
74
+ fun `REGRESSION - bitmap has correct dimensions not 1x1`() =
75
+ runTest {
76
+ val drawable =
77
+ ColorDrawable(Color.GREEN).apply {
78
+ setBounds(0, 0, 147, 105)
79
+ }
80
+
81
+ val bitmap = getBitmapFromDrawable(drawable)
82
+
83
+ assertNotNull(bitmap)
84
+ assertNotEquals(
85
+ "Bitmap width should not be 1 (original bug captured 1x1 placeholder)",
86
+ 1,
87
+ bitmap!!.width,
88
+ )
89
+ assertNotEquals(
90
+ "Bitmap height should not be 1 (original bug captured 1x1 placeholder)",
91
+ 1,
92
+ bitmap.height,
93
+ )
94
+ assertEquals("Bitmap width should match drawable", 147, bitmap.width)
95
+ assertEquals("Bitmap height should match drawable", 105, bitmap.height)
96
+ }
97
+
98
+ @Test
99
+ fun `REGRESSION - rapid successive calls all return full image`() =
100
+ runTest {
101
+ // Simulate rapid successive calls like what happens when
102
+ // retrievePaymentOptionSelection() is called multiple times quickly
103
+ val drawable =
104
+ ColorDrawable(Color.MAGENTA).apply {
105
+ setBounds(0, 0, 147, 105)
106
+ }
107
+
108
+ val results = mutableListOf<String?>()
109
+ // Rapid fire - no delays
110
+ repeat(20) {
111
+ results.add(convertDrawableToBase64(drawable))
112
+ }
113
+
114
+ // All should be non-null
115
+ assertTrue(
116
+ "All results should be non-null",
117
+ results.all { it != null },
118
+ )
119
+
120
+ // All should be full images, not placeholders
121
+ assertTrue(
122
+ "All results should be > 200 chars (not 1x1 placeholders)",
123
+ results.all { it!!.length > 200 },
124
+ )
125
+
126
+ // All should be identical
127
+ val uniqueResults = results.toSet()
128
+ assertEquals(
129
+ "All 20 rapid calls should return identical base64",
130
+ 1,
131
+ uniqueResults.size,
132
+ )
133
+ }
134
+
135
+ @Test
136
+ fun `REGRESSION - consistent results across different payment method types`() =
137
+ runTest {
138
+ // Test with different typical payment method icon sizes
139
+ val visaDrawable =
140
+ ColorDrawable(Color.BLUE).apply {
141
+ setBounds(0, 0, 147, 105) // Visa
142
+ }
143
+ val mastercardDrawable =
144
+ ColorDrawable(Color.RED).apply {
145
+ setBounds(0, 0, 147, 105) // Mastercard (same size)
146
+ }
147
+ val amexDrawable =
148
+ ColorDrawable(Color.CYAN).apply {
149
+ setBounds(0, 0, 147, 105) // Amex (same size)
150
+ }
151
+
152
+ val visa1 = convertDrawableToBase64(visaDrawable)
153
+ val visa2 = convertDrawableToBase64(visaDrawable)
154
+
155
+ val mc1 = convertDrawableToBase64(mastercardDrawable)
156
+ val mc2 = convertDrawableToBase64(mastercardDrawable)
157
+
158
+ val amex1 = convertDrawableToBase64(amexDrawable)
159
+ val amex2 = convertDrawableToBase64(amexDrawable)
160
+
161
+ // Each card type should return consistent results
162
+ assertEquals("Visa should be consistent", visa1, visa2)
163
+ assertEquals("Mastercard should be consistent", mc1, mc2)
164
+ assertEquals("Amex should be consistent", amex1, amex2)
165
+
166
+ // Different card types should have different images
167
+ assertNotEquals("Visa and Mastercard should differ", visa1, mc1)
168
+ assertNotEquals("Mastercard and Amex should differ", mc1, amex1)
169
+ }
170
+
171
+ @Test
172
+ fun `REGRESSION - setBounds is applied before drawing`() {
173
+ // This test ensures the original fix (setBounds) is still working
174
+ val drawable =
175
+ ColorDrawable(Color.YELLOW).apply {
176
+ setBounds(0, 0, 100, 80)
177
+ }
178
+
179
+ val bitmap = getBitmapFromDrawable(drawable)
180
+
181
+ assertNotNull(bitmap)
182
+ // The bitmap dimensions should match the bounds we set
183
+ assertEquals("Bitmap should respect setBounds width", 100, bitmap!!.width)
184
+ assertEquals("Bitmap should respect setBounds height", 80, bitmap.height)
185
+ }
186
+ }
@@ -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/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);}}));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddToWalletButton.default,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
2
2
  //# sourceMappingURL=AddToWalletButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_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
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,yFAAAC,SAAA,gBAgEhE,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAF,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAS,GAAA,EAACV,wBAAA,CAAAS,OAAuB,CAAAE,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _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);}}));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddressSheet.default,Object.assign({},props,{onSubmitAction:function onSubmitAction(event){return onSubmit(event.nativeEvent.result);},onErrorAction:function onErrorAction(event){return onError(event.nativeEvent.error);}}));}
2
2
  //# sourceMappingURL=AddressSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_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
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,oFAAAC,SAAA,wBA4DtD,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAF,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAU,GAAA,EAACX,mBAAA,CAAAU,OAAkB,CAAAE,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAK,QAAK,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAACC,MAAM,CAAC,EAAC,CAC9DC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAGH,KAAK,QAAK,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACG,KAAK,CAAC,EAAC,EAC5D,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _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));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAuBECSDebitForm.default,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
2
2
  //# sourceMappingURL=AuBECSDebitForm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_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
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,0CA6B5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAF,SAAA,EAER,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACZ,sBAAA,CAAAW,OAAqB,CAAAE,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _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));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _helpers=require("../helpers");var _NativeCardField=_interopRequireWildcard(require("../specs/NativeCardField"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardField.tsx";function _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","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,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,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,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,WAAW,CACnCC,QAAQ,CAAEpD,SAAS,cAATA,SAAS,CAAEoD,QAAQ,CAC7BC,gBAAgB,CAAErD,SAAS,cAATA,SAAS,CAAEqD,gBAAgB,CAC7CC,SAAS,CAAEtD,SAAS,cAATA,SAAS,CAAEsD,SAAS,CAC/BC,cAAc,CAAEvD,SAAS,cAATA,SAAS,CAAEuD,cAAc,CACzCC,UAAU,CAAExD,SAAS,cAATA,SAAS,CAAEwD,UACzB,CAAE,CACFvD,YAAY,CAAE,CACZwB,MAAM,CAAExB,YAAY,cAAZA,YAAY,CAAEwB,MAAM,CAC5BgC,UAAU,CAAExD,YAAY,cAAZA,YAAY,CAAEwD,UAAU,CACpC/B,GAAG,CAAEzB,YAAY,cAAZA,YAAY,CAAEyB,GAAG,CACtBF,UAAU,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,UAC5B,CAAE,CACFtB,SAAS,CAAEA,SAAS,OAATA,SAAS,CAAI,KAAM,CAC9BC,iBAAiB,CAAEA,iBAAiB,OAAjBA,iBAAiB,CAAI,IAAK,CAC7CC,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BC,6BAA6B,CAAEA,6BAA6B,OAA7BA,6BAA6B,CAAI,KAAM,EAClEC,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","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,sFAAAP,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,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,KAAAP,CAAA,CAAAK,GAAA,EAAAL,CAAA,CAAAM,G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CAAEoD,QAAQ,CAC7BC,gBAAgB,CAAErD,SAAS,cAATA,SAAS,CAAEqD,gBAAgB,CAC7CC,SAAS,CAAEtD,SAAS,cAATA,SAAS,CAAEsD,SAAS,CAC/BC,cAAc,CAAEvD,SAAS,cAATA,SAAS,CAAEuD,cAAc,CACzCC,UAAU,CAAExD,SAAS,cAATA,SAAS,CAAEwD,UACzB,CAAE,CACFvD,YAAY,CAAE,CACZwB,MAAM,CAAExB,YAAY,cAAZA,YAAY,CAAEwB,MAAM,CAC5BgC,UAAU,CAAExD,YAAY,cAAZA,YAAY,CAAEwD,UAAU,CACpC/B,GAAG,CAAEzB,YAAY,cAAZA,YAAY,CAAEyB,GAAG,CACtBF,UAAU,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,UAC5B,CAAE,CACFtB,SAAS,CAAEA,SAAS,OAATA,SAAS,CAAI,KAAM,CAC9BC,iBAAiB,CAAEA,iBAAiB,OAAjBA,iBAAiB,CAAI,IAAK,CAC7CC,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BC,6BAA6B,CAAEA,6BAA6B,OAA7BA,6BAA6B,CAAI,KAAM,EAClEC,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.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));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _NativeCardForm=_interopRequireWildcard(require("../specs/NativeCardForm"));var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardForm.tsx";function _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","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,IAAAd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,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
+ {"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,Q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Property(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}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _PlatformPay=require("../types/PlatformPay");var _NativeApplePayButton=_interopRequireDefault(require("../specs/NativeApplePayButton"));var _NativeGooglePayButton=_interopRequireDefault(require("../specs/NativeGooglePayButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style"];function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,setOrderTracking=_ref.setOrderTracking,style=_ref.style,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;var orderTrackingCallback=setOrderTracking?function(){setOrderTracking(_NativeStripeSdkModule.default.configureOrderTracking);}:undefined;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,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCACA,IAAAG,YAAA,CAAAH,OAAA,yBAMA,IAAAI,qBAAA,CAAAL,sBAAA,CAAAC,OAAA,mCACA,IAAAK,sBAAA,CAAAN,sBAAA,CAAAC,OAAA,oCAAmE,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,YAAA,uFAAAC,SAAA,mKA4E5D,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAYvB,KAAAC,SAAA,CAAAD,IAAA,CAXRE,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAGE,uBAAU,CAACC,OAAO,CAAAH,SAAA,CAAAI,eAAA,CAAAL,IAAA,CACzBM,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAGE,wBAAW,CAACC,SAAS,CAAAH,eAAA,CAClCI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,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/PlatformPayButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCACA,IAAAG,YAAA,CAAAH,OAAA,yBAMA,IAAAI,qBAAA,CAAAL,sBAAA,CAAAC,OAAA,mCACA,IAAAK,sBAAA,CAAAN,sBAAA,CAAAC,OAAA,oCAAmE,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,YAAA,yFAAAC,SAAA,mKA4E5D,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAYvB,KAAAC,SAAA,CAAAD,IAAA,CAXRE,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAGE,uBAAU,CAACC,OAAO,CAAAH,SAAA,CAAAI,eAAA,CAAAL,IAAA,CACzBM,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAGE,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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/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}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeContainer=_interopRequireDefault(require("../specs/NativeStripeContainer"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/StripeContainer.tsx";function StripeContainer(_ref){var keyboardShouldPersistTaps=_ref.keyboardShouldPersistTaps,children=_ref.children;return(0,_jsxRuntime.jsx)(_NativeStripeContainer.default,{keyboardShouldPersistTaps:keyboardShouldPersistTaps!=null?keyboardShouldPersistTaps:true,style:styles.container,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,accessible:false,children:children})});}var styles=_reactNative.StyleSheet.create({container:{flex:1}});
2
2
  //# sourceMappingURL=StripeContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_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
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeContainer","_jsxRuntime","_jsxFileName","StripeContainer","_ref","keyboardShouldPersistTaps","children","jsx","default","style","styles","container","View","accessible","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/StripeContainer.tsx"],"mappings":"oLAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCAAmE,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,YAAA,mFAkB5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAGrB,IAFR,CAAAC,yBAAyB,CAAAD,IAAA,CAAzBC,yBAAyB,CACzBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAER,MACE,GAAAL,WAAA,CAAAM,GAAA,EAACP,sBAAA,CAAAQ,OAAqB,EACpBH,yBAAyB,CAAEA,yBAAyB,OAAzBA,yBAAyB,CAAI,IAAK,CAC7DI,KAAK,CAAEC,MAAM,CAACC,SAAU,CAAAL,QAAA,CAExB,GAAAL,WAAA,CAAAM,GAAA,EAACR,YAAA,CAAAa,IAAI,EAACH,KAAK,CAAEC,MAAM,CAACC,SAAU,CAACE,UAAU,CAAE,KAAM,CAAAP,QAAA,CAC9CA,QAAQ,CACL,CAAC,CACc,CAAC,CAE5B,CAEA,GAAM,CAAAI,MAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BJ,SAAS,CAAE,CACTK,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.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}});
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/davidestes/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
2
  //# sourceMappingURL=Components.js.map