@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,3 +1,3 @@
1
- import { CSFReturnObject, CSFSetupObject } from '../types';
1
+ import { CSFReturnObject, CSFSetupObject } from './types';
2
2
  declare const initCSF: (pSetupObj: CSFSetupObject) => CSFReturnObject;
3
3
  export default initCSF;
@@ -0,0 +1,11 @@
1
+ import { SFFeedbackObj } from '../../types';
2
+ /**
3
+ * @param csfState - comes from initial, partial, implementation
4
+ * @param csfCallbacks - comes from initial, partial, implementation
5
+ *
6
+ * @param pFeedbackObj -
7
+ */
8
+ export declare function handleBinValue({ csfState, csfCallbacks }: {
9
+ csfState: any;
10
+ csfCallbacks: any;
11
+ }, pFeedbackObj: SFFeedbackObj): void;
@@ -0,0 +1,15 @@
1
+ import { SFFeedbackObj } from '../../types';
2
+ /**
3
+ * Call focus callback and store which field currently has focus
4
+ *
5
+ * @param csfState - comes from initial, partial, implementation
6
+ * @param csfProps - comes from initial, partial, implementation
7
+ * @param csfCallbacks - comes from initial, partial, implementation
8
+ *
9
+ * @param pFeedbackObj -
10
+ */
11
+ export declare function handleFocus({ csfState, csfProps, csfCallbacks }: {
12
+ csfState: any;
13
+ csfProps: any;
14
+ csfCallbacks: any;
15
+ }, pFeedbackObj: SFFeedbackObj): void;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @param csfState - comes from initial, partial, implementation
3
+ * @param csfCallbacks - comes from initial, partial, implementation
4
+ * @param isConfigured - comes from initial, partial, implementation
5
+ *
6
+ * @param pFeedbackObj -
7
+ */
8
+ export declare function handleIframeConfigFeedback({ csfState, csfCallbacks }: {
9
+ csfState: any;
10
+ csfCallbacks: any;
11
+ }, isConfigured: any, pFeedbackObj: any): boolean;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @param csfState - comes from initial, partial, implementation
3
+ * @param csfConfig - comes from initial, partial, implementation
4
+ * @param csfProps - comes from initial, partial, implementation
5
+ * @param csfCallbacks - comes from initial, partial, implementation
6
+ * @param validateForm - comes from initial, partial, implementation
7
+ */
8
+ export declare function isConfigured({ csfState, csfConfig, csfProps, csfCallbacks }: {
9
+ csfState: any;
10
+ csfConfig: any;
11
+ csfProps: any;
12
+ csfCallbacks: any;
13
+ }, validateForm: any): void;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * UTIL TO BROADCAST TO ALL IFRAMES AT ONCE
3
+ * Adds correct txVariant, fieldType and numKey for each iframe
4
+ *
5
+ * @param csfState - comes from initial, partial, implementation
6
+ * @param csfConfig - comes from initial, partial, implementation
7
+ *
8
+ * @param pDataObj -
9
+ */
10
+ export declare function postMessageToAllIframes({ csfState, csfConfig }: {
11
+ csfState: any;
12
+ csfConfig: any;
13
+ }, pDataObj: object): void;
@@ -0,0 +1,14 @@
1
+ import { SFFeedbackObj } from '../../types';
2
+ /**
3
+ *
4
+ * @param csfState - comes from initial, partial, implementation
5
+ * @param csfConfig - comes from initial, partial, implementation
6
+ * @param csfCallbacks - comes from initial, partial, implementation
7
+ *
8
+ * @param pFeedbackObj -
9
+ */
10
+ export declare function processAutoComplete({ csfState, csfConfig, csfCallbacks }: {
11
+ csfState: any;
12
+ csfConfig: any;
13
+ csfCallbacks: any;
14
+ }, pFeedbackObj: SFFeedbackObj): void;
@@ -0,0 +1,20 @@
1
+ import { SFFeedbackObj } from '../../types';
2
+ /**
3
+ * - If generic card type AND passed brand doesn't equal stored brand - send the new brand to the cvc input
4
+ * (so it can reassess what length it should be and if any value it contains is now valid)
5
+ *
6
+ * - Create object for onBrand callback aka SFPHandlers.handleOnBrand
7
+ *
8
+ * @param csfState - comes from initial, partial, implementation
9
+ * @param csfConfig - comes from initial, partial, implementation
10
+ * @param csfProps - comes from initial, partial, implementation
11
+ * @param csfCallbacks - comes from initial, partial, implementation
12
+ *
13
+ * @param pFeedbackObj -
14
+ */
15
+ export default function processBrand({ csfState, csfConfig, csfProps, csfCallbacks }: {
16
+ csfState: any;
17
+ csfConfig: any;
18
+ csfProps: any;
19
+ csfCallbacks: any;
20
+ }, pFeedbackObj: SFFeedbackObj): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @param csfState - comes from initial, partial, implementation
3
+ * @param csfConfig - comes from initial, partial, implementation
4
+ *
5
+ * @param pFieldType -
6
+ * @param doLog -
7
+ */
8
+ export declare function setFocusOnFrame({ csfState, csfConfig }: {
9
+ csfState: any;
10
+ csfConfig: any;
11
+ }, pFieldType: string, doLog?: boolean): void;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @param csfState - comes from initial, partial, implementation
3
+ * @param csfProps - comes from initial, partial, implementation
4
+ * @param csfCallbacks - comes from initial, partial, implementation
5
+ */
6
+ export default function validateForm({ csfState, csfProps, csfCallbacks }: {
7
+ csfState: any;
8
+ csfProps: any;
9
+ csfCallbacks: any;
10
+ }): void;
@@ -0,0 +1,84 @@
1
+ import Language from '../../../../../language/Language';
2
+ import { BrandStorageObject } from '../types';
3
+ /**
4
+ * Exposed functions that can be called on the CSF instance
5
+ */
6
+ export interface CSFReturnObject {
7
+ updateStyles: any;
8
+ setFocusOnFrame: any;
9
+ isValidated: any;
10
+ destroy: any;
11
+ brandsFromBinLookup: any;
12
+ hasUnsupportedCard: any;
13
+ addSecuredField: any;
14
+ removeSecuredField: any;
15
+ setKCPStatus: any;
16
+ sendValueToFrame?: any;
17
+ sfIsOptionalOrHidden: (f: string) => boolean;
18
+ }
19
+ /**
20
+ * Base interface for SetupObject & ConfigObject
21
+ */
22
+ interface CSFCommonProps {
23
+ loadingContext: string;
24
+ cardGroupTypes?: string[];
25
+ allowedDOMAccess?: boolean;
26
+ autoFocus?: boolean;
27
+ trimTrailingSeparator?: boolean;
28
+ showWarnings?: boolean;
29
+ keypadFix?: boolean;
30
+ isKCP?: boolean;
31
+ iframeUIConfig?: object;
32
+ legacyInputMode?: boolean;
33
+ minimumExpiryDate?: string;
34
+ implementationType?: 'components' | 'custom';
35
+ isCollatingErrors?: boolean;
36
+ }
37
+ /**
38
+ * Object sent when SecuredFieldsProvider initialises CSF
39
+ */
40
+ export interface CSFSetupObject extends CSFCommonProps {
41
+ type: string;
42
+ clientKey: string;
43
+ rootNode: string | HTMLElement;
44
+ callbacks?: object;
45
+ i18n?: Language;
46
+ }
47
+ /**
48
+ * The type for the config object created by CSF: properties that just need to be set once, at startup, and then don't change
49
+ * This object provides the source for many of the properties that are written into the SFSetupObject used to initialise a new SecuredField.ts
50
+ */
51
+ export interface CSFConfigObject extends CSFCommonProps {
52
+ iframeSrc: string;
53
+ isCreditCardType: boolean;
54
+ sfLogAtStart: boolean;
55
+ }
56
+ export interface CSFCallbacksConfig {
57
+ onLoad?: (callbackObj: object) => void;
58
+ onConfigSuccess?: (callbackObj: object) => void;
59
+ onFieldValid?: (callbackObj: object) => void;
60
+ onAllValid?: (callbackObj: object) => void;
61
+ onBrand?: (callbackObj: object) => void;
62
+ onError?: (callbackObj: object) => void;
63
+ onFocus?: (callbackObj: object) => void;
64
+ onBinValue?: (callbackObj: object) => void;
65
+ onAutoComplete?: (callbackObj: object) => void;
66
+ onAdditionalSFConfig?: (callbackObj: object) => void;
67
+ onAdditionalSFRemoved?: (callbackObj: object) => void;
68
+ }
69
+ export interface CSFStateObject {
70
+ type: string;
71
+ brand: BrandStorageObject;
72
+ allValid: boolean;
73
+ numIframes: number;
74
+ originalNumIframes: number;
75
+ iframeCount: number;
76
+ iframeConfigCount: number;
77
+ isConfigured: boolean;
78
+ hasSeparateDateFields: boolean;
79
+ currentFocusObject: string;
80
+ registerFieldForIos: boolean;
81
+ securedFields: object;
82
+ isKCP: boolean;
83
+ }
84
+ export {};
@@ -1,4 +1,4 @@
1
- import { CardObject } from '../types';
1
+ import { CardObject } from '../../types';
2
2
  declare const _default: {
3
3
  detectCard: (pCardNumber: any, pAvailableCards?: any) => any;
4
4
  detectCardLength: (pCard: any, pUnformattedVal: any) => {
@@ -0,0 +1,5 @@
1
+ import { CSFStateObject } from '../../types';
2
+ /**
3
+ * Retrieves the iframe, stored by field type, & returns it's contentWindow
4
+ */
5
+ export default function getIframeContentWin(csfState: CSFStateObject, fieldType: string): Window;
@@ -1,5 +1,5 @@
1
1
  import { CbObjOnError, SFFeedbackObj } from '../../types';
2
- import SecuredField from '../../../../../../components/internal/SecuredFields/lib/core/SecuredField';
2
+ import SecuredField from '../../securedField/SecuredField';
3
3
  declare type RtnType_callbackFn = (obj: CbObjOnError) => void;
4
4
  export declare const processErrors: (pFeedbackObj: SFFeedbackObj, securedField: SecuredField, type: string, rootNode: HTMLElement, callbackFn: RtnType_callbackFn) => CbObjOnError;
5
5
  export {};
@@ -0,0 +1 @@
1
+ export declare const getPreviousTabbableNonSFElement: (passedFieldType: any, rootNode: any, getPrevious?: any) => any;
@@ -1,20 +1,21 @@
1
- import { CVCPolicyType, DatePolicyType } from '../core/AbstractSecuredField';
1
+ import { CVCPolicyType, DatePolicyType } from '../types';
2
2
  export declare const ENCRYPTED_CARD_NUMBER = "encryptedCardNumber";
3
3
  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.7.4";
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";
@@ -1,10 +1,5 @@
1
- import { SFFeedbackObj, StylesObject } from '../types';
1
+ import { CVCPolicyType, DatePolicyType, RtnType_callbackFn, RtnType_noParamVoidFn, RtnType_postMessageListener, StylesObject } from '../types';
2
2
  import { ENCRYPTED_BANK_ACCNT_NUMBER_FIELD, ENCRYPTED_BANK_LOCATION_FIELD, ENCRYPTED_CARD_NUMBER, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR, ENCRYPTED_PWD_FIELD, ENCRYPTED_SECURITY_CODE, ENCRYPTED_SECURITY_CODE_3_DIGITS, ENCRYPTED_SECURITY_CODE_4_DIGITS } from '../configuration/constants';
3
- export declare type RtnType_noParamVoidFn = () => void;
4
- export declare type RtnType_postMessageListener = (event: Event) => void;
5
- export declare type RtnType_callbackFn = (feedbackObj: SFFeedbackObj) => void;
6
- export declare type CVCPolicyType = 'required' | 'optional' | 'hidden';
7
- export declare type DatePolicyType = 'required' | 'optional' | 'hidden';
8
3
  /**
9
4
  * Base interface, props common to both SFSetupObject & IframeConfigObject
10
5
  */
@@ -24,6 +19,7 @@ export interface SFInternalConfig {
24
19
  minimumExpiryDate: string;
25
20
  uid: string;
26
21
  implementationType: string;
22
+ bundleType: string;
27
23
  isCollatingErrors: boolean;
28
24
  }
29
25
  /**
@@ -1,4 +1,5 @@
1
- import AbstractSecuredField, { SFSetupObject, RtnType_noParamVoidFn, RtnType_postMessageListener, RtnType_callbackFn, CVCPolicyType, DatePolicyType } from '../core/AbstractSecuredField';
1
+ import AbstractSecuredField, { SFSetupObject } from './AbstractSecuredField';
2
+ import { CVCPolicyType, DatePolicyType, RtnType_noParamVoidFn, RtnType_postMessageListener, RtnType_callbackFn } from '../types';
2
3
  import Language from '../../../../../language/Language';
3
4
  declare class SecuredField extends AbstractSecuredField {
4
5
  constructor(pSetupObj: SFSetupObject, i18n: Language);
@@ -6,6 +7,10 @@ declare class SecuredField extends AbstractSecuredField {
6
7
  iframeOnLoadListenerFn(): void;
7
8
  postMessageListenerFn(event: MessageEvent): void;
8
9
  destroy(): void;
10
+ /**
11
+ * Returns whether the securedField is hidden OR whether it is optional and not in error
12
+ */
13
+ isOptionalOrHidden(): boolean;
9
14
  onIframeLoaded(callbackFn: RtnType_noParamVoidFn): SecuredField;
10
15
  onEncryption(callbackFn: RtnType_callbackFn): SecuredField;
11
16
  onValidation(callbackFn: RtnType_callbackFn): SecuredField;
@@ -1,5 +1,5 @@
1
- import { AriaConfig, SFInternalConfig } from '../../AbstractSecuredField';
2
- import Language from '../../../../../../../language/Language';
1
+ import { AriaConfig, SFInternalConfig } from '../AbstractSecuredField';
2
+ import Language from '../../../../../../language/Language';
3
3
  /**
4
4
  * Checks if the merchant has defined an ariaConfig object and if so enhances it with a iframeTitle and label property, if they don't already exist.
5
5
  * If the ariaConfig object doesn't exist at all we create one with these 2 properties.
@@ -1,4 +1,4 @@
1
- import { SFPlaceholdersObject, SFInternalConfig } from '../../AbstractSecuredField';
1
+ import { SFPlaceholdersObject, SFInternalConfig } from '../AbstractSecuredField';
2
2
  /**
3
3
  * Create placeholders with a value from the relevant translation file
4
4
  */
@@ -1,5 +1,3 @@
1
- import Language from '../../../../language/Language';
2
- import { CVCPolicyType, DatePolicyType } from './core/AbstractSecuredField';
3
1
  import { BrandObject } from '../../../Card/types';
4
2
  declare global {
5
3
  interface Window {
@@ -13,86 +11,6 @@ export interface BrandStorageObject {
13
11
  expiryDatePolicy: DatePolicyType;
14
12
  showSocialSecurityNumber?: boolean;
15
13
  }
16
- /**
17
- * Exposed functions that can be called on the CSF instance
18
- */
19
- export interface CSFReturnObject {
20
- updateStyles: any;
21
- setFocusOnFrame: any;
22
- isValidated: any;
23
- destroy: any;
24
- brandsFromBinLookup: any;
25
- hasUnsupportedCard: any;
26
- addSecuredField: any;
27
- removeSecuredField: any;
28
- setKCPStatus: any;
29
- sendValueToFrame?: any;
30
- }
31
- /**
32
- * Base interface for SetupObject & ConfigObject
33
- */
34
- interface CSFCommonProps {
35
- loadingContext: string;
36
- cardGroupTypes?: string[];
37
- allowedDOMAccess?: boolean;
38
- autoFocus?: boolean;
39
- trimTrailingSeparator?: boolean;
40
- showWarnings?: boolean;
41
- keypadFix?: boolean;
42
- isKCP?: boolean;
43
- iframeUIConfig?: object;
44
- legacyInputMode?: boolean;
45
- minimumExpiryDate?: string;
46
- implementationType?: string;
47
- isCollatingErrors?: boolean;
48
- }
49
- /**
50
- * Object sent when SecuredFieldsProvider initialises CSF
51
- */
52
- export interface CSFSetupObject extends CSFCommonProps {
53
- type: string;
54
- clientKey: string;
55
- rootNode: string | HTMLElement;
56
- callbacks?: object;
57
- i18n?: Language;
58
- }
59
- /**
60
- * The type for the config object created by CSF: properties that just need to be set once, at startup, and then don't change
61
- * This object provides the source for many of the properties that are written into the SFSetupObject used to initialise a new SecuredField.ts
62
- */
63
- export interface CSFConfigObject extends CSFCommonProps {
64
- iframeSrc: string;
65
- isCreditCardType: boolean;
66
- sfLogAtStart: boolean;
67
- }
68
- export interface CSFCallbacksConfig {
69
- onLoad?: (callbackObj: object) => void;
70
- onConfigSuccess?: (callbackObj: object) => void;
71
- onFieldValid?: (callbackObj: object) => void;
72
- onAllValid?: (callbackObj: object) => void;
73
- onBrand?: (callbackObj: object) => void;
74
- onError?: (callbackObj: object) => void;
75
- onFocus?: (callbackObj: object) => void;
76
- onBinValue?: (callbackObj: object) => void;
77
- onAutoComplete?: (callbackObj: object) => void;
78
- onAdditionalSFConfig?: (callbackObj: object) => void;
79
- onAdditionalSFRemoved?: (callbackObj: object) => void;
80
- }
81
- export interface CSFStateObject {
82
- type: string;
83
- brand: BrandStorageObject;
84
- allValid: boolean;
85
- numIframes: number;
86
- originalNumIframes: number;
87
- iframeCount: number;
88
- iframeConfigCount: number;
89
- isConfigured: boolean;
90
- hasSeparateDateFields: boolean;
91
- currentFocusObject: string;
92
- registerFieldForIos: boolean;
93
- securedFields: object;
94
- isKCP: boolean;
95
- }
96
14
  export interface StylesObject {
97
15
  base?: StyleDefinitions;
98
16
  error?: StyleDefinitions;
@@ -256,8 +174,14 @@ export interface ShiftTabObject {
256
174
  export interface SendBrandObject {
257
175
  brand: string;
258
176
  enableLuhnCheck: boolean;
177
+ panLength?: number;
259
178
  }
260
179
  export interface SendExpiryDateObject {
261
180
  expiryDatePolicy: DatePolicyType;
262
181
  }
182
+ export declare type RtnType_noParamVoidFn = () => void;
183
+ export declare type RtnType_postMessageListener = (event: Event) => void;
184
+ export declare type RtnType_callbackFn = (feedbackObj: SFFeedbackObj) => void;
185
+ export declare type CVCPolicyType = 'required' | 'optional' | 'hidden';
186
+ export declare type DatePolicyType = 'required' | 'optional' | 'hidden';
263
187
  export {};
@@ -36,4 +36,9 @@ declare function falsy(x: any): boolean;
36
36
  * @param x -
37
37
  */
38
38
  declare function notFalsy(x: any): boolean;
39
- export { generateRandomNumber, existy, falsy, isArray, objectsDeepEqual, notFalsy, truthy };
39
+ /**
40
+ * This function allows us to partially apply any number of variables to functions that take any number of parameters.
41
+ * @returns \{function(): *\}
42
+ */
43
+ declare function partial(...args: any[]): (...args2: any[]) => any;
44
+ export { generateRandomNumber, existy, falsy, isArray, objectsDeepEqual, notFalsy, partial, truthy };
@@ -1,24 +1,5 @@
1
1
  import Language from '../../../language/Language';
2
- import { SFPlaceholdersObject } from './lib/core/AbstractSecuredField';
3
- /**
4
- * Make an array of encrypted field names based on the value of the 'data-cse' attribute of elements in the rootNode
5
- */
6
- export declare const getFields: (rootNode: any) => any;
7
- /**
8
- * If, visually, we're dealing with a single date field (expiryDate) we still need separate entries
9
- * for expiryMonth & expiryYear - since that is how the values will be delivered from securedFields
10
- */
11
- export declare const validFieldsReducer: (acc: any, cur: any) => any;
12
- export declare const getErrorReducer: (numDateFields: any, state: any) => (acc: any, field: any) => any;
13
- /**
14
- * Create an object suitable for sending to our handleOnError function
15
- */
16
- export declare const getErrorObject: (fieldType: any, rootNode: any, state: any) => {
17
- rootNode: any;
18
- fieldType: any;
19
- error: any;
20
- type: string;
21
- };
2
+ import { SFPlaceholdersObject } from './lib/securedField/AbstractSecuredField';
22
3
  /**
23
4
  * Lookup translated values for the placeholders for the SecuredFields
24
5
  * and return an object with these mapped to the data-cse value of the SecuredField
@@ -21,6 +21,22 @@ export interface BaseElementProps {
21
21
  };
22
22
  isDropin?: boolean;
23
23
  }
24
+ export interface IUIElement {
25
+ isValid: boolean;
26
+ displayName: string;
27
+ accessibleName: string;
28
+ type: string;
29
+ elementRef: any;
30
+ submit(): void;
31
+ setStatus(status: UIElementStatus, props?: {
32
+ message?: string;
33
+ [key: string]: any;
34
+ }): UIElement;
35
+ handleAction(action: PaymentAction): UIElement | null;
36
+ showValidation(): void;
37
+ setState(newState: object): void;
38
+ }
39
+ export declare type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
24
40
  export interface UIElementProps extends BaseElementProps {
25
41
  session?: {
26
42
  id: string;
@@ -45,5 +61,9 @@ export interface UIElementProps extends BaseElementProps {
45
61
  * @defaultValue true
46
62
  */
47
63
  showPayButton?: boolean;
64
+ /**
65
+ * Set to false to not set the Component status to 'loading' when onSubmit is triggered.
66
+ * @defaultValue true
67
+ */
48
68
  setStatusAutomatically?: boolean;
49
69
  }
@@ -3,6 +3,7 @@ declare class PaymentMethodsResponse {
3
3
  paymentMethods: PaymentMethod[];
4
4
  storedPaymentMethods: PaymentMethod[];
5
5
  constructor(response: any, options?: {});
6
+ private mapCreatedComponentType;
6
7
  has(paymentMethod: string): boolean;
7
8
  find(paymentMethod: string): PaymentMethod;
8
9
  }
@@ -6,9 +6,10 @@ interface HttpOptions {
6
6
  loadingContext?: string;
7
7
  method?: string;
8
8
  path: string;
9
- errorLevel?: 'silent' | 'info' | 'warn' | 'error' | 'fatal';
9
+ errorLevel?: ErrorLevel;
10
10
  }
11
- export declare function http(options: HttpOptions, data?: any): Promise<any>;
12
- export declare const httpGet: (options: HttpOptions, data?: any) => Promise<any>;
13
- export declare const httpPost: (options: HttpOptions, data?: any) => Promise<any>;
11
+ declare type ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';
12
+ export declare function http<T>(options: HttpOptions, data?: any): Promise<T>;
13
+ export declare function httpGet<T = any>(options: HttpOptions, data?: any): Promise<T>;
14
+ export declare function httpPost<T = any>(options: HttpOptions, data?: any): Promise<T>;
14
15
  export {};
@@ -29,8 +29,15 @@ declare class Core {
29
29
  submitDetails(details: any): void;
30
30
  /**
31
31
  * Instantiates a new UIElement component ready to be mounted
32
- * @param paymentMethod - name or class of the paymentMethod
33
- * @param options - options that will be merged to the global Checkout props
32
+ *
33
+ * @param paymentMethod - either name of the paymentMethod (in theory this can also be a class, but we don't use it this way)
34
+ * or object extracted from the paymentMethods response .paymentMethods or .storedPaymentMethods (scenario: Dropin creating components for its PM list)
35
+ *
36
+ * @param options - an object whose form varies, can be:
37
+ * - the merchant defined config object passed when a component is created via checkout.create
38
+ * - the Dropin created object from Dropin/components/utils.getCommonProps()
39
+ * - an object extracted from the paymentMethods response .storedPaymentMethods (scenario: standalone storedCard comp)
40
+ *
34
41
  * @returns new UIElement
35
42
  */
36
43
  create<T extends keyof PaymentMethods>(paymentMethod: T | string, options?: PaymentMethodOptions<T>): InstanceType<PaymentMethods[T]>;
@@ -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
  };