@adyen/kyc-components 2.35.0 → 2.36.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.
package/dist/style.css CHANGED
@@ -101552,7 +101552,6 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
101552
101552
  background-color: #fff;
101553
101553
  padding: 32px;
101554
101554
  border-radius: 8px;
101555
- z-index: 2;
101556
101555
  }/* #region Spacing */
101557
101556
  /* #endregion */
101558
101557
  /* #region Colors */
@@ -111014,7 +111013,7 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
111014
111013
  .adl-u-width-auto {
111015
111014
  width: auto !important;
111016
111015
  }
111017
- .adyen-onboarding-redirect {
111016
+ .adyen-view-verification-status {
111018
111017
  color: #00112c;
111019
111018
  font-family: fakt, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif;
111020
111019
  font-size: 15px;
@@ -111026,24 +111025,18 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
111026
111025
  overflow: hidden;
111027
111026
  position: relative;
111028
111027
  }
111029
- .adyen-onboarding-redirect *,
111030
- .adyen-onboarding-redirect *::before,
111031
- .adyen-onboarding-redirect *::after {
111028
+ .adyen-view-verification-status *,
111029
+ .adyen-view-verification-status *::before,
111030
+ .adyen-view-verification-status *::after {
111032
111031
  box-sizing: border-box;
111033
111032
  }
111034
- .adyen-onboarding-redirect__header {
111035
- margin: 0 0 18px 0;
111036
- color: #394962;
111037
- font-size: 21px;
111038
- line-height: 1.4;
111039
- }
111040
- .adyen-onboarding-redirect__description {
111033
+ .adyen-view-verification-status__description {
111041
111034
  color: #394962;
111042
111035
  font-size: 15px;
111043
111036
  line-height: 1.4;
111044
111037
  margin: 0 0 12px 0;
111045
111038
  }
111046
- .adyen-onboarding-redirect__button {
111039
+ .adyen-view-verification-status__button {
111047
111040
  font-size: 15px;
111048
111041
  line-height: 1.4;
111049
111042
  }
@@ -6,9 +6,9 @@ import { Document, ExistingDocument } from '../../core/models/api/document';
6
6
  import { BankVerificationVendorsResponse } from '../../core/models/api/get-bankVerification-providers';
7
7
  import type { InstantIdVerificationStartCheckRequest, InstantIdVerificationStartCheckResponse, InstantIdVerificationTokenRequest, InstantIdVerificationTokenResponse } from '../../core/models/api/instant-id-verification';
8
8
  import { ExistingLegalEntity, LegalEntity, PatchLegalEntity } from '../../core/models/api/legal-entity';
9
- import { OnboardingLinkConfig, OnboardingLinkResponse, OnboardingStatusResponse } from '../../core/models/api/onboarding-redirect';
10
9
  import { ReviewCompletion } from '../../core/models/api/review';
11
10
  import { TransferInstrument } from '../../core/models/api/transfer-instrument';
11
+ import { OnboardingLinkConfig, OnboardingLinkResponse, OnboardingStatusResponse } from '../../core/models/api/view-verification-status';
12
12
  import { CountryCode } from '../../core/models/country-code';
13
13
  import { BaseTrackingPayload } from '../../core/utils';
14
14
  import { TranslationKey } from '../../language/types';
@@ -1,15 +1,16 @@
1
- import './OnboardingRedirectComponent.scss';
1
+ import './ViewVerificationStatusComponent.scss';
2
2
  import { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
3
- import { OnboardingStatus } from '../../../core/models/api/onboarding-redirect';
3
+ import { OnboardingStatus } from '../../../core/models/api/view-verification-status';
4
4
  import EventEmitter from '../../EventEmitter';
5
5
  import { ErrorEntity, OnboardingRedirectConfig, OnboardingUrlTarget } from './types';
6
- export interface OnboardingRedirectComponentProps {
6
+ export interface ViewVerificationStatusComponentProps {
7
7
  legalEntityId: ExistingLegalEntity['id'];
8
- redirectTarget?: OnboardingUrlTarget;
8
+ hideExplanation?: boolean;
9
9
  returnUrl?: string;
10
+ redirectTarget?: OnboardingUrlTarget;
10
11
  onStatusChange?: (status: OnboardingStatus) => void;
11
12
  onError?: (errorEntity: ErrorEntity) => void;
12
13
  onRedirect?: (config: OnboardingRedirectConfig) => void;
13
14
  eventEmitter?: EventEmitter;
14
15
  }
15
- export declare function OnboardingRedirectComponent({ legalEntityId, returnUrl, redirectTarget, onStatusChange, onError, onRedirect, eventEmitter, }: OnboardingRedirectComponentProps): import("preact").JSX.Element;
16
+ export declare function ViewVerificationStatusComponent({ legalEntityId, hideExplanation, returnUrl, redirectTarget, onStatusChange, onError, onRedirect, eventEmitter, }: ViewVerificationStatusComponentProps): import("preact").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { OnboardingRedirectContent, OnboardingStatus } from '../../../core/models/api/onboarding-redirect';
1
+ import { OnboardingRedirectContent, OnboardingStatus } from '../../../core/models/api/view-verification-status';
2
2
  export declare function getContentByStatus(status: OnboardingStatus): OnboardingRedirectContent | undefined;
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export { ViewVerificationStatusComponent } from './ViewVerificationStatusComponent';
@@ -1,4 +1,4 @@
1
- import { OnboardingLinkConfig } from '../../../core/models/api/onboarding-redirect';
1
+ import { OnboardingLinkConfig } from '../../../core/models/api/view-verification-status';
2
2
  export interface IError {
3
3
  message: string;
4
4
  stack?: string;
@@ -12,7 +12,7 @@ import { SolePropDropinComponent } from './Dropins/SolePropDropin';
12
12
  import { TrustDropinComponent } from './Dropins/TrustDropin';
13
13
  import { CreateIndividualComponent } from './EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent';
14
14
  import { CreateTransferInstrumentComponent } from './EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent';
15
- import { OnboardingRedirectComponent } from './EmbeddedDropins/OnboardingRedirect';
15
+ import { ViewVerificationStatusComponent } from './EmbeddedDropins/ViewVerificationStatus';
16
16
  /**
17
17
  * Maps each component with a Component element.
18
18
  */
@@ -27,7 +27,7 @@ export declare const componentsMap: {
27
27
  readonly pci: typeof PciDropinComponent;
28
28
  readonly createTransferInstrumentComponent: typeof CreateTransferInstrumentComponent;
29
29
  readonly createIndividualComponent: typeof CreateIndividualComponent;
30
- readonly onboardingRedirectComponent: typeof OnboardingRedirectComponent;
30
+ readonly viewVerificationStatusComponent: typeof ViewVerificationStatusComponent;
31
31
  };
32
32
  export type ComponentMap = typeof componentsMap;
33
33
  export type ComponentProps<Name extends keyof ComponentMap> = Parameters<ComponentMap[Name]>[0];
@@ -1,4 +1,4 @@
1
1
  import { ComponentOptions } from '../../components';
2
2
  import { CoreOptions } from '../types';
3
3
  export declare const validateCoreOptions: (coreOptions: CoreOptions) => void;
4
- export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "taskList" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "onboardingRedirectComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
4
+ export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "taskList" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "viewVerificationStatusComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
@@ -1,3 +1,3 @@
1
- import { OnboardingLinkConfig, OnboardingLinkResponse } from '../../models/api/onboarding-redirect';
1
+ import { OnboardingLinkConfig, OnboardingLinkResponse } from '../../models/api/view-verification-status';
2
2
  import { ComponentApiRequestContext } from '../types';
3
3
  export declare const generateOnboardingLink: (context: ComponentApiRequestContext, config: OnboardingLinkConfig) => Promise<OnboardingLinkResponse>;
@@ -1,3 +1,3 @@
1
- import { OnboardingStatusResponse } from '../../models/api/onboarding-redirect';
1
+ import { OnboardingStatusResponse } from '../../models/api/view-verification-status';
2
2
  import { ComponentApiRequestContext } from '../types';
3
3
  export declare const getOnboardingStatus: (context: ComponentApiRequestContext) => Promise<OnboardingStatusResponse>;
@@ -8,7 +8,7 @@ export declare class Core {
8
8
  };
9
9
  components: UIElement[];
10
10
  constructor(coreOptions: CoreOptions);
11
- create: <Name extends "payoutAccount" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "taskList" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "onboardingRedirectComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
11
+ create: <Name extends "payoutAccount" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "taskList" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "viewVerificationStatusComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
12
12
  /**
13
13
  * Updates global configurations, resets the internal state and remounts each element.
14
14
  * @param options - props to update
@@ -6,6 +6,8 @@ interface UseAssociatedLegalArrangementOptions {
6
6
  }
7
7
  interface UseAssociatedLegalArrangement {
8
8
  associatedLegalArrangement: ExistingLegalEntity | undefined;
9
+ setAssociatedLegalArrangement: (le: ExistingLegalEntity) => void;
10
+ refreshAssociatedLegalArrangement: () => void;
9
11
  }
10
12
  export declare function useAssociatedLegalArrangement({ rootLegalEntity, getLegalEntity, }: UseAssociatedLegalArrangementOptions): UseAssociatedLegalArrangement;
11
13
  export {};
@@ -1,14 +1,14 @@
1
1
  import { TranslationKey } from '../../../language/types';
2
2
  export declare enum OnboardingStatus {
3
- INCOMPLETE = "INCOMPLETE",
4
- PROCESSING = "PROCESSING",
5
- ERROR = "ERROR",
6
- FINISHED = "FINISHED"
3
+ AWAITING_DATA = "AWAITING_DATA",
4
+ IN_REVIEW = "IN_REVIEW",
5
+ UNSUCCESSFUL = "UNSUCCESSFUL",
6
+ REJECTED = "REJECTED",
7
+ VERIFIED = "VERIFIED"
7
8
  }
8
9
  export interface OnboardingRedirectContent {
9
- header: TranslationKey;
10
10
  description: TranslationKey[];
11
- ctaButton: TranslationKey;
11
+ ctaButton?: TranslationKey;
12
12
  }
13
13
  export interface OnboardingStatusResponse {
14
14
  status: OnboardingStatus;
@@ -10,6 +10,11 @@ export interface InputToken {
10
10
  optional?: boolean;
11
11
  }
12
12
  export type MaskToken = NonInputToken | InputToken;
13
+ export interface PossibleShift {
14
+ fromIndex: number;
15
+ shiftDistance: number;
16
+ }
13
17
  export interface Mask {
14
18
  tokens: MaskToken[];
19
+ possibleShifts: PossibleShift[];
15
20
  }
@@ -12,6 +12,9 @@ export interface MismatchResult {
12
12
  partialDisplayValue: string;
13
13
  }
14
14
  export type MaskResult = CorrectResult | MismatchResult;
15
+ export type MatchedToken = MaskToken & {
16
+ char: string;
17
+ };
15
18
  /**
16
19
  * Takes some pure value e.g. `NL123456` and a {@link Mask}, and returns a `partialCorrect`,
17
20
  * `correct` or `mismatch` {@link MaskResult} accordingly.
@@ -0,0 +1,15 @@
1
+ import { MaskToken, PossibleShift } from './maskTypes';
2
+ import type { MatchedToken } from './matchAgainstMask';
3
+ export declare const shiftRight: (possibleShifts: PossibleShift[], matchedTokens: MatchedToken[], remainingTokens: MaskToken[]) => {
4
+ matchedTokens: MatchedToken[];
5
+ remainingTokens: MaskToken[];
6
+ };
7
+ /**
8
+ * Returns all possible shifts of optional inputs, sorted by best to worst
9
+ * @param mask
10
+ */
11
+ export declare const findPossibleShifts: (mask: MaskToken[]) => PossibleShift[];
12
+ export declare const tryShift: (matchedTokens: MatchedToken[], remainingTokens: MaskToken[], fromIndex: number, shiftDistance: number) => {
13
+ matchedTokens: MatchedToken[];
14
+ remainingTokens: MaskToken[];
15
+ } | "notPossible";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1,2 +0,0 @@
1
- export { OnboardingRedirectComponent } from './OnboardingRedirectComponent';
2
- export * from './types';
@@ -1,11 +0,0 @@
1
- import { DropinAPIHandlers } from '../../components/Dropins/types';
2
- import { ExistingLegalEntity } from '../models/api/legal-entity';
3
- interface UseTrustArgs {
4
- rootLegalEntity: ExistingLegalEntity;
5
- handleGetLegalEntity: NonNullable<DropinAPIHandlers['handleGetLegalEntity']>;
6
- }
7
- export declare const useTrust: ({ rootLegalEntity, handleGetLegalEntity, }: UseTrustArgs) => [
8
- ExistingLegalEntity | undefined,
9
- () => Promise<ExistingLegalEntity | undefined>
10
- ];
11
- export {};