@stripe/stripe-js 10.0.0-rc.2 → 10.0.0-rc.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.
- 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/elements/base.d.mts +0 -3
- package/dist/stripe-js/elements/base.d.ts +0 -3
- package/dist/stripe-js/elements/index.d.mts +0 -1
- package/dist/stripe-js/elements/index.d.ts +0 -1
- package/dist/stripe-js/elements-group.d.mts +0 -25
- package/dist/stripe-js/elements-group.d.ts +0 -25
- package/dist/stripe-js/payment-intents.d.mts +1 -1
- package/dist/stripe-js/payment-intents.d.ts +1 -1
- package/dist/stripe-js/payment-request.d.mts +1 -4
- package/dist/stripe-js/payment-request.d.ts +1 -4
- package/dist/stripe-js/setup-intents.d.mts +1 -1
- package/dist/stripe-js/setup-intents.d.ts +1 -1
- package/package.json +1 -1
- package/dist/stripe-js/elements/payment-request-button.d.mts +0 -151
- package/dist/stripe-js/elements/payment-request-button.d.ts +0 -151
package/dist/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
107
107
|
|
|
108
108
|
stripe._registerWrapper({
|
|
109
109
|
name: 'stripe-js',
|
|
110
|
-
version: "10.0.0-rc.
|
|
110
|
+
version: "10.0.0-rc.3",
|
|
111
111
|
startTime: startTime
|
|
112
112
|
});
|
|
113
113
|
};
|
|
@@ -234,7 +234,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
234
234
|
var expectedVersion = RELEASE_TRAIN;
|
|
235
235
|
|
|
236
236
|
if (isTestKey && version !== expectedVersion) {
|
|
237
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
237
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.3", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/index.mjs
CHANGED
|
@@ -103,7 +103,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
103
103
|
|
|
104
104
|
stripe._registerWrapper({
|
|
105
105
|
name: 'stripe-js',
|
|
106
|
-
version: "10.0.0-rc.
|
|
106
|
+
version: "10.0.0-rc.3",
|
|
107
107
|
startTime: startTime
|
|
108
108
|
});
|
|
109
109
|
};
|
|
@@ -230,7 +230,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
230
230
|
var expectedVersion = RELEASE_TRAIN;
|
|
231
231
|
|
|
232
232
|
if (isTestKey && version !== expectedVersion) {
|
|
233
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
233
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.3", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.js
CHANGED
|
@@ -107,7 +107,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
107
107
|
|
|
108
108
|
stripe._registerWrapper({
|
|
109
109
|
name: 'stripe-js',
|
|
110
|
-
version: "10.0.0-rc.
|
|
110
|
+
version: "10.0.0-rc.3",
|
|
111
111
|
startTime: startTime
|
|
112
112
|
});
|
|
113
113
|
};
|
|
@@ -234,7 +234,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
234
234
|
var expectedVersion = RELEASE_TRAIN;
|
|
235
235
|
|
|
236
236
|
if (isTestKey && version !== expectedVersion) {
|
|
237
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
237
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.3", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.mjs
CHANGED
|
@@ -103,7 +103,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
103
103
|
|
|
104
104
|
stripe._registerWrapper({
|
|
105
105
|
name: 'stripe-js',
|
|
106
|
-
version: "10.0.0-rc.
|
|
106
|
+
version: "10.0.0-rc.3",
|
|
107
107
|
startTime: startTime
|
|
108
108
|
});
|
|
109
109
|
};
|
|
@@ -230,7 +230,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
230
230
|
var expectedVersion = RELEASE_TRAIN;
|
|
231
231
|
|
|
232
232
|
if (isTestKey && version !== expectedVersion) {
|
|
233
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
233
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.3", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
var stripe = maybeStripe.apply(undefined, args);
|
|
@@ -82,9 +82,6 @@ export interface StripeElementStyleVariant extends StripeElementCSSProperties {
|
|
|
82
82
|
|
|
83
83
|
':-webkit-autofill'?: StripeElementCSSProperties;
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* Available for all elements except the `paymentRequestButton` element
|
|
87
|
-
*/
|
|
88
85
|
':disabled'?: StripeElementCSSProperties;
|
|
89
86
|
|
|
90
87
|
/**
|
|
@@ -82,9 +82,6 @@ export interface StripeElementStyleVariant extends StripeElementCSSProperties {
|
|
|
82
82
|
|
|
83
83
|
':-webkit-autofill'?: StripeElementCSSProperties;
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* Available for all elements except the `paymentRequestButton` element
|
|
87
|
-
*/
|
|
88
85
|
':disabled'?: StripeElementCSSProperties;
|
|
89
86
|
|
|
90
87
|
/**
|
|
@@ -13,7 +13,6 @@ export * from './express-checkout';
|
|
|
13
13
|
export * from './iban';
|
|
14
14
|
export * from './link-authentication';
|
|
15
15
|
export * from './link-signup';
|
|
16
|
-
export * from './payment-request-button';
|
|
17
16
|
export * from './payment';
|
|
18
17
|
export * from './shipping-address';
|
|
19
18
|
export * from './issuing';
|
|
@@ -13,7 +13,6 @@ export * from './express-checkout';
|
|
|
13
13
|
export * from './iban';
|
|
14
14
|
export * from './link-authentication';
|
|
15
15
|
export * from './link-signup';
|
|
16
|
-
export * from './payment-request-button';
|
|
17
16
|
export * from './payment';
|
|
18
17
|
export * from './shipping-address';
|
|
19
18
|
export * from './issuing';
|
|
@@ -5,8 +5,6 @@ import {
|
|
|
5
5
|
StripeCurrencySelectorElementOptions,
|
|
6
6
|
StripeShippingAddressElement,
|
|
7
7
|
StripeShippingAddressElementOptions,
|
|
8
|
-
StripePaymentRequestButtonElement,
|
|
9
|
-
StripePaymentRequestButtonElementOptions,
|
|
10
8
|
StripePaymentElement,
|
|
11
9
|
StripePaymentElementOptions,
|
|
12
10
|
StripeLinkAuthenticationElement,
|
|
@@ -325,27 +323,6 @@ export interface StripeElements {
|
|
|
325
323
|
*/
|
|
326
324
|
getElement(elementType: 'payment'): StripePaymentElement | null;
|
|
327
325
|
|
|
328
|
-
/////////////////////////////
|
|
329
|
-
/// paymentRequestButton
|
|
330
|
-
/////////////////////////////
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Creates a `PaymentRequestButtonElement`.
|
|
334
|
-
*
|
|
335
|
-
* @docs https://stripe.com/docs/stripe-js/elements/payment-request-button
|
|
336
|
-
*/
|
|
337
|
-
create(
|
|
338
|
-
elementType: 'paymentRequestButton',
|
|
339
|
-
options: StripePaymentRequestButtonElementOptions
|
|
340
|
-
): StripePaymentRequestButtonElement;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Looks up a previously created `Element` by its type.
|
|
344
|
-
*/
|
|
345
|
-
getElement(
|
|
346
|
-
elementType: 'paymentRequestButton'
|
|
347
|
-
): StripePaymentRequestButtonElement | null;
|
|
348
|
-
|
|
349
326
|
/////////////////////////////
|
|
350
327
|
/// shippingAddress
|
|
351
328
|
/////////////////////////////
|
|
@@ -511,7 +488,6 @@ export type StripeElementType =
|
|
|
511
488
|
| 'payment'
|
|
512
489
|
| 'paymentForm'
|
|
513
490
|
| 'paymentMethodMessaging'
|
|
514
|
-
| 'paymentRequestButton'
|
|
515
491
|
| 'linkAuthentication'
|
|
516
492
|
| 'linkSignup'
|
|
517
493
|
| 'shippingAddress'
|
|
@@ -539,7 +515,6 @@ export type StripeElement =
|
|
|
539
515
|
| StripePaymentElement
|
|
540
516
|
| StripeCheckoutForm
|
|
541
517
|
| StripePaymentMethodMessagingElement
|
|
542
|
-
| StripePaymentRequestButtonElement
|
|
543
518
|
| StripeIssuingCardNumberDisplayElement
|
|
544
519
|
| StripeIssuingCardCvcDisplayElement
|
|
545
520
|
| StripeIssuingCardExpiryDisplayElement
|
|
@@ -5,8 +5,6 @@ import {
|
|
|
5
5
|
StripeCurrencySelectorElementOptions,
|
|
6
6
|
StripeShippingAddressElement,
|
|
7
7
|
StripeShippingAddressElementOptions,
|
|
8
|
-
StripePaymentRequestButtonElement,
|
|
9
|
-
StripePaymentRequestButtonElementOptions,
|
|
10
8
|
StripePaymentElement,
|
|
11
9
|
StripePaymentElementOptions,
|
|
12
10
|
StripeLinkAuthenticationElement,
|
|
@@ -325,27 +323,6 @@ export interface StripeElements {
|
|
|
325
323
|
*/
|
|
326
324
|
getElement(elementType: 'payment'): StripePaymentElement | null;
|
|
327
325
|
|
|
328
|
-
/////////////////////////////
|
|
329
|
-
/// paymentRequestButton
|
|
330
|
-
/////////////////////////////
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Creates a `PaymentRequestButtonElement`.
|
|
334
|
-
*
|
|
335
|
-
* @docs https://stripe.com/docs/stripe-js/elements/payment-request-button
|
|
336
|
-
*/
|
|
337
|
-
create(
|
|
338
|
-
elementType: 'paymentRequestButton',
|
|
339
|
-
options: StripePaymentRequestButtonElementOptions
|
|
340
|
-
): StripePaymentRequestButtonElement;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Looks up a previously created `Element` by its type.
|
|
344
|
-
*/
|
|
345
|
-
getElement(
|
|
346
|
-
elementType: 'paymentRequestButton'
|
|
347
|
-
): StripePaymentRequestButtonElement | null;
|
|
348
|
-
|
|
349
326
|
/////////////////////////////
|
|
350
327
|
/// shippingAddress
|
|
351
328
|
/////////////////////////////
|
|
@@ -511,7 +488,6 @@ export type StripeElementType =
|
|
|
511
488
|
| 'payment'
|
|
512
489
|
| 'paymentForm'
|
|
513
490
|
| 'paymentMethodMessaging'
|
|
514
|
-
| 'paymentRequestButton'
|
|
515
491
|
| 'linkAuthentication'
|
|
516
492
|
| 'linkSignup'
|
|
517
493
|
| 'shippingAddress'
|
|
@@ -539,7 +515,6 @@ export type StripeElement =
|
|
|
539
515
|
| StripePaymentElement
|
|
540
516
|
| StripeCheckoutForm
|
|
541
517
|
| StripePaymentMethodMessagingElement
|
|
542
|
-
| StripePaymentRequestButtonElement
|
|
543
518
|
| StripeIssuingCardNumberDisplayElement
|
|
544
519
|
| StripeIssuingCardCvcDisplayElement
|
|
545
520
|
| StripeIssuingCardExpiryDisplayElement
|
|
@@ -771,7 +771,7 @@ export interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
|
|
|
771
771
|
*/
|
|
772
772
|
export interface ConfirmCardPaymentOptions {
|
|
773
773
|
/**
|
|
774
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
774
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
775
775
|
* Default is `true`.
|
|
776
776
|
*/
|
|
777
777
|
handleActions?: boolean;
|
|
@@ -771,7 +771,7 @@ export interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
|
|
|
771
771
|
*/
|
|
772
772
|
export interface ConfirmCardPaymentOptions {
|
|
773
773
|
/**
|
|
774
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
774
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
775
775
|
* Default is `true`.
|
|
776
776
|
*/
|
|
777
777
|
handleActions?: boolean;
|
|
@@ -10,7 +10,6 @@ export interface PaymentRequest {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Shows the browser’s payment interface.
|
|
13
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
14
13
|
* This method must be called as the result of a user interaction (for example, in a click handler).
|
|
15
14
|
*/
|
|
16
15
|
show(): void;
|
|
@@ -22,7 +21,6 @@ export interface PaymentRequest {
|
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* `true` if the browser’s payment interface is showing.
|
|
25
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
26
24
|
*/
|
|
27
25
|
isShowing: () => boolean;
|
|
28
26
|
|
|
@@ -30,8 +28,7 @@ export interface PaymentRequest {
|
|
|
30
28
|
* `PaymentRequest` instances can be updated with an options object.
|
|
31
29
|
*
|
|
32
30
|
* `paymentRequest.update` can only be called when the browser payment interface is not showing.
|
|
33
|
-
*
|
|
34
|
-
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your click event handler.
|
|
31
|
+
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your user-interaction handler immediately before calling `paymentRequest.show`.
|
|
35
32
|
*/
|
|
36
33
|
update(options: PaymentRequestUpdateOptions): void;
|
|
37
34
|
|
|
@@ -10,7 +10,6 @@ export interface PaymentRequest {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Shows the browser’s payment interface.
|
|
13
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
14
13
|
* This method must be called as the result of a user interaction (for example, in a click handler).
|
|
15
14
|
*/
|
|
16
15
|
show(): void;
|
|
@@ -22,7 +21,6 @@ export interface PaymentRequest {
|
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* `true` if the browser’s payment interface is showing.
|
|
25
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
26
24
|
*/
|
|
27
25
|
isShowing: () => boolean;
|
|
28
26
|
|
|
@@ -30,8 +28,7 @@ export interface PaymentRequest {
|
|
|
30
28
|
* `PaymentRequest` instances can be updated with an options object.
|
|
31
29
|
*
|
|
32
30
|
* `paymentRequest.update` can only be called when the browser payment interface is not showing.
|
|
33
|
-
*
|
|
34
|
-
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your click event handler.
|
|
31
|
+
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your user-interaction handler immediately before calling `paymentRequest.show`.
|
|
35
32
|
*/
|
|
36
33
|
update(options: PaymentRequestUpdateOptions): void;
|
|
37
34
|
|
|
@@ -95,7 +95,7 @@ export interface ConfirmCardSetupData extends SetupIntentConfirmParams {
|
|
|
95
95
|
*/
|
|
96
96
|
export interface ConfirmCardSetupOptions {
|
|
97
97
|
/*
|
|
98
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
98
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
99
99
|
* Default is `true`.
|
|
100
100
|
*/
|
|
101
101
|
handleActions?: boolean;
|
|
@@ -95,7 +95,7 @@ export interface ConfirmCardSetupData extends SetupIntentConfirmParams {
|
|
|
95
95
|
*/
|
|
96
96
|
export interface ConfirmCardSetupOptions {
|
|
97
97
|
/*
|
|
98
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
98
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
99
99
|
* Default is `true`.
|
|
100
100
|
*/
|
|
101
101
|
handleActions?: boolean;
|
package/package.json
CHANGED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase, StripeElementClasses} from './base';
|
|
2
|
-
import {PaymentRequest} from '../payment-request';
|
|
3
|
-
import {Omit} from '../../utils';
|
|
4
|
-
|
|
5
|
-
export type StripePaymentRequestButtonElement = StripeElementBase & {
|
|
6
|
-
/**
|
|
7
|
-
* Triggered when the payment request button is clicked.
|
|
8
|
-
*/
|
|
9
|
-
on(
|
|
10
|
-
eventType: 'click',
|
|
11
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
12
|
-
): StripePaymentRequestButtonElement;
|
|
13
|
-
once(
|
|
14
|
-
eventType: 'click',
|
|
15
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
16
|
-
): StripePaymentRequestButtonElement;
|
|
17
|
-
off(
|
|
18
|
-
eventType: 'click',
|
|
19
|
-
handler?: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
20
|
-
): StripePaymentRequestButtonElement;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
24
|
-
*/
|
|
25
|
-
on(
|
|
26
|
-
eventType: 'ready',
|
|
27
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
28
|
-
): StripePaymentRequestButtonElement;
|
|
29
|
-
once(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
32
|
-
): StripePaymentRequestButtonElement;
|
|
33
|
-
off(
|
|
34
|
-
eventType: 'ready',
|
|
35
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
36
|
-
): StripePaymentRequestButtonElement;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Triggered when the element gains focus.
|
|
40
|
-
*/
|
|
41
|
-
on(
|
|
42
|
-
eventType: 'focus',
|
|
43
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
44
|
-
): StripePaymentRequestButtonElement;
|
|
45
|
-
once(
|
|
46
|
-
eventType: 'focus',
|
|
47
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
48
|
-
): StripePaymentRequestButtonElement;
|
|
49
|
-
off(
|
|
50
|
-
eventType: 'focus',
|
|
51
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
52
|
-
): StripePaymentRequestButtonElement;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Triggered when the element loses focus.
|
|
56
|
-
*/
|
|
57
|
-
on(
|
|
58
|
-
eventType: 'blur',
|
|
59
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
60
|
-
): StripePaymentRequestButtonElement;
|
|
61
|
-
once(
|
|
62
|
-
eventType: 'blur',
|
|
63
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
64
|
-
): StripePaymentRequestButtonElement;
|
|
65
|
-
off(
|
|
66
|
-
eventType: 'blur',
|
|
67
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
68
|
-
): StripePaymentRequestButtonElement;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Updates the options the `PaymentRequestButtonElement` was initialized with.
|
|
72
|
-
* Updates are merged into the existing configuration.
|
|
73
|
-
*
|
|
74
|
-
* The styles of an `PaymentRequestButtonElement` can be dynamically changed using `element.update`.
|
|
75
|
-
* This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
|
|
76
|
-
*/
|
|
77
|
-
update(
|
|
78
|
-
options: Partial<
|
|
79
|
-
Omit<StripePaymentRequestButtonElementOptions, 'paymentRequest'>
|
|
80
|
-
>
|
|
81
|
-
): void;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export interface StripePaymentRequestButtonElementOptions {
|
|
85
|
-
classes?: StripeElementClasses;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* An object used to customize the appearance of the Payment Request Button.
|
|
89
|
-
* The object must have a single `paymentRequestButton` field, containing any of the following sub-fields
|
|
90
|
-
*/
|
|
91
|
-
style?: {
|
|
92
|
-
paymentRequestButton: {
|
|
93
|
-
/**
|
|
94
|
-
* Preferred button type to display. Available types, by wallet:
|
|
95
|
-
*
|
|
96
|
-
* Browser card: default, book, buy, or donate.
|
|
97
|
-
*
|
|
98
|
-
* Google Pay: default, buy, or donate.
|
|
99
|
-
*
|
|
100
|
-
* Apple Pay: default, book, buy, donate, check-out, subscribe, reload, add-money, top-up, order, rent, support, contribute, tip
|
|
101
|
-
*
|
|
102
|
-
* When a wallet does not support the provided value, default is used as a fallback.
|
|
103
|
-
*/
|
|
104
|
-
type?:
|
|
105
|
-
| 'default'
|
|
106
|
-
| 'book'
|
|
107
|
-
| 'buy'
|
|
108
|
-
| 'donate'
|
|
109
|
-
| 'check-out'
|
|
110
|
-
| 'subscribe'
|
|
111
|
-
| 'reload'
|
|
112
|
-
| 'add-money'
|
|
113
|
-
| 'top-up'
|
|
114
|
-
| 'order'
|
|
115
|
-
| 'rent'
|
|
116
|
-
| 'support'
|
|
117
|
-
| 'contribute'
|
|
118
|
-
| 'tip';
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* One of dark, light, or light-outline. The default is dark.
|
|
122
|
-
*/
|
|
123
|
-
theme?: 'dark' | 'light' | 'light-outline';
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The height of the Payment Request Button. Accepts px unit values.
|
|
127
|
-
*/
|
|
128
|
-
height?: string;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The gap between buttons when multile buttons are shown. Accepts px unit values.
|
|
132
|
-
*/
|
|
133
|
-
buttonSpacing?: string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A `PaymentRequest` object used to configure the element.
|
|
139
|
-
*/
|
|
140
|
-
paymentRequest: PaymentRequest;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Disable showing multiple buttons.
|
|
144
|
-
* Default is `false`.
|
|
145
|
-
*/
|
|
146
|
-
disableMultipleButtons?: boolean;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface StripePaymentRequestButtonElementClickEvent {
|
|
150
|
-
preventDefault: () => void;
|
|
151
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase, StripeElementClasses} from './base';
|
|
2
|
-
import {PaymentRequest} from '../payment-request';
|
|
3
|
-
import {Omit} from '../../utils';
|
|
4
|
-
|
|
5
|
-
export type StripePaymentRequestButtonElement = StripeElementBase & {
|
|
6
|
-
/**
|
|
7
|
-
* Triggered when the payment request button is clicked.
|
|
8
|
-
*/
|
|
9
|
-
on(
|
|
10
|
-
eventType: 'click',
|
|
11
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
12
|
-
): StripePaymentRequestButtonElement;
|
|
13
|
-
once(
|
|
14
|
-
eventType: 'click',
|
|
15
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
16
|
-
): StripePaymentRequestButtonElement;
|
|
17
|
-
off(
|
|
18
|
-
eventType: 'click',
|
|
19
|
-
handler?: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
20
|
-
): StripePaymentRequestButtonElement;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
24
|
-
*/
|
|
25
|
-
on(
|
|
26
|
-
eventType: 'ready',
|
|
27
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
28
|
-
): StripePaymentRequestButtonElement;
|
|
29
|
-
once(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
32
|
-
): StripePaymentRequestButtonElement;
|
|
33
|
-
off(
|
|
34
|
-
eventType: 'ready',
|
|
35
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
36
|
-
): StripePaymentRequestButtonElement;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Triggered when the element gains focus.
|
|
40
|
-
*/
|
|
41
|
-
on(
|
|
42
|
-
eventType: 'focus',
|
|
43
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
44
|
-
): StripePaymentRequestButtonElement;
|
|
45
|
-
once(
|
|
46
|
-
eventType: 'focus',
|
|
47
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
48
|
-
): StripePaymentRequestButtonElement;
|
|
49
|
-
off(
|
|
50
|
-
eventType: 'focus',
|
|
51
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
52
|
-
): StripePaymentRequestButtonElement;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Triggered when the element loses focus.
|
|
56
|
-
*/
|
|
57
|
-
on(
|
|
58
|
-
eventType: 'blur',
|
|
59
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
60
|
-
): StripePaymentRequestButtonElement;
|
|
61
|
-
once(
|
|
62
|
-
eventType: 'blur',
|
|
63
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
64
|
-
): StripePaymentRequestButtonElement;
|
|
65
|
-
off(
|
|
66
|
-
eventType: 'blur',
|
|
67
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
68
|
-
): StripePaymentRequestButtonElement;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Updates the options the `PaymentRequestButtonElement` was initialized with.
|
|
72
|
-
* Updates are merged into the existing configuration.
|
|
73
|
-
*
|
|
74
|
-
* The styles of an `PaymentRequestButtonElement` can be dynamically changed using `element.update`.
|
|
75
|
-
* This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
|
|
76
|
-
*/
|
|
77
|
-
update(
|
|
78
|
-
options: Partial<
|
|
79
|
-
Omit<StripePaymentRequestButtonElementOptions, 'paymentRequest'>
|
|
80
|
-
>
|
|
81
|
-
): void;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export interface StripePaymentRequestButtonElementOptions {
|
|
85
|
-
classes?: StripeElementClasses;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* An object used to customize the appearance of the Payment Request Button.
|
|
89
|
-
* The object must have a single `paymentRequestButton` field, containing any of the following sub-fields
|
|
90
|
-
*/
|
|
91
|
-
style?: {
|
|
92
|
-
paymentRequestButton: {
|
|
93
|
-
/**
|
|
94
|
-
* Preferred button type to display. Available types, by wallet:
|
|
95
|
-
*
|
|
96
|
-
* Browser card: default, book, buy, or donate.
|
|
97
|
-
*
|
|
98
|
-
* Google Pay: default, buy, or donate.
|
|
99
|
-
*
|
|
100
|
-
* Apple Pay: default, book, buy, donate, check-out, subscribe, reload, add-money, top-up, order, rent, support, contribute, tip
|
|
101
|
-
*
|
|
102
|
-
* When a wallet does not support the provided value, default is used as a fallback.
|
|
103
|
-
*/
|
|
104
|
-
type?:
|
|
105
|
-
| 'default'
|
|
106
|
-
| 'book'
|
|
107
|
-
| 'buy'
|
|
108
|
-
| 'donate'
|
|
109
|
-
| 'check-out'
|
|
110
|
-
| 'subscribe'
|
|
111
|
-
| 'reload'
|
|
112
|
-
| 'add-money'
|
|
113
|
-
| 'top-up'
|
|
114
|
-
| 'order'
|
|
115
|
-
| 'rent'
|
|
116
|
-
| 'support'
|
|
117
|
-
| 'contribute'
|
|
118
|
-
| 'tip';
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* One of dark, light, or light-outline. The default is dark.
|
|
122
|
-
*/
|
|
123
|
-
theme?: 'dark' | 'light' | 'light-outline';
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The height of the Payment Request Button. Accepts px unit values.
|
|
127
|
-
*/
|
|
128
|
-
height?: string;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The gap between buttons when multile buttons are shown. Accepts px unit values.
|
|
132
|
-
*/
|
|
133
|
-
buttonSpacing?: string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A `PaymentRequest` object used to configure the element.
|
|
139
|
-
*/
|
|
140
|
-
paymentRequest: PaymentRequest;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Disable showing multiple buttons.
|
|
144
|
-
* Default is `false`.
|
|
145
|
-
*/
|
|
146
|
-
disableMultipleButtons?: boolean;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface StripePaymentRequestButtonElementClickEvent {
|
|
150
|
-
preventDefault: () => void;
|
|
151
|
-
}
|