@payrails/web-sdk 5.4.0 → 5.6.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/index.js +4 -4
- package/package.json +1 -1
- package/payrails-styles.css +12 -1
- package/payrails.d.ts +26 -17
package/package.json
CHANGED
package/payrails-styles.css
CHANGED
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
height: 40px;
|
|
19
|
+
box-shadow: none;
|
|
19
20
|
|
|
20
21
|
background: #015bbb;
|
|
21
22
|
border-radius: 4px;
|
|
22
|
-
|
|
23
|
+
border: none;
|
|
23
24
|
|
|
24
25
|
font-size: 14px;
|
|
25
26
|
color: #fff;
|
|
@@ -214,6 +215,10 @@
|
|
|
214
215
|
background-color: rgba(59, 64, 71, 1);
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
.payrails-dropin-component--single input[type='radio'] {
|
|
219
|
+
display: none;
|
|
220
|
+
}
|
|
221
|
+
|
|
217
222
|
.payrails-dropin-item input[type='radio'] {
|
|
218
223
|
appearance: none;
|
|
219
224
|
-webkit-appearance: none;
|
|
@@ -476,6 +481,12 @@
|
|
|
476
481
|
}
|
|
477
482
|
}
|
|
478
483
|
|
|
484
|
+
button.payrails-generic-button {
|
|
485
|
+
border: none;
|
|
486
|
+
outline: none;
|
|
487
|
+
box-shadow: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
479
490
|
.payrails-generic-button * {
|
|
480
491
|
box-sizing: border-box;
|
|
481
492
|
}
|
package/payrails.d.ts
CHANGED
|
@@ -392,6 +392,7 @@ interface ICollectOptions$1 {
|
|
|
392
392
|
declare class CollectContainer extends Container {
|
|
393
393
|
#private;
|
|
394
394
|
type: string;
|
|
395
|
+
private bus;
|
|
395
396
|
constructor(options: any, metaData: any, skyflowElements: any, context: any);
|
|
396
397
|
create: (input: CollectElementInput$1, options?: any) => CollectElement;
|
|
397
398
|
collect: (options?: ICollectOptions$1) => Promise<unknown>;
|
|
@@ -426,6 +427,7 @@ interface ICollectOptions {
|
|
|
426
427
|
declare class ComposableContainer extends Container {
|
|
427
428
|
#private;
|
|
428
429
|
type: string;
|
|
430
|
+
private bus;
|
|
429
431
|
constructor(options: any, metaData: any, skyflowElements: any, context: any);
|
|
430
432
|
create: (input: CollectElementInput, options?: any) => ComposableElement;
|
|
431
433
|
on: (eventName: string, handler: any) => void;
|
|
@@ -446,6 +448,7 @@ interface ISkyflow {
|
|
|
446
448
|
}
|
|
447
449
|
declare class Skyflow {
|
|
448
450
|
#private;
|
|
451
|
+
private bus;
|
|
449
452
|
constructor(config: ISkyflow);
|
|
450
453
|
static init(config: ISkyflow): Skyflow;
|
|
451
454
|
container(type: ContainerType, options?: Record<string, any>): CollectContainer | ComposableContainer;
|
|
@@ -698,6 +701,21 @@ declare enum AuthorizationFailureReasons {
|
|
|
698
701
|
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
699
702
|
}
|
|
700
703
|
|
|
704
|
+
interface ButtonOptions {
|
|
705
|
+
id: string;
|
|
706
|
+
events?: PayrailsSDKEvents & {
|
|
707
|
+
onClick?: () => Promise<void>;
|
|
708
|
+
};
|
|
709
|
+
translations: {
|
|
710
|
+
label: string;
|
|
711
|
+
};
|
|
712
|
+
styles?: {
|
|
713
|
+
base?: Partial<CSSStyleDeclaration>;
|
|
714
|
+
loading?: Partial<CSSStyleDeclaration>;
|
|
715
|
+
hover?: Partial<CSSStyleDeclaration>;
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
|
|
701
719
|
interface GooglePayButtonOptions extends StoreInstrumentElementOptions {
|
|
702
720
|
environment?: PayrailsEnvironment;
|
|
703
721
|
merchantInfo?: google.payments.api.MerchantInfo;
|
|
@@ -731,27 +749,13 @@ declare class GooglePayButton extends PayrailsElementWithStoreInstrumentCheckbox
|
|
|
731
749
|
interface DropinElementEvents extends PaymentEvents {
|
|
732
750
|
onActivate?: () => void;
|
|
733
751
|
onDeactivate?: () => void;
|
|
752
|
+
onAvailable?: () => void;
|
|
734
753
|
}
|
|
735
754
|
interface DropinElementStyles {
|
|
736
755
|
base?: Partial<CSSStyleDeclaration>;
|
|
737
756
|
active?: Partial<CSSStyleDeclaration>;
|
|
738
757
|
}
|
|
739
758
|
|
|
740
|
-
interface ButtonOptions {
|
|
741
|
-
id: string;
|
|
742
|
-
events?: PayrailsSDKEvents & {
|
|
743
|
-
onClick?: () => Promise<void>;
|
|
744
|
-
};
|
|
745
|
-
translations: {
|
|
746
|
-
label: string;
|
|
747
|
-
};
|
|
748
|
-
styles?: {
|
|
749
|
-
base?: Partial<CSSStyleDeclaration>;
|
|
750
|
-
loading?: Partial<CSSStyleDeclaration>;
|
|
751
|
-
hover?: Partial<CSSStyleDeclaration>;
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
|
|
755
759
|
interface GenericRedirectButtonOptions {
|
|
756
760
|
styles?: ButtonOptions['styles'];
|
|
757
761
|
translations?: {
|
|
@@ -771,7 +775,10 @@ declare class GenericRedirectButton extends PayrailsElement {
|
|
|
771
775
|
}
|
|
772
776
|
|
|
773
777
|
interface GenericRedirectDropinOptions {
|
|
774
|
-
styles?:
|
|
778
|
+
styles?: {
|
|
779
|
+
element?: DropinElementStyles;
|
|
780
|
+
mercadoPago?: ButtonOptions['styles'];
|
|
781
|
+
};
|
|
775
782
|
translations?: {
|
|
776
783
|
label?: string;
|
|
777
784
|
button?: GenericRedirectButtonOptions['translations'];
|
|
@@ -853,6 +860,7 @@ declare class Dropin extends PayrailsElement {
|
|
|
853
860
|
constructor(collectContainer: PayrailsCollectContainer, clientConfig: PayrailsClientOptions, dropinConfig: DropinOptions, execution: WorkflowExecution, sdkConfig: SdkConfiguration);
|
|
854
861
|
private createStoredInstrumentElement;
|
|
855
862
|
private createMercadoPagoButton;
|
|
863
|
+
private get totalPaymentOptions();
|
|
856
864
|
private createCreditCardButton;
|
|
857
865
|
private createGooglePayButton;
|
|
858
866
|
private createPayPalButton;
|
|
@@ -870,6 +878,7 @@ interface StorablePaymentMethodConfiguration extends StoreInstrumentElementOptio
|
|
|
870
878
|
}
|
|
871
879
|
interface DropinOptions {
|
|
872
880
|
paymentMethodsConfiguration?: {
|
|
881
|
+
preselectFirstPaymentOption?: boolean;
|
|
873
882
|
cards?: {
|
|
874
883
|
showCardHolderName?: boolean;
|
|
875
884
|
showExistingCards?: boolean;
|
|
@@ -905,7 +914,7 @@ interface DropinOptions {
|
|
|
905
914
|
applePayButton?: ApplePayButtonOptions['styles'];
|
|
906
915
|
cardForm?: CardFormOptions['styles'];
|
|
907
916
|
cardPaymentButton?: CardPaymentButtonOptions['styles'];
|
|
908
|
-
mercadoPago?:
|
|
917
|
+
mercadoPago?: ButtonOptions['styles'];
|
|
909
918
|
};
|
|
910
919
|
}
|
|
911
920
|
|