@adyen/kyc-components 4.18.1 → 4.19.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-IXKjwyLD.js → Accordion-BnhH5-eC.js} +1 -1
- package/dist/{AccountSetupRejected-PhOe1B-n.js → AccountSetupRejected-BVzz6Scm.js} +2 -2
- package/dist/{AdaptiveWorkflow-CXpNjZCn.js → AdaptiveWorkflow-DsZ_wY_H.js} +31 -34
- package/dist/{AdaptiveWorkflowComponent-dPpu76rs.js → AdaptiveWorkflowComponent-1LmhvzA8.js} +56 -56
- package/dist/{Address-3-_aLbjP.js → Address-Dn9YYuVv.js} +7 -7
- package/dist/{AddressField-CPPPFBvl.js → AddressField-BLlc_T5f.js} +11 -14
- package/dist/{Avatar-CdBNstmD.js → Avatar-Y_RdG_YY.js} +1 -1
- package/dist/{BusinessFinancingDropin-BR51jlH2.js → BusinessFinancingDropin-BJ7Z_6_q.js} +31 -36
- package/dist/{BusinessFinancingPage-B3Ov1kac.js → BusinessFinancingPage-C72fEfR8.js} +32 -32
- package/dist/{BusinessTypeSelectionPage-D4vw6aNU.js → BusinessTypeSelectionPage-CJT4_LdC.js} +14 -15
- package/dist/{Button-i8I2dHP8.js → Button-BuhgDsyo.js} +1 -1
- package/dist/Checkbox-CFN5ywvv.js +108 -0
- package/dist/{CompanyRegistrationNumberTypeSelector-6xHWLs1p.js → CompanyRegistrationNumberTypeSelector-Dw2BkLur.js} +8 -8
- package/dist/{ContactDetails-YmwbTqND.js → ContactDetails-Bi_d3c4V.js} +7 -8
- package/dist/{ContextGuidance-5E-t22kR.js → ContextGuidance-D7YPJhH5.js} +2 -2
- package/dist/CountryField-CEttz1qx.js +1653 -0
- package/dist/{Currency-BO39M1ox.js → Currency-D3ooH-P1.js} +8 -9
- package/dist/{CustomerSupport-DQzE9mMY.js → CustomerSupport-BPkPpm4S.js} +14 -15
- package/dist/{DataConflictsModal-4y4dA4sI.js → DataConflictsModal-CjK5meAj.js} +7 -7
- package/dist/{DebugModal-CVQozZAM.js → DebugModal-BdzRooB8.js} +11 -12
- package/dist/{DecisionMakerDetails-DV6Iee3-.js → DecisionMakerDetails-CEvexevf.js} +16 -17
- package/dist/{DecisionMakerDetailsPage-BxT3qKxe.js → DecisionMakerDetailsPage-PdJIWA0L.js} +35 -35
- package/dist/{DecisionMakers-CVJTMrVX.js → DecisionMakers-B62TqNnC.js} +43 -43
- package/dist/{Dropzone-DZNPVw36.js → Dropzone-VfjqDlA_.js} +7 -7
- package/dist/{EmbeddedStatus-g37gc_ic.js → EmbeddedStatus-sHJnhw3K.js} +4 -4
- package/dist/{EndStateLayout-CBRHUXyY.js → EndStateLayout-CddZpAGD.js} +2 -2
- package/dist/{EntityAssociation-CN9ol7v2.js → EntityAssociation-DsQNaCo7.js} +7 -7
- package/dist/{ErrorPanel-ax7k2mv_.js → ErrorPanel-C51kA_mU.js} +4 -4
- package/dist/GlobalEntryModal-rYmoNH8G.js +188 -0
- package/dist/GlobalEntryPage-CeBpyE1f.js +74 -0
- package/dist/{unincorporated-partnership-nnTW3FnG.js → Image-Dc5Xg1_Y.js} +3 -10
- package/dist/{Individual.rules-Caf9UMUo.js → Individual.rules-CE8liYua.js} +4 -4
- package/dist/{IndividualDropin-BBr2IB14.js → IndividualDropin-BGY5Ddrh.js} +47 -54
- package/dist/{InputDate-CxzAaaCm.js → InputDate-Cp2ga0F5.js} +2 -2
- package/dist/{InputText-CQcWyZ8_.js → InputText-CRkApOKK.js} +3 -3
- package/dist/{Introduction-C8TItyVA.js → Introduction-DZ-ov19S.js} +8 -8
- package/dist/{InvitedDecisionMakerComponent-DWiwWubd.js → InvitedDecisionMakerComponent-KwRWIgOY.js} +67 -67
- package/dist/{JpAddress-CKVMqpT-.js → JpAddress-DA4HeKHD.js} +13 -13
- package/dist/{JpAddress.module-Bdx0E9ys.js → JpAddress.module-h_ZcUDUu.js} +4 -4
- package/dist/{JpAddressFields-Cu7qWdqH.js → JpAddressFields-BG4Hvw6r.js} +10 -10
- package/dist/{LegalCompanyNameField-JYzmeM_X.js → LegalCompanyNameField-RnzsmUKo.js} +5 -5
- package/dist/{LegalRepresentativeDetailsPage-DIsZS1kl.js → LegalRepresentativeDetailsPage-DVYi8ja1.js} +33 -33
- package/dist/{Link-JFzfaUOa.js → Link-PH3F7iTO.js} +1 -1
- package/dist/{ListItem-BnVTcObB.js → ListItem-B-gDVdRO.js} +2 -2
- package/dist/MX-CXUYOKFF.js +20 -0
- package/dist/{MaskedInput-C4s4LV8L.js → MaskedInput-BK38onJ9.js} +6 -6
- package/dist/{Modal-ByJare7m.js → Modal-BYdlsXkf.js} +1 -1
- package/dist/{Name-Cw7gZ538.js → Name-CnahYmZE.js} +5 -5
- package/dist/{NewSummary-BaN8B8zh.js → NewSummary-RLsN58Mb.js} +7 -7
- package/dist/{PatriotActDisclosure-DPd_hY4F.js → PatriotActDisclosure-CGU1K5gU.js} +14 -16
- package/dist/{PayoutDetailsDropin-CEfr5YRq.js → PayoutDetailsDropin-CyF7UckP.js} +31 -40
- package/dist/{PayoutDetailsPage-RPNP-k15.js → PayoutDetailsPage-D54T0cTR.js} +9 -9
- package/dist/{RadioGroup-Bt1Dv_S8.js → RadioGroup-lkTq-fXj.js} +4 -4
- package/dist/{Review-CB-4-2Hj.js → Review-CQP_ivDp.js} +8 -8
- package/dist/RootBusinessDetailsPage-74wy-iuF.js +68 -0
- package/dist/{RootBusinessLinesPage-oB7EXos0.js → RootBusinessLinesPage-DdbHs3i6.js} +30 -36
- package/dist/{RootIndividualDetailsPage-_ii9YD6S.js → RootIndividualDetailsPage-CRiGz1L-.js} +33 -33
- package/dist/{Select-D4oEtS2n.js → Select-C2axJYZG.js} +322 -9
- package/dist/{SignPCIComponent-ByROwVCw.js → SignPCIComponent-2jkpTNie.js} +40 -42
- package/dist/{SingpassSelection-OXKZwOga.js → SingpassSelection-C0Nj8agM.js} +6 -6
- package/dist/{SoleProprietorshipPage-CZs5zpAu.js → SoleProprietorshipPage-DL9KxFfM.js} +34 -34
- package/dist/{SourceOfFundsPage-BQvkDxha.js → SourceOfFundsPage-CoriFRrS.js} +33 -39
- package/dist/{StructuredList-Ci4Ut4E5.js → StructuredList-Mj-OPN9u.js} +71 -3
- package/dist/{TaskListItem-x1xsj1Bn.js → TaskListItem-DOnEqpoq.js} +11 -11
- package/dist/{TaskVerificationStatus-CKHPTEpH.js → TaskVerificationStatus-ITLSeoau.js} +1 -1
- package/dist/{TaxReportingDropin-CK2T7wb2.js → TaxReportingDropin-BnEktotO.js} +18 -19
- package/dist/{TermsOfServiceManagement-dE1jAodi.js → TermsOfServiceManagement-CY49Ivu1.js} +41 -45
- package/dist/{TextArea-BUx3yuMJ.js → TextArea-BzCbFjRp.js} +4 -4
- package/dist/{TrustDetailsPage-DGZBVOHn.js → TrustDetailsPage-BOt9PbYw.js} +33 -38
- package/dist/{TrustMemberCompanyPage-CUKl1KJI.js → TrustMemberCompanyPage-D36IOylX.js} +35 -35
- package/dist/{TrustMemberIndividualPage-BsNLXF2o.js → TrustMemberIndividualPage-aAZXiZKb.js} +33 -33
- package/dist/{TrustMemberRoleAndTypePage-CXNAMink.js → TrustMemberRoleAndTypePage-C9zB9BEk.js} +17 -22
- package/dist/{TrustMembersOverview-njl6GYCL.js → TrustMembersOverview-DxAuj55H.js} +13 -13
- package/dist/{UnincorporatedPartnershipIndividualPage-DkCrdK7_.js → UnincorporatedPartnershipIndividualPage-C4jwWyYn.js} +33 -33
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-CamEVaxx.js → UnincorporatedPartnershipMemberCompanyPage-0JVxcpB4.js} +35 -35
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-JxnZz1cS.js → UnincorporatedPartnershipMemberRoleAndTypePage-DfxG-RyJ.js} +12 -12
- package/dist/{UnincorporatedPartnershipMembersOverview-D7of0-eU.js → UnincorporatedPartnershipMembersOverview-DecZD9DL.js} +9 -9
- package/dist/{VerificationErrorAlert-CYQVK3Yc.js → VerificationErrorAlert-kLh424Dx.js} +5 -5
- package/dist/{accountHolderUtils-CwYzrNX6.js → accountHolderUtils-DqrHbaM7.js} +1 -1
- package/dist/adyen-business-financing.js +33 -33
- package/dist/adyen-individual-configuration.js +59 -59
- package/dist/adyen-individual-status.js +33 -33
- package/dist/adyen-invited-decision-maker.js +3 -3
- package/dist/adyen-onboarding.js +83 -82
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +6 -6
- package/dist/adyen-transfer-instrument-configuration.js +32 -32
- package/dist/adyen-transfer-instrument-management.js +39 -40
- package/dist/adyen-verification-status.js +6 -6
- package/dist/{TileGroup-PzJay6GP.js → bafinUtils-BnTI4Ice.js} +111 -5
- package/dist/{bg-BG-kWtPqE0Y.js → bg-BG-BXAB4Qsj.js} +2 -2
- package/dist/bg-BG-BkIvSbsH.js +7 -0
- package/dist/{bg-BG-DcW6QkFZ.js → bg-BG-DTGU1aVs.js} +6 -2
- package/dist/bg-BG-DbS559bK.js +7 -0
- package/dist/bg-BG-Smu9r9Kp.js +13 -0
- package/dist/{constants-C3Jgup22.js → constants-f8C0SAkf.js} +5 -6
- package/dist/cs-CZ-4yvBEVL0.js +7 -0
- package/dist/{cs-CZ-BbNA0Bfn.js → cs-CZ-9tDZSfxe.js} +6 -2
- package/dist/cs-CZ-BQ5B0-Kt.js +13 -0
- package/dist/cs-CZ-CPvgcrDs.js +7 -0
- package/dist/{cs-CZ-C4gChMCC.js → cs-CZ-DG5rPvy2.js} +2 -2
- package/dist/{da-DK-CI1yBdPD.js → da-DK-B04gegkM.js} +6 -2
- package/dist/{da-DK-Bfi-eUhB.js → da-DK-BnW-O75l.js} +2 -2
- package/dist/da-DK-CXAIXO3c.js +13 -0
- package/dist/da-DK-D3mbpcHG.js +7 -0
- package/dist/da-DK-D5969QKP.js +7 -0
- package/dist/{de-DE-BuV4qgKM.js → de-DE-BvxSDtLA.js} +6 -2
- package/dist/de-DE-D6R-XC2F.js +7 -0
- package/dist/de-DE-DFQGGPCj.js +13 -0
- package/dist/{de-DE-DKSWXTNm.js → de-DE-DUiPzmSc.js} +2 -2
- package/dist/de-DE-uDUBu-3n.js +7 -0
- package/dist/{types-Cwq1JAWT.js → debugStore-DpSgCNGn.js} +11 -2
- package/dist/{el-GR-C4waexVM.js → el-GR-1n3FJpd3.js} +2 -2
- package/dist/el-GR-CedmhUFh.js +7 -0
- package/dist/{el-GR-tnyJOS2Y.js → el-GR-DEBCgQrC.js} +6 -2
- package/dist/el-GR-DEBvBgI-.js +13 -0
- package/dist/el-GR-DWh7gn7M.js +7 -0
- package/dist/en-US-BV2Gye3t.js +7 -0
- package/dist/en-US-CqjOvqxV.js +7 -0
- package/dist/{es-ES-CCk0CPW1.js → es-ES-2b5zl9Dh.js} +6 -2
- package/dist/es-ES-C7XCTACS.js +7 -0
- package/dist/{es-ES-BNOsR44t.js → es-ES-Cp45mlyV.js} +2 -2
- package/dist/es-ES-DTUHhE47.js +7 -0
- package/dist/es-ES-_qbfha1o.js +13 -0
- package/dist/{es-LA-svZ9JWfs.js → es-LA-CE8hE_Qb.js} +6 -2
- package/dist/es-LA-Cyf48j4P.js +7 -0
- package/dist/es-LA-DF0v3VMe.js +13 -0
- package/dist/{es-LA-BQoC1xVD.js → es-LA-De_gTMKb.js} +2 -2
- package/dist/es-LA-DlL8vCjJ.js +7 -0
- package/dist/{et-EE-nB00sVxj.js → et-EE-B4czzgF8.js} +2 -2
- package/dist/et-EE-DqhEsLik.js +7 -0
- package/dist/{et-EE-4OTBQhPM.js → et-EE-OAYKzRjG.js} +2 -2
- package/dist/et-EE-evCiUrFW.js +13 -0
- package/dist/{et-EE-Ykuzi3IN.js → et-EE-yEWgHoyl.js} +6 -2
- package/dist/{fi-FI-BfcDfpuq.js → fi-FI-BRaWGHEa.js} +6 -2
- package/dist/fi-FI-BTG87BwH.js +13 -0
- package/dist/fi-FI-Cdof5NRG.js +7 -0
- package/dist/{fi-FI-11WMt6xZ.js → fi-FI-D08MUkuM.js} +2 -2
- package/dist/fi-FI-RfGqWbnB.js +7 -0
- package/dist/{process-field-configurations-DBtjrbif.js → form-rules-wh_oE1AN.js} +86 -6
- package/dist/{fr-FR-DZ3x24wa.js → fr-FR-B1fQcJnJ.js} +6 -2
- package/dist/{fr-FR-CTX8eIfK.js → fr-FR-BxDpVfWO.js} +2 -2
- package/dist/fr-FR-DIiBHkhs.js +13 -0
- package/dist/fr-FR-NOULV1vy.js +7 -0
- package/dist/fr-FR-zDxTr2D3.js +7 -0
- package/dist/{getProblemsForEntity-ubvE1Px7.js → getProblemsForEntity-set4Krmx.js} +2 -2
- package/dist/hr-HR-2h3d5-q3.js +7 -0
- package/dist/{hr-HR-crREB4Gm.js → hr-HR-CiE3y0Ub.js} +6 -2
- package/dist/{hr-HR-q4LEknkW.js → hr-HR-DGQMquDg.js} +2 -2
- package/dist/hr-HR-DPjuJ54x.js +7 -0
- package/dist/hr-HR-DofgeWWO.js +13 -0
- package/dist/{http-8qgzqVqk.js → http-CFac2y4i.js} +1 -1
- package/dist/{hu-HU-D6LVf95k.js → hu-HU-Eofp7khl.js} +2 -2
- package/dist/hu-HU-FdLZGnBz.js +13 -0
- package/dist/{hu-HU-DsUOhM2K.js → hu-HU-VLUIAFMp.js} +2 -2
- package/dist/{hu-HU-CwugDrK-.js → hu-HU-bRcefVUd.js} +6 -2
- package/dist/hu-HU-hB61p4H9.js +7 -0
- package/dist/{it-IT-DmJ2fsTy.js → it-IT-B-nXU1YK.js} +6 -2
- package/dist/it-IT-BMXQzE0P.js +7 -0
- package/dist/{it-IT-COvAChQK.js → it-IT-CD7NJtJa.js} +2 -2
- package/dist/it-IT-CWIAGNlE.js +7 -0
- package/dist/it-IT-CXgZZgyU.js +13 -0
- package/dist/ja-JP-BuFZko8b.js +7 -0
- package/dist/ja-JP-C1c2UPpy.js +7 -0
- package/dist/{ja-JP-Ct_9QX6z.js → ja-JP-DX2RsV88.js} +6 -2
- package/dist/ja-JP-Yi2wExJE.js +13 -0
- package/dist/{ja-JP-qNISvG1u.js → ja-JP-YvXztswF.js} +2 -2
- package/dist/{localizeDateString-Bmx3yBcR.js → localizeDateString-BRB4gPDZ.js} +1 -1
- package/dist/lt-LT-BZ6seLuB.js +13 -0
- package/dist/{lt-LT-DkHCYjtT.js → lt-LT-Bzv_v-Qg.js} +6 -2
- package/dist/lt-LT-C62dFtWW.js +7 -0
- package/dist/{lt-LT-BZAM9Txq.js → lt-LT-Cjx4H-0R.js} +2 -2
- package/dist/lt-LT-D4raqCUa.js +7 -0
- package/dist/lv-LV-CMYrAWqu.js +13 -0
- package/dist/{lv-LV-CrmNCJJK.js → lv-LV-Ckf37gXo.js} +2 -2
- package/dist/lv-LV-DBms129k.js +7 -0
- package/dist/{lv-LV-D7eJdsac.js → lv-LV-DVv2mhEv.js} +6 -2
- package/dist/lv-LV-W0I-UUyj.js +7 -0
- package/dist/{mapExistingFile-BvFf01k6.js → mapExistingFile-BOXehUNN.js} +3 -3
- package/dist/{mapJpAddressSchemaToAddressLocalizations-DHL5chu8.js → mapJpAddressSchemaToAddressLocalizations-ClMxibP5.js} +2 -2
- package/dist/{mapLegalEntityToIndividualSchema-BeR7ESyx.js → mapLegalEntityToIndividualSchema-CI0cH-k5.js} +8 -8
- package/dist/{mapTransferInstrumentToPayoutAccount-2iWuaqS_.js → mapTransferInstrumentToPayoutAccount-DAXQcZKf.js} +3 -3
- package/dist/nl-NL-C9HoBicG.js +7 -0
- package/dist/nl-NL-CiH1raQa.js +13 -0
- package/dist/{nl-NL-D-rQ6aIY.js → nl-NL-DFHAkUK3.js} +2 -2
- package/dist/{nl-NL-BVbkn6Cc.js → nl-NL-DwrCD0Bp.js} +6 -2
- package/dist/nl-NL-UhYf45fo.js +7 -0
- package/dist/{no-NO-m32g5fSG.js → no-NO-B6frLiko.js} +2 -2
- package/dist/no-NO-Bo9rlROU.js +7 -0
- package/dist/no-NO-Ce2vzrp7.js +13 -0
- package/dist/{no-NO-DKa4b11A.js → no-NO-ClSO9-BH.js} +6 -2
- package/dist/no-NO-DN7Ovyir.js +7 -0
- package/dist/{omitObscuredFieldsIfUnchanged-DETtemfp.js → omitObscuredFieldsIfUnchanged-P2CVFokX.js} +2 -2
- package/dist/{patternValidators-DVuOyW9t.js → patternValidators-BXreB-rx.js} +1 -1
- package/dist/pl-PL-BmiDQi18.js +7 -0
- package/dist/{pl-PL-a3bZNR8A.js → pl-PL-DWH2wPZx.js} +6 -2
- package/dist/{pl-PL-CPw2fm9P.js → pl-PL-DnYkTdjO.js} +2 -2
- package/dist/pl-PL-STp7eeFE.js +7 -0
- package/dist/pl-PL-aErZF5Xz.js +13 -0
- package/dist/{processCapabilities-C2kMryYn.js → processCapabilities-zti_0yUx.js} +3 -1
- package/dist/{processValidationErrors-CBt5e49b.js → processValidationErrors-Bm_TOvWG.js} +3 -3
- package/dist/{pt-BR-D1_qNWjQ.js → pt-BR-65dQv8uO.js} +2 -2
- package/dist/pt-BR-CFGpH3BW.js +7 -0
- package/dist/pt-BR-DXGEP6IP.js +7 -0
- package/dist/pt-BR-hRRebYjo.js +13 -0
- package/dist/{pt-BR-iKANHYsk.js → pt-BR-iYXbhMqT.js} +6 -2
- package/dist/pt-PT-BHR4CEnv.js +7 -0
- package/dist/pt-PT-BXIKj_3F.js +7 -0
- package/dist/{pt-PT-DN5Kzv0P.js → pt-PT-CNqZ8c_1.js} +6 -2
- package/dist/{pt-PT-DsN17CwV.js → pt-PT-D0fXeW1f.js} +2 -2
- package/dist/pt-PT-UAIvemf-.js +13 -0
- package/dist/{resolveEnvironment-t5oalzfF.js → resolveEnvironment-DEX5KqEv.js} +43 -38
- package/dist/ro-RO-BJeKitCz.js +13 -0
- package/dist/{ro-RO-BRa0uLv-.js → ro-RO-CNj95qQn.js} +2 -2
- package/dist/ro-RO-D4TQUwVB.js +7 -0
- package/dist/{ro-RO-HROrtm3u.js → ro-RO-DcHQ--3j.js} +6 -2
- package/dist/ro-RO-ni-ZNqXU.js +7 -0
- package/dist/{sk-SK-BdncFi12.js → sk-SK-C0x9Vs2X.js} +2 -2
- package/dist/sk-SK-CszMszV5.js +7 -0
- package/dist/{sk-SK-BHvTY7sQ.js → sk-SK-D8_n1xzc.js} +6 -2
- package/dist/sk-SK-DQAGAOJW.js +7 -0
- package/dist/sk-SK-ztSYyXUE.js +13 -0
- package/dist/sl-SI-B-MLX0nT.js +7 -0
- package/dist/sl-SI-BY4TzP-F.js +13 -0
- package/dist/{sl-SI-Drd_ptUm.js → sl-SI-BikBCOJK.js} +2 -2
- package/dist/{sl-SI-DgVD1kZK.js → sl-SI-BlhEijpT.js} +6 -2
- package/dist/sl-SI-DOAJBgQV.js +7 -0
- package/dist/style.css +345 -317
- package/dist/styles-DYaAeu4q.js +345 -317
- package/dist/sv-SE--LlaHl85.js +7 -0
- package/dist/{sv-SE-oLc1R4YI.js → sv-SE-BGP9Lmku.js} +2 -2
- package/dist/sv-SE-CNQCI2nX.js +7 -0
- package/dist/sv-SE-CrUbxniG.js +13 -0
- package/dist/{sv-SE-Dn9j5Ykd.js → sv-SE-DWQAUW9A.js} +6 -2
- package/dist/{translation-BYvhW5zA.js → translation-CcKrUksA.js} +10 -4
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +1 -0
- package/dist/types/components/Business/forms/rules.d.ts +4 -2
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +12 -0
- package/dist/types/components/GlobalEntry/constants.d.ts +14 -0
- package/dist/types/components/GlobalEntry/fields/EntitySetupField/EntitySetupField.d.ts +2 -0
- package/dist/types/components/GlobalEntry/fields/EntitySetupField/types.d.ts +5 -0
- package/dist/types/components/GlobalEntry/forms/EntityInformation/EntityInformation.d.ts +7 -0
- package/dist/types/components/GlobalEntry/forms/EntityInformation/types.d.ts +3 -0
- package/dist/types/components/GlobalEntry/tasks/GlobalEntry.d.ts +6 -0
- package/dist/types/components/GlobalEntry/tasks/GlobalEntryModal.d.ts +4 -0
- package/dist/types/components/GlobalEntry/tasks/types.d.ts +4 -0
- package/dist/types/components/GlobalEntry/utils.d.ts +3 -0
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +1 -2
- package/dist/types/context/SettingsContext/types.d.ts +1 -1
- package/dist/types/context/StateContext/types.d.ts +2 -1
- package/dist/types/context/ToggleContext/types.d.ts +5 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +1 -0
- package/dist/types/core/models/api/organization.d.ts +1 -0
- package/dist/types/types/form-rules.d.ts +2 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/{types-KjTYEnAG.js → types-lzI_sUwT.js} +1 -1
- package/dist/unincorporated-partnership-DNTK5Y_5.js +11 -0
- package/dist/{useAssociatedLegalEntity-CkuvFV-D.js → useAssociatedLegalEntity-DB8HCSwp.js} +2 -2
- package/dist/{useBusinessDetailsData-CU0nteh0.js → useBusinessDetailsData-DJxoXaI7.js} +120 -94
- package/dist/{useBusinessLines-BFsRoAAj.js → useBusinessLines-CfQYLNkw.js} +1 -1
- package/dist/{useCanSeeIntroduction--o2DZz_r.js → useCanSeeIntroduction-CMh-srNo.js} +3 -3
- package/dist/{useCreateLegalEntity-CoBr-K0N.js → useCreateLegalEntity-CVBjJUw_.js} +1 -1
- package/dist/{useDataMissingRemediations-BzbA8Mu4.js → useDataMissingRemediations-BEdoAjt3.js} +2 -2
- package/dist/{useForm-i6sGgDd7.js → useForm-BV6TtEpQ.js} +4 -4
- package/dist/{invalidateRootLegalEntity-CI3oWmKW.js → useId-BiYSHcau.js} +28 -6
- package/dist/{useLegalEntity-CtlUQv_J.js → useLegalEntity-BqO7Fmt0.js} +1 -1
- package/dist/{useNavigate-C5pijQS-.js → useNavigate-BbaMx4B6.js} +33 -33
- package/dist/{useOnboardingStatus-BlXlrSAS.js → useOnboardingStatus-Bg1z2ftv.js} +1 -1
- package/dist/{usePciQuestionnaireList-CbkNC_Ye.js → usePciQuestionnaireList-Dq1w684P.js} +1 -1
- package/dist/{useSalesChannels-CQjvFAb2.js → useSalesChannels-D66W1KV8.js} +4 -4
- package/dist/{useScenarios-DeLWDtIg.js → useScenarios-BunWDxgO.js} +1 -1
- package/dist/{useTaskLandedEvent-BiIxm8IU.js → useTaskLandedEvent-BTVaABDA.js} +1 -1
- package/dist/{useTaskStatus-wrAxqtIR.js → useTaskStatus-B_-IRF4H.js} +1 -1
- package/dist/{useTermsOfServiceStatus-D1_ECrkO.js → useTermsOfServiceStatus-CGIpBA0U.js} +1 -1
- package/dist/{useTrustMembers-BdC-skoy.js → useTrustMembers-DExoLajS.js} +4 -4
- package/dist/{useUnincorporatedPartnershipMembers-B5WCX6yK.js → useUnincorporatedPartnershipMembers-DgD91qBf.js} +4 -4
- package/dist/{useUpdateBusinessLines-Cncate8L.js → useUpdateBusinessLines-C2xW-32U.js} +1 -1
- package/dist/{useUpdateLegalEntity-BzJEGtlf.js → useUpdateLegalEntity-CavZl01k.js} +3 -3
- package/dist/{utils-BQKCRnHy.js → utils-BZ6sjmH0.js} +5 -5
- package/dist/{utils-DL1Gw7UQ.js → utils-Bu9Q872y.js} +7 -7
- package/dist/{utils-BIsRIG8_.js → utils-CxPOLLKk.js} +2 -2
- package/dist/{utils-DO746J4_.js → utils-wOuhjMhJ.js} +13 -14
- package/dist/{validate-CMxq61UU.js → validate-K01plHbc.js} +5 -5
- package/dist/{validate-DXDTOfCD.js → validate-XXwQLqzu.js} +1 -1
- package/dist/{validateExtractionResult-vWa9ixyo.js → validateExtractionResult-BkuHB6PK.js} +10 -11
- package/dist/{validationError-ChwCFXwH.js → validationError-DZqoMG3g.js} +2 -2
- package/package.json +1 -1
- package/dist/Checkbox-DdEBnXOB.js +0 -55
- package/dist/Confirm-DcqMV7rd.js +0 -75
- package/dist/CountryField-CMQ5_moy.js +0 -37
- package/dist/Field-Dg-2A6bG.js +0 -155
- package/dist/GlobalEntryModal-D61Hc3LY.js +0 -34
- package/dist/GlobalEntryPage-DWg2N_pv.js +0 -44
- package/dist/LandingLayout-iZpW1Vsx.js +0 -81
- package/dist/MaybeModal-BSkLRwI2.js +0 -24
- package/dist/ProgressBar-DWFxLMUA.js +0 -38
- package/dist/RootBusinessDetailsPage-CUio3PpO.js +0 -68
- package/dist/Summary-DiBuR9QD.js +0 -234
- package/dist/bafinUtils-CbfyDBkh.js +0 -112
- package/dist/bg-BG-DWtVZckB.js +0 -7
- package/dist/bg-BG-VIyyeYUh.js +0 -7
- package/dist/cs-CZ-D8nnXFEh.js +0 -7
- package/dist/cs-CZ-DeM0O93X.js +0 -7
- package/dist/da-DK-Cq-1LB6T.js +0 -7
- package/dist/da-DK-DrYRErQi.js +0 -7
- package/dist/de-DE-Bc55gBv4.js +0 -7
- package/dist/de-DE-CNHKj2ar.js +0 -7
- package/dist/debouncedInputEvent-Fwwp_K_-.js +0 -54
- package/dist/debugStore-Dwn1FXrh.js +0 -9
- package/dist/el-GR-Cr-3NgPk.js +0 -7
- package/dist/el-GR-DC8wWZlc.js +0 -7
- package/dist/en-US-BNfqvbyW.js +0 -7
- package/dist/en-US-DXMKV9NN.js +0 -7
- package/dist/es-ES-L_7CovzS.js +0 -7
- package/dist/es-ES-uVSZu-EQ.js +0 -7
- package/dist/es-LA-BU5Op1kh.js +0 -7
- package/dist/es-LA-DPvp-UlN.js +0 -7
- package/dist/et-EE-BFb0MPqf.js +0 -7
- package/dist/fi-FI-6yq1jSRa.js +0 -7
- package/dist/fi-FI-BI9sCCEP.js +0 -7
- package/dist/form-rules-CUUQGacJ.js +0 -7
- package/dist/formUtils-BrLGUOLK.js +0 -78
- package/dist/fr-FR-DBM2tUge.js +0 -7
- package/dist/fr-FR-_TkFnevF.js +0 -7
- package/dist/hr-HR-DubR_a2h.js +0 -7
- package/dist/hr-HR-Vx0hO2h4.js +0 -7
- package/dist/hu-HU-CK6lbZ-D.js +0 -7
- package/dist/it-IT-CL_4Y1hK.js +0 -7
- package/dist/it-IT-CVVOlFfY.js +0 -7
- package/dist/ja-JP-B8sNFjt_.js +0 -7
- package/dist/ja-JP-CNBPrNgM.js +0 -7
- package/dist/lt-LT-C9lXLzZA.js +0 -7
- package/dist/lt-LT-CPBTVJeD.js +0 -7
- package/dist/lv-LV-2Q8G1u4p.js +0 -7
- package/dist/lv-LV-CBsGjmsA.js +0 -7
- package/dist/nl-NL-C5MHFAIE.js +0 -7
- package/dist/nl-NL-DMdoFepr.js +0 -7
- package/dist/no-NO-Bna_-q84.js +0 -7
- package/dist/no-NO-CwgewQst.js +0 -7
- package/dist/pl-PL-D-TVYshE.js +0 -7
- package/dist/pl-PL-Ddtqvtag.js +0 -7
- package/dist/pt-BR-D3oWr3QJ.js +0 -7
- package/dist/pt-BR-DwHag_mp.js +0 -7
- package/dist/pt-PT-BVcFY8gr.js +0 -7
- package/dist/pt-PT-DpYwMinP.js +0 -7
- package/dist/ro-RO-CZpwJ4Sy.js +0 -7
- package/dist/ro-RO-D3Yk1KoW.js +0 -7
- package/dist/roleMetadata-a4sEtgHv.js +0 -56
- package/dist/sk-SK-D3UYKttr.js +0 -7
- package/dist/sk-SK-DyKdrRnN.js +0 -7
- package/dist/sl-SI-BkcElOhl.js +0 -7
- package/dist/sl-SI-nHUFaEcp.js +0 -7
- package/dist/summaryItem-uDWmtYtt.js +0 -16
- package/dist/sv-SE-DkZ2LyW5.js +0 -7
- package/dist/sv-SE-DxMX8Ox_.js +0 -7
- package/dist/types/components/GlobalEntry/forms/GlobalEntryModal/GlobalEntryModal.d.ts +0 -1
- package/dist/useFormContext-C7TMXwWg.js +0 -503
- package/dist/useId-BkDhUta2.js +0 -28
- package/dist/useMultiForm-DmRII_NM.js +0 -783
- package/dist/utils-C1buyvRw.js +0 -61
- package/dist/validationResult-Dzvfkukj.js +0 -77
- /package/dist/types/components/GlobalEntry/{forms/GlobalEntryModal/isGlobalEntryModalOpen.d.ts → globalEntryStore.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const GlobalEntryModal: () => import("preact/jsx-runtime").JSX.Element;
|
|
@@ -1,503 +0,0 @@
|
|
|
1
|
-
try {
|
|
2
|
-
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "318f3edb-fee5-4b1b-ba62-dc6f5b378405", e._sentryDebugIdIdentifier = "sentry-dbid-318f3edb-fee5-4b1b-ba62-dc6f5b378405");
|
|
4
|
-
} catch (e) {}
|
|
5
|
-
import { o as createLogger, r as useTranslation } from "./translation-BYvhW5zA.js";
|
|
6
|
-
import { t as Button } from "./Button-i8I2dHP8.js";
|
|
7
|
-
import { i as useAnalyticsContext } from "./Modal-ByJare7m.js";
|
|
8
|
-
import { r as LoaderWrapper } from "./utils-C1buyvRw.js";
|
|
9
|
-
import { t as Confirm } from "./Confirm-DcqMV7rd.js";
|
|
10
|
-
import { t as formDebugInfo } from "./debugStore-Dwn1FXrh.js";
|
|
11
|
-
import { r as FormRouterContext } from "./ErrorPanel-ax7k2mv_.js";
|
|
12
|
-
import { i as trackNavigation, n as summaryStep, t as Summary } from "./Summary-DiBuR9QD.js";
|
|
13
|
-
import { t as MaybeModal } from "./MaybeModal-BSkLRwI2.js";
|
|
14
|
-
import { t as ProgressBar } from "./ProgressBar-DWFxLMUA.js";
|
|
15
|
-
import { useCallback, useContext, useMemo, useRef, useState } from "preact/hooks";
|
|
16
|
-
import cx from "classnames";
|
|
17
|
-
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
18
|
-
import { createContext } from "preact";
|
|
19
|
-
//#region src/context/FormContext/FormContext.ts
|
|
20
|
-
var FormContext = createContext(null);
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/context/FormContext/FormContextProvider.tsx
|
|
23
|
-
function FormContextProvider({ children, form }) {
|
|
24
|
-
const contextValue = useMemo(() => ({ form }), [form]);
|
|
25
|
-
return /* @__PURE__ */ jsx(FormContext.Provider, {
|
|
26
|
-
value: contextValue,
|
|
27
|
-
children
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/hooks/usePageLandedEvent.ts
|
|
32
|
-
/**
|
|
33
|
-
* Hook that automatically sends a "Landed on page" analytics event on when active form changes.
|
|
34
|
-
* Used on form component level (i.e. Basic information, Additional details etc.) to explicitly track page visits.
|
|
35
|
-
* This centralizes the common analytics pattern used across form components.
|
|
36
|
-
*/
|
|
37
|
-
var usePageLandedEvent = (formName) => {
|
|
38
|
-
const userEvents = useAnalyticsContext();
|
|
39
|
-
const oldFormNameRef = useRef(void 0);
|
|
40
|
-
if (formName && oldFormNameRef.current !== formName) {
|
|
41
|
-
userEvents.updateSharedEventProperties({ page: formName });
|
|
42
|
-
userEvents.addPageEvent("Landed on page", { actionType: "navigate" });
|
|
43
|
-
oldFormNameRef.current = formName;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/utils/scrollToInvalidField.ts
|
|
48
|
-
var INVALID_FIELD_SELECTOR = ".adyen-kyc-field--error, .adyen-kyc-label__text--error";
|
|
49
|
-
var SCROLLABLE_OVERFLOW_VALUES = new Set([
|
|
50
|
-
"auto",
|
|
51
|
-
"scroll",
|
|
52
|
-
"overlay"
|
|
53
|
-
]);
|
|
54
|
-
var isWindow = (container) => container === window;
|
|
55
|
-
var getInvalidFieldTarget = (element) => element.closest(".adyen-kyc-field") ?? element;
|
|
56
|
-
var isCustomElement = (element) => element.tagName.includes("-");
|
|
57
|
-
var queryInvalidField = (root) => {
|
|
58
|
-
const invalidField = root.querySelector(INVALID_FIELD_SELECTOR);
|
|
59
|
-
if (invalidField) return getInvalidFieldTarget(invalidField);
|
|
60
|
-
for (const element of Array.from(root.querySelectorAll("*")).filter(isCustomElement)) {
|
|
61
|
-
if (!element.shadowRoot) continue;
|
|
62
|
-
const shadowInvalidField = queryInvalidField(element.shadowRoot);
|
|
63
|
-
if (shadowInvalidField) return shadowInvalidField;
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
};
|
|
67
|
-
var isElementVisibleInContainer = (element, container) => {
|
|
68
|
-
const elementRect = element.getBoundingClientRect();
|
|
69
|
-
if (isWindow(container)) return elementRect.top >= 0 && elementRect.bottom <= window.innerHeight;
|
|
70
|
-
const containerRect = container.getBoundingClientRect();
|
|
71
|
-
return elementRect.top >= containerRect.top && elementRect.bottom <= containerRect.bottom;
|
|
72
|
-
};
|
|
73
|
-
var findScrollContainer = (element) => {
|
|
74
|
-
let parent = element.parentElement;
|
|
75
|
-
while (parent) {
|
|
76
|
-
const style = window.getComputedStyle(parent);
|
|
77
|
-
const canScroll = parent.scrollHeight > parent.clientHeight;
|
|
78
|
-
const hasScrollableOverflow = SCROLLABLE_OVERFLOW_VALUES.has(style.overflowY);
|
|
79
|
-
if (canScroll && hasScrollableOverflow) return parent;
|
|
80
|
-
parent = parent.parentElement;
|
|
81
|
-
}
|
|
82
|
-
return window;
|
|
83
|
-
};
|
|
84
|
-
var scrollElementIntoContainer = (element, container) => {
|
|
85
|
-
if (isWindow(container)) {
|
|
86
|
-
element.scrollIntoView({
|
|
87
|
-
behavior: "smooth",
|
|
88
|
-
block: "center"
|
|
89
|
-
});
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const elementRect = element.getBoundingClientRect();
|
|
93
|
-
const containerRect = container.getBoundingClientRect();
|
|
94
|
-
const offset = elementRect.top - containerRect.top - containerRect.height / 3;
|
|
95
|
-
container.scrollBy({
|
|
96
|
-
top: offset,
|
|
97
|
-
behavior: "smooth"
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
var scrollToInvalidField = () => {
|
|
101
|
-
const invalidField = queryInvalidField(document);
|
|
102
|
-
if (!invalidField) return;
|
|
103
|
-
const container = findScrollContainer(invalidField);
|
|
104
|
-
if (isElementVisibleInContainer(invalidField, container)) return;
|
|
105
|
-
scrollElementIntoContainer(invalidField, container);
|
|
106
|
-
};
|
|
107
|
-
//#endregion
|
|
108
|
-
//#region src/hooks/useFormComposer.ts
|
|
109
|
-
var logger$1 = createLogger();
|
|
110
|
-
/**
|
|
111
|
-
* The step we open to for editing an existing entity should be the summary if there are verification errors
|
|
112
|
-
* Otherwise (including for a new entity), just show the first step
|
|
113
|
-
*/
|
|
114
|
-
var getOpeningStep = (forms, remediationActions) => {
|
|
115
|
-
if (remediationActions && Object.keys(remediationActions).length > 0) {
|
|
116
|
-
const allRemediationActions = Object.values(remediationActions).flat().filter((rem) => rem.forms?.length > 0);
|
|
117
|
-
if (allRemediationActions.length === 1 && allRemediationActions[0]?.forms.length === 1) {
|
|
118
|
-
const form = forms.find((form) => form?.formId === allRemediationActions[0]?.forms[0]);
|
|
119
|
-
if (form) return form;
|
|
120
|
-
}
|
|
121
|
-
return forms[forms.length - 1];
|
|
122
|
-
}
|
|
123
|
-
return forms[0];
|
|
124
|
-
};
|
|
125
|
-
var useFormComposer = ({ problems, navigationTrackingParams, forms, externalBackClick, onSubmit, triggerValidation }) => {
|
|
126
|
-
const userEvents = useAnalyticsContext();
|
|
127
|
-
const [shouldValidate, setShouldValidate] = useState(false);
|
|
128
|
-
const [activeForm, setActiveForm] = useState(forms[0]);
|
|
129
|
-
const isFormSummaryStep = (form) => form.formId === summaryStep.formId;
|
|
130
|
-
const getFormIndex = (formId) => forms.findIndex((form) => form.formId === formId);
|
|
131
|
-
const currentStep = getFormIndex(activeForm.formId);
|
|
132
|
-
const totalSteps = forms.length;
|
|
133
|
-
const isFinalStep = currentStep === totalSteps - 1;
|
|
134
|
-
const isFirstStep = currentStep === 0;
|
|
135
|
-
const firstStepId = forms[0]?.formId;
|
|
136
|
-
usePageLandedEvent(activeForm.formName);
|
|
137
|
-
const [oldForms, setOldForms] = useState(forms);
|
|
138
|
-
if (oldForms !== forms) {
|
|
139
|
-
setActiveForm((activeForm) => forms.find(({ formId }) => formId === activeForm.formId) ?? activeForm);
|
|
140
|
-
setOldForms(forms);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Opening step can be calculated once since the problems are already known on drop-in load
|
|
144
|
-
*/
|
|
145
|
-
const [oldFirstStepId, setOldFirstStepId] = useState(void 0);
|
|
146
|
-
if (oldFirstStepId !== firstStepId) {
|
|
147
|
-
/** TODO: need a better solution
|
|
148
|
-
* If firstStepId changes it means form configurations are being setup,
|
|
149
|
-
* not able to put forms as the dependency here as it also updates whenever validity changes
|
|
150
|
-
* should separate out forms into forms and validity
|
|
151
|
-
***/
|
|
152
|
-
setActiveForm(getOpeningStep(forms, problems?.remediationActions));
|
|
153
|
-
setOldFirstStepId(firstStepId);
|
|
154
|
-
}
|
|
155
|
-
const gotoFormByFormIndex = (nextFormIndex, currentForms) => {
|
|
156
|
-
setActiveForm(currentForms?.[nextFormIndex] ?? forms[nextFormIndex]);
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* We often run into a situation where we want to navigate to a specific form immediately after
|
|
160
|
-
* rearranging the forms in the flow.
|
|
161
|
-
*
|
|
162
|
-
* The issue here is that the callback, (e.g. {@link IdVerificationMethod.handleVerifyByInvite})
|
|
163
|
-
* has a reference only to the current forms, not what the forms will be post-rearrangement.
|
|
164
|
-
* Hence, it is impossible to call {@link gotoFormByFormIndex} because we have no idea what the
|
|
165
|
-
* eventual index of the form will be.
|
|
166
|
-
*
|
|
167
|
-
* The solution: set a desired form ID, then resolve the navigation as part of the render
|
|
168
|
-
* once {@link forms} contains it. The subsequent {@link gotoFormByFormIndex} will immediately
|
|
169
|
-
* cancel the current render and trigger a new one.
|
|
170
|
-
*/
|
|
171
|
-
const [desiredFormId, setDesiredFormId] = useState();
|
|
172
|
-
if (desiredFormId) {
|
|
173
|
-
const targetFormIndex = forms.findIndex((form) => form.formId === desiredFormId);
|
|
174
|
-
if (targetFormIndex === -1) logger$1.warn(`Desired form ${desiredFormId} not present. \nCurrent forms: ${forms.map((f) => f.formId).join(", ")}`);
|
|
175
|
-
else {
|
|
176
|
-
setDesiredFormId(void 0);
|
|
177
|
-
gotoFormByFormIndex(targetFormIndex);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
const gotoFormByFormId = (formId) => {
|
|
181
|
-
setDesiredFormId(formId);
|
|
182
|
-
};
|
|
183
|
-
const trackSubmitClick = () => {
|
|
184
|
-
trackNavigation({
|
|
185
|
-
userEvents,
|
|
186
|
-
actionType: "submit",
|
|
187
|
-
label: "submit",
|
|
188
|
-
additionalTrackingParams: navigationTrackingParams
|
|
189
|
-
});
|
|
190
|
-
};
|
|
191
|
-
const handleNextClick = async (updatedForms) => {
|
|
192
|
-
const currentForms = updatedForms ?? forms;
|
|
193
|
-
if (isFormSummaryStep(activeForm)) {
|
|
194
|
-
trackSubmitClick();
|
|
195
|
-
onSubmit();
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Returns validation result of async validators if any
|
|
200
|
-
*/
|
|
201
|
-
const isAsyncValidationValid = await triggerValidation?.(activeForm.formId) ?? true;
|
|
202
|
-
/**
|
|
203
|
-
* Checks if both static validations and asyncValidations pass
|
|
204
|
-
*/
|
|
205
|
-
if (!activeForm.isValid || !isAsyncValidationValid) {
|
|
206
|
-
/**
|
|
207
|
-
* shouldValidate is not required with useMultiForm
|
|
208
|
-
*/
|
|
209
|
-
setShouldValidate(true);
|
|
210
|
-
requestAnimationFrame(scrollToInvalidField);
|
|
211
|
-
trackNavigation({
|
|
212
|
-
userEvents,
|
|
213
|
-
actionType: "next",
|
|
214
|
-
label: "next",
|
|
215
|
-
returnValue: "validation error",
|
|
216
|
-
additionalTrackingParams: navigationTrackingParams
|
|
217
|
-
});
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (isFinalStep) {
|
|
221
|
-
trackSubmitClick();
|
|
222
|
-
onSubmit();
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
setShouldValidate(false);
|
|
226
|
-
const toFormIndex = currentStep + 1;
|
|
227
|
-
gotoFormByFormIndex(toFormIndex, currentForms);
|
|
228
|
-
trackNavigation({
|
|
229
|
-
userEvents,
|
|
230
|
-
actionType: "next",
|
|
231
|
-
toForm: currentForms[toFormIndex]?.formName,
|
|
232
|
-
label: "next",
|
|
233
|
-
returnValue: "success",
|
|
234
|
-
additionalTrackingParams: navigationTrackingParams
|
|
235
|
-
});
|
|
236
|
-
};
|
|
237
|
-
const handleBackClick = () => {
|
|
238
|
-
if (currentStep > 0) {
|
|
239
|
-
const toForm = forms[currentStep - 1];
|
|
240
|
-
setActiveForm(toForm);
|
|
241
|
-
trackNavigation({
|
|
242
|
-
userEvents,
|
|
243
|
-
actionType: "back",
|
|
244
|
-
toForm: toForm?.formName,
|
|
245
|
-
label: "back",
|
|
246
|
-
additionalTrackingParams: navigationTrackingParams
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
return {
|
|
251
|
-
handleBackClick: isFirstStep ? externalBackClick : handleBackClick,
|
|
252
|
-
handleNextClick,
|
|
253
|
-
gotoFormByFormIndex,
|
|
254
|
-
gotoFormByFormId,
|
|
255
|
-
activeForm,
|
|
256
|
-
shouldValidate,
|
|
257
|
-
setShouldValidate,
|
|
258
|
-
steps: {
|
|
259
|
-
current: currentStep,
|
|
260
|
-
total: totalSteps
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/context/FormRouterContext/FormRouterContextProvider.tsx
|
|
266
|
-
var logger = createLogger();
|
|
267
|
-
function FormRouterContextProvider({ children, forms, setFormIndex, goToFormByFormId }) {
|
|
268
|
-
const fieldActionsRef = useRef({});
|
|
269
|
-
const registerFieldAction = useCallback((fieldName, action) => {
|
|
270
|
-
fieldActionsRef.current[fieldName] = action;
|
|
271
|
-
}, []);
|
|
272
|
-
const unregisterFieldAction = useCallback((fieldName) => {
|
|
273
|
-
delete fieldActionsRef.current[fieldName];
|
|
274
|
-
}, []);
|
|
275
|
-
const getFieldAction = useCallback((fieldName) => {
|
|
276
|
-
return fieldActionsRef.current[fieldName];
|
|
277
|
-
}, []);
|
|
278
|
-
const contextValue = useMemo(() => ({
|
|
279
|
-
setFormIndex,
|
|
280
|
-
goToFormByFormId,
|
|
281
|
-
goToFormByFieldName: (fieldName) => {
|
|
282
|
-
if (fieldName === "idDocument") fieldName = "idVerificationMethod";
|
|
283
|
-
const formIndex = forms.findIndex((form) => form?.fields?.some((field) => field === fieldName));
|
|
284
|
-
if (formIndex > -1) setFormIndex(formIndex);
|
|
285
|
-
else logger.error("No form was found to have that field so form navigation failed.");
|
|
286
|
-
},
|
|
287
|
-
registerFieldAction,
|
|
288
|
-
unregisterFieldAction,
|
|
289
|
-
getFieldAction
|
|
290
|
-
}), [
|
|
291
|
-
setFormIndex,
|
|
292
|
-
goToFormByFormId,
|
|
293
|
-
registerFieldAction,
|
|
294
|
-
unregisterFieldAction,
|
|
295
|
-
getFieldAction,
|
|
296
|
-
forms
|
|
297
|
-
]);
|
|
298
|
-
return /* @__PURE__ */ jsx(FormRouterContext.Provider, {
|
|
299
|
-
value: contextValue,
|
|
300
|
-
children
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
var FormFlow_module_default = {
|
|
304
|
-
"form-flow": "_form-flow_lhddu_1",
|
|
305
|
-
formFlow: "_form-flow_lhddu_1",
|
|
306
|
-
"form-flow-content": "_form-flow-content_lhddu_9",
|
|
307
|
-
formFlowContent: "_form-flow-content_lhddu_9",
|
|
308
|
-
"form-flow-footer": "_form-flow-footer_lhddu_30",
|
|
309
|
-
formFlowFooter: "_form-flow-footer_lhddu_30",
|
|
310
|
-
"form-flow-footer-border": "_form-flow-footer-border_lhddu_45",
|
|
311
|
-
formFlowFooterBorder: "_form-flow-footer-border_lhddu_45",
|
|
312
|
-
"form-flow-actions": "_form-flow-actions_lhddu_49",
|
|
313
|
-
formFlowActions: "_form-flow-actions_lhddu_49",
|
|
314
|
-
"form-flow-primary-actions": "_form-flow-primary-actions_lhddu_56",
|
|
315
|
-
formFlowPrimaryActions: "_form-flow-primary-actions_lhddu_56"
|
|
316
|
-
};
|
|
317
|
-
//#endregion
|
|
318
|
-
//#region src/components/Shared/FormFlow/FormFlow.tsx
|
|
319
|
-
var FormFlow = ({ asModal = false, children, currentStep = 0, disableBackButton, disableNextButton, nextButtonLoading = false, forms, activeForm, gotoFormByFormIndex, gotoFormByFormId, handleBackClick, handleCancelClick, handleNextClick, loadingStatus, summary, summaryComponent, totalSteps = 1 }) => {
|
|
320
|
-
const contentRef = useRef(null);
|
|
321
|
-
const userEvents = useAnalyticsContext();
|
|
322
|
-
const { t } = useTranslation("common");
|
|
323
|
-
const [isConfirmPresented, setIsConfirmPresented] = useState(false);
|
|
324
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
325
|
-
const isActionDisabled = isSubmitting || isConfirmPresented || loadingStatus === "loading";
|
|
326
|
-
const hasBackButton = !!handleBackClick;
|
|
327
|
-
const hasCancelButton = !!handleCancelClick;
|
|
328
|
-
const isFirstStep = currentStep === 0;
|
|
329
|
-
const isLastStep = currentStep === totalSteps - 1;
|
|
330
|
-
const isSingleStepForm = totalSteps < 2;
|
|
331
|
-
const progress = Math.floor(currentStep / (totalSteps - 1) * 100);
|
|
332
|
-
const scrollToTop = () => {
|
|
333
|
-
if (contentRef.current) contentRef.current.scroll({
|
|
334
|
-
top: 0,
|
|
335
|
-
behavior: "smooth"
|
|
336
|
-
});
|
|
337
|
-
};
|
|
338
|
-
const handleSubmit = () => {
|
|
339
|
-
setIsSubmitting(true);
|
|
340
|
-
Promise.resolve(handleNextClick()).then(() => {
|
|
341
|
-
setIsSubmitting(false);
|
|
342
|
-
scrollToTop();
|
|
343
|
-
});
|
|
344
|
-
};
|
|
345
|
-
const handleNext = () => {
|
|
346
|
-
scrollToTop();
|
|
347
|
-
handleNextClick();
|
|
348
|
-
};
|
|
349
|
-
const handleBack = () => {
|
|
350
|
-
scrollToTop();
|
|
351
|
-
handleBackClick?.();
|
|
352
|
-
};
|
|
353
|
-
const handleDismiss = () => {
|
|
354
|
-
if (!hasCancelButton) return;
|
|
355
|
-
setIsConfirmPresented(true);
|
|
356
|
-
};
|
|
357
|
-
const handleCancelDismiss = () => {
|
|
358
|
-
userEvents.addPageEvent("Closed modal", {
|
|
359
|
-
actionType: "close",
|
|
360
|
-
label: "cancel"
|
|
361
|
-
});
|
|
362
|
-
setIsConfirmPresented(false);
|
|
363
|
-
};
|
|
364
|
-
const handleConfirmDismiss = () => {
|
|
365
|
-
userEvents.addPageEvent("Clicked button", {
|
|
366
|
-
actionType: "navigate",
|
|
367
|
-
label: "leave"
|
|
368
|
-
});
|
|
369
|
-
setIsConfirmPresented(false);
|
|
370
|
-
handleCancelClick?.();
|
|
371
|
-
};
|
|
372
|
-
const footerClassName = cx(FormFlow_module_default.formFlowFooter, { [FormFlow_module_default.formFlowFooterBorder]: isSingleStepForm });
|
|
373
|
-
return /* @__PURE__ */ jsxs(MaybeModal, {
|
|
374
|
-
inline: !asModal,
|
|
375
|
-
onClose: handleDismiss,
|
|
376
|
-
size: "large",
|
|
377
|
-
showCloseButton: hasCancelButton,
|
|
378
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
379
|
-
ref: contentRef,
|
|
380
|
-
className: FormFlow_module_default.formFlow,
|
|
381
|
-
"data-form-valid": activeForm.isValid,
|
|
382
|
-
"data-testid": "form-flow",
|
|
383
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
384
|
-
className: FormFlow_module_default.formFlowContent,
|
|
385
|
-
children: /* @__PURE__ */ jsx(LoaderWrapper, {
|
|
386
|
-
status: loadingStatus,
|
|
387
|
-
formOpacityWhenLoading: 0,
|
|
388
|
-
loaderSize: "large",
|
|
389
|
-
children: /* @__PURE__ */ jsx(FormRouterContextProvider, {
|
|
390
|
-
forms,
|
|
391
|
-
setFormIndex: gotoFormByFormIndex,
|
|
392
|
-
goToFormByFormId: gotoFormByFormId,
|
|
393
|
-
children: isLastStep ? summaryComponent ? summaryComponent : summary !== void 0 ? /* @__PURE__ */ jsx(Summary, {
|
|
394
|
-
...summary,
|
|
395
|
-
forms,
|
|
396
|
-
gotoForm: gotoFormByFormIndex
|
|
397
|
-
}) : children : children
|
|
398
|
-
})
|
|
399
|
-
})
|
|
400
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
401
|
-
className: footerClassName,
|
|
402
|
-
children: [!isSingleStepForm && /* @__PURE__ */ jsx(ProgressBar, {
|
|
403
|
-
ariaLabel: t(($) => $["progress"]),
|
|
404
|
-
progress
|
|
405
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
406
|
-
className: FormFlow_module_default.formFlowActions,
|
|
407
|
-
children: [
|
|
408
|
-
isFirstStep && hasCancelButton && /* @__PURE__ */ jsx(Button, {
|
|
409
|
-
disabled: isActionDisabled || disableBackButton,
|
|
410
|
-
onClick: handleDismiss,
|
|
411
|
-
variant: "secondary",
|
|
412
|
-
children: t(($) => $["cancel"])
|
|
413
|
-
}),
|
|
414
|
-
!isFirstStep && hasBackButton && /* @__PURE__ */ jsx(Button, {
|
|
415
|
-
disabled: isActionDisabled || disableBackButton,
|
|
416
|
-
icon: "chevron-left",
|
|
417
|
-
onClick: handleBack,
|
|
418
|
-
variant: "secondary",
|
|
419
|
-
children: t(($) => $["back"])
|
|
420
|
-
}),
|
|
421
|
-
/* @__PURE__ */ jsx("div", {
|
|
422
|
-
className: FormFlow_module_default.formFlowPrimaryActions,
|
|
423
|
-
children: isLastStep ? /* @__PURE__ */ jsx(Button, {
|
|
424
|
-
onClick: handleSubmit,
|
|
425
|
-
loading: isSubmitting,
|
|
426
|
-
children: t(($) => $["submit"])
|
|
427
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
428
|
-
onClick: handleNext,
|
|
429
|
-
disabled: isActionDisabled || disableNextButton,
|
|
430
|
-
loading: nextButtonLoading,
|
|
431
|
-
children: t(($) => $["continue"])
|
|
432
|
-
})
|
|
433
|
-
})
|
|
434
|
-
]
|
|
435
|
-
})]
|
|
436
|
-
})]
|
|
437
|
-
}), isConfirmPresented && /* @__PURE__ */ jsx(Confirm, {
|
|
438
|
-
confirmText: t(($) => $["leave"]),
|
|
439
|
-
description: t(($) => $["unsavedChangesDescription"]),
|
|
440
|
-
onCancel: handleCancelDismiss,
|
|
441
|
-
onConfirm: handleConfirmDismiss,
|
|
442
|
-
title: t(($) => $["unsavedChanges"])
|
|
443
|
-
})]
|
|
444
|
-
});
|
|
445
|
-
};
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region src/utils/dropinUtils.ts
|
|
448
|
-
/**
|
|
449
|
-
* @@description Based requiredfields and optionalFields determine what forms need to be shown and add a summaryStep in the dropin
|
|
450
|
-
*
|
|
451
|
-
* @param forms
|
|
452
|
-
* @param requiredFields
|
|
453
|
-
* @param optionalFields
|
|
454
|
-
* @param skipSummary
|
|
455
|
-
*/
|
|
456
|
-
var getRequiredForms = (forms, requiredFields, optionalFields, skipSummary) => {
|
|
457
|
-
const reasons = [];
|
|
458
|
-
const requiredForms = Object.values(forms).filter(({ formId }) => {
|
|
459
|
-
if (requiredFields || optionalFields) {
|
|
460
|
-
const hasRequired = Boolean(requiredFields?.[formId]?.length);
|
|
461
|
-
const hasOptional = Boolean(optionalFields?.[formId]?.length);
|
|
462
|
-
const isIncluded = hasRequired || hasOptional;
|
|
463
|
-
const inclusionReasons = [];
|
|
464
|
-
if (hasRequired) inclusionReasons.push("has required fields");
|
|
465
|
-
if (hasOptional) inclusionReasons.push("has optional fields");
|
|
466
|
-
if (isIncluded) reasons.push(`Form '${formId}': INCLUDED (${inclusionReasons.join(" & ")})`);
|
|
467
|
-
else reasons.push(`Form '${formId}': EXCLUDED (no required or optional fields)`);
|
|
468
|
-
return isIncluded;
|
|
469
|
-
}
|
|
470
|
-
reasons.push(`Form '${formId}': INCLUDED (no required/optional fields check)`);
|
|
471
|
-
return true;
|
|
472
|
-
});
|
|
473
|
-
formDebugInfo.value = {
|
|
474
|
-
...formDebugInfo.value,
|
|
475
|
-
__FORMS__: {
|
|
476
|
-
status: "INFO",
|
|
477
|
-
reasons
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
if (skipSummary) return requiredForms;
|
|
481
|
-
return [...requiredForms, summaryStep];
|
|
482
|
-
};
|
|
483
|
-
/**
|
|
484
|
-
* @description Based on validity of fields from formValidity and existence of validationErrors/Verification errors from backend determine whether the forms needs to be shown as valid or not
|
|
485
|
-
*
|
|
486
|
-
* @param forms
|
|
487
|
-
* @param formValidity
|
|
488
|
-
* @param problems
|
|
489
|
-
*/
|
|
490
|
-
var addValidityToForms = (forms, formValidity, problems) => forms.map(({ formId, formName, fields }) => ({
|
|
491
|
-
formId,
|
|
492
|
-
formName,
|
|
493
|
-
fields,
|
|
494
|
-
isValid: formValidity?.[formId] ?? false,
|
|
495
|
-
hasServerValidationErrors: Boolean(problems?.validationErrors?.[formId])
|
|
496
|
-
}));
|
|
497
|
-
//#endregion
|
|
498
|
-
//#region src/context/FormContext/useFormContext.ts
|
|
499
|
-
function useFormContext() {
|
|
500
|
-
return useContext(FormContext);
|
|
501
|
-
}
|
|
502
|
-
//#endregion
|
|
503
|
-
export { FormFlow_module_default as a, FormFlow as i, addValidityToForms as n, useFormComposer as o, getRequiredForms as r, FormContextProvider as s, useFormContext as t };
|
package/dist/useId-BkDhUta2.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
try {
|
|
2
|
-
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9ada7f40-5820-4255-a593-c3c275ea186f", e._sentryDebugIdIdentifier = "sentry-dbid-9ada7f40-5820-4255-a593-c3c275ea186f");
|
|
4
|
-
} catch (e) {}
|
|
5
|
-
import { useState } from "preact/hooks";
|
|
6
|
-
//#region src/utils/uuid.ts
|
|
7
|
-
function uuidv4() {
|
|
8
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
9
|
-
let r = Math.random() * 16 | 0;
|
|
10
|
-
return (c == "x" ? r : r & 3 | 8).toString(16);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/utils/useId.ts
|
|
15
|
-
/**
|
|
16
|
-
* We can't use {@link import('preact/hooks').useId} because it doesn't guarantee uniqueness across
|
|
17
|
-
* different render trees. So multiple components mounted on the same page could have collisions.
|
|
18
|
-
*
|
|
19
|
-
* Therefore, we instead calculate a uuid and prepend a prefix.
|
|
20
|
-
*
|
|
21
|
-
* @param prefix a prefix to identify this usage
|
|
22
|
-
*/
|
|
23
|
-
var useId = (prefix) => {
|
|
24
|
-
const [uuid] = useState(uuidv4());
|
|
25
|
-
return `${prefix}_${uuid}`;
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { useId as t };
|