@adyen/adyen-web 5.6.1 → 5.6.2

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 (78) hide show
  1. package/dist/adyen.js +1 -1
  2. package/dist/adyen.js.map +1 -1
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/es/index.js +1 -1
  5. package/dist/es.modern/index.js +1 -1
  6. package/dist/types/components/Card/Bancontact.d.ts +1 -1
  7. package/dist/types/components/Card/components/CardInput/components/types.d.ts +1 -1
  8. package/dist/types/components/Card/components/CardInput/types.d.ts +1 -1
  9. package/dist/types/components/Card/types.d.ts +1 -1
  10. package/dist/types/components/Dropin/Dropin.d.ts +5 -1
  11. package/dist/types/components/Dropin/components/DropinComponent.d.ts +3 -2
  12. package/dist/types/components/Dropin/types.d.ts +6 -2
  13. package/dist/types/components/ThreeDS2/callSubmit3DS2Fingerprint.d.ts +2 -1
  14. package/dist/types/components/ThreeDS2/types.d.ts +18 -0
  15. package/dist/types/components/UIElement.d.ts +10 -11
  16. package/dist/types/components/internal/SecuredFields/SFP/SFPUtils.d.ts +19 -0
  17. package/dist/types/components/internal/SecuredFields/{SecuredFieldsProvider.d.ts → SFP/SecuredFieldsProvider.d.ts} +4 -4
  18. package/dist/types/components/internal/SecuredFields/{SecuredFieldsProviderHandlers.d.ts → SFP/SecuredFieldsProviderHandlers.d.ts} +1 -1
  19. package/dist/types/components/internal/SecuredFields/{defaultProps.d.ts → SFP/defaultProps.d.ts} +2 -2
  20. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/AbstractCSF.d.ts +8 -7
  21. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/CSF.d.ts +1 -5
  22. package/dist/types/components/internal/SecuredFields/lib/{core/utils/registerAdditionalField.d.ts → CSF/extensions/additionalFields.d.ts} +0 -0
  23. package/dist/types/components/internal/SecuredFields/lib/{configuration → CSF/extensions}/configureCallbacks.d.ts +0 -0
  24. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/extensions}/createSecuredFields.d.ts +0 -0
  25. package/dist/types/components/internal/SecuredFields/lib/{core/utils → CSF/extensions}/handleBrandFromBinLookup.d.ts +1 -1
  26. package/dist/types/components/internal/SecuredFields/lib/{configuration → CSF/extensions}/handleConfig.d.ts +0 -0
  27. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/extensions}/handleEncryption.d.ts +1 -1
  28. package/dist/types/components/internal/SecuredFields/lib/{core/utils/tabbing → CSF/extensions}/handleTab.d.ts +0 -0
  29. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/extensions}/handleValidation.d.ts +1 -1
  30. package/dist/types/components/internal/SecuredFields/lib/CSF/index.d.ts +2 -0
  31. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/initCSF.d.ts +1 -1
  32. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/handleBinValue.d.ts +11 -0
  33. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/handleFocus.d.ts +15 -0
  34. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/handleIframeConfigFeedback.d.ts +11 -0
  35. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/isConfigured.d.ts +13 -0
  36. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.d.ts +13 -0
  37. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.d.ts +14 -0
  38. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/processBrand.d.ts +20 -0
  39. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/setFocusOnFrame.d.ts +11 -0
  40. package/dist/types/components/internal/SecuredFields/lib/CSF/partials/validateForm.d.ts +10 -0
  41. package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +83 -0
  42. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/callbackUtils.d.ts +0 -0
  43. package/dist/types/components/internal/SecuredFields/lib/{utilities → CSF/utils}/cardType.d.ts +1 -1
  44. package/dist/types/components/internal/SecuredFields/lib/{core → CSF/utils}/destroySecuredFields.d.ts +0 -0
  45. package/dist/types/components/internal/SecuredFields/lib/{ui → CSF/utils}/encryptedElements.d.ts +0 -0
  46. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/getCardGroupTypes.d.ts +0 -0
  47. package/dist/types/components/internal/SecuredFields/lib/CSF/utils/iframes/getIframeContentWin.d.ts +5 -0
  48. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/iframes/postMessageToIframe.d.ts +0 -0
  49. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/iframes/postMessageValidation.d.ts +0 -0
  50. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/processErrors.d.ts +1 -1
  51. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioACH.d.ts +0 -0
  52. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioCreditCard.d.ts +0 -0
  53. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioGiftCard.d.ts +0 -0
  54. package/dist/types/components/internal/SecuredFields/lib/{core → CSF}/utils/tabbing/tabScenarioKCP.d.ts +0 -0
  55. package/dist/types/components/internal/SecuredFields/lib/{ui/domUtils.d.ts → CSF/utils/tabbing/utils.d.ts} +0 -1
  56. package/dist/types/components/internal/SecuredFields/lib/{utilities → CSF/utils}/userAgent.d.ts +0 -0
  57. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +2 -2
  58. package/dist/types/components/internal/SecuredFields/lib/{core → securedField}/AbstractSecuredField.d.ts +1 -6
  59. package/dist/types/components/internal/SecuredFields/lib/{core → securedField}/SecuredField.d.ts +2 -1
  60. package/dist/types/components/internal/SecuredFields/lib/{utilities → securedField/utils}/createIframe.d.ts +0 -0
  61. package/dist/types/components/internal/SecuredFields/lib/{core/utils/init → securedField/utils}/processAriaConfig.d.ts +2 -2
  62. package/dist/types/components/internal/SecuredFields/lib/{core/utils/init → securedField/utils}/processPlaceholders.d.ts +1 -1
  63. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +5 -82
  64. package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +6 -1
  65. package/dist/types/components/internal/SecuredFields/utils.d.ts +1 -20
  66. package/dist/types/components/types.d.ts +20 -0
  67. package/dist/types/core/Services/http.d.ts +5 -4
  68. package/package.json +1 -1
  69. package/dist/types/components/internal/SecuredFields/lib/core/utils/handleBinValue.d.ts +0 -2
  70. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/handleFocus.d.ts +0 -2
  71. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/handleIframeConfigFeedback.d.ts +0 -1
  72. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/postMessageToAllIframes.d.ts +0 -1
  73. package/dist/types/components/internal/SecuredFields/lib/core/utils/iframes/setFocusOnFrame.d.ts +0 -1
  74. package/dist/types/components/internal/SecuredFields/lib/core/utils/isConfigured.d.ts +0 -1
  75. package/dist/types/components/internal/SecuredFields/lib/core/utils/processAutoComplete.d.ts +0 -2
  76. package/dist/types/components/internal/SecuredFields/lib/core/utils/processBrand.d.ts +0 -8
  77. package/dist/types/components/internal/SecuredFields/lib/core/utils/validateForm.d.ts +0 -1
  78. package/dist/types/components/internal/SecuredFields/lib/index.d.ts +0 -2
@@ -15,7 +15,7 @@ declare class BancontactElement extends CardElement {
15
15
  */
16
16
  formatProps(props: CardElementProps): {
17
17
  type: string;
18
- cvcPolicy: import("../internal/SecuredFields/lib/core/AbstractSecuredField").CVCPolicyType;
18
+ cvcPolicy: import("../internal/SecuredFields/lib/types").CVCPolicyType;
19
19
  countryCode: any;
20
20
  configuration: {
21
21
  socialSecurityNumberMode: import("./types").SocialSecurityMode;
@@ -1,7 +1,7 @@
1
1
  import { PaymentAmount } from '../../../../../types';
2
2
  import { CardBrandsConfiguration } from '../../../types';
3
3
  import { ComponentChildren } from 'preact';
4
- import { CVCPolicyType, DatePolicyType } from '../../../../internal/SecuredFields/lib/core/AbstractSecuredField';
4
+ import { CVCPolicyType, DatePolicyType } from '../../../../internal/SecuredFields/lib/types';
5
5
  export interface BrandIconProps {
6
6
  brand: string;
7
7
  brandsConfiguration: CardBrandsConfiguration;
@@ -3,7 +3,7 @@ import { CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement, Soc
3
3
  import { PaymentAmount } from '../../../../types';
4
4
  import { InstallmentOptions } from './components/types';
5
5
  import { ValidationResult } from '../../../internal/PersonalDetails/types';
6
- import { CVCPolicyType, DatePolicyType } from '../../../internal/SecuredFields/lib/core/AbstractSecuredField';
6
+ import { CVCPolicyType, DatePolicyType } from '../../../internal/SecuredFields/lib/types';
7
7
  import { ValidationRuleResult } from '../../../../utils/Validator/Validator';
8
8
  import Specifications from '../../../internal/Address/Specifications';
9
9
  import { AddressSchema, StringObject } from '../../../internal/Address/types';
@@ -1,7 +1,7 @@
1
1
  import { UIElementProps } from '../types';
2
2
  import { AddressData, BrowserInfo } from '../../types';
3
3
  import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup } from '../internal/SecuredFields/lib/types';
4
- import { CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/core/AbstractSecuredField';
4
+ import { CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
5
5
  export interface CardElementProps extends UIElementProps {
6
6
  /**
7
7
  * Only set for a stored card,
@@ -25,6 +25,10 @@ declare class DropinElement extends UIElement<DropinElementProps> {
25
25
  showPayButton: boolean;
26
26
  };
27
27
  dropinRef: any;
28
+ /**
29
+ * Reference to the component created from `handleAction` (Ex.: ThreeDS2Challenge)
30
+ */
31
+ componentFromAction?: UIElement;
28
32
  constructor(props: any);
29
33
  formatProps(props: any): {
30
34
  instantPaymentTypes: InstantPaymentTypes[];
@@ -87,7 +91,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
87
91
  * Creates the Drop-in elements
88
92
  */
89
93
  private handleCreate;
90
- handleAction(action: PaymentAction, props?: {}): any;
94
+ handleAction(action: PaymentAction, props?: {}): this | null;
91
95
  closeActivePaymentMethod(): void;
92
96
  render(): h.JSX.Element;
93
97
  }
@@ -1,11 +1,12 @@
1
1
  import { Component } from 'preact';
2
- import { DropinComponentProps, DropinComponentState } from '../types';
2
+ import { DropinComponentProps, DropinComponentState, DropinStatusProps } from '../types';
3
3
  import './DropinComponent.scss';
4
+ import { UIElementStatus } from '../../types';
4
5
  export declare class DropinComponent extends Component<DropinComponentProps, DropinComponentState> {
5
6
  state: DropinComponentState;
6
7
  componentDidMount(): void;
7
8
  prepareDropinData: () => void;
8
- private setStatus;
9
+ setStatus: (status: UIElementStatus, props?: DropinStatusProps) => void;
9
10
  private setActivePaymentMethod;
10
11
  componentDidUpdate(prevProps: any, prevState: any): void;
11
12
  private handleOnSelectPaymentMethod;
@@ -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 {
@@ -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,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,27 +1,26 @@
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
26
  handleAction(action: PaymentAction, props?: {}): UIElement;
@@ -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;
@@ -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,9 +1,9 @@
1
1
  import { Component } from 'preact';
2
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';
3
+ import { StylesObject, CbObjOnError } from '../lib/types';
4
+ import { AddressData } from '../../../../types';
5
+ import { BinLookupResponse } from '../../../Card/types';
6
+ import { CVCPolicyType, DatePolicyType } from '../lib/types';
7
7
  export interface SFPState {
8
8
  status?: string;
9
9
  brand?: string;
@@ -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
@@ -1,5 +1,5 @@
1
- import { Language } from '../../../language/Language';
2
- import { CVCPolicyType } from './lib/core/AbstractSecuredField';
1
+ import { Language } from '../../../../language/Language';
2
+ import { CVCPolicyType } from '../lib/types';
3
3
  export interface SFPProps {
4
4
  /**
5
5
  * CSF RELATED (±22)
@@ -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;
@@ -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,83 @@
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
+ }
18
+ /**
19
+ * Base interface for SetupObject & ConfigObject
20
+ */
21
+ interface CSFCommonProps {
22
+ loadingContext: string;
23
+ cardGroupTypes?: string[];
24
+ allowedDOMAccess?: boolean;
25
+ autoFocus?: boolean;
26
+ trimTrailingSeparator?: boolean;
27
+ showWarnings?: boolean;
28
+ keypadFix?: boolean;
29
+ isKCP?: boolean;
30
+ iframeUIConfig?: object;
31
+ legacyInputMode?: boolean;
32
+ minimumExpiryDate?: string;
33
+ implementationType?: string;
34
+ isCollatingErrors?: boolean;
35
+ }
36
+ /**
37
+ * Object sent when SecuredFieldsProvider initialises CSF
38
+ */
39
+ export interface CSFSetupObject extends CSFCommonProps {
40
+ type: string;
41
+ clientKey: string;
42
+ rootNode: string | HTMLElement;
43
+ callbacks?: object;
44
+ i18n?: Language;
45
+ }
46
+ /**
47
+ * The type for the config object created by CSF: properties that just need to be set once, at startup, and then don't change
48
+ * This object provides the source for many of the properties that are written into the SFSetupObject used to initialise a new SecuredField.ts
49
+ */
50
+ export interface CSFConfigObject extends CSFCommonProps {
51
+ iframeSrc: string;
52
+ isCreditCardType: boolean;
53
+ sfLogAtStart: boolean;
54
+ }
55
+ export interface CSFCallbacksConfig {
56
+ onLoad?: (callbackObj: object) => void;
57
+ onConfigSuccess?: (callbackObj: object) => void;
58
+ onFieldValid?: (callbackObj: object) => void;
59
+ onAllValid?: (callbackObj: object) => void;
60
+ onBrand?: (callbackObj: object) => void;
61
+ onError?: (callbackObj: object) => void;
62
+ onFocus?: (callbackObj: object) => void;
63
+ onBinValue?: (callbackObj: object) => void;
64
+ onAutoComplete?: (callbackObj: object) => void;
65
+ onAdditionalSFConfig?: (callbackObj: object) => void;
66
+ onAdditionalSFRemoved?: (callbackObj: object) => void;
67
+ }
68
+ export interface CSFStateObject {
69
+ type: string;
70
+ brand: BrandStorageObject;
71
+ allValid: boolean;
72
+ numIframes: number;
73
+ originalNumIframes: number;
74
+ iframeCount: number;
75
+ iframeConfigCount: number;
76
+ isConfigured: boolean;
77
+ hasSeparateDateFields: boolean;
78
+ currentFocusObject: string;
79
+ registerFieldForIos: boolean;
80
+ securedFields: object;
81
+ isKCP: boolean;
82
+ }
83
+ 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 {};
@@ -1,2 +1 @@
1
- export declare const findRootNode: (pRootNode: any) => any;
2
1
  export declare const getPreviousTabbableNonSFElement: (passedFieldType: any, rootNode: any) => any;
@@ -1,4 +1,4 @@
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";
@@ -11,7 +11,7 @@ export declare const ENCRYPTED_PIN_FIELD = "encryptedPin";
11
11
  export declare const GIFT_CARD = "giftcard";
12
12
  export declare const ENCRYPTED_BANK_ACCNT_NUMBER_FIELD = "encryptedBankAccountNumber";
13
13
  export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
14
- export declare const SF_VERSION = "3.7.5";
14
+ export declare const SF_VERSION = "3.8.0";
15
15
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
16
16
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
17
17
  export declare const SF_FIELDS_ARRAY: string[];
@@ -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
  */
@@ -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);