@adyen/adyen-web 5.6.0 → 5.8.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 (185) hide show
  1. package/README.md +1 -1
  2. package/dist/adyen.css +2 -2
  3. package/dist/adyen.css.map +1 -1
  4. package/dist/adyen.js +1 -1
  5. package/dist/adyen.js.map +1 -1
  6. package/dist/cjs/adyen.css +2 -2
  7. package/dist/cjs/adyen.css.map +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/es/adyen.css +2 -2
  10. package/dist/es/adyen.css.map +1 -1
  11. package/dist/es/ar.js +1 -1
  12. package/dist/es/cs-CZ.js +1 -1
  13. package/dist/es/da-DK.js +1 -1
  14. package/dist/es/de-DE.js +1 -1
  15. package/dist/es/el-GR.js +1 -1
  16. package/dist/es/es-ES.js +1 -1
  17. package/dist/es/fi-FI.js +1 -1
  18. package/dist/es/fr-FR.js +1 -1
  19. package/dist/es/hr-HR.js +1 -1
  20. package/dist/es/hu-HU.js +1 -1
  21. package/dist/es/index.js +1 -1
  22. package/dist/es/it-IT.js +1 -1
  23. package/dist/es/ja-JP.js +1 -1
  24. package/dist/es/ko-KR.js +1 -1
  25. package/dist/es/nl-NL.js +1 -1
  26. package/dist/es/no-NO.js +1 -1
  27. package/dist/es/pl-PL.js +1 -1
  28. package/dist/es/pt-BR.js +1 -1
  29. package/dist/es/ro-RO.js +1 -1
  30. package/dist/es/ru-RU.js +1 -1
  31. package/dist/es/sk-SK.js +1 -1
  32. package/dist/es/sl-SI.js +1 -1
  33. package/dist/es/sv-SE.js +1 -1
  34. package/dist/es/zh-CN.js +1 -1
  35. package/dist/es/zh-TW.js +1 -1
  36. package/dist/es.modern/adyen.css +2 -2
  37. package/dist/es.modern/adyen.css.map +1 -1
  38. package/dist/es.modern/ar.js +1 -1
  39. package/dist/es.modern/cs-CZ.js +1 -1
  40. package/dist/es.modern/da-DK.js +1 -1
  41. package/dist/es.modern/de-DE.js +1 -1
  42. package/dist/es.modern/el-GR.js +1 -1
  43. package/dist/es.modern/es-ES.js +1 -1
  44. package/dist/es.modern/fi-FI.js +1 -1
  45. package/dist/es.modern/fr-FR.js +1 -1
  46. package/dist/es.modern/hr-HR.js +1 -1
  47. package/dist/es.modern/hu-HU.js +1 -1
  48. package/dist/es.modern/index.js +1 -1
  49. package/dist/es.modern/it-IT.js +1 -1
  50. package/dist/es.modern/ja-JP.js +1 -1
  51. package/dist/es.modern/ko-KR.js +1 -1
  52. package/dist/es.modern/nl-NL.js +1 -1
  53. package/dist/es.modern/no-NO.js +1 -1
  54. package/dist/es.modern/pl-PL.js +1 -1
  55. package/dist/es.modern/pt-BR.js +1 -1
  56. package/dist/es.modern/ro-RO.js +1 -1
  57. package/dist/es.modern/ru-RU.js +1 -1
  58. package/dist/es.modern/sk-SK.js +1 -1
  59. package/dist/es.modern/sl-SI.js +1 -1
  60. package/dist/es.modern/sv-SE.js +1 -1
  61. package/dist/es.modern/zh-CN.js +1 -1
  62. package/dist/es.modern/zh-TW.js +1 -1
  63. package/dist/types/components/Ach/components/AchInput/AchInput.d.ts +2 -4
  64. package/dist/types/components/Ach/components/AchInput/defaultProps.d.ts +0 -3
  65. package/dist/types/components/Ach/components/AchInput/types.d.ts +40 -0
  66. package/dist/types/components/BacsDD/components/validate.d.ts +1 -1
  67. package/dist/types/components/Boleto/components/BoletoInput/validate.d.ts +1 -1
  68. package/dist/types/components/Card/Bancontact.d.ts +4 -5
  69. package/dist/types/components/Card/Card.d.ts +4 -4
  70. package/dist/types/components/Card/components/CardInput/CardInput.d.ts +2 -40
  71. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +47 -0
  72. package/dist/types/components/Card/components/CardInput/components/Installments/Installments.d.ts +4 -0
  73. package/dist/types/components/Card/components/CardInput/components/StoredCardFields.d.ts +1 -1
  74. package/dist/types/components/Card/components/CardInput/components/StoredCardFieldsWrapper.d.ts +16 -0
  75. package/dist/types/components/Card/components/CardInput/components/types.d.ts +1 -1
  76. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +2 -4
  77. package/dist/types/components/Card/components/CardInput/handlers.d.ts +9 -0
  78. package/dist/types/components/Card/components/CardInput/types.d.ts +50 -16
  79. package/dist/types/components/Card/components/CardInput/utils.d.ts +30 -2
  80. package/dist/types/components/Card/components/CardInput/validate.d.ts +1 -1
  81. package/dist/types/components/Card/types.d.ts +2 -3
  82. package/dist/types/components/Dropin/Dropin.d.ts +5 -1
  83. package/dist/types/components/Dropin/components/DropinComponent.d.ts +3 -2
  84. package/dist/types/components/Dropin/types.d.ts +7 -3
  85. package/dist/types/components/Econtext/validate.d.ts +1 -1
  86. package/dist/types/components/Giftcard/components/GiftcardComponent.d.ts +7 -1
  87. package/dist/types/components/Giftcard/components/GiftcardFields.d.ts +3 -0
  88. package/dist/types/components/Giftcard/components/GiftcardNumberField.d.ts +3 -0
  89. package/dist/types/components/Giftcard/components/GiftcardPinField.d.ts +3 -0
  90. package/dist/types/components/Giftcard/components/types.d.ts +19 -0
  91. package/dist/types/components/MealVoucherFR/MealVoucherFR.d.ts +20 -0
  92. package/dist/types/components/MealVoucherFR/components/MealVoucherExpiryField.d.ts +3 -0
  93. package/dist/types/components/MealVoucherFR/components/MealVoucherFields.d.ts +3 -0
  94. package/dist/types/components/MealVoucherFR/index.d.ts +1 -0
  95. package/dist/types/components/Pix/PixInput/validate.d.ts +1 -1
  96. package/dist/types/components/SecuredFields/SecuredFieldsInput/SecuredFieldsInput.d.ts +31 -1
  97. package/dist/types/components/ThreeDS2/callSubmit3DS2Fingerprint.d.ts +2 -1
  98. package/dist/types/components/ThreeDS2/types.d.ts +18 -0
  99. package/dist/types/components/UIElement.d.ts +11 -12
  100. package/dist/types/components/index.d.ts +4 -0
  101. package/dist/types/components/internal/Address/types.d.ts +9 -7
  102. package/dist/types/components/internal/Address/validate.d.ts +1 -1
  103. package/dist/types/components/internal/Address/validate.formats.d.ts +3 -0
  104. package/dist/types/components/internal/CompanyDetails/types.d.ts +1 -1
  105. package/dist/types/components/internal/PersonalDetails/PersonalDetails.d.ts +1 -1
  106. package/dist/types/components/internal/PersonalDetails/types.d.ts +1 -1
  107. package/dist/types/components/internal/PersonalDetails/validate.d.ts +1 -1
  108. package/dist/types/components/internal/SecuredFields/SFP/SFPUtils.d.ts +19 -0
  109. package/dist/types/components/internal/SecuredFields/{SecuredFieldsProvider.d.ts → SFP/SecuredFieldsProvider.d.ts} +5 -27
  110. package/dist/types/components/internal/SecuredFields/{SecuredFieldsProviderHandlers.d.ts → SFP/SecuredFieldsProviderHandlers.d.ts} +2 -2
  111. package/dist/types/components/internal/SecuredFields/SFP/defaultProps.d.ts +23 -0
  112. package/dist/types/components/internal/SecuredFields/SFP/types.d.ts +76 -0
  113. package/dist/types/components/internal/SecuredFields/binLookup/extensions.d.ts +3 -1
  114. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/AbstractCSF.d.ts +8 -7
  115. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/CSF.d.ts +1 -5
  116. package/dist/types/components/internal/SecuredFields/lib/{core/utils/registerAdditionalField.d.ts → CSF/extensions/additionalFields.d.ts} +0 -0
  117. package/dist/types/components/internal/SecuredFields/lib/{configuration → CSF/extensions}/configureCallbacks.d.ts +0 -0
  118. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/extensions}/createSecuredFields.d.ts +0 -0
  119. package/dist/types/components/internal/SecuredFields/lib/{core/utils → CSF/extensions}/handleBrandFromBinLookup.d.ts +1 -1
  120. package/dist/types/components/internal/SecuredFields/lib/{configuration → CSF/extensions}/handleConfig.d.ts +0 -0
  121. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/extensions}/handleEncryption.d.ts +1 -1
  122. package/dist/types/components/internal/SecuredFields/lib/{core/utils/tabbing → CSF/extensions}/handleTab.d.ts +0 -0
  123. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/extensions}/handleValidation.d.ts +1 -1
  124. package/dist/types/components/internal/SecuredFields/lib/CSF/index.d.ts +2 -0
  125. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/initCSF.d.ts +1 -1
  126. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/handleBinValue.d.ts +11 -0
  127. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/handleFocus.d.ts +15 -0
  128. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/handleIframeConfigFeedback.d.ts +11 -0
  129. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/isConfigured.d.ts +13 -0
  130. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.d.ts +13 -0
  131. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.d.ts +14 -0
  132. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/processBrand.d.ts +20 -0
  133. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/setFocusOnFrame.d.ts +11 -0
  134. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/validateForm.d.ts +10 -0
  135. package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +84 -0
  136. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/callbackUtils.d.ts +0 -0
  137. package/dist/types/components/internal/SecuredFields/lib/{utilities → CSF/utils}/cardType.d.ts +1 -1
  138. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/utils}/destroySecuredFields.d.ts +0 -0
  139. package/dist/types/components/internal/SecuredFields/lib/{ui → CSF/utils}/encryptedElements.d.ts +0 -0
  140. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/getCardGroupTypes.d.ts +0 -0
  141. package/dist/types/components/internal/SecuredFields/lib/CSF/utils/iframes/getIframeContentWin.d.ts +5 -0
  142. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/iframes/postMessageToIframe.d.ts +0 -0
  143. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/iframes/postMessageValidation.d.ts +0 -0
  144. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/processErrors.d.ts +1 -1
  145. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioACH.d.ts +0 -0
  146. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioCreditCard.d.ts +0 -0
  147. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioGiftCard.d.ts +0 -0
  148. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioKCP.d.ts +0 -0
  149. package/dist/types/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.d.ts +1 -0
  150. package/dist/types/components/internal/SecuredFields/lib/{utilities → CSF/utils}/userAgent.d.ts +0 -0
  151. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +7 -6
  152. package/dist/types/components/internal/SecuredFields/lib/{core → securedField}/AbstractSecuredField.d.ts +2 -6
  153. package/dist/types/components/internal/SecuredFields/lib/{core → securedField}/SecuredField.d.ts +6 -1
  154. package/dist/types/components/internal/SecuredFields/lib/{utilities → securedField/utils}/createIframe.d.ts +0 -0
  155. package/dist/types/components/internal/SecuredFields/lib/{core/utils/init → securedField/utils}/processAriaConfig.d.ts +2 -2
  156. package/dist/types/components/internal/SecuredFields/lib/{core/utils/init → securedField/utils}/processPlaceholders.d.ts +1 -1
  157. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +6 -82
  158. package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +6 -1
  159. package/dist/types/components/internal/SecuredFields/utils.d.ts +1 -20
  160. package/dist/types/components/types.d.ts +20 -0
  161. package/dist/types/core/ProcessResponse/PaymentMethodsResponse/PaymentMethodsResponse.d.ts +1 -0
  162. package/dist/types/core/Services/http.d.ts +5 -4
  163. package/dist/types/core/core.d.ts +9 -2
  164. package/dist/types/language/config.d.ts +1 -0
  165. package/dist/types/language/locales/index.d.ts +50 -0
  166. package/dist/types/types/index.d.ts +30 -1
  167. package/dist/types/utils/Validator/Validator.d.ts +2 -20
  168. package/dist/types/utils/Validator/types.d.ts +45 -0
  169. package/dist/types/utils/hasOwnProperty.d.ts +1 -1
  170. package/dist/types/utils/useForm/types.d.ts +5 -0
  171. package/dist/types/utils/useForm/useForm.d.ts +2 -6
  172. package/dist/types/utils/validator-utils.d.ts +5 -0
  173. package/package.json +3 -3
  174. package/dist/types/components/internal/SecuredFields/defaultProps.d.ts +0 -104
  175. package/dist/types/components/internal/SecuredFields/lib/core/utils/handleBinValue.d.ts +0 -2
  176. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/handleFocus.d.ts +0 -2
  177. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/handleIframeConfigFeedback.d.ts +0 -1
  178. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/postMessageToAllIframes.d.ts +0 -1
  179. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/setFocusOnFrame.d.ts +0 -1
  180. package/dist/types/components/internal/SecuredFields/lib/core/utils/isConfigured.d.ts +0 -1
  181. package/dist/types/components/internal/SecuredFields/lib/core/utils/processAutoComplete.d.ts +0 -2
  182. package/dist/types/components/internal/SecuredFields/lib/core/utils/processBrand.d.ts +0 -8
  183. package/dist/types/components/internal/SecuredFields/lib/core/utils/validateForm.d.ts +0 -1
  184. package/dist/types/components/internal/SecuredFields/lib/index.d.ts +0 -2
  185. package/dist/types/components/internal/SecuredFields/lib/ui/domUtils.d.ts +0 -2
@@ -1,6 +1,6 @@
1
1
  import { PaymentMethod, StoredPaymentMethod, Order, OrderStatus } from '../../types';
2
2
  import UIElement from '../UIElement';
3
- import { UIElementProps } from '../types';
3
+ import { UIElementProps, UIElementStatus } from '../types';
4
4
  import { PaymentMethodsConfiguration } from '../../core/types';
5
5
  export declare type InstantPaymentTypes = 'paywithgoogle' | 'applepay';
6
6
  export interface DropinElementProps extends UIElementProps {
@@ -27,7 +27,7 @@ export interface DropinElementProps extends UIElementProps {
27
27
  *
28
28
  * @defaultValue []
29
29
  */
30
- instantPaymentTypes: InstantPaymentTypes[];
30
+ instantPaymentTypes?: InstantPaymentTypes[];
31
31
  openFirstStoredPaymentMethod?: boolean;
32
32
  openFirstPaymentMethod?: boolean;
33
33
  onSubmit?: (data: any, component: any) => void;
@@ -53,7 +53,11 @@ export interface DropinComponentProps extends DropinElementProps {
53
53
  onOrderCancel?: (order: Order) => void;
54
54
  }
55
55
  interface DropinStatus {
56
- type: 'loading' | 'ready' | 'success' | 'error';
56
+ type: UIElementStatus;
57
+ props?: DropinStatusProps;
58
+ }
59
+ export interface DropinStatusProps {
60
+ component?: UIElement;
57
61
  }
58
62
  export interface DropinComponentState {
59
63
  elements: any[];
@@ -1,2 +1,2 @@
1
- import { ValidatorRules } from '../../utils/Validator/Validator';
1
+ import { ValidatorRules } from '../../utils/Validator/types';
2
2
  export declare const econtextValidationRules: ValidatorRules;
@@ -1,5 +1,6 @@
1
- import { Component, h } from 'preact';
1
+ import { Component, FunctionComponent, h } from 'preact';
2
2
  import { PaymentAmount } from '../../../types';
3
+ import { GiftcardFieldsProps } from "./types";
3
4
  interface GiftcardComponentProps {
4
5
  onChange: (state: any) => void;
5
6
  onFocus: (event: any) => void;
@@ -9,6 +10,9 @@ interface GiftcardComponentProps {
9
10
  amount: PaymentAmount;
10
11
  showPayButton?: boolean;
11
12
  payButton: (config: any) => any;
13
+ pinRequired: boolean;
14
+ expiryDateRequired?: boolean;
15
+ fieldsLayoutComponent: FunctionComponent<GiftcardFieldsProps>;
12
16
  }
13
17
  declare class Giftcard extends Component<GiftcardComponentProps> {
14
18
  state: {
@@ -21,9 +25,11 @@ declare class Giftcard extends Component<GiftcardComponentProps> {
21
25
  };
22
26
  static defaultProps: {
23
27
  pinRequired: boolean;
28
+ expiryDateRequired: boolean;
24
29
  onChange: () => void;
25
30
  onFocus: () => void;
26
31
  onBlur: () => void;
32
+ fieldsLayoutComponent: (props: GiftcardFieldsProps) => h.JSX.Element;
27
33
  };
28
34
  sfp: any;
29
35
  onChange: (sfpState: any) => void;
@@ -0,0 +1,3 @@
1
+ import { h } from 'preact';
2
+ import { GiftcardFieldsProps } from "./types";
3
+ export declare const GiftCardFields: (props: GiftcardFieldsProps) => h.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { h } from 'preact';
2
+ import { GiftcardFieldProps } from './types';
3
+ export declare const GiftcardNumberField: ({ i18n, classNameModifiers, sfpState, getCardErrorMessage, focusedElement, setFocusOn }: GiftcardFieldProps) => h.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { h } from 'preact';
2
+ import { GiftcardFieldProps } from './types';
3
+ export declare const GiftcardPinField: ({ i18n, classNameModifiers, sfpState, focusedElement, setFocusOn }: GiftcardFieldProps) => h.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import Language from '../../../language/Language';
2
+ import { SFPState } from '../../internal/SecuredFields/SFP/types';
3
+ export declare type GiftcardFieldsProps = {
4
+ setRootNode: (input: HTMLElement) => void;
5
+ i18n: Language;
6
+ pinRequired: boolean;
7
+ sfpState: SFPState;
8
+ getCardErrorMessage: any;
9
+ focusedElement: any;
10
+ setFocusOn: any;
11
+ };
12
+ export declare type GiftcardFieldProps = {
13
+ i18n: Language;
14
+ classNameModifiers?: Array<string>;
15
+ sfpState: any;
16
+ getCardErrorMessage: any;
17
+ focusedElement: any;
18
+ setFocusOn: any;
19
+ };
@@ -0,0 +1,20 @@
1
+ import GiftcardElement from '../Giftcard/Giftcard';
2
+ export declare class MealVoucherFRElement extends GiftcardElement {
3
+ static type: string;
4
+ constructor(props: any);
5
+ formatProps(props: any): any;
6
+ /**
7
+ * Formats the component data output
8
+ */
9
+ formatData(): {
10
+ paymentMethod: {
11
+ type: any;
12
+ brand: any;
13
+ encryptedCardNumber: any;
14
+ encryptedSecurityCode: any;
15
+ encryptedExpiryMonth: any;
16
+ encryptedExpiryYear: any;
17
+ };
18
+ };
19
+ }
20
+ export default MealVoucherFRElement;
@@ -0,0 +1,3 @@
1
+ import { h } from 'preact';
2
+ import { GiftcardFieldProps } from '../../Giftcard/components/types';
3
+ export declare const MealVoucherExpiryField: ({ i18n, sfpState, focusedElement, setFocusOn }: GiftcardFieldProps) => h.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { h } from 'preact';
2
+ import { GiftcardFieldsProps } from "../../Giftcard/components/types";
3
+ export declare const MealVoucherFields: (props: GiftcardFieldsProps) => h.JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from './MealVoucherFR';
@@ -1,2 +1,2 @@
1
- import { ValidatorRules } from '../../../utils/Validator/Validator';
1
+ import { ValidatorRules } from '../../../utils/Validator/types';
2
2
  export declare const pixValidationRules: ValidatorRules;
@@ -1,8 +1,38 @@
1
1
  import { h } from 'preact';
2
2
  import Language from '../../../language/Language';
3
+ import { CardBrandsConfiguration } from '../../Card/types';
4
+ import { StylesObject } from '../../internal/SecuredFields/lib/types';
3
5
  interface SecuredFieldsProps {
4
- onChange: (data: any) => void;
6
+ allowedDOMAccess?: boolean;
7
+ autoFocus?: boolean;
8
+ brands?: string[];
9
+ brandsConfiguration?: CardBrandsConfiguration;
10
+ clientKey?: string;
11
+ countryCode?: string;
5
12
  i18n: Language;
13
+ implementationType?: string;
14
+ isCollatingErrors?: boolean;
15
+ keypadFix?: boolean;
16
+ loadingContext?: string;
17
+ legacyInputMode?: boolean;
18
+ minimumExpiryDate?: string;
19
+ onAdditionalSFConfig?: () => {};
20
+ onAdditionalSFRemoved?: () => {};
21
+ onAllValid?: () => {};
22
+ onAutoComplete?: () => {};
23
+ onBinValue?: () => {};
24
+ onBrand?: () => {};
25
+ onConfigSuccess?: () => {};
26
+ onChange: (data: any) => void;
27
+ onError?: () => {};
28
+ onFieldValid?: () => {};
29
+ onFocus?: (e: any) => {};
30
+ onLoad?: () => {};
31
+ rootNode: HTMLElement;
32
+ showWarnings?: boolean;
33
+ styles?: StylesObject;
34
+ trimTrailingSeparator?: boolean;
35
+ type: string;
6
36
  }
7
37
  declare function SecuredFieldsInput(props: SecuredFieldsProps): h.JSX.Element;
8
38
  declare namespace SecuredFieldsInput {
@@ -1,5 +1,6 @@
1
1
  /**
2
- * ThreeDS2DeviceFingerprint, onComplete, calls a new, internal, endpoint which behaves like the /details endpoint but doesn't require the same credentials
2
+ * ThreeDS2DeviceFingerprint, onComplete, calls a new, internal, endpoint which
3
+ * behaves like the /details endpoint but doesn't require the same credentials
3
4
  */
4
5
  export default function callSubmit3DS2Fingerprint({ data }: {
5
6
  data: any;
@@ -41,3 +41,21 @@ export interface FingerPrintData {
41
41
  threeDSMethodNotificationURL: string;
42
42
  postMessageDomain: string;
43
43
  }
44
+ export declare type ThreeDS2FingerprintResponse = {
45
+ type: 'action' | 'completed';
46
+ action?: CheckoutRedirectAction | CheckoutThreeDS2Action;
47
+ details?: Record<string, string>;
48
+ };
49
+ declare type CheckoutRedirectAction = {
50
+ type: 'redirect';
51
+ data: Record<string, string>;
52
+ method: string;
53
+ paymentData: string;
54
+ };
55
+ declare type CheckoutThreeDS2Action = {
56
+ type: 'threeDS2';
57
+ token: string;
58
+ subtype: string;
59
+ authorisationToken: string;
60
+ };
61
+ export {};
@@ -1,30 +1,29 @@
1
1
  import { h } from 'preact';
2
2
  import BaseElement from './BaseElement';
3
3
  import { Order, PaymentAction } from '../types';
4
- import { UIElementProps } from './types';
4
+ import { IUIElement, UIElementProps } from './types';
5
5
  import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';
6
- export declare class UIElement<P extends UIElementProps = any> extends BaseElement<P> {
6
+ import type { UIElementStatus } from './types';
7
+ export declare class UIElement<P extends UIElementProps = any> extends BaseElement<P> implements IUIElement {
7
8
  protected componentRef: any;
8
9
  elementRef: any;
9
10
  constructor(props: P);
10
11
  setState(newState: object): void;
11
- onChange(): object;
12
- onSubmit(): void;
13
- onValid(): {
14
- data: any;
15
- };
12
+ protected onChange(): object;
13
+ private onSubmit;
14
+ private onValid;
16
15
  onComplete(state: any): void;
17
16
  /**
18
17
  * Submit payment method data. If the form is not valid, it will trigger validation.
19
18
  */
20
19
  submit(): void;
21
20
  showValidation(): this;
22
- setStatus(status: any, props?: any): this;
23
- submitPayment(data: any): Promise<void>;
24
- submitAdditionalDetails(data: any): Promise<void>;
21
+ setStatus(status: UIElementStatus, props?: any): this;
22
+ private submitPayment;
23
+ private submitAdditionalDetails;
25
24
  protected handleError: (error: AdyenCheckoutError) => void;
26
25
  protected handleAdditionalDetails: (state: any) => any;
27
- handleAction(action: PaymentAction, props?: {}): UIElement;
26
+ handleAction(action: PaymentAction, props?: {}): UIElement | null;
28
27
  protected handleOrder: (order: Order) => void;
29
28
  protected handleFinalResult: (result: any) => any;
30
29
  /**
@@ -56,6 +55,6 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
56
55
  /**
57
56
  * Get the payButton component for the current element
58
57
  */
59
- payButton: (props: any) => h.JSX.Element;
58
+ protected payButton: (props: any) => h.JSX.Element;
60
59
  }
61
60
  export default UIElement;
@@ -45,6 +45,7 @@ import Address from './Address';
45
45
  import PersonalDetails from './PersonalDetails';
46
46
  import Klarna from './Klarna';
47
47
  import Twint from './Twint';
48
+ import MealVoucherFR from './MealVoucherFR';
48
49
  /**
49
50
  * Maps each component with a Component element.
50
51
  */
@@ -146,6 +147,9 @@ declare const componentsMap: {
146
147
  swish: typeof Swish;
147
148
  affirm: typeof Affirm;
148
149
  twint: typeof Twint;
150
+ mealVoucher_FR_natixis: typeof MealVoucherFR;
151
+ mealVoucher_FR_sodexo: typeof MealVoucherFR;
152
+ mealVoucher_FR_groupeup: typeof MealVoucherFR;
149
153
  default: any;
150
154
  };
151
155
  /**
@@ -1,6 +1,7 @@
1
1
  import { AddressField, AddressData } from '../../../types';
2
2
  import Specifications from './Specifications';
3
- import { ValidatorRules } from '../../../utils/Validator/Validator';
3
+ import { ValidatorRules } from '../../../utils/Validator/types';
4
+ import { ValidationRuleResult } from '../../../utils/Validator/Validator';
4
5
  export declare type StringObject = {
5
6
  [key: string]: string;
6
7
  };
@@ -17,12 +18,12 @@ export interface AddressProps {
17
18
  visibility?: string;
18
19
  }
19
20
  export interface AddressStateError {
20
- street?: boolean;
21
- houseNumberOrName?: boolean;
22
- postalCode?: boolean;
23
- city?: boolean;
24
- country?: boolean;
25
- stateOrProvince?: boolean;
21
+ street?: ValidationRuleResult;
22
+ houseNumberOrName?: ValidationRuleResult;
23
+ postalCode?: ValidationRuleResult;
24
+ city?: ValidationRuleResult;
25
+ country?: ValidationRuleResult;
26
+ stateOrProvince?: ValidationRuleResult;
26
27
  }
27
28
  export interface FieldContainerProps {
28
29
  allowedCountries: string[];
@@ -37,6 +38,7 @@ export interface FieldContainerProps {
37
38
  onDropdownChange: (e: Event) => void;
38
39
  readOnly?: boolean;
39
40
  specifications: Specifications;
41
+ maxlength?: number;
40
42
  }
41
43
  export interface ReadOnlyAddressProps {
42
44
  data: AddressData;
@@ -1,2 +1,2 @@
1
- import { ValidatorRules } from '../../../utils/Validator/Validator';
1
+ import { ValidatorRules } from '../../../utils/Validator/types';
2
2
  export declare const getAddressValidationRules: (specifications: any) => ValidatorRules;
@@ -0,0 +1,3 @@
1
+ import { CountryFormatRules, FormatRules } from '../../../utils/Validator/types';
2
+ export declare const addressFormatters: FormatRules;
3
+ export declare const countrySpecificFormatters: CountryFormatRules;
@@ -1,5 +1,5 @@
1
1
  import { FieldsetVisibility } from '../../../types';
2
- import { ValidatorRules } from '../../../utils/Validator/Validator';
2
+ import { ValidatorRules } from '../../../utils/Validator/types';
3
3
  export interface CompanyDetailsSchema {
4
4
  name?: string;
5
5
  registrationNumber?: string;
@@ -8,7 +8,7 @@ declare namespace PersonalDetails {
8
8
  onChange: () => void;
9
9
  placeholders: {};
10
10
  requiredFields: string[];
11
- validationRules: import("../../../utils/Validator/Validator").ValidatorRules;
11
+ validationRules: import("../../../utils/Validator/types").ValidatorRules;
12
12
  visibility: string;
13
13
  };
14
14
  }
@@ -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;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Make an array of encrypted field names based on the value of the 'data-cse' attribute of elements in the rootNode
3
+ */
4
+ export declare const getFields: (rootNode: any) => any;
5
+ /**
6
+ * If, visually, we're dealing with a single date field (expiryDate) we still need separate entries
7
+ * for expiryMonth & expiryYear - since that is how the values will be delivered from securedFields
8
+ */
9
+ export declare const validFieldsReducer: (acc: any, cur: any) => any;
10
+ export declare const getErrorReducer: (numDateFields: any, state: any) => (acc: any, field: any) => any;
11
+ /**
12
+ * Create an object suitable for sending to our handleOnError function
13
+ */
14
+ export declare const getErrorObject: (fieldType: any, rootNode: any, state: any) => {
15
+ rootNode: any;
16
+ fieldType: any;
17
+ error: any;
18
+ type: string;
19
+ };
@@ -1,29 +1,7 @@
1
1
  import { Component } from 'preact';
2
- import { SFPProps } from './defaultProps';
3
- import { StylesObject, CbObjOnError } from './lib/types';
4
- import { AddressData } from '../../../types';
5
- import { BinLookupResponse } from '../../Card/types';
6
- import { CVCPolicyType, DatePolicyType } from './lib/core/AbstractSecuredField';
7
- export interface SFPState {
8
- status?: string;
9
- brand?: string;
10
- errors?: object;
11
- valid: object;
12
- data: object;
13
- cvcPolicy?: CVCPolicyType;
14
- isSfpValid?: boolean;
15
- autoCompleteName?: string;
16
- billingAddress?: AddressData;
17
- hasUnsupportedCard?: boolean;
18
- hasKoreanFields?: boolean;
19
- showSocialSecurityNumber?: boolean;
20
- expiryDatePolicy?: DatePolicyType;
21
- socialSecurityNumber?: string;
22
- }
23
- export interface SingleBrandResetObject {
24
- brand: string;
25
- cvcPolicy: CVCPolicyType;
26
- }
2
+ import { SFPProps, SFPState, SingleBrandResetObject } from './types';
3
+ import { StylesObject, CbObjOnError } from '../lib/types';
4
+ import { BinLookupResponse } from '../../../Card/types';
27
5
  /**
28
6
  * SecuredFieldsProvider:
29
7
  * Initialises & handles the client-side part of SecuredFields
@@ -53,7 +31,7 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
53
31
  keypadFix: boolean;
54
32
  rootNode: any;
55
33
  loadingContext: any;
56
- groupTypes: any[];
34
+ brands: any[];
57
35
  allowedDOMAccess: boolean;
58
36
  showWarnings: boolean;
59
37
  autoFocus: boolean;
@@ -68,7 +46,6 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
68
46
  onBinValue: () => void;
69
47
  onFocus: () => void;
70
48
  onAutoComplete: () => void;
71
- placeholders: {};
72
49
  styles: {};
73
50
  };
74
51
  componentDidMount(): void;
@@ -80,6 +57,7 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
80
57
  handleUnsupportedCard(errObj: CbObjOnError): boolean;
81
58
  setFocusOn(frame: string): void;
82
59
  updateStyles(stylesObj: StylesObject): void;
60
+ sfIsOptionalOrHidden(fieldType: string): boolean;
83
61
  destroy(): void;
84
62
  showValidation(): void;
85
63
  /**
@@ -1,4 +1,4 @@
1
- import { CbObjOnError, CbObjOnFocus, CbObjOnBrand, CbObjOnAllValid, CbObjOnFieldValid, CbObjOnAutoComplete, CbObjOnConfigSuccess, CbObjOnLoad } from './lib/types';
1
+ import { CbObjOnError, CbObjOnFocus, CbObjOnBrand, CbObjOnAllValid, CbObjOnFieldValid, CbObjOnAutoComplete, CbObjOnConfigSuccess, CbObjOnLoad } from '../lib/types';
2
2
  /**
3
3
  * Emits the onConfigSuccess (ready) event
4
4
  * Here we can assume CSF is loaded and ready to be used
@@ -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
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ type: string;
3
+ keypadFix: boolean;
4
+ rootNode: any;
5
+ loadingContext: any;
6
+ brands: any[];
7
+ allowedDOMAccess: boolean;
8
+ showWarnings: boolean;
9
+ autoFocus: boolean;
10
+ trimTrailingSeparator: boolean;
11
+ onChange: () => void;
12
+ onLoad: () => void;
13
+ onConfigSuccess: () => void;
14
+ onAllValid: () => void;
15
+ onFieldValid: () => void;
16
+ onBrand: () => void;
17
+ onError: () => void;
18
+ onBinValue: () => void;
19
+ onFocus: () => void;
20
+ onAutoComplete: () => void;
21
+ styles: {};
22
+ };
23
+ export default _default;
@@ -0,0 +1,76 @@
1
+ import { CVCPolicyType, DatePolicyType, StylesObject } from '../lib/types';
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
+ }
43
+ export interface SFPState {
44
+ status?: string;
45
+ brand?: string;
46
+ errors?: object;
47
+ valid: SFPValid;
48
+ data: object;
49
+ cvcPolicy?: CVCPolicyType;
50
+ isSfpValid?: boolean;
51
+ autoCompleteName?: string;
52
+ billingAddress?: AddressData;
53
+ detectedUnsupportedBrands?: string[];
54
+ hasKoreanFields?: boolean;
55
+ showSocialSecurityNumber?: boolean;
56
+ expiryDatePolicy?: DatePolicyType;
57
+ socialSecurityNumber?: string;
58
+ }
59
+ export interface SingleBrandResetObject {
60
+ brand: string;
61
+ cvcPolicy: CVCPolicyType;
62
+ }
63
+ export interface SFPValid {
64
+ encryptedCardNumber?: boolean;
65
+ encryptedExpiryMonth?: boolean;
66
+ encryptedExpiryYear?: boolean;
67
+ encryptedSecurityCode?: boolean;
68
+ encryptedPassword?: boolean;
69
+ encryptedPin?: boolean;
70
+ encryptedBankAccountNumber?: boolean;
71
+ encryptedBankLocationId?: boolean;
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).
@@ -1,14 +1,15 @@
1
- import { CSFSetupObject, CSFConfigObject, CSFCallbacksConfig, CSFStateObject, SFFeedbackObj, SendBrandObject, SendExpiryDateObject } from '../types';
2
- import { createSecuredFields } from './createSecuredFields';
3
- import { handleProcessBrand } from './utils/processBrand';
4
- import { handleBrandFromBinLookup } from './utils/handleBrandFromBinLookup';
1
+ import { CSFSetupObject, CSFConfigObject, CSFCallbacksConfig, CSFStateObject } from './types';
2
+ import { SFFeedbackObj, SendBrandObject, SendExpiryDateObject } from '../types';
3
+ import { createSecuredFields } from './extensions/createSecuredFields';
4
+ import processBrand from './partials/processBrand';
5
+ import handleBrandFromBinLookup from './extensions/handleBrandFromBinLookup';
5
6
  declare abstract class AbstractCSF {
6
7
  protected callbacks: CSFCallbacksConfig;
7
8
  protected config: CSFConfigObject;
8
9
  protected props: CSFSetupObject;
9
10
  protected state: CSFStateObject;
10
- protected assessFormValidity: () => void;
11
- protected brandsFromBinLookup: typeof handleBrandFromBinLookup;
11
+ protected validateForm: () => void;
12
+ protected handleBrandFromBinLookup: typeof handleBrandFromBinLookup;
12
13
  protected callbacksHandler: (callbacksObj: object) => void;
13
14
  protected configHandler: () => void;
14
15
  protected createCardSecuredFields: (securedFields: HTMLElement[]) => number;
@@ -27,7 +28,7 @@ declare abstract class AbstractCSF {
27
28
  protected isConfigured: () => void;
28
29
  protected postMessageToAllIframes: (pDataObj: object) => void;
29
30
  protected processAutoComplete: (pFeedbackObj: SFFeedbackObj) => void;
30
- protected processBrand: typeof handleProcessBrand;
31
+ protected processBrand: typeof processBrand;
31
32
  protected sendBrandToCardSF: (brandObj: SendBrandObject) => void;
32
33
  protected sendExpiryDatePolicyToSF: (dateObj: SendExpiryDateObject) => void;
33
34
  protected setFocusOnFrame: (pFieldType: string, doLog?: boolean) => void;
@@ -1,12 +1,8 @@
1
1
  import AbstractCSF from './AbstractCSF';
2
- import { CSFReturnObject, CSFSetupObject } from '../types';
2
+ import { CSFReturnObject, CSFSetupObject } from './types';
3
3
  declare class CSF extends AbstractCSF {
4
4
  constructor(setupObj: CSFSetupObject);
5
5
  private init;
6
6
  createReturnObject(): CSFReturnObject;
7
- /**
8
- * Retrieves the iframe, stored by field type, & returns it's contentWindow
9
- */
10
- private getIframeContentWin;
11
7
  }
12
8
  export default CSF;
@@ -2,4 +2,4 @@ import { SendBrandObject, SendExpiryDateObject } from '../../types';
2
2
  import { BinLookupResponse } from '../../../../../Card/types';
3
3
  export declare function sendBrandToCardSF(brandObj: SendBrandObject): void;
4
4
  export declare function sendExpiryDatePolicyToSF(expiryDateObj: SendExpiryDateObject): void;
5
- export declare function handleBrandFromBinLookup(binLookupResponse: BinLookupResponse): void;
5
+ export default function handleBrandFromBinLookup(binLookupResponse: BinLookupResponse): void;
@@ -1,2 +1,2 @@
1
- import { SFFeedbackObj } from '../types';
1
+ import { SFFeedbackObj } from '../../types';
2
2
  export declare function handleEncryption(pFeedbackObj: SFFeedbackObj): void;
@@ -1,2 +1,2 @@
1
- import { SFFeedbackObj } from '../types';
1
+ import { SFFeedbackObj } from '../../types';
2
2
  export declare function handleValidation(pFeedbackObj: SFFeedbackObj): void;
@@ -0,0 +1,2 @@
1
+ import csf from './initCSF';
2
+ export default csf;