@adyen/kyc-components 4.25.0 → 4.26.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/{4-people-DKuivE0m.js → 4-people-CAxQpi_3.js} +2 -2
- package/dist/{AcceptTermsOfServiceWorkflow-BKWCrZdZ.js → AcceptTermsOfServiceWorkflow-eOcHITwQ.js} +4 -4
- package/dist/{Accordion-D_DOaWj2.js → Accordion-BAdwrgCR.js} +4 -24
- package/dist/{AccountSetupRejected-BtcxtVKO.js → AccountSetupRejected-Jii0yaLC.js} +3 -4
- package/dist/{NodeRenderer-Z10yF5MV.js → AdaptiveWorkflow-B6SIOcbU.js} +87 -34
- package/dist/{AdaptiveWorkflowComponent-C4Q6NVtv.js → AdaptiveWorkflowComponent-we5_UgiI.js} +32 -33
- package/dist/{AddressFields-CFG2_P0x.js → AddressFields-Qq_8lUYz.js} +21 -27
- package/dist/{Avatar-k5lNd5KG.js → Avatar-C2zeqSSB.js} +10 -8
- package/dist/{BusinessFinancingDropin-BjTnxk__.js → BusinessFinancingDropin-gMa--znJ.js} +61 -71
- package/dist/{BusinessFinancingPage-C4dAslMp.js → BusinessFinancingPage-BIdRvI7h.js} +7 -7
- package/dist/{BusinessRegistrationNumberField-Dz1uGvRQ.js → BusinessRegistrationNumberField-Vr3KBWJD.js} +7 -8
- package/dist/{BusinessRegistrationNumberFieldGroup-BFPrFa1_.js → BusinessRegistrationNumberFieldGroup-DLGAFcRN.js} +7 -8
- package/dist/{BusinessTypeSelectionPage-DeWD37jR.js → BusinessTypeSelectionPage-9B2SxGcV.js} +16 -17
- package/dist/{Button-BxdC8cVB.js → Button-Dwr6jvJZ.js} +2 -2
- package/dist/Checkbox-zAGhz7rC.js +114 -0
- package/dist/{ComponentGroup-S6c3rVoX.js → ComponentGroup-DH_CH6bM.js} +4 -4
- package/dist/{ConstitutionalDocument-CNNhKkzD.js → ConstitutionalDocument-DMNlJJzp.js} +25 -28
- package/dist/{ContactDetails-_HCOKj3-.js → ContactDetails-kwe-LwUD.js} +8 -13
- package/dist/{ContextGuidance-v-d9RQuo.js → ContextGuidance-1tQjHxTm.js} +3 -3
- package/dist/CountryField-BkNURmjP.js +56 -0
- package/dist/{Currency-3Z9i_AhY.js → Currency-BjBbhCzV.js} +10 -12
- package/dist/{CustomerSupport-B0UJHtAq.js → CustomerSupport-CT4s3fyC.js} +17 -17
- package/dist/DateField-CJeu0KoS.js +73 -0
- package/dist/{DebugModal-DgbagO5Z.js → DebugModal-YjFFNeOM.js} +12 -17
- package/dist/{DecisionMakerDetails-RF9BoMYF.js → DecisionMakerDetails-B4aCl2kl.js} +21 -24
- package/dist/{DecisionMakerDetailsPage-CGOs2Ubt.js → DecisionMakerDetailsPage-Dg_RbdxY.js} +43 -40
- package/dist/{DecisionMakers-qRoXooYA.js → DecisionMakers-Cq3yVb54.js} +55 -61
- package/dist/{DetailViewLayout-DNCGEd7b.js → DetailViewLayout-DJgAzdlZ.js} +8 -6
- package/dist/{Dropzone-cewfCgXt.js → Dropzone-Cgqct7ux.js} +8 -8
- package/dist/EmailField-CVwmsS5d.js +61 -0
- package/dist/{EmbeddedStatus-Keg7UojY.js → EmbeddedStatus-4YjyzkcD.js} +4 -4
- package/dist/{EndStateLayout-GHEYl82p.js → EndStateLayout-C5Pqler-.js} +3 -3
- package/dist/{EntityAssociation-BPtrqdQR.js → EntityAssociation-DzNk5XbC.js} +7 -7
- package/dist/{ErrorPanel-PefRq1M4.js → ErrorPanel-DtbpEeJk.js} +24 -19
- package/dist/{GlobalEntryModal-CTGSdkW7.js → GlobalEntryModal-D9rqts-z.js} +203 -78
- package/dist/{GlobalEntryPage-CdGXV-QZ.js → GlobalEntryPage-OTglAvMX.js} +10 -10
- package/dist/Icon-_YUEZg1p.js +175 -0
- package/dist/{IdentityNumber-Cz6-4YcM.js → IdentityNumber-9SwAYweE.js} +10 -12
- package/dist/{IdentityNumberFieldGroup-D2PV_4A5.js → IdentityNumberFieldGroup-B9SxTHei.js} +16 -14
- package/dist/{IdentityScreeningWorkflow-mbcaIctn.js → IdentityScreeningWorkflow-C-nLWlJS.js} +16 -16
- package/dist/{Image-Bn_Yyuof.js → Image-CxnjHtP1.js} +1 -1
- package/dist/{IndividualDropin-D1UOavsw.js → IndividualDropin-BpFRq3S4.js} +266 -281
- package/dist/{IndustryCodeFieldGroup-DmOqxPIg.js → IndustryCodeFieldGroup-CEWUFYmK.js} +9 -10
- package/dist/{InputDate-B0RNGCq2.js → InputDate-DjUm9FiK.js} +6 -29
- package/dist/InputDate.utils-D4Ov0KIl.js +25 -0
- package/dist/{InputGroup-B4U3QVEp.js → InputGroup-Bv005B22.js} +7 -6
- package/dist/{InputText-CwPK55J0.js → InputText-DtoBABE5.js} +42 -4
- package/dist/{Introduction-DFW6EaLG.js → Introduction-GW5FJSTJ.js} +9 -9
- package/dist/{InvitedDecisionMakerComponent-hdQc0T7D.js → InvitedDecisionMakerComponent-tahktJVa.js} +45 -45
- package/dist/{JpAddressFields-CzGnXBMk.js → JpAddressFields-CpRh_gFz.js} +13 -13
- package/dist/{LegalCompanyNameField-CV2EgRCw.js → LegalCompanyNameField-Coff77lN.js} +5 -5
- package/dist/{LegalRepresentativeDetailsPage-BiAfoErR.js → LegalRepresentativeDetailsPage-CXMGtJvO.js} +35 -34
- package/dist/{Link-C3dYYTm_.js → Link-D0Yqc2r0.js} +7 -6
- package/dist/{List-ywoRPg-q.js → List-qvNxW9lm.js} +3 -2
- package/dist/{ListItem-CHGVbHhB.js → ListItem-DY-qq1lS.js} +29 -4
- package/dist/{Loader-BVtlpTeo.js → Loader-BDaKGf77.js} +1 -1
- package/dist/{Modal-Dq44ZUNN.js → Modal-Dx_NESnV.js} +25 -5
- package/dist/{Name-BfQr3et_.js → Name-CrLaukRh.js} +5 -5
- package/dist/NumberField-CS93IGoS.js +60 -0
- package/dist/{PatriotActDisclosure-BNAsJXEL.js → PatriotActDisclosure-C3jKKi6y.js} +11 -12
- package/dist/{PayoutDetailsDropin-NyizAaYy.js → PayoutDetailsDropin-BxOJ9P17.js} +163 -158
- package/dist/{PayoutDetailsPage-NM0Eqf4K.js → PayoutDetailsPage-BxaCk685.js} +10 -9
- package/dist/{Review-CzgmjDcZ.js → Review-C81Qsrkg.js} +25 -24
- package/dist/{RootBusinessDetailsPage-B1a0hu8F.js → RootBusinessDetailsPage-CwRyRbEv.js} +9 -7
- package/dist/{RootBusinessLinesPage-Dv1uT7OS.js → RootBusinessLinesPage-C3GZQ-KO.js} +48 -53
- package/dist/{RootIndividualDetailsPage-vkjzmyF7.js → RootIndividualDetailsPage-CvVVlkJI.js} +42 -39
- package/dist/{Select-prMx73V9.js → Select-AiAom5JL.js} +330 -19
- package/dist/{SignPCIComponent-CIkdVNH2.js → SignPCIComponent-Dmr9dDYB.js} +19 -23
- package/dist/{SingpassSelection-B6NONcr4.js → SingpassSelection-BXHvwmgp.js} +7 -7
- package/dist/Skeleton-7xDqhYr-.js +30 -0
- package/dist/{SoleProprietorshipPage-BmNs557C.js → SoleProprietorshipPage-DKL4anrn.js} +7 -7
- package/dist/{SourceOfFundsPage-B5nZ3MjN.js → SourceOfFundsPage-2dxP6dlL.js} +46 -58
- package/dist/{SourceOfFundsWorkflow-IkLZG9JI.js → SourceOfFundsWorkflow-Didn1fld.js} +4 -4
- package/dist/{StackLayout-IUdNMDgW.js → StackLayout-J1ynSX-P.js} +6 -5
- package/dist/{utils-lIizXlcC.js → StateField-BoIVEnaZ.js} +89 -3
- package/dist/{Step-BJh4XZae.js → Step-CiwqdcuY.js} +19 -13
- package/dist/SummarySection-B6A_AT1m.js +60 -0
- package/dist/{Task-yQcY16x1.js → Task-CJDcviJ6.js} +8 -8
- package/dist/{TaskGroup-C9iFHpux.js → TaskGroup-BXkrbyTG.js} +5 -5
- package/dist/{TaskListItem-ChlmCIfF.js → TaskListItem-CQXvVRWG.js} +11 -11
- package/dist/{TaskStepperContextProvider-I7talGDO.js → TaskStepperContextProvider-9wlnwii7.js} +1 -1
- package/dist/{TaskVerificationStatus-Bd5Eftf2.js → TaskVerificationStatus-zoxTZ2mt.js} +3 -3
- package/dist/{TaxInformationFieldGroup-Dq0J9rBU.js → TaxInformationFieldGroup-CnaGMge9.js} +19 -18
- package/dist/{TaxReportingDropin-Cq3gBWtp.js → TaxReportingDropin-F4e4CxiC.js} +22 -26
- package/dist/{TaxReportingWorkflow-flQPRAPy.js → TaxReportingWorkflow-Caa_klQR.js} +4 -4
- package/dist/{TermsOfServiceManagement-BM5K4cpw.js → TermsOfServiceManagement-5x2f0QgC.js} +21 -30
- package/dist/{TextArea-C12oXMzX.js → TextArea-eJQFkYyd.js} +5 -5
- package/dist/TextField-Ca7rT4tr.js +73 -0
- package/dist/{TrustDetailsPage-z7s9FxVC.js → TrustDetailsPage-D3RkKlpJ.js} +59 -67
- package/dist/{TrustMemberCompanyPage-tU2HTiDG.js → TrustMemberCompanyPage-BvBxQg7D.js} +8 -8
- package/dist/{TrustMemberIndividualPage-BLBtnoSq.js → TrustMemberIndividualPage-D4idWK8j.js} +35 -34
- package/dist/{TrustMemberRoleAndTypePage-DIwrtOWr.js → TrustMemberRoleAndTypePage-CyKm_knd.js} +23 -30
- package/dist/{TrustMembersOverview-CowTgfIb.js → TrustMembersOverview-BnP0wZSf.js} +18 -22
- package/dist/{UboTaskItem-CZLDzQil.js → UboTaskItem-Degn5OyC.js} +8 -8
- package/dist/{UnincorporatedPartnershipIndividualPage-BT0j54-O.js → UnincorporatedPartnershipIndividualPage-Bgb4oCRJ.js} +35 -34
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DFOoV0wQ.js → UnincorporatedPartnershipMemberCompanyPage-T6SOH3Mv.js} +8 -8
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-D973uyHj.js → UnincorporatedPartnershipMemberRoleAndTypePage-BVfav_Z_.js} +14 -16
- package/dist/{UnincorporatedPartnershipMembersOverview-5w1BrDMI.js → UnincorporatedPartnershipMembersOverview-DPW48_Lv.js} +11 -14
- package/dist/VerificationErrorAlert-q1SEqBXx.js +68 -0
- package/dist/WebsiteField-CnOU49Hn.js +62 -0
- package/dist/{Workflow-CF-HUIjR.js → Workflow-D298oRt0.js} +9 -9
- package/dist/{accountHolderUtils-CAu4V0ed.js → accountHolderUtils-CLuKAgaj.js} +3 -3
- package/dist/adyen-business-financing.js +8 -9
- package/dist/adyen-individual-configuration.js +36 -36
- package/dist/adyen-individual-status.js +8 -9
- package/dist/adyen-invited-decision-maker.js +3 -3
- package/dist/adyen-onboarding.js +61 -59
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +6 -7
- package/dist/adyen-transfer-instrument-configuration.js +7 -8
- package/dist/adyen-transfer-instrument-management.js +16 -22
- package/dist/adyen-verification-status.js +7 -9
- package/dist/{arrow-right-D2hul7WG.js → arrow-right-BwP9nNDE.js} +2 -2
- package/dist/bafinUtils-CsDthERR.js +3548 -0
- package/dist/{bag-CRRS1aow.js → bag-Cnk9dcZg.js} +2 -2
- package/dist/{bank-BoirCLLW.js → bank-UssyP-aG.js} +2 -2
- package/dist/bg-BG-C7z9VtPy.js +7 -0
- package/dist/{bin-BOmfqfrr.js → bin--Ft4cPCj.js} +2 -2
- package/dist/{capital-DTjbiurV.js → capital-BbOFhTHY.js} +2 -2
- package/dist/{cash-stack-7KpYpBek.js → cash-stack-LTzc8hQZ.js} +2 -2
- package/dist/{certificate-BPuoJ6Ip.js → certificate-CswNcwlI.js} +2 -2
- package/dist/{checkmark-BiSLf8M1.js → checkmark-DH1abKZn.js} +2 -2
- package/dist/{checkmark-circle-Ams7bSve.js → checkmark-circle-VWM-JsI6.js} +2 -2
- package/dist/{checkmark-circle-fill-_p4ss4ac.js → checkmark-circle-fill-AuW2DQDT.js} +2 -2
- package/dist/{checkmark-small-3bw4ftPV.js → checkmark-small-B6vsnsSO.js} +2 -2
- package/dist/{chevron-down-GgZawvoy.js → chevron-down-BGAMP7CF.js} +2 -2
- package/dist/{chevron-left-TeZTTvo5.js → chevron-left-EjFIt8Cd.js} +2 -2
- package/dist/{chevron-right-Cg8XlTxx.js → chevron-right-B5zb9mkt.js} +2 -2
- package/dist/{chevron-up-COQUTli0.js → chevron-up-DZiittpJ.js} +2 -2
- package/dist/{circle-CypWzg83.js → circle-CygvxRY_.js} +2 -2
- package/dist/{circle-small-filled-DfdK2A35.js → circle-small-filled-PeElhgJU.js} +2 -2
- package/dist/{clock-DmfGJ2r9.js → clock-CQXEE5jK.js} +2 -2
- package/dist/{coins-CBvbB8_X.js → coins-C7syygUR.js} +2 -2
- package/dist/{constants-DAb_IqC6.js → constants-Dvga6KjU.js} +7 -8
- package/dist/{contract-D1_RJ_xh.js → contract-BWEAd7e-.js} +2 -2
- package/dist/{countries-BGMTpyJv.js → countries-ZMuvRtQR.js} +1 -1
- package/dist/{country-BEZkohEO.js → country-WYlusjTL.js} +2 -2
- package/dist/{cross-circle-fill-CUXdo1x-.js → cross-circle-fill-Bxj_fgQE.js} +2 -2
- package/dist/cross-circle-fill-small-DwUKcL9P.js +20 -0
- package/dist/{cross-BORHADVQ.js → cross-vK6qh9R0.js} +2 -2
- package/dist/cs-CZ-B_u3kWRS.js +7 -0
- package/dist/da-DK-s_nCUhFO.js +7 -0
- package/dist/de-DE-5lHcZmT6.js +7 -0
- package/dist/{decisionMakerRoles-JEb0ON4e.js → decisionMakerRoles-DA8MK9Dh.js} +2 -2
- package/dist/{document-1-qvV57JdS.js → document-1-BPWF8zKf.js} +2 -2
- package/dist/{document-person-DiJ7M8-D.js → document-person-DVRFNq7g.js} +2 -2
- package/dist/{documentUtils-CxjFpoJB.js → documentUtils-6K3LdjjN.js} +6 -4
- package/dist/{download-Ca4w0Yfr.js → download-DfdpoHdN.js} +2 -2
- package/dist/dropinUtils-CSlRmPSn.js +2572 -0
- package/dist/{edit-1-D8VhDchs.js → edit-1-BgVB06zI.js} +2 -2
- package/dist/el-GR-DTaQeK-A.js +7 -0
- package/dist/{entityAssociationUtil-CY0grcyH.js → entityAssociationUtil-BlfcBl3i.js} +1 -1
- package/dist/{error-DrzrPjvf.js → error-DjErFfKK.js} +3 -3
- package/dist/es-ES-tZMJvO6B.js +7 -0
- package/dist/es-LA-C0x1nQUQ.js +7 -0
- package/dist/et-EE-BqB-3lW_.js +7 -0
- package/dist/{external-link-Dy4le-8Q.js → external-link-BbXGAtFE.js} +2 -2
- package/dist/fi-FI-BpwWFhLW.js +7 -0
- package/dist/{form-rules-DhuNdiqF.js → form-rules-HzaYJh36.js} +90 -5
- package/dist/{formatValidationError-z2D5oU1e.js → formatValidationError-D3vBdIym.js} +2 -2
- package/dist/fr-FR-DMPXwPYV.js +7 -0
- package/dist/{getDefaultRegistrationNumberType-BNO2BcfK.js → getDefaultRegistrationNumberType-CiEvyeR9.js} +5 -7
- package/dist/{useAssociatedLegalEntity-BdcoiUby.js → getFormSlice-CxtXJ0-P.js} +23 -5
- package/dist/{getName-DgxRqagk.js → getName-Cii7OyRd.js} +2 -2
- package/dist/{getProblemsForEntity-BY_voJ99.js → getProblemsForEntity-mdb3Bfpj.js} +3 -3
- package/dist/{getTrustedDecisionMakers-Ta-pURcL.js → getTrustedDecisionMakers-D89oYOLp.js} +2 -2
- package/dist/getValidationError-DvQgc-X3.js +19 -0
- package/dist/{gift-Bs_mAgul.js → gift-BjS6ErNG.js} +2 -2
- package/dist/{graph-Co0JhGiY.js → graph-B8rX9eXr.js} +2 -2
- package/dist/{graph-up-DIvH9haf.js → graph-up-Dwaq7upe.js} +2 -2
- package/dist/{headquarter-BESfDGKh.js → headquarter-CXwws_UP.js} +2 -2
- package/dist/{hotel-Vne7G5M6.js → hotel-CD5Lv9P7.js} +2 -2
- package/dist/hr-HR-D5kV_w60.js +7 -0
- package/dist/{http-DsJtugN1.js → http-C8rt2BZk.js} +5 -4
- package/dist/hu-HU-Bl1dnZfO.js +7 -0
- package/dist/{image-BQM21XCk.js → image-BTE2a8ZV.js} +2 -2
- package/dist/{info-DExoPRH5.js → info-BTc0bCCM.js} +2 -2
- package/dist/{info-filled-11KMeUso.js → info-filled-DhYinieW.js} +2 -2
- package/dist/it-IT-DiuPLWbr.js +7 -0
- package/dist/ja-JP-COBWjdXk.js +7 -0
- package/dist/{legalArrangementUtils-C68JdH6I.js → legalArrangementUtils-Crgt_L7h.js} +1 -1
- package/dist/{location-zRH5zJ8c.js → location-CwE3Q0gg.js} +2 -2
- package/dist/lt-LT-D9Pum2_8.js +7 -0
- package/dist/lv-LV-DDcLP43G.js +7 -0
- package/dist/{mail-i1-zg-cv.js → mail-CIeugZTd.js} +2 -2
- package/dist/{mapAddressLocalizationToJpAddressSchema-DpOIaxj6.js → mapAddressLocalizationToJpAddressSchema-BLOAhwWM.js} +2 -2
- package/dist/{mapExistingFile-RrS8dCpX.js → mapExistingFile-BXfeQxev.js} +2 -2
- package/dist/{mapJpAddressSchemaToAddressLocalizations-wwD6Rp3Q.js → mapJpAddressSchemaToAddressLocalizations-cseKFm-l.js} +16 -15
- package/dist/{mapLegalEntityToIndividualSchema-DtT3pcZJ.js → mapLegalEntityToIndividualSchema-DvGFy20Z.js} +12 -13
- package/dist/{mapTransferInstrumentToPayoutAccount-BpXU-nP1.js → mapTransferInstrumentToPayoutAccount-Cq7PMPOa.js} +4 -4
- package/dist/{minus-circle-filled-CxUdRO8J.js → minus-circle-filled-96DZCdcJ.js} +2 -2
- package/dist/nl-NL-CBRRvqAY.js +7 -0
- package/dist/no-NO-C9lYR_fQ.js +7 -0
- package/dist/{options-horizontal-D86T_xAF.js → options-horizontal-BU9r-Xx3.js} +2 -2
- package/dist/{partner-Dje0ykF6.js → partner-C1SWc0pB.js} +2 -2
- package/dist/{pay-by-link-plane-DAiddPu6.js → pay-by-link-plane-xK4Zkol0.js} +2 -2
- package/dist/{payout-DKiGv3F9.js → payout-zGf0LNbo.js} +2 -2
- package/dist/{pdf-CC8vqpTo.js → pdf-Bbs3Ji9v.js} +157 -174
- package/dist/{pdf.worker.min-CdKJICZZ.js → pdf.worker.min-DTQpK-0h.js} +67 -58
- package/dist/{person-DgALGIIz.js → person-xTKhpEGR.js} +2 -2
- package/dist/pl-PL-CZST_1gV.js +7 -0
- package/dist/{plus-DlQKP2C9.js → plus-Cm_dWRpB.js} +2 -2
- package/dist/{plus-circle-filled-BntUOVIJ.js → plus-circle-filled-Df77eidx.js} +2 -2
- package/dist/{processCapabilities-CWE5UFt8.js → processCapabilities-FL4-KAbd.js} +7 -9
- package/dist/{processValidationErrors-CFU1x_1n.js → processValidationErrors-Cn-RYAun.js} +4 -4
- package/dist/pt-BR-C32QroLH.js +7 -0
- package/dist/pt-PT-ByfmK1XA.js +7 -0
- package/dist/{recurring-DZgT_ekJ.js → recurring-BfwVHJ2Z.js} +2 -2
- package/dist/resolveEnvironment-D8-1H8bU.js +2516 -0
- package/dist/{revenue-accelerate-aMLYFVW6.js → revenue-accelerate-ClN0cx7Z.js} +2 -2
- package/dist/ro-RO-YkglLwfY.js +7 -0
- package/dist/{save-uDNye08N.js → save-QK2A-teG.js} +2 -2
- package/dist/{search-0OS6oe8N.js → search-DVSyT7Q7.js} +2 -2
- package/dist/{uppercase-DvjwUM0n.js → sharedValidators-DODW7kuK.js} +5 -3
- package/dist/{show-BWoS9-Y1.js → show-BRWLIRSA.js} +2 -2
- package/dist/sk-SK-BYRIVzdY.js +7 -0
- package/dist/sl-SI-Cjub_bfF.js +7 -0
- package/dist/{solution-payments-BMal7uJZ.js → solution-payments-BZZceFVV.js} +2 -2
- package/dist/{store-N7ZA4FKy.js → store-DLKKLXhn.js} +2 -2
- package/dist/style.css +1418 -1157
- package/dist/styles-DYaAeu4q.js +1418 -1157
- package/dist/sv-SE-1re-9Lp8.js +7 -0
- package/dist/{terminal-1-0RlQpbUC.js → terminal-1-CpAyEdjO.js} +2 -2
- package/dist/{translation-DbATp_35.js → translation-CpH8D2NK.js} +34 -30
- package/dist/types/adaptiveWorkflow/component-registry.d.ts +19 -2
- package/dist/types/adaptiveWorkflow/components/NodeRenderer/NodeRenderer.d.ts +7 -0
- package/dist/types/adaptiveWorkflow/components/NodeRenderer/SimpleFieldRenderer.d.ts +2 -2
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/CountryField/CountryField.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/CountryField/contextMap.d.ts +10 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/DateField/DateField.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/DateField/contextMap.d.ts +9 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/DateField/validators.d.ts +2 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/EmailField/EmailField.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/EmailField/contextMap.d.ts +10 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/EmailField/validators.d.ts +2 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/NumberField/NumberField.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/NumberField/contextMap.d.ts +9 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/NumberField/validators.d.ts +2 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/TextField/TextField.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/TextField/contextMap.d.ts +10 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/TextField/validators.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/WebsiteField/WebsiteField.d.ts +4 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/WebsiteField/contextMap.d.ts +10 -0
- package/dist/types/adaptiveWorkflow/components/Shared/Fields/WebsiteField/validators.d.ts +3 -0
- package/dist/types/adaptiveWorkflow/utils/validators/getValidationError.d.ts +7 -0
- package/dist/types/adaptiveWorkflow/utils/validators/sharedValidators.d.ts +3 -0
- package/dist/types/adaptiveWorkflow/utils/validators/types.d.ts +6 -0
- package/dist/types/api/adaptive/useAdaptiveWorkflow.d.ts +1 -1
- package/dist/types/api/address/useAddressCleanse.d.ts +2 -2
- package/dist/types/api/address/useRetrieveAddress.d.ts +2 -2
- package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +2 -2
- package/dist/types/api/address/useSearchAddress.d.ts +2 -2
- package/dist/types/api/businessLines/useBusinessLines.d.ts +1 -1
- package/dist/types/api/companySearch/useCompanySearch.d.ts +6 -293
- package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
- package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
- package/dist/types/api/configurations/useVersionConfiguration.d.ts +2 -2
- package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
- package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
- package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
- package/dist/types/api/documents/useDocument.d.ts +1 -1
- package/dist/types/api/documents/useDocuments.d.ts +2 -2
- package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -3
- package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +2 -2
- package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -1
- package/dist/types/api/invitations/useInvitationStatus.d.ts +1 -1
- package/dist/types/api/invitedEntity/useInvitedEntityAssociationData.d.ts +2 -2
- package/dist/types/api/invitedEntity/useInvitedEntityRootCapabilities.d.ts +2 -2
- package/dist/types/api/invitedEntity/useInvitedEntityVerificationErrors.d.ts +2 -2
- package/dist/types/api/legalEntity/useLegalEntity.d.ts +9 -9
- package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
- package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -1
- package/dist/types/api/pci/usePciQuestionnaireList.d.ts +2 -2
- package/dist/types/api/pci/usePciStatus.d.ts +2 -2
- package/dist/types/api/pci/usePciTemplate.d.ts +2 -2
- package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
- package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
- package/dist/types/api/taskStatus/useTaskStatuses.d.ts +2 -2
- package/dist/types/api/taxClassification/useTaxClassification.d.ts +2 -2
- package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +2 -2
- package/dist/types/api/termsOfService/useTermsOfService.d.ts +2 -2
- package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
- package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +2 -2
- package/dist/types/api/tinVerification/useVerifyTin.d.ts +5 -245
- package/dist/types/api/toggles/useToggles.d.ts +1 -1
- package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
- package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +1 -1
- package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
- package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
- package/dist/types/api/validation/useValidatePhoneNumber.d.ts +2 -2
- package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
- package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +3 -2
- package/dist/types/components/Business/forms/rules.d.ts +3 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSummary.d.ts +3 -2
- package/dist/types/components/GlobalEntry/hooks/usePrefetchCompanySearch.d.ts +11 -0
- package/dist/types/components/GlobalEntry/rules.d.ts +1 -1
- package/dist/types/components/GlobalEntry/utils/submitGlobalEntry.d.ts +3 -1
- package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +3 -1
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +4 -2
- package/dist/types/components/Shared/NewSummary/NewSummary.d.ts +7 -6
- package/dist/types/components/Shared/SummarySection/SummarySection.d.ts +12 -4
- package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +2 -2
- package/dist/types/components/Shared/fields/RegistrationAndOperationalAddressFields/utils.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +11 -1
- package/dist/types/components/ui/atoms/Typography/Typography.types.d.ts +1 -1
- package/dist/types/context/SettingsContext/types.d.ts +8 -0
- package/dist/types/context/ToggleContext/types.d.ts +3 -13
- package/dist/types/utils/japanSupportUtils.d.ts +2 -2
- package/dist/types/utils/validatorUtils.d.ts +2 -0
- package/dist/{types-D6p5FQF-.js → types-BymnGWO9.js} +1 -1
- package/dist/{types-B9zXzag-.js → types-qahGXhtr.js} +1 -1
- package/dist/{upload-C5NC1E4N.js → upload-BI7LKlDm.js} +2 -2
- package/dist/{useAdaptiveWorkflow-DsQESk9f.js → useAdaptiveWorkflow-B35cXauP.js} +1 -1
- package/dist/{useBusinessDetailsData-dsYTeDom.js → useBusinessDetailsData-BEM6OCqH.js} +132 -150
- package/dist/{useBusinessLines-BhSN6qCH.js → useBusinessLines-0FcuDMzo.js} +1 -1
- package/dist/{useCanSeeIntroduction-BLGY7sE-.js → useCanSeeIntroduction-B6BDOCm_.js} +5 -5
- package/dist/{useDataMissingRemediations-ttUrk09_.js → useDataMissingRemediations-DKjYzfe2.js} +3 -3
- package/dist/{useForm-BFeaSvlP.js → useForm-fYu8sJ-i.js} +6 -6
- package/dist/{useHideTaskStepper-C_w6iUY-.js → useHideTaskStepper-BgCN--mG.js} +1 -1
- package/dist/{invalidateRootLegalEntity-B97dCa-s.js → useId-CEUET5IS.js} +32 -4
- package/dist/{useIndustryCodes-uAj90IyS.js → useIndustryCodes-La1cU8oH.js} +1 -1
- package/dist/{useLegalEntity-QQXN6YOm.js → useLegalEntity-CxeMoCm4.js} +4 -3
- package/dist/{useNavigate-J0sRAAoI.js → useNavigate-B1z7McBl.js} +33 -33
- package/dist/{useOnboardingStatus-CsGUjkm-.js → useOnboardingStatus-CX8IrDe_.js} +1 -1
- package/dist/{usePciQuestionnaireList-CFNJD8pS.js → usePciQuestionnaireList-CB_tjNsz.js} +1 -1
- package/dist/{useSalesChannels-huIL6Dhk.js → useSalesChannels-DJAmDo-r.js} +5 -5
- package/dist/{useScenarios-DV2TeNvN.js → useScenarios-DfE71fl7.js} +7 -6
- package/dist/{useSettingsContext-9O3Aqpfq.js → useSettingsContext-Bpf4UqRT.js} +6 -3
- package/dist/{useTaskLandedEvent-DwZHcMEQ.js → useTaskLandedEvent-BtuFBe20.js} +2 -2
- package/dist/{useTaskStatus-CgrhdaE_.js → useTaskStatus-4nAPf_uD.js} +1 -1
- package/dist/{useTermsOfServiceStatus-DbJDklA2.js → useTermsOfServiceStatus-FDpSDjco.js} +1 -1
- package/dist/{useTrustMembers-uhgi2qfN.js → useTrustMembers-D3sCwcaT.js} +9 -8
- package/dist/{useUnincorporatedPartnershipMembers-DVEWj1is.js → useUnincorporatedPartnershipMembers-DcfQJdVZ.js} +5 -5
- package/dist/{useUpdateBusinessLines-DCKYTzxd.js → useUpdateBusinessLines-B-pF2YT-.js} +1 -1
- package/dist/{utils-SKYT7xU4.js → utils-BFxg3gPM.js} +2 -2
- package/dist/{utils-D8pwjFm5.js → utils-CcBgYW2P.js} +5 -6
- package/dist/utils-Oc-YLiM0.js +214 -0
- package/dist/{validate-BBVJuFm5.js → validate-1rlz-OH4.js} +15 -17
- package/dist/{validate-Bkpa-y5Q.js → validate-B2P8hpA5.js} +7 -7
- package/dist/{validate-t6pT7AaZ.js → validate-S1Bm0XnT.js} +3 -3
- package/dist/{validate-Dmdw3pYn.js → validate-x5CYfY5E.js} +2 -2
- package/dist/{validateExtractionResult-qkFkcrwl.js → validateExtractionResult-IRRMwcNi.js} +5 -7
- package/dist/{warning-circle-fill-C2lMYPJW.js → warning-circle-fill-ClFvGo5m.js} +2 -2
- package/dist/{warning-diamond-filled-CQ2DdW5g.js → warning-diamond-filled-CWyKR65i.js} +2 -2
- package/dist/{webinar-BpZWqd-g.js → webinar-DWX7Z5Wz.js} +2 -2
- package/package.json +36 -36
- package/dist/AdaptiveWorkflow-2EE8iiMD.js +0 -33
- package/dist/Alert-BqbbDRYR.js +0 -172
- package/dist/AnalyticsContext-CpimDlw4.js +0 -21
- package/dist/Checkbox-qfdF12cF.js +0 -60
- package/dist/Confirm-DjFpxSzC.js +0 -77
- package/dist/CountryField-CMOB4yz4.js +0 -38
- package/dist/DataConflictsModal-8Nnj7_UD.js +0 -238
- package/dist/Field-Df7ajJE2.js +0 -154
- package/dist/FormFlow.module-DqMxjYHl.js +0 -20
- package/dist/Header-DvifUz7-.js +0 -93
- package/dist/Icon-DFQgr7dy.js +0 -175
- package/dist/LandingLayout-BsIoIFzs.js +0 -76
- package/dist/LegalName-BYQ12uWc.js +0 -33
- package/dist/LoaderWrapper-Dc88hY-P.js +0 -34
- package/dist/MaskedInput-CkDwzLxe.js +0 -719
- package/dist/MaybeModal-Dfm1rIUG.js +0 -24
- package/dist/NewSummary-DYLlnpwx.js +0 -73
- package/dist/ProgressBar-DWFxLMUA.js +0 -38
- package/dist/RadioGroup-CY33MT83.js +0 -47
- package/dist/RadioWithLabel-BmUFWDxq.js +0 -45
- package/dist/SettingsContext-Dl-9WWCI.js +0 -9
- package/dist/StateContext-B2_Pqd_y.js +0 -9
- package/dist/StateField-BiNI3dm9.js +0 -55
- package/dist/StructuredList-BHUmeWeh.js +0 -56
- package/dist/Summary-BTDbRMfh.js +0 -235
- package/dist/TaxInformationField--Uhp0zLv.js +0 -242
- package/dist/TileGroup-BFcSgQ1l.js +0 -172
- package/dist/ToastContext-B_wd2IY2.js +0 -13
- package/dist/ToastContextProvider-BSQ1Upl_.js +0 -103
- package/dist/VerificationErrorAlert-B6HmAZ0g.js +0 -38
- package/dist/_rolldown_dynamic_import_helper-sGNwd-kR.js +0 -14
- package/dist/bafinUtils-RXELXyTR.js +0 -96
- package/dist/bg-BG-DfbtcqF4.js +0 -7
- package/dist/birthDateUtils-D6uk7zwm.js +0 -84
- package/dist/businessRegistrationNumberPatterns-pbrCVTTp.js +0 -982
- package/dist/cross-circle-fill-small-DdoPZZeo.js +0 -20
- package/dist/cs-CZ-CajuRLo4.js +0 -7
- package/dist/da-DK-BEwmSejn.js +0 -7
- package/dist/datasetUtil-BdHPWsxZ.js +0 -45
- package/dist/de-DE-PyK3jl-6.js +0 -7
- package/dist/debouncedInputEvent-Fwwp_K_-.js +0 -54
- package/dist/debugStore-Dwn1FXrh.js +0 -9
- package/dist/dropinUtils-OsMsnnYG.js +0 -496
- package/dist/el-GR-KPFghikv.js +0 -7
- package/dist/es-ES-z4jLCvkJ.js +0 -7
- package/dist/es-LA-Dx4QymCh.js +0 -7
- package/dist/et-EE-1EhDxtTe.js +0 -7
- package/dist/fi-FI-Dc2RMc_u.js +0 -7
- package/dist/fieldConfigurations-CZCFghnK.js +0 -11
- package/dist/formFieldsUtils-CnDkgahc.js +0 -7
- package/dist/formUtils-BHgG8yQZ.js +0 -52
- package/dist/formUtils-DAKrWwgL.js +0 -84
- package/dist/fr-FR-DswL4wQ1.js +0 -7
- package/dist/getFormSlice-C1ma6Xd4.js +0 -21
- package/dist/getTrustedFields-BJ88GlM-.js +0 -28
- package/dist/globalStore--_np-9ON.js +0 -418
- package/dist/hr-HR-DI2D_V50.js +0 -7
- package/dist/hu-HU-lyRcZjGI.js +0 -7
- package/dist/isEmpty-Uewyl-r6.js +0 -14
- package/dist/isEmptyEntity-3OHnhXqG.js +0 -43
- package/dist/it-IT-Bn4CEcmI.js +0 -7
- package/dist/ja-JP-CAX_xwUx.js +0 -7
- package/dist/keys-Ce8YnRP2.js +0 -20
- package/dist/listToRecord-DumSkYDz.js +0 -10
- package/dist/lt-LT-BdgYuJW7.js +0 -7
- package/dist/lv-LV-Bz5c0Psg.js +0 -7
- package/dist/mapScriptLocalization-BCfkZo1y.js +0 -46
- package/dist/nl-NL-BE2cQh0x.js +0 -7
- package/dist/no-NO-vgzpp44v.js +0 -7
- package/dist/patternValidators-DsrZkuOO.js +0 -73
- package/dist/pl-PL-DgDSRVmp.js +0 -7
- package/dist/pt-BR-BaKp-J8F.js +0 -7
- package/dist/pt-PT-Df48oeP5.js +0 -7
- package/dist/resolveEnvironment-CLI-fiSo.js +0 -999
- package/dist/ro-RO-CTMsv_EY.js +0 -7
- package/dist/roleMetadata-CbgaYaH8.js +0 -56
- package/dist/sk-SK-oqO5I3Aw.js +0 -7
- package/dist/sl-SI-CQhJFnpj.js +0 -7
- package/dist/summaryItem-uDWmtYtt.js +0 -16
- package/dist/sv-SE-CmevESLi.js +0 -7
- package/dist/toFullWidth-Dgy4X4i8.js +0 -52
- package/dist/trustUtil-BG17fZ56.js +0 -98
- package/dist/types/adaptiveWorkflow/components/Fields/LegalName.d.ts +0 -14
- package/dist/types-B28r2lAW.js +0 -30
- package/dist/types-CZAHRt31.js +0 -147
- package/dist/useAccountHolder-BpIX1iBG.js +0 -102
- package/dist/useAllowedCountries-qyvo-c6A.js +0 -80
- package/dist/useAnalyticsContext-gSnRnYgV.js +0 -12
- package/dist/useCreateLegalEntity-CYZd_62a.js +0 -24
- package/dist/useDataset-K19TDoyR.js +0 -98
- package/dist/useDeleteTransferInstrument-C10xzHiO.js +0 -31
- package/dist/useId-BkDhUta2.js +0 -28
- package/dist/useMultiForm-CM3lpilP.js +0 -790
- package/dist/useToastContext-B6Mqc2HY.js +0 -12
- package/dist/useToggleContext-B_YexrbT.js +0 -21
- package/dist/useUpdateLegalEntity-B7LRg8m0.js +0 -29
- package/dist/utils-BLBh0VEd.js +0 -1755
- package/dist/utils-CYUYe54m.js +0 -24
- package/dist/utils-DdHbAadK.js +0 -80
- package/dist/validationError-DUn2rT0n.js +0 -55
- package/dist/validationResult-bjYBDjbU.js +0 -29
- package/dist/validatorUtils-D2O6AAZn.js +0 -106
- /package/dist/{pt-BR-CPbFPNwq2.js → pt-BR-CPbFPNwq.js} +0 -0
|
@@ -1,999 +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] = "3c0949c0-f6ab-42e9-a49a-d36c8be7906d", e._sentryDebugIdIdentifier = "sentry-dbid-3c0949c0-f6ab-42e9-a49a-d36c8be7906d");
|
|
4
|
-
} catch (e) {}
|
|
5
|
-
import { a as setDefaults, i as setI18n, n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
|
|
6
|
-
import { t as createLogger } from "./logger-Z8AeTE4x.js";
|
|
7
|
-
import { t as Loader } from "./Loader-BVtlpTeo.js";
|
|
8
|
-
import { t as Button } from "./Button-BxdC8cVB.js";
|
|
9
|
-
import { a as setSdkTokenHandler, i as refreshSession, n as httpGet, o as ApiProvider, r as httpPost, s as useApiContext } from "./http-DsJtugN1.js";
|
|
10
|
-
import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-QQXN6YOm.js";
|
|
11
|
-
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BK-HHa65.js";
|
|
12
|
-
import { t as useAccountHolder } from "./useAccountHolder-BpIX1iBG.js";
|
|
13
|
-
import { t as SettingsContext } from "./SettingsContext-Dl-9WWCI.js";
|
|
14
|
-
import { t as useSettingsContext } from "./useSettingsContext-9O3Aqpfq.js";
|
|
15
|
-
import { c as valuesOf, s as keysOf } from "./genUtils-nphCwt1A.js";
|
|
16
|
-
import { t as AnalyticsContext } from "./AnalyticsContext-CpimDlw4.js";
|
|
17
|
-
import { t as StateContext } from "./StateContext-B2_Pqd_y.js";
|
|
18
|
-
import { y as isEmpty } from "./validatorUtils-D2O6AAZn.js";
|
|
19
|
-
import { t as ToastContextProvider } from "./ToastContextProvider-BSQ1Upl_.js";
|
|
20
|
-
import { t as listToRecord } from "./listToRecord-DumSkYDz.js";
|
|
21
|
-
import { n as ToggleContext, t as useToggleContext } from "./useToggleContext-B_YexrbT.js";
|
|
22
|
-
import { t as ExperimentNames } from "./types-CZAHRt31.js";
|
|
23
|
-
import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-sGNwd-kR.js";
|
|
24
|
-
import { t as Header } from "./Header-DvifUz7-.js";
|
|
25
|
-
import { t as useAllowedCountries } from "./useAllowedCountries-qyvo-c6A.js";
|
|
26
|
-
import { t as useDataset } from "./useDataset-K19TDoyR.js";
|
|
27
|
-
import { t as datasetIdentifier } from "./datasetUtil-BdHPWsxZ.js";
|
|
28
|
-
import { n as Skeleton } from "./Accordion-D_DOaWj2.js";
|
|
29
|
-
import { n as AlertIcon } from "./Alert-BqbbDRYR.js";
|
|
30
|
-
import { n as createGlobalStore, t as StoreContext } from "./globalStore--_np-9ON.js";
|
|
31
|
-
import i18n from "i18next";
|
|
32
|
-
import { Suspense, lazy } from "preact/compat";
|
|
33
|
-
import { useCallback as useCallback$1, useEffect as useEffect$1, useMemo as useMemo$1, useReducer, useState as useState$1 } from "preact/hooks";
|
|
34
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
35
|
-
import { QueryCache, QueryClient, QueryClientProvider, useMutation, useQuery } from "@tanstack/preact-query";
|
|
36
|
-
//#region node_modules/.pnpm/vite-plugin-shadow-styles@0.0.3_vite@8.1.5_@types+node@26.1.1_esbuild@0.27.7_jiti@2.7.0_sass@1.99.0_/node_modules/vite-plugin-shadow-styles/dist/stylesheets.js
|
|
37
|
-
var sheet = new CSSStyleSheet();
|
|
38
|
-
var stylesheets = [sheet];
|
|
39
|
-
import("./styles-DYaAeu4q.js").then(({ css }) => {
|
|
40
|
-
sheet.replaceSync(css);
|
|
41
|
-
}).catch((err) => console.error("Error loading styles", err));
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/language/i18n.ts
|
|
44
|
-
/**
|
|
45
|
-
* Initializes i18next and defines configurations
|
|
46
|
-
* i18next-resources-to-backend is a simple plugin used for the lazy loading of translation resources
|
|
47
|
-
*/
|
|
48
|
-
i18n.use({
|
|
49
|
-
type: "3rdParty",
|
|
50
|
-
init(instance) {
|
|
51
|
-
setDefaults(instance.options.react);
|
|
52
|
-
setI18n(instance);
|
|
53
|
-
}
|
|
54
|
-
}).init({
|
|
55
|
-
defaultNS: false,
|
|
56
|
-
fallbackLng: "en-US",
|
|
57
|
-
load: "currentOnly",
|
|
58
|
-
resources: {},
|
|
59
|
-
showSupportNotice: false,
|
|
60
|
-
react: {
|
|
61
|
-
transSupportBasicHtmlNodes: true,
|
|
62
|
-
transKeepBasicHtmlNodesFor: [
|
|
63
|
-
"strong",
|
|
64
|
-
"i",
|
|
65
|
-
"em"
|
|
66
|
-
],
|
|
67
|
-
bindI18n: "languageChanged",
|
|
68
|
-
bindI18nStore: "added"
|
|
69
|
-
},
|
|
70
|
-
interpolation: {
|
|
71
|
-
prefix: "%{",
|
|
72
|
-
suffix: "}"
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/api/configurations/useVersionConfiguration.ts
|
|
77
|
-
/**
|
|
78
|
-
* Retrieves information about the onboarding version and version-specific features to enable
|
|
79
|
-
* linked to the legalEntityId
|
|
80
|
-
*/
|
|
81
|
-
var getVersionConfiguration = async (legalEntityId, baseUrl) => {
|
|
82
|
-
return httpGet({
|
|
83
|
-
baseUrl,
|
|
84
|
-
path: `legalEntities/${legalEntityId}/configurations/version`
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
var useVersionConfiguration = (options) => {
|
|
88
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
89
|
-
return useQuery({
|
|
90
|
-
queryKey: ["versionConfiguration"],
|
|
91
|
-
queryFn: () => getVersionConfiguration(rootLegalEntityId.value, baseUrl.value),
|
|
92
|
-
...options
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/api/uiAnalytics/useAnalyticsSession.ts
|
|
97
|
-
/**
|
|
98
|
-
* @description Request to get an analytics session ID and fire an "Initiate session" event on Mixpanel
|
|
99
|
-
* @param data.userData Sets user profile properties on Mixpanel
|
|
100
|
-
* @returns a session id that is sent with every subsequent log event request
|
|
101
|
-
*/
|
|
102
|
-
var getAnalyticsSession = async (baseUrl, data) => {
|
|
103
|
-
return httpPost({
|
|
104
|
-
baseUrl,
|
|
105
|
-
path: `analytics/ui`
|
|
106
|
-
}, data);
|
|
107
|
-
};
|
|
108
|
-
var useAnalyticsSession = (sessionData, onboardingVersion, options) => {
|
|
109
|
-
const { baseUrl } = useApiContext();
|
|
110
|
-
return useQuery({
|
|
111
|
-
queryKey: ["analyticsSession", onboardingVersion],
|
|
112
|
-
queryFn: () => getAnalyticsSession(baseUrl.value, sessionData),
|
|
113
|
-
enabled: Boolean(onboardingVersion),
|
|
114
|
-
...options
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region src/core/user-events.ts
|
|
119
|
-
var UserEvents = class {
|
|
120
|
-
queue = [];
|
|
121
|
-
subscriptions = /* @__PURE__ */ new Set();
|
|
122
|
-
/** payload of commmon props sent in every event */
|
|
123
|
-
baseTrackingPayload;
|
|
124
|
-
/** properties not set with every event but that may be shared between some events
|
|
125
|
-
* ex. `page` value for `Interacted with form field` events
|
|
126
|
-
*/
|
|
127
|
-
sharedEventProperties;
|
|
128
|
-
constructor() {
|
|
129
|
-
this.baseTrackingPayload = {
|
|
130
|
-
category: "onboarding",
|
|
131
|
-
subCategory: "hosted onboarding"
|
|
132
|
-
};
|
|
133
|
-
this.sharedEventProperties = {};
|
|
134
|
-
}
|
|
135
|
-
add(...args) {
|
|
136
|
-
this.queue.push(...args);
|
|
137
|
-
}
|
|
138
|
-
notifySubscribers() {
|
|
139
|
-
while (this.queue.length > 0) {
|
|
140
|
-
const lastEvent = this.queue.pop();
|
|
141
|
-
this.subscriptions.forEach((callback) => callback(lastEvent));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Adds an analytics event with all base event properties.
|
|
146
|
-
*/
|
|
147
|
-
addEvent(eventName, properties) {
|
|
148
|
-
const completeEvent = {
|
|
149
|
-
...this.baseTrackingPayload,
|
|
150
|
-
...properties
|
|
151
|
-
};
|
|
152
|
-
this.add({
|
|
153
|
-
type: "add_event",
|
|
154
|
-
name: eventName,
|
|
155
|
-
properties: completeEvent
|
|
156
|
-
});
|
|
157
|
-
this.notifySubscribers();
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Adds an event with context specific to journey-related events
|
|
161
|
-
*/
|
|
162
|
-
addJourneyEvent(eventName, properties) {
|
|
163
|
-
this.addEvent(eventName, {
|
|
164
|
-
actionLevel: "journey",
|
|
165
|
-
...properties
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Adds an event with context specific to task-related events
|
|
170
|
-
*/
|
|
171
|
-
addTaskEvent(eventName, properties) {
|
|
172
|
-
this.addEvent(eventName, {
|
|
173
|
-
actionLevel: "task",
|
|
174
|
-
...properties
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Adds an event with context specific to page-related events
|
|
179
|
-
*/
|
|
180
|
-
addPageEvent(eventName, properties) {
|
|
181
|
-
this.addEvent(eventName, {
|
|
182
|
-
actionLevel: "page",
|
|
183
|
-
page: this.sharedEventProperties.page,
|
|
184
|
-
...properties
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Adds an event with context specific to field-related events
|
|
189
|
-
*/
|
|
190
|
-
addFieldEvent(eventName, properties) {
|
|
191
|
-
this.addEvent(eventName, {
|
|
192
|
-
actionLevel: "field",
|
|
193
|
-
page: this.sharedEventProperties.page,
|
|
194
|
-
...properties
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Tracks an experiment for Mixpanel experiment reporting
|
|
199
|
-
*/
|
|
200
|
-
trackExperiment({ name, variant }) {
|
|
201
|
-
this.add({
|
|
202
|
-
type: "add_event",
|
|
203
|
-
name: "$experiment_started",
|
|
204
|
-
properties: {
|
|
205
|
-
...this.baseTrackingPayload,
|
|
206
|
-
"Experiment name": name,
|
|
207
|
-
"Variant name": variant
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Subscribes a callback to analytics events. It gets called every time
|
|
213
|
-
* one of the above public methods get called, and the event data is passed back as an array.
|
|
214
|
-
* The callback must have a single argument which is an array of [eventName, eventPayload?].
|
|
215
|
-
* @example
|
|
216
|
-
* ```js
|
|
217
|
-
* const callback = ([eventName, eventPayload]) => console.log(eventName, eventPayload);
|
|
218
|
-
* this.subscribe(callback);
|
|
219
|
-
*
|
|
220
|
-
* const exampleEventPayload = { count: 1, segmentation: { foo: 'bar' } };
|
|
221
|
-
* this.addEvent('exampleEventDidOccur', exampleEventPayload);
|
|
222
|
-
*
|
|
223
|
-
* // `callback` will get called with `['exampleEventDidOccur', exampleEventPayload]`
|
|
224
|
-
* ```
|
|
225
|
-
*/
|
|
226
|
-
subscribe(callback) {
|
|
227
|
-
this.subscriptions.add(callback);
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Sets params that are sent on every event
|
|
231
|
-
* */
|
|
232
|
-
updateBaseTrackingPayload(baseTrackingPayload) {
|
|
233
|
-
this.baseTrackingPayload = {
|
|
234
|
-
...this.baseTrackingPayload,
|
|
235
|
-
...baseTrackingPayload
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Sets params that may be shared between events
|
|
240
|
-
* */
|
|
241
|
-
updateSharedEventProperties = (props) => {
|
|
242
|
-
this.sharedEventProperties = {
|
|
243
|
-
...this.sharedEventProperties,
|
|
244
|
-
...props
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Removes a subscribed callback
|
|
249
|
-
*/
|
|
250
|
-
unsubscribe(callback) {
|
|
251
|
-
if (this.subscriptions.has(callback)) this.subscriptions.delete(callback);
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
var createUserEvents = () => {
|
|
255
|
-
return new UserEvents();
|
|
256
|
-
};
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/api/uiAnalytics/usePushAnalyticEvent.ts
|
|
259
|
-
var pushAnalyticEvent = async (baseUrl, sessionId, data) => {
|
|
260
|
-
return httpPost({
|
|
261
|
-
baseUrl,
|
|
262
|
-
path: `analytics/ui/${sessionId}`
|
|
263
|
-
}, data);
|
|
264
|
-
};
|
|
265
|
-
var usePushAnalyticEvent = (sessionId, options) => {
|
|
266
|
-
const { baseUrl } = useApiContext();
|
|
267
|
-
return useMutation({
|
|
268
|
-
mutationFn: (data) => pushAnalyticEvent(baseUrl.value, sessionId, data),
|
|
269
|
-
...options
|
|
270
|
-
});
|
|
271
|
-
};
|
|
272
|
-
//#endregion
|
|
273
|
-
//#region src/utils/analytics/convertToEmbeddedEvent.ts
|
|
274
|
-
var convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
|
|
275
|
-
const { type, name, properties } = eventQueueItem;
|
|
276
|
-
return {
|
|
277
|
-
eventName: name,
|
|
278
|
-
eventType: type,
|
|
279
|
-
eventData: properties || {},
|
|
280
|
-
legalEntityId: sessionData.legalEntityId,
|
|
281
|
-
userAgent: sessionData.userAgent,
|
|
282
|
-
componentName: sessionData.componentName,
|
|
283
|
-
sdkVersion: sessionData.sdkVersion
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region src/utils/analytics/getAnalyticsAssociatedEntityDetails.ts
|
|
288
|
-
/**
|
|
289
|
-
* Gets associated legal entity type and ID for the base tracking payload
|
|
290
|
-
* Based on selected account holder type
|
|
291
|
-
*/
|
|
292
|
-
var getAnalyticsAssociatedEntityDetails = (rootLegalEntity, accountHolderType) => {
|
|
293
|
-
let associatedLegalEntityType;
|
|
294
|
-
switch (accountHolderType) {
|
|
295
|
-
case "aTrust":
|
|
296
|
-
associatedLegalEntityType = "trust";
|
|
297
|
-
break;
|
|
298
|
-
case "mySoleProprietorName":
|
|
299
|
-
associatedLegalEntityType = "soleProprietorship";
|
|
300
|
-
break;
|
|
301
|
-
case "anUnincorporatedPartnership":
|
|
302
|
-
associatedLegalEntityType = "unincorporatedPartnership";
|
|
303
|
-
break;
|
|
304
|
-
default: associatedLegalEntityType = void 0;
|
|
305
|
-
}
|
|
306
|
-
const associatedLegalEntity = rootLegalEntity.entityAssociations?.find((ea) => ea.type === associatedLegalEntityType);
|
|
307
|
-
return {
|
|
308
|
-
associatedLegalEntityType,
|
|
309
|
-
associatedLegalEntityId: associatedLegalEntity?.legalEntityId
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
//#endregion
|
|
313
|
-
//#region src/hooks/useAnalytics/useAnalytics.ts
|
|
314
|
-
var useAnalytics = ({ userEvents, sessionId, sessionData }) => {
|
|
315
|
-
const sdkVersion = "4.25.0";
|
|
316
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
317
|
-
const { mutateAsync } = usePushAnalyticEvent(sessionId ?? "");
|
|
318
|
-
const { accountHolder } = useAccountHolder();
|
|
319
|
-
useEffect$1(() => {
|
|
320
|
-
if (!rootLegalEntity) return;
|
|
321
|
-
const countryCode = getLegalEntityCountry(rootLegalEntity);
|
|
322
|
-
const capabilities = Object.keys(rootLegalEntity?.capabilities ?? {});
|
|
323
|
-
userEvents.updateBaseTrackingPayload({
|
|
324
|
-
entityType: rootLegalEntity.type,
|
|
325
|
-
countryCode,
|
|
326
|
-
capabilities,
|
|
327
|
-
sdkVersion,
|
|
328
|
-
componentName: sessionData.componentName,
|
|
329
|
-
userAgent: navigator.userAgent,
|
|
330
|
-
...getAnalyticsAssociatedEntityDetails(rootLegalEntity, accountHolder)
|
|
331
|
-
});
|
|
332
|
-
}, [
|
|
333
|
-
rootLegalEntity,
|
|
334
|
-
accountHolder,
|
|
335
|
-
sdkVersion,
|
|
336
|
-
sessionData.componentName,
|
|
337
|
-
userEvents
|
|
338
|
-
]);
|
|
339
|
-
const pushEvents = useCallback$1((data) => {
|
|
340
|
-
const eventItem = convertToEmbeddedEvent(data, sessionData);
|
|
341
|
-
mutateAsync(eventItem);
|
|
342
|
-
}, [mutateAsync, sessionData]);
|
|
343
|
-
useEffect$1(() => {
|
|
344
|
-
if (!sessionId) return;
|
|
345
|
-
userEvents.subscribe(pushEvents);
|
|
346
|
-
return () => {
|
|
347
|
-
userEvents.unsubscribe(pushEvents);
|
|
348
|
-
};
|
|
349
|
-
}, [
|
|
350
|
-
sessionId,
|
|
351
|
-
mutateAsync,
|
|
352
|
-
userEvents,
|
|
353
|
-
sessionData,
|
|
354
|
-
pushEvents
|
|
355
|
-
]);
|
|
356
|
-
};
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region src/utils/analytics/getPrefilledDetails.ts
|
|
359
|
-
var getOrganizationPrefilledFields = (organization) => {
|
|
360
|
-
const { dateOfIncorporation, financialReports, registeredAddress, registrationNumber, support, taxInformation, type, vatNumber } = organization;
|
|
361
|
-
const financialReport = financialReports?.[0];
|
|
362
|
-
return {
|
|
363
|
-
dateOfIncorporation: !!dateOfIncorporation,
|
|
364
|
-
financialReport: {
|
|
365
|
-
annualTurnover: !!financialReport?.annualTurnover,
|
|
366
|
-
balanceSheetTotal: !!financialReport?.balanceSheetTotal,
|
|
367
|
-
dateOfFinancialData: !!financialReport?.dateOfFinancialData,
|
|
368
|
-
employeeCount: !!financialReport?.employeeCount
|
|
369
|
-
},
|
|
370
|
-
registeredAddress: {
|
|
371
|
-
city: !!registeredAddress?.city,
|
|
372
|
-
postalCode: !!registeredAddress?.postalCode,
|
|
373
|
-
stateOrProvince: !!registeredAddress?.stateOrProvince,
|
|
374
|
-
street: !!registeredAddress?.street
|
|
375
|
-
},
|
|
376
|
-
registrationNumber: !!registrationNumber,
|
|
377
|
-
support: {
|
|
378
|
-
email: !!support?.email,
|
|
379
|
-
phone: !!support?.phone
|
|
380
|
-
},
|
|
381
|
-
taxInformation: !!taxInformation?.some((taxInfo) => taxInfo.country && taxInfo.number),
|
|
382
|
-
type: !!type,
|
|
383
|
-
vatNumber: !!vatNumber
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
var getPrefilledDetails = (legalEntity) => {
|
|
387
|
-
if (!legalEntity) return;
|
|
388
|
-
const { organization, transferInstruments, entityAssociations } = legalEntity;
|
|
389
|
-
return {
|
|
390
|
-
transferInstrumentCount: transferInstruments?.length || 0,
|
|
391
|
-
entityAssociations: entityAssociations?.map((entity) => entity.type) || [],
|
|
392
|
-
organization: organization && getOrganizationPrefilledFields(organization)
|
|
393
|
-
};
|
|
394
|
-
};
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region src/context/AnalyticsContext/AnalyticsProvider.tsx
|
|
397
|
-
/**
|
|
398
|
-
* The provider exists to scope analytics to one application instance.
|
|
399
|
-
* This would otherwise be problematic when a consumer might have several
|
|
400
|
-
* instantiations of a embedded Component for instance on the same page
|
|
401
|
-
*/
|
|
402
|
-
var AnalyticsProvider = ({ componentName, children, rootLegalEntityId, locale }) => {
|
|
403
|
-
const { settings } = useSettingsContext();
|
|
404
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
405
|
-
const { data: versionData, isError, isLoading } = useVersionConfiguration();
|
|
406
|
-
const userEvents = useMemo$1(() => createUserEvents(), []);
|
|
407
|
-
const onboardingVersion = isLoading ? void 0 : isError ? 1 : versionData?.version;
|
|
408
|
-
const capabilities = rootLegalEntity?.capabilities && Object.keys(rootLegalEntity.capabilities);
|
|
409
|
-
const shouldTrackPrefilledDetails = capabilities?.includes("receivePayments") && onboardingVersion && onboardingVersion > 1;
|
|
410
|
-
const sessionData = {
|
|
411
|
-
sdkVersion: "4.25.0",
|
|
412
|
-
componentName,
|
|
413
|
-
userAgent: navigator.userAgent,
|
|
414
|
-
legalEntityId: rootLegalEntityId,
|
|
415
|
-
capabilities,
|
|
416
|
-
entityType: rootLegalEntity?.type,
|
|
417
|
-
eventData: shouldTrackPrefilledDetails ? getPrefilledDetails(rootLegalEntity) : void 0,
|
|
418
|
-
userData: {
|
|
419
|
-
onboardingVersion,
|
|
420
|
-
isDirectMerchant: settings.merchantType === "direct",
|
|
421
|
-
settings,
|
|
422
|
-
country: rootLegalEntity && getLegalEntityCountry(rootLegalEntity)
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
const { data } = useAnalyticsSession(sessionData, onboardingVersion);
|
|
426
|
-
userEvents.updateBaseTrackingPayload({ locale });
|
|
427
|
-
useAnalytics({
|
|
428
|
-
userEvents,
|
|
429
|
-
sessionId: data?.id,
|
|
430
|
-
sessionData
|
|
431
|
-
});
|
|
432
|
-
return /* @__PURE__ */ jsx(AnalyticsContext.Provider, {
|
|
433
|
-
value: userEvents,
|
|
434
|
-
children
|
|
435
|
-
});
|
|
436
|
-
};
|
|
437
|
-
//#endregion
|
|
438
|
-
//#region src/context/QueryContext/QueryClient.ts
|
|
439
|
-
var QueryClient$1 = new QueryClient({
|
|
440
|
-
defaultOptions: {
|
|
441
|
-
queries: {
|
|
442
|
-
staleTime: 300 * 1e3,
|
|
443
|
-
refetchOnWindowFocus: false,
|
|
444
|
-
refetchOnReconnect: true,
|
|
445
|
-
refetchOnMount: true,
|
|
446
|
-
retry: 2
|
|
447
|
-
},
|
|
448
|
-
mutations: { retry: 1 }
|
|
449
|
-
},
|
|
450
|
-
queryCache: new QueryCache({
|
|
451
|
-
onSuccess: (data, query) => {
|
|
452
|
-
if (query.meta?.onSuccess && typeof query.meta.onSuccess === "function") query.meta.onSuccess(data);
|
|
453
|
-
},
|
|
454
|
-
onError: (data, query) => {
|
|
455
|
-
if (query.meta?.onError && typeof query.meta.onError === "function") query.meta.onError(data);
|
|
456
|
-
}
|
|
457
|
-
})
|
|
458
|
-
});
|
|
459
|
-
//#endregion
|
|
460
|
-
//#region src/context/QueryContext/QueryClientProvider.tsx
|
|
461
|
-
/** Standard tanstack query provider, needed for it to work */
|
|
462
|
-
var QueryClientProvider$1 = ({ children }) => /* @__PURE__ */ jsx(QueryClientProvider, {
|
|
463
|
-
client: QueryClient$1,
|
|
464
|
-
children
|
|
465
|
-
});
|
|
466
|
-
//#endregion
|
|
467
|
-
//#region src/context/SettingsContext/SettingsProvider.tsx
|
|
468
|
-
var settingsDefaults = {
|
|
469
|
-
acceptedCountries: void 0,
|
|
470
|
-
allowBankAccountFormatSelection: false,
|
|
471
|
-
allowDebugUi: false,
|
|
472
|
-
allowIntraRegionCrossBorderPayout: false,
|
|
473
|
-
changeLegalEntityType: true,
|
|
474
|
-
editPrefilledCountry: true,
|
|
475
|
-
requirePciSignEcomMoto: false,
|
|
476
|
-
requirePciSignEcommerce: false,
|
|
477
|
-
requirePciSignPos: false,
|
|
478
|
-
requirePciSignPosMoto: false,
|
|
479
|
-
hideOnboardingIntroductionIndividual: true,
|
|
480
|
-
hideOnboardingIntroductionOrganization: true,
|
|
481
|
-
hideOnboardingIntroductionTrust: true,
|
|
482
|
-
hideOnboardingIntroductionSoleProprietor: true,
|
|
483
|
-
transferInstrumentLimit: 0,
|
|
484
|
-
instantBankVerification: true,
|
|
485
|
-
showServiceAgreementsFirst: false,
|
|
486
|
-
showBusinessFinancingFirst: false,
|
|
487
|
-
enforceLegalAge: false,
|
|
488
|
-
merchantType: void 0,
|
|
489
|
-
allowBusinessLines: false,
|
|
490
|
-
allowCrossBorderPayout: false
|
|
491
|
-
};
|
|
492
|
-
/**
|
|
493
|
-
* Consumers can pass settings @see settingsDefaults, which can alter on runtime
|
|
494
|
-
* the behaviour of our library
|
|
495
|
-
* The settings are dynamically passed during SDK initialization (same as legalEntityId)
|
|
496
|
-
* @param settings - dictionary of type Settings
|
|
497
|
-
*/
|
|
498
|
-
function SettingsProvider({ children, settings }) {
|
|
499
|
-
const mergedSettings = {
|
|
500
|
-
...settingsDefaults,
|
|
501
|
-
...settings
|
|
502
|
-
};
|
|
503
|
-
const contextValue = useMemo$1(() => ({
|
|
504
|
-
isSettingEnabled: (settingName) => mergedSettings[settingName],
|
|
505
|
-
getSetting: (settingName) => mergedSettings[settingName],
|
|
506
|
-
settings: mergedSettings
|
|
507
|
-
}), [settings]);
|
|
508
|
-
return /* @__PURE__ */ jsx(SettingsContext.Provider, {
|
|
509
|
-
value: contextValue,
|
|
510
|
-
children
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
//#endregion
|
|
514
|
-
//#region src/utils/removeObjectEmptyValues.ts
|
|
515
|
-
function removeObjectPropsWithEmptyValues(obj) {
|
|
516
|
-
keysOf(obj).forEach((key) => {
|
|
517
|
-
if (obj[key] === null || isEmpty(obj[key])) delete obj[key];
|
|
518
|
-
});
|
|
519
|
-
return obj;
|
|
520
|
-
}
|
|
521
|
-
//#endregion
|
|
522
|
-
//#region src/context/StateContext/StateReducer.ts
|
|
523
|
-
var INITIAL_STATE = {
|
|
524
|
-
data: {},
|
|
525
|
-
allData: {},
|
|
526
|
-
initialData: {},
|
|
527
|
-
errors: {},
|
|
528
|
-
valid: {},
|
|
529
|
-
fieldProblems: {},
|
|
530
|
-
isValid: false,
|
|
531
|
-
allValid: false
|
|
532
|
-
};
|
|
533
|
-
var logger = createLogger();
|
|
534
|
-
function StateReducer() {
|
|
535
|
-
const [schemas, setSchemas] = useState$1({});
|
|
536
|
-
const [activeForms, setActiveForms] = useState$1([]);
|
|
537
|
-
const setCurrentForms = (forms) => {
|
|
538
|
-
setActiveForms(forms);
|
|
539
|
-
};
|
|
540
|
-
function reducer({ currentState: currState, prevState }, action) {
|
|
541
|
-
switch (action.type) {
|
|
542
|
-
case "addToState": {
|
|
543
|
-
if (!action.value.dataStoreId) {
|
|
544
|
-
logger.warn("No dataStoreId provided, hence no update can be done");
|
|
545
|
-
return {
|
|
546
|
-
currentState: currState,
|
|
547
|
-
prevState
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
const dataStoreId = action.value.dataStoreId;
|
|
551
|
-
const state = structuredClone(currState);
|
|
552
|
-
const schema = action.value.schema || null;
|
|
553
|
-
const schemaHasChanged = schema && schemas?.[dataStoreId]?.toString() !== schema.toString();
|
|
554
|
-
const mergedState = {
|
|
555
|
-
...state,
|
|
556
|
-
data: {
|
|
557
|
-
...state.data,
|
|
558
|
-
[dataStoreId]: {
|
|
559
|
-
...state.data[dataStoreId],
|
|
560
|
-
...action.value.data
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
allData: {
|
|
564
|
-
...state.allData,
|
|
565
|
-
[dataStoreId]: {
|
|
566
|
-
...state.allData[dataStoreId],
|
|
567
|
-
...removeObjectPropsWithEmptyValues(action.value.data)
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
errors: {
|
|
571
|
-
...state.errors,
|
|
572
|
-
[dataStoreId]: {
|
|
573
|
-
...state.errors[dataStoreId],
|
|
574
|
-
...action.value.errors
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
valid: {
|
|
578
|
-
...state.valid,
|
|
579
|
-
[dataStoreId]: {
|
|
580
|
-
...state.valid[dataStoreId],
|
|
581
|
-
...action.value.valid
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
|
-
fieldProblems: {
|
|
585
|
-
...state.fieldProblems,
|
|
586
|
-
[dataStoreId]: {
|
|
587
|
-
...state.fieldProblems[dataStoreId],
|
|
588
|
-
...action.value.fieldProblems
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
/**
|
|
593
|
-
* Some components e.g. personalDetails, are parents for other components and the data from these children is collected
|
|
594
|
-
* under the parent's id (aka dataStoreId) i.e. 'personalDetails.
|
|
595
|
-
*
|
|
596
|
-
* With these parents sometimes their schema for their useForm implementation updates at run time - so this fny checks
|
|
597
|
-
* if a schema has changed and if so ensures that the keys output in the data, valid, errors, fieldProblems objects
|
|
598
|
-
* match those of the parent schema
|
|
599
|
-
*/
|
|
600
|
-
if (schemaHasChanged) {
|
|
601
|
-
setSchemas({
|
|
602
|
-
...schemas,
|
|
603
|
-
[dataStoreId]: schema
|
|
604
|
-
});
|
|
605
|
-
const processedBySchema = schema.reduce((acc, fieldKey) => {
|
|
606
|
-
const dataObjByFormId = mergedState.data[dataStoreId];
|
|
607
|
-
const allDataObjByFormId = mergedState.allData[dataStoreId];
|
|
608
|
-
const validObjByFormId = mergedState.valid[dataStoreId];
|
|
609
|
-
const errorsObjByFormId = mergedState.errors[dataStoreId];
|
|
610
|
-
const fieldProblemsObjByFormId = mergedState.fieldProblems[dataStoreId];
|
|
611
|
-
return {
|
|
612
|
-
data: {
|
|
613
|
-
...acc.data,
|
|
614
|
-
[fieldKey]: dataObjByFormId[fieldKey] ?? allDataObjByFormId[fieldKey]
|
|
615
|
-
},
|
|
616
|
-
valid: {
|
|
617
|
-
...acc.valid,
|
|
618
|
-
[fieldKey]: validObjByFormId[fieldKey]
|
|
619
|
-
},
|
|
620
|
-
errors: {
|
|
621
|
-
...acc.errors,
|
|
622
|
-
[fieldKey]: errorsObjByFormId[fieldKey]
|
|
623
|
-
},
|
|
624
|
-
fieldProblems: {
|
|
625
|
-
...acc.fieldProblems,
|
|
626
|
-
[fieldKey]: fieldProblemsObjByFormId[fieldKey]
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
}, {
|
|
630
|
-
data: {},
|
|
631
|
-
valid: {},
|
|
632
|
-
errors: {},
|
|
633
|
-
fieldProblems: {}
|
|
634
|
-
});
|
|
635
|
-
mergedState.data[dataStoreId] = processedBySchema.data;
|
|
636
|
-
mergedState.valid[dataStoreId] = processedBySchema.valid;
|
|
637
|
-
mergedState.errors[dataStoreId] = processedBySchema.errors;
|
|
638
|
-
mergedState.fieldProblems[dataStoreId] = processedBySchema.fieldProblems;
|
|
639
|
-
}
|
|
640
|
-
mergedState.validityByForm = {
|
|
641
|
-
...mergedState.validityByForm,
|
|
642
|
-
[dataStoreId]: Object.values(mergedState.valid[dataStoreId]).every((isValid) => isValid)
|
|
643
|
-
};
|
|
644
|
-
mergedState.allValid = Object.values(mergedState.validityByForm).every((isValid) => isValid);
|
|
645
|
-
mergedState.isValid = !activeForms.length ? mergedState.allValid : activeForms.every((item) => mergedState.validityByForm?.[item]);
|
|
646
|
-
mergedState.initialData = structuredClone(state.initialData);
|
|
647
|
-
return {
|
|
648
|
-
currentState: mergedState,
|
|
649
|
-
prevState: state
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
case "removeFromState": {
|
|
653
|
-
if (!action.value.dataStoreId) {
|
|
654
|
-
logger.warn("No dataStoreId provided, hence no update can be done");
|
|
655
|
-
return {
|
|
656
|
-
currentState: currState,
|
|
657
|
-
prevState
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
const dataStoreId = action.value.dataStoreId;
|
|
661
|
-
const state = structuredClone(currState);
|
|
662
|
-
const mergedState = {
|
|
663
|
-
...state,
|
|
664
|
-
data: {
|
|
665
|
-
...state.data,
|
|
666
|
-
[dataStoreId]: {}
|
|
667
|
-
},
|
|
668
|
-
allData: {
|
|
669
|
-
...state.allData,
|
|
670
|
-
[dataStoreId]: {}
|
|
671
|
-
},
|
|
672
|
-
errors: {
|
|
673
|
-
...state.errors,
|
|
674
|
-
[dataStoreId]: {}
|
|
675
|
-
},
|
|
676
|
-
valid: {
|
|
677
|
-
...state.valid,
|
|
678
|
-
[dataStoreId]: false
|
|
679
|
-
},
|
|
680
|
-
fieldProblems: {
|
|
681
|
-
...state.fieldProblems,
|
|
682
|
-
[dataStoreId]: {}
|
|
683
|
-
}
|
|
684
|
-
};
|
|
685
|
-
mergedState.validityByForm = {
|
|
686
|
-
...mergedState.validityByForm,
|
|
687
|
-
[dataStoreId]: false
|
|
688
|
-
};
|
|
689
|
-
mergedState.allValid = Object.values(mergedState.validityByForm).every((isValid) => isValid);
|
|
690
|
-
mergedState.isValid = !activeForms.length ? mergedState.allValid : activeForms.every((item) => mergedState.validityByForm?.[item]);
|
|
691
|
-
mergedState.initialData = structuredClone(state.initialData);
|
|
692
|
-
return {
|
|
693
|
-
currentState: mergedState,
|
|
694
|
-
prevState: state
|
|
695
|
-
};
|
|
696
|
-
}
|
|
697
|
-
case "resetState": return {
|
|
698
|
-
currentState: INITIAL_STATE,
|
|
699
|
-
prevState: currState
|
|
700
|
-
};
|
|
701
|
-
default: throw new Error(`Unhandled action type: ${action.type}`);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
return {
|
|
705
|
-
reducer,
|
|
706
|
-
setCurrentForms
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
//#endregion
|
|
710
|
-
//#region src/context/StateContext/StateProvider.tsx
|
|
711
|
-
function StateProvider({ defaultData = {}, children }) {
|
|
712
|
-
const defaultState = {
|
|
713
|
-
currentState: {
|
|
714
|
-
data: defaultData,
|
|
715
|
-
allData: defaultData,
|
|
716
|
-
valid: {},
|
|
717
|
-
errors: {},
|
|
718
|
-
fieldProblems: {},
|
|
719
|
-
validityByForm: {},
|
|
720
|
-
initialData: defaultData
|
|
721
|
-
},
|
|
722
|
-
prevState: {}
|
|
723
|
-
};
|
|
724
|
-
const reducerObj = StateReducer();
|
|
725
|
-
const [state, dispatch] = useReducer(reducerObj.reducer, defaultState);
|
|
726
|
-
/**
|
|
727
|
-
* Create an object from the returned reducer props
|
|
728
|
-
* - the state property in this object will be available to any handler functions set on StateContextWatcher
|
|
729
|
-
* - the dispatch property is made available to the StateContextSetter
|
|
730
|
-
*/
|
|
731
|
-
const contextValue = useMemo$1(() => ({
|
|
732
|
-
state,
|
|
733
|
-
dispatch,
|
|
734
|
-
setActiveForms: reducerObj.setCurrentForms,
|
|
735
|
-
getData: () => state?.currentState?.data ?? {},
|
|
736
|
-
getState: () => state?.currentState
|
|
737
|
-
}), [reducerObj, state]);
|
|
738
|
-
return /* @__PURE__ */ jsx(StateContext.Provider, {
|
|
739
|
-
value: contextValue,
|
|
740
|
-
children
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
//#endregion
|
|
744
|
-
//#region src/api/toggles/useToggles.ts
|
|
745
|
-
/**
|
|
746
|
-
* Retrieves experiments and onboardingcomponents-specific feature flags
|
|
747
|
-
* as defined in `OnboardingcomponentsFeatures.java` linked to the legalEntityId
|
|
748
|
-
*/
|
|
749
|
-
var getToggles = async (legalEntityId, baseUrl) => {
|
|
750
|
-
const { experiments, features } = await httpGet({
|
|
751
|
-
baseUrl,
|
|
752
|
-
path: `legalEntities/${legalEntityId}/flags`
|
|
753
|
-
});
|
|
754
|
-
return {
|
|
755
|
-
experiments: experiments ? Object.values(experiments).reduce((acc, val) => {
|
|
756
|
-
return {
|
|
757
|
-
...acc,
|
|
758
|
-
[val]: true
|
|
759
|
-
};
|
|
760
|
-
}, {}) : {},
|
|
761
|
-
features
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
|
-
var useToggles = (options) => {
|
|
765
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
766
|
-
return useQuery({
|
|
767
|
-
queryKey: ["toggles"],
|
|
768
|
-
queryFn: () => getToggles(rootLegalEntityId.value, baseUrl.value),
|
|
769
|
-
...options
|
|
770
|
-
});
|
|
771
|
-
};
|
|
772
|
-
//#endregion
|
|
773
|
-
//#region src/context/ToggleContext/ToggleContextProvider.tsx
|
|
774
|
-
/**
|
|
775
|
-
* To manage accessing non-production-ready features of SDK
|
|
776
|
-
* or features under active experimentation/testing.
|
|
777
|
-
* @param children - components rendered
|
|
778
|
-
* @param features - dictionary of type Features
|
|
779
|
-
* @param refreshExperiments - handler to refresh experiments for the legal entity
|
|
780
|
-
*/
|
|
781
|
-
function ToggleContextProvider({ children, features: propFeatures, refreshExperiments }) {
|
|
782
|
-
const { data: toggleData } = useToggles();
|
|
783
|
-
const { data: versionData } = useVersionConfiguration();
|
|
784
|
-
const features = useMemo$1(() => ({
|
|
785
|
-
...toggleData?.features,
|
|
786
|
-
...propFeatures,
|
|
787
|
-
...listToRecord(versionData?.features ?? [], () => true)
|
|
788
|
-
}), [
|
|
789
|
-
versionData,
|
|
790
|
-
propFeatures,
|
|
791
|
-
toggleData?.features
|
|
792
|
-
]);
|
|
793
|
-
const experiments = useMemo$1(() => ({
|
|
794
|
-
...listToRecord(valuesOf(ExperimentNames), (experiment) => propFeatures[experiment] ?? false),
|
|
795
|
-
...toggleData?.experiments
|
|
796
|
-
}), [propFeatures, toggleData?.experiments]);
|
|
797
|
-
const contextValue = useMemo$1(() => ({
|
|
798
|
-
features,
|
|
799
|
-
isFeatureEnabled: (feature) => features[feature] ?? false,
|
|
800
|
-
experiments,
|
|
801
|
-
isExperimentEnabled: (experiment) => experiments[experiment] ?? false,
|
|
802
|
-
refreshExperiments
|
|
803
|
-
}), [
|
|
804
|
-
features,
|
|
805
|
-
experiments,
|
|
806
|
-
refreshExperiments
|
|
807
|
-
]);
|
|
808
|
-
return /* @__PURE__ */ jsx(ToggleContext.Provider, {
|
|
809
|
-
value: contextValue,
|
|
810
|
-
children
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
//#endregion
|
|
814
|
-
//#region src/components/Shared/AllowedCountryGate/AllowedCountryGate.tsx
|
|
815
|
-
/**
|
|
816
|
-
* Blocks the user from onboarding if they are from a disallowed country.
|
|
817
|
-
*/
|
|
818
|
-
var AllowedCountryGate = ({ children }) => {
|
|
819
|
-
const allowedCountries = useAllowedCountries();
|
|
820
|
-
const { t, i18n } = useTranslation("common");
|
|
821
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
822
|
-
const { dataset: countries } = useDataset(datasetIdentifier.country);
|
|
823
|
-
addResourceBundles(i18n, [{
|
|
824
|
-
ns: "common",
|
|
825
|
-
importFn: (lang) => _rolldown_dynamic_import_helper_default(/* #__PURE__ */ Object.assign({
|
|
826
|
-
"../../../language/locales/bg-BG.json": () => import("./bg-BG-Cdrkwxmc.js"),
|
|
827
|
-
"../../../language/locales/cs-CZ.json": () => import("./cs-CZ-DpiH1UkS.js"),
|
|
828
|
-
"../../../language/locales/da-DK.json": () => import("./da-DK-B-BJLcqw.js"),
|
|
829
|
-
"../../../language/locales/de-DE.json": () => import("./de-DE-BxTGFyOs.js"),
|
|
830
|
-
"../../../language/locales/el-GR.json": () => import("./el-GR-IQwyd9ws.js"),
|
|
831
|
-
"../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-BVNIyLRs.js"),
|
|
832
|
-
"../../../language/locales/en-US.json": () => import("./en-US-U0d3NI20.js"),
|
|
833
|
-
"../../../language/locales/es-ES.json": () => import("./es-ES-Cg2IadcX.js"),
|
|
834
|
-
"../../../language/locales/es-LA.json": () => import("./es-LA-DvMpG4FP.js"),
|
|
835
|
-
"../../../language/locales/et-EE.json": () => import("./et-EE-eGeytyQh.js"),
|
|
836
|
-
"../../../language/locales/fi-FI.json": () => import("./fi-FI-C02wZfgW.js"),
|
|
837
|
-
"../../../language/locales/fr-FR.json": () => import("./fr-FR-CE7k9H5_.js"),
|
|
838
|
-
"../../../language/locales/hr-HR.json": () => import("./hr-HR-B12DcJ3l.js"),
|
|
839
|
-
"../../../language/locales/hu-HU.json": () => import("./hu-HU-cosbDuos.js"),
|
|
840
|
-
"../../../language/locales/it-IT.json": () => import("./it-IT-CiKoOxzk.js"),
|
|
841
|
-
"../../../language/locales/ja-JP.json": () => import("./ja-JP-D7PEVMmT.js"),
|
|
842
|
-
"../../../language/locales/lt-LT.json": () => import("./lt-LT-C2oxTakB.js"),
|
|
843
|
-
"../../../language/locales/lv-LV.json": () => import("./lv-LV-C_KVkpid.js"),
|
|
844
|
-
"../../../language/locales/nl-NL.json": () => import("./nl-NL-CwNBy0Ku.js"),
|
|
845
|
-
"../../../language/locales/no-NO.json": () => import("./no-NO-VqkeNhzB.js"),
|
|
846
|
-
"../../../language/locales/pl-PL.json": () => import("./pl-PL-Bp218jDD.js"),
|
|
847
|
-
"../../../language/locales/pt-BR.json": () => import("./pt-BR-CPbFPNwq2.js"),
|
|
848
|
-
"../../../language/locales/pt-PT.json": () => import("./pt-PT-Bz39smeX.js"),
|
|
849
|
-
"../../../language/locales/ro-RO.json": () => import("./ro-RO-jNItoBZk.js"),
|
|
850
|
-
"../../../language/locales/sk-SK.json": () => import("./sk-SK-CsSqXqf_.js"),
|
|
851
|
-
"../../../language/locales/sl-SI.json": () => import("./sl-SI-PRqWis0E.js"),
|
|
852
|
-
"../../../language/locales/sv-SE.json": () => import("./sv-SE-Dv-rMOdB.js")
|
|
853
|
-
}), `../../../language/locales/${lang}.json`, 6)
|
|
854
|
-
}]);
|
|
855
|
-
if (!rootLegalEntity || !allowedCountries) return /* @__PURE__ */ jsx(Loader, {});
|
|
856
|
-
const country = getLegalEntityCountry(rootLegalEntity);
|
|
857
|
-
const isAllowed = allowedCountries.includes(country);
|
|
858
|
-
const countryName = countries.find(({ id }) => id === country)?.name ?? country;
|
|
859
|
-
if (!isAllowed) return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AlertIcon, { variant: "error" }), /* @__PURE__ */ jsx(Header, {
|
|
860
|
-
title: t(($) => $["countryNotSupported"]),
|
|
861
|
-
description: t(($) => $["weDontSupportOnboardingInCountry"], { country: countryName })
|
|
862
|
-
})] });
|
|
863
|
-
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
864
|
-
};
|
|
865
|
-
//#endregion
|
|
866
|
-
//#region src/components/Shared/devex/DebugListener/DebugListener.tsx
|
|
867
|
-
var DebugModal = lazy(async () => (await import("./DebugModal-DgbagO5Z.js")).DebugModal);
|
|
868
|
-
/**
|
|
869
|
-
* Adds a listener on the page to open the debug modal when the
|
|
870
|
-
* debug modal key combination is pressed to open it
|
|
871
|
-
*/
|
|
872
|
-
var DebugListener = () => {
|
|
873
|
-
const [debugUiOpen, setDebugUiOpen] = useState$1(false);
|
|
874
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
875
|
-
const debugUiAllowed = isSettingEnabled("allowDebugUi");
|
|
876
|
-
useEffect$1(() => {
|
|
877
|
-
if (!debugUiAllowed) return;
|
|
878
|
-
const handleKeyDown = ({ code, ctrlKey, altKey, shiftKey }) => {
|
|
879
|
-
if (ctrlKey && (altKey || shiftKey) && code === "Backslash") setDebugUiOpen(true);
|
|
880
|
-
};
|
|
881
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
882
|
-
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
883
|
-
}, [debugUiAllowed]);
|
|
884
|
-
return /* @__PURE__ */ jsx(Fragment$1, { children: debugUiAllowed && debugUiOpen ? /* @__PURE__ */ jsx(Suspense, {
|
|
885
|
-
fallback: /* @__PURE__ */ jsx("div", {}),
|
|
886
|
-
children: /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) })
|
|
887
|
-
}) : null });
|
|
888
|
-
};
|
|
889
|
-
//#endregion
|
|
890
|
-
//#region src/stores/globalStore/StoreProvider.tsx
|
|
891
|
-
/**
|
|
892
|
-
* `<StoreProvider>` postpones render of the remaining tree until root legal entity data has been
|
|
893
|
-
* retrieved and the {@link GlobalStore} has been initialized.
|
|
894
|
-
*
|
|
895
|
-
* This provider can (and should) also be used from tests and stories.
|
|
896
|
-
* If you prefer to mock global state, see {@link MockedStoreProvider}.
|
|
897
|
-
*/
|
|
898
|
-
var StoreProvider = ({ children }) => {
|
|
899
|
-
const [store, setStore] = useState$1();
|
|
900
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
901
|
-
useEffect$1(() => {
|
|
902
|
-
if (!rootLegalEntity || store) return;
|
|
903
|
-
setStore(createGlobalStore({ rootLegalEntity }));
|
|
904
|
-
}, [rootLegalEntity, store]);
|
|
905
|
-
if (!store) return /* @__PURE__ */ jsx(Skeleton, {});
|
|
906
|
-
return /* @__PURE__ */ jsx(StoreContext.Provider, {
|
|
907
|
-
value: store,
|
|
908
|
-
children
|
|
909
|
-
});
|
|
910
|
-
};
|
|
911
|
-
//#endregion
|
|
912
|
-
//#region src/core/EmbedShell/EmbedShell.tsx
|
|
913
|
-
/** conditional polyfill for container queries */
|
|
914
|
-
if (CSS.supports("container", "foo / inline-size") === false) import("container-query-polyfill");
|
|
915
|
-
var LanguageSwitcher = ({ locale }) => {
|
|
916
|
-
const { i18n } = useTranslation();
|
|
917
|
-
const { isFeatureEnabled } = useToggleContext();
|
|
918
|
-
useEffect$1(() => {
|
|
919
|
-
if (locale === "ja-JP" && !isFeatureEnabled("EnableJapanLocalization")) return;
|
|
920
|
-
i18n.changeLanguage(locale);
|
|
921
|
-
}, [
|
|
922
|
-
locale,
|
|
923
|
-
i18n,
|
|
924
|
-
isFeatureEnabled
|
|
925
|
-
]);
|
|
926
|
-
return null;
|
|
927
|
-
};
|
|
928
|
-
/**
|
|
929
|
-
* Bootstraps any component for external usage by consumers
|
|
930
|
-
* Import it in your component and wrap it inside the EmbedShell, eg:
|
|
931
|
-
*
|
|
932
|
-
* @example
|
|
933
|
-
* ```jsx
|
|
934
|
-
* <EmbedShell {...consumerProps}>
|
|
935
|
-
* <MyReadyToGoForm {...consumerProps} />
|
|
936
|
-
* </EmbedShell>
|
|
937
|
-
* ```
|
|
938
|
-
*
|
|
939
|
-
* @param props given by consumer, be it HO, merchant using library or a TaskList component
|
|
940
|
-
* @returns
|
|
941
|
-
*/
|
|
942
|
-
var EmbedShell = ({ children, rootLegalEntityId, settings, features, refreshExperiments, baseUrl, getSdkToken, componentName, locale, themeMode = "light" }) => {
|
|
943
|
-
const [isLoading, setIsLoading] = useState$1(true);
|
|
944
|
-
const [hasError, setHasError] = useState$1(false);
|
|
945
|
-
setSdkTokenHandler(getSdkToken);
|
|
946
|
-
useEffect$1(() => {
|
|
947
|
-
refreshSession().then((hasRefreshed) => {
|
|
948
|
-
if (!hasRefreshed) setHasError(true);
|
|
949
|
-
setIsLoading(false);
|
|
950
|
-
});
|
|
951
|
-
}, []);
|
|
952
|
-
if (hasError) return /* @__PURE__ */ jsxs("div", { children: ["Something went wrong, please", /* @__PURE__ */ jsx(Button, {
|
|
953
|
-
onClick: () => location.reload(),
|
|
954
|
-
children: "refresh the page."
|
|
955
|
-
})] });
|
|
956
|
-
if (isLoading) return /* @__PURE__ */ jsx(Loader, {});
|
|
957
|
-
return /* @__PURE__ */ jsx(SettingsProvider, {
|
|
958
|
-
settings,
|
|
959
|
-
children: /* @__PURE__ */ jsx(QueryClientProvider$1, { children: /* @__PURE__ */ jsx(ApiProvider, {
|
|
960
|
-
rootLegalEntityId,
|
|
961
|
-
baseUrl,
|
|
962
|
-
children: /* @__PURE__ */ jsxs(ToggleContextProvider, {
|
|
963
|
-
features,
|
|
964
|
-
refreshExperiments,
|
|
965
|
-
children: [/* @__PURE__ */ jsx(LanguageSwitcher, { locale }), /* @__PURE__ */ jsxs(StoreProvider, { children: [/* @__PURE__ */ jsx("span", {
|
|
966
|
-
id: "sdk-version",
|
|
967
|
-
hidden: true,
|
|
968
|
-
children: "4.25.0"
|
|
969
|
-
}), /* @__PURE__ */ jsx(AnalyticsProvider, {
|
|
970
|
-
componentName,
|
|
971
|
-
locale,
|
|
972
|
-
rootLegalEntityId,
|
|
973
|
-
children: /* @__PURE__ */ jsx(Suspense, {
|
|
974
|
-
fallback: /* @__PURE__ */ jsx(Loader, {}),
|
|
975
|
-
children: /* @__PURE__ */ jsxs(AllowedCountryGate, { children: [/* @__PURE__ */ jsx(DebugListener, {}), /* @__PURE__ */ jsx("div", {
|
|
976
|
-
className: `adyen-kyc-ui-element-container-wrapper ${themeMode}`,
|
|
977
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
978
|
-
className: "adyen-kyc-ui-element-container",
|
|
979
|
-
children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children }) })
|
|
980
|
-
})
|
|
981
|
-
})] })
|
|
982
|
-
})
|
|
983
|
-
})] })]
|
|
984
|
-
})
|
|
985
|
-
}) })
|
|
986
|
-
});
|
|
987
|
-
};
|
|
988
|
-
//#endregion
|
|
989
|
-
//#region src/core/environment/normalizeEnvironment.ts
|
|
990
|
-
var normalizeEnvironment = (env) => env.endsWith("/") ? env : `${env}/`;
|
|
991
|
-
//#endregion
|
|
992
|
-
//#region src/core/environment/resolveEnvironment.ts
|
|
993
|
-
var environmentMap = Object.freeze({
|
|
994
|
-
live: "https://onboardingcomponents-live.adyen.com/",
|
|
995
|
-
test: "https://test.adyen.com/"
|
|
996
|
-
});
|
|
997
|
-
var resolveEnvironment = (environment) => environmentMap[environment] ?? normalizeEnvironment(environment);
|
|
998
|
-
//#endregion
|
|
999
|
-
export { stylesheets as i, EmbedShell as n, useToggles as r, resolveEnvironment as t };
|