@adyen/kyc-components 3.71.3 → 3.73.0-beta.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/{AcceptTermsOfServiceComponent-Dsv4mY-k.js → AcceptTermsOfServiceComponent-Ib77t0y9.js} +11 -198
- package/dist/{AccountSetupRejected-Cz2iWdPE.js → AccountSetupRejected-Dcrt_Wjb.js} +3 -3
- package/dist/{BusinessDetailsDropin-CxJ7Ga0q.js → BusinessDetailsDropin-D10LCgSY.js} +199 -98
- package/dist/BusinessFinancingPage-CVRFAPxm.js +35 -0
- package/dist/{BusinessTypeSelection-wbCak0Us.js → BusinessTypeSelectionPage-DK4PY3_p.js} +47 -40
- package/dist/{CXEL7IU7-B9HOZi-H.js → CXEL7IU7-DyO75Uac.js} +3 -3
- package/dist/{CreateIndividualComponent-C3uFsTUT.js → CreateIndividualComponent-BiMYdvQq.js} +265 -1227
- package/dist/CreateTransferInstrumentComponent-CaBD_3yr.js +1082 -0
- package/dist/{CustomerSupport-BuxhbwRm.js → CustomerSupport-BqyayBTP.js} +4 -3
- package/dist/{DebugModal-B_DAGmya.js → DebugModal-CO_clhiW.js} +12 -11
- package/dist/DecisionMakerDetailsPage-C0wmo475.js +80 -0
- package/dist/{DecisionMakers-L6oYW0-J.js → DecisionMakers-B2rmqsfW.js} +6 -5
- package/dist/{EventEmitter-DTdpTyY7.js → EventEmitter-BmWcyurq.js} +1015 -1407
- package/dist/FormNavigation-W4SYacAX.js +205 -0
- package/dist/{HASRA6WW-CBmvzSwj.js → HASRA6WW-Cj_9-H1H.js} +2 -2
- package/dist/{I3HPI4QX-9ko0FQd6.js → I3HPI4QX-CCkDLYPH.js} +3 -3
- package/dist/{Introduction-C16zT64A.js → Introduction-DlsETOX7.js} +14 -6
- package/dist/LegalRepresentativeDetailsPage-Dbp83K05.js +55 -0
- package/dist/ManageIndividualComponent-D-47IZH6.js +190 -0
- package/dist/Modal-6j0jkYFX.js +135 -0
- package/dist/PayoutDetailsPage-CWAOATOb.js +57 -0
- package/dist/{Review-BbsJ9Iv_.js → Review-B0v_A189.js} +4 -3
- package/dist/RootBusinessDetailsPage-D_3xc6YN.js +43 -0
- package/dist/RootIndividualDetailsPage-CT-rsvpD.js +71 -0
- package/dist/{EmbedShell-DpZpuM-4.js → ShadowStylesRoot-DMxqA0py.js} +28 -10
- package/dist/{SingpassSelection-Biuh42TV.js → SingpassSelection-DB5BHBy1.js} +2 -2
- package/dist/SoleProprietorshipPage-CFZ3F57F.js +45 -0
- package/dist/{SourceOfFunds.module-CwVf62zO.js → SourceOfFunds.module-sL22I1gI.js} +2 -2
- package/dist/{SourceOfFundsDropin-Bz8cTP4R.js → SourceOfFundsPage-Tde0WbSG.js} +44 -20
- package/dist/Tag-DdkVScyr.js +41 -0
- package/dist/{TaskItemStatus-DzTphBn7.js → TaskItemStatus-DqNACVFe.js} +4 -32
- package/dist/{TaxReportingDropin-xDar-7mC.js → TaxReportingDropin-CPQZXr1j.js} +6 -5
- package/dist/{TrustOuter-2GEllVo3.js → TrustDetailsPage-BGkbFLaG.js} +20 -29
- package/dist/TrustMemberCompanyPage-CQi1xGDz.js +55 -0
- package/dist/TrustMemberIndividualPage-BI_XyXhS.js +60 -0
- package/dist/UnincorporatedPartnershipIndividualPage-B6gLv55I.js +60 -0
- package/dist/UnincorporatedPartnershipMemberCompanyPage-jHwnxg3n.js +58 -0
- package/dist/adyen-individual.js +41 -0
- package/dist/adyen-kyc-components.js +3 -6
- package/dist/adyen-manage-individual.js +41 -0
- package/dist/adyen-terms-of-service.js +47 -0
- package/dist/adyen-terms-of-service.vue_vue_type_script_lang-CLUMW5mI.js +34 -0
- package/dist/adyen-transfer-instrument.js +59 -0
- package/dist/adyen-transfer-instrument.vue_vue_type_script_lang-uEpG3KG3.js +45 -0
- package/dist/{bg-BG-CzEF3tzV.js → bg-BG-CZRQZyXO.js} +12 -5
- package/dist/{cs-CZ-TMjslGp_.js → cs-CZ-BbUFgifZ.js} +12 -5
- package/dist/{css-CypmaTn8.js → css-CFY1scQ9.js} +2 -2
- package/dist/{da-DK-DWzvDWZJ.js → da-DK-CP71BFS7.js} +12 -5
- package/dist/{de-DE-BtIL-7gp.js → de-DE-DY56JGZt.js} +12 -5
- package/dist/{el-GR-DHSSlqbw.js → el-GR-CnENEp5c.js} +12 -5
- package/dist/{es-ES-OwkE9-Cu.js → es-ES-dV62vQcV.js} +28 -21
- package/dist/{et-EE-DvixWnLd.js → et-EE-BBgAN3Wc.js} +12 -5
- package/dist/{fi-FI-DZiXWe_g.js → fi-FI-DVmGWIxn.js} +12 -5
- package/dist/{fr-FR-BBwiWhiT.js → fr-FR-VwG8Rg7R.js} +12 -5
- package/dist/{hr-HR-DJYofWKU.js → hr-HR-Bs_lxjxQ.js} +12 -5
- package/dist/{hu-HU-k9c6wZld.js → hu-HU-8dVSiOZM.js} +12 -5
- package/dist/{core-BsRrVyKB.js → index-D6YGuPb5.js} +810 -1908
- package/dist/{it-IT-oOwbWW3K.js → it-IT-DvwWMDl1.js} +12 -5
- package/dist/{ja-JP-CT3g8Hhn.js → ja-JP-BB6zzyEg.js} +12 -5
- package/dist/{json-DDReVYSW.js → json-RoVXbcQq.js} +2 -2
- package/dist/localizeDateString-DtxuKMqB.js +27 -0
- package/dist/{lt-LT-CVHIsEF8.js → lt-LT-BQtNojlb.js} +12 -5
- package/dist/{lv-LV-BFx0cvZ2.js → lv-LV-BpEw5uN5.js} +12 -5
- package/dist/mapExistingFile-CwT8TZ5D.js +870 -0
- package/dist/{nl-NL-rmSZu4Rf.js → nl-NL-vBEBXTP-.js} +12 -5
- package/dist/{no-NO-BOnQvimN.js → no-NO-BFhTqUoD.js} +12 -5
- package/dist/{pl-PL-5j22An4E.js → pl-PL-dsGZvzVf.js} +12 -5
- package/dist/{plaintext-Cjcgjaqv.js → plaintext-DpBLPLCO.js} +2 -2
- package/dist/{terms-of-service-preact.js → preact/adyen-individual.js} +4 -4
- package/dist/{individual-react.js → preact/adyen-manage-individual.js} +4 -4
- package/dist/{terms-of-service-react.js → preact/adyen-terms-of-service.js} +5 -4
- package/dist/preact/adyen-transfer-instrument.js +16 -0
- package/dist/{pt-PT-DP8U1qyu.js → pt-PT-BB38pZbh.js} +12 -5
- package/dist/{ro-RO-BTdtoC6P.js → ro-RO-BgxNxoxJ.js} +12 -5
- package/dist/{sk-SK-DYTx4mOB.js → sk-SK-rtDeCztl.js} +12 -5
- package/dist/{sl-SI-D8CiUN69.js → sl-SI-qoGCwUdU.js} +12 -5
- package/dist/style.css +1942 -1990
- package/dist/styles-CLV89_hH.js +1942 -1990
- package/dist/{sv-SE-Daslxeqr.js → sv-SE-f1T7PBSW.js} +12 -5
- package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -5
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +1 -11
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +14 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +12 -1
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +14 -0
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +1 -0
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +2 -0
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +8 -0
- package/dist/types/components/Business/forms/rules.d.ts +0 -1
- package/dist/types/components/Business/mapping/businessDetails/businessDetailsKeyMappings.d.ts +1 -1
- package/dist/types/components/Business/mapping/businessDetails/solePropBusinessDetailsKeyMappings.d.ts +1 -1
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +8 -0
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -3
- package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +7 -0
- package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +7 -0
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +1 -0
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -1
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +20 -0
- package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +12 -0
- package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +16 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +0 -2
- package/dist/types/components/Shared/Introduction/Introduction.d.ts +4 -2
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/BusinessTypeSelection.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +3 -5
- package/dist/types/components/Shared/forms/DocumentUpload/DocumentUpload.d.ts +1 -1
- package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +5 -0
- package/dist/types/components/Shared/pages/BusinessTypeSelectionPage.d.ts +2 -0
- package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +7 -1
- package/dist/types/components/Shared/tasks/TaskList/types.d.ts +0 -6
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -0
- package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +8 -0
- package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +10 -0
- package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +11 -0
- package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +16 -0
- package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +9 -0
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +4 -7
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +0 -2
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +16 -0
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +11 -0
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +8 -0
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/UnincorporatedPartnershipMembersOverview.d.ts +1 -5
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -1
- package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -0
- package/dist/types/context/AnalyticsContext/AnalyticsProvider.d.ts +2 -2
- package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +1 -1
- package/dist/types/context/ExperimentContext/types.d.ts +6 -6
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +3 -4
- package/dist/types/core/environment/resolveEnvironment.d.ts +1 -0
- package/dist/types/core/models/api/document.d.ts +1 -1
- package/dist/types/embeds/ShadowStylesRoot.d.ts +3 -0
- package/dist/types/embeds/baseEmbedProps.d.ts +30 -0
- package/dist/types/embeds/individual/AdyenIndividualPreact.d.ts +3 -0
- package/dist/types/embeds/individual/adyen-individual.types.d.ts +30 -0
- package/dist/types/embeds/manage-individual/AdyenManageIndividualPreact.d.ts +3 -0
- package/dist/types/embeds/manage-individual/adyen-manage-individual.d.ts +1 -0
- package/dist/types/embeds/manage-individual/adyen-manage-individual.types.d.ts +29 -0
- package/dist/types/embeds/terms-of-service/AdyenTermsOfServicePreact.d.ts +3 -0
- package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +30 -0
- package/dist/types/embeds/transfer-instrument/AdyenTransferInstrumentPreact.d.ts +3 -0
- package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +36 -0
- package/dist/types/hooks/useDataConflicts.d.ts +1 -5
- package/dist/types/stores/globalStore/taskTypes.d.ts +0 -1
- package/dist/types/utils/country.d.ts +3 -2
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/getDisplayErrorMessage.d.ts +3 -0
- package/dist/useToastContext-DiQ_PGrE.js +33 -0
- package/dist/{utils-Fkk087z-.js → utils-Bl8l2XY4.js} +4 -4
- package/dist/vue/adyen-individual.js +43 -0
- package/dist/vue/adyen-manage-individual.js +46 -0
- package/dist/vue/adyen-terms-of-service.js +26 -0
- package/dist/vue/adyen-transfer-instrument.js +28 -0
- package/dist/{yaml-GnQQmt7i.js → yaml-DEzkYiMR.js} +2 -2
- package/package.json +28 -61
- package/dist/adyenConfig.js +0 -34
- package/dist/individual-preact.js +0 -15
- package/dist/individual-vue.js +0 -35
- package/dist/individual.js +0 -58
- package/dist/listToRecord-CO3M1Q74.js +0 -19
- package/dist/terms-of-service.js +0 -58
- package/dist/transfer-instrument-preact.js +0 -32
- package/dist/transfer-instrument-react.js +0 -32
- package/dist/transfer-instrument-vue.js +0 -41
- package/dist/transfer-instrument.js +0 -38
- package/dist/types/components/BankAccount/forms/PayoutDetails/utils.d.ts +0 -2
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PreferInstantVerificationMethod/PreferInstantVerificationMethod.d.ts +0 -22
- package/dist/types/components/Individual/forms/Individual/IndividualOuter.d.ts +0 -26
- package/dist/types/components/Trust/tasks/TrustDropin/TrustOuter.d.ts +0 -10
- package/dist/types/components/ui/atoms/List/List.d.ts +0 -9
- package/dist/types/embeds/adyenConfig.d.ts +0 -22
- package/dist/types/embeds/individual/individual.types.d.ts +0 -12
- package/dist/types/embeds/individual/preact/Individual.d.ts +0 -15
- package/dist/types/embeds/individual/react/Individual.d.ts +0 -20
- package/dist/types/embeds/individual/vue/individual.types.d.ts +0 -9
- package/dist/types/embeds/terms-of-service/preact/TermsOfService.d.ts +0 -10
- package/dist/types/embeds/terms-of-service/react/TermsOfService.d.ts +0 -20
- package/dist/types/embeds/terms-of-service/terms-of-service.types.d.ts +0 -8
- package/dist/types/embeds/transfer-instrument/preact/TransferInstrument.d.ts +0 -15
- package/dist/types/embeds/transfer-instrument/react/TransferInstrument.d.ts +0 -20
- package/dist/types/embeds/transfer-instrument/transfer-instrument.types.d.ts +0 -17
- package/dist/types/embeds/transfer-instrument/vue/transfer-instrument.types.d.ts +0 -9
- package/dist/types/embeds/types.d.ts +0 -19
- package/dist/types/embeds/utils.d.ts +0 -7
- package/dist/utils-Du6OO4ZK.js +0 -27
package/dist/{CreateIndividualComponent-C3uFsTUT.js → CreateIndividualComponent-BiMYdvQq.js}
RENAMED
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
{
|
|
3
3
|
try {
|
|
4
4
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9d7866a6-9ad1-4323-887a-751afc0762ec", e._sentryDebugIdIdentifier = "sentry-dbid-9d7866a6-9ad1-4323-887a-751afc0762ec");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import { useMemo,
|
|
11
|
+
import { u as useApiContext, V as useMutation, U as httpPost, y as useInvalidateRootLegalEntity, bv as useQueryClient, bw as EEA_Countries, aD as CountryCodes, d as drop, P as useLegalEntity, aq as ROOT_LE, Y as getCapabilityProblems, Q as getLegalEntityCountry, ah as TaskTypes, bx as FormContext, a as useQuery, al as useExperimentsContext, a9 as isPartOfTrustFromLegalEntity, L as LegalEntityType, aa as hasSolePropInLegalEntity, b7 as TrustedFieldsProvider, by as individualComponentsKeyMapping, bz as businessDetailsComponentsKeyMapping, o as objectsDeepEqual, bA as ValidationResult, a1 as createLogger, bB as isNotEmptyValidator, i as isEmpty, bC as hasText, bD as matchesRegex, bE as trimValWithOneSpace, bF as NO_ALPHABET_REGEX, bG as EMOJI_REGEX, bH as hasRepeatedCharacters, bI as isInvalidName, bJ as INDIVIDUAL_VALID_CHAR_REGEX, bK as getFormattingRegEx, bL as SPECIAL_CHARS, b as useI18nContext, T as Typography, O as Button, x as useAnalyticsContext, aj as LoaderWrapper, aX as Summary, $ as IconButton, bM as getNestedPropertyKeys, bN as isTruthyValidator, bO as emailPattern, aF as resolveFieldMetadata, bP as getSSNType, bQ as defaultFieldMetadata, bR as defaultFieldConfig, bS as defaultFieldMetadata$1, bT as fieldConfig, bU as defaultFieldMetadata$2, bV as defaultFieldConfig$1, bW as getAgeToday, bX as euCountries, bY as DecisionMakerType, bZ as createFormRules, b_ as allowedCountriesForNominee, t as getAddressSchemaForCountry, v as COUNTRIES_WITH_STATES_DATASET, b$ as getLocalizedIdDocumentTypeOptions, c0 as Scenarios, c1 as individualApiKeyMapping, r as reverseMapping, c2 as getNomineeFromAssociation, ae as useAccountHolder, G as useSettingsContext, c3 as useProviderStatus, J as getAssociatedLeAnalyticsPayload, c4 as addressValidators, c5 as getAsyncIdNumberValidationRule, c6 as getAsyncPhoneValidationRules, c7 as addressFormatters, c8 as setHasMotionCaptureScenario, c9 as individualForms, ca as showIndividualMotionCapture, cb as getAllowedDecisionMakerRoles, B as datasetUtilities, cc as Individual, cd as filterOutUnwantedAssociationsIfRootLE, c as cloneObject, ce as mapAddressLabels, cf as individualDocumentForms, cg as individualDocumentMapping, ch as individualObscuredFields, aC as getOwnEntityAssociations, ci as hasNomineesChanged, cj as attachNomineeToRole, ck as idVerificationProviderId, cl as doArraysMatch, cm as getAvailableDecisionMakerRoleTypes, F as Field, S as Select, cn as licenseCardNumberDefaultMetadata, co as licenseCardNumberDefaultConfig, aE as mergeFieldMetadataIntoProps, q as createFormUtils, cp as useFormContext, aI as getFieldProps, cq as idNumberFields, cr as IdentityNumber, cs as additionallIdNumberOptions, ct as MaskedInput, k as InputDate, cu as formatDateObj, cv as DriversLicense, cw as addressFields, bc as useAllowedCountries, cx as getDefaultTaxIdNumberType, aK as FormHeader, E as ErrorPanel, aQ as CountryField, A as Address, w as getAddressSchemaLabelsByCountry, f as Link, cy as IndividualIdNumberTypeSelector, cz as TaxInformationField, cA as PatriotActDisclosure, aJ as nameFields, cB as decisionMakerRoleFields, cC as nomineeFields, cD as contactDetailFields, X as Alert, b2 as ContextGuidance, cE as DecisionMakerRole, cF as NomineeDecisionMakerRole, aP as Name, I as InputText, cG as ContactDetails, cH as Svg, cI as keysOf, cJ as isEmpty$1, cK as RadioWithLabel, cL as listToRecord, cM as pick, cN as IdVerification, a2 as useDataset, a3 as datasetIdentifier, M as Loader, cO as IdDocumentManualUpload, cP as useId, N as Icon, cQ as KEYBOARD_KEYS, ak as noop, cR as idDocumentUploadFields, cS as useFormRouterContext, K as getFormProps, cT as useCapabilities, cU as setShowIndividualMotionCapture, cV as shouldShowMotionCapture, cW as hasMotionCaptureScenario, cX as MemoizedProofOfRelationship, cY as MemoizedDocumentUpload, cZ as MemoizedProofOfResidencyUpload, af as EntityType } from "./EventEmitter-BmWcyurq.js";
|
|
12
|
+
import { useCallback, useMemo, useReducer, useEffect, useState, useRef } from "preact/hooks";
|
|
13
|
+
import { F as FormRouterContextProvider, j as getIdDocument, k as getDocument, m as mapExistingFile, l as getPageName, n as getPage, o as createDocumentRequest, f as formatObject, q as documentApiUtils, r as useScenarios, u as useScenarioConfiguration, a as getPropsFromConfigurations, b as getRequiredForms, c as addValidityToForms, d as useFormComposer, t as trackNavigation, e as composePerScenarioFormConfigurations, s as omitObscuredFieldsIfUnchanged, i as isValidationError, p as processValidationErrors, h as isMaintenanceModeError, v as mergeAttachments, w as getFileExtention } from "./mapExistingFile-CwT8TZ5D.js";
|
|
14
|
+
import { M as MaybeModal, u as useToastContext, S as Spacer } from "./useToastContext-DiQ_PGrE.js";
|
|
13
15
|
import cx from "classnames";
|
|
14
|
-
import {
|
|
16
|
+
import { M as Modal } from "./Modal-6j0jkYFX.js";
|
|
17
|
+
import { l as localizeDateString } from "./localizeDateString-DtxuKMqB.js";
|
|
15
18
|
const createLegalEntity = async (legalEntityId, baseUrl, data) => {
|
|
16
19
|
return httpPost(
|
|
17
20
|
{
|
|
@@ -55,619 +58,9 @@ const useUpdateLegalEntity = (options2) => {
|
|
|
55
58
|
...options2
|
|
56
59
|
});
|
|
57
60
|
};
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const BANK_STATEMENT_UPLOAD_ERROR_CODE = "30_106";
|
|
62
|
-
const validateErrorCode = (error, errorCode) => !!error && typeof error === "object" && "errorCode" in error && error.errorCode === errorCode;
|
|
63
|
-
const isValidationError = (error) => validateErrorCode(error, API_VALIDATION_ERROR_CODE);
|
|
64
|
-
const isIdDocumentUploadError = (error) => validateErrorCode(error, ID_DOCUMENT_UPLOAD_ERROR_CODE);
|
|
65
|
-
const isBankStatementUploadError = (error) => validateErrorCode(error, BANK_STATEMENT_UPLOAD_ERROR_CODE);
|
|
66
|
-
const mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable = (error) => {
|
|
67
|
-
var _a;
|
|
68
|
-
if (!error) {
|
|
69
|
-
return "failedToUpdateDetails";
|
|
70
|
-
}
|
|
71
|
-
const message = (_a = error == null ? void 0 : error.sourceError) == null ? void 0 : _a.detail;
|
|
72
|
-
switch (message) {
|
|
73
|
-
case "Transfer instrument limit has already been met":
|
|
74
|
-
return "transferInstrumentLimitHasAlreadyBeenMet";
|
|
75
|
-
default:
|
|
76
|
-
return "failedToUpdateDetails";
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const linkedFieldsMap = {
|
|
80
|
-
"additionalInformation.vatNumber": [
|
|
81
|
-
"additionalInformation.vatAbsenceReason",
|
|
82
|
-
"additionalInformation.exemptedFromVat"
|
|
83
|
-
],
|
|
84
|
-
"additionalInformation.vatAbsenceReason": [
|
|
85
|
-
"additionalInformation.vatNumber",
|
|
86
|
-
"additionalInformation.exemptedFromVat"
|
|
87
|
-
]
|
|
88
|
-
};
|
|
89
|
-
const getLinkedFields = (field) => linkedFieldsMap[field] ?? [];
|
|
90
|
-
const addLinkedFields = (fields) => {
|
|
91
|
-
const withLinkedFields = [...fields];
|
|
92
|
-
for (const field of fields) {
|
|
93
|
-
withLinkedFields.push(...getLinkedFields(field));
|
|
94
|
-
}
|
|
95
|
-
return [...new Set(withLinkedFields)];
|
|
96
|
-
};
|
|
97
|
-
const logger$a = createLogger();
|
|
98
|
-
const composePerScenarioFormConfigurations = (scenarios = [], configurations) => scenarios.reduce(
|
|
99
|
-
(composedConfiguration, scenarioName) => ({
|
|
100
|
-
...composedConfiguration,
|
|
101
|
-
...configurations[scenarioName]
|
|
102
|
-
}),
|
|
103
|
-
{}
|
|
104
|
-
);
|
|
105
|
-
const augmentWithCountryConfigs = (countrySpecificConfig, baseFormConfig) => {
|
|
106
|
-
if (!countrySpecificConfig) return baseFormConfig;
|
|
107
|
-
return keysOf(countrySpecificConfig).reduce(
|
|
108
|
-
(mergedConfig, field) => ({
|
|
109
|
-
...mergedConfig,
|
|
110
|
-
[field]: {
|
|
111
|
-
...baseFormConfig[field],
|
|
112
|
-
...countrySpecificConfig[field]
|
|
113
|
-
}
|
|
114
|
-
}),
|
|
115
|
-
baseFormConfig
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
const evaluateRules = (fieldSettings, customRules) => {
|
|
119
|
-
const ruleNames = [fieldSettings.rule, ...fieldSettings.rules ?? []].filter(Boolean);
|
|
120
|
-
const rules2 = ruleNames.map((ruleName) => {
|
|
121
|
-
switch (ruleName) {
|
|
122
|
-
case "REQUIRED":
|
|
123
|
-
return () => "REQUIRED";
|
|
124
|
-
case "OPTIONAL":
|
|
125
|
-
return () => "OPTIONAL";
|
|
126
|
-
default: {
|
|
127
|
-
const ruleFn = customRules[ruleName];
|
|
128
|
-
if (!ruleFn) {
|
|
129
|
-
logger$a.error(`Rule with name '${ruleName}' is not defined`);
|
|
130
|
-
return () => void 0;
|
|
131
|
-
}
|
|
132
|
-
return ruleFn;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
return rules2.map((rule) => rule());
|
|
137
|
-
};
|
|
138
|
-
const isFieldRequired = (fieldSettings, customRules) => {
|
|
139
|
-
return evaluateRules(fieldSettings, customRules).every((result) => result === "REQUIRED");
|
|
140
|
-
};
|
|
141
|
-
const isFieldOptional = (fieldSettings, customRules) => {
|
|
142
|
-
return evaluateRules(fieldSettings, customRules).every((result) => result === "OPTIONAL");
|
|
143
|
-
};
|
|
144
|
-
function getPropsFromConfigurations(scenarioConfiguration, forms, remediationActions, dataMissingErrors, fieldsWithExistingData, customRules = {}, _customLabels = {}, _customValidators = {}, legalEntityType, legalEntityTrustedFields, remediationFieldAsOptional = false) {
|
|
145
|
-
const requiredFields = {};
|
|
146
|
-
const optionalFields = {};
|
|
147
|
-
const allFields = {};
|
|
148
|
-
const labels = {};
|
|
149
|
-
const obscuredFields = {};
|
|
150
|
-
const trustedFields = {};
|
|
151
|
-
if (!scenarioConfiguration) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
const readonly = ["legalFormDescription"];
|
|
155
|
-
const trustedFieldMappings = legalEntityTrustedFields == null ? void 0 : legalEntityTrustedFields.reduce(
|
|
156
|
-
(acc, trusted) => {
|
|
157
|
-
switch (trusted.provider) {
|
|
158
|
-
case TrustedFieldsProvider.KOMPANY: {
|
|
159
|
-
if (legalEntityType === "organization") {
|
|
160
|
-
return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
|
|
161
|
-
}
|
|
162
|
-
return acc;
|
|
163
|
-
}
|
|
164
|
-
case TrustedFieldsProvider.SINGPASS: {
|
|
165
|
-
if (legalEntityType === "organization") {
|
|
166
|
-
const orgFields = trusted.fields.filter(
|
|
167
|
-
(field) => (field == null ? void 0 : field.split(".")[0]) === "organization"
|
|
168
|
-
);
|
|
169
|
-
return [...acc, ...orgFields.map((tf) => businessDetailsApiKeyMapping[tf])];
|
|
170
|
-
}
|
|
171
|
-
if (legalEntityType === "individual") {
|
|
172
|
-
const individualFields = trusted.fields.filter(
|
|
173
|
-
(field) => (field == null ? void 0 : field.split(".")[0]) === "individual"
|
|
174
|
-
);
|
|
175
|
-
return [...acc, ...individualFields.map((tf) => individualApiKeyMapping[tf])];
|
|
176
|
-
}
|
|
177
|
-
return acc;
|
|
178
|
-
}
|
|
179
|
-
default:
|
|
180
|
-
return acc;
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
[]
|
|
184
|
-
);
|
|
185
|
-
Object.entries(forms).forEach(([formId, formDetails]) => {
|
|
186
|
-
var _a;
|
|
187
|
-
const formFieldsWithExistingData = addLinkedFields(fieldsWithExistingData).filter((field) => field.startsWith(formId)).map((field) => field.slice(field.lastIndexOf(".") + 1));
|
|
188
|
-
if (trustedFieldMappings) {
|
|
189
|
-
trustedFields[formId] = getFormTrustedFields(formId, trustedFieldMappings);
|
|
190
|
-
}
|
|
191
|
-
(_a = formDetails.fields) == null ? void 0 : _a.forEach((field) => {
|
|
192
|
-
const fieldSettings = scenarioConfiguration[field];
|
|
193
|
-
const isRequiredFromFieldConfig = fieldSettings && isFieldRequired(fieldSettings, customRules);
|
|
194
|
-
const isFieldRequiredByRemediationAction = showRemediationField(field, remediationActions);
|
|
195
|
-
const isFieldNeededToRemediateDataMissingError = isFieldRequiredToRemediateDataMissingError(
|
|
196
|
-
formId,
|
|
197
|
-
field,
|
|
198
|
-
dataMissingErrors
|
|
199
|
-
);
|
|
200
|
-
const isRequiredByRemediationAction = !remediationFieldAsOptional && isFieldRequiredByRemediationAction;
|
|
201
|
-
const isOptionalByRemediationAction = remediationFieldAsOptional && isFieldRequiredByRemediationAction;
|
|
202
|
-
const isOptionalFromFieldConfig = fieldSettings && isFieldOptional(fieldSettings, customRules);
|
|
203
|
-
const isRequiredFieldPopulated = !isOptionalFromFieldConfig && formFieldsWithExistingData.includes(field);
|
|
204
|
-
const isRequired = isRequiredFromFieldConfig || isRequiredByRemediationAction || isFieldNeededToRemediateDataMissingError || isRequiredFieldPopulated;
|
|
205
|
-
if (isRequired && !readonly.includes(field)) {
|
|
206
|
-
requiredFields[formId] = requiredFields[formId] ? [...requiredFields[formId], field] : [field];
|
|
207
|
-
allFields[formId] = allFields[formId] ? [...allFields[formId], field] : [field];
|
|
208
|
-
}
|
|
209
|
-
const isOptional = !isRequired && (isOptionalFromFieldConfig || isOptionalByRemediationAction);
|
|
210
|
-
if (isOptional) {
|
|
211
|
-
optionalFields[formId] = optionalFields[formId] ? [...optionalFields[formId], field] : [field];
|
|
212
|
-
allFields[formId] = allFields[formId] ? [...allFields[formId], field] : [field];
|
|
213
|
-
}
|
|
214
|
-
if (fieldSettings == null ? void 0 : fieldSettings.obscured) {
|
|
215
|
-
obscuredFields[formId] = obscuredFields[formId] ? [...obscuredFields[formId], field] : [field];
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
});
|
|
219
|
-
return {
|
|
220
|
-
requiredFields,
|
|
221
|
-
optionalFields,
|
|
222
|
-
allFields,
|
|
223
|
-
labels,
|
|
224
|
-
obscuredFields,
|
|
225
|
-
trustedFields
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
const showRemediationField = (field, remediationActions) => remediationActions.some(
|
|
229
|
-
(rem) => {
|
|
230
|
-
var _a;
|
|
231
|
-
return ((_a = rem.fields) == null ? void 0 : _a.includes(field)) && remediationHasFileUploadField(rem);
|
|
232
|
-
}
|
|
233
|
-
);
|
|
234
|
-
const makeTLDSFieldName = (formId, fieldName) => {
|
|
235
|
-
if (fieldName === "proofOfOrganizationTaxInfo") {
|
|
236
|
-
return `${formId}.taxDocument`;
|
|
237
|
-
}
|
|
238
|
-
return `${formId}.${fieldName}`;
|
|
239
|
-
};
|
|
240
|
-
const isFieldRequiredToRemediateDataMissingError = (formId, field, dataMissingErrors) => {
|
|
241
|
-
const dataMissingRemediations = dataMissingErrors.flatMap((error) => error.remediatingActions).filter((remediatingAction) => remediatingAction.code in dataMissingRemediationsToFieldsMap);
|
|
242
|
-
const missingFields = dataMissingRemediations.flatMap((remediatingAction) => dataMissingRemediationsToFieldsMap[remediatingAction.code]).map((missingField) => makeTLDSFieldName(formId, missingField));
|
|
243
|
-
const missingAndLinkedFields = addLinkedFields(missingFields);
|
|
244
|
-
return missingAndLinkedFields.includes(makeTLDSFieldName(formId, field));
|
|
245
|
-
};
|
|
246
|
-
const getFormTrustedFields = (formId, trustedFields) => trustedFields.filter((field) => field.split(".")[0] === formId).map(
|
|
247
|
-
(field) => field.split(".").filter((item) => formId !== item).join(".")
|
|
248
|
-
);
|
|
249
|
-
const logger$9 = createLogger();
|
|
250
|
-
function useAssociatedLegalEntity(parentLegalEntity, associationType) {
|
|
251
|
-
const matchingAssociation = useMemo(() => {
|
|
252
|
-
var _a;
|
|
253
|
-
if (!parentLegalEntity) return void 0;
|
|
254
|
-
const typesToFind = Array.isArray(associationType) ? associationType : [associationType];
|
|
255
|
-
const matchingAssociations = ((_a = parentLegalEntity.entityAssociations) == null ? void 0 : _a.filter((entity) => typesToFind.includes(entity.type))) ?? [];
|
|
256
|
-
if (matchingAssociations.length > 1) {
|
|
257
|
-
logger$9.warn(
|
|
258
|
-
`Multiple matching associations found for types: ${typesToFind.join(", ")} - returning the first.
|
|
259
|
-
${matchingAssociations.map((ass) => JSON.stringify(ass, null, 2)).join("\n")}`
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
return matchingAssociations[0];
|
|
263
|
-
}, [parentLegalEntity, associationType]);
|
|
264
|
-
const { data, refetch, isLoading } = useLegalEntity(
|
|
265
|
-
(matchingAssociation == null ? void 0 : matchingAssociation.legalEntityId) ?? skipToken
|
|
266
|
-
);
|
|
267
|
-
return { data, refetch, isLoading };
|
|
268
|
-
}
|
|
269
|
-
const trackNavigation = ({
|
|
270
|
-
userEvents,
|
|
271
|
-
actionType,
|
|
272
|
-
toForm,
|
|
273
|
-
label,
|
|
274
|
-
returnValue,
|
|
275
|
-
additionalTrackingParams
|
|
276
|
-
}) => {
|
|
277
|
-
userEvents.addPageEvent("Clicked button", {
|
|
278
|
-
actionType,
|
|
279
|
-
toPage: toForm,
|
|
280
|
-
label,
|
|
281
|
-
returnValue,
|
|
282
|
-
...additionalTrackingParams
|
|
283
|
-
});
|
|
284
|
-
};
|
|
285
|
-
const getOpeningStep = (forms, remediationActions) => {
|
|
286
|
-
var _a;
|
|
287
|
-
if (remediationActions && Object.keys(remediationActions).length > 0) {
|
|
288
|
-
const allRemediationActions = Object.values(remediationActions).flat().filter((rem) => {
|
|
289
|
-
var _a2;
|
|
290
|
-
return ((_a2 = rem.forms) == null ? void 0 : _a2.length) > 0;
|
|
291
|
-
});
|
|
292
|
-
if (allRemediationActions.length === 1 && ((_a = allRemediationActions[0]) == null ? void 0 : _a.forms.length) === 1) {
|
|
293
|
-
const form = forms.find((form2) => {
|
|
294
|
-
var _a2;
|
|
295
|
-
return (form2 == null ? void 0 : form2.formId) === ((_a2 = allRemediationActions[0]) == null ? void 0 : _a2.forms[0]);
|
|
296
|
-
});
|
|
297
|
-
if (form) return form;
|
|
298
|
-
}
|
|
299
|
-
return forms[forms.length - 1];
|
|
300
|
-
}
|
|
301
|
-
return forms[0];
|
|
302
|
-
};
|
|
303
|
-
const useFormComposer = ({
|
|
304
|
-
problems,
|
|
305
|
-
navigationTrackingParams,
|
|
306
|
-
forms,
|
|
307
|
-
externalBackClick,
|
|
308
|
-
onSubmit,
|
|
309
|
-
triggerValidation
|
|
310
|
-
}) => {
|
|
311
|
-
var _a;
|
|
312
|
-
const userEvents = useAnalyticsContext();
|
|
313
|
-
const [shouldValidate, setShouldValidate] = useState(false);
|
|
314
|
-
const [activeForm, setActiveForm] = useState(forms[0]);
|
|
315
|
-
const isFormSummaryStep = (form) => form.formId === summaryStep.formId;
|
|
316
|
-
const getFormIndex = (formId) => forms.findIndex((form) => form.formId === formId);
|
|
317
|
-
const currentStep = getFormIndex(activeForm.formId);
|
|
318
|
-
const totalSteps = forms.length;
|
|
319
|
-
const isFinalStep = currentStep === totalSteps - 1;
|
|
320
|
-
const isFirstStep = currentStep === 0;
|
|
321
|
-
const firstStepId = (_a = forms[0]) == null ? void 0 : _a.formId;
|
|
322
|
-
useEffect(() => {
|
|
323
|
-
setActiveForm(
|
|
324
|
-
(activeForm2) => forms.find(({ formId }) => formId === activeForm2.formId) ?? activeForm2
|
|
325
|
-
);
|
|
326
|
-
}, [forms]);
|
|
327
|
-
useEffect(() => {
|
|
328
|
-
userEvents.updateSharedEventProperties({ page: activeForm.formName });
|
|
329
|
-
}, [activeForm.formName]);
|
|
330
|
-
useEffect(() => {
|
|
331
|
-
const openingStep = getOpeningStep(forms, problems == null ? void 0 : problems.remediationActions);
|
|
332
|
-
setActiveForm(openingStep);
|
|
333
|
-
}, [firstStepId, problems == null ? void 0 : problems.remediationActions]);
|
|
334
|
-
const gotoFormByFormIndex = (nextFormIndex) => {
|
|
335
|
-
setActiveForm(forms[nextFormIndex]);
|
|
336
|
-
};
|
|
337
|
-
const trackSubmitClick = () => {
|
|
338
|
-
trackNavigation({
|
|
339
|
-
userEvents,
|
|
340
|
-
actionType: "submit",
|
|
341
|
-
label: "submit",
|
|
342
|
-
additionalTrackingParams: navigationTrackingParams
|
|
343
|
-
});
|
|
344
|
-
};
|
|
345
|
-
const handleNextClick = async () => {
|
|
346
|
-
if (isFormSummaryStep(activeForm)) {
|
|
347
|
-
trackSubmitClick();
|
|
348
|
-
onSubmit();
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
const isAsyncValidationValid = await (triggerValidation == null ? void 0 : triggerValidation(activeForm.formId)) ?? true;
|
|
352
|
-
if (!activeForm.isValid || !isAsyncValidationValid) {
|
|
353
|
-
setShouldValidate(true);
|
|
354
|
-
trackNavigation({
|
|
355
|
-
userEvents,
|
|
356
|
-
actionType: "next",
|
|
357
|
-
label: "next",
|
|
358
|
-
returnValue: "validation error",
|
|
359
|
-
additionalTrackingParams: navigationTrackingParams
|
|
360
|
-
});
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
if (isFinalStep) {
|
|
364
|
-
trackSubmitClick();
|
|
365
|
-
onSubmit();
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
setShouldValidate(false);
|
|
369
|
-
const toFormIndex = currentStep + 1;
|
|
370
|
-
gotoFormByFormIndex(toFormIndex);
|
|
371
|
-
trackNavigation({
|
|
372
|
-
userEvents,
|
|
373
|
-
actionType: "next",
|
|
374
|
-
toForm: forms[toFormIndex].formName,
|
|
375
|
-
label: "next",
|
|
376
|
-
returnValue: "success",
|
|
377
|
-
additionalTrackingParams: navigationTrackingParams
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
const handleBackClick = () => {
|
|
381
|
-
if (currentStep > 0) {
|
|
382
|
-
const toForm = forms[currentStep - 1];
|
|
383
|
-
setActiveForm(toForm);
|
|
384
|
-
trackNavigation({
|
|
385
|
-
userEvents,
|
|
386
|
-
actionType: "back",
|
|
387
|
-
toForm: toForm.formName,
|
|
388
|
-
label: "back",
|
|
389
|
-
additionalTrackingParams: navigationTrackingParams
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
const backClickHandler = isFirstStep ? externalBackClick : handleBackClick;
|
|
394
|
-
return {
|
|
395
|
-
handleBackClick: backClickHandler,
|
|
396
|
-
handleNextClick,
|
|
397
|
-
gotoFormByFormIndex,
|
|
398
|
-
activeForm,
|
|
399
|
-
shouldValidate,
|
|
400
|
-
setShouldValidate,
|
|
401
|
-
steps: { current: currentStep, total: totalSteps }
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
const getScenarios = async (legalEntityId, baseUrl, legalEntityType, countryCode) => {
|
|
405
|
-
const scenarioParams = new URLSearchParams({
|
|
406
|
-
...countryCode && { countryCode },
|
|
407
|
-
...legalEntityType && { legalEntityType }
|
|
408
|
-
});
|
|
409
|
-
return httpGet({
|
|
410
|
-
baseUrl,
|
|
411
|
-
path: `legalEntities/${legalEntityId}/configurations/scenarios?${scenarioParams}`
|
|
412
|
-
});
|
|
413
|
-
};
|
|
414
|
-
const useScenarios = (countryCode, legalEntityType, options2) => {
|
|
415
|
-
var _a;
|
|
416
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
417
|
-
const result = useQuery({
|
|
418
|
-
queryKey: ["scenarios", legalEntityType, countryCode],
|
|
419
|
-
queryFn: () => getScenarios(rootLegalEntityId.value, baseUrl.value, legalEntityType, countryCode),
|
|
420
|
-
...options2
|
|
421
|
-
});
|
|
422
|
-
return {
|
|
423
|
-
...result,
|
|
424
|
-
data: (_a = result.data) == null ? void 0 : _a[legalEntityType]
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
const defaultPayoutAccountFormat = {
|
|
428
|
-
[CountryCodes.CzechRepublic]: "iban",
|
|
429
|
-
[CountryCodes.Denmark]: "local",
|
|
430
|
-
[CountryCodes.Hungary]: "iban",
|
|
431
|
-
[CountryCodes.Norway]: "local",
|
|
432
|
-
[CountryCodes.Poland]: "local",
|
|
433
|
-
[CountryCodes.Sweden]: "local",
|
|
434
|
-
[CountryCodes.UnitedKingdom]: "local"
|
|
435
|
-
};
|
|
436
|
-
const useUnifyLoadingStatus = (setParentLoadingStatus, ...childLoadingStatuses) => {
|
|
437
|
-
useEffect(() => {
|
|
438
|
-
const loadingStatus = childLoadingStatuses.some(
|
|
439
|
-
(status) => status === "loading" || status === "pending"
|
|
440
|
-
) ? "loading" : "success";
|
|
441
|
-
setParentLoadingStatus(loadingStatus);
|
|
442
|
-
}, [...childLoadingStatuses]);
|
|
443
|
-
};
|
|
444
|
-
const logger$8 = createLogger();
|
|
445
|
-
const useScenarioConfiguration = ({
|
|
446
|
-
getPayoutAccountFormatData,
|
|
447
|
-
parseConfiguration: parseConfiguration2,
|
|
448
|
-
country,
|
|
449
|
-
legalEntityType,
|
|
450
|
-
instantVerificationAvailable,
|
|
451
|
-
setLoadingStatus,
|
|
452
|
-
existingBankAccountFormat
|
|
453
|
-
}) => {
|
|
454
|
-
const accountFormat = useSignalValue(payoutAccountFormat);
|
|
455
|
-
const {
|
|
456
|
-
data: scenarios,
|
|
457
|
-
isLoading: scenariosIsLoading,
|
|
458
|
-
isError: scenariosIsError
|
|
459
|
-
} = useScenarios(country, legalEntityType);
|
|
460
|
-
const [accountFormatResponse, setAccountFormatResponse] = useState();
|
|
461
|
-
const configurationLoadingStatus = useMemo(() => {
|
|
462
|
-
if (scenariosIsLoading) return "loading";
|
|
463
|
-
if (scenariosIsError) return "error";
|
|
464
|
-
if (scenarios) return "success";
|
|
465
|
-
return "pending";
|
|
466
|
-
}, [scenarios, scenariosIsError, scenariosIsLoading]);
|
|
467
|
-
const [payoutFormatLoadingStatus, setpayoutFormatLoadingStatus] = useState("success");
|
|
468
|
-
useUnifyLoadingStatus(setLoadingStatus, configurationLoadingStatus, payoutFormatLoadingStatus);
|
|
469
|
-
useEffect(() => {
|
|
470
|
-
if (!getPayoutAccountFormatData) return;
|
|
471
|
-
setpayoutFormatLoadingStatus("loading");
|
|
472
|
-
const makePayoutFormatCallAndSave = async () => {
|
|
473
|
-
try {
|
|
474
|
-
const response = await getPayoutAccountFormatData();
|
|
475
|
-
setAccountFormatResponse(response);
|
|
476
|
-
if (!response) return;
|
|
477
|
-
const allowedBankAccountFormats = Object.keys(response);
|
|
478
|
-
if (existingBankAccountFormat && !allowedBankAccountFormats.includes(existingBankAccountFormat)) {
|
|
479
|
-
throw new AdyenKycSdkError(
|
|
480
|
-
`Account format, ${existingBankAccountFormat}, of transferInstrument is not in allowed formats for ${country}`
|
|
481
|
-
);
|
|
482
|
-
}
|
|
483
|
-
const defaultAccountFormat = defaultPayoutAccountFormat[country] ?? allowedBankAccountFormats[0];
|
|
484
|
-
payoutAccountFormat.value = existingBankAccountFormat ?? defaultAccountFormat;
|
|
485
|
-
} catch (err) {
|
|
486
|
-
logger$8.warn("WARNING: Payout format request failed - error:", err);
|
|
487
|
-
} finally {
|
|
488
|
-
setpayoutFormatLoadingStatus("success");
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
makePayoutFormatCallAndSave().catch(logger$8.error);
|
|
492
|
-
}, [
|
|
493
|
-
country,
|
|
494
|
-
getPayoutAccountFormatData,
|
|
495
|
-
setpayoutFormatLoadingStatus,
|
|
496
|
-
existingBankAccountFormat
|
|
497
|
-
]);
|
|
498
|
-
const { fieldConfigurations, requiredFields } = useMemo(() => {
|
|
499
|
-
if (!scenarios) return {};
|
|
500
|
-
const payoutRequiredFields = accountFormatResponse && accountFormat ? accountFormatResponse[accountFormat] : void 0;
|
|
501
|
-
const scenarioConfig = parseConfiguration2(
|
|
502
|
-
payoutRequiredFields ? {
|
|
503
|
-
scenarios,
|
|
504
|
-
country,
|
|
505
|
-
requiredFields: payoutRequiredFields,
|
|
506
|
-
bankVerificationAvailable: instantVerificationAvailable
|
|
507
|
-
} : {
|
|
508
|
-
scenarios,
|
|
509
|
-
country,
|
|
510
|
-
requiredFields: void 0,
|
|
511
|
-
bankVerificationAvailable: void 0
|
|
512
|
-
}
|
|
513
|
-
);
|
|
514
|
-
return {
|
|
515
|
-
fieldConfigurations: scenarioConfig,
|
|
516
|
-
requiredFields: payoutRequiredFields
|
|
517
|
-
};
|
|
518
|
-
}, [
|
|
519
|
-
accountFormatResponse,
|
|
520
|
-
accountFormat,
|
|
521
|
-
scenarios,
|
|
522
|
-
country,
|
|
523
|
-
parseConfiguration2,
|
|
524
|
-
instantVerificationAvailable
|
|
525
|
-
]);
|
|
526
|
-
return {
|
|
527
|
-
requiredFields,
|
|
528
|
-
fieldConfigurations
|
|
529
|
-
};
|
|
530
|
-
};
|
|
531
|
-
const logger$7 = createLogger();
|
|
532
|
-
function FormRouterContextProvider({ children, forms, setFormIndex }) {
|
|
533
|
-
const contextValue = useMemo(
|
|
534
|
-
() => ({
|
|
535
|
-
setFormIndex,
|
|
536
|
-
goToFormByFieldName: (fieldName) => {
|
|
537
|
-
if (fieldName === "idDocument") {
|
|
538
|
-
fieldName = "idVerificationMethod";
|
|
539
|
-
}
|
|
540
|
-
const formIndex = forms.findIndex(
|
|
541
|
-
(form) => {
|
|
542
|
-
var _a;
|
|
543
|
-
return (_a = form == null ? void 0 : form.fields) == null ? void 0 : _a.some((field) => field === fieldName);
|
|
544
|
-
}
|
|
545
|
-
);
|
|
546
|
-
if (formIndex > -1) {
|
|
547
|
-
setFormIndex(formIndex);
|
|
548
|
-
} else {
|
|
549
|
-
logger$7.error("No form was found to have that field so form navigation failed.");
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
}),
|
|
553
|
-
[forms, setFormIndex]
|
|
554
|
-
);
|
|
555
|
-
return /* @__PURE__ */ jsx(FormRouterContext.Provider, { value: contextValue, children });
|
|
556
|
-
}
|
|
557
|
-
function getProp(object, path) {
|
|
558
|
-
const splitPath = path.split(".");
|
|
559
|
-
const reducer2 = (xs, x) => xs && xs[x] !== void 0 ? xs[x] : void 0;
|
|
560
|
-
return splitPath.reduce(reducer2, object);
|
|
561
|
-
}
|
|
562
|
-
function assignToProp(path, obj, val) {
|
|
563
|
-
const splitPath = path.split(".");
|
|
564
|
-
const pathDepth = splitPath.length;
|
|
565
|
-
let currentObj = obj;
|
|
566
|
-
splitPath.forEach((key, index) => {
|
|
567
|
-
if (index === pathDepth - 1) {
|
|
568
|
-
currentObj[key] = val;
|
|
569
|
-
} else {
|
|
570
|
-
if (!currentObj[key]) {
|
|
571
|
-
currentObj[key] = {};
|
|
572
|
-
}
|
|
573
|
-
currentObj = currentObj[key];
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
function deleteProp(path, obj) {
|
|
578
|
-
const splitPath = path.split(".");
|
|
579
|
-
const pathDepth = splitPath.length;
|
|
580
|
-
let currentObj = obj;
|
|
581
|
-
splitPath.forEach((key, index) => {
|
|
582
|
-
if (currentObj[key] === void 0) {
|
|
583
|
-
throw Error(`The given path does not exist on the object: ${key} (${path})`);
|
|
584
|
-
}
|
|
585
|
-
if (index === pathDepth - 1) {
|
|
586
|
-
delete currentObj[key];
|
|
587
|
-
} else {
|
|
588
|
-
currentObj = currentObj[key];
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
const formatObject = (obj, mapping) => {
|
|
593
|
-
if (!obj) {
|
|
594
|
-
return null;
|
|
595
|
-
}
|
|
596
|
-
const formattedObj = {};
|
|
597
|
-
Object.entries(mapping).forEach(([targetKey, sourceKey]) => {
|
|
598
|
-
const value = getProp(obj, sourceKey);
|
|
599
|
-
if (value !== void 0) {
|
|
600
|
-
assignToProp(targetKey, formattedObj, value);
|
|
601
|
-
}
|
|
602
|
-
});
|
|
603
|
-
return formattedObj;
|
|
604
|
-
};
|
|
605
|
-
const mapWith = (obj, mapping) => {
|
|
606
|
-
const formattedObj = {};
|
|
607
|
-
for (const [sourceKey, targetKey] of Object.entries(mapping)) {
|
|
608
|
-
const value = getProp(obj, sourceKey);
|
|
609
|
-
if (value !== void 0) {
|
|
610
|
-
assignToProp(targetKey, formattedObj, value);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return formattedObj;
|
|
614
|
-
};
|
|
615
|
-
const processValidationErrors = (validationError, dropinTask, keyMappings) => {
|
|
616
|
-
if ((validationError == null ? void 0 : validationError.invalidFields) && (validationError == null ? void 0 : validationError.invalidFields.length) > 0) {
|
|
617
|
-
return validationError == null ? void 0 : validationError.invalidFields.reduce(
|
|
618
|
-
(acc, invalidField) => {
|
|
619
|
-
if (invalidField == null ? void 0 : invalidField.name) {
|
|
620
|
-
let mappedFieldPath = mapField(invalidField == null ? void 0 : invalidField.name, dropinTask);
|
|
621
|
-
if (keyMappings) {
|
|
622
|
-
mappedFieldPath = keyMappings[invalidField == null ? void 0 : invalidField.name];
|
|
623
|
-
}
|
|
624
|
-
if (mappedFieldPath) {
|
|
625
|
-
assignToProp(mappedFieldPath, acc, true);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
return acc;
|
|
629
|
-
},
|
|
630
|
-
{}
|
|
631
|
-
);
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
const mapField = (lePath, dropinTask) => {
|
|
635
|
-
switch (dropinTask) {
|
|
636
|
-
case TaskTypes.INDIVIDUAL:
|
|
637
|
-
return remediationIndividualApiKeyMapping[lePath];
|
|
638
|
-
case TaskTypes.BUSINESS_DETAILS:
|
|
639
|
-
return remediationBusinessDetailsApiKeyMapping[lePath];
|
|
640
|
-
case TaskTypes.PAYOUT:
|
|
641
|
-
case TaskTypes.PAYIN:
|
|
642
|
-
return remediationPayoutApiKeyMapping[lePath];
|
|
643
|
-
default:
|
|
644
|
-
return null;
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
const getRequiredForms = (forms, requiredFields, optionalFields, skipSummary) => {
|
|
648
|
-
const requiredForms = Object.values(forms).filter(({ formId }) => {
|
|
649
|
-
if (requiredFields || optionalFields) {
|
|
650
|
-
return Boolean(requiredFields == null ? void 0 : requiredFields[formId]) || Boolean(optionalFields == null ? void 0 : optionalFields[formId]);
|
|
651
|
-
}
|
|
652
|
-
return true;
|
|
653
|
-
});
|
|
654
|
-
if (skipSummary) {
|
|
655
|
-
return requiredForms;
|
|
656
|
-
}
|
|
657
|
-
return [...requiredForms, summaryStep];
|
|
658
|
-
};
|
|
659
|
-
const addValidityToForms = (forms, formValidity, problems) => forms.map(({ formId, formName, formHeading, formDescription, fields }) => {
|
|
660
|
-
var _a;
|
|
661
|
-
return {
|
|
662
|
-
formId,
|
|
663
|
-
formName,
|
|
664
|
-
formHeading,
|
|
665
|
-
formDescription,
|
|
666
|
-
fields,
|
|
667
|
-
isValid: (formValidity == null ? void 0 : formValidity[formId]) ?? false,
|
|
668
|
-
hasServerValidationErrors: Boolean((_a = problems == null ? void 0 : problems.validationErrors) == null ? void 0 : _a[formId])
|
|
669
|
-
};
|
|
670
|
-
});
|
|
61
|
+
const isEeaCountry = (country) => !country ? false : EEA_Countries.includes(country);
|
|
62
|
+
const isLowRiskEea = (countryCode) => !!countryCode && isEeaCountry(countryCode) && countryCode !== CountryCodes.Liechtenstein;
|
|
63
|
+
const isUK = (countryCode) => countryCode === CountryCodes.UnitedKingdom;
|
|
671
64
|
const identityBase = {
|
|
672
65
|
role: {
|
|
673
66
|
rule: "requiredIfDecisionMakerTask"
|
|
@@ -822,175 +215,6 @@ const fieldsPerScenario = {
|
|
|
822
215
|
L1_IDDOC: idDocument,
|
|
823
216
|
L_PH: phoneNumberBase$1
|
|
824
217
|
};
|
|
825
|
-
const splitAtFirstOccurrence = (str, separator) => {
|
|
826
|
-
const firstOccurrence = str.indexOf(separator);
|
|
827
|
-
if (firstOccurrence === -1) return [str];
|
|
828
|
-
return [str.slice(0, firstOccurrence), str.slice(firstOccurrence + 1)];
|
|
829
|
-
};
|
|
830
|
-
const getTrustMemberOwnerId = (trustMemberId, entityAssociations) => {
|
|
831
|
-
var _a;
|
|
832
|
-
return (_a = entityAssociations.find((association) => association.associatorId === trustMemberId)) == null ? void 0 : _a.legalEntityId;
|
|
833
|
-
};
|
|
834
|
-
const getFallbackName = (exemptSettlorAssociation) => {
|
|
835
|
-
const [firstName, lastName] = splitAtFirstOccurrence(exemptSettlorAssociation.name ?? "", " ");
|
|
836
|
-
return {
|
|
837
|
-
firstName,
|
|
838
|
-
lastName
|
|
839
|
-
};
|
|
840
|
-
};
|
|
841
|
-
const convertEntityAssociationIntoTrustMember = (association, associations, exemptSettlorLE) => {
|
|
842
|
-
var _a;
|
|
843
|
-
if (association.settlorExemptionReason) {
|
|
844
|
-
return {
|
|
845
|
-
trustMemberType: "exemptSettlor",
|
|
846
|
-
roles: [TrustMemberTypes.SETTLOR],
|
|
847
|
-
legalEntityType: association.entityType,
|
|
848
|
-
legalEntityId: association.legalEntityId,
|
|
849
|
-
settlorExemptionReason: association.settlorExemptionReason,
|
|
850
|
-
exemptSettlorName: association.entityType === LegalEntityType.INDIVIDUAL ? ((_a = exemptSettlorLE == null ? void 0 : exemptSettlorLE.individual) == null ? void 0 : _a.name) ?? getFallbackName(association) : void 0,
|
|
851
|
-
name: association.name
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
if (association.entityType === LegalEntityType.ORGANIZATION)
|
|
855
|
-
return {
|
|
856
|
-
trustMemberType: "company",
|
|
857
|
-
roles: [],
|
|
858
|
-
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
859
|
-
legalEntityId: association.legalEntityId,
|
|
860
|
-
name: association.name,
|
|
861
|
-
ownerId: getTrustMemberOwnerId(association.legalEntityId, associations)
|
|
862
|
-
};
|
|
863
|
-
if (association.entityType === LegalEntityType.INDIVIDUAL)
|
|
864
|
-
return {
|
|
865
|
-
trustMemberType: "regular",
|
|
866
|
-
roles: [],
|
|
867
|
-
legalEntityType: LegalEntityType.INDIVIDUAL,
|
|
868
|
-
legalEntityId: association.legalEntityId,
|
|
869
|
-
name: association.name
|
|
870
|
-
};
|
|
871
|
-
throw new Error(`Not a valid trust member: ${JSON.stringify(association)}`);
|
|
872
|
-
};
|
|
873
|
-
const mapEntityAssociationsToTrustMembers = (trustEntityId, entityAssociations, exemptSettlorLE) => {
|
|
874
|
-
const mappedTrustMembers = entityAssociations.reduce(
|
|
875
|
-
(acc, entityAssociation) => {
|
|
876
|
-
if (!Object.values(TrustMemberTypes).includes(entityAssociation.type) || entityAssociation.associatorId !== trustEntityId || !entityAssociation.legalEntityId) {
|
|
877
|
-
return acc;
|
|
878
|
-
}
|
|
879
|
-
const trustMember = acc[entityAssociation.legalEntityId] ?? convertEntityAssociationIntoTrustMember(
|
|
880
|
-
entityAssociation,
|
|
881
|
-
entityAssociations,
|
|
882
|
-
exemptSettlorLE
|
|
883
|
-
);
|
|
884
|
-
const trustMemberType = entityAssociation.type;
|
|
885
|
-
acc[entityAssociation.legalEntityId] = {
|
|
886
|
-
...trustMember,
|
|
887
|
-
roles: [.../* @__PURE__ */ new Set([...trustMember.roles, trustMemberType])]
|
|
888
|
-
};
|
|
889
|
-
return acc;
|
|
890
|
-
},
|
|
891
|
-
{}
|
|
892
|
-
);
|
|
893
|
-
return Object.values(mappedTrustMembers);
|
|
894
|
-
};
|
|
895
|
-
const mapRootLegalEntityToTrustMember = (rootLegalEntity) => ({
|
|
896
|
-
trustMemberType: "rootTrustee",
|
|
897
|
-
roles: [TrustMemberTypes.TRUSTEE],
|
|
898
|
-
legalEntityType: rootLegalEntity.type,
|
|
899
|
-
legalEntityId: rootLegalEntity.id,
|
|
900
|
-
name: getLegalEntityNameBasedOnType(rootLegalEntity)
|
|
901
|
-
});
|
|
902
|
-
const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) => undefinedBeneficiaryInfo.map(({ reference, description }) => ({
|
|
903
|
-
trustMemberType: "undefinedBeneficiary",
|
|
904
|
-
roles: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
|
|
905
|
-
reference,
|
|
906
|
-
description
|
|
907
|
-
}));
|
|
908
|
-
const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
|
|
909
|
-
var _a;
|
|
910
|
-
return [
|
|
911
|
-
mapRootLegalEntityToTrustMember(rootLegalEntity),
|
|
912
|
-
...mapEntityAssociationsToTrustMembers(
|
|
913
|
-
trustLE.id,
|
|
914
|
-
trustLE.entityAssociations ?? [],
|
|
915
|
-
exemptSettlorLE
|
|
916
|
-
),
|
|
917
|
-
...mapUndefinedBeneficiaryInfoToTrustMembers(((_a = trustLE.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) ?? [])
|
|
918
|
-
];
|
|
919
|
-
};
|
|
920
|
-
const combineRootLegalEntityWithEntityAssociations = (rootLegalEntity, entityAssociations) => {
|
|
921
|
-
const allowedRolesForRootLegalEntity = [
|
|
922
|
-
TrustMemberTypes.SETTLOR,
|
|
923
|
-
TrustMemberTypes.PROTECTOR,
|
|
924
|
-
TrustMemberTypes.DEFINED_BENEFICIARY
|
|
925
|
-
];
|
|
926
|
-
const roles = entityAssociations.map((entityAssociation) => entityAssociation.type).filter((role) => allowedRolesForRootLegalEntity.includes(role));
|
|
927
|
-
return {
|
|
928
|
-
trustMemberType: "rootTrustee",
|
|
929
|
-
roles: [...roles, TrustMemberTypes.TRUSTEE],
|
|
930
|
-
legalEntityType: rootLegalEntity.type,
|
|
931
|
-
legalEntityId: rootLegalEntity.id,
|
|
932
|
-
name: getLegalEntityNameBasedOnType(rootLegalEntity)
|
|
933
|
-
};
|
|
934
|
-
};
|
|
935
|
-
const getRootTrusteeTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
|
|
936
|
-
var _a;
|
|
937
|
-
const entityAssociations = trustLE.entityAssociations ?? [];
|
|
938
|
-
const rootLegalEntityAssociations = entityAssociations.filter(
|
|
939
|
-
(a) => a.legalEntityId === rootLegalEntity.id
|
|
940
|
-
);
|
|
941
|
-
const nonRootLegalEntityAssociations = entityAssociations.filter(
|
|
942
|
-
(a) => a.legalEntityId !== rootLegalEntity.id
|
|
943
|
-
);
|
|
944
|
-
return [
|
|
945
|
-
combineRootLegalEntityWithEntityAssociations(rootLegalEntity, rootLegalEntityAssociations),
|
|
946
|
-
...mapEntityAssociationsToTrustMembers(
|
|
947
|
-
trustLE.id,
|
|
948
|
-
nonRootLegalEntityAssociations ?? [],
|
|
949
|
-
exemptSettlorLE
|
|
950
|
-
),
|
|
951
|
-
...mapUndefinedBeneficiaryInfoToTrustMembers(((_a = trustLE.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) ?? [])
|
|
952
|
-
];
|
|
953
|
-
};
|
|
954
|
-
const useExemptSettlor = ({
|
|
955
|
-
trust
|
|
956
|
-
}) => {
|
|
957
|
-
const matchingAssociation = useMemo(() => {
|
|
958
|
-
if (!trust) return void 0;
|
|
959
|
-
return getOwnEntityAssociations(trust).find(
|
|
960
|
-
(association) => association.type === TrustMemberTypes.SETTLOR && Boolean(association.settlorExemptionReason)
|
|
961
|
-
);
|
|
962
|
-
}, [trust]);
|
|
963
|
-
const { data } = useLegalEntity((matchingAssociation == null ? void 0 : matchingAssociation.legalEntityId) ?? skipToken);
|
|
964
|
-
return data;
|
|
965
|
-
};
|
|
966
|
-
function useTrustMembers() {
|
|
967
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
968
|
-
const { data: trust } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityType.TRUST);
|
|
969
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
970
|
-
const exemptSettlor = useExemptSettlor({
|
|
971
|
-
trust
|
|
972
|
-
});
|
|
973
|
-
const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
|
|
974
|
-
return useMemo(() => {
|
|
975
|
-
if (!rootLegalEntity || !(trust == null ? void 0 : trust.trust)) return [];
|
|
976
|
-
return allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(trust, rootLegalEntity, exemptSettlor) : getTrustMembers(trust, rootLegalEntity, exemptSettlor);
|
|
977
|
-
}, [rootLegalEntity, trust, exemptSettlor, allowMoreRolesForMainRootTrustee]);
|
|
978
|
-
}
|
|
979
|
-
function useUnincorporatedPartnershipMembers() {
|
|
980
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
981
|
-
const { data: unincorporatedPartnership } = useAssociatedLegalEntity(
|
|
982
|
-
rootLegalEntity,
|
|
983
|
-
LegalEntityType.UNINCORPORATED_PARTNERSHIP
|
|
984
|
-
);
|
|
985
|
-
return useMemo(() => {
|
|
986
|
-
if (!rootLegalEntity || !(unincorporatedPartnership == null ? void 0 : unincorporatedPartnership.unincorporatedPartnership)) return [];
|
|
987
|
-
return mapEntityAssociationsToUnincorporatedPartnershipMembers(
|
|
988
|
-
unincorporatedPartnership.id,
|
|
989
|
-
unincorporatedPartnership.entityAssociations ?? [],
|
|
990
|
-
rootLegalEntity
|
|
991
|
-
);
|
|
992
|
-
}, [rootLegalEntity, unincorporatedPartnership]);
|
|
993
|
-
}
|
|
994
218
|
const useCapabilityProblems = () => {
|
|
995
219
|
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
996
220
|
return rootLegalEntity ? getCapabilityProblems(rootLegalEntity, getLegalEntityCountry(rootLegalEntity)) : void 0;
|
|
@@ -1805,7 +1029,7 @@ function reducer({
|
|
|
1805
1029
|
}
|
|
1806
1030
|
};
|
|
1807
1031
|
}
|
|
1808
|
-
const logger$
|
|
1032
|
+
const logger$5 = createLogger();
|
|
1809
1033
|
const useMultiFormAsyncValidator = (asyncRules) => {
|
|
1810
1034
|
const validResult = {
|
|
1811
1035
|
isValid: true,
|
|
@@ -1818,7 +1042,7 @@ const useMultiFormAsyncValidator = (asyncRules) => {
|
|
|
1818
1042
|
const rule = typeof asyncRules === "function" ? (_b = (_a = asyncRules == null ? void 0 : asyncRules(data)) == null ? void 0 : _a[formName]) == null ? void 0 : _b[field] : (_c = asyncRules == null ? void 0 : asyncRules[formName]) == null ? void 0 : _c[field];
|
|
1819
1043
|
const value = (_d = data == null ? void 0 : data[formName]) == null ? void 0 : _d[field];
|
|
1820
1044
|
if (!rule || !value) return new ValidationResult([validResult]);
|
|
1821
|
-
const isValid = await rule.asyncValidate(value).catch(logger$
|
|
1045
|
+
const isValid = await rule.asyncValidate(value).catch(logger$5.error);
|
|
1822
1046
|
if (isValid === false) {
|
|
1823
1047
|
return new ValidationResult([
|
|
1824
1048
|
{
|
|
@@ -1878,14 +1102,14 @@ const useMultiFormStaticValidator = (rules2) => {
|
|
|
1878
1102
|
({ key, value, mode = "blur", formName }, data, context) => {
|
|
1879
1103
|
var _a, _b;
|
|
1880
1104
|
const fieldRules = getRulesForField(key, formName, data);
|
|
1881
|
-
const
|
|
1105
|
+
const isFieldOptional = !!((_a = context == null ? void 0 : context.state.optionalFields) == null ? void 0 : _a.includes(key));
|
|
1882
1106
|
const isFieldObscured = !!((_b = context == null ? void 0 : context.state.obscuredFields) == null ? void 0 : _b.includes(key));
|
|
1883
|
-
if (!
|
|
1107
|
+
if (!isFieldOptional) {
|
|
1884
1108
|
fieldRules == null ? void 0 : fieldRules.push(isNotEmptyValidator);
|
|
1885
1109
|
}
|
|
1886
1110
|
const validationRulesResult = fieldRules.map((rule) => {
|
|
1887
1111
|
const shouldValidate = rule.modes.includes(mode) && !isFieldObscured;
|
|
1888
|
-
const isValid =
|
|
1112
|
+
const isValid = isFieldOptional && isEmpty(value) ? true : rule.validate(value, context);
|
|
1889
1113
|
return {
|
|
1890
1114
|
isValid,
|
|
1891
1115
|
errorMessage: typeof rule.errorMessage === "function" ? rule.errorMessage(value, context) : rule.errorMessage,
|
|
@@ -2150,7 +1374,7 @@ const nameFormatters = {
|
|
|
2150
1374
|
const progressBar = "adyen-kyc-progress-bar";
|
|
2151
1375
|
const progressBarRounded = "adyen-kyc-progress-bar-rounded";
|
|
2152
1376
|
const progressBarIndicator = "adyen-kyc-progress-bar-indicator";
|
|
2153
|
-
const styles$
|
|
1377
|
+
const styles$c = {
|
|
2154
1378
|
progressBar,
|
|
2155
1379
|
progressBarRounded,
|
|
2156
1380
|
progressBarIndicator
|
|
@@ -2161,8 +1385,8 @@ const ProgressBar = ({ progress, ariaLabel, rounded = false }) => {
|
|
|
2161
1385
|
};
|
|
2162
1386
|
const clampedProgress = clamp(progress);
|
|
2163
1387
|
const cssWidth = `${clampedProgress}%`;
|
|
2164
|
-
const className = cx(styles$
|
|
2165
|
-
[styles$
|
|
1388
|
+
const className = cx(styles$c.progressBar, {
|
|
1389
|
+
[styles$c.progressBarRounded]: rounded
|
|
2166
1390
|
});
|
|
2167
1391
|
return /* @__PURE__ */ jsx(
|
|
2168
1392
|
"div",
|
|
@@ -2173,20 +1397,60 @@ const ProgressBar = ({ progress, ariaLabel, rounded = false }) => {
|
|
|
2173
1397
|
"aria-valuenow": clampedProgress,
|
|
2174
1398
|
"aria-valuemin": 0,
|
|
2175
1399
|
"aria-valuemax": 100,
|
|
2176
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
1400
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$c.progressBarIndicator, style: { width: cssWidth }, children: [
|
|
2177
1401
|
progress,
|
|
2178
1402
|
"%"
|
|
2179
1403
|
] })
|
|
2180
1404
|
}
|
|
2181
1405
|
);
|
|
2182
1406
|
};
|
|
1407
|
+
const confirm = "adyen-kyc-confirm";
|
|
1408
|
+
const confirmMessage = "adyen-kyc-confirm-message";
|
|
1409
|
+
const confirmActions = "adyen-kyc-confirm-actions";
|
|
1410
|
+
const styles$b = {
|
|
1411
|
+
confirm,
|
|
1412
|
+
confirmMessage,
|
|
1413
|
+
confirmActions
|
|
1414
|
+
};
|
|
1415
|
+
const Confirm = ({
|
|
1416
|
+
description,
|
|
1417
|
+
cancelText,
|
|
1418
|
+
confirmText,
|
|
1419
|
+
critical = false,
|
|
1420
|
+
onCancel,
|
|
1421
|
+
onConfirm,
|
|
1422
|
+
title
|
|
1423
|
+
}) => {
|
|
1424
|
+
const { i18n } = useI18nContext();
|
|
1425
|
+
const [isInFlight, setIsInFlight] = useState(false);
|
|
1426
|
+
const showCancelButton = onCancel !== void 0;
|
|
1427
|
+
const buttonVariant = critical ? "critical" : "primary";
|
|
1428
|
+
const handleConfirm = async () => {
|
|
1429
|
+
setIsInFlight(true);
|
|
1430
|
+
try {
|
|
1431
|
+
await onConfirm();
|
|
1432
|
+
} finally {
|
|
1433
|
+
setIsInFlight(false);
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
return /* @__PURE__ */ jsx(Modal, { size: "small", transition: "dropIn", showCloseButton: false, ariaLabel: title, children: /* @__PURE__ */ jsxs("div", { className: styles$b.confirm, children: [
|
|
1437
|
+
/* @__PURE__ */ jsxs("div", { className: styles$b.confirmMessage, children: [
|
|
1438
|
+
/* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", children: title }),
|
|
1439
|
+
description && /* @__PURE__ */ jsx(Typography, { variant: "body", el: "p", children: description })
|
|
1440
|
+
] }),
|
|
1441
|
+
/* @__PURE__ */ jsxs("div", { className: styles$b.confirmActions, children: [
|
|
1442
|
+
showCancelButton && /* @__PURE__ */ jsx(Button, { onClick: onCancel, variant: "secondary", disabled: isInFlight, children: cancelText ?? i18n.get("cancel") }),
|
|
1443
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant: buttonVariant, loading: isInFlight, children: confirmText ?? i18n.get("confirm") })
|
|
1444
|
+
] })
|
|
1445
|
+
] }) });
|
|
1446
|
+
};
|
|
2183
1447
|
const formFlow = "adyen-kyc-form-flow";
|
|
2184
1448
|
const formFlowContent = "adyen-kyc-form-flow-content";
|
|
2185
1449
|
const formFlowFooter = "adyen-kyc-form-flow-footer";
|
|
2186
1450
|
const formFlowFooterBorder = "adyen-kyc-form-flow-footer-border";
|
|
2187
1451
|
const formFlowActions = "adyen-kyc-form-flow-actions";
|
|
2188
1452
|
const formFlowActionGroup = "adyen-kyc-form-flow-action-group";
|
|
2189
|
-
const styles$
|
|
1453
|
+
const styles$a = {
|
|
2190
1454
|
formFlow,
|
|
2191
1455
|
formFlowContent,
|
|
2192
1456
|
formFlowFooter,
|
|
@@ -2272,15 +1536,15 @@ const FormFlow = ({
|
|
|
2272
1536
|
});
|
|
2273
1537
|
gotoFormByFormIndex(currentStep + 1);
|
|
2274
1538
|
};
|
|
2275
|
-
const footerClassName = cx(styles$
|
|
2276
|
-
[styles$
|
|
1539
|
+
const footerClassName = cx(styles$a.formFlowFooter, {
|
|
1540
|
+
[styles$a.formFlowFooterBorder]: isSingleStepForm
|
|
2277
1541
|
});
|
|
2278
1542
|
return /* @__PURE__ */ jsxs(MaybeModal, { inline: !asModal, onClose: handleDismiss, children: [
|
|
2279
|
-
/* @__PURE__ */ jsxs("div", { ref: contentRef, className: styles$
|
|
2280
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
1543
|
+
/* @__PURE__ */ jsxs("div", { ref: contentRef, className: styles$a.formFlow, children: [
|
|
1544
|
+
/* @__PURE__ */ jsx("div", { className: styles$a.formFlowContent, children: /* @__PURE__ */ jsx(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0, loaderSize: "large", children: /* @__PURE__ */ jsx(FormRouterContextProvider, { forms, setFormIndex: gotoFormByFormIndex, children: isLastStep && summary !== void 0 ? /* @__PURE__ */ jsx(Summary, { ...summary, forms, gotoForm: gotoFormByFormIndex }) : children }) }) }),
|
|
2281
1545
|
/* @__PURE__ */ jsxs("div", { className: footerClassName, children: [
|
|
2282
1546
|
!isSingleStepForm && /* @__PURE__ */ jsx(ProgressBar, { ariaLabel: i18n.get("progress"), progress }),
|
|
2283
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
1547
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.formFlowActions, children: [
|
|
2284
1548
|
isFirstStep || handleBackClick === void 0 ? /* @__PURE__ */ jsx(
|
|
2285
1549
|
Button,
|
|
2286
1550
|
{
|
|
@@ -2299,7 +1563,7 @@ const FormFlow = ({
|
|
|
2299
1563
|
children: i18n.get("back")
|
|
2300
1564
|
}
|
|
2301
1565
|
),
|
|
2302
|
-
isLastStep ? /* @__PURE__ */ jsx(Button, { onClick: handleSubmit, loading: isSubmitting, children: i18n.get("submit") }) : /* @__PURE__ */ jsxs("div", { className: styles$
|
|
1566
|
+
isLastStep ? /* @__PURE__ */ jsx(Button, { onClick: handleSubmit, loading: isSubmitting, children: i18n.get("submit") }) : /* @__PURE__ */ jsxs("div", { className: styles$a.formFlowActionGroup, children: [
|
|
2303
1567
|
isSaveButtonVisible && /* @__PURE__ */ jsx(
|
|
2304
1568
|
IconButton,
|
|
2305
1569
|
{
|
|
@@ -2329,214 +1593,6 @@ const FormFlow = ({
|
|
|
2329
1593
|
)
|
|
2330
1594
|
] });
|
|
2331
1595
|
};
|
|
2332
|
-
const createDocument = async (context, document, ownerId) => {
|
|
2333
|
-
const { baseUrl, rootLegalEntityId } = context;
|
|
2334
|
-
return httpPost(
|
|
2335
|
-
{
|
|
2336
|
-
baseUrl,
|
|
2337
|
-
path: `legalEntities/${rootLegalEntityId}/documents/${ownerId}`
|
|
2338
|
-
},
|
|
2339
|
-
document
|
|
2340
|
-
);
|
|
2341
|
-
};
|
|
2342
|
-
const deleteDocument$1 = async (context, documentId) => {
|
|
2343
|
-
const { baseUrl, rootLegalEntityId } = context;
|
|
2344
|
-
return httpDelete({
|
|
2345
|
-
baseUrl,
|
|
2346
|
-
path: `legalEntities/${rootLegalEntityId}/documents/${documentId}/`
|
|
2347
|
-
});
|
|
2348
|
-
};
|
|
2349
|
-
const getDocument$1 = async (context, documentId) => {
|
|
2350
|
-
const { baseUrl, rootLegalEntityId } = context;
|
|
2351
|
-
return httpGet({
|
|
2352
|
-
baseUrl,
|
|
2353
|
-
path: `legalEntities/${rootLegalEntityId}/documents/${documentId}`
|
|
2354
|
-
});
|
|
2355
|
-
};
|
|
2356
|
-
const updateDocument = async (context, document, documentId, ownerId) => {
|
|
2357
|
-
const { baseUrl, rootLegalEntityId } = context;
|
|
2358
|
-
return httpPost(
|
|
2359
|
-
{
|
|
2360
|
-
baseUrl,
|
|
2361
|
-
path: `legalEntities/${rootLegalEntityId}/documents/${documentId}/${ownerId}`
|
|
2362
|
-
},
|
|
2363
|
-
document
|
|
2364
|
-
);
|
|
2365
|
-
};
|
|
2366
|
-
const logger$5 = createLogger();
|
|
2367
|
-
const documentStore = {};
|
|
2368
|
-
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions();
|
|
2369
|
-
const idTypes = idDocumentTypeOptions.map((types) => types.id);
|
|
2370
|
-
let getDocumentService;
|
|
2371
|
-
let updateDocumentService;
|
|
2372
|
-
let createDocumentService;
|
|
2373
|
-
let deleteDocumentService;
|
|
2374
|
-
const documentApiUtils = (context) => {
|
|
2375
|
-
if (!getDocumentService || !updateDocumentService || !createDocumentService || !deleteDocumentService) {
|
|
2376
|
-
getDocumentService = (documentId) => getDocument$1(context, documentId);
|
|
2377
|
-
updateDocumentService = (document, documentId, ownerId) => updateDocument(context, document, documentId, ownerId);
|
|
2378
|
-
createDocumentService = (document, ownerId) => createDocument(context, document, ownerId);
|
|
2379
|
-
if (deleteDocument$1) {
|
|
2380
|
-
deleteDocumentService = (documentId) => deleteDocument$1(context, documentId);
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
return {
|
|
2384
|
-
fetchDocuments,
|
|
2385
|
-
fetchDocument,
|
|
2386
|
-
uploadDocuments,
|
|
2387
|
-
deleteDocument
|
|
2388
|
-
};
|
|
2389
|
-
};
|
|
2390
|
-
const fetchDocuments = async (documentDetails, entityId) => {
|
|
2391
|
-
if (documentDetails.length === 0) return [];
|
|
2392
|
-
const documentPromises = [];
|
|
2393
|
-
documentDetails.forEach((documentDetail) => {
|
|
2394
|
-
documentPromises.push(fetchDocument(documentDetail));
|
|
2395
|
-
});
|
|
2396
|
-
const entityDocuments = await Promise.all(documentPromises);
|
|
2397
|
-
documentStore[entityId] = [];
|
|
2398
|
-
entityDocuments.forEach((document) => {
|
|
2399
|
-
var _a;
|
|
2400
|
-
const id = (_a = document.owner) == null ? void 0 : _a.id;
|
|
2401
|
-
if (id) {
|
|
2402
|
-
documentStore[id].push(document);
|
|
2403
|
-
} else {
|
|
2404
|
-
logger$5.error("Document has no `owner.id`", document);
|
|
2405
|
-
}
|
|
2406
|
-
});
|
|
2407
|
-
return documentStore[entityId];
|
|
2408
|
-
};
|
|
2409
|
-
const fetchDocument = async (documentDetail) => {
|
|
2410
|
-
const document = await getDocumentService(documentDetail.id);
|
|
2411
|
-
return {
|
|
2412
|
-
...document,
|
|
2413
|
-
modificationDate: documentDetail.modificationDate
|
|
2414
|
-
};
|
|
2415
|
-
};
|
|
2416
|
-
const deleteDocument = async (documentId) => deleteDocumentService(documentId);
|
|
2417
|
-
const uploadDocuments = async (documents, entityId) => {
|
|
2418
|
-
const uploadPromises = [];
|
|
2419
|
-
documents.forEach((document) => {
|
|
2420
|
-
const existingDocument = getDocument(entityId, document.type);
|
|
2421
|
-
if (existingDocument) {
|
|
2422
|
-
if (hasDocumentChanged(document, entityId)) {
|
|
2423
|
-
uploadPromises.push(updateDocumentService(document, existingDocument.id, entityId));
|
|
2424
|
-
}
|
|
2425
|
-
} else {
|
|
2426
|
-
uploadPromises.push(createDocumentService(document, entityId));
|
|
2427
|
-
}
|
|
2428
|
-
});
|
|
2429
|
-
const uploadedDocuments = await Promise.all(uploadPromises);
|
|
2430
|
-
updateEntityDocuments(uploadedDocuments, entityId);
|
|
2431
|
-
return documentStore[entityId];
|
|
2432
|
-
};
|
|
2433
|
-
const updateEntityDocuments = (uploadedDocuments, entityId) => {
|
|
2434
|
-
if (!documentStore[entityId]) documentStore[entityId] = [];
|
|
2435
|
-
uploadedDocuments.map(
|
|
2436
|
-
(doc) => ({
|
|
2437
|
-
...doc,
|
|
2438
|
-
modificationDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
2439
|
-
})
|
|
2440
|
-
).forEach((uploadedDocument2) => {
|
|
2441
|
-
const existingDocumentIndex = documentStore[entityId].findIndex(
|
|
2442
|
-
(document) => document.id === uploadedDocument2.id
|
|
2443
|
-
);
|
|
2444
|
-
if (existingDocumentIndex > -1) {
|
|
2445
|
-
documentStore[entityId][existingDocumentIndex] = uploadedDocument2;
|
|
2446
|
-
} else {
|
|
2447
|
-
documentStore[entityId].push(uploadedDocument2);
|
|
2448
|
-
}
|
|
2449
|
-
});
|
|
2450
|
-
};
|
|
2451
|
-
const getDocument = (entityId, documentType) => {
|
|
2452
|
-
var _a;
|
|
2453
|
-
if (!entityId) {
|
|
2454
|
-
return;
|
|
2455
|
-
}
|
|
2456
|
-
return (_a = documentStore[entityId]) == null ? void 0 : _a.find((document) => document.type === documentType);
|
|
2457
|
-
};
|
|
2458
|
-
const getIdDocument = (entityId) => {
|
|
2459
|
-
var _a;
|
|
2460
|
-
return (_a = documentStore[entityId]) == null ? void 0 : _a.find((document) => idTypes.includes(document.type));
|
|
2461
|
-
};
|
|
2462
|
-
const createDocumentRequest = async ({
|
|
2463
|
-
entityId,
|
|
2464
|
-
entityType,
|
|
2465
|
-
documentType,
|
|
2466
|
-
page1,
|
|
2467
|
-
page2,
|
|
2468
|
-
description,
|
|
2469
|
-
existingDocument
|
|
2470
|
-
}) => {
|
|
2471
|
-
const pagesToUpload = [page1, page2].filter(
|
|
2472
|
-
(page) => page !== void 0 && isNewlyUploadedFile(page)
|
|
2473
|
-
);
|
|
2474
|
-
const [page1ToUpload, page2ToUpload] = pagesToUpload;
|
|
2475
|
-
const [encodedPage1, encodedPage2] = await Promise.all(pagesToUpload.map(fileToBase64));
|
|
2476
|
-
if (!encodedPage1) {
|
|
2477
|
-
if (existingDocument && existingDocument.description !== description) {
|
|
2478
|
-
return {
|
|
2479
|
-
owner: {
|
|
2480
|
-
id: entityId,
|
|
2481
|
-
type: entityType
|
|
2482
|
-
},
|
|
2483
|
-
type: documentType,
|
|
2484
|
-
description: description || `Document type: ${documentType}`
|
|
2485
|
-
};
|
|
2486
|
-
}
|
|
2487
|
-
return;
|
|
2488
|
-
}
|
|
2489
|
-
return {
|
|
2490
|
-
owner: {
|
|
2491
|
-
id: entityId,
|
|
2492
|
-
type: entityType
|
|
2493
|
-
},
|
|
2494
|
-
type: documentType,
|
|
2495
|
-
description: description || `Document type: ${documentType}`,
|
|
2496
|
-
attachments: [
|
|
2497
|
-
...page1ToUpload && page2ToUpload && encodedPage1 && encodedPage2 ? [
|
|
2498
|
-
createAttachment(encodedPage1, page1ToUpload.name, "front"),
|
|
2499
|
-
createAttachment(encodedPage2, page2ToUpload.name, "back")
|
|
2500
|
-
] : [createAttachment(encodedPage1, page1ToUpload.name)]
|
|
2501
|
-
]
|
|
2502
|
-
};
|
|
2503
|
-
};
|
|
2504
|
-
const createAttachment = (content, pageName, pageType) => ({
|
|
2505
|
-
content,
|
|
2506
|
-
pageName,
|
|
2507
|
-
...pageType && { pageType }
|
|
2508
|
-
});
|
|
2509
|
-
const hasDocumentChanged = (newDocument, entityId) => {
|
|
2510
|
-
const existingDocument = getDocument(entityId, newDocument.type);
|
|
2511
|
-
if (existingDocument) {
|
|
2512
|
-
return existingDocument.attachments.some(
|
|
2513
|
-
(attachment, index) => {
|
|
2514
|
-
var _a, _b;
|
|
2515
|
-
return attachment.content !== ((_b = (_a = newDocument == null ? void 0 : newDocument.attachments) == null ? void 0 : _a[index]) == null ? void 0 : _b.content);
|
|
2516
|
-
}
|
|
2517
|
-
) || existingDocument.description !== (newDocument == null ? void 0 : newDocument.description);
|
|
2518
|
-
}
|
|
2519
|
-
return true;
|
|
2520
|
-
};
|
|
2521
|
-
const fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
2522
|
-
const reader = new FileReader();
|
|
2523
|
-
reader.readAsDataURL(file);
|
|
2524
|
-
reader.onload = () => {
|
|
2525
|
-
const base64String = reader.result.toString().split(";base64,")[1];
|
|
2526
|
-
resolve(base64String);
|
|
2527
|
-
};
|
|
2528
|
-
reader.onerror = (error) => reject(error);
|
|
2529
|
-
});
|
|
2530
|
-
const getFileExtention = (fileName) => fileName.split(".").pop();
|
|
2531
|
-
const mergeAttachments = (existing, incoming) => {
|
|
2532
|
-
if (!(existing == null ? void 0 : existing.length)) return incoming;
|
|
2533
|
-
if (!(incoming == null ? void 0 : incoming.length)) return existing;
|
|
2534
|
-
const incomingFileTypes = incoming.map((attachment) => attachment.pageType);
|
|
2535
|
-
const filteredExisting = existing.filter(
|
|
2536
|
-
(attachment) => !incomingFileTypes.includes(attachment.pageType)
|
|
2537
|
-
);
|
|
2538
|
-
return [...filteredExisting, ...incoming];
|
|
2539
|
-
};
|
|
2540
1596
|
const getFieldsWithExistingData = (legalEntity, keyMapping, documentMapping, knownProblematicFields = []) => {
|
|
2541
1597
|
var _a;
|
|
2542
1598
|
const apiFieldsWithExistingData = getNestedPropertyKeys(legalEntity);
|
|
@@ -2547,20 +1603,6 @@ const getFieldsWithExistingData = (legalEntity, keyMapping, documentMapping, kno
|
|
|
2547
1603
|
}
|
|
2548
1604
|
return nonDocumentFields;
|
|
2549
1605
|
};
|
|
2550
|
-
const omitObscuredFieldsIfUnchanged = (obscuredFields, dataSubmitted, savedData) => {
|
|
2551
|
-
if (!dataSubmitted) {
|
|
2552
|
-
return;
|
|
2553
|
-
}
|
|
2554
|
-
const filtered = cloneObject(dataSubmitted);
|
|
2555
|
-
obscuredFields.forEach((obscuredField) => {
|
|
2556
|
-
const prevValue = getProp(savedData, obscuredField);
|
|
2557
|
-
const newValue = getProp(dataSubmitted, obscuredField);
|
|
2558
|
-
if (prevValue === newValue && isValueObscured(newValue)) {
|
|
2559
|
-
deleteProp(obscuredField, filtered);
|
|
2560
|
-
}
|
|
2561
|
-
});
|
|
2562
|
-
return filtered;
|
|
2563
|
-
};
|
|
2564
1606
|
const onfidoDocumentTypeMapping = [
|
|
2565
1607
|
{ id: "driversLicense", name: "driversLicense", hasBackPage: true },
|
|
2566
1608
|
{ id: "identityCard", name: "identityCard", hasBackPage: true },
|
|
@@ -2852,8 +1894,8 @@ const rules = ({
|
|
|
2852
1894
|
},
|
|
2853
1895
|
backPageIfRequiredForDocumentType: () => {
|
|
2854
1896
|
var _a;
|
|
2855
|
-
const
|
|
2856
|
-
const idDocumentOption =
|
|
1897
|
+
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
1898
|
+
const idDocumentOption = idDocumentTypeOptions.find(
|
|
2857
1899
|
({ id }) => {
|
|
2858
1900
|
var _a2;
|
|
2859
1901
|
return id === ((_a2 = data.idDocument) == null ? void 0 : _a2.idDocumentType);
|
|
@@ -3002,17 +2044,6 @@ const mandateIdVerificationForMotionCapture = (showMotionCapture, derivedProps)
|
|
|
3002
2044
|
}
|
|
3003
2045
|
return copiedDerivedProps;
|
|
3004
2046
|
};
|
|
3005
|
-
const getPage = ({ attachments }, pageType) => {
|
|
3006
|
-
if (!attachments) throw Error("Document has no attachments");
|
|
3007
|
-
const attachment = pageType ? attachments.find((attach) => attach.pageType === pageType) : attachments[0];
|
|
3008
|
-
if (!attachment) throw Error(`Attachment not found${pageType ? ` with type '${pageType}'` : ""}`);
|
|
3009
|
-
return attachment;
|
|
3010
|
-
};
|
|
3011
|
-
const getPageName = (document, pageType) => getPage(document, pageType).pageName ?? "";
|
|
3012
|
-
const mapExistingFile = (name) => ({
|
|
3013
|
-
name,
|
|
3014
|
-
existing: true
|
|
3015
|
-
});
|
|
3016
2047
|
const mapApiDocumentToIndividualDocuments = (entityId) => {
|
|
3017
2048
|
const idDocument2 = getIdDocument(entityId);
|
|
3018
2049
|
const proofOfResidency = getDocument(entityId, "proofOfResidency");
|
|
@@ -3470,7 +2501,7 @@ function IndividualDropin({
|
|
|
3470
2501
|
}, []);
|
|
3471
2502
|
const { mutateAsync: createLegalEntity2 } = useCreateLegalEntity();
|
|
3472
2503
|
const { mutateAsync: updateLegalEntity2 } = useUpdateLegalEntity();
|
|
3473
|
-
const
|
|
2504
|
+
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
3474
2505
|
const submitLegalEntity = async ({
|
|
3475
2506
|
dataSubmitted,
|
|
3476
2507
|
legalEntity,
|
|
@@ -3625,7 +2656,7 @@ function IndividualDropin({
|
|
|
3625
2656
|
}
|
|
3626
2657
|
try {
|
|
3627
2658
|
const legalEntity = mapIndividualToLegalEntity(dataSubmitted);
|
|
3628
|
-
const idDocumentType = (_a2 =
|
|
2659
|
+
const idDocumentType = (_a2 = idDocumentTypeOptions.find(
|
|
3629
2660
|
({ id }) => {
|
|
3630
2661
|
var _a3;
|
|
3631
2662
|
return ((_a3 = dataSubmitted == null ? void 0 : dataSubmitted.idDocument) == null ? void 0 : _a3.idDocumentType) === id;
|
|
@@ -3685,7 +2716,7 @@ function IndividualDropin({
|
|
|
3685
2716
|
var _a3;
|
|
3686
2717
|
return ((_a3 = idDocument2.instantIdVerificationData) == null ? void 0 : _a3.document_front.type) === document.id;
|
|
3687
2718
|
}
|
|
3688
|
-
) :
|
|
2719
|
+
) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
|
|
3689
2720
|
if (!documentType) return void 0;
|
|
3690
2721
|
const frontPage = (_a2 = idDocument2.idFrontPage) == null ? void 0 : _a2[0];
|
|
3691
2722
|
const backPage = (_b2 = idDocument2.idBackPage) == null ? void 0 : _b2[0];
|
|
@@ -4091,8 +3122,8 @@ const individualOnfidoRules = ({
|
|
|
4091
3122
|
return ((_a = data == null ? void 0 : data.manualIdUpload) == null ? void 0 : _a.idDocumentType) ? REQUIRED : void 0;
|
|
4092
3123
|
},
|
|
4093
3124
|
backPageIfRequiredForIdType: () => {
|
|
4094
|
-
const
|
|
4095
|
-
const idDocumentOption =
|
|
3125
|
+
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
3126
|
+
const idDocumentOption = idDocumentTypeOptions.find(
|
|
4096
3127
|
({ id }) => {
|
|
4097
3128
|
var _a;
|
|
4098
3129
|
return id === ((_a = data.manualIdUpload) == null ? void 0 : _a.idDocumentType);
|
|
@@ -4101,10 +3132,24 @@ const individualOnfidoRules = ({
|
|
|
4101
3132
|
return (idDocumentOption == null ? void 0 : idDocumentOption.hasBackPage) ? REQUIRED : void 0;
|
|
4102
3133
|
},
|
|
4103
3134
|
isProofOfResidencyRequired: () => {
|
|
4104
|
-
var _a, _b;
|
|
3135
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4105
3136
|
if ((_b = (_a = data.proofOfResidency) == null ? void 0 : _a.proofOfResidency) == null ? void 0 : _b.length) {
|
|
4106
3137
|
return REQUIRED;
|
|
4107
3138
|
}
|
|
3139
|
+
const isInstantFlow = ((_c = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _c.idVerificationMethod) === "instantVerification";
|
|
3140
|
+
if (!isInstantFlow) {
|
|
3141
|
+
return void 0;
|
|
3142
|
+
}
|
|
3143
|
+
const documentCountry = (_e = (_d = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _d.idDocument) == null ? void 0 : _e.documentCountry;
|
|
3144
|
+
const residenceCountry = ((_f = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _f.country) ?? country;
|
|
3145
|
+
if (!documentCountry || !residenceCountry) {
|
|
3146
|
+
return void 0;
|
|
3147
|
+
}
|
|
3148
|
+
const countriesMismatch = documentCountry !== residenceCountry;
|
|
3149
|
+
const isEeaLowRiskException = !isUK(documentCountry) && isLowRiskEea(documentCountry) && isLowRiskEea(residenceCountry);
|
|
3150
|
+
if (countriesMismatch && !isEeaLowRiskException) {
|
|
3151
|
+
return REQUIRED;
|
|
3152
|
+
}
|
|
4108
3153
|
},
|
|
4109
3154
|
isProofOfNationalIdRequired: () => {
|
|
4110
3155
|
var _a, _b;
|
|
@@ -4619,7 +3664,11 @@ function AdditionalPersonalDetails(props) {
|
|
|
4619
3664
|
),
|
|
4620
3665
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
|
|
4621
3666
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("personalIdentityDetails") }),
|
|
4622
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsxs(Typography, { el: "p", variant: "body", children: [
|
|
3668
|
+
i18n.get("personalIdentityDetailsDescription"),
|
|
3669
|
+
" ",
|
|
3670
|
+
/* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: i18n.get("personalIdentityDetailsDescriptionLink") })
|
|
3671
|
+
] })
|
|
4623
3672
|
] }),
|
|
4624
3673
|
formUtils.isRequiredField("birthDate") && /* @__PURE__ */ jsx(
|
|
4625
3674
|
Field,
|
|
@@ -4867,6 +3916,60 @@ const useExtractDocumentInformation = (options2) => {
|
|
|
4867
3916
|
...options2
|
|
4868
3917
|
});
|
|
4869
3918
|
};
|
|
3919
|
+
const providerButton = "adyen-kyc-provider-button";
|
|
3920
|
+
const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
|
|
3921
|
+
const styles$9 = {
|
|
3922
|
+
providerButton,
|
|
3923
|
+
providerButtonDisplayName
|
|
3924
|
+
};
|
|
3925
|
+
const ProviderButton = ({
|
|
3926
|
+
provider,
|
|
3927
|
+
disabled = false,
|
|
3928
|
+
fullWidth,
|
|
3929
|
+
loading = false,
|
|
3930
|
+
onClick,
|
|
3931
|
+
testId
|
|
3932
|
+
}) => {
|
|
3933
|
+
const isSingpass = provider.includes("singpassMyInfo");
|
|
3934
|
+
const buttonVariant = isSingpass ? "secondary" : "primary";
|
|
3935
|
+
const { i18n } = useI18nContext();
|
|
3936
|
+
const buttonProps = {
|
|
3937
|
+
disabled,
|
|
3938
|
+
fullWidth,
|
|
3939
|
+
loading,
|
|
3940
|
+
onClick,
|
|
3941
|
+
testId
|
|
3942
|
+
};
|
|
3943
|
+
const providerLogo = {
|
|
3944
|
+
tink: "tink-logo",
|
|
3945
|
+
yapily: "yapily-logo",
|
|
3946
|
+
plaid: "plaid-logo",
|
|
3947
|
+
onfido: "onfido-logo",
|
|
3948
|
+
singpassMyInfo: "singpass-logo",
|
|
3949
|
+
singpassMyInfoBusiness: "singpass-logo"
|
|
3950
|
+
};
|
|
3951
|
+
const providerDisplayName = {
|
|
3952
|
+
tink: "Tink",
|
|
3953
|
+
yapily: "Yapily",
|
|
3954
|
+
plaid: "Plaid",
|
|
3955
|
+
onfido: "Onfido",
|
|
3956
|
+
singpassMyInfo: "Singpass",
|
|
3957
|
+
singpassMyInfoBusiness: "Singpass"
|
|
3958
|
+
};
|
|
3959
|
+
const buttonLabel = {
|
|
3960
|
+
tink: i18n.get("addAccountWith"),
|
|
3961
|
+
yapily: i18n.get("addAccountWith"),
|
|
3962
|
+
plaid: i18n.get("addAccountWith"),
|
|
3963
|
+
onfido: i18n.get("addDetailsWith"),
|
|
3964
|
+
singpassMyInfo: i18n.get("retrieveMyinfoWith"),
|
|
3965
|
+
singpassMyInfoBusiness: i18n.get("retrieveMyinfoBusinessWith")
|
|
3966
|
+
};
|
|
3967
|
+
return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$9.providerButton, children: [
|
|
3968
|
+
buttonLabel[provider],
|
|
3969
|
+
/* @__PURE__ */ jsx("span", { className: styles$9.providerButtonDisplayName, children: providerDisplayName[provider] }),
|
|
3970
|
+
/* @__PURE__ */ jsx(Svg, { name: providerLogo[provider], type: "image" })
|
|
3971
|
+
] }) });
|
|
3972
|
+
};
|
|
4870
3973
|
const mapApiAddressToSchema = (address) => ({
|
|
4871
3974
|
address: address.street,
|
|
4872
3975
|
otherAddressInformation: address.street2,
|
|
@@ -4887,14 +3990,20 @@ const addressToString = ({ address, otherAddressInformation, postalCode, city, s
|
|
|
4887
3990
|
out = appendWithPreSeparator(out, ", ", datasetUtils.getCountryName(country) ?? country);
|
|
4888
3991
|
return out;
|
|
4889
3992
|
};
|
|
4890
|
-
const defaultConflictRule = (provided, detected) =>
|
|
4891
|
-
|
|
4892
|
-
}
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
3993
|
+
const defaultConflictRule = (provided, detected) => {
|
|
3994
|
+
if (detected === void 0 || detected === null) {
|
|
3995
|
+
return { hasConflict: false };
|
|
3996
|
+
}
|
|
3997
|
+
if (provided === void 0 || provided === null) {
|
|
3998
|
+
return { hasConflict: false, resolvedValue: detected };
|
|
3999
|
+
}
|
|
4000
|
+
if (typeof provided === "string" && typeof detected === "string") {
|
|
4001
|
+
return {
|
|
4002
|
+
hasConflict: provided.trim().toLowerCase() !== detected.trim().toLowerCase()
|
|
4003
|
+
};
|
|
4004
|
+
}
|
|
4896
4005
|
return {
|
|
4897
|
-
hasConflict:
|
|
4006
|
+
hasConflict: !objectsDeepEqual(provided, detected)
|
|
4898
4007
|
};
|
|
4899
4008
|
};
|
|
4900
4009
|
const createAddressConflictRule = (datasetUtils) => (provided, detected) => {
|
|
@@ -4928,7 +4037,7 @@ const useDataConflicts = (providedData, detectedData, rules2 = {}, onAutoResolve
|
|
|
4928
4037
|
resolvedData: void 0
|
|
4929
4038
|
};
|
|
4930
4039
|
}
|
|
4931
|
-
const propertiesToCompare = keysOf(
|
|
4040
|
+
const propertiesToCompare = keysOf(detectedData);
|
|
4932
4041
|
const conflictingProperties2 = [];
|
|
4933
4042
|
const autoResolvedPatches = /* @__PURE__ */ new Map();
|
|
4934
4043
|
for (const property of propertiesToCompare) {
|
|
@@ -4989,7 +4098,7 @@ const ConflictRow = ({
|
|
|
4989
4098
|
variant: "caption",
|
|
4990
4099
|
color: "tertiary",
|
|
4991
4100
|
className: styles$8.conflictRowListOptionLabel,
|
|
4992
|
-
children: i18n.get("
|
|
4101
|
+
children: i18n.get("youEntered")
|
|
4993
4102
|
}
|
|
4994
4103
|
),
|
|
4995
4104
|
/* @__PURE__ */ jsx(
|
|
@@ -5009,7 +4118,7 @@ const ConflictRow = ({
|
|
|
5009
4118
|
variant: "caption",
|
|
5010
4119
|
color: "tertiary",
|
|
5011
4120
|
className: styles$8.conflictRowListOptionLabel,
|
|
5012
|
-
children: i18n.get("
|
|
4121
|
+
children: i18n.get("weDetected")
|
|
5013
4122
|
}
|
|
5014
4123
|
),
|
|
5015
4124
|
/* @__PURE__ */ jsx(
|
|
@@ -5112,8 +4221,8 @@ const DataConflictsModal = ({
|
|
|
5112
4221
|
/* @__PURE__ */ jsxs("table", { className: styles$7.dataConflictsTable, children: [
|
|
5113
4222
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
5114
4223
|
/* @__PURE__ */ jsx("th", {}),
|
|
5115
|
-
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("
|
|
5116
|
-
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("
|
|
4224
|
+
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("youEntered") }) }),
|
|
4225
|
+
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("weDetected") }) })
|
|
5117
4226
|
] }) }),
|
|
5118
4227
|
/* @__PURE__ */ jsx("tbody", { children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
|
|
5119
4228
|
ConflictRow,
|
|
@@ -5405,11 +4514,10 @@ const UploadedDocument = ({ document, onDelete, onUpdate }) => {
|
|
|
5405
4514
|
const logger$2 = createLogger();
|
|
5406
4515
|
const idVerificationMethodFields = [
|
|
5407
4516
|
"idVerificationMethod",
|
|
5408
|
-
"ocrExtractedData",
|
|
5409
4517
|
"idDocument"
|
|
5410
4518
|
];
|
|
5411
4519
|
function IdVerificationMethod(props) {
|
|
5412
|
-
var _a, _b, _c, _d, _e
|
|
4520
|
+
var _a, _b, _c, _d, _e;
|
|
5413
4521
|
const { legalEntityId, handlers, formVerificationErrors, fieldValidationErrors } = props;
|
|
5414
4522
|
const { i18n } = useI18nContext();
|
|
5415
4523
|
const userEvents = useAnalyticsContext();
|
|
@@ -5420,7 +4528,6 @@ function IdVerificationMethod(props) {
|
|
|
5420
4528
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
5421
4529
|
const existingDocument = (_a = data.idVerificationMethod) == null ? void 0 : _a.idDocument;
|
|
5422
4530
|
const hasExistingDocument = !isEmpty$1(existingDocument);
|
|
5423
|
-
const ocrData = (_b = data.idVerificationMethod) == null ? void 0 : _b.ocrExtractedData;
|
|
5424
4531
|
const handleFieldChange = useCallback(
|
|
5425
4532
|
(fieldName, mode = "input") => handleChangeFor(fieldName, "idVerificationMethod", mode),
|
|
5426
4533
|
[handleChangeFor]
|
|
@@ -5430,9 +4537,12 @@ function IdVerificationMethod(props) {
|
|
|
5430
4537
|
const [error, setError] = useState();
|
|
5431
4538
|
const [showLoadingSpinner, setShowLoadingSpinner] = useState(false);
|
|
5432
4539
|
const clearError = () => setError(void 0);
|
|
4540
|
+
const [ocrExtractedData, setOcrExtractedData] = useState(
|
|
4541
|
+
void 0
|
|
4542
|
+
);
|
|
5433
4543
|
const extractedData = useMemo(
|
|
5434
|
-
() =>
|
|
5435
|
-
[
|
|
4544
|
+
() => ocrExtractedData ? mapExtractionResultToSchema(ocrExtractedData) : void 0,
|
|
4545
|
+
[ocrExtractedData]
|
|
5436
4546
|
);
|
|
5437
4547
|
const comparableExistingData = useMemo(() => toIndividualOnfidoConflictSchema(data), [data]);
|
|
5438
4548
|
const comparableExtractedData = useMemo(
|
|
@@ -5441,8 +4551,6 @@ function IdVerificationMethod(props) {
|
|
|
5441
4551
|
);
|
|
5442
4552
|
const conflictRules = useMemo(
|
|
5443
4553
|
() => ({
|
|
5444
|
-
firstName: caseInsensitiveStringConflictRule,
|
|
5445
|
-
lastName: caseInsensitiveStringConflictRule,
|
|
5446
4554
|
address: createAddressConflictRule(datasetUtils)
|
|
5447
4555
|
}),
|
|
5448
4556
|
[datasetUtils]
|
|
@@ -5451,7 +4559,7 @@ function IdVerificationMethod(props) {
|
|
|
5451
4559
|
const resolvedSchema = fromIndividualOnfidoConflictSchema(resolvedData2);
|
|
5452
4560
|
setFormData("basicDetails", { ...data.basicDetails, ...resolvedSchema.basicDetails });
|
|
5453
4561
|
setFormData("additionalPersonalDetails", resolvedSchema.additionalPersonalDetails);
|
|
5454
|
-
|
|
4562
|
+
setOcrExtractedData(void 0);
|
|
5455
4563
|
handlers.handleContinueToAdditionalDetails();
|
|
5456
4564
|
};
|
|
5457
4565
|
const { hasConflicts, conflictingProperties, resolvedData } = useDataConflicts(
|
|
@@ -5461,9 +4569,9 @@ function IdVerificationMethod(props) {
|
|
|
5461
4569
|
onAutoResolve
|
|
5462
4570
|
);
|
|
5463
4571
|
const minimumApplicantDetails = {
|
|
5464
|
-
firstName: (
|
|
5465
|
-
lastName: (
|
|
5466
|
-
residencyCountry: (
|
|
4572
|
+
firstName: (_b = data.basicDetails) == null ? void 0 : _b.firstName,
|
|
4573
|
+
lastName: (_c = data.basicDetails) == null ? void 0 : _c.lastName,
|
|
4574
|
+
residencyCountry: (_d = data.additionalPersonalDetails) == null ? void 0 : _d.country
|
|
5467
4575
|
};
|
|
5468
4576
|
const launchOnfido = () => {
|
|
5469
4577
|
clearError();
|
|
@@ -5478,11 +4586,6 @@ function IdVerificationMethod(props) {
|
|
|
5478
4586
|
const handleOnfidoComplete = async (onfidoResult) => {
|
|
5479
4587
|
clearError();
|
|
5480
4588
|
setShowLoadingSpinner(true);
|
|
5481
|
-
handleFieldChange("idDocument")({
|
|
5482
|
-
instantIdVerificationData: onfidoResult,
|
|
5483
|
-
idDocumentType: onfidoResult.document_front.type,
|
|
5484
|
-
modificationDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
5485
|
-
});
|
|
5486
4589
|
setStatus("extractionLoading");
|
|
5487
4590
|
const { document_front, document_back } = onfidoResult;
|
|
5488
4591
|
const documentIds = [document_front.id];
|
|
@@ -5491,7 +4594,13 @@ function IdVerificationMethod(props) {
|
|
|
5491
4594
|
const extractionResult = await extractDocumentInformation2.mutateAsync({
|
|
5492
4595
|
documents: documentIds.map((documentId) => ({ documentId }))
|
|
5493
4596
|
});
|
|
5494
|
-
|
|
4597
|
+
setOcrExtractedData(extractionResult);
|
|
4598
|
+
handleFieldChange("idDocument")({
|
|
4599
|
+
instantIdVerificationData: onfidoResult,
|
|
4600
|
+
idDocumentType: onfidoResult.document_front.type,
|
|
4601
|
+
modificationDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4602
|
+
documentCountry: extractionResult.issuingCountry
|
|
4603
|
+
});
|
|
5495
4604
|
setStatus("ready");
|
|
5496
4605
|
} catch (err) {
|
|
5497
4606
|
handleOnfidoError(err);
|
|
@@ -5513,7 +4622,7 @@ function IdVerificationMethod(props) {
|
|
|
5513
4622
|
const resolvedSchema = fromIndividualOnfidoConflictSchema(resolved);
|
|
5514
4623
|
setFormData("basicDetails", { ...data.basicDetails, ...resolvedSchema.basicDetails });
|
|
5515
4624
|
setFormData("additionalPersonalDetails", resolvedSchema.additionalPersonalDetails);
|
|
5516
|
-
|
|
4625
|
+
setOcrExtractedData(void 0);
|
|
5517
4626
|
setStatus("ready");
|
|
5518
4627
|
userEvents.addPageEvent("Success", {
|
|
5519
4628
|
actionType: "submit",
|
|
@@ -5595,7 +4704,7 @@ function IdVerificationMethod(props) {
|
|
|
5595
4704
|
onClick: launchOnfido
|
|
5596
4705
|
}
|
|
5597
4706
|
),
|
|
5598
|
-
!((
|
|
4707
|
+
!((_e = showIndividualMotionCapture) == null ? void 0 : _e.value) && /* @__PURE__ */ jsx(
|
|
5599
4708
|
Button,
|
|
5600
4709
|
{
|
|
5601
4710
|
onClick: () => setStatus("confirmManualFlowModal"),
|
|
@@ -5647,12 +4756,12 @@ function IdVerificationMethod(props) {
|
|
|
5647
4756
|
address: (val) => addressToString(val, datasetUtils),
|
|
5648
4757
|
id: (val) => formatId(val, i18n)
|
|
5649
4758
|
},
|
|
5650
|
-
title: "
|
|
5651
|
-
explanation: "
|
|
4759
|
+
title: "confirmPersonalDetails",
|
|
4760
|
+
explanation: "theDetailsYouEnteredDontMatch",
|
|
5652
4761
|
onContinue: handleDataConflictsResolved,
|
|
5653
4762
|
onCancel: () => {
|
|
5654
4763
|
handleFieldChange("idDocument")(void 0);
|
|
5655
|
-
|
|
4764
|
+
setOcrExtractedData(void 0);
|
|
5656
4765
|
handleFieldChange("idVerificationMethod")(void 0);
|
|
5657
4766
|
}
|
|
5658
4767
|
}
|
|
@@ -5679,6 +4788,9 @@ const ManualIdUpload = () => {
|
|
|
5679
4788
|
}
|
|
5680
4789
|
);
|
|
5681
4790
|
};
|
|
4791
|
+
const getDisplayErrorMessage = (errorMessage, i18n) => {
|
|
4792
|
+
return typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage;
|
|
4793
|
+
};
|
|
5682
4794
|
const tileContainer = "adyen-kyc-tile-container";
|
|
5683
4795
|
const tile = "adyen-kyc-tile";
|
|
5684
4796
|
const tileIcon = "adyen-kyc-tile-icon";
|
|
@@ -5887,6 +4999,7 @@ function SignatoryQuestionnaire(props) {
|
|
|
5887
4999
|
const { i18n } = useI18nContext();
|
|
5888
5000
|
const {
|
|
5889
5001
|
data,
|
|
5002
|
+
errors,
|
|
5890
5003
|
formVerificationErrors,
|
|
5891
5004
|
heading,
|
|
5892
5005
|
fieldValidationErrors,
|
|
@@ -5897,6 +5010,7 @@ function SignatoryQuestionnaire(props) {
|
|
|
5897
5010
|
if (!handleFieldChange) {
|
|
5898
5011
|
return;
|
|
5899
5012
|
}
|
|
5013
|
+
const errorMessage = formUtils.getErrorMessage("isSignatory", errors, fieldValidationErrors);
|
|
5900
5014
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
|
|
5901
5015
|
/* @__PURE__ */ jsx(FormHeader, { heading }),
|
|
5902
5016
|
/* @__PURE__ */ jsx(
|
|
@@ -5916,7 +5030,8 @@ function SignatoryQuestionnaire(props) {
|
|
|
5916
5030
|
onChange: handleFieldChange("isSignatory"),
|
|
5917
5031
|
onDescriptionLinkClick: handleDescriptionLinkClick,
|
|
5918
5032
|
question: i18n.get("signatoryQuestion"),
|
|
5919
|
-
descriptionLinkText: i18n.get("whatDoesThisMean")
|
|
5033
|
+
descriptionLinkText: i18n.get("whatDoesThisMean"),
|
|
5034
|
+
errorMessage: getDisplayErrorMessage(errorMessage, i18n)
|
|
5920
5035
|
}
|
|
5921
5036
|
)
|
|
5922
5037
|
] });
|
|
@@ -5931,6 +5046,7 @@ function UboQuestionnaire(props) {
|
|
|
5931
5046
|
const {
|
|
5932
5047
|
data,
|
|
5933
5048
|
description,
|
|
5049
|
+
errors,
|
|
5934
5050
|
formVerificationErrors,
|
|
5935
5051
|
heading,
|
|
5936
5052
|
fieldValidationErrors,
|
|
@@ -5941,6 +5057,17 @@ function UboQuestionnaire(props) {
|
|
|
5941
5057
|
if (!handleFieldChange) {
|
|
5942
5058
|
return;
|
|
5943
5059
|
}
|
|
5060
|
+
const isDirectorErrorMessage = formUtils.getErrorMessage(
|
|
5061
|
+
"isDirector",
|
|
5062
|
+
errors,
|
|
5063
|
+
fieldValidationErrors
|
|
5064
|
+
);
|
|
5065
|
+
const isOwnerErrorMessage = formUtils.getErrorMessage("isOwner", errors, fieldValidationErrors);
|
|
5066
|
+
const isControllingPersonErrorMessage = formUtils.getErrorMessage(
|
|
5067
|
+
"isControllingPerson",
|
|
5068
|
+
errors,
|
|
5069
|
+
fieldValidationErrors
|
|
5070
|
+
);
|
|
5944
5071
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
|
|
5945
5072
|
/* @__PURE__ */ jsx(FormHeader, { heading, description }),
|
|
5946
5073
|
/* @__PURE__ */ jsx(
|
|
@@ -5960,7 +5087,8 @@ function UboQuestionnaire(props) {
|
|
|
5960
5087
|
onChange: handleFieldChange("isDirector"),
|
|
5961
5088
|
onDescriptionLinkClick: handleDescriptionLinkClick,
|
|
5962
5089
|
question: i18n.get("directorQuestion"),
|
|
5963
|
-
descriptionLinkText: i18n.get("whatDoesThisMean")
|
|
5090
|
+
descriptionLinkText: i18n.get("whatDoesThisMean"),
|
|
5091
|
+
errorMessage: getDisplayErrorMessage(isDirectorErrorMessage, i18n)
|
|
5964
5092
|
}
|
|
5965
5093
|
),
|
|
5966
5094
|
formUtils.isRequiredField("isOwner") && /* @__PURE__ */ jsx(
|
|
@@ -5971,7 +5099,8 @@ function UboQuestionnaire(props) {
|
|
|
5971
5099
|
onChange: handleFieldChange("isOwner"),
|
|
5972
5100
|
onDescriptionLinkClick: handleDescriptionLinkClick,
|
|
5973
5101
|
question: i18n.get("ownerQuestion"),
|
|
5974
|
-
descriptionLinkText: i18n.get("whatDoesThisMean")
|
|
5102
|
+
descriptionLinkText: i18n.get("whatDoesThisMean"),
|
|
5103
|
+
errorMessage: getDisplayErrorMessage(isOwnerErrorMessage, i18n)
|
|
5975
5104
|
}
|
|
5976
5105
|
),
|
|
5977
5106
|
formUtils.isRequiredField("isControllingPerson") && /* @__PURE__ */ jsx(
|
|
@@ -5982,7 +5111,8 @@ function UboQuestionnaire(props) {
|
|
|
5982
5111
|
onChange: handleFieldChange("isControllingPerson"),
|
|
5983
5112
|
onDescriptionLinkClick: handleDescriptionLinkClick,
|
|
5984
5113
|
question: i18n.get("controllingPersonQuestion"),
|
|
5985
|
-
descriptionLinkText: i18n.get("whatDoesThisMean")
|
|
5114
|
+
descriptionLinkText: i18n.get("whatDoesThisMean"),
|
|
5115
|
+
errorMessage: getDisplayErrorMessage(isControllingPersonErrorMessage, i18n)
|
|
5986
5116
|
}
|
|
5987
5117
|
)
|
|
5988
5118
|
] });
|
|
@@ -6156,7 +5286,9 @@ function IndividualOnfido(props) {
|
|
|
6156
5286
|
heading: i18n.get("signatoryQuestionnaireHeader"),
|
|
6157
5287
|
id: signatoryQuestionnaireFormID,
|
|
6158
5288
|
handleFieldChange: handleFieldChange("signatoryQuestionnaire"),
|
|
6159
|
-
handleDescriptionLinkClick
|
|
5289
|
+
handleDescriptionLinkClick,
|
|
5290
|
+
errors: errors == null ? void 0 : errors.signatoryQuestionnaire,
|
|
5291
|
+
fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.signatoryQuestionnaire
|
|
6160
5292
|
}
|
|
6161
5293
|
);
|
|
6162
5294
|
case uboQuestionnaireFormID:
|
|
@@ -6168,7 +5300,9 @@ function IndividualOnfido(props) {
|
|
|
6168
5300
|
description: i18n.get("uboQuestionnaireDescription"),
|
|
6169
5301
|
id: uboQuestionnaireFormID,
|
|
6170
5302
|
handleFieldChange: handleFieldChange("uboQuestionnaire"),
|
|
6171
|
-
handleDescriptionLinkClick
|
|
5303
|
+
handleDescriptionLinkClick,
|
|
5304
|
+
errors: errors == null ? void 0 : errors.uboQuestionnaire,
|
|
5305
|
+
fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.uboQuestionnaire
|
|
6172
5306
|
}
|
|
6173
5307
|
);
|
|
6174
5308
|
case basicDetailsFormID:
|
|
@@ -6846,7 +5980,7 @@ function IndividualOnfidoDropin({
|
|
|
6846
5980
|
};
|
|
6847
5981
|
const roleTypes = isRoleFieldNeeded && parentLegalEntity ? getAllowedDecisionMakerRoles(parentLegalEntity, taskType) : [];
|
|
6848
5982
|
const { mutateAsync: createLegalEntity2 } = useCreateLegalEntity();
|
|
6849
|
-
const
|
|
5983
|
+
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
6850
5984
|
const submitLegalEntity = async ({
|
|
6851
5985
|
dataSubmitted,
|
|
6852
5986
|
legalEntity,
|
|
@@ -6976,7 +6110,7 @@ function IndividualOnfidoDropin({
|
|
|
6976
6110
|
}
|
|
6977
6111
|
try {
|
|
6978
6112
|
const legalEntity = mapIndividualOnfidoSchemaToLegalEntity(dataSubmitted);
|
|
6979
|
-
const idDocumentType = (_a2 =
|
|
6113
|
+
const idDocumentType = (_a2 = idDocumentTypeOptions.find(
|
|
6980
6114
|
({ id }) => {
|
|
6981
6115
|
var _a3, _b3;
|
|
6982
6116
|
return ((_b3 = (_a3 = dataSubmitted == null ? void 0 : dataSubmitted.idVerificationMethod) == null ? void 0 : _a3.idDocument) == null ? void 0 : _b3.idDocumentType) === id;
|
|
@@ -7040,7 +6174,7 @@ function IndividualOnfidoDropin({
|
|
|
7040
6174
|
var _a3;
|
|
7041
6175
|
return ((_a3 = idDocument2.instantIdVerificationData) == null ? void 0 : _a3.document_front.type) === document.id;
|
|
7042
6176
|
}
|
|
7043
|
-
) :
|
|
6177
|
+
) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
|
|
7044
6178
|
if (!documentType) return void 0;
|
|
7045
6179
|
const frontPage = (_a2 = idDocument2.idFrontPage) == null ? void 0 : _a2[0];
|
|
7046
6180
|
const backPage = (_b2 = idDocument2.idBackPage) == null ? void 0 : _b2[0];
|
|
@@ -7117,7 +6251,7 @@ function IndividualOnfidoDropin({
|
|
|
7117
6251
|
i18n.locale
|
|
7118
6252
|
);
|
|
7119
6253
|
}
|
|
7120
|
-
if (isManualVerificationOrExistingDoc((_f2 = summaryData.idVerificationMethod) == null ? void 0 : _f2.idVerificationMethod)) {
|
|
6254
|
+
if (isManualVerificationOrExistingDoc((_f2 = summaryData.idVerificationMethod) == null ? void 0 : _f2.idVerificationMethod) || summaryData.proofOfResidency) {
|
|
7121
6255
|
const fileSummaryData = formatFileSummaryData(data);
|
|
7122
6256
|
summaryData = { ...summaryData, ...fileSummaryData };
|
|
7123
6257
|
summaryData.manualIdUpload = { ...summaryData.idDocument };
|
|
@@ -7228,93 +6362,6 @@ function IndividualOnfidoDropin({
|
|
|
7228
6362
|
}
|
|
7229
6363
|
) });
|
|
7230
6364
|
}
|
|
7231
|
-
function IndividualOuter({
|
|
7232
|
-
taskType,
|
|
7233
|
-
taskName,
|
|
7234
|
-
individualLegalEntityId,
|
|
7235
|
-
parentLegalEntityId,
|
|
7236
|
-
asModal = false,
|
|
7237
|
-
hideSidebar = false,
|
|
7238
|
-
isTargetLegalEntityType = false,
|
|
7239
|
-
onSubmit,
|
|
7240
|
-
newMember,
|
|
7241
|
-
trustedFields,
|
|
7242
|
-
trustedFieldsProvider,
|
|
7243
|
-
trustedRoles,
|
|
7244
|
-
/** below from {@link DropinProps} */
|
|
7245
|
-
handleBackClick,
|
|
7246
|
-
handleCloseClick,
|
|
7247
|
-
handleHomeClick
|
|
7248
|
-
}) {
|
|
7249
|
-
const individualLeQuery = useLegalEntity(individualLegalEntityId ?? skipToken);
|
|
7250
|
-
const parentLeQuery = useLegalEntity(parentLegalEntityId ?? skipToken);
|
|
7251
|
-
const rootLeQuery = useLegalEntity(ROOT_LE);
|
|
7252
|
-
const isLoading = individualLegalEntityId && individualLeQuery.isLoading || parentLegalEntityId && parentLeQuery.isLoading || rootLeQuery.isLoading;
|
|
7253
|
-
const capabilityProblems = useCapabilityProblems();
|
|
7254
|
-
const country = getLegalEntityCountry(
|
|
7255
|
-
individualLeQuery.data ?? parentLeQuery.data ?? rootLeQuery.data
|
|
7256
|
-
);
|
|
7257
|
-
const problems = capabilityProblems && individualLegalEntityId ? getProblemsForEntity(capabilityProblems, EntityType.LEGAL_ENTITY, individualLegalEntityId) : void 0;
|
|
7258
|
-
const trustMembers = useTrustMembers();
|
|
7259
|
-
const trustMember = newMember ?? trustMembers.find(
|
|
7260
|
-
(tm) => tm.trustMemberType !== "undefinedBeneficiary" && tm.legalEntityId === individualLegalEntityId
|
|
7261
|
-
);
|
|
7262
|
-
const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
|
|
7263
|
-
const unincorporatedPartnershipMember = newMember ?? unincorporatedPartnershipMembers.find(
|
|
7264
|
-
(member) => member.legalEntityId === individualLegalEntityId
|
|
7265
|
-
);
|
|
7266
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
7267
|
-
const isOnfidoAutofillFlow = isOnfidoAutofillFlowEnabled(country, taskType, isExperimentEnabled);
|
|
7268
|
-
if (isLoading) {
|
|
7269
|
-
return /* @__PURE__ */ jsx(Loader, {});
|
|
7270
|
-
}
|
|
7271
|
-
return isOnfidoAutofillFlow ? /* @__PURE__ */ jsx(
|
|
7272
|
-
IndividualOnfidoDropin,
|
|
7273
|
-
{
|
|
7274
|
-
taskType,
|
|
7275
|
-
legalEntityResponse: individualLeQuery.data,
|
|
7276
|
-
parentLegalEntity: parentLeQuery.data,
|
|
7277
|
-
problems,
|
|
7278
|
-
country,
|
|
7279
|
-
asModal,
|
|
7280
|
-
hideSidebar,
|
|
7281
|
-
isTargetLegalEntityType,
|
|
7282
|
-
onSubmit,
|
|
7283
|
-
trustedFields,
|
|
7284
|
-
trustedFieldsProvider,
|
|
7285
|
-
trustedRoles,
|
|
7286
|
-
taskName,
|
|
7287
|
-
handleBackClick,
|
|
7288
|
-
handleCloseClick,
|
|
7289
|
-
handleHomeClick
|
|
7290
|
-
}
|
|
7291
|
-
) : /* @__PURE__ */ jsx(
|
|
7292
|
-
IndividualDropin,
|
|
7293
|
-
{
|
|
7294
|
-
taskType,
|
|
7295
|
-
legalEntityResponse: individualLeQuery.data,
|
|
7296
|
-
parentLegalEntity: parentLeQuery.data,
|
|
7297
|
-
trustMember: trustMember ?? unincorporatedPartnershipMember,
|
|
7298
|
-
problems,
|
|
7299
|
-
country,
|
|
7300
|
-
asModal,
|
|
7301
|
-
hideSidebar,
|
|
7302
|
-
isTargetLegalEntityType,
|
|
7303
|
-
onSubmit,
|
|
7304
|
-
trustedFields,
|
|
7305
|
-
trustedFieldsProvider,
|
|
7306
|
-
trustedRoles,
|
|
7307
|
-
taskName,
|
|
7308
|
-
handleBackClick,
|
|
7309
|
-
handleCloseClick,
|
|
7310
|
-
handleHomeClick
|
|
7311
|
-
}
|
|
7312
|
-
);
|
|
7313
|
-
}
|
|
7314
|
-
const IndividualOuter$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7315
|
-
__proto__: null,
|
|
7316
|
-
IndividualOuter
|
|
7317
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
7318
6365
|
const CreateIndividualComponent = ({
|
|
7319
6366
|
legalEntityId,
|
|
7320
6367
|
onSubmitSuccess,
|
|
@@ -7325,6 +6372,9 @@ const CreateIndividualComponent = ({
|
|
|
7325
6372
|
if (!legalEntityId) {
|
|
7326
6373
|
throw new Error("Must provide a legalEntityId");
|
|
7327
6374
|
}
|
|
6375
|
+
const { data: individualLe } = useLegalEntity(legalEntityId);
|
|
6376
|
+
const capabilityProblems = useCapabilityProblems();
|
|
6377
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
7328
6378
|
const handleOnClose = () => {
|
|
7329
6379
|
if (modalView) {
|
|
7330
6380
|
onUnmount == null ? void 0 : onUnmount();
|
|
@@ -7337,62 +6387,50 @@ const CreateIndividualComponent = ({
|
|
|
7337
6387
|
}
|
|
7338
6388
|
onSubmitSuccess == null ? void 0 : onSubmitSuccess(d);
|
|
7339
6389
|
};
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
handleHomeClick: handleOnClose
|
|
7350
|
-
}
|
|
6390
|
+
if (!individualLe) {
|
|
6391
|
+
return /* @__PURE__ */ jsx(Loader, {});
|
|
6392
|
+
}
|
|
6393
|
+
const country = getLegalEntityCountry(individualLe);
|
|
6394
|
+
const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityType.LEGAL_ENTITY, individualLe.id) : void 0;
|
|
6395
|
+
const isOnfidoAutofillFlow = isOnfidoAutofillFlowEnabled(
|
|
6396
|
+
country,
|
|
6397
|
+
TaskTypes.INDIVIDUAL,
|
|
6398
|
+
isExperimentEnabled
|
|
7351
6399
|
);
|
|
6400
|
+
const props = {
|
|
6401
|
+
taskType: TaskTypes.INDIVIDUAL,
|
|
6402
|
+
taskName: "individualDetails",
|
|
6403
|
+
legalEntityResponse: individualLe,
|
|
6404
|
+
problems,
|
|
6405
|
+
country,
|
|
6406
|
+
asModal: modalView,
|
|
6407
|
+
hideSidebar: true,
|
|
6408
|
+
onSubmit,
|
|
6409
|
+
handleHomeClick: handleOnClose,
|
|
6410
|
+
handleCloseClick: handleOnClose
|
|
6411
|
+
};
|
|
6412
|
+
return isOnfidoAutofillFlow ? /* @__PURE__ */ jsx(IndividualOnfidoDropin, { ...props }) : /* @__PURE__ */ jsx(IndividualDropin, { ...props });
|
|
7352
6413
|
};
|
|
7353
6414
|
export {
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
useTrustMembers as E,
|
|
7359
|
-
FormRouterContextProvider as F,
|
|
7360
|
-
useSingpassMyInfoLogin as G,
|
|
7361
|
-
contactDetailsValidationRules as H,
|
|
7362
|
-
useValidatePhoneNumberImperatively as I,
|
|
7363
|
-
useMultiForm as J,
|
|
7364
|
-
FormContextProvider as K,
|
|
7365
|
-
FormFlow as L,
|
|
7366
|
-
getFieldsWithExistingData as M,
|
|
7367
|
-
useCapabilityProblems as N,
|
|
7368
|
-
getProblemsForEntity as O,
|
|
7369
|
-
IndividualOuter$1 as P,
|
|
6415
|
+
Confirm as C,
|
|
6416
|
+
FormContextProvider as F,
|
|
6417
|
+
IndividualOnfidoDropin as I,
|
|
6418
|
+
ProviderButton as P,
|
|
7370
6419
|
SOLE_PROP_COUNTRIES as S,
|
|
7371
6420
|
TileGroup as T,
|
|
7372
6421
|
useUpdateLegalEntity as a,
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
processValidationErrors as p,
|
|
7388
|
-
getPageName as q,
|
|
7389
|
-
createDocumentRequest as r,
|
|
7390
|
-
mapWith as s,
|
|
7391
|
-
trackNavigation as t,
|
|
7392
|
-
useCreateLegalEntity as u,
|
|
7393
|
-
documentApiUtils as v,
|
|
7394
|
-
useUnifyLoadingStatus as w,
|
|
7395
|
-
omitObscuredFieldsIfUnchanged as x,
|
|
7396
|
-
isIdDocumentUploadError as y,
|
|
7397
|
-
isBankStatementUploadError as z
|
|
6422
|
+
useCapabilityProblems as b,
|
|
6423
|
+
useSingpassMyInfoLogin as c,
|
|
6424
|
+
CreateIndividualComponent as d,
|
|
6425
|
+
contactDetailsValidationRules as e,
|
|
6426
|
+
fieldsPerScenario as f,
|
|
6427
|
+
useValidatePhoneNumberImperatively as g,
|
|
6428
|
+
useMultiForm as h,
|
|
6429
|
+
isEeaCountry as i,
|
|
6430
|
+
FormFlow as j,
|
|
6431
|
+
getProblemsForEntity as k,
|
|
6432
|
+
getFieldsWithExistingData as l,
|
|
6433
|
+
isOnfidoAutofillFlowEnabled as m,
|
|
6434
|
+
IndividualDropin as n,
|
|
6435
|
+
useCreateLegalEntity as u
|
|
7398
6436
|
};
|