@bigcommerce/checkout-sdk 1.325.0 → 1.326.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 +7 -0
- package/dist/checkout-button.d.ts +74 -1
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +74 -1
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/docs/README.md +8 -1
- package/docs/enums/StyleButtonColor_2.md +43 -0
- package/docs/enums/StyleButtonLabel_2.md +43 -0
- package/docs/enums/StyleButtonLayout_2.md +22 -0
- package/docs/enums/StyleButtonShape_2.md +22 -0
- package/docs/interfaces/PayPalButtonStyleOptions.md +67 -0
- package/docs/interfaces/PayPalCommerceInlineButtonInitializeOptions.md +61 -0
- package/docs/interfaces/WithPayPalCommerceInlineButtonInitializeOptions.md +15 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.326.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.325.0...v1.326.0) (2023-01-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **payment:** PAYPAL-1890 added PayPalCommerceInlineButton strategy to paypal-commerce integration package ([#1776](https://github.com/bigcommerce/checkout-sdk-js/issues/1776)) ([a4eca90](https://github.com/bigcommerce/checkout-sdk-js/commit/a4eca909e77cf2b0fb55b3d9bf11590bce40ba23))
|
|
11
|
+
|
|
5
12
|
## [1.325.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.324.3...v1.325.0) (2023-01-18)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -459,7 +459,7 @@ declare class CheckoutButtonErrorSelector {
|
|
|
459
459
|
getDeinitializeButtonError(methodId?: CheckoutButtonMethodType): Error | undefined;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
declare type CheckoutButtonInitializeOptions = BaseCheckoutButtonInitializeOptions & WithApplePayButtonInitializeOptions;
|
|
462
|
+
declare type CheckoutButtonInitializeOptions = BaseCheckoutButtonInitializeOptions & WithApplePayButtonInitializeOptions & WithPayPalCommerceInlineButtonInitializeOptions;
|
|
463
463
|
|
|
464
464
|
declare class CheckoutButtonInitializer {
|
|
465
465
|
private _store;
|
|
@@ -634,6 +634,49 @@ declare interface LineItem {
|
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
+
declare interface PayPalButtonStyleOptions {
|
|
638
|
+
layout?: StyleButtonLayout_2;
|
|
639
|
+
color?: StyleButtonColor_2;
|
|
640
|
+
shape?: StyleButtonShape_2;
|
|
641
|
+
height?: number;
|
|
642
|
+
label?: StyleButtonLabel_2;
|
|
643
|
+
tagline?: boolean;
|
|
644
|
+
custom?: {
|
|
645
|
+
label?: string;
|
|
646
|
+
css?: {
|
|
647
|
+
background?: string;
|
|
648
|
+
color?: string;
|
|
649
|
+
width?: string;
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* A set of options that are required to initialize ApplePay in cart.
|
|
656
|
+
*
|
|
657
|
+
* When ApplePay is initialized, an ApplePay button will be inserted into the
|
|
658
|
+
* DOM. When a customer clicks on it, it will trigger Apple sheet.
|
|
659
|
+
*/
|
|
660
|
+
declare interface PayPalCommerceInlineButtonInitializeOptions {
|
|
661
|
+
/**
|
|
662
|
+
* A class name used to add special class for container where the button will be generated in
|
|
663
|
+
* Default: 'PaypalCommerceInlineButton'
|
|
664
|
+
*/
|
|
665
|
+
buttonContainerClassName?: string;
|
|
666
|
+
/**
|
|
667
|
+
* A set of styling options for the checkout button.
|
|
668
|
+
*/
|
|
669
|
+
style?: Pick<PayPalButtonStyleOptions, 'custom'>;
|
|
670
|
+
/**
|
|
671
|
+
* A callback that gets called when payment complete on paypal side.
|
|
672
|
+
*/
|
|
673
|
+
onComplete(): void;
|
|
674
|
+
/**
|
|
675
|
+
* A callback that gets called on any error
|
|
676
|
+
*/
|
|
677
|
+
onError?(): void;
|
|
678
|
+
}
|
|
679
|
+
|
|
637
680
|
declare interface PaypalButtonInitializeOptions {
|
|
638
681
|
/**
|
|
639
682
|
* The Client ID of the Paypal App
|
|
@@ -875,6 +918,14 @@ declare enum StyleButtonColor {
|
|
|
875
918
|
white = "white"
|
|
876
919
|
}
|
|
877
920
|
|
|
921
|
+
declare enum StyleButtonColor_2 {
|
|
922
|
+
GOLD = "gold",
|
|
923
|
+
BLUE = "blue",
|
|
924
|
+
SILVER = "silver",
|
|
925
|
+
BLACK = "black",
|
|
926
|
+
WHITE = "white"
|
|
927
|
+
}
|
|
928
|
+
|
|
878
929
|
declare enum StyleButtonLabel {
|
|
879
930
|
paypal = "paypal",
|
|
880
931
|
checkout = "checkout",
|
|
@@ -883,20 +934,42 @@ declare enum StyleButtonLabel {
|
|
|
883
934
|
installment = "installment"
|
|
884
935
|
}
|
|
885
936
|
|
|
937
|
+
declare enum StyleButtonLabel_2 {
|
|
938
|
+
PAYPAL = "paypal",
|
|
939
|
+
CHECKOUT = "checkout",
|
|
940
|
+
BUYNOW = "buynow",
|
|
941
|
+
PAY = "pay",
|
|
942
|
+
INSTALLMENT = "installment"
|
|
943
|
+
}
|
|
944
|
+
|
|
886
945
|
declare enum StyleButtonLayout {
|
|
887
946
|
vertical = "vertical",
|
|
888
947
|
horizontal = "horizontal"
|
|
889
948
|
}
|
|
890
949
|
|
|
950
|
+
declare enum StyleButtonLayout_2 {
|
|
951
|
+
VERTICAL = "vertical",
|
|
952
|
+
HORIZONTAL = "horizontal"
|
|
953
|
+
}
|
|
954
|
+
|
|
891
955
|
declare enum StyleButtonShape {
|
|
892
956
|
pill = "pill",
|
|
893
957
|
rect = "rect"
|
|
894
958
|
}
|
|
895
959
|
|
|
960
|
+
declare enum StyleButtonShape_2 {
|
|
961
|
+
PILL = "pill",
|
|
962
|
+
RECT = "rect"
|
|
963
|
+
}
|
|
964
|
+
|
|
896
965
|
declare interface WithApplePayButtonInitializeOptions {
|
|
897
966
|
applepay?: ApplePayButtonInitializeOptions_2;
|
|
898
967
|
}
|
|
899
968
|
|
|
969
|
+
declare interface WithPayPalCommerceInlineButtonInitializeOptions {
|
|
970
|
+
paypalcommerceinline?: PayPalCommerceInlineButtonInitializeOptions;
|
|
971
|
+
}
|
|
972
|
+
|
|
900
973
|
/**
|
|
901
974
|
* Creates an instance of `CheckoutButtonInitializer`.
|
|
902
975
|
*
|