@saasquatch/mint-components 2.1.10-57 → 2.1.11-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/dist/cjs/{ShadowViewAddon-a26deae6.js → ShadowViewAddon-2b3f51be.js} +7 -7
  2. package/dist/cjs/{data-8c8a08f6.js → data-6b5095f8.js} +2 -91
  3. package/dist/cjs/eventKeys-7af4df4d.js +5 -0
  4. package/dist/cjs/{global-b7b1b8fe.js → global-0f8b1267.js} +3177 -3126
  5. package/dist/cjs/{index.module-f8c8495f.js → index.module-42d413d9.js} +154 -149
  6. package/dist/cjs/loader.cjs.js +3 -3
  7. package/dist/cjs/mint-components.cjs.js +3 -3
  8. package/dist/cjs/parseStates-d1effc19.js +16 -0
  9. package/dist/cjs/{re-render-72a0ef45.js → re-render-69bde9ee.js} +1 -1
  10. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +484 -99
  11. package/dist/cjs/sqm-big-stat_46.cjs.entry.js +404 -96
  12. package/dist/cjs/sqm-close-button.cjs.entry.js +1 -1
  13. package/dist/cjs/sqm-code-verification.cjs.entry.js +7 -8
  14. package/dist/cjs/sqm-context-router.cjs.entry.js +1 -1
  15. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +892 -0
  16. package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -2
  17. package/dist/cjs/sqm-google-sign-in.cjs.entry.js +1 -1
  18. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
  19. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +3 -3
  20. package/dist/cjs/{sqm-lead-checkbox-field-view-0af2a157.js → sqm-lead-checkbox-field-view-d90f8941.js} +1 -1
  21. package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +4 -4
  22. package/dist/cjs/{sqm-lead-input-field-view-0cd7ebdb.js → sqm-lead-input-field-view-818d9e9a.js} +1 -1
  23. package/dist/cjs/sqm-lead-input-field.cjs.entry.js +4 -4
  24. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
  25. package/dist/cjs/sqm-logout-current-user.cjs.entry.js +1 -1
  26. package/dist/cjs/{sqm-navigation-sidebar-item-view-49b152dd.js → sqm-navigation-sidebar-item-view-20693e59.js} +1 -1
  27. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
  28. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +1 -1
  29. package/dist/cjs/sqm-pagination_3.cjs.entry.js +3 -3
  30. package/dist/cjs/sqm-partner-info-modal-view-464c52c9.js +135 -0
  31. package/dist/cjs/sqm-password-field.cjs.entry.js +2 -2
  32. package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
  33. package/dist/cjs/{sqm-portal-email-verification-view-c81fe7f1.js → sqm-portal-email-verification-view-60f8e0a7.js} +2 -2
  34. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +4 -4
  35. package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +6 -6
  36. package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
  37. package/dist/cjs/{sqm-portal-profile-view-639337e3.js → sqm-portal-profile-view-2bfd7afd.js} +2 -2
  38. package/dist/cjs/sqm-portal-profile.cjs.entry.js +5 -5
  39. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
  40. package/dist/cjs/{sqm-portal-registration-form-view-020f661c.js → sqm-portal-registration-form-view-fd48f1d3.js} +1 -1
  41. package/dist/cjs/{sqm-portal-reset-password-view-6b1acd90.js → sqm-portal-reset-password-view-d90d77f9.js} +1 -1
  42. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +3 -3
  43. package/dist/cjs/{sqm-portal-verify-email-view-424e406a.js → sqm-portal-verify-email-view-b31638f8.js} +2 -2
  44. package/dist/cjs/sqm-qr-code.cjs.entry.js +2 -2
  45. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +6 -6
  46. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
  47. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
  48. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -5
  49. package/dist/cjs/sqm-stencilbook.cjs.entry.js +265 -84
  50. package/dist/cjs/sqm-tab.cjs.entry.js +2 -2
  51. package/dist/cjs/sqm-tabs.cjs.entry.js +3 -3
  52. package/dist/cjs/{sqm-text-span-view-f274fdf2.js → sqm-text-span-view-8a32dd8c.js} +1 -1
  53. package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
  54. package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-01bf2f41.js} +33 -40
  55. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
  56. package/dist/cjs/{useChildElements-041127d7.js → useChildElements-89bc50a9.js} +1 -1
  57. package/dist/cjs/{useInstantAccessRegistration-2398df36.js → useInstantAccessRegistration-651aa95b.js} +2 -2
  58. package/dist/cjs/{useLeadFormState-b4c2ab5b.js → useLeadFormState-76d3b511.js} +2 -2
  59. package/dist/cjs/{usePayoutStatus-0192fccd.js → usePayoutStatus-cf050a03.js} +4 -6
  60. package/dist/cjs/{usePortalRegistrationForm-23ee2d62.js → usePortalRegistrationForm-31822dc4.js} +2 -2
  61. package/dist/cjs/{useReferralCodes-0f7948af.js → useReferralCodes-89c2b972.js} +1 -1
  62. package/dist/cjs/{useReferralTable-6e9de0d5.js → useReferralTable-d3ddfd05.js} +3 -3
  63. package/dist/cjs/{useRegistrationFormState-4fe5b770.js → useRegistrationFormState-a223f597.js} +1 -1
  64. package/dist/cjs/{useVerificationEmail-5d19aa99.js → useVerificationEmail-994bc32f.js} +1 -1
  65. package/dist/cjs/{utilities-fcdb9504.js → utilities-096934ea.js} +1 -1
  66. package/dist/cjs/utils-a8e0bd9b.js +93 -0
  67. package/dist/collection/collection-manifest.json +1 -1
  68. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +150 -0
  69. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +129 -0
  70. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +670 -0
  71. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +284 -0
  72. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +0 -1
  73. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  74. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +1 -27
  75. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +2 -2
  76. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +13 -1
  77. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +2 -2
  78. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +12 -1
  79. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -2
  80. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
  81. package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +16 -0
  82. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +3 -4
  83. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -2
  84. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +510 -11
  85. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +20 -5
  86. package/dist/collection/components/tax-and-cash/data.js +1 -0
  87. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +75 -37
  88. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +688 -13
  89. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +95 -1
  90. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  91. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +49 -11
  92. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  93. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  94. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +4 -0
  95. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  96. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +9 -17
  97. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +34 -16
  98. package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-78b791d2.js} +7 -7
  99. package/dist/{mint-components/p-0c0d4065.js → esm/data-33c16dff.js} +24 -5
  100. package/dist/esm/eventKeys-f76b6a03.js +3 -0
  101. package/dist/esm/{global-96c14d63.js → global-39f55ec2.js} +3177 -3126
  102. package/dist/esm/{index.module-b23fdad8.js → index.module-cede12c6.js} +153 -150
  103. package/dist/esm/{keys-406491dc.js → keys-db1897ae.js} +1 -1
  104. package/dist/esm/loader.js +3 -3
  105. package/dist/esm/mint-components.js +3 -3
  106. package/dist/esm/parseStates-ed75e224.js +14 -0
  107. package/dist/esm/{re-render-f30aeb6b.js → re-render-7a0c7976.js} +1 -1
  108. package/dist/esm/sqm-banking-info-form_10.entry.js +474 -89
  109. package/dist/esm/sqm-big-stat_46.entry.js +398 -90
  110. package/dist/esm/sqm-close-button.entry.js +1 -1
  111. package/dist/esm/sqm-code-verification.entry.js +8 -9
  112. package/dist/esm/sqm-context-router.entry.js +1 -1
  113. package/dist/esm/sqm-email-verification_2.entry.js +887 -0
  114. package/dist/esm/sqm-empty_4.entry.js +2 -2
  115. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  116. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  117. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  118. package/dist/esm/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-7cee2b4e.js} +1 -1
  119. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  120. package/dist/esm/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-11a4f9a9.js} +1 -1
  121. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  122. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  123. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  124. package/dist/esm/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-48e7e0d3.js} +1 -1
  125. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  126. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  127. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  128. package/dist/esm/sqm-partner-info-modal-view-a6324934.js +132 -0
  129. package/dist/esm/sqm-password-field.entry.js +2 -2
  130. package/dist/esm/sqm-popup-container.entry.js +1 -1
  131. package/dist/esm/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-33f5c108.js} +2 -2
  132. package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
  133. package/dist/esm/sqm-portal-forgot-password_6.entry.js +6 -6
  134. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  135. package/dist/esm/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-88fd6a93.js} +2 -2
  136. package/dist/esm/sqm-portal-profile.entry.js +5 -5
  137. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  138. package/dist/esm/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-9bf30b56.js} +1 -1
  139. package/dist/esm/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f8d1689c.js} +1 -1
  140. package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
  141. package/dist/esm/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-0b70c1b1.js} +2 -2
  142. package/dist/esm/sqm-qr-code.entry.js +2 -2
  143. package/dist/esm/sqm-referral-table_11.entry.js +6 -6
  144. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  145. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  146. package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
  147. package/dist/esm/sqm-stencilbook.entry.js +231 -50
  148. package/dist/esm/sqm-tab.entry.js +2 -2
  149. package/dist/esm/sqm-tabs.entry.js +3 -3
  150. package/dist/esm/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-4db9e33f.js} +1 -1
  151. package/dist/esm/sqm-text-span.entry.js +1 -1
  152. package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-365cef98.js} +12 -19
  153. package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
  154. package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-c26d7347.js} +1 -1
  155. package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-e2392f42.js} +2 -2
  156. package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-9099c8d4.js} +2 -2
  157. package/dist/esm/{usePayoutStatus-46c0c289.js → usePayoutStatus-fa504d49.js} +3 -4
  158. package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-5844032a.js} +2 -2
  159. package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-3cde72d4.js} +1 -1
  160. package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-35e6d4c1.js} +3 -3
  161. package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-1813bdef.js} +1 -1
  162. package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-cb3d51e3.js} +1 -1
  163. package/dist/esm/{utilities-77b1e0cc.js → utilities-c9e730ed.js} +1 -1
  164. package/dist/esm/utils-8267d3d8.js +85 -0
  165. package/dist/esm-es5/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-78b791d2.js} +1 -1
  166. package/dist/esm-es5/data-33c16dff.js +1 -0
  167. package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
  168. package/dist/esm-es5/global-39f55ec2.js +285 -0
  169. package/dist/esm-es5/index.module-cede12c6.js +1 -0
  170. package/dist/esm-es5/{keys-406491dc.js → keys-db1897ae.js} +1 -1
  171. package/dist/esm-es5/loader.js +1 -1
  172. package/dist/esm-es5/mint-components.js +1 -1
  173. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  174. package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-7a0c7976.js} +1 -1
  175. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  176. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
  177. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  178. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  179. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  180. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -0
  181. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  182. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  183. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  184. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  185. package/dist/esm-es5/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-7cee2b4e.js} +1 -1
  186. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  187. package/dist/esm-es5/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-11a4f9a9.js} +1 -1
  188. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  189. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  190. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  191. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-48e7e0d3.js} +1 -1
  192. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  193. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  194. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  195. package/dist/esm-es5/sqm-partner-info-modal-view-a6324934.js +1 -0
  196. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  197. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  198. package/dist/esm-es5/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-33f5c108.js} +1 -1
  199. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  200. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  201. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  202. package/dist/esm-es5/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-88fd6a93.js} +1 -1
  203. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  204. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  205. package/dist/esm-es5/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-9bf30b56.js} +1 -1
  206. package/dist/esm-es5/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f8d1689c.js} +1 -1
  207. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  208. package/dist/esm-es5/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-0b70c1b1.js} +1 -1
  209. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  210. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  211. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  212. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  213. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  214. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  215. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  216. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  217. package/dist/esm-es5/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-4db9e33f.js} +1 -1
  218. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  219. package/dist/esm-es5/sqm-user-info-form-view-365cef98.js +1 -0
  220. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  221. package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-c26d7347.js} +1 -1
  222. package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-e2392f42.js} +1 -1
  223. package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-9099c8d4.js} +1 -1
  224. package/dist/esm-es5/{usePayoutStatus-46c0c289.js → usePayoutStatus-fa504d49.js} +2 -2
  225. package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-5844032a.js} +1 -1
  226. package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-3cde72d4.js} +1 -1
  227. package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-35e6d4c1.js} +1 -1
  228. package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-1813bdef.js} +1 -1
  229. package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-cb3d51e3.js} +1 -1
  230. package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-c9e730ed.js} +1 -1
  231. package/dist/esm-es5/utils-8267d3d8.js +1 -0
  232. package/dist/mint-components/mint-components.esm.js +1 -1
  233. package/dist/mint-components/mint-components.js +1 -1
  234. package/dist/mint-components/{p-f35d856a.system.js → p-00463c83.system.js} +1 -1
  235. package/dist/mint-components/p-037c1a4f.system.entry.js +1 -0
  236. package/dist/mint-components/p-038d0b8f.entry.js +133 -0
  237. package/dist/mint-components/{p-217dedde.js → p-0553e659.js} +2 -2
  238. package/dist/mint-components/{p-642f2c89.js → p-092db51a.js} +1 -1
  239. package/dist/mint-components/{p-a4f8abad.js → p-095b7128.js} +1 -1
  240. package/dist/mint-components/{p-95510f27.entry.js → p-0c43b6ff.entry.js} +1 -1
  241. package/dist/mint-components/{p-3366b81e.js → p-0d75a207.js} +2 -2
  242. package/dist/mint-components/{p-e4f17c21.system.js → p-0fec43e8.system.js} +1 -1
  243. package/dist/mint-components/p-115dfc03.system.js +1 -0
  244. package/dist/mint-components/p-13f3a647.js +1 -0
  245. package/dist/mint-components/{p-f55ecf35.system.js → p-140e6a15.system.js} +1 -1
  246. package/dist/mint-components/{p-3bc62ca6.entry.js → p-160828b4.entry.js} +1 -1
  247. package/dist/mint-components/{p-c30d0049.system.entry.js → p-16deb1a9.system.entry.js} +1 -1
  248. package/dist/mint-components/{p-f0baeed0.entry.js → p-19293c16.entry.js} +1 -1
  249. package/dist/mint-components/{p-b66f45d1.entry.js → p-1b0cbbae.entry.js} +1 -1
  250. package/dist/mint-components/p-1c413a06.system.js +1 -0
  251. package/dist/mint-components/{p-d4570314.entry.js → p-1d49dddc.entry.js} +1 -1
  252. package/dist/mint-components/p-1e35f151.system.js +1 -0
  253. package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-21e7079a.system.entry.js} +1 -1
  254. package/dist/mint-components/{p-5141769d.system.entry.js → p-247cfbdc.system.entry.js} +1 -1
  255. package/dist/mint-components/{p-8583ce0c.system.js → p-28e0062c.system.js} +1 -1
  256. package/dist/mint-components/p-28ed2ae9.js +1 -0
  257. package/dist/mint-components/{p-e3497e0e.system.entry.js → p-28fe7357.system.entry.js} +1 -1
  258. package/dist/mint-components/{p-25558a33.entry.js → p-2d3a12f2.entry.js} +2 -2
  259. package/dist/mint-components/{p-f1374258.system.entry.js → p-2f4d8ab8.system.entry.js} +1 -1
  260. package/dist/mint-components/{p-ec0b649a.entry.js → p-3181e54a.entry.js} +1 -1
  261. package/dist/mint-components/{p-fb5c9802.entry.js → p-3218bb1d.entry.js} +1 -1
  262. package/dist/mint-components/{p-035d9b65.js → p-32d078a3.js} +1 -1
  263. package/dist/mint-components/{p-8f2d03c7.entry.js → p-3461a8cb.entry.js} +1 -1
  264. package/dist/mint-components/{p-90833864.system.entry.js → p-357040e6.system.entry.js} +1 -1
  265. package/dist/mint-components/{p-85721089.system.js → p-36395228.system.js} +1 -1
  266. package/dist/mint-components/{p-e6ace3ab.js → p-370e0d75.js} +1 -1
  267. package/dist/mint-components/{p-fc284f91.system.entry.js → p-3756d0d1.system.entry.js} +1 -1
  268. package/dist/mint-components/{p-db0a2afd.entry.js → p-37658fec.entry.js} +1 -1
  269. package/dist/mint-components/{p-7b909aa5.system.js → p-379cb9f1.system.js} +1 -1
  270. package/dist/mint-components/{p-55676213.entry.js → p-38dc2f60.entry.js} +1 -1
  271. package/dist/mint-components/p-39840341.js +1 -0
  272. package/dist/mint-components/{p-f581aac7.js → p-3c333076.js} +1 -1
  273. package/dist/mint-components/{p-bc386a7b.js → p-3c555674.js} +1 -1
  274. package/dist/mint-components/{p-bab4929e.js → p-3c88d2ed.js} +2 -2
  275. package/dist/mint-components/{p-f8a09b0f.js → p-438f6702.js} +152 -152
  276. package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-45475cf9.system.entry.js} +1 -1
  277. package/dist/mint-components/{p-56ca7e3c.js → p-45e2a83a.js} +1 -1
  278. package/dist/mint-components/{p-7161e1a6.js → p-4723526d.js} +1 -1
  279. package/dist/mint-components/{p-cabf6326.js → p-50d959bd.js} +1 -1
  280. package/dist/mint-components/{p-626b31cb.system.entry.js → p-52748a87.system.entry.js} +1 -1
  281. package/dist/mint-components/p-52eca331.js +1 -0
  282. package/dist/mint-components/{p-cb0a5990.entry.js → p-55627a5c.entry.js} +1 -1
  283. package/dist/mint-components/{p-d997001a.js → p-567a5ded.js} +1 -1
  284. package/dist/mint-components/{p-5b871e38.system.entry.js → p-5c9d030a.system.entry.js} +1 -1
  285. package/dist/mint-components/{p-c8a8d231.entry.js → p-5dc9e95b.entry.js} +2 -2
  286. package/dist/mint-components/p-5e26014d.system.js +1 -0
  287. package/dist/mint-components/{p-80e116ec.system.entry.js → p-60085f20.system.entry.js} +1 -1
  288. package/dist/mint-components/{p-52674798.entry.js → p-608da224.entry.js} +1 -1
  289. package/dist/mint-components/{p-f39cf252.system.entry.js → p-6194855b.system.entry.js} +1 -1
  290. package/dist/mint-components/{p-013564b3.entry.js → p-62212b9a.entry.js} +1 -1
  291. package/dist/mint-components/{p-c45a929a.system.entry.js → p-62e1c8b2.system.entry.js} +1 -1
  292. package/dist/mint-components/p-63c299f1.system.js +1 -0
  293. package/dist/mint-components/p-64041ee1.entry.js +291 -0
  294. package/dist/mint-components/p-647933ac.entry.js +122 -0
  295. package/dist/mint-components/p-64f56cc9.system.js +285 -0
  296. package/dist/mint-components/p-6562cbec.system.entry.js +1 -0
  297. package/dist/mint-components/{p-70570e4d.system.entry.js → p-691d34f1.system.entry.js} +1 -1
  298. package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-6a4496b3.system.entry.js} +1 -1
  299. package/dist/mint-components/{p-692e14c5.system.js → p-6b1a6b0c.system.js} +1 -1
  300. package/dist/mint-components/p-6f8dde97.system.js +1 -0
  301. package/dist/mint-components/p-70e34ae1.system.js +6 -0
  302. package/dist/mint-components/{p-b9f57e84.system.entry.js → p-71561bb2.system.entry.js} +1 -1
  303. package/dist/mint-components/{p-d65991d0.entry.js → p-731c4d33.entry.js} +1 -1
  304. package/dist/mint-components/{p-77b9cde8.system.js → p-7547180f.system.js} +1 -1
  305. package/dist/mint-components/{p-a0c5631b.system.js → p-77117f6c.system.js} +1 -1
  306. package/dist/mint-components/{p-dd368927.system.entry.js → p-7a08d288.system.entry.js} +1 -1
  307. package/dist/mint-components/p-7d5956ec.system.entry.js +1 -0
  308. package/dist/mint-components/{p-d18dedd4.js → p-7e36a1ff.js} +1 -1
  309. package/dist/mint-components/{p-e6240c72.js → p-8474aa63.js} +1 -1
  310. package/dist/mint-components/{p-e84b874c.js → p-857a2d77.js} +1 -1
  311. package/dist/mint-components/{p-205cfdcd.system.js → p-86381dc7.system.js} +1 -1
  312. package/dist/mint-components/{p-b2b85238.entry.js → p-86a70151.entry.js} +1 -1
  313. package/dist/mint-components/{p-058aefe1.entry.js → p-886fb141.entry.js} +1 -1
  314. package/dist/mint-components/{p-6668f9f0.entry.js → p-88c9cc1b.entry.js} +1 -1
  315. package/dist/mint-components/{p-ce050888.system.js → p-8b258a3e.system.js} +1 -1
  316. package/dist/mint-components/p-8ecc8875.js +116 -0
  317. package/dist/mint-components/{p-0d83907e.js → p-8f9c1387.js} +1 -1
  318. package/dist/mint-components/{p-d005df28.system.entry.js → p-95aaf35a.system.entry.js} +1 -1
  319. package/dist/mint-components/{p-77fa2383.entry.js → p-96e4e6a4.entry.js} +1 -1
  320. package/dist/mint-components/{p-09f7aacd.entry.js → p-991f60fc.entry.js} +2 -2
  321. package/dist/mint-components/p-996eb820.entry.js +1 -0
  322. package/dist/mint-components/{p-027fc3be.system.entry.js → p-998c989a.system.entry.js} +1 -1
  323. package/dist/mint-components/{p-7b59e13c.system.js → p-9b33e2a7.system.js} +1 -1
  324. package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-9bd53e4d.system.entry.js} +1 -1
  325. package/dist/mint-components/{p-61897e72.entry.js → p-9c1b0c8b.entry.js} +1 -1
  326. package/dist/mint-components/{p-5ff7b000.entry.js → p-9d6984e7.entry.js} +2 -2
  327. package/dist/mint-components/{p-982d1f6f.entry.js → p-9e43f1eb.entry.js} +2 -2
  328. package/dist/mint-components/p-a0986077.system.entry.js +1 -0
  329. package/dist/mint-components/p-a1e1c42a.js +1 -0
  330. package/dist/mint-components/p-a2db4345.system.js +1 -0
  331. package/dist/mint-components/{p-669d52c4.js → p-a7f72a66.js} +1 -1
  332. package/dist/mint-components/{p-172675ca.system.js → p-a86ce218.system.js} +1 -1
  333. package/dist/mint-components/p-a8891ebd.js +1 -0
  334. package/dist/mint-components/p-a8ecdc44.system.js +1 -0
  335. package/dist/mint-components/p-aa319fbe.entry.js +9 -0
  336. package/dist/mint-components/{p-d6193876.system.js → p-b1b8e629.system.js} +1 -1
  337. package/dist/mint-components/p-b2a99637.system.js +1 -0
  338. package/dist/mint-components/p-b2bde2f5.entry.js +1 -0
  339. package/dist/mint-components/p-b451970a.system.entry.js +1 -0
  340. package/dist/mint-components/{p-e12754f5.system.entry.js → p-b5c0bad5.system.entry.js} +1 -1
  341. package/dist/mint-components/{p-5c4ba8a0.entry.js → p-b5fed7c6.entry.js} +1 -1
  342. package/dist/mint-components/{p-3286ef38.js → p-bcadd021.js} +1 -1
  343. package/dist/mint-components/p-c7535e70.system.entry.js +1 -0
  344. package/dist/mint-components/{p-5b1d2866.system.js → p-c84a2512.system.js} +1 -1
  345. package/dist/mint-components/{p-f4e36adf.system.entry.js → p-c8e45671.system.entry.js} +1 -1
  346. package/dist/mint-components/{p-e00ec007.js → p-ce11858c.js} +1 -1
  347. package/dist/mint-components/{p-ab0ea688.system.entry.js → p-d01949f7.system.entry.js} +1 -1
  348. package/dist/mint-components/p-d20188db.js +1 -0
  349. package/dist/mint-components/{p-19c441b2.system.js → p-d355336b.system.js} +1 -1
  350. package/dist/mint-components/{p-782af7ae.system.entry.js → p-d5a1c979.system.entry.js} +1 -1
  351. package/dist/mint-components/p-d6714617.entry.js +1 -0
  352. package/dist/mint-components/{p-aefc6c4f.system.entry.js → p-dbdb2a46.system.entry.js} +1 -1
  353. package/dist/mint-components/{p-3c46b4dd.system.js → p-df88dcaa.system.js} +1 -1
  354. package/dist/mint-components/{p-18133026.system.entry.js → p-e1292288.system.entry.js} +1 -1
  355. package/dist/mint-components/{p-036a2617.system.js → p-e4dbca9a.system.js} +1 -1
  356. package/dist/mint-components/p-e95402dc.js +49 -0
  357. package/dist/mint-components/{p-2d5c2bd4.system.entry.js → p-e9e05970.system.entry.js} +1 -1
  358. package/dist/mint-components/p-ee0f1cf1.system.js +1 -0
  359. package/dist/mint-components/{p-09348341.entry.js → p-f11d29fd.entry.js} +1 -1
  360. package/dist/mint-components/{p-dac20392.system.js → p-f368f04a.system.js} +1 -1
  361. package/dist/mint-components/{p-653db72e.entry.js → p-f4a57aed.entry.js} +1 -1
  362. package/dist/mint-components/p-f9671d6a.system.entry.js +1 -0
  363. package/dist/mint-components/{p-e5ea43b1.entry.js → p-f972e5c9.entry.js} +2 -2
  364. package/dist/mint-components/{p-5ce78407.system.entry.js → p-fb4ab5ba.system.entry.js} +1 -1
  365. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +12 -0
  366. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +51 -0
  367. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +122 -0
  368. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +17 -0
  369. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +0 -1
  370. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +0 -5
  371. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +2 -1
  372. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +2 -1
  373. package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
  374. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +78 -0
  375. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
  376. package/dist/types/components/tax-and-cash/data.d.ts +1 -0
  377. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +2 -0
  378. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
  379. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +165 -0
  380. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +7 -0
  381. package/dist/types/components.d.ts +614 -88
  382. package/dist/types/global/android.d.ts +7 -0
  383. package/dist/types/global/demo.d.ts +2 -0
  384. package/dist/types/saasquatch.d.ts +1 -0
  385. package/dist/types/stories/features.d.ts +4 -0
  386. package/dist/types/stories/templates.d.ts +4 -0
  387. package/docs/docs.docx +0 -0
  388. package/docs/raisins.json +1 -1
  389. package/grapesjs/grapesjs.js +1 -1
  390. package/package.json +1 -1
  391. package/shoelace/assets/icons/twitter-x.svg +4 -0
  392. package/dist/cjs/extractProps-e9c55ba8.js +0 -35
  393. package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -418
  394. package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -214
  395. package/dist/collection/components/sqm-user-attribute/UserAttribute.stories.js +0 -25
  396. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +0 -19
  397. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +0 -172
  398. package/dist/collection/components/sqm-user-attribute/useUserAttribute.js +0 -26
  399. package/dist/esm/data-12e6aae1.js +0 -216
  400. package/dist/esm/extractProps-54064fb0.js +0 -32
  401. package/dist/esm/sqm-email-verification.entry.js +0 -414
  402. package/dist/esm/sqm-widget-verification.entry.js +0 -210
  403. package/dist/esm-es5/data-12e6aae1.js +0 -1
  404. package/dist/esm-es5/extractProps-54064fb0.js +0 -1
  405. package/dist/esm-es5/global-96c14d63.js +0 -271
  406. package/dist/esm-es5/index.module-b23fdad8.js +0 -1
  407. package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
  408. package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +0 -1
  409. package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
  410. package/dist/mint-components/p-02499e08.entry.js +0 -1
  411. package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
  412. package/dist/mint-components/p-0797a946.js +0 -1
  413. package/dist/mint-components/p-30c1ef36.system.js +0 -1
  414. package/dist/mint-components/p-38c7775a.js +0 -1
  415. package/dist/mint-components/p-3adbfd0b.system.js +0 -6
  416. package/dist/mint-components/p-4007afba.system.entry.js +0 -1
  417. package/dist/mint-components/p-445f50cc.entry.js +0 -9
  418. package/dist/mint-components/p-4da5a3fe.system.entry.js +0 -1
  419. package/dist/mint-components/p-5492dd51.system.entry.js +0 -1
  420. package/dist/mint-components/p-57dd28bd.system.js +0 -1
  421. package/dist/mint-components/p-6c4ad51a.js +0 -1
  422. package/dist/mint-components/p-6e512063.entry.js +0 -25
  423. package/dist/mint-components/p-7265bbcb.system.js +0 -271
  424. package/dist/mint-components/p-738dce27.system.entry.js +0 -1
  425. package/dist/mint-components/p-746500b2.entry.js +0 -281
  426. package/dist/mint-components/p-7efb8782.system.js +0 -1
  427. package/dist/mint-components/p-89a20547.system.entry.js +0 -1
  428. package/dist/mint-components/p-91a96e98.entry.js +0 -1
  429. package/dist/mint-components/p-b395470f.entry.js +0 -16
  430. package/dist/mint-components/p-c67f8558.system.entry.js +0 -1
  431. package/dist/mint-components/p-ca098be1.system.js +0 -1
  432. package/dist/mint-components/p-d0993bb9.js +0 -1
  433. package/dist/mint-components/p-d4f332a7.entry.js +0 -106
  434. package/dist/mint-components/p-de0d6fd7.js +0 -49
  435. package/dist/mint-components/p-e55aafe9.system.js +0 -1
  436. package/dist/mint-components/p-ea03e50e.system.js +0 -1
  437. package/dist/mint-components/p-fbe00c97.system.entry.js +0 -1
  438. package/dist/mint-components/p-fe70e20c.entry.js +0 -1
  439. package/dist/mint-components/p-ff118a19.system.js +0 -1
  440. package/dist/types/components/sqm-user-attribute/UserAttribute.stories.d.ts +0 -7
  441. package/dist/types/components/sqm-user-attribute/sqm-user-attribute-view.d.ts +0 -8
  442. package/dist/types/components/sqm-user-attribute/sqm-user-attribute.d.ts +0 -45
  443. package/dist/types/components/sqm-user-attribute/useUserAttribute.d.ts +0 -3
@@ -0,0 +1,892 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-8277cbb3.js');
6
+ const global = require('./global-0f8b1267.js');
7
+ const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
8
+ const index_module = require('./index.module-42d413d9.js');
9
+ const cjs = require('./cjs-1066ec21.js');
10
+ const utils = require('./utils-6847bc06.js');
11
+ const JSS = require('./JSS-8503a151.js');
12
+ const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
13
+ const data = require('./data-6b5095f8.js');
14
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-464c52c9.js');
15
+ const keys = require('./keys-cff24974.js');
16
+ const eventKeys = require('./eventKeys-7af4df4d.js');
17
+ const parseStates = require('./parseStates-d1effc19.js');
18
+ const useVerificationEmail = require('./useVerificationEmail-994bc32f.js');
19
+
20
+ const UpsertUserEmailMutation = index_module.dist.gql `
21
+ mutation upsertUser($userInput: UserInput!) {
22
+ upsertUser(userInput: $userInput) {
23
+ id
24
+ accountId
25
+ email
26
+ }
27
+ }
28
+ `;
29
+ const UserLookupQuery = index_module.dist.gql `
30
+ query user {
31
+ viewer {
32
+ ... on User {
33
+ id
34
+ accountId
35
+ email
36
+ impactConnection {
37
+ user {
38
+ id
39
+ email
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ `;
46
+ function useUpsertUserEmail() {
47
+ const user = index_module.J();
48
+ const [request, { loading: loading, data, errors }] = index_module.$e(UpsertUserEmailMutation);
49
+ const upsertUserEmail = async (email) => {
50
+ try {
51
+ const result = await request({
52
+ userInput: {
53
+ id: user.id,
54
+ accountId: user.accountId,
55
+ email,
56
+ },
57
+ });
58
+ if (result instanceof Error || !result)
59
+ throw new Error();
60
+ return result;
61
+ }
62
+ catch (e) {
63
+ console.error("Could not set email on user", e);
64
+ return undefined;
65
+ }
66
+ };
67
+ return [
68
+ upsertUserEmail,
69
+ {
70
+ loading,
71
+ data,
72
+ errors,
73
+ },
74
+ ];
75
+ }
76
+ function useWidgetEmailVerification(props) {
77
+ const [_, setShowCode] = index_module.Pn(keys.SHOW_CODE_NAMESPACE);
78
+ const [email, setEmail] = index_module.Pn(keys.VERIFICATION_EMAIL_NAMESPACE);
79
+ const [emailExists, setEmailExists] = domContextHooks_module.useState(false);
80
+ const [error, setError] = domContextHooks_module.useState(false);
81
+ const [mutationError, setMutationError] = domContextHooks_module.useState(false);
82
+ const { initialized, send: [sendEmail, { loading: sendLoading, errors }], } = useVerificationEmail.useVerificationEmail();
83
+ const [upsertUserEmail] = useUpsertUserEmail();
84
+ const [loading, setLoading] = domContextHooks_module.useState(true);
85
+ const { data, loading: initialLoading } = index_module.wn(UserLookupQuery, {});
86
+ const emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
87
+ domContextHooks_module.useEffect(() => {
88
+ if (!(data === null || data === void 0 ? void 0 : data.viewer))
89
+ return;
90
+ setEmailExists(!!data.viewer.email);
91
+ }, [data]);
92
+ domContextHooks_module.useEffect(() => {
93
+ if (initialized)
94
+ setLoading(false);
95
+ }, [initialized]);
96
+ const submitEmail = async (e) => {
97
+ e.preventDefault();
98
+ if (!(data === null || data === void 0 ? void 0 : data.viewer))
99
+ return;
100
+ setLoading(true);
101
+ const toAddress = data.viewer.email;
102
+ if (!toAddress) {
103
+ // If no email on the user, set one
104
+ const formData = e.detail.formData;
105
+ const newEmail = formData.get("email").toString();
106
+ if (!emailRegex.test(newEmail)) {
107
+ setError(true);
108
+ return;
109
+ }
110
+ const result = await upsertUserEmail(newEmail);
111
+ if (!result || !result.user.email)
112
+ setError(true);
113
+ }
114
+ // UI should not allow this call til initialisation is done
115
+ if (!initialized)
116
+ return;
117
+ const result = await sendEmail();
118
+ if (!result || !result.success)
119
+ setMutationError(true);
120
+ else {
121
+ // This is used to let the code verification widget know an email was already sent
122
+ setEmail(toAddress);
123
+ setShowCode(true);
124
+ }
125
+ setLoading(false);
126
+ };
127
+ return {
128
+ callbacks: {
129
+ submitEmail,
130
+ },
131
+ states: {
132
+ loading,
133
+ initialLoading: initialLoading && !initialized,
134
+ error,
135
+ email: data === null || data === void 0 ? void 0 : data.viewer.email,
136
+ sendCodeError: mutationError,
137
+ },
138
+ text: props.getTextProps(),
139
+ };
140
+ }
141
+
142
+ const style = {
143
+ Wrapper: {
144
+ display: "flex",
145
+ flexDirection: "column",
146
+ gap: "var(--sl-spacing-medium)",
147
+ marginTop: "var(--sl-spacing-medium)",
148
+ },
149
+ InputsContainer: {
150
+ display: "flex",
151
+ gap: "var(--sl-spacing-medium)",
152
+ position: "relative",
153
+ flexDirection: "column",
154
+ },
155
+ ContinueButton: {
156
+ width: "100%",
157
+ },
158
+ SkeletonOne: {
159
+ width: "50%",
160
+ height: "16px",
161
+ },
162
+ SkeletonTwo: {
163
+ width: "30%",
164
+ height: "34px",
165
+ },
166
+ SkeletonThree: {
167
+ width: "15%",
168
+ height: "24px",
169
+ },
170
+ ErrorInput: {
171
+ "&::part(base)": {
172
+ border: "var(--sqm-border-thickness) solid var(--sqm-danger-color-border)",
173
+ borderRadius: "var(--sqm-input-border-radius)",
174
+ },
175
+ "&::part(help-text)": {
176
+ color: "var(--sqm-danger-color-text)",
177
+ },
178
+ },
179
+ };
180
+ const vanillaStyle = `
181
+ :host {
182
+ display: block;
183
+ }
184
+ :host([hidden]): {
185
+ display: none;
186
+ }
187
+
188
+ a {
189
+ color: inherit;
190
+ text-decoration: underline;
191
+ cursor: pointer;
192
+ }
193
+
194
+ *::part(primarybutton-base),
195
+ sl-button[type="primary"]::part(base) {
196
+ font-family: var(--sqm-primary-font);
197
+ width: 100%;
198
+ background-color: var(--sqm-primary-button-background);
199
+ color: var(--sqm-primary-button-color);
200
+ border-color: var(--sqm-primary-button-color-border);
201
+ border-radius: var(--sqm-primary-button-radius);
202
+ }
203
+
204
+ *::part(primarybutton-base):hover,
205
+ sl-button[type="primary"]::part(base):hover{
206
+ background-color: var(--sqm-primary-button-background-hover);
207
+ border-color: var(--sqm-primary-button-border-color-hover);
208
+ color: var(--sqm-primary-button-color-hover);
209
+ }
210
+
211
+
212
+ *::part(primarybutton-base):focus,
213
+ sl-button[type="primary"]::part(base):focus {
214
+ box-shadow: none;
215
+ }
216
+
217
+ *::part(secondarybutton-base),
218
+ sl-button[type="secondary"]::part(base) {
219
+ font-family: var(--sqm-primary-font);
220
+ background-color: var(--sqm-secondary-button-background);
221
+ color: var(--sqm-secondary-button-color);
222
+ border-color: var(--sqm-secondary-button-color-border);
223
+ border-radius: var(--sqm-secondary-button-radius);
224
+ }
225
+
226
+ *::part(secondarybutton-base):hover,
227
+ sl-button[type="secondary"]::part(base):hover {
228
+ background-color: var(--sqm-secondary-button-background-hover);
229
+ color: var(--sqm-secondary-button-color-hover);
230
+ border-color: var(--sqm-secondary-button-border-color-hover);
231
+ }
232
+
233
+ *::part(input-label), *::part(select-label), *::part(textarea-label){
234
+ font-family: var(--sqm-primary-font);
235
+ font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
236
+ font-weight: var(--sl-font-weight-semibold);
237
+ color: var(--sqm-input-label-color, var(--sqm-text), black);
238
+ }
239
+
240
+ *::part(input-base), *::part(select-base), *::part(textarea-base){
241
+ font-family: var(--sqm-primary-font);
242
+ background-color: var(--sqm-input-background, #fff);
243
+ border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
244
+ color: var(--sqm-input-color, white);
245
+ border-width: var(--sqm-border-thickness, 1px);
246
+ }
247
+
248
+ *::part(input-base):hover, *::part(select-base):hover, *::part(textarea-base):hover{
249
+ border-color: var(--sqm-border-color-hover);
250
+ }
251
+
252
+ *::part(input-base):focus, *::part(select-base):focus, *::part(textarea-base):focus{
253
+ border-color: var(--sqm-border-color-focus);
254
+ }
255
+
256
+ sqm-name-fields::part(input-base) {
257
+ font-family: var(--sqm-primary-font);
258
+ background-color: var(--sqm-input-background, #fff);
259
+ border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
260
+ color: var(--sqm-input-color, white);
261
+ border-width: var(--sqm-border-thickness, 1px);
262
+ }
263
+
264
+ sl-input::part(base):focus,
265
+ sl-select::part(form-control-wrapper):focus,
266
+ sl-textarea::part(textarea-label):focus {
267
+ border-color: var(--sqm-border-color-focus);
268
+ }
269
+
270
+ *::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
271
+ background: var(--sqm-input-disabled-background, #f5f5f5);
272
+ color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
273
+ }
274
+
275
+ *::part(input):-webkit-autofill {
276
+ box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
277
+ -webkit-text-fill-color: var(--sqm-input-color, white) !important;
278
+ }
279
+
280
+ *::part(input):-webkit-autofill:hover {
281
+ box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
282
+ -webkit-text-fill-color: var(--sqm-input-color, white) !important;
283
+ }
284
+
285
+ *::part(input):-webkit-autofill:focus {
286
+ box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
287
+ -webkit-text-fill-color: var(--sqm-input-color, white) !important;
288
+ }
289
+
290
+ *::part(input)::placeholder,
291
+ *::part(select)::placeholder,
292
+ *::part(textarea)::placeholder {
293
+ font-family: var(--sqm-primary-font);
294
+ color: var(--sqm-text-subdued);
295
+ }
296
+
297
+ *::part(input)::-webkit-input-placeholder,
298
+ *::part(select)::-webkit-input-placeholder,
299
+ *::part(textarea)::-webkit-input-placeholder {
300
+ font-family: var(--sqm-primary-font);
301
+ color: var(--sqm-text-subdued);
302
+ }
303
+
304
+ *::part(input)::-moz-placeholder,
305
+ *::part(select)::-moz-placeholder,
306
+ *::part(textarea)::-moz-placeholder {
307
+ font-family: var(--sqm-primary-font);
308
+ opacity: 1; /* Firefox adds an opacity to placeholders by default */
309
+ color: var(--sqm-text-subdued);
310
+ }
311
+
312
+ *::part(input)::-ms-input-placeholder,
313
+ *::part(select)::-ms-input-placeholder,
314
+ *::part(textarea)::-ms-input-placeholder {
315
+ font-family: var(--sqm-primary-font);
316
+ color: var(--sqm-text-subdued);
317
+ }
318
+
319
+
320
+ `;
321
+ const sheet = JSS.createStyleSheet(style);
322
+ const styleString = sheet.toString();
323
+ function WidgetEmailVerificationView(props) {
324
+ const { states, callbacks, text } = props;
325
+ const renderLoadingSkeleton = () => {
326
+ return (index.h("div", { class: sheet.classes.Wrapper },
327
+ index.h("sqm-skeleton", { height: "16px", width: "50%" }),
328
+ index.h("sqm-skeleton", { height: "16px", width: "50%" }),
329
+ index.h("sqm-skeleton", { height: "16px", width: "50%" }),
330
+ index.h("sqm-skeleton", { height: "34px", width: "30%" }),
331
+ index.h("sqm-skeleton", { height: "24px", width: "15%" }),
332
+ index.h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: true, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)));
333
+ };
334
+ return (index.h("div", { part: "sqm-base" },
335
+ index.h("style", { type: "text/css" },
336
+ vanillaStyle,
337
+ styleString),
338
+ states.sendCodeError && (index.h("sqm-form-message", { type: "error" },
339
+ index.h("p", { part: "alert-title" }, text.sendCodeErrorHeader),
340
+ global.intl.formatMessage({
341
+ id: "sendCodeErrorDescription",
342
+ defaultMessage: text.sendCodeErrorDescription,
343
+ }, {
344
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
345
+ }))),
346
+ states.initialLoading ? (renderLoadingSkeleton()) : (index.h("div", { class: sheet.classes.Wrapper },
347
+ index.h(sqmTextSpanView.TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
348
+ index.h("sl-form", { "onSl-submit": callbacks.submitEmail },
349
+ index.h("div", { class: sheet.classes.InputsContainer },
350
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email || "", type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
351
+ ? {
352
+ class: sheet.classes.ErrorInput,
353
+ helpText: text.emailValidationErrorText,
354
+ }
355
+ : {}))),
356
+ index.h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)))))));
357
+ }
358
+
359
+ const WidgetEmailVerification = class {
360
+ constructor(hostRef) {
361
+ index.registerInstance(this, hostRef);
362
+ /**
363
+ * @uiName Verify email widget header text
364
+ */
365
+ this.verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
366
+ /**
367
+ * @uiName Send code to email alert header
368
+ */
369
+ this.sendCodeErrorHeader = "There was an error sending your code";
370
+ /**
371
+ * @uiName Support link text
372
+ */
373
+ this.supportLink = "support team";
374
+ /**
375
+ * @uiName Send code to email alert description
376
+ */
377
+ this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program {supportLink}.";
378
+ /**
379
+ * @uiName Email input label
380
+ */
381
+ this.emailLabel = "Email";
382
+ /**
383
+ * @uiName Send code button text
384
+ */
385
+ this.sendCodeText = "Send code";
386
+ /**
387
+ * @uiName Send code button text
388
+ */
389
+ this.emailValidationErrorText = "Please enter a valid email";
390
+ domContextHooks_module.h$1(this);
391
+ }
392
+ disconnectedCallback() { }
393
+ getTextProps() {
394
+ return utils.getProps(this);
395
+ }
396
+ render() {
397
+ const props = index_module.isDemo()
398
+ ? useDemoWidgetEmailVerification(this)
399
+ : useWidgetEmailVerification(this);
400
+ return index.h(WidgetEmailVerificationView, Object.assign({}, props));
401
+ }
402
+ };
403
+ function useDemoWidgetEmailVerification(props) {
404
+ const setShowCode = index_module.En(keys.SHOW_CODE_NAMESPACE);
405
+ return cjs.cjs({
406
+ states: {
407
+ error: true,
408
+ initialLoading: false,
409
+ loading: false,
410
+ email: "test@example.com",
411
+ sendCodeError: true,
412
+ },
413
+ callbacks: {
414
+ submitEmail: async () => setShowCode(true),
415
+ },
416
+ text: props.getTextProps(),
417
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
418
+ }
419
+
420
+ // new field under impactConnection:{ resolvedByEmail: boolean } - determines if connection came from managed identity
421
+ const GET_USER_PARTNER_INFO = index_module.dist.gql `
422
+ query getUserPartnerInfo {
423
+ user: viewer {
424
+ ... on User {
425
+ id
426
+ accountId
427
+ firstName
428
+ lastName
429
+ email
430
+ countryCode
431
+ customFields
432
+ impactConnection {
433
+ connected
434
+ connectionStatus
435
+ publisher {
436
+ id
437
+ countryCode
438
+ currency
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }
444
+ `;
445
+ const GET_COUNTRIES = index_module.dist.gql `
446
+ query getCountries {
447
+ impactPayoutCountries(limit: 1000) {
448
+ data {
449
+ countryCode
450
+ displayName
451
+ }
452
+ }
453
+ }
454
+ `;
455
+ const GET_CURRENCIES = index_module.dist.gql `
456
+ query currencies($locale: RSLocale) {
457
+ currencies(limit: 300) {
458
+ data {
459
+ displayName(locale: $locale)
460
+ currencyCode
461
+ }
462
+ }
463
+ }
464
+ `;
465
+ const CONNECT_PARTNER = index_module.dist.gql `
466
+ mutation createImpactConnection($vars: ImpactConnectionInput!) {
467
+ createImpactConnection(impactConnectionInput: $vars) {
468
+ success
469
+ validationErrors {
470
+ field
471
+ message
472
+ }
473
+ user {
474
+ id
475
+ accountId
476
+ impactConnection {
477
+ connected
478
+ publisher {
479
+ brandedSignup
480
+ requiredTaxDocumentType
481
+ currentTaxDocument {
482
+ type
483
+ status
484
+ }
485
+ }
486
+ }
487
+ }
488
+ }
489
+ }
490
+ `;
491
+ const START_IMPACT_CONNECTION = index_module.dist.gql `
492
+ mutation startImpactConnection($vars: ImpactConnectionInput!) {
493
+ startImpactConnection(impactConnectionInput: $vars) {
494
+ success
495
+ validationErrors {
496
+ field
497
+ message
498
+ }
499
+ user {
500
+ id
501
+ accountId
502
+ impactConnection {
503
+ connected
504
+ publisher {
505
+ brandedSignup
506
+ requiredTaxDocumentType
507
+ currentTaxDocument {
508
+ type
509
+ status
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+ }
516
+ `;
517
+ const GET_BRAND_NAME = index_module.dist.gql `
518
+ query getTenantSettings {
519
+ tenantSettings {
520
+ companyName
521
+ }
522
+ }
523
+ `;
524
+ function usePartnerInfoModal(props) {
525
+ var _a, _b, _c, _d, _e, _f, _g;
526
+ const locale = index_module.L();
527
+ const setVerificationContext = index_module.En(keys.VERIFICATION_PARENT_NAMESPACE);
528
+ const { data: userData, loading: userLoading, refetch, } = index_module.wn(GET_USER_PARTNER_INFO, {});
529
+ const user = userData === null || userData === void 0 ? void 0 : userData.user;
530
+ const { data: currenciesData, loading: currenciesLoading } = index_module.wn(GET_CURRENCIES, { variables: { locale } });
531
+ const { data: countriesData, loading: countriesLoading } = index_module.wn(GET_COUNTRIES, {});
532
+ const { data: tenantSettingsData } = index_module.wn(GET_BRAND_NAME, {});
533
+ const { data: financeNetworkData } = index_module.wn(data.GET_FINANCE_NETWORK_SETTINGS, {
534
+ variables: { filter: {} },
535
+ });
536
+ const [startImpactConnection, { loading: connectLoading, errors: connectErrors },] = index_module.$e(START_IMPACT_CONNECTION);
537
+ const [allowBankingCollection, setAllowBankingCollection] = domContextHooks_module.useState(false);
538
+ const [checkboxError, setCheckboxError] = domContextHooks_module.useState("");
539
+ // No pre-filled country, use locale to determine countryCode instead
540
+ const [countryCode, setCountryCode] = domContextHooks_module.useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) || "");
541
+ const [currency, setCurrency] = domContextHooks_module.useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
542
+ const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
543
+ // copied from useTaxAndCash for displaying currencies based on country - could be in helper?
544
+ const currencies = domContextHooks_module.useMemo(() => {
545
+ var _a, _b;
546
+ const allValidCurrencies = (_b = (_a = financeNetworkData === null || financeNetworkData === void 0 ? void 0 : financeNetworkData.impactFinanceNetworkSettings) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.reduce((agg, settings) => {
547
+ var _a, _b;
548
+ const currency = (_b = (_a = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((c) => c.currencyCode === settings.currency);
549
+ if (!currency)
550
+ return agg;
551
+ if (agg.find((c) => c.currencyCode === settings.currency))
552
+ return agg;
553
+ if (countryCode && settings.countryCode !== countryCode)
554
+ return agg;
555
+ return [...agg, currency];
556
+ }, []);
557
+ return (allValidCurrencies || []).sort((a, b) => a.displayName.localeCompare(b.displayName));
558
+ }, [financeNetworkData, currenciesData, countryCode]);
559
+ const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
560
+ const [currencySearch, setCurrencySearch] = domContextHooks_module.useState("");
561
+ const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
562
+ const [filteredCurrencies, setFilteredCurrencies] = domContextHooks_module.useState(currencies || []);
563
+ const [error, setError] = domContextHooks_module.useState("");
564
+ const [success, setSuccess] = domContextHooks_module.useState(false);
565
+ domContextHooks_module.useEffect(() => {
566
+ var _a;
567
+ const publisher = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
568
+ if (!userData || !publisher)
569
+ return;
570
+ setCountryCode(publisher.countryCode);
571
+ setCurrency(publisher.currency);
572
+ }, [userData, user]);
573
+ domContextHooks_module.useEffect(() => {
574
+ if (!(countries === null || countries === void 0 ? void 0 : countries.length))
575
+ return;
576
+ if (countrySearch.trim() === "") {
577
+ setFilteredCountries(countries || []);
578
+ }
579
+ else {
580
+ setFilteredCountries(countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase())) || []);
581
+ }
582
+ }, [countrySearch, countries]);
583
+ domContextHooks_module.useEffect(() => {
584
+ if (!(currencies === null || currencies === void 0 ? void 0 : currencies.length))
585
+ return;
586
+ if (currencySearch.trim() === "") {
587
+ setFilteredCurrencies(currencies || []);
588
+ }
589
+ else {
590
+ setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
591
+ }
592
+ }, [currencySearch, currencies]);
593
+ const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
594
+ function onCountryChange(e) {
595
+ var _a, _b;
596
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
597
+ if (!value)
598
+ return;
599
+ setCountryCode(value);
600
+ setCurrency("");
601
+ setError("");
602
+ }
603
+ function onCurrencyChange(e) {
604
+ var _a, _b;
605
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
606
+ if (!value)
607
+ return;
608
+ setCurrency(value);
609
+ setError("");
610
+ }
611
+ function onCheckboxChange(e) {
612
+ const checked = e.target.checked;
613
+ setAllowBankingCollection(checked);
614
+ if (checked)
615
+ setCheckboxError("");
616
+ }
617
+ async function onSubmit() {
618
+ var _a, _b;
619
+ if (!allowBankingCollection) {
620
+ setCheckboxError(props.missingFieldsErrorText);
621
+ return;
622
+ }
623
+ if (!countryCode || !currency) {
624
+ setError(props.missingFieldsErrorText);
625
+ return;
626
+ }
627
+ setError("");
628
+ setCheckboxError("");
629
+ try {
630
+ const vars = {
631
+ user: {
632
+ id: user.id,
633
+ accountId: user.accountId,
634
+ },
635
+ firstName: user.firstName,
636
+ lastName: user.lastName,
637
+ // phoneNumber: null,
638
+ // phoneNumberCountryCode: null,
639
+ countryCode,
640
+ currency,
641
+ };
642
+ const result = await startImpactConnection({ vars });
643
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
644
+ setError(props.networkErrorText);
645
+ return;
646
+ }
647
+ const connectionResult = result
648
+ .startImpactConnection;
649
+ console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
650
+ if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
651
+ const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
652
+ setError(validationMsg || props.networkErrorText);
653
+ console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
654
+ return;
655
+ }
656
+ window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
657
+ await refetch();
658
+ setSuccess(true);
659
+ setVerificationContext(true);
660
+ }
661
+ catch (e) {
662
+ console.error("Partner creation error:", e);
663
+ setError(props.networkErrorText);
664
+ }
665
+ }
666
+ const showModal = !success &&
667
+ !userLoading &&
668
+ (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
669
+ return {
670
+ states: {
671
+ open: showModal,
672
+ loading: userLoading || countriesLoading || currenciesLoading,
673
+ submitting: connectLoading,
674
+ isExistingPartner: impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher,
675
+ countryCode,
676
+ currency,
677
+ error,
678
+ success,
679
+ brandName: ((_g = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _g === void 0 ? void 0 : _g.companyName) || "",
680
+ filteredCountries: filteredCountries || [],
681
+ filteredCurrencies: filteredCurrencies || [],
682
+ allowBankingCollection,
683
+ checkboxError,
684
+ disabled: userLoading || connectLoading,
685
+ },
686
+ callbacks: {
687
+ onCountryChange,
688
+ onCurrencyChange,
689
+ onCheckboxChange,
690
+ setCurrencySearch,
691
+ setCountrySearch,
692
+ onSubmit,
693
+ onClose: () => setSuccess(true),
694
+ },
695
+ text: props.getTextProps(),
696
+ };
697
+ }
698
+
699
+ const PartnerInfoModal = class {
700
+ constructor(hostRef) {
701
+ index.registerInstance(this, hostRef);
702
+ /**
703
+ * Brand name shown in the modal header
704
+ *
705
+ * @uiName Brand name
706
+ */
707
+ this.brandName = "";
708
+ /**
709
+ * Header text when user has no existing partner
710
+ *
711
+ * @uiName New partner header
712
+ * @uiWidget textArea
713
+ */
714
+ this.modalHeader = "Let's get you ready for rewards";
715
+ /**
716
+ * Header text when user has an existing partner
717
+ *
718
+ * @uiName Existing partner header
719
+ * @uiWidget textArea
720
+ */
721
+ this.modalHeaderExistingPartner = "We found an existing account";
722
+ /**
723
+ * Description for new partner setup
724
+ *
725
+ * @uiName New partner description
726
+ * @uiWidget textArea
727
+ */
728
+ this.descriptionNewPartner = "Confirm your country and currency now to get your future rewards faster.";
729
+ /**
730
+ * Description for existing partner confirmation
731
+ *
732
+ * @uiName Existing partner description
733
+ * @uiWidget textArea
734
+ */
735
+ this.descriptionExistingPartner = "We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.";
736
+ /**
737
+ * Support description for existing partner confirmation
738
+ *
739
+ * @uiName Existing partner support description
740
+ * @uiWidget textArea
741
+ */
742
+ this.supportDescriptionExistingPartner = "If this is a mistake, please contact Support or sign up for this referral program with a different email.";
743
+ /**
744
+ * Edit the property called terms and conditions text to change what's displayed for {termsAndConditionsLink}.
745
+ * @uiName Terms and conditions checkbox
746
+ */
747
+ this.allowBankingCollection = "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information";
748
+ /**
749
+ * The link text that appears in the terms and conditions checkbox
750
+ * @uiName Terms and conditions text
751
+ * @uiWidget textArea
752
+ */
753
+ this.termsAndConditionsLabel = "terms and conditions";
754
+ /**
755
+ * The link that appears in the terms and conditions checkbox
756
+ * @uiName Terms and conditions link
757
+ */
758
+ this.termsAndConditionsLink = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
759
+ /**
760
+ * @uiName Country label
761
+ */
762
+ this.countryLabel = "Country";
763
+ /**
764
+ * @uiName Currency label
765
+ */
766
+ this.currencyLabel = "Currency";
767
+ /**
768
+ * @uiName Submit button label
769
+ */
770
+ this.submitButtonLabel = "Submit";
771
+ /**
772
+ * @uiName Confirm button label
773
+ */
774
+ this.confirmButtonLabel = "Confirm";
775
+ /**
776
+ * @uiName Search country placeholder
777
+ */
778
+ this.searchCountryPlaceholder = "Search for a country";
779
+ /**
780
+ * @uiName Search currency placeholder
781
+ */
782
+ this.searchCurrencyPlaceholder = "Search for a currency";
783
+ /**
784
+ * @uiName Network error text
785
+ * @uiWidget textArea
786
+ */
787
+ this.networkErrorText = "An error occurred. Please try again.";
788
+ /**
789
+ * @uiName Missing fields error text
790
+ * @uiWidget textArea
791
+ */
792
+ this.missingFieldsErrorText = "Please select both a country and currency.";
793
+ /**
794
+ * Used to render in another modal.
795
+ * @undocumented
796
+ */
797
+ this.inModal = false;
798
+ /**
799
+ * @undocumented
800
+ * @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
801
+ * @componentState { "title": "Existing partner", "props": { "states": { "open": true, "isExistingPartner": true, "countryCode": "US", "currency": "USD" } } }
802
+ * @componentState { "title": "Connected (hidden)", "props": { "states": { "open": false } } }
803
+ */
804
+ this.stateController = "{}";
805
+ domContextHooks_module.h$1(this);
806
+ }
807
+ disconnectedCallback() { }
808
+ getTextProps() {
809
+ return utils.getProps(this);
810
+ }
811
+ render() {
812
+ const props = index_module.isDemo()
813
+ ? useDemoPartnerInfoModal(this)
814
+ : usePartnerInfoModal(this);
815
+ if (this.inModal) {
816
+ return index.h(sqmPartnerInfoModalView.PartnerInfoModalContentView, Object.assign({}, props));
817
+ }
818
+ return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
819
+ }
820
+ };
821
+ function useDemoPartnerInfoModal(props) {
822
+ const [countryCode, setCountryCode] = domContextHooks_module.useState("US");
823
+ const [currency, setCurrency] = domContextHooks_module.useState("");
824
+ const [error, setError] = domContextHooks_module.useState("");
825
+ const [allowBankingCollection, setAllowBankingCollection] = domContextHooks_module.useState(false);
826
+ const parsed = parseStates.parseStates(props.stateController);
827
+ const stateOverride = (parsed === null || parsed === void 0 ? void 0 : parsed["sqm-partner-info-modal"]) || parsed || {};
828
+ // @ts-ignore
829
+ return cjs.cjs({
830
+ states: {
831
+ brandName: "Test Brand",
832
+ open: false,
833
+ loading: false,
834
+ submitting: false,
835
+ isExistingPartner: false,
836
+ countryCode,
837
+ currency,
838
+ error,
839
+ success: false,
840
+ filteredCountries: [],
841
+ filteredCurrencies: [],
842
+ allowBankingCollection,
843
+ checkboxError: "",
844
+ disabled: false,
845
+ },
846
+ callbacks: {
847
+ onCountryChange: (e) => {
848
+ var _a, _b;
849
+ const value = (_b = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
850
+ if (value) {
851
+ setCountryCode(value);
852
+ setCurrency("");
853
+ }
854
+ },
855
+ onCurrencyChange: (e) => {
856
+ var _a, _b;
857
+ const value = (_b = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
858
+ if (value)
859
+ setCurrency(value);
860
+ },
861
+ onCheckboxChange: (e) => {
862
+ setAllowBankingCollection(e.target.checked);
863
+ },
864
+ setCountrySearch: () => { },
865
+ setCurrencySearch: () => { },
866
+ onSubmit: () => {
867
+ if (!countryCode || !currency) {
868
+ setError(props.missingFieldsErrorText);
869
+ return;
870
+ }
871
+ setError("");
872
+ },
873
+ onClose: () => { },
874
+ },
875
+ text: {
876
+ modalHeader: props.modalHeader,
877
+ descriptionNewPartner: props.descriptionNewPartner,
878
+ descriptionExistingPartner: props.descriptionExistingPartner,
879
+ countryLabel: props.countryLabel,
880
+ currencyLabel: props.currencyLabel,
881
+ submitButtonLabel: props.submitButtonLabel,
882
+ confirmButtonLabel: props.confirmButtonLabel,
883
+ searchCountryPlaceholder: props.searchCountryPlaceholder,
884
+ searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
885
+ supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
886
+ modalHeaderExistingPartner: props.modalHeaderExistingPartner,
887
+ },
888
+ }, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
889
+ }
890
+
891
+ exports.sqm_email_verification = WidgetEmailVerification;
892
+ exports.sqm_partner_info_modal = PartnerInfoModal;