@adyen/adyen-web 5.7.0 → 5.10.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.
Files changed (120) hide show
  1. package/dist/adyen.css +6 -6
  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 +6 -6
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +6 -6
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/ar.js +1 -1
  11. package/dist/es/cs-CZ.js +1 -1
  12. package/dist/es/da-DK.js +1 -1
  13. package/dist/es/de-DE.js +1 -1
  14. package/dist/es/el-GR.js +1 -1
  15. package/dist/es/es-ES.js +1 -1
  16. package/dist/es/fi-FI.js +1 -1
  17. package/dist/es/fr-FR.js +1 -1
  18. package/dist/es/hr-HR.js +1 -1
  19. package/dist/es/hu-HU.js +1 -1
  20. package/dist/es/index.js +1 -1
  21. package/dist/es/it-IT.js +1 -1
  22. package/dist/es/ja-JP.js +1 -1
  23. package/dist/es/ko-KR.js +1 -1
  24. package/dist/es/nl-NL.js +1 -1
  25. package/dist/es/no-NO.js +1 -1
  26. package/dist/es/pl-PL.js +1 -1
  27. package/dist/es/pt-BR.js +1 -1
  28. package/dist/es/ro-RO.js +1 -1
  29. package/dist/es/ru-RU.js +1 -1
  30. package/dist/es/sk-SK.js +1 -1
  31. package/dist/es/sl-SI.js +1 -1
  32. package/dist/es/sv-SE.js +1 -1
  33. package/dist/es/zh-CN.js +1 -1
  34. package/dist/es/zh-TW.js +1 -1
  35. package/dist/es.modern/adyen.css +6 -6
  36. package/dist/es.modern/adyen.css.map +1 -1
  37. package/dist/es.modern/ar.js +1 -1
  38. package/dist/es.modern/cs-CZ.js +1 -1
  39. package/dist/es.modern/da-DK.js +1 -1
  40. package/dist/es.modern/de-DE.js +1 -1
  41. package/dist/es.modern/el-GR.js +1 -1
  42. package/dist/es.modern/es-ES.js +1 -1
  43. package/dist/es.modern/fi-FI.js +1 -1
  44. package/dist/es.modern/fr-FR.js +1 -1
  45. package/dist/es.modern/hr-HR.js +1 -1
  46. package/dist/es.modern/hu-HU.js +1 -1
  47. package/dist/es.modern/index.js +1 -1
  48. package/dist/es.modern/it-IT.js +1 -1
  49. package/dist/es.modern/ja-JP.js +1 -1
  50. package/dist/es.modern/ko-KR.js +1 -1
  51. package/dist/es.modern/nl-NL.js +1 -1
  52. package/dist/es.modern/no-NO.js +1 -1
  53. package/dist/es.modern/pl-PL.js +1 -1
  54. package/dist/es.modern/pt-BR.js +1 -1
  55. package/dist/es.modern/ro-RO.js +1 -1
  56. package/dist/es.modern/ru-RU.js +1 -1
  57. package/dist/es.modern/sk-SK.js +1 -1
  58. package/dist/es.modern/sl-SI.js +1 -1
  59. package/dist/es.modern/sv-SE.js +1 -1
  60. package/dist/es.modern/zh-CN.js +1 -1
  61. package/dist/es.modern/zh-TW.js +1 -1
  62. package/dist/types/components/AmazonPay/types.d.ts +22 -0
  63. package/dist/types/components/ApplePay/types.d.ts +1 -1
  64. package/dist/types/components/BacsDD/components/validate.d.ts +1 -1
  65. package/dist/types/components/Boleto/components/BoletoInput/validate.d.ts +1 -1
  66. package/dist/types/components/Card/Bancontact.d.ts +8 -0
  67. package/dist/types/components/Card/Card.d.ts +13 -1
  68. package/dist/types/components/Card/components/CardInput/components/CardHolderName.d.ts +1 -1
  69. package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
  70. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
  71. package/dist/types/components/Card/components/CardInput/handlers.d.ts +1 -0
  72. package/dist/types/components/Card/components/CardInput/types.d.ts +1 -0
  73. package/dist/types/components/Card/components/CardInput/utils.d.ts +9 -27
  74. package/dist/types/components/Card/components/CardInput/validate.d.ts +1 -1
  75. package/dist/types/components/Card/types.d.ts +11 -0
  76. package/dist/types/components/Dropin/Dropin.d.ts +1 -1
  77. package/dist/types/components/Econtext/validate.d.ts +1 -1
  78. package/dist/types/components/Giftcard/components/GiftcardComponent.d.ts +7 -1
  79. package/dist/types/components/Giftcard/components/GiftcardFields.d.ts +3 -0
  80. package/dist/types/components/Giftcard/components/GiftcardNumberField.d.ts +3 -0
  81. package/dist/types/components/Giftcard/components/GiftcardPinField.d.ts +3 -0
  82. package/dist/types/components/Giftcard/components/types.d.ts +19 -0
  83. package/dist/types/components/MealVoucherFR/MealVoucherFR.d.ts +20 -0
  84. package/dist/types/components/MealVoucherFR/components/MealVoucherExpiryField.d.ts +3 -0
  85. package/dist/types/components/MealVoucherFR/components/MealVoucherFields.d.ts +3 -0
  86. package/dist/types/components/MealVoucherFR/index.d.ts +1 -0
  87. package/dist/types/components/OnlineBankingIN/index.d.ts +6 -0
  88. package/dist/types/components/Pix/PixInput/validate.d.ts +1 -1
  89. package/dist/types/components/UIElement.d.ts +1 -1
  90. package/dist/types/components/index.d.ts +6 -0
  91. package/dist/types/components/internal/Address/components/FieldContainer.d.ts +6 -0
  92. package/dist/types/components/internal/Address/types.d.ts +11 -8
  93. package/dist/types/components/internal/Address/validate.d.ts +1 -1
  94. package/dist/types/components/internal/Address/validate.formats.d.ts +3 -0
  95. package/dist/types/components/internal/CompanyDetails/types.d.ts +1 -1
  96. package/dist/types/components/internal/PersonalDetails/PersonalDetails.d.ts +1 -1
  97. package/dist/types/components/internal/PersonalDetails/types.d.ts +1 -1
  98. package/dist/types/components/internal/PersonalDetails/validate.d.ts +1 -1
  99. package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProvider.d.ts +4 -4
  100. package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.d.ts +2 -2
  101. package/dist/types/components/internal/SecuredFields/SFP/defaultProps.d.ts +0 -41
  102. package/dist/types/components/internal/SecuredFields/SFP/types.d.ts +46 -2
  103. package/dist/types/components/internal/SecuredFields/binLookup/extensions.d.ts +3 -1
  104. package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +1 -0
  105. package/dist/types/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.d.ts +1 -1
  106. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +6 -5
  107. package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -0
  108. package/dist/types/components/internal/SecuredFields/lib/securedField/SecuredField.d.ts +4 -0
  109. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +4 -1
  110. package/dist/types/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +2 -2
  111. package/dist/types/core/core.d.ts +2 -1
  112. package/dist/types/language/config.d.ts +1 -0
  113. package/dist/types/language/locales/index.d.ts +50 -0
  114. package/dist/types/types/index.d.ts +30 -1
  115. package/dist/types/utils/Validator/Validator.d.ts +2 -20
  116. package/dist/types/utils/Validator/types.d.ts +45 -0
  117. package/dist/types/utils/useForm/types.d.ts +5 -0
  118. package/dist/types/utils/useForm/useForm.d.ts +2 -6
  119. package/dist/types/utils/validator-utils.d.ts +5 -0
  120. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  import { FieldsetVisibility, PersonalDetailsSchema } from '../../../types';
2
- import { ValidatorRules } from '../../../utils/Validator/Validator';
2
+ import { ValidatorRules } from '../../../utils/Validator/types';
3
3
  declare type PersonalDetailsPlaceholders = Omit<PersonalDetailsSchema, 'gender'>;
4
4
  export interface PersonalDetailsProps {
5
5
  label?: string;
@@ -1,2 +1,2 @@
1
- import { ValidatorRules } from '../../../utils/Validator/Validator';
1
+ import { ValidatorRules } from '../../../utils/Validator/types';
2
2
  export declare const personalDetailsValidationRules: ValidatorRules;
@@ -1,15 +1,14 @@
1
1
  import { Component } from 'preact';
2
- import { SFPProps } from './defaultProps';
2
+ import { SFPProps, SFPState, SingleBrandResetObject } from './types';
3
3
  import { StylesObject, CbObjOnError } from '../lib/types';
4
4
  import { BinLookupResponse } from '../../../Card/types';
5
- import { SFPState, SingleBrandResetObject } from './types';
6
5
  /**
7
6
  * SecuredFieldsProvider:
8
7
  * Initialises & handles the client-side part of SecuredFields
9
8
  */
10
9
  declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
11
- private originKeyErrorTimeout;
12
- private originKeyTimeoutMS;
10
+ private invalidOriginErrorTimeout;
11
+ private invalidOriginTimeoutMS;
13
12
  private numCharsInField;
14
13
  private rootNode;
15
14
  private numDateFields;
@@ -58,6 +57,7 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
58
57
  handleUnsupportedCard(errObj: CbObjOnError): boolean;
59
58
  setFocusOn(frame: string): void;
60
59
  updateStyles(stylesObj: StylesObject): void;
60
+ sfIsOptionalOrHidden(fieldType: string): boolean;
61
61
  destroy(): void;
62
62
  showValidation(): void;
63
63
  /**
@@ -1,6 +1,6 @@
1
1
  import { CbObjOnError, CbObjOnFocus, CbObjOnBrand, CbObjOnAllValid, CbObjOnFieldValid, CbObjOnAutoComplete, CbObjOnConfigSuccess, CbObjOnLoad } from '../lib/types';
2
2
  /**
3
- * Emits the onConfigSuccess (ready) event
3
+ * Emits the onLoad event
4
4
  * Here we can assume CSF is loaded and ready to be used
5
5
  */
6
6
  declare function handleOnLoad(cbObj: CbObjOnLoad): void;
@@ -17,7 +17,7 @@ declare function handleOnAllValid(status: CbObjOnAllValid): boolean;
17
17
  * Saves a field value from CSF in the CardInput state
18
18
  * Emits the onFieldValid event
19
19
  */
20
- declare function handleOnFieldValid(field: CbObjOnFieldValid): boolean;
20
+ declare function handleOnFieldValid(fieldObj: CbObjOnFieldValid): boolean;
21
21
  /**
22
22
  * Saves the card brand in state
23
23
  * Emits the onBrand event
@@ -1,44 +1,3 @@
1
- import { Language } from '../../../../language/Language';
2
- import { CardBrandsConfiguration } from '../../../Card/types';
3
- import { StylesObject } from '../lib/types';
4
- /**
5
- * Should be the only props that can be sent to SFP (from CardInput, SecuredFieldsInput, AchInput, GiftcardComponent)
6
- */
7
- export interface SFPProps {
8
- allowedDOMAccess?: boolean;
9
- autoFocus?: boolean;
10
- brands?: string[];
11
- brandsConfiguration?: CardBrandsConfiguration;
12
- clientKey: string;
13
- countryCode?: string;
14
- hasKoreanFields?: boolean;
15
- i18n: Language;
16
- implementationType?: string;
17
- isCollatingErrors?: boolean;
18
- keypadFix?: boolean;
19
- koreanAuthenticationRequired?: boolean;
20
- legacyInputMode?: boolean;
21
- loadingContext: string;
22
- minimumExpiryDate?: string;
23
- onAdditionalSFConfig?: () => {};
24
- onAdditionalSFRemoved?: () => {};
25
- onAllValid?: () => {};
26
- onAutoComplete?: () => {};
27
- onBinValue?: () => {};
28
- onBrand?: () => {};
29
- onChange: () => {};
30
- onConfigSuccess?: () => {};
31
- onError?: () => {};
32
- onFieldValid?: () => {};
33
- onFocus?: () => {};
34
- onLoad?: () => {};
35
- rootNode: HTMLElement;
36
- showWarnings?: boolean;
37
- styles?: StylesObject;
38
- trimTrailingSeparator?: boolean;
39
- type: string;
40
- render: () => {};
41
- }
42
1
  declare const _default: {
43
2
  type: string;
44
3
  keypadFix: boolean;
@@ -1,5 +1,45 @@
1
- import { CVCPolicyType, DatePolicyType } from '../lib/types';
1
+ import { CVCPolicyType, DatePolicyType, StylesObject } from '../lib/types';
2
2
  import { AddressData } from '../../../../types';
3
+ import { CardBrandsConfiguration } from '../../../Card/types';
4
+ import { Language } from '../../../../language/Language';
5
+ /**
6
+ * Should be the only props that can be sent to SFP (from CardInput, SecuredFieldsInput, AchInput, GiftcardComponent)
7
+ */
8
+ export interface SFPProps {
9
+ allowedDOMAccess?: boolean;
10
+ autoFocus?: boolean;
11
+ brands?: string[];
12
+ brandsConfiguration?: CardBrandsConfiguration;
13
+ clientKey: string;
14
+ countryCode?: string;
15
+ hasKoreanFields?: boolean;
16
+ i18n: Language;
17
+ implementationType?: string;
18
+ isCollatingErrors?: boolean;
19
+ keypadFix?: boolean;
20
+ koreanAuthenticationRequired?: boolean;
21
+ legacyInputMode?: boolean;
22
+ loadingContext: string;
23
+ minimumExpiryDate?: string;
24
+ onAdditionalSFConfig?: () => {};
25
+ onAdditionalSFRemoved?: () => {};
26
+ onAllValid?: () => {};
27
+ onAutoComplete?: () => {};
28
+ onBinValue?: () => {};
29
+ onBrand?: () => {};
30
+ onChange: () => {};
31
+ onConfigSuccess?: () => {};
32
+ onError?: () => {};
33
+ onFieldValid?: () => {};
34
+ onFocus?: () => {};
35
+ onLoad?: () => {};
36
+ rootNode: HTMLElement;
37
+ showWarnings?: boolean;
38
+ styles?: StylesObject;
39
+ trimTrailingSeparator?: boolean;
40
+ type: string;
41
+ render: () => {};
42
+ }
3
43
  export interface SFPState {
4
44
  status?: string;
5
45
  brand?: string;
@@ -10,7 +50,7 @@ export interface SFPState {
10
50
  isSfpValid?: boolean;
11
51
  autoCompleteName?: string;
12
52
  billingAddress?: AddressData;
13
- hasUnsupportedCard?: boolean;
53
+ detectedUnsupportedBrands?: string[];
14
54
  hasKoreanFields?: boolean;
15
55
  showSocialSecurityNumber?: boolean;
16
56
  expiryDatePolicy?: DatePolicyType;
@@ -30,3 +70,7 @@ export interface SFPValid {
30
70
  encryptedBankAccountNumber?: boolean;
31
71
  encryptedBankLocationId?: boolean;
32
72
  }
73
+ export interface OnChangeEventDetails {
74
+ event: string;
75
+ fieldType?: string;
76
+ }
@@ -1,4 +1,6 @@
1
- export default function extensions(props: any, refs: any, states: any): {
1
+ export default function extensions(props: any, refs: any, states: any, hasPanLengthRef?: Partial<{
2
+ current: any;
3
+ }>): {
2
4
  /**
3
5
  * Handle the binLookup response object generated in triggerBinLookup and process it in relation to the CardInput and it's sub-components.
4
6
  * e.g. we might need to add/remove additional markup (a selector for brands), and inform SFP of the issuingCountryCode & detected brand(s).
@@ -14,6 +14,7 @@ export interface CSFReturnObject {
14
14
  removeSecuredField: any;
15
15
  setKCPStatus: any;
16
16
  sendValueToFrame?: any;
17
+ sfIsOptionalOrHidden: (f: string) => boolean;
17
18
  }
18
19
  /**
19
20
  * Base interface for SetupObject & ConfigObject
@@ -1 +1 @@
1
- export declare const getPreviousTabbableNonSFElement: (passedFieldType: any, rootNode: any) => any;
1
+ export declare const getPreviousTabbableNonSFElement: (passedFieldType: any, rootNode: any, getPrevious?: any) => any;
@@ -4,17 +4,18 @@ export declare const ENCRYPTED_EXPIRY_DATE = "encryptedExpiryDate";
4
4
  export declare const ENCRYPTED_EXPIRY_MONTH = "encryptedExpiryMonth";
5
5
  export declare const ENCRYPTED_EXPIRY_YEAR = "encryptedExpiryYear";
6
6
  export declare const ENCRYPTED_SECURITY_CODE = "encryptedSecurityCode";
7
- export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
8
- export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
9
7
  export declare const ENCRYPTED_PWD_FIELD = "encryptedPassword";
10
8
  export declare const ENCRYPTED_PIN_FIELD = "encryptedPin";
11
- export declare const GIFT_CARD = "giftcard";
12
9
  export declare const ENCRYPTED_BANK_ACCNT_NUMBER_FIELD = "encryptedBankAccountNumber";
13
10
  export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
14
- export declare const SF_VERSION = "3.8.0";
11
+ export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
12
+ export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
13
+ export declare const GIFT_CARD = "giftcard";
14
+ export declare const SF_VERSION = "3.9.0";
15
15
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
16
16
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
17
- export declare const SF_FIELDS_ARRAY: string[];
17
+ export declare const CREDIT_CARD_SF_FIELDS: string[];
18
+ export declare const OTHER_SF_FIELDS: string[];
18
19
  export declare const ALL_SECURED_FIELDS: string[];
19
20
  export declare const REQUIRED = "required";
20
21
  export declare const OPTIONAL = "optional";
@@ -19,6 +19,7 @@ export interface SFInternalConfig {
19
19
  minimumExpiryDate: string;
20
20
  uid: string;
21
21
  implementationType: string;
22
+ bundleType: string;
22
23
  isCollatingErrors: boolean;
23
24
  }
24
25
  /**
@@ -7,6 +7,10 @@ declare class SecuredField extends AbstractSecuredField {
7
7
  iframeOnLoadListenerFn(): void;
8
8
  postMessageListenerFn(event: MessageEvent): void;
9
9
  destroy(): void;
10
+ /**
11
+ * Returns whether the securedField is hidden OR whether it is optional and not in error
12
+ */
13
+ isOptionalOrHidden(): boolean;
10
14
  onIframeLoaded(callbackFn: RtnType_noParamVoidFn): SecuredField;
11
15
  onEncryption(callbackFn: RtnType_callbackFn): SecuredField;
12
16
  onValidation(callbackFn: RtnType_callbackFn): SecuredField;
@@ -83,6 +83,7 @@ export interface CbObjOnFieldValid {
83
83
  rootNode: HTMLElement;
84
84
  blob?: string;
85
85
  endDigits?: string;
86
+ issuerBin?: number;
86
87
  }
87
88
  export interface CbObjOnAutoComplete {
88
89
  fieldType: string;
@@ -102,8 +103,8 @@ export interface CbObjOnBinLookup {
102
103
  supportedBrands?: string[];
103
104
  brands?: string[];
104
105
  supportedBrandsRaw?: BrandObject[];
105
- isReset?: boolean;
106
106
  rootNode?: HTMLElement;
107
+ isReset?: boolean;
107
108
  }
108
109
  export interface CbObjOnError {
109
110
  fieldType: string;
@@ -150,6 +151,7 @@ export interface SFFeedbackObj {
150
151
  maxLength?: number;
151
152
  error?: string;
152
153
  endDigits?: string;
154
+ issuerBin?: string;
153
155
  type?: string;
154
156
  binValue?: string;
155
157
  focus?: boolean;
@@ -174,6 +176,7 @@ export interface ShiftTabObject {
174
176
  export interface SendBrandObject {
175
177
  brand: string;
176
178
  enableLuhnCheck: boolean;
179
+ panLength?: number;
177
180
  }
178
181
  export interface SendExpiryDateObject {
179
182
  expiryDatePolicy: DatePolicyType;
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
- export default function ({ onChange, onInput, valid, error, data, required }: {
3
- onChange: any;
2
+ export default function ({ onBlur, onInput, valid, error, data, required }: {
3
+ onBlur: any;
4
4
  onInput: any;
5
5
  valid?: boolean;
6
6
  error?: any;
@@ -1,11 +1,12 @@
1
1
  import UIElement from '../components/UIElement';
2
+ import PaymentMethodsResponse from './ProcessResponse/PaymentMethodsResponse';
2
3
  import { PaymentAction } from '../types';
3
4
  import { CoreOptions } from './types';
4
5
  import { PaymentMethods, PaymentMethodOptions } from '../types';
5
6
  import Session from './CheckoutSession';
6
7
  declare class Core {
7
8
  session: Session;
8
- private paymentMethodsResponse;
9
+ paymentMethodsResponse: PaymentMethodsResponse;
9
10
  modules: any;
10
11
  options: CoreOptions;
11
12
  components: any[];
@@ -218,4 +218,5 @@ export declare const defaultTranslation: {
218
218
  "pix.instructions": string;
219
219
  "twint.saved": string;
220
220
  orPayWith: string;
221
+ invalidFormatExpects: string;
221
222
  };