@stripe/stripe-js 9.0.1 → 9.2.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/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/pure.js +2 -2
- package/dist/pure.mjs +2 -2
- package/dist/stripe-js/checkout.d.mts +8 -0
- package/dist/stripe-js/checkout.d.ts +8 -0
- package/dist/stripe-js/elements/contact-details.d.mts +152 -0
- package/dist/stripe-js/elements/contact-details.d.ts +152 -0
- package/dist/stripe-js/elements/index.d.mts +1 -0
- package/dist/stripe-js/elements/index.d.ts +1 -0
- package/dist/stripe-js/elements-group.d.mts +23 -2
- package/dist/stripe-js/elements-group.d.ts +23 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.0
|
|
74
|
+
version: "9.2.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.0
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.0
|
|
70
|
+
version: "9.2.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.0
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.0
|
|
74
|
+
version: "9.2.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.0
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.0
|
|
70
|
+
version: "9.2.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.0
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
PaymentWalletsOption,
|
|
22
22
|
StripeCheckoutFormConfirmEvent,
|
|
23
23
|
ExpressCheckoutPaymentMethodsOption,
|
|
24
|
+
StripeContactDetailsElement,
|
|
24
25
|
} from './elements';
|
|
25
26
|
|
|
26
27
|
type SavedPaymentMethodOption = {
|
|
@@ -148,6 +149,7 @@ export type StripeCheckoutSavedPaymentMethod = {
|
|
|
148
149
|
export type StripeCheckoutTaxAmount = StripeCheckoutAmount & {
|
|
149
150
|
inclusive: boolean;
|
|
150
151
|
displayName: string;
|
|
152
|
+
percentage?: number;
|
|
151
153
|
};
|
|
152
154
|
|
|
153
155
|
export type StripeCheckoutLineItem = {
|
|
@@ -159,6 +161,7 @@ export type StripeCheckoutLineItem = {
|
|
|
159
161
|
taxExclusive: StripeCheckoutAmount;
|
|
160
162
|
taxInclusive: StripeCheckoutAmount;
|
|
161
163
|
unitAmount: StripeCheckoutAmount;
|
|
164
|
+
unitAmountDecimal: StripeCheckoutAmount | null;
|
|
162
165
|
description: string | null;
|
|
163
166
|
quantity: number;
|
|
164
167
|
discountAmounts: Array<StripeCheckoutDiscountAmount> | null;
|
|
@@ -382,6 +385,8 @@ export type StripeCheckoutAddressElementOptions = {
|
|
|
382
385
|
};
|
|
383
386
|
};
|
|
384
387
|
|
|
388
|
+
export type StripeCheckoutContactDetailsElementOptions = Record<string, never>;
|
|
389
|
+
|
|
385
390
|
/**
|
|
386
391
|
* Wallet button theme options for CheckoutForm.
|
|
387
392
|
*/
|
|
@@ -700,6 +705,9 @@ export interface StripeCheckoutElementsSdk {
|
|
|
700
705
|
createCurrencySelectorElement(): StripeCurrencySelectorElement;
|
|
701
706
|
/* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
|
|
702
707
|
createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
|
|
708
|
+
createContactDetailsElement(
|
|
709
|
+
options?: StripeCheckoutContactDetailsElementOptions
|
|
710
|
+
): StripeContactDetailsElement;
|
|
703
711
|
}
|
|
704
712
|
|
|
705
713
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
PaymentWalletsOption,
|
|
22
22
|
StripeCheckoutFormConfirmEvent,
|
|
23
23
|
ExpressCheckoutPaymentMethodsOption,
|
|
24
|
+
StripeContactDetailsElement,
|
|
24
25
|
} from './elements';
|
|
25
26
|
|
|
26
27
|
type SavedPaymentMethodOption = {
|
|
@@ -148,6 +149,7 @@ export type StripeCheckoutSavedPaymentMethod = {
|
|
|
148
149
|
export type StripeCheckoutTaxAmount = StripeCheckoutAmount & {
|
|
149
150
|
inclusive: boolean;
|
|
150
151
|
displayName: string;
|
|
152
|
+
percentage?: number;
|
|
151
153
|
};
|
|
152
154
|
|
|
153
155
|
export type StripeCheckoutLineItem = {
|
|
@@ -159,6 +161,7 @@ export type StripeCheckoutLineItem = {
|
|
|
159
161
|
taxExclusive: StripeCheckoutAmount;
|
|
160
162
|
taxInclusive: StripeCheckoutAmount;
|
|
161
163
|
unitAmount: StripeCheckoutAmount;
|
|
164
|
+
unitAmountDecimal: StripeCheckoutAmount | null;
|
|
162
165
|
description: string | null;
|
|
163
166
|
quantity: number;
|
|
164
167
|
discountAmounts: Array<StripeCheckoutDiscountAmount> | null;
|
|
@@ -382,6 +385,8 @@ export type StripeCheckoutAddressElementOptions = {
|
|
|
382
385
|
};
|
|
383
386
|
};
|
|
384
387
|
|
|
388
|
+
export type StripeCheckoutContactDetailsElementOptions = Record<string, never>;
|
|
389
|
+
|
|
385
390
|
/**
|
|
386
391
|
* Wallet button theme options for CheckoutForm.
|
|
387
392
|
*/
|
|
@@ -700,6 +705,9 @@ export interface StripeCheckoutElementsSdk {
|
|
|
700
705
|
createCurrencySelectorElement(): StripeCurrencySelectorElement;
|
|
701
706
|
/* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
|
|
702
707
|
createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
|
|
708
|
+
createContactDetailsElement(
|
|
709
|
+
options?: StripeCheckoutContactDetailsElementOptions
|
|
710
|
+
): StripeContactDetailsElement;
|
|
703
711
|
}
|
|
704
712
|
|
|
705
713
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {StripeElementBase} from './base';
|
|
2
|
+
import {StripeError} from '../stripe';
|
|
3
|
+
|
|
4
|
+
export type StripeContactDetailsElement = StripeElementBase & {
|
|
5
|
+
/**
|
|
6
|
+
* The change event is triggered when the `Element`'s value changes.
|
|
7
|
+
*/
|
|
8
|
+
on(
|
|
9
|
+
eventType: 'change',
|
|
10
|
+
handler: (event: StripeContactDetailsElementChangeEvent) => any
|
|
11
|
+
): StripeContactDetailsElement;
|
|
12
|
+
once(
|
|
13
|
+
eventType: 'change',
|
|
14
|
+
handler: (event: StripeContactDetailsElementChangeEvent) => any
|
|
15
|
+
): StripeContactDetailsElement;
|
|
16
|
+
off(
|
|
17
|
+
eventType: 'change',
|
|
18
|
+
handler?: (event: StripeContactDetailsElementChangeEvent) => any
|
|
19
|
+
): StripeContactDetailsElement;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
23
|
+
*/
|
|
24
|
+
on(
|
|
25
|
+
eventType: 'ready',
|
|
26
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
27
|
+
): StripeContactDetailsElement;
|
|
28
|
+
once(
|
|
29
|
+
eventType: 'ready',
|
|
30
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
31
|
+
): StripeContactDetailsElement;
|
|
32
|
+
off(
|
|
33
|
+
eventType: 'ready',
|
|
34
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
35
|
+
): StripeContactDetailsElement;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Triggered when the element gains focus.
|
|
39
|
+
*/
|
|
40
|
+
on(
|
|
41
|
+
eventType: 'focus',
|
|
42
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
43
|
+
): StripeContactDetailsElement;
|
|
44
|
+
once(
|
|
45
|
+
eventType: 'focus',
|
|
46
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
47
|
+
): StripeContactDetailsElement;
|
|
48
|
+
off(
|
|
49
|
+
eventType: 'focus',
|
|
50
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
51
|
+
): StripeContactDetailsElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when the element loses focus.
|
|
55
|
+
*/
|
|
56
|
+
on(
|
|
57
|
+
eventType: 'blur',
|
|
58
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
59
|
+
): StripeContactDetailsElement;
|
|
60
|
+
once(
|
|
61
|
+
eventType: 'blur',
|
|
62
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
63
|
+
): StripeContactDetailsElement;
|
|
64
|
+
off(
|
|
65
|
+
eventType: 'blur',
|
|
66
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
67
|
+
): StripeContactDetailsElement;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Triggered when the escape key is pressed within the element.
|
|
71
|
+
*/
|
|
72
|
+
on(
|
|
73
|
+
eventType: 'escape',
|
|
74
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
75
|
+
): StripeContactDetailsElement;
|
|
76
|
+
once(
|
|
77
|
+
eventType: 'escape',
|
|
78
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
79
|
+
): StripeContactDetailsElement;
|
|
80
|
+
off(
|
|
81
|
+
eventType: 'escape',
|
|
82
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
83
|
+
): StripeContactDetailsElement;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Triggered when the element fails to load.
|
|
87
|
+
*/
|
|
88
|
+
on(
|
|
89
|
+
eventType: 'loaderror',
|
|
90
|
+
handler: (event: {elementType: 'contactDetails'; error: StripeError}) => any
|
|
91
|
+
): StripeContactDetailsElement;
|
|
92
|
+
once(
|
|
93
|
+
eventType: 'loaderror',
|
|
94
|
+
handler: (event: {elementType: 'contactDetails'; error: StripeError}) => any
|
|
95
|
+
): StripeContactDetailsElement;
|
|
96
|
+
off(
|
|
97
|
+
eventType: 'loaderror',
|
|
98
|
+
handler?: (event: {
|
|
99
|
+
elementType: 'contactDetails';
|
|
100
|
+
error: StripeError;
|
|
101
|
+
}) => any
|
|
102
|
+
): StripeContactDetailsElement;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Triggered when the loader UI is mounted to the DOM and ready to be displayed.
|
|
106
|
+
*/
|
|
107
|
+
on(
|
|
108
|
+
eventType: 'loaderstart',
|
|
109
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
110
|
+
): StripeContactDetailsElement;
|
|
111
|
+
once(
|
|
112
|
+
eventType: 'loaderstart',
|
|
113
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
114
|
+
): StripeContactDetailsElement;
|
|
115
|
+
off(
|
|
116
|
+
eventType: 'loaderstart',
|
|
117
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
118
|
+
): StripeContactDetailsElement;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export interface StripeContactDetailsElementOptions {
|
|
122
|
+
/**
|
|
123
|
+
* Default values for ContactDetailsElement fields
|
|
124
|
+
*/
|
|
125
|
+
defaultValues?: {
|
|
126
|
+
email: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface StripeContactDetailsElementChangeEvent {
|
|
131
|
+
/**
|
|
132
|
+
* The type of element that emitted this event.
|
|
133
|
+
*/
|
|
134
|
+
elementType: 'contactDetails';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Whether or not the ContactDetails Element is currently empty.
|
|
138
|
+
*/
|
|
139
|
+
empty: boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Whether or not the ContactDetails Element is complete.
|
|
143
|
+
*/
|
|
144
|
+
complete: boolean;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An object containing the current email.
|
|
148
|
+
*/
|
|
149
|
+
value: {
|
|
150
|
+
email: string;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {StripeElementBase} from './base';
|
|
2
|
+
import {StripeError} from '../stripe';
|
|
3
|
+
|
|
4
|
+
export type StripeContactDetailsElement = StripeElementBase & {
|
|
5
|
+
/**
|
|
6
|
+
* The change event is triggered when the `Element`'s value changes.
|
|
7
|
+
*/
|
|
8
|
+
on(
|
|
9
|
+
eventType: 'change',
|
|
10
|
+
handler: (event: StripeContactDetailsElementChangeEvent) => any
|
|
11
|
+
): StripeContactDetailsElement;
|
|
12
|
+
once(
|
|
13
|
+
eventType: 'change',
|
|
14
|
+
handler: (event: StripeContactDetailsElementChangeEvent) => any
|
|
15
|
+
): StripeContactDetailsElement;
|
|
16
|
+
off(
|
|
17
|
+
eventType: 'change',
|
|
18
|
+
handler?: (event: StripeContactDetailsElementChangeEvent) => any
|
|
19
|
+
): StripeContactDetailsElement;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
23
|
+
*/
|
|
24
|
+
on(
|
|
25
|
+
eventType: 'ready',
|
|
26
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
27
|
+
): StripeContactDetailsElement;
|
|
28
|
+
once(
|
|
29
|
+
eventType: 'ready',
|
|
30
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
31
|
+
): StripeContactDetailsElement;
|
|
32
|
+
off(
|
|
33
|
+
eventType: 'ready',
|
|
34
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
35
|
+
): StripeContactDetailsElement;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Triggered when the element gains focus.
|
|
39
|
+
*/
|
|
40
|
+
on(
|
|
41
|
+
eventType: 'focus',
|
|
42
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
43
|
+
): StripeContactDetailsElement;
|
|
44
|
+
once(
|
|
45
|
+
eventType: 'focus',
|
|
46
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
47
|
+
): StripeContactDetailsElement;
|
|
48
|
+
off(
|
|
49
|
+
eventType: 'focus',
|
|
50
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
51
|
+
): StripeContactDetailsElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when the element loses focus.
|
|
55
|
+
*/
|
|
56
|
+
on(
|
|
57
|
+
eventType: 'blur',
|
|
58
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
59
|
+
): StripeContactDetailsElement;
|
|
60
|
+
once(
|
|
61
|
+
eventType: 'blur',
|
|
62
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
63
|
+
): StripeContactDetailsElement;
|
|
64
|
+
off(
|
|
65
|
+
eventType: 'blur',
|
|
66
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
67
|
+
): StripeContactDetailsElement;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Triggered when the escape key is pressed within the element.
|
|
71
|
+
*/
|
|
72
|
+
on(
|
|
73
|
+
eventType: 'escape',
|
|
74
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
75
|
+
): StripeContactDetailsElement;
|
|
76
|
+
once(
|
|
77
|
+
eventType: 'escape',
|
|
78
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
79
|
+
): StripeContactDetailsElement;
|
|
80
|
+
off(
|
|
81
|
+
eventType: 'escape',
|
|
82
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
83
|
+
): StripeContactDetailsElement;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Triggered when the element fails to load.
|
|
87
|
+
*/
|
|
88
|
+
on(
|
|
89
|
+
eventType: 'loaderror',
|
|
90
|
+
handler: (event: {elementType: 'contactDetails'; error: StripeError}) => any
|
|
91
|
+
): StripeContactDetailsElement;
|
|
92
|
+
once(
|
|
93
|
+
eventType: 'loaderror',
|
|
94
|
+
handler: (event: {elementType: 'contactDetails'; error: StripeError}) => any
|
|
95
|
+
): StripeContactDetailsElement;
|
|
96
|
+
off(
|
|
97
|
+
eventType: 'loaderror',
|
|
98
|
+
handler?: (event: {
|
|
99
|
+
elementType: 'contactDetails';
|
|
100
|
+
error: StripeError;
|
|
101
|
+
}) => any
|
|
102
|
+
): StripeContactDetailsElement;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Triggered when the loader UI is mounted to the DOM and ready to be displayed.
|
|
106
|
+
*/
|
|
107
|
+
on(
|
|
108
|
+
eventType: 'loaderstart',
|
|
109
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
110
|
+
): StripeContactDetailsElement;
|
|
111
|
+
once(
|
|
112
|
+
eventType: 'loaderstart',
|
|
113
|
+
handler: (event: {elementType: 'contactDetails'}) => any
|
|
114
|
+
): StripeContactDetailsElement;
|
|
115
|
+
off(
|
|
116
|
+
eventType: 'loaderstart',
|
|
117
|
+
handler?: (event: {elementType: 'contactDetails'}) => any
|
|
118
|
+
): StripeContactDetailsElement;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export interface StripeContactDetailsElementOptions {
|
|
122
|
+
/**
|
|
123
|
+
* Default values for ContactDetailsElement fields
|
|
124
|
+
*/
|
|
125
|
+
defaultValues?: {
|
|
126
|
+
email: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface StripeContactDetailsElementChangeEvent {
|
|
131
|
+
/**
|
|
132
|
+
* The type of element that emitted this event.
|
|
133
|
+
*/
|
|
134
|
+
elementType: 'contactDetails';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Whether or not the ContactDetails Element is currently empty.
|
|
138
|
+
*/
|
|
139
|
+
empty: boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Whether or not the ContactDetails Element is complete.
|
|
143
|
+
*/
|
|
144
|
+
complete: boolean;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An object containing the current email.
|
|
148
|
+
*/
|
|
149
|
+
value: {
|
|
150
|
+
email: string;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
StripePaymentElementOptions,
|
|
11
11
|
StripeLinkAuthenticationElement,
|
|
12
12
|
StripeLinkAuthenticationElementOptions,
|
|
13
|
+
StripeContactDetailsElement,
|
|
14
|
+
StripeContactDetailsElementOptions,
|
|
13
15
|
StripeIbanElement,
|
|
14
16
|
StripeIbanElementOptions,
|
|
15
17
|
StripeCardCvcElement,
|
|
@@ -240,6 +242,23 @@ export interface StripeElements {
|
|
|
240
242
|
elementType: 'linkAuthentication'
|
|
241
243
|
): StripeLinkAuthenticationElement | null;
|
|
242
244
|
|
|
245
|
+
/////////////////////////////
|
|
246
|
+
/// contactDetails
|
|
247
|
+
/////////////////////////////
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Creates a `ContactDetailsElement`.
|
|
251
|
+
*/
|
|
252
|
+
create(
|
|
253
|
+
elementType: 'contactDetails',
|
|
254
|
+
options?: StripeContactDetailsElementOptions
|
|
255
|
+
): StripeContactDetailsElement;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Looks up a previously created `Element` by its type.
|
|
259
|
+
*/
|
|
260
|
+
getElement(elementType: 'contactDetails'): StripeContactDetailsElement | null;
|
|
261
|
+
|
|
243
262
|
/////////////////////////////
|
|
244
263
|
/// expressCheckout
|
|
245
264
|
/////////////////////////////
|
|
@@ -409,6 +428,7 @@ export type StripeElementType =
|
|
|
409
428
|
| 'cardNumber'
|
|
410
429
|
| 'cardExpiry'
|
|
411
430
|
| 'cardCvc'
|
|
431
|
+
| 'contactDetails'
|
|
412
432
|
| 'currencySelector'
|
|
413
433
|
| 'expressCheckout'
|
|
414
434
|
| 'iban'
|
|
@@ -434,6 +454,7 @@ export type StripeElement =
|
|
|
434
454
|
| StripeCardExpiryElement
|
|
435
455
|
| StripeCardCvcElement
|
|
436
456
|
| StripeIbanElement
|
|
457
|
+
| StripeContactDetailsElement
|
|
437
458
|
| StripeCurrencySelectorElement
|
|
438
459
|
| StripeExpressCheckoutElement
|
|
439
460
|
| StripePaymentElement
|
|
@@ -685,7 +706,7 @@ interface BaseStripeElementsOptions {
|
|
|
685
706
|
|
|
686
707
|
/**
|
|
687
708
|
* Display skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.
|
|
688
|
-
* Supported for the `payment`, `shippingAddress`, and `
|
|
709
|
+
* Supported for the `payment`, `shippingAddress`, `linkAuthentication`, and `contactDetails` Elements.
|
|
689
710
|
* Default is `'auto'` (Stripe determines if a loader UI should be shown).
|
|
690
711
|
*/
|
|
691
712
|
loader?: 'auto' | 'always' | 'never';
|
|
@@ -695,7 +716,7 @@ interface BaseStripeElementsOptions {
|
|
|
695
716
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
696
717
|
*
|
|
697
718
|
* Display saved PaymentMethods and Customer information.
|
|
698
|
-
* Supported for the `payment`, `shippingAddress`, and `
|
|
719
|
+
* Supported for the `payment`, `shippingAddress`, `linkAuthentication`, and `contactDetails` Elements.
|
|
699
720
|
*/
|
|
700
721
|
customerOptions?: CustomerOptions;
|
|
701
722
|
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
StripePaymentElementOptions,
|
|
11
11
|
StripeLinkAuthenticationElement,
|
|
12
12
|
StripeLinkAuthenticationElementOptions,
|
|
13
|
+
StripeContactDetailsElement,
|
|
14
|
+
StripeContactDetailsElementOptions,
|
|
13
15
|
StripeIbanElement,
|
|
14
16
|
StripeIbanElementOptions,
|
|
15
17
|
StripeCardCvcElement,
|
|
@@ -240,6 +242,23 @@ export interface StripeElements {
|
|
|
240
242
|
elementType: 'linkAuthentication'
|
|
241
243
|
): StripeLinkAuthenticationElement | null;
|
|
242
244
|
|
|
245
|
+
/////////////////////////////
|
|
246
|
+
/// contactDetails
|
|
247
|
+
/////////////////////////////
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Creates a `ContactDetailsElement`.
|
|
251
|
+
*/
|
|
252
|
+
create(
|
|
253
|
+
elementType: 'contactDetails',
|
|
254
|
+
options?: StripeContactDetailsElementOptions
|
|
255
|
+
): StripeContactDetailsElement;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Looks up a previously created `Element` by its type.
|
|
259
|
+
*/
|
|
260
|
+
getElement(elementType: 'contactDetails'): StripeContactDetailsElement | null;
|
|
261
|
+
|
|
243
262
|
/////////////////////////////
|
|
244
263
|
/// expressCheckout
|
|
245
264
|
/////////////////////////////
|
|
@@ -409,6 +428,7 @@ export type StripeElementType =
|
|
|
409
428
|
| 'cardNumber'
|
|
410
429
|
| 'cardExpiry'
|
|
411
430
|
| 'cardCvc'
|
|
431
|
+
| 'contactDetails'
|
|
412
432
|
| 'currencySelector'
|
|
413
433
|
| 'expressCheckout'
|
|
414
434
|
| 'iban'
|
|
@@ -434,6 +454,7 @@ export type StripeElement =
|
|
|
434
454
|
| StripeCardExpiryElement
|
|
435
455
|
| StripeCardCvcElement
|
|
436
456
|
| StripeIbanElement
|
|
457
|
+
| StripeContactDetailsElement
|
|
437
458
|
| StripeCurrencySelectorElement
|
|
438
459
|
| StripeExpressCheckoutElement
|
|
439
460
|
| StripePaymentElement
|
|
@@ -685,7 +706,7 @@ interface BaseStripeElementsOptions {
|
|
|
685
706
|
|
|
686
707
|
/**
|
|
687
708
|
* Display skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.
|
|
688
|
-
* Supported for the `payment`, `shippingAddress`, and `
|
|
709
|
+
* Supported for the `payment`, `shippingAddress`, `linkAuthentication`, and `contactDetails` Elements.
|
|
689
710
|
* Default is `'auto'` (Stripe determines if a loader UI should be shown).
|
|
690
711
|
*/
|
|
691
712
|
loader?: 'auto' | 'always' | 'never';
|
|
@@ -695,7 +716,7 @@ interface BaseStripeElementsOptions {
|
|
|
695
716
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
696
717
|
*
|
|
697
718
|
* Display saved PaymentMethods and Customer information.
|
|
698
|
-
* Supported for the `payment`, `shippingAddress`, and `
|
|
719
|
+
* Supported for the `payment`, `shippingAddress`, `linkAuthentication`, and `contactDetails` Elements.
|
|
699
720
|
*/
|
|
700
721
|
customerOptions?: CustomerOptions;
|
|
701
722
|
|