@adyen/kyc-components 3.85.0 → 3.86.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-DWt6MA7A.js → AcceptTermsOfServiceComponent-DzMlzUjz.js} +16 -17
  2. package/dist/{Accordion-DQSd9JrF.js → Accordion-ZHPTn2Gl.js} +2 -2
  3. package/dist/{AccountSetupRejected-Y2jV7DOd.js → AccountSetupRejected-DON-7H74.js} +4 -4
  4. package/dist/{Address-CN31gTRW.js → Address-ChPj2pfR.js} +337 -22
  5. package/dist/{Alert-B2qwr9au.js → Alert-CeZqoFeT.js} +3 -3
  6. package/dist/{Avatar-CrL6cVDB.js → Avatar-zXT7v3KF.js} +2 -2
  7. package/dist/{BusinessDetailsMultiformDropin-BB1mTi0Z.js → BusinessDetailsMultiformDropin-DKiYg8gJ.js} +89 -3112
  8. package/dist/{BusinessFinancingComponent-BevBrUTE.js → BusinessFinancingComponent-BRziB5i-.js} +6 -6
  9. package/dist/{BusinessFinancingDropin-BgU5hfv0.js → BusinessFinancingDropin-CUmKL5bO.js} +21 -38
  10. package/dist/{BusinessFinancingPage-u2Xu42u-.js → BusinessFinancingPage-DhhnCxFQ.js} +4 -4
  11. package/dist/{BusinessTypeSelectionPage-BNxEzkjO.js → BusinessTypeSelectionPage-B_dVM7cC.js} +9 -8
  12. package/dist/Card-Bz2B4J0v.js +82 -0
  13. package/dist/ConstitutionalDocument-Dt9O9bVo.js +143 -0
  14. package/dist/{CountryField-CFppUh42.js → CountryField-Bv9P8dRJ.js} +110 -78
  15. package/dist/CreateIndividualComponent-Mw4AiW_M.js +71 -0
  16. package/dist/CreateTransferInstrumentComponent-usUQlcH_.js +66 -0
  17. package/dist/{Currency-Zz8j3LFf.js → Currency-SzvigNNo.js} +8 -63
  18. package/dist/{CustomerSupport-CkqG00fn.js → CustomerSupport-C_KLB51k.js} +21 -9
  19. package/dist/{DebugModal-Cxp_Lbjk.js → DebugModal-DYolUZQS.js} +9 -9
  20. package/dist/{DecisionMakerDetailsPage-kpoxsSYP.js → DecisionMakerDetailsPage-C2BzKLSi.js} +7 -7
  21. package/dist/{DecisionMakers-DMboYynJ.js → DecisionMakers-DTYzQWdY.js} +18 -20
  22. package/dist/{EmbeddedStatus-DdZv9Kwp.js → EmbeddedStatus-jepajhAF.js} +3 -3
  23. package/dist/{EndStateLayout-Cswr0wiZ.js → EndStateLayout-DQm7Xrqx.js} +2 -2
  24. package/dist/{useFormContext-DrrsFJH7.js → FormFlow-A9b0QEcM.js} +10 -16
  25. package/dist/{FormNavigation-DrejHtXO.js → FormNavigation-DEdNWaAc.js} +5 -5
  26. package/dist/{useGlobalData-rR_jnTzW.js → FormWrapper-DjWyqVD2.js} +12 -79
  27. package/dist/{IndividualOnfidoDropin-CydUe7_6.js → IndividualOnfido-BMIkKHvJ.js} +8187 -6328
  28. package/dist/IndividualOnfidoDropin-DBQF0Onh.js +2502 -0
  29. package/dist/{InputText-EX5kyD9L.js → InputText-BG-TiSNN.js} +4 -4
  30. package/dist/{Introduction-DncY2r7T.js → Introduction-BgoEJd8o.js} +4 -4
  31. package/dist/{JpAddress-BTfvrykR.js → JpAddress-Jxj9u4D5.js} +8 -8
  32. package/dist/{LegalRepresentativeDetailsPage-DxqaU2W7.js → LegalRepresentativeDetailsPage-BH5AnQhk.js} +5 -5
  33. package/dist/{ListItem-pn0XFAz_.js → ListItem-DIDj0vuO.js} +3 -3
  34. package/dist/{ManageIndividualComponent-CKRuUS0t.js → ManageIndividualComponent-CJKXW8rK.js} +5 -5
  35. package/dist/{ManageTermsOfServiceComponent-DDgriC3w.js → ManageTermsOfServiceComponent-DNf00D1s.js} +5 -5
  36. package/dist/{ManageTransferInstrumentComponent-BoQn6JaV.js → ManageTransferInstrumentComponent-gVWN389q.js} +14 -13
  37. package/dist/{MaybeModal-B1X7K4z1.js → MaybeModal-D51ALTH6.js} +3 -3
  38. package/dist/{Modal-ConNvgj4.js → Modal-C9aImxis.js} +2 -2
  39. package/dist/OnboardingDropinComponent-D-tQ12Sy.js +9791 -0
  40. package/dist/{PayoutDetailsDropin-CHOa81Ot.js → PayoutDetailsDropin-CxWPXV7j.js} +288 -158
  41. package/dist/{Review-BAuL4AQ-.js → Review-CRhM6n_P.js} +8 -8
  42. package/dist/RootBusinessDetailsPage-DZrT_e0g.js +61 -0
  43. package/dist/{RootBusinessLinesPage-D-YRRyIW.js → RootBusinessLinesPage-CJUpoVy5.js} +267 -144
  44. package/dist/RootIndividualDetailsPage-pqVuzOoJ.js +80 -0
  45. package/dist/{SignPCIComponent-B6FQiV5E.js → SignPCIComponent-BNbx3OzX.js} +11 -11
  46. package/dist/{SingpassSelection-DxGUYazk.js → SingpassSelection-BAa3S705.js} +4 -5
  47. package/dist/SoleProprietorshipPage-Bhw3GBKP.js +60 -0
  48. package/dist/{SourceOfFundsPage-Ce-Mim_H.js → SourceOfFundsPage-CJXpHSgo.js} +24 -29
  49. package/dist/{StepProgressIndicator-BymtNCPV.js → StepProgressIndicator-Dncrs7ra.js} +2 -2
  50. package/dist/{StoreProvider-BYjTSjnX.js → StoreProvider-CWnZNw9D.js} +427 -305
  51. package/dist/{TaskItemStatus-BholBQ7C.js → TaskItemStatus-D3ri_-L2.js} +3 -3
  52. package/dist/{TaxReportingDropin-CSa5vto5.js → TaxReportingDropin-Du7KU--L.js} +15 -17
  53. package/dist/{TrustDetailsPage-CYMeuEyr.js → TrustDetailsPage-SGmHwgzj.js} +24 -32
  54. package/dist/{TrustMemberCompanyPage-DICY9KDR.js → TrustMemberCompanyPage-BkQ9q4_T.js} +6 -6
  55. package/dist/{TrustMemberIndividualPage-DUGmI852.js → TrustMemberIndividualPage-CIr73hS-.js} +5 -5
  56. package/dist/UnincorporatedPartnershipIndividualPage-DQxHTyUp.js +65 -0
  57. package/dist/{UnincorporatedPartnershipMemberCompanyPage-CuvkBZ2N.js → UnincorporatedPartnershipMemberCompanyPage-DOWqNUHn.js} +6 -6
  58. package/dist/VerificationErrorAlert-DDsMxj76.js +79 -0
  59. package/dist/{ViewVerificationStatusComponent-zXuO8CY1.js → ViewVerificationStatusComponent-Hqp0gnec.js} +4 -4
  60. package/dist/adyen-business-financing.js +3 -3
  61. package/dist/adyen-individual-configuration.js +3 -3
  62. package/dist/adyen-individual-status.js +3 -3
  63. package/dist/adyen-kyc-components.js +20 -20
  64. package/dist/adyen-onboarding.js +2 -2
  65. package/dist/adyen-terms-of-service-management.js +3 -3
  66. package/dist/adyen-terms-of-service-status.js +3 -3
  67. package/dist/adyen-transfer-instrument-configuration.js +3 -3
  68. package/dist/adyen-transfer-instrument-management.js +3 -3
  69. package/dist/adyen-verification-status.js +3 -3
  70. package/dist/{bg-BG-fr-xfUBV.js → bg-BG-B1GR6lKu.js} +3 -1
  71. package/dist/{bg-BG-BIOMFPaW.js → bg-BG-BC1dwNN2.js} +2 -5
  72. package/dist/bg-BG-BJo9yIYj.js +13 -0
  73. package/dist/bg-BG-D8qq7TQJ.js +94 -0
  74. package/dist/bg-BG-a6CQ0hKw.js +13 -0
  75. package/dist/{bg-BG-Cs_1PU3v.js → bg-BG-e6Rs6yz_.js} +4 -1
  76. package/dist/{cs-CZ-DNWTRefA.js → cs-CZ-2foXfkBk.js} +2 -5
  77. package/dist/cs-CZ-BAr1-JAS.js +13 -0
  78. package/dist/cs-CZ-ChGeQ9s0.js +94 -0
  79. package/dist/{cs-CZ-C0sNB1Fm.js → cs-CZ-DBQXByj7.js} +3 -1
  80. package/dist/cs-CZ-LGBI1w0Z.js +13 -0
  81. package/dist/{cs-CZ-B2WAqmaW.js → cs-CZ-Q6NVYK-k.js} +4 -1
  82. package/dist/da-DK-914Viqia.js +13 -0
  83. package/dist/{da-DK-8dk9Q_Wk.js → da-DK-CjjWmhN6.js} +3 -1
  84. package/dist/da-DK-CyHH8kX3.js +94 -0
  85. package/dist/{da-DK-D-eeokQn.js → da-DK-DSYEF7Q1.js} +4 -1
  86. package/dist/{da-DK-D-PlwKvZ.js → da-DK-DU3_xdWg.js} +2 -5
  87. package/dist/da-DK-DoHb4ssx.js +13 -0
  88. package/dist/{de-DE-Dcs3W1fT.js → de-DE-B9-ILIdw.js} +4 -1
  89. package/dist/{de-DE-4GAd_srm.js → de-DE-BODG29hR.js} +2 -5
  90. package/dist/de-DE-BXKZNAA1.js +13 -0
  91. package/dist/de-DE-DL6SrIBE.js +94 -0
  92. package/dist/{de-DE-CCyKie8B.js → de-DE-DoQHxDRp.js} +3 -1
  93. package/dist/de-DE-R6YgDOo5.js +13 -0
  94. package/dist/{analytics-DkXXx2b6.js → debouncedInputEvent-B3Lwtvx_.js} +7 -21
  95. package/dist/{validate-DzaSMOa2.js → documentUtils-C2iCagu9.js} +3 -167
  96. package/dist/{dropinUtils-CCEDaAJW.js → dropinUtils-L9qJuAw0.js} +4 -20
  97. package/dist/el-GR-BnMw4HQ7.js +13 -0
  98. package/dist/{el-GR-D7zMcBtK.js → el-GR-CnoZeZlX.js} +3 -1
  99. package/dist/{el-GR-DBum-QDu.js → el-GR-DYjcbiSc.js} +4 -1
  100. package/dist/{el-GR-Ddnh0NhQ.js → el-GR-DcIdm3iK.js} +2 -5
  101. package/dist/el-GR-DgaUGjyJ.js +13 -0
  102. package/dist/el-GR-l0JeDNPy.js +94 -0
  103. package/dist/{en-US-DjF6iC7G.js → en-US-BxEW5N6f.js} +44 -5
  104. package/dist/{en-US-BwDZ0WHW.js → en-US-C5WyUweF.js} +3 -1
  105. package/dist/en-US-CTZwL084.js +13 -0
  106. package/dist/{en-US-BCFNoF5y.js → en-US-DYo4OF-P.js} +8 -7
  107. package/dist/{en-US-DdeSoN_2.js → en-US-gsp7CD_E.js} +5 -1
  108. package/dist/{es-ES-JvAvmB2A.js → es-ES-BMrse1nQ.js} +3 -1
  109. package/dist/es-ES-BWAlCq7R.js +13 -0
  110. package/dist/{es-ES-C7XjLOHi.js → es-ES-C-tTuMLH.js} +4 -1
  111. package/dist/es-ES-C1ClJ2XE.js +94 -0
  112. package/dist/{es-ES-C4lENXHH.js → es-ES-CMQqgMEJ.js} +2 -5
  113. package/dist/es-ES-dMSfTLXF.js +13 -0
  114. package/dist/{et-EE-SJf3_Ega.js → et-EE-BE8bHZns.js} +3 -1
  115. package/dist/et-EE-BG_Y29oV.js +94 -0
  116. package/dist/{et-EE-BUG05EDz.js → et-EE-BzLAp08F.js} +4 -1
  117. package/dist/et-EE-D9SV0taO.js +13 -0
  118. package/dist/{et-EE-3EQr-1cj.js → et-EE-DcpuYQwB.js} +2 -5
  119. package/dist/et-EE-l977xCZ_.js +13 -0
  120. package/dist/fi-FI-0ScajGUB.js +13 -0
  121. package/dist/{fi-FI-Byvvcxxq.js → fi-FI-4GTHkwOL.js} +2 -5
  122. package/dist/{fi-FI-Cy2hAl0B.js → fi-FI-Bmu7sndb.js} +3 -1
  123. package/dist/fi-FI-C7GrKbXx.js +13 -0
  124. package/dist/fi-FI-bIhXiQPL.js +94 -0
  125. package/dist/{fi-FI-CEzjKgiz.js → fi-FI-pyHLbmel.js} +4 -1
  126. package/dist/{MaskedInput-DB6EYmfa.js → fieldConfigurations-DVV23oeM.js} +616 -14
  127. package/dist/{fr-FR-E_UubsZ-.js → fr-FR-Ba-HRBQ7.js} +2 -5
  128. package/dist/fr-FR-Bj275MRb.js +94 -0
  129. package/dist/fr-FR-CqCcxkgA.js +13 -0
  130. package/dist/{fr-FR-DNJiLv9b.js → fr-FR-DG3tEkdN.js} +4 -1
  131. package/dist/fr-FR-o45TzYMp.js +13 -0
  132. package/dist/{fr-FR-BmW46mYd.js → fr-FR-ufKVxWpT.js} +3 -1
  133. package/dist/getFieldsWithExistingData-C6JBh3D6.js +22 -0
  134. package/dist/{getName-Dc03c4n_.js → getName-k5oRc0oZ.js} +9 -2
  135. package/dist/{hasDataChanged-CUdKM92N.js → hasDataChanged-CogwJI1I.js} +2 -2
  136. package/dist/{hr-HR-TVOgDkBf.js → hr-HR-BFx1T11G.js} +2 -5
  137. package/dist/{hr-HR-WMnlxMEY.js → hr-HR-BRFErTkv.js} +4 -1
  138. package/dist/{hr-HR-c1Si_0s4.js → hr-HR-BYXLJcPZ.js} +3 -1
  139. package/dist/hr-HR-CL0q_D2U.js +94 -0
  140. package/dist/hr-HR-CoCrArfg.js +13 -0
  141. package/dist/hr-HR-YG9hvMMj.js +13 -0
  142. package/dist/hu-HU-BrxUJuJh.js +13 -0
  143. package/dist/{hu-HU-B2nrl0pw.js → hu-HU-CJA8w351.js} +4 -1
  144. package/dist/hu-HU-DIurnBC3.js +13 -0
  145. package/dist/{hu-HU-DRONW_47.js → hu-HU-GXvzHwu9.js} +2 -5
  146. package/dist/{hu-HU-CibGC8KY.js → hu-HU-J4qBifyy.js} +3 -1
  147. package/dist/hu-HU-cLqGFTTR.js +94 -0
  148. package/dist/{iframeWidget-BWwxgbNs.js → iframeWidget-D2CKFlJk.js} +4 -4
  149. package/dist/{it-IT-BMjuva_2.js → it-IT-B_5GkLBx.js} +3 -1
  150. package/dist/{it-IT-DuBLJIdz.js → it-IT-Bw3VIHJB.js} +2 -5
  151. package/dist/it-IT-C0Qk47kh.js +94 -0
  152. package/dist/it-IT-CNS4NmYX.js +13 -0
  153. package/dist/it-IT-Cztl5jRY.js +13 -0
  154. package/dist/{it-IT-BRmX2jEi.js → it-IT-mhNjrQZn.js} +4 -1
  155. package/dist/{ja-JP-Cr_qjpZ2.js → ja-JP-BUrknIDB.js} +3 -1
  156. package/dist/{ja-JP-CCnzjx-u.js → ja-JP-BxEWI56P.js} +9 -1
  157. package/dist/{ja-JP-gRRH8Eph.js → ja-JP-CfrHlRGC.js} +4 -1
  158. package/dist/{ja-JP-CJ_j_HAA.js → ja-JP-DI7lRfpI.js} +2 -5
  159. package/dist/ja-JP-DSdZj-it.js +94 -0
  160. package/dist/ja-JP-DXkV1ta4.js +13 -0
  161. package/dist/{localizeDateString-rfEOu5f7.js → localizeDateString-ZCoTLjs1.js} +2 -2
  162. package/dist/lt-LT-BJTBEa5D.js +13 -0
  163. package/dist/lt-LT-C-dKiExL.js +94 -0
  164. package/dist/{lt-LT-BJQDUanx.js → lt-LT-C0Acftnm.js} +4 -1
  165. package/dist/lt-LT-D1viSP-v.js +13 -0
  166. package/dist/{lt-LT-DjNjg3Pl.js → lt-LT-L0wG5Pd2.js} +3 -1
  167. package/dist/{lt-LT-CBBDNCnp.js → lt-LT-ewVNPhQN.js} +2 -5
  168. package/dist/lv-LV-AkiOewnL.js +13 -0
  169. package/dist/{lv-LV-h3nTokkM.js → lv-LV-Bnq61WAt.js} +4 -1
  170. package/dist/{lv-LV-BpRfRfMz.js → lv-LV-DFvpmmGg.js} +3 -1
  171. package/dist/lv-LV-GI-ZDM0K.js +13 -0
  172. package/dist/{lv-LV-CtIe38WU.js → lv-LV-JqXvRt4T.js} +2 -5
  173. package/dist/lv-LV-UkEOuqFz.js +94 -0
  174. package/dist/{mapExistingFile-D_HVWRXe.js → mapExistingFile-txzqej6F.js} +5 -80
  175. package/dist/mapFinancialReportsToFinancialInformation-DoTIj0Q-.js +67 -0
  176. package/dist/mapJpAddressSchemaToAddressLocalizations-pPCQCgRx.js +63 -0
  177. package/dist/{mapLegalEntityToIndividualOnfidoSchema-DsQrqqP5.js → mapLegalEntityToIndividualOnfidoSchema-B8NxtO2j.js} +3 -63
  178. package/dist/{mapTransferInstrumentToPayoutAccount-MugvfqfK.js → mapTransferInstrumentToPayoutAccount-D9lyD7nx.js} +2 -2
  179. package/dist/nl-NL-B6B4Z_tr.js +13 -0
  180. package/dist/nl-NL-Cfr5hMtI.js +94 -0
  181. package/dist/{nl-NL-CE4l8R5l.js → nl-NL-DR1wVqQC.js} +2 -5
  182. package/dist/{nl-NL-oaBDOlm6.js → nl-NL-UhpFianh.js} +3 -1
  183. package/dist/nl-NL-VneIcgWO.js +13 -0
  184. package/dist/{nl-NL-YzDSCWLL.js → nl-NL-donw5yvS.js} +4 -1
  185. package/dist/no-NO-ASO8Je2l.js +94 -0
  186. package/dist/{no-NO-B1_YJlMP.js → no-NO-BZmigu6-.js} +2 -5
  187. package/dist/{no-NO-BTrfxWS7.js → no-NO-DRF-gOWI.js} +3 -1
  188. package/dist/{no-NO-Big2B13b.js → no-NO-Dev7r3VA.js} +4 -1
  189. package/dist/no-NO-Dn1LUbDp.js +13 -0
  190. package/dist/no-NO-Dqp598Ox.js +13 -0
  191. package/dist/payout-verification-instant-5u-wvFKv.js +41 -0
  192. package/dist/payout-verification-manual-BJsf7QPE.js +90 -0
  193. package/dist/{pl-PL-DGYFY42P.js → pl-PL-BKxhMICw.js} +2 -5
  194. package/dist/pl-PL-C1cP4Qpn.js +13 -0
  195. package/dist/pl-PL-CG4rvgUo.js +94 -0
  196. package/dist/{pl-PL-C72GTDxW.js → pl-PL-CHyLS1B7.js} +3 -1
  197. package/dist/{pl-PL-CL483jMb.js → pl-PL-DU_Xulyu.js} +4 -1
  198. package/dist/pl-PL-Zdh_Xu43.js +13 -0
  199. package/dist/{process-field-configurations-CiECrUSj.js → process-field-configurations-D2EUZow3.js} +3 -3
  200. package/dist/{pt-BR-CtFCi7U4.js → pt-BR-CFZE5Nop.js} +3 -1
  201. package/dist/{pt-BR-DJOzf0y2.js → pt-BR-DeXo4rsi.js} +4 -1
  202. package/dist/pt-BR-DkzLiK7Y.js +13 -0
  203. package/dist/pt-BR-DqLaaG4L.js +13 -0
  204. package/dist/pt-BR-IWTcYKu9.js +94 -0
  205. package/dist/{pt-BR-Co8OqKh-.js → pt-BR-wAIdhUru.js} +2 -5
  206. package/dist/{pt-PT-XAn7WGle.js → pt-PT-Bc9JI4eu.js} +3 -1
  207. package/dist/{pt-PT-pKLoM66X.js → pt-PT-C1qHVe7L.js} +2 -5
  208. package/dist/pt-PT-CoTUf3zo.js +13 -0
  209. package/dist/{pt-PT-B3qoJ3Fr.js → pt-PT-DkJdR6SS.js} +4 -1
  210. package/dist/pt-PT-LZZYQKaC.js +94 -0
  211. package/dist/pt-PT-uiREjC_e.js +13 -0
  212. package/dist/{resolveEnvironment-DTYC79J1.js → resolveEnvironment-CU4TOfg6.js} +3 -3
  213. package/dist/{ro-RO-Ct_BJvsc.js → ro-RO-BDjHimxe.js} +4 -1
  214. package/dist/{ro-RO-qX8X1Q1m.js → ro-RO-BFzooIri.js} +3 -1
  215. package/dist/ro-RO-C835aMET.js +13 -0
  216. package/dist/ro-RO-_HSYnLLu.js +13 -0
  217. package/dist/{ro-RO-D3rQ93wa.js → ro-RO-juw6hKRk.js} +2 -5
  218. package/dist/ro-RO-nVSeNtIQ.js +94 -0
  219. package/dist/{rules-BfrH23mO.js → rules-LaFMJfnA.js} +4 -5
  220. package/dist/{sk-SK-CmH1I1tp.js → sk-SK-BM57awWi.js} +2 -5
  221. package/dist/sk-SK-BX0wsQH4.js +94 -0
  222. package/dist/sk-SK-D6KtBU3q.js +13 -0
  223. package/dist/{sk-SK-CjdK4BKW.js → sk-SK-DRuiKuEp.js} +3 -1
  224. package/dist/sk-SK-K03EHmJF.js +13 -0
  225. package/dist/{sk-SK-FGK1FMMO.js → sk-SK-atqQJid1.js} +4 -1
  226. package/dist/{sl-SI-lPxRRPsh.js → sl-SI-CmYmQ6nG.js} +3 -1
  227. package/dist/{sl-SI-Cz28AFTz.js → sl-SI-CwKpXVCh.js} +4 -1
  228. package/dist/sl-SI-Dt7rovIT.js +94 -0
  229. package/dist/{sl-SI-hnlbW1OT.js → sl-SI-g2WSP0Tj.js} +2 -5
  230. package/dist/sl-SI-gM40Ay3W.js +13 -0
  231. package/dist/sl-SI-wYYQibM-.js +13 -0
  232. package/dist/style.css +931 -892
  233. package/dist/styles-CLV89_hH.js +931 -892
  234. package/dist/sv-SE-Bnhsdw8c.js +13 -0
  235. package/dist/{sv-SE-DLl7OGxl.js → sv-SE-CGCP_6VE.js} +4 -1
  236. package/dist/{sv-SE-BPpQ-05i.js → sv-SE-CHomf31L.js} +3 -1
  237. package/dist/{sv-SE-7Cbo1oic.js → sv-SE-Cfs0NHgG.js} +2 -5
  238. package/dist/sv-SE-DqzH809e.js +94 -0
  239. package/dist/sv-SE-uisfAT9L.js +13 -0
  240. package/dist/{useForm-CNi1k1NR.js → trackNavigation-gyYoCNvj.js} +25 -8
  241. package/dist/types/api/businessLines/businessLines.types.d.ts +7 -2
  242. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +5 -0
  243. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +7 -0
  244. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +1 -0
  245. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -2
  246. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +0 -1
  247. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PayoutVerificationMethod.d.ts +1 -2
  248. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +1 -1
  249. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +51 -51
  250. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -0
  251. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -3
  252. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +2 -2
  253. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -3
  254. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -1
  255. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +2 -4
  256. package/dist/types/components/BusinessLines/forms/rules.d.ts +5 -0
  257. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesStore.d.ts +2 -0
  258. package/dist/types/components/BusinessLines/tasks/BusinessLines/ExistingBusinessLines/BusinessLineModal.d.ts +3 -2
  259. package/dist/types/components/BusinessLines/tasks/utils.d.ts +11 -2
  260. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +124 -124
  261. package/dist/types/components/Shared/FormNavigation/FormNavigation.d.ts +1 -1
  262. package/dist/types/components/Shared/FormNavigation/types.d.ts +0 -2
  263. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +1 -3
  264. package/dist/types/components/Shared/Summary/Summary.d.ts +1 -1
  265. package/dist/types/components/Shared/Summary/types.d.ts +0 -2
  266. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  267. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +4 -0
  268. package/dist/types/context/ExperimentContext/types.d.ts +12 -0
  269. package/dist/types/core/errorMapping.d.ts +4 -1
  270. package/dist/types/core/user-events.d.ts +7 -9
  271. package/dist/types/hooks/{useAnalytics.d.ts → useAnalytics/useAnalytics.d.ts} +1 -7
  272. package/dist/types/utils/analytics/convertToEmbeddedEvent.d.ts +9 -0
  273. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +19 -0
  274. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +13 -0
  275. package/dist/types/utils/{trackNavigation.d.ts → analytics/trackNavigation.d.ts} +1 -1
  276. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  277. package/dist/types/utils/filterProblemsByTaskForms.d.ts +12 -0
  278. package/dist/types/utils/getName.d.ts +1 -1
  279. package/dist/{types-DNH7oNbA.js → types-C1FJZQd1.js} +2 -2
  280. package/dist/{types-SBNit_kK.js → types-D0aacEF5.js} +27 -3
  281. package/dist/{types-DHmyPbAn.js → types-DQVZ5BSQ.js} +14 -2
  282. package/dist/{useAssociatedLegalEntity-CmhNWabq.js → useAssociatedLegalEntity-CuTN8T5x.js} +2 -2
  283. package/dist/{useDataset-C0A9qR_N.js → useDataset-C4vcroxo.js} +3 -3
  284. package/dist/{useMultiForm-CU58VvHX.js → useMultiForm-GpoMvhwU.js} +4 -4
  285. package/dist/{useOnboardingStatus-DuIJSnGH.js → useOnboardingStatus-Cifcsbcr.js} +1 -1
  286. package/dist/{useScenarios-T0NF0gUi.js → useScenarios-AyvycExm.js} +2 -2
  287. package/dist/{useTermsOfServiceStatus-1oGd6y18.js → useTermsOfServiceStatus-yhwwFpfh.js} +1 -1
  288. package/dist/{useToastContext-DHgUoF6x.js → useToastContext-CCxuinr_.js} +2 -2
  289. package/dist/{useUnincorporatedPartnershipMembers-57G1Bu4k.js → useUnincorporatedPartnershipMembers-D_N_aPNq.js} +62 -7
  290. package/dist/{utils-DZz9bCID.js → utils-U0nEMoML.js} +6 -46
  291. package/dist/validate-BRRbVwma.js +41 -0
  292. package/dist/{validate-Bz6-McmI.js → validate-Bqbj3vVS.js} +2 -2
  293. package/dist/{validationError-Ci4nlmhZ.js → validationError-DhRqgFgA.js} +2 -2
  294. package/package.json +1 -1
  295. package/dist/Card-N9psV2kP.js +0 -147
  296. package/dist/CreateIndividualComponent-BL3dK960.js +0 -71
  297. package/dist/CreateTransferInstrumentComponent-kxMU_XVD.js +0 -66
  298. package/dist/Divider-DiS12D_i.js +0 -239
  299. package/dist/Dropzone-DSyKXnbD.js +0 -218
  300. package/dist/Image-BhBefhke.js +0 -22
  301. package/dist/InputDate-C2j7qA_b.js +0 -43
  302. package/dist/InputGroup-WBfGDV5F.js +0 -32
  303. package/dist/LandingLayout-Ca68Z9DA.js +0 -60
  304. package/dist/Link-BS6Zpegg.js +0 -35
  305. package/dist/OnboardingDropinComponent-IKzrTT3r.js +0 -4274
  306. package/dist/RadioGroup-DhwjhH0X.js +0 -144
  307. package/dist/RegistrationAddress-BnyrwF-X.js +0 -2337
  308. package/dist/RootBusinessDetailsPage-BFR4Sxfp.js +0 -61
  309. package/dist/RootIndividualDetailsPage-D6lLtamt.js +0 -76
  310. package/dist/SoleProprietorshipPage-BKlAFmwp.js +0 -60
  311. package/dist/Spacer-BK3jDget.js +0 -18
  312. package/dist/TaxInformationField-DCjcBMwQ.js +0 -3094
  313. package/dist/TileGroup-BkTpSpVX.js +0 -174
  314. package/dist/UnincorporatedPartnershipIndividualPage-DZZc7sEn.js +0 -65
  315. package/dist/bafinUtils-DkP3ZoN4.js +0 -366
  316. package/dist/bg-BG-BLe6BCNz.js +0 -13
  317. package/dist/bg-BG-BPsOhDfg.js +0 -13
  318. package/dist/bg-BG-z3gZQvGq.js +0 -42
  319. package/dist/commonValidators-BLvtzPWZ.js +0 -24
  320. package/dist/cs-CZ-C5lyVYlZ.js +0 -42
  321. package/dist/cs-CZ-CHzJM-ii.js +0 -13
  322. package/dist/cs-CZ-xoLsda7i.js +0 -13
  323. package/dist/currency-BGwQyxBo.js +0 -36
  324. package/dist/da-DK-CYl2jko-.js +0 -42
  325. package/dist/da-DK-D-TJghBi.js +0 -13
  326. package/dist/da-DK-XNMYSp7w.js +0 -13
  327. package/dist/de-DE-BI7AAdOv.js +0 -13
  328. package/dist/de-DE-CCmlaL2F.js +0 -13
  329. package/dist/de-DE-DlUEkik0.js +0 -42
  330. package/dist/el-GR-DZ8GheJK.js +0 -42
  331. package/dist/el-GR-DoCIcce-.js +0 -13
  332. package/dist/el-GR-kYiInIQ9.js +0 -13
  333. package/dist/en-US-DYpvuCLO.js +0 -13
  334. package/dist/es-ES-CJMsyMAc.js +0 -13
  335. package/dist/es-ES-CnNU6AJv.js +0 -13
  336. package/dist/es-ES-D0c0MoqK.js +0 -42
  337. package/dist/et-EE-BR4OXRfV.js +0 -13
  338. package/dist/et-EE-C4Fwyr7-.js +0 -42
  339. package/dist/et-EE-sB7wkSA3.js +0 -13
  340. package/dist/fi-FI-BbqwYcLI.js +0 -13
  341. package/dist/fi-FI-bRXb-Q_i.js +0 -42
  342. package/dist/fi-FI-u5GxMZsq.js +0 -13
  343. package/dist/fieldConfigurations-BsOQ678Q.js +0 -448
  344. package/dist/form-rules-DhbF2mY4.js +0 -13
  345. package/dist/fr-FR-CMjrAkKl.js +0 -13
  346. package/dist/fr-FR-Cr-Y1vIy.js +0 -13
  347. package/dist/fr-FR-JLPKgufm.js +0 -42
  348. package/dist/hr-HR-Bhsop3CT.js +0 -13
  349. package/dist/hr-HR-D26Gz-HL.js +0 -42
  350. package/dist/hr-HR-D8cBxUFa.js +0 -13
  351. package/dist/hu-HU-BVfkOdJe.js +0 -13
  352. package/dist/hu-HU-BZCFneWx.js +0 -42
  353. package/dist/hu-HU-D2j1ISVk.js +0 -13
  354. package/dist/isEmpty-B0GMAw4K.js +0 -23
  355. package/dist/it-IT-C7Sg1k4p.js +0 -13
  356. package/dist/it-IT-CwA8megO.js +0 -13
  357. package/dist/it-IT-mScKLwBR.js +0 -42
  358. package/dist/ja-JP-DyELKS9Q.js +0 -42
  359. package/dist/ja-JP-GSbqID7o.js +0 -13
  360. package/dist/jpAddressSchema-ULGNNt5U.js +0 -27
  361. package/dist/lt-LT-C5nNCk4_.js +0 -13
  362. package/dist/lt-LT-CLPQVRpJ.js +0 -42
  363. package/dist/lt-LT-DSiutpRl.js +0 -13
  364. package/dist/lv-LV-C62XiDE5.js +0 -13
  365. package/dist/lv-LV-CEK8Re4d.js +0 -13
  366. package/dist/lv-LV-Cu-MJMVO.js +0 -42
  367. package/dist/mapJpAddressSchemaToAddressLocalizations-D7YGYa9S.js +0 -147
  368. package/dist/nl-NL-BOJ6zuBr.js +0 -13
  369. package/dist/nl-NL-DOQPxTX-.js +0 -13
  370. package/dist/nl-NL-pVdpCCOx.js +0 -42
  371. package/dist/no-NO-CRULNwNn.js +0 -42
  372. package/dist/no-NO-Cp3-tDMw.js +0 -13
  373. package/dist/no-NO-CuwTDFSf.js +0 -13
  374. package/dist/pl-PL-1-MrLPXu.js +0 -13
  375. package/dist/pl-PL-CtDHmbhp.js +0 -13
  376. package/dist/pl-PL-CxCiWdAF.js +0 -42
  377. package/dist/pt-BR-Br_cHzGx.js +0 -13
  378. package/dist/pt-BR-DnKEuslh.js +0 -13
  379. package/dist/pt-BR-apPtB2cK.js +0 -42
  380. package/dist/pt-PT-CLwCij2I.js +0 -13
  381. package/dist/pt-PT-Coa6J7SM.js +0 -42
  382. package/dist/pt-PT-cjbtYBUX.js +0 -13
  383. package/dist/ro-RO-BTqq5BPM.js +0 -42
  384. package/dist/ro-RO-CGhIjlpU.js +0 -13
  385. package/dist/ro-RO-Cmk-sVDr.js +0 -13
  386. package/dist/sk-SK-Bo5nvxWQ.js +0 -13
  387. package/dist/sk-SK-Do6CKNU4.js +0 -13
  388. package/dist/sk-SK-welR06By.js +0 -42
  389. package/dist/sl-SI-B9N6vA08.js +0 -42
  390. package/dist/sl-SI-CrTRlNnN.js +0 -13
  391. package/dist/sl-SI-cY-L2ma-.js +0 -13
  392. package/dist/sv-SE-BtwPrLEA.js +0 -13
  393. package/dist/sv-SE-D6al0j6W.js +0 -42
  394. package/dist/sv-SE-WPziDPQa.js +0 -13
  395. package/dist/types/utils/analytics.d.ts +0 -31
  396. package/dist/utils-AieP90ex.js +0 -29
  397. package/dist/utils-Bd79Y_6k.js +0 -165
  398. package/dist/validate-WO7yAOk4.js +0 -382
@@ -1,3094 +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] = "2ce92353-506c-4919-94b9-2129cbd70262", e._sentryDebugIdIdentifier = "sentry-dbid-2ce92353-506c-4919-94b9-2129cbd70262");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { bs as getNestedPropertyKeys, ai as objectsDeepEqual, u as useTranslation, c as useLegalEntity, R as ROOT_LE, a9 as CountryCodes, y as LegalEntityTypes, M as TaskTypes, aG as keysOf, X as useExperimentsContext } from "./StoreProvider-BYjTSjnX.js";
11
- import { jsxs, jsx, Fragment } from "preact/jsx-runtime";
12
- import { memo } from "preact/compat";
13
- import { useState, useRef, useEffect, useCallback, useMemo } from "preact/hooks";
14
- import { a as useForm, F as Field, c as Select } from "./useForm-CNi1k1NR.js";
15
- import { c as createFormUtils, H as Header, E as ErrorPanel } from "./CountryField-CFppUh42.js";
16
- import { T as TextArea, f as validatePatternOnBlur, c as validateNotEmptyOnBlur, a as useAccountHolder } from "./fieldConfigurations-BsOQ678Q.js";
17
- import { S as StateContextSetter } from "./validate-DzaSMOa2.js";
18
- import { D as DocumentGuidance, u as uppercase } from "./mapExistingFile-D_HVWRXe.js";
19
- import { D as Dropzone } from "./Dropzone-DSyKXnbD.js";
20
- import { C as Checkbox } from "./analytics-DkXXx2b6.js";
21
- import { C as CompanyTypesValues } from "./bafinUtils-DkP3ZoN4.js";
22
- import { m as makeMask, n as numericInputs, a as nonInputs, d as alphanumericInputs, c as customInputs, b as alphaInputs, s as spacer, M as MaskedInput } from "./MaskedInput-DB6EYmfa.js";
23
- import { S as SettingNames } from "./InputText-EX5kyD9L.js";
24
- import { C as COUNTRIES_WITH_STATES_DATASET } from "./utils-Bd79Y_6k.js";
25
- import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
26
- import { i as isDateOlderThanAYear } from "./Address-CN31gTRW.js";
27
- import { R as RadioGroup } from "./RadioGroup-DhwjhH0X.js";
28
- const getFieldsWithExistingData = (legalEntity, keyMapping, documentMapping, knownProblematicFields = []) => {
29
- const apiFieldsWithExistingData = getNestedPropertyKeys(legalEntity);
30
- const nonDocumentFields = apiFieldsWithExistingData.map((field) => keyMapping[field]).filter(Boolean).filter((field) => !knownProblematicFields.includes(field));
31
- if (documentMapping && legalEntity.documentDetails?.length) {
32
- const documentFields = legalEntity.documentDetails.map((document) => documentMapping[document.type]).filter(Boolean);
33
- return [...nonDocumentFields, ...documentFields];
34
- }
35
- return nonDocumentFields;
36
- };
37
- const descriptionField = "adyen-kyc-description-field";
38
- const styles = {
39
- descriptionField
40
- };
41
- const DESCRIPTION_CHARACTERS_LIMIT = 200;
42
- function DocumentUpload({
43
- documentType,
44
- documentField,
45
- guidanceHeader,
46
- documentTypeSelect,
47
- guidanceContent,
48
- handleFieldChange,
49
- requiredFields,
50
- data: dataProp,
51
- valid: validProp,
52
- errors: errorProp,
53
- fieldValidationErrors: propFieldValidationErrors,
54
- supportsMultipleUploads,
55
- maxNumberOfFiles = 1,
56
- label,
57
- extraDropzoneDescription,
58
- hidePageCount,
59
- ...props
60
- }) {
61
- const { t } = useTranslation("common");
62
- const [document, setDocument] = useState();
63
- const form = useForm({
64
- ...props,
65
- schema: ["description"],
66
- defaultData: dataProp,
67
- rules: props.validators,
68
- fieldProblems: propFieldValidationErrors
69
- });
70
- const { handleChangeFor, triggerValidation, setData } = form;
71
- let { data, errors, valid, fieldProblems } = form;
72
- const formUtils = createFormUtils(props, t);
73
- const stateRef = useRef({ setState: null });
74
- const isOptional = !(props?.formVerificationErrors && Object.keys(props?.formVerificationErrors)?.length === 0);
75
- useEffect(() => {
76
- if (isOptional) {
77
- triggerValidation();
78
- }
79
- }, [dataProp]);
80
- useEffect(() => {
81
- stateRef.current.setState?.({
82
- type: "addToState",
83
- value: {
84
- data,
85
- valid,
86
- errors,
87
- fieldProblems,
88
- dataStoreId: props.id,
89
- schema: requiredFields
90
- }
91
- });
92
- }, [data, valid, errors, fieldProblems]);
93
- useEffect(() => {
94
- setDocument({
95
- [documentField]: dataProp?.[documentField]
96
- });
97
- setData("description", dataProp?.description);
98
- triggerValidation();
99
- }, [dataProp]);
100
- if (handleFieldChange && requiredFields && propFieldValidationErrors) {
101
- data = dataProp ?? {};
102
- errors = errorProp;
103
- valid = validProp;
104
- fieldProblems = propFieldValidationErrors;
105
- }
106
- return /* @__PURE__ */ jsxs(
107
- "div",
108
- {
109
- className: `adyen-kyc-company-document-upload adyen-kyc-company-document-upload--${documentField}`,
110
- children: [
111
- /* @__PURE__ */ jsx(StateContextSetter, { owner: props.id, stateRef }),
112
- props.heading && /* @__PURE__ */ jsx(Header, { title: props.heading, description: props.description }),
113
- /* @__PURE__ */ jsx(
114
- ErrorPanel,
115
- {
116
- verificationErrors: props?.formVerificationErrors,
117
- validationErrors: propFieldValidationErrors,
118
- formUtils,
119
- id: "ariaErrorField"
120
- }
121
- ),
122
- formUtils.isRequiredField(documentField) && /* @__PURE__ */ jsxs(Fragment, { children: [
123
- guidanceHeader,
124
- documentTypeSelect && /* @__PURE__ */ jsx(Field, { name: "documentType", label: t(($) => $["selectDocumentType"]), children: (childProps) => /* @__PURE__ */ jsx(
125
- Select,
126
- {
127
- ...childProps,
128
- onChange: (e) => documentTypeSelect.setSelectedType(e.target.value),
129
- name: "documentType",
130
- placeholder: t(($) => $["selectDocument"]),
131
- selected: documentTypeSelect.selectedType,
132
- items: documentTypeSelect.options.map(({ id, name }) => ({
133
- id,
134
- name: t(($) => $[name])
135
- }))
136
- }
137
- ) }),
138
- /* @__PURE__ */ jsx("div", { children: guidanceContent }),
139
- /* @__PURE__ */ jsx(DocumentGuidance, { type: documentType, className: "adyen-kyc-u-margin-bottom-24" }),
140
- /* @__PURE__ */ jsx(
141
- Dropzone,
142
- {
143
- defaultData: document ?? data,
144
- id: props.id,
145
- isOptional: isOptional || formUtils.isOptionalField(documentField),
146
- maxSize: documentType === "constitutionalDocument" ? 31457280 : void 0,
147
- name: documentField,
148
- shouldValidate: props.shouldValidate,
149
- handleFieldChange,
150
- errors,
151
- fieldValidationErrors: fieldProblems,
152
- valid,
153
- multiple: supportsMultipleUploads,
154
- maxNumberOfFiles: maxNumberOfFiles ?? 1,
155
- label,
156
- extraDropzoneDescription,
157
- hidePageCount
158
- }
159
- )
160
- ] }),
161
- formUtils.isRequiredField("description") && /* @__PURE__ */ jsx("div", { className: styles.descriptionField, children: /* @__PURE__ */ jsx(
162
- Field,
163
- {
164
- name: "description",
165
- label: formUtils.getLabel("descriptionOptional"),
166
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
167
- isValid: valid.description,
168
- children: (childProps) => /* @__PURE__ */ jsx(
169
- TextArea,
170
- {
171
- ...childProps,
172
- name: "description",
173
- value: data.description,
174
- maxLength: DESCRIPTION_CHARACTERS_LIMIT,
175
- onInput: handleChangeFor("description"),
176
- "aria-invalid": !valid.description,
177
- handleFieldChange: handleFieldChange?.("description"),
178
- errors,
179
- fieldValidationErrors: fieldProblems,
180
- valid
181
- }
182
- )
183
- }
184
- ) })
185
- ]
186
- }
187
- );
188
- }
189
- const MemoizedDocumentUpload = memo(
190
- DocumentUpload,
191
- (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.errors, nextProps.errors) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name && prevProps.country === nextProps.country && prevProps.companyType === nextProps.companyType
192
- );
193
- const useCapabilities = () => {
194
- const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
195
- return rootLegalEntity?.capabilities;
196
- };
197
- const companyRegistrationNumberOptions = {
198
- [CountryCodes.Australia]: [
199
- {
200
- id: "incorporatedAssociationRegistrationNumber",
201
- name: "incorporatedAssociationRegistrationNumber",
202
- applicableOnlyFor: [CompanyTypesValues.INCORPORATED_ASSOCIATION]
203
- },
204
- { id: "australianBusinessNumberAcn", name: "australianBusinessNumberAcn" }
205
- ],
206
- [CountryCodes.Austria]: [
207
- {
208
- id: "firmenbuchnummer",
209
- name: "firmenbuchnummer"
210
- },
211
- {
212
- id: "ZVR",
213
- name: "zentralesVereinsregisterId",
214
- applicableOnlyFor: [
215
- CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
216
- CompanyTypesValues.INCORPORATED_ASSOCIATION
217
- ]
218
- }
219
- ],
220
- [CountryCodes.Croatia]: [
221
- { id: "MBO", name: "MBO" },
222
- { id: "MBS", name: "MBS" }
223
- ],
224
- [CountryCodes.France]: [
225
- {
226
- id: "SIRET",
227
- name: "siret"
228
- },
229
- {
230
- id: "RNA",
231
- name: "rnaNumber",
232
- applicableOnlyFor: [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]
233
- }
234
- ],
235
- [CountryCodes.Hungary]: [
236
- {
237
- id: "nyilvantartasiSzam",
238
- name: "huRegistrationNumberForSoleProp",
239
- applicableOnlyFor: [CompanyTypesValues.SOLE_PROPRIETORSHIP]
240
- }
241
- ],
242
- [CountryCodes.Italy]: [
243
- {
244
- id: "partitaIVA",
245
- name: "codiceFiscalePartitaIVA"
246
- },
247
- {
248
- id: "CCIAA",
249
- name: "CCIAA"
250
- }
251
- ],
252
- [CountryCodes.Monaco]: [
253
- {
254
- id: "mcRegistrationNumberSoleProp",
255
- name: "mcRegistrationNumberSoleProp",
256
- applicableOnlyFor: [CompanyTypesValues.SOLE_PROPRIETORSHIP]
257
- },
258
- {
259
- id: "mcRegistrationNumber",
260
- name: "mcRegistrationNumber",
261
- applicableOnlyFor: [
262
- CompanyTypesValues.PRIVATE_COMPANY,
263
- CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
264
- CompanyTypesValues.INCORPORATED_ASSOCIATION,
265
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
266
- CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
267
- CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
268
- CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
269
- ]
270
- }
271
- ],
272
- [CountryCodes.NewZealand]: [
273
- {
274
- id: "NZBN",
275
- name: "NZBN"
276
- },
277
- {
278
- id: "companyNumberNZ",
279
- name: "companyNumberNZ",
280
- applicableOnlyFor: [
281
- CompanyTypesValues.PRIVATE_COMPANY,
282
- CompanyTypesValues.PUBLIC_COMPANY,
283
- CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
284
- ]
285
- }
286
- ],
287
- [CountryCodes.Romania]: [
288
- {
289
- id: "roRegNumberNewFormat",
290
- name: "roRegNumberNewFormat_label"
291
- },
292
- {
293
- id: "roRegNumberOldFormat",
294
- name: "roRegNumberOldFormat_label"
295
- }
296
- ],
297
- [CountryCodes.Poland]: [
298
- {
299
- id: "regon",
300
- name: "regon"
301
- },
302
- {
303
- id: "krsNumber",
304
- name: "krsNumber"
305
- }
306
- ],
307
- [CountryCodes.UnitedKingdom]: [
308
- {
309
- id: "charity",
310
- name: "charityNumber",
311
- applicableOnlyFor: [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]
312
- },
313
- {
314
- id: "companyNumber",
315
- name: "companyNumber",
316
- applicableOnlyFor: [
317
- CompanyTypesValues.PRIVATE_COMPANY,
318
- CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
319
- CompanyTypesValues.INCORPORATED_ASSOCIATION,
320
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
321
- CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
322
- CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
323
- CompanyTypesValues.UNLISTED_PUBLIC_COMPANY,
324
- CompanyTypesValues.PUBLIC_COMPANY
325
- ]
326
- }
327
- ]
328
- };
329
- const getCompanyRegistrationNumberOptions = (country, companyType) => {
330
- const optionsForCountry = companyRegistrationNumberOptions[country];
331
- if (!companyType || !optionsForCountry) return optionsForCountry;
332
- return optionsForCountry.filter(
333
- (option) => option.applicableOnlyFor?.includes(companyType) ?? true
334
- );
335
- };
336
- const individualIdNumberOptions = {
337
- [CountryCodes.Spain]: [
338
- {
339
- id: "dni",
340
- name: "dni"
341
- },
342
- {
343
- id: "nie",
344
- name: "nie"
345
- }
346
- ]
347
- };
348
- const additionallIdNumberOptions = {
349
- [CountryCodes.NewZealand]: [
350
- {
351
- id: "driversLicense",
352
- name: "driversLicense"
353
- },
354
- {
355
- id: "passport",
356
- name: "passportNumber"
357
- }
358
- ],
359
- [CountryCodes.HongKong]: [
360
- {
361
- id: "proofOfIdentityCard",
362
- name: "stateIssuedProofOfIdentityCard"
363
- },
364
- {
365
- id: "driversLicense",
366
- name: "driversLicense"
367
- },
368
- {
369
- id: "passport",
370
- name: "passportNumber"
371
- }
372
- ],
373
- [CountryCodes.Australia]: [
374
- {
375
- id: "driversLicense",
376
- name: "driversLicense"
377
- },
378
- {
379
- id: "passport",
380
- name: "passportNumber"
381
- }
382
- ]
383
- };
384
- const taxIdNumberOptions = {
385
- [CountryCodes.Australia]: [
386
- {
387
- id: "ABN",
388
- name: "australianBusinessNumberAbn"
389
- }
390
- ],
391
- [CountryCodes.Belgium]: [
392
- {
393
- id: "BUSINESS_NUMMER",
394
- name: "businessNumber",
395
- applicableOnlyFor: [
396
- CompanyTypesValues.SOLE_PROPRIETORSHIP,
397
- CompanyTypesValues.PRIVATE_COMPANY,
398
- CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
399
- CompanyTypesValues.INCORPORATED_ASSOCIATION,
400
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
401
- CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
402
- CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
403
- CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
404
- ]
405
- },
406
- {
407
- id: "NUMERO_NATIONAL",
408
- name: "taxInformationNumber__BE_Individual",
409
- applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
410
- }
411
- ],
412
- [CountryCodes.Brazil]: [{ id: "CNPJ", name: "CNPJ" }],
413
- [CountryCodes.Canada]: [{ id: "BUSINESS_NUMBER", name: "businessNumber" }],
414
- [CountryCodes.Germany]: [
415
- {
416
- id: "STEUERNUMMER",
417
- name: "taxInformationNumber__DE",
418
- applicableOnlyFor: [
419
- CompanyTypesValues.SOLE_PROPRIETORSHIP,
420
- CompanyTypesValues.PRIVATE_COMPANY,
421
- CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
422
- CompanyTypesValues.INCORPORATED_ASSOCIATION,
423
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
424
- CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
425
- CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
426
- CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
427
- ]
428
- },
429
- {
430
- id: "IDNR",
431
- name: "taxInformationNumber__DE_Individual",
432
- applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
433
- }
434
- ],
435
- [CountryCodes.Gibraltar]: [
436
- { id: "GI_TAXPAYER_REFERENCE_NUMBER", name: "taxpayerReferenceNumber" }
437
- ],
438
- [CountryCodes.Guernsey]: [
439
- { id: "GG_REGISTRATION_NUMBER", name: "taxInformationNumber" },
440
- {
441
- id: "TIN_GG",
442
- name: "nationalInsuranceNumber",
443
- applicableOnlyFor: [CompanyTypesValues.SOLE_PROPRIETORSHIP]
444
- }
445
- ],
446
- [CountryCodes.HongKong]: [
447
- {
448
- id: "BRN",
449
- name: "taxInformationNumber__HK"
450
- }
451
- ],
452
- [CountryCodes.Ireland]: [
453
- {
454
- id: "TRN",
455
- name: "trnNumber",
456
- applicableOnlyFor: [CompanyTypesValues.UNINCORPORATED_PARTNERSHIP]
457
- }
458
- ],
459
- [CountryCodes.IsleOfMan]: [{ id: "IM_TAX_REFERENCE_NUMBER", name: "taxReferenceNumber" }],
460
- [CountryCodes.Japan]: [{ id: "CORPORATE_NUMBER", name: "taxInformationNumber" }],
461
- [CountryCodes.Jersey]: [
462
- {
463
- id: "TIN_JE",
464
- name: "taxIdentificationNumber"
465
- },
466
- {
467
- id: "SSN",
468
- name: "socialSecurityNumber",
469
- applicableOnlyFor: [CompanyTypesValues.SOLE_PROPRIETORSHIP]
470
- }
471
- ],
472
- [CountryCodes.Netherlands]: [
473
- {
474
- id: "RSIN",
475
- name: "rsinNumber",
476
- applicableOnlyFor: [
477
- CompanyTypesValues.PRIVATE_COMPANY,
478
- CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
479
- CompanyTypesValues.INCORPORATED_ASSOCIATION,
480
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
481
- CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
482
- CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
483
- CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
484
- ]
485
- },
486
- {
487
- id: "BSN",
488
- name: "bsnNumber",
489
- applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
490
- }
491
- ],
492
- [CountryCodes.NewZealand]: [
493
- {
494
- id: "IRD",
495
- name: "irdNumber"
496
- }
497
- ],
498
- [CountryCodes.PuertoRico]: [
499
- {
500
- id: "EIN",
501
- name: "ein"
502
- }
503
- ],
504
- [CountryCodes.Singapore]: [
505
- {
506
- id: "GST",
507
- name: "gst"
508
- },
509
- {
510
- id: "UEN",
511
- name: "uen"
512
- }
513
- ],
514
- [CountryCodes.Spain]: [
515
- {
516
- id: "dni",
517
- name: "dni",
518
- applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
519
- },
520
- {
521
- id: "nie",
522
- name: "nie",
523
- applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
524
- }
525
- ],
526
- [CountryCodes.UnitedKingdom]: [
527
- {
528
- id: "UTR",
529
- name: "utr"
530
- },
531
- {
532
- id: "NINO",
533
- name: "nationalInsuranceNumber",
534
- applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
535
- }
536
- ],
537
- [CountryCodes.UnitedStates]: [
538
- {
539
- id: "EIN",
540
- name: "ein"
541
- }
542
- ]
543
- };
544
- const vatNumberOptions = {
545
- [CountryCodes.Austria]: [{ id: "UST-ID", name: "UST-ID" }],
546
- [CountryCodes.Belgium]: [{ id: "euVatNumber", name: "euVatNumber" }],
547
- [CountryCodes.Bulgaria]: [{ id: "identifikacionenNomerDDS", name: "identifikacionenNomerDDS" }],
548
- [CountryCodes.Croatia]: [{ id: "PDVIdBrojOIB", name: "PDVIdBrojOIB" }],
549
- [CountryCodes.Cyprus]: [{ id: "arithmosEngraphes", name: "arithmosEngraphes" }],
550
- [CountryCodes.CzechRepublic]: [{ id: "DIC", name: "DIC" }],
551
- [CountryCodes.Denmark]: [
552
- {
553
- id: "momsregistreringsnummerCVR",
554
- name: "momsregistreringsnummerCVR"
555
- },
556
- {
557
- id: "stamregister",
558
- name: "stamregister"
559
- }
560
- ],
561
- [CountryCodes.Estonia]: [
562
- { id: "kaibemaksukohustuslaseNumber", name: "kaibemaksukohustuslaseNumber" }
563
- ],
564
- [CountryCodes.Finland]: [
565
- {
566
- id: "arvonlisaveronumeroMervardesskattenummer",
567
- name: "arvonlisaveronumeroMervardesskattenummer"
568
- }
569
- ],
570
- [CountryCodes.France]: [
571
- {
572
- id: "numeroDIdentificationALATaxe",
573
- name: "numeroDIdentificationALATaxe"
574
- },
575
- {
576
- id: "NumeroDeTVA",
577
- name: "NumeroDeTVA"
578
- }
579
- ],
580
- [CountryCodes.Germany]: [{ id: "USt-IdNr", name: "USt-IdNr" }],
581
- [CountryCodes.Greece]: [{ id: "grTaxId", name: "grTaxId" }],
582
- [CountryCodes.Hungary]: [{ id: "huTaxId", name: "huTaxId" }],
583
- [CountryCodes.Ireland]: [{ id: "vatNumber", name: "vatNumber" }],
584
- [CountryCodes.Italy]: [{ id: "partitaIVA", name: "partitaIVA" }],
585
- [CountryCodes.Latvia]: [{ id: "lvTaxId", name: "lvTaxId" }],
586
- [CountryCodes.Liechtenstein]: [{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }],
587
- [CountryCodes.Lithuania]: [{ id: "PVMmoketojoKodas", name: "PVMmoketojoKodas" }],
588
- [CountryCodes.Luxembourg]: [
589
- { id: "numeroDIdentificationALATaxe", name: "numeroDIdentificationALATaxe" }
590
- ],
591
- [CountryCodes.Malaysia]: [{ id: "SST", name: "SST" }],
592
- [CountryCodes.Malta]: [{ id: "vatNumber", name: "vatNumber" }],
593
- [CountryCodes.Monaco]: [
594
- { id: "numeroDIdentificationALATaxe", name: "numeroDIdentificationALATaxe" }
595
- ],
596
- [CountryCodes.Netherlands]: [{ id: "btwNummer", name: "btwNummer" }],
597
- [CountryCodes.Norway]: [{ id: "mvanummer", name: "mvanummer" }],
598
- [CountryCodes.Poland]: [{ id: "NIP", name: "NIP" }],
599
- [CountryCodes.Portugal]: [{ id: "numerodeIVA", name: "numerodeIVA" }],
600
- [CountryCodes.Romania]: [
601
- { id: "codulDeIdentificareFiscala", name: "codulDeIdentificareFiscala" }
602
- ],
603
- [CountryCodes.Slovakia]: [{ id: "skTaxId", name: "skTaxId" }],
604
- [CountryCodes.Slovenia]: [{ id: "siTaxId", name: "siTaxId" }],
605
- [CountryCodes.Spain]: [{ id: "NIFdeIVA", name: "NIFdeIVA" }],
606
- [CountryCodes.Sweden]: [
607
- {
608
- id: "vatNummerMomsregistreringsnummerOrMomsnummer",
609
- name: "vatNummerMomsregistreringsnummerOrMomsnummer"
610
- }
611
- ],
612
- [CountryCodes.Switzerland]: [{ id: "Mehrwertsteuernummer", name: "Mehrwertsteuernummer" }],
613
- [CountryCodes.UnitedArabEmirates]: [
614
- { id: "vatRegistrationNumber", name: "vatRegistrationNumber" }
615
- ],
616
- [CountryCodes.UnitedKingdom]: [{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }]
617
- };
618
- const getTaxIdNumberOptions = (country, companyType) => {
619
- const optionsForCountry = taxIdNumberOptions[country];
620
- if (!companyType || !optionsForCountry) return optionsForCountry;
621
- return optionsForCountry.filter(
622
- (option) => option.applicableOnlyFor?.includes(companyType) ?? true
623
- );
624
- };
625
- const getVatNumberOptions = (country, companyType) => {
626
- const optionsForCountry = vatNumberOptions[country];
627
- if (!companyType || !optionsForCountry) return optionsForCountry;
628
- return optionsForCountry.filter(
629
- (option) => option.applicableOnlyFor?.includes(companyType) ?? true
630
- );
631
- };
632
- const StateCodesUS = {
633
- Alabama: "AL",
634
- Alaska: "AK",
635
- Arizona: "AZ",
636
- Arkansas: "AR",
637
- California: "CA",
638
- Colorado: "CO",
639
- Connecticut: "CT",
640
- Delaware: "DE",
641
- DistrictOfColumbia: "DC",
642
- Florida: "FL",
643
- Georgia: "GA",
644
- Hawaii: "HI",
645
- Idaho: "ID",
646
- Illinois: "IL",
647
- Indiana: "IN",
648
- Iowa: "IA",
649
- Kansas: "KS",
650
- Kentucky: "KY",
651
- Louisiana: "LA",
652
- Maine: "ME",
653
- Maryland: "MD",
654
- Massachusetts: "MA",
655
- Michigan: "MI",
656
- Minnesota: "MN",
657
- Mississippi: "MS",
658
- Missouri: "MO",
659
- Montana: "MT",
660
- Nebraska: "NE",
661
- Nevada: "NV",
662
- NewHampshire: "NH",
663
- NewJersey: "NJ",
664
- NewMexico: "NM",
665
- NewYork: "NY",
666
- NorthCarolina: "NC",
667
- NorthDakota: "ND",
668
- Ohio: "OH",
669
- Oklahoma: "OK",
670
- Oregon: "OR",
671
- Pennsylvania: "PA",
672
- RhodeIsland: "RI",
673
- SouthCarolina: "SC",
674
- SouthDakota: "SD",
675
- Tennessee: "TN",
676
- Texas: "TX",
677
- Utah: "UT",
678
- Vermont: "VT",
679
- Virginia: "VA",
680
- Washington: "WA",
681
- WestVirginia: "WV",
682
- Wisconsin: "WI",
683
- Wyoming: "WY"
684
- };
685
- const businessRegistrationNumberMasks = {
686
- [CountryCodes.Austria]: {
687
- firmenbuchnummer: {
688
- mask: makeMask(
689
- {
690
- type: "input",
691
- allow: /[TF]/
692
- },
693
- {
694
- type: "input",
695
- allow: /N/,
696
- optional: true
697
- },
698
- ...numericInputs(3),
699
- ...numericInputs(3, true),
700
- { type: "input", allow: /[a-z]/ }
701
- )
702
- },
703
- ZVR: {
704
- mask: makeMask(
705
- ...nonInputs("AT", { includeInValue: true }),
706
- spacer,
707
- ...nonInputs("-", { includeInValue: true }),
708
- spacer,
709
- ...nonInputs("ZVR", { includeInValue: true }),
710
- spacer,
711
- ...nonInputs("-", { includeInValue: true }),
712
- spacer,
713
- ...numericInputs(9),
714
- ...numericInputs(1, true)
715
- )
716
- }
717
- },
718
- [CountryCodes.Australia]: {
719
- default: {
720
- mask: makeMask(...numericInputs(3), spacer, ...numericInputs(3), spacer, ...numericInputs(3))
721
- },
722
- associationIncorporated: {
723
- mask: makeMask(...alphanumericInputs(3), ...alphanumericInputs(20, true)),
724
- transformOnType: uppercase
725
- }
726
- },
727
- [CountryCodes.Belgium]: { default: { mask: makeMask(...numericInputs(10)) } },
728
- [CountryCodes.Brazil]: {
729
- default: {
730
- mask: makeMask(
731
- ...numericInputs(2),
732
- ...nonInputs(" . "),
733
- ...numericInputs(3),
734
- ...nonInputs(" . "),
735
- ...numericInputs(3),
736
- ...nonInputs(" / "),
737
- ...numericInputs(4),
738
- ...nonInputs(" - "),
739
- ...numericInputs(2)
740
- )
741
- }
742
- },
743
- [CountryCodes.Bulgaria]: { default: { mask: makeMask(...numericInputs(9)) } },
744
- [CountryCodes.Canada]: {
745
- default: {
746
- mask: makeMask(...alphanumericInputs(5), ...alphanumericInputs(5, true)),
747
- transformOnType: uppercase
748
- }
749
- },
750
- [CountryCodes.Croatia]: {
751
- default: {
752
- mask: makeMask(...numericInputs(9))
753
- },
754
- [CompanyTypesValues.SOLE_PROPRIETORSHIP]: {
755
- mask: makeMask(...numericInputs(8))
756
- }
757
- },
758
- [CountryCodes.Cyprus]: {
759
- default: {
760
- mask: makeMask(...customInputs(1, /^[COP]$/), ...numericInputs(1), ...numericInputs(7, true)),
761
- transformOnType: uppercase
762
- }
763
- },
764
- [CountryCodes.CzechRepublic]: {
765
- default: { mask: makeMask(...numericInputs(8), ...numericInputs(2, true)) }
766
- },
767
- [CountryCodes.Denmark]: { default: { mask: makeMask(...numericInputs(8)) } },
768
- [CountryCodes.Estonia]: { default: { mask: makeMask(...numericInputs(8)) } },
769
- [CountryCodes.Finland]: {
770
- default: {
771
- mask: makeMask(
772
- ...numericInputs(7),
773
- spacer,
774
- ...nonInputs("-", { includeInValue: true }),
775
- spacer,
776
- ...numericInputs(1)
777
- )
778
- }
779
- },
780
- [CountryCodes.France]: {
781
- SIRET: { mask: makeMask(...numericInputs(9), ...nonInputs(" - "), ...numericInputs(5)) },
782
- RNA: {
783
- mask: makeMask(
784
- ...nonInputs("W", { includeInValue: true }),
785
- ...numericInputs(1),
786
- ...alphanumericInputs(1),
787
- ...numericInputs(7)
788
- )
789
- }
790
- },
791
- [CountryCodes.Germany]: {
792
- default: {
793
- mask: makeMask(...alphanumericInputs(3), ...customInputs(17, /[A-Z0-9-]/, true)),
794
- transformOnType: uppercase
795
- }
796
- },
797
- [CountryCodes.Gibraltar]: {
798
- default: {
799
- mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(7, true)),
800
- transformOnType: uppercase
801
- }
802
- },
803
- [CountryCodes.Greece]: { default: { mask: makeMask(...numericInputs(12)) } },
804
- [CountryCodes.Guernsey]: {
805
- default: { mask: makeMask(...numericInputs(1), ...numericInputs(8, true)) }
806
- },
807
- [CountryCodes.HongKong]: { default: { mask: makeMask(...numericInputs(7)) } },
808
- [CountryCodes.Hungary]: {
809
- default: {
810
- mask: makeMask(
811
- ...numericInputs(2),
812
- ...nonInputs(" - "),
813
- ...numericInputs(2),
814
- ...nonInputs(" - "),
815
- ...numericInputs(6)
816
- )
817
- },
818
- nyilvantartasiSzam: {
819
- mask: makeMask(...numericInputs(10))
820
- }
821
- },
822
- [CountryCodes.Ireland]: {
823
- default: { mask: makeMask(...numericInputs(1), ...numericInputs(7, true)) }
824
- },
825
- [CountryCodes.IsleOfMan]: {
826
- default: { mask: makeMask(...numericInputs(6), ...alphaInputs(1)), transformOnType: uppercase }
827
- },
828
- [CountryCodes.Italy]: {
829
- partitaIVA: { mask: makeMask(...numericInputs(11)) },
830
- CCIAA: {
831
- mask: makeMask(...alphaInputs(2), ...numericInputs(6), ...numericInputs(1, true)),
832
- transformOnType: uppercase
833
- }
834
- },
835
- [CountryCodes.Japan]: {
836
- default: { mask: makeMask(...numericInputs(12)) }
837
- },
838
- [CountryCodes.Jersey]: {
839
- default: {
840
- mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(8, true)),
841
- transformOnType: uppercase
842
- }
843
- },
844
- [CountryCodes.Latvia]: { default: { mask: makeMask(...numericInputs(11)) } },
845
- [CountryCodes.Liechtenstein]: {
846
- default: {
847
- mask: makeMask(
848
- ...nonInputs("FL", { includeInValue: true }),
849
- spacer,
850
- ...nonInputs("-", { includeInValue: true }),
851
- spacer,
852
- ...numericInputs(4),
853
- spacer,
854
- ...nonInputs(".", { includeInValue: true }),
855
- spacer,
856
- ...numericInputs(3),
857
- spacer,
858
- ...nonInputs(".", { includeInValue: true }),
859
- spacer,
860
- ...numericInputs(3),
861
- spacer,
862
- ...nonInputs("-", { includeInValue: true }),
863
- spacer,
864
- ...numericInputs(1)
865
- )
866
- }
867
- },
868
- [CountryCodes.Lithuania]: {
869
- default: { mask: makeMask(...numericInputs(6), ...numericInputs(3, true)) }
870
- },
871
- [CountryCodes.Luxembourg]: {
872
- default: {
873
- mask: makeMask(...alphaInputs(1), ...numericInputs(9, true)),
874
- transformOnType: uppercase
875
- }
876
- },
877
- [CountryCodes.Malaysia]: {
878
- default: { mask: makeMask(...numericInputs(7), ...numericInputs(5, true)) }
879
- },
880
- [CountryCodes.Malta]: {
881
- default: {
882
- mask: makeMask(
883
- ...customInputs(1, /[CP]/),
884
- spacer,
885
- ...numericInputs(4),
886
- ...numericInputs(2, true)
887
- ),
888
- transformOnType: uppercase
889
- }
890
- },
891
- [CountryCodes.Mexico]: { default: { mask: makeMask(...alphanumericInputs(12)) } },
892
- [CountryCodes.Monaco]: {
893
- default: {
894
- mask: makeMask(...alphanumericInputs(8), ...alphanumericInputs(3, true)),
895
- transformOnType: uppercase
896
- },
897
- [CompanyTypesValues.SOLE_PROPRIETORSHIP]: {
898
- mask: makeMask(...alphanumericInputs(8), ...alphanumericInputs(3, true)),
899
- transformOnType: uppercase
900
- }
901
- },
902
- [CountryCodes.Netherlands]: { default: { mask: makeMask(...numericInputs(8)) } },
903
- [CountryCodes.NewZealand]: {
904
- NZBN: { mask: makeMask(...numericInputs(13)) },
905
- companyNumberNZ: { mask: makeMask(...numericInputs(7)) }
906
- },
907
- [CountryCodes.Norway]: { default: { mask: makeMask(...numericInputs(9)) } },
908
- [CountryCodes.Poland]: {
909
- krsNumber: { mask: makeMask(...numericInputs(10)) },
910
- regon: { mask: makeMask(...numericInputs(9)) }
911
- },
912
- [CountryCodes.Portugal]: { default: { mask: makeMask(...numericInputs(9)) } },
913
- [CountryCodes.Romania]: {
914
- roRegNumberOldFormat: {
915
- mask: makeMask(
916
- ...alphaInputs(1),
917
- ...numericInputs(1),
918
- ...numericInputs(1, true),
919
- ...customInputs(1, /[/]/),
920
- ...numericInputs(1),
921
- ...numericInputs(8, true),
922
- ...customInputs(1, /[/]/),
923
- ...numericInputs(4)
924
- ),
925
- transformOnType: uppercase
926
- },
927
- roRegNumberNewFormat: {
928
- mask: makeMask(
929
- {
930
- type: "input",
931
- allow: /[JFC]/
932
- },
933
- ...numericInputs(13)
934
- ),
935
- transformOnType: uppercase
936
- }
937
- },
938
- [CountryCodes.Singapore]: {
939
- default: {
940
- mask: makeMask(...alphanumericInputs(9), ...alphanumericInputs(1, true)),
941
- transformOnType: uppercase
942
- }
943
- },
944
- [CountryCodes.Slovakia]: { default: { mask: makeMask(...numericInputs(8)) } },
945
- [CountryCodes.Slovenia]: { default: { mask: makeMask(...numericInputs(10)) } },
946
- [CountryCodes.Spain]: {
947
- default: {
948
- mask: makeMask(...alphaInputs(1), ...alphanumericInputs(8)),
949
- transformOnType: uppercase
950
- }
951
- },
952
- [CountryCodes.Sweden]: {
953
- default: { mask: makeMask(...numericInputs(6), ...nonInputs(" - "), ...numericInputs(4)) }
954
- },
955
- [CountryCodes.Switzerland]: {
956
- default: {
957
- mask: makeMask(
958
- ...nonInputs("CHE", { includeInValue: true }),
959
- ...nonInputs(" - "),
960
- ...numericInputs(3),
961
- ...nonInputs(" . "),
962
- ...numericInputs(3),
963
- ...nonInputs(" . "),
964
- ...numericInputs(3)
965
- )
966
- }
967
- },
968
- [CountryCodes.UnitedKingdom]: {
969
- default: { mask: makeMask(...alphanumericInputs(8)), transformOnType: uppercase },
970
- nonProfit: {
971
- mask: makeMask(
972
- ...alphanumericInputs(6),
973
- ...customInputs(1, /[a-zA-Z0-9-]/, true),
974
- ...alphanumericInputs(1, true)
975
- ),
976
- transformOnType: uppercase
977
- }
978
- },
979
- [CountryCodes.UnitedStates]: {
980
- [StateCodesUS.Alabama]: {
981
- mask: makeMask(...numericInputs(9), ...nonInputs(" "), ...nonInputs(StateCodesUS.Alabama)),
982
- transformOnType: uppercase
983
- },
984
- [StateCodesUS.Alaska]: {
985
- mask: makeMask(...numericInputs(8), ...nonInputs(" "), ...nonInputs(StateCodesUS.Alaska)),
986
- transformOnType: uppercase
987
- },
988
- [StateCodesUS.Arizona]: {
989
- mask: makeMask(...numericInputs(8), ...nonInputs(" "), ...nonInputs(StateCodesUS.Arizona)),
990
- transformOnType: uppercase
991
- },
992
- [StateCodesUS.Arkansas]: {
993
- mask: makeMask(
994
- {
995
- type: "input",
996
- allow: /[8]/
997
- },
998
- ...numericInputs(8),
999
- ...nonInputs(" "),
1000
- ...nonInputs(StateCodesUS.Arkansas)
1001
- ),
1002
- transformOnType: uppercase
1003
- },
1004
- [StateCodesUS.California]: {
1005
- mask: makeMask(
1006
- ...numericInputs(7),
1007
- ...numericInputs(5, true),
1008
- ...nonInputs(" "),
1009
- ...nonInputs(StateCodesUS.California)
1010
- ),
1011
- transformOnType: uppercase
1012
- },
1013
- [StateCodesUS.Colorado]: {
1014
- mask: makeMask(...numericInputs(11), ...nonInputs(" "), ...nonInputs(StateCodesUS.Colorado)),
1015
- transformOnType: uppercase
1016
- },
1017
- [StateCodesUS.Connecticut]: {
1018
- mask: makeMask(
1019
- ...numericInputs(7),
1020
- ...nonInputs(" "),
1021
- ...nonInputs(StateCodesUS.Connecticut)
1022
- ),
1023
- transformOnType: uppercase
1024
- },
1025
- [StateCodesUS.Delaware]: {
1026
- mask: makeMask(...numericInputs(7), ...nonInputs(" "), ...nonInputs(StateCodesUS.Delaware)),
1027
- transformOnType: uppercase
1028
- },
1029
- [StateCodesUS.Florida]: {
1030
- mask: makeMask(
1031
- ...numericInputs(6),
1032
- ...numericInputs(6, true),
1033
- ...nonInputs(" "),
1034
- ...nonInputs(StateCodesUS.Florida)
1035
- ),
1036
- transformOnType: uppercase
1037
- },
1038
- [StateCodesUS.Georgia]: {
1039
- mask: makeMask(...numericInputs(8), ...nonInputs(" "), ...nonInputs(StateCodesUS.Georgia)),
1040
- transformOnType: uppercase
1041
- },
1042
- [StateCodesUS.Hawaii]: {
1043
- mask: makeMask(
1044
- ...numericInputs(5),
1045
- ...numericInputs(3, true),
1046
- {
1047
- type: "input",
1048
- allow: /[CDFLNPTZ]/
1049
- },
1050
- {
1051
- type: "input",
1052
- allow: /[1-8Z]/
1053
- },
1054
- ...nonInputs(" "),
1055
- ...nonInputs(StateCodesUS.Hawaii)
1056
- ),
1057
- transformOnType: uppercase
1058
- },
1059
- [StateCodesUS.Idaho]: {
1060
- mask: makeMask(...numericInputs(6), ...nonInputs(" "), ...nonInputs(StateCodesUS.Idaho)),
1061
- transformOnType: uppercase
1062
- },
1063
- [StateCodesUS.Illinois]: {
1064
- mask: makeMask(...numericInputs(8), ...nonInputs(" "), ...nonInputs(StateCodesUS.Illinois)),
1065
- transformOnType: uppercase
1066
- },
1067
- [StateCodesUS.Indiana]: {
1068
- mask: makeMask(...numericInputs(10), ...nonInputs(" "), ...nonInputs(StateCodesUS.Indiana)),
1069
- transformOnType: uppercase
1070
- },
1071
- [StateCodesUS.Iowa]: {
1072
- mask: makeMask(
1073
- ...numericInputs(6),
1074
- ...numericInputs(2, true),
1075
- ...nonInputs(" "),
1076
- ...nonInputs(StateCodesUS.Iowa)
1077
- ),
1078
- transformOnType: uppercase
1079
- },
1080
- [StateCodesUS.Kansas]: {
1081
- mask: makeMask(
1082
- ...numericInputs(7),
1083
- ...numericInputs(2, true),
1084
- ...nonInputs(" "),
1085
- ...nonInputs(StateCodesUS.Kansas)
1086
- ),
1087
- transformOnType: uppercase
1088
- },
1089
- [StateCodesUS.Kentucky]: {
1090
- mask: makeMask(
1091
- ...numericInputs(9),
1092
- ...numericInputs(1, true),
1093
- ...nonInputs(" "),
1094
- ...nonInputs(StateCodesUS.Kentucky)
1095
- ),
1096
- transformOnType: uppercase
1097
- },
1098
- [StateCodesUS.Louisiana]: {
1099
- mask: makeMask(
1100
- ...numericInputs(9),
1101
- ...numericInputs(1, true),
1102
- ...nonInputs(" "),
1103
- ...nonInputs(StateCodesUS.Louisiana)
1104
- ),
1105
- transformOnType: uppercase
1106
- },
1107
- [StateCodesUS.Maine]: {
1108
- mask: makeMask(...numericInputs(8), ...nonInputs(" "), ...nonInputs(StateCodesUS.Maine)),
1109
- transformOnType: uppercase
1110
- },
1111
- [StateCodesUS.Maryland]: {
1112
- mask: makeMask(...numericInputs(8), ...nonInputs(" "), ...nonInputs(StateCodesUS.Maryland)),
1113
- transformOnType: uppercase
1114
- },
1115
- [StateCodesUS.Massachusetts]: {
1116
- mask: makeMask(
1117
- ...numericInputs(10),
1118
- ...nonInputs(" "),
1119
- ...nonInputs(StateCodesUS.Massachusetts)
1120
- ),
1121
- transformOnType: uppercase
1122
- },
1123
- [StateCodesUS.Michigan]: {
1124
- mask: makeMask(
1125
- ...numericInputs(6),
1126
- ...numericInputs(3, true),
1127
- ...nonInputs(" "),
1128
- ...nonInputs(StateCodesUS.Michigan)
1129
- ),
1130
- transformOnType: uppercase
1131
- },
1132
- [StateCodesUS.Minnesota]: {
1133
- mask: makeMask(...numericInputs(7), ...nonInputs(" "), ...nonInputs(StateCodesUS.Minnesota)),
1134
- transformOnType: uppercase
1135
- },
1136
- [StateCodesUS.Mississippi]: {
1137
- mask: makeMask(
1138
- ...numericInputs(7),
1139
- ...numericInputs(3, true),
1140
- ...nonInputs(" "),
1141
- ...nonInputs(StateCodesUS.Mississippi)
1142
- ),
1143
- transformOnType: uppercase
1144
- },
1145
- [StateCodesUS.Missouri]: {
1146
- mask: makeMask(...numericInputs(10), ...nonInputs(" "), ...nonInputs(StateCodesUS.Missouri)),
1147
- transformOnType: uppercase
1148
- },
1149
- [StateCodesUS.Montana]: {
1150
- mask: makeMask(...numericInputs(7), ...nonInputs(" "), ...nonInputs(StateCodesUS.Montana)),
1151
- transformOnType: uppercase
1152
- },
1153
- [StateCodesUS.Nebraska]: {
1154
- mask: makeMask(
1155
- ...numericInputs(9),
1156
- ...numericInputs(2, true),
1157
- ...nonInputs(" "),
1158
- ...nonInputs(StateCodesUS.Nebraska)
1159
- ),
1160
- transformOnType: uppercase
1161
- },
1162
- [StateCodesUS.Nevada]: {
1163
- mask: makeMask(
1164
- ...numericInputs(9),
1165
- ...numericInputs(2, true),
1166
- ...nonInputs(" "),
1167
- ...nonInputs(StateCodesUS.Nevada)
1168
- ),
1169
- transformOnType: uppercase
1170
- },
1171
- [StateCodesUS.NewHampshire]: {
1172
- mask: makeMask(
1173
- ...numericInputs(9),
1174
- ...nonInputs(" "),
1175
- ...nonInputs(StateCodesUS.NewHampshire)
1176
- ),
1177
- transformOnType: uppercase
1178
- },
1179
- [StateCodesUS.NewJersey]: {
1180
- mask: makeMask(...numericInputs(10), ...nonInputs(" "), ...nonInputs(StateCodesUS.NewJersey)),
1181
- transformOnType: uppercase
1182
- },
1183
- [StateCodesUS.NewMexico]: {
1184
- mask: makeMask(...numericInputs(6), ...nonInputs(" "), ...nonInputs(StateCodesUS.NewMexico)),
1185
- transformOnType: uppercase
1186
- },
1187
- [StateCodesUS.NewYork]: {
1188
- mask: makeMask(...numericInputs(7), ...nonInputs(" "), ...nonInputs(StateCodesUS.NewYork)),
1189
- transformOnType: uppercase
1190
- },
1191
- [StateCodesUS.NorthCarolina]: {
1192
- mask: makeMask(
1193
- ...numericInputs(7),
1194
- ...nonInputs(" "),
1195
- ...nonInputs(StateCodesUS.NorthCarolina)
1196
- ),
1197
- transformOnType: uppercase
1198
- },
1199
- [StateCodesUS.NorthDakota]: {
1200
- mask: makeMask(
1201
- ...numericInputs(7),
1202
- ...numericInputs(3, true),
1203
- ...nonInputs(" "),
1204
- ...nonInputs(StateCodesUS.NorthDakota)
1205
- ),
1206
- transformOnType: uppercase
1207
- },
1208
- [StateCodesUS.Ohio]: {
1209
- mask: makeMask(...numericInputs(10), ...nonInputs(" "), ...nonInputs(StateCodesUS.Ohio)),
1210
- transformOnType: uppercase
1211
- },
1212
- [StateCodesUS.Oklahoma]: {
1213
- mask: makeMask(...numericInputs(10), ...nonInputs(" "), ...nonInputs(StateCodesUS.Oklahoma)),
1214
- transformOnType: uppercase
1215
- },
1216
- [StateCodesUS.Oregon]: {
1217
- mask: makeMask(...numericInputs(9), ...nonInputs(" "), ...nonInputs(StateCodesUS.Oregon)),
1218
- transformOnType: uppercase
1219
- },
1220
- [StateCodesUS.Pennsylvania]: {
1221
- mask: makeMask(
1222
- ...numericInputs(7),
1223
- ...nonInputs(" "),
1224
- ...nonInputs(StateCodesUS.Pennsylvania)
1225
- ),
1226
- transformOnType: uppercase
1227
- },
1228
- [StateCodesUS.RhodeIsland]: {
1229
- mask: makeMask(
1230
- ...numericInputs(7),
1231
- ...nonInputs(" "),
1232
- ...nonInputs(StateCodesUS.RhodeIsland)
1233
- ),
1234
- transformOnType: uppercase
1235
- },
1236
- [StateCodesUS.SouthCarolina]: {
1237
- mask: makeMask(
1238
- ...numericInputs(7),
1239
- ...nonInputs(" "),
1240
- ...nonInputs(StateCodesUS.SouthCarolina)
1241
- ),
1242
- transformOnType: uppercase
1243
- },
1244
- [StateCodesUS.SouthDakota]: {
1245
- mask: makeMask(
1246
- ...numericInputs(7),
1247
- ...nonInputs(" "),
1248
- ...nonInputs(StateCodesUS.SouthDakota)
1249
- ),
1250
- transformOnType: uppercase
1251
- },
1252
- [StateCodesUS.Tennessee]: {
1253
- mask: makeMask(...numericInputs(6), ...nonInputs(" "), ...nonInputs(StateCodesUS.Tennessee)),
1254
- transformOnType: uppercase
1255
- },
1256
- [StateCodesUS.Texas]: {
1257
- mask: makeMask(...numericInputs(10), ...nonInputs(" "), ...nonInputs(StateCodesUS.Texas)),
1258
- transformOnType: uppercase
1259
- },
1260
- [StateCodesUS.Utah]: {
1261
- mask: makeMask(...numericInputs(7), ...nonInputs(" "), ...nonInputs(StateCodesUS.Utah)),
1262
- transformOnType: uppercase
1263
- },
1264
- [StateCodesUS.Vermont]: {
1265
- mask: makeMask(...numericInputs(6), ...nonInputs(" "), ...nonInputs(StateCodesUS.Vermont)),
1266
- transformOnType: uppercase
1267
- },
1268
- [StateCodesUS.Virginia]: {
1269
- mask: makeMask(...numericInputs(7), ...nonInputs(" "), ...nonInputs(StateCodesUS.Virginia)),
1270
- transformOnType: uppercase
1271
- },
1272
- [StateCodesUS.Washington]: {
1273
- mask: makeMask(...numericInputs(9), ...nonInputs(" "), ...nonInputs(StateCodesUS.Washington)),
1274
- transformOnType: uppercase
1275
- },
1276
- [StateCodesUS.WestVirginia]: {
1277
- mask: makeMask(
1278
- ...numericInputs(6),
1279
- ...nonInputs(" "),
1280
- ...nonInputs(StateCodesUS.WestVirginia)
1281
- ),
1282
- transformOnType: uppercase
1283
- },
1284
- [StateCodesUS.Wisconsin]: {
1285
- mask: makeMask(...numericInputs(6), ...nonInputs(" "), ...nonInputs(StateCodesUS.Wisconsin)),
1286
- transformOnType: uppercase
1287
- },
1288
- [StateCodesUS.Wyoming]: {
1289
- mask: makeMask(...numericInputs(6), ...nonInputs(" "), ...nonInputs(StateCodesUS.Wyoming)),
1290
- transformOnType: uppercase
1291
- },
1292
- [StateCodesUS.DistrictOfColumbia]: {
1293
- mask: makeMask(...numericInputs(9)),
1294
- transformOnType: uppercase
1295
- },
1296
- default: {
1297
- mask: makeMask(...numericInputs(9)),
1298
- transformOnType: uppercase
1299
- }
1300
- }
1301
- };
1302
- const stateFormatGuidanceText = {
1303
- [StateCodesUS.Alabama]: {
1304
- key: "enterNDigitsForExample",
1305
- values: {
1306
- numDigits: "9",
1307
- example: "123456789 AL"
1308
- }
1309
- },
1310
- [StateCodesUS.Alaska]: {
1311
- key: "enterNDigitsForExample",
1312
- values: {
1313
- numDigits: "8",
1314
- example: "12345678 AK"
1315
- }
1316
- },
1317
- [StateCodesUS.Arizona]: {
1318
- key: "enterNDigitsForExample",
1319
- values: {
1320
- numDigits: "8",
1321
- example: "12345678 AZ"
1322
- }
1323
- },
1324
- [StateCodesUS.Arkansas]: {
1325
- key: "enterTheRemainingNDigitsForExample",
1326
- values: {
1327
- numDigits: "8",
1328
- example: "800000001 AR"
1329
- }
1330
- },
1331
- [StateCodesUS.California]: {
1332
- key: "enterXOrYDigitsForExample",
1333
- values: {
1334
- xDigits: "8",
1335
- yDigits: "12",
1336
- example: "12345678 CA"
1337
- }
1338
- },
1339
- [StateCodesUS.Colorado]: {
1340
- key: "enterNDigitsForExample",
1341
- values: {
1342
- numDigits: "11",
1343
- example: "12345678901 CO"
1344
- }
1345
- },
1346
- [StateCodesUS.Connecticut]: {
1347
- key: "enterNDigitsForExample",
1348
- values: {
1349
- numDigits: "7",
1350
- example: "1234567 CT"
1351
- }
1352
- },
1353
- [StateCodesUS.Delaware]: {
1354
- key: "enterNDigitsForExample",
1355
- values: {
1356
- numDigits: "7",
1357
- example: "1234567 DE"
1358
- }
1359
- },
1360
- [StateCodesUS.Florida]: {
1361
- key: "enterXOrYDigitsForExample",
1362
- values: {
1363
- xDigits: "6",
1364
- yDigits: "12",
1365
- example: "123456789012 FL"
1366
- }
1367
- },
1368
- [StateCodesUS.Georgia]: {
1369
- key: "enterNDigitsForExample",
1370
- values: {
1371
- numDigits: "8",
1372
- example: "12345678 GA"
1373
- }
1374
- },
1375
- [StateCodesUS.Hawaii]: {
1376
- key: "validationPleaseEnterAValidBusinessRegistrationNumberWithFormat",
1377
- values: {
1378
- example: "12345678ZZ HI"
1379
- }
1380
- },
1381
- [StateCodesUS.Idaho]: {
1382
- key: "enterNDigitsForExample",
1383
- values: {
1384
- numDigits: "6",
1385
- example: "123456 ID"
1386
- }
1387
- },
1388
- [StateCodesUS.Illinois]: {
1389
- key: "enterNDigitsForExample",
1390
- values: {
1391
- numDigits: "8",
1392
- example: "12345678 IL"
1393
- }
1394
- },
1395
- [StateCodesUS.Indiana]: {
1396
- key: "enterNDigitsForExample",
1397
- values: {
1398
- numDigits: "10",
1399
- example: "1234567890 IN"
1400
- }
1401
- },
1402
- [StateCodesUS.Iowa]: {
1403
- key: "enterXToYDigitsForExample",
1404
- values: {
1405
- minDigits: "6",
1406
- maxDigits: "8",
1407
- example: "12345678 IA"
1408
- }
1409
- },
1410
- [StateCodesUS.Kansas]: {
1411
- key: "enterXToYDigitsForExample",
1412
- values: {
1413
- minDigits: "7",
1414
- maxDigits: "9",
1415
- example: "1234567890 KS"
1416
- }
1417
- },
1418
- [StateCodesUS.Kentucky]: {
1419
- key: "enterXToYDigitsForExample",
1420
- values: {
1421
- minDigits: "9",
1422
- maxDigits: "10",
1423
- example: "1234567890 KY"
1424
- }
1425
- },
1426
- [StateCodesUS.Louisiana]: {
1427
- key: "enterXToYDigitsForExample",
1428
- values: {
1429
- minDigits: "9",
1430
- maxDigits: "10",
1431
- example: "1234567890 LA"
1432
- }
1433
- },
1434
- [StateCodesUS.Maine]: {
1435
- key: "enterNDigitsForExample",
1436
- values: {
1437
- numDigits: "8",
1438
- example: "12345678 ME"
1439
- }
1440
- },
1441
- [StateCodesUS.Maryland]: {
1442
- key: "enterNDigitsForExample",
1443
- values: {
1444
- numDigits: "8",
1445
- example: "12345678 MD"
1446
- }
1447
- },
1448
- [StateCodesUS.Massachusetts]: {
1449
- key: "enterNDigitsForExample",
1450
- values: {
1451
- numDigits: "10",
1452
- example: "1234567890 MA"
1453
- }
1454
- },
1455
- [StateCodesUS.Michigan]: {
1456
- key: "enterXOrYDigitsForExample",
1457
- values: {
1458
- xDigits: "6",
1459
- yDigits: "9",
1460
- example: "123456 MI"
1461
- }
1462
- },
1463
- [StateCodesUS.Minnesota]: {
1464
- key: "enterNDigitsForExample",
1465
- values: {
1466
- numDigits: "7",
1467
- example: "1234567 MN"
1468
- }
1469
- },
1470
- [StateCodesUS.Mississippi]: {
1471
- key: "enterXToYDigitsForExample",
1472
- values: {
1473
- minDigits: "7",
1474
- maxDigits: "10",
1475
- example: "1234567 MS"
1476
- }
1477
- },
1478
- [StateCodesUS.Missouri]: {
1479
- key: "enterNDigitsForExample",
1480
- values: {
1481
- numDigits: "10",
1482
- example: "1234567890 MO"
1483
- }
1484
- },
1485
- [StateCodesUS.Montana]: {
1486
- key: "enterNDigitsForExample",
1487
- values: {
1488
- numDigits: "7",
1489
- example: "1234567 MT"
1490
- }
1491
- },
1492
- [StateCodesUS.Nebraska]: {
1493
- key: "enterXToYDigitsForExample",
1494
- values: {
1495
- minDigits: "9",
1496
- maxDigits: "11",
1497
- example: "123456789 NE"
1498
- }
1499
- },
1500
- [StateCodesUS.Nevada]: {
1501
- key: "enterXToYDigitsForExample",
1502
- values: {
1503
- minDigits: "9",
1504
- maxDigits: "11",
1505
- example: "123456789 NV"
1506
- }
1507
- },
1508
- [StateCodesUS.NewHampshire]: {
1509
- key: "enterNDigitsForExample",
1510
- values: {
1511
- numDigits: "9",
1512
- example: "123456789 NH"
1513
- }
1514
- },
1515
- [StateCodesUS.NewJersey]: {
1516
- key: "enterNDigitsForExample",
1517
- values: {
1518
- numDigits: "10",
1519
- example: "1234567890 NJ"
1520
- }
1521
- },
1522
- [StateCodesUS.NewMexico]: {
1523
- key: "enterNDigitsForExample",
1524
- values: {
1525
- numDigits: "6",
1526
- example: "123456 NM"
1527
- }
1528
- },
1529
- [StateCodesUS.NewYork]: {
1530
- key: "enterNDigitsForExample",
1531
- values: {
1532
- numDigits: "7",
1533
- example: "1234567 NY"
1534
- }
1535
- },
1536
- [StateCodesUS.NorthCarolina]: {
1537
- key: "enterNDigitsForExample",
1538
- values: {
1539
- numDigits: "7",
1540
- example: "1234567 NC"
1541
- }
1542
- },
1543
- [StateCodesUS.NorthDakota]: {
1544
- key: "enterXToYDigitsForExample",
1545
- values: {
1546
- minDigits: "7",
1547
- maxDigits: "10",
1548
- example: "1234567 ND"
1549
- }
1550
- },
1551
- [StateCodesUS.Ohio]: {
1552
- key: "enterNDigitsForExample",
1553
- values: {
1554
- numDigits: "10",
1555
- example: "1234567890 OH"
1556
- }
1557
- },
1558
- [StateCodesUS.Oklahoma]: {
1559
- key: "enterNDigitsForExample",
1560
- values: {
1561
- numDigits: "10",
1562
- example: "1234567890 OK"
1563
- }
1564
- },
1565
- [StateCodesUS.Oregon]: {
1566
- key: "enterNDigitsForExample",
1567
- values: {
1568
- numDigits: "9",
1569
- example: "123456789 OR"
1570
- }
1571
- },
1572
- [StateCodesUS.Pennsylvania]: {
1573
- key: "enterNDigitsForExample",
1574
- values: {
1575
- numDigits: "7",
1576
- example: "1234567 PA"
1577
- }
1578
- },
1579
- [StateCodesUS.RhodeIsland]: {
1580
- key: "enterNDigitsForExample",
1581
- values: {
1582
- numDigits: "7",
1583
- example: "1234567 RI"
1584
- }
1585
- },
1586
- [StateCodesUS.SouthCarolina]: {
1587
- key: "enterNDigitsForExample",
1588
- values: {
1589
- numDigits: "7",
1590
- example: "1234567 SC"
1591
- }
1592
- },
1593
- [StateCodesUS.SouthDakota]: {
1594
- key: "enterNDigitsForExample",
1595
- values: {
1596
- numDigits: "7",
1597
- example: "1234567 SD"
1598
- }
1599
- },
1600
- [StateCodesUS.Tennessee]: {
1601
- key: "enterNDigitsForExample",
1602
- values: {
1603
- numDigits: "6",
1604
- example: "123456 TN"
1605
- }
1606
- },
1607
- [StateCodesUS.Texas]: {
1608
- key: "enterNDigitsForExample",
1609
- values: {
1610
- numDigits: "10",
1611
- example: "1234567890 TX"
1612
- }
1613
- },
1614
- [StateCodesUS.Utah]: {
1615
- key: "enterNDigitsForExample",
1616
- values: {
1617
- numDigits: "7",
1618
- example: "1234567 UT"
1619
- }
1620
- },
1621
- [StateCodesUS.Vermont]: {
1622
- key: "enterNDigitsForExample",
1623
- values: {
1624
- numDigits: "6",
1625
- example: "123456 VT"
1626
- }
1627
- },
1628
- [StateCodesUS.Virginia]: {
1629
- key: "enterNDigitsForExample",
1630
- values: {
1631
- numDigits: "7",
1632
- example: "1234567 VA"
1633
- }
1634
- },
1635
- [StateCodesUS.Washington]: {
1636
- key: "enterNDigitsForExample",
1637
- values: {
1638
- numDigits: "9",
1639
- example: "123456789 WA"
1640
- }
1641
- },
1642
- [StateCodesUS.WestVirginia]: {
1643
- key: "enterNDigitsForExample",
1644
- values: {
1645
- numDigits: "6",
1646
- example: "123456 WV"
1647
- }
1648
- },
1649
- [StateCodesUS.Wisconsin]: {
1650
- key: "enterNDigitsForExample",
1651
- values: {
1652
- numDigits: "6",
1653
- example: "123456 WI"
1654
- }
1655
- },
1656
- [StateCodesUS.Wyoming]: {
1657
- key: "enterNDigitsForExample",
1658
- values: {
1659
- numDigits: "6",
1660
- example: "123456 WY"
1661
- }
1662
- },
1663
- [StateCodesUS.DistrictOfColumbia]: {
1664
- key: "enterNDigitsForExample",
1665
- values: {
1666
- numDigits: "9",
1667
- example: "123456789"
1668
- }
1669
- },
1670
- default: {
1671
- key: "enterNDigitsForExample",
1672
- values: {
1673
- numDigits: "9",
1674
- example: "123456789"
1675
- }
1676
- }
1677
- };
1678
- const businessRegistrationNumberPatterns = {
1679
- [CountryCodes.Australia]: { default: /^\d{9}$/, associationIncorporated: /^[a-zA-Z0-9]{3,20}$/ },
1680
- [CountryCodes.Austria]: {
1681
- firmenbuchnummer: /^(FN|T)\d{3,6}[a-z]$/,
1682
- ZVR: /^(AT-ZVR-)\d{9,10}$/
1683
- },
1684
- [CountryCodes.Belgium]: { default: /^\d{10}$/ },
1685
- [CountryCodes.Brazil]: { default: /^\d{14}$/ },
1686
- [CountryCodes.Bulgaria]: { default: /^\d{9}$/ },
1687
- [CountryCodes.Canada]: { default: /^[a-zA-Z0-9]{5,10}$/ },
1688
- [CountryCodes.Croatia]: { default: /^\d{9}$/, soleProprietorship: /^\d{8}$/ },
1689
- [CountryCodes.Cyprus]: { default: /^[COP]{1}\d{1,8}$/ },
1690
- [CountryCodes.CzechRepublic]: { default: /^\d{8,10}$/ },
1691
- [CountryCodes.Denmark]: { default: /^\d{8}$/ },
1692
- [CountryCodes.Estonia]: { default: /^\d{8}$/ },
1693
- [CountryCodes.Finland]: { default: /^\d{7}-?\d$/ },
1694
- [CountryCodes.France]: {
1695
- SIRET: /^\d{9}-?\d{5}$/,
1696
- RNA: /^W(\d{9}|\d[A-Za-z]\d{7})$/
1697
- },
1698
- [CountryCodes.Gibraltar]: { default: /^[a-zA-Z0-9]{1,8}$/ },
1699
- [CountryCodes.Germany]: { default: /^[A-Z]{2,3}\d{1,6}[A-Z]{0,5}(?:-[A-Z]\d{4})?$/ },
1700
- [CountryCodes.Greece]: { default: /^\d{12}$/ },
1701
- [CountryCodes.Guernsey]: { default: /^\d{1,9}$/ },
1702
- [CountryCodes.HongKong]: { default: /^\d{7}$/ },
1703
- [CountryCodes.Hungary]: { default: /^\d{10}$/, nyilvantartasiSzam: /^\d{7,10}$/ },
1704
- [CountryCodes.Iceland]: { default: /^\d{10}$/ },
1705
- [CountryCodes.India]: { default: /^\d{21}$/ },
1706
- [CountryCodes.Indonesia]: { default: /^\d{12}$/ },
1707
- [CountryCodes.Ireland]: { default: /^[1-9]\d{1,7}$/ },
1708
- [CountryCodes.IsleOfMan]: { default: /^\d{6}[A-Z]$/ },
1709
- [CountryCodes.Italy]: { partitaIVA: /^\d{11}$/, CCIAA: /^[a-zA-Z]{2}\d{6,7}$/ },
1710
- [CountryCodes.Japan]: { default: /^\d{12}$/ },
1711
- [CountryCodes.Jersey]: { default: /^[a-zA-Z0-9]{1,9}$/ },
1712
- [CountryCodes.Korea]: { default: /^\d{10}$/ },
1713
- [CountryCodes.Latvia]: { default: /^\d{11}$/ },
1714
- [CountryCodes.Liechtenstein]: { default: /FL-[0-9]{4}[.][0-9]{3}[.][0-9]{3}-[0-9]$/ },
1715
- [CountryCodes.Lithuania]: { default: /^\d{6,9}$/ },
1716
- [CountryCodes.Luxembourg]: { default: /^[a-zA-Z]\d{1,9}$/ },
1717
- [CountryCodes.Malaysia]: { default: /^\d{7}$|^\d{12}$/ },
1718
- [CountryCodes.Malta]: { default: /^[CP]\s?\d{4,6}$/ },
1719
- [CountryCodes.Mexico]: { default: /^\D{3}\d{6}\w{3}$/ },
1720
- [CountryCodes.Monaco]: {
1721
- default: /^[0-9]{2}[A-Z]{1,3}[0-9]{5}$/,
1722
- soleProprietorship: /^\d{2,4}[A-Z]\d{5}$/
1723
- },
1724
- [CountryCodes.Netherlands]: { default: /^\d{8}$/ },
1725
- [CountryCodes.NewZealand]: { NZBN: /^\d{13}$/, companyNumberNZ: /^\d{7}$/ },
1726
- [CountryCodes.Norway]: { default: /^\d{9}$/ },
1727
- [CountryCodes.Poland]: { krsNumber: /^\d{10}$/, regon: /^\d{9}$/ },
1728
- [CountryCodes.Portugal]: { default: /^\d{9}$/ },
1729
- [CountryCodes.Romania]: {
1730
- roRegNumberOldFormat: /^[A-Z]\d{1,2}\/\d{1,9}\/\d{4}$/,
1731
- roRegNumberNewFormat: /^[JFC]\d{13}$/
1732
- },
1733
- [CountryCodes.Singapore]: { default: /^[a-zA-Z0-9]{9,10}$/ },
1734
- [CountryCodes.Slovakia]: { default: /^\d{8}$/ },
1735
- [CountryCodes.Slovenia]: { default: /^\d{10}$/ },
1736
- [CountryCodes.Spain]: { default: /^[a-zA-Z][a-zA-Z0-9]{8}$/ },
1737
- [CountryCodes.Sweden]: { default: /^\d{10}$/ },
1738
- [CountryCodes.Switzerland]: { default: /^CHE\d{9}$|^CH\d{11}$/ },
1739
- [CountryCodes.UnitedKingdom]: {
1740
- default: /^[a-zA-Z0-9]{8}$/,
1741
- nonProfit: /^(?:(?:[A-Z]{2})?\d{6}|\d{6,8}|\d{6}-\d)$/
1742
- },
1743
- [CountryCodes.UnitedStates]: {
1744
- [StateCodesUS.Alabama]: /^\d{9}$/,
1745
- [StateCodesUS.Alaska]: /^\d{8}$/,
1746
- [StateCodesUS.Arizona]: /^\d{8}$/,
1747
- [StateCodesUS.Arkansas]: /^8\d{8}$/,
1748
- [StateCodesUS.California]: /^\d{7}$|^\d{12}$/,
1749
- [StateCodesUS.Colorado]: /^\d{11}$/,
1750
- [StateCodesUS.Connecticut]: /^\d{7}$/,
1751
- [StateCodesUS.Delaware]: /^\d{7}$/,
1752
- [StateCodesUS.Florida]: /^\d{6}$|^\d{12}$/,
1753
- [StateCodesUS.Georgia]: /^\d{8}$/,
1754
- [StateCodesUS.Hawaii]: /^\d{5,8}(C1|C2|C3|C4|C5|D1|D2|D3|D4|F1|F2|L1|L2|N1|N2|P1|P2|T1|T2|T3|T4|T5|T6|T7|T8|ZZ)$/,
1755
- [StateCodesUS.Idaho]: /^\d{6}$/,
1756
- [StateCodesUS.Illinois]: /^\d{8}$/,
1757
- [StateCodesUS.Indiana]: /^\d{10}$/,
1758
- [StateCodesUS.Iowa]: /^\d{6,8}$/,
1759
- [StateCodesUS.Kansas]: /^\d{7,9}$/,
1760
- [StateCodesUS.Kentucky]: /^\d{9,10}$/,
1761
- [StateCodesUS.Louisiana]: /^\d{9,10}$/,
1762
- [StateCodesUS.Maine]: /^\d{8}$/,
1763
- [StateCodesUS.Maryland]: /^\d{8}$/,
1764
- [StateCodesUS.Massachusetts]: /^\d{10}$/,
1765
- [StateCodesUS.Michigan]: /^\d{6}$|^\d{9}$/,
1766
- [StateCodesUS.Minnesota]: /^\d{7}$/,
1767
- [StateCodesUS.Mississippi]: /^\d{7,10}$/,
1768
- [StateCodesUS.Missouri]: /^\d{10}$/,
1769
- [StateCodesUS.Montana]: /^\d{7}$/,
1770
- [StateCodesUS.Nebraska]: /^\d{9,11}$/,
1771
- [StateCodesUS.Nevada]: /^\d{9,11}$/,
1772
- [StateCodesUS.NewHampshire]: /^\d{9}$/,
1773
- [StateCodesUS.NewJersey]: /^\d{10}$/,
1774
- [StateCodesUS.NewMexico]: /^\d{6}$/,
1775
- [StateCodesUS.NewYork]: /^\d{7}$/,
1776
- [StateCodesUS.NorthCarolina]: /^\d{7}$/,
1777
- [StateCodesUS.NorthDakota]: /^\d{7,10}$/,
1778
- [StateCodesUS.Ohio]: /^\d{10}$/,
1779
- [StateCodesUS.Oklahoma]: /^\d{10}$/,
1780
- [StateCodesUS.Oregon]: /^\d{9}$/,
1781
- [StateCodesUS.Pennsylvania]: /^\d{7}$/,
1782
- [StateCodesUS.RhodeIsland]: /^\d{7}$/,
1783
- [StateCodesUS.SouthCarolina]: /^\d{7}$/,
1784
- [StateCodesUS.SouthDakota]: /^\d{7}$/,
1785
- [StateCodesUS.Tennessee]: /^\d{6}$/,
1786
- [StateCodesUS.Texas]: /^\d{10}$/,
1787
- [StateCodesUS.Utah]: /^\d{7}$/,
1788
- [StateCodesUS.Vermont]: /^\d{6}$/,
1789
- [StateCodesUS.Virginia]: /^\d{7}$/,
1790
- [StateCodesUS.Washington]: /^\d{9}$/,
1791
- [StateCodesUS.WestVirginia]: /^\d{6}$/,
1792
- [StateCodesUS.Wisconsin]: /^\d{6}$/,
1793
- [StateCodesUS.Wyoming]: /^\d{6}$/,
1794
- [StateCodesUS.DistrictOfColumbia]: /^\d{9}$/,
1795
- default: /^\d{9}$/
1796
- }
1797
- };
1798
- const taxInformationDefaultFieldMetadata = {
1799
- label: "taxId"
1800
- };
1801
- const exemptedFromTaxDefaultFieldMetadata = {
1802
- label: "iDontHaveATaxId"
1803
- };
1804
- const mapValidators = (validators, country) => {
1805
- return validators.map(
1806
- (validator) => ({
1807
- ...validator,
1808
- validate: (taxInformation) => {
1809
- const taxInfo = taxInformation?.find((taxId) => country === taxId.country);
1810
- if (taxInfo?.numberAbsent) return true;
1811
- return taxInfo?.number ? validator.validate(taxInfo.number) : false;
1812
- }
1813
- })
1814
- );
1815
- };
1816
- const taxInformationDefaultFieldConfig = {
1817
- [CountryCodes.Australia]: {
1818
- label: "australianBusinessNumberAbn",
1819
- validators: mapValidators([validatePatternOnBlur(/^\d{11}$/)], CountryCodes.Australia),
1820
- mask: {
1821
- mask: makeMask(
1822
- ...numericInputs(2),
1823
- spacer,
1824
- ...numericInputs(3),
1825
- spacer,
1826
- ...numericInputs(3),
1827
- spacer,
1828
- ...numericInputs(3)
1829
- )
1830
- },
1831
- guidanceText: {
1832
- key: "enterNDigitsForExample",
1833
- values: {
1834
- numDigits: "11",
1835
- example: "51 824 753 556"
1836
- }
1837
- }
1838
- },
1839
- [CountryCodes.Belgium]: ({ companyType }) => {
1840
- switch (companyType) {
1841
- case LegalEntityTypes.INDIVIDUAL:
1842
- return {
1843
- label: "taxInformationNumber__BE_Individual",
1844
- placeholder: "taxInformationNumber__placeHolder__BE_Individual",
1845
- validators: mapValidators([validatePatternOnBlur(/^\d{11}$/)], CountryCodes.Belgium),
1846
- mask: { mask: makeMask(...numericInputs(11)) },
1847
- guidanceText: {
1848
- key: "validationPleaseEnterAValidIdNumberWithExample",
1849
- values: {
1850
- example: "99999999999",
1851
- idType: "Numeró National"
1852
- }
1853
- }
1854
- };
1855
- default:
1856
- return {
1857
- label: "taxInformationNumber__BE",
1858
- placeholder: "taxInformationNumber__placeHolder__BE",
1859
- validators: mapValidators([validatePatternOnBlur(/^\d{10}$/)], CountryCodes.Belgium),
1860
- mask: { mask: makeMask(...numericInputs(10)) },
1861
- guidanceText: {
1862
- key: "validationPleaseEnterAValidIdNumberWithExample",
1863
- values: {
1864
- example: "0123321123",
1865
- idType: "Business nummer"
1866
- }
1867
- }
1868
- };
1869
- }
1870
- },
1871
- [CountryCodes.Canada]: {
1872
- label: "businessNumber",
1873
- validators: mapValidators([validatePatternOnBlur(/^\d{9}$/)], CountryCodes.Canada),
1874
- mask: { mask: makeMask(...numericInputs(9)) },
1875
- guidanceText: {
1876
- key: "enterNDigitsForExample",
1877
- values: {
1878
- numDigits: "9",
1879
- example: "123456789"
1880
- }
1881
- }
1882
- },
1883
- [CountryCodes.France]: {
1884
- label: "taxInformationNumber__FR",
1885
- placeholder: "taxInformationNumber__placeHolder__FR",
1886
- validators: mapValidators([validatePatternOnBlur(/^\s*(\d\s*){13}$/)], CountryCodes.France),
1887
- mask: {
1888
- mask: makeMask(
1889
- ...numericInputs(2),
1890
- spacer,
1891
- ...numericInputs(2),
1892
- spacer,
1893
- ...numericInputs(3),
1894
- spacer,
1895
- ...numericInputs(3),
1896
- spacer,
1897
- ...numericInputs(3)
1898
- )
1899
- },
1900
- guidanceText: {
1901
- key: "validationPleaseEnterAValidIdNumberWithExample",
1902
- values: {
1903
- example: "30 23 217 600 053",
1904
- idType: "Numéro SPI"
1905
- }
1906
- }
1907
- },
1908
- [CountryCodes.Germany]: ({ companyType }) => {
1909
- switch (companyType) {
1910
- case LegalEntityTypes.INDIVIDUAL:
1911
- return {
1912
- label: "taxInformationNumber__DE_Individual",
1913
- placeholder: "taxInformationNumber__placeHolder__DE_Individual",
1914
- validators: mapValidators([validatePatternOnBlur(/^\d{11}$/)], CountryCodes.Germany),
1915
- mask: { mask: makeMask(...numericInputs(11)) },
1916
- guidanceText: {
1917
- key: "validationPleaseEnterAValidIdNumberWithExample",
1918
- values: {
1919
- example: "26954371827",
1920
- idType: "IdNr"
1921
- }
1922
- }
1923
- };
1924
- default:
1925
- return {
1926
- label: "taxInformationNumber__DE",
1927
- placeholder: "taxInformationNumber__placeHolder__DE",
1928
- validators: mapValidators([validatePatternOnBlur(/^\d{10,11}$/)], CountryCodes.Germany),
1929
- mask: { mask: makeMask(...numericInputs(11)) },
1930
- guidanceText: {
1931
- key: "validationPleaseEnterAValidIdNumberWithExample",
1932
- values: {
1933
- example: "14310260208",
1934
- idType: "Steuernummer"
1935
- }
1936
- }
1937
- };
1938
- }
1939
- },
1940
- [CountryCodes.Gibraltar]: {
1941
- label: "taxpayerReferenceNumber",
1942
- validators: mapValidators([validatePatternOnBlur(/^\d{1,7}$/)], CountryCodes.Gibraltar),
1943
- mask: {
1944
- mask: makeMask(...numericInputs(1), ...numericInputs(6, true))
1945
- },
1946
- guidanceText: {
1947
- key: "enterAMaximumOfNDigitsForExample",
1948
- values: {
1949
- maxDigits: "7",
1950
- example: "123456"
1951
- }
1952
- }
1953
- },
1954
- [CountryCodes.Guernsey]: ({ companyType }) => {
1955
- switch (companyType) {
1956
- case CompanyTypesValues.SOLE_PROPRIETORSHIP:
1957
- return {
1958
- label: "nationalInsuranceNumber",
1959
- validators: mapValidators(
1960
- [validatePatternOnBlur(/^GY\d{6}[A-D]$/)],
1961
- CountryCodes.Guernsey
1962
- ),
1963
- mask: {
1964
- mask: makeMask(
1965
- ...nonInputs("GY", { includeInValue: true }),
1966
- spacer,
1967
- ...numericInputs(2),
1968
- spacer,
1969
- ...numericInputs(2),
1970
- spacer,
1971
- ...numericInputs(2),
1972
- spacer,
1973
- {
1974
- type: "input",
1975
- allow: /[A-D]/
1976
- }
1977
- ),
1978
- transformOnType: uppercase
1979
- },
1980
- guidanceText: {
1981
- key: "enterTheRemainingNCharactersForExample",
1982
- values: {
1983
- numChars: "7",
1984
- example: "GY 12 34 56 A"
1985
- }
1986
- }
1987
- };
1988
- default:
1989
- return {
1990
- label: "taxInformationNumber",
1991
- mask: businessRegistrationNumberMasks[CountryCodes.Guernsey].default,
1992
- validators: mapValidators(
1993
- [
1994
- validatePatternOnBlur(
1995
- businessRegistrationNumberPatterns[CountryCodes.Guernsey].default
1996
- )
1997
- ],
1998
- CountryCodes.Guernsey
1999
- ),
2000
- guidanceText: {
2001
- key: "enterAMaximumOfNDigitsForExample",
2002
- values: {
2003
- maxDigits: "9",
2004
- example: "123456"
2005
- }
2006
- }
2007
- };
2008
- }
2009
- },
2010
- [CountryCodes.HongKong]: {
2011
- label: "taxInformationNumber__HK",
2012
- validators: mapValidators([validatePatternOnBlur(/^\d{8}$/)], CountryCodes.HongKong),
2013
- mask: { mask: makeMask(...numericInputs(8)) },
2014
- guidanceText: {
2015
- key: "enterNDigitsForExample",
2016
- values: {
2017
- numDigits: "8",
2018
- example: "70569713"
2019
- }
2020
- }
2021
- },
2022
- [CountryCodes.Jersey]: ({ taxIdNumberType, companyType }) => {
2023
- switch (taxIdNumberType) {
2024
- case "SSN":
2025
- return {
2026
- label: "socialSecurityNumber",
2027
- validators: mapValidators(
2028
- [validatePatternOnBlur(/^[A-Z]{2}\d{6}[A-Z]$/)],
2029
- CountryCodes.Jersey
2030
- ),
2031
- mask: {
2032
- mask: makeMask(...alphaInputs(2), ...numericInputs(6), ...alphaInputs(1)),
2033
- transformOnType: uppercase
2034
- },
2035
- guidanceText: {
2036
- key: "enterNCharactersForExample",
2037
- values: {
2038
- numChars: "9",
2039
- example: "JY000000A"
2040
- }
2041
- }
2042
- };
2043
- case "TIN_JE":
2044
- default:
2045
- switch (companyType) {
2046
- case CompanyTypesValues.SOLE_PROPRIETORSHIP:
2047
- return {
2048
- label: "taxIdentificationNumber",
2049
- validators: mapValidators([validatePatternOnBlur(/^\d{10}$/)], CountryCodes.Jersey),
2050
- mask: {
2051
- mask: makeMask(
2052
- ...numericInputs(3),
2053
- ...nonInputs(" - "),
2054
- ...numericInputs(3),
2055
- ...nonInputs(" - "),
2056
- ...numericInputs(4)
2057
- )
2058
- },
2059
- guidanceText: {
2060
- key: "enterNDigitsForExample",
2061
- values: {
2062
- numDigits: "10",
2063
- example: "100-100-1000"
2064
- }
2065
- }
2066
- };
2067
- default:
2068
- return {
2069
- label: "taxIdentificationNumber",
2070
- validators: mapValidators(
2071
- [validatePatternOnBlur(/^[A-Z]{2}\d{5}$/)],
2072
- CountryCodes.Jersey
2073
- ),
2074
- mask: {
2075
- mask: makeMask(...alphaInputs(2), ...numericInputs(5)),
2076
- transformOnType: uppercase
2077
- },
2078
- guidanceText: {
2079
- key: "enterNCharactersForExample",
2080
- values: {
2081
- numChars: "7",
2082
- example: "CC17261"
2083
- }
2084
- }
2085
- };
2086
- }
2087
- }
2088
- },
2089
- [CountryCodes.Ireland]: {
2090
- label: "trnNumber",
2091
- validators: mapValidators(
2092
- [validatePatternOnBlur(/^(\d{7})([a-zA-Z])([a-zA-Z]?)$/)],
2093
- CountryCodes.Ireland
2094
- ),
2095
- mask: {
2096
- mask: makeMask(...numericInputs(7), ...alphaInputs(1), ...alphaInputs(1, true))
2097
- },
2098
- guidanceText: {
2099
- key: "enterXDigitsThenXToYLettersForExample",
2100
- values: {
2101
- numDigits: "7",
2102
- minLetters: "1",
2103
- maxLetters: "2",
2104
- example: "1497955KA"
2105
- }
2106
- }
2107
- },
2108
- [CountryCodes.IsleOfMan]: {
2109
- label: "taxReferenceNumber",
2110
- validators: mapValidators([validatePatternOnBlur(/^[HCX]\d{8}$/)], CountryCodes.IsleOfMan),
2111
- mask: {
2112
- mask: makeMask(
2113
- {
2114
- type: "input",
2115
- allow: /[HCX]/
2116
- },
2117
- ...numericInputs(6),
2118
- ...nonInputs(" - "),
2119
- ...numericInputs(2)
2120
- ),
2121
- transformOnType: uppercase
2122
- },
2123
- guidanceText: {
2124
- key: "enterNCharactersForExample",
2125
- values: {
2126
- numChars: "9",
2127
- example: "C155673-79"
2128
- }
2129
- }
2130
- },
2131
- [CountryCodes.Netherlands]: ({ companyType }) => {
2132
- switch (companyType) {
2133
- case LegalEntityTypes.INDIVIDUAL:
2134
- return {
2135
- label: "bsnNumber",
2136
- placeholder: "taxInformationNumber__placeHolder__NL",
2137
- validators: mapValidators([validatePatternOnBlur(/^\d{9}$/)], CountryCodes.Netherlands),
2138
- mask: { mask: makeMask(...numericInputs(9)) },
2139
- guidanceText: {
2140
- key: "validationPleaseEnterAValidIdNumberWithExample",
2141
- values: {
2142
- example: "999999999",
2143
- idType: "BSN"
2144
- }
2145
- }
2146
- };
2147
- default:
2148
- return {
2149
- label: "rsinNumber",
2150
- placeholder: "taxInformationNumber__placeHolder__NL",
2151
- validators: mapValidators([validatePatternOnBlur(/^\d{9}$/)], CountryCodes.Netherlands),
2152
- mask: { mask: makeMask(...numericInputs(9)) },
2153
- guidanceText: {
2154
- key: "validationPleaseEnterAValidIdNumberWithExample",
2155
- values: {
2156
- example: "811786523",
2157
- idType: "RSIN"
2158
- }
2159
- }
2160
- };
2161
- }
2162
- },
2163
- [CountryCodes.NewZealand]: {
2164
- label: "irdNumber",
2165
- validators: mapValidators([validatePatternOnBlur(/^\d{8,9}$/)], CountryCodes.NewZealand),
2166
- mask: {
2167
- mask: makeMask(...numericInputs(8), ...numericInputs(1, true))
2168
- },
2169
- guidanceText: {
2170
- key: "enterXToYDigitsForExample",
2171
- values: {
2172
- minDigits: "8",
2173
- maxDigits: "9",
2174
- example: "12345678"
2175
- }
2176
- }
2177
- },
2178
- // Special case for SG in which we also save the registration number as the TaxID if that selection has been made
2179
- [CountryCodes.Singapore]: {
2180
- label: "gst",
2181
- validators: mapValidators([validatePatternOnBlur(/^[A-Z0-9]{9,10}$/)], CountryCodes.Singapore),
2182
- mask: {
2183
- mask: makeMask(
2184
- ...alphanumericInputs(2),
2185
- ...nonInputs(" - "),
2186
- ...alphanumericInputs(7),
2187
- ...nonInputs(" - "),
2188
- ...alphanumericInputs(1)
2189
- ),
2190
- transformOnType: uppercase
2191
- },
2192
- guidanceText: {
2193
- key: "enterNCharactersForExample",
2194
- values: {
2195
- numChars: "10",
2196
- example: "M212345678"
2197
- }
2198
- }
2199
- },
2200
- [CountryCodes.PuertoRico]: {
2201
- // should exactly match CountryCodes.UnitedStates
2202
- label: "taxInformationNumber__US",
2203
- helperText: "taxInformationNumber__helperText__US",
2204
- placeholder: "taxInformationNumber__placeHolder__US",
2205
- validators: mapValidators([validatePatternOnBlur(/^\d{9}$/)], CountryCodes.PuertoRico),
2206
- mask: {
2207
- mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
2208
- },
2209
- guidanceText: {
2210
- key: "validationPleaseEnterAValidEINWithFormat",
2211
- values: {
2212
- format: "XX-XXXXXXX",
2213
- example: "98-7654321"
2214
- }
2215
- }
2216
- },
2217
- [CountryCodes.UnitedKingdom]: ({ taxIdNumberType, companyType }) => {
2218
- switch (companyType) {
2219
- case LegalEntityTypes.INDIVIDUAL:
2220
- switch (taxIdNumberType) {
2221
- case "NINO":
2222
- return {
2223
- label: "nationalInsuranceNumber",
2224
- placeholder: "taxInformationNumber__placeHolder__GB",
2225
- validators: mapValidators(
2226
- [validatePatternOnBlur(/^[A-Z]{2}\d{6}[A-D]$/)],
2227
- CountryCodes.UnitedKingdom
2228
- ),
2229
- guidanceText: {
2230
- key: "validationPleaseEnterAValidIdNumberWithExample",
2231
- values: {
2232
- example: "AA123456C",
2233
- idType: "NINO"
2234
- }
2235
- }
2236
- };
2237
- default:
2238
- return {
2239
- label: "utr",
2240
- placeholder: "taxInformationNumber__placeHolder__GB",
2241
- validators: mapValidators(
2242
- [validatePatternOnBlur(/^\d{10}$/)],
2243
- CountryCodes.UnitedKingdom
2244
- ),
2245
- mask: { mask: makeMask(...numericInputs(10)) },
2246
- guidanceText: {
2247
- key: "validationPleaseEnterAValidIdNumberWithExample",
2248
- values: {
2249
- example: "6669863459",
2250
- idType: "UTR"
2251
- }
2252
- }
2253
- };
2254
- }
2255
- default:
2256
- return {
2257
- label: "utr",
2258
- placeholder: "taxInformationNumber__placeHolder__GB",
2259
- validators: mapValidators(
2260
- [validatePatternOnBlur(/^\d{10}$/)],
2261
- CountryCodes.UnitedKingdom
2262
- ),
2263
- mask: { mask: makeMask(...numericInputs(10)) },
2264
- guidanceText: {
2265
- key: "validationPleaseEnterAValidIdNumberWithExample",
2266
- values: {
2267
- example: "6669863459",
2268
- idType: "UTR"
2269
- }
2270
- }
2271
- };
2272
- }
2273
- },
2274
- [CountryCodes.UnitedStates]: {
2275
- label: "taxInformationNumber__US",
2276
- helperText: "taxInformationNumber__helperText__US",
2277
- placeholder: "taxInformationNumber__placeHolder__US",
2278
- validators: mapValidators(
2279
- [validateNotEmptyOnBlur, validatePatternOnBlur(/^\d{9}$/)],
2280
- CountryCodes.UnitedStates
2281
- ),
2282
- mask: {
2283
- mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
2284
- },
2285
- guidanceText: {
2286
- key: "validationPleaseEnterAValidEINWithFormat",
2287
- values: {
2288
- format: "XX-XXXXXXX",
2289
- example: "98-7654321"
2290
- }
2291
- }
2292
- },
2293
- /**
2294
- * NOT YET SUPPORTED
2295
- * These are brought over from the old pattern files. We have no idea if they are accurate or not.
2296
- * See https://en.wikipedia.org/wiki/VAT_identification_number
2297
- */
2298
- [CountryCodes.India]: {
2299
- validators: mapValidators([validatePatternOnBlur(/^[A-Z0-9]{15}$/)], CountryCodes.India)
2300
- },
2301
- [CountryCodes.Japan]: {
2302
- label: "taxInformationNumber__JP",
2303
- validators: mapValidators([validatePatternOnBlur(/^\d{13}$/)], CountryCodes.Japan)
2304
- },
2305
- [CountryCodes.Philippines]: {
2306
- validators: mapValidators([validatePatternOnBlur(/^\d{12}$/)], CountryCodes.Philippines)
2307
- }
2308
- };
2309
- const exemptedFromTaxDefaultFieldConfig = {
2310
- [CountryCodes.Australia]: {
2311
- label: "doNotHaveAbn"
2312
- }
2313
- };
2314
- const countryToTaxInfoTypeMap = {
2315
- US: "EIN",
2316
- AU: "ABN",
2317
- NZ: "IRD",
2318
- HK: "BRN",
2319
- SG: "GST"
2320
- };
2321
- const isFinancialInformationRequired = (isFinancialInformationExperimentEnabled, taskType, country, capabilities, legalEntityType) => {
2322
- const isOrganization = legalEntityType === LegalEntityTypes.ORGANIZATION;
2323
- if (!isFinancialInformationExperimentEnabled || !COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
2324
- return void 0;
2325
- }
2326
- if (country === CountryCodes.UnitedKingdom && (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY || taskType === TaskTypes.BUSINESS_DETAILS)) {
2327
- return "REQUIRED";
2328
- }
2329
- if (taskType === TaskTypes.BUSINESS_DETAILS && isOrganization) {
2330
- if (keysOf(capabilities ?? {}).some((capability) => capability === "issueBankAccount")) {
2331
- return "REQUIRED";
2332
- }
2333
- }
2334
- return void 0;
2335
- };
2336
- function requestingIssuing(rootLegalEntity) {
2337
- const capabilities = rootLegalEntity?.capabilities ?? {};
2338
- return "issueCard" in capabilities && capabilities.issueCard?.requested === true || "useCard" in capabilities && capabilities.useCard?.requested === true;
2339
- }
2340
- function requestingBanking(rootLegalEntity) {
2341
- const capabilities = rootLegalEntity?.capabilities ?? {};
2342
- return "issueBankAccount" in capabilities && capabilities.issueBankAccount?.requested === true || "sendToThirdParty" in capabilities && capabilities.sendToThirdParty?.requested === true || "receiveFromThirdParty" in capabilities && capabilities.receiveFromThirdParty?.requested === true;
2343
- }
2344
- const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
2345
- CountryCodes.Australia,
2346
- CountryCodes.Gibraltar,
2347
- CountryCodes.Guernsey,
2348
- CountryCodes.HongKong,
2349
- CountryCodes.Ireland,
2350
- CountryCodes.IsleOfMan,
2351
- CountryCodes.Jersey,
2352
- CountryCodes.Malta,
2353
- CountryCodes.PuertoRico,
2354
- CountryCodes.Spain,
2355
- CountryCodes.UnitedKingdom,
2356
- CountryCodes.UnitedStates
2357
- ];
2358
- const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
2359
- CountryCodes.HongKong,
2360
- CountryCodes.PuertoRico,
2361
- CountryCodes.UnitedStates
2362
- ];
2363
- const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS = [];
2364
- const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
2365
- CountryCodes.Austria,
2366
- CountryCodes.Canada,
2367
- CountryCodes.Finland,
2368
- CountryCodes.Germany,
2369
- CountryCodes.Lithuania,
2370
- CountryCodes.Luxembourg,
2371
- CountryCodes.NewZealand,
2372
- CountryCodes.Poland,
2373
- CountryCodes.Sweden,
2374
- CountryCodes.Switzerland
2375
- ];
2376
- const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [
2377
- CountryCodes.Canada,
2378
- CountryCodes.UnitedStates
2379
- ];
2380
- const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [
2381
- CountryCodes.Germany
2382
- ];
2383
- const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
2384
- CountryCodes.Australia,
2385
- CountryCodes.Canada,
2386
- CountryCodes.Gibraltar,
2387
- CountryCodes.HongKong,
2388
- CountryCodes.NewZealand,
2389
- CountryCodes.PuertoRico,
2390
- CountryCodes.Singapore,
2391
- CountryCodes.UnitedStates,
2392
- CountryCodes.Guernsey,
2393
- CountryCodes.Jersey,
2394
- CountryCodes.IsleOfMan,
2395
- CountryCodes.Mexico,
2396
- CountryCodes.Brazil,
2397
- CountryCodes.Japan
2398
- ];
2399
- const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [
2400
- CountryCodes.Singapore
2401
- ];
2402
- const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
2403
- // strictly a subset of countries which use tax ID
2404
- // right now in all countries companies must provide a tax ID - but maybe there will be exemptions in future?
2405
- ];
2406
- const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
2407
- // strictly a subset of countries which use tax ID
2408
- CountryCodes.Canada,
2409
- CountryCodes.PuertoRico,
2410
- CountryCodes.UnitedStates
2411
- ];
2412
- const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [
2413
- CountryCodes.HongKong,
2414
- CountryCodes.Singapore
2415
- ];
2416
- const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
2417
- const COUNTRIES_USING_COMPANY_SEARCH = [
2418
- CountryCodes.UnitedStates
2419
- ];
2420
- const COUNTRY_OF_GOVERNING_LAW_POSSIBLE = [
2421
- CountryCodes.UnitedKingdom
2422
- ];
2423
- const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
2424
- CountryCodes.UnitedKingdom,
2425
- CountryCodes.Netherlands,
2426
- CountryCodes.France,
2427
- CountryCodes.Germany,
2428
- CountryCodes.Spain,
2429
- CountryCodes.Belgium
2430
- ];
2431
- const COUNTRIES_REQUIRING_E_INVOICING_CODE = [
2432
- /**
2433
- * @description These are the countries for which E-Invoicing code is a compliance requirement. There will be more in the future.
2434
- */
2435
- CountryCodes.Italy
2436
- ];
2437
- const COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [
2438
- CountryCodes.Australia
2439
- ];
2440
- const TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
2441
- CountryCodes.UnitedKingdom,
2442
- CountryCodes.Netherlands,
2443
- CountryCodes.Germany,
2444
- CountryCodes.Belgium
2445
- ];
2446
- const isRegistrationNumberAbsentStateV4Scenario = (country, entityType) => {
2447
- return country === CountryCodes.Australia && (entityType === CompanyTypesValues.GOVERNMENTAL_ORGANIZATION || entityType === CompanyTypesValues.INCORPORATED_PARTNERSHIP) || country === CountryCodes.NewZealand;
2448
- };
2449
- const rules = ({
2450
- data,
2451
- country,
2452
- taskType,
2453
- isExperimentEnabled = () => false,
2454
- isSettingEnabled = () => false,
2455
- accountHolder,
2456
- rootLegalEntity,
2457
- tinMatched
2458
- }) => {
2459
- const countryRequiresDateOfIncorporationForCompanies = () => {
2460
- if (COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION.includes(country)) {
2461
- return "REQUIRED";
2462
- }
2463
- };
2464
- const countryRequiresFinancialInformation = () => {
2465
- if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
2466
- const isFinancialInformationExperimentEnabled = isExperimentEnabled(
2467
- "EnableFinancialInformationComponentV4"
2468
- );
2469
- const leType = rootLegalEntity?.type;
2470
- return isFinancialInformationRequired(
2471
- isFinancialInformationExperimentEnabled,
2472
- taskType,
2473
- country,
2474
- rootLegalEntity?.capabilities,
2475
- leType
2476
- );
2477
- }
2478
- };
2479
- return createFormRules({
2480
- requireDoingBusinessAsName: () => {
2481
- if (isExperimentEnabled("EnableBusinessDetailsMultiForm")) {
2482
- return data.additionalInformation?.hasDoingBusinessAs ? "REQUIRED" : void 0;
2483
- }
2484
- },
2485
- countryRequiresStateOrProvince: () => {
2486
- if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
2487
- return "REQUIRED";
2488
- }
2489
- },
2490
- ifPubliclyTradedCompany: () => {
2491
- if (data.companyStructure?.entityType === CompanyTypesValues.PUBLIC_COMPANY) {
2492
- return "REQUIRED";
2493
- }
2494
- },
2495
- countryUsesVat: () => {
2496
- if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
2497
- return Boolean(data.additionalInformation?.exemptedFromVat) === true ? "OPTIONAL" : "REQUIRED";
2498
- }
2499
- },
2500
- vatNumberType: () => {
2501
- if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
2502
- return "OPTIONAL";
2503
- }
2504
- },
2505
- isVatExempt: () => {
2506
- if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
2507
- return Boolean(data.additionalInformation?.exemptedFromVat) === true ? "REQUIRED" : "OPTIONAL";
2508
- }
2509
- },
2510
- countryUsesTaxId: () => {
2511
- const isExemptFromTax = Boolean(
2512
- data.basicInformation?.exemptedFromTax ?? data.additionalInformation?.exemptedFromTax
2513
- );
2514
- if (isExperimentEnabled("EnableTaxIdRequiredForBusinessAccountsScenarios") && TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION.includes(country) && rootLegalEntity?.type === "organization" && // SOE-5931 - TODO: investigate L scenario returned to show this on the backend
2515
- keysOf(rootLegalEntity?.capabilities ?? {}).includes("issueBankAccount")) {
2516
- return isExemptFromTax ? "OPTIONAL" : "REQUIRED";
2517
- }
2518
- if (COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country) && !(taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP.includes(country))) {
2519
- return isExemptFromTax ? "OPTIONAL" : "REQUIRED";
2520
- }
2521
- },
2522
- companyRegistrationNumberExemptionAllowed: () => {
2523
- const isExemptFromRegistrationNumber = Boolean(
2524
- data.basicInformation?.exemptedFromRegistrationNumber ?? data.additionalInformation?.exemptedFromRegistrationNumber
2525
- );
2526
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(country, data.companyStructure?.entityType)) {
2527
- return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
2528
- }
2529
- switch (taskType) {
2530
- case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
2531
- if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS.includes(country))
2532
- return;
2533
- return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
2534
- }
2535
- default: {
2536
- switch (country) {
2537
- case CountryCodes.Germany: {
2538
- if (data.companyStructure?.entityType === CompanyTypesValues.GOVERNMENTAL_ORGANIZATION || data.companyStructure?.entityType === CompanyTypesValues.NON_PROFIT_OR_CHARITABLE) {
2539
- return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
2540
- }
2541
- return;
2542
- }
2543
- case CountryCodes.Denmark: {
2544
- if (data.companyStructure?.entityType === CompanyTypesValues.NON_PROFIT_OR_CHARITABLE) {
2545
- return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
2546
- }
2547
- return;
2548
- }
2549
- default: {
2550
- if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS.includes(country))
2551
- return;
2552
- return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
2553
- }
2554
- }
2555
- }
2556
- }
2557
- },
2558
- countryOfGoverningLawRequired: () => {
2559
- if (isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies") && COUNTRY_OF_GOVERNING_LAW_POSSIBLE.includes(data.basicInformation?.country)) {
2560
- return "REQUIRED";
2561
- }
2562
- },
2563
- countryRequiresRegistrationNumber: () => {
2564
- const isExemptFromRegistrationNumber = Boolean(
2565
- data.basicInformation?.exemptedFromRegistrationNumber ?? data.additionalInformation?.exemptedFromRegistrationNumber
2566
- );
2567
- switch (taskType) {
2568
- case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
2569
- if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
2570
- if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS.includes(country)) {
2571
- return "OPTIONAL";
2572
- }
2573
- return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
2574
- }
2575
- default: {
2576
- if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
2577
- return "OPTIONAL";
2578
- }
2579
- if (!COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) {
2580
- return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
2581
- }
2582
- }
2583
- }
2584
- },
2585
- registrationNumberType: () => {
2586
- switch (taskType) {
2587
- case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
2588
- if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
2589
- return "OPTIONAL";
2590
- }
2591
- default: {
2592
- if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
2593
- return "OPTIONAL";
2594
- }
2595
- if (COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) return;
2596
- return "OPTIONAL";
2597
- }
2598
- }
2599
- },
2600
- countryUsesUenOrGst: () => {
2601
- if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY) {
2602
- return;
2603
- }
2604
- if (COUNTRIES_THAT_USES_UEN_OR_GST.includes(country)) {
2605
- return "REQUIRED";
2606
- }
2607
- },
2608
- countryHasTaxExemptions: () => {
2609
- const isExemptFromTax = Boolean(
2610
- data.basicInformation?.exemptedFromTax ?? data.additionalInformation?.exemptedFromTax
2611
- );
2612
- switch (taskType) {
2613
- case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
2614
- if (!COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS.includes(country)) return;
2615
- return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
2616
- }
2617
- default: {
2618
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust") {
2619
- return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
2620
- }
2621
- if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES.includes(country)) {
2622
- return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
2623
- }
2624
- }
2625
- }
2626
- },
2627
- // TODO: This should be renamed due to the additional conditionals
2628
- countryUsingCompanySearch: () => {
2629
- if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY || taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY) {
2630
- return;
2631
- }
2632
- if (COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
2633
- return "REQUIRED";
2634
- }
2635
- },
2636
- countryRequiresFinancialInformation,
2637
- isDateOfIncorporationRequired: () => {
2638
- if (isExperimentEnabled("EnableIncorporationDateBasedFinancialValidationForHO")) {
2639
- return countryRequiresDateOfIncorporationForCompanies() || countryRequiresFinancialInformation();
2640
- }
2641
- return countryRequiresDateOfIncorporationForCompanies();
2642
- },
2643
- isFinancialReportingFieldsRequired: () => {
2644
- if (isExperimentEnabled("EnableIncorporationDateBasedFinancialValidationForHO")) {
2645
- return countryRequiresFinancialInformation() === "REQUIRED" && isDateOlderThanAYear(data.additionalInformation?.dateOfIncorporation) ? "REQUIRED" : void 0;
2646
- }
2647
- return countryRequiresFinancialInformation();
2648
- },
2649
- isIndustryCodeRequired: () => {
2650
- const needsBusinessLine = requestingIssuing(rootLegalEntity) || requestingBanking(rootLegalEntity);
2651
- if (isSettingEnabled(SettingNames.AllowBusinessLines) && needsBusinessLine) {
2652
- return "REQUIRED";
2653
- }
2654
- },
2655
- annualTurnoverRequired: () => {
2656
- if (isExperimentEnabled("EnableBusinessDetailsMultiForm") && data.companyFinancialInformation?.reportedValueOption === "annualTurnover") {
2657
- return "REQUIRED";
2658
- }
2659
- },
2660
- netAssetsRequired: () => {
2661
- if (isExperimentEnabled("EnableBusinessDetailsMultiForm") && data.companyFinancialInformation?.reportedValueOption === "netAssets") {
2662
- return "REQUIRED";
2663
- }
2664
- },
2665
- balanceSheetTotalRequired: () => {
2666
- if (isExperimentEnabled("EnableBusinessDetailsMultiForm") && data.companyFinancialInformation?.reportedValueOption === "balanceSheetTotal") {
2667
- return "REQUIRED";
2668
- }
2669
- },
2670
- isEInvoicingCodeEnabled: () => {
2671
- if (isExperimentEnabled("EnableEInvoicingCodeField") && COUNTRIES_REQUIRING_E_INVOICING_CODE.includes(country)) {
2672
- return "REQUIRED";
2673
- }
2674
- },
2675
- ifCountryUsAndTinFailed: () => {
2676
- if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY) {
2677
- return;
2678
- }
2679
- if (tinMatched === false && country === CountryCodes.UnitedStates) {
2680
- return "REQUIRED";
2681
- }
2682
- },
2683
- businessRequiresCompanyType: () => {
2684
- if (taskType !== TaskTypes.SOLE_PROPRIETOR_COMPANY) {
2685
- return "REQUIRED";
2686
- }
2687
- },
2688
- japaneseLegalCompanyName: () => {
2689
- if (country === CountryCodes.Japan) {
2690
- return "REQUIRED";
2691
- }
2692
- },
2693
- requireBusinessSelection: () => {
2694
- if (taskType !== TaskTypes.SOLE_PROPRIETOR_COMPANY && taskType !== TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && taskType !== TaskTypes.TRUST_MEMBER_COMPANY && COUNTRIES_USING_COMPANY_SEARCH.includes(country) && isExperimentEnabled("EnableBusinessDetailsMultiForm")) {
2695
- return "REQUIRED";
2696
- }
2697
- }
2698
- });
2699
- };
2700
- const inferTaxIdNumberType = (taxInformation, country, companyType) => {
2701
- if (!taxInformation) return void 0;
2702
- const optionsForCountry = getTaxIdNumberOptions(country, companyType);
2703
- const metadataFn = taxInformationDefaultFieldConfig[country];
2704
- if (!optionsForCountry || !metadataFn) return void 0;
2705
- if (optionsForCountry.length === 1) return optionsForCountry[0].id;
2706
- const allMetaData = optionsForCountry.reduce(
2707
- (acc, option) => {
2708
- const meta = typeof metadataFn === "function" ? metadataFn({
2709
- taxIdNumberType: option.id,
2710
- companyType
2711
- }) : metadataFn;
2712
- if (meta.label && !acc[meta.label]) {
2713
- acc[meta.label] = meta;
2714
- }
2715
- return acc;
2716
- },
2717
- {}
2718
- );
2719
- for (const option of optionsForCountry) {
2720
- const fieldMetadata = allMetaData[option.name];
2721
- if (!fieldMetadata?.validators) continue;
2722
- const validators = Array.isArray(fieldMetadata.validators) ? fieldMetadata.validators : [fieldMetadata.validators];
2723
- if (validators.every((validator) => validator.validate(taxInformation))) {
2724
- return option.id;
2725
- }
2726
- }
2727
- };
2728
- function findExistingTaxInformation(taxInformation, country) {
2729
- return taxInformation?.find((taxId) => taxId.country === country);
2730
- }
2731
- function getDefaultTaxIdNumberType(taxInformation, country, entityType) {
2732
- const existingTaxInformation = findExistingTaxInformation(taxInformation, country);
2733
- return (
2734
- // First check if we already have a type set
2735
- existingTaxInformation?.type ?? (existingTaxInformation?.number ? (
2736
- // If we have a number but no type, try to infer it
2737
- inferTaxIdNumberType(taxInformation, country, entityType)
2738
- ) : (
2739
- // Otherwise use the first available tax ID option for this country and entity type
2740
- getTaxIdNumberOptions(country, entityType)?.[0]?.id
2741
- ))
2742
- );
2743
- }
2744
- function TaxIdNumberTypeSelector({
2745
- country,
2746
- companyType,
2747
- selected,
2748
- setSelected,
2749
- exemptedOption,
2750
- isUsSoleProp,
2751
- errorMessage
2752
- }) {
2753
- const { t } = useTranslation("common");
2754
- const handleSelect = useCallback(
2755
- (selectedStr) => {
2756
- const newSelected = selectedStr;
2757
- if (newSelected === "exempted") {
2758
- if (exemptedOption) {
2759
- setSelected(newSelected);
2760
- }
2761
- return;
2762
- }
2763
- setSelected(newSelected);
2764
- },
2765
- [exemptedOption, setSelected]
2766
- );
2767
- const options = useMemo(() => {
2768
- const availableOptions = getTaxIdNumberOptions(country, companyType) ?? [];
2769
- if (availableOptions.length === 0 || !exemptedOption) return availableOptions;
2770
- return [
2771
- ...availableOptions,
2772
- {
2773
- id: "exempted",
2774
- name: exemptedOption
2775
- }
2776
- ];
2777
- }, [country, companyType, exemptedOption]);
2778
- useEffect(() => {
2779
- if (!isUsSoleProp && !selected && options.length > 0) {
2780
- handleSelect(options[0].id);
2781
- }
2782
- }, [options, selected, handleSelect, isUsSoleProp]);
2783
- if (options.length <= 1) return null;
2784
- return /* @__PURE__ */ jsx(
2785
- Field,
2786
- {
2787
- el: "fieldset",
2788
- name: "taxIdNumberType",
2789
- label: t(($) => $["whichTaxpayerIdentificationNumberDoYouUse"]),
2790
- errorMessage: !!errorMessage,
2791
- children: (childProps) => /* @__PURE__ */ jsx(
2792
- RadioGroup,
2793
- {
2794
- ...childProps,
2795
- name: "taxIdNumberType",
2796
- items: options,
2797
- value: selected,
2798
- onChange: handleSelect
2799
- }
2800
- )
2801
- }
2802
- );
2803
- }
2804
- const TAX_INFORMATION_FIELD = [
2805
- "taxInformation",
2806
- "exemptedFromTax",
2807
- "isUen"
2808
- ];
2809
- function TaxInformationField({
2810
- data,
2811
- valid,
2812
- errors,
2813
- labels,
2814
- mask,
2815
- guidanceText,
2816
- placeholders,
2817
- readonly,
2818
- optional,
2819
- shouldValidate,
2820
- handleChangeFor,
2821
- country,
2822
- canExempt,
2823
- registrationNumber,
2824
- entityType,
2825
- defaultData
2826
- }) {
2827
- const { isExperimentEnabled } = useExperimentsContext();
2828
- const { t } = useTranslation("common");
2829
- const { accountHolder } = useAccountHolder();
2830
- const currentCountryTaxInformation = useMemo(
2831
- () => data?.taxInformation?.find((taxInfo) => taxInfo.country === country) ?? (!data.exemptedFromTax ? defaultData?.find((taxInfo) => taxInfo.country === country) : void 0),
2832
- [data?.taxInformation, data.exemptedFromTax, defaultData, country]
2833
- );
2834
- const isUsSoleProp = country === "US" && entityType === CompanyTypesValues.SOLE_PROPRIETORSHIP;
2835
- const exemptionLabel = isUsSoleProp ? t(($) => $["socialSecurityNumber"]) : labels.exemptedFromTax;
2836
- const shouldRenderInput = isUsSoleProp ? currentCountryTaxInformation?.type === "EIN" : !data.isUen;
2837
- const options = getTaxIdNumberOptions(country, entityType);
2838
- const showTaxIdExemptedOptions = canExempt && (options?.length ?? 0) > 1 || isUsSoleProp;
2839
- const canSaveAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust";
2840
- const taxIdNumberType = useMemo(() => {
2841
- if (isUsSoleProp) {
2842
- return data.exemptedFromTax ? "exempted" : currentCountryTaxInformation?.type ? currentCountryTaxInformation?.type : void 0;
2843
- }
2844
- return data.exemptedFromTax ? "exempted" : currentCountryTaxInformation?.type ? currentCountryTaxInformation?.type : getDefaultTaxIdNumberType(data.taxInformation, country, entityType);
2845
- }, [
2846
- country,
2847
- currentCountryTaxInformation?.type,
2848
- data.exemptedFromTax,
2849
- data.taxInformation,
2850
- entityType,
2851
- isUsSoleProp
2852
- ]);
2853
- const handleTaxInformationChange = (e, key, mode) => {
2854
- const value = e ? typeof e === "string" ? e : e?.target?.value : void 0;
2855
- switch (key) {
2856
- case "number": {
2857
- const newTaxInformation = canSaveAbsentState ? {
2858
- country,
2859
- number: value,
2860
- type: currentCountryTaxInformation?.type ?? taxIdNumberType,
2861
- numberAbsent: false
2862
- } : {
2863
- country,
2864
- number: value,
2865
- type: currentCountryTaxInformation?.type ?? taxIdNumberType
2866
- };
2867
- if (!data.taxInformation) {
2868
- return handleChangeFor("taxInformation", mode)([newTaxInformation]);
2869
- }
2870
- const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxInformation];
2871
- const updatedTaxInformation = taxInformation.map((taxInfo) => {
2872
- if (taxInfo.country !== country) return taxInfo;
2873
- return newTaxInformation;
2874
- });
2875
- return handleChangeFor("taxInformation", mode)(updatedTaxInformation);
2876
- }
2877
- case "type": {
2878
- const newTaxInformation = canSaveAbsentState ? {
2879
- country,
2880
- number: currentCountryTaxInformation?.number,
2881
- type: value,
2882
- numberAbsent: false
2883
- } : {
2884
- country,
2885
- number: currentCountryTaxInformation?.number,
2886
- type: value
2887
- };
2888
- if (!data.taxInformation) {
2889
- return handleChangeFor("taxInformation", mode)([newTaxInformation]);
2890
- }
2891
- const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxInformation];
2892
- const updatedTaxInformation = taxInformation.map((taxInfo) => {
2893
- if (taxInfo.country !== country) return taxInfo;
2894
- return newTaxInformation;
2895
- });
2896
- return handleChangeFor("taxInformation", mode)(updatedTaxInformation);
2897
- }
2898
- }
2899
- };
2900
- useEffect(() => {
2901
- const hasSavedTaxId = defaultData?.find((taxId) => taxId.country === country);
2902
- if (currentCountryTaxInformation?.country === country) return;
2903
- if (currentCountryTaxInformation && !hasSavedTaxId) return;
2904
- if (entityType === CompanyTypesValues.SOLE_PROPRIETORSHIP) return;
2905
- handleChangeFor("taxInformation", "input")(defaultData);
2906
- const newCountryOptions = getTaxIdNumberOptions(country, entityType);
2907
- if (newCountryOptions && newCountryOptions.length > 0) {
2908
- handleTaxInformationChange(newCountryOptions[0].id, "type", "input");
2909
- } else {
2910
- handleTaxInformationChange(void 0, "type", "input");
2911
- }
2912
- }, [country]);
2913
- const removeCurrentCountryTaxInformation = () => {
2914
- const filterdTaxInformation = data.taxInformation?.filter((taxId) => taxId.country !== country);
2915
- handleChangeFor("taxInformation", "input")(filterdTaxInformation);
2916
- };
2917
- const setUenAsTaxId = (uen) => {
2918
- if (!data.taxInformation) {
2919
- return handleChangeFor(
2920
- "taxInformation",
2921
- "blur"
2922
- )([
2923
- {
2924
- country,
2925
- number: uen ?? "",
2926
- type: "UEN"
2927
- }
2928
- ]);
2929
- }
2930
- const taxInformation = currentCountryTaxInformation ? data.taxInformation : [
2931
- ...data.taxInformation,
2932
- {
2933
- country,
2934
- number: uen ?? "",
2935
- type: "UEN"
2936
- }
2937
- ];
2938
- const updatedTaxInformation = taxInformation.map((taxInfo) => {
2939
- if (taxInfo.country !== country) return taxInfo;
2940
- return {
2941
- country,
2942
- number: uen ?? "",
2943
- type: "UEN"
2944
- };
2945
- });
2946
- return handleChangeFor("taxInformation", "blur")(updatedTaxInformation);
2947
- };
2948
- useEffect(() => {
2949
- if (country === "SG" && data.isUen && registrationNumber && registrationNumber !== currentCountryTaxInformation?.number) {
2950
- setUenAsTaxId(registrationNumber);
2951
- }
2952
- }, [
2953
- registrationNumber,
2954
- currentCountryTaxInformation?.number,
2955
- data.isUen,
2956
- country,
2957
- setUenAsTaxId
2958
- ]);
2959
- const addTaxAbsentStatus = (exempted) => {
2960
- if (!data.taxInformation) {
2961
- const updatedTaxInformation2 = [
2962
- {
2963
- country,
2964
- numberAbsent: exempted
2965
- }
2966
- ];
2967
- return handleChangeFor("taxInformation", "input")(updatedTaxInformation2);
2968
- }
2969
- const taxInformation = currentCountryTaxInformation ? data.taxInformation : [
2970
- ...data.taxInformation,
2971
- {
2972
- country,
2973
- numberAbsent: exempted
2974
- }
2975
- ];
2976
- const updatedTaxInformation = taxInformation.map((taxInfo) => {
2977
- if (taxInfo.country !== country) return taxInfo;
2978
- return {
2979
- country,
2980
- numberAbsent: exempted
2981
- };
2982
- });
2983
- return handleChangeFor("taxInformation", "input")(updatedTaxInformation);
2984
- };
2985
- const handleTaxIdNumberTypeChange = (taxIdType) => {
2986
- if (!canExempt && taxIdType === "exempted") {
2987
- throw Error(`${country} does not allow tax exemptions`);
2988
- }
2989
- switch (taxIdType) {
2990
- case "exempted":
2991
- handleChangeFor("exemptedFromTax")(true);
2992
- handleTaxInformationChange(void 0, "type", "input");
2993
- return canSaveAbsentState ? addTaxAbsentStatus(true) : removeCurrentCountryTaxInformation();
2994
- default:
2995
- handleChangeFor("exemptedFromTax")(false);
2996
- }
2997
- if (country === "SG") {
2998
- if (taxIdType === "UEN") {
2999
- handleChangeFor("isUen")(true);
3000
- setUenAsTaxId(registrationNumber);
3001
- } else {
3002
- handleChangeFor("isUen")(false);
3003
- removeCurrentCountryTaxInformation();
3004
- }
3005
- }
3006
- handleTaxInformationChange(taxIdType, "type", "input");
3007
- };
3008
- const handleExemptedFromTaxChange = (exempted) => {
3009
- if (canSaveAbsentState) {
3010
- addTaxAbsentStatus(exempted);
3011
- handleChangeFor("exemptedFromTax")(exempted);
3012
- } else {
3013
- handleChangeFor("exemptedFromTax")(exempted);
3014
- removeCurrentCountryTaxInformation();
3015
- }
3016
- };
3017
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-field__tax-information", children: [
3018
- /* @__PURE__ */ jsx(
3019
- TaxIdNumberTypeSelector,
3020
- {
3021
- country,
3022
- companyType: entityType,
3023
- setSelected: handleTaxIdNumberTypeChange,
3024
- selected: taxIdNumberType,
3025
- exemptedOption: showTaxIdExemptedOptions ? exemptionLabel : false,
3026
- isUsSoleProp,
3027
- errorMessage: isUsSoleProp ? errors.taxInformation : false
3028
- }
3029
- ),
3030
- shouldRenderInput && /* @__PURE__ */ jsx(
3031
- MaskedInput,
3032
- {
3033
- type: "text",
3034
- "aria-required": true,
3035
- "aria-invalid": !valid.taxInformation,
3036
- name: "taxInformation",
3037
- label: labels.taxInformation ?? "",
3038
- formatGuidance: guidanceText?.taxInformation ?? "",
3039
- value: currentCountryTaxInformation?.number ?? "",
3040
- errorMessage: errors.taxInformation,
3041
- placeholder: placeholders?.taxInformation,
3042
- isValid: Boolean(valid.taxInformation) && !!currentCountryTaxInformation,
3043
- onInput: (e) => handleTaxInformationChange(e, "number", "input"),
3044
- onBlur: (e) => handleTaxInformationChange(e, "number", "blur"),
3045
- disabled: data.exemptedFromTax || data.isUen,
3046
- readonly,
3047
- optional,
3048
- shouldValidate,
3049
- ...mask
3050
- }
3051
- ),
3052
- canExempt && !showTaxIdExemptedOptions && /* @__PURE__ */ jsx(Field, { name: "exemptedFromTax", children: (childProps) => /* @__PURE__ */ jsx(
3053
- Checkbox,
3054
- {
3055
- ...childProps,
3056
- "aria-required": false,
3057
- "aria-invalid": false,
3058
- name: "exemptedFromTax",
3059
- label: labels.exemptedFromTax,
3060
- value: "exemptedFromTax",
3061
- checked: Boolean(data.exemptedFromTax),
3062
- onChange: handleExemptedFromTaxChange
3063
- }
3064
- ) })
3065
- ] });
3066
- }
3067
- export {
3068
- COUNTRY_OF_GOVERNING_LAW_POSSIBLE as C,
3069
- MemoizedDocumentUpload as M,
3070
- StateCodesUS as S,
3071
- TaxInformationField as T,
3072
- additionallIdNumberOptions as a,
3073
- taxInformationDefaultFieldConfig as b,
3074
- TAX_INFORMATION_FIELD as c,
3075
- requestingIssuing as d,
3076
- exemptedFromTaxDefaultFieldMetadata as e,
3077
- exemptedFromTaxDefaultFieldConfig as f,
3078
- getFieldsWithExistingData as g,
3079
- COUNTRIES_USING_COMPANY_SEARCH as h,
3080
- individualIdNumberOptions as i,
3081
- isRegistrationNumberAbsentStateV4Scenario as j,
3082
- COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT as k,
3083
- getCompanyRegistrationNumberOptions as l,
3084
- countryToTaxInfoTypeMap as m,
3085
- rules as n,
3086
- businessRegistrationNumberMasks as o,
3087
- businessRegistrationNumberPatterns as p,
3088
- getVatNumberOptions as q,
3089
- requestingBanking as r,
3090
- stateFormatGuidanceText as s,
3091
- taxInformationDefaultFieldMetadata as t,
3092
- useCapabilities as u,
3093
- vatNumberOptions as v
3094
- };