@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,3694 +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] = "743cc952-87a2-4737-8336-8e437ec1e02e", e._sentryDebugIdIdentifier = "sentry-dbid-743cc952-87a2-4737-8336-8e437ec1e02e");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { useState, useEffect, useRef, useMemo, useCallback, useContext } from "preact/hooks";
12
- import { b as useApiContext, j as useQuery, k as httpPost, o as httpGet, aA as useMutation, aC as useQueryClient, N as createLogger, a8 as CountryCodes, a as useTranslation, c as useLegalEntity, R as ROOT_LE, y as LegalEntityTypes, L as Loader, J as EntityTypes, U as useAnalyticsContext, V as Icon, x as Typography, B as Button, u as useI18nContext, af as objectsDeepEqual, aG as doArraysMatch, a9 as isEmpty, bj as getSdkToken, G as hasOwnEntityAssociationOfType, m as useSettingsContext, bk as EEA_Countries, X as useExperimentsContext, bl as isAccountIdentifierObscured, bm as hasEmptyFields, bn as extractFieldName, bo as concatenateFieldNames, aD as keysOf, g as getLegalEntityCountry, am as getCapabilityProblems, M as TaskTypes, ay as cloneObject, q as skipToken } from "./StoreProvider-BlaJzXSZ.js";
13
- import { u as useTransferInstrument, m as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-CAoOlPMA.js";
14
- import { a as useForm, F as Field, c as Select, L as LoaderWrapper } from "./useForm-C1DW3mPC.js";
15
- import { E as ExperimentNames } from "./types-CAznNNSI.js";
16
- import { I as InputText, S as SettingNames } from "./InputText-BX5sG9WJ.js";
17
- import { u as useGlobalDataSlice, a as useGlobalData, b as useResetGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-jb7ua9I6.js";
18
- import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-DGMeMy5R.js";
19
- import { D as DropzoneFile, h as bytesToSize, i as defaultFileValidationOptions, j as fileValidationRules, S as StateContextSetter, a as getDocument, c as createDocumentRequest, k as augmentWithCountryConfigs, d as documentApiUtils, b as getPropsFromConfigurations, f as getFileExtention } from "./validate-CvtamBXH.js";
20
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-DHp5v5jB.js";
21
- import { D as DocumentGuidance, A as AdyenKycSdkError, u as uppercase, p as payoutAccountFormat, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration, c as useUnifyLoadingStatus } from "./mapExistingFile-DW5ktJzM.js";
22
- import { C as Confirm } from "./Confirm-DwutojkY.js";
23
- import { c as currencyByCountry } from "./types-K58FM7k4.js";
24
- import { i as isValidationError, p as processValidationErrors, b as isIdDocumentUploadError, c as isBankStatementUploadError, a as isMaintenanceModeError, m as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable } from "./validationError-DOCbfk7K.js";
25
- import { u as useDataset, d as datasetIdentifier, a as datasetUtilities } from "./useDataset-BgvQQEKd.js";
26
- import { g as getLegalEntityNameBasedOnType, b as getPayoutAccountHolderName } from "./getName-DJlhsDj_.js";
27
- import { I as IFrameWidget, o as omitObscuredFieldsIfUnchanged } from "./iframeWidget-Bftkd3v_.js";
28
- import { Show } from "@preact/signals/utils";
29
- import { c as createFormUtils, F as FormHeader, E as ErrorPanel, m as mergeFieldMetadataIntoProps, g as getFieldProps, C as CountryField, f as getFormProps, d as summaryStep, s as summaryItem } from "./CountryField-D0YZrov9.js";
30
- import { a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper, T as Trans } from "./translation-DJHWTow9.js";
31
- import { signal } from "@preact/signals";
32
- import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-G30FPhOX.js";
33
- import { b as useCapabilityProblems, g as getProblemsForEntity, T as TextArea, f as validatePatternOnBlur, r as resolveFieldMetadata, a as useAccountHolder, I as Image, R as RadioGroupCard, C as ContextGuidance } from "./fieldConfigurations-B8bDFQ53.js";
34
- import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
35
- import { memo, lazy } from "preact/compat";
36
- import { u as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-BCvmGMOX.js";
37
- import cx from "classnames";
38
- import { b as bankStatementDescriptionPattern } from "./basePatterns-BwdnMQxI.js";
39
- import { createContext } from "preact";
40
- import { a as Alert } from "./Alert-C24s_Ygs.js";
41
- import { A as ActionBar } from "./FormNavigation-ezxkIqdb.js";
42
- import OpenBankingSDK from "@adyen/openbankingsdk";
43
- import { m as makeMask, n as numericInputs, a as nonInputs, s as spacer, c as customInputs, M as MaskedInput, d as alphanumericInputs, b as alphaInputs } from "./MaskedInput-BZ7t98eu.js";
44
- import { a as isNotEmptyValidator } from "./commonValidators-Bk0SSjsH.js";
45
- import { C as Currencies } from "./currency-BGwQyxBo.js";
46
- import { L as Link } from "./Link-BFdxU8qh.js";
47
- const getCheck = async (legalEntityId, baseUrl, data) => {
48
- return httpPost(
49
- {
50
- baseUrl,
51
- path: `legalEntities/${legalEntityId}/checks/bankAccount`
52
- },
53
- data
54
- );
55
- };
56
- const useCheck = (data, options) => {
57
- const { rootLegalEntityId, baseUrl: url } = useApiContext();
58
- return useQuery({
59
- queryKey: ["checkAsAService", data],
60
- queryFn: () => getCheck(rootLegalEntityId.value, url.value, data),
61
- ...options
62
- });
63
- };
64
- const getBankVerificationProviders = async (legalEntityId, baseUrl, queryParams) => {
65
- const { country, locale, configId } = queryParams;
66
- const providerParams = new URLSearchParams({
67
- country,
68
- locale,
69
- ...configId && { configId }
70
- });
71
- return httpGet({
72
- baseUrl,
73
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/providers?${providerParams}`
74
- });
75
- };
76
- const useBankVerificationProviders = (queryParams, options) => {
77
- const { rootLegalEntityId, baseUrl } = useApiContext();
78
- return useQuery({
79
- queryKey: ["bankVerificationProviders", queryParams],
80
- queryFn: () => getBankVerificationProviders(rootLegalEntityId.value, baseUrl.value, queryParams),
81
- ...options
82
- });
83
- };
84
- const createTransferInstrument = async (rootLegalEntityId, baseUrl, transferInstrument) => {
85
- return httpPost(
86
- {
87
- baseUrl,
88
- path: `legalEntities/${rootLegalEntityId}/transferInstruments`
89
- },
90
- transferInstrument
91
- );
92
- };
93
- const createTrustedTransferInstrument = async (legalEntityId, baseUrl, data) => {
94
- return httpPost(
95
- {
96
- baseUrl,
97
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted`
98
- },
99
- data
100
- );
101
- };
102
- const useCreateTrustedTransferInstrument = (options) => {
103
- const { rootLegalEntityId, baseUrl } = useApiContext();
104
- return useMutation({
105
- mutationFn: (data) => createTrustedTransferInstrument(rootLegalEntityId.value, baseUrl.value, data),
106
- ...options
107
- });
108
- };
109
- const updateTransferInstrument = async (legalEntityId, baseUrl, transferInstrument, transferInstrumentId) => {
110
- return httpPost(
111
- {
112
- baseUrl,
113
- path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
114
- },
115
- transferInstrument
116
- );
117
- };
118
- const useUpdateTransferInstrument = (options) => {
119
- const { rootLegalEntityId, baseUrl } = useApiContext();
120
- const queryClient = useQueryClient();
121
- return useMutation({
122
- mutationFn: ({ transferInstrument, transferInstrumentId }) => updateTransferInstrument(
123
- rootLegalEntityId.value,
124
- baseUrl.value,
125
- transferInstrument,
126
- transferInstrumentId
127
- ),
128
- onSuccess: async (transferInstrument) => {
129
- queryClient.setQueryData(["transferInstrument", transferInstrument.id], transferInstrument);
130
- await queryClient.invalidateQueries({
131
- // Invalidate transfer instruments on root LE
132
- queryKey: ["transferInstruments"]
133
- });
134
- },
135
- ...options
136
- });
137
- };
138
- const accountFormatsImports = /* @__PURE__ */ Object.assign({ "../accountFormats/AD.json": () => import("./AD-CyP5INSp.js"), "../accountFormats/AE.json": () => import("./AE-mIZ12t47.js"), "../accountFormats/AI.json": () => import("./AI-CYOqGKk2.js"), "../accountFormats/AL.json": () => import("./AL-BX1fEo1A.js"), "../accountFormats/AR.json": () => import("./AR-C9kMRnHG.js"), "../accountFormats/AS.json": () => import("./AS-B0TMZQ6o.js"), "../accountFormats/AT.json": () => import("./AT-DJLlevck.js"), "../accountFormats/AU.json": () => import("./AU-B5LSe4bo.js"), "../accountFormats/AX.json": () => import("./AX-Z6f6EnJc.js"), "../accountFormats/AZ.json": () => import("./AZ-BqrKjWMH.js"), "../accountFormats/BA.json": () => import("./BA-BbP72Tn6.js"), "../accountFormats/BE.json": () => import("./BE-B-m_4F41.js"), "../accountFormats/BG.json": () => import("./BG-BVR5ytc-.js"), "../accountFormats/BH.json": () => import("./BH-Ded1Eyrc.js"), "../accountFormats/BM.json": () => import("./BM-CBl-UQUl.js"), "../accountFormats/BR.json": () => import("./BR-DsY9PZVZ.js"), "../accountFormats/BS.json": () => import("./BS-dBfArxRw.js"), "../accountFormats/BV.json": () => import("./BV-D0QBsH7-.js"), "../accountFormats/BY.json": () => import("./BY-BsQUo3fM.js"), "../accountFormats/CA.json": () => import("./CA-DT4cmOOe.js"), "../accountFormats/CH.json": () => import("./CH-CesIKOYy.js"), "../accountFormats/CN.json": () => import("./CN-BV-5PSpq.js"), "../accountFormats/CR.json": () => import("./CR-Dtv-rXg9.js"), "../accountFormats/CY.json": () => import("./CY-BnJ7k_mN.js"), "../accountFormats/CZ.json": () => import("./CZ-BiPeoA9G.js"), "../accountFormats/DE.json": () => import("./DE-DdcbG-CC.js"), "../accountFormats/DK.json": () => import("./DK-DA8qRrzq.js"), "../accountFormats/DO.json": () => import("./DO-B1BWc3Iy.js"), "../accountFormats/EC.json": () => import("./EC-DbNXe71-.js"), "../accountFormats/EE.json": () => import("./EE-CaXoPgZz.js"), "../accountFormats/ES.json": () => import("./ES-Bt_oaIaf.js"), "../accountFormats/FI.json": () => import("./FI-C5V3lLuN.js"), "../accountFormats/FJ.json": () => import("./FJ-CBdbPf5l.js"), "../accountFormats/FO.json": () => import("./FO-1pD1p939.js"), "../accountFormats/FR.json": () => import("./FR-Bc1tLIC4.js"), "../accountFormats/GB.json": () => import("./GB-CCYHTagl.js"), "../accountFormats/GE.json": () => import("./GE-Deog1a3Z.js"), "../accountFormats/GF.json": () => import("./GF-Cda8N7A4.js"), "../accountFormats/GG.json": () => import("./GG-BGuqxplU.js"), "../accountFormats/GI.json": () => import("./GI-CROkpYrU.js"), "../accountFormats/GL.json": () => import("./GL-0vO9Of9c.js"), "../accountFormats/GP.json": () => import("./GP-za-3opp-.js"), "../accountFormats/GR.json": () => import("./GR-B9c2boG8.js"), "../accountFormats/GT.json": () => import("./GT-C1jhs-Dx.js"), "../accountFormats/GU.json": () => import("./GU-CALV5vh1.js"), "../accountFormats/HK.json": () => import("./HK-BB3PIq-Z.js"), "../accountFormats/HR.json": () => import("./HR-p4luVYpu.js"), "../accountFormats/HU.json": () => import("./HU-D8vJYkDH.js"), "../accountFormats/ID.json": () => import("./ID-BcOv4SXj.js"), "../accountFormats/IE.json": () => import("./IE-Cli_j7Al.js"), "../accountFormats/IL.json": () => import("./IL-CQ0yHRRe.js"), "../accountFormats/IM.json": () => import("./IM-mpIyBn16.js"), "../accountFormats/IN.json": () => import("./IN-BhEI9o7G.js"), "../accountFormats/IS.json": () => import("./IS-02zCAdvq.js"), "../accountFormats/IT.json": () => import("./IT-CzURFhrK.js"), "../accountFormats/JE.json": () => import("./JE-MFwIYti7.js"), "../accountFormats/JM.json": () => import("./JM-BMGgBK6y.js"), "../accountFormats/JO.json": () => import("./JO-rY8A8f9C.js"), "../accountFormats/JP.json": () => import("./JP-BQG5dF1Y.js"), "../accountFormats/KR.json": () => import("./KR-74SwXHka.js"), "../accountFormats/KW.json": () => import("./KW-CcVPOJ8B.js"), "../accountFormats/KY.json": () => import("./KY-DXCeltYA.js"), "../accountFormats/KZ.json": () => import("./KZ-CZNjdp22.js"), "../accountFormats/LB.json": () => import("./LB-DZ5YfAsO.js"), "../accountFormats/LI.json": () => import("./LI-DA06W10W.js"), "../accountFormats/LT.json": () => import("./LT-DuU6E2Ct.js"), "../accountFormats/LU.json": () => import("./LU-BQHhNpDy.js"), "../accountFormats/LV.json": () => import("./LV-DN7wckbP.js"), "../accountFormats/MC.json": () => import("./MC-DtSWC4jS.js"), "../accountFormats/MD.json": () => import("./MD-DVc0183a.js"), "../accountFormats/ME.json": () => import("./ME-DiJhSuli.js"), "../accountFormats/MK.json": () => import("./MK-BZxslBTS.js"), "../accountFormats/MP.json": () => import("./MP-7IpnbfCj.js"), "../accountFormats/MQ.json": () => import("./MQ-DusG_no1.js"), "../accountFormats/MR.json": () => import("./MR-DaBVNHqN.js"), "../accountFormats/MT.json": () => import("./MT-DeDMQ1f_.js"), "../accountFormats/MU.json": () => import("./MU-D3gGVu1R.js"), "../accountFormats/MX.json": () => import("./MX-CZVOFg3D.js"), "../accountFormats/MY.json": () => import("./MY-ym71svTa.js"), "../accountFormats/NC.json": () => import("./NC-xzMvjp9-.js"), "../accountFormats/NL.json": () => import("./NL-aVL0NAp-.js"), "../accountFormats/NO.json": () => import("./NO-D7EOiQA1.js"), "../accountFormats/NZ.json": () => import("./NZ-BP7_Q9Om.js"), "../accountFormats/PE.json": () => import("./PE-CdxgPh3v.js"), "../accountFormats/PF.json": () => import("./PF-CstaOd9Z.js"), "../accountFormats/PH.json": () => import("./PH-BYgMDYIH.js"), "../accountFormats/PK.json": () => import("./PK-bLhtgsEk.js"), "../accountFormats/PL.json": () => import("./PL-Bg7axKQA.js"), "../accountFormats/PM.json": () => import("./PM-BWbxAh4u.js"), "../accountFormats/PR.json": () => import("./PR-CFPKXEXp.js"), "../accountFormats/PS.json": () => import("./PS-B8obOOWY.js"), "../accountFormats/PT.json": () => import("./PT-hB1HnBM2.js"), "../accountFormats/QA.json": () => import("./QA-CSfx-mvb.js"), "../accountFormats/RE.json": () => import("./RE-BApq1FJ6.js"), "../accountFormats/RO.json": () => import("./RO-BLlC4CKq.js"), "../accountFormats/RS.json": () => import("./RS-BCenke-W.js"), "../accountFormats/RU.json": () => import("./RU-D27RC7dq.js"), "../accountFormats/SA.json": () => import("./SA-C9VgxCgm.js"), "../accountFormats/SE.json": () => import("./SE-q25Qt85B.js"), "../accountFormats/SG.json": () => import("./SG-DoCqjlFi.js"), "../accountFormats/SI.json": () => import("./SI-BzA-ozn6.js"), "../accountFormats/SJ.json": () => import("./SJ-Z9jwQQlz.js"), "../accountFormats/SK.json": () => import("./SK-DOTdLJPw.js"), "../accountFormats/SM.json": () => import("./SM-B4BIgmhk.js"), "../accountFormats/TF.json": () => import("./TF-BOWng-Dz.js"), "../accountFormats/TH.json": () => import("./TH-CvyXLcZK.js"), "../accountFormats/TL.json": () => import("./TL-BWslydRz.js"), "../accountFormats/TN.json": () => import("./TN-Cjd3bM_V.js"), "../accountFormats/TR.json": () => import("./TR-BBx5CuWS.js"), "../accountFormats/TT.json": () => import("./TT-D4-z5BA-.js"), "../accountFormats/TW.json": () => import("./TW-BC8YpnMr.js"), "../accountFormats/UA.json": () => import("./UA-DrXUnAe6.js"), "../accountFormats/US.json": () => import("./US-D8dI5_i1.js"), "../accountFormats/UY.json": () => import("./UY-DEHqLXhX.js"), "../accountFormats/VA.json": () => import("./VA-bPXdCnwD.js"), "../accountFormats/VG.json": () => import("./VG-DnKAVCsi.js"), "../accountFormats/VI.json": () => import("./VI-CU9MA9ux.js"), "../accountFormats/VN.json": () => import("./VN-CTSqsmB6.js"), "../accountFormats/WF.json": () => import("./WF-CwHbsjtJ.js"), "../accountFormats/YT.json": () => import("./YT-BCyAAbo7.js"), "../accountFormats/ZA.json": () => import("./ZA-NU7slima.js") });
139
- const getAccountFormatsForCountry = async (country) => {
140
- const importForCountry = accountFormatsImports[`../accountFormats/${country}.json`];
141
- if (!importForCountry) {
142
- throw Error(`No account formats available for ${country}`);
143
- }
144
- return (await importForCountry()).default;
145
- };
146
- const validateAccountIdentification = async (baseUrl, data) => {
147
- return httpPost(
148
- {
149
- baseUrl,
150
- path: `validations/accountidentification`
151
- },
152
- {
153
- accountIdentification: {
154
- ...data
155
- }
156
- }
157
- );
158
- };
159
- const useValidateAccountIdentification = (options) => {
160
- const { baseUrl } = useApiContext();
161
- return useMutation({
162
- mutationFn: (data) => validateAccountIdentification(baseUrl.value, data),
163
- ...options
164
- });
165
- };
166
- const useAsyncAccountDetailsValidationRules = (payload, hasEmptyFields2, isAccountNumberMasked) => {
167
- const [timeoutId, setTimeoutId] = useState(null);
168
- const [accountValidationData, setAccountValidationData] = useState({
169
- invalidFields: [],
170
- valid: false
171
- });
172
- const { mutateAsync } = useValidateAccountIdentification();
173
- useEffect(() => {
174
- const fetchAccountDetails = async (accountIdentificationPayload) => {
175
- try {
176
- const accountIdentificationResponse = await mutateAsync(accountIdentificationPayload);
177
- setAccountValidationData(accountIdentificationResponse);
178
- } catch (error) {
179
- console.error("Error fetching account details:", error);
180
- }
181
- };
182
- if (payload && !hasEmptyFields2 && !isAccountNumberMasked) {
183
- if (timeoutId !== null) {
184
- clearTimeout(timeoutId);
185
- }
186
- setTimeoutId(
187
- setTimeout(() => {
188
- fetchAccountDetails(payload);
189
- setTimeoutId(null);
190
- }, 500)
191
- );
192
- }
193
- }, [mutateAsync, hasEmptyFields2, payload]);
194
- return accountValidationData;
195
- };
196
- const logger = createLogger();
197
- const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry) => {
198
- if ("iban" in payoutAccount && payoutAccount.iban)
199
- return {
200
- type: "iban",
201
- iban: payoutAccount.iban
202
- };
203
- switch (bankCountry) {
204
- case CountryCodes.Australia:
205
- return {
206
- type: "auLocal",
207
- accountNumber: payoutAccount.bankAccountNumber,
208
- bsbCode: payoutAccount.branchCode
209
- };
210
- case CountryCodes.Brazil:
211
- return {
212
- type: "brLocal",
213
- accountNumber: payoutAccount.bankAccountNumber,
214
- ispb: payoutAccount.bankCode,
215
- bankCode: payoutAccount.bankName,
216
- branchNumber: payoutAccount.branchCode
217
- };
218
- case CountryCodes.Canada:
219
- return {
220
- type: "caLocal",
221
- accountNumber: payoutAccount.bankAccountNumber,
222
- institutionNumber: payoutAccount.bankCode,
223
- transitNumber: payoutAccount.branchCode
224
- };
225
- case CountryCodes.CzechRepublic:
226
- return {
227
- type: "czLocal",
228
- accountNumber: payoutAccount.bankAccountNumber,
229
- bankCode: payoutAccount.bankCode
230
- };
231
- case CountryCodes.Denmark:
232
- return {
233
- type: "dkLocal",
234
- accountNumber: payoutAccount.bankAccountNumber,
235
- bankCode: payoutAccount.bankCode
236
- };
237
- case CountryCodes.HongKong:
238
- return {
239
- type: "hkLocal",
240
- accountNumber: payoutAccount.bankAccountNumber,
241
- clearingCode: payoutAccount.bankCode
242
- };
243
- case CountryCodes.NewZealand:
244
- return {
245
- type: "nzLocal",
246
- accountNumber: payoutAccount.bankAccountNumber?.replaceAll("-", "")
247
- };
248
- case CountryCodes.Sweden:
249
- return {
250
- type: "seLocal",
251
- accountNumber: payoutAccount.bankAccountNumber,
252
- clearingNumber: payoutAccount.branchCode
253
- };
254
- case CountryCodes.Singapore:
255
- return {
256
- type: "sgLocal",
257
- accountNumber: payoutAccount.bankAccountNumber,
258
- bic: payoutAccount.swiftCode
259
- };
260
- case CountryCodes.IsleOfMan:
261
- case CountryCodes.Guernsey:
262
- case CountryCodes.Gibraltar:
263
- case CountryCodes.Jersey:
264
- case CountryCodes.UnitedKingdom:
265
- return {
266
- type: "ukLocal",
267
- // for some reason GB's account identification is called `ukLocalAccountIdentification`
268
- accountNumber: payoutAccount.bankAccountNumber,
269
- sortCode: payoutAccount.branchCode
270
- };
271
- case CountryCodes.NorthernMarianaIslands:
272
- case CountryCodes.Guam:
273
- case CountryCodes.VirginIslandsUS:
274
- case CountryCodes.AmericanSamoa:
275
- case CountryCodes.PuertoRico:
276
- case CountryCodes.UnitedStates:
277
- return {
278
- type: "usLocal",
279
- accountNumber: payoutAccount.bankAccountNumber,
280
- routingNumber: payoutAccount.branchCode
281
- };
282
- default:
283
- logger.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
284
- return {
285
- type: `${bankCountry.toLowerCase()}Local`,
286
- accountNumber: payoutAccount.bankAccountNumber
287
- };
288
- }
289
- };
290
- const mapPayoutAccountSchemaToApiBankAccount = (payoutAccount, bankCountry) => ({
291
- accountIdentification: getAccountIdentificationFromPayoutAccountSchema(
292
- payoutAccount,
293
- bankCountry
294
- ),
295
- countryCode: bankCountry,
296
- bankName: payoutAccount.bankName
297
- });
298
- const showPayoutVerificationMethodError = signal(false);
299
- function PayoutDetailsPage({
300
- transferInstrumentId,
301
- setTransferInstrumentId,
302
- taskType,
303
- openBankingPartnerConfigId,
304
- onSubmit,
305
- handleHomeClick
306
- }) {
307
- const { i18n } = useTranslation();
308
- const { data: rootLe } = useLegalEntity(ROOT_LE);
309
- const { data: associatedLe, isLoading: associatedLeIsLoading } = useAssociatedLegalEntity(
310
- rootLe,
311
- [
312
- LegalEntityTypes.SOLE_PROPRIETORSHIP,
313
- LegalEntityTypes.TRUST,
314
- LegalEntityTypes.UNINCORPORATED_PARTNERSHIP
315
- ]
316
- );
317
- const capabilityProblems = useCapabilityProblems();
318
- addResourceBundles(i18n, i18n.language, [
319
- { ns: "banking", importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../language/da-DK.json": () => import("./da-DK-q2b_1elr.js"), "../language/de-DE.json": () => import("./de-DE-D2ByeIZs.js"), "../language/en-US.json": () => import("./en-US-BQpgt41j.js"), "../language/es-ES.json": () => import("./es-ES-WWftn3JX.js"), "../language/fi-FI.json": () => import("./fi-FI-D9E_KaJi.js"), "../language/fr-FR.json": () => import("./fr-FR-Cv0k-3Xc.js"), "../language/it-IT.json": () => import("./it-IT-C_fNHhjE.js"), "../language/nl-NL.json": () => import("./nl-NL-DLedC3mO.js"), "../language/no-NO.json": () => import("./no-NO-CpVal4cV.js"), "../language/pt-PT.json": () => import("./pt-PT-BkvMsoK4.js"), "../language/sl-SI.json": () => import("./sl-SI-Cth2Qa5T.js"), "../language/sv-SE.json": () => import("./sv-SE-OPOHtqtP.js") }), `../language/${i18n.language}.json`, 3) }
320
- ]);
321
- if (!rootLe || associatedLeIsLoading) {
322
- return /* @__PURE__ */ jsx(Loader, {});
323
- }
324
- const problems = capabilityProblems && transferInstrumentId ? getProblemsForEntity(capabilityProblems, EntityTypes.BANK_ACCOUNT, transferInstrumentId) : void 0;
325
- return /* @__PURE__ */ jsx(
326
- PayoutDetailsDropin,
327
- {
328
- taskType,
329
- currentTransferInstrumentId: transferInstrumentId,
330
- setCurrentTransferInstrumentId: setTransferInstrumentId,
331
- legalEntityResponse: rootLe,
332
- associatedLegalArrangement: associatedLe,
333
- problems,
334
- onSubmit,
335
- handleHomeClick,
336
- navigateBackToTaskList: handleHomeClick,
337
- openBankingPartnerConfigId
338
- }
339
- );
340
- }
341
- const PayoutDetailsPage$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
342
- __proto__: null,
343
- PayoutDetailsPage,
344
- showPayoutVerificationMethodError
345
- }, Symbol.toStringTag, { value: "Module" }));
346
- function FilePicker({
347
- files,
348
- setFiles,
349
- isValid,
350
- errorMessage,
351
- multiple = false,
352
- label,
353
- name,
354
- iconPrefix = "generic-document",
355
- enableTracking = false,
356
- id,
357
- // file validation options
358
- allowedFileTypes,
359
- maxSize,
360
- isOptional,
361
- maxNumberOfFiles,
362
- // a11y
363
- "aria-describedby": ariaDescribedBy,
364
- "aria-labelledby": ariaLabelledBy
365
- }) {
366
- const { t } = useTranslation("common");
367
- const userEvents = useAnalyticsContext();
368
- const fileInput = useRef(null);
369
- const [dragged, setDragged] = useState(false);
370
- const hasRequiredError = errorMessage === "fieldIsRequired";
371
- const showDropzone = files.length < maxNumberOfFiles;
372
- const openFilePicker = () => fileInput.current?.click();
373
- const handleFileDelete = (fileToDelete) => setFiles(files.filter((file) => file !== fileToDelete));
374
- const handleDragEnter = (e) => {
375
- e.preventDefault();
376
- e.stopPropagation();
377
- };
378
- const handleDragLeave = (e) => {
379
- e.preventDefault();
380
- e.stopPropagation();
381
- setDragged(false);
382
- };
383
- const handleDragOver = (e) => {
384
- e.preventDefault();
385
- e.stopPropagation();
386
- setDragged(true);
387
- };
388
- const handleDrop = (e) => {
389
- e.preventDefault();
390
- e.stopPropagation();
391
- if (e.dataTransfer) addFiles(e.dataTransfer.files);
392
- setDragged(false);
393
- };
394
- const handleFilesChosen = (e) => {
395
- const fileInput2 = e.target;
396
- if (fileInput2.files) addFiles(fileInput2.files);
397
- };
398
- const addFiles = (newFiles) => {
399
- if (enableTracking) {
400
- userEvents.addFieldEvent("Interacted with form field", {
401
- actionType: "change",
402
- field: name || "dropzone"
403
- });
404
- }
405
- setFiles([...newFiles, ...files]);
406
- };
407
- const allowedFileTypesString = allowedFileTypes.join(", ");
408
- return /* @__PURE__ */ jsxs("div", { children: [
409
- label && /* @__PURE__ */ jsx(
410
- "div",
411
- {
412
- className: cx("adyen-kyc-label__text", {
413
- "adyen-kyc-label__text--error": hasRequiredError
414
- }),
415
- children: label
416
- }
417
- ),
418
- files.map((file) => /* @__PURE__ */ jsx(
419
- DropzoneFile,
420
- {
421
- file,
422
- onDelete: () => handleFileDelete(file),
423
- errorMessage,
424
- iconPrefix
425
- },
426
- file
427
- )),
428
- showDropzone && /* @__PURE__ */ jsxs(
429
- "div",
430
- {
431
- role: "region",
432
- className: cx("adyen-kyc-dropzone", {
433
- "adyen-kyc-dropzone--dragged": dragged,
434
- "adyen-kyc-dropzone--error": !dragged && hasRequiredError
435
- }),
436
- onDrop: handleDrop,
437
- onDragOver: handleDragOver,
438
- onDragEnter: handleDragEnter,
439
- onDragLeave: handleDragLeave,
440
- children: [
441
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropzone__icon", children: /* @__PURE__ */ jsx(Icon, { name: "upload" }) }),
442
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-dropzone__labels", children: [
443
- /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", children: t(($) => $["dropFileToUpload"]) }),
444
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["supportedFileTypes"], { fileTypes: allowedFileTypesString }) }),
445
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["maxFileSize"], { maxSize: bytesToSize(maxSize) }) }),
446
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["upToFiles"], { maxFiles: maxNumberOfFiles }) })
447
- ] }),
448
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropzone__button", children: /* @__PURE__ */ jsx(Button, { onClick: openFilePicker, variant: "secondary", children: t(($) => $["browseFiles"]) }) }),
449
- /* @__PURE__ */ jsx(
450
- "input",
451
- {
452
- id,
453
- className: "adyen-kyc-dropzone__input",
454
- ref: fileInput,
455
- multiple,
456
- accept: allowedFileTypesString,
457
- onChange: handleFilesChosen,
458
- type: "file",
459
- "aria-required": !isOptional,
460
- "aria-describedby": ariaDescribedBy,
461
- "aria-labelledby": ariaLabelledBy,
462
- "data-testid": "hidden-file-input",
463
- "aria-invalid": !isValid
464
- }
465
- )
466
- ]
467
- }
468
- ),
469
- hasRequiredError && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-error-text", children: t(($) => $["fieldIsRequired"]) })
470
- ] });
471
- }
472
- const bankDocument = "adyen-kyc-bank-document";
473
- const styles$2 = {
474
- bankDocument
475
- };
476
- const documentRequirements = "adyen-kyc-document-requirements";
477
- const documentRequirementsSubtitle = "adyen-kyc-document-requirements-subtitle";
478
- const styles$1 = {
479
- documentRequirements,
480
- documentRequirementsSubtitle
481
- };
482
- const BankDocumentTypes = {
483
- BANK_STATEMENT: "bankStatement",
484
- DEPOSIT_SLIP: "depositSlip",
485
- SCREENSHOT_OF_BANK: "screenshotOfOnlineBankingEnviroment",
486
- A_LETTER_FROM_YOUR_BANK: "aLetterFromYourBank",
487
- CHECK: "check"
488
- };
489
- const bankDocumentOptions = [
490
- { id: BankDocumentTypes.BANK_STATEMENT, name: "bankStatementDocument" },
491
- { id: BankDocumentTypes.DEPOSIT_SLIP, name: "depositSlip" },
492
- { id: BankDocumentTypes.SCREENSHOT_OF_BANK, name: "screenshotOfOnlineBankingEnviroment" },
493
- { id: BankDocumentTypes.A_LETTER_FROM_YOUR_BANK, name: "aLetterFromYourBank" },
494
- { id: BankDocumentTypes.CHECK, name: "check" }
495
- ];
496
- const BankDocumentRequirement = {
497
- ACCOUNT_NAME_INDIVIDUAL: "bankAccountNameIndividual",
498
- ACCOUNT_NAME_ORGANIZATION: "bankAccountNameOrganization",
499
- ACCOUNT_NAME_WITH_SOLE_PROP: "bankAccountNameWithSoleProprietor",
500
- ACCOUNT_NAME_WITH_TRUST: "bankAccountNameWithTrust",
501
- ACCOUNT_NAME_WITH_UNINCORPORATED_PARTNERSHIP: "accountMustBeInTheNameOfUnincorporatedPartnership",
502
- ACCOUNT_NUMBER_OR_IBAN: "accountNumberOrIbanVisible",
503
- ACCOUNT_NUMBER: "accountNumberVisible",
504
- ACCOUNT_NUMBER_FULL_OR_PARTIAL: "accountNumberFullOrPartialVisible",
505
- DATE_ON_DOCUMENT: "datedInTheLastXMonths",
506
- COUNTRY_OF_BANK: "showsCountryOfBankAccount",
507
- OFFICIAL_DOCUMENT: "hasToBeOfficialDocumentFromBank",
508
- STAMP_OR_SIGNATURE: "hasBankStampOrBankSignature",
509
- HIGH_RESOLUTION_CHECK: "highResolutionCheck"
510
- };
511
- const accountNameRequirement = {
512
- [LegalEntityTypes.INDIVIDUAL]: {
513
- default: BankDocumentRequirement.ACCOUNT_NAME_INDIVIDUAL
514
- },
515
- [LegalEntityTypes.ORGANIZATION]: {
516
- default: BankDocumentRequirement.ACCOUNT_NAME_ORGANIZATION
517
- }
518
- };
519
- const accountNameRequirementWithLegalArrangement = {
520
- [LegalEntityTypes.INDIVIDUAL]: {
521
- [LegalEntityTypes.SOLE_PROPRIETORSHIP]: {
522
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_SOLE_PROP
523
- },
524
- [LegalEntityTypes.TRUST]: {
525
- [CountryCodes.UnitedStates]: "bankAccountNameWithTrust_US",
526
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_TRUST
527
- },
528
- [LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: {
529
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_UNINCORPORATED_PARTNERSHIP
530
- }
531
- },
532
- [LegalEntityTypes.ORGANIZATION]: {
533
- [LegalEntityTypes.TRUST]: {
534
- [CountryCodes.UnitedStates]: "bankAccountNameWithTrust_US",
535
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_TRUST
536
- },
537
- [LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: {
538
- default: BankDocumentRequirement.ACCOUNT_NAME_WITH_UNINCORPORATED_PARTNERSHIP
539
- }
540
- }
541
- };
542
- const applyNamedModifiers = (country, documentModifiers) => {
543
- if (!documentModifiers.associatedEntityType || !documentModifiers.associatedEntityLegalName) {
544
- switch (documentModifiers.rootEntityType) {
545
- case LegalEntityTypes.INDIVIDUAL:
546
- return {
547
- key: accountNameRequirement[LegalEntityTypes.INDIVIDUAL].default,
548
- options: { values: { individualLegalName: documentModifiers.rootEntityLegalName } }
549
- };
550
- case LegalEntityTypes.ORGANIZATION:
551
- default:
552
- return {
553
- key: accountNameRequirement[LegalEntityTypes.ORGANIZATION].default,
554
- options: { values: { companyLegalName: documentModifiers.rootEntityLegalName } }
555
- };
556
- }
557
- }
558
- switch (documentModifiers.rootEntityType) {
559
- case LegalEntityTypes.INDIVIDUAL:
560
- switch (documentModifiers.associatedEntityType) {
561
- case LegalEntityTypes.TRUST:
562
- return {
563
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.TRUST]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.TRUST]?.default,
564
- options: {
565
- values: {
566
- trusteeName: documentModifiers.rootEntityLegalName,
567
- trustLegalName: documentModifiers.associatedEntityLegalName,
568
- trustTradingName: documentModifiers.associatedEntityTradingName ?? documentModifiers.associatedEntityLegalName
569
- }
570
- }
571
- };
572
- case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
573
- return {
574
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]?.default,
575
- options: {
576
- values: {
577
- partnerNames: documentModifiers.unincorporatedPartnershipMembers || "",
578
- partnershipName: documentModifiers.associatedEntityLegalName
579
- }
580
- }
581
- };
582
- case LegalEntityTypes.SOLE_PROPRIETORSHIP:
583
- default:
584
- return {
585
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.INDIVIDUAL][LegalEntityTypes.SOLE_PROPRIETORSHIP]?.default,
586
- options: {
587
- values: {
588
- individualLegalName: documentModifiers.rootEntityLegalName,
589
- soleProprietorshipName: documentModifiers.associatedEntityLegalName
590
- }
591
- }
592
- };
593
- }
594
- case LegalEntityTypes.ORGANIZATION:
595
- default:
596
- switch (documentModifiers.associatedEntityType) {
597
- case LegalEntityTypes.TRUST:
598
- return {
599
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.TRUST]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.TRUST]?.default,
600
- options: {
601
- values: {
602
- trusteeName: documentModifiers.rootEntityLegalName,
603
- trustLegalName: documentModifiers.associatedEntityLegalName,
604
- trustTradingName: documentModifiers.associatedEntityTradingName ?? documentModifiers.associatedEntityLegalName
605
- }
606
- }
607
- };
608
- case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
609
- return {
610
- key: accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]?.[country] ?? accountNameRequirementWithLegalArrangement[LegalEntityTypes.ORGANIZATION][LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]?.default,
611
- options: {
612
- values: {
613
- partnerNames: documentModifiers.unincorporatedPartnershipMembers || "",
614
- partnershipName: documentModifiers.associatedEntityLegalName
615
- }
616
- }
617
- };
618
- default:
619
- return { key: accountNameRequirement[LegalEntityTypes.ORGANIZATION].default };
620
- }
621
- }
622
- };
623
- const getBankDocumentRequirements = (country, documentType, documentModifiers) => {
624
- const isBasedInUS = country === "US";
625
- const baseRequirements = isBasedInUS ? [{ key: BankDocumentRequirement.OFFICIAL_DOCUMENT }] : [
626
- { key: BankDocumentRequirement.OFFICIAL_DOCUMENT },
627
- { key: BankDocumentRequirement.COUNTRY_OF_BANK }
628
- ];
629
- const accountNumberRequirement = isBasedInUS ? documentType === BankDocumentTypes.CHECK || documentType === BankDocumentTypes.DEPOSIT_SLIP ? [{ key: BankDocumentRequirement.ACCOUNT_NUMBER }] : [{ key: BankDocumentRequirement.ACCOUNT_NUMBER_FULL_OR_PARTIAL }] : [{ key: BankDocumentRequirement.ACCOUNT_NUMBER_OR_IBAN }];
630
- const requireLast12Months = isBasedInUS ? documentType === BankDocumentTypes.A_LETTER_FROM_YOUR_BANK || documentType === BankDocumentTypes.BANK_STATEMENT : documentType !== BankDocumentTypes.SCREENSHOT_OF_BANK;
631
- const requireStampOrSignature = !isBasedInUS && (documentType === BankDocumentTypes.DEPOSIT_SLIP || documentType === BankDocumentTypes.A_LETTER_FROM_YOUR_BANK);
632
- const requirements = [
633
- applyNamedModifiers(country, documentModifiers),
634
- ...accountNumberRequirement,
635
- ...baseRequirements
636
- ];
637
- if (requireLast12Months) {
638
- requirements.push({
639
- key: BankDocumentRequirement.DATE_ON_DOCUMENT,
640
- options: { values: { number: 12 } }
641
- });
642
- }
643
- if (requireStampOrSignature) {
644
- requirements.push({ key: BankDocumentRequirement.STAMP_OR_SIGNATURE });
645
- }
646
- if (isBasedInUS && documentType === BankDocumentTypes.CHECK) {
647
- requirements.push({ key: BankDocumentRequirement.HIGH_RESOLUTION_CHECK });
648
- }
649
- return requirements;
650
- };
651
- const BankDocumentRequirements = ({
652
- country,
653
- documentType,
654
- documentModifiers
655
- }) => {
656
- const { i18n } = useI18nContext();
657
- const documentRequirements2 = getBankDocumentRequirements(
658
- country,
659
- documentType,
660
- documentModifiers
661
- );
662
- return /* @__PURE__ */ jsxs("div", { className: styles$1.documentRequirements, children: [
663
- /* @__PURE__ */ jsx("strong", { className: styles$1.documentRequirementsSubtitle, children: i18n.get("documentRequirements") }),
664
- /* @__PURE__ */ jsx("ul", { children: documentRequirements2.map(({ key, options }, i) => /* @__PURE__ */ jsx("li", { "data-testid": key, children: i18n.get(key, options) }, i)) })
665
- ] });
666
- };
667
- const bankDocumentValidationRules = {
668
- description: {
669
- modes: ["blur"],
670
- validate: (description) => description ? bankStatementDescriptionPattern.test(description) : true,
671
- errorMessage: "invalidFormatBankStatementDescription"
672
- }
673
- };
674
- const CHARACTERS_LIMIT = 200;
675
- const bankDocumentFields = [
676
- "documentType",
677
- "bankStatementDocument",
678
- "description"
679
- ];
680
- function BankDocument(props) {
681
- const {
682
- legalEntity,
683
- associatedLegalArrangement,
684
- country,
685
- optionalFields,
686
- validators,
687
- data: bankData,
688
- id,
689
- description,
690
- heading,
691
- formIsActive,
692
- fieldValidationErrors,
693
- shouldValidate
694
- } = props;
695
- const { t } = useTranslation("common");
696
- const stateRef = useRef({ setState: null });
697
- const isBankStatementOptional = optionalFields?.includes("bankStatementDocument") ?? false;
698
- const formUtils = createFormUtils(props, t);
699
- const bankStatementValidationOptions = useMemo(
700
- () => ({
701
- ...defaultFileValidationOptions,
702
- isOptional: isBankStatementOptional
703
- }),
704
- [isBankStatementOptional]
705
- );
706
- const rules2 = useMemo(
707
- () => ({
708
- ...validators || bankDocumentValidationRules,
709
- bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
710
- }),
711
- [bankStatementValidationOptions, validators]
712
- );
713
- const { handleChangeFor, data, setData, valid, fieldProblems, errors, triggerValidation } = useForm({
714
- ...props,
715
- schema: bankDocumentFields,
716
- defaultData: bankData,
717
- rules: rules2,
718
- fieldProblems: fieldValidationErrors,
719
- shouldValidate
720
- });
721
- useEffect(() => {
722
- if (formIsActive) {
723
- triggerValidation();
724
- }
725
- }, [formIsActive, triggerValidation]);
726
- const alreadyUploadedDocuments = useMemo(
727
- () => bankData?.bankStatementDocument ?? [],
728
- [bankData?.bankStatementDocument]
729
- );
730
- const hasAlreadyUploadedDocuments = alreadyUploadedDocuments.length > 0;
731
- const usingExistingUploadedDocuments = data.bankStatementDocument && doArraysMatch(alreadyUploadedDocuments, data.bankStatementDocument);
732
- useEffect(() => {
733
- if (hasAlreadyUploadedDocuments) {
734
- setData("bankStatementDocument", alreadyUploadedDocuments);
735
- if (bankData?.description) setData("description", bankData.description);
736
- triggerValidation();
737
- }
738
- }, [
739
- alreadyUploadedDocuments,
740
- hasAlreadyUploadedDocuments,
741
- bankData?.description,
742
- setData,
743
- triggerValidation
744
- ]);
745
- useEffect(() => {
746
- stateRef.current?.setState?.({
747
- type: "addToState",
748
- value: {
749
- data,
750
- valid,
751
- errors,
752
- fieldProblems,
753
- dataStoreId: id,
754
- schema: bankDocumentFields
755
- }
756
- });
757
- }, [data, valid, errors, fieldProblems, id]);
758
- const getBankDocumentOptions = () => bankDocumentOptions.map(({ id: id2, name }) => ({ id: id2, name: t(($) => $[name]) }));
759
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
760
- const documentsModifiers = useMemo(
761
- () => ({
762
- rootEntityType: legalEntity.type,
763
- rootEntityLegalName: getLegalEntityNameBasedOnType(legalEntity),
764
- associatedEntityType: associatedLegalArrangement?.type,
765
- associatedEntityLegalName: associatedLegalArrangement?.[associatedLegalArrangement?.type]?.name,
766
- associatedEntityTradingName: associatedLegalArrangement?.[associatedLegalArrangement?.type]?.doingBusinessAs,
767
- unincorporatedPartnershipMembers: unincorporatedPartnershipMembers?.map((member) => member?.name)?.join(", ")
768
- }),
769
- [legalEntity, associatedLegalArrangement, unincorporatedPartnershipMembers]
770
- );
771
- return /* @__PURE__ */ jsxs("form", { className: styles$2.bankDocument, children: [
772
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
773
- /* @__PURE__ */ jsx(FormHeader, { heading, description }),
774
- /* @__PURE__ */ jsx(
775
- ErrorPanel,
776
- {
777
- verificationErrors: props?.formVerificationErrors,
778
- validationErrors: props?.fieldValidationErrors,
779
- formUtils,
780
- id: "ariaErrorField"
781
- }
782
- ),
783
- formUtils.isVisibleField("bankStatementDocument") && /* @__PURE__ */ jsxs(Fragment, { children: [
784
- !usingExistingUploadedDocuments && /* @__PURE__ */ jsx(
785
- Field,
786
- {
787
- name: "documentType",
788
- label: formUtils.getLabel("bankStatementDocument", "selectDocumentType"),
789
- className: "adyen-kyc-bank-document__document-type",
790
- children: (childProps) => /* @__PURE__ */ jsx(
791
- Select,
792
- {
793
- ...childProps,
794
- onChange: handleChangeFor("documentType"),
795
- name: "documentType",
796
- placeholder: t(($) => $["selectDocument"]),
797
- isInvalid: false,
798
- items: getBankDocumentOptions(),
799
- selected: data.documentType
800
- }
801
- )
802
- }
803
- ),
804
- data.documentType ? /* @__PURE__ */ jsxs(Fragment, { children: [
805
- country ? /* @__PURE__ */ jsx(
806
- BankDocumentRequirements,
807
- {
808
- country,
809
- documentType: data.documentType,
810
- documentModifiers: documentsModifiers
811
- }
812
- ) : void 0,
813
- /* @__PURE__ */ jsx(DocumentGuidance, { type: "bankStatement", className: "adyen-kyc-u-margin-y-24" })
814
- ] }) : null,
815
- data.documentType || usingExistingUploadedDocuments ? /* @__PURE__ */ jsx(
816
- Field,
817
- {
818
- className: "adyen-kyc-bank-document__document-upload adyen-kyc-upload-field",
819
- name: "bankStatementDocument",
820
- isValid: valid.bankStatementDocument,
821
- children: (childProps) => /* @__PURE__ */ jsx(
822
- FilePicker,
823
- {
824
- ...childProps,
825
- name: "bankStatementDocument",
826
- files: data.bankStatementDocument ?? [],
827
- setFiles: handleChangeFor("bankStatementDocument"),
828
- isValid: valid.bankStatementDocument ?? isBankStatementOptional,
829
- errorMessage: errors.bankStatementDocument?.errorMessage,
830
- ...bankStatementValidationOptions
831
- }
832
- )
833
- }
834
- ) : null
835
- ] }),
836
- data.documentType || usingExistingUploadedDocuments ? /* @__PURE__ */ jsx(
837
- Field,
838
- {
839
- className: "adyen-kyc-bank-document__document-description",
840
- name: "description",
841
- label: formUtils.getLabel("bankDocumentFileDescription"),
842
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
843
- isValid: valid.description,
844
- children: (childProps) => /* @__PURE__ */ jsx(
845
- TextArea,
846
- {
847
- ...childProps,
848
- name: "description",
849
- value: data.description,
850
- maxLength: CHARACTERS_LIMIT,
851
- onInput: handleChangeFor("description"),
852
- "aria-invalid": !valid.description
853
- }
854
- )
855
- }
856
- ) : null
857
- ] });
858
- }
859
- const MemoizedBankDocument = memo(
860
- BankDocument,
861
- (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.heading === nextProps.heading && prevProps.formIsActive === nextProps.formIsActive
862
- );
863
- const bankVerificationValidationRules = {
864
- verifiedAccountHolder: {
865
- modes: ["blur"],
866
- validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
867
- errorMessage: "fieldIsRequired"
868
- },
869
- verifiedBankCountry: {
870
- modes: ["blur"],
871
- validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
872
- errorMessage: "fieldIsRequired"
873
- },
874
- verifiedBankName: {
875
- modes: ["blur"],
876
- validate: (verifiedBankName) => !isEmpty(verifiedBankName),
877
- errorMessage: "fieldIsRequired"
878
- },
879
- verifiedCurrencyCode: {
880
- modes: ["blur"],
881
- validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
882
- errorMessage: "fieldIsRequired"
883
- },
884
- verifiedBankAccountNumber: {
885
- modes: ["blur"],
886
- validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
887
- errorMessage: "fieldIsRequired"
888
- }
889
- };
890
- const handleBankVerificationError = async (legalEntityId, baseUrl, bankVerificationErrorParams) => {
891
- return httpPost(
892
- {
893
- baseUrl,
894
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/error`
895
- },
896
- bankVerificationErrorParams
897
- );
898
- };
899
- const useHandleBankVerificationError = (options) => {
900
- const { rootLegalEntityId, baseUrl } = useApiContext();
901
- return useMutation({
902
- mutationFn: (params) => handleBankVerificationError(rootLegalEntityId.value, baseUrl.value, params),
903
- ...options
904
- });
905
- };
906
- const addAnimationStartListener = (element, listener) => {
907
- element.addEventListener("animationstart", listener, false);
908
- };
909
- const removeAnimationStartListener = (element, listener) => {
910
- element.removeEventListener("animationstart", listener, false);
911
- };
912
- const VerificationWidgetCallbackActions = {
913
- HANDLE_EXCEPTION: "handle_exception",
914
- VERIFICATION_SUCCESS: "verification_success",
915
- RETRY_VERIFICATION: "retry_verification",
916
- HANDLE_EVENT: "handle_event"
917
- };
918
- const WIDGET_IFRAME_CLASS = "adyen-kyc-bank-verification-widget";
919
- const WIDGET_CONTAINER_CLASS = `${WIDGET_IFRAME_CLASS}-container`;
920
- const EMPTY_WIDGET_CONTAINER_ANIMATION = "adyen-kyc-empty-bank-verification-widget-container";
921
- function BankVerificationWidget({
922
- url,
923
- vendor,
924
- setBankVerificationError,
925
- setHideVerificationWidget,
926
- onBack,
927
- retrieveBankAccountInfo,
928
- createTrustedTransferInstrument: createTrustedTransferInstrument2,
929
- fullscreen
930
- }) {
931
- const { i18n } = useI18nContext();
932
- const userEvents = useAnalyticsContext();
933
- const widgetContainerRef = useRef(null);
934
- const sdkToken = getSdkToken();
935
- const { mutateAsync: handleBankVerificationError2 } = useHandleBankVerificationError();
936
- const trackVerificationError = (returnValue) => {
937
- userEvents.addPageEvent("Encountered error", {
938
- actionType: "add",
939
- returnType: "sdk error",
940
- returnValue
941
- });
942
- };
943
- const DEFAULT_ERROR = {
944
- error: "UNKNOWN_ERROR",
945
- message: i18n.get("weCouldntCompleteTheAccountCheck")
946
- };
947
- setBankVerificationError(null);
948
- const widgetCallback = useCallback(
949
- (payload) => {
950
- const errorContent = i18n.get("tryAgainOrManualAccountDetails");
951
- switch (payload.action) {
952
- case VerificationWidgetCallbackActions.HANDLE_EXCEPTION: {
953
- let errorTitle;
954
- const { err } = payload;
955
- switch (!(err instanceof Error) && err?.error) {
956
- case "USER_CANCELLED":
957
- errorTitle = "";
958
- break;
959
- case "CONNECTION_ERROR":
960
- errorTitle = i18n.get("couldNotEstablishBankConnection");
961
- break;
962
- case "GENERIC_ERROR":
963
- errorTitle = i18n.get("ranIntoTechnicalError");
964
- break;
965
- case "UNKNOWN_ERROR":
966
- default: {
967
- errorTitle = i18n.get("couldNotCompleteAccountCheck");
968
- break;
969
- }
970
- }
971
- if (errorTitle) {
972
- setBankVerificationError({ title: errorTitle, content: errorContent });
973
- }
974
- setHideVerificationWidget(true);
975
- onBack?.();
976
- break;
977
- }
978
- case VerificationWidgetCallbackActions.RETRY_VERIFICATION:
979
- setBankVerificationError({
980
- title: i18n.get("failedInitializeInstantVerification"),
981
- content: errorContent
982
- });
983
- setHideVerificationWidget(true);
984
- onBack?.();
985
- break;
986
- case VerificationWidgetCallbackActions.HANDLE_EVENT: {
987
- const { name, provider } = payload.event;
988
- if (name === "institution_selected" && provider === "plaid") {
989
- widgetContainerRef.current?.classList.add(`${WIDGET_CONTAINER_CLASS}--plaid-modal`);
990
- }
991
- break;
992
- }
993
- case VerificationWidgetCallbackActions.VERIFICATION_SUCCESS: {
994
- const { accounts } = payload.result;
995
- if (accounts) retrieveBankAccountInfo(accounts[0]);
996
- setHideVerificationWidget(true);
997
- }
998
- }
999
- },
1000
- [i18n, retrieveBankAccountInfo, onBack, setBankVerificationError, setHideVerificationWidget]
1001
- );
1002
- useEffect(
1003
- () => {
1004
- const container = widgetContainerRef.current;
1005
- if (!container) {
1006
- return;
1007
- }
1008
- let iFrame;
1009
- let iFrameWidget;
1010
- let openBanking;
1011
- addAnimationStartListener(container, function refreshWidgetIframe(evt) {
1012
- if (evt.animationName !== EMPTY_WIDGET_CONTAINER_ANIMATION) return;
1013
- requestAnimationFrame(async () => {
1014
- if (createTrustedTransferInstrument2) {
1015
- openBanking = OpenBankingSDK.create({
1016
- divElement: container,
1017
- link: url,
1018
- successHandler: (code, state) => {
1019
- createTrustedTransferInstrument2(code, state).then((res) => {
1020
- userEvents.addPageEvent("Success", { actionType: "add" });
1021
- if (res) {
1022
- widgetCallback({
1023
- action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
1024
- result: res
1025
- });
1026
- }
1027
- }).catch(() => {
1028
- trackVerificationError(DEFAULT_ERROR.error);
1029
- widgetCallback({
1030
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1031
- err: DEFAULT_ERROR
1032
- });
1033
- });
1034
- },
1035
- errorHandler: (errorCode, errorMessage, state, metadata) => {
1036
- trackVerificationError(errorCode);
1037
- handleBankVerificationError2?.({
1038
- errorCode,
1039
- errorMessage,
1040
- state,
1041
- metadata: metadata && Object.fromEntries(metadata)
1042
- }).then(
1043
- (error) => widgetCallback({
1044
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1045
- err: error
1046
- })
1047
- ).catch(
1048
- () => widgetCallback({
1049
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1050
- err: DEFAULT_ERROR
1051
- })
1052
- );
1053
- },
1054
- eventHandler: (eventName, provider) => {
1055
- widgetCallback({
1056
- action: VerificationWidgetCallbackActions.HANDLE_EVENT,
1057
- event: { name: eventName, provider }
1058
- });
1059
- }
1060
- });
1061
- openBanking.open();
1062
- } else {
1063
- removeAnimationStartListener(container, refreshWidgetIframe);
1064
- iFrame = document.createElement("iframe");
1065
- iFrame.setAttribute("allowFullscreen", "true");
1066
- iFrame.classList.add(WIDGET_IFRAME_CLASS);
1067
- evt.target.appendChild(iFrame);
1068
- requestAnimationFrame(async () => {
1069
- try {
1070
- iFrameWidget = new IFrameWidget(iFrame, url, vendor, sdkToken);
1071
- const result = await iFrameWidget.mountAndWaitForResponse();
1072
- widgetCallback({
1073
- action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
1074
- result
1075
- });
1076
- userEvents.addPageEvent("Success", { actionType: "add" });
1077
- } catch (err) {
1078
- if (err instanceof AdyenKycSdkError) {
1079
- switch (err.message) {
1080
- case "WIDGET_ACCOUNT_COMMIT_FAILURE":
1081
- return widgetCallback({
1082
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1083
- err: err.sourceError
1084
- });
1085
- case "WIDGET_LAUNCH_FAILED":
1086
- case "WIDGET_URL_MALFORMED":
1087
- case "WIDGET_TIMEOUT":
1088
- return widgetCallback({
1089
- action: VerificationWidgetCallbackActions.RETRY_VERIFICATION
1090
- });
1091
- default:
1092
- return widgetCallback({
1093
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1094
- err: {
1095
- error: err?.name ?? VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1096
- message: err.sourceError?.message ?? VerificationWidgetCallbackActions.HANDLE_EXCEPTION
1097
- }
1098
- });
1099
- }
1100
- }
1101
- trackVerificationError(err instanceof AdyenKycSdkError ? err.message : "sdk error");
1102
- return widgetCallback({
1103
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1104
- err
1105
- });
1106
- }
1107
- });
1108
- }
1109
- });
1110
- });
1111
- container.classList.add(WIDGET_CONTAINER_CLASS);
1112
- if (fullscreen) {
1113
- container.classList.add(`${WIDGET_CONTAINER_CLASS}--fullscreen`);
1114
- }
1115
- return () => {
1116
- iFrameWidget?.unmount();
1117
- iFrame?.remove();
1118
- openBanking?.destroy();
1119
- };
1120
- },
1121
- // Effect dependencies have been omitted here, which isn't intended. However, there seems to be
1122
- // some problematic behaviour in the overall flow with the dependencies present, which requires
1123
- // further debugging and tracing to resolve (totally out of the scope of this component).
1124
- // [url, vendor, widgetCallback]
1125
- []
1126
- );
1127
- return /* @__PURE__ */ jsx("div", { ref: widgetContainerRef });
1128
- }
1129
- const accountVerificationFields = [
1130
- "verifiedAccountHolder",
1131
- "verifiedBankCountry",
1132
- "verifiedBankName",
1133
- "verifiedCurrencyCode",
1134
- "verifiedBankAccountNumber"
1135
- ];
1136
- const InstantVerificationErrorContext = createContext(null);
1137
- const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
1138
- const [errorNotification, setErrorNotification] = useState(null);
1139
- const dismissNotificationTimeoutRef = useRef();
1140
- const clearNotificationTimeout = useCallback(() => {
1141
- if (dismissNotificationTimeoutRef.current) {
1142
- clearTimeout(dismissNotificationTimeoutRef.current);
1143
- dismissNotificationTimeoutRef.current = void 0;
1144
- }
1145
- }, []);
1146
- useEffect(() => {
1147
- clearNotificationTimeout();
1148
- if (errorNotification && notificationVisibilityDuration > 0) {
1149
- dismissNotificationTimeoutRef.current = setTimeout(() => {
1150
- setErrorNotification(null);
1151
- clearNotificationTimeout();
1152
- }, notificationVisibilityDuration);
1153
- }
1154
- return () => clearNotificationTimeout();
1155
- }, [errorNotification, clearNotificationTimeout, notificationVisibilityDuration]);
1156
- return [errorNotification, setErrorNotification];
1157
- };
1158
- function BankVerification(props) {
1159
- const {
1160
- heading,
1161
- setBankVerificationError,
1162
- onBack,
1163
- hideSidebar,
1164
- setBankInfoValidated,
1165
- bankInfoValidated,
1166
- formIsActive,
1167
- createTrustedTransferInstrument: createTrustedTransferInstrument2,
1168
- country,
1169
- data: propData,
1170
- provider,
1171
- id,
1172
- fieldValidationErrors
1173
- } = props;
1174
- const { i18n } = useI18nContext();
1175
- const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
1176
- const schema = accountVerificationFields;
1177
- const stateRef = useRef({ setState: null });
1178
- const [hideVerificationWidget, setHideVerificationWidget] = useState(false);
1179
- const { handleChangeFor, data, valid, errors, isValid, triggerValidation, fieldProblems } = useForm({
1180
- ...props,
1181
- schema,
1182
- defaultData: propData,
1183
- rules: bankVerificationValidationRules,
1184
- fieldProblems: fieldValidationErrors
1185
- });
1186
- const retrieveBankAccountInfo = async ({
1187
- realLastFour,
1188
- number,
1189
- bankName
1190
- }) => {
1191
- handleChangeFor("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
1192
- handleChangeFor("verifiedBankName")(bankName);
1193
- handleChangeFor("verifiedBankCountry")(country);
1194
- handleChangeFor("verifiedAccountHolder")(propData?.verifiedAccountHolder);
1195
- handleChangeFor("verifiedCurrencyCode")(
1196
- propData?.verifiedCurrencyCode ?? currencyByCountry[country]?.[0]
1197
- );
1198
- setBankInfoValidated?.(true);
1199
- hideSidebar?.(false);
1200
- triggerValidation();
1201
- await invalidateRootLegalEntity();
1202
- };
1203
- const handleOnBack = () => {
1204
- setHideVerificationWidget(false);
1205
- onBack?.();
1206
- };
1207
- useEffect(() => {
1208
- stateRef.current.setState?.({
1209
- type: "addToState",
1210
- value: {
1211
- data,
1212
- valid,
1213
- errors,
1214
- fieldProblems,
1215
- dataStoreId: id,
1216
- schema
1217
- }
1218
- });
1219
- }, [data, valid, errors, isValid]);
1220
- useEffect(() => {
1221
- hideSidebar?.(formIsActive && !bankInfoValidated);
1222
- return () => hideSidebar?.(false);
1223
- }, [bankInfoValidated, formIsActive]);
1224
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1225
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
1226
- bankInfoValidated && /* @__PURE__ */ jsxs(Fragment, { children: [
1227
- /* @__PURE__ */ jsx(FormHeader, { heading }),
1228
- /* @__PURE__ */ jsx(Alert, { title: i18n.get("youSuccessfullyVerifiedAccount"), variant: "success" })
1229
- ] }),
1230
- provider && formIsActive && !bankInfoValidated && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-bank-verification-container", children: /* @__PURE__ */ jsx("form", { className: "adyen-kyc-bank-verification", children: !hideVerificationWidget ? /* @__PURE__ */ jsxs(Fragment, { children: [
1231
- /* @__PURE__ */ jsx(
1232
- BankVerificationWidget,
1233
- {
1234
- url: provider.redirectUrl,
1235
- vendor: provider.name,
1236
- setBankVerificationError,
1237
- setHideVerificationWidget,
1238
- onBack: handleOnBack,
1239
- retrieveBankAccountInfo,
1240
- createTrustedTransferInstrument: createTrustedTransferInstrument2
1241
- }
1242
- ),
1243
- /* @__PURE__ */ jsx(ActionBar, { onBack: handleOnBack, backButtonLabel: i18n.get("goBack") })
1244
- ] }) : void 0 }) })
1245
- ] });
1246
- }
1247
- function BankAccountFormat(props) {
1248
- const { i18n } = useI18nContext();
1249
- const { bankAccountFormat, handleAccountFormatChange } = props;
1250
- const bankFormatOptions = [
1251
- {
1252
- id: "iban",
1253
- name: i18n.get("ibanFormat")
1254
- },
1255
- {
1256
- id: "local",
1257
- name: i18n.get("localFormat")
1258
- }
1259
- ];
1260
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Field, { name: "bankAccountFormat", label: i18n.get("bankAccountFormat"), children: (childProps) => /* @__PURE__ */ jsx(
1261
- Select,
1262
- {
1263
- ...childProps,
1264
- onChange: (e) => handleAccountFormatChange?.(e?.target?.value),
1265
- name: "bankAccountFormat",
1266
- placeholder: i18n.get("localFormat"),
1267
- selected: bankAccountFormat,
1268
- items: bankFormatOptions
1269
- }
1270
- ) }) });
1271
- }
1272
- const simpleBankAccountNumberMetadata = (example, length, maxLength) => {
1273
- if (maxLength) {
1274
- return {
1275
- label: "bankAccountNumber",
1276
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
1277
- mask: {
1278
- mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true))
1279
- },
1280
- guidanceText: {
1281
- key: "enterAMaximumOfNDigitsForExample",
1282
- values: {
1283
- maxDigits: `${maxLength}`,
1284
- example
1285
- }
1286
- }
1287
- };
1288
- }
1289
- return {
1290
- label: "bankAccountNumber",
1291
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
1292
- mask: { mask: makeMask(...numericInputs(length)) },
1293
- guidanceText: {
1294
- key: "enterNDigitsForExample",
1295
- values: {
1296
- numDigits: `${length}`,
1297
- example
1298
- }
1299
- }
1300
- };
1301
- };
1302
- const defaultFieldMetadata$3 = {
1303
- label: "bankAccountNumber",
1304
- validators: isNotEmptyValidator
1305
- };
1306
- const defaultFieldConfig$3 = {
1307
- [CountryCodes.CzechRepublic]: {
1308
- // Validators & masks pulled from https://docs.adyen.com/api-explorer/legalentity/4/post/transferInstruments#request-bankAccount-accountIdentification-CZLocalAccountIdentification
1309
- label: "bankAccountNumber",
1310
- validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
1311
- mask: {
1312
- mask: makeMask(
1313
- ...numericInputs(2),
1314
- ...customInputs(1, /-|\d/),
1315
- ...numericInputs(3),
1316
- ...customInputs(1, /-|\d/),
1317
- ...numericInputs(10)
1318
- )
1319
- },
1320
- guidanceText: {
1321
- key: "enterXToYDigitsWithOrWithoutPrefixForExample",
1322
- values: {
1323
- minDigits: "2",
1324
- maxDigits: "16",
1325
- firstExample: "19-123457",
1326
- secondExample: "123457"
1327
- }
1328
- }
1329
- },
1330
- [CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
1331
- [CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
1332
- [CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
1333
- [CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
1334
- [CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
1335
- [CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
1336
- [CountryCodes.HongKong]: {
1337
- label: "bankAccountNumber",
1338
- validators: validatePatternOnBlur(new RegExp(`^\\d{${6},${18}}$`)),
1339
- mask: {
1340
- mask: makeMask(...numericInputs(6), ...numericInputs(12, true))
1341
- },
1342
- guidanceText: {
1343
- key: "enterAccountNumberWithBranchCodeForExample",
1344
- values: {
1345
- minDigits: "9",
1346
- maxDigits: "15",
1347
- example: "790000000"
1348
- }
1349
- }
1350
- },
1351
- [CountryCodes.Hungary]: simpleBankAccountNumberMetadata("117730161111101800000000", 24),
1352
- [CountryCodes.Singapore]: simpleBankAccountNumberMetadata("0052312891876", 4, 19),
1353
- [CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
1354
- [CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
1355
- [CountryCodes.Poland]: {
1356
- label: "bankAccountNumber",
1357
- validators: validatePatternOnBlur(/^\d{26}$/),
1358
- mask: {
1359
- mask: makeMask(
1360
- ...numericInputs(2),
1361
- spacer,
1362
- ...numericInputs(4),
1363
- spacer,
1364
- ...numericInputs(4),
1365
- spacer,
1366
- ...numericInputs(4),
1367
- spacer,
1368
- ...numericInputs(4),
1369
- spacer,
1370
- ...numericInputs(4),
1371
- spacer,
1372
- ...numericInputs(4)
1373
- )
1374
- },
1375
- guidanceText: {
1376
- key: "enterNDigitsForExample",
1377
- values: {
1378
- numDigits: "26",
1379
- example: "98 1090 2402 7474 4662 2173 1624"
1380
- }
1381
- }
1382
- },
1383
- [CountryCodes.NewZealand]: {
1384
- label: "bankAccountNumber",
1385
- validators: validatePatternOnBlur(/^\d{15,16}$/),
1386
- mask: {
1387
- mask: makeMask(
1388
- ...numericInputs(2),
1389
- ...nonInputs(" - "),
1390
- ...numericInputs(4),
1391
- ...nonInputs(" - "),
1392
- ...numericInputs(7),
1393
- ...nonInputs(" - "),
1394
- ...numericInputs(2),
1395
- ...numericInputs(1, true)
1396
- )
1397
- },
1398
- guidanceText: {
1399
- key: "enterXToYDigitsForExample",
1400
- values: {
1401
- minDigits: "15",
1402
- maxDigits: "16",
1403
- example: "12-8765-9876543-043"
1404
- }
1405
- }
1406
- }
1407
- };
1408
- const bankAccountNumberFields = ["bankAccountNumber"];
1409
- function BankAccountNumber(props) {
1410
- const { t } = useTranslation("common");
1411
- const { country, fieldConfig = defaultFieldConfig$3, onFocus, onBlur } = props;
1412
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$3);
1413
- const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
1414
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1415
- ...mergedProps,
1416
- schema: bankAccountNumberFields,
1417
- rules: mergedProps.validators,
1418
- defaultData: mergedProps.data,
1419
- fieldProblems: mergedProps?.fieldValidationErrors,
1420
- obscuredFields: mergedProps.obscuredFields
1421
- });
1422
- const handleBlur = () => {
1423
- onBlur?.();
1424
- handleChangeFor("bankAccountNumber", "blur");
1425
- };
1426
- const { updateStateSlice } = useGlobalDataSlice(
1427
- "payoutAccountDetails"
1428
- );
1429
- useEffect(() => {
1430
- updateStateSlice({ data, valid, errors, fieldProblems });
1431
- }, [data, valid, errors]);
1432
- const formUtils = createFormUtils(mergedProps, t);
1433
- return /* @__PURE__ */ jsx(
1434
- MaskedInput,
1435
- {
1436
- name: "bankAccountNumber",
1437
- type: "text",
1438
- label: formUtils.getLabel("bankAccountNumber"),
1439
- formatGuidance: formUtils.getGuidanceText("bankAccountNumber"),
1440
- ...formUtils.getMask("bankAccountNumber"),
1441
- isValid: valid.bankAccountNumber,
1442
- errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems),
1443
- "aria-required": true,
1444
- "aria-invalid": !valid.bankAccountNumber,
1445
- onBlur: handleBlur,
1446
- onInput: handleChangeFor("bankAccountNumber", "input"),
1447
- onFocus,
1448
- readonly: formUtils.isReadOnly("bankAccountNumber"),
1449
- value: data.bankAccountNumber ?? "",
1450
- acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
1451
- }
1452
- );
1453
- }
1454
- const bankCityFields = ["bankCity"];
1455
- function BankCity(props) {
1456
- const { t } = useTranslation("common");
1457
- const { validators, data: bankCityData, fieldValidationErrors } = props;
1458
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1459
- ...props,
1460
- schema: bankCityFields,
1461
- rules: validators,
1462
- defaultData: bankCityData,
1463
- fieldProblems: fieldValidationErrors
1464
- });
1465
- const { updateStateSlice } = useGlobalDataSlice(
1466
- "payoutAccountDetails"
1467
- );
1468
- useEffect(() => {
1469
- updateStateSlice({ data, valid, errors, fieldProblems });
1470
- }, [data, valid, errors]);
1471
- const formUtils = createFormUtils(props, t);
1472
- return /* @__PURE__ */ jsx(
1473
- Field,
1474
- {
1475
- name: "bankCity",
1476
- label: formUtils.getLabel("bankCity"),
1477
- errorMessage: formUtils.getErrorMessage("bankCity", errors, fieldProblems),
1478
- isValid: valid.bankCity,
1479
- children: (childProps) => /* @__PURE__ */ jsx(
1480
- InputText,
1481
- {
1482
- ...childProps,
1483
- name: "bankCity",
1484
- value: data.bankCity,
1485
- readonly: formUtils.isReadOnly("bankCity"),
1486
- onInput: handleChangeFor("bankCity", "input"),
1487
- onBlur: handleChangeFor("bankCity", "blur"),
1488
- "aria-required": true,
1489
- "aria-invalid": !valid.bankCity
1490
- }
1491
- )
1492
- }
1493
- );
1494
- }
1495
- const defaultFieldMetadata$2 = {
1496
- label: "bankCode",
1497
- validators: isNotEmptyValidator
1498
- };
1499
- const simpleBankCodeMetadata = (length, example, label) => ({
1500
- label: label ?? "bankCode",
1501
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
1502
- mask: {
1503
- mask: makeMask(...numericInputs(length))
1504
- },
1505
- guidanceText: {
1506
- key: "enterNDigitsForExample",
1507
- values: {
1508
- numDigits: `${length}`,
1509
- example
1510
- }
1511
- }
1512
- });
1513
- const defaultFieldConfig$2 = {
1514
- [CountryCodes.Brazil]: simpleBankCodeMetadata(3, "123"),
1515
- [CountryCodes.Canada]: simpleBankCodeMetadata(3, "100", "institutionNumber"),
1516
- [CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
1517
- [CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
1518
- [CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250", "bankCode"),
1519
- [CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
1520
- // Not yet implemented
1521
- [CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
1522
- [CountryCodes.Japan]: simpleBankCodeMetadata(4, "1234"),
1523
- [CountryCodes.Taiwan]: simpleBankCodeMetadata(3, "123")
1524
- };
1525
- const bankCodeFields = ["bankCode"];
1526
- function BankCode(props) {
1527
- const { t } = useTranslation("common");
1528
- const { country, fieldConfig = defaultFieldConfig$2 } = props;
1529
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
1530
- const mergedProps = mergeFieldMetadataIntoProps("bankCode", metadata, props);
1531
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1532
- ...mergedProps,
1533
- schema: bankCodeFields,
1534
- rules: mergedProps.validators,
1535
- defaultData: mergedProps.data,
1536
- fieldProblems: mergedProps.fieldValidationErrors
1537
- });
1538
- const { updateStateSlice } = useGlobalDataSlice(
1539
- "payoutAccountDetails"
1540
- );
1541
- useEffect(() => {
1542
- updateStateSlice({ data, valid, errors, fieldProblems });
1543
- }, [data, valid, errors]);
1544
- const formUtils = createFormUtils(mergedProps, t);
1545
- return /* @__PURE__ */ jsx(
1546
- MaskedInput,
1547
- {
1548
- name: "bankCode",
1549
- type: "text",
1550
- label: formUtils.getLabel("bankCode"),
1551
- errorMessage: formUtils.getErrorMessage("bankCode", errors, fieldProblems),
1552
- formatGuidance: formUtils.getGuidanceText("bankCode"),
1553
- ...formUtils.getMask("bankCode"),
1554
- isValid: valid.bankCode,
1555
- value: data.bankCode ?? "",
1556
- readonly: formUtils.isReadOnly("bankCode"),
1557
- onInput: handleChangeFor("bankCode", "input"),
1558
- onBlur: handleChangeFor("bankCode", "blur"),
1559
- "aria-required": true,
1560
- "aria-invalid": !valid.bankCode
1561
- }
1562
- );
1563
- }
1564
- const bankNameFields = ["bankName"];
1565
- function BankName(props) {
1566
- const { t } = useTranslation("common");
1567
- const { validators, data: bankNameData, fieldValidationErrors } = props;
1568
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1569
- ...props,
1570
- schema: bankNameFields,
1571
- rules: validators,
1572
- defaultData: bankNameData,
1573
- fieldProblems: fieldValidationErrors
1574
- });
1575
- const { updateStateSlice } = useGlobalDataSlice(
1576
- "payoutAccountDetails"
1577
- );
1578
- useEffect(() => {
1579
- updateStateSlice({ data, valid, errors, fieldProblems });
1580
- }, [data, valid, errors]);
1581
- const formUtils = createFormUtils(props, t);
1582
- return /* @__PURE__ */ jsx(
1583
- Field,
1584
- {
1585
- name: "bankName",
1586
- label: formUtils.getLabel("bankName"),
1587
- errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
1588
- isValid: valid.bankName,
1589
- children: (childProps) => /* @__PURE__ */ jsx(
1590
- InputText,
1591
- {
1592
- ...childProps,
1593
- name: "bankName",
1594
- value: data.bankName,
1595
- readonly: formUtils.isReadOnly("bankName"),
1596
- onInput: handleChangeFor("bankName", "input"),
1597
- onBlur: handleChangeFor("bankName", "blur"),
1598
- "aria-required": true,
1599
- "aria-invalid": !valid.bankName
1600
- }
1601
- )
1602
- }
1603
- );
1604
- }
1605
- const defaultFieldMetadata$1 = {
1606
- label: "branchCode",
1607
- validators: isNotEmptyValidator
1608
- };
1609
- const defaultFieldConfig$1 = {
1610
- [CountryCodes.UnitedKingdom]: {
1611
- label: "sortCode",
1612
- validators: validatePatternOnBlur(/^\d{6}$/),
1613
- mask: { mask: makeMask(...numericInputs(6)) },
1614
- guidanceText: {
1615
- key: "enterNDigitsForExample",
1616
- values: {
1617
- numDigits: "6",
1618
- example: "401199"
1619
- }
1620
- }
1621
- },
1622
- [CountryCodes.Australia]: {
1623
- label: "bsbNumber",
1624
- validators: validatePatternOnBlur(/^\d{6}$/),
1625
- mask: { mask: makeMask(...numericInputs(3), ...nonInputs(" - "), ...numericInputs(3)) },
1626
- guidanceText: {
1627
- key: "enterNDigitsForExample",
1628
- values: {
1629
- numDigits: "6",
1630
- example: "033-547"
1631
- }
1632
- }
1633
- },
1634
- [CountryCodes.Brazil]: {
1635
- label: "branchCode",
1636
- validators: validatePatternOnBlur(/^\d{1,5}$/),
1637
- mask: { mask: makeMask(...numericInputs(1), ...numericInputs(4, true)) },
1638
- guidanceText: {
1639
- key: "enterAMaximumOfNDigitsForExample",
1640
- values: {
1641
- maxDigits: "5",
1642
- example: "36257"
1643
- }
1644
- }
1645
- },
1646
- [CountryCodes.Canada]: {
1647
- label: "transitNumber",
1648
- validators: validatePatternOnBlur(/^\d{5}$/),
1649
- mask: { mask: makeMask(...numericInputs(5)) },
1650
- guidanceText: {
1651
- key: "enterNDigitsForExample",
1652
- values: {
1653
- numDigits: "5",
1654
- example: "27601"
1655
- }
1656
- }
1657
- },
1658
- [CountryCodes.UnitedStates]: {
1659
- label: "routingNumber",
1660
- validators: validatePatternOnBlur(/^\d{9}$/),
1661
- mask: { mask: makeMask(...numericInputs(9)) },
1662
- guidanceText: {
1663
- key: "enterNDigitsForExample",
1664
- values: {
1665
- numDigits: "9",
1666
- example: "107005432"
1667
- }
1668
- }
1669
- },
1670
- [CountryCodes.Sweden]: {
1671
- label: "branchCode",
1672
- validators: validatePatternOnBlur(/^\d{4,5}$/),
1673
- mask: {
1674
- mask: makeMask(
1675
- ...numericInputs(4),
1676
- ...nonInputs(" - ", { displayEagerly: false }),
1677
- ...numericInputs(1, true)
1678
- )
1679
- },
1680
- guidanceText: {
1681
- key: "enterXToYDigitsForExample",
1682
- values: {
1683
- minDigits: "4",
1684
- maxDigits: "5",
1685
- example: "5678 or 7635-2"
1686
- }
1687
- }
1688
- },
1689
- // Not yet implemented
1690
- [CountryCodes.Indonesia]: {
1691
- label: "clearingCode",
1692
- validators: isNotEmptyValidator
1693
- }
1694
- };
1695
- const branchCodeFields = ["branchCode"];
1696
- function BranchCode(props) {
1697
- const { t } = useTranslation("common");
1698
- const { country, fieldConfig = defaultFieldConfig$1, onFocus, onBlur } = props;
1699
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$1);
1700
- const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
1701
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1702
- ...mergedProps,
1703
- schema: branchCodeFields,
1704
- rules: mergedProps.validators,
1705
- defaultData: mergedProps.data,
1706
- fieldProblems: mergedProps?.fieldValidationErrors
1707
- });
1708
- const { updateStateSlice } = useGlobalDataSlice(
1709
- "payoutAccountDetails"
1710
- );
1711
- const handleBlur = () => {
1712
- onBlur?.();
1713
- handleChangeFor("branchCode", "blur");
1714
- };
1715
- useEffect(() => {
1716
- updateStateSlice({ data, valid, errors, fieldProblems });
1717
- }, [data, valid, errors]);
1718
- const formUtils = createFormUtils(mergedProps, t);
1719
- return /* @__PURE__ */ jsx(
1720
- MaskedInput,
1721
- {
1722
- name: "branchCode",
1723
- type: "text",
1724
- label: formUtils.getLabel("branchCode"),
1725
- formatGuidance: formUtils.getGuidanceText("branchCode"),
1726
- ...formUtils.getMask("branchCode"),
1727
- errorMessage: formUtils.getErrorMessage("branchCode", errors, fieldProblems),
1728
- isValid: valid.branchCode,
1729
- value: data.branchCode ?? "",
1730
- readonly: formUtils.isReadOnly("branchCode"),
1731
- onInput: handleChangeFor("branchCode", "input"),
1732
- onBlur: handleBlur,
1733
- onFocus,
1734
- "aria-required": true,
1735
- "aria-invalid": !valid.branchCode
1736
- }
1737
- );
1738
- }
1739
- const bbanPatternsByCountry = {
1740
- [CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
1741
- [CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
1742
- [CountryCodes.Austria]: /\d{16}/,
1743
- [CountryCodes.Azerbaijan]: /[\dA-Z]{4}\d{20}/,
1744
- [CountryCodes.Belgium]: /\d{12}/,
1745
- [CountryCodes.Bahrain]: /[A-Z]{4}[\dA-Z]{14}/,
1746
- [CountryCodes.BosniaAndHerzegovina]: /\d{16}/,
1747
- [CountryCodes.Brazil]: /\d{23}[A-Z][\dA-Z]/,
1748
- [CountryCodes.Bulgaria]: /[A-Z]{4}\d{6}[\dA-Z]{8}/,
1749
- [CountryCodes.CostaRica]: /\d{17}/,
1750
- [CountryCodes.Croatia]: /\d{17}/,
1751
- [CountryCodes.Cyprus]: /\d{8}[\dA-Z]{16}/,
1752
- [CountryCodes.CzechRepublic]: /\d{20}/,
1753
- [CountryCodes.Denmark]: /\d{14}/,
1754
- [CountryCodes.DominicanRepublic]: /[A-Z]{4}\d{20}/,
1755
- [CountryCodes.Estonia]: /\d{16}/,
1756
- [CountryCodes.FaroeIslands]: /\d{14}/,
1757
- [CountryCodes.Finland]: /\d{14}/,
1758
- [CountryCodes.France]: /\d{10}[\dA-Z]{11}\d{2}/,
1759
- [CountryCodes.Georgia]: /[\dA-Z]{2}\d{16}/,
1760
- [CountryCodes.Germany]: /\d{18}/,
1761
- [CountryCodes.Gibraltar]: /[A-Z]{4}[\dA-Z]{15}/,
1762
- [CountryCodes.Greece]: /\d{7}[\dA-Z]{16}/,
1763
- [CountryCodes.Greenland]: /\d{14}/,
1764
- [CountryCodes.Guatemala]: /[\dA-Z]{4}[\dA-Z]{20}/,
1765
- [CountryCodes.Hungary]: /\d{24}/,
1766
- [CountryCodes.Iceland]: /\d{22}/,
1767
- [CountryCodes.Ireland]: /[\dA-Z]{4}\d{14}/,
1768
- [CountryCodes.Israel]: /\d{19}/,
1769
- [CountryCodes.Italy]: /[A-Z]\d{10}[\dA-Z]{12}/,
1770
- [CountryCodes.Kazakhstan]: /\d{3}[\dA-Z]{13}/,
1771
- [CountryCodes.Kuwait]: /[A-Z]{4}[\dA-Z]{22}/,
1772
- [CountryCodes.Latvia]: /[A-Z]{4}[\dA-Z]{13}/,
1773
- [CountryCodes.Lebanon]: /\d{4}[\dA-Z]{20}/,
1774
- [CountryCodes.Liechtenstein]: /\d{5}[\dA-Z]{12}/,
1775
- [CountryCodes.Lithuania]: /\d{16}/,
1776
- [CountryCodes.Luxembourg]: /\d{3}[\dA-Z]{13}/,
1777
- [CountryCodes.Macedonia]: /\d{3}[\dA-Z]{10}\d{2}/,
1778
- [CountryCodes.Malta]: /[A-Z]{4}\d{5}[\dA-Z]{18}/,
1779
- [CountryCodes.Mauritania]: /\d{23}/,
1780
- [CountryCodes.Mauritius]: /[A-Z]{4}\d{19}[A-Z]{3}/,
1781
- [CountryCodes.Monaco]: /\d{10}[\dA-Z]{11}\d{2}/,
1782
- [CountryCodes.Moldova]: /[\dA-Z]{2}\d{18}/,
1783
- [CountryCodes.Montenegro]: /\d{18}/,
1784
- [CountryCodes.Netherlands]: /[A-Z]{4}\d{10}/,
1785
- [CountryCodes.Norway]: /\d{11}/,
1786
- [CountryCodes.Pakistan]: /[\dA-Z]{4}\d{16}/,
1787
- [CountryCodes.PalestinianTerritory]: /[\dA-Z]{4}\d{21}/,
1788
- [CountryCodes.Poland]: /\d{24}/,
1789
- [CountryCodes.Portugal]: /\d{21}/,
1790
- [CountryCodes.Romania]: /[A-Z]{4}[\dA-Z]{16}/,
1791
- [CountryCodes.SanMarino]: /[A-Z]\d{10}[\dA-Z]{12}/,
1792
- [CountryCodes.SaudiArabia]: /\d{2}[\dA-Z]{18}/,
1793
- [CountryCodes.Serbia]: /\d{18}/,
1794
- [CountryCodes.Slovakia]: /\d{20}/,
1795
- [CountryCodes.Slovenia]: /\d{15}/,
1796
- [CountryCodes.Spain]: /\d{20}/,
1797
- [CountryCodes.Sweden]: /\d{20}/,
1798
- [CountryCodes.Switzerland]: /\d{5}[\dA-Z]{12}/,
1799
- [CountryCodes.Tunisia]: /\d{20}/,
1800
- [CountryCodes.Turkey]: /\d{5}[\dA-Z]{17}/,
1801
- [CountryCodes.UnitedArabEmirates]: /\d{3}\d{16}/,
1802
- [CountryCodes.UnitedKingdom]: /[A-Z]{4}\d{14}/,
1803
- [CountryCodes.VirginIslandsBritish]: /[\dA-Z]{4}\d{16}/
1804
- };
1805
- const customPrefixByCountry = {
1806
- [CountryCodes.Guernsey]: "GB",
1807
- [CountryCodes.Jersey]: "GB",
1808
- [CountryCodes.IsleOfMan]: "GB"
1809
- };
1810
- function ibanValidator(input, bankCountry) {
1811
- if (isEmpty(input)) return false;
1812
- const ibanInput = input.replace(/ /g, "").toUpperCase();
1813
- if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) {
1814
- return false;
1815
- }
1816
- const countryCode = ibanInput.substring(0, 2);
1817
- const allowedPrefix = customPrefixByCountry[bankCountry] ?? bankCountry;
1818
- if (countryCode !== allowedPrefix) {
1819
- return {
1820
- key: "yourIbanShouldBeginWith_",
1821
- values: {
1822
- countryCode: allowedPrefix
1823
- }
1824
- };
1825
- }
1826
- const bbanPattern = bbanPatternsByCountry[countryCode];
1827
- if (bbanPattern) {
1828
- const ibanPattern = new RegExp(`^[A-Z]{2}\\d{2}${bbanPattern.source}$`, "");
1829
- if (!ibanPattern.test(ibanInput)) {
1830
- return false;
1831
- }
1832
- }
1833
- const ibanCheck = ibanInput.substring(4, ibanInput.length) + ibanInput.substring(0, 4);
1834
- let leadingZeroes = true;
1835
- let ibanCheckDigits = "";
1836
- for (let i = 0; i < ibanCheck.length; i += 1) {
1837
- const charAt = ibanCheck.charAt(i);
1838
- if (charAt !== "0") {
1839
- leadingZeroes = false;
1840
- }
1841
- if (!leadingZeroes) {
1842
- ibanCheckDigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
1843
- }
1844
- }
1845
- let cRest = 0;
1846
- for (let p = 0; p < ibanCheckDigits.length; p += 1) {
1847
- const cChar = ibanCheckDigits.charAt(p);
1848
- const cOperator = +`${cRest}${cChar}`;
1849
- cRest = cOperator % 97;
1850
- }
1851
- return cRest === 1;
1852
- }
1853
- const validateIbanOnBlurAndInput = (country) => ({
1854
- modes: ["blur", "input"],
1855
- validate: (iban) => ibanValidator(iban, country) === true,
1856
- errorMessage: (iban) => {
1857
- const result = ibanValidator(iban, country);
1858
- return typeof result === "boolean" ? void 0 : result;
1859
- }
1860
- });
1861
- const ibanMask = (country, inputLength, allowLettersInBban) => {
1862
- const tokens = [];
1863
- tokens.push(...nonInputs(country, { includeInValue: true }), ...numericInputs(2));
1864
- inputLength -= 2;
1865
- const inputToken = allowLettersInBban ? alphanumericInputs : numericInputs;
1866
- const numGroups = Math.floor(inputLength / 4);
1867
- const remainder = inputLength % 4;
1868
- for (let i = 0; i < numGroups; i += 1) {
1869
- tokens.push(spacer, ...inputToken(4));
1870
- }
1871
- if (remainder > 0) {
1872
- tokens.push(spacer, ...inputToken(remainder));
1873
- }
1874
- return {
1875
- mask: makeMask(...tokens),
1876
- transformOnType: allowLettersInBban ? uppercase : void 0
1877
- };
1878
- };
1879
- const ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
1880
- key: "enterTheRemainingNDigitsForExample",
1881
- values: {
1882
- numDigits: `${numDigitsOrChars}`,
1883
- example
1884
- }
1885
- } : {
1886
- key: "enterTheRemainingNCharactersForExample",
1887
- values: {
1888
- numChars: `${numDigitsOrChars}`,
1889
- example
1890
- }
1891
- };
1892
- const ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
1893
- label: "iban",
1894
- validators: validateIbanOnBlurAndInput(country),
1895
- mask: ibanMask(country, inputLength, allowLettersInBban),
1896
- guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
1897
- });
1898
- const gbIbanMetadata = ibanMetadata(
1899
- CountryCodes.UnitedKingdom,
1900
- 20,
1901
- "GB09 BARC 2003 9554 8297 59",
1902
- true
1903
- );
1904
- const defaultFieldMetadata = {
1905
- label: "iban",
1906
- validators: isNotEmptyValidator
1907
- };
1908
- const defaultFieldConfig = {
1909
- [CountryCodes.Austria]: ibanMetadata(CountryCodes.Austria, 18, "AT88 5400 0746 7265 9747"),
1910
- [CountryCodes.Belgium]: ibanMetadata(CountryCodes.Belgium, 14, "BE59 9788 6743 2226"),
1911
- [CountryCodes.Croatia]: ibanMetadata(CountryCodes.Croatia, 19, "HR51 2484 0083 5929 6973 8"),
1912
- [CountryCodes.Cyprus]: ibanMetadata(
1913
- CountryCodes.Cyprus,
1914
- 26,
1915
- "CY16 5183 1221 8756 5858 5388 7678"
1916
- ),
1917
- [CountryCodes.CzechRepublic]: ibanMetadata(
1918
- CountryCodes.CzechRepublic,
1919
- 22,
1920
- "CZ23 5051 3674 5924 5233 3465"
1921
- ),
1922
- [CountryCodes.Denmark]: ibanMetadata(CountryCodes.Denmark, 16, "DK95 2000 0123 4567 89"),
1923
- [CountryCodes.Estonia]: ibanMetadata(CountryCodes.Estonia, 18, "EE26 1291 5123 1542 6371"),
1924
- [CountryCodes.Finland]: ibanMetadata(CountryCodes.Finland, 16, "FI03 9319 8995 3742 51"),
1925
- [CountryCodes.Germany]: ibanMetadata(CountryCodes.Germany, 20, "DE91 1000 0000 0123 4567 89"),
1926
- [CountryCodes.Greece]: ibanMetadata(CountryCodes.Greece, 25, "GR57 0107 7142 7681 6687 9575 217"),
1927
- [CountryCodes.Hungary]: ibanMetadata(
1928
- CountryCodes.Hungary,
1929
- 26,
1930
- "HU68 1070 0024 3428 4128 3192 4812"
1931
- ),
1932
- [CountryCodes.Lithuania]: ibanMetadata(CountryCodes.Lithuania, 18, "LT59 9244 6228 2176 2762"),
1933
- [CountryCodes.Luxembourg]: ibanMetadata(CountryCodes.Luxembourg, 18, "LU71 0106 9242 5365 8562"),
1934
- [CountryCodes.Norway]: ibanMetadata(CountryCodes.Norway, 13, "NO83 3000 1234 567"),
1935
- [CountryCodes.Poland]: ibanMetadata(
1936
- CountryCodes.Poland,
1937
- 26,
1938
- "PL98 1090 2402 7474 4662 2173 1624"
1939
- ),
1940
- [CountryCodes.Portugal]: ibanMetadata(
1941
- CountryCodes.Portugal,
1942
- 23,
1943
- "PT42 0035 0651 8646 9119 5263 5"
1944
- ),
1945
- [CountryCodes.Slovakia]: ibanMetadata(CountryCodes.Slovakia, 22, "SK25 5173 1333 4916 3219 3521"),
1946
- [CountryCodes.Slovenia]: ibanMetadata(CountryCodes.Slovenia, 17, "SI56 1920 0123 4567 892"),
1947
- [CountryCodes.Spain]: ibanMetadata(CountryCodes.Spain, 22, "ES76 1465 5599 9226 7623 2635"),
1948
- [CountryCodes.Sweden]: ibanMetadata(CountryCodes.Sweden, 22, "SE72 8000 0810 3400 0978 3242"),
1949
- // These include letters in the BBAN (bank account number)
1950
- [CountryCodes.Bulgaria]: ibanMetadata(
1951
- CountryCodes.Bulgaria,
1952
- 20,
1953
- "BG17 BNPA 9440 4432 7749 93",
1954
- true
1955
- ),
1956
- [CountryCodes.France]: ibanMetadata(
1957
- CountryCodes.France,
1958
- 25,
1959
- "FR64 1009 6000 4035 3425 9742 Y90",
1960
- true
1961
- ),
1962
- [CountryCodes.Gibraltar]: ibanMetadata(
1963
- CountryCodes.Gibraltar,
1964
- 21,
1965
- "GI96 JYJT 9899 9587 8655 898",
1966
- true
1967
- ),
1968
- [CountryCodes.Ireland]: ibanMetadata(
1969
- CountryCodes.Ireland,
1970
- 20,
1971
- "IE64 IRCE 9205 0112 3456 78",
1972
- true
1973
- ),
1974
- [CountryCodes.Italy]: ibanMetadata(
1975
- CountryCodes.Italy,
1976
- 25,
1977
- "IT06 L030 0203 2809 8485 8934 882",
1978
- true
1979
- ),
1980
- [CountryCodes.Latvia]: ibanMetadata(CountryCodes.Latvia, 19, "LV80 BANK 0000 4351 9500 1", true),
1981
- [CountryCodes.Liechtenstein]: ibanMetadata(
1982
- CountryCodes.Liechtenstein,
1983
- 19,
1984
- "LI21 0881 0000 2324 013A A",
1985
- true
1986
- ),
1987
- [CountryCodes.Malta]: ibanMetadata(
1988
- CountryCodes.Malta,
1989
- 29,
1990
- "MT03 VIXW 2487 8926 8575 8586 8929 858",
1991
- true
1992
- ),
1993
- [CountryCodes.Monaco]: ibanMetadata(
1994
- CountryCodes.Monaco,
1995
- 25,
1996
- "MC58 1122 2000 0101 2345 6789 030",
1997
- true
1998
- ),
1999
- [CountryCodes.Netherlands]: ibanMetadata(
2000
- CountryCodes.Netherlands,
2001
- 16,
2002
- "NL50 ABNA 4452 7591 49",
2003
- true
2004
- ),
2005
- [CountryCodes.Romania]: ibanMetadata(
2006
- CountryCodes.Romania,
2007
- 22,
2008
- "RO36 PORL 9596 9966 4965 4284",
2009
- true
2010
- ),
2011
- [CountryCodes.Switzerland]: ibanMetadata(
2012
- CountryCodes.Switzerland,
2013
- 19,
2014
- "CH56 0483 5012 3456 7800 9",
2015
- true
2016
- ),
2017
- [CountryCodes.UnitedKingdom]: gbIbanMetadata,
2018
- // IBANs for Guernsey, Jersey, and Isle of Man also use United Kingdom's format (starting with `GB`)
2019
- [CountryCodes.Guernsey]: gbIbanMetadata,
2020
- [CountryCodes.Jersey]: gbIbanMetadata,
2021
- [CountryCodes.IsleOfMan]: gbIbanMetadata
2022
- };
2023
- const ibanFields = ["iban"];
2024
- function Iban(props) {
2025
- const { t } = useTranslation("common");
2026
- const {
2027
- country,
2028
- fieldConfig = defaultFieldConfig,
2029
- data: ibanData,
2030
- obscuredFields,
2031
- fieldValidationErrors
2032
- } = props;
2033
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata);
2034
- const mergedProps = mergeFieldMetadataIntoProps("iban", metadata, props);
2035
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2036
- ...mergedProps,
2037
- schema: ibanFields,
2038
- rules: mergedProps.validators,
2039
- defaultData: ibanData,
2040
- fieldProblems: fieldValidationErrors,
2041
- obscuredFields
2042
- });
2043
- const { updateStateSlice } = useGlobalDataSlice(
2044
- "payoutAccountDetails"
2045
- );
2046
- useEffect(() => {
2047
- updateStateSlice({ data, valid, errors, fieldProblems });
2048
- }, [data, errors, valid]);
2049
- const formUtils = createFormUtils(mergedProps, t);
2050
- return /* @__PURE__ */ jsx(
2051
- MaskedInput,
2052
- {
2053
- name: "iban",
2054
- type: "text",
2055
- label: formUtils.getLabel("iban"),
2056
- formatGuidance: formUtils.getGuidanceText("iban"),
2057
- ...formUtils.getMask("iban"),
2058
- errorMessage: formUtils.getErrorMessage("iban", errors, fieldProblems),
2059
- isValid: valid.iban,
2060
- value: data.iban ?? "",
2061
- readonly: formUtils.isReadOnly("iban"),
2062
- onInput: handleChangeFor("iban", "blur"),
2063
- onBlur: handleChangeFor("iban", "blur"),
2064
- "aria-required": true,
2065
- "aria-invalid": !valid.iban,
2066
- acceptObscuredValue: formUtils.isObscured("iban")
2067
- }
2068
- );
2069
- }
2070
- const swiftCodeFieldMetadata = {
2071
- label: "bicSwift",
2072
- validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
2073
- mask: {
2074
- mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
2075
- transformOnType: uppercase
2076
- },
2077
- guidanceText: {
2078
- key: "enterXOrYCharactersForExample",
2079
- values: {
2080
- xChars: "8",
2081
- yChars: "11",
2082
- example: "BANKDE65287"
2083
- }
2084
- }
2085
- };
2086
- const swiftCodeFields = ["swiftCode"];
2087
- function SwiftCode(props) {
2088
- const { t } = useTranslation("common");
2089
- const mergedProps = mergeFieldMetadataIntoProps("swiftCode", swiftCodeFieldMetadata, props);
2090
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2091
- ...mergedProps,
2092
- schema: swiftCodeFields,
2093
- rules: mergedProps.validators,
2094
- defaultData: mergedProps.data,
2095
- fieldProblems: mergedProps?.fieldValidationErrors
2096
- });
2097
- const { updateStateSlice } = useGlobalDataSlice(
2098
- "payoutAccountDetails"
2099
- );
2100
- useEffect(() => {
2101
- updateStateSlice({ data, valid, errors, fieldProblems });
2102
- }, [data, valid, errors]);
2103
- const formUtils = createFormUtils(mergedProps, t);
2104
- return /* @__PURE__ */ jsx(
2105
- MaskedInput,
2106
- {
2107
- name: "swiftCode",
2108
- type: "text",
2109
- label: formUtils.getLabel("swiftCode"),
2110
- formatGuidance: formUtils.getGuidanceText("swiftCode"),
2111
- ...formUtils.getMask("swiftCode"),
2112
- errorMessage: formUtils.getErrorMessage("swiftCode", errors, fieldProblems),
2113
- isValid: valid.swiftCode,
2114
- value: data.swiftCode ?? "",
2115
- readonly: formUtils.isReadOnly("swiftCode"),
2116
- onInput: handleChangeFor("swiftCode", "input"),
2117
- onBlur: handleChangeFor("swiftCode", "blur"),
2118
- "aria-required": true,
2119
- "aria-invalid": !valid.swiftCode
2120
- }
2121
- );
2122
- }
2123
- const countriesWithMultipleCurrencies = /* @__PURE__ */ new Set([
2124
- CountryCodes.Bulgaria,
2125
- CountryCodes.Canada,
2126
- CountryCodes.Croatia,
2127
- CountryCodes.CzechRepublic,
2128
- CountryCodes.Hungary,
2129
- CountryCodes.Romania,
2130
- CountryCodes.Switzerland
2131
- ]);
2132
- const countriesWithLocalFormat = /* @__PURE__ */ new Set([
2133
- CountryCodes.CzechRepublic,
2134
- CountryCodes.Denmark,
2135
- CountryCodes.Hungary,
2136
- CountryCodes.Norway,
2137
- CountryCodes.Poland,
2138
- CountryCodes.Sweden,
2139
- CountryCodes.UnitedKingdom
2140
- ]);
2141
- const payoutCurrencySupport = {
2142
- [CountryCodes.Sweden]: {
2143
- local: [Currencies.SEK],
2144
- iban: [Currencies.EUR, Currencies.SEK]
2145
- },
2146
- [CountryCodes.Canada]: {
2147
- local: [Currencies.CAD, Currencies.USD],
2148
- iban: [Currencies.CAD, Currencies.USD]
2149
- }
2150
- };
2151
- const shouldShowCheckGuidance = (country) => country === "US";
2152
- const shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
2153
- const shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultipleCurrencies.has(country);
2154
- const getSupportedCurrencyGuidance = (i18n, country, requiredFields) => {
2155
- const format = requiredFields.includes("iban") ? "iban" : "local";
2156
- if (!shouldShowPayoutAlert(country)) {
2157
- return;
2158
- }
2159
- const supportedCurrencies = getSupportedCurrenciesPerFormat(country, format);
2160
- if (!supportedCurrencies) {
2161
- return;
2162
- }
2163
- return supportedCurrencies.length > 1 ? i18n.get("payoutIn_Or_", {
2164
- values: { currencyOne: supportedCurrencies[0], currencyTwo: supportedCurrencies[1] }
2165
- }) : i18n.get("payoutInOnly_", {
2166
- values: { currency: supportedCurrencies[0] }
2167
- });
2168
- };
2169
- const getSupportedCurrenciesPerFormat = (country, format) => {
2170
- const supportedCurrencies = payoutCurrencySupport[country];
2171
- if (!supportedCurrencies) {
2172
- const defaultCurrency = currencyByCountry[country]?.[0];
2173
- if (!defaultCurrency) {
2174
- return;
2175
- }
2176
- return format === "iban" ? [Currencies.EUR, defaultCurrency] : [defaultCurrency];
2177
- }
2178
- return supportedCurrencies[format];
2179
- };
2180
- const AccountHolderDescriptionFragment = ({
2181
- legalEntityResponse
2182
- }) => {
2183
- const { i18n } = useI18nContext();
2184
- const hasSolePropEntityAssociations = hasOwnEntityAssociationOfType(
2185
- LegalEntityTypes.SOLE_PROPRIETORSHIP,
2186
- legalEntityResponse.entityAssociations,
2187
- legalEntityResponse.id
2188
- );
2189
- const { accountHolder } = useAccountHolder();
2190
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
2191
- if (accountHolder === "mySoleProprietorName" || hasSolePropEntityAssociations) {
2192
- const soleProp = legalEntityResponse.entityAssociations?.find(
2193
- (ea) => ea.entityType === "soleProprietorship"
2194
- );
2195
- const { individual: individual2 } = legalEntityResponse;
2196
- return /* @__PURE__ */ jsxs(Typography, { children: [
2197
- `${i18n.get("bankAccountHasToBeInYourName")} `,
2198
- /* @__PURE__ */ jsx(
2199
- Typography,
2200
- {
2201
- el: "span",
2202
- variant: "body-stronger",
2203
- children: `${individual2?.name.firstName} ${individual2?.name.lastName}`
2204
- }
2205
- ),
2206
- ` ${i18n.get("orSoleProprietorshipName")} `,
2207
- " ",
2208
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: `${soleProp?.name ?? ""}` })
2209
- ] });
2210
- }
2211
- const hasTrustsEntityAssociations = hasOwnEntityAssociationOfType(
2212
- LegalEntityTypes.TRUST,
2213
- legalEntityResponse.entityAssociations,
2214
- legalEntityResponse.id
2215
- );
2216
- if (accountHolder === "aTrust" || hasTrustsEntityAssociations) {
2217
- const trust = legalEntityResponse.entityAssociations?.find((ea) => ea.entityType === "trust");
2218
- if (legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL) {
2219
- return /* @__PURE__ */ jsxs(Typography, { children: [
2220
- `${i18n.get("bankAccountToHaveSameNameAsTrust")} `,
2221
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: i18n.get("trusteeAsTrusteeForTrust", {
2222
- values: {
2223
- trusteeName: `${legalEntityResponse?.individual?.name.firstName} ${legalEntityResponse?.individual?.name.lastName}`,
2224
- trustName: trust?.name ?? ""
2225
- }
2226
- }) })
2227
- ] });
2228
- }
2229
- const companyTrusteeBankAccountName = legalEntityResponse?.organization?.legalName !== legalEntityResponse?.organization?.doingBusinessAs ? i18n.get("trusteeAsTrusteeForTrustDoingBusinessAs", {
2230
- values: {
2231
- trusteeName: legalEntityResponse?.organization?.legalName ?? "",
2232
- trustName: trust?.name ?? "",
2233
- tradingName: legalEntityResponse?.organization?.doingBusinessAs
2234
- }
2235
- }) : i18n.get("trusteeAsTrusteeForTrust", {
2236
- values: {
2237
- trusteeName: legalEntityResponse?.organization?.legalName ?? "",
2238
- trustName: trust?.name ?? ""
2239
- }
2240
- });
2241
- return /* @__PURE__ */ jsxs(Typography, { children: [
2242
- `${i18n.get("bankAccountToHaveSameNameAsTrust")} `,
2243
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: companyTrusteeBankAccountName })
2244
- ] });
2245
- }
2246
- const hasUnincorporatedPartnershipEntityAssociations = hasOwnEntityAssociationOfType(
2247
- LegalEntityTypes.UNINCORPORATED_PARTNERSHIP,
2248
- legalEntityResponse.entityAssociations,
2249
- legalEntityResponse.id
2250
- );
2251
- if (accountHolder === "anUnincorporatedPartnership" || hasUnincorporatedPartnershipEntityAssociations) {
2252
- const unincorporatedPartnership = legalEntityResponse?.entityAssociations?.find(
2253
- (ea) => ea.entityType === "unincorporatedPartnership"
2254
- );
2255
- const partnerNames = unincorporatedPartnershipMembers?.map((member) => member?.name)?.sort();
2256
- return /* @__PURE__ */ jsx(Typography, { children: `${i18n.get("bankAccountToHaveSameNameAsUnincorporatedPartnership", {
2257
- values: {
2258
- partnerNames: `${partnerNames?.join(", ")}`,
2259
- partnershipName: unincorporatedPartnership?.name ?? ""
2260
- }
2261
- })} ` });
2262
- }
2263
- if (legalEntityResponse.type === LegalEntityTypes.ORGANIZATION) {
2264
- return /* @__PURE__ */ jsxs(Typography, { children: [
2265
- `${i18n.get("bankAccountHasToBeInYourCompanyName")} `,
2266
- /* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: legalEntityResponse?.organization?.legalName })
2267
- ] });
2268
- }
2269
- const { individual } = legalEntityResponse;
2270
- return /* @__PURE__ */ jsxs(Typography, { children: [
2271
- `${i18n.get("bankAccountHasToBeInYourName")} `,
2272
- /* @__PURE__ */ jsx(
2273
- Typography,
2274
- {
2275
- el: "span",
2276
- variant: "body-stronger",
2277
- children: `${individual?.name.firstName} ${individual?.name.lastName}`
2278
- }
2279
- )
2280
- ] });
2281
- };
2282
- const checkGuidance = "adyen-kyc-check-guidance";
2283
- const checkGuidanceImage = "adyen-kyc-check-guidance-image";
2284
- const checkGuidanceAnnotated = "adyen-kyc-check-guidance-annotated";
2285
- const checkGuidanceInactive = "adyen-kyc-check-guidance-inactive";
2286
- const styles = {
2287
- checkGuidance,
2288
- checkGuidanceImage,
2289
- checkGuidanceAnnotated,
2290
- checkGuidanceInactive
2291
- };
2292
- const usCheckAccount = lazy(() => import("./us-check-account-number-C7KE5YzX.js"));
2293
- const usCheckRouting = lazy(() => import("./us-check-routing-number-DUbhsYAR.js"));
2294
- const usCheck = lazy(() => import("./us-check-CYY6Crhr.js"));
2295
- const CheckGuidance = ({ annotated }) => {
2296
- return /* @__PURE__ */ jsxs("div", { className: styles.checkGuidance, children: [
2297
- /* @__PURE__ */ jsx(
2298
- Image,
2299
- {
2300
- lazyLoadedImage: usCheckAccount,
2301
- className: cx(styles.checkGuidanceImage, styles.checkGuidanceAnnotated, {
2302
- [styles.checkGuidanceInactive]: annotated !== "account"
2303
- })
2304
- }
2305
- ),
2306
- /* @__PURE__ */ jsx(
2307
- Image,
2308
- {
2309
- lazyLoadedImage: usCheckRouting,
2310
- className: cx(styles.checkGuidanceImage, styles.checkGuidanceAnnotated, {
2311
- [styles.checkGuidanceInactive]: annotated !== "routing"
2312
- })
2313
- }
2314
- ),
2315
- /* @__PURE__ */ jsx(Image, { lazyLoadedImage: usCheck, className: styles.checkGuidanceImage })
2316
- ] });
2317
- };
2318
- const payoutAccountFields = [
2319
- "accountHolder",
2320
- ...ibanFields,
2321
- ...branchCodeFields,
2322
- ...swiftCodeFields,
2323
- ...bankAccountNumberFields,
2324
- ...bankNameFields,
2325
- ...bankCodeFields
2326
- ];
2327
- const defaultArray = [];
2328
- function PayoutAccount(props) {
2329
- const accountFormat = payoutAccountFormat.value;
2330
- const { t } = useTranslation("banking");
2331
- const { t: commonT } = useTranslation("common");
2332
- const { i18n } = useI18nContext();
2333
- const [checkAnnotation, setCheckAnnotation] = useState();
2334
- const { isSettingEnabled } = useSettingsContext();
2335
- const bankAccountFormatSelectionAllowed = isSettingEnabled(
2336
- SettingNames.AllowBankAccountFormatSelection
2337
- );
2338
- const {
2339
- heading,
2340
- country,
2341
- id,
2342
- legalEntityResponse,
2343
- requiredFields = defaultArray,
2344
- arePayoutAccountDetailsInvalid,
2345
- invalidFieldNames,
2346
- formVerificationErrors,
2347
- fieldValidationErrors
2348
- } = props;
2349
- const showCheckGuidance = shouldShowCheckGuidance(country);
2350
- const formUtils = createFormUtils({ ...props, requiredFields }, commonT);
2351
- const bankAccountNumberProps = getFieldProps(props, bankAccountNumberFields);
2352
- const swiftCodeProps = getFieldProps(props, swiftCodeFields);
2353
- const ibanProps = getFieldProps(
2354
- props,
2355
- ibanFields
2356
- );
2357
- const branchCodeProps = getFieldProps(props, branchCodeFields);
2358
- const bankNameProps = getFieldProps(props, bankNameFields);
2359
- const bankCodeProps = getFieldProps(props, bankCodeFields);
2360
- const bankCityProps = getFieldProps(props, bankCityFields);
2361
- const { clearStateSlice } = useGlobalDataSlice(
2362
- "payoutAccountDetails"
2363
- );
2364
- const handleAccountFormatChange = (accountFormat2) => {
2365
- clearStateSlice();
2366
- payoutAccountFormat.value = accountFormat2;
2367
- };
2368
- return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__payout-account", "aria-describedby": "ariaErrorField", children: [
2369
- /* @__PURE__ */ jsx(FormHeader, { heading, children: /* @__PURE__ */ jsx(
2370
- AccountHolderDescriptionFragment,
2371
- {
2372
- slot: "description",
2373
- legalEntityResponse
2374
- }
2375
- ) }),
2376
- /* @__PURE__ */ jsx(
2377
- ErrorPanel,
2378
- {
2379
- verificationErrors: formVerificationErrors,
2380
- validationErrors: fieldValidationErrors,
2381
- formUtils,
2382
- id: "ariaErrorField"
2383
- }
2384
- ),
2385
- showCheckGuidance ? /* @__PURE__ */ jsx(CheckGuidance, { annotated: checkAnnotation }) : void 0,
2386
- bankAccountFormatSelectionAllowed && shouldShowPayoutAccountFormatSelector(country) && accountFormat && /* @__PURE__ */ jsx(
2387
- BankAccountFormat,
2388
- {
2389
- bankAccountFormat: accountFormat,
2390
- handleAccountFormatChange
2391
- }
2392
- ),
2393
- formUtils.isRequiredField("branchCode") && /* @__PURE__ */ jsx(
2394
- BranchCode,
2395
- {
2396
- ...branchCodeProps,
2397
- country,
2398
- dataStoreId: id,
2399
- onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
2400
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
2401
- }
2402
- ),
2403
- formUtils.isRequiredField("bankAccountNumber") && /* @__PURE__ */ jsx(
2404
- BankAccountNumber,
2405
- {
2406
- ...bankAccountNumberProps,
2407
- country,
2408
- dataStoreId: id,
2409
- onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
2410
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
2411
- }
2412
- ),
2413
- formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, { ...ibanProps, dataStoreId: id, country }),
2414
- formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, { ...swiftCodeProps, dataStoreId: id }),
2415
- formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, { ...bankNameProps, dataStoreId: id }),
2416
- formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, { ...bankCodeProps, country, dataStoreId: id }),
2417
- formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, { ...bankCityProps, dataStoreId: id }),
2418
- shouldShowPayoutAlert(country) && /* @__PURE__ */ jsx(
2419
- Alert,
2420
- {
2421
- title: getSupportedCurrencyGuidance(i18n, country, requiredFields),
2422
- className: "adyen-kyc-u-margin-bottom-8"
2423
- }
2424
- ),
2425
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: t(($) => $["thisAccountWillBeVerifiedToPrevent"]) }),
2426
- arePayoutAccountDetailsInvalid && /* @__PURE__ */ jsx(
2427
- Alert,
2428
- {
2429
- className: "adyen-kyc-u-margin-top-16",
2430
- variant: "error",
2431
- title: invalidFieldNames ? t(($) => $["pleaseEnterValidField"], {
2432
- fieldNames: invalidFieldNames
2433
- }) : t(($) => $["pleaseEnterValidAccountDetails"])
2434
- }
2435
- )
2436
- ] });
2437
- }
2438
- const regions = {
2439
- europe: [
2440
- ...EEA_Countries,
2441
- CountryCodes.Switzerland,
2442
- CountryCodes.UnitedKingdom,
2443
- CountryCodes.Gibraltar
2444
- ],
2445
- apac: [CountryCodes.NewZealand, CountryCodes.Australia]
2446
- };
2447
- const getAllowedBankCountries = (country) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country)) ?? [
2448
- country
2449
- ];
2450
- const tinkLogo = lazy(() => import("./tink-logo-BcIv93ND.js"));
2451
- const plaidLogo = lazy(() => import("./plaid-logo-CtActXTN.js"));
2452
- const yapilyLogo = lazy(() => import("./yapily-logo-CZ4ywjwA.js"));
2453
- const instantVerificationImage = lazy(
2454
- () => import("./instant-verification-Dvvkyfmp.js")
2455
- );
2456
- const manualVerificationImage = lazy(
2457
- () => import("./manual-verification-BvZWqA00.js")
2458
- );
2459
- const getProviderIconName = (providerName) => {
2460
- switch (providerName?.toLowerCase()) {
2461
- case "tink":
2462
- return tinkLogo;
2463
- case "plaid":
2464
- return plaidLogo;
2465
- case "yapily":
2466
- return yapilyLogo;
2467
- default:
2468
- return void 0;
2469
- }
2470
- };
2471
- const makePayoutVerificationMethodsMetadata = (instantVerificationProviderName) => ({
2472
- instantVerification: {
2473
- name: "verifyViaMobileBankingAppOrWebsite",
2474
- subtitle: "instant",
2475
- description: "instantVerificationDescription",
2476
- svgImport: instantVerificationImage,
2477
- provider: instantVerificationProviderName ? {
2478
- name: instantVerificationProviderName,
2479
- svgImport: getProviderIconName(instantVerificationProviderName)
2480
- } : void 0
2481
- },
2482
- manualVerification: {
2483
- name: "uploadABankStatement",
2484
- subtitle: "mayTakeAFewDays",
2485
- description: "manualVerificationDescription",
2486
- svgImport: manualVerificationImage
2487
- }
2488
- });
2489
- const payoutVerificationMethods = ["instantVerification", "manualVerification"];
2490
- const PayoutVerificationMethodOptionFooter = ({
2491
- method,
2492
- methodsMetadata
2493
- }) => {
2494
- const { i18n } = useI18nContext();
2495
- const { provider } = methodsMetadata[method];
2496
- return provider ? /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "adyen-kyc-field-verification-methods__footer", children: [
2497
- i18n.get("poweredBy"),
2498
- provider.svgImport ? /* @__PURE__ */ jsx(
2499
- Image,
2500
- {
2501
- className: "adyen-kyc-field-verification-methods__logo",
2502
- lazyLoadedImage: provider.svgImport
2503
- }
2504
- ) : ` ${provider.name}`
2505
- ] }) : null;
2506
- };
2507
- const payoutVerificationMethodFields = ["payoutVerificationMethod", "bankCountry", ...accountVerificationFields];
2508
- const getMustHaveSameAccountHolderNameTransKey = (legalEntityType) => {
2509
- switch (legalEntityType) {
2510
- case LegalEntityTypes.INDIVIDUAL:
2511
- case LegalEntityTypes.SOLE_PROPRIETORSHIP:
2512
- return "theBankAccountHolderMustBeInYourName";
2513
- case LegalEntityTypes.ORGANIZATION:
2514
- case LegalEntityTypes.TRUST:
2515
- case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
2516
- return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
2517
- }
2518
- };
2519
- function PayoutVerificationMethod(props) {
2520
- const {
2521
- heading,
2522
- country,
2523
- accountHolder,
2524
- provider,
2525
- bankVendorsLoadingStatus,
2526
- instantVerificationAvailable,
2527
- legalEntityResponse,
2528
- validators,
2529
- bankInfoValidated,
2530
- data: payoutVerificationMethodData,
2531
- fieldValidationErrors,
2532
- formVerificationErrors
2533
- } = props;
2534
- const { type: legalEntityType } = legalEntityResponse;
2535
- const { t } = useTranslation("banking");
2536
- const { t: commonT } = useTranslation("common");
2537
- const instantVerificationError = useContext(InstantVerificationErrorContext);
2538
- const { isSettingEnabled } = useSettingsContext();
2539
- const { isExperimentEnabled } = useExperimentsContext();
2540
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
2541
- const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(
2542
- SettingNames.AllowIntraRegionCrossBorderPayout
2543
- );
2544
- const enabledUnbiasedVerificationMethod = isExperimentEnabled(
2545
- "BankVerificationMethodAutonomy_UnbiasedSelection"
2546
- );
2547
- const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
2548
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2549
- ...props,
2550
- schema: payoutVerificationMethodFields,
2551
- defaultData: {
2552
- verifiedAccountHolder: accountHolder,
2553
- verifiedCurrencyCode: currencyByCountry[country]?.[0],
2554
- bankCountry: country,
2555
- ...payoutVerificationMethodData
2556
- },
2557
- rules: validators || {
2558
- payoutVerificationMethod: {
2559
- modes: ["blur"],
2560
- validate: (payoutVerificationMethod) => !enabledUnbiasedVerificationMethod || !!payoutVerificationMethod
2561
- }
2562
- },
2563
- fieldProblems: fieldValidationErrors
2564
- });
2565
- const formUtils = createFormUtils(props, commonT);
2566
- const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
2567
- const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
2568
- useEffect(
2569
- () => updateStateSlice({ data: { ...sliceData, ...data }, errors, valid, fieldProblems }),
2570
- [data, errors, fieldProblems, valid]
2571
- );
2572
- const methodsMetadata = makePayoutVerificationMethodsMetadata(provider?.name);
2573
- const selectVerificationMethod = (method) => {
2574
- setHasSelectedMethod(true);
2575
- handleChangeFor("payoutVerificationMethod")(method);
2576
- };
2577
- useEffect(() => {
2578
- if (bankInfoValidated || enabledUnbiasedVerificationMethod) return;
2579
- if (!hasSelectedMethod && instantVerificationAvailable && data.payoutVerificationMethod !== "instantVerification") {
2580
- handleChangeFor("payoutVerificationMethod")("instantVerification");
2581
- }
2582
- if (!instantVerificationAvailable && data.payoutVerificationMethod !== "manualVerification") {
2583
- handleChangeFor("payoutVerificationMethod")("manualVerification");
2584
- }
2585
- }, [
2586
- data.payoutVerificationMethod,
2587
- handleChangeFor,
2588
- instantVerificationAvailable,
2589
- hasSelectedMethod,
2590
- bankInfoValidated
2591
- ]);
2592
- const { dataset: countries } = useDataset(datasetIdentifier.country);
2593
- const bankCountryName = countries.find((country2) => country2.id === data.bankCountry)?.name ?? data.bankCountry;
2594
- const allowedBankCountries = getAllowedBankCountries(country);
2595
- const countryField = /* @__PURE__ */ jsx(
2596
- CountryField,
2597
- {
2598
- data: { country: data.bankCountry },
2599
- valid: { country: valid?.bankCountry },
2600
- errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
2601
- labels: { country: formUtils.getLabel("bankCountry", "bankAccountCountryRegion") },
2602
- readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
2603
- allowedCountries: allowedBankCountries,
2604
- handleChangeFor: () => (e) => {
2605
- clearPayoutAccountDetails();
2606
- return handleChangeFor("bankCountry", "input")(e);
2607
- },
2608
- helperText: {
2609
- country: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(
2610
- ($) => $[legalEntityType === LegalEntityTypes.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"]
2611
- )
2612
- }
2613
- }
2614
- );
2615
- const description = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
2616
- t(($) => $["forYouToReceiveYourPayouts"]),
2617
- " ",
2618
- /* @__PURE__ */ jsx(
2619
- Trans,
2620
- {
2621
- t,
2622
- ns: "banking",
2623
- i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
2624
- values: { name: accountHolder, companyName: accountHolder }
2625
- }
2626
- )
2627
- ] });
2628
- return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-payout-verification-method", children: [
2629
- /* @__PURE__ */ jsx(FormHeader, { heading, children: /* @__PURE__ */ jsx("div", { slot: "description", className: "adyen-kyc-u-margin-bottom-12", children: description }) }),
2630
- instantVerificationError && /* @__PURE__ */ jsx(
2631
- Alert,
2632
- {
2633
- variant: "error",
2634
- className: "adyen-kyc-instant-verification-error",
2635
- title: instantVerificationError.title,
2636
- children: instantVerificationError.content && /* @__PURE__ */ jsx("p", { className: "adyen-kyc-u-margin-0", children: instantVerificationError.content })
2637
- }
2638
- ),
2639
- countryField,
2640
- /* @__PURE__ */ jsx(
2641
- Field,
2642
- {
2643
- el: "fieldset",
2644
- name: "verificationMethods",
2645
- label: formUtils.getLabel("payoutVerificationMethod", "verificationMethod"),
2646
- errorMessage: formUtils.getErrorMessage("payoutVerificationMethod", errors, fieldProblems),
2647
- helper: instantVerificationAvailable ? void 0 : t(($) => $["weDoNotYetSupportInstantVerificationForBankAccountsIn"], {
2648
- countryName: bankCountryName
2649
- }),
2650
- children: (childProps) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
2651
- RadioGroupCard,
2652
- {
2653
- ...childProps,
2654
- name: "verificationMethod",
2655
- options: payoutVerificationMethods,
2656
- onSelect: selectVerificationMethod,
2657
- selected: data.payoutVerificationMethod,
2658
- optionId: (method) => method,
2659
- optionName: (method) => methodsMetadata[method].name,
2660
- optionDescription: (method) => methodsMetadata[method].description,
2661
- optionSubtitle: (method) => methodsMetadata[method].subtitle,
2662
- className: "adyen-kyc-field-verification-methods",
2663
- optionClassNames: () => ({
2664
- label: "adyen-kyc-field-verification-methods__card"
2665
- }),
2666
- isOptionDisabled: (option) => bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
2667
- renderOptionIcon: (method) => /* @__PURE__ */ jsx("div", { className: "adyen-kyc-radio-group-card__illustration", children: methodsMetadata[method]?.svgImport && /* @__PURE__ */ jsx(Image, { lazyLoadedImage: methodsMetadata[method].svgImport }) }),
2668
- renderOptionFooter: (method) => /* @__PURE__ */ jsx(
2669
- PayoutVerificationMethodOptionFooter,
2670
- {
2671
- method,
2672
- methodsMetadata
2673
- }
2674
- ),
2675
- floatingRadio: true
2676
- }
2677
- ) })
2678
- }
2679
- ),
2680
- /* @__PURE__ */ jsx(
2681
- ErrorPanel,
2682
- {
2683
- verificationErrors: formVerificationErrors,
2684
- validationErrors: fieldValidationErrors,
2685
- formUtils,
2686
- id: "ariaErrorField"
2687
- }
2688
- ),
2689
- provider && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
2690
- ContextGuidance,
2691
- {
2692
- titleId: "howDoesVerificationWithOurPartnerWorks",
2693
- contentId: "bankVerificationWithPartnerSteps",
2694
- title: t(($) => $["howDoesVerificationWithOurPartnerWork"], {
2695
- provider: provider.name
2696
- }),
2697
- content: /* @__PURE__ */ jsxs(Fragment, { children: [
2698
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], {
2699
- provider: provider.name
2700
- }) }),
2701
- /* @__PURE__ */ jsxs("ul", { children: [
2702
- /* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
2703
- /* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
2704
- /* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
2705
- ] }),
2706
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) }),
2707
- /* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: commonT(($) => $["adyenPrivacyPolicy"]) }) })
2708
- ] })
2709
- }
2710
- ) : void 0
2711
- ] });
2712
- }
2713
- const payoutSteps = {
2714
- payoutVerificationMethod: {
2715
- formId: "payoutVerificationMethod",
2716
- formName: "verificationMethod",
2717
- fields: payoutVerificationMethodFields
2718
- },
2719
- payoutAccountDetails: {
2720
- formId: "payoutAccountDetails",
2721
- formName: "bankAccount",
2722
- fields: payoutAccountFields
2723
- },
2724
- payoutAccountDocuments: {
2725
- formId: "payoutAccountDocuments",
2726
- formName: "bankDocument",
2727
- formHeader: "bankDocumentHeader",
2728
- formDescription: "bankDocumentDescription",
2729
- fields: bankDocumentFields
2730
- },
2731
- payoutAccountVerification: {
2732
- formId: "payoutAccountVerification",
2733
- formName: "instantVerification",
2734
- fields: accountVerificationFields
2735
- }
2736
- };
2737
- const PayoutVerificationMethodFormID = payoutSteps.payoutVerificationMethod.formId;
2738
- const PayoutAccountDocumentsFormID = payoutSteps.payoutAccountDocuments.formId;
2739
- const PayoutAccountVerificationFormID = payoutSteps.payoutAccountVerification.formId;
2740
- function PayoutDetails(props) {
2741
- const { t } = useTranslation("banking");
2742
- const { t: commonT } = useTranslation("common");
2743
- const {
2744
- activeForm,
2745
- legalEntityResponse,
2746
- associatedLegalArrangement,
2747
- provider,
2748
- bankVendorsLoadingStatus,
2749
- instantVerificationAvailable,
2750
- setHideSidebar,
2751
- setSkipSubmit,
2752
- createTrustedTransferInstrument: createTrustedTransferInstrument2,
2753
- accountDetailsFromInput,
2754
- country,
2755
- accountHolder,
2756
- data: propData,
2757
- onBack,
2758
- trustedTransferInstrumentId
2759
- } = props;
2760
- const [instantVerificationError, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
2761
- const verificationMethodFormProps = getFormProps(props, PayoutVerificationMethodFormID);
2762
- const accountVerificationFormProps = getFormProps(props, PayoutAccountVerificationFormID);
2763
- const payoutAccountFormProps = getFormProps(props, payoutSteps.payoutAccountDetails.formId);
2764
- const bankDocumentFormProps = getFormProps(props, PayoutAccountDocumentsFormID);
2765
- const taskHeading = t(($) => $["addABankAccountForPayouts"]);
2766
- const isBankStatementDocumentOptional = createFormUtils(
2767
- bankDocumentFormProps ?? {},
2768
- commonT
2769
- ).isOptionalField("bankStatementDocument");
2770
- const globalData = useGlobalData();
2771
- const data = isEmpty(globalData) || propData?.payoutAccountDetails?.transferInstrumentId ? propData : globalData;
2772
- const resetData = useResetGlobalData();
2773
- const verifyInstantly = data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification";
2774
- const bankCountry = data?.payoutVerificationMethod?.bankCountry ?? country;
2775
- const bankDocumentDescription = t(
2776
- ($) => $[legalEntityResponse.type === "individual" ? "toHelpVerifyYourBankDetailsIndividual" : "toHelpVerifyYourBankDetailsBusiness"]
2777
- );
2778
- useEffect(() => resetData(), [resetData]);
2779
- useEffect(() => {
2780
- if (activeForm?.formId === summaryStep.formId && verifyInstantly && trustedTransferInstrumentId) {
2781
- setSkipSubmit?.(true);
2782
- }
2783
- }, [activeForm, trustedTransferInstrumentId]);
2784
- const [bankInfoValidated, setBankInfoValidated] = useState(false);
2785
- const [arePayoutAccountDetailsInvalid, setArePayoutAccountDetailsInvalid] = useState(false);
2786
- const [invalidFieldNames, setInvalidFieldNames] = useState("");
2787
- const payload = useMemo(
2788
- () => bankCountry && accountDetailsFromInput ? getAccountIdentificationFromPayoutAccountSchema(accountDetailsFromInput, bankCountry) : {},
2789
- [accountDetailsFromInput, bankCountry]
2790
- );
2791
- const validateAccountDetails = useAsyncAccountDetailsValidationRules(
2792
- payload,
2793
- hasEmptyFields(payload),
2794
- isAccountIdentifierObscured(payload)
2795
- );
2796
- const resetInvalidFieldState = () => {
2797
- setInvalidFieldNames("");
2798
- setArePayoutAccountDetailsInvalid(false);
2799
- };
2800
- useEffect(() => {
2801
- if (validateAccountDetails?.invalidFields && validateAccountDetails.invalidFields.length > 0) {
2802
- const fieldNames = validateAccountDetails.invalidFields.map((field) => extractFieldName(field.name)).map((key) => commonT(($) => $[key]));
2803
- const invalidFieldsString = concatenateFieldNames(fieldNames);
2804
- setInvalidFieldNames(invalidFieldsString);
2805
- setArePayoutAccountDetailsInvalid(true);
2806
- } else {
2807
- resetInvalidFieldState();
2808
- }
2809
- }, [t, validateAccountDetails]);
2810
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-payout", children: [
2811
- /* @__PURE__ */ jsx(
2812
- "div",
2813
- {
2814
- className: activeForm?.formId !== PayoutVerificationMethodFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
2815
- children: /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, { value: instantVerificationError, children: /* @__PURE__ */ jsx(
2816
- PayoutVerificationMethod,
2817
- {
2818
- ...verificationMethodFormProps,
2819
- id: PayoutVerificationMethodFormID,
2820
- heading: taskHeading,
2821
- country,
2822
- accountHolder,
2823
- legalEntityResponse,
2824
- provider,
2825
- bankVendorsLoadingStatus,
2826
- bankInfoValidated,
2827
- instantVerificationAvailable
2828
- }
2829
- ) })
2830
- }
2831
- ),
2832
- verifyInstantly ? /* @__PURE__ */ jsx(
2833
- "div",
2834
- {
2835
- className: activeForm?.formId !== PayoutAccountVerificationFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
2836
- children: /* @__PURE__ */ jsx(
2837
- BankVerification,
2838
- {
2839
- ...accountVerificationFormProps,
2840
- heading: t(($) => $["bankAccountVerification"]),
2841
- id: PayoutAccountVerificationFormID,
2842
- provider,
2843
- country: bankCountry,
2844
- onBack,
2845
- hideSidebar: setHideSidebar,
2846
- setBankVerificationError: setInstantVerificationError,
2847
- bankInfoValidated,
2848
- setBankInfoValidated,
2849
- formIsActive: activeForm?.formId === PayoutAccountVerificationFormID,
2850
- createTrustedTransferInstrument: createTrustedTransferInstrument2
2851
- }
2852
- )
2853
- }
2854
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
2855
- /* @__PURE__ */ jsx(
2856
- "div",
2857
- {
2858
- className: activeForm?.formId !== payoutSteps.payoutAccountDetails.formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
2859
- children: /* @__PURE__ */ jsx(
2860
- PayoutAccount,
2861
- {
2862
- ...payoutAccountFormProps,
2863
- heading: taskHeading,
2864
- id: payoutSteps.payoutAccountDetails.formId,
2865
- country: bankCountry,
2866
- legalEntityResponse,
2867
- arePayoutAccountDetailsInvalid,
2868
- invalidFieldNames
2869
- }
2870
- )
2871
- }
2872
- ),
2873
- /* @__PURE__ */ jsx(
2874
- "div",
2875
- {
2876
- className: activeForm?.formId !== PayoutAccountDocumentsFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
2877
- children: /* @__PURE__ */ jsx(
2878
- MemoizedBankDocument,
2879
- {
2880
- ...bankDocumentFormProps,
2881
- heading: t(
2882
- ($) => $[isBankStatementDocumentOptional ? "uploadABankDocumentOptional" : "uploadABankDocument"]
2883
- ),
2884
- description: bankDocumentDescription,
2885
- id: PayoutAccountDocumentsFormID,
2886
- legalEntity: legalEntityResponse,
2887
- associatedLegalArrangement,
2888
- country: bankCountry,
2889
- formIsActive: activeForm?.formId === PayoutAccountDocumentsFormID
2890
- }
2891
- )
2892
- }
2893
- )
2894
- ] }),
2895
- /* @__PURE__ */ jsx(Show, { when: showPayoutVerificationMethodError, children: /* @__PURE__ */ jsx(
2896
- Confirm,
2897
- {
2898
- analyticsEventLabel: "payoutVerificationMethodError",
2899
- title: t(($) => $["toContinuePleaseChooseAVerificationMethod"]),
2900
- confirmText: commonT(($) => $["ok"]),
2901
- onConfirm: () => {
2902
- showPayoutVerificationMethodError.value = false;
2903
- }
2904
- }
2905
- ) })
2906
- ] });
2907
- }
2908
- const rules = ({
2909
- data,
2910
- requiredFields,
2911
- isExperimentEnabled
2912
- }) => createFormRules({
2913
- whenUsingManualVerification: () => {
2914
- if (!data.payoutVerificationMethod) return;
2915
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
2916
- return "REQUIRED";
2917
- }
2918
- },
2919
- whenUsingInstantVerification: () => {
2920
- if (!data.payoutVerificationMethod) {
2921
- return "REQUIRED";
2922
- }
2923
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
2924
- return "REQUIRED";
2925
- }
2926
- },
2927
- verifiedBankAccountNumber: () => {
2928
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
2929
- return "REQUIRED";
2930
- }
2931
- },
2932
- bankStatementRequirement: () => {
2933
- if (data?.payoutVerificationMethod?.payoutVerificationMethod !== "instantVerification" && (isExperimentEnabled?.("EnableCheckOnCreateBankAccount") || isExperimentEnabled?.("BankVerificationFlowOptimization_CAASIntegration"))) {
2934
- return "REQUIRED";
2935
- }
2936
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
2937
- return requiredFields?.bankStatementRequirement;
2938
- }
2939
- },
2940
- // "bankStatement description" field is always "optional" and it's coupled with bank statement document.
2941
- bankStatementDescription: () => {
2942
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification" && !!requiredFields?.bankStatementRequirement) {
2943
- return "OPTIONAL";
2944
- }
2945
- }
2946
- });
2947
- const mapApiDocumentToPayoutDocuments = (entityId) => {
2948
- const bankStatement = getDocument(entityId, "bankStatement");
2949
- if (!bankStatement) throw new Error(`bankStatement with id ${entityId} not found`);
2950
- return {
2951
- bankStatementDocument: [mapExistingFile(getPageName(bankStatement))],
2952
- description: bankStatement.description
2953
- };
2954
- };
2955
- const mapPayoutDetailsToTransferInstrument = ({
2956
- data,
2957
- legalEntity
2958
- }) => {
2959
- if (!data.payoutAccountDetails || !data.payoutVerificationMethod) {
2960
- throw new Error("Missing payout details data");
2961
- }
2962
- return {
2963
- bankAccount: mapPayoutAccountSchemaToApiBankAccount(
2964
- data.payoutAccountDetails,
2965
- data.payoutVerificationMethod.bankCountry
2966
- ),
2967
- legalEntityId: legalEntity.id,
2968
- type: "bankAccount"
2969
- };
2970
- };
2971
- const mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
2972
- const { bankStatementDocument, description } = data.payoutAccountDocuments ?? {};
2973
- if (!bankStatementDocument) {
2974
- throw new Error("Bank statement document missing");
2975
- }
2976
- const page1 = bankStatementDocument[0];
2977
- if (!page1) {
2978
- throw new Error("Document needs at least one page");
2979
- }
2980
- const existingDocument = getDocument(entityId, "bankStatement");
2981
- return await createDocumentRequest({
2982
- entityId,
2983
- entityType: "bankAccount",
2984
- documentType: "bankStatement",
2985
- page1,
2986
- description,
2987
- existingDocument
2988
- });
2989
- };
2990
- const CUSTOM_LABELS = {
2991
- verifiedAccountHolder: "accountHolder",
2992
- verifiedBankCountry: "bankCountry",
2993
- verifiedBankName: "bankName",
2994
- verifiedCurrencyCode: "currencyCode",
2995
- verifiedBankAccountNumber: "bankAccountNumber"
2996
- };
2997
- const formatAccountVerificationSummary = (data) => {
2998
- if (!data) return {};
2999
- const summary = {};
3000
- keysOf(CUSTOM_LABELS).forEach((key) => {
3001
- if (!data[key]) return;
3002
- summary[key] = summaryItem(CUSTOM_LABELS[key], data[key]);
3003
- });
3004
- return summary;
3005
- };
3006
- const obscuredPayoutFields = ["bankAccountNumber", "iban"];
3007
- const payoutDetailsCountryConfig = {
3008
- [CountryCodes.Canada]: {
3009
- bankStatementDocument: {
3010
- label: "listitemVoidedChequeBankLetterBankStatementOnline"
3011
- }
3012
- },
3013
- [CountryCodes.UnitedKingdom]: {
3014
- bankCity: {
3015
- label: "bankCityTown"
3016
- },
3017
- bankStatementDocument: {
3018
- label: "listitemVoidedChequeBankLetterBankStatementOnline"
3019
- }
3020
- }
3021
- };
3022
- const parseConfiguration = ({
3023
- requiredFields,
3024
- country,
3025
- bankVerificationAvailable
3026
- }) => parsePayoutScenarios({
3027
- requiredFields: requiredFields?.fields,
3028
- country,
3029
- bankVerificationAvailable
3030
- });
3031
- function parsePayoutScenarios({
3032
- requiredFields,
3033
- country,
3034
- bankVerificationAvailable
3035
- }) {
3036
- if (!requiredFields) return {};
3037
- let formConfig = {
3038
- payoutVerificationMethod: {
3039
- rule: "REQUIRED"
3040
- },
3041
- bankCountry: {
3042
- rule: "REQUIRED"
3043
- },
3044
- bankStatementDocument: {
3045
- rule: "bankStatementRequirement"
3046
- },
3047
- description: {
3048
- rule: "bankStatementDescription"
3049
- }
3050
- };
3051
- requiredFields.forEach((fieldName) => {
3052
- formConfig[fieldName] = {
3053
- rule: bankVerificationAvailable ? "whenUsingManualVerification" : "REQUIRED",
3054
- obscured: obscuredPayoutFields.includes(fieldName)
3055
- };
3056
- });
3057
- if (bankVerificationAvailable) {
3058
- formConfig = {
3059
- ...formConfig,
3060
- verifiedAccountHolder: {
3061
- rule: "whenUsingInstantVerification"
3062
- },
3063
- verifiedBankCountry: {
3064
- rule: "whenUsingInstantVerification"
3065
- },
3066
- verifiedBankName: {
3067
- rule: "whenUsingInstantVerification"
3068
- },
3069
- verifiedCurrencyCode: {
3070
- rule: "whenUsingInstantVerification"
3071
- },
3072
- verifiedBankAccountNumber: {
3073
- rule: "whenUsingInstantVerification"
3074
- }
3075
- };
3076
- }
3077
- return augmentWithCountryConfigs(payoutDetailsCountryConfig[country], formConfig);
3078
- }
3079
- const getAppropriatePayoutDetailsSteps = (isEditing, instantVerificationAvailable, canChangeCountry) => {
3080
- const dependentSteps = {
3081
- payoutAccountDetails: payoutSteps.payoutAccountDetails,
3082
- payoutAccountDocuments: payoutSteps.payoutAccountDocuments,
3083
- payoutAccountVerification: payoutSteps.payoutAccountVerification
3084
- };
3085
- if (!isEditing && (instantVerificationAvailable || canChangeCountry)) {
3086
- return {
3087
- payoutVerificationMethod: payoutSteps.payoutVerificationMethod,
3088
- ...dependentSteps
3089
- };
3090
- }
3091
- return dependentSteps;
3092
- };
3093
- const getInvalidFieldsErrorHeader = (invalidField) => {
3094
- switch (invalidField) {
3095
- case "LEGAL_BUSINESS_NAME":
3096
- case "FIRST_NAME":
3097
- case "LAST_NAME":
3098
- return "caasBankAccountHolderDoesNotMatch";
3099
- default:
3100
- return "weCouldntCompleteTheAccountCheck";
3101
- }
3102
- };
3103
- const getInvalidFieldsErrorContent = (invalidField) => {
3104
- switch (invalidField) {
3105
- case "LEGAL_BUSINESS_NAME":
3106
- return "caasBankAccountMustBeInYourNameYourBusinessLegalNameOrDoingBusinessAs";
3107
- case "FIRST_NAME":
3108
- case "LAST_NAME":
3109
- return "caasBankAccountMustBeInYourName";
3110
- default:
3111
- return "weCouldntCompleteTheAccountCheck";
3112
- }
3113
- };
3114
- const defaultInvalidErrorMessage = {
3115
- header: "weCouldntCompleteTheAccountCheck",
3116
- content: "weCouldntCompleteTheAccountCheck"
3117
- };
3118
- const getInvalidFieldsErrorMessage = (errors) => {
3119
- if (!errors || errors.length === 0) {
3120
- return defaultInvalidErrorMessage;
3121
- }
3122
- const [firstError] = errors;
3123
- const { invalidFields } = firstError;
3124
- if (!invalidFields || invalidFields.length === 0) {
3125
- return defaultInvalidErrorMessage;
3126
- }
3127
- const [firstInvalidField] = invalidFields;
3128
- return {
3129
- header: getInvalidFieldsErrorHeader(firstInvalidField),
3130
- content: getInvalidFieldsErrorContent(firstInvalidField)
3131
- };
3132
- };
3133
- const getPayoutVerificationMethod = (transferInstrument, instantVerificationEnabled, enabledUnbiasedVerificationMethod) => {
3134
- if (transferInstrument) {
3135
- return "manualVerification";
3136
- } else {
3137
- return enabledUnbiasedVerificationMethod || !instantVerificationEnabled ? void 0 : "instantVerification";
3138
- }
3139
- };
3140
- function PayoutDetailsDropin({
3141
- legalEntityResponse,
3142
- associatedLegalArrangement,
3143
- problems: propProblems,
3144
- onSubmit: externalOnSubmit,
3145
- onChange,
3146
- asModal = false,
3147
- handleCloseClick,
3148
- taskType: propTaskType,
3149
- handleHomeClick,
3150
- currentTransferInstrumentId,
3151
- setCurrentTransferInstrumentId,
3152
- navigateBackToTaskList,
3153
- handleBackClick: externalBackClick,
3154
- hideSidebar,
3155
- openBankingPartnerConfigId
3156
- }) {
3157
- const { baseUrl, rootLegalEntityId } = useApiContext();
3158
- const {
3159
- data: transferInstrument,
3160
- refetch: refetchTransferInstrument,
3161
- isLoading: isTransferInstrumentLoading
3162
- } = useTransferInstrument(currentTransferInstrumentId ?? skipToken);
3163
- const { mutateAsync: handleUpdateTransferInstrument } = useUpdateTransferInstrument();
3164
- const {
3165
- mutateAsync: handleCreateTrustedTransferInstrument,
3166
- status: createTrustedTransferInstrumentStatus
3167
- } = useCreateTrustedTransferInstrument();
3168
- const [previousTrustedInstrumentStatus, setPreviousTrustedInstrumentStatus] = useState(
3169
- createTrustedTransferInstrumentStatus
3170
- );
3171
- const { t, i18n: i18next } = useTranslation("common");
3172
- const { i18n } = useI18nContext();
3173
- const userEvents = useAnalyticsContext();
3174
- const { showToast, clearToasts } = useToastContext();
3175
- const { isExperimentEnabled } = useExperimentsContext();
3176
- const { isSettingEnabled } = useSettingsContext();
3177
- const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
3178
- const existingPayoutDetails = useMemo(
3179
- () => transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument) : void 0,
3180
- [transferInstrument]
3181
- );
3182
- const [documents, setDocuments] = useState();
3183
- const [isCaasCalled, setIsCaasCalled] = useState(false);
3184
- const enableCheckOnCreateBankAccount = isExperimentEnabled("EnableCheckOnCreateBankAccount") || isExperimentEnabled("BankVerificationFlowOptimization_CAASIntegration");
3185
- const enabledUnbiasedVerificationMethod = isExperimentEnabled(
3186
- "BankVerificationMethodAutonomy_UnbiasedSelection"
3187
- );
3188
- const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
3189
- const fallbackCurrency = currencyByCountry[defaultPayoutCountry]?.[0];
3190
- const accountHolderName = accountHolder || getLegalEntityNameBasedOnType(legalEntityResponse);
3191
- const instantVerificationEnabled = Boolean(
3192
- !isTransferInstrumentLoading && !transferInstrument && isSettingEnabled("instantBankVerification")
3193
- );
3194
- const taskType = propTaskType ?? TaskTypes.PAYOUT;
3195
- const [trustedTransferInstrumentId, setTrustedTransferInstrumentId] = useState();
3196
- const prefilledData = {
3197
- payoutAccountDetails: {
3198
- accountHolder: accountHolderName,
3199
- currency: fallbackCurrency,
3200
- ...existingPayoutDetails?.payoutAccountDetails
3201
- },
3202
- payoutVerificationMethod: {
3203
- payoutVerificationMethod: getPayoutVerificationMethod(
3204
- transferInstrument,
3205
- instantVerificationEnabled,
3206
- enabledUnbiasedVerificationMethod
3207
- ),
3208
- bankCountry: defaultPayoutCountry,
3209
- ...existingPayoutDetails?.payoutVerificationMethod
3210
- },
3211
- payoutAccountVerification: {
3212
- verifiedAccountHolder: accountHolderName,
3213
- verifiedBankCountry: defaultPayoutCountry,
3214
- ...existingPayoutDetails?.payoutAccountVerification
3215
- }
3216
- };
3217
- const documentUtils = documentApiUtils({
3218
- baseUrl: baseUrl.value,
3219
- rootLegalEntityId: rootLegalEntityId.value
3220
- });
3221
- const {
3222
- state: { currentState }
3223
- } = useStateContext();
3224
- const formValidity = currentState.validityByForm;
3225
- const bankAccountCountry = currentState?.data?.payoutVerificationMethod?.bankCountry ?? defaultPayoutCountry;
3226
- const [hideFooterAndSidebar, setHideFooterAndSidebar] = useState(false);
3227
- const [skipSubmit, setSkipSubmit] = useState(false);
3228
- const [loadingStatus, setLoadingStatus] = useState("loading");
3229
- const [isSubmitting, setIsSubmitting] = useState(false);
3230
- const [configurationLoadingStatus, setConfigurationLoadingStatus] = useState("loading");
3231
- const [data, setData] = useState(prefilledData);
3232
- const [problems, setProblems] = useState(
3233
- propProblems || (transferInstrument?.id ? getCapabilityProblems(legalEntityResponse, bankAccountCountry)?.BankAccount?.[transferInstrument.id] : void 0)
3234
- );
3235
- const [accountDetailsFromInput, setAccountDetailsFromInput] = useState(
3236
- prefilledData.payoutAccountDetails
3237
- );
3238
- const isMaskedBankAccountNumber = data.payoutAccountDetails?.bankAccountNumber?.includes("*") || data.payoutAccountDetails?.iban?.includes("*");
3239
- const existingBankAccountFormat = transferInstrument ? existingPayoutDetails?.payoutAccountDetails?.iban ? "iban" : "local" : void 0;
3240
- const checkAsAServiceAnalyticsProps = {
3241
- "Experiment name": ExperimentNames.BankVerificationFlowOptimization_CAASIntegration,
3242
- "Experiment value": enableCheckOnCreateBankAccount ? "TREATMENT" : "CONTROL"
3243
- };
3244
- useEffect(() => {
3245
- userEvents.updateBaseTrackingPayload({ task: taskType });
3246
- userEvents.addTaskEvent("Landed on page", {
3247
- actionType: "start",
3248
- ...checkAsAServiceAnalyticsProps
3249
- });
3250
- }, []);
3251
- useEffect(() => {
3252
- setData({
3253
- ...currentState.data,
3254
- payoutAccountDetails: {
3255
- ...currentState.data?.payoutAccountDetails,
3256
- currency: currencyByCountry[bankAccountCountry]?.[0]
3257
- }
3258
- });
3259
- onChange?.(currentState);
3260
- }, [bankAccountCountry, currentState, onChange]);
3261
- const {
3262
- data: providers,
3263
- refetch: refetchBankVerificationProviders,
3264
- status: bankVendorsLoadingStatus
3265
- } = useBankVerificationProviders(
3266
- {
3267
- country: bankAccountCountry,
3268
- configId: openBankingPartnerConfigId,
3269
- locale: i18next.language
3270
- },
3271
- {
3272
- enabled: instantVerificationEnabled
3273
- }
3274
- );
3275
- const instantVerificationAvailable = useMemo(
3276
- () => Boolean(instantVerificationEnabled && providers?.[0]?.redirectUrl),
3277
- [instantVerificationEnabled, providers]
3278
- );
3279
- const getPayoutAccountFormatData = useCallback(
3280
- async () => getAccountFormatsForCountry(bankAccountCountry),
3281
- [bankAccountCountry]
3282
- );
3283
- const { fieldConfigurations, requiredFields } = useScenarioConfiguration({
3284
- parseConfiguration,
3285
- legalEntityType: legalEntityResponse.type,
3286
- getPayoutAccountFormatData,
3287
- instantVerificationAvailable,
3288
- setLoadingStatus: setConfigurationLoadingStatus,
3289
- country: bankAccountCountry,
3290
- existingBankAccountFormat
3291
- });
3292
- const fieldsFromCustomRules = useMemo(
3293
- () => rules({
3294
- data,
3295
- requiredFields,
3296
- isExperimentEnabled
3297
- }),
3298
- [bankAccountCountry, data, taskType, isExperimentEnabled]
3299
- );
3300
- const apiBankAccount = useMemo(() => {
3301
- const payoutAccountDetails = data.payoutAccountDetails ?? { bankAccountNumber: "" };
3302
- return mapPayoutAccountSchemaToApiBankAccount(payoutAccountDetails, bankAccountCountry);
3303
- }, [data, bankAccountCountry]);
3304
- const {
3305
- data: checkAsAServiceData,
3306
- refetch: refetchCheckAsAService,
3307
- isLoading: isCheckAsAServiceLoading,
3308
- isError: isCheckAsAServiceError
3309
- } = useCheck(apiBankAccount.accountIdentification, {
3310
- enabled: false
3311
- });
3312
- const checkAsAServiceResultStatus = checkAsAServiceData?.status;
3313
- const checkAsAServiceResultErrors = checkAsAServiceData?.errors;
3314
- const [isModalOpen, setIsModalOpen] = useState(false);
3315
- const payoutDetailsSteps = useMemo(() => {
3316
- const appropriatePayoutDetailsSteps = getAppropriatePayoutDetailsSteps(
3317
- Boolean(prefilledData?.payoutAccountDetails?.transferInstrumentId),
3318
- instantVerificationAvailable,
3319
- isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout)
3320
- );
3321
- const { payoutAccountDocuments: _, ...restOfAppropriatePayoutDetailsSteps } = appropriatePayoutDetailsSteps;
3322
- if (enableCheckOnCreateBankAccount && !isCheckAsAServiceError && (checkAsAServiceResultStatus === "VALID" || checkAsAServiceResultStatus === void 0) && !isMaskedBankAccountNumber) {
3323
- return restOfAppropriatePayoutDetailsSteps;
3324
- }
3325
- return appropriatePayoutDetailsSteps;
3326
- }, [
3327
- providers,
3328
- enableCheckOnCreateBankAccount,
3329
- checkAsAServiceResultStatus,
3330
- isCheckAsAServiceError,
3331
- isMaskedBankAccountNumber
3332
- ]);
3333
- const derivedProps = useMemo(() => {
3334
- return getPropsFromConfigurations({
3335
- scenarioConfiguration: fieldConfigurations,
3336
- forms: payoutDetailsSteps,
3337
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
3338
- dataMissingErrors: problems?.missingData ?? [],
3339
- fieldsWithExistingData: [],
3340
- customRules: fieldsFromCustomRules,
3341
- legalEntityType: legalEntityResponse.type
3342
- });
3343
- }, [
3344
- fieldConfigurations,
3345
- payoutDetailsSteps,
3346
- problems?.remediationActions,
3347
- problems?.missingData,
3348
- fieldsFromCustomRules,
3349
- legalEntityResponse.type
3350
- ]);
3351
- useUnifyLoadingStatus(
3352
- setLoadingStatus,
3353
- configurationLoadingStatus,
3354
- // bank vendor loading status only matters when we fetch bank vendors
3355
- instantVerificationEnabled ? bankVendorsLoadingStatus : "success",
3356
- isSubmitting ? "loading" : "success"
3357
- );
3358
- const forms = useMemo(() => {
3359
- const requiredForms = getRequiredForms(
3360
- payoutDetailsSteps,
3361
- derivedProps?.requiredFields,
3362
- derivedProps?.optionalFields
3363
- );
3364
- return addValidityToForms(requiredForms, formValidity, problems);
3365
- }, [derivedProps, formValidity, problems, payoutDetailsSteps]);
3366
- useEffect(() => {
3367
- if (!transferInstrument?.documentDetails?.length) return;
3368
- if (transferInstrument.id) {
3369
- documentUtils.fetchDocuments(transferInstrument.documentDetails, transferInstrument.id).then(() => {
3370
- setDocuments(mapApiDocumentToPayoutDocuments(transferInstrument.id));
3371
- }).catch(() => {
3372
- showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
3373
- });
3374
- }
3375
- }, [transferInstrument?.documentDetails]);
3376
- const submitDocuments = async ({
3377
- forms: forms2,
3378
- transferInstrument: transferInstrument2,
3379
- dataSubmitted
3380
- }) => {
3381
- const isRequiredDocuments = isDocumentsRequired(forms2);
3382
- if (isRequiredDocuments) {
3383
- const documentToUpload = await mapPayoutDocumentsToApiDocuments(
3384
- dataSubmitted,
3385
- transferInstrument2.id
3386
- );
3387
- if (documentToUpload) {
3388
- try {
3389
- const documents2 = await documentUtils.uploadDocuments(
3390
- [documentToUpload],
3391
- transferInstrument2.id
3392
- );
3393
- documents2.forEach((document2) => {
3394
- userEvents.addTaskEvent("Success", {
3395
- actionType: "upload",
3396
- documentType: dataSubmitted.payoutAccountDocuments?.documentType ?? document2.type,
3397
- // tracks BankDocumentTypes
3398
- fileExtention: document2.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? null
3399
- });
3400
- });
3401
- } catch {
3402
- setProblems({
3403
- ...problems,
3404
- validationErrors: {
3405
- payoutAccountDocuments: { bankStatementDocument: true }
3406
- }
3407
- });
3408
- throw new Error(i18n.get("remediationMessage_1_704"));
3409
- } finally {
3410
- await refetchTransferInstrument?.();
3411
- }
3412
- }
3413
- }
3414
- };
3415
- useEffect(() => {
3416
- const payoutAccountData = cloneObject(data)?.payoutAccountDetails;
3417
- if (payoutAccountData) setAccountDetailsFromInput(payoutAccountData);
3418
- }, [data]);
3419
- const onSubmit = async () => {
3420
- setIsSubmitting(true);
3421
- const dataSubmitted = cloneObject(data);
3422
- const { payoutAccountDetails, payoutVerificationMethod } = dataSubmitted;
3423
- const baseTracking = {
3424
- actionType: "submit",
3425
- documentType: "bankStatement",
3426
- bankCountry: payoutVerificationMethod?.bankCountry ?? defaultPayoutCountry,
3427
- bankCurrency: payoutAccountDetails?.currency ?? null
3428
- };
3429
- let transferInstrumentFromInput = mapPayoutDetailsToTransferInstrument({
3430
- data: dataSubmitted,
3431
- legalEntity: legalEntityResponse
3432
- });
3433
- transferInstrumentFromInput = omitObscuredFieldsIfUnchanged(
3434
- ["bankAccount.accountIdentification.accountNumber", "bankAccount.accountIdentification.iban"],
3435
- transferInstrumentFromInput,
3436
- transferInstrument
3437
- );
3438
- try {
3439
- if (!transferInstrumentFromInput) return;
3440
- const response = await (transferInstrument ? handleUpdateTransferInstrument({
3441
- transferInstrument: transferInstrumentFromInput,
3442
- transferInstrumentId: transferInstrument.id
3443
- }) : createTransferInstrument(
3444
- rootLegalEntityId.value,
3445
- baseUrl.value,
3446
- transferInstrumentFromInput
3447
- ));
3448
- setCurrentTransferInstrumentId?.(response?.id);
3449
- userEvents.addTaskEvent("Success", {
3450
- ...baseTracking,
3451
- ...checkAsAServiceAnalyticsProps
3452
- });
3453
- try {
3454
- await submitDocuments({ forms, transferInstrument: response, dataSubmitted });
3455
- clearToasts();
3456
- externalOnSubmit?.({ ...dataSubmitted, id: response?.id });
3457
- } catch (e) {
3458
- showToast({ label: e.message, variant: "error" });
3459
- } finally {
3460
- setIsSubmitting(false);
3461
- }
3462
- } catch (e) {
3463
- if (isValidationError(e)) {
3464
- const validationErrors = processValidationErrors(e, taskType);
3465
- setProblems({ ...problems, validationErrors });
3466
- } else if (isIdDocumentUploadError(e)) {
3467
- showToast({ label: i18n.get("idDocumentAlreadyUploaded"), variant: "error" });
3468
- } else if (isBankStatementUploadError(e)) {
3469
- showToast({ label: i18n.get("bankStatementAlreadyUploaded"), variant: "error" });
3470
- } else if (isMaintenanceModeError(e)) {
3471
- showToast({
3472
- label: i18n.get("maintenanceModeMessage"),
3473
- variant: "error",
3474
- duration: "indefinite"
3475
- });
3476
- } else {
3477
- const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
3478
- showToast({ label: i18n.get(errorTranslatable), variant: "error" });
3479
- }
3480
- setIsSubmitting(false);
3481
- userEvents.addTaskEvent("Encountered error", {
3482
- ...baseTracking,
3483
- returnType: e?.errorCode || "backend",
3484
- returnValue: e?.title || e?.message,
3485
- ...checkAsAServiceAnalyticsProps
3486
- });
3487
- }
3488
- };
3489
- const isDocumentsRequired = (forms2) => forms2.some((form) => form.formId === payoutSteps.payoutAccountDocuments.formId);
3490
- const formatFileSummaryData = (bankDocuments) => {
3491
- const bankStatementDocument = bankDocuments?.bankStatementDocument?.[0];
3492
- return {
3493
- ...bankStatementDocument && {
3494
- fileName: bankStatementDocument.name
3495
- }
3496
- };
3497
- };
3498
- const canSubmit = () => {
3499
- if (data.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
3500
- return false;
3501
- }
3502
- const bankDetails = data.payoutAccountDetails;
3503
- return !isEmpty(bankDetails) && Object.values(bankDetails).every(Boolean);
3504
- };
3505
- const datasetUtils = datasetUtilities(i18next.language);
3506
- const formatDataForSummary = () => {
3507
- const summaryData = cloneObject(data);
3508
- summaryData.payoutAccountDetails.accountHolder = accountHolderName;
3509
- if (summaryData.payoutVerificationMethod?.bankCountry && summaryData.payoutAccountDetails) {
3510
- summaryData.payoutAccountDetails.bankCountry = datasetUtils.getCountryName(
3511
- summaryData.payoutVerificationMethod.bankCountry
3512
- );
3513
- }
3514
- if (summaryData.payoutAccountDocuments) {
3515
- summaryData.payoutAccountDocuments.bankStatementDocument = formatFileSummaryData(
3516
- data?.payoutAccountDocuments
3517
- );
3518
- }
3519
- summaryData.payoutAccountVerification = formatAccountVerificationSummary(
3520
- data.payoutAccountVerification
3521
- );
3522
- return summaryData;
3523
- };
3524
- const createTrustedTransferInstrumentHandler = async (code, state) => {
3525
- try {
3526
- const trustedTransferInstrument = await handleCreateTrustedTransferInstrument({
3527
- code,
3528
- state
3529
- });
3530
- if (trustedTransferInstrument) {
3531
- setTrustedTransferInstrumentId(trustedTransferInstrument.verificationReference);
3532
- return trustedTransferInstrument;
3533
- }
3534
- } catch (e) {
3535
- refetchBankVerificationProviders();
3536
- const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
3537
- if (errorTranslatable === "transferInstrumentLimitHasAlreadyBeenMet") {
3538
- showToast({ label: i18n.get(errorTranslatable), variant: "error" });
3539
- }
3540
- throw e;
3541
- }
3542
- };
3543
- const {
3544
- handleNextClick,
3545
- handleBackClick,
3546
- activeForm,
3547
- setShouldValidate,
3548
- gotoFormByFormIndex,
3549
- steps
3550
- } = useFormComposer({
3551
- problems,
3552
- forms,
3553
- externalBackClick,
3554
- navigationTrackingParams: {
3555
- ...checkAsAServiceAnalyticsProps
3556
- },
3557
- onSubmit: skipSubmit ? () => {
3558
- if (trustedTransferInstrumentId) {
3559
- externalOnSubmit?.({ ...data, id: trustedTransferInstrumentId });
3560
- }
3561
- userEvents.addTaskEvent("Success", {
3562
- actionType: "submit"
3563
- });
3564
- navigateBackToTaskList?.();
3565
- } : onSubmit
3566
- });
3567
- useEffect(() => {
3568
- if (isCaasCalled && forms) {
3569
- if (checkAsAServiceResultStatus !== "VALID") {
3570
- const formIndex = forms.findIndex((f) => f.formId === "payoutAccountDocuments");
3571
- if (formIndex > -1) {
3572
- gotoFormByFormIndex(formIndex);
3573
- }
3574
- }
3575
- if (checkAsAServiceResultStatus === "VALID") {
3576
- handleNextClick();
3577
- }
3578
- }
3579
- setIsCaasCalled(false);
3580
- }, [forms, checkAsAServiceResultStatus, isCaasCalled]);
3581
- const handleFormNextClick = async () => {
3582
- if (!data?.payoutVerificationMethod?.payoutVerificationMethod) {
3583
- showPayoutVerificationMethodError.value = true;
3584
- return;
3585
- }
3586
- if (enableCheckOnCreateBankAccount && activeForm.formId === "payoutAccountDetails" && activeForm.isValid && data.payoutAccountDetails && !isMaskedBankAccountNumber) {
3587
- try {
3588
- const { data: response } = await refetchCheckAsAService();
3589
- setIsCaasCalled(true);
3590
- if (response?.status === "INCOMPLETE_INPUT") {
3591
- setIsModalOpen(true);
3592
- } else {
3593
- handleNextClick();
3594
- }
3595
- } catch {
3596
- handleNextClick();
3597
- }
3598
- } else {
3599
- handleNextClick();
3600
- }
3601
- };
3602
- if (previousTrustedInstrumentStatus !== createTrustedTransferInstrumentStatus) {
3603
- if (activeForm.formId === "payoutAccountVerification" && activeForm.isValid && createTrustedTransferInstrumentStatus === "success" && data.payoutAccountVerification?.verifiedBankAccountNumber) {
3604
- handleNextClick();
3605
- setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
3606
- }
3607
- }
3608
- const omittedForms = data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification" ? [] : [payoutSteps.payoutVerificationMethod.formId];
3609
- const { header: invalidFieldHeader, content: invalidFieldContent } = getInvalidFieldsErrorMessage(
3610
- checkAsAServiceResultErrors ?? []
3611
- );
3612
- return /* @__PURE__ */ jsxs(
3613
- LoaderWrapper,
3614
- {
3615
- showSpinner: true,
3616
- status: isCheckAsAServiceLoading || isModalOpen ? "loading" : "success",
3617
- formOpacityWhenLoading: 0.3,
3618
- children: [
3619
- isModalOpen && /* @__PURE__ */ jsx(
3620
- Confirm,
3621
- {
3622
- title: i18n.get(invalidFieldHeader),
3623
- description: i18n.get(invalidFieldContent),
3624
- cancelText: i18n.get("editDetails"),
3625
- confirmText: i18n.get("continueAnyway"),
3626
- onConfirm: () => {
3627
- handleNextClick();
3628
- setIsModalOpen(false);
3629
- },
3630
- onCancel: () => {
3631
- gotoFormByFormIndex(0);
3632
- setIsModalOpen(false);
3633
- }
3634
- }
3635
- ),
3636
- /* @__PURE__ */ jsx(
3637
- FormWrapper,
3638
- {
3639
- taskName: taskType === TaskTypes.PAYIN ? "payinDetails" : "payoutDetails",
3640
- activeForm,
3641
- summary: {
3642
- data: formatDataForSummary(),
3643
- omitted: {
3644
- keys: ["transferInstrumentId", "payoutVerificationMethod"],
3645
- forms: omittedForms,
3646
- summaryEditButton: ["payoutVerificationMethod"]
3647
- }
3648
- },
3649
- handleBackClick,
3650
- handleNextClick: handleFormNextClick,
3651
- handleHomeClick,
3652
- handleCloseClick,
3653
- hideSidebar: hideSidebar || hideFooterAndSidebar,
3654
- hideFooter: hideFooterAndSidebar,
3655
- loadingStatus: isTransferInstrumentLoading ? "loading" : loadingStatus,
3656
- asModal,
3657
- forms,
3658
- onSubmit,
3659
- gotoFormByFormIndex,
3660
- validateForm: () => setShouldValidate(true),
3661
- canSubmit: canSubmit(),
3662
- problems,
3663
- steps,
3664
- children: (!isTransferInstrumentLoading || isSubmitting) && /* @__PURE__ */ jsx(
3665
- PayoutDetails,
3666
- {
3667
- ...derivedProps,
3668
- data: { ...prefilledData, payoutAccountDocuments: documents },
3669
- country: defaultPayoutCountry,
3670
- activeForm,
3671
- onBack: handleBackClick,
3672
- accountHolder: accountHolder ?? getLegalEntityNameBasedOnType(legalEntityResponse),
3673
- setHideSidebar: setHideFooterAndSidebar,
3674
- setSkipSubmit,
3675
- legalEntityResponse,
3676
- associatedLegalArrangement,
3677
- provider: providers?.[0],
3678
- bankVendorsLoadingStatus,
3679
- instantVerificationAvailable,
3680
- createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
3681
- accountDetailsFromInput,
3682
- trustedTransferInstrumentId
3683
- }
3684
- )
3685
- }
3686
- )
3687
- ]
3688
- }
3689
- );
3690
- }
3691
- export {
3692
- PayoutDetailsDropin as P,
3693
- PayoutDetailsPage$1 as a
3694
- };