@stripe/stripe-react-native 0.27.1 → 0.28.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/CHANGELOG.md +18 -0
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +2 -2
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +6 -2
- package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +5 -0
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +6 -2
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +5 -0
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +33 -7
- package/ios/CardFieldManager.m +1 -0
- package/ios/CardFieldView.swift +6 -0
- package/ios/CardFormManager.m +2 -2
- package/ios/CardFormView.swift +9 -9
- package/ios/StripeSdk.swift +5 -6
- 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/types/PlatformPay.js.map +1 -1
- package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
- package/lib/commonjs/types/components/CardFormView.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/types/PlatformPay.js.map +1 -1
- package/lib/module/types/components/CardFieldInput.js.map +1 -1
- package/lib/module/types/components/CardFormView.js.map +1 -1
- package/lib/typescript/src/components/CardField.d.ts +2 -0
- package/lib/typescript/src/components/CardForm.d.ts +2 -0
- package/lib/typescript/src/components/PlatformPayButton.d.ts +3 -2
- package/lib/typescript/src/types/PlatformPay.d.ts +1 -1
- package/lib/typescript/src/types/components/CardFieldInput.d.ts +1 -0
- package/lib/typescript/src/types/components/CardFormView.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/CardField.tsx +2 -0
- package/src/components/CardForm.tsx +2 -4
- package/src/components/PlatformPayButton.tsx +3 -2
- package/src/types/PlatformPay.ts +1 -1
- package/src/types/components/CardFieldInput.ts +1 -0
- package/src/types/components/CardFormView.ts +1 -1
- package/stripe-react-native.podspec +1 -1
|
@@ -34,6 +34,8 @@ export interface Props extends AccessibilityProps {
|
|
|
34
34
|
postalCodeEnabled?: boolean;
|
|
35
35
|
/** Controls the postal code entry shown (if the postalCodeEnabled prop is set to true). Defaults to the device's default locale. */
|
|
36
36
|
countryCode?: string;
|
|
37
|
+
/** Applies a disabled state such that user input is not accepted. Defaults to false. */
|
|
38
|
+
disabled?: boolean;
|
|
37
39
|
cardStyle?: CardFieldInput.Styles;
|
|
38
40
|
placeholders?: CardFieldInput.Placeholders;
|
|
39
41
|
autofocus?: boolean;
|
|
@@ -32,10 +32,10 @@ export interface Props extends AccessibilityProps {
|
|
|
32
32
|
style?: StyleProp<ViewStyle>;
|
|
33
33
|
autofocus?: boolean;
|
|
34
34
|
testID?: string;
|
|
35
|
-
|
|
35
|
+
/** Applies a disabled state such that user input is not accepted. Defaults to false. */
|
|
36
|
+
disabled?: boolean;
|
|
36
37
|
/** All styles except backgroundColor, cursorColor, borderColor, and borderRadius are Android only */
|
|
37
38
|
cardStyle?: CardFormView.Styles;
|
|
38
|
-
// isUserInteractionEnabled?: boolean;
|
|
39
39
|
|
|
40
40
|
// TODO: will make it public when iOS SDK allows for this
|
|
41
41
|
// postalCodeEnabled?: boolean;
|
|
@@ -78,7 +78,6 @@ export const CardForm = forwardRef<CardFormView.Methods, Props>(
|
|
|
78
78
|
{
|
|
79
79
|
onFormComplete,
|
|
80
80
|
cardStyle,
|
|
81
|
-
// isUserInteractionEnabled = true,
|
|
82
81
|
// postalCodeEnabled = true,
|
|
83
82
|
// onFocus,
|
|
84
83
|
// onBlur,
|
|
@@ -181,7 +180,6 @@ export const CardForm = forwardRef<CardFormView.Methods, Props>(
|
|
|
181
180
|
// disabledBackgroundColor: cardStyle?.disabledBackgroundColor,
|
|
182
181
|
// type: cardStyle?.type,
|
|
183
182
|
}}
|
|
184
|
-
// isUserInteractionEnabledValue={isUserInteractionEnabled}
|
|
185
183
|
placeholders={{
|
|
186
184
|
number: placeholders?.number,
|
|
187
185
|
expiration: placeholders?.expiration,
|
|
@@ -26,7 +26,7 @@ export interface Props extends AccessibilityProps {
|
|
|
26
26
|
type?: ButtonType;
|
|
27
27
|
/** iOS only. Sets the coloring of the button. */
|
|
28
28
|
appearance?: ButtonStyle;
|
|
29
|
-
/** iOS only. Sets the border radius of the button. */
|
|
29
|
+
/** Affects iOS only. Sets the border radius of the button. On Android, you cannot modify the radius of the Google Pay button, since doing so violates the [Google Brand Guidelines](https://developers.google.com/pay/api/android/guides/brand-guidelines#style). */
|
|
30
30
|
borderRadius?: number;
|
|
31
31
|
/** Function called whenever the button is pressed. */
|
|
32
32
|
onPress(): void;
|
|
@@ -42,7 +42,8 @@ export interface Props extends AccessibilityProps {
|
|
|
42
42
|
shippingMethod: ShippingMethod;
|
|
43
43
|
}) => void;
|
|
44
44
|
/**
|
|
45
|
-
* This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet
|
|
45
|
+
* This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet IF
|
|
46
|
+
* ContactField.PostalAddress was included in the requiredShippingAddressFields array.
|
|
46
47
|
* It receives one parameter: an `event` object with a `shippingContact` field. You MUST
|
|
47
48
|
* update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the
|
|
48
49
|
* Apple Pay sheet will hang and the payment flow will automatically cancel.
|
package/src/types/PlatformPay.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type ApplePayBaseParams = {
|
|
|
55
55
|
additionalEnabledNetworks?: Array<string>;
|
|
56
56
|
/** The list of items that describe a purchase. For example: total, tax, discount, and grand total. */
|
|
57
57
|
cartItems: Array<CartSummaryItem>;
|
|
58
|
-
/** The list of fields that you need for a shipping contact in order to process the transaction. If
|
|
58
|
+
/** The list of fields that you need for a shipping contact in order to process the transaction. If you include ContactField.PostalAddress in this array, you must implement the PlatformPayButton component's `onShippingContactSelected` callback and call `updatePlatformPaySheet` from there.*/
|
|
59
59
|
requiredShippingAddressFields?: Array<ContactField>;
|
|
60
60
|
/** The list of fields that you need for a billing contact in order to process the transaction. */
|
|
61
61
|
requiredBillingContactFields?: Array<ContactField>;
|
|
@@ -55,7 +55,6 @@ export type DefaultValues = {
|
|
|
55
55
|
export interface NativeProps {
|
|
56
56
|
style?: StyleProp<ViewStyle>;
|
|
57
57
|
autofocus?: boolean;
|
|
58
|
-
// isUserInteractionEnabledValue?: boolean;
|
|
59
58
|
cardStyle?: Styles;
|
|
60
59
|
/** Android only */
|
|
61
60
|
placeholders?: Placeholders;
|
|
@@ -66,6 +65,7 @@ export interface NativeProps {
|
|
|
66
65
|
event: NativeSyntheticEvent<{ focusedField: FieldName | null }>
|
|
67
66
|
): void;
|
|
68
67
|
onFormComplete(event: NativeSyntheticEvent<Details>): void;
|
|
68
|
+
disabled?: boolean;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export interface Methods {
|
|
@@ -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 = '~> 23.
|
|
5
|
+
stripe_version = '~> 23.8.0'
|
|
6
6
|
|
|
7
7
|
Pod::Spec.new do |s|
|
|
8
8
|
s.name = 'stripe-react-native'
|