@adyen/kyc-components 4.0.0-compact.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1113) hide show
  1. package/README.md +30 -43
  2. package/dist/4-people-BzyXLUF9.js +24 -0
  3. package/dist/AD-BQAadLyG.js +23 -0
  4. package/dist/AT-BI8ju2NH.js +23 -0
  5. package/dist/AcceptTermsOfServiceComponent-CmHBNGjM.js +659 -0
  6. package/dist/Accordion-Cp_VkxR6.js +88 -0
  7. package/dist/AccountSetupRejected-CoxWTlar.js +26 -0
  8. package/dist/ActionBar-CxUKVmTE.js +31 -0
  9. package/dist/Address-Db6Q_KUo.js +1348 -0
  10. package/dist/Alert-DEiOX0nw.js +159 -0
  11. package/dist/Avatar-3K6S_tIS.js +60 -0
  12. package/dist/BE-nWHKW0xQ.js +23 -0
  13. package/dist/BG-DlvaKo4n.js +27 -0
  14. package/dist/BusinessDetailsMultiformDropin-CYoIN4Fa.js +4220 -0
  15. package/dist/BusinessFinancingComponent-DyvM-fsY.js +54 -0
  16. package/dist/BusinessFinancingDropin-BOvR4LwU.js +1853 -0
  17. package/dist/BusinessFinancingPage-8C0ztBfS.js +43 -0
  18. package/dist/BusinessTypeSelectionPage-DpZAsa8K.js +427 -0
  19. package/dist/CH-TX4BTE2y.js +23 -0
  20. package/dist/CY-D59Nypl7.js +23 -0
  21. package/dist/CZ-B6iI1GbE.js +33 -0
  22. package/dist/Card-CdpPhK9y.js +82 -0
  23. package/dist/ConstitutionalDocument-NLs6ka9K.js +143 -0
  24. package/dist/CountryField-9w8wRZMW.js +843 -0
  25. package/dist/CreateIndividualComponent-zGcoEyq0.js +71 -0
  26. package/dist/CreateTransferInstrumentComponent-Ct_v-IyH.js +63 -0
  27. package/dist/Currency-53s7DEeh.js +183 -0
  28. package/dist/CustomerSupport-BRcUQ4fR.js +153 -0
  29. package/dist/DE-CsuX_tSL.js +23 -0
  30. package/dist/DK-oQEFrF6o.js +33 -0
  31. package/dist/DebugModal-CokbXGK9.js +413 -0
  32. package/dist/DecisionMakerDetailsPage-B5cLY8iP.js +106 -0
  33. package/dist/DecisionMakers-BQ24LfqB.js +830 -0
  34. package/dist/DropinLayout-CBP_cHLC.js +17 -0
  35. package/dist/EE-3WZV5Ejt.js +23 -0
  36. package/dist/ES-NfxpqbC2.js +23 -0
  37. package/dist/EmbeddedStatus-DB9B_u3L.js +99 -0
  38. package/dist/EndStateLayout-BWC5aqVS.js +71 -0
  39. package/dist/EntityAssociation-gzYdcHoL.js +159 -0
  40. package/dist/EntityGuidanceStatus-BKeZKnbP.js +105 -0
  41. package/dist/FI-CHQIvHa-.js +23 -0
  42. package/dist/FR-MWZyWX3x.js +23 -0
  43. package/dist/FormFlow-Cf3Ff2qw.js +224 -0
  44. package/dist/FormNavigation-CjgZbv9G.js +144 -0
  45. package/dist/FormWrapper-dbBZegkX.js +135 -0
  46. package/dist/GG-CPoMVQPc.js +33 -0
  47. package/dist/GI-DxmBwVD_.js +41 -0
  48. package/dist/GR-Rk0pXlNw.js +23 -0
  49. package/dist/HR-WapHW2fw.js +23 -0
  50. package/dist/HU-DCOMuOhe.js +32 -0
  51. package/dist/IE-BkgtVgDi.js +23 -0
  52. package/dist/IM-Wr4iDT94.js +33 -0
  53. package/dist/IS-C-Cgc6zp.js +27 -0
  54. package/dist/IT-CXekiddL.js +23 -0
  55. package/dist/IndividualOnfido-Cc7dydKq.js +9594 -0
  56. package/dist/IndividualOnfidoDropin-BpU2cL4E.js +2497 -0
  57. package/dist/InputText-Dsw9kiwL.js +249 -0
  58. package/dist/Introduction-C8mTk4l_.js +300 -0
  59. package/dist/JE-B4gj54Hg.js +33 -0
  60. package/dist/JpAddress-R81eO-aY.js +280 -0
  61. package/dist/LI-L0ZAALRT.js +23 -0
  62. package/dist/LT-Ao2uagV9.js +23 -0
  63. package/dist/LU-B7LRUuc6.js +23 -0
  64. package/dist/LV-DZeGjA2G.js +23 -0
  65. package/dist/LegalRepresentativeDetailsPage-DIQX18v2.js +60 -0
  66. package/dist/ListItem-D3p6EgP_.js +69 -0
  67. package/dist/MC-EDVNGWhy.js +23 -0
  68. package/dist/MT-B9my7RlP.js +23 -0
  69. package/dist/ManageIndividualComponent-CmM-vP9E.js +46 -0
  70. package/dist/ManageTermsOfServiceComponent-C3hXZJx5.js +52 -0
  71. package/dist/ManageTransferInstrumentComponent-co6LYrVY.js +287 -0
  72. package/dist/MaybeModal-BVQOzETz.js +25 -0
  73. package/dist/Modal-CloeVnNp.js +149 -0
  74. package/dist/NL-VXAFOhV5.js +23 -0
  75. package/dist/NO-Cx1VSh2W.js +32 -0
  76. package/dist/OnboardingDropinComponent-CDAK4v1o.js +7908 -0
  77. package/dist/PL-BZW1hGvD.js +32 -0
  78. package/dist/PT-OpU4MU3L.js +23 -0
  79. package/dist/PayoutDetailsDropin-DCrlrNki.js +4841 -0
  80. package/dist/RO-Cz6Sh0ls.js +23 -0
  81. package/dist/Review-Dqn49vJM.js +83 -0
  82. package/dist/RootBusinessDetailsPage-DSEq3TIn.js +61 -0
  83. package/dist/RootBusinessLinesPage-CbPhOber.js +1118 -0
  84. package/dist/RootIndividualDetailsPage-Bp_7gSIB.js +71 -0
  85. package/dist/SE-B5K-FkQd.js +33 -0
  86. package/dist/SI-BOGTNLPa.js +23 -0
  87. package/dist/SK-BOVrp_Av.js +23 -0
  88. package/dist/SM-meowwILA.js +23 -0
  89. package/dist/SignPCIComponent-B6kYuqT_.js +304 -0
  90. package/dist/SingpassSelection-aDrNTYr3.js +130 -0
  91. package/dist/SoleProprietorshipPage-HnUsyjKp.js +60 -0
  92. package/dist/SourceOfFundsPage-BkMEIV_L.js +2383 -0
  93. package/dist/StepProgressIndicator-BgeMe93n.js +78 -0
  94. package/dist/StoreProvider-BFN15Go9.js +7674 -0
  95. package/dist/Summary-BkE_c8pU.js +204 -0
  96. package/dist/TaxReportingDropin-LG9zvOMN.js +502 -0
  97. package/dist/TrustDetailsPage-C8w8pEvB.js +2149 -0
  98. package/dist/TrustMemberCompanyPage-IDEwpLW3.js +73 -0
  99. package/dist/TrustMemberIndividualPage-rKB3iVFk.js +66 -0
  100. package/dist/TrustMemberRoleAndTypePage-CLtX8V0M.js +985 -0
  101. package/dist/TrustMembersOverview-Bs203hm0.js +438 -0
  102. package/dist/UnincorporatedPartnershipIndividualPage-CBTaUEld.js +65 -0
  103. package/dist/UnincorporatedPartnershipMemberCompanyPage-ZnLe9Uq3.js +76 -0
  104. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-BXImA2c_.js +281 -0
  105. package/dist/UnincorporatedPartnershipMembersOverview-c7k2JzcO.js +172 -0
  106. package/dist/VA-DXsYTCoh.js +23 -0
  107. package/dist/VerificationErrorAlert-uubpHQGE.js +79 -0
  108. package/dist/ViewVerificationStatusComponent-DO9L2hEO.js +180 -0
  109. package/dist/adyen-business-financing.js +5 -6
  110. package/dist/adyen-individual-configuration.js +7 -8
  111. package/dist/adyen-individual-status.js +7 -8
  112. package/dist/adyen-kyc-components.js +38 -33
  113. package/dist/adyen-onboarding.js +4 -5
  114. package/dist/adyen-terms-of-service-management.js +7 -8
  115. package/dist/adyen-terms-of-service-status.js +7 -8
  116. package/dist/adyen-transfer-instrument-configuration.js +7 -8
  117. package/dist/adyen-transfer-instrument-management.js +7 -8
  118. package/dist/adyen-verification-status.js +5 -6
  119. package/dist/arrow-right-KxA3SvQj.js +14 -0
  120. package/dist/bag-BPumznWh.js +14 -0
  121. package/dist/bank-D6FiNBhs.js +14 -0
  122. package/dist/bg-BG-B7Xs_t04.js +13 -0
  123. package/dist/bg-BG-BY3Wa361.js +54 -0
  124. package/dist/bg-BG-BvLl6gaB.js +13 -0
  125. package/dist/bg-BG-CepHap8j.js +68 -0
  126. package/dist/bg-BG-Coja327N.js +24 -0
  127. package/dist/bg-BG-D9J6LnkI.js +57 -0
  128. package/dist/bg-BG-DH45-0B-.js +29 -0
  129. package/dist/bg-BG-DRkMqyL8.js +13 -0
  130. package/dist/bg-BG-DcxZ1tmt.js +32 -0
  131. package/dist/bg-BG-Dp4LxSP7.js +37 -0
  132. package/dist/bg-BG-DpIAKQve.js +113 -0
  133. package/dist/bg-BG-er0t4jTs.js +27 -0
  134. package/dist/bg-BG-mLSjG76Q.js +13 -0
  135. package/dist/bg-BG-wVquMNtT.js +55 -0
  136. package/dist/bin-Bz6KOIeE.js +18 -0
  137. package/dist/capital-GVQ3svwN.js +17 -0
  138. package/dist/cash-stack-D9AoDDwt.js +22 -0
  139. package/dist/certificate-CdEWgHQf.js +17 -0
  140. package/dist/checkmark-Q7x6tGhy.js +14 -0
  141. package/dist/checkmark-circle-fill-CsvN5_PL.js +17 -0
  142. package/dist/checkmark-circle-x7dzbp3I.js +20 -0
  143. package/dist/checkmark-small-D35myntq.js +14 -0
  144. package/dist/chevron-down-C2iDorpW.js +14 -0
  145. package/dist/chevron-left-ztPO84q-.js +14 -0
  146. package/dist/chevron-right-C_JN0oDt.js +14 -0
  147. package/dist/chevron-up-CgG8n25g.js +14 -0
  148. package/dist/circle-Bt3Nlr3q.js +17 -0
  149. package/dist/circle-small-filled-YMzP6yQU.js +14 -0
  150. package/dist/clock-BZHremOA.js +20 -0
  151. package/dist/coins-fkAk6dCo.js +17 -0
  152. package/dist/contract-BTa4HltT.js +14 -0
  153. package/dist/cross-Cn09MtQ_.js +14 -0
  154. package/dist/cross-circle-fill-small-DCz52AuN.js +14 -0
  155. package/dist/cs-CZ--jOkoHVS.js +55 -0
  156. package/dist/cs-CZ-BDf9m4Rw.js +113 -0
  157. package/dist/cs-CZ-BEFeaKsV.js +54 -0
  158. package/dist/cs-CZ-BP7niQM9.js +68 -0
  159. package/dist/cs-CZ-BSWXexr4.js +13 -0
  160. package/dist/cs-CZ-BsV9NiQ2.js +13 -0
  161. package/dist/cs-CZ-CQNBae2b.js +27 -0
  162. package/dist/cs-CZ-CyLqoG1j.js +37 -0
  163. package/dist/cs-CZ-D4Hg-t16.js +32 -0
  164. package/dist/cs-CZ-DPVMeRye.js +29 -0
  165. package/dist/cs-CZ-DXtJsBPz.js +24 -0
  166. package/dist/cs-CZ-DY_pQqAT.js +57 -0
  167. package/dist/cs-CZ-DalFZigH.js +13 -0
  168. package/dist/cs-CZ-hT5w5It6.js +13 -0
  169. package/dist/da-DK-CI-vfqPo.js +113 -0
  170. package/dist/da-DK-D4Ojw97o.js +13 -0
  171. package/dist/da-DK-DCJhV2qS.js +32 -0
  172. package/dist/da-DK-DU4dCNEw.js +29 -0
  173. package/dist/da-DK-DWA8uOd8.js +24 -0
  174. package/dist/da-DK-DYpfNZdP.js +37 -0
  175. package/dist/da-DK-DZwlENGe.js +13 -0
  176. package/dist/da-DK-Dc0QYG8m.js +68 -0
  177. package/dist/da-DK-JHZnsI59.js +55 -0
  178. package/dist/da-DK-P3YSaBqs.js +13 -0
  179. package/dist/da-DK-R_y7YwqQ.js +13 -0
  180. package/dist/da-DK-gnPgzwrG.js +27 -0
  181. package/dist/da-DK-jK7c9UL0.js +57 -0
  182. package/dist/de-DE-BR6CLZw6.js +13 -0
  183. package/dist/de-DE-BXt1K0Tr.js +37 -0
  184. package/dist/de-DE-BcuLmcC8.js +13 -0
  185. package/dist/de-DE-D3lLuF8z.js +27 -0
  186. package/dist/de-DE-D50lGOJE.js +24 -0
  187. package/dist/de-DE-DXR3EpEc.js +13 -0
  188. package/dist/de-DE-DwOQKCuU.js +32 -0
  189. package/dist/de-DE-Dz2OsS1F.js +68 -0
  190. package/dist/de-DE-Dz2l6jRl.js +29 -0
  191. package/dist/de-DE-VGGEkxUT.js +55 -0
  192. package/dist/de-DE-nG2MBigU.js +113 -0
  193. package/dist/de-DE-opyC1JO-.js +13 -0
  194. package/dist/de-DE-wmerDL2e.js +57 -0
  195. package/dist/debouncedInputEvent-Dlbc7VjU.js +109 -0
  196. package/dist/debugStore-BvbyN1Oi.js +14 -0
  197. package/dist/document-1-C08ut-Dt.js +14 -0
  198. package/dist/document-person-vxlA6C5f.js +20 -0
  199. package/dist/documentUtils-CUgKVLK4.js +218 -0
  200. package/dist/download-Drhk9k1f.js +17 -0
  201. package/dist/dropinUtils-D2lBlNWp.js +202 -0
  202. package/dist/edit-1-CFoDTMvQ.js +14 -0
  203. package/dist/el-GR-B3FHqTOX.js +13 -0
  204. package/dist/el-GR-B5j7VZ3E.js +54 -0
  205. package/dist/el-GR-B90M6tcZ.js +37 -0
  206. package/dist/el-GR-BHG69mXl.js +68 -0
  207. package/dist/el-GR-BX-MyQZY.js +113 -0
  208. package/dist/el-GR-Btrk_npt.js +57 -0
  209. package/dist/el-GR-CKHMsdx2.js +24 -0
  210. package/dist/el-GR-CWd7XYDU.js +13 -0
  211. package/dist/el-GR-CofvCav-.js +13 -0
  212. package/dist/el-GR-DtFE64KX.js +13 -0
  213. package/dist/el-GR-Hk4NbZSY.js +32 -0
  214. package/dist/el-GR-MLFY-Gg7.js +29 -0
  215. package/dist/el-GR-XRux2Wpv.js +27 -0
  216. package/dist/el-GR-gkaKwnln.js +55 -0
  217. package/dist/en-US-B96dpVon.js +27 -0
  218. package/dist/en-US-BPI4FZwa.js +113 -0
  219. package/dist/en-US-BQZhzROc.js +32 -0
  220. package/dist/en-US-CozY33On.js +13 -0
  221. package/dist/en-US-CzEL6t1W.js +55 -0
  222. package/dist/en-US-D-B35AoN.js +68 -0
  223. package/dist/en-US-D2yrwtzT.js +24 -0
  224. package/dist/en-US-DYo4OF-P.js +29 -0
  225. package/dist/en-US-Dg505Oh3.js +37 -0
  226. package/dist/en-US-fyGPkcqX.js +13 -0
  227. package/dist/en-US-gsp7CD_E.js +57 -0
  228. package/dist/en-US-h0JneJJl.js +13 -0
  229. package/dist/es-ES-0ROz-BJh.js +29 -0
  230. package/dist/es-ES-BAg3NqQO.js +13 -0
  231. package/dist/es-ES-BI_jdT67.js +68 -0
  232. package/dist/es-ES-BOoPqnPI.js +32 -0
  233. package/dist/es-ES-BhINIOee.js +13 -0
  234. package/dist/es-ES-BhNhIf08.js +37 -0
  235. package/dist/es-ES-Bn9_0wK0.js +55 -0
  236. package/dist/es-ES-CEp-ttVJ.js +13 -0
  237. package/dist/es-ES-CXDJLKAI.js +27 -0
  238. package/dist/es-ES-DF_L5EDd.js +24 -0
  239. package/dist/es-ES-Q16q2JJ6.js +113 -0
  240. package/dist/es-ES-Qnc0Q6JH.js +57 -0
  241. package/dist/es-ES-yMXcOjDL.js +13 -0
  242. package/dist/et-EE--cL_YqWe.js +27 -0
  243. package/dist/et-EE-BMgFCxds.js +37 -0
  244. package/dist/et-EE-BYSnV6Iq.js +55 -0
  245. package/dist/et-EE-Be__VK7Y.js +32 -0
  246. package/dist/et-EE-Bk2IHQWP.js +13 -0
  247. package/dist/et-EE-BuBiNLCi.js +24 -0
  248. package/dist/et-EE-C8RrUpLm.js +13 -0
  249. package/dist/et-EE-C_PZO2aI.js +68 -0
  250. package/dist/et-EE-Ci8RU2wg.js +13 -0
  251. package/dist/et-EE-DUWZ2Vqm.js +54 -0
  252. package/dist/et-EE-DmShD6oS.js +113 -0
  253. package/dist/et-EE-TzXANcP2.js +57 -0
  254. package/dist/et-EE-esci5847.js +29 -0
  255. package/dist/et-EE-x29FUaYN.js +118 -0
  256. package/dist/external-link-DCMYUMfW.js +14 -0
  257. package/dist/fi-FI-B_P4BAda.js +113 -0
  258. package/dist/fi-FI-CDISJifz.js +13 -0
  259. package/dist/fi-FI-DH6jpo9K.js +24 -0
  260. package/dist/fi-FI-DjlB2a7k.js +13 -0
  261. package/dist/fi-FI-Dn2MC8uW.js +57 -0
  262. package/dist/fi-FI-MiyuQqH8.js +13 -0
  263. package/dist/fi-FI-PVFqd5Ra.js +55 -0
  264. package/dist/fi-FI-bZzNB1WB.js +32 -0
  265. package/dist/fi-FI-fArobrt5.js +27 -0
  266. package/dist/fi-FI-hwzizPnr.js +68 -0
  267. package/dist/fi-FI-xXrvDLFe.js +29 -0
  268. package/dist/fi-FI-xqnQ38yC.js +13 -0
  269. package/dist/fi-FI-ysUrBilO.js +37 -0
  270. package/dist/fieldConfigurations-C38LzPl3.js +1402 -0
  271. package/dist/fr-FR-BSvSKazD.js +37 -0
  272. package/dist/fr-FR-BSynpexF.js +13 -0
  273. package/dist/fr-FR-BWX14yb7.js +57 -0
  274. package/dist/fr-FR-BnblnBsx.js +24 -0
  275. package/dist/fr-FR-Bw9O-QAU.js +29 -0
  276. package/dist/fr-FR-CUdiBCVB.js +113 -0
  277. package/dist/fr-FR-CYZXbwc9.js +68 -0
  278. package/dist/fr-FR-CiwkAb3E.js +27 -0
  279. package/dist/fr-FR-DGMVrsJv.js +13 -0
  280. package/dist/fr-FR-Dx-CiPdB.js +13 -0
  281. package/dist/fr-FR-aJ3cg4x0.js +13 -0
  282. package/dist/fr-FR-cTKcuHqX.js +32 -0
  283. package/dist/fr-FR-mJK4hjwD.js +55 -0
  284. package/dist/getFieldsWithExistingData-B0l_1eCG.js +22 -0
  285. package/dist/getName-CIw0MR9e.js +48 -0
  286. package/dist/gift-CQ_DEma7.js +14 -0
  287. package/dist/graph-BJmqglH2.js +21 -0
  288. package/dist/graph-up-Bq6adtlX.js +20 -0
  289. package/dist/hasDataChanged-B-_hLK5I.js +19 -0
  290. package/dist/headquarter-DNYyuuFq.js +21 -0
  291. package/dist/hotel-BuNql78Z.js +22 -0
  292. package/dist/hr-HR-BHt_jklG.js +13 -0
  293. package/dist/hr-HR-BLpGb4f2.js +37 -0
  294. package/dist/hr-HR-CXpCIMhI.js +113 -0
  295. package/dist/hr-HR-CZLSQruE.js +57 -0
  296. package/dist/hr-HR-CnP5sqih.js +54 -0
  297. package/dist/hr-HR-ComCqan_.js +32 -0
  298. package/dist/hr-HR-D5V7g9H2.js +13 -0
  299. package/dist/hr-HR-D8_yhtIo.js +29 -0
  300. package/dist/hr-HR-De5kHU8U.js +24 -0
  301. package/dist/hr-HR-DtfHQVe0.js +27 -0
  302. package/dist/hr-HR-VivDwwdW.js +13 -0
  303. package/dist/hr-HR-bE6cvRCQ.js +68 -0
  304. package/dist/hr-HR-n7aMHIpM.js +13 -0
  305. package/dist/hr-HR-qmYyO-nT.js +55 -0
  306. package/dist/hu-HU-BTlpbCpc.js +54 -0
  307. package/dist/hu-HU-BcogZby3.js +24 -0
  308. package/dist/hu-HU-CS-7iNS4.js +55 -0
  309. package/dist/hu-HU-Ca9Hex26.js +37 -0
  310. package/dist/hu-HU-DDsdPI5V.js +13 -0
  311. package/dist/hu-HU-DG-NUDx4.js +68 -0
  312. package/dist/hu-HU-DUGz5q5D.js +32 -0
  313. package/dist/hu-HU-D_DvlCMw.js +13 -0
  314. package/dist/hu-HU-DqEBeq-w.js +113 -0
  315. package/dist/hu-HU-I4-KFzvz.js +27 -0
  316. package/dist/hu-HU-KliQetm5.js +29 -0
  317. package/dist/hu-HU-WEtpzb41.js +13 -0
  318. package/dist/hu-HU-hbVM6tMS.js +13 -0
  319. package/dist/hu-HU-kp8Go5hZ.js +57 -0
  320. package/dist/iframeWidget-yBLSAmf8.js +234 -0
  321. package/dist/image-BSihO8lR.js +17 -0
  322. package/dist/info-vHTZWoJ7.js +21 -0
  323. package/dist/it-IT-B0YGvVgW.js +57 -0
  324. package/dist/it-IT-BTWkWSJq.js +55 -0
  325. package/dist/it-IT-C2MZo4KT.js +13 -0
  326. package/dist/it-IT-C_651bEP.js +13 -0
  327. package/dist/it-IT-Ckv8Ce4e.js +24 -0
  328. package/dist/it-IT-DERflsUd.js +32 -0
  329. package/dist/it-IT-DIbH-udG.js +27 -0
  330. package/dist/it-IT-DLm11dH5.js +13 -0
  331. package/dist/it-IT-Erh1DIlj.js +68 -0
  332. package/dist/it-IT-MwpjRAG6.js +29 -0
  333. package/dist/it-IT-NCFAqV1F.js +113 -0
  334. package/dist/it-IT-Qfzc8jnW.js +37 -0
  335. package/dist/it-IT-yV7ewjWU.js +13 -0
  336. package/dist/ja-JP-2u5fqLWF.js +29 -0
  337. package/dist/ja-JP-Bktpl_2b.js +118 -0
  338. package/dist/ja-JP-BoxeBgOv.js +32 -0
  339. package/dist/ja-JP-CHQ64lw1.js +37 -0
  340. package/dist/ja-JP-CSz7fEkn.js +55 -0
  341. package/dist/ja-JP-CWe8f7m4.js +13 -0
  342. package/dist/ja-JP-C_-moDrA.js +113 -0
  343. package/dist/ja-JP-CbgaW99b.js +54 -0
  344. package/dist/ja-JP-Ctsk4z4q.js +151 -0
  345. package/dist/ja-JP-CvNJvxkQ.js +218 -0
  346. package/dist/ja-JP-Dz9IVH4p.js +57 -0
  347. package/dist/ja-JP-FWHXsXlW.js +24 -0
  348. package/dist/ja-JP-ThzG9vIo.js +68 -0
  349. package/dist/ja-JP-bz7ekGnF.js +27 -0
  350. package/dist/localizeDateString-C-G2nUor.js +27 -0
  351. package/dist/location-Q4oKvnkl.js +17 -0
  352. package/dist/lt-LT-0RKZeraM.js +37 -0
  353. package/dist/lt-LT-B6XmKUXx.js +55 -0
  354. package/dist/lt-LT-BEsBoIQ9.js +29 -0
  355. package/dist/lt-LT-BLsIcCtE.js +27 -0
  356. package/dist/lt-LT-CU5qHa7a.js +113 -0
  357. package/dist/lt-LT-CYiW52tl.js +13 -0
  358. package/dist/lt-LT-Cg9c0kae.js +13 -0
  359. package/dist/lt-LT-Ci357QYQ.js +13 -0
  360. package/dist/lt-LT-D5Rhxm1h.js +32 -0
  361. package/dist/lt-LT-DDdq07sX.js +24 -0
  362. package/dist/lt-LT-DTQGR9M0.js +54 -0
  363. package/dist/lt-LT-Nd1uRoIj.js +68 -0
  364. package/dist/lt-LT-W6fTjwB5.js +13 -0
  365. package/dist/lt-LT-l9rzkFg9.js +57 -0
  366. package/dist/lv-LV-BQ4F1GrV.js +54 -0
  367. package/dist/lv-LV-Bh-WQp0K.js +37 -0
  368. package/dist/lv-LV-C7hMdPcY.js +27 -0
  369. package/dist/lv-LV-CG1zToz7.js +32 -0
  370. package/dist/lv-LV-CgMxfFK8.js +13 -0
  371. package/dist/lv-LV-CkyuY2ji.js +24 -0
  372. package/dist/lv-LV-CpGkmcLz.js +113 -0
  373. package/dist/lv-LV-CxUmQHF9.js +13 -0
  374. package/dist/lv-LV-DKhV24CI.js +68 -0
  375. package/dist/lv-LV-DYbb5pkt.js +57 -0
  376. package/dist/lv-LV-DsSpy50n.js +55 -0
  377. package/dist/lv-LV-DsxFGThp.js +13 -0
  378. package/dist/lv-LV-Dxe-A5vo.js +13 -0
  379. package/dist/lv-LV-Veji7-on.js +29 -0
  380. package/dist/mail-BOdyoVqB.js +14 -0
  381. package/dist/mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js +56 -0
  382. package/dist/mapExistingFile-BhW5UmN9.js +156 -0
  383. package/dist/mapFinancialReportsToFinancialInformation-Dl-cl9eQ.js +67 -0
  384. package/dist/mapJpAddressSchemaToAddressLocalizations-KFAvfuC1.js +63 -0
  385. package/dist/mapLegalEntityToIndividualOnfidoSchema-D51tRiYd.js +143 -0
  386. package/dist/mapTransferInstrumentToPayoutAccount-CU5wx0wJ.js +33 -0
  387. package/dist/minus-circle-filled-kC2IUvKz.js +17 -0
  388. package/dist/nl-NL-BMUYBqlF.js +57 -0
  389. package/dist/nl-NL-Bk-1-C0e.js +13 -0
  390. package/dist/nl-NL-BuW3jWdI.js +29 -0
  391. package/dist/nl-NL-Bx5p0nXL.js +24 -0
  392. package/dist/nl-NL-CMw-FwQV.js +13 -0
  393. package/dist/nl-NL-CTf7zH4M.js +55 -0
  394. package/dist/nl-NL-Cjlmc0Ii.js +32 -0
  395. package/dist/nl-NL-D7gBNWEY.js +37 -0
  396. package/dist/nl-NL-DKMs4pB2.js +13 -0
  397. package/dist/nl-NL-DMpB18Te.js +113 -0
  398. package/dist/nl-NL-JChnFdCY.js +13 -0
  399. package/dist/nl-NL-NlkjOSYi.js +27 -0
  400. package/dist/nl-NL-O9GCHMDA.js +68 -0
  401. package/dist/no-NO--OoWld_l.js +13 -0
  402. package/dist/no-NO-B-oUwe9q.js +13 -0
  403. package/dist/no-NO-Bs3-6MDM.js +24 -0
  404. package/dist/no-NO-C-gCYc9q.js +37 -0
  405. package/dist/no-NO-CA0EizAy.js +29 -0
  406. package/dist/no-NO-CA1aR6Wh.js +68 -0
  407. package/dist/no-NO-CY_XHrYd.js +32 -0
  408. package/dist/no-NO-Ca5qoVaU.js +113 -0
  409. package/dist/no-NO-Crlsj6HG.js +27 -0
  410. package/dist/no-NO-DKbWxgF-.js +57 -0
  411. package/dist/no-NO-DN9qf-_I.js +13 -0
  412. package/dist/no-NO-Dhj0Fh__.js +13 -0
  413. package/dist/no-NO-RfTK9KAV.js +55 -0
  414. package/dist/options-horizontal-CBmbNv7R.js +18 -0
  415. package/dist/partner-CPjsrePY.js +18 -0
  416. package/dist/pay-by-link-plane-BVZndh67.js +22 -0
  417. package/dist/payout-ChUEoLjt.js +20 -0
  418. package/dist/payout-verification-instant-5u-wvFKv.js +41 -0
  419. package/dist/payout-verification-manual-BH2mu0UW.js +90 -0
  420. package/dist/person-DGjUU4S4.js +17 -0
  421. package/dist/pl-PL-B0zGy_b4.js +57 -0
  422. package/dist/pl-PL-BKDK0_G8.js +68 -0
  423. package/dist/pl-PL-BSI0zHO1.js +113 -0
  424. package/dist/pl-PL-BzhEoDb5.js +24 -0
  425. package/dist/pl-PL-C_MvVzPy.js +32 -0
  426. package/dist/pl-PL-D7nhdbfR.js +29 -0
  427. package/dist/pl-PL-DGSYzOx6.js +13 -0
  428. package/dist/pl-PL-DYxD6VJ_.js +27 -0
  429. package/dist/pl-PL-DtJ3sgVO.js +13 -0
  430. package/dist/pl-PL-Duj3tncM.js +13 -0
  431. package/dist/pl-PL-Dy8qWH39.js +55 -0
  432. package/dist/pl-PL-LnVPufjb.js +37 -0
  433. package/dist/pl-PL-kGaeUP-w.js +54 -0
  434. package/dist/pl-PL-p8YxqOFg.js +13 -0
  435. package/dist/plus-CWXA5wdX.js +14 -0
  436. package/dist/plus-circle-filled-CbC0u2Y1.js +17 -0
  437. package/dist/process-field-configurations-DoOFQqtn.js +324 -0
  438. package/dist/pt-BR--kaJvtE6.js +57 -0
  439. package/dist/pt-BR-BbFJsIVX.js +55 -0
  440. package/dist/pt-BR-Be5ZycMV.js +13 -0
  441. package/dist/pt-BR-BfxgHKY4.js +27 -0
  442. package/dist/pt-BR-C0I_kTQ6.js +13 -0
  443. package/dist/pt-BR-CBAe0SnK.js +32 -0
  444. package/dist/pt-BR-Cj8MlQyq.js +113 -0
  445. package/dist/pt-BR-Cm4vZocb.js +13 -0
  446. package/dist/pt-BR-D1nTSLod.js +29 -0
  447. package/dist/pt-BR-DKrMpM6v.js +13 -0
  448. package/dist/pt-BR-DSENwwGu.js +24 -0
  449. package/dist/pt-BR-NtLaWlnZ.js +68 -0
  450. package/dist/pt-BR-nU_2Wbo5.js +54 -0
  451. package/dist/pt-BR-ur86nRrK.js +37 -0
  452. package/dist/pt-PT-B4F_5NWi.js +55 -0
  453. package/dist/pt-PT-B9L50746.js +29 -0
  454. package/dist/pt-PT-BJjCTMYf.js +13 -0
  455. package/dist/pt-PT-BJkVzfAJ.js +113 -0
  456. package/dist/pt-PT-BR-BI5Jn.js +13 -0
  457. package/dist/pt-PT-BZ5ZZm6G.js +57 -0
  458. package/dist/pt-PT-Bf4IV7wp.js +13 -0
  459. package/dist/pt-PT-Bh7v8xbp.js +13 -0
  460. package/dist/pt-PT-CIo3mlXL.js +24 -0
  461. package/dist/pt-PT-CVNEcs32.js +37 -0
  462. package/dist/pt-PT-DSxxVA0f.js +68 -0
  463. package/dist/pt-PT-Dm5DRDrd.js +32 -0
  464. package/dist/pt-PT-TKg5FLat.js +27 -0
  465. package/dist/recurring-CkL4cCM2.js +17 -0
  466. package/dist/reporting-DerosUNm.js +16 -0
  467. package/dist/resolveEnvironment-Dyejukh7.js +164 -0
  468. package/dist/revenue-accelerate-Dp4Ns_5c.js +17 -0
  469. package/dist/ro-RO-3rOfS17N.js +27 -0
  470. package/dist/ro-RO-4j2I7YM7.js +13 -0
  471. package/dist/ro-RO-5I4Q_FyK.js +13 -0
  472. package/dist/ro-RO-B5YT9vP-.js +32 -0
  473. package/dist/ro-RO-B8leE4ZJ.js +13 -0
  474. package/dist/ro-RO-Bybq8JFn.js +68 -0
  475. package/dist/ro-RO-C83h2zHZ.js +54 -0
  476. package/dist/ro-RO-CICjAFys.js +55 -0
  477. package/dist/ro-RO-CdSsgoUG.js +57 -0
  478. package/dist/ro-RO-DjGku_3y.js +13 -0
  479. package/dist/ro-RO-DvG65dTt.js +29 -0
  480. package/dist/ro-RO-ILTvlS9i.js +24 -0
  481. package/dist/ro-RO-RgC5M6CE.js +113 -0
  482. package/dist/ro-RO-i7lojG2G.js +37 -0
  483. package/dist/rules-DP604XPJ.js +314 -0
  484. package/dist/save-Fgy7EDid.js +14 -0
  485. package/dist/search-C4GZ-Rc1.js +17 -0
  486. package/dist/show-yPjPmEf8.js +17 -0
  487. package/dist/sk-SK-0BVxI7bf.js +113 -0
  488. package/dist/sk-SK-B5brxU1N.js +37 -0
  489. package/dist/sk-SK-BMJgOJoa.js +29 -0
  490. package/dist/sk-SK-BRd5TN22.js +55 -0
  491. package/dist/sk-SK-BVmoP_EU.js +13 -0
  492. package/dist/sk-SK-BWwRIx2d.js +13 -0
  493. package/dist/sk-SK-Bb18qPBw.js +13 -0
  494. package/dist/sk-SK-BiBWPJUf.js +57 -0
  495. package/dist/sk-SK-C5Qmv4E6.js +13 -0
  496. package/dist/sk-SK-C6rMIxpz.js +68 -0
  497. package/dist/sk-SK-CgLJIuJw.js +54 -0
  498. package/dist/sk-SK-CjrLvDMx.js +27 -0
  499. package/dist/sk-SK-Cv23cDQO.js +24 -0
  500. package/dist/sk-SK-S6iF1WDH.js +32 -0
  501. package/dist/sl-SI-6s8xycKg.js +13 -0
  502. package/dist/sl-SI-BMF8YtOm.js +29 -0
  503. package/dist/sl-SI-BZpXMHiG.js +13 -0
  504. package/dist/sl-SI-BxImW_RL.js +113 -0
  505. package/dist/sl-SI-C-C-KJCX.js +27 -0
  506. package/dist/sl-SI-CUCrzJQv.js +37 -0
  507. package/dist/sl-SI-CaJmYb6p.js +13 -0
  508. package/dist/sl-SI-D8dDckrW.js +55 -0
  509. package/dist/sl-SI-DEaeEVKB.js +24 -0
  510. package/dist/sl-SI-DqUEy_Cm.js +32 -0
  511. package/dist/sl-SI-DtdGMD6i.js +57 -0
  512. package/dist/sl-SI-ZxyvdgdS.js +13 -0
  513. package/dist/sl-SI-tPwbFvOI.js +68 -0
  514. package/dist/solution-payments-CNAat9h7.js +14 -0
  515. package/dist/store-IuAkDRAp.js +14 -0
  516. package/dist/style.css +2143 -1744
  517. package/dist/styles-CLV89_hH.js +2143 -1744
  518. package/dist/sv-SE-B1sbgsnh.js +13 -0
  519. package/dist/sv-SE-BHfydid5.js +27 -0
  520. package/dist/sv-SE-BUq1X9F0.js +113 -0
  521. package/dist/sv-SE-BYC_f8r7.js +29 -0
  522. package/dist/sv-SE-C6uPh9g5.js +37 -0
  523. package/dist/sv-SE-CCFIf86P.js +13 -0
  524. package/dist/sv-SE-CRBRuE8Z.js +32 -0
  525. package/dist/sv-SE-CXaMlJCI.js +24 -0
  526. package/dist/sv-SE-DGpvVvWj.js +55 -0
  527. package/dist/sv-SE-D_ZnGxiQ.js +13 -0
  528. package/dist/sv-SE-DsPdegWB.js +13 -0
  529. package/dist/sv-SE-K1QT1cOt.js +68 -0
  530. package/dist/sv-SE-kR514dO1.js +57 -0
  531. package/dist/terminal-1-_me9J9h0.js +18 -0
  532. package/dist/trackNavigation-db_h46BT.js +28 -0
  533. package/dist/types/api/address/useAddressCleanse.d.ts +6 -2
  534. package/dist/types/api/address/useRetrieveAddress.d.ts +3 -1
  535. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +18 -0
  536. package/dist/types/api/businessLines/businessLines.types.d.ts +16 -0
  537. package/dist/types/api/businessLines/useBusinessLines.d.ts +4 -2
  538. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +7 -0
  539. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +5 -0
  540. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +7 -0
  541. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +1 -0
  542. package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -0
  543. package/dist/types/api/configurations/useScenarios.d.ts +12 -12
  544. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +15 -0
  545. package/dist/types/api/industryCodes/industryCodes.types.d.ts +2 -1
  546. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +3 -3
  547. package/dist/types/api/legalEntity/useLegalEntity.d.ts +16 -16
  548. package/dist/types/api/pci/pci.types.d.ts +17 -0
  549. package/dist/types/api/pci/usePciQuestionnaire.d.ts +6 -0
  550. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +12 -0
  551. package/dist/types/api/pci/usePciStatus.d.ts +6 -0
  552. package/dist/types/api/pci/usePciTemplate.d.ts +8 -0
  553. package/dist/types/api/queryKeys.d.ts +5 -4
  554. package/dist/types/components/BankAccount/fields/BankAccountFormat/types.d.ts +2 -1
  555. package/dist/types/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.d.ts +10 -0
  556. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +5 -0
  557. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirementsModal.d.ts +6 -0
  558. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -2
  559. package/dist/types/components/BankAccount/forms/BankDocument/validate.d.ts +3 -0
  560. package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +1 -1
  561. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +7 -0
  562. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +3 -0
  563. package/dist/types/components/BankAccount/forms/PayoutAccount/payoutAccountFormat.d.ts +1 -1
  564. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +2 -0
  565. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
  566. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutRequirementsModal.d.ts +8 -0
  567. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +13 -0
  568. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +6 -1
  569. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
  570. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PayoutVerificationMethod.d.ts +1 -2
  571. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +5 -5
  572. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +2 -0
  573. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
  574. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +2 -1
  575. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  576. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1052 -642
  577. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
  578. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -0
  579. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
  580. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -3
  581. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +5 -4
  582. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
  583. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +5 -3
  584. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -3
  585. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -3
  586. package/dist/types/components/Business/forms/rules.d.ts +3 -1
  587. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
  588. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -4
  589. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +9 -6
  590. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -3
  591. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +2 -1
  592. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -2
  593. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +5 -0
  594. package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +3 -3
  595. package/dist/types/components/Business/utils/requestingCapabilities.d.ts +3 -0
  596. package/dist/types/components/BusinessLines/constants.d.ts +23 -0
  597. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +30 -0
  598. package/dist/types/components/BusinessLines/fields/SalesChannels/SalesChannels.d.ts +2 -0
  599. package/dist/types/components/BusinessLines/fields/SalesChannels/types.d.ts +6 -0
  600. package/dist/types/components/BusinessLines/fields/WebDataField/WebDataField.d.ts +2 -0
  601. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +6 -0
  602. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/IndustryCodesForm.d.ts +2 -0
  603. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/types.d.ts +2 -0
  604. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/SalesChannelsForm.d.ts +2 -0
  605. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +3 -0
  606. package/dist/types/components/BusinessLines/forms/rules.d.ts +5 -0
  607. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +6 -0
  608. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLines.d.ts +9 -0
  609. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +2 -0
  610. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesStore.d.ts +3 -0
  611. package/dist/types/components/BusinessLines/tasks/BusinessLines/ExistingBusinessLines/ExistingBusinessLines.d.ts +8 -0
  612. package/dist/types/components/BusinessLines/tasks/types.d.ts +17 -0
  613. package/dist/types/components/BusinessLines/tasks/utils.d.ts +21 -0
  614. package/dist/types/components/BusinessLines/tasks/validate.d.ts +9 -0
  615. package/dist/types/components/Contract/hooks/useSalesChannels.d.ts +2 -0
  616. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +1328 -758
  617. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +0 -1
  618. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +0 -1
  619. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  620. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +0 -1
  621. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +0 -1
  622. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +7 -5
  623. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsType.d.ts +3 -0
  624. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
  625. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +14 -13
  626. package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
  627. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +6 -6
  628. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/BusinessFinancingComponent.d.ts +1 -1
  629. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
  630. package/dist/types/components/EmbeddedDropins/SignPCIComponent/SignPCIComponent.d.ts +3 -1
  631. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +3 -3
  632. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +3 -0
  633. package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
  634. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +3 -3
  635. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +2 -1
  636. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +3 -3
  637. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +1 -1
  638. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +4 -1
  639. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +3 -1
  640. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
  641. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -8
  642. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -6
  643. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +1 -1
  644. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -0
  645. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +57 -0
  646. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/RemediationAlerts.d.ts +7 -0
  647. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +19 -0
  648. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +0 -2
  649. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +3 -0
  650. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +1 -1
  651. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +1 -1
  652. package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -4
  653. package/dist/types/components/Shared/FormNavigation/FormNavigation.d.ts +1 -1
  654. package/dist/types/components/Shared/FormNavigation/types.d.ts +0 -2
  655. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +1 -3
  656. package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
  657. package/dist/types/components/Shared/Summary/Summary.d.ts +1 -1
  658. package/dist/types/components/Shared/Summary/types.d.ts +1 -2
  659. package/dist/types/components/Shared/TaskVerificationStatus/TaskVerificationStatus.d.ts +18 -0
  660. package/dist/types/components/Shared/devex/DebugListener/DebugFormData.d.ts +1 -0
  661. package/dist/types/components/Shared/devex/DebugListener/debugStore.d.ts +5 -0
  662. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +1 -1
  663. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +4 -0
  664. package/dist/types/components/Shared/fields/IndustryCodeField/fieldConfig.d.ts +3 -0
  665. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +22 -0
  666. package/dist/types/components/Shared/fields/IndustryCodeField/validate.d.ts +3 -0
  667. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
  668. package/dist/types/components/Shared/forms/Address/localized/jp/JpAddress.d.ts +7 -0
  669. package/dist/types/components/Shared/forms/Address/localized/jp/ReadonlyTextField.d.ts +7 -0
  670. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +5 -0
  671. package/dist/types/components/Shared/forms/Address/localized/jp/mapAddressLocalizationToJpAddressSchema.d.ts +3 -0
  672. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSchemaToAddressLocalizations.d.ts +3 -0
  673. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +4 -0
  674. package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -2
  675. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -2
  676. package/dist/types/components/Shared/forms/RegistrationAddress/RegistrationAddressMultiform.d.ts +3 -0
  677. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +3 -2
  678. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +4 -0
  679. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +3 -1
  680. package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
  681. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +4 -12
  682. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
  683. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +1 -2
  684. package/dist/types/components/Trust/forms/TrustRegistrationDetails/TrustRegistrationDetailsMultiform.d.ts +2 -0
  685. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -16
  686. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +1 -2
  687. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +2 -2
  688. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +21 -0
  689. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +2 -0
  690. package/dist/types/components/Trust/tasks/TrustDropin/validate.d.ts +5 -0
  691. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +1 -2
  692. package/dist/types/components/ui/atoms/Header/Header.d.ts +12 -0
  693. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
  694. package/dist/types/components/ui/atoms/RadioCard/RadioCard.d.ts +1 -0
  695. package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +1 -1
  696. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.d.ts +4 -4
  697. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +8 -9
  698. package/dist/types/components/ui/atoms/Status/Status.d.ts +9 -3
  699. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +6 -0
  700. package/dist/types/components/ui/atoms/TileGroup/TileGroup.d.ts +3 -1
  701. package/dist/types/components/ui/atoms/Typography/Typography.types.d.ts +1 -1
  702. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +29 -7
  703. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -1
  704. package/dist/types/components/ui/molecules/Card/types.d.ts +1 -0
  705. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +1 -2
  706. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -1
  707. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -0
  708. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -23
  709. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +3 -3
  710. package/dist/types/components/ui/molecules/EmbeddedStatus/types.d.ts +23 -0
  711. package/dist/types/context/ExperimentContext/types.d.ts +24 -20
  712. package/dist/types/context/I18nProvider/I18nContext.d.ts +3 -0
  713. package/dist/types/context/SettingsContext/SettingsProvider.d.ts +1 -1
  714. package/dist/types/context/SettingsContext/types.d.ts +3 -0
  715. package/dist/types/context/StateContext/types.d.ts +2 -1
  716. package/dist/types/core/errorMapping.d.ts +4 -1
  717. package/dist/types/core/models/api/address.d.ts +5 -0
  718. package/dist/types/core/models/api/capability.d.ts +20 -0
  719. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  720. package/dist/types/core/models/api/source-of-funds.d.ts +5 -0
  721. package/dist/types/core/models/api/transfer-instrument.d.ts +2 -0
  722. package/dist/types/core/process-field-configurations.d.ts +4 -1
  723. package/dist/types/core/user-events.d.ts +22 -11
  724. package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +1 -0
  725. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +3 -3
  726. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +5 -5
  727. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +3 -3
  728. package/dist/types/embeds/individual-status/adyen-individual-status.types.d.ts +5 -5
  729. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +3 -3
  730. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.types.d.ts +5 -5
  731. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +3 -3
  732. package/dist/types/embeds/terms-of-service-status/adyen-terms-of-service-status.types.d.ts +39 -0
  733. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +3 -3
  734. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.types.d.ts +5 -5
  735. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +3 -3
  736. package/dist/types/embeds/transfer-instrument-management/adyen-transfer-instrument-management.types.d.ts +5 -5
  737. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -6
  738. package/dist/types/hooks/useAnalytics/useAnalytics.d.ts +16 -0
  739. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +6 -8
  740. package/dist/types/hooks/useUboQuestionnaire.d.ts +25 -0
  741. package/dist/types/language/Language.d.ts +10 -0
  742. package/dist/types/language/types.d.ts +21 -7
  743. package/dist/types/language/utils.d.ts +2 -2
  744. package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
  745. package/dist/types/types/form-rules.d.ts +2 -0
  746. package/dist/types/utils/addLinkedFields.d.ts +26 -2
  747. package/dist/types/utils/analytics/convertToEmbeddedEvent.d.ts +9 -0
  748. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +30 -0
  749. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +13 -0
  750. package/dist/types/utils/analytics/trackNavigation.d.ts +10 -0
  751. package/dist/types/utils/api/documentUtils.d.ts +1 -0
  752. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  753. package/dist/types/utils/filterProblemsByTaskForms.d.ts +12 -0
  754. package/dist/types/utils/getName.d.ts +1 -1
  755. package/dist/types/utils/getSSNType.d.ts +1 -0
  756. package/dist/types/utils/getTrustedFields.d.ts +9 -0
  757. package/dist/types/utils/textTransformation/toFullWidth.d.ts +6 -0
  758. package/dist/types/utils/translation.d.ts +3 -2
  759. package/dist/types/utils/validatorUtils.d.ts +1 -0
  760. package/dist/types-C972Lk6s.js +34 -0
  761. package/dist/types-CLz74bOT.js +88 -0
  762. package/dist/types-Ctv8hbzY.js +74 -0
  763. package/dist/types-f66rmUFy.js +164 -0
  764. package/dist/upload-BF65P4KM.js +17 -0
  765. package/dist/useAssociatedLegalEntity-DAB1oG6O.js +33 -0
  766. package/dist/useCreateLegalEntity-BK5YcHA-.js +31 -0
  767. package/dist/useDataset-BtfHQp4w.js +220 -0
  768. package/dist/useForm-wQyeWa1b.js +1623 -0
  769. package/dist/useGlobalData-B33uuhtd.js +68 -0
  770. package/dist/useMultiForm-rZmCYsI4.js +864 -0
  771. package/dist/useOnboardingStatus-BbIpiZR4.js +27 -0
  772. package/dist/useScenarios-DPOodENA.js +46 -0
  773. package/dist/useTermsOfServiceStatus-DKeMR4Xi.js +42 -0
  774. package/dist/useToastContext-BK9oGWtb.js +60 -0
  775. package/dist/useUnincorporatedPartnershipMembers-Cdts5Hbn.js +99 -0
  776. package/dist/useUpdateBusinessLines-CWYtpMwr.js +46 -0
  777. package/dist/useUpdateLegalEntity-oa8qEzc4.js +39 -0
  778. package/dist/utils-AP5TpAhf.js +774 -0
  779. package/dist/utils-COz1RbbA.js +237 -0
  780. package/dist/validate-BYwVLb-X.js +41 -0
  781. package/dist/validate-CBVdP51L.js +100 -0
  782. package/dist/validationError-CvZLhw5H.js +86 -0
  783. package/dist/warning-circle-fill-CEN1WL7A.js +17 -0
  784. package/dist/warning-diamond-filled-BfXMlVrG.js +17 -0
  785. package/dist/webinar-DqjqrNEv.js +22 -0
  786. package/package.json +82 -83
  787. package/dist/4-people-CCqdlDEw.js +0 -24
  788. package/dist/AD-CyP5INSp.js +0 -23
  789. package/dist/AT-DJLlevck.js +0 -23
  790. package/dist/AcceptTermsOfServiceComponent-BF24NWVw.js +0 -657
  791. package/dist/AccountSetupRejected-2t22lJUo.js +0 -26
  792. package/dist/Address-DSwfzWFu.js +0 -1076
  793. package/dist/Alert-C24s_Ygs.js +0 -231
  794. package/dist/Avatar-DQjt5Lk2.js +0 -60
  795. package/dist/BE-B-m_4F41.js +0 -23
  796. package/dist/BG-BVR5ytc-.js +0 -27
  797. package/dist/BusinessDetailsDropin-CRFPvWuD.js +0 -5088
  798. package/dist/BusinessFinancingComponent-y2_kC8bx.js +0 -45
  799. package/dist/BusinessFinancingDropin-C-xm14b8.js +0 -1811
  800. package/dist/BusinessFinancingPage-BOG7yrw6.js +0 -40
  801. package/dist/BusinessTypeSelectionPage-ujY2jj6B.js +0 -426
  802. package/dist/CH-CesIKOYy.js +0 -23
  803. package/dist/CY-BnJ7k_mN.js +0 -23
  804. package/dist/CZ-BiPeoA9G.js +0 -33
  805. package/dist/Card-BMuquALf.js +0 -145
  806. package/dist/Confirm-DwutojkY.js +0 -64
  807. package/dist/CountryField-D0YZrov9.js +0 -864
  808. package/dist/CreateIndividualComponent-VZWLAo0l.js +0 -72
  809. package/dist/CreateTransferInstrumentComponent-OtReN6Cy.js +0 -67
  810. package/dist/Currency-BECbMsi5.js +0 -238
  811. package/dist/CustomerSupport-B8zC_huY.js +0 -141
  812. package/dist/DE-DdcbG-CC.js +0 -23
  813. package/dist/DK-DA8qRrzq.js +0 -33
  814. package/dist/DebugModal-CshTHx0o.js +0 -328
  815. package/dist/DecisionMakerDetailsPage-BJUwR4R7.js +0 -100
  816. package/dist/DecisionMakers-BDNa3HcC.js +0 -591
  817. package/dist/Dropzone-D6dXhmL4.js +0 -218
  818. package/dist/EE-CaXoPgZz.js +0 -23
  819. package/dist/ES-Bt_oaIaf.js +0 -23
  820. package/dist/EmbeddedStatus-BHTZcjUN.js +0 -100
  821. package/dist/EndStateLayout-CyGtLyvf.js +0 -71
  822. package/dist/FI-C5V3lLuN.js +0 -23
  823. package/dist/FR-Bc1tLIC4.js +0 -23
  824. package/dist/FormFlow-CZ9f5X0C.js +0 -216
  825. package/dist/FormNavigation-ezxkIqdb.js +0 -162
  826. package/dist/GG-BGuqxplU.js +0 -33
  827. package/dist/GI-CROkpYrU.js +0 -41
  828. package/dist/GR-B9c2boG8.js +0 -23
  829. package/dist/HR-p4luVYpu.js +0 -23
  830. package/dist/HU-D8vJYkDH.js +0 -32
  831. package/dist/IE-Cli_j7Al.js +0 -23
  832. package/dist/IM-mpIyBn16.js +0 -33
  833. package/dist/IS-02zCAdvq.js +0 -27
  834. package/dist/IT-CzURFhrK.js +0 -23
  835. package/dist/IndividualOnfidoDropin-vuHu-O_C.js +0 -7874
  836. package/dist/InputDate-CHygOGiS.js +0 -43
  837. package/dist/InputGroup-WBfGDV5F.js +0 -32
  838. package/dist/InputText-BX5sG9WJ.js +0 -161
  839. package/dist/Introduction-BsKwELuc.js +0 -304
  840. package/dist/JE-MFwIYti7.js +0 -33
  841. package/dist/LI-DA06W10W.js +0 -23
  842. package/dist/LT-DuU6E2Ct.js +0 -23
  843. package/dist/LU-BQHhNpDy.js +0 -23
  844. package/dist/LV-DN7wckbP.js +0 -23
  845. package/dist/LegalRepresentativeDetailsPage-DtMHe1Nq.js +0 -61
  846. package/dist/Link-BFdxU8qh.js +0 -35
  847. package/dist/MC-DtSWC4jS.js +0 -23
  848. package/dist/MT-DeDMQ1f_.js +0 -23
  849. package/dist/ManageIndividualComponent-By_fCmN1.js +0 -47
  850. package/dist/ManageTermsOfServiceComponent-D7F44OPD.js +0 -47
  851. package/dist/ManageTransferInstrumentComponent-DywpP5PK.js +0 -294
  852. package/dist/MaskedInput-BZ7t98eu.js +0 -799
  853. package/dist/MaybeModal-CE9kYOrU.js +0 -25
  854. package/dist/Modal-nMRQDTF7.js +0 -136
  855. package/dist/NL-aVL0NAp-.js +0 -23
  856. package/dist/NO-D7EOiQA1.js +0 -32
  857. package/dist/OnboardingDropinComponent-B0GrJ_pR.js +0 -4301
  858. package/dist/PL-Bg7axKQA.js +0 -32
  859. package/dist/PT-hB1HnBM2.js +0 -23
  860. package/dist/PayoutDetailsDropin-BJIqXmPn.js +0 -3694
  861. package/dist/RO-BLlC4CKq.js +0 -23
  862. package/dist/RadioGroup-CYDXrtrO.js +0 -143
  863. package/dist/RegistrationAddress-qtMZa31b.js +0 -2334
  864. package/dist/Review-D7NEYFoT.js +0 -82
  865. package/dist/RootBusinessDetailsPage-rCbGLBEv.js +0 -1870
  866. package/dist/RootIndividualDetailsPage-B3TkB6Xj.js +0 -77
  867. package/dist/SE-q25Qt85B.js +0 -33
  868. package/dist/SI-BzA-ozn6.js +0 -23
  869. package/dist/SK-DOTdLJPw.js +0 -23
  870. package/dist/SM-B4BIgmhk.js +0 -23
  871. package/dist/SignPCIComponent-C0iYfSl6.js +0 -294
  872. package/dist/SingpassSelection-ClMlwfoj.js +0 -130
  873. package/dist/SoleProprietorshipPage-JKNrAy74.js +0 -50
  874. package/dist/SourceOfFundsPage-D-pN33-9.js +0 -3101
  875. package/dist/Spacer-BK3jDget.js +0 -18
  876. package/dist/StepProgressIndicator-BWCQmDeV.js +0 -78
  877. package/dist/StoreProvider-BlaJzXSZ.js +0 -7072
  878. package/dist/StructuredList-DaepaiVE.js +0 -38
  879. package/dist/TaskItemStatus-B38keERo.js +0 -125
  880. package/dist/TaskStatusIndicator-BIvTrQtf.js +0 -69
  881. package/dist/TaxInformationField-DS0m73if.js +0 -3062
  882. package/dist/TaxReportingDropin-CVbVkFhv.js +0 -499
  883. package/dist/TileGroup-CztY53P9.js +0 -174
  884. package/dist/TrustDetailsPage-C791Wu5u.js +0 -1205
  885. package/dist/TrustMemberCompanyPage-BOQ5D3y4.js +0 -60
  886. package/dist/TrustMemberIndividualPage-BPIXX2Mh.js +0 -66
  887. package/dist/UnincorporatedPartnershipIndividualPage-vzn0R02z.js +0 -66
  888. package/dist/UnincorporatedPartnershipMemberCompanyPage-C-kGU5Sh.js +0 -64
  889. package/dist/VA-bPXdCnwD.js +0 -23
  890. package/dist/ViewVerificationStatusComponent-BTW-Vw9I.js +0 -177
  891. package/dist/analytics-3-a-Od7Z.js +0 -61
  892. package/dist/arrow-right-D_mdkZmE.js +0 -14
  893. package/dist/bafinUtils-Bar3qiJA.js +0 -457
  894. package/dist/bag-DpxmyXfR.js +0 -14
  895. package/dist/bank-gyBvaSp4.js +0 -14
  896. package/dist/bin-Bgdj6KzC.js +0 -18
  897. package/dist/capital-CF9_Ev99.js +0 -17
  898. package/dist/cash-stack-Ds76Du8m.js +0 -22
  899. package/dist/certificate-D6xjhThs.js +0 -17
  900. package/dist/checkmark-circle-fill-BhvuqTl9.js +0 -17
  901. package/dist/checkmark-circle-nACBJ24q.js +0 -20
  902. package/dist/checkmark-small-63w5fAxg.js +0 -14
  903. package/dist/checkmark-tfEAu7lj.js +0 -14
  904. package/dist/chevron-down-CkQS-knD.js +0 -14
  905. package/dist/chevron-left-CBCMdMx6.js +0 -14
  906. package/dist/chevron-right-dIVWvPJu.js +0 -14
  907. package/dist/chevron-up-D93IGU9z.js +0 -14
  908. package/dist/circle-Dgfa7GUy.js +0 -17
  909. package/dist/coins-CFu331p2.js +0 -17
  910. package/dist/commonValidators-Bk0SSjsH.js +0 -24
  911. package/dist/contract-DI03_xrF.js +0 -14
  912. package/dist/cross-circle-fill-small-CHMDaA3q.js +0 -14
  913. package/dist/cross-o4n5KXxG.js +0 -14
  914. package/dist/currency-BGwQyxBo.js +0 -36
  915. package/dist/da-DK-B45X2VaJ.js +0 -35
  916. package/dist/da-DK-BJ7aTPir.js +0 -13
  917. package/dist/da-DK-BTpZzEgA.js +0 -15
  918. package/dist/da-DK-BoQic3Gy.js +0 -33
  919. package/dist/da-DK-CeNMXUfE.js +0 -23
  920. package/dist/da-DK-D0N1TVVU.js +0 -58
  921. package/dist/da-DK-D4H69PX3.js +0 -30
  922. package/dist/da-DK-DStNe471.js +0 -22
  923. package/dist/da-DK-q2b_1elr.js +0 -35
  924. package/dist/de-DE-C78RLE2G.js +0 -13
  925. package/dist/de-DE-CGoBPCPv.js +0 -22
  926. package/dist/de-DE-CWvgMDqU.js +0 -35
  927. package/dist/de-DE-D2ByeIZs.js +0 -35
  928. package/dist/de-DE-DjOUNvp6.js +0 -15
  929. package/dist/de-DE-Dtuu-nE7.js +0 -58
  930. package/dist/de-DE-Dwagawx1.js +0 -33
  931. package/dist/de-DE-JI-7mvxy.js +0 -23
  932. package/dist/de-DE-wp5-H-ov.js +0 -30
  933. package/dist/document-1-DsCi9vmX.js +0 -14
  934. package/dist/document-person-DBlLin9u.js +0 -20
  935. package/dist/download-B8_c4ARV.js +0 -17
  936. package/dist/dropinUtils-DHp5v5jB.js +0 -192
  937. package/dist/edit-1-D6f6zk9p.js +0 -14
  938. package/dist/en-US-546hB2Wn.js +0 -60
  939. package/dist/en-US-BQpgt41j.js +0 -37
  940. package/dist/en-US-BTYdAWXp.js +0 -15
  941. package/dist/en-US-BbAzROHT.js +0 -36
  942. package/dist/en-US-CAm3meB1.js +0 -30
  943. package/dist/en-US-CQ3angjM.js +0 -22
  944. package/dist/en-US-DHq7VYFs.js +0 -23
  945. package/dist/en-US-DIdQJky-.js +0 -35
  946. package/dist/es-ES-BsQpwaPN.js +0 -58
  947. package/dist/es-ES-Bsoco8Fj.js +0 -33
  948. package/dist/es-ES-BtUSEzkE.js +0 -13
  949. package/dist/es-ES-CKMfS8Yy.js +0 -22
  950. package/dist/es-ES-Cj7q7fWO.js +0 -15
  951. package/dist/es-ES-DKCCgVF8.js +0 -35
  952. package/dist/es-ES-DOVPTeyf.js +0 -23
  953. package/dist/es-ES-Ds3-DtqZ.js +0 -30
  954. package/dist/es-ES-WWftn3JX.js +0 -35
  955. package/dist/external-link-BjladU3E.js +0 -14
  956. package/dist/fi-FI-BJ9RzrL3.js +0 -58
  957. package/dist/fi-FI-BNcnKrJ9.js +0 -15
  958. package/dist/fi-FI-ClnsYt3L.js +0 -33
  959. package/dist/fi-FI-Cvar63RH.js +0 -13
  960. package/dist/fi-FI-D522KHGk.js +0 -23
  961. package/dist/fi-FI-D9E_KaJi.js +0 -35
  962. package/dist/fi-FI-DPNeTsJS.js +0 -30
  963. package/dist/fi-FI-Hhku9Lmc.js +0 -35
  964. package/dist/fi-FI-REYOX46I.js +0 -22
  965. package/dist/fieldConfigurations-B8bDFQ53.js +0 -458
  966. package/dist/form-rules-DhbF2mY4.js +0 -13
  967. package/dist/formatCurrency-CMOSdJMB.js +0 -29
  968. package/dist/fr-FR-B5543Fe-.js +0 -13
  969. package/dist/fr-FR-BYuKsZIb.js +0 -35
  970. package/dist/fr-FR-Bn3D6mmY.js +0 -15
  971. package/dist/fr-FR-CJI0bIig.js +0 -33
  972. package/dist/fr-FR-CNR5-s9g.js +0 -58
  973. package/dist/fr-FR-ChmNQciP.js +0 -30
  974. package/dist/fr-FR-Cv0k-3Xc.js +0 -35
  975. package/dist/fr-FR-D9qaP6nx.js +0 -22
  976. package/dist/fr-FR-DInQKkTd.js +0 -23
  977. package/dist/getName-DJlhsDj_.js +0 -41
  978. package/dist/gift-SdNY6AqI.js +0 -14
  979. package/dist/graph-DwYwlplw.js +0 -21
  980. package/dist/graph-up-DpbCSPbc.js +0 -20
  981. package/dist/hasDataChanged-BgvxL-Hx.js +0 -19
  982. package/dist/headquarter-C6AsewcP.js +0 -21
  983. package/dist/hotel-JX0bjsSA.js +0 -22
  984. package/dist/iframeWidget-Bftkd3v_.js +0 -234
  985. package/dist/image-eUqBiRX_.js +0 -17
  986. package/dist/info-Wao3PEQK.js +0 -21
  987. package/dist/isEmpty-CuQFhMf0.js +0 -23
  988. package/dist/it-IT-BV9K87FK.js +0 -58
  989. package/dist/it-IT-BeC2Y1F8.js +0 -33
  990. package/dist/it-IT-Biduphjt.js +0 -22
  991. package/dist/it-IT-C_fNHhjE.js +0 -35
  992. package/dist/it-IT-CjEYONJg.js +0 -23
  993. package/dist/it-IT-Dd6xGSe-.js +0 -13
  994. package/dist/it-IT-DvM-9LpM.js +0 -15
  995. package/dist/it-IT-Nl57jui-.js +0 -35
  996. package/dist/it-IT-eCrTB65E.js +0 -30
  997. package/dist/keys-BpNgnAsD.js +0 -23
  998. package/dist/localizeDateString-DHsivjy2.js +0 -27
  999. package/dist/location-YXhcBMDy.js +0 -17
  1000. package/dist/mail-Z_IE_hkw.js +0 -14
  1001. package/dist/mapExistingFile-DW5ktJzM.js +0 -231
  1002. package/dist/mapScriptLocalization-CI-Ydp2z.js +0 -72
  1003. package/dist/mapTransferInstrumentToPayoutAccount-CAoOlPMA.js +0 -30
  1004. package/dist/minus-circle-filled-BGKeHaxJ.js +0 -17
  1005. package/dist/nl-NL-BHkRnVrj.js +0 -35
  1006. package/dist/nl-NL-BHqiO21q.js +0 -15
  1007. package/dist/nl-NL-Cysslsh2.js +0 -33
  1008. package/dist/nl-NL-D2QKudfh.js +0 -30
  1009. package/dist/nl-NL-DLedC3mO.js +0 -35
  1010. package/dist/nl-NL-DVENFpd5.js +0 -13
  1011. package/dist/nl-NL-DywVQ9km.js +0 -58
  1012. package/dist/nl-NL-G1wVnmzT.js +0 -22
  1013. package/dist/nl-NL-Zcq0bXd-.js +0 -23
  1014. package/dist/no-NO-B8oxqfNI.js +0 -58
  1015. package/dist/no-NO-BTtAuqCb.js +0 -22
  1016. package/dist/no-NO-BxReX6oF.js +0 -23
  1017. package/dist/no-NO-CKT9kLAH.js +0 -15
  1018. package/dist/no-NO-C_snYWBc.js +0 -30
  1019. package/dist/no-NO-CpVal4cV.js +0 -35
  1020. package/dist/no-NO-Dn2UkdoI.js +0 -13
  1021. package/dist/no-NO-kaAdT9B8.js +0 -35
  1022. package/dist/no-NO-zSnPtrDi.js +0 -33
  1023. package/dist/options-horizontal-nJ9-ButA.js +0 -18
  1024. package/dist/partner-COG2_Erh.js +0 -21
  1025. package/dist/pay-by-link-plane-Pv7Babgn.js +0 -22
  1026. package/dist/payout-iEmHhgQ4.js +0 -20
  1027. package/dist/person-CdGfItMU.js +0 -17
  1028. package/dist/plus-CwLva7fq.js +0 -14
  1029. package/dist/plus-circle-filled-Cnf1oJTm.js +0 -17
  1030. package/dist/pt-PT-BkvMsoK4.js +0 -35
  1031. package/dist/pt-PT-BvK00TeI.js +0 -58
  1032. package/dist/pt-PT-C-hbNnsB.js +0 -30
  1033. package/dist/pt-PT-CjsyP_OK.js +0 -33
  1034. package/dist/pt-PT-D2elvnDU.js +0 -15
  1035. package/dist/pt-PT-Dk48OVtf.js +0 -22
  1036. package/dist/pt-PT-N0njcfLO.js +0 -23
  1037. package/dist/pt-PT-Xm-pm3mb.js +0 -35
  1038. package/dist/pt-PT-_o5xgnxS.js +0 -13
  1039. package/dist/reporting-DlRoibD7.js +0 -17
  1040. package/dist/resolveEnvironment-BGYn6Ls_.js +0 -84
  1041. package/dist/revenue-accelerate-rtXA-8EE.js +0 -17
  1042. package/dist/rules-DP3jxPzq.js +0 -311
  1043. package/dist/save-BofgDbDX.js +0 -14
  1044. package/dist/search-BjMkvQh0.js +0 -17
  1045. package/dist/show-uL6I-rMo.js +0 -17
  1046. package/dist/sl-SI-BB7iVcFI.js +0 -22
  1047. package/dist/sl-SI-BhVTSmhQ.js +0 -30
  1048. package/dist/sl-SI-Br0UEUPL.js +0 -33
  1049. package/dist/sl-SI-BylvpF-X.js +0 -15
  1050. package/dist/sl-SI-Cth2Qa5T.js +0 -35
  1051. package/dist/sl-SI-D_rqR0D7.js +0 -35
  1052. package/dist/sl-SI-MZoDApq9.js +0 -23
  1053. package/dist/sl-SI-NI2OJAvm.js +0 -58
  1054. package/dist/solution-payments-DTAuLSWF.js +0 -14
  1055. package/dist/store-CkhgQMl0.js +0 -14
  1056. package/dist/sv-SE-66rqYTxi.js +0 -30
  1057. package/dist/sv-SE-B3zoXMuH.js +0 -35
  1058. package/dist/sv-SE-BUfESAQK.js +0 -13
  1059. package/dist/sv-SE-BtXmvxx4.js +0 -33
  1060. package/dist/sv-SE-CAZpDX9G.js +0 -58
  1061. package/dist/sv-SE-DCFSf4Oj.js +0 -23
  1062. package/dist/sv-SE-DbI-1JqN.js +0 -22
  1063. package/dist/sv-SE-Dwz1yTrB.js +0 -15
  1064. package/dist/sv-SE-OPOHtqtP.js +0 -35
  1065. package/dist/terminal-1-ewywjFJI.js +0 -18
  1066. package/dist/toCapitalized-Bq7laD0b.js +0 -13
  1067. package/dist/translation-DJHWTow9.js +0 -472
  1068. package/dist/types/api/pciTemplate/pciTemplate.types.d.ts +0 -9
  1069. package/dist/types/api/pciTemplate/usePciQuestionnaire.d.ts +0 -6
  1070. package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +0 -12
  1071. package/dist/types/api/pciTemplate/usePciStatus.d.ts +0 -6
  1072. package/dist/types/api/pciTemplate/usePciTemplate.d.ts +0 -14
  1073. package/dist/types/components/BusinessLines/tasks/BusinessLinesDropin.d.ts +0 -5
  1074. package/dist/types/components/Contract/hooks/useSalesChannelsSettings.d.ts +0 -3
  1075. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +0 -2
  1076. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +0 -8
  1077. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +0 -2
  1078. package/dist/types/components/ui/atoms/Remove/Remove.types.d.ts +0 -9
  1079. package/dist/types/components/ui/atoms/Status/Status.types.d.ts +0 -8
  1080. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +0 -11
  1081. package/dist/types/components/ui/molecules/Card/CardGroup.d.ts +0 -3
  1082. package/dist/types/core/analytics.d.ts +0 -31
  1083. package/dist/types/embeds/terms-of-service-status/adyen-manage-terms-of-service.types.d.ts +0 -39
  1084. package/dist/types/hooks/useAnalytics.d.ts +0 -22
  1085. package/dist/types/utils/bankVerification/animation.d.ts +0 -2
  1086. package/dist/types/utils/trackNavigation.d.ts +0 -10
  1087. package/dist/types-CAznNNSI.js +0 -160
  1088. package/dist/types-CP1NRoE8.js +0 -74
  1089. package/dist/types-K58FM7k4.js +0 -64
  1090. package/dist/upload-XDhHhAHV.js +0 -17
  1091. package/dist/useAssociatedLegalEntity-G30FPhOX.js +0 -33
  1092. package/dist/useDataset-BgvQQEKd.js +0 -120
  1093. package/dist/useForm-C1DW3mPC.js +0 -1694
  1094. package/dist/useFormContext-beqGS11A.js +0 -23
  1095. package/dist/useGlobalData-jb7ua9I6.js +0 -205
  1096. package/dist/useMultiForm-BucfLW49.js +0 -864
  1097. package/dist/useOnboardingStatus-CTgWLZxC.js +0 -27
  1098. package/dist/useScenarios-B7IWZ3xW.js +0 -46
  1099. package/dist/useTermsOfServiceStatus-B0dIrYTA.js +0 -42
  1100. package/dist/useToastContext-DGMeMy5R.js +0 -51
  1101. package/dist/useUnincorporatedPartnershipMembers-BCvmGMOX.js +0 -99
  1102. package/dist/utils-Bwnj33y_.js +0 -277
  1103. package/dist/utils-CXtNbmpA.js +0 -29
  1104. package/dist/utils-CgOzbb9O.js +0 -159
  1105. package/dist/validate-B5PwC1oL.js +0 -100
  1106. package/dist/validate-BRz0LPdo.js +0 -382
  1107. package/dist/validate-CvtamBXH.js +0 -605
  1108. package/dist/validationError-DOCbfk7K.js +0 -86
  1109. package/dist/warning-circle-fill-DADaWT65.js +0 -17
  1110. package/dist/warning-filled-BfAQN-BF.js +0 -14
  1111. package/dist/webinar-BJWDRK2H.js +0 -22
  1112. /package/dist/types/api/{pciTemplate → pci}/useSignPci.d.ts +0 -0
  1113. /package/dist/types/components/BusinessLines/tasks/{BusinessLinesGettingStarted → BusinessLines}/BusinessLinesGettingStarted.d.ts +0 -0
@@ -1,4301 +0,0 @@
1
- ;
2
- {
3
- try {
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] = "503df5ba-6401-4442-835c-b62127a53334", e._sentryDebugIdIdentifier = "sentry-dbid-503df5ba-6401-4442-835c-b62127a53334");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper, T as Trans } from "./translation-DJHWTow9.js";
11
- import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
12
- import { b as useApiContext, j as useQuery, k as httpPost, m as useSettingsContext, o as httpGet, p as getLegalRepresentative, c as useLegalEntity, q as skipToken, r as doesLegalEntityRequiresLegalRepresentative, a as useTranslation, B as Button, t as Svg, v as Skeleton, w as translateStringOrObject, x as Typography, y as LegalEntityTypes, z as isPartOfTrustFromLegalEntity, C as hasSolePropInLegalEntity, G as hasOwnEntityAssociationOfType, H as isEmptyEntity, J as EntityTypes, K as DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING, M as TaskTypes, N as createLogger, O as TaskStatuses, P as IconButton, U as useAnalyticsContext, V as Icon, W as noop, X as useExperimentsContext, Y as isInstantVerifiedAccount, Z as getObscuredAccountNumber, _ as useGetTaskStatus, R as ROOT_LE, L as Loader, $ as useGlobalStore, a0 as isPartOfUnincorporatedPartnership, a1 as getOwnSignatories, a2 as getOwnDecisionMakersLegalEntityIds, a3 as getOwnSolePropProblems, a4 as getOwnTrustProblems, a5 as getOwnUnincorporatedPartnershipProblems, a6 as getOwnEntityAssociations, a7 as TrustMemberTypes, u as useI18nContext, a8 as CountryCodes, a9 as isEmpty, g as getLegalEntityCountry, aa as getDecisionMakerDescriptionMap, ab as TRUST_DEFAULT_DESCRIPTIONS_MAP, ac as DEFAULT_TRUST_MEMBER_REQUIREMENTS, ad as hasAllCapabilitiesResolved, ae as hasRejectedCapabilities, af as objectsDeepEqual } from "./StoreProvider-BlaJzXSZ.js";
13
- import { lazy, Suspense } from "preact/compat";
14
- import { useMemo, useCallback, useEffect, useState, useRef } from "preact/hooks";
15
- import { u as useLocalStorage, a as useAccountHolder, b as useCapabilityProblems, I as Image, v as validateLegalCompanyName, c as validateNotEmptyOnBlur, d as validateLatinSpaceMarkPunctuationOnlyOnBlur, r as resolveFieldMetadata, R as RadioGroupCard, T as TextArea, C as ContextGuidance, e as TrustedFieldsProviders } from "./fieldConfigurations-B8bDFQ53.js";
16
- import { C as CompanyTypesValues, h as handleKeys, u as useSetting, L as LandingLayout, n as nameFields, M as MultiSelectList, m as makeSelectItemForRole, N as Name, a as useSingpassMyInfoLogin, i as isBafinSignatoryFlow, s as showIdNowModal } from "./bafinUtils-Bar3qiJA.js";
17
- import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-G30FPhOX.js";
18
- import cx from "classnames";
19
- import { a as Alert } from "./Alert-C24s_Ygs.js";
20
- import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-B0dIrYTA.js";
21
- import { S as SettingNames, I as InputText } from "./InputText-BX5sG9WJ.js";
22
- import { u as useToastContext } from "./useToastContext-DGMeMy5R.js";
23
- import { C as Card, V as VerificationErrorAlert, u as useDeleteTransferInstrument } from "./Card-BMuquALf.js";
24
- import { signal } from "@preact/signals";
25
- import { d as downloadFile } from "./file-CiG1D0zy.js";
26
- import { A as Avatar } from "./Avatar-DQjt5Lk2.js";
27
- import { L as LoaderWrapper, F as Field, a as useForm } from "./useForm-C1DW3mPC.js";
28
- import { T as TaskItemStatus } from "./TaskItemStatus-B38keERo.js";
29
- import { g as getLegalEntityNameBasedOnType } from "./getName-DJlhsDj_.js";
30
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity, R as RadioGroup } from "./RadioGroup-CYDXrtrO.js";
31
- import { F as FormNavigation, A as ActionBar } from "./FormNavigation-ezxkIqdb.js";
32
- import { m as mergeFieldMetadataIntoProps, g as getFieldProps, F as FormHeader, E as ErrorPanel, c as createFormUtils, C as CountryField, a as COUNTRY_FIELD, s as summaryItem, b as getRoleName, d as summaryStep, S as Summary, U as UnincorporatedPartnershipMemberTypes, e as getRoleTagVariant } from "./CountryField-D0YZrov9.js";
33
- import { K as KEYBOARD_KEYS } from "./keys-BpNgnAsD.js";
34
- import { T as Tag } from "./Tag-DdkVScyr.js";
35
- import { u as useUnincorporatedPartnershipMembers, d as deleteUnincorporatedPartnershipMember } from "./useUnincorporatedPartnershipMembers-BCvmGMOX.js";
36
- const getPciStatus = async (legalEntityId, baseUrl, data) => {
37
- return httpPost(
38
- {
39
- baseUrl,
40
- path: `legalEntities/${legalEntityId}/pci/signingRequired`
41
- },
42
- data
43
- );
44
- };
45
- const usePciStatus = (data, options) => {
46
- const { rootLegalEntityId, baseUrl } = useApiContext();
47
- return useQuery({
48
- queryKey: ["pciStatus", data],
49
- queryFn: () => getPciStatus(rootLegalEntityId.value, baseUrl.value, data),
50
- ...options
51
- });
52
- };
53
- function useSalesChannelsSettings() {
54
- const { isSettingEnabled } = useSettingsContext();
55
- return useMemo(() => {
56
- const settings = [];
57
- if (isSettingEnabled(SettingNames.RequirePciSignEcommerce)) {
58
- settings.push("eCommerce");
59
- }
60
- if (isSettingEnabled(SettingNames.RequirePciSignPos)) {
61
- settings.push("pos");
62
- }
63
- if (isSettingEnabled(SettingNames.RequirePciSignEcomMoto)) {
64
- settings.push("ecomMoto");
65
- }
66
- if (isSettingEnabled(SettingNames.RequirePciSignPosMoto)) {
67
- settings.push("posMoto");
68
- }
69
- return settings;
70
- }, [isSettingEnabled]);
71
- }
72
- const getTaskTypes = async (id, baseUrl) => {
73
- return httpGet({
74
- baseUrl,
75
- path: `legalEntities/${id}/configurations/tasks`
76
- });
77
- };
78
- const useTaskTypes = (options) => {
79
- const { rootLegalEntityId, baseUrl } = useApiContext();
80
- return useQuery({
81
- queryKey: ["taskTypes"],
82
- queryFn: () => getTaskTypes(rootLegalEntityId.value, baseUrl.value),
83
- ...options
84
- });
85
- };
86
- const getHasSeenIntroductionStorageKey = (legalEntityId) => `COMPLETED_INTRO-${legalEntityId}`;
87
- const useHasSeenIntroduction = ({ legalEntityId }) => {
88
- const [hasSeenIntroduction, setHasSeenIntroduction] = useLocalStorage(
89
- getHasSeenIntroductionStorageKey(legalEntityId),
90
- false
91
- );
92
- return { hasSeenIntroduction, setHasSeenIntroduction };
93
- };
94
- const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
95
- const useHasSeenSingpassSelection = ({
96
- legalEntityId
97
- }) => {
98
- const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(
99
- getHasSeenSingpassSelectionStorageKey(legalEntityId),
100
- false
101
- );
102
- return { hasSeenSingpassSelection, setHasSeenSingpassSelection };
103
- };
104
- const useAssociatedLegalRepresentative = (legalEntity) => {
105
- const matchingAssociation = useMemo(() => {
106
- if (!legalEntity) return void 0;
107
- return getLegalRepresentative(legalEntity);
108
- }, [legalEntity]);
109
- const { data } = useLegalEntity(
110
- doesLegalEntityRequiresLegalRepresentative(legalEntity) && matchingAssociation?.legalEntityId ? matchingAssociation.legalEntityId : skipToken
111
- );
112
- return data;
113
- };
114
- const getCanSeeEntitySelectionStorageKey = (legalEntityId) => `ENTITY_SELECTION_SEEN-${legalEntityId}`;
115
- const useCanSeeEntitySelection = (legalEntityId) => {
116
- const [canSeeEntitySelectionFromLocalStorage, setCanSeeEntitySelectionIntoLocalStorage] = useLocalStorage(getCanSeeEntitySelectionStorageKey(legalEntityId), true);
117
- return {
118
- canSeeEntitySelection: canSeeEntitySelectionFromLocalStorage,
119
- setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
120
- };
121
- };
122
- const providerButton = "adyen-kyc-provider-button";
123
- const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
124
- const styles$5 = {
125
- providerButton,
126
- providerButtonDisplayName
127
- };
128
- const ProviderButton = ({ provider, onClick }) => {
129
- const { t } = useTranslation("ui");
130
- const providerLogo = {
131
- singpassMyInfo: "singpass-logo",
132
- singpassMyInfoBusiness: "singpass-logo"
133
- };
134
- const providerDisplayName = {
135
- singpassMyInfo: "Singpass",
136
- singpassMyInfoBusiness: "Singpass"
137
- };
138
- const buttonLabel = {
139
- singpassMyInfo: t(($) => $["retrieveMyinfo"]),
140
- singpassMyInfoBusiness: t(($) => $["retrieveMyinfoBusiness"])
141
- };
142
- return /* @__PURE__ */ jsx(Button, { onClick, fullWidth: true, variant: "secondary", children: /* @__PURE__ */ jsxs("div", { className: styles$5.providerButton, children: [
143
- buttonLabel[provider],
144
- /* @__PURE__ */ jsx("span", { className: styles$5.providerButtonDisplayName, children: providerDisplayName[provider] }),
145
- /* @__PURE__ */ jsx(Svg, { name: providerLogo[provider], type: "image" })
146
- ] }) });
147
- };
148
- const legalEntityTypeToSubtitleTranslationKey = {
149
- [LegalEntityTypes.INDIVIDUAL]: "myInfoYouCanGetVerifiedDetails",
150
- [LegalEntityTypes.ORGANIZATION]: "myInfoBusinessYouCanGetVerifiedDetails"
151
- };
152
- const legalEntityTypeToProviderButtonKey = {
153
- [LegalEntityTypes.INDIVIDUAL]: "singpassMyInfo",
154
- [LegalEntityTypes.ORGANIZATION]: "singpassMyInfoBusiness"
155
- };
156
- const successAlertTitleText = {
157
- [LegalEntityTypes.INDIVIDUAL]: "myinfoDetailsRetrieved",
158
- [LegalEntityTypes.ORGANIZATION]: "myinfoBusinessDetailsRetrieved"
159
- };
160
- const successAlertContentText = {
161
- [LegalEntityTypes.INDIVIDUAL]: "yourDetailsArePreFilledInTheRelevantSections",
162
- [LegalEntityTypes.ORGANIZATION]: "yourBusinesssDetailsArePreFilledInTheRelevantSections"
163
- };
164
- const SingpassBanner = ({
165
- isLoading,
166
- isSuccess,
167
- errorMessage,
168
- onClick,
169
- onAlertClose,
170
- onMessage,
171
- legalEntityType
172
- }) => {
173
- const { t } = useTranslation("common");
174
- const { baseUrl } = useApiContext();
175
- const singpassEventListener = useCallback(
176
- (event) => {
177
- if (event.origin !== new URL(baseUrl.value).origin) return;
178
- onMessage({ data: { isSuccessful: event.data.isSuccessful } });
179
- },
180
- [baseUrl.value, onMessage]
181
- );
182
- useEffect(() => {
183
- window.addEventListener("message", singpassEventListener);
184
- return () => window.removeEventListener("message", singpassEventListener);
185
- }, [singpassEventListener]);
186
- const channel = new BroadcastChannel("sgidprovider");
187
- useEffect(() => {
188
- channel.onmessage = onMessage;
189
- return () => channel.close();
190
- }, [channel, onMessage]);
191
- if (isLoading) {
192
- return /* @__PURE__ */ jsx(Skeleton, {});
193
- }
194
- if (isSuccess) {
195
- const successTitleText = successAlertTitleText[legalEntityType];
196
- const successContentText = successAlertContentText[legalEntityType];
197
- return /* @__PURE__ */ jsx(
198
- Alert,
199
- {
200
- variant: "success",
201
- title: successTitleText && t(($) => $[successTitleText]),
202
- onClose: onAlertClose,
203
- children: successContentText && t(($) => $[successContentText])
204
- }
205
- );
206
- }
207
- const providerName = legalEntityTypeToProviderButtonKey[legalEntityType];
208
- if (errorMessage) {
209
- return /* @__PURE__ */ jsx(
210
- Alert,
211
- {
212
- variant: "warning",
213
- title: translateStringOrObject(t, errorMessage),
214
- onClose: onAlertClose,
215
- children: /* @__PURE__ */ jsxs(Typography, { variant: "body", children: [
216
- t(($) => $["tryAgainOrContinueEnteringTheDetailsYourself"]),
217
- providerName && /* @__PURE__ */ jsx(ProviderButton, { provider: providerName, onClick })
218
- ] })
219
- }
220
- );
221
- }
222
- const subtitleTranslationKey = legalEntityTypeToSubtitleTranslationKey[legalEntityType];
223
- return /* @__PURE__ */ jsxs(
224
- Alert,
225
- {
226
- className: cx("adyen-task-list-singpass-banner"),
227
- icon: false,
228
- title: t(($) => $["getSetUpInstantly"]),
229
- children: [
230
- subtitleTranslationKey && /* @__PURE__ */ jsx("div", { className: cx("adyen-task-list-singpass-banner__subtitle"), children: t(($) => $[subtitleTranslationKey]) }),
231
- providerName && /* @__PURE__ */ jsx(ProviderButton, { provider: providerName, onClick })
232
- ]
233
- }
234
- );
235
- };
236
- const getPciQuestionnaire = async (legalEntityId, baseUrl, documentId) => {
237
- return httpGet({
238
- baseUrl,
239
- path: `legalEntities/${legalEntityId}/pci/questionnaires/${documentId}`
240
- });
241
- };
242
- const getPciQuestionnaireList = async (legalEntityId, baseUrl) => {
243
- return httpGet({
244
- baseUrl,
245
- path: `legalEntities/${legalEntityId}/pci/questionnaires`
246
- });
247
- };
248
- const usePciQuestionnaireList = (options) => {
249
- const { rootLegalEntityId, baseUrl } = useApiContext();
250
- return useQuery({
251
- queryKey: ["pciQuestionnaireList"],
252
- queryFn: () => getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value),
253
- ...options
254
- });
255
- };
256
- const getTaskStatus = async (legalEntityId, baseUrl) => {
257
- return httpGet({
258
- baseUrl,
259
- path: `legalEntities/${legalEntityId}/taskStatus`
260
- });
261
- };
262
- const useTaskStatus = (options) => {
263
- const { rootLegalEntityId, baseUrl } = useApiContext();
264
- return useQuery({
265
- queryKey: ["taskStatus"],
266
- queryFn: () => getTaskStatus(rootLegalEntityId.value, baseUrl.value),
267
- ...options
268
- });
269
- };
270
- const useLegalEntityType = ({
271
- legalEntity
272
- }) => {
273
- const isTrust = isPartOfTrustFromLegalEntity(legalEntity);
274
- const isSoleProprietor = hasSolePropInLegalEntity(legalEntity);
275
- const hasLegalAssociation = isTrust || isSoleProprietor;
276
- switch (legalEntity.type) {
277
- case LegalEntityTypes.INDIVIDUAL:
278
- case LegalEntityTypes.ORGANIZATION:
279
- if (!hasLegalAssociation) return legalEntity.type;
280
- if (isSoleProprietor) return LegalEntityTypes.SOLE_PROPRIETORSHIP;
281
- if (isTrust) return LegalEntityTypes.TRUST;
282
- break;
283
- default:
284
- return void 0;
285
- }
286
- };
287
- const useCanSeeIntroduction = ({ legalEntity }) => {
288
- const legalEntityType = useLegalEntityType({ legalEntity });
289
- const { isSettingEnabled } = useSettingsContext();
290
- switch (legalEntityType) {
291
- case LegalEntityTypes.INDIVIDUAL:
292
- return !isSettingEnabled(SettingNames.HideOnboardingIntroductionIndividual);
293
- case LegalEntityTypes.ORGANIZATION:
294
- return !isSettingEnabled(SettingNames.HideOnboardingIntroductionOrganization);
295
- case LegalEntityTypes.SOLE_PROPRIETORSHIP:
296
- return !isSettingEnabled(SettingNames.HideOnboardingIntroductionSoleProprietor);
297
- case LegalEntityTypes.TRUST:
298
- return !isSettingEnabled(SettingNames.HideOnboardingIntroductionTrust);
299
- default:
300
- return false;
301
- }
302
- };
303
- const capabilitiesToPreventTypeChange = [
304
- "receivePayments",
305
- "issueCard",
306
- "useCard",
307
- "withdrawFromAtm",
308
- "withdrawFromAtmInRestrictedCountries",
309
- "useCardInRestrictedCountries",
310
- "useCardInRestrictedIndustries",
311
- "issueBankAccount",
312
- "sendToThirdParty",
313
- "receiveFromThirdParty",
314
- "getGrantOffers",
315
- "receiveGrants"
316
- ];
317
- const entityTypeToCorrespondingAccountHolderOption = {
318
- [LegalEntityTypes.INDIVIDUAL]: "myName",
319
- [LegalEntityTypes.ORGANIZATION]: "theCompanyIWorkFor",
320
- [LegalEntityTypes.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
321
- [LegalEntityTypes.TRUST]: "aTrust",
322
- [LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: "anUnincorporatedPartnership"
323
- };
324
- const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false, accountHolder) => {
325
- if (accountHolder) {
326
- return accountHolder;
327
- }
328
- if (!legalEntityResponse?.type) return void 0;
329
- if (hasOwnEntityAssociationOfType(
330
- LegalEntityTypes.SOLE_PROPRIETORSHIP,
331
- legalEntityResponse.entityAssociations,
332
- legalEntityResponse.id
333
- )) {
334
- return "mySoleProprietorName";
335
- }
336
- if (hasOwnEntityAssociationOfType(
337
- LegalEntityTypes.TRUST,
338
- legalEntityResponse.entityAssociations,
339
- legalEntityResponse.id
340
- )) {
341
- return "aTrust";
342
- }
343
- if (hasOwnEntityAssociationOfType(
344
- LegalEntityTypes.UNINCORPORATED_PARTNERSHIP,
345
- legalEntityResponse.entityAssociations,
346
- legalEntityResponse.id
347
- )) {
348
- return "anUnincorporatedPartnership";
349
- }
350
- if (isTypeChanging || !isEmptyEntity(legalEntityResponse)) {
351
- return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
352
- }
353
- };
354
- const allowIndividualWithoutSoleProp = (capabilities) => !capabilities?.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c));
355
- const BusinessTypes = {
356
- INDIVIDUAL: "individual",
357
- COMPANY: "company",
358
- INCORPORATED_PARTNERSHIP: "partnershipIncorporated",
359
- UNINCORPORATED_PARTNERSHIP: "partnershipUnincorporated",
360
- INDIVIDUAL_TRUSTEE: "individualTrustee",
361
- COMPANY_TRUSTEE: "companyTrustee",
362
- SOLE_PROPRIETORSHIP: "soleProprietorship",
363
- INCORPORATE_ASSOCIATION: "associationIncorporated"
364
- };
365
- const businessTypeMapping = {
366
- myName: {
367
- [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.INDIVIDUAL
368
- },
369
- theCompanyIWorkFor: {
370
- [LegalEntityTypes.ORGANIZATION]: BusinessTypes.COMPANY
371
- },
372
- mySoleProprietorName: {
373
- [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.SOLE_PROPRIETORSHIP
374
- },
375
- aTrust: {
376
- [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.INDIVIDUAL_TRUSTEE,
377
- [LegalEntityTypes.ORGANIZATION]: BusinessTypes.COMPANY_TRUSTEE
378
- },
379
- anUnincorporatedPartnership: {
380
- [LegalEntityTypes.INDIVIDUAL]: BusinessTypes.UNINCORPORATED_PARTNERSHIP,
381
- [LegalEntityTypes.ORGANIZATION]: BusinessTypes.UNINCORPORATED_PARTNERSHIP
382
- }
383
- };
384
- const companyTypesMapping = {
385
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: BusinessTypes.INCORPORATED_PARTNERSHIP,
386
- [CompanyTypesValues.INCORPORATED_ASSOCIATION]: BusinessTypes.INCORPORATE_ASSOCIATION,
387
- [CompanyTypesValues.PUBLIC_COMPANY]: BusinessTypes.COMPANY,
388
- [CompanyTypesValues.PRIVATE_COMPANY]: BusinessTypes.COMPANY,
389
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: BusinessTypes.COMPANY,
390
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: BusinessTypes.COMPANY,
391
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: BusinessTypes.COMPANY,
392
- [CompanyTypesValues.SOLE_PROPRIETORSHIP]: BusinessTypes.SOLE_PROPRIETORSHIP
393
- };
394
- const useBusinessSetup = (legalEntityResponse) => {
395
- const { accountHolder } = useAccountHolder();
396
- const accountHolderType = accountHolder || getDefaultAccountHolderType(legalEntityResponse);
397
- const organizationType = legalEntityResponse?.organization?.type;
398
- const businessSetup = accountHolderType === "theCompanyIWorkFor" && organizationType ? companyTypesMapping[organizationType] : businessTypeMapping[accountHolderType]?.[legalEntityResponse?.type];
399
- return businessSetup;
400
- };
401
- function useDataMissingRemediations({
402
- legalEntityId,
403
- problems
404
- }) {
405
- const { t } = useTranslation("common");
406
- const decisionMakersRemediationMessage = useMemo(() => {
407
- const remediationCodes = problems[EntityTypes.LEGAL_ENTITY]?.[legalEntityId]?.missingData?.reduce((remediations, error) => {
408
- const remediation = DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING[error.code];
409
- return remediation ? [...remediations, remediation] : remediations;
410
- }, []);
411
- const uniqueRemediations = [...new Set(remediationCodes)];
412
- switch (uniqueRemediations?.length) {
413
- case void 0:
414
- case 0:
415
- return void 0;
416
- case 1:
417
- return uniqueRemediations[0] ? t(($) => $[`remediationMessage_${uniqueRemediations[0]}`]) : t(($) => $["missingMultipleDecisionMakers"]);
418
- default:
419
- return t(($) => $["missingMultipleDecisionMakers"]);
420
- }
421
- }, [problems, t, legalEntityId]);
422
- return {
423
- remediationMessages: {
424
- [TaskTypes.DECISION_MAKER]: decisionMakersRemediationMessage
425
- }
426
- };
427
- }
428
- const logger$2 = createLogger();
429
- const normalizeTaskStatuses = (taskStatuses) => {
430
- return taskStatuses?.statuses?.reduce((acc, currentTask) => {
431
- const status = TaskStatuses[currentTask.status];
432
- const statusEntries = currentTask.taskStatusEntries;
433
- acc[currentTask.type] = {
434
- status: status ?? TaskStatuses.DETAILS_REQUIRED,
435
- taskStatusEntries: statusEntries
436
- };
437
- return acc;
438
- }, {});
439
- };
440
- const TASK_STATUS_POLLING_INTERVAL_MS = 3e3;
441
- const TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS = 6e3;
442
- const getAccountTaskStatus = (accountId, payinPayoutTaskStatus) => {
443
- const taskStatusEntries = payinPayoutTaskStatus?.taskStatusEntries;
444
- const taskStatusEntry = taskStatusEntries?.find((entry) => entry.id.includes(accountId));
445
- if (!taskStatusEntry) {
446
- logger$2.warn(`No task status for this account: ${accountId}`);
447
- return payinPayoutTaskStatus?.status ?? TaskStatuses.PROCESSING;
448
- }
449
- return TaskStatuses[taskStatusEntry.status];
450
- };
451
- const normalizedTaskStatusStore = signal(void 0);
452
- const setNormalizedTaskStatusStore = (taskStatus) => {
453
- normalizedTaskStatusStore.value = taskStatus;
454
- };
455
- const Remove = ({
456
- onRemove,
457
- onRemoveStatusChange,
458
- isRemoveDisabled = false,
459
- handleIsRemoveDisabled
460
- }) => {
461
- const { t } = useTranslation("ui");
462
- const [undoTimer, setUndoTimer] = useState(5);
463
- const [isRemoving, setIsRemoving] = useState(false);
464
- useEffect(() => {
465
- let undoInterval;
466
- if (isRemoving && undoTimer > 0) {
467
- undoInterval = setInterval(() => {
468
- setUndoTimer((prevCount) => prevCount - 1);
469
- }, 1e3);
470
- }
471
- return () => {
472
- clearInterval(undoInterval);
473
- };
474
- }, [isRemoving, undoTimer]);
475
- const onClickHandler = (event) => {
476
- event.stopPropagation();
477
- event.preventDefault();
478
- if (!isRemoving) {
479
- setIsRemoving(true);
480
- onRemoveStatusChange?.(true);
481
- handleIsRemoveDisabled?.(true);
482
- } else {
483
- setUndoTimer(5);
484
- setIsRemoving(false);
485
- onRemoveStatusChange?.(false);
486
- handleIsRemoveDisabled?.(false);
487
- }
488
- };
489
- useEffect(() => {
490
- if (undoTimer === 0 && isRemoving) {
491
- (async () => {
492
- setIsRemoving(false);
493
- await onRemove();
494
- onRemoveStatusChange?.(false);
495
- handleIsRemoveDisabled?.(false);
496
- })();
497
- }
498
- }, [undoTimer, isRemoving, onRemoveStatusChange, handleIsRemoveDisabled, onRemove]);
499
- return isRemoving ? /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: onClickHandler, children: t(($) => $["undoWithTimer"], { secondsLeft: undoTimer }) }) : /* @__PURE__ */ jsx(
500
- IconButton,
501
- {
502
- ariaLabel: t(($) => $["remove"]),
503
- icon: "bin",
504
- variant: "tertiary",
505
- onClick: onClickHandler,
506
- disabled: isRemoveDisabled
507
- }
508
- );
509
- };
510
- const TaskListItem = ({
511
- titleKey,
512
- title,
513
- icon,
514
- status,
515
- statusLabel,
516
- onNavigateToTask,
517
- disabled = false,
518
- problems,
519
- downloadHandler,
520
- info,
521
- loading = false,
522
- showErrorAlerts = "onErrorStatus",
523
- warningMessage,
524
- removeEntity,
525
- isRemoveDisabled = false,
526
- handleIsRemoveDisabled,
527
- testId,
528
- enableTracking = true,
529
- fallbackErrorMessage
530
- }) => {
531
- const { t } = useTranslation("common");
532
- const userEvents = useAnalyticsContext();
533
- const shouldShowErrorAlert = showErrorAlerts === "always" || showErrorAlerts === "onErrorStatus" && status === TaskStatuses.ERROR;
534
- const [isStatusRemoving, setIsStatusRemoving] = useState(false);
535
- const handleNavigateToTask = () => {
536
- if (enableTracking) {
537
- userEvents.addJourneyEvent("Clicked button", {
538
- actionType: "open",
539
- task: void 0,
540
- label: titleKey
541
- });
542
- }
543
- onNavigateToTask?.();
544
- };
545
- const avatarVariant = disabled ? "disabled" : "primary";
546
- return /* @__PURE__ */ jsx(
547
- Card,
548
- {
549
- stateful: onNavigateToTask && !loading && !disabled,
550
- warningMessage,
551
- onClick: loading ? void 0 : handleNavigateToTask,
552
- onKeyDown: handleKeys(["Enter"], handleNavigateToTask ?? noop),
553
- className: "adyen-task",
554
- disabled,
555
- children: /* @__PURE__ */ jsxs(
556
- LoaderWrapper,
557
- {
558
- status: loading ? "loading" : "success",
559
- formOpacityWhenLoading: 0.3,
560
- loaderSize: "medium",
561
- children: [
562
- /* @__PURE__ */ jsxs("div", { className: "adyen-task-item", "data-testid": testId, children: [
563
- /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__header", children: [
564
- /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__heading", children: [
565
- /* @__PURE__ */ jsx(Avatar, { variant: avatarVariant, iconName: icon }),
566
- /* @__PURE__ */ jsx("div", { className: "adyen-task-item__body", children: /* @__PURE__ */ jsx("span", { className: "adyen-task-item__title", children: title || t(($) => $[titleKey]) }) })
567
- ] }),
568
- info && /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__info", children: [
569
- /* @__PURE__ */ jsx(Icon, { name: "info-circle" }),
570
- /* @__PURE__ */ jsx("span", { children: info })
571
- ] })
572
- ] }),
573
- /* @__PURE__ */ jsxs("aside", { className: "adyen-task-item__status", children: [
574
- /* @__PURE__ */ jsx(
575
- TaskItemStatus,
576
- {
577
- status: isStatusRemoving ? TaskStatuses.REMOVING : status,
578
- statusLabel,
579
- downloadHandler
580
- }
581
- ),
582
- typeof removeEntity === "function" && typeof handleIsRemoveDisabled === "function" ? /* @__PURE__ */ jsx("div", { className: "adyen-task-item__remove", children: /* @__PURE__ */ jsx(
583
- Remove,
584
- {
585
- onRemove: removeEntity,
586
- onRemoveStatusChange: setIsStatusRemoving,
587
- isRemoveDisabled,
588
- handleIsRemoveDisabled
589
- }
590
- ) }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-right" })
591
- ] })
592
- ] }),
593
- shouldShowErrorAlert && /* @__PURE__ */ jsx(
594
- VerificationErrorAlert,
595
- {
596
- className: "adyen-task-item-alert",
597
- problems,
598
- fallbackErrorMessage
599
- }
600
- )
601
- ]
602
- }
603
- )
604
- }
605
- );
606
- };
607
- const PayoutAccountTaskListItem = ({
608
- account,
609
- capabilityProblems,
610
- onNavigateToTask,
611
- payinPayoutTaskStatus
612
- }) => {
613
- const { t } = useTranslation("common");
614
- const { showToast } = useToastContext();
615
- const { isExperimentEnabled } = useExperimentsContext();
616
- const { mutateAsync: deleteTransferInstrument } = useDeleteTransferInstrument();
617
- const [isDeletingTransferInstrument, setIsDeletingTransferInstrument] = useState(false);
618
- const isInstantVerificationAccount = isInstantVerifiedAccount(account);
619
- const [isRemoveDisabled, setIsRemoveDisabled] = useState(false);
620
- const obscuredAccountNumber = getObscuredAccountNumber(account);
621
- const getTaskStatus2 = useGetTaskStatus();
622
- const status = isExperimentEnabled("UseTaskStatusApiForPayout") ? getAccountTaskStatus(account.id, payinPayoutTaskStatus) : getTaskStatus2(TaskTypes.PAYOUT, account.id);
623
- const handleDeleteTransferInstrument = async () => {
624
- try {
625
- await deleteTransferInstrument(account.id);
626
- showToast({ label: t(($) => $["transferInstrumentDeleted"]), variant: "success" });
627
- } catch {
628
- showToast({ label: t(($) => $["failedToDeletePayoutAccount"]), variant: "error" });
629
- }
630
- };
631
- return /* @__PURE__ */ jsx(
632
- TaskListItem,
633
- {
634
- disabled: isInstantVerificationAccount && status === TaskStatuses.PROCESSING,
635
- onNavigateToTask: isInstantVerificationAccount ? void 0 : onNavigateToTask,
636
- icon: "payout",
637
- titleKey: "accountNumber",
638
- title: obscuredAccountNumber,
639
- status,
640
- problems: capabilityProblems?.BankAccount?.[account.id],
641
- fallbackErrorMessage: isInstantVerificationAccount ? t(($) => $["verificationErrorMessageTrustedTransferInstrument"]) : void 0,
642
- loading: isDeletingTransferInstrument,
643
- removeEntity: () => {
644
- setIsDeletingTransferInstrument(true);
645
- handleDeleteTransferInstrument();
646
- },
647
- isRemoveDisabled,
648
- handleIsRemoveDisabled: setIsRemoveDisabled
649
- }
650
- );
651
- };
652
- function CardGroup({ className, children, spaced = false }) {
653
- const baseClass = spaced ? "adyen-kyc-card-group-spaced" : "adyen-kyc-card-group";
654
- return /* @__PURE__ */ jsx("section", { className: cx(baseClass, className), children });
655
- }
656
- const TaskListGroup = ({ title, children }) => /* @__PURE__ */ jsxs("article", { className: "adyen-task-list-group", children: [
657
- title && /* @__PURE__ */ jsx("header", { className: "adyen-task-list-group__header", children: /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-stronger", color: "secondary", children: title }) }),
658
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-card__body", children: /* @__PURE__ */ jsx(CardGroup, { className: "adyen-task-list-group__items", children }) })
659
- ] });
660
- const LEGAL_ENTITY_BASE_TASKS = [
661
- TaskTypes.INDIVIDUAL,
662
- TaskTypes.BUSINESS_DETAILS,
663
- TaskTypes.DECISION_MAKER_OVERVIEW
664
- ];
665
- const CONTRACT_TASKS = [TaskTypes.SERVICE_AGREEMENT, TaskTypes.PCI_DSS];
666
- function TaskList({ onNavigateToTask, singpassComponent }) {
667
- const { data: rootLe, isLoading } = useLegalEntity(ROOT_LE);
668
- const capabilityProblems = useCapabilityProblems() ?? {};
669
- if (isLoading || !rootLe) {
670
- return /* @__PURE__ */ jsx(Loader, { size: "large" });
671
- }
672
- return /* @__PURE__ */ jsx(
673
- TaskListInner,
674
- {
675
- onNavigateToTask,
676
- singpassComponent,
677
- legalEntityResponse: rootLe,
678
- capabilityProblems
679
- }
680
- );
681
- }
682
- function TaskListInner({
683
- onNavigateToTask,
684
- legalEntityResponse,
685
- capabilityProblems,
686
- singpassComponent
687
- }) {
688
- const userEvents = useAnalyticsContext();
689
- const { t } = useTranslation("common");
690
- const { showToast } = useToastContext();
691
- const { rootLegalEntityId, baseUrl } = useApiContext();
692
- const { isSettingEnabled } = useSettingsContext();
693
- const { isExperimentEnabled } = useExperimentsContext();
694
- const { accountHolder } = useAccountHolder();
695
- const tasks = useGlobalStore().tasks.value;
696
- const getTaskStatus2 = useGetTaskStatus();
697
- const businessSetup = useBusinessSetup(legalEntityResponse);
698
- const canSeeIntroduction = useCanSeeIntroduction({ legalEntity: legalEntityResponse });
699
- const additionalSalesChannels = useSalesChannelsSettings();
700
- const { remediationMessages } = useDataMissingRemediations({
701
- legalEntityId: legalEntityResponse.id,
702
- problems: capabilityProblems
703
- });
704
- const { data: pciStatus } = usePciStatus(
705
- { additionalSalesChannels },
706
- { enabled: tasks.includes(TaskTypes.PCI_DSS) }
707
- );
708
- const { data: pciQuestionnaireList } = usePciQuestionnaireList();
709
- const { data: termsOfServiceStatus } = useTermsOfServiceStatus();
710
- const { data: termsOfServiceStatusAcceptanceInfos } = useTermsOfServiceAcceptanceInfos();
711
- const { data: taskStatuses } = useTaskStatus({
712
- refetchInterval: (query) => {
713
- const { data: response } = query.state || {};
714
- const statuses = response?.statuses;
715
- const areAllTasksFinishedOrEmpty = statuses?.length === 0 || statuses?.every((task) => task.status === "FINISHED");
716
- return areAllTasksFinishedOrEmpty ? TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS : TASK_STATUS_POLLING_INTERVAL_MS;
717
- }
718
- });
719
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
720
- const hidePayoutAccountTaskExperiment = isExperimentEnabled("HidePayoutAccountTask");
721
- const hidePciTaskExperiment = isExperimentEnabled("HidePciTask");
722
- const showCustomerSupportV4 = isExperimentEnabled("ShowCustomerSupportV4");
723
- const EnableSignPCIBeforeTOS = isExperimentEnabled("EnableSignPCIBeforeTOS");
724
- const transferInstrumentLimit = useSetting("transferInstrumentLimit");
725
- const normalizedTasks = normalizeTaskStatuses(taskStatuses);
726
- setNormalizedTaskStatusStore(normalizedTasks);
727
- const payinPayoutTaskStatus = normalizedTasks?.PAYOUT ?? normalizedTasks?.PAYIN;
728
- const businessDetailsTaskStatus = isExperimentEnabled("EnableBusinessDetailsTaskStatusService") ? normalizedTasks?.BUSINESS_DETAILS?.status ?? TaskStatuses.DETAILS_REQUIRED : getTaskStatus2(TaskTypes.BUSINESS_DETAILS);
729
- const isReview = Boolean(
730
- capabilityProblems?.LegalEntity?.[legalEntityResponse.id]?.isReviewRequired
731
- );
732
- const hasTrust = accountHolder === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
733
- const hasUnincorporatedPartnership = accountHolder === "anUnincorporatedPartnership" || isPartOfUnincorporatedPartnership(legalEntityResponse);
734
- const hasSoleProprietorship = accountHolder === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
735
- const isLegalRepresentativeRequired = isExperimentEnabled("EnableAgeVerification") && doesLegalEntityRequiresLegalRepresentative(legalEntityResponse);
736
- const legalRepresentative = isLegalRepresentativeRequired && getLegalRepresentative(legalEntityResponse);
737
- const transferInstruments = legalEntityResponse?.transferInstruments || [];
738
- const canAddPayoutAccount = legalEntityResponse?.organization?.legalName || legalEntityResponse?.individual?.name;
739
- const hasPayinTaskNotPayout = tasks.includes(TaskTypes.PAYIN) && !tasks.includes(TaskTypes.PAYOUT);
740
- const payoutTaskDescriptionKey = isReview ? "payoutAccountsDescriptionReview" : "payoutAccountsDescription";
741
- const pciHasDocuments = !!pciQuestionnaireList?.data?.length;
742
- const canSignPci = (
743
- // PCI requires decision makers to be added
744
- legalEntityResponse.type === LegalEntityTypes.ORGANIZATION && !!legalEntityResponse?.entityAssociations?.length || legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL && !!legalEntityResponse?.entityAssociations?.length
745
- );
746
- const canDownloadPci = !pciStatus?.signingRequired && pciHasDocuments;
747
- const hasSignedPci = !pciStatus?.signingRequired && canSignPci;
748
- const serviceAgreementTypes = termsOfServiceStatus?.termsOfServiceTypes ?? [];
749
- const serviceAgreementAcceptanceInfos = termsOfServiceStatusAcceptanceInfos?.data ?? [];
750
- const hasServiceAgreementSigners = legalEntityResponse.type === LegalEntityTypes.ORGANIZATION && getOwnSignatories(legalEntityResponse).length || Boolean(legalRepresentative) || legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL && !!legalEntityResponse?.individual;
751
- const hasTaskOfGroupAccountDetails = tasks.some((task) => LEGAL_ENTITY_BASE_TASKS.includes(task));
752
- const hasContractTasks = tasks.some((task) => CONTRACT_TASKS.includes(task));
753
- const hasFinancingTasks = tasks.includes(TaskTypes.BUSINESS_FINANCING) || tasks.includes(TaskTypes.SOURCE_OF_FUNDS);
754
- const showServiceAgreementTask = tasks.includes(TaskTypes.SERVICE_AGREEMENT) && (serviceAgreementTypes.length > 0 || serviceAgreementAcceptanceInfos.length > 0);
755
- const showPciTask = tasks.includes(TaskTypes.PCI_DSS) && (canDownloadPci || pciStatus?.signingRequired) && !hidePciTaskExperiment;
756
- const showContractTasks = hasContractTasks && (showPciTask || showServiceAgreementTask);
757
- const shouldSignPciFirst = showServiceAgreementTask && showPciTask && !hasSignedPci;
758
- const areServiceAgreementTasksDisabled = EnableSignPCIBeforeTOS ? !hasServiceAgreementSigners || shouldSignPciFirst : !hasServiceAgreementSigners;
759
- const isPciTaskDisabled = !pciStatus?.signingRequired || !canSignPci;
760
- const getBusinessTaskListTitleKey = () => {
761
- if (hasUnincorporatedPartnership) {
762
- return "tellUsMoreAboutPrimaryPartner";
763
- } else if (tasks.includes(TaskTypes.BUSINESS_DETAILS)) {
764
- return isReview ? "businessAccountDetailsDescriptionReview" : "businessAccountDetailsDescription";
765
- } else if (canChangeEntityType) {
766
- return "provideFewDetailsAboutYourself";
767
- } else {
768
- return "accountDetailsDescription";
769
- }
770
- };
771
- const getEmptyBankAccountProblems = () => {
772
- const transferInstrumentId = legalEntityResponse?.transferInstruments?.[0]?.id;
773
- return transferInstrumentId ? capabilityProblems?.BankAccount?.[transferInstrumentId] : void 0;
774
- };
775
- const onEditBusinessSetupClick = () => {
776
- userEvents.addTaskEvent("Clicked button", {
777
- task: TaskTypes.TASKS_OVERVIEW,
778
- actionType: "edit"
779
- });
780
- onNavigateToTask(TaskTypes.BUSINESS_TYPE_SELECTION);
781
- };
782
- const onPciDownload = async () => {
783
- try {
784
- const response = await getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value);
785
- if (!response.data) return;
786
- await Promise.all(
787
- response.data.map(async (pciQuestionnaireInfo) => {
788
- const pciQuestionnaire = await getPciQuestionnaire(
789
- rootLegalEntityId.value,
790
- baseUrl.value,
791
- pciQuestionnaireInfo.id
792
- );
793
- await downloadFile(pciQuestionnaire.content, `${pciQuestionnaire.id}.pdf`);
794
- })
795
- );
796
- } catch {
797
- showToast({ label: t(($) => $["failedToDownloadPci"]), variant: "error" });
798
- } finally {
799
- userEvents.addTaskEvent("Clicked button", {
800
- task: TaskTypes.PCI_DSS,
801
- actionType: "download"
802
- });
803
- }
804
- };
805
- const handleOnNavigateToTaskReview = () => onNavigateToTask(TaskTypes.REVIEW);
806
- const handleOnNavigateToTaskIndividual = () => onNavigateToTask(TaskTypes.INDIVIDUAL);
807
- const handleOnNavigateToTaskBusinessDetails = () => onNavigateToTask(TaskTypes.BUSINESS_DETAILS);
808
- const handleOnNavigateToTaskBusinessLines = () => onNavigateToTask(TaskTypes.BUSINESS_LINES);
809
- const handleOnNavigateToTaskCustomerSupport = () => onNavigateToTask(TaskTypes.CUSTOMER_SUPPORT);
810
- const handleOnNavigateToTaskDecisionMaker = () => onNavigateToTask(TaskTypes.DECISION_MAKER_OVERVIEW);
811
- const handleOnNavigateToTaskTrust = () => onNavigateToTask(TaskTypes.TRUST);
812
- const handleOnNavigateToTaskTrustMember = () => onNavigateToTask(TaskTypes.TRUST_MEMBER_OVERVIEW);
813
- const handleOnNavigateToTaskPayout = (id) => hasPayinTaskNotPayout ? onNavigateToTask(TaskTypes.PAYIN, id) : onNavigateToTask(TaskTypes.PAYOUT, id);
814
- const handleOnNavigateToPci = () => !canDownloadPci && onNavigateToTask(TaskTypes.PCI_DSS);
815
- const handleOnNavigateToSoleProp = () => onNavigateToTask(TaskTypes.SOLE_PROPRIETOR_COMPANY);
816
- const handleOnNavigateToServiceAgreement = () => onNavigateToTask(TaskTypes.SERVICE_AGREEMENT);
817
- const handleOnNavigateToTaskLegalRepresentative = () => onNavigateToTask(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS);
818
- const handleOnNavigateToSourceOfFunds = () => onNavigateToTask(TaskTypes.SOURCE_OF_FUNDS);
819
- const handleOnNavigateToBusinessFinancing = () => onNavigateToTask(TaskTypes.BUSINESS_FINANCING);
820
- const handleOnNavigateToTaxReporting = () => onNavigateToTask(TaskTypes.TAX_REPORTING);
821
- const showDecisionMakersWarning = Boolean(
822
- getOwnDecisionMakersLegalEntityIds(legalEntityResponse).length && remediationMessages.DECISION_MAKER
823
- );
824
- useEffect(() => {
825
- if (showDecisionMakersWarning) {
826
- userEvents.addTaskEvent("Encountered error", {
827
- task: TaskTypes.TASKS_OVERVIEW,
828
- actionType: "alert",
829
- returnValue: "missingDecisionMaker"
830
- });
831
- }
832
- }, [showDecisionMakersWarning, userEvents]);
833
- return /* @__PURE__ */ jsxs("div", { className: "adyen-task-list__container", children: [
834
- canSeeIntroduction && /* @__PURE__ */ jsx("div", { className: "adyen-task-list__nav", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => onNavigateToTask(TaskTypes.INTRODUCTION), children: t(($) => $["goToIntroduction"]) }) }),
835
- canChangeEntityType && /* @__PURE__ */ jsxs("header", { className: "adyen-task-list__heading", children: [
836
- /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: t(($) => $["setUpYourAccount"]) }),
837
- /* @__PURE__ */ jsxs(Typography, { el: "p", variant: "title", className: "adyen-task-list__description", children: [
838
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-strongest", children: t(($) => $["yourBusinessSetup"], {
839
- businessSetup: businessSetup ? t(($) => $[businessSetup]) : t(($) => $["unknown"])
840
- }) }),
841
- /* @__PURE__ */ jsx(
842
- IconButton,
843
- {
844
- ariaLabel: t(($) => $["editBusinessSetup"]),
845
- icon: "edit",
846
- variant: "tertiary",
847
- onClick: onEditBusinessSetupClick
848
- }
849
- )
850
- ] })
851
- ] }),
852
- singpassComponent,
853
- /* @__PURE__ */ jsxs("div", { children: [
854
- hasTaskOfGroupAccountDetails && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $[getBusinessTaskListTitleKey()]), children: [
855
- tasks.includes(TaskTypes.INDIVIDUAL) && /* @__PURE__ */ jsx(
856
- TaskListItem,
857
- {
858
- onNavigateToTask: handleOnNavigateToTaskIndividual,
859
- icon: "decision-maker",
860
- titleKey: hasTrust ? "trusteePersonalDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "personalDetails",
861
- status: getTaskStatus2(TaskTypes.INDIVIDUAL),
862
- problems: capabilityProblems?.LegalEntity?.[legalEntityResponse.id]
863
- }
864
- ),
865
- tasks.includes(TaskTypes.BUSINESS_DETAILS) && /* @__PURE__ */ jsx(
866
- TaskListItem,
867
- {
868
- testId: TaskTypes.BUSINESS_DETAILS,
869
- onNavigateToTask: handleOnNavigateToTaskBusinessDetails,
870
- icon: "company",
871
- titleKey: hasTrust ? "businessTrusteeDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "businessDetails",
872
- status: businessDetailsTaskStatus,
873
- problems: capabilityProblems?.LegalEntity?.[legalEntityResponse.id]
874
- }
875
- ),
876
- hasSoleProprietorship && /* @__PURE__ */ jsx(
877
- TaskListItem,
878
- {
879
- onNavigateToTask: handleOnNavigateToSoleProp,
880
- icon: "company",
881
- titleKey: canChangeEntityType ? "soleProprietorshipDetails" : "soleProprietorDetails",
882
- status: getTaskStatus2(TaskTypes.SOLE_PROPRIETOR_COMPANY),
883
- problems: getOwnSolePropProblems(legalEntityResponse, capabilityProblems)
884
- }
885
- ),
886
- isLegalRepresentativeRequired && /* @__PURE__ */ jsx(
887
- TaskListItem,
888
- {
889
- onNavigateToTask: handleOnNavigateToTaskLegalRepresentative,
890
- icon: "decision-maker",
891
- titleKey: "legalRepresentative",
892
- status: getTaskStatus2(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS)
893
- }
894
- ),
895
- tasks.includes(TaskTypes.DECISION_MAKER_OVERVIEW) && /* @__PURE__ */ jsx(
896
- TaskListItem,
897
- {
898
- onNavigateToTask: handleOnNavigateToTaskDecisionMaker,
899
- icon: "decision-maker",
900
- titleKey: hasUnincorporatedPartnership ? "entityDecisionMakers" : "decisionMakers",
901
- status: getTaskStatus2(TaskTypes.DECISION_MAKER_OVERVIEW),
902
- warningMessage: showDecisionMakersWarning ? remediationMessages[TaskTypes.DECISION_MAKER] : void 0
903
- }
904
- ),
905
- tasks.includes(TaskTypes.BUSINESS_LINES) && /* @__PURE__ */ jsx(
906
- TaskListItem,
907
- {
908
- testId: TaskTypes.BUSINESS_LINES,
909
- onNavigateToTask: handleOnNavigateToTaskBusinessLines,
910
- icon: "solutionPayments",
911
- titleKey: "businessLines",
912
- status: getTaskStatus2(TaskTypes.BUSINESS_LINES)
913
- }
914
- ),
915
- showCustomerSupportV4 && tasks.includes(TaskTypes.CUSTOMER_SUPPORT) && /* @__PURE__ */ jsx(
916
- TaskListItem,
917
- {
918
- onNavigateToTask: handleOnNavigateToTaskCustomerSupport,
919
- icon: "webinar",
920
- titleKey: "customerSupport",
921
- status: normalizedTasks?.CUSTOMER_SUPPORT?.status ?? TaskStatuses.DETAILS_REQUIRED
922
- }
923
- )
924
- ] }),
925
- hasTrust && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["trustDetailsDescription"]), children: [
926
- /* @__PURE__ */ jsx(
927
- TaskListItem,
928
- {
929
- onNavigateToTask: handleOnNavigateToTaskTrust,
930
- icon: "trust",
931
- titleKey: "trustDetails",
932
- status: getTaskStatus2(TaskTypes.TRUST),
933
- problems: getOwnTrustProblems(legalEntityResponse, capabilityProblems)
934
- }
935
- ),
936
- /* @__PURE__ */ jsx(
937
- TaskListItem,
938
- {
939
- onNavigateToTask: handleOnNavigateToTaskTrustMember,
940
- icon: "decision-maker",
941
- titleKey: "trustMembers",
942
- status: getTaskStatus2(TaskTypes.TRUST_MEMBER_OVERVIEW)
943
- }
944
- )
945
- ] }),
946
- hasUnincorporatedPartnership && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["partnershipUnincorporated"]), children: [
947
- /* @__PURE__ */ jsx(
948
- TaskListItem,
949
- {
950
- onNavigateToTask: () => onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP),
951
- icon: "trust",
952
- titleKey: "unincorporatedDetails",
953
- status: getTaskStatus2(TaskTypes.UNINCORPORATED_PARTNERSHIP),
954
- problems: getOwnUnincorporatedPartnershipProblems(
955
- legalEntityResponse,
956
- capabilityProblems
957
- )
958
- }
959
- ),
960
- /* @__PURE__ */ jsx(
961
- TaskListItem,
962
- {
963
- onNavigateToTask: () => {
964
- if (!isPartOfUnincorporatedPartnership(legalEntityResponse)) {
965
- onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP);
966
- } else {
967
- onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW);
968
- }
969
- },
970
- icon: "decision-maker",
971
- titleKey: "unincorporatedPartnershipMembers",
972
- status: getTaskStatus2(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW)
973
- }
974
- )
975
- ] }),
976
- hasFinancingTasks && /* @__PURE__ */ jsxs(TaskListGroup, { children: [
977
- tasks.includes(TaskTypes.SOURCE_OF_FUNDS) && /* @__PURE__ */ jsx(
978
- TaskListItem,
979
- {
980
- onNavigateToTask: handleOnNavigateToSourceOfFunds,
981
- icon: "cash-stack",
982
- titleKey: "fundingSources",
983
- status: normalizedTasks?.SOURCE_OF_FUNDS?.status ?? TaskStatuses.DETAILS_REQUIRED
984
- }
985
- ),
986
- tasks.includes(TaskTypes.BUSINESS_FINANCING) && /* @__PURE__ */ jsx(
987
- TaskListItem,
988
- {
989
- onNavigateToTask: handleOnNavigateToBusinessFinancing,
990
- icon: "capital",
991
- titleKey: "businessFinancing",
992
- status: normalizedTasks?.BUSINESS_FINANCING?.status ?? TaskStatuses.DETAILS_REQUIRED
993
- }
994
- )
995
- ] }),
996
- tasks.includes(TaskTypes.TAX_REPORTING) && /* @__PURE__ */ jsx(TaskListGroup, { children: /* @__PURE__ */ jsx(
997
- TaskListItem,
998
- {
999
- onNavigateToTask: handleOnNavigateToTaxReporting,
1000
- icon: "reporting",
1001
- titleKey: "taxReporting",
1002
- status: normalizedTasks?.TAX_REPORTING?.status ?? TaskStatuses.DETAILS_REQUIRED
1003
- }
1004
- ) }),
1005
- (tasks.includes(TaskTypes.PAYOUT) || tasks.includes(TaskTypes.PAYIN)) && !hidePayoutAccountTaskExperiment && /* @__PURE__ */ jsx(
1006
- TaskListGroup,
1007
- {
1008
- title: canChangeEntityType ? t(($) => $["payoutBankAccounts"]) : t(
1009
- ($) => $[hasPayinTaskNotPayout ? "payinAccountsDescription" : payoutTaskDescriptionKey]
1010
- ),
1011
- children: transferInstruments.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
1012
- transferInstruments.map((transferInstrument) => /* @__PURE__ */ jsx(
1013
- PayoutAccountTaskListItem,
1014
- {
1015
- account: transferInstrument,
1016
- capabilityProblems,
1017
- onNavigateToTask: () => handleOnNavigateToTaskPayout(transferInstrument.id),
1018
- payinPayoutTaskStatus
1019
- },
1020
- transferInstrument.id
1021
- )),
1022
- !transferInstrumentLimit || transferInstruments.length < transferInstrumentLimit ? /* @__PURE__ */ jsxs(
1023
- Card,
1024
- {
1025
- stateful: true,
1026
- onClick: () => handleOnNavigateToTaskPayout(),
1027
- className: "adyen-task adyen-kyc-add-payout",
1028
- disabled: !canAddPayoutAccount,
1029
- children: [
1030
- /* @__PURE__ */ jsx(Icon, { name: "plus", className: "adyen-task-list__card-icon " }),
1031
- /* @__PURE__ */ jsx("span", { children: canChangeEntityType ? t(($) => $["addExtraBankAccount"]) : t(
1032
- ($) => $[hasPayinTaskNotPayout ? "addExtraPayinAccount" : "addExtraPayoutAccount"]
1033
- ) })
1034
- ]
1035
- }
1036
- ) : null
1037
- ] }) : /* @__PURE__ */ jsx(
1038
- TaskListItem,
1039
- {
1040
- onNavigateToTask: () => handleOnNavigateToTaskPayout(),
1041
- icon: "payout",
1042
- titleKey: canChangeEntityType ? "bankAccountDetails" : hasPayinTaskNotPayout ? "payinDetails" : "payoutDetails",
1043
- status: TaskStatuses.DETAILS_REQUIRED,
1044
- disabled: !canAddPayoutAccount,
1045
- problems: getEmptyBankAccountProblems()
1046
- }
1047
- )
1048
- }
1049
- ),
1050
- showContractTasks && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["reviewAndSignLegalDisclosures"]), children: [
1051
- showPciTask && /* @__PURE__ */ jsx(
1052
- TaskListItem,
1053
- {
1054
- onNavigateToTask: handleOnNavigateToPci,
1055
- icon: "pci",
1056
- titleKey: "pciDssQuestionnaire",
1057
- status: canDownloadPci ? TaskStatuses.DOWNLOAD : TaskStatuses.SIGN,
1058
- statusLabel: canDownloadPci ? t(($) => $["downloadACopy"]) : void 0,
1059
- downloadHandler: onPciDownload,
1060
- disabled: isPciTaskDisabled,
1061
- info: isPciTaskDisabled && !canDownloadPci ? t(($) => $["requiresDecisionMakers"]) : void 0
1062
- }
1063
- ),
1064
- showServiceAgreementTask && /* @__PURE__ */ jsx(
1065
- TaskListItem,
1066
- {
1067
- onNavigateToTask: handleOnNavigateToServiceAgreement,
1068
- icon: "contract",
1069
- titleKey: "signServiceAgreement",
1070
- disabled: areServiceAgreementTasksDisabled,
1071
- status: serviceAgreementTypes.length ? TaskStatuses.SIGN : TaskStatuses.SIGNED,
1072
- info: EnableSignPCIBeforeTOS && shouldSignPciFirst ? t(($) => $["signPciFirst"]) : !hasServiceAgreementSigners ? t(($) => $["requiresSignatory"]) : void 0
1073
- }
1074
- )
1075
- ] }),
1076
- isReview && /* @__PURE__ */ jsx(TaskListGroup, { title: t(($) => $["pleaseEnsureTheFollowing"]), children: /* @__PURE__ */ jsx(
1077
- TaskListItem,
1078
- {
1079
- onNavigateToTask: handleOnNavigateToTaskReview,
1080
- icon: "review",
1081
- titleKey: "submitReviewOfYourData",
1082
- status: TaskStatuses.SUBMIT,
1083
- problems: capabilityProblems?.LegalEntity?.[legalEntityResponse.id],
1084
- showErrorAlerts: "always"
1085
- }
1086
- ) })
1087
- ] })
1088
- ] });
1089
- }
1090
- const isNewEntity = Symbol("isNewEntity");
1091
- const businessLines$1 = "adyen-kyc-business-lines";
1092
- const styles$4 = {
1093
- businessLines: businessLines$1
1094
- };
1095
- const businessLines = lazy(() => import("./business-lines-DboUCbXw.js"));
1096
- const BusinessLinesGettingStarted = ({
1097
- handleGettingStartedClick,
1098
- handleCancelClick
1099
- }) => {
1100
- const { t } = useTranslation(["businessLines", "common"]);
1101
- return /* @__PURE__ */ jsx(
1102
- LandingLayout,
1103
- {
1104
- title: t(($) => $["businessLines"]),
1105
- description: t(($) => $["businessLinesGettingStarted"]),
1106
- media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: businessLines }),
1107
- actions: /* @__PURE__ */ jsxs(Fragment, { children: [
1108
- /* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: handleGettingStartedClick, children: t(($) => $["gettingStarted"], { ns: "common" }) }),
1109
- /* @__PURE__ */ jsx(Button, { variant: "tertiary", fullWidth: true, onClick: handleCancelClick, children: t(($) => $["finishLater"], { ns: "common" }) })
1110
- ] })
1111
- }
1112
- );
1113
- };
1114
- function BusinessLinesDropin({ handleHomeClick }) {
1115
- const [gettingStarted, setGettingStarted] = useState(true);
1116
- return /* @__PURE__ */ jsx("div", { className: styles$4.businessLines, children: gettingStarted && /* @__PURE__ */ jsx(
1117
- BusinessLinesGettingStarted,
1118
- {
1119
- handleGettingStartedClick: () => setGettingStarted(false),
1120
- handleCancelClick: () => handleHomeClick?.()
1121
- }
1122
- ) });
1123
- }
1124
- const RootBusinessLinesPage = ({ handleHomeClick }) => {
1125
- const { data: rootLe } = useLegalEntity(ROOT_LE);
1126
- const { i18n } = useTranslation();
1127
- addResourceBundles(i18n, i18n.language, [
1128
- { ns: "businessLines", importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../language/da-DK.json": () => import("./da-DK-DStNe471.js"), "../language/de-DE.json": () => import("./de-DE-CGoBPCPv.js"), "../language/en-US.json": () => import("./en-US-CQ3angjM.js"), "../language/es-ES.json": () => import("./es-ES-CKMfS8Yy.js"), "../language/fi-FI.json": () => import("./fi-FI-REYOX46I.js"), "../language/fr-FR.json": () => import("./fr-FR-D9qaP6nx.js"), "../language/it-IT.json": () => import("./it-IT-Biduphjt.js"), "../language/nl-NL.json": () => import("./nl-NL-G1wVnmzT.js"), "../language/no-NO.json": () => import("./no-NO-BTtAuqCb.js"), "../language/pt-PT.json": () => import("./pt-PT-Dk48OVtf.js"), "../language/sl-SI.json": () => import("./sl-SI-BB7iVcFI.js"), "../language/sv-SE.json": () => import("./sv-SE-DbI-1JqN.js") }), `../language/${i18n.language}.json`, 3) }
1129
- ]);
1130
- if (!rootLe) {
1131
- return /* @__PURE__ */ jsx(Loader, {});
1132
- }
1133
- return /* @__PURE__ */ jsx(BusinessLinesDropin, { handleHomeClick });
1134
- };
1135
- const useExemptSettlor = ({
1136
- trust
1137
- }) => {
1138
- const matchingAssociation = useMemo(() => {
1139
- if (!trust) return void 0;
1140
- return getOwnEntityAssociations(trust).find(
1141
- (association) => association.type === TrustMemberTypes.SETTLOR && Boolean(association.settlorExemptionReason)
1142
- );
1143
- }, [trust]);
1144
- const { data } = useLegalEntity(matchingAssociation?.legalEntityId ?? skipToken);
1145
- return data;
1146
- };
1147
- const splitAtFirstOccurrence = (str, separator) => {
1148
- const firstOccurrence = str.indexOf(separator);
1149
- if (firstOccurrence === -1) return [str];
1150
- return [str.slice(0, firstOccurrence), str.slice(firstOccurrence + 1)];
1151
- };
1152
- const getTrustMemberOwnerId = (trustMemberId, entityAssociations) => entityAssociations.find((association) => association.associatorId === trustMemberId)?.legalEntityId;
1153
- const getFallbackName = (exemptSettlorAssociation) => {
1154
- const [firstName, lastName] = splitAtFirstOccurrence(exemptSettlorAssociation.name ?? "", " ");
1155
- return {
1156
- firstName,
1157
- lastName
1158
- };
1159
- };
1160
- const convertEntityAssociationIntoTrustMember = (association, associations, exemptSettlorLE) => {
1161
- if (association.settlorExemptionReason) {
1162
- return {
1163
- trustMemberType: "exemptSettlor",
1164
- roles: [TrustMemberTypes.SETTLOR],
1165
- legalEntityType: association.entityType,
1166
- legalEntityId: association.legalEntityId,
1167
- settlorExemptionReason: association.settlorExemptionReason,
1168
- exemptSettlorName: association.entityType === LegalEntityTypes.INDIVIDUAL ? exemptSettlorLE?.individual?.name ?? getFallbackName(association) : void 0,
1169
- name: association.name
1170
- };
1171
- }
1172
- if (association.entityType === LegalEntityTypes.ORGANIZATION)
1173
- return {
1174
- trustMemberType: "company",
1175
- roles: [],
1176
- legalEntityType: LegalEntityTypes.ORGANIZATION,
1177
- legalEntityId: association.legalEntityId,
1178
- name: association.name,
1179
- ownerId: getTrustMemberOwnerId(association.legalEntityId, associations)
1180
- };
1181
- if (association.entityType === LegalEntityTypes.INDIVIDUAL)
1182
- return {
1183
- trustMemberType: "regular",
1184
- roles: [],
1185
- legalEntityType: LegalEntityTypes.INDIVIDUAL,
1186
- legalEntityId: association.legalEntityId,
1187
- name: association.name
1188
- };
1189
- throw new Error(`Not a valid trust member: ${JSON.stringify(association)}`);
1190
- };
1191
- const mapEntityAssociationsToTrustMembers = (trustEntityId, entityAssociations, exemptSettlorLE) => {
1192
- const mappedTrustMembers = entityAssociations.reduce(
1193
- (acc, entityAssociation) => {
1194
- if (!Object.values(TrustMemberTypes).includes(entityAssociation.type) || entityAssociation.associatorId !== trustEntityId || !entityAssociation.legalEntityId) {
1195
- return acc;
1196
- }
1197
- const trustMember = acc[entityAssociation.legalEntityId] ?? convertEntityAssociationIntoTrustMember(
1198
- entityAssociation,
1199
- entityAssociations,
1200
- exemptSettlorLE
1201
- );
1202
- const trustMemberType = entityAssociation.type;
1203
- acc[entityAssociation.legalEntityId] = {
1204
- ...trustMember,
1205
- roles: [.../* @__PURE__ */ new Set([...trustMember.roles, trustMemberType])]
1206
- };
1207
- return acc;
1208
- },
1209
- {}
1210
- );
1211
- return Object.values(mappedTrustMembers);
1212
- };
1213
- const mapRootLegalEntityToTrustMember = (rootLegalEntity) => ({
1214
- trustMemberType: "rootTrustee",
1215
- roles: [TrustMemberTypes.TRUSTEE],
1216
- legalEntityType: rootLegalEntity.type,
1217
- legalEntityId: rootLegalEntity.id,
1218
- name: getLegalEntityNameBasedOnType(rootLegalEntity)
1219
- });
1220
- const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) => undefinedBeneficiaryInfo.map(({ reference, description }) => ({
1221
- trustMemberType: "undefinedBeneficiary",
1222
- roles: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
1223
- reference,
1224
- description
1225
- }));
1226
- const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => [
1227
- mapRootLegalEntityToTrustMember(rootLegalEntity),
1228
- ...mapEntityAssociationsToTrustMembers(
1229
- trustLE.id,
1230
- trustLE.entityAssociations ?? [],
1231
- exemptSettlorLE
1232
- ),
1233
- ...mapUndefinedBeneficiaryInfoToTrustMembers(trustLE.trust?.undefinedBeneficiaryInfo ?? [])
1234
- ];
1235
- const combineRootLegalEntityWithEntityAssociations = (rootLegalEntity, entityAssociations) => {
1236
- const allowedRolesForRootLegalEntity = [
1237
- TrustMemberTypes.SETTLOR,
1238
- TrustMemberTypes.PROTECTOR,
1239
- TrustMemberTypes.DEFINED_BENEFICIARY
1240
- ];
1241
- const roles = entityAssociations.map((entityAssociation) => entityAssociation.type).filter((role) => allowedRolesForRootLegalEntity.includes(role));
1242
- return {
1243
- trustMemberType: "rootTrustee",
1244
- roles: [...roles, TrustMemberTypes.TRUSTEE],
1245
- legalEntityType: rootLegalEntity.type,
1246
- legalEntityId: rootLegalEntity.id,
1247
- name: getLegalEntityNameBasedOnType(rootLegalEntity)
1248
- };
1249
- };
1250
- const getRootTrusteeTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
1251
- const entityAssociations = trustLE.entityAssociations ?? [];
1252
- const rootLegalEntityAssociations = entityAssociations.filter(
1253
- (a) => a.legalEntityId === rootLegalEntity.id
1254
- );
1255
- const nonRootLegalEntityAssociations = entityAssociations.filter(
1256
- (a) => a.legalEntityId !== rootLegalEntity.id
1257
- );
1258
- return [
1259
- combineRootLegalEntityWithEntityAssociations(rootLegalEntity, rootLegalEntityAssociations),
1260
- ...mapEntityAssociationsToTrustMembers(
1261
- trustLE.id,
1262
- nonRootLegalEntityAssociations ?? [],
1263
- exemptSettlorLE
1264
- ),
1265
- ...mapUndefinedBeneficiaryInfoToTrustMembers(trustLE.trust?.undefinedBeneficiaryInfo ?? [])
1266
- ];
1267
- };
1268
- function useTrustMembers() {
1269
- const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
1270
- const { data: trust } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.TRUST);
1271
- const { isExperimentEnabled } = useExperimentsContext();
1272
- const exemptSettlor = useExemptSettlor({
1273
- trust
1274
- });
1275
- const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
1276
- return useMemo(() => {
1277
- if (!rootLegalEntity || !trust?.trust) return [];
1278
- return allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(trust, rootLegalEntity, exemptSettlor) : getTrustMembers(trust, rootLegalEntity, exemptSettlor);
1279
- }, [rootLegalEntity, trust, exemptSettlor, allowMoreRolesForMainRootTrustee]);
1280
- }
1281
- const useTrustMemberNavigation = ({ navigateTo, trust }) => {
1282
- const { i18n } = useI18nContext();
1283
- const { showToast } = useToastContext();
1284
- const [trustMember, setTrustMember] = useState();
1285
- const [currentTrustMemberId, setCurrentTrustMemberId] = useState();
1286
- const { setTrustMembers } = useGlobalStore();
1287
- const { data: currentTrustMemberLe } = useLegalEntity(currentTrustMemberId ?? skipToken);
1288
- const trustMembers = useTrustMembers();
1289
- useEffect(() => setTrustMembers(trustMembers), [trustMembers]);
1290
- const onNavigateToTrustMemberEditDetails = async (tm) => {
1291
- try {
1292
- if (tm.legalEntityId === isNewEntity) {
1293
- setCurrentTrustMemberId(void 0);
1294
- setTrustMember(tm);
1295
- } else {
1296
- setCurrentTrustMemberId(tm.legalEntityId);
1297
- setTrustMember(void 0);
1298
- }
1299
- navigateTo(
1300
- tm.trustMemberType === "company" ? TaskTypes.TRUST_MEMBER_COMPANY : TaskTypes.TRUST_MEMBER_INDIVIDUAL
1301
- );
1302
- } catch {
1303
- showToast({ label: i18n.get("failedToFetchTrustMemberDetails"), variant: "error" });
1304
- }
1305
- };
1306
- const onNavigateToTrustMemberRoleAndType = (tm) => {
1307
- setTrustMember(tm === "new" ? void 0 : tm);
1308
- navigateTo(TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE);
1309
- };
1310
- const onNavigateToTrust = async (task = TaskTypes.TRUST) => {
1311
- try {
1312
- if (trust) {
1313
- navigateTo(task);
1314
- } else {
1315
- navigateTo(TaskTypes.TRUST);
1316
- }
1317
- } catch {
1318
- showToast({ label: i18n.get("failedToFetchTrustDetails"), variant: "error" });
1319
- }
1320
- };
1321
- return {
1322
- trustMember,
1323
- currentTrustMemberLe,
1324
- currentTrustMemberId,
1325
- trustMembers,
1326
- onNavigateToTrust,
1327
- onNavigateToTrustMemberRoleAndType,
1328
- onNavigateToTrustMemberEditDetails
1329
- };
1330
- };
1331
- const DropinLayout = ({ content, footer }) => /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-dropin", children: [
1332
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropin__content", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropin__content-main", children: content }) }),
1333
- footer && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropin__footer-container", children: footer })
1334
- ] });
1335
- const defaultFieldMetadata = {
1336
- label: "legalCompanyName",
1337
- helperText: "legalCompanyName__helperText",
1338
- validators: validateNotEmptyOnBlur
1339
- };
1340
- const defaultFieldConfig = {
1341
- [CountryCodes.Australia]: {
1342
- label: "legalCompanyName",
1343
- helperText: "legalCompanyName__helperText__AU",
1344
- validators: validateNotEmptyOnBlur
1345
- },
1346
- [CountryCodes.HongKong]: {
1347
- label: "legalCompanyName",
1348
- helperText: "legalCompanyName__helperText__HK",
1349
- validators: validateNotEmptyOnBlur
1350
- },
1351
- [CountryCodes.Netherlands]: {
1352
- label: "legalCompanyName",
1353
- helperText: "legalCompanyName__helperText__NL",
1354
- validators: validateNotEmptyOnBlur
1355
- },
1356
- [CountryCodes.Singapore]: {
1357
- label: "legalCompanyName",
1358
- helperText: "legalCompanyName__helperText__SG",
1359
- validators: validateNotEmptyOnBlur
1360
- },
1361
- [CountryCodes.UnitedStates]: ({ isBusiness }) => ({
1362
- label: "legalCompanyName__US",
1363
- helperText: isBusiness ? "legalCompanyName__helperText__US__business" : "legalCompanyName__helperText__US",
1364
- validators: validateNotEmptyOnBlur
1365
- })
1366
- };
1367
- const defaultFieldMetadataV4 = {
1368
- label: "legalCompanyName",
1369
- helperText: "legalCompanyName__helperText",
1370
- validators: validateLegalCompanyName
1371
- };
1372
- const defaultFieldConfigV4 = {
1373
- [CountryCodes.Australia]: {
1374
- label: "legalCompanyName",
1375
- helperText: "legalCompanyName__helperText__AU",
1376
- validators: validateLegalCompanyName
1377
- },
1378
- [CountryCodes.HongKong]: {
1379
- label: "legalCompanyName",
1380
- helperText: "legalCompanyName__helperText__HK",
1381
- validators: validateLegalCompanyName
1382
- },
1383
- [CountryCodes.Netherlands]: {
1384
- label: "legalCompanyName",
1385
- helperText: "legalCompanyName__helperText__NL",
1386
- validators: validateLegalCompanyName
1387
- },
1388
- [CountryCodes.Singapore]: {
1389
- label: "legalCompanyName",
1390
- helperText: "legalCompanyName__helperText__SG",
1391
- validators: validateLegalCompanyName
1392
- },
1393
- [CountryCodes.UnitedStates]: ({ isBusiness }) => ({
1394
- label: "legalCompanyName__US",
1395
- helperText: isBusiness ? "legalCompanyName__helperText__US__business" : "legalCompanyName__helperText__US",
1396
- validators: validateLegalCompanyName
1397
- }),
1398
- [CountryCodes.Japan]: {
1399
- label: "legalCompanyName__JP",
1400
- helperText: void 0,
1401
- validators: [...validateLegalCompanyName, validateLatinSpaceMarkPunctuationOnlyOnBlur]
1402
- }
1403
- };
1404
- const LEGAL_COMPANY_NAME_FIELD = [
1405
- "legalCompanyName"
1406
- ];
1407
- function LegalCompanyNameField({
1408
- data,
1409
- valid,
1410
- errors,
1411
- labels,
1412
- helperText,
1413
- readonly,
1414
- handleChangeFor
1415
- }) {
1416
- const handleKeyDown = (e) => {
1417
- if (e.key === KEYBOARD_KEYS.enter) {
1418
- e.preventDefault();
1419
- }
1420
- };
1421
- return /* @__PURE__ */ jsx(
1422
- Field,
1423
- {
1424
- name: "legalCompanyName",
1425
- label: labels.legalCompanyName,
1426
- helper: helperText?.legalCompanyName,
1427
- errorMessage: errors.legalCompanyName,
1428
- isValid: valid.legalCompanyName,
1429
- children: (childProps) => /* @__PURE__ */ jsx(
1430
- InputText,
1431
- {
1432
- ...childProps,
1433
- "aria-required": true,
1434
- "aria-invalid": !valid.legalCompanyName,
1435
- name: "legalCompanyName",
1436
- value: data.legalCompanyName,
1437
- readonly,
1438
- onInput: handleChangeFor("legalCompanyName", "input"),
1439
- onBlur: handleChangeFor("legalCompanyName", "blur"),
1440
- onKeyDown: handleKeyDown
1441
- }
1442
- )
1443
- }
1444
- );
1445
- }
1446
- const convertExistingSettlorExemptionReasons = (existingReasons) => {
1447
- if (!existingReasons || !existingReasons.length) return ["noneOfTheAbove"];
1448
- return existingReasons;
1449
- };
1450
- const convertExistingTrustMember = (trustMember) => {
1451
- switch (trustMember.trustMemberType) {
1452
- case "undefinedBeneficiary":
1453
- return {
1454
- entityType: LegalEntityTypes.INDIVIDUAL,
1455
- role: ["undefinedBeneficiary"],
1456
- descriptionUndefinedBeneficiary: trustMember.description
1457
- };
1458
- case "regular":
1459
- case "company":
1460
- return {
1461
- entityType: trustMember.legalEntityType,
1462
- role: trustMember.roles,
1463
- settlorExemptionReason: ["noneOfTheAbove"],
1464
- country: trustMember.trustMemberType === "company" ? trustMember.country : void 0,
1465
- legalCompanyName: trustMember.trustMemberType === "company" ? trustMember.name : void 0
1466
- };
1467
- case "rootTrustee":
1468
- return {
1469
- trustMemberType: trustMember.trustMemberType,
1470
- entityType: trustMember.legalEntityType,
1471
- role: trustMember.roles,
1472
- settlorExemptionReason: ["noneOfTheAbove"]
1473
- };
1474
- case "exemptSettlor":
1475
- return {
1476
- entityType: trustMember.legalEntityType,
1477
- role: ["settlor"],
1478
- settlorExemptionReason: convertExistingSettlorExemptionReasons(
1479
- trustMember.settlorExemptionReason
1480
- ),
1481
- firstName: trustMember.exemptSettlorName?.firstName,
1482
- lastName: trustMember.exemptSettlorName?.lastName,
1483
- legalCompanyName: trustMember.name,
1484
- country: trustMember.country
1485
- };
1486
- }
1487
- };
1488
- const convertRootTrusteeTrustMember = (trustMember) => ({
1489
- trustMemberType: trustMember.trustMemberType,
1490
- entityType: trustMember.legalEntityType,
1491
- role: trustMember.roles,
1492
- settlorExemptionReason: ["noneOfTheAbove"]
1493
- });
1494
- const allowedCrossoverRolesMatrix = {
1495
- settlor: ["secondaryTrustee", "protector"],
1496
- secondaryTrustee: ["settlor", "protector", "definedBeneficiary"],
1497
- protector: ["settlor", "secondaryTrustee", "definedBeneficiary"],
1498
- definedBeneficiary: ["secondaryTrustee", "protector"],
1499
- undefinedBeneficiary: []
1500
- };
1501
- const allowedCrossoverRolesMatrixByTrustMemberAndLegalEntityType = {
1502
- rootTrustee: {
1503
- [LegalEntityTypes.INDIVIDUAL]: {
1504
- settlor: ["secondaryTrustee", "protector"],
1505
- secondaryTrustee: ["settlor", "protector", "definedBeneficiary"],
1506
- protector: ["settlor", "secondaryTrustee", "definedBeneficiary"],
1507
- definedBeneficiary: ["secondaryTrustee", "protector"],
1508
- undefinedBeneficiary: []
1509
- },
1510
- [LegalEntityTypes.ORGANIZATION]: {
1511
- settlor: ["secondaryTrustee", "protector"],
1512
- secondaryTrustee: ["settlor", "protector"],
1513
- protector: ["settlor", "secondaryTrustee"],
1514
- definedBeneficiary: [],
1515
- undefinedBeneficiary: []
1516
- }
1517
- }
1518
- };
1519
- const getAllowedCrossoverRolesMatrixByTrustMemberAndLegalEntityType = (trustMember) => {
1520
- const { trustMemberType } = trustMember;
1521
- if (trustMemberType === "undefinedBeneficiary") {
1522
- return allowedCrossoverRolesMatrix;
1523
- }
1524
- const crossoverRolesByTrustMember = allowedCrossoverRolesMatrixByTrustMemberAndLegalEntityType[trustMemberType];
1525
- if (!crossoverRolesByTrustMember) {
1526
- return allowedCrossoverRolesMatrix;
1527
- }
1528
- const crossoverRoles = crossoverRolesByTrustMember[trustMember.legalEntityType];
1529
- if (!crossoverRoles) {
1530
- return allowedCrossoverRolesMatrix;
1531
- }
1532
- return crossoverRoles;
1533
- };
1534
- const availablesRolesByTrustMemberTypeAndLegalEntityType = {
1535
- rootTrustee: {
1536
- [LegalEntityTypes.INDIVIDUAL]: ["settlor", "protector", "definedBeneficiary"],
1537
- [LegalEntityTypes.ORGANIZATION]: ["settlor", "protector"]
1538
- }
1539
- };
1540
- const getAvailableRolesByTrustMemberTypeAndLegalEntityType = (currentRoles, trustMember) => {
1541
- if (!currentRoles?.length) {
1542
- const { trustMemberType, legalEntityType } = trustMember;
1543
- const availableRolesByTrustMemberType = availablesRolesByTrustMemberTypeAndLegalEntityType[trustMemberType];
1544
- if (!availableRolesByTrustMemberType) {
1545
- return Object.values(TrustMemberTypes);
1546
- }
1547
- const availableRoles = availableRolesByTrustMemberType[legalEntityType];
1548
- if (!availableRoles) {
1549
- return Object.values(TrustMemberTypes);
1550
- }
1551
- return availableRoles;
1552
- }
1553
- const crossoverRolesMatrix = trustMember ? getAllowedCrossoverRolesMatrixByTrustMemberAndLegalEntityType(trustMember) : allowedCrossoverRolesMatrix;
1554
- const roles = currentRoles.map((role) => [role, ...crossoverRolesMatrix[role]]).reduce(
1555
- (existingAllowed, allowedForRole) => existingAllowed.filter((role) => allowedForRole.includes(role))
1556
- );
1557
- return roles.filter((r) => r !== "secondaryTrustee");
1558
- };
1559
- const getAvailableRoles = (currentRoles) => {
1560
- if (!currentRoles?.length) return Object.values(TrustMemberTypes);
1561
- return currentRoles.map((role) => [role, ...allowedCrossoverRolesMatrix[role]]).reduce(
1562
- (existingAllowed, allowedForRole) => existingAllowed.filter((role) => allowedForRole.includes(role))
1563
- );
1564
- };
1565
- const trustMemberLegalEntityTypes = [
1566
- LegalEntityTypes.INDIVIDUAL,
1567
- LegalEntityTypes.ORGANIZATION
1568
- ];
1569
- const countriesWhereSettlorExemptionReasonNotApplicable = [CountryCodes.NewZealand];
1570
- const settlorExemptionReasons = [
1571
- "contributionBelowThreshold",
1572
- "professionalServiceProvider",
1573
- "deceased"
1574
- ];
1575
- const settlorExemptionReasonWithNoneOfTheAbove = [
1576
- ...settlorExemptionReasons,
1577
- "noneOfTheAbove"
1578
- ];
1579
- const couldBeExemptSettlor = (data, country) => data.entityType === LegalEntityTypes.INDIVIDUAL && data.role !== void 0 && data.role.includes("settlor") && !data.role.some((role) => role !== "settlor") && (!country || !countriesWhereSettlorExemptionReasonNotApplicable.includes(country));
1580
- const isExemptSettlor = (data) => data.settlorExemptionReason?.some((reason) => reason !== "noneOfTheAbove") ?? false;
1581
- const isOrganizationAndSettlor = (data) => data.entityType === LegalEntityTypes.ORGANIZATION && data.role?.length === 1 && data.role[0] === "settlor";
1582
- const roleAndTypeValidationRules = {
1583
- entityType: {
1584
- modes: ["blur"],
1585
- validate: (entityType) => !isEmpty(entityType),
1586
- errorMessage: "fieldIsRequired"
1587
- },
1588
- role: {
1589
- modes: ["blur"],
1590
- validate: (role) => !!role?.length,
1591
- errorMessage: "fieldIsRequired"
1592
- },
1593
- descriptionUndefinedBeneficiary: {
1594
- modes: ["blur"],
1595
- validate: (description) => !isEmpty(description),
1596
- errorMessage: "fieldIsRequired"
1597
- },
1598
- settlorExemptionReason: {
1599
- modes: ["blur"],
1600
- validate: (reasons) => Boolean(reasons?.length),
1601
- errorMessage: "fieldIsRequired"
1602
- },
1603
- country: {
1604
- modes: ["blur"],
1605
- validate: (country) => !!country,
1606
- errorMessage: "fieldIsRequired"
1607
- },
1608
- legalCompanyName: {
1609
- modes: ["blur"],
1610
- validate: (name) => !!name,
1611
- errorMessage: "fieldIsRequired"
1612
- }
1613
- };
1614
- const CHARACTERS_LIMIT = 256;
1615
- const leTypeCardDetails$1 = {
1616
- [LegalEntityTypes.INDIVIDUAL]: {
1617
- id: "individual",
1618
- name: "naturalPersonTitle",
1619
- description: "naturalPersonDescription"
1620
- },
1621
- [LegalEntityTypes.ORGANIZATION]: {
1622
- id: "organization",
1623
- name: "businessEntityTitle",
1624
- description: "businessEntityDescription"
1625
- }
1626
- };
1627
- const convertExistingTrustMemberToDefaultData = (trustMember, allowMoreRolesForMainRootTrusteeEnabled) => {
1628
- if (!trustMember) {
1629
- return {};
1630
- }
1631
- if (allowMoreRolesForMainRootTrusteeEnabled && trustMember.trustMemberType === "rootTrustee") {
1632
- return convertRootTrusteeTrustMember(trustMember);
1633
- }
1634
- return convertExistingTrustMember(trustMember);
1635
- };
1636
- const TrustRoleAndEntityType = (props) => {
1637
- const { t } = useTranslation("common");
1638
- const { i18n } = useI18nContext();
1639
- const { existingTrustMember, isOrganizationSettlorWithExemptionEnabled, onChange, id, country } = props;
1640
- const trustRoleAndEntityTypeCountry = country;
1641
- let mergedProps = props;
1642
- mergedProps = mergeFieldMetadataIntoProps(
1643
- "legalCompanyName",
1644
- resolveFieldMetadata(
1645
- defaultFieldConfig[trustRoleAndEntityTypeCountry],
1646
- { isBusiness: false },
1647
- defaultFieldMetadata
1648
- ),
1649
- mergedProps
1650
- );
1651
- const { isExperimentEnabled } = useExperimentsContext();
1652
- const allowMoreRolesForMainRootTrusteeEnabled = isExperimentEnabled(
1653
- "AllowMoreRolesForMainRootTrustee"
1654
- );
1655
- const defaultData = convertExistingTrustMemberToDefaultData(
1656
- existingTrustMember,
1657
- allowMoreRolesForMainRootTrusteeEnabled
1658
- );
1659
- const formUtils = createFormUtils(mergedProps, t);
1660
- const decideFields = (data2) => {
1661
- if (data2.role?.includes("undefinedBeneficiary")) {
1662
- return ["role", "descriptionUndefinedBeneficiary"];
1663
- }
1664
- if (data2.role?.length) {
1665
- if (isOrganizationSettlorWithExemptionEnabled && isOrganizationAndSettlor(data2)) {
1666
- return ["role", "entityType", "settlorExemptionReason", "country", "legalCompanyName"];
1667
- }
1668
- if (couldBeExemptSettlor(data2, country)) {
1669
- return isExemptSettlor(data2) ? ["role", "entityType", "settlorExemptionReason", "firstName", "lastName"] : ["role", "entityType", "settlorExemptionReason"];
1670
- }
1671
- return allowMoreRolesForMainRootTrusteeEnabled ? ["role", "entityType", "trustMemberType"] : ["role", "entityType"];
1672
- }
1673
- return ["role"];
1674
- };
1675
- const { data, valid, schema, errors, fieldProblems, handleChangeFor, isValid } = useForm({
1676
- ...props,
1677
- schema: decideFields,
1678
- rules: roleAndTypeValidationRules,
1679
- defaultData,
1680
- fieldProblems: props?.fieldValidationErrors
1681
- });
1682
- const availableRoles = allowMoreRolesForMainRootTrusteeEnabled && existingTrustMember?.trustMemberType === "rootTrustee" ? getAvailableRolesByTrustMemberTypeAndLegalEntityType(data.role, existingTrustMember) : getAvailableRoles(data.role);
1683
- const { data: exemptSettlorLe } = useLegalEntity(
1684
- isOrganizationSettlorWithExemptionEnabled && existingTrustMember && existingTrustMember.trustMemberType === "exemptSettlor" && existingTrustMember.legalEntityId !== isNewEntity && existingTrustMember.roles !== void 0 && existingTrustMember.roles.length === 1 && existingTrustMember.roles[0] === "settlor" ? existingTrustMember.legalEntityId : skipToken
1685
- );
1686
- useEffect(() => {
1687
- if (exemptSettlorLe && exemptSettlorLe.organization) {
1688
- handleChangeFor("country")(exemptSettlorLe.organization.registeredAddress.country);
1689
- }
1690
- }, [exemptSettlorLe]);
1691
- useEffect(() => {
1692
- onChange?.({
1693
- schema,
1694
- data,
1695
- errors,
1696
- valid,
1697
- isValid,
1698
- dataStoreId: id,
1699
- fieldProblems
1700
- });
1701
- }, [schema, data, isValid, i18n, errors, valid, id, fieldProblems]);
1702
- const onInputDescription = (e) => {
1703
- const { value } = e.target;
1704
- handleChangeFor("descriptionUndefinedBeneficiary")(value);
1705
- };
1706
- const changeRoles = (roles) => {
1707
- handleChangeFor("role")(roles);
1708
- if (roles.includes("undefinedBeneficiary")) {
1709
- handleChangeFor("entityType")(void 0);
1710
- } else {
1711
- handleChangeFor("descriptionUndefinedBeneficiary")(void 0);
1712
- }
1713
- };
1714
- const changeSettlorExemptionReasons = (exemptionReasons) => {
1715
- if (exemptionReasons.includes("noneOfTheAbove")) {
1716
- handleChangeFor("settlorExemptionReason")(
1717
- data.settlorExemptionReason?.includes("noneOfTheAbove") ? exemptionReasons.filter((reason) => reason !== "noneOfTheAbove") : ["noneOfTheAbove"]
1718
- );
1719
- return;
1720
- }
1721
- handleChangeFor("settlorExemptionReason")(exemptionReasons);
1722
- };
1723
- const nameProps = getFieldProps(props, nameFields);
1724
- const onEntityTypeChange = (value) => {
1725
- if (isOrganizationSettlorWithExemptionEnabled && value === LegalEntityTypes.ORGANIZATION && data.role?.length === 1 && data.role[0] === "settlor") {
1726
- changeSettlorExemptionReasons(["professionalServiceProvider"]);
1727
- }
1728
- handleChangeFor("entityType")(value);
1729
- };
1730
- return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-trust__role-and-entity-type adyen-kyc-u-width-full", children: [
1731
- /* @__PURE__ */ jsx(FormHeader, { heading: i18n.get("roleAndEntityType") }),
1732
- /* @__PURE__ */ jsx(
1733
- ErrorPanel,
1734
- {
1735
- verificationErrors: props?.formVerificationErrors,
1736
- validationErrors: props?.fieldValidationErrors,
1737
- formUtils,
1738
- id: "ariaErrorField"
1739
- }
1740
- ),
1741
- /* @__PURE__ */ jsx(
1742
- Field,
1743
- {
1744
- el: "fieldset",
1745
- name: "role",
1746
- label: formUtils.getLabel("role", "selectTheApplicableRoles"),
1747
- errorMessage: formUtils.getErrorMessage("role", errors, fieldProblems),
1748
- isValid: valid.role,
1749
- disabled: availableRoles.length === 0,
1750
- showErrorIconBottom: true,
1751
- children: (childProps) => /* @__PURE__ */ jsx(
1752
- MultiSelectList,
1753
- {
1754
- ...childProps,
1755
- options: Object.values(TrustMemberTypes),
1756
- selected: data.role ?? [],
1757
- onSelect: changeRoles,
1758
- mapToSelectItem: (role) => ({
1759
- ...makeSelectItemForRole(role, t),
1760
- disabled: !availableRoles.includes(role)
1761
- })
1762
- }
1763
- )
1764
- }
1765
- ),
1766
- schema?.includes("entityType") && /* @__PURE__ */ jsx(
1767
- Field,
1768
- {
1769
- el: "fieldset",
1770
- name: "entityType",
1771
- errorMessage: formUtils.getErrorMessage("entityType", errors, fieldProblems),
1772
- label: formUtils.getLabel("entityType", "whatTypeOfYourMembersEntity"),
1773
- classNameModifiers: ["entityType"],
1774
- disabled: Boolean(existingTrustMember),
1775
- children: (childProps) => /* @__PURE__ */ jsx(
1776
- RadioGroupCard,
1777
- {
1778
- ...childProps,
1779
- name: "entityType",
1780
- options: trustMemberLegalEntityTypes,
1781
- onSelect: onEntityTypeChange,
1782
- selected: data.entityType,
1783
- optionId: (option) => leTypeCardDetails$1[option].id,
1784
- optionName: (option) => leTypeCardDetails$1[option].name,
1785
- optionDescription: (option) => leTypeCardDetails$1[option].description,
1786
- "aria-required": true,
1787
- "aria-invalid": !valid.entityType
1788
- }
1789
- )
1790
- }
1791
- ),
1792
- schema?.includes("descriptionUndefinedBeneficiary") && /* @__PURE__ */ jsx(
1793
- Field,
1794
- {
1795
- name: "descriptionUndefinedBeneficiary",
1796
- label: formUtils.getLabel("description"),
1797
- isValid: valid.descriptionUndefinedBeneficiary,
1798
- errorMessage: formUtils.getErrorMessage(
1799
- "descriptionUndefinedBeneficiary",
1800
- errors,
1801
- fieldProblems
1802
- ),
1803
- children: (childProps) => /* @__PURE__ */ jsx(
1804
- TextArea,
1805
- {
1806
- ...childProps,
1807
- name: "descriptionUndefinedBeneficiary",
1808
- value: data.descriptionUndefinedBeneficiary,
1809
- maxLength: CHARACTERS_LIMIT,
1810
- onInput: onInputDescription,
1811
- helper: i18n.get("describeWhoIsABeneficiaryInYourTrust"),
1812
- "aria-required": true,
1813
- "aria-invalid": !valid.descriptionUndefinedBeneficiary
1814
- }
1815
- )
1816
- }
1817
- ),
1818
- schema?.includes("settlorExemptionReason") && !isOrganizationAndSettlor(data) && /* @__PURE__ */ jsx(
1819
- Field,
1820
- {
1821
- el: "fieldset",
1822
- name: "settlorExemptionReason",
1823
- label: formUtils.getLabel("settlorExemptionReason", "whichOfTheseApplyToTheSettlor"),
1824
- isValid: valid.settlorExemptionReason,
1825
- errorMessage: formUtils.getErrorMessage("settlorExemptionReason", errors, fieldProblems),
1826
- showErrorIconBottom: true,
1827
- children: (childProps) => /* @__PURE__ */ jsx(
1828
- MultiSelectList,
1829
- {
1830
- ...childProps,
1831
- options: settlorExemptionReasonWithNoneOfTheAbove,
1832
- selected: data.settlorExemptionReason ?? [],
1833
- onSelect: changeSettlorExemptionReasons,
1834
- mapToSelectItem: (reason) => ({
1835
- id: reason,
1836
- name: i18n.get(reason)
1837
- })
1838
- }
1839
- )
1840
- }
1841
- ),
1842
- data.trustMemberType !== "rootTrustee" && (schema.includes("firstName") || schema.includes("lastName")) ? /* @__PURE__ */ jsx(
1843
- Name,
1844
- {
1845
- ...nameProps,
1846
- data: {
1847
- firstName: defaultData.firstName,
1848
- lastName: defaultData.lastName
1849
- },
1850
- requiredFields: schema.filter(
1851
- (field) => nameFields.includes(field)
1852
- ),
1853
- labels: {
1854
- firstName: "firstNameOfSettlor",
1855
- lastName: "lastNameOfSettlor",
1856
- enterNameExactlyAsAppearInID: "enterSettlorsFirstNameExactlyAsItAppearsInID",
1857
- enterLastNameExactlyAsAppearInID: "enterSettlorsLastNameExactlyAsItAppearsInID"
1858
- },
1859
- errors,
1860
- fieldValidationErrors: fieldProblems,
1861
- handleFieldChange: handleChangeFor,
1862
- valid,
1863
- dataStoreId: id
1864
- }
1865
- ) : void 0,
1866
- isOrganizationSettlorWithExemptionEnabled && schema?.includes("country") && schema?.includes("legalCompanyName") ? /* @__PURE__ */ jsxs(Fragment, { children: [
1867
- /* @__PURE__ */ jsx(
1868
- CountryField,
1869
- {
1870
- data: formUtils.getFieldData(data, COUNTRY_FIELD),
1871
- valid: formUtils.getFieldValid(valid, COUNTRY_FIELD),
1872
- errors: formUtils.getFieldErrors(errors, fieldProblems, COUNTRY_FIELD),
1873
- labels: formUtils.getFieldLabels(COUNTRY_FIELD),
1874
- readonly: false,
1875
- allowedCountries: void 0,
1876
- handleChangeFor
1877
- }
1878
- ),
1879
- /* @__PURE__ */ jsx(
1880
- LegalCompanyNameField,
1881
- {
1882
- data: formUtils.getFieldData(data, LEGAL_COMPANY_NAME_FIELD),
1883
- valid: formUtils.getFieldValid(valid, LEGAL_COMPANY_NAME_FIELD),
1884
- errors: formUtils.getFieldErrors(errors, fieldProblems, LEGAL_COMPANY_NAME_FIELD),
1885
- labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
1886
- helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
1887
- legalCompanyName: "legalCompanyName__helperText"
1888
- }),
1889
- readonly: false,
1890
- handleChangeFor
1891
- }
1892
- )
1893
- ] }) : void 0
1894
- ] });
1895
- };
1896
- const mapTrustMemberToEntityAssociations = (trustMember) => {
1897
- if (trustMember.legalEntityId === isNewEntity) {
1898
- throw Error("Cannot map a new trust member, you must create it first");
1899
- }
1900
- if (trustMember.trustMemberType === "exemptSettlor")
1901
- return [
1902
- {
1903
- legalEntityId: trustMember.legalEntityId,
1904
- entityType: trustMember.legalEntityType,
1905
- type: TrustMemberTypes.SETTLOR,
1906
- settlorExemptionReason: trustMember.settlorExemptionReason,
1907
- name: trustMember.legalEntityType === LegalEntityTypes.INDIVIDUAL ? `${trustMember.exemptSettlorName?.firstName} ${trustMember.exemptSettlorName?.lastName}` : trustMember.name ?? ""
1908
- }
1909
- ];
1910
- return trustMember.roles.map((role) => ({
1911
- legalEntityId: trustMember.legalEntityId,
1912
- type: role
1913
- }));
1914
- };
1915
- const addOrUpdateAssociatedTrustMember = async ({
1916
- newOrUpdated,
1917
- trust,
1918
- updateLegalEntity
1919
- }) => {
1920
- const otherAssociations = getOwnEntityAssociations(trust).filter(
1921
- (existingAssociation) => existingAssociation.legalEntityId !== newOrUpdated.legalEntityId
1922
- );
1923
- const updatedAssociations = mapTrustMemberToEntityAssociations(newOrUpdated);
1924
- const patchLE = {
1925
- entityAssociations: [...otherAssociations, ...updatedAssociations]
1926
- };
1927
- await updateLegalEntity({ ...patchLE, id: trust.id });
1928
- };
1929
- const updateRootTrusteeTrustMember = async ({
1930
- trustMember,
1931
- trust,
1932
- updateLegalEntity
1933
- }) => {
1934
- const otherAssociations = getOwnEntityAssociations(trust).filter(
1935
- (existingAssociation) => existingAssociation.legalEntityId !== trustMember.legalEntityId
1936
- );
1937
- const updatedAssociations = mapRootTrustMemberToEntityAssociations(trustMember);
1938
- const patchLE = {
1939
- entityAssociations: [...otherAssociations, ...updatedAssociations]
1940
- };
1941
- await updateLegalEntity({ ...patchLE, id: trust.id });
1942
- };
1943
- const mapRootTrustMemberToEntityAssociations = (trustMember) => trustMember.roles.filter((r) => r !== "secondaryTrustee").map((role) => ({
1944
- legalEntityId: trustMember.legalEntityId,
1945
- type: role
1946
- }));
1947
- const addOrUpdateUndefinedBeneficiary = async ({
1948
- newOrUpdated,
1949
- trust,
1950
- updateLegalEntity
1951
- }) => {
1952
- const otherUndefinedBeneficiaries = trust.trust?.undefinedBeneficiaryInfo?.filter(
1953
- (ub) => ub.reference !== newOrUpdated.reference
1954
- ) ?? [];
1955
- const patchLE = {
1956
- trust: {
1957
- undefinedBeneficiaryInfo: [
1958
- ...otherUndefinedBeneficiaries,
1959
- newOrUpdated.reference === isNewEntity ? {
1960
- description: newOrUpdated.description
1961
- } : {
1962
- reference: newOrUpdated.reference,
1963
- description: newOrUpdated.description
1964
- }
1965
- ]
1966
- }
1967
- };
1968
- await updateLegalEntity({ ...patchLE, id: trust.id });
1969
- };
1970
- const createExemptSettlor = async ({
1971
- exemptSettlor,
1972
- trust,
1973
- handleCreateLegalEntity
1974
- }) => {
1975
- const exemptSettlorLE = {
1976
- type: LegalEntityTypes.INDIVIDUAL,
1977
- individual: {
1978
- name: {
1979
- firstName: exemptSettlor.exemptSettlorName?.firstName ?? "",
1980
- lastName: exemptSettlor.exemptSettlorName?.lastName ?? ""
1981
- },
1982
- residentialAddress: {
1983
- country: trust.trust.registeredAddress.country
1984
- }
1985
- }
1986
- };
1987
- return handleCreateLegalEntity(exemptSettlorLE);
1988
- };
1989
- const createOrganizationExemptSettlor = async ({
1990
- exemptSettlor,
1991
- handleCreateLegalEntity
1992
- }) => {
1993
- const exemptSettlorLE = {
1994
- type: LegalEntityTypes.ORGANIZATION,
1995
- organization: {
1996
- legalName: exemptSettlor.name ?? "",
1997
- registeredAddress: {
1998
- country: exemptSettlor.country ?? "NL"
1999
- }
2000
- }
2001
- };
2002
- return handleCreateLegalEntity(exemptSettlorLE);
2003
- };
2004
- const exemptSettlorNamesTheSame = (existingSettlor, newSettlor) => JSON.stringify(existingSettlor.exemptSettlorName) === JSON.stringify(newSettlor.exemptSettlorName);
2005
- const updateExemptSettlorName = async ({
2006
- exemptSettlor,
2007
- updateLegalEntity
2008
- }) => {
2009
- const exemptSettlorPatch = {
2010
- individual: {
2011
- name: {
2012
- firstName: exemptSettlor.exemptSettlorName?.firstName,
2013
- lastName: exemptSettlor.exemptSettlorName?.lastName
2014
- }
2015
- }
2016
- };
2017
- return updateLegalEntity({
2018
- ...exemptSettlorPatch,
2019
- id: exemptSettlor.legalEntityId
2020
- });
2021
- };
2022
- const updateOrganizationExemptSettlorName = async ({
2023
- exemptSettlor,
2024
- updateLegalEntity
2025
- }) => {
2026
- const exemptSettlorPatch = {
2027
- organization: {
2028
- legalName: exemptSettlor.name,
2029
- registeredAddress: {
2030
- country: exemptSettlor.country
2031
- }
2032
- }
2033
- };
2034
- return updateLegalEntity({
2035
- ...exemptSettlorPatch,
2036
- id: exemptSettlor.legalEntityId
2037
- });
2038
- };
2039
- const settlorExemptionReasonsList = "adyen-kyc-settlor-exemption-reasons-list";
2040
- const styles$3 = {
2041
- settlorExemptionReasonsList
2042
- };
2043
- const formatRolesForSummary = (roles, i18n) => roles.map((role) => i18n.get(getRoleName(role))).join(", ");
2044
- const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$3.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
2045
- const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExemptionEnabled) => {
2046
- const { trustMemberType, roles } = data;
2047
- const role = formatRolesForSummary(roles, i18n);
2048
- switch (trustMemberType) {
2049
- case "undefinedBeneficiary":
2050
- return {
2051
- role,
2052
- descriptionUndefinedBeneficiary: data.description
2053
- };
2054
- case "exemptSettlor":
2055
- return {
2056
- role,
2057
- entityType: i18n.get(data.legalEntityType),
2058
- firstName: data.exemptSettlorName?.firstName,
2059
- lastName: data.exemptSettlorName?.lastName,
2060
- country: isOrganizationSettlorWithExemptionEnabled ? data.country : void 0,
2061
- legalCompanyName: isOrganizationSettlorWithExemptionEnabled ? data.name : void 0,
2062
- settlorExemptionReason: summaryItem(
2063
- "otherInformation",
2064
- formatSettlorExemptionReasonsForSummary(data.settlorExemptionReason ?? [], i18n)
2065
- )
2066
- };
2067
- case "company":
2068
- case "rootTrustee":
2069
- case "regular":
2070
- return {};
2071
- }
2072
- };
2073
- const summary = {
2074
- formId: "summary",
2075
- formName: "summary"
2076
- };
2077
- const regularForms$1 = {
2078
- roleAndEntityType: {
2079
- formId: "roleAndEntityType",
2080
- formName: "roleAndEntityType",
2081
- fields: ["role", "entityType"]
2082
- },
2083
- memberDetails: {
2084
- formId: "memberDetails",
2085
- formName: "memberDetails"
2086
- },
2087
- summary
2088
- };
2089
- const undefinedBeneficiaryForms = {
2090
- roleAndEntityType: {
2091
- formId: "roleAndEntityType",
2092
- formName: "roleAndEntityType",
2093
- fields: ["role", "entityType", "descriptionUndefinedBeneficiary"]
2094
- },
2095
- summary
2096
- };
2097
- const exemptSettlorForms = {
2098
- roleAndEntityType: {
2099
- formId: "roleAndEntityType",
2100
- formName: "roleAndEntityType",
2101
- fields: ["role", "entityType", "settlorExemptionReason"]
2102
- },
2103
- summary
2104
- };
2105
- const decideForms = (trustMember) => {
2106
- if (trustMember === "incomplete") return regularForms$1;
2107
- switch (trustMember.trustMemberType) {
2108
- case "undefinedBeneficiary":
2109
- return undefinedBeneficiaryForms;
2110
- case "exemptSettlor":
2111
- return exemptSettlorForms;
2112
- case "rootTrustee":
2113
- return exemptSettlorForms;
2114
- case "regular":
2115
- case "company":
2116
- return regularForms$1;
2117
- }
2118
- };
2119
- const convertDataToTrustMember = (data, existingTrustMember, isOrganizationSettlorWithExemptionReasonEnabled = false) => {
2120
- const existingId = existingTrustMember ? existingTrustMember.trustMemberType === "undefinedBeneficiary" ? existingTrustMember.reference : existingTrustMember.legalEntityId : void 0;
2121
- if (data.trustMemberType === "rootTrustee") {
2122
- return {
2123
- trustMemberType: "rootTrustee",
2124
- roles: data.role ?? [],
2125
- legalEntityType: data.entityType ?? LegalEntityTypes.ORGANIZATION,
2126
- legalEntityId: "",
2127
- name: data.firstName ?? ""
2128
- };
2129
- }
2130
- if (data.role?.length) {
2131
- if (isExemptSettlor(data)) {
2132
- if (isOrganizationSettlorWithExemptionReasonEnabled && data.entityType === LegalEntityTypes.ORGANIZATION) {
2133
- return {
2134
- trustMemberType: "exemptSettlor",
2135
- roles: [TrustMemberTypes.SETTLOR],
2136
- legalEntityType: LegalEntityTypes.ORGANIZATION,
2137
- legalEntityId: existingId ?? isNewEntity,
2138
- name: data.legalCompanyName ?? "",
2139
- settlorExemptionReason: ["professionalServiceProvider"],
2140
- country: data.country
2141
- };
2142
- }
2143
- return {
2144
- trustMemberType: "exemptSettlor",
2145
- roles: [TrustMemberTypes.SETTLOR],
2146
- legalEntityType: LegalEntityTypes.INDIVIDUAL,
2147
- settlorExemptionReason: data.settlorExemptionReason.filter(
2148
- (reason) => reason !== "noneOfTheAbove"
2149
- ),
2150
- exemptSettlorName: {
2151
- firstName: data.firstName ?? "",
2152
- lastName: data.lastName ?? ""
2153
- },
2154
- legalEntityId: existingId ?? isNewEntity
2155
- };
2156
- }
2157
- if (data.role.includes("undefinedBeneficiary"))
2158
- return {
2159
- trustMemberType: "undefinedBeneficiary",
2160
- roles: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
2161
- description: data.descriptionUndefinedBeneficiary ?? "",
2162
- reference: existingId ?? isNewEntity
2163
- };
2164
- if (data.entityType === LegalEntityTypes.ORGANIZATION) {
2165
- return {
2166
- trustMemberType: "company",
2167
- roles: data.role,
2168
- legalEntityType: LegalEntityTypes.ORGANIZATION,
2169
- legalEntityId: existingId ?? isNewEntity,
2170
- name: data.legalCompanyName ?? "",
2171
- country: data.country
2172
- };
2173
- }
2174
- if (data.entityType === LegalEntityTypes.INDIVIDUAL)
2175
- return {
2176
- trustMemberType: "regular",
2177
- roles: data.role,
2178
- legalEntityType: LegalEntityTypes.INDIVIDUAL,
2179
- legalEntityId: existingId ?? isNewEntity,
2180
- name: ""
2181
- };
2182
- }
2183
- return "incomplete";
2184
- };
2185
- const logger$1 = createLogger();
2186
- function RoleAndTypeDropin({
2187
- trust,
2188
- trustMemberLe,
2189
- existingTrustMember,
2190
- navigateToFullDropinFor,
2191
- navigateBack,
2192
- country
2193
- }) {
2194
- const { i18n } = useI18nContext();
2195
- const { isExperimentEnabled } = useExperimentsContext();
2196
- const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
2197
- const [trustMember, setTrustMember] = useState(
2198
- existingTrustMember ?? "incomplete"
2199
- );
2200
- const [shouldValidate, setShouldValidate] = useState(false);
2201
- const { showToast } = useToastContext();
2202
- const isOrganizationSettlorWithExemptionReasonEnabled = (country2) => country2 === CountryCodes.Australia;
2203
- const isOrganizationSettlorWithExemptionEnabled = isOrganizationSettlorWithExemptionReasonEnabled(
2204
- trust?.trust?.countryOfGoverningLaw
2205
- );
2206
- const formList = decideForms(trustMember);
2207
- const forms = Object.values(formList);
2208
- const [formValidity, setFormValidity] = useState({
2209
- roleAndEntityType: false
2210
- });
2211
- const [activeForm, setActiveForm] = useState(regularForms$1.roleAndEntityType);
2212
- const isSummaryStep = activeForm.formId === summaryStep.formId;
2213
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2214
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
2215
- const addOrUpdateTrustMember = async (updated, existing) => {
2216
- if (trust === void 0) {
2217
- throw new Error("No associated trust");
2218
- }
2219
- try {
2220
- switch (updated.trustMemberType) {
2221
- case "undefinedBeneficiary":
2222
- await addOrUpdateUndefinedBeneficiary({
2223
- newOrUpdated: updated,
2224
- trust,
2225
- updateLegalEntity
2226
- });
2227
- break;
2228
- case "exemptSettlor":
2229
- if (!existing) {
2230
- const newSettlorLE = isOrganizationSettlorWithExemptionEnabled && updated.legalEntityType === "organization" ? await createOrganizationExemptSettlor({
2231
- exemptSettlor: updated,
2232
- handleCreateLegalEntity: createLegalEntity
2233
- }) : await createExemptSettlor({
2234
- exemptSettlor: updated,
2235
- trust,
2236
- handleCreateLegalEntity: createLegalEntity
2237
- });
2238
- updated.legalEntityId = newSettlorLE.id;
2239
- }
2240
- if (existing && !exemptSettlorNamesTheSame(existing, updated)) ;
2241
- if (existing && isOrganizationSettlorWithExemptionEnabled && updated.legalEntityType === "organization") ;
2242
- await addOrUpdateAssociatedTrustMember({
2243
- newOrUpdated: updated,
2244
- trust,
2245
- updateLegalEntity
2246
- });
2247
- break;
2248
- case "regular":
2249
- case "company":
2250
- await addOrUpdateAssociatedTrustMember({
2251
- newOrUpdated: updated,
2252
- trust,
2253
- updateLegalEntity
2254
- });
2255
- break;
2256
- case "rootTrustee":
2257
- if (allowMoreRolesForMainRootTrustee && existing) ;
2258
- break;
2259
- default:
2260
- logger$1.warn(
2261
- `Updating trust member type "${updated.trustMemberType}" is not implemented.`
2262
- );
2263
- }
2264
- showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
2265
- navigateBack();
2266
- } catch (err) {
2267
- logger$1.error(err);
2268
- showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
2269
- }
2270
- };
2271
- const summaryData = trustMember === "incomplete" ? {} : {
2272
- roleAndEntityType: formatRoleAndEntityTypeSummary(
2273
- trustMember,
2274
- i18n,
2275
- isOrganizationSettlorWithExemptionEnabled
2276
- )
2277
- };
2278
- const onNavigateToNextStep = () => {
2279
- if (isSummaryStep && trustMember !== "incomplete") {
2280
- addOrUpdateTrustMember(trustMember);
2281
- return;
2282
- }
2283
- gotoFormByFormIndex(forms.findIndex((form) => form.formId === activeForm.formId) + 1);
2284
- };
2285
- const onTrustMemberChange = ({
2286
- data,
2287
- isValid = false,
2288
- dataStoreId = void 0
2289
- }) => {
2290
- if (dataStoreId) {
2291
- setFormValidity({ ...formValidity, [dataStoreId]: isValid });
2292
- }
2293
- setTrustMember(
2294
- convertDataToTrustMember(
2295
- data,
2296
- existingTrustMember,
2297
- isOrganizationSettlorWithExemptionEnabled
2298
- )
2299
- );
2300
- };
2301
- const saveRolesAndNavigate = async () => {
2302
- if (trustMember === "incomplete") return;
2303
- if (hasRolesChanged(trustMember.roles, existingTrustMember?.roles)) {
2304
- addOrUpdateTrustMember(trustMember);
2305
- }
2306
- navigateBack();
2307
- };
2308
- const hasRolesChanged = (newRoles = [], existingRoles = []) => newRoles.length !== existingRoles.length || !newRoles.every((newRole) => existingRoles.includes(newRole));
2309
- const formsWithValidity = forms.map((form) => ({
2310
- formId: form.formId,
2311
- formName: form.formName,
2312
- isValid: formValidity[form.formId]
2313
- }));
2314
- const gotoFormByFormIndex = (formIndex) => {
2315
- const targetForm = forms[formIndex];
2316
- if (!formValidity.roleAndEntityType || trustMember === "incomplete") {
2317
- setShouldValidate(true);
2318
- return;
2319
- }
2320
- if (trustMember.trustMemberType === "regular" || trustMember.trustMemberType === "company") {
2321
- if (targetForm.formId === regularForms$1.memberDetails.formId) {
2322
- navigateToFullDropinFor(trustMember);
2323
- return;
2324
- }
2325
- if (targetForm.formId === summaryStep.formId) return;
2326
- }
2327
- setActiveForm(targetForm);
2328
- };
2329
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2330
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropin__sidebar-wrapper", children: /* @__PURE__ */ jsx(
2331
- FormNavigation,
2332
- {
2333
- forms: formsWithValidity,
2334
- activeForm: formsWithValidity.find((form) => form.formId === activeForm.formId),
2335
- taskName: "trustMembers",
2336
- gotoForm: gotoFormByFormIndex
2337
- }
2338
- ) }),
2339
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-container", children: [
2340
- /* @__PURE__ */ jsx(
2341
- "div",
2342
- {
2343
- className: activeForm.formId !== "roleAndEntityType" ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
2344
- children: /* @__PURE__ */ jsx(
2345
- TrustRoleAndEntityType,
2346
- {
2347
- id: "roleAndEntityType",
2348
- existingTrustMember,
2349
- onChange: onTrustMemberChange,
2350
- shouldValidate,
2351
- isOrganizationSettlorWithExemptionEnabled,
2352
- country
2353
- }
2354
- )
2355
- }
2356
- ),
2357
- isSummaryStep && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: /* @__PURE__ */ jsx(
2358
- Summary,
2359
- {
2360
- data: summaryData,
2361
- forms: [undefinedBeneficiaryForms.roleAndEntityType],
2362
- gotoForm: gotoFormByFormIndex
2363
- }
2364
- ) }),
2365
- /* @__PURE__ */ jsx(
2366
- ActionBar,
2367
- {
2368
- onNext: onNavigateToNextStep,
2369
- onHome: saveRolesAndNavigate,
2370
- nextButtonLabel: isSummaryStep ? i18n.get("submit") : i18n.get("continue"),
2371
- homeButtonLabel: i18n.get("saveAndGoToOverview")
2372
- }
2373
- )
2374
- ] })
2375
- ] });
2376
- return /* @__PURE__ */ jsx(DropinLayout, { content });
2377
- }
2378
- function TrustMemberRoleAndTypePage({
2379
- trustId,
2380
- memberId,
2381
- navigateToFullDropinFor,
2382
- navigateBack
2383
- }) {
2384
- const { data: memberLe } = useLegalEntity(memberId ?? skipToken);
2385
- const { data: trustLe } = useLegalEntity(trustId);
2386
- const trustMembers = useTrustMembers();
2387
- if (!trustLe || memberId && !memberLe) {
2388
- return /* @__PURE__ */ jsx(Loader, {});
2389
- }
2390
- const country = getLegalEntityCountry(memberLe ?? trustLe);
2391
- const trustMember = memberId ? trustMembers.find(
2392
- (tm) => tm.trustMemberType !== "undefinedBeneficiary" && tm.legalEntityId === memberId
2393
- ) : void 0;
2394
- return /* @__PURE__ */ jsx(
2395
- RoleAndTypeDropin,
2396
- {
2397
- trust: trustLe,
2398
- trustMemberLe: memberLe,
2399
- existingTrustMember: trustMember,
2400
- country,
2401
- navigateToFullDropinFor,
2402
- navigateBack
2403
- }
2404
- );
2405
- }
2406
- const UNINCORPORATED_PARTNERSHIP__DEFAULT_DESCRIPTIONS_MAP = {
2407
- [UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER]: "provideAtLeastOneSecondaryPartner",
2408
- [UnincorporatedPartnershipMemberTypes.OWNER]: "provideAllOwners",
2409
- [UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON]: "ifNoOwnersSpecifyControllingPersons"
2410
- };
2411
- const iconStatus = (current, min) => {
2412
- const isSatisfied = current > 0 && current >= min;
2413
- return isSatisfied ? "satisfied" : "empty";
2414
- };
2415
- const getEntityStatusRuleDescription = (country, currentTask, entityLabel) => {
2416
- const defaultMessage = getDecisionMakerDescriptionMap(country)[entityLabel];
2417
- switch (currentTask) {
2418
- case TaskTypes.TRUST_MEMBER_OVERVIEW: {
2419
- return TRUST_DEFAULT_DESCRIPTIONS_MAP[entityLabel];
2420
- }
2421
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW: {
2422
- return UNINCORPORATED_PARTNERSHIP__DEFAULT_DESCRIPTIONS_MAP[entityLabel] || defaultMessage;
2423
- }
2424
- default: {
2425
- return defaultMessage;
2426
- }
2427
- }
2428
- };
2429
- const EntityStatusIcon = ({ status }) => {
2430
- switch (status) {
2431
- case "empty":
2432
- return /* @__PURE__ */ jsx(
2433
- Icon,
2434
- {
2435
- name: "checkmark-circle",
2436
- className: "adyen-kyc-entity-status__icon adyen-kyc-entity-status__icon--empty",
2437
- testId: "empty-icon"
2438
- }
2439
- );
2440
- case "satisfied":
2441
- return /* @__PURE__ */ jsx(
2442
- Icon,
2443
- {
2444
- name: "checkmark",
2445
- className: "adyen-kyc-entity-status__icon adyen-kyc-entity-status__icon--satisfied",
2446
- testId: "satisfied-icon"
2447
- }
2448
- );
2449
- default:
2450
- return /* @__PURE__ */ jsx(
2451
- Icon,
2452
- {
2453
- name: "circle",
2454
- className: "adyen-kyc-entity-status__icon adyen-kyc-entity-status__icon--empty",
2455
- testId: "empty-icon"
2456
- }
2457
- );
2458
- }
2459
- };
2460
- const EntityGuidanceStatus = ({
2461
- country,
2462
- currentTask,
2463
- entityLabel,
2464
- status
2465
- }) => {
2466
- const { t } = useTranslation("common");
2467
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-status__container", children: [
2468
- /* @__PURE__ */ jsx(EntityStatusIcon, { status }),
2469
- /* @__PURE__ */ jsx(
2470
- Tag,
2471
- {
2472
- className: "adyen-kyc-entity-status__tag",
2473
- variant: getRoleTagVariant(entityLabel),
2474
- children: t(($) => $[getRoleName(entityLabel)])
2475
- },
2476
- entityLabel
2477
- ),
2478
- /* @__PURE__ */ jsx(
2479
- "span",
2480
- {
2481
- className: "adyen-kyc-entity-status--text",
2482
- "data-testid": `${entityLabel}-rule--description`,
2483
- children: /* @__PURE__ */ jsx(
2484
- Trans,
2485
- {
2486
- t,
2487
- i18nKey: ($) => $[getEntityStatusRuleDescription(country, currentTask, entityLabel)]
2488
- }
2489
- )
2490
- }
2491
- )
2492
- ] });
2493
- };
2494
- const deleteAssociatedTrustMember = async ({
2495
- associatedTrustMember,
2496
- trust,
2497
- asyncMutation
2498
- }) => {
2499
- const ownEntityAssociations = getOwnEntityAssociations(trust);
2500
- const updatedTrustAssociations = {
2501
- entityAssociations: ownEntityAssociations.filter(
2502
- (entityAssociation) => entityAssociation.legalEntityId !== associatedTrustMember.legalEntityId
2503
- )
2504
- };
2505
- await asyncMutation({ ...updatedTrustAssociations, id: trust.id });
2506
- };
2507
- const deleteUndefinedBeneficiary = async ({
2508
- undefinedBeneficiary,
2509
- trust,
2510
- asyncMutation
2511
- }) => {
2512
- const existingUndefinedBeneficiaries = trust.trust?.undefinedBeneficiaryInfo ?? [];
2513
- const updatedTrust = {
2514
- trust: {
2515
- undefinedBeneficiaryInfo: existingUndefinedBeneficiaries.filter(
2516
- (ub) => ub.reference !== undefinedBeneficiary.reference
2517
- )
2518
- }
2519
- };
2520
- await asyncMutation({ ...updatedTrust, id: trust.id });
2521
- };
2522
- function useClickAwayListener(ref, onClickAway) {
2523
- const handleClickAway = useCallback(
2524
- (event) => {
2525
- if (ref.current && !ref.current.contains(event.target)) {
2526
- onClickAway();
2527
- }
2528
- },
2529
- [ref, onClickAway]
2530
- );
2531
- useEffect(() => {
2532
- document.addEventListener("mousedown", handleClickAway);
2533
- return () => {
2534
- document.removeEventListener("mousedown", handleClickAway);
2535
- };
2536
- }, [handleClickAway]);
2537
- }
2538
- const ClickAwayWrapper = ({ children, onClickAway, ...divProps }) => {
2539
- const ref = useRef(null);
2540
- useClickAwayListener(ref, onClickAway);
2541
- return /* @__PURE__ */ jsx("div", { ref, ...divProps, children });
2542
- };
2543
- const actionsMenu = "adyen-kyc-actions-menu";
2544
- const styles$2 = {
2545
- actionsMenu
2546
- };
2547
- const ActionsMenu = ({ options, open, setOpen }) => {
2548
- const menuItems = options.map(({ label, onSelect, icon }) => /* @__PURE__ */ jsx(
2549
- Button,
2550
- {
2551
- onClick: (event) => {
2552
- event.stopPropagation();
2553
- setOpen(false);
2554
- onSelect();
2555
- },
2556
- variant: "tertiary",
2557
- icon,
2558
- children: label
2559
- },
2560
- label
2561
- ));
2562
- return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$2.actionsMenu, role: "menu", children: menuItems }) : null;
2563
- };
2564
- const EntityAssociation = ({
2565
- name,
2566
- types,
2567
- status,
2568
- actions,
2569
- problems,
2570
- infoContent,
2571
- onNavigateToEntity,
2572
- removeEntity,
2573
- isRemoveDisabled = false,
2574
- handleIsRemoveDisabled
2575
- }) => {
2576
- const { t } = useTranslation("common");
2577
- const [showingActions, setShowingActions] = useState(false);
2578
- const [isStatusRemoving, setIsStatusRemoving] = useState(false);
2579
- return /* @__PURE__ */ jsxs(
2580
- Card,
2581
- {
2582
- className: "adyen-kyc-entity-association",
2583
- stateful: Boolean(onNavigateToEntity),
2584
- onClick: onNavigateToEntity,
2585
- onKeyDown: handleKeys(["Enter"], onNavigateToEntity ?? noop),
2586
- children: [
2587
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-association__top", children: [
2588
- /* @__PURE__ */ jsx("h3", { className: "adyen-kyc-entity-association__title", children: name }),
2589
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-association__info", children: [
2590
- /* @__PURE__ */ jsx(TaskItemStatus, { status: isStatusRemoving ? TaskStatuses.REMOVING : status }),
2591
- actions && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-association__actions", children: [
2592
- /* @__PURE__ */ jsx(
2593
- IconButton,
2594
- {
2595
- variant: "tertiary",
2596
- icon: "more-horiz",
2597
- onClick: (event) => {
2598
- event.stopPropagation();
2599
- setShowingActions(!showingActions);
2600
- },
2601
- ariaLabel: t(($) => $["toggleAssociationMenu"], { name })
2602
- }
2603
- ),
2604
- /* @__PURE__ */ jsx(ActionsMenu, { options: actions, open: showingActions, setOpen: setShowingActions })
2605
- ] }),
2606
- typeof removeEntity === "function" && typeof handleIsRemoveDisabled === "function" && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-entity-association__remove", children: /* @__PURE__ */ jsx(
2607
- Remove,
2608
- {
2609
- onRemove: removeEntity,
2610
- onRemoveStatusChange: setIsStatusRemoving,
2611
- isRemoveDisabled,
2612
- handleIsRemoveDisabled
2613
- }
2614
- ) })
2615
- ] })
2616
- ] }),
2617
- /* @__PURE__ */ jsx("div", { children: types.map((type) => /* @__PURE__ */ jsx(
2618
- Tag,
2619
- {
2620
- className: "adyen-kyc-entity-association__tag",
2621
- variant: getRoleTagVariant(type),
2622
- children: t(($) => $[getRoleName(type)])
2623
- },
2624
- type
2625
- )) }),
2626
- status === TaskStatuses.ERROR && /* @__PURE__ */ jsx(
2627
- VerificationErrorAlert,
2628
- {
2629
- className: "adyen-kyc-entity-association-alert",
2630
- problems
2631
- }
2632
- ),
2633
- infoContent
2634
- ]
2635
- }
2636
- );
2637
- };
2638
- const CompanyTrustMemberTaskItem = ({
2639
- companyTrustMember,
2640
- taskStatus,
2641
- onEditOwner,
2642
- onAddOwner,
2643
- onEdit,
2644
- onDelete
2645
- }) => {
2646
- const { i18n } = useI18nContext();
2647
- const actions = [
2648
- {
2649
- icon: "edit",
2650
- onSelect: onEdit,
2651
- label: i18n.get("editTrustMember", { values: { trustMember: companyTrustMember.name } })
2652
- },
2653
- companyTrustMember.ownerId ? {
2654
- icon: "edit",
2655
- onSelect: onEditOwner,
2656
- label: i18n.get("editOwnerOfTrustMember", {
2657
- values: { trustMember: companyTrustMember.name }
2658
- })
2659
- } : {
2660
- icon: "plus",
2661
- onSelect: onAddOwner,
2662
- label: i18n.get("addOwnerToTrustMember", {
2663
- values: { trustMember: companyTrustMember.name }
2664
- })
2665
- },
2666
- {
2667
- icon: "bin",
2668
- onSelect: onDelete,
2669
- label: i18n.get("removeTrustMember", { values: { trustMember: companyTrustMember.name } })
2670
- }
2671
- ];
2672
- const infoContent = companyTrustMember.ownerId ? void 0 : /* @__PURE__ */ jsx(
2673
- Alert,
2674
- {
2675
- title: /* @__PURE__ */ jsxs(Fragment, { children: [
2676
- i18n.get("helpUsVerifyCompany"),
2677
- " ",
2678
- /* @__PURE__ */ jsx(Button, { onClick: onAddOwner, variant: "link", children: i18n.get("providePersonalDetailsOfOwner") })
2679
- ] }),
2680
- className: "adyen-kyc-u-margin-top-16"
2681
- }
2682
- );
2683
- return /* @__PURE__ */ jsx(
2684
- EntityAssociation,
2685
- {
2686
- types: companyTrustMember.roles,
2687
- name: companyTrustMember.name,
2688
- status: taskStatus,
2689
- actions,
2690
- infoContent,
2691
- onNavigateToEntity: onEdit
2692
- },
2693
- companyTrustMember.legalEntityId
2694
- );
2695
- };
2696
- const ExemptSettlorTaskItem = ({
2697
- exemptSettlor,
2698
- taskStatus,
2699
- onEdit,
2700
- onDelete
2701
- }) => {
2702
- const { i18n } = useI18nContext();
2703
- const settlorName = exemptSettlor.legalEntityType === LegalEntityTypes.INDIVIDUAL ? `${exemptSettlor.exemptSettlorName?.firstName} ${exemptSettlor.exemptSettlorName?.lastName}` : exemptSettlor.name ?? "";
2704
- const actions = [
2705
- {
2706
- icon: "edit",
2707
- onSelect: onEdit,
2708
- label: i18n.get("editTrustMember", { values: { trustMember: settlorName } })
2709
- },
2710
- {
2711
- icon: "bin",
2712
- onSelect: onDelete,
2713
- label: i18n.get("removeTrustMember", { values: { trustMember: settlorName } })
2714
- }
2715
- ];
2716
- return /* @__PURE__ */ jsx(
2717
- EntityAssociation,
2718
- {
2719
- types: exemptSettlor.roles,
2720
- name: settlorName,
2721
- status: taskStatus,
2722
- actions,
2723
- onNavigateToEntity: onEdit
2724
- },
2725
- exemptSettlor.legalEntityId
2726
- );
2727
- };
2728
- const RegularTrustMemberTaskItem = ({
2729
- trustMember,
2730
- taskStatus,
2731
- onEdit,
2732
- onDelete
2733
- }) => {
2734
- const { i18n } = useI18nContext();
2735
- const actions = [
2736
- {
2737
- icon: "edit",
2738
- onSelect: onEdit,
2739
- label: i18n.get("editTrustMember", { values: { trustMember: trustMember.name } })
2740
- },
2741
- {
2742
- icon: "bin",
2743
- onSelect: onDelete,
2744
- label: i18n.get("removeTrustMember", { values: { trustMember: trustMember.name } })
2745
- }
2746
- ];
2747
- return /* @__PURE__ */ jsx(
2748
- EntityAssociation,
2749
- {
2750
- types: trustMember.roles,
2751
- name: trustMember.name,
2752
- status: taskStatus,
2753
- actions,
2754
- onNavigateToEntity: onEdit
2755
- },
2756
- trustMember.legalEntityId
2757
- );
2758
- };
2759
- const RootTrusteeTaskItem = ({
2760
- rootTrustee,
2761
- taskStatus,
2762
- onEdit
2763
- }) => {
2764
- const { i18n } = useI18nContext();
2765
- const actions = [
2766
- {
2767
- icon: "edit",
2768
- onSelect: onEdit,
2769
- label: i18n.get("editTrustMember", { values: { trustMember: rootTrustee.name } })
2770
- }
2771
- ];
2772
- const { isExperimentEnabled } = useExperimentsContext();
2773
- const isAllowMoreRolesForMainRootTrustee = isExperimentEnabled(
2774
- "AllowMoreRolesForMainRootTrustee"
2775
- );
2776
- return /* @__PURE__ */ jsx(
2777
- EntityAssociation,
2778
- {
2779
- types: isExperimentEnabled("AllowMoreRolesForMainRootTrustee") ? rootTrustee.roles : [TrustMemberTypes.TRUSTEE],
2780
- name: rootTrustee.name,
2781
- status: taskStatus,
2782
- actions: isAllowMoreRolesForMainRootTrustee ? actions : void 0
2783
- }
2784
- );
2785
- };
2786
- const UndefinedBeneficiaryTaskItem = ({
2787
- undefinedBeneficiary,
2788
- onEdit,
2789
- onDelete
2790
- }) => {
2791
- const { i18n } = useI18nContext();
2792
- const actions = [
2793
- {
2794
- icon: "edit",
2795
- onSelect: onEdit,
2796
- label: i18n.get("editTrustMember", {
2797
- values: { trustMember: i18n.get("undefinedBeneficiary") }
2798
- })
2799
- },
2800
- {
2801
- icon: "bin",
2802
- onSelect: onDelete,
2803
- label: i18n.get("removeTrustMember", {
2804
- values: { trustMember: i18n.get("undefinedBeneficiary") }
2805
- })
2806
- }
2807
- ];
2808
- return /* @__PURE__ */ jsx(
2809
- EntityAssociation,
2810
- {
2811
- name: undefinedBeneficiary.description,
2812
- types: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
2813
- status: TaskStatuses.FINISHED,
2814
- actions,
2815
- onNavigateToEntity: onEdit
2816
- },
2817
- undefinedBeneficiary.reference
2818
- );
2819
- };
2820
- const TrustMembersOverview = ({
2821
- navigateBackToTaskList,
2822
- navigateToEditTrustMember,
2823
- navigateToEditTrustMemberOwner
2824
- }) => {
2825
- const { data: rootLe, isLoading } = useLegalEntity(ROOT_LE);
2826
- const { data: trustLe, refetch: refetchTrust } = useAssociatedLegalEntity(
2827
- rootLe,
2828
- LegalEntityTypes.TRUST
2829
- );
2830
- const trustMembers = useTrustMembers();
2831
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
2832
- const { showToast } = useToastContext();
2833
- const { i18n } = useI18nContext();
2834
- if (isLoading || !rootLe || !trustLe) {
2835
- return /* @__PURE__ */ jsx(Loader, { size: "large" });
2836
- }
2837
- const deleteTrustMember = async (trustMember) => {
2838
- try {
2839
- switch (trustMember.trustMemberType) {
2840
- case "regular":
2841
- case "exemptSettlor":
2842
- case "company":
2843
- await deleteAssociatedTrustMember({
2844
- associatedTrustMember: trustMember,
2845
- trust: trustLe,
2846
- asyncMutation: updateLegalEntity
2847
- });
2848
- break;
2849
- case "undefinedBeneficiary":
2850
- await deleteUndefinedBeneficiary({
2851
- undefinedBeneficiary: trustMember,
2852
- trust: trustLe,
2853
- asyncMutation: updateLegalEntity
2854
- });
2855
- break;
2856
- case "rootTrustee":
2857
- throw new Error("Cannot delete root trustee");
2858
- }
2859
- await refetchTrust();
2860
- showToast({ variant: "success", label: i18n.get("successFullyRemovedTrustMember") });
2861
- } catch {
2862
- showToast({ variant: "error", label: i18n.get("failedToRemoveTrustMember") });
2863
- }
2864
- };
2865
- return /* @__PURE__ */ jsx(
2866
- TrustMembersOverviewInner,
2867
- {
2868
- trustMembers,
2869
- deleteTrustMember,
2870
- navigateBackToTaskList,
2871
- navigateToEditTrustMember,
2872
- navigateToEditTrustMemberOwner
2873
- }
2874
- );
2875
- };
2876
- const TrustMembersOverviewInner = ({
2877
- trustMembers,
2878
- deleteTrustMember,
2879
- navigateBackToTaskList,
2880
- navigateToEditTrustMember,
2881
- navigateToEditTrustMemberOwner
2882
- }) => {
2883
- const { i18n } = useI18nContext();
2884
- const { t } = useTranslation("common");
2885
- const trustMemberRequirements = DEFAULT_TRUST_MEMBER_REQUIREMENTS;
2886
- const trustMembersWithOneOfGivenRoles = (roleTypes) => trustMembers.filter(
2887
- ({ roles }) => roleTypes.some((label) => roles.includes(label))
2888
- );
2889
- const { isExperimentEnabled } = useExperimentsContext();
2890
- const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
2891
- const getTaskStatus2 = useGetTaskStatus();
2892
- return /* @__PURE__ */ jsx(
2893
- DropinLayout,
2894
- {
2895
- content: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-trust-members adyen-kyc-u-width-full", children: [
2896
- /* @__PURE__ */ jsx(
2897
- FormHeader,
2898
- {
2899
- heading: i18n.get("trustMembers"),
2900
- description: i18n.get("trustMembersDescription")
2901
- }
2902
- ),
2903
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-trust-members__container", children: trustMemberRequirements.map(({ roleTypes, min, label }) => /* @__PURE__ */ jsx(
2904
- EntityGuidanceStatus,
2905
- {
2906
- country: CountryCodes.Australia,
2907
- currentTask: TaskTypes.TRUST_MEMBER_OVERVIEW,
2908
- entityLabel: label,
2909
- status: iconStatus(trustMembersWithOneOfGivenRoles(roleTypes).length, min)
2910
- },
2911
- label
2912
- )) }),
2913
- /* @__PURE__ */ jsx(
2914
- ContextGuidance,
2915
- {
2916
- title: i18n.get("whatIsTheDifferenceBetweenTheseRoles"),
2917
- content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: trustMemberRequirements.map(({ label }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Trans, { t, ns: "common", i18nKey: ($) => $[`${label}GuideDescription`] }) }, label)) }),
2918
- titleId: "whatIsTheDifferenceBetweenTheseRoles",
2919
- contentId: "differenceBetweenTrustMemberRoles"
2920
- }
2921
- ),
2922
- /* @__PURE__ */ jsx(CardGroup, { children: trustMembers.map((trustMember) => {
2923
- switch (trustMember.trustMemberType) {
2924
- case "rootTrustee":
2925
- return /* @__PURE__ */ jsx(
2926
- RootTrusteeTaskItem,
2927
- {
2928
- rootTrustee: trustMember,
2929
- taskStatus: getTaskStatus2(
2930
- trustMember.legalEntityType == "organization" ? TaskTypes.TRUST_MEMBER_COMPANY : TaskTypes.TRUST_MEMBER_INDIVIDUAL,
2931
- String(trustMember.legalEntityId)
2932
- ),
2933
- onEdit: allowMoreRolesForMainRootTrustee ? () => navigateToEditTrustMember(trustMember) : () => {
2934
- }
2935
- },
2936
- trustMember.legalEntityId
2937
- );
2938
- case "regular":
2939
- return /* @__PURE__ */ jsx(
2940
- RegularTrustMemberTaskItem,
2941
- {
2942
- trustMember,
2943
- taskStatus: getTaskStatus2(
2944
- TaskTypes.TRUST_MEMBER_INDIVIDUAL,
2945
- String(trustMember.legalEntityId)
2946
- ),
2947
- onEdit: () => navigateToEditTrustMember(trustMember),
2948
- onDelete: () => deleteTrustMember(trustMember)
2949
- },
2950
- trustMember.legalEntityId
2951
- );
2952
- case "company":
2953
- return /* @__PURE__ */ jsx(
2954
- CompanyTrustMemberTaskItem,
2955
- {
2956
- companyTrustMember: trustMember,
2957
- taskStatus: getTaskStatus2(
2958
- TaskTypes.TRUST_MEMBER_COMPANY,
2959
- String(trustMember.legalEntityId)
2960
- ),
2961
- onEdit: () => navigateToEditTrustMember(trustMember),
2962
- onDelete: () => deleteTrustMember(trustMember),
2963
- onEditOwner: () => navigateToEditTrustMemberOwner(
2964
- trustMember.ownerId,
2965
- trustMember.legalEntityId
2966
- ),
2967
- onAddOwner: () => navigateToEditTrustMemberOwner("", trustMember.legalEntityId)
2968
- },
2969
- trustMember.legalEntityId
2970
- );
2971
- case "exemptSettlor":
2972
- return /* @__PURE__ */ jsx(
2973
- ExemptSettlorTaskItem,
2974
- {
2975
- exemptSettlor: trustMember,
2976
- taskStatus: getTaskStatus2(
2977
- TaskTypes.TRUST_MEMBER_INDIVIDUAL,
2978
- String(trustMember.legalEntityId)
2979
- ),
2980
- onEdit: () => navigateToEditTrustMember(trustMember),
2981
- onDelete: () => deleteTrustMember(trustMember)
2982
- },
2983
- trustMember.legalEntityId
2984
- );
2985
- case "undefinedBeneficiary":
2986
- return /* @__PURE__ */ jsx(
2987
- UndefinedBeneficiaryTaskItem,
2988
- {
2989
- undefinedBeneficiary: trustMember,
2990
- onEdit: () => navigateToEditTrustMember(trustMember),
2991
- onDelete: () => deleteTrustMember(trustMember)
2992
- },
2993
- trustMember.reference
2994
- );
2995
- }
2996
- }) }),
2997
- /* @__PURE__ */ jsx(
2998
- Button,
2999
- {
3000
- variant: "secondary",
3001
- icon: "plus",
3002
- onClick: (e) => {
3003
- e.stopPropagation();
3004
- navigateToEditTrustMember("new");
3005
- },
3006
- children: i18n.get("addTrustMember")
3007
- }
3008
- ),
3009
- /* @__PURE__ */ jsx(
3010
- ActionBar,
3011
- {
3012
- onHome: navigateBackToTaskList,
3013
- homeButtonLabel: i18n.get("saveAndGoToOverview")
3014
- }
3015
- )
3016
- ] })
3017
- }
3018
- );
3019
- };
3020
- const createDefaultMember = (selectedMember, selectedEntityType, selectedRoles) => {
3021
- const firstRole = selectedRoles?.[0];
3022
- return {
3023
- memberType: selectedMember?.memberType || firstRole,
3024
- roles: selectedRoles || selectedMember?.roles || [UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER],
3025
- legalEntityType: selectedEntityType,
3026
- legalEntityId: selectedMember?.legalEntityId || "",
3027
- name: selectedMember?.name || ""
3028
- };
3029
- };
3030
- const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
3031
- const [activeMember, setActiveMember] = useState();
3032
- const { rootLegalEntityId } = useApiContext();
3033
- const onNavigateToMember = async ({
3034
- selectedMember,
3035
- selectedRoles,
3036
- selectedEntityType,
3037
- roleAndType
3038
- }) => {
3039
- const createdMember = createDefaultMember(selectedMember, selectedEntityType, selectedRoles);
3040
- setActiveMember(createdMember);
3041
- if (rootLegalEntityId.value === createdMember?.legalEntityId) {
3042
- navigateTo(
3043
- createdMember.legalEntityType === LegalEntityTypes.INDIVIDUAL ? TaskTypes.INDIVIDUAL : TaskTypes.BUSINESS_DETAILS
3044
- );
3045
- return;
3046
- }
3047
- if (roleAndType) {
3048
- navigateTo(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE);
3049
- return;
3050
- }
3051
- navigateTo(
3052
- createdMember?.legalEntityType === LegalEntityTypes.ORGANIZATION ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL
3053
- );
3054
- };
3055
- return {
3056
- onNavigateToMember,
3057
- activeMember,
3058
- setActiveMember
3059
- };
3060
- };
3061
- const adyenKycRoleAndTypeContainer = "adyen-kyc-adyen-kyc-role-and-type-container";
3062
- const adyenKycRoleAndTypeActionBar = "adyen-kyc-adyen-kyc-role-and-type-action-bar";
3063
- const inlineRadioGroup = "adyen-kyc-inline-radio-group";
3064
- const styles$1 = {
3065
- adyenKycRoleAndTypeContainer,
3066
- adyenKycRoleAndTypeActionBar,
3067
- inlineRadioGroup
3068
- };
3069
- const UnincorporatedPartnershipRadioGroup = ({
3070
- memberType,
3071
- errorMessage,
3072
- handleChangeFor,
3073
- value
3074
- }) => {
3075
- const { i18n } = useI18nContext();
3076
- return /* @__PURE__ */ jsx(
3077
- Field,
3078
- {
3079
- el: "fieldset",
3080
- name: memberType,
3081
- label: i18n.get(
3082
- memberType === UnincorporatedPartnershipMemberTypes.OWNER ? "ownerDescriptionAsPartner" : "controllerDescriptionAsPartner"
3083
- ),
3084
- className: styles$1.inlineRadioGroup,
3085
- errorMessage,
3086
- children: (childProps) => /* @__PURE__ */ jsx(
3087
- RadioGroup,
3088
- {
3089
- ...childProps,
3090
- name: memberType,
3091
- items: [
3092
- { id: "yes", name: "yes" },
3093
- { id: "no", name: "no" }
3094
- ],
3095
- value,
3096
- onChange: (id) => handleChangeFor(memberType)(
3097
- id
3098
- ),
3099
- horizontal: true
3100
- }
3101
- )
3102
- }
3103
- );
3104
- };
3105
- const unincorporatedPartnershipRoleAndTypeValidationRules = {
3106
- entityType: {
3107
- modes: ["blur"],
3108
- validate: (entityType) => !isEmpty(entityType),
3109
- errorMessage: "fieldIsRequired"
3110
- },
3111
- uboThroughControl: {
3112
- modes: ["blur"],
3113
- validate: (value) => !!value,
3114
- errorMessage: "fieldIsRequired"
3115
- },
3116
- uboThroughOwnership: {
3117
- modes: ["blur"],
3118
- validate: (value) => !!value,
3119
- errorMessage: "fieldIsRequired"
3120
- }
3121
- };
3122
- const regularForms = {
3123
- roleAndEntityType: {
3124
- formId: "roleAndEntityType",
3125
- formName: "roleAndEntityType",
3126
- fields: ["role", "entityType"]
3127
- },
3128
- memberDetails: {
3129
- formId: "memberDetails",
3130
- formName: "memberDetails"
3131
- }
3132
- };
3133
- const leTypeCardDetails = {
3134
- [LegalEntityTypes.INDIVIDUAL]: {
3135
- id: "individual",
3136
- name: "individualMember",
3137
- description: "partnerNotABusiness"
3138
- },
3139
- [LegalEntityTypes.ORGANIZATION]: {
3140
- id: "organization",
3141
- name: "companyMember",
3142
- description: "partnerIsABusiness"
3143
- }
3144
- };
3145
- function getUboStatus(roles, roleType, existingMember) {
3146
- if (!existingMember) {
3147
- return void 0;
3148
- }
3149
- return roles?.includes(roleType) ? "yes" : "no";
3150
- }
3151
- function UnincorporatedPartnershipRoleAndTypeDropin({
3152
- onNavigateToMember,
3153
- activeMember
3154
- }) {
3155
- const { t } = useTranslation(["common", "unincorpPartnership"]);
3156
- const [shouldValidate, setShouldValidate] = useState(false);
3157
- const activeForm = regularForms.roleAndEntityType;
3158
- const formUtils = createFormUtils(
3159
- {},
3160
- t
3161
- );
3162
- const formsWithValidity = Object.values(regularForms).map((form) => ({
3163
- formId: form.formId,
3164
- formName: form.formName,
3165
- isValid: false
3166
- }));
3167
- const existingMember = activeMember?.legalEntityId;
3168
- const defaultData = {
3169
- entityType: activeMember?.legalEntityType,
3170
- uboThroughControl: getUboStatus(
3171
- activeMember?.roles,
3172
- UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON,
3173
- existingMember
3174
- ),
3175
- uboThroughOwnership: getUboStatus(
3176
- activeMember?.roles,
3177
- UnincorporatedPartnershipMemberTypes.OWNER,
3178
- existingMember
3179
- )
3180
- };
3181
- const decideFields = (data2) => {
3182
- if (data2.entityType === LegalEntityTypes.INDIVIDUAL) {
3183
- return ["entityType", "uboThroughControl", "uboThroughOwnership"];
3184
- }
3185
- return ["entityType"];
3186
- };
3187
- const { data, schema, errors, fieldProblems, handleChangeFor } = useForm({
3188
- schema: decideFields,
3189
- rules: unincorporatedPartnershipRoleAndTypeValidationRules,
3190
- defaultData,
3191
- shouldValidate
3192
- });
3193
- const onNextClick = () => {
3194
- if (Object.values(data).some((fieldValue) => !fieldValue) && data.entityType !== LegalEntityTypes.ORGANIZATION) {
3195
- setShouldValidate(true);
3196
- return;
3197
- }
3198
- const selectedRoles = [
3199
- UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER
3200
- ];
3201
- if (data.entityType === LegalEntityTypes.INDIVIDUAL) {
3202
- if (data.uboThroughControl === "yes") {
3203
- selectedRoles.push(UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON);
3204
- }
3205
- if (data.uboThroughOwnership === "yes") {
3206
- selectedRoles.push(UnincorporatedPartnershipMemberTypes.OWNER);
3207
- }
3208
- }
3209
- onNavigateToMember({
3210
- selectedMember: activeMember,
3211
- selectedRoles,
3212
- selectedEntityType: data.entityType
3213
- });
3214
- };
3215
- return /* @__PURE__ */ jsxs("div", { className: styles$1.adyenKycRoleAndTypeContainer, children: [
3216
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropin__sidebar-wrapper", children: /* @__PURE__ */ jsx(
3217
- FormNavigation,
3218
- {
3219
- forms: formsWithValidity,
3220
- activeForm: formsWithValidity.find((form) => form.formId === activeForm.formId) || formsWithValidity?.[0],
3221
- taskName: "unincorporatedPartnershipMembers",
3222
- gotoForm: () => {
3223
- }
3224
- }
3225
- ) }),
3226
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-container", children: [
3227
- /* @__PURE__ */ jsx(
3228
- "div",
3229
- {
3230
- className: "adyen-kyc-form-wrapper",
3231
- children: /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-trust__role-and-entity-type adyen-kyc-u-width-full", children: [
3232
- /* @__PURE__ */ jsx(
3233
- FormHeader,
3234
- {
3235
- heading: t(($) => $["roleAndEntityType"]),
3236
- description: t(($) => $["partnerRoleDescription"], { ns: "unincorpPartnership" })
3237
- }
3238
- ),
3239
- /* @__PURE__ */ jsx(
3240
- Field,
3241
- {
3242
- el: "fieldset",
3243
- name: "entityType",
3244
- label: formUtils.getLabel("entityType", "whatTypeOfEntityIsPartner"),
3245
- errorMessage: formUtils.getErrorMessage("entityType", errors, fieldProblems),
3246
- children: (childProps) => /* @__PURE__ */ jsx(
3247
- RadioGroupCard,
3248
- {
3249
- ...childProps,
3250
- name: "entityType",
3251
- options: trustMemberLegalEntityTypes,
3252
- selected: data?.entityType,
3253
- onSelect: (option) => handleChangeFor("entityType")(option),
3254
- optionId: (option) => leTypeCardDetails[option].id,
3255
- optionName: (option) => leTypeCardDetails[option].name,
3256
- optionDescription: (option) => leTypeCardDetails[option].description,
3257
- "aria-required": true
3258
- }
3259
- )
3260
- }
3261
- ),
3262
- schema.includes("uboThroughOwnership") && /* @__PURE__ */ jsx(
3263
- UnincorporatedPartnershipRadioGroup,
3264
- {
3265
- memberType: UnincorporatedPartnershipMemberTypes.OWNER,
3266
- handleChangeFor,
3267
- errorMessage: formUtils.getErrorMessage(
3268
- UnincorporatedPartnershipMemberTypes.OWNER,
3269
- errors,
3270
- fieldProblems
3271
- ),
3272
- value: data?.uboThroughOwnership
3273
- }
3274
- ),
3275
- schema.includes("uboThroughControl") && /* @__PURE__ */ jsx(
3276
- UnincorporatedPartnershipRadioGroup,
3277
- {
3278
- memberType: UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON,
3279
- handleChangeFor,
3280
- errorMessage: formUtils.getErrorMessage(
3281
- UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON,
3282
- errors,
3283
- fieldProblems
3284
- ),
3285
- value: data?.uboThroughControl
3286
- }
3287
- )
3288
- ] })
3289
- }
3290
- ),
3291
- /* @__PURE__ */ jsx("div", { className: styles$1.adyenKycRoleAndTypeActionBar, children: /* @__PURE__ */ jsx(Button, { onClick: onNextClick, children: t(($) => $["continue"]) }) })
3292
- ] })
3293
- ] });
3294
- }
3295
- function UnincorporatedPartnershipMemberRoleAndTypePage({
3296
- memberId,
3297
- onNavigateToMember,
3298
- navigateBack
3299
- }) {
3300
- const { i18n } = useTranslation();
3301
- const { data: memberLe } = useLegalEntity(memberId || skipToken);
3302
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
3303
- addResourceBundles(i18n, i18n.language, [
3304
- {
3305
- ns: "unincorpPartnership",
3306
- importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../language/da-DK.json": () => import("./da-DK-BTpZzEgA.js"), "../language/de-DE.json": () => import("./de-DE-DjOUNvp6.js"), "../language/en-US.json": () => import("./en-US-BTYdAWXp.js"), "../language/es-ES.json": () => import("./es-ES-Cj7q7fWO.js"), "../language/fi-FI.json": () => import("./fi-FI-BNcnKrJ9.js"), "../language/fr-FR.json": () => import("./fr-FR-Bn3D6mmY.js"), "../language/it-IT.json": () => import("./it-IT-DvM-9LpM.js"), "../language/nl-NL.json": () => import("./nl-NL-BHqiO21q.js"), "../language/no-NO.json": () => import("./no-NO-CKT9kLAH.js"), "../language/pt-PT.json": () => import("./pt-PT-D2elvnDU.js"), "../language/sl-SI.json": () => import("./sl-SI-BylvpF-X.js"), "../language/sv-SE.json": () => import("./sv-SE-Dwz1yTrB.js") }), `../language/${i18n.language}.json`, 3)
3307
- }
3308
- ]);
3309
- if (memberId && !memberLe) {
3310
- return /* @__PURE__ */ jsx(Loader, {});
3311
- }
3312
- const unincorporatedPartnershipMember = memberId ? unincorporatedPartnershipMembers.find((tm) => tm.legalEntityId === memberId) : void 0;
3313
- return /* @__PURE__ */ jsx(
3314
- UnincorporatedPartnershipRoleAndTypeDropin,
3315
- {
3316
- activeMember: unincorporatedPartnershipMember,
3317
- onNavigateToMember,
3318
- navigateBack
3319
- }
3320
- );
3321
- }
3322
- const alertHeader = "adyen-kyc-alert-header";
3323
- const styles = {
3324
- alertHeader
3325
- };
3326
- const isPrimaryPartner = (member) => member?.roles?.includes("primaryPartner");
3327
- const isMemberMissingOwner = (member) => {
3328
- return !isPrimaryPartner(member) && member.legalEntityType === LegalEntityTypes.ORGANIZATION && !member.ownerId;
3329
- };
3330
- const UnincorporatedPartnershipMembersOverview = ({
3331
- navigateBackToTaskList,
3332
- navigateToEditMember,
3333
- navigateToEditMemberOwner
3334
- }) => {
3335
- const { i18n } = useI18nContext();
3336
- const { i18n: i18next } = useTranslation();
3337
- const { data: rootLe } = useLegalEntity(ROOT_LE);
3338
- const { data: partnershipLe, refetch: refetchPartnership } = useAssociatedLegalEntity(
3339
- rootLe,
3340
- LegalEntityTypes.UNINCORPORATED_PARTNERSHIP
3341
- );
3342
- const partnershipMembers = useUnincorporatedPartnershipMembers();
3343
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
3344
- const { setUnincorporatedPartnershipMembers } = useGlobalStore();
3345
- addResourceBundles(i18next, i18next.language, [
3346
- {
3347
- ns: "unincorpPartnership",
3348
- importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../language/da-DK.json": () => import("./da-DK-BTpZzEgA.js"), "../../language/de-DE.json": () => import("./de-DE-DjOUNvp6.js"), "../../language/en-US.json": () => import("./en-US-BTYdAWXp.js"), "../../language/es-ES.json": () => import("./es-ES-Cj7q7fWO.js"), "../../language/fi-FI.json": () => import("./fi-FI-BNcnKrJ9.js"), "../../language/fr-FR.json": () => import("./fr-FR-Bn3D6mmY.js"), "../../language/it-IT.json": () => import("./it-IT-DvM-9LpM.js"), "../../language/nl-NL.json": () => import("./nl-NL-BHqiO21q.js"), "../../language/no-NO.json": () => import("./no-NO-CKT9kLAH.js"), "../../language/pt-PT.json": () => import("./pt-PT-D2elvnDU.js"), "../../language/sl-SI.json": () => import("./sl-SI-BylvpF-X.js"), "../../language/sv-SE.json": () => import("./sv-SE-Dwz1yTrB.js") }), `../../language/${i18next.language}.json`, 4)
3349
- }
3350
- ]);
3351
- useEffect(
3352
- () => setUnincorporatedPartnershipMembers(partnershipMembers),
3353
- [partnershipMembers, setUnincorporatedPartnershipMembers]
3354
- );
3355
- const getTaskStatus2 = useGetTaskStatus();
3356
- if (!rootLe || !partnershipLe) {
3357
- return /* @__PURE__ */ jsx(Loader, { size: "large" });
3358
- }
3359
- const deleteMember = async (member) => {
3360
- try {
3361
- await deleteUnincorporatedPartnershipMember({
3362
- associatedMember: member,
3363
- unincorporatedPartnership: partnershipLe,
3364
- updateLegalEntity
3365
- });
3366
- await refetchPartnership();
3367
- } catch (error) {
3368
- console.error(error);
3369
- }
3370
- };
3371
- const getActions = (member) => {
3372
- const baseActions = [
3373
- {
3374
- icon: "edit",
3375
- onSelect: () => navigateToEditMember(member),
3376
- label: i18n.get("editTrustMember", {
3377
- values: { trustMember: member.name }
3378
- })
3379
- }
3380
- ];
3381
- if (member.legalEntityType === LegalEntityTypes.ORGANIZATION && !isPrimaryPartner(member)) {
3382
- const missingOwner = isMemberMissingOwner(member);
3383
- baseActions.push({
3384
- icon: missingOwner ? "plus" : "edit",
3385
- onSelect: () => navigateToEditMemberOwner(member?.ownerId, member?.legalEntityId),
3386
- label: i18n.get(missingOwner ? "addOwnerToTrustMember" : "editOwnerOfTrustMember", {
3387
- values: { trustMember: member.name }
3388
- })
3389
- });
3390
- }
3391
- if (!isPrimaryPartner(member)) {
3392
- baseActions.push({
3393
- icon: "bin",
3394
- onSelect: () => deleteMember(member),
3395
- label: i18n.get("removeTrustMember", {
3396
- values: { trustMember: member.name }
3397
- })
3398
- });
3399
- }
3400
- return baseActions;
3401
- };
3402
- const infoContent = (member) => /* @__PURE__ */ jsx(
3403
- Alert,
3404
- {
3405
- className: styles.alertHeader,
3406
- title: /* @__PURE__ */ jsxs(Fragment, { children: [
3407
- i18n.get("helpUsVerifyCompany"),
3408
- " ",
3409
- /* @__PURE__ */ jsx(
3410
- Button,
3411
- {
3412
- onClick: (e) => {
3413
- e.preventDefault();
3414
- e.stopPropagation();
3415
- navigateToEditMemberOwner(member?.ownerId, member?.legalEntityId);
3416
- },
3417
- variant: "link",
3418
- children: i18n.get("providePersonalDetailsOfOwner")
3419
- }
3420
- )
3421
- ] })
3422
- }
3423
- );
3424
- return /* @__PURE__ */ jsx(
3425
- DropinLayout,
3426
- {
3427
- content: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-width-full", children: [
3428
- /* @__PURE__ */ jsx(
3429
- FormHeader,
3430
- {
3431
- heading: i18n.get("partnershipMembers"),
3432
- description: i18n.get("partnershipMembersDescription")
3433
- }
3434
- ),
3435
- /* @__PURE__ */ jsxs(CardGroup, { children: [
3436
- partnershipMembers.map((member) => {
3437
- return /* @__PURE__ */ jsx(
3438
- EntityAssociation,
3439
- {
3440
- types: member.roles,
3441
- name: member.name,
3442
- status: getTaskStatus2(
3443
- member.legalEntityType === LegalEntityTypes.INDIVIDUAL ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY,
3444
- member.legalEntityId
3445
- ),
3446
- actions: getActions(member),
3447
- onNavigateToEntity: () => navigateToEditMember(member),
3448
- infoContent: isMemberMissingOwner(member) ? infoContent(member) : void 0
3449
- },
3450
- member.legalEntityId
3451
- );
3452
- }),
3453
- /* @__PURE__ */ jsx(
3454
- Button,
3455
- {
3456
- variant: "secondary",
3457
- icon: "plus",
3458
- onClick: () => navigateToEditMember(void 0),
3459
- fullWidth: true,
3460
- children: i18n.get("addPartner")
3461
- }
3462
- )
3463
- ] }),
3464
- /* @__PURE__ */ jsx(
3465
- ActionBar,
3466
- {
3467
- onHome: navigateBackToTaskList,
3468
- homeButtonLabel: i18n.get("saveAndGoToOverview")
3469
- }
3470
- )
3471
- ] })
3472
- }
3473
- );
3474
- };
3475
- const useShouldShowIntroduction = ({
3476
- legalEntity
3477
- }) => {
3478
- const canSeeIntroduction = useCanSeeIntroduction({ legalEntity });
3479
- const { hasSeenIntroduction } = useHasSeenIntroduction({ legalEntityId: legalEntity.id });
3480
- return canSeeIntroduction && !hasSeenIntroduction;
3481
- };
3482
- const useNavigation = ({ legalEntity, onNavigate }) => {
3483
- const { isSettingEnabled } = useSettingsContext();
3484
- const userEvents = useAnalyticsContext();
3485
- const showServiceAgreementsFirst = isSettingEnabled(SettingNames.ShowServiceAgreementsFirst);
3486
- const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
3487
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
3488
- const showIntroduction = useShouldShowIntroduction({ legalEntity });
3489
- const { hasSeenSingpassSelection } = useHasSeenSingpassSelection({
3490
- legalEntityId: legalEntity.id
3491
- });
3492
- const { accountHolder } = useAccountHolder();
3493
- const { canSeeEntitySelection } = useCanSeeEntitySelection(legalEntity.id);
3494
- const { isEligibleForSingpass } = useSingpassMyInfoLogin({
3495
- legalEntity,
3496
- accountHolder
3497
- });
3498
- const shouldShowSingpassSelection = isEligibleForSingpass && !hasSeenSingpassSelection;
3499
- const [taskHistory, setTaskHistory] = useState(["default"]);
3500
- const actualTasks = taskHistory.filter((task) => task !== "default");
3501
- const handleNavigation = useCallback(
3502
- (task) => {
3503
- userEvents.updateBaseTrackingPayload({ task });
3504
- onNavigate?.(task);
3505
- },
3506
- [onNavigate]
3507
- );
3508
- const navigateTo = useCallback(
3509
- (task, deletePreviousHistory = false) => {
3510
- const pushNewTask = () => setTaskHistory((taskHistory2) => deletePreviousHistory ? [task] : [...taskHistory2, task]);
3511
- if (task === "default") {
3512
- setTimeout(pushNewTask);
3513
- } else {
3514
- pushNewTask();
3515
- handleNavigation(task);
3516
- }
3517
- },
3518
- [handleNavigation]
3519
- );
3520
- const navigateBack = useCallback(
3521
- (stepCount = 1) => {
3522
- if (taskHistory.length <= 1) return;
3523
- const prevTask = taskHistory[taskHistory.length - (stepCount + 1)];
3524
- if (prevTask === "default") {
3525
- throw Error("Cannot navigate back to 'default' task");
3526
- }
3527
- if (prevTask === TaskTypes.TASKS_OVERVIEW) {
3528
- setTaskHistory([TaskTypes.TASKS_OVERVIEW]);
3529
- handleNavigation?.(TaskTypes.TASKS_OVERVIEW);
3530
- return;
3531
- }
3532
- setTaskHistory(taskHistory.slice(0, -1 * stepCount));
3533
- handleNavigation?.(prevTask);
3534
- userEvents.updateBaseTrackingPayload({ task: prevTask });
3535
- },
3536
- [taskHistory, handleNavigation]
3537
- );
3538
- useEffect(() => {
3539
- if (!window.history.state) window.history.pushState({}, "");
3540
- const handleBrowserBackButton = () => {
3541
- if (window.history.state === null) window.history.pushState({}, "");
3542
- navigateTo(TaskTypes.TASKS_OVERVIEW);
3543
- };
3544
- window.addEventListener("popstate", handleBrowserBackButton);
3545
- return () => {
3546
- window.removeEventListener("popstate", handleBrowserBackButton);
3547
- };
3548
- }, [navigateTo]);
3549
- useEffect(() => {
3550
- const pushedTask = taskHistory[taskHistory.length - 1];
3551
- if (pushedTask === "default") {
3552
- const defaultTask = getDefaultTask({
3553
- legalEntity,
3554
- canSeeEntitySelection,
3555
- showIntroduction,
3556
- canChangeEntityType,
3557
- shouldShowSingpassSelection,
3558
- showServiceAgreementsFirst,
3559
- showBusinessFinancingFirst
3560
- });
3561
- setTaskHistory([...taskHistory.slice(0, taskHistory.length - 1), defaultTask]);
3562
- }
3563
- }, [
3564
- legalEntity,
3565
- accountHolder,
3566
- showIntroduction,
3567
- canChangeEntityType,
3568
- shouldShowSingpassSelection,
3569
- showServiceAgreementsFirst,
3570
- taskHistory,
3571
- showBusinessFinancingFirst
3572
- ]);
3573
- return {
3574
- currentTask: actualTasks[actualTasks.length - 1],
3575
- previousTask: actualTasks[actualTasks.length - 2],
3576
- navigateBack,
3577
- navigateTo
3578
- };
3579
- };
3580
- const getDefaultTask = ({
3581
- legalEntity,
3582
- canSeeEntitySelection,
3583
- canChangeEntityType,
3584
- showIntroduction,
3585
- shouldShowSingpassSelection,
3586
- showServiceAgreementsFirst,
3587
- showBusinessFinancingFirst
3588
- }) => {
3589
- const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection(legalEntity);
3590
- if (showServiceAgreementsFirst) {
3591
- return TaskTypes.SERVICE_AGREEMENT;
3592
- }
3593
- if (showBusinessFinancingFirst) {
3594
- return TaskTypes.BUSINESS_FINANCING;
3595
- }
3596
- if (canChangeEntityType && canSeeEntitySelection && !hasLegalEntityProgressedBeyondEntitySelection)
3597
- return TaskTypes.BUSINESS_TYPE_SELECTION;
3598
- if (showIntroduction) return TaskTypes.INTRODUCTION;
3599
- if (shouldShowSingpassSelection) return TaskTypes.SINGPASS_SELECTION;
3600
- return TaskTypes.TASKS_OVERVIEW;
3601
- };
3602
- const hasProgressedBeyondEntitySelection = (legalEntity) => {
3603
- const hasOwnEntityAssocation = legalEntity.entityAssociations?.some(
3604
- (ea) => ea.associatorId === legalEntity.id
3605
- );
3606
- const hasOrganizationType = legalEntity.organization?.type;
3607
- return hasOwnEntityAssocation || !!hasOrganizationType;
3608
- };
3609
- const Introduction = lazy(
3610
- async () => (await import("./Introduction-BsKwELuc.js")).Introduction
3611
- );
3612
- const BusinessTypeSelectionPage = lazy(
3613
- async () => (await import("./BusinessTypeSelectionPage-ujY2jj6B.js")).BusinessTypeSelectionPage
3614
- );
3615
- const SingpassSelection = lazy(
3616
- async () => (await import("./SingpassSelection-ClMlwfoj.js")).SingpassSelection
3617
- );
3618
- const AccountSetupRejected = lazy(
3619
- async () => (await import("./AccountSetupRejected-2t22lJUo.js")).AccountSetupRejected
3620
- );
3621
- const DecisionMakers = lazy(
3622
- async () => (await import("./DecisionMakers-BDNa3HcC.js")).DecisionMakers
3623
- );
3624
- const CustomerSupport = lazy(
3625
- async () => (await import("./CustomerSupport-B8zC_huY.js")).CustomerSupport
3626
- );
3627
- const Review = lazy(async () => (await import("./Review-D7NEYFoT.js")).Review);
3628
- const SignPCIComponent = lazy(
3629
- async () => (await import("./SignPCIComponent-C0iYfSl6.js")).SignPCIComponent
3630
- );
3631
- const AcceptTermsOfService = lazy(
3632
- async () => (await import("./AcceptTermsOfServiceComponent-BF24NWVw.js")).AcceptTermsOfServiceComponent
3633
- );
3634
- const TaxReportingDropin = lazy(
3635
- async () => (await import("./TaxReportingDropin-CVbVkFhv.js")).TaxReportingDropin
3636
- );
3637
- const PayoutDetailsPage = lazy(
3638
- async () => (await import("./PayoutDetailsDropin-BJIqXmPn.js").then((n) => n.a)).PayoutDetailsPage
3639
- );
3640
- const RootBusinessDetailsPage = lazy(
3641
- async () => (await import("./RootBusinessDetailsPage-rCbGLBEv.js")).RootBusinessDetailsPage
3642
- );
3643
- const SoleProprietorshipPage = lazy(
3644
- async () => (await import("./SoleProprietorshipPage-JKNrAy74.js")).SoleProprietorshipPage
3645
- );
3646
- const TrustMemberCompanyPage = lazy(
3647
- async () => (await import("./TrustMemberCompanyPage-BOQ5D3y4.js")).TrustMemberCompanyPage
3648
- );
3649
- const UnincorporatedPartnershipMemberCompanyPage = lazy(
3650
- async () => (await import("./UnincorporatedPartnershipMemberCompanyPage-C-kGU5Sh.js")).UnincorporatedPartnershipMemberCompanyPage
3651
- );
3652
- const BusinessFinancingPage = lazy(
3653
- async () => (await import("./BusinessFinancingPage-BOG7yrw6.js")).BusinessFinancingPage
3654
- );
3655
- const TrustDetailsPage = lazy(
3656
- async () => (await import("./TrustDetailsPage-C791Wu5u.js")).TrustDetailsPage
3657
- );
3658
- const SourceOfFundsPage = lazy(
3659
- async () => (await import("./SourceOfFundsPage-D-pN33-9.js")).SourceOfFundsPage
3660
- );
3661
- const RootIndividualDetailsPage = lazy(
3662
- async () => (await import("./RootIndividualDetailsPage-B3TkB6Xj.js")).RootIndividualDetailsPage
3663
- );
3664
- const LegalRepresentativeDetailsPage = lazy(
3665
- async () => (await import("./LegalRepresentativeDetailsPage-DtMHe1Nq.js")).LegalRepresentativeDetailsPage
3666
- );
3667
- const TrustMemberIndividualPage = lazy(
3668
- async () => (await import("./TrustMemberIndividualPage-BPIXX2Mh.js")).TrustMemberIndividualPage
3669
- );
3670
- const UnincorporatedPartnershipIndividualPage = lazy(
3671
- async () => (await import("./UnincorporatedPartnershipIndividualPage-vzn0R02z.js")).UnincorporatedPartnershipIndividualPage
3672
- );
3673
- const DecisionMakerDetailsPage = lazy(
3674
- async () => (await import("./DecisionMakerDetailsPage-BJUwR4R7.js")).DecisionMakerDetailsPage
3675
- );
3676
- function isIn(values, x) {
3677
- return values.includes(x);
3678
- }
3679
- const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
3680
- const logger = createLogger();
3681
- function DropinComposer({
3682
- legalEntityResponse,
3683
- onSubmit,
3684
- onNavigate = noop,
3685
- openBankingPartnerConfigId
3686
- }) {
3687
- const { accountHolder, setAccountHolder } = useAccountHolder();
3688
- const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
3689
- const userEvents = useAnalyticsContext();
3690
- const { experiments } = useExperimentsContext();
3691
- const { setHasSeenSingpassSelection } = useHasSeenSingpassSelection({
3692
- legalEntityId: legalEntityResponse.id
3693
- });
3694
- const { setHasSeenIntroduction } = useHasSeenIntroduction({
3695
- legalEntityId: legalEntityResponse.id
3696
- });
3697
- const { currentTask, previousTask, navigateTo, navigateBack } = useNavigation({
3698
- legalEntity: legalEntityResponse,
3699
- onNavigate
3700
- });
3701
- const {
3702
- rootLegalEntity: rootLegalEntitySignal,
3703
- rootLegalEntityCountry: rootLegalEntityCountrySignal,
3704
- taskTypes: taskTypesSignal,
3705
- setRootLegalEntity,
3706
- setTaskTypes,
3707
- setAccountHolder: setAccountHolderInGlobalStore
3708
- } = useGlobalStore();
3709
- const rootLegalEntity = rootLegalEntitySignal.value;
3710
- const rootLegalEntityCountry = rootLegalEntityCountrySignal.value;
3711
- const taskTypes = taskTypesSignal.value;
3712
- const { data: rawTaskTypes, isLoading: isLoadingConfiguration } = useTaskTypes();
3713
- useEffect(() => {
3714
- if (rawTaskTypes) setTaskTypes(rawTaskTypes);
3715
- }, [rawTaskTypes, setTaskTypes]);
3716
- const { data: legalEntityData, refetch: refetchLegalEntity } = useLegalEntity(
3717
- legalEntityResponse.id,
3718
- {
3719
- refetchInterval: (query) => {
3720
- const legalEntityData2 = query.state.data;
3721
- if (legalEntityData2) {
3722
- return !currentTask || !isIn(PAGES_WITH_POLLING, currentTask) || hasAllCapabilitiesResolved(legalEntityData2) || hasRejectedCapabilities(legalEntityData2) ? false : 3e3;
3723
- }
3724
- return 3e3;
3725
- }
3726
- }
3727
- );
3728
- useEffect(() => {
3729
- if (legalEntityData && !objectsDeepEqual(legalEntityData, rootLegalEntity)) {
3730
- setRootLegalEntity(legalEntityData);
3731
- }
3732
- }, [legalEntityData]);
3733
- const [currentTransferInstrumentId, setCurrentTransferInstrumentId] = useState();
3734
- const {
3735
- isEligibleForSingpass,
3736
- state: singpassLoginState,
3737
- handleInitiateSingpassMyInfoLogin,
3738
- handleSingpassMyInfoLoginSuccess,
3739
- handleSingpassMyInfoLoginFailure,
3740
- handleSingpassMyInfoLoginReset,
3741
- trustedFields: singpassTrustedFields,
3742
- trustedEntityAssociations
3743
- } = useSingpassMyInfoLogin({
3744
- legalEntity: rootLegalEntity,
3745
- accountHolder
3746
- });
3747
- const singpassTabRef = useRef(null);
3748
- const { data: trust, refetch: refetchTrust } = useAssociatedLegalEntity(
3749
- rootLegalEntity,
3750
- LegalEntityTypes.TRUST
3751
- );
3752
- const { data: unincorporatedPartnership, refetch: refetchUnincorporatedPartnership } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.UNINCORPORATED_PARTNERSHIP);
3753
- const { data: soleProp } = useAssociatedLegalEntity(
3754
- rootLegalEntity,
3755
- LegalEntityTypes.SOLE_PROPRIETORSHIP
3756
- );
3757
- const [parentId, setParentId] = useState();
3758
- const [currentDecisionMakerId, setCurrentDecisionMakerId] = useState();
3759
- const { data: currentDecisionMaker } = useLegalEntity(currentDecisionMakerId ?? skipToken);
3760
- const associatedLegalRepresentative = useAssociatedLegalRepresentative(rootLegalEntity);
3761
- const [targetLegalEntityType, setTargetLegalEntityType] = useState();
3762
- const {
3763
- trustMember,
3764
- currentTrustMemberLe,
3765
- onNavigateToTrust,
3766
- onNavigateToTrustMemberRoleAndType,
3767
- onNavigateToTrustMemberEditDetails
3768
- } = useTrustMemberNavigation({
3769
- trust,
3770
- navigateTo
3771
- });
3772
- const {
3773
- onNavigateToMember,
3774
- activeMember: unincorporatedPartnershipMember,
3775
- setActiveMember
3776
- } = useUnincorporatedPartnershipNavigation({
3777
- navigateTo
3778
- });
3779
- const handleSingpassSelectionNextClick = async (method) => {
3780
- if (method === "singpass") {
3781
- try {
3782
- const authUrl = await handleInitiateSingpassMyInfoLogin();
3783
- if (!authUrl) {
3784
- throw new Error("OpenId authentication url not");
3785
- }
3786
- setHasSeenSingpassSelection(true);
3787
- singpassTabRef.current = window.open(authUrl, "_blank");
3788
- singpassTabRef.current?.focus();
3789
- } catch (e) {
3790
- logger.error(e);
3791
- if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
3792
- }
3793
- }
3794
- if (method === "manual") {
3795
- setHasSeenSingpassSelection(true);
3796
- }
3797
- navigateTo(TaskTypes.TASKS_OVERVIEW);
3798
- };
3799
- const onNavigateToDecisionMakerIndividual = async (task, id, parentId2) => {
3800
- setParentId(parentId2 ?? rootLegalEntity.id);
3801
- setCurrentDecisionMakerId(id);
3802
- navigateTo(task);
3803
- };
3804
- const onNavigateToPayinOrPayout = async (id, task = TaskTypes.PAYOUT) => {
3805
- if (id) {
3806
- try {
3807
- setCurrentTransferInstrumentId(id);
3808
- } finally {
3809
- navigateTo(task);
3810
- }
3811
- } else {
3812
- setCurrentTransferInstrumentId(void 0);
3813
- navigateTo(task);
3814
- }
3815
- };
3816
- const onNavigateToTask = async (task, id) => {
3817
- switch (task) {
3818
- case TaskTypes.PAYOUT:
3819
- await onNavigateToPayinOrPayout(id, TaskTypes.PAYOUT);
3820
- break;
3821
- case TaskTypes.PAYIN:
3822
- await onNavigateToPayinOrPayout(id, TaskTypes.PAYIN);
3823
- break;
3824
- case TaskTypes.TRUST: {
3825
- await onNavigateToTrust();
3826
- break;
3827
- }
3828
- case TaskTypes.TRUST_MEMBER_OVERVIEW: {
3829
- await onNavigateToTrust(TaskTypes.TRUST_MEMBER_OVERVIEW);
3830
- break;
3831
- }
3832
- case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
3833
- await navigateTo(TaskTypes.SOLE_PROPRIETOR_COMPANY);
3834
- break;
3835
- }
3836
- default:
3837
- navigateTo(task);
3838
- }
3839
- };
3840
- const handleOnSubmit = async (data, backStepCount) => {
3841
- onSubmit?.(data);
3842
- await refetchLegalEntity();
3843
- navigateBack(backStepCount);
3844
- };
3845
- useEffect(() => {
3846
- userEvents.addJourneyEvent("Landed on page", { actionType: "start" });
3847
- }, []);
3848
- useEffect(() => {
3849
- userEvents.updateBaseTrackingPayload({ task: currentTask });
3850
- }, [currentTask]);
3851
- useEffect(() => {
3852
- if (hasRejectedCapabilities(rootLegalEntity)) {
3853
- navigateTo(TaskTypes.CAPABILITY_REJECTED, true);
3854
- }
3855
- }, [rootLegalEntity]);
3856
- useEffect(() => {
3857
- const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder);
3858
- if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
3859
- }, [accountHolder, rootLegalEntity]);
3860
- useEffect(() => setAccountHolderInGlobalStore(accountHolder), [accountHolder]);
3861
- const { rootLegalEntityId } = useApiContext();
3862
- rootLegalEntityId.value = rootLegalEntity.id;
3863
- useEffect(() => {
3864
- const enabledExperimentNames = Object.entries(experiments).filter(([key, value]) => key.includes("_") && value).map(([key]) => key);
3865
- if (!enabledExperimentNames.length) return;
3866
- enabledExperimentNames.forEach((experiment) => {
3867
- const [name, variant] = experiment.split("_");
3868
- userEvents.trackExperiment({ name, variant });
3869
- });
3870
- }, [experiments]);
3871
- const singpassBanner = isEligibleForSingpass ? /* @__PURE__ */ jsx(
3872
- SingpassBanner,
3873
- {
3874
- ...singpassLoginState,
3875
- onAlertClose: () => {
3876
- handleSingpassMyInfoLoginReset();
3877
- },
3878
- onClick: async () => {
3879
- try {
3880
- const authUrl = await handleInitiateSingpassMyInfoLogin();
3881
- singpassTabRef.current = window.open(authUrl);
3882
- singpassTabRef.current?.focus();
3883
- } catch (e) {
3884
- logger.error(e);
3885
- if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
3886
- }
3887
- },
3888
- onMessage: async ({ data: { isSuccessful } }) => {
3889
- if (isSuccessful) {
3890
- handleSingpassMyInfoLoginSuccess();
3891
- await refetchLegalEntity();
3892
- singpassTabRef.current?.close();
3893
- } else {
3894
- handleSingpassMyInfoLoginFailure(
3895
- legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL ? "weCouldntConnectToMyinfo" : "weCouldntConnectToMyinfoBusiness"
3896
- );
3897
- }
3898
- },
3899
- legalEntityType: legalEntityResponse?.type
3900
- }
3901
- ) : void 0;
3902
- if (isLoadingConfiguration) {
3903
- return /* @__PURE__ */ jsx(Skeleton, {});
3904
- }
3905
- switch (currentTask) {
3906
- case TaskTypes.BUSINESS_TYPE_SELECTION:
3907
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-display-flex adyen-kyc-u-justify-content-center", children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3908
- BusinessTypeSelectionPage,
3909
- {
3910
- onComplete: async (newAccountHolder) => {
3911
- setAccountHolder(newAccountHolder);
3912
- setCanSeeEntitySelection(false);
3913
- await refetchLegalEntity();
3914
- navigateTo("default");
3915
- },
3916
- onBack: previousTask ? navigateBack : void 0
3917
- }
3918
- ) }) });
3919
- case TaskTypes.SINGPASS_SELECTION:
3920
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3921
- SingpassSelection,
3922
- {
3923
- handleNextClick: handleSingpassSelectionNextClick,
3924
- accountHolder,
3925
- legalEntityType: rootLegalEntity.type
3926
- }
3927
- ) });
3928
- case TaskTypes.INTRODUCTION:
3929
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3930
- Introduction,
3931
- {
3932
- onExitIntroduction: () => {
3933
- setHasSeenIntroduction(true);
3934
- navigateTo("default");
3935
- },
3936
- tasks: taskTypes
3937
- }
3938
- ) });
3939
- case TaskTypes.CAPABILITY_REJECTED:
3940
- return /* @__PURE__ */ jsxs(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: [
3941
- /* @__PURE__ */ jsx(AccountSetupRejected, {}),
3942
- ";"
3943
- ] });
3944
- case TaskTypes.TASKS_OVERVIEW:
3945
- return /* @__PURE__ */ jsx(TaskList, { onNavigateToTask, singpassComponent: singpassBanner });
3946
- case TaskTypes.DECISION_MAKER_OVERVIEW:
3947
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3948
- DecisionMakers,
3949
- {
3950
- onNavigateToIndividual: (legalEntityId) => onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER, legalEntityId),
3951
- navigateBackToTaskList: navigateBack,
3952
- trustedEntityAssociations
3953
- }
3954
- ) });
3955
- case TaskTypes.INDIVIDUAL:
3956
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3957
- RootIndividualDetailsPage,
3958
- {
3959
- onSubmit: async (data) => {
3960
- onSubmit?.(data);
3961
- await refetchLegalEntity();
3962
- navigateTo(TaskTypes.TASKS_OVERVIEW);
3963
- setTargetLegalEntityType(void 0);
3964
- },
3965
- handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW),
3966
- isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.INDIVIDUAL,
3967
- trustedFields: singpassTrustedFields,
3968
- trustedFieldsProvider: isEligibleForSingpass ? TrustedFieldsProviders.SINGPASS : void 0
3969
- }
3970
- ) });
3971
- case TaskTypes.CUSTOMER_SUPPORT:
3972
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3973
- CustomerSupport,
3974
- {
3975
- country: rootLegalEntityCountry,
3976
- onSubmit: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
3977
- }
3978
- ) });
3979
- case TaskTypes.REVIEW:
3980
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(Review, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
3981
- case TaskTypes.DECISION_MAKER:
3982
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
3983
- DecisionMakerDetailsPage,
3984
- {
3985
- decisionMakerId: currentDecisionMaker?.id,
3986
- parentCompanyId: parentId,
3987
- onSubmit: async (data, scenario) => {
3988
- onSubmit?.(data);
3989
- await refetchLegalEntity();
3990
- if (isBafinSignatoryFlow({
3991
- taskType: TaskTypes.DECISION_MAKER,
3992
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3993
- // @ts-ignore basicDetails will be there when it's IndividualOnfidoSchema
3994
- data,
3995
- scenarios: scenario
3996
- })) {
3997
- showIdNowModal.value = true;
3998
- } else {
3999
- navigateBack();
4000
- }
4001
- },
4002
- handleHomeClick: navigateBack,
4003
- trustedFields: singpassTrustedFields,
4004
- trustedFieldsProvider: isEligibleForSingpass ? TrustedFieldsProviders.SINGPASS : void 0,
4005
- trustedRoles: trustedEntityAssociations.find((ea) => ea.reference === currentDecisionMaker?.id)?.types || []
4006
- }
4007
- ) });
4008
- case TaskTypes.TRUST_MEMBER_COMPANY_OWNER:
4009
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4010
- DecisionMakerDetailsPage,
4011
- {
4012
- taskType: TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
4013
- parentCompanyId: parentId,
4014
- decisionMakerId: currentDecisionMakerId,
4015
- onSubmit: async (data) => {
4016
- await handleOnSubmit(data);
4017
- await refetchTrust();
4018
- },
4019
- handleHomeClick: navigateBack
4020
- }
4021
- ) });
4022
- case TaskTypes.TRUST_MEMBER_INDIVIDUAL:
4023
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4024
- TrustMemberIndividualPage,
4025
- {
4026
- memberId: currentTrustMemberLe?.id,
4027
- trustId: trust.id,
4028
- newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
4029
- onSubmit: (data) => handleOnSubmit(data, 2),
4030
- handleBackClick: navigateBack,
4031
- handleHomeClick: () => navigateTo(TaskTypes.TRUST_MEMBER_OVERVIEW)
4032
- }
4033
- ) });
4034
- case TaskTypes.BUSINESS_DETAILS:
4035
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4036
- RootBusinessDetailsPage,
4037
- {
4038
- onSubmit: async (data) => {
4039
- onSubmit?.(data);
4040
- await refetchLegalEntity();
4041
- navigateTo(TaskTypes.TASKS_OVERVIEW);
4042
- setTargetLegalEntityType(void 0);
4043
- },
4044
- handleHomeClick: navigateBack,
4045
- isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
4046
- }
4047
- ) });
4048
- case TaskTypes.TRUST_MEMBER_COMPANY:
4049
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4050
- TrustMemberCompanyPage,
4051
- {
4052
- trustId: trust.id,
4053
- trustMemberCompanyId: currentTrustMemberLe?.id,
4054
- newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
4055
- onSubmit: (data) => handleOnSubmit(data, 2),
4056
- handleHomeClick: navigateBack,
4057
- isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
4058
- }
4059
- ) });
4060
- case TaskTypes.PAYOUT:
4061
- case TaskTypes.PAYIN:
4062
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4063
- PayoutDetailsPage,
4064
- {
4065
- taskType: currentTask,
4066
- transferInstrumentId: currentTransferInstrumentId,
4067
- setTransferInstrumentId: setCurrentTransferInstrumentId,
4068
- handleHomeClick: navigateBack,
4069
- openBankingPartnerConfigId,
4070
- onSubmit: handleOnSubmit
4071
- }
4072
- ) });
4073
- case TaskTypes.TRUST:
4074
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4075
- TrustDetailsPage,
4076
- {
4077
- taskType: TaskTypes.TRUST,
4078
- trustId: trust?.id,
4079
- onSubmit: (data) => handleOnSubmit(data, 1),
4080
- handleHomeClick: navigateBack
4081
- }
4082
- ) });
4083
- case TaskTypes.TRUST_MEMBER_OVERVIEW:
4084
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4085
- TrustMembersOverview,
4086
- {
4087
- navigateBackToTaskList: navigateBack,
4088
- navigateToEditTrustMember: onNavigateToTrustMemberRoleAndType,
4089
- navigateToEditTrustMemberOwner: (trustMemberOwnerId, trustMemberId) => onNavigateToDecisionMakerIndividual(
4090
- TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
4091
- trustMemberOwnerId,
4092
- trustMemberId
4093
- )
4094
- }
4095
- ) });
4096
- case TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE:
4097
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4098
- TrustMemberRoleAndTypePage,
4099
- {
4100
- trustId: trust.id,
4101
- memberId: currentTrustMemberLe?.id,
4102
- navigateToFullDropinFor: onNavigateToTrustMemberEditDetails,
4103
- navigateBack: async () => {
4104
- await refetchTrust();
4105
- navigateBack();
4106
- }
4107
- }
4108
- ) });
4109
- case TaskTypes.UNINCORPORATED_PARTNERSHIP:
4110
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4111
- TrustDetailsPage,
4112
- {
4113
- taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP,
4114
- trustId: unincorporatedPartnership?.id,
4115
- onSubmit: (data) => handleOnSubmit(data, 1),
4116
- handleHomeClick: navigateBack
4117
- }
4118
- ) });
4119
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW:
4120
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4121
- UnincorporatedPartnershipMembersOverview,
4122
- {
4123
- navigateBackToTaskList: navigateBack,
4124
- navigateToEditMember: (member) => onNavigateToMember({
4125
- selectedMember: member,
4126
- selectedEntityType: member?.legalEntityType,
4127
- selectedRoles: member?.roles,
4128
- roleAndType: true
4129
- }),
4130
- navigateToEditMemberOwner: (memberOwnerId, memberId) => {
4131
- setActiveMember({ legalEntityId: memberId });
4132
- onNavigateToDecisionMakerIndividual(
4133
- TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
4134
- memberOwnerId,
4135
- memberId
4136
- );
4137
- }
4138
- }
4139
- ) });
4140
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
4141
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4142
- UnincorporatedPartnershipMemberCompanyPage,
4143
- {
4144
- partnershipId: unincorporatedPartnership.id,
4145
- partnershipMemberCompanyId: unincorporatedPartnershipMember?.legalEntityId,
4146
- newMember: (
4147
- // empty string for legalEntityId means it's a new member
4148
- unincorporatedPartnershipMember?.legalEntityId === "" ? unincorporatedPartnershipMember : void 0
4149
- ),
4150
- onSubmit: (data) => handleOnSubmit(data, 2),
4151
- handleHomeClick: navigateBack,
4152
- isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
4153
- }
4154
- ) });
4155
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER:
4156
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4157
- DecisionMakerDetailsPage,
4158
- {
4159
- taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
4160
- parentCompanyId: unincorporatedPartnershipMember?.legalEntityId,
4161
- decisionMakerId: currentDecisionMakerId,
4162
- onSubmit: async (data) => {
4163
- await handleOnSubmit(data);
4164
- await refetchUnincorporatedPartnership();
4165
- },
4166
- handleHomeClick: navigateBack
4167
- }
4168
- ) });
4169
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL:
4170
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4171
- UnincorporatedPartnershipIndividualPage,
4172
- {
4173
- memberId: unincorporatedPartnershipMember?.legalEntityId,
4174
- partnershipId: unincorporatedPartnership.id,
4175
- member: unincorporatedPartnershipMember,
4176
- onSubmit: (data) => {
4177
- handleOnSubmit(data, 2);
4178
- refetchUnincorporatedPartnership();
4179
- },
4180
- handleBackClick: navigateBack,
4181
- handleHomeClick: () => navigateTo(TaskTypes.TRUST_MEMBER_OVERVIEW)
4182
- }
4183
- ) });
4184
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE:
4185
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4186
- UnincorporatedPartnershipMemberRoleAndTypePage,
4187
- {
4188
- memberId: unincorporatedPartnershipMember?.legalEntityId,
4189
- onNavigateToMember,
4190
- navigateBack: async () => {
4191
- await refetchUnincorporatedPartnership();
4192
- navigateBack();
4193
- }
4194
- }
4195
- ) });
4196
- case TaskTypes.PCI_DSS:
4197
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(SignPCIComponent, { onClose: navigateBack }) });
4198
- case TaskTypes.SOLE_PROPRIETOR_COMPANY:
4199
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4200
- SoleProprietorshipPage,
4201
- {
4202
- solePropId: soleProp?.id,
4203
- onSubmit: (data) => handleOnSubmit(data, 1),
4204
- handleHomeClick: navigateBack,
4205
- isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
4206
- }
4207
- ) });
4208
- case TaskTypes.SERVICE_AGREEMENT:
4209
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4210
- AcceptTermsOfService,
4211
- {
4212
- legalEntityId: rootLegalEntity.id,
4213
- onClose: navigateBack,
4214
- asEmbedded: false,
4215
- handleAddSigner: () => {
4216
- onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER);
4217
- }
4218
- }
4219
- ) });
4220
- case TaskTypes.LEGAL_REPRESENTATIVE_DETAILS:
4221
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4222
- LegalRepresentativeDetailsPage,
4223
- {
4224
- legalRepresentativeId: associatedLegalRepresentative?.id,
4225
- onSubmit: handleOnSubmit,
4226
- handleHomeClick: navigateBack
4227
- }
4228
- ) });
4229
- case TaskTypes.SOURCE_OF_FUNDS:
4230
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4231
- SourceOfFundsPage,
4232
- {
4233
- onSubmit: handleOnSubmit,
4234
- handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
4235
- }
4236
- ) });
4237
- case TaskTypes.BUSINESS_FINANCING:
4238
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
4239
- BusinessFinancingPage,
4240
- {
4241
- onSubmit: async (data) => {
4242
- onSubmit?.(data);
4243
- await refetchLegalEntity();
4244
- navigateTo(TaskTypes.TASKS_OVERVIEW);
4245
- },
4246
- handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
4247
- }
4248
- ) });
4249
- case TaskTypes.TAX_REPORTING:
4250
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(TaxReportingDropin, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
4251
- case TaskTypes.BUSINESS_LINES:
4252
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(RootBusinessLinesPage, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
4253
- default:
4254
- return null;
4255
- }
4256
- }
4257
- function OnboardingDropinComponent({
4258
- legalEntityId,
4259
- openBankingPartnerConfigId
4260
- }) {
4261
- if (!legalEntityId) {
4262
- throw new Error("Must provide at-least legalEntityId");
4263
- }
4264
- const { i18n } = useTranslation();
4265
- addResourceBundles(i18n, i18n.language, [
4266
- {
4267
- ns: "common",
4268
- importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../language/locales/da-DK.json": () => import("./da-DK-BJ7aTPir.js"), "../../../language/locales/de-DE.json": () => import("./de-DE-C78RLE2G.js"), "../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-Ddr7AO05.js"), "../../../language/locales/en-US.json": () => import("./StoreProvider-BlaJzXSZ.js").then((n) => n.bN), "../../../language/locales/es-ES.json": () => import("./es-ES-BtUSEzkE.js"), "../../../language/locales/fi-FI.json": () => import("./fi-FI-Cvar63RH.js"), "../../../language/locales/fr-FR.json": () => import("./fr-FR-B5543Fe-.js"), "../../../language/locales/it-IT.json": () => import("./it-IT-Dd6xGSe-.js"), "../../../language/locales/nl-NL.json": () => import("./nl-NL-DVENFpd5.js"), "../../../language/locales/no-NO.json": () => import("./no-NO-Dn2UkdoI.js"), "../../../language/locales/pt-PT.json": () => import("./pt-PT-_o5xgnxS.js"), "../../../language/locales/sv-SE.json": () => import("./sv-SE-BUfESAQK.js") }), `../../../language/locales/${i18n.language}.json`, 6)
4269
- },
4270
- { ns: "ui", importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../ui/language/da-DK.json": () => import("./da-DK-D4H69PX3.js"), "../../ui/language/de-DE.json": () => import("./de-DE-wp5-H-ov.js"), "../../ui/language/en-US.json": () => import("./en-US-CAm3meB1.js"), "../../ui/language/es-ES.json": () => import("./es-ES-Ds3-DtqZ.js"), "../../ui/language/fi-FI.json": () => import("./fi-FI-DPNeTsJS.js"), "../../ui/language/fr-FR.json": () => import("./fr-FR-ChmNQciP.js"), "../../ui/language/it-IT.json": () => import("./it-IT-eCrTB65E.js"), "../../ui/language/nl-NL.json": () => import("./nl-NL-D2QKudfh.js"), "../../ui/language/no-NO.json": () => import("./no-NO-C_snYWBc.js"), "../../ui/language/pt-PT.json": () => import("./pt-PT-C-hbNnsB.js"), "../../ui/language/sl-SI.json": () => import("./sl-SI-BhVTSmhQ.js"), "../../ui/language/sv-SE.json": () => import("./sv-SE-66rqYTxi.js") }), `../../ui/language/${i18n.language}.json`, 5) }
4271
- ]);
4272
- const { data: legalEntityData } = useLegalEntity(ROOT_LE);
4273
- return !legalEntityData ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
4274
- DropinComposer,
4275
- {
4276
- legalEntityResponse: legalEntityData,
4277
- openBankingPartnerConfigId
4278
- }
4279
- );
4280
- }
4281
- export {
4282
- CardGroup as C,
4283
- DropinLayout as D,
4284
- EntityGuidanceStatus as E,
4285
- LEGAL_COMPANY_NAME_FIELD as L,
4286
- OnboardingDropinComponent as O,
4287
- usePciStatus as a,
4288
- useCanSeeIntroduction as b,
4289
- useLegalEntityType as c,
4290
- allowIndividualWithoutSoleProp as d,
4291
- useDataMissingRemediations as e,
4292
- EntityAssociation as f,
4293
- defaultFieldMetadataV4 as g,
4294
- defaultFieldMetadata as h,
4295
- iconStatus as i,
4296
- defaultFieldConfigV4 as j,
4297
- defaultFieldConfig as k,
4298
- useTrustMembers as l,
4299
- normalizedTaskStatusStore as n,
4300
- useSalesChannelsSettings as u
4301
- };