@stripe/stripe-react-native 0.61.0 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/gradle.properties +2 -2
- package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +4 -0
- package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +6 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +200 -198
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +17 -16
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +8 -11
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +4 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +16 -1
- package/android/src/test/java/com/reactnativestripesdk/mappers/OnrampMappersTest.kt +3 -0
- package/ios/Mappers.swift +15 -2
- package/ios/StripeOnrampSdk.h +3 -4
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/connect/Components.js +1 -1
- package/lib/commonjs/connect/Components.js.map +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js.map +1 -1
- package/lib/commonjs/connect/NavigationBar.js +1 -1
- package/lib/commonjs/connect/NavigationBar.js.map +1 -1
- package/lib/commonjs/events.js +1 -1
- package/lib/commonjs/events.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
- package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
- package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js.map +1 -1
- package/lib/commonjs/specs/NativeCardForm.js +1 -1
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
- package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
- package/lib/commonjs/specs/NativeNavigationBar.js +1 -1
- package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/connect/Components.js +1 -1
- package/lib/module/connect/Components.js.map +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/module/connect/EmbeddedComponent.js +1 -1
- package/lib/module/connect/EmbeddedComponent.js.map +1 -1
- package/lib/module/connect/ModalCloseButton.js +1 -1
- package/lib/module/connect/ModalCloseButton.js.map +1 -1
- package/lib/module/connect/NavigationBar.js +1 -1
- package/lib/module/connect/NavigationBar.js.map +1 -1
- package/lib/module/events.js +1 -1
- package/lib/module/events.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +1 -1
- package/lib/module/specs/NativeAddressSheet.js +1 -1
- package/lib/module/specs/NativeApplePayButton.js +1 -1
- package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/module/specs/NativeCardField.js +1 -1
- package/lib/module/specs/NativeCardField.js.map +1 -1
- package/lib/module/specs/NativeCardForm.js +1 -1
- package/lib/module/specs/NativeCardForm.js.map +1 -1
- package/lib/module/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/module/specs/NativeGooglePayButton.js +1 -1
- package/lib/module/specs/NativeNavigationBar.js +1 -1
- package/lib/module/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/module/specs/NativeStripeContainer.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/typescript/src/connect/connectTypes.d.ts +76 -0
- package/lib/typescript/src/connect/connectTypes.d.ts.map +1 -1
- package/lib/typescript/src/events.d.ts +5 -3
- package/lib/typescript/src/events.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +2 -2
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/connect/connectTypes.ts +88 -0
- package/src/events.ts +10 -13
- package/src/specs/NativeOnrampSdkModule.ts +2 -2
- package/stripe-react-native.podspec +1 -1
|
@@ -302,6 +302,44 @@ export declare type AppearanceVariables = {
|
|
|
302
302
|
*/
|
|
303
303
|
buttonSecondaryColorText?: string;
|
|
304
304
|
|
|
305
|
+
// Danger Button
|
|
306
|
+
/**
|
|
307
|
+
* The color used as a background for danger buttons to indicate destructive actions. This accepts hex values or RGB/HSL strings.
|
|
308
|
+
*/
|
|
309
|
+
buttonDangerColorBackground?: string;
|
|
310
|
+
/**
|
|
311
|
+
* The color used as a border for danger buttons to indicate destructive actions. This accepts hex values or RGB/HSL strings.
|
|
312
|
+
*/
|
|
313
|
+
buttonDangerColorBorder?: string;
|
|
314
|
+
/**
|
|
315
|
+
* The text color used for danger buttons to indicate destructive actions. This accepts hex values or RGB/HSL strings.
|
|
316
|
+
*/
|
|
317
|
+
buttonDangerColorText?: string;
|
|
318
|
+
|
|
319
|
+
// Button Padding
|
|
320
|
+
/**
|
|
321
|
+
* The horizontal padding for buttons. This accepts a valid padding value.
|
|
322
|
+
*/
|
|
323
|
+
buttonPaddingX?: string;
|
|
324
|
+
/**
|
|
325
|
+
* The vertical padding for buttons. This accepts a valid padding value.
|
|
326
|
+
*/
|
|
327
|
+
buttonPaddingY?: string;
|
|
328
|
+
|
|
329
|
+
// Button Typography
|
|
330
|
+
/**
|
|
331
|
+
* The font size for button label typography. Button label typography variables accept a valid font size value ranging from 1px to 200px, 0.1em to 12em, and 0.1rem to 12rem.
|
|
332
|
+
*/
|
|
333
|
+
buttonLabelFontSize?: string;
|
|
334
|
+
/**
|
|
335
|
+
* The font weight for button label typography. Button label typography variables accept a valid font weight value.
|
|
336
|
+
*/
|
|
337
|
+
buttonLabelFontWeight?: string;
|
|
338
|
+
/**
|
|
339
|
+
* The text transform for button label typography. Button label typography variables accept a valid text transform value.
|
|
340
|
+
*/
|
|
341
|
+
buttonLabelTextTransform?: string;
|
|
342
|
+
|
|
305
343
|
/**
|
|
306
344
|
* The color used for secondary text. This accepts hex values or RGB/RGBA/HSL strings.
|
|
307
345
|
*/
|
|
@@ -326,6 +364,10 @@ export declare type AppearanceVariables = {
|
|
|
326
364
|
* The thickness of text decoration of primary actions and links. This accepts a valid text decoration thickness value.
|
|
327
365
|
*/
|
|
328
366
|
actionPrimaryTextDecorationThickness?: string;
|
|
367
|
+
/**
|
|
368
|
+
* The text transform for primary actions and links. This accepts a valid text transform value.
|
|
369
|
+
*/
|
|
370
|
+
actionPrimaryTextTransform?: string;
|
|
329
371
|
/**
|
|
330
372
|
* The color used for secondary actions and links. This accepts hex values or RGB/HSL strings.
|
|
331
373
|
*/
|
|
@@ -346,6 +388,10 @@ export declare type AppearanceVariables = {
|
|
|
346
388
|
* The thickness of text decoration of secondary actions and links. This accepts a valid text decoration thickness value.
|
|
347
389
|
*/
|
|
348
390
|
actionSecondaryTextDecorationThickness?: string;
|
|
391
|
+
/**
|
|
392
|
+
* The text transform for secondary actions and links. This accepts a valid text transform value.
|
|
393
|
+
*/
|
|
394
|
+
actionSecondaryTextTransform?: string;
|
|
349
395
|
|
|
350
396
|
// Neutral Badge Colors
|
|
351
397
|
/**
|
|
@@ -403,6 +449,30 @@ export declare type AppearanceVariables = {
|
|
|
403
449
|
*/
|
|
404
450
|
badgeDangerColorBorder?: string;
|
|
405
451
|
|
|
452
|
+
// Badge Padding
|
|
453
|
+
/**
|
|
454
|
+
* The horizontal padding used for badges. This supports pixel values only.
|
|
455
|
+
*/
|
|
456
|
+
badgePaddingX?: string;
|
|
457
|
+
/**
|
|
458
|
+
* The vertical padding used for badges. This supports pixel values only.
|
|
459
|
+
*/
|
|
460
|
+
badgePaddingY?: string;
|
|
461
|
+
|
|
462
|
+
// Badge Typography
|
|
463
|
+
/**
|
|
464
|
+
* The font size for badge label typography. Badge label typography variables accept a valid font size value ranging from 1px to 200px, 0.1em to 12em, and 0.1rem to 12rem.
|
|
465
|
+
*/
|
|
466
|
+
badgeLabelFontSize?: string;
|
|
467
|
+
/**
|
|
468
|
+
* The font weight for badge label typography. Badge label typography variables accept a valid font weight value.
|
|
469
|
+
*/
|
|
470
|
+
badgeLabelFontWeight?: string;
|
|
471
|
+
/**
|
|
472
|
+
* The text transform for badge label typography. Badge label typography variables accept a valid text transform value.
|
|
473
|
+
*/
|
|
474
|
+
badgeLabelTextTransform?: string;
|
|
475
|
+
|
|
406
476
|
// Background
|
|
407
477
|
/**
|
|
408
478
|
* The background color used when highlighting information, like the selected row on a table or particular piece of UI. This accepts hex values or RGB/HSL strings.
|
|
@@ -427,6 +497,24 @@ export declare type AppearanceVariables = {
|
|
|
427
497
|
* The color used for to fill in form items like checkboxes, radio buttons and switches. This accepts hex values or RGB/HSL strings.
|
|
428
498
|
*/
|
|
429
499
|
formAccentColor?: string;
|
|
500
|
+
/**
|
|
501
|
+
* The color used for placeholder text in form items. This accepts hex values or RGB/HSL strings.
|
|
502
|
+
*/
|
|
503
|
+
formPlaceholderTextColor?: string;
|
|
504
|
+
/**
|
|
505
|
+
* The horizontal padding used for input fields in forms. This supports pixel values only.
|
|
506
|
+
*/
|
|
507
|
+
inputFieldPaddingX?: string;
|
|
508
|
+
/**
|
|
509
|
+
* The vertical padding used for input fields in forms. This supports pixel values only.
|
|
510
|
+
*/
|
|
511
|
+
inputFieldPaddingY?: string;
|
|
512
|
+
|
|
513
|
+
// Table
|
|
514
|
+
/**
|
|
515
|
+
* The vertical padding used for table rows. This supports pixel values only.
|
|
516
|
+
*/
|
|
517
|
+
tableRowPaddingY?: string;
|
|
430
518
|
|
|
431
519
|
// Border Sizing
|
|
432
520
|
/**
|
package/src/events.ts
CHANGED
|
@@ -76,22 +76,19 @@ export function addListener<EventT extends keyof Events>(
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
const compatOnrampEventEmitter =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
Platform.OS === 'ios'
|
|
80
|
+
? new NativeEventEmitter(NativeOnrampSdkModule as any)
|
|
81
|
+
: DeviceEventEmitter;
|
|
82
|
+
|
|
83
|
+
type OnrampEventMap = {
|
|
84
|
+
onCheckoutClientSecretRequested: void;
|
|
85
|
+
};
|
|
86
86
|
|
|
87
|
-
type OnrampEvents =
|
|
87
|
+
type OnrampEvents = keyof OnrampEventMap;
|
|
88
88
|
|
|
89
89
|
export function addOnrampListener<EventT extends OnrampEvents>(
|
|
90
90
|
event: EventT,
|
|
91
|
-
handler:
|
|
91
|
+
handler: (params: OnrampEventMap[EventT]) => void
|
|
92
92
|
): EventSubscription {
|
|
93
|
-
|
|
94
|
-
return compatOnrampEventEmitter.addListener(event, handler);
|
|
95
|
-
}
|
|
96
|
-
return NativeOnrampSdkModule[event](handler as any);
|
|
93
|
+
return compatOnrampEventEmitter.addListener(event, handler);
|
|
97
94
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TurboModuleRegistry } from 'react-native';
|
|
2
2
|
import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
|
|
3
|
-
import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
3
|
import type { Address, InitialiseParams, Onramp } from '../types';
|
|
5
4
|
import type { UnsafeObject } from './utils';
|
|
6
5
|
|
|
@@ -33,7 +32,6 @@ export interface Spec extends TurboModule {
|
|
|
33
32
|
platformPayParams: UnsafeObject<any>
|
|
34
33
|
): Promise<Onramp.CollectPaymentMethodResult>;
|
|
35
34
|
provideCheckoutClientSecret(clientSecret: string | null): void;
|
|
36
|
-
onCheckoutClientSecretRequested: EventEmitter<UnsafeObject<any>>;
|
|
37
35
|
createCryptoPaymentToken(): Promise<Onramp.CreateCryptoPaymentTokenResult>;
|
|
38
36
|
performCheckout(onrampSessionId: string): Promise<Onramp.VoidResult>;
|
|
39
37
|
onrampAuthorize(linkAuthIntentId: string): Promise<Onramp.AuthorizeResult>;
|
|
@@ -41,6 +39,8 @@ export interface Spec extends TurboModule {
|
|
|
41
39
|
token: UnsafeObject<Onramp.CryptoPaymentToken>
|
|
42
40
|
): Promise<Onramp.PaymentDisplayDataResult>;
|
|
43
41
|
logout(): Promise<Onramp.VoidResult>;
|
|
42
|
+
addListener: (eventType: string) => void;
|
|
43
|
+
removeListeners: (count: number) => void;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export default TurboModuleRegistry.getEnforcing<Spec>('OnrampSdk');
|
|
@@ -2,7 +2,7 @@ require 'json'
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
# Keep stripe_version in sync with https://github.com/stripe/stripe-identity-react-native/blob/main/stripe-identity-react-native.podspec
|
|
5
|
-
stripe_version = '~> 25.
|
|
5
|
+
stripe_version = '~> 25.10.0'
|
|
6
6
|
|
|
7
7
|
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
8
8
|
|