@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
@@ -2,8 +2,10 @@
2
2
 
3
3
  const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
4
4
  const index_module = require('./index.module-f8c8495f.js');
5
-
6
- const TAX_FORM_UPDATED_EVENT_KEY = "sqm:tax-form-updated";
5
+ const jsonpointer = require('./jsonpointer-11327262.js');
6
+ const subregions = require('./subregions-984e30d7.js');
7
+ const data = require('./data-89ac73dd.js');
8
+ const eventKeys = require('./eventKeys-7af4df4d.js');
7
9
 
8
10
  var toArray = function toArray(a) {
9
11
  var ret = Array(a.length);
@@ -1062,10 +1064,10 @@ function usePayoutStatus(props) {
1062
1064
  }, [data]);
1063
1065
  domContextHooks_module.useEffect(() => {
1064
1066
  const cb = () => refetch();
1065
- window.addEventListener(TAX_FORM_UPDATED_EVENT_KEY, cb);
1067
+ window.addEventListener(eventKeys.TAX_FORM_UPDATED_EVENT_KEY, cb);
1066
1068
  window.addEventListener(VERIFF_COMPLETE_EVENT_KEY, cb);
1067
1069
  return () => {
1068
- window.removeEventListener(TAX_FORM_UPDATED_EVENT_KEY, cb);
1070
+ window.removeEventListener(eventKeys.TAX_FORM_UPDATED_EVENT_KEY, cb);
1069
1071
  window.removeEventListener(VERIFF_COMPLETE_EVENT_KEY, cb);
1070
1072
  };
1071
1073
  }, []);
@@ -1109,8 +1111,295 @@ function usePayoutStatus(props) {
1109
1111
  };
1110
1112
  }
1111
1113
 
1112
- exports.TAX_FORM_UPDATED_EVENT_KEY = TAX_FORM_UPDATED_EVENT_KEY;
1114
+ const CONNECT_PARTNER = index_module.dist.gql `
1115
+ mutation createImpactConnection($vars: ImpactConnectionInput!) {
1116
+ createImpactConnection(impactConnectionInput: $vars) {
1117
+ success
1118
+ validationErrors {
1119
+ field
1120
+ message
1121
+ }
1122
+ user {
1123
+ id
1124
+ accountId
1125
+ impactConnection {
1126
+ connected
1127
+ publisher {
1128
+ brandedSignup
1129
+ requiredTaxDocumentType
1130
+ currentTaxDocument {
1131
+ type
1132
+ status
1133
+ }
1134
+ }
1135
+ }
1136
+ }
1137
+ }
1138
+ }
1139
+ `;
1140
+ const COMPLETE_PARTNER = index_module.dist.gql `
1141
+ mutation completeImpactConnection($vars: ImpactConnectionInput!) {
1142
+ completeImpactConnection(impactConnectionInput: $vars) {
1143
+ success
1144
+ validationErrors {
1145
+ field
1146
+ message
1147
+ }
1148
+ user {
1149
+ id
1150
+ accountId
1151
+ impactConnection {
1152
+ connected
1153
+ publisher {
1154
+ brandedSignup
1155
+ requiredTaxDocumentType
1156
+ currentTaxDocument {
1157
+ type
1158
+ status
1159
+ }
1160
+ }
1161
+ }
1162
+ }
1163
+ }
1164
+ }
1165
+ `;
1166
+ function getOption(countries, countryCode) {
1167
+ if (!countries)
1168
+ return;
1169
+ if (countries.find((c) => c.countryCode === countryCode)) {
1170
+ return "otherRegion";
1171
+ }
1172
+ else {
1173
+ return "notRegistered";
1174
+ }
1175
+ }
1176
+ function useIndirectTaxForm(props) {
1177
+ var _a, _b, _c, _d, _e;
1178
+ const user = index_module.J();
1179
+ const locale = index_module.L();
1180
+ const formRef = domContextHooks_module.useRef(null);
1181
+ const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
1182
+ const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
1183
+ const [connectImpactPartner, { loading: connectLoading }] = index_module.$e(CONNECT_PARTNER);
1184
+ const [completeImpactPartner, { loading: completeLoading }] = index_module.$e(COMPLETE_PARTNER);
1185
+ const userForm = index_module.Fn(data.USER_FORM_CONTEXT_NAMESPACE);
1186
+ const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
1187
+ const { data: _countriesRes, loading: countriesLoading } = index_module.$n(data.COUNTRIES_QUERY_NAMESPACE);
1188
+ const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
1189
+ 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) => subregions.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
1190
+ const [loading, setLoading] = domContextHooks_module.useState(false);
1191
+ const [formState, setFormState] = domContextHooks_module.useState({});
1192
+ const [errors, setErrors] = domContextHooks_module.useState({});
1193
+ const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
1194
+ const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(_countries || []);
1195
+ const [option, setOption] = domContextHooks_module.useState("notRegistered");
1196
+ 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;
1197
+ domContextHooks_module.useEffect(() => {
1198
+ // reset redirect hash
1199
+ window.location.hash = "";
1200
+ }, []);
1201
+ domContextHooks_module.useEffect(() => {
1202
+ var _a;
1203
+ if (!((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxCountryCode))
1204
+ return;
1205
+ const _option = getOption(_countries, publisher.taxInformation.indirectTaxCountryCode);
1206
+ setOption(_option);
1207
+ }, [publisher, _countries]);
1208
+ domContextHooks_module.useEffect(() => {
1209
+ if (countrySearch.trim() === "") {
1210
+ setFilteredCountries(_countries || []);
1211
+ }
1212
+ else {
1213
+ setFilteredCountries((_countries === null || _countries === void 0 ? void 0 : _countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase()))) || []);
1214
+ }
1215
+ }, [countrySearch, _countries]);
1216
+ domContextHooks_module.useEffect(() => {
1217
+ var _a, _b;
1218
+ const user = userData === null || userData === void 0 ? void 0 : userData.user;
1219
+ if (!user)
1220
+ return;
1221
+ if ((_b = (_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.taxInformation) {
1222
+ setFormState({
1223
+ province: user.impactConnection.publisher.taxInformation.indirectTaxRegion,
1224
+ subRegion: user.impactConnection.publisher.taxInformation.indirectTaxRegion,
1225
+ hasQst: !!user.impactConnection.publisher.taxInformation.additionalTaxId,
1226
+ qstNumber: user.impactConnection.publisher.taxInformation.additionalTaxId,
1227
+ hasSubRegionTaxNumber: !!user.impactConnection.publisher.taxInformation.withholdingTaxId,
1228
+ subRegionTaxNumber: user.impactConnection.publisher.taxInformation.withholdingTaxId,
1229
+ selectedRegion: user.impactConnection.publisher.taxInformation.indirectTaxCountryCode,
1230
+ indirectTaxNumber: user.impactConnection.publisher.taxInformation.indirectTaxId,
1231
+ });
1232
+ }
1233
+ else {
1234
+ setFormState({
1235
+ selectedRegion: (user === null || user === void 0 ? void 0 : user.countryCode) || (userForm === null || userForm === void 0 ? void 0 : userForm.countryCode),
1236
+ });
1237
+ }
1238
+ }, [userData, userForm]);
1239
+ const onFormChange = (field, e) => {
1240
+ var _a, _b;
1241
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
1242
+ if (!value)
1243
+ console.error("Could not detect select change");
1244
+ setFormState((p) => ({ ...p, [field]: value }));
1245
+ };
1246
+ async function connectPartner(formData) {
1247
+ var _a, _b, _c, _d, _e, _f, _g;
1248
+ const vars = {
1249
+ user: {
1250
+ id: user.id,
1251
+ accountId: user.accountId,
1252
+ },
1253
+ firstName: userForm.firstName,
1254
+ lastName: userForm.lastName,
1255
+ countryCode: userForm.countryCode,
1256
+ currency: userForm.currency,
1257
+ address: userForm.address,
1258
+ city: userForm.city,
1259
+ state: userForm.state,
1260
+ postalCode: userForm.postalCode,
1261
+ phoneNumber: userForm.phoneNumber,
1262
+ phoneNumberCountryCode: userForm.phoneNumberCountryCode,
1263
+ indirectTaxCountryCode: formData.selectedRegion,
1264
+ indirectTaxRegion: formData.province || formData.subRegion,
1265
+ indirectTaxId: formData.indirectTaxNumber,
1266
+ additionalTaxId: formData.qstNumber,
1267
+ withholdingTaxId: formData.subRegionTaxNumber,
1268
+ };
1269
+ // If the partner has already been started call completeImpactConnection
1270
+ // to fill in the remaining details. Otherwise create from scratch.
1271
+ let result = null;
1272
+ let connectionResult;
1273
+ if (((_b = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.connectionStatus) === "STARTED") {
1274
+ result = await completeImpactPartner({
1275
+ vars,
1276
+ });
1277
+ connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.completeImpactConnection;
1278
+ }
1279
+ else {
1280
+ result = await connectImpactPartner({
1281
+ vars,
1282
+ });
1283
+ connectionResult = (_d = result) === null || _d === void 0 ? void 0 : _d.createImpactConnection;
1284
+ }
1285
+ if (!result || ((_e = result) === null || _e === void 0 ? void 0 : _e.message))
1286
+ throw new Error();
1287
+ if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
1288
+ // Output backend errors to console for now
1289
+ console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
1290
+ throw new Error();
1291
+ }
1292
+ await refetch();
1293
+ const resultPublisher = (_g = (_f = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher;
1294
+ const hasValidCurrentDocument = subregions.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
1295
+ // Fire form change event
1296
+ window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
1297
+ return {
1298
+ resultPublisher,
1299
+ hasValidCurrentDocument,
1300
+ };
1301
+ }
1302
+ const onSubmit = async (event) => {
1303
+ if (!option) {
1304
+ setErrors({ taxDetails: true });
1305
+ return;
1306
+ }
1307
+ let formData = { taxOption: option };
1308
+ let validationErrors = {};
1309
+ const controls = event.target.getFormControls();
1310
+ controls.forEach((control) => {
1311
+ if (!control.name || !control.id)
1312
+ return;
1313
+ if (option === "notRegistered")
1314
+ return; // Don't include fields for notRegistered option
1315
+ const key = control.name;
1316
+ const value = control.value;
1317
+ jsonpointer.jsonpointer.set(formData, key, value);
1318
+ if (control.required && !value) {
1319
+ jsonpointer.jsonpointer.set(validationErrors, key, true);
1320
+ }
1321
+ });
1322
+ setErrors(validationErrors);
1323
+ if (Object.keys(validationErrors).length) {
1324
+ return;
1325
+ }
1326
+ setLoading(true);
1327
+ try {
1328
+ const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
1329
+ if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
1330
+ !hasValidCurrentDocument) {
1331
+ // Go to docusign form
1332
+ setStep("/3");
1333
+ }
1334
+ else {
1335
+ if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
1336
+ // Go to banking information form
1337
+ setStep("/4");
1338
+ }
1339
+ else {
1340
+ // Go right to the dashboard
1341
+ setStep("/dashboard");
1342
+ }
1343
+ }
1344
+ }
1345
+ catch (e) {
1346
+ setErrors({ general: true });
1347
+ }
1348
+ finally {
1349
+ setLoading(false);
1350
+ }
1351
+ };
1352
+ const onBack = () => {
1353
+ setStep(context.overrideBackStep || "/1");
1354
+ };
1355
+ return {
1356
+ states: {
1357
+ step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
1358
+ hideSteps: context.hideSteps,
1359
+ disabled: loading || countriesLoading || connectLoading || completeLoading,
1360
+ loading: loading || connectLoading || countriesLoading || completeLoading,
1361
+ 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),
1362
+ loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
1363
+ formState: {
1364
+ checked: option,
1365
+ errors,
1366
+ },
1367
+ },
1368
+ callbacks: {
1369
+ onBack,
1370
+ onSubmit,
1371
+ onFormChange,
1372
+ onChange: setOption,
1373
+ setCountrySearch,
1374
+ onQstToggle: () => setFormState((p) => ({ ...p, hasQst: !p.hasQst })),
1375
+ onSpainToggle: () => setFormState((p) => ({
1376
+ ...p,
1377
+ hasSubRegionTaxNumber: !p.hasSubRegionTaxNumber,
1378
+ })),
1379
+ },
1380
+ data: {
1381
+ esRegions: subregions.INDIRECT_TAX_SPAIN_REGIONS,
1382
+ countries: filteredCountries,
1383
+ allCountries: _countries,
1384
+ provinces: subregions.INDIRECT_TAX_PROVINCES,
1385
+ },
1386
+ text: props.getTextProps(),
1387
+ refs: {
1388
+ formRef,
1389
+ },
1390
+ slotProps: {
1391
+ formState: {
1392
+ ...formState,
1393
+ errors,
1394
+ },
1395
+ },
1396
+ };
1397
+ }
1398
+
1399
+ exports.COMPLETE_PARTNER = COMPLETE_PARTNER;
1400
+ exports.CONNECT_PARTNER = CONNECT_PARTNER;
1113
1401
  exports.VERIFF_COMPLETE_EVENT_KEY = VERIFF_COMPLETE_EVENT_KEY;
1114
1402
  exports.getStatus = getStatus;
1403
+ exports.useIndirectTaxForm = useIndirectTaxForm;
1115
1404
  exports.usePayoutStatus = usePayoutStatus;
1116
1405
  exports.useVeriffApp = useVeriffApp;
@@ -5,6 +5,7 @@
5
5
  "./components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js",
6
6
  "./components/sqm-referral-codes/sqm-referral-codes.js",
7
7
  "./components/sqm-pagination/sqm-pagination.js",
8
+ "./components/sqm-partner-info-modal/sqm-partner-info-modal.js",
8
9
  "./components/sqm-password-field/sqm-password-field.js",
9
10
  "./components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js",
10
11
  "./components/sqm-referral-table/sqm-referral-table.js",
@@ -0,0 +1,171 @@
1
+ import { h } from "@stencil/core";
2
+ import { PartnerInfoModalView, } from "./sqm-partner-info-modal-view";
3
+ export default {
4
+ title: "Components/Partner Info Modal",
5
+ };
6
+ const demoCountries = [
7
+ { countryCode: "US", displayName: "United States" },
8
+ { countryCode: "CA", displayName: "Canada" },
9
+ { countryCode: "GB", displayName: "United Kingdom" },
10
+ { countryCode: "AU", displayName: "Australia" },
11
+ { countryCode: "DE", displayName: "Germany" },
12
+ { countryCode: "FR", displayName: "France" },
13
+ { countryCode: "JP", displayName: "Japan" },
14
+ ];
15
+ const demoCurrencies = [
16
+ { currencyCode: "USD", displayName: "US Dollar" },
17
+ { currencyCode: "CAD", displayName: "Canadian Dollar" },
18
+ { currencyCode: "GBP", displayName: "British Pound" },
19
+ { currencyCode: "EUR", displayName: "Euro" },
20
+ { currencyCode: "AUD", displayName: "Australian Dollar" },
21
+ ];
22
+ const noopCallbacks = {
23
+ onCountryChange: (e) => console.log("Country changed:", e),
24
+ onCurrencyChange: (e) => console.log("Currency changed:", e),
25
+ onCheckboxChange: (e) => console.log("Checkbox changed:", e),
26
+ setCountrySearch: (v) => console.log("Country search:", v),
27
+ setCurrencySearch: (v) => console.log("Currency search:", v),
28
+ onSubmit: () => console.log("Submit"),
29
+ onClose: () => console.log("Close"),
30
+ };
31
+ const defaultText = {
32
+ modalHeader: "Let's get you ready for rewards",
33
+ modalHeaderExistingPartner: "We found an existing account",
34
+ descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
35
+ descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
36
+ supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
37
+ supportLink: "Support",
38
+ countryLabel: "Country",
39
+ currencyLabel: "Currency",
40
+ submitButtonLabel: "Submit",
41
+ confirmButtonLabel: "Confirm",
42
+ searchCountryPlaceholder: "Search for a country",
43
+ searchCurrencyPlaceholder: "Search for a currency",
44
+ bankingCollectionText: "",
45
+ allowBankingCollection: "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",
46
+ termsAndConditionsLabel: "terms and conditions",
47
+ termsAndConditionsLink: "https://terms.advocate.impact.com/PayoutTermsAndConditions.html",
48
+ };
49
+ const defaultProps = {
50
+ states: {
51
+ open: true,
52
+ loading: false,
53
+ submitting: false,
54
+ isExistingPartner: false,
55
+ countryCode: null,
56
+ currency: null,
57
+ error: "",
58
+ success: false,
59
+ filteredCountries: demoCountries,
60
+ filteredCurrencies: demoCurrencies,
61
+ allowBankingCollection: false,
62
+ disabled: false,
63
+ },
64
+ callbacks: noopCallbacks,
65
+ text: defaultText,
66
+ };
67
+ export const NewPartnerEmpty = () => {
68
+ return h(PartnerInfoModalView, Object.assign({}, defaultProps));
69
+ };
70
+ export const NewPartnerPrefilled = () => {
71
+ const props = {
72
+ ...defaultProps,
73
+ states: {
74
+ ...defaultProps.states,
75
+ countryCode: "US",
76
+ currency: "",
77
+ },
78
+ };
79
+ return h(PartnerInfoModalView, Object.assign({}, props));
80
+ };
81
+ export const NewPartnerFullySelected = () => {
82
+ const props = {
83
+ ...defaultProps,
84
+ states: {
85
+ ...defaultProps.states,
86
+ countryCode: "US",
87
+ currency: "USD",
88
+ },
89
+ };
90
+ return h(PartnerInfoModalView, Object.assign({}, props));
91
+ };
92
+ export const ExistingPartnerConfirm = () => {
93
+ const props = {
94
+ ...defaultProps,
95
+ states: {
96
+ ...defaultProps.states,
97
+ isExistingPartner: true,
98
+ countryCode: "CA",
99
+ currency: "CAD",
100
+ },
101
+ };
102
+ return h(PartnerInfoModalView, Object.assign({}, props));
103
+ };
104
+ export const ExistingPartnerEmpty = () => {
105
+ const props = {
106
+ ...defaultProps,
107
+ states: {
108
+ ...defaultProps.states,
109
+ isExistingPartner: true,
110
+ countryCode: "",
111
+ currency: "",
112
+ },
113
+ };
114
+ return h(PartnerInfoModalView, Object.assign({}, props));
115
+ };
116
+ export const Submitting = () => {
117
+ const props = {
118
+ ...defaultProps,
119
+ states: {
120
+ ...defaultProps.states,
121
+ countryCode: "GB",
122
+ currency: "GBP",
123
+ submitting: true,
124
+ },
125
+ };
126
+ return h(PartnerInfoModalView, Object.assign({}, props));
127
+ };
128
+ export const WithError = () => {
129
+ const props = {
130
+ ...defaultProps,
131
+ states: {
132
+ ...defaultProps.states,
133
+ countryCode: "US",
134
+ currency: "USD",
135
+ error: "An error occurred while creating your partner account. Please try again.",
136
+ },
137
+ };
138
+ return h(PartnerInfoModalView, Object.assign({}, props));
139
+ };
140
+ export const ValidationError = () => {
141
+ const props = {
142
+ ...defaultProps,
143
+ states: {
144
+ ...defaultProps.states,
145
+ countryCode: "",
146
+ currency: "",
147
+ error: "Please select both a country and currency.",
148
+ },
149
+ };
150
+ return h(PartnerInfoModalView, Object.assign({}, props));
151
+ };
152
+ export const Closed = () => {
153
+ const props = {
154
+ ...defaultProps,
155
+ states: {
156
+ ...defaultProps.states,
157
+ open: false,
158
+ },
159
+ };
160
+ return h(PartnerInfoModalView, Object.assign({}, props));
161
+ };
162
+ export const SQMComponentExistingPartner = () => {
163
+ return (h("sqm-partner-info-modal", { "support-link": "Support", "support-description-existing-partner": "If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.", "allow-banking-collection": "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information", "terms-and-conditions-label": "terms and conditions", "terms-and-conditions-link": "https://terms.advocate.impact.com/PayoutTermsAndConditions.html", demoData: {
164
+ states: { open: true, isExistingPartner: true },
165
+ } }));
166
+ };
167
+ export const SQMComponentNewPartner = () => {
168
+ return (h("sqm-partner-info-modal", { demoData: {
169
+ states: { open: true, isExistingPartner: false },
170
+ } }));
171
+ };
@@ -0,0 +1,149 @@
1
+ import { h } from "@stencil/core";
2
+ import { createStyleSheet } from "../../styling/JSS";
3
+ import { intl } from "../../global/global";
4
+ const style = {
5
+ Dialog: {
6
+ "&::part(panel)": {
7
+ maxWidth: "480px",
8
+ },
9
+ "&::part(body)": {
10
+ padding: "0 var(--sl-spacing-x-large)",
11
+ fontSize: "var(--sl-font-size-small)",
12
+ overflow: "visible",
13
+ },
14
+ "&::part(overlay)": {
15
+ background: "var(--sl-overlay-background-color)",
16
+ },
17
+ },
18
+ DialogTitle: {
19
+ fontSize: "var(--sl-font-size-x-large)",
20
+ fontWeight: "600",
21
+ padding: "var(--sl-spacing-large) 0 0 0",
22
+ margin: "0",
23
+ },
24
+ FormFields: {
25
+ display: "flex",
26
+ flexDirection: "column",
27
+ gap: "var(--sl-spacing-medium)",
28
+ marginTop: "var(--sl-spacing-large)",
29
+ },
30
+ ErrorMessage: {
31
+ marginTop: "var(--sl-spacing-x-small)",
32
+ },
33
+ SearchInput: {
34
+ "&::part(base)": {
35
+ border: "none",
36
+ borderBottom: "1px solid var(--sl-color-neutral-300)",
37
+ borderRadius: "0",
38
+ },
39
+ },
40
+ SelectMenu: {
41
+ maxHeight: "300px",
42
+ },
43
+ DescriptionContainer: {
44
+ display: "flex",
45
+ flexDirection: "column",
46
+ gap: "var(--sl-spacing-medium)",
47
+ margin: "0",
48
+ "& > p": {
49
+ margin: "0",
50
+ },
51
+ },
52
+ CheckboxWrapper: {
53
+ display: "flex",
54
+ justifyContent: "flex-start",
55
+ flexDirection: "column",
56
+ },
57
+ Checkbox: {
58
+ "&::part(label)": {
59
+ fontSize: "var(--sl-font-size-small)",
60
+ },
61
+ },
62
+ SubmitButton: {
63
+ width: "100%",
64
+ marginTop: "var(--sl-spacing-large)",
65
+ "&::part(base)": {
66
+ color: "var(--sqm-primary-button-color)",
67
+ backgroundColor: "var(--sqm-primary-button-background)",
68
+ border: "var(--sqm-primary-button-color-border)",
69
+ borderRadius: "var(--sqm-primary-button-radius)",
70
+ },
71
+ },
72
+ };
73
+ export function PartnerInfoModalContentView(props) {
74
+ var _a, _b;
75
+ const { states, callbacks, text } = props;
76
+ const sheet = createStyleSheet(style);
77
+ const styleString = sheet.toString();
78
+ const supportMessage = intl.formatMessage({
79
+ id: "supportDescriptionExistingPartner",
80
+ defaultMessage: text.supportDescriptionExistingPartner,
81
+ }, {
82
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
83
+ });
84
+ const description = states.isExistingPartner ? (h("span", { class: sheet.classes.DescriptionContainer },
85
+ h("p", null, text.descriptionExistingPartner),
86
+ h("p", null, supportMessage))) : (h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
87
+ const buttonLabel = states.isExistingPartner
88
+ ? text.confirmButtonLabel
89
+ : text.submitButtonLabel;
90
+ const bankingCollectionText = intl.formatMessage({
91
+ id: "bankingCollectionText",
92
+ defaultMessage: text.allowBankingCollection,
93
+ }, {
94
+ termsAndConditionsLink: (h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
95
+ });
96
+ return (h("div", null,
97
+ h("style", { type: "text/css" },
98
+ " ",
99
+ styleString),
100
+ h("div", { class: sheet.classes.FormFields },
101
+ description,
102
+ h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
103
+ (!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
104
+ h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
105
+ var _a;
106
+ callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
107
+ } }),
108
+ h("div", { class: sheet.classes.SelectMenu }, (_a = states.filteredCountries) === null || _a === void 0 ? void 0 : _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))))),
109
+ h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
110
+ h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }),
111
+ h("div", { class: sheet.classes.SelectMenu }, (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 : _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
112
+ c.currencyCode,
113
+ " - ",
114
+ c.displayName))))),
115
+ h("div", { class: sheet.classes.CheckboxWrapper },
116
+ h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
117
+ states.error && (h("div", { class: sheet.classes.ErrorMessage },
118
+ h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
119
+ h("p", { part: "alert-description" }, states.error)))),
120
+ h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
121
+ !states.countryCode ||
122
+ !states.currency ||
123
+ !states.allowBankingCollection, onClick: callbacks.onSubmit, class: sheet.classes.SubmitButton, exportparts: "base: primarybutton-base" }, buttonLabel)));
124
+ }
125
+ export function PartnerInfoModalView(props) {
126
+ const { states, text, callbacks } = props;
127
+ const sheet = createStyleSheet(style);
128
+ const styleString = sheet.toString();
129
+ if (!states.open)
130
+ return h("div", null);
131
+ return (h("div", null,
132
+ h("style", { type: "text/css" },
133
+ " ",
134
+ styleString),
135
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: states.isExistingPartner
136
+ ? text.modalHeaderExistingPartner
137
+ : text.modalHeader, "onSl-request-close": (e) => {
138
+ e.preventDefault();
139
+ }, "onSl-hide": (e) => {
140
+ var _a;
141
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
142
+ e.preventDefault();
143
+ }
144
+ }, "onSl-initial-focus": callbacks.onInitialFocus },
145
+ h("h2", { class: sheet.classes.DialogTitle }, states.isExistingPartner
146
+ ? text.modalHeaderExistingPartner
147
+ : text.modalHeader),
148
+ h(PartnerInfoModalContentView, Object.assign({}, props)))));
149
+ }