@adyen/adyen-web 5.30.1 → 5.31.1

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.
Files changed (59) hide show
  1. package/dist/adyen.css +4 -5
  2. package/dist/adyen.css.map +1 -1
  3. package/dist/adyen.js +1 -1
  4. package/dist/adyen.js.map +1 -1
  5. package/dist/cjs/adyen.css +4 -5
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +4 -5
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/index.js +1 -1
  11. package/dist/es.modern/adyen.css +4 -5
  12. package/dist/es.modern/adyen.css.map +1 -1
  13. package/dist/es.modern/index.js +1 -1
  14. package/dist/types/components/BacsDD/components/validate.d.ts +2 -2
  15. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +2 -0
  16. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -1
  17. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
  18. package/dist/types/components/Card/components/CardInput/types.d.ts +3 -2
  19. package/dist/types/components/Card/components/CardInput/utils.d.ts +2 -8
  20. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +2 -1
  21. package/dist/types/components/Card/components/ClickToPay/models/ShopperCard.d.ts +1 -0
  22. package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +1 -0
  23. package/dist/types/components/Card/components/ClickToPay/services/utils.d.ts +1 -0
  24. package/dist/types/components/Dropin/Dropin.d.ts +1 -3
  25. package/dist/types/components/DuitNow/DuitNow.d.ts +2 -0
  26. package/dist/types/components/GooglePay/GooglePay.d.ts +1 -1
  27. package/dist/types/components/GooglePay/components/GooglePayButton.d.ts +1 -0
  28. package/dist/types/components/GooglePay/types.d.ts +1 -0
  29. package/dist/types/components/Oxxo/Oxxo.d.ts +4 -9
  30. package/dist/types/components/Oxxo/Oxxo.spec.d.ts +1 -0
  31. package/dist/types/components/Oxxo/types.d.ts +5 -0
  32. package/dist/types/components/PayNow/PayNow.d.ts +2 -0
  33. package/dist/types/components/Pix/Pix.d.ts +7 -56
  34. package/dist/types/components/Pix/PixInput/PixInput.d.ts +2 -7
  35. package/dist/types/components/Pix/PixInput/types.d.ts +26 -0
  36. package/dist/types/components/Pix/types.d.ts +8 -13
  37. package/dist/types/components/PromptPay/PromptPay.d.ts +2 -0
  38. package/dist/types/components/Swish/Swish.d.ts +2 -0
  39. package/dist/types/components/ThreeDS2/ThreeDS2Challenge.d.ts +1 -2
  40. package/dist/types/components/ThreeDS2/config.d.ts +1 -2
  41. package/dist/types/components/ThreeDS2/types.d.ts +2 -2
  42. package/dist/types/components/WeChat/WeChat.d.ts +2 -0
  43. package/dist/types/components/helpers/QRLoaderContainer.d.ts +2 -0
  44. package/dist/types/components/internal/Address/Address.d.ts +1 -0
  45. package/dist/types/components/internal/Address/constants.d.ts +1 -8
  46. package/dist/types/components/internal/Address/validate.d.ts +7 -0
  47. package/dist/types/components/internal/FormFields/ConsentCheckbox/ConsentCheckbox.d.ts +2 -1
  48. package/dist/types/components/internal/IFrame/Iframe.d.ts +3 -10
  49. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
  50. package/dist/types/components/types.d.ts +1 -0
  51. package/dist/types/core/RiskModule/constants.d.ts +0 -6
  52. package/dist/types/utils/Formatters/formatters.d.ts +2 -0
  53. package/dist/types/utils/Formatters/types.d.ts +7 -0
  54. package/dist/types/utils/Validator/types.d.ts +2 -7
  55. package/dist/types/utils/get-process-message-handler.d.ts +1 -2
  56. package/dist/types/utils/useForm/types.d.ts +9 -0
  57. package/package.json +9 -9
  58. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/CtPEmptyCardsList.d.ts +0 -4
  59. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/index.d.ts +0 -1
@@ -1,6 +1,6 @@
1
1
  import { ValidatorRules } from '../../../utils/Validator/types';
2
2
  export declare const bacsValidationRules: ValidatorRules;
3
3
  export declare const bacsFormatters: {
4
- bankAccountNumber: (value: any) => any;
5
- bankLocationId: (value: any) => any;
4
+ bankAccountNumber: import("../../../utils/Formatters/types").FormatterFn;
5
+ bankLocationId: import("../../../utils/Formatters/types").FormatterFn;
6
6
  };
@@ -10,7 +10,9 @@ declare class BCMCMobileElement extends QRLoaderContainer {
10
10
  shouldRedirectOnMobile: boolean;
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
+ introduction: string;
13
14
  instructions?: string;
15
+ copyBtn?: boolean;
14
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
15
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
16
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, billingAddressRef, partialAddressSchema, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField }: {
2
+ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, billingAddressRef, partialAddressSchema, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField }: {
3
3
  data: any;
4
4
  valid: any;
5
5
  errors: any;
@@ -37,6 +37,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
37
37
  billingAddressRequired: any;
38
38
  billingAddressRequiredFields: any;
39
39
  billingAddressAllowedCountries: any;
40
+ billingAddressValidationRules?: any;
40
41
  brandsConfiguration: any;
41
42
  enableStoreDetails: any;
42
43
  hasCVC: any;
@@ -20,6 +20,7 @@ declare const _default: {
20
20
  };
21
21
  autoFocus: boolean;
22
22
  isPayButtonPrimaryVariant: boolean;
23
+ disableIOSArrowKeys: boolean;
23
24
  onLoad: () => any;
24
25
  onConfigSuccess: () => any;
25
26
  onAllValid: () => any;
@@ -1,6 +1,6 @@
1
1
  import Language from '../../../../language/Language';
2
2
  import { BinLookupResponse, BrandConfiguration, CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement } from '../../types';
3
- import { PaymentAmount } from '../../../../types';
3
+ import { AddressData, PaymentAmount } from '../../../../types';
4
4
  import { InstallmentOptions } from './components/types';
5
5
  import { ValidationResult } from '../../../internal/PersonalDetails/types';
6
6
  import { CVCPolicyType, DatePolicyType } from '../../../internal/SecuredFields/lib/types';
@@ -31,7 +31,7 @@ export interface CardInputErrorState {
31
31
  }
32
32
  export interface CardInputDataState {
33
33
  holderName?: string;
34
- billingAddress?: object;
34
+ billingAddress?: AddressData;
35
35
  socialSecurityNumber?: string;
36
36
  taxNumber?: string;
37
37
  }
@@ -60,6 +60,7 @@ export interface CardInputProps {
60
60
  countryCode?: string;
61
61
  cvcPolicy?: CVCPolicyType;
62
62
  data?: CardInputDataState;
63
+ disableIOSArrowKeys?: boolean;
63
64
  enableStoreDetails?: boolean;
64
65
  expiryMonth?: string;
65
66
  expiryYear?: string;
@@ -1,5 +1,6 @@
1
1
  import { ErrorPanelObj } from '../../../../core/Errors/ErrorPanel';
2
2
  import { AddressModeOptions, CardInputProps, LayoutObj, SortErrorsObj } from './types';
3
+ import { AddressSpecifications } from '../../../internal/Address/types';
3
4
  import { InstallmentsObj } from './components/Installments/Installments';
4
5
  import { SFPProps } from '../../../internal/SecuredFields/SFP/types';
5
6
  export declare const getCardImageUrl: (brand: string, loadingContext: string) => string;
@@ -32,11 +33,4 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
32
33
  expiryYear: string;
33
34
  };
34
35
  export declare const extractPropsForSFP: (props: CardInputProps) => SFPProps;
35
- export declare const handlePartialAddressMode: (addressMode: AddressModeOptions) => any[] | {
36
- default: {
37
- labels: {
38
- postalCode: string;
39
- };
40
- schema: "postalCode"[];
41
- };
42
- };
36
+ export declare const handlePartialAddressMode: (addressMode: AddressModeOptions) => AddressSpecifications | null;
@@ -3,8 +3,9 @@ import ShopperCard from '../../../models/ShopperCard';
3
3
  import './CtPCardsList.scss';
4
4
  declare type CtPCardsListProps = {
5
5
  cards: ShopperCard[];
6
+ cardSelected: ShopperCard;
6
7
  errorMessage?: string;
7
8
  onChangeCard(card: ShopperCard): void;
8
9
  };
9
- declare const CtPCardsList: ({ cards, errorMessage, onChangeCard }: CtPCardsListProps) => h.JSX.Element;
10
+ declare const CtPCardsList: ({ cardSelected, cards, errorMessage, onChangeCard }: CtPCardsListProps) => h.JSX.Element;
10
11
  export default CtPCardsList;
@@ -15,6 +15,7 @@ declare class ShopperCard {
15
15
  private status?;
16
16
  constructor(maskedCard: SrcCard, scheme: ClickToPayScheme, srcCorrelationId: string);
17
17
  get title(): string;
18
+ get isDcfPopupEmbedded(): boolean;
18
19
  private confirmCardIsExpired;
19
20
  }
20
21
  export default ShopperCard;
@@ -50,6 +50,7 @@ export declare type SrcCard = {
50
50
  export declare type SrcCheckoutParams = {
51
51
  srcCorrelationId: string;
52
52
  srcDigitalCardId: string;
53
+ windowRef?: Window;
53
54
  };
54
55
  export interface SrcInitParams {
55
56
  srcInitiatorId: string;
@@ -1,6 +1,7 @@
1
1
  import { ClickToPayCheckoutPayload, SrcProfileWithScheme } from './types';
2
2
  import { SrciCheckoutResponse } from './sdks/types';
3
3
  import ShopperCard from '../models/ShopperCard';
4
+ export declare const CTP_IFRAME_NAME = "ctpIframe";
4
5
  /**
5
6
  * Creates the payload for the /payments call
6
7
  */
@@ -59,9 +59,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
59
59
  isInstantPayment?: boolean;
60
60
  type?: string;
61
61
  name?: string;
62
- icon?: string; /**
63
- * Calls the onSubmit event with the state of the activePaymentMethod
64
- */
62
+ icon?: string;
65
63
  amount?: import("../../types").PaymentAmount;
66
64
  secondaryAmount?: import("../../types").PaymentAmountExtended;
67
65
  showPayButton?: boolean;
@@ -10,7 +10,9 @@ declare class DuitNowElement extends QRLoaderContainer {
10
10
  shouldRedirectOnMobile?: boolean;
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
+ introduction: string;
13
14
  instructions?: string;
15
+ copyBtn?: boolean;
14
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
15
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
16
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -43,7 +43,7 @@ declare class GooglePay extends UIElement<GooglePayProps> {
43
43
  * Formats the component data input
44
44
  * For legacy support - maps configuration.merchantIdentifier to configuration.merchantId
45
45
  */
46
- formatProps(props: any): any;
46
+ formatProps(props: any): GooglePayProps;
47
47
  /**
48
48
  * Formats the component data output
49
49
  */
@@ -6,6 +6,7 @@ interface GooglePayButtonProps {
6
6
  buttonType: google.payments.api.ButtonType;
7
7
  buttonSizeMode: google.payments.api.ButtonSizeMode;
8
8
  buttonLocale: string;
9
+ buttonRootNode?: HTMLDocument | ShadowRoot;
9
10
  paymentsClient: Promise<google.payments.api.PaymentsClient>;
10
11
  onClick: (e: Event) => void;
11
12
  }
@@ -105,6 +105,7 @@ export interface GooglePayProps extends UIElementProps {
105
105
  buttonColor?: google.payments.api.ButtonColor;
106
106
  buttonType?: google.payments.api.ButtonType;
107
107
  buttonSizeMode?: google.payments.api.ButtonSizeMode;
108
+ buttonRootNode?: HTMLDocument | ShadowRoot;
108
109
  buttonLocale?: string;
109
110
  onClick?: (resolve: any, reject: any) => void;
110
111
  onAuthorized?: (paymentData: google.payments.api.PaymentData) => void;
@@ -1,17 +1,12 @@
1
1
  import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
+ import { OxxoElementData } from './types';
4
+ import { UIElementProps } from '../types';
3
5
  export declare class OxxoElement extends UIElement {
4
6
  static type: string;
7
+ protected static defaultProps: UIElementProps;
5
8
  get isValid(): boolean;
6
- formatProps(props: any): any;
7
- /**
8
- * Formats the component data output
9
- */
10
- formatData(): {
11
- paymentMethod: {
12
- type: any;
13
- };
14
- };
9
+ formatData(): OxxoElementData;
15
10
  private handleRef;
16
11
  render(): h.JSX.Element;
17
12
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -9,3 +9,8 @@ export interface OxxoVoucherResultProps {
9
9
  downloadUrl?: string;
10
10
  ref?: any;
11
11
  }
12
+ export declare type OxxoElementData = {
13
+ paymentMethod: {
14
+ type: 'oxxo' | string;
15
+ };
16
+ };
@@ -10,7 +10,9 @@ declare class PayNowElement extends QRLoaderContainer {
10
10
  shouldRedirectOnMobile?: boolean;
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
+ introduction: string;
13
14
  instructions?: string;
15
+ copyBtn?: boolean;
14
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
15
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
16
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -1,6 +1,6 @@
1
- import QRLoaderContainer from '../helpers/QRLoaderContainer';
2
1
  import { h } from 'preact';
3
- import { PixProps } from './types';
2
+ import QRLoaderContainer from '../helpers/QRLoaderContainer';
3
+ import { PixElementData, PixProps } from './types';
4
4
  declare class PixElement extends QRLoaderContainer<PixProps> {
5
5
  static type: string;
6
6
  static defaultProps: {
@@ -9,63 +9,14 @@ declare class PixElement extends QRLoaderContainer<PixProps> {
9
9
  paymentData: any;
10
10
  onError: () => void;
11
11
  onComplete: () => void;
12
+ showPayButton: boolean;
12
13
  personalDetailsRequired: boolean;
13
- };
14
- get isValid(): boolean;
15
- formatProps(props: any): {
16
- personalDetailsRequired?: boolean;
17
- delay: number;
18
14
  countdownTime: number;
19
- type?: string;
20
- brandLogo?: string;
21
- buttonLabel?: string;
22
- shouldRedirectOnMobile?: boolean;
23
- qrCodeImage?: string;
24
- paymentData?: string;
25
- instructions?: string;
26
- session?: import("../../core/CheckoutSession/CheckoutSession").default;
27
- onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
28
- onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
29
- beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
30
- onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
31
- onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
32
- onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
33
- onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
34
- onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
35
- beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
36
- isInstantPayment?: boolean;
37
- name?: string;
38
- icon?: string;
39
- amount?: import("../../types").PaymentAmount;
40
- secondaryAmount?: import("../../types").PaymentAmountExtended;
41
- showPayButton?: boolean;
42
- setStatusAutomatically?: boolean;
43
- payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
44
- loadingContext?: string;
45
- createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
46
- clientKey?: string;
47
- elementRef?: any;
48
- i18n?: import("../../language").default;
49
- _parentInstance?: import("../../core/core").default;
50
- order?: import("../../types").Order;
51
- modules?: {
52
- analytics: import("../../core/Analytics/Analytics").default;
53
- risk: import("../../core/RiskModule").default;
54
- };
55
- isDropin?: boolean;
56
- copyBtn: boolean;
57
- introduction: string;
58
- };
59
- formatData(): {
60
- socialSecurityNumber: any;
61
- shopperName: {
62
- firstName: any;
63
- lastName: any;
64
- };
65
- paymentMethod: {
66
- type: any;
67
- };
15
+ delay: number;
68
16
  };
17
+ get isValid(): boolean;
18
+ formatProps(props: any): PixProps;
19
+ formatData(): PixElementData;
69
20
  render(): h.JSX.Element;
70
21
  }
71
22
  export default PixElement;
@@ -1,9 +1,4 @@
1
1
  import { h } from 'preact';
2
- declare function PixInput(props: any): h.JSX.Element;
3
- declare namespace PixInput {
4
- var defaultProps: {
5
- data: {};
6
- personalDetailsRequired: boolean;
7
- };
8
- }
2
+ import { PixInputProps } from './types';
3
+ declare function PixInput({ name, data: dataProps, personalDetailsRequired, showPayButton, onChange, payButton }: PixInputProps): h.JSX.Element;
9
4
  export default PixInput;
@@ -0,0 +1,26 @@
1
+ import { h, RefObject } from 'preact';
2
+ import { PayButtonFunctionProps } from '../../types';
3
+ import PixInput from './PixInput';
4
+ export interface PixInputDataState {
5
+ firstName?: string;
6
+ lastName?: string;
7
+ socialSecurityNumber?: string;
8
+ }
9
+ export interface PixInputProps {
10
+ name: string;
11
+ data?: {
12
+ firstName: string;
13
+ lastName: string;
14
+ socialSecurityNumber: string;
15
+ };
16
+ personalDetailsRequired: boolean;
17
+ showPayButton: boolean;
18
+ onChange({ data, valid, errors, isValid: boolean }: {
19
+ data: any;
20
+ valid: any;
21
+ errors: any;
22
+ isValid: any;
23
+ }): void;
24
+ payButton(props: PayButtonFunctionProps): h.JSX.Element;
25
+ ref(ref: RefObject<typeof PixInput>): void;
26
+ }
@@ -2,18 +2,13 @@ import { QRLoaderContainerProps } from '../helpers/QRLoaderContainer';
2
2
  export interface PixProps extends QRLoaderContainerProps {
3
3
  personalDetailsRequired?: boolean;
4
4
  }
5
- export interface PixInputDataState {
6
- firstName?: string;
7
- lastName?: string;
5
+ export interface PixElementData {
6
+ paymentMethod: {
7
+ type: 'pix';
8
+ };
9
+ shopperName?: {
10
+ firstName: string;
11
+ lastName: string;
12
+ };
8
13
  socialSecurityNumber?: string;
9
14
  }
10
- export interface PixInputValidState {
11
- firstName?: boolean;
12
- lastName?: boolean;
13
- socialSecurityNumber?: boolean;
14
- }
15
- export interface PixInputErrorState {
16
- firstName?: boolean;
17
- lastName?: boolean;
18
- socialSecurityNumber?: boolean;
19
- }
@@ -10,7 +10,9 @@ declare class PromptPayElement extends QRLoaderContainer {
10
10
  shouldRedirectOnMobile?: boolean;
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
+ introduction: string;
13
14
  instructions?: string;
15
+ copyBtn?: boolean;
14
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
15
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
16
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -10,7 +10,9 @@ declare class SwishElement extends QRLoaderContainer {
10
10
  shouldRedirectOnMobile: boolean;
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
+ introduction: string;
13
14
  instructions: string;
15
+ copyBtn?: boolean;
14
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
15
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
16
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -2,12 +2,11 @@ import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
3
  import { ErrorCodeObject } from './components/utils';
4
4
  import Language from '../../language';
5
- import { ThreeDS2ChallengeRejectObject } from './types';
6
5
  export interface ThreeDS2ChallengeProps {
7
6
  token?: string;
8
7
  dataKey?: string;
9
8
  notificationURL?: string;
10
- onError?: (error: string | ErrorCodeObject | ThreeDS2ChallengeRejectObject) => void;
9
+ onError?: (error: string | ErrorCodeObject) => void;
11
10
  paymentData?: string;
12
11
  size?: string;
13
12
  challengeWindowSize?: '01' | '02' | '03' | '04' | '05';
@@ -1,8 +1,7 @@
1
- import { ThreeDS2FlowObject, ThreeDS2ChallengeRejectObject } from './types';
1
+ import { ThreeDS2FlowObject } from './types';
2
2
  export declare const DEFAULT_CHALLENGE_WINDOW_SIZE = "02";
3
3
  export declare const THREEDS_METHOD_TIMEOUT = 10000;
4
4
  export declare const CHALLENGE_TIMEOUT = 600000;
5
- export declare const CHALLENGE_UNKNOWN_ERROR_REJECT_OBJECT: ThreeDS2ChallengeRejectObject;
6
5
  export declare const CHALLENGE_TIMEOUT_REJECT_OBJECT: ThreeDS2FlowObject;
7
6
  export declare const FAILED_METHOD_STATUS_RESOLVE_OBJECT: ThreeDS2FlowObject;
8
7
  export declare const FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT: ThreeDS2FlowObject;
@@ -29,8 +29,8 @@ export interface ThreeDS2FlowObject {
29
29
  errorCode?: string;
30
30
  threeDSServerTransID?: string;
31
31
  }
32
- export interface ThreeDS2ChallengeRejectObject {
33
- type: 'challengeError';
32
+ export interface PostMsgParseErrorObject {
33
+ type?: string;
34
34
  comment?: string;
35
35
  extraInfo?: string;
36
36
  eventDataRaw?: string;
@@ -10,7 +10,9 @@ declare class WeChatPayElement extends QRLoaderContainer {
10
10
  shouldRedirectOnMobile?: boolean;
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
+ introduction: string;
13
14
  instructions?: string;
15
+ copyBtn?: boolean;
14
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
15
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
16
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -16,7 +16,9 @@ export interface QRLoaderContainerProps extends UIElementProps {
16
16
  shouldRedirectOnMobile?: boolean;
17
17
  qrCodeImage?: string;
18
18
  paymentData?: string;
19
+ introduction: string;
19
20
  instructions?: string;
21
+ copyBtn?: boolean;
20
22
  }
21
23
  declare class QRLoaderContainer<T extends QRLoaderContainerProps = QRLoaderContainerProps> extends UIElement<T> {
22
24
  protected static defaultProps: {
@@ -4,6 +4,7 @@ declare function Address(props: AddressProps): h.JSX.Element;
4
4
  declare namespace Address {
5
5
  var defaultProps: {
6
6
  countryCode: any;
7
+ validationRules: any;
7
8
  data: {};
8
9
  onChange: () => void;
9
10
  visibility: string;
@@ -3,12 +3,5 @@ export declare const FALLBACK_VALUE = "N/A";
3
3
  export declare const ADDRESS_SCHEMA: readonly ["street", "houseNumberOrName", "postalCode", "city", "stateOrProvince", "country"];
4
4
  export declare const STREET: "street", HOUSE_NUMBER_OR_NAME: "houseNumberOrName", POSTAL_CODE: "postalCode", CITY: "city", STATE_OR_PROVINCE: "stateOrProvince", COUNTRY: "country";
5
5
  export declare const ADDRESS_SPECIFICATIONS: AddressSpecifications;
6
- export declare const PARTIAL_ADDRESS_SCHEMA: {
7
- default: {
8
- labels: {
9
- postalCode: string;
10
- };
11
- schema: "postalCode"[];
12
- };
13
- };
6
+ export declare const PARTIAL_ADDRESS_SCHEMA: AddressSpecifications;
14
7
  export declare const COUNTRIES_WITH_CUSTOM_SPECIFICATION: string[];
@@ -1,2 +1,9 @@
1
1
  import { ValidatorRules } from '../../../utils/Validator/types';
2
+ /**
3
+ * Validates only postalCode property. As the partial address form does not have the country selector, the country value
4
+ * must be informed beforehand and can't be picked up from the form context
5
+ *
6
+ * @param country - Country that will be used to validate postal code
7
+ */
8
+ export declare const getPartialAddressValidationRules: (country: string) => ValidatorRules;
2
9
  export declare const getAddressValidationRules: (specifications: any) => ValidatorRules;
@@ -1,7 +1,8 @@
1
1
  import { h } from 'preact';
2
- export default function ConsentCheckbox({ errorMessage, label, onChange, ...props }: {
2
+ export default function ConsentCheckbox({ errorMessage, label, onChange, i18n, ...props }: {
3
3
  [x: string]: any;
4
4
  errorMessage: any;
5
5
  label: any;
6
6
  onChange: any;
7
+ i18n: any;
7
8
  }): h.JSX.Element;
@@ -9,6 +9,7 @@ interface IframeProps {
9
9
  allow?: string;
10
10
  name?: string;
11
11
  title?: string;
12
+ classNameModifiers?: string[];
12
13
  callback?: (contentWindow: any) => void;
13
14
  }
14
15
  declare class Iframe extends Component<IframeProps> {
@@ -20,20 +21,12 @@ declare class Iframe extends Component<IframeProps> {
20
21
  src: any;
21
22
  allow: any;
22
23
  title: string;
24
+ classNameModifiers: any[];
23
25
  };
24
26
  private iframeEl;
25
27
  iframeOnLoad(): void;
26
28
  componentDidMount(): void;
27
29
  componentWillUnmount(): void;
28
- render({ name, src, width, height, minWidth, minHeight, allow, title }: {
29
- name: any;
30
- src: any;
31
- width: any;
32
- height: any;
33
- minWidth: any;
34
- minHeight: any;
35
- allow: any;
36
- title: any;
37
- }): h.JSX.Element;
30
+ render({ name, src, width, height, minWidth, minHeight, allow, title, classNameModifiers }: IframeProps): h.JSX.Element;
38
31
  }
39
32
  export default Iframe;
@@ -11,7 +11,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
11
11
  export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
12
12
  export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
13
13
  export declare const GIFT_CARD = "giftcard";
14
- export declare const SF_VERSION = "4.3.2";
14
+ export declare const SF_VERSION = "4.3.3";
15
15
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
16
16
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
17
17
  export declare const CREDIT_CARD_SF_FIELDS: string[];
@@ -41,6 +41,7 @@ export interface PaymentResponse {
41
41
  resultCode: string;
42
42
  sessionData?: string;
43
43
  order?: Order;
44
+ sessionResult?: string;
44
45
  }
45
46
  export interface RawPaymentResponse extends PaymentResponse {
46
47
  [key: string]: any;
@@ -9,12 +9,6 @@ export declare const FAILED_DFP_RESOLVE_OBJECT_TIMEOUT: {
9
9
  };
10
10
  errorCode: string;
11
11
  };
12
- export declare const FAILED_DFP_RESOLVE_OBJECT: {
13
- result: {
14
- type: string;
15
- value: string;
16
- };
17
- };
18
12
  export declare const ERRORS: {
19
13
  TIME_OUT: string;
20
14
  WRONG_ORIGIN: string;
@@ -0,0 +1,2 @@
1
+ import { FormatterFn } from "./types";
2
+ export declare const digitsOnlyFormatter: FormatterFn;
@@ -0,0 +1,7 @@
1
+ export declare type FormatterFn = (value: string, context?: {
2
+ state: {
3
+ data: {
4
+ country?: string;
5
+ };
6
+ };
7
+ }) => string;
@@ -1,4 +1,5 @@
1
1
  import { ValidationRuleResult } from './ValidationRuleResult';
2
+ import { Formatter } from '../useForm/types';
2
3
  declare type ValidatorMode = 'blur' | 'input';
3
4
  export declare type ErrorMessageObject = {
4
5
  translationKey: string;
@@ -10,14 +11,8 @@ export declare type Ruleset = {
10
11
  export declare type CountryRuleset = {
11
12
  [country: string]: Ruleset;
12
13
  };
13
- declare type FormatterFn = (value: any, context?: any) => string;
14
- export interface Format {
15
- formatter?: FormatterFn;
16
- format?: string;
17
- maxlength?: number;
18
- }
19
14
  export declare type FormatRules = {
20
- [field: string]: Format;
15
+ [field: string]: Formatter;
21
16
  };
22
17
  export declare type CountryFormatRules = {
23
18
  [country: string]: FormatRules;
@@ -1,3 +1,2 @@
1
- import { ThreeDS2ChallengeRejectObject } from '../components/ThreeDS2/types';
2
- declare const getProcessMessageHandler: (domain: string, resolve: Function, reject: Function, rejectObj: ThreeDS2ChallengeRejectObject | object, expectedType: string) => Function;
1
+ declare const getProcessMessageHandler: (domain: string, resolve: Function, reject: Function, expectedType: string) => Function;
3
2
  export default getProcessMessageHandler;
@@ -1,4 +1,5 @@
1
1
  import { ValidatorRules } from '../Validator/types';
2
+ import { FormatterFn } from '../Formatters/types';
2
3
  export declare type FormState<FormSchema> = {
3
4
  schema?: string[];
4
5
  data: FormSchema;
@@ -13,8 +14,16 @@ export declare type FormState<FormSchema> = {
13
14
  };
14
15
  isValid?: boolean;
15
16
  };
17
+ export interface Formatter {
18
+ formatterFn?: FormatterFn;
19
+ format?: string;
20
+ maxlength?: number;
21
+ }
16
22
  export declare type FormProps = {
17
23
  rules?: ValidatorRules;
24
+ formatters?: {
25
+ [key: string]: Formatter | Function;
26
+ };
18
27
  [key: string]: any;
19
28
  };
20
29
  export interface Form<FormSchema> extends FormState<FormSchema> {