@saasquatch/mint-components 1.6.2-3 → 1.6.2-6

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 (219) hide show
  1. package/dist/{esm/useValidationState-34e24357.js → cjs/AsYouType-6788393a.js} +2 -10
  2. package/dist/cjs/{ShadowViewAddon-1c9ca20c.js → ShadowViewAddon-33ae7c4f.js} +13 -6
  3. package/dist/cjs/{global-58e5d657.js → global-b3587dc9.js} +1 -1
  4. package/dist/cjs/{index.module-7eab8006.js → index.module-ff45cbf1.js} +2 -2
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mint-components.cjs.js +2 -2
  7. package/dist/cjs/{re-render-111a3ebb.js → re-render-e5491a50.js} +1 -1
  8. package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
  9. package/dist/cjs/sqm-big-stat_35.cjs.entry.js +19 -16
  10. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
  11. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
  12. package/dist/cjs/{sqm-navigation-sidebar-item-view-6020bdf9.js → sqm-navigation-sidebar-item-view-e8f500f9.js} +1 -1
  13. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
  14. package/dist/cjs/sqm-password-field.cjs.entry.js +13 -7
  15. package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
  16. package/dist/cjs/{sqm-portal-email-verification-view-eebe6329.js → sqm-portal-email-verification-view-dd27bba3.js} +1 -1
  17. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
  18. package/dist/cjs/{sqm-portal-footer-view-531c12fe.js → sqm-portal-footer-view-93f8ec0e.js} +1 -1
  19. package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
  20. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
  21. package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
  22. package/dist/cjs/{sqm-portal-profile-view-d0818828.js → sqm-portal-profile-view-f9104d25.js} +1 -1
  23. package/dist/cjs/sqm-portal-profile.cjs.entry.js +4 -4
  24. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
  25. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +70 -23
  26. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
  27. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -2
  28. package/dist/cjs/sqm-qa-tabs.cjs.entry.js +2 -2
  29. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +5 -5
  30. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
  31. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -5
  32. package/dist/cjs/sqm-stencilbook.cjs.entry.js +11 -8
  33. package/dist/cjs/sqm-tabs.cjs.entry.js +2 -2
  34. package/dist/cjs/{useChildElements-3a4087c1.js → useChildElements-658fefa1.js} +1 -1
  35. package/dist/cjs/{useReferralTable-a04fa0e5.js → useReferralTable-ae05b785.js} +3 -3
  36. package/dist/cjs/useRegistrationFormState-793a7958.js +23 -0
  37. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +9 -2
  38. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -1
  39. package/dist/collection/components/sqm-name-fields/useNameFields.js +3 -0
  40. package/dist/collection/components/sqm-password-field/PasswordField.stories.js +3 -0
  41. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +7 -4
  42. package/dist/collection/components/sqm-password-field/sqm-password-field.js +1 -0
  43. package/dist/collection/components/sqm-password-field/usePasswordField.js +5 -2
  44. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +16 -9
  45. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +1 -1
  46. package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +52 -11
  47. package/dist/collection/components/sqm-portal-registration-form/useRegistrationFormState.js +8 -0
  48. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +0 -1
  49. package/dist/{cjs/useValidationState-942d11da.js → esm/AsYouType-46f67d0d.js} +1 -15
  50. package/dist/esm/{ShadowViewAddon-77643eb3.js → ShadowViewAddon-7d94f9d6.js} +13 -6
  51. package/dist/esm/{global-79d68d1f.js → global-1e714a4d.js} +1 -1
  52. package/dist/esm/{index.module-8e654eb1.js → index.module-9cd4623b.js} +2 -2
  53. package/dist/esm/loader.js +2 -2
  54. package/dist/esm/mint-components.js +2 -2
  55. package/dist/esm/{re-render-cd65b629.js → re-render-d1b2a0de.js} +1 -1
  56. package/dist/esm/sqm-asset-card.entry.js +1 -1
  57. package/dist/esm/sqm-big-stat_35.entry.js +13 -10
  58. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  59. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  60. package/dist/esm/{sqm-navigation-sidebar-item-view-52b5e3b9.js → sqm-navigation-sidebar-item-view-7e6199c2.js} +1 -1
  61. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  62. package/dist/esm/sqm-password-field.entry.js +13 -7
  63. package/dist/esm/sqm-popup-container.entry.js +1 -1
  64. package/dist/esm/{sqm-portal-email-verification-view-7dafea6c.js → sqm-portal-email-verification-view-ba08318b.js} +1 -1
  65. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  66. package/dist/esm/{sqm-portal-footer-view-a857dd94.js → sqm-portal-footer-view-9bfd61b4.js} +1 -1
  67. package/dist/esm/sqm-portal-footer.entry.js +3 -3
  68. package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
  69. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  70. package/dist/esm/{sqm-portal-profile-view-785773e9.js → sqm-portal-profile-view-0f8dd14f.js} +1 -1
  71. package/dist/esm/sqm-portal-profile.entry.js +4 -4
  72. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  73. package/dist/esm/sqm-portal-registration-form.entry.js +68 -21
  74. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  75. package/dist/esm/sqm-portal-verify-email.entry.js +1 -2
  76. package/dist/esm/sqm-qa-tabs.entry.js +2 -2
  77. package/dist/esm/sqm-referral-table_11.entry.js +5 -5
  78. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  79. package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
  80. package/dist/esm/sqm-stencilbook.entry.js +11 -8
  81. package/dist/esm/sqm-tabs.entry.js +2 -2
  82. package/dist/esm/{useChildElements-5a1262d5.js → useChildElements-e1a1d3d1.js} +1 -1
  83. package/dist/esm/{useReferralTable-6c14c78f.js → useReferralTable-68c0823f.js} +3 -3
  84. package/dist/esm/useRegistrationFormState-699c3e59.js +18 -0
  85. package/dist/esm-es5/AsYouType-46f67d0d.js +1 -0
  86. package/dist/esm-es5/{ShadowViewAddon-77643eb3.js → ShadowViewAddon-7d94f9d6.js} +1 -1
  87. package/dist/esm-es5/{global-79d68d1f.js → global-1e714a4d.js} +1 -1
  88. package/dist/esm-es5/{index.module-8e654eb1.js → index.module-9cd4623b.js} +1 -1
  89. package/dist/esm-es5/loader.js +1 -1
  90. package/dist/esm-es5/mint-components.js +1 -1
  91. package/dist/esm-es5/{re-render-cd65b629.js → re-render-d1b2a0de.js} +1 -1
  92. package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
  93. package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
  94. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  95. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  96. package/dist/esm-es5/sqm-navigation-sidebar-item-view-7e6199c2.js +1 -0
  97. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  98. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  99. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  100. package/dist/esm-es5/{sqm-portal-email-verification-view-7dafea6c.js → sqm-portal-email-verification-view-ba08318b.js} +1 -1
  101. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  102. package/dist/esm-es5/{sqm-portal-footer-view-a857dd94.js → sqm-portal-footer-view-9bfd61b4.js} +1 -1
  103. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  104. package/dist/esm-es5/sqm-portal-forgot-password.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-785773e9.js → sqm-portal-profile-view-0f8dd14f.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-qa-tabs.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-tabs.entry.js +1 -1
  118. package/dist/esm-es5/{useChildElements-5a1262d5.js → useChildElements-e1a1d3d1.js} +1 -1
  119. package/dist/esm-es5/{useReferralTable-6c14c78f.js → useReferralTable-68c0823f.js} +1 -1
  120. package/dist/esm-es5/useRegistrationFormState-699c3e59.js +1 -0
  121. package/dist/mint-components/mint-components.esm.js +1 -1
  122. package/dist/mint-components/mint-components.js +1 -1
  123. package/dist/mint-components/{p-d5be4f5e.entry.js → p-02e2eab4.entry.js} +2 -2
  124. package/dist/mint-components/{p-4b34c8b6.system.js → p-07b33645.system.js} +1 -1
  125. package/dist/mint-components/{p-dc2120a9.entry.js → p-08401205.entry.js} +2 -2
  126. package/dist/mint-components/p-08fc37fd.system.entry.js +1 -0
  127. package/dist/mint-components/{p-4cdef37c.system.entry.js → p-10fb0aae.system.entry.js} +1 -1
  128. package/dist/mint-components/{p-72435015.entry.js → p-1127f297.entry.js} +2 -2
  129. package/dist/mint-components/p-121cdc60.js +1 -0
  130. package/dist/mint-components/{p-2db3e574.entry.js → p-17aae439.entry.js} +1 -1
  131. package/dist/mint-components/{p-cd4ae408.system.entry.js → p-190e24e4.system.entry.js} +1 -1
  132. package/dist/mint-components/{p-1d11d313.entry.js → p-1ea13deb.entry.js} +12 -12
  133. package/dist/mint-components/{p-af290d9f.entry.js → p-1fed6a09.entry.js} +1 -1
  134. package/dist/mint-components/p-273b5c53.system.entry.js +1 -0
  135. package/dist/mint-components/{p-ad04fd37.js → p-2920efe6.js} +1 -1
  136. package/dist/mint-components/p-2ce5d3da.js +1 -0
  137. package/dist/mint-components/p-2d2f7abb.system.entry.js +1 -0
  138. package/dist/mint-components/{p-fd2e16a3.system.entry.js → p-2de1fadb.system.entry.js} +1 -1
  139. package/dist/mint-components/{p-b7b610d9.entry.js → p-32f481cb.entry.js} +1 -1
  140. package/dist/mint-components/{p-cbe1f72a.system.entry.js → p-33910ee5.system.entry.js} +1 -1
  141. package/dist/mint-components/{p-0049fc60.entry.js → p-36d50757.entry.js} +1 -1
  142. package/dist/mint-components/p-3fddd002.system.js +1 -0
  143. package/dist/mint-components/{p-201076d0.system.js → p-40c4165b.system.js} +1 -1
  144. package/dist/mint-components/{p-4587520e.entry.js → p-4f10205f.entry.js} +1 -1
  145. package/dist/mint-components/{p-60ae6839.js → p-4f965abe.js} +2 -2
  146. package/dist/mint-components/{p-0c6077a8.system.entry.js → p-4fdd8b02.system.entry.js} +1 -1
  147. package/dist/mint-components/{p-250e8ca9.system.entry.js → p-5337c953.system.entry.js} +1 -1
  148. package/dist/mint-components/p-56bf2c06.system.js +1 -0
  149. package/dist/mint-components/p-5c347c93.system.entry.js +1 -0
  150. package/dist/mint-components/{p-cfce9e5c.entry.js → p-5c7c925e.entry.js} +1 -1
  151. package/dist/mint-components/{p-f79a103c.system.entry.js → p-5d7de7cd.system.entry.js} +1 -1
  152. package/dist/mint-components/p-5ef24d6c.system.entry.js +1 -0
  153. package/dist/mint-components/p-69871506.js +1 -0
  154. package/dist/mint-components/{p-7ba78151.js → p-6c05b2d3.js} +1 -1
  155. package/dist/mint-components/{p-20f0c0cc.system.js → p-7536759d.system.js} +1 -1
  156. package/dist/mint-components/{p-c7eaa296.system.entry.js → p-75e425fa.system.entry.js} +1 -1
  157. package/dist/mint-components/{p-fb8715c9.system.entry.js → p-771b778b.system.entry.js} +1 -1
  158. package/dist/mint-components/{p-da02c4e6.system.js → p-78c568dc.system.js} +1 -1
  159. package/dist/mint-components/{p-b2ad0a75.system.entry.js → p-7eb9955b.system.entry.js} +1 -1
  160. package/dist/mint-components/{p-d8c1aa2f.entry.js → p-91cde020.entry.js} +1 -1
  161. package/dist/mint-components/p-92e8b7b5.entry.js +1 -0
  162. package/dist/mint-components/p-9d362d44.system.js +1 -0
  163. package/dist/mint-components/{p-5aedc3a5.system.js → p-9dd68a9c.system.js} +1 -1
  164. package/dist/mint-components/{p-45d161fe.entry.js → p-a16556fd.entry.js} +1 -1
  165. package/dist/mint-components/{p-4e89da81.js → p-a63204e2.js} +1 -1
  166. package/dist/mint-components/{p-5f2d84e2.js → p-a6bfbb4e.js} +2 -2
  167. package/dist/mint-components/{p-bdf8f103.js → p-a750f034.js} +1 -1
  168. package/dist/mint-components/p-a963e9d5.entry.js +9 -0
  169. package/dist/mint-components/{p-d3c61681.system.js → p-ab7ae098.system.js} +1 -1
  170. package/dist/mint-components/{p-12b08957.js → p-abc426c4.js} +1 -1
  171. package/dist/mint-components/p-abffc249.entry.js +13 -0
  172. package/dist/mint-components/p-ad67b111.system.entry.js +1 -0
  173. package/dist/mint-components/{p-72dd2010.system.entry.js → p-b5faa04d.system.entry.js} +1 -1
  174. package/dist/mint-components/{p-986000f9.system.entry.js → p-b7fc1ee1.system.entry.js} +1 -1
  175. package/dist/mint-components/{p-c14b8c38.entry.js → p-b96505f5.entry.js} +1 -1
  176. package/dist/mint-components/{p-27557cc8.entry.js → p-ba09e62f.entry.js} +1 -1
  177. package/dist/mint-components/{p-36ff7a62.entry.js → p-c911a062.entry.js} +1 -1
  178. package/dist/mint-components/{p-e647c594.entry.js → p-cbb61c41.entry.js} +1 -1
  179. package/dist/mint-components/{p-9c58002f.entry.js → p-cdf2914a.entry.js} +1 -1
  180. package/dist/mint-components/p-ce5a3693.system.js +1 -0
  181. package/dist/mint-components/{p-1670c8d5.system.entry.js → p-cf279181.system.entry.js} +1 -1
  182. package/dist/mint-components/{p-a94d07d9.system.js → p-d1712ae1.system.js} +1 -1
  183. package/dist/mint-components/p-de4f0622.entry.js +1 -0
  184. package/dist/mint-components/{p-1260d387.entry.js → p-e28f4762.entry.js} +1 -1
  185. package/dist/mint-components/{p-47aa639f.system.entry.js → p-e9fa325e.system.entry.js} +1 -1
  186. package/dist/mint-components/p-ec18b601.system.js +1 -0
  187. package/dist/mint-components/{p-c7514dbd.system.entry.js → p-ecf7bfc7.system.entry.js} +1 -1
  188. package/dist/mint-components/{p-d8f4703a.js → p-ee0c06b3.js} +1 -1
  189. package/dist/mint-components/{p-bc796bc0.system.js → p-efbc0ee0.system.js} +1 -1
  190. package/dist/mint-components/{p-4392ba94.js → p-fc8800c0.js} +1 -1
  191. package/dist/mint-components/{p-89841802.system.entry.js → p-fdc7e95e.system.entry.js} +1 -1
  192. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +2 -0
  193. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +2 -0
  194. package/dist/types/components/sqm-password-field/sqm-password-field-view.d.ts +2 -0
  195. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +2 -0
  196. package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +2 -0
  197. package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +2 -0
  198. package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +23 -0
  199. package/docs/docs.docx +0 -0
  200. package/package.json +2 -2
  201. package/dist/esm-es5/sqm-navigation-sidebar-item-view-52b5e3b9.js +0 -1
  202. package/dist/esm-es5/useValidationState-34e24357.js +0 -1
  203. package/dist/mint-components/p-00893b1e.system.entry.js +0 -1
  204. package/dist/mint-components/p-2e827a20.system.entry.js +0 -1
  205. package/dist/mint-components/p-458416a0.system.js +0 -1
  206. package/dist/mint-components/p-494c99f7.js +0 -1
  207. package/dist/mint-components/p-6d0a42f8.system.entry.js +0 -1
  208. package/dist/mint-components/p-9311fb68.entry.js +0 -1
  209. package/dist/mint-components/p-955ecee3.system.entry.js +0 -1
  210. package/dist/mint-components/p-a7895b97.system.entry.js +0 -1
  211. package/dist/mint-components/p-b670cff3.system.js +0 -1
  212. package/dist/mint-components/p-c6fc021c.js +0 -1
  213. package/dist/mint-components/p-c7bc2261.entry.js +0 -9
  214. package/dist/mint-components/p-d78b809c.system.js +0 -1
  215. package/dist/mint-components/p-e013289c.entry.js +0 -1
  216. package/dist/mint-components/p-e2fe2d6f.entry.js +0 -1
  217. package/dist/mint-components/p-e5d4a15d.system.js +0 -1
  218. package/dist/mint-components/p-f2efaa41.system.entry.js +0 -1
  219. package/docs/grapesjs.js +0 -54
@@ -1,13 +1,13 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { F as Fn, L } from './index.module-8e654eb1.js';
4
+ import { F as Fn, L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
7
  import './mixins-f60a614c.js';
8
8
  import './JSS-f00f9536.js';
9
9
  import { g as getProps } from './utils-334c1e34.js';
10
- import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-52b5e3b9.js';
10
+ import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-7e6199c2.js';
11
11
 
12
12
  function useNavigationSidebarItem(props) {
13
13
  const currentPage = Fn();
@@ -1,11 +1,12 @@
1
1
  import { h, r as registerInstance } from './index-17b4da69.js';
2
2
  import { o as d, i as useState, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { L } from './index.module-8e654eb1.js';
4
+ import { L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
7
  import { E as ErrorStyles } from './mixins-f60a614c.js';
8
8
  import { c as createStyleSheet } from './JSS-f00f9536.js';
9
+ import { F as FORM_VALIDATION_CONTEXT, R as REGISTRATION_FORM_STATE_CONTEXT } from './useRegistrationFormState-699c3e59.js';
9
10
 
10
11
  var constants = {
11
12
  error: {
@@ -483,27 +484,30 @@ const vanillaStyle = `
483
484
  const sheet$1 = createStyleSheet(style$1);
484
485
  const styleString$1 = sheet$1.toString();
485
486
  function PortalResetPasswordView(props) {
486
- var _a, _b;
487
+ var _a, _b, _c, _d, _e, _f, _g, _h;
487
488
  const { states, callbacks } = props;
488
489
  return (h("div", { class: sheet$1.classes.InputContainer },
489
490
  h("style", { type: "text/css" },
490
491
  vanillaStyle,
491
492
  styleString$1),
492
- h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, validationError: ({ value }) => {
493
+ h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
493
494
  if (!value) {
494
495
  return "Cannot be empty";
495
496
  }
496
- } }, (((_a = states.validationErrors) === null || _a === void 0 ? void 0 : _a.password) ? {
497
+ } }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.password) ? {
498
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.password,
499
+ }
500
+ : {}), (((_g = states.validationErrors) === null || _g === void 0 ? void 0 : _g.password) ? {
497
501
  class: sheet$1.classes.ErrorStyle,
498
- helpText: ((_b = states.validationErrors) === null || _b === void 0 ? void 0 : _b.password) || "Cannot be empty",
502
+ helpText: ((_h = states.validationErrors) === null || _h === void 0 ? void 0 : _h.password) || "Cannot be empty",
499
503
  }
500
504
  : []), { onInput: (input) => states.enableValidation && callbacks.onInput(input) })),
501
505
  states.dynamicValidation));
502
506
  }
503
507
 
504
- const CONTEXT_NAME = "sq:validation-state";
505
508
  function usePasswordField(props) {
506
- const validationState = d(CONTEXT_NAME);
509
+ const validationState = d(FORM_VALIDATION_CONTEXT);
510
+ const registrationFormState = d(REGISTRATION_FORM_STATE_CONTEXT);
507
511
  const [dynamicValidation, setDynamicValidation] = useState("");
508
512
  function onInput(input) {
509
513
  const validation = validateNewPassword(input.target.value);
@@ -513,6 +517,7 @@ function usePasswordField(props) {
513
517
  states: {
514
518
  enableValidation: props.enableValidation,
515
519
  dynamicValidation,
520
+ registrationFormState,
516
521
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
517
522
  content: {
518
523
  fieldLabel: props.fieldLabel,
@@ -567,6 +572,7 @@ function usePasswordFieldDemo(props) {
567
572
  enableValidation: true,
568
573
  dynamicValidation,
569
574
  validationErrors: ((_f = (_e = props === null || props === void 0 ? void 0 : props.demoData) === null || _e === void 0 ? void 0 : _e.states) === null || _f === void 0 ? void 0 : _f.validationErrors) || {},
575
+ registrationFormState: {},
570
576
  content: {
571
577
  fieldLabel: "Password",
572
578
  },
@@ -1,7 +1,7 @@
1
1
  import { h, c as Host, r as registerInstance } from './index-17b4da69.js';
2
2
  import { m as h$1 } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { J } from './index.module-8e654eb1.js';
4
+ import { J } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { g as getProps } from './utils-334c1e34.js';
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-17b4da69.js';
2
- import { i as intl } from './global-79d68d1f.js';
2
+ import { i as intl } from './global-1e714a4d.js';
3
3
  import { A as AuthWrapper, a as AuthColumn } from './mixins-f60a614c.js';
4
4
  import { c as createStyleSheet } from './JSS-f00f9536.js';
5
5
  import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
@@ -1,14 +1,14 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
3
- import './global-79d68d1f.js';
3
+ import './global-1e714a4d.js';
4
4
  import './use-callback-69ec5c5c.js';
5
- import { v as vn, a as ae, L } from './index.module-8e654eb1.js';
5
+ import { v as vn, a as ae, L } from './index.module-9cd4623b.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './mixins-f60a614c.js';
9
9
  import './JSS-f00f9536.js';
10
10
  import './sqm-text-span-view-0ba1484d.js';
11
- import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-7dafea6c.js';
11
+ import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-ba08318b.js';
12
12
 
13
13
  function usePortalEmailVerification(props) {
14
14
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-17b4da69.js';
2
- import { i as intl } from './global-79d68d1f.js';
2
+ import { i as intl } from './global-1e714a4d.js';
3
3
  import { c as createStyleSheet } from './JSS-f00f9536.js';
4
4
 
5
5
  function PoweredByImg({ color = "#A6A6A6", width = 190, height = 29, }) {
@@ -1,12 +1,12 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { m as h } from './stencil-hooks.module-66fea7dc.js';
3
- import './global-79d68d1f.js';
3
+ import './global-1e714a4d.js';
4
4
  import './use-callback-69ec5c5c.js';
5
- import './index.module-8e654eb1.js';
5
+ import './index.module-9cd4623b.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import './JSS-f00f9536.js';
8
8
  import { g as getProps } from './utils-334c1e34.js';
9
- import { P as PortalFooterView } from './sqm-portal-footer-view-a857dd94.js';
9
+ import { P as PortalFooterView } from './sqm-portal-footer-view-9bfd61b4.js';
10
10
 
11
11
  const PortalFooter = class {
12
12
  constructor(hostRef) {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { f as fn, L, I as In } from './index.module-8e654eb1.js';
4
+ import { f as fn, L, I as In } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance } from './index-17b4da69.js';
2
2
  import { m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { t as te, I as In, L } from './index.module-8e654eb1.js';
4
+ import { t as te, I as In, L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
 
7
7
  function usePortalLogout({ nextPage }) {
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-17b4da69.js';
2
- import { i as intl } from './global-79d68d1f.js';
2
+ import { i as intl } from './global-1e714a4d.js';
3
3
  import { c as createStyleSheet } from './JSS-f00f9536.js';
4
4
  import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
5
5
  import { P as PortalContainerView } from './sqm-portal-container-view-ca454627.js';
@@ -1,15 +1,15 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
3
- import './global-79d68d1f.js';
3
+ import './global-1e714a4d.js';
4
4
  import './use-callback-69ec5c5c.js';
5
- import { d as dist, a as ae, w as wn, j as je, L } from './index.module-8e654eb1.js';
5
+ import { d as dist, a as ae, w as wn, $ as $e, L } from './index.module-9cd4623b.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './JSS-f00f9536.js';
9
9
  import { g as getProps } from './utils-334c1e34.js';
10
10
  import './sqm-text-span-view-0ba1484d.js';
11
11
  import './sqm-portal-container-view-ca454627.js';
12
- import { P as PortalProfileView } from './sqm-portal-profile-view-785773e9.js';
12
+ import { P as PortalProfileView } from './sqm-portal-profile-view-0f8dd14f.js';
13
13
 
14
14
  const GET_USER = dist.gql `
15
15
  query {
@@ -60,7 +60,7 @@ function usePortalProfile(props) {
60
60
  const [userData, setUserData] = useState(undefined);
61
61
  const [formState, setFormState] = useState(defaultFormState);
62
62
  const userDataResponse = wn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
63
- const [upsertUser, upsertUserResponse] = je(UPSERT_USER);
63
+ const [upsertUser, upsertUserResponse] = $e(UPSERT_USER);
64
64
  useEffect(() => {
65
65
  if (upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading)
66
66
  return;
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
2
2
  import { e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { a as ae, F as Fn, I as In, L } from './index.module-8e654eb1.js';
4
+ import { a as ae, F as Fn, I as In, L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
 
7
7
  function usePortalProtectedRoute({ requireEmailVerification, redirectTo, redirectToUnverified, }) {
@@ -1,14 +1,15 @@
1
1
  import { h, r as registerInstance } from './index-17b4da69.js';
2
2
  import { j as useRef, e as useEffect, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
3
3
  import { u as useCallback } from './use-callback-69ec5c5c.js';
4
- import { W as We, I as In, L } from './index.module-8e654eb1.js';
4
+ import { d as dist, W as We, w as wn, I as In, L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import { A as AuthWrapper, a as AuthColumn, H as HostBlock, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f60a614c.js';
9
9
  import { c as createStyleSheet } from './JSS-f00f9536.js';
10
10
  import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
11
- import { u as useValidationState, A as AsYouType } from './useValidationState-34e24357.js';
11
+ import { A as AsYouType } from './AsYouType-46f67d0d.js';
12
+ import { u as useRegistrationFormState, a as useValidationState } from './useRegistrationFormState-699c3e59.js';
12
13
 
13
14
  const style = {
14
15
  Wrapper: { ...AuthWrapper, "max-width": "600px" },
@@ -39,7 +40,7 @@ sqm-portal-register {
39
40
  const sheet = createStyleSheet(style);
40
41
  const styleString = sheet.toString();
41
42
  function PortalRegistrationFormView(props) {
42
- var _a, _b, _c, _d, _e, _f, _g, _h;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
43
44
  const { states, refs, callbacks, content } = props;
44
45
  if (states.error) {
45
46
  window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
@@ -50,10 +51,11 @@ function PortalRegistrationFormView(props) {
50
51
  styleString),
51
52
  h(TextSpanView, { type: "h3" }, content.pageLabel),
52
53
  h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
53
- states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
54
- h("div", { part: "erroralert-text" }, props.states.error))),
54
+ ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.disabled) ? (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
55
+ h("div", { part: "erroralert-text" }, states.registrationFormState.disabledMessage))) : (states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
56
+ h("div", { part: "erroralert-text" }, props.states.error)))),
55
57
  content.formData,
56
- !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
58
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), required: true, validationError: ({ value }) => {
57
59
  if (!value) {
58
60
  return "Cannot be empty";
59
61
  }
@@ -61,40 +63,78 @@ function PortalRegistrationFormView(props) {
61
63
  if (!value.includes("@")) {
62
64
  return "Must be a valid email address";
63
65
  }
64
- } }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
66
+ } }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.email) ? {
67
+ value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.email,
68
+ }
69
+ : {}), (((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.email) ? {
65
70
  class: sheet.classes.ErrorStyle,
66
- helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
71
+ helpText: ((_k = (_j = states.validationState) === null || _j === void 0 ? void 0 : _j.validationErrors) === null || _k === void 0 ? void 0 : _k.email) ||
67
72
  "Cannot be empty",
68
73
  }
69
74
  : [])))),
70
75
  !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
71
76
  content.passwordField,
72
- !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.validationState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
77
+ !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_m = (_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.initialData) === null || _m === void 0 ? void 0 : _m.confirmPassword) ? {
78
+ value: (_p = (_o = states.registrationFormState) === null || _o === void 0 ? void 0 : _o.initialData) === null || _p === void 0 ? void 0 : _p.confirmPassword,
79
+ }
80
+ : {}), (((_r = (_q = states.validationState) === null || _q === void 0 ? void 0 : _q.validationErrors) === null || _r === void 0 ? void 0 : _r.confirmPassword) ? {
73
81
  class: sheet.classes.ErrorStyle,
74
- helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
82
+ helpText: ((_t = (_s = states.validationState) === null || _s === void 0 ? void 0 : _s.validationErrors) === null || _t === void 0 ? void 0 : _t.confirmPassword) ||
75
83
  "Cannot be empty",
76
84
  }
77
85
  : [])))),
78
86
  content.terms,
79
87
  h("div", { class: sheet.classes.ButtonsContainer },
80
- h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
88
+ h("sl-button", { submit: true, loading: states.loading, disabled: (_u = states.registrationFormState) === null || _u === void 0 ? void 0 : _u.disabled, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
81
89
  content.secondaryButton))));
82
90
  }
83
91
 
92
+ const RegistrationFormQuery = dist.gql `
93
+ query RegistrationFormQuery($key: String!) {
94
+ form(key: $key) {
95
+ key
96
+ type
97
+ initialData {
98
+ initialData
99
+ isEnabled
100
+ isEnabledErrorMessage
101
+ }
102
+ }
103
+ }
104
+ `;
84
105
  function usePortalRegistrationForm(props) {
85
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
106
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
86
107
  const formRef = useRef(null);
108
+ const { registrationFormState, setRegistrationFormState } = useRegistrationFormState({});
87
109
  const { validationState, setValidationState } = useValidationState({});
88
110
  const [request, { loading, errors, data, formError }] = We();
111
+ const queryResponse = wn(RegistrationFormQuery, { key: props.formKey });
112
+ const formLoading = loading || queryResponse.loading;
113
+ useEffect(() => {
114
+ var _a, _b, _c;
115
+ const initialData = (_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData.initialData;
116
+ const disabled = ((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false;
117
+ const disabledMessage = ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
118
+ "The registration form is currently disabled.";
119
+ const formState = {
120
+ loading: formLoading,
121
+ disabled,
122
+ disabledMessage,
123
+ initialData,
124
+ };
125
+ setRegistrationFormState(formState);
126
+ }, [(_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData, formLoading]);
89
127
  const submit = async (event) => {
90
128
  let formControls = event.target.getFormControls();
91
129
  let formData = {};
92
130
  let validationErrors = {};
93
131
  formControls === null || formControls === void 0 ? void 0 : formControls.forEach((control) => {
132
+ console.log({ control }, control.name);
94
133
  if (!control.name)
95
134
  return;
96
135
  const key = control.name;
97
136
  const value = control.value;
137
+ // control.value = initialData[key] || control.value;
98
138
  jsonpointer.set(formData, key, value);
99
139
  // required validation
100
140
  if (control.required && !value) {
@@ -124,14 +164,15 @@ function usePortalRegistrationForm(props) {
124
164
  delete formData.email;
125
165
  delete formData.password;
126
166
  delete formData.confirmPassword;
127
- formData = { ...formData };
128
167
  const redirectPath = props.redirectPath;
129
168
  const variables = {
130
169
  key: props.formKey,
131
- email,
132
- password,
133
- formData,
134
- redirectPath,
170
+ formData: {
171
+ email,
172
+ password,
173
+ redirectPath,
174
+ ...formData,
175
+ },
135
176
  };
136
177
  try {
137
178
  await request(variables);
@@ -168,21 +209,27 @@ function usePortalRegistrationForm(props) {
168
209
  };
169
210
  }, [formRef.current]);
170
211
  let errorMessage = "";
171
- if ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"]) {
212
+ if (((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false) {
213
+ errorMessage =
214
+ ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
215
+ "The registration form is disabled";
216
+ }
217
+ else if ((_d = errors === null || errors === void 0 ? void 0 : errors.response) === null || _d === void 0 ? void 0 : _d["error"]) {
172
218
  errorMessage = "Network request failed";
173
219
  }
174
- else if ((errors === null || errors === void 0 ? void 0 : errors.message) && !((_b = errors === null || errors === void 0 ? void 0 : errors.response) === null || _b === void 0 ? void 0 : _b.errors.length)) {
220
+ else if ((errors === null || errors === void 0 ? void 0 : errors.message) && !((_e = errors === null || errors === void 0 ? void 0 : errors.response) === null || _e === void 0 ? void 0 : _e.errors.length)) {
175
221
  errorMessage = "Network request failed";
176
222
  }
177
223
  else {
178
224
  errorMessage =
179
- formError || ((_f = (_e = (_d = (_c = errors === null || errors === void 0 ? void 0 : errors.response) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions) === null || _f === void 0 ? void 0 : _f.message) || ((_j = (_h = (_g = errors === null || errors === void 0 ? void 0 : errors.response) === null || _g === void 0 ? void 0 : _g.errors) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.message) || (validationState === null || validationState === void 0 ? void 0 : validationState.error);
225
+ formError || ((_j = (_h = (_g = (_f = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.errors) === null || _f === void 0 ? void 0 : _f.response) === null || _g === void 0 ? void 0 : _g.errors) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.message) || ((_o = (_m = (_l = (_k = errors === null || errors === void 0 ? void 0 : errors.response) === null || _k === void 0 ? void 0 : _k.errors) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.extensions) === null || _o === void 0 ? void 0 : _o.message) || ((_r = (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.response) === null || _p === void 0 ? void 0 : _p.errors) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.message) || (validationState === null || validationState === void 0 ? void 0 : validationState.error);
180
226
  }
181
227
  return {
182
228
  states: {
183
- loading,
229
+ loading: loading || queryResponse.loading,
184
230
  error: errorMessage,
185
231
  validationState,
232
+ registrationFormState,
186
233
  confirmPassword: props.confirmPassword,
187
234
  hideInputs: props.hideInputs,
188
235
  loginPath: props.loginPath,
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { K as Ke, G as Ge, I as In, L } from './index.module-8e654eb1.js';
4
+ import { K as Ke, G as Ge, I as In, L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
2
2
  import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { a as ae, c as dn, I as In, L } from './index.module-8e654eb1.js';
4
+ import { a as ae, c as dn, I as In, L } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
7
  import './mixins-f60a614c.js';
@@ -20,7 +20,6 @@ function usePortalVerifyEmail({ nextPage, failedPage }) {
20
20
  const urlParams = new URLSearchParams(window.location.search);
21
21
  const oobCode = urlParams.get("oobCode");
22
22
  const nextPageOverride = urlParams.get("nextPage");
23
- urlParams.delete("oobCode");
24
23
  const failed = () => {
25
24
  return In.push({
26
25
  pathname: failedPage,
@@ -1,9 +1,9 @@
1
1
  import { h, c as Host, r as registerInstance } from './index-17b4da69.js';
2
2
  import { l, k as useMemo, e as useEffect, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { P } from './index.module-8e654eb1.js';
4
+ import { P } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
- import { u as useChildElements } from './useChildElements-5a1262d5.js';
6
+ import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
7
7
  import { g as getProps } from './utils-334c1e34.js';
8
8
 
9
9
  const TabsView = ({ content, placement, }) => {
@@ -1,17 +1,17 @@
1
1
  import { r as registerInstance, h as h$1, g as getElement, c as Host } from './index-17b4da69.js';
2
2
  import { m as h, u as useReducer, k as useMemo, e as useEffect } from './stencil-hooks.module-66fea7dc.js';
3
- import { i as intl } from './global-79d68d1f.js';
3
+ import { i as intl } from './global-1e714a4d.js';
4
4
  import './use-callback-69ec5c5c.js';
5
- import { L } from './index.module-8e654eb1.js';
5
+ import { L } from './index.module-9cd4623b.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './mixins-f60a614c.js';
9
9
  import { c as createStyleSheet } from './JSS-f00f9536.js';
10
10
  import { G as GenericTableView } from './GenericTableView-59c5d47c.js';
11
- import { a as useRequestRerender, u as useRerenderListener } from './re-render-cd65b629.js';
12
- import { u as useChildElements } from './useChildElements-5a1262d5.js';
11
+ import { a as useRequestRerender, u as useRerenderListener } from './re-render-d1b2a0de.js';
12
+ import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
13
13
  import { l as luxon } from './luxon-38ca2169.js';
14
- import { u as useReferralTable, t as tryMethod } from './useReferralTable-6c14c78f.js';
14
+ import { u as useReferralTable, t as tryMethod } from './useReferralTable-68c0823f.js';
15
15
  import { l as luxonLocale } from './utils-334c1e34.js';
16
16
  import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
17
17
 
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
2
2
  import { m as h } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import './index.module-8e654eb1.js';
4
+ import './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
- import { a as useRequestRerender } from './re-render-cd65b629.js';
6
+ import { a as useRequestRerender } from './re-render-d1b2a0de.js';
7
7
 
8
8
  const RewardTableCustomerNoteColumn = class {
9
9
  constructor(hostRef) {
@@ -1,17 +1,17 @@
1
1
  import { h, r as registerInstance, c as Host } from './index-17b4da69.js';
2
2
  import { b as browser, u as useReducer, e as useEffect, m as h$1, k as useMemo } from './stencil-hooks.module-66fea7dc.js';
3
- import { i as intl } from './global-79d68d1f.js';
3
+ import { i as intl } from './global-1e714a4d.js';
4
4
  import './use-callback-69ec5c5c.js';
5
- import { d as dist, a as ae, M, O, q as qn, L } from './index.module-8e654eb1.js';
5
+ import { d as dist, a as ae, M, O, q as qn, L } from './index.module-9cd4623b.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './mixins-f60a614c.js';
9
9
  import { c as createStyleSheet } from './JSS-f00f9536.js';
10
10
  import { G as GenericTableView } from './GenericTableView-59c5d47c.js';
11
- import { u as useRerenderListener, a as useRequestRerender } from './re-render-cd65b629.js';
12
- import { u as useChildElements } from './useChildElements-5a1262d5.js';
11
+ import { u as useRerenderListener, a as useRequestRerender } from './re-render-d1b2a0de.js';
12
+ import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
13
13
  import { l as luxon } from './luxon-38ca2169.js';
14
- import { g as generateUserError } from './useReferralTable-6c14c78f.js';
14
+ import { g as generateUserError } from './useReferralTable-68c0823f.js';
15
15
  import { l as luxonLocale } from './utils-334c1e34.js';
16
16
 
17
17
  const mockRewardData = (count = 4) => {
@@ -1,14 +1,14 @@
1
1
  import { h, r as registerInstance, c as Host } from './index-17b4da69.js';
2
2
  import { a as commonjsGlobal, k as useMemo, i as useState, e as useEffect, c as createCommonjsModule, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
3
- import './global-79d68d1f.js';
3
+ import './global-1e714a4d.js';
4
4
  import './use-callback-69ec5c5c.js';
5
- import { I as In, F as Fn, t as te$1, d as dist, e as tn, A as A$1 } from './index.module-8e654eb1.js';
5
+ import { I as In, F as Fn, t as te$1, d as dist, e as tn, A as A$1 } from './index.module-9cd4623b.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import './cjs-bdfb4486.js';
8
8
  import './mixins-f60a614c.js';
9
9
  import { c as createStyleSheet } from './JSS-f00f9536.js';
10
10
  import { G as GenericTableView } from './GenericTableView-59c5d47c.js';
11
- import './useChildElements-5a1262d5.js';
11
+ import './useChildElements-e1a1d3d1.js';
12
12
  import { l as luxon } from './luxon-38ca2169.js';
13
13
  import './utils-334c1e34.js';
14
14
  import './sqm-text-span-view-0ba1484d.js';
@@ -16,15 +16,15 @@ import { A as AssetCardView } from './sqm-asset-card-view-08e68656.js';
16
16
  import { H as HeroView } from './sqm-hero-view-93fac447.js';
17
17
  import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-10657658.js';
18
18
  import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-06d444ca.js';
19
- import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-52b5e3b9.js';
20
- import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-7dafea6c.js';
21
- import { a as PoweredByImg$1, P as PortalFooterView } from './sqm-portal-footer-view-a857dd94.js';
19
+ import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-7e6199c2.js';
20
+ import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-ba08318b.js';
21
+ import { a as PoweredByImg$1, P as PortalFooterView } from './sqm-portal-footer-view-9bfd61b4.js';
22
22
  import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view-86d13eef.js';
23
23
  import { P as PortalContainerView } from './sqm-portal-container-view-ca454627.js';
24
- import { P as PortalProfileView } from './sqm-portal-profile-view-785773e9.js';
24
+ import { P as PortalProfileView } from './sqm-portal-profile-view-0f8dd14f.js';
25
25
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-213b3af6.js';
26
26
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-c32dfd7e.js';
27
- import { S as ShareButtonView, L as LeaderboardView, a as ShareLinkView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as useDemoBigStat, d as StatContainerView, e as PortalChangePasswordView, f as PortalLoginView, g as PortalRegisterView, T as TaskCardView, h as ProgressBarView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, H as autoColorScaleCss, J as ShadowViewAddon } from './ShadowViewAddon-77643eb3.js';
27
+ import { S as ShareButtonView, L as LeaderboardView, a as ShareLinkView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as useDemoBigStat, d as StatContainerView, e as PortalChangePasswordView, f as PortalLoginView, g as PortalRegisterView, T as TaskCardView, h as ProgressBarView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, H as autoColorScaleCss, J as ShadowViewAddon } from './ShadowViewAddon-7d94f9d6.js';
28
28
  import { P as PortalSectionView } from './sqm-portal-section-view-6c249c74.js';
29
29
 
30
30
  /**
@@ -5982,6 +5982,7 @@ const Start = () => {
5982
5982
  initValue: "",
5983
5983
  states: {
5984
5984
  enableValidation: true,
5985
+ registrationFormState: {},
5985
5986
  validationErrors: {},
5986
5987
  content: {
5987
5988
  fieldLabel: "Password",
@@ -5995,6 +5996,7 @@ const EmptyError = () => {
5995
5996
  states: {
5996
5997
  enableValidation: true,
5997
5998
  validationErrors: { password: "Cannot be empty" },
5999
+ registrationFormState: {},
5998
6000
  content: {
5999
6001
  fieldLabel: "Password",
6000
6002
  },
@@ -6006,6 +6008,7 @@ const ValidationError = () => {
6006
6008
  initValue: "asdf",
6007
6009
  states: {
6008
6010
  enableValidation: true,
6011
+ registrationFormState: {},
6009
6012
  validationErrors: { password: "Incomplete" },
6010
6013
  content: {
6011
6014
  fieldLabel: "Password",
@@ -1,9 +1,9 @@
1
1
  import { h, c as Host, r as registerInstance } from './index-17b4da69.js';
2
2
  import { l, k as useMemo, e as useEffect, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
3
3
  import './use-callback-69ec5c5c.js';
4
- import { P } from './index.module-8e654eb1.js';
4
+ import { P } from './index.module-9cd4623b.js';
5
5
  import './extends-c31f1eff.js';
6
- import { u as useChildElements } from './useChildElements-5a1262d5.js';
6
+ import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
7
7
  import { g as getProps } from './utils-334c1e34.js';
8
8
 
9
9
  const TabsView = ({ content, placement, }) => {
@@ -1,5 +1,5 @@
1
1
  import { i as useState, e as useEffect } from './stencil-hooks.module-66fea7dc.js';
2
- import { P } from './index.module-8e654eb1.js';
2
+ import { P } from './index.module-9cd4623b.js';
3
3
 
4
4
  function useChildElements() {
5
5
  const host = P();
@@ -1,8 +1,8 @@
1
1
  import { h } from './index-17b4da69.js';
2
2
  import { b as browser, u as useReducer, e as useEffect } from './stencil-hooks.module-66fea7dc.js';
3
- import { d as dist, a as ae, M, O, w as wn, q as qn } from './index.module-8e654eb1.js';
4
- import { u as useRerenderListener } from './re-render-cd65b629.js';
5
- import { u as useChildElements } from './useChildElements-5a1262d5.js';
3
+ import { d as dist, a as ae, M, O, w as wn, q as qn } from './index.module-9cd4623b.js';
4
+ import { u as useRerenderListener } from './re-render-d1b2a0de.js';
5
+ import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
6
6
 
7
7
  const debug = browser("sq:useReferralTable");
8
8
  const CSS_NAMESPACE = "sqm-referral-table";
@@ -0,0 +1,18 @@
1
+ import { y } from './stencil-hooks.module-66fea7dc.js';
2
+ import { P } from './index.module-9cd4623b.js';
3
+
4
+ const FORM_VALIDATION_CONTEXT = "sq:validation-state";
5
+ function useValidationState(formState) {
6
+ const host = P();
7
+ const [validationState, setValidationState] = y(host, FORM_VALIDATION_CONTEXT, formState);
8
+ return { validationState, setValidationState };
9
+ }
10
+
11
+ const REGISTRATION_FORM_STATE_CONTEXT = "sq:registration-form-state";
12
+ function useRegistrationFormState(formState) {
13
+ const host = P();
14
+ const [registrationFormState, setRegistrationFormState] = y(host, REGISTRATION_FORM_STATE_CONTEXT, formState);
15
+ return { registrationFormState, setRegistrationFormState };
16
+ }
17
+
18
+ export { FORM_VALIDATION_CONTEXT as F, REGISTRATION_FORM_STATE_CONTEXT as R, useValidationState as a, useRegistrationFormState as u };