@adyen/kyc-components 4.0.0-compact.8 → 4.0.0-compact.9
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/README.md +31 -43
- package/dist/{AcceptTermsOfServiceComponent-kRAMcIqz.js → AcceptTermsOfServiceComponent-Y5aYfW8R.js} +31 -26
- package/dist/{AccountSetupRejected-WvT8wynP.js → AccountSetupRejected-BBPH8zsy.js} +2 -5
- package/dist/{ActionBar-BOto3kIR.js → ActionBar-CFMobUf9.js} +2 -2
- package/dist/{Address-DfQEZqfV.js → Address-DaePmCRZ.js} +22 -25
- package/dist/{Avatar-B1FMn4jz.js → Avatar-CbD3nP3P.js} +2 -2
- package/dist/{BusinessFinancingComponent-DgeP0WtS.js → BusinessFinancingComponent-BfmzIskz.js} +7 -7
- package/dist/{BusinessFinancingDropin-BpaTs3Tb.js → BusinessFinancingDropin-CLD8LAhP.js} +199 -160
- package/dist/BusinessFinancingPage-Bg-wKhhY.js +43 -0
- package/dist/{BusinessTypeSelectionPage-CsvC5c2P.js → BusinessTypeSelectionPage-D3EIjy_H.js} +11 -17
- package/dist/{Checkbox-CQQWg0dg.js → Checkbox-DmYVTVOD.js} +2 -2
- package/dist/{Confirm-DqMkw97y.js → Confirm-NubmSSR7.js} +3 -3
- package/dist/{ConstitutionalDocument-B1vSvDTu.js → ConstitutionalDocument-Djj_JCy4.js} +43 -30
- package/dist/{ContactDetails-171etkPM.js → ContactDetails-tNdzS3d4.js} +13 -10
- package/dist/{ContextGuidance-PEl3_E1Y.js → ContextGuidance-Dp2PWG5c.js} +2 -3
- package/dist/{CountryField-61GLcHq3.js → CountryField-C7SjQFv_.js} +4 -6
- package/dist/{CreateIndividualComponent-U4BUiWzp.js → CreateIndividualComponent-DwOiAUaA.js} +8 -8
- package/dist/{CreateTransferInstrumentComponent-CHPjKshD.js → CreateTransferInstrumentComponent-D29rvuqv.js} +6 -6
- package/dist/{Currency-8vOxnPYI.js → Currency-B4udmJgX.js} +12 -18
- package/dist/{CustomerSupport-DcnFyc9J.js → CustomerSupport-CU3xoowB.js} +10 -11
- package/dist/{DebugModal-yKPZa0En.js → DebugModal-C7WSGJRZ.js} +10 -11
- package/dist/{DecisionMakerDetailsPage-bIZxlptv.js → DecisionMakerDetailsPage-C-mB9v5X.js} +10 -10
- package/dist/{DecisionMakers-rudvJ8LE.js → DecisionMakers-AhL30Hnp.js} +114 -55
- package/dist/{Dropzone-Brt8j_On.js → Dropzone-B9NMiWRF.js} +4 -4
- package/dist/{EmbeddedStatus-C6KmRWYa.js → EmbeddedStatus-DkQk7orK.js} +3 -3
- package/dist/{EndStateLayout-CNBH6HSv.js → EndStateLayout-DVisdSEd.js} +2 -2
- package/dist/{EntityAssociation-CvfmwTx0.js → EntityAssociation-BSnS5dP_.js} +5 -6
- package/dist/{EntityGuidanceStatus-DfqozWFu.js → EntityGuidanceStatus-C2eFgLqN.js} +4 -4
- package/dist/{ErrorPanel-8g7vzs2J.js → ErrorPanel-D4kO8XQ8.js} +11 -13
- package/dist/{Field-GFhXhBL7.js → Field-CPoHG0G-.js} +3 -3
- package/dist/{FormNavigation-CuO_QOlJ.js → FormNavigation-yD8USwyG.js} +3 -3
- package/dist/{Individual.rules-NmFmV4le.js → Individual.rules-0EggSgTn.js} +16 -9
- package/dist/{IndividualDropin-D_UTW3Pt.js → IndividualDropin-Eo9sxeBW.js} +692 -267
- package/dist/{InputDate-D741B4uo.js → InputDate-BVYQZZuX.js} +2 -2
- package/dist/{InputText-BstgOD1h.js → InputText-C55stM8O.js} +2 -2
- package/dist/{Introduction-586MDoqe.js → Introduction-CZ_-eIBj.js} +4 -4
- package/dist/{JpAddress-D5DwOic-.js → JpAddress-B3HjxunW.js} +12 -14
- package/dist/{LandingLayout-DfrTphbg.js → LandingLayout-C_SbjQZA.js} +2 -3
- package/dist/{LegalCompanyNameField-Z2dNj0Qq.js → LegalCompanyNameField-DBiJbXem.js} +6 -6
- package/dist/{LegalRepresentativeDetailsPage-Dkufg--B.js → LegalRepresentativeDetailsPage-DFKA0RAe.js} +6 -6
- package/dist/{Link-hYPpX6dq.js → Link-ru5UMRxt.js} +2 -2
- package/dist/{ListItem-DCNK7Kw1.js → ListItem-C6ALEoR-.js} +3 -3
- package/dist/{LoaderWrapper-Brwtj1ws.js → LoaderWrapper-BL7Hc_DC.js} +2 -2
- package/dist/{ManageIndividualComponent-HmFUwG8J.js → ManageIndividualComponent-CkybWipX.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-CEXRN-aQ.js → ManageTermsOfServiceComponent-Cgjagedl.js} +6 -6
- package/dist/{ManageTransferInstrumentComponent-BZMoocXD.js → ManageTransferInstrumentComponent-DOpxzIzn.js} +16 -18
- package/dist/{MaskedInput-D1fbApUW.js → MaskedInput-1f16YE1z.js} +5 -5
- package/dist/{MaybeModal-D1Kv1uXL.js → MaybeModal-7NGTfxO6.js} +3 -3
- package/dist/{Modal-BRPW5V15.js → Modal-BMdWqd0Y.js} +15 -25
- package/dist/{Name-DNcNeuyc.js → Name-BQWEKtu9.js} +5 -5
- package/dist/NewSummary-D-9PYaY6.js +60 -0
- package/dist/{OnboardingDropinComponent-Jp7jobVe.js → OnboardingDropinComponent-CxUcB7IU.js} +813 -121
- package/dist/{PayoutDetailsDropin-CQ8jWnhg.js → PayoutDetailsDropin-DWqomQHU.js} +81 -190
- package/dist/PayoutDetailsPage-NIBSRWDA.js +55 -0
- package/dist/{RadioGroup-BLGCNZj6.js → RadioGroup-BuAX_NLA.js} +2 -2
- package/dist/{RadioGroupCard-Dp6kxT2Z.js → RadioGroupCard-Cbd_S6Fi.js} +2 -2
- package/dist/{Review-DsexJYqW.js → Review-BjdQyMeU.js} +6 -8
- package/dist/{RootBusinessDetailsPage-W6I6u26i.js → RootBusinessDetailsPage-CE9KIQRB.js} +6 -6
- package/dist/{RootBusinessLinesPage-BfW_VGr0.js → RootBusinessLinesPage-DYZETgKB.js} +129 -139
- package/dist/{RootIndividualDetailsPage-CU0ERRgH.js → RootIndividualDetailsPage-DCEHjEbR.js} +9 -10
- package/dist/{Select-_jyQwO_g.js → Select-seF9rM5K.js} +4 -4
- package/dist/{SignPCIComponent-DqNgUb0y.js → SignPCIComponent-CkaBa8MB.js} +18 -17
- package/dist/{SingpassSelection-CInOhNfV.js → SingpassSelection-FctS_Rd2.js} +6 -6
- package/dist/{SoleProprietorshipPage-Bgg5nHmh.js → SoleProprietorshipPage-BolUC48_.js} +5 -5
- package/dist/{SourceOfFundsPage-DWz_BoML.js → SourceOfFundsPage-qPaoxTgM.js} +272 -103
- package/dist/{StepProgressIndicator-DsULqiFr.js → StepProgressIndicator-DQIv4e4a.js} +2 -2
- package/dist/{StoreProvider-DwuHWsNs.js → StoreProvider-CBB99upB.js} +1032 -292
- package/dist/{StructuredList-CVMZBzwq.js → StructuredList-EKVbq_i3.js} +1 -1
- package/dist/{Summary-BtqxXkko.js → Summary-C5uRwUKn.js} +28 -24
- package/dist/{TaxInformationField-QyHTiEoc.js → TaxInformationField-B7AVdVgf.js} +614 -634
- package/dist/{TaxReportingDropin-Cs21XUR6.js → TaxReportingDropin-C2dEK3ij.js} +15 -17
- package/dist/{TextArea-DFDjCEZ2.js → TextArea-BbRKVKmP.js} +2 -2
- package/dist/{TileGroup-6wc032O1.js → TileGroup-oKbh_YGv.js} +3 -3
- package/dist/{TrustDetailsPage-BpITz9Vt.js → TrustDetailsPage-BbQB4A5-.js} +129 -120
- package/dist/{TrustMemberCompanyPage-Web2yU9Z.js → TrustMemberCompanyPage-CbRLAXBG.js} +7 -7
- package/dist/TrustMemberIndividualPage-BFRSkSas.js +64 -0
- package/dist/{TrustMemberRoleAndTypePage-CJEVcHdE.js → TrustMemberRoleAndTypePage-pS7j8_f6.js} +35 -44
- package/dist/{TrustMembersOverview-DefELe9P.js → TrustMembersOverview-aEVgO4Gr.js} +17 -21
- package/dist/{UnincorporatedPartnershipIndividualPage-BXQiQmMN.js → UnincorporatedPartnershipIndividualPage-DO7AXsP5.js} +6 -6
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DhzsjYbl.js → UnincorporatedPartnershipMemberCompanyPage-qvOu17yc.js} +6 -6
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-OdKCGjaA.js → UnincorporatedPartnershipMemberRoleAndTypePage-reBMcz-Y.js} +15 -16
- package/dist/{UnincorporatedPartnershipMembersOverview-DSeUBGiY.js → UnincorporatedPartnershipMembersOverview-B5YCchZY.js} +8 -12
- package/dist/{VerificationErrorAlert-I8hQrG1X.js → VerificationErrorAlert-BcntIwEo.js} +23 -4
- package/dist/{ViewVerificationStatusComponent-CneXbSXW.js → ViewVerificationStatusComponent-CrQahS3p.js} +3 -4
- package/dist/adyen-business-financing.js +3 -3
- package/dist/adyen-individual-configuration.js +3 -3
- package/dist/adyen-individual-status.js +3 -3
- package/dist/adyen-invited-decision-maker.js +87 -17
- package/dist/adyen-kyc-components.js +18 -47
- package/dist/adyen-onboarding.js +3 -3
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +3 -3
- package/dist/adyen-transfer-instrument-configuration.js +3 -3
- package/dist/adyen-transfer-instrument-management.js +3 -3
- package/dist/adyen-verification-status.js +3 -3
- package/dist/{bafinUtils-u4rPfeF0.js → bafinUtils-B1LygAFl.js} +14 -2
- package/dist/{commonValidators-BWyE1hKM.js → commonValidators-CInBRB1V.js} +2 -2
- package/dist/{da-DK-JHZnsI59.js → da-DK-BfsYpvel.js} +18 -3
- package/dist/{da-DK-CGWvmdkq.js → da-DK-CLdNh9JT.js} +1 -2
- package/dist/{da-DK-gnPgzwrG.js → da-DK-CM1onr3w.js} +3 -1
- package/dist/{da-DK-Cd5IQPv3.js → da-DK-CMVthpSr.js} +2 -2
- package/dist/da-DK-Cv6XUSoW.js +13 -0
- package/dist/da-DK-D9FgPh5e.js +13 -0
- package/dist/{da-DK-h8DYQ_Iq.js → da-DK-mUuPR2YO.js} +2 -2
- package/dist/{de-DE-C9NH2zMh.js → de-DE-B5TOuf7l.js} +2 -2
- package/dist/{de-DE-DHDJhahG.js → de-DE-BT5g7ZXC.js} +1 -2
- package/dist/de-DE-BplDsJEb.js +13 -0
- package/dist/{de-DE-D3lLuF8z.js → de-DE-CA4mYLwp.js} +3 -1
- package/dist/{de-DE-VGGEkxUT.js → de-DE-CEsDXBn-.js} +18 -3
- package/dist/de-DE-Cg_RNIr-.js +13 -0
- package/dist/{de-DE-LQE_LFFL.js → de-DE-CwT6O212.js} +2 -2
- package/dist/{dropinUtils-NHYW3kj5.js → dropinUtils-D44Paj5u.js} +30 -16
- package/dist/{en-US-h0JneJJl.js → en-US--1W760fR.js} +2 -2
- package/dist/{en-US-CjjPhkB5.js → en-US-B-qSAb-7.js} +2 -1
- package/dist/en-US-B6tiYqel.js +13 -0
- package/dist/en-US-CfazE4ht.js +13 -0
- package/dist/{en-US-DoiQhi0j.js → en-US-CgakND3H.js} +1 -2
- package/dist/{en-US-D1sB335h.js → en-US-DIlZD5Wh.js} +16 -1
- package/dist/{en-US-DYP6rAvA.js → en-US-G607HIyo.js} +2 -2
- package/dist/{en-US-B96dpVon.js → en-US-fDACdKtT.js} +3 -1
- package/dist/{en-US.instructions-Ddr7AO05.js → en-US.instructions-CfIM2SRF.js} +1 -2
- package/dist/{es-ES-CxnsKEh4.js → es-ES-4FS7NoE7.js} +1 -2
- package/dist/{es-ES-CXDJLKAI.js → es-ES-BBcx4tvi.js} +3 -1
- package/dist/{es-ES-Bn9_0wK0.js → es-ES-BWFP5itn.js} +18 -3
- package/dist/es-ES-BZiC4JWr.js +13 -0
- package/dist/{es-ES-DdGmXdxO.js → es-ES-Bh8k9Zx8.js} +2 -2
- package/dist/es-ES-DRsix_Xn.js +13 -0
- package/dist/{es-ES-DK-7qtDf.js → es-ES-Wcpc6fm1.js} +2 -2
- package/dist/{fi-FI-fArobrt5.js → fi-FI-BKu826v5.js} +3 -1
- package/dist/fi-FI-BftTiz0c.js +13 -0
- package/dist/fi-FI-CEH4BfU3.js +13 -0
- package/dist/{fi-FI-PVFqd5Ra.js → fi-FI-DenK0WPz.js} +18 -3
- package/dist/{fi-FI-CIYa9SyS.js → fi-FI-DhUeTfn1.js} +2 -2
- package/dist/{fi-FI-57-xkioo.js → fi-FI-XpnJRPgt.js} +1 -2
- package/dist/{formUtils-Dg7QeiCj.js → formUtils-BEcbGHkz.js} +3 -18
- package/dist/{fr-FR-mJK4hjwD.js → fr-FR-BmTswZU5.js} +18 -3
- package/dist/fr-FR-C6jxjXAI.js +13 -0
- package/dist/{fr-FR-CiwkAb3E.js → fr-FR-C7iSS-OS.js} +3 -1
- package/dist/{fr-FR-l5z31r7i.js → fr-FR-CocDMzBc.js} +2 -2
- package/dist/{fr-FR-B2je0smB.js → fr-FR-DodNoPid.js} +2 -2
- package/dist/fr-FR-NxOktkWc.js +13 -0
- package/dist/{fr-FR-BxiX8Zfi.js → fr-FR-TqAhPvzz.js} +1 -2
- package/dist/{getName-DAC824XH.js → getName-CdgtxRvu.js} +2 -2
- package/dist/{getProblemsForEntity-Cx2uHyD0.js → getProblemsForEntity-DFP6N3co.js} +2 -2
- package/dist/{iframeWidget-DbWZPZHG.js → iframeWidget-B0fieiAe.js} +4 -4
- package/dist/{isEmpty-CzqpRnGb.js → isEmpty-3U9fSQsY.js} +2 -2
- package/dist/{it-IT-BAvmkEF8.js → it-IT-B4bk2Xev.js} +2 -2
- package/dist/{it-IT-DIbH-udG.js → it-IT-CUrn0j1I.js} +3 -1
- package/dist/it-IT-CXlaZNIj.js +13 -0
- package/dist/{it-IT-Dhwa9Ecj.js → it-IT-CZ4aDoVQ.js} +2 -2
- package/dist/{it-IT-masgjk9F.js → it-IT-D-jYXj6V.js} +1 -2
- package/dist/{it-IT-BTWkWSJq.js → it-IT-DJe5OflH.js} +18 -3
- package/dist/it-IT-OppZz3gW.js +13 -0
- package/dist/{ja-JP-vv3-YsHU.js → ja-JP-8yMqZqF2.js} +1 -2
- package/dist/ja-JP-A6ArIIZ8.js +13 -0
- package/dist/{ja-JP-Bc4U0S8-.js → ja-JP-BpeNsNhn.js} +3 -3
- package/dist/{ja-JP-bz7ekGnF.js → ja-JP-CbP1sVFP.js} +4 -2
- package/dist/ja-JP-CethQRoG.js +13 -0
- package/dist/{ja-JP-g6VOUGXZ.js → ja-JP-DK55NCZY.js} +1 -2
- package/dist/{ja-JP-CceCDXLB.js → ja-JP-GGV_-V6p.js} +18 -3
- package/dist/{ja-JP-Bv3ru9Xq.js → ja-JP-GX3l4yqn.js} +17 -17
- package/dist/{japanSupportUtils-Bn6j_2Iu.js → japanSupportUtils-CaeglTl1.js} +2 -2
- package/dist/{localizeDateString-rX5kfMAS.js → localizeDateString-D2nDwdFu.js} +2 -2
- package/dist/{mapExistingFile-euVcQ8wC.js → mapExistingFile-BigOdLU3.js} +4 -4
- package/dist/mapJpAddressSchemaToAddressLocalizations-DUoJIoRm.js +54 -0
- package/dist/{mapLegalEntityToIndividualSchema-BeggFrAo.js → mapLegalEntityToIndividualSchema-UVUkctdQ.js} +43 -45
- package/dist/{mapTransferInstrumentToPayoutAccount-DZ5tvBdP.js → mapTransferInstrumentToPayoutAccount-qpUP3sTf.js} +2 -2
- package/dist/{nl-NL-CTf7zH4M.js → nl-NL-4Mv4rnYy.js} +18 -3
- package/dist/{nl-NL-B0fvINJj.js → nl-NL-B2Uku0lw.js} +2 -2
- package/dist/nl-NL-BwWFlBOs.js +13 -0
- package/dist/nl-NL-CYFznuWn.js +13 -0
- package/dist/{nl-NL-DV4NqPVW.js → nl-NL-J7XpCpQm.js} +2 -2
- package/dist/{nl-NL-D1b5RUJ0.js → nl-NL-Jhr-ICkK.js} +1 -2
- package/dist/{nl-NL-NlkjOSYi.js → nl-NL-Lo8OF_nj.js} +3 -1
- package/dist/{no-NO-Crlsj6HG.js → no-NO-6chPsZZE.js} +3 -1
- package/dist/{no-NO-Dkh4SWbB.js → no-NO-BH6DId3q.js} +1 -2
- package/dist/no-NO-BsEie1We.js +13 -0
- package/dist/{no-NO-RfTK9KAV.js → no-NO-ByCZ3mhz.js} +18 -3
- package/dist/{no-NO-B9618F4_.js → no-NO-CtDyNTm6.js} +2 -2
- package/dist/{no-NO-Jw7Gae-a.js → no-NO-DjOcJWnC.js} +2 -2
- package/dist/no-NO-JWsSd7iY.js +13 -0
- package/dist/{patternValidators-EfBVKdNn.js → patternValidators-BkY5yvNa.js} +2 -2
- package/dist/{process-field-configurations-CAtKO6CG.js → process-field-configurations-BnIbMyYt.js} +5 -5
- package/dist/{pt-BR-BRdIEO2O.js → pt-BR-4Iozxvfr.js} +1 -2
- package/dist/pt-BR-BJOww8U1.js +13 -0
- package/dist/{pt-BR-BaTE6BB_.js → pt-BR-BKdT0Bpl.js} +2 -2
- package/dist/pt-BR-C-YbDjn-.js +13 -0
- package/dist/{pt-BR-zuqB_CBf.js → pt-BR-D4BTdo_w.js} +2 -2
- package/dist/{pt-BR-BfxgHKY4.js → pt-BR-DRBFUW-X.js} +3 -1
- package/dist/{pt-BR-BbFJsIVX.js → pt-BR-DRz5cG4o.js} +18 -3
- package/dist/{resolveEnvironment-D3grZ1cC.js → resolveEnvironment-C5RkjL5E.js} +5 -5
- package/dist/{roleMetadata-CkOicLV_.js → roleMetadata-C8VLzyMj.js} +3 -3
- package/dist/sl-SI-BfO3xEJx.js +13 -0
- package/dist/sl-SI-CJH14wbj.js +13 -0
- package/dist/{sl-SI-59OQIZ3f.js → sl-SI-C_4ajjU4.js} +2 -2
- package/dist/{sl-SI-D8dDckrW.js → sl-SI-DKSu25rO.js} +18 -3
- package/dist/{sl-SI-C-C-KJCX.js → sl-SI-UFngWs5n.js} +3 -1
- package/dist/{sl-SI-CvUzNn9Z.js → sl-SI-Y9h1ht45.js} +1 -2
- package/dist/style.css +1868 -1836
- package/dist/styles-CLV89_hH.js +1868 -1836
- package/dist/{sv-SE-D_Efxy3s.js → sv-SE-Blw4s8bC.js} +2 -2
- package/dist/sv-SE-CMLKzwtj.js +13 -0
- package/dist/{sv-SE-DGpvVvWj.js → sv-SE-Co7Nkd06.js} +18 -3
- package/dist/{sv-SE-BHfydid5.js → sv-SE-Cr0s35EH.js} +3 -1
- package/dist/{sv-SE-BsLkPEzn.js → sv-SE-DFSm22oQ.js} +1 -2
- package/dist/{sv-SE-CQWBP7n1.js → sv-SE-DKnUr7xo.js} +2 -2
- package/dist/sv-SE-ZsucW_Uj.js +13 -0
- package/dist/{isNewEntity-7Vw_eQBr.js → trusted-fields-provider-BgfIoSNJ.js} +6 -3
- package/dist/types/api/companyDataSet/companyDataset.types.d.ts +5 -0
- package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +6 -3
- package/dist/types/api/companySearch/companySearch.types.d.ts +8 -0
- package/dist/types/api/companySearch/useCompanySearch.d.ts +9 -3
- package/dist/types/api/companySelection/companySelection.types.d.ts +3 -3
- package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
- package/dist/types/api/documentValidation/useDocumentValidate.d.ts +1 -0
- package/dist/types/api/invitations/invitations.types.d.ts +14 -0
- package/dist/types/api/invitations/useCreateInvitation.d.ts +14 -0
- package/dist/types/api/invitations/useInvitationStatuses.d.ts +8 -0
- package/dist/types/api/invitedEntity/useInvitedEntityAssociationData.d.ts +9 -0
- package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +4 -4
- package/dist/types/api/queryKeys.d.ts +4 -1
- package/dist/types/api/toggles/useToggles.d.ts +9 -0
- package/dist/types/components/Apps/tasks/TaskList/types.d.ts +2 -2
- package/dist/types/components/BankAccount/fields/BankAccountNumber/BankAccountNumber.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankCode/BankCode.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BranchCode/BranchCode.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/Iban.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +2 -2
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +0 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard/VerifiedBusinessCard.d.ts +2 -2
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +7 -7
- package/dist/types/components/Business/forms/FinancialInformation/FinancialInformation.d.ts +1 -1
- package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Business/forms/FinancialInformation/types.d.ts +7 -17
- package/dist/types/components/Business/forms/rules.d.ts +10 -8
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +14 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -6
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/validate.d.ts +2 -1
- package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +1 -1
- package/dist/types/components/Business/utils/companyUtil.d.ts +1 -1
- package/dist/types/components/Business/utils/formatDataForSummary.d.ts +6 -0
- package/dist/types/components/Business/utils/submit.d.ts +2 -0
- package/dist/types/components/Business/utils/useCompanySearchExperiments.d.ts +5 -0
- package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/tasks/utils.d.ts +4 -4
- package/dist/types/components/Contract/tasks/PciDropin/PciDropin.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/types.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +2783 -2783
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +1 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSummary.d.ts +14 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +5 -7
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +8 -9
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +1 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +11 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +15 -0
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +1 -2
- package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.d.ts +1 -1
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -0
- package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +1 -1
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +2 -2
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +5 -4
- package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +2 -2
- package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +6 -6
- package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/IdVerificationMethod/{individualOnfidoConflictsSchema.d.ts → individualConflictsSchema.d.ts} +12 -12
- package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +2 -2
- package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual.d.ts +12 -7
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +6 -5
- package/dist/types/components/Individual/forms/Individual.types.d.ts +15 -5
- package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.d.ts +4 -0
- package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.types.d.ts +13 -0
- package/dist/types/components/Individual/forms/InviteDetails/validate.d.ts +3 -0
- package/dist/types/components/Individual/forms/form-ids.d.ts +2 -2
- package/dist/types/components/Individual/helpers/bafinUtils.d.ts +2 -2
- package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -2
- package/dist/types/components/Individual/helpers/roleUtils.d.ts +2 -2
- package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -6
- package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +2 -2
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +3 -3
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerListItem/DecisionMakerListItem.d.ts +8 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerGettingStarted/InvitedDecisionMakerGettingStarted.d.ts +4 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerSubmitSuccess/InvitedDecisionMakerSubmitSuccess.d.ts +1 -0
- package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
- package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -0
- package/dist/types/components/Shared/FormNavigation/types.d.ts +2 -2
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
- package/dist/types/components/Shared/NewSummary/NewSummary.d.ts +14 -0
- package/dist/types/components/Shared/Summary/Summary.d.ts +1 -0
- package/dist/types/components/Shared/TaskVerificationStatus/TaskVerificationStatus.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +0 -2
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +3 -1
- package/dist/types/components/Shared/fields/Currency/fieldConfig.d.ts +3 -0
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/FinancialReportingDate/fieldConfig.d.ts +3 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +5 -244
- package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
- package/dist/types/components/Shared/fields/NumberOfEmployees/fieldConfig.d.ts +3 -0
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -0
- package/dist/types/components/Shared/fields/ReportedValueOptionField/ReportedValueOptionField.d.ts +3 -0
- package/dist/types/components/Shared/fields/ReportedValueOptionField/fieldConfig.d.ts +5 -0
- package/dist/types/components/Shared/fields/ReportedValueOptionField/types.d.ts +10 -0
- package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.d.ts +17 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/getDefaultTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/inferTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +2 -3
- package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +232 -0
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +9 -1
- package/dist/types/components/Shared/fields/TaxInformationField/utils.d.ts +13 -0
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +5 -0
- package/dist/types/components/Shared/forms/Address/types.d.ts +5 -5
- package/dist/types/components/Shared/forms/Address/utils.d.ts +6 -1
- package/dist/types/components/Shared/forms/Address/validate.d.ts +4 -4
- package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +6 -6
- package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +2 -2
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +5 -4
- package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +2 -2
- package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +1 -1
- package/dist/types/components/Trust/utils/trustMemberGuidance.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +2 -2
- package/dist/types/components/ui/atoms/Icon/Icon.d.ts +1 -1
- package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
- package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -4
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +0 -4
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -2
- package/dist/types/components/ui/molecules/Dropzone/types.d.ts +2 -2
- package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +1 -1
- package/dist/types/context/ExperimentContext/types.d.ts +9 -7
- package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +4 -0
- package/dist/types/context/FormRouterContext/useFormRouterContext.d.ts +3 -0
- package/dist/types/context/StateContext/types.d.ts +2 -2
- package/dist/types/core/models/api/financialReport.d.ts +7 -1
- package/dist/types/core/models/api/legal-entity.d.ts +1 -6
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/core/user-events.d.ts +1 -1
- package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
- package/dist/types/hooks/useForm/types.d.ts +3 -6
- package/dist/types/hooks/useUboQuestionnaire.d.ts +1 -1
- package/dist/types/language/types.d.ts +3 -15
- package/dist/types/language/utils.d.ts +6 -5
- package/dist/types/stores/formState.d.ts +2 -2
- package/dist/types/stores/globalStore/get-task-status.d.ts +6 -0
- package/dist/types/types/errors/error-message.d.ts +2 -2
- package/dist/types/types/errors/remediation.d.ts +2 -2
- package/dist/types/types/form-configuration.d.ts +2 -2
- package/dist/types/types/form.d.ts +2 -2
- package/dist/types/utils/decisionMaker.d.ts +2 -2
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/fieldConfigurations.d.ts +6 -6
- package/dist/types/utils/formUtils.d.ts +5 -6
- package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
- package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -2
- package/dist/types/utils/not.d.ts +12 -0
- package/dist/types/utils/roleMetadata.d.ts +4 -4
- package/dist/types/utils/textTransformation/toFullWidth.d.ts +2 -3
- package/dist/types/utils/validatorUtils.d.ts +1 -0
- package/dist/types-CQ2p58-6.js +36 -0
- package/dist/{types-COOK2jmb.js → types-CcxS0801.js} +2 -2
- package/dist/{types-BveVR11j.js → types-DcouFF7I.js} +2 -2
- package/dist/{types-B7GElie6.js → types-_ugkpUNx.js} +11 -9
- package/dist/{types-DlIEfVQ_.js → types-vXKpLHZM.js} +2 -2
- package/dist/{Image-8l9eOMtL.js → unincorporated-partnership-QawJyhxx.js} +8 -7
- package/dist/{useAssociatedLegalEntity-BMeOu2ox.js → useAssociatedLegalEntity-DXp9udzH.js} +2 -2
- package/dist/{useBusinessDetailsData-CAiFFs88.js → useBusinessDetailsData-CgfVRRNG.js} +1090 -917
- package/dist/{useCreateLegalEntity-BzRbiLpn.js → useCreateLegalEntity-C5daQcez.js} +2 -2
- package/dist/{useForm-De1DLL-w.js → useForm-BQDytQRR.js} +3 -3
- package/dist/{useFormContext-BPBBPKhK.js → useFormContext-CX6rQNws.js} +9 -8
- package/dist/{FormWrapper-MyJZP-4s.js → useGlobalData-xVRfhIqc.js} +66 -11
- package/dist/{useMultiForm-Cs0-iUXR.js → useMultiForm-DRZSxmEa.js} +12 -6
- package/dist/{useOnboardingStatus-DeOWI7wU.js → useOnboardingStatus-C6X8CPF2.js} +2 -2
- package/dist/{useScenarios-BE647UZ3.js → useScenarios-C5uruC52.js} +2 -2
- package/dist/{useTermsOfServiceStatus-uSdmiCT3.js → useTermsOfServiceStatus-CABu0vXO.js} +2 -2
- package/dist/{useToastContext-B1vl-x5N.js → useToastContext-C2BAjZxO.js} +2 -2
- package/dist/{useUnincorporatedPartnershipMembers-D7WsY1Dm.js → useUnincorporatedPartnershipMembers-Duhfzca2.js} +5 -5
- package/dist/{useUpdateBusinessLines-CdYUvjtv.js → useUpdateBusinessLines-CFgADcSW.js} +5 -5
- package/dist/{useUpdateLegalEntity-3og4ank0.js → useUpdateLegalEntity-vK1vTzAB.js} +3 -3
- package/dist/{utils-Ds83U_vM.js → utils-Bh3VtXaW.js} +55 -22
- package/dist/{utils-CXUBcmhg.js → utils-Bo1WrnnM.js} +6 -6
- package/dist/{utils-CHdXRuoO.js → utils-BvFIL5qs.js} +22 -2
- package/dist/{utils-CK72-tJC.js → utils-HUgTKRia.js} +2 -2
- package/dist/{utils-CYscdqdR.js → utils-nUjUW0ze.js} +2 -2
- package/dist/{validate-TM7n49em.js → validate-CDGLD3wC.js} +24 -12
- package/dist/{validate-CoZiS4Ny.js → validate-DDCTmBf4.js} +5 -5
- package/dist/{validationError-DozI7J9X.js → validationError-DmAD3_AN.js} +3 -3
- package/package.json +35 -53
- package/dist/Accordion-s3uIJ_O9.js +0 -88
- package/dist/Alert-_9nVl6uE.js +0 -169
- package/dist/BusinessFinancingPage-qodSYGAB.js +0 -43
- package/dist/DropinLayout-CBP_cHLC.js +0 -17
- package/dist/Header-B9Tv_mvA.js +0 -83
- package/dist/TaskVerificationStatus-DQVG3_xF.js +0 -129
- package/dist/TrustMemberIndividualPage-tBGM6dM8.js +0 -64
- package/dist/accountHolderUtils-CPiTlzkl.js +0 -66
- package/dist/company-types-value-D_mKv5PT.js +0 -23
- package/dist/da-DK-DvZ431fC.js +0 -13
- package/dist/da-DK-DzcTI92X.js +0 -13
- package/dist/datasetUtil-BHQp0-xL.js +0 -58
- package/dist/de-DE-0uSzhWg5.js +0 -13
- package/dist/de-DE-dPfrbCii.js +0 -13
- package/dist/en-US-CozY33On.js +0 -13
- package/dist/en-US-cVpRgdC8.js +0 -13
- package/dist/es-ES--IvNed_Q.js +0 -13
- package/dist/es-ES-B7dt4cn7.js +0 -13
- package/dist/fi-FI-BUixKfXH.js +0 -13
- package/dist/fi-FI-REMsyTSr.js +0 -13
- package/dist/filterProblemsByTaskForms-Cz7iQtms.js +0 -30
- package/dist/fr-FR-BM-qNLci.js +0 -13
- package/dist/fr-FR-CvHWmim-.js +0 -13
- package/dist/getTrustedFields-C5-mXl-l.js +0 -64
- package/dist/it-IT-BeX7-OcD.js +0 -13
- package/dist/it-IT-D63gRTDc.js +0 -13
- package/dist/ja-JP-B3wVYIJU.js +0 -151
- package/dist/ja-JP-DL0IjTzn.js +0 -13
- package/dist/mapJpAddressSchemaToAddressLocalizations-A0yOTAyr.js +0 -162
- package/dist/nl-NL-CM5U8ODq.js +0 -13
- package/dist/nl-NL-KQ6bciOb.js +0 -13
- package/dist/no-NO-BQL_M1pn.js +0 -13
- package/dist/no-NO-Ds3VioxT.js +0 -13
- package/dist/pt-BR-AZ3roErF.js +0 -13
- package/dist/pt-BR-Ct4s4jXV.js +0 -13
- package/dist/sl-SI-C0wSbuau.js +0 -13
- package/dist/sl-SI-hxwQIw_i.js +0 -13
- package/dist/sv-SE-0PQ-U1u6.js +0 -13
- package/dist/sv-SE-DtKjf4Go.js +0 -13
- package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +0 -23
- package/dist/unincorporated-partnership-MeN1dp53.js +0 -97
- package/dist/useBusinessLines-DG-LapFA.js +0 -29
- package/dist/useCanSeeIntroduction-DJUYy5a5.js +0 -48
- package/dist/useDataMissingRemediations-x7yza9Ka.js +0 -41
- package/dist/useDataset-CDtTEXqi.js +0 -76
- package/dist/useDeleteTransferInstrument-S3FmBm7Z.js +0 -32
- package/dist/useGlobalData-DemxVumJ.js +0 -68
- package/dist/useNavigate-DdA-YVRy.js +0 -265
- package/dist/usePciQuestionnaireList-rxdFFrP5.js +0 -29
- package/dist/useSalesChannels-CI133F-6.js +0 -65
- package/dist/useSetting-BkKRHr6e.js +0 -19
- package/dist/useTaskStatus-DdTyBvAb.js +0 -51
- package/dist/useTrustMembers-BOp5wFXa.js +0 -163
- /package/dist/types/components/{Business/forms/FinancialInformation → Shared/fields/ReportedValueOptionField}/ReportedValue.d.ts +0 -0
|
@@ -2,74 +2,74 @@
|
|
|
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] = "e9a9982e-2a56-484c-ba13-8ce9c7cca44b", e._sentryDebugIdIdentifier = "sentry-dbid-e9a9982e-2a56-484c-ba13-8ce9c7cca44b");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { jsxs,
|
|
10
|
+
import { jsxs, jsx, Fragment } from "preact/jsx-runtime";
|
|
11
11
|
import { Show } from "@preact/signals/utils";
|
|
12
12
|
import { useMutation, useQuery, skipToken, useQueryClient } from "@tanstack/preact-query";
|
|
13
13
|
import { useState, useRef, useCallback, useEffect, useMemo } from "preact/hooks";
|
|
14
|
-
import { u as useScenarios } from "./useScenarios-
|
|
15
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-
|
|
16
|
-
import { b as useApiContext,
|
|
17
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
18
|
-
import { a as addressValidators, A as Address, u as useProviderStatus } from "./Address-
|
|
19
|
-
import { c as contactDetailsValidationRules, a as contactDetailFields, C as ContactDetails, u as useValidatePhoneNumberImperatively,
|
|
20
|
-
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-
|
|
21
|
-
import { u as useToastContext } from "./useToastContext-
|
|
22
|
-
import { g as getPropsFromConfigurations, c as composePerScenarioFormConfigurations } from "./process-field-configurations-
|
|
23
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-
|
|
24
|
-
import { u as useMultiForm } from "./useMultiForm-
|
|
25
|
-
import { u as uppercase, D as DocumentGuidance, m as mapExistingFile, g as getPageName, a as getPage, b as useScenarioConfiguration } from "./mapExistingFile-
|
|
14
|
+
import { u as useScenarios } from "./useScenarios-C5uruC52.js";
|
|
15
|
+
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-C5daQcez.js";
|
|
16
|
+
import { b as useApiContext, h as httpPost, aa as CountryCodes, aC as matchesRegex, aD as NO_ALPHABET_REGEX, aE as EMOJI_REGEX, aF as hasRepeatedCharacters, aG as isInvalidName, aH as INDIVIDUAL_VALID_CHAR_REGEX, ax as isEmpty, y as TaskTypes, L as LegalEntityTypes, aI as getAgeToday, aJ as euCountries, aK as hasText, aL as standardKatakanaValidator, aM as standardKanjiValidator, j as httpGet, u as useTranslation, W as Button, G as Alert, V as Loader, as as DecisionMakerTypes, at as Scenarios, O as Typography, ac as translateTranslatable, ap as useDataset, aq as datasetIdentifier, aN as useAllowedCountries, k as useSettingsContext, J as useExperimentsContext, aB as Header, aO as getAgeRangeForLegalRepresentative, aP as isLegalRepresentativeNeeded, aQ as Trans, aR as valuesOf, aS as keysOf, ah as objectsDeepEqual, aT as listToRecord, aU as pick, m as createLogger, C as IconButton, z as useAnalyticsContext, am as datasetUtilities, aV as useCapabilities, aW as individualApiKeyMapping, aX as drop, v as useAccountHolder, a9 as getLegalEntityCountry, aY as getAllowedDecisionMakerRoles, aZ as filterOutUnwantedAssociationsIfRootLE, an as cloneObject, a_ as individualDocumentMapping, a$ as individualObscuredFields, ad as getOwnEntityAssociations, b0 as hasNomineesChanged, b1 as attachNomineeToRole, b2 as doArraysMatch } from "./StoreProvider-CBB99upB.js";
|
|
17
|
+
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-vK1vTzAB.js";
|
|
18
|
+
import { a as addressValidators, A as Address, u as useProviderStatus } from "./Address-DaePmCRZ.js";
|
|
19
|
+
import { c as contactDetailsValidationRules, a as contactDetailFields, C as ContactDetails, d as defaultFieldMetadata$1, f as fieldConfig, P as PhoneField, g as getPhonePlaceholder, u as useValidatePhoneNumberImperatively, b as getAsyncPhoneValidationRules } from "./ContactDetails-tNdzS3d4.js";
|
|
20
|
+
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-CX6rQNws.js";
|
|
21
|
+
import { u as useToastContext } from "./useToastContext-C2BAjZxO.js";
|
|
22
|
+
import { g as getPropsFromConfigurations, c as composePerScenarioFormConfigurations } from "./process-field-configurations-BnIbMyYt.js";
|
|
23
|
+
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-D44Paj5u.js";
|
|
24
|
+
import { u as useMultiForm } from "./useMultiForm-DRZSxmEa.js";
|
|
25
|
+
import { u as uppercase, D as DocumentGuidance, m as mapExistingFile, g as getPageName, a as getPage, b as useScenarioConfiguration } from "./mapExistingFile-BigOdLU3.js";
|
|
26
26
|
import { J as JP_ADDRESS_REQUIRED_FIELDS } from "./jpAddressSchema-DEOyz9Yo.js";
|
|
27
|
-
import {
|
|
28
|
-
import { b as addressFields, a as getAddressSchemaLabelsByCountry, C as COUNTRIES_WITH_STATES_DATASET, m as mapAddressLabels } from "./utils-
|
|
29
|
-
import { G as GuidanceQuestionValues, a as GuidanceQuestion, g as getOnfidoIdentityTypeToApiIdentityTypeMap, i as individualFormDefaultData, m as
|
|
30
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-
|
|
31
|
-
import { g as getIdDocument, a as getDocument, c as createDocumentRequest, d as documentApiUtils, m as mergeAttachments, b as getFileExtention } from "./validate-
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { v as validatePatternOnBlur } from "./patternValidators-EfBVKdNn.js";
|
|
27
|
+
import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
|
|
28
|
+
import { b as addressFields, a as getAddressSchemaLabelsByCountry, C as COUNTRIES_WITH_STATES_DATASET, m as mapAddressLabels } from "./utils-BvFIL5qs.js";
|
|
29
|
+
import { G as GuidanceQuestionValues, a as GuidanceQuestion, g as getOnfidoIdentityTypeToApiIdentityTypeMap, i as individualFormDefaultData, m as mapLegalEntityToIndividualSchema } from "./mapLegalEntityToIndividualSchema-UVUkctdQ.js";
|
|
30
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-DmAD3_AN.js";
|
|
31
|
+
import { g as getIdDocument, a as getDocument, c as createDocumentRequest, d as documentApiUtils, m as mergeAttachments, b as getFileExtention } from "./validate-DDCTmBf4.js";
|
|
32
|
+
import { t as taxInformationDefaultFieldMetadata, a as taxInformationDefaultFieldConfig, i as individualIdNumberOptions, b as additionallIdNumberOptions, T as TaxInformationField, M as MemoizedDocumentUpload, c as taxIdNumberOptions, g as getFieldsWithExistingData } from "./TaxInformationField-B7AVdVgf.js";
|
|
33
|
+
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-CaeglTl1.js";
|
|
34
|
+
import { l as localizeDateString } from "./localizeDateString-D2nDwdFu.js";
|
|
35
|
+
import { I as IFrameWidget, o as omitObscuredFieldsIfUnchanged } from "./iframeWidget-B0fieiAe.js";
|
|
36
|
+
import { m as makeMask, n as numericInputs, a as nonInputs, b as alphaInputs, c as customInputs, s as spacer, d as alphanumericInputs, M as MaskedInput, I as InputEmail } from "./MaskedInput-1f16YE1z.js";
|
|
37
|
+
import { v as validatePatternOnBlur } from "./patternValidators-BkY5yvNa.js";
|
|
39
38
|
import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
|
|
40
|
-
import { g as getLocalizedIdDocumentTypeOptions } from "./utils-
|
|
39
|
+
import { g as getLocalizedIdDocumentTypeOptions } from "./utils-HUgTKRia.js";
|
|
41
40
|
import { lazy, Suspense, memo } from "preact/compat";
|
|
42
|
-
import { I as Image
|
|
43
|
-
import { M as Modal } from "./Modal-
|
|
44
|
-
import { L as LandingLayout } from "./LandingLayout-
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import { a as
|
|
48
|
-
import { b as idNowModalChildEntityId, a as idNowPostSubmit, s as showIdNowModal, c as shouldShowIdNowModal } from "./bafinUtils-u4rPfeF0.js";
|
|
41
|
+
import { I as Image } from "./unincorporated-partnership-QawJyhxx.js";
|
|
42
|
+
import { M as Modal } from "./Modal-BMdWqd0Y.js";
|
|
43
|
+
import { L as LandingLayout } from "./LandingLayout-C_SbjQZA.js";
|
|
44
|
+
import { C as Confirm } from "./Confirm-NubmSSR7.js";
|
|
45
|
+
import { a as getIndividualLegalEntityName } from "./getName-CdgtxRvu.js";
|
|
46
|
+
import { b as idNowModalChildEntityId, a as idNowPostSubmit, s as showIdNowModal, c as shouldShowIdNowModal } from "./bafinUtils-B1LygAFl.js";
|
|
49
47
|
import { signal } from "@preact/signals";
|
|
50
|
-
import { E as ErrorPanel, u as useFormRouterContext } from "./ErrorPanel-
|
|
48
|
+
import { E as ErrorPanel, u as useFormRouterContext } from "./ErrorPanel-D4kO8XQ8.js";
|
|
51
49
|
import { g as getFieldProps, a as getFormProps } from "./getProps-Cc3J2-z9.js";
|
|
52
|
-
import { F as Field } from "./Field-
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import { I as
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import { D as Dropzone } from "./Dropzone-
|
|
69
|
-
import { i as isEmpty$1 } from "./isEmpty-
|
|
50
|
+
import { F as Field } from "./Field-CPoHG0G-.js";
|
|
51
|
+
import { L as Link } from "./Link-ru5UMRxt.js";
|
|
52
|
+
import { S as SettingNames } from "./types-CQ2p58-6.js";
|
|
53
|
+
import { I as InputDate, f as formatDateObj } from "./InputDate-BVYQZZuX.js";
|
|
54
|
+
import { I as InputText } from "./InputText-C55stM8O.js";
|
|
55
|
+
import { C as CountryField } from "./CountryField-C7SjQFv_.js";
|
|
56
|
+
import { R as RadioGroup, a as RadioWithLabel } from "./RadioGroup-BuAX_NLA.js";
|
|
57
|
+
import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-BEcbGHkz.js";
|
|
58
|
+
import { C as Checkbox } from "./Checkbox-DmYVTVOD.js";
|
|
59
|
+
import { S as Select } from "./Select-seF9rM5K.js";
|
|
60
|
+
import { C as ContextGuidance } from "./ContextGuidance-Dp2PWG5c.js";
|
|
61
|
+
import { C as COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES, i as individualRules, D as DECISION_MAKER_TYPES_WITH_JOBTITLE } from "./Individual.rules-0EggSgTn.js";
|
|
62
|
+
import { i as isTruthyValidator } from "./commonValidators-CInBRB1V.js";
|
|
63
|
+
import { T as TrustedFieldsProviders } from "./trusted-fields-provider-BgfIoSNJ.js";
|
|
64
|
+
import { n as nameFields, N as Name } from "./Name-BQWEKtu9.js";
|
|
65
|
+
import { t as toFullWidth, m as mapJpAddressSchemaToAddressLocalizations } from "./mapJpAddressSchemaToAddressLocalizations-DUoJIoRm.js";
|
|
66
|
+
import { D as Dropzone } from "./Dropzone-B9NMiWRF.js";
|
|
67
|
+
import { i as isEmpty$1 } from "./isEmpty-3U9fSQsY.js";
|
|
70
68
|
import { Onfido } from "onfido-sdk-ui";
|
|
71
|
-
import { L as LoaderWrapper } from "./LoaderWrapper-
|
|
69
|
+
import { L as LoaderWrapper } from "./LoaderWrapper-BL7Hc_DC.js";
|
|
72
70
|
import { S as Spacer } from "./Spacer-BK3jDget.js";
|
|
71
|
+
import { T as TextArea } from "./TextArea-BbRKVKmP.js";
|
|
72
|
+
import { e as emailPattern } from "./basePatterns-BwdnMQxI.js";
|
|
73
73
|
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
74
74
|
import { m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
75
75
|
const verifyIdNumber = async (legalEntityId, baseUrl, data) => {
|
|
@@ -114,6 +114,59 @@ const useIdVerificationStartCheck = (options) => {
|
|
|
114
114
|
...options
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
|
+
const createInvitation = async (baseUrl, organizationLegalEntityId, inviteeLegalEntityId, data) => {
|
|
118
|
+
return httpPost(
|
|
119
|
+
{
|
|
120
|
+
baseUrl,
|
|
121
|
+
path: `legalEntities/${organizationLegalEntityId}/invitations/associations/${inviteeLegalEntityId}`
|
|
122
|
+
},
|
|
123
|
+
data
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
const useCreateInvitation = (options) => {
|
|
127
|
+
const { baseUrl } = useApiContext();
|
|
128
|
+
return useMutation({
|
|
129
|
+
mutationFn: ({
|
|
130
|
+
organizationLegalEntityId,
|
|
131
|
+
inviteeLegalEntityId,
|
|
132
|
+
data
|
|
133
|
+
}) => {
|
|
134
|
+
return createInvitation(baseUrl.value, organizationLegalEntityId, inviteeLegalEntityId, data);
|
|
135
|
+
},
|
|
136
|
+
...options
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
const mapJpAddressSummary = (data, datasetUtils) => {
|
|
140
|
+
if (!data) return {};
|
|
141
|
+
return {
|
|
142
|
+
country: datasetUtils.getCountryName("JP") ?? "JP",
|
|
143
|
+
postalCode: summaryItem("postalCode", data.postalCode),
|
|
144
|
+
stateOrProvince: summaryItem(
|
|
145
|
+
"prefecture",
|
|
146
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
147
|
+
/* @__PURE__ */ jsx("p", { children: data.jaHaniStateOrProvince }),
|
|
148
|
+
/* @__PURE__ */ jsx("p", { children: data.jaKanaStateOrProvince }),
|
|
149
|
+
/* @__PURE__ */ jsx("p", { children: data.stateOrProvince })
|
|
150
|
+
] })
|
|
151
|
+
),
|
|
152
|
+
city: summaryItem(
|
|
153
|
+
"districtTownAreaCityWard",
|
|
154
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
155
|
+
/* @__PURE__ */ jsx("p", { children: data.jaHaniCity }),
|
|
156
|
+
/* @__PURE__ */ jsx("p", { children: data.jaKanaCity }),
|
|
157
|
+
/* @__PURE__ */ jsx("p", { children: data.city })
|
|
158
|
+
] })
|
|
159
|
+
),
|
|
160
|
+
otherAddressInformation: summaryItem("chomeAndBanchi", data.otherAddressInformation),
|
|
161
|
+
address: summaryItem(
|
|
162
|
+
"buildingNameFloorRoomNumberEtc",
|
|
163
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
164
|
+
/* @__PURE__ */ jsx("p", { children: data.jaHaniAddress }),
|
|
165
|
+
/* @__PURE__ */ jsx("p", { children: data.address })
|
|
166
|
+
] })
|
|
167
|
+
)
|
|
168
|
+
};
|
|
169
|
+
};
|
|
117
170
|
const customerSupportPresubmitProcess = (legalEntityResponse, legalEntityToSubmit) => {
|
|
118
171
|
if (legalEntityResponse.type === "individual") {
|
|
119
172
|
return processCustomerSupportForIndividual(legalEntityResponse, legalEntityToSubmit);
|
|
@@ -792,7 +845,7 @@ const additionalPersonalDetailsValidators = ({
|
|
|
792
845
|
idNumber,
|
|
793
846
|
existingIdNumber,
|
|
794
847
|
formVerificationErrors,
|
|
795
|
-
|
|
848
|
+
t,
|
|
796
849
|
taxIdNumberType
|
|
797
850
|
}) => ({
|
|
798
851
|
taxInformation: resolveFieldMetadata(
|
|
@@ -834,7 +887,7 @@ const additionalPersonalDetailsValidators = ({
|
|
|
834
887
|
...addressValidators({
|
|
835
888
|
isExperimentEnabled,
|
|
836
889
|
country,
|
|
837
|
-
|
|
890
|
+
t
|
|
838
891
|
})
|
|
839
892
|
});
|
|
840
893
|
const localizedNameValidationRulesV4 = (isExperimentEnabled = () => false, country) => {
|
|
@@ -1077,7 +1130,7 @@ const IdNowVerificationModal = ({ handleFinish }) => {
|
|
|
1077
1130
|
size: page === 2 ? "large" : "medium",
|
|
1078
1131
|
showCloseButton: !isLoading && !isStatusLoading,
|
|
1079
1132
|
onClose: handleDismiss,
|
|
1080
|
-
ariaLabel: t(($) => $["identityVerification"]
|
|
1133
|
+
ariaLabel: t(($) => $["identityVerification"]),
|
|
1081
1134
|
children: [
|
|
1082
1135
|
page === 1 && /* @__PURE__ */ jsx("div", { className: styles$4.idnowHeader, children: /* @__PURE__ */ jsx(
|
|
1083
1136
|
LandingLayout,
|
|
@@ -1089,7 +1142,7 @@ const IdNowVerificationModal = ({ handleFinish }) => {
|
|
|
1089
1142
|
lazyLoadedImage: passportFrontGreenImage$1
|
|
1090
1143
|
}
|
|
1091
1144
|
),
|
|
1092
|
-
title: t(($) => $["identityVerification"]
|
|
1145
|
+
title: t(($) => $["identityVerification"]),
|
|
1093
1146
|
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1094
1147
|
t(($) => $["idNowDescription"], { ns: "individual" }),
|
|
1095
1148
|
/* @__PURE__ */ jsx("br", {}),
|
|
@@ -1266,9 +1319,9 @@ function IdentityNumber(props) {
|
|
|
1266
1319
|
if (!handleFieldChange) {
|
|
1267
1320
|
return;
|
|
1268
1321
|
}
|
|
1269
|
-
const
|
|
1322
|
+
const fieldConfig2 = propFieldConfig ?? defaultFieldConfig;
|
|
1270
1323
|
const metadata = resolveFieldMetadata(
|
|
1271
|
-
|
|
1324
|
+
fieldConfig2[country],
|
|
1272
1325
|
{ idNumberType },
|
|
1273
1326
|
defaultFieldMetadata
|
|
1274
1327
|
);
|
|
@@ -1296,7 +1349,7 @@ function IdentityNumber(props) {
|
|
|
1296
1349
|
name: "idNumber",
|
|
1297
1350
|
type: "text",
|
|
1298
1351
|
label: formUtils.getLabel("idNumber", "idNumber"),
|
|
1299
|
-
formatGuidance:
|
|
1352
|
+
formatGuidance: translateTranslatable(t, metadata.guidanceText),
|
|
1300
1353
|
errorMessage,
|
|
1301
1354
|
shouldValidate: errors?.idNumber?.hasError,
|
|
1302
1355
|
isValid: !!valid?.idNumber,
|
|
@@ -1338,9 +1391,11 @@ const DriversLicense = ({
|
|
|
1338
1391
|
formUtils,
|
|
1339
1392
|
isValid,
|
|
1340
1393
|
errorMessages,
|
|
1394
|
+
guidanceText,
|
|
1341
1395
|
shouldValidate
|
|
1342
1396
|
}) => {
|
|
1343
|
-
const {
|
|
1397
|
+
const { t: commonT } = useTranslation("common");
|
|
1398
|
+
const { t: individualT } = useTranslation("individual");
|
|
1344
1399
|
const { dataset: auStates } = useDataset(datasetIdentifier.state("AU"));
|
|
1345
1400
|
const isCountryAustralia = country === CountryCodes.Australia;
|
|
1346
1401
|
const isCountryNewZealand = country === CountryCodes.NewZealand;
|
|
@@ -1360,7 +1415,7 @@ const DriversLicense = ({
|
|
|
1360
1415
|
onChange: onIssuerStateChange,
|
|
1361
1416
|
isInvalid: false,
|
|
1362
1417
|
items: auStates,
|
|
1363
|
-
placeholder:
|
|
1418
|
+
placeholder: commonT(($) => $["selectState"]),
|
|
1364
1419
|
selected: driversLicense.issuerState
|
|
1365
1420
|
}
|
|
1366
1421
|
)
|
|
@@ -1373,7 +1428,7 @@ const DriversLicense = ({
|
|
|
1373
1428
|
name: "idNumber",
|
|
1374
1429
|
type: "text",
|
|
1375
1430
|
label: formUtils.getLabel("idNumber", "idNumber"),
|
|
1376
|
-
formatGuidance:
|
|
1431
|
+
formatGuidance: guidanceText.idNumber,
|
|
1377
1432
|
errorMessage: errorMessages.idNumber,
|
|
1378
1433
|
shouldValidate,
|
|
1379
1434
|
isValid: Boolean(isValid.idNumber),
|
|
@@ -1393,7 +1448,7 @@ const DriversLicense = ({
|
|
|
1393
1448
|
name: "licenseCardNumber",
|
|
1394
1449
|
type: "text",
|
|
1395
1450
|
label: formUtils.getLabel("licenseCardNumber", "licenseCardNumber"),
|
|
1396
|
-
formatGuidance:
|
|
1451
|
+
formatGuidance: guidanceText.licenseCardNumber,
|
|
1397
1452
|
errorMessage: errorMessages.licenseCardNumber,
|
|
1398
1453
|
shouldValidate,
|
|
1399
1454
|
isValid: Boolean(isValid.licenseCardNumber),
|
|
@@ -1411,14 +1466,14 @@ const DriversLicense = ({
|
|
|
1411
1466
|
(isCountryAustralia || isCountryNewZealand) && /* @__PURE__ */ jsx(
|
|
1412
1467
|
ContextGuidance,
|
|
1413
1468
|
{
|
|
1414
|
-
title:
|
|
1469
|
+
title: individualT(($) => $["whereCanIFindTheseNumbersOnMyDriversLicense"]),
|
|
1415
1470
|
content: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1416
|
-
isCountryAustralia ? `${
|
|
1471
|
+
isCountryAustralia ? `${individualT(($) => $["whereToFindNumbersOnDriversLicense"])} ` : `${individualT(($) => $["whereToFindNumbersOnDriversLicense__NZ"])} `,
|
|
1417
1472
|
/* @__PURE__ */ jsx(
|
|
1418
1473
|
Link,
|
|
1419
1474
|
{
|
|
1420
1475
|
href: isCountryAustralia ? "https://www.usi.gov.au/about/forms-id/drivers-licence" : "https://www.nzta.govt.nz/driver-licences/getting-a-licence/your-driver-licence-explained/",
|
|
1421
|
-
children:
|
|
1476
|
+
children: individualT(($) => $["iStillCantFindIt"])
|
|
1422
1477
|
}
|
|
1423
1478
|
)
|
|
1424
1479
|
] }),
|
|
@@ -1436,7 +1491,7 @@ const TypeOfIdentity = ({
|
|
|
1436
1491
|
errorMessage,
|
|
1437
1492
|
isValid
|
|
1438
1493
|
}) => {
|
|
1439
|
-
const {
|
|
1494
|
+
const { t } = useTranslation(["common", "individual"]);
|
|
1440
1495
|
return /* @__PURE__ */ jsx(
|
|
1441
1496
|
Field,
|
|
1442
1497
|
{
|
|
@@ -1444,7 +1499,7 @@ const TypeOfIdentity = ({
|
|
|
1444
1499
|
label,
|
|
1445
1500
|
errorMessage,
|
|
1446
1501
|
isValid,
|
|
1447
|
-
helper:
|
|
1502
|
+
helper: t(($) => $["typeOfIdentitySubtitle"], { ns: "individual" }),
|
|
1448
1503
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1449
1504
|
Select,
|
|
1450
1505
|
{
|
|
@@ -1453,9 +1508,9 @@ const TypeOfIdentity = ({
|
|
|
1453
1508
|
isInvalid: false,
|
|
1454
1509
|
items: availableIdentityTypesOptions.map(({ id, name }) => ({
|
|
1455
1510
|
id,
|
|
1456
|
-
name:
|
|
1511
|
+
name: t(($) => $[name])
|
|
1457
1512
|
})),
|
|
1458
|
-
placeholder:
|
|
1513
|
+
placeholder: t(($) => $["selectOne"]),
|
|
1459
1514
|
selected: selectedIdentityType,
|
|
1460
1515
|
onChange: (event) => setSelectedIdentityType(event.target.value)
|
|
1461
1516
|
}
|
|
@@ -1509,17 +1564,21 @@ function Identity(props) {
|
|
|
1509
1564
|
requiredFields
|
|
1510
1565
|
};
|
|
1511
1566
|
}, [country, validators, labels, obscuredFields, readOnlyFields, optionalFields, requiredFields]);
|
|
1512
|
-
const licenseCardNumberMetaData =
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1567
|
+
const licenseCardNumberMetaData = useMemo(() => {
|
|
1568
|
+
return resolveFieldMetadata(
|
|
1569
|
+
licenseCardNumberDefaultConfig[country],
|
|
1570
|
+
{},
|
|
1571
|
+
licenseCardNumberDefaultMetadata
|
|
1572
|
+
);
|
|
1573
|
+
}, [country]);
|
|
1574
|
+
const idNumberMetadata = useMemo(() => {
|
|
1575
|
+
return resolveFieldMetadata(
|
|
1519
1576
|
defaultFieldConfig[country],
|
|
1520
1577
|
{ idNumberType: data?.typeOfIdentity },
|
|
1521
1578
|
defaultFieldMetadata
|
|
1522
1579
|
);
|
|
1580
|
+
}, [country, data?.typeOfIdentity]);
|
|
1581
|
+
const mergedProps = useMemo(() => {
|
|
1523
1582
|
return mergeFieldMetadataIntoProps(
|
|
1524
1583
|
"idNumber",
|
|
1525
1584
|
idNumberMetadata,
|
|
@@ -1529,7 +1588,7 @@ function Identity(props) {
|
|
|
1529
1588
|
initialFormUtilProps
|
|
1530
1589
|
)
|
|
1531
1590
|
);
|
|
1532
|
-
}, [
|
|
1591
|
+
}, [idNumberMetadata, initialFormUtilProps, licenseCardNumberMetaData]);
|
|
1533
1592
|
const { t } = useTranslation("common");
|
|
1534
1593
|
const formUtils = useMemo(() => createFormUtils(mergedProps, t), [mergedProps, t]);
|
|
1535
1594
|
const { form } = useFormContext();
|
|
@@ -1580,7 +1639,7 @@ function Identity(props) {
|
|
|
1580
1639
|
name: "idNumber",
|
|
1581
1640
|
type: "text",
|
|
1582
1641
|
label: formUtils.getLabel("idNumber", "idNumber"),
|
|
1583
|
-
formatGuidance:
|
|
1642
|
+
formatGuidance: translateTranslatable(t, idNumberMetadata.guidanceText),
|
|
1584
1643
|
errorMessage: formUtils.getErrorMessage("idNumber", errors, fieldValidationErrors),
|
|
1585
1644
|
shouldValidate,
|
|
1586
1645
|
isValid: Boolean(valid?.idNumber),
|
|
@@ -1635,6 +1694,10 @@ function Identity(props) {
|
|
|
1635
1694
|
licenseCardNumber: Boolean(valid?.licenseCardNumber),
|
|
1636
1695
|
issuerState: Boolean(valid?.issuerState)
|
|
1637
1696
|
},
|
|
1697
|
+
guidanceText: {
|
|
1698
|
+
idNumber: translateTranslatable(t, idNumberMetadata.guidanceText),
|
|
1699
|
+
licenseCardNumber: translateTranslatable(t, licenseCardNumberMetaData.guidanceText)
|
|
1700
|
+
},
|
|
1638
1701
|
errorMessages: {
|
|
1639
1702
|
idNumber: formUtils.getErrorMessage("idNumber", errors, fieldValidationErrors),
|
|
1640
1703
|
licenseCardNumber: formUtils.getErrorMessage(
|
|
@@ -1653,7 +1716,7 @@ function Identity(props) {
|
|
|
1653
1716
|
name: "idNumber",
|
|
1654
1717
|
type: "text",
|
|
1655
1718
|
label: formUtils.getLabel("idNumber", "idNumber"),
|
|
1656
|
-
formatGuidance:
|
|
1719
|
+
formatGuidance: translateTranslatable(t, idNumberMetadata.guidanceText),
|
|
1657
1720
|
errorMessage: formUtils.getErrorMessage("idNumber", errors, fieldValidationErrors),
|
|
1658
1721
|
shouldValidate,
|
|
1659
1722
|
isValid: Boolean(valid?.idNumber),
|
|
@@ -1686,7 +1749,7 @@ const additionalIdentityInfoFields = [
|
|
|
1686
1749
|
"expiryDate"
|
|
1687
1750
|
];
|
|
1688
1751
|
const LazyJpAddress = lazy(
|
|
1689
|
-
async () => (await import("./JpAddress-
|
|
1752
|
+
async () => (await import("./JpAddress-B3HjxunW.js")).JpAddress
|
|
1690
1753
|
);
|
|
1691
1754
|
const additionalPersonalDetailsFields = [
|
|
1692
1755
|
"birthDate",
|
|
@@ -1896,7 +1959,6 @@ function AdditionalPersonalDetails(props) {
|
|
|
1896
1959
|
},
|
|
1897
1960
|
labels: formUtils.getFieldLabels(["taxInformation"]),
|
|
1898
1961
|
mask: formUtils.getMask("taxInformation"),
|
|
1899
|
-
guidanceText: formUtils.getFieldGuidanceText(["taxInformation"]),
|
|
1900
1962
|
readonly: formUtils.isReadOnly("taxInformation"),
|
|
1901
1963
|
shouldValidate,
|
|
1902
1964
|
handleChangeFor: handleFieldChange,
|
|
@@ -2007,14 +2069,14 @@ const LocalizedNameFields = (props) => {
|
|
|
2007
2069
|
name: "jaHaniLastName",
|
|
2008
2070
|
label: "jaHaniLastName",
|
|
2009
2071
|
isValid: jaHaniNameProps.valid?.jaHaniLastName,
|
|
2010
|
-
transformInput:
|
|
2072
|
+
transformInput: toFullWidth,
|
|
2011
2073
|
transformMode: "blur"
|
|
2012
2074
|
},
|
|
2013
2075
|
{
|
|
2014
2076
|
name: "jaHaniFirstName",
|
|
2015
2077
|
label: "jaHaniFirstName",
|
|
2016
2078
|
isValid: jaHaniNameProps.valid?.jaHaniFirstName,
|
|
2017
|
-
transformInput:
|
|
2079
|
+
transformInput: toFullWidth,
|
|
2018
2080
|
transformMode: "blur"
|
|
2019
2081
|
}
|
|
2020
2082
|
],
|
|
@@ -2034,14 +2096,14 @@ const LocalizedNameFields = (props) => {
|
|
|
2034
2096
|
name: "jaKanaLastName",
|
|
2035
2097
|
label: "jaKanaLastName",
|
|
2036
2098
|
isValid: jaKanaNameProps.valid?.jaKanaLastName,
|
|
2037
|
-
transformInput:
|
|
2099
|
+
transformInput: toFullWidth,
|
|
2038
2100
|
transformMode: "blur"
|
|
2039
2101
|
},
|
|
2040
2102
|
{
|
|
2041
2103
|
name: "jaKanaFirstName",
|
|
2042
2104
|
label: "jaKanaFirstName",
|
|
2043
2105
|
isValid: jaKanaNameProps.valid?.jaKanaFirstName,
|
|
2044
|
-
transformInput:
|
|
2106
|
+
transformInput: toFullWidth,
|
|
2045
2107
|
transformMode: "blur"
|
|
2046
2108
|
}
|
|
2047
2109
|
],
|
|
@@ -2098,8 +2160,8 @@ const basicDetailsFields = [
|
|
|
2098
2160
|
"jaKanaLastName"
|
|
2099
2161
|
];
|
|
2100
2162
|
function BasicDetails(props) {
|
|
2101
|
-
const { t } = useTranslation("common");
|
|
2102
|
-
const {
|
|
2163
|
+
const { t: commonT } = useTranslation("common");
|
|
2164
|
+
const { t: individualT } = useTranslation("individual");
|
|
2103
2165
|
const {
|
|
2104
2166
|
form: { triggerValidation }
|
|
2105
2167
|
} = useFormContext();
|
|
@@ -2118,7 +2180,7 @@ function BasicDetails(props) {
|
|
|
2118
2180
|
handleFieldChange
|
|
2119
2181
|
} = props;
|
|
2120
2182
|
const isLegalRepresentativeDetailsTask = taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS;
|
|
2121
|
-
const formUtils = createFormUtils(props,
|
|
2183
|
+
const formUtils = createFormUtils(props, commonT);
|
|
2122
2184
|
const localizedNameProps = getFieldProps(props, [
|
|
2123
2185
|
"jaHaniFirstName",
|
|
2124
2186
|
"jaHaniLastName",
|
|
@@ -2145,26 +2207,23 @@ function BasicDetails(props) {
|
|
|
2145
2207
|
Alert,
|
|
2146
2208
|
{
|
|
2147
2209
|
variant: "info",
|
|
2148
|
-
title:
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
firstName: parentLegalEntity?.individual?.name.firstName || "",
|
|
2152
|
-
lastName: parentLegalEntity?.individual?.name.lastName || ""
|
|
2153
|
-
}
|
|
2210
|
+
title: individualT(($) => $["legalRepresentativeFor"], {
|
|
2211
|
+
firstName: parentLegalEntity?.individual?.name.firstName || "",
|
|
2212
|
+
lastName: parentLegalEntity?.individual?.name.lastName || ""
|
|
2154
2213
|
})
|
|
2155
2214
|
}
|
|
2156
2215
|
),
|
|
2157
2216
|
/* @__PURE__ */ jsx(
|
|
2158
2217
|
ContextGuidance,
|
|
2159
2218
|
{
|
|
2160
|
-
title:
|
|
2161
|
-
content:
|
|
2219
|
+
title: commonT(($) => $["whyDoINeedToFillInThisInformation"]),
|
|
2220
|
+
content: individualT(($) => $["reasonForFillingIndividualPersonalDetails"]),
|
|
2162
2221
|
titleId: "whyDoINeedToFillInThisInformation",
|
|
2163
2222
|
contentId: "reasonForFillingIndividualPersonalDetails"
|
|
2164
2223
|
}
|
|
2165
2224
|
),
|
|
2166
|
-
isDecisionMakerTask(taskType) && trustedFieldsProvider === TrustedFieldsProviders.SINGPASS && readOnlyFields && /* @__PURE__ */ jsx(Typography, { color: "secondary", variant: "caption", children:
|
|
2167
|
-
"weSelectedSomeRolesBasedOnMyinfoBusinessDataAboutYourCompanysAppointmentHoldersAndShareholders"
|
|
2225
|
+
isDecisionMakerTask(taskType) && trustedFieldsProvider === TrustedFieldsProviders.SINGPASS && readOnlyFields && /* @__PURE__ */ jsx(Typography, { color: "secondary", variant: "caption", children: individualT(
|
|
2226
|
+
($) => $["weSelectedSomeRolesBasedOnMyinfoBusinessDataAboutYourCompanysAppointmentHoldersAndShareholders"]
|
|
2168
2227
|
) }),
|
|
2169
2228
|
/* @__PURE__ */ jsx(
|
|
2170
2229
|
LocalizedNameFields,
|
|
@@ -2436,7 +2495,7 @@ const ConflictRow = ({
|
|
|
2436
2495
|
onSelect,
|
|
2437
2496
|
showAs
|
|
2438
2497
|
}) => {
|
|
2439
|
-
const {
|
|
2498
|
+
const { t } = useTranslation("common");
|
|
2440
2499
|
const hasOnlyProvided = !isEmpty$1(provided) && isEmpty$1(detected);
|
|
2441
2500
|
const hasOnlyDetected = isEmpty$1(provided) && !isEmpty$1(detected);
|
|
2442
2501
|
useEffect(() => {
|
|
@@ -2449,7 +2508,7 @@ const ConflictRow = ({
|
|
|
2449
2508
|
}, [hasOnlyProvided, hasOnlyDetected, onSelect, selected]);
|
|
2450
2509
|
if (hasOnlyProvided || hasOnlyDetected) return;
|
|
2451
2510
|
return showAs === "listItem" ? /* @__PURE__ */ jsxs("div", { className: styles$3.conflictRowList, children: [
|
|
2452
|
-
/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children:
|
|
2511
|
+
/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: t(($) => $[label]) }) }),
|
|
2453
2512
|
/* @__PURE__ */ jsxs("dd", { children: [
|
|
2454
2513
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2455
2514
|
/* @__PURE__ */ jsx(
|
|
@@ -2458,7 +2517,7 @@ const ConflictRow = ({
|
|
|
2458
2517
|
variant: "caption",
|
|
2459
2518
|
color: "tertiary",
|
|
2460
2519
|
className: styles$3.conflictRowListOptionLabel,
|
|
2461
|
-
children:
|
|
2520
|
+
children: t(($) => $["youEntered"])
|
|
2462
2521
|
}
|
|
2463
2522
|
),
|
|
2464
2523
|
/* @__PURE__ */ jsx(
|
|
@@ -2478,7 +2537,7 @@ const ConflictRow = ({
|
|
|
2478
2537
|
variant: "caption",
|
|
2479
2538
|
color: "tertiary",
|
|
2480
2539
|
className: styles$3.conflictRowListOptionLabel,
|
|
2481
|
-
children:
|
|
2540
|
+
children: t(($) => $["weDetected"])
|
|
2482
2541
|
}
|
|
2483
2542
|
),
|
|
2484
2543
|
/* @__PURE__ */ jsx(
|
|
@@ -2493,7 +2552,7 @@ const ConflictRow = ({
|
|
|
2493
2552
|
] })
|
|
2494
2553
|
] })
|
|
2495
2554
|
] }) : /* @__PURE__ */ jsxs("tr", { className: styles$3.conflictRowTable, children: [
|
|
2496
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children:
|
|
2555
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: t(($) => $[label]) }) }),
|
|
2497
2556
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
2498
2557
|
RadioWithLabel,
|
|
2499
2558
|
{
|
|
@@ -2534,7 +2593,7 @@ const DataConflictsModal = ({
|
|
|
2534
2593
|
onContinue,
|
|
2535
2594
|
onCancel
|
|
2536
2595
|
}) => {
|
|
2537
|
-
const {
|
|
2596
|
+
const { t: individualT } = useTranslation("individual");
|
|
2538
2597
|
const [showCancelModal, setShowCancelModal] = useState(false);
|
|
2539
2598
|
const [showError, setShowError] = useState(false);
|
|
2540
2599
|
const conflictItems = useMemo(
|
|
@@ -2558,13 +2617,19 @@ const DataConflictsModal = ({
|
|
|
2558
2617
|
[]
|
|
2559
2618
|
// No dependencies, as setShowError and setResolutions are stable.
|
|
2560
2619
|
);
|
|
2561
|
-
return /* @__PURE__ */ jsxs(Modal, { ariaLabel:
|
|
2620
|
+
return /* @__PURE__ */ jsxs(Modal, { ariaLabel: individualT(($) => $[title]), onClose: () => setShowCancelModal(true), inset: true, children: [
|
|
2562
2621
|
/* @__PURE__ */ jsxs("div", { className: styles$2.dataConflictsWrapper, children: [
|
|
2563
2622
|
/* @__PURE__ */ jsxs("div", { className: styles$2.dataConflictsHeader, children: [
|
|
2564
|
-
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h1", children:
|
|
2565
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", children:
|
|
2623
|
+
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h1", children: individualT(($) => $[title]) }),
|
|
2624
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", children: individualT(($) => $[explanation]) })
|
|
2566
2625
|
] }),
|
|
2567
|
-
showError ? /* @__PURE__ */ jsx(
|
|
2626
|
+
showError ? /* @__PURE__ */ jsx(
|
|
2627
|
+
Alert,
|
|
2628
|
+
{
|
|
2629
|
+
variant: "error",
|
|
2630
|
+
title: individualT(($) => $["chooseTheCorrectDetailsBeforeProceeding"])
|
|
2631
|
+
}
|
|
2632
|
+
) : void 0,
|
|
2568
2633
|
/* @__PURE__ */ jsx("dl", { className: styles$2.dataConflictsList, children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
|
|
2569
2634
|
ConflictRow,
|
|
2570
2635
|
{
|
|
@@ -2581,8 +2646,8 @@ const DataConflictsModal = ({
|
|
|
2581
2646
|
/* @__PURE__ */ jsxs("table", { className: styles$2.dataConflictsTable, children: [
|
|
2582
2647
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
2583
2648
|
/* @__PURE__ */ jsx("th", {}),
|
|
2584
|
-
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children:
|
|
2585
|
-
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children:
|
|
2649
|
+
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: individualT(($) => $["youEntered"]) }) }),
|
|
2650
|
+
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: individualT(($) => $["weDetected"]) }) })
|
|
2586
2651
|
] }) }),
|
|
2587
2652
|
/* @__PURE__ */ jsx("tbody", { children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
|
|
2588
2653
|
ConflictRow,
|
|
@@ -2618,16 +2683,16 @@ const DataConflictsModal = ({
|
|
|
2618
2683
|
};
|
|
2619
2684
|
onContinue(finalData);
|
|
2620
2685
|
},
|
|
2621
|
-
children:
|
|
2686
|
+
children: individualT(($) => $["confirmSelection"])
|
|
2622
2687
|
}
|
|
2623
2688
|
)
|
|
2624
2689
|
] }),
|
|
2625
2690
|
showCancelModal && /* @__PURE__ */ jsx(
|
|
2626
2691
|
Confirm,
|
|
2627
2692
|
{
|
|
2628
|
-
title:
|
|
2629
|
-
confirmText:
|
|
2630
|
-
description:
|
|
2693
|
+
title: individualT(($) => $["leaveInstantVerification"]),
|
|
2694
|
+
confirmText: individualT(($) => $["leaveVerification"]),
|
|
2695
|
+
description: individualT(($) => $["anyInformationFromTheUploadedDocumentWillBeLost"]),
|
|
2631
2696
|
onConfirm: onCancel,
|
|
2632
2697
|
onCancel: () => setShowCancelModal(false),
|
|
2633
2698
|
critical: false
|
|
@@ -2639,7 +2704,7 @@ const verificationHeaderImage = "adyen-kyc-verification-header-image";
|
|
|
2639
2704
|
const styles$1 = {
|
|
2640
2705
|
verificationHeaderImage
|
|
2641
2706
|
};
|
|
2642
|
-
const
|
|
2707
|
+
const toIndividualConflictSchema = ({
|
|
2643
2708
|
basicDetails,
|
|
2644
2709
|
additionalPersonalDetails
|
|
2645
2710
|
}) => {
|
|
@@ -2668,7 +2733,7 @@ const toIndividualOnfidoConflictSchema = ({
|
|
|
2668
2733
|
expiryDate: additionalPersonalDetails?.expiryDate
|
|
2669
2734
|
};
|
|
2670
2735
|
};
|
|
2671
|
-
const
|
|
2736
|
+
const fromIndividualConflictSchema = ({
|
|
2672
2737
|
firstName,
|
|
2673
2738
|
lastName,
|
|
2674
2739
|
email,
|
|
@@ -2799,26 +2864,27 @@ const useIdVerificationToken = ({ firstName, lastName, residencyCountry }, legal
|
|
|
2799
2864
|
});
|
|
2800
2865
|
};
|
|
2801
2866
|
const containerId = "adyen-kyc-id-verification";
|
|
2802
|
-
const getOnfidoLocaleConfig = (
|
|
2803
|
-
const language =
|
|
2867
|
+
const getOnfidoLocaleConfig = (locale, t) => {
|
|
2868
|
+
const language = locale.substring(0, 2);
|
|
2804
2869
|
return language === "en" ? {
|
|
2805
2870
|
locale: language,
|
|
2806
2871
|
phrases: {
|
|
2807
|
-
"country_select.button_primary":
|
|
2808
|
-
"doc_submit.title_id_back":
|
|
2809
|
-
"doc_submit.title_id_front":
|
|
2810
|
-
"doc_submit.title_license_back":
|
|
2811
|
-
"doc_submit.title_license_front":
|
|
2812
|
-
"doc_submit.title_passport":
|
|
2813
|
-
"doc_submit.title_permit_back":
|
|
2814
|
-
"doc_submit.title_permit_front":
|
|
2872
|
+
"country_select.button_primary": t(($) => $["continue"]),
|
|
2873
|
+
"doc_submit.title_id_back": t(($) => $["identityCardBack"]),
|
|
2874
|
+
"doc_submit.title_id_front": t(($) => $["identityCardFront"]),
|
|
2875
|
+
"doc_submit.title_license_back": t(($) => $["drivinglicenseBack"]),
|
|
2876
|
+
"doc_submit.title_license_front": t(($) => $["drivinglicenseFront"]),
|
|
2877
|
+
"doc_submit.title_passport": t(($) => $["passportPhotoPage"]),
|
|
2878
|
+
"doc_submit.title_permit_back": t(($) => $["residencePermitBack"]),
|
|
2879
|
+
"doc_submit.title_permit_front": t(($) => $["residencePermitFront"])
|
|
2815
2880
|
}
|
|
2816
2881
|
} : language;
|
|
2817
2882
|
};
|
|
2818
2883
|
const initOnfido = async ({
|
|
2819
2884
|
containerEl,
|
|
2820
2885
|
token,
|
|
2821
|
-
|
|
2886
|
+
t,
|
|
2887
|
+
locale,
|
|
2822
2888
|
onIdVerificationComplete,
|
|
2823
2889
|
onIdVerificationError,
|
|
2824
2890
|
showMotionCapture
|
|
@@ -2844,7 +2910,7 @@ const initOnfido = async ({
|
|
|
2844
2910
|
onComplete: onIdVerificationComplete,
|
|
2845
2911
|
onError: onIdVerificationError,
|
|
2846
2912
|
steps,
|
|
2847
|
-
language: getOnfidoLocaleConfig(
|
|
2913
|
+
language: getOnfidoLocaleConfig(locale, t)
|
|
2848
2914
|
});
|
|
2849
2915
|
};
|
|
2850
2916
|
const logger$3 = createLogger();
|
|
@@ -2855,7 +2921,7 @@ function IdVerification({
|
|
|
2855
2921
|
onIdVerificationComplete
|
|
2856
2922
|
}) {
|
|
2857
2923
|
const containerRef = useRef(null);
|
|
2858
|
-
const { i18n } =
|
|
2924
|
+
const { t, i18n } = useTranslation("individual");
|
|
2859
2925
|
const {
|
|
2860
2926
|
data: tokenResponse,
|
|
2861
2927
|
isLoading,
|
|
@@ -2871,10 +2937,10 @@ function IdVerification({
|
|
|
2871
2937
|
onfidoSdk.current = await initOnfido({
|
|
2872
2938
|
containerEl: containerRef.current,
|
|
2873
2939
|
token: sdkToken,
|
|
2874
|
-
|
|
2940
|
+
t,
|
|
2941
|
+
locale: i18n.language,
|
|
2875
2942
|
onIdVerificationError,
|
|
2876
2943
|
onIdVerificationComplete,
|
|
2877
|
-
language: getOnfidoLocaleConfig(i18n),
|
|
2878
2944
|
showMotionCapture: showIndividualMotionCapture.value
|
|
2879
2945
|
});
|
|
2880
2946
|
})().catch(logger$3.error);
|
|
@@ -2897,8 +2963,8 @@ const OnfidoVerificationModal = ({
|
|
|
2897
2963
|
onError,
|
|
2898
2964
|
onComplete
|
|
2899
2965
|
}) => {
|
|
2900
|
-
const {
|
|
2901
|
-
return /* @__PURE__ */ jsx(Modal, { size: "medium", onClose: closeModal, ariaLabel:
|
|
2966
|
+
const { t } = useTranslation("individual");
|
|
2967
|
+
return /* @__PURE__ */ jsx(Modal, { size: "medium", onClose: closeModal, ariaLabel: t(($) => $["identityVerification"]), children: minimumApplicantDetails && /* @__PURE__ */ jsx(
|
|
2902
2968
|
IdVerification,
|
|
2903
2969
|
{
|
|
2904
2970
|
minimumApplicantDetails,
|
|
@@ -2913,16 +2979,14 @@ const styles = {
|
|
|
2913
2979
|
uploadedDocument
|
|
2914
2980
|
};
|
|
2915
2981
|
const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
|
|
2916
|
-
const { i18n } =
|
|
2982
|
+
const { t, i18n } = useTranslation("common");
|
|
2917
2983
|
return /* @__PURE__ */ jsxs("article", { className: styles.uploadedDocument, children: [
|
|
2918
2984
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2919
|
-
/* @__PURE__ */ jsx(Typography, { el: "h4", variant: "title", children:
|
|
2920
|
-
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children:
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
}) ?? ""
|
|
2925
|
-
}
|
|
2985
|
+
/* @__PURE__ */ jsx(Typography, { el: "h4", variant: "title", children: t(($) => $[document2.idDocumentType]) }),
|
|
2986
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["uploadedOn"], {
|
|
2987
|
+
date: localizeDateString(document2.modificationDate, i18n.language, {
|
|
2988
|
+
month: "short"
|
|
2989
|
+
}) ?? ""
|
|
2926
2990
|
}) })
|
|
2927
2991
|
] }),
|
|
2928
2992
|
/* @__PURE__ */ jsx(Spacer, {}),
|
|
@@ -2932,10 +2996,10 @@ const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
|
|
|
2932
2996
|
onClick: onDelete,
|
|
2933
2997
|
icon: "bin",
|
|
2934
2998
|
variant: "secondary",
|
|
2935
|
-
ariaLabel:
|
|
2999
|
+
ariaLabel: t(($) => $["delete"])
|
|
2936
3000
|
}
|
|
2937
3001
|
),
|
|
2938
|
-
/* @__PURE__ */ jsx(Button, { onClick: onUpdate, variant: "secondary", children:
|
|
3002
|
+
/* @__PURE__ */ jsx(Button, { onClick: onUpdate, variant: "secondary", children: t(($) => $["update"]) })
|
|
2939
3003
|
] });
|
|
2940
3004
|
};
|
|
2941
3005
|
const validateExtractionResult = (extractionResult) => {
|
|
@@ -2973,7 +3037,7 @@ function IdVerificationMethod(props) {
|
|
|
2973
3037
|
fieldValidationErrors,
|
|
2974
3038
|
hasLiveSelfieErrorCode
|
|
2975
3039
|
} = props;
|
|
2976
|
-
const { t, i18n } = useTranslation(
|
|
3040
|
+
const { t: individualT, i18n } = useTranslation("individual");
|
|
2977
3041
|
const { t: commonT } = useTranslation("common");
|
|
2978
3042
|
const userEvents = useAnalyticsContext();
|
|
2979
3043
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
@@ -3012,9 +3076,9 @@ function IdVerificationMethod(props) {
|
|
|
3012
3076
|
() => ocrExtractedData ? mapExtractionResultToSchema(ocrExtractedData, restrictCountryOfResidenceTo) : void 0,
|
|
3013
3077
|
[ocrExtractedData, restrictCountryOfResidenceTo]
|
|
3014
3078
|
);
|
|
3015
|
-
const comparableExistingData = useMemo(() =>
|
|
3079
|
+
const comparableExistingData = useMemo(() => toIndividualConflictSchema(data), [data]);
|
|
3016
3080
|
const comparableExtractedData = useMemo(
|
|
3017
|
-
() => extractedData ?
|
|
3081
|
+
() => extractedData ? toIndividualConflictSchema(extractedData) : void 0,
|
|
3018
3082
|
[extractedData]
|
|
3019
3083
|
);
|
|
3020
3084
|
const conflictRules = useMemo(
|
|
@@ -3024,7 +3088,7 @@ function IdVerificationMethod(props) {
|
|
|
3024
3088
|
[datasetUtils]
|
|
3025
3089
|
);
|
|
3026
3090
|
const onAutoResolve = (resolvedData2) => {
|
|
3027
|
-
const resolvedSchema =
|
|
3091
|
+
const resolvedSchema = fromIndividualConflictSchema(resolvedData2);
|
|
3028
3092
|
setFormData("basicDetails", { ...data.basicDetails, ...resolvedSchema.basicDetails });
|
|
3029
3093
|
setFormData("additionalPersonalDetails", resolvedSchema.additionalPersonalDetails);
|
|
3030
3094
|
setOcrExtractedData(void 0);
|
|
@@ -3041,7 +3105,8 @@ function IdVerificationMethod(props) {
|
|
|
3041
3105
|
lastName: data.basicDetails?.lastName,
|
|
3042
3106
|
residencyCountry: data.additionalPersonalDetails?.country
|
|
3043
3107
|
};
|
|
3044
|
-
const
|
|
3108
|
+
const { registerFieldAction, unregisterFieldAction } = useFormRouterContext();
|
|
3109
|
+
const launchOnfido = useCallback(() => {
|
|
3045
3110
|
clearError();
|
|
3046
3111
|
userEvents.addPageEvent("Clicked button", {
|
|
3047
3112
|
actionType: "add",
|
|
@@ -3050,7 +3115,13 @@ function IdVerificationMethod(props) {
|
|
|
3050
3115
|
});
|
|
3051
3116
|
setStatus("onfidoModal");
|
|
3052
3117
|
handleFieldChange("idVerificationMethod")("instantVerification");
|
|
3053
|
-
};
|
|
3118
|
+
}, [userEvents, handleFieldChange]);
|
|
3119
|
+
useEffect(() => {
|
|
3120
|
+
if (hasLiveSelfieErrorCode) {
|
|
3121
|
+
registerFieldAction("idDocument", launchOnfido);
|
|
3122
|
+
return () => unregisterFieldAction("idDocument");
|
|
3123
|
+
}
|
|
3124
|
+
}, [registerFieldAction, unregisterFieldAction, launchOnfido, hasLiveSelfieErrorCode]);
|
|
3054
3125
|
const handleOnfidoComplete = async (onfidoResult) => {
|
|
3055
3126
|
clearError();
|
|
3056
3127
|
setShowLoadingSpinner(true);
|
|
@@ -3106,7 +3177,7 @@ function IdVerificationMethod(props) {
|
|
|
3106
3177
|
setStatus("ready");
|
|
3107
3178
|
};
|
|
3108
3179
|
const handleDataConflictsResolved = (resolved) => {
|
|
3109
|
-
const resolvedSchema =
|
|
3180
|
+
const resolvedSchema = fromIndividualConflictSchema(resolved);
|
|
3110
3181
|
setFormData("basicDetails", { ...data.basicDetails, ...resolvedSchema.basicDetails });
|
|
3111
3182
|
setFormData("additionalPersonalDetails", resolvedSchema.additionalPersonalDetails);
|
|
3112
3183
|
setOcrExtractedData(void 0);
|
|
@@ -3194,8 +3265,8 @@ function IdVerificationMethod(props) {
|
|
|
3194
3265
|
lazyLoadedImage: passportFrontGreenImage
|
|
3195
3266
|
}
|
|
3196
3267
|
),
|
|
3197
|
-
title:
|
|
3198
|
-
description: showIndividualMotionCapture?.value ?
|
|
3268
|
+
title: individualT(($) => $["identityVerification"]),
|
|
3269
|
+
description: showIndividualMotionCapture?.value ? individualT(($) => $["toHelpProtectAgainstFraudAndKeepOurServices"]) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3199
3270
|
commonT(($) => $["takeOrUploadAPhoto"]),
|
|
3200
3271
|
" ",
|
|
3201
3272
|
/* @__PURE__ */ jsx(Link, { href: "https://onfido.com", external: true, inline: true, children: commonT(($) => $["onfido"]) })
|
|
@@ -3218,7 +3289,7 @@ function IdVerificationMethod(props) {
|
|
|
3218
3289
|
children: commonT(($) => $["startVerification"])
|
|
3219
3290
|
}
|
|
3220
3291
|
),
|
|
3221
|
-
isExperimentEnabled("EnableVerifyByInvite") && isDecisionMakerTask(taskType) && /* @__PURE__ */ jsx(Button, { onClick: handleVerifyByInvite, variant: "secondary", fullWidth: true, children:
|
|
3292
|
+
isExperimentEnabled("EnableVerifyByInvite") && isDecisionMakerTask(taskType) && /* @__PURE__ */ jsx(Button, { onClick: handleVerifyByInvite, variant: "secondary", fullWidth: true, children: individualT(($) => $["verifyByInvite"]) }),
|
|
3222
3293
|
!showIndividualMotionCapture?.value && /* @__PURE__ */ jsx(
|
|
3223
3294
|
Button,
|
|
3224
3295
|
{
|
|
@@ -3240,9 +3311,9 @@ function IdVerificationMethod(props) {
|
|
|
3240
3311
|
disclaimer: (
|
|
3241
3312
|
// TODO - replace with Trans component
|
|
3242
3313
|
!doesUserHaveExistingDocument && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3243
|
-
|
|
3314
|
+
individualT(($) => $["byContinuingToUseThisService"]),
|
|
3244
3315
|
" ",
|
|
3245
|
-
/* @__PURE__ */ jsx(Link, { href: "https://onfido.com/facial-scan-policy-and-release/", external: true, inline: true, children:
|
|
3316
|
+
/* @__PURE__ */ jsx(Link, { href: "https://onfido.com/facial-scan-policy-and-release/", external: true, inline: true, children: individualT(($) => $["onfidoFacialScanPolicy"]) }),
|
|
3246
3317
|
" ",
|
|
3247
3318
|
/* @__PURE__ */ jsx(Link, { href: "https://onfido.com/privacy/", external: true, inline: true, children: commonT(($) => $["privacyPolicy"]) }),
|
|
3248
3319
|
" ",
|
|
@@ -3267,18 +3338,18 @@ function IdVerificationMethod(props) {
|
|
|
3267
3338
|
status === "confirmManualFlowModal" && /* @__PURE__ */ jsx(
|
|
3268
3339
|
Confirm,
|
|
3269
3340
|
{
|
|
3270
|
-
title:
|
|
3271
|
-
description:
|
|
3341
|
+
title: individualT(($) => $["addDetailsManuallyQuestion"]),
|
|
3342
|
+
description: individualT(($) => $["itCanTakeUpTo"]),
|
|
3272
3343
|
onCancel: handleCancelAddDetailsManually,
|
|
3273
|
-
confirmText:
|
|
3344
|
+
confirmText: individualT(($) => $["yesAddManually"]),
|
|
3274
3345
|
onConfirm: handleContinueViaManualEntryFlow
|
|
3275
3346
|
}
|
|
3276
3347
|
),
|
|
3277
3348
|
status === "confirmDeleteDocumentModal" && /* @__PURE__ */ jsx(
|
|
3278
3349
|
Confirm,
|
|
3279
3350
|
{
|
|
3280
|
-
title:
|
|
3281
|
-
description:
|
|
3351
|
+
title: individualT(($) => $["deleteIdDocument"]),
|
|
3352
|
+
description: individualT(($) => $["youMayBeAskedToReUpload"]),
|
|
3282
3353
|
confirmText: commonT(($) => $["deleteDocument"]),
|
|
3283
3354
|
onCancel: handleCancelDeleteDocument,
|
|
3284
3355
|
onConfirm: handleDeleteDocument,
|
|
@@ -3306,6 +3377,190 @@ function IdVerificationMethod(props) {
|
|
|
3306
3377
|
) : void 0
|
|
3307
3378
|
] });
|
|
3308
3379
|
}
|
|
3380
|
+
const validateSenderNameNotEmpty = {
|
|
3381
|
+
modes: ["blur"],
|
|
3382
|
+
validate: (senderName) => !isEmpty(senderName),
|
|
3383
|
+
errorMessage: "fieldIsRequired"
|
|
3384
|
+
};
|
|
3385
|
+
const v4NameRules = nameValidationRulesV4.firstName ?? [];
|
|
3386
|
+
const senderNameRules = Array.isArray(v4NameRules) ? v4NameRules : [v4NameRules];
|
|
3387
|
+
const validateMessageNotEmpty = {
|
|
3388
|
+
modes: ["blur"],
|
|
3389
|
+
validate: (message) => !isEmpty(message),
|
|
3390
|
+
errorMessage: "fieldIsRequired"
|
|
3391
|
+
};
|
|
3392
|
+
const validateEmailNotEmpty = {
|
|
3393
|
+
modes: ["blur"],
|
|
3394
|
+
validate: (email) => !isEmpty(email),
|
|
3395
|
+
errorMessage: "fieldIsRequired"
|
|
3396
|
+
};
|
|
3397
|
+
const validateEmailFormat = {
|
|
3398
|
+
modes: ["blur"],
|
|
3399
|
+
validate: (email) => email ? emailPattern.test(email) : true,
|
|
3400
|
+
errorMessage: "invalidEmail"
|
|
3401
|
+
};
|
|
3402
|
+
const validatePhoneNotEmpty = {
|
|
3403
|
+
modes: ["blur"],
|
|
3404
|
+
validate: (phone) => !isEmpty(phone?.number),
|
|
3405
|
+
errorMessage: "fieldIsRequired"
|
|
3406
|
+
};
|
|
3407
|
+
const inviteDetailsValidators = {
|
|
3408
|
+
senderName: [validateSenderNameNotEmpty, ...senderNameRules],
|
|
3409
|
+
message: [validateMessageNotEmpty],
|
|
3410
|
+
email: [validateEmailNotEmpty, validateEmailFormat],
|
|
3411
|
+
phoneNumber: [validatePhoneNotEmpty]
|
|
3412
|
+
};
|
|
3413
|
+
const inviteDetailsFields = [
|
|
3414
|
+
"senderName",
|
|
3415
|
+
"message",
|
|
3416
|
+
"email",
|
|
3417
|
+
"phoneNumber"
|
|
3418
|
+
];
|
|
3419
|
+
function InviteDetails(props) {
|
|
3420
|
+
const { t } = useTranslation("individual");
|
|
3421
|
+
const { t: commonT } = useTranslation("common");
|
|
3422
|
+
const {
|
|
3423
|
+
form: { data: formData, handleChangeFor: handleBasicDetailsChangeFor }
|
|
3424
|
+
} = useFormContext();
|
|
3425
|
+
const {
|
|
3426
|
+
country,
|
|
3427
|
+
data,
|
|
3428
|
+
errors = {},
|
|
3429
|
+
fieldValidationErrors,
|
|
3430
|
+
handleFieldChange,
|
|
3431
|
+
heading,
|
|
3432
|
+
recipientFirstName,
|
|
3433
|
+
valid = {}
|
|
3434
|
+
} = props;
|
|
3435
|
+
const phoneMetadata = resolveFieldMetadata(
|
|
3436
|
+
fieldConfig[data?.phoneNumber?.phoneCountryCode ?? country],
|
|
3437
|
+
{},
|
|
3438
|
+
defaultFieldMetadata$1
|
|
3439
|
+
);
|
|
3440
|
+
const mergedProps = mergeFieldMetadataIntoProps(
|
|
3441
|
+
"phoneNumber",
|
|
3442
|
+
{ label: phoneMetadata.label, mask: phoneMetadata.mask },
|
|
3443
|
+
props
|
|
3444
|
+
);
|
|
3445
|
+
const formUtils = createFormUtils(mergedProps, commonT);
|
|
3446
|
+
const basicDetails = formData.basicDetails ?? {};
|
|
3447
|
+
const handleEmailChange = useCallback(
|
|
3448
|
+
(mode) => (e) => {
|
|
3449
|
+
handleFieldChange?.("email", mode)(e);
|
|
3450
|
+
handleBasicDetailsChangeFor("email", "basicDetails", mode)(e);
|
|
3451
|
+
},
|
|
3452
|
+
[handleFieldChange, handleBasicDetailsChangeFor]
|
|
3453
|
+
);
|
|
3454
|
+
const handlePhoneChange = useCallback(
|
|
3455
|
+
(key, mode) => (e) => {
|
|
3456
|
+
handleFieldChange?.(key, mode)(e);
|
|
3457
|
+
handleBasicDetailsChangeFor(key, "basicDetails", mode)(e);
|
|
3458
|
+
},
|
|
3459
|
+
[handleFieldChange, handleBasicDetailsChangeFor]
|
|
3460
|
+
);
|
|
3461
|
+
useEffect(() => {
|
|
3462
|
+
if (!handleFieldChange) return;
|
|
3463
|
+
handleFieldChange("email", "input")(data?.email);
|
|
3464
|
+
handleFieldChange("phoneNumber", "input")(data?.phoneNumber);
|
|
3465
|
+
}, []);
|
|
3466
|
+
const emailValue = data?.email ?? basicDetails.email ?? "";
|
|
3467
|
+
const phoneValue = data?.phoneNumber ?? basicDetails.phoneNumber;
|
|
3468
|
+
if (!handleFieldChange) {
|
|
3469
|
+
return null;
|
|
3470
|
+
}
|
|
3471
|
+
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", children: [
|
|
3472
|
+
/* @__PURE__ */ jsx(
|
|
3473
|
+
Header,
|
|
3474
|
+
{
|
|
3475
|
+
title: heading ?? t(($) => $["inviteDetails"]),
|
|
3476
|
+
description: t(($) => $["checkThatContactInfoIsCorrect"], { name: recipientFirstName })
|
|
3477
|
+
}
|
|
3478
|
+
),
|
|
3479
|
+
/* @__PURE__ */ jsx(
|
|
3480
|
+
Field,
|
|
3481
|
+
{
|
|
3482
|
+
name: "email",
|
|
3483
|
+
label: commonT(($) => $["email"]),
|
|
3484
|
+
errorMessage: formUtils.getErrorMessage("email", errors, fieldValidationErrors),
|
|
3485
|
+
isValid: valid.email,
|
|
3486
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
3487
|
+
InputEmail,
|
|
3488
|
+
{
|
|
3489
|
+
...childProps,
|
|
3490
|
+
name: "email",
|
|
3491
|
+
value: emailValue,
|
|
3492
|
+
onInput: handleEmailChange("input"),
|
|
3493
|
+
onBlur: handleEmailChange("blur"),
|
|
3494
|
+
"aria-required": true,
|
|
3495
|
+
"aria-invalid": valid.email === false
|
|
3496
|
+
}
|
|
3497
|
+
)
|
|
3498
|
+
}
|
|
3499
|
+
),
|
|
3500
|
+
/* @__PURE__ */ jsx(
|
|
3501
|
+
PhoneField,
|
|
3502
|
+
{
|
|
3503
|
+
country,
|
|
3504
|
+
data: { phoneNumber: phoneValue },
|
|
3505
|
+
valid: { phoneNumber: valid.phoneNumber ?? true },
|
|
3506
|
+
errors: { phoneNumber: errors.phoneNumber?.errorMessage },
|
|
3507
|
+
labels: { phoneNumber: t(($) => $["mobileNumber"]) },
|
|
3508
|
+
placeholder: getPhonePlaceholder(country),
|
|
3509
|
+
optional: false,
|
|
3510
|
+
readonly: false,
|
|
3511
|
+
handleChangeFor: handlePhoneChange,
|
|
3512
|
+
mask: formUtils.getMask("phoneNumber"),
|
|
3513
|
+
helper: t(($) => $["mobileNumberHelperText"]),
|
|
3514
|
+
helperPosition: "below"
|
|
3515
|
+
}
|
|
3516
|
+
),
|
|
3517
|
+
/* @__PURE__ */ jsx(
|
|
3518
|
+
Field,
|
|
3519
|
+
{
|
|
3520
|
+
name: "senderName",
|
|
3521
|
+
label: commonT(($) => $["sender"]),
|
|
3522
|
+
errorMessage: formUtils.getErrorMessage("senderName", errors, fieldValidationErrors),
|
|
3523
|
+
isValid: valid.senderName,
|
|
3524
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
3525
|
+
InputText,
|
|
3526
|
+
{
|
|
3527
|
+
...childProps,
|
|
3528
|
+
name: "senderName",
|
|
3529
|
+
value: data?.senderName,
|
|
3530
|
+
placeholder: t(($) => $["name"]),
|
|
3531
|
+
onInput: handleFieldChange("senderName", "input"),
|
|
3532
|
+
onBlur: handleFieldChange("senderName", "blur"),
|
|
3533
|
+
"aria-required": true,
|
|
3534
|
+
"aria-invalid": !valid.senderName
|
|
3535
|
+
}
|
|
3536
|
+
)
|
|
3537
|
+
}
|
|
3538
|
+
),
|
|
3539
|
+
/* @__PURE__ */ jsx(
|
|
3540
|
+
Field,
|
|
3541
|
+
{
|
|
3542
|
+
name: "message",
|
|
3543
|
+
errorMessage: formUtils.getErrorMessage("message", errors, fieldValidationErrors),
|
|
3544
|
+
isValid: valid.message,
|
|
3545
|
+
helper: t(($) => $["thisMessageAppearsInTheEmail"]),
|
|
3546
|
+
helperPosition: "below",
|
|
3547
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
3548
|
+
TextArea,
|
|
3549
|
+
{
|
|
3550
|
+
...childProps,
|
|
3551
|
+
name: "message",
|
|
3552
|
+
value: data?.message,
|
|
3553
|
+
placeholder: t(($) => $["messagePlaceholder"]),
|
|
3554
|
+
onInput: handleFieldChange("message", "input"),
|
|
3555
|
+
onBlur: handleFieldChange("message", "blur"),
|
|
3556
|
+
"aria-required": true,
|
|
3557
|
+
"aria-invalid": !valid.message
|
|
3558
|
+
}
|
|
3559
|
+
)
|
|
3560
|
+
}
|
|
3561
|
+
)
|
|
3562
|
+
] });
|
|
3563
|
+
}
|
|
3309
3564
|
const ManualIdUpload = () => {
|
|
3310
3565
|
const { form } = useFormContext();
|
|
3311
3566
|
const { handleChangeFor } = form;
|
|
@@ -3344,20 +3599,20 @@ const proofOfRelationshipDocumentOptions = [
|
|
|
3344
3599
|
}
|
|
3345
3600
|
];
|
|
3346
3601
|
function ProofOfRelationship({ id, ...props }) {
|
|
3347
|
-
const {
|
|
3602
|
+
const { t } = useTranslation(["individual", "common"]);
|
|
3348
3603
|
const [proofOfRelationshipDocumentType, setProofOfRelationshipDocumentType] = useState(
|
|
3349
3604
|
proofOfRelationshipDocumentOptions[0].id
|
|
3350
3605
|
);
|
|
3351
3606
|
const proofOfResidencyGuidanceContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3352
3607
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
|
|
3353
3608
|
" ",
|
|
3354
|
-
|
|
3609
|
+
t(($) => $["requirements"], { ns: "common" })
|
|
3355
3610
|
] }),
|
|
3356
3611
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
3357
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3358
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3359
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3360
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3612
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentAddressedToName"], { name: props.name }) }),
|
|
3613
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["showAddressStateCountry"]) }),
|
|
3614
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["fullDocumentVisibleWithReadableText"]) }),
|
|
3615
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentCannotBeDamaged"]) })
|
|
3361
3616
|
] })
|
|
3362
3617
|
] });
|
|
3363
3618
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
@@ -3366,8 +3621,8 @@ function ProofOfRelationship({ id, ...props }) {
|
|
|
3366
3621
|
...props,
|
|
3367
3622
|
documentField: "proofOfRelationship",
|
|
3368
3623
|
documentType: "proofOfRelationship",
|
|
3369
|
-
heading:
|
|
3370
|
-
guidanceHeader: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-document-upload__subtitle adyen-kyc-u-margin-bottom-16", children:
|
|
3624
|
+
heading: t(($) => $["proofOfRelationship"], { ns: "common" }),
|
|
3625
|
+
guidanceHeader: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-document-upload__subtitle adyen-kyc-u-margin-bottom-16", children: t(($) => $["proofOfResidenceDocumentTypeLabel"], { name: props.name }) }),
|
|
3371
3626
|
documentTypeSelect: {
|
|
3372
3627
|
selectedType: proofOfRelationshipDocumentType,
|
|
3373
3628
|
setSelectedType: setProofOfRelationshipDocumentType,
|
|
@@ -3412,7 +3667,7 @@ const proofOfResidenceDocumentOptions = [
|
|
|
3412
3667
|
}
|
|
3413
3668
|
];
|
|
3414
3669
|
function ProofOfResidency({ id, ...props }) {
|
|
3415
|
-
const {
|
|
3670
|
+
const { t } = useTranslation(["individual", "common"]);
|
|
3416
3671
|
const [proofOfResidenceDocumentType, setProofOfResidenceDocumentType] = useState(
|
|
3417
3672
|
proofOfResidenceDocumentOptions[0].id
|
|
3418
3673
|
);
|
|
@@ -3420,14 +3675,14 @@ function ProofOfResidency({ id, ...props }) {
|
|
|
3420
3675
|
const proofOfResidencyGuidanceContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3421
3676
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
|
|
3422
3677
|
" ",
|
|
3423
|
-
|
|
3678
|
+
t(($) => $["requirements"], { ns: "common" })
|
|
3424
3679
|
] }),
|
|
3425
3680
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
3426
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3427
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3428
|
-
/* @__PURE__ */ jsx("li", { children: isMortgageOrVoterRegistration ?
|
|
3429
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3430
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3681
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentAddressedToName"], { name: props.name }) }),
|
|
3682
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["showAddressStateCountry"]) }),
|
|
3683
|
+
/* @__PURE__ */ jsx("li", { children: isMortgageOrVoterRegistration ? t(($) => $["dateOnDocumentNoOlderThanXMonths"], { numberOfMonths: 12 }) : t(($) => $["dateOnDocumentNoOlderThanXMonths"], { numberOfMonths: 3 }) }),
|
|
3684
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["fullDocumentVisibleWithReadableText"]) }),
|
|
3685
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentCannotBeDamaged"]) })
|
|
3431
3686
|
] })
|
|
3432
3687
|
] });
|
|
3433
3688
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
@@ -3436,8 +3691,8 @@ function ProofOfResidency({ id, ...props }) {
|
|
|
3436
3691
|
...props,
|
|
3437
3692
|
documentField: "proofOfResidency",
|
|
3438
3693
|
documentType: "proofOfResidency",
|
|
3439
|
-
heading:
|
|
3440
|
-
guidanceHeader: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-document-upload__subtitle adyen-kyc-u-margin-bottom-16", children:
|
|
3694
|
+
heading: t(($) => $["proofOfResidency"], { ns: "common" }),
|
|
3695
|
+
guidanceHeader: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-document-upload__subtitle adyen-kyc-u-margin-bottom-16", children: t(($) => $["proofOfResidenceDocumentTypeLabel"], { name: props.name }) }),
|
|
3441
3696
|
documentTypeSelect: {
|
|
3442
3697
|
selectedType: proofOfResidenceDocumentType,
|
|
3443
3698
|
setSelectedType: setProofOfResidenceDocumentType,
|
|
@@ -3453,16 +3708,16 @@ const MemoizedProofOfResidencyUpload = memo(
|
|
|
3453
3708
|
(prevProps, nextProps) => objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.name === nextProps.name
|
|
3454
3709
|
);
|
|
3455
3710
|
const getDisplayErrorMessage = (errorMessage, t) => {
|
|
3456
|
-
return typeof errorMessage !== "boolean" ?
|
|
3711
|
+
return typeof errorMessage !== "boolean" ? translateTranslatable(t, errorMessage) : errorMessage;
|
|
3457
3712
|
};
|
|
3458
3713
|
const SignatoryQuestionnaireModalContent = () => {
|
|
3459
|
-
const {
|
|
3714
|
+
const { t } = useTranslation("individual");
|
|
3460
3715
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3461
|
-
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h3", className: "adyen-kyc-u-margin-bottom-40", children:
|
|
3462
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h4", className: "adyen-kyc-u-margin-bottom-12", children:
|
|
3463
|
-
/* @__PURE__ */ jsx(Typography, { el: "p", className: "adyen-kyc-u-margin-bottom-32", children:
|
|
3464
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h4", className: "adyen-kyc-u-margin-bottom-12", children:
|
|
3465
|
-
/* @__PURE__ */ jsx(Typography, { el: "p", children:
|
|
3716
|
+
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h3", className: "adyen-kyc-u-margin-bottom-40", children: t(($) => $["moreAboutAuthorizedSignatories"]) }),
|
|
3717
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h4", className: "adyen-kyc-u-margin-bottom-12", children: t(($) => $["signatoryDescriptionQ1"]) }),
|
|
3718
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", className: "adyen-kyc-u-margin-bottom-32", children: t(($) => $["signatoryDescriptionA1"]) }),
|
|
3719
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h4", className: "adyen-kyc-u-margin-bottom-12", children: t(($) => $["signatoryDescriptionQ2"]) }),
|
|
3720
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", children: t(($) => $["signatoryDescriptionA2"]) })
|
|
3466
3721
|
] });
|
|
3467
3722
|
};
|
|
3468
3723
|
function SignatoryQuestionnaire(props) {
|
|
@@ -3519,7 +3774,15 @@ function SignatoryQuestionnaire(props) {
|
|
|
3519
3774
|
errorMessage: getDisplayErrorMessage(errorMessage, t)
|
|
3520
3775
|
}
|
|
3521
3776
|
),
|
|
3522
|
-
isModalOpen && /* @__PURE__ */ jsx(
|
|
3777
|
+
isModalOpen && /* @__PURE__ */ jsx(
|
|
3778
|
+
Modal,
|
|
3779
|
+
{
|
|
3780
|
+
onClose: closeModal,
|
|
3781
|
+
ariaLabel: t(($) => $["moreAboutAuthorizedSignatories"], { ns: "individual" }),
|
|
3782
|
+
inset: true,
|
|
3783
|
+
children: /* @__PURE__ */ jsx(SignatoryQuestionnaireModalContent, {})
|
|
3784
|
+
}
|
|
3785
|
+
)
|
|
3523
3786
|
] });
|
|
3524
3787
|
}
|
|
3525
3788
|
const useGuidanceQuestionnaire = ({
|
|
@@ -3766,7 +4029,7 @@ function UboQuestionnaire(props) {
|
|
|
3766
4029
|
] });
|
|
3767
4030
|
}
|
|
3768
4031
|
const logger$1 = createLogger();
|
|
3769
|
-
const
|
|
4032
|
+
const individualForms = {
|
|
3770
4033
|
signatoryQuestionnaire: {
|
|
3771
4034
|
formId: "signatoryQuestionnaire",
|
|
3772
4035
|
formName: "authorizedSignatory",
|
|
@@ -3787,6 +4050,11 @@ const individualOnfidoForms = {
|
|
|
3787
4050
|
formName: "verificationMethod",
|
|
3788
4051
|
fields: idVerificationMethodFields
|
|
3789
4052
|
},
|
|
4053
|
+
inviteDetails: {
|
|
4054
|
+
formId: "inviteDetails",
|
|
4055
|
+
formName: "inviteDetails",
|
|
4056
|
+
fields: inviteDetailsFields
|
|
4057
|
+
},
|
|
3790
4058
|
additionalPersonalDetails: {
|
|
3791
4059
|
formId: "additionalPersonalDetails",
|
|
3792
4060
|
formName: "additionalPersonalDetails",
|
|
@@ -3813,17 +4081,18 @@ const individualOnfidoForms = {
|
|
|
3813
4081
|
fields: ["proofOfRelationship"]
|
|
3814
4082
|
}
|
|
3815
4083
|
};
|
|
3816
|
-
const signatoryQuestionnaireFormID =
|
|
3817
|
-
const uboQuestionnaireFormID =
|
|
3818
|
-
const basicDetailsFormID =
|
|
3819
|
-
const additionalPersonalDetailsFormID =
|
|
3820
|
-
const
|
|
3821
|
-
const
|
|
3822
|
-
const
|
|
3823
|
-
const
|
|
3824
|
-
const
|
|
4084
|
+
const signatoryQuestionnaireFormID = individualForms.signatoryQuestionnaire.formId;
|
|
4085
|
+
const uboQuestionnaireFormID = individualForms.uboQuestionnaire.formId;
|
|
4086
|
+
const basicDetailsFormID = individualForms.basicDetails.formId;
|
|
4087
|
+
const additionalPersonalDetailsFormID = individualForms.additionalPersonalDetails.formId;
|
|
4088
|
+
const inviteDetailsFormID = individualForms.inviteDetails.formId;
|
|
4089
|
+
const idVerificationMethodFormID = individualForms.idVerificationMethod.formId;
|
|
4090
|
+
const manualIdUploadFormID = individualForms.manualIdUpload.formId;
|
|
4091
|
+
const proofOfResidencyFormID = individualForms.proofOfResidency.formId;
|
|
4092
|
+
const proofOfNationalIdFormID = individualForms.proofOfNationalId.formId;
|
|
4093
|
+
const proofOfRelationshipFormID = individualForms.proofOfRelationship.formId;
|
|
3825
4094
|
const LIVE_SELFIE_ERROR_CODE = "2_8210";
|
|
3826
|
-
function
|
|
4095
|
+
function Individual(props) {
|
|
3827
4096
|
const { t: commonT } = useTranslation("common");
|
|
3828
4097
|
const { t: individualT } = useTranslation("individual");
|
|
3829
4098
|
const userEvents = useAnalyticsContext();
|
|
@@ -3848,7 +4117,9 @@ function IndividualOnfido(props) {
|
|
|
3848
4117
|
onNext,
|
|
3849
4118
|
setNextHandler,
|
|
3850
4119
|
handleHomeClick,
|
|
3851
|
-
scenarios
|
|
4120
|
+
scenarios,
|
|
4121
|
+
isInvitedEntity,
|
|
4122
|
+
invitedEntityDetails
|
|
3852
4123
|
} = props;
|
|
3853
4124
|
const basicDetailsFormProps = getFormProps(props, basicDetailsFormID);
|
|
3854
4125
|
const signatoryQuestionnaireFormProps = getFormProps(props, signatoryQuestionnaireFormID);
|
|
@@ -3949,6 +4220,9 @@ function IndividualOnfido(props) {
|
|
|
3949
4220
|
const handleContinueToAdditionalDetails = () => {
|
|
3950
4221
|
gotoFormByFormId(additionalPersonalDetailsFormID);
|
|
3951
4222
|
};
|
|
4223
|
+
const handleContinueToInviteDetails = () => {
|
|
4224
|
+
gotoFormByFormId(inviteDetailsFormID);
|
|
4225
|
+
};
|
|
3952
4226
|
const handleDeleteDocument = () => {
|
|
3953
4227
|
logger$1.info("handle delete document");
|
|
3954
4228
|
};
|
|
@@ -3956,14 +4230,30 @@ function IndividualOnfido(props) {
|
|
|
3956
4230
|
logger$1.info("handle update document");
|
|
3957
4231
|
};
|
|
3958
4232
|
const capabilities = useCapabilities();
|
|
3959
|
-
const newRoles = useMemo(
|
|
4233
|
+
const newRoles = useMemo(
|
|
4234
|
+
() => isInvitedEntity ? invitedEntityDetails?.roles : calculateRoles(data),
|
|
4235
|
+
[data, invitedEntityDetails, isInvitedEntity]
|
|
4236
|
+
);
|
|
4237
|
+
const basicDetailsReadOnlyFields = useMemo(() => {
|
|
4238
|
+
if (!isInvitedEntity) {
|
|
4239
|
+
return [];
|
|
4240
|
+
}
|
|
4241
|
+
const potentialFields = [
|
|
4242
|
+
"firstName",
|
|
4243
|
+
"lastName",
|
|
4244
|
+
"jobTitle",
|
|
4245
|
+
"email",
|
|
4246
|
+
"phoneNumber"
|
|
4247
|
+
];
|
|
4248
|
+
return potentialFields.filter((field) => !!data?.basicDetails?.[field]);
|
|
4249
|
+
}, [data?.basicDetails, isInvitedEntity]);
|
|
3960
4250
|
useEffect(() => {
|
|
3961
4251
|
const currentRoles = data?.basicDetails?.role ?? [];
|
|
3962
4252
|
if (areArraysDifferent(newRoles, currentRoles)) {
|
|
3963
4253
|
const basicDetailsData = data?.basicDetails ?? {};
|
|
3964
4254
|
setFormData("basicDetails", { ...basicDetailsData, role: newRoles });
|
|
3965
4255
|
}
|
|
3966
|
-
}, [newRoles, data?.basicDetails, setFormData]);
|
|
4256
|
+
}, [newRoles, data?.basicDetails?.role, setFormData]);
|
|
3967
4257
|
const hasMotionCaptureScenarioValue = hasMotionCaptureScenario?.value;
|
|
3968
4258
|
useEffect(() => {
|
|
3969
4259
|
setShowIndividualMotionCapture(
|
|
@@ -4025,7 +4315,8 @@ function IndividualOnfido(props) {
|
|
|
4025
4315
|
errors: errors?.basicDetails,
|
|
4026
4316
|
fieldValidationErrors: fieldValidationErrors?.basicDetails,
|
|
4027
4317
|
valid: valid?.basicDetails,
|
|
4028
|
-
handleFieldChange: handleFieldChange("basicDetails")
|
|
4318
|
+
handleFieldChange: handleFieldChange("basicDetails"),
|
|
4319
|
+
readOnlyFields: basicDetailsReadOnlyFields
|
|
4029
4320
|
}
|
|
4030
4321
|
);
|
|
4031
4322
|
case idVerificationMethodFormID:
|
|
@@ -4036,6 +4327,7 @@ function IndividualOnfido(props) {
|
|
|
4036
4327
|
taskType,
|
|
4037
4328
|
handlers: {
|
|
4038
4329
|
handleContinueToAdditionalDetails,
|
|
4330
|
+
handleContinueToInviteDetails,
|
|
4039
4331
|
handleDeleteDocument,
|
|
4040
4332
|
handleUpdateDocument
|
|
4041
4333
|
},
|
|
@@ -4044,6 +4336,28 @@ function IndividualOnfido(props) {
|
|
|
4044
4336
|
hasLiveSelfieErrorCode
|
|
4045
4337
|
}
|
|
4046
4338
|
);
|
|
4339
|
+
case inviteDetailsFormID: {
|
|
4340
|
+
const inviteDetailsData = {
|
|
4341
|
+
email: data?.basicDetails?.email ?? "",
|
|
4342
|
+
phoneNumber: data?.basicDetails?.phoneNumber,
|
|
4343
|
+
senderName: data?.inviteDetails?.senderName ?? "",
|
|
4344
|
+
message: data?.inviteDetails?.message ?? ""
|
|
4345
|
+
};
|
|
4346
|
+
return /* @__PURE__ */ jsx(
|
|
4347
|
+
InviteDetails,
|
|
4348
|
+
{
|
|
4349
|
+
country: countryOfResidence,
|
|
4350
|
+
data: inviteDetailsData,
|
|
4351
|
+
errors: errors?.inviteDetails,
|
|
4352
|
+
fieldValidationErrors: fieldValidationErrors?.inviteDetails,
|
|
4353
|
+
handleFieldChange: handleFieldChange("inviteDetails"),
|
|
4354
|
+
heading: individualT(($) => $["inviteDetails"]),
|
|
4355
|
+
id: inviteDetailsFormID,
|
|
4356
|
+
recipientFirstName: data?.basicDetails?.firstName ?? "",
|
|
4357
|
+
valid: valid?.inviteDetails
|
|
4358
|
+
}
|
|
4359
|
+
);
|
|
4360
|
+
}
|
|
4047
4361
|
case additionalPersonalDetailsFormID:
|
|
4048
4362
|
return /* @__PURE__ */ jsx(
|
|
4049
4363
|
AdditionalPersonalDetails,
|
|
@@ -4245,43 +4559,43 @@ const adjustOnfidoIdentificationData = (data, apiData) => {
|
|
|
4245
4559
|
};
|
|
4246
4560
|
}
|
|
4247
4561
|
};
|
|
4248
|
-
const
|
|
4562
|
+
const mapIndividualSchemaToLegalEntity = (individual, isExperimentEnabled, matchingScenario) => {
|
|
4249
4563
|
const legalEntity = {
|
|
4250
|
-
...formatObject(
|
|
4564
|
+
...formatObject(individual, individualApiKeyMapping),
|
|
4251
4565
|
type: LegalEntityTypes.INDIVIDUAL
|
|
4252
4566
|
};
|
|
4253
|
-
if (
|
|
4254
|
-
if (matchingScenario?.includes(Scenarios.L_TAXINFO) &&
|
|
4255
|
-
const taxCountry =
|
|
4256
|
-
const taxType = taxCountry === CountryCodes.Spain &&
|
|
4567
|
+
if (individual.additionalPersonalDetails) {
|
|
4568
|
+
if (matchingScenario?.includes(Scenarios.L_TAXINFO) && individual.additionalPersonalDetails?.idNumber && (individual.additionalPersonalDetails?.country === CountryCodes.Spain || individual.additionalPersonalDetails?.country === CountryCodes.Italy)) {
|
|
4569
|
+
const taxCountry = individual.additionalPersonalDetails?.country;
|
|
4570
|
+
const taxType = taxCountry === CountryCodes.Spain && individual.additionalPersonalDetails?.typeOfIdentity ? individual.additionalPersonalDetails?.typeOfIdentity.toUpperCase() : taxIdNumberOptions[taxCountry][0]["id"];
|
|
4257
4571
|
legalEntity.individual.taxInformation = [
|
|
4258
4572
|
{
|
|
4259
4573
|
country: taxCountry,
|
|
4260
|
-
number:
|
|
4574
|
+
number: individual.additionalPersonalDetails.idNumber,
|
|
4261
4575
|
type: taxType
|
|
4262
4576
|
}
|
|
4263
4577
|
];
|
|
4264
4578
|
}
|
|
4265
4579
|
legalEntity.individual.identificationData = adjustOnfidoIdentificationData(
|
|
4266
|
-
|
|
4580
|
+
individual.additionalPersonalDetails,
|
|
4267
4581
|
legalEntity.individual.identificationData
|
|
4268
4582
|
);
|
|
4269
4583
|
}
|
|
4270
4584
|
const nameLocalization = [
|
|
4271
|
-
mapSchemaFieldsToApiScriptLocalization(
|
|
4272
|
-
mapSchemaFieldsToApiScriptLocalization(
|
|
4585
|
+
mapSchemaFieldsToApiScriptLocalization(individual.basicDetails ?? {}, "jaHani"),
|
|
4586
|
+
mapSchemaFieldsToApiScriptLocalization(individual.basicDetails ?? {}, "jaKana")
|
|
4273
4587
|
].filter(({ fields }) => !isEmpty$1(fields));
|
|
4274
4588
|
if (nameLocalization.length) {
|
|
4275
4589
|
legalEntity.individual.name.localization = nameLocalization;
|
|
4276
4590
|
}
|
|
4277
4591
|
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
4278
|
-
|
|
4592
|
+
individual.additionalPersonalDetails
|
|
4279
4593
|
);
|
|
4280
4594
|
if (addressLocalizations.length > 0)
|
|
4281
4595
|
legalEntity.individual.residentialAddress.localization = addressLocalizations;
|
|
4282
|
-
if (
|
|
4596
|
+
if (individual.basicDetails?.phoneNumber) {
|
|
4283
4597
|
const phone = {
|
|
4284
|
-
number:
|
|
4598
|
+
number: individual.basicDetails.phoneNumber.number,
|
|
4285
4599
|
type: "mobile"
|
|
4286
4600
|
};
|
|
4287
4601
|
if (phone.number && legalEntity.individual) {
|
|
@@ -4468,37 +4782,48 @@ const phoneNumberBase = {
|
|
|
4468
4782
|
rule: "contactsIfRequiredForRole"
|
|
4469
4783
|
}
|
|
4470
4784
|
};
|
|
4785
|
+
const inviteDetails = {
|
|
4786
|
+
senderName: {
|
|
4787
|
+
rule: "isVerifyByInviteSelected"
|
|
4788
|
+
},
|
|
4789
|
+
message: {
|
|
4790
|
+
rule: "isVerifyByInviteSelected"
|
|
4791
|
+
}
|
|
4792
|
+
};
|
|
4471
4793
|
const taxInformationBase = {
|
|
4472
4794
|
taxInformation: { rule: "countryUsesTaxId" }
|
|
4473
4795
|
};
|
|
4474
|
-
const
|
|
4475
|
-
L0: drop("address", "birthDate").from(identityOnfidoBase),
|
|
4476
|
-
L1: identityOnfidoBase,
|
|
4796
|
+
const individualFieldsPerScenario = {
|
|
4797
|
+
L0: { ...drop("address", "birthDate").from(identityOnfidoBase), ...inviteDetails },
|
|
4798
|
+
L1: { ...identityOnfidoBase, ...inviteDetails },
|
|
4477
4799
|
L1_ID: {
|
|
4478
4800
|
...identityOnfidoBase,
|
|
4479
4801
|
...identityNumber,
|
|
4480
|
-
...additionalIdentityInfo
|
|
4802
|
+
...additionalIdentityInfo,
|
|
4803
|
+
...inviteDetails
|
|
4481
4804
|
},
|
|
4482
4805
|
L1_IDO: {
|
|
4483
4806
|
// TODO: change idNumber rule to optional once optional fields are implemented
|
|
4484
4807
|
...identityOnfidoBase,
|
|
4485
4808
|
...identityNumber,
|
|
4486
|
-
...additionalIdentityInfo
|
|
4809
|
+
...additionalIdentityInfo,
|
|
4810
|
+
...inviteDetails
|
|
4487
4811
|
},
|
|
4488
4812
|
L1_NAT: {
|
|
4489
4813
|
...identityOnfidoBase,
|
|
4490
4814
|
...identityNumber,
|
|
4491
4815
|
...additionalIdentityInfo,
|
|
4492
|
-
...nationality
|
|
4816
|
+
...nationality,
|
|
4817
|
+
...inviteDetails
|
|
4493
4818
|
},
|
|
4494
|
-
L_TAXINFO: { ...identityOnfidoBase, ...taxInformationBase },
|
|
4819
|
+
L_TAXINFO: { ...identityOnfidoBase, ...taxInformationBase, ...inviteDetails },
|
|
4495
4820
|
L1_IDDOC: idDocRequired,
|
|
4496
4821
|
L_PH: phoneNumberBase
|
|
4497
4822
|
};
|
|
4498
|
-
const
|
|
4499
|
-
const parseConfiguration = ({ scenarios }) =>
|
|
4823
|
+
const parseIndividualScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, individualFieldsPerScenario);
|
|
4824
|
+
const parseConfiguration = ({ scenarios }) => parseIndividualScenarios(scenarios);
|
|
4500
4825
|
const logger = createLogger();
|
|
4501
|
-
function
|
|
4826
|
+
function IndividualDropin({
|
|
4502
4827
|
taskType = TaskTypes.INDIVIDUAL,
|
|
4503
4828
|
parentLegalEntity,
|
|
4504
4829
|
legalEntityResponse,
|
|
@@ -4512,12 +4837,13 @@ function IndividualOnfidoDropin({
|
|
|
4512
4837
|
handleBackClick: externalBackClick,
|
|
4513
4838
|
trustedFields,
|
|
4514
4839
|
trustedFieldsProvider,
|
|
4515
|
-
trustedRoles
|
|
4840
|
+
trustedRoles,
|
|
4841
|
+
isInvitedEntity,
|
|
4842
|
+
invitedEntityDetails
|
|
4516
4843
|
}) {
|
|
4517
4844
|
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
4518
4845
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
4519
|
-
const { i18n } =
|
|
4520
|
-
const { t } = useTranslation("individual");
|
|
4846
|
+
const { t, i18n } = useTranslation(["common", "individual"]);
|
|
4521
4847
|
const userEvents = useAnalyticsContext();
|
|
4522
4848
|
const { showToast, clearToasts } = useToastContext();
|
|
4523
4849
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
@@ -4535,13 +4861,20 @@ function IndividualOnfidoDropin({
|
|
|
4535
4861
|
const formStateData = individualFormDefaultData.value;
|
|
4536
4862
|
individualFormDefaultData.value = null;
|
|
4537
4863
|
if (legalEntityResponse) {
|
|
4864
|
+
const mappedData = mapLegalEntityToIndividualSchema(
|
|
4865
|
+
legalEntityResponse,
|
|
4866
|
+
isTargetLegalEntityType,
|
|
4867
|
+
isRoleFieldNeeded,
|
|
4868
|
+
parentLegalEntity
|
|
4869
|
+
);
|
|
4538
4870
|
return {
|
|
4539
|
-
...
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4871
|
+
...mappedData,
|
|
4872
|
+
...isInvitedEntity && invitedEntityDetails?.jobTitle && {
|
|
4873
|
+
basicDetails: {
|
|
4874
|
+
...mappedData.basicDetails,
|
|
4875
|
+
jobTitle: invitedEntityDetails.jobTitle
|
|
4876
|
+
}
|
|
4877
|
+
},
|
|
4545
4878
|
...formStateData
|
|
4546
4879
|
};
|
|
4547
4880
|
}
|
|
@@ -4556,7 +4889,9 @@ function IndividualOnfidoDropin({
|
|
|
4556
4889
|
parentCountry,
|
|
4557
4890
|
isTargetLegalEntityType,
|
|
4558
4891
|
isRoleFieldNeeded,
|
|
4559
|
-
parentLegalEntity
|
|
4892
|
+
parentLegalEntity,
|
|
4893
|
+
isInvitedEntity,
|
|
4894
|
+
invitedEntityDetails
|
|
4560
4895
|
]);
|
|
4561
4896
|
const [matchingScenario, setMatchingScenario] = useState();
|
|
4562
4897
|
const [validationErrors, setValidationErrors] = useState();
|
|
@@ -4598,14 +4933,15 @@ function IndividualOnfidoDropin({
|
|
|
4598
4933
|
idNumber: data2?.additionalPersonalDetails?.idNumber,
|
|
4599
4934
|
existingIdNumber: dataFromResponse.additionalPersonalDetails?.idNumber,
|
|
4600
4935
|
formVerificationErrors: problems?.verificationErrors?.additionalPersonalDetails,
|
|
4601
|
-
|
|
4936
|
+
t,
|
|
4602
4937
|
taxIdNumberType: data2?.additionalPersonalDetails?.taxInformation?.length ? data2?.additionalPersonalDetails?.taxInformation[0]?.type : void 0
|
|
4603
|
-
})
|
|
4938
|
+
}),
|
|
4939
|
+
inviteDetails: inviteDetailsValidators
|
|
4604
4940
|
}),
|
|
4605
4941
|
[
|
|
4606
4942
|
country,
|
|
4607
4943
|
dataFromResponse.additionalPersonalDetails?.idNumber,
|
|
4608
|
-
|
|
4944
|
+
t,
|
|
4609
4945
|
isExperimentEnabled,
|
|
4610
4946
|
isSettingEnabled,
|
|
4611
4947
|
problems?.verificationErrors?.additionalPersonalDetails,
|
|
@@ -4676,7 +5012,7 @@ function IndividualOnfidoDropin({
|
|
|
4676
5012
|
country
|
|
4677
5013
|
});
|
|
4678
5014
|
const fieldsFromCustomRules = useMemo(
|
|
4679
|
-
() =>
|
|
5015
|
+
() => individualRules({
|
|
4680
5016
|
matchingScenario,
|
|
4681
5017
|
data,
|
|
4682
5018
|
country: data?.additionalPersonalDetails?.country ?? country,
|
|
@@ -4690,13 +5026,13 @@ function IndividualOnfidoDropin({
|
|
|
4690
5026
|
useEffect(() => {
|
|
4691
5027
|
const derivedProps2 = getPropsFromConfigurations({
|
|
4692
5028
|
scenarioConfiguration: fieldConfigurations,
|
|
4693
|
-
forms:
|
|
5029
|
+
forms: individualForms,
|
|
4694
5030
|
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
4695
5031
|
dataMissingErrors: problems?.missingData ?? [],
|
|
4696
5032
|
fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
|
|
4697
5033
|
legalEntityResponse,
|
|
4698
|
-
|
|
4699
|
-
|
|
5034
|
+
individualApiKeyMapping,
|
|
5035
|
+
individualDocumentMapping,
|
|
4700
5036
|
[
|
|
4701
5037
|
"additionalPersonalDetails.typeOfIdentity",
|
|
4702
5038
|
"additionalPersonalDetails.idNumber",
|
|
@@ -4729,18 +5065,49 @@ function IndividualOnfidoDropin({
|
|
|
4729
5065
|
setExistingAttachments(res[0].attachments);
|
|
4730
5066
|
setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
|
|
4731
5067
|
}).catch(() => {
|
|
4732
|
-
showToast({ label:
|
|
5068
|
+
showToast({ label: t(($) => $["failedToFetchRelevantDocuments"]), variant: "error" });
|
|
4733
5069
|
});
|
|
4734
5070
|
}, []);
|
|
4735
5071
|
const forms = useMemo(() => {
|
|
4736
5072
|
const requiredForms = getRequiredForms(
|
|
4737
|
-
|
|
5073
|
+
individualForms,
|
|
4738
5074
|
derivedProps?.requiredFields,
|
|
4739
5075
|
derivedProps?.optionalFields
|
|
4740
5076
|
);
|
|
4741
|
-
const filteredForms =
|
|
5077
|
+
const filteredForms = requiredForms.filter((form2) => {
|
|
5078
|
+
const { formId } = form2;
|
|
5079
|
+
if (!isInstantVerificationEnabled && formId === individualForms.idVerificationMethod.formId) {
|
|
5080
|
+
return false;
|
|
5081
|
+
}
|
|
5082
|
+
if (data.idVerificationMethod?.idVerificationMethod === "verifyByInvite" && // Only these forms are used for verify by invite flow
|
|
5083
|
+
// Everything else should be hidden
|
|
5084
|
+
![
|
|
5085
|
+
individualForms.uboQuestionnaire.formId,
|
|
5086
|
+
individualForms.signatoryQuestionnaire.formId,
|
|
5087
|
+
individualForms.basicDetails.formId,
|
|
5088
|
+
individualForms.idVerificationMethod.formId,
|
|
5089
|
+
individualForms.inviteDetails.formId,
|
|
5090
|
+
"summary"
|
|
5091
|
+
].includes(formId)) {
|
|
5092
|
+
return false;
|
|
5093
|
+
}
|
|
5094
|
+
if (
|
|
5095
|
+
// Hide questionnaires for invited decision maker flow
|
|
5096
|
+
isInvitedEntity && (formId === individualForms.signatoryQuestionnaire.formId || formId === individualForms.uboQuestionnaire.formId)
|
|
5097
|
+
) {
|
|
5098
|
+
return false;
|
|
5099
|
+
}
|
|
5100
|
+
return true;
|
|
5101
|
+
});
|
|
4742
5102
|
return addValidityToForms(filteredForms, form.isValid, problems);
|
|
4743
|
-
}, [
|
|
5103
|
+
}, [
|
|
5104
|
+
derivedProps,
|
|
5105
|
+
form.isValid,
|
|
5106
|
+
isInstantVerificationEnabled,
|
|
5107
|
+
problems,
|
|
5108
|
+
isInvitedEntity,
|
|
5109
|
+
data.idVerificationMethod?.idVerificationMethod
|
|
5110
|
+
]);
|
|
4744
5111
|
const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
|
|
4745
5112
|
const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
|
|
4746
5113
|
const providerId = idVerificationProviderId.value;
|
|
@@ -4754,6 +5121,7 @@ function IndividualOnfidoDropin({
|
|
|
4754
5121
|
};
|
|
4755
5122
|
const roleTypes = isRoleFieldNeeded && parentLegalEntity ? getAllowedDecisionMakerRoles(parentLegalEntity, taskType, matchingScenario) : [];
|
|
4756
5123
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
5124
|
+
const { mutateAsync: createInvitationMutation } = useCreateInvitation();
|
|
4757
5125
|
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
4758
5126
|
const submitLegalEntity = async ({
|
|
4759
5127
|
dataSubmitted,
|
|
@@ -4788,6 +5156,41 @@ function IndividualOnfidoDropin({
|
|
|
4788
5156
|
}
|
|
4789
5157
|
return updatedLegalEntity;
|
|
4790
5158
|
};
|
|
5159
|
+
const createInvite = async ({
|
|
5160
|
+
inviteeLegalEntityId,
|
|
5161
|
+
inviteDetails: inviteDetails2
|
|
5162
|
+
}) => {
|
|
5163
|
+
if (!parentLegalEntity?.id || !inviteDetails2?.senderName || !inviteDetails2?.message) {
|
|
5164
|
+
logger.warn("createInvite: Missing required data", {
|
|
5165
|
+
hasParentLegalEntity: !!parentLegalEntity?.id,
|
|
5166
|
+
hasSenderName: !!inviteDetails2?.senderName,
|
|
5167
|
+
hasMessage: !!inviteDetails2?.message
|
|
5168
|
+
});
|
|
5169
|
+
showToast({ label: t(($) => $["provideAllRequiredDetails"]), variant: "error" });
|
|
5170
|
+
throw new Error("createInvite: Missing required data");
|
|
5171
|
+
}
|
|
5172
|
+
try {
|
|
5173
|
+
const { url: inviteLink } = await createInvitationMutation({
|
|
5174
|
+
organizationLegalEntityId: parentLegalEntity.id,
|
|
5175
|
+
inviteeLegalEntityId,
|
|
5176
|
+
data: {
|
|
5177
|
+
facilitatorName: inviteDetails2.senderName,
|
|
5178
|
+
facilitatorMessage: inviteDetails2.message,
|
|
5179
|
+
sendEmail: true,
|
|
5180
|
+
locale: i18n.language
|
|
5181
|
+
}
|
|
5182
|
+
});
|
|
5183
|
+
logger.log("Invitation created successfully", {
|
|
5184
|
+
inviteeLegalEntityId,
|
|
5185
|
+
inviteLink
|
|
5186
|
+
});
|
|
5187
|
+
showToast({ label: t(($) => $["invitationSent"], { ns: "individual" }), variant: "success" });
|
|
5188
|
+
} catch (error) {
|
|
5189
|
+
logger.error("Failed to create invitation", { error, inviteeLegalEntityId });
|
|
5190
|
+
showToast({ label: t(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
5191
|
+
throw error;
|
|
5192
|
+
}
|
|
5193
|
+
};
|
|
4791
5194
|
const submitDocuments = async ({
|
|
4792
5195
|
legalEntity,
|
|
4793
5196
|
dataSubmitted
|
|
@@ -4881,7 +5284,7 @@ function IndividualOnfidoDropin({
|
|
|
4881
5284
|
const onSubmit = async () => {
|
|
4882
5285
|
setLoadingStatus("loading");
|
|
4883
5286
|
const dataSubmitted = omitObscuredFieldsIfUnchanged(
|
|
4884
|
-
|
|
5287
|
+
individualObscuredFields,
|
|
4885
5288
|
data,
|
|
4886
5289
|
dataFromResponse
|
|
4887
5290
|
);
|
|
@@ -4889,7 +5292,7 @@ function IndividualOnfidoDropin({
|
|
|
4889
5292
|
return;
|
|
4890
5293
|
}
|
|
4891
5294
|
try {
|
|
4892
|
-
const legalEntity =
|
|
5295
|
+
const legalEntity = mapIndividualSchemaToLegalEntity(
|
|
4893
5296
|
dataSubmitted,
|
|
4894
5297
|
isExperimentEnabled,
|
|
4895
5298
|
matchingScenario
|
|
@@ -4925,6 +5328,12 @@ function IndividualOnfidoDropin({
|
|
|
4925
5328
|
refetchType: "all"
|
|
4926
5329
|
});
|
|
4927
5330
|
}
|
|
5331
|
+
if (dataSubmitted.idVerificationMethod?.idVerificationMethod === "verifyByInvite") {
|
|
5332
|
+
await createInvite({
|
|
5333
|
+
inviteeLegalEntityId: submittedLegalEntity.id,
|
|
5334
|
+
inviteDetails: dataSubmitted.inviteDetails
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
4928
5337
|
idNowModalChildEntityId.value = submittedLegalEntity;
|
|
4929
5338
|
setLoadingStatus("success");
|
|
4930
5339
|
clearToasts();
|
|
@@ -4935,19 +5344,19 @@ function IndividualOnfidoDropin({
|
|
|
4935
5344
|
if (isValidationError(e)) {
|
|
4936
5345
|
const getErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
|
|
4937
5346
|
if (getErrors && !Object.keys(getErrors).length) {
|
|
4938
|
-
showToast({ label:
|
|
5347
|
+
showToast({ label: t(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
4939
5348
|
eventsAdditionalData.unmappedErrorNames = e.invalidFields?.map((field) => field.name).filter(Boolean);
|
|
4940
5349
|
} else {
|
|
4941
5350
|
setValidationErrors(getErrors);
|
|
4942
5351
|
}
|
|
4943
5352
|
} else if (isMaintenanceModeError(e)) {
|
|
4944
5353
|
showToast({
|
|
4945
|
-
label:
|
|
5354
|
+
label: t(($) => $["maintenanceModeMessage"]),
|
|
4946
5355
|
variant: "error",
|
|
4947
5356
|
duration: "indefinite"
|
|
4948
5357
|
});
|
|
4949
5358
|
} else {
|
|
4950
|
-
showToast({ label:
|
|
5359
|
+
showToast({ label: t(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
4951
5360
|
}
|
|
4952
5361
|
setLoadingStatus("success");
|
|
4953
5362
|
userEvents.addTaskEvent("Encountered error", {
|
|
@@ -4958,7 +5367,7 @@ function IndividualOnfidoDropin({
|
|
|
4958
5367
|
});
|
|
4959
5368
|
}
|
|
4960
5369
|
};
|
|
4961
|
-
const datasetUtils = datasetUtilities(i18n.
|
|
5370
|
+
const datasetUtils = datasetUtilities(i18n.language);
|
|
4962
5371
|
const formatIdDocument = (idDocument) => {
|
|
4963
5372
|
if (!idDocument) return void 0;
|
|
4964
5373
|
const documentType = idDocument?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
|
|
@@ -4969,7 +5378,7 @@ function IndividualOnfidoDropin({
|
|
|
4969
5378
|
const backPage = idDocument.idBackPage?.[0];
|
|
4970
5379
|
if (!frontPage) return void 0;
|
|
4971
5380
|
return {
|
|
4972
|
-
documentType:
|
|
5381
|
+
documentType: t(($) => $[documentType.name]),
|
|
4973
5382
|
...backPage && documentType.hasBackPage ? {
|
|
4974
5383
|
frontPage: frontPage.name,
|
|
4975
5384
|
backPage: backPage.name
|
|
@@ -5037,14 +5446,22 @@ function IndividualOnfidoDropin({
|
|
|
5037
5446
|
}
|
|
5038
5447
|
}
|
|
5039
5448
|
if (summaryData.basicDetails?.accountHolder) {
|
|
5040
|
-
summaryData.basicDetails.accountHolder =
|
|
5449
|
+
summaryData.basicDetails.accountHolder = t(
|
|
5450
|
+
($) => $[summaryData.basicDetails.accountHolder]
|
|
5451
|
+
);
|
|
5041
5452
|
}
|
|
5042
5453
|
if (summaryData.additionalPersonalDetails?.birthDate) {
|
|
5043
5454
|
summaryData.additionalPersonalDetails.birthDate = localizeDateString(
|
|
5044
5455
|
summaryData.additionalPersonalDetails.birthDate,
|
|
5045
|
-
i18n.
|
|
5456
|
+
i18n.language
|
|
5046
5457
|
);
|
|
5047
5458
|
}
|
|
5459
|
+
if (summaryData.idVerificationMethod?.idVerificationMethod === "verifyByInvite") {
|
|
5460
|
+
summaryData.idVerificationMethod = {
|
|
5461
|
+
idVerificationMethod: t(($) => $["selfVerificationInvite"], { ns: "individual" }),
|
|
5462
|
+
sender: data?.inviteDetails?.senderName
|
|
5463
|
+
};
|
|
5464
|
+
}
|
|
5048
5465
|
if (isManualVerificationOrExistingDoc(summaryData.idVerificationMethod?.idVerificationMethod) || summaryData.proofOfResidency) {
|
|
5049
5466
|
const fileSummaryData = formatFileSummaryData(data);
|
|
5050
5467
|
summaryData = { ...summaryData, ...fileSummaryData };
|
|
@@ -5061,7 +5478,7 @@ function IndividualOnfidoDropin({
|
|
|
5061
5478
|
}
|
|
5062
5479
|
}
|
|
5063
5480
|
if (summaryData?.signatoryQuestionnaire) {
|
|
5064
|
-
summaryData.signatoryQuestionnaire = data?.signatoryQuestionnaire?.isSignatory === GuidanceQuestionValues.YES ? [
|
|
5481
|
+
summaryData.signatoryQuestionnaire = data?.signatoryQuestionnaire?.isSignatory === GuidanceQuestionValues.YES ? [t(($) => $["signatorySummaryLabel"])] : [];
|
|
5065
5482
|
}
|
|
5066
5483
|
if (summaryData?.uboQuestionnaire) {
|
|
5067
5484
|
const roleFieldToLabelMap = {
|
|
@@ -5070,7 +5487,7 @@ function IndividualOnfidoDropin({
|
|
|
5070
5487
|
isDirector: "directorSummaryLabel"
|
|
5071
5488
|
};
|
|
5072
5489
|
summaryData.uboQuestionnaire = Object.keys(roleFieldToLabelMap).flatMap(
|
|
5073
|
-
(field) => data?.uboQuestionnaire?.[field] === GuidanceQuestionValues.YES ? [t(($) => $[roleFieldToLabelMap[field]])] : []
|
|
5490
|
+
(field) => data?.uboQuestionnaire?.[field] === GuidanceQuestionValues.YES ? [t(($) => $[roleFieldToLabelMap[field]], { ns: "individual" })] : []
|
|
5074
5491
|
);
|
|
5075
5492
|
}
|
|
5076
5493
|
return summaryData;
|
|
@@ -5082,13 +5499,19 @@ function IndividualOnfidoDropin({
|
|
|
5082
5499
|
];
|
|
5083
5500
|
const isUploadEmpty = !data?.manualIdUpload || Object.keys(data?.manualIdUpload).length === 0;
|
|
5084
5501
|
const omittedFormsForSummary = [
|
|
5085
|
-
// 1. Omit idDocument if instant OR (manual/existing AND upload is empty)
|
|
5086
|
-
...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" || isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) && isUploadEmpty ? ["idDocument"] : [],
|
|
5087
|
-
// 2. Omit idVerificationMethod if manual or
|
|
5088
|
-
...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod"] : []
|
|
5502
|
+
// 1. Omit idDocument if instant OR (manual/existing AND upload is empty) OR verifyByInvite
|
|
5503
|
+
...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" || isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) && isUploadEmpty || data?.idVerificationMethod?.idVerificationMethod === "verifyByInvite" ? ["idDocument", "inviteDetails"] : [],
|
|
5504
|
+
// 2. Omit idVerificationMethod if manual, existing, or verifyByInvite (labels handled by inviteDetails or customLabels)
|
|
5505
|
+
...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod", "inviteDetails"] : []
|
|
5089
5506
|
];
|
|
5507
|
+
const idVerificationMethodLabelMap = {
|
|
5508
|
+
instantVerification: "idVerificationMethod",
|
|
5509
|
+
manualVerification: "idDocument",
|
|
5510
|
+
existingDocument: "idDocument",
|
|
5511
|
+
verifyByInvite: "idVerificationMethod"
|
|
5512
|
+
};
|
|
5090
5513
|
const customLabelsForSummary = {
|
|
5091
|
-
idVerificationMethod: data?.idVerificationMethod?.idVerificationMethod
|
|
5514
|
+
idVerificationMethod: idVerificationMethodLabelMap[data?.idVerificationMethod?.idVerificationMethod ?? ""] ?? "idDocument"
|
|
5092
5515
|
};
|
|
5093
5516
|
const {
|
|
5094
5517
|
handleNextClick,
|
|
@@ -5133,7 +5556,7 @@ function IndividualOnfidoDropin({
|
|
|
5133
5556
|
loadingStatus,
|
|
5134
5557
|
totalSteps: steps.total,
|
|
5135
5558
|
children: /* @__PURE__ */ jsx(
|
|
5136
|
-
|
|
5559
|
+
Individual,
|
|
5137
5560
|
{
|
|
5138
5561
|
...derivedProps,
|
|
5139
5562
|
requiredFields,
|
|
@@ -5155,7 +5578,9 @@ function IndividualOnfidoDropin({
|
|
|
5155
5578
|
trustedFieldsProvider,
|
|
5156
5579
|
trustedRoles,
|
|
5157
5580
|
setNextHandler,
|
|
5158
|
-
handleHomeClick
|
|
5581
|
+
handleHomeClick,
|
|
5582
|
+
isInvitedEntity,
|
|
5583
|
+
invitedEntityDetails
|
|
5159
5584
|
}
|
|
5160
5585
|
)
|
|
5161
5586
|
}
|
|
@@ -5163,6 +5588,6 @@ function IndividualOnfidoDropin({
|
|
|
5163
5588
|
] });
|
|
5164
5589
|
}
|
|
5165
5590
|
export {
|
|
5166
|
-
|
|
5167
|
-
|
|
5591
|
+
IndividualDropin as I,
|
|
5592
|
+
individualForms as i
|
|
5168
5593
|
};
|