@stripe/stripe-js 8.4.0 → 8.5.1

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 CHANGED
@@ -55,7 +55,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
55
55
 
56
56
  stripe._registerWrapper({
57
57
  name: 'stripe-js',
58
- version: "8.4.0",
58
+ version: "8.5.1",
59
59
  startTime: startTime
60
60
  });
61
61
  };
@@ -151,7 +151,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
151
151
  var expectedVersion = RELEASE_TRAIN;
152
152
 
153
153
  if (isTestKey && version !== expectedVersion) {
154
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
154
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.5.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
155
155
  }
156
156
 
157
157
  var stripe = maybeStripe.apply(undefined, args);
package/dist/index.mjs CHANGED
@@ -51,7 +51,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
51
51
 
52
52
  stripe._registerWrapper({
53
53
  name: 'stripe-js',
54
- version: "8.4.0",
54
+ version: "8.5.1",
55
55
  startTime: startTime
56
56
  });
57
57
  };
@@ -147,7 +147,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
147
147
  var expectedVersion = RELEASE_TRAIN;
148
148
 
149
149
  if (isTestKey && version !== expectedVersion) {
150
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
150
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.5.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
151
151
  }
152
152
 
153
153
  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: "8.4.0",
74
+ version: "8.5.1",
75
75
  startTime: startTime
76
76
  });
77
77
  };
@@ -167,7 +167,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
167
167
  var expectedVersion = RELEASE_TRAIN;
168
168
 
169
169
  if (isTestKey && version !== expectedVersion) {
170
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
170
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.5.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
171
171
  }
172
172
 
173
173
  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: "8.4.0",
70
+ version: "8.5.1",
71
71
  startTime: startTime
72
72
  });
73
73
  };
@@ -163,7 +163,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
163
163
  var expectedVersion = RELEASE_TRAIN;
164
164
 
165
165
  if (isTestKey && version !== expectedVersion) {
166
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
166
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.5.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
167
167
  }
168
168
 
169
169
  var stripe = maybeStripe.apply(undefined, args);
@@ -15,6 +15,7 @@ import {
15
15
  StripeExpressCheckoutElementConfirmEvent,
16
16
  StripeExpressCheckoutElementOptions,
17
17
  StripeExpressCheckoutElementReadyEvent,
18
+ StripePaymentFormElement,
18
19
  StripeTaxIdElement,
19
20
  StripeTaxIdElementOptions,
20
21
  PaymentWalletsOption,
@@ -613,17 +614,22 @@ export interface StripeCheckout {
613
614
  /* Elements methods */
614
615
  changeAppearance: (appearance: Appearance) => void;
615
616
  loadFonts: (fonts: Array<CssFontSource | CustomFontSource>) => void;
617
+
616
618
  getPaymentElement(): StripePaymentElement | null;
619
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
620
+ getPaymentFormElement(): StripePaymentFormElement | null;
617
621
  getBillingAddressElement(): StripeAddressElement | null;
618
622
  getShippingAddressElement(): StripeAddressElement | null;
619
623
  getExpressCheckoutElement(): StripeCheckoutExpressCheckoutElement | null;
620
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
621
624
  getCurrencySelectorElement(): StripeCurrencySelectorElement | null;
622
625
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
623
626
  getTaxIdElement(): StripeTaxIdElement | null;
627
+
624
628
  createPaymentElement(
625
629
  options?: StripeCheckoutPaymentElementOptions
626
630
  ): StripePaymentElement;
631
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
632
+ createPaymentFormElement(): StripePaymentFormElement;
627
633
  createBillingAddressElement(
628
634
  options?: StripeCheckoutAddressElementOptions
629
635
  ): StripeAddressElement;
@@ -633,7 +639,6 @@ export interface StripeCheckout {
633
639
  createExpressCheckoutElement(
634
640
  options?: StripeCheckoutExpressCheckoutElementOptions
635
641
  ): StripeCheckoutExpressCheckoutElement;
636
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
637
642
  createCurrencySelectorElement(): StripeCurrencySelectorElement;
638
643
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
639
644
  createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
@@ -15,6 +15,7 @@ import {
15
15
  StripeExpressCheckoutElementConfirmEvent,
16
16
  StripeExpressCheckoutElementOptions,
17
17
  StripeExpressCheckoutElementReadyEvent,
18
+ StripePaymentFormElement,
18
19
  StripeTaxIdElement,
19
20
  StripeTaxIdElementOptions,
20
21
  PaymentWalletsOption,
@@ -613,17 +614,22 @@ export interface StripeCheckout {
613
614
  /* Elements methods */
614
615
  changeAppearance: (appearance: Appearance) => void;
615
616
  loadFonts: (fonts: Array<CssFontSource | CustomFontSource>) => void;
617
+
616
618
  getPaymentElement(): StripePaymentElement | null;
619
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
620
+ getPaymentFormElement(): StripePaymentFormElement | null;
617
621
  getBillingAddressElement(): StripeAddressElement | null;
618
622
  getShippingAddressElement(): StripeAddressElement | null;
619
623
  getExpressCheckoutElement(): StripeCheckoutExpressCheckoutElement | null;
620
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
621
624
  getCurrencySelectorElement(): StripeCurrencySelectorElement | null;
622
625
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
623
626
  getTaxIdElement(): StripeTaxIdElement | null;
627
+
624
628
  createPaymentElement(
625
629
  options?: StripeCheckoutPaymentElementOptions
626
630
  ): StripePaymentElement;
631
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
632
+ createPaymentFormElement(): StripePaymentFormElement;
627
633
  createBillingAddressElement(
628
634
  options?: StripeCheckoutAddressElementOptions
629
635
  ): StripeAddressElement;
@@ -633,7 +639,6 @@ export interface StripeCheckout {
633
639
  createExpressCheckoutElement(
634
640
  options?: StripeCheckoutExpressCheckoutElementOptions
635
641
  ): StripeCheckoutExpressCheckoutElement;
636
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
637
642
  createCurrencySelectorElement(): StripeCurrencySelectorElement;
638
643
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
639
644
  createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
@@ -1,4 +1,5 @@
1
1
  export * from './address';
2
+ export * from './payment-form';
2
3
  export * from './payment-method-messaging';
3
4
  export * from './au-bank-account';
4
5
  export * from './base';
@@ -15,3 +16,4 @@ export * from './payment';
15
16
  export * from './shipping-address';
16
17
  export * from './issuing';
17
18
  export * from './tax-id';
19
+ export * from './payment-form';
@@ -1,4 +1,5 @@
1
1
  export * from './address';
2
+ export * from './payment-form';
2
3
  export * from './payment-method-messaging';
3
4
  export * from './au-bank-account';
4
5
  export * from './base';
@@ -15,3 +16,4 @@ export * from './payment';
15
16
  export * from './shipping-address';
16
17
  export * from './issuing';
17
18
  export * from './tax-id';
19
+ export * from './payment-form';
@@ -0,0 +1,36 @@
1
+ import {StripeError} from '../stripe';
2
+ import {StripeElementBase} from './base';
3
+
4
+ export type StripePaymentFormElement = StripeElementBase & {
5
+ /**
6
+ * Triggered when the element is fully rendered and can accept `element.focus` calls.
7
+ */
8
+ on(
9
+ eventType: 'ready',
10
+ handler: (event: {elementType: 'paymentForm'}) => any
11
+ ): StripePaymentFormElement;
12
+ once(
13
+ eventType: 'ready',
14
+ handler: (event: {elementType: 'paymentForm'}) => any
15
+ ): StripePaymentFormElement;
16
+ off(
17
+ eventType: 'ready',
18
+ handler?: (event: {elementType: 'paymentForm'}) => any
19
+ ): StripePaymentFormElement;
20
+
21
+ /**
22
+ * Triggered when the element fails to load.
23
+ */
24
+ on(
25
+ eventType: 'loaderror',
26
+ handler: (event: {elementType: 'paymentForm'; error: StripeError}) => any
27
+ ): StripePaymentFormElement;
28
+ once(
29
+ eventType: 'loaderror',
30
+ handler: (event: {elementType: 'paymentForm'; error: StripeError}) => any
31
+ ): StripePaymentFormElement;
32
+ off(
33
+ eventType: 'loaderror',
34
+ handler?: (event: {elementType: 'paymentForm'; error: StripeError}) => any
35
+ ): StripePaymentFormElement;
36
+ };
@@ -0,0 +1,36 @@
1
+ import {StripeError} from '../stripe';
2
+ import {StripeElementBase} from './base';
3
+
4
+ export type StripePaymentFormElement = StripeElementBase & {
5
+ /**
6
+ * Triggered when the element is fully rendered and can accept `element.focus` calls.
7
+ */
8
+ on(
9
+ eventType: 'ready',
10
+ handler: (event: {elementType: 'paymentForm'}) => any
11
+ ): StripePaymentFormElement;
12
+ once(
13
+ eventType: 'ready',
14
+ handler: (event: {elementType: 'paymentForm'}) => any
15
+ ): StripePaymentFormElement;
16
+ off(
17
+ eventType: 'ready',
18
+ handler?: (event: {elementType: 'paymentForm'}) => any
19
+ ): StripePaymentFormElement;
20
+
21
+ /**
22
+ * Triggered when the element fails to load.
23
+ */
24
+ on(
25
+ eventType: 'loaderror',
26
+ handler: (event: {elementType: 'paymentForm'; error: StripeError}) => any
27
+ ): StripePaymentFormElement;
28
+ once(
29
+ eventType: 'loaderror',
30
+ handler: (event: {elementType: 'paymentForm'; error: StripeError}) => any
31
+ ): StripePaymentFormElement;
32
+ off(
33
+ eventType: 'loaderror',
34
+ handler?: (event: {elementType: 'paymentForm'; error: StripeError}) => any
35
+ ): StripePaymentFormElement;
36
+ };
@@ -21,6 +21,7 @@ import {
21
21
  StripeCardElement,
22
22
  StripeCardElementOptions,
23
23
  StripeAuBankAccountElement,
24
+ StripePaymentFormElement,
24
25
  StripePaymentMethodMessagingElementOptions,
25
26
  StripePaymentMethodMessagingElement,
26
27
  StripeAuBankAccountElementOptions,
@@ -407,6 +408,7 @@ export type StripeElement =
407
408
  | StripeCurrencySelectorElement
408
409
  | StripeExpressCheckoutElement
409
410
  | StripePaymentElement
411
+ | StripePaymentFormElement
410
412
  | StripePaymentMethodMessagingElement
411
413
  | StripePaymentRequestButtonElement
412
414
  | StripeIssuingCardNumberDisplayElement
@@ -21,6 +21,7 @@ import {
21
21
  StripeCardElement,
22
22
  StripeCardElementOptions,
23
23
  StripeAuBankAccountElement,
24
+ StripePaymentFormElement,
24
25
  StripePaymentMethodMessagingElementOptions,
25
26
  StripePaymentMethodMessagingElement,
26
27
  StripeAuBankAccountElementOptions,
@@ -407,6 +408,7 @@ export type StripeElement =
407
408
  | StripeCurrencySelectorElement
408
409
  | StripeExpressCheckoutElement
409
410
  | StripePaymentElement
411
+ | StripePaymentFormElement
410
412
  | StripePaymentMethodMessagingElement
411
413
  | StripePaymentRequestButtonElement
412
414
  | StripeIssuingCardNumberDisplayElement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "8.4.0",
3
+ "version": "8.5.1",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "lib/index.js",