@adyen/kyc-components 3.66.4 → 3.67.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/{AccountSetupRejected-BCmjiF_6.js → AccountSetupRejected-gYtp0Txi.js} +1 -1
- package/dist/{BusinessTypeSelection-eOAjwxqz.js → BusinessTypeSelection-BGnlpnIt.js} +3 -4
- package/dist/{CXEL7IU7-D1h8gd6-.js → CXEL7IU7-BMBtNPj4.js} +3 -3
- package/dist/{CustomerSupport-CSt6Z7t8.js → CustomerSupport-DtPK_BrP.js} +2 -2
- package/dist/{DebugModal-DRBU-BOq.js → DebugModal-BdMr7fPl.js} +8 -7
- package/dist/{DecisionMakers-DLyOK4UM.js → DecisionMakers-B98U_ugm.js} +3 -11
- package/dist/{HASRA6WW-BD-4MJko.js → HASRA6WW-cUOcZUGT.js} +2 -2
- package/dist/{I3HPI4QX-DrgIX5e9.js → I3HPI4QX-BgHxLhRI.js} +3 -3
- package/dist/{Introduction-C9b9dHyf.js → Introduction-OexTjfSi.js} +1 -1
- package/dist/{Review-B7M3nx8s.js → Review-BoeUIf9n.js} +2 -2
- package/dist/{SingpassSelection-DzsYd_Dd.js → SingpassSelection-ChdugAIt.js} +1 -1
- package/dist/{TaxReportingDropin-CYsGK4_f.js → TaxReportingDropin-Bdl7gnfT.js} +59 -99
- package/dist/adyen-kyc-components.js +1 -1
- package/dist/adyenConfig.js +1 -1
- package/dist/{bg-BG-A3hPFDNp.js → bg-BG-CfJNzZu7.js} +52 -20
- package/dist/{core-CNb92U09.js → core-B-WQPmuP.js} +2462 -2593
- package/dist/{cs-CZ-D6v5Avk5.js → cs-CZ-CRMGIz8x.js} +51 -19
- package/dist/{css-DLMEG7cT.js → css-5glJY2Bu.js} +2 -2
- package/dist/{da-DK-CYQGBfOV.js → da-DK-C7ftGVR7.js} +51 -19
- package/dist/{de-DE-B7E0kWMZ.js → de-DE-C39k0axr.js} +61 -29
- package/dist/{el-GR-C6Dq1gS5.js → el-GR-BGGUBqdt.js} +51 -19
- package/dist/{es-ES-COBtlgOE.js → es-ES-BojuwecZ.js} +50 -18
- package/dist/{et-EE-BBxgHOXL.js → et-EE-DEVH-7IA.js} +52 -20
- package/dist/{fi-FI-9djxYUQ9.js → fi-FI-Bku_85E3.js} +51 -19
- package/dist/{fr-FR-C2bzvzCh.js → fr-FR-HnJ_pnor.js} +52 -20
- package/dist/{hr-HR-DGwcKuUD.js → hr-HR-DXiqG0wV.js} +51 -19
- package/dist/{hu-HU-BSqCeaXu.js → hu-HU-DctyKbNV.js} +52 -20
- package/dist/{it-IT-BU9uudIU.js → it-IT-tSaYFPHL.js} +53 -21
- package/dist/ja-JP-DrupcLqM.js +1902 -0
- package/dist/{json-CbT4O_Ld.js → json-aSN8-541.js} +2 -2
- package/dist/{lt-LT-B1df1uFD.js → lt-LT-C4y-mmdw.js} +51 -19
- package/dist/{lv-LV-BHVGTOmK.js → lv-LV-CqmNw1Ry.js} +52 -20
- package/dist/{nl-NL-Bl29ShMh.js → nl-NL-CALz56wW.js} +51 -19
- package/dist/{no-NO-Bu_YLATD.js → no-NO-SyIXHgGV.js} +53 -21
- package/dist/{pl-PL-B_YxjiYr.js → pl-PL-veuK_Fs-.js} +51 -19
- package/dist/{plaintext-Cr4KGRo-.js → plaintext-C27sgoKw.js} +2 -2
- package/dist/{pt-PT-DGZR3hUG.js → pt-PT-KPmxJycM.js} +53 -21
- package/dist/{ro-RO-ul5LrXp6.js → ro-RO-DPXG-We0.js} +53 -21
- package/dist/{sk-SK-BbIEcfvq.js → sk-SK-ldAkSZl-.js} +51 -19
- package/dist/{sl-SI-BzvtpF7j.js → sl-SI-CH3W5STZ.js} +51 -19
- package/dist/style.css +205 -184
- package/dist/{sv-SE-Dxi-CWOf.js → sv-SE-DFrDPziR.js} +51 -19
- package/dist/types/api/address/useAddressCleanse.d.ts +31 -2
- package/dist/types/api/address/useRetrieveAddress.d.ts +21 -0
- package/dist/types/api/address/useSearchAddress.d.ts +20 -0
- package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +1 -0
- package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +9 -0
- package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +4 -0
- package/dist/types/api/legalEntity/useLegalEntity.d.ts +411 -3
- package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +2 -1
- package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +4 -0
- package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +12 -8
- package/dist/types/api/taskStatus/useTaskStatus.d.ts +3 -0
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/iframeWidget.d.ts +0 -4
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +0 -3
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +0 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +6 -5
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -1
- package/dist/types/components/EFP/tasks/HighExposureDropin/HighExposureRegisteredAddress.d.ts +1 -1
- package/dist/types/components/EFP/tasks/HighExposureDropin/types.d.ts +1 -19
- package/dist/types/components/EFP/tasks/HighExposureDropin/utils.d.ts +2 -2
- package/dist/types/components/EFP/tasks/TaxReportingDropin/validate.d.ts +3 -0
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +2 -19
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/useNavigation.d.ts +1 -3
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent.d.ts +1 -2
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/IdVerification/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/types.d.ts +3 -7
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.types.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +3 -7
- package/dist/types/components/Individual/hooks/useIdVerificationToken.d.ts +2 -2
- package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +1 -1
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +1 -1
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
- package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/AddressField.d.ts +9 -0
- package/dist/types/components/Shared/forms/Address/SearchAddress.d.ts +15 -0
- package/dist/types/components/Shared/forms/Address/SearchAddressItem.d.ts +3 -0
- package/dist/types/components/Shared/forms/Address/types.d.ts +2 -21
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/validate.d.ts +8 -6
- package/dist/types/components/Shared/forms/BusinessTypeSelection/BusinessTypeSelection.d.ts +0 -4
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +0 -3
- package/dist/types/components/Shared/tasks/TaskList/PayoutAccountTaskListItem.d.ts +3 -1
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +5 -0
- package/dist/types/components/SoleProprietorship/hooks/useExemptSettlor.d.ts +1 -3
- package/dist/types/components/Trust/forms/Trust/types.d.ts +0 -2
- package/dist/types/components/Trust/forms/TrustRoleAndEntityType/TrustRoleAndEntityType.d.ts +1 -3
- package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +0 -2
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/RoleAndTypeDropin.d.ts +1 -1
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +4 -5
- package/dist/types/components/Trust/tasks/TrustDropin/TrustDropin.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +4 -2
- package/dist/types/components/Trust/utils/addOrUpdateAssociatedTrustMember.d.ts +3 -3
- package/dist/types/components/Trust/utils/addOrUpdateUndefinedBeneficiary.d.ts +2 -2
- package/dist/types/components/Trust/utils/createExemptSettlor.d.ts +3 -3
- package/dist/types/components/Trust/utils/deleteAssociatedTrustMember.d.ts +3 -3
- package/dist/types/components/Trust/utils/deleteUndefinedBeneficiary.d.ts +3 -3
- package/dist/types/components/Trust/utils/updateExemptSettlorName.d.ts +3 -3
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +18 -5
- package/dist/types/components/UnincorporatedPartnership/mapping/unincorporatedPartnershipKeyMappings.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +7 -3
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +6 -0
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/validate.d.ts +3 -0
- package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedPartnershipMembers.d.ts +2 -2
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
- package/dist/types/components/ui/atoms/Select/Select.types.d.ts +31 -16
- package/dist/types/components/ui/atoms/Select/useSelectFocus.d.ts +2 -3
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -1
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +11 -28
- package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -1
- package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +3 -2
- package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +4 -4
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -1
- package/dist/types/components/ui/molecules/InputText/InputText.d.ts +2 -1
- package/dist/types/context/ConfigurationApiContext/ConfigurationApiContext.d.ts +0 -3
- package/dist/types/context/ExperimentContext/types.d.ts +4 -0
- package/dist/types/context/FormRouterContext/types.d.ts +2 -2
- package/dist/types/context/SettingsContext/types.d.ts +2 -0
- package/dist/types/core/analytics.d.ts +16 -1
- package/dist/types/core/models/api/contracts.d.ts +0 -19
- package/dist/types/core/models/api/organization.d.ts +1 -2
- package/dist/types/core/models/state-code.d.ts +2 -1
- package/dist/types/hooks/introduction/useCanSeeIntroduction.d.ts +2 -1
- package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +3 -5
- package/dist/types/hooks/useAnalytics.d.ts +1 -1
- package/dist/types/hooks/useAssociatedLegalEntity.d.ts +14 -0
- package/dist/types/hooks/useAssociatedLegalRepresentative.d.ts +1 -5
- package/dist/types/hooks/useAsyncValidator.d.ts +1 -1
- package/dist/types/hooks/useComponentApi.d.ts +0 -8
- package/dist/types/hooks/useForm/reducer.d.ts +2 -1
- package/dist/types/hooks/useForm/types.d.ts +2 -1
- package/dist/types/stores/globalStore/StoreProvider.d.ts +1 -9
- package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +1 -3
- package/dist/types/stores/globalStore/taskStatus.d.ts +6 -2
- package/dist/types/utils/debounce.d.ts +20 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/useDebouncedState.d.ts +3 -0
- package/dist/types/utils/useMirrorProp.d.ts +16 -0
- package/dist/types/utils/validation/types.d.ts +2 -1
- package/dist/{yaml-YXwE7Rls.js → yaml-BLLI4LYJ.js} +2 -2
- package/package.json +1 -1
- package/dist/types/components/Shared/forms/Address/FieldContainer.d.ts +0 -10
- package/dist/types/core/models/api/address-search.d.ts +0 -31
- package/dist/types/core/services/componentApi/create-legal-entity.d.ts +0 -3
- package/dist/types/core/services/componentApi/get-address.d.ts +0 -3
- package/dist/types/core/services/componentApi/get-idverification-token.d.ts +0 -3
- package/dist/types/core/services/componentApi/get-legal-entity.d.ts +0 -3
- package/dist/types/core/services/componentApi/idVerification-startcheck.d.ts +0 -3
- package/dist/types/core/services/componentApi/open-singpass-authorization-link.d.ts +0 -3
- package/dist/types/core/services/componentApi/search-address.d.ts +0 -3
- package/dist/types/hooks/useAssociatedLegalArrangement.d.ts +0 -13
- package/dist/types/utils/scroll.d.ts +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { AddressSearchRequest, AddressSearchResponse, LoqateAddress } from '../../../../core/models/api/address-search';
|
|
2
1
|
import type { CapabilityName } from '../../../../core/models/api/capability';
|
|
3
|
-
import type { ExistingLegalEntity, LegalEntity
|
|
2
|
+
import type { ExistingLegalEntity, LegalEntity } from '../../../../core/models/api/legal-entity';
|
|
4
3
|
import type { CountryCode } from '../../../../core/models/country-code';
|
|
5
4
|
import type { Currency } from '../../../../core/models/currency';
|
|
6
5
|
import type { FormList, FormModel } from '../../../../core/models/form';
|
|
@@ -9,7 +8,6 @@ import type { Translatable, TranslationKey } from '../../../../../types';
|
|
|
9
8
|
import type { AddressSchema } from '../../../Shared/forms/Address/types';
|
|
10
9
|
import type { FormUtils } from '../../../../utils/formUtils';
|
|
11
10
|
import type { ValidationRuleResult, ValidatorMode } from '../../../../utils/validation/types';
|
|
12
|
-
import type { DropinAPIHandlers } from '../../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
13
11
|
export interface HighExposureCompanySchema {
|
|
14
12
|
numberOfEmployees?: number;
|
|
15
13
|
legalForm?: string;
|
|
@@ -76,15 +74,9 @@ export interface HighExposureDropinProps extends BaseOuterFormProps<HighExposure
|
|
|
76
74
|
activeForm?: FormModel;
|
|
77
75
|
forms?: FormModel[];
|
|
78
76
|
country: CountryCode;
|
|
79
|
-
rootLegalEntityId: ExistingLegalEntity['id'];
|
|
80
77
|
rootLegalEntity: ExistingLegalEntity;
|
|
81
78
|
externalOnSubmit?: (data: HighExposureSchema) => void;
|
|
82
79
|
externalOnSubmitLabel?: string;
|
|
83
|
-
createLegalEntity: (data: LegalEntity) => Promise<ExistingLegalEntity>;
|
|
84
|
-
updateLegalEntity: (data: PatchLegalEntity, legalEntityId: string) => Promise<ExistingLegalEntity>;
|
|
85
|
-
searchAddress: ((data: AddressSearchRequest, legalEntityId: string) => Promise<AddressSearchResponse>) | undefined;
|
|
86
|
-
getAddress: ((addressId: string) => Promise<LoqateAddress>) | undefined;
|
|
87
|
-
getLegalEntity: (legalEntityId: string) => Promise<ExistingLegalEntity>;
|
|
88
80
|
isStandaloneComponent?: boolean;
|
|
89
81
|
handleHomeClick?(): void;
|
|
90
82
|
}
|
|
@@ -94,22 +86,15 @@ export interface HighExposureProps {
|
|
|
94
86
|
}
|
|
95
87
|
export interface HighExposureCompanyDetailsProps extends BaseInnerFormProps<HighExposureCompanySchema> {
|
|
96
88
|
country: CountryCode;
|
|
97
|
-
legalEntityId: string;
|
|
98
89
|
legalEntity?: ExistingLegalEntity;
|
|
99
90
|
}
|
|
100
91
|
export interface HighExposureParentCompanyDetailsProps extends BaseInnerFormProps<HighExposureParentCompanySchema> {
|
|
101
92
|
country: CountryCode;
|
|
102
|
-
legalEntityId: string;
|
|
103
93
|
legalEntity?: ExistingLegalEntity;
|
|
104
|
-
handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
|
|
105
|
-
handleFindAddress: DropinAPIHandlers['handleFindAddress'];
|
|
106
94
|
}
|
|
107
95
|
export interface HighExposureUltimateParentCompanyDetailsProps extends BaseInnerFormProps<HighExposureUltimateParentCompanySchema> {
|
|
108
96
|
country: CountryCode;
|
|
109
|
-
legalEntityId: string;
|
|
110
97
|
legalEntity?: ExistingLegalEntity;
|
|
111
|
-
handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
|
|
112
|
-
handleFindAddress: DropinAPIHandlers['handleFindAddress'];
|
|
113
98
|
}
|
|
114
99
|
export type HighExposureSchemaCombined = HighExposureCompanySchema & HighExposureParentCompanySchema & HighExposureUltimateParentCompanySchema;
|
|
115
100
|
export declare enum HighExposurePagesEnums {
|
|
@@ -194,9 +179,6 @@ export type HighExposureRegisteredAddressProps = {
|
|
|
194
179
|
legalEntity?: LegalEntity;
|
|
195
180
|
targetPage: HighExposurePagesEnums;
|
|
196
181
|
sectionHeading?: Translatable;
|
|
197
|
-
legalEntityId: string;
|
|
198
|
-
handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
|
|
199
|
-
handleFindAddress: DropinAPIHandlers['handleFindAddress'];
|
|
200
182
|
formId?: string;
|
|
201
183
|
setValid?: (key: keyof HighExposureParentSchemasCombined, value: boolean) => void;
|
|
202
184
|
shouldValidate?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExistingLegalEntity, LegalEntity } from '../../../../core/models/api/legal-entity';
|
|
1
|
+
import type { ExistingLegalEntity, LegalEntity, NewPatchLegalEntity } from '../../../../core/models/api/legal-entity';
|
|
2
2
|
import type { Organization } from '../../../../core/models/api/organization';
|
|
3
3
|
import type { CountryCode, CountryCodes } from '../../../../core/models/country-code';
|
|
4
4
|
import type { HighExposureCompanySchema, HighExposureParentSchemasCombined, HighExposureSchema } from './types';
|
|
@@ -9,7 +9,7 @@ export declare const entityHasParentCompany: (data: HighExposureSchema) => boole
|
|
|
9
9
|
export declare const entityHasUltimateParentCompany: (data: HighExposureSchema) => boolean;
|
|
10
10
|
export declare const prepareExposureSubmitData: (exposureIndex: HighExposureIndex, data: HighExposureSchema, rootLegalEntity: ExistingLegalEntity | undefined) => LegalEntity;
|
|
11
11
|
export declare const appendHighExposureData: (legalOrganization?: Organization, highExposureData?: HighExposureCompanySchema | HighExposureParentSchemasCombined) => HighExposureCompanySchema | HighExposureParentSchemasCombined | undefined;
|
|
12
|
-
export declare const handleHighExposureFormSubmission: (highExposureType: HighExposureIndex, details: LegalEntity | null, createFunction: (details: LegalEntity) => Promise<ExistingLegalEntity>, updateFunction: (details:
|
|
12
|
+
export declare const handleHighExposureFormSubmission: (highExposureType: HighExposureIndex, details: LegalEntity | NewPatchLegalEntity | null, createFunction: (details: LegalEntity) => Promise<ExistingLegalEntity>, updateFunction: (details: NewPatchLegalEntity) => Promise<ExistingLegalEntity>, entityId?: string) => Promise<ExistingLegalEntity | void>;
|
|
13
13
|
export declare const isEeaCountry: (country?: CountryCodes | string) => boolean;
|
|
14
14
|
export declare const getCompanySchemaKeys: (country: CountryCode, currentData: Partial<HighExposureCompanySchema>, schemaKeys: (keyof HighExposureCompanySchema)[]) => Array<keyof HighExposureCompanySchema>;
|
|
15
15
|
export declare const getParentCompanySchemaKeys: (currentData: Partial<HighExposureParentSchemasCombined>, schemaKeys: (keyof HighExposureParentSchemasCombined)[]) => Array<keyof HighExposureParentSchemasCombined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { DropinComposerProps } from './types';
|
|
2
|
-
export declare function DropinComposer({ legalEntityResponse, onSubmit, onChange, onLoad, onNavigate,
|
|
2
|
+
export declare function DropinComposer({ legalEntityResponse, onSubmit, onChange, onLoad, onNavigate, openBankingPartnerConfigId, ...args }: DropinComposerProps): import("preact/jsx-runtime").JSX.Element;
|
package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { State, TopLevelDataSchema } from '../../../../context/StateContext/types';
|
|
2
|
-
import type { AddressSearchRequest, AddressSearchResponse, LoqateAddress } from '../../../../core/models/api/address-search';
|
|
3
2
|
import type { CapabilityName } from '../../../../core/models/api/capability';
|
|
4
|
-
import type {
|
|
5
|
-
import type { ExistingLegalEntity, LegalEntity, PatchLegalEntity } from '../../../../core/models/api/legal-entity';
|
|
3
|
+
import type { ExistingLegalEntity, PatchLegalEntity } from '../../../../core/models/api/legal-entity';
|
|
6
4
|
import type { TranslationKey } from '../../../../../types';
|
|
7
5
|
import type { TaskTypes } from '../../../../stores/globalStore/taskTypes';
|
|
8
6
|
export interface SingpassLinkResponseItem {
|
|
@@ -12,34 +10,19 @@ export interface SingpassLinkResponseItem {
|
|
|
12
10
|
export interface SingpassLinkResponse {
|
|
13
11
|
item: SingpassLinkResponseItem;
|
|
14
12
|
}
|
|
15
|
-
export interface DropinComposerProps extends Required<Pick<DropinAPIHandlers, '
|
|
13
|
+
export interface DropinComposerProps extends Required<Pick<DropinAPIHandlers, 'handleUpdateLegalEntity'>> {
|
|
16
14
|
capabilities?: CapabilityName[];
|
|
17
15
|
legalEntityResponse: ExistingLegalEntity;
|
|
18
16
|
onChange?: (state: State<TopLevelDataSchema>) => void;
|
|
19
17
|
onSubmit?: (data: unknown) => void;
|
|
20
18
|
onLoad?: () => void;
|
|
21
19
|
onNavigate?: (task: TaskTypes) => void;
|
|
22
|
-
isInstantVerificationEnabled?: boolean;
|
|
23
20
|
openBankingPartnerConfigId?: string;
|
|
24
21
|
}
|
|
25
22
|
/** @deprecated */
|
|
26
23
|
export interface DropinAPIHandlers {
|
|
27
|
-
/** @deprecated */
|
|
28
|
-
handleGetLegalEntity?(legalEntityId: string): Promise<ExistingLegalEntity>;
|
|
29
|
-
/** @deprecated */
|
|
30
|
-
handleCreateLegalEntity?(data: LegalEntity): Promise<ExistingLegalEntity>;
|
|
31
24
|
/** @deprecated */
|
|
32
25
|
handleUpdateLegalEntity?(data: PatchLegalEntity, legalEntityId: string): Promise<ExistingLegalEntity>;
|
|
33
|
-
/** @deprecated */
|
|
34
|
-
handleAddressSearch?(data: AddressSearchRequest, legalEntityId: string): Promise<AddressSearchResponse>;
|
|
35
|
-
/** @deprecated */
|
|
36
|
-
handleFindAddress?(addressId: string): Promise<LoqateAddress>;
|
|
37
|
-
/** @deprecated */
|
|
38
|
-
handleGetIdVerificationToken?(legalEntityId: string, data: InstantIdVerificationTokenRequest): Promise<InstantIdVerificationTokenResponse>;
|
|
39
|
-
/** @deprecated */
|
|
40
|
-
handleGetIdVerificationStartCheck?(legalEntityId: string, data: InstantIdVerificationStartCheckRequest): Promise<InstantIdVerificationStartCheckResponse>;
|
|
41
|
-
/** @deprecated */
|
|
42
|
-
handleOpenSingpassAuthorizationLink?(): Promise<SingpassLinkResponse>;
|
|
43
26
|
}
|
|
44
27
|
export interface DropinProps {
|
|
45
28
|
legalEntityResponse?: ExistingLegalEntity;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { ExistingLegalEntity } from '../../../../core/models/api/legal-entity';
|
|
2
2
|
import { TaskTypes } from '../../../Shared/tasks/TaskList/types';
|
|
3
|
-
import type { DropinAPIHandlers } from './types';
|
|
4
3
|
interface UseNavigationOptions {
|
|
5
4
|
legalEntity: ExistingLegalEntity;
|
|
6
5
|
onNavigate?: (task: TaskTypes) => void;
|
|
7
|
-
handleOpenSingpassAuthorizationLink: DropinAPIHandlers['handleOpenSingpassAuthorizationLink'] | undefined;
|
|
8
6
|
}
|
|
9
7
|
interface UseNavigation {
|
|
10
8
|
currentTask: TaskTypes | undefined;
|
|
@@ -12,5 +10,5 @@ interface UseNavigation {
|
|
|
12
10
|
navigateTo: (task: TaskTypes | 'default', deletePreviousHistory?: boolean) => void;
|
|
13
11
|
navigateBack: (stepCount?: number) => void;
|
|
14
12
|
}
|
|
15
|
-
export declare const useNavigation: ({ legalEntity, onNavigate
|
|
13
|
+
export declare const useNavigation: ({ legalEntity, onNavigate }: UseNavigationOptions) => UseNavigation;
|
|
16
14
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ComponentOptions } from '../..';
|
|
2
|
-
interface OnboardingDropinComponentProps {
|
|
2
|
+
export interface OnboardingDropinComponentProps {
|
|
3
3
|
legalEntityId: string;
|
|
4
4
|
openBankingPartnerConfigId?: string;
|
|
5
5
|
}
|
|
6
6
|
export type OnboardingDropinComponentOptions = ComponentOptions<'onboardingDropinComponent'>;
|
|
7
7
|
export declare function OnboardingDropinComponent({ legalEntityId, openBankingPartnerConfigId, }: OnboardingDropinComponentProps): import("preact/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { GetIdVerificationToken } from '../../../../../api/idVerificationProviders/useIdVerificationToken';
|
|
1
2
|
import type { DocumentType } from '../../../../../core/models/api/document';
|
|
2
3
|
import type { FileSchema } from '../../../../../core/models/file';
|
|
3
4
|
import type { BaseInnerFormProps } from '../../../../../hooks/useForm/types';
|
|
4
5
|
import type { TranslationKey } from '../../../../../../types';
|
|
5
|
-
import type { DropinAPIHandlers } from '../../../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
6
6
|
import type { MinimumApplicantDetails } from '../IdVerification/types';
|
|
7
7
|
import type { IdVerificationMethodType } from '../IdVerificationMethod/types';
|
|
8
8
|
export interface IdDocumentUploadSchema {
|
|
@@ -37,7 +37,7 @@ export interface IdDocumentUploadProps extends Partial<IdDocumentInstantVerifica
|
|
|
37
37
|
export interface IdDocumentInstantVerificationProps extends BaseInnerFormProps<IdDocumentUploadSchema> {
|
|
38
38
|
minimumApplicantDetails?: MinimumApplicantDetails;
|
|
39
39
|
legalEntityId?: string | undefined;
|
|
40
|
-
handleGetIdVerificationToken:
|
|
40
|
+
handleGetIdVerificationToken: GetIdVerificationToken;
|
|
41
41
|
handleOnBack?: () => void;
|
|
42
42
|
handleOnNext?(e?: () => void, callbacks?: () => void, isValid?: boolean): void;
|
|
43
43
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Onfido } from 'onfido-sdk-ui';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GetIdVerificationToken } from '../../../../../api/idVerificationProviders/useIdVerificationToken';
|
|
3
3
|
export interface IdVerificationProps {
|
|
4
4
|
minimumApplicantDetails: MinimumApplicantDetails;
|
|
5
5
|
legalEntityId?: string | undefined;
|
|
6
6
|
onIdVerificationComplete?: (data: any) => void;
|
|
7
7
|
onIdVerificationError?: (error: any) => void;
|
|
8
|
-
handleGetIdVerificationToken:
|
|
8
|
+
handleGetIdVerificationToken: GetIdVerificationToken;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Onfido needs us to provide a minimum set of details for an applicant
|
|
@@ -11,7 +11,7 @@ import type { AddressSchema } from '../../../Shared/forms/Address/types';
|
|
|
11
11
|
import type { ContactDetailsSchema } from '../../../Shared/forms/ContactDetails/types';
|
|
12
12
|
import type { DocumentUploadSchema } from '../../../Shared/forms/DocumentUpload/types';
|
|
13
13
|
import type { TaskTypes } from '../../../../stores/globalStore/taskTypes';
|
|
14
|
-
import type {
|
|
14
|
+
import type { DropinProps } from '../../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
15
15
|
import type { TrustMember } from '../../../Trust/tasks/TrustMembers/types';
|
|
16
16
|
import type { UnincorporatedPartnershipMember } from '../../../UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types';
|
|
17
17
|
import type { NomineeDecisionMakerRoleSchema } from '../../fields/DecisionMakerRole/types';
|
|
@@ -30,10 +30,7 @@ export interface IndividualSchema {
|
|
|
30
30
|
nominee?: NomineeDecisionMakerRoleSchema;
|
|
31
31
|
}
|
|
32
32
|
export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
|
|
33
|
-
|
|
34
|
-
handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
|
|
35
|
-
handleGetIdVerificationToken?(legalEntityId: string, data: InstantIdVerificationTokenRequest): Promise<InstantIdVerificationTokenResponse>;
|
|
36
|
-
handleOpenSingpassAuthorizationLink?: DropinAPIHandlers['handleOpenSingpassAuthorizationLink'];
|
|
33
|
+
handleGetIdVerificationToken?(data: InstantIdVerificationTokenRequest): Promise<InstantIdVerificationTokenResponse>;
|
|
37
34
|
activeForm?: FormModel;
|
|
38
35
|
forms?: FormModel[];
|
|
39
36
|
problems?: EntityProblems;
|
|
@@ -47,10 +44,9 @@ export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
|
|
|
47
44
|
accountHolder: AccountHolderOption | undefined;
|
|
48
45
|
trustedRoles?: Array<LegalEntityAssociation['type']>;
|
|
49
46
|
}
|
|
50
|
-
export interface IndividualDropinProps extends Omit<IndividualProps, 'legalEntityId' | 'accountHolder'>,
|
|
47
|
+
export interface IndividualDropinProps extends Omit<IndividualProps, 'legalEntityId' | 'accountHolder'>, DropinProps {
|
|
51
48
|
trustMember?: TrustMember | UnincorporatedPartnershipMember;
|
|
52
49
|
isTargetLegalEntityType?: boolean;
|
|
53
50
|
country: CountryCode;
|
|
54
51
|
onSubmit?(dataSubmitted: IndividualSchema): void;
|
|
55
52
|
}
|
|
56
|
-
export type IndividualDropinApiHandlers = Pick<Required<DropinAPIHandlers>, 'handleUpdateLegalEntity'> & Pick<DropinAPIHandlers, 'handleGetIdVerificationToken' | 'handleAddressSearch' | 'handleFindAddress' | 'handleGetIdVerificationStartCheck' | 'handleOpenSingpassAuthorizationLink'>;
|
|
@@ -6,7 +6,6 @@ import type { TaxInformationFieldSchema } from '../../../../Shared/fields/TaxInf
|
|
|
6
6
|
import type { AddressSchema } from '../../../../Shared/forms/Address/types';
|
|
7
7
|
import type { TaskTypes } from '../../../../Shared/tasks/TaskList/types';
|
|
8
8
|
import type { ValidationRuleResults } from '../../../../../utils/validation/types';
|
|
9
|
-
import type { DropinAPIHandlers } from '../../../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
10
9
|
import type { IdentityNumberSchema } from '../../../fields/IdentityNumber/type';
|
|
11
10
|
import type { AdditionalIdentityInfoSchema } from './Identity/Identity.types';
|
|
12
11
|
export interface AdditionalPersonalDetailsSchema extends AddressSchema, IdentityNumberSchema, TaxInformationFieldSchema, AdditionalIdentityInfoSchema {
|
|
@@ -17,8 +16,6 @@ export interface AdditionalPersonalDetailsProps extends BaseInnerFormProps<Addit
|
|
|
17
16
|
country: CountryCode;
|
|
18
17
|
taskType?: TaskTypes;
|
|
19
18
|
onResidencyCountryChange?(country: string): void;
|
|
20
|
-
handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
|
|
21
|
-
handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
|
|
22
19
|
}
|
|
23
20
|
export interface IdentityProps {
|
|
24
21
|
country: CountryCode;
|
|
@@ -11,4 +11,3 @@ export declare const additionalIdentityInfoFields: ReadonlyArray<keyof Additiona
|
|
|
11
11
|
export interface IdentitySchema extends AdditionalIdentityInfoSchema, Pick<IdentityNumberSchema, 'idNumber'> {
|
|
12
12
|
}
|
|
13
13
|
export type IdentityFormProps = BaseInnerFormProps<IdentitySchema>;
|
|
14
|
-
export declare const identityFields: ReadonlyArray<keyof IdentitySchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProviderExtractionResponse } from '../../../../../api/idVerificationProviders/useExtractDocumentInformation';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GetIdVerificationToken } from '../../../../../api/idVerificationProviders/useIdVerificationToken';
|
|
3
3
|
import type { IdDocumentUploadSchema } from '../../Individual/IdDocumentUpload/types';
|
|
4
4
|
type IdVerificationMethodType = 'instantVerification' | 'manualVerification' | 'existingDocument';
|
|
5
5
|
export interface IdVerificationMethodSchema {
|
|
@@ -10,7 +10,7 @@ export interface IdVerificationMethodSchema {
|
|
|
10
10
|
export interface IdVerificationMethodProps {
|
|
11
11
|
legalEntityId?: string;
|
|
12
12
|
handlers: {
|
|
13
|
-
handleGetIdVerificationToken
|
|
13
|
+
handleGetIdVerificationToken?: GetIdVerificationToken;
|
|
14
14
|
handleContinueToAdditionalDetails: () => void;
|
|
15
15
|
handleDeleteDocument: () => void;
|
|
16
16
|
handleUpdateDocument: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GetIdVerificationToken } from '../../../../api/idVerificationProviders/useIdVerificationToken';
|
|
1
2
|
import type { DecisionMakerType } from '../../../../core/models/api/decision-maker-type';
|
|
2
|
-
import type { InstantIdVerificationTokenRequest, InstantIdVerificationTokenResponse } from '../../../../core/models/api/instant-id-verification';
|
|
3
3
|
import type { ExistingLegalEntity } from '../../../../core/models/api/legal-entity';
|
|
4
4
|
import type { LegalEntityAssociation } from '../../../../core/models/api/legal-entity-association';
|
|
5
5
|
import type { CountryCode } from '../../../../core/models/country-code';
|
|
@@ -27,10 +27,7 @@ export interface IndividualOnfidoSchema {
|
|
|
27
27
|
nominee?: NomineeDecisionMakerRoleSchema;
|
|
28
28
|
}
|
|
29
29
|
export interface IndividualOnfidoProps extends BaseOuterFormProps<IndividualOnfidoSchema> {
|
|
30
|
-
|
|
31
|
-
handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
|
|
32
|
-
handleGetIdVerificationToken?(legalEntityId: string, data: InstantIdVerificationTokenRequest): Promise<InstantIdVerificationTokenResponse>;
|
|
33
|
-
handleOpenSingpassAuthorizationLink?: DropinAPIHandlers['handleOpenSingpassAuthorizationLink'];
|
|
30
|
+
handleGetIdVerificationToken?: GetIdVerificationToken;
|
|
34
31
|
activeForm: FormModel;
|
|
35
32
|
forms: FormModel[];
|
|
36
33
|
defaultCountry: CountryCode;
|
|
@@ -50,7 +47,6 @@ export interface IndividualOnfidoDropinProps extends Omit<IndividualOnfidoProps,
|
|
|
50
47
|
isTargetLegalEntityType?: boolean;
|
|
51
48
|
country: CountryCode;
|
|
52
49
|
onSubmit?(dataSubmitted: IndividualOnfidoSchema): void;
|
|
53
|
-
isInstantVerificationEnabled?: boolean;
|
|
54
50
|
}
|
|
55
|
-
type IndividualOnfidoDropinApiHandlers = Pick<Required<DropinAPIHandlers>, 'handleUpdateLegalEntity'
|
|
51
|
+
type IndividualOnfidoDropinApiHandlers = Pick<Required<DropinAPIHandlers>, 'handleUpdateLegalEntity'>;
|
|
56
52
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { GetIdVerificationToken } from '../../../api/idVerificationProviders/useIdVerificationToken';
|
|
1
2
|
import type { LoadingStatus } from '../../ui/atoms/LoaderWrapper/constants';
|
|
2
|
-
import type { DropinAPIHandlers } from '../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
3
3
|
import type { MinimumApplicantDetails } from '../forms/Individual/IdVerification/types';
|
|
4
4
|
export declare const useIdVerificationToken: ({ minimumApplicantDetails, legalEntityId, handleGetIdVerificationToken, onIdVerificationError, }: {
|
|
5
5
|
minimumApplicantDetails: MinimumApplicantDetails;
|
|
6
6
|
legalEntityId?: string | undefined;
|
|
7
|
-
handleGetIdVerificationToken:
|
|
7
|
+
handleGetIdVerificationToken: GetIdVerificationToken;
|
|
8
8
|
onIdVerificationError: ((error: any) => void) | undefined;
|
|
9
9
|
}) => {
|
|
10
10
|
providerId: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IndividualDropinProps } from '../../forms/Individual/types';
|
|
2
|
-
export declare function IndividualDropin({
|
|
2
|
+
export declare function IndividualDropin({ taskType, parentLegalEntity, legalEntityResponse, taskName, handleCloseClick, isTargetLegalEntityType, country: parentCountry, capabilities, problems: propProblems, trustMember, onSubmit: externalOnSubmit, asModal, hideSidebar, handleBackClick: externalBackClick, trustedFields, trustedFieldsProvider, trustedRoles, }: IndividualDropinProps): import("preact/jsx-runtime").JSX.Element;
|
package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IndividualOnfidoDropinProps } from '../../forms/IndividualOnfido/IndividualOnfido.types';
|
|
2
|
-
export declare function IndividualOnfidoDropin({
|
|
2
|
+
export declare function IndividualOnfidoDropin({ handleUpdateLegalEntity, taskType, parentLegalEntity, legalEntityResponse, taskName, handleCloseClick, isTargetLegalEntityType, country: parentCountry, capabilities, problems: propProblems, onSubmit: externalOnSubmit, asModal, hideSidebar, handleBackClick: externalBackClick, trustedFields, trustedFieldsProvider, trustedRoles, }: Readonly<IndividualOnfidoDropinProps>): import("preact/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './FormWrapper.scss';
|
|
2
2
|
import type { ComponentChildren } from 'preact';
|
|
3
|
+
import type { GetIdVerificationToken } from '../../../api/idVerificationProviders/useIdVerificationToken';
|
|
3
4
|
import type { LoadingStatus } from '../../ui/atoms/LoaderWrapper/constants';
|
|
4
5
|
import type { EntityProblems } from '../../../core/models/errors/entity-problems';
|
|
5
6
|
import type { FormModelWithValidity } from '../../../core/models/form';
|
|
6
7
|
import { type AdditionalEventProperties } from '../../../core/user-events';
|
|
7
8
|
import type { TranslationKey } from '../../../../types';
|
|
8
|
-
import type { DropinAPIHandlers } from '../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
9
9
|
import type { Omitted } from '../Summary/types';
|
|
10
10
|
interface FormWrapperProps {
|
|
11
11
|
summary?: {
|
|
@@ -13,7 +13,7 @@ interface FormWrapperProps {
|
|
|
13
13
|
omitted?: Omitted;
|
|
14
14
|
labels?: any;
|
|
15
15
|
};
|
|
16
|
-
handleGetIdVerificationToken?:
|
|
16
|
+
handleGetIdVerificationToken?: GetIdVerificationToken;
|
|
17
17
|
children: ComponentChildren;
|
|
18
18
|
taskName: TranslationKey;
|
|
19
19
|
handleNextClick(): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './Address.scss';
|
|
2
2
|
import type { AddressProps } from './types';
|
|
3
|
-
export declare function Address({ data: dataProp, labels, placeholders, helperText, readOnly, hideCountry, fieldValidationErrors: propFieldValidationErrors, allFields, requiredFields, optionalFields, readOnlyFields, obscuredFields, trustedFields, shouldValidate,
|
|
3
|
+
export declare function Address({ data: dataProp, labels, placeholders, helperText, readOnly, hideCountry, fieldValidationErrors: propFieldValidationErrors, allFields, requiredFields, optionalFields, readOnlyFields, obscuredFields, trustedFields, shouldValidate, onChange, verifiedAddress, condensed, handleFieldChange, errors: errorProp, valid: validProp, addressType, }: Readonly<AddressProps>): import("preact/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './AddressField.scss';
|
|
2
|
+
import type { AddressFieldProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component
|
|
5
|
+
*
|
|
6
|
+
* NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component
|
|
7
|
+
* - then you should implement <CountryField> or <StateField> directly
|
|
8
|
+
*/
|
|
9
|
+
export declare function AddressField({ classNameModifiers, schema, data, valid, errors, fieldProblems, fieldName, trimOnBlur, hideField, maxlength, readOnly, optional, handleChangeFor, handleBlur, }: AddressFieldProps): import("preact/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type RetrieveAddressSuccessResponse } from '../../../../api/address/useRetrieveAddress';
|
|
2
|
+
import type { Translatable } from '../../../../../types';
|
|
3
|
+
import type { CountryCode } from '../../../../core/models/country-code';
|
|
4
|
+
import type { AddressFieldProps } from '../../forms/Address/types';
|
|
5
|
+
interface SearchAddressProps extends Pick<AddressFieldProps, 'classNameModifiers' | 'readOnly' | 'optional' | 'handleBlur'> {
|
|
6
|
+
addressText?: string;
|
|
7
|
+
country: CountryCode | undefined;
|
|
8
|
+
labelKey: Translatable;
|
|
9
|
+
errorMessage: boolean | Translatable;
|
|
10
|
+
isValid: boolean | undefined;
|
|
11
|
+
onAddressTextChange(addressText: string): void;
|
|
12
|
+
onAutofillAddress(foundAddress: RetrieveAddressSuccessResponse): void;
|
|
13
|
+
}
|
|
14
|
+
export declare const SearchAddress: ({ addressText, country, labelKey, errorMessage, isValid, classNameModifiers, readOnly, optional, handleBlur, onAddressTextChange, onAutofillAddress, }: SearchAddressProps) => import("preact/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -4,7 +4,6 @@ import type { BaseInnerFormProps } from '../../../../hooks/useForm/types';
|
|
|
4
4
|
import type { TranslationKey } from '../../../../../types';
|
|
5
5
|
import type { RecordWithDefault } from '../../../../utils/recordWithDefault';
|
|
6
6
|
import type { ValidationRuleResult, ValidatorMode } from '../../../../utils/validation/types';
|
|
7
|
-
import type { DropinAPIHandlers } from '../../../EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types';
|
|
8
7
|
export type AddressType = 'registrationAddress' | 'operationalAddress' | 'residentialAddress';
|
|
9
8
|
export interface AddressSchema {
|
|
10
9
|
address?: string;
|
|
@@ -14,22 +13,17 @@ export interface AddressSchema {
|
|
|
14
13
|
stateOrProvince?: string;
|
|
15
14
|
country?: CountryCode;
|
|
16
15
|
searchAddress?: string;
|
|
17
|
-
poBox?: boolean;
|
|
18
16
|
}
|
|
19
17
|
export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
|
|
20
18
|
countryCode?: CountryCode;
|
|
21
19
|
hideCountry?: boolean;
|
|
22
20
|
onCountryChange?(country: CountryCode): void;
|
|
23
|
-
addressType
|
|
24
|
-
handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
|
|
25
|
-
handleFindAddress: DropinAPIHandlers['handleFindAddress'];
|
|
26
|
-
legalEntityId?: string;
|
|
21
|
+
addressType: AddressType;
|
|
27
22
|
verifiedBusiness?: CompanyDatasetResponse | undefined;
|
|
28
23
|
verifiedAddress?: AddressSchema;
|
|
29
24
|
condensed?: boolean;
|
|
30
25
|
}
|
|
31
|
-
export interface
|
|
32
|
-
legalEntityId?: string;
|
|
26
|
+
export interface AddressFieldProps {
|
|
33
27
|
classNameModifiers?: string[];
|
|
34
28
|
schema?: Array<keyof AddressSchema>;
|
|
35
29
|
data: AddressSchema;
|
|
@@ -43,8 +37,6 @@ export interface FieldContainerProps {
|
|
|
43
37
|
hideField?: boolean;
|
|
44
38
|
trimOnBlur?: boolean;
|
|
45
39
|
handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
|
|
46
|
-
handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
|
|
47
|
-
handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
|
|
48
40
|
handleBlur?: (e: FocusEvent) => void;
|
|
49
41
|
}
|
|
50
42
|
export type AddressSchemas = RecordWithDefault<CountryCode, Array<keyof AddressSchema>>;
|
|
@@ -54,14 +46,3 @@ export type AddressLabels = {
|
|
|
54
46
|
export type AddressSchemaLabels = {
|
|
55
47
|
[field in keyof AddressSchema]?: TranslationKey;
|
|
56
48
|
};
|
|
57
|
-
export interface SearchAddressProps {
|
|
58
|
-
handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
|
|
59
|
-
handleFindAddress: DropinAPIHandlers['handleFindAddress'];
|
|
60
|
-
handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
|
|
61
|
-
data: AddressSchema;
|
|
62
|
-
legalEntityId?: string;
|
|
63
|
-
autocompleteAddressForm: (address: AddressSchema) => void;
|
|
64
|
-
addressType?: AddressType;
|
|
65
|
-
kompanyAddress?: string;
|
|
66
|
-
kompanyPrefilled?: boolean;
|
|
67
|
-
}
|