@bigcommerce/checkout-sdk 1.248.1 → 1.250.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 CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.250.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.249.0...v1.250.0) (2022-06-08)
6
+
7
+
8
+ ### Features
9
+
10
+ * **payment:** PAYPAL-1368 added checking required fields ([aa706e7](https://github.com/bigcommerce/checkout-sdk-js/commit/aa706e7d468ad5bc8e354e59e60d863c662d87d5))
11
+
12
+ ## [1.249.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.248.2...v1.249.0) (2022-06-06)
13
+
14
+
15
+ ### Features
16
+
17
+ * **payment:** PAYPAL-0000 updated braintree paypal checkout button strategy to prepare strategies separation ([5d68a3d](https://github.com/bigcommerce/checkout-sdk-js/commit/5d68a3d2b30bb7b6ddaa363e42da30655fef6f6b))
18
+
19
+ ### [1.248.2](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.248.1...v1.248.2) (2022-06-03)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **payment:** INT-6055 Stripe UPE mount fields properly if previously selected ([34df8a6](https://github.com/bigcommerce/checkout-sdk-js/commit/34df8a6b0b224d694d4e717273c6d1dd82ac90b3))
25
+
5
26
  ### [1.248.1](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.248.0...v1.248.1) (2022-06-01)
6
27
 
7
28
  ## [1.248.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.247.1...v1.248.0) (2022-05-31)
@@ -132,10 +132,10 @@ declare interface ApplePayButtonInitializeOptions {
132
132
  declare interface BraintreeError extends Error {
133
133
  type: 'CUSTOMER' | 'MERCHANT' | 'NETWORK' | 'INTERNAL' | 'UNKNOWN';
134
134
  code: string;
135
- message: string;
135
+ details?: unknown;
136
136
  }
137
137
 
138
- declare interface BraintreePaypalButtonInitializeOptions {
138
+ declare interface BraintreePaypalV1ButtonInitializeOptions {
139
139
  /**
140
140
  * The ID of a container which the messaging should be inserted.
141
141
  */
@@ -165,6 +165,12 @@ declare interface BraintreePaypalButtonInitializeOptions {
165
165
  * @param error - The error object describing the failure.
166
166
  */
167
167
  onPaymentError?(error: BraintreeError | StandardError): void;
168
+ /**
169
+ * A callback that gets called on any error instead of submit payment or authorization errors.
170
+ *
171
+ * @param error - The error object describing the failure.
172
+ */
173
+ onError?(error: BraintreeError | StandardError): void;
168
174
  }
169
175
 
170
176
  declare enum ButtonColor {
@@ -199,12 +205,12 @@ declare interface CheckoutButtonInitializeOptions extends CheckoutButtonOptions
199
205
  * The options that are required to facilitate Braintree PayPal. They can be
200
206
  * omitted unless you need to support Braintree PayPal.
201
207
  */
202
- braintreepaypal?: BraintreePaypalButtonInitializeOptions;
208
+ braintreepaypal?: BraintreePaypalV1ButtonInitializeOptions;
203
209
  /**
204
210
  * The options that are required to facilitate Braintree Credit. They can be
205
211
  * omitted unless you need to support Braintree Credit.
206
212
  */
207
- braintreepaypalcredit?: BraintreePaypalButtonInitializeOptions;
213
+ braintreepaypalcredit?: BraintreePaypalV1ButtonInitializeOptions;
208
214
  /**
209
215
  * The options that are required to facilitate PayPal. They can be omitted
210
216
  * unless you need to support Paypal.
@@ -446,12 +452,32 @@ declare interface PaypalButtonInitializeOptions {
446
452
  onPaymentError?(error: StandardError): void;
447
453
  }
448
454
 
455
+ declare enum PaypalButtonStyleColorOption {
456
+ GOLD = "gold",
457
+ BLUE = "blue",
458
+ SIlVER = "silver",
459
+ BLACK = "black"
460
+ }
461
+
462
+ declare enum PaypalButtonStyleLabelOption {
463
+ CHECKOUT = "checkout",
464
+ PAY = "pay",
465
+ BUYNOW = "buynow",
466
+ PAYPAL = "paypal",
467
+ CREDIT = "credit"
468
+ }
469
+
470
+ declare enum PaypalButtonStyleLayoutOption {
471
+ HORIZONTAL = "horizontal",
472
+ VERTICAL = "vertical"
473
+ }
474
+
449
475
  declare interface PaypalButtonStyleOptions {
450
- layout?: 'horizontal' | 'vertical';
451
- size?: 'small' | 'medium' | 'large' | 'responsive';
452
- color?: 'gold' | 'blue' | 'silver' | 'black';
453
- label?: 'checkout' | 'pay' | 'buynow' | 'paypal' | 'credit';
454
- shape?: 'pill' | 'rect';
476
+ layout?: PaypalButtonStyleLayoutOption;
477
+ size?: PaypalButtonStyleSizeOption;
478
+ color?: PaypalButtonStyleColorOption;
479
+ label?: PaypalButtonStyleLabelOption;
480
+ shape?: PaypalButtonStyleShapeOption;
455
481
  tagline?: boolean;
456
482
  fundingicons?: boolean;
457
483
  height?: number;
@@ -466,6 +492,18 @@ declare interface PaypalButtonStyleOptions_2 {
466
492
  tagline?: boolean;
467
493
  }
468
494
 
495
+ declare enum PaypalButtonStyleShapeOption {
496
+ PILL = "pill",
497
+ RECT = "rect"
498
+ }
499
+
500
+ declare enum PaypalButtonStyleSizeOption {
501
+ SMALL = "small",
502
+ MEDIUM = "medium",
503
+ LARGE = "large",
504
+ RESPONSIVE = "responsive"
505
+ }
506
+
469
507
  declare interface PaypalCommerceButtonInitializeOptions {
470
508
  /**
471
509
  * A set of styling options for the checkout button.