@saasquatch/mint-components 2.1.8-2 → 2.1.9-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 (367) hide show
  1. package/dist/cjs/{ShadowViewAddon-a26deae6.js → ShadowViewAddon-d679ec76.js} +6 -6
  2. package/dist/cjs/{data-8c8a08f6.js → data-e83f8a41.js} +2 -2
  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/{re-render-72a0ef45.js → re-render-69bde9ee.js} +1 -1
  9. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +401 -68
  10. package/dist/cjs/sqm-big-stat_45.cjs.entry.js +27 -22
  11. package/dist/cjs/sqm-close-button.cjs.entry.js +1 -1
  12. package/dist/cjs/sqm-code-verification.cjs.entry.js +3 -3
  13. package/dist/cjs/sqm-context-router.cjs.entry.js +1 -1
  14. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +802 -0
  15. package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -2
  16. package/dist/cjs/sqm-google-sign-in.cjs.entry.js +1 -1
  17. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
  18. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +3 -3
  19. package/dist/cjs/{sqm-lead-checkbox-field-view-0af2a157.js → sqm-lead-checkbox-field-view-d90f8941.js} +1 -1
  20. package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +4 -4
  21. package/dist/cjs/{sqm-lead-input-field-view-0cd7ebdb.js → sqm-lead-input-field-view-818d9e9a.js} +1 -1
  22. package/dist/cjs/sqm-lead-input-field.cjs.entry.js +4 -4
  23. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
  24. package/dist/cjs/sqm-logout-current-user.cjs.entry.js +1 -1
  25. package/dist/cjs/{sqm-navigation-sidebar-item-view-49b152dd.js → sqm-navigation-sidebar-item-view-20693e59.js} +1 -1
  26. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
  27. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +1 -1
  28. package/dist/cjs/sqm-pagination_3.cjs.entry.js +3 -3
  29. package/dist/cjs/sqm-partner-info-modal-view-e3faede9.js +108 -0
  30. package/dist/cjs/sqm-partner-info-modal.cjs.entry.js +396 -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-2b4b92da.js} +1 -1
  34. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
  35. package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +4 -4
  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-bfdbb98d.js} +1 -1
  38. package/dist/cjs/sqm-portal-profile.cjs.entry.js +4 -4
  39. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
  40. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
  41. package/dist/cjs/{sqm-portal-verify-email-view-424e406a.js → sqm-portal-verify-email-view-90cd89e3.js} +1 -1
  42. package/dist/cjs/sqm-qr-code.cjs.entry.js +2 -2
  43. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +5 -5
  44. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
  45. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -5
  46. package/dist/cjs/sqm-stencilbook.cjs.entry.js +174 -15
  47. package/dist/cjs/sqm-tab.cjs.entry.js +2 -2
  48. package/dist/cjs/sqm-tabs.cjs.entry.js +3 -3
  49. package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-efa08934.js} +7 -2
  50. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
  51. package/dist/cjs/sqm-widget-verification.cjs.entry.js +20 -3
  52. package/dist/cjs/{useChildElements-041127d7.js → useChildElements-89bc50a9.js} +1 -1
  53. package/dist/cjs/{useInstantAccessRegistration-2398df36.js → useInstantAccessRegistration-651aa95b.js} +2 -2
  54. package/dist/cjs/{useLeadFormState-b4c2ab5b.js → useLeadFormState-76d3b511.js} +2 -2
  55. package/dist/cjs/{usePayoutStatus-0192fccd.js → usePayoutStatus-cf050a03.js} +4 -6
  56. package/dist/cjs/{usePortalRegistrationForm-23ee2d62.js → usePortalRegistrationForm-31822dc4.js} +2 -2
  57. package/dist/cjs/{useReferralCodes-0f7948af.js → useReferralCodes-89c2b972.js} +1 -1
  58. package/dist/cjs/{useReferralTable-6e9de0d5.js → useReferralTable-d3ddfd05.js} +3 -3
  59. package/dist/cjs/{useRegistrationFormState-4fe5b770.js → useRegistrationFormState-a223f597.js} +1 -1
  60. package/dist/cjs/{useVerificationEmail-5d19aa99.js → useVerificationEmail-994bc32f.js} +1 -1
  61. package/dist/cjs/{utilities-fcdb9504.js → utilities-096934ea.js} +1 -1
  62. package/dist/collection/collection-manifest.json +1 -0
  63. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +145 -0
  64. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +103 -0
  65. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +512 -0
  66. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +232 -0
  67. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +0 -1
  68. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  69. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +1 -27
  70. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  71. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +4 -1
  72. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +15 -1
  73. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +75 -37
  74. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +688 -13
  75. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +95 -1
  76. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  77. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  78. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  79. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +10 -1
  80. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  81. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -0
  82. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +7 -2
  83. package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-d382a63e.js} +6 -6
  84. package/dist/esm/{data-12e6aae1.js → data-a6752028.js} +2 -2
  85. package/dist/esm/eventKeys-f76b6a03.js +3 -0
  86. package/dist/esm/{global-96c14d63.js → global-b2ee3a12.js} +3177 -3126
  87. package/dist/esm/{index.module-b23fdad8.js → index.module-e266b4d7.js} +153 -150
  88. package/dist/esm/loader.js +3 -3
  89. package/dist/esm/mint-components.js +3 -3
  90. package/dist/esm/{re-render-f30aeb6b.js → re-render-4f4bd4da.js} +1 -1
  91. package/dist/esm/sqm-banking-info-form_10.entry.js +397 -64
  92. package/dist/esm/sqm-big-stat_45.entry.js +27 -22
  93. package/dist/esm/sqm-close-button.entry.js +1 -1
  94. package/dist/esm/sqm-code-verification.entry.js +3 -3
  95. package/dist/esm/sqm-context-router.entry.js +1 -1
  96. package/dist/esm/sqm-email-verification_2.entry.js +797 -0
  97. package/dist/esm/sqm-empty_4.entry.js +2 -2
  98. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  99. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  100. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  101. package/dist/esm/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-00d76ba1.js} +1 -1
  102. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  103. package/dist/esm/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-d8f76a9d.js} +1 -1
  104. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  105. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  106. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  107. package/dist/esm/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-7f966119.js} +1 -1
  108. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  109. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  110. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  111. package/dist/esm/sqm-partner-info-modal-view-77c231af.js +106 -0
  112. package/dist/esm/sqm-partner-info-modal.entry.js +392 -0
  113. package/dist/esm/sqm-password-field.entry.js +2 -2
  114. package/dist/esm/sqm-popup-container.entry.js +1 -1
  115. package/dist/esm/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-13e25037.js} +1 -1
  116. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  117. package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
  118. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  119. package/dist/esm/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-a172bdcc.js} +1 -1
  120. package/dist/esm/sqm-portal-profile.entry.js +4 -4
  121. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  122. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  123. package/dist/esm/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c1a72c4f.js} +1 -1
  124. package/dist/esm/sqm-qr-code.entry.js +2 -2
  125. package/dist/esm/sqm-referral-table_11.entry.js +5 -5
  126. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  127. package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
  128. package/dist/esm/sqm-stencilbook.entry.js +174 -15
  129. package/dist/esm/sqm-tab.entry.js +2 -2
  130. package/dist/esm/sqm-tabs.entry.js +3 -3
  131. package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-b2dd8aa1.js} +7 -2
  132. package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
  133. package/dist/esm/sqm-widget-verification.entry.js +20 -3
  134. package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-31ba3daf.js} +1 -1
  135. package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-1388dace.js} +2 -2
  136. package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-cec544ea.js} +2 -2
  137. package/dist/esm/{usePayoutStatus-46c0c289.js → usePayoutStatus-24145412.js} +3 -4
  138. package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-6d562bf8.js} +2 -2
  139. package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-1ca1fda0.js} +1 -1
  140. package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-456931fd.js} +3 -3
  141. package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-0cee2d21.js} +1 -1
  142. package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-5c6cd733.js} +1 -1
  143. package/dist/esm/{utilities-77b1e0cc.js → utilities-f05633da.js} +1 -1
  144. package/dist/esm-es5/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-d382a63e.js} +1 -1
  145. package/dist/esm-es5/{data-12e6aae1.js → data-a6752028.js} +1 -1
  146. package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
  147. package/dist/esm-es5/global-b2ee3a12.js +285 -0
  148. package/dist/esm-es5/index.module-e266b4d7.js +1 -0
  149. package/dist/esm-es5/loader.js +1 -1
  150. package/dist/esm-es5/mint-components.js +1 -1
  151. package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-4f4bd4da.js} +1 -1
  152. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  153. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -1
  154. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  155. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  156. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  157. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -0
  158. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  159. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  160. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  161. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  162. package/dist/esm-es5/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-00d76ba1.js} +1 -1
  163. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  164. package/dist/esm-es5/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-d8f76a9d.js} +1 -1
  165. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  166. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  167. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  168. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-7f966119.js} +1 -1
  169. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  170. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  171. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  172. package/dist/esm-es5/sqm-partner-info-modal-view-77c231af.js +1 -0
  173. package/dist/esm-es5/sqm-partner-info-modal.entry.js +1 -0
  174. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  175. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  176. package/dist/esm-es5/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-13e25037.js} +1 -1
  177. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  178. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  179. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  180. package/dist/esm-es5/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-a172bdcc.js} +1 -1
  181. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  182. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  183. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  184. package/dist/esm-es5/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c1a72c4f.js} +1 -1
  185. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  186. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  187. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  188. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  189. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  190. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  191. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  192. package/dist/esm-es5/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-b2dd8aa1.js} +1 -1
  193. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  194. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  195. package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-31ba3daf.js} +1 -1
  196. package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-1388dace.js} +1 -1
  197. package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-cec544ea.js} +1 -1
  198. package/dist/esm-es5/{usePayoutStatus-46c0c289.js → usePayoutStatus-24145412.js} +2 -2
  199. package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-6d562bf8.js} +1 -1
  200. package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-1ca1fda0.js} +1 -1
  201. package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-456931fd.js} +1 -1
  202. package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-0cee2d21.js} +1 -1
  203. package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-5c6cd733.js} +1 -1
  204. package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-f05633da.js} +1 -1
  205. package/dist/mint-components/mint-components.esm.js +1 -1
  206. package/dist/mint-components/mint-components.js +1 -1
  207. package/dist/mint-components/mint-components.system.js +1 -0
  208. package/dist/mint-components/{p-653db72e.entry.js → p-06ca4346.entry.js} +1 -1
  209. package/dist/mint-components/{p-738dce27.system.entry.js → p-07da0ddd.system.entry.js} +1 -1
  210. package/dist/mint-components/{p-982d1f6f.entry.js → p-07f3b868.entry.js} +2 -2
  211. package/dist/mint-components/{p-2d5c2bd4.system.entry.js → p-0a900fb1.system.entry.js} +1 -1
  212. package/dist/mint-components/{p-b66f45d1.entry.js → p-1435edd4.entry.js} +1 -1
  213. package/dist/mint-components/p-1775cb0c.system.js +6 -0
  214. package/dist/mint-components/p-1b0d7020.js +1 -0
  215. package/dist/mint-components/{p-c8a8d231.entry.js → p-1b7b65ef.entry.js} +2 -2
  216. package/dist/mint-components/p-1b9705fd.system.js +285 -0
  217. package/dist/mint-components/p-1d450b85.js +1 -0
  218. package/dist/mint-components/{p-70570e4d.system.entry.js → p-20280398.system.entry.js} +1 -1
  219. package/dist/mint-components/p-2085bb01.system.entry.js +1 -0
  220. package/dist/mint-components/{p-bab4929e.js → p-21851092.js} +1 -1
  221. package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-2774c704.system.entry.js} +1 -1
  222. package/dist/mint-components/p-28ed2ae9.js +1 -0
  223. package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-2ad9470d.system.entry.js} +1 -1
  224. package/dist/mint-components/{p-5ff7b000.entry.js → p-2c0bb139.entry.js} +1 -1
  225. package/dist/mint-components/{p-e5ea43b1.entry.js → p-2e2c5ec4.entry.js} +2 -2
  226. package/dist/mint-components/{p-642f2c89.js → p-30967f75.js} +1 -1
  227. package/dist/mint-components/{p-e6240c72.js → p-320b306b.js} +1 -1
  228. package/dist/mint-components/{p-e84b874c.js → p-33a6ab09.js} +1 -1
  229. package/dist/mint-components/{p-91a96e98.entry.js → p-353ab6db.entry.js} +1 -1
  230. package/dist/mint-components/p-35724e1c.entry.js +1 -0
  231. package/dist/mint-components/p-3b2ae7b9.entry.js +105 -0
  232. package/dist/mint-components/{p-ea03e50e.system.js → p-3dc1e209.system.js} +1 -1
  233. package/dist/mint-components/{p-cb0a5990.entry.js → p-44afc747.entry.js} +1 -1
  234. package/dist/mint-components/{p-85721089.system.js → p-452f644f.system.js} +1 -1
  235. package/dist/mint-components/{p-f55ecf35.system.js → p-473562fc.system.js} +1 -1
  236. package/dist/mint-components/{p-55676213.entry.js → p-47f594c3.entry.js} +1 -1
  237. package/dist/mint-components/p-4b365f1f.system.js +1 -0
  238. package/dist/mint-components/{p-e12754f5.system.entry.js → p-4da8028d.system.entry.js} +1 -1
  239. package/dist/mint-components/{p-95510f27.entry.js → p-504ed1f2.entry.js} +1 -1
  240. package/dist/mint-components/{p-f581aac7.js → p-5126508b.js} +1 -1
  241. package/dist/mint-components/{p-fc284f91.system.entry.js → p-5245e4ce.system.entry.js} +1 -1
  242. package/dist/mint-components/{p-f0baeed0.entry.js → p-5450693e.entry.js} +1 -1
  243. package/dist/mint-components/{p-f4e36adf.system.entry.js → p-55b1be64.system.entry.js} +1 -1
  244. package/dist/mint-components/{p-782af7ae.system.entry.js → p-5822a43f.system.entry.js} +1 -1
  245. package/dist/mint-components/{p-f39cf252.system.entry.js → p-5825aee6.system.entry.js} +1 -1
  246. package/dist/mint-components/{p-77b9cde8.system.js → p-59644ef8.system.js} +1 -1
  247. package/dist/mint-components/{p-f35d856a.system.js → p-5d79c8a0.system.js} +1 -1
  248. package/dist/mint-components/{p-e4f17c21.system.js → p-5e106c95.system.js} +1 -1
  249. package/dist/mint-components/{p-db0a2afd.entry.js → p-5f6d617a.entry.js} +1 -1
  250. package/dist/mint-components/{p-ff118a19.system.js → p-614630a8.system.js} +1 -1
  251. package/dist/mint-components/p-6596f0de.entry.js +9 -0
  252. package/dist/mint-components/{p-bc386a7b.js → p-6684e9ad.js} +1 -1
  253. package/dist/mint-components/{p-8583ce0c.system.js → p-695ec086.system.js} +1 -1
  254. package/dist/mint-components/{p-ce050888.system.js → p-6d444f3f.system.js} +1 -1
  255. package/dist/mint-components/{p-90833864.system.entry.js → p-6e816a17.system.entry.js} +1 -1
  256. package/dist/mint-components/p-6f8dde97.system.js +1 -0
  257. package/dist/mint-components/p-71c585b7.entry.js +1 -0
  258. package/dist/mint-components/{p-aefc6c4f.system.entry.js → p-7333d103.system.entry.js} +1 -1
  259. package/dist/mint-components/{p-8f2d03c7.entry.js → p-7528770e.entry.js} +1 -1
  260. package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-7767314d.system.entry.js} +1 -1
  261. package/dist/mint-components/p-78909fc0.system.js +1 -0
  262. package/dist/mint-components/{p-692e14c5.system.js → p-79854479.system.js} +1 -1
  263. package/dist/mint-components/{p-7161e1a6.js → p-7a7ebf08.js} +1 -1
  264. package/dist/mint-components/{p-25558a33.entry.js → p-7c0255ad.entry.js} +1 -1
  265. package/dist/mint-components/{p-5c4ba8a0.entry.js → p-80174c14.entry.js} +1 -1
  266. package/dist/mint-components/{p-7b59e13c.system.js → p-82905fda.system.js} +1 -1
  267. package/dist/mint-components/{p-80e116ec.system.entry.js → p-82be3d10.system.entry.js} +1 -1
  268. package/dist/mint-components/{p-172675ca.system.js → p-83277c69.system.js} +1 -1
  269. package/dist/mint-components/{p-09348341.entry.js → p-84866680.entry.js} +1 -1
  270. package/dist/mint-components/{p-c30d0049.system.entry.js → p-878bb2cf.system.entry.js} +1 -1
  271. package/dist/mint-components/{p-61897e72.entry.js → p-89f8ab67.entry.js} +1 -1
  272. package/dist/mint-components/p-8f5b316e.js +49 -0
  273. package/dist/mint-components/{p-5ce78407.system.entry.js → p-91c4b8d5.system.entry.js} +1 -1
  274. package/dist/mint-components/{p-dd368927.system.entry.js → p-93cb9438.system.entry.js} +1 -1
  275. package/dist/mint-components/{p-5b871e38.system.entry.js → p-96cbca52.system.entry.js} +1 -1
  276. package/dist/mint-components/{p-217dedde.js → p-97b8c481.js} +2 -2
  277. package/dist/mint-components/p-9be145c6.system.entry.js +1 -0
  278. package/dist/mint-components/{p-d005df28.system.entry.js → p-9c381424.system.entry.js} +1 -1
  279. package/dist/mint-components/{p-6c4ad51a.js → p-9f21ea69.js} +1 -1
  280. package/dist/mint-components/{p-0c0d4065.js → p-9fa6606e.js} +3 -3
  281. package/dist/mint-components/{p-d18dedd4.js → p-a03189bd.js} +1 -1
  282. package/dist/mint-components/p-a0667674.system.entry.js +1 -0
  283. package/dist/mint-components/{p-058aefe1.entry.js → p-a30f0ffd.entry.js} +1 -1
  284. package/dist/mint-components/p-a9855b29.system.entry.js +1 -0
  285. package/dist/mint-components/p-aa0b0cd6.entry.js +108 -0
  286. package/dist/mint-components/{p-3366b81e.js → p-ab678644.js} +2 -2
  287. package/dist/mint-components/{p-d997001a.js → p-ad017a39.js} +1 -1
  288. package/dist/mint-components/{p-205cfdcd.system.js → p-b179621d.system.js} +1 -1
  289. package/dist/mint-components/{p-6668f9f0.entry.js → p-b6fc53c9.entry.js} +1 -1
  290. package/dist/mint-components/{p-027fc3be.system.entry.js → p-b8288385.system.entry.js} +1 -1
  291. package/dist/mint-components/{p-013564b3.entry.js → p-b8766db9.entry.js} +1 -1
  292. package/dist/mint-components/{p-3bc62ca6.entry.js → p-b9652150.entry.js} +1 -1
  293. package/dist/mint-components/{p-e3497e0e.system.entry.js → p-bae7d6b5.system.entry.js} +1 -1
  294. package/dist/mint-components/{p-a4f8abad.js → p-bd804f4c.js} +1 -1
  295. package/dist/mint-components/{p-d4570314.entry.js → p-c2c01ab5.entry.js} +1 -1
  296. package/dist/mint-components/{p-036a2617.system.js → p-c756bc32.system.js} +1 -1
  297. package/dist/mint-components/{p-f1374258.system.entry.js → p-c8060ef5.system.entry.js} +1 -1
  298. package/dist/mint-components/{p-52674798.entry.js → p-cc0fe4a3.entry.js} +1 -1
  299. package/dist/mint-components/{p-4da5a3fe.system.entry.js → p-d2448c85.system.entry.js} +1 -1
  300. package/dist/mint-components/{p-5b1d2866.system.js → p-d42aba0e.system.js} +1 -1
  301. package/dist/mint-components/{p-3286ef38.js → p-d5375baf.js} +1 -1
  302. package/dist/mint-components/p-d6c1e876.system.js +1 -0
  303. package/dist/mint-components/{p-035d9b65.js → p-d863acaa.js} +1 -1
  304. package/dist/mint-components/{p-e6ace3ab.js → p-dece706f.js} +1 -1
  305. package/dist/mint-components/{p-ec0b649a.entry.js → p-dfb50245.entry.js} +1 -1
  306. package/dist/mint-components/{p-7efb8782.system.js → p-e44c816e.system.js} +1 -1
  307. package/dist/mint-components/{p-19c441b2.system.js → p-e4d3b7a9.system.js} +1 -1
  308. package/dist/mint-components/{p-b2b85238.entry.js → p-e502fd80.entry.js} +1 -1
  309. package/dist/mint-components/{p-e00ec007.js → p-e5e8e13e.js} +1 -1
  310. package/dist/mint-components/{p-7ee8f2ed.entry.js → p-e6924adb.entry.js} +3 -3
  311. package/dist/mint-components/{p-f8a09b0f.js → p-e7a9ce16.js} +152 -152
  312. package/dist/mint-components/{p-c67f8558.system.entry.js → p-e9a596d6.system.entry.js} +1 -1
  313. package/dist/mint-components/{p-09f7aacd.entry.js → p-ed17e1b8.entry.js} +2 -2
  314. package/dist/mint-components/p-ef64e6f0.entry.js +16 -0
  315. package/dist/mint-components/{p-d6193876.system.js → p-f3b21df2.system.js} +1 -1
  316. package/dist/mint-components/{p-c45a929a.system.entry.js → p-f3ddbe2f.system.entry.js} +1 -1
  317. package/dist/mint-components/{p-77fa2383.entry.js → p-f6fc7569.entry.js} +1 -1
  318. package/dist/mint-components/{p-626b31cb.system.entry.js → p-f7948b16.system.entry.js} +1 -1
  319. package/dist/mint-components/{p-a0c5631b.system.js → p-f84605ec.system.js} +1 -1
  320. package/dist/mint-components/{p-ab0ea688.system.entry.js → p-f95952a0.system.entry.js} +1 -1
  321. package/dist/mint-components/{p-5141769d.system.entry.js → p-fa32d8eb.system.entry.js} +1 -1
  322. package/dist/mint-components/{p-0d83907e.js → p-fca34d77.js} +1 -1
  323. package/dist/mint-components/p-fd214860.system.entry.js +1 -0
  324. package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-fe0eceba.system.entry.js} +1 -1
  325. package/dist/mint-components/sqm-partner-info-modal.entry.js +392 -0
  326. package/dist/mint-components/sqm-partner-info-modal.system.entry.js +1 -0
  327. package/dist/mint-components/sqm-widget-verification.entry.js +228 -0
  328. package/dist/mint-components/sqm-widget-verification.system.entry.js +1 -0
  329. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +13 -0
  330. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +43 -0
  331. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +94 -0
  332. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +16 -0
  333. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +0 -1
  334. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +0 -5
  335. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
  336. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +2 -0
  337. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
  338. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +165 -0
  339. package/dist/types/components.d.ts +402 -10
  340. package/docs/docs.docx +0 -0
  341. package/docs/raisins.json +1 -1
  342. package/grapesjs/grapesjs.js +1 -1
  343. package/package.json +1 -1
  344. package/shoelace/assets/icons/twitter-x.svg +4 -0
  345. package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -418
  346. package/dist/esm/sqm-email-verification.entry.js +0 -414
  347. package/dist/esm-es5/global-96c14d63.js +0 -271
  348. package/dist/esm-es5/index.module-b23fdad8.js +0 -1
  349. package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
  350. package/dist/mint-components/p-02499e08.entry.js +0 -1
  351. package/dist/mint-components/p-0614dcbc.entry.js +0 -9
  352. package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
  353. package/dist/mint-components/p-30c1ef36.system.js +0 -1
  354. package/dist/mint-components/p-3adbfd0b.system.js +0 -6
  355. package/dist/mint-components/p-5492dd51.system.entry.js +0 -1
  356. package/dist/mint-components/p-6e512063.entry.js +0 -25
  357. package/dist/mint-components/p-7265bbcb.system.js +0 -271
  358. package/dist/mint-components/p-b395470f.entry.js +0 -16
  359. package/dist/mint-components/p-bf545082.system.entry.js +0 -1
  360. package/dist/mint-components/p-ca098be1.system.js +0 -1
  361. package/dist/mint-components/p-d0993bb9.js +0 -1
  362. package/dist/mint-components/p-d4f332a7.entry.js +0 -106
  363. package/dist/mint-components/p-de0d6fd7.js +0 -49
  364. package/dist/mint-components/p-de343dd0.system.entry.js +0 -1
  365. package/dist/mint-components/p-fbe00c97.system.entry.js +0 -1
  366. package/dist/mint-components/p-fe70e20c.entry.js +0 -1
  367. package/docs/stats.json +0 -122783
@@ -0,0 +1,392 @@
1
+ import { r as registerInstance, h as h$1 } from './index-d9876cd5.js';
2
+ import { i as useState, j as useEffect, o as h } from './dom-context-hooks.module-8411297a.js';
3
+ import { d as dist, L, w as wn, $ as $e, i as isDemo } from './index.module-5db56a7a.js';
4
+ import './jss-preset-default.esm-c36417f8.js';
5
+ import './JSS-8c381d8b.js';
6
+ import { g as getProps } from './utils-61821fb1.js';
7
+ import { c as cjs } from './cjs-e829b75b.js';
8
+ import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-eb3493ec.js';
9
+ import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
10
+
11
+ // new field under impactConnection:{ resolvedByEmail: boolean } - determines if connection came from managed identity
12
+ const GET_USER_PARTNER_INFO = dist.gql `
13
+ query getUserPartnerInfo {
14
+ user: viewer {
15
+ ... on User {
16
+ id
17
+ accountId
18
+ firstName
19
+ lastName
20
+ email
21
+ countryCode
22
+ customFields
23
+ impactConnection {
24
+ connected
25
+ publisher {
26
+ phoneNumber
27
+ phoneNumberCountryCode
28
+ countryCode
29
+ currency
30
+ requiredTaxDocumentType
31
+ currentTaxDocument {
32
+ type
33
+ status
34
+ }
35
+ withdrawalSettings {
36
+ paymentMethod
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ const GET_COUNTRIES = dist.gql `
45
+ query getCountries {
46
+ impactPayoutCountries(limit: 1000) {
47
+ data {
48
+ countryCode
49
+ displayName
50
+ }
51
+ }
52
+ }
53
+ `;
54
+ const GET_CURRENCIES = dist.gql `
55
+ query currencies($locale: RSLocale) {
56
+ currencies(limit: 300) {
57
+ data {
58
+ displayName(locale: $locale)
59
+ currencyCode
60
+ }
61
+ }
62
+ }
63
+ `;
64
+ const CONNECT_PARTNER = dist.gql `
65
+ mutation createImpactConnection($vars: ImpactConnectionInput!) {
66
+ createImpactConnection(impactConnectionInput: $vars) {
67
+ success
68
+ validationErrors {
69
+ field
70
+ message
71
+ }
72
+ user {
73
+ id
74
+ accountId
75
+ impactConnection {
76
+ connected
77
+ publisher {
78
+ brandedSignup
79
+ requiredTaxDocumentType
80
+ currentTaxDocument {
81
+ type
82
+ status
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ `;
90
+ const GET_BRAND_NAME = dist.gql `
91
+ query getTenantSettings {
92
+ tenantSettings {
93
+ companyName
94
+ }
95
+ }
96
+ `;
97
+ function usePartnerInfoModal(props) {
98
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
99
+ const locale = L();
100
+ const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {});
101
+ const user = userData === null || userData === void 0 ? void 0 : userData.user;
102
+ const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
103
+ const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
104
+ const { data: tenantSettingsData } = wn(GET_BRAND_NAME, {});
105
+ const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
106
+ const [countryCode, setCountryCode] = 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) || "");
107
+ const [currency, setCurrency] = 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) || "");
108
+ console.log(countryCode, currency, "initial country and currency state"); // TEMP
109
+ const [countrySearch, setCountrySearch] = useState("");
110
+ const [currencySearch, setCurrencySearch] = useState("");
111
+ const [filteredCountries, setFilteredCountries] = useState(((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || []);
112
+ const [filteredCurrencies, setFilteredCurrencies] = useState(((_f = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _f === void 0 ? void 0 : _f.data) || []);
113
+ const [error, setError] = useState("");
114
+ const [success, setSuccess] = useState(false);
115
+ const countries = ((_g = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _g === void 0 ? void 0 : _g.data) || [];
116
+ const currencies = ((_h = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _h === void 0 ? void 0 : _h.data) || [];
117
+ console.log(user, "user data from partner info query"); // TEMP
118
+ useEffect(() => {
119
+ var _a;
120
+ if (userData && ((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher)) {
121
+ setCountryCode(user.impactConnection.publisher.countryCode);
122
+ setCurrency(user.impactConnection.publisher.currency);
123
+ }
124
+ }, [userData]);
125
+ useEffect(() => {
126
+ if (!(countries === null || countries === void 0 ? void 0 : countries.length))
127
+ return;
128
+ if (countrySearch.trim() === "") {
129
+ setFilteredCountries(countries || []);
130
+ }
131
+ else {
132
+ setFilteredCountries(countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase())) || []);
133
+ }
134
+ }, [countrySearch, countries]);
135
+ useEffect(() => {
136
+ if (!(currencies === null || currencies === void 0 ? void 0 : currencies.length))
137
+ return;
138
+ if (currencySearch.trim() === "") {
139
+ setFilteredCurrencies(currencies || []);
140
+ }
141
+ else {
142
+ setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
143
+ }
144
+ }, [currencySearch, currencies]);
145
+ const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
146
+ function onCountryChange(e) {
147
+ var _a, _b;
148
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
149
+ if (!value)
150
+ return;
151
+ setCountryCode(value);
152
+ setCurrency("");
153
+ setError("");
154
+ }
155
+ function onCurrencyChange(e) {
156
+ var _a, _b;
157
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
158
+ if (!value)
159
+ return;
160
+ setCurrency(value);
161
+ setError("");
162
+ }
163
+ async function onSubmit() {
164
+ var _a, _b;
165
+ if (!countryCode || !currency) {
166
+ setError(props.missingFieldsErrorText);
167
+ return;
168
+ }
169
+ setError("");
170
+ try {
171
+ const vars = {
172
+ user: {
173
+ id: user.id,
174
+ accountId: user.accountId,
175
+ },
176
+ firstName: user.firstName,
177
+ lastName: user.lastName,
178
+ // phoneNumber: null,
179
+ // phoneNumberCountryCode: null,
180
+ countryCode,
181
+ currency,
182
+ };
183
+ const result = await connectImpactPartner({ vars });
184
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
185
+ setError(props.networkErrorText);
186
+ return;
187
+ }
188
+ const connectionResult = result
189
+ .createImpactConnection;
190
+ console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
191
+ if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
192
+ const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
193
+ setError(validationMsg || props.networkErrorText);
194
+ console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
195
+ return;
196
+ }
197
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
198
+ await refetch();
199
+ setSuccess(true);
200
+ }
201
+ catch (e) {
202
+ console.error("Partner creation error:", e);
203
+ setError(props.networkErrorText);
204
+ }
205
+ }
206
+ console.log(success, "success state in partner info modal");
207
+ const showModal = !success &&
208
+ !userLoading &&
209
+ (!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected) || !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher));
210
+ console.log(showModal, "showModal condition in partner info modal"); // TEMP
211
+ return {
212
+ states: {
213
+ open: showModal,
214
+ loading: userLoading || countriesLoading || currenciesLoading,
215
+ submitting: connectLoading,
216
+ isExistingPartner: (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected) || (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher),
217
+ countryCode,
218
+ currency,
219
+ error,
220
+ success,
221
+ brandName: ((_j = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _j === void 0 ? void 0 : _j.companyName) || "",
222
+ filteredCountries: filteredCountries || [],
223
+ filteredCurrencies: filteredCurrencies || [],
224
+ },
225
+ callbacks: {
226
+ onCountryChange,
227
+ onCurrencyChange,
228
+ setCurrencySearch,
229
+ setCountrySearch,
230
+ onSubmit,
231
+ onClose: () => {
232
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
233
+ setSuccess(true);
234
+ },
235
+ },
236
+ text: props.getTextProps(),
237
+ };
238
+ }
239
+
240
+ const PartnerInfoModal = class {
241
+ constructor(hostRef) {
242
+ registerInstance(this, hostRef);
243
+ /**
244
+ * Brand name shown in the modal header
245
+ *
246
+ * @uiName Brand name
247
+ */
248
+ this.brandName = "";
249
+ /**
250
+ * Header text when user has no existing partner
251
+ *
252
+ * @uiName New partner header
253
+ * @uiWidget textArea
254
+ */
255
+ this.modalHeader = "Let's get you ready for rewards";
256
+ /**
257
+ * Header text when user has an existing partner
258
+ *
259
+ * @uiName Existing partner header
260
+ * @uiWidget textArea
261
+ */
262
+ this.modalHeaderExistingPartner = "We found an existing account";
263
+ /**
264
+ * Description for new partner setup
265
+ *
266
+ * @uiName New partner description
267
+ * @uiWidget textArea
268
+ */
269
+ this.descriptionNewPartner = "Confirm your country and currency now to get your future rewards faster.";
270
+ /**
271
+ * Description for existing partner confirmation
272
+ *
273
+ * @uiName Existing partner description
274
+ * @uiWidget textArea
275
+ */
276
+ 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.";
277
+ /**
278
+ * Support description for existing partner confirmation
279
+ *
280
+ * @uiName Existing partner support description
281
+ * @uiWidget textArea
282
+ */
283
+ this.supportDescriptionExistingPartner = "If this is a mistake, please contact Support or sign up for this referral program with a different email.";
284
+ /**
285
+ * @uiName Country label
286
+ */
287
+ this.countryLabel = "Country";
288
+ /**
289
+ * @uiName Currency label
290
+ */
291
+ this.currencyLabel = "Currency";
292
+ /**
293
+ * @uiName Submit button label
294
+ */
295
+ this.submitButtonLabel = "Submit";
296
+ /**
297
+ * @uiName Confirm button label
298
+ */
299
+ this.confirmButtonLabel = "Confirm";
300
+ /**
301
+ * @uiName Search country placeholder
302
+ */
303
+ this.searchCountryPlaceholder = "Search for a country";
304
+ /**
305
+ * @uiName Search currency placeholder
306
+ */
307
+ this.searchCurrencyPlaceholder = "Search for a currency";
308
+ /**
309
+ * @uiName Network error text
310
+ * @uiWidget textArea
311
+ */
312
+ this.networkErrorText = "An error occurred. Please try again.";
313
+ /**
314
+ * @uiName Missing fields error text
315
+ * @uiWidget textArea
316
+ */
317
+ this.missingFieldsErrorText = "Please select both a country and currency.";
318
+ h(this);
319
+ }
320
+ disconnectedCallback() { }
321
+ getTextProps() {
322
+ return getProps(this);
323
+ }
324
+ render() {
325
+ // AL: TODO add usePartnerInfoModal
326
+ const props = isDemo()
327
+ ? useDemoPartnerInfoModal(this)
328
+ : usePartnerInfoModal(this);
329
+ return h$1(PartnerInfoModalView, Object.assign({}, props));
330
+ }
331
+ };
332
+ function useDemoPartnerInfoModal(props) {
333
+ const [countryCode, setCountryCode] = useState("US");
334
+ const [currency, setCurrency] = useState("");
335
+ const [error, setError] = useState("");
336
+ return cjs({
337
+ states: {
338
+ brandName: "Test Brand",
339
+ open: true,
340
+ loading: false,
341
+ submitting: false,
342
+ isExistingPartner: false,
343
+ countryCode,
344
+ currency,
345
+ error,
346
+ success: false,
347
+ filteredCountries: [],
348
+ filteredCurrencies: [],
349
+ },
350
+ callbacks: {
351
+ onCountryChange: (e) => {
352
+ var _a, _b;
353
+ 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;
354
+ if (value) {
355
+ setCountryCode(value);
356
+ setCurrency("");
357
+ }
358
+ },
359
+ onCurrencyChange: (e) => {
360
+ var _a, _b;
361
+ 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;
362
+ if (value)
363
+ setCurrency(value);
364
+ },
365
+ setCountrySearch: () => { },
366
+ setCurrencySearch: () => { },
367
+ onSubmit: () => {
368
+ if (!countryCode || !currency) {
369
+ setError(props.missingFieldsErrorText);
370
+ return;
371
+ }
372
+ setError("");
373
+ },
374
+ onClose: () => { },
375
+ },
376
+ text: {
377
+ modalHeader: props.modalHeader,
378
+ descriptionNewPartner: props.descriptionNewPartner,
379
+ descriptionExistingPartner: props.descriptionExistingPartner,
380
+ countryLabel: props.countryLabel,
381
+ currencyLabel: props.currencyLabel,
382
+ submitButtonLabel: props.submitButtonLabel,
383
+ confirmButtonLabel: props.confirmButtonLabel,
384
+ searchCountryPlaceholder: props.searchCountryPlaceholder,
385
+ searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
386
+ supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
387
+ modalHeaderExistingPartner: props.modalHeaderExistingPartner,
388
+ },
389
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
390
+ }
391
+
392
+ export { PartnerInfoModal as sqm_partner_info_modal };
@@ -0,0 +1 @@
1
+ var __makeTemplateObject=this&&this.__makeTemplateObject||function(n,e){if(Object.defineProperty){Object.defineProperty(n,"raw",{value:e})}else{n.raw=e}return n};var __awaiter=this&&this.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function a(n){try{u(r.next(n))}catch(n){i(n)}}function c(n){try{u(r["throw"](n))}catch(n){i(n)}}function u(n){n.done?t(n.value):o(n.value).then(a,c)}u((r=r.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(n){return function(e){return u([n,e])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(t)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;o=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=e.call(n,t)}catch(n){a=[6,n];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-6582b378.system.js","./dom-context-hooks.module-d6e89c16.system.js","./index.module-3103d9ae.system.js","./jss-preset-default.esm-62a04d6d.system.js","./JSS-840a8fea.system.js","./utils-b405e671.system.js","./cjs-f0ef8d23.system.js","./sqm-partner-info-modal-view-929517ca.system.js","./eventKeys-8c222120.system.js"],(function(n){"use strict";var e,t,r,o,i,a,c,u,s,l,d,v,m,f;return{setters:[function(n){e=n.r;t=n.h},function(n){r=n.i;o=n.j;i=n.o},function(n){a=n.d;c=n.L;u=n.w;s=n.$;l=n.i},function(){},function(){},function(n){d=n.g},function(n){v=n.c},function(n){m=n.P},function(n){f=n.T}],execute:function(){var p=a.gql(__makeTemplateObject(["\n query getUserPartnerInfo {\n user: viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n customFields\n impactConnection {\n connected\n publisher {\n phoneNumber\n phoneNumberCountryCode\n countryCode\n currency\n requiredTaxDocumentType\n currentTaxDocument {\n type\n status\n }\n withdrawalSettings {\n paymentMethod\n }\n }\n }\n }\n }\n }\n"],["\n query getUserPartnerInfo {\n user: viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n customFields\n impactConnection {\n connected\n publisher {\n phoneNumber\n phoneNumberCountryCode\n countryCode\n currency\n requiredTaxDocumentType\n currentTaxDocument {\n type\n status\n }\n withdrawalSettings {\n paymentMethod\n }\n }\n }\n }\n }\n }\n"]));var y=a.gql(__makeTemplateObject(["\n query getCountries {\n impactPayoutCountries(limit: 1000) {\n data {\n countryCode\n displayName\n }\n }\n }\n"],["\n query getCountries {\n impactPayoutCountries(limit: 1000) {\n data {\n countryCode\n displayName\n }\n }\n }\n"]));var h=a.gql(__makeTemplateObject(["\n query currencies($locale: RSLocale) {\n currencies(limit: 300) {\n data {\n displayName(locale: $locale)\n currencyCode\n }\n }\n }\n"],["\n query currencies($locale: RSLocale) {\n currencies(limit: 300) {\n data {\n displayName(locale: $locale)\n currencyCode\n }\n }\n }\n"]));var g=a.gql(__makeTemplateObject(["\n mutation createImpactConnection($vars: ImpactConnectionInput!) {\n createImpactConnection(impactConnectionInput: $vars) {\n success\n validationErrors {\n field\n message\n }\n user {\n id\n accountId\n impactConnection {\n connected\n publisher {\n brandedSignup\n requiredTaxDocumentType\n currentTaxDocument {\n type\n status\n }\n }\n }\n }\n }\n }\n"],["\n mutation createImpactConnection($vars: ImpactConnectionInput!) {\n createImpactConnection(impactConnectionInput: $vars) {\n success\n validationErrors {\n field\n message\n }\n user {\n id\n accountId\n impactConnection {\n connected\n publisher {\n brandedSignup\n requiredTaxDocumentType\n currentTaxDocument {\n type\n status\n }\n }\n }\n }\n }\n }\n"]));var C=a.gql(__makeTemplateObject(["\n query getTenantSettings {\n tenantSettings {\n companyName\n }\n }\n"],["\n query getTenantSettings {\n tenantSettings {\n companyName\n }\n }\n"]));function b(n){var e,t,i,a,l,d,v,m,b;var w=c();var x=u(p,{}),_=x.data,P=x.loading,T=x.refetch;var E=_===null||_===void 0?void 0:_.user;var S=u(h,{variables:{locale:w}}),N=S.data,j=S.loading;var I=u(y,{}),k=I.data,q=I.loading;var L=u(C,{}).data;var D=s(g),O=D[0],$=D[1],B=$.loading,F=$.errors;var H=r(((t=(e=E===null||E===void 0?void 0:E.impactConnection)===null||e===void 0?void 0:e.publisher)===null||t===void 0?void 0:t.countryCode)||""),U=H[0],M=H[1];var R=r(((a=(i=E===null||E===void 0?void 0:E.impactConnection)===null||i===void 0?void 0:i.publisher)===null||a===void 0?void 0:a.currency)||""),W=R[0],A=R[1];console.log(U,W,"initial country and currency state");var G=r(""),J=G[0],K=G[1];var z=r(""),Q=z[0],V=z[1];var X=r(((l=k===null||k===void 0?void 0:k.impactPayoutCountries)===null||l===void 0?void 0:l.data)||[]),Y=X[0],Z=X[1];var nn=r(((d=N===null||N===void 0?void 0:N.currencies)===null||d===void 0?void 0:d.data)||[]),en=nn[0],tn=nn[1];var rn=r(""),on=rn[0],an=rn[1];var cn=r(false),un=cn[0],sn=cn[1];var ln=((v=k===null||k===void 0?void 0:k.impactPayoutCountries)===null||v===void 0?void 0:v.data)||[];var dn=((m=N===null||N===void 0?void 0:N.currencies)===null||m===void 0?void 0:m.data)||[];console.log(E,"user data from partner info query");o((function(){var n;if(_&&((n=E.impactConnection)===null||n===void 0?void 0:n.publisher)){M(E.impactConnection.publisher.countryCode);A(E.impactConnection.publisher.currency)}}),[_]);o((function(){if(!(ln===null||ln===void 0?void 0:ln.length))return;if(J.trim()===""){Z(ln||[])}else{Z(ln.filter((function(n){return n.displayName.toLowerCase().includes(J.toLowerCase())}))||[])}}),[J,ln]);o((function(){if(!(dn===null||dn===void 0?void 0:dn.length))return;if(Q.trim()===""){tn(dn||[])}else{tn(dn.filter((function(n){return n.currencyCode.toLowerCase().includes(Q.toLowerCase())}))||[])}}),[Q,dn]);var vn=E===null||E===void 0?void 0:E.impactConnection;function mn(n){var e,t;var r=(t=(e=n.detail)===null||e===void 0?void 0:e.item)===null||t===void 0?void 0:t.__value;if(!r)return;M(r);A("");an("")}function fn(n){var e,t;var r=(t=(e=n.detail)===null||e===void 0?void 0:e.item)===null||t===void 0?void 0:t.__value;if(!r)return;A(r);an("")}function pn(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,o,i,a,c;return __generator(this,(function(u){switch(u.label){case 0:if(!U||!W){an(n.missingFieldsErrorText);return[2]}an("");u.label=1;case 1:u.trys.push([1,4,,5]);r={user:{id:E.id,accountId:E.accountId},firstName:E.firstName,lastName:E.lastName,countryCode:U,currency:W};return[4,O({vars:r})];case 2:o=u.sent();if(!o||((e=o)===null||e===void 0?void 0:e.message)){an(n.networkErrorText);return[2]}i=o.createImpactConnection;console.log(o,i,"result and connectionResult from creating partner from modal");if(!(i===null||i===void 0?void 0:i.success)){a=(t=i===null||i===void 0?void 0:i.validationErrors)===null||t===void 0?void 0:t.map((function(n){return n.message})).join(". ");an(a||n.networkErrorText);console.error("Failed to create Impact connection:",i===null||i===void 0?void 0:i.validationErrors);return[2]}window.dispatchEvent(new Event(f));return[4,T()];case 3:u.sent();sn(true);return[3,5];case 4:c=u.sent();console.error("Partner creation error:",c);an(n.networkErrorText);return[3,5];case 5:return[2]}}))}))}console.log(un,"success state in partner info modal");var yn=!un&&!P&&(!(vn===null||vn===void 0?void 0:vn.connected)||!(vn===null||vn===void 0?void 0:vn.publisher));console.log(yn,"showModal condition in partner info modal");return{states:{open:yn,loading:P||q||j,submitting:B,isExistingPartner:(vn===null||vn===void 0?void 0:vn.connected)||(vn===null||vn===void 0?void 0:vn.publisher),countryCode:U,currency:W,error:on,success:un,brandName:((b=L===null||L===void 0?void 0:L.tenantSettings)===null||b===void 0?void 0:b.companyName)||"",filteredCountries:Y||[],filteredCurrencies:en||[]},callbacks:{onCountryChange:mn,onCurrencyChange:fn,setCurrencySearch:V,setCountrySearch:K,onSubmit:pn,onClose:function(){window.dispatchEvent(new Event(f));sn(true)}},text:n.getTextProps()}}var w=n("sqm_partner_info_modal",function(){function n(n){e(this,n);this.brandName="";this.modalHeader="Let's get you ready for rewards";this.modalHeaderExistingPartner="We found an existing account";this.descriptionNewPartner="Confirm your country and currency now to get your future rewards faster.";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.";this.supportDescriptionExistingPartner="If this is a mistake, please contact Support or sign up for this referral program with a different email.";this.countryLabel="Country";this.currencyLabel="Currency";this.submitButtonLabel="Submit";this.confirmButtonLabel="Confirm";this.searchCountryPlaceholder="Search for a country";this.searchCurrencyPlaceholder="Search for a currency";this.networkErrorText="An error occurred. Please try again.";this.missingFieldsErrorText="Please select both a country and currency.";i(this)}n.prototype.disconnectedCallback=function(){};n.prototype.getTextProps=function(){return d(this)};n.prototype.render=function(){var n=l()?x(this):b(this);return t(m,Object.assign({},n))};return n}());function x(n){var e=r("US"),t=e[0],o=e[1];var i=r(""),a=i[0],c=i[1];var u=r(""),s=u[0],l=u[1];return v({states:{brandName:"Test Brand",open:true,loading:false,submitting:false,isExistingPartner:false,countryCode:t,currency:a,error:s,success:false,filteredCountries:[],filteredCurrencies:[]},callbacks:{onCountryChange:function(n){var e,t;var r=(t=(e=n===null||n===void 0?void 0:n.detail)===null||e===void 0?void 0:e.item)===null||t===void 0?void 0:t.__value;if(r){o(r);c("")}},onCurrencyChange:function(n){var e,t;var r=(t=(e=n===null||n===void 0?void 0:n.detail)===null||e===void 0?void 0:e.item)===null||t===void 0?void 0:t.__value;if(r)c(r)},setCountrySearch:function(){},setCurrencySearch:function(){},onSubmit:function(){if(!t||!a){l(n.missingFieldsErrorText);return}l("")},onClose:function(){}},text:{modalHeader:n.modalHeader,descriptionNewPartner:n.descriptionNewPartner,descriptionExistingPartner:n.descriptionExistingPartner,countryLabel:n.countryLabel,currencyLabel:n.currencyLabel,submitButtonLabel:n.submitButtonLabel,confirmButtonLabel:n.confirmButtonLabel,searchCountryPlaceholder:n.searchCountryPlaceholder,searchCurrencyPlaceholder:n.searchCurrencyPlaceholder,supportDescriptionExistingPartner:n.supportDescriptionExistingPartner,modalHeaderExistingPartner:n.modalHeaderExistingPartner}},n.demoData||{},{arrayMerge:function(n,e){return e}})}}}}));
@@ -0,0 +1,228 @@
1
+ import { r as registerInstance, h as h$1 } from './index-d9876cd5.js';
2
+ import { i as useState, j as useEffect, o as h } from './dom-context-hooks.module-8411297a.js';
3
+ import { d as dist, J, I as In, o as En, X as Xe, i as isDemo } from './index.module-5db56a7a.js';
4
+ import { g as getProps } from './utils-61821fb1.js';
5
+ import { c as cjs } from './cjs-e829b75b.js';
6
+ import { p as parseStates } from './parseStates-ed75e224.js';
7
+ import { e as extractProps } from './extractProps-ae1afbb3.js';
8
+ import { S as SHOW_CODE_NAMESPACE, V as VERIFICATION_EMAIL_NAMESPACE, a as VERIFICATION_PARENT_NAMESPACE } from './keys-406491dc.js';
9
+ import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
10
+
11
+ const USER_LOOKUP = dist.gql `
12
+ query checkUserVerification {
13
+ viewer {
14
+ ... on User {
15
+ id
16
+ accountId
17
+ email
18
+ emailVerified
19
+ managedIdentity {
20
+ email
21
+ emailVerified
22
+ }
23
+ }
24
+ }
25
+ }
26
+ `;
27
+ function useWidgetVerification() {
28
+ const userIdentity = J();
29
+ const [showCode, setShowCode] = In({
30
+ namespace: SHOW_CODE_NAMESPACE,
31
+ initialValue: false,
32
+ });
33
+ const [email, setEmail] = In({
34
+ namespace: VERIFICATION_EMAIL_NAMESPACE,
35
+ initialValue: userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.email,
36
+ });
37
+ const setContext = En(VERIFICATION_PARENT_NAMESPACE);
38
+ const [loading, setLoading] = useState(true);
39
+ const [showPartnerModal, setShowPartnerModal] = useState(false);
40
+ const [fetch] = Xe(USER_LOOKUP);
41
+ useEffect(() => {
42
+ const checkUser = async () => {
43
+ var _a, _b, _c;
44
+ try {
45
+ const res = await fetch({});
46
+ if (!res || res instanceof Error)
47
+ throw new Error();
48
+ if ((_a = res === null || res === void 0 ? void 0 : res.viewer) === null || _a === void 0 ? void 0 : _a.emailVerified)
49
+ setContext(true);
50
+ else if ((_c = (_b = res === null || res === void 0 ? void 0 : res.viewer) === null || _b === void 0 ? void 0 : _b.managedIdentity) === null || _c === void 0 ? void 0 : _c.emailVerified)
51
+ setContext(true);
52
+ }
53
+ catch (e) {
54
+ console.error("Could not fetch user information:", e);
55
+ }
56
+ finally {
57
+ setLoading(false);
58
+ }
59
+ };
60
+ checkUser();
61
+ }, []);
62
+ const onVerification = () => {
63
+ setShowPartnerModal(true);
64
+ };
65
+ const onPartnerModalComplete = () => {
66
+ setShowPartnerModal(false);
67
+ setContext(true);
68
+ };
69
+ // Listen for partner modal completion (fires on successful createImpactConnection or confirm)
70
+ useEffect(() => {
71
+ if (!showPartnerModal)
72
+ return;
73
+ const handler = () => onPartnerModalComplete();
74
+ window.addEventListener(TAX_FORM_UPDATED_EVENT_KEY, handler);
75
+ return () => window.removeEventListener(TAX_FORM_UPDATED_EVENT_KEY, handler);
76
+ }, [showPartnerModal]);
77
+ return { showCode, showPartnerModal, onVerification, onPartnerModalComplete, loading };
78
+ }
79
+
80
+ const WidgetVerification = class {
81
+ constructor(hostRef) {
82
+ registerInstance(this, hostRef);
83
+ // ! Any updated must be reflected in sqm-widget-verification-internal AND sqm-email-verification AND sqm-code-verification
84
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
+ GENERAL PROPS
86
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
87
+ /**
88
+ * @uiName General verify widget header text
89
+ * @uiGroup General Text
90
+ */
91
+ this.general_verifyEmailHeader = "Verify your email";
92
+ /**
93
+ * @uiName General verify widget description text
94
+ * @uiGroup General Text
95
+ */
96
+ this.general_verifyEmailDescription = "To get your cash paid out directly to your bank account, please complete your account setup";
97
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
+ EMAIL STEP PROPS
99
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
100
+ /**
101
+ * @uiName Verify email widget header text
102
+ * @uiGroup Email Verification Step
103
+ */
104
+ this.emailStep_verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
105
+ /**
106
+ * @uiName Send code to email alert header
107
+ * @uiGroup Email Verification Step
108
+ */
109
+ this.emailStep_sendCodeErrorHeader = "There was an error sending your code.";
110
+ /**
111
+ * @uiName Send code to email alert description
112
+ * @uiGroup Email Verification Step
113
+ */
114
+ this.emailStep_sendCodeErrorDescription = "Please try again. If this problem continues, contact our program support team.";
115
+ /**
116
+ * @uiName Email input label
117
+ * @uiGroup Email Verification Step
118
+ */
119
+ this.emailStep_emailLabel = "Email";
120
+ /**
121
+ * @uiName Send code button text
122
+ * @uiGroup Email Verification Step
123
+ */
124
+ this.emailStep_sendCodeText = "Send code";
125
+ /**
126
+ * @uiName Send code button text
127
+ * @uiGroup Email Verification Step
128
+ */
129
+ this.emailStep_emailValidationErrorText = "Please enter a valid email";
130
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131
+ EMAIL STEP PROPS
132
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
133
+ /**
134
+ * @uiName Verify code widget header text
135
+ * @uiGroup Code Verification Step
136
+ */
137
+ this.codeStep_verifyCodeHeaderText = "Enter the code sent to {email} from our referral provider, impact.com.";
138
+ /**
139
+ * @uiName Reverify code widget header text
140
+ * @uiGroup Code Verification Step
141
+ */
142
+ this.codeStep_reverifyCodeHeaderText = "Enter the code sent to {email} from our referral provider, impact.com.";
143
+ /**
144
+ * Text displayed under verify button
145
+ * @uiName Resend code text
146
+ * @uiGroup Code Verification Step
147
+ */
148
+ this.codeStep_resendCodeText = "Didn't receive your code? {resendCodeLink}";
149
+ /**
150
+ * The link that appears in the resend code link
151
+ * @uiName Resend code label
152
+ * @uiGroup Code Verification Step
153
+ */
154
+ this.codeStep_resendCodeLabel = "Resend code";
155
+ /**
156
+ * Link text displayed under verify button
157
+ * @uiName Resend code text
158
+ * @uiGroup Code Verification Step
159
+ */
160
+ this.codeStep_codeResentSuccessfullyText = "Another code has been sent to {email}";
161
+ /**
162
+ * Error text displayed under verification input
163
+ * @uiName Invalid code text
164
+ * @uiGroup Code Verification Step
165
+ */
166
+ this.codeStep_invalidCodeText = "Please check your code and try again. If you’re still having trouble, try resending your code.";
167
+ /**
168
+ * @uiName Verify code button text
169
+ * @uiGroup Code Verification Step
170
+ */
171
+ this.codeStep_verifyText = "Verify";
172
+ /**
173
+ * Displayed when the email verification fails due to a network error. The participant can try refreshing the page.
174
+ * @uiName Network error message
175
+ * @uiGroup Code Verification Step
176
+ */
177
+ this.codeStep_networkErrorMessage = "An error occurred while verifying your email. Please refresh the page and try again.";
178
+ /**
179
+ * @undocumented
180
+ * @componentState { "title": "Step 1: Enter email", "props": { "showCode": false }, "dependencies": ["sqm-email-verification"], "uiGroup": "Email Verification Step" }
181
+ * @componentState { "title": "Step 2: Enter code", "props": { "showCode": true }, "dependencies": ["sqm-code-verification"], "uiGroup": "Code Verification Step" }
182
+ */
183
+ this.stateController = "{}";
184
+ h(this);
185
+ }
186
+ disconnectedCallback() { }
187
+ getStepTextProps(prefix) {
188
+ const props = getProps(this);
189
+ return extractProps(props, prefix);
190
+ }
191
+ render() {
192
+ const props = isDemo()
193
+ ? useDemoWidgetVerificationInternal(this)
194
+ : useWidgetVerification();
195
+ if (props.loading)
196
+ return h$1("sl-spinner", null);
197
+ if (props.showPartnerModal) {
198
+ return h$1("sqm-partner-info-modal", null);
199
+ }
200
+ const generalText = this.getStepTextProps("general_");
201
+ return (h$1("div", null, h$1("h3", { style: { fontSize: "24px", margin: "0" } }, generalText.verifyEmailHeader), h$1("p", { style: {
202
+ color: "var(--sl-color-neutral-500)",
203
+ fontSize: "var(--sl-font-size-medium)",
204
+ margin: "0",
205
+ } }, generalText.verifyEmailDescription), props.showCode ? (h$1("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_")))) : (h$1("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))))));
206
+ }
207
+ };
208
+ function useDemoWidgetVerificationInternal(props) {
209
+ const [showCode, setShowCode] = In({
210
+ namespace: SHOW_CODE_NAMESPACE,
211
+ initialValue: false,
212
+ });
213
+ const [email, setEmail] = In({
214
+ namespace: VERIFICATION_EMAIL_NAMESPACE,
215
+ initialValue: undefined,
216
+ });
217
+ const setContext = En(VERIFICATION_PARENT_NAMESPACE);
218
+ const states = parseStates(props.stateController);
219
+ const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-widget-verification"
220
+ ? { ...prev, ...states[key] }
221
+ : { ...prev, [`${key}_stateController`]: states[key] }, {});
222
+ const onVerification = () => {
223
+ setContext(true);
224
+ };
225
+ return cjs({ showCode, showPartnerModal: false, onVerification, onPartnerModalComplete: () => { }, loading: false }, formatted || {}, { arrayMerge: (_, a) => a });
226
+ }
227
+
228
+ export { WidgetVerification as sqm_widget_verification };
@@ -0,0 +1 @@
1
+ var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-6582b378.system.js","./dom-context-hooks.module-d6e89c16.system.js","./index.module-3103d9ae.system.js","./utils-b405e671.system.js","./cjs-f0ef8d23.system.js","./parseStates-5fae0361.system.js","./extractProps-32938668.system.js","./keys-06ca8103.system.js","./eventKeys-8c222120.system.js"],(function(e){"use strict";var t,r,n,i,o,a,s,l,c,u,d,f,m,p,v,h,y,_,g;return{setters:[function(e){t=e.r;r=e.h},function(e){n=e.i;i=e.j;o=e.o},function(e){a=e.d;s=e.J;l=e.I;c=e.o;u=e.X;d=e.i},function(e){f=e.g},function(e){m=e.c},function(e){p=e.p},function(e){v=e.e},function(e){h=e.S;y=e.V;_=e.a},function(e){g=e.T}],execute:function(){var w=a.gql(__makeTemplateObject(["\n query checkUserVerification {\n viewer {\n ... on User {\n id\n accountId\n email\n emailVerified\n managedIdentity {\n email\n emailVerified\n }\n }\n }\n }\n"],["\n query checkUserVerification {\n viewer {\n ... on User {\n id\n accountId\n email\n emailVerified\n managedIdentity {\n email\n emailVerified\n }\n }\n }\n }\n"]));function b(){var e=this;var t=s();var r=l({namespace:h,initialValue:false}),o=r[0],a=r[1];var d=l({namespace:y,initialValue:t===null||t===void 0?void 0:t.email}),f=d[0],m=d[1];var p=c(_);var v=n(true),b=v[0],S=v[1];var x=n(false),j=x[0],T=x[1];var V=u(w)[0];i((function(){var t=function(){return __awaiter(e,void 0,void 0,(function(){var e,t,r,n,i;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,3,4]);return[4,V({})];case 1:n=o.sent();if(!n||n instanceof Error)throw new Error;if((e=n===null||n===void 0?void 0:n.viewer)===null||e===void 0?void 0:e.emailVerified)p(true);else if((r=(t=n===null||n===void 0?void 0:n.viewer)===null||t===void 0?void 0:t.managedIdentity)===null||r===void 0?void 0:r.emailVerified)p(true);return[3,4];case 2:i=o.sent();console.error("Could not fetch user information:",i);return[3,4];case 3:S(false);return[7];case 4:return[2]}}))}))};t()}),[]);var C=function(){T(true)};var P=function(){T(false);p(true)};i((function(){if(!j)return;var e=function(){return P()};window.addEventListener(g,e);return function(){return window.removeEventListener(g,e)}}),[j]);return{showCode:o,showPartnerModal:j,onVerification:C,onPartnerModalComplete:P,loading:b}}var S=e("sqm_widget_verification",function(){function e(e){t(this,e);this.general_verifyEmailHeader="Verify your email";this.general_verifyEmailDescription="To get your cash paid out directly to your bank account, please complete your account setup";this.emailStep_verifyEmailHeaderText="Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";this.emailStep_sendCodeErrorHeader="There was an error sending your code.";this.emailStep_sendCodeErrorDescription="Please try again. If this problem continues, contact our program support team.";this.emailStep_emailLabel="Email";this.emailStep_sendCodeText="Send code";this.emailStep_emailValidationErrorText="Please enter a valid email";this.codeStep_verifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.";this.codeStep_reverifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.";this.codeStep_resendCodeText="Didn't receive your code? {resendCodeLink}";this.codeStep_resendCodeLabel="Resend code";this.codeStep_codeResentSuccessfullyText="Another code has been sent to {email}";this.codeStep_invalidCodeText="Please check your code and try again. If you’re still having trouble, try resending your code.";this.codeStep_verifyText="Verify";this.codeStep_networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.";this.stateController="{}";o(this)}e.prototype.disconnectedCallback=function(){};e.prototype.getStepTextProps=function(e){var t=f(this);return v(t,e)};e.prototype.render=function(){var e=d()?x(this):b();if(e.loading)return r("sl-spinner",null);if(e.showPartnerModal){return r("sqm-partner-info-modal",null)}var t=this.getStepTextProps("general_");return r("div",null,r("h3",{style:{fontSize:"24px",margin:"0"}},t.verifyEmailHeader),r("p",{style:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-medium)",margin:"0"}},t.verifyEmailDescription),e.showCode?r("sqm-code-verification",Object.assign({onVerification:e.onVerification},this.getStepTextProps("codeStep_"),v(e,"sqm-code-verification_"))):r("sqm-email-verification",Object.assign({},this.getStepTextProps("emailStep_"),v(e,"sqm-email-verification_"))))};return e}());function x(e){var t=l({namespace:h,initialValue:false}),r=t[0],n=t[1];var i=l({namespace:y,initialValue:undefined}),o=i[0],a=i[1];var s=c(_);var u=p(e.stateController);var d=Object.keys(u).reduce((function(e,t){var r;return t==="sqm-widget-verification"?__assign(__assign({},e),u[t]):__assign(__assign({},e),(r={},r[t+"_stateController"]=u[t],r))}),{});var f=function(){s(true)};return m({showCode:r,showPartnerModal:false,onVerification:f,onPartnerModalComplete:function(){},loading:false},d||{},{arrayMerge:function(e,t){return t}})}}}}));
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const NewPartnerEmpty: () => any;
6
+ export declare const NewPartnerPrefilled: () => any;
7
+ export declare const NewPartnerFullySelected: () => any;
8
+ export declare const ExistingPartnerConfirm: () => any;
9
+ export declare const Submitting: () => any;
10
+ export declare const WithError: () => any;
11
+ export declare const ValidationError: () => any;
12
+ export declare const Closed: () => any;
13
+ export declare const FullStackDemo: () => any;