@stripe/stripe-js 8.3.0 → 8.5.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 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.3.0",
58
+ version: "8.5.0",
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.3.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.0", " 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.3.0",
54
+ version: "8.5.0",
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.3.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.0", " 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.3.0",
74
+ version: "8.5.0",
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.3.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.0", " 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.3.0",
70
+ version: "8.5.0",
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.3.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.0", " 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);
@@ -4,6 +4,7 @@ import {
4
4
  TermsOption,
5
5
  StripePaymentElement,
6
6
  } from './elements/payment';
7
+ import {StripePaymentFormElement} from './elements/payment-form';
7
8
  import {ContactOption, StripeAddressElement} from './elements/address';
8
9
  import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
9
10
  import {StripeError} from './stripe';
@@ -17,6 +18,7 @@ import {
17
18
  StripeExpressCheckoutElementReadyEvent,
18
19
  StripeTaxIdElement,
19
20
  StripeTaxIdElementOptions,
21
+ PaymentWalletsOption,
20
22
  } from './elements';
21
23
 
22
24
  type SavedPaymentMethodOption = {
@@ -345,6 +347,7 @@ export type StripeCheckoutPaymentElementOptions = {
345
347
  readOnly?: boolean;
346
348
  terms?: TermsOption;
347
349
  fields?: FieldsOption;
350
+ wallets?: PaymentWalletsOption;
348
351
  };
349
352
 
350
353
  export type StripeCheckoutAddressElementOptions = {
@@ -611,17 +614,22 @@ export interface StripeCheckout {
611
614
  /* Elements methods */
612
615
  changeAppearance: (appearance: Appearance) => void;
613
616
  loadFonts: (fonts: Array<CssFontSource | CustomFontSource>) => void;
617
+
614
618
  getPaymentElement(): StripePaymentElement | null;
619
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
620
+ getPaymentFormElement(): StripePaymentFormElement | null;
615
621
  getBillingAddressElement(): StripeAddressElement | null;
616
622
  getShippingAddressElement(): StripeAddressElement | null;
617
623
  getExpressCheckoutElement(): StripeCheckoutExpressCheckoutElement | null;
618
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
619
624
  getCurrencySelectorElement(): StripeCurrencySelectorElement | null;
620
625
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
621
626
  getTaxIdElement(): StripeTaxIdElement | null;
627
+
622
628
  createPaymentElement(
623
629
  options?: StripeCheckoutPaymentElementOptions
624
630
  ): StripePaymentElement;
631
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
632
+ createPaymentFormElement(): StripePaymentFormElement;
625
633
  createBillingAddressElement(
626
634
  options?: StripeCheckoutAddressElementOptions
627
635
  ): StripeAddressElement;
@@ -631,7 +639,6 @@ export interface StripeCheckout {
631
639
  createExpressCheckoutElement(
632
640
  options?: StripeCheckoutExpressCheckoutElementOptions
633
641
  ): StripeCheckoutExpressCheckoutElement;
634
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
635
642
  createCurrencySelectorElement(): StripeCurrencySelectorElement;
636
643
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
637
644
  createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
@@ -4,6 +4,7 @@ import {
4
4
  TermsOption,
5
5
  StripePaymentElement,
6
6
  } from './elements/payment';
7
+ import {StripePaymentFormElement} from './elements/payment-form';
7
8
  import {ContactOption, StripeAddressElement} from './elements/address';
8
9
  import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
9
10
  import {StripeError} from './stripe';
@@ -17,6 +18,7 @@ import {
17
18
  StripeExpressCheckoutElementReadyEvent,
18
19
  StripeTaxIdElement,
19
20
  StripeTaxIdElementOptions,
21
+ PaymentWalletsOption,
20
22
  } from './elements';
21
23
 
22
24
  type SavedPaymentMethodOption = {
@@ -345,6 +347,7 @@ export type StripeCheckoutPaymentElementOptions = {
345
347
  readOnly?: boolean;
346
348
  terms?: TermsOption;
347
349
  fields?: FieldsOption;
350
+ wallets?: PaymentWalletsOption;
348
351
  };
349
352
 
350
353
  export type StripeCheckoutAddressElementOptions = {
@@ -611,17 +614,22 @@ export interface StripeCheckout {
611
614
  /* Elements methods */
612
615
  changeAppearance: (appearance: Appearance) => void;
613
616
  loadFonts: (fonts: Array<CssFontSource | CustomFontSource>) => void;
617
+
614
618
  getPaymentElement(): StripePaymentElement | null;
619
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
620
+ getPaymentFormElement(): StripePaymentFormElement | null;
615
621
  getBillingAddressElement(): StripeAddressElement | null;
616
622
  getShippingAddressElement(): StripeAddressElement | null;
617
623
  getExpressCheckoutElement(): StripeCheckoutExpressCheckoutElement | null;
618
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
619
624
  getCurrencySelectorElement(): StripeCurrencySelectorElement | null;
620
625
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
621
626
  getTaxIdElement(): StripeTaxIdElement | null;
627
+
622
628
  createPaymentElement(
623
629
  options?: StripeCheckoutPaymentElementOptions
624
630
  ): StripePaymentElement;
631
+ /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
632
+ createPaymentFormElement(): StripePaymentFormElement;
625
633
  createBillingAddressElement(
626
634
  options?: StripeCheckoutAddressElementOptions
627
635
  ): StripeAddressElement;
@@ -631,7 +639,6 @@ export interface StripeCheckout {
631
639
  createExpressCheckoutElement(
632
640
  options?: StripeCheckoutExpressCheckoutElementOptions
633
641
  ): StripeCheckoutExpressCheckoutElement;
634
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
635
642
  createCurrencySelectorElement(): StripeCurrencySelectorElement;
636
643
  /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
637
644
  createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
@@ -15,3 +15,4 @@ export * from './payment';
15
15
  export * from './shipping-address';
16
16
  export * from './issuing';
17
17
  export * from './tax-id';
18
+ export * from './payment-form';
@@ -15,3 +15,4 @@ export * from './payment';
15
15
  export * from './shipping-address';
16
16
  export * from './issuing';
17
17
  export * from './tax-id';
18
+ 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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "8.3.0",
3
+ "version": "8.5.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "lib/index.js",