@adyen/adyen-web 6.44.0 → 6.45.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 +1 -1
- package/dist/cjs/adyen.css +8 -8
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +73 -10
- package/dist/es/adyen.css +8 -8
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/components/BacsDD/BacsDD.js +1 -1
- package/dist/es/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Donation/DonationCampaignService.js +1 -1
- package/dist/es/components/Donation/DonationCampaignService.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es/components/GooglePay/GooglePay.js +1 -1
- package/dist/es/components/GooglePay/GooglePay.js.map +1 -1
- package/dist/es/components/GooglePay/GooglePayService.js +1 -1
- package/dist/es/components/GooglePay/GooglePayService.js.map +1 -1
- package/dist/es/components/Klarna/KlarnaPayments.js +1 -1
- package/dist/es/components/Klarna/KlarnaPayments.js.map +1 -1
- package/dist/es/components/PayByBankPix/PayByBankPix.js +1 -1
- package/dist/es/components/PayByBankPix/PayByBankPix.js.map +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es/components/PayTo/PayTo.js +1 -1
- package/dist/es/components/PayTo/PayTo.js.map +1 -1
- package/dist/es/components/Twint/Twint.js +1 -1
- package/dist/es/components/Twint/Twint.js.map +1 -1
- package/dist/es/components/internal/Address/validate.formats.js +1 -1
- package/dist/es/components/internal/Address/validate.formats.js.map +1 -1
- package/dist/es/components/internal/Address/validate.js +1 -1
- package/dist/es/components/internal/Address/validate.js.map +1 -1
- package/dist/es/components/internal/PayButton/PayButton.js +1 -1
- package/dist/es/components/internal/PayButton/PayButton.js.map +1 -1
- package/dist/es/components/internal/PayButton/utils.js +1 -1
- package/dist/es/components/internal/PayButton/utils.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/core/Analytics/constants.js +1 -1
- package/dist/es/core/Analytics/constants.js.map +1 -1
- package/dist/es/core/Analytics/events/AnalyticsLogEvent.js +1 -1
- package/dist/es/core/Analytics/events/AnalyticsLogEvent.js.map +1 -1
- package/dist/es/core/Errors/constants.js +1 -1
- package/dist/es/core/Errors/constants.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/core/config.js.map +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/core/core.js.map +1 -1
- package/dist/es/core/utils.js +1 -1
- package/dist/es/core/utils.js.map +1 -1
- package/dist/es/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es/external/preact/dist/preact.js +1 -1
- package/dist/es/external/preact/dist/preact.js.map +1 -1
- package/dist/es/index.d.ts +73 -10
- package/dist/es/utils/validator-utils.js +1 -1
- package/dist/es/utils/validator-utils.js.map +1 -1
- package/dist/es-legacy/adyen.css +8 -8
- package/dist/es-legacy/adyen.css.map +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Donation/DonationCampaignService.js +1 -1
- package/dist/es-legacy/components/Donation/DonationCampaignService.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePay.js +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePay.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePayService.js +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePayService.js.map +1 -1
- package/dist/es-legacy/components/Klarna/KlarnaPayments.js +1 -1
- package/dist/es-legacy/components/Klarna/KlarnaPayments.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js +1 -1
- package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js.map +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -1
- package/dist/es-legacy/components/Twint/Twint.js +1 -1
- package/dist/es-legacy/components/Twint/Twint.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/validate.formats.js +1 -1
- package/dist/es-legacy/components/internal/Address/validate.formats.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/validate.js +1 -1
- package/dist/es-legacy/components/internal/Address/validate.js.map +1 -1
- package/dist/es-legacy/components/internal/PayButton/PayButton.js +1 -1
- package/dist/es-legacy/components/internal/PayButton/PayButton.js.map +1 -1
- package/dist/es-legacy/components/internal/PayButton/utils.js +1 -1
- package/dist/es-legacy/components/internal/PayButton/utils.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/core/Analytics/constants.js +1 -1
- package/dist/es-legacy/core/Analytics/constants.js.map +1 -1
- package/dist/es-legacy/core/Analytics/events/AnalyticsLogEvent.js +1 -1
- package/dist/es-legacy/core/Analytics/events/AnalyticsLogEvent.js.map +1 -1
- package/dist/es-legacy/core/Errors/constants.js +1 -1
- package/dist/es-legacy/core/Errors/constants.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/core/config.js.map +1 -1
- package/dist/es-legacy/core/core.js +1 -1
- package/dist/es-legacy/core/core.js.map +1 -1
- package/dist/es-legacy/core/utils.js +1 -1
- package/dist/es-legacy/core/utils.js.map +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es-legacy/external/preact/dist/preact.js +1 -1
- package/dist/es-legacy/external/preact/dist/preact.js.map +1 -1
- package/dist/es-legacy/utils/validator-utils.js +1 -1
- package/dist/es-legacy/utils/validator-utils.js.map +1 -1
- package/package.json +23 -23
- package/styles/adyen.css +8 -8
package/dist/es/index.d.ts
CHANGED
|
@@ -312,6 +312,7 @@ interface PayButtonProps extends ButtonProps {
|
|
|
312
312
|
status?: string;
|
|
313
313
|
disabled?: boolean;
|
|
314
314
|
icon?: string;
|
|
315
|
+
showReview?: boolean;
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
type AchForm = {
|
|
@@ -2497,6 +2498,7 @@ declare class BillDeskOnlineElement extends IssuerListContainer {
|
|
|
2497
2498
|
}) => void;
|
|
2498
2499
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
2499
2500
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
2501
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
2500
2502
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
2501
2503
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
2502
2504
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -2564,6 +2566,7 @@ declare class BillDeskWalletElement extends IssuerListContainer {
|
|
|
2564
2566
|
}) => void;
|
|
2565
2567
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
2566
2568
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
2569
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
2567
2570
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
2568
2571
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
2569
2572
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -2650,6 +2653,7 @@ declare class CashAppPay extends UIElement<CashAppPayConfiguration> {
|
|
|
2650
2653
|
}) => void;
|
|
2651
2654
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
2652
2655
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
2656
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
2653
2657
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
2654
2658
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
2655
2659
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -2728,6 +2732,7 @@ declare class ClickToPayElement extends UIElement<ClickToPayConfiguration> {
|
|
|
2728
2732
|
}) => void;
|
|
2729
2733
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
2730
2734
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
2735
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
2731
2736
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
2732
2737
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
2733
2738
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -2886,6 +2891,7 @@ declare class BancontactElement extends CardElement {
|
|
|
2886
2891
|
}) => void;
|
|
2887
2892
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
2888
2893
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
2894
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
2889
2895
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
2890
2896
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
2891
2897
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -3052,6 +3058,12 @@ declare class GiropayElement extends RedirectElement {
|
|
|
3052
3058
|
|
|
3053
3059
|
interface GooglePayConfiguration extends UIElementProps {
|
|
3054
3060
|
type?: 'googlepay' | 'paywithgoogle';
|
|
3061
|
+
/**
|
|
3062
|
+
* Optional Content Security Policy (CSP) nonce to apply to all dynamically injected styles and scripts.
|
|
3063
|
+
*
|
|
3064
|
+
* @see https://developers.google.com/pay/api/web/reference/request-objects#PaymentOptions
|
|
3065
|
+
*/
|
|
3066
|
+
nonce?: string;
|
|
3055
3067
|
/**
|
|
3056
3068
|
* List of brands accepted by the component. Values are configured on the Backoffice and returned in the /paymentMethodsResponse data
|
|
3057
3069
|
* @internal
|
|
@@ -3638,7 +3650,7 @@ declare class PaypalElement extends UIElement<PayPalConfiguration> {
|
|
|
3638
3650
|
protected formatData(): {
|
|
3639
3651
|
paymentMethod: {
|
|
3640
3652
|
type: TxVariants;
|
|
3641
|
-
userAction: "
|
|
3653
|
+
userAction: "continue" | "pay";
|
|
3642
3654
|
subtype: string;
|
|
3643
3655
|
};
|
|
3644
3656
|
};
|
|
@@ -3861,6 +3873,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
3861
3873
|
}) => void;
|
|
3862
3874
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
3863
3875
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
3876
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
3864
3877
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
3865
3878
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
3866
3879
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -3935,6 +3948,7 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
3935
3948
|
}) => void;
|
|
3936
3949
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
3937
3950
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
3951
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
3938
3952
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
3939
3953
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
3940
3954
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4010,6 +4024,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
4010
4024
|
}) => void;
|
|
4011
4025
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
4012
4026
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
4027
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
4013
4028
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
4014
4029
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
4015
4030
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4102,6 +4117,7 @@ declare class DragonpayElement extends UIElement<DragonpayConfiguraton> {
|
|
|
4102
4117
|
}) => void;
|
|
4103
4118
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
4104
4119
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
4120
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
4105
4121
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
4106
4122
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
4107
4123
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4234,6 +4250,7 @@ declare class EPSElement extends IssuerListContainer {
|
|
|
4234
4250
|
}) => void;
|
|
4235
4251
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
4236
4252
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
4253
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
4237
4254
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
4238
4255
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
4239
4256
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4494,6 +4511,7 @@ declare class PayuNetCashcardElement extends IssuerListContainer {
|
|
|
4494
4511
|
}) => void;
|
|
4495
4512
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
4496
4513
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
4514
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
4497
4515
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
4498
4516
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
4499
4517
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4561,6 +4579,7 @@ declare class PayuNetBankingElement extends IssuerListContainer {
|
|
|
4561
4579
|
}) => void;
|
|
4562
4580
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
4563
4581
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
4582
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
4564
4583
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
4565
4584
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
4566
4585
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4641,6 +4660,7 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
4641
4660
|
}) => void;
|
|
4642
4661
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
4643
4662
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
4663
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
4644
4664
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
4645
4665
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
4646
4666
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -4951,6 +4971,7 @@ declare class KlarnaPayments extends UIElement<KlarnaConfiguration> {
|
|
|
4951
4971
|
type: string;
|
|
4952
4972
|
};
|
|
4953
4973
|
};
|
|
4974
|
+
submit(): void;
|
|
4954
4975
|
payButton: (props: PayButtonProps) => h.JSX.Element;
|
|
4955
4976
|
handleAction(action: KlarnaAction, props?: {}): UIElement | null;
|
|
4956
4977
|
updateWithAction(action: KlarnaAction): void;
|
|
@@ -5028,6 +5049,7 @@ declare class OnlineBankingINElement extends IssuerListContainer {
|
|
|
5028
5049
|
}) => void;
|
|
5029
5050
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5030
5051
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
5052
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5031
5053
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5032
5054
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5033
5055
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -5224,6 +5246,7 @@ declare class WalletINElement extends IssuerListContainer {
|
|
|
5224
5246
|
}) => void;
|
|
5225
5247
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5226
5248
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
5249
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5227
5250
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5228
5251
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5229
5252
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -5306,6 +5329,7 @@ declare class OnlineBankingCZElement extends IssuerListContainer {
|
|
|
5306
5329
|
}) => void;
|
|
5307
5330
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5308
5331
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
5332
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5309
5333
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5310
5334
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5311
5335
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -5378,6 +5402,7 @@ declare class OnlineBankingSKElement extends IssuerListContainer {
|
|
|
5378
5402
|
}) => void;
|
|
5379
5403
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5380
5404
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
5405
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5381
5406
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5382
5407
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5383
5408
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -5459,6 +5484,7 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
5459
5484
|
}) => void;
|
|
5460
5485
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5461
5486
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
5487
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5462
5488
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5463
5489
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5464
5490
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -5533,6 +5559,7 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
5533
5559
|
}) => void;
|
|
5534
5560
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5535
5561
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
5562
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5536
5563
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5537
5564
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5538
5565
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -5993,6 +6020,7 @@ declare class PayToElement extends UIElement<PayToConfiguration> {
|
|
|
5993
6020
|
}) => void;
|
|
5994
6021
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
5995
6022
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
6023
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
5996
6024
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
5997
6025
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
5998
6026
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -6609,7 +6637,7 @@ interface IBaseElement {
|
|
|
6609
6637
|
activate(): void;
|
|
6610
6638
|
}
|
|
6611
6639
|
|
|
6612
|
-
type CoreCallbacks = Pick<CoreConfiguration, 'beforeRedirect' | 'beforeSubmit' | 'onSubmit' | 'onAdditionalDetails' | 'onPaymentFailed' | 'onPaymentCompleted' | 'onOrderUpdated' | 'onPaymentMethodsRequest' | 'onChange' | 'onActionHandled' | 'onError' | 'onEnterKeyPressed' | 'donation'>;
|
|
6640
|
+
type CoreCallbacks = Pick<CoreConfiguration, 'beforeRedirect' | 'beforeSubmit' | 'onSubmit' | 'onReview' | 'onAdditionalDetails' | 'onPaymentFailed' | 'onPaymentCompleted' | 'onOrderUpdated' | 'onPaymentMethodsRequest' | 'onChange' | 'onActionHandled' | 'onError' | 'onEnterKeyPressed' | 'donation'>;
|
|
6613
6641
|
type StatusFromAction = 'redirect' | 'loading' | 'custom';
|
|
6614
6642
|
type UIElementProps = {
|
|
6615
6643
|
paymentMethodId?: string;
|
|
@@ -6720,7 +6748,7 @@ interface DonationOptions {
|
|
|
6720
6748
|
}
|
|
6721
6749
|
interface DonationCampaignOptions {
|
|
6722
6750
|
rootNode: HTMLElement | string;
|
|
6723
|
-
commercialTxAmount
|
|
6751
|
+
commercialTxAmount?: number;
|
|
6724
6752
|
}
|
|
6725
6753
|
/**
|
|
6726
6754
|
* Union type for Donation component instantiation.
|
|
@@ -6872,6 +6900,7 @@ interface ICore {
|
|
|
6872
6900
|
getComponent(txVariant: string): NewableComponent | undefined;
|
|
6873
6901
|
createFromAction(action: PaymentAction, options?: any): UIElement;
|
|
6874
6902
|
storeElementReference(element: UIElement): void;
|
|
6903
|
+
processPayment(data: PaymentData): void;
|
|
6875
6904
|
options: CoreConfiguration;
|
|
6876
6905
|
modules: CoreModules;
|
|
6877
6906
|
paymentMethodsResponse: PaymentMethods$1;
|
|
@@ -6887,6 +6916,7 @@ type CoreModules = Readonly<{
|
|
|
6887
6916
|
type PaymentCompletedData = SessionsResponse | {
|
|
6888
6917
|
resultCode: ResultCode;
|
|
6889
6918
|
donationToken?: string;
|
|
6919
|
+
askDonation?: boolean;
|
|
6890
6920
|
};
|
|
6891
6921
|
type PaymentFailedData = SessionsResponse | {
|
|
6892
6922
|
resultCode: ResultCode;
|
|
@@ -6899,6 +6929,9 @@ type SubmitActions = {
|
|
|
6899
6929
|
resolve: (response: CheckoutAdvancedFlowResponse) => void;
|
|
6900
6930
|
reject: (error?: Pick<CheckoutAdvancedFlowResponse, 'error'>) => void;
|
|
6901
6931
|
};
|
|
6932
|
+
type ReviewDetails = {
|
|
6933
|
+
orderStatus?: OrderStatus;
|
|
6934
|
+
};
|
|
6902
6935
|
type AdditionalDetailsData = {
|
|
6903
6936
|
data: {
|
|
6904
6937
|
details: {
|
|
@@ -6915,12 +6948,7 @@ type AdditionalDetailsActions = {
|
|
|
6915
6948
|
reject: () => void;
|
|
6916
6949
|
};
|
|
6917
6950
|
type BeforeSubmitActions = {
|
|
6918
|
-
resolve: (data: PaymentData
|
|
6919
|
-
billingAddress?: AddressData;
|
|
6920
|
-
deliveryAddress?: AddressData;
|
|
6921
|
-
shopperEmail?: string;
|
|
6922
|
-
shopperName?: string;
|
|
6923
|
-
}) => void;
|
|
6951
|
+
resolve: (data: PaymentData) => void;
|
|
6924
6952
|
reject: () => void;
|
|
6925
6953
|
};
|
|
6926
6954
|
type OnChangeData = {
|
|
@@ -7066,6 +7094,17 @@ interface CoreConfiguration {
|
|
|
7066
7094
|
* @param actions
|
|
7067
7095
|
*/
|
|
7068
7096
|
onSubmit?(state: SubmitData, component: UIElement, actions: SubmitActions): void;
|
|
7097
|
+
/**
|
|
7098
|
+
* Called before the payment is submitted, allowing the shopper to review their payment details.
|
|
7099
|
+
*
|
|
7100
|
+
* Note: payment methods that manage their own payment submission internally (e.g. Klarna (Klarna widget flow), PayPal, Apple Pay, Google Pay, AmazonPay, ANCV, PayByBankPix)
|
|
7101
|
+
* bypass this callback internally to avoid interrupting their native experiences.
|
|
7102
|
+
*
|
|
7103
|
+
* @param state
|
|
7104
|
+
* @param component
|
|
7105
|
+
* @param reviewDetails - Additional data relevant to the review page. Currently holds the 'orderStatus', when a partial payment order is in progress.
|
|
7106
|
+
*/
|
|
7107
|
+
onReview?(state: PaymentData, component: UIElement, reviewDetails: ReviewDetails): void;
|
|
7069
7108
|
/**
|
|
7070
7109
|
* Callback used in the Advanced flow to perform the /payments/details API call.
|
|
7071
7110
|
*
|
|
@@ -7087,6 +7126,12 @@ interface CoreConfiguration {
|
|
|
7087
7126
|
* @internal - used by PBL
|
|
7088
7127
|
*/
|
|
7089
7128
|
afterAdditionalDetails?(component: UIElement): void;
|
|
7129
|
+
/**
|
|
7130
|
+
* Callback called when an action (for example a QR code or 3D Secure 2 authentication screen) needs to be mounted by the merchant.
|
|
7131
|
+
*
|
|
7132
|
+
* @param actionElement - The UIElement representing the action, which needs to get mounted on the page for the user to interact with.
|
|
7133
|
+
*/
|
|
7134
|
+
onAction?(actionElement: UIElement): void;
|
|
7090
7135
|
/**
|
|
7091
7136
|
* Callback called when an action (for example a QR code or 3D Secure 2 authentication screen) is shown to the shopper.
|
|
7092
7137
|
*
|
|
@@ -7281,6 +7326,7 @@ declare abstract class UIElement<P extends UIElementProps = UIElementProps> exte
|
|
|
7281
7326
|
protected onChange(): void;
|
|
7282
7327
|
protected submitAnalytics(event: AbstractAnalyticsEvent): void;
|
|
7283
7328
|
submit(): void;
|
|
7329
|
+
executePaymentsCall(): void;
|
|
7284
7330
|
protected makePaymentsCall(): Promise<CheckoutAdvancedFlowResponse | CheckoutSessionPaymentResponse>;
|
|
7285
7331
|
private submitUsingAdvancedFlow;
|
|
7286
7332
|
private submitUsingSessionsFlow;
|
|
@@ -7627,12 +7673,26 @@ interface PaymentData extends PaymentMethodData {
|
|
|
7627
7673
|
storePaymentMethod?: boolean;
|
|
7628
7674
|
billingAddress?: AddressData;
|
|
7629
7675
|
deliveryAddress?: AddressData;
|
|
7676
|
+
socialSecurityNumber?: string;
|
|
7677
|
+
installments?: {
|
|
7678
|
+
value: number;
|
|
7679
|
+
};
|
|
7680
|
+
shopperEmail?: string;
|
|
7681
|
+
shopperName?: {
|
|
7682
|
+
firstName: string;
|
|
7683
|
+
lastName: string;
|
|
7684
|
+
};
|
|
7685
|
+
telephoneNumber?: string;
|
|
7686
|
+
dateOfBirth?: string;
|
|
7687
|
+
bankAccount?: BankDetailsSchema;
|
|
7688
|
+
beneficiaryId?: string;
|
|
7630
7689
|
}
|
|
7631
7690
|
type ResultCode = 'AuthenticationFinished' | 'AuthenticationNotRequired' | 'Authorised' | 'Cancelled' | 'ChallengeShopper' | 'Error' | 'IdentifyShopper' | 'PartiallyAuthorised' | 'Pending' | 'PresentToShopper' | 'Received' | 'RedirectShopper' | 'Refused';
|
|
7632
7691
|
type SessionsResponse = {
|
|
7633
7692
|
sessionData: string;
|
|
7634
7693
|
sessionResult: string;
|
|
7635
7694
|
resultCode: ResultCode;
|
|
7695
|
+
askDonation?: boolean;
|
|
7636
7696
|
};
|
|
7637
7697
|
interface PaymentMethodsRequestData {
|
|
7638
7698
|
order?: Order;
|
|
@@ -8248,6 +8308,7 @@ declare class PayMeElement extends QRLoaderContainer {
|
|
|
8248
8308
|
}) => void;
|
|
8249
8309
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
8250
8310
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
8311
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
8251
8312
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
8252
8313
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
8253
8314
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -8338,6 +8399,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8338
8399
|
}) => void;
|
|
8339
8400
|
beforeSubmit?: (state: PaymentData, component: UIElement, actions: BeforeSubmitActions) => Promise<void> | void;
|
|
8340
8401
|
onSubmit?: (state: SubmitData, component: UIElement, actions: SubmitActions) => void;
|
|
8402
|
+
onReview?: (state: PaymentData, component: UIElement, reviewDetails: ReviewDetails) => void;
|
|
8341
8403
|
onActionHandled?: (actionHandled: ActionHandledReturnObject) => void;
|
|
8342
8404
|
onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
8343
8405
|
onChange?: (state: OnChangeData, component: UIElement) => void;
|
|
@@ -8710,6 +8772,7 @@ declare class Core implements ICore {
|
|
|
8710
8772
|
* @returns props for a new UIElement
|
|
8711
8773
|
*/
|
|
8712
8774
|
getCorePropsForComponent(): any;
|
|
8775
|
+
processPayment(data: PaymentData): void;
|
|
8713
8776
|
storeElementReference(element: UIElement): void;
|
|
8714
8777
|
/**
|
|
8715
8778
|
* @internal
|
|
@@ -8735,4 +8798,4 @@ declare namespace AdyenCheckout {
|
|
|
8735
8798
|
}
|
|
8736
8799
|
|
|
8737
8800
|
export { ANCVElement as ANCV, AchElement as Ach, AddressElement as Address, AdyenCheckout, AdyenCheckoutError, Affirm, AfterPay, AfterPayB2B, AmazonPayElement as AmazonPay, ApplePayElement as ApplePay, Atome, BacsElement as BacsDirectDebit, BancontactElement as Bancontact, BankTransferElement as BankTransfer, BCMCMobileElement as BcmcMobile, BillDeskOnlineElement as BillDeskOnline, BillDeskWalletElement as BillDeskWallet, BlikElement as Blik, BoletoElement as Boleto, CardElement as Card, CashAppPay, ClickToPayElement as ClickToPay, Core, CustomCard, DokuElement as Doku, DonationElement as Donation, DotpayElement as Dotpay, DragonpayElement as Dragonpay, DropinElement as Dropin, DuitNowElement as DuitNow, EPSElement as EPS, EcontextElement as Econtext, FacilyPay10x as FacilPay10x, FacilyPay12x as FacilPay12x, FacilyPay3x as FacilPay3x, FacilyPay4x as FacilPay4x, FacilyPay6x as FacilPay6x, Fastlane, FastlaneSDK, GiftcardElement as Giftcard, GiropayElement as Giropay, GooglePay, Iris, IrisMode, KlarnaPayments as Klarna, MBWayElement as MBWay, MealVoucherFRElement as MealVoucherFR, MolPayEBankingMYElement as MolPayEBankingMY, MolPayEBankingTHElement as MolPayEBankingTH, MolPayEbankingVNElement as MolPayEBankingVN, MultibancoElement as Multibanco, OnlineBankingCZElement as OnlineBankingCZ, OnlineBankingFI, OnlineBankingINElement as OnlineBankingIN, OnlineBankingPL, OnlineBankingSKElement as OnlineBankingSK, OxxoElement as Oxxo, PayByBank, PayByBankPixElement as PayByBankPix, PayByBankUS, PayMeElement as PayMe, PayNowElement as PayNow, PaypalElement as PayPal, PayToElement as PayTo, PayuNetCashcardElement as PayuCashcard, PayuNetBankingElement as PayuNetBanking, PersonalDetailsElement as PersonalDetails, PixElement as Pix, PreAuthorizedDebitCanada, PromptPayElement as PromptPay, RatePay, RatePayDirectDebit, RedirectElement as Redirect, Riverty, SepaElement as SepaDirectDebit, SwishElement as Swish, ThreeDS2Challenge, ThreeDS2DeviceFingerprint, TrustlyElement as Trustly, TwintElement as Twint, UIElement, UPI, VippsElement as Vipps, WalletINElement as WalletIN, WeChatPayElement as WeChat, index_d as components, initializeFastlane };
|
|
8738
|
-
export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies, MandateFrequencyType, MandateType, OnChangeData, OpenInvoiceActiveFieldsets, OpenInvoiceConfiguration, OpenInvoiceFieldsetsRefs, OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError, OpenInvoiceStateValid, OpenInvoiceVisibility, Order, OrderButtonProps, OrderStatus, PayPalConfiguration, PayToConfiguration, PayToData, PayToPlaceholdersType, PayloadJSON, PaymentAction, PaymentActionsType, PaymentAmount, PaymentCompletedData, PaymentData, PaymentFailedData, PaymentMethodBrand, PaymentMethodData, PaymentMethodDisplayMode, PaymentMethodGroup, PaymentMethodOptions, PaymentMethods, PaymentMethodsConfiguration, PaymentMethodsRequestData, PaymentMethodsResponse, PaymentResponseData, PersonalDetailsSchema, PixConfiguration, PixElementData, PostMsgParseErrorObject, PreAuthorizedDebitCanadaConfiguration, PreAuthorizedDebitCanadaPlaceholders, ProcessedPaymentStatusResponse, QRLoaderConfiguration, RawPaymentMethod, RawPaymentResponse, RawPaymentStatusResponse, RawStoredPaymentMethod, RecurringMetadata, RedirectConfiguration, Region, ResultCode, ResultObject, ResultValue, SepaConfiguration, SepaElementData, SessionsResponse, SignOutButtonProps, SocialSecurityMode, StatusFromAction, SubmitActions, SubmitData, SupportedLocale, SupportedPayPalFundingSources, ThreeDS2ActionProps, ThreeDS2ChallengeConfiguration, ThreeDS2ConfigProps, ThreeDS2DeviceFingerprintConfiguration, ThreeDS2FingerprintResponse, ThreeDS2FlowObject, ThreeDS2FlowProps, ThreeDS2Token, UIElementProps, UIElementStatus, UPIAppList, UPIConfiguration, UpdateAmazonCheckoutSessionRequest, UpiMode, UpiPaymentData, UpiType, ValidationError, VoucherConfiguration, VoucherDetail, VoucherProps, balanceCheckResponseType, onBalanceCheckCallbackType, onOrderCancelData, onOrderCancelInternalCallback, onOrderCancelType, onOrderRequestCallbackType, onOrderUpdatedCallbackType, onRequiringConfirmationCallbackType };
|
|
8801
|
+
export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies, MandateFrequencyType, MandateType, OnChangeData, OpenInvoiceActiveFieldsets, OpenInvoiceConfiguration, OpenInvoiceFieldsetsRefs, OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError, OpenInvoiceStateValid, OpenInvoiceVisibility, Order, OrderButtonProps, OrderStatus, PayPalConfiguration, PayToConfiguration, PayToData, PayToPlaceholdersType, PayloadJSON, PaymentAction, PaymentActionsType, PaymentAmount, PaymentCompletedData, PaymentData, PaymentFailedData, PaymentMethodBrand, PaymentMethodData, PaymentMethodDisplayMode, PaymentMethodGroup, PaymentMethodOptions, PaymentMethods, PaymentMethodsConfiguration, PaymentMethodsRequestData, PaymentMethodsResponse, PaymentResponseData, PersonalDetailsSchema, PixConfiguration, PixElementData, PostMsgParseErrorObject, PreAuthorizedDebitCanadaConfiguration, PreAuthorizedDebitCanadaPlaceholders, ProcessedPaymentStatusResponse, QRLoaderConfiguration, RawPaymentMethod, RawPaymentResponse, RawPaymentStatusResponse, RawStoredPaymentMethod, RecurringMetadata, RedirectConfiguration, Region, ResultCode, ResultObject, ResultValue, ReviewDetails, SepaConfiguration, SepaElementData, SessionsResponse, SignOutButtonProps, SocialSecurityMode, StatusFromAction, SubmitActions, SubmitData, SupportedLocale, SupportedPayPalFundingSources, ThreeDS2ActionProps, ThreeDS2ChallengeConfiguration, ThreeDS2ConfigProps, ThreeDS2DeviceFingerprintConfiguration, ThreeDS2FingerprintResponse, ThreeDS2FlowObject, ThreeDS2FlowProps, ThreeDS2Token, UIElementProps, UIElementStatus, UPIAppList, UPIConfiguration, UpdateAmazonCheckoutSessionRequest, UpiMode, UpiPaymentData, UpiType, ValidationError, VoucherConfiguration, VoucherDetail, VoucherProps, balanceCheckResponseType, onBalanceCheckCallbackType, onOrderCancelData, onOrderCancelInternalCallback, onOrderCancelType, onOrderRequestCallbackType, onOrderUpdatedCallbackType, onRequiringConfirmationCallbackType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=(e,t,n,r)=>{if(e[n]?.[t]?.formatterFn)return null;const u=e[n]?.[t]?.maxlength;return u||30},t=e=>!(null!=e&&!/^[\s]*$/.test(e)),n="(?:[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\p{Cc}\\p{Cf}]|[0-9#*]\\uFE0F?\\u20E3)",[r,u]=(()=>{try{return[new RegExp(n,"u"),new RegExp(n,"gu")]}catch{const e="[\\u0000-\\u001F\\u007F-\\u009F]";return[new RegExp(e),new RegExp(e,"g")]}})(),g=(e,t="g")=>new RegExp(`[${e}]`,t),p=e=>!e.length||!r.test(e),c=e=>e.replace(u,""),l=e=>e.trim().replace(/\s+/g," ");export{g as getFormattingRegEx,e as getMaxLengthByFieldAndCountry,t as isEmpty,c as stripInvalidChars,l as trimValWithOneSpace,p as validateForSpecialChars};
|
|
2
2
|
//# sourceMappingURL=validator-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator-utils.js","sources":["../../../src/utils/validator-utils.ts"],"sourcesContent":["import { CountryFormatRules } from './Validator/types';\n\nconst MAX_LENGTH = 30;\n\nexport const getMaxLengthByFieldAndCountry = (\n formattingRules: CountryFormatRules,\n field: string,\n country: string,\n ignoreIfFormatterExists: boolean\n): number | null => {\n // In ignoreIfFormatterExists is true we expect the formatter function to also act to limit length\n if (ignoreIfFormatterExists && formattingRules[country]?.[field]?.formatterFn) {\n return null;\n }\n const maxLength = formattingRules[country]?.[field]?.maxlength;\n return maxLength ? maxLength : MAX_LENGTH;\n};\n\n// Not null or undefined or only spaces\nexport const isEmpty = (input: string) => !!(input == null || /^[\\s]*$/.test(input));\n\nexport const isString = (input: unknown) => typeof input === 'string' || input instanceof String;\nexport const hasText = (input: string) => isString(input) && !isEmpty(input);\n\
|
|
1
|
+
{"version":3,"file":"validator-utils.js","sources":["../../../src/utils/validator-utils.ts"],"sourcesContent":["import { CountryFormatRules } from './Validator/types';\n\nconst MAX_LENGTH = 30;\n\nexport const getMaxLengthByFieldAndCountry = (\n formattingRules: CountryFormatRules,\n field: string,\n country: string,\n ignoreIfFormatterExists: boolean\n): number | null => {\n // In ignoreIfFormatterExists is true we expect the formatter function to also act to limit length\n if (ignoreIfFormatterExists && formattingRules[country]?.[field]?.formatterFn) {\n return null;\n }\n const maxLength = formattingRules[country]?.[field]?.maxlength;\n return maxLength ? maxLength : MAX_LENGTH;\n};\n\n// Not null or undefined or only spaces\nexport const isEmpty = (input: string) => !!(input == null || /^[\\s]*$/.test(input));\n\nexport const isString = (input: unknown) => typeof input === 'string' || input instanceof String;\nexport const hasText = (input: string) => isString(input) && !isEmpty(input);\n\n// Block emojis and control/format characters, allow everything else\nconst INVALID_CHARS_REGEX_SOURCE = '(?:[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\p{Cc}\\\\p{Cf}]|[0-9#*]\\\\uFE0F?\\\\u20E3)';\nconst [INVALID_CHARS_TEST, INVALID_CHARS_STRIP] = ((): [RegExp, RegExp] => {\n try {\n // This is inside a try/catch just in case the browser doesn't support Unicode property escapes\n return [new RegExp(INVALID_CHARS_REGEX_SOURCE, 'u'), new RegExp(INVALID_CHARS_REGEX_SOURCE, 'gu')];\n } catch {\n // Fallback for browsers without Unicode property escapes - just block control chars\n const fallbackRegex = '[\\\\u0000-\\\\u001F\\\\u007F-\\\\u009F]';\n return [new RegExp(fallbackRegex), new RegExp(fallbackRegex, 'g')];\n }\n})();\n\n// Generates a regEx ideal for use in a String.replace call for use in a formatter\n// e.g. getFormattingRegEx('^\\\\d', 'g') will generate: /[^\\d]/g which is a regEx to match anything that is not a digit\nexport const getFormattingRegEx = (specChars: string, flags = 'g') => new RegExp(`[${specChars}]`, flags);\n\nexport const exactLength = (input: string, length: number) => {\n if (isEmpty(input)) {\n return true;\n }\n return input.length === length;\n};\n\nexport const validateForSpecialChars = (text: string): boolean => {\n if (!text.length) return true;\n // Returns true if no invalid characters found\n return !INVALID_CHARS_TEST.test(text);\n};\n\nexport const stripInvalidChars = (text: string): string => text.replace(INVALID_CHARS_STRIP, '');\n\n// Trim both ends and never allow more than 1 space in between\nexport const trimValWithOneSpace = (val: string) => val.trim().replace(/\\s+/g, ' ');\n"],"names":["getMaxLengthByFieldAndCountry","formattingRules","field","country","ignoreIfFormatterExists","formatterFn","maxLength","maxlength","isEmpty","input","test","INVALID_CHARS_REGEX_SOURCE","INVALID_CHARS_TEST","INVALID_CHARS_STRIP","RegExp","fallbackRegex","getFormattingRegEx","specChars","flags","validateForSpecialChars","text","length","stripInvalidChars","replace","trimValWithOneSpace","val","trim"],"mappings":"AAEA,MAEaA,EAAgC,CACzCC,EACAC,EACAC,EACAC,KAGA,GAA+BH,EAAgBE,KAAWD,IAAQG,YAC9D,OAAO,KAEX,MAAMC,EAAYL,EAAgBE,KAAWD,IAAQK,UACrD,OAAOD,GAbQ,IAiBNE,EAAWC,KAA8B,MAATA,IAAiB,UAAUC,KAAKD,IAMvEE,EAA6B,gGAC5BC,EAAoBC,GAAuB,MAC9C,IAEI,MAAO,CAAC,IAAIC,OAAOH,EAA4B,KAAM,IAAIG,OAAOH,EAA4B,MAChG,CAAE,MAEE,MAAMI,EAAgB,mCACtB,MAAO,CAAC,IAAID,OAAOC,GAAgB,IAAID,OAAOC,EAAe,KACjE,CACJ,EATkD,GAarCC,EAAqB,CAACC,EAAmBC,EAAQ,MAAQ,IAAIJ,OAAO,IAAIG,KAAcC,GAStFC,EAA2BC,IAC/BA,EAAKC,SAEFT,EAAmBF,KAAKU,GAGvBE,EAAqBF,GAAyBA,EAAKG,QAAQV,EAAqB,IAGhFW,EAAuBC,GAAgBA,EAAIC,OAAOH,QAAQ,OAAQ"}
|