@adyen/kyc-components 4.0.0-compact.7 → 4.0.0-compact.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +31 -43
  2. package/dist/{AcceptTermsOfServiceComponent-BFqDontt.js → AcceptTermsOfServiceComponent-Y5aYfW8R.js} +31 -26
  3. package/dist/{AccountSetupRejected-f8rcBzZj.js → AccountSetupRejected-BBPH8zsy.js} +2 -5
  4. package/dist/{ActionBar-CijauUSe.js → ActionBar-CFMobUf9.js} +2 -2
  5. package/dist/{Address-Bj7zJ6yZ.js → Address-DaePmCRZ.js} +22 -25
  6. package/dist/{Avatar-DWU7t_0U.js → Avatar-CbD3nP3P.js} +2 -2
  7. package/dist/{BusinessFinancingComponent-_DvatBRp.js → BusinessFinancingComponent-BfmzIskz.js} +7 -7
  8. package/dist/{BusinessFinancingDropin-BuATaIOz.js → BusinessFinancingDropin-CLD8LAhP.js} +199 -160
  9. package/dist/BusinessFinancingPage-Bg-wKhhY.js +43 -0
  10. package/dist/{BusinessTypeSelectionPage-gsT7g7u8.js → BusinessTypeSelectionPage-D3EIjy_H.js} +11 -17
  11. package/dist/{Checkbox-5Sc5pzsh.js → Checkbox-DmYVTVOD.js} +2 -2
  12. package/dist/{Confirm-C0J_JwMM.js → Confirm-NubmSSR7.js} +3 -3
  13. package/dist/{ConstitutionalDocument-Bw5T0g5Q.js → ConstitutionalDocument-Djj_JCy4.js} +43 -30
  14. package/dist/{ContactDetails-CXTim9KR.js → ContactDetails-tNdzS3d4.js} +13 -10
  15. package/dist/{ContextGuidance-074d6FWy.js → ContextGuidance-Dp2PWG5c.js} +2 -3
  16. package/dist/{CountryField-DxZlK1rV.js → CountryField-C7SjQFv_.js} +4 -6
  17. package/dist/{CreateIndividualComponent-BppUrKMC.js → CreateIndividualComponent-DwOiAUaA.js} +8 -8
  18. package/dist/{CreateTransferInstrumentComponent-Cl2NOJb6.js → CreateTransferInstrumentComponent-D29rvuqv.js} +6 -6
  19. package/dist/{Currency-CIgj9KwH.js → Currency-B4udmJgX.js} +12 -18
  20. package/dist/{CustomerSupport-UenL9SqQ.js → CustomerSupport-CU3xoowB.js} +10 -11
  21. package/dist/{DebugModal-KXKodU9u.js → DebugModal-C7WSGJRZ.js} +10 -11
  22. package/dist/{DecisionMakerDetailsPage-Xwe1qYtH.js → DecisionMakerDetailsPage-C-mB9v5X.js} +10 -10
  23. package/dist/{DecisionMakers-CJDodZSl.js → DecisionMakers-AhL30Hnp.js} +114 -55
  24. package/dist/{Dropzone-kpihpy7N.js → Dropzone-B9NMiWRF.js} +4 -4
  25. package/dist/{EmbeddedStatus-BJjPDUeS.js → EmbeddedStatus-DkQk7orK.js} +3 -3
  26. package/dist/{EndStateLayout-Cx1NUGVq.js → EndStateLayout-DVisdSEd.js} +2 -2
  27. package/dist/{EntityAssociation-BtQeHZOq.js → EntityAssociation-BSnS5dP_.js} +5 -6
  28. package/dist/{EntityGuidanceStatus-DyMVy3R4.js → EntityGuidanceStatus-C2eFgLqN.js} +4 -4
  29. package/dist/{ErrorPanel-CAALFKmE.js → ErrorPanel-D4kO8XQ8.js} +11 -13
  30. package/dist/{Field-Bs7wGDqk.js → Field-CPoHG0G-.js} +3 -3
  31. package/dist/{FormNavigation-BtSvWPRY.js → FormNavigation-yD8USwyG.js} +3 -3
  32. package/dist/{Individual.rules-CP2tzjmO.js → Individual.rules-0EggSgTn.js} +16 -9
  33. package/dist/{IndividualDropin-xfXkDkrM.js → IndividualDropin-Eo9sxeBW.js} +692 -267
  34. package/dist/{InputDate-CLxqciJA.js → InputDate-BVYQZZuX.js} +2 -2
  35. package/dist/{InputText-BdCbTzL9.js → InputText-C55stM8O.js} +2 -2
  36. package/dist/{Introduction-BRWdnVv5.js → Introduction-CZ_-eIBj.js} +4 -4
  37. package/dist/{JpAddress-BSEenMj0.js → JpAddress-B3HjxunW.js} +12 -14
  38. package/dist/{LandingLayout-kl7TkBGx.js → LandingLayout-C_SbjQZA.js} +2 -3
  39. package/dist/{LegalCompanyNameField-DzAxAnD9.js → LegalCompanyNameField-DBiJbXem.js} +6 -6
  40. package/dist/{LegalRepresentativeDetailsPage--yY_D66i.js → LegalRepresentativeDetailsPage-DFKA0RAe.js} +6 -6
  41. package/dist/{Link-CXYU8cLY.js → Link-ru5UMRxt.js} +2 -2
  42. package/dist/{ListItem-HD5_HiQ2.js → ListItem-C6ALEoR-.js} +3 -3
  43. package/dist/{LoaderWrapper-C2PvjjQc.js → LoaderWrapper-BL7Hc_DC.js} +2 -2
  44. package/dist/{ManageIndividualComponent-BGaAbJjj.js → ManageIndividualComponent-CkybWipX.js} +5 -5
  45. package/dist/{ManageTermsOfServiceComponent-DFjaajE4.js → ManageTermsOfServiceComponent-Cgjagedl.js} +6 -6
  46. package/dist/{ManageTransferInstrumentComponent-Dndkwh_d.js → ManageTransferInstrumentComponent-DOpxzIzn.js} +16 -18
  47. package/dist/{MaskedInput-BSW18fxr.js → MaskedInput-1f16YE1z.js} +5 -5
  48. package/dist/{MaybeModal-xIjl3I31.js → MaybeModal-7NGTfxO6.js} +3 -3
  49. package/dist/{Modal-CZ-HuGUO.js → Modal-BMdWqd0Y.js} +15 -25
  50. package/dist/{Name-D6EhveoK.js → Name-BQWEKtu9.js} +5 -5
  51. package/dist/NewSummary-D-9PYaY6.js +60 -0
  52. package/dist/{OnboardingDropinComponent-CHtcVTHh.js → OnboardingDropinComponent-CxUcB7IU.js} +813 -121
  53. package/dist/{PayoutDetailsDropin-C2pNMAZS.js → PayoutDetailsDropin-DWqomQHU.js} +81 -190
  54. package/dist/PayoutDetailsPage-NIBSRWDA.js +55 -0
  55. package/dist/{RadioGroup-CxcIXYzs.js → RadioGroup-BuAX_NLA.js} +2 -2
  56. package/dist/{RadioGroupCard-Y214QWmQ.js → RadioGroupCard-Cbd_S6Fi.js} +2 -2
  57. package/dist/{Review-B2NCN4h_.js → Review-BjdQyMeU.js} +6 -8
  58. package/dist/{RootBusinessDetailsPage-hr5fLCIH.js → RootBusinessDetailsPage-CE9KIQRB.js} +6 -6
  59. package/dist/{RootBusinessLinesPage-DSna9haW.js → RootBusinessLinesPage-DYZETgKB.js} +129 -139
  60. package/dist/{RootIndividualDetailsPage-BItguz9n.js → RootIndividualDetailsPage-DCEHjEbR.js} +9 -10
  61. package/dist/{Select-DaCJsYNl.js → Select-seF9rM5K.js} +4 -4
  62. package/dist/{SignPCIComponent-C2YjBxQM.js → SignPCIComponent-CkaBa8MB.js} +18 -17
  63. package/dist/{SingpassSelection-B3ozCH9I.js → SingpassSelection-FctS_Rd2.js} +6 -6
  64. package/dist/{SoleProprietorshipPage-DIzzhgjr.js → SoleProprietorshipPage-BolUC48_.js} +5 -5
  65. package/dist/{SourceOfFundsPage-C3kXyE7G.js → SourceOfFundsPage-qPaoxTgM.js} +272 -103
  66. package/dist/{StepProgressIndicator-BSGlNU3K.js → StepProgressIndicator-DQIv4e4a.js} +2 -2
  67. package/dist/{StoreProvider-99-ewU62.js → StoreProvider-CBB99upB.js} +1032 -292
  68. package/dist/{StructuredList-CVMZBzwq.js → StructuredList-EKVbq_i3.js} +1 -1
  69. package/dist/{Summary-D0GcSMNn.js → Summary-C5uRwUKn.js} +28 -24
  70. package/dist/{TaxInformationField-BxQvx1zK.js → TaxInformationField-B7AVdVgf.js} +614 -634
  71. package/dist/{TaxReportingDropin-BqvAQH2c.js → TaxReportingDropin-C2dEK3ij.js} +15 -17
  72. package/dist/{TextArea-BjsWgkR-.js → TextArea-BbRKVKmP.js} +2 -2
  73. package/dist/{TileGroup-C-5-VREz.js → TileGroup-oKbh_YGv.js} +3 -3
  74. package/dist/{TrustDetailsPage-YROGiuFJ.js → TrustDetailsPage-BbQB4A5-.js} +129 -120
  75. package/dist/{TrustMemberCompanyPage-Z2EuqPEI.js → TrustMemberCompanyPage-CbRLAXBG.js} +7 -7
  76. package/dist/TrustMemberIndividualPage-BFRSkSas.js +64 -0
  77. package/dist/{TrustMemberRoleAndTypePage-BEOtdItr.js → TrustMemberRoleAndTypePage-pS7j8_f6.js} +35 -44
  78. package/dist/{TrustMembersOverview-GybHMIEU.js → TrustMembersOverview-aEVgO4Gr.js} +17 -21
  79. package/dist/{UnincorporatedPartnershipIndividualPage-BCYxSTlv.js → UnincorporatedPartnershipIndividualPage-DO7AXsP5.js} +6 -6
  80. package/dist/{UnincorporatedPartnershipMemberCompanyPage-Buez4OHl.js → UnincorporatedPartnershipMemberCompanyPage-qvOu17yc.js} +6 -6
  81. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-Cfpe0BuU.js → UnincorporatedPartnershipMemberRoleAndTypePage-reBMcz-Y.js} +15 -16
  82. package/dist/{UnincorporatedPartnershipMembersOverview-B3Vi088r.js → UnincorporatedPartnershipMembersOverview-B5YCchZY.js} +8 -12
  83. package/dist/{VerificationErrorAlert-C6_ewC7c.js → VerificationErrorAlert-BcntIwEo.js} +23 -4
  84. package/dist/{ViewVerificationStatusComponent-DpA4jlct.js → ViewVerificationStatusComponent-CrQahS3p.js} +3 -4
  85. package/dist/adyen-business-financing.js +3 -3
  86. package/dist/adyen-individual-configuration.js +3 -3
  87. package/dist/adyen-individual-status.js +3 -3
  88. package/dist/adyen-invited-decision-maker.js +87 -17
  89. package/dist/adyen-kyc-components.js +18 -47
  90. package/dist/adyen-onboarding.js +3 -3
  91. package/dist/adyen-terms-of-service-management.js +3 -3
  92. package/dist/adyen-terms-of-service-status.js +3 -3
  93. package/dist/adyen-transfer-instrument-configuration.js +3 -3
  94. package/dist/adyen-transfer-instrument-management.js +3 -3
  95. package/dist/adyen-verification-status.js +3 -3
  96. package/dist/{bafinUtils-CIGv_BK8.js → bafinUtils-B1LygAFl.js} +14 -2
  97. package/dist/{commonValidators-DTt6he7v.js → commonValidators-CInBRB1V.js} +2 -2
  98. package/dist/{da-DK-JHZnsI59.js → da-DK-BfsYpvel.js} +18 -3
  99. package/dist/{da-DK-CGWvmdkq.js → da-DK-CLdNh9JT.js} +1 -2
  100. package/dist/{da-DK-gnPgzwrG.js → da-DK-CM1onr3w.js} +3 -1
  101. package/dist/{da-DK-Cd5IQPv3.js → da-DK-CMVthpSr.js} +2 -2
  102. package/dist/da-DK-Cv6XUSoW.js +13 -0
  103. package/dist/da-DK-D9FgPh5e.js +13 -0
  104. package/dist/{da-DK-h8DYQ_Iq.js → da-DK-mUuPR2YO.js} +2 -2
  105. package/dist/{de-DE-C9NH2zMh.js → de-DE-B5TOuf7l.js} +2 -2
  106. package/dist/{de-DE-DHDJhahG.js → de-DE-BT5g7ZXC.js} +1 -2
  107. package/dist/de-DE-BplDsJEb.js +13 -0
  108. package/dist/{de-DE-D3lLuF8z.js → de-DE-CA4mYLwp.js} +3 -1
  109. package/dist/{de-DE-VGGEkxUT.js → de-DE-CEsDXBn-.js} +18 -3
  110. package/dist/de-DE-Cg_RNIr-.js +13 -0
  111. package/dist/{de-DE-LQE_LFFL.js → de-DE-CwT6O212.js} +2 -2
  112. package/dist/{dropinUtils--st1YpV6.js → dropinUtils-D44Paj5u.js} +30 -16
  113. package/dist/{en-US-h0JneJJl.js → en-US--1W760fR.js} +2 -2
  114. package/dist/{en-US-CjjPhkB5.js → en-US-B-qSAb-7.js} +2 -1
  115. package/dist/en-US-B6tiYqel.js +13 -0
  116. package/dist/en-US-CfazE4ht.js +13 -0
  117. package/dist/{en-US-DoiQhi0j.js → en-US-CgakND3H.js} +1 -2
  118. package/dist/{en-US-D1sB335h.js → en-US-DIlZD5Wh.js} +16 -1
  119. package/dist/{en-US-DYP6rAvA.js → en-US-G607HIyo.js} +2 -2
  120. package/dist/{en-US-B96dpVon.js → en-US-fDACdKtT.js} +3 -1
  121. package/dist/{en-US.instructions-Ddr7AO05.js → en-US.instructions-CfIM2SRF.js} +1 -2
  122. package/dist/{es-ES-CxnsKEh4.js → es-ES-4FS7NoE7.js} +1 -2
  123. package/dist/{es-ES-CXDJLKAI.js → es-ES-BBcx4tvi.js} +3 -1
  124. package/dist/{es-ES-Bn9_0wK0.js → es-ES-BWFP5itn.js} +18 -3
  125. package/dist/es-ES-BZiC4JWr.js +13 -0
  126. package/dist/{es-ES-DdGmXdxO.js → es-ES-Bh8k9Zx8.js} +2 -2
  127. package/dist/es-ES-DRsix_Xn.js +13 -0
  128. package/dist/{es-ES-DK-7qtDf.js → es-ES-Wcpc6fm1.js} +2 -2
  129. package/dist/{fi-FI-fArobrt5.js → fi-FI-BKu826v5.js} +3 -1
  130. package/dist/fi-FI-BftTiz0c.js +13 -0
  131. package/dist/fi-FI-CEH4BfU3.js +13 -0
  132. package/dist/{fi-FI-PVFqd5Ra.js → fi-FI-DenK0WPz.js} +18 -3
  133. package/dist/{fi-FI-CIYa9SyS.js → fi-FI-DhUeTfn1.js} +2 -2
  134. package/dist/{fi-FI-57-xkioo.js → fi-FI-XpnJRPgt.js} +1 -2
  135. package/dist/{formUtils-C_sWWLS3.js → formUtils-BEcbGHkz.js} +3 -18
  136. package/dist/{fr-FR-mJK4hjwD.js → fr-FR-BmTswZU5.js} +18 -3
  137. package/dist/fr-FR-C6jxjXAI.js +13 -0
  138. package/dist/{fr-FR-CiwkAb3E.js → fr-FR-C7iSS-OS.js} +3 -1
  139. package/dist/{fr-FR-l5z31r7i.js → fr-FR-CocDMzBc.js} +2 -2
  140. package/dist/{fr-FR-B2je0smB.js → fr-FR-DodNoPid.js} +2 -2
  141. package/dist/fr-FR-NxOktkWc.js +13 -0
  142. package/dist/{fr-FR-BxiX8Zfi.js → fr-FR-TqAhPvzz.js} +1 -2
  143. package/dist/{getName-CnZDw7kV.js → getName-CdgtxRvu.js} +2 -2
  144. package/dist/{getProblemsForEntity-D8qEVVOM.js → getProblemsForEntity-DFP6N3co.js} +2 -2
  145. package/dist/{iframeWidget-DqeucjDU.js → iframeWidget-B0fieiAe.js} +4 -4
  146. package/dist/{isEmpty-CUuXL9Na.js → isEmpty-3U9fSQsY.js} +2 -2
  147. package/dist/{it-IT-BAvmkEF8.js → it-IT-B4bk2Xev.js} +2 -2
  148. package/dist/{it-IT-DIbH-udG.js → it-IT-CUrn0j1I.js} +3 -1
  149. package/dist/it-IT-CXlaZNIj.js +13 -0
  150. package/dist/{it-IT-Dhwa9Ecj.js → it-IT-CZ4aDoVQ.js} +2 -2
  151. package/dist/{it-IT-masgjk9F.js → it-IT-D-jYXj6V.js} +1 -2
  152. package/dist/{it-IT-BTWkWSJq.js → it-IT-DJe5OflH.js} +18 -3
  153. package/dist/it-IT-OppZz3gW.js +13 -0
  154. package/dist/{ja-JP-vv3-YsHU.js → ja-JP-8yMqZqF2.js} +1 -2
  155. package/dist/ja-JP-A6ArIIZ8.js +13 -0
  156. package/dist/{ja-JP-Bc4U0S8-.js → ja-JP-BpeNsNhn.js} +3 -3
  157. package/dist/{ja-JP-bz7ekGnF.js → ja-JP-CbP1sVFP.js} +4 -2
  158. package/dist/ja-JP-CethQRoG.js +13 -0
  159. package/dist/{ja-JP-g6VOUGXZ.js → ja-JP-DK55NCZY.js} +1 -2
  160. package/dist/{ja-JP-CceCDXLB.js → ja-JP-GGV_-V6p.js} +18 -3
  161. package/dist/{ja-JP-Bv3ru9Xq.js → ja-JP-GX3l4yqn.js} +17 -17
  162. package/dist/{japanSupportUtils-CGWcXGP2.js → japanSupportUtils-CaeglTl1.js} +2 -2
  163. package/dist/{localizeDateString-D6tFShQu.js → localizeDateString-D2nDwdFu.js} +2 -2
  164. package/dist/{mapExistingFile-BM9f5AeG.js → mapExistingFile-BigOdLU3.js} +4 -4
  165. package/dist/mapJpAddressSchemaToAddressLocalizations-DUoJIoRm.js +54 -0
  166. package/dist/{mapLegalEntityToIndividualSchema-DVKTWyvx.js → mapLegalEntityToIndividualSchema-UVUkctdQ.js} +43 -45
  167. package/dist/{mapTransferInstrumentToPayoutAccount--gtugk3J.js → mapTransferInstrumentToPayoutAccount-qpUP3sTf.js} +2 -2
  168. package/dist/{nl-NL-CTf7zH4M.js → nl-NL-4Mv4rnYy.js} +18 -3
  169. package/dist/{nl-NL-B0fvINJj.js → nl-NL-B2Uku0lw.js} +2 -2
  170. package/dist/nl-NL-BwWFlBOs.js +13 -0
  171. package/dist/nl-NL-CYFznuWn.js +13 -0
  172. package/dist/{nl-NL-DV4NqPVW.js → nl-NL-J7XpCpQm.js} +2 -2
  173. package/dist/{nl-NL-D1b5RUJ0.js → nl-NL-Jhr-ICkK.js} +1 -2
  174. package/dist/{nl-NL-NlkjOSYi.js → nl-NL-Lo8OF_nj.js} +3 -1
  175. package/dist/{no-NO-Crlsj6HG.js → no-NO-6chPsZZE.js} +3 -1
  176. package/dist/{no-NO-Dkh4SWbB.js → no-NO-BH6DId3q.js} +1 -2
  177. package/dist/no-NO-BsEie1We.js +13 -0
  178. package/dist/{no-NO-RfTK9KAV.js → no-NO-ByCZ3mhz.js} +18 -3
  179. package/dist/{no-NO-B9618F4_.js → no-NO-CtDyNTm6.js} +2 -2
  180. package/dist/{no-NO-Jw7Gae-a.js → no-NO-DjOcJWnC.js} +2 -2
  181. package/dist/no-NO-JWsSd7iY.js +13 -0
  182. package/dist/{patternValidators-vYKnE5-t.js → patternValidators-BkY5yvNa.js} +2 -2
  183. package/dist/{process-field-configurations-Dl2Isz78.js → process-field-configurations-BnIbMyYt.js} +5 -5
  184. package/dist/{pt-BR-BRdIEO2O.js → pt-BR-4Iozxvfr.js} +1 -2
  185. package/dist/pt-BR-BJOww8U1.js +13 -0
  186. package/dist/{pt-BR-BaTE6BB_.js → pt-BR-BKdT0Bpl.js} +2 -2
  187. package/dist/pt-BR-C-YbDjn-.js +13 -0
  188. package/dist/{pt-BR-zuqB_CBf.js → pt-BR-D4BTdo_w.js} +2 -2
  189. package/dist/{pt-BR-BfxgHKY4.js → pt-BR-DRBFUW-X.js} +3 -1
  190. package/dist/{pt-BR-BbFJsIVX.js → pt-BR-DRz5cG4o.js} +18 -3
  191. package/dist/{resolveEnvironment-B_JokQ0n.js → resolveEnvironment-C5RkjL5E.js} +5 -5
  192. package/dist/{roleMetadata-eM6T7GeQ.js → roleMetadata-C8VLzyMj.js} +3 -3
  193. package/dist/sl-SI-BfO3xEJx.js +13 -0
  194. package/dist/sl-SI-CJH14wbj.js +13 -0
  195. package/dist/{sl-SI-59OQIZ3f.js → sl-SI-C_4ajjU4.js} +2 -2
  196. package/dist/{sl-SI-D8dDckrW.js → sl-SI-DKSu25rO.js} +18 -3
  197. package/dist/{sl-SI-C-C-KJCX.js → sl-SI-UFngWs5n.js} +3 -1
  198. package/dist/{sl-SI-CvUzNn9Z.js → sl-SI-Y9h1ht45.js} +1 -2
  199. package/dist/style.css +1868 -1836
  200. package/dist/styles-CLV89_hH.js +1868 -1836
  201. package/dist/{sv-SE-D_Efxy3s.js → sv-SE-Blw4s8bC.js} +2 -2
  202. package/dist/sv-SE-CMLKzwtj.js +13 -0
  203. package/dist/{sv-SE-DGpvVvWj.js → sv-SE-Co7Nkd06.js} +18 -3
  204. package/dist/{sv-SE-BHfydid5.js → sv-SE-Cr0s35EH.js} +3 -1
  205. package/dist/{sv-SE-BsLkPEzn.js → sv-SE-DFSm22oQ.js} +1 -2
  206. package/dist/{sv-SE-CQWBP7n1.js → sv-SE-DKnUr7xo.js} +2 -2
  207. package/dist/sv-SE-ZsucW_Uj.js +13 -0
  208. package/dist/{isNewEntity-7Vw_eQBr.js → trusted-fields-provider-BgfIoSNJ.js} +6 -3
  209. package/dist/types/api/companyDataSet/companyDataset.types.d.ts +5 -0
  210. package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +6 -3
  211. package/dist/types/api/companySearch/companySearch.types.d.ts +8 -0
  212. package/dist/types/api/companySearch/useCompanySearch.d.ts +9 -3
  213. package/dist/types/api/companySelection/companySelection.types.d.ts +3 -3
  214. package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
  215. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +1 -0
  216. package/dist/types/api/invitations/invitations.types.d.ts +14 -0
  217. package/dist/types/api/invitations/useCreateInvitation.d.ts +14 -0
  218. package/dist/types/api/invitations/useInvitationStatuses.d.ts +8 -0
  219. package/dist/types/api/invitedEntity/useInvitedEntityAssociationData.d.ts +9 -0
  220. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +4 -4
  221. package/dist/types/api/queryKeys.d.ts +4 -1
  222. package/dist/types/api/toggles/useToggles.d.ts +9 -0
  223. package/dist/types/components/Apps/tasks/TaskList/types.d.ts +2 -2
  224. package/dist/types/components/BankAccount/fields/BankAccountNumber/BankAccountNumber.d.ts +1 -1
  225. package/dist/types/components/BankAccount/fields/BankCode/BankCode.d.ts +1 -1
  226. package/dist/types/components/BankAccount/fields/BranchCode/BranchCode.d.ts +1 -1
  227. package/dist/types/components/BankAccount/fields/Iban/Iban.d.ts +1 -1
  228. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
  229. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
  230. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +2 -2
  231. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +0 -1
  232. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  233. package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard/VerifiedBusinessCard.d.ts +2 -2
  234. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +2 -2
  235. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
  236. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +7 -7
  237. package/dist/types/components/Business/forms/FinancialInformation/FinancialInformation.d.ts +1 -1
  238. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  239. package/dist/types/components/Business/forms/FinancialInformation/types.d.ts +7 -17
  240. package/dist/types/components/Business/forms/rules.d.ts +10 -8
  241. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +14 -1
  242. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -6
  243. package/dist/types/components/Business/tasks/BusinessDetailsDropin/validate.d.ts +2 -1
  244. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +1 -1
  245. package/dist/types/components/Business/utils/companyUtil.d.ts +1 -1
  246. package/dist/types/components/Business/utils/formatDataForSummary.d.ts +6 -0
  247. package/dist/types/components/Business/utils/submit.d.ts +2 -0
  248. package/dist/types/components/Business/utils/useCompanySearchExperiments.d.ts +5 -0
  249. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
  250. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +1 -1
  251. package/dist/types/components/BusinessLines/tasks/utils.d.ts +4 -4
  252. package/dist/types/components/Contract/tasks/PciDropin/PciDropin.d.ts +1 -1
  253. package/dist/types/components/EFP/fields/NaceCodeField/types.d.ts +1 -1
  254. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +2783 -2783
  255. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +1 -1
  256. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSummary.d.ts +14 -0
  257. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +5 -7
  258. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +8 -9
  259. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +1 -1
  260. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +11 -0
  261. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +15 -0
  262. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +1 -2
  263. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
  264. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.d.ts +1 -1
  265. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -0
  266. package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +1 -1
  267. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +2 -2
  268. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +5 -4
  269. package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +2 -2
  270. package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +6 -6
  271. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +2 -2
  272. package/dist/types/components/Individual/forms/IdVerificationMethod/{individualOnfidoConflictsSchema.d.ts → individualConflictsSchema.d.ts} +12 -12
  273. package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +2 -2
  274. package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +2 -2
  275. package/dist/types/components/Individual/forms/Individual.d.ts +12 -7
  276. package/dist/types/components/Individual/forms/Individual.rules.d.ts +6 -5
  277. package/dist/types/components/Individual/forms/Individual.types.d.ts +15 -5
  278. package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.d.ts +4 -0
  279. package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.types.d.ts +13 -0
  280. package/dist/types/components/Individual/forms/InviteDetails/validate.d.ts +3 -0
  281. package/dist/types/components/Individual/forms/form-ids.d.ts +2 -2
  282. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +2 -2
  283. package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -2
  284. package/dist/types/components/Individual/helpers/roleUtils.d.ts +2 -2
  285. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -6
  286. package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
  287. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -2
  288. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
  289. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +2 -2
  290. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -2
  291. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
  292. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
  293. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +3 -3
  294. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerListItem/DecisionMakerListItem.d.ts +8 -0
  295. package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerGettingStarted/InvitedDecisionMakerGettingStarted.d.ts +4 -0
  296. package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerSubmitSuccess/InvitedDecisionMakerSubmitSuccess.d.ts +1 -0
  297. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
  298. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
  299. package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
  300. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -0
  301. package/dist/types/components/Shared/FormNavigation/types.d.ts +2 -2
  302. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
  303. package/dist/types/components/Shared/NewSummary/NewSummary.d.ts +14 -0
  304. package/dist/types/components/Shared/Summary/Summary.d.ts +1 -0
  305. package/dist/types/components/Shared/TaskVerificationStatus/TaskVerificationStatus.d.ts +1 -1
  306. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  307. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +0 -2
  308. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +3 -1
  309. package/dist/types/components/Shared/fields/Currency/fieldConfig.d.ts +3 -0
  310. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  311. package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
  312. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  313. package/dist/types/components/Shared/fields/FinancialReportingDate/fieldConfig.d.ts +3 -0
  314. package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +2 -2
  315. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
  316. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +5 -244
  317. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  318. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
  319. package/dist/types/components/Shared/fields/NumberOfEmployees/fieldConfig.d.ts +3 -0
  320. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  321. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -0
  322. package/dist/types/components/Shared/fields/ReportedValueOptionField/ReportedValueOptionField.d.ts +3 -0
  323. package/dist/types/components/Shared/fields/ReportedValueOptionField/fieldConfig.d.ts +5 -0
  324. package/dist/types/components/Shared/fields/ReportedValueOptionField/types.d.ts +10 -0
  325. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  326. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  327. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  328. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  329. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  330. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  331. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.d.ts +17 -0
  332. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/getDefaultTaxIdNumberType.d.ts +5 -5
  333. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/inferTaxIdNumberType.d.ts +5 -5
  334. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
  335. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +2 -3
  336. package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +232 -0
  337. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +9 -1
  338. package/dist/types/components/Shared/fields/TaxInformationField/utils.d.ts +13 -0
  339. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  340. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
  341. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +5 -0
  342. package/dist/types/components/Shared/forms/Address/types.d.ts +5 -5
  343. package/dist/types/components/Shared/forms/Address/utils.d.ts +6 -1
  344. package/dist/types/components/Shared/forms/Address/validate.d.ts +4 -4
  345. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +6 -6
  346. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +2 -2
  347. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +2 -2
  348. package/dist/types/components/Trust/forms/Trust/rules.d.ts +5 -4
  349. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +2 -2
  350. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +1 -1
  351. package/dist/types/components/Trust/utils/trustMemberGuidance.d.ts +2 -2
  352. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +2 -2
  353. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +2 -2
  354. package/dist/types/components/ui/atoms/Icon/Icon.d.ts +1 -1
  355. package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +2 -2
  356. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
  357. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -4
  358. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +0 -4
  359. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -2
  360. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +2 -2
  361. package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +1 -1
  362. package/dist/types/context/ExperimentContext/types.d.ts +9 -7
  363. package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +4 -0
  364. package/dist/types/context/FormRouterContext/useFormRouterContext.d.ts +3 -0
  365. package/dist/types/context/StateContext/types.d.ts +2 -2
  366. package/dist/types/core/models/api/financialReport.d.ts +7 -1
  367. package/dist/types/core/models/api/legal-entity.d.ts +1 -6
  368. package/dist/types/core/models/api/organization.d.ts +1 -1
  369. package/dist/types/core/user-events.d.ts +1 -1
  370. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +5 -0
  371. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +7 -2
  372. package/dist/types/embeds/individual-status/adyen-individual-status.types.d.ts +5 -0
  373. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +5 -0
  374. package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +5 -0
  375. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.types.d.ts +5 -0
  376. package/dist/types/embeds/terms-of-service-status/adyen-terms-of-service-status.types.d.ts +5 -0
  377. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.types.d.ts +5 -0
  378. package/dist/types/embeds/transfer-instrument-management/adyen-transfer-instrument-management.types.d.ts +5 -0
  379. package/dist/types/embeds/verification-status/adyen-verification-status.types.d.ts +5 -0
  380. package/dist/types/hooks/useForm/types.d.ts +3 -6
  381. package/dist/types/hooks/useUboQuestionnaire.d.ts +1 -1
  382. package/dist/types/language/types.d.ts +3 -15
  383. package/dist/types/language/utils.d.ts +6 -5
  384. package/dist/types/stores/formState.d.ts +2 -2
  385. package/dist/types/stores/globalStore/get-task-status.d.ts +6 -0
  386. package/dist/types/types/errors/error-message.d.ts +2 -2
  387. package/dist/types/types/errors/remediation.d.ts +2 -2
  388. package/dist/types/types/form-configuration.d.ts +2 -2
  389. package/dist/types/types/form.d.ts +2 -2
  390. package/dist/types/utils/decisionMaker.d.ts +2 -2
  391. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  392. package/dist/types/utils/fieldConfigurations.d.ts +6 -6
  393. package/dist/types/utils/formUtils.d.ts +5 -6
  394. package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
  395. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -2
  396. package/dist/types/utils/not.d.ts +12 -0
  397. package/dist/types/utils/roleMetadata.d.ts +4 -4
  398. package/dist/types/utils/textTransformation/toFullWidth.d.ts +2 -3
  399. package/dist/types/utils/validatorUtils.d.ts +1 -0
  400. package/dist/types-CQ2p58-6.js +36 -0
  401. package/dist/{types-C8io4KaH.js → types-CcxS0801.js} +2 -2
  402. package/dist/{types-DwXc_yI8.js → types-DcouFF7I.js} +2 -2
  403. package/dist/{types-B7GElie6.js → types-_ugkpUNx.js} +11 -9
  404. package/dist/{types-BQL9Lsg4.js → types-vXKpLHZM.js} +2 -2
  405. package/dist/{Image-CAucF9wz.js → unincorporated-partnership-QawJyhxx.js} +8 -7
  406. package/dist/{useAssociatedLegalEntity-ETDoz1H2.js → useAssociatedLegalEntity-DXp9udzH.js} +2 -2
  407. package/dist/{useBusinessDetailsData-FrL0b9Ni.js → useBusinessDetailsData-CgfVRRNG.js} +1090 -917
  408. package/dist/{useCreateLegalEntity-DrcLoNYT.js → useCreateLegalEntity-C5daQcez.js} +2 -2
  409. package/dist/{useForm-DqUW2TbW.js → useForm-BQDytQRR.js} +3 -3
  410. package/dist/{useFormContext-CkuaJPUI.js → useFormContext-CX6rQNws.js} +9 -8
  411. package/dist/{FormWrapper-B3N3YosC.js → useGlobalData-xVRfhIqc.js} +66 -11
  412. package/dist/{useMultiForm-Dm2IEMH9.js → useMultiForm-DRZSxmEa.js} +12 -6
  413. package/dist/{useOnboardingStatus-H7Xqe2GC.js → useOnboardingStatus-C6X8CPF2.js} +2 -2
  414. package/dist/{useScenarios-CibP5LVa.js → useScenarios-C5uruC52.js} +2 -2
  415. package/dist/{useTermsOfServiceStatus-Dg_nBQgt.js → useTermsOfServiceStatus-CABu0vXO.js} +2 -2
  416. package/dist/{useToastContext-D643iewp.js → useToastContext-C2BAjZxO.js} +2 -2
  417. package/dist/{useUnincorporatedPartnershipMembers-BM9dNg4i.js → useUnincorporatedPartnershipMembers-Duhfzca2.js} +5 -5
  418. package/dist/{useUpdateBusinessLines-BuW6Vnof.js → useUpdateBusinessLines-CFgADcSW.js} +5 -5
  419. package/dist/{useUpdateLegalEntity-tRw1V_Mt.js → useUpdateLegalEntity-vK1vTzAB.js} +3 -3
  420. package/dist/{utils-D9h2Aq2w.js → utils-Bh3VtXaW.js} +55 -22
  421. package/dist/{utils-BnolcW6V.js → utils-Bo1WrnnM.js} +6 -6
  422. package/dist/{utils-BasWTkqk.js → utils-BvFIL5qs.js} +22 -2
  423. package/dist/{utils-b_KUV0wb.js → utils-HUgTKRia.js} +2 -2
  424. package/dist/{utils-PkTZS9uf.js → utils-nUjUW0ze.js} +2 -2
  425. package/dist/{validate-K0fmvoFj.js → validate-CDGLD3wC.js} +24 -12
  426. package/dist/{validate-CtxacqMv.js → validate-DDCTmBf4.js} +5 -5
  427. package/dist/{validationError-DdlWONz2.js → validationError-DmAD3_AN.js} +3 -3
  428. package/package.json +35 -53
  429. package/dist/Accordion-B2vSnESS.js +0 -88
  430. package/dist/Alert-CFmX9yNV.js +0 -169
  431. package/dist/BusinessFinancingPage-Bpu78Ynn.js +0 -43
  432. package/dist/DropinLayout-CBP_cHLC.js +0 -17
  433. package/dist/Header-vslG1ugE.js +0 -83
  434. package/dist/TaskVerificationStatus-DZIw2ztV.js +0 -129
  435. package/dist/TrustMemberIndividualPage-DmNp3D89.js +0 -64
  436. package/dist/accountHolderUtils-Btu9mMnM.js +0 -66
  437. package/dist/company-types-value-D_mKv5PT.js +0 -23
  438. package/dist/da-DK-DvZ431fC.js +0 -13
  439. package/dist/da-DK-DzcTI92X.js +0 -13
  440. package/dist/datasetUtil-BHQp0-xL.js +0 -58
  441. package/dist/de-DE-0uSzhWg5.js +0 -13
  442. package/dist/de-DE-dPfrbCii.js +0 -13
  443. package/dist/en-US-CozY33On.js +0 -13
  444. package/dist/en-US-cVpRgdC8.js +0 -13
  445. package/dist/es-ES--IvNed_Q.js +0 -13
  446. package/dist/es-ES-B7dt4cn7.js +0 -13
  447. package/dist/fi-FI-BUixKfXH.js +0 -13
  448. package/dist/fi-FI-REMsyTSr.js +0 -13
  449. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +0 -30
  450. package/dist/fr-FR-BM-qNLci.js +0 -13
  451. package/dist/fr-FR-CvHWmim-.js +0 -13
  452. package/dist/getTrustedFields-C5-mXl-l.js +0 -64
  453. package/dist/it-IT-BeX7-OcD.js +0 -13
  454. package/dist/it-IT-D63gRTDc.js +0 -13
  455. package/dist/ja-JP-B3wVYIJU.js +0 -151
  456. package/dist/ja-JP-DL0IjTzn.js +0 -13
  457. package/dist/mapJpAddressSchemaToAddressLocalizations-Cu4hdrYE.js +0 -162
  458. package/dist/nl-NL-CM5U8ODq.js +0 -13
  459. package/dist/nl-NL-KQ6bciOb.js +0 -13
  460. package/dist/no-NO-BQL_M1pn.js +0 -13
  461. package/dist/no-NO-Ds3VioxT.js +0 -13
  462. package/dist/pt-BR-AZ3roErF.js +0 -13
  463. package/dist/pt-BR-Ct4s4jXV.js +0 -13
  464. package/dist/sl-SI-C0wSbuau.js +0 -13
  465. package/dist/sl-SI-hxwQIw_i.js +0 -13
  466. package/dist/sv-SE-0PQ-U1u6.js +0 -13
  467. package/dist/sv-SE-DtKjf4Go.js +0 -13
  468. package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
  469. package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +0 -23
  470. package/dist/unincorporated-partnership-MeN1dp53.js +0 -97
  471. package/dist/useBusinessLines-C5NQ5pE8.js +0 -29
  472. package/dist/useCanSeeIntroduction-BdZJ7k-_.js +0 -48
  473. package/dist/useDataMissingRemediations-Zgtpw7uZ.js +0 -41
  474. package/dist/useDataset-Cap5ZjTr.js +0 -76
  475. package/dist/useDeleteTransferInstrument-B2wRj-qL.js +0 -32
  476. package/dist/useGlobalData-5Z6W3or1.js +0 -68
  477. package/dist/useNavigate-CI0N-POy.js +0 -265
  478. package/dist/usePciQuestionnaireList-BF7TPjbQ.js +0 -29
  479. package/dist/useSalesChannels-DYGRfKeh.js +0 -65
  480. package/dist/useSetting-CbBaitp6.js +0 -19
  481. package/dist/useTaskStatus-1OZ2clnm.js +0 -51
  482. package/dist/useTrustMembers-BTCDIu6B.js +0 -163
  483. /package/dist/types/components/{Business/forms/FinancialInformation → Shared/fields/ReportedValueOptionField}/ReportedValue.d.ts +0 -0
@@ -2,75 +2,69 @@
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] = "56364b98-55ba-4e04-8f12-d2e57f40bc8b", e._sentryDebugIdIdentifier = "sentry-dbid-56364b98-55ba-4e04-8f12-d2e57f40bc8b");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1c12032c-5f3e-4a39-b472-402db1745b1b", e._sentryDebugIdIdentifier = "sentry-dbid-1c12032c-5f3e-4a39-b472-402db1745b1b");
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 { 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-BuW6Vnof.js";
14
- import { u as useScenarios } from "./useScenarios-CibP5LVa.js";
15
- import { u as useCreateLegalEntity } from "./useCreateLegalEntity-DrcLoNYT.js";
16
- import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-tRw1V_Mt.js";
17
- import { u as useTranslation, bt as isISIN, V as Button, v as useExperimentsContext, c as useLegalEntity, R as ROOT_LE, z as Typography, L as Loader, a0 as CountryCodes, B as useSettingsContext, b as useApiContext, $ as httpPost, ac as entriesOf, p as useAnalyticsContext, a3 as createLogger, m as useAccountHolder, aa as useI18nContext, ai as isEmpty, i as isUndefinedOrNull, j as TaskTypes, o as LegalEntityTypes, bu as businessDetailsComponentsKeyMapping, bv as solePropBusinessDetailsKeyMapping, a6 as objectsDeepEqual, aD as keysOf, bw as solePropBusinessDetailsApiKeyMapping, b4 as businessDetailsApiKeyMapping, ay as Scenarios, aJ as filterOutUnwantedAssociationsIfRootLE, aH as drop, ae as getOwnEntityAssociations, aO as doArraysMatch, bx as solePropBusinessDetailsDocumentMapping, by as businessDetailsDocumentMapping } from "./StoreProvider-99-ewU62.js";
18
- import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-CkuaJPUI.js";
19
- import { u as useToastContext } from "./useToastContext-D643iewp.js";
20
- import { C as CompanyTypesValues } from "./company-types-value-D_mKv5PT.js";
21
- import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-Dl2Isz78.js";
22
- import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils--st1YpV6.js";
23
- import { u as useMultiForm } from "./useMultiForm-Dm2IEMH9.js";
24
- import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-BM9f5AeG.js";
25
- import { C as Confirm } from "./Confirm-C0J_JwMM.js";
26
- import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-CtxacqMv.js";
27
- 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, f as getTaxInformationPlaceholderText, S as StateCodesUS, h as isUsingCompanySearch, M as MemoizedDocumentUpload, j as isRegistrationNumberAbsentStateV4Scenario, k as getTaxIdNumberOptions, l as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, m as getCompanyRegistrationNumberOptions, n as countryToTaxInfoTypeMap, o as rules, g as getFieldsWithExistingData } from "./TaxInformationField-BxQvx1zK.js";
28
- import { u as usePageLandedEvent, s as summaryStep } from "./Summary-D0GcSMNn.js";
29
- 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, a as defaultFieldConfig, 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-Bw5T0g5Q.js";
30
- import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-CZ-HuGUO.js";
31
- import { S as SettingNames } from "./TaskVerificationStatus-DZIw2ztV.js";
32
- import { t as toFullWidth, u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-Cu4hdrYE.js";
33
- import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-BasWTkqk.js";
34
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-BnolcW6V.js";
35
- import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-DdlWONz2.js";
36
- import { a as datasetUtilities } from "./datasetUtil-BHQp0-xL.js";
12
+ import { useState, useMemo, useEffect, useRef, 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-CFgADcSW.js";
14
+ import { u as useScenarios } from "./useScenarios-C5uruC52.js";
15
+ import { u as useCreateLegalEntity } from "./useCreateLegalEntity-C5daQcez.js";
16
+ import { u as useToastContext, a as useInvalidateRootLegalEntity } from "./useToastContext-C2BAjZxO.js";
17
+ import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-vK1vTzAB.js";
18
+ import { u as useTranslation, bH as isISIN, W as Button, J as useExperimentsContext, R as useLegalEntity, U as ROOT_LE, am as datasetUtilities, aB as Header, O as Typography, V as Loader, aa as CountryCodes, k as useSettingsContext, aN as useAllowedCountries, b as useApiContext, h as httpPost, P as StackLayout, G as Alert, ao as entriesOf, z as useAnalyticsContext, m as createLogger, v as useAccountHolder, y as TaskTypes, L as LegalEntityTypes, ax as isEmpty, i as isUndefinedOrNull, bI as businessDetailsComponentsKeyMapping, bJ as solePropBusinessDetailsKeyMapping, ah as objectsDeepEqual, aS as keysOf, bK as solePropBusinessDetailsApiKeyMapping, bl as businessDetailsApiKeyMapping, at as Scenarios, aZ as filterOutUnwantedAssociationsIfRootLE, aX as drop, ad as getOwnEntityAssociations, b2 as doArraysMatch, bL as solePropBusinessDetailsDocumentMapping, bM as businessDetailsDocumentMapping } from "./StoreProvider-CBB99upB.js";
19
+ import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-CX6rQNws.js";
20
+ import { C as CompanyTypesValues } from "./bafinUtils-B1LygAFl.js";
21
+ import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-BnIbMyYt.js";
22
+ import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-D44Paj5u.js";
23
+ import { u as useMultiForm } from "./useMultiForm-DRZSxmEa.js";
24
+ import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-BigOdLU3.js";
25
+ import { C as Confirm } from "./Confirm-NubmSSR7.js";
26
+ import { E as ErrorPanel } from "./ErrorPanel-D4kO8XQ8.js";
27
+ import { N as NewSummary } from "./NewSummary-D-9PYaY6.js";
28
+ import { u as usePageLandedEvent, s as summaryStep, a as summaryStyles } from "./Summary-C5uRwUKn.js";
29
+ import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-DDCTmBf4.js";
30
+ import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-BEcbGHkz.js";
31
+ 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, f as getTaxInformationPlaceholderText, S as StateCodesUS, h as isUsingCompanySearch, M as MemoizedDocumentUpload, j as countryToTaxInfoTypeMap, k as getCompanyRegistrationNumberOptions, l as isRegistrationNumberAbsentStateV4Scenario, m as getTaxIdNumberOptions, n as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, o as rules, g as getFieldsWithExistingData } from "./TaxInformationField-B7AVdVgf.js";
32
+ 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, a as defaultFieldConfig, 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-Djj_JCy4.js";
33
+ import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-BMdWqd0Y.js";
34
+ import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, f as mapAddressLabelsNewSummary, c as getKeyForField } from "./utils-BvFIL5qs.js";
37
35
  import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
38
- import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
39
- import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-D9h2Aq2w.js";
40
- import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, d as defaultFieldMetadata$1, c as defaultFieldConfig$1, e as StateField, i as isDateOlderThanAYear } from "./Address-Bj7zJ6yZ.js";
41
- import { i as isEmpty$1 } from "./isEmpty-CUuXL9Na.js";
36
+ import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-Bh3VtXaW.js";
37
+ import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, d as defaultFieldMetadata$1, c as defaultFieldConfig$1, e as StateField, i as isDateOlderThanAYear } from "./Address-DaePmCRZ.js";
38
+ import { S as SettingNames } from "./types-CQ2p58-6.js";
39
+ import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-Bo1WrnnM.js";
40
+ import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-DmAD3_AN.js";
41
+ import { t as toFullWidth, m as mapJpAddressSchemaToAddressLocalizations } from "./mapJpAddressSchemaToAddressLocalizations-DUoJIoRm.js";
42
+ import { i as isEmpty$1 } from "./isEmpty-3U9fSQsY.js";
42
43
  import { f as formatObject } from "./utils-DNSfZiio.js";
43
44
  import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
44
- 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-CIgj9KwH.js";
45
- 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-DzAxAnD9.js";
46
- import { u as useBusinessLines } from "./useBusinessLines-C5NQ5pE8.js";
45
+ 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-B4udmJgX.js";
46
+ 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-DBiJbXem.js";
47
+ import { j as useBusinessLines } from "./OnboardingDropinComponent-CxUcB7IU.js";
47
48
  import { Suspense, lazy } from "preact/compat";
48
- import { C as Checkbox } from "./Checkbox-5Sc5pzsh.js";
49
- import { F as Field } from "./Field-Bs7wGDqk.js";
50
- import { H as Header } from "./Header-vslG1ugE.js";
51
- import { E as ErrorPanel } from "./ErrorPanel-CAALFKmE.js";
52
- import { I as InputDate, f as formatDateObj } from "./InputDate-CLxqciJA.js";
53
- import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-vYKnE5-t.js";
54
- import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-BSW18fxr.js";
55
- import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-C_sWWLS3.js";
56
- import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-CGWcXGP2.js";
49
+ import { C as Checkbox } from "./Checkbox-DmYVTVOD.js";
50
+ import { F as Field } from "./Field-CPoHG0G-.js";
51
+ import { I as InputDate, f as formatDateObj } from "./InputDate-BVYQZZuX.js";
52
+ import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-BkY5yvNa.js";
53
+ import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-1f16YE1z.js";
54
+ import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-CaeglTl1.js";
57
55
  import { u as useDebouncedCallback } from "./debouncedInputEvent-Cv2S512Y.js";
58
56
  import { signal } from "@preact/signals";
59
57
  import cx from "classnames";
60
- import { L as Link } from "./Link-CXYU8cLY.js";
61
- import { S as StructuredList } from "./StructuredList-CVMZBzwq.js";
62
- import { I as InputText } from "./InputText-BdCbTzL9.js";
63
- import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-DxZlK1rV.js";
64
- import { L as LoaderWrapper } from "./LoaderWrapper-C2PvjjQc.js";
65
- import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
58
+ import { L as Link } from "./Link-ru5UMRxt.js";
59
+ import { S as StructuredList } from "./StructuredList-EKVbq_i3.js";
60
+ import { I as InputText } from "./InputText-C55stM8O.js";
61
+ import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-C7SjQFv_.js";
62
+ import { L as LoaderWrapper } from "./LoaderWrapper-BL7Hc_DC.js";
66
63
  import { C as Card } from "./Card-OQuFzmxm.js";
67
- import { L as ListItem } from "./ListItem-HD5_HiQ2.js";
68
- import { a as Alert } from "./Alert-CFmX9yNV.js";
69
- import { T as TileGroup } from "./TileGroup-C-5-VREz.js";
70
- import { R as RadioGroup } from "./RadioGroup-CxcIXYzs.js";
71
- import { u as useGlobalDataSlice } from "./useGlobalData-5Z6W3or1.js";
72
- import { u as useForm } from "./useForm-DqUW2TbW.js";
73
- import { c as currencyByCountry } from "./types-C8io4KaH.js";
64
+ import { L as ListItem } from "./ListItem-C6ALEoR-.js";
65
+ import { T as TileGroup } from "./TileGroup-oKbh_YGv.js";
66
+ import { c as currencyByCountry } from "./types-CcxS0801.js";
67
+ import { R as RadioGroup } from "./RadioGroup-BuAX_NLA.js";
74
68
  const DATE_OF_INCORPORATION_FIELD = [
75
69
  "dateOfIncorporation"
76
70
  ];
@@ -135,7 +129,6 @@ function EInvoicingCodeField({
135
129
  labels,
136
130
  readonly,
137
131
  mask,
138
- guidanceText,
139
132
  shouldValidate,
140
133
  handleChangeFor
141
134
  }) {
@@ -152,7 +145,9 @@ function EInvoicingCodeField({
152
145
  name: "eInvoicingCode",
153
146
  type: "text",
154
147
  label: labels.eInvoicingCode ?? "",
155
- formatGuidance: guidanceText?.eInvoicingCode,
148
+ formatGuidance: t(($) => $["the7CharacterIdentifierAssignedToThis"], {
149
+ example: "MP10YNU"
150
+ }),
156
151
  errorMessage: errors.eInvoicingCode,
157
152
  isValid: valid.eInvoicingCode ?? false,
158
153
  value: data.eInvoicingCode ?? "",
@@ -185,12 +180,6 @@ const eInvoicingCodeFieldMetadata = {
185
180
  mask: {
186
181
  mask: makeMask(...alphanumericInputs(16)),
187
182
  transformOnType: uppercase
188
- },
189
- guidanceText: {
190
- key: "the7CharacterIdentifierAssignedToThis",
191
- values: {
192
- example: "MP10YNU"
193
- }
194
183
  }
195
184
  };
196
185
  const stockExchangeMICFieldMetadata = {
@@ -199,13 +188,6 @@ const stockExchangeMICFieldMetadata = {
199
188
  mask: {
200
189
  mask: makeMask(...alphanumericInputs(4)),
201
190
  transformOnType: uppercase
202
- },
203
- guidanceText: {
204
- key: "enterNCharactersForExample",
205
- values: {
206
- numChars: "4",
207
- example: "XNAS"
208
- }
209
191
  }
210
192
  };
211
193
  const STOCK_EXCHANGE_MIC_FIELD = [
@@ -218,17 +200,17 @@ function StockExchangeMICField({
218
200
  labels,
219
201
  readonly,
220
202
  mask,
221
- guidanceText,
222
203
  shouldValidate,
223
204
  handleChangeFor
224
205
  }) {
206
+ const { t } = useTranslation("common");
225
207
  return /* @__PURE__ */ jsx(
226
208
  MaskedInput,
227
209
  {
228
210
  name: "stockExchangeMIC",
229
211
  type: "text",
230
212
  label: labels.stockExchangeMIC ?? "",
231
- formatGuidance: guidanceText?.stockExchangeMIC,
213
+ formatGuidance: t(($) => $["enterNCharactersForExample"], { numChars: "4", example: "XNAS" }),
232
214
  ...mask,
233
215
  errorMessage: errors.stockExchangeMIC,
234
216
  isValid: valid.stockExchangeMIC ?? false,
@@ -254,12 +236,6 @@ const stockISINFieldMetadata = {
254
236
  mask: {
255
237
  mask: makeMask(...alphaInputs(2), ...alphanumericInputs(9), ...numericInputs(1)),
256
238
  transformOnType: uppercase
257
- },
258
- guidanceText: {
259
- key: "validationPleaseEnterAValidStockISIN",
260
- values: {
261
- example: "NL0012969182"
262
- }
263
239
  }
264
240
  };
265
241
  const STOCK_ISIN_FIELD = ["stockISIN"];
@@ -270,17 +246,19 @@ function StockISINField({
270
246
  labels,
271
247
  readonly,
272
248
  mask,
273
- guidanceText,
274
249
  shouldValidate,
275
250
  handleChangeFor
276
251
  }) {
252
+ const { t } = useTranslation("common");
277
253
  return /* @__PURE__ */ jsx(
278
254
  MaskedInput,
279
255
  {
280
256
  name: "stockISIN",
281
257
  type: "text",
282
258
  label: labels.stockISIN ?? "",
283
- formatGuidance: guidanceText?.stockISIN,
259
+ formatGuidance: t(($) => $["validationPleaseEnterAValidStockISIN"], {
260
+ example: "NL0012969182"
261
+ }),
284
262
  ...mask,
285
263
  errorMessage: errors.stockISIN,
286
264
  isValid: valid.stockISIN ?? false,
@@ -300,13 +278,6 @@ const stockTickerSymbolFieldMetadata = {
300
278
  mask: {
301
279
  mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(4)),
302
280
  transformOnType: uppercase
303
- },
304
- guidanceText: {
305
- key: "enterAMaximumOfNCharactersForExample",
306
- values: {
307
- maxChars: "5",
308
- example: "ADYEN"
309
- }
310
281
  }
311
282
  };
312
283
  const STOCK_TICKER_SYMBOL_FIELD = [
@@ -319,17 +290,20 @@ function StockTickerSymbolField({
319
290
  labels,
320
291
  readonly,
321
292
  mask,
322
- guidanceText,
323
293
  shouldValidate,
324
294
  handleChangeFor
325
295
  }) {
296
+ const { t } = useTranslation("common");
326
297
  return /* @__PURE__ */ jsx(
327
298
  MaskedInput,
328
299
  {
329
300
  name: "stockTickerSymbol",
330
301
  type: "text",
331
302
  label: labels.stockTickerSymbol ?? "",
332
- formatGuidance: guidanceText?.stockTickerSymbol,
303
+ formatGuidance: t(($) => $["enterAMaximumOfNCharactersForExample"], {
304
+ maxChars: "5",
305
+ example: "ADYEN"
306
+ }),
333
307
  ...mask,
334
308
  errorMessage: errors.stockTickerSymbol,
335
309
  isValid: valid.stockTickerSymbol ?? false,
@@ -360,7 +334,7 @@ const verifiedBusiness = signal(void 0);
360
334
  const isVerifiedSingleCompanySearchResult = signal(false);
361
335
  const additionalInformationContent = "adyen-kyc-additional-information-content";
362
336
  const additionalInformationSectionHeading = "adyen-kyc-additional-information-section-heading";
363
- const styles$5 = {
337
+ const styles$4 = {
364
338
  additionalInformationContent,
365
339
  additionalInformationSectionHeading
366
340
  };
@@ -369,7 +343,7 @@ const verifiedBusinessCardContent = "adyen-kyc-verified-business-card-content";
369
343
  const verifiedBusinessCardContentCollapsed = "adyen-kyc-verified-business-card-content-collapsed";
370
344
  const verifiedBusinessCardContentExpanded = "adyen-kyc-verified-business-card-content-expanded";
371
345
  const verifiedBusinessCardExpandButton = "adyen-kyc-verified-business-card-expand-button";
372
- const styles$4 = {
346
+ const styles$3 = {
373
347
  verifiedBusinessCard,
374
348
  verifiedBusinessCardContent,
375
349
  verifiedBusinessCardContentCollapsed,
@@ -382,7 +356,7 @@ function VerifiedBusinessCard({
382
356
  }) {
383
357
  const { t } = useTranslation(["common"]);
384
358
  const [expanded, setExpanded] = useState(false);
385
- const address = verifiedAddress?.address && verifiedAddress.city && verifiedAddress.stateOrProvince && verifiedAddress.postalCode ? `${verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedBusiness2?.address;
359
+ const address = verifiedAddress?.address && verifiedAddress.city && verifiedAddress.stateOrProvince && verifiedAddress.postalCode ? `${verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedAddress?.address;
386
360
  const addressLink = `https://www.google.com/maps/place/${address?.replaceAll(" ", "+")}`;
387
361
  const baseItems = useMemo(
388
362
  () => [
@@ -414,12 +388,12 @@ function VerifiedBusinessCard({
414
388
  ].filter((item) => !!item.details),
415
389
  [address, addressLink, t, verifiedBusiness2?.legalForm]
416
390
  );
417
- const expandedContentClasses = cx(styles$4.verifiedBusinessCardContent, {
418
- [styles$4.verifiedBusinessCardContentCollapsed]: !expanded,
419
- [styles$4.verifiedBusinessCardContentExpanded]: expanded
391
+ const expandedContentClasses = cx(styles$3.verifiedBusinessCardContent, {
392
+ [styles$3.verifiedBusinessCardContentCollapsed]: !expanded,
393
+ [styles$3.verifiedBusinessCardContentExpanded]: expanded
420
394
  });
421
- return /* @__PURE__ */ jsxs("section", { className: styles$4.verifiedBusinessCard, children: [
422
- /* @__PURE__ */ jsxs("div", { className: styles$4.verifiedBusinessCardContent, children: [
395
+ return /* @__PURE__ */ jsxs("section", { className: styles$3.verifiedBusinessCard, children: [
396
+ /* @__PURE__ */ jsxs("div", { className: styles$3.verifiedBusinessCardContent, children: [
423
397
  /* @__PURE__ */ jsx(StructuredList, { items: baseItems }),
424
398
  /* @__PURE__ */ jsx(Divider, {})
425
399
  ] }),
@@ -427,11 +401,11 @@ function VerifiedBusinessCard({
427
401
  /* @__PURE__ */ jsx(StructuredList, { items: expandedItems }),
428
402
  /* @__PURE__ */ jsx(Divider, {})
429
403
  ] }),
430
- /* @__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" }) }) })
404
+ /* @__PURE__ */ jsx("div", { className: styles$3.verifiedBusinessCardExpandButton, children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? t(($) => $["hideDetails"], { ns: "common" }) : t(($) => $["showDetails"], { ns: "common" }) }) })
431
405
  ] });
432
406
  }
433
407
  const LazyJpAddress = lazy(
434
- async () => (await import("./JpAddress-BSEenMj0.js")).JpAddress
408
+ async () => (await import("./JpAddress-B3HjxunW.js")).JpAddress
435
409
  );
436
410
  const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
437
411
  const ADDITIONAL_INFORMATION_FIELDS = [
@@ -496,21 +470,44 @@ function AdditionalInformation({
496
470
  );
497
471
  const verifiedAddress = useMemo(() => {
498
472
  if (!verifiedBusiness$1) return void 0;
499
- return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
473
+ if (form.defaultData?.additionalInformation?.registrationAddress?.address || form.defaultData?.additionalInformation?.operationalAddress?.address) {
474
+ return { override: { address: "" } };
475
+ }
476
+ if (isExperimentEnabled("EnableProviderAgnosticCompanySearchAndSelect")) {
477
+ const _verifiedBusiness2 = verifiedBusiness$1;
478
+ return {
479
+ ..._verifiedBusiness2.registeredAddress && {
480
+ registrationAddress: mapAddressData(_verifiedBusiness2.registeredAddress)
481
+ },
482
+ ..._verifiedBusiness2.principalPlaceOfBusinessAddress && {
483
+ operationalAddress: mapAddressData(_verifiedBusiness2.principalPlaceOfBusinessAddress)
484
+ }
485
+ };
486
+ }
487
+ const _verifiedBusiness = verifiedBusiness$1;
488
+ const isVerifiedAddressNotRegistrationAddress = _verifiedBusiness.isPrincipalAddress || _verifiedBusiness.state && form.data.basicInformation?.stateOrProvince !== _verifiedBusiness.state;
489
+ return isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(_verifiedBusiness), country } } : {
500
490
  registrationAddress: {
501
- ...mapAddressData(verifiedBusiness$1),
491
+ ...mapAddressData(_verifiedBusiness),
502
492
  country,
503
493
  stateOrProvince: form.data.basicInformation?.stateOrProvince
504
494
  }
505
495
  };
506
- }, [verifiedBusiness$1, form.data.basicInformation?.stateOrProvince, country]);
507
- const [registrationAddressValid, setRegistrationAddressValid] = useState(false);
508
- const [operationalAddressValid, setOperationalAddressValid] = useState(false);
509
- if (form.valid.additionalInformation?.registrationAddress !== registrationAddressValid) {
510
- form.setValid("registrationAddress", registrationAddressValid, "additionalInformation");
496
+ }, [
497
+ verifiedBusiness$1,
498
+ form.defaultData?.additionalInformation?.registrationAddress?.address,
499
+ form.defaultData?.additionalInformation?.operationalAddress?.address,
500
+ form.data.basicInformation?.stateOrProvince,
501
+ isExperimentEnabled,
502
+ country
503
+ ]);
504
+ const registrationAddressValid = useRef(false);
505
+ const operationalAddressValid = useRef(false);
506
+ if (form.valid.additionalInformation?.registrationAddress !== registrationAddressValid.current) {
507
+ form.setValid("registrationAddress", registrationAddressValid.current, "additionalInformation");
511
508
  }
512
- if (form.data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && form.valid.additionalInformation?.operationalAddress !== operationalAddressValid) {
513
- form.setValid("operationalAddress", operationalAddressValid, "additionalInformation");
509
+ if (form.data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && form.valid.additionalInformation?.operationalAddress !== operationalAddressValid.current) {
510
+ form.setValid("operationalAddress", operationalAddressValid.current, "additionalInformation");
514
511
  }
515
512
  const handleChangeFor = useCallback(
516
513
  (fieldName, mode) => form.handleChangeFor(fieldName, "additionalInformation", mode),
@@ -519,12 +516,12 @@ function AdditionalInformation({
519
516
  const handleRegistrationAddressChange = (state) => {
520
517
  handleChangeFor("registrationAddress")(state.data);
521
518
  form.setValid("registrationAddress", Boolean(state.isValid), "additionalInformation");
522
- setRegistrationAddressValid(Boolean(state.isValid));
519
+ registrationAddressValid.current = Boolean(state.isValid);
523
520
  };
524
521
  const handleOperationalAddressChange = (state) => {
525
522
  handleChangeFor("operationalAddress")(state.data);
526
523
  form.setValid("operationalAddress", Boolean(state.isValid), "additionalInformation");
527
- setOperationalAddressValid(Boolean(state.isValid));
524
+ operationalAddressValid.current = Boolean(state.isValid);
528
525
  };
529
526
  const handleOperationalAddressIsSameChange = useCallback(
530
527
  (isChecked) => {
@@ -584,8 +581,7 @@ function AdditionalInformation({
584
581
  registrationNumberDefaultFieldConfig[country],
585
582
  {
586
583
  companyType,
587
- registrationNumberType: form.data.additionalInformation?.registrationNumberType,
588
- isExperimentEnabled
584
+ registrationNumberType: form.data.additionalInformation?.registrationNumberType
589
585
  },
590
586
  registrationNumberDefaultFieldMetadata
591
587
  ),
@@ -661,7 +657,6 @@ function AdditionalInformation({
661
657
  form.valid.additionalInformation,
662
658
  handleChangeFor,
663
659
  t,
664
- isExperimentEnabled,
665
660
  validationErrors,
666
661
  verificationErrors
667
662
  ]);
@@ -680,6 +675,18 @@ function AdditionalInformation({
680
675
  });
681
676
  }, [country, datasetUtils, t]);
682
677
  const showJapanLocalization = isJapanLocalizationEnabled(isExperimentEnabled, country);
678
+ let readOnlyAddressFields = [];
679
+ if (isExperimentEnabled("EnableProviderAgnosticCompanySearchAndSelect")) {
680
+ const _verifiedBusiness = verifiedBusiness$1;
681
+ if (_verifiedBusiness?.registeredAddress?.state && _verifiedBusiness.registeredAddress.state === form.data.basicInformation?.stateOrProvince) {
682
+ readOnlyAddressFields = ["stateOrProvince"];
683
+ }
684
+ } else {
685
+ const _verifiedBusiness = verifiedBusiness$1;
686
+ if (_verifiedBusiness?.state && _verifiedBusiness.state === form.data.basicInformation?.stateOrProvince) {
687
+ readOnlyAddressFields = ["stateOrProvince"];
688
+ }
689
+ }
683
690
  return /* @__PURE__ */ jsxs("form", { id, children: [
684
691
  /* @__PURE__ */ jsx(Header, { title: t(($) => $["additionalInformationFormHeading"], { ns: "business" }) }),
685
692
  /* @__PURE__ */ jsx(
@@ -691,19 +698,19 @@ function AdditionalInformation({
691
698
  formUtils
692
699
  }
693
700
  ),
694
- /* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationContent, children: [
701
+ /* @__PURE__ */ jsxs("div", { className: styles$4.additionalInformationContent, children: [
695
702
  showVerified && /* @__PURE__ */ jsxs("section", { children: [
696
- /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
703
+ /* @__PURE__ */ jsx("div", { className: styles$4.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
697
704
  /* @__PURE__ */ jsx(
698
705
  VerifiedBusinessCard,
699
706
  {
700
707
  verifiedBusiness: verifiedBusiness$1,
701
- verifiedAddress: verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
708
+ verifiedAddress: verifiedAddress?.override ?? verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
702
709
  }
703
710
  )
704
711
  ] }),
705
712
  /* @__PURE__ */ jsxs("section", { children: [
706
- showVerified && /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
713
+ showVerified && /* @__PURE__ */ jsx("div", { className: styles$4.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
707
714
  /* @__PURE__ */ jsxs("fieldset", { children: [
708
715
  showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx(
709
716
  LegalFormField,
@@ -766,7 +773,6 @@ function AdditionalInformation({
766
773
  exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
767
774
  }),
768
775
  mask: formUtils.getMask("registrationNumber"),
769
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
770
776
  helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
771
777
  readonly: formUtils.isReadOnly("registrationNumber"),
772
778
  optional: formUtils.isOptionalField("registrationNumber"),
@@ -797,7 +803,6 @@ function AdditionalInformation({
797
803
  exemptedFromTax: "iDontHaveATaxId"
798
804
  }),
799
805
  mask: formUtils.getMask("taxInformation"),
800
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
801
806
  readonly: formUtils.isReadOnly("taxInformation"),
802
807
  shouldValidate,
803
808
  handleChangeFor,
@@ -828,7 +833,6 @@ function AdditionalInformation({
828
833
  exemptedFromVat: "iDontHaveAVatNumber"
829
834
  }),
830
835
  mask: formUtils.getMask("vatNumber"),
831
- guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
832
836
  readonly: formUtils.isReadOnly("vatNumber"),
833
837
  handleChangeFor,
834
838
  country,
@@ -854,7 +858,6 @@ function AdditionalInformation({
854
858
  ),
855
859
  labels: formUtils.getFieldLabels(EINVOICING_CODE_FIELD),
856
860
  mask: formUtils.getMask("eInvoicingCode"),
857
- guidanceText: formUtils.getFieldGuidanceText(EINVOICING_CODE_FIELD),
858
861
  readonly: formUtils.isReadOnly("eInvoicingCode"),
859
862
  handleChangeFor
860
863
  }
@@ -880,11 +883,7 @@ function AdditionalInformation({
880
883
  ns: "business"
881
884
  })
882
885
  },
883
- guidanceText: {
884
- industryCodes: t(($) => $["primaryIndustryCodeGuidance"], {
885
- ns: "business"
886
- })
887
- },
886
+ guidanceText: t(($) => $["primaryIndustryCodeGuidance"], { ns: "business" }),
888
887
  readonly: formUtils.isReadOnly("industryCodes"),
889
888
  handleChangeFor,
890
889
  businessLineTypes,
@@ -917,7 +916,7 @@ function AdditionalInformation({
917
916
  ] })
918
917
  ] }),
919
918
  showStockData && /* @__PURE__ */ jsxs("section", { children: [
920
- /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
919
+ /* @__PURE__ */ jsx("div", { className: styles$4.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
921
920
  /* @__PURE__ */ jsxs("fieldset", { children: [
922
921
  showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx(
923
922
  StockExchangeMICField,
@@ -937,7 +936,6 @@ function AdditionalInformation({
937
936
  ),
938
937
  labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
939
938
  mask: formUtils.getMask("stockExchangeMIC"),
940
- guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
941
939
  readonly: formUtils.isReadOnly("stockExchangeMIC"),
942
940
  shouldValidate,
943
941
  handleChangeFor
@@ -961,7 +959,6 @@ function AdditionalInformation({
961
959
  ),
962
960
  labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
963
961
  mask: formUtils.getMask("stockISIN"),
964
- guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
965
962
  readonly: formUtils.isReadOnly("stockISIN"),
966
963
  shouldValidate,
967
964
  handleChangeFor
@@ -985,7 +982,6 @@ function AdditionalInformation({
985
982
  ),
986
983
  labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
987
984
  mask: formUtils.getMask("stockTickerSymbol"),
988
- guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
989
985
  readonly: formUtils.isReadOnly("stockTickerSymbol"),
990
986
  shouldValidate,
991
987
  handleChangeFor
@@ -994,7 +990,7 @@ function AdditionalInformation({
994
990
  ] })
995
991
  ] }),
996
992
  /* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
997
- /* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationSectionHeading, children: [
993
+ /* @__PURE__ */ jsxs("div", { className: styles$4.additionalInformationSectionHeading, children: [
998
994
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
999
995
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
1000
996
  ] }),
@@ -1021,7 +1017,7 @@ function AdditionalInformation({
1021
1017
  shouldValidate,
1022
1018
  hideCountry: true,
1023
1019
  optionalFields: ["otherAddressInformation"],
1024
- readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
1020
+ readOnlyFields: readOnlyAddressFields,
1025
1021
  trustedFields: getNestedTrustedFields(
1026
1022
  "registrationAddress",
1027
1023
  form.data.additionalInformation,
@@ -1035,7 +1031,7 @@ function AdditionalInformation({
1035
1031
  )
1036
1032
  ] }),
1037
1033
  /* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
1038
- /* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationSectionHeading, children: [
1034
+ /* @__PURE__ */ jsxs("div", { className: styles$4.additionalInformationSectionHeading, children: [
1039
1035
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
1040
1036
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
1041
1037
  ] }),
@@ -1114,8 +1110,8 @@ function useLegalCompanyNameField({
1114
1110
  const labels = formUtils.getFieldLabels(fieldKeys);
1115
1111
  const fieldErrors = formUtils.getFieldErrors(errors, fieldProblems, fieldKeys);
1116
1112
  const fieldsTransformInput = {
1117
- jaHaniLegalCompanyName: (value) => toFullWidth(value),
1118
- jaKanaLegalCompanyName: (value) => toFullWidth(value)
1113
+ jaHaniLegalCompanyName: toFullWidth,
1114
+ jaKanaLegalCompanyName: toFullWidth
1119
1115
  };
1120
1116
  const fieldsTransformMode = {
1121
1117
  jaHaniLegalCompanyName: "blur",
@@ -1219,7 +1215,7 @@ const localizedLegalCompanyNameFieldConfig = {
1219
1215
  }
1220
1216
  };
1221
1217
  const basicInformation = "adyen-kyc-basic-information";
1222
- const styles$3 = {
1218
+ const styles$2 = {
1223
1219
  basicInformation
1224
1220
  };
1225
1221
  const BASIC_INFORMATION_FIELDS = [
@@ -1329,8 +1325,7 @@ function BasicInformation({
1329
1325
  {
1330
1326
  companyType,
1331
1327
  registrationNumberType: form.data.additionalInformation?.registrationNumberType,
1332
- state,
1333
- isExperimentEnabled
1328
+ state
1334
1329
  },
1335
1330
  registrationNumberDefaultFieldMetadata
1336
1331
  ),
@@ -1401,7 +1396,7 @@ function BasicInformation({
1401
1396
  handleChange: handleChangeFor,
1402
1397
  t: businessT
1403
1398
  });
1404
- return /* @__PURE__ */ jsxs("form", { id, className: styles$3.basicInformation, children: [
1399
+ return /* @__PURE__ */ jsxs("form", { id, className: styles$2.basicInformation, children: [
1405
1400
  /* @__PURE__ */ jsx(Header, { title: t(($) => $["basicInformationFormHeading"], { ns: "business" }), children: /* @__PURE__ */ jsx(
1406
1401
  FormDescription,
1407
1402
  {
@@ -1512,7 +1507,6 @@ function BasicInformation({
1512
1507
  companyType,
1513
1508
  taxIdNumberType: currentCountryTaxInformation?.type
1514
1509
  }),
1515
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
1516
1510
  readonly: formUtils.isReadOnly("taxInformation"),
1517
1511
  shouldValidate,
1518
1512
  handleChangeFor,
@@ -1559,13 +1553,13 @@ function BasicInformation({
1559
1553
  exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
1560
1554
  }),
1561
1555
  mask: formUtils.getMask("registrationNumber"),
1562
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
1563
1556
  helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
1564
1557
  readonly: formUtils.isReadOnly("registrationNumber"),
1565
1558
  optional: formUtils.isOptionalField("registrationNumber"),
1566
1559
  shouldValidate,
1567
1560
  handleChangeFor,
1568
1561
  country,
1562
+ state,
1569
1563
  canExempt: showField(["exemptedFromRegistrationNumber"]),
1570
1564
  companyType
1571
1565
  }
@@ -1589,6 +1583,12 @@ const useClearCompanyData = (options) => {
1589
1583
  ...options
1590
1584
  });
1591
1585
  };
1586
+ function useCompanySearchExperiments() {
1587
+ const { isExperimentEnabled } = useExperimentsContext();
1588
+ return {
1589
+ isAgnosticEndpointEnabled: isExperimentEnabled("EnableProviderAgnosticCompanySearchAndSelect")
1590
+ };
1591
+ }
1592
1592
  const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
1593
1593
  const KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS = [
1594
1594
  StateCodesUS.Arkansas,
@@ -1618,22 +1618,40 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
1618
1618
  const KOMPANY_SEARCH_FAILURE = "Kompany index and deep search both failed to complete";
1619
1619
  const useCompanySearch = (data, options) => {
1620
1620
  const { rootLegalEntityId, baseUrl } = useApiContext();
1621
+ const { isAgnosticEndpointEnabled } = useCompanySearchExperiments();
1621
1622
  return useQuery({
1622
1623
  queryKey: ["companySearch", data],
1623
- queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data),
1624
+ queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data, isAgnosticEndpointEnabled),
1624
1625
  retry: 0,
1625
1626
  ...options
1626
1627
  });
1627
1628
  };
1628
- const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
1629
+ const handleCompanySearch = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
1630
+ if (isAgnosticEndpointEnabled) {
1631
+ const _data2 = {
1632
+ name: data.name,
1633
+ country: data.country,
1634
+ stateOrProvince: data.state,
1635
+ ...data.registrationNumber ? { registrationNumber: data.registrationNumber } : {},
1636
+ resultSizeLimit: data.resultSizeLimit ?? 15
1637
+ };
1638
+ return httpPost(
1639
+ {
1640
+ baseUrl,
1641
+ path: `legalEntities/${rootLegalEntityId}/companySearch/search`
1642
+ },
1643
+ _data2
1644
+ );
1645
+ }
1646
+ const _data = data;
1629
1647
  const getRequestPayload = (text) => ({
1630
1648
  text,
1631
- country: data.country,
1632
- state: data.state,
1633
- limit: data.limit ?? 15
1649
+ country: _data.country,
1650
+ state: _data.state,
1651
+ limit: _data.limit ?? 15
1634
1652
  });
1635
- const nameSearchPayload = getRequestPayload(data.name);
1636
- const registrationSearchPayload = getRequestPayload(data.registrationNumber);
1653
+ const nameSearchPayload = getRequestPayload(_data.name);
1654
+ const registrationSearchPayload = getRequestPayload(_data.registrationNumber);
1637
1655
  const searchRequest = async (requestPayload, path) => {
1638
1656
  return httpPost(
1639
1657
  {
@@ -1661,25 +1679,35 @@ const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
1661
1679
  return response;
1662
1680
  };
1663
1681
  const searchByRegistrationNumber = async () => {
1664
- return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await companyRegistrationNumberIndexSearch() : await primarySourceSearch(
1682
+ return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(_data.state) ? await companyRegistrationNumberIndexSearch() : await primarySourceSearch(
1665
1683
  companyRegistrationNumberIndexSearch,
1666
1684
  companyRegistrationNumberDeepSearch
1667
1685
  );
1668
1686
  };
1669
1687
  const searchByCompanyName = async () => {
1670
- return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await companyIndexSearch() : await primarySourceSearch(companyIndexSearch, companyDeepSearch);
1688
+ return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(_data.state) ? await companyIndexSearch() : await primarySourceSearch(companyIndexSearch, companyDeepSearch);
1671
1689
  };
1672
- if (data.registrationNumber) {
1690
+ if (_data.registrationNumber) {
1673
1691
  const registrationNumberResponse = await searchByRegistrationNumber();
1674
1692
  return registrationNumberResponse.results.length > 0 ? registrationNumberResponse : await searchByCompanyName();
1675
1693
  }
1676
1694
  return await searchByCompanyName();
1677
1695
  };
1678
- const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data) => {
1696
+ const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
1697
+ if (isAgnosticEndpointEnabled) {
1698
+ return httpPost(
1699
+ {
1700
+ baseUrl,
1701
+ path: `legalEntities/${rootLegalEntityId}/companyDataset/select`
1702
+ },
1703
+ data
1704
+ );
1705
+ }
1706
+ const _data = data;
1679
1707
  const requestPayload = {
1680
- companyId: data.company.id,
1708
+ companyId: _data.company.id,
1681
1709
  country: "US",
1682
- state: data.state
1710
+ state: _data.state
1683
1711
  };
1684
1712
  const searchRequest = async (path) => {
1685
1713
  return httpPost(
@@ -1693,8 +1721,8 @@ const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data) => {
1693
1721
  const getCompanyDataset = async () => await searchRequest();
1694
1722
  const refreshCompanyDataset = async () => await searchRequest("refreshed");
1695
1723
  const date = (/* @__PURE__ */ new Date()).toDateString();
1696
- const isDataCompliant = data.company.lastUpdate ? Date.parse(date) - Date.parse(data.company.lastUpdate) < LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW : false;
1697
- return isDataCompliant && !KNOWN_DISALLOWED_INDEX_DATASET_STATES.includes(data.state) ? await getCompanyDataset() : await refreshCompanyDataset();
1724
+ const isDataCompliant = _data.company.lastUpdate ? Date.parse(date) - Date.parse(_data.company.lastUpdate) < LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW : false;
1725
+ return isDataCompliant && !KNOWN_DISALLOWED_INDEX_DATASET_STATES.includes(_data.state) ? await getCompanyDataset() : await refreshCompanyDataset();
1698
1726
  };
1699
1727
  const useVerifyTin = (data, options) => {
1700
1728
  const { rootLegalEntityId, baseUrl } = useApiContext();
@@ -1716,19 +1744,32 @@ const verifyTin = async (legalEntityId, baseUrl, data) => {
1716
1744
  };
1717
1745
  const useCompanySelection = (data, options) => {
1718
1746
  const { rootLegalEntityId, baseUrl } = useApiContext();
1747
+ const { isAgnosticEndpointEnabled } = useCompanySearchExperiments();
1719
1748
  return useQuery({
1720
1749
  queryKey: ["companySelection", data],
1721
- queryFn: data ? () => handleCompanySelection(rootLegalEntityId.value, baseUrl.value, data) : skipToken,
1750
+ queryFn: data ? () => handleCompanySelection(
1751
+ rootLegalEntityId.value,
1752
+ baseUrl.value,
1753
+ data,
1754
+ isAgnosticEndpointEnabled
1755
+ ) : skipToken,
1722
1756
  retry: 0,
1723
1757
  ...options
1724
1758
  });
1725
1759
  };
1726
- const handleCompanySelection = async (rootLegalEntityId, baseUrl, data) => {
1760
+ const handleCompanySelection = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
1727
1761
  const [companyDatasetResult, tinMatch] = await Promise.all([
1728
- handleCompanyDataset(rootLegalEntityId, baseUrl, {
1729
- company: data.company,
1730
- state: data.state
1731
- }),
1762
+ handleCompanyDataset(
1763
+ rootLegalEntityId,
1764
+ baseUrl,
1765
+ isAgnosticEndpointEnabled ? {
1766
+ id: data.id
1767
+ } : {
1768
+ company: data.company,
1769
+ state: data.state
1770
+ },
1771
+ isAgnosticEndpointEnabled
1772
+ ),
1732
1773
  verifyTin(rootLegalEntityId, baseUrl, { name: data.name, tin: data.tin })
1733
1774
  ]);
1734
1775
  return {
@@ -1759,27 +1800,54 @@ const mapOrganizationTypeToCompanyType = (organizationType) => {
1759
1800
  return CompanyTypesValues.PRIVATE_COMPANY;
1760
1801
  }
1761
1802
  };
1762
- const applyVerifiedBusinessData = (form, country, verifiedData) => {
1803
+ const applyVerifiedBusinessData = (form, country, verifiedData, isAgnosticEndpointEnabled) => {
1763
1804
  if (!verifiedData) return;
1764
1805
  form.handleChangeFor("legalCompanyName", "basicInformation")(verifiedData.name);
1765
- form.handleChangeFor(
1766
- "entityType",
1767
- "companyStructure"
1768
- )(mapOrganizationTypeToCompanyType(verifiedData.organizationType));
1769
- const isVerifiedAddressNotRegistrationAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data.basicInformation?.stateOrProvince !== verifiedData.state;
1770
- const verifiedAddress = isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(verifiedData), country } } : {
1771
- registrationAddress: {
1772
- ...mapAddressData(verifiedData),
1773
- country,
1774
- stateOrProvince: form.data.basicInformation?.stateOrProvince
1806
+ if (form.defaultData?.additionalInformation?.registrationAddress?.address || form.defaultData?.additionalInformation?.operationalAddress?.address)
1807
+ return;
1808
+ let verifiedAddress;
1809
+ if (isAgnosticEndpointEnabled) {
1810
+ const _verifiedData = verifiedData;
1811
+ form.handleChangeFor(
1812
+ "entityType",
1813
+ "companyStructure"
1814
+ )(mapOrganizationTypeToCompanyType(_verifiedData.companyType));
1815
+ verifiedAddress = {
1816
+ ..._verifiedData.registeredAddress && {
1817
+ registrationAddress: mapAddressData(_verifiedData.registeredAddress)
1818
+ },
1819
+ ..._verifiedData.principalPlaceOfBusinessAddress && {
1820
+ operationalAddress: mapAddressData(_verifiedData.principalPlaceOfBusinessAddress)
1821
+ }
1822
+ };
1823
+ if (_verifiedData.principalPlaceOfBusinessAddress) {
1824
+ form.handleChangeFor(
1825
+ "operationalAddressIsSame",
1826
+ "additionalInformation",
1827
+ "input"
1828
+ )(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
1775
1829
  }
1776
- };
1777
- if (isVerifiedAddressNotRegistrationAddress) {
1830
+ } else {
1831
+ const _verifiedData = verifiedData;
1778
1832
  form.handleChangeFor(
1779
- "operationalAddressIsSame",
1780
- "additionalInformation",
1781
- "input"
1782
- )(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
1833
+ "entityType",
1834
+ "companyStructure"
1835
+ )(mapOrganizationTypeToCompanyType(_verifiedData.organizationType));
1836
+ const isVerifiedAddressNotRegistrationAddress = _verifiedData.isPrincipalAddress || _verifiedData.state && form.data.basicInformation?.stateOrProvince !== _verifiedData.state;
1837
+ verifiedAddress = isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(_verifiedData), country } } : {
1838
+ registrationAddress: {
1839
+ ...mapAddressData(_verifiedData),
1840
+ country,
1841
+ stateOrProvince: form.data.basicInformation?.stateOrProvince
1842
+ }
1843
+ };
1844
+ if (isVerifiedAddressNotRegistrationAddress) {
1845
+ form.handleChangeFor(
1846
+ "operationalAddressIsSame",
1847
+ "additionalInformation",
1848
+ "input"
1849
+ )(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
1850
+ }
1783
1851
  }
1784
1852
  if (verifiedAddress.registrationAddress) {
1785
1853
  form.handleChangeFor(
@@ -1809,6 +1877,10 @@ function BusinessInformation({ fetching, selectedBusiness }) {
1809
1877
  case "address":
1810
1878
  if (value) acc[2].details = value;
1811
1879
  break;
1880
+ case "registeredAddress":
1881
+ if (value && typeof value !== "string")
1882
+ acc[2].details = value?.fullAddress;
1883
+ break;
1812
1884
  }
1813
1885
  return acc;
1814
1886
  },
@@ -1848,10 +1920,14 @@ function BusinessInformationCard({
1848
1920
  handleBackClick
1849
1921
  }) {
1850
1922
  const { t } = useTranslation(["common", "business"]);
1851
- const isSelected = selectedBusinessId === result.id;
1923
+ const { isExperimentEnabled } = useExperimentsContext();
1924
+ const providerAgnosticEndpointsEnabled = isExperimentEnabled(
1925
+ "EnableProviderAgnosticCompanySearchAndSelect"
1926
+ );
1927
+ const isSelected = selectedBusinessId === (providerAgnosticEndpointsEnabled ? result.resultId : result.id);
1852
1928
  const excludeResultAsGovernmentEntity = useMemo(
1853
- () => isBankAccountRequestedForOrganization.value && currentBusinessSelection?.organizationType === "GOVERNMENTAL_ORGANIZATION",
1854
- [currentBusinessSelection]
1929
+ () => isBankAccountRequestedForOrganization.value && currentBusinessSelection && (providerAgnosticEndpointsEnabled ? currentBusinessSelection.companyType : currentBusinessSelection.organizationType) === "GOVERNMENTAL_ORGANIZATION",
1930
+ [currentBusinessSelection, providerAgnosticEndpointsEnabled]
1855
1931
  );
1856
1932
  const showSelectButton = useMemo(
1857
1933
  () => !fetching && !fetchingError && currentBusinessSelection && !excludeResultAsGovernmentEntity,
@@ -1938,7 +2014,7 @@ function BusinessInformationCard({
1938
2014
  ] }) });
1939
2015
  }
1940
2016
  const businessSelectionFooter = "adyen-kyc-business-selection-footer";
1941
- const styles$2 = {
2017
+ const styles$1 = {
1942
2018
  businessSelectionFooter
1943
2019
  };
1944
2020
  const BUSINESS_SELECTION_FIELDS = [
@@ -1957,9 +2033,13 @@ function BusinessSelection({
1957
2033
  const { form } = useFormContext();
1958
2034
  const queryClient = useQueryClient();
1959
2035
  const userEvents = useAnalyticsContext();
2036
+ const { isExperimentEnabled } = useExperimentsContext();
1960
2037
  const [selectedBusinessId, setSelectedBusinessId] = useState();
1961
2038
  const [fetchParams, setFetchParams] = useState();
1962
2039
  usePageLandedEvent();
2040
+ const providerAgnosticEndpointsEnabled = isExperimentEnabled(
2041
+ "EnableProviderAgnosticCompanySearchAndSelect"
2042
+ );
1963
2043
  const { data: companySearchResponse, isLoading: searching } = useCompanySearch({
1964
2044
  name: form.data.basicInformation?.legalCompanyName ?? "",
1965
2045
  country,
@@ -2000,28 +2080,35 @@ function BusinessSelection({
2000
2080
  [form]
2001
2081
  );
2002
2082
  const handleSelectBusiness = (result) => {
2003
- if ((!selectedBusinessId || selectedBusinessId !== result.id) && currentTin) {
2083
+ const resultId = providerAgnosticEndpointsEnabled ? result.resultId : result.id;
2084
+ if ((!selectedBusinessId || selectedBusinessId !== resultId) && currentTin) {
2004
2085
  userEvents.addPageEvent("Clicked button", {
2005
2086
  actionType: "select",
2006
2087
  label: "selectBusiness",
2007
2088
  additionalData: {
2008
2089
  companyIdx: companySearchResponse?.results.findIndex(
2009
- (searchResult) => searchResult.id === result.id
2090
+ (searchResult) => (providerAgnosticEndpointsEnabled ? searchResult.resultId : searchResult.id) === resultId
2010
2091
  )
2011
2092
  }
2012
2093
  });
2013
- setSelectedBusinessId(result.id);
2014
- setFetchParams({
2015
- company: result,
2016
- state: form.data.basicInformation?.stateOrProvince,
2017
- name: result.name,
2018
- tin: currentTin
2019
- });
2094
+ setSelectedBusinessId(resultId);
2095
+ setFetchParams(
2096
+ providerAgnosticEndpointsEnabled ? {
2097
+ id: result.resultId,
2098
+ name: result.name,
2099
+ tin: currentTin
2100
+ } : {
2101
+ company: result,
2102
+ state: form.data.basicInformation?.stateOrProvince,
2103
+ name: result.name,
2104
+ tin: currentTin
2105
+ }
2106
+ );
2020
2107
  }
2021
2108
  };
2022
2109
  const handleConfirmSelection = () => {
2023
2110
  verifiedBusiness.value = businessData;
2024
- applyVerifiedBusinessData(form, country, businessData);
2111
+ applyVerifiedBusinessData(form, country, businessData, providerAgnosticEndpointsEnabled);
2025
2112
  handleChange("hasSelectedBusiness", "blur")(true);
2026
2113
  handleNextClick();
2027
2114
  };
@@ -2112,9 +2199,9 @@ function BusinessSelection({
2112
2199
  refetchCompanySelection,
2113
2200
  handleBackClick
2114
2201
  },
2115
- result.id
2202
+ providerAgnosticEndpointsEnabled ? result.resultId : result.id
2116
2203
  )) }),
2117
- /* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles$2.businessSelectionFooter, children: [
2204
+ /* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles$1.businessSelectionFooter, children: [
2118
2205
  t(($) => $["businessSelection__footer"], { ns: "business" }),
2119
2206
  /* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"], { ns: "business" }) })
2120
2207
  ] })
@@ -2269,7 +2356,7 @@ function FinancialReportingDate({
2269
2356
  handleChangeFor
2270
2357
  }) {
2271
2358
  const { t } = useTranslation("common");
2272
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
2359
+ return /* @__PURE__ */ jsx(
2273
2360
  Field,
2274
2361
  {
2275
2362
  name: "financialReportingDate",
@@ -2293,7 +2380,7 @@ function FinancialReportingDate({
2293
2380
  }
2294
2381
  )
2295
2382
  }
2296
- ) });
2383
+ );
2297
2384
  }
2298
2385
  const NUMBER_OF_EMPLOYEES_FIELD = [
2299
2386
  "numberOfEmployees"
@@ -2306,7 +2393,7 @@ function NumberOfEmployees({
2306
2393
  readonly,
2307
2394
  handleChangeFor
2308
2395
  }) {
2309
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
2396
+ return /* @__PURE__ */ jsx(
2310
2397
  Field,
2311
2398
  {
2312
2399
  name: "numberOfEmployees",
@@ -2329,15 +2416,13 @@ function NumberOfEmployees({
2329
2416
  }
2330
2417
  )
2331
2418
  }
2332
- ) });
2419
+ );
2333
2420
  }
2334
- const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
2335
- const styles$1 = {
2336
- financialInformationReportedValueOptions
2337
- };
2421
+ const reportedValueOptions = "adyen-kyc-reported-value-options";
2338
2422
  const reportedValue = "adyen-kyc-reported-value";
2339
2423
  const reportedValueInput = "adyen-kyc-reported-value-input";
2340
2424
  const styles = {
2425
+ reportedValueOptions,
2341
2426
  reportedValue,
2342
2427
  reportedValueInput
2343
2428
  };
@@ -2351,12 +2436,12 @@ const ReportedValue = ({
2351
2436
  errorMessage,
2352
2437
  isValid
2353
2438
  }) => {
2354
- const { i18n } = useI18nContext();
2439
+ const { i18n } = useTranslation();
2355
2440
  return /* @__PURE__ */ jsx("div", { className: styles.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
2356
2441
  InputCurrency,
2357
2442
  {
2358
2443
  ...childProps,
2359
- locale: i18n.locale,
2444
+ locale: i18n.language,
2360
2445
  currency,
2361
2446
  amount,
2362
2447
  onAmountChanged,
@@ -2365,237 +2450,217 @@ const ReportedValue = ({
2365
2450
  }
2366
2451
  ) }) });
2367
2452
  };
2368
- const financialInfoValidationRules = {
2369
- financialReportingDate: [
2370
- {
2371
- modes: ["blur"],
2372
- validate: (date) => !isEmpty(date),
2373
- errorMessage: "fieldIsRequired"
2374
- },
2375
- {
2376
- modes: ["blur"],
2377
- validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
2378
- errorMessage: "invalidFinancialReportingDate"
2379
- }
2380
- ],
2381
- currency: [
2382
- {
2383
- modes: ["blur"],
2384
- validate: (currency) => !isEmpty(currency),
2385
- errorMessage: "fieldIsRequired"
2453
+ const REPORTED_VALUE_OPTION_FIELD = [
2454
+ "reportedValueOption",
2455
+ "balanceSheetTotal",
2456
+ "annualTurnover"
2457
+ ];
2458
+ function ReportedValueOptionField({
2459
+ data,
2460
+ valid,
2461
+ errors,
2462
+ handleChangeFor,
2463
+ currency
2464
+ }) {
2465
+ const { t } = useTranslation("common");
2466
+ const updateReportedValueOption = (option) => {
2467
+ if (data.reportedValueOption) {
2468
+ handleChangeFor(data.reportedValueOption)(null);
2386
2469
  }
2387
- ],
2388
- reportedValueOption: {
2389
- modes: ["blur"],
2390
- validate: (option) => !isEmpty(option),
2391
- errorMessage: "fieldIsRequired"
2392
- },
2393
- balanceSheetTotal: {
2394
- modes: ["blur"],
2395
- validate: (amount) => !isUndefinedOrNull(amount),
2396
- errorMessage: "fieldIsRequired"
2397
- },
2398
- annualTurnover: {
2399
- modes: ["blur"],
2400
- validate: (amount) => !isUndefinedOrNull(amount),
2401
- errorMessage: "fieldIsRequired"
2402
- }
2403
- };
2404
- const financialInfoValidationEmployeesOnlyRules = {
2405
- numberOfEmployees: [
2406
- {
2407
- modes: ["blur"],
2408
- validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
2409
- errorMessage: "fieldIsRequired"
2410
- },
2470
+ const newReportedValue = option;
2471
+ handleChangeFor("reportedValueOption")(newReportedValue);
2472
+ };
2473
+ return /* @__PURE__ */ jsx(
2474
+ Field,
2411
2475
  {
2412
- modes: ["blur"],
2413
- validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
2414
- errorMessage: "pleaseEnterAValidWholeNumber"
2476
+ el: "fieldset",
2477
+ name: "reportedValueOption",
2478
+ label: t(($) => $["reportedValue"]),
2479
+ errorMessage: errors.reportedValueOption,
2480
+ helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
2481
+ isValid: Boolean(valid.reportedValueOption),
2482
+ children: (childProps) => /* @__PURE__ */ jsx(
2483
+ RadioGroup,
2484
+ {
2485
+ name: "reportedValueOption",
2486
+ ...childProps,
2487
+ value: data.reportedValueOption,
2488
+ items: [
2489
+ {
2490
+ id: "balanceSheetTotal",
2491
+ name: "balanceSheetTotal",
2492
+ content: /* @__PURE__ */ jsx(
2493
+ ReportedValue,
2494
+ {
2495
+ label: t(($) => $["balanceSheetTotal"]),
2496
+ currency,
2497
+ amount: data.balanceSheetTotal,
2498
+ onAmountChanged: handleChangeFor("balanceSheetTotal"),
2499
+ fieldName: "balanceSheetTotal",
2500
+ isValid: valid.balanceSheetTotal,
2501
+ errorMessage: errors.balanceSheetTotal
2502
+ }
2503
+ )
2504
+ },
2505
+ {
2506
+ id: "annualTurnover",
2507
+ name: "annualTurnover",
2508
+ content: /* @__PURE__ */ jsx(
2509
+ ReportedValue,
2510
+ {
2511
+ label: t(($) => $["annualTurnover"]),
2512
+ currency,
2513
+ amount: data.annualTurnover,
2514
+ onAmountChanged: handleChangeFor("annualTurnover"),
2515
+ fieldName: "annualTurnover",
2516
+ isValid: valid.annualTurnover,
2517
+ errorMessage: errors.annualTurnover
2518
+ }
2519
+ )
2520
+ }
2521
+ ],
2522
+ onChange: updateReportedValueOption,
2523
+ showContentOnlyOnSelected: true,
2524
+ className: styles.reportedValueOptions
2525
+ }
2526
+ )
2415
2527
  }
2416
- ]
2417
- };
2418
- const financialInfoValidationWithEmployeesRules = {
2419
- ...financialInfoValidationRules,
2420
- ...financialInfoValidationEmployeesOnlyRules
2421
- };
2528
+ );
2529
+ }
2422
2530
  const financialInformationFieldsForEu = [
2423
2531
  ...FINANCIAL_REPORTING_DATE_FIELD,
2424
2532
  ...CURRENCY_FIELD,
2425
- "reportedValueOption"
2533
+ ...REPORTED_VALUE_OPTION_FIELD
2426
2534
  ];
2427
2535
  const financialInformationFields = [
2428
2536
  ...NUMBER_OF_EMPLOYEES_FIELD,
2429
2537
  ...FINANCIAL_REPORTING_DATE_FIELD,
2430
2538
  ...CURRENCY_FIELD,
2431
- "reportedValueOption"
2539
+ ...REPORTED_VALUE_OPTION_FIELD
2432
2540
  ];
2433
- function FinancialInformation(props) {
2541
+ function FinancialInformation({
2542
+ id,
2543
+ country,
2544
+ validationErrors = {},
2545
+ verificationErrors = {}
2546
+ }) {
2434
2547
  const { t } = useTranslation("common");
2548
+ const { form } = useFormContext();
2435
2549
  usePageLandedEvent();
2436
- const { id, country, data: financialInformationData, multiForm, fieldValidationErrors } = props;
2437
2550
  const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
2438
- const formUtils = createFormUtils(props, t);
2439
- const showReportingFields = formUtils.isRequiredField("financialReportingDate");
2440
- const getSchema = (data2) => [
2441
- ...financialInformationFields,
2442
- ...data2.reportedValueOption ? [data2.reportedValueOption] : []
2443
- ];
2444
- const getValidator = () => {
2445
- if (!showReportingFields) {
2446
- return financialInfoValidationEmployeesOnlyRules;
2447
- }
2448
- if (country === CountryCodes.UnitedKingdom) {
2449
- return financialInfoValidationWithEmployeesRules;
2450
- }
2451
- return financialInfoValidationRules;
2452
- };
2453
- const { handleChangeFor, data, valid, errors, fieldProblems, schema } = useForm({
2454
- ...props,
2455
- schema: getSchema,
2456
- defaultData: financialInformationData,
2457
- rules: getValidator(),
2458
- fieldProblems: fieldValidationErrors
2459
- });
2460
- const { updateStateSlice } = useGlobalDataSlice(id);
2461
- useEffect(() => {
2462
- updateStateSlice({
2463
- data,
2464
- valid,
2465
- errors,
2466
- fieldProblems,
2467
- schema
2468
- });
2469
- }, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
2470
- const handleChange = useCallback(
2471
- (fieldName, mode) => multiForm ? multiForm.handleChangeFor(fieldName, "companyFinancialInformation", mode) : handleChangeFor(fieldName, mode),
2472
- [handleChangeFor, multiForm]
2551
+ const handleChangeFor = useCallback(
2552
+ (fieldName, mode) => form.handleChangeFor(fieldName, "companyFinancialInformation", mode),
2553
+ [form]
2473
2554
  );
2474
- const formData = multiForm ? multiForm.data?.companyFinancialInformation ?? {} : data;
2475
- const formErrors = multiForm ? multiForm.errors?.companyFinancialInformation ?? {} : errors;
2476
- const formValid = multiForm ? multiForm.valid?.companyFinancialInformation ?? {} : valid;
2477
- const formFieldProblems = multiForm ? multiForm.fieldProblems.companyFinancialInformation ?? {} : fieldProblems;
2478
- const updateReportedValueOption = (option) => {
2479
- if (formData.reportedValueOption) {
2480
- handleChange(formData.reportedValueOption)(null);
2481
- }
2482
- const newReportedValue = option;
2483
- handleChange("reportedValueOption")(newReportedValue);
2484
- };
2485
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-company-financial-information", children: [
2555
+ const formUtils = useMemo(
2556
+ () => createFormUtils(
2557
+ {
2558
+ data: form.data.companyFinancialInformation ?? {},
2559
+ allFields: form.allFields?.companyFinancialInformation ?? [],
2560
+ requiredFields: form.requiredFields?.companyFinancialInformation ?? [],
2561
+ optionalFields: form.optionalFields?.companyFinancialInformation ?? [],
2562
+ trustedFields: form.trustedFields?.companyFinancialInformation ?? [],
2563
+ obscuredFields: form.obscuredFields?.companyFinancialInformation ?? [],
2564
+ errors: form.errors.companyFinancialInformation ?? {},
2565
+ valid: form.valid.companyFinancialInformation ?? {}
2566
+ },
2567
+ t
2568
+ ),
2569
+ [form, handleChangeFor, t, validationErrors, verificationErrors]
2570
+ );
2571
+ const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
2572
+ return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-financial-information", children: [
2486
2573
  /* @__PURE__ */ jsx(Header, { title: t(($) => $["companyFinancialInformationFormHeading"], { ns: "business" }) }),
2574
+ /* @__PURE__ */ jsx(
2575
+ ErrorPanel,
2576
+ {
2577
+ id: "ariaErrorField",
2578
+ verificationErrors,
2579
+ validationErrors,
2580
+ formUtils
2581
+ }
2582
+ ),
2487
2583
  country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
2488
2584
  NumberOfEmployees,
2489
2585
  {
2490
- data: formUtils.getFieldData(formData, NUMBER_OF_EMPLOYEES_FIELD),
2586
+ data: formUtils.getFieldData(
2587
+ form.data.companyFinancialInformation ?? {},
2588
+ NUMBER_OF_EMPLOYEES_FIELD
2589
+ ),
2491
2590
  errors: formUtils.getFieldErrors(
2492
- formErrors,
2493
- formFieldProblems,
2591
+ form.errors.companyFinancialInformation ?? {},
2592
+ form.fieldProblems.companyFinancialInformation,
2494
2593
  NUMBER_OF_EMPLOYEES_FIELD
2495
2594
  ),
2496
- handleChangeFor: handleChange,
2595
+ handleChangeFor,
2497
2596
  labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
2498
2597
  readonly: formUtils.isReadOnly("numberOfEmployees"),
2499
- valid: formUtils.getFieldValid(formValid, NUMBER_OF_EMPLOYEES_FIELD)
2598
+ valid: formUtils.getFieldValid(
2599
+ form.valid.companyFinancialInformation ?? {},
2600
+ NUMBER_OF_EMPLOYEES_FIELD
2601
+ )
2500
2602
  }
2501
2603
  ),
2502
- showReportingFields && /* @__PURE__ */ jsxs(Fragment, { children: [
2503
- /* @__PURE__ */ jsx(
2504
- FinancialReportingDate,
2505
- {
2506
- data: formUtils.getFieldData(formData, FINANCIAL_REPORTING_DATE_FIELD),
2507
- errors: formUtils.getFieldErrors(
2508
- formErrors,
2509
- formFieldProblems,
2510
- FINANCIAL_REPORTING_DATE_FIELD
2511
- ),
2512
- handleChangeFor: handleChange,
2513
- labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
2514
- readonly: formUtils.isReadOnly("financialReportingDate"),
2515
- valid: formUtils.getFieldValid(formValid, FINANCIAL_REPORTING_DATE_FIELD)
2516
- }
2517
- ),
2518
- /* @__PURE__ */ jsx(
2519
- Currency,
2520
- {
2521
- country,
2522
- labels: { currency: t(($) => $["reportingCurrency"]) },
2523
- data: formUtils.getFieldData(formData, CURRENCY_FIELD),
2524
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, CURRENCY_FIELD),
2525
- handleChangeFor: handleChange,
2526
- readonly: formUtils.isReadOnly("currency"),
2527
- valid: formUtils.getFieldValid(formValid, CURRENCY_FIELD)
2528
- }
2529
- ),
2530
- /* @__PURE__ */ jsx(
2531
- Field,
2532
- {
2533
- el: "fieldset",
2534
- name: "reportedValueOption",
2535
- label: t(($) => $["reportedValue"]),
2536
- errorMessage: formUtils.getErrorMessage(
2537
- "reportedValueOption",
2538
- formErrors,
2539
- formFieldProblems
2540
- ),
2541
- helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
2542
- isValid: formValid.reportedValueOption,
2543
- children: (childProps) => /* @__PURE__ */ jsx(
2544
- RadioGroup,
2545
- {
2546
- name: "reportedValueOption",
2547
- ...childProps,
2548
- value: formData.reportedValueOption,
2549
- items: [
2550
- {
2551
- id: "balanceSheetTotal",
2552
- name: "balanceSheetTotal",
2553
- content: /* @__PURE__ */ jsx(
2554
- ReportedValue,
2555
- {
2556
- label: t(($) => $["balanceSheetTotal"]),
2557
- currency: formData.currency ?? defaultCurrency,
2558
- amount: formData.balanceSheetTotal,
2559
- onAmountChanged: handleChange("balanceSheetTotal"),
2560
- fieldName: "balanceSheetTotal",
2561
- isValid: formValid.balanceSheetTotal,
2562
- errorMessage: formUtils.getErrorMessage(
2563
- "balanceSheetTotal",
2564
- formErrors,
2565
- formFieldProblems
2566
- )
2567
- }
2568
- )
2569
- },
2570
- {
2571
- id: "annualTurnover",
2572
- name: "annualTurnover",
2573
- content: /* @__PURE__ */ jsx(
2574
- ReportedValue,
2575
- {
2576
- label: t(($) => $["annualTurnover"]),
2577
- currency: formData.currency ?? defaultCurrency,
2578
- amount: formData.annualTurnover,
2579
- onAmountChanged: handleChange("annualTurnover"),
2580
- fieldName: "annualTurnover",
2581
- isValid: formValid.annualTurnover,
2582
- errorMessage: formUtils.getErrorMessage(
2583
- "annualTurnover",
2584
- formErrors,
2585
- formFieldProblems
2586
- )
2587
- }
2588
- )
2589
- }
2590
- ],
2591
- onChange: updateReportedValueOption,
2592
- showContentOnlyOnSelected: true,
2593
- className: styles$1.financialInformationReportedValueOptions
2594
- }
2595
- )
2596
- }
2597
- )
2598
- ] })
2604
+ showField(FINANCIAL_REPORTING_DATE_FIELD) && /* @__PURE__ */ jsx(
2605
+ FinancialReportingDate,
2606
+ {
2607
+ data: formUtils.getFieldData(
2608
+ form.data.companyFinancialInformation ?? {},
2609
+ FINANCIAL_REPORTING_DATE_FIELD
2610
+ ),
2611
+ errors: formUtils.getFieldErrors(
2612
+ form.errors.companyFinancialInformation ?? {},
2613
+ form.fieldProblems.companyFinancialInformation,
2614
+ FINANCIAL_REPORTING_DATE_FIELD
2615
+ ),
2616
+ handleChangeFor,
2617
+ labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
2618
+ readonly: formUtils.isReadOnly("financialReportingDate"),
2619
+ valid: formUtils.getFieldValid(
2620
+ form.valid.companyFinancialInformation ?? {},
2621
+ FINANCIAL_REPORTING_DATE_FIELD
2622
+ )
2623
+ }
2624
+ ),
2625
+ showField(CURRENCY_FIELD) && /* @__PURE__ */ jsx(
2626
+ Currency,
2627
+ {
2628
+ country,
2629
+ labels: { currency: t(($) => $["reportingCurrency"]) },
2630
+ data: formUtils.getFieldData(form.data.companyFinancialInformation ?? {}, CURRENCY_FIELD),
2631
+ errors: formUtils.getFieldErrors(
2632
+ form.errors.companyFinancialInformation ?? {},
2633
+ form.fieldProblems.companyFinancialInformation,
2634
+ CURRENCY_FIELD
2635
+ ),
2636
+ handleChangeFor,
2637
+ readonly: formUtils.isReadOnly("currency"),
2638
+ valid: formUtils.getFieldValid(
2639
+ form.valid.companyFinancialInformation ?? {},
2640
+ CURRENCY_FIELD
2641
+ )
2642
+ }
2643
+ ),
2644
+ showField(REPORTED_VALUE_OPTION_FIELD) && /* @__PURE__ */ jsx(
2645
+ ReportedValueOptionField,
2646
+ {
2647
+ data: formUtils.getFieldData(
2648
+ form.data.companyFinancialInformation ?? {},
2649
+ REPORTED_VALUE_OPTION_FIELD
2650
+ ),
2651
+ valid: formUtils.getFieldValid(
2652
+ form.valid.companyFinancialInformation ?? {},
2653
+ REPORTED_VALUE_OPTION_FIELD
2654
+ ),
2655
+ errors: formUtils.getFieldErrors(
2656
+ form.errors.companyFinancialInformation ?? {},
2657
+ form.fieldProblems.companyFinancialInformation,
2658
+ REPORTED_VALUE_OPTION_FIELD
2659
+ ),
2660
+ handleChangeFor,
2661
+ currency: form.data.companyFinancialInformation?.currency ?? defaultCurrency
2662
+ }
2663
+ )
2599
2664
  ] });
2600
2665
  }
2601
2666
  const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [...STATE_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
@@ -2607,8 +2672,7 @@ const getBasicInformationFields = (country, taskType) => {
2607
2672
  return fields;
2608
2673
  };
2609
2674
  const getFinancialInformationFields = (country) => {
2610
- const fields = country === CountryCodes.UnitedKingdom ? financialInformationFields : financialInformationFieldsForEu;
2611
- return [...fields, "netAssets", "balanceSheetTotal", "annualTurnover"];
2675
+ return country === CountryCodes.UnitedKingdom ? financialInformationFields : financialInformationFieldsForEu;
2612
2676
  };
2613
2677
  const staticBusinessDetailsForms = {
2614
2678
  businessSelection: {
@@ -3234,7 +3298,7 @@ function BusinessDetailsMultiform({
3234
3298
  requiredFields: form.requiredFields?.companyTaxDocument,
3235
3299
  optionalFields: form.optionalFields?.companyTaxDocument,
3236
3300
  trustedFields: form.trustedFields?.companyTaxDocument,
3237
- handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
3301
+ handleFieldChange: (fieldName) => handleChange("companyTaxDocument", fieldName)
3238
3302
  }
3239
3303
  ) : /* @__PURE__ */ jsx(VatDocument, { children: /* @__PURE__ */ jsx(
3240
3304
  MemoizedDocumentUpload,
@@ -3372,15 +3436,11 @@ function BusinessDetailsMultiform({
3372
3436
  return /* @__PURE__ */ jsx(
3373
3437
  FinancialInformation,
3374
3438
  {
3375
- multiForm: form,
3376
3439
  id: activeForm2.formId,
3377
3440
  country,
3378
- data: form.data.companyFinancialInformation,
3379
- allFields: form.allFields?.companyFinancialInformation,
3380
- requiredFields: form.requiredFields?.companyFinancialInformation,
3381
- optionalFields: form.optionalFields?.companyFinancialInformation,
3382
- trustedFields: form.trustedFields?.companyFinancialInformation,
3383
- shouldValidate
3441
+ shouldValidate,
3442
+ validationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3443
+ verificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
3384
3444
  }
3385
3445
  );
3386
3446
  default:
@@ -3396,8 +3456,78 @@ const CompanyStructureValidation = {
3396
3456
  errorMessage: "fieldIsRequired"
3397
3457
  }
3398
3458
  };
3399
- const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
3400
- const registrationDocument = getDocument(entityId, "registrationDocument");
3459
+ const currencyMetadata = {
3460
+ validators: {
3461
+ modes: ["blur"],
3462
+ validate: (currency) => !isEmpty(currency),
3463
+ errorMessage: "fieldIsRequired"
3464
+ }
3465
+ };
3466
+ const financialReportingDateMetadata = {
3467
+ validators: [
3468
+ {
3469
+ modes: ["blur"],
3470
+ validate: (date) => !isEmpty(date),
3471
+ errorMessage: "fieldIsRequired"
3472
+ },
3473
+ {
3474
+ modes: ["blur"],
3475
+ validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
3476
+ errorMessage: "invalidFinancialReportingDate"
3477
+ }
3478
+ ]
3479
+ };
3480
+ const numberOfEmployeesMetadata = {
3481
+ validators: [
3482
+ {
3483
+ modes: ["blur"],
3484
+ validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
3485
+ errorMessage: "fieldIsRequired"
3486
+ },
3487
+ {
3488
+ modes: ["blur"],
3489
+ validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
3490
+ errorMessage: "pleaseEnterAValidWholeNumber"
3491
+ }
3492
+ ]
3493
+ };
3494
+ const reportedValueOptionMetadata = {
3495
+ validators: {
3496
+ modes: ["blur"],
3497
+ validate: (option) => !isEmpty(option),
3498
+ errorMessage: "fieldIsRequired"
3499
+ }
3500
+ };
3501
+ const balanceSheetTotalMetadata = {
3502
+ validators: {
3503
+ modes: ["blur"],
3504
+ validate: (amount) => !isUndefinedOrNull(amount),
3505
+ errorMessage: "fieldIsRequired"
3506
+ }
3507
+ };
3508
+ const annualTurnoverMetadata = {
3509
+ validators: {
3510
+ modes: ["blur"],
3511
+ validate: (amount) => !isUndefinedOrNull(amount),
3512
+ errorMessage: "fieldIsRequired"
3513
+ }
3514
+ };
3515
+ const financialInfoValidationRules = {
3516
+ financialReportingDate: financialReportingDateMetadata.validators,
3517
+ currency: currencyMetadata.validators,
3518
+ reportedValueOption: reportedValueOptionMetadata.validators,
3519
+ balanceSheetTotal: balanceSheetTotalMetadata.validators,
3520
+ annualTurnover: annualTurnoverMetadata.validators
3521
+ };
3522
+ const financialInfoValidationEmployeesOnlyRules = {
3523
+ numberOfEmployees: numberOfEmployeesMetadata.validators
3524
+ };
3525
+ const financialInfoValidationWithEmployeesRules = {
3526
+ ...financialInfoValidationRules,
3527
+ ...financialInfoValidationEmployeesOnlyRules
3528
+ };
3529
+ const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
3530
+ const registrationDocument = getDocument(entityId, "registrationDocument");
3401
3531
  const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo");
3402
3532
  const proofOfDirector = getDocument(entityId, "proofOfDirector");
3403
3533
  const proofOfSignatory = getDocument(entityId, "proofOfSignatory");
@@ -3651,84 +3781,244 @@ const mapLegalEntityToBusinessDetailsSchema = ({
3651
3781
  }
3652
3782
  }, {});
3653
3783
  };
3654
- const businessDetailsBase = {
3655
- /* Base required fields */
3656
- country: { rule: "REQUIRED" },
3657
- entityType: { rule: "businessRequiresCompanyType" },
3658
- legalCompanyName: { rule: "REQUIRED" },
3659
- jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
3660
- jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
3661
- hasDoingBusinessAs: { rule: "REQUIRED" },
3662
- doingBusinessAs: { rule: "requireDoingBusinessAsName" },
3663
- registrationAddress: { rule: "REQUIRED" },
3664
- operationalAddressIsSame: { rule: "REQUIRED" },
3665
- /* Base optional fields */
3666
- operationalAddress: { rule: "OPTIONAL" },
3667
- /* Fields with custom country specific rules */
3668
- hasSelectedBusiness: { rule: "usingCompanySearch" },
3669
- stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
3670
- stockISIN: { rule: "ifPubliclyTradedCompany" },
3671
- stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
3672
- dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
3673
- stateOrProvince: { rule: "usingCompanySearch" },
3674
- registrationNumber: { rule: "countryRequiresRegistrationNumber" },
3675
- registrationNumberType: { rule: "registrationNumberType" },
3676
- exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
3677
- eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
3678
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
3679
- taxDocument: { rule: "ifCountryUsAndTinFailed" },
3680
- /* Fields derived from capabilities */
3681
- industryCodes: { rule: "isIndustryCodeRequired" }
3784
+ function buildRequiredForms({
3785
+ config: {
3786
+ forms,
3787
+ requiredFields,
3788
+ optionalFields,
3789
+ isValid,
3790
+ problems,
3791
+ isSettingEnabled,
3792
+ accountHolder,
3793
+ legalEntityResponse
3794
+ },
3795
+ options
3796
+ }) {
3797
+ const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
3798
+ legalEntityResponse.organization?.type ?? ""
3799
+ ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
3800
+ const filteredForms = Object.values(forms).filter(({ formId }) => {
3801
+ if (formId === "businessSelection") {
3802
+ if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
3803
+ }
3804
+ if (formId === "companyStructure") {
3805
+ if (skipCompanyStructure) return false;
3806
+ }
3807
+ if (requiredFields || optionalFields) {
3808
+ return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
3809
+ }
3810
+ return true;
3811
+ });
3812
+ const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
3813
+ return addValidityToForms(requiredForms, isValid, problems);
3814
+ }
3815
+ const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
3816
+ const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
3817
+ if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
3818
+ return void 0;
3819
+ }
3820
+ return !basicData.countryOfGoverningLaw ? CountryCodes.UnitedKingdom : basicData.countryOfGoverningLaw;
3682
3821
  };
3683
- const taxInformationBase = {
3684
- vatNumber: { rule: "countryUsesVat" },
3685
- vatNumberType: { rule: "vatNumberType" },
3686
- exemptedFromVat: { rule: "isVatExempt" },
3687
- vatAbsenceReason: { rule: "isVatExempt" },
3688
- taxInformation: { rule: "countryUsesTaxId" },
3689
- exemptedFromTax: { rule: "countryHasTaxExemptions" },
3690
- isUen: { rule: "countryUsesUenOrGst" }
3822
+ function createStructuredListItem(term, details, t) {
3823
+ if (!details) return;
3824
+ return {
3825
+ term: t(($) => $[term], { ns: "common" }),
3826
+ details
3827
+ };
3828
+ }
3829
+ function getRegistrationNumberLabel(country, companyType, data) {
3830
+ return resolveFieldMetadata(
3831
+ registrationNumberDefaultFieldConfig[country],
3832
+ {
3833
+ companyType,
3834
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
3835
+ },
3836
+ registrationNumberDefaultFieldMetadata
3837
+ ).label ?? "";
3838
+ }
3839
+ function getTaxIdLabel(country) {
3840
+ return resolveFieldMetadata(
3841
+ taxInformationDefaultFieldConfig[country],
3842
+ {
3843
+ taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
3844
+ // TODO use type selector
3845
+ companyType: void 0
3846
+ },
3847
+ taxInformationDefaultFieldMetadata
3848
+ ).label ?? "";
3849
+ }
3850
+ const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
3851
+ const country = data.country;
3852
+ return {
3853
+ legalCompanyName: data.legalCompanyName,
3854
+ country: datasetUtils.getCountryName(data.country),
3855
+ [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
3856
+ data.stateOrProvince,
3857
+ data.country
3858
+ ),
3859
+ [getTaxIdLabel(country)]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
3860
+ [getRegistrationNumberLabel(country, companyType, data)]: data.registrationNumber,
3861
+ countryOfGoverningLaw: datasetUtils.getCountryName(
3862
+ getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data)
3863
+ )
3864
+ };
3691
3865
  };
3692
- const financialInformationBase = {
3693
- numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
3694
- financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
3695
- currency: { rule: "isFinancialReportingFieldsRequired" },
3696
- reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
3697
- annualTurnover: { rule: "annualTurnoverRequired" },
3698
- netAssets: { rule: "netAssetsRequired" },
3699
- balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
3866
+ const formatAdditionalInformation = (data, country, companyType) => {
3867
+ return {
3868
+ businessStructure: data.legalFormLabel,
3869
+ doingBusinessAs: data.doingBusinessAs,
3870
+ industry: data.industryCodes?.[0].name,
3871
+ [getRegistrationNumberLabel(country, companyType, data)]: data.registrationNumber,
3872
+ [getTaxIdLabel(country)]: !data.isUen && data.taxInformation?.find((taxId) => country === taxId.country)?.number,
3873
+ vatNumber: data.vatNumber,
3874
+ vatAbsenceReason: data.vatAbsenceReason,
3875
+ dateOfIncorporation: data.dateOfIncorporation,
3876
+ stockExchangeMIC: data.stockExchangeMIC,
3877
+ stockISIN: data.stockISIN,
3878
+ stockTickerSymbol: data.stockTickerSymbol,
3879
+ eInvoicingCode: data.eInvoicingCode
3880
+ };
3700
3881
  };
3701
- const businessDetailsFieldsPerScenario = {
3702
- L0: {
3703
- country: { rule: "REQUIRED" },
3704
- legalCompanyName: { rule: "REQUIRED" },
3705
- stateOrProvince: { rule: "usingCompanySearch" },
3706
- ...financialInformationBase
3707
- },
3708
- L1: {
3709
- ...businessDetailsBase,
3710
- ...financialInformationBase
3711
- },
3712
- // L for org is basically L_TAXINFO for Individuals (we will fix this in the near future
3713
- // to make them aligned and less confusing)
3714
- L: {
3715
- ...businessDetailsBase,
3716
- ...taxInformationBase,
3717
- ...financialInformationBase
3718
- },
3719
- L_PROOFOFADDRESS: {
3720
- // TODO this field does not exist
3721
- // proofOfAddressDocument: { rule: 'REQUIRED' },
3722
- },
3723
- L_REGDOC: {
3724
- registrationDocument: { rule: "REQUIRED" }
3725
- },
3726
- L_TAXDOC: {
3727
- taxDocument: { rule: "REQUIRED" }
3728
- },
3729
- L_BAFIN: {
3730
- legalForm: { rule: "REQUIRED" }
3882
+ const formatAddress = (data, datasetUtils, country, version) => {
3883
+ return mapAddressLabelsNewSummary(data, datasetUtils);
3884
+ };
3885
+ const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
3886
+ if (!data) return {};
3887
+ if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
3888
+ return country === CountryCodes.UnitedKingdom ? { numberOfEmployees: data.numberOfEmployees } : {};
3731
3889
  }
3890
+ return {
3891
+ currency: data.currency,
3892
+ financialReportingDate: data.financialReportingDate,
3893
+ ...country === CountryCodes.UnitedKingdom ? { numberOfEmployees: data.numberOfEmployees } : {},
3894
+ ...data.balanceSheetTotal ? { balanceSheetTotal: formatCurrency(data.balanceSheetTotal, data.currency, language) } : {},
3895
+ ...data.annualTurnover ? { annualTurnover: formatCurrency(data.annualTurnover, data.currency, language) } : {}
3896
+ };
3897
+ };
3898
+ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
3899
+ const OMITTED_FORMS = ["businessSelection", "summary"];
3900
+ const datasetUtils = datasetUtilities(language);
3901
+ const isCountryOfGoverningLawEnabled = isExperimentEnabled(
3902
+ "EnableCountryOfGoverningLawForUKCompanies"
3903
+ );
3904
+ const getSummaryItemsForForm = (formId) => {
3905
+ if (!data[formId]) return {};
3906
+ switch (formId) {
3907
+ case "basicInformation":
3908
+ return formatBasicInformation(
3909
+ data[formId],
3910
+ datasetUtils,
3911
+ data.companyStructure?.entityType,
3912
+ isCountryOfGoverningLawEnabled
3913
+ );
3914
+ case "companyStructure":
3915
+ return {
3916
+ entityType: t(
3917
+ ($) => $[companyTypeMetadata[data[formId]?.entityType]?.name],
3918
+ { ns: "business" }
3919
+ )
3920
+ };
3921
+ case "additionalInformation":
3922
+ return formatAdditionalInformation(
3923
+ data[formId],
3924
+ data.basicInformation?.country,
3925
+ data.companyStructure?.entityType
3926
+ );
3927
+ case "companyRegistrationDocument":
3928
+ return {
3929
+ fileName: data[formId].registrationDocument?.[0]?.name,
3930
+ description: data[formId].description
3931
+ };
3932
+ case "companyTaxDocument":
3933
+ return {
3934
+ fileName: data[formId]?.taxDocument?.[0]?.name,
3935
+ description: data[formId].description
3936
+ };
3937
+ case "companyProofOfDirectorDocument":
3938
+ return {
3939
+ fileName: data[formId]?.proofOfDirector?.[0]?.name,
3940
+ description: data[formId].description
3941
+ };
3942
+ case "companyProofOfSignatoryDocument":
3943
+ return {
3944
+ fileName: data[formId]?.proofOfSignatory?.[0]?.name,
3945
+ description: data[formId].description
3946
+ };
3947
+ case "companyProofOfOwnershipDocument":
3948
+ return {
3949
+ fileName: data[formId].proofOfOwnership?.map((doc) => doc.name).join("\n"),
3950
+ description: data[formId].description
3951
+ };
3952
+ case "companyFinancialInformation":
3953
+ return formatFinancialInformationSummary(
3954
+ data[formId],
3955
+ language,
3956
+ data.basicInformation?.country,
3957
+ data.additionalInformation?.dateOfIncorporation
3958
+ );
3959
+ default:
3960
+ return {};
3961
+ }
3962
+ };
3963
+ const translateAndFilterMappedSummary = (data2) => {
3964
+ const tmp = [];
3965
+ for (const summaryItem in data2) {
3966
+ const item = createStructuredListItem(
3967
+ summaryItem,
3968
+ data2[summaryItem],
3969
+ t
3970
+ );
3971
+ if (item) tmp.push(item);
3972
+ }
3973
+ return tmp;
3974
+ };
3975
+ const summarySections = [];
3976
+ for (const form of forms) {
3977
+ if (OMITTED_FORMS.includes(form.formId)) continue;
3978
+ const summaryItems = translateAndFilterMappedSummary(
3979
+ getSummaryItemsForForm(form.formId)
3980
+ );
3981
+ if (summaryItems.length > 0) {
3982
+ summarySections.push({
3983
+ formId: form.formId,
3984
+ label: t(($) => $[form.formName], { ns: "common" }),
3985
+ items: summaryItems
3986
+ });
3987
+ }
3988
+ if (form.formId === "additionalInformation") {
3989
+ const registrationAddressSummaryItems = translateAndFilterMappedSummary(
3990
+ formatAddress(
3991
+ data.additionalInformation?.registrationAddress,
3992
+ datasetUtils,
3993
+ data.basicInformation?.country
3994
+ )
3995
+ );
3996
+ if (registrationAddressSummaryItems.length > 0) {
3997
+ summarySections.push({
3998
+ formId: "registrationAddress",
3999
+ label: t(($) => $["registrationAddress"], { ns: "common" }),
4000
+ items: registrationAddressSummaryItems
4001
+ });
4002
+ }
4003
+ if (data[form.formId]?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
4004
+ const operationalAddressSummaryItems = translateAndFilterMappedSummary(
4005
+ formatAddress(
4006
+ data.additionalInformation?.operationalAddress,
4007
+ datasetUtils,
4008
+ data.basicInformation?.country
4009
+ )
4010
+ );
4011
+ if (operationalAddressSummaryItems.length > 0) {
4012
+ summarySections.push({
4013
+ formId: "operationAddress",
4014
+ label: t(($) => $["operationalAddress"], { ns: "common" }),
4015
+ items: operationalAddressSummaryItems
4016
+ });
4017
+ }
4018
+ }
4019
+ }
4020
+ }
4021
+ return summarySections;
3732
4022
  };
3733
4023
  const adjustFormData = (oldFormData, newFormData) => {
3734
4024
  const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
@@ -3752,34 +4042,6 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
3752
4042
  return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
3753
4043
  }, {});
3754
4044
  };
3755
- const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
3756
- let summary;
3757
- if (!data) return void 0;
3758
- if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
3759
- if (country === CountryCodes.UnitedKingdom) {
3760
- summary = { numberOfEmployees: `${data.numberOfEmployees}` };
3761
- return summary;
3762
- }
3763
- return void 0;
3764
- }
3765
- summary = {
3766
- currency: data.currency,
3767
- financialReportingDate: data.financialReportingDate
3768
- };
3769
- if (country === CountryCodes.UnitedKingdom) {
3770
- summary.numberOfEmployees = `${data.numberOfEmployees}`;
3771
- }
3772
- if (data.balanceSheetTotal) {
3773
- summary.balanceSheetTotal = summaryItem(
3774
- "balanceSheetTotal",
3775
- formatCurrency(data.balanceSheetTotal, data.currency, language)
3776
- );
3777
- }
3778
- if (data.annualTurnover) {
3779
- summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
3780
- }
3781
- return summary;
3782
- };
3783
4045
  const BUSINESS_BANK_ACCOUNT_TAX_ID_COUNTRIES = [
3784
4046
  CountryCodes.Estonia,
3785
4047
  CountryCodes.Finland,
@@ -3920,295 +4182,39 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
3920
4182
  if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
3921
4183
  entityObject.doingBusinessAsAbsent = !data.additionalInformation.hasDoingBusinessAs;
3922
4184
  }
3923
- } else {
3924
- entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
3925
- delete entityObject.doingBusinessAsAbsent;
3926
- }
3927
- if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
3928
- entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
3929
- }
3930
- const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
3931
- data.additionalInformation?.registrationAddress
3932
- );
3933
- if (addressLocalizations.length > 0)
3934
- entityObject.registeredAddress.localization = addressLocalizations;
3935
- if (entityObject.registeredAddress?.country && entityObject.registeredAddress?.stateOrProvince && !COUNTRIES_WITH_STATES_DATASET.includes(entityObject.registeredAddress?.country)) {
3936
- entityObject.registeredAddress.stateOrProvince = "";
3937
- }
3938
- if (!isEmpty$1(data.companyFinancialInformation)) {
3939
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
3940
- "EnableIncorporationDateBasedFinancialValidationForHO"
3941
- );
3942
- entityObject.financialReports = [
3943
- mapFinancialInformationToFinancialReport(
3944
- data.companyFinancialInformation,
3945
- isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
3946
- )
3947
- ];
3948
- }
3949
- }
3950
- requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
3951
- if (entityObject?.registeredAddress.country === "US") {
3952
- delete entityObject.registrationNumber;
3953
- }
3954
- if (!canSaveRegNumberAbsentState) {
3955
- delete requestObj.organization?.registrationNumberAbsent;
3956
- }
3957
- return requestObj;
3958
- };
3959
- function buildRequiredForms({
3960
- config: {
3961
- forms,
3962
- requiredFields,
3963
- optionalFields,
3964
- isValid,
3965
- problems,
3966
- isSettingEnabled,
3967
- accountHolder,
3968
- legalEntityResponse
3969
- },
3970
- options
3971
- }) {
3972
- const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
3973
- legalEntityResponse.organization?.type ?? ""
3974
- ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
3975
- const filteredForms = Object.values(forms).filter(({ formId }) => {
3976
- if (formId === "businessSelection") {
3977
- if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
3978
- }
3979
- if (formId === "companyStructure") {
3980
- if (skipCompanyStructure) return false;
3981
- }
3982
- if (requiredFields || optionalFields) {
3983
- return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
3984
- }
3985
- return true;
3986
- });
3987
- const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
3988
- return addValidityToForms(requiredForms, isValid, problems);
3989
- }
3990
- const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
3991
- const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
3992
- const country = data.country;
3993
- const registrationNumberLabel = resolveFieldMetadata(
3994
- registrationNumberDefaultFieldConfig[country],
3995
- {
3996
- companyType,
3997
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
3998
- },
3999
- registrationNumberDefaultFieldMetadata
4000
- ).label;
4001
- const taxIdLabel = resolveFieldMetadata(
4002
- taxInformationDefaultFieldConfig[country],
4003
- {
4004
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
4005
- // TODO use type selector
4006
- companyType: void 0
4007
- },
4008
- taxInformationDefaultFieldMetadata
4009
- ).label;
4010
- const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
4011
- return {
4012
- ["legalCompanyName"]: data.legalCompanyName,
4013
- country: datasetUtils.getCountryName(data.country),
4014
- [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
4015
- data.stateOrProvince,
4016
- data.country
4017
- ),
4018
- [taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
4019
- [registrationNumberLabel]: data.registrationNumber,
4020
- countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
4021
- };
4022
- };
4023
- const formatAdditionalInformation = (data, country, companyType, t) => {
4024
- const registrationNumberLabel = resolveFieldMetadata(
4025
- registrationNumberDefaultFieldConfig[country],
4026
- {
4027
- companyType,
4028
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
4029
- },
4030
- registrationNumberDefaultFieldMetadata
4031
- ).label;
4032
- const taxIdLabel = resolveFieldMetadata(
4033
- taxInformationDefaultFieldConfig[country],
4034
- {
4035
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
4036
- // TODO use type selector
4037
- companyType: void 0
4038
- },
4039
- taxInformationDefaultFieldMetadata
4040
- ).label;
4041
- return {
4042
- ["businessStructure"]: data.legalFormLabel,
4043
- ["doingBusinessAs"]: data.doingBusinessAs,
4044
- ["industry"]: data.industryCodes?.[0].name,
4045
- [registrationNumberLabel]: data.registrationNumber,
4046
- [taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
4047
- ["vatNumber"]: data.vatNumber,
4048
- ["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
4049
- ["dateOfIncorporation"]: data.dateOfIncorporation,
4050
- ["stockExchangeMIC"]: data.stockExchangeMIC,
4051
- ["stockISIN"]: data.stockISIN,
4052
- ["stockTickerSymbol"]: data.stockTickerSymbol,
4053
- ["eInvoicingCode"]: data.eInvoicingCode
4054
- };
4055
- };
4056
- const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
4057
- const datasetUtils = datasetUtilities(language);
4058
- return entriesOf(data).reduce((summaryData, [form]) => {
4059
- if (!data[form]) return summaryData;
4060
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
4061
- "EnableCountryOfGoverningLawForUKCompanies"
4062
- );
4063
- switch (form) {
4064
- case "basicInformation":
4065
- return {
4066
- ...summaryData,
4067
- [form]: formatBasicInformation(
4068
- data[form],
4069
- datasetUtils,
4070
- data.companyStructure?.entityType,
4071
- isCountryOfGoverningLawEnabled
4072
- )
4073
- };
4074
- case "companyStructure":
4075
- return {
4076
- ...summaryData,
4077
- [form]: {
4078
- entityType: t(
4079
- ($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
4080
- {
4081
- ns: "business"
4082
- }
4083
- )
4084
- }
4085
- };
4086
- case "additionalInformation":
4087
- return {
4088
- ...summaryData,
4089
- [form]: {
4090
- hasInnerForms: true,
4091
- additionalInformationFormName: formatAdditionalInformation(
4092
- data[form],
4093
- data.basicInformation?.country,
4094
- data.companyStructure?.entityType,
4095
- t
4096
- ),
4097
- registrationAddress: data.basicInformation?.country === CountryCodes.Japan && version === 4 ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
4098
- operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? data.basicInformation?.country === CountryCodes.Japan && version === 4 ? mapJpAddressSummary(data[form].operationalAddress, datasetUtils) : mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
4099
- }
4100
- };
4101
- case "companyRegistrationDocument":
4102
- if (!isDocumentsRequired(forms)) return summaryData;
4103
- return {
4104
- ...summaryData,
4105
- [form]: {
4106
- companyRegistrationDocument: {
4107
- fileName: data[form].registrationDocument?.[0]?.name,
4108
- description: data[form].description
4109
- }
4110
- }
4111
- };
4112
- case "companyTaxDocument":
4113
- if (!isDocumentsRequired(forms)) return summaryData;
4114
- return {
4115
- ...summaryData,
4116
- [form]: {
4117
- companyTaxDocument: {
4118
- fileName: data[form].taxDocument?.[0]?.name,
4119
- description: data[form].description
4120
- }
4121
- }
4122
- };
4123
- case "companyProofOfDirectorDocument":
4124
- if (!isDocumentsRequired(forms)) return summaryData;
4125
- return {
4126
- ...summaryData,
4127
- [form]: {
4128
- companyProofOfDirectorDocument: {
4129
- fileName: data[form].proofOfDirector?.[0]?.name,
4130
- description: data[form].description
4131
- }
4132
- }
4133
- };
4134
- case "companyProofOfSignatoryDocument":
4135
- if (!isDocumentsRequired(forms)) return summaryData;
4136
- return {
4137
- ...summaryData,
4138
- [form]: {
4139
- companyProofOfSignatoryDocument: {
4140
- fileName: data[form].proofOfSignatory?.[0]?.name,
4141
- description: data[form].description
4142
- }
4143
- }
4144
- };
4145
- case "companyProofOfOwnershipDocument":
4146
- if (!isDocumentsRequired(forms)) return summaryData;
4147
- return {
4148
- ...summaryData,
4149
- [form]: {
4150
- companyProofOfOwnershipDocument: {
4151
- fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n"),
4152
- description: data[form].description
4153
- }
4154
- }
4155
- };
4156
- case "companyFinancialInformation": {
4157
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
4158
- "EnableIncorporationDateBasedFinancialValidationForHO"
4159
- );
4160
- return {
4161
- ...summaryData,
4162
- [form]: formatFinancialInformationSummary(
4163
- data[form],
4164
- language,
4165
- data.basicInformation?.country,
4166
- isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
4167
- )
4168
- };
4169
- }
4170
- default:
4171
- return summaryData;
4172
- }
4173
- }, {});
4174
- };
4175
- async function submitDocuments({
4176
- data,
4177
- legalEntity,
4178
- forms,
4179
- documentUtils,
4180
- userEvents
4181
- }) {
4182
- if (!isDocumentsRequired(forms)) return;
4183
- const logger2 = createLogger();
4184
- const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
4185
- formattedDocument.forEach((doc) => {
4186
- const existingDoc = getDocument(legalEntity.id, doc.type);
4187
- if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
4188
- doc.attachments = mergeProofOfOwnershipAttachments(
4189
- existingDoc.attachments,
4190
- doc.attachments
4191
- ).filter((attachment) => attachment.pageName);
4185
+ } else {
4186
+ entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
4187
+ delete entityObject.doingBusinessAsAbsent;
4188
+ }
4189
+ if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
4190
+ entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
4191
+ }
4192
+ const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
4193
+ data.additionalInformation?.registrationAddress
4194
+ );
4195
+ if (addressLocalizations.length > 0)
4196
+ entityObject.registeredAddress.localization = addressLocalizations;
4197
+ if (entityObject.registeredAddress?.country && entityObject.registeredAddress?.stateOrProvince && !COUNTRIES_WITH_STATES_DATASET.includes(entityObject.registeredAddress?.country)) {
4198
+ entityObject.registeredAddress.stateOrProvince = "";
4199
+ }
4200
+ if (!isEmpty$1(data.companyFinancialInformation)) {
4201
+ entityObject.financialReports = [
4202
+ mapFinancialInformationToFinancialReport(
4203
+ data.companyFinancialInformation,
4204
+ data.additionalInformation?.dateOfIncorporation
4205
+ )
4206
+ ];
4192
4207
  }
4193
- });
4194
- try {
4195
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
4196
- formattedDocument.forEach((doc) => {
4197
- userEvents.addTaskEvent("Success", {
4198
- actionType: "upload",
4199
- documentType: doc.type,
4200
- fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
4201
- });
4202
- });
4203
- } catch (err) {
4204
- logger2.error(err);
4205
- userEvents.addTaskEvent("Encountered error", {
4206
- actionType: "upload",
4207
- returnType: err.errorCode,
4208
- returnValue: err.title ?? err.message
4209
- });
4210
4208
  }
4211
- }
4209
+ requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
4210
+ if (entityObject?.registeredAddress.country === "US") {
4211
+ delete entityObject.registrationNumber;
4212
+ }
4213
+ if (!canSaveRegNumberAbsentState) {
4214
+ delete requestObj.organization?.registrationNumberAbsent;
4215
+ }
4216
+ return requestObj;
4217
+ };
4212
4218
  async function submit({
4213
4219
  data,
4214
4220
  legalEntityResponse,
@@ -4232,7 +4238,8 @@ async function submit({
4232
4238
  efpBusinessLines,
4233
4239
  createBusinessLine,
4234
4240
  updateBusinessLine,
4235
- matchingScenario
4241
+ matchingScenario,
4242
+ invalidateRootLegalEntity
4236
4243
  }) {
4237
4244
  const logger2 = createLogger();
4238
4245
  setLoadingStatus("loading");
@@ -4277,7 +4284,8 @@ async function submit({
4277
4284
  const newRoles = nestedLegalEntityDetails2.roles;
4278
4285
  const rolesChanged = !doArraysMatch(existingRoles, newRoles);
4279
4286
  if (rolesChanged) {
4280
- const updatedAssociations = {
4287
+ await handleUpdateLegalEntity({
4288
+ id: associatedLegalArrangement2.id,
4281
4289
  entityAssociations: [
4282
4290
  ...newRoles.map((role) => ({
4283
4291
  type: role,
@@ -4285,10 +4293,6 @@ async function submit({
4285
4293
  })),
4286
4294
  ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id)
4287
4295
  ]
4288
- };
4289
- await handleUpdateLegalEntity({
4290
- ...updatedAssociations,
4291
- id: associatedLegalArrangement2.id
4292
4296
  });
4293
4297
  }
4294
4298
  return;
@@ -4327,79 +4331,6 @@ async function submit({
4327
4331
  delete filteredData.basicInformation.countryOfGoverningLaw;
4328
4332
  }
4329
4333
  }
4330
- const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
4331
- if (createBusinessLine && updateBusinessLine && primaryIndustryCode) {
4332
- const bankingBusinessLines = [];
4333
- const issuingBusinessLines = [];
4334
- if (efpBusinessLines) {
4335
- for (const bl of efpBusinessLines) {
4336
- if (bl.service === "banking") bankingBusinessLines.push(bl);
4337
- else issuingBusinessLines.push(bl);
4338
- }
4339
- }
4340
- const promises = [];
4341
- const operations = [];
4342
- const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
4343
- if (businessLines.length) {
4344
- for (const bl of businessLines) {
4345
- if (bl.industryCode === primaryIndustryCode) continue;
4346
- const payload = {
4347
- id: bl.id,
4348
- legalEntityId: legalEntityResponse.id,
4349
- industryCode: primaryIndustryCode,
4350
- service
4351
- };
4352
- promises.push(updateBusinessLine(payload));
4353
- operations.push(payload);
4354
- }
4355
- } else if (requestedCapability) {
4356
- const payload = {
4357
- legalEntityId: legalEntityResponse.id,
4358
- industryCode: primaryIndustryCode,
4359
- service
4360
- };
4361
- promises.push(createBusinessLine(payload));
4362
- operations.push(payload);
4363
- }
4364
- };
4365
- updateOrCreateBusinessLinesIfNeeded(
4366
- bankingBusinessLines,
4367
- requestingBanking(legalEntityResponse),
4368
- "banking"
4369
- );
4370
- updateOrCreateBusinessLinesIfNeeded(
4371
- issuingBusinessLines,
4372
- requestingIssuing(legalEntityResponse),
4373
- "issuing"
4374
- );
4375
- let hadRejection = false;
4376
- (await Promise.allSettled(promises)).forEach((result, idx) => {
4377
- if (result.status !== "rejected") return;
4378
- const op = operations[idx];
4379
- logger2.log(
4380
- `Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
4381
- );
4382
- hadRejection = true;
4383
- });
4384
- const eventPayload = {
4385
- actionType: trackingPayload.actionType,
4386
- legalEntityName: trackingPayload.legalEntityName
4387
- };
4388
- if (!hadRejection) {
4389
- userEvents.addTaskEvent("Success", eventPayload);
4390
- } else {
4391
- userEvents.addTaskEvent("Encountered error", {
4392
- ...eventPayload,
4393
- returnType: "businessLines",
4394
- returnValue: "couldNotCreateOrUpdateBusinessLine"
4395
- });
4396
- showToast({
4397
- label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
4398
- variant: "error"
4399
- });
4400
- return setLoadingStatus("success");
4401
- }
4402
- }
4403
4334
  try {
4404
4335
  const mappedLegalEntity = {
4405
4336
  ...mapBusinessDetailsSchemaToLegalEntity(
@@ -4437,11 +4368,23 @@ async function submit({
4437
4368
  forms,
4438
4369
  userEvents
4439
4370
  });
4371
+ await submitBusinessLines({
4372
+ data,
4373
+ legalEntity,
4374
+ trackingPayload,
4375
+ efpBusinessLines,
4376
+ createBusinessLine,
4377
+ updateBusinessLine,
4378
+ t,
4379
+ showToast,
4380
+ userEvents
4381
+ });
4440
4382
  userEvents.addTaskEvent("Success", trackingPayload);
4441
4383
  showToast({
4442
4384
  label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
4443
4385
  variant: "success"
4444
4386
  });
4387
+ await invalidateRootLegalEntity();
4445
4388
  onExternalSubmit?.(data);
4446
4389
  } catch (err) {
4447
4390
  if (isValidationError(err)) {
@@ -4488,12 +4431,127 @@ async function submit({
4488
4431
  setLoadingStatus("success");
4489
4432
  }
4490
4433
  }
4491
- const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
4492
- if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
4493
- return void 0;
4434
+ async function submitDocuments({
4435
+ data,
4436
+ legalEntity,
4437
+ forms,
4438
+ documentUtils,
4439
+ userEvents
4440
+ }) {
4441
+ if (!isDocumentsRequired(forms)) return;
4442
+ const logger2 = createLogger();
4443
+ const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
4444
+ formattedDocument.forEach((doc) => {
4445
+ const existingDoc = getDocument(legalEntity.id, doc.type);
4446
+ if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
4447
+ doc.attachments = mergeProofOfOwnershipAttachments(
4448
+ existingDoc.attachments,
4449
+ doc.attachments
4450
+ ).filter((attachment) => attachment.pageName);
4451
+ }
4452
+ });
4453
+ try {
4454
+ await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
4455
+ formattedDocument.forEach((doc) => {
4456
+ userEvents.addTaskEvent("Success", {
4457
+ actionType: "upload",
4458
+ documentType: doc.type,
4459
+ fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
4460
+ });
4461
+ });
4462
+ } catch (err) {
4463
+ logger2.error(err);
4464
+ userEvents.addTaskEvent("Encountered error", {
4465
+ actionType: "upload",
4466
+ returnType: err.errorCode,
4467
+ returnValue: err.title ?? err.message
4468
+ });
4494
4469
  }
4495
- return !basicData.countryOfGoverningLaw ? CountryCodes.UnitedKingdom : basicData.countryOfGoverningLaw;
4496
- };
4470
+ }
4471
+ async function submitBusinessLines({
4472
+ data,
4473
+ legalEntity,
4474
+ efpBusinessLines,
4475
+ createBusinessLine,
4476
+ updateBusinessLine,
4477
+ trackingPayload,
4478
+ userEvents,
4479
+ t,
4480
+ showToast
4481
+ }) {
4482
+ const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
4483
+ if (!primaryIndustryCode || !createBusinessLine || !updateBusinessLine) return;
4484
+ const logger2 = createLogger();
4485
+ const bankingBusinessLines = [];
4486
+ const issuingBusinessLines = [];
4487
+ if (efpBusinessLines) {
4488
+ for (const bl of efpBusinessLines) {
4489
+ if (bl.service === "banking") bankingBusinessLines.push(bl);
4490
+ else issuingBusinessLines.push(bl);
4491
+ }
4492
+ }
4493
+ const promises = [];
4494
+ const operations = [];
4495
+ const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
4496
+ if (businessLines.length) {
4497
+ for (const bl of businessLines) {
4498
+ if (bl.industryCode === primaryIndustryCode) continue;
4499
+ const payload = {
4500
+ id: bl.id,
4501
+ legalEntityId: legalEntity.id,
4502
+ industryCode: primaryIndustryCode,
4503
+ service
4504
+ };
4505
+ promises.push(updateBusinessLine(payload));
4506
+ operations.push(payload);
4507
+ }
4508
+ } else if (requestedCapability) {
4509
+ const payload = {
4510
+ legalEntityId: legalEntity.id,
4511
+ industryCode: primaryIndustryCode,
4512
+ service
4513
+ };
4514
+ promises.push(createBusinessLine(payload));
4515
+ operations.push(payload);
4516
+ }
4517
+ };
4518
+ updateOrCreateBusinessLinesIfNeeded(
4519
+ bankingBusinessLines,
4520
+ requestingBanking(legalEntity),
4521
+ "banking"
4522
+ );
4523
+ updateOrCreateBusinessLinesIfNeeded(
4524
+ issuingBusinessLines,
4525
+ requestingIssuing(legalEntity),
4526
+ "issuing"
4527
+ );
4528
+ let hadRejection = false;
4529
+ (await Promise.allSettled(promises)).forEach((result, idx) => {
4530
+ if (result.status !== "rejected") return;
4531
+ const op = operations[idx];
4532
+ logger2.log(
4533
+ `Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
4534
+ );
4535
+ hadRejection = true;
4536
+ });
4537
+ const eventPayload = {
4538
+ actionType: trackingPayload.actionType,
4539
+ legalEntityName: trackingPayload.legalEntityName
4540
+ };
4541
+ if (!hadRejection) {
4542
+ userEvents.addTaskEvent("Success", eventPayload);
4543
+ } else {
4544
+ userEvents.addTaskEvent("Encountered error", {
4545
+ ...eventPayload,
4546
+ returnType: "businessLines",
4547
+ returnValue: "couldNotCreateOrUpdateBusinessLine"
4548
+ });
4549
+ showToast({
4550
+ label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
4551
+ variant: "error"
4552
+ });
4553
+ }
4554
+ }
4497
4555
  const determineCustomerSupport = (customerSupport, country) => {
4498
4556
  switch (country) {
4499
4557
  case CountryCodes.Japan:
@@ -4508,6 +4566,84 @@ const unsetCustomerSupportNumber = (customerSupport) => {
4508
4566
  phone: { number: "", type: "mobile" }
4509
4567
  } : void 0;
4510
4568
  };
4569
+ const businessDetailsBase = {
4570
+ /* Base required fields */
4571
+ country: { rule: "REQUIRED" },
4572
+ entityType: { rule: "businessRequiresCompanyType" },
4573
+ legalCompanyName: { rule: "REQUIRED" },
4574
+ jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
4575
+ jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
4576
+ hasDoingBusinessAs: { rule: "REQUIRED" },
4577
+ doingBusinessAs: { rule: "requireDoingBusinessAsName" },
4578
+ registrationAddress: { rule: "REQUIRED" },
4579
+ operationalAddressIsSame: { rule: "REQUIRED" },
4580
+ /* Base optional fields */
4581
+ operationalAddress: { rule: "OPTIONAL" },
4582
+ /* Fields with custom country specific rules */
4583
+ hasSelectedBusiness: { rule: "usingCompanySearch" },
4584
+ stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
4585
+ stockISIN: { rule: "ifPubliclyTradedCompany" },
4586
+ stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
4587
+ dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
4588
+ stateOrProvince: { rule: "usingCompanySearch" },
4589
+ registrationNumber: { rule: "countryRequiresRegistrationNumber" },
4590
+ registrationNumberType: { rule: "registrationNumberType" },
4591
+ exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
4592
+ eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
4593
+ countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
4594
+ taxDocument: { rule: "ifCountryUsAndTinFailed" },
4595
+ /* Fields derived from capabilities */
4596
+ industryCodes: { rule: "isIndustryCodeRequired" }
4597
+ };
4598
+ const taxInformationBase = {
4599
+ vatNumber: { rule: "countryUsesVat" },
4600
+ vatNumberType: { rule: "vatNumberType" },
4601
+ exemptedFromVat: { rule: "isVatExempt" },
4602
+ vatAbsenceReason: { rule: "isVatExempt" },
4603
+ taxInformation: { rule: "countryUsesTaxId" },
4604
+ exemptedFromTax: { rule: "countryHasTaxExemptions" },
4605
+ isUen: { rule: "countryUsesUenOrGst" }
4606
+ };
4607
+ const financialInformationBase = {
4608
+ numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
4609
+ financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
4610
+ currency: { rule: "isFinancialReportingFieldsRequired" },
4611
+ reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
4612
+ annualTurnover: { rule: "annualTurnoverRequired" },
4613
+ balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
4614
+ };
4615
+ const businessDetailsFieldsPerScenario = {
4616
+ L0: {
4617
+ country: { rule: "REQUIRED" },
4618
+ legalCompanyName: { rule: "REQUIRED" },
4619
+ stateOrProvince: { rule: "usingCompanySearch" },
4620
+ ...financialInformationBase
4621
+ },
4622
+ L1: {
4623
+ ...businessDetailsBase,
4624
+ ...financialInformationBase
4625
+ },
4626
+ // L for org is basically L_TAXINFO for Individuals (we will fix this in the near future
4627
+ // to make them aligned and less confusing)
4628
+ L: {
4629
+ ...businessDetailsBase,
4630
+ ...taxInformationBase,
4631
+ ...financialInformationBase
4632
+ },
4633
+ L_PROOFOFADDRESS: {
4634
+ // TODO this field does not exist
4635
+ // proofOfAddressDocument: { rule: 'REQUIRED' },
4636
+ },
4637
+ L_REGDOC: {
4638
+ registrationDocument: { rule: "REQUIRED" }
4639
+ },
4640
+ L_TAXDOC: {
4641
+ taxDocument: { rule: "REQUIRED" }
4642
+ },
4643
+ L_BAFIN: {
4644
+ legalForm: { rule: "REQUIRED" }
4645
+ }
4646
+ };
4511
4647
  const CountryFieldValidation = () => ({
4512
4648
  country: {
4513
4649
  modes: ["blur"],
@@ -4643,6 +4779,7 @@ function BusinessDetailsDropin({
4643
4779
  const { accountHolder, setAccountHolder } = useAccountHolder();
4644
4780
  const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
4645
4781
  const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
4782
+ const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
4646
4783
  const logger2 = createLogger();
4647
4784
  const isSoleProp = accountHolder === "mySoleProprietorName";
4648
4785
  const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
@@ -4659,6 +4796,7 @@ function BusinessDetailsDropin({
4659
4796
  rootLegalEntityId: rootLegalEntityId.value
4660
4797
  });
4661
4798
  const { data: matchingScenario } = useScenarios(country, LegalEntityTypes.ORGANIZATION);
4799
+ const { isAgnosticEndpointEnabled } = useCompanySearchExperiments();
4662
4800
  useEffect(() => {
4663
4801
  userEvents.updateBaseTrackingPayload({ task: taskType });
4664
4802
  userEvents.addTaskEvent("Landed on page", {
@@ -4751,6 +4889,7 @@ function BusinessDetailsDropin({
4751
4889
  const customRules = useMemo(
4752
4890
  () => rules({
4753
4891
  data: multiForm.data,
4892
+ defaultData,
4754
4893
  country,
4755
4894
  taskType,
4756
4895
  isExperimentEnabled,
@@ -4761,6 +4900,7 @@ function BusinessDetailsDropin({
4761
4900
  }),
4762
4901
  [
4763
4902
  multiForm.data,
4903
+ defaultData,
4764
4904
  matchingScenario,
4765
4905
  country,
4766
4906
  taskType,
@@ -4827,7 +4967,9 @@ function BusinessDetailsDropin({
4827
4967
  })
4828
4968
  );
4829
4969
  const updateForms = useCallback(
4830
- ({ searchResults }) => {
4970
+ ({
4971
+ searchResults
4972
+ }) => {
4831
4973
  const updatedForms = buildRequiredForms({
4832
4974
  config: {
4833
4975
  forms: defaultForms,
@@ -4857,10 +4999,6 @@ function BusinessDetailsDropin({
4857
4999
  legalEntityResponse
4858
5000
  ]
4859
5001
  );
4860
- const summaryData = useMemo(
4861
- () => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
4862
- [multiForm.data, forms, t, i18n.language, isExperimentEnabled]
4863
- );
4864
5002
  const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
4865
5003
  const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
4866
5004
  const submitTask = useCallback(() => {
@@ -4888,7 +5026,8 @@ function BusinessDetailsDropin({
4888
5026
  efpBusinessLines,
4889
5027
  createBusinessLine,
4890
5028
  updateBusinessLine,
4891
- matchingScenario
5029
+ matchingScenario,
5030
+ invalidateRootLegalEntity
4892
5031
  });
4893
5032
  }, [
4894
5033
  setAccountHolder,
@@ -4912,7 +5051,8 @@ function BusinessDetailsDropin({
4912
5051
  efpBusinessLines,
4913
5052
  createBusinessLine,
4914
5053
  updateBusinessLine,
4915
- matchingScenario
5054
+ matchingScenario,
5055
+ invalidateRootLegalEntity
4916
5056
  ]);
4917
5057
  const {
4918
5058
  handleNextClick,
@@ -4957,7 +5097,7 @@ function BusinessDetailsDropin({
4957
5097
  useEffect(() => {
4958
5098
  if (!searchingCompanies && companySearchResponse?.results) {
4959
5099
  userEvents.addPageEvent("Success", {
4960
- actionType: "submit",
5100
+ actionType: "resolve",
4961
5101
  returnValue: "companySearch",
4962
5102
  additionalData: {
4963
5103
  numberOfResults: companySearchResponse.results.length
@@ -4978,10 +5118,6 @@ function BusinessDetailsDropin({
4978
5118
  return handleNextClick(currentForms);
4979
5119
  }
4980
5120
  try {
4981
- userEvents.addPageEvent("Triggered async operation", {
4982
- actionType: "start",
4983
- returnValue: "companySearch"
4984
- });
4985
5121
  setLoadingStatus("loading");
4986
5122
  tinMatched.value = void 0;
4987
5123
  verifiedBusiness.value = void 0;
@@ -5010,12 +5146,23 @@ function BusinessDetailsDropin({
5010
5146
  const companySelectionResponse = await handleCompanySelection(
5011
5147
  rootLegalEntityId.peek(),
5012
5148
  baseUrl.peek(),
5013
- { ...companySelectionInput, company: searchResponse.results[0] }
5149
+ {
5150
+ ...companySelectionInput,
5151
+ ...isAgnosticEndpointEnabled ? {
5152
+ id: searchResponse.results[0].resultId
5153
+ } : { company: searchResponse.results[0] }
5154
+ },
5155
+ isAgnosticEndpointEnabled
5014
5156
  );
5015
5157
  if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
5016
5158
  verifiedBusiness.value = companySelectionResponse;
5017
5159
  isVerifiedSingleCompanySearchResult.value = true;
5018
- applyVerifiedBusinessData(multiForm, country, verifiedBusiness.peek());
5160
+ applyVerifiedBusinessData(
5161
+ multiForm,
5162
+ country,
5163
+ verifiedBusiness.peek(),
5164
+ isAgnosticEndpointEnabled
5165
+ );
5019
5166
  currentForms = updateForms({ searchResults: searchResponse.results });
5020
5167
  } else {
5021
5168
  return setLoadingStatus("success");
@@ -5062,18 +5209,44 @@ function BusinessDetailsDropin({
5062
5209
  searchResults: searchingError ? [] : companySearchResponse?.results
5063
5210
  });
5064
5211
  }, [updateForms, companySearchResponse?.results, searchingError]);
5212
+ const summarySections = useMemo(() => {
5213
+ if (activeForm.formId !== "summary") return [];
5214
+ return formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled);
5215
+ }, [multiForm.data, forms, t, i18n.language, isExperimentEnabled, activeForm]);
5216
+ const handleEditForm = (formId) => {
5217
+ const formIdx = forms.findIndex((form) => form.formId === formId);
5218
+ if (formIdx > -1) {
5219
+ gotoFormByFormIndex(formIdx);
5220
+ }
5221
+ };
5222
+ const allValidationErrors = {};
5223
+ for (const form in problems.validationErrors) {
5224
+ for (const validationError in problems.validationErrors[form]) {
5225
+ allValidationErrors[validationError] = problems.validationErrors[form][validationError];
5226
+ }
5227
+ }
5228
+ const allVerificationErrors = {};
5229
+ for (const form in problems.verificationErrors) {
5230
+ for (const verificationError in problems.verificationErrors[form]) {
5231
+ allVerificationErrors[verificationError] = problems.verificationErrors[form][verificationError];
5232
+ }
5233
+ }
5065
5234
  return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
5066
5235
  FormFlow,
5067
5236
  {
5068
- summary: {
5069
- data: summaryData,
5070
- omitted: {
5071
- keys: ["operationalAddressIsSame"],
5072
- forms: ["businessSelection"]
5073
- },
5074
- problems,
5075
- showLegalCaption: true
5076
- },
5237
+ summaryComponent: /* @__PURE__ */ jsxs(NewSummary, { sections: summarySections, handleEditForm, children: [
5238
+ /* @__PURE__ */ jsx(
5239
+ ErrorPanel,
5240
+ {
5241
+ validationErrors: allValidationErrors,
5242
+ verificationErrors: allVerificationErrors,
5243
+ formUtils: createFormUtils({ labels: {} }, t),
5244
+ id: "ariaErrorField",
5245
+ slot: "errorPanel"
5246
+ }
5247
+ ),
5248
+ /* @__PURE__ */ jsx("div", { className: summaryStyles.summaryContentLegalCaption, slot: "extraContent", children: t(($) => $["summaryLegalCaption"]) })
5249
+ ] }),
5077
5250
  asModal,
5078
5251
  currentStep: steps.current,
5079
5252
  totalSteps: steps.total,