@payrails/web-sdk 5.22.3-RC.0 → 5.23.0-RC.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/README.md +5 -2
- package/index.js +4 -4
- package/package.json +2 -2
- package/payrails-styles.css +56 -0
- package/payrails.d.ts +16 -3
- package/payrails.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payrails/web-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.23.0-RC.0",
|
|
4
4
|
"description": "SDK providing tokenization options on the client for merchants",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "payrails.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@payrails/fraud-sdk": "1.4.2",
|
|
12
12
|
"@payrails/web-cse": "1.2.3",
|
|
13
|
-
"@types/applepayjs": "14.0.
|
|
13
|
+
"@types/applepayjs": "14.0.9",
|
|
14
14
|
"@types/googlepay": "0.7.5"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {}
|
package/payrails-styles.css
CHANGED
|
@@ -591,6 +591,62 @@
|
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
+
.payrails-dropin-loader-wrapper {
|
|
595
|
+
width: 100%;
|
|
596
|
+
height: 100%;
|
|
597
|
+
position: absolute;
|
|
598
|
+
display: block;
|
|
599
|
+
top: 0;
|
|
600
|
+
left: 0;
|
|
601
|
+
z-index: 200;
|
|
602
|
+
.loading-overlay {
|
|
603
|
+
background: rgba(252, 252, 252, 0.7);
|
|
604
|
+
width: 100%;
|
|
605
|
+
height: 100%;
|
|
606
|
+
display: block;
|
|
607
|
+
.lds-ring {
|
|
608
|
+
display: inline-block;
|
|
609
|
+
position: relative;
|
|
610
|
+
width: 80px;
|
|
611
|
+
height: 80px;
|
|
612
|
+
top: 45%;
|
|
613
|
+
left: 40%;
|
|
614
|
+
|
|
615
|
+
div {
|
|
616
|
+
box-sizing: border-box;
|
|
617
|
+
display: block;
|
|
618
|
+
position: absolute;
|
|
619
|
+
width: 64px;
|
|
620
|
+
height: 64px;
|
|
621
|
+
margin: 8px;
|
|
622
|
+
border: 8px solid #fff;
|
|
623
|
+
border-radius: 50%;
|
|
624
|
+
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
625
|
+
}
|
|
626
|
+
div:nth-child(1) {
|
|
627
|
+
animation-delay: -0.45s;
|
|
628
|
+
}
|
|
629
|
+
div:nth-child(2) {
|
|
630
|
+
animation-delay: -0.3s;
|
|
631
|
+
}
|
|
632
|
+
div:nth-child(3) {
|
|
633
|
+
animation-delay: -0.15s;
|
|
634
|
+
}
|
|
635
|
+
div:nth-child(4) {
|
|
636
|
+
border-color: rgb(0, 0, 0) transparent transparent transparent;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
@keyframes lds-ring {
|
|
642
|
+
0% {
|
|
643
|
+
transform: rotate(0deg);
|
|
644
|
+
}
|
|
645
|
+
100% {
|
|
646
|
+
transform: rotate(360deg);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
594
650
|
button.payrails-generic-button {
|
|
595
651
|
border: none;
|
|
596
652
|
outline: none;
|
package/payrails.d.ts
CHANGED
|
@@ -523,7 +523,7 @@ declare class PayrailsElement implements Mountable {
|
|
|
523
523
|
get parentElement(): HTMLElement | null;
|
|
524
524
|
get selector(): string;
|
|
525
525
|
mount(location: string): void;
|
|
526
|
-
|
|
526
|
+
protected clean(): void;
|
|
527
527
|
unmount(): void;
|
|
528
528
|
}
|
|
529
529
|
|
|
@@ -918,6 +918,15 @@ interface AuthFailedMsgOptions {
|
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
920
|
|
|
921
|
+
declare enum StyleKeys {
|
|
922
|
+
overlay = "overlay",
|
|
923
|
+
loader = "loader"
|
|
924
|
+
}
|
|
925
|
+
interface LoadingScreenStyles {
|
|
926
|
+
[StyleKeys.overlay]?: Partial<CSSStyleDeclaration>;
|
|
927
|
+
[StyleKeys.loader]?: Partial<CSSStyleDeclaration>;
|
|
928
|
+
}
|
|
929
|
+
|
|
921
930
|
interface GooglePayButtonOptions extends StoreInstrumentElementOptions {
|
|
922
931
|
environment?: PayrailsEnvironment;
|
|
923
932
|
merchantInfo?: google.payments.api.MerchantInfo;
|
|
@@ -936,7 +945,7 @@ interface GooglePayButtonOptions extends StoreInstrumentElementOptions {
|
|
|
936
945
|
}
|
|
937
946
|
declare class GooglePayButton extends PayrailsElementWithStoreInstrumentCheckbox {
|
|
938
947
|
protected options: GooglePayButtonOptions;
|
|
939
|
-
private
|
|
948
|
+
private static instance;
|
|
940
949
|
private readonly paymentExecutor;
|
|
941
950
|
private static googleSDKClient;
|
|
942
951
|
private static getSDKClient;
|
|
@@ -1059,6 +1068,7 @@ interface PaypalButtonOptions extends StoreInstrumentElementOptions {
|
|
|
1059
1068
|
}
|
|
1060
1069
|
declare class PaypalButton extends PayrailsElementWithStoreInstrumentCheckbox {
|
|
1061
1070
|
protected options?: PaypalButtonOptions | undefined;
|
|
1071
|
+
private static instance;
|
|
1062
1072
|
constructor(options?: PaypalButtonOptions | undefined);
|
|
1063
1073
|
private paymentExecutor;
|
|
1064
1074
|
private button;
|
|
@@ -1077,6 +1087,7 @@ declare class PaypalButton extends PayrailsElementWithStoreInstrumentCheckbox {
|
|
|
1077
1087
|
private approvePayment;
|
|
1078
1088
|
private get fraudNetGuid();
|
|
1079
1089
|
mount(location: string): void;
|
|
1090
|
+
private renderButton;
|
|
1080
1091
|
unmount(): void;
|
|
1081
1092
|
}
|
|
1082
1093
|
|
|
@@ -1102,6 +1113,7 @@ declare class Dropin extends PayrailsElement {
|
|
|
1102
1113
|
private applePay;
|
|
1103
1114
|
private cardForm;
|
|
1104
1115
|
private paypal;
|
|
1116
|
+
private loadingScreen;
|
|
1105
1117
|
constructor(collectContainer: PayrailsCollectContainer, clientConfig: PayrailsClientOptions, dropinConfig: DropinOptions);
|
|
1106
1118
|
private isHppIntegration;
|
|
1107
1119
|
private createStoredInstrumentElement;
|
|
@@ -1175,6 +1187,7 @@ interface DropinOptions {
|
|
|
1175
1187
|
cardPaymentButton?: CardPaymentButtonOptions['styles'];
|
|
1176
1188
|
authSuccess?: Partial<CSSStyleDeclaration>;
|
|
1177
1189
|
authFailed?: Partial<CSSStyleDeclaration>;
|
|
1190
|
+
loadingScreen?: LoadingScreenStyles;
|
|
1178
1191
|
addressSelector?: AddressSelectorElementOptions['styles'];
|
|
1179
1192
|
mercadoPago?: GenericRedirectDropinOptions['styles'];
|
|
1180
1193
|
};
|
|
@@ -1203,7 +1216,7 @@ interface PayPalScriptConfig {
|
|
|
1203
1216
|
intent: 'tokenize' | 'capture' | 'authorize';
|
|
1204
1217
|
}
|
|
1205
1218
|
declare enum ThirdPartySDK {
|
|
1206
|
-
ApplePay = "https://applepay.cdn-apple.com/jsapi/
|
|
1219
|
+
ApplePay = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",
|
|
1207
1220
|
GooglePay = "https://pay.google.com/gp/p/js/pay.js",
|
|
1208
1221
|
PayPal = "paypal-sdk"
|
|
1209
1222
|
}
|