@saasquatch/mint-components 2.2.0-6 → 2.2.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 (456) hide show
  1. package/dist/cjs/{ShadowViewAddon-1c054d52.js → ShadowViewAddon-3b477e58.js} +429 -27
  2. package/dist/cjs/{data-c03e282a.js → data-8c8a08f6.js} +90 -1
  3. package/dist/cjs/extractProps-e9c55ba8.js +35 -0
  4. package/dist/cjs/{keys-5a2c9ed2.js → keys-cff24974.js} +0 -4
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mint-components.cjs.js +1 -1
  7. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +101 -482
  8. package/dist/cjs/sqm-big-stat_46.cjs.entry.js +360 -424
  9. package/dist/cjs/sqm-code-verification.cjs.entry.js +6 -5
  10. package/dist/cjs/sqm-email-verification.cjs.entry.js +418 -0
  11. package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
  12. package/dist/cjs/{sqm-portal-container-view-70a47420.js → sqm-portal-container-view-757f921b.js} +5 -6
  13. package/dist/cjs/{sqm-portal-email-verification-view-d51c2a06.js → sqm-portal-email-verification-view-abb773a7.js} +1 -1
  14. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
  15. package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +5 -5
  16. package/dist/cjs/{sqm-portal-profile-view-e6927959.js → sqm-portal-profile-view-3515e1e5.js} +1 -1
  17. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  18. package/dist/cjs/{sqm-portal-registration-form-view-fd48f1d3.js → sqm-portal-registration-form-view-a45f7a52.js} +1 -1
  19. package/dist/cjs/{sqm-portal-reset-password-view-d90d77f9.js → sqm-portal-reset-password-view-a767b044.js} +1 -1
  20. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +2 -2
  21. package/dist/cjs/{sqm-portal-verify-email-view-6258dcae.js → sqm-portal-verify-email-view-717d0633.js} +1 -1
  22. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +10 -28
  23. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
  24. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +9 -30
  25. package/dist/cjs/sqm-stencilbook.cjs.entry.js +532 -740
  26. package/dist/cjs/{sqm-text-span-view-8a32dd8c.js → sqm-text-span-view-b9e10f5d.js} +1 -1
  27. package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
  28. package/dist/cjs/{sqm-user-info-form-view-4d56b339.js → sqm-user-info-form-view-53306f6e.js} +40 -33
  29. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
  30. package/dist/cjs/sqm-widget-verification.cjs.entry.js +214 -0
  31. package/dist/cjs/{usePayoutStatus-0a98ee05.js → usePayoutStatus-0192fccd.js} +5 -3
  32. package/dist/collection/collection-manifest.json +1 -1
  33. package/dist/collection/components/sqm-big-stat/useBigStat.js +5 -6
  34. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +1 -1
  35. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +2 -3
  36. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +6 -7
  37. package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +1 -1
  38. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +1 -1
  39. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
  40. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  41. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +27 -1
  42. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +0 -1
  43. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +0 -1
  44. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +2 -2
  45. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +145 -209
  46. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +10 -30
  47. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +0 -1
  48. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +2 -2
  49. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +137 -223
  50. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +10 -30
  51. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +0 -1
  52. package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
  53. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +136 -11
  54. package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
  55. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +192 -0
  56. package/dist/collection/components/sqm-share-link/sqm-share-link.js +935 -48
  57. package/dist/collection/components/sqm-share-link/useShareLink.js +227 -14
  58. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -4
  59. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
  60. package/dist/collection/components/sqm-user-attribute/UserAttribute.stories.js +43 -0
  61. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +19 -0
  62. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +175 -0
  63. package/dist/collection/components/sqm-user-attribute/useUserAttribute.js +30 -0
  64. package/dist/collection/components/sqm-widget-verification/keys.js +0 -2
  65. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +4 -3
  66. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +2 -0
  67. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +9 -19
  68. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +46 -486
  69. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +11 -43
  70. package/dist/collection/components/tax-and-cash/data.js +0 -1
  71. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
  72. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
  73. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
  74. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  75. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +12 -51
  76. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  77. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +36 -7
  78. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +0 -3
  79. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  80. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +1 -0
  81. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +18 -10
  82. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +25 -0
  83. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +17 -34
  84. package/dist/esm/{ShadowViewAddon-4d554869.js → ShadowViewAddon-0b980200.js} +435 -34
  85. package/dist/esm/data-12e6aae1.js +216 -0
  86. package/dist/esm/extractProps-54064fb0.js +32 -0
  87. package/dist/esm/{global-75e96214.js → global-96c14d63.js} +1 -1
  88. package/dist/esm/{index.module-02cb914c.js → index.module-b23fdad8.js} +1 -1
  89. package/dist/esm/keys-406491dc.js +6 -0
  90. package/dist/esm/loader.js +3 -3
  91. package/dist/esm/mint-components.js +3 -3
  92. package/dist/esm/{re-render-bf46ba54.js → re-render-f30aeb6b.js} +1 -1
  93. package/dist/esm/sqm-banking-info-form_10.entry.js +95 -476
  94. package/dist/esm/sqm-big-stat_46.entry.js +364 -428
  95. package/dist/esm/sqm-close-button.entry.js +1 -1
  96. package/dist/esm/sqm-code-verification.entry.js +9 -8
  97. package/dist/esm/sqm-context-router.entry.js +1 -1
  98. package/dist/esm/sqm-email-verification.entry.js +414 -0
  99. package/dist/esm/sqm-empty_4.entry.js +3 -3
  100. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  101. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  102. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  103. package/dist/esm/{sqm-lead-checkbox-field-view-bfafee56.js → sqm-lead-checkbox-field-view-7928db07.js} +1 -1
  104. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  105. package/dist/esm/{sqm-lead-input-field-view-b945edf4.js → sqm-lead-input-field-view-d1b91650.js} +1 -1
  106. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  107. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  108. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  109. package/dist/esm/{sqm-navigation-sidebar-item-view-8d98fcf3.js → sqm-navigation-sidebar-item-view-b3beac5a.js} +1 -1
  110. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  111. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  112. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  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-container-view-a8c708cd.js → sqm-portal-container-view-200c9df8.js} +6 -7
  116. package/dist/esm/{sqm-portal-email-verification-view-58bad294.js → sqm-portal-email-verification-view-04528277.js} +2 -2
  117. package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
  118. package/dist/esm/sqm-portal-forgot-password_6.entry.js +8 -8
  119. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  120. package/dist/esm/{sqm-portal-profile-view-115bad4a.js → sqm-portal-profile-view-b5ea620f.js} +2 -2
  121. package/dist/esm/sqm-portal-profile.entry.js +5 -5
  122. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  123. package/dist/esm/{sqm-portal-registration-form-view-9bf30b56.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
  124. package/dist/esm/{sqm-portal-reset-password-view-f8d1689c.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
  125. package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
  126. package/dist/esm/{sqm-portal-verify-email-view-c053ead1.js → sqm-portal-verify-email-view-c61536b7.js} +2 -2
  127. package/dist/esm/sqm-qr-code.entry.js +2 -2
  128. package/dist/esm/sqm-referral-table_11.entry.js +15 -33
  129. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  130. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  131. package/dist/esm/sqm-rewards-table_9.entry.js +14 -35
  132. package/dist/esm/sqm-stencilbook.entry.js +506 -714
  133. package/dist/esm/sqm-tab.entry.js +2 -2
  134. package/dist/esm/sqm-tabs.entry.js +3 -3
  135. package/dist/esm/{sqm-text-span-view-4db9e33f.js → sqm-text-span-view-72f43dff.js} +1 -1
  136. package/dist/esm/sqm-text-span.entry.js +1 -1
  137. package/dist/esm/{sqm-user-info-form-view-d13f9d3e.js → sqm-user-info-form-view-19d81a2b.js} +20 -13
  138. package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
  139. package/dist/esm/sqm-widget-verification.entry.js +210 -0
  140. package/dist/esm/{useChildElements-06937df7.js → useChildElements-9bccfb72.js} +1 -1
  141. package/dist/esm/{useInstantAccessRegistration-69c9ffe0.js → useInstantAccessRegistration-69fefed0.js} +2 -2
  142. package/dist/esm/{useLeadFormState-332b2796.js → useLeadFormState-dd4e8b08.js} +2 -2
  143. package/dist/esm/{usePayoutStatus-227ae365.js → usePayoutStatus-46c0c289.js} +4 -3
  144. package/dist/esm/{usePortalRegistrationForm-3a1f36a2.js → usePortalRegistrationForm-62de6fb1.js} +2 -2
  145. package/dist/esm/{useReferralCodes-25f8b792.js → useReferralCodes-52ca720f.js} +1 -1
  146. package/dist/esm/{useReferralTable-03d32c6f.js → useReferralTable-92af4133.js} +3 -3
  147. package/dist/esm/{useRegistrationFormState-aa44cfff.js → useRegistrationFormState-2c090c38.js} +1 -1
  148. package/dist/esm/{useVerificationEmail-9f2c0bab.js → useVerificationEmail-c13c3b51.js} +1 -1
  149. package/dist/esm/{utilities-cbd8f2eb.js → utilities-77b1e0cc.js} +1 -1
  150. package/dist/esm-es5/ShadowViewAddon-0b980200.js +1 -0
  151. package/dist/esm-es5/data-12e6aae1.js +1 -0
  152. package/dist/esm-es5/extractProps-54064fb0.js +1 -0
  153. package/dist/esm-es5/{global-75e96214.js → global-96c14d63.js} +1 -1
  154. package/dist/esm-es5/{index.module-02cb914c.js → index.module-b23fdad8.js} +1 -1
  155. package/dist/esm-es5/keys-406491dc.js +1 -0
  156. package/dist/esm-es5/loader.js +1 -1
  157. package/dist/esm-es5/mint-components.js +1 -1
  158. package/dist/esm-es5/{re-render-bf46ba54.js → re-render-f30aeb6b.js} +1 -1
  159. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  160. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
  161. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  162. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  163. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  164. package/dist/esm-es5/sqm-email-verification.entry.js +1 -0
  165. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  166. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  167. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  168. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  169. package/dist/esm-es5/{sqm-lead-checkbox-field-view-bfafee56.js → sqm-lead-checkbox-field-view-7928db07.js} +1 -1
  170. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  171. package/dist/esm-es5/{sqm-lead-input-field-view-b945edf4.js → sqm-lead-input-field-view-d1b91650.js} +1 -1
  172. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  173. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  174. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  175. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-8d98fcf3.js → sqm-navigation-sidebar-item-view-b3beac5a.js} +1 -1
  176. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  177. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  178. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  179. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  180. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  181. package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +1 -0
  182. package/dist/esm-es5/{sqm-portal-email-verification-view-58bad294.js → sqm-portal-email-verification-view-04528277.js} +1 -1
  183. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  184. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  185. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  186. package/dist/esm-es5/{sqm-portal-profile-view-115bad4a.js → sqm-portal-profile-view-b5ea620f.js} +1 -1
  187. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  188. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  189. package/dist/esm-es5/{sqm-portal-registration-form-view-9bf30b56.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
  190. package/dist/esm-es5/{sqm-portal-reset-password-view-f8d1689c.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
  191. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  192. package/dist/esm-es5/{sqm-portal-verify-email-view-c053ead1.js → sqm-portal-verify-email-view-c61536b7.js} +1 -1
  193. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  194. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  195. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  196. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  197. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  198. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  199. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  200. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  201. package/dist/esm-es5/{sqm-text-span-view-4db9e33f.js → sqm-text-span-view-72f43dff.js} +1 -1
  202. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  203. package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +1 -0
  204. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  205. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -0
  206. package/dist/esm-es5/{useChildElements-06937df7.js → useChildElements-9bccfb72.js} +1 -1
  207. package/dist/esm-es5/{useInstantAccessRegistration-69c9ffe0.js → useInstantAccessRegistration-69fefed0.js} +1 -1
  208. package/dist/esm-es5/{useLeadFormState-332b2796.js → useLeadFormState-dd4e8b08.js} +1 -1
  209. package/dist/esm-es5/{usePayoutStatus-227ae365.js → usePayoutStatus-46c0c289.js} +2 -2
  210. package/dist/esm-es5/{usePortalRegistrationForm-3a1f36a2.js → usePortalRegistrationForm-62de6fb1.js} +1 -1
  211. package/dist/esm-es5/{useReferralCodes-25f8b792.js → useReferralCodes-52ca720f.js} +1 -1
  212. package/dist/esm-es5/{useReferralTable-03d32c6f.js → useReferralTable-92af4133.js} +1 -1
  213. package/dist/esm-es5/{useRegistrationFormState-aa44cfff.js → useRegistrationFormState-2c090c38.js} +1 -1
  214. package/dist/esm-es5/{useVerificationEmail-9f2c0bab.js → useVerificationEmail-c13c3b51.js} +1 -1
  215. package/dist/esm-es5/{utilities-cbd8f2eb.js → utilities-77b1e0cc.js} +1 -1
  216. package/dist/mint-components/mint-components.esm.js +1 -1
  217. package/dist/mint-components/mint-components.js +1 -1
  218. package/dist/mint-components/p-00b235c5.system.entry.js +1 -0
  219. package/dist/mint-components/{p-4eadbd5b.entry.js → p-013564b3.entry.js} +1 -1
  220. package/dist/mint-components/{p-1b0326d1.entry.js → p-02499e08.entry.js} +1 -1
  221. package/dist/mint-components/{p-d34564f8.system.entry.js → p-027fc3be.system.entry.js} +1 -1
  222. package/dist/mint-components/{p-bb0b5e4b.js → p-035d9b65.js} +1 -1
  223. package/dist/mint-components/{p-e651593c.system.js → p-036a2617.system.js} +1 -1
  224. package/dist/mint-components/p-044f930a.system.js +1 -0
  225. package/dist/mint-components/p-0706cf9e.system.entry.js +1 -0
  226. package/dist/mint-components/p-0797a946.js +1 -0
  227. package/dist/mint-components/{p-60b1f3d9.entry.js → p-09348341.entry.js} +1 -1
  228. package/dist/mint-components/{p-29bc5f50.entry.js → p-09f7aacd.entry.js} +2 -2
  229. package/dist/mint-components/p-0b1e90fe.system.js +1 -0
  230. package/dist/{esm/data-017e5ef2.js → mint-components/p-0c0d4065.js} +5 -24
  231. package/dist/mint-components/{p-cfea215d.js → p-0d83907e.js} +1 -1
  232. package/dist/mint-components/p-1021a49f.system.entry.js +1 -0
  233. package/dist/mint-components/p-13292317.entry.js +11 -0
  234. package/dist/mint-components/{p-731c4d33.entry.js → p-13d1b10d.entry.js} +1 -1
  235. package/dist/mint-components/{p-d284ae70.system.js → p-172675ca.system.js} +1 -1
  236. package/dist/mint-components/{p-b2ad3fca.system.js → p-19c441b2.system.js} +1 -1
  237. package/dist/mint-components/{p-dafe30c3.entry.js → p-1d92c169.entry.js} +1 -1
  238. package/dist/mint-components/{p-0815b973.system.js → p-205cfdcd.system.js} +1 -1
  239. package/dist/mint-components/{p-ae4994e1.js → p-2668335b.js} +1 -1
  240. package/dist/mint-components/{p-13bb56a8.system.entry.js → p-2b4af8e8.system.entry.js} +1 -1
  241. package/dist/mint-components/p-2d5c2bd4.system.entry.js +1 -0
  242. package/dist/mint-components/{p-2190dc73.system.js → p-30c1ef36.system.js} +1 -1
  243. package/dist/mint-components/{p-4eaa3eb7.js → p-3286ef38.js} +1 -1
  244. package/dist/mint-components/{p-eae44b42.js → p-3366b81e.js} +2 -2
  245. package/dist/mint-components/p-38c7775a.js +1 -0
  246. package/dist/mint-components/p-3adbfd0b.system.js +6 -0
  247. package/dist/mint-components/p-3af3e2c1.entry.js +25 -0
  248. package/dist/mint-components/{p-4e3db52b.entry.js → p-3bc62ca6.entry.js} +1 -1
  249. package/dist/mint-components/{p-d71a8b38.entry.js → p-40bad95a.entry.js} +2 -2
  250. package/dist/mint-components/{p-bd972473.system.js → p-43c31fd5.system.js} +1 -1
  251. package/dist/mint-components/{p-df897432.system.entry.js → p-4da5a3fe.system.entry.js} +1 -1
  252. package/dist/mint-components/{p-bcfdb510.entry.js → p-52674798.entry.js} +1 -1
  253. package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
  254. package/dist/mint-components/p-57dd28bd.system.js +1 -0
  255. package/dist/mint-components/p-5b1d2866.system.js +1 -0
  256. package/dist/mint-components/{p-02c0f88e.system.entry.js → p-5b871e38.system.entry.js} +1 -1
  257. package/dist/mint-components/p-5bc5c61e.entry.js +1 -0
  258. package/dist/mint-components/{p-7ea3f49c.entry.js → p-5c4ba8a0.entry.js} +1 -1
  259. package/dist/mint-components/{p-81bc6dca.system.entry.js → p-5ce78407.system.entry.js} +1 -1
  260. package/dist/mint-components/{p-14183edc.entry.js → p-61897e72.entry.js} +1 -1
  261. package/dist/mint-components/{p-025ddad2.system.entry.js → p-626b31cb.system.entry.js} +1 -1
  262. package/dist/mint-components/{p-bf9ab2d3.js → p-642f2c89.js} +1 -1
  263. package/dist/mint-components/{p-78e6dc8d.entry.js → p-653db72e.entry.js} +1 -1
  264. package/dist/mint-components/{p-27daf264.entry.js → p-6668f9f0.entry.js} +1 -1
  265. package/dist/mint-components/{p-f368f04a.system.js → p-686dd5eb.system.js} +1 -1
  266. package/dist/mint-components/p-6c4ad51a.js +1 -0
  267. package/dist/mint-components/{p-8e148cb0.system.js → p-7265bbcb.system.js} +1 -1
  268. package/dist/mint-components/{p-2d3f7b76.system.entry.js → p-738dce27.system.entry.js} +1 -1
  269. package/dist/mint-components/{p-379cb9f1.system.js → p-7562cd98.system.js} +1 -1
  270. package/dist/mint-components/{p-5fdf0286.system.js → p-77b9cde8.system.js} +1 -1
  271. package/dist/mint-components/p-77fa2383.entry.js +1 -0
  272. package/dist/mint-components/{p-f6de2e5c.system.entry.js → p-782af7ae.system.entry.js} +1 -1
  273. package/dist/mint-components/p-7939e4af.entry.js +1 -0
  274. package/dist/mint-components/{p-1317cc92.system.js → p-7b59e13c.system.js} +1 -1
  275. package/dist/mint-components/{p-f32050f6.system.js → p-7efb8782.system.js} +1 -1
  276. package/dist/mint-components/{p-24f1d342.system.entry.js → p-80e116ec.system.entry.js} +1 -1
  277. package/dist/mint-components/p-8285869e.entry.js +9 -0
  278. package/dist/mint-components/{p-614723aa.js → p-832aea99.js} +1 -1
  279. package/dist/mint-components/{p-e920c95c.system.js → p-85721089.system.js} +1 -1
  280. package/dist/mint-components/{p-376c7608.system.js → p-8583ce0c.system.js} +1 -1
  281. package/dist/mint-components/{p-71561bb2.system.entry.js → p-8899ff38.system.entry.js} +1 -1
  282. package/dist/mint-components/p-892797eb.system.entry.js +1 -0
  283. package/dist/mint-components/{p-2ab31786.js → p-8962e023.js} +1 -1
  284. package/dist/mint-components/{p-1599a178.entry.js → p-8f2d03c7.entry.js} +1 -1
  285. package/dist/mint-components/{p-ab59c5eb.system.entry.js → p-90833864.system.entry.js} +1 -1
  286. package/dist/mint-components/p-91a96e98.entry.js +1 -0
  287. package/dist/mint-components/{p-ca5b9f4d.system.entry.js → p-9390586b.system.entry.js} +1 -1
  288. package/dist/mint-components/{p-38d04e4b.entry.js → p-95510f27.entry.js} +1 -1
  289. package/dist/mint-components/{p-432a44de.entry.js → p-982d1f6f.entry.js} +2 -3
  290. package/dist/mint-components/{p-c66e5217.system.js → p-a0c5631b.system.js} +1 -1
  291. package/dist/mint-components/{p-df88dcaa.system.js → p-a4825ec2.system.js} +1 -1
  292. package/dist/mint-components/{p-0766438e.js → p-a4f8abad.js} +1 -1
  293. package/dist/mint-components/{p-209157a9.system.entry.js → p-a96c9bbb.system.entry.js} +1 -1
  294. package/dist/mint-components/{p-eee0bcf4.entry.js → p-af407cce.entry.js} +1 -1
  295. package/dist/mint-components/p-b2b85238.entry.js +1 -0
  296. package/dist/mint-components/p-b395470f.entry.js +16 -0
  297. package/dist/mint-components/{p-45e2a83a.js → p-b3ad957c.js} +1 -1
  298. package/dist/mint-components/{p-921eb024.entry.js → p-b66f45d1.entry.js} +1 -1
  299. package/dist/mint-components/{p-cfba6b4e.system.entry.js → p-b96e90a2.system.entry.js} +1 -1
  300. package/dist/mint-components/{p-45230a44.js → p-bab4929e.js} +1 -1
  301. package/dist/mint-components/p-bba16a46.system.entry.js +1 -0
  302. package/dist/mint-components/{p-c0a85e22.js → p-bc386a7b.js} +1 -1
  303. package/dist/mint-components/p-be12607e.entry.js +281 -0
  304. package/dist/mint-components/{p-a7f72a66.js → p-bee4af5d.js} +1 -1
  305. package/dist/mint-components/p-bf188b72.system.entry.js +1 -0
  306. package/dist/mint-components/{p-6b4e5d94.system.entry.js → p-c30d0049.system.entry.js} +1 -1
  307. package/dist/mint-components/{p-30cfe3e3.system.entry.js → p-c45a929a.system.entry.js} +1 -1
  308. package/dist/mint-components/{p-50d959bd.js → p-c813ec64.js} +1 -1
  309. package/dist/mint-components/p-c8a3f3b0.js +499 -0
  310. package/dist/mint-components/{p-b3309d9b.entry.js → p-c8a8d231.entry.js} +2 -2
  311. package/dist/mint-components/{p-3354cc75.system.entry.js → p-c8bcbf8b.system.entry.js} +1 -1
  312. package/dist/mint-components/p-ca098be1.system.js +1 -0
  313. package/dist/mint-components/{p-623a0a0b.system.entry.js → p-d005df28.system.entry.js} +1 -1
  314. package/dist/mint-components/{p-8a6531d2.js → p-d0993bb9.js} +1 -1
  315. package/dist/mint-components/p-d18dedd4.js +1 -0
  316. package/dist/mint-components/{p-e1292288.system.entry.js → p-d3b1ab20.system.entry.js} +1 -1
  317. package/dist/mint-components/p-d4f332a7.entry.js +106 -0
  318. package/dist/mint-components/{p-b1765c78.system.js → p-d55c50af.system.js} +1 -1
  319. package/dist/mint-components/p-d6193876.system.js +1 -0
  320. package/dist/mint-components/{p-092c2606.entry.js → p-db0a2afd.entry.js} +1 -1
  321. package/dist/mint-components/p-de0d6fd7.js +49 -0
  322. package/dist/mint-components/p-e00ec007.js +1 -0
  323. package/dist/mint-components/{p-9a15cd5a.system.entry.js → p-e12754f5.system.entry.js} +1 -1
  324. package/dist/mint-components/p-e30abc44.js +1 -0
  325. package/dist/mint-components/{p-3218bb1d.entry.js → p-e506bf7f.entry.js} +1 -1
  326. package/dist/mint-components/p-e55aafe9.system.js +1 -0
  327. package/dist/mint-components/{p-3bbc0db2.entry.js → p-e5ea43b1.entry.js} +2 -2
  328. package/dist/mint-components/{p-abd717d4.js → p-e6240c72.js} +1 -1
  329. package/dist/mint-components/{p-3a41b39c.js → p-e84b874c.js} +1 -1
  330. package/dist/mint-components/{p-dbc8afaa.system.entry.js → p-e9485160.system.entry.js} +1 -1
  331. package/dist/mint-components/p-ea03e50e.system.js +1 -0
  332. package/dist/mint-components/p-ec0b649a.entry.js +1 -0
  333. package/dist/mint-components/{p-925aa740.system.entry.js → p-f1374258.system.entry.js} +1 -1
  334. package/dist/mint-components/{p-e6de31a7.system.entry.js → p-f39cf252.system.entry.js} +1 -1
  335. package/dist/mint-components/{p-6f6c3ac6.system.entry.js → p-f4e36adf.system.entry.js} +1 -1
  336. package/dist/mint-components/{p-02e2b13b.system.js → p-f55ecf35.system.js} +1 -1
  337. package/dist/mint-components/{p-7a091fa7.js → p-f581aac7.js} +1 -1
  338. package/dist/mint-components/{p-8d073bdf.entry.js → p-f6528f8a.entry.js} +1 -1
  339. package/dist/mint-components/{p-9ba8b28b.system.entry.js → p-f7ca4cc4.system.entry.js} +1 -1
  340. package/dist/mint-components/p-f8026ed6.system.js +1 -0
  341. package/dist/mint-components/{p-13d8ecad.js → p-f8a09b0f.js} +1 -1
  342. package/dist/mint-components/p-fb804001.system.entry.js +1 -0
  343. package/dist/mint-components/{p-0b32e1d4.system.entry.js → p-fc284f91.system.entry.js} +1 -1
  344. package/dist/mint-components/{p-099ce3d5.system.entry.js → p-fe1d3cf8.system.entry.js} +1 -1
  345. package/dist/mint-components/p-fe70e20c.entry.js +1 -0
  346. package/dist/mint-components/p-ff118a19.system.js +1 -0
  347. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
  348. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
  349. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
  350. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +1 -18
  351. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +7 -19
  352. package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +9 -0
  353. package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
  354. package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +41 -0
  355. package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +195 -2
  356. package/dist/types/components/sqm-share-link/useShareLink.d.ts +33 -4
  357. package/dist/types/components/sqm-user-attribute/UserAttribute.stories.d.ts +11 -0
  358. package/dist/types/components/sqm-user-attribute/sqm-user-attribute-view.d.ts +8 -0
  359. package/dist/types/components/sqm-user-attribute/sqm-user-attribute.d.ts +45 -0
  360. package/dist/types/components/sqm-user-attribute/useUserAttribute.d.ts +3 -0
  361. package/dist/types/components/sqm-widget-verification/keys.d.ts +0 -2
  362. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +7 -75
  363. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -2
  364. package/dist/types/components/tax-and-cash/data.d.ts +0 -1
  365. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
  366. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
  367. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
  368. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -7
  369. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +5 -0
  370. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +1 -0
  371. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +4 -0
  372. package/dist/types/components.d.ts +472 -613
  373. package/dist/types/saasquatch.d.ts +0 -2
  374. package/docs/docs.docx +0 -0
  375. package/docs/raisins.json +1 -1
  376. package/grapesjs/grapesjs.js +1 -1
  377. package/package.json +15 -3
  378. package/readme.md +60 -1
  379. package/dist/cjs/eventKeys-7af4df4d.js +0 -5
  380. package/dist/cjs/parseStates-d1effc19.js +0 -16
  381. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +0 -886
  382. package/dist/cjs/sqm-partner-info-modal-view-97770d03.js +0 -149
  383. package/dist/cjs/utils-15ce04e3.js +0 -93
  384. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -171
  385. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -143
  386. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -669
  387. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -269
  388. package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +0 -16
  389. package/dist/esm/eventKeys-f76b6a03.js +0 -3
  390. package/dist/esm/keys-1054056a.js +0 -8
  391. package/dist/esm/parseStates-ed75e224.js +0 -14
  392. package/dist/esm/sqm-email-verification_2.entry.js +0 -881
  393. package/dist/esm/sqm-partner-info-modal-view-5709904e.js +0 -146
  394. package/dist/esm/utils-17daa419.js +0 -85
  395. package/dist/esm-es5/ShadowViewAddon-4d554869.js +0 -1
  396. package/dist/esm-es5/data-017e5ef2.js +0 -1
  397. package/dist/esm-es5/eventKeys-f76b6a03.js +0 -1
  398. package/dist/esm-es5/keys-1054056a.js +0 -1
  399. package/dist/esm-es5/parseStates-ed75e224.js +0 -1
  400. package/dist/esm-es5/sqm-email-verification_2.entry.js +0 -1
  401. package/dist/esm-es5/sqm-partner-info-modal-view-5709904e.js +0 -1
  402. package/dist/esm-es5/sqm-portal-container-view-a8c708cd.js +0 -1
  403. package/dist/esm-es5/sqm-user-info-form-view-d13f9d3e.js +0 -1
  404. package/dist/esm-es5/utils-17daa419.js +0 -1
  405. package/dist/mint-components/p-00046ec1.js +0 -116
  406. package/dist/mint-components/p-00dd7f08.js +0 -1
  407. package/dist/mint-components/p-0102ad17.system.entry.js +0 -1
  408. package/dist/mint-components/p-0a6489fa.entry.js +0 -1
  409. package/dist/mint-components/p-0f042aa6.entry.js +0 -116
  410. package/dist/mint-components/p-115dfc03.system.js +0 -1
  411. package/dist/mint-components/p-13f3a647.js +0 -1
  412. package/dist/mint-components/p-1d86895f.system.js +0 -1
  413. package/dist/mint-components/p-1f387c7b.system.js +0 -1
  414. package/dist/mint-components/p-1faa6ddf.system.entry.js +0 -1
  415. package/dist/mint-components/p-28ed2ae9.js +0 -1
  416. package/dist/mint-components/p-31edeff4.system.js +0 -1
  417. package/dist/mint-components/p-3254fbb4.entry.js +0 -291
  418. package/dist/mint-components/p-4034f157.js +0 -1
  419. package/dist/mint-components/p-4691e9d5.system.js +0 -1
  420. package/dist/mint-components/p-4a8ffa03.system.js +0 -1
  421. package/dist/mint-components/p-4e34bcb1.system.js +0 -1
  422. package/dist/mint-components/p-4f9dc974.js +0 -1
  423. package/dist/mint-components/p-53d90eb5.js +0 -463
  424. package/dist/mint-components/p-5e300ec1.system.js +0 -6
  425. package/dist/mint-components/p-6af71f23.entry.js +0 -9
  426. package/dist/mint-components/p-6c23abd8.entry.js +0 -1
  427. package/dist/mint-components/p-6f8dde97.system.js +0 -1
  428. package/dist/mint-components/p-753d06ef.entry.js +0 -133
  429. package/dist/mint-components/p-7aace2b3.system.js +0 -1
  430. package/dist/mint-components/p-87f86492.js +0 -1
  431. package/dist/mint-components/p-8ae8968c.js +0 -1
  432. package/dist/mint-components/p-8f15bf17.entry.js +0 -1
  433. package/dist/mint-components/p-99eecdcb.system.entry.js +0 -1
  434. package/dist/mint-components/p-9b15ee47.system.js +0 -1
  435. package/dist/mint-components/p-a49d9288.entry.js +0 -1
  436. package/dist/mint-components/p-b0ab1065.system.entry.js +0 -1
  437. package/dist/mint-components/p-b1b20d42.entry.js +0 -11
  438. package/dist/mint-components/p-b52a7da9.system.entry.js +0 -1
  439. package/dist/mint-components/p-b699f76e.system.js +0 -1
  440. package/dist/mint-components/p-b6a1e2ac.js +0 -1
  441. package/dist/mint-components/p-b7370480.js +0 -1
  442. package/dist/mint-components/p-badf28bb.system.js +0 -1
  443. package/dist/mint-components/p-c41d536d.entry.js +0 -1
  444. package/dist/mint-components/p-ce7d824b.js +0 -49
  445. package/dist/mint-components/p-d08408b3.entry.js +0 -1
  446. package/dist/mint-components/p-d6ccb6fc.entry.js +0 -1
  447. package/dist/mint-components/p-e516e8ca.system.entry.js +0 -1
  448. package/dist/mint-components/p-e93cdcbd.system.js +0 -1
  449. package/dist/mint-components/p-eb285d38.system.entry.js +0 -1
  450. package/dist/mint-components/p-f782ff10.system.entry.js +0 -1
  451. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -15
  452. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -50
  453. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -122
  454. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -17
  455. package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +0 -8
  456. package/docs/stats.json +0 -122783
@@ -1,881 +0,0 @@
1
- import { h, r as registerInstance } from './index-38ad4957.js';
2
- import { i as intl } from './global-75e96214.js';
3
- import { k as useState, f as useEffect, n as h$1, u as useMemo } from './dom-context-hooks.module-50442785.js';
4
- import { d as dist, q as Pn, w as wn, J, $ as $e, i as isDemo, p as En, L } from './index.module-02cb914c.js';
5
- import { c as cjs } from './cjs-bdfb4486.js';
6
- import { g as getProps } from './utils-334c1e34.js';
7
- import { c as createStyleSheet } from './JSS-67b5cff8.js';
8
- import { T as TextSpanView } from './sqm-text-span-view-4db9e33f.js';
9
- import { g as GET_FINANCE_NETWORK_SETTINGS } from './data-017e5ef2.js';
10
- import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-5709904e.js';
11
- import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE } from './keys-1054056a.js';
12
- import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
13
- import { p as parseStates } from './parseStates-ed75e224.js';
14
- import { u as useVerificationEmail } from './useVerificationEmail-9f2c0bab.js';
15
-
16
- const UpsertUserEmailMutation = dist.gql `
17
- mutation upsertUser($userInput: UserInput!) {
18
- upsertUser(userInput: $userInput) {
19
- id
20
- accountId
21
- email
22
- }
23
- }
24
- `;
25
- const UserLookupQuery = dist.gql `
26
- query user {
27
- viewer {
28
- ... on User {
29
- id
30
- accountId
31
- email
32
- impactConnection {
33
- user {
34
- id
35
- email
36
- }
37
- }
38
- }
39
- }
40
- }
41
- `;
42
- function useUpsertUserEmail() {
43
- const user = J();
44
- const [request, { loading: loading, data, errors }] = $e(UpsertUserEmailMutation);
45
- const upsertUserEmail = async (email) => {
46
- try {
47
- const result = await request({
48
- userInput: {
49
- id: user.id,
50
- accountId: user.accountId,
51
- email,
52
- },
53
- });
54
- if (result instanceof Error || !result)
55
- throw new Error();
56
- return result;
57
- }
58
- catch (e) {
59
- console.error("Could not set email on user", e);
60
- return undefined;
61
- }
62
- };
63
- return [
64
- upsertUserEmail,
65
- {
66
- loading,
67
- data,
68
- errors,
69
- },
70
- ];
71
- }
72
- function useWidgetEmailVerification(props) {
73
- const [_, setShowCode] = Pn(SHOW_CODE_NAMESPACE);
74
- const [_email, setEmail] = Pn(VERIFICATION_EMAIL_NAMESPACE);
75
- const [emailExists, setEmailExists] = useState(false);
76
- const [error, setError] = useState(false);
77
- const [mutationError, setMutationError] = useState(false);
78
- const { initialized, send: [sendEmail, { loading: sendLoading, errors }], } = useVerificationEmail();
79
- const [upsertUserEmail] = useUpsertUserEmail();
80
- const [loading, setLoading] = useState(true);
81
- const { data, loading: initialLoading } = wn(UserLookupQuery, {});
82
- 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,}))$/;
83
- useEffect(() => {
84
- if (!(data === null || data === void 0 ? void 0 : data.viewer))
85
- return;
86
- setEmailExists(!!data.viewer.email);
87
- }, [data]);
88
- useEffect(() => {
89
- if (initialized)
90
- setLoading(false);
91
- }, [initialized]);
92
- const submitEmail = async (e) => {
93
- var _a, _b, _c, _d;
94
- e.preventDefault();
95
- if (!(data === null || data === void 0 ? void 0 : data.viewer))
96
- return;
97
- setLoading(true);
98
- setMutationError(false);
99
- setError(false);
100
- let toAddress = data.viewer.email;
101
- if (!toAddress) {
102
- const formData = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.formData;
103
- const newEmail = (_c = (_b = formData === null || formData === void 0 ? void 0 : formData.get("email")) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : "";
104
- if (!emailRegex.test(newEmail)) {
105
- setError(true);
106
- setLoading(false);
107
- return;
108
- }
109
- const upsertResult = await upsertUserEmail(newEmail);
110
- if (!upsertResult || !((_d = upsertResult.upsertUser) === null || _d === void 0 ? void 0 : _d.email)) {
111
- setError(true);
112
- setLoading(false);
113
- return;
114
- }
115
- toAddress = upsertResult.upsertUser.email;
116
- }
117
- // UI should not allow this call til initialisation is done
118
- if (!initialized) {
119
- setLoading(false);
120
- return;
121
- }
122
- const result = await sendEmail();
123
- if (!result || !result.success) {
124
- setMutationError(true);
125
- }
126
- else {
127
- // This is used to let the code verification widget know an email was already sent
128
- setEmail(toAddress);
129
- setShowCode(true);
130
- }
131
- setLoading(false);
132
- };
133
- return {
134
- callbacks: {
135
- submitEmail,
136
- },
137
- states: {
138
- loading,
139
- initialLoading: initialLoading && !initialized,
140
- error,
141
- email: data === null || data === void 0 ? void 0 : data.viewer.email,
142
- sendCodeError: mutationError,
143
- },
144
- text: props.getTextProps(),
145
- };
146
- }
147
-
148
- const style = {
149
- Wrapper: {
150
- display: "flex",
151
- flexDirection: "column",
152
- gap: "var(--sl-spacing-medium)",
153
- marginTop: "var(--sl-spacing-medium)",
154
- },
155
- InputsContainer: {
156
- display: "flex",
157
- gap: "var(--sl-spacing-medium)",
158
- position: "relative",
159
- flexDirection: "column",
160
- },
161
- ContinueButton: {
162
- width: "100%",
163
- },
164
- SkeletonOne: {
165
- width: "50%",
166
- height: "16px",
167
- },
168
- SkeletonTwo: {
169
- width: "30%",
170
- height: "34px",
171
- },
172
- SkeletonThree: {
173
- width: "15%",
174
- height: "24px",
175
- },
176
- ErrorInput: {
177
- "&::part(base)": {
178
- border: "var(--sqm-border-thickness) solid var(--sqm-danger-color-border)",
179
- borderRadius: "var(--sqm-input-border-radius)",
180
- },
181
- "&::part(help-text)": {
182
- color: "var(--sqm-danger-color-text)",
183
- },
184
- },
185
- };
186
- const vanillaStyle = `
187
- :host {
188
- display: block;
189
- }
190
- :host([hidden]): {
191
- display: none;
192
- }
193
-
194
- a {
195
- color: inherit;
196
- text-decoration: underline;
197
- cursor: pointer;
198
- }
199
-
200
- *::part(primarybutton-base),
201
- sl-button[type="primary"]::part(base) {
202
- font-family: var(--sqm-primary-font);
203
- width: 100%;
204
- background-color: var(--sqm-primary-button-background);
205
- color: var(--sqm-primary-button-color);
206
- border-color: var(--sqm-primary-button-color-border);
207
- border-radius: var(--sqm-primary-button-radius);
208
- }
209
-
210
- *::part(primarybutton-base):hover,
211
- sl-button[type="primary"]::part(base):hover{
212
- background-color: var(--sqm-primary-button-background-hover);
213
- border-color: var(--sqm-primary-button-border-color-hover);
214
- color: var(--sqm-primary-button-color-hover);
215
- }
216
-
217
-
218
- *::part(primarybutton-base):focus,
219
- sl-button[type="primary"]::part(base):focus {
220
- box-shadow: none;
221
- }
222
-
223
- *::part(secondarybutton-base),
224
- sl-button[type="secondary"]::part(base) {
225
- font-family: var(--sqm-primary-font);
226
- background-color: var(--sqm-secondary-button-background);
227
- color: var(--sqm-secondary-button-color);
228
- border-color: var(--sqm-secondary-button-color-border);
229
- border-radius: var(--sqm-secondary-button-radius);
230
- }
231
-
232
- *::part(secondarybutton-base):hover,
233
- sl-button[type="secondary"]::part(base):hover {
234
- background-color: var(--sqm-secondary-button-background-hover);
235
- color: var(--sqm-secondary-button-color-hover);
236
- border-color: var(--sqm-secondary-button-border-color-hover);
237
- }
238
-
239
- *::part(input-label), *::part(select-label), *::part(textarea-label){
240
- font-family: var(--sqm-primary-font);
241
- font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
242
- font-weight: var(--sl-font-weight-semibold);
243
- color: var(--sqm-input-label-color, var(--sqm-text), black);
244
- }
245
-
246
- *::part(input-base), *::part(select-base), *::part(textarea-base){
247
- font-family: var(--sqm-primary-font);
248
- background-color: var(--sqm-input-background, #fff);
249
- border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
250
- color: var(--sqm-input-color, white);
251
- border-width: var(--sqm-border-thickness, 1px);
252
- }
253
-
254
- *::part(input-base):hover, *::part(select-base):hover, *::part(textarea-base):hover{
255
- border-color: var(--sqm-border-color-hover);
256
- }
257
-
258
- *::part(input-base):focus, *::part(select-base):focus, *::part(textarea-base):focus{
259
- border-color: var(--sqm-border-color-focus);
260
- }
261
-
262
- sqm-name-fields::part(input-base) {
263
- font-family: var(--sqm-primary-font);
264
- background-color: var(--sqm-input-background, #fff);
265
- border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
266
- color: var(--sqm-input-color, white);
267
- border-width: var(--sqm-border-thickness, 1px);
268
- }
269
-
270
- sl-input::part(base):focus,
271
- sl-select::part(form-control-wrapper):focus,
272
- sl-textarea::part(textarea-label):focus {
273
- border-color: var(--sqm-border-color-focus);
274
- }
275
-
276
- *::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
277
- background: var(--sqm-input-disabled-background, #f5f5f5);
278
- color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
279
- }
280
-
281
- *::part(input):-webkit-autofill {
282
- box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
283
- -webkit-text-fill-color: var(--sqm-input-color, white) !important;
284
- }
285
-
286
- *::part(input):-webkit-autofill:hover {
287
- box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
288
- -webkit-text-fill-color: var(--sqm-input-color, white) !important;
289
- }
290
-
291
- *::part(input):-webkit-autofill:focus {
292
- box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
293
- -webkit-text-fill-color: var(--sqm-input-color, white) !important;
294
- }
295
-
296
- *::part(input)::placeholder,
297
- *::part(select)::placeholder,
298
- *::part(textarea)::placeholder {
299
- font-family: var(--sqm-primary-font);
300
- color: var(--sqm-text-subdued);
301
- }
302
-
303
- *::part(input)::-webkit-input-placeholder,
304
- *::part(select)::-webkit-input-placeholder,
305
- *::part(textarea)::-webkit-input-placeholder {
306
- font-family: var(--sqm-primary-font);
307
- color: var(--sqm-text-subdued);
308
- }
309
-
310
- *::part(input)::-moz-placeholder,
311
- *::part(select)::-moz-placeholder,
312
- *::part(textarea)::-moz-placeholder {
313
- font-family: var(--sqm-primary-font);
314
- opacity: 1; /* Firefox adds an opacity to placeholders by default */
315
- color: var(--sqm-text-subdued);
316
- }
317
-
318
- *::part(input)::-ms-input-placeholder,
319
- *::part(select)::-ms-input-placeholder,
320
- *::part(textarea)::-ms-input-placeholder {
321
- font-family: var(--sqm-primary-font);
322
- color: var(--sqm-text-subdued);
323
- }
324
-
325
-
326
- `;
327
- const sheet = createStyleSheet(style);
328
- const styleString = sheet.toString();
329
- function WidgetEmailVerificationView(props) {
330
- const { states, callbacks, text } = props;
331
- const renderLoadingSkeleton = () => {
332
- return (h("div", { class: sheet.classes.Wrapper },
333
- h("sqm-skeleton", { height: "16px", width: "50%" }),
334
- h("sqm-skeleton", { height: "16px", width: "50%" }),
335
- h("sqm-skeleton", { height: "16px", width: "50%" }),
336
- h("sqm-skeleton", { height: "34px", width: "30%" }),
337
- h("sqm-skeleton", { height: "24px", width: "15%" }),
338
- h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: true, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)));
339
- };
340
- return (h("div", { part: "sqm-base" },
341
- h("style", { type: "text/css" },
342
- vanillaStyle,
343
- styleString),
344
- states.sendCodeError && (h("sqm-form-message", { type: "error" },
345
- h("p", { part: "alert-title" }, text.sendCodeErrorHeader),
346
- intl.formatMessage({
347
- id: "sendCodeErrorDescription",
348
- defaultMessage: text.sendCodeErrorDescription,
349
- }, {
350
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
351
- }))),
352
- states.initialLoading ? (renderLoadingSkeleton()) : (h("div", { class: sheet.classes.Wrapper },
353
- h(TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
354
- h("sl-form", { "onSl-submit": callbacks.submitEmail },
355
- h("div", { class: sheet.classes.InputsContainer },
356
- 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
357
- ? {
358
- class: sheet.classes.ErrorInput,
359
- helpText: text.emailValidationErrorText,
360
- }
361
- : {}))),
362
- h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)))))));
363
- }
364
-
365
- const WidgetEmailVerification = class {
366
- constructor(hostRef) {
367
- registerInstance(this, hostRef);
368
- /**
369
- * @uiName Verify email widget header text
370
- */
371
- this.verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
372
- /**
373
- * @uiName Send code to email alert header
374
- */
375
- this.sendCodeErrorHeader = "There was an error sending your code";
376
- /**
377
- * @uiName Support link text
378
- */
379
- this.supportLink = "support team";
380
- /**
381
- * @uiName Send code to email alert description
382
- */
383
- this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program {supportLink}.";
384
- /**
385
- * @uiName Email input label
386
- */
387
- this.emailLabel = "Email";
388
- /**
389
- * @uiName Send code button text
390
- */
391
- this.sendCodeText = "Send code";
392
- /**
393
- * @uiName Send code button text
394
- */
395
- this.emailValidationErrorText = "Please enter a valid email";
396
- h$1(this);
397
- }
398
- disconnectedCallback() { }
399
- getTextProps() {
400
- return getProps(this);
401
- }
402
- render() {
403
- const props = isDemo()
404
- ? useDemoWidgetEmailVerification(this)
405
- : useWidgetEmailVerification(this);
406
- return h(WidgetEmailVerificationView, Object.assign({}, props));
407
- }
408
- };
409
- function useDemoWidgetEmailVerification(props) {
410
- const setShowCode = En(SHOW_CODE_NAMESPACE);
411
- return cjs({
412
- states: {
413
- error: true,
414
- initialLoading: false,
415
- loading: false,
416
- email: "test@example.com",
417
- sendCodeError: true,
418
- },
419
- callbacks: {
420
- submitEmail: async () => setShowCode(true),
421
- },
422
- text: props.getTextProps(),
423
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
424
- }
425
-
426
- const GET_USER_PARTNER_INFO = dist.gql `
427
- query getUserPartnerInfo {
428
- user: viewer {
429
- ... on User {
430
- id
431
- accountId
432
- firstName
433
- lastName
434
- email
435
- countryCode
436
- customFields
437
- impactConnection {
438
- connected
439
- connectionStatus
440
- publisher {
441
- id
442
- countryCode
443
- currency
444
- }
445
- }
446
- }
447
- }
448
- }
449
- `;
450
- const GET_COUNTRIES = dist.gql `
451
- query getCountries {
452
- impactPayoutCountries(limit: 1000) {
453
- data {
454
- countryCode
455
- displayName
456
- }
457
- }
458
- }
459
- `;
460
- const GET_CURRENCIES = dist.gql `
461
- query currencies($locale: RSLocale) {
462
- currencies(limit: 300) {
463
- data {
464
- displayName(locale: $locale)
465
- currencyCode
466
- }
467
- }
468
- }
469
- `;
470
- const CONNECT_PARTNER = dist.gql `
471
- mutation createImpactConnection($vars: ImpactConnectionInput!) {
472
- createImpactConnection(impactConnectionInput: $vars) {
473
- success
474
- validationErrors {
475
- field
476
- message
477
- }
478
- user {
479
- id
480
- accountId
481
- impactConnection {
482
- connected
483
- publisher {
484
- brandedSignup
485
- requiredTaxDocumentType
486
- currentTaxDocument {
487
- type
488
- status
489
- }
490
- }
491
- }
492
- }
493
- }
494
- }
495
- `;
496
- const START_IMPACT_CONNECTION = dist.gql `
497
- mutation startImpactConnection($vars: ImpactConnectionInput!) {
498
- startImpactConnection(impactConnectionInput: $vars) {
499
- success
500
- validationErrors {
501
- field
502
- message
503
- }
504
- user {
505
- id
506
- accountId
507
- impactConnection {
508
- connected
509
- publisher {
510
- brandedSignup
511
- requiredTaxDocumentType
512
- currentTaxDocument {
513
- type
514
- status
515
- }
516
- }
517
- }
518
- }
519
- }
520
- }
521
- `;
522
- function usePartnerInfoModal(props) {
523
- var _a, _b, _c, _d, _e, _f;
524
- const locale = L();
525
- const setPartnerCreated = En(PARTNER_CREATED_NAMESPACE);
526
- const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {});
527
- const user = userData === null || userData === void 0 ? void 0 : userData.user;
528
- const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
529
- const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
530
- // No pre-filled country, use locale to determine countryCode instead
531
- 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) ||
532
- locale.replace(/^.*_/, ""));
533
- 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) || "");
534
- const { data: financeNetworkData } = wn(GET_FINANCE_NETWORK_SETTINGS, {
535
- variables: { filter: countryCode ? { countryCode_eq: countryCode } : {} },
536
- });
537
- const [startImpactConnection, { loading: connectLoading }] = $e(START_IMPACT_CONNECTION);
538
- const [allowBankingCollection, setAllowBankingCollection] = useState(false);
539
- const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
540
- const _currencies = useMemo(() => {
541
- var _a, _b;
542
- 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) => {
543
- var _a, _b;
544
- const c = (_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((cur) => cur.currencyCode === settings.currency);
545
- if (!c)
546
- return agg;
547
- if (agg.find((cur) => cur.currencyCode === settings.currency))
548
- return agg;
549
- return [...agg, c];
550
- }, []);
551
- return allValidCurrencies || [];
552
- }, [financeNetworkData, currenciesData]);
553
- const currencies = useMemo(() => [..._currencies].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
554
- const [countrySearch, setCountrySearch] = useState("");
555
- const [currencySearch, setCurrencySearch] = useState("");
556
- const [filteredCountries, setFilteredCountries] = useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
557
- const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
558
- const [error, setError] = useState("");
559
- const [success, setSuccess] = useState(false);
560
- useEffect(() => {
561
- var _a;
562
- const publisher = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
563
- if (!userData || !publisher)
564
- return;
565
- setCountryCode(publisher.countryCode);
566
- setCurrency(publisher.currency);
567
- }, [userData, user]);
568
- useEffect(() => {
569
- if (!(countries === null || countries === void 0 ? void 0 : countries.length))
570
- return;
571
- if (countrySearch.trim() === "") {
572
- setFilteredCountries(countries || []);
573
- }
574
- else {
575
- setFilteredCountries(countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase())) || []);
576
- }
577
- }, [countrySearch, countries]);
578
- useEffect(() => {
579
- if (!(currencies === null || currencies === void 0 ? void 0 : currencies.length))
580
- return;
581
- if (currencySearch.trim() === "") {
582
- setFilteredCurrencies(currencies || []);
583
- }
584
- else {
585
- setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
586
- }
587
- }, [currencySearch, currencies]);
588
- const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
589
- function onCountryChange(e) {
590
- var _a, _b;
591
- const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
592
- if (!value)
593
- return;
594
- setCountryCode(value);
595
- setCurrency("");
596
- setError("");
597
- }
598
- function onCurrencyChange(e) {
599
- var _a, _b;
600
- const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
601
- if (!value)
602
- return;
603
- setCurrency(value);
604
- setError("");
605
- }
606
- function onCheckboxChange(e) {
607
- const checked = e.target.checked;
608
- setAllowBankingCollection(checked);
609
- }
610
- async function onSubmit() {
611
- var _a, _b;
612
- if (!allowBankingCollection) {
613
- setError(props.missingFieldsErrorText);
614
- return;
615
- }
616
- if (!countryCode || !currency) {
617
- setError(props.missingFieldsErrorText);
618
- return;
619
- }
620
- setError("");
621
- if (!user) {
622
- setError(props.networkErrorText);
623
- return;
624
- }
625
- try {
626
- const vars = {
627
- user: {
628
- id: user.id,
629
- accountId: user.accountId,
630
- },
631
- firstName: user.firstName,
632
- lastName: user.lastName,
633
- countryCode,
634
- currency,
635
- };
636
- const result = await startImpactConnection({ vars });
637
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
638
- setError(props.networkErrorText);
639
- return;
640
- }
641
- const connectionResult = result
642
- .startImpactConnection;
643
- if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
644
- const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
645
- setError(validationMsg || props.networkErrorText);
646
- console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
647
- return;
648
- }
649
- window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
650
- await refetch();
651
- setPartnerCreated === null || setPartnerCreated === void 0 ? void 0 : setPartnerCreated(true);
652
- setSuccess(true);
653
- }
654
- catch (e) {
655
- console.error("Partner creation error:", e);
656
- setError(props.networkErrorText);
657
- }
658
- }
659
- const showModal = !success &&
660
- !userLoading &&
661
- (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
662
- return {
663
- states: {
664
- open: showModal,
665
- loading: userLoading || countriesLoading || currenciesLoading,
666
- submitting: connectLoading,
667
- isExistingPartner: !!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher),
668
- countryCode,
669
- currency,
670
- error,
671
- success,
672
- filteredCountries: filteredCountries || [],
673
- filteredCurrencies: filteredCurrencies || [],
674
- allowBankingCollection,
675
- disabled: userLoading || connectLoading,
676
- },
677
- callbacks: {
678
- onCountryChange,
679
- onCurrencyChange,
680
- onCheckboxChange,
681
- setCurrencySearch,
682
- setCountrySearch,
683
- onSubmit,
684
- onClose: () => setSuccess(true),
685
- },
686
- text: props.getTextProps(),
687
- };
688
- }
689
-
690
- const PartnerInfoModal = class {
691
- constructor(hostRef) {
692
- registerInstance(this, hostRef);
693
- /**
694
- * Header text when user has no existing partner
695
- *
696
- * @uiName New partner header
697
- * @uiWidget textArea
698
- */
699
- this.modalHeader = "Let's get you ready for rewards";
700
- /**
701
- * Header text when user has an existing partner
702
- *
703
- * @uiName Existing partner header
704
- * @uiWidget textArea
705
- */
706
- this.modalHeaderExistingPartner = "We found an existing account";
707
- /**
708
- * Description for new partner setup
709
- *
710
- * @uiName New partner description
711
- * @uiWidget textArea
712
- */
713
- this.descriptionNewPartner = "Confirm your country and currency now to get your future rewards faster.";
714
- /**
715
- * Description for existing partner confirmation
716
- *
717
- * @uiName Existing partner description
718
- * @uiWidget textArea
719
- */
720
- 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.";
721
- /**
722
- * Support description for existing partner confirmation
723
- *
724
- * @uiName Existing partner support description
725
- * @uiWidget textArea
726
- */
727
- this.supportDescriptionExistingPartner = "If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.";
728
- /**
729
- * Support description for existing partner confirmation
730
- *
731
- * @uiName Existing partner support description
732
- */
733
- this.supportLink = "Support";
734
- /**
735
- * Edit the property called terms and conditions text to change what's displayed for {termsAndConditionsLink}.
736
- * @uiName Terms and conditions checkbox
737
- */
738
- this.allowBankingCollection = "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information";
739
- /**
740
- * The link text that appears in the terms and conditions checkbox
741
- * @uiName Terms and conditions text
742
- * @uiWidget textArea
743
- */
744
- this.termsAndConditionsLabel = "terms and conditions";
745
- /**
746
- * The link that appears in the terms and conditions checkbox
747
- * @uiName Terms and conditions link
748
- */
749
- this.termsAndConditionsLink = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
750
- /**
751
- * @uiName Country label
752
- */
753
- this.countryLabel = "Country";
754
- /**
755
- * @uiName Currency label
756
- */
757
- this.currencyLabel = "Currency";
758
- /**
759
- * @uiName Submit button label
760
- */
761
- this.submitButtonLabel = "Submit";
762
- /**
763
- * @uiName Confirm button label
764
- */
765
- this.confirmButtonLabel = "Confirm";
766
- /**
767
- * @uiName Search country placeholder
768
- */
769
- this.searchCountryPlaceholder = "Search for a country";
770
- /**
771
- * @uiName Search currency placeholder
772
- */
773
- this.searchCurrencyPlaceholder = "Search for a currency";
774
- /**
775
- * @uiName Network error text
776
- * @uiWidget textArea
777
- */
778
- this.networkErrorText = "An error occurred. Please try again.";
779
- /**
780
- * @uiName Missing fields error text
781
- * @uiWidget textArea
782
- */
783
- this.missingFieldsErrorText = "Please select both a country and currency.";
784
- /**
785
- * Used to render in another modal.
786
- * @undocumented
787
- */
788
- this.inModal = false;
789
- /**
790
- * @undocumented
791
- * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
792
- * @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
793
- * @componentState { "title": "Existing partner", "props": { "states": { "open": true, "isExistingPartner": true, "countryCode": "US", "currency": "USD" } } }
794
- */
795
- this.stateController = "{}";
796
- h$1(this);
797
- }
798
- disconnectedCallback() { }
799
- getTextProps() {
800
- return getProps(this);
801
- }
802
- render() {
803
- const props = isDemo()
804
- ? useDemoPartnerInfoModal(this)
805
- : usePartnerInfoModal(this);
806
- if (this.inModal) {
807
- return h(PartnerInfoModalContentView, Object.assign({}, props));
808
- }
809
- return h(PartnerInfoModalView, Object.assign({}, props));
810
- }
811
- };
812
- function useDemoPartnerInfoModal(props) {
813
- const [countryCode, setCountryCode] = useState("US");
814
- const [currency, setCurrency] = useState("");
815
- const [error, setError] = useState("");
816
- const [allowBankingCollection, setAllowBankingCollection] = useState(false);
817
- const parsed = parseStates(props.stateController);
818
- const stateOverride = (parsed === null || parsed === void 0 ? void 0 : parsed["sqm-partner-info-modal"]) || parsed || {};
819
- // @ts-ignore
820
- return cjs({
821
- states: {
822
- open: false,
823
- loading: false,
824
- submitting: false,
825
- isExistingPartner: false,
826
- countryCode,
827
- currency,
828
- error,
829
- success: false,
830
- filteredCountries: [],
831
- filteredCurrencies: [],
832
- allowBankingCollection,
833
- disabled: false,
834
- },
835
- callbacks: {
836
- onCountryChange: (e) => {
837
- var _a, _b;
838
- 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;
839
- if (value) {
840
- setCountryCode(value);
841
- setCurrency("");
842
- }
843
- },
844
- onCurrencyChange: (e) => {
845
- var _a, _b;
846
- 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;
847
- if (value)
848
- setCurrency(value);
849
- },
850
- onCheckboxChange: (e) => {
851
- setAllowBankingCollection(e.target.checked);
852
- },
853
- setCountrySearch: () => { },
854
- setCurrencySearch: () => { },
855
- onSubmit: () => {
856
- if (!countryCode || !currency) {
857
- setError(props.missingFieldsErrorText);
858
- return;
859
- }
860
- setError("");
861
- },
862
- onClose: () => { },
863
- },
864
- text: {
865
- modalHeader: props.modalHeader,
866
- descriptionNewPartner: props.descriptionNewPartner,
867
- descriptionExistingPartner: props.descriptionExistingPartner,
868
- countryLabel: props.countryLabel,
869
- currencyLabel: props.currencyLabel,
870
- submitButtonLabel: props.submitButtonLabel,
871
- confirmButtonLabel: props.confirmButtonLabel,
872
- searchCountryPlaceholder: props.searchCountryPlaceholder,
873
- searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
874
- supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
875
- supportLink: props.supportLink,
876
- modalHeaderExistingPartner: props.modalHeaderExistingPartner,
877
- },
878
- }, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
879
- }
880
-
881
- export { WidgetEmailVerification as sqm_email_verification, PartnerInfoModal as sqm_partner_info_modal };