@saasquatch/mint-components 2.2.0 → 2.3.0-10

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 (387) 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 +480 -1059
  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 +879 -0
  11. package/dist/cjs/sqm-partner-info-modal-view-2b6fee0f.js +155 -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 +940 -357
  15. package/dist/cjs/sqm-user-info-form-view-374a3f01.js +1427 -0
  16. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
  17. package/dist/cjs/subregions-984e30d7.js +1505 -0
  18. package/dist/cjs/{usePayoutStatus-0192fccd.js → useIndirectTaxForm-112914a0.js} +294 -5
  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 +149 -0
  22. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +671 -0
  23. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +261 -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 +6 -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/sqm-indirect-tax-form-view.js +2 -10
  47. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  48. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +51 -12
  49. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +6 -0
  50. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -2
  51. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +59 -30
  52. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +51 -2
  53. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +151 -0
  54. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +0 -1
  55. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +26 -23
  56. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +0 -25
  57. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +39 -19
  58. package/dist/collection/components/tax-and-cash/utils.js +55 -0
  59. package/dist/esm/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +5 -5
  60. package/dist/{mint-components/p-0c0d4065.js → esm/data-8698cbc6.js} +25 -5
  61. package/dist/esm/eventKeys-f76b6a03.js +3 -0
  62. package/dist/esm/{global-96c14d63.js → global-75e96214.js} +1 -1
  63. package/dist/esm/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
  64. package/dist/esm/keys-1054056a.js +8 -0
  65. package/dist/esm/loader.js +3 -3
  66. package/dist/esm/mint-components.js +3 -3
  67. package/dist/esm/parseStates-ed75e224.js +14 -0
  68. package/dist/esm/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
  69. package/dist/esm/sqm-banking-info-form_10.entry.js +466 -1045
  70. package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_47.entry.js} +454 -21
  71. package/dist/esm/sqm-close-button.entry.js +1 -1
  72. package/dist/esm/sqm-code-verification.entry.js +7 -8
  73. package/dist/esm/sqm-context-router.entry.js +1 -1
  74. package/dist/esm/sqm-email-verification_2.entry.js +874 -0
  75. package/dist/esm/sqm-empty_4.entry.js +2 -2
  76. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  77. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  78. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  79. package/dist/esm/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
  80. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  81. package/dist/esm/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
  82. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  83. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  84. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  85. package/dist/esm/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
  86. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  87. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  88. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  89. package/dist/esm/sqm-partner-info-modal-view-bc843d7d.js +152 -0
  90. package/dist/esm/sqm-password-field.entry.js +2 -2
  91. package/dist/esm/sqm-popup-container.entry.js +1 -1
  92. package/dist/esm/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
  93. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  94. package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
  95. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  96. package/dist/esm/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
  97. package/dist/esm/sqm-portal-profile.entry.js +4 -4
  98. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  99. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  100. package/dist/esm/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
  101. package/dist/esm/sqm-qr-code.entry.js +2 -2
  102. package/dist/esm/sqm-referral-table_11.entry.js +32 -14
  103. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  104. package/dist/esm/sqm-rewards-table_9.entry.js +35 -14
  105. package/dist/esm/sqm-stencilbook.entry.js +916 -333
  106. package/dist/esm/sqm-tab.entry.js +2 -2
  107. package/dist/esm/sqm-tabs.entry.js +3 -3
  108. package/dist/esm/sqm-user-info-form-view-5322525c.js +1421 -0
  109. package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
  110. package/dist/esm/subregions-7c9778d0.js +1492 -0
  111. package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
  112. package/dist/esm/{usePayoutStatus-46c0c289.js → useIndirectTaxForm-a6ac7e7e.js} +292 -5
  113. package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +2 -2
  114. package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +2 -2
  115. package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +2 -2
  116. package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
  117. package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +3 -3
  118. package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
  119. package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
  120. package/dist/esm/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
  121. package/dist/esm-es5/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +1 -1
  122. package/dist/esm-es5/data-8698cbc6.js +1 -0
  123. package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
  124. package/dist/esm-es5/{global-96c14d63.js → global-75e96214.js} +1 -1
  125. package/dist/esm-es5/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
  126. package/dist/esm-es5/keys-1054056a.js +1 -0
  127. package/dist/esm-es5/loader.js +1 -1
  128. package/dist/esm-es5/mint-components.js +1 -1
  129. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  130. package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
  131. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  132. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -0
  133. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  134. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  135. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  136. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -0
  137. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  138. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  139. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  140. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  141. package/dist/esm-es5/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
  142. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  143. package/dist/esm-es5/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
  144. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  145. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  146. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  147. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
  148. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  149. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  150. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  151. package/dist/esm-es5/sqm-partner-info-modal-view-bc843d7d.js +1 -0
  152. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  153. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  154. package/dist/esm-es5/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
  155. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  156. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  157. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  158. package/dist/esm-es5/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
  159. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  160. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  161. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  162. package/dist/esm-es5/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
  163. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  164. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  165. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  166. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  167. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  168. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  169. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  170. package/dist/esm-es5/sqm-user-info-form-view-5322525c.js +1 -0
  171. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  172. package/dist/esm-es5/subregions-7c9778d0.js +1 -0
  173. package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
  174. package/dist/esm-es5/useIndirectTaxForm-a6ac7e7e.js +6 -0
  175. package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +1 -1
  176. package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +1 -1
  177. package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +1 -1
  178. package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
  179. package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +1 -1
  180. package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
  181. package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
  182. package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
  183. package/dist/mint-components/mint-components.esm.js +1 -1
  184. package/dist/mint-components/mint-components.js +1 -1
  185. package/dist/mint-components/{p-626b31cb.system.entry.js → p-025ddad2.system.entry.js} +1 -1
  186. package/dist/mint-components/{p-5b871e38.system.entry.js → p-02c0f88e.system.entry.js} +1 -1
  187. package/dist/mint-components/{p-f55ecf35.system.js → p-02e2b13b.system.js} +1 -1
  188. package/dist/mint-components/{p-a4f8abad.js → p-0766438e.js} +1 -1
  189. package/dist/mint-components/{p-205cfdcd.system.js → p-0815b973.system.js} +1 -1
  190. package/dist/mint-components/{p-db0a2afd.entry.js → p-092c2606.entry.js} +1 -1
  191. package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-099ce3d5.system.entry.js} +1 -1
  192. package/dist/mint-components/p-0a6489fa.entry.js +1 -0
  193. package/dist/mint-components/{p-fc284f91.system.entry.js → p-0b32e1d4.system.entry.js} +1 -1
  194. package/dist/mint-components/p-115dfc03.system.js +1 -0
  195. package/dist/mint-components/{p-7b59e13c.system.js → p-1317cc92.system.js} +1 -1
  196. package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-13bb56a8.system.entry.js} +1 -1
  197. package/dist/mint-components/{p-f8a09b0f.js → p-13d8ecad.js} +1 -1
  198. package/dist/mint-components/p-13e439bc.js +1 -0
  199. package/dist/mint-components/p-13f3a647.js +1 -0
  200. package/dist/mint-components/{p-61897e72.entry.js → p-14183edc.entry.js} +1 -1
  201. package/dist/mint-components/{p-8f2d03c7.entry.js → p-1599a178.entry.js} +1 -1
  202. package/dist/mint-components/{p-02499e08.entry.js → p-1b0326d1.entry.js} +1 -1
  203. package/dist/mint-components/p-1d398dbc.entry.js +11 -0
  204. package/dist/mint-components/p-1d86895f.system.js +1 -0
  205. package/dist/mint-components/{p-c8a3f3b0.js → p-1efb42e2.js} +1 -1
  206. package/dist/mint-components/p-1f387c7b.system.js +1 -0
  207. package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-209157a9.system.entry.js} +1 -1
  208. package/dist/mint-components/{p-30c1ef36.system.js → p-2190dc73.system.js} +1 -1
  209. package/dist/mint-components/p-24a867ab.system.js +1 -0
  210. package/dist/mint-components/{p-80e116ec.system.entry.js → p-24f1d342.system.entry.js} +1 -1
  211. package/dist/mint-components/{p-6668f9f0.entry.js → p-27daf264.entry.js} +1 -1
  212. package/dist/mint-components/p-28ed2ae9.js +1 -0
  213. package/dist/mint-components/{p-09f7aacd.entry.js → p-29bc5f50.entry.js} +2 -2
  214. package/dist/mint-components/p-2bc6ac74.system.entry.js +1 -0
  215. package/dist/mint-components/{p-738dce27.system.entry.js → p-2d3f7b76.system.entry.js} +1 -1
  216. package/dist/mint-components/p-2d4132fb.js +99 -0
  217. package/dist/mint-components/p-2ed13619.entry.js +1 -0
  218. package/dist/mint-components/{p-c45a929a.system.entry.js → p-30cfe3e3.system.entry.js} +1 -1
  219. package/dist/mint-components/{p-d55c50af.system.js → p-31815fb6.system.js} +1 -1
  220. package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-3354cc75.system.entry.js} +1 -1
  221. package/dist/mint-components/{p-5bc5c61e.entry.js → p-335a5736.entry.js} +1 -1
  222. package/dist/mint-components/{p-e9485160.system.entry.js → p-33ca28ba.system.entry.js} +1 -1
  223. package/dist/mint-components/{p-8583ce0c.system.js → p-376c7608.system.js} +1 -1
  224. package/dist/mint-components/p-37e24621.system.entry.js +1 -0
  225. package/dist/mint-components/{p-95510f27.entry.js → p-38d04e4b.entry.js} +1 -1
  226. package/dist/mint-components/{p-e84b874c.js → p-3a41b39c.js} +1 -1
  227. package/dist/mint-components/{p-e5ea43b1.entry.js → p-3bbc0db2.entry.js} +2 -2
  228. package/dist/mint-components/{p-982d1f6f.entry.js → p-432a44de.entry.js} +3 -2
  229. package/dist/mint-components/{p-bab4929e.js → p-45230a44.js} +1 -1
  230. package/dist/mint-components/p-4691e9d5.system.js +1 -0
  231. package/dist/mint-components/{p-1d92c169.entry.js → p-4d73a616.entry.js} +1 -1
  232. package/dist/mint-components/{p-3bc62ca6.entry.js → p-4e3db52b.entry.js} +1 -1
  233. package/dist/mint-components/{p-3286ef38.js → p-4eaa3eb7.js} +1 -1
  234. package/dist/mint-components/{p-013564b3.entry.js → p-4eadbd5b.entry.js} +1 -1
  235. package/dist/mint-components/p-4f9dc974.js +1 -0
  236. package/dist/mint-components/{p-f7ca4cc4.system.entry.js → p-51ae6716.system.entry.js} +1 -1
  237. package/dist/mint-components/p-5623f1e0.js +1 -0
  238. package/dist/mint-components/p-5bc707cf.entry.js +299 -0
  239. package/dist/mint-components/p-5c52100b.js +117 -0
  240. package/dist/mint-components/{p-77b9cde8.system.js → p-5fdf0286.system.js} +1 -1
  241. package/dist/mint-components/{p-09348341.entry.js → p-60b1f3d9.entry.js} +1 -1
  242. package/dist/mint-components/{p-d005df28.system.entry.js → p-623a0a0b.system.entry.js} +1 -1
  243. package/dist/mint-components/{p-c30d0049.system.entry.js → p-6b4e5d94.system.entry.js} +1 -1
  244. package/dist/mint-components/p-6ef373ed.system.js +6 -0
  245. package/dist/mint-components/{p-f4e36adf.system.entry.js → p-6f6c3ac6.system.entry.js} +1 -1
  246. package/dist/mint-components/p-6f8dde97.system.js +1 -0
  247. package/dist/mint-components/{p-43c31fd5.system.js → p-7628e56f.system.js} +1 -1
  248. package/dist/mint-components/{p-653db72e.entry.js → p-78e6dc8d.entry.js} +1 -1
  249. package/dist/mint-components/{p-f581aac7.js → p-7a091fa7.js} +1 -1
  250. package/dist/mint-components/{p-40bad95a.entry.js → p-7cbdf341.entry.js} +2 -2
  251. package/dist/mint-components/{p-044f930a.system.js → p-7d2d9ef9.system.js} +1 -1
  252. package/dist/mint-components/{p-5c4ba8a0.entry.js → p-7ea3f49c.entry.js} +1 -1
  253. package/dist/mint-components/p-7f29622d.js +1 -0
  254. package/dist/mint-components/{p-5ce78407.system.entry.js → p-81bc6dca.system.entry.js} +1 -1
  255. package/dist/mint-components/{p-f6528f8a.entry.js → p-84495fb8.entry.js} +1 -1
  256. package/dist/mint-components/p-85ecc0aa.entry.js +83 -0
  257. package/dist/mint-components/{p-b96e90a2.system.entry.js → p-86d20b47.system.entry.js} +1 -1
  258. package/dist/mint-components/p-87f86492.js +1 -0
  259. package/dist/mint-components/p-8a08cec6.system.entry.js +1 -0
  260. package/dist/mint-components/{p-d0993bb9.js → p-8a6531d2.js} +1 -1
  261. package/dist/mint-components/p-8ae8968c.js +1 -0
  262. package/dist/mint-components/{p-7265bbcb.system.js → p-8e148cb0.system.js} +1 -1
  263. package/dist/mint-components/p-8f15bf17.entry.js +1 -0
  264. package/dist/mint-components/{p-b66f45d1.entry.js → p-921eb024.entry.js} +1 -1
  265. package/dist/mint-components/{p-f1374258.system.entry.js → p-925aa740.system.entry.js} +1 -1
  266. package/dist/mint-components/p-99eecdcb.system.entry.js +1 -0
  267. package/dist/mint-components/{p-e12754f5.system.entry.js → p-9a15cd5a.system.entry.js} +1 -1
  268. package/dist/mint-components/p-9c1f5317.system.js +1 -0
  269. package/dist/mint-components/{p-832aea99.js → p-9f48640d.js} +1 -1
  270. package/dist/mint-components/p-a49d9288.entry.js +1 -0
  271. package/dist/mint-components/p-a8cfa8fd.entry.js +9 -0
  272. package/dist/mint-components/{p-90833864.system.entry.js → p-ab59c5eb.system.entry.js} +1 -1
  273. package/dist/mint-components/{p-e6240c72.js → p-abd717d4.js} +1 -1
  274. package/dist/mint-components/p-ae2f610e.system.js +1 -0
  275. package/dist/mint-components/{p-19c441b2.system.js → p-b2ad3fca.system.js} +1 -1
  276. package/dist/mint-components/{p-c8a8d231.entry.js → p-b3309d9b.entry.js} +2 -2
  277. package/dist/mint-components/p-b3e1f2fa.entry.js +91 -0
  278. package/dist/mint-components/p-b7188d47.system.entry.js +1 -0
  279. package/dist/mint-components/{p-8962e023.js → p-b871d158.js} +1 -1
  280. package/dist/mint-components/p-b9509a55.system.entry.js +1 -0
  281. package/dist/mint-components/p-badf28bb.system.js +1 -0
  282. package/dist/mint-components/{p-035d9b65.js → p-bb0b5e4b.js} +1 -1
  283. package/dist/mint-components/{p-52674798.entry.js → p-bcfdb510.entry.js} +1 -1
  284. package/dist/mint-components/p-bd03efe0.system.js +1 -0
  285. package/dist/mint-components/{p-642f2c89.js → p-bf9ab2d3.js} +1 -1
  286. package/dist/mint-components/{p-bc386a7b.js → p-c0a85e22.js} +1 -1
  287. package/dist/mint-components/p-c0f8f977.system.entry.js +1 -0
  288. package/dist/mint-components/p-c13c20b2.system.js +1 -0
  289. package/dist/mint-components/p-c41d536d.entry.js +1 -0
  290. package/dist/mint-components/{p-a0c5631b.system.js → p-c66e5217.system.js} +1 -1
  291. package/dist/mint-components/{p-0d83907e.js → p-cfea215d.js} +1 -1
  292. package/dist/mint-components/p-d08408b3.entry.js +1 -0
  293. package/dist/mint-components/{p-172675ca.system.js → p-d284ae70.system.js} +1 -1
  294. package/dist/mint-components/{p-027fc3be.system.entry.js → p-d34564f8.system.entry.js} +1 -1
  295. package/dist/mint-components/{p-1021a49f.system.entry.js → p-db6bf7cf.system.entry.js} +1 -1
  296. package/dist/mint-components/{p-4da5a3fe.system.entry.js → p-df897432.system.entry.js} +1 -1
  297. package/dist/mint-components/{p-036a2617.system.js → p-e651593c.system.js} +1 -1
  298. package/dist/mint-components/{p-f39cf252.system.entry.js → p-e6de31a7.system.entry.js} +1 -1
  299. package/dist/mint-components/{p-2668335b.js → p-e8e7af06.js} +1 -1
  300. package/dist/mint-components/{p-85721089.system.js → p-e920c95c.system.js} +1 -1
  301. package/dist/mint-components/{p-3366b81e.js → p-eae44b42.js} +2 -2
  302. package/dist/mint-components/{p-af407cce.entry.js → p-ef32fa8f.entry.js} +1 -1
  303. package/dist/mint-components/{p-7efb8782.system.js → p-f32050f6.system.js} +1 -1
  304. package/dist/mint-components/{p-782af7ae.system.entry.js → p-f6de2e5c.system.entry.js} +1 -1
  305. package/dist/mint-components/{p-9390586b.system.entry.js → p-fa85ea51.system.entry.js} +1 -1
  306. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +15 -0
  307. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +51 -0
  308. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +123 -0
  309. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +16 -0
  310. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +18 -1
  311. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +19 -7
  312. package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
  313. package/dist/types/components/sqm-widget-verification/keys.d.ts +2 -0
  314. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +75 -7
  315. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
  316. package/dist/types/components/tax-and-cash/data.d.ts +3 -0
  317. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +8 -0
  318. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
  319. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +173 -0
  320. package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -0
  321. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +7 -0
  322. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +1 -0
  323. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -5
  324. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +19 -0
  325. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -1
  326. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -4
  327. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
  328. package/dist/types/components/tax-and-cash/utils.d.ts +5 -0
  329. package/dist/types/components.d.ts +644 -32
  330. package/dist/types/saasquatch.d.ts +2 -0
  331. package/docs/docs.docx +0 -0
  332. package/docs/raisins.json +1 -1
  333. package/grapesjs/grapesjs.js +1 -1
  334. package/package.json +2 -4
  335. package/dist/cjs/extractProps-e9c55ba8.js +0 -35
  336. package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -418
  337. package/dist/cjs/sqm-user-info-form-view-53306f6e.js +0 -2074
  338. package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -214
  339. package/dist/esm/data-12e6aae1.js +0 -216
  340. package/dist/esm/extractProps-54064fb0.js +0 -32
  341. package/dist/esm/keys-406491dc.js +0 -6
  342. package/dist/esm/sqm-email-verification.entry.js +0 -414
  343. package/dist/esm/sqm-user-info-form-view-19d81a2b.js +0 -2066
  344. package/dist/esm/sqm-widget-verification.entry.js +0 -210
  345. package/dist/esm-es5/data-12e6aae1.js +0 -1
  346. package/dist/esm-es5/extractProps-54064fb0.js +0 -1
  347. package/dist/esm-es5/keys-406491dc.js +0 -1
  348. package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
  349. package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
  350. package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +0 -1
  351. package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
  352. package/dist/esm-es5/usePayoutStatus-46c0c289.js +0 -6
  353. package/dist/mint-components/p-00b235c5.system.entry.js +0 -1
  354. package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
  355. package/dist/mint-components/p-0797a946.js +0 -1
  356. package/dist/mint-components/p-13292317.entry.js +0 -11
  357. package/dist/mint-components/p-2d5c2bd4.system.entry.js +0 -1
  358. package/dist/mint-components/p-38c7775a.js +0 -1
  359. package/dist/mint-components/p-3adbfd0b.system.js +0 -6
  360. package/dist/mint-components/p-3af3e2c1.entry.js +0 -25
  361. package/dist/mint-components/p-5492dd51.system.entry.js +0 -1
  362. package/dist/mint-components/p-57dd28bd.system.js +0 -1
  363. package/dist/mint-components/p-5b1d2866.system.js +0 -1
  364. package/dist/mint-components/p-6c4ad51a.js +0 -1
  365. package/dist/mint-components/p-77fa2383.entry.js +0 -1
  366. package/dist/mint-components/p-7939e4af.entry.js +0 -1
  367. package/dist/mint-components/p-8285869e.entry.js +0 -9
  368. package/dist/mint-components/p-892797eb.system.entry.js +0 -1
  369. package/dist/mint-components/p-91a96e98.entry.js +0 -1
  370. package/dist/mint-components/p-b2b85238.entry.js +0 -1
  371. package/dist/mint-components/p-b395470f.entry.js +0 -16
  372. package/dist/mint-components/p-bba16a46.system.entry.js +0 -1
  373. package/dist/mint-components/p-be12607e.entry.js +0 -281
  374. package/dist/mint-components/p-bf188b72.system.entry.js +0 -1
  375. package/dist/mint-components/p-ca098be1.system.js +0 -1
  376. package/dist/mint-components/p-d18dedd4.js +0 -1
  377. package/dist/mint-components/p-d4f332a7.entry.js +0 -106
  378. package/dist/mint-components/p-d6193876.system.js +0 -1
  379. package/dist/mint-components/p-de0d6fd7.js +0 -49
  380. package/dist/mint-components/p-e00ec007.js +0 -1
  381. package/dist/mint-components/p-e55aafe9.system.js +0 -1
  382. package/dist/mint-components/p-ea03e50e.system.js +0 -1
  383. package/dist/mint-components/p-ec0b649a.entry.js +0 -1
  384. package/dist/mint-components/p-f8026ed6.system.js +0 -1
  385. package/dist/mint-components/p-fb804001.system.entry.js +0 -1
  386. package/dist/mint-components/p-fe70e20c.entry.js +0 -1
  387. 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-374a3f01.js');
20
+ const subregions = require('./subregions-984e30d7.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-112914a0.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 = subregions.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: subregions.taxTypeToName(actualDocumentType),
1818
2173
  showExitButton,
1819
2174
  showModal,
1820
2175
  },
@@ -2484,24 +2839,16 @@ const IndirectTaxFormView = (props) => {
2484
2839
  }, {
2485
2840
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2486
2841
  }))),
2487
- states.isPartner && (index.h("sqm-form-message", { loading: states.loading, type: "info" },
2488
- index.h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
2489
- global.intl.formatMessage({
2490
- id: "isPartnerAlertDescription",
2491
- defaultMessage: text.isPartnerAlertDescription,
2492
- }, {
2493
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2494
- }))),
2495
2842
  index.h("div", null,
2496
2843
  index.h("h4", null, text.indirectTaxDetails))),
2497
2844
  states.loading ? (index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (index.h("div", null,
2498
2845
  index.h("div", { class: classes.RadioContainer },
2499
2846
  index.h("div", { class: classes.InnerRadioContainer },
2500
- index.h("sl-radio", { exportparts: "base: radio-base", name: "/checked", value: "notRegistered", id: "notRegistered", checked: formState.checked === "notRegistered", onInput: () => callbacks.onChange("notRegistered"), disabled: states.disabled || states.isPartner },
2847
+ index.h("sl-radio", { exportparts: "base: radio-base", name: "/checked", value: "notRegistered", id: "notRegistered", checked: formState.checked === "notRegistered", onInput: () => callbacks.onChange("notRegistered"), disabled: states.disabled },
2501
2848
  index.h("div", { class: classes.RadioContent },
2502
2849
  text.notRegistered,
2503
2850
  index.h("p", { class: classes.DescriptionText }, text.notRegisteredSubtext))),
2504
- index.h("sl-radio", { exportparts: "base: radio-base", name: "/checked", value: "otherRegion", id: "otherRegion", checked: formState.checked === "otherRegion", onInput: () => callbacks.onChange("otherRegion"), disabled: states.disabled || states.isPartner },
2851
+ index.h("sl-radio", { exportparts: "base: radio-base", name: "/checked", value: "otherRegion", id: "otherRegion", checked: formState.checked === "otherRegion", onInput: () => callbacks.onChange("otherRegion"), disabled: states.disabled },
2505
2852
  index.h("div", { class: classes.RadioContent },
2506
2853
  text.otherRegion,
2507
2854
  index.h("p", { class: classes.DescriptionText }, text.otherRegionSubtext))),
@@ -2517,252 +2864,6 @@ const IndirectTaxFormView = (props) => {
2517
2864
  index.h("sl-button", { class: classes.SecondaryButton, type: "text", disabled: states.disabled, onClick: callbacks.onBack, exportparts: "base: secondarybutton-base" }, text.backButton))))));
2518
2865
  };
2519
2866
 
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
2867
  const IndirectTaxForm = class {
2767
2868
  constructor(hostRef) {
2768
2869
  index.registerInstance(this, hostRef);
@@ -2949,10 +3050,10 @@ const IndirectTaxForm = class {
2949
3050
  render() {
2950
3051
  const props = index_module.isDemo()
2951
3052
  ? useDemoIndirectTaxForm(this)
2952
- : useIndirectTaxForm(this);
3053
+ : useIndirectTaxForm.useIndirectTaxForm(this);
2953
3054
  const registeredInDifferentCountryDetailsSlot = (index.h(sqmUserInfoFormView.OtherRegionSlotView, { states: {
2954
3055
  hide: props.states.formState.checked !== "otherRegion",
2955
- disabled: props.states.disabled || props.states.isPartner,
3056
+ disabled: props.states.disabled,
2956
3057
  formState: props.slotProps.formState,
2957
3058
  loading: props.states.loading,
2958
3059
  isPartner: props.states.isPartner,
@@ -3009,7 +3110,7 @@ function useDemoIndirectTaxForm(props) {
3009
3110
  setCountrySearch: (c) => console.log(c),
3010
3111
  },
3011
3112
  data: {
3012
- esRegions: sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS,
3113
+ esRegions: subregions.INDIRECT_TAX_SPAIN_REGIONS,
3013
3114
  countries: [
3014
3115
  {
3015
3116
  countryCode: "CA",
@@ -3028,7 +3129,7 @@ function useDemoIndirectTaxForm(props) {
3028
3129
  displayName: "United States",
3029
3130
  },
3030
3131
  ],
3031
- provinces: sqmUserInfoFormView.INDIRECT_TAX_PROVINCES,
3132
+ provinces: subregions.INDIRECT_TAX_PROVINCES,
3032
3133
  },
3033
3134
  text: props.getTextProps(),
3034
3135
  refs: {
@@ -3544,6 +3645,14 @@ const style$4 = {
3544
3645
  color: "var(--sl-color-white)",
3545
3646
  },
3546
3647
  },
3648
+ DangerBadge: {
3649
+ "&::part(base)": {
3650
+ textAlign: "center",
3651
+ whiteSpace: "pre-line",
3652
+ background: "var(--sqm-danger-color-icon)",
3653
+ color: "var(--sl-color-white)",
3654
+ },
3655
+ },
3547
3656
  Container: {
3548
3657
  display: "flex",
3549
3658
  flexDirection: "column",
@@ -3564,8 +3673,11 @@ function PayoutDetailsCardView(props) {
3564
3673
  index.h("sqm-skeleton", { width: "25%", height: "16px" })));
3565
3674
  };
3566
3675
  const renderStatusBadge = (status, statusBadgeText) => {
3567
- const badgeType = status === "nextPayout" ? "success" : "primary";
3568
- const badgeClass = badgeType === "success" ? classes.SuccessBadge : classes.PrimaryBadge;
3676
+ const badgeClass = status === "nextPayout"
3677
+ ? classes.SuccessBadge
3678
+ : status === "payoutToday"
3679
+ ? classes.PrimaryBadge
3680
+ : classes.DangerBadge;
3569
3681
  const statusText = global.intl.formatMessage({
3570
3682
  id: "badgeText",
3571
3683
  defaultMessage: statusBadgeText,
@@ -3723,710 +3835,6 @@ function useDemoPayoutDetailsCard(props) {
3723
3835
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
3724
3836
  }
3725
3837
 
3726
- const style$5 = {
3727
- ErrorAlertContainer: {
3728
- "&::part(base)": {
3729
- backgroundColor: "var(--sl-color-red-100)",
3730
- borderTop: "none",
3731
- },
3732
- },
3733
- WarningAlertContainer: {
3734
- "&::part(base)": {
3735
- backgroundColor: "var(--sl-color-yellow-100)",
3736
- borderTop: "none",
3737
- maxWidth: "600px",
3738
- },
3739
- },
3740
- WarningHoldAlertContainer: {
3741
- marginLeft: "-20px",
3742
- "&::part(base)": {
3743
- maxWidth: "850px",
3744
- border: "none",
3745
- backgroundColor: "transparent",
3746
- color: "var(--sqm-text)",
3747
- },
3748
- "& sl-icon::part(base)": {
3749
- color: "var(--sqm-warning-color-icon)",
3750
- },
3751
- },
3752
- ErrorHoldAlertContainer: {
3753
- marginLeft: "-20px",
3754
- "&::part(base)": {
3755
- maxWidth: "850px",
3756
- border: "none",
3757
- backgroundColor: "transparent",
3758
- color: "var(--sqm-text)",
3759
- },
3760
- "& sl-icon::part(base)": {
3761
- color: "var(--sqm-danger-color-icon)",
3762
- },
3763
- },
3764
- ExpiringSoonAlertContainer: {
3765
- "&::part(base)": {
3766
- backgroundColor: "var(--sl-color-yellow-100)",
3767
- borderTop: "none",
3768
- },
3769
- },
3770
- BankingInformationContainer: {
3771
- maxWidth: "700px",
3772
- },
3773
- IndirectTaxPreviewContainer: {
3774
- marginTop: "var(--sl-spacing-x-large)",
3775
- borderTop: "1px solid var(--sl-color-neutral-200)",
3776
- },
3777
- IndirectTaxPreviewHeaderContainer: {
3778
- marginTop: "var(--sl-spacing-large)",
3779
- marginBottom: "var(--sl-spacing-xx-small)",
3780
- margin: "0",
3781
- display: "flex",
3782
- alignItems: "center",
3783
- gap: "var(--sl-spacing-x-small)",
3784
- "&::part(base)": {
3785
- color: "var(--sqm-text)",
3786
- },
3787
- },
3788
- IndirectTaxPreviewDetails: {
3789
- gap: "var(--sl-spacing-x-small)",
3790
- display: "flex",
3791
- flexDirection: "column",
3792
- lineHeight: "var(--sl-spacing-medium)",
3793
- fontSize: "var(--sl-font-size-small)",
3794
- color: "var(--sqm-text-subdued)",
3795
- },
3796
- InvoiceTableContainer: {
3797
- marginTop: "var(--sl-spacing-medium)",
3798
- },
3799
- NotRegisteredIndirectTaxText: {
3800
- color: "var(--sqm-text-subdued)",
3801
- },
3802
- TaxDocumentsContainer: {
3803
- marginTop: "var(--sl-spacing-xx-large)",
3804
- borderTop: "1px solid var(--sl-color-neutral-200)",
3805
- },
3806
- TaxDocumentsSectionHeaderContainer: {
3807
- marginTop: "var(--sl-spacing-x-large)",
3808
- marginBottom: "var(--sl-spacing-xx-small)",
3809
- },
3810
- StatusContainer: {
3811
- marginTop: "var(--sl-spacing-x-large)",
3812
- display: "flex",
3813
- flexDirection: "column",
3814
- gap: "var(--sl-spacing-x-small)",
3815
- "& h3": {
3816
- margin: "0",
3817
- },
3818
- "& p": {
3819
- margin: "0",
3820
- paddingTop: "2px",
3821
- },
3822
- },
3823
- StatusAlert: {
3824
- fontSize: "var(--sl-font-size-small)",
3825
- },
3826
- TaxFormDetailsContainer: {
3827
- display: "flex",
3828
- gap: "var(--sl-spacing-small)",
3829
- alignItems: "center",
3830
- },
3831
- NewFormButton: {
3832
- marginTop: "var(--sl-spacing-large)",
3833
- maxWidth: "300px",
3834
- },
3835
- EditBankDetailsButton: {
3836
- marginTop: "var(--sl-spacing-large)",
3837
- },
3838
- TaxSectionSkeletonContainer: {
3839
- display: "flex",
3840
- flexDirection: "column",
3841
- marginTop: "var(--sl-spacing-x-large)",
3842
- },
3843
- TaxDocSubtext: {
3844
- margin: "0",
3845
- color: "var(--sqm-text-subdued)",
3846
- lineHeight: "var(--sl-spacing-medium)",
3847
- fontSize: "var(--sl-font-size-small)",
3848
- marginLeft: "1px",
3849
- },
3850
- TooltipContainer: {
3851
- display: "flex",
3852
- textAlign: "center",
3853
- width: "250px",
3854
- "&::part(body)": {
3855
- pointerEvents: "auto",
3856
- },
3857
- },
3858
- ToolTip: {
3859
- top: "6px",
3860
- width: "16px",
3861
- height: "16px",
3862
- },
3863
- TaxNumberContainer: {
3864
- display: "flex",
3865
- flexDirection: "column",
3866
- gap: "6px",
3867
- },
3868
- DescriptionText: {
3869
- color: "var(--sqm-text-subdued)",
3870
- fontSize: "var(--sl-font-size-x-small)",
3871
- marginBottom: "none",
3872
- maxWidth: "492px",
3873
- },
3874
- PageDescriptionText: {
3875
- color: "var(--sqm-text-subdued)",
3876
- fontSize: "var(--sl-font-size-medium)",
3877
- marginTop: "0",
3878
- },
3879
- Dialog: {
3880
- "&::part(panel)": {
3881
- maxWidth: "420px",
3882
- },
3883
- "&::part(close-button)": {
3884
- marginBottom: "var(--sl-spacing-xx-large)",
3885
- },
3886
- "&::part(title)": {
3887
- fontSize: "var(--sl-font-size-x-large)",
3888
- fontWeight: "600",
3889
- marginTop: "var(--sl-spacing-xxx-large)",
3890
- padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
3891
- },
3892
- "&::part(body)": {
3893
- padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
3894
- fontSize: "var(--sl-font-size-small)",
3895
- },
3896
- "&::part(footer)": {
3897
- display: "flex",
3898
- flexDirection: "column",
3899
- gap: "var(--sl-spacing-small)",
3900
- marginBottom: "var(--sl-spacing-xx-small)",
3901
- alignItems: "center",
3902
- flex: "1",
3903
- },
3904
- },
3905
- DialogButton: { margin: "auto", width: "100%" },
3906
- SuccessBadge: {
3907
- "&::part(base)": {
3908
- textAlign: "center",
3909
- whiteSpace: "pre-line",
3910
- background: "var(--sqm-success-color-icon)",
3911
- },
3912
- },
3913
- WarningBadge: {
3914
- "&::part(base)": {
3915
- textAlign: "center",
3916
- whiteSpace: "pre-line",
3917
- background: "var(--sqm-warning-color-icon)",
3918
- },
3919
- },
3920
- ErrorBadge: {
3921
- "&::part(base)": {
3922
- textAlign: "center",
3923
- whiteSpace: "pre-line",
3924
- background: "var(--sqm-danger-color-icon)",
3925
- },
3926
- },
3927
- SubduedText: {
3928
- color: "var(--sqm-text-subdued)",
3929
- },
3930
- ButtonContainer: {
3931
- display: "flex",
3932
- gap: "var(--sl-spacing-medium)",
3933
- flexWrap: "wrap",
3934
- },
3935
- DropdownTooltipContainer: {
3936
- top: "-4px",
3937
- "&::part(panel)": {
3938
- boxShadow: "none",
3939
- border: "none",
3940
- marginTop: "var(--sl-spacing-x-small)",
3941
- },
3942
- },
3943
- DropdownContent: {
3944
- padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
3945
- fontSize: "var(--sl-font-size-small)",
3946
- fontFamily: "var(--sl-font-sans)",
3947
- fontWeight: "var(--sl-font-weight-normal)",
3948
- lineHeight: "var(--sl-line-height-dense)",
3949
- minWidth: "225px",
3950
- backgroundColor: "var(--sl-color-gray-900)",
3951
- color: "var(--sl-color-white)",
3952
- borderRadius: "var(--sl-border-radius-medium)",
3953
- position: "relative",
3954
- marginLeft: "5px",
3955
- },
3956
- DropdownArrow: {
3957
- position: "absolute",
3958
- left: "-5px",
3959
- top: "50%",
3960
- transform: "translateY(-50%)",
3961
- width: "0",
3962
- height: "0",
3963
- borderTop: "5px solid transparent",
3964
- borderBottom: "5px solid transparent",
3965
- borderRight: "5px solid var(--sl-color-gray-900)",
3966
- zIndex: "1",
3967
- },
3968
- DropdownLink: {
3969
- color: "var(--sl-color-white)",
3970
- textDecoration: "underline",
3971
- },
3972
- };
3973
- const sheet$4 = JSS.createStyleSheet(style$5);
3974
- const styleString$4 = sheet$4.toString();
3975
- const vanillaStyle$3 = `
3976
- :host{
3977
- display: block;
3978
- }
3979
-
3980
- sl-button[type="secondary"]::part(base) {
3981
- font-family: var(--sqm-primary-font);
3982
- background-color: var(--sqm-secondary-button-background);
3983
- color: var(--sqm-secondary-button-color);
3984
- border-color: var(--sqm-secondary-button-color-border);
3985
- border-radius: var(--sqm-secondary-button-radius);
3986
- }
3987
-
3988
- sl-button[type="secondary"]::part(base):hover {
3989
- background-color: var(--sqm-secondary-button-background-hover);
3990
- color: var(--sqm-secondary-button-color-hover);
3991
- border-color: var(--sqm-secondary-button-border-color-hover);
3992
- }
3993
-
3994
- `;
3995
- const TaxAndCashDashboardView = (props) => {
3996
- var _a;
3997
- const { states, text, callbacks, slots } = props;
3998
- function getAlert(status) {
3999
- switch (status) {
4000
- case "OVER_W9_THRESHOLD":
4001
- if (states.enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9") {
4002
- return {
4003
- header: text.w9RequiredHeader,
4004
- description: global.intl.formatMessage({
4005
- id: "w9RequiredDescription",
4006
- defaultMessage: text.w9RequiredDescription,
4007
- }, {
4008
- termsAndConditions: (index.h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
4009
- }),
4010
- button: (index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
4011
- alertType: "warning",
4012
- icon: "info-circle",
4013
- class: sheet$4.classes.WarningHoldAlertContainer,
4014
- };
4015
- }
4016
- else {
4017
- return {
4018
- header: text.payoutHoldAlertHeader,
4019
- description: global.intl.formatMessage({
4020
- id: "payoutHoldAlertDescription",
4021
- defaultMessage: text.payoutHoldAlertDescription,
4022
- }, {
4023
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4024
- }),
4025
- buttonText: null,
4026
- alertType: "warning",
4027
- icon: "exclamation-triangle",
4028
- class: sheet$4.classes.WarningHoldAlertContainer,
4029
- };
4030
- }
4031
- case "VERIFICATION:REQUIRED":
4032
- return {
4033
- header: text.verificationRequiredHeader,
4034
- description: global.intl.formatMessage({
4035
- id: "verificationRequiredDescription",
4036
- defaultMessage: text.verificationRequiredDescription,
4037
- }, {
4038
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4039
- }),
4040
- buttonText: text.verificationRequiredButtonText,
4041
- alertType: "warning",
4042
- icon: "exclamation-triangle",
4043
- class: sheet$4.classes.WarningHoldAlertContainer,
4044
- };
4045
- case "VERIFICATION:INTERNAL":
4046
- return {
4047
- header: text.verificationRequiredInternalHeader,
4048
- description: global.intl.formatMessage({
4049
- id: "verificationRequiredInternalDescription",
4050
- defaultMessage: text.verificationRequiredInternalDescription,
4051
- }, {
4052
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4053
- }),
4054
- alertType: "warning",
4055
- icon: "exclamation-triangle",
4056
- class: sheet$4.classes.WarningHoldAlertContainer,
4057
- };
4058
- case "VERIFICATION:REVIEW":
4059
- return {
4060
- header: text.verificationReviewInternalHeader,
4061
- description: global.intl.formatMessage({
4062
- id: "verificationReviewInternalDescription",
4063
- defaultMessage: text.verificationReviewInternalDescription,
4064
- }, {
4065
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4066
- }),
4067
- alertType: "warning",
4068
- icon: "exclamation-triangle",
4069
- class: sheet$4.classes.WarningHoldAlertContainer,
4070
- };
4071
- case "VERIFICATION:FAILED":
4072
- return {
4073
- header: text.verificationFailedInternalHeader,
4074
- description: global.intl.formatMessage({
4075
- id: "verificationFailedInternalDescription",
4076
- defaultMessage: text.verificationFailedInternalDescription,
4077
- }, {
4078
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4079
- }),
4080
- alertType: "error",
4081
- icon: "exclamation-octagon",
4082
- class: sheet$4.classes.ErrorHoldAlertContainer,
4083
- };
4084
- case "NEW_PAYEE_REVIEW":
4085
- return {
4086
- header: text.accountReviewHeader,
4087
- description: global.intl.formatMessage({
4088
- id: "accountReviewDescription",
4089
- defaultMessage: text.accountReviewDescription,
4090
- }, {
4091
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4092
- }),
4093
- buttonText: null,
4094
- alertType: "warning",
4095
- icon: "exclamation-triangle",
4096
- class: sheet$4.classes.WarningHoldAlertContainer,
4097
- };
4098
- case "PAYMENT_HOLD_ON_CHANGE":
4099
- return {
4100
- header: text.paymentHoldOnChangeHeader,
4101
- description: global.intl.formatMessage({
4102
- id: "accountReviewDescription",
4103
- defaultMessage: text.paymentHoldOnChangeDescription,
4104
- }, {
4105
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4106
- }),
4107
- buttonText: null,
4108
- alertType: "warning",
4109
- icon: "exclamation-triangle",
4110
- class: sheet$4.classes.WarningHoldAlertContainer,
4111
- };
4112
- case "BENEFICIARY_NAME_INVALID":
4113
- return {
4114
- header: text.beneficiaryNameInvalidHeader,
4115
- description: global.intl.formatMessage({
4116
- id: "accountReviewDescription",
4117
- defaultMessage: text.beneficiaryNameInvalidDescription,
4118
- }, {
4119
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4120
- }),
4121
- button: (index.h("div", { class: sheet$4.classes.ButtonContainer },
4122
- index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4123
- index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4124
- alertType: "warning",
4125
- icon: "exclamation-triangle",
4126
- class: sheet$4.classes.WarningHoldAlertContainer,
4127
- };
4128
- case "BENEFICIARY_NAME_MISMATCH":
4129
- return {
4130
- header: text.beneficiaryNameMismatchHeader,
4131
- description: global.intl.formatMessage({
4132
- id: "accountReviewDescription",
4133
- defaultMessage: text.beneficiaryNameMismatchDescription,
4134
- }, {
4135
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4136
- }),
4137
- button: (index.h("div", { class: sheet$4.classes.ButtonContainer },
4138
- index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4139
- index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4140
- alertType: "warning",
4141
- icon: "exclamation-triangle",
4142
- class: sheet$4.classes.WarningHoldAlertContainer,
4143
- };
4144
- case "BANK_TAX_NAME_MISMATCH":
4145
- return {
4146
- header: text.bankTaxNameMismatchHeader,
4147
- description: global.intl.formatMessage({
4148
- id: "accountReviewDescription",
4149
- defaultMessage: text.bankTaxNameMismatchDescription,
4150
- }, {
4151
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4152
- }),
4153
- button: (index.h("div", { class: sheet$4.classes.ButtonContainer },
4154
- index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4155
- index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4156
- alertType: "warning",
4157
- icon: "exclamation-triangle",
4158
- class: sheet$4.classes.WarningHoldAlertContainer,
4159
- };
4160
- case "WITHDRAWAL_SETTINGS_INVALID":
4161
- return {
4162
- header: text.withdrawalSettingsInvalidHeader,
4163
- description: global.intl.formatMessage({
4164
- id: "accountReviewDescription",
4165
- defaultMessage: text.withdrawalSettingsInvalidDescription,
4166
- }, {
4167
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4168
- }),
4169
- button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
4170
- alertType: "warning",
4171
- icon: "exclamation-triangle",
4172
- class: sheet$4.classes.WarningHoldAlertContainer,
4173
- };
4174
- case "PAYMENT_RETURNED":
4175
- return {
4176
- header: text.paymentReturnedHeader,
4177
- description: global.intl.formatMessage({
4178
- id: "accountReviewDescription",
4179
- defaultMessage: text.paymentReturnedDescription,
4180
- }, {
4181
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4182
- }),
4183
- button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
4184
- alertType: "error",
4185
- icon: "exclamation-triangle",
4186
- class: sheet$4.classes.WarningHoldAlertContainer,
4187
- };
4188
- case "HOLD":
4189
- return {
4190
- header: text.payoutHoldAlertHeader,
4191
- description: global.intl.formatMessage({
4192
- id: "payoutHoldAlertDescription",
4193
- defaultMessage: text.payoutHoldAlertDescription,
4194
- }, {
4195
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4196
- }),
4197
- buttonText: null,
4198
- alertType: "warning",
4199
- icon: "exclamation-triangle",
4200
- class: sheet$4.classes.WarningHoldAlertContainer,
4201
- };
4202
- default:
4203
- return;
4204
- }
4205
- }
4206
- const statusMap = {
4207
- NOT_VERIFIED: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4208
- index.h("sl-badge", { class: sheet$4.classes.WarningBadge, type: "warning", pill: true }, text.statusTextNotVerified),
4209
- index.h("p", { class: sheet$4.classes.SubduedText }, global.intl.formatMessage({
4210
- id: `badgeTextAwaitingReview`,
4211
- defaultMessage: text.badgeTextAwaitingReview,
4212
- }, {
4213
- dateSubmitted: states.dateSubmitted,
4214
- })))),
4215
- ACTIVE: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4216
- index.h("sl-badge", { class: sheet$4.classes.SuccessBadge, type: "success", pill: true }, text.statusTextActive),
4217
- index.h("p", { class: sheet$4.classes.SubduedText }, global.intl.formatMessage({
4218
- id: `badgeTextSubmittedOn`,
4219
- defaultMessage: states.documentType === "W9" || !states.documentType
4220
- ? text.badgeTextSubmittedOn
4221
- : text.badgeTextSubmittedOnW8,
4222
- }, {
4223
- dateSubmitted: states.dateSubmitted,
4224
- })))),
4225
- INACTIVE: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4226
- index.h("sl-badge", { class: sheet$4.classes.ErrorBadge, type: "danger", pill: true }, text.statusTextNotActive),
4227
- index.h("p", { class: sheet$4.classes.SubduedText }, text.invalidForm))),
4228
- undefined: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4229
- index.h("sl-badge", { type: "danger", pill: true }, text.statusTextRequired),
4230
- index.h("p", null, global.intl.formatMessage({
4231
- id: `requiredTaxForm`,
4232
- defaultMessage: text.requiredTaxForm,
4233
- }, {
4234
- taxFormType: states.documentType,
4235
- })))),
4236
- };
4237
- const alertMap = {
4238
- INACTIVE: (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", class: sheet$4.classes.ErrorHoldAlertContainer, type: "danger", open: true },
4239
- index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
4240
- index.h("strong", null, global.intl.formatMessage({
4241
- id: `taxAlertHeaderNotActive`,
4242
- defaultMessage: states.documentType === "W9"
4243
- ? text.taxAlertHeaderNotActiveW9
4244
- : text.taxAlertHeaderNotActiveW8,
4245
- }, {
4246
- documentType: states.documentType || "Your",
4247
- })),
4248
- index.h("br", null),
4249
- global.intl.formatMessage({
4250
- id: `taxAlertMessage`,
4251
- defaultMessage: states.documentType === "W9"
4252
- ? text.taxAlertNotActiveMessageW9
4253
- : text.taxAlertNotActiveMessageW8,
4254
- }, {
4255
- documentType: states.documentTypeString || "tax",
4256
- }))),
4257
- };
4258
- const getIndirectTaxRegisteredIn = () => {
4259
- if (states.province) {
4260
- return global.intl.formatMessage({
4261
- id: `indirectTaxInfoCanada`,
4262
- defaultMessage: text.indirectTaxInfoCanada,
4263
- }, {
4264
- country: "Canada",
4265
- province: states.province,
4266
- });
4267
- }
4268
- else if (states.subRegion) {
4269
- return global.intl.formatMessage({
4270
- id: `indirectTaxInfoSpain`,
4271
- defaultMessage: text.indirectTaxInfoSpain,
4272
- }, {
4273
- country: states.country,
4274
- subRegion: states.subRegion,
4275
- });
4276
- }
4277
- else {
4278
- return global.intl.formatMessage({
4279
- id: `indirectTaxInfoOtherCountry`,
4280
- defaultMessage: text.indirectTaxInfoOtherCountry,
4281
- }, {
4282
- country: states.country,
4283
- });
4284
- }
4285
- };
4286
- const alertInfo = getAlert(states.payoutStatus);
4287
- const dropdownHover = (el) => {
4288
- var _a;
4289
- if (!el)
4290
- return;
4291
- const trigger = el.querySelector('[slot="trigger"]');
4292
- const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
4293
- if (!trigger || !panel)
4294
- return;
4295
- let hideTimeout;
4296
- const show = () => {
4297
- clearTimeout(hideTimeout);
4298
- el.show();
4299
- };
4300
- const scheduleHide = () => {
4301
- hideTimeout = setTimeout(() => el.hide(), 100);
4302
- };
4303
- trigger.addEventListener("mouseenter", show);
4304
- trigger.addEventListener("mouseleave", scheduleHide);
4305
- panel.addEventListener("mouseenter", show);
4306
- panel.addEventListener("mouseleave", scheduleHide);
4307
- return () => {
4308
- trigger.removeEventListener("mouseenter", show);
4309
- trigger.removeEventListener("mouseleave", scheduleHide);
4310
- panel.removeEventListener("mouseenter", show);
4311
- panel.removeEventListener("mouseleave", scheduleHide);
4312
- clearTimeout(hideTimeout);
4313
- };
4314
- };
4315
- return (index.h("div", null,
4316
- index.h("div", null,
4317
- index.h("style", { type: "text/css" },
4318
- styleString$4,
4319
- vanillaStyle$3),
4320
- states.loadingError && (index.h("div", null,
4321
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
4322
- index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
4323
- index.h("strong", null, text.error.loadingErrorAlertHeader),
4324
- index.h("br", null),
4325
- global.intl.formatMessage({
4326
- id: "loadingErrorAlertDescription",
4327
- defaultMessage: text.error.loadingErrorAlertDescription,
4328
- }, {
4329
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4330
- })))),
4331
- ((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
4332
- index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
4333
- index.h("strong", null, text.error.generalTitle),
4334
- index.h("br", null),
4335
- global.intl.formatMessage({
4336
- id: "generalDescription",
4337
- defaultMessage: text.error.generalDescription,
4338
- }, {
4339
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4340
- }))),
4341
- alertInfo && (index.h("sqm-form-message", { loading: states.loading, exportparts: "base: alert-base, icon:alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
4342
- index.h("strong", null, alertInfo.header),
4343
- index.h("p", { style: { margin: "0" } }, alertInfo.description),
4344
- alertInfo.buttonText && (index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
4345
- alertInfo.button ? (alertInfo.button) : (index.h("div", { style: { display: "none" } })))),
4346
- index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
4347
- index.h("p", null, text.replaceTaxFormModalBodyText),
4348
- index.h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
4349
- index.h("sl-button", { slot: "footer", type: "default", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
4350
- states.status === "INACTIVE" && alertMap[states.status],
4351
- index.h("div", null,
4352
- index.h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
4353
- index.h("div", { class: sheet$4.classes.BankingInformationContainer },
4354
- slots.payoutDetailsCardSlot,
4355
- !states.loading && (index.h("p", { class: sheet$4.classes.DescriptionText }, text.payoutFromImpact)),
4356
- states.canEditPayoutInfo && (index.h("sl-button", { disabled: states.disabled || states.loading, exportparts: "base: secondarybutton-base", type: "secondary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
4357
- (!states.noFormNeeded || !!states.status) && (index.h("div", { class: sheet$4.classes.TaxDocumentsContainer },
4358
- index.h("div", null, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
4359
- index.h("sqm-skeleton", { width: "15%", height: "10px" }),
4360
- index.h("sqm-skeleton", { width: "25%", height: "24px" }))) : (index.h("div", null,
4361
- index.h("div", null,
4362
- index.h("span", { class: sheet$4.classes.TaxFormDetailsContainer },
4363
- index.h("div", { class: sheet$4.classes.StatusContainer },
4364
- index.h("h3", null, states.documentType
4365
- ? global.intl.formatMessage({
4366
- id: "section-subheader",
4367
- defaultMessage: text.taxDocumentSectionSubHeader,
4368
- }, {
4369
- documentType: states.documentTypeString,
4370
- })
4371
- : text.taxDocumentSectionSubHeaderNoDocument),
4372
- index.h("span", { class: sheet$4.classes.StatusAlert }, statusMap[states.status]))),
4373
- (!states.noFormNeeded || !!states.status) &&
4374
- states.status !== "NOT_VERIFIED" && (index.h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$4.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
4375
- index.h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
4376
- index.h("sqm-skeleton", { width: "15%", height: "10px" }),
4377
- index.h("sqm-skeleton", { width: "25%", height: "24px" }))) : (index.h("div", null,
4378
- index.h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
4379
- text.indirectTaxInfoSectionHeader,
4380
- index.h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet$4.classes.DropdownTooltipContainer },
4381
- index.h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet$4.classes.ToolTip, style: { cursor: "pointer" } }),
4382
- index.h("div", { class: sheet$4.classes.DropdownContent },
4383
- index.h("div", { class: sheet$4.classes.DropdownArrow }),
4384
- global.intl.formatMessage({
4385
- id: "indirectTaxTooltipSupport",
4386
- defaultMessage: text.indirectTaxTooltipSupport,
4387
- }, {
4388
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet$4.classes.DropdownLink }, text.supportLink)),
4389
- })))),
4390
- index.h("div", { class: sheet$4.classes.IndirectTaxPreviewDetails },
4391
- index.h("span", null, states.notRegistered ? (index.h("span", { class: sheet$4.classes.NotRegisteredIndirectTaxText }, global.intl.formatMessage({
4392
- id: "notRegisteredForTax",
4393
- defaultMessage: text.notRegisteredForTax,
4394
- }, {
4395
- supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4396
- }))) : (getIndirectTaxRegisteredIn())),
4397
- !states.notRegistered && (index.h("div", { class: sheet$4.classes.TaxNumberContainer },
4398
- index.h("span", null, global.intl.formatMessage({
4399
- id: `indirectTaxDetails`,
4400
- defaultMessage: text.indirectTaxDetails,
4401
- }, {
4402
- indirectTaxType: states.indirectTaxType,
4403
- indirectTaxNumber: states.indirectTaxNumber,
4404
- })),
4405
- index.h("span", null,
4406
- states.qstNumber &&
4407
- global.intl.formatMessage({
4408
- id: `qstNumber`,
4409
- defaultMessage: text.qstNumber,
4410
- }, {
4411
- qstNumber: states.qstNumber,
4412
- }),
4413
- states.subRegionTaxNumber &&
4414
- global.intl.formatMessage({
4415
- id: `subRegionTaxNumber`,
4416
- defaultMessage: text.subRegionTaxNumber,
4417
- }, {
4418
- subRegionTaxNumber: states.subRegionTaxNumber,
4419
- })))),
4420
- !states.notRegistered && (index.h("div", { class: sheet$4.classes.InvoiceTableContainer },
4421
- index.h("sqm-invoice-table", { description: text.invoiceDescription, "prev-label": text.invoicePrevLabel, "more-label": text.invoiceMoreLabel, header: text.invoiceHeader, "empty-state-header": text.invoiceEmptyStateHeader, "empty-state-text": text.invoiceEmptyStateText },
4422
- index.h("sqm-invoice-table-download-column", null),
4423
- index.h("sqm-invoice-table-date-column", { "column-title": text.dateColumnTitle }),
4424
- index.h("sqm-invoice-table-data-column", { "column-title": text.invoiceColumnTitle, property: "invoiceId" }),
4425
- index.h("sqm-invoice-table-data-column", { "column-title": text.earningsColumnTitle, property: "earnings" }),
4426
- index.h("sqm-invoice-table-data-column", { "column-title": text.indirectTaxColumnTitle, property: "indirectTax" }),
4427
- index.h("sqm-invoice-table-data-column", { "column-title": text.earningsAfterTaxColumnTitle, property: "netEarnings" })))))))))));
4428
- };
4429
-
4430
3838
  const GET_TAX_SETTING = index_module.dist.gql `
4431
3839
  query getTenantSettings {
4432
3840
  tenantSettings {
@@ -4448,12 +3856,12 @@ function getSubRegionName(regionCode) {
4448
3856
  return "";
4449
3857
  // Impact adds an underscore to some regions
4450
3858
  const standardCode = regionCode.replace("_", "");
4451
- const regions = [...sqmUserInfoFormView.INDIRECT_TAX_PROVINCES, ...sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS];
3859
+ const regions = [...subregions.INDIRECT_TAX_PROVINCES, ...subregions.INDIRECT_TAX_SPAIN_REGIONS];
4452
3860
  return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
4453
3861
  }
4454
3862
  function getIndirectTaxType(taxInformation) {
4455
3863
  var _a;
4456
- const regions = [...sqmUserInfoFormView.INDIRECT_TAX_PROVINCES, ...sqmUserInfoFormView.INDIRECT_TAX_SPAIN_REGIONS];
3864
+ const regions = [...subregions.INDIRECT_TAX_PROVINCES, ...subregions.INDIRECT_TAX_SPAIN_REGIONS];
4457
3865
  if (taxInformation === null || taxInformation === void 0 ? void 0 : taxInformation.indirectTaxRegion) {
4458
3866
  const standardRegion = taxInformation.indirectTaxRegion.replace("_", "");
4459
3867
  const taxType = (_a = regions.find((r) => r.regionCode === standardRegion)) === null || _a === void 0 ? void 0 : _a.taxType;
@@ -4473,7 +3881,7 @@ const useTaxAndCashDashboard = (props) => {
4473
3881
  const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
4474
3882
  const setContext = index_module.En(data.TAX_FORM_CONTEXT_NAMESPACE);
4475
3883
  const [showDialog, setShowDialog] = domContextHooks_module.useState(false);
4476
- const { render, loading: veriffLoading, errors: veriffErrors, } = usePayoutStatus.useVeriffApp();
3884
+ const { render, loading: veriffLoading, errors: veriffErrors, } = useIndirectTaxForm.useVeriffApp();
4477
3885
  const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
4478
3886
  const locale = index_module.L();
4479
3887
  domContextHooks_module.useEffect(() => {
@@ -4512,13 +3920,13 @@ const useTaxAndCashDashboard = (props) => {
4512
3920
  });
4513
3921
  setStep("/3");
4514
3922
  };
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;
3923
+ const provinceName = (_d = subregions.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;
3924
+ const payoutStatus = data$1 ? useIndirectTaxForm.getStatus(data$1) : null;
4517
3925
  domContextHooks_module.useEffect(() => {
4518
3926
  const cb = () => refetch();
4519
- window.addEventListener(usePayoutStatus.VERIFF_COMPLETE_EVENT_KEY, cb);
3927
+ window.addEventListener(useIndirectTaxForm.VERIFF_COMPLETE_EVENT_KEY, cb);
4520
3928
  return () => {
4521
- window.removeEventListener(usePayoutStatus.VERIFF_COMPLETE_EVENT_KEY, cb);
3929
+ window.removeEventListener(useIndirectTaxForm.VERIFF_COMPLETE_EVENT_KEY, cb);
4522
3930
  };
4523
3931
  }, []);
4524
3932
  const enforceUsTaxComplianceOption = (_e = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _e === void 0 ? void 0 : _e.enforceUsTaxCompliance;
@@ -4527,7 +3935,7 @@ const useTaxAndCashDashboard = (props) => {
4527
3935
  dateSubmitted,
4528
3936
  documentType,
4529
3937
  canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
4530
- documentTypeString: data.taxTypeToName(documentType),
3938
+ documentTypeString: subregions.taxTypeToName(documentType),
4531
3939
  status: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _f === void 0 ? void 0 : _f.status,
4532
3940
  subRegion: getSubRegionName((_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.indirectTaxRegion),
4533
3941
  subRegionTaxNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.withholdingTaxId,
@@ -4968,7 +4376,7 @@ const TaxAndCashDashboard = class {
4968
4376
  const props = index_module.isDemo()
4969
4377
  ? useDemoTaxAndCashDashboard(this)
4970
4378
  : useTaxAndCashDashboard(this);
4971
- return (index.h(index.Host, null, index.h(TaxAndCashDashboardView, { callbacks: props.callbacks, states: props.states, text: props.text, slots: {
4379
+ return (index.h(index.Host, null, index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { callbacks: props.callbacks, states: props.states, text: props.text, slots: {
4972
4380
  payoutDetailsCardSlot: (index.h("sqm-payout-details-card", Object.assign({}, this.getTextProps()))),
4973
4381
  } })));
4974
4382
  }
@@ -5036,7 +4444,8 @@ function useUserInfoForm(props) {
5036
4444
  const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
5037
4445
  const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
5038
4446
  const user = index_module.J();
5039
- const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
4447
+ const [connectImpactPartner, { loading: connectLoading }] = index_module.$e(useIndirectTaxForm.CONNECT_PARTNER);
4448
+ const [completeImpactPartner, { loading: completeLoading }] = index_module.$e(useIndirectTaxForm.COMPLETE_PARTNER);
5040
4449
  const { data: tenantData } = index_module.wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
5041
4450
  const { data: data$1, loading, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
5042
4451
  const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
@@ -5058,7 +4467,7 @@ function useUserInfoForm(props) {
5058
4467
  if (!user || step !== "/1")
5059
4468
  return;
5060
4469
  // If form already filled out, skip initialising it
5061
- if (data.objectIsFull(userFormContext))
4470
+ if (subregions.objectIsFull(userFormContext))
5062
4471
  return;
5063
4472
  // Prefer MI email if it was verified before this
5064
4473
  const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
@@ -5071,8 +4480,13 @@ function useUserInfoForm(props) {
5071
4480
  lastName: user.impactConnection.user.lastName,
5072
4481
  countryCode: user.impactConnection.publisher.countryCode,
5073
4482
  currency: user.impactConnection.publisher.currency,
5074
- phoneNumberCountryCode: user.impactConnection.publisher.phoneNumberCountryCode,
5075
- phoneNumber: user.impactConnection.publisher.phoneNumber,
4483
+ // when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "0000000" and the phoneNumberCountryCode to "DZ"
4484
+ phoneNumberCountryCode: user.impactConnection.publisher.phoneNumber === "0000000"
4485
+ ? null
4486
+ : user.impactConnection.publisher.phoneNumberCountryCode,
4487
+ phoneNumber: user.impactConnection.publisher.phoneNumber === "0000000"
4488
+ ? null
4489
+ : user.impactConnection.publisher.phoneNumber,
5076
4490
  address: user.impactConnection.publisher.billingAddress,
5077
4491
  city: user.impactConnection.publisher.billingCity,
5078
4492
  state: user.impactConnection.publisher.billingState,
@@ -5127,9 +4541,7 @@ function useUserInfoForm(props) {
5127
4541
  setFilteredPhoneCountries(countries || []);
5128
4542
  }
5129
4543
  else {
5130
- setFilteredPhoneCountries(countries.filter((c) => c.displayName
5131
- .toLowerCase()
5132
- .includes(phoneCountrySearch.toLowerCase())) || []);
4544
+ setFilteredPhoneCountries(countries.filter((c) => c.displayName.toLowerCase().includes(phoneCountrySearch.toLowerCase())) || []);
5133
4545
  }
5134
4546
  }, [phoneCountrySearch, countries]);
5135
4547
  domContextHooks_module.useEffect(() => {
@@ -5143,7 +4555,7 @@ function useUserInfoForm(props) {
5143
4555
  }
5144
4556
  }, [currencySearch, currencies]);
5145
4557
  async function connectPartner(formData) {
5146
- var _a, _b, _c, _d, _e;
4558
+ var _a, _b, _c, _d;
5147
4559
  const vars = {
5148
4560
  user: {
5149
4561
  id: user.id,
@@ -5160,23 +4572,36 @@ function useUserInfoForm(props) {
5160
4572
  phoneNumber: formData.phoneNumber,
5161
4573
  phoneNumberCountryCode: formData.phoneNumberCountryCode,
5162
4574
  };
5163
- const result = await connectImpactPartner({
4575
+ let result = null;
4576
+ let connectionResult;
4577
+ result = await completeImpactPartner({
5164
4578
  vars,
5165
4579
  });
5166
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
4580
+ connectionResult = (_a = result) === null || _a === void 0 ? void 0 : _a.completeImpactConnection;
4581
+ // if (userData?.impactConnection?.connectionStatus === "STARTED") {
4582
+ // result = await completeImpactPartner({
4583
+ // vars,
4584
+ // });
4585
+ // connectionResult = (result as CompletePartnerResult)
4586
+ // ?.completeImpactConnection;
4587
+ // } else {
4588
+ // result = await connectImpactPartner({
4589
+ // vars,
4590
+ // });
4591
+ // connectionResult = (result as ConnectPartnerResult)
4592
+ // ?.createImpactConnection;
4593
+ // }
4594
+ if (!result || ((_b = result) === null || _b === void 0 ? void 0 : _b.message))
5167
4595
  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);
4596
+ if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
4597
+ console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
5172
4598
  throw new Error();
5173
4599
  }
5174
4600
  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);
4601
+ const resultPublisher = (_d = (_c = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher;
4602
+ const hasValidCurrentDocument = subregions.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
5178
4603
  // Fire form change event
5179
- window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
4604
+ window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
5180
4605
  return {
5181
4606
  resultPublisher,
5182
4607
  hasValidCurrentDocument,
@@ -5194,7 +4619,7 @@ function useUserInfoForm(props) {
5194
4619
  // custom validation
5195
4620
  if (typeof control.validationError === "function") {
5196
4621
  const validate = control.validationError;
5197
- const validationError = validate({ control, key, value });
4622
+ const validationError = validate({ control, key, value, formData });
5198
4623
  if (validationError)
5199
4624
  jsonpointer.jsonpointer.set(errors, key, validationError);
5200
4625
  }
@@ -5266,7 +4691,7 @@ function useUserInfoForm(props) {
5266
4691
  }
5267
4692
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
5268
4693
  const regionObj = hasStates
5269
- ? sqmUserInfoFormView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
4694
+ ? subregions.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
5270
4695
  : {};
5271
4696
  return {
5272
4697
  setStep: setStep,
@@ -5298,9 +4723,9 @@ function useUserInfoForm(props) {
5298
4723
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
5299
4724
  hideState: !hasStates,
5300
4725
  hideSteps: !!context.hideSteps,
5301
- disabled: loading || connectLoading,
4726
+ disabled: loading || connectLoading || completeLoading,
5302
4727
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
5303
- loading: loading || connectLoading,
4728
+ loading: loading || connectLoading || completeLoading,
5304
4729
  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
4730
  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
4731
  formState: {
@@ -5363,10 +4788,6 @@ const TaxForm = class {
5363
4788
  * @uiName Currency field label
5364
4789
  */
5365
4790
  this.currency = "Currency";
5366
- /**
5367
- * @uiName Currency field help text
5368
- */
5369
- this.currencyHelpText = "Choose your preferred payout currency";
5370
4791
  /**
5371
4792
  * @uiName Setup progress
5372
4793
  */