@adyen/kyc-components 3.94.0 → 3.95.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.
Files changed (375) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-UXDlHmf_.js → AcceptTermsOfServiceComponent-DQBTbYHm.js} +36 -32
  2. package/dist/{Accordion-DM9qeMoR.js → Accordion-CyFxp5eR.js} +2 -2
  3. package/dist/{AccountSetupRejected-DfmKQEp-.js → AccountSetupRejected-BgPC6a82.js} +4 -4
  4. package/dist/{ActionBar-DCKuV5BO.js → ActionBar-DuqmbwPb.js} +2 -2
  5. package/dist/{Address-BEUcWe_H.js → Address-uWZO7A9W.js} +10 -12
  6. package/dist/{Alert-D9HbhU88.js → Alert-BpQzk7oa.js} +3 -3
  7. package/dist/{Avatar-C_tjYaBz.js → Avatar-cL2Btfr9.js} +2 -2
  8. package/dist/{BusinessFinancingComponent-B5gLGmkK.js → BusinessFinancingComponent-DQnluWsY.js} +7 -7
  9. package/dist/{BusinessFinancingDropin-BpZKzB71.js → BusinessFinancingDropin-TTX58HNJ.js} +689 -307
  10. package/dist/{BusinessFinancingPage-CKdy77OK.js → BusinessFinancingPage-CARcv8Qh.js} +5 -5
  11. package/dist/{BusinessTypeSelectionPage-ClkY9cbT.js → BusinessTypeSelectionPage-BamCO_8X.js} +9 -9
  12. package/dist/{Checkbox-BU4IYlt6.js → Checkbox-4TE31vJm.js} +2 -2
  13. package/dist/{Confirm-BM1PTsnm.js → Confirm-BCbTBwh3.js} +3 -3
  14. package/dist/{ConstitutionalDocument-D9sPfw_B.js → ConstitutionalDocument-DAXsUY5o.js} +37 -30
  15. package/dist/{ContactDetails-BRnbG7BX.js → ContactDetails-DF1ERAlH.js} +8 -8
  16. package/dist/{ContextGuidance-CZGa7C-r.js → ContextGuidance-c2saCqxR.js} +3 -3
  17. package/dist/{ContractViewer-Byp71k2e.js → ContractViewer-DcQHIGMU.js} +2 -2
  18. package/dist/{CountryField-DShqP-Yi.js → CountryField-0SyPMIyv.js} +6 -6
  19. package/dist/{CreateIndividualComponent-BZ6dd8Bd.js → CreateIndividualComponent-BEG5bcc8.js} +7 -7
  20. package/dist/{CreateTransferInstrumentComponent-1pjVr_3y.js → CreateTransferInstrumentComponent-UEBRtXZu.js} +5 -5
  21. package/dist/{Currency-CEtDxV-F.js → Currency-CYaHlY2Z.js} +7 -11
  22. package/dist/{CustomerSupport-gmN79qSl.js → CustomerSupport-CZAM9Fzm.js} +11 -11
  23. package/dist/{DebugModal-C3horl0P.js → DebugModal-Dpm0S2dA.js} +9 -9
  24. package/dist/{DecisionMakerDetailsPage-CN1t2Ok6.js → DecisionMakerDetailsPage-CgEYI6wt.js} +14 -10
  25. package/dist/{DecisionMakers-83kflZpA.js → DecisionMakers-Dj2lHuCW.js} +36 -26
  26. package/dist/{Dropzone-DYIUInYF.js → Dropzone-D-KrwtNK.js} +4 -4
  27. package/dist/{EmbeddedStatus-BID4yaOx.js → EmbeddedStatus-Bz7OcIMW.js} +3 -3
  28. package/dist/{EndStateLayout-Cqmi0QYW.js → EndStateLayout-DnGdtXOr.js} +2 -2
  29. package/dist/{EntityAssociation-jMAjopdW.js → EntityAssociation-ysCVZKn5.js} +35 -23
  30. package/dist/{EntityGuidanceStatus-ek-5IvZb.js → EntityGuidanceStatus-BHI0RfAS.js} +3 -3
  31. package/dist/{ErrorPanel-ByEaxCQu.js → ErrorPanel-CAHQTbMv.js} +3 -3
  32. package/dist/{Field-Cp_UOAnA.js → Field-CApB-T06.js} +2 -2
  33. package/dist/{FormNavigation-CttAyMuX.js → FormNavigation-DSCpClML.js} +3 -3
  34. package/dist/{FormWrapper-C8UDjnjQ.js → FormWrapper-CVN-7oA1.js} +9 -9
  35. package/dist/{Header-CIxJSQWR.js → Header-DCVQMDDt.js} +2 -2
  36. package/dist/{Image-T-D-HDf5.js → Image-CJu0BRVo.js} +2 -2
  37. package/dist/{Individual.rules-DEhHxeiv.js → Individual.rules-NaoLBYL8.js} +29 -14
  38. package/dist/{IndividualDropin-Dz2ooI0s.js → IndividualDropin-CfUopCha.js} +71 -63
  39. package/dist/{InputDate-z9OpUslu.js → InputDate-CiL0lNHS.js} +2 -2
  40. package/dist/{InputText-CBhD5jca.js → InputText-BV_-tgjA.js} +2 -2
  41. package/dist/{Introduction-Bm3kybSH.js → Introduction-D1Ki78MP.js} +4 -4
  42. package/dist/{JpAddress-owiNWOqn.js → JpAddress-UoTJ6rCV.js} +18 -13
  43. package/dist/{LandingLayout-BuBU3Pyb.js → LandingLayout-Cn77l9Co.js} +2 -2
  44. package/dist/{fieldConfig-CMdKt41r.js → LegalCompanyNameField-iFBtpehs.js} +71 -67
  45. package/dist/{LegalRepresentativeDetailsPage-vS7jAxuO.js → LegalRepresentativeDetailsPage-B0UoHJQJ.js} +5 -5
  46. package/dist/{Link-CIBefZJS.js → Link-BJyutNM5.js} +2 -2
  47. package/dist/{ListItem-CnzgA-sH.js → ListItem-Bgm6YMzN.js} +3 -3
  48. package/dist/{LoaderWrapper-CwhIpGKR.js → LoaderWrapper-C4vG5XIf.js} +1 -1
  49. package/dist/ManageIndividualComponent-D9R1S14p.js +46 -0
  50. package/dist/{ManageTermsOfServiceComponent-BdiC5Nbd.js → ManageTermsOfServiceComponent-CwmatDwh.js} +5 -5
  51. package/dist/{ManageTransferInstrumentComponent-CObC5Uof.js → ManageTransferInstrumentComponent-2b76XSTc.js} +15 -14
  52. package/dist/{MaskedInput-BfI4FGAA.js → MaskedInput-BbFU7XNV.js} +5 -5
  53. package/dist/{MaybeModal-DHcu32Dh.js → MaybeModal-BpIcw6KQ.js} +3 -3
  54. package/dist/{Modal-BKWXTEoU.js → Modal-CJUtsR2N.js} +2 -2
  55. package/dist/{Name-BCar2_dk.js → Name-DTE823OG.js} +5 -5
  56. package/dist/{OnboardingDropinComponent-DstStqYS.js → OnboardingDropinComponent-BX4esftr.js} +850 -520
  57. package/dist/{PayoutDetailsDropin-DSdlqAe2.js → PayoutDetailsDropin-Cqeomvbg.js} +130 -77
  58. package/dist/{RadioGroup-COsozc9g.js → RadioGroup-DzUpgP12.js} +2 -2
  59. package/dist/{RadioGroupCard-xqC3IACY.js → RadioGroupCard-g4OS0871.js} +2 -2
  60. package/dist/{Review-CZwc-DMp.js → Review-Cj1WCiGQ.js} +7 -7
  61. package/dist/RootBusinessDetailsPage-9NXM1XdC.js +50 -0
  62. package/dist/{RootBusinessLinesPage-BRgtyHFs.js → RootBusinessLinesPage-YxGXibwW.js} +27 -24
  63. package/dist/{RootIndividualDetailsPage-C3wTzTp1.js → RootIndividualDetailsPage-DX1rjTXN.js} +7 -6
  64. package/dist/{Select-DeTBytOH.js → Select-C_6mHv91.js} +4 -4
  65. package/dist/{SignPCIComponent-CCGyrXvI.js → SignPCIComponent-OxWCtP3x.js} +14 -14
  66. package/dist/{SingpassSelection-BumqRwXI.js → SingpassSelection-DE4uUTZo.js} +6 -6
  67. package/dist/SoleProprietorshipPage-BzpFPKOl.js +50 -0
  68. package/dist/{SourceOfFundsPage-DkjYls-E.js → SourceOfFundsPage-CESAo3kl.js} +33 -32
  69. package/dist/{StepProgressIndicator-D8PfKJKf.js → StepProgressIndicator-a3q7kzzC.js} +2 -2
  70. package/dist/{StoreProvider-CsZ-qrGt.js → StoreProvider-BL3nK1iO.js} +157 -132
  71. package/dist/{StructuredList-9dnJRdx_.js → StructuredList-BNLhk_zV.js} +1 -1
  72. package/dist/{Summary-DPm9r7Az.js → Summary-8HdspbcQ.js} +19 -8
  73. package/dist/{TaskVerificationStatus-DrOQToMh.js → TaskVerificationStatus-ycoS73dK.js} +2 -2
  74. package/dist/{TaxInformationField-NI7Hbgov.js → TaxInformationField-BfDJhJG4.js} +438 -81
  75. package/dist/{TaxReportingDropin-BBUAxx92.js → TaxReportingDropin-xYD4YqWR.js} +18 -18
  76. package/dist/{TextArea-CCjCNpAP.js → TextArea-CWY-x138.js} +2 -2
  77. package/dist/{TileGroup-BhKhvfLz.js → TileGroup-DmZTiaip.js} +3 -3
  78. package/dist/{TrustDetailsPage-yOmFcEyO.js → TrustDetailsPage-JQ-U6HZk.js} +44 -38
  79. package/dist/TrustMemberCompanyPage-WwsnSV7c.js +68 -0
  80. package/dist/{TrustMemberIndividualPage-B8tb56n2.js → TrustMemberIndividualPage-27y1WJMM.js} +11 -8
  81. package/dist/{TrustMemberRoleAndTypePage-WHu1tc4O.js → TrustMemberRoleAndTypePage-DHCLuLa-.js} +43 -38
  82. package/dist/{TrustMembersOverview-BWbGUK3k.js → TrustMembersOverview-CqdtBx67.js} +13 -13
  83. package/dist/{UnincorporatedPartnershipIndividualPage-DD2dn41k.js → UnincorporatedPartnershipIndividualPage-xOJ-Kusf.js} +10 -7
  84. package/dist/{UnincorporatedPartnershipMemberCompanyPage-DsUSSYnI.js → UnincorporatedPartnershipMemberCompanyPage-CBw2IY6X.js} +10 -7
  85. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-Ctb0Lz_0.js → UnincorporatedPartnershipMemberRoleAndTypePage-B4fDDHnW.js} +15 -12
  86. package/dist/{UnincorporatedPartnershipMembersOverview-B_GJIeZC.js → UnincorporatedPartnershipMembersOverview-BrBvKluu.js} +9 -9
  87. package/dist/{VerificationErrorAlert-CCiMqGl8.js → VerificationErrorAlert-DXaYFyA9.js} +4 -24
  88. package/dist/{ViewVerificationStatusComponent-CICJ6cy4.js → ViewVerificationStatusComponent-YY4hrQ8I.js} +4 -4
  89. package/dist/accountHolderUtils-DP6cbO7y.js +66 -0
  90. package/dist/adyen-business-financing.js +3 -3
  91. package/dist/adyen-individual-configuration.js +3 -3
  92. package/dist/adyen-individual-status.js +3 -3
  93. package/dist/adyen-kyc-components.js +20 -19
  94. package/dist/adyen-onboarding.js +3 -3
  95. package/dist/adyen-terms-of-service-management.js +3 -3
  96. package/dist/adyen-terms-of-service-status.js +3 -3
  97. package/dist/adyen-transfer-instrument-configuration.js +3 -3
  98. package/dist/adyen-transfer-instrument-management.js +3 -3
  99. package/dist/adyen-verification-status.js +3 -3
  100. package/dist/{bafinUtils-Ch6rVpGi.js → bafinUtils-BCq4-e97.js} +3 -22
  101. package/dist/bg-BG-CFuVZnaC.js +13 -0
  102. package/dist/{bg-BG-CepHap8j.js → bg-BG-DMNRRZZE.js} +8 -1
  103. package/dist/bg-BG-Dp1J1L2X.js +13 -0
  104. package/dist/{commonValidators-B8wfpMjX.js → commonValidators-BXRpCFOY.js} +2 -2
  105. package/dist/company-types-value-D_mKv5PT.js +23 -0
  106. package/dist/cs-CZ-Bd9Zz7z4.js +13 -0
  107. package/dist/cs-CZ-CYsR__kj.js +13 -0
  108. package/dist/{cs-CZ-BP7niQM9.js → cs-CZ-DXSMRqPu.js} +8 -1
  109. package/dist/da-DK-B3Pg-MWO.js +13 -0
  110. package/dist/{da-DK-Dc0QYG8m.js → da-DK-Cd5IQPv3.js} +8 -1
  111. package/dist/da-DK-DmFDgnbC.js +13 -0
  112. package/dist/{de-DE-Dz2OsS1F.js → de-DE-C9NH2zMh.js} +8 -1
  113. package/dist/de-DE-DRuKxSOy.js +13 -0
  114. package/dist/de-DE-S6qDey1L.js +13 -0
  115. package/dist/{dropinUtils-B4Vv7_zJ.js → dropinUtils-DGUJjA6y.js} +4 -4
  116. package/dist/el-GR-Cezskrdn.js +13 -0
  117. package/dist/{el-GR-BHG69mXl.js → el-GR-DTHQslLc.js} +8 -1
  118. package/dist/el-GR-DoS_Va-n.js +13 -0
  119. package/dist/{en-US-CzEL6t1W.js → en-US-D1sB335h.js} +9 -3
  120. package/dist/en-US-DLY20x1O.js +13 -0
  121. package/dist/{en-US-D-B35AoN.js → en-US-DYP6rAvA.js} +8 -1
  122. package/dist/{en-US-fyGPkcqX.js → en-US-cVpRgdC8.js} +2 -2
  123. package/dist/es-ES-BYl5-PFR.js +13 -0
  124. package/dist/{es-ES-BI_jdT67.js → es-ES-DK-7qtDf.js} +8 -1
  125. package/dist/es-ES-DzB4V6UZ.js +13 -0
  126. package/dist/et-EE-4fHYOoff.js +13 -0
  127. package/dist/et-EE-BkHzGD3D.js +13 -0
  128. package/dist/{et-EE-C_PZO2aI.js → et-EE-DNC4hcxm.js} +8 -1
  129. package/dist/{fi-FI-hwzizPnr.js → fi-FI-BJLU1JHw.js} +8 -1
  130. package/dist/fi-FI-Cxkp0GQA.js +13 -0
  131. package/dist/fi-FI-DFxljML-.js +13 -0
  132. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
  133. package/dist/{formUtils-q44BTi2U.js → formUtils-CJQolfmf.js} +3 -22
  134. package/dist/{fr-FR-CYZXbwc9.js → fr-FR-B2je0smB.js} +8 -1
  135. package/dist/fr-FR-DPehHVb6.js +13 -0
  136. package/dist/fr-FR-DsEmssxk.js +13 -0
  137. package/dist/{getName-BxKx8lLd.js → getName-C1AIqAns.js} +2 -2
  138. package/dist/{getProps-CLJfvUMb.js → getProps-O8Fpl_k_.js} +2 -6
  139. package/dist/getTrustedFields-C5-mXl-l.js +64 -0
  140. package/dist/hr-HR-Bjx-KdVs.js +13 -0
  141. package/dist/{hr-HR-bE6cvRCQ.js → hr-HR-C0NLgF1r.js} +8 -1
  142. package/dist/hr-HR-DU4nvY6g.js +13 -0
  143. package/dist/hu-HU-B-lUkFnQ.js +13 -0
  144. package/dist/hu-HU-D6frnZmR.js +13 -0
  145. package/dist/{hu-HU-DG-NUDx4.js → hu-HU-DU-5ujQK.js} +8 -1
  146. package/dist/{iframeWidget-iDH8bVr4.js → iframeWidget-DRjCrrYZ.js} +4 -4
  147. package/dist/{isEmpty-BNacTlfR.js → isEmpty-C7bLX-qG.js} +2 -2
  148. package/dist/isNewEntity-7Vw_eQBr.js +13 -0
  149. package/dist/it-IT-DOBp2-MP.js +13 -0
  150. package/dist/{it-IT-Erh1DIlj.js → it-IT-Dhwa9Ecj.js} +8 -1
  151. package/dist/it-IT-VFXgXyRA.js +13 -0
  152. package/dist/{ja-JP-DfE1PYyN.js → ja-JP-B3wVYIJU.js} +2 -2
  153. package/dist/ja-JP-B_Q8X66O.js +13 -0
  154. package/dist/{ja-JP-CWJzqrtj.js → ja-JP-Bc4U0S8-.js} +8 -1
  155. package/dist/{ja-JP-4Q9zp35q.js → ja-JP-Bv3ru9Xq.js} +14 -7
  156. package/dist/{ja-JP-CSz7fEkn.js → ja-JP-CceCDXLB.js} +2 -2
  157. package/dist/{ja-JP-DBoYLzeA.js → ja-JP-DSvZhFNY.js} +4 -4
  158. package/dist/{japanSupportUtils-C7aPdWXD.js → japanSupportUtils-BucfNSWB.js} +2 -2
  159. package/dist/{jpAddressSchema-De6ix57p.js → jpAddressSchema-DEOyz9Yo.js} +2 -4
  160. package/dist/{localizeDateString-DuTq6aHe.js → localizeDateString-n8b2kwyK.js} +2 -2
  161. package/dist/{lt-LT-Nd1uRoIj.js → lt-LT-C8n1GZoU.js} +8 -1
  162. package/dist/lt-LT-CE-GdWrg.js +13 -0
  163. package/dist/lt-LT-WRulV980.js +13 -0
  164. package/dist/{lv-LV-DKhV24CI.js → lv-LV-BZN4-Xat.js} +8 -1
  165. package/dist/lv-LV-C9Dhkruv.js +13 -0
  166. package/dist/lv-LV-dv7fqeBS.js +13 -0
  167. package/dist/{mapExistingFile-CGg2sd-T.js → mapExistingFile-DtG8dtIh.js} +5 -6
  168. package/dist/{mapJpAddressSchemaToAddressLocalizations-BwHU4ZwL.js → mapJpAddressSchemaToAddressLocalizations-CpVZUxo1.js} +5 -5
  169. package/dist/{mapLegalEntityToIndividualSchema-DzCEngXr.js → mapLegalEntityToIndividualSchema-1aYgn5km.js} +4 -4
  170. package/dist/{mapTransferInstrumentToPayoutAccount-DLHvwig1.js → mapTransferInstrumentToPayoutAccount-BDQGKfhP.js} +2 -2
  171. package/dist/{nl-NL-O9GCHMDA.js → nl-NL-B0fvINJj.js} +8 -1
  172. package/dist/nl-NL-BwIRHJgf.js +13 -0
  173. package/dist/nl-NL-SjOGmGk5.js +13 -0
  174. package/dist/no-NO-BAWVf0GX.js +13 -0
  175. package/dist/{no-NO-CA1aR6Wh.js → no-NO-Jw7Gae-a.js} +8 -1
  176. package/dist/no-NO-u56mEoG3.js +13 -0
  177. package/dist/{patternValidators-CZ5mQeGD.js → patternValidators-DcjAPGFV.js} +5 -5
  178. package/dist/{pl-PL-BKDK0_G8.js → pl-PL-Bmaq3IC3.js} +8 -1
  179. package/dist/pl-PL-DEMxxz7h.js +13 -0
  180. package/dist/pl-PL-zqT41Yjw.js +13 -0
  181. package/dist/{process-field-configurations-BQY03q4v.js → process-field-configurations-CQoldE8s.js} +3 -3
  182. package/dist/{pt-BR-NtLaWlnZ.js → pt-BR-BaTE6BB_.js} +8 -1
  183. package/dist/pt-BR-BfDe_8iW.js +13 -0
  184. package/dist/pt-BR-fMKntiMG.js +13 -0
  185. package/dist/{pt-PT-C6teRGuD.js → pt-PT-C6pZR9Bc.js} +2 -2
  186. package/dist/pt-PT-F1qPZJ2c.js +13 -0
  187. package/dist/{pt-PT-DSxxVA0f.js → pt-PT-c0ap84_F.js} +8 -1
  188. package/dist/{resolveEnvironment-BEU3VKd8.js → resolveEnvironment-D-07Kfa-.js} +3 -3
  189. package/dist/ro-RO-0vx6ZLWV.js +13 -0
  190. package/dist/ro-RO-B5BQrf6C.js +13 -0
  191. package/dist/{ro-RO-Bybq8JFn.js → ro-RO-BPOHV6Wp.js} +8 -1
  192. package/dist/{roleMetadata-BeJKyoeE.js → roleMetadata-DsoqlMAY.js} +2 -2
  193. package/dist/{sk-SK-C6rMIxpz.js → sk-SK-3_SoEn6P.js} +8 -1
  194. package/dist/sk-SK-Bz4T7upD.js +13 -0
  195. package/dist/sk-SK-DuLm2CVx.js +13 -0
  196. package/dist/sl-SI--RTGDByj.js +13 -0
  197. package/dist/sl-SI-BAIm-qBe.js +13 -0
  198. package/dist/{sl-SI-tPwbFvOI.js → sl-SI-DbfswGh0.js} +8 -1
  199. package/dist/style.css +140 -148
  200. package/dist/styles-CLV89_hH.js +140 -148
  201. package/dist/sv-SE-BZNey_8S.js +13 -0
  202. package/dist/{sv-SE-K1QT1cOt.js → sv-SE-D_Efxy3s.js} +8 -1
  203. package/dist/sv-SE-Dryy3JLw.js +13 -0
  204. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
  205. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
  206. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +10 -10
  207. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +1 -1
  208. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -3
  209. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
  210. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  211. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +1 -1
  212. package/dist/types/components/Business/forms/rules.d.ts +6 -6
  213. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
  214. package/dist/types/components/Business/utils/companyUtil.d.ts +0 -1
  215. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
  216. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  217. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  218. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  219. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5283 -53
  220. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
  221. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
  222. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
  223. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
  224. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
  225. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
  226. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
  227. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +14 -3
  228. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
  229. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +1 -0
  230. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  231. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
  232. package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -1
  233. package/dist/types/components/Individual/forms/Individual.rules.d.ts +2 -2
  234. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +3 -3
  235. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
  236. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
  237. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
  238. package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
  239. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  240. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  241. package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
  242. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  243. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  244. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  245. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +78 -0
  246. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
  247. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
  248. package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
  249. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  250. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  251. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  252. package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
  253. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  254. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
  255. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
  256. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +3 -3
  257. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
  258. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
  259. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
  260. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +3 -3
  261. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
  262. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
  263. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -1
  264. package/dist/types/context/ExperimentContext/types.d.ts +17 -0
  265. package/dist/types/core/models/api/individual.d.ts +3 -0
  266. package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
  267. package/dist/types/hooks/useForm/types.d.ts +0 -4
  268. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
  269. package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
  270. package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
  271. package/dist/types/router/MemoryRouterContext.d.ts +9 -0
  272. package/dist/types/router/OnboardingRouter.d.ts +39 -0
  273. package/dist/types/router/SuspenseRoute.d.ts +7 -0
  274. package/dist/types/router/getDefaultTask.d.ts +16 -0
  275. package/dist/types/router/routeConfig.d.ts +68 -0
  276. package/dist/types/router/useCurrentTask.d.ts +5 -0
  277. package/dist/types/router/useNavigate.d.ts +7 -0
  278. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  279. package/dist/types/utils/fieldConfigurations.d.ts +0 -1
  280. package/dist/types/utils/formUtils.d.ts +0 -3
  281. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  282. package/dist/types/utils/validatorUtils.d.ts +1 -1
  283. package/dist/{types-B7eWQV7z.js → types-C8yt1YG2.js} +19 -2
  284. package/dist/{types-BY62XJTq.js → types-DRTd35hZ.js} +2 -2
  285. package/dist/{types-pKG9olDB.js → types-DujGXeMG.js} +2 -2
  286. package/dist/{types-BuMuCpsa.js → types-XpRg7EOC.js} +2 -2
  287. package/dist/{useAssociatedLegalEntity-V0OP9ejx.js → useAssociatedLegalEntity-DlZrp3qi.js} +2 -2
  288. package/dist/{useBusinessDetailsData-BsXXL7fg.js → useBusinessDetailsData-gZ8moheH.js} +713 -718
  289. package/dist/useBusinessLines-BD1Yg8Ja.js +29 -0
  290. package/dist/useCanSeeIntroduction-BHQYUN_d.js +48 -0
  291. package/dist/{useCreateLegalEntity-otpCRCfZ.js → useCreateLegalEntity-DjRvxwI5.js} +2 -2
  292. package/dist/useDataMissingRemediations-KgLqbiZx.js +41 -0
  293. package/dist/{useDataset-CvATx7EN.js → useDataset-Bafefouf.js} +5 -3
  294. package/dist/useDeleteTransferInstrument-Cf8rmBGA.js +32 -0
  295. package/dist/{useForm-9nSw9LZY.js → useForm-Bh638xmS.js} +27 -27
  296. package/dist/{useFormContext-BnlNKQZ7.js → useFormContext-BilJQsMw.js} +7 -7
  297. package/dist/{useGlobalData-Dy2O7YGk.js → useGlobalData-DkE5IpZB.js} +2 -2
  298. package/dist/{useMultiForm-CBefohos.js → useMultiForm-djEDTyaG.js} +45 -36
  299. package/dist/useNavigate-DE0sTmpX.js +265 -0
  300. package/dist/{useOnboardingStatus-CJrlnkvv.js → useOnboardingStatus-DhK2qF95.js} +1 -1
  301. package/dist/usePciQuestionnaireList-DsgAv5Ql.js +29 -0
  302. package/dist/useSalesChannels-DUTiDcGq.js +65 -0
  303. package/dist/{useScenarios-CkgrmOF-.js → useScenarios-BxbmDi2R.js} +2 -2
  304. package/dist/useSetting-DwC0bC4k.js +19 -0
  305. package/dist/useTaskStatus-Cps0L-Yp.js +51 -0
  306. package/dist/{useTermsOfServiceStatus-DFLF3xas.js → useTermsOfServiceStatus-COugffxI.js} +1 -1
  307. package/dist/{useToastContext-uSKjdph9.js → useToastContext-DBDF60Ps.js} +2 -2
  308. package/dist/useTrustMembers-ymPJMufc.js +163 -0
  309. package/dist/{useUnincorporatedPartnershipMembers-BmLKVfkf.js → useUnincorporatedPartnershipMembers-ZlPU6E-_.js} +4 -4
  310. package/dist/{useUpdateBusinessLines-BBNXF45E.js → useUpdateBusinessLines-DfjB9Ur6.js} +4 -4
  311. package/dist/{useUpdateLegalEntity-DHxCVgNk.js → useUpdateLegalEntity-C8rOYkS1.js} +3 -3
  312. package/dist/{utils-CLLUBF1a.js → utils-B8oIRKRm.js} +2 -2
  313. package/dist/{utils-ClKogQZa.js → utils-D1RKmLBo.js} +3 -3
  314. package/dist/{utils-5yZQq_bx.js → utils-DIBG3Hc5.js} +6 -6
  315. package/dist/{utils-CIHH_aYF.js → utils-Dd2ry06C.js} +2 -2
  316. package/dist/{utils-CIIs2bXi.js → utils-_6SITBJE.js} +3 -2
  317. package/dist/{validate-BntX2W3B.js → validate-B6hMWJ8a.js} +10 -2
  318. package/dist/{validate-CLYo0JdH.js → validate-jqVPVUI3.js} +3 -3
  319. package/dist/{validationError-DJ6zTIzv.js → validationError-CsCEpxs1.js} +2 -2
  320. package/package.json +3 -2
  321. package/dist/ManageIndividualComponent-CJEqOUgN.js +0 -46
  322. package/dist/RootBusinessDetailsPage-BsAtLAyF.js +0 -50
  323. package/dist/SoleProprietorshipPage-zgU4q95D.js +0 -50
  324. package/dist/TrustMemberCompanyPage-DfXulzKv.js +0 -65
  325. package/dist/bg-BG-C1maG7_G.js +0 -13
  326. package/dist/bg-BG-D4k_k98M.js +0 -118
  327. package/dist/cs-CZ-Dq3xx45p.js +0 -13
  328. package/dist/cs-CZ-nIWwyOHK.js +0 -118
  329. package/dist/da-DK-CoqZjIMT.js +0 -13
  330. package/dist/da-DK-CrtuBoDC.js +0 -118
  331. package/dist/de-DE-CLMlbqGz.js +0 -13
  332. package/dist/de-DE-mH3MobT9.js +0 -13
  333. package/dist/el-GR-BEOd56RY.js +0 -13
  334. package/dist/el-GR-Ckn_3h1a.js +0 -118
  335. package/dist/en-US-d4WBvUW7.js +0 -118
  336. package/dist/es-ES-BnPWZP0s.js +0 -13
  337. package/dist/es-ES-CnyVffM-.js +0 -118
  338. package/dist/et-EE-RzdBGxDM.js +0 -118
  339. package/dist/et-EE-rYc8-Bm2.js +0 -13
  340. package/dist/fi-FI-CYEjY7DQ.js +0 -13
  341. package/dist/fi-FI-kXC-0USa.js +0 -118
  342. package/dist/fr-FR-6YOKsDLQ.js +0 -13
  343. package/dist/fr-FR-CsJuDM2B.js +0 -13
  344. package/dist/hr-HR-DMSNClBZ.js +0 -13
  345. package/dist/hr-HR-fyublN95.js +0 -118
  346. package/dist/hu-HU-CpJDiSu2.js +0 -118
  347. package/dist/hu-HU-DQlYtR9y.js +0 -13
  348. package/dist/it-IT-C9cOsMxY.js +0 -13
  349. package/dist/it-IT-DyCHFg-b.js +0 -118
  350. package/dist/ja-JP-NuKpFRZl.js +0 -13
  351. package/dist/lt-LT-CKE7_7_A.js +0 -118
  352. package/dist/lt-LT-DPU2ZqVt.js +0 -13
  353. package/dist/lv-LV-BD8xCiCe.js +0 -13
  354. package/dist/lv-LV-D4Ik0yoE.js +0 -118
  355. package/dist/nl-NL-CBnYVFv_.js +0 -13
  356. package/dist/nl-NL-DkbhmJAw.js +0 -118
  357. package/dist/no-NO-C690hkyd.js +0 -13
  358. package/dist/no-NO-Df5qUoTc.js +0 -118
  359. package/dist/pl-PL-BDclj9dt.js +0 -13
  360. package/dist/pl-PL-ggZjqXWE.js +0 -118
  361. package/dist/pt-BR-B4wCnZ06.js +0 -13
  362. package/dist/pt-BR-BOOm5lRR.js +0 -118
  363. package/dist/pt-PT-BDfNlThr.js +0 -118
  364. package/dist/ro-RO-BRngQXgs.js +0 -118
  365. package/dist/ro-RO-PA9lKU0J.js +0 -13
  366. package/dist/sk-SK-DmqCF6I9.js +0 -13
  367. package/dist/sk-SK-y9eb7N6i.js +0 -118
  368. package/dist/sl-SI-CGvCdquD.js +0 -118
  369. package/dist/sl-SI-DnT4vnh4.js +0 -13
  370. package/dist/sv-SE-BP2Oun8l.js +0 -118
  371. package/dist/sv-SE-DopUU1N2.js +0 -13
  372. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
  373. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
  374. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
  375. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
@@ -2,416 +2,74 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "cab639ad-5d0c-4cd5-83b9-51b183340c09", e._sentryDebugIdIdentifier = "sentry-dbid-cab639ad-5d0c-4cd5-83b9-51b183340c09");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f581f157-37d8-4cd7-a220-618bd3cb8ce9", e._sentryDebugIdIdentifier = "sentry-dbid-f581f157-37d8-4cd7-a220-618bd3cb8ce9");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
11
  import { useMutation, useQuery, skipToken, useQueryClient } from "@tanstack/preact-query";
12
- import { useEffect, useCallback, useState, useMemo } from "preact/hooks";
13
- import { D as Divider, I as INDUSTRY_CODE_FIELD, i as industryCodeFieldMetadata, u as useIndustryCodes, a as IndustryCodeField, b as useCreateBusinessLine, c as useUpdateBusinessLine } from "./useUpdateBusinessLines-BBNXF45E.js";
14
- import { u as useTranslation, ai as useI18nContext, ap as isEmpty, i as isUndefinedOrNull, a5 as CountryCodes, bu as isISIN, a0 as Button, J as useExperimentsContext, c as useLegalEntity, R as ROOT_LE, aE as useVersionConfiguration, O as Typography, L as Loader, m as useSettingsContext, b as useApiContext, j as httpPost, ak as entriesOf, C as useAnalyticsContext, o as createLogger, x as useAccountHolder, B as TaskTypes, t as LegalEntityTypes, bv as businessDetailsComponentsKeyMapping, bw as solePropBusinessDetailsKeyMapping, ac as objectsDeepEqual, aI as keysOf, bx as solePropBusinessDetailsApiKeyMapping, b8 as businessDetailsApiKeyMapping, aO as filterOutUnwantedAssociationsIfRootLE, aM as drop, a8 as getOwnEntityAssociations, aT as doArraysMatch, by as solePropBusinessDetailsDocumentMapping, bz as businessDetailsDocumentMapping } from "./StoreProvider-CsZ-qrGt.js";
15
- import { u as useCreateLegalEntity } from "./useCreateLegalEntity-otpCRCfZ.js";
16
- import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-DHxCVgNk.js";
17
- import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-BnlNKQZ7.js";
18
- import { u as useToastContext } from "./useToastContext-uSKjdph9.js";
19
- import { C as CompanyTypesValues } from "./bafinUtils-Ch6rVpGi.js";
20
- import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-BQY03q4v.js";
21
- import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-B4Vv7_zJ.js";
22
- import { u as useMultiForm } from "./useMultiForm-CBefohos.js";
23
- import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-CGg2sd-T.js";
24
- import { C as Confirm } from "./Confirm-BM1PTsnm.js";
25
- import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-CLYo0JdH.js";
26
- import { c as TAX_INFORMATION_FIELD, r as requestingBanking, d as requestingIssuing, t as taxInformationDefaultFieldMetadata, a as taxInformationDefaultFieldConfig, T as TaxInformationField, C as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, S as StateCodesUS, e as isUsingCompanySearch, M as MemoizedDocumentUpload, f as isRegistrationNumberAbsentStateV4Scenario, h as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, j as getCompanyRegistrationNumberOptions, k as countryToTaxInfoTypeMap, l as rules, g as getFieldsWithExistingData } from "./TaxInformationField-NI7Hbgov.js";
27
- import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD, r as registrationAddressFields, o as operationalAddressIsSameIds, v as vatAbsenceReasonMetadata, d as defaultFieldMetadata$1, a as defaultFieldConfig$1, b as registrationNumberDefaultFieldMetadata, c as registrationNumberDefaultFieldConfig, e as doingBusinessAsFieldMetadata, f as doingBusinessAsAbsentFieldMetadata, g as DBANameField, h as BusinessRegistrationNumberField, i as VatNumberField, M as MemoizedConstitutionalDocument, j as getDefaultRegistrationNumberType, k as getDefaultVatNumberType, l as inferCompanyRegistrationNumberType, m as exemptFromRegistrationNumberDefaultFieldMetadata } from "./ConstitutionalDocument-D9sPfw_B.js";
28
- import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-BKWXTEoU.js";
29
- import { S as SettingNames } from "./TaskVerificationStatus-DrOQToMh.js";
30
- import { t as toFullWidth, u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-BwHU4ZwL.js";
31
- import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-CIIs2bXi.js";
32
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-5yZQq_bx.js";
33
- import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-ClKogQZa.js";
34
- import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, c as StateField, i as isDateOlderThanAYear } from "./Address-BEUcWe_H.js";
35
- import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
36
- import { s as summaryStep } from "./Summary-DPm9r7Az.js";
37
- import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-DJ6zTIzv.js";
38
- import { a as datasetUtilities } from "./datasetUtil-BHQp0-xL.js";
39
- import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
40
- import { I as InputNumber, c as InputCurrency, b as CURRENCY_FIELD, C as Currency, L as LegalFormField, m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./Currency-CEtDxV-F.js";
41
- import { i as isEmpty$1 } from "./isEmpty-BNacTlfR.js";
42
- import { f as formatObject } from "./utils-DNSfZiio.js";
43
- import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
44
- import { L as LEGAL_COMPANY_NAME_FIELD, d as defaultFieldMetadataV4, a as defaultFieldMetadata$2, b as defaultFieldConfigV4, c as defaultFieldConfig$2 } from "./fieldConfig-CMdKt41r.js";
45
- import { i as useBusinessLines } from "./OnboardingDropinComponent-DstStqYS.js";
46
- import { F as Field } from "./Field-Cp_UOAnA.js";
47
- import { H as Header } from "./Header-CIxJSQWR.js";
48
- import { R as RadioGroup } from "./RadioGroup-COsozc9g.js";
49
- import { u as useGlobalDataSlice } from "./useGlobalData-Dy2O7YGk.js";
50
- import { u as useForm } from "./useForm-9nSw9LZY.js";
51
- import { c as createFormUtils, m as mergeFieldMetadataIntoProps } from "./formUtils-q44BTi2U.js";
52
- import { c as currencyByCountry } from "./types-BY62XJTq.js";
53
- import { I as InputDate, f as formatDateObj } from "./InputDate-z9OpUslu.js";
54
- import { Suspense, lazy } from "preact/compat";
55
- import { C as Checkbox } from "./Checkbox-BU4IYlt6.js";
56
- import { E as ErrorPanel } from "./ErrorPanel-ByEaxCQu.js";
57
- import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-CZ5mQeGD.js";
58
- import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-BfI4FGAA.js";
59
- import { i as isCompatibleJapanVersion } from "./japanSupportUtils-C7aPdWXD.js";
60
- import { u as useDebouncedCallback } from "./debouncedInputEvent-Cv2S512Y.js";
61
- import { signal } from "@preact/signals";
62
- import cx from "classnames";
63
- import { L as Link } from "./Link-CIBefZJS.js";
64
- import { S as StructuredList } from "./StructuredList-9dnJRdx_.js";
65
- import { I as InputText } from "./InputText-CBhD5jca.js";
66
- import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-DShqP-Yi.js";
67
- import { L as LoaderWrapper } from "./LoaderWrapper-CwhIpGKR.js";
68
- import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
69
- import { C as Card } from "./Card-OQuFzmxm.js";
70
- import { L as ListItem } from "./ListItem-CnzgA-sH.js";
71
- import { a as Alert } from "./Alert-D9HbhU88.js";
72
- import { T as TileGroup } from "./TileGroup-BhKhvfLz.js";
73
- const FINANCIAL_REPORTING_DATE_FIELD = [
74
- "financialReportingDate"
75
- ];
76
- function FinancialReportingDate({
77
- data,
78
- valid,
79
- errors,
80
- labels,
81
- readonly,
82
- handleChangeFor
83
- }) {
84
- const { t } = useTranslation("common");
85
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
86
- Field,
87
- {
88
- name: "financialReportingDate",
89
- label: labels.financialReportingDate,
90
- helper: t(($) => $["dateOfTotalAssetsCalculation"]),
91
- helperPosition: "below",
92
- errorMessage: errors.financialReportingDate,
93
- isValid: valid.financialReportingDate,
94
- children: (childProps) => /* @__PURE__ */ jsx(
95
- InputDate,
96
- {
97
- ...childProps,
98
- name: "financialReportingDate",
99
- value: data.financialReportingDate,
100
- onInput: handleChangeFor("financialReportingDate", "input"),
101
- onBlur: handleChangeFor("financialReportingDate", "blur"),
102
- "aria-required": true,
103
- "aria-invalid": !valid.financialReportingDate,
104
- readonly,
105
- max: formatDateObj(/* @__PURE__ */ new Date())
106
- }
107
- )
108
- }
109
- ) });
110
- }
111
- const NUMBER_OF_EMPLOYEES_FIELD = [
112
- "numberOfEmployees"
113
- ];
114
- function NumberOfEmployees({
115
- data,
116
- valid,
117
- errors,
118
- labels,
119
- readonly,
120
- handleChangeFor,
121
- helperText
122
- }) {
123
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
124
- Field,
125
- {
126
- name: "numberOfEmployees",
127
- label: labels.numberOfEmployees,
128
- helper: helperText?.numberOfEmployees,
129
- errorMessage: errors.numberOfEmployees,
130
- isValid: valid.numberOfEmployees,
131
- children: (childProps) => /* @__PURE__ */ jsx(
132
- InputNumber,
133
- {
134
- ...childProps,
135
- "aria-required": true,
136
- "aria-invalid": !valid.numberOfEmployees,
137
- name: "numberOfEmployees",
138
- min: "1",
139
- step: "1",
140
- value: data.numberOfEmployees,
141
- readonly,
142
- onInput: handleChangeFor("numberOfEmployees", "input"),
143
- onBlur: handleChangeFor("numberOfEmployees", "blur")
144
- }
145
- )
146
- }
147
- ) });
148
- }
149
- const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
150
- const styles$5 = {
151
- financialInformationReportedValueOptions
152
- };
153
- const reportedValue = "adyen-kyc-reported-value";
154
- const reportedValueInput = "adyen-kyc-reported-value-input";
155
- const styles$4 = {
156
- reportedValue,
157
- reportedValueInput
158
- };
159
- const ReportedValue = ({
160
- currency,
161
- amount,
162
- onAmountChanged,
163
- label,
164
- helper,
165
- fieldName,
166
- errorMessage,
167
- isValid
168
- }) => {
169
- const { i18n } = useI18nContext();
170
- return /* @__PURE__ */ jsx("div", { className: styles$4.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
171
- InputCurrency,
172
- {
173
- ...childProps,
174
- locale: i18n.locale,
175
- currency,
176
- amount,
177
- onAmountChanged,
178
- className: styles$4.reportedValueInput,
179
- "aria-label": label
180
- }
181
- ) }) });
182
- };
183
- const financialInfoValidationRules = {
184
- financialReportingDate: [
185
- {
186
- modes: ["blur"],
187
- validate: (date) => !isEmpty(date),
188
- errorMessage: "fieldIsRequired"
189
- },
190
- {
191
- modes: ["blur"],
192
- validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
193
- errorMessage: "invalidFinancialReportingDate"
194
- }
195
- ],
196
- currency: [
197
- {
198
- modes: ["blur"],
199
- validate: (currency) => !isEmpty(currency),
200
- errorMessage: "fieldIsRequired"
201
- }
202
- ],
203
- reportedValueOption: {
204
- modes: ["blur"],
205
- validate: (option) => !isEmpty(option),
206
- errorMessage: "fieldIsRequired"
207
- },
208
- balanceSheetTotal: {
209
- modes: ["blur"],
210
- validate: (amount) => !isUndefinedOrNull(amount),
211
- errorMessage: "fieldIsRequired"
212
- },
213
- annualTurnover: {
214
- modes: ["blur"],
215
- validate: (amount) => !isUndefinedOrNull(amount),
216
- errorMessage: "fieldIsRequired"
217
- }
218
- };
219
- const financialInfoValidationEmployeesOnlyRules = {
220
- numberOfEmployees: [
221
- {
222
- modes: ["blur"],
223
- validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
224
- errorMessage: "fieldIsRequired"
225
- },
226
- {
227
- modes: ["blur"],
228
- validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
229
- errorMessage: "pleaseEnterAValidWholeNumber"
230
- }
231
- ]
232
- };
233
- const financialInfoValidationWithEmployeesRules = {
234
- ...financialInfoValidationRules,
235
- ...financialInfoValidationEmployeesOnlyRules
236
- };
237
- const financialInformationFieldsForEu = [
238
- ...FINANCIAL_REPORTING_DATE_FIELD,
239
- ...CURRENCY_FIELD,
240
- "reportedValueOption"
241
- ];
242
- const financialInformationFields = [
243
- ...NUMBER_OF_EMPLOYEES_FIELD,
244
- ...FINANCIAL_REPORTING_DATE_FIELD,
245
- ...CURRENCY_FIELD,
246
- "reportedValueOption"
247
- ];
248
- function FinancialInformation(props) {
249
- const { t } = useTranslation("common");
250
- const { id, country, data: financialInformationData, multiForm, fieldValidationErrors } = props;
251
- const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
252
- const formUtils = createFormUtils(props, t);
253
- const showReportingFields = formUtils.isRequiredField("financialReportingDate");
254
- const getSchema = (data2) => [
255
- ...financialInformationFields,
256
- ...data2.reportedValueOption ? [data2.reportedValueOption] : []
257
- ];
258
- const getValidator = () => {
259
- if (!showReportingFields) {
260
- return financialInfoValidationEmployeesOnlyRules;
261
- }
262
- if (country === CountryCodes.UnitedKingdom) {
263
- return financialInfoValidationWithEmployeesRules;
264
- }
265
- return financialInfoValidationRules;
266
- };
267
- const { handleChangeFor, data, valid, errors, fieldProblems, schema } = useForm({
268
- ...props,
269
- schema: getSchema,
270
- defaultData: financialInformationData,
271
- rules: getValidator(),
272
- fieldProblems: fieldValidationErrors
273
- });
274
- const { updateStateSlice } = useGlobalDataSlice(id);
275
- useEffect(() => {
276
- updateStateSlice({
277
- data,
278
- valid,
279
- errors,
280
- fieldProblems,
281
- schema
282
- });
283
- }, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
284
- const handleChange = useCallback(
285
- (fieldName, mode) => multiForm ? multiForm.handleChangeFor(fieldName, "companyFinancialInformation", mode) : handleChangeFor(fieldName, mode),
286
- [handleChangeFor, multiForm]
287
- );
288
- const formData = multiForm ? multiForm.data?.companyFinancialInformation ?? {} : data;
289
- const formErrors = multiForm ? multiForm.errors?.companyFinancialInformation ?? {} : errors;
290
- const formValid = multiForm ? multiForm.valid?.companyFinancialInformation ?? {} : valid;
291
- const formFieldProblems = multiForm ? multiForm.fieldProblems.companyFinancialInformation ?? {} : fieldProblems;
292
- const updateReportedValueOption = (option) => {
293
- if (formData.reportedValueOption) {
294
- handleChange(formData.reportedValueOption)(null);
295
- }
296
- const newReportedValue = option;
297
- handleChange("reportedValueOption")(newReportedValue);
298
- };
299
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-company-financial-information", children: [
300
- /* @__PURE__ */ jsx(Header, { title: t(($) => $["companyFinancialInformationFormHeading"], { ns: "business" }) }),
301
- country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
302
- NumberOfEmployees,
303
- {
304
- data: formUtils.getFieldData(formData, NUMBER_OF_EMPLOYEES_FIELD),
305
- errors: formUtils.getFieldErrors(
306
- formErrors,
307
- formFieldProblems,
308
- NUMBER_OF_EMPLOYEES_FIELD
309
- ),
310
- handleChangeFor: handleChange,
311
- labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
312
- readonly: formUtils.isReadOnly("numberOfEmployees"),
313
- valid: formUtils.getFieldValid(formValid, NUMBER_OF_EMPLOYEES_FIELD)
314
- }
315
- ),
316
- showReportingFields && /* @__PURE__ */ jsxs(Fragment, { children: [
317
- /* @__PURE__ */ jsx(
318
- FinancialReportingDate,
319
- {
320
- data: formUtils.getFieldData(formData, FINANCIAL_REPORTING_DATE_FIELD),
321
- errors: formUtils.getFieldErrors(
322
- formErrors,
323
- formFieldProblems,
324
- FINANCIAL_REPORTING_DATE_FIELD
325
- ),
326
- handleChangeFor: handleChange,
327
- labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
328
- readonly: formUtils.isReadOnly("financialReportingDate"),
329
- valid: formUtils.getFieldValid(formValid, FINANCIAL_REPORTING_DATE_FIELD)
330
- }
331
- ),
332
- /* @__PURE__ */ jsx(
333
- Currency,
334
- {
335
- country,
336
- labels: { currency: t(($) => $["reportingCurrency"]) },
337
- data: formUtils.getFieldData(formData, CURRENCY_FIELD),
338
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, CURRENCY_FIELD),
339
- handleChangeFor: handleChange,
340
- readonly: formUtils.isReadOnly("currency"),
341
- valid: formUtils.getFieldValid(formValid, CURRENCY_FIELD)
342
- }
343
- ),
344
- /* @__PURE__ */ jsx(
345
- Field,
346
- {
347
- el: "fieldset",
348
- name: "reportedValueOption",
349
- label: t(($) => $["reportedValue"]),
350
- errorMessage: formUtils.getErrorMessage(
351
- "reportedValueOption",
352
- formErrors,
353
- formFieldProblems
354
- ),
355
- helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
356
- isValid: formValid.reportedValueOption,
357
- children: (childProps) => /* @__PURE__ */ jsx(
358
- RadioGroup,
359
- {
360
- name: "reportedValueOption",
361
- ...childProps,
362
- value: formData.reportedValueOption,
363
- items: [
364
- {
365
- id: "balanceSheetTotal",
366
- name: "balanceSheetTotal",
367
- content: /* @__PURE__ */ jsx(
368
- ReportedValue,
369
- {
370
- label: t(($) => $["balanceSheetTotal"]),
371
- currency: formData.currency ?? defaultCurrency,
372
- amount: formData.balanceSheetTotal,
373
- onAmountChanged: handleChange("balanceSheetTotal"),
374
- fieldName: "balanceSheetTotal",
375
- isValid: formValid.balanceSheetTotal,
376
- errorMessage: formUtils.getErrorMessage(
377
- "balanceSheetTotal",
378
- formErrors,
379
- formFieldProblems
380
- )
381
- }
382
- )
383
- },
384
- {
385
- id: "annualTurnover",
386
- name: "annualTurnover",
387
- content: /* @__PURE__ */ jsx(
388
- ReportedValue,
389
- {
390
- label: t(($) => $["annualTurnover"]),
391
- currency: formData.currency ?? defaultCurrency,
392
- amount: formData.annualTurnover,
393
- onAmountChanged: handleChange("annualTurnover"),
394
- fieldName: "annualTurnover",
395
- isValid: formValid.annualTurnover,
396
- errorMessage: formUtils.getErrorMessage(
397
- "annualTurnover",
398
- formErrors,
399
- formFieldProblems
400
- )
401
- }
402
- )
403
- }
404
- ],
405
- onChange: updateReportedValueOption,
406
- showContentOnlyOnSelected: true,
407
- className: styles$5.financialInformationReportedValueOptions
408
- }
409
- )
410
- }
411
- )
412
- ] })
413
- ] });
414
- }
12
+ import { useState, useMemo, useEffect, useCallback } from "preact/hooks";
13
+ import { D as Divider, I as INDUSTRY_CODE_FIELD, i as industryCodeFieldMetadata, u as useIndustryCodes, a as IndustryCodeField, b as useCreateBusinessLine, c as useUpdateBusinessLine } from "./useUpdateBusinessLines-DfjB9Ur6.js";
14
+ import { u as useTranslation, bu as isISIN, V as Button, v as useExperimentsContext, c as useLegalEntity, R as ROOT_LE, az as useVersionConfiguration, z as Typography, L as Loader, a0 as CountryCodes, B as useSettingsContext, b as useApiContext, $ as httpPost, ad as entriesOf, p as useAnalyticsContext, a3 as createLogger, m as useAccountHolder, ab as useI18nContext, ai as isEmpty, i as isUndefinedOrNull, j as TaskTypes, o as LegalEntityTypes, bv as businessDetailsComponentsKeyMapping, bw as solePropBusinessDetailsKeyMapping, a6 as objectsDeepEqual, aD as keysOf, bx as solePropBusinessDetailsApiKeyMapping, b4 as businessDetailsApiKeyMapping, aJ as filterOutUnwantedAssociationsIfRootLE, aH as drop, aa as getOwnEntityAssociations, aO as doArraysMatch, by as solePropBusinessDetailsDocumentMapping, bz as businessDetailsDocumentMapping } from "./StoreProvider-BL3nK1iO.js";
15
+ import { u as useCreateLegalEntity } from "./useCreateLegalEntity-DjRvxwI5.js";
16
+ import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-C8rOYkS1.js";
17
+ import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-BilJQsMw.js";
18
+ import { u as useToastContext } from "./useToastContext-DBDF60Ps.js";
19
+ import { C as CompanyTypesValues } from "./company-types-value-D_mKv5PT.js";
20
+ import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-CQoldE8s.js";
21
+ import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-DGUJjA6y.js";
22
+ import { u as useMultiForm } from "./useMultiForm-djEDTyaG.js";
23
+ import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-DtG8dtIh.js";
24
+ import { C as Confirm } from "./Confirm-BCbTBwh3.js";
25
+ import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-jqVPVUI3.js";
26
+ import { d as TAX_INFORMATION_FIELD, r as requestingBanking, e as requestingIssuing, t as taxInformationDefaultFieldMetadata, a as taxInformationDefaultFieldConfig, T as TaxInformationField, C as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, S as StateCodesUS, f as isUsingCompanySearch, M as MemoizedDocumentUpload, h as isRegistrationNumberAbsentStateV4Scenario, j as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, k as getCompanyRegistrationNumberOptions, l as countryToTaxInfoTypeMap, m as rules, g as getFieldsWithExistingData } from "./TaxInformationField-BfDJhJG4.js";
27
+ import { u as usePageLandedEvent, s as summaryStep } from "./Summary-8HdspbcQ.js";
28
+ import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD, r as registrationAddressFields, o as operationalAddressIsSameIds, v as vatAbsenceReasonMetadata, d as defaultFieldMetadata$1, a as defaultFieldConfig$1, b as registrationNumberDefaultFieldMetadata, c as registrationNumberDefaultFieldConfig, e as doingBusinessAsFieldMetadata, f as doingBusinessAsAbsentFieldMetadata, g as DBANameField, h as BusinessRegistrationNumberField, i as getRegistrationNumberHelperText, j as VatNumberField, M as MemoizedConstitutionalDocument, k as getDefaultRegistrationNumberType, l as getDefaultVatNumberType, m as inferCompanyRegistrationNumberType, n as exemptFromRegistrationNumberDefaultFieldMetadata } from "./ConstitutionalDocument-DAXsUY5o.js";
29
+ import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-CJUtsR2N.js";
30
+ import { S as SettingNames } from "./TaskVerificationStatus-ycoS73dK.js";
31
+ import { t as toFullWidth, u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-CpVZUxo1.js";
32
+ import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-_6SITBJE.js";
33
+ import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-DIBG3Hc5.js";
34
+ import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-CsCEpxs1.js";
35
+ import { a as datasetUtilities } from "./datasetUtil-BHQp0-xL.js";
36
+ import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
37
+ import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
38
+ import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-D1RKmLBo.js";
39
+ import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, c as StateField, i as isDateOlderThanAYear } from "./Address-uWZO7A9W.js";
40
+ import { i as isEmpty$1 } from "./isEmpty-C7bLX-qG.js";
41
+ import { f as formatObject } from "./utils-DNSfZiio.js";
42
+ import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
43
+ import { L as LegalFormField, I as InputNumber, c as InputCurrency, b as CURRENCY_FIELD, C as Currency, m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./Currency-CYaHlY2Z.js";
44
+ import { g as getLegalCompanyNameHelperText, L as LEGAL_COMPANY_NAME_FIELD, d as defaultFieldMetadataV4, a as defaultFieldMetadata$2, b as defaultFieldConfigV4, c as defaultFieldConfig$2 } from "./LegalCompanyNameField-iFBtpehs.js";
45
+ import { u as useBusinessLines } from "./useBusinessLines-BD1Yg8Ja.js";
46
+ import { Suspense, lazy } from "preact/compat";
47
+ import { C as Checkbox } from "./Checkbox-4TE31vJm.js";
48
+ import { F as Field } from "./Field-CApB-T06.js";
49
+ import { H as Header } from "./Header-DCVQMDDt.js";
50
+ import { E as ErrorPanel } from "./ErrorPanel-CAHQTbMv.js";
51
+ import { I as InputDate, f as formatDateObj } from "./InputDate-CiL0lNHS.js";
52
+ import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-DcjAPGFV.js";
53
+ import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-BbFU7XNV.js";
54
+ import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-CJQolfmf.js";
55
+ import { i as isCompatibleJapanVersion } from "./japanSupportUtils-BucfNSWB.js";
56
+ import { u as useDebouncedCallback } from "./debouncedInputEvent-Cv2S512Y.js";
57
+ import { signal } from "@preact/signals";
58
+ import cx from "classnames";
59
+ import { L as Link } from "./Link-BJyutNM5.js";
60
+ import { S as StructuredList } from "./StructuredList-BNLhk_zV.js";
61
+ import { I as InputText } from "./InputText-BV_-tgjA.js";
62
+ import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-0SyPMIyv.js";
63
+ import { L as LoaderWrapper } from "./LoaderWrapper-C4vG5XIf.js";
64
+ import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
65
+ import { C as Card } from "./Card-OQuFzmxm.js";
66
+ import { L as ListItem } from "./ListItem-Bgm6YMzN.js";
67
+ import { a as Alert } from "./Alert-BpQzk7oa.js";
68
+ import { T as TileGroup } from "./TileGroup-DmZTiaip.js";
69
+ import { R as RadioGroup } from "./RadioGroup-DzUpgP12.js";
70
+ import { u as useGlobalDataSlice } from "./useGlobalData-DkE5IpZB.js";
71
+ import { u as useForm } from "./useForm-Bh638xmS.js";
72
+ import { c as currencyByCountry } from "./types-DRTd35hZ.js";
415
73
  const DATE_OF_INCORPORATION_FIELD = [
416
74
  "dateOfIncorporation"
417
75
  ];
@@ -600,7 +258,6 @@ const stockISINFieldMetadata = {
600
258
  mask: makeMask(...alphaInputs(2), ...alphanumericInputs(9), ...numericInputs(1)),
601
259
  transformOnType: uppercase
602
260
  },
603
- helperText: "stockISINHelper",
604
261
  guidanceText: {
605
262
  key: "validationPleaseEnterAValidStockISIN",
606
263
  values: {
@@ -710,7 +367,7 @@ const verifiedBusiness = signal(void 0);
710
367
  const isVerifiedSingleCompanySearchResult = signal(false);
711
368
  const additionalInformationContent = "adyen-kyc-additional-information-content";
712
369
  const additionalInformationSectionHeading = "adyen-kyc-additional-information-section-heading";
713
- const styles$3 = {
370
+ const styles$5 = {
714
371
  additionalInformationContent,
715
372
  additionalInformationSectionHeading
716
373
  };
@@ -719,7 +376,7 @@ const verifiedBusinessCardContent = "adyen-kyc-verified-business-card-content";
719
376
  const verifiedBusinessCardContentCollapsed = "adyen-kyc-verified-business-card-content-collapsed";
720
377
  const verifiedBusinessCardContentExpanded = "adyen-kyc-verified-business-card-content-expanded";
721
378
  const verifiedBusinessCardExpandButton = "adyen-kyc-verified-business-card-expand-button";
722
- const styles$2 = {
379
+ const styles$4 = {
723
380
  verifiedBusinessCard,
724
381
  verifiedBusinessCardContent,
725
382
  verifiedBusinessCardContentCollapsed,
@@ -732,7 +389,7 @@ function VerifiedBusinessCard({
732
389
  }) {
733
390
  const { t } = useTranslation(["common"]);
734
391
  const [expanded, setExpanded] = useState(false);
735
- const address = verifiedAddress?.address && verifiedAddress?.city && verifiedAddress?.stateOrProvince && verifiedAddress?.postalCode ? `${verifiedAddress?.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedBusiness2?.address;
392
+ const address = verifiedAddress?.address && verifiedAddress.city && verifiedAddress.stateOrProvince && verifiedAddress.postalCode ? `${verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedBusiness2?.address;
736
393
  const addressLink = `https://www.google.com/maps/place/${address?.replaceAll(" ", "+")}`;
737
394
  const baseItems = useMemo(
738
395
  () => [
@@ -764,12 +421,12 @@ function VerifiedBusinessCard({
764
421
  ].filter((item) => !!item.details),
765
422
  [address, addressLink, t, verifiedBusiness2?.legalForm]
766
423
  );
767
- const expandedContentClasses = cx(styles$2.verifiedBusinessCardContent, {
768
- [styles$2.verifiedBusinessCardContentCollapsed]: !expanded,
769
- [styles$2.verifiedBusinessCardContentExpanded]: expanded
424
+ const expandedContentClasses = cx(styles$4.verifiedBusinessCardContent, {
425
+ [styles$4.verifiedBusinessCardContentCollapsed]: !expanded,
426
+ [styles$4.verifiedBusinessCardContentExpanded]: expanded
770
427
  });
771
- return /* @__PURE__ */ jsxs("section", { className: styles$2.verifiedBusinessCard, children: [
772
- /* @__PURE__ */ jsxs("div", { className: styles$2.verifiedBusinessCardContent, children: [
428
+ return /* @__PURE__ */ jsxs("section", { className: styles$4.verifiedBusinessCard, children: [
429
+ /* @__PURE__ */ jsxs("div", { className: styles$4.verifiedBusinessCardContent, children: [
773
430
  /* @__PURE__ */ jsx(StructuredList, { items: baseItems }),
774
431
  /* @__PURE__ */ jsx(Divider, {})
775
432
  ] }),
@@ -777,11 +434,11 @@ function VerifiedBusinessCard({
777
434
  /* @__PURE__ */ jsx(StructuredList, { items: expandedItems }),
778
435
  /* @__PURE__ */ jsx(Divider, {})
779
436
  ] }),
780
- /* @__PURE__ */ jsx("div", { className: styles$2.verifiedBusinessCardExpandButton, children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? t(($) => $["hideDetails"], { ns: "common" }) : t(($) => $["showDetails"], { ns: "common" }) }) })
437
+ /* @__PURE__ */ jsx("div", { className: styles$4.verifiedBusinessCardExpandButton, children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? t(($) => $["hideDetails"], { ns: "common" }) : t(($) => $["showDetails"], { ns: "common" }) }) })
781
438
  ] });
782
439
  }
783
440
  const LazyJpAddress = lazy(
784
- async () => (await import("./JpAddress-owiNWOqn.js")).JpAddress
441
+ async () => (await import("./JpAddress-UoTJ6rCV.js")).JpAddress
785
442
  );
786
443
  const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
787
444
  const ADDITIONAL_INFORMATION_FIELDS = [
@@ -808,6 +465,7 @@ function AdditionalInformation({
808
465
  verificationErrors = {}
809
466
  }) {
810
467
  const { t, i18n } = useTranslation(["common", "business"]);
468
+ const { t: businessT } = useTranslation("business");
811
469
  const { form } = useFormContext();
812
470
  const { isExperimentEnabled } = useExperimentsContext();
813
471
  const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
@@ -818,7 +476,7 @@ function AdditionalInformation({
818
476
  const addressSchema = getAddressSchemaForCountry(country).filter(
819
477
  (field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
820
478
  );
821
- const currentCountryTaxInformation = form.data?.additionalInformation?.taxInformation?.find(
479
+ const currentCountryTaxInformation = form.data.additionalInformation?.taxInformation?.find(
822
480
  (taxId) => taxId.country === country
823
481
  );
824
482
  const businessLineTypes = [];
@@ -828,6 +486,7 @@ function AdditionalInformation({
828
486
  if (requestingIssuing(rootLegalEntity)) {
829
487
  businessLineTypes.push("issuing");
830
488
  }
489
+ usePageLandedEvent();
831
490
  const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
832
491
  const { data: cleansedRegistrationAddress } = useAddressCleanse(
833
492
  {
@@ -839,20 +498,20 @@ function AdditionalInformation({
839
498
  const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
840
499
  useEffect(
841
500
  () => setAddressToCheck(
842
- formatAddressForCleanse(form.data?.additionalInformation?.registrationAddress ?? {})
501
+ formatAddressForCleanse(form.data.additionalInformation?.registrationAddress ?? {})
843
502
  ),
844
- [form.data?.additionalInformation?.registrationAddress, setAddressToCheck]
503
+ [form.data.additionalInformation?.registrationAddress, setAddressToCheck]
845
504
  );
846
505
  const verifiedAddress = useMemo(() => {
847
506
  if (!verifiedBusiness$1) return void 0;
848
- return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data?.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
507
+ return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
849
508
  registrationAddress: {
850
509
  ...mapAddressData(verifiedBusiness$1),
851
510
  country,
852
- stateOrProvince: form.data?.basicInformation?.stateOrProvince
511
+ stateOrProvince: form.data.basicInformation?.stateOrProvince
853
512
  }
854
513
  };
855
- }, [verifiedBusiness$1, form.data?.basicInformation?.stateOrProvince, country]);
514
+ }, [verifiedBusiness$1, form.data.basicInformation?.stateOrProvince, country]);
856
515
  const [registrationAddressValid, setRegistrationAddressValid] = useState(false);
857
516
  const [operationalAddressValid, setOperationalAddressValid] = useState(false);
858
517
  if (form.valid.additionalInformation?.registrationAddress !== registrationAddressValid) {
@@ -890,21 +549,21 @@ function AdditionalInformation({
890
549
  },
891
550
  [form, handleChangeFor]
892
551
  );
893
- if (form.data?.additionalInformation?.operationalAddressIsSame === null) {
552
+ if (form.data.additionalInformation?.operationalAddressIsSame === null) {
894
553
  handleOperationalAddressIsSameChange(true);
895
554
  }
896
555
  useEffect(() => {
897
- if (mustProvideOperationalAddress && form.data?.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
556
+ if (mustProvideOperationalAddress && form.data.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
898
557
  handleOperationalAddressIsSameChange(false);
899
558
  }
900
559
  }, [
901
560
  handleOperationalAddressIsSameChange,
902
561
  mustProvideOperationalAddress,
903
- form.data?.additionalInformation?.operationalAddressIsSame
562
+ form.data.additionalInformation?.operationalAddressIsSame
904
563
  ]);
905
564
  const formUtils = useMemo(() => {
906
565
  const initialProps = {
907
- data: form.data?.additionalInformation ?? {},
566
+ data: form.data.additionalInformation ?? {},
908
567
  fieldValidationErrors: validationErrors,
909
568
  formVerificationErrors: verificationErrors,
910
569
  allFields: form.allFields?.additionalInformation ?? [],
@@ -912,8 +571,8 @@ function AdditionalInformation({
912
571
  optionalFields: form.optionalFields?.additionalInformation ?? [],
913
572
  trustedFields: form.trustedFields?.additionalInformation ?? [],
914
573
  obscuredFields: form.obscuredFields?.additionalInformation ?? [],
915
- errors: form.errors?.additionalInformation ?? {},
916
- valid: form.valid?.additionalInformation ?? {},
574
+ errors: form.errors.additionalInformation ?? {},
575
+ valid: form.valid.additionalInformation ?? {},
917
576
  handleFieldChange: handleChangeFor
918
577
  };
919
578
  const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
@@ -933,7 +592,7 @@ function AdditionalInformation({
933
592
  registrationNumberDefaultFieldConfig[country],
934
593
  {
935
594
  companyType,
936
- registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
595
+ registrationNumberType: form.data.additionalInformation?.registrationNumberType,
937
596
  isExperimentEnabled
938
597
  },
939
598
  registrationNumberDefaultFieldMetadata
@@ -958,7 +617,7 @@ function AdditionalInformation({
958
617
  field,
959
618
  resolveFieldMetadata(
960
619
  defaultFieldConfig$1[country],
961
- { vatNumberType: form.data?.additionalInformation?.vatNumberType },
620
+ { vatNumberType: form.data.additionalInformation?.vatNumberType },
962
621
  defaultFieldMetadata$1
963
622
  ),
964
623
  acc
@@ -1001,13 +660,13 @@ function AdditionalInformation({
1001
660
  country,
1002
661
  currentCountryTaxInformation?.type,
1003
662
  form.allFields?.additionalInformation,
1004
- form.data?.additionalInformation,
1005
- form.errors?.additionalInformation,
663
+ form.data.additionalInformation,
664
+ form.errors.additionalInformation,
1006
665
  form.obscuredFields?.additionalInformation,
1007
666
  form.optionalFields?.additionalInformation,
1008
667
  form.requiredFields?.additionalInformation,
1009
668
  form.trustedFields?.additionalInformation,
1010
- form.valid?.additionalInformation,
669
+ form.valid.additionalInformation,
1011
670
  handleChangeFor,
1012
671
  t,
1013
672
  isExperimentEnabled,
@@ -1020,16 +679,13 @@ function AdditionalInformation({
1020
679
  });
1021
680
  const datasetUtils = datasetUtilities(i18n.language);
1022
681
  const registrationAddressDescription = useMemo(() => {
1023
- if (country) {
1024
- return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
1025
- ns: "business",
1026
- country: datasetUtils.getCountryName(country)
1027
- }) : t(($) => $["youBusinessOfficalAddressInCounty"], {
1028
- ns: "business",
1029
- country: datasetUtils.getCountryName(country)
1030
- });
1031
- }
1032
- return t(($) => $["youBusinessOfficalAddress"], { ns: "business" });
682
+ return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
683
+ ns: "business",
684
+ country: datasetUtils.getCountryName(country)
685
+ }) : t(($) => $["youBusinessOfficalAddressInCounty"], {
686
+ ns: "business",
687
+ country: datasetUtils.getCountryName(country)
688
+ });
1033
689
  }, [country, datasetUtils, t]);
1034
690
  return /* @__PURE__ */ jsxs("form", { id, children: [
1035
691
  /* @__PURE__ */ jsx(Header, { title: t(($) => $["additionalInformationFormHeading"], { ns: "business" }) }),
@@ -1042,9 +698,9 @@ function AdditionalInformation({
1042
698
  formUtils
1043
699
  }
1044
700
  ),
1045
- /* @__PURE__ */ jsxs("div", { className: styles$3.additionalInformationContent, children: [
701
+ /* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationContent, children: [
1046
702
  showVerified && /* @__PURE__ */ jsxs("section", { children: [
1047
- /* @__PURE__ */ jsx("div", { className: styles$3.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
703
+ /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
1048
704
  /* @__PURE__ */ jsx(
1049
705
  VerifiedBusinessCard,
1050
706
  {
@@ -1054,7 +710,7 @@ function AdditionalInformation({
1054
710
  )
1055
711
  ] }),
1056
712
  /* @__PURE__ */ jsxs("section", { children: [
1057
- showVerified && /* @__PURE__ */ jsx("div", { className: styles$3.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
713
+ showVerified && /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
1058
714
  /* @__PURE__ */ jsxs("fieldset", { children: [
1059
715
  showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx(
1060
716
  LegalFormField,
@@ -1063,12 +719,12 @@ function AdditionalInformation({
1063
719
  countryCode: country,
1064
720
  data: {
1065
721
  legalForm: formUtils.getFieldData(
1066
- form.data?.additionalInformation ?? {},
722
+ form.data.additionalInformation ?? {},
1067
723
  LEGAL_FORM_FIELDS
1068
- )?.legalForm
724
+ ).legalForm
1069
725
  },
1070
726
  valid: formUtils.getFieldValid(
1071
- form.valid?.additionalInformation ?? {},
727
+ form.valid.additionalInformation ?? {},
1072
728
  LEGAL_FORM_FIELDS
1073
729
  ),
1074
730
  errorMessage: form.errors.additionalInformation?.legalForm?.errorMessage,
@@ -1080,16 +736,13 @@ function AdditionalInformation({
1080
736
  showField(DBA_NAME_FIELD) && /* @__PURE__ */ jsx(
1081
737
  DBANameField,
1082
738
  {
1083
- data: formUtils.getFieldData(
1084
- form.data?.additionalInformation ?? {},
1085
- DBA_NAME_FIELD
1086
- ),
739
+ data: formUtils.getFieldData(form.data.additionalInformation ?? {}, DBA_NAME_FIELD),
1087
740
  valid: formUtils.getFieldValid(
1088
- form.valid?.additionalInformation ?? {},
741
+ form.valid.additionalInformation ?? {},
1089
742
  DBA_NAME_FIELD
1090
743
  ),
1091
744
  errors: formUtils.getFieldErrors(
1092
- form.errors?.additionalInformation ?? {},
745
+ form.errors.additionalInformation ?? {},
1093
746
  validationErrors,
1094
747
  DBA_NAME_FIELD
1095
748
  ),
@@ -1104,15 +757,15 @@ function AdditionalInformation({
1104
757
  BusinessRegistrationNumberField,
1105
758
  {
1106
759
  data: formUtils.getFieldData(
1107
- form.data?.additionalInformation ?? {},
760
+ form.data.additionalInformation ?? {},
1108
761
  BUSINESS_REGISTRATION_NUMBER_FIELD
1109
762
  ),
1110
763
  valid: formUtils.getFieldValid(
1111
- form.valid?.additionalInformation ?? {},
764
+ form.valid.additionalInformation ?? {},
1112
765
  BUSINESS_REGISTRATION_NUMBER_FIELD
1113
766
  ),
1114
767
  errors: formUtils.getFieldErrors(
1115
- form.errors?.additionalInformation ?? {},
768
+ form.errors.additionalInformation ?? {},
1116
769
  validationErrors,
1117
770
  BUSINESS_REGISTRATION_NUMBER_FIELD
1118
771
  ),
@@ -1122,7 +775,7 @@ function AdditionalInformation({
1122
775
  mask: formUtils.getMask("registrationNumber"),
1123
776
  guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
1124
777
  placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
1125
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
778
+ helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
1126
779
  readonly: formUtils.isReadOnly("registrationNumber"),
1127
780
  optional: formUtils.isOptionalField("registrationNumber"),
1128
781
  shouldValidate,
@@ -1136,15 +789,15 @@ function AdditionalInformation({
1136
789
  TaxInformationField,
1137
790
  {
1138
791
  data: formUtils.getFieldData(
1139
- form.data?.additionalInformation ?? {},
792
+ form.data.additionalInformation ?? {},
1140
793
  TAX_INFORMATION_FIELD
1141
794
  ),
1142
795
  valid: formUtils.getFieldValid(
1143
- form.valid?.additionalInformation ?? {},
796
+ form.valid.additionalInformation ?? {},
1144
797
  TAX_INFORMATION_FIELD
1145
798
  ),
1146
799
  errors: formUtils.getFieldErrors(
1147
- form.errors?.additionalInformation ?? {},
800
+ form.errors.additionalInformation ?? {},
1148
801
  validationErrors,
1149
802
  TAX_INFORMATION_FIELD
1150
803
  ),
@@ -1160,22 +813,22 @@ function AdditionalInformation({
1160
813
  country,
1161
814
  entityType: companyType,
1162
815
  defaultData: form.defaultData?.additionalInformation?.taxInformation,
1163
- registrationNumber: form.data?.additionalInformation?.registrationNumber
816
+ registrationNumber: form.data.additionalInformation?.registrationNumber
1164
817
  }
1165
818
  ),
1166
819
  showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx(
1167
820
  VatNumberField,
1168
821
  {
1169
822
  data: formUtils.getFieldData(
1170
- form.data?.additionalInformation ?? {},
823
+ form.data.additionalInformation ?? {},
1171
824
  VAT_NUMBER_FIELD
1172
825
  ),
1173
826
  valid: formUtils.getFieldValid(
1174
- form.valid?.additionalInformation ?? {},
827
+ form.valid.additionalInformation ?? {},
1175
828
  VAT_NUMBER_FIELD
1176
829
  ),
1177
830
  errors: formUtils.getFieldErrors(
1178
- form.errors?.additionalInformation ?? {},
831
+ form.errors.additionalInformation ?? {},
1179
832
  validationErrors,
1180
833
  VAT_NUMBER_FIELD
1181
834
  ),
@@ -1196,15 +849,15 @@ function AdditionalInformation({
1196
849
  EInvoicingCodeField,
1197
850
  {
1198
851
  data: formUtils.getFieldData(
1199
- form.data?.additionalInformation ?? {},
852
+ form.data.additionalInformation ?? {},
1200
853
  EINVOICING_CODE_FIELD
1201
854
  ),
1202
855
  valid: formUtils.getFieldValid(
1203
- form.valid?.additionalInformation ?? {},
856
+ form.valid.additionalInformation ?? {},
1204
857
  EINVOICING_CODE_FIELD
1205
858
  ),
1206
859
  errors: formUtils.getFieldErrors(
1207
- form.errors?.additionalInformation ?? {},
860
+ form.errors.additionalInformation ?? {},
1208
861
  validationErrors,
1209
862
  EINVOICING_CODE_FIELD
1210
863
  ),
@@ -1220,15 +873,15 @@ function AdditionalInformation({
1220
873
  IndustryCodeField,
1221
874
  {
1222
875
  data: formUtils.getFieldData(
1223
- form.data?.additionalInformation ?? {},
876
+ form.data.additionalInformation ?? {},
1224
877
  INDUSTRY_CODE_FIELD
1225
878
  ),
1226
879
  valid: formUtils.getFieldValid(
1227
- form.valid?.additionalInformation ?? {},
880
+ form.valid.additionalInformation ?? {},
1228
881
  INDUSTRY_CODE_FIELD
1229
882
  ),
1230
883
  errors: formUtils.getFieldErrors(
1231
- form.errors?.additionalInformation ?? {},
884
+ form.errors.additionalInformation ?? {},
1232
885
  validationErrors,
1233
886
  INDUSTRY_CODE_FIELD
1234
887
  ),
@@ -1253,15 +906,15 @@ function AdditionalInformation({
1253
906
  DateOfIncorporationField,
1254
907
  {
1255
908
  data: formUtils.getFieldData(
1256
- form.data?.additionalInformation ?? {},
909
+ form.data.additionalInformation ?? {},
1257
910
  DATE_OF_INCORPORATION_FIELD
1258
911
  ),
1259
912
  valid: formUtils.getFieldValid(
1260
- form.valid?.additionalInformation ?? {},
913
+ form.valid.additionalInformation ?? {},
1261
914
  DATE_OF_INCORPORATION_FIELD
1262
915
  ),
1263
916
  errors: formUtils.getFieldErrors(
1264
- form.errors?.additionalInformation ?? {},
917
+ form.errors.additionalInformation ?? {},
1265
918
  validationErrors,
1266
919
  DATE_OF_INCORPORATION_FIELD
1267
920
  ),
@@ -1276,21 +929,21 @@ function AdditionalInformation({
1276
929
  ] })
1277
930
  ] }),
1278
931
  showStockData && /* @__PURE__ */ jsxs("section", { children: [
1279
- /* @__PURE__ */ jsx("div", { className: styles$3.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
932
+ /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
1280
933
  /* @__PURE__ */ jsxs("fieldset", { children: [
1281
934
  showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx(
1282
935
  StockExchangeMICField,
1283
936
  {
1284
937
  data: formUtils.getFieldData(
1285
- form.data?.additionalInformation ?? {},
938
+ form.data.additionalInformation ?? {},
1286
939
  STOCK_EXCHANGE_MIC_FIELD
1287
940
  ),
1288
941
  valid: formUtils.getFieldValid(
1289
- form.valid?.additionalInformation ?? {},
942
+ form.valid.additionalInformation ?? {},
1290
943
  STOCK_EXCHANGE_MIC_FIELD
1291
944
  ),
1292
945
  errors: formUtils.getFieldErrors(
1293
- form.errors?.additionalInformation ?? {},
946
+ form.errors.additionalInformation ?? {},
1294
947
  validationErrors,
1295
948
  STOCK_EXCHANGE_MIC_FIELD
1296
949
  ),
@@ -1307,15 +960,15 @@ function AdditionalInformation({
1307
960
  StockISINField,
1308
961
  {
1309
962
  data: formUtils.getFieldData(
1310
- form.data?.additionalInformation ?? {},
963
+ form.data.additionalInformation ?? {},
1311
964
  STOCK_ISIN_FIELD
1312
965
  ),
1313
966
  valid: formUtils.getFieldValid(
1314
- form.valid?.additionalInformation ?? {},
967
+ form.valid.additionalInformation ?? {},
1315
968
  STOCK_ISIN_FIELD
1316
969
  ),
1317
970
  errors: formUtils.getFieldErrors(
1318
- form.errors?.additionalInformation ?? {},
971
+ form.errors.additionalInformation ?? {},
1319
972
  validationErrors,
1320
973
  STOCK_ISIN_FIELD
1321
974
  ),
@@ -1332,15 +985,15 @@ function AdditionalInformation({
1332
985
  StockTickerSymbolField,
1333
986
  {
1334
987
  data: formUtils.getFieldData(
1335
- form.data?.additionalInformation ?? {},
988
+ form.data.additionalInformation ?? {},
1336
989
  STOCK_TICKER_SYMBOL_FIELD
1337
990
  ),
1338
991
  valid: formUtils.getFieldValid(
1339
- form.valid?.additionalInformation ?? {},
992
+ form.valid.additionalInformation ?? {},
1340
993
  STOCK_TICKER_SYMBOL_FIELD
1341
994
  ),
1342
995
  errors: formUtils.getFieldErrors(
1343
- form.errors?.additionalInformation ?? {},
996
+ form.errors.additionalInformation ?? {},
1344
997
  validationErrors,
1345
998
  STOCK_TICKER_SYMBOL_FIELD
1346
999
  ),
@@ -1356,7 +1009,7 @@ function AdditionalInformation({
1356
1009
  ] })
1357
1010
  ] }),
1358
1011
  /* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
1359
- /* @__PURE__ */ jsxs("div", { className: styles$3.additionalInformationSectionHeading, children: [
1012
+ /* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationSectionHeading, children: [
1360
1013
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
1361
1014
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
1362
1015
  ] }),
@@ -1383,7 +1036,7 @@ function AdditionalInformation({
1383
1036
  shouldValidate,
1384
1037
  hideCountry: true,
1385
1038
  optionalFields: ["otherAddressInformation"],
1386
- readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1?.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
1039
+ readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
1387
1040
  trustedFields: getNestedTrustedFields(
1388
1041
  "registrationAddress",
1389
1042
  form.data.additionalInformation,
@@ -1397,7 +1050,7 @@ function AdditionalInformation({
1397
1050
  )
1398
1051
  ] }),
1399
1052
  /* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
1400
- /* @__PURE__ */ jsxs("div", { className: styles$3.additionalInformationSectionHeading, children: [
1053
+ /* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationSectionHeading, children: [
1401
1054
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
1402
1055
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
1403
1056
  ] }),
@@ -1406,23 +1059,23 @@ function AdditionalInformation({
1406
1059
  {
1407
1060
  el: "fieldset",
1408
1061
  name: "operationalAddressIsSame",
1409
- errorMessage: form.errors?.additionalInformation?.operationalAddressIsSame?.errorMessage,
1410
- isValid: form.valid?.additionalInformation?.operationalAddressIsSame,
1062
+ errorMessage: form.errors.additionalInformation?.operationalAddressIsSame?.errorMessage,
1063
+ isValid: form.valid.additionalInformation?.operationalAddressIsSame,
1411
1064
  children: (childProps) => /* @__PURE__ */ jsx(
1412
1065
  Checkbox,
1413
1066
  {
1414
1067
  ...childProps,
1415
1068
  "aria-required": formUtils.isRequiredField("operationalAddressIsSame"),
1416
- "aria-invalid": !form.valid?.additionalInformation?.operationalAddressIsSame,
1069
+ "aria-invalid": !form.valid.additionalInformation?.operationalAddressIsSame,
1417
1070
  name: "operationalAddressIsSame",
1418
1071
  label: formUtils.getLabel("sameAsRegisteredAddress"),
1419
- checked: form.data?.additionalInformation?.operationalAddressIsSame ? form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
1072
+ checked: form.data.additionalInformation?.operationalAddressIsSame ? form.data.additionalInformation.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
1420
1073
  onChange: handleOperationalAddressIsSameChange
1421
1074
  }
1422
1075
  )
1423
1076
  }
1424
1077
  ),
1425
- form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (isCompatibleJapanVersion(country, versionData?.version) ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
1078
+ form.data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (isCompatibleJapanVersion(country, versionData?.version) ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
1426
1079
  LazyJpAddress,
1427
1080
  {
1428
1081
  id: ADDITIONAL_INFORMATION_FORM_ID,
@@ -1447,7 +1100,7 @@ function AdditionalInformation({
1447
1100
  optionalFields: ["otherAddressInformation"],
1448
1101
  trustedFields: getNestedTrustedFields(
1449
1102
  "operationalAddress",
1450
- form.data?.additionalInformation,
1103
+ form.data.additionalInformation,
1451
1104
  form.trustedFields?.additionalInformation
1452
1105
  ),
1453
1106
  onChange: handleOperationalAddressChange,
@@ -1468,15 +1121,13 @@ function useLegalCompanyNameField({
1468
1121
  fieldProblems,
1469
1122
  country,
1470
1123
  formUtils,
1471
- handleChange
1124
+ handleChange,
1125
+ t
1472
1126
  }) {
1473
1127
  const { data: versionData } = useVersionConfiguration();
1474
1128
  const fieldKeys = getFieldKeys(country, versionData?.version);
1475
1129
  const labels = formUtils.getFieldLabels(fieldKeys);
1476
1130
  const fieldErrors = formUtils.getFieldErrors(errors, fieldProblems, fieldKeys);
1477
- const helperTexts = formUtils.getFieldHelperText(fieldKeys, {
1478
- legalCompanyName: "legalCompanyName__helperText"
1479
- });
1480
1131
  const fieldsTransformInput = {
1481
1132
  jaHaniLegalCompanyName: (value) => toFullWidth(value),
1482
1133
  jaKanaLegalCompanyName: (value) => toFullWidth(value)
@@ -1488,6 +1139,7 @@ function useLegalCompanyNameField({
1488
1139
  return fieldKeys.map((fieldKey) => {
1489
1140
  const shouldShowField = formUtils.isRequiredField(fieldKey) || formUtils.isOptionalField(fieldKey);
1490
1141
  if (shouldShowField) {
1142
+ const helper = fieldKey === "legalCompanyName" ? getLegalCompanyNameHelperText(t, { country }) : void 0;
1491
1143
  return {
1492
1144
  name: fieldKey,
1493
1145
  value: data[fieldKey] ?? "",
@@ -1497,7 +1149,7 @@ function useLegalCompanyNameField({
1497
1149
  isValid: valid[fieldKey],
1498
1150
  errorMessage: fieldErrors[fieldKey],
1499
1151
  label: labels[fieldKey],
1500
- helper: helperTexts[fieldKey],
1152
+ helper,
1501
1153
  onKeyDown: handleKeyDown,
1502
1154
  transformInput: fieldsTransformInput[fieldKey],
1503
1155
  transformMode: fieldsTransformMode[fieldKey]
@@ -1531,7 +1183,6 @@ function CountryOfGoverningLawField({
1531
1183
  labels,
1532
1184
  readonly,
1533
1185
  handleChangeFor,
1534
- helperText,
1535
1186
  allowedCountries,
1536
1187
  country
1537
1188
  }) {
@@ -1559,8 +1210,7 @@ function CountryOfGoverningLawField({
1559
1210
  labels: { country: labels?.countryOfGoverningLaw || t(($) => $["countryOfGoverningLaw"]) },
1560
1211
  readonly,
1561
1212
  allowedCountries,
1562
- handleChangeFor: () => handleChangeFor("countryOfGoverningLaw"),
1563
- helperText: { country: helperText?.countryOfGoverningLaw }
1213
+ handleChangeFor: () => handleChangeFor("countryOfGoverningLaw")
1564
1214
  }
1565
1215
  );
1566
1216
  }
@@ -1620,7 +1270,7 @@ const defaultFieldConfig = {
1620
1270
  })
1621
1271
  };
1622
1272
  const basicInformation = "adyen-kyc-basic-information";
1623
- const styles$1 = {
1273
+ const styles$3 = {
1624
1274
  basicInformation
1625
1275
  };
1626
1276
  const BASIC_INFORMATION_FIELDS = [
@@ -1654,22 +1304,24 @@ function BasicInformation({
1654
1304
  companyType
1655
1305
  }) {
1656
1306
  const { t } = useTranslation(["common", "business"]);
1307
+ const { t: businessT } = useTranslation("business");
1657
1308
  const { isSettingEnabled } = useSettingsContext();
1658
1309
  const { isExperimentEnabled } = useExperimentsContext();
1659
1310
  const { form } = useFormContext();
1660
1311
  const allowedCountries = useAllowedCountries();
1661
1312
  const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
1662
- const state = form.data?.basicInformation?.stateOrProvince;
1663
- const currentCountryTaxInformation = form.data?.basicInformation?.taxInformation?.find(
1313
+ const state = form.data.basicInformation?.stateOrProvince;
1314
+ const currentCountryTaxInformation = form.data.basicInformation?.taxInformation?.find(
1664
1315
  (tax) => tax.country === country
1665
1316
  );
1317
+ usePageLandedEvent();
1666
1318
  const handleChangeFor = useCallback(
1667
1319
  (fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
1668
1320
  [form]
1669
1321
  );
1670
1322
  const formUtils = useMemo(() => {
1671
1323
  const initialProps = {
1672
- data: form.data?.basicInformation ?? {},
1324
+ data: form.data.basicInformation ?? {},
1673
1325
  fieldValidationErrors: validationErrors,
1674
1326
  formVerificationErrors: verificationErrors,
1675
1327
  allFields: form.allFields?.basicInformation ?? [],
@@ -1677,8 +1329,8 @@ function BasicInformation({
1677
1329
  optionalFields: form.optionalFields?.basicInformation ?? [],
1678
1330
  trustedFields: form.trustedFields?.basicInformation ?? [],
1679
1331
  obscuredFields: form.obscuredFields?.basicInformation ?? [],
1680
- errors: form.errors?.basicInformation ?? {},
1681
- valid: form.valid?.basicInformation ?? {},
1332
+ errors: form.errors.basicInformation ?? {},
1333
+ valid: form.valid.basicInformation ?? {},
1682
1334
  handleFieldChange: handleChangeFor
1683
1335
  };
1684
1336
  const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
@@ -1690,7 +1342,7 @@ function BasicInformation({
1690
1342
  field,
1691
1343
  resolveFieldMetadata(
1692
1344
  isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
1693
- { isBusiness: true },
1345
+ {},
1694
1346
  isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
1695
1347
  ),
1696
1348
  acc
@@ -1727,7 +1379,7 @@ function BasicInformation({
1727
1379
  registrationNumberDefaultFieldConfig[country],
1728
1380
  {
1729
1381
  companyType,
1730
- registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
1382
+ registrationNumberType: form.data.additionalInformation?.registrationNumberType,
1731
1383
  state,
1732
1384
  isExperimentEnabled
1733
1385
  },
@@ -1765,14 +1417,14 @@ function BasicInformation({
1765
1417
  country,
1766
1418
  currentCountryTaxInformation?.type,
1767
1419
  form.allFields?.basicInformation,
1768
- form.data?.additionalInformation?.registrationNumberType,
1769
- form.data?.basicInformation,
1770
- form.errors?.basicInformation,
1420
+ form.data.additionalInformation?.registrationNumberType,
1421
+ form.data.basicInformation,
1422
+ form.errors.basicInformation,
1771
1423
  form.obscuredFields?.basicInformation,
1772
1424
  form.optionalFields?.basicInformation,
1773
1425
  form.requiredFields?.basicInformation,
1774
1426
  form.trustedFields?.basicInformation,
1775
- form.valid?.basicInformation,
1427
+ form.valid.basicInformation,
1776
1428
  handleChangeFor,
1777
1429
  isExperimentEnabled,
1778
1430
  state,
@@ -1797,9 +1449,10 @@ function BasicInformation({
1797
1449
  fieldProblems: form.fieldProblems.basicInformation ?? {},
1798
1450
  country,
1799
1451
  formUtils,
1800
- handleChange: handleChangeFor
1452
+ handleChange: handleChangeFor,
1453
+ t: businessT
1801
1454
  });
1802
- return /* @__PURE__ */ jsxs("form", { id, className: styles$1.basicInformation, children: [
1455
+ return /* @__PURE__ */ jsxs("form", { id, className: styles$3.basicInformation, children: [
1803
1456
  /* @__PURE__ */ jsx(Header, { title: t(($) => $["basicInformationFormHeading"], { ns: "business" }), children: /* @__PURE__ */ jsx(
1804
1457
  FormDescription,
1805
1458
  {
@@ -1820,10 +1473,10 @@ function BasicInformation({
1820
1473
  /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx(
1821
1474
  CountryField,
1822
1475
  {
1823
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, COUNTRY_FIELD),
1824
- valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, COUNTRY_FIELD),
1476
+ data: formUtils.getFieldData(form.data.basicInformation ?? {}, COUNTRY_FIELD),
1477
+ valid: formUtils.getFieldValid(form.valid.basicInformation ?? {}, COUNTRY_FIELD),
1825
1478
  errors: formUtils.getFieldErrors(
1826
- form.errors?.basicInformation ?? {},
1479
+ form.errors.basicInformation ?? {},
1827
1480
  validationErrors,
1828
1481
  COUNTRY_FIELD
1829
1482
  ),
@@ -1840,16 +1493,16 @@ function BasicInformation({
1840
1493
  CountryOfGoverningLawField,
1841
1494
  {
1842
1495
  data: formUtils.getFieldData(
1843
- form.data?.basicInformation ?? {},
1496
+ form.data.basicInformation ?? {},
1844
1497
  COUNTRY_OF_GOVERNING_LAW_FIELD
1845
1498
  ),
1846
1499
  country,
1847
1500
  valid: formUtils.getFieldValid(
1848
- form.valid?.basicInformation ?? {},
1501
+ form.valid.basicInformation ?? {},
1849
1502
  COUNTRY_OF_GOVERNING_LAW_FIELD
1850
1503
  ),
1851
1504
  errors: formUtils.getFieldErrors(
1852
- form.errors?.basicInformation ?? {},
1505
+ form.errors.basicInformation ?? {},
1853
1506
  validationErrors,
1854
1507
  COUNTRY_OF_GOVERNING_LAW_FIELD
1855
1508
  ),
@@ -1891,13 +1544,13 @@ function BasicInformation({
1891
1544
  showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx(
1892
1545
  TaxInformationField,
1893
1546
  {
1894
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, TAX_INFORMATION_FIELD),
1547
+ data: formUtils.getFieldData(form.data.basicInformation ?? {}, TAX_INFORMATION_FIELD),
1895
1548
  valid: formUtils.getFieldValid(
1896
- form.valid?.basicInformation ?? {},
1549
+ form.valid.basicInformation ?? {},
1897
1550
  TAX_INFORMATION_FIELD
1898
1551
  ),
1899
1552
  errors: formUtils.getFieldErrors(
1900
- form.errors?.basicInformation ?? {},
1553
+ form.errors.basicInformation ?? {},
1901
1554
  validationErrors,
1902
1555
  TAX_INFORMATION_FIELD
1903
1556
  ),
@@ -1920,10 +1573,10 @@ function BasicInformation({
1920
1573
  showField(STATE_FIELD) && /* @__PURE__ */ jsx(
1921
1574
  StateField,
1922
1575
  {
1923
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, STATE_FIELD),
1924
- valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, STATE_FIELD),
1576
+ data: formUtils.getFieldData(form.data.basicInformation ?? {}, STATE_FIELD),
1577
+ valid: formUtils.getFieldValid(form.valid.basicInformation ?? {}, STATE_FIELD),
1925
1578
  errors: formUtils.getFieldErrors(
1926
- form.errors?.basicInformation ?? {},
1579
+ form.errors.basicInformation ?? {},
1927
1580
  validationErrors,
1928
1581
  STATE_FIELD
1929
1582
  ),
@@ -1938,15 +1591,15 @@ function BasicInformation({
1938
1591
  BusinessRegistrationNumberField,
1939
1592
  {
1940
1593
  data: formUtils.getFieldData(
1941
- form.data?.basicInformation ?? {},
1594
+ form.data.basicInformation ?? {},
1942
1595
  BUSINESS_REGISTRATION_NUMBER_FIELD
1943
1596
  ),
1944
1597
  valid: formUtils.getFieldValid(
1945
- form.valid?.basicInformation ?? {},
1598
+ form.valid.basicInformation ?? {},
1946
1599
  BUSINESS_REGISTRATION_NUMBER_FIELD
1947
1600
  ),
1948
1601
  errors: formUtils.getFieldErrors(
1949
- form.errors?.basicInformation ?? {},
1602
+ form.errors.basicInformation ?? {},
1950
1603
  validationErrors,
1951
1604
  BUSINESS_REGISTRATION_NUMBER_FIELD
1952
1605
  ),
@@ -1956,7 +1609,7 @@ function BasicInformation({
1956
1609
  mask: formUtils.getMask("registrationNumber"),
1957
1610
  guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
1958
1611
  placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
1959
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
1612
+ helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
1960
1613
  readonly: formUtils.isReadOnly("registrationNumber"),
1961
1614
  optional: formUtils.isOptionalField("registrationNumber"),
1962
1615
  shouldValidate,
@@ -2162,12 +1815,12 @@ const applyVerifiedBusinessData = (form, country, verifiedData) => {
2162
1815
  "entityType",
2163
1816
  "companyStructure"
2164
1817
  )(mapOrganizationTypeToCompanyType(verifiedData.organizationType));
2165
- const isVerifiedAddressNotRegistrationAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data?.basicInformation?.stateOrProvince !== verifiedData.state;
1818
+ const isVerifiedAddressNotRegistrationAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data.basicInformation?.stateOrProvince !== verifiedData.state;
2166
1819
  const verifiedAddress = isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(verifiedData), country } } : {
2167
1820
  registrationAddress: {
2168
1821
  ...mapAddressData(verifiedData),
2169
1822
  country,
2170
- stateOrProvince: form.data?.basicInformation?.stateOrProvince
1823
+ stateOrProvince: form.data.basicInformation?.stateOrProvince
2171
1824
  }
2172
1825
  };
2173
1826
  if (isVerifiedAddressNotRegistrationAddress) {
@@ -2228,10 +1881,7 @@ function BusinessInformation({ fetching, selectedBusiness }) {
2228
1881
  if (fetching) {
2229
1882
  return /* @__PURE__ */ jsx(Loader, { size: "large" });
2230
1883
  }
2231
- if (!fetching) {
2232
- return /* @__PURE__ */ jsx(StructuredList, { items });
2233
- }
2234
- return null;
1884
+ return /* @__PURE__ */ jsx(StructuredList, { items });
2235
1885
  }
2236
1886
  function BusinessInformationCard({
2237
1887
  result,
@@ -2337,7 +1987,7 @@ function BusinessInformationCard({
2337
1987
  ] }) });
2338
1988
  }
2339
1989
  const businessSelectionFooter = "adyen-kyc-business-selection-footer";
2340
- const styles = {
1990
+ const styles$2 = {
2341
1991
  businessSelectionFooter
2342
1992
  };
2343
1993
  const BUSINESS_SELECTION_FIELDS = [
@@ -2358,11 +2008,12 @@ function BusinessSelection({
2358
2008
  const userEvents = useAnalyticsContext();
2359
2009
  const [selectedBusinessId, setSelectedBusinessId] = useState();
2360
2010
  const [fetchParams, setFetchParams] = useState();
2011
+ usePageLandedEvent();
2361
2012
  const { data: companySearchResponse, isLoading: searching } = useCompanySearch({
2362
- name: form.data?.basicInformation?.legalCompanyName ?? "",
2013
+ name: form.data.basicInformation?.legalCompanyName ?? "",
2363
2014
  country,
2364
- state: form.data?.basicInformation?.stateOrProvince,
2365
- registrationNumber: form.data?.basicInformation?.registrationNumber
2015
+ state: form.data.basicInformation?.stateOrProvince,
2016
+ registrationNumber: form.data.basicInformation?.registrationNumber
2366
2017
  });
2367
2018
  const {
2368
2019
  data: businessData,
@@ -2397,7 +2048,7 @@ function BusinessSelection({
2397
2048
  (fieldName, mode) => form.handleChangeFor(fieldName, "businessSelection", mode),
2398
2049
  [form]
2399
2050
  );
2400
- const handleSelectBusiness = async (result) => {
2051
+ const handleSelectBusiness = (result) => {
2401
2052
  if ((!selectedBusinessId || selectedBusinessId !== result.id) && currentTin) {
2402
2053
  userEvents.addPageEvent("Clicked button", {
2403
2054
  actionType: "select",
@@ -2417,7 +2068,7 @@ function BusinessSelection({
2417
2068
  });
2418
2069
  }
2419
2070
  };
2420
- const handleConfirmSelection = async () => {
2071
+ const handleConfirmSelection = () => {
2421
2072
  verifiedBusiness.value = businessData;
2422
2073
  applyVerifiedBusinessData(form, country, businessData);
2423
2074
  handleChange("hasSelectedBusiness", "blur")(true);
@@ -2461,26 +2112,26 @@ function BusinessSelection({
2461
2112
  const formUtils = useMemo(() => {
2462
2113
  return createFormUtils(
2463
2114
  {
2464
- data: form.data?.businessSelection ?? {},
2115
+ data: form.data.businessSelection ?? {},
2465
2116
  allFields: form.allFields?.businessSelection ?? [],
2466
2117
  requiredFields: form.requiredFields?.businessSelection ?? [],
2467
2118
  optionalFields: form.optionalFields?.businessSelection ?? [],
2468
2119
  trustedFields: form.trustedFields?.businessSelection ?? [],
2469
2120
  obscuredFields: form.obscuredFields?.businessSelection ?? [],
2470
- errors: form.errors?.businessSelection ?? {},
2471
- valid: form.valid?.businessSelection ?? {}
2121
+ errors: form.errors.businessSelection ?? {},
2122
+ valid: form.valid.businessSelection ?? {}
2472
2123
  },
2473
2124
  t
2474
2125
  );
2475
2126
  }, [
2476
2127
  form.allFields?.businessSelection,
2477
- form.data?.businessSelection,
2478
- form.errors?.businessSelection,
2128
+ form.data.businessSelection,
2129
+ form.errors.businessSelection,
2479
2130
  form.obscuredFields?.businessSelection,
2480
2131
  form.optionalFields?.businessSelection,
2481
2132
  form.requiredFields?.businessSelection,
2482
2133
  form.trustedFields?.businessSelection,
2483
- form.valid?.businessSelection,
2134
+ form.valid.businessSelection,
2484
2135
  t,
2485
2136
  validationErrors,
2486
2137
  verificationErrors
@@ -2496,7 +2147,7 @@ function BusinessSelection({
2496
2147
  formUtils
2497
2148
  }
2498
2149
  ),
2499
- /* @__PURE__ */ jsx(StackLayout, { children: companySearchResponse?.results?.map((result) => /* @__PURE__ */ jsx(
2150
+ /* @__PURE__ */ jsx(StackLayout, { children: companySearchResponse?.results.map((result) => /* @__PURE__ */ jsx(
2500
2151
  BusinessInformationCard,
2501
2152
  {
2502
2153
  result,
@@ -2512,7 +2163,7 @@ function BusinessSelection({
2512
2163
  },
2513
2164
  result.id
2514
2165
  )) }),
2515
- /* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles.businessSelectionFooter, children: [
2166
+ /* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles$2.businessSelectionFooter, children: [
2516
2167
  t(($) => $["businessSelection__footer"], { ns: "business" }),
2517
2168
  /* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"], { ns: "business" }) })
2518
2169
  ] })
@@ -2580,6 +2231,7 @@ function CompanyStructure({
2580
2231
  const { accountHolder } = useAccountHolder();
2581
2232
  const { isSettingEnabled } = useSettingsContext();
2582
2233
  const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
2234
+ usePageLandedEvent();
2583
2235
  const formUtils = createFormUtils(
2584
2236
  { requiredFields: form.requiredFields?.companyStructure ?? [] },
2585
2237
  t
@@ -2588,70 +2240,411 @@ function CompanyStructure({
2588
2240
  CompanyTypesValues.INCORPORATED_PARTNERSHIP,
2589
2241
  CompanyTypesValues.INCORPORATED_ASSOCIATION
2590
2242
  ];
2591
- if (isBankAccountRequestedForOrganization.value) {
2592
- excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
2593
- }
2594
- const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
2595
- const companyTypeExamples2 = useCompanyTypeExamples(country);
2596
- const companyTiles = companyTypeRadioOptions.map((option) => {
2597
- const description = t(($) => $[companyTypeMetadata[option].description], {
2598
- ns: "business"
2599
- });
2600
- const examples = companyTypeExamples2?.[option];
2601
- const subTitle = examples ? `${description} ${t(($) => $["forExample_"], {
2602
- examples: examples.join(", "),
2603
- interpolation: { escapeValue: false },
2604
- ns: "ui"
2605
- })}` : description;
2606
- return {
2607
- value: option,
2608
- label: t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
2609
- subTitle
2610
- };
2243
+ if (isBankAccountRequestedForOrganization.value) {
2244
+ excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
2245
+ }
2246
+ const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
2247
+ const companyTypeExamples2 = useCompanyTypeExamples(country);
2248
+ const companyTiles = companyTypeRadioOptions.map((option) => {
2249
+ const description = t(($) => $[companyTypeMetadata[option].description], {
2250
+ ns: "business"
2251
+ });
2252
+ const examples = companyTypeExamples2?.[option];
2253
+ const subTitle = examples ? `${description} ${t(($) => $["forExample_"], {
2254
+ examples: examples.join(", "),
2255
+ interpolation: { escapeValue: false },
2256
+ ns: "ui"
2257
+ })}` : description;
2258
+ return {
2259
+ value: option,
2260
+ label: t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
2261
+ subTitle
2262
+ };
2263
+ });
2264
+ return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
2265
+ /* @__PURE__ */ jsx(
2266
+ Header,
2267
+ {
2268
+ title: t(($) => $["companyStructureFormHeading"], { ns: "business" }),
2269
+ description: t(($) => $["companyStructureFormDescription"], { ns: "business" })
2270
+ }
2271
+ ),
2272
+ /* @__PURE__ */ jsx(
2273
+ ErrorPanel,
2274
+ {
2275
+ id: "ariaErrorField",
2276
+ verificationErrors,
2277
+ validationErrors,
2278
+ formUtils
2279
+ }
2280
+ ),
2281
+ /* @__PURE__ */ jsx(
2282
+ Field,
2283
+ {
2284
+ el: "fieldset",
2285
+ name: "entityType",
2286
+ errorMessage: formUtils.getErrorMessage(
2287
+ "entityType",
2288
+ form.errors.companyStructure,
2289
+ validationErrors
2290
+ ),
2291
+ isValid: form.valid.companyStructure?.entityType,
2292
+ children: (childProps) => /* @__PURE__ */ jsx(
2293
+ TileGroup,
2294
+ {
2295
+ ...childProps,
2296
+ name: "entityType",
2297
+ tiles: companyTiles,
2298
+ selected: form.data.companyStructure?.entityType ?? "",
2299
+ onChange: (value) => form.handleChangeFor("entityType", "companyStructure")(value),
2300
+ isHorizontal: true,
2301
+ "aria-required": true,
2302
+ "aria-invalid": !form.valid.companyStructure?.entityType
2303
+ }
2304
+ )
2305
+ }
2306
+ )
2307
+ ] });
2308
+ }
2309
+ const FINANCIAL_REPORTING_DATE_FIELD = [
2310
+ "financialReportingDate"
2311
+ ];
2312
+ function FinancialReportingDate({
2313
+ data,
2314
+ valid,
2315
+ errors,
2316
+ labels,
2317
+ readonly,
2318
+ handleChangeFor
2319
+ }) {
2320
+ const { t } = useTranslation("common");
2321
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
2322
+ Field,
2323
+ {
2324
+ name: "financialReportingDate",
2325
+ label: labels.financialReportingDate,
2326
+ helper: t(($) => $["dateOfTotalAssetsCalculation"]),
2327
+ helperPosition: "below",
2328
+ errorMessage: errors.financialReportingDate,
2329
+ isValid: valid.financialReportingDate,
2330
+ children: (childProps) => /* @__PURE__ */ jsx(
2331
+ InputDate,
2332
+ {
2333
+ ...childProps,
2334
+ name: "financialReportingDate",
2335
+ value: data.financialReportingDate,
2336
+ onInput: handleChangeFor("financialReportingDate", "input"),
2337
+ onBlur: handleChangeFor("financialReportingDate", "blur"),
2338
+ "aria-required": true,
2339
+ "aria-invalid": !valid.financialReportingDate,
2340
+ readonly,
2341
+ max: formatDateObj(/* @__PURE__ */ new Date())
2342
+ }
2343
+ )
2344
+ }
2345
+ ) });
2346
+ }
2347
+ const NUMBER_OF_EMPLOYEES_FIELD = [
2348
+ "numberOfEmployees"
2349
+ ];
2350
+ function NumberOfEmployees({
2351
+ data,
2352
+ valid,
2353
+ errors,
2354
+ labels,
2355
+ readonly,
2356
+ handleChangeFor
2357
+ }) {
2358
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
2359
+ Field,
2360
+ {
2361
+ name: "numberOfEmployees",
2362
+ label: labels.numberOfEmployees,
2363
+ errorMessage: errors.numberOfEmployees,
2364
+ isValid: valid.numberOfEmployees,
2365
+ children: (childProps) => /* @__PURE__ */ jsx(
2366
+ InputNumber,
2367
+ {
2368
+ ...childProps,
2369
+ "aria-required": true,
2370
+ "aria-invalid": !valid.numberOfEmployees,
2371
+ name: "numberOfEmployees",
2372
+ min: "1",
2373
+ step: "1",
2374
+ value: data.numberOfEmployees,
2375
+ readonly,
2376
+ onInput: handleChangeFor("numberOfEmployees", "input"),
2377
+ onBlur: handleChangeFor("numberOfEmployees", "blur")
2378
+ }
2379
+ )
2380
+ }
2381
+ ) });
2382
+ }
2383
+ const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
2384
+ const styles$1 = {
2385
+ financialInformationReportedValueOptions
2386
+ };
2387
+ const reportedValue = "adyen-kyc-reported-value";
2388
+ const reportedValueInput = "adyen-kyc-reported-value-input";
2389
+ const styles = {
2390
+ reportedValue,
2391
+ reportedValueInput
2392
+ };
2393
+ const ReportedValue = ({
2394
+ currency,
2395
+ amount,
2396
+ onAmountChanged,
2397
+ label,
2398
+ helper,
2399
+ fieldName,
2400
+ errorMessage,
2401
+ isValid
2402
+ }) => {
2403
+ const { i18n } = useI18nContext();
2404
+ return /* @__PURE__ */ jsx("div", { className: styles.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
2405
+ InputCurrency,
2406
+ {
2407
+ ...childProps,
2408
+ locale: i18n.locale,
2409
+ currency,
2410
+ amount,
2411
+ onAmountChanged,
2412
+ className: styles.reportedValueInput,
2413
+ "aria-label": label
2414
+ }
2415
+ ) }) });
2416
+ };
2417
+ const financialInfoValidationRules = {
2418
+ financialReportingDate: [
2419
+ {
2420
+ modes: ["blur"],
2421
+ validate: (date) => !isEmpty(date),
2422
+ errorMessage: "fieldIsRequired"
2423
+ },
2424
+ {
2425
+ modes: ["blur"],
2426
+ validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
2427
+ errorMessage: "invalidFinancialReportingDate"
2428
+ }
2429
+ ],
2430
+ currency: [
2431
+ {
2432
+ modes: ["blur"],
2433
+ validate: (currency) => !isEmpty(currency),
2434
+ errorMessage: "fieldIsRequired"
2435
+ }
2436
+ ],
2437
+ reportedValueOption: {
2438
+ modes: ["blur"],
2439
+ validate: (option) => !isEmpty(option),
2440
+ errorMessage: "fieldIsRequired"
2441
+ },
2442
+ balanceSheetTotal: {
2443
+ modes: ["blur"],
2444
+ validate: (amount) => !isUndefinedOrNull(amount),
2445
+ errorMessage: "fieldIsRequired"
2446
+ },
2447
+ annualTurnover: {
2448
+ modes: ["blur"],
2449
+ validate: (amount) => !isUndefinedOrNull(amount),
2450
+ errorMessage: "fieldIsRequired"
2451
+ }
2452
+ };
2453
+ const financialInfoValidationEmployeesOnlyRules = {
2454
+ numberOfEmployees: [
2455
+ {
2456
+ modes: ["blur"],
2457
+ validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
2458
+ errorMessage: "fieldIsRequired"
2459
+ },
2460
+ {
2461
+ modes: ["blur"],
2462
+ validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
2463
+ errorMessage: "pleaseEnterAValidWholeNumber"
2464
+ }
2465
+ ]
2466
+ };
2467
+ const financialInfoValidationWithEmployeesRules = {
2468
+ ...financialInfoValidationRules,
2469
+ ...financialInfoValidationEmployeesOnlyRules
2470
+ };
2471
+ const financialInformationFieldsForEu = [
2472
+ ...FINANCIAL_REPORTING_DATE_FIELD,
2473
+ ...CURRENCY_FIELD,
2474
+ "reportedValueOption"
2475
+ ];
2476
+ const financialInformationFields = [
2477
+ ...NUMBER_OF_EMPLOYEES_FIELD,
2478
+ ...FINANCIAL_REPORTING_DATE_FIELD,
2479
+ ...CURRENCY_FIELD,
2480
+ "reportedValueOption"
2481
+ ];
2482
+ function FinancialInformation(props) {
2483
+ const { t } = useTranslation("common");
2484
+ usePageLandedEvent();
2485
+ const { id, country, data: financialInformationData, multiForm, fieldValidationErrors } = props;
2486
+ const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
2487
+ const formUtils = createFormUtils(props, t);
2488
+ const showReportingFields = formUtils.isRequiredField("financialReportingDate");
2489
+ const getSchema = (data2) => [
2490
+ ...financialInformationFields,
2491
+ ...data2.reportedValueOption ? [data2.reportedValueOption] : []
2492
+ ];
2493
+ const getValidator = () => {
2494
+ if (!showReportingFields) {
2495
+ return financialInfoValidationEmployeesOnlyRules;
2496
+ }
2497
+ if (country === CountryCodes.UnitedKingdom) {
2498
+ return financialInfoValidationWithEmployeesRules;
2499
+ }
2500
+ return financialInfoValidationRules;
2501
+ };
2502
+ const { handleChangeFor, data, valid, errors, fieldProblems, schema } = useForm({
2503
+ ...props,
2504
+ schema: getSchema,
2505
+ defaultData: financialInformationData,
2506
+ rules: getValidator(),
2507
+ fieldProblems: fieldValidationErrors
2611
2508
  });
2612
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
2613
- /* @__PURE__ */ jsx(
2614
- Header,
2615
- {
2616
- title: t(($) => $["companyStructureFormName"], { ns: "business" }),
2617
- description: t(($) => $["companyStructureFormDescription"], { ns: "business" })
2618
- }
2619
- ),
2620
- /* @__PURE__ */ jsx(
2621
- ErrorPanel,
2622
- {
2623
- id: "ariaErrorField",
2624
- verificationErrors,
2625
- validationErrors,
2626
- formUtils
2627
- }
2628
- ),
2629
- /* @__PURE__ */ jsx(
2630
- Field,
2509
+ const { updateStateSlice } = useGlobalDataSlice(id);
2510
+ useEffect(() => {
2511
+ updateStateSlice({
2512
+ data,
2513
+ valid,
2514
+ errors,
2515
+ fieldProblems,
2516
+ schema
2517
+ });
2518
+ }, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
2519
+ const handleChange = useCallback(
2520
+ (fieldName, mode) => multiForm ? multiForm.handleChangeFor(fieldName, "companyFinancialInformation", mode) : handleChangeFor(fieldName, mode),
2521
+ [handleChangeFor, multiForm]
2522
+ );
2523
+ const formData = multiForm ? multiForm.data?.companyFinancialInformation ?? {} : data;
2524
+ const formErrors = multiForm ? multiForm.errors?.companyFinancialInformation ?? {} : errors;
2525
+ const formValid = multiForm ? multiForm.valid?.companyFinancialInformation ?? {} : valid;
2526
+ const formFieldProblems = multiForm ? multiForm.fieldProblems.companyFinancialInformation ?? {} : fieldProblems;
2527
+ const updateReportedValueOption = (option) => {
2528
+ if (formData.reportedValueOption) {
2529
+ handleChange(formData.reportedValueOption)(null);
2530
+ }
2531
+ const newReportedValue = option;
2532
+ handleChange("reportedValueOption")(newReportedValue);
2533
+ };
2534
+ return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-company-financial-information", children: [
2535
+ /* @__PURE__ */ jsx(Header, { title: t(($) => $["companyFinancialInformationFormHeading"], { ns: "business" }) }),
2536
+ country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
2537
+ NumberOfEmployees,
2631
2538
  {
2632
- el: "fieldset",
2633
- name: "entityType",
2634
- errorMessage: formUtils.getErrorMessage(
2635
- "entityType",
2636
- form.errors?.companyStructure,
2637
- validationErrors
2539
+ data: formUtils.getFieldData(formData, NUMBER_OF_EMPLOYEES_FIELD),
2540
+ errors: formUtils.getFieldErrors(
2541
+ formErrors,
2542
+ formFieldProblems,
2543
+ NUMBER_OF_EMPLOYEES_FIELD
2638
2544
  ),
2639
- isValid: form.valid?.companyStructure?.entityType,
2640
- children: (childProps) => /* @__PURE__ */ jsx(
2641
- TileGroup,
2642
- {
2643
- ...childProps,
2644
- name: "entityType",
2645
- tiles: companyTiles,
2646
- selected: form.data?.companyStructure?.entityType ?? "",
2647
- onChange: (value) => form.handleChangeFor("entityType", "companyStructure")(value),
2648
- isHorizontal: true,
2649
- "aria-required": true,
2650
- "aria-invalid": !form.valid?.companyStructure?.entityType
2651
- }
2652
- )
2545
+ handleChangeFor: handleChange,
2546
+ labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
2547
+ readonly: formUtils.isReadOnly("numberOfEmployees"),
2548
+ valid: formUtils.getFieldValid(formValid, NUMBER_OF_EMPLOYEES_FIELD)
2653
2549
  }
2654
- )
2550
+ ),
2551
+ showReportingFields && /* @__PURE__ */ jsxs(Fragment, { children: [
2552
+ /* @__PURE__ */ jsx(
2553
+ FinancialReportingDate,
2554
+ {
2555
+ data: formUtils.getFieldData(formData, FINANCIAL_REPORTING_DATE_FIELD),
2556
+ errors: formUtils.getFieldErrors(
2557
+ formErrors,
2558
+ formFieldProblems,
2559
+ FINANCIAL_REPORTING_DATE_FIELD
2560
+ ),
2561
+ handleChangeFor: handleChange,
2562
+ labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
2563
+ readonly: formUtils.isReadOnly("financialReportingDate"),
2564
+ valid: formUtils.getFieldValid(formValid, FINANCIAL_REPORTING_DATE_FIELD)
2565
+ }
2566
+ ),
2567
+ /* @__PURE__ */ jsx(
2568
+ Currency,
2569
+ {
2570
+ country,
2571
+ labels: { currency: t(($) => $["reportingCurrency"]) },
2572
+ data: formUtils.getFieldData(formData, CURRENCY_FIELD),
2573
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, CURRENCY_FIELD),
2574
+ handleChangeFor: handleChange,
2575
+ readonly: formUtils.isReadOnly("currency"),
2576
+ valid: formUtils.getFieldValid(formValid, CURRENCY_FIELD)
2577
+ }
2578
+ ),
2579
+ /* @__PURE__ */ jsx(
2580
+ Field,
2581
+ {
2582
+ el: "fieldset",
2583
+ name: "reportedValueOption",
2584
+ label: t(($) => $["reportedValue"]),
2585
+ errorMessage: formUtils.getErrorMessage(
2586
+ "reportedValueOption",
2587
+ formErrors,
2588
+ formFieldProblems
2589
+ ),
2590
+ helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
2591
+ isValid: formValid.reportedValueOption,
2592
+ children: (childProps) => /* @__PURE__ */ jsx(
2593
+ RadioGroup,
2594
+ {
2595
+ name: "reportedValueOption",
2596
+ ...childProps,
2597
+ value: formData.reportedValueOption,
2598
+ items: [
2599
+ {
2600
+ id: "balanceSheetTotal",
2601
+ name: "balanceSheetTotal",
2602
+ content: /* @__PURE__ */ jsx(
2603
+ ReportedValue,
2604
+ {
2605
+ label: t(($) => $["balanceSheetTotal"]),
2606
+ currency: formData.currency ?? defaultCurrency,
2607
+ amount: formData.balanceSheetTotal,
2608
+ onAmountChanged: handleChange("balanceSheetTotal"),
2609
+ fieldName: "balanceSheetTotal",
2610
+ isValid: formValid.balanceSheetTotal,
2611
+ errorMessage: formUtils.getErrorMessage(
2612
+ "balanceSheetTotal",
2613
+ formErrors,
2614
+ formFieldProblems
2615
+ )
2616
+ }
2617
+ )
2618
+ },
2619
+ {
2620
+ id: "annualTurnover",
2621
+ name: "annualTurnover",
2622
+ content: /* @__PURE__ */ jsx(
2623
+ ReportedValue,
2624
+ {
2625
+ label: t(($) => $["annualTurnover"]),
2626
+ currency: formData.currency ?? defaultCurrency,
2627
+ amount: formData.annualTurnover,
2628
+ onAmountChanged: handleChange("annualTurnover"),
2629
+ fieldName: "annualTurnover",
2630
+ isValid: formValid.annualTurnover,
2631
+ errorMessage: formUtils.getErrorMessage(
2632
+ "annualTurnover",
2633
+ formErrors,
2634
+ formFieldProblems
2635
+ )
2636
+ }
2637
+ )
2638
+ }
2639
+ ],
2640
+ onChange: updateReportedValueOption,
2641
+ showContentOnlyOnSelected: true,
2642
+ className: styles$1.financialInformationReportedValueOptions
2643
+ }
2644
+ )
2645
+ }
2646
+ )
2647
+ ] })
2655
2648
  ] });
2656
2649
  }
2657
2650
  const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [...STATE_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
@@ -2669,7 +2662,7 @@ const getFinancialInformationFields = (country) => {
2669
2662
  const staticBusinessDetailsForms = {
2670
2663
  businessSelection: {
2671
2664
  formId: "businessSelection",
2672
- formName: "businessSelectionFormHeading",
2665
+ formName: "businessSelectionFormName",
2673
2666
  fields: BUSINESS_SELECTION_FIELDS
2674
2667
  },
2675
2668
  companyStructure: {
@@ -2689,22 +2682,22 @@ const staticBusinessDetailsForms = {
2689
2682
  },
2690
2683
  companyProofOfDirectorDocument: {
2691
2684
  formId: "companyProofOfDirectorDocument",
2692
- formName: "proofOfDirector",
2685
+ formName: "proofOfDirectorFormName",
2693
2686
  fields: ["proofOfDirector"]
2694
2687
  },
2695
2688
  companyProofOfSignatoryDocument: {
2696
2689
  formId: "companyProofOfSignatoryDocument",
2697
- formName: "proofOfSignatory",
2690
+ formName: "proofOfSignatoryFormName",
2698
2691
  fields: ["proofOfSignatory"]
2699
2692
  },
2700
2693
  companyProofOfOwnershipDocument: {
2701
2694
  formId: "companyProofOfOwnershipDocument",
2702
- formName: "proofOfOwnership",
2695
+ formName: "proofOfOwnershipFormName",
2703
2696
  fields: ["proofOfOwnership"]
2704
2697
  },
2705
2698
  companyConstitutionalDocument: {
2706
2699
  formId: "companyConstitutionalDocument",
2707
- formName: "constitutionalDocument",
2700
+ formName: "constitutionalDocumentFormName",
2708
2701
  fields: ["constitutionalDocument"]
2709
2702
  }
2710
2703
  };
@@ -2809,6 +2802,7 @@ const GuidanceContent$4 = ({ t }) => {
2809
2802
  function ProofOfDirectorDocument({ id, country, ...props }) {
2810
2803
  const { t } = useTranslation(["common", "business"]);
2811
2804
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
2805
+ usePageLandedEvent();
2812
2806
  return /* @__PURE__ */ jsx(
2813
2807
  MemoizedDocumentUpload,
2814
2808
  {
@@ -2919,6 +2913,7 @@ function ProofOfOwnershipDocument({ id, country, ...props }) {
2919
2913
  const { t } = useTranslation(["common", "business"]);
2920
2914
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
2921
2915
  const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
2916
+ usePageLandedEvent();
2922
2917
  useEffect(() => {
2923
2918
  if (props.data?.proofOfOwnership?.length === 2) {
2924
2919
  setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
@@ -2965,6 +2960,7 @@ const GuidanceContent$2 = ({ t }) => {
2965
2960
  function ProofOfSignatoryDocument({ id, country, ...props }) {
2966
2961
  const { t } = useTranslation(["common", "business"]);
2967
2962
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
2963
+ usePageLandedEvent();
2968
2964
  return /* @__PURE__ */ jsx(
2969
2965
  MemoizedDocumentUpload,
2970
2966
  {
@@ -3081,6 +3077,7 @@ function RegistrationDocument({
3081
3077
  ...props
3082
3078
  }) {
3083
3079
  const { t } = useTranslation(["common", "business"]);
3080
+ usePageLandedEvent();
3084
3081
  return /* @__PURE__ */ jsx(
3085
3082
  MemoizedDocumentUpload,
3086
3083
  {
@@ -3178,6 +3175,7 @@ function TaxDocument({
3178
3175
  ...props
3179
3176
  }) {
3180
3177
  const { t } = useTranslation("business");
3178
+ usePageLandedEvent();
3181
3179
  return /* @__PURE__ */ jsx(
3182
3180
  MemoizedDocumentUpload,
3183
3181
  {
@@ -3194,6 +3192,10 @@ function TaxDocument({
3194
3192
  }
3195
3193
  );
3196
3194
  }
3195
+ const VatDocument = ({ children }) => {
3196
+ usePageLandedEvent();
3197
+ return children;
3198
+ };
3197
3199
  function BusinessDetailsMultiform({
3198
3200
  taskType,
3199
3201
  country,
@@ -3283,7 +3285,7 @@ function BusinessDetailsMultiform({
3283
3285
  trustedFields: form.trustedFields?.companyTaxDocument,
3284
3286
  handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
3285
3287
  }
3286
- ) : /* @__PURE__ */ jsx(
3288
+ ) : /* @__PURE__ */ jsx(VatDocument, { children: /* @__PURE__ */ jsx(
3287
3289
  MemoizedDocumentUpload,
3288
3290
  {
3289
3291
  id: activeForm2.formId,
@@ -3317,7 +3319,7 @@ function BusinessDetailsMultiform({
3317
3319
  ] })
3318
3320
  ] })
3319
3321
  }
3320
- );
3322
+ ) });
3321
3323
  case "companyRegistrationDocument":
3322
3324
  return /* @__PURE__ */ jsx(
3323
3325
  RegistrationDocument,
@@ -3344,7 +3346,7 @@ function BusinessDetailsMultiform({
3344
3346
  {
3345
3347
  id: activeForm2.formId,
3346
3348
  country,
3347
- data: form.data?.companyProofOfDirectorDocument,
3349
+ data: form.data.companyProofOfDirectorDocument,
3348
3350
  errors: form.errors.companyProofOfDirectorDocument,
3349
3351
  valid: form.valid.companyProofOfDirectorDocument,
3350
3352
  allFields: form.allFields?.companyProofOfDirectorDocument,
@@ -3363,7 +3365,7 @@ function BusinessDetailsMultiform({
3363
3365
  {
3364
3366
  id: activeForm2.formId,
3365
3367
  country,
3366
- data: form.data?.companyProofOfSignatoryDocument,
3368
+ data: form.data.companyProofOfSignatoryDocument,
3367
3369
  errors: form.errors.companyProofOfSignatoryDocument,
3368
3370
  valid: form.valid.companyProofOfSignatoryDocument,
3369
3371
  allFields: form.allFields?.companyProofOfSignatoryDocument,
@@ -3382,7 +3384,7 @@ function BusinessDetailsMultiform({
3382
3384
  {
3383
3385
  id: activeForm2.formId,
3384
3386
  country,
3385
- data: form.data?.companyProofOfOwnershipDocument,
3387
+ data: form.data.companyProofOfOwnershipDocument,
3386
3388
  errors: form.errors.companyProofOfOwnershipDocument,
3387
3389
  valid: form.valid.companyProofOfOwnershipDocument,
3388
3390
  allFields: form.allFields?.companyProofOfOwnershipDocument,
@@ -3402,7 +3404,7 @@ function BusinessDetailsMultiform({
3402
3404
  id: activeForm2.formId,
3403
3405
  legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
3404
3406
  country,
3405
- data: form.data?.companyConstitutionalDocument,
3407
+ data: form.data.companyConstitutionalDocument,
3406
3408
  errors: form.errors.companyConstitutionalDocument,
3407
3409
  valid: form.valid.companyConstitutionalDocument,
3408
3410
  allFields: form.allFields?.companyConstitutionalDocument,
@@ -3422,7 +3424,7 @@ function BusinessDetailsMultiform({
3422
3424
  multiForm: form,
3423
3425
  id: activeForm2.formId,
3424
3426
  country,
3425
- data: form.data?.companyFinancialInformation,
3427
+ data: form.data.companyFinancialInformation,
3426
3428
  allFields: form.allFields?.companyFinancialInformation,
3427
3429
  requiredFields: form.requiredFields?.companyFinancialInformation,
3428
3430
  optionalFields: form.optionalFields?.companyFinancialInformation,
@@ -3444,13 +3446,13 @@ const CompanyStructureValidation = {
3444
3446
  }
3445
3447
  };
3446
3448
  const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
3447
- const registrationDocument = getDocument(entityId, "registrationDocument") ?? null;
3448
- const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo") ?? null;
3449
- const proofOfDirector = getDocument(entityId, "proofOfDirector") ?? null;
3450
- const proofOfSignatory = getDocument(entityId, "proofOfSignatory") ?? null;
3451
- const proofOfOwnership = getDocuments(entityId, "proofOfOwnership") ?? null;
3452
- const constitutionalDocument = getDocument(entityId, "constitutionalDocument") ?? null;
3453
- const mergedProofOfOwnershipAttachments = proofOfOwnership?.flatMap((doc) => doc.attachments ?? []) ?? [];
3449
+ const registrationDocument = getDocument(entityId, "registrationDocument");
3450
+ const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo");
3451
+ const proofOfDirector = getDocument(entityId, "proofOfDirector");
3452
+ const proofOfSignatory = getDocument(entityId, "proofOfSignatory");
3453
+ const proofOfOwnership = getDocuments(entityId, "proofOfOwnership");
3454
+ const constitutionalDocument = getDocument(entityId, "constitutionalDocument");
3455
+ const mergedProofOfOwnershipAttachments = proofOfOwnership.flatMap((doc) => doc.attachments);
3454
3456
  return {
3455
3457
  companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
3456
3458
  companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
@@ -3485,13 +3487,13 @@ const mapDbaName = (legalEntity) => {
3485
3487
  dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
3486
3488
  } else {
3487
3489
  if (entity?.doingBusinessAs) {
3488
- dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
3490
+ dbaName.hasDoingBusinessAs = entity.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
3489
3491
  } else {
3490
3492
  dbaName.hasDoingBusinessAs = void 0;
3491
3493
  }
3492
3494
  }
3493
3495
  if (legalEntity.organization?.doingBusinessAs) {
3494
- dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
3496
+ dbaName.doingBusinessAs = legalEntity.organization.doingBusinessAs;
3495
3497
  }
3496
3498
  return dbaName;
3497
3499
  };
@@ -3520,8 +3522,8 @@ const mapAdditionalInformation = (data, legalEntity, taskType) => {
3520
3522
  companyType
3521
3523
  );
3522
3524
  const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
3523
- const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
3524
- if (entity?.registeredAddress?.localization) {
3525
+ const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity.principalPlaceOfBusiness, entity.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
3526
+ if (entity?.registeredAddress.localization) {
3525
3527
  data.registrationAddress = {
3526
3528
  ...data.registrationAddress,
3527
3529
  ...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
@@ -3591,8 +3593,8 @@ const mapLegalEntityToBusinessDetailsSchema = ({
3591
3593
  legalEntity,
3592
3594
  solePropBusinessDetailsKeyMapping
3593
3595
  );
3594
- const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
3595
- if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
3596
+ const country = solePropData.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
3597
+ if (legalEntity.soleProprietorship?.financialReports) {
3596
3598
  solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
3597
3599
  legalEntity.soleProprietorship.financialReports
3598
3600
  );
@@ -3600,7 +3602,7 @@ const mapLegalEntityToBusinessDetailsSchema = ({
3600
3602
  return {
3601
3603
  ...solePropData,
3602
3604
  basicInformation: {
3603
- ...solePropData?.basicInformation,
3605
+ ...solePropData.basicInformation,
3604
3606
  country
3605
3607
  },
3606
3608
  companyConstitutionalDocument
@@ -3687,7 +3689,7 @@ const mapLegalEntityToBusinessDetailsSchema = ({
3687
3689
  };
3688
3690
  }
3689
3691
  case "companyFinancialInformation": {
3690
- const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
3692
+ const financialReports = legalEntity.type === "organization" ? legalEntity.organization?.financialReports : legalEntity.soleProprietorship?.financialReports;
3691
3693
  return financialReports?.length ? {
3692
3694
  ...componentData,
3693
3695
  [key]: mapFinancialReportsToFinancialInformation(financialReports)
@@ -3915,7 +3917,7 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
3915
3917
  if (taxData) {
3916
3918
  entityObject.taxInformation = taxData;
3917
3919
  }
3918
- if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
3920
+ if (!!requestObj.soleProprietorship && !!data.basicInformation?.country) {
3919
3921
  requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
3920
3922
  }
3921
3923
  if (registrationNumber) {
@@ -3924,18 +3926,18 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
3924
3926
  requestObj.organization.registrationNumberAbsent = false;
3925
3927
  }
3926
3928
  }
3927
- if (requestObj.organization && entityObject && localization.length > 0) {
3929
+ if (requestObj.organization && localization.length > 0) {
3928
3930
  entityObject.localization = localization;
3929
3931
  }
3930
3932
  if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
3931
- requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
3933
+ requestObj.organization.registrationNumberAbsent = data.additionalInformation.exemptedFromRegistrationNumber;
3932
3934
  }
3933
3935
  if (data.additionalInformation?.vatAbsenceReason) {
3934
3936
  entityObject.vatNumber = "";
3935
3937
  }
3936
3938
  if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
3937
3939
  if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
3938
- entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
3940
+ entityObject.doingBusinessAsAbsent = !data.additionalInformation.hasDoingBusinessAs;
3939
3941
  }
3940
3942
  } else {
3941
3943
  entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
@@ -3944,13 +3946,11 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
3944
3946
  if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
3945
3947
  entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
3946
3948
  }
3947
- if (entityObject.registeredAddress) {
3948
- const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
3949
- data.additionalInformation?.registrationAddress
3950
- );
3951
- if (addressLocalizations.length > 0)
3952
- entityObject.registeredAddress.localization = addressLocalizations;
3953
- }
3949
+ const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
3950
+ data.additionalInformation?.registrationAddress
3951
+ );
3952
+ if (addressLocalizations.length > 0)
3953
+ entityObject.registeredAddress.localization = addressLocalizations;
3954
3954
  if (!isEmpty$1(data.companyFinancialInformation)) {
3955
3955
  const isIncorporationDateDependencyEnabled = isExperimentEnabled(
3956
3956
  "EnableIncorporationDateBasedFinancialValidationForHO"
@@ -3958,7 +3958,7 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
3958
3958
  entityObject.financialReports = [
3959
3959
  mapFinancialInformationToFinancialReport(
3960
3960
  data.companyFinancialInformation,
3961
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
3961
+ isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
3962
3962
  )
3963
3963
  ];
3964
3964
  }
@@ -3986,7 +3986,7 @@ function buildRequiredForms({
3986
3986
  options
3987
3987
  }) {
3988
3988
  const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
3989
- legalEntityResponse?.organization?.type ?? ""
3989
+ legalEntityResponse.organization?.type ?? ""
3990
3990
  ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
3991
3991
  const filteredForms = Object.values(forms).filter(({ formId }) => {
3992
3992
  if (formId === "businessSelection") {
@@ -4005,12 +4005,12 @@ function buildRequiredForms({
4005
4005
  }
4006
4006
  const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
4007
4007
  const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
4008
- const country = data?.country;
4008
+ const country = data.country;
4009
4009
  const registrationNumberLabel = resolveFieldMetadata(
4010
4010
  registrationNumberDefaultFieldConfig[country],
4011
4011
  {
4012
4012
  companyType,
4013
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
4013
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
4014
4014
  },
4015
4015
  registrationNumberDefaultFieldMetadata
4016
4016
  ).label;
@@ -4041,7 +4041,7 @@ const formatAdditionalInformation = (data, country, companyType, t) => {
4041
4041
  registrationNumberDefaultFieldConfig[country],
4042
4042
  {
4043
4043
  companyType,
4044
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
4044
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
4045
4045
  },
4046
4046
  registrationNumberDefaultFieldMetadata
4047
4047
  ).label;
@@ -4072,7 +4072,7 @@ const formatAdditionalInformation = (data, country, companyType, t) => {
4072
4072
  const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
4073
4073
  const datasetUtils = datasetUtilities(language);
4074
4074
  return entriesOf(data).reduce((summaryData, [form]) => {
4075
- if (!form || !data[form]) return summaryData;
4075
+ if (!data[form]) return summaryData;
4076
4076
  const isCountryOfGoverningLawEnabled = isExperimentEnabled(
4077
4077
  "EnableCountryOfGoverningLawForUKCompanies"
4078
4078
  );
@@ -4121,7 +4121,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
4121
4121
  [form]: {
4122
4122
  companyRegistrationDocument: {
4123
4123
  fileName: data[form].registrationDocument?.[0]?.name,
4124
- description: data[form]?.description
4124
+ description: data[form].description
4125
4125
  }
4126
4126
  }
4127
4127
  };
@@ -4132,7 +4132,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
4132
4132
  [form]: {
4133
4133
  companyTaxDocument: {
4134
4134
  fileName: data[form].taxDocument?.[0]?.name,
4135
- description: data[form]?.description
4135
+ description: data[form].description
4136
4136
  }
4137
4137
  }
4138
4138
  };
@@ -4143,7 +4143,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
4143
4143
  [form]: {
4144
4144
  companyProofOfDirectorDocument: {
4145
4145
  fileName: data[form].proofOfDirector?.[0]?.name,
4146
- description: data[form]?.description
4146
+ description: data[form].description
4147
4147
  }
4148
4148
  }
4149
4149
  };
@@ -4154,7 +4154,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
4154
4154
  [form]: {
4155
4155
  companyProofOfSignatoryDocument: {
4156
4156
  fileName: data[form].proofOfSignatory?.[0]?.name,
4157
- description: data[form]?.description
4157
+ description: data[form].description
4158
4158
  }
4159
4159
  }
4160
4160
  };
@@ -4165,7 +4165,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
4165
4165
  [form]: {
4166
4166
  companyProofOfOwnershipDocument: {
4167
4167
  fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n"),
4168
- description: data[form]?.description
4168
+ description: data[form].description
4169
4169
  }
4170
4170
  }
4171
4171
  };
@@ -4178,8 +4178,8 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
4178
4178
  [form]: formatFinancialInformationSummary(
4179
4179
  data[form],
4180
4180
  language,
4181
- data?.basicInformation?.country,
4182
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
4181
+ data.basicInformation?.country,
4182
+ isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
4183
4183
  )
4184
4184
  };
4185
4185
  }
@@ -4202,22 +4202,20 @@ async function submitDocuments({
4202
4202
  const existingDoc = getDocument(legalEntity.id, doc.type);
4203
4203
  if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
4204
4204
  doc.attachments = mergeProofOfOwnershipAttachments(
4205
- existingDoc.attachments ?? [],
4205
+ existingDoc.attachments,
4206
4206
  doc.attachments
4207
4207
  ).filter((attachment) => attachment.pageName);
4208
4208
  }
4209
4209
  });
4210
4210
  try {
4211
- if (formattedDocument) {
4212
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
4213
- formattedDocument.forEach((doc) => {
4214
- userEvents?.addTaskEvent("Success", {
4215
- actionType: "upload",
4216
- documentType: doc.type,
4217
- fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
4218
- });
4211
+ await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
4212
+ formattedDocument.forEach((doc) => {
4213
+ userEvents.addTaskEvent("Success", {
4214
+ actionType: "upload",
4215
+ documentType: doc.type,
4216
+ fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
4219
4217
  });
4220
- }
4218
+ });
4221
4219
  } catch (err) {
4222
4220
  logger2.error(err);
4223
4221
  userEvents.addTaskEvent("Encountered error", {
@@ -4291,7 +4289,7 @@ async function submit({
4291
4289
  if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
4292
4290
  const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
4293
4291
  const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
4294
- const newRoles = nestedLegalEntityDetails2?.roles ?? [];
4292
+ const newRoles = nestedLegalEntityDetails2.roles;
4295
4293
  const rolesChanged = !doArraysMatch(existingRoles, newRoles);
4296
4294
  if (rolesChanged) {
4297
4295
  const updatedAssociations = {
@@ -4299,8 +4297,8 @@ async function submit({
4299
4297
  ...newRoles.map((role) => ({
4300
4298
  type: role,
4301
4299
  legalEntityId: legalEntity.id
4302
- })) || [],
4303
- ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
4300
+ })),
4301
+ ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id)
4304
4302
  ]
4305
4303
  };
4306
4304
  await handleUpdateLegalEntity({
@@ -4321,13 +4319,13 @@ async function submit({
4321
4319
  await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
4322
4320
  }
4323
4321
  };
4324
- const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema({
4322
+ const savedLegalEntityData = mapLegalEntityToBusinessDetailsSchema({
4325
4323
  legalEntity: legalEntityResponse,
4326
4324
  parentEntity: void 0,
4327
4325
  taskType
4328
- }) : null;
4329
- const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
4330
- if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
4326
+ });
4327
+ const filteredData = setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData);
4328
+ if (filteredData.additionalInformation && !filteredData.additionalInformation.taxInformation) {
4331
4329
  filteredData.additionalInformation.taxInformation = void 0;
4332
4330
  }
4333
4331
  const isCountryOfGoverningLawEnabled = isExperimentEnabled(
@@ -4335,9 +4333,9 @@ async function submit({
4335
4333
  );
4336
4334
  const countryOfGoverningLaw = getCountryOfGoverningLaw(
4337
4335
  isCountryOfGoverningLawEnabled,
4338
- filteredData?.basicInformation
4336
+ filteredData.basicInformation
4339
4337
  );
4340
- if (filteredData?.basicInformation) {
4338
+ if (filteredData.basicInformation) {
4341
4339
  if (countryOfGoverningLaw) {
4342
4340
  filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
4343
4341
  } else {
@@ -4403,9 +4401,9 @@ async function submit({
4403
4401
  legalEntityName: trackingPayload.legalEntityName
4404
4402
  };
4405
4403
  if (!hadRejection) {
4406
- userEvents?.addTaskEvent("Success", eventPayload);
4404
+ userEvents.addTaskEvent("Success", eventPayload);
4407
4405
  } else {
4408
- userEvents?.addTaskEvent("Encountered error", {
4406
+ userEvents.addTaskEvent("Encountered error", {
4409
4407
  ...eventPayload,
4410
4408
  returnType: "businessLines",
4411
4409
  returnValue: "couldNotCreateOrUpdateBusinessLine"
@@ -4452,7 +4450,7 @@ async function submit({
4452
4450
  forms,
4453
4451
  userEvents
4454
4452
  });
4455
- userEvents?.addTaskEvent("Success", trackingPayload);
4453
+ userEvents.addTaskEvent("Success", trackingPayload);
4456
4454
  showToast({
4457
4455
  label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
4458
4456
  variant: "success"
@@ -4466,7 +4464,7 @@ async function submit({
4466
4464
  label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
4467
4465
  variant: "error"
4468
4466
  });
4469
- const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
4467
+ const unmappedErrorNames = err.invalidFields.map((field) => field.name).filter(Boolean);
4470
4468
  if (unmappedErrorNames.length) {
4471
4469
  trackingPayload = {
4472
4470
  ...trackingPayload,
@@ -4494,7 +4492,7 @@ async function submit({
4494
4492
  });
4495
4493
  }
4496
4494
  logger2.error(err);
4497
- userEvents?.addTaskEvent("Encountered error", {
4495
+ userEvents.addTaskEvent("Encountered error", {
4498
4496
  ...trackingPayload,
4499
4497
  returnType: err?.errorCode,
4500
4498
  returnValue: err?.title || "backend"
@@ -4507,10 +4505,7 @@ const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) =>
4507
4505
  if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
4508
4506
  return void 0;
4509
4507
  }
4510
- if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
4511
- return CountryCodes.UnitedKingdom;
4512
- }
4513
- return basicData?.countryOfGoverningLaw;
4508
+ return !basicData.countryOfGoverningLaw ? CountryCodes.UnitedKingdom : basicData.countryOfGoverningLaw;
4514
4509
  };
4515
4510
  const determineCustomerSupport = (customerSupport, country) => {
4516
4511
  switch (country) {
@@ -4553,9 +4548,9 @@ function basicInformationValidators({
4553
4548
  countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
4554
4549
  legalCompanyName: resolveFieldMetadata(
4555
4550
  isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
4556
- { isBusiness: true },
4551
+ {},
4557
4552
  isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
4558
- )?.validators,
4553
+ ).validators,
4559
4554
  taxInformation: resolveFieldMetadata(
4560
4555
  taxInformationDefaultFieldConfig[country],
4561
4556
  {
@@ -4563,12 +4558,12 @@ function basicInformationValidators({
4563
4558
  companyType
4564
4559
  },
4565
4560
  taxInformationDefaultFieldMetadata
4566
- )?.validators,
4561
+ ).validators,
4567
4562
  stateOrProvince: resolveFieldMetadata(
4568
4563
  defaultFieldConfig[country],
4569
4564
  { isBusiness: true },
4570
4565
  defaultFieldMetadata
4571
- )?.validators,
4566
+ ).validators,
4572
4567
  registrationNumber: resolveFieldMetadata(
4573
4568
  registrationNumberDefaultFieldConfig[country],
4574
4569
  {
@@ -4578,7 +4573,7 @@ function basicInformationValidators({
4578
4573
  isExperimentEnabled
4579
4574
  },
4580
4575
  registrationNumberDefaultFieldMetadata
4581
- )?.validators
4576
+ ).validators
4582
4577
  };
4583
4578
  }
4584
4579
  function businessSelectionValidators() {
@@ -4610,7 +4605,7 @@ function additionalInformationValidators({
4610
4605
  isExperimentEnabled
4611
4606
  },
4612
4607
  registrationNumberDefaultFieldMetadata
4613
- )?.validators,
4608
+ ).validators,
4614
4609
  exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
4615
4610
  taxInformation: resolveFieldMetadata(
4616
4611
  taxInformationDefaultFieldConfig[country],
@@ -4794,8 +4789,8 @@ function BusinessDetailsDropin({
4794
4789
  const props = getPropsFromConfigurations({
4795
4790
  scenarioConfiguration: fieldConfigurations,
4796
4791
  forms: defaultForms,
4797
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
4798
- dataMissingErrors: problems?.missingData ?? [],
4792
+ remediationActions: problems.remediationActions ? Object.values(problems.remediationActions) : [],
4793
+ dataMissingErrors: problems.missingData ?? [],
4799
4794
  fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
4800
4795
  subjectEntity,
4801
4796
  solePropBusinessDetailsApiKeyMapping,
@@ -4814,15 +4809,15 @@ function BusinessDetailsDropin({
4814
4809
  customRules,
4815
4810
  defaultForms,
4816
4811
  subjectEntity,
4817
- problems?.missingData,
4818
- problems?.remediationActions,
4812
+ problems.missingData,
4813
+ problems.remediationActions,
4819
4814
  trustedFields,
4820
4815
  fieldConfigurations
4821
4816
  ]);
4822
4817
  const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
4823
- if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
4824
- setCountry(multiForm.data?.basicInformation?.country);
4825
- setPrevCountry(multiForm.data.basicInformation?.country);
4818
+ if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation.country) {
4819
+ setCountry(multiForm.data.basicInformation.country);
4820
+ setPrevCountry(multiForm.data.basicInformation.country);
4826
4821
  setTrustedFields(void 0);
4827
4822
  verifiedBusiness.value = void 0;
4828
4823
  tinMatched.value = void 0;
@@ -4955,14 +4950,14 @@ function BusinessDetailsDropin({
4955
4950
  tinMatched.value = false;
4956
4951
  };
4957
4952
  const companySearchQueryInput = {
4958
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
4959
- country: multiForm.data?.basicInformation?.country,
4960
- state: multiForm.data?.basicInformation?.stateOrProvince,
4961
- registrationNumber: multiForm.data?.basicInformation?.registrationNumber
4953
+ name: multiForm.data.basicInformation?.legalCompanyName ?? "",
4954
+ country: multiForm.data.basicInformation?.country,
4955
+ state: multiForm.data.basicInformation?.stateOrProvince,
4956
+ registrationNumber: multiForm.data.basicInformation?.registrationNumber
4962
4957
  };
4963
4958
  const verifyTinQueryInput = {
4964
4959
  name: multiForm.data.basicInformation?.legalCompanyName ?? "",
4965
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
4960
+ tin: multiForm.data.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
4966
4961
  };
4967
4962
  const {
4968
4963
  data: companySearchResponse,
@@ -4977,7 +4972,7 @@ function BusinessDetailsDropin({
4977
4972
  actionType: "submit",
4978
4973
  returnValue: "companySearch",
4979
4974
  additionalData: {
4980
- numberOfResults: companySearchResponse?.results.length
4975
+ numberOfResults: companySearchResponse.results.length
4981
4976
  }
4982
4977
  });
4983
4978
  }
@@ -4985,8 +4980,8 @@ function BusinessDetailsDropin({
4985
4980
  const companySelectionInput = {
4986
4981
  company: companySearchResponse?.results[0],
4987
4982
  state: multiForm.data.basicInformation?.stateOrProvince,
4988
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
4989
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
4983
+ name: multiForm.data.basicInformation?.legalCompanyName ?? "",
4984
+ tin: multiForm.data.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
4990
4985
  };
4991
4986
  useVerifyTin(verifyTinQueryInput, { enabled: false });
4992
4987
  const attemptBusinessSearch = async () => {
@@ -5020,19 +5015,19 @@ function BusinessDetailsDropin({
5020
5015
  }
5021
5016
  return tinMatched.value;
5022
5017
  };
5023
- if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
5024
- multiForm.data?.basicInformation?.legalCompanyName ?? "",
5018
+ if (searchResponse.results.length === 1 && isNormalizedStringMatch(
5019
+ multiForm.data.basicInformation?.legalCompanyName ?? "",
5025
5020
  searchResponse.results[0].name
5026
5021
  )) {
5027
5022
  const companySelectionResponse = await handleCompanySelection(
5028
- rootLegalEntityId.value,
5029
- baseUrl.value,
5023
+ rootLegalEntityId.peek(),
5024
+ baseUrl.peek(),
5030
5025
  { ...companySelectionInput, company: searchResponse.results[0] }
5031
5026
  );
5032
5027
  if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
5033
5028
  verifiedBusiness.value = companySelectionResponse;
5034
5029
  isVerifiedSingleCompanySearchResult.value = true;
5035
- applyVerifiedBusinessData(multiForm, country, verifiedBusiness.value);
5030
+ applyVerifiedBusinessData(multiForm, country, verifiedBusiness.peek());
5036
5031
  currentForms = updateForms({ searchResults: searchResponse.results });
5037
5032
  } else {
5038
5033
  return setLoadingStatus("success");
@@ -5042,7 +5037,7 @@ function BusinessDetailsDropin({
5042
5037
  const tinVerificationResponse = await queryClient.fetchQuery({
5043
5038
  queryKey: ["verifyTin", verifyTinQueryInput]
5044
5039
  });
5045
- if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
5040
+ if (!handleTinResponse(!!tinVerificationResponse.matched)) {
5046
5041
  return setLoadingStatus("success");
5047
5042
  }
5048
5043
  }
@@ -5176,7 +5171,7 @@ function useBusinessDetailsData(taskType, associatedLegalArrangement, nestedLega
5176
5171
  subjectEntity?.documentDetails || [],
5177
5172
  subjectEntity?.id || "",
5178
5173
  {
5179
- enabled: subjectEntity?.documentDetails && subjectEntity?.documentDetails.length > 0
5174
+ enabled: subjectEntity?.documentDetails && subjectEntity.documentDetails.length > 0
5180
5175
  }
5181
5176
  );
5182
5177
  useEffect(() => {