@saasquatch/mint-components 2.2.0 → 2.3.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/dist/cjs/{data-8c8a08f6.js → data-89ac73dd.js} +2 -90
  2. package/dist/cjs/eventKeys-7af4df4d.js +5 -0
  3. package/dist/cjs/{keys-cff24974.js → keys-5a2c9ed2.js} +4 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/mint-components.cjs.js +1 -1
  6. package/dist/cjs/parseStates-d1effc19.js +16 -0
  7. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +461 -339
  8. package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_47.cjs.entry.js} +450 -16
  9. package/dist/cjs/sqm-code-verification.cjs.entry.js +4 -5
  10. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +893 -0
  11. package/dist/cjs/sqm-partner-info-modal-view-f6faecf5.js +149 -0
  12. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +27 -9
  13. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +30 -9
  14. package/dist/cjs/sqm-stencilbook.cjs.entry.js +732 -326
  15. package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-0e1ddbe4.js} +34 -426
  16. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
  17. package/dist/cjs/{usePayoutStatus-0192fccd.js → useIndirectTaxForm-c3c1ec56.js} +294 -5
  18. package/dist/cjs/utils-a3b3d05b.js +478 -0
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +171 -0
  21. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +143 -0
  22. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +670 -0
  23. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +276 -0
  24. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
  25. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
  26. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +2 -2
  27. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +209 -145
  28. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -10
  29. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -0
  30. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +2 -2
  31. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +223 -137
  32. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +30 -10
  33. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -0
  34. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -0
  35. package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +16 -0
  36. package/dist/collection/components/sqm-widget-verification/keys.js +2 -0
  37. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +3 -4
  38. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -2
  39. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +19 -9
  40. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +486 -46
  41. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +43 -11
  42. package/dist/collection/components/tax-and-cash/data.js +2 -0
  43. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +93 -37
  44. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +738 -13
  45. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +95 -1
  46. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +51 -12
  47. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +59 -30
  48. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +51 -2
  49. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +0 -1
  50. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +10 -18
  51. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +0 -25
  52. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +34 -17
  53. package/dist/esm/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +5 -5
  54. package/dist/{mint-components/p-0c0d4065.js → esm/data-8698cbc6.js} +25 -5
  55. package/dist/esm/eventKeys-f76b6a03.js +3 -0
  56. package/dist/esm/{global-96c14d63.js → global-75e96214.js} +1 -1
  57. package/dist/esm/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
  58. package/dist/esm/keys-1054056a.js +8 -0
  59. package/dist/esm/loader.js +3 -3
  60. package/dist/esm/mint-components.js +3 -3
  61. package/dist/esm/parseStates-ed75e224.js +14 -0
  62. package/dist/esm/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
  63. package/dist/esm/sqm-banking-info-form_10.entry.js +448 -326
  64. package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_47.entry.js} +454 -21
  65. package/dist/esm/sqm-close-button.entry.js +1 -1
  66. package/dist/esm/sqm-code-verification.entry.js +7 -8
  67. package/dist/esm/sqm-context-router.entry.js +1 -1
  68. package/dist/esm/sqm-email-verification_2.entry.js +888 -0
  69. package/dist/esm/sqm-empty_4.entry.js +2 -2
  70. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  71. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  72. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  73. package/dist/esm/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
  74. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  75. package/dist/esm/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
  76. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  77. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  78. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  79. package/dist/esm/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
  80. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  81. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  82. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  83. package/dist/esm/sqm-partner-info-modal-view-d6f3a215.js +146 -0
  84. package/dist/esm/sqm-password-field.entry.js +2 -2
  85. package/dist/esm/sqm-popup-container.entry.js +1 -1
  86. package/dist/esm/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
  87. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  88. package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
  89. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  90. package/dist/esm/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
  91. package/dist/esm/sqm-portal-profile.entry.js +4 -4
  92. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  93. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  94. package/dist/esm/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
  95. package/dist/esm/sqm-qr-code.entry.js +2 -2
  96. package/dist/esm/sqm-referral-table_11.entry.js +32 -14
  97. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  98. package/dist/esm/sqm-rewards-table_9.entry.js +35 -14
  99. package/dist/esm/sqm-stencilbook.entry.js +708 -302
  100. package/dist/esm/sqm-tab.entry.js +2 -2
  101. package/dist/esm/sqm-tabs.entry.js +3 -3
  102. package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-e1ba6009.js} +14 -403
  103. package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
  104. package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
  105. package/dist/esm/{usePayoutStatus-46c0c289.js → useIndirectTaxForm-b2888ea5.js} +292 -5
  106. package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +2 -2
  107. package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +2 -2
  108. package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +2 -2
  109. package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
  110. package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +3 -3
  111. package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
  112. package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
  113. package/dist/esm/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
  114. package/dist/esm/utils-4f5cd04c.js +467 -0
  115. package/dist/esm-es5/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +1 -1
  116. package/dist/esm-es5/data-8698cbc6.js +1 -0
  117. package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
  118. package/dist/esm-es5/{global-96c14d63.js → global-75e96214.js} +1 -1
  119. package/dist/esm-es5/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
  120. package/dist/esm-es5/keys-1054056a.js +1 -0
  121. package/dist/esm-es5/loader.js +1 -1
  122. package/dist/esm-es5/mint-components.js +1 -1
  123. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  124. package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
  125. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  126. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -0
  127. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  128. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  129. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  130. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -0
  131. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  132. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  133. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  134. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  135. package/dist/esm-es5/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
  136. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  137. package/dist/esm-es5/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
  138. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  139. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  140. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  141. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
  142. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  143. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  144. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  145. package/dist/esm-es5/sqm-partner-info-modal-view-d6f3a215.js +1 -0
  146. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  147. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  148. package/dist/esm-es5/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
  149. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  150. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  151. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  152. package/dist/esm-es5/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
  153. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  154. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  155. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  156. package/dist/esm-es5/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
  157. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  158. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  159. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  160. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  161. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  162. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  163. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  164. package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +1 -0
  165. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  166. package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
  167. package/dist/esm-es5/useIndirectTaxForm-b2888ea5.js +6 -0
  168. package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +1 -1
  169. package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +1 -1
  170. package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +1 -1
  171. package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
  172. package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +1 -1
  173. package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
  174. package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
  175. package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
  176. package/dist/esm-es5/utils-4f5cd04c.js +1 -0
  177. package/dist/mint-components/mint-components.esm.js +1 -1
  178. package/dist/mint-components/mint-components.js +1 -1
  179. package/dist/mint-components/{p-626b31cb.system.entry.js → p-025ddad2.system.entry.js} +1 -1
  180. package/dist/mint-components/{p-5b871e38.system.entry.js → p-02c0f88e.system.entry.js} +1 -1
  181. package/dist/mint-components/{p-f55ecf35.system.js → p-02e2b13b.system.js} +1 -1
  182. package/dist/mint-components/{p-a4f8abad.js → p-0766438e.js} +1 -1
  183. package/dist/mint-components/{p-205cfdcd.system.js → p-0815b973.system.js} +1 -1
  184. package/dist/mint-components/{p-db0a2afd.entry.js → p-092c2606.entry.js} +1 -1
  185. package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-099ce3d5.system.entry.js} +1 -1
  186. package/dist/mint-components/p-0a6489fa.entry.js +1 -0
  187. package/dist/mint-components/p-0afa6148.js +1 -0
  188. package/dist/mint-components/{p-fc284f91.system.entry.js → p-0b32e1d4.system.entry.js} +1 -1
  189. package/dist/mint-components/p-115dfc03.system.js +1 -0
  190. package/dist/mint-components/{p-7b59e13c.system.js → p-1317cc92.system.js} +1 -1
  191. package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-13bb56a8.system.entry.js} +1 -1
  192. package/dist/mint-components/{p-f8a09b0f.js → p-13d8ecad.js} +1 -1
  193. package/dist/mint-components/p-13f3a647.js +1 -0
  194. package/dist/mint-components/{p-61897e72.entry.js → p-14183edc.entry.js} +1 -1
  195. package/dist/mint-components/{p-8f2d03c7.entry.js → p-1599a178.entry.js} +1 -1
  196. package/dist/mint-components/{p-02499e08.entry.js → p-1b0326d1.entry.js} +1 -1
  197. package/dist/mint-components/p-1d398dbc.entry.js +11 -0
  198. package/dist/mint-components/p-1d86895f.system.js +1 -0
  199. package/dist/mint-components/p-1e6a2945.js +1 -0
  200. package/dist/mint-components/{p-c8a3f3b0.js → p-1efb42e2.js} +1 -1
  201. package/dist/mint-components/p-1f387c7b.system.js +1 -0
  202. package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-209157a9.system.entry.js} +1 -1
  203. package/dist/mint-components/{p-30c1ef36.system.js → p-2190dc73.system.js} +1 -1
  204. package/dist/mint-components/{p-80e116ec.system.entry.js → p-24f1d342.system.entry.js} +1 -1
  205. package/dist/mint-components/{p-6668f9f0.entry.js → p-27daf264.entry.js} +1 -1
  206. package/dist/mint-components/p-28ed2ae9.js +1 -0
  207. package/dist/mint-components/{p-09f7aacd.entry.js → p-29bc5f50.entry.js} +2 -2
  208. package/dist/mint-components/{p-738dce27.system.entry.js → p-2d3f7b76.system.entry.js} +1 -1
  209. package/dist/mint-components/p-2ed13619.entry.js +1 -0
  210. package/dist/mint-components/{p-c45a929a.system.entry.js → p-30cfe3e3.system.entry.js} +1 -1
  211. package/dist/mint-components/{p-d55c50af.system.js → p-31815fb6.system.js} +1 -1
  212. package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-3354cc75.system.entry.js} +1 -1
  213. package/dist/mint-components/{p-5bc5c61e.entry.js → p-335a5736.entry.js} +1 -1
  214. package/dist/mint-components/{p-e9485160.system.entry.js → p-33ca28ba.system.entry.js} +1 -1
  215. package/dist/mint-components/p-3596e241.entry.js +116 -0
  216. package/dist/mint-components/{p-8583ce0c.system.js → p-376c7608.system.js} +1 -1
  217. package/dist/mint-components/p-37e24621.system.entry.js +1 -0
  218. package/dist/mint-components/{p-95510f27.entry.js → p-38d04e4b.entry.js} +1 -1
  219. package/dist/mint-components/{p-e84b874c.js → p-3a41b39c.js} +1 -1
  220. package/dist/mint-components/{p-e5ea43b1.entry.js → p-3bbc0db2.entry.js} +2 -2
  221. package/dist/mint-components/{p-982d1f6f.entry.js → p-432a44de.entry.js} +3 -2
  222. package/dist/mint-components/{p-bab4929e.js → p-45230a44.js} +1 -1
  223. package/dist/mint-components/p-4691e9d5.system.js +1 -0
  224. package/dist/mint-components/{p-1d92c169.entry.js → p-4d73a616.entry.js} +1 -1
  225. package/dist/mint-components/{p-3bc62ca6.entry.js → p-4e3db52b.entry.js} +1 -1
  226. package/dist/mint-components/{p-3286ef38.js → p-4eaa3eb7.js} +1 -1
  227. package/dist/mint-components/{p-013564b3.entry.js → p-4eadbd5b.entry.js} +1 -1
  228. package/dist/mint-components/p-4f9dc974.js +1 -0
  229. package/dist/mint-components/{p-f7ca4cc4.system.entry.js → p-51ae6716.system.entry.js} +1 -1
  230. package/dist/mint-components/p-56b33268.system.entry.js +1 -0
  231. package/dist/mint-components/p-58c24352.system.js +6 -0
  232. package/dist/mint-components/p-5c52100b.js +117 -0
  233. package/dist/mint-components/{p-77b9cde8.system.js → p-5fdf0286.system.js} +1 -1
  234. package/dist/mint-components/{p-09348341.entry.js → p-60b1f3d9.entry.js} +1 -1
  235. package/dist/mint-components/{p-d005df28.system.entry.js → p-623a0a0b.system.entry.js} +1 -1
  236. package/dist/mint-components/{p-c30d0049.system.entry.js → p-6b4e5d94.system.entry.js} +1 -1
  237. package/dist/mint-components/{p-f4e36adf.system.entry.js → p-6f6c3ac6.system.entry.js} +1 -1
  238. package/dist/mint-components/p-6f8dde97.system.js +1 -0
  239. package/dist/mint-components/{p-43c31fd5.system.js → p-7628e56f.system.js} +1 -1
  240. package/dist/mint-components/{p-653db72e.entry.js → p-78e6dc8d.entry.js} +1 -1
  241. package/dist/mint-components/{p-f581aac7.js → p-7a091fa7.js} +1 -1
  242. package/dist/mint-components/{p-40bad95a.entry.js → p-7cbdf341.entry.js} +2 -2
  243. package/dist/mint-components/{p-044f930a.system.js → p-7d2d9ef9.system.js} +1 -1
  244. package/dist/mint-components/{p-5c4ba8a0.entry.js → p-7ea3f49c.entry.js} +1 -1
  245. package/dist/mint-components/{p-5ce78407.system.entry.js → p-81bc6dca.system.entry.js} +1 -1
  246. package/dist/mint-components/{p-f6528f8a.entry.js → p-84495fb8.entry.js} +1 -1
  247. package/dist/mint-components/{p-b96e90a2.system.entry.js → p-86d20b47.system.entry.js} +1 -1
  248. package/dist/mint-components/p-87f86492.js +1 -0
  249. package/dist/mint-components/{p-d0993bb9.js → p-8a6531d2.js} +1 -1
  250. package/dist/mint-components/p-8ae8968c.js +1 -0
  251. package/dist/mint-components/{p-7265bbcb.system.js → p-8e148cb0.system.js} +1 -1
  252. package/dist/mint-components/p-8f15bf17.entry.js +1 -0
  253. package/dist/mint-components/{p-b66f45d1.entry.js → p-921eb024.entry.js} +1 -1
  254. package/dist/mint-components/{p-f1374258.system.entry.js → p-925aa740.system.entry.js} +1 -1
  255. package/dist/mint-components/p-99eecdcb.system.entry.js +1 -0
  256. package/dist/mint-components/{p-e12754f5.system.entry.js → p-9a15cd5a.system.entry.js} +1 -1
  257. package/dist/mint-components/p-9c1f5317.system.js +1 -0
  258. package/dist/mint-components/{p-832aea99.js → p-9f48640d.js} +1 -1
  259. package/dist/mint-components/p-a38eece5.system.entry.js +1 -0
  260. package/dist/mint-components/p-a49d9288.entry.js +1 -0
  261. package/dist/mint-components/{p-90833864.system.entry.js → p-ab59c5eb.system.entry.js} +1 -1
  262. package/dist/mint-components/{p-e6240c72.js → p-abd717d4.js} +1 -1
  263. package/dist/mint-components/p-abe9f5b1.js +99 -0
  264. package/dist/mint-components/p-ae2f610e.system.js +1 -0
  265. package/dist/mint-components/p-b222bace.system.entry.js +1 -0
  266. package/dist/mint-components/{p-19c441b2.system.js → p-b2ad3fca.system.js} +1 -1
  267. package/dist/mint-components/{p-c8a8d231.entry.js → p-b3309d9b.entry.js} +2 -2
  268. package/dist/mint-components/p-b419f9ac.entry.js +299 -0
  269. package/dist/mint-components/{p-8962e023.js → p-b871d158.js} +1 -1
  270. package/dist/mint-components/p-b96ed8eb.js +1 -0
  271. package/dist/mint-components/p-badf28bb.system.js +1 -0
  272. package/dist/mint-components/{p-035d9b65.js → p-bb0b5e4b.js} +1 -1
  273. package/dist/mint-components/{p-52674798.entry.js → p-bcfdb510.entry.js} +1 -1
  274. package/dist/mint-components/p-be6a0dee.system.js +1 -0
  275. package/dist/mint-components/{p-642f2c89.js → p-bf9ab2d3.js} +1 -1
  276. package/dist/mint-components/{p-bc386a7b.js → p-c0a85e22.js} +1 -1
  277. package/dist/mint-components/p-c0f8f977.system.entry.js +1 -0
  278. package/dist/mint-components/p-c41d536d.entry.js +1 -0
  279. package/dist/mint-components/{p-a0c5631b.system.js → p-c66e5217.system.js} +1 -1
  280. package/dist/mint-components/p-cdabd9de.system.js +1 -0
  281. package/dist/mint-components/p-cfc35705.system.entry.js +1 -0
  282. package/dist/mint-components/{p-0d83907e.js → p-cfea215d.js} +1 -1
  283. package/dist/mint-components/p-d08408b3.entry.js +1 -0
  284. package/dist/mint-components/{p-172675ca.system.js → p-d284ae70.system.js} +1 -1
  285. package/dist/mint-components/{p-027fc3be.system.entry.js → p-d34564f8.system.entry.js} +1 -1
  286. package/dist/mint-components/{p-1021a49f.system.entry.js → p-db6bf7cf.system.entry.js} +1 -1
  287. package/dist/mint-components/{p-4da5a3fe.system.entry.js → p-df897432.system.entry.js} +1 -1
  288. package/dist/mint-components/{p-036a2617.system.js → p-e651593c.system.js} +1 -1
  289. package/dist/mint-components/{p-f39cf252.system.entry.js → p-e6de31a7.system.entry.js} +1 -1
  290. package/dist/mint-components/{p-2668335b.js → p-e8e7af06.js} +1 -1
  291. package/dist/mint-components/{p-85721089.system.js → p-e920c95c.system.js} +1 -1
  292. package/dist/mint-components/{p-3366b81e.js → p-eae44b42.js} +2 -2
  293. package/dist/mint-components/p-ebc519bc.system.js +1 -0
  294. package/dist/mint-components/{p-af407cce.entry.js → p-ef32fa8f.entry.js} +1 -1
  295. package/dist/mint-components/{p-7efb8782.system.js → p-f32050f6.system.js} +1 -1
  296. package/dist/mint-components/{p-782af7ae.system.entry.js → p-f6de2e5c.system.entry.js} +1 -1
  297. package/dist/mint-components/{p-9390586b.system.entry.js → p-fa85ea51.system.entry.js} +1 -1
  298. package/dist/mint-components/p-ff013776.entry.js +9 -0
  299. package/dist/mint-components/p-ffcebe78.entry.js +83 -0
  300. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +15 -0
  301. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +50 -0
  302. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +123 -0
  303. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +17 -0
  304. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +18 -1
  305. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +19 -7
  306. package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
  307. package/dist/types/components/sqm-widget-verification/keys.d.ts +2 -0
  308. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +75 -7
  309. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
  310. package/dist/types/components/tax-and-cash/data.d.ts +3 -0
  311. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +8 -0
  312. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
  313. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +173 -0
  314. package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -0
  315. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +7 -0
  316. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -5
  317. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -1
  318. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -4
  319. package/dist/types/components.d.ts +644 -32
  320. package/dist/types/saasquatch.d.ts +2 -0
  321. package/docs/docs.docx +0 -0
  322. package/docs/raisins.json +1 -1
  323. package/grapesjs/grapesjs.js +1 -1
  324. package/package.json +2 -4
  325. package/dist/cjs/extractProps-e9c55ba8.js +0 -35
  326. package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -418
  327. package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -214
  328. package/dist/esm/data-12e6aae1.js +0 -216
  329. package/dist/esm/extractProps-54064fb0.js +0 -32
  330. package/dist/esm/keys-406491dc.js +0 -6
  331. package/dist/esm/sqm-email-verification.entry.js +0 -414
  332. package/dist/esm/sqm-widget-verification.entry.js +0 -210
  333. package/dist/esm-es5/data-12e6aae1.js +0 -1
  334. package/dist/esm-es5/extractProps-54064fb0.js +0 -1
  335. package/dist/esm-es5/keys-406491dc.js +0 -1
  336. package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
  337. package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
  338. package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +0 -1
  339. package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
  340. package/dist/esm-es5/usePayoutStatus-46c0c289.js +0 -6
  341. package/dist/mint-components/p-00b235c5.system.entry.js +0 -1
  342. package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
  343. package/dist/mint-components/p-0797a946.js +0 -1
  344. package/dist/mint-components/p-13292317.entry.js +0 -11
  345. package/dist/mint-components/p-2d5c2bd4.system.entry.js +0 -1
  346. package/dist/mint-components/p-38c7775a.js +0 -1
  347. package/dist/mint-components/p-3adbfd0b.system.js +0 -6
  348. package/dist/mint-components/p-3af3e2c1.entry.js +0 -25
  349. package/dist/mint-components/p-5492dd51.system.entry.js +0 -1
  350. package/dist/mint-components/p-57dd28bd.system.js +0 -1
  351. package/dist/mint-components/p-5b1d2866.system.js +0 -1
  352. package/dist/mint-components/p-6c4ad51a.js +0 -1
  353. package/dist/mint-components/p-77fa2383.entry.js +0 -1
  354. package/dist/mint-components/p-7939e4af.entry.js +0 -1
  355. package/dist/mint-components/p-8285869e.entry.js +0 -9
  356. package/dist/mint-components/p-892797eb.system.entry.js +0 -1
  357. package/dist/mint-components/p-91a96e98.entry.js +0 -1
  358. package/dist/mint-components/p-b2b85238.entry.js +0 -1
  359. package/dist/mint-components/p-b395470f.entry.js +0 -16
  360. package/dist/mint-components/p-bba16a46.system.entry.js +0 -1
  361. package/dist/mint-components/p-be12607e.entry.js +0 -281
  362. package/dist/mint-components/p-bf188b72.system.entry.js +0 -1
  363. package/dist/mint-components/p-ca098be1.system.js +0 -1
  364. package/dist/mint-components/p-d18dedd4.js +0 -1
  365. package/dist/mint-components/p-d4f332a7.entry.js +0 -106
  366. package/dist/mint-components/p-d6193876.system.js +0 -1
  367. package/dist/mint-components/p-de0d6fd7.js +0 -49
  368. package/dist/mint-components/p-e00ec007.js +0 -1
  369. package/dist/mint-components/p-e55aafe9.system.js +0 -1
  370. package/dist/mint-components/p-ea03e50e.system.js +0 -1
  371. package/dist/mint-components/p-ec0b649a.entry.js +0 -1
  372. package/dist/mint-components/p-f8026ed6.system.js +0 -1
  373. package/dist/mint-components/p-fb804001.system.entry.js +0 -1
  374. package/dist/mint-components/p-fe70e20c.entry.js +0 -1
  375. package/dist/mint-components/p-ff118a19.system.js +0 -1
@@ -16,13 +16,15 @@ const reRender = require('./re-render-72a0ef45.js');
16
16
  const useChildElements = require('./useChildElements-041127d7.js');
17
17
  const luxon = require('./luxon-c1ad356a.js');
18
18
  const useReferralTable = require('./useReferralTable-6e9de0d5.js');
19
- const sqmUserInfoFormView = require('./sqm-user-info-form-view-53306f6e.js');
20
- const data = require('./data-8c8a08f6.js');
21
- const keys = require('./keys-cff24974.js');
22
- const usePayoutStatus = require('./usePayoutStatus-0192fccd.js');
19
+ const sqmUserInfoFormView = require('./sqm-user-info-form-view-0e1ddbe4.js');
20
+ const utils$1 = require('./utils-a3b3d05b.js');
21
+ const data = require('./data-89ac73dd.js');
22
+ const keys = require('./keys-5a2c9ed2.js');
23
+ const eventKeys = require('./eventKeys-7af4df4d.js');
24
+ const useIndirectTaxForm = require('./useIndirectTaxForm-c3c1ec56.js');
23
25
 
24
26
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
27
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
26
28
  const { errors, ...formState } = props.states.formState;
27
29
  return {
28
30
  0: {
@@ -31,44 +33,54 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
31
33
  helpText: getValidationErrorMessage({
32
34
  type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.beneficiaryAccountName) === null || _c === void 0 ? void 0 : _c.type,
33
35
  label: props.text.beneficiaryAccountNameLabel,
36
+ errorCode: (_e = (_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.beneficiaryAccountName) === null || _e === void 0 ? void 0 : _e.errorCode,
37
+ fieldName: "beneficiaryAccountName",
34
38
  }),
35
39
  })))),
36
40
  },
37
41
  1: {
38
- input: (index.h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.bankAccountType) && {
42
+ input: (index.h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((_f = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _f === void 0 ? void 0 : _f.bankAccountType) && {
39
43
  class: "error-input",
40
44
  helpText: getValidationErrorMessage({
41
- type: (_f = (_e = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _e === void 0 ? void 0 : _e.bankAccountType) === null || _f === void 0 ? void 0 : _f.type,
45
+ type: (_h = (_g = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _g === void 0 ? void 0 : _g.bankAccountType) === null || _h === void 0 ? void 0 : _h.type,
42
46
  label: props.text.bankAccountTypeLabel,
47
+ errorCode: (_k = (_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.bankAccountType) === null || _k === void 0 ? void 0 : _k.errorCode,
48
+ fieldName: "bankAccountType",
43
49
  }),
44
50
  })),
45
51
  index.h("sl-menu-item", { value: "CHECKING" }, props.text.checkingSelectItemLabel),
46
52
  index.h("sl-menu-item", { value: "SAVINGS" }, props.text.savingsSelectItemLabel))),
47
53
  },
48
54
  2: {
49
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((_g = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _g === void 0 ? void 0 : _g.bankAccountNumber) && {
55
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.bankAccountNumber) && {
50
56
  class: "error-input",
51
57
  helpText: getValidationErrorMessage({
52
- type: (_j = (_h = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _h === void 0 ? void 0 : _h.bankAccountNumber) === null || _j === void 0 ? void 0 : _j.type,
58
+ type: (_o = (_m = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _m === void 0 ? void 0 : _m.bankAccountNumber) === null || _o === void 0 ? void 0 : _o.type,
53
59
  label: props.text.bankAccountNumberLabel,
60
+ errorCode: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.bankAccountNumber) === null || _q === void 0 ? void 0 : _q.errorCode,
61
+ fieldName: "bankAccountNumber",
54
62
  }),
55
63
  })))),
56
64
  },
57
65
  3: {
58
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((_k = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _k === void 0 ? void 0 : _k.bankAccountNumber) && {
66
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.bankAccountNumber) && {
59
67
  class: "error-input",
60
68
  helpText: getValidationErrorMessage({
61
- type: (_m = (_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.bankAccountNumber) === null || _m === void 0 ? void 0 : _m.type,
69
+ type: (_t = (_s = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _s === void 0 ? void 0 : _s.bankAccountNumber) === null || _t === void 0 ? void 0 : _t.type,
62
70
  label: props.text.ibanLabel,
71
+ errorCode: (_v = (_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.bankAccountNumber) === null || _v === void 0 ? void 0 : _v.errorCode,
72
+ fieldName: "bankAccountNumber",
63
73
  }),
64
74
  })))),
65
75
  },
66
76
  4: {
67
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((_o = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _o === void 0 ? void 0 : _o.swiftCode) && {
77
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((_w = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _w === void 0 ? void 0 : _w.swiftCode) && {
68
78
  class: "error-input",
69
79
  helpText: getValidationErrorMessage({
70
- type: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.swiftCode) === null || _q === void 0 ? void 0 : _q.type,
80
+ type: (_y = (_x = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _x === void 0 ? void 0 : _x.swiftCode) === null || _y === void 0 ? void 0 : _y.type,
71
81
  label: props.text.swiftCodeLabel,
82
+ errorCode: (_0 = (_z = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _z === void 0 ? void 0 : _z.swiftCode) === null || _0 === void 0 ? void 0 : _0.errorCode,
83
+ fieldName: "swiftCode",
72
84
  }),
73
85
  })))),
74
86
  },
@@ -78,35 +90,41 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
78
90
  defaultMessage: props.text.routingCodeLabel,
79
91
  }, {
80
92
  bankCountry,
81
- }), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.routingCode) && {
93
+ }), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.routingCode) && {
82
94
  class: "error-input",
83
95
  helpText: getValidationErrorMessage({
84
- type: (_t = (_s = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _s === void 0 ? void 0 : _s.routingCode) === null || _t === void 0 ? void 0 : _t.type,
96
+ type: (_3 = (_2 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _2 === void 0 ? void 0 : _2.routingCode) === null || _3 === void 0 ? void 0 : _3.type,
85
97
  label: global.intl.formatMessage({
86
98
  id: "routingCodeErrorText",
87
99
  defaultMessage: props.text.routingCodeLabel,
88
100
  }, {
89
101
  bankCountry,
90
102
  }),
103
+ errorCode: (_5 = (_4 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _4 === void 0 ? void 0 : _4.routingCode) === null || _5 === void 0 ? void 0 : _5.errorCode,
104
+ fieldName: "routingCode",
91
105
  }),
92
106
  })))),
93
107
  },
94
108
  6: {
95
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.bankName) && {
109
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((_6 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _6 === void 0 ? void 0 : _6.bankName) && {
96
110
  class: "error-input",
97
111
  helpText: getValidationErrorMessage({
98
- type: (_w = (_v = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _v === void 0 ? void 0 : _v.bankName) === null || _w === void 0 ? void 0 : _w.type,
112
+ type: (_8 = (_7 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _7 === void 0 ? void 0 : _7.bankName) === null || _8 === void 0 ? void 0 : _8.type,
99
113
  label: props.text.bankNameLabel,
114
+ errorCode: (_10 = (_9 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _9 === void 0 ? void 0 : _9.bankName) === null || _10 === void 0 ? void 0 : _10.errorCode,
115
+ fieldName: "bankName",
100
116
  }),
101
117
  })))),
102
118
  },
103
119
  7: {
104
120
  input: [
105
- index.h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_x = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _x === void 0 ? void 0 : _x.beneficiaryClassification) && {
121
+ index.h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_11 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _11 === void 0 ? void 0 : _11.beneficiaryClassification) && {
106
122
  class: "error-input",
107
123
  helpText: getValidationErrorMessage({
108
- type: (_z = (_y = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _y === void 0 ? void 0 : _y.beneficiaryClassification) === null || _z === void 0 ? void 0 : _z.type,
124
+ type: (_13 = (_12 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _12 === void 0 ? void 0 : _12.beneficiaryClassification) === null || _13 === void 0 ? void 0 : _13.type,
109
125
  label: props.text.classificationLabel,
126
+ errorCode: (_15 = (_14 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _14 === void 0 ? void 0 : _14.beneficiaryClassification) === null || _15 === void 0 ? void 0 : _15.errorCode,
127
+ fieldName: "beneficiaryClassification",
110
128
  }),
111
129
  })),
112
130
  index.h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
@@ -117,106 +135,146 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
117
135
  defaultMessage: props.text.taxPayerIdLabel,
118
136
  }, {
119
137
  bankCountry,
120
- }), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.beneficiaryTaxPayerId) && {
138
+ }), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((_16 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _16 === void 0 ? void 0 : _16.beneficiaryTaxPayerId) && {
121
139
  class: "error-input",
122
140
  helpText: getValidationErrorMessage({
123
- type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.beneficiaryTaxPayerId) === null || _2 === void 0 ? void 0 : _2.type,
141
+ type: (_18 = (_17 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _17 === void 0 ? void 0 : _17.beneficiaryTaxPayerId) === null || _18 === void 0 ? void 0 : _18.type,
124
142
  label: props.text.taxPayerIdLabel,
143
+ errorCode: (_20 = (_19 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _19 === void 0 ? void 0 : _19.taxPayerId) === null || _20 === void 0 ? void 0 : _20.errorCode,
144
+ fieldName: "taxPayerId",
125
145
  }),
126
146
  }))),
127
147
  ],
128
148
  },
129
149
  8: {
130
- input: (index.h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_3 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _3 === void 0 ? void 0 : _3.beneficiaryClassification) && {
150
+ input: (index.h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_21 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _21 === void 0 ? void 0 : _21.beneficiaryClassification) && {
131
151
  class: "error-input",
132
152
  helpText: getValidationErrorMessage({
133
- type: (_5 = (_4 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _4 === void 0 ? void 0 : _4.beneficiaryClassification) === null || _5 === void 0 ? void 0 : _5.type,
153
+ type: (_23 = (_22 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _22 === void 0 ? void 0 : _22.beneficiaryClassification) === null || _23 === void 0 ? void 0 : _23.type,
134
154
  label: props.text.classificationCPFLabel,
155
+ errorCode: (_25 = (_24 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _24 === void 0 ? void 0 : _24.beneficiaryClassification) === null || _25 === void 0 ? void 0 : _25.errorCode,
156
+ fieldName: "beneficiaryClassification",
135
157
  }),
136
158
  })),
137
159
  index.h("sl-menu-item", { value: "CPF" }, "CPF"),
138
160
  index.h("sl-menu-item", { value: "CNPJ" }, "CNPJ"))),
139
161
  },
140
162
  9: {
141
- input: (index.h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((_6 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _6 === void 0 ? void 0 : _6.patronymicName) && {
163
+ input: (index.h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((_26 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _26 === void 0 ? void 0 : _26.patronymicName) && {
142
164
  class: "error-input",
143
165
  helpText: getValidationErrorMessage({
144
- type: (_8 = (_7 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _7 === void 0 ? void 0 : _7.patronymicName) === null || _8 === void 0 ? void 0 : _8.type,
166
+ type: (_28 = (_27 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _27 === void 0 ? void 0 : _27.patronymicName) === null || _28 === void 0 ? void 0 : _28.type,
145
167
  label: props.text.patronymicNameLabel,
168
+ errorCode: (_30 = (_29 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _29 === void 0 ? void 0 : _29.patronymicName) === null || _30 === void 0 ? void 0 : _30.errorCode,
169
+ fieldName: "patronymicName",
146
170
  }),
147
171
  })))),
148
172
  },
149
173
  10: {
150
- input: (index.h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((_9 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _9 === void 0 ? void 0 : _9.voCode) && {
174
+ input: (index.h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((_31 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _31 === void 0 ? void 0 : _31.voCode) && {
151
175
  class: "error-input",
152
176
  helpText: getValidationErrorMessage({
153
- type: (_11 = (_10 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _10 === void 0 ? void 0 : _10.voCode) === null || _11 === void 0 ? void 0 : _11.type,
177
+ type: (_33 = (_32 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _32 === void 0 ? void 0 : _32.voCode) === null || _33 === void 0 ? void 0 : _33.type,
154
178
  label: props.text.voCodeLabel,
179
+ errorCode: (_35 = (_34 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _34 === void 0 ? void 0 : _34.voCode) === null || _35 === void 0 ? void 0 : _35.errorCode,
180
+ fieldName: "voCode",
155
181
  }),
156
182
  })))),
157
183
  },
158
184
  11: {
159
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((_12 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _12 === void 0 ? void 0 : _12.agencyCode) && {
185
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((_36 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _36 === void 0 ? void 0 : _36.agencyCode) && {
160
186
  class: "error-input",
161
187
  helpText: getValidationErrorMessage({
162
- type: (_14 = (_13 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _13 === void 0 ? void 0 : _13.agencyCode) === null || _14 === void 0 ? void 0 : _14.type,
188
+ type: (_38 = (_37 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _37 === void 0 ? void 0 : _37.agencyCode) === null || _38 === void 0 ? void 0 : _38.type,
163
189
  label: props.text.agencyCodeLabel,
190
+ errorCode: (_40 = (_39 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _39 === void 0 ? void 0 : _39.agencyCode) === null || _40 === void 0 ? void 0 : _40.errorCode,
191
+ fieldName: "agencyCode",
164
192
  }),
165
193
  })))),
166
194
  },
167
195
  12: {
168
196
  input: [
169
- index.h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((_15 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _15 === void 0 ? void 0 : _15.bankAddress) && {
197
+ index.h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((_41 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _41 === void 0 ? void 0 : _41.bankAddress) && {
170
198
  class: "error-input",
171
199
  helpText: getValidationErrorMessage({
172
- type: (_17 = (_16 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _16 === void 0 ? void 0 : _16.bankAddress) === null || _17 === void 0 ? void 0 : _17.type,
200
+ type: (_43 = (_42 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _42 === void 0 ? void 0 : _42.bankAddress) === null || _43 === void 0 ? void 0 : _43.type,
173
201
  label: props.text.bankAddressLabel,
202
+ errorCode: (_45 = (_44 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _44 === void 0 ? void 0 : _44.bankAddress) === null || _45 === void 0 ? void 0 : _45.errorCode,
203
+ fieldName: "bankAddress",
174
204
  }),
175
205
  }))),
176
- index.h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((_18 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _18 === void 0 ? void 0 : _18.bankCity) && {
206
+ index.h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((_46 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _46 === void 0 ? void 0 : _46.bankCity) && {
177
207
  class: "error-input",
178
208
  helpText: getValidationErrorMessage({
179
- type: (_20 = (_19 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _19 === void 0 ? void 0 : _19.bankCity) === null || _20 === void 0 ? void 0 : _20.type,
209
+ type: (_48 = (_47 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _47 === void 0 ? void 0 : _47.bankCity) === null || _48 === void 0 ? void 0 : _48.type,
180
210
  label: props.text.bankCityLabel,
211
+ errorCode: (_50 = (_49 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _49 === void 0 ? void 0 : _49.bankCity) === null || _50 === void 0 ? void 0 : _50.errorCode,
212
+ fieldName: "bankCity",
181
213
  }),
182
214
  }))),
183
- index.h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((_21 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _21 === void 0 ? void 0 : _21.bankState) && {
215
+ index.h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((_51 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _51 === void 0 ? void 0 : _51.bankState) && {
184
216
  class: "error-input",
185
217
  helpText: getValidationErrorMessage({
186
- type: (_23 = (_22 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _22 === void 0 ? void 0 : _22.bankState) === null || _23 === void 0 ? void 0 : _23.type,
218
+ type: (_53 = (_52 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _52 === void 0 ? void 0 : _52.bankState) === null || _53 === void 0 ? void 0 : _53.type,
187
219
  label: props.text.bankStateLabel,
220
+ errorCode: (_55 = (_54 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _54 === void 0 ? void 0 : _54.bankState) === null || _55 === void 0 ? void 0 : _55.errorCode,
221
+ fieldName: "bankState",
188
222
  }),
189
223
  }))),
190
- index.h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((_24 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _24 === void 0 ? void 0 : _24.bankPostalCode) && {
224
+ index.h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((_56 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _56 === void 0 ? void 0 : _56.bankPostalCode) && {
191
225
  class: "error-input",
192
226
  helpText: getValidationErrorMessage({
193
- type: (_26 = (_25 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _25 === void 0 ? void 0 : _25.bankPostalCode) === null || _26 === void 0 ? void 0 : _26.type,
227
+ type: (_58 = (_57 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _57 === void 0 ? void 0 : _57.bankPostalCode) === null || _58 === void 0 ? void 0 : _58.type,
194
228
  label: props.text.bankPostalCodeLabel,
229
+ errorCode: (_60 = (_59 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _59 === void 0 ? void 0 : _59.bankPostalCode) === null || _60 === void 0 ? void 0 : _60.errorCode,
230
+ fieldName: "bankPostalCode",
195
231
  }),
196
232
  }))),
197
233
  ],
198
234
  },
199
235
  13: {
200
- input: (index.h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((_27 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _27 === void 0 ? void 0 : _27.branchCode) && {
236
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((_61 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _61 === void 0 ? void 0 : _61.branchCode) && {
201
237
  class: "error-input",
202
238
  helpText: getValidationErrorMessage({
203
- type: (_29 = (_28 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _28 === void 0 ? void 0 : _28.branchCode) === null || _29 === void 0 ? void 0 : _29.type,
239
+ type: (_63 = (_62 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _62 === void 0 ? void 0 : _62.branchCode) === null || _63 === void 0 ? void 0 : _63.type,
204
240
  label: props.text.branchCodeLabel,
241
+ errorCode: (_65 = (_64 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _64 === void 0 ? void 0 : _64.branchCode) === null || _65 === void 0 ? void 0 : _65.errorCode,
242
+ fieldName: "branchCode",
205
243
  }),
206
244
  })))),
207
245
  },
208
246
  14: {
209
- input: (index.h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_30 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _30 === void 0 ? void 0 : _30.beneficiaryClassification) && {
247
+ input: (index.h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_66 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _66 === void 0 ? void 0 : _66.beneficiaryClassification) && {
210
248
  class: "error-input",
211
249
  helpText: getValidationErrorMessage({
212
- type: (_32 = (_31 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _31 === void 0 ? void 0 : _31.beneficiaryClassification) === null || _32 === void 0 ? void 0 : _32.type,
250
+ type: (_68 = (_67 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _67 === void 0 ? void 0 : _67.beneficiaryClassification) === null || _68 === void 0 ? void 0 : _68.type,
213
251
  label: props.text.classificationLabel,
252
+ errorCode: (_70 = (_69 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _69 === void 0 ? void 0 : _69.beneficiaryClassification) === null || _70 === void 0 ? void 0 : _70.errorCode,
253
+ fieldName: "beneficiaryClassification",
214
254
  }),
215
255
  })),
216
256
  index.h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
217
257
  index.h("sl-menu-item", { value: "INDIVIDUAL" }, props.text.individualSelectItemLabel),
218
258
  index.h("sl-menu-item", { value: "FOREIGN" }, props.text.foreignSelectItemLabel))),
219
259
  },
260
+ 15: {
261
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.branchNameLabel, name: "/branchName", id: "branchName", key: "branchName", type: "text" }, (((_71 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _71 === void 0 ? void 0 : _71.branchName) && {
262
+ class: "error-input",
263
+ helpText: getValidationErrorMessage({
264
+ type: (_73 = (_72 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _72 === void 0 ? void 0 : _72.branchName) === null || _73 === void 0 ? void 0 : _73.type,
265
+ label: props.text.branchNameLabel,
266
+ }),
267
+ })))),
268
+ },
269
+ 16: {
270
+ input: (index.h("sl-input", Object.assign({ required: true, label: props.text.classificationCodeLabel, name: "/classificationCode", id: "classificationCode", key: "classificationCode", type: "text" }, (((_74 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _74 === void 0 ? void 0 : _74.classificationCode) && {
271
+ class: "error-input",
272
+ helpText: getValidationErrorMessage({
273
+ type: (_76 = (_75 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _75 === void 0 ? void 0 : _75.classificationCode) === null || _76 === void 0 ? void 0 : _76.type,
274
+ label: props.text.classificationCodeLabel,
275
+ }),
276
+ })))),
277
+ },
220
278
  };
221
279
  }
222
280
 
@@ -803,6 +861,95 @@ const paypalFeeMap = {
803
861
  const ACH_PAYMENT_METHOD = 3;
804
862
  const WIRE_PAYMENT_METHOD = 5;
805
863
  const PAYPAL_PAYMENT_METHOD = 7;
864
+ /**
865
+ * Maps GraphQL validation error field names to form field names.
866
+ */
867
+ const API_FIELD_TO_FORM_FIELD = {
868
+ // bankProvinceState → form uses bankState
869
+ bankProvinceState: "bankState",
870
+ };
871
+ /**
872
+ * Maps Impact API error code paths (from validationErrors[].errorPath) to short,
873
+ * readable frontend error codes used in the ICU select props.
874
+ */
875
+ const API_ERROR_PATH_TO_FRONTEND = {
876
+ // Beneficiary account name
877
+ "withdrawal.settings.error.empty_beneficiaryname": "empty",
878
+ "withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
879
+ "withdrawal.settings.error.numeric_beneficiaryname": "numeric",
880
+ "withdrawal_settings.error.beneficiaryname.size": "tooLong",
881
+ "withdrawal.settings.error.non_english_beneficiaryname": "nonEnglish",
882
+ "withdrawal_settings.error.business_beneficiaryname_match": "businessNameMismatch",
883
+ "withdrawal_settings.error.beneficiaryname_match": "nameMismatch",
884
+ "withdrawal_settings.error.business_checkpayeename_match": "businessPayeeMismatch",
885
+ "withdrawal_settings.error.checkpayeename_match": "payeeMismatch",
886
+ // Bank account number
887
+ "withdrawal.settings.error.accountnumber.empty": "empty",
888
+ "withdrawal.settings.error.accountnumber.uk": "invalidUk",
889
+ "withdrawal.settings.error.bankaccount.invalid": "invalid",
890
+ // IBAN
891
+ "withdrawal.settings.error.iban": "ibanEmpty",
892
+ "withdrawal.settings.error.iban.alphanumeric": "ibanAlphanumeric",
893
+ "withdrawal.settings.error.iban.invalid": "ibanInvalid",
894
+ "withdrawal.settings.error.iban.uk.country.mismatch": "ibanCountryMismatch",
895
+ // Routing code
896
+ "withdrawal.settings.error.bsbNumber": "invalidBsb",
897
+ "withdrawal.settings.error.sortcode": "invalidSortCode",
898
+ "withdrawal.settings.error.routingNumber": "empty",
899
+ "withdrawal.settings.error.routingcode": "invalid",
900
+ // SWIFT / BIC
901
+ "withdrawal.settings.error.bic": "empty",
902
+ "withdrawal.settings.error.bic.alphanumeric": "alphanumeric",
903
+ "withdrawal.settings.error.bic.invalid": "invalid",
904
+ // Bank account type
905
+ "global.error.invalid.accounttype": "empty",
906
+ // Bank name
907
+ "withdrawal.settings.error.bankName": "empty",
908
+ // Tax payer ID
909
+ "withdrawal.settings.error.taxPayerId": "empty",
910
+ "withdrawal.settings.error.taxPayerId.ar": "emptyAr",
911
+ "withdrawal.settings.error.taxPayerId.kr": "emptyKr",
912
+ "withdrawal.settings.error.taxPayerId.alphanumeric": "alphanumeric",
913
+ "withdrawal.settings.error.taxPayerId.alphanumeric.ar": "alphanumericAr",
914
+ "withdrawal.settings.error.taxPayerId.alphanumeric.kr": "alphanumericKr",
915
+ "withdrawal.settings.error.taxPayerId.invalid": "invalid",
916
+ "withdrawal.settings.error.taxPayerId.invalid.ar": "invalidAr",
917
+ "withdrawal.settings.error.taxPayerId.invalid.kr": "invalidKr",
918
+ "withdrawal.settings.error.taxPayerId.invalid.kzt": "invalidKzt",
919
+ "withdrawal.settings.error.taxPayerId.cnpj": "cnpjTooShort",
920
+ "withdrawal.settings.error.taxPayerId.cpf": "cpfTooShort",
921
+ // Patronymic name
922
+ "withdrawal.settings.error.patronymicName": "empty",
923
+ "withdrawal.settings.error.patronymicName.alphanumeric": "alphanumeric",
924
+ // VO code
925
+ "withdrawal.settings.error.voCode": "empty",
926
+ "withdrawal.settings.error.voCode.alphanumeric": "alphanumeric",
927
+ // Agency code
928
+ "withdrawal.settings.error.agencyCode": "empty",
929
+ "withdrawal.settings.error.agencyCode.alphanumeric": "alphanumeric",
930
+ "withdrawal.settings.error.agencyCode.length": "tooShort",
931
+ // Bank address fields
932
+ "withdrawal.settings.error.bankAddress": "empty",
933
+ "withdrawal.settings.error.bankCity": "empty",
934
+ "withdrawal.settings.error.bankProvinceState": "empty",
935
+ "withdrawal.settings.error.bankPostalCode": "empty",
936
+ // Branch code / name
937
+ "withdrawal.settings.error.branchCode": "invalid",
938
+ "withdrawal.settings.error.branchName": "empty",
939
+ // Classification code
940
+ "withdrawal.settings.error.classificationCode.invalid": "empty",
941
+ "withdrawal.settings.error.classificationCode.invalid.kzt": "invalidKzt",
942
+ // PayPal
943
+ "payment.error.email": "empty",
944
+ "payment.error.paypal_not_supported": "unsupportedCurrency",
945
+ "payment.error.email.invalid": "invalidEmail",
946
+ "payment.error.paypal_verification_incomplete": "verificationIncomplete",
947
+ // Payment schedule
948
+ "payment.error.no_threshold": "empty",
949
+ "payment.error.invalid_threshold": "invalid",
950
+ "payment.error.no_dayOfMonth": "empty",
951
+ "payment.error.invalid_dayOfMonth": "invalid",
952
+ };
806
953
  function getFormInputs({ bitset, formMap }) {
807
954
  // Convert bitset to binary representation
808
955
  const binary = bitset.toString(2).padStart(Object.keys(formMap).length, "0");
@@ -826,6 +973,7 @@ const SAVE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
826
973
  validationErrors {
827
974
  field
828
975
  message
976
+ code
829
977
  }
830
978
  }
831
979
  }
@@ -841,6 +989,7 @@ const UPDATE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
841
989
  validationErrors {
842
990
  field
843
991
  message
992
+ code
844
993
  }
845
994
  }
846
995
  }
@@ -1013,10 +1162,13 @@ function useBankingInfoForm(props) {
1013
1162
  else if (!success) {
1014
1163
  console.error("Validation failed: ", validationErrors);
1015
1164
  const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
1165
+ const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
1166
+ const errorCode = API_ERROR_PATH_TO_FRONTEND[error.errorPath] || error.errorPath;
1016
1167
  return {
1017
1168
  ...agg,
1018
- [error.field]: {
1169
+ [formField]: {
1019
1170
  type: "invalid",
1171
+ errorCode,
1020
1172
  },
1021
1173
  };
1022
1174
  }, {});
@@ -1027,7 +1179,7 @@ function useBankingInfoForm(props) {
1027
1179
  return;
1028
1180
  }
1029
1181
  // Fire form change event
1030
- window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
1182
+ window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
1031
1183
  await refetch();
1032
1184
  setStep("/dashboard");
1033
1185
  }
@@ -1312,11 +1464,19 @@ const BankingInfoForm = class {
1312
1464
  * @uiName Branch code field label
1313
1465
  */
1314
1466
  this.branchCodeLabel = "Branch code";
1467
+ /**
1468
+ * @uiName Branch name field label
1469
+ */
1470
+ this.branchNameLabel = "Branch name";
1315
1471
  /**
1316
1472
  * Label text for the classification input field
1317
1473
  * @uiName Classification field label
1318
1474
  */
1319
1475
  this.classificationLabel = "Classification";
1476
+ /**
1477
+ * @uiName Classification code field label
1478
+ */
1479
+ this.classificationCodeLabel = "KBE code";
1320
1480
  /**
1321
1481
  * @uiName Taxpayer ID field label
1322
1482
  */
@@ -1431,6 +1591,156 @@ const BankingInfoForm = class {
1431
1591
  * @uiName Information modal button text
1432
1592
  */
1433
1593
  this.modalButtonText = "I understand, update my information";
1594
+ // ──────────────────────────────────────────────────────────────────
1595
+ // Per-field validation error messages
1596
+ // Each prop uses ICU select on {errorCode} to pick the right message.
1597
+ // Error codes are short frontend keys mapped from the API error codes.
1598
+ // The `other` branch displays the raw API message directly via {errorCode},
1599
+ // which is already human-readable English (e.g. "Invalid Routing Code").
1600
+ // ──────────────────────────────────────────────────────────────────
1601
+ /**
1602
+ * Error messages for the beneficiary / account holder name field.
1603
+ * Supports error codes: empty, invalidCharacters, numeric, tooLong,
1604
+ * nonEnglish, businessNameMismatch, nameMismatch, businessPayeeMismatch, payeeMismatch
1605
+ * @uiName Beneficiary account name error
1606
+ * @uiWidget textArea
1607
+ */
1608
+ this.beneficiaryAccountNameError = "{errorCode, select, empty {Account holder name is required} invalidCharacters {Account holder name contains invalid characters} numeric {Account holder name cannot be purely numeric} tooLong {Account holder name must be 70 characters or fewer} nonEnglish {Account holder name must contain only English characters for this currency} businessNameMismatch {Beneficiary name must match the name on your tax document} nameMismatch {Beneficiary name must match the name on your tax document} businessPayeeMismatch {Payee name must match the name on your tax document} payeeMismatch {Payee name must match the name on your tax document} other {{errorCode}}}";
1609
+ /**
1610
+ * Error messages for the bank account number / IBAN field.
1611
+ * Supports error codes: empty, invalidUk, invalid, ibanEmpty,
1612
+ * ibanAlphanumeric, ibanInvalid, ibanCountryMismatch
1613
+ * @uiName Bank account number / IBAN error
1614
+ * @uiWidget textArea
1615
+ */
1616
+ this.bankAccountNumberError = "{errorCode, select, empty {Account number is required} invalidUk {Please enter a valid UK account number} invalid {Account number is invalid} ibanEmpty {IBAN is required} ibanAlphanumeric {IBAN must contain only letters and numbers} ibanInvalid {IBAN is invalid} ibanCountryMismatch {UK accounts must use an IBAN starting with GB} other {{errorCode}}}";
1617
+ /**
1618
+ * Error messages for the routing code / sort code / BSB field.
1619
+ * Supports error codes: invalidBsb, invalidSortCode, empty, invalid
1620
+ * @uiName Routing code error
1621
+ * @uiWidget textArea
1622
+ */
1623
+ this.routingCodeError = "{errorCode, select, invalidBsb {Please enter a valid BSB number} invalidSortCode {Please enter a valid sort code} empty {Routing number is required} invalid {Routing number is invalid} other {{errorCode}}}";
1624
+ /**
1625
+ * Error messages for the SWIFT / BIC code field.
1626
+ * Supports error codes: empty, alphanumeric, invalid
1627
+ * @uiName SWIFT code error
1628
+ * @uiWidget textArea
1629
+ */
1630
+ this.swiftCodeError = "{errorCode, select, empty {SWIFT/BIC code is required} alphanumeric {SWIFT/BIC code must contain only letters and numbers} invalid {SWIFT/BIC code is invalid} other {{errorCode}}}";
1631
+ /**
1632
+ * Error messages for the bank account type field.
1633
+ * Supports error codes: empty
1634
+ * @uiName Bank account type error
1635
+ * @uiWidget textArea
1636
+ */
1637
+ this.bankAccountTypeError = "{errorCode, select, empty {Bank account type is required} other {{errorCode}}}";
1638
+ /**
1639
+ * Error messages for the bank name field.
1640
+ * Supports error codes: empty
1641
+ * @uiName Bank name error
1642
+ * @uiWidget textArea
1643
+ */
1644
+ this.bankNameError = "{errorCode, select, empty {Bank name is required} other {{errorCode}}}";
1645
+ /**
1646
+ * Error messages for the tax payer ID / classification entity field.
1647
+ * Supports error codes: empty, emptyAr, emptyKr, alphanumeric, alphanumericAr,
1648
+ * alphanumericKr, invalid, invalidAr, invalidKr, invalidKzt, cnpjTooShort, cpfTooShort
1649
+ * @uiName Tax payer ID error
1650
+ * @uiWidget textArea
1651
+ */
1652
+ this.taxPayerIdError = "{errorCode, select, empty {Tax payer ID is required} emptyAr {CUIT/CUIL is required} emptyKr {Classification ID is required} alphanumeric {Tax payer ID must contain only letters and numbers} alphanumericAr {CUIT/CUIL must contain only letters and numbers} alphanumericKr {Classification ID must contain only letters and numbers} invalid {Tax payer ID is invalid} invalidAr {CUIT/CUIL must be 11 characters} invalidKr {Classification ID length is invalid} invalidKzt {Tax payer ID must be 12 characters for KZT} cnpjTooShort {CNPJ must be at least 14 characters} cpfTooShort {CPF must be at least 11 characters} other {{errorCode}}}";
1653
+ /**
1654
+ * Error messages for the patronymic name field.
1655
+ * Supports error codes: empty, alphanumeric
1656
+ * @uiName Patronymic name error
1657
+ * @uiWidget textArea
1658
+ */
1659
+ this.patronymicNameError = "{errorCode, select, empty {Patronymic name is required} alphanumeric {Patronymic name must contain only letters and numbers} other {{errorCode}}}";
1660
+ /**
1661
+ * Error messages for the VO code field.
1662
+ * Supports error codes: empty, alphanumeric
1663
+ * @uiName VO code error
1664
+ * @uiWidget textArea
1665
+ */
1666
+ this.voCodeError = "{errorCode, select, empty {VO code is required} alphanumeric {VO code must contain only letters and numbers} other {{errorCode}}}";
1667
+ /**
1668
+ * Error messages for the agency code field.
1669
+ * Supports error codes: empty, alphanumeric, tooShort
1670
+ * @uiName Agency code error
1671
+ * @uiWidget textArea
1672
+ */
1673
+ this.agencyCodeError = "{errorCode, select, empty {Agency code is required} alphanumeric {Agency code must contain only letters and numbers} tooShort {Agency code must be at least 5 characters} other {{errorCode}}}";
1674
+ /**
1675
+ * Error messages for the bank address field.
1676
+ * Supports error codes: empty
1677
+ * @uiName Bank address error
1678
+ * @uiWidget textArea
1679
+ */
1680
+ this.bankAddressError = "{errorCode, select, empty {Bank address is required} other {{errorCode}}}";
1681
+ /**
1682
+ * Error messages for the bank city field.
1683
+ * Supports error codes: empty
1684
+ * @uiName Bank city error
1685
+ * @uiWidget textArea
1686
+ */
1687
+ this.bankCityError = "{errorCode, select, empty {Bank city is required} other {{errorCode}}}";
1688
+ /**
1689
+ * Error messages for the bank province/state field.
1690
+ * Supports error codes: empty
1691
+ * @uiName Bank province/state error
1692
+ * @uiWidget textArea
1693
+ */
1694
+ this.bankStateError = "{errorCode, select, empty {Bank province/state is required} other {{errorCode}}}";
1695
+ /**
1696
+ * Error messages for the bank postal code field.
1697
+ * Supports error codes: empty
1698
+ * @uiName Bank postal code error
1699
+ * @uiWidget textArea
1700
+ */
1701
+ this.bankPostalCodeError = "{errorCode, select, empty {Bank postal code is required} other {{errorCode}}}";
1702
+ /**
1703
+ * Error messages for the branch code field.
1704
+ * Supports error codes: invalid
1705
+ * @uiName Branch code error
1706
+ * @uiWidget textArea
1707
+ */
1708
+ this.branchCodeError = "{errorCode, select, invalid {Branch code is invalid} other {{errorCode}}}";
1709
+ /**
1710
+ * Error messages for the branch name field.
1711
+ * Supports error codes: empty
1712
+ * @uiName Branch name error
1713
+ * @uiWidget textArea
1714
+ */
1715
+ this.branchNameError = "{errorCode, select, empty {Branch name is required} other {{errorCode}}}";
1716
+ /**
1717
+ * Error messages for the classification code field.
1718
+ * Supports error codes: empty, invalidKzt
1719
+ * @uiName Classification code error
1720
+ * @uiWidget textArea
1721
+ */
1722
+ this.classificationCodeError = "{errorCode, select, empty {Classification code is required} invalidKzt {Classification code must be exactly 2 characters} other {{errorCode}}}";
1723
+ /**
1724
+ * Error messages for the PayPal email field.
1725
+ * Supports error codes: empty, unsupportedCurrency, invalidEmail, verificationIncomplete
1726
+ * @uiName PayPal email error
1727
+ * @uiWidget textArea
1728
+ */
1729
+ this.paypalEmailError = "{errorCode, select, empty {PayPal email is required} unsupportedCurrency {PayPal is not supported for this currency} invalidEmail {Please enter a valid email address} verificationIncomplete {PayPal verification is not complete} other {{errorCode}}}";
1730
+ /**
1731
+ * Error messages for the payment threshold field.
1732
+ * Supports error codes: empty, invalid
1733
+ * @uiName Payment threshold error
1734
+ * @uiWidget textArea
1735
+ */
1736
+ this.paymentThresholdError = "{errorCode, select, empty {Payment threshold is required} invalid {Payment threshold is invalid} other {{errorCode}}}";
1737
+ /**
1738
+ * Error messages for the payment day field.
1739
+ * Supports error codes: empty, invalid
1740
+ * @uiName Payment day error
1741
+ * @uiWidget textArea
1742
+ */
1743
+ this.paymentDayError = "{errorCode, select, empty {Payment day is required} invalid {Payment day must be the 1st or the 15th} other {{errorCode}}}";
1434
1744
  domContextHooks_module.h$1(this);
1435
1745
  }
1436
1746
  disconnectedCallback() { }
@@ -1444,17 +1754,54 @@ const BankingInfoForm = class {
1444
1754
  loadingErrorAlertDescription: props.loadingErrorAlertDescription,
1445
1755
  loadingErrorAlertHeader: props.loadingErrorAlertHeader,
1446
1756
  },
1757
+ errorMessages: {
1758
+ beneficiaryAccountName: props.beneficiaryAccountNameError,
1759
+ bankAccountNumber: props.bankAccountNumberError,
1760
+ routingCode: props.routingCodeError,
1761
+ swiftCode: props.swiftCodeError,
1762
+ bankAccountType: props.bankAccountTypeError,
1763
+ bankName: props.bankNameError,
1764
+ taxPayerId: props.taxPayerIdError,
1765
+ patronymicName: props.patronymicNameError,
1766
+ voCode: props.voCodeError,
1767
+ agencyCode: props.agencyCodeError,
1768
+ bankAddress: props.bankAddressError,
1769
+ bankCity: props.bankCityError,
1770
+ bankState: props.bankStateError,
1771
+ bankPostalCode: props.bankPostalCodeError,
1772
+ branchCode: props.branchCodeError,
1773
+ branchName: props.branchNameError,
1774
+ beneficiaryClassification: props.classificationCodeError,
1775
+ paypalEmailAddress: props.paypalEmailError,
1776
+ paymentThreshold: props.paymentThresholdError,
1777
+ paymentDay: props.paymentDayError,
1778
+ },
1447
1779
  };
1448
1780
  }
1449
1781
  render() {
1450
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
1782
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
1451
1783
  const props = index_module.isDemo()
1452
1784
  ? useDemoBankingInfoForm(this)
1453
1785
  : useBankingInfoForm(this);
1454
1786
  const { errors } = props.states.formState;
1455
1787
  const fieldRequiredError = this.fieldRequiredError;
1456
1788
  const fieldInvalidError = this.fieldInvalidError;
1457
- function getValidationErrorMessage({ type, label, }) {
1789
+ function getValidationErrorMessage({ type, label, errorCode, fieldName, }) {
1790
+ var _a;
1791
+ // If we have a specific error code from the API, try to use
1792
+ // the per-field ICU error message template for a rich message
1793
+ if (type === "invalid" && errorCode && fieldName) {
1794
+ const errorTemplate = (_a = props.text.errorMessages) === null || _a === void 0 ? void 0 : _a[fieldName];
1795
+ if (errorTemplate) {
1796
+ return global.intl.formatMessage({
1797
+ id: `fieldError-${fieldName}-${errorCode}`,
1798
+ defaultMessage: errorTemplate,
1799
+ }, {
1800
+ errorCode,
1801
+ fieldName: label,
1802
+ });
1803
+ }
1804
+ }
1458
1805
  if (type === "required") {
1459
1806
  return global.intl.formatMessage({
1460
1807
  id: `requiredText-${label}`,
@@ -1537,37 +1884,45 @@ const BankingInfoForm = class {
1537
1884
  helpText: getValidationErrorMessage({
1538
1885
  type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.bankCountry) === null || _c === void 0 ? void 0 : _c.type,
1539
1886
  label: props.text.bankLocationLabel,
1887
+ errorCode: (_e = (_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.bankCountry) === null || _e === void 0 ? void 0 : _e.errorCode,
1888
+ fieldName: "bankCountry",
1540
1889
  }),
1541
1890
  })), index.h("sl-input", { disabled: props.states.saveLoading, class: sheet.classes.SearchInput, placeholder: this.searchForCountryText, onKeyDown: (e) => {
1542
1891
  // Stop shoelace intercepting key presses
1543
1892
  e.stopPropagation();
1544
1893
  }, "onSl-input": (e) => {
1545
1894
  props.callbacks.setCountrySearch(e.target.value);
1546
- } }), (_d = props.states.countries) === null || _d === void 0 ? void 0 :
1547
- _d.map((country) => {
1895
+ } }), (_f = props.states.countries) === null || _f === void 0 ? void 0 :
1896
+ _f.map((country) => {
1548
1897
  return (index.h("sl-menu-item", { value: country.countryCode }, country.displayName));
1549
- }), (_f = (_e = props.states) === null || _e === void 0 ? void 0 : _e.allCountries) === null || _f === void 0 ? void 0 :
1550
- _f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName))))),
1898
+ }), (_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.allCountries) === null || _h === void 0 ? void 0 :
1899
+ _h.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName))))),
1551
1900
  paymentMethodSlot: (index.h("sl-input", { key: "paymentMethod", label: props.text.paymentMethod, placeholder: props.states.paymentMethodFeeLabel, disabled: true })),
1552
- paymentThresholdSelectSlot: (index.h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.formState) === null || _h === void 0 ? void 0 : _h.paymentThreshold) || "" }, (((_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.paymentThreshold) && {
1901
+ paymentThresholdSelectSlot: (index.h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((_k = (_j = props.states) === null || _j === void 0 ? void 0 : _j.formState) === null || _k === void 0 ? void 0 : _k.paymentThreshold) || "" }, (((_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.paymentThreshold) && {
1553
1902
  class: "error-input",
1554
1903
  helpText: getValidationErrorMessage({
1555
- type: (_l = (_k = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _k === void 0 ? void 0 : _k.paymentThreshold) === null || _l === void 0 ? void 0 : _l.type,
1904
+ type: (_o = (_m = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _m === void 0 ? void 0 : _m.paymentThreshold) === null || _o === void 0 ? void 0 : _o.type,
1556
1905
  label: props.text.paymentThresholdSelectLabel,
1906
+ errorCode: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentThreshold) === null || _q === void 0 ? void 0 : _q.errorCode,
1907
+ fieldName: "paymentThreshold",
1557
1908
  }),
1558
1909
  })), props.states.thresholds.map((t) => (index.h("sl-menu-item", { value: t }, `${props.states.currency}${t}`))))),
1559
- paymentFixedDaySelectSlot: (index.h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((_o = (_m = props.states) === null || _m === void 0 ? void 0 : _m.formState) === null || _o === void 0 ? void 0 : _o.paymentDay) || "", name: "/paymentDay", id: "paymentDay" }, (((_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentDay) && {
1910
+ paymentFixedDaySelectSlot: (index.h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((_s = (_r = props.states) === null || _r === void 0 ? void 0 : _r.formState) === null || _s === void 0 ? void 0 : _s.paymentDay) || "", name: "/paymentDay", id: "paymentDay" }, (((_t = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _t === void 0 ? void 0 : _t.paymentDay) && {
1560
1911
  class: "error-input",
1561
1912
  helpText: getValidationErrorMessage({
1562
- type: (_r = (_q = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _q === void 0 ? void 0 : _q.paymentDay) === null || _r === void 0 ? void 0 : _r.type,
1913
+ type: (_v = (_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.paymentDay) === null || _v === void 0 ? void 0 : _v.type,
1563
1914
  label: props.text.paymentDaySelectLabel,
1915
+ errorCode: (_x = (_w = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _w === void 0 ? void 0 : _w.paymentDay) === null || _x === void 0 ? void 0 : _x.errorCode,
1916
+ fieldName: "paymentDay",
1564
1917
  }),
1565
1918
  })), index.h("sl-menu-item", { value: "1" }, props.text.paymentDayFirstOfMonthLabelText), index.h("sl-menu-item", { value: "15" }, props.text.paymentDayFifteenthOfMonthLabelText))),
1566
- paypalInputSlot: (index.h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((_t = (_s = props.states) === null || _s === void 0 ? void 0 : _s.formState) === null || _t === void 0 ? void 0 : _t.paypalEmailAddress) || "", label: props.text.payPalInputLabel, key: "paypalEmailAddress", name: "/paypalEmailAddress", id: "paypalEmailAddress", type: "text" }, (((_w = (_v = (_u = props.states.formState) === null || _u === void 0 ? void 0 : _u.errors) === null || _v === void 0 ? void 0 : _v.inputErrors) === null || _w === void 0 ? void 0 : _w.paypalEmailAddress) && {
1919
+ paypalInputSlot: (index.h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((_z = (_y = props.states) === null || _y === void 0 ? void 0 : _y.formState) === null || _z === void 0 ? void 0 : _z.paypalEmailAddress) || "", label: props.text.payPalInputLabel, key: "paypalEmailAddress", name: "/paypalEmailAddress", id: "paypalEmailAddress", type: "text" }, (((_2 = (_1 = (_0 = props.states.formState) === null || _0 === void 0 ? void 0 : _0.errors) === null || _1 === void 0 ? void 0 : _1.inputErrors) === null || _2 === void 0 ? void 0 : _2.paypalEmailAddress) && {
1567
1920
  class: "error-input",
1568
1921
  helpText: getValidationErrorMessage({
1569
- type: (_0 = (_z = (_y = (_x = props.states.formState) === null || _x === void 0 ? void 0 : _x.errors) === null || _y === void 0 ? void 0 : _y.inputErrors) === null || _z === void 0 ? void 0 : _z.paypalEmailAddress) === null || _0 === void 0 ? void 0 : _0.type,
1922
+ type: (_6 = (_5 = (_4 = (_3 = props.states.formState) === null || _3 === void 0 ? void 0 : _3.errors) === null || _4 === void 0 ? void 0 : _4.inputErrors) === null || _5 === void 0 ? void 0 : _5.paypalEmailAddress) === null || _6 === void 0 ? void 0 : _6.type,
1570
1923
  label: props.text.payPalInputLabel,
1924
+ errorCode: (_10 = (_9 = (_8 = (_7 = props.states.formState) === null || _7 === void 0 ? void 0 : _7.errors) === null || _8 === void 0 ? void 0 : _8.inputErrors) === null || _9 === void 0 ? void 0 : _9.paypalEmailAddress) === null || _10 === void 0 ? void 0 : _10.errorCode,
1925
+ fieldName: "paypalEmailAddress",
1571
1926
  }),
1572
1927
  })))),
1573
1928
  } })));
@@ -1716,7 +2071,7 @@ function useDocusignForm(props) {
1716
2071
  const [showExitButton, setShowExitButton] = domContextHooks_module.useState(false);
1717
2072
  const [showModal, setShowModal] = domContextHooks_module.useState(true);
1718
2073
  // Only look at current document if it's valid (same as required type)
1719
- const existingDocumentType = data.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
2074
+ const existingDocumentType = utils$1.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
1720
2075
  ? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
1721
2076
  const actualDocumentType = existingDocumentType ||
1722
2077
  getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
@@ -1774,7 +2129,7 @@ function useDocusignForm(props) {
1774
2129
  if (!result.completeImpactPublisherTaxDocument.success)
1775
2130
  throw new Error();
1776
2131
  // Fire form change event
1777
- window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
2132
+ window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
1778
2133
  setShowExitButton(true);
1779
2134
  }
1780
2135
  catch (e) {
@@ -1814,7 +2169,7 @@ function useDocusignForm(props) {
1814
2169
  },
1815
2170
  docusignStatus,
1816
2171
  documentType: actualDocumentType,
1817
- documentTypeString: data.taxTypeToName(actualDocumentType),
2172
+ documentTypeString: utils$1.taxTypeToName(actualDocumentType),
1818
2173
  showExitButton,
1819
2174
  showModal,
1820
2175
  },
@@ -2517,252 +2872,6 @@ const IndirectTaxFormView = (props) => {
2517
2872
  index.h("sl-button", { class: classes.SecondaryButton, type: "text", disabled: states.disabled, onClick: callbacks.onBack, exportparts: "base: secondarybutton-base" }, text.backButton))))));
2518
2873
  };
2519
2874
 
2520
- const CONNECT_PARTNER = index_module.dist.gql `
2521
- mutation createImpactConnection($vars: ImpactConnectionInput!) {
2522
- createImpactConnection(impactConnectionInput: $vars) {
2523
- success
2524
- validationErrors {
2525
- field
2526
- message
2527
- }
2528
- user {
2529
- id
2530
- accountId
2531
- impactConnection {
2532
- connected
2533
- publisher {
2534
- brandedSignup
2535
- requiredTaxDocumentType
2536
- currentTaxDocument {
2537
- type
2538
- status
2539
- }
2540
- }
2541
- }
2542
- }
2543
- }
2544
- }
2545
- `;
2546
- function getOption(countries, countryCode) {
2547
- if (!countries)
2548
- return;
2549
- if (countries.find((c) => c.countryCode === countryCode)) {
2550
- return "otherRegion";
2551
- }
2552
- else {
2553
- return "notRegistered";
2554
- }
2555
- }
2556
- function useIndirectTaxForm(props) {
2557
- var _a, _b, _c, _d, _e;
2558
- const user = index_module.J();
2559
- const locale = index_module.L();
2560
- const formRef = domContextHooks_module.useRef(null);
2561
- const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
2562
- const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
2563
- const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
2564
- const userForm = index_module.Fn(data.USER_FORM_CONTEXT_NAMESPACE);
2565
- const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
2566
- const { data: _countriesRes, loading: countriesLoading } = index_module.$n(data.COUNTRIES_QUERY_NAMESPACE);
2567
- const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
2568
- const _countries = domContextHooks_module.useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) => data.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
2569
- const [loading, setLoading] = domContextHooks_module.useState(false);
2570
- const [formState, setFormState] = domContextHooks_module.useState({});
2571
- const [errors, setErrors] = domContextHooks_module.useState({});
2572
- const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
2573
- const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(_countries || []);
2574
- const [option, setOption] = domContextHooks_module.useState("notRegistered");
2575
- const publisher = (_c = (_b = userData === null || userData === void 0 ? void 0 : userData.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher;
2576
- domContextHooks_module.useEffect(() => {
2577
- // reset redirect hash
2578
- window.location.hash = "";
2579
- }, []);
2580
- domContextHooks_module.useEffect(() => {
2581
- var _a;
2582
- if (!((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxCountryCode))
2583
- return;
2584
- const _option = getOption(_countries, publisher.taxInformation.indirectTaxCountryCode);
2585
- setOption(_option);
2586
- }, [publisher, _countries]);
2587
- domContextHooks_module.useEffect(() => {
2588
- if (countrySearch.trim() === "") {
2589
- setFilteredCountries(_countries || []);
2590
- }
2591
- else {
2592
- setFilteredCountries((_countries === null || _countries === void 0 ? void 0 : _countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase()))) || []);
2593
- }
2594
- }, [countrySearch, _countries]);
2595
- domContextHooks_module.useEffect(() => {
2596
- var _a, _b;
2597
- const user = userData === null || userData === void 0 ? void 0 : userData.user;
2598
- if (!user)
2599
- return;
2600
- if ((_b = (_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.taxInformation) {
2601
- setFormState({
2602
- province: user.impactConnection.publisher.taxInformation.indirectTaxRegion,
2603
- subRegion: user.impactConnection.publisher.taxInformation.indirectTaxRegion,
2604
- hasQst: !!user.impactConnection.publisher.taxInformation.additionalTaxId,
2605
- qstNumber: user.impactConnection.publisher.taxInformation.additionalTaxId,
2606
- hasSubRegionTaxNumber: !!user.impactConnection.publisher.taxInformation.withholdingTaxId,
2607
- subRegionTaxNumber: user.impactConnection.publisher.taxInformation.withholdingTaxId,
2608
- selectedRegion: user.impactConnection.publisher.taxInformation.indirectTaxCountryCode,
2609
- indirectTaxNumber: user.impactConnection.publisher.taxInformation.indirectTaxId,
2610
- });
2611
- }
2612
- else {
2613
- setFormState({
2614
- selectedRegion: (user === null || user === void 0 ? void 0 : user.countryCode) || (userForm === null || userForm === void 0 ? void 0 : userForm.countryCode),
2615
- });
2616
- }
2617
- }, [userData, userForm]);
2618
- const onFormChange = (field, e) => {
2619
- var _a, _b;
2620
- const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
2621
- if (!value)
2622
- console.error("Could not detect select change");
2623
- setFormState((p) => ({ ...p, [field]: value }));
2624
- };
2625
- async function connectPartner(formData) {
2626
- var _a, _b, _c, _d, _e;
2627
- const vars = {
2628
- user: {
2629
- id: user.id,
2630
- accountId: user.accountId,
2631
- },
2632
- firstName: userForm.firstName,
2633
- lastName: userForm.lastName,
2634
- countryCode: userForm.countryCode,
2635
- currency: userForm.currency,
2636
- address: userForm.address,
2637
- city: userForm.city,
2638
- state: userForm.state,
2639
- postalCode: userForm.postalCode,
2640
- phoneNumber: userForm.phoneNumber,
2641
- phoneNumberCountryCode: userForm.phoneNumberCountryCode,
2642
- indirectTaxCountryCode: formData.selectedRegion,
2643
- indirectTaxRegion: formData.province || formData.subRegion,
2644
- indirectTaxId: formData.indirectTaxNumber,
2645
- additionalTaxId: formData.qstNumber,
2646
- withholdingTaxId: formData.subRegionTaxNumber,
2647
- };
2648
- const result = await connectImpactPartner({
2649
- vars,
2650
- });
2651
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
2652
- throw new Error();
2653
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
2654
- // Output backend errors to console for now
2655
- console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
2656
- throw new Error();
2657
- }
2658
- await refetch();
2659
- const resultPublisher = (_e = (_d = (_c = result
2660
- .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
2661
- const hasValidCurrentDocument = data.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
2662
- // Fire form change event
2663
- window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
2664
- return {
2665
- resultPublisher,
2666
- hasValidCurrentDocument,
2667
- };
2668
- }
2669
- const onSubmit = async (event) => {
2670
- if (!option) {
2671
- setErrors({ taxDetails: true });
2672
- return;
2673
- }
2674
- let formData = { taxOption: option };
2675
- let validationErrors = {};
2676
- const controls = event.target.getFormControls();
2677
- controls.forEach((control) => {
2678
- if (!control.name || !control.id)
2679
- return;
2680
- if (option === "notRegistered")
2681
- return; // Don't include fields for notRegistered option
2682
- const key = control.name;
2683
- const value = control.value;
2684
- jsonpointer.jsonpointer.set(formData, key, value);
2685
- if (control.required && !value) {
2686
- jsonpointer.jsonpointer.set(validationErrors, key, true);
2687
- }
2688
- });
2689
- setErrors(validationErrors);
2690
- if (Object.keys(validationErrors).length) {
2691
- return;
2692
- }
2693
- setLoading(true);
2694
- try {
2695
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
2696
- if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
2697
- !hasValidCurrentDocument) {
2698
- // Go to docusign form
2699
- setStep("/3");
2700
- }
2701
- else {
2702
- if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
2703
- // Go to banking information form
2704
- setStep("/4");
2705
- }
2706
- else {
2707
- // Go right to the dashboard
2708
- setStep("/dashboard");
2709
- }
2710
- }
2711
- }
2712
- catch (e) {
2713
- setErrors({ general: true });
2714
- }
2715
- finally {
2716
- setLoading(false);
2717
- }
2718
- };
2719
- const onBack = () => {
2720
- setStep(context.overrideBackStep || "/1");
2721
- };
2722
- return {
2723
- states: {
2724
- step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
2725
- hideSteps: context.hideSteps,
2726
- disabled: loading || countriesLoading || connectLoading,
2727
- loading: loading || connectLoading || countriesLoading,
2728
- isPartner: !!((_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
2729
- loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
2730
- formState: {
2731
- checked: option,
2732
- errors,
2733
- },
2734
- },
2735
- callbacks: {
2736
- onBack,
2737
- onSubmit,
2738
- onFormChange,
2739
- onChange: setOption,
2740
- setCountrySearch,
2741
- onQstToggle: () => setFormState((p) => ({ ...p, hasQst: !p.hasQst })),
2742
- onSpainToggle: () => setFormState((p) => ({
2743
- ...p,
2744
- hasSubRegionTaxNumber: !p.hasSubRegionTaxNumber,
2745
- })),
2746
- },
2747
- data: {
2748
- esRegions: sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS,
2749
- countries: filteredCountries,
2750
- allCountries: _countries,
2751
- provinces: sqmUserInfoFormView.INDIRECT_TAX_PROVINCES,
2752
- },
2753
- text: props.getTextProps(),
2754
- refs: {
2755
- formRef,
2756
- },
2757
- slotProps: {
2758
- formState: {
2759
- ...formState,
2760
- errors,
2761
- },
2762
- },
2763
- };
2764
- }
2765
-
2766
2875
  const IndirectTaxForm = class {
2767
2876
  constructor(hostRef) {
2768
2877
  index.registerInstance(this, hostRef);
@@ -2949,7 +3058,7 @@ const IndirectTaxForm = class {
2949
3058
  render() {
2950
3059
  const props = index_module.isDemo()
2951
3060
  ? useDemoIndirectTaxForm(this)
2952
- : useIndirectTaxForm(this);
3061
+ : useIndirectTaxForm.useIndirectTaxForm(this);
2953
3062
  const registeredInDifferentCountryDetailsSlot = (index.h(sqmUserInfoFormView.OtherRegionSlotView, { states: {
2954
3063
  hide: props.states.formState.checked !== "otherRegion",
2955
3064
  disabled: props.states.disabled || props.states.isPartner,
@@ -3009,7 +3118,7 @@ function useDemoIndirectTaxForm(props) {
3009
3118
  setCountrySearch: (c) => console.log(c),
3010
3119
  },
3011
3120
  data: {
3012
- esRegions: sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS,
3121
+ esRegions: utils$1.INDIRECT_TAX_SPAIN_REGIONS,
3013
3122
  countries: [
3014
3123
  {
3015
3124
  countryCode: "CA",
@@ -3028,7 +3137,7 @@ function useDemoIndirectTaxForm(props) {
3028
3137
  displayName: "United States",
3029
3138
  },
3030
3139
  ],
3031
- provinces: sqmUserInfoFormView.INDIRECT_TAX_PROVINCES,
3140
+ provinces: utils$1.INDIRECT_TAX_PROVINCES,
3032
3141
  },
3033
3142
  text: props.getTextProps(),
3034
3143
  refs: {
@@ -4448,12 +4557,12 @@ function getSubRegionName(regionCode) {
4448
4557
  return "";
4449
4558
  // Impact adds an underscore to some regions
4450
4559
  const standardCode = regionCode.replace("_", "");
4451
- const regions = [...sqmUserInfoFormView.INDIRECT_TAX_PROVINCES, ...sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS];
4560
+ const regions = [...utils$1.INDIRECT_TAX_PROVINCES, ...utils$1.INDIRECT_TAX_SPAIN_REGIONS];
4452
4561
  return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
4453
4562
  }
4454
4563
  function getIndirectTaxType(taxInformation) {
4455
4564
  var _a;
4456
- const regions = [...sqmUserInfoFormView.INDIRECT_TAX_PROVINCES, ...sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS];
4565
+ const regions = [...utils$1.INDIRECT_TAX_PROVINCES, ...utils$1.INDIRECT_TAX_SPAIN_REGIONS];
4457
4566
  if (taxInformation === null || taxInformation === void 0 ? void 0 : taxInformation.indirectTaxRegion) {
4458
4567
  const standardRegion = taxInformation.indirectTaxRegion.replace("_", "");
4459
4568
  const taxType = (_a = regions.find((r) => r.regionCode === standardRegion)) === null || _a === void 0 ? void 0 : _a.taxType;
@@ -4473,7 +4582,7 @@ const useTaxAndCashDashboard = (props) => {
4473
4582
  const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
4474
4583
  const setContext = index_module.En(data.TAX_FORM_CONTEXT_NAMESPACE);
4475
4584
  const [showDialog, setShowDialog] = domContextHooks_module.useState(false);
4476
- const { render, loading: veriffLoading, errors: veriffErrors, } = usePayoutStatus.useVeriffApp();
4585
+ const { render, loading: veriffLoading, errors: veriffErrors, } = useIndirectTaxForm.useVeriffApp();
4477
4586
  const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
4478
4587
  const locale = index_module.L();
4479
4588
  domContextHooks_module.useEffect(() => {
@@ -4512,13 +4621,13 @@ const useTaxAndCashDashboard = (props) => {
4512
4621
  });
4513
4622
  setStep("/3");
4514
4623
  };
4515
- const provinceName = (_d = sqmUserInfoFormView.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
4516
- const payoutStatus = data$1 ? usePayoutStatus.getStatus(data$1) : null;
4624
+ const provinceName = (_d = utils$1.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
4625
+ const payoutStatus = data$1 ? useIndirectTaxForm.getStatus(data$1) : null;
4517
4626
  domContextHooks_module.useEffect(() => {
4518
4627
  const cb = () => refetch();
4519
- window.addEventListener(usePayoutStatus.VERIFF_COMPLETE_EVENT_KEY, cb);
4628
+ window.addEventListener(useIndirectTaxForm.VERIFF_COMPLETE_EVENT_KEY, cb);
4520
4629
  return () => {
4521
- window.removeEventListener(usePayoutStatus.VERIFF_COMPLETE_EVENT_KEY, cb);
4630
+ window.removeEventListener(useIndirectTaxForm.VERIFF_COMPLETE_EVENT_KEY, cb);
4522
4631
  };
4523
4632
  }, []);
4524
4633
  const enforceUsTaxComplianceOption = (_e = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _e === void 0 ? void 0 : _e.enforceUsTaxCompliance;
@@ -4527,7 +4636,7 @@ const useTaxAndCashDashboard = (props) => {
4527
4636
  dateSubmitted,
4528
4637
  documentType,
4529
4638
  canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
4530
- documentTypeString: data.taxTypeToName(documentType),
4639
+ documentTypeString: utils$1.taxTypeToName(documentType),
4531
4640
  status: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _f === void 0 ? void 0 : _f.status,
4532
4641
  subRegion: getSubRegionName((_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.indirectTaxRegion),
4533
4642
  subRegionTaxNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.withholdingTaxId,
@@ -5036,7 +5145,8 @@ function useUserInfoForm(props) {
5036
5145
  const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
5037
5146
  const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
5038
5147
  const user = index_module.J();
5039
- const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
5148
+ const [connectImpactPartner, { loading: connectLoading }] = index_module.$e(useIndirectTaxForm.CONNECT_PARTNER);
5149
+ const [completeImpactPartner, { loading: completeLoading }] = index_module.$e(useIndirectTaxForm.COMPLETE_PARTNER);
5040
5150
  const { data: tenantData } = index_module.wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
5041
5151
  const { data: data$1, loading, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
5042
5152
  const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
@@ -5058,7 +5168,7 @@ function useUserInfoForm(props) {
5058
5168
  if (!user || step !== "/1")
5059
5169
  return;
5060
5170
  // If form already filled out, skip initialising it
5061
- if (data.objectIsFull(userFormContext))
5171
+ if (utils$1.objectIsFull(userFormContext))
5062
5172
  return;
5063
5173
  // Prefer MI email if it was verified before this
5064
5174
  const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
@@ -5071,8 +5181,13 @@ function useUserInfoForm(props) {
5071
5181
  lastName: user.impactConnection.user.lastName,
5072
5182
  countryCode: user.impactConnection.publisher.countryCode,
5073
5183
  currency: user.impactConnection.publisher.currency,
5074
- phoneNumberCountryCode: user.impactConnection.publisher.phoneNumberCountryCode,
5075
- phoneNumber: user.impactConnection.publisher.phoneNumber,
5184
+ // when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "0000000" and the phoneNumberCountryCode to "DZ"
5185
+ phoneNumberCountryCode: user.impactConnection.publisher.phoneNumber === "0000000"
5186
+ ? null
5187
+ : user.impactConnection.publisher.phoneNumberCountryCode,
5188
+ phoneNumber: user.impactConnection.publisher.phoneNumber === "0000000"
5189
+ ? null
5190
+ : user.impactConnection.publisher.phoneNumber,
5076
5191
  address: user.impactConnection.publisher.billingAddress,
5077
5192
  city: user.impactConnection.publisher.billingCity,
5078
5193
  state: user.impactConnection.publisher.billingState,
@@ -5143,7 +5258,7 @@ function useUserInfoForm(props) {
5143
5258
  }
5144
5259
  }, [currencySearch, currencies]);
5145
5260
  async function connectPartner(formData) {
5146
- var _a, _b, _c, _d, _e;
5261
+ var _a, _b, _c, _d, _e, _f;
5147
5262
  const vars = {
5148
5263
  user: {
5149
5264
  id: user.id,
@@ -5160,23 +5275,34 @@ function useUserInfoForm(props) {
5160
5275
  phoneNumber: formData.phoneNumber,
5161
5276
  phoneNumberCountryCode: formData.phoneNumberCountryCode,
5162
5277
  };
5163
- const result = await connectImpactPartner({
5164
- vars,
5165
- });
5166
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
5278
+ // If the partner has already been started call completeImpactPartner to
5279
+ // update the remaining details. Otherwise create a new connection.
5280
+ const userData = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
5281
+ let result = null;
5282
+ let connectionResult;
5283
+ if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
5284
+ result = await completeImpactPartner({
5285
+ vars,
5286
+ });
5287
+ connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
5288
+ }
5289
+ else {
5290
+ result = await connectImpactPartner({
5291
+ vars,
5292
+ });
5293
+ connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
5294
+ }
5295
+ if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
5167
5296
  throw new Error();
5168
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
5169
- // Output backend errors to console for now
5170
- console.error("Failed to create Impact connection: ", result.createImpactConnection
5171
- .validationErrors);
5297
+ if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
5298
+ console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
5172
5299
  throw new Error();
5173
5300
  }
5174
5301
  await refetch();
5175
- const resultPublisher = (_e = (_d = (_c = result
5176
- .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
5177
- const hasValidCurrentDocument = data.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
5302
+ const resultPublisher = (_f = (_e = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher;
5303
+ const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
5178
5304
  // Fire form change event
5179
- window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
5305
+ window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
5180
5306
  return {
5181
5307
  resultPublisher,
5182
5308
  hasValidCurrentDocument,
@@ -5266,7 +5392,7 @@ function useUserInfoForm(props) {
5266
5392
  }
5267
5393
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
5268
5394
  const regionObj = hasStates
5269
- ? sqmUserInfoFormView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
5395
+ ? utils$1.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
5270
5396
  : {};
5271
5397
  return {
5272
5398
  setStep: setStep,
@@ -5298,9 +5424,9 @@ function useUserInfoForm(props) {
5298
5424
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
5299
5425
  hideState: !hasStates,
5300
5426
  hideSteps: !!context.hideSteps,
5301
- disabled: loading || connectLoading,
5427
+ disabled: loading || connectLoading || completeLoading,
5302
5428
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
5303
- loading: loading || connectLoading,
5429
+ loading: loading || connectLoading || completeLoading,
5304
5430
  isPartner: !!((_g = (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
5305
5431
  isUser: !!((_j = (_h = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
5306
5432
  formState: {
@@ -5363,10 +5489,6 @@ const TaxForm = class {
5363
5489
  * @uiName Currency field label
5364
5490
  */
5365
5491
  this.currency = "Currency";
5366
- /**
5367
- * @uiName Currency field help text
5368
- */
5369
- this.currencyHelpText = "Choose your preferred payout currency";
5370
5492
  /**
5371
5493
  * @uiName Setup progress
5372
5494
  */