@saasquatch/mint-components 2.0.8-7 → 2.0.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 (308) hide show
  1. package/dist/cjs/{ShadowViewAddon-ae3a32c3.js → ShadowViewAddon-31199cba.js} +230 -112
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/{sqm-big-stat_47.cjs.entry.js → sqm-big-stat_49.cjs.entry.js} +552 -21
  5. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +1 -2
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +108 -66
  7. package/dist/{esm/AsYouType-46f67d0d.js → cjs/usePortalRegistrationForm-8ed0d753.js} +215 -1
  8. package/dist/collection/components/sqm-portal-google-login/GoogleLoginForm.stories.js +37 -0
  9. package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +2 -1
  10. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -1
  11. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +0 -25
  12. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  13. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +0 -1
  14. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +0 -2
  15. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -6
  16. package/dist/esm/{ShadowViewAddon-78a1c35c.js → ShadowViewAddon-49bebd13.js} +234 -118
  17. package/dist/esm/{data-a581119a.js → data-f2f77358.js} +2 -2
  18. package/dist/esm/{global-58a69018.js → global-5d501632.js} +1 -1
  19. package/dist/esm/{index.module-c9811a48.js → index.module-234e8f5e.js} +1 -1
  20. package/dist/esm/loader.js +3 -3
  21. package/dist/esm/mint-components.js +3 -3
  22. package/dist/esm/{re-render-7e22fb0d.js → re-render-b56bc163.js} +1 -1
  23. package/dist/esm/sqm-banking-info-form_10.entry.js +8 -8
  24. package/dist/esm/{sqm-big-stat_47.entry.js → sqm-big-stat_49.entry.js} +559 -30
  25. package/dist/esm/sqm-close-button.entry.js +1 -1
  26. package/dist/esm/sqm-code-verification.entry.js +3 -3
  27. package/dist/esm/sqm-context-router.entry.js +1 -1
  28. package/dist/esm/sqm-email-verification.entry.js +3 -3
  29. package/dist/esm/sqm-empty_4.entry.js +2 -2
  30. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  31. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  32. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  33. package/dist/esm/{sqm-lead-checkbox-field-view-81541e40.js → sqm-lead-checkbox-field-view-e461c8d6.js} +1 -1
  34. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  35. package/dist/esm/{sqm-lead-input-field-view-d543d939.js → sqm-lead-input-field-view-9cf60eea.js} +1 -1
  36. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  37. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  38. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  39. package/dist/esm/{sqm-navigation-sidebar-item-view-5a452423.js → sqm-navigation-sidebar-item-view-3d1b3be4.js} +1 -1
  40. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  41. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  42. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  43. package/dist/esm/sqm-password-field.entry.js +2 -2
  44. package/dist/esm/sqm-popup-container.entry.js +1 -1
  45. package/dist/esm/{sqm-portal-email-verification-view-5fb1a99e.js → sqm-portal-email-verification-view-ec6d9b7e.js} +1 -1
  46. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  47. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  48. package/dist/esm/{sqm-portal-profile-view-e3aef106.js → sqm-portal-profile-view-36eae0a3.js} +1 -1
  49. package/dist/esm/sqm-portal-profile.entry.js +4 -4
  50. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  51. package/dist/esm/sqm-portal-registration-form.entry.js +3 -4
  52. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  53. package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
  54. package/dist/esm/sqm-qr-code.entry.js +2 -2
  55. package/dist/esm/sqm-referral-table_11.entry.js +5 -5
  56. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  57. package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
  58. package/dist/esm/sqm-stencilbook.entry.js +116 -74
  59. package/dist/esm/sqm-tab.entry.js +2 -2
  60. package/dist/esm/sqm-tabs.entry.js +3 -3
  61. package/dist/esm/{sqm-user-info-form-view-9a3048d9.js → sqm-user-info-form-view-0a8999d0.js} +2 -2
  62. package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
  63. package/dist/esm/sqm-widget-verification.entry.js +1 -1
  64. package/dist/esm/{useChildElements-3d872cef.js → useChildElements-daf489b1.js} +1 -1
  65. package/dist/esm/{useInstantAccessRegistration-dda1f52b.js → useInstantAccessRegistration-89e7dfc8.js} +2 -2
  66. package/dist/esm/{useLeadFormState-8d4b2620.js → useLeadFormState-d2f1c87d.js} +2 -2
  67. package/dist/esm/{usePayoutStatus-7404eb9d.js → usePayoutStatus-6be47a64.js} +1 -1
  68. package/dist/{cjs/AsYouType-6788393a.js → esm/usePortalRegistrationForm-fb06b600.js} +211 -2
  69. package/dist/esm/{useReferralCodes-c2e809cf.js → useReferralCodes-75d67509.js} +1 -1
  70. package/dist/esm/{useReferralTable-909ccb28.js → useReferralTable-8e0acee0.js} +3 -3
  71. package/dist/esm/{useRegistrationFormState-24d594ea.js → useRegistrationFormState-a9e156e6.js} +1 -1
  72. package/dist/esm/{useVerificationEmail-55e0e98f.js → useVerificationEmail-66b40965.js} +1 -1
  73. package/dist/esm/{utilities-72c07b09.js → utilities-e6f8716e.js} +1 -1
  74. package/dist/esm-es5/ShadowViewAddon-49bebd13.js +1 -0
  75. package/dist/esm-es5/{data-a581119a.js → data-f2f77358.js} +1 -1
  76. package/dist/esm-es5/{global-58a69018.js → global-5d501632.js} +1 -1
  77. package/dist/esm-es5/{index.module-c9811a48.js → index.module-234e8f5e.js} +1 -1
  78. package/dist/esm-es5/loader.js +1 -1
  79. package/dist/esm-es5/mint-components.js +1 -1
  80. package/dist/esm-es5/{re-render-7e22fb0d.js → re-render-b56bc163.js} +1 -1
  81. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  82. package/dist/esm-es5/sqm-big-stat_49.entry.js +1 -0
  83. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  84. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  85. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  86. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  87. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  88. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  89. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  90. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  91. package/dist/esm-es5/{sqm-lead-checkbox-field-view-81541e40.js → sqm-lead-checkbox-field-view-e461c8d6.js} +1 -1
  92. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  93. package/dist/esm-es5/{sqm-lead-input-field-view-d543d939.js → sqm-lead-input-field-view-9cf60eea.js} +1 -1
  94. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  95. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  96. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  97. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-5a452423.js → sqm-navigation-sidebar-item-view-3d1b3be4.js} +1 -1
  98. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  99. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  100. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  101. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  102. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  103. package/dist/esm-es5/{sqm-portal-email-verification-view-5fb1a99e.js → sqm-portal-email-verification-view-ec6d9b7e.js} +1 -1
  104. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  105. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  106. package/dist/esm-es5/{sqm-portal-profile-view-e3aef106.js → sqm-portal-profile-view-36eae0a3.js} +1 -1
  107. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  108. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  109. package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
  110. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  111. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  112. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  113. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  114. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  115. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  116. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  117. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  118. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  119. package/dist/esm-es5/{sqm-user-info-form-view-9a3048d9.js → sqm-user-info-form-view-0a8999d0.js} +1 -1
  120. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  121. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  122. package/dist/esm-es5/{useChildElements-3d872cef.js → useChildElements-daf489b1.js} +1 -1
  123. package/dist/esm-es5/{useInstantAccessRegistration-dda1f52b.js → useInstantAccessRegistration-89e7dfc8.js} +1 -1
  124. package/dist/esm-es5/{useLeadFormState-8d4b2620.js → useLeadFormState-d2f1c87d.js} +1 -1
  125. package/dist/esm-es5/{usePayoutStatus-7404eb9d.js → usePayoutStatus-6be47a64.js} +1 -1
  126. package/dist/esm-es5/usePortalRegistrationForm-fb06b600.js +1 -0
  127. package/dist/esm-es5/{useReferralCodes-c2e809cf.js → useReferralCodes-75d67509.js} +1 -1
  128. package/dist/esm-es5/{useReferralTable-909ccb28.js → useReferralTable-8e0acee0.js} +1 -1
  129. package/dist/esm-es5/{useRegistrationFormState-24d594ea.js → useRegistrationFormState-a9e156e6.js} +1 -1
  130. package/dist/esm-es5/{useVerificationEmail-55e0e98f.js → useVerificationEmail-66b40965.js} +1 -1
  131. package/dist/esm-es5/{utilities-72c07b09.js → utilities-e6f8716e.js} +1 -1
  132. package/dist/mint-components/mint-components.esm.js +1 -1
  133. package/dist/mint-components/mint-components.js +1 -1
  134. package/dist/mint-components/{p-b00e8365.entry.js → p-01aa5c0d.entry.js} +1 -1
  135. package/dist/mint-components/{p-26a7051d.system.entry.js → p-04603078.system.entry.js} +1 -1
  136. package/dist/mint-components/{p-171310d9.system.js → p-08c49143.system.js} +1 -1
  137. package/dist/mint-components/{p-6076dbaf.entry.js → p-0b6b03fa.entry.js} +1 -1
  138. package/dist/mint-components/{p-1215518e.system.js → p-0ba04831.system.js} +1 -1
  139. package/dist/mint-components/{p-12e6cea7.entry.js → p-0bd7de3e.entry.js} +2 -2
  140. package/dist/mint-components/{p-988f236f.js → p-0e1f3ce2.js} +1 -1
  141. package/dist/mint-components/{p-49400aab.js → p-10ad4cec.js} +2 -2
  142. package/dist/mint-components/{p-9eba8408.js → p-177a4691.js} +1 -1
  143. package/dist/mint-components/p-1830bbfb.js +1 -0
  144. package/dist/mint-components/{p-5b7a896e.system.entry.js → p-234d0680.system.entry.js} +1 -1
  145. package/dist/mint-components/{p-a7e35f51.system.js → p-23c58c4f.system.js} +2 -2
  146. package/dist/mint-components/{p-17a0f310.system.js → p-23d089ee.system.js} +1 -1
  147. package/dist/mint-components/{p-1aa9136c.js → p-24e20ee2.js} +1 -1
  148. package/dist/mint-components/p-259285a8.system.entry.js +1 -0
  149. package/dist/mint-components/{p-40c33b6a.system.entry.js → p-26796f69.system.entry.js} +1 -1
  150. package/dist/mint-components/p-26fdb210.js +1 -0
  151. package/dist/mint-components/{p-6c82d60c.system.js → p-286aa5b9.system.js} +1 -1
  152. package/dist/mint-components/{p-9c79ab08.js → p-2ce4c7a3.js} +2 -2
  153. package/dist/mint-components/{p-4cc72a4e.system.js → p-2dcb0db6.system.js} +1 -1
  154. package/dist/mint-components/{p-c30ad421.js → p-323c6d02.js} +1 -1
  155. package/dist/mint-components/{p-720f03e2.system.js → p-33e1a29e.system.js} +1 -1
  156. package/dist/mint-components/{p-ba79655c.system.js → p-342921b9.system.js} +1 -1
  157. package/dist/mint-components/{p-a32afaaa.entry.js → p-3825831b.entry.js} +1 -1
  158. package/dist/mint-components/{p-2700136f.system.entry.js → p-38ed3cbd.system.entry.js} +1 -1
  159. package/dist/mint-components/{p-c95a437e.entry.js → p-3d02278d.entry.js} +1 -1
  160. package/dist/mint-components/{p-0c024cf0.system.entry.js → p-3d12a14b.system.entry.js} +1 -1
  161. package/dist/mint-components/{p-f5256738.system.entry.js → p-3ed269bf.system.entry.js} +1 -1
  162. package/dist/mint-components/{p-6a5df328.js → p-3fede0f7.js} +1 -1
  163. package/dist/mint-components/{p-625ca62f.entry.js → p-3ff0f231.entry.js} +1 -1
  164. package/dist/mint-components/{p-e1422b78.entry.js → p-4363a896.entry.js} +1 -1
  165. package/dist/mint-components/{p-f3613921.system.entry.js → p-476a8091.system.entry.js} +1 -1
  166. package/dist/mint-components/{p-7780cac1.system.entry.js → p-50eaba5b.system.entry.js} +1 -1
  167. package/dist/mint-components/{p-d09d3b8f.system.js → p-51e5a7da.system.js} +1 -1
  168. package/dist/mint-components/p-52398c8e.system.entry.js +1 -0
  169. package/dist/mint-components/{p-2ea3eea9.system.entry.js → p-527c0244.system.entry.js} +1 -1
  170. package/dist/mint-components/{p-72b914b9.system.entry.js → p-536a5aff.system.entry.js} +1 -1
  171. package/dist/mint-components/p-5784be79.system.entry.js +1 -0
  172. package/dist/mint-components/{p-e3b4e06a.system.entry.js → p-5af01051.system.entry.js} +1 -1
  173. package/dist/mint-components/{p-3b46fae5.entry.js → p-5d17b387.entry.js} +1 -1
  174. package/dist/mint-components/{p-d9780ae9.entry.js → p-5de55368.entry.js} +1 -1
  175. package/dist/mint-components/{p-78c754de.system.entry.js → p-612091c6.system.entry.js} +1 -1
  176. package/dist/mint-components/{p-c6e8086f.system.entry.js → p-62d018f0.system.entry.js} +1 -1
  177. package/dist/mint-components/{p-dc5bca55.entry.js → p-636a841f.entry.js} +1 -1
  178. package/dist/mint-components/{p-829cb9ed.system.entry.js → p-63a928e0.system.entry.js} +1 -1
  179. package/dist/mint-components/{p-f7e49c12.entry.js → p-65f79e43.entry.js} +1 -1
  180. package/dist/mint-components/{p-9d46f87f.system.entry.js → p-6a0440ed.system.entry.js} +1 -1
  181. package/dist/mint-components/{p-9ba07029.system.entry.js → p-702f3adb.system.entry.js} +1 -1
  182. package/dist/mint-components/{p-d399b343.system.entry.js → p-72321b06.system.entry.js} +1 -1
  183. package/dist/mint-components/p-72d6c425.system.js +1 -0
  184. package/dist/mint-components/{p-8afb47c5.system.entry.js → p-73aeefed.system.entry.js} +1 -1
  185. package/dist/mint-components/{p-0ec54f97.js → p-747479dc.js} +1 -1
  186. package/dist/mint-components/{p-101f0c41.entry.js → p-78fc0c3c.entry.js} +1 -1
  187. package/dist/mint-components/{p-71af93e3.js → p-7ab26f3d.js} +1 -1
  188. package/dist/mint-components/{p-0087ad39.system.js → p-825b39e0.system.js} +1 -1
  189. package/dist/mint-components/{p-8618e8f6.system.js → p-828d27ac.system.js} +1 -1
  190. package/dist/mint-components/{p-8d9fa981.system.js → p-844aaef2.system.js} +1 -1
  191. package/dist/mint-components/p-84911f08.system.js +1 -0
  192. package/dist/mint-components/{p-9491f5fb.system.entry.js → p-8752bcd1.system.entry.js} +1 -1
  193. package/dist/mint-components/{p-867b2baf.system.js → p-8901a533.system.js} +1 -1
  194. package/dist/mint-components/{p-5fbe6356.system.js → p-8bf8afb9.system.js} +1 -1
  195. package/dist/mint-components/{p-ac86903a.system.entry.js → p-8dda2a7f.system.entry.js} +1 -1
  196. package/dist/mint-components/{p-43ad51bc.entry.js → p-930f37bd.entry.js} +1 -1
  197. package/dist/mint-components/p-964b09f2.js +1 -0
  198. package/dist/mint-components/p-96749142.entry.js +273 -0
  199. package/dist/mint-components/{p-e174b704.system.js → p-96b16a48.system.js} +1 -1
  200. package/dist/mint-components/{p-ff0e1564.system.js → p-98e0a022.system.js} +1 -1
  201. package/dist/mint-components/{p-bf044217.js → p-9953648f.js} +1 -1
  202. package/dist/mint-components/p-9ad42a61.entry.js +1 -0
  203. package/dist/mint-components/{p-e19f0908.entry.js → p-9c4cac09.entry.js} +2 -2
  204. package/dist/mint-components/{p-f3c2074b.system.entry.js → p-9c80871f.system.entry.js} +1 -1
  205. package/dist/mint-components/{p-e8bda98a.system.entry.js → p-9d19a0f7.system.entry.js} +1 -1
  206. package/dist/mint-components/{p-8931d05e.entry.js → p-9da60671.entry.js} +1 -1
  207. package/dist/mint-components/p-9ef4172c.entry.js +1 -0
  208. package/dist/mint-components/p-a6e177d8.system.entry.js +1 -0
  209. package/dist/mint-components/{p-027c0b10.js → p-a82c8b60.js} +1 -1
  210. package/dist/mint-components/p-ab38b332.system.js +1 -0
  211. package/dist/mint-components/{p-58c79873.entry.js → p-ad550231.entry.js} +1 -1
  212. package/dist/mint-components/p-af123d2b.system.js +1 -0
  213. package/dist/mint-components/p-b08373f5.entry.js +9 -0
  214. package/dist/mint-components/{p-bb5d153f.system.js → p-b5559e34.system.js} +1 -1
  215. package/dist/mint-components/{p-dcc50d90.entry.js → p-bb476395.entry.js} +1 -1
  216. package/dist/mint-components/{p-bcac83f0.system.js → p-c09d2b35.system.js} +1 -1
  217. package/dist/mint-components/{p-deecffd0.system.entry.js → p-c16d9c80.system.entry.js} +1 -1
  218. package/dist/mint-components/p-c4e08253.js +13 -0
  219. package/dist/mint-components/{p-fcf8bdbc.system.entry.js → p-c7f34690.system.entry.js} +1 -1
  220. package/dist/mint-components/{p-29398c98.entry.js → p-c7f385d3.entry.js} +1 -1
  221. package/dist/mint-components/{p-ee92a728.system.entry.js → p-c8f2c3b8.system.entry.js} +1 -1
  222. package/dist/mint-components/{p-f6eae77c.js → p-cbeab288.js} +1 -1
  223. package/dist/mint-components/{p-a4e8eb33.entry.js → p-cbf3a928.entry.js} +1 -1
  224. package/dist/mint-components/{p-a974c549.js → p-cd3ba2b4.js} +1 -1
  225. package/dist/mint-components/p-d15947d0.js +448 -0
  226. package/dist/mint-components/{p-011c0990.system.entry.js → p-d170e29a.system.entry.js} +1 -1
  227. package/dist/mint-components/{p-7e323f2c.entry.js → p-d3f86ec6.entry.js} +1 -1
  228. package/dist/mint-components/p-d49de8ea.entry.js +11 -0
  229. package/dist/mint-components/{p-29ba2eaa.entry.js → p-d9f01878.entry.js} +1 -1
  230. package/dist/mint-components/{p-386ec00c.entry.js → p-de0566e1.entry.js} +1 -1
  231. package/dist/mint-components/{p-f5fff87e.js → p-e08b7435.js} +1 -1
  232. package/dist/mint-components/{p-36a1fa33.system.entry.js → p-e1a08323.system.entry.js} +1 -1
  233. package/dist/mint-components/{p-60ec0961.system.entry.js → p-e1a7d141.system.entry.js} +1 -1
  234. package/dist/mint-components/{p-a8c86cd8.system.entry.js → p-eacd3c8f.system.entry.js} +1 -1
  235. package/dist/mint-components/p-ebde83fc.entry.js +1 -0
  236. package/dist/mint-components/{p-621f3e30.entry.js → p-ec9027cf.entry.js} +1 -1
  237. package/dist/mint-components/{p-af69ee79.system.entry.js → p-ed7ab864.system.entry.js} +1 -1
  238. package/dist/mint-components/{p-088f082f.js → p-eff405e5.js} +1 -1
  239. package/dist/mint-components/{p-ee3a7577.entry.js → p-f08dd2a8.entry.js} +1 -1
  240. package/dist/mint-components/{p-0b9b1b36.system.entry.js → p-f237f96d.system.entry.js} +1 -1
  241. package/dist/mint-components/{p-ad3ebf4d.entry.js → p-f776cd83.entry.js} +1 -1
  242. package/dist/mint-components/p-f84706aa.entry.js +13 -0
  243. package/dist/mint-components/p-f862be0b.entry.js +1 -0
  244. package/dist/mint-components/{p-8de73da9.js → p-fb8927aa.js} +1 -1
  245. package/dist/mint-components/{p-30278955.entry.js → p-fc7d85c7.entry.js} +1 -1
  246. package/dist/mint-components/{p-75b8fd75.entry.js → p-fe14d2af.entry.js} +1 -1
  247. package/dist/types/components/sqm-portal-google-login/GoogleLoginForm.stories.d.ts +7 -0
  248. package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +0 -4
  249. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +0 -1
  250. package/dist/types/components.d.ts +0 -8
  251. package/docs/docs.docx +0 -0
  252. package/docs/raisins.json +1 -1
  253. package/grapesjs/grapesjs.js +1 -1
  254. package/package.json +1 -1
  255. package/dist/cjs/sqm-base-registration-form-view-69a4b615.js +0 -74
  256. package/dist/cjs/sqm-portal-google-login.cjs.entry.js +0 -130
  257. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +0 -381
  258. package/dist/cjs/sqm-portal-login-view-bb50304c.js +0 -58
  259. package/dist/cjs/usePortalLogin-1c022d8d.js +0 -74
  260. package/dist/cjs/usePortalRegistrationForm-75b647fe.js +0 -215
  261. package/dist/esm/sqm-base-registration-form-view-9e97d8b4.js +0 -72
  262. package/dist/esm/sqm-portal-google-login.entry.js +0 -126
  263. package/dist/esm/sqm-portal-google-registration-form.entry.js +0 -377
  264. package/dist/esm/sqm-portal-login-view-7670cd86.js +0 -56
  265. package/dist/esm/usePortalLogin-f95bbc67.js +0 -72
  266. package/dist/esm/usePortalRegistrationForm-1eb3cd72.js +0 -213
  267. package/dist/esm-es5/AsYouType-46f67d0d.js +0 -1
  268. package/dist/esm-es5/ShadowViewAddon-78a1c35c.js +0 -1
  269. package/dist/esm-es5/sqm-base-registration-form-view-9e97d8b4.js +0 -1
  270. package/dist/esm-es5/sqm-big-stat_47.entry.js +0 -1
  271. package/dist/esm-es5/sqm-portal-google-login.entry.js +0 -1
  272. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +0 -1
  273. package/dist/esm-es5/sqm-portal-login-view-7670cd86.js +0 -1
  274. package/dist/esm-es5/usePortalLogin-f95bbc67.js +0 -1
  275. package/dist/esm-es5/usePortalRegistrationForm-1eb3cd72.js +0 -1
  276. package/dist/mint-components/p-121cdc60.js +0 -1
  277. package/dist/mint-components/p-125a894f.js +0 -1
  278. package/dist/mint-components/p-1b79b186.entry.js +0 -11
  279. package/dist/mint-components/p-1cd0e1e9.system.js +0 -1
  280. package/dist/mint-components/p-20c40fdf.system.js +0 -1
  281. package/dist/mint-components/p-240bec23.js +0 -1
  282. package/dist/mint-components/p-2a315057.system.entry.js +0 -1
  283. package/dist/mint-components/p-40752a0f.entry.js +0 -1
  284. package/dist/mint-components/p-44fc6029.js +0 -1
  285. package/dist/mint-components/p-513f5d80.js +0 -1
  286. package/dist/mint-components/p-51a6a779.js +0 -1
  287. package/dist/mint-components/p-537a3894.system.js +0 -1
  288. package/dist/mint-components/p-68e1dd26.entry.js +0 -9
  289. package/dist/mint-components/p-6a0ddee0.entry.js +0 -1
  290. package/dist/mint-components/p-80569911.system.js +0 -1
  291. package/dist/mint-components/p-92a54b0c.entry.js +0 -1
  292. package/dist/mint-components/p-947bacd1.system.js +0 -1
  293. package/dist/mint-components/p-95b6e903.entry.js +0 -1
  294. package/dist/mint-components/p-976ee669.js +0 -1
  295. package/dist/mint-components/p-97dc6863.js +0 -13
  296. package/dist/mint-components/p-9d362d44.system.js +0 -1
  297. package/dist/mint-components/p-a470e203.entry.js +0 -13
  298. package/dist/mint-components/p-afecb03d.system.entry.js +0 -1
  299. package/dist/mint-components/p-b3510ca0.system.entry.js +0 -1
  300. package/dist/mint-components/p-bd093069.system.entry.js +0 -1
  301. package/dist/mint-components/p-cc8ca3ff.system.entry.js +0 -1
  302. package/dist/mint-components/p-d08bcd88.entry.js +0 -1
  303. package/dist/mint-components/p-d25af596.entry.js +0 -273
  304. package/dist/mint-components/p-d69c0a32.system.entry.js +0 -1
  305. package/dist/mint-components/p-d88d8ffe.entry.js +0 -1
  306. package/dist/mint-components/p-e3ee8c37.system.js +0 -1
  307. package/dist/mint-components/p-ee83de0e.js +0 -448
  308. package/dist/mint-components/p-f5820d03.system.js +0 -1
@@ -1,33 +1,32 @@
1
1
  import { r as registerInstance, h as h$1, c as Host } from './index-b3a06de8.js';
2
- import { b as buildFontsCssUrl, i as intl } from './global-58a69018.js';
2
+ import { b as buildFontsCssUrl, i as intl } from './global-5d501632.js';
3
3
  import { n as h, f as useEffect, i as d, k as useState, m as useRef, u as useMemo, b as browser, j as useReducer } from './dom-context-hooks.module-63370afd.js';
4
- import { i as isDemo, _ as _$1, d as dist, J, H, B, $ as $e, w as wn, u as useCallback, L, y as yn, j as jn, q as Ue, r as un, V as Ve, b as setUserIdentity, Q as Qe, k as kn, M as Mn, I as In, S as Sn } from './index.module-c9811a48.js';
4
+ import { i as isDemo, _ as _$1, d as dist, J, H, B, $ as $e, w as wn, u as useCallback, L, y as yn, j as jn, o as Ue, p as un, q as je, r as hn, V as Ve, b as setUserIdentity, Q as Qe, k as kn, M as Mn, I as In, S as Sn } from './index.module-234e8f5e.js';
5
5
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
- import { g as getProps, a as getMissingProps } from './utils-334c1e34.js';
7
+ import { g as getProps, a as getMissingProps, s as sanitizeUrlPath } from './utils-334c1e34.js';
8
8
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
9
- import './useReferralCodes-c2e809cf.js';
9
+ import './useReferralCodes-75d67509.js';
10
10
  import './mixins-f750863a.js';
11
11
  import { C as CopyTextView } from './copy-text-view-fac47254.js';
12
- import { a as useRequestRerender } from './re-render-7e22fb0d.js';
13
- import { u as useChildElements } from './useChildElements-3d872cef.js';
12
+ import { a as useRequestRerender } from './re-render-b56bc163.js';
13
+ import { u as useChildElements } from './useChildElements-daf489b1.js';
14
14
  import './luxon-bbf75a9d.js';
15
15
  import './sqm-text-span-view-4c17b8c9.js';
16
16
  import { p as pathToRegexp } from './index-ffa26b43.js';
17
17
  import { E as EmailRegistrationView } from './email-registration-view-1f587f8b.js';
18
- import { R as REGISTRATION_FORM_STATE_CONTEXT, u as useRegistrationFormState } from './useRegistrationFormState-24d594ea.js';
19
- import { u as useInstantAccessRegistration } from './useInstantAccessRegistration-dda1f52b.js';
20
- import { R as RequiredPropsError, L as LEAD_FORM_STATE_CONTEXT, u as useLeadFormState } from './useLeadFormState-8d4b2620.js';
21
- import { P as PortalLoginView } from './sqm-portal-login-view-7670cd86.js';
22
- import { u as usePortalLogin } from './usePortalLogin-f95bbc67.js';
23
- import { A as AsYouType } from './AsYouType-46f67d0d.js';
24
- import { i as isEmpty } from './utilities-72c07b09.js';
18
+ import { R as REGISTRATION_FORM_STATE_CONTEXT, a as useRegistrationForm, u as useRegistrationFormState } from './useRegistrationFormState-a9e156e6.js';
19
+ import { u as useInstantAccessRegistration } from './useInstantAccessRegistration-89e7dfc8.js';
20
+ import { R as RequiredPropsError, L as LEAD_FORM_STATE_CONTEXT, u as useLeadFormState } from './useLeadFormState-d2f1c87d.js';
21
+ import { i as isEmpty } from './utilities-e6f8716e.js';
22
+ import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-8bdc3804.js';
23
+ import { A as AsYouType, u as usePortalRegistrationForm } from './usePortalRegistrationForm-fb06b600.js';
25
24
  import { E as ErrorView } from './ErrorView-bbf0a042.js';
26
- import { u as useDemoBigStat, W as useBigStat, B as BigStatView, C as CardFeedView, c as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, U as LeadDropdownFieldView, Q as LeadFormView, X as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, d as PortalRegisterView, R as ReferralIframeView, j as RewardExchangeView, Y as demoRewardExchange, J as useShareButton, a as ShareButtonView, K as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-78a1c35c.js';
25
+ import { u as useDemoBigStat, Y as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, f as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, W as LeadDropdownFieldView, V as LeadFormView, Z as withShadowView, L as LeaderboardView, N as NameFieldsView, g as ChangeMarktingView, P as PortalChangePasswordView, h as PortalFooterView, i as PortalForgotPasswordView, j as PortalFrameView, k as PortalLoginView, c as BaseRegistrationFormView, e as PortalRegisterView, R as ReferralIframeView, l as RewardExchangeView, _ as demoRewardExchange, M as useShareButton, a as ShareButtonView, O as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-49bebd13.js';
27
26
  import './sqm-portal-container-view-176e92e3.js';
28
- import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, g as getCountryObj, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, h as FINANCE_NETWORK_SETTINGS_NAMESPACE, i as GET_FINANCE_NETWORK_SETTINGS, j as CURRENCIES_QUERY_NAMESPACE, k as GET_CURRENCIES, L as LoadingView } from './data-a581119a.js';
27
+ import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, g as getCountryObj, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, h as FINANCE_NETWORK_SETTINGS_NAMESPACE, i as GET_FINANCE_NETWORK_SETTINGS, j as CURRENCIES_QUERY_NAMESPACE, k as GET_CURRENCIES, L as LoadingView } from './data-f2f77358.js';
29
28
  import { p as parseStates, e as extractProps } from './extractProps-54064fb0.js';
30
- import { u as usePayoutStatus } from './usePayoutStatus-7404eb9d.js';
29
+ import { u as usePayoutStatus } from './usePayoutStatus-6be47a64.js';
31
30
 
32
31
  /**
33
32
  *
@@ -2939,7 +2938,6 @@ const sheet$2 = createStyleSheet(style$2);
2939
2938
  const styleString$2 = sheet$2.toString();
2940
2939
  function PayoutStatusAlertView(props) {
2941
2940
  const { text, states, data, callbacks } = props;
2942
- console.log("test 123456");
2943
2941
  function getAlert(status) {
2944
2942
  if (states.error)
2945
2943
  return {
@@ -3173,7 +3171,6 @@ function PayoutStatusAlertView(props) {
3173
3171
  return h$1("sl-skeleton", { class: sheet$2.classes.SkeletonOne });
3174
3172
  }
3175
3173
  const alertDetails = getAlert(states.status);
3176
- console.log("status is ", states.status, alertDetails);
3177
3174
  if (states.status === "DONE" || !alertDetails) {
3178
3175
  return h$1("div", null);
3179
3176
  }
@@ -3364,16 +3361,10 @@ const PayoutStatusAlert = class {
3364
3361
  }
3365
3362
  };
3366
3363
  function useDemoPayoutStatusAlert(props) {
3367
- var _a, _b;
3368
3364
  const states = parseStates(props.stateController);
3369
3365
  const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-payout-status-alert"
3370
3366
  ? { ...prev, ...states[key] }
3371
3367
  : { ...prev, [`${key}_stateController`]: states[key] }, {});
3372
- const status = states.status ? states.status : (_b = (_a = props.demoData) === null || _a === void 0 ? void 0 : _a.states) === null || _b === void 0 ? void 0 : _b.status;
3373
- console.log("the value of the status variable is", status);
3374
- console.log("the value of states.status is ", states.status);
3375
- console.log("the value of states is ", states);
3376
- console.log("the value of formatted states is ", formatted);
3377
3368
  return cjs({
3378
3369
  states: {
3379
3370
  error: false,
@@ -4032,7 +4023,73 @@ function usePortalFrameDemo(footerContent, headerContent, props) {
4032
4023
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
4033
4024
  }
4034
4025
 
4035
- const PortalLogin = class {
4026
+ function usePortalLogin(props) {
4027
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
4028
+ const [request, { loading, errors, data }] = je();
4029
+ const [loginWithGoogle, { loading: gLoading, errors: gErrors }] = hn();
4030
+ const [error, setError] = useState("");
4031
+ const urlParams = new URLSearchParams(jn.location.search);
4032
+ const nextPageOverride = urlParams.get("nextPage");
4033
+ const googleSubmit = async (e) => {
4034
+ var _a, _b, _c, _d;
4035
+ if (!((_a = e.detail) === null || _a === void 0 ? void 0 : _a.credential))
4036
+ return;
4037
+ const result = await loginWithGoogle({ idToken: e.detail.credential });
4038
+ if (result instanceof Error) {
4039
+ if ((result === null || result === void 0 ? void 0 : result.message) || ((_b = result === null || result === void 0 ? void 0 : result["response"]) === null || _b === void 0 ? void 0 : _b["error"]))
4040
+ if ((_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"].some((error) => { var _a; return ((_a = error === null || error === void 0 ? void 0 : error["extensions"]) === null || _a === void 0 ? void 0 : _a["message"]) === "Invalid Credentials."; })) {
4041
+ setError(props.googleUserNotRegisteredError);
4042
+ }
4043
+ else {
4044
+ setError(props.networkErrorMessage);
4045
+ }
4046
+ return;
4047
+ }
4048
+ if ((_d = result.authenticateManagedIdentityWithGoogle) === null || _d === void 0 ? void 0 : _d.token) {
4049
+ urlParams.delete("nextPage");
4050
+ const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
4051
+ jn.push(url.href);
4052
+ }
4053
+ };
4054
+ const submit = async (event) => {
4055
+ var _a, _b;
4056
+ setError("");
4057
+ let formData = event.detail.formData;
4058
+ formData === null || formData === void 0 ? void 0 : formData.forEach((value, key) => {
4059
+ jsonpointer.set(formData, key, value);
4060
+ });
4061
+ const variables = { email: formData.email, password: formData.password };
4062
+ const result = await request(variables);
4063
+ if (result instanceof Error) {
4064
+ if ((result === null || result === void 0 ? void 0 : result.message) || ((_a = result === null || result === void 0 ? void 0 : result["response"]) === null || _a === void 0 ? void 0 : _a["error"]))
4065
+ setError(props.networkErrorMessage);
4066
+ return;
4067
+ }
4068
+ if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
4069
+ urlParams.delete("nextPage");
4070
+ const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
4071
+ jn.push(url.href);
4072
+ }
4073
+ };
4074
+ const errorMessage = ((_d = (_c = (_b = (_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.extensions) === null || _d === void 0 ? void 0 : _d.message) || ((_g = (_f = (_e = errors === null || errors === void 0 ? void 0 : errors.response) === null || _e === void 0 ? void 0 : _e.errors) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.message) ||
4075
+ error;
4076
+ const googleErrorMessage = ((_l = (_k = (_j = (_h = gErrors === null || gErrors === void 0 ? void 0 : gErrors.response) === null || _h === void 0 ? void 0 : _h.errors) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.extensions) === null || _l === void 0 ? void 0 : _l.message) || ((_p = (_o = (_m = gErrors === null || gErrors === void 0 ? void 0 : gErrors.response) === null || _m === void 0 ? void 0 : _m.errors) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.message) ||
4077
+ error;
4078
+ return {
4079
+ states: {
4080
+ loading: loading || gLoading,
4081
+ error: errorMessage || googleErrorMessage,
4082
+ registerPath: props.registerPath,
4083
+ forgotPasswordPath: props.forgotPasswordPath,
4084
+ },
4085
+ callbacks: {
4086
+ googleSubmit,
4087
+ submit,
4088
+ },
4089
+ };
4090
+ }
4091
+
4092
+ const PortalGoogleLogin = class {
4036
4093
  constructor(hostRef) {
4037
4094
  registerInstance(this, hostRef);
4038
4095
  this.ignored = true;
@@ -4081,10 +4138,15 @@ const PortalLogin = class {
4081
4138
  */
4082
4139
  this.pageLabel = "Sign in to your account";
4083
4140
  /**
4084
- * Displayed when the login fails due to a network error. The participant can try refreshing the page.
4085
4141
  * @uiName Network error message
4142
+ * Displayed when the login fails due to a network error. The participant can try refreshing the page.
4086
4143
  */
4087
4144
  this.networkErrorMessage = "An error occurred while logging you in. Please refresh the page and try again.";
4145
+ /**
4146
+ * @uiName Google account error message
4147
+ * Displayed when user tries to sign in with Google account but has not registered.
4148
+ */
4149
+ this.googleUserNotRegisteredError = "Your Google account has not registered on our platform. Please complete the registration process with your Google account.";
4088
4150
  /**
4089
4151
  * @uiName Register CTA
4090
4152
  */
@@ -4105,6 +4167,473 @@ const PortalLogin = class {
4105
4167
  };
4106
4168
  const sheet = createStyleSheet(styles);
4107
4169
  const styleString = sheet.toString();
4170
+ const content = {
4171
+ forgotPasswordButton: (h$1("slot", { name: "forgotPassword" }, h$1("a", { onClick: () => jn.push(states.forgotPasswordPath) }, this.forgotPasswordLabel))),
4172
+ googleButton: (h$1("sqm-google-sign-in", { onInitComplete: callbacks.googleSubmit })),
4173
+ secondaryButton: (h$1("slot", { name: "secondaryButton" }, h$1("style", null, styleString), h$1("span", null, this.registerCTA, " ", h$1("sl-button", { size: "large", type: "text", disabled: states.loading, onClick: () => jn.push(states.registerPath), className: sheet.classes.RegisterButton }, this.registerLabel)))),
4174
+ emailLabel: this.emailLabel,
4175
+ passwordLabel: this.passwordLabel,
4176
+ submitLabel: this.submitLabel,
4177
+ pageLabel: this.pageLabel,
4178
+ };
4179
+ return (h$1(PortalLoginView, { states: states, callbacks: callbacks, content: content }));
4180
+ }
4181
+ };
4182
+ function useLoginDemo(props) {
4183
+ var _a, _b;
4184
+ return cjs({
4185
+ states: {
4186
+ error: ((_b = (_a = props.demoData) === null || _a === void 0 ? void 0 : _a.states) === null || _b === void 0 ? void 0 : _b.error) || "",
4187
+ loading: false,
4188
+ forgotPasswordPath: "/forgotPassword",
4189
+ registerPath: "/register",
4190
+ showLoginForm: "manual",
4191
+ },
4192
+ callbacks: {
4193
+ googleSubmit: async () => {
4194
+ console.log("google submit");
4195
+ },
4196
+ submit: async (_event) => {
4197
+ console.log("submit");
4198
+ },
4199
+ },
4200
+ content: {
4201
+ googleButton: null,
4202
+ },
4203
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
4204
+ }
4205
+
4206
+ class InvalidTokenError extends Error {
4207
+ }
4208
+ InvalidTokenError.prototype.name = "InvalidTokenError";
4209
+ function b64DecodeUnicode(str) {
4210
+ return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {
4211
+ let code = p.charCodeAt(0).toString(16).toUpperCase();
4212
+ if (code.length < 2) {
4213
+ code = "0" + code;
4214
+ }
4215
+ return "%" + code;
4216
+ }));
4217
+ }
4218
+ function base64UrlDecode(str) {
4219
+ let output = str.replace(/-/g, "+").replace(/_/g, "/");
4220
+ switch (output.length % 4) {
4221
+ case 0:
4222
+ break;
4223
+ case 2:
4224
+ output += "==";
4225
+ break;
4226
+ case 3:
4227
+ output += "=";
4228
+ break;
4229
+ default:
4230
+ throw new Error("base64 string is not of the correct length");
4231
+ }
4232
+ try {
4233
+ return b64DecodeUnicode(output);
4234
+ }
4235
+ catch (err) {
4236
+ return atob(output);
4237
+ }
4238
+ }
4239
+ function jwtDecode(token, options) {
4240
+ if (typeof token !== "string") {
4241
+ throw new InvalidTokenError("Invalid token specified: must be a string");
4242
+ }
4243
+ options || (options = {});
4244
+ const pos = options.header === true ? 0 : 1;
4245
+ const part = token.split(".")[pos];
4246
+ if (typeof part !== "string") {
4247
+ throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
4248
+ }
4249
+ let decoded;
4250
+ try {
4251
+ decoded = base64UrlDecode(part);
4252
+ }
4253
+ catch (e) {
4254
+ throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
4255
+ }
4256
+ try {
4257
+ return JSON.parse(decoded);
4258
+ }
4259
+ catch (e) {
4260
+ throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
4261
+ }
4262
+ }
4263
+
4264
+ function usePortalGoogleRegistrationForm(props) {
4265
+ const [registrationFormState, setRegistrationFormState] = useRegistrationForm();
4266
+ const [showRegistrationForm, setShowRegistrationForm] = useState({
4267
+ mode: "base",
4268
+ });
4269
+ const handleEmailSubmit = async (event) => {
4270
+ const formControls = event.target.getFormControls();
4271
+ let formData = {};
4272
+ let validationErrors = {};
4273
+ formControls.forEach((control) => {
4274
+ if (!control.name)
4275
+ return;
4276
+ const key = control.name;
4277
+ const value = control.value;
4278
+ jsonpointer.set(formData, key, value);
4279
+ if (control.required && !value) {
4280
+ jsonpointer.set(validationErrors, key, props.requiredFieldErrorMessage);
4281
+ }
4282
+ if (typeof control.validationError === "function") {
4283
+ const validate = control.validationError;
4284
+ const validationError = validate({
4285
+ control,
4286
+ key,
4287
+ value,
4288
+ });
4289
+ if (validationError)
4290
+ jsonpointer.set(validationErrors, key, validationError);
4291
+ }
4292
+ });
4293
+ if (Object.keys(validationErrors).length) {
4294
+ // early return for validation errors
4295
+ setRegistrationFormState({
4296
+ ...registrationFormState,
4297
+ loading: false,
4298
+ error: "",
4299
+ validationErrors,
4300
+ });
4301
+ return;
4302
+ }
4303
+ setRegistrationFormState({
4304
+ ...registrationFormState,
4305
+ validationErrors: {},
4306
+ initialData: {
4307
+ ...registrationFormState === null || registrationFormState === void 0 ? void 0 : registrationFormState.initialData,
4308
+ ...formData,
4309
+ },
4310
+ });
4311
+ setShowRegistrationForm({ mode: "manual" });
4312
+ };
4313
+ const handleGoogleInit = (event) => {
4314
+ var _a;
4315
+ if (!((_a = event.detail) === null || _a === void 0 ? void 0 : _a.credential))
4316
+ return;
4317
+ try {
4318
+ const res = jwtDecode(event.detail.credential);
4319
+ setRegistrationFormState({
4320
+ ...registrationFormState,
4321
+ _googleOAuthIdToken: event.detail.credential,
4322
+ initialData: {
4323
+ email: res.email,
4324
+ firstName: res.given_name,
4325
+ lastName: res.family_name,
4326
+ },
4327
+ });
4328
+ setShowRegistrationForm({ mode: "google" });
4329
+ }
4330
+ catch (e) {
4331
+ console.error("Failed to decode Google Sign In credential JWT:", e);
4332
+ }
4333
+ };
4334
+ return {
4335
+ registrationFormState,
4336
+ showRegistrationForm,
4337
+ validationErrors: registrationFormState.validationErrors,
4338
+ handleGoogleInit,
4339
+ handleEmailSubmit,
4340
+ };
4341
+ }
4342
+
4343
+ const PortalGoogleRegistrationForm = class {
4344
+ constructor(hostRef) {
4345
+ registerInstance(this, hostRef);
4346
+ this.ignored = true;
4347
+ /**
4348
+ * Redirect participants to this page after they successfully register.
4349
+ *
4350
+ * @uiName Registration redirect
4351
+ * @uiWidget pageSelect
4352
+ */
4353
+ this.nextPage = "/";
4354
+ /**
4355
+ * Redirect participants to this page from their verification email
4356
+ *
4357
+ * @uiName Email verification redirect
4358
+ * @uiWidget pageSelect
4359
+ */
4360
+ this.redirectPath = "/verifyEmail";
4361
+ /**
4362
+ * @uiName Email field label
4363
+ */
4364
+ this.emailLabel = "Email";
4365
+ /**
4366
+ * @uiName Password field label
4367
+ */
4368
+ this.passwordLabel = "Password";
4369
+ /**
4370
+ * @uiName Submit button text
4371
+ */
4372
+ this.submitLabel = "Register";
4373
+ /**
4374
+ * @uiName Login button text
4375
+ */
4376
+ this.loginLabel = "Sign in";
4377
+ /**
4378
+ * @uiName Confirm password field label
4379
+ */
4380
+ this.confirmPasswordLabel = "Confirm Password";
4381
+ /**
4382
+ * @uiName Show confirm password field
4383
+ */
4384
+ this.confirmPassword = false;
4385
+ /**
4386
+ * @uiName Disable password validation
4387
+ */
4388
+ this.disablePasswordValidation = false;
4389
+ /**
4390
+ * Hides the email and password fields. Note: If you hide default inputs, you must add additional input fields. They must have the input name attributes "email" and "password" for this form to succeed.
4391
+ *
4392
+ * @uiName Hide default fields
4393
+ */
4394
+ this.hideInputs = false;
4395
+ /**
4396
+ * @uiName Header text
4397
+ */
4398
+ this.pageLabel = "Register";
4399
+ /**
4400
+ * Redirect participants to this page after clicking the login button.
4401
+ *
4402
+ * @uiName Login redirect
4403
+ * @uiWidget pageSelect
4404
+ */
4405
+ this.loginPath = "/login";
4406
+ /**
4407
+ * Login Call-to-action
4408
+ *
4409
+ * @uiName Login CTA
4410
+ */
4411
+ this.loginCTA = "Already have an account?";
4412
+ /**
4413
+ * The message to be displayed when a required field is not filled.
4414
+ *
4415
+ * @uiName Required field message
4416
+ * @uiWidget textArea
4417
+ */
4418
+ this.requiredFieldErrorMessage = "Cannot be empty";
4419
+ /**
4420
+ * The message to be displayed when a the form submission fails unexpectedly.
4421
+ *
4422
+ * @uiName Network error message
4423
+ * @uiWidget textArea
4424
+ */
4425
+ this.networkErrorMessage = "Network request failed.";
4426
+ /**
4427
+ * The message to be displayed when password inputs do not match.
4428
+ *
4429
+ * @uiName Password mismatch message
4430
+ * @uiWidget textArea
4431
+ */
4432
+ this.passwordMismatchErrorMessage = "Passwords do not match.";
4433
+ /**
4434
+ * The message to be displayed when the email used is invalid or blocked.
4435
+ *
4436
+ * @uiName Invalid email message
4437
+ * @uiWidget textArea
4438
+ */
4439
+ this.invalidEmailErrorMessage = "Must be a valid email address";
4440
+ /**
4441
+ * The message to be displayed when the registration form is disabled.
4442
+ *
4443
+ * @uiName Form disabled message
4444
+ * @uiWidget textArea
4445
+ */
4446
+ this.formDisabledErrorMessage = "The registration form is currently disabled.";
4447
+ /**
4448
+ * @uiName Password requirement met
4449
+ */
4450
+ this.meetsRequirementsText = "Password has met all requirements";
4451
+ /**
4452
+ * @uiName Password requirement failed
4453
+ */
4454
+ this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
4455
+ /**
4456
+ * @uiName Minimum length text
4457
+ */
4458
+ this.minErrorText = "be a minimum of 8 characters";
4459
+ /**
4460
+ * @uiName Missing uppercase text
4461
+ */
4462
+ this.uppercaseErrorText = "contain at least 1 uppercase character";
4463
+ /**
4464
+ * @uiName Missing lowercase text
4465
+ */
4466
+ this.lowercaseErrorText = "contain at least 1 lowercase character";
4467
+ /**
4468
+ * @uiName Missing number or symbol text
4469
+ */
4470
+ this.hasErrorText = "contain at least 1 number or symbol";
4471
+ /**
4472
+ * Can be "signup_with", "signin_with", "continue_with", or "signin"
4473
+ *
4474
+ * @uiName Google button text
4475
+ */
4476
+ this.googleButtonText = "signup_with";
4477
+ h(this);
4478
+ }
4479
+ disconnectedCallback() { }
4480
+ render() {
4481
+ const { states, callbacks, refs } = isDemo()
4482
+ ? useRegisterDemo$1(this)
4483
+ : usePortalRegistrationForm(this);
4484
+ const styles = {
4485
+ LoginButton: {
4486
+ "&::part(label)": {
4487
+ padding: "0",
4488
+ },
4489
+ },
4490
+ };
4491
+ const sheet = createStyleSheet(styles);
4492
+ const styleString = sheet.toString();
4493
+ const { handleGoogleInit, handleEmailSubmit, showRegistrationForm, validationErrors, } = isDemo() ? useGoogleDemo(this) : usePortalGoogleRegistrationForm(this);
4494
+ const content = {
4495
+ formData: h$1("slot", { name: "formData" }),
4496
+ googleButton: (h$1("sqm-google-sign-in", { text: this.googleButtonText, onInitComplete: handleGoogleInit })),
4497
+ secondaryButton: (h$1("slot", { name: "secondaryButton" }, h$1("style", null, styleString), h$1("span", null, this.loginCTA, " ", h$1("sl-button", { size: "large", type: "text", disabled: states.loading, onClick: () => jn.push(states.loginPath), className: sheet.classes.LoginButton }, this.loginLabel), " "))),
4498
+ terms: h$1("slot", { name: "terms" }),
4499
+ emailLabel: this.emailLabel,
4500
+ passwordLabel: this.passwordLabel,
4501
+ submitLabel: this.submitLabel,
4502
+ pageLabel: this.pageLabel,
4503
+ confirmPasswordLabel: this.confirmPasswordLabel,
4504
+ networkErrorMessage: this.networkErrorMessage,
4505
+ passwordMismatchErrorMessage: this.passwordMismatchErrorMessage,
4506
+ invalidEmailErrorMessage: this.invalidEmailErrorMessage,
4507
+ formDisabledErrorMessage: this.formDisabledErrorMessage,
4508
+ requiredFieldErrorMessage: this.requiredFieldErrorMessage,
4509
+ meetsRequirementsText: this.meetsRequirementsText,
4510
+ doesNotMeetRequirementsText: this.doesNotMeetRequirementsText,
4511
+ minErrorText: this.minErrorText,
4512
+ uppercaseErrorText: this.uppercaseErrorText,
4513
+ lowercaseErrorText: this.lowercaseErrorText,
4514
+ hasErrorText: this.hasErrorText,
4515
+ };
4516
+ if (showRegistrationForm.mode === "base") {
4517
+ return (h$1(BaseRegistrationFormView, { states: {
4518
+ validationErrors,
4519
+ }, callbacks: { handleEmailSubmit }, content: content }));
4520
+ }
4521
+ return (h$1(PortalRegistrationFormView, { states: {
4522
+ ...states,
4523
+ emailDisabled: true,
4524
+ hidePasswords: showRegistrationForm.mode === "google",
4525
+ }, callbacks: callbacks, content: content, refs: refs }));
4526
+ }
4527
+ };
4528
+ function useRegisterDemo$1(props) {
4529
+ return cjs({
4530
+ states: {
4531
+ error: "",
4532
+ loading: false,
4533
+ confirmPassword: props.confirmPassword,
4534
+ hideInputs: props.hideInputs || false,
4535
+ customPasswordField: false,
4536
+ loginPath: "/login",
4537
+ },
4538
+ callbacks: {
4539
+ handleGoogleInit: () => { },
4540
+ setShowRegistrationForm: () => { },
4541
+ submit: async (_event) => {
4542
+ console.log("submit");
4543
+ },
4544
+ inputFunction: () => { },
4545
+ },
4546
+ content: {
4547
+ pageLabel: "Register",
4548
+ formData: null,
4549
+ passwordField: null,
4550
+ },
4551
+ refs: {
4552
+ formRef: {},
4553
+ },
4554
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
4555
+ }
4556
+ function useGoogleDemo(props) {
4557
+ const [showRegistrationForm, setShowRegistrationForm] = useState({
4558
+ mode: "base",
4559
+ });
4560
+ return cjs({
4561
+ validationErrors: {},
4562
+ handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
4563
+ showRegistrationForm,
4564
+ handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),
4565
+ }, props.demoGoogleData || {}, { arrayMerge: (_, a) => a });
4566
+ }
4567
+
4568
+ const PortalLogin = class {
4569
+ constructor(hostRef) {
4570
+ registerInstance(this, hostRef);
4571
+ this.ignored = true;
4572
+ /**
4573
+ * Redirect participants to this page after they successfully login.
4574
+ *
4575
+ * @uiName Login redirect
4576
+ * @uiWidget pageSelect
4577
+ */
4578
+ this.nextPage = "/";
4579
+ /**
4580
+ * @uiName Email field label
4581
+ */
4582
+ this.emailLabel = "Email";
4583
+ /**
4584
+ * @uiName Password field label
4585
+ */
4586
+ this.passwordLabel = "Password";
4587
+ /**
4588
+ * @uiName Submit button text
4589
+ */
4590
+ this.submitLabel = "Sign In";
4591
+ /**
4592
+ * Redirect participants to this page to reset their password
4593
+ * @uiName Forgot password redirect
4594
+ * @uiWidget pageSelect
4595
+ */
4596
+ this.forgotPasswordPath = "/forgotPassword";
4597
+ /**
4598
+ * @uiName Forgot password text
4599
+ */
4600
+ this.forgotPasswordLabel = "Forgot Password?";
4601
+ /**
4602
+ * @uiName Register button text
4603
+ */
4604
+ this.registerLabel = "Register";
4605
+ /**
4606
+ * Redirect participants to this page to start registration.
4607
+ * @uiName Register button redirect
4608
+ * @uiWidget pageSelect
4609
+ */
4610
+ this.registerPath = "/register";
4611
+ /**
4612
+ * @uiName Heading label
4613
+ * @uiWidget textArea
4614
+ */
4615
+ this.pageLabel = "Sign in to your account";
4616
+ /**
4617
+ * Displayed when the login fails due to a network error. The participant can try refreshing the page.
4618
+ * @uiName Network error message
4619
+ */
4620
+ this.networkErrorMessage = "An error occurred while logging you in. Please refresh the page and try again.";
4621
+ h(this);
4622
+ }
4623
+ disconnectedCallback() { }
4624
+ render() {
4625
+ const { states, callbacks } = isDemo()
4626
+ ? useLoginDemo$1(this)
4627
+ : usePortalLogin(this);
4628
+ const styles = {
4629
+ RegisterButton: {
4630
+ "&::part(label)": {
4631
+ padding: "0",
4632
+ },
4633
+ },
4634
+ };
4635
+ const sheet = createStyleSheet(styles);
4636
+ const styleString = sheet.toString();
4108
4637
  const content = {
4109
4638
  forgotPasswordButton: (h$1("slot", { name: "forgotPassword" }, h$1("a", { onClick: () => jn.push(states.forgotPasswordPath) }, this.forgotPasswordLabel))),
4110
4639
  googleButton: null,
@@ -4117,7 +4646,7 @@ const PortalLogin = class {
4117
4646
  return (h$1(PortalLoginView, { states: states, callbacks: callbacks, content: content }));
4118
4647
  }
4119
4648
  };
4120
- function useLoginDemo(props) {
4649
+ function useLoginDemo$1(props) {
4121
4650
  return cjs({
4122
4651
  states: {
4123
4652
  error: "",
@@ -4387,7 +4916,7 @@ const PortalRegister = class {
4387
4916
  disconnectedCallback() { }
4388
4917
  render() {
4389
4918
  const { states, callbacks, refs } = isDemo()
4390
- ? useRegisterDemo$1(this)
4919
+ ? useRegisterDemo$2(this)
4391
4920
  : usePortalRegister(this);
4392
4921
  const content = {
4393
4922
  formData: h$1("slot", { name: "formData" }),
@@ -4410,7 +4939,7 @@ const PortalRegister = class {
4410
4939
  return (h$1(PortalRegisterView, { states: states, callbacks: callbacks, content: content, refs: refs }));
4411
4940
  }
4412
4941
  };
4413
- function useRegisterDemo$1(props) {
4942
+ function useRegisterDemo$2(props) {
4414
4943
  return cjs({
4415
4944
  states: {
4416
4945
  error: "",
@@ -8086,4 +8615,4 @@ function useUserNameDemo(props) {
8086
8615
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
8087
8616
  }
8088
8617
 
8089
- export { BigStat as sqm_big_stat, BrandComponent as sqm_brand, SqmBrandSelector as sqm_brand_selector, CardFeed as sqm_card_feed, CheckboxField as sqm_checkbox_field, CouponCode as sqm_coupon_code, DividedLayout as sqm_divided_layout, DropdownField as sqm_dropdown_field, EditProfile as sqm_edit_profile, Hero as sqm_hero, HeroImage as sqm_hero_image, SqmHookStoryContainer as sqm_hook_story_container, Image as sqm_image, InputField as sqm_input_field, LeadDropdownField as sqm_lead_dropdown_field, LeadForm as sqm_lead_form, Leaderboard as sqm_leaderboard, LinkButton as sqm_link_button, MarketingEmailsCheckbox as sqm_marketing_emails_checkbox, NameFields as sqm_name_fields, NavigationMenu as sqm_navigation_menu, PayoutButtonScroll as sqm_payout_button_scroll, PayoutStatusAlert as sqm_payout_status_alert, PortalChangeMarketing as sqm_portal_change_marketing, PortalChangePassword as sqm_portal_change_password, PortalFooter as sqm_portal_footer, PortalForgotPassword as sqm_portal_forgot_password, PortalFrame as sqm_portal_frame, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramExplainer as sqm_program_explainer, ProgramExplainerStep as sqm_program_explainer_step, ProgramMenu as sqm_program_menu, ReferralCard as sqm_referral_card, SqmReferralIframe as sqm_referral_iframe, ReferredRegistration as sqm_referred_registration, SqmRewardExchangeList as sqm_reward_exchange_list, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareCode as sqm_share_code, ShareLink as sqm_share_link, StatContainer as sqm_stat_container, TaskCard as sqm_task_card, TaxAndCashMonolith as sqm_tax_and_cash, Timeline as sqm_timeline, TimelineReward as sqm_timeline_entry, UserName as sqm_user_name };
8618
+ export { BigStat as sqm_big_stat, BrandComponent as sqm_brand, SqmBrandSelector as sqm_brand_selector, CardFeed as sqm_card_feed, CheckboxField as sqm_checkbox_field, CouponCode as sqm_coupon_code, DividedLayout as sqm_divided_layout, DropdownField as sqm_dropdown_field, EditProfile as sqm_edit_profile, Hero as sqm_hero, HeroImage as sqm_hero_image, SqmHookStoryContainer as sqm_hook_story_container, Image as sqm_image, InputField as sqm_input_field, LeadDropdownField as sqm_lead_dropdown_field, LeadForm as sqm_lead_form, Leaderboard as sqm_leaderboard, LinkButton as sqm_link_button, MarketingEmailsCheckbox as sqm_marketing_emails_checkbox, NameFields as sqm_name_fields, NavigationMenu as sqm_navigation_menu, PayoutButtonScroll as sqm_payout_button_scroll, PayoutStatusAlert as sqm_payout_status_alert, PortalChangeMarketing as sqm_portal_change_marketing, PortalChangePassword as sqm_portal_change_password, PortalFooter as sqm_portal_footer, PortalForgotPassword as sqm_portal_forgot_password, PortalFrame as sqm_portal_frame, PortalGoogleLogin as sqm_portal_google_login, PortalGoogleRegistrationForm as sqm_portal_google_registration_form, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramExplainer as sqm_program_explainer, ProgramExplainerStep as sqm_program_explainer_step, ProgramMenu as sqm_program_menu, ReferralCard as sqm_referral_card, SqmReferralIframe as sqm_referral_iframe, ReferredRegistration as sqm_referred_registration, SqmRewardExchangeList as sqm_reward_exchange_list, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareCode as sqm_share_code, ShareLink as sqm_share_link, StatContainer as sqm_stat_container, TaskCard as sqm_task_card, TaxAndCashMonolith as sqm_tax_and_cash, Timeline as sqm_timeline, TimelineReward as sqm_timeline_entry, UserName as sqm_user_name };